From 191ad0f1abbbec923c7d3c1fbd3ab703c425b23e Mon Sep 17 00:00:00 2001 From: "sj.hwang" Date: Fri, 24 Feb 2017 09:57:18 +0900 Subject: [PATCH 0001/2747] Add LineStart, LineEnd to CursorMovePosition --- src/vs/editor/common/editorCommon.ts | 3 +++ src/vs/monaco.d.ts | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index 56720ba9b62ac..2efe42f96a1ac 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -4190,6 +4190,9 @@ export const CursorMovePosition = { Up: 'up', Down: 'down', + LineStart: 'lineStart', + LineEnd: 'lineEnd', + WrappedLineStart: 'wrappedLineStart', WrappedLineFirstNonWhitespaceCharacter: 'wrappedLineFirstNonWhitespaceCharacter', WrappedLineColumnCenter: 'wrappedLineColumnCenter', diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 04c2f68d897de..edf37cb5bdc0e 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -3320,6 +3320,8 @@ declare module monaco.editor { Right: string; Up: string; Down: string; + LineStart: string; + LineEnd: string; WrappedLineStart: string; WrappedLineFirstNonWhitespaceCharacter: string; WrappedLineColumnCenter: string; From 7ed7dcadd4dd2e03e5397ed55b38554116a392a5 Mon Sep 17 00:00:00 2001 From: "sj.hwang" Date: Fri, 24 Feb 2017 17:36:38 +0900 Subject: [PATCH 0002/2747] Change behavior of home/end button --- src/vs/editor/common/controller/cursor.ts | 10 ++- src/vs/editor/common/controller/oneCursor.ts | 64 ++++++++++++++++++++ 2 files changed, 72 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 76bff2078a1f8..a7aebc6409350 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -1234,11 +1234,17 @@ export class Cursor extends EventEmitter { } private _moveToBeginningOfLine(inSelectionMode: boolean, ctx: IMultipleCursorOperationContext): boolean { - return this._invokeForAll(ctx, (cursorIndex: number, oneCursor: OneCursor, oneCtx: IOneCursorOperationContext) => OneCursorOp.moveToBeginningOfLine(oneCursor, inSelectionMode, oneCtx)); + ctx.eventData = ctx.eventData || {}; + ctx.eventData.to = editorCommon.CursorMovePosition.LineStart; + ctx.eventData.select = inSelectionMode; + return this._cursorMove(ctx); } private _moveToEndOfLine(inSelectionMode: boolean, ctx: IMultipleCursorOperationContext): boolean { - return this._invokeForAll(ctx, (cursorIndex: number, oneCursor: OneCursor, oneCtx: IOneCursorOperationContext) => OneCursorOp.moveToEndOfLine(oneCursor, inSelectionMode, oneCtx)); + ctx.eventData = ctx.eventData || {}; + ctx.eventData.to = editorCommon.CursorMovePosition.LineEnd; + ctx.eventData.select = inSelectionMode; + return this._cursorMove(ctx); } private _moveToBeginningOfBuffer(inSelectionMode: boolean, ctx: IMultipleCursorOperationContext): boolean { diff --git a/src/vs/editor/common/controller/oneCursor.ts b/src/vs/editor/common/controller/oneCursor.ts index 877dca6350cef..18869925a1e7f 100644 --- a/src/vs/editor/common/controller/oneCursor.ts +++ b/src/vs/editor/common/controller/oneCursor.ts @@ -537,6 +537,10 @@ export class OneCursorOp { return this._moveUp(cursor, moveParams, ctx); case editorCommon.CursorMovePosition.Down: return this._moveDown(cursor, moveParams, ctx); + case editorCommon.CursorMovePosition.LineStart: + return this._moveToLineStart(cursor, moveParams, ctx); + case editorCommon.CursorMovePosition.LineEnd: + return this._moveToLineEnd(cursor, moveParams, ctx); case editorCommon.CursorMovePosition.WrappedLineStart: viewColumn = cursor.viewModel.getLineMinColumn(viewLineNumber); break; @@ -695,6 +699,66 @@ export class OneCursorOp { ); } + private static _moveToLineStart(cursor: OneCursor, moveArguments: CursorMoveArguments, ctx: IOneCursorOperationContext): boolean { + const currentViewStateColumn = cursor.viewState.position.column; + const currentModelStateColumn = cursor.modelState.position.column; + const isFirstLineOfWrappedLine = currentViewStateColumn === currentModelStateColumn; + + const currentViewStatelineNumber = cursor.viewState.position.lineNumber; + const firstNonBlankColumn = cursor.viewModel.getLineFirstNonWhitespaceColumn(currentViewStatelineNumber); + const isBeginningOfViewLine = currentViewStateColumn === firstNonBlankColumn; + + if (!isFirstLineOfWrappedLine && !isBeginningOfViewLine) { + return this._moveToLineStartByView(cursor, moveArguments.select, ctx); + } else { + return this._moveToLineStartByModel(cursor, moveArguments.select, ctx); + } + } + + private static _moveToLineStartByView(cursor: OneCursor, inSelectionMode: boolean, ctx: IOneCursorOperationContext): boolean { + return this._applyMoveOperationResult( + cursor, ctx, + this._fromViewCursorState(cursor, MoveOperations.moveToBeginningOfLine(cursor.config, cursor.viewModel, cursor.viewState, inSelectionMode)) + ); + } + + private static _moveToLineStartByModel(cursor: OneCursor, inSelectionMode: boolean, ctx: IOneCursorOperationContext): boolean { + return this._applyMoveOperationResult( + cursor, ctx, + this._fromModelCursorState(cursor, MoveOperations.moveToBeginningOfLine(cursor.config, cursor.model, cursor.modelState, inSelectionMode)) + ); + } + + private static _moveToLineEnd(cursor: OneCursor, moveArguments: CursorMoveArguments, ctx: IOneCursorOperationContext): boolean { + const viewStatePosition = cursor.viewState.position; + const viewModelMaxColumn = cursor.viewModel.getLineMaxColumn(viewStatePosition.lineNumber); + const isEndOfViewLine = viewStatePosition.column === viewModelMaxColumn; + + const modelStatePosition = cursor.modelState.position; + const modelMaxColumn = cursor.model.getLineMaxColumn(modelStatePosition.lineNumber); + const isEndLineOfWrappedLine = viewModelMaxColumn - viewStatePosition.column === modelMaxColumn - modelStatePosition.column; + + if (isEndOfViewLine || isEndLineOfWrappedLine) { + return this._moveToLineEndByModel(cursor, moveArguments.select, ctx); + } else { + return this._moveToLineEndByView(cursor, moveArguments.select, ctx); + } + } + + private static _moveToLineEndByView(cursor: OneCursor, inSelectionMode: boolean, ctx: IOneCursorOperationContext): boolean { + return this._applyMoveOperationResult( + cursor, ctx, + this._fromViewCursorState(cursor, MoveOperations.moveToEndOfLine(cursor.config, cursor.viewModel, cursor.viewState, inSelectionMode)) + ); + } + + private static _moveToLineEndByModel(cursor: OneCursor, inSelectionMode: boolean, ctx: IOneCursorOperationContext): boolean { + return this._applyMoveOperationResult( + cursor, ctx, + this._fromModelCursorState(cursor, MoveOperations.moveToEndOfLine(cursor.config, cursor.model, cursor.modelState, inSelectionMode)) + ); + } + public static moveToBeginningOfLine(cursor: OneCursor, inSelectionMode: boolean, ctx: IOneCursorOperationContext): boolean { return this._applyMoveOperationResult( cursor, ctx, From 9f8dd87d482aac8456d686168f219ac4302ebbb4 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Thu, 9 Mar 2017 21:23:15 -0700 Subject: [PATCH 0003/2747] Update PHP snippits --- extensions/php/snippets/php.json | 125 +++++++++++++++++-------------- 1 file changed, 67 insertions(+), 58 deletions(-) diff --git a/extensions/php/snippets/php.json b/extensions/php/snippets/php.json index 5a3f2c4418ca0..24a4426a54aa3 100644 --- a/extensions/php/snippets/php.json +++ b/extensions/php/snippets/php.json @@ -1,63 +1,75 @@ { - "Class Variable": { - "prefix": "doc_v", + "class …": { + "prefix": "class", + "body": [ + "class ${1:ClassName} ${2:extends ${3:AnotherClass}} ${4:implements ${5:Interface}}", + "{", + "\t$0", + "}", + "" + ], + "description": "Class definition" + }, + "PHPDoc class …": { + "prefix": "doc_class", "body": [ "/**", - " * ${1:undocumented class variable}", - " *", - " * @var ${2:string}", - " **/", - "${3:var} $$2;$0" + " * ${6:undocumented class}", + " */", + "class ${1:ClassName} ${2:extends ${3:AnotherClass}} ${4:implements ${5:Interface}}", + "{", + "\t$0", + "}", + "" ], - "description": "Documented Class Variable" + "description": "Documented Class Declaration" }, "function __construct": { "prefix": "con", "body": [ - "function __construct(${1:$${2:foo} ${3:= ${4:null}}}) {", - "\t${2:$this->$0 = $$0;}", - "}" + "${1:public} function __construct(${2:${3:Type} $${4:var}${5: = ${6:null}}}) {", + "\t\\$this->${4:var} = $${4:var};$0", + "}" ] }, - "class …": { - "prefix": "class", + "PHPDoc property": { + "prefix": "doc_v", "body": [ - "/**", - " * $1", - " */", - "class ${2:ClassName} ${3:extends ${4:AnotherClass}}", - "{", - "\t$5", - "\tfunction ${6:__construct}(${7:argument})", - "\t{", - "\t\t${0:# code...}", - "\t}", - "}", - "" + "/** @var ${1:Type} $${2:var} ${3:description} */", + "${4:protected} $${2:var}${5: = ${6:null}};$0" ], - "description": "Class definition" + "description": "Documented Class Variable" }, "PHPDoc function …": { "prefix": "doc_f", "body": [ "/**", - " * ${6:undocumented function summary}", + " * ${1:undocumented function summary}", " *", - " * ${7:Undocumented function long description}", + " * ${2:Undocumented function long description}", " *", - " * @param ${8:type} ${9:var} ${10:Description}", + "${3: * @param ${4:Type} $${5:var} ${6:Description}}", + "${7: * @return ${8:type}}", + "${9: * @throws ${10:conditon}}", " **/", - "${1:public }function ${2:FunctionName}(${3:$${4:value}${5:=''}})", + "${11:public }function ${12:FunctionName}(${13:${14:${4:Type} }$${5:var}${15: = ${16:null}}})", "{", "\t${0:# code...}", "}" ], "description": "Documented function" }, + "PHPDoc param …": { + "prefix": "param", + "body": [ + "* @param ${1:Type} ${2:var} ${3:Description}$0" + ], + "description": "Paramater documentation" + }, "function …": { "prefix": "fun", "body": [ - "${1:public }function ${2:FunctionName}(${3:$${4:value}${5:=''}})", + "${1:public }function ${2:FunctionName}(${3:${4:${5:Type} }$${6:var}${7: = ${8:null}}})", "{", "\t${0:# code...}", "}" @@ -72,10 +84,7 @@ " */", "trait ${2:TraitName}", "{", - "\tfunction ${3:functionName}(${4:argument})", - "\t{", - "\t\t${5:# code...}", - "\t}", + "\t$0", "}", "" ], @@ -94,21 +103,18 @@ "body": [ "do {", "\t${0:# code...}", - "} while (${1:${2:$a} <= ${3:10}});" + "} while (${1:$${2:a} <= ${3:10}});" ], "description": "Do-While loop" }, - "if … else …": { - "prefix": "ifelse", + "while …": { + "prefix": "while", "body": [ - "if (${1:condition}) {", - "\t${2:# code...}", - "} else {", - "\t${3:# code...}", - "}", - "$0" + "while (${1:$${2:a} <= ${3:10}}) {", + "\t${0:# code...}", + "}" ], - "description": "If Else block" + "description": "While-loop" }, "if …": { "prefix": "if", @@ -119,6 +125,18 @@ ], "description": "If block" }, + "if … else …": { + "prefix": "ifelse", + "body": [ + "if (${1:condition}) {", + "\t${2:# code...}", + "} else {", + "\t${3:# code...}", + "}", + "$0" + ], + "description": "If Else block" + }, "$… = ( … ) ? … : …": { "prefix": "if?", "body": "$${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b} ;", @@ -178,7 +196,7 @@ "switch …": { "prefix": "switch", "body": [ - "switch (${1:variable}) {", + "switch (\\$${1:variable}) {", "\tcase '${2:value}':", "\t\t${3:# code...}", "\t\tbreak;", @@ -193,7 +211,7 @@ "case …": { "prefix": "case", "body": [ - "case '${1:variable}':", + "case '${1:value}':", "\t${0:# code...}", "\tbreak;" ], @@ -201,12 +219,12 @@ }, "$this->…": { "prefix": "this", - "body": "$this->$0", + "body": "\\$this->$0;", "description": "$this->..." }, "echo $this->…": { "prefix": "ethis", - "body": "echo $this->$0", + "body": "echo \\$this->$0;", "description": "Echo this" }, "Throw Exception": { @@ -216,14 +234,5 @@ "$0" ], "description": "Throw exception" - }, - "while …": { - "prefix": "while", - "body": [ - "while (${1:$a <= 10}) {", - "\t${0:# code...}", - "}" - ], - "description": "While-loop" } } \ No newline at end of file From f293a94b766d5a17a55ac26c80085e780c53a5fc Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 10 Mar 2017 10:52:31 +0100 Subject: [PATCH 0004/2747] :sparkles: handle proxy authentication --- src/vs/code/electron-main/auth.html | 123 ++++++++++++++++++++++++++++ src/vs/code/electron-main/auth.ts | 74 +++++++++++++++++ src/vs/code/electron-main/main.ts | 8 ++ 3 files changed, 205 insertions(+) create mode 100644 src/vs/code/electron-main/auth.html create mode 100644 src/vs/code/electron-main/auth.ts diff --git a/src/vs/code/electron-main/auth.html b/src/vs/code/electron-main/auth.html new file mode 100644 index 0000000000000..207f72194383e --- /dev/null +++ b/src/vs/code/electron-main/auth.html @@ -0,0 +1,123 @@ + + + + + + + + + + +

Authentication Required

+
+

+
+

+

+

+ + +

+
+
+ + + + + \ No newline at end of file diff --git a/src/vs/code/electron-main/auth.ts b/src/vs/code/electron-main/auth.ts new file mode 100644 index 0000000000000..7c522cf39ea69 --- /dev/null +++ b/src/vs/code/electron-main/auth.ts @@ -0,0 +1,74 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { localize } from 'vs/nls'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { IWindowsMainService } from 'vs/code/electron-main/windows'; +import { fromEventEmitter } from 'vs/base/node/event'; +import { BrowserWindow, app } from 'electron'; + +type LoginEvent = { + event: Electron.Event; + webContents: Electron.WebContents; + req: Electron.LoginRequest; + authInfo: Electron.LoginAuthInfo; + cb: (username: string, password: string) => void; +}; + +export class AuthHandler { + + _serviceBrand: any; + + private disposables: IDisposable[] = []; + + constructor( + @IWindowsMainService private windowsService: IWindowsMainService + ) { + const onLogin = fromEventEmitter(app, 'login', (event, webContents, req, authInfo, cb) => ({ event, webContents, req, authInfo, cb })); + onLogin(this.onLogin, this, this.disposables); + } + + private onLogin({ event, authInfo, cb }: LoginEvent): void { + const opts: any = { + alwaysOnTop: true, + skipTaskbar: true, + resizable: false, + width: 450, + height: 260, + show: true, + title: localize('authRequired', "Authentication Required") + }; + + const focusedWindow = this.windowsService.getFocusedWindow(); + + if (focusedWindow) { + opts.parent = focusedWindow.win; + opts.modal = true; + } + + const win = new BrowserWindow(opts); + + const config = {}; + + const baseUrl = require.toUrl('./auth.html'); + const url = `${baseUrl}?config=${encodeURIComponent(JSON.stringify(config))}`; + win.loadURL(url); + + const proxyUrl = `${authInfo.host}:${authInfo.port}`; + const message = localize('proxyauth', "The proxy {0} requires a username and password.", proxyUrl); + + event.preventDefault(); + win.webContents.executeJavaScript('promptForCredentials(' + JSON.stringify({ message }) + ')', true).then(({ username, password }: { username: string, password: string }) => { + cb(username, password); + win.close(); + }); + } + + dispose(): void { + this.disposables = dispose(this.disposables); + } +} \ No newline at end of file diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts index 8936a0baad000..e2781aee76952 100644 --- a/src/vs/code/electron-main/main.ts +++ b/src/vs/code/electron-main/main.ts @@ -8,6 +8,7 @@ import { app, ipcMain as ipc, BrowserWindow } from 'electron'; import { assign } from 'vs/base/common/objects'; import * as platform from 'vs/base/common/platform'; +import { IDisposable } from 'vs/base/common/lifecycle'; import { parseMainProcessArgv } from 'vs/platform/environment/node/argv'; import { mkdirp } from 'vs/base/node/pfs'; import { validatePaths } from 'vs/code/electron-main/paths'; @@ -56,6 +57,7 @@ import { resolveCommonProperties, machineIdStorageKey, machineIdIpcChannel } fro import { getDelayedChannel } from 'vs/base/parts/ipc/common/ipc'; import product from 'vs/platform/node/product'; import pkg from 'vs/platform/node/package'; +import { AuthHandler } from './auth'; import * as fs from 'original-fs'; @@ -221,6 +223,8 @@ function main(accessor: ServicesAccessor, mainIpcServer: Server, userEnv: platfo app.setAppUserModelId(product.win32AppUserModelId); } + const disposables: IDisposable[] = []; + function dispose() { if (mainIpcServer) { mainIpcServer.dispose(); @@ -233,6 +237,7 @@ function main(accessor: ServicesAccessor, mainIpcServer: Server, userEnv: platfo configurationService.dispose(); sharedProcess.dispose(); + disposables.forEach(d => d.dispose()); } // Dispose on app quit @@ -275,6 +280,9 @@ function main(accessor: ServicesAccessor, mainIpcServer: Server, userEnv: platfo // Start shared process here sharedProcess.spawn(); + + const authHandler = instantiationService2.createInstance(AuthHandler); + disposables.push(authHandler); }); } From 51b7c8ef17487b0563e79b5696da55f91dd43afc Mon Sep 17 00:00:00 2001 From: Cody Hoover Date: Sun, 12 Mar 2017 15:16:01 +0100 Subject: [PATCH 0005/2747] Addresses #14221 by reading wordPattern from the language-configuration.json --- .../common/modes/languageConfiguration.ts | 5 +++ .../languageConfigurationExtensionPoint.ts | 42 ++++++++++++++++++- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/common/modes/languageConfiguration.ts b/src/vs/editor/common/modes/languageConfiguration.ts index 1fec47f480649..31b6107f37276 100644 --- a/src/vs/editor/common/modes/languageConfiguration.ts +++ b/src/vs/editor/common/modes/languageConfiguration.ts @@ -142,6 +142,11 @@ export interface IAutoClosingPairConditional extends IAutoClosingPair { notIn?: string[]; } +export interface IRegExp { + pattern: string; + flags?: string; +} + /** * Describes what to do with the indentation when pressing Enter. */ diff --git a/src/vs/editor/node/languageConfigurationExtensionPoint.ts b/src/vs/editor/node/languageConfigurationExtensionPoint.ts index 81c0add5dcb2a..0dfabaadecbaa 100644 --- a/src/vs/editor/node/languageConfigurationExtensionPoint.ts +++ b/src/vs/editor/node/languageConfigurationExtensionPoint.ts @@ -7,7 +7,7 @@ import * as nls from 'vs/nls'; import { parse } from 'vs/base/common/json'; import { readFile } from 'vs/base/node/pfs'; -import { CharacterPair, LanguageConfiguration, IAutoClosingPair, IAutoClosingPairConditional, CommentRule } from 'vs/editor/common/modes/languageConfiguration'; +import { CharacterPair, LanguageConfiguration, IAutoClosingPair, IAutoClosingPairConditional, CommentRule, IRegExp } from 'vs/editor/common/modes/languageConfiguration'; import { IModeService } from 'vs/editor/common/services/modeService'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { Extensions, IJSONContributionRegistry } from 'vs/platform/jsonschemas/common/jsonContributionRegistry'; @@ -21,6 +21,7 @@ interface ILanguageConfiguration { brackets?: CharacterPair[]; autoClosingPairs?: (CharacterPair | IAutoClosingPairConditional)[]; surroundingPairs?: (CharacterPair | IAutoClosingPair)[]; + wordPattern?: string | IRegExp; } export class LanguageConfigurationFileHandler { @@ -85,6 +86,26 @@ export class LanguageConfigurationFileHandler { richEditConfig.surroundingPairs = this._mapCharacterPairs(configuration.surroundingPairs); } + if (configuration.wordPattern) { + let pattern = ''; + let flags = ''; + + if (typeof configuration.wordPattern === 'string') { + pattern = configuration.wordPattern; + } else if (typeof configuration.wordPattern === 'object') { + pattern = configuration.wordPattern.pattern; + flags = configuration.wordPattern.flags; + } + + if (pattern) { + try { + richEditConfig.wordPattern = new RegExp(pattern, flags); + } catch (error) { + // Malformed regexes are ignored + } + } + } + LanguageConfigurationRegistry.register(languageIdentifier, richEditConfig); } @@ -208,6 +229,25 @@ const schema: IJSONSchema = { }] } }, + wordPattern: { + default: '', + description: nls.localize('schema.wordPattern', 'The word definition for the language.'), + type: ['string', 'object'], + properties: { + pattern: { + type: 'string', + description: nls.localize('schema.wordPattern.pattern', 'The RegExp pattern used to match words.'), + default: '', + }, + flags: { + type: 'string', + description: nls.localize('schema.wordPattern.flags', 'The RegExp flags used to match words.'), + default: 'g', + pattern: '^([gimuy]+)$', + patternErrorMessage: nls.localize('schema.wordPattern.flags.errorMessage', 'Must match the pattern `/^([gimuy]+)$/`.') + } + } + } } }; let schemaRegistry = Registry.as(Extensions.JSONContribution); From 1aa16859f958d90234e624668e40f3285f151986 Mon Sep 17 00:00:00 2001 From: Cody Hoover Date: Sun, 12 Mar 2017 18:27:23 +0100 Subject: [PATCH 0006/2747] Added missing monaco.d.ts --- src/vs/monaco.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 772fa0233e229..5889e2c3d0876 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -4436,6 +4436,11 @@ declare module monaco.languages { notIn?: string[]; } + export interface IRegExp { + pattern: string; + flags?: string; + } + /** * Describes what to do with the indentation when pressing Enter. */ From e30b83608c383985eeb510fbeeb021fb31c2daad Mon Sep 17 00:00:00 2001 From: Cody Hoover Date: Wed, 22 Mar 2017 00:15:14 +0100 Subject: [PATCH 0007/2747] Add letterSpacing to config to address #18715 --- src/vs/base/browser/fastDomNode.ts | 10 ++++++++++ src/vs/editor/browser/config/charWidthReader.ts | 3 +++ src/vs/editor/browser/config/configuration.ts | 4 ++++ src/vs/editor/common/config/commonEditorConfig.ts | 5 +++++ src/vs/editor/common/config/fontInfo.ts | 14 ++++++++++++-- src/vs/editor/common/editorCommon.ts | 4 ++++ .../editor/test/common/mocks/testConfiguration.ts | 1 + src/vs/monaco.d.ts | 5 +++++ 8 files changed, 44 insertions(+), 2 deletions(-) diff --git a/src/vs/base/browser/fastDomNode.ts b/src/vs/base/browser/fastDomNode.ts index 7b172c3720d3d..0663924aa5dfb 100644 --- a/src/vs/base/browser/fastDomNode.ts +++ b/src/vs/base/browser/fastDomNode.ts @@ -20,6 +20,7 @@ export abstract class FastDomNode { private _fontWeight: string; private _fontSize: number; private _lineHeight: number; + private _letterSpacing: number; private _className: string; private _display: string; private _position: string; @@ -43,6 +44,7 @@ export abstract class FastDomNode { this._fontWeight = ''; this._fontSize = -1; this._lineHeight = -1; + this._letterSpacing = -1; this._className = ''; this._display = ''; this._position = ''; @@ -170,6 +172,14 @@ export abstract class FastDomNode { this._domNode.style.lineHeight = this._lineHeight + 'px'; } + public setLetterSpacing(letterSpacing: number): void { + if (this._letterSpacing === letterSpacing) { + return; + } + this._letterSpacing = letterSpacing; + this._domNode.style.letterSpacing = this._letterSpacing + 'px'; + } + public setClassName(className: string): void { if (this._className === className) { return; diff --git a/src/vs/editor/browser/config/charWidthReader.ts b/src/vs/editor/browser/config/charWidthReader.ts index d1e0b07bf1ecb..6e5d782a037f6 100644 --- a/src/vs/editor/browser/config/charWidthReader.ts +++ b/src/vs/editor/browser/config/charWidthReader.ts @@ -77,6 +77,7 @@ class DomCharWidthReader implements ICharWidthReader { regularDomNode.style.fontWeight = this._bareFontInfo.fontWeight; regularDomNode.style.fontSize = this._bareFontInfo.fontSize + 'px'; regularDomNode.style.lineHeight = this._bareFontInfo.lineHeight + 'px'; + regularDomNode.style.letterSpacing = this._bareFontInfo.letterSpacing + 'px'; container.appendChild(regularDomNode); let boldDomNode = document.createElement('div'); @@ -84,6 +85,7 @@ class DomCharWidthReader implements ICharWidthReader { boldDomNode.style.fontWeight = 'bold'; boldDomNode.style.fontSize = this._bareFontInfo.fontSize + 'px'; boldDomNode.style.lineHeight = this._bareFontInfo.lineHeight + 'px'; + boldDomNode.style.letterSpacing = this._bareFontInfo.letterSpacing + 'px'; container.appendChild(boldDomNode); let italicDomNode = document.createElement('div'); @@ -91,6 +93,7 @@ class DomCharWidthReader implements ICharWidthReader { italicDomNode.style.fontWeight = this._bareFontInfo.fontWeight; italicDomNode.style.fontSize = this._bareFontInfo.fontSize + 'px'; italicDomNode.style.lineHeight = this._bareFontInfo.lineHeight + 'px'; + italicDomNode.style.letterSpacing = this._bareFontInfo.letterSpacing + 'px'; italicDomNode.style.fontStyle = 'italic'; container.appendChild(italicDomNode); diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts index c5faf1e8690ba..62933c86c7673 100644 --- a/src/vs/editor/browser/config/configuration.ts +++ b/src/vs/editor/browser/config/configuration.ts @@ -89,6 +89,7 @@ export interface ISerializedFontInfo { readonly fontWeight: string; readonly fontSize: number; readonly lineHeight: number; + readonly letterSpacing: number; readonly isMonospace: boolean; readonly typicalHalfwidthCharacterWidth: number; readonly typicalFullwidthCharacterWidth: number; @@ -163,6 +164,7 @@ class CSSBasedConfiguration extends Disposable { fontWeight: readConfig.fontWeight, fontSize: readConfig.fontSize, lineHeight: readConfig.lineHeight, + letterSpacing: readConfig.letterSpacing, isMonospace: readConfig.isMonospace, typicalHalfwidthCharacterWidth: Math.max(readConfig.typicalHalfwidthCharacterWidth, 5), typicalFullwidthCharacterWidth: Math.max(readConfig.typicalFullwidthCharacterWidth, 5), @@ -283,6 +285,7 @@ class CSSBasedConfiguration extends Disposable { fontWeight: bareFontInfo.fontWeight, fontSize: bareFontInfo.fontSize, lineHeight: bareFontInfo.lineHeight, + letterSpacing: bareFontInfo.letterSpacing, isMonospace: isMonospace, typicalHalfwidthCharacterWidth: typicalHalfwidthCharacter.width, typicalFullwidthCharacterWidth: typicalFullwidthCharacter.width, @@ -306,6 +309,7 @@ export class Configuration extends CommonEditorConfiguration { domNode.setFontWeight(fontInfo.fontWeight); domNode.setFontSize(fontInfo.fontSize); domNode.setLineHeight(fontInfo.lineHeight); + domNode.setLetterSpacing(fontInfo.letterSpacing); } constructor(options: any, referenceDomElement: HTMLElement = null) { diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 607a21568943b..a67bfd72b4ec0 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -631,6 +631,11 @@ const editorConfiguration: IConfigurationNode = { 'default': DefaultConfig.editor.lineHeight, 'description': nls.localize('lineHeight', "Controls the line height. Use 0 to compute the lineHeight from the fontSize.") }, + 'editor.letterSpacing': { + 'type': 'number', + 'default': DefaultConfig.editor.letterSpacing, + 'description': nls.localize('letterSpacing', "Controls the letter spacing in pixels.") + }, 'editor.lineNumbers': { 'type': 'string', 'enum': ['off', 'on', 'relative'], diff --git a/src/vs/editor/common/config/fontInfo.ts b/src/vs/editor/common/config/fontInfo.ts index 1c291d02cf6c3..e5cb9bc331a60 100644 --- a/src/vs/editor/common/config/fontInfo.ts +++ b/src/vs/editor/common/config/fontInfo.ts @@ -50,6 +50,7 @@ export class BareFontInfo { fontWeight?: string; fontSize?: number | string; lineHeight?: number | string; + letterSpacing?: number | string; }, zoomLevel: number): BareFontInfo { let fontFamily = String(opts.fontFamily) || DefaultConfig.editor.fontFamily; @@ -67,6 +68,9 @@ export class BareFontInfo { lineHeight = Math.round(GOLDEN_LINE_HEIGHT_RATIO * fontSize); } + let letterSpacing = safeParseFloat(opts.letterSpacing, 0);; + letterSpacing = clamp(letterSpacing, -20, 20); + let editorZoomLevelMultiplier = 1 + (EditorZoom.getZoomLevel() * 0.1); fontSize *= editorZoomLevelMultiplier; lineHeight *= editorZoomLevelMultiplier; @@ -76,7 +80,8 @@ export class BareFontInfo { fontFamily: fontFamily, fontWeight: fontWeight, fontSize: fontSize, - lineHeight: lineHeight + lineHeight: lineHeight, + letterSpacing: letterSpacing }); } @@ -85,6 +90,7 @@ export class BareFontInfo { readonly fontWeight: string; readonly fontSize: number; readonly lineHeight: number; + readonly letterSpacing: number; /** * @internal @@ -95,19 +101,21 @@ export class BareFontInfo { fontWeight: string; fontSize: number; lineHeight: number; + letterSpacing: number; }) { this.zoomLevel = opts.zoomLevel; this.fontFamily = String(opts.fontFamily); this.fontWeight = String(opts.fontWeight); this.fontSize = opts.fontSize; this.lineHeight = opts.lineHeight | 0; + this.letterSpacing = opts.letterSpacing; } /** * @internal */ public getId(): string { - return this.zoomLevel + '-' + this.fontFamily + '-' + this.fontWeight + '-' + this.fontSize + '-' + this.lineHeight; + return this.zoomLevel + '-' + this.fontFamily + '-' + this.fontWeight + '-' + this.fontSize + '-' + this.lineHeight + '-' + this.letterSpacing; } } @@ -130,6 +138,7 @@ export class FontInfo extends BareFontInfo { fontWeight: string; fontSize: number; lineHeight: number; + letterSpacing: number; isMonospace: boolean; typicalHalfwidthCharacterWidth: number; typicalFullwidthCharacterWidth: number; @@ -154,6 +163,7 @@ export class FontInfo extends BareFontInfo { && this.fontWeight === other.fontWeight && this.fontSize === other.fontSize && this.lineHeight === other.lineHeight + && this.letterSpacing === other.letterSpacing && this.typicalHalfwidthCharacterWidth === other.typicalHalfwidthCharacterWidth && this.typicalFullwidthCharacterWidth === other.typicalFullwidthCharacterWidth && this.spaceWidth === other.spaceWidth diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index 3390af3d04a54..88090d979d1da 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -563,6 +563,10 @@ export interface IEditorOptions { * The line height */ lineHeight?: number; + /** + * The letter spacing + */ + letterSpacing?: number; } /** diff --git a/src/vs/editor/test/common/mocks/testConfiguration.ts b/src/vs/editor/test/common/mocks/testConfiguration.ts index 1cd3ce6d717be..b0af5f5be4a71 100644 --- a/src/vs/editor/test/common/mocks/testConfiguration.ts +++ b/src/vs/editor/test/common/mocks/testConfiguration.ts @@ -41,6 +41,7 @@ export class TestConfiguration extends CommonEditorConfiguration { fontWeight: 'normal', fontSize: 14, lineHeight: 19, + letterSpacing: 1.5, isMonospace: true, typicalHalfwidthCharacterWidth: 10, typicalFullwidthCharacterWidth: 20, diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index ea616a457286c..ac7caa846b191 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -1472,6 +1472,10 @@ declare module monaco.editor { * The line height */ lineHeight?: number; + /** + * The letter spacing + */ + letterSpacing?: number; } /** @@ -3967,6 +3971,7 @@ declare module monaco.editor { readonly fontWeight: string; readonly fontSize: number; readonly lineHeight: number; + readonly letterSpacing: number; } } From 7083eb3b8e33a31bf88b18b44547ba09493d3e8c Mon Sep 17 00:00:00 2001 From: Cody Hoover Date: Wed, 22 Mar 2017 09:52:04 +0100 Subject: [PATCH 0008/2747] Added letter spacing to the telemetry whitelist --- src/vs/platform/telemetry/common/telemetryUtils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/platform/telemetry/common/telemetryUtils.ts b/src/vs/platform/telemetry/common/telemetryUtils.ts index 5e6c239a41a77..83ac4355b9f35 100644 --- a/src/vs/platform/telemetry/common/telemetryUtils.ts +++ b/src/vs/platform/telemetry/common/telemetryUtils.ts @@ -224,6 +224,7 @@ const configurationValueWhitelist = [ 'editor.fontWeight', 'editor.scrollBeyondLastLine', 'editor.lineNumbers', + 'editor.letterSpacing', 'editor.wrappingIndent', 'editor.renderControlCharacters', 'editor.autoClosingBrackets', From 137f9307953690f3281c1dd5568604c01ed3b324 Mon Sep 17 00:00:00 2001 From: Cristian Date: Sat, 25 Mar 2017 17:37:41 +0200 Subject: [PATCH 0009/2747] #22622 - preliminary version --- src/vs/workbench/parts/debug/browser/media/debugHover.css | 5 ++++- src/vs/workbench/parts/debug/electron-browser/debugHover.ts | 4 ++-- src/vs/workbench/parts/debug/electron-browser/debugViewer.ts | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/media/debugHover.css b/src/vs/workbench/parts/debug/browser/media/debugHover.css index 29707f09e1101..ddf0a9a12465a 100644 --- a/src/vs/workbench/parts/debug/browser/media/debugHover.css +++ b/src/vs/workbench/parts/debug/browser/media/debugHover.css @@ -29,7 +29,7 @@ word-break: normal; text-overflow: ellipsis; height: 18px; - overflow: hidden; + overflow: auto; border-bottom: 1px solid rgba(128, 128, 128, 0.35); } @@ -67,6 +67,9 @@ .monaco-editor .debug-hover-widget .value { white-space: pre-wrap; color: rgba(108, 108, 108, 0.8); + overflow: auto; + max-height: 500px; + z-index: 60; } .monaco-editor .debug-hover-widget .error { diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index e88e4e549f59c..2076624feee40 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -236,7 +236,7 @@ export class DebugHoverWidget implements IContentWidget { this.valueContainer.hidden = false; renderExpressionValue(expression, this.valueContainer, { showChanged: false, - maxValueLength: MAX_VALUE_RENDER_LENGTH_IN_HOVER, + maxValueLength: null, preserveWhitespace: true }); this.valueContainer.title = ''; @@ -274,7 +274,7 @@ export class DebugHoverWidget implements IContentWidget { if (visibleElementsCount === 0) { this.doShow(this.showAtPosition, this.tree.getInput(), false, true); } else { - const height = Math.min(visibleElementsCount, MAX_ELEMENTS_SHOWN) * 18; + const height = visibleElementsCount * 18; //Math.min(visibleElementsCount, MAX_ELEMENTS_SHOWN) * 18; if (this.treeContainer.clientHeight !== height) { this.treeContainer.style.height = `${height}px`; diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index f3847176b723b..cba5ab1d7c39b 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -76,7 +76,7 @@ export function renderExpressionValue(expressionOrValue: debug.IExpression | str container.className = 'value changed'; } - if (options.maxValueLength && value.length > options.maxValueLength) { + if (options.maxValueLength && options.maxValueLength > 0 && value.length > options.maxValueLength) { value = value.substr(0, options.maxValueLength) + '...'; } if (value && !options.preserveWhitespace) { From b30e1b71332b1bab2aba41b7fe71c45bc1c97a56 Mon Sep 17 00:00:00 2001 From: Cristian Date: Sat, 25 Mar 2017 17:38:17 +0200 Subject: [PATCH 0010/2747] #22622 - comment out MAX_VALUE_RENDER_LENGTH_IN_HOVER --- src/vs/workbench/parts/debug/electron-browser/debugHover.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index 2076624feee40..1ce0e87f3b758 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -24,7 +24,7 @@ import { IListService } from 'vs/platform/list/browser/listService'; const $ = dom.$; const MAX_ELEMENTS_SHOWN = 18; -const MAX_VALUE_RENDER_LENGTH_IN_HOVER = 4096; +//const MAX_VALUE_RENDER_LENGTH_IN_HOVER = 4096; export class DebugHoverWidget implements IContentWidget { @@ -274,7 +274,7 @@ export class DebugHoverWidget implements IContentWidget { if (visibleElementsCount === 0) { this.doShow(this.showAtPosition, this.tree.getInput(), false, true); } else { - const height = visibleElementsCount * 18; //Math.min(visibleElementsCount, MAX_ELEMENTS_SHOWN) * 18; + const height = Math.min(visibleElementsCount, MAX_ELEMENTS_SHOWN) * 18; if (this.treeContainer.clientHeight !== height) { this.treeContainer.style.height = `${height}px`; From 517dcacfd5dfe2291c23357e34bd185bfc021272 Mon Sep 17 00:00:00 2001 From: Cristian Date: Sat, 25 Mar 2017 17:44:22 +0200 Subject: [PATCH 0011/2747] #22622 removed comments --- src/vs/workbench/parts/debug/electron-browser/debugHover.ts | 1 - src/vs/workbench/parts/debug/electron-browser/debugViewer.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index 1ce0e87f3b758..68d1a179e8d2a 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -236,7 +236,6 @@ export class DebugHoverWidget implements IContentWidget { this.valueContainer.hidden = false; renderExpressionValue(expression, this.valueContainer, { showChanged: false, - maxValueLength: null, preserveWhitespace: true }); this.valueContainer.title = ''; diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index cba5ab1d7c39b..f3847176b723b 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -76,7 +76,7 @@ export function renderExpressionValue(expressionOrValue: debug.IExpression | str container.className = 'value changed'; } - if (options.maxValueLength && options.maxValueLength > 0 && value.length > options.maxValueLength) { + if (options.maxValueLength && value.length > options.maxValueLength) { value = value.substr(0, options.maxValueLength) + '...'; } if (value && !options.preserveWhitespace) { From 4cd68b0acd2f88a42a48737da36213b52df4a96d Mon Sep 17 00:00:00 2001 From: Cristian Date: Sat, 25 Mar 2017 17:48:08 +0200 Subject: [PATCH 0012/2747] #22622 - removed comment --- src/vs/workbench/parts/debug/electron-browser/debugHover.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index 68d1a179e8d2a..33e4a4e21e050 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -24,7 +24,6 @@ import { IListService } from 'vs/platform/list/browser/listService'; const $ = dom.$; const MAX_ELEMENTS_SHOWN = 18; -//const MAX_VALUE_RENDER_LENGTH_IN_HOVER = 4096; export class DebugHoverWidget implements IContentWidget { From b32837c934364ff0a82f974535734cd759d892a4 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 3 Apr 2017 15:53:21 +0200 Subject: [PATCH 0013/2747] Added multiple link detection for debug console and exception widget. --- .../parts/debug/browser/exceptionWidget.ts | 9 +- .../parts/debug/browser/linkDetector.ts | 104 ++++++++++++++++++ .../debug/browser/media/exceptionWidget.css | 5 + .../debug/electron-browser/replViewer.ts | 86 ++------------- 4 files changed, 124 insertions(+), 80 deletions(-) create mode 100644 src/vs/workbench/parts/debug/browser/linkDetector.ts diff --git a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts index 61989aa9ae2b5..1206e86259b5a 100644 --- a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts +++ b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts @@ -14,6 +14,8 @@ import { RunOnceScheduler } from 'vs/base/common/async'; import { IThemeService, ITheme } from "vs/platform/theme/common/themeService"; import { Color } from "vs/base/common/color"; import { registerColor } from "vs/platform/theme/common/colorRegistry"; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { LinkDetector } from 'vs/workbench/parts/debug/browser/linkDetector'; const $ = dom.$; // theming @@ -28,7 +30,8 @@ export class ExceptionWidget extends ZoneWidget { constructor(editor: ICodeEditor, private exceptionInfo: IExceptionInfo, private lineNumber: number, @IContextViewService private contextViewService: IContextViewService, @IDebugService private debugService: IDebugService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @IInstantiationService private instantiationService: IInstantiationService ) { super(editor, { showFrame: true, showArrow: true, frameWidth: 1 }); @@ -95,7 +98,9 @@ export class ExceptionWidget extends ZoneWidget { if (this.exceptionInfo.details && this.exceptionInfo.details.stackTrace) { let stackTrace = $('.stack-trace'); - stackTrace.textContent = this.exceptionInfo.details.stackTrace; + const linkDetector = this.instantiationService.createInstance(LinkDetector); + const linkedStackTrace = linkDetector.handleLinks(this.exceptionInfo.details.stackTrace); + typeof linkedStackTrace === 'string' ? stackTrace.textContent = linkedStackTrace : stackTrace.appendChild(linkedStackTrace); dom.append(container, stackTrace); } } diff --git a/src/vs/workbench/parts/debug/browser/linkDetector.ts b/src/vs/workbench/parts/debug/browser/linkDetector.ts new file mode 100644 index 0000000000000..317c53c929d4e --- /dev/null +++ b/src/vs/workbench/parts/debug/browser/linkDetector.ts @@ -0,0 +1,104 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import uri from 'vs/base/common/uri'; +import { isMacintosh } from 'vs/base/common/platform'; +import * as errors from 'vs/base/common/errors'; +import { IMouseEvent, StandardMouseEvent } from 'vs/base/browser/mouseEvent'; +import * as nls from 'vs/nls'; +import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; + +export class LinkDetector { + private static FILE_LOCATION_PATTERNS: RegExp[] = [ + // group 0: the full thing :) + // group 1: absolute path + // group 2: drive letter on windows with trailing backslash or leading slash on mac/linux + // group 3: line number + // group 4: column number + // eg: at Context. (c:\Users\someone\Desktop\mocha-runner\test\test.js:26:11) + /((\/|[a-zA-Z]:\\)[^\(\)<>\'\"\[\]]+):(\d+):(\d+)/g + ]; + + constructor( + @IWorkbenchEditorService private editorService: IWorkbenchEditorService + ) { + // noop + } + + public handleLinks(text: string): HTMLElement | string { + let linkContainer: HTMLElement; + + for (let pattern of LinkDetector.FILE_LOCATION_PATTERNS) { + pattern.lastIndex = 0; // the holy grail of software development + let lastMatchIndex = 0; + + let match = pattern.exec(text); + while (match !== null) { + let resource: uri = null; + try { + resource = match && uri.file(match[1]); + } catch (e) { } + + if (resource) { + if (!linkContainer) { + linkContainer = document.createElement('span'); + } + + let textBeforeLink = text.substring(lastMatchIndex, match.index); + if (textBeforeLink) { + let span = document.createElement('span'); + span.textContent = textBeforeLink; + linkContainer.appendChild(span); + } + + const link = document.createElement('a'); + link.textContent = text.substr(match.index, match[0].length); + link.title = isMacintosh ? nls.localize('fileLinkMac', "Click to follow (Cmd + click opens to the side)") : nls.localize('fileLink', "Click to follow (Ctrl + click opens to the side)"); + linkContainer.appendChild(link); + + const line = Number(match[3]); + const column = Number(match[4]); + link.onclick = (e) => this.onLinkClick(new StandardMouseEvent(e), resource, line, column); + + lastMatchIndex = pattern.lastIndex; + const previousMatch = match; + match = pattern.exec(text); + + // Append remaining text if no more links detected + if (!match) { + let textAfterLink = text.substr(previousMatch.index + previousMatch[0].length); + if (textAfterLink) { + let span = document.createElement('span'); + span.textContent = textAfterLink; + linkContainer.appendChild(span); + } + } + } + } + } + + return linkContainer || text; + } + + private onLinkClick(event: IMouseEvent, resource: uri, line: number, column: number): void { + const selection = window.getSelection(); + if (selection.type === 'Range') { + return; // do not navigate when user is selecting + } + + event.preventDefault(); + + this.editorService.openEditor({ + resource, + options: { + selection: { + startLineNumber: line, + startColumn: column + } + } + }, event.ctrlKey || event.metaKey).done(null, errors.onUnexpectedError); + } + +} diff --git a/src/vs/workbench/parts/debug/browser/media/exceptionWidget.css b/src/vs/workbench/parts/debug/browser/media/exceptionWidget.css index 5ec6d6305e6f4..07cafebe8643c 100644 --- a/src/vs/workbench/parts/debug/browser/media/exceptionWidget.css +++ b/src/vs/workbench/parts/debug/browser/media/exceptionWidget.css @@ -27,6 +27,11 @@ margin-top: 0.5em; } +.monaco-editor .zone-widget .zone-widget-container.exception-widget a { + text-decoration: underline; + cursor: pointer; +} + /* High Contrast Theming */ .monaco-workbench.mac .zone-widget .zone-widget-container.exception-widget { diff --git a/src/vs/workbench/parts/debug/electron-browser/replViewer.ts b/src/vs/workbench/parts/debug/electron-browser/replViewer.ts index 8e5673fede351..5f14f5b8cd1ea 100644 --- a/src/vs/workbench/parts/debug/electron-browser/replViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/replViewer.ts @@ -7,13 +7,10 @@ import * as nls from 'vs/nls'; import { TPromise } from 'vs/base/common/winjs.base'; import { IAction } from 'vs/base/common/actions'; import { isFullWidthCharacter, removeAnsiEscapeCodes, endsWith } from 'vs/base/common/strings'; -import uri from 'vs/base/common/uri'; -import { isMacintosh } from 'vs/base/common/platform'; import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import * as dom from 'vs/base/browser/dom'; -import * as errors from 'vs/base/common/errors'; import severity from 'vs/base/common/severity'; -import { IMouseEvent, StandardMouseEvent } from 'vs/base/browser/mouseEvent'; +import { IMouseEvent } from 'vs/base/browser/mouseEvent'; import { ITree, IAccessibilityProvider, IDataSource, IRenderer } from 'vs/base/parts/tree/browser/tree'; import { IActionProvider } from 'vs/base/parts/tree/browser/actionsRenderer'; import { ICancelableEvent } from 'vs/base/parts/tree/browser/treeDefaults'; @@ -24,6 +21,7 @@ import { ClearReplAction } from 'vs/workbench/parts/debug/browser/debugActions'; import { CopyAction } from 'vs/workbench/parts/debug/electron-browser/electronDebugActions'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { LinkDetector } from 'vs/workbench/parts/debug/browser/linkDetector'; const $ = dom.$; @@ -84,23 +82,14 @@ export class ReplExpressionsRenderer implements IRenderer { private static VALUE_OUTPUT_TEMPLATE_ID = 'outputValue'; private static NAME_VALUE_OUTPUT_TEMPLATE_ID = 'outputNameValue'; - private static FILE_LOCATION_PATTERNS: RegExp[] = [ - // group 0: the full thing :) - // group 1: absolute path - // group 2: drive letter on windows with trailing backslash or leading slash on mac/linux - // group 3: line number - // group 4: column number - // eg: at Context. (c:\Users\someone\Desktop\mocha-runner\test\test.js:26:11) - /((\/|[a-zA-Z]:\\)[^\(\)<>\'\"\[\]]+):(\d+):(\d+)/ - ]; - private static LINE_HEIGHT_PX = 18; private width: number; private characterWidth: number; constructor( - @IWorkbenchEditorService private editorService: IWorkbenchEditorService + @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @IInstantiationService private instantiationService: IInstantiationService ) { // noop } @@ -331,7 +320,8 @@ export class ReplExpressionsRenderer implements IRenderer { // flush text buffer if we have any if (buffer) { - this.insert(this.handleLinks(buffer), currentToken || tokensContainer); + const linkDetector = this.instantiationService.createInstance(LinkDetector); + this.insert(linkDetector.handleLinks(buffer), currentToken || tokensContainer); buffer = ''; } @@ -351,7 +341,8 @@ export class ReplExpressionsRenderer implements IRenderer { // flush remaining text buffer if we have any if (buffer) { - let res = this.handleLinks(buffer); + const linkDetector = this.instantiationService.createInstance(LinkDetector); + let res = linkDetector.handleLinks(buffer); if (typeof res !== 'string' || currentToken) { if (!tokensContainer) { tokensContainer = document.createElement('span'); @@ -372,67 +363,6 @@ export class ReplExpressionsRenderer implements IRenderer { } } - private handleLinks(text: string): HTMLElement | string { - let linkContainer: HTMLElement; - - for (let pattern of ReplExpressionsRenderer.FILE_LOCATION_PATTERNS) { - pattern.lastIndex = 0; // the holy grail of software development - - const match = pattern.exec(text); - let resource: uri = null; - try { - resource = match && uri.file(match[1]); - } catch (e) { } - - if (resource) { - linkContainer = document.createElement('span'); - - let textBeforeLink = text.substr(0, match.index); - if (textBeforeLink) { - let span = document.createElement('span'); - span.textContent = textBeforeLink; - linkContainer.appendChild(span); - } - - const link = document.createElement('a'); - link.textContent = text.substr(match.index, match[0].length); - link.title = isMacintosh ? nls.localize('fileLinkMac', "Click to follow (Cmd + click opens to the side)") : nls.localize('fileLink', "Click to follow (Ctrl + click opens to the side)"); - linkContainer.appendChild(link); - link.onclick = (e) => this.onLinkClick(new StandardMouseEvent(e), resource, Number(match[3]), Number(match[4])); - - let textAfterLink = text.substr(match.index + match[0].length); - if (textAfterLink) { - let span = document.createElement('span'); - span.textContent = textAfterLink; - linkContainer.appendChild(span); - } - - break; // support one link per line for now - } - } - - return linkContainer || text; - } - - private onLinkClick(event: IMouseEvent, resource: uri, line: number, column: number): void { - const selection = window.getSelection(); - if (selection.type === 'Range') { - return; // do not navigate when user is selecting - } - - event.preventDefault(); - - this.editorService.openEditor({ - resource, - options: { - selection: { - startLineNumber: line, - startColumn: column - } - } - }, event.ctrlKey || event.metaKey).done(null, errors.onUnexpectedError); - } - public disposeTemplate(tree: ITree, templateId: string, templateData: any): void { // noop } From 353eec925c4886dbe46f8307bcd174cc24d2d98a Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Tue, 4 Apr 2017 15:17:54 +0200 Subject: [PATCH 0014/2747] Updated regex to handle relative paths and paths without column number. --- .../workbench/parts/debug/browser/linkDetector.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/linkDetector.ts b/src/vs/workbench/parts/debug/browser/linkDetector.ts index 317c53c929d4e..616e9c00e3eba 100644 --- a/src/vs/workbench/parts/debug/browser/linkDetector.ts +++ b/src/vs/workbench/parts/debug/browser/linkDetector.ts @@ -9,6 +9,7 @@ import * as errors from 'vs/base/common/errors'; import { IMouseEvent, StandardMouseEvent } from 'vs/base/browser/mouseEvent'; import * as nls from 'vs/nls'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; export class LinkDetector { private static FILE_LOCATION_PATTERNS: RegExp[] = [ @@ -18,11 +19,15 @@ export class LinkDetector { // group 3: line number // group 4: column number // eg: at Context. (c:\Users\someone\Desktop\mocha-runner\test\test.js:26:11) - /((\/|[a-zA-Z]:\\)[^\(\)<>\'\"\[\]]+):(\d+):(\d+)/g + ///((\/|[a-zA-Z]:\\)[^\(\)<>\'\"\[\]]+):(\d+):(\d+)/g original + ///(?:at |^|[\(<\'\"\[])(?:file:\/\/)?((?:(\/|[a-zA-Z]:)|[^\(\)<>\'\"\[\]:\s]+)(?:[\\/][^\(\)<>\'\"\[\]:]*)?):(\d+)(?::(\d+))?(?:$|[\)>\'\"\]])/g second original + + /(?![\(])(?:file:\/\/)?((?:([a-zA-Z]:)|[^\(\)<>\'\"\[\]:\s]+)(?:[\\/][^\(\)<>\'\"\[\]:]*)?):(\d+)(?::(\d+))?/g ]; constructor( - @IWorkbenchEditorService private editorService: IWorkbenchEditorService + @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @IWorkspaceContextService private contextService: IWorkspaceContextService ) { // noop } @@ -38,7 +43,7 @@ export class LinkDetector { while (match !== null) { let resource: uri = null; try { - resource = match && uri.file(match[1]); + resource = match && (match[2] ? uri.file(match[1]) : this.contextService.toResource(match[1])); } catch (e) { } if (resource) { @@ -59,7 +64,7 @@ export class LinkDetector { linkContainer.appendChild(link); const line = Number(match[3]); - const column = Number(match[4]); + const column = match[4] ? Number(match[4]) : null; link.onclick = (e) => this.onLinkClick(new StandardMouseEvent(e), resource, line, column); lastMatchIndex = pattern.lastIndex; @@ -82,7 +87,7 @@ export class LinkDetector { return linkContainer || text; } - private onLinkClick(event: IMouseEvent, resource: uri, line: number, column: number): void { + private onLinkClick(event: IMouseEvent, resource: uri, line: number, column: number = 0): void { const selection = window.getSelection(); if (selection.type === 'Range') { return; // do not navigate when user is selecting From dd96b883d92d69a0caf1799ecf2e34fee42bd2ba Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Fri, 7 Apr 2017 16:59:41 +0200 Subject: [PATCH 0015/2747] Added file link validation. --- .../parts/debug/browser/linkDetector.ts | 54 +++++++++++++------ 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/linkDetector.ts b/src/vs/workbench/parts/debug/browser/linkDetector.ts index 616e9c00e3eba..f22ab75757cce 100644 --- a/src/vs/workbench/parts/debug/browser/linkDetector.ts +++ b/src/vs/workbench/parts/debug/browser/linkDetector.ts @@ -10,6 +10,7 @@ import { IMouseEvent, StandardMouseEvent } from 'vs/base/browser/mouseEvent'; import * as nls from 'vs/nls'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import fs = require('fs'); export class LinkDetector { private static FILE_LOCATION_PATTERNS: RegExp[] = [ @@ -51,29 +52,35 @@ export class LinkDetector { linkContainer = document.createElement('span'); } - let textBeforeLink = text.substring(lastMatchIndex, match.index); - if (textBeforeLink) { - let span = document.createElement('span'); - span.textContent = textBeforeLink; - linkContainer.appendChild(span); - } - - const link = document.createElement('a'); - link.textContent = text.substr(match.index, match[0].length); - link.title = isMacintosh ? nls.localize('fileLinkMac', "Click to follow (Cmd + click opens to the side)") : nls.localize('fileLink', "Click to follow (Ctrl + click opens to the side)"); - linkContainer.appendChild(link); + const valid = this.fileExists(resource.fsPath); + if (valid) { + let textBeforeLink = text.substring(lastMatchIndex, match.index); + if (textBeforeLink) { + let span = document.createElement('span'); + span.textContent = textBeforeLink; + linkContainer.appendChild(span); + } - const line = Number(match[3]); - const column = match[4] ? Number(match[4]) : null; - link.onclick = (e) => this.onLinkClick(new StandardMouseEvent(e), resource, line, column); + const link = document.createElement('a'); + link.textContent = text.substr(match.index, match[0].length); + link.title = isMacintosh ? nls.localize('fileLinkMac', "Click to follow (Cmd + click opens to the side)") : nls.localize('fileLink', "Click to follow (Ctrl + click opens to the side)"); + linkContainer.appendChild(link); + const line = Number(match[3]); + const column = match[4] ? Number(match[4]) : undefined; + link.onclick = (e) => this.onLinkClick(new StandardMouseEvent(e), resource, line, column); + } else { + let plainText = document.createElement('span'); + plainText.textContent = text.substring(lastMatchIndex, match.index + match[0].length); + linkContainer.appendChild(plainText); + } lastMatchIndex = pattern.lastIndex; - const previousMatch = match; + const currentMatch = match; match = pattern.exec(text); - // Append remaining text if no more links detected + // Append last string part if no more link matches if (!match) { - let textAfterLink = text.substr(previousMatch.index + previousMatch[0].length); + let textAfterLink = text.substr(currentMatch.index + currentMatch[0].length); if (textAfterLink) { let span = document.createElement('span'); span.textContent = textAfterLink; @@ -106,4 +113,17 @@ export class LinkDetector { }, event.ctrlKey || event.metaKey).done(null, errors.onUnexpectedError); } + private fileExists(path: string): boolean { + let stat; + try { + stat = fs.statSync(path); + } catch (e) { + return false; + } + + if (stat.isFile()) { + return true; + } + return false; + } } From c09c79f0606c2e71158e701e4fe5c61685c6528c Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 3 Apr 2017 15:53:21 +0200 Subject: [PATCH 0016/2747] Added multiple link detection for debug console and exception widget. --- .../parts/debug/browser/exceptionWidget.ts | 9 +- .../parts/debug/browser/linkDetector.ts | 104 ++++++++++++++++++ .../debug/browser/media/exceptionWidget.css | 5 + .../debug/electron-browser/replViewer.ts | 86 ++------------- 4 files changed, 124 insertions(+), 80 deletions(-) create mode 100644 src/vs/workbench/parts/debug/browser/linkDetector.ts diff --git a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts index 61989aa9ae2b5..1206e86259b5a 100644 --- a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts +++ b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts @@ -14,6 +14,8 @@ import { RunOnceScheduler } from 'vs/base/common/async'; import { IThemeService, ITheme } from "vs/platform/theme/common/themeService"; import { Color } from "vs/base/common/color"; import { registerColor } from "vs/platform/theme/common/colorRegistry"; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { LinkDetector } from 'vs/workbench/parts/debug/browser/linkDetector'; const $ = dom.$; // theming @@ -28,7 +30,8 @@ export class ExceptionWidget extends ZoneWidget { constructor(editor: ICodeEditor, private exceptionInfo: IExceptionInfo, private lineNumber: number, @IContextViewService private contextViewService: IContextViewService, @IDebugService private debugService: IDebugService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @IInstantiationService private instantiationService: IInstantiationService ) { super(editor, { showFrame: true, showArrow: true, frameWidth: 1 }); @@ -95,7 +98,9 @@ export class ExceptionWidget extends ZoneWidget { if (this.exceptionInfo.details && this.exceptionInfo.details.stackTrace) { let stackTrace = $('.stack-trace'); - stackTrace.textContent = this.exceptionInfo.details.stackTrace; + const linkDetector = this.instantiationService.createInstance(LinkDetector); + const linkedStackTrace = linkDetector.handleLinks(this.exceptionInfo.details.stackTrace); + typeof linkedStackTrace === 'string' ? stackTrace.textContent = linkedStackTrace : stackTrace.appendChild(linkedStackTrace); dom.append(container, stackTrace); } } diff --git a/src/vs/workbench/parts/debug/browser/linkDetector.ts b/src/vs/workbench/parts/debug/browser/linkDetector.ts new file mode 100644 index 0000000000000..317c53c929d4e --- /dev/null +++ b/src/vs/workbench/parts/debug/browser/linkDetector.ts @@ -0,0 +1,104 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import uri from 'vs/base/common/uri'; +import { isMacintosh } from 'vs/base/common/platform'; +import * as errors from 'vs/base/common/errors'; +import { IMouseEvent, StandardMouseEvent } from 'vs/base/browser/mouseEvent'; +import * as nls from 'vs/nls'; +import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; + +export class LinkDetector { + private static FILE_LOCATION_PATTERNS: RegExp[] = [ + // group 0: the full thing :) + // group 1: absolute path + // group 2: drive letter on windows with trailing backslash or leading slash on mac/linux + // group 3: line number + // group 4: column number + // eg: at Context. (c:\Users\someone\Desktop\mocha-runner\test\test.js:26:11) + /((\/|[a-zA-Z]:\\)[^\(\)<>\'\"\[\]]+):(\d+):(\d+)/g + ]; + + constructor( + @IWorkbenchEditorService private editorService: IWorkbenchEditorService + ) { + // noop + } + + public handleLinks(text: string): HTMLElement | string { + let linkContainer: HTMLElement; + + for (let pattern of LinkDetector.FILE_LOCATION_PATTERNS) { + pattern.lastIndex = 0; // the holy grail of software development + let lastMatchIndex = 0; + + let match = pattern.exec(text); + while (match !== null) { + let resource: uri = null; + try { + resource = match && uri.file(match[1]); + } catch (e) { } + + if (resource) { + if (!linkContainer) { + linkContainer = document.createElement('span'); + } + + let textBeforeLink = text.substring(lastMatchIndex, match.index); + if (textBeforeLink) { + let span = document.createElement('span'); + span.textContent = textBeforeLink; + linkContainer.appendChild(span); + } + + const link = document.createElement('a'); + link.textContent = text.substr(match.index, match[0].length); + link.title = isMacintosh ? nls.localize('fileLinkMac', "Click to follow (Cmd + click opens to the side)") : nls.localize('fileLink', "Click to follow (Ctrl + click opens to the side)"); + linkContainer.appendChild(link); + + const line = Number(match[3]); + const column = Number(match[4]); + link.onclick = (e) => this.onLinkClick(new StandardMouseEvent(e), resource, line, column); + + lastMatchIndex = pattern.lastIndex; + const previousMatch = match; + match = pattern.exec(text); + + // Append remaining text if no more links detected + if (!match) { + let textAfterLink = text.substr(previousMatch.index + previousMatch[0].length); + if (textAfterLink) { + let span = document.createElement('span'); + span.textContent = textAfterLink; + linkContainer.appendChild(span); + } + } + } + } + } + + return linkContainer || text; + } + + private onLinkClick(event: IMouseEvent, resource: uri, line: number, column: number): void { + const selection = window.getSelection(); + if (selection.type === 'Range') { + return; // do not navigate when user is selecting + } + + event.preventDefault(); + + this.editorService.openEditor({ + resource, + options: { + selection: { + startLineNumber: line, + startColumn: column + } + } + }, event.ctrlKey || event.metaKey).done(null, errors.onUnexpectedError); + } + +} diff --git a/src/vs/workbench/parts/debug/browser/media/exceptionWidget.css b/src/vs/workbench/parts/debug/browser/media/exceptionWidget.css index 5ec6d6305e6f4..07cafebe8643c 100644 --- a/src/vs/workbench/parts/debug/browser/media/exceptionWidget.css +++ b/src/vs/workbench/parts/debug/browser/media/exceptionWidget.css @@ -27,6 +27,11 @@ margin-top: 0.5em; } +.monaco-editor .zone-widget .zone-widget-container.exception-widget a { + text-decoration: underline; + cursor: pointer; +} + /* High Contrast Theming */ .monaco-workbench.mac .zone-widget .zone-widget-container.exception-widget { diff --git a/src/vs/workbench/parts/debug/electron-browser/replViewer.ts b/src/vs/workbench/parts/debug/electron-browser/replViewer.ts index 361bd48ec9942..f9fa4c9fbdd30 100644 --- a/src/vs/workbench/parts/debug/electron-browser/replViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/replViewer.ts @@ -7,13 +7,10 @@ import * as nls from 'vs/nls'; import { TPromise } from 'vs/base/common/winjs.base'; import { IAction } from 'vs/base/common/actions'; import { isFullWidthCharacter, removeAnsiEscapeCodes, endsWith } from 'vs/base/common/strings'; -import uri from 'vs/base/common/uri'; -import { isMacintosh } from 'vs/base/common/platform'; import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import * as dom from 'vs/base/browser/dom'; -import * as errors from 'vs/base/common/errors'; import severity from 'vs/base/common/severity'; -import { IMouseEvent, StandardMouseEvent } from 'vs/base/browser/mouseEvent'; +import { IMouseEvent } from 'vs/base/browser/mouseEvent'; import { ITree, IAccessibilityProvider, IDataSource, IRenderer, IActionProvider } from 'vs/base/parts/tree/browser/tree'; import { ICancelableEvent } from 'vs/base/parts/tree/browser/treeDefaults'; import { IExpressionContainer, IExpression } from 'vs/workbench/parts/debug/common/debug'; @@ -23,6 +20,7 @@ import { ClearReplAction } from 'vs/workbench/parts/debug/browser/debugActions'; import { CopyAction } from 'vs/workbench/parts/debug/electron-browser/electronDebugActions'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { LinkDetector } from 'vs/workbench/parts/debug/browser/linkDetector'; const $ = dom.$; @@ -83,23 +81,14 @@ export class ReplExpressionsRenderer implements IRenderer { private static VALUE_OUTPUT_TEMPLATE_ID = 'outputValue'; private static NAME_VALUE_OUTPUT_TEMPLATE_ID = 'outputNameValue'; - private static FILE_LOCATION_PATTERNS: RegExp[] = [ - // group 0: the full thing :) - // group 1: absolute path - // group 2: drive letter on windows with trailing backslash or leading slash on mac/linux - // group 3: line number - // group 4: column number - // eg: at Context. (c:\Users\someone\Desktop\mocha-runner\test\test.js:26:11) - /((\/|[a-zA-Z]:\\)[^\(\)<>\'\"\[\]]+):(\d+):(\d+)/ - ]; - private static LINE_HEIGHT_PX = 18; private width: number; private characterWidth: number; constructor( - @IWorkbenchEditorService private editorService: IWorkbenchEditorService + @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @IInstantiationService private instantiationService: IInstantiationService ) { // noop } @@ -330,7 +319,8 @@ export class ReplExpressionsRenderer implements IRenderer { // flush text buffer if we have any if (buffer) { - this.insert(this.handleLinks(buffer), currentToken || tokensContainer); + const linkDetector = this.instantiationService.createInstance(LinkDetector); + this.insert(linkDetector.handleLinks(buffer), currentToken || tokensContainer); buffer = ''; } @@ -350,7 +340,8 @@ export class ReplExpressionsRenderer implements IRenderer { // flush remaining text buffer if we have any if (buffer) { - let res = this.handleLinks(buffer); + const linkDetector = this.instantiationService.createInstance(LinkDetector); + let res = linkDetector.handleLinks(buffer); if (typeof res !== 'string' || currentToken) { if (!tokensContainer) { tokensContainer = document.createElement('span'); @@ -371,67 +362,6 @@ export class ReplExpressionsRenderer implements IRenderer { } } - private handleLinks(text: string): HTMLElement | string { - let linkContainer: HTMLElement; - - for (let pattern of ReplExpressionsRenderer.FILE_LOCATION_PATTERNS) { - pattern.lastIndex = 0; // the holy grail of software development - - const match = pattern.exec(text); - let resource: uri = null; - try { - resource = match && uri.file(match[1]); - } catch (e) { } - - if (resource) { - linkContainer = document.createElement('span'); - - let textBeforeLink = text.substr(0, match.index); - if (textBeforeLink) { - let span = document.createElement('span'); - span.textContent = textBeforeLink; - linkContainer.appendChild(span); - } - - const link = document.createElement('a'); - link.textContent = text.substr(match.index, match[0].length); - link.title = isMacintosh ? nls.localize('fileLinkMac', "Click to follow (Cmd + click opens to the side)") : nls.localize('fileLink', "Click to follow (Ctrl + click opens to the side)"); - linkContainer.appendChild(link); - link.onclick = (e) => this.onLinkClick(new StandardMouseEvent(e), resource, Number(match[3]), Number(match[4])); - - let textAfterLink = text.substr(match.index + match[0].length); - if (textAfterLink) { - let span = document.createElement('span'); - span.textContent = textAfterLink; - linkContainer.appendChild(span); - } - - break; // support one link per line for now - } - } - - return linkContainer || text; - } - - private onLinkClick(event: IMouseEvent, resource: uri, line: number, column: number): void { - const selection = window.getSelection(); - if (selection.type === 'Range') { - return; // do not navigate when user is selecting - } - - event.preventDefault(); - - this.editorService.openEditor({ - resource, - options: { - selection: { - startLineNumber: line, - startColumn: column - } - } - }, event.ctrlKey || event.metaKey).done(null, errors.onUnexpectedError); - } - public disposeTemplate(tree: ITree, templateId: string, templateData: any): void { // noop } From 0337cfdee614b1f6590e1a01e79adf0a6e6d4c21 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Tue, 4 Apr 2017 15:17:54 +0200 Subject: [PATCH 0017/2747] Updated regex to handle relative paths and paths without column number. --- .../workbench/parts/debug/browser/linkDetector.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/linkDetector.ts b/src/vs/workbench/parts/debug/browser/linkDetector.ts index 317c53c929d4e..616e9c00e3eba 100644 --- a/src/vs/workbench/parts/debug/browser/linkDetector.ts +++ b/src/vs/workbench/parts/debug/browser/linkDetector.ts @@ -9,6 +9,7 @@ import * as errors from 'vs/base/common/errors'; import { IMouseEvent, StandardMouseEvent } from 'vs/base/browser/mouseEvent'; import * as nls from 'vs/nls'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; export class LinkDetector { private static FILE_LOCATION_PATTERNS: RegExp[] = [ @@ -18,11 +19,15 @@ export class LinkDetector { // group 3: line number // group 4: column number // eg: at Context. (c:\Users\someone\Desktop\mocha-runner\test\test.js:26:11) - /((\/|[a-zA-Z]:\\)[^\(\)<>\'\"\[\]]+):(\d+):(\d+)/g + ///((\/|[a-zA-Z]:\\)[^\(\)<>\'\"\[\]]+):(\d+):(\d+)/g original + ///(?:at |^|[\(<\'\"\[])(?:file:\/\/)?((?:(\/|[a-zA-Z]:)|[^\(\)<>\'\"\[\]:\s]+)(?:[\\/][^\(\)<>\'\"\[\]:]*)?):(\d+)(?::(\d+))?(?:$|[\)>\'\"\]])/g second original + + /(?![\(])(?:file:\/\/)?((?:([a-zA-Z]:)|[^\(\)<>\'\"\[\]:\s]+)(?:[\\/][^\(\)<>\'\"\[\]:]*)?):(\d+)(?::(\d+))?/g ]; constructor( - @IWorkbenchEditorService private editorService: IWorkbenchEditorService + @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @IWorkspaceContextService private contextService: IWorkspaceContextService ) { // noop } @@ -38,7 +43,7 @@ export class LinkDetector { while (match !== null) { let resource: uri = null; try { - resource = match && uri.file(match[1]); + resource = match && (match[2] ? uri.file(match[1]) : this.contextService.toResource(match[1])); } catch (e) { } if (resource) { @@ -59,7 +64,7 @@ export class LinkDetector { linkContainer.appendChild(link); const line = Number(match[3]); - const column = Number(match[4]); + const column = match[4] ? Number(match[4]) : null; link.onclick = (e) => this.onLinkClick(new StandardMouseEvent(e), resource, line, column); lastMatchIndex = pattern.lastIndex; @@ -82,7 +87,7 @@ export class LinkDetector { return linkContainer || text; } - private onLinkClick(event: IMouseEvent, resource: uri, line: number, column: number): void { + private onLinkClick(event: IMouseEvent, resource: uri, line: number, column: number = 0): void { const selection = window.getSelection(); if (selection.type === 'Range') { return; // do not navigate when user is selecting From e793d3e02cbd837ce7dfc011ad7717e20714aeb2 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Fri, 7 Apr 2017 16:59:41 +0200 Subject: [PATCH 0018/2747] Added file link validation. --- .../parts/debug/browser/linkDetector.ts | 54 +++++++++++++------ 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/linkDetector.ts b/src/vs/workbench/parts/debug/browser/linkDetector.ts index 616e9c00e3eba..f22ab75757cce 100644 --- a/src/vs/workbench/parts/debug/browser/linkDetector.ts +++ b/src/vs/workbench/parts/debug/browser/linkDetector.ts @@ -10,6 +10,7 @@ import { IMouseEvent, StandardMouseEvent } from 'vs/base/browser/mouseEvent'; import * as nls from 'vs/nls'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import fs = require('fs'); export class LinkDetector { private static FILE_LOCATION_PATTERNS: RegExp[] = [ @@ -51,29 +52,35 @@ export class LinkDetector { linkContainer = document.createElement('span'); } - let textBeforeLink = text.substring(lastMatchIndex, match.index); - if (textBeforeLink) { - let span = document.createElement('span'); - span.textContent = textBeforeLink; - linkContainer.appendChild(span); - } - - const link = document.createElement('a'); - link.textContent = text.substr(match.index, match[0].length); - link.title = isMacintosh ? nls.localize('fileLinkMac', "Click to follow (Cmd + click opens to the side)") : nls.localize('fileLink', "Click to follow (Ctrl + click opens to the side)"); - linkContainer.appendChild(link); + const valid = this.fileExists(resource.fsPath); + if (valid) { + let textBeforeLink = text.substring(lastMatchIndex, match.index); + if (textBeforeLink) { + let span = document.createElement('span'); + span.textContent = textBeforeLink; + linkContainer.appendChild(span); + } - const line = Number(match[3]); - const column = match[4] ? Number(match[4]) : null; - link.onclick = (e) => this.onLinkClick(new StandardMouseEvent(e), resource, line, column); + const link = document.createElement('a'); + link.textContent = text.substr(match.index, match[0].length); + link.title = isMacintosh ? nls.localize('fileLinkMac', "Click to follow (Cmd + click opens to the side)") : nls.localize('fileLink', "Click to follow (Ctrl + click opens to the side)"); + linkContainer.appendChild(link); + const line = Number(match[3]); + const column = match[4] ? Number(match[4]) : undefined; + link.onclick = (e) => this.onLinkClick(new StandardMouseEvent(e), resource, line, column); + } else { + let plainText = document.createElement('span'); + plainText.textContent = text.substring(lastMatchIndex, match.index + match[0].length); + linkContainer.appendChild(plainText); + } lastMatchIndex = pattern.lastIndex; - const previousMatch = match; + const currentMatch = match; match = pattern.exec(text); - // Append remaining text if no more links detected + // Append last string part if no more link matches if (!match) { - let textAfterLink = text.substr(previousMatch.index + previousMatch[0].length); + let textAfterLink = text.substr(currentMatch.index + currentMatch[0].length); if (textAfterLink) { let span = document.createElement('span'); span.textContent = textAfterLink; @@ -106,4 +113,17 @@ export class LinkDetector { }, event.ctrlKey || event.metaKey).done(null, errors.onUnexpectedError); } + private fileExists(path: string): boolean { + let stat; + try { + stat = fs.statSync(path); + } catch (e) { + return false; + } + + if (stat.isFile()) { + return true; + } + return false; + } } From 583fe76acf72202a06e13426cfa4625e52425a48 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 10 Apr 2017 18:09:44 +0200 Subject: [PATCH 0019/2747] Removed old regexes. --- src/vs/workbench/parts/debug/browser/linkDetector.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/linkDetector.ts b/src/vs/workbench/parts/debug/browser/linkDetector.ts index f22ab75757cce..53fdaf1d23145 100644 --- a/src/vs/workbench/parts/debug/browser/linkDetector.ts +++ b/src/vs/workbench/parts/debug/browser/linkDetector.ts @@ -20,9 +20,6 @@ export class LinkDetector { // group 3: line number // group 4: column number // eg: at Context. (c:\Users\someone\Desktop\mocha-runner\test\test.js:26:11) - ///((\/|[a-zA-Z]:\\)[^\(\)<>\'\"\[\]]+):(\d+):(\d+)/g original - ///(?:at |^|[\(<\'\"\[])(?:file:\/\/)?((?:(\/|[a-zA-Z]:)|[^\(\)<>\'\"\[\]:\s]+)(?:[\\/][^\(\)<>\'\"\[\]:]*)?):(\d+)(?::(\d+))?(?:$|[\)>\'\"\]])/g second original - /(?![\(])(?:file:\/\/)?((?:([a-zA-Z]:)|[^\(\)<>\'\"\[\]:\s]+)(?:[\\/][^\(\)<>\'\"\[\]:]*)?):(\d+)(?::(\d+))?/g ]; From 9396dd4bb8166586e57edb542582a2ef2065e930 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 13 Apr 2017 18:23:27 +0200 Subject: [PATCH 0020/2747] improve proxy auth dialog --- src/vs/code/electron-main/app.ts | 4 ++-- src/vs/code/electron-main/auth.html | 20 +++++++++++--------- src/vs/code/electron-main/auth.ts | 29 ++++++++++++++++++++++------- 3 files changed, 35 insertions(+), 18 deletions(-) diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 53762b3d89904..23470739b82fb 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -44,7 +44,7 @@ import { resolveCommonProperties, machineIdStorageKey, machineIdIpcChannel } fro import { getDelayedChannel } from 'vs/base/parts/ipc/common/ipc'; import product from 'vs/platform/node/product'; import pkg from 'vs/platform/node/package'; -import { AuthHandler } from './auth'; +import { ProxyAuthHandler } from './auth'; import { IDisposable, dispose } from "vs/base/common/lifecycle"; import { ConfigurationService } from "vs/platform/configuration/node/configurationService"; import { TPromise } from "vs/base/common/winjs.base"; @@ -157,7 +157,7 @@ export class VSCodeApplication { const appInstantiationService = this.initServices(); // Setup Auth Handler - const authHandler = appInstantiationService.createInstance(AuthHandler); + const authHandler = appInstantiationService.createInstance(ProxyAuthHandler); this.toDispose.push(authHandler); // Open Windows diff --git a/src/vs/code/electron-main/auth.html b/src/vs/code/electron-main/auth.html index 207f72194383e..e27ec2fc02e25 100644 --- a/src/vs/code/electron-main/auth.html +++ b/src/vs/code/electron-main/auth.html @@ -16,18 +16,18 @@ -webkit-user-select: none; user-select: none; } - + body { font-family: "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", sans-serif, "Droid Sans Fallback"; font-size: 10pt; background-color: #F3F3F3; } - + #main { box-sizing: border-box; padding: 10px; } - + h1 { margin: 0; padding: 10px 0; @@ -36,11 +36,11 @@ color: #f0f0f0; text-align: center; } - + #form { margin-top: 10px; } - + #username, #password { padding: 6px 10px; @@ -48,15 +48,15 @@ box-sizing: border-box; width: 100%; } - + #buttons { text-align: center; } - + p { margin: 6px 0; } - + input { font-family: "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", sans-serif, "Droid Sans Fallback" !important; } @@ -64,7 +64,7 @@ -

Authentication Required

+

@@ -87,6 +87,7 @@

Authentication Required

function promptForCredentials(data) { return new Promise((c, e) => { + const $title = document.getElementById('title'); const $username = document.getElementById('username'); const $password = document.getElementById('password'); const $form = document.getElementById('form'); @@ -113,6 +114,7 @@

Authentication Required

} }); + $title.textContent = data.title; $message.textContent = data.message; $username.focus(); }); diff --git a/src/vs/code/electron-main/auth.ts b/src/vs/code/electron-main/auth.ts index 7c522cf39ea69..27c4e6d2f1d4d 100644 --- a/src/vs/code/electron-main/auth.ts +++ b/src/vs/code/electron-main/auth.ts @@ -19,10 +19,16 @@ type LoginEvent = { cb: (username: string, password: string) => void; }; -export class AuthHandler { +type Credentials = { + username: string; + password: string; +}; + +export class ProxyAuthHandler { _serviceBrand: any; + private retryCount = 0; private disposables: IDisposable[] = []; constructor( @@ -33,14 +39,22 @@ export class AuthHandler { } private onLogin({ event, authInfo, cb }: LoginEvent): void { + if (!authInfo.isProxy) { + return; + } + + if (this.retryCount++ > 1) { + return; + } + const opts: any = { alwaysOnTop: true, skipTaskbar: true, resizable: false, width: 450, - height: 260, + height: 220, show: true, - title: localize('authRequired', "Authentication Required") + title: 'VS Code' }; const focusedWindow = this.windowsService.getFocusedWindow(); @@ -51,18 +65,19 @@ export class AuthHandler { } const win = new BrowserWindow(opts); - const config = {}; - const baseUrl = require.toUrl('./auth.html'); const url = `${baseUrl}?config=${encodeURIComponent(JSON.stringify(config))}`; win.loadURL(url); const proxyUrl = `${authInfo.host}:${authInfo.port}`; - const message = localize('proxyauth', "The proxy {0} requires a username and password.", proxyUrl); + const title = localize('authRequire', "Proxy Authentication Required"); + const message = localize('proxyauth', "The proxy {0} requires authentication.", proxyUrl); + const data = { title, message }; + const javascript = 'promptForCredentials(' + JSON.stringify(data) + ')'; event.preventDefault(); - win.webContents.executeJavaScript('promptForCredentials(' + JSON.stringify({ message }) + ')', true).then(({ username, password }: { username: string, password: string }) => { + win.webContents.executeJavaScript(javascript, true).then(({ username, password }: Credentials) => { cb(username, password); win.close(); }); From bf7c48e9a76bc8aa45fc9211f997138cb309b412 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 13 Apr 2017 21:49:09 +0200 Subject: [PATCH 0021/2747] :bug: handle proxy auth window closing --- src/vs/code/electron-main/auth.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/code/electron-main/auth.ts b/src/vs/code/electron-main/auth.ts index 27c4e6d2f1d4d..69b4e8dc51120 100644 --- a/src/vs/code/electron-main/auth.ts +++ b/src/vs/code/electron-main/auth.ts @@ -77,8 +77,13 @@ export class ProxyAuthHandler { const javascript = 'promptForCredentials(' + JSON.stringify(data) + ')'; event.preventDefault(); + + const onWindowClose = () => cb('', ''); + win.on('close', onWindowClose); + win.webContents.executeJavaScript(javascript, true).then(({ username, password }: Credentials) => { cb(username, password); + win.removeListener('close', onWindowClose); win.close(); }); } From 2f3db87f7da3ac1c07b6b396b20645f58d6c3497 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 13 Apr 2017 21:53:45 +0200 Subject: [PATCH 0022/2747] :art: simple refactoring --- src/vs/code/electron-main/auth.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/vs/code/electron-main/auth.ts b/src/vs/code/electron-main/auth.ts index 69b4e8dc51120..11017dec9ecd5 100644 --- a/src/vs/code/electron-main/auth.ts +++ b/src/vs/code/electron-main/auth.ts @@ -47,6 +47,8 @@ export class ProxyAuthHandler { return; } + event.preventDefault(); + const opts: any = { alwaysOnTop: true, skipTaskbar: true, @@ -68,19 +70,16 @@ export class ProxyAuthHandler { const config = {}; const baseUrl = require.toUrl('./auth.html'); const url = `${baseUrl}?config=${encodeURIComponent(JSON.stringify(config))}`; - win.loadURL(url); - const proxyUrl = `${authInfo.host}:${authInfo.port}`; const title = localize('authRequire', "Proxy Authentication Required"); const message = localize('proxyauth', "The proxy {0} requires authentication.", proxyUrl); const data = { title, message }; const javascript = 'promptForCredentials(' + JSON.stringify(data) + ')'; - event.preventDefault(); - const onWindowClose = () => cb('', ''); win.on('close', onWindowClose); + win.loadURL(url); win.webContents.executeJavaScript(javascript, true).then(({ username, password }: Credentials) => { cb(username, password); win.removeListener('close', onWindowClose); From 6cd2a1e17ff0ad703b59e2c3934053e82cb91fe0 Mon Sep 17 00:00:00 2001 From: Cristian Date: Sat, 15 Apr 2017 09:41:11 +0300 Subject: [PATCH 0023/2747] #22622 - removed z-index --- src/vs/workbench/parts/debug/browser/media/debugHover.css | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/browser/media/debugHover.css b/src/vs/workbench/parts/debug/browser/media/debugHover.css index ddf0a9a12465a..8fca6b6d66c05 100644 --- a/src/vs/workbench/parts/debug/browser/media/debugHover.css +++ b/src/vs/workbench/parts/debug/browser/media/debugHover.css @@ -69,7 +69,6 @@ color: rgba(108, 108, 108, 0.8); overflow: auto; max-height: 500px; - z-index: 60; } .monaco-editor .debug-hover-widget .error { From f19aa21df8833fafbe4bdd2c72db88f4b66cf687 Mon Sep 17 00:00:00 2001 From: Ilie Halip Date: Tue, 18 Apr 2017 15:26:28 +0300 Subject: [PATCH 0024/2747] added config option git.cloneDirectory, defaulting to os.homedir() --- extensions/git/package.json | 5 +++++ extensions/git/package.nls.json | 3 ++- extensions/git/src/commands.ts | 5 ++++- .../workbench/parts/git/browser/gitWorkbenchContributions.ts | 5 +++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index b06bb33a1dbdd..749b3a65c0961 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -618,6 +618,11 @@ "type": "boolean", "description": "%config.ignoreLegacyWarning%", "default": false + }, + "git.cloneDirectory": { + "type": "string", + "default": null, + "description": "%config.cloneDirectory%" } } } diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index 1db12e4a6b0a6..44eb8b422c3ab 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -36,5 +36,6 @@ "config.confirmSync": "Confirm before synchronizing git repositories", "config.countBadge": "Controls the git badge counter", "config.checkoutType": "Controls what type of branches are listed", - "config.ignoreLegacyWarning": "Ignores the legacy Git warning" + "config.ignoreLegacyWarning": "Ignores the legacy Git warning", + "config.cloneDirectory": "When cloning a new repository, the default location will be set to this directory" } \ No newline at end of file diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index eeccf86f2dcd4..61a519a66b82f 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -202,9 +202,12 @@ export class CommandCenter { return; } + const config = workspace.getConfiguration('git'); + const cloneDirectory = config.get('cloneDirectory') || os.homedir(); + const parentPath = await window.showInputBox({ prompt: localize('parent', "Parent Directory"), - value: os.homedir(), + value: cloneDirectory, ignoreFocusOut: true }); diff --git a/src/vs/workbench/parts/git/browser/gitWorkbenchContributions.ts b/src/vs/workbench/parts/git/browser/gitWorkbenchContributions.ts index e35495db43325..0bdf195f96c11 100644 --- a/src/vs/workbench/parts/git/browser/gitWorkbenchContributions.ts +++ b/src/vs/workbench/parts/git/browser/gitWorkbenchContributions.ts @@ -235,6 +235,11 @@ export function registerContributions(): void { enum: ['all', 'local', 'tags', 'remote'], default: 'all', description: nls.localize('checkoutType', "Controls what type of branches are listed."), + }, + 'git.cloneDirectory': { + type: 'string', + default: null, + description: nls.localize('cloneDirectory', "When cloning a new repository, the default location will be set to this directory."), } } }); From c7587a992f22f24521e6c38d5e3e3b86e0ffb8fe Mon Sep 17 00:00:00 2001 From: Rishab Date: Wed, 12 Apr 2017 01:24:29 +0530 Subject: [PATCH 0025/2747] Fix - #24242 --- .../parts/extensions/browser/extensionsList.ts | 5 +++-- .../media/extensionsViewlet.css | 17 +++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/parts/extensions/browser/extensionsList.ts b/src/vs/workbench/parts/extensions/browser/extensionsList.ts index 168870113c4c4..191df3e60cf66 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionsList.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionsList.ts @@ -64,8 +64,9 @@ export class Renderer implements IPagedRenderer { const header = append(headerContainer, $('.header')); const name = append(header, $('span.name')); const version = append(header, $('span.version')); - const installCount = append(header, $('span.install-count')); - const ratings = append(header, $('span.ratings')); + const extensionstats = append(headerContainer, $('.extension-stats')); + const installCount = append(extensionstats, $('span.install-count')); + const ratings = append(extensionstats, $('span.ratings')); const description = append(details, $('.description.ellipsis')); const footer = append(details, $('.footer')); const author = append(footer, $('.author.ellipsis')); diff --git a/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css b/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css index e6790ffae2abe..cbb5a36d90450 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css +++ b/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css @@ -82,9 +82,8 @@ .extensions-viewlet > .extensions .extension > .details > .header-container > .header { display: flex; align-items: baseline; - flex-wrap: wrap; overflow: hidden; - flex: 1; + flex: 80%; min-width: 0; } @@ -100,20 +99,26 @@ font-size: 80%; padding-left: 6px; flex: 1; - min-width: fit-content; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; +} + +.extensions-viewlet > .extensions .extension > .details > .header-container > .extension-stats { + justify-content: flex-end; } -.extensions-viewlet > .extensions .extension > .details > .header-container > .header > .install-count:not(:empty) { +.extensions-viewlet > .extensions .extension > .details > .header-container > .extension-stats > .install-count:not(:empty) { font-size: 80%; margin: 0 6px; } -.extensions-viewlet > .extensions .extension > .details > .header-container > .header > .install-count > .octicon { +.extensions-viewlet > .extensions .extension > .details > .header-container > .extension-stats > .install-count > .octicon { font-size: 100%; margin-right: 2px; } -.extensions-viewlet > .extensions .extension > .details > .header-container > .header > .ratings { +.extensions-viewlet > .extensions .extension > .details > .header-container > .extension-stats > .ratings { text-align: right; } From efbb64f09e5270f07b6af7bb2761e6b0e5130546 Mon Sep 17 00:00:00 2001 From: Rishab Date: Wed, 12 Apr 2017 01:59:10 +0530 Subject: [PATCH 0026/2747] Show ratings and download count even when extension explorer is narrow. --- .../extensions/electron-browser/media/extensionsViewlet.css | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css b/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css index cbb5a36d90450..79ad2c8bd173c 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css +++ b/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css @@ -122,11 +122,6 @@ text-align: right; } -.extensions-viewlet.narrow > .extensions .extension > .details > .header-container > .header > .ratings, -.extensions-viewlet.narrow > .extensions .extension > .details > .header-container > .header > .install-count { - display: none; -} - .extensions-viewlet > .extensions .extension > .details > .header-container .extension-status { width: 8px; height: 8px; From 6f4d9323e60b67c5a4b68f83134be979f30eae98 Mon Sep 17 00:00:00 2001 From: Rishab Date: Wed, 12 Apr 2017 22:44:30 +0530 Subject: [PATCH 0027/2747] Revert "Show ratings and download count even when extension explorer is narrow." This reverts commit 8db8769965b77510abb10974fb2168b62ea08aa8. --- .../extensions/electron-browser/media/extensionsViewlet.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css b/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css index 79ad2c8bd173c..cbb5a36d90450 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css +++ b/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css @@ -122,6 +122,11 @@ text-align: right; } +.extensions-viewlet.narrow > .extensions .extension > .details > .header-container > .header > .ratings, +.extensions-viewlet.narrow > .extensions .extension > .details > .header-container > .header > .install-count { + display: none; +} + .extensions-viewlet > .extensions .extension > .details > .header-container .extension-status { width: 8px; height: 8px; From 3976ab248675a8891d10d271ca15c0212fc0a6bd Mon Sep 17 00:00:00 2001 From: Rishab Date: Wed, 12 Apr 2017 22:45:21 +0530 Subject: [PATCH 0028/2747] Revert "Fix - #24242" This reverts commit 20137c722c0a0912304be507225830e7ec5766c7. --- .../parts/extensions/browser/extensionsList.ts | 5 ++--- .../media/extensionsViewlet.css | 17 ++++++----------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/parts/extensions/browser/extensionsList.ts b/src/vs/workbench/parts/extensions/browser/extensionsList.ts index 191df3e60cf66..168870113c4c4 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionsList.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionsList.ts @@ -64,9 +64,8 @@ export class Renderer implements IPagedRenderer { const header = append(headerContainer, $('.header')); const name = append(header, $('span.name')); const version = append(header, $('span.version')); - const extensionstats = append(headerContainer, $('.extension-stats')); - const installCount = append(extensionstats, $('span.install-count')); - const ratings = append(extensionstats, $('span.ratings')); + const installCount = append(header, $('span.install-count')); + const ratings = append(header, $('span.ratings')); const description = append(details, $('.description.ellipsis')); const footer = append(details, $('.footer')); const author = append(footer, $('.author.ellipsis')); diff --git a/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css b/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css index cbb5a36d90450..e6790ffae2abe 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css +++ b/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css @@ -82,8 +82,9 @@ .extensions-viewlet > .extensions .extension > .details > .header-container > .header { display: flex; align-items: baseline; + flex-wrap: wrap; overflow: hidden; - flex: 80%; + flex: 1; min-width: 0; } @@ -99,26 +100,20 @@ font-size: 80%; padding-left: 6px; flex: 1; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; -} - -.extensions-viewlet > .extensions .extension > .details > .header-container > .extension-stats { - justify-content: flex-end; + min-width: fit-content; } -.extensions-viewlet > .extensions .extension > .details > .header-container > .extension-stats > .install-count:not(:empty) { +.extensions-viewlet > .extensions .extension > .details > .header-container > .header > .install-count:not(:empty) { font-size: 80%; margin: 0 6px; } -.extensions-viewlet > .extensions .extension > .details > .header-container > .extension-stats > .install-count > .octicon { +.extensions-viewlet > .extensions .extension > .details > .header-container > .header > .install-count > .octicon { font-size: 100%; margin-right: 2px; } -.extensions-viewlet > .extensions .extension > .details > .header-container > .extension-stats > .ratings { +.extensions-viewlet > .extensions .extension > .details > .header-container > .header > .ratings { text-align: right; } From f6febd0534c6b6533669093ca329dc222ac3dd99 Mon Sep 17 00:00:00 2001 From: Rishab Date: Thu, 20 Apr 2017 01:24:16 +0530 Subject: [PATCH 0029/2747] #24653 - Adds a new user configuration `extensions.ignoreRecommendations` to enable or disable extension recommendations. --- .../parts/extensions/common/extensions.ts | 1 + .../electron-browser/extensionTipsService.ts | 62 +++++++++++++++++-- .../extensions.contribution.ts | 15 +++++ 3 files changed, 72 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/parts/extensions/common/extensions.ts b/src/vs/workbench/parts/extensions/common/extensions.ts index 7828aa162c1e4..f11cd884312ab 100644 --- a/src/vs/workbench/parts/extensions/common/extensions.ts +++ b/src/vs/workbench/parts/extensions/common/extensions.ts @@ -83,4 +83,5 @@ export const ConfigurationKey = 'extensions'; export interface IExtensionsConfiguration { autoUpdate: boolean; + ignoreRecommendations: boolean; } \ No newline at end of file diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts index 7b88f2d43cfef..9859bf1ef4324 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts @@ -15,13 +15,16 @@ import { IModelService } from 'vs/editor/common/services/modelService'; import { IModel } from 'vs/editor/common/editorCommon'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import product from 'vs/platform/node/product'; -import { IChoiceService } from 'vs/platform/message/common/message'; +import { IChoiceService, IMessageService } from 'vs/platform/message/common/message'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ShowRecommendedExtensionsAction, ShowWorkspaceRecommendedExtensionsAction } from 'vs/workbench/parts/extensions/browser/extensionsActions'; import Severity from 'vs/base/common/severity'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { Schemas } from 'vs/base/common/network'; import { IFileService } from 'vs/platform/files/common/files'; +import { IExtensionsConfiguration, ConfigurationKey } from 'vs/workbench/parts/extensions/common/extensions'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; interface IExtensionsContent { recommendations: string[]; @@ -47,7 +50,10 @@ export class ExtensionTipsService implements IExtensionTipsService { @IExtensionManagementService private extensionsService: IExtensionManagementService, @IInstantiationService private instantiationService: IInstantiationService, @IFileService private fileService: IFileService, - @IWorkspaceContextService private contextService: IWorkspaceContextService + @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationEditingService private configurationEditingService: IConfigurationEditingService, + @IMessageService private messageService: IMessageService ) { if (!this._galleryService.isEnabled()) { return; @@ -151,6 +157,10 @@ export class ExtensionTipsService implements IExtensionTipsService { JSON.stringify(Object.keys(this._recommendations)), StorageScope.GLOBAL ); + const ignoreSuggestions = this.getIgnoreRecommendationsConfig(); + if (ignoreSuggestions) { + return; + } this.extensionsService.getInstalled(LocalExtensionType.User).done(local => { Object.keys(this.importantRecommendations) @@ -174,14 +184,13 @@ export class ExtensionTipsService implements IExtensionTipsService { this.choiceService.choose(Severity.Info, message, options).done(choice => { switch (choice) { case 0: return recommendationsAction.run(); - case 1: - this.importantRecommendationsIgnoreList.push(id); - - return this.storageService.store( + case 1: this.importantRecommendationsIgnoreList.push(id); + this.storageService.store( 'extensionsAssistant/importantRecommendationsIgnore', JSON.stringify(this.importantRecommendationsIgnoreList), StorageScope.GLOBAL ); + return this.ignoreExtensionRecommendations(); } }); }); @@ -196,6 +205,11 @@ export class ExtensionTipsService implements IExtensionTipsService { return; } + const ignoreSuggestions = this.getIgnoreRecommendationsConfig(); + if (ignoreSuggestions) { + return; + } + this.getWorkspaceRecommendations().done(allRecommendations => { if (!allRecommendations.length) { return; @@ -228,6 +242,42 @@ export class ExtensionTipsService implements IExtensionTipsService { }); } + private ignoreExtensionRecommendations() { + const message = localize('ignoreExtensionRecommendations', "Do you want to ignore all extension recommendations ?"); + const options = [ + localize('ignoreAll', "Yes, Ignore All"), + localize('no', "No"), + localize('cancel', "Cancel") + ]; + + this.choiceService.choose(Severity.Info, message, options).done(choice => { + switch (choice) { + case 0: // If the user ignores the current message and selects different file type + // we should hide all the stacked up messages as he has selected Yes, Ignore All + this.messageService.hideAll(); + return this.setIgnoreRecmmendations(true); + case 1: return this.setIgnoreRecmmendations(false); + } + }); + } + + private setIgnoreRecmmendations(configVal: boolean) { + let target = ConfigurationTarget.USER; + const configKey = 'extensions.ignoreRecommendations'; + this.configurationEditingService.writeConfiguration(target, { key: configKey, value: configVal }).then(null, error => { + this.messageService.show(Severity.Error, error); + }); + if (configVal) { + const ignoreWorkspaceRecommendationsStorageKey = 'extensionsAssistant/workspaceRecommendationsIgnore'; + this.storageService.store(ignoreWorkspaceRecommendationsStorageKey, true, StorageScope.WORKSPACE); + } + } + + getIgnoreRecommendationsConfig(): boolean { + const config = this.configurationService.getConfiguration(ConfigurationKey); + return config.ignoreRecommendations ? true : false; + } + getKeywordsForExtension(extension: string): string[] { const keywords = product.extensionKeywords || {}; return keywords[extension] || []; diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts index b34622e879a0c..1e3629f42b123 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts @@ -169,6 +169,21 @@ Registry.as(ConfigurationExtensions.Configuration) } }); +Registry.as(ConfigurationExtensions.Configuration) + .registerConfiguration({ + id: 'extensions', + order: 30, + title: localize('extensionsConfigurationTitle', "Extensions"), + type: 'object', + properties: { + 'extensions.ignoreRecommendations': { + type: 'boolean', + description: localize('extensionsIgnoreRecommendations', "Ignore extension recommendations"), + default: false + } + } + }); + const jsonRegistry = Registry.as(jsonContributionRegistry.Extensions.JSONContribution); jsonRegistry.registerSchema(ExtensionsConfigurationSchemaId, ExtensionsConfigurationSchema); From 052cdc7a54710fa9b3286ffbf4f9abaa136e421e Mon Sep 17 00:00:00 2001 From: Rishab Date: Thu, 20 Apr 2017 01:32:59 +0530 Subject: [PATCH 0030/2747] Change method name. --- .../extensions/electron-browser/extensionTipsService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts index 9859bf1ef4324..758ca8db5d01c 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts @@ -255,13 +255,13 @@ export class ExtensionTipsService implements IExtensionTipsService { case 0: // If the user ignores the current message and selects different file type // we should hide all the stacked up messages as he has selected Yes, Ignore All this.messageService.hideAll(); - return this.setIgnoreRecmmendations(true); - case 1: return this.setIgnoreRecmmendations(false); + return this.setIgnoreRecommendationsConfig(true); + case 1: return this.setIgnoreRecommendationsConfig(false); } }); } - private setIgnoreRecmmendations(configVal: boolean) { + private setIgnoreRecommendationsConfig(configVal: boolean) { let target = ConfigurationTarget.USER; const configKey = 'extensions.ignoreRecommendations'; this.configurationEditingService.writeConfiguration(target, { key: configKey, value: configVal }).then(null, error => { From 5d323a3ecaa7c829b7530322fc3c63b55e70fde8 Mon Sep 17 00:00:00 2001 From: Mike Seese Date: Tue, 25 Apr 2017 23:13:07 -0400 Subject: [PATCH 0031/2747] Add git enableSmartCommit setting If false, this setting will prompt the user if they want to commit all files if none are staged --- extensions/git/package.json | 5 +++++ extensions/git/package.nls.json | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index 8db3b5bae9398..a76b951c679aa 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -597,6 +597,11 @@ "type": "boolean", "description": "%config.ignoreLimitWarning%", "default": false + }, + "git.enableSmartCommit": { + "type": "boolean", + "description": "%config.enableSmartCommit%", + "default": false } } } diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index 11c7347fa07a8..98f9ae8c4bf02 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -37,5 +37,6 @@ "config.countBadge": "Controls the git badge counter. `all` counts all changes. `tracked` counts only the tracked changes. `off` turns it off.", "config.checkoutType": "Controls what type of branches are listed when running `Checkout to...`. `all` shows all refs, `local` shows only the local branchs, `tags` shows only tags and `remote` shows only remote branches.", "config.ignoreLegacyWarning": "Ignores the legacy Git warning", - "config.ignoreLimitWarning": "Ignores the warning when there are too many changes in a repository" + "config.ignoreLimitWarning": "Ignores the warning when there are too many changes in a repository", + "config.enableSmartCommit": "Commit all changes when there are not staged changes." } \ No newline at end of file From dc8f4d6fa4288c20812f89da7b420953a084c36b Mon Sep 17 00:00:00 2001 From: Mike Seese Date: Tue, 25 Apr 2017 23:13:51 -0400 Subject: [PATCH 0032/2747] Check git enableSmartCommit if no staged files --- extensions/git/src/commands.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index d36d666b6e6b3..45808af26e646 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -530,6 +530,30 @@ export class CommandCenter { getCommitMessage: () => Promise, opts?: CommitOptions ): Promise { + const config = workspace.getConfiguration('git'); + const enableSmartCommit = config.get('enableSmartCommit') === true; + const noStagedChanges = this.model.indexGroup.resources.length === 0; + + // no changes, and the user has not configured to commit all in this case + if (noStagedChanges && !enableSmartCommit) { + // prompt the user if we want to commit all or not + + const message = localize('no staged changes', "There are no staged changes to commit. Would you like to stage all changes and commit them?"); + const yes = localize('yes', "Yes"); + const always = localize('always', "Always"); + const pick = await window.showWarningMessage(message, { modal: true }, yes, always); + + if (pick === always) { + // update preference to enable smart commit always + config.update('enableSmartCommit', true, false); + } + else if (pick !== yes) { + // do not commit on cancel + return false; + } + // for yes or always, continue onto previous smart commit behavior + } + if (!opts) { opts = { all: this.model.indexGroup.resources.length === 0 }; } From e64cf3121793863dc2331f88e78bdaa19dd263de Mon Sep 17 00:00:00 2001 From: Mike Seese Date: Tue, 25 Apr 2017 23:23:30 -0400 Subject: [PATCH 0033/2747] Prevent redundant enableSmartCommit prompt This prevents a prompt for enableSmartCommit if there are no changes at all --- extensions/git/src/commands.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 45808af26e646..8c356c049bcef 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -533,9 +533,10 @@ export class CommandCenter { const config = workspace.getConfiguration('git'); const enableSmartCommit = config.get('enableSmartCommit') === true; const noStagedChanges = this.model.indexGroup.resources.length === 0; + const noUnstagedChanges = this.model.workingTreeGroup.resources.length === 0; // no changes, and the user has not configured to commit all in this case - if (noStagedChanges && !enableSmartCommit) { + if (!noUnstagedChanges && noStagedChanges && !enableSmartCommit) { // prompt the user if we want to commit all or not const message = localize('no staged changes', "There are no staged changes to commit. Would you like to stage all changes and commit them?"); @@ -555,14 +556,14 @@ export class CommandCenter { } if (!opts) { - opts = { all: this.model.indexGroup.resources.length === 0 }; + opts = { all: noStagedChanges }; } if ( // no changes - (this.model.indexGroup.resources.length === 0 && this.model.workingTreeGroup.resources.length === 0) + (noStagedChanges && noUnstagedChanges) // or no staged changes and not `all` - || (!opts.all && this.model.indexGroup.resources.length === 0) + || (!opts.all && noStagedChanges) ) { window.showInformationMessage(localize('no changes', "There are no changes to commit.")); return false; From 62159fdbe15ecca2b117c36ebc5808989308c166 Mon Sep 17 00:00:00 2001 From: Tereza Tomcova Date: Thu, 27 Apr 2017 02:15:52 +0200 Subject: [PATCH 0034/2747] Fixes #4370: Set default icon for file associations --- build/win32/code.iss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/win32/code.iss b/build/win32/code.iss index 1eb3241d9f483..2fcc70db5540d 100644 --- a/build/win32/code.iss +++ b/build/win32/code.iss @@ -770,6 +770,10 @@ Root: HKCR; Subkey: "{#RegValueName}SourceFile"; ValueType: string; ValueName: " Root: HKCR; Subkey: "{#RegValueName}SourceFile\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\resources\app\resources\win32\code_file.ico" Root: HKCR; Subkey: "{#RegValueName}SourceFile\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%1""" +Root: HKCR; Subkey: "Applications\{#ExeBasename}.exe"; ValueType: none; ValueName: ""; Flags: uninsdeletekey +Root: HKCR; Subkey: "Applications\{#ExeBasename}.exe\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\resources\app\resources\win32\code_file.ico" +Root: HKCR; Subkey: "Applications\{#ExeBasename}.exe\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#ExeBasename}.exe"" ""%1""" + Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}\bin"; Tasks: addtopath; Check: NeedsAddPath(ExpandConstant('{app}\bin')) Root: HKCU; Subkey: "SOFTWARE\Classes\*\shell\{#RegValueName}"; ValueType: expandsz; ValueName: ""; ValueData: "Open with {#ShellNameShort}"; Tasks: addcontextmenufiles; Flags: uninsdeletekey From 10c0610a6dafc5d7932126678f660e77c895e65c Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Wed, 12 Apr 2017 00:27:35 -0400 Subject: [PATCH 0035/2747] Fixes #944 - Support wildcards on activationEvents.workspaceContains --- src/vs/workbench/node/extensionHostMain.ts | 34 ++++++++++++++++++---- 1 file changed, 28 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index d84ec84c92426..ae3bd6cb18bc6 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -12,6 +12,8 @@ import { join } from 'path'; import { IRemoteCom } from 'vs/platform/extensions/common/ipcRemoteCom'; import { ExtHostExtensionService } from 'vs/workbench/api/node/extHostExtensionService'; import { ExtHostThreadService } from 'vs/workbench/services/thread/common/extHostThreadService'; +import { QueryType, ISearchQuery } from 'vs/platform/search/common/search'; +import { DiskSearch } from 'vs/workbench/services/search/node/searchService'; import { RemoteTelemetryService } from 'vs/workbench/api/node/extHostTelemetry'; import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IInitData, IEnvironment, MainContext } from 'vs/workbench/api/node/extHost.protocol'; @@ -34,6 +36,7 @@ export class ExtensionHostMain { private _isTerminating: boolean = false; private _contextService: IWorkspaceContextService; + private _diskSearch: DiskSearch; private _environment: IEnvironment; private _extensionService: ExtHostExtensionService; @@ -122,13 +125,32 @@ export class ExtensionHostMain { } }); - const fileNames = Object.keys(desiredFilesMap); + const matchingPatterns = Object.keys(desiredFilesMap).map(p => { + // TODO: This is a bit hacky -- maybe this should be implemented by using something like + // `workspaceGlob` or something along those lines? + if (p.indexOf('*') > -1 || p.indexOf('?') > -1) { + if (!this._diskSearch) { + this._diskSearch = new DiskSearch(false); + } + + const query: ISearchQuery = { + folderResources: [workspace.resource], + type: QueryType.File, + maxResults: 1, + includePattern: { [p]: true } + }; + + return this._diskSearch.search(query).then(result => result.results.length ? p : undefined); + } else { + return pfs.exists(join(folderPath, p)).then(exists => exists ? p : undefined); + } + }); - return TPromise.join(fileNames.map(f => pfs.exists(join(folderPath, f)))).then(exists => { - fileNames - .filter((f, i) => exists[i]) - .forEach(fileName => { - const activationEvent = `workspaceContains:${fileName}`; + return TPromise.join(matchingPatterns).then(patterns => { + patterns + .filter(p => p !== undefined) + .forEach(p => { + const activationEvent = `workspaceContains:${p}`; this._extensionService.activateByEvent(activationEvent) .done(null, err => console.error(err)); From 5dcbdb3d7af82b2add2241843b6872c12e0a27c0 Mon Sep 17 00:00:00 2001 From: Josh Lockhart Date: Thu, 27 Apr 2017 17:02:40 -0400 Subject: [PATCH 0036/2747] First tests, cannot fetch stdout of spawned validator process --- .../php/src/features/validationProvider.ts | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/extensions/php/src/features/validationProvider.ts b/extensions/php/src/features/validationProvider.ts index 41bae2878dc9d..188632bf07424 100644 --- a/extensions/php/src/features/validationProvider.ts +++ b/extensions/php/src/features/validationProvider.ts @@ -224,6 +224,7 @@ export default class PHPValidationProvider { let decoder = new LineDecoder(); let diagnostics: vscode.Diagnostic[] = []; let processLine = (line: string) => { + console.log('Processing line', line); let matches = line.match(PHPValidationProvider.MatchExpression); if (matches) { let message = matches[1]; @@ -244,9 +245,29 @@ export default class PHPValidationProvider { } else { args = PHPValidationProvider.BufferArgs; } + try { + // TESTING + + // Set executable to bash.exe + executable = 'cmd'; + + // Translate path name to Linux format (assume using /mnt// mount) + let winPath = args.pop(); + console.log('Old file path', winPath); + let linuxPath = winPath.trim().replace(/^([a-zA-Z]):\\/, '/mnt/$1/').replace(/\\/g, '/'); + console.log('New file path', linuxPath); + args.push(linuxPath); + + // Correct the args for bash.exe + args = ['/c', 'bash -c "php ' + args.join(' ') + '"']; + options['stdio'] = [0, 'pipe']; + // END TESTING + + console.log('Linting with executable', executable, args); let childProcess = cp.spawn(executable, args, options); childProcess.on('error', (error: Error) => { + console.log('Child process error', error); if (this.pauseValidation) { resolve(); return; @@ -261,9 +282,11 @@ export default class PHPValidationProvider { childProcess.stdin.end(); } childProcess.stdout.on('data', (data: Buffer) => { + console.log('Data returned from buffer'); decoder.write(data).forEach(processLine); }); childProcess.stdout.on('end', () => { + console.log('End buffer'); let line = decoder.end(); if (line) { processLine(line); @@ -272,6 +295,7 @@ export default class PHPValidationProvider { resolve(); }); } else { + console.log('Nuthin'); resolve(); } } catch (error) { @@ -293,4 +317,4 @@ export default class PHPValidationProvider { } vscode.window.showInformationMessage(message); } -} \ No newline at end of file +} From 9db49eebf90969af34a1919d5960323fc125b3cc Mon Sep 17 00:00:00 2001 From: Joao Portela Date: Tue, 18 Apr 2017 13:48:12 +0100 Subject: [PATCH 0037/2747] Inserting file path on the terminal, when dragging a file to it --- .../electron-browser/terminalPanel.ts | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 46dee45dc7fb9..d13e6e34ed595 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -204,6 +204,28 @@ export class TerminalPanel extends Panel { event.stopPropagation(); } })); + this._register(DOM.addDisposableListener(this._parentDomElement, DOM.EventType.DROP, (e: DragEvent) => { + if (e.target === this._parentDomElement || DOM.isAncestor(e.target as HTMLElement, this._parentDomElement)) { + if (!e.dataTransfer) { + return; + } + const url = e.dataTransfer.getData('URL'); + const filePath = this._getPathFromUrl(url); + const terminal = this._terminalService.getActiveInstance(); + + // for files dragged from the tree explorer + if (filePath) { + terminal.sendText(filePath, false); + return; + } + + // for files dragged from the filesystem + const files = e.dataTransfer.files; + if (files.length > 0) { + terminal.sendText(files[0].path, false); + } + } + })); } private _refreshCtrlHeld(e: KeyboardEvent): void { @@ -255,4 +277,17 @@ export class TerminalPanel extends Panel { a.fontSize !== b.fontSize || a.lineHeight !== b.lineHeight; } + + /** + * Removes the trailing file:// from a URL if it exists + * Returns null if it doesn't + */ + private _getPathFromUrl(url: string): string { + const fileRefex = /^file:\/\/(.+)/; + const result = fileRefex.exec(url); + if (result && result.length === 2) { + return result[1]; + } + return null; + } } From ea4e0f4bee713d48a7a857cd1a412795df2a1fa3 Mon Sep 17 00:00:00 2001 From: Joao Portela Date: Thu, 27 Apr 2017 23:24:05 +0100 Subject: [PATCH 0038/2747] Wrapping paths with spaces in quotes, and encoding properly --- .../electron-browser/terminalPanel.ts | 32 ++++++++----------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index d13e6e34ed595..d942ae2c33f59 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -22,6 +22,7 @@ import { KillTerminalAction, CreateNewTerminalAction, SwitchTerminalInstanceActi import { Panel } from 'vs/workbench/browser/panel'; import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; import { TPromise } from 'vs/base/common/winjs.base'; +import URI from 'vs/base/common/uri'; export class TerminalPanel extends Panel { @@ -209,20 +210,18 @@ export class TerminalPanel extends Panel { if (!e.dataTransfer) { return; } + // check if the file was dragged from the tree explorer const url = e.dataTransfer.getData('URL'); - const filePath = this._getPathFromUrl(url); - const terminal = this._terminalService.getActiveInstance(); + let filePath = URI.parse(url).path; - // for files dragged from the tree explorer - if (filePath) { - terminal.sendText(filePath, false); - return; + // check if the file was dragged from the filesystem + if (!filePath && e.dataTransfer.files.length > 0) { + filePath = e.dataTransfer.files[0].path; } - // for files dragged from the filesystem - const files = e.dataTransfer.files; - if (files.length > 0) { - terminal.sendText(files[0].path, false); + if (filePath) { + const terminal = this._terminalService.getActiveInstance(); + terminal.sendText(this._wrapPathInQuotes(filePath), false); } } })); @@ -279,15 +278,12 @@ export class TerminalPanel extends Panel { } /** - * Removes the trailing file:// from a URL if it exists - * Returns null if it doesn't + * Adds quotes to a path if it contains whitespaces */ - private _getPathFromUrl(url: string): string { - const fileRefex = /^file:\/\/(.+)/; - const result = fileRefex.exec(url); - if (result && result.length === 2) { - return result[1]; + private _wrapPathInQuotes(path: string) { + if (/\s+/.test(path)) { + return `"${path}"`; } - return null; + return path; } } From bbae979af243c4a0aab4a1f0e0604b5af753ccf1 Mon Sep 17 00:00:00 2001 From: Nick Snyder Date: Thu, 27 Apr 2017 15:30:34 -0700 Subject: [PATCH 0039/2747] Fix typo --- .../referenceSearch/test/browser/referencesModel.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/referenceSearch/test/browser/referencesModel.test.ts b/src/vs/editor/contrib/referenceSearch/test/browser/referencesModel.test.ts index 26c3ecd8f7e7a..4474c25d4f294 100644 --- a/src/vs/editor/contrib/referenceSearch/test/browser/referencesModel.test.ts +++ b/src/vs/editor/contrib/referenceSearch/test/browser/referencesModel.test.ts @@ -12,7 +12,7 @@ import { ReferencesModel } from 'vs/editor/contrib/referenceSearch/browser/refer suite('references', function () { - test('neartestReference', function () { + test('nearestReference', function () { const model = new ReferencesModel([{ uri: URI.file('/out/obj/can'), range: new Range(1, 1, 1, 1) From e573b301ef895301c4c077d585276cd4ba595046 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 27 Apr 2017 23:32:46 +0200 Subject: [PATCH 0040/2747] Fix issue where stale model change events were interpreted --- .../common/viewModel/splitLinesCollection.ts | 24 ++++++++++++++++--- .../editor/common/viewModel/viewModelImpl.ts | 18 +++++++------- 2 files changed, 29 insertions(+), 13 deletions(-) diff --git a/src/vs/editor/common/viewModel/splitLinesCollection.ts b/src/vs/editor/common/viewModel/splitLinesCollection.ts index 9a22f94558cee..6ac00757566e4 100644 --- a/src/vs/editor/common/viewModel/splitLinesCollection.ts +++ b/src/vs/editor/common/viewModel/splitLinesCollection.ts @@ -562,7 +562,13 @@ export class SplitLinesCollection { eventsCollector.emit(new viewEvents.ViewFlushedEvent()); } - public onModelLinesDeleted(eventsCollector: ViewEventsCollector, fromLineNumber: number, toLineNumber: number): void { + public onModelLinesDeleted(eventsCollector: ViewEventsCollector, versionId: number, fromLineNumber: number, toLineNumber: number): void { + if (versionId <= this._validModelVersionId) { + // Here we check for versionId in case the lines were reconstructed in the meantime. + // We don't want to apply stale change events on top of a newer read model state. + return; + } + let outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1); let outputToLineNumber = this.prefixSumComputer.getAccumulatedValue(toLineNumber - 1); @@ -572,7 +578,13 @@ export class SplitLinesCollection { eventsCollector.emit(new viewEvents.ViewLinesDeletedEvent(outputFromLineNumber, outputToLineNumber)); } - public onModelLinesInserted(eventsCollector: ViewEventsCollector, fromLineNumber: number, toLineNumber: number, text: string[]): void { + public onModelLinesInserted(eventsCollector: ViewEventsCollector, versionId: number, fromLineNumber: number, toLineNumber: number, text: string[]): void { + if (versionId <= this._validModelVersionId) { + // Here we check for versionId in case the lines were reconstructed in the meantime. + // We don't want to apply stale change events on top of a newer read model state. + return; + } + let hiddenAreas = this.getHiddenAreas(); let isInHiddenArea = false; let testPosition = new Position(fromLineNumber, 1); @@ -605,7 +617,13 @@ export class SplitLinesCollection { eventsCollector.emit(new viewEvents.ViewLinesInsertedEvent(outputFromLineNumber, outputFromLineNumber + totalOutputLineCount - 1)); } - public onModelLineChanged(eventsCollector: ViewEventsCollector, lineNumber: number, newText: string): boolean { + public onModelLineChanged(eventsCollector: ViewEventsCollector, versionId: number, lineNumber: number, newText: string): boolean { + if (versionId <= this._validModelVersionId) { + // Here we check for versionId in case the lines were reconstructed in the meantime. + // We don't want to apply stale change events on top of a newer read model state. + return false; + } + let lineIndex = lineNumber - 1; let oldOutputLineCount = this.lines[lineIndex].getViewLineCount(); diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index bed5e27c8c712..f9f313c6f3945 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -303,9 +303,11 @@ export class ViewModel extends Disposable implements IViewModel { case textModelEvents.TextModelEventType.ModelRawContentChanged2: { const e = data; + const changes = e.changes; + const versionId = e.versionId; - for (let j = 0, lenJ = e.changes.length; j < lenJ; j++) { - const change = e.changes[j]; + for (let j = 0, lenJ = changes.length; j < lenJ; j++) { + const change = changes[j]; switch (change.changeType) { case textModelEvents.RawContentChangedType.Flush: @@ -315,25 +317,21 @@ export class ViewModel extends Disposable implements IViewModel { break; case textModelEvents.RawContentChangedType.LinesDeleted: - this.lines.onModelLinesDeleted(eventsCollector, change.fromLineNumber, change.toLineNumber); + this.lines.onModelLinesDeleted(eventsCollector, versionId, change.fromLineNumber, change.toLineNumber); hadOtherModelChange = true; break; case textModelEvents.RawContentChangedType.LinesInserted: - this.lines.onModelLinesInserted(eventsCollector, change.fromLineNumber, change.toLineNumber, change.detail.split('\n')); + this.lines.onModelLinesInserted(eventsCollector, versionId, change.fromLineNumber, change.toLineNumber, change.detail.split('\n')); hadOtherModelChange = true; break; case textModelEvents.RawContentChangedType.LineChanged: - hadModelLineChangeThatChangedLineMapping = this.lines.onModelLineChanged(eventsCollector, change.lineNumber, change.detail); + hadModelLineChangeThatChangedLineMapping = this.lines.onModelLineChanged(eventsCollector, versionId, change.lineNumber, change.detail); break; - - default: - console.info('ViewModel received unknown event: '); - console.info(_e); } } - this.lines.acceptVersionId(e.versionId); + this.lines.acceptVersionId(versionId); break; } From 4ee2f42db06cd4b031d33e30b8bf8263163103c7 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 28 Apr 2017 00:47:35 +0200 Subject: [PATCH 0041/2747] Fixes #23913 --- .../editor/browser/widget/codeEditorWidget.ts | 97 ------------------- .../editor/common/commands/replaceCommand.ts | 47 +++++---- src/vs/editor/common/commands/shiftCommand.ts | 14 ++- .../commands/surroundSelectionCommand.ts | 4 +- src/vs/editor/common/controller/cursor.ts | 25 ++++- src/vs/editor/common/editorCommon.ts | 13 +++ .../editor/common/model/editableTextModel.ts | 8 +- .../comment/common/blockCommentCommand.ts | 2 +- .../common/inPlaceReplaceCommand.ts | 2 +- .../common/deleteLinesCommand.ts | 2 +- .../test/common/commands/commandTestUtils.ts | 10 ++ .../test/common/controller/cursor.test.ts | 29 ++++++ src/vs/monaco.d.ts | 7 ++ 13 files changed, 130 insertions(+), 130 deletions(-) diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index 1287263b4c3c5..f1bb44263e472 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -17,7 +17,6 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { CommonCodeEditor } from 'vs/editor/common/commonCodeEditor'; import { CommonEditorConfiguration } from 'vs/editor/common/config/commonEditorConfig'; import { Range, IRange } from 'vs/editor/common/core/range'; -import { Selection } from 'vs/editor/common/core/selection'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; @@ -686,99 +685,3 @@ class CodeEditorWidgetFocusTracker extends Disposable { return this._hasFocus; } } - -class OverlayWidget2 implements editorBrowser.IOverlayWidget { - - private _id: string; - private _position: editorBrowser.IOverlayWidgetPosition; - private _domNode: HTMLElement; - - constructor(id: string, position: editorBrowser.IOverlayWidgetPosition) { - this._id = id; - this._position = position; - this._domNode = document.createElement('div'); - this._domNode.className = this._id.replace(/\./g, '-').replace(/[^a-z0-9\-]/, ''); - } - - public getId(): string { - return this._id; - } - - public getDomNode(): HTMLElement { - return this._domNode; - } - - public getPosition(): editorBrowser.IOverlayWidgetPosition { - return this._position; - } -} - -export enum EditCursorState { - EndOfLastEditOperation = 0 -} - -class SingleEditOperation { - - range: Range; - text: string; - forceMoveMarkers: boolean; - - constructor(source: editorCommon.ISingleEditOperation) { - this.range = new Range(source.range.startLineNumber, source.range.startColumn, source.range.endLineNumber, source.range.endColumn); - this.text = source.text; - this.forceMoveMarkers = source.forceMoveMarkers || false; - } - -} - -export class CommandRunner implements editorCommon.ICommand { - - private _ops: SingleEditOperation[]; - private _editCursorState: EditCursorState; - - constructor(ops: editorCommon.ISingleEditOperation[], editCursorState: EditCursorState) { - this._ops = ops.map(op => new SingleEditOperation(op)); - this._editCursorState = editCursorState; - } - - public getEditOperations(model: editorCommon.ITokenizedModel, builder: editorCommon.IEditOperationBuilder): void { - if (this._ops.length === 0) { - return; - } - - // Sort them in ascending order by range starts - this._ops.sort((o1, o2) => { - return Range.compareRangesUsingStarts(o1.range, o2.range); - }); - - // Merge operations that touch each other - let resultOps: editorCommon.ISingleEditOperation[] = []; - let previousOp = this._ops[0]; - for (let i = 1; i < this._ops.length; i++) { - if (previousOp.range.endLineNumber === this._ops[i].range.startLineNumber && previousOp.range.endColumn === this._ops[i].range.startColumn) { - // These operations are one after another and can be merged - previousOp.range = Range.plusRange(previousOp.range, this._ops[i].range); - previousOp.text = previousOp.text + this._ops[i].text; - } else { - resultOps.push(previousOp); - previousOp = this._ops[i]; - } - } - resultOps.push(previousOp); - - for (let i = 0; i < resultOps.length; i++) { - builder.addEditOperation(Range.lift(resultOps[i].range), resultOps[i].text); - } - } - - public computeCursorState(model: editorCommon.ITokenizedModel, helper: editorCommon.ICursorStateComputerData): Selection { - let inverseEditOperations = helper.getInverseEditOperations(); - let srcRange = inverseEditOperations[inverseEditOperations.length - 1].range; - return new Selection( - srcRange.endLineNumber, - srcRange.endColumn, - srcRange.endLineNumber, - srcRange.endColumn - ); - } -} diff --git a/src/vs/editor/common/commands/replaceCommand.ts b/src/vs/editor/common/commands/replaceCommand.ts index e0c8e3ffee281..c3c2c765bc412 100644 --- a/src/vs/editor/common/commands/replaceCommand.ts +++ b/src/vs/editor/common/commands/replaceCommand.ts @@ -18,20 +18,8 @@ export class ReplaceCommand implements editorCommon.ICommand { this._text = text; } - public getText(): string { - return this._text; - } - - public getRange(): Range { - return this._range; - } - - public setRange(newRange: Range): void { - this._range = newRange; - } - public getEditOperations(model: editorCommon.ITokenizedModel, builder: editorCommon.IEditOperationBuilder): void { - builder.addEditOperation(this._range, this._text); + builder.addTrackedEditOperation(this._range, this._text); } public computeCursorState(model: editorCommon.ITokenizedModel, helper: editorCommon.ICursorStateComputerData): Selection { @@ -46,10 +34,18 @@ export class ReplaceCommand implements editorCommon.ICommand { } } -export class ReplaceCommandWithoutChangingPosition extends ReplaceCommand { +export class ReplaceCommandWithoutChangingPosition implements editorCommon.ICommand { + + private _range: Range; + private _text: string; constructor(range: Range, text: string) { - super(range, text); + this._range = range; + this._text = text; + } + + public getEditOperations(model: editorCommon.ITokenizedModel, builder: editorCommon.IEditOperationBuilder): void { + builder.addTrackedEditOperation(this._range, this._text); } public computeCursorState(model: editorCommon.ITokenizedModel, helper: editorCommon.ICursorStateComputerData): Selection { @@ -64,17 +60,24 @@ export class ReplaceCommandWithoutChangingPosition extends ReplaceCommand { } } -export class ReplaceCommandWithOffsetCursorState extends ReplaceCommand { +export class ReplaceCommandWithOffsetCursorState implements editorCommon.ICommand { + private _range: Range; + private _text: string; private _columnDeltaOffset: number; private _lineNumberDeltaOffset: number; constructor(range: Range, text: string, lineNumberDeltaOffset: number, columnDeltaOffset: number) { - super(range, text); + this._range = range; + this._text = text; this._columnDeltaOffset = columnDeltaOffset; this._lineNumberDeltaOffset = lineNumberDeltaOffset; } + public getEditOperations(model: editorCommon.ITokenizedModel, builder: editorCommon.IEditOperationBuilder): void { + builder.addTrackedEditOperation(this._range, this._text); + } + public computeCursorState(model: editorCommon.ITokenizedModel, helper: editorCommon.ICursorStateComputerData): Selection { let inverseEditOperations = helper.getInverseEditOperations(); let srcRange = inverseEditOperations[0].range; @@ -87,19 +90,21 @@ export class ReplaceCommandWithOffsetCursorState extends ReplaceCommand { } } -export class ReplaceCommandThatPreservesSelection extends ReplaceCommand { +export class ReplaceCommandThatPreservesSelection implements editorCommon.ICommand { + private _range: Range; + private _text: string; private _initialSelection: Selection; private _selectionId: string; constructor(editRange: Range, text: string, initialSelection: Selection) { - super(editRange, text); + this._range = editRange; + this._text = text; this._initialSelection = initialSelection; } public getEditOperations(model: editorCommon.ITokenizedModel, builder: editorCommon.IEditOperationBuilder): void { - super.getEditOperations(model, builder); - + builder.addEditOperation(this._range, this._text); this._selectionId = builder.trackSelection(this._initialSelection); } diff --git a/src/vs/editor/common/commands/shiftCommand.ts b/src/vs/editor/common/commands/shiftCommand.ts index 9733d30135e3a..77a59b0238533 100644 --- a/src/vs/editor/common/commands/shiftCommand.ts +++ b/src/vs/editor/common/commands/shiftCommand.ts @@ -52,6 +52,14 @@ export class ShiftCommand implements ICommand { this._useLastEditRangeForCursorEndPosition = false; } + private _addEditOperation(builder: IEditOperationBuilder, range: Range, text: string) { + if (this._useLastEditRangeForCursorEndPosition) { + builder.addTrackedEditOperation(range, text); + } else { + builder.addEditOperation(range, text); + } + } + public getEditOperations(model: ITokenizedModel, builder: IEditOperationBuilder): void { const startLine = this._selection.startLineNumber; @@ -147,7 +155,7 @@ export class ShiftCommand implements ICommand { indents[j] = indents[j - 1] + oneIndent; } - builder.addEditOperation(new Range(lineNumber, 1, lineNumber, indentationEndIndex + 1), indents[desiredIndentCount]); + this._addEditOperation(builder, new Range(lineNumber, 1, lineNumber, indentationEndIndex + 1), indents[desiredIndentCount]); } } else { @@ -186,9 +194,9 @@ export class ShiftCommand implements ICommand { } } - builder.addEditOperation(new Range(lineNumber, 1, lineNumber, indentationEndIndex + 1), ''); + this._addEditOperation(builder, new Range(lineNumber, 1, lineNumber, indentationEndIndex + 1), ''); } else { - builder.addEditOperation(new Range(lineNumber, 1, lineNumber, 1), oneIndent); + this._addEditOperation(builder, new Range(lineNumber, 1, lineNumber, 1), oneIndent); } } } diff --git a/src/vs/editor/common/commands/surroundSelectionCommand.ts b/src/vs/editor/common/commands/surroundSelectionCommand.ts index 177e4812a677e..2a83cefac1b78 100644 --- a/src/vs/editor/common/commands/surroundSelectionCommand.ts +++ b/src/vs/editor/common/commands/surroundSelectionCommand.ts @@ -20,14 +20,14 @@ export class SurroundSelectionCommand implements ICommand { } public getEditOperations(model: ITokenizedModel, builder: IEditOperationBuilder): void { - builder.addEditOperation(new Range( + builder.addTrackedEditOperation(new Range( this._range.startLineNumber, this._range.startColumn, this._range.startLineNumber, this._range.startColumn ), this._charBeforeSelection); - builder.addEditOperation(new Range( + builder.addTrackedEditOperation(new Range( this._range.endLineNumber, this._range.endColumn, this._range.endLineNumber, diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index a8098e199dbef..b8a95cf04aee4 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -42,12 +42,14 @@ interface IExecContext { interface ICommandData { operations: editorCommon.IIdentifiedSingleEditOperation[]; hadTrackedRange: boolean; + hadTrackedEditOperation: boolean; } interface ICommandsData { operations: editorCommon.IIdentifiedSingleEditOperation[]; hadTrackedRanges: boolean[]; anyoneHadTrackedRange: boolean; + anyoneHadTrackedEditOperation: boolean; } export class Cursor extends Disposable implements ICursors { @@ -479,6 +481,12 @@ export class Cursor extends Disposable implements ICursors { }); }; + var hadTrackedEditOperation = false; + var addTrackedEditOperation = (selection: Range, text: string) => { + hadTrackedEditOperation = true; + addEditOperation(selection, text); + }; + var hadTrackedRange = false; var trackSelection = (selection: Selection, trackPreviousOnEmpty?: boolean) => { var selectionMarkerStickToPreviousCharacter: boolean, @@ -517,6 +525,7 @@ export class Cursor extends Disposable implements ICursors { var editOperationBuilder: editorCommon.IEditOperationBuilder = { addEditOperation: addEditOperation, + addTrackedEditOperation: addTrackedEditOperation, trackSelection: trackSelection }; @@ -527,13 +536,15 @@ export class Cursor extends Disposable implements ICursors { onUnexpectedError(e); return { operations: [], - hadTrackedRange: false + hadTrackedRange: false, + hadTrackedEditOperation: false }; } return { operations: operations, - hadTrackedRange: hadTrackedRange + hadTrackedRange: hadTrackedRange, + hadTrackedEditOperation: hadTrackedEditOperation }; } @@ -541,6 +552,7 @@ export class Cursor extends Disposable implements ICursors { var oneResult: ICommandData; var operations: editorCommon.IIdentifiedSingleEditOperation[] = []; var hadTrackedRanges: boolean[] = []; + var anyoneHadTrackedEditOperation: boolean = false; var anyoneHadTrackedRange: boolean; for (var i = 0; i < commands.length; i++) { @@ -549,6 +561,7 @@ export class Cursor extends Disposable implements ICursors { operations = operations.concat(oneResult.operations); hadTrackedRanges[i] = oneResult.hadTrackedRange; anyoneHadTrackedRange = anyoneHadTrackedRange || hadTrackedRanges[i]; + anyoneHadTrackedEditOperation = anyoneHadTrackedEditOperation || oneResult.hadTrackedEditOperation; } else { hadTrackedRanges[i] = false; } @@ -556,7 +569,8 @@ export class Cursor extends Disposable implements ICursors { return { operations: operations, hadTrackedRanges: hadTrackedRanges, - anyoneHadTrackedRange: anyoneHadTrackedRange + anyoneHadTrackedRange: anyoneHadTrackedRange, + anyoneHadTrackedEditOperation: anyoneHadTrackedEditOperation }; } @@ -682,6 +696,11 @@ export class Cursor extends Disposable implements ICursors { } } + // TODO@Alex: find a better way to do this. + // give the hint that edit operations are tracked to the model + if (commandsData.anyoneHadTrackedEditOperation && filteredOperations.length > 0) { + filteredOperations[0]._isTracked = true; + } var selectionsAfter = this.model.pushEditOperations(selectionsBefore, filteredOperations, (inverseEditOperations: editorCommon.IIdentifiedSingleEditOperation[]): Selection[] => { var groupedInverseEditOperations: editorCommon.IIdentifiedSingleEditOperation[][] = []; for (var i = 0; i < selectionsBefore.length; i++) { diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index bace38517a3fb..4010e1e617582 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -291,6 +291,14 @@ export interface IEditOperationBuilder { */ addEditOperation(range: Range, text: string): void; + /** + * Add a new edit operation (a replace operation). + * The inverse edits will be accessible in `ICursorStateComputerData.getInverseEditOperations()` + * @param range The range to replace (delete). May be empty to represent a simple insert. + * @param text The text to replace with. May be null to represent a simple delete. + */ + addTrackedEditOperation(range: Range, text: string): void; + /** * Track `selection` when applying edit operations. * A best effort will be made to not grow/expand the selection. @@ -384,6 +392,11 @@ export interface IIdentifiedSingleEditOperation { * that can be removed on next model edit operation if `config.trimAutoWhitespace` is true. */ isAutoWhitespaceEdit?: boolean; + /** + * This indicates that this operation is in a set of operations that are tracked and should not be "simplified". + * @internal + */ + _isTracked?: boolean; } /** diff --git a/src/vs/editor/common/model/editableTextModel.ts b/src/vs/editor/common/model/editableTextModel.ts index 990306afc62c1..358a30d633021 100644 --- a/src/vs/editor/common/model/editableTextModel.ts +++ b/src/vs/editor/common/model/editableTextModel.ts @@ -289,10 +289,14 @@ export class EditableTextModel extends TextModelWithDecorations implements edito let mightContainRTL = this._mightContainRTL; let mightContainNonBasicASCII = this._mightContainNonBasicASCII; + let canReduceOperations = true; let operations: IValidatedEditOperation[] = []; for (let i = 0; i < rawOperations.length; i++) { let op = rawOperations[i]; + if (canReduceOperations && op._isTracked) { + canReduceOperations = false; + } let validatedRange = this.validateRange(op.range); if (!mightContainRTL && op.text) { // check if the new inserted text contains RTL @@ -325,7 +329,9 @@ export class EditableTextModel extends TextModelWithDecorations implements edito } } - operations = this._reduceOperations(operations); + if (canReduceOperations) { + operations = this._reduceOperations(operations); + } let editableRange = this.getEditableRange(); let editableRangeStart = editableRange.getStartPosition(); diff --git a/src/vs/editor/contrib/comment/common/blockCommentCommand.ts b/src/vs/editor/contrib/comment/common/blockCommentCommand.ts index 4949996d429b8..ffceef3758fb4 100644 --- a/src/vs/editor/contrib/comment/common/blockCommentCommand.ts +++ b/src/vs/editor/contrib/comment/common/blockCommentCommand.ts @@ -62,7 +62,7 @@ export class BlockCommentCommand implements editorCommon.ICommand { } for (var i = 0; i < ops.length; i++) { - builder.addEditOperation(ops[i].range, ops[i].text); + builder.addTrackedEditOperation(ops[i].range, ops[i].text); } } diff --git a/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplaceCommand.ts b/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplaceCommand.ts index 75f4bc12f90b8..94ffad7d218df 100644 --- a/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplaceCommand.ts +++ b/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplaceCommand.ts @@ -21,7 +21,7 @@ export class InPlaceReplaceCommand implements editorCommon.ICommand { } public getEditOperations(model: editorCommon.ITokenizedModel, builder: editorCommon.IEditOperationBuilder): void { - builder.addEditOperation(this._editRange, this._text); + builder.addTrackedEditOperation(this._editRange, this._text); } public computeCursorState(model: editorCommon.ITokenizedModel, helper: editorCommon.ICursorStateComputerData): Selection { diff --git a/src/vs/editor/contrib/linesOperations/common/deleteLinesCommand.ts b/src/vs/editor/contrib/linesOperations/common/deleteLinesCommand.ts index ee6327b1d20fe..5f65136ea7066 100644 --- a/src/vs/editor/contrib/linesOperations/common/deleteLinesCommand.ts +++ b/src/vs/editor/contrib/linesOperations/common/deleteLinesCommand.ts @@ -48,7 +48,7 @@ export class DeleteLinesCommand implements ICommand { startColumn = model.getLineMaxColumn(startLineNumber); } - builder.addEditOperation(new Range(startLineNumber, startColumn, endLineNumber, endColumn), null); + builder.addTrackedEditOperation(new Range(startLineNumber, startColumn, endLineNumber, endColumn), null); } public computeCursorState(model: ITokenizedModel, helper: ICursorStateComputerData): Selection { diff --git a/src/vs/editor/test/common/commands/commandTestUtils.ts b/src/vs/editor/test/common/commands/commandTestUtils.ts index 94d078b007379..1e9c6202c59cb 100644 --- a/src/vs/editor/test/common/commands/commandTestUtils.ts +++ b/src/vs/editor/test/common/commands/commandTestUtils.ts @@ -56,6 +56,16 @@ export function getEditOperation(model: editorCommon.IModel, command: editorComm }); }, + addTrackedEditOperation: (range: Range, text: string) => { + operations.push({ + identifier: null, + range: range, + text: text, + forceMoveMarkers: false + }); + }, + + trackSelection: (selection: Selection) => { return null; } diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index 5f3f10e85bd41..315b67ef74a4e 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -1722,6 +1722,35 @@ suite('Editor Controller - Regression tests', () => { assertCursor(cursor, new Position(1, 1)); }); }); + + test('issue #23913: Greater than 1000+ multi cursor typing replacement text appears inverted, lines begin to drop off selection', () => { + const LINE_CNT = 2000; + + let text = []; + for (let i = 0; i < LINE_CNT; i++) { + text[i] = 'asd'; + } + usingCursor({ + text: text + }, (model, cursor) => { + + let selections: Selection[] = []; + for (let i = 0; i < LINE_CNT; i++) { + selections[i] = new Selection(i + 1, 1, i + 1, 1); + } + cursor.setSelections('test', selections); + + cursorCommand(cursor, H.Type, { text: 'n' }, 'keyboard'); + cursorCommand(cursor, H.Type, { text: 'n' }, 'keyboard'); + + for (let i = 0; i < LINE_CNT; i++) { + assert.equal(model.getLineContent(i + 1), 'nnasd', 'line #' + (i + 1)); + } + + assert.equal(cursor.getSelections().length, LINE_CNT); + assert.equal(cursor.getSelections()[LINE_CNT - 1].startLineNumber, LINE_CNT); + }); + }); }); suite('Editor Controller - Cursor Configuration', () => { diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 827a6976e542e..aba5742243fe3 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -1246,6 +1246,13 @@ declare module monaco.editor { * @param text The text to replace with. May be null to represent a simple delete. */ addEditOperation(range: Range, text: string): void; + /** + * Add a new edit operation (a replace operation). + * The inverse edits will be accessible in `ICursorStateComputerData.getInverseEditOperations()` + * @param range The range to replace (delete). May be empty to represent a simple insert. + * @param text The text to replace with. May be null to represent a simple delete. + */ + addTrackedEditOperation(range: Range, text: string): void; /** * Track `selection` when applying edit operations. * A best effort will be made to not grow/expand the selection. From edc667ecb71f2edb69ce8bdea8b16483b23c3aa7 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 28 Apr 2017 00:57:38 +0200 Subject: [PATCH 0042/2747] Fixes #23711 --- .../common/controller/cursorTypeOperations.ts | 2 +- .../test/common/controller/cursor.test.ts | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index d50d128f0d573..13b79a281fece 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -464,7 +464,7 @@ export class TypeOperations { } private static _typeInterceptorElectricChar(config: CursorConfiguration, model: ITokenizedModel, cursor: SingleCursorState, ch: string): EditOperationResult { - if (!config.electricChars.hasOwnProperty(ch)) { + if (!config.electricChars.hasOwnProperty(ch) || !cursor.selection.isEmpty()) { return null; } diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index 315b67ef74a4e..59ea9aa805c0f 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -2965,6 +2965,23 @@ suite('ElectricCharacter', () => { }); mode.dispose(); }); + + test('issue #23711: Replacing selected text with )]} fails to delete old text with backwards-dragged selection', () => { + let mode = new ElectricCharMode(); + usingCursor({ + text: [ + '{', + 'word' + ], + languageIdentifier: mode.getLanguageIdentifier() + }, (model, cursor) => { + moveTo(cursor, 2, 5); + moveTo(cursor, 2, 1, true); + cursorCommand(cursor, H.Type, { text: '}' }, 'keyboard'); + assert.deepEqual(model.getLineContent(2), '}'); + }); + mode.dispose(); + }); }); suite('autoClosingPairs', () => { From 021617b8b4442942e2cf36412974ab1460f8f357 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 27 Apr 2017 15:59:32 -0700 Subject: [PATCH 0043/2747] Fixes #25585 --- .../themes/tomorrow-night-blue-theme.json | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json index 8ed7c467c5bba..e8ca1069bd695 100644 --- a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json +++ b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json @@ -17,6 +17,7 @@ "editorLineHighlight": "#00346e", "editorCursor": "#ffffff", "editorWhitespaces": "#404f7d", + "editorWidgetBackground": "#001c40", "tabsContainerBackground": "#001733", "tabInactiveBackground": "#001c40", "statusBarBackground": "#001126", From 04f5fbb140e3213655e24c2d6063dd16c23eac5e Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 27 Apr 2017 16:05:22 -0700 Subject: [PATCH 0044/2747] A few more tweaks for tomorrow night blue --- .../themes/tomorrow-night-blue-theme.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json index e8ca1069bd695..ae48833a5c259 100644 --- a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json +++ b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json @@ -18,6 +18,9 @@ "editorCursor": "#ffffff", "editorWhitespaces": "#404f7d", "editorWidgetBackground": "#001c40", + "editorHoverBackground": "#001c40", + "editorHoverBorder": "#ffffff44", + "editorGroupBorder": "#404f7d", "tabsContainerBackground": "#001733", "tabInactiveBackground": "#001c40", "statusBarBackground": "#001126", From db036ea0c774d32106ca56d43a8ac9f491805e43 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 27 Apr 2017 16:11:40 -0700 Subject: [PATCH 0045/2747] Log Traces at correct level when TSServer exists as expected. Fixes #25381 --- extensions/typescript/src/typescriptServiceClient.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 78252498fc775..2bbef406fa678 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -597,9 +597,14 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.serviceExited(false); }); childProcess.on('exit', (code: any) => { - this.error(`TSServer exited with code: ${code === null || typeof code === 'undefined' ? 'unknown' : code}`); + if (code === null || typeof code === 'undefined') { + this.info(`TSServer exited`); + } else { + this.error(`TSServer exited with code: ${code}`); + } + if (this.tsServerLogFile) { - this.error(`TSServer log file: ${this.tsServerLogFile}`); + this.info(`TSServer log file: ${this.tsServerLogFile}`); } this.serviceExited(true); }); From c9313f78e6e69d48d6b822f5a8f18c9d714717b9 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 28 Apr 2017 01:15:05 +0200 Subject: [PATCH 0046/2747] Fixes #24947: Ctrl - Backspace is deleting the previous '({[' --- .../common/controller/cursorWordOperations.ts | 18 +++-------- .../test/common/wordOperations.test.ts | 31 ++++++++++++++++++- 2 files changed, 34 insertions(+), 15 deletions(-) diff --git a/src/vs/editor/common/controller/cursorWordOperations.ts b/src/vs/editor/common/controller/cursorWordOperations.ts index 42515e24450b7..d420a29b871b2 100644 --- a/src/vs/editor/common/controller/cursorWordOperations.ts +++ b/src/vs/editor/common/controller/cursorWordOperations.ts @@ -293,16 +293,11 @@ export class WordOperations { if (prevWordOnLine) { column = prevWordOnLine.start + 1; } else { - if (column > 1 || lineNumber === 1) { + if (column > 1) { column = 1; } else { lineNumber--; - prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new Position(lineNumber, model.getLineMaxColumn(lineNumber))); - if (prevWordOnLine) { - column = prevWordOnLine.start + 1; - } else { - column = 1; - } + column = model.getLineMaxColumn(lineNumber); } } } else { @@ -312,16 +307,11 @@ export class WordOperations { if (prevWordOnLine) { column = prevWordOnLine.end + 1; } else { - if (column > 1 || lineNumber === 1) { + if (column > 1) { column = 1; } else { lineNumber--; - prevWordOnLine = WordOperations._findPreviousWordOnLine(wordSeparators, model, new Position(lineNumber, model.getLineMaxColumn(lineNumber))); - if (prevWordOnLine) { - column = prevWordOnLine.end + 1; - } else { - column = 1; - } + column = model.getLineMaxColumn(lineNumber); } } } diff --git a/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts b/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts index 5b087f27abe7e..ab99938740b8e 100644 --- a/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts +++ b/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts @@ -552,6 +552,35 @@ suite('WordOperations', () => { }); }); + test('issue #24947', () => { + withMockCodeEditor([ + '{', + '}' + ], {}, (editor, _) => { + const model = editor.getModel(); + editor.setPosition(new Position(2, 1)); + deleteWordLeft(editor); assert.equal(model.getLineContent(1), '{}'); + }); + + withMockCodeEditor([ + '{', + '}' + ], {}, (editor, _) => { + const model = editor.getModel(); + editor.setPosition(new Position(2, 1)); + deleteWordStartLeft(editor); assert.equal(model.getLineContent(1), '{}'); + }); + + withMockCodeEditor([ + '{', + '}' + ], {}, (editor, _) => { + const model = editor.getModel(); + editor.setPosition(new Position(2, 1)); + deleteWordEndLeft(editor); assert.equal(model.getLineContent(1), '{}'); + }); + }); + test('issue #832: deleteWordRight', () => { withMockCodeEditor([ ' /* Just some text a+= 3 +5-3 */ ' @@ -669,7 +698,7 @@ suite('WordOperations', () => { ], {}, (editor, _) => { const model = editor.getModel(); editor.setPosition(new Position(2, 1)); - deleteWordLeft(editor); assert.equal(model.getLineContent(1), 'A line with text And another one', '001'); + deleteWordLeft(editor); assert.equal(model.getLineContent(1), 'A line with text. And another one', '001'); }); }); }); From 67f77c3eab838652ac57f10fa0318648a00bf6dc Mon Sep 17 00:00:00 2001 From: Josh Lockhart Date: Thu, 27 Apr 2017 19:55:18 -0400 Subject: [PATCH 0047/2747] Remove custom stdio array from test code --- extensions/php/src/features/validationProvider.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extensions/php/src/features/validationProvider.ts b/extensions/php/src/features/validationProvider.ts index 188632bf07424..f3a8c7ad6120e 100644 --- a/extensions/php/src/features/validationProvider.ts +++ b/extensions/php/src/features/validationProvider.ts @@ -260,8 +260,7 @@ export default class PHPValidationProvider { args.push(linuxPath); // Correct the args for bash.exe - args = ['/c', 'bash -c "php ' + args.join(' ') + '"']; - options['stdio'] = [0, 'pipe']; + args = ['/c', 'bash.exe -c "php ' + args.join(' ') + '"']; // END TESTING console.log('Linting with executable', executable, args); From df33ba5bc57916c2ded8eaea38a8e3eb0cd2117c Mon Sep 17 00:00:00 2001 From: Josh Lockhart Date: Thu, 27 Apr 2017 20:07:31 -0400 Subject: [PATCH 0048/2747] Add child process callback to report exit code, signal --- extensions/php/src/features/validationProvider.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/php/src/features/validationProvider.ts b/extensions/php/src/features/validationProvider.ts index f3a8c7ad6120e..3c3109287688c 100644 --- a/extensions/php/src/features/validationProvider.ts +++ b/extensions/php/src/features/validationProvider.ts @@ -275,6 +275,10 @@ export default class PHPValidationProvider { this.pauseValidation = true; resolve(); }); + childProcess.on('exit', (code: Number, signal: String) => { + console.log('Child exit status', code); + console.log('Child exit signal', signal); + }); if (childProcess.pid) { if (this.trigger === RunTrigger.onType) { childProcess.stdin.write(textDocument.getText()); From 4e25aa41b75e2289f7234ac8ade174acb254f30a Mon Sep 17 00:00:00 2001 From: Josh Lockhart Date: Thu, 27 Apr 2017 20:20:43 -0400 Subject: [PATCH 0049/2747] Progress after inspecting stderr --- extensions/php/src/features/validationProvider.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/extensions/php/src/features/validationProvider.ts b/extensions/php/src/features/validationProvider.ts index 3c3109287688c..7de7c15fa107c 100644 --- a/extensions/php/src/features/validationProvider.ts +++ b/extensions/php/src/features/validationProvider.ts @@ -250,7 +250,7 @@ export default class PHPValidationProvider { // TESTING // Set executable to bash.exe - executable = 'cmd'; + executable = 'bash'; // Translate path name to Linux format (assume using /mnt// mount) let winPath = args.pop(); @@ -260,7 +260,9 @@ export default class PHPValidationProvider { args.push(linuxPath); // Correct the args for bash.exe - args = ['/c', 'bash.exe -c "php ' + args.join(' ') + '"']; + //args = ['/c', 'bash.exe -c "php ' + args.join(' ') + '"']; + args = ['-c "php ' + args.join(' ') + '"']; + options['shell'] = true; // END TESTING console.log('Linting with executable', executable, args); @@ -288,6 +290,10 @@ export default class PHPValidationProvider { console.log('Data returned from buffer'); decoder.write(data).forEach(processLine); }); + childProcess.stderr.setEncoding('utf8'); + childProcess.stderr.on('data', (data) => { + console.log('Data returned from stderr', data); + }); childProcess.stdout.on('end', () => { console.log('End buffer'); let line = decoder.end(); From d25d80782322f2349be3e35b0d0adeab9d116951 Mon Sep 17 00:00:00 2001 From: Josh Lockhart Date: Thu, 27 Apr 2017 20:30:13 -0400 Subject: [PATCH 0050/2747] More progress, paths being auto converted back to C: style? --- extensions/php/src/features/validationProvider.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/extensions/php/src/features/validationProvider.ts b/extensions/php/src/features/validationProvider.ts index 7de7c15fa107c..b26320919536b 100644 --- a/extensions/php/src/features/validationProvider.ts +++ b/extensions/php/src/features/validationProvider.ts @@ -260,8 +260,8 @@ export default class PHPValidationProvider { args.push(linuxPath); // Correct the args for bash.exe - //args = ['/c', 'bash.exe -c "php ' + args.join(' ') + '"']; - args = ['-c "php ' + args.join(' ') + '"']; + args = ['-c "php ' + args.join(' ') + '"']; // <-- Why is my path Linux being auto converted to C:\\ style? + //args = ['-c "php --version"']; // <-- This works options['shell'] = true; // END TESTING @@ -286,9 +286,11 @@ export default class PHPValidationProvider { childProcess.stdin.write(textDocument.getText()); childProcess.stdin.end(); } - childProcess.stdout.on('data', (data: Buffer) => { - console.log('Data returned from buffer'); - decoder.write(data).forEach(processLine); + childProcess.stdout.setEncoding('utf8'); + //childProcess.stdout.on('data', (data: Buffer) => { + childProcess.stdout.on('data', (data) => { + console.log('Data returned from buffer', data); + //decoder.write(data).forEach(processLine); }); childProcess.stderr.setEncoding('utf8'); childProcess.stderr.on('data', (data) => { From 2225ab4768b49aee0a8ddcdde3f956b3c01ab394 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 27 Apr 2017 17:41:49 -0700 Subject: [PATCH 0051/2747] Fixes #25589 --- extensions/theme-red/themes/Red-color-theme.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/theme-red/themes/Red-color-theme.json b/extensions/theme-red/themes/Red-color-theme.json index 928472265fdc3..08a5ae513a006 100644 --- a/extensions/theme-red/themes/Red-color-theme.json +++ b/extensions/theme-red/themes/Red-color-theme.json @@ -11,7 +11,7 @@ "statusBarNoFolderBackground": "#700000", "tabsContainerBackground": "#330000", "titleBarActiveBackground": "#770000", - "titleBarInactiveBackground": "#773333", + "titleBarInactiveBackground": "#772222", // editor "editorBackground": "#390000", "editorGroupBorder": "#ff666633", @@ -34,6 +34,7 @@ "peekViewResultsBackground": "#400000", "peekViewEditorBackground": "#300000", // UI + "debugToolBarBackground": "#660000", "focusBorder": "#ff6666aa", "buttonBackground": "#885555", "buttonHoverBackground": "#aa5555", From 600e461ccefb752f1e35e2a2d3489712f5ea3e48 Mon Sep 17 00:00:00 2001 From: Josh Lockhart Date: Thu, 27 Apr 2017 20:43:52 -0400 Subject: [PATCH 0052/2747] WOOOOOO VICTORY --- extensions/php/src/features/validationProvider.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/extensions/php/src/features/validationProvider.ts b/extensions/php/src/features/validationProvider.ts index b26320919536b..ba3c0bdcfa502 100644 --- a/extensions/php/src/features/validationProvider.ts +++ b/extensions/php/src/features/validationProvider.ts @@ -250,7 +250,7 @@ export default class PHPValidationProvider { // TESTING // Set executable to bash.exe - executable = 'bash'; + executable = 'cmd'; // Translate path name to Linux format (assume using /mnt// mount) let winPath = args.pop(); @@ -260,8 +260,7 @@ export default class PHPValidationProvider { args.push(linuxPath); // Correct the args for bash.exe - args = ['-c "php ' + args.join(' ') + '"']; // <-- Why is my path Linux being auto converted to C:\\ style? - //args = ['-c "php --version"']; // <-- This works + args = ['/c', 'C:\\Windows\\sysnative\\bash -c "php ' + args.join(' ') + '"']; options['shell'] = true; // END TESTING @@ -283,14 +282,12 @@ export default class PHPValidationProvider { }); if (childProcess.pid) { if (this.trigger === RunTrigger.onType) { - childProcess.stdin.write(textDocument.getText()); - childProcess.stdin.end(); + //childProcess.stdin.write(textDocument.getText()); + //childProcess.stdin.end(); } - childProcess.stdout.setEncoding('utf8'); - //childProcess.stdout.on('data', (data: Buffer) => { - childProcess.stdout.on('data', (data) => { + childProcess.stdout.on('data', (data: Buffer) => { console.log('Data returned from buffer', data); - //decoder.write(data).forEach(processLine); + decoder.write(data).forEach(processLine); }); childProcess.stderr.setEncoding('utf8'); childProcess.stderr.on('data', (data) => { From fc3019ce842c73703a96ab9cd186d0341f40b3de Mon Sep 17 00:00:00 2001 From: Josh Lockhart Date: Thu, 27 Apr 2017 20:47:25 -0400 Subject: [PATCH 0053/2747] Re-enable lines that I removed earlier --- extensions/php/src/features/validationProvider.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/php/src/features/validationProvider.ts b/extensions/php/src/features/validationProvider.ts index ba3c0bdcfa502..888895144427d 100644 --- a/extensions/php/src/features/validationProvider.ts +++ b/extensions/php/src/features/validationProvider.ts @@ -282,8 +282,8 @@ export default class PHPValidationProvider { }); if (childProcess.pid) { if (this.trigger === RunTrigger.onType) { - //childProcess.stdin.write(textDocument.getText()); - //childProcess.stdin.end(); + childProcess.stdin.write(textDocument.getText()); + childProcess.stdin.end(); } childProcess.stdout.on('data', (data: Buffer) => { console.log('Data returned from buffer', data); From 23eb17a03ee416a6e700b21a7b923bb6ee7784ef Mon Sep 17 00:00:00 2001 From: Josh Lockhart Date: Thu, 27 Apr 2017 22:29:32 -0400 Subject: [PATCH 0054/2747] Hook up php shell validate settings --- .../php/src/features/validationProvider.ts | 55 ++++++++++++++++--- 1 file changed, 47 insertions(+), 8 deletions(-) diff --git a/extensions/php/src/features/validationProvider.ts b/extensions/php/src/features/validationProvider.ts index 888895144427d..572b3a8419388 100644 --- a/extensions/php/src/features/validationProvider.ts +++ b/extensions/php/src/features/validationProvider.ts @@ -97,6 +97,10 @@ export default class PHPValidationProvider { private diagnosticCollection: vscode.DiagnosticCollection; private delayers: { [key: string]: ThrottledDelayer }; + private validationExecutableIsShell: boolean; + private validationExecutableArgs: string = '-c'; + private validationShellExecutable: string = '/usr/bin/php'; + constructor(private workspaceStore: vscode.Memento) { this.executable = null; this.validationEnabled = true; @@ -139,6 +143,24 @@ export default class PHPValidationProvider { this.executable = undefined; this.executableIsUserDefined = undefined; } + + this.validationExecutableIsShell = section.get('validate.executableIsShell', false); + if (this.validationExecutableIsShell) { + let shellArgsInspect = section.inspect('validate.executableArgs'); + if (shellArgsInspect.workspaceValue) { + this.validationExecutableArgs = shellArgsInspect.workspaceValue; + } else if (shellArgsInspect.globalValue) { + this.validationExecutableArgs = shellArgsInspect.globalValue; + } + + let shellExecutableInspect = section.inspect('validate.shellExecutablePath'); + if (shellExecutableInspect.workspaceValue) { + this.validationShellExecutable = shellExecutableInspect.workspaceValue; + } else if (shellExecutableInspect.globalValue) { + this.validationShellExecutable = shellExecutableInspect.globalValue; + } + } + this.trigger = RunTrigger.from(section.get('validate.run', RunTrigger.strings.onSave)); } if (this.executableIsUserDefined !== true && this.workspaceStore.get(CheckedExecutablePath, undefined) !== void 0) { @@ -246,22 +268,39 @@ export default class PHPValidationProvider { args = PHPValidationProvider.BufferArgs; } + // Are we validating with WSL? + // TODO: Use config flag in this conditional + if (this.validationExecutableIsShell) { + // Shell args + let wslShellArgs = [this.validationExecutableArgs]; + let wslShellPhpExecutableArgs = args.slice(0); + options['shell'] = true; + + // Transform Windows file path to Linux file path + let windowsPath = wslShellPhpExecutableArgs.pop(); + let linuxPath = windowsPath.trim().replace(/^([a-zA-Z]):\\/, '/mnt/$1/').replace(/\\/g, '/'); + wslShellPhpExecutableArgs.push(linuxPath); + + // Finalize executable args + args = wslShellArgs.concat(['"', this.validationShellExecutable, wslShellPhpExecutableArgs.join(' '), '"']); + } + try { // TESTING // Set executable to bash.exe - executable = 'cmd'; + //executable = 'C:\\Windows\\sysnative\\bash'; // Translate path name to Linux format (assume using /mnt// mount) - let winPath = args.pop(); - console.log('Old file path', winPath); - let linuxPath = winPath.trim().replace(/^([a-zA-Z]):\\/, '/mnt/$1/').replace(/\\/g, '/'); - console.log('New file path', linuxPath); - args.push(linuxPath); + // let winPath = args.pop(); + // console.log('Old file path', winPath); + // let linuxPath = winPath.trim().replace(/^([a-zA-Z]):\\/, '/mnt/$1/').replace(/\\/g, '/'); + // console.log('New file path', linuxPath); + // args.push(linuxPath); // Correct the args for bash.exe - args = ['/c', 'C:\\Windows\\sysnative\\bash -c "php ' + args.join(' ') + '"']; - options['shell'] = true; + //args = ['-c', '"php ' + args.join(' ') + '"']; + //options['shell'] = true; // END TESTING console.log('Linting with executable', executable, args); From 31a5fb236ddeed969a0021a2f94e7695ffbfb66b Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Thu, 27 Apr 2017 21:58:15 -0700 Subject: [PATCH 0055/2747] Route emmet actions to extension (#25587) * Route emmet actions to extension * No need for settings --- .../workbench/parts/emmet/node/emmetActions.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/emmet/node/emmetActions.ts b/src/vs/workbench/parts/emmet/node/emmetActions.ts index f812166d8b3c2..9f5b8e089b7ae 100644 --- a/src/vs/workbench/parts/emmet/node/emmetActions.ts +++ b/src/vs/workbench/parts/emmet/node/emmetActions.ts @@ -23,6 +23,7 @@ import * as pfs from 'vs/base/node/pfs'; import Severity from 'vs/base/common/severity'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; +import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands'; interface IEmmetConfiguration { emmet: { @@ -235,6 +236,14 @@ export interface IEmmetActionOptions extends IActionOptions { export abstract class EmmetEditorAction extends EditorAction { + private actionMap = { + 'editor.emmet.action.removeTag': 'emmet.removeTag', + 'editor.emmet.action.updateTag': 'emmet.updateTag', + 'editor.emmet.action.matchingPair': 'emmet.matchTag', + 'editor.emmet.action.wrapWithAbbreviation': 'emmet.wrapWithAbbreviation', + 'editor.emmet.action.expandAbbreviation': 'emmet.expandAbbreviation' + }; + protected emmetActionName: string; constructor(opts: IEmmetActionOptions) { @@ -269,6 +278,12 @@ export abstract class EmmetEditorAction extends EditorAction { const contextService = accessor.get(IWorkspaceContextService); const workspaceRoot = contextService.getWorkspace() ? contextService.getWorkspace().resource.fsPath : ''; const telemetryService = accessor.get(ITelemetryService); + const commandService = accessor.get(ICommandService); + + let mappedCommand = this.actionMap[this.id]; + if (mappedCommand && CommandsRegistry.getCommand(mappedCommand)) { + return commandService.executeCommand(mappedCommand); + } return this._withGrammarContributions(extensionService).then((grammarContributions) => { @@ -296,7 +311,6 @@ export abstract class EmmetEditorAction extends EditorAction { this.runEmmetAction(accessor, new EmmetActionContext(editor, _emmet, editorAccessor)); }); editorAccessor.onAfterEmmetAction(); - telemetryService.publicLog('emmetActionCompleted', { action: this.emmetActionName }); }); }); From 31205bdeb8f7c2b97dff683ad01a048636b56b2c Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 28 Apr 2017 08:53:29 +0200 Subject: [PATCH 0056/2747] use more transparency (for #25482) --- extensions/theme-abyss/themes/abyss-color-theme.json | 2 +- .../themes/solarized-dark-color-theme.json | 2 +- src/vs/workbench/common/theme.ts | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json index 85f1403140712..a3c892a04034c 100644 --- a/extensions/theme-abyss/themes/abyss-color-theme.json +++ b/extensions/theme-abyss/themes/abyss-color-theme.json @@ -369,7 +369,7 @@ // "activityBarForeground": "", "activityBarBadgeBackground": "#0063a5", // "activityBarBadgeForeground": "", - "activityBarDragAndDropBackground": "#25375daa", + // "activityBarDragAndDropBackground": "#25375daa", // Workbench: Panel // "panelBackground": "", diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index 63a31ddf13cd8..0b321812e0c06 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -404,7 +404,7 @@ // Workbench: Activity Bar "activityBarBackground": "#003847", - "activityBarDragAndDropBackground": "#00212B", + // "activityBarDragAndDropBackground": "#00212B", "activityBarBadgeBackground": "#047aa6", // Workbench: Panel diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 1eefe98d8ff3c..53c4747a8f6d1 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -121,8 +121,8 @@ export const PANEL_INACTIVE_TITLE_COLOR = registerColor('panelInactiveTitleForeg }, nls.localize('panelInactiveTitleForeground', "Title color for the inactive panel. Panels are shown below the editor area and contain views like output and integrated terminal.")); export const PANEL_ACTIVE_TITLE_BORDER = registerColor('panelActiveTitleBorder', { - dark: '#404047', - light: '#CCCEDA', + dark: PANEL_BORDER_COLOR, + light: PANEL_BORDER_COLOR, hc: contrastBorder }, nls.localize('panelActiveTitleBorder', "Border color for the active panel title. Panels are shown below the editor area and contain views like output and integrated terminal.")); @@ -189,9 +189,9 @@ export const ACTIVITY_BAR_FOREGROUND = registerColor('activityBarForeground', { }, nls.localize('activityBarForeground', "Activity bar foreground color (e.g. used for the icons). The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); export const ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND = registerColor('activityBarDragAndDropBackground', { - dark: '#403F3F', - light: '#403F3F', - hc: '#403F3F' + dark: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12), + light: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12), + hc: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12), }, nls.localize('activityBarDragAndDropBackground', "Drag and drop feedback color for the activity bar items. The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); export const ACTIVITY_BAR_BADGE_BACKGROUND = registerColor('activityBarBadgeBackground', { From ded96f18e5d45d7c48657dc6bcdc1cfd5c14f407 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 28 Apr 2017 09:00:27 +0200 Subject: [PATCH 0057/2747] :lipstick: --- .../contrib/referenceSearch/browser/referencesWidget.ts | 4 ++-- src/vs/platform/theme/common/colorRegistry.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index b09cc86d280b8..c23aad4e08c50 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -39,7 +39,7 @@ import { EmbeddedCodeEditorWidget } from 'vs/editor/browser/widget/embeddedCodeE import { PeekViewWidget, IPeekViewService } from 'vs/editor/contrib/zoneWidget/browser/peekViewWidget'; import { FileReferences, OneReference, ReferencesModel } from './referencesModel'; import { ITextModelResolverService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; -import { registerColor, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, activeContrastBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { registerThemingParticipant, ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IModelDecorationsChangedEvent } from 'vs/editor/common/model/textModelEvents'; @@ -800,7 +800,7 @@ export class ReferenceWidget extends PeekViewWidget { export const peekViewTitleBackground = registerColor('peekViewTitleBackground', { dark: '#1E1E1E', light: '#FFFFFF', hc: '#0C141F' }, nls.localize('peekViewTitleBackground', 'Background color of the peek view title area.')); export const peekViewTitleForeground = registerColor('peekViewTitleForeground', { dark: '#FFFFFF', light: '#333333', hc: '#FFFFFF' }, nls.localize('peekViewTitleForeground', 'Color of the peek view title.')); export const peekViewTitleInfoForeground = registerColor('peekViewTitleInfoForeground', { dark: '#ccccccb3', light: '#6c6c6cb3', hc: '#FFFFFF99' }, nls.localize('peekViewTitleInfoForeground', 'Color of the peek view title info.')); -export const peekViewBorder = registerColor('peekViewBorder', { dark: '#007acc', light: '#007acc', hc: '#6FC3DF' }, nls.localize('peekViewBorder', 'Color of the peek view borders and arrow.')); +export const peekViewBorder = registerColor('peekViewBorder', { dark: '#007acc', light: '#007acc', hc: contrastBorder }, nls.localize('peekViewBorder', 'Color of the peek view borders and arrow.')); export const peekViewResultsBackground = registerColor('peekViewResultsBackground', { dark: '#252526', light: '#F3F3F3', hc: Color.black }, nls.localize('peekViewResultsBackground', 'Background color of the peek view result list.')); export const peekViewResultsMatchForeground = registerColor('peekViewResultsMatchForeground', { dark: '#bbbbbb', light: '#646465', hc: Color.white }, nls.localize('peekViewResultsMatchForeground', 'Match entry foreground in the peek view result list.')); diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 1e059b278facc..c86e37e4e5a88 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -161,9 +161,9 @@ export const buttonBackground = registerColor('buttonBackground', { dark: '#0E63 export const buttonHoverBackground = registerColor('buttonHoverBackground', { dark: '#006BB3', light: '#006BB3', hc: null }, nls.localize('buttonHoverBackground', "Button background color when hovering.")); export const scrollbarShadow = registerColor('scrollbarShadow', { dark: '#000000', light: '#DDDDDD', hc: null }, nls.localize('scrollbarShadow', "Scrollbar shadow to indicate that the view is scrolled.")); -export const scrollbarSliderBackground = registerColor('scrollbarSliderBackground', { dark: Color.fromHex('#797979').transparent(0.4), light: Color.fromHex('#646464').transparent(0.4), hc: Color.fromHex('#6FC3DF').transparent(0.6) }, nls.localize('scrollbarSliderBackground', "Slider background color.")); -export const scrollbarSliderHoverBackground = registerColor('scrollbarSliderHoverBackground', { dark: Color.fromHex('#646464').transparent(0.7), light: Color.fromHex('#646464').transparent(0.7), hc: Color.fromHex('#6FC3DF').transparent(0.8) }, nls.localize('scrollbarSliderHoverBackground', "Slider background color when hovering.")); -export const scrollbarSliderActiveBackground = registerColor('scrollbarSliderActiveBackground', { dark: Color.fromHex('#BFBFBF').transparent(0.4), light: Color.fromHex('#000000').transparent(0.6), hc: Color.fromHex('#6FC3DF') }, nls.localize('scrollbarSliderActiveBackground', "Slider background color when active.")); +export const scrollbarSliderBackground = registerColor('scrollbarSliderBackground', { dark: Color.fromHex('#797979').transparent(0.4), light: Color.fromHex('#646464').transparent(0.4), hc: Color.fromHex(contrastBorder).transparent(0.6) }, nls.localize('scrollbarSliderBackground', "Slider background color.")); +export const scrollbarSliderHoverBackground = registerColor('scrollbarSliderHoverBackground', { dark: Color.fromHex('#646464').transparent(0.7), light: Color.fromHex('#646464').transparent(0.7), hc: Color.fromHex(contrastBorder).transparent(0.8) }, nls.localize('scrollbarSliderHoverBackground', "Slider background color when hovering.")); +export const scrollbarSliderActiveBackground = registerColor('scrollbarSliderActiveBackground', { dark: Color.fromHex('#BFBFBF').transparent(0.4), light: Color.fromHex('#000000').transparent(0.6), hc: Color.fromHex(contrastBorder) }, nls.localize('scrollbarSliderActiveBackground', "Slider background color when active.")); /** * Editor background color. From cd3a13126774121cad5bb885b414469741f3ab08 Mon Sep 17 00:00:00 2001 From: Christopher Leidigh Date: Fri, 28 Apr 2017 03:04:51 -0400 Subject: [PATCH 0058/2747] Monokai UI theme - first pass for #25327 (#25599) * Monokai UI theme - first pass * Added Dimmed Monokai * Fixed base colors --- extensions/theme-monokai-dimmed/package.json | 2 +- .../themes/dimmed-monokai-color-theme.json | 551 +++++++++++ .../themes/dimmed-monokai.tmTheme | 856 ------------------ extensions/theme-monokai/package.json | 2 +- .../theme-monokai/themes/Monokai.tmTheme | 472 ---------- .../themes/monokai-color-theme.json | 329 +++++++ 6 files changed, 882 insertions(+), 1330 deletions(-) create mode 100644 extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json delete mode 100644 extensions/theme-monokai-dimmed/themes/dimmed-monokai.tmTheme delete mode 100644 extensions/theme-monokai/themes/Monokai.tmTheme create mode 100644 extensions/theme-monokai/themes/monokai-color-theme.json diff --git a/extensions/theme-monokai-dimmed/package.json b/extensions/theme-monokai-dimmed/package.json index c8fd670870591..18ed5256ad8d9 100644 --- a/extensions/theme-monokai-dimmed/package.json +++ b/extensions/theme-monokai-dimmed/package.json @@ -8,7 +8,7 @@ { "label": "Monokai Dimmed", "uiTheme": "vs-dark", - "path": "./themes/dimmed-monokai.tmTheme" + "path": "./themes/dimmed-monokai-color-theme.json" } ] } diff --git a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json new file mode 100644 index 0000000000000..658df0da48a3e --- /dev/null +++ b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json @@ -0,0 +1,551 @@ +{ + "type": "dark", + "colors": { + "foreground": "#ddffff", + "focusedElementOutline": "#00f9ff", + "dropdownBackground": "#383852", + "listInactiveFocusBackground": "#303052", + "listActiveSelectionBackground": "#303050", + "listFocusAndSelectionBackground": "#383852", + "listInactiveSelectionBackground": "#303d45", + "listHoverBackground": "#005070", + "listDropBackground": "#505590", + "buttonBackground": "#5088a3", + "buttonHoverBackground": "#6099a3", + "editorBackground": "#202025", + "editorForeground": "#c5c8c6", + "editorSelection": "#373b41", + "editorLineHighlight": "#303030", + "editorCursor": "#fc5604", + "editorWhitespaces": "#383880", + "editorIndentGuides": "#505037", + "tabsContainerBackground": "#222228", + "activeTabBackground": "#272740", + "inactiveTabBackground": "#333340", + "tabBorder": "#000030", + "panelActiveTitleForeground": "#ddffff", + "statusBarBackground": "#354550", + "activityBarBackground": "#292935", + "activityBarForeground": "#f0f0ff", + "activityBadgeBackground": "#4045b0", + "sideBarBackground": "#232327", + "sideBarSectionHeaderBackground": "#424250", + "notificationsForeground": "#ffe0ff", + "terminalAnsiWhite": "#ddffff" + }, + "tokenColors": [ + { + "settings": { + "background": "#1e1e1e", + "foreground": "#C5C8C6" + } + }, + { + "name": "By uonick", + "settings": { + "background": "#202025ff", + "foreground": "#c5c8c6ff" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "fontStyle": "\n ", + "foreground": "#9A9B99" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9AA83A" + } + }, + { + "name": "String Embedded Source", + "scope": "string source", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#D08442" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#6089B4" + } + }, + { + "name": "Built-in constant", + "scope": "constant.language", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#408080" + } + }, + { + "name": "User-defined constant", + "scope": "constant.character, constant.other", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#8080FF", + "background": "#1e1e1e" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#6089B4" + } + }, + { + "name": "Support", + "scope": "support", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#C7444A" + } + }, + { + "name": "Storage", + "scope": "storage", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9872A2" + } + }, + { + "name": "Class name", + "scope": "entity.name.class, entity.name.type", + "settings": { + "fontStyle": "\n \t\t\t \t", + "foreground": "#9B0000", + "background": "#1E1E1E" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#C7444A" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#CE6700" + } + }, + { + "name": "Function argument", + "scope": "variable.parameter", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#6089B4" + } + }, + { + "name": "Tag name", + "scope": "entity.name.tag", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9872A2" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9872A2" + } + }, + { + "name": "Library function", + "scope": "support.function", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9872A2" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "fontStyle": "\n \t\t\t\t", + "foreground": "#676867" + } + }, + { + "name": "Class Variable", + "scope": "variable.other, variable.js, punctuation.separator.variable", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#6089B4" + } + }, + { + "name": "Language Constant", + "scope": "constant.language", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#FF0080" + } + }, + { + "name": "Meta Brace", + "scope": "punctuation.section.embedded -(source string source punctuation.section.embedded), meta.brace.erb.html", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#008200" + } + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#FF0B00" + } + }, + { + "name": "Normal Variable", + "scope": "variable.other.php, variable.other.normal", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#6089B4" + } + }, + { + "name": "Function Call", + "scope": "meta.function-call", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#0080FF" + } + }, + { + "name": "Function Object", + "scope": "meta.function-call.object", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9872A2" + } + }, + { + "name": "Function Call Variable", + "scope": "variable.other.property", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9872A2" + } + }, + { + "name": "Keyword Control", + "scope": "keyword.control", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9872A2" + } + }, + { + "name": "Tag", + "scope": "meta.tag", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#D0B344" + } + }, + { + "name": "Tag Name", + "scope": "entity.name.tag", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#6089B4" + } + }, + { + "name": "Doctype", + "scope": "meta.doctype, meta.tag.sgml-declaration.doctype, meta.tag.sgml.doctype", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9AA83A" + } + }, + { + "name": "Tag Inline Source", + "scope": "meta.tag.inline source, text.html.php.source", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9AA83A" + } + }, + { + "name": "Tag Other", + "scope": "meta.tag.other, entity.name.tag.style, entity.name.tag.script, meta.tag.block.script, source.js.embedded punctuation.definition.tag.html, source.css.embedded punctuation.definition.tag.html", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9872A2" + } + }, + { + "name": "Tag Attribute", + "scope": "entity.other.attribute-name, meta.tag punctuation.definition.string", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#D0B344" + } + }, + { + "name": "Tag Value", + "scope": "meta.tag string -source -punctuation, text source text meta.tag string -punctuation", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#6089B4" + } + }, + { + "name": "Meta Brace", + "scope": "punctuation.section.embedded -(source string source punctuation.section.embedded), meta.brace.erb.html", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#D0B344" + } + }, + { + "name": "HTML ID", + "scope": "meta.toc-list.id", + "settings": { + "foreground": "#9AA83A" + } + }, + { + "name": "HTML String", + "scope": "string.quoted.double.html, punctuation.definition.string.begin.html, punctuation.definition.string.end.html", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9AA83A" + } + }, + { + "name": "HTML Tags", + "scope": "punctuation.definition.tag.html, punctuation.definition.tag.begin, punctuation.definition.tag.end", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#6089B4" + } + }, + { + "name": "CSS ID", + "scope": "meta.selector.css entity.other.attribute-name.id", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9872A2" + } + }, + { + "name": "CSS Property Name", + "scope": "support.type.property-name.css", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#676867" + } + }, + { + "name": "CSS Property Value", + "scope": "meta.property-group support.constant.property-value.css, meta.property-value support.constant.property-value.css", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#C7444A" + } + }, + { + "name": "JavaScript Variable", + "scope": "variable.language.js", + "settings": { + "foreground": "#CC555A" + } + }, + { + "name": "PHP Function Call", + "scope": "meta.function-call.object.php", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#D0B344" + } + }, + { + "name": "PHP Single Quote HMTL Fix", + "scope": "punctuation.definition.string.end.php, punctuation.definition.string.begin.php", + "settings": { + "foreground": "#9AA83A" + } + }, + { + "name": "PHP Parenthesis HMTL Fix", + "scope": "source.php.embedded.line.html", + "settings": { + "foreground": "#676867" + } + }, + { + "name": "PHP Punctuation Embedded", + "scope": "punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#D08442" + } + }, + { + "name": "Ruby Symbol", + "scope": "constant.other.symbol.ruby", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#9AA83A" + } + }, + { + "name": "Ruby Variable", + "scope": "variable.language.ruby", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#D0B344" + } + }, + { + "name": "Ruby Special Method", + "scope": "keyword.other.special-method.ruby", + "settings": { + "fontStyle": "\n \t\t\t", + "foreground": "#D9B700" + } + }, + { + "name": "Ruby Embedded Source", + "scope": "source.ruby.embedded.source", + "settings": { + "foreground": "#D08442" + } + }, + { + "name": "SQL", + "scope": "keyword.other.DML.sql", + "settings": { + "fontStyle": "\n \t\t\t\t", + "foreground": "#D0B344" + } + }, + { + "name": "diff: header", + "scope": "meta.diff, meta.diff.header", + "settings": { + "background": "#b58900", + "fontStyle": "italic", + "foreground": "#E0EDDD" + } + }, + { + "name": "diff: deleted", + "scope": "markup.deleted", + "settings": { + "background": "#eee8d5", + "fontStyle": "", + "foreground": "#dc322f" + } + }, + { + "name": "diff: changed", + "scope": "markup.changed", + "settings": { + "background": "#eee8d5", + "fontStyle": "", + "foreground": "#cb4b16" + } + }, + { + "name": "diff: inserted", + "scope": "markup.inserted", + "settings": { + "background": "#eee8d5", + "foreground": "#219186" + } + }, + { + "name": "Markup Quote", + "scope": "markup.quote", + "settings": { + "foreground": "#9872A2" + } + }, + { + "name": "Markup Lists", + "scope": "markup.list", + "settings": { + "foreground": "#9AA83A" + } + }, + { + "name": "Markup Styling", + "scope": "markup.bold, markup.italic", + "settings": { + "foreground": "#6089B4" + } + }, + { + "name": "Markup Inline", + "scope": "markup.inline.raw", + "settings": { + "fontStyle": "", + "foreground": "#FF0080" + } + }, + { + "name": "Markup Headings", + "scope": "markup.heading", + "settings": { + "foreground": "#D0B344" + } + }, + { + "name": "Markup Setext Header", + "scope": "markup.heading.setext", + "settings": { + "fontStyle": "", + "foreground": "#D0B344" + } + }, + { + "scope": "token.info-token", + "settings": { + "foreground": "#6796e6" + } + }, + { + "scope": "token.warn-token", + "settings": { + "foreground": "#cd9731" + } + }, + { + "scope": "token.error-token", + "settings": { + "foreground": "#f44747" + } + }, + { + "scope": "token.debug-token", + "settings": { + "foreground": "#b267e6" + } + } + ] +} \ No newline at end of file diff --git a/extensions/theme-monokai-dimmed/themes/dimmed-monokai.tmTheme b/extensions/theme-monokai-dimmed/themes/dimmed-monokai.tmTheme deleted file mode 100644 index 5c542a4394ea3..0000000000000 --- a/extensions/theme-monokai-dimmed/themes/dimmed-monokai.tmTheme +++ /dev/null @@ -1,856 +0,0 @@ - - - - author - uonick - comment - Dimmed - Monokai - name - Dimmed - Monokai - settings - - - settings - - background - #1e1e1e - caret - #fc5604 - foreground - #C5C8C6 - invisibles - #4B4E55 - lineHighlight - #282A2E - selection - #373B41 - - - - name - By uonick - settings - - - - - name - Comment - scope - comment - settings - - fontStyle - - - foreground - #9A9B99 - - - - name - String - scope - string - settings - - fontStyle - - - foreground - #9AA83A - - - - name - String Embedded Source - scope - string source - settings - - fontStyle - - - foreground - #D08442 - - - - name - Number - scope - constant.numeric - settings - - fontStyle - - - foreground - #6089B4 - - - - name - Built-in constant - scope - constant.language - settings - - fontStyle - - - foreground - #408080 - - - - name - User-defined constant - scope - constant.character, constant.other - settings - - fontStyle - - - foreground - #8080FF - background - #1e1e1e - - - - name - Keyword - scope - keyword - settings - - fontStyle - - - foreground - #6089B4 - - - - name - Support - scope - support - settings - - fontStyle - - - foreground - #C7444A - - - - name - Storage - scope - storage - settings - - fontStyle - - - foreground - #9872A2 - - - - name - Class name - scope - entity.name.class, entity.name.type - settings - - fontStyle - - - foreground - #9B0000 - background - #1E1E1E - - - - name - Inherited class - scope - entity.other.inherited-class - settings - - fontStyle - - - foreground - #C7444A - - - - name - Function name - scope - entity.name.function - settings - - fontStyle - - - foreground - #CE6700 - - - - name - Function argument - scope - variable.parameter - settings - - fontStyle - - - foreground - #6089B4 - - - - name - Tag name - scope - entity.name.tag - settings - - fontStyle - - - foreground - #9872A2 - - - - name - Tag attribute - scope - entity.other.attribute-name - settings - - fontStyle - - - foreground - #9872A2 - - - - name - Library function - scope - support.function - settings - - fontStyle - - - foreground - #9872A2 - - - - name - Keyword - scope - keyword - settings - - fontStyle - - - foreground - #676867 - - - - name - Class Variable - scope - variable.other, variable.js, punctuation.separator.variable - settings - - fontStyle - - - foreground - #6089B4 - - - - name - Language Constant - scope - constant.language - settings - - fontStyle - - - foreground - #FF0080 - - - - name - Meta Brace - scope - punctuation.section.embedded -(source string source punctuation.section.embedded), meta.brace.erb.html - settings - - fontStyle - - - foreground - #008200 - - - - name - Invalid - scope - invalid - settings - - fontStyle - - - foreground - #FF0B00 - - - - name - Normal Variable - scope - variable.other.php, variable.other.normal - settings - - fontStyle - - - foreground - #6089B4 - - - - name - Function Call - scope - meta.function-call - settings - - fontStyle - - - foreground - #0080FF - - - - name - Function Object - scope - meta.function-call.object - settings - - fontStyle - - - foreground - #9872A2 - - - - name - Function Call Variable - scope - variable.other.property - settings - - fontStyle - - - foreground - #9872A2 - - - - name - Keyword Control - scope - keyword.control - settings - - fontStyle - - - foreground - #9872A2 - - - - name - Tag - scope - meta.tag - settings - - fontStyle - - - foreground - #D0B344 - - - - name - Tag Name - scope - entity.name.tag - settings - - fontStyle - - - foreground - #6089B4 - - - - name - Doctype - scope - meta.doctype, meta.tag.sgml-declaration.doctype, meta.tag.sgml.doctype - settings - - fontStyle - - - foreground - #9AA83A - - - - name - Tag Inline Source - scope - meta.tag.inline source, text.html.php.source - settings - - fontStyle - - - foreground - #9AA83A - - - - name - Tag Other - scope - meta.tag.other, entity.name.tag.style, entity.name.tag.script, meta.tag.block.script, source.js.embedded punctuation.definition.tag.html, source.css.embedded punctuation.definition.tag.html - settings - - fontStyle - - - foreground - #9872A2 - - - - name - Tag Attribute - scope - entity.other.attribute-name, meta.tag punctuation.definition.string - settings - - fontStyle - - - foreground - #D0B344 - - - - name - Tag Value - scope - meta.tag string -source -punctuation, text source text meta.tag string -punctuation - settings - - fontStyle - - - foreground - #6089B4 - - - - name - Meta Brace - scope - punctuation.section.embedded -(source string source punctuation.section.embedded), meta.brace.erb.html - settings - - fontStyle - - - foreground - #D0B344 - - - - name - HTML ID - scope - meta.toc-list.id - settings - - foreground - #9AA83A - - - - name - HTML String - scope - string.quoted.double.html, punctuation.definition.string.begin.html, punctuation.definition.string.end.html - settings - - fontStyle - - - foreground - #9AA83A - - - - name - HTML Tags - scope - punctuation.definition.tag.html, punctuation.definition.tag.begin, punctuation.definition.tag.end - settings - - fontStyle - - - foreground - #6089B4 - - - - name - CSS ID - scope - meta.selector.css entity.other.attribute-name.id - settings - - fontStyle - - - foreground - #9872A2 - - - - name - CSS Property Name - scope - support.type.property-name.css - settings - - fontStyle - - - foreground - #676867 - - - - name - CSS Property Value - scope - meta.property-group support.constant.property-value.css, meta.property-value support.constant.property-value.css - settings - - fontStyle - - - foreground - #C7444A - - - - name - JavaScript Variable - scope - variable.language.js - settings - - foreground - #CC555A - - - - name - PHP Function Call - scope - meta.function-call.object.php - settings - - fontStyle - - - foreground - #D0B344 - - - - name - PHP Single Quote HMTL Fix - scope - punctuation.definition.string.end.php, punctuation.definition.string.begin.php - settings - - foreground - #9AA83A - - - - name - PHP Parenthesis HMTL Fix - scope - source.php.embedded.line.html - settings - - foreground - #676867 - - - - name - PHP Punctuation Embedded - scope - punctuation.section.embedded.begin.php, punctuation.section.embedded.end.php - settings - - fontStyle - - - foreground - #D08442 - - - - name - Ruby Symbol - scope - constant.other.symbol.ruby - settings - - fontStyle - - - foreground - #9AA83A - - - - name - Ruby Variable - scope - variable.language.ruby - settings - - fontStyle - - - foreground - #D0B344 - - - - name - Ruby Special Method - scope - keyword.other.special-method.ruby - settings - - fontStyle - - - foreground - #D9B700 - - - - name - Ruby Embedded Source - scope - source.ruby.embedded.source - settings - - foreground - #D08442 - - - - name - SQL - scope - keyword.other.DML.sql - settings - - fontStyle - - - foreground - #D0B344 - - - - name - diff: header - scope - meta.diff, meta.diff.header - settings - - background - #b58900 - fontStyle - italic - foreground - #E0EDDD - - - - name - diff: deleted - scope - markup.deleted - settings - - background - #eee8d5 - fontStyle - - foreground - #dc322f - - - - name - diff: changed - scope - markup.changed - settings - - background - #eee8d5 - fontStyle - - foreground - #cb4b16 - - - - name - diff: inserted - scope - markup.inserted - settings - - background - #eee8d5 - foreground - #219186 - - - - name - Markup Quote - scope - markup.quote - settings - - foreground - #9872A2 - - - - name - Markup Lists - scope - markup.list - settings - - foreground - #9AA83A - - - - name - Markup Styling - scope - markup.bold, markup.italic - settings - - foreground - #6089B4 - - - - name - Markup Inline - scope - markup.inline.raw - settings - - fontStyle - - foreground - #FF0080 - - - - name - Markup Headings - scope - markup.heading - settings - - foreground - #D0B344 - - - - name - Markup Setext Header - scope - markup.heading.setext - settings - - fontStyle - - foreground - #D0B344 - - - - - - diff --git a/extensions/theme-monokai/package.json b/extensions/theme-monokai/package.json index 42d625293576a..4e4fdd358b7f1 100644 --- a/extensions/theme-monokai/package.json +++ b/extensions/theme-monokai/package.json @@ -8,7 +8,7 @@ { "label": "Monokai", "uiTheme": "vs-dark", - "path": "./themes/Monokai.tmTheme" + "path": "./themes/monokai-color-theme.json" } ] } diff --git a/extensions/theme-monokai/themes/Monokai.tmTheme b/extensions/theme-monokai/themes/Monokai.tmTheme deleted file mode 100644 index 81c05dcb79f2c..0000000000000 --- a/extensions/theme-monokai/themes/Monokai.tmTheme +++ /dev/null @@ -1,472 +0,0 @@ - - - - - name - Monokai - settings - - - settings - - background - #272822 - caret - #F8F8F0 - foreground - #F8F8F2 - invisibles - #3B3A32 - lineHighlight - #3E3D32 - selection - #49483E - findHighlight - #FFE792 - findHighlightForeground - #000000 - selectionBorder - #222218 - activeGuide - #9D550FB0 - guide - #48473E - - bracketsForeground - #F8F8F2A5 - bracketsOptions - underline - - bracketContentsForeground - #F8F8F2A5 - bracketContentsOptions - underline - - tagsOptions - stippled_underline - - - - name - Comment - scope - comment - settings - - foreground - #75715E - - - - name - String - scope - string - settings - - foreground - #E6DB74 - - - - name - Template Definition - scope - punctuation.definition.template-expression - settings - - foreground - #F92672 - - - - name - Number - scope - constant.numeric - settings - - foreground - #AE81FF - - - - - name - Built-in constant - scope - constant.language - settings - - foreground - #AE81FF - - - - name - User-defined constant - scope - constant.character, constant.other - settings - - foreground - #AE81FF - - - - name - Variable - scope - variable - settings - - fontStyle - - - - - name - Keyword - scope - keyword - settings - - foreground - #F92672 - - - - name - Storage - scope - storage - settings - - fontStyle - - foreground - #F92672 - - - - name - Storage type - scope - storage.type - settings - - fontStyle - italic - foreground - #66D9EF - - - - name - Class name - scope - entity.name.type, entity.name.class - settings - - fontStyle - underline - foreground - #A6E22E - - - - name - Inherited class - scope - entity.other.inherited-class - settings - - fontStyle - italic underline - foreground - #A6E22E - - - - name - Function name - scope - entity.name.function - settings - - fontStyle - - foreground - #A6E22E - - - - name - Function argument - scope - variable.parameter - settings - - fontStyle - italic - foreground - #FD971F - - - - name - Tag name - scope - entity.name.tag - settings - - fontStyle - - foreground - #F92672 - - - - name - Tag attribute - scope - entity.other.attribute-name - settings - - fontStyle - - foreground - #A6E22E - - - - name - Library function - scope - support.function - settings - - fontStyle - - foreground - #66D9EF - - - - name - Library constant - scope - support.constant - settings - - fontStyle - - foreground - #66D9EF - - - - name - Library class/type - scope - support.type, support.class - settings - - fontStyle - italic - foreground - #66D9EF - - - - name - Library variable - scope - support.other.variable - settings - - fontStyle - - - - - name - Invalid - scope - invalid - settings - - background - #F92672 - fontStyle - - foreground - #F8F8F0 - - - - name - Invalid deprecated - scope - invalid.deprecated - settings - - background - #AE81FF - foreground - #F8F8F0 - - - - name - JSON String - scope - meta.structure.dictionary.json string.quoted.double.json - settings - - foreground - #CFCFC2 - - - - - name - diff.header - scope - meta.diff, meta.diff.header - settings - - foreground - #75715E - - - - name - diff.deleted - scope - markup.deleted - settings - - foreground - #F92672 - - - - name - diff.inserted - scope - markup.inserted - settings - - foreground - #A6E22E - - - - name - diff.changed - scope - markup.changed - settings - - foreground - #E6DB74 - - - - - scope - constant.numeric.line-number.find-in-files - match - settings - - foreground - #AE81FFA0 - - - - scope - entity.name.filename.find-in-files - settings - - foreground - #E6DB74 - - - - - name - Markup Quote - scope - markup.quote - settings - - foreground - #F92672 - - - - name - Markup Lists - scope - markup.list - settings - - foreground - #E6DB74 - - - - name - Markup Styling - scope - markup.bold, markup.italic - settings - - foreground - #66D9EF - - - - name - Markup Inline - scope - markup.inline.raw - settings - - fontStyle - - foreground - #FD971F - - - - name - Markup Headings - scope - markup.heading - settings - - foreground - #A6E22E - - - - name - Markup Setext Header - scope - markup.heading.setext - settings - - fontStyle - - foreground - #A6E22E - - - - - - uuid - D8D5E82E-3D5B-46B5-B38E-8C841C21347D - - diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json new file mode 100644 index 0000000000000..091c27726a520 --- /dev/null +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -0,0 +1,329 @@ +{ + "type": "dark", + "colors": { + "foreground": "#ddffff", + "focusBorder": "#00f9ff", + "dropdownBackground": "#383852", + "listInactiveFocusBackground": "#303052", + "listActiveSelectionBackground": "#303070", + "listFocusBackground": "#394770", + "listFocusAndSelectionBackground": "#383852", + "listInactiveSelectionBackground": "#303d45", + "listHoverBackground": "#005070", + "listDropBackground": "#505590", + "buttonBackground": "#5088a3", + "buttonHoverBackground": "#6099a3", + "editorBackground": "#202025", + "editorForeground": "#f8f8f2", + "editorSelection": "#49483e", + "editorLineHighlight": "#303030", + "editorCursor": "#f8f8f0", + "editorWhitespaces": "#383880", + "editorIndentGuides": "#505037", + "tabsContainerBackground": "#222228", + "tabActiveBackground": "#272740", + "tabInactiveBackground": "#333340", + "tabBorder": "#000030", + "panelActiveTitleForeground": "#ddffff", + "statusBarBackground": "#354550", + "activityBarBackground": "#292935", + "activityBarBadgeForeground": "#ffffff", + "activityBarBadgeBackground": "#3655b5", + "sideBarBackground": "#232327", + "sideBarSectionHeaderBackground": "#424250", + "notificationsForeground": "#ffe0ff", + "terminalAnsiWhite": "#ddffff" + + }, + "tokenColors": [ + { + "settings": { + "background": "#272822", + "foreground": "#F8F8F2" + } + }, + { + "name": "Comment", + "scope": "comment", + "settings": { + "foreground": "#75715E" + } + }, + { + "name": "String", + "scope": "string", + "settings": { + "foreground": "#E6DB74" + } + }, + { + "name": "Template Definition", + "scope": "punctuation.definition.template-expression", + "settings": { + "foreground": "#F92672" + } + }, + { + "name": "Number", + "scope": "constant.numeric", + "settings": { + "foreground": "#AE81FF" + } + }, + { + "name": "Built-in constant", + "scope": "constant.language", + "settings": { + "foreground": "#AE81FF" + } + }, + { + "name": "User-defined constant", + "scope": "constant.character, constant.other", + "settings": { + "foreground": "#AE81FF" + } + }, + { + "name": "Variable", + "scope": "variable", + "settings": { + "fontStyle": "" + } + }, + { + "name": "Keyword", + "scope": "keyword", + "settings": { + "foreground": "#F92672" + } + }, + { + "name": "Storage", + "scope": "storage", + "settings": { + "fontStyle": "", + "foreground": "#F92672" + } + }, + { + "name": "Storage type", + "scope": "storage.type", + "settings": { + "fontStyle": "italic", + "foreground": "#66D9EF" + } + }, + { + "name": "Class name", + "scope": "entity.name.type, entity.name.class", + "settings": { + "fontStyle": "underline", + "foreground": "#A6E22E" + } + }, + { + "name": "Inherited class", + "scope": "entity.other.inherited-class", + "settings": { + "fontStyle": "italic underline", + "foreground": "#A6E22E" + } + }, + { + "name": "Function name", + "scope": "entity.name.function", + "settings": { + "fontStyle": "", + "foreground": "#A6E22E" + } + }, + { + "name": "Function argument", + "scope": "variable.parameter", + "settings": { + "fontStyle": "italic", + "foreground": "#FD971F" + } + }, + { + "name": "Tag name", + "scope": "entity.name.tag", + "settings": { + "fontStyle": "", + "foreground": "#F92672" + } + }, + { + "name": "Tag attribute", + "scope": "entity.other.attribute-name", + "settings": { + "fontStyle": "", + "foreground": "#A6E22E" + } + }, + { + "name": "Library function", + "scope": "support.function", + "settings": { + "fontStyle": "", + "foreground": "#66D9EF" + } + }, + { + "name": "Library constant", + "scope": "support.constant", + "settings": { + "fontStyle": "", + "foreground": "#66D9EF" + } + }, + { + "name": "Library class/type", + "scope": "support.type, support.class", + "settings": { + "fontStyle": "italic", + "foreground": "#66D9EF" + } + }, + { + "name": "Library variable", + "scope": "support.other.variable", + "settings": { + "fontStyle": "" + } + }, + { + "name": "Invalid", + "scope": "invalid", + "settings": { + "background": "#F92672", + "fontStyle": "", + "foreground": "#F8F8F0" + } + }, + { + "name": "Invalid deprecated", + "scope": "invalid.deprecated", + "settings": { + "background": "#AE81FF", + "foreground": "#F8F8F0" + } + }, + { + "name": "JSON String", + "scope": "meta.structure.dictionary.json string.quoted.double.json", + "settings": { + "foreground": "#CFCFC2" + } + }, + { + "name": "diff.header", + "scope": "meta.diff, meta.diff.header", + "settings": { + "foreground": "#75715E" + } + }, + { + "name": "diff.deleted", + "scope": "markup.deleted", + "settings": { + "foreground": "#F92672" + } + }, + { + "name": "diff.inserted", + "scope": "markup.inserted", + "settings": { + "foreground": "#A6E22E" + } + }, + { + "name": "diff.changed", + "scope": "markup.changed", + "settings": { + "foreground": "#E6DB74" + } + }, + { + "scope": "constant.numeric.line-number.find-in-files - match", + "settings": { + "foreground": "#AE81FFA0" + } + }, + { + "scope": "entity.name.filename.find-in-files", + "settings": { + "foreground": "#E6DB74" + } + }, + { + "name": "Markup Quote", + "scope": "markup.quote", + "settings": { + "foreground": "#F92672" + } + }, + { + "name": "Markup Lists", + "scope": "markup.list", + "settings": { + "foreground": "#E6DB74" + } + }, + { + "name": "Markup Styling", + "scope": "markup.bold, markup.italic", + "settings": { + "foreground": "#66D9EF" + } + }, + { + "name": "Markup Inline", + "scope": "markup.inline.raw", + "settings": { + "fontStyle": "", + "foreground": "#FD971F" + } + }, + { + "name": "Markup Headings", + "scope": "markup.heading", + "settings": { + "foreground": "#A6E22E" + } + }, + { + "name": "Markup Setext Header", + "scope": "markup.heading.setext", + "settings": { + "fontStyle": "", + "foreground": "#A6E22E" + } + }, + { + "scope": "token.info-token", + "settings": { + "foreground": "#6796e6" + } + }, + { + "scope": "token.warn-token", + "settings": { + "foreground": "#cd9731" + } + }, + { + "scope": "token.error-token", + "settings": { + "foreground": "#f44747" + } + }, + { + "scope": "token.debug-token", + "settings": { + "foreground": "#b267e6" + } + } + ] +} \ No newline at end of file From 2a202d165a9bcc4a1c1720bd4f9f1f42a348ab57 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 28 Apr 2017 09:07:40 +0200 Subject: [PATCH 0059/2747] :lipstick: --- .../themes/dimmed-monokai-color-theme.json | 11 +++++------ .../theme-monokai/themes/monokai-color-theme.json | 5 ++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json index 658df0da48a3e..7c6842a0d33e8 100644 --- a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json +++ b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json @@ -1,10 +1,9 @@ { "type": "dark", "colors": { - "foreground": "#ddffff", - "focusedElementOutline": "#00f9ff", + // "foreground": "#ddffff", + // "focusBorder": "#00f9ff", "dropdownBackground": "#383852", - "listInactiveFocusBackground": "#303052", "listActiveSelectionBackground": "#303050", "listFocusAndSelectionBackground": "#383852", "listInactiveSelectionBackground": "#303d45", @@ -20,14 +19,14 @@ "editorWhitespaces": "#383880", "editorIndentGuides": "#505037", "tabsContainerBackground": "#222228", - "activeTabBackground": "#272740", - "inactiveTabBackground": "#333340", + "tabActiveBackground": "#272740", + "tabInactiveBackground": "#333340", "tabBorder": "#000030", "panelActiveTitleForeground": "#ddffff", "statusBarBackground": "#354550", "activityBarBackground": "#292935", "activityBarForeground": "#f0f0ff", - "activityBadgeBackground": "#4045b0", + "activityBarBadgeBackground": "#4045b0", "sideBarBackground": "#232327", "sideBarSectionHeaderBackground": "#424250", "notificationsForeground": "#ffe0ff", diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index 091c27726a520..fa6da417331c2 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -1,10 +1,9 @@ { "type": "dark", "colors": { - "foreground": "#ddffff", - "focusBorder": "#00f9ff", + // "foreground": "#ddffff", + // "focusBorder": "#00f9ff", "dropdownBackground": "#383852", - "listInactiveFocusBackground": "#303052", "listActiveSelectionBackground": "#303070", "listFocusBackground": "#394770", "listFocusAndSelectionBackground": "#383852", From a6db6bb4401b7884b539a2bd05cd7f79fdac4cd5 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 28 Apr 2017 09:58:23 +0200 Subject: [PATCH 0060/2747] HTML format selection formatting entire line issue. Fixes #25521 --- extensions/html/server/src/modes/formatting.ts | 16 +++++++++++++++- .../html/server/src/test/formatting.test.ts | 4 ++++ extensions/html/server/src/utils/strings.ts | 5 ++++- 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/extensions/html/server/src/modes/formatting.ts b/extensions/html/server/src/modes/formatting.ts index 3c39a703b5941..54bbcd2577297 100644 --- a/extensions/html/server/src/modes/formatting.ts +++ b/extensions/html/server/src/modes/formatting.ts @@ -5,13 +5,27 @@ 'use strict'; import { applyEdits } from '../utils/edits'; -import { TextDocument, Range, TextEdit, FormattingOptions } from 'vscode-languageserver-types'; +import { TextDocument, Range, TextEdit, FormattingOptions, Position } from 'vscode-languageserver-types'; import { LanguageModes } from './languageModes'; import { pushAll } from '../utils/arrays'; +import { isEOL } from '../utils/strings'; export function format(languageModes: LanguageModes, document: TextDocument, formatRange: Range, formattingOptions: FormattingOptions, enabledModes: { [mode: string]: boolean }) { let result: TextEdit[] = []; + let endPos = formatRange.end; + let endOffset = document.offsetAt(endPos); + let content = document.getText(); + if (endPos.character === 0 && endPos.line > 0 && endOffset !== content.length) { + // if selection ends after a new line, exclude that new line + let prevLineStart = document.offsetAt(Position.create(endPos.line - 1, 0)); + while (isEOL(content, endOffset - 1) && endOffset > prevLineStart) { + endOffset--; + } + formatRange = Range.create(formatRange.start, document.positionAt(endOffset)); + } + + // run the html formatter on the full range and pass the result content to the embedded formatters. // from the final content create a single edit // advantages of this approach are diff --git a/extensions/html/server/src/test/formatting.test.ts b/extensions/html/server/src/test/formatting.test.ts index 81fc9954ab334..ea4ecf3315304 100644 --- a/extensions/html/server/src/test/formatting.test.ts +++ b/extensions/html/server/src/test/formatting.test.ts @@ -103,6 +103,10 @@ suite('HTML Embedded Formatting', () => { assertFormat('\n ', '\n '); }); + test('Range after new line', function (): any { + assertFormat('\n |\n|', '\n \n'); + }); + }); function applyEdits(document: TextDocument, edits: TextEdit[]): string { diff --git a/extensions/html/server/src/utils/strings.ts b/extensions/html/server/src/utils/strings.ts index f04a5744fab78..7540468238793 100644 --- a/extensions/html/server/src/utils/strings.ts +++ b/extensions/html/server/src/utils/strings.ts @@ -57,9 +57,12 @@ export function isWhitespaceOnly(str: string) { return /^\s*$/.test(str); } +export function isEOL(content: string, offset: number) { + return isNewlineCharacter(content.charCodeAt(offset)); +} const CR = '\r'.charCodeAt(0); const NL = '\n'.charCodeAt(0); -function isNewlineCharacter(charCode: number) { +export function isNewlineCharacter(charCode: number) { return charCode === CR || charCode === NL; } \ No newline at end of file From 43d8c397fa3a4aa01a25ced6e868e1e8f0891094 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 28 Apr 2017 10:45:15 +0200 Subject: [PATCH 0061/2747] fix #25578 --- src/vs/workbench/parts/files/browser/files.contribution.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/files/browser/files.contribution.ts b/src/vs/workbench/parts/files/browser/files.contribution.ts index a383c9702d071..f65444bfadbc0 100644 --- a/src/vs/workbench/parts/files/browser/files.contribution.ts +++ b/src/vs/workbench/parts/files/browser/files.contribution.ts @@ -270,8 +270,8 @@ configurationRegistry.registerConfiguration({ 'default': HotExitConfiguration.ON_EXIT, 'enumDescriptions': [ nls.localize('hotExit.off', 'Disable hot exit.'), - nls.localize('hotExit.onExit', 'Hot exit will be triggered when the application is closed, that is when the last window is closed on Windows/Linux or when the workbench.action.quit command is triggered (command pallete, keybinding, menu). All windows with backups will be restored upon next launch.'), - nls.localize('hotExit.onExitAndWindowClose', 'Hot exit will be triggered when the application is closed, that is when the last window is closed on Windows/Linux or when the workbench.action.quit command is triggered (command pallete, keybinding, menu), and also for any window with a folder opened regardless of whether it\'s the last window. All windows without folders opened will be restored upon next launch. To restore folder windows as they were before shutdown set "window.reopenFolders" to "all".') + nls.localize('hotExit.onExit', 'Hot exit will be triggered when the application is closed, that is when the last window is closed on Windows/Linux or when the workbench.action.quit command is triggered (command palette, keybinding, menu). All windows with backups will be restored upon next launch.'), + nls.localize('hotExit.onExitAndWindowClose', 'Hot exit will be triggered when the application is closed, that is when the last window is closed on Windows/Linux or when the workbench.action.quit command is triggered (command palette, keybinding, menu), and also for any window with a folder opened regardless of whether it\'s the last window. All windows without folders opened will be restored upon next launch. To restore folder windows as they were before shutdown set "window.reopenFolders" to "all".') ], 'description': nls.localize('hotExit', "Controls whether unsaved files are remembered between sessions, allowing the save prompt when exiting the editor to be skipped.", HotExitConfiguration.ON_EXIT, HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE) }, From f8ea7320cffc3ffda49c877e3f71fd86427a114b Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 28 Apr 2017 11:02:17 +0200 Subject: [PATCH 0062/2747] re-enable removal of duplicated helpers --- build/lib/bundle.js | 4 ++-- build/lib/bundle.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/lib/bundle.js b/build/lib/bundle.js index 4046bdcb5c61f..8914c89c91977 100644 --- a/build/lib/bundle.js +++ b/build/lib/bundle.js @@ -116,7 +116,7 @@ function emitEntryPoints(modules, entryPoints) { }); return { // TODO@TS 2.1.2 - files: extractStrings(/*removeDuplicateTSBoilerplate(*/ result /*)*/), + files: extractStrings(removeDuplicateTSBoilerplate(result)), bundleData: bundleData }; } @@ -208,7 +208,7 @@ function extractStrings(destFiles) { function removeDuplicateTSBoilerplate(destFiles) { // Taken from typescript compiler => emitFiles var BOILERPLATE = [ - { start: /^var __extends/, end: /^};$/ }, + { start: /^var __extends/, end: /^}\)\(\);$/ }, { start: /^var __assign/, end: /^};$/ }, { start: /^var __decorate/, end: /^};$/ }, { start: /^var __metadata/, end: /^};$/ }, diff --git a/build/lib/bundle.ts b/build/lib/bundle.ts index 748acd6e30841..99023978ecc25 100644 --- a/build/lib/bundle.ts +++ b/build/lib/bundle.ts @@ -227,7 +227,7 @@ function emitEntryPoints(modules: IBuildModuleInfo[], entryPoints: IEntryPointMa return { // TODO@TS 2.1.2 - files: extractStrings(/*removeDuplicateTSBoilerplate(*/result/*)*/), + files: extractStrings(removeDuplicateTSBoilerplate(result)), bundleData: bundleData }; } @@ -329,7 +329,7 @@ function extractStrings(destFiles: IConcatFile[]): IConcatFile[] { function removeDuplicateTSBoilerplate(destFiles: IConcatFile[]): IConcatFile[] { // Taken from typescript compiler => emitFiles let BOILERPLATE = [ - { start: /^var __extends/, end: /^};$/ }, + { start: /^var __extends/, end: /^}\)\(\);$/ }, { start: /^var __assign/, end: /^};$/ }, { start: /^var __decorate/, end: /^};$/ }, { start: /^var __metadata/, end: /^};$/ }, From 247fe98b7eb4ab1051e82d6cfb0fcbedb8c7703e Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 28 Apr 2017 11:31:46 +0200 Subject: [PATCH 0063/2747] :bug: remove text model resolver service promise cache fixes #25580 --- .../common/textModelResolverService.ts | 14 +----- .../test/textModelResolverService.test.ts | 47 +++++++++++++++++-- 2 files changed, 44 insertions(+), 17 deletions(-) diff --git a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts index 5319539ec14bc..c04739698dc89 100644 --- a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts +++ b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts @@ -6,7 +6,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import URI from 'vs/base/common/uri'; -import { first, always } from 'vs/base/common/async'; +import { first } from 'vs/base/common/async'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IModel } from 'vs/editor/common/editorCommon'; import { IDisposable, toDisposable, IReference, ReferenceCollection, ImmortalReference } from 'vs/base/common/lifecycle'; @@ -97,7 +97,6 @@ export class TextModelResolverService implements ITextModelResolverService { _serviceBrand: any; - private promiseCache: { [uri: string]: TPromise> } = Object.create(null); private resourceModelCollection: ResourceModelCollection; constructor( @@ -110,16 +109,7 @@ export class TextModelResolverService implements ITextModelResolverService { } public createModelReference(resource: URI): TPromise> { - const uri = resource.toString(); - let promise = this.promiseCache[uri]; - - if (promise) { - return promise; - } - - promise = this.promiseCache[uri] = this._createModelReference(resource); - - return always(promise, () => delete this.promiseCache[uri]); + return this._createModelReference(resource); } private _createModelReference(resource: URI): TPromise> { diff --git a/src/vs/workbench/services/textmodelResolver/test/textModelResolverService.test.ts b/src/vs/workbench/services/textmodelResolver/test/textModelResolverService.test.ts index 97b08098ec5b8..da8d74b976b5d 100644 --- a/src/vs/workbench/services/textmodelResolver/test/textModelResolverService.test.ts +++ b/src/vs/workbench/services/textmodelResolver/test/textModelResolverService.test.ts @@ -25,7 +25,7 @@ import { once } from 'vs/base/common/event'; class ServiceAccessor { constructor( - @ITextModelResolverService public textModelResolverServie: ITextModelResolverService, + @ITextModelResolverService public textModelResolverService: ITextModelResolverService, @IModelService public modelService: IModelService, @IModeService public modeService: IModeService, @ITextFileService public textFileService: TestTextFileService, @@ -56,7 +56,7 @@ suite('Workbench - TextModelResolverService', () => { }); test('resolve resource', function (done) { - const dispose = accessor.textModelResolverServie.registerTextModelContentProvider('test', { + const dispose = accessor.textModelResolverService.registerTextModelContentProvider('test', { provideTextContent: function (resource: URI): TPromise { if (resource.scheme === 'test') { let modelContent = 'Hello Test'; @@ -93,7 +93,7 @@ suite('Workbench - TextModelResolverService', () => { (accessor.textFileService.models).add(model.getResource(), model); return model.load().then(() => { - return accessor.textModelResolverServie.createModelReference(model.getResource()).then(ref => { + return accessor.textModelResolverService.createModelReference(model.getResource()).then(ref => { const model = ref.object; const editorModel = model.textEditorModel; @@ -116,7 +116,7 @@ suite('Workbench - TextModelResolverService', () => { const input = service.createOrGet(); return input.resolve().then(() => { - return accessor.textModelResolverServie.createModelReference(input.getResource()).then(ref => { + return accessor.textModelResolverService.createModelReference(input.getResource()).then(ref => { const model = ref.object; const editorModel = model.textEditorModel; @@ -128,5 +128,42 @@ suite('Workbench - TextModelResolverService', () => { }); }); - // TODO: add reference tests! + test('even loading documents should be refcounted', async () => { + let resolveModel: Function; + let waitForIt = new TPromise(c => resolveModel = c); + + const disposable = accessor.textModelResolverService.registerTextModelContentProvider('test', { + provideTextContent: async (resource: URI): TPromise => { + await waitForIt; + + let modelContent = 'Hello Test'; + let mode = accessor.modeService.getOrCreateMode('json'); + return accessor.modelService.createModel(modelContent, mode, resource); + } + }); + + const uri = URI.from({ scheme: 'test', authority: null, path: 'thePath' }); + + const modelRefPromise1 = accessor.textModelResolverService.createModelReference(uri); + const modelRefPromise2 = accessor.textModelResolverService.createModelReference(uri); + + resolveModel(); + + const modelRef1 = await modelRefPromise1; + const model1 = modelRef1.object; + const modelRef2 = await modelRefPromise2; + const model2 = modelRef2.object; + const textModel = model1.textEditorModel; + + assert.equal(model1, model2, 'they are the same model'); + assert(!textModel.isDisposed(), 'the text model should not be disposed'); + + modelRef1.dispose(); + assert(!textModel.isDisposed(), 'the text model should still not be disposed'); + + modelRef2.dispose(); + assert(textModel.isDisposed(), 'the text model should finally be disposed'); + + disposable.dispose(); + }); }); \ No newline at end of file From fd6cf5f5f50f7c3180d48ed4a113cc49407ff46b Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 28 Apr 2017 11:42:06 +0200 Subject: [PATCH 0064/2747] fixes #25613 --- test/electron/renderer.html | 7 ++++--- test/electron/renderer.js | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/test/electron/renderer.html b/test/electron/renderer.html index b0a2016994cf9..0c94643debb8d 100644 --- a/test/electron/renderer.html +++ b/test/electron/renderer.html @@ -3,16 +3,17 @@ VSCode Tests - +
- + + - + \ No newline at end of file diff --git a/test/electron/renderer.js b/test/electron/renderer.js index ced9551b27247..0db3db2257a64 100644 --- a/test/electron/renderer.js +++ b/test/electron/renderer.js @@ -66,13 +66,13 @@ function createCoverageReport(opts) { return str.charAt(0).toUpperCase() + str.substr(1); } return str; - }; + } function toLowerDriveLetter(str) { if (/^[A-Z]:/.test(str)) { return str.charAt(0).toLowerCase() + str.substr(1); } return str; - }; + } const REPO_PATH = toUpperDriveLetter(path.join(__dirname, '../..')); const fixPath = function (brokenPath) { From 6546fe5e8783c7984237e385b66db1c167a633e5 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 28 Apr 2017 11:44:57 +0200 Subject: [PATCH 0065/2747] improve error message #24487 --- src/vs/workbench/parts/debug/node/debugAdapter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/node/debugAdapter.ts b/src/vs/workbench/parts/debug/node/debugAdapter.ts index bdbc892b0913b..6926d85d52936 100644 --- a/src/vs/workbench/parts/debug/node/debugAdapter.ts +++ b/src/vs/workbench/parts/debug/node/debugAdapter.ts @@ -183,7 +183,7 @@ export class Adapter { enum: [this.type], description: nls.localize('debugType', "Type of configuration."), pattern: '^(?!node2)', - errorMessage: nls.localize('debugTypeNotRecognised', "This debug type is not recognised. Please install the corresponding debug extension."), + errorMessage: nls.localize('debugTypeNotRecognised', "The debug type is not recoginzed. Make sure that you have a corresponding debug extension installed and that it is enabled."), patternErrorMessage: nls.localize('node2NotSupported', "\"node2\" is no longer supported, use \"node\" instead and set the \"protocol\" attribute to \"inspector\".") }; properties['name'] = { From 0ff44983924e6a0367546be0e20b478564a2f9fd Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 28 Apr 2017 12:57:09 +0200 Subject: [PATCH 0066/2747] :construction_worker: proper IPCRunner, IPCReporter for electron mocha test runner --- test/electron/index.js | 91 ++++++++++++++++++++++++++++++--------- test/electron/renderer.js | 74 ++++++++++++++++++++++++------- 2 files changed, 128 insertions(+), 37 deletions(-) diff --git a/test/electron/index.js b/test/electron/index.js index 3e72fa6391cc1..0337a1421f7d8 100644 --- a/test/electron/index.js +++ b/test/electron/index.js @@ -6,6 +6,9 @@ const { app, BrowserWindow, ipcMain } = require('electron'); const { tmpdir } = require('os'); const { join } = require('path'); +const path = require('path'); +const mocha = require('mocha'); +const events = require('events'); const optimist = require('optimist') .describe('grep', 'only run tests matching ').alias('grep', 'g').alias('grep', 'f').string('grep') @@ -14,6 +17,7 @@ const optimist = require('optimist') .describe('build', 'run with build output (out-build)').boolean('build') .describe('coverage', 'generate coverage report').boolean('coverage') .describe('debug', 'open dev tools, keep window open, reuse app data').string('debug') + .describe('reporter', 'the mocha reporter').string('reporter').default('reporter', 'spec') .describe('help', 'show the help').alias('help', 'h'); const argv = optimist.argv; @@ -27,6 +31,59 @@ if (!argv.debug) { app.setPath('userData', join(tmpdir(), `vscode-tests-${Date.now()}`)); } +function deserializeSuite(suite) { + return { + title: suite.title, + fullTitle: () => suite.fullTitle, + timeout: () => suite.timeout, + retries: () => suite.retries, + enableTimeouts: () => suite.enableTimeouts, + slow: () => suite.slow, + bail: () => suite.bail, + }; +} + +function deserializeRunnable(runnable) { + return { + title: runnable.title, + fullTitle: () => runnable.fullTitle, + async: runnable.async, + slow: () => runnable.slow, + speed: runnable.speed, + duration: runnable.duration + }; +} + +function deserializeError(err) { + const inspect = err.inspect; + err.inspect = () => inspect; + return err; +} + +class IPCRunner extends events.EventEmitter { + + constructor() { + super(); + + this.didFail = false; + + ipcMain.on('start', () => this.emit('start')); + ipcMain.on('end', () => this.emit('end')); + ipcMain.on('suite', (e, suite) => this.emit('suite', deserializeSuite(suite))); + ipcMain.on('suite end', (e, suite) => this.emit('suite end', deserializeSuite(suite))); + ipcMain.on('test', (e, test) => this.emit('test', deserializeRunnable(test))); + ipcMain.on('test end', (e, test) => this.emit('test end', deserializeRunnable(test))); + ipcMain.on('hook', (e, hook) => this.emit('hook', deserializeRunnable(hook))); + ipcMain.on('hook end', (e, hook) => this.emit('hook end', deserializeRunnable(hook))); + ipcMain.on('pass', (e, test) => this.emit('pass', deserializeRunnable(test))); + ipcMain.on('fail', (e, test, err) => { + this.didFail = true; + this.emit('fail', deserializeRunnable(test), deserializeError(err)); + }); + ipcMain.on('pending', (e, test) => this.emit('pending', deserializeRunnable(test))); + } +} + app.on('ready', () => { const win = new BrowserWindow({ @@ -49,28 +106,20 @@ app.on('ready', () => { win.loadURL(`file://${__dirname}/renderer.html`); + const reporterPath = path.join(path.dirname(require.resolve('mocha')), 'lib', 'reporters', argv.reporter); + let Reporter; - const _failures = []; - ipcMain.on('fail', (e, test) => { - _failures.push(test); - process.stdout.write('X'); - }); - ipcMain.on('pass', () => { - process.stdout.write('.'); - }); - - ipcMain.on('done', () => { + try { + Reporter = require(reporterPath); + } catch (err) { + console.warn(`could not load reporter: ${argv.reporter}`); + Reporter = mocha.reporters.Spec; + } - console.log(`\nDone with ${_failures.length} failures.\n`); + const runner = new IPCRunner(); + new Reporter(runner); - for (const fail of _failures) { - console.error(fail.title); - console.error(fail.stack); - console.error('\n'); - } - - if (!argv.debug) { - app.exit(_failures.length > 0 ? 1 : 0); - } - }); + if (!argv.debug) { + ipcMain.on('all done', () => app.exit(runner.didFail ? 1 : 0)); + } }); diff --git a/test/electron/renderer.js b/test/electron/renderer.js index 0db3db2257a64..2142403485169 100644 --- a/test/electron/renderer.js +++ b/test/electron/renderer.js @@ -13,7 +13,6 @@ const minimatch = require('minimatch'); const istanbul = require('istanbul'); const i_remap = require('remap-istanbul/lib/remap'); - let _tests_glob = '**/test/**/*.test.js'; let loader; let _out; @@ -180,6 +179,58 @@ function loadTests(opts) { }); } +function serializeSuite(suite) { + return { + title: suite.title, + fullTitle: suite.fullTitle(), + timeout: suite.timeout(), + retries: suite.retries(), + enableTimeouts: suite.enableTimeouts(), + slow: suite.slow(), + bail: suite.bail() + }; +} + +function serializeRunnable(runnable) { + return { + title: runnable.title, + fullTitle: runnable.fullTitle(), + async: runnable.async, + slow: runnable.slow(), + speed: runnable.speed, + duration: runnable.duration + }; +} + +function serializeError(err) { + return { + message: err.message, + stack: err.stack, + actual: err.actual, + expected: err.expected, + uncaught: err.uncaught, + showDiff: err.showDiff, + inspect: typeof err.inspect === 'function' ? err.inspect() : '' + }; +} + +class IPCReporter { + + constructor(runner) { + runner.on('start', () => ipcRenderer.send('start')); + runner.on('end', () => ipcRenderer.send('end')); + runner.on('suite', suite => ipcRenderer.send('suite', serializeSuite(suite))); + runner.on('suite end', suite => ipcRenderer.send('suite end', serializeSuite(suite))); + runner.on('test', test => ipcRenderer.send('test', serializeRunnable(test))); + runner.on('test end', test => ipcRenderer.send('test end', serializeRunnable(test))); + runner.on('hook', hook => ipcRenderer.send('hook', serializeRunnable(hook))); + runner.on('hook end', hook => ipcRenderer.send('hook end', serializeRunnable(hook))); + runner.on('pass', test => ipcRenderer.send('pass', serializeRunnable(test))); + runner.on('fail', (test, err) => ipcRenderer.send('fail', serializeRunnable(test), serializeError(err))); + runner.on('pending', test => ipcRenderer.send('pending', serializeRunnable(test))); + } +} + function runTests(opts) { return loadTests(opts).then(() => { @@ -188,23 +239,14 @@ function runTests(opts) { mocha.grep(opts.grep); } - const runner = mocha.run(() => { - createCoverageReport(opts).then(() => { - ipcRenderer.send('done'); - }); - }); + if (!opts.debug) { + mocha.reporter(IPCReporter); + } - runner.on('fail', function (test) { - ipcRenderer.send('fail', { - title: test.fullTitle(), - stack: test.err.stack + mocha.run(() => { + createCoverageReport(opts).then(() => { + ipcRenderer.send('all done'); }); - console.error(test.fullTitle()); - console.error(test.err.stack); - }); - - runner.on('pass', function () { - ipcRenderer.send('pass'); }); }); } From 52dd6053f46a709e29b2d1aa1a00038325c8bdf2 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 28 Apr 2017 14:27:35 +0200 Subject: [PATCH 0067/2747] remove console.log (fyi @aeschli) --- extensions/json/client/src/colorDecorators.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/extensions/json/client/src/colorDecorators.ts b/extensions/json/client/src/colorDecorators.ts index 6fecd50facbac..f1caaea3ee1ed 100644 --- a/extensions/json/client/src/colorDecorators.ts +++ b/extensions/json/client/src/colorDecorators.ts @@ -134,7 +134,6 @@ export function activateColorDecorations(decoratorProvider: (uri: string) => The const colorPattern = /^#[0-9A-Fa-f]{3,8}$/; function hex2CSSColor(hex: string): string { - console.log(hex); if (!hex || !colorPattern.test(hex)) { return null; } From 63d89c3ddbca5f4e6ba1439bfc375b50d3cb3bee Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 28 Apr 2017 14:31:42 +0200 Subject: [PATCH 0068/2747] :bug: fixes #25622 --- src/vs/workbench/parts/scm/browser/scmPreview.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/scm/browser/scmPreview.ts b/src/vs/workbench/parts/scm/browser/scmPreview.ts index 591ea6dd6574f..0f2db3ad70a8d 100644 --- a/src/vs/workbench/parts/scm/browser/scmPreview.ts +++ b/src/vs/workbench/parts/scm/browser/scmPreview.ts @@ -16,6 +16,14 @@ import pkg from 'vs/platform/node/package'; // Enable this by default function getDefaultValue(): boolean { + const minorVersion = pkg.version.replace(/^(\d+\.\d+).*$/, '$1'); + const forcedVersion = window.localStorage.getItem('forcedPreviewSCMVersion'); + + if (forcedVersion !== minorVersion) { + window.localStorage.setItem('forcedPreviewSCMVersion', minorVersion); + window.localStorage.setItem('enablePreviewSCM', 'true'); + } + const value = window.localStorage.getItem('enablePreviewSCM'); return value !== 'false'; } @@ -36,7 +44,7 @@ export default class SCMPreview { export class EnableSCMPreviewAction extends Action { static ID = 'enablescmpreview'; - static LABEL = 'Enable Preview SCM'; + static LABEL = 'Disable Legacy Git'; constructor( id = EnableSCMPreviewAction.ID, @@ -63,7 +71,7 @@ export class EnableSCMPreviewAction extends Action { export class DisableSCMPreviewAction extends Action { static ID = 'disablescmpreview'; - static LABEL = 'Disable Preview SCM'; + static LABEL = 'Enable Legacy Git'; constructor( id = DisableSCMPreviewAction.ID, From 7a22d9d318f4fa9be1fa1151ca140167c10238a9 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Fri, 28 Apr 2017 14:37:59 +0200 Subject: [PATCH 0069/2747] node-debug@1.12.14 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index e86050d59b4dd..08a775ce6e633 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -41,7 +41,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.12.13' }, + { name: 'ms-vscode.node-debug', version: '1.12.14' }, { name: 'ms-vscode.node-debug2', version: '1.12.4' } ]; From ccdc5fac2d78d7421aa8f313a2e1444e77056303 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 28 Apr 2017 14:54:40 +0200 Subject: [PATCH 0070/2747] Apply editor foreground color changes to syntax theme. Fixes #25519 --- .../themes/electron-browser/colorThemeData.ts | 69 ++++++++++++------- .../electron-browser/workbenchThemeService.ts | 40 +++++------ 2 files changed, 62 insertions(+), 47 deletions(-) diff --git a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts index 5cd7d5da6aef2..26093f69f5567 100644 --- a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts +++ b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts @@ -19,13 +19,13 @@ import pfs = require('vs/base/node/pfs'); import { Extensions, IColorRegistry, ColorIdentifier, editorBackground, editorForeground } from 'vs/platform/theme/common/colorRegistry'; import { ThemeType } from 'vs/platform/theme/common/themeService'; import { Registry } from 'vs/platform/platform'; -import { WorkbenchThemeService } from "vs/workbench/services/themes/electron-browser/workbenchThemeService"; +import { WorkbenchThemeService, IColorCustomizations } from "vs/workbench/services/themes/electron-browser/workbenchThemeService"; let colorRegistry = Registry.as(Extensions.ColorContribution); export class ColorThemeData implements IColorTheme { - constructor(private themeService: WorkbenchThemeService) { + constructor() { } id: string; @@ -38,20 +38,21 @@ export class ColorThemeData implements IColorTheme { path?: string; extensionData: ExtensionData; colorMap: IColorMap = {}; + customColorMap: IColorMap = {}; public getColor(colorId: ColorIdentifier, useDefault?: boolean): Color { - let customColor = this.themeService.getCustomColor(colorId); - if (customColor) { - return customColor; + let color = this.customColorMap[colorId]; + if (color) { + return color; } - let color = this.colorMap[colorId]; + color = this.colorMap[colorId]; if (useDefault !== false && types.isUndefined(color)) { color = this.getDefault(colorId); } return color; } - private getDefault(colorId: ColorIdentifier): Color { + public getDefault(colorId: ColorIdentifier): Color { return colorRegistry.resolveDefaultColor(colorId, this); } @@ -64,6 +65,22 @@ export class ColorThemeData implements IColorTheme { return color === null ? defaultValue === null : color.equals(defaultValue); } + public setCustomColors(colors: IColorCustomizations) { + this.customColorMap = {}; + for (let id in colors) { + let colorVal = colors[id]; + if (typeof colorVal === 'string') { + let color = Color.fromHex(colorVal, null); + if (color) { + this.customColorMap[id] = color; + } + } + } + if (this.tokenColors) { + updateDefaultRuleSettings(this.tokenColors[0], this); + } + } + public ensureLoaded(themeService: WorkbenchThemeService): TPromise { if (!this.isLoaded) { this.tokenColors = []; @@ -71,7 +88,7 @@ export class ColorThemeData implements IColorTheme { if (this.path) { return _loadColorThemeFromFile(this.path, this.tokenColors, this.colorMap).then(_ => { this.isLoaded = true; - _completeTokenColors(this); + _sanitizeTokenColors(this); }); } } @@ -119,10 +136,10 @@ export class ColorThemeData implements IColorTheme { } } -export function fromStorageData(themeService: WorkbenchThemeService, input: string): ColorThemeData { +export function fromStorageData(input: string): ColorThemeData { try { let data = JSON.parse(input); - let theme = new ColorThemeData(themeService); + let theme = new ColorThemeData(); for (let key in data) { if (key !== 'colorMap') { theme[key] = data[key]; @@ -139,11 +156,11 @@ export function fromStorageData(themeService: WorkbenchThemeService, input: stri } } -export function fromExtensionTheme(themeService: WorkbenchThemeService, theme: IThemeExtensionPoint, normalizedAbsolutePath: string, extensionData: ExtensionData): ColorThemeData { +export function fromExtensionTheme(theme: IThemeExtensionPoint, normalizedAbsolutePath: string, extensionData: ExtensionData): ColorThemeData { let baseTheme = theme['uiTheme'] || 'vs-dark'; let themeSelector = toCSSSelector(extensionData.extensionId + '-' + Paths.normalize(theme.path)); - let themeData = new ColorThemeData(themeService); + let themeData = new ColorThemeData(); themeData.id = `${baseTheme} ${themeSelector}`; themeData.label = theme.label || Paths.basename(theme.path); themeData.settingsId = theme.id || themeData.label; @@ -230,25 +247,31 @@ function _loadSyntaxTokensFromFile(themePath: string, resultRules: ITokenColoriz }); } /** - * Make sure that the token colors contain the default fore and background + * Place the default settings first and add add the token-info rules */ -function _completeTokenColors(theme: ColorThemeData) { +function _sanitizeTokenColors(theme: ColorThemeData) { let hasDefaultTokens = false; + let updatedTokenColors: ITokenColorizationRule[] = [updateDefaultRuleSettings({ settings: {} }, theme)]; theme.tokenColors.forEach(rule => { - if (!rule.scope) { - if (!rule.settings.background) { - rule.settings.background = theme.getColor(editorBackground).toRGBAHex(); - } - if (!rule.settings.foreground) { - rule.settings.foreground = theme.getColor(editorForeground).toRGBAHex(); + if (rule.scope) { + if (rule.scope === 'token.info-token') { + hasDefaultTokens = true; } - } else if (rule.scope === 'token.info-token') { - hasDefaultTokens = true; + updatedTokenColors.push(rule); } }); if (!hasDefaultTokens) { - theme.tokenColors.push(...defaultThemeColors[theme.type]); + updatedTokenColors.push(...defaultThemeColors[theme.type]); } + theme.tokenColors = updatedTokenColors; +} + +function updateDefaultRuleSettings(defaultRule: ITokenColorizationRule, theme: ColorThemeData): ITokenColorizationRule { + let foreground = theme.getColor(editorForeground) || theme.getDefault(editorForeground); + let background = theme.getColor(editorBackground) || theme.getDefault(editorBackground); + defaultRule.settings.foreground = foreground.toRGBAHex(); + defaultRule.settings.background = background.toRGBAHex(); + return defaultRule; } diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index a48ef7f357863..afaaba898f8f9 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -29,7 +29,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import Severity from 'vs/base/common/severity'; import { ColorThemeData, fromStorageData, fromExtensionTheme } from './colorThemeData'; import { ITheme, Extensions as ThemingExtensions, IThemingRegistry } from 'vs/platform/theme/common/themeService'; -import { editorBackground, editorForeground, ColorIdentifier } from 'vs/platform/theme/common/colorRegistry'; +import { editorBackground } from 'vs/platform/theme/common/colorRegistry'; import { $ } from 'vs/base/browser/builder'; import Event, { Emitter } from 'vs/base/common/event'; @@ -39,8 +39,6 @@ import pfs = require('vs/base/node/pfs'); import colorThemeSchema = require('vs/workbench/services/themes/common/colorThemeSchema'); import fileIconThemeSchema = require('vs/workbench/services/themes/common/fileIconThemeSchema'); import { IDisposable } from 'vs/base/common/lifecycle'; -import { Color } from 'vs/base/common/color'; - // implementation @@ -227,13 +225,15 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { extensionData: null }; + this.updateColorCustomizations(false); + let themeData = null; let persistedThemeData = this.storageService.get(PERSISTED_THEME_STORAGE_KEY); if (persistedThemeData) { - themeData = fromStorageData(this, persistedThemeData); + themeData = fromStorageData(persistedThemeData); } if (themeData !== null) { - this.updateColorCustomizations(false); + themeData.setCustomColors(this.colorCustomizations); this.updateDynamicCSSRules(themeData); this.applyTheme(themeData, null, true); } else { @@ -242,18 +242,14 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { // a color theme document with good defaults until the theme is loaded let isLightTheme = (Array.prototype.indexOf.call(document.body.classList, 'vs') >= 0); - let initialTheme = new ColorThemeData(this); + let initialTheme = new ColorThemeData(); initialTheme.id = isLightTheme ? VS_LIGHT_THEME : VS_DARK_THEME; initialTheme.label = ''; initialTheme.selector = isLightTheme ? VS_LIGHT_THEME : VS_DARK_THEME; initialTheme.settingsId = null; initialTheme.isLoaded = false; - initialTheme.tokenColors = [{ - settings: { - foreground: initialTheme.getColor(editorForeground).toRGBAHex(), - background: initialTheme.getColor(editorBackground).toRGBAHex() - } - }]; + initialTheme.tokenColors = [{ settings: {} }]; + initialTheme.setCustomColors(this.colorCustomizations); this.currentColorTheme = initialTheme; } @@ -413,6 +409,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { this.currentColorTheme = themeData; return TPromise.as(themeData); } + themeData.setCustomColors(this.colorCustomizations); this.updateDynamicCSSRules(themeData); return this.applyTheme(themeData, settingsTarget); }, error => { @@ -539,21 +536,16 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { if (this.hasCustomizationChanged(newColorCustomizations, newColorIds)) { this.colorCustomizations = newColorCustomizations; this.numberOfColorCustomizations = newColorIds.length; - if (notify) { - this.updateDynamicCSSRules(this.currentColorTheme); - this.onColorThemeChange.fire(this.currentColorTheme); + if (this.currentColorTheme) { + this.currentColorTheme.setCustomColors(newColorCustomizations); + if (notify) { + this.updateDynamicCSSRules(this.currentColorTheme); + this.onColorThemeChange.fire(this.currentColorTheme); + } } } } - public getCustomColor(id: ColorIdentifier) { - let color = this.colorCustomizations[id]; - if (typeof color === 'string') { - return Color.fromHex(this.colorCustomizations[id], null); - } - return null; - } - private onThemes(extensionFolderPath: string, extensionData: ExtensionData, themes: IThemeExtensionPoint[], collector: ExtensionMessageCollector): void { if (!Array.isArray(themes)) { collector.error(nls.localize( @@ -578,7 +570,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { if (normalizedAbsolutePath.indexOf(Paths.normalize(extensionFolderPath)) !== 0) { collector.warn(nls.localize('invalid.path.1', "Expected `contributes.{0}.path` ({1}) to be included inside extension's folder ({2}). This might make the extension non-portable.", themesExtPoint.name, normalizedAbsolutePath, extensionFolderPath)); } - let themeData = fromExtensionTheme(this, theme, normalizedAbsolutePath, extensionData); + let themeData = fromExtensionTheme(theme, normalizedAbsolutePath, extensionData); this.extensionsColorThemes.push(themeData); colorThemeSettingSchema.enum.push(themeData.settingsId); From ff9f7b3baa6052863b55e8b6ef7c7c94d07beddf Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 28 Apr 2017 15:29:37 +0200 Subject: [PATCH 0071/2747] Consider to use dots instead of camel-case (fixes #25428) (#25621) * Consider to use dots instead of camel-case (fixes #25428) * :lipstick: --- build/npm/update-theme.js | 46 +-- .../theme-abyss/themes/abyss-color-theme.json | 270 +++++++++--------- .../theme-defaults/themes/dark_defaults.json | 10 +- .../themes/hc_black_defaults.json | 6 +- .../theme-defaults/themes/light_defaults.json | 12 +- .../themes/kimbie-dark-color-theme.json | 42 +-- .../themes/dimmed-monokai-color-theme.json | 56 ++-- .../themes/monokai-color-theme.json | 58 ++-- .../themes/quietlight-color-theme.json | 54 ++-- .../theme-red/themes/Red-color-theme.json | 94 +++--- .../themes/solarized-dark-color-theme.json | 258 ++++++++--------- .../themes/solarized-light-color-theme.json | 72 ++--- .../themes/tomorrow-night-blue-theme.json | 88 +++--- .../editor/browser/widget/diffEditorWidget.ts | 8 +- .../editor/common/view/editorColorRegistry.ts | 14 +- .../contrib/gotoError/browser/gotoError.ts | 6 +- src/vs/editor/contrib/hover/browser/hover.ts | 6 +- .../browser/referencesWidget.ts | 28 +- .../contrib/suggest/browser/suggestWidget.ts | 10 +- .../wordHighlighter/common/wordHighlighter.ts | 4 +- src/vs/platform/theme/common/colorRegistry.ts | 100 +++---- src/vs/workbench/common/theme.ts | 78 ++--- .../parts/debug/browser/debugActionsWidget.ts | 2 +- .../parts/debug/browser/exceptionWidget.ts | 4 +- .../statusbarColorProvider.ts | 2 +- .../electron-browser/terminalColorRegistry.ts | 32 +-- 26 files changed, 680 insertions(+), 680 deletions(-) diff --git a/build/npm/update-theme.js b/build/npm/update-theme.js index f4b2d8f3c94ca..c6d1a327b957a 100644 --- a/build/npm/update-theme.js +++ b/build/npm/update-theme.js @@ -10,29 +10,29 @@ var fs = require('fs'); var plist = require('fast-plist'); var mappings = { - "background": ["editorBackground"], - "foreground": ["editorForeground"], - "hoverHighlight": ["editorHoverHighlight"], - "linkForeground": ["editorLinkForeground"], - "selection": ["editorSelection"], - "inactiveSelection": ["editorInactiveSelection"], - "selectionHighlightColor": ["editorSelectionHighlight"], - "wordHighlight": ["editorWordHighlight"], - "wordHighlightStrong": ["editorWordHighlightStrong"], - "findMatchHighlight": ["editorFindMatchHighlight", "peekViewEditorMatchHighlight"], - "currentFindMatchHighlight": ["editorFindMatch"], - "findRangeHighlight": ["editorFindRangeHighlight"], - "referenceHighlight": ["peekViewResultsMatchForeground"], - "lineHighlight": ["editorLineHighlight"], - "rangeHighlight": ["editorRangeHighlight"], - "caret": ["editorCursor"], - "invisibles": ["editorWhitespaces"], - "guide": ["editorIndentGuides"], - "ansiBlack": ["terminalAnsiBlack"], "ansiRed": ["terminalAnsiRed"], "ansiGreen": ["terminalAnsiGreen"], "ansiYellow": ["terminalAnsiYellow"], - "ansiBlue": ["terminalAnsiBlue"], "ansiMagenta": ["terminalAnsiMagenta"], "ansiCyan": ["terminalAnsiCyan"], "ansiWhite": ["terminalAnsiWhite"], - "ansiBrightBlack": ["terminalAnsiBrightBlack"], "ansiBrightRed": ["terminalAnsiBrightRed"], "ansiBrightGreen": ["terminalAnsiBrightGreen"], - "ansiBrightYellow": ["terminalAnsiBrightYellow"], "ansiBrightBlue": ["terminalAnsiBrightBlue"], "ansiBrightMagenta": ["terminalAnsiBrightMagenta"], - "ansiBrightCyan": ["terminalAnsiBrightCyan"], "ansiBrightWhite": ["terminalAnsiBrightWhite"] + "background": ["editor.background"], + "foreground": ["editor.foreground"], + "hoverHighlight": ["editor.hoverHighlightBackground"], + "linkForeground": ["editorLink.foreground"], + "selection": ["editor.selectionBackground"], + "inactiveSelection": ["editor.inactiveSelectionBackground"], + "selectionHighlightColor": ["editor.selectionHighlightBackground"], + "wordHighlight": ["editor.wordHighlightBackground"], + "wordHighlightStrong": ["editor.wordHighlightStrongBackground"], + "findMatchHighlight": ["editor.findMatchHighlightBackground", "peekViewEditor.matchHighlightBackground"], + "currentFindMatchHighlight": ["editor.findMatchBackground"], + "findRangeHighlight": ["editor.findRangeHighlightBackground"], + "referenceHighlight": ["peekViewResult.lineForeground"], + "lineHighlight": ["editor.lineHighlightBackground"], + "rangeHighlight": ["editor.rangeHighlightBackground"], + "caret": ["editorCursor.foreground"], + "invisibles": ["editorWhitespace.foreground"], + "guide": ["editorIndentGuide.background"], + "ansiBlack": ["terminal.ansiBlack"], "ansiRed": ["terminal.ansiRed"], "ansiGreen": ["terminal.ansiGreen"], "ansiYellow": ["terminal.ansiYellow"], + "ansiBlue": ["terminal.ansiBlue"], "ansiMagenta": ["terminal.ansiMagenta"], "ansiCyan": ["terminal.ansiCyan"], "ansiWhite": ["terminal.ansiWhite"], + "ansiBrightBlack": ["terminal.ansiBrightBlack"], "ansiBrightRed": ["terminal.ansiBrightRed"], "ansiBrightGreen": ["terminal.ansiBrightGreen"], + "ansiBrightYellow": ["terminal.ansiBrightYellow"], "ansiBrightBlue": ["terminal.ansiBrightBlue"], "ansiBrightMagenta": ["terminal.ansiBrightMagenta"], + "ansiBrightCyan": ["terminal.ansiBrightCyan"], "ansiBrightWhite": ["terminal.ansiBrightWhite"] }; exports.update = function (srcName, destName) { diff --git a/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json index a3c892a04034c..fc2572ec09f75 100644 --- a/extensions/theme-abyss/themes/abyss-color-theme.json +++ b/extensions/theme-abyss/themes/abyss-color-theme.json @@ -255,173 +255,173 @@ // "foreground": "", "focusBorder": "#596F99", - // "widgetShadow": "", + // "widget.shadow": "", - "inputBoxBackground": "#181f2f", - // "inputBoxBorder": "", - // "inputBoxForeground": "", - "inputBoxActiveOptionBorder": "#1D4A87", - "inputValidationInfoBorder": "#384078", - "inputValidationInfoBackground": "#051336", - "inputValidationWarningBackground": "#5B7E7A", - "inputValidationWarningBorder": "#5B7E7A", - "inputValidationErrorBackground": "#A22D44", - "inputValidationErrorBorder": "#AB395B", + "input.background": "#181f2f", + // "input.border": "", + // "input.foreground": "", + "inputOption.activeBorder": "#1D4A87", + "inputValidation.infoBorder": "#384078", + "inputValidation.infoBackground": "#051336", + "inputValidation.warningBackground": "#5B7E7A", + "inputValidation.warningBorder": "#5B7E7A", + "inputValidation.errorBackground": "#A22D44", + "inputValidation.errorBorder": "#AB395B", - // "dropdownBackground": "#181f2f", - // "dropdownForeground": "", - // "dropdownBorder": "", + // "dropdown.background": "#181f2f", + // "dropdown.foreground": "", + // "dropdown.border": "", - "buttonBackground": "#455064", - "buttonHoverBackground": "#4A5C6B", - // "buttonForeground": "", + "button.background": "#455064", + "button.hoverBackground": "#4A5C6B", + // "button.foreground": "", - "listFocusAndSelectionBackground": "#08286b", - // "listFocusAndSelectionForeground": "", - "listActiveSelectionBackground": "#011B51", - // "listActiveSelectionForeground": "", - "listFocusBackground": "#08286b", - "listHoverBackground": "#041D52", - "listInactiveSelectionBackground": "#152037", - "listDropBackground": "#041D52", - // "listHighlightForeground": "", + "list.focusAndSelectionBackground": "#08286b", + // "list.focusAndSelectionForeground": "", + "list.activeSelectionBackground": "#011B51", + // "list.activeSelectionForeground": "", + "list.focusBackground": "#08286b", + "list.hoverBackground": "#041D52", + "list.inactiveSelectionBackground": "#152037", + "list.dropBackground": "#041D52", + // "list.highlightForeground": "", - "scrollbarShadow": "#515E91AA", - "scrollbarSliderActiveBackground": "#3B3F5188", - "scrollbarSliderBackground": "#1F223088", - "scrollbarSliderHoverBackground": "#3B3F5188", + "scrollbar.shadow": "#515E91AA", + "scrollbarSlider.activeBackground": "#3B3F5188", + "scrollbarSlider.background": "#1F223088", + "scrollbarSlider.hoverBackground": "#3B3F5188", // Editor - "editorBackground": "#000c18", - "editorForeground": "#6688cc", - "editorWidgetBackground": "#262641", - "editorCursor": "#ddbb88", - "editorWhitespaces": "#103050", - "editorLineHighlight": "#082050", - "editorSelection": "#770811", - "editorIndentGuides": "#002952", - "editorHoverBackground": "#000c38", - "editorHoverBorder": "#004c18", - "editorLineNumbers": "#406385", - "editorMarkerNavigationBackground": "#060621", - "editorMarkerNavigationError": "#FF0000", - "editorMarkerNavigationWarning": "#00FF00", - "editorActiveLinkForeground": "#0063a5", - // "editorFindMatch": "", - "editorFindMatchHighlight": "#eeeeee44", - // "editorFindRangeHighlight": "", - // "editorHoverHighlight": "", - // "editorInactiveSelection": "", - // "editorLineHighlightBorder": "", - "editorLinkForeground": "#0063a5", - // "editorRangeHighlight": "", - // "editorSelectionHighlight": "", - // "editorSuggestWidgetBackground": "", - // "editorSuggestWidgetBorder": "", - // "editorWordHighlight": "", - // "editorWordHighlightStrong": "", + "editor.background": "#000c18", + "editor.foreground": "#6688cc", + "editorWidget.background": "#262641", + "editorCursor.foreground": "#ddbb88", + "editorWhitespace.foreground": "#103050", + "editor.lineHighlightBackground": "#082050", + "editor.selectionBackground": "#770811", + "editorIndentGuide.background": "#002952", + "editorHoverWidget.background": "#000c38", + "editorHoverWidget.border": "#004c18", + "editorLineNumber.foreground": "#406385", + "editorMarkerNavigation.background": "#060621", + "editorMarkerNavigationError.background": "#FF0000", + "editorMarkerNavigationWarning.background": "#00FF00", + "editorLink.activeForeground": "#0063a5", + // "editor.findMatchBackground": "", + "editor.findMatchHighlightBackground": "#eeeeee44", + // "editor.findRangeHighlightBackground": "", + // "editor.hoverHighlightBackground": "", + // "editor.inactiveSelectionBackground": "", + // "editor.lineHighlightBorder": "", + "editorLink.foreground": "#0063a5", + // "editor.rangeHighlightBackground": "", + // "editor.selectionHighlightBackground": "", + // "editorSuggestWidget.background": "", + // "editorSuggestWidget.border": "", + // "editor.wordHighlightBackground": "", + // "editor.wordHighlightStrongBackground": "", // Editor: Peek View - "peekViewResultsBackground": "#060621", - // "peekViewResultsMatchForeground": "", - // "peekViewResultsSelectionBackground": "", - // "peekViewResultsSelectionForeground": "", - "peekViewEditorBackground": "#10192c", - "peekViewTitleBackground": "#10192c", - "peekViewBorder": "#2b2b4a", - "peekViewEditorMatchHighlight": "#eeeeee33", - // "peekViewResultsFileForeground": "", - "peekViewResultsMatchHighlight": "#eeeeee44", - // "peekViewTitleForeground": "", - // "peekViewTitleInfoForeground": "", + "peekViewResult.background": "#060621", + // "peekViewResult.lineForeground": "", + // "peekViewResult.selectionBackground": "", + // "peekViewResult.selectionForeground": "", + "peekViewEditor.background": "#10192c", + "peekViewTitle.background": "#10192c", + "peekView.border": "#2b2b4a", + "peekViewEditor.matchHighlightBackground": "#eeeeee33", + // "peekViewResult.fileForeground": "", + "peekViewResult.matchHighlightBackground": "#eeeeee44", + // "peekViewTitleLabel.foreground": "", + // "peekViewTitleDescription.foreground": "", // Editor: Diff - "diffEditorInserted": "#31958A55", - // "diffEditorInsertedOutline": "", - "diffEditorRemoved": "#892F4688", - // "diffEditorRemovedOutline": "", + "diffEditor.insertedTextBackground": "#31958A55", + // "diffEditor.insertedTextBorder": "", + "diffEditor.removedTextBackground": "#892F4688", + // "diffEditor.removedTextBorder": "", // Workbench: Title - "titleBarActiveBackground": "#10192c", - // "titleBarActiveForeground": "", - "titleBarInactiveBackground": "#10192caa", - // "titleBarInactiveForeground": "", + "titleBar.activeBackground": "#10192c", + // "titleBar.activeForeground": "", + "titleBar.inactiveBackground": "#10192caa", + // "titleBar.inactiveForeground": "", // Workbench: Editors - // "editorGroupHeaderBackground": "", - "editorGroupBorder": "#2b2b4a", - "editorGroupBackground": "#1c1c2a", - "editorMasterDetailsBorder": "#10192c", - "editorDragAndDropBackground": "#25375daa", + // "editorGroupHeader.noTabsBackground": "", + "editorGroup.border": "#2b2b4a", + "editorGroup.background": "#1c1c2a", + "masterDetailsEditor.border": "#10192c", + "editorGroup.dropBackground": "#25375daa", // Workbench: Tabs - "tabsContainerBackground": "#1c1c2a", - "tabBorder": "#2b2b4a", - // "tabActiveBackground": "", - "tabInactiveBackground": "#10192c", - // "tabActiveEditorGroupActiveForeground": "", - // "tabActiveEditorGroupInactiveForeground": "", - // "tabInactiveEditorGroupActiveForeground": "", - // "tabInactiveEditorGroupInactiveForeground": "", + "editorGroupHeader.tabsBackground": "#1c1c2a", + "tab.border": "#2b2b4a", + // "tab.activeBackground": "", + "tab.inactiveBackground": "#10192c", + // "tab.activeForeground": "", + // "tab.activeWithInactiveEditorGroupForeground": "", + // "tab.inactiveForeground": "", + // "tab.inactiveWithInactiveEditorGroupForeground": "", // Workbench: Activity Bar - "activityBarBackground": "#051336", - // "activityBarForeground": "", - "activityBarBadgeBackground": "#0063a5", - // "activityBarBadgeForeground": "", - // "activityBarDragAndDropBackground": "#25375daa", + "activityBar.background": "#051336", + // "activityBar.foreground": "", + "activityBarBadge.background": "#0063a5", + // "activityBarBadge.foreground": "", + // "activityBar.dropBackground": "#25375daa", // Workbench: Panel - // "panelBackground": "", - "panelBorder": "#2b2b4a", - // "panelActiveTitleBorder": "", - // "panelActiveTitleForeground": "", - // "panelInactiveTitleForeground": "", + // "panel.background": "", + "panel.border": "#2b2b4a", + // "panelTitle.activeBorder": "", + // "panelTitle.activeForeground": "", + // "panelTitle.inactiveForeground": "", // Workbench: Side Bar - "sideBarBackground": "#060621", - // "sideBarTitleForeground": "", - "sideBarSectionHeaderBackground": "#10192c", + "sideBar.background": "#060621", + // "sideBarTitle.foreground": "", + "sideBarSectionHeader.background": "#10192c", // Workbench: Status Bar - "statusBarBackground": "#10192c", - "statusBarNoFolderBackground": "#10192c", - "statusBarDebuggingBackground": "#10192c", - // "statusBarForeground": "", - "statusBarProminentItemBackground": "#0063a5", - "statusBarProminentItemHoverBackground": "#0063a5dd", - "statusBarItemActiveBackground": "#ffffff33", - "statusBarItemHoverBackground": "#ffffff22", + "statusBar.background": "#10192c", + "statusBar.noFolderBackground": "#10192c", + "statusBar.debuggingBackground": "#10192c", + // "statusBar.foreground": "", + "statusBarItem.prominentBackground": "#0063a5", + "statusBarItem.prominentHoverBackground": "#0063a5dd", + "statusBarItem.activeBackground": "#ffffff33", + "statusBarItem.hoverBackground": "#ffffff22", // Workbench: Debug - "debugToolBarBackground": "#051336", - "debugExceptionWidgetBackground": "#051336", - // "debugExceptionWidgetBorder": "", + "debugToolBar.background": "#051336", + "debugExceptionWidget.background": "#051336", + // "debugExceptionWidget.border": "", // Workbench: Notifications - "notificationsBackground": "#051336", - // "notificationsForeground": "", + "notification.background": "#051336", + // "notification.foreground": "", // Workbench: Quick Open - "pickerGroupBorder": "#596F99", - "pickerGroupForeground": "#596F99" + "pickerGroup.border": "#596F99", + "pickerGroup.foreground": "#596F99" // Workbench: Terminal - // "terminalAnsiBlack": "", - // "terminalAnsiBlue": "", - // "terminalAnsiBrightBlack": "", - // "terminalAnsiBrightBlue": "", - // "terminalAnsiBrightCyan": "", - // "terminalAnsiBrightGreen": "", - // "terminalAnsiBrightMagenta": "", - // "terminalAnsiBrightRed": "", - // "terminalAnsiBrightWhite": "", - // "terminalAnsiBrightYellow": "", - // "terminalAnsiCyan": "", - // "terminalAnsiGreen": "", - // "terminalAnsiMagenta": "", - // "terminalAnsiRed": "", - // "terminalAnsiWhite": "", - // "terminalAnsiYellow": "" + // "terminal.ansiBlack": "", + // "terminal.ansiBlue": "", + // "terminal.ansiBrightBlack": "", + // "terminal.ansiBrightBlue": "", + // "terminal.ansiBrightCyan": "", + // "terminal.ansiBrightGreen": "", + // "terminal.ansiBrightMagenta": "", + // "terminal.ansiBrightRed": "", + // "terminal.ansiBrightWhite": "", + // "terminal.ansiBrightYellow": "", + // "terminal.ansiCyan": "", + // "terminal.ansiGreen": "", + // "terminal.ansiMagenta": "", + // "terminal.ansiRed": "", + // "terminal.ansiWhite": "", + // "terminal.ansiYellow": "" } } \ No newline at end of file diff --git a/extensions/theme-defaults/themes/dark_defaults.json b/extensions/theme-defaults/themes/dark_defaults.json index d98ae61bf4f90..597fe8c3d4bb2 100644 --- a/extensions/theme-defaults/themes/dark_defaults.json +++ b/extensions/theme-defaults/themes/dark_defaults.json @@ -2,10 +2,10 @@ "$schema": "vscode://schemas/color-theme", "name": "Dark Default Colors", "colors": { - "editorBackground": "#1e1e1e", - "editorForeground": "#D4D4D4", - "editorInactiveSelection": "#3A3D41", - "editorIndentGuides": "#404040", - "editorSelectionHighlight": "#add6ff26" + "editor.background": "#1e1e1e", + "editor.foreground": "#D4D4D4", + "editor.inactiveSelectionBackground": "#3A3D41", + "editorIndentGuide.background": "#404040", + "editor.selectionHighlightBackground": "#add6ff26" } } \ No newline at end of file diff --git a/extensions/theme-defaults/themes/hc_black_defaults.json b/extensions/theme-defaults/themes/hc_black_defaults.json index ec8999a7eb80f..ceda83b446507 100644 --- a/extensions/theme-defaults/themes/hc_black_defaults.json +++ b/extensions/theme-defaults/themes/hc_black_defaults.json @@ -2,8 +2,8 @@ "$schema": "vscode://schemas/color-theme", "name": "High Contrast Default Colors", "colors": { - "editorBackground": "#000000", - "editorForeground": "#FFFFFF", - "editorIndentGuides": "#FFFFFF" + "editor.background": "#000000", + "editor.foreground": "#FFFFFF", + "editorIndentGuide.background": "#FFFFFF" } } \ No newline at end of file diff --git a/extensions/theme-defaults/themes/light_defaults.json b/extensions/theme-defaults/themes/light_defaults.json index b88c1db752f18..091fb560b5efb 100644 --- a/extensions/theme-defaults/themes/light_defaults.json +++ b/extensions/theme-defaults/themes/light_defaults.json @@ -2,11 +2,11 @@ "$schema": "vscode://schemas/color-theme", "name": "Light Default Colors", "colors": { - "editorBackground": "#ffffff", - "editorForeground": "#000000", - "editorInactiveSelection": "#E5EBF1", - "editorIndentGuides": "#d3d3d3", - "editorSelectionHighlight": "#add6ff4d", - "editorSuggestWidgetBackground": "#F3F3F3" + "editor.background": "#ffffff", + "editor.foreground": "#000000", + "editor.inactiveSelectionBackground": "#E5EBF1", + "editorIndentGuide.background": "#d3d3d3", + "editor.selectionHighlightBackground": "#add6ff4d", + "editorSuggestWidget.background": "#F3F3F3" } } \ No newline at end of file diff --git a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json index 7b5beeb3a9abd..6f7a5dbfb787e 100644 --- a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json +++ b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json @@ -2,27 +2,27 @@ "name": "Kimbie Dark", "type": "dark", "colors": { - "inputBoxBackground": "#2f2f2f", - "editorBackground": "#221a0f", - "editorForeground": "#d3af86", - "editorSelection": "#84613daa", - "editorWidgetBackground": "#131510", - "editorHoverBackground": "#221a14", - "tabsContainerBackground": "#131510", - "tabInactiveBackground": "#131510", - "statusBarBackground": "#162257", - "activityBarBackground": "#221a0f", - "activityBarForeground": "#d3af86", - "activityBarBadgeBackground": "#162257", - "sideBarBackground": "#131510", - "editorLineHighlight": "#5e452b", - "editorCursor": "#d3af86", - "editorWhitespaces": "#a57a4c", - "peekViewTitleBackground": "#131510", - "peekViewBorder": "#5e452b", - "peekViewResultsBackground": "#131510", - "peekViewEditorBackground": "#221a14", - "peekViewEditorMatchHighlight": "#84613daa" + "input.background": "#2f2f2f", + "editor.background": "#221a0f", + "editor.foreground": "#d3af86", + "editor.selectionBackground": "#84613daa", + "editorWidget.background": "#131510", + "editorHoverWidget.background": "#221a14", + "editorGroupHeader.tabsBackground": "#131510", + "tab.inactiveBackground": "#131510", + "statusBar.background": "#162257", + "activityBar.background": "#221a0f", + "activityBar.foreground": "#d3af86", + "activityBarBadge.background": "#162257", + "sideBar.background": "#131510", + "editor.lineHighlightBackground": "#5e452b", + "editorCursor.foreground": "#d3af86", + "editorWhitespace.foreground": "#a57a4c", + "peekViewTitle.background": "#131510", + "peekView.border": "#5e452b", + "peekViewResult.background": "#131510", + "peekViewEditor.background": "#221a14", + "peekViewEditor.matchHighlightBackground": "#84613daa" }, "tokenColors": [ { diff --git a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json index 7c6842a0d33e8..15410dcf938bf 100644 --- a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json +++ b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json @@ -3,34 +3,34 @@ "colors": { // "foreground": "#ddffff", // "focusBorder": "#00f9ff", - "dropdownBackground": "#383852", - "listActiveSelectionBackground": "#303050", - "listFocusAndSelectionBackground": "#383852", - "listInactiveSelectionBackground": "#303d45", - "listHoverBackground": "#005070", - "listDropBackground": "#505590", - "buttonBackground": "#5088a3", - "buttonHoverBackground": "#6099a3", - "editorBackground": "#202025", - "editorForeground": "#c5c8c6", - "editorSelection": "#373b41", - "editorLineHighlight": "#303030", - "editorCursor": "#fc5604", - "editorWhitespaces": "#383880", - "editorIndentGuides": "#505037", - "tabsContainerBackground": "#222228", - "tabActiveBackground": "#272740", - "tabInactiveBackground": "#333340", - "tabBorder": "#000030", - "panelActiveTitleForeground": "#ddffff", - "statusBarBackground": "#354550", - "activityBarBackground": "#292935", - "activityBarForeground": "#f0f0ff", - "activityBarBadgeBackground": "#4045b0", - "sideBarBackground": "#232327", - "sideBarSectionHeaderBackground": "#424250", - "notificationsForeground": "#ffe0ff", - "terminalAnsiWhite": "#ddffff" + "dropdown.background": "#383852", + "list.activeSelectionBackground": "#303050", + "list.focusAndSelectionBackground": "#383852", + "list.inactiveSelectionBackground": "#303d45", + "list.hoverBackground": "#005070", + "list.dropBackground": "#505590", + "button.background": "#5088a3", + "button.hoverBackground": "#6099a3", + "editor.background": "#202025", + "editor.foreground": "#c5c8c6", + "editor.selectionBackground": "#373b41", + "editor.lineHighlightBackground": "#303030", + "editorCursor.foreground": "#fc5604", + "editorWhitespace.foreground": "#383880", + "editorIndentGuide.background": "#505037", + "editorGroupHeader.tabsBackground": "#222228", + "tab.activeBackground": "#272740", + "tab.inactiveBackground": "#333340", + "tab.border": "#000030", + "panelTitle.activeForeground": "#ddffff", + "statusBar.background": "#354550", + "activityBar.background": "#292935", + "activityBar.foreground": "#f0f0ff", + "activityBarBadge.background": "#4045b0", + "sideBar.background": "#232327", + "sideBarSectionHeader.background": "#424250", + "notification.foreground": "#ffe0ff", + "terminal.ansiWhite": "#ddffff" }, "tokenColors": [ { diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index fa6da417331c2..c9c0ff57dc3de 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -3,35 +3,35 @@ "colors": { // "foreground": "#ddffff", // "focusBorder": "#00f9ff", - "dropdownBackground": "#383852", - "listActiveSelectionBackground": "#303070", - "listFocusBackground": "#394770", - "listFocusAndSelectionBackground": "#383852", - "listInactiveSelectionBackground": "#303d45", - "listHoverBackground": "#005070", - "listDropBackground": "#505590", - "buttonBackground": "#5088a3", - "buttonHoverBackground": "#6099a3", - "editorBackground": "#202025", - "editorForeground": "#f8f8f2", - "editorSelection": "#49483e", - "editorLineHighlight": "#303030", - "editorCursor": "#f8f8f0", - "editorWhitespaces": "#383880", - "editorIndentGuides": "#505037", - "tabsContainerBackground": "#222228", - "tabActiveBackground": "#272740", - "tabInactiveBackground": "#333340", - "tabBorder": "#000030", - "panelActiveTitleForeground": "#ddffff", - "statusBarBackground": "#354550", - "activityBarBackground": "#292935", - "activityBarBadgeForeground": "#ffffff", - "activityBarBadgeBackground": "#3655b5", - "sideBarBackground": "#232327", - "sideBarSectionHeaderBackground": "#424250", - "notificationsForeground": "#ffe0ff", - "terminalAnsiWhite": "#ddffff" + "dropdown.background": "#383852", + "list.activeSelectionBackground": "#303070", + "list.focusBackground": "#394770", + "list.focusAndSelectionBackground": "#383852", + "list.inactiveSelectionBackground": "#303d45", + "list.hoverBackground": "#005070", + "list.dropBackground": "#505590", + "button.background": "#5088a3", + "button.hoverBackground": "#6099a3", + "editor.background": "#202025", + "editor.foreground": "#f8f8f2", + "editor.selectionBackground": "#49483e", + "editor.lineHighlightBackground": "#303030", + "editorCursor.foreground": "#f8f8f0", + "editorWhitespace.foreground": "#383880", + "editorIndentGuide.background": "#505037", + "editorGroupHeader.tabsBackground": "#222228", + "tab.activeBackground": "#272740", + "tab.inactiveBackground": "#333340", + "tab.border": "#000030", + "panelTitle.activeForeground": "#ddffff", + "statusBar.background": "#354550", + "activityBar.background": "#292935", + "activityBarBadge.foreground": "#ffffff", + "activityBarBadge.background": "#3655b5", + "sideBar.background": "#232327", + "sideBarSectionHeader.background": "#424250", + "notification.foreground": "#ffe0ff", + "terminal.ansiWhite": "#ddffff" }, "tokenColors": [ diff --git a/extensions/theme-quietlight/themes/quietlight-color-theme.json b/extensions/theme-quietlight/themes/quietlight-color-theme.json index dd68a955fc806..01a9a24087b2e 100644 --- a/extensions/theme-quietlight/themes/quietlight-color-theme.json +++ b/extensions/theme-quietlight/themes/quietlight-color-theme.json @@ -454,32 +454,32 @@ ], "colors": { "focusBorder": "#A6B39B", - "pickerGroupForeground": "#A6B39B", - "pickerGroupBorder": "#749351", - "listActiveSelectionForeground": "#6c6c6c", - "listFocusAndSelectionForeground": "#6c6c6c", - "listFocusBackground": "#CADEB9", - "listFocusAndSelectionBackground": "#A2B294", - "listActiveSelectionBackground": "#B6C8A7", - "editorBackground": "#F5F5F5", - "editorWhitespaces": "#AAAAAA", - "editorLineHighlight": "#E4F6D4", - "editorSelection": "#C9D0D9", - "panelBackground": "#F5F5F5", - "sideBarBackground": "#F2F2F2", - "editorLineNumbers": "#9DA39A", - "editorCursor": "#54494B", - "inputBoxActiveOptionBorder": "#adafb7", - "dropdownBackground": "#F5F5F5", - "editorFindMatch": "#BF9CAC", - "editorFindMatchHighlight": "#edc9d8", - "peekViewEditorMatchHighlight": "#C2DFE3", - "peekViewTitleBackground": "#F2F8FC", - "peekViewEditorBackground": "#F2F8FC", - "peekViewResultsBackground": "#F2F8FC", - "peekViewResultsMatchHighlight": "#93C6D6", - "statusBarBackground": "#705697", - "activityBarBackground": "#EDEDF5", - "activityBarForeground": "#705697" + "pickerGroup.foreground": "#A6B39B", + "pickerGroup.border": "#749351", + "list.activeSelectionForeground": "#6c6c6c", + "list.focusAndSelectionForeground": "#6c6c6c", + "list.focusBackground": "#CADEB9", + "list.focusAndSelectionBackground": "#A2B294", + "list.activeSelectionBackground": "#B6C8A7", + "editor.background": "#F5F5F5", + "editorWhitespace.foreground": "#AAAAAA", + "editor.lineHighlightBackground": "#E4F6D4", + "editor.selectionBackground": "#C9D0D9", + "panel.background": "#F5F5F5", + "sideBar.background": "#F2F2F2", + "editorLineNumber.foreground": "#9DA39A", + "editorCursor.foreground": "#54494B", + "inputOption.activeBorder": "#adafb7", + "dropdown.background": "#F5F5F5", + "editor.findMatchBackground": "#BF9CAC", + "editor.findMatchHighlightBackground": "#edc9d8", + "peekViewEditor.matchHighlightBackground": "#C2DFE3", + "peekViewTitle.background": "#F2F8FC", + "peekViewEditor.background": "#F2F8FC", + "peekViewResult.background": "#F2F8FC", + "peekViewResult.matchHighlightBackground": "#93C6D6", + "statusBar.background": "#705697", + "activityBar.background": "#EDEDF5", + "activityBar.foreground": "#705697" } } \ No newline at end of file diff --git a/extensions/theme-red/themes/Red-color-theme.json b/extensions/theme-red/themes/Red-color-theme.json index 08a5ae513a006..ecba98b7b0abe 100644 --- a/extensions/theme-red/themes/Red-color-theme.json +++ b/extensions/theme-red/themes/Red-color-theme.json @@ -2,56 +2,56 @@ "tokenColors": "./red.tmTheme", "colors": { // window - "activityBarBadgeBackground": "#DB7E58", - "activityBarBackground": "#580000", - "tabInactiveBackground": "#300a0a", - "tabActiveBackground": "#490000", - "sideBarBackground": "#330000", - "statusBarBackground": "#700000", - "statusBarNoFolderBackground": "#700000", - "tabsContainerBackground": "#330000", - "titleBarActiveBackground": "#770000", - "titleBarInactiveBackground": "#772222", + "activityBarBadge.background": "#DB7E58", + "activityBar.background": "#580000", + "tab.inactiveBackground": "#300a0a", + "tab.activeBackground": "#490000", + "sideBar.background": "#330000", + "statusBar.background": "#700000", + "statusBar.noFolderBackground": "#700000", + "editorGroupHeader.tabsBackground": "#330000", + "titleBar.activeBackground": "#770000", + "titleBar.inactiveBackground": "#772222", // editor - "editorBackground": "#390000", - "editorGroupBorder": "#ff666633", - "editorCursor": "#970000", - "editorForeground": "#F8F8F8", - "editorWhitespaces": "#c10000", - "editorSelection": "#750000", - "editorLineNumbers": "#ff777788", - "editorWidgetBackground": "#300000", - "editorHoverBackground": "#300000", - "editorSuggestWidgetBackground": "#300000", - "editorSuggestWidgetBorder": "#220000", - "editorLineHighlight": "#ff000033", - "editorHoverHighlight": "#ff000044", - "editorSelectionHighlight": "#f5500039", - "editorLinkForeground": "#D69B6A", - "editorActiveLinkForeground": "#FFD0AA", - "peekViewTitleBackground": "#550000", - "peekViewBorder": "#ff000044", - "peekViewResultsBackground": "#400000", - "peekViewEditorBackground": "#300000", + "editor.background": "#390000", + "editorGroup.border": "#ff666633", + "editorCursor.foreground": "#970000", + "editor.foreground": "#F8F8F8", + "editorWhitespace.foreground": "#c10000", + "editor.selectionBackground": "#750000", + "editorLineNumber.foreground": "#ff777788", + "editorWidget.background": "#300000", + "editorHoverWidget.background": "#300000", + "editorSuggestWidget.background": "#300000", + "editorSuggestWidget.border": "#220000", + "editor.lineHighlightBackground": "#ff000033", + "editor.hoverHighlightBackground": "#ff000044", + "editor.selectionHighlightBackground": "#f5500039", + "editorLink.foreground": "#D69B6A", + "editorLink.activeForeground": "#FFD0AA", + "peekViewTitle.background": "#550000", + "peekView.border": "#ff000044", + "peekViewResult.background": "#400000", + "peekViewEditor.background": "#300000", // UI - "debugToolBarBackground": "#660000", + "debugToolBar.background": "#660000", "focusBorder": "#ff6666aa", - "buttonBackground": "#885555", - "buttonHoverBackground": "#aa5555", - "dropdownBackground": "#580000", - "inputBoxBackground": "#580000", - "inputBoxActiveOptionBorder": "#cc0000", - "inputValidationInfoBackground": "#550000", - "inputValidationInfoBorder": "#773333", - "listHoverBackground": "#800000", - "listActiveSelectionBackground": "#700000", - "listInactiveSelectionBackground": "#770000", - "listFocusBackground": "#660000", - "listFocusAndSelectionBackground": "#880000", - "listHighlightForeground": "#ff4444", - "notificationsBackground": "#662222", - "pickerGroupForeground": "#cc9999", - "pickerGroupBorder": "#ff000033" + "button.background": "#885555", + "button.hoverBackground": "#aa5555", + "dropdown.background": "#580000", + "input.background": "#580000", + "inputOption.activeBorder": "#cc0000", + "inputValidation.infoBackground": "#550000", + "inputValidation.infoBorder": "#773333", + "list.hoverBackground": "#800000", + "list.activeSelectionBackground": "#700000", + "list.inactiveSelectionBackground": "#770000", + "list.focusBackground": "#660000", + "list.focusAndSelectionBackground": "#880000", + "list.highlightForeground": "#ff4444", + "notification.background": "#662222", + "pickerGroup.foreground": "#cc9999", + "pickerGroup.border": "#ff000033" }, "name": "Red" } \ No newline at end of file diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index 0b321812e0c06..6df7eeb4a248a 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -297,167 +297,167 @@ // "foreground": "", "focusBorder": "#2AA19899", - // "widgetShadow": "", + // "widget.shadow": "", - "inputBoxBackground": "#003847", - "inputBoxForeground": "#93A1A1", - "inputBoxActiveOptionBorder": "#2AA19899", - "inputValidationInfoBorder": "#384078", - "inputValidationInfoBackground": "#051336", - "inputValidationWarningBackground": "#5B7E7A", - "inputValidationWarningBorder": "#5B7E7A", - "inputValidationErrorBackground": "#A22D44", - "inputValidationErrorBorder": "#AB395B", + "input.background": "#003847", + "input.foreground": "#93A1A1", + "inputOption.activeBorder": "#2AA19899", + "inputValidation.infoBorder": "#384078", + "inputValidation.infoBackground": "#051336", + "inputValidation.warningBackground": "#5B7E7A", + "inputValidation.warningBorder": "#5B7E7A", + "inputValidation.errorBackground": "#A22D44", + "inputValidation.errorBorder": "#AB395B", - "dropdownBackground": "#00212B", - "dropdownBorder": "#2AA19899", + "dropdown.background": "#00212B", + "dropdown.border": "#2AA19899", - "buttonBackground": "#2AA19899", - "buttonHoverBackground": "#2AA19844", - // "buttonForeground": "", + "button.background": "#2AA19899", + "button.hoverBackground": "#2AA19844", + // "button.foreground": "", - "listFocusAndSelectionBackground": "#005A6F", - // "listFocusAndSelectionForeground": "", - "listActiveSelectionBackground": "#004454", - // "listActiveSelectionForeground": "", - "listFocusBackground": "#005A6F", - "listHoverBackground": "#004454AA", - "listInactiveSelectionBackground": "#00445488", - "listDropBackground": "#00445488", - // "listHighlightForeground": "", + "list.focusAndSelectionBackground": "#005A6F", + // "list.focusAndSelectionForeground": "", + "list.activeSelectionBackground": "#004454", + // "list.activeSelectionForeground": "", + "list.focusBackground": "#005A6F", + "list.hoverBackground": "#004454AA", + "list.inactiveSelectionBackground": "#00445488", + "list.dropBackground": "#00445488", + // "list.highlightForeground": "", - // "scrollbarShadow": "", - // "scrollbarSliderActiveBackground": "", - // "scrollbarSliderBackground": "", - // "scrollbarSliderHoverBackground": "", + // "scrollbar.shadow": "", + // "scrollbarSlider.activeBackground": "", + // "scrollbarSlider.background": "", + // "scrollbarSlider.hoverBackground": "", // Editor - "editorBackground": "#002B36", - "editorForeground": "#6688cc", - "editorWidgetBackground": "#00212B", - "editorCursor": "#D30102", - "editorWhitespaces": "#93A1A180", - "editorLineHighlight": "#073642", - "editorSelection": "#073642", - // "editorIndentGuides": "", - "editorHoverBackground": "#004052", - // "editorHoverBorder": "", - // "editorLineNumbers": "", - // "editorMarkerNavigationBackground": "", - // "editorMarkerNavigationError": "", - // "editorMarkerNavigationWarning": "", - // "editorActiveLinkForeground": "", - // "editorFindMatch": "", - // "editorFindMatchHighlight": "", - // "editorFindRangeHighlight": "", - // "editorHoverHighlight": "", - // "editorInactiveSelection": "", - // "editorLineHighlightBorder": "", - // "editorLinkForeground": "", - // "editorRangeHighlight": "", - // "editorSelectionHighlight": "", - // "editorSuggestWidgetBackground": "", - // "editorSuggestWidgetBorder": "", - // "editorWordHighlight": "", - // "editorWordHighlightStrong": "", + "editor.background": "#002B36", + "editor.foreground": "#6688cc", + "editorWidget.background": "#00212B", + "editorCursor.foreground": "#D30102", + "editorWhitespace.foreground": "#93A1A180", + "editor.lineHighlightBackground": "#073642", + "editor.selectionBackground": "#073642", + // "editorIndentGuide.background": "", + "editorHoverWidget.background": "#004052", + // "editorHoverWidget.border": "", + // "editorLineNumber.foreground": "", + // "editorMarkerNavigation.background": "", + // "editorMarkerNavigationError.background": "", + // "editorMarkerNavigationWarning.background": "", + // "editorLink.activeForeground": "", + // "editor.findMatchBackground": "", + // "editor.findMatchHighlightBackground": "", + // "editor.findRangeHighlightBackground": "", + // "editor.hoverHighlightBackground": "", + // "editor.inactiveSelectionBackground": "", + // "editor.lineHighlightBorder": "", + // "editorLink.foreground": "", + // "editor.rangeHighlightBackground": "", + // "editor.selectionHighlightBackground": "", + // "editorSuggestWidget.background": "", + // "editorSuggestWidget.border": "", + // "editor.wordHighlightBackground": "", + // "editor.wordHighlightStrongBackground": "", // Editor: Peek View - "peekViewResultsBackground": "#00212B", - // "peekViewResultsMatchForeground": "", - // "peekViewResultsSelectionBackground": "", - // "peekViewResultsSelectionForeground": "", - "peekViewEditorBackground": "#10192c", - "peekViewTitleBackground": "#00212B", - "peekViewBorder": "#2b2b4a", - "peekViewEditorMatchHighlight": "#7744AA40", - // "peekViewResultsFileForeground": "", - // "peekViewResultsMatchHighlight": "", - // "peekViewTitleForeground": "", - // "peekViewTitleInfoForeground": "", + "peekViewResult.background": "#00212B", + // "peekViewResult.lineForeground": "", + // "peekViewResult.selectionBackground": "", + // "peekViewResult.selectionForeground": "", + "peekViewEditor.background": "#10192c", + "peekViewTitle.background": "#00212B", + "peekView.border": "#2b2b4a", + "peekViewEditor.matchHighlightBackground": "#7744AA40", + // "peekViewResult.fileForeground": "", + // "peekViewResult.matchHighlightBackground": "", + // "peekViewTitleLabel.foreground": "", + // "peekViewTitleDescription.foreground": "", // Editor: Diff - // "diffEditorInserted": "", - // "diffEditorInsertedOutline": "", - // "diffEditorRemoved": "", - // "diffEditorRemovedOutline": "", + // "diffEditor.insertedTextBackground": "", + // "diffEditor.insertedTextBorder": "", + // "diffEditor.removedTextBackground": "", + // "diffEditor.removedTextBorder": "", // Workbench: Title - "titleBarActiveBackground": "#002C39", - "titleBarInactiveBackground": "#002C39", + "titleBar.activeBackground": "#002C39", + "titleBar.inactiveBackground": "#002C39", // Workbench: Editors - // "editorGroupHeaderBackground": "", - "editorGroupBorder": "#00212B", - "editorGroupBackground": "#011b23", - "editorMasterDetailsBorder": "#00212B", - "editorDragAndDropBackground": "#00212BAA", + // "editorGroupHeader.noTabsBackground": "", + "editorGroup.border": "#00212B", + "editorGroup.background": "#011b23", + "masterDetailsEditor.border": "#00212B", + "editorGroup.dropBackground": "#00212BAA", // Workbench: Tabs - "tabActiveEditorGroupActiveForeground": "#d6dbdb", - "tabActiveBackground": "#002B37", - "tabInactiveEditorGroupActiveForeground": "#93A1A1", - "tabInactiveBackground": "#004052", - "tabsContainerBackground": "#004052", - "tabBorder": "#003847", - "tabActiveEditorGroupInactiveForeground": "#93A1A1", - "tabInactiveEditorGroupInactiveForeground": "#93A1A1", + "tab.activeForeground": "#d6dbdb", + "tab.activeBackground": "#002B37", + "tab.inactiveForeground": "#93A1A1", + "tab.inactiveBackground": "#004052", + "editorGroupHeader.tabsBackground": "#004052", + "tab.border": "#003847", + "tab.activeWithInactiveEditorGroupForeground": "#93A1A1", + "tab.inactiveWithInactiveEditorGroupForeground": "#93A1A1", // Workbench: Activity Bar - "activityBarBackground": "#003847", - // "activityBarDragAndDropBackground": "#00212B", - "activityBarBadgeBackground": "#047aa6", + "activityBar.background": "#003847", + // "activityBar.dropBackground": "#00212B", + "activityBarBadge.background": "#047aa6", // Workbench: Panel - // "panelBackground": "", - "panelBorder": "#2b2b4a", - // "panelActiveTitleBorder": "", - // "panelActiveTitleForeground": "", - // "panelInactiveTitleForeground": "", + // "panel.background": "", + "panel.border": "#2b2b4a", + // "panelTitle.activeBorder": "", + // "panelTitle.activeForeground": "", + // "panelTitle.inactiveForeground": "", // Workbench: Side Bar - "sideBarBackground": "#00212B", - "sideBarTitleForeground": "#93A1A1", - // "sideBarSectionHeaderBackground": "", + "sideBar.background": "#00212B", + "sideBarTitle.foreground": "#93A1A1", + // "sideBarSectionHeader.background": "", // Workbench: Status Bar - "statusBarForeground": "#93A1A1", - "statusBarBackground": "#00212B", - "statusBarDebuggingBackground": "#00212B", - "statusBarNoFolderBackground": "#00212B", - "statusBarProminentItemBackground": "#003847", - "statusBarProminentItemHoverBackground": "#003847", - // "statusBarItemActiveBackground": "", - // "statusBarItemHoverBackground": "", + "statusBar.foreground": "#93A1A1", + "statusBar.background": "#00212B", + "statusBar.debuggingBackground": "#00212B", + "statusBar.noFolderBackground": "#00212B", + "statusBarItem.prominentBackground": "#003847", + "statusBarItem.prominentHoverBackground": "#003847", + // "statusBarItem.activeBackground": "", + // "statusBarItem.hoverBackground": "", // Workbench: Debug - "debugToolBarBackground": "#00212B", - "debugExceptionWidgetBackground": "#00212B", - // "debugExceptionWidgetBorder": "", + "debugToolBar.background": "#00212B", + "debugExceptionWidget.background": "#00212B", + // "debugExceptionWidget.border": "", // Workbench: Notifications - "notificationsBackground": "#003847", - // "notificationsForeground": "", + "notification.background": "#003847", + // "notification.foreground": "", // Workbench: Quick Open - "pickerGroupForeground": "#2AA19899", - "pickerGroupBorder": "#2AA19899" + "pickerGroup.foreground": "#2AA19899", + "pickerGroup.border": "#2AA19899" // Workbench: Terminal - // "terminalAnsiBlack": "", - // "terminalAnsiBlue": "", - // "terminalAnsiBrightBlack": "", - // "terminalAnsiBrightBlue": "", - // "terminalAnsiBrightCyan": "", - // "terminalAnsiBrightGreen": "", - // "terminalAnsiBrightMagenta": "", - // "terminalAnsiBrightRed": "", - // "terminalAnsiBrightWhite": "", - // "terminalAnsiBrightYellow": "", - // "terminalAnsiCyan": "", - // "terminalAnsiGreen": "", - // "terminalAnsiMagenta": "", - // "terminalAnsiRed": "", - // "terminalAnsiWhite": "", - // "terminalAnsiYellow": "" + // "terminal.ansiBlack": "", + // "terminal.ansiBlue": "", + // "terminal.ansiBrightBlack": "", + // "terminal.ansiBrightBlue": "", + // "terminal.ansiBrightCyan": "", + // "terminal.ansiBrightGreen": "", + // "terminal.ansiBrightMagenta": "", + // "terminal.ansiBrightRed": "", + // "terminal.ansiBrightWhite": "", + // "terminal.ansiBrightYellow": "", + // "terminal.ansiCyan": "", + // "terminal.ansiGreen": "", + // "terminal.ansiMagenta": "", + // "terminal.ansiRed": "", + // "terminal.ansiWhite": "", + // "terminal.ansiYellow": "" } } \ No newline at end of file diff --git a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json index 42b05f7962c54..f15a87fc378c1 100644 --- a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -292,45 +292,45 @@ } ], "colors": { - "editorBackground": "#FDF6E3", - "editorCursor": "#657B83", - "editorWhitespaces": "#586E7580", - "editorLineHighlight": "#EEE8D5", - "editorSelection": "#EEE8D5", + "editor.background": "#FDF6E3", + "editorCursor.foreground": "#657B83", + "editorWhitespace.foreground": "#586E7580", + "editor.lineHighlightBackground": "#EEE8D5", + "editor.selectionBackground": "#EEE8D5", - "sideBarBackground": "#EEE8D5", - "sideBarTitleForeground": "#586E75", - "activityBarBackground": "#DDD6C1", - "activityBarForeground": "#584c27", - "activityBarDragAndDropBackground": "#EEE8D5", - "activityBarBadgeBackground": "#B58900", - "editorWidgetBackground": "#EEE8D5", - "inputBoxBackground": "#DDD6C1", - "inputBoxForeground": "#586E75", - "inputBoxActiveOptionBorder": "#2AA19899", + "sideBar.background": "#EEE8D5", + "sideBarTitle.foreground": "#586E75", + "activityBar.background": "#DDD6C1", + "activityBar.foreground": "#584c27", + "activityBar.dropBackground": "#EEE8D5", + "activityBarBadge.background": "#B58900", + "editorWidget.background": "#EEE8D5", + "input.background": "#DDD6C1", + "input.foreground": "#586E75", + "inputOption.activeBorder": "#2AA19899", "focusBorder": "#2AA19899", - "titleBarActiveBackground": "#002C39", - "titleBarInactiveBackground": "#002C39", - "statusBarForeground": "#586E75", - "statusBarBackground": "#EEE8D5", - "statusBarDebuggingBackground": "#EEE8D5", - "statusBarNoFolderBackground": "#EEE8D5", - // "tabActiveEditorGroupActiveForeground": "#d6dbdb", - "tabActiveBackground": "#FDF6E3", - "tabInactiveEditorGroupActiveForeground": "#586E75", - "tabInactiveBackground": "#CCC4B0", - "tabsContainerBackground": "#CCC4B0", - "tabBorder": "#DDD6C1", - // "tabActiveEditorGroupInactiveForeground": "#586E75", - // "tabInactiveEditorGroupInactiveForeground": "#586E75", - "debugToolBarBackground": "#EEE8D5", - "dropdownBackground": "#EEE8D5", - "dropdownBorder": "#2AA19899", + "titleBar.activeBackground": "#002C39", + "titleBar.inactiveBackground": "#002C39", + "statusBar.foreground": "#586E75", + "statusBar.background": "#EEE8D5", + "statusBar.debuggingBackground": "#EEE8D5", + "statusBar.noFolderBackground": "#EEE8D5", + // "tab.activeForeground": "#d6dbdb", + "tab.activeBackground": "#FDF6E3", + "tab.inactiveForeground": "#586E75", + "tab.inactiveBackground": "#CCC4B0", + "editorGroupHeader.tabsBackground": "#CCC4B0", + "tab.border": "#DDD6C1", + // "tab.activeWithInactiveEditorGroupForeground": "#586E75", + // "tab.inactiveWithInactiveEditorGroupForeground": "#586E75", + "debugToolBar.background": "#EEE8D5", + "dropdown.background": "#EEE8D5", + "dropdown.border": "#2AA19899", - "peekViewResultsBackground": "#EEE8D5", - "peekViewTitleBackground": "#EEE8D5", - "peekViewEditorMatchHighlight": "#7744AA40", - "editorHoverBackground": "#CCC4B0" + "peekViewResult.background": "#EEE8D5", + "peekViewTitle.background": "#EEE8D5", + "peekViewEditor.matchHighlightBackground": "#7744AA40", + "editorHoverWidget.background": "#CCC4B0" } } \ No newline at end of file diff --git a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json index ae48833a5c259..5510699e53973 100644 --- a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json +++ b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json @@ -2,50 +2,50 @@ "type": "dark", "colors": { "focusBorder": "#bbdaff", - "inputBoxBackground": "#001733", - "dropdownBackground": "#001733", - "listFocusBackground": "#ffffff60", - "listActiveSelectionBackground": "#ffffff50", - "listFocusAndSelectionBackground": "#ffffff60", - "listInactiveSelectionBackground": "#ffffff40", - "listHoverBackground": "#ffffff30", - "listDropBackground": "#ffffff60", - "pickerGroupForeground": "#bbdaff", - "editorBackground": "#002451", - "editorForeground": "#ffffff", - "editorSelection": "#003f8e", - "editorLineHighlight": "#00346e", - "editorCursor": "#ffffff", - "editorWhitespaces": "#404f7d", - "editorWidgetBackground": "#001c40", - "editorHoverBackground": "#001c40", - "editorHoverBorder": "#ffffff44", - "editorGroupBorder": "#404f7d", - "tabsContainerBackground": "#001733", - "tabInactiveBackground": "#001c40", - "statusBarBackground": "#001126", - "statusBarNoFolderBackground": "#001126", - "activityBarBackground": "#001733", - "activityBarBadgeBackground": "#bbdaff", - "activityBarBadgeForeground": "#001733", - "sideBarBackground": "#001c40", - "statusBarDebuggingBackground": "#ffeead", - "terminalAnsiBlack": "#111111", - "terminalAnsiRed": "#ff9da4", - "terminalAnsiGreen": "#d1f1a9", - "terminalAnsiYellow": "#ffeead", - "terminalAnsiBlue": "#bbdaff", - "terminalAnsiMagenta": "#ebbbff", - "terminalAnsiCyan": "#99ffff", - "terminalAnsiWhite": "#cccccc", - "terminalAnsiBrightBlack": "#333333", - "terminalAnsiBrightRed": "#ff7882", - "terminalAnsiBrightGreen": "#b8f171", - "terminalAnsiBrightYellow": "#ffe580", - "terminalAnsiBrightBlue": "#80baff", - "terminalAnsiBrightMagenta": "#d778ff", - "terminalAnsiBrightCyan": "#78ffff", - "terminalAnsiBrightWhite": "#ffffff" + "input.background": "#001733", + "dropdown.background": "#001733", + "list.focusBackground": "#ffffff60", + "list.activeSelectionBackground": "#ffffff50", + "list.focusAndSelectionBackground": "#ffffff60", + "list.inactiveSelectionBackground": "#ffffff40", + "list.hoverBackground": "#ffffff30", + "list.dropBackground": "#ffffff60", + "pickerGroup.foreground": "#bbdaff", + "editor.background": "#002451", + "editor.foreground": "#ffffff", + "editor.selectionBackground": "#003f8e", + "editor.lineHighlightBackground": "#00346e", + "editorCursor.foreground": "#ffffff", + "editorWhitespace.foreground": "#404f7d", + "editorWidget.background": "#001c40", + "editorHoverWidget.background": "#001c40", + "editorHoverWidget.border": "#ffffff44", + "editorGroup.border": "#404f7d", + "editorGroupHeader.tabsBackground": "#001733", + "tab.inactiveBackground": "#001c40", + "statusBar.background": "#001126", + "statusBar.noFolderBackground": "#001126", + "activityBar.background": "#001733", + "activityBarBadge.background": "#bbdaff", + "activityBarBadge.foreground": "#001733", + "sideBar.background": "#001c40", + "statusBar.debuggingBackground": "#ffeead", + "terminal.ansiBlack": "#111111", + "terminal.ansiRed": "#ff9da4", + "terminal.ansiGreen": "#d1f1a9", + "terminal.ansiYellow": "#ffeead", + "terminal.ansiBlue": "#bbdaff", + "terminal.ansiMagenta": "#ebbbff", + "terminal.ansiCyan": "#99ffff", + "terminal.ansiWhite": "#cccccc", + "terminal.ansiBrightBlack": "#333333", + "terminal.ansiBrightRed": "#ff7882", + "terminal.ansiBrightGreen": "#b8f171", + "terminal.ansiBrightYellow": "#ffe580", + "terminal.ansiBrightBlue": "#80baff", + "terminal.ansiBrightMagenta": "#d778ff", + "terminal.ansiBrightCyan": "#78ffff", + "terminal.ansiBrightWhite": "#ffffff" }, "tokenColors": [ { diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index df8c421914bc8..10a24f7f8ccee 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -1954,10 +1954,10 @@ function createFakeLinesDiv(): HTMLElement { const defaultInsertColor = Color.fromRGBA(new RGBA(155, 185, 85, 255 * 0.2)); const defaultRemoveColor = Color.fromRGBA(new RGBA(255, 0, 0, 255 * 0.2)); -export const diffInserted = registerColor('diffEditorInserted', { dark: defaultInsertColor, light: defaultInsertColor, hc: null }, nls.localize('diffEditorInserted', 'Background color for text that got inserted.')); -export const diffRemoved = registerColor('diffEditorRemoved', { dark: defaultRemoveColor, light: defaultRemoveColor, hc: null }, nls.localize('diffEditorRemoved', 'Background color for text that got removed.')); -export const diffInsertedOutline = registerColor('diffEditorInsertedOutline', { dark: null, light: null, hc: '#33ff2eff' }, nls.localize('diffEditorInsertedOutline', 'Outline color for the text that got inserted.')); -export const diffRemovedOutline = registerColor('diffEditorRemovedOutline', { dark: null, light: null, hc: '#FF008F' }, nls.localize('diffEditorRemovedOutline', 'Outline color for text that got removed.')); +export const diffInserted = registerColor('diffEditor.insertedTextBackground', { dark: defaultInsertColor, light: defaultInsertColor, hc: null }, nls.localize('diffEditorInserted', 'Background color for text that got inserted.')); +export const diffRemoved = registerColor('diffEditor.removedTextBackground', { dark: defaultRemoveColor, light: defaultRemoveColor, hc: null }, nls.localize('diffEditorRemoved', 'Background color for text that got removed.')); +export const diffInsertedOutline = registerColor('diffEditor.insertedTextBorder', { dark: null, light: null, hc: '#33ff2eff' }, nls.localize('diffEditorInsertedOutline', 'Outline color for the text that got inserted.')); +export const diffRemovedOutline = registerColor('diffEditor.removedTextBorder', { dark: null, light: null, hc: '#FF008F' }, nls.localize('diffEditorRemovedOutline', 'Outline color for text that got removed.')); registerThemingParticipant((theme, collector) => { diff --git a/src/vs/editor/common/view/editorColorRegistry.ts b/src/vs/editor/common/view/editorColorRegistry.ts index 662f89656a815..e6a96f190434f 100644 --- a/src/vs/editor/common/view/editorColorRegistry.ts +++ b/src/vs/editor/common/view/editorColorRegistry.ts @@ -11,13 +11,13 @@ import { Color } from 'vs/base/common/color'; /** * Definition of the editor colors */ -export const editorLineHighlight = registerColor('editorLineHighlight', { dark: null, light: null, hc: null }, nls.localize('lineHighlight', 'Background color for the highlight of line at the cursor position.')); -export const editorLineHighlightBorder = registerColor('editorLineHighlightBorder', { dark: '#282828', light: '#eeeeee', hc: '#f38518' }, nls.localize('lineHighlightBorderBox', 'Background color for the border around the line at the cursor position.')); -export const editorRangeHighlight = registerColor('editorRangeHighlight', { dark: '#ffffff0b', light: '#fdff0033', hc: null }, nls.localize('rangeHighlight', 'Background color of highlighted ranges, like by quick open and find features.')); -export const editorCursor = registerColor('editorCursor', { dark: '#AEAFAD', light: Color.black, hc: Color.white }, nls.localize('caret', 'Color of the editor cursor.')); -export const editorWhitespaces = registerColor('editorWhitespaces', { dark: '#e3e4e229', light: '#33333333', hc: '#e3e4e229' }, nls.localize('editorWhitespaces', 'Color of whitespace characters in the editor.')); -export const editorIndentGuides = registerColor('editorIndentGuides', { dark: editorWhitespaces, light: editorWhitespaces, hc: editorWhitespaces }, nls.localize('editorIndentGuides', 'Color of the editor indentation guides.')); -export const editorLineNumbers = registerColor('editorLineNumbers', { dark: '#5A5A5A', light: '#2B91AF', hc: Color.white }, nls.localize('editorLineNumbers', 'Color of editor line numbers.')); +export const editorLineHighlight = registerColor('editor.lineHighlightBackground', { dark: null, light: null, hc: null }, nls.localize('lineHighlight', 'Background color for the highlight of line at the cursor position.')); +export const editorLineHighlightBorder = registerColor('editor.lineHighlightBorder', { dark: '#282828', light: '#eeeeee', hc: '#f38518' }, nls.localize('lineHighlightBorderBox', 'Background color for the border around the line at the cursor position.')); +export const editorRangeHighlight = registerColor('editor.rangeHighlightBackground', { dark: '#ffffff0b', light: '#fdff0033', hc: null }, nls.localize('rangeHighlight', 'Background color of highlighted ranges, like by quick open and find features.')); +export const editorCursor = registerColor('editorCursor.foreground', { dark: '#AEAFAD', light: Color.black, hc: Color.white }, nls.localize('caret', 'Color of the editor cursor.')); +export const editorWhitespaces = registerColor('editorWhitespace.foreground', { dark: '#e3e4e229', light: '#33333333', hc: '#e3e4e229' }, nls.localize('editorWhitespaces', 'Color of whitespace characters in the editor.')); +export const editorIndentGuides = registerColor('editorIndentGuide.background', { dark: editorWhitespaces, light: editorWhitespaces, hc: editorWhitespaces }, nls.localize('editorIndentGuides', 'Color of the editor indentation guides.')); +export const editorLineNumbers = registerColor('editorLineNumber.foreground', { dark: '#5A5A5A', light: '#2B91AF', hc: Color.white }, nls.localize('editorLineNumbers', 'Color of editor line numbers.')); // contains all color rules that used to defined in editor/browser/widget/editor.css diff --git a/src/vs/editor/contrib/gotoError/browser/gotoError.ts b/src/vs/editor/contrib/gotoError/browser/gotoError.ts index 4c6a75505073c..30de9d1b44621 100644 --- a/src/vs/editor/contrib/gotoError/browser/gotoError.ts +++ b/src/vs/editor/contrib/gotoError/browser/gotoError.ts @@ -486,6 +486,6 @@ CommonEditorRegistry.registerEditorCommand(new MarkerCommand({ // theming -export const editorMarkerNavigationError = registerColor('editorMarkerNavigationError', { dark: '#ff5a5a', light: '#ff5a5a', hc: '#ff5a5a' }, nls.localize('editorMarkerNavigationError', 'Editor marker navigation widget error color.')); -export const editorMarkerNavigationWarning = registerColor('editorMarkerNavigationWarning', { dark: '#5aac5a', light: '#5aac5a', hc: '#5aac5a' }, nls.localize('editorMarkerNavigationWarning', 'Editor marker navigation widget warning color.')); -export const editorMarkerNavigationBackground = registerColor('editorMarkerNavigationBackground', { dark: '#2D2D30', light: Color.white, hc: '#0C141F' }, nls.localize('editorMarkerNavigationBackground', 'Editor marker navigation widget background.')); +export const editorMarkerNavigationError = registerColor('editorMarkerNavigationError.background', { dark: '#ff5a5a', light: '#ff5a5a', hc: '#ff5a5a' }, nls.localize('editorMarkerNavigationError', 'Editor marker navigation widget error color.')); +export const editorMarkerNavigationWarning = registerColor('editorMarkerNavigationWarning.background', { dark: '#5aac5a', light: '#5aac5a', hc: '#5aac5a' }, nls.localize('editorMarkerNavigationWarning', 'Editor marker navigation widget warning color.')); +export const editorMarkerNavigationBackground = registerColor('editorMarkerNavigation.background', { dark: '#2D2D30', light: Color.white, hc: '#0C141F' }, nls.localize('editorMarkerNavigationBackground', 'Editor marker navigation widget background.')); diff --git a/src/vs/editor/contrib/hover/browser/hover.ts b/src/vs/editor/contrib/hover/browser/hover.ts index b2625ee0fd092..6e424a667d65d 100644 --- a/src/vs/editor/contrib/hover/browser/hover.ts +++ b/src/vs/editor/contrib/hover/browser/hover.ts @@ -174,9 +174,9 @@ class ShowHoverAction extends EditorAction { // theming -export const editorHoverHighlight = registerColor('editorHoverHighlight', { light: '#ADD6FF26', dark: '#264f7840', hc: '#ADD6FF26' }, nls.localize('hoverHighlight', 'Highlight below the word for which a hover is shown.')); -export const editorHoverBackground = registerColor('editorHoverBackground', { light: '#F3F3F3', dark: '#2D2D30', hc: '#0C141F' }, nls.localize('hoverBackground', 'Background color of the editor hover.')); -export const editorHoverBorder = registerColor('editorHoverBorder', { light: '#CCCCCC', dark: '#555555', hc: '#CCCCCC' }, nls.localize('hoverBorder', 'Border color of the editor hover.')); +export const editorHoverHighlight = registerColor('editor.hoverHighlightBackground', { light: '#ADD6FF26', dark: '#264f7840', hc: '#ADD6FF26' }, nls.localize('hoverHighlight', 'Highlight below the word for which a hover is shown.')); +export const editorHoverBackground = registerColor('editorHoverWidget.background', { light: '#F3F3F3', dark: '#2D2D30', hc: '#0C141F' }, nls.localize('hoverBackground', 'Background color of the editor hover.')); +export const editorHoverBorder = registerColor('editorHoverWidget.border', { light: '#CCCCCC', dark: '#555555', hc: '#CCCCCC' }, nls.localize('hoverBorder', 'Border color of the editor hover.')); registerThemingParticipant((theme, collector) => { let editorHoverHighlightColor = theme.getColor(editorHoverHighlight); diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index c23aad4e08c50..097aa4ed1c59b 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -797,20 +797,20 @@ export class ReferenceWidget extends PeekViewWidget { // theming -export const peekViewTitleBackground = registerColor('peekViewTitleBackground', { dark: '#1E1E1E', light: '#FFFFFF', hc: '#0C141F' }, nls.localize('peekViewTitleBackground', 'Background color of the peek view title area.')); -export const peekViewTitleForeground = registerColor('peekViewTitleForeground', { dark: '#FFFFFF', light: '#333333', hc: '#FFFFFF' }, nls.localize('peekViewTitleForeground', 'Color of the peek view title.')); -export const peekViewTitleInfoForeground = registerColor('peekViewTitleInfoForeground', { dark: '#ccccccb3', light: '#6c6c6cb3', hc: '#FFFFFF99' }, nls.localize('peekViewTitleInfoForeground', 'Color of the peek view title info.')); -export const peekViewBorder = registerColor('peekViewBorder', { dark: '#007acc', light: '#007acc', hc: contrastBorder }, nls.localize('peekViewBorder', 'Color of the peek view borders and arrow.')); - -export const peekViewResultsBackground = registerColor('peekViewResultsBackground', { dark: '#252526', light: '#F3F3F3', hc: Color.black }, nls.localize('peekViewResultsBackground', 'Background color of the peek view result list.')); -export const peekViewResultsMatchForeground = registerColor('peekViewResultsMatchForeground', { dark: '#bbbbbb', light: '#646465', hc: Color.white }, nls.localize('peekViewResultsMatchForeground', 'Match entry foreground in the peek view result list.')); -export const peekViewResultsFileForeground = registerColor('peekViewResultsFileForeground', { dark: Color.white, light: '#1E1E1E', hc: Color.white }, nls.localize('peekViewResultsFileForeground', 'File entry foreground in the peek view result list.')); -export const peekViewResultsSelectionBackground = registerColor('peekViewResultsSelectionBackground', { dark: '#3399ff33', light: '#3399ff33', hc: null }, nls.localize('peekViewResultsSelectionBackground', 'Background color of the selected entry in the peek view result list.')); -export const peekViewResultsSelectionForeground = registerColor('peekViewResultsSelectionForeground', { dark: Color.white, light: '#6C6C6C', hc: Color.white }, nls.localize('peekViewResultsSelectionForeground', 'Foreground color of the selected entry in the peek view result list.')); -export const peekViewEditorBackground = registerColor('peekViewEditorBackground', { dark: '#001F33', light: '#F2F8FC', hc: Color.black }, nls.localize('peekViewEditorBackground', 'Background color of the peek view editor.')); - -export const peekViewResultsMatchHighlight = registerColor('peekViewResultsMatchHighlight', { dark: '#ea5c004d', light: '#ea5c004d', hc: null }, nls.localize('peekViewResultsMatchHighlight', 'Match highlight color in the peek view result list.')); -export const peekViewEditorMatchHighlight = registerColor('peekViewEditorMatchHighlight', { dark: '#ff8f0099', light: '#f5d802de', hc: null }, nls.localize('peekViewEditorMatchHighlight', 'Match highlight color in the peek view editor.')); +export const peekViewTitleBackground = registerColor('peekViewTitle.background', { dark: '#1E1E1E', light: '#FFFFFF', hc: '#0C141F' }, nls.localize('peekViewTitleBackground', 'Background color of the peek view title area.')); +export const peekViewTitleForeground = registerColor('peekViewTitleLabel.foreground', { dark: '#FFFFFF', light: '#333333', hc: '#FFFFFF' }, nls.localize('peekViewTitleForeground', 'Color of the peek view title.')); +export const peekViewTitleInfoForeground = registerColor('peekViewTitleDescription.foreground', { dark: '#ccccccb3', light: '#6c6c6cb3', hc: '#FFFFFF99' }, nls.localize('peekViewTitleInfoForeground', 'Color of the peek view title info.')); +export const peekViewBorder = registerColor('peekView.border', { dark: '#007acc', light: '#007acc', hc: contrastBorder }, nls.localize('peekViewBorder', 'Color of the peek view borders and arrow.')); + +export const peekViewResultsBackground = registerColor('peekViewResult.background', { dark: '#252526', light: '#F3F3F3', hc: Color.black }, nls.localize('peekViewResultsBackground', 'Background color of the peek view result list.')); +export const peekViewResultsMatchForeground = registerColor('peekViewResult.lineForeground', { dark: '#bbbbbb', light: '#646465', hc: Color.white }, nls.localize('peekViewResultsMatchForeground', 'Match entry foreground in the peek view result list.')); +export const peekViewResultsFileForeground = registerColor('peekViewResult.fileForeground', { dark: Color.white, light: '#1E1E1E', hc: Color.white }, nls.localize('peekViewResultsFileForeground', 'File entry foreground in the peek view result list.')); +export const peekViewResultsSelectionBackground = registerColor('peekViewResult.selectionBackground', { dark: '#3399ff33', light: '#3399ff33', hc: null }, nls.localize('peekViewResultsSelectionBackground', 'Background color of the selected entry in the peek view result list.')); +export const peekViewResultsSelectionForeground = registerColor('peekViewResult.selectionForeground', { dark: Color.white, light: '#6C6C6C', hc: Color.white }, nls.localize('peekViewResultsSelectionForeground', 'Foreground color of the selected entry in the peek view result list.')); +export const peekViewEditorBackground = registerColor('peekViewEditor.background', { dark: '#001F33', light: '#F2F8FC', hc: Color.black }, nls.localize('peekViewEditorBackground', 'Background color of the peek view editor.')); + +export const peekViewResultsMatchHighlight = registerColor('peekViewResult.matchHighlightBackground', { dark: '#ea5c004d', light: '#ea5c004d', hc: null }, nls.localize('peekViewResultsMatchHighlight', 'Match highlight color in the peek view result list.')); +export const peekViewEditorMatchHighlight = registerColor('peekViewEditor.matchHighlightBackground', { dark: '#ff8f0099', light: '#f5d802de', hc: null }, nls.localize('peekViewEditorMatchHighlight', 'Match highlight color in the peek view editor.')); registerThemingParticipant((theme, collector) => { diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 729331aa2773c..cb72555451c2d 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -47,11 +47,11 @@ interface ISuggestionTemplateData { /** * Suggest widget colors */ -export const editorSuggestWidgetBackground = registerColor('editorSuggestWidgetBackground', { dark: editorWidgetBackground, light: editorWidgetBackground, hc: editorWidgetBackground }, nls.localize('editorSuggestWidgetBackground', 'Background color of the suggest widget.')); -export const editorSuggestWidgetBorder = registerColor('editorSuggestWidgetBorder', { dark: '#454545', light: '#C8C8C8', hc: contrastBorder }, nls.localize('editorSuggestWidgetBorder', 'Border color of the suggest widget.')); -export const editorSuggestWidgetForeground = registerColor('editorSuggestWidgetForeground', { dark: editorForeground, light: editorForeground, hc: editorForeground }, nls.localize('editorSuggestWidgetForeground', 'Foreground color of the suggest widget.')); -export const editorSuggestWidgetSelectedBackground = registerColor('editorSuggestWidgetSelectedBackground', { dark: listFocusBackground, light: listFocusBackground, hc: listFocusBackground }, nls.localize('editorSuggestWidgetSelectedBackground', 'Background color of the selected entry in the suggest widget.')); -export const editorSuggestWidgetHighlightForeground = registerColor('editorSuggestWidgetHighlightForeground', { dark: listHighlightForeground, light: listHighlightForeground, hc: listHighlightForeground }, nls.localize('editorSuggestWidgetHighlightForeground', 'Color of the match highlights in the suggest widget.')); +export const editorSuggestWidgetBackground = registerColor('editorSuggestWidget.background', { dark: editorWidgetBackground, light: editorWidgetBackground, hc: editorWidgetBackground }, nls.localize('editorSuggestWidgetBackground', 'Background color of the suggest widget.')); +export const editorSuggestWidgetBorder = registerColor('editorSuggestWidget.border', { dark: '#454545', light: '#C8C8C8', hc: contrastBorder }, nls.localize('editorSuggestWidgetBorder', 'Border color of the suggest widget.')); +export const editorSuggestWidgetForeground = registerColor('editorSuggestWidget.foreground', { dark: editorForeground, light: editorForeground, hc: editorForeground }, nls.localize('editorSuggestWidgetForeground', 'Foreground color of the suggest widget.')); +export const editorSuggestWidgetSelectedBackground = registerColor('editorSuggestWidget.selectedBackground', { dark: listFocusBackground, light: listFocusBackground, hc: listFocusBackground }, nls.localize('editorSuggestWidgetSelectedBackground', 'Background color of the selected entry in the suggest widget.')); +export const editorSuggestWidgetHighlightForeground = registerColor('editorSuggestWidget.highlightForeground', { dark: listHighlightForeground, light: listHighlightForeground, hc: listHighlightForeground }, nls.localize('editorSuggestWidgetHighlightForeground', 'Color of the match highlights in the suggest widget.')); const colorRegExp = /^(#([\da-f]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1|0?\.\d+)\)|(rgb|hsl)\(\s*\d{1,3}%?(\s*,\s*\d{1,3}%?){2}\s*\))$/i; diff --git a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts index 8adf5cded6db0..720a2871a70a7 100644 --- a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts +++ b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts @@ -19,8 +19,8 @@ import { registerColor, editorSelectionHighlight, activeContrastBorder } from 'v import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { CursorChangeReason, ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -export const editorWordHighlight = registerColor('editorWordHighlight', { dark: '#575757B8', light: '#57575740', hc: null }, nls.localize('wordHighlight', 'Background color of a symbol during read-access, like reading a variable.')); -export const editorWordHighlightStrong = registerColor('editorWordHighlightStrong', { dark: '#004972B8', light: '#0e639c40', hc: null }, nls.localize('wordHighlightStrong', 'Background color of a symbol during write-access, like writing to a variable.')); +export const editorWordHighlight = registerColor('editor.wordHighlightBackground', { dark: '#575757B8', light: '#57575740', hc: null }, nls.localize('wordHighlight', 'Background color of a symbol during read-access, like reading a variable.')); +export const editorWordHighlightStrong = registerColor('editor.wordHighlightStrongBackground', { dark: '#004972B8', light: '#0e639c40', hc: null }, nls.localize('wordHighlightStrong', 'Background color of a symbol during write-access, like writing to a variable.')); export function getOccurrencesAtPosition(model: editorCommon.IReadOnlyModel, position: Position): TPromise { diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index c86e37e4e5a88..1617e698148e3 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -123,84 +123,84 @@ export const foreground = registerColor('foreground', { dark: '#CCCCCC', light: export const focusBorder = registerColor('focusBorder', { dark: Color.fromRGBA(new RGBA(14, 99, 156)).transparent(0.6), light: Color.fromRGBA(new RGBA(0, 122, 204)).transparent(0.4), hc: '#F38518' }, nls.localize('focusBorder', "Overall border color for focused elements. This color is only used if not overridden by a component.")); export const contrastBorder = registerColor('contrastBorder', { light: null, dark: null, hc: '#6FC3DF' }, nls.localize('contrastBorder', "An extra border around elements to separate them from others for greater contrast.")); -export const activeContrastBorder = registerColor('activeContrastBorder', { light: null, dark: null, hc: focusBorder }, nls.localize('activeContrastBorder', "An extra border around active elements to separate them from others for greater contrast.")); +export const activeContrastBorder = registerColor('contrastActiveBorder', { light: null, dark: null, hc: focusBorder }, nls.localize('activeContrastBorder', "An extra border around active elements to separate them from others for greater contrast.")); // ----- widgets -export const widgetShadow = registerColor('widgetShadow', { dark: '#000000', light: '#A8A8A8', hc: null }, nls.localize('widgetShadow', 'Shadow color of widgets such as find/replace inside the editor.')); - -export const inputBackground = registerColor('inputBoxBackground', { dark: '#3C3C3C', light: Color.white, hc: Color.black }, nls.localize('inputBoxBackground', "Input box background.")); -export const inputForeground = registerColor('inputBoxForeground', { dark: foreground, light: foreground, hc: foreground }, nls.localize('inputBoxForeground', "Input box foreground.")); -export const inputBorder = registerColor('inputBoxBorder', { dark: null, light: null, hc: contrastBorder }, nls.localize('inputBoxBorder', "Input box border.")); -export const inputActiveOptionBorder = registerColor('inputBoxActiveOptionBorder', { dark: '#007ACC', light: '#007ACC', hc: activeContrastBorder }, nls.localize('inputBoxActiveOptionBorder', "Border color of activated options in input fields.")); -export const inputValidationInfoBackground = registerColor('inputValidationInfoBackground', { dark: '#063B49', light: '#D6ECF2', hc: Color.black }, nls.localize('inputValidationInfoBackground', "Input validation background color for information severity.")); -export const inputValidationInfoBorder = registerColor('inputValidationInfoBorder', { dark: '#55AAFF', light: '#009CCC', hc: '#6FC3DF' }, nls.localize('inputValidationInfoBorder', "Input validation border color for information severity.")); -export const inputValidationWarningBackground = registerColor('inputValidationWarningBackground', { dark: '#352A05', light: '#F6F5D2', hc: Color.black }, nls.localize('inputValidationWarningBackground', "Input validation background color for information warning.")); -export const inputValidationWarningBorder = registerColor('inputValidationWarningBorder', { dark: '#B89500', light: '#F2CB1D', hc: '#B89500' }, nls.localize('inputValidationWarningBorder', "Input validation border color for warning severity.")); -export const inputValidationErrorBackground = registerColor('inputValidationErrorBackground', { dark: '#5A1D1D', light: '#F2DEDE', hc: Color.black }, nls.localize('inputValidationErrorBackground', "Input validation background color for error severity.")); -export const inputValidationErrorBorder = registerColor('inputValidationErrorBorder', { dark: '#BE1100', light: '#E51400', hc: '#BE1100' }, nls.localize('inputValidationErrorBorder', "Input validation border color for error severity.")); - -export const selectBackground = registerColor('dropdownBackground', { dark: '#3C3C3C', light: Color.white, hc: Color.black }, nls.localize('dropdownBackground', "Dropdown background.")); -export const selectForeground = registerColor('dropdownForeground', { dark: '#F0F0F0', light: null, hc: Color.white }, nls.localize('dropdownForeground', "Dropdown foreground.")); -export const selectBorder = registerColor('dropdownBorder', { dark: selectBackground, light: '#CECECE', hc: contrastBorder }, nls.localize('dropdownBorder', "Dropdown border.")); - -export const listFocusBackground = registerColor('listFocusBackground', { dark: '#073655', light: '#DCEBFC', hc: null }, nls.localize('listFocusBackground', "List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); -export const listActiveSelectionBackground = registerColor('listActiveSelectionBackground', { dark: '#0E639C', light: '#4FA7FF', hc: null }, nls.localize('listActiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); -export const listInactiveSelectionBackground = registerColor('listInactiveSelectionBackground', { dark: '#3F3F46', light: '#CCCEDB', hc: null }, nls.localize('listInactiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); -export const listActiveSelectionForeground = registerColor('listActiveSelectionForeground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('listActiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); -export const listFocusAndSelectionBackground = registerColor('listFocusAndSelectionBackground', { dark: '#094771', light: '#3399FF', hc: null }, nls.localize('listFocusAndSelectionBackground', "List/Tree background color for the focused and selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not. This color wins over the individual selection and focus colors.")); -export const listFocusAndSelectionForeground = registerColor('listFocusAndSelectionForeground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('listFocusAndSelectionForeground', "List/Tree foreground color for the focused and selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not. This color wins over the individual selection and focus colors.")); -export const listHoverBackground = registerColor('listHoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, nls.localize('listHoverBackground', "List/Tree background when hovering over items using the mouse.")); -export const listDropBackground = registerColor('listDropBackground', { dark: '#383B3D', light: '#DDECFF', hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse.")); -export const listHighlightForeground = registerColor('listHighlightForeground', { dark: '#219AE4', light: '#186B9E', hc: '#219AE4' }, nls.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.')); - -export const pickerGroupForeground = registerColor('pickerGroupForeground', { dark: Color.fromHex('#0097FB').transparent(0.6), light: Color.fromHex('#007ACC').transparent(0.6), hc: Color.white }, nls.localize('pickerGroupForeground', "Quick picker color for grouping labels.")); -export const pickerGroupBorder = registerColor('pickerGroupBorder', { dark: '#3F3F46', light: '#CCCEDB', hc: Color.white }, nls.localize('pickerGroupBorder', "Quick picker color for grouping borders.")); - -export const buttonForeground = registerColor('buttonForeground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('buttonForeground', "Button foreground color.")); -export const buttonBackground = registerColor('buttonBackground', { dark: '#0E639C', light: '#007ACC', hc: null }, nls.localize('buttonBackground', "Button background color.")); -export const buttonHoverBackground = registerColor('buttonHoverBackground', { dark: '#006BB3', light: '#006BB3', hc: null }, nls.localize('buttonHoverBackground', "Button background color when hovering.")); - -export const scrollbarShadow = registerColor('scrollbarShadow', { dark: '#000000', light: '#DDDDDD', hc: null }, nls.localize('scrollbarShadow', "Scrollbar shadow to indicate that the view is scrolled.")); -export const scrollbarSliderBackground = registerColor('scrollbarSliderBackground', { dark: Color.fromHex('#797979').transparent(0.4), light: Color.fromHex('#646464').transparent(0.4), hc: Color.fromHex(contrastBorder).transparent(0.6) }, nls.localize('scrollbarSliderBackground', "Slider background color.")); -export const scrollbarSliderHoverBackground = registerColor('scrollbarSliderHoverBackground', { dark: Color.fromHex('#646464').transparent(0.7), light: Color.fromHex('#646464').transparent(0.7), hc: Color.fromHex(contrastBorder).transparent(0.8) }, nls.localize('scrollbarSliderHoverBackground', "Slider background color when hovering.")); -export const scrollbarSliderActiveBackground = registerColor('scrollbarSliderActiveBackground', { dark: Color.fromHex('#BFBFBF').transparent(0.4), light: Color.fromHex('#000000').transparent(0.6), hc: Color.fromHex(contrastBorder) }, nls.localize('scrollbarSliderActiveBackground', "Slider background color when active.")); +export const widgetShadow = registerColor('widget.shadow', { dark: '#000000', light: '#A8A8A8', hc: null }, nls.localize('widgetShadow', 'Shadow color of widgets such as find/replace inside the editor.')); + +export const inputBackground = registerColor('input.background', { dark: '#3C3C3C', light: Color.white, hc: Color.black }, nls.localize('inputBoxBackground', "Input box background.")); +export const inputForeground = registerColor('input.foreground', { dark: foreground, light: foreground, hc: foreground }, nls.localize('inputBoxForeground', "Input box foreground.")); +export const inputBorder = registerColor('input.border', { dark: null, light: null, hc: contrastBorder }, nls.localize('inputBoxBorder', "Input box border.")); +export const inputActiveOptionBorder = registerColor('inputOption.activeBorder', { dark: '#007ACC', light: '#007ACC', hc: activeContrastBorder }, nls.localize('inputBoxActiveOptionBorder', "Border color of activated options in input fields.")); +export const inputValidationInfoBackground = registerColor('inputValidation.infoBackground', { dark: '#063B49', light: '#D6ECF2', hc: Color.black }, nls.localize('inputValidationInfoBackground', "Input validation background color for information severity.")); +export const inputValidationInfoBorder = registerColor('inputValidation.infoBorder', { dark: '#55AAFF', light: '#009CCC', hc: '#6FC3DF' }, nls.localize('inputValidationInfoBorder', "Input validation border color for information severity.")); +export const inputValidationWarningBackground = registerColor('inputValidation.warningBackground', { dark: '#352A05', light: '#F6F5D2', hc: Color.black }, nls.localize('inputValidationWarningBackground', "Input validation background color for information warning.")); +export const inputValidationWarningBorder = registerColor('inputValidation.warningBorder', { dark: '#B89500', light: '#F2CB1D', hc: '#B89500' }, nls.localize('inputValidationWarningBorder', "Input validation border color for warning severity.")); +export const inputValidationErrorBackground = registerColor('inputValidation.errorBackground', { dark: '#5A1D1D', light: '#F2DEDE', hc: Color.black }, nls.localize('inputValidationErrorBackground', "Input validation background color for error severity.")); +export const inputValidationErrorBorder = registerColor('inputValidation.errorBorder', { dark: '#BE1100', light: '#E51400', hc: '#BE1100' }, nls.localize('inputValidationErrorBorder', "Input validation border color for error severity.")); + +export const selectBackground = registerColor('dropdown.background', { dark: '#3C3C3C', light: Color.white, hc: Color.black }, nls.localize('dropdownBackground', "Dropdown background.")); +export const selectForeground = registerColor('dropdown.foreground', { dark: '#F0F0F0', light: null, hc: Color.white }, nls.localize('dropdownForeground', "Dropdown foreground.")); +export const selectBorder = registerColor('dropdown.border', { dark: selectBackground, light: '#CECECE', hc: contrastBorder }, nls.localize('dropdownBorder', "Dropdown border.")); + +export const listFocusBackground = registerColor('list.focusBackground', { dark: '#073655', light: '#DCEBFC', hc: null }, nls.localize('listFocusBackground', "List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); +export const listActiveSelectionBackground = registerColor('list.activeSelectionBackground', { dark: '#0E639C', light: '#4FA7FF', hc: null }, nls.localize('listActiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); +export const listInactiveSelectionBackground = registerColor('list.inactiveSelectionBackground', { dark: '#3F3F46', light: '#CCCEDB', hc: null }, nls.localize('listInactiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); +export const listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('listActiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); +export const listFocusAndSelectionBackground = registerColor('list.focusAndSelectionBackground', { dark: '#094771', light: '#3399FF', hc: null }, nls.localize('listFocusAndSelectionBackground', "List/Tree background color for the focused and selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not. This color wins over the individual selection and focus colors.")); +export const listFocusAndSelectionForeground = registerColor('list.focusAndSelectionForeground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('listFocusAndSelectionForeground', "List/Tree foreground color for the focused and selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not. This color wins over the individual selection and focus colors.")); +export const listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, nls.localize('listHoverBackground', "List/Tree background when hovering over items using the mouse.")); +export const listDropBackground = registerColor('list.dropBackground', { dark: '#383B3D', light: '#DDECFF', hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse.")); +export const listHighlightForeground = registerColor('list.highlightForeground', { dark: '#219AE4', light: '#186B9E', hc: '#219AE4' }, nls.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.')); + +export const pickerGroupForeground = registerColor('pickerGroup.foreground', { dark: Color.fromHex('#0097FB').transparent(0.6), light: Color.fromHex('#007ACC').transparent(0.6), hc: Color.white }, nls.localize('pickerGroupForeground', "Quick picker color for grouping labels.")); +export const pickerGroupBorder = registerColor('pickerGroup.border', { dark: '#3F3F46', light: '#CCCEDB', hc: Color.white }, nls.localize('pickerGroupBorder', "Quick picker color for grouping borders.")); + +export const buttonForeground = registerColor('button.foreground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('buttonForeground', "Button foreground color.")); +export const buttonBackground = registerColor('button.background', { dark: '#0E639C', light: '#007ACC', hc: null }, nls.localize('buttonBackground', "Button background color.")); +export const buttonHoverBackground = registerColor('button.hoverBackground', { dark: '#006BB3', light: '#006BB3', hc: null }, nls.localize('buttonHoverBackground', "Button background color when hovering.")); + +export const scrollbarShadow = registerColor('scrollbar.shadow', { dark: '#000000', light: '#DDDDDD', hc: null }, nls.localize('scrollbarShadow', "Scrollbar shadow to indicate that the view is scrolled.")); +export const scrollbarSliderBackground = registerColor('scrollbarSlider.background', { dark: Color.fromHex('#797979').transparent(0.4), light: Color.fromHex('#646464').transparent(0.4), hc: Color.fromHex(contrastBorder).transparent(0.6) }, nls.localize('scrollbarSliderBackground', "Slider background color.")); +export const scrollbarSliderHoverBackground = registerColor('scrollbarSlider.hoverBackground', { dark: Color.fromHex('#646464').transparent(0.7), light: Color.fromHex('#646464').transparent(0.7), hc: Color.fromHex(contrastBorder).transparent(0.8) }, nls.localize('scrollbarSliderHoverBackground', "Slider background color when hovering.")); +export const scrollbarSliderActiveBackground = registerColor('scrollbarSlider.activeBackground', { dark: Color.fromHex('#BFBFBF').transparent(0.4), light: Color.fromHex('#000000').transparent(0.6), hc: Color.fromHex(contrastBorder) }, nls.localize('scrollbarSliderActiveBackground', "Slider background color when active.")); /** * Editor background color. * Because of bug https://monacotools.visualstudio.com/DefaultCollection/Monaco/_workitems/edit/13254 * we are *not* using the color white (or #ffffff, rgba(255,255,255)) but something very close to white. */ -export const editorBackground = registerColor('editorBackground', { light: '#fffffe', dark: '#1E1E1E', hc: Color.black }, nls.localize('editorBackground', "Editor background color.")); +export const editorBackground = registerColor('editor.background', { light: '#fffffe', dark: '#1E1E1E', hc: Color.black }, nls.localize('editorBackground', "Editor background color.")); /** * Editor foreground color. */ -export const editorForeground = registerColor('editorForeground', { light: '#333333', dark: '#BBBBBB', hc: Color.white }, nls.localize('editorForeground', "Editor default foreground color.")); +export const editorForeground = registerColor('editor.foreground', { light: '#333333', dark: '#BBBBBB', hc: Color.white }, nls.localize('editorForeground', "Editor default foreground color.")); /** * Editor selection colors. */ -export const editorSelection = registerColor('editorSelection', { light: '#ADD6FF', dark: '#264F78', hc: '#f3f518' }, nls.localize('editorSelection', "Color of the editor selection.")); -export const editorInactiveSelection = registerColor('editorInactiveSelection', { light: transparent(editorSelection, 0.5), dark: transparent(editorSelection, 0.5), hc: null }, nls.localize('editorInactiveSelection', "Color of the selection in an inactive editor.")); -export const editorSelectionHighlight = registerColor('editorSelectionHighlight', { light: lessProminent(editorSelection, editorBackground, 0.3, 0.6), dark: lessProminent(editorSelection, editorBackground, 0.3, 0.6), hc: null }, nls.localize('editorSelectionHighlight', 'Color for regions with the same content as the selection.')); +export const editorSelection = registerColor('editor.selectionBackground', { light: '#ADD6FF', dark: '#264F78', hc: '#f3f518' }, nls.localize('editorSelection', "Color of the editor selection.")); +export const editorInactiveSelection = registerColor('editor.inactiveSelectionBackground', { light: transparent(editorSelection, 0.5), dark: transparent(editorSelection, 0.5), hc: null }, nls.localize('editorInactiveSelection', "Color of the selection in an inactive editor.")); +export const editorSelectionHighlight = registerColor('editor.selectionHighlightBackground', { light: lessProminent(editorSelection, editorBackground, 0.3, 0.6), dark: lessProminent(editorSelection, editorBackground, 0.3, 0.6), hc: null }, nls.localize('editorSelectionHighlight', 'Color for regions with the same content as the selection.')); /** * Editor find match colors. */ -export const editorFindMatch = registerColor('editorFindMatch', { light: '#A8AC94', dark: '#515C6A', hc: null }, nls.localize('editorFindMatch', "Color of the current search match.")); -export const editorFindMatchHighlight = registerColor('editorFindMatchHighlight', { light: '#EA5C0055', dark: '#EA5C0055', hc: null }, nls.localize('findMatchHighlight', "Color of the other search matches.")); -export const editorFindRangeHighlight = registerColor('editorFindRangeHighlight', { dark: '#3a3d4166', light: '#b4b4b44d', hc: null }, nls.localize('findRangeHighlight', "Color the range limiting the search.")); +export const editorFindMatch = registerColor('editor.findMatchBackground', { light: '#A8AC94', dark: '#515C6A', hc: null }, nls.localize('editorFindMatch', "Color of the current search match.")); +export const editorFindMatchHighlight = registerColor('editor.findMatchHighlightBackground', { light: '#EA5C0055', dark: '#EA5C0055', hc: null }, nls.localize('findMatchHighlight', "Color of the other search matches.")); +export const editorFindRangeHighlight = registerColor('editor.findRangeHighlightBackground', { dark: '#3a3d4166', light: '#b4b4b44d', hc: null }, nls.localize('findRangeHighlight', "Color the range limiting the search.")); /** * Editor link colors */ -export const editorActiveLinkForeground = registerColor('editorActiveLinkForeground', { dark: '#4E94CE', light: Color.black, hc: Color.cyan }, nls.localize('activeLinkForeground', 'Color of active links.')); -export const editorLinkForeground = registerColor('editorLinkForeground', { dark: null, light: null, hc: null }, nls.localize('linkForeground', 'Color of links.')); +export const editorActiveLinkForeground = registerColor('editorLink.activeForeground', { dark: '#4E94CE', light: Color.black, hc: Color.cyan }, nls.localize('activeLinkForeground', 'Color of active links.')); +export const editorLinkForeground = registerColor('editorLink.foreground', { dark: null, light: null, hc: null }, nls.localize('linkForeground', 'Color of links.')); /** * Find widget */ -export const editorWidgetBackground = registerColor('editorWidgetBackground', { dark: '#2D2D30', light: '#EFEFF2', hc: '#0C141F' }, nls.localize('editorWidgetBackground', 'Background color of editor widgets, such as find/replace.')); +export const editorWidgetBackground = registerColor('editorWidget.background', { dark: '#2D2D30', light: '#EFEFF2', hc: '#0C141F' }, nls.localize('editorWidgetBackground', 'Background color of editor widgets, such as find/replace.')); // ----- color functions diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 53c4747a8f6d1..389e76cdbac35 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -11,49 +11,49 @@ import { Color, RGBA } from 'vs/base/common/color'; // < --- Tabs --- > -export const TABS_CONTAINER_BACKGROUND = registerColor('tabsContainerBackground', { +export const TABS_CONTAINER_BACKGROUND = registerColor('editorGroupHeader.tabsBackground', { dark: '#252526', light: '#F3F3F3', hc: null }, nls.localize('tabsContainerBackground', "Background color of the tabs container. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); -export const TAB_ACTIVE_BACKGROUND = registerColor('tabActiveBackground', { +export const TAB_ACTIVE_BACKGROUND = registerColor('tab.activeBackground', { dark: editorBackground, light: editorBackground, hc: editorBackground }, nls.localize('tabActiveBackground', "Active tab background color. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); -export const TAB_INACTIVE_BACKGROUND = registerColor('tabInactiveBackground', { +export const TAB_INACTIVE_BACKGROUND = registerColor('tab.inactiveBackground', { dark: '#2D2D2D', light: '#ECECEC', hc: null }, nls.localize('tabInactiveBackground', "Inactive tab background color. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); -export const TAB_BORDER = registerColor('tabBorder', { +export const TAB_BORDER = registerColor('tab.border', { dark: '#252526', light: '#F3F3F3', hc: contrastBorder }, nls.localize('tabBorder', "Border to separate tabs from each other. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); -export const TAB_ACTIVE_GROUP_ACTIVE_FOREGROUND = registerColor('tabActiveEditorGroupActiveForeground', { +export const TAB_ACTIVE_GROUP_ACTIVE_FOREGROUND = registerColor('tab.activeForeground', { dark: Color.white, light: Color.fromRGBA(new RGBA(51, 51, 51)), hc: Color.white }, nls.localize('tabActiveEditorGroupActiveForeground', "Active tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); -export const TAB_ACTIVE_GROUP_INACTIVE_FOREGROUND = registerColor('tabActiveEditorGroupInactiveForeground', { +export const TAB_ACTIVE_GROUP_INACTIVE_FOREGROUND = registerColor('tab.activeWithInactiveEditorGroupForeground', { dark: Color.white.transparent(0.5), light: Color.fromRGBA(new RGBA(51, 51, 51)).transparent(0.7), hc: Color.white }, nls.localize('tabActiveEditorGroupInactiveForeground', "Active tab foreground color in an inactive group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); -export const TAB_INACTIVE_GROUP_ACTIVE_FOREGROUND = registerColor('tabInactiveEditorGroupActiveForeground', { +export const TAB_INACTIVE_GROUP_ACTIVE_FOREGROUND = registerColor('tab.inactiveForeground', { dark: Color.white.transparent(0.5), light: Color.fromRGBA(new RGBA(51, 51, 51)).transparent(0.5), hc: Color.white }, nls.localize('tabInactiveEditorGroupActiveForeground', "Inactive tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); -export const TAB_INACTIVE_GROUP_INACTIVE_FOREGROUND = registerColor('tabInactiveEditorGroupInactiveForeground', { +export const TAB_INACTIVE_GROUP_INACTIVE_FOREGROUND = registerColor('tab.inactiveWithInactiveEditorGroupForeground', { dark: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.5).transparent(0.5), light: Color.fromRGBA(new RGBA(51, 51, 51)).transparent(0.5).transparent(0.7), hc: Color.white @@ -63,31 +63,31 @@ export const TAB_INACTIVE_GROUP_INACTIVE_FOREGROUND = registerColor('tabInactive // < --- Editors --- > -export const EDITOR_GROUP_BACKGROUND = registerColor('editorGroupBackground', { +export const EDITOR_GROUP_BACKGROUND = registerColor('editorGroup.background', { dark: '#2D2D2D', light: '#ECECEC', hc: null }, nls.localize('editorGroupBackground', "Background color of an editor group. Editor groups are the containers of editors. The background color shows up when dragging editor groups around.")); -export const EDITOR_GROUP_HEADER_BACKGROUND = registerColor('editorGroupHeaderBackground', { +export const EDITOR_GROUP_HEADER_BACKGROUND = registerColor('editorGroupHeader.noTabsBackground', { dark: editorBackground, light: editorBackground, hc: editorBackground }, nls.localize('editorGroupHeaderBackground', "Background color of the editor group title header when tabs are disabled. Editor groups are the containers of editors.")); -export const EDITOR_GROUP_BORDER_COLOR = registerColor('editorGroupBorder', { +export const EDITOR_GROUP_BORDER_COLOR = registerColor('editorGroup.border', { dark: '#444444', light: '#E7E7E7', hc: contrastBorder }, nls.localize('editorGroupBorder', "Color to separate multiple editor groups from each other. Editor groups are the containers of editors.")); -export const EDITOR_DRAG_AND_DROP_BACKGROUND = registerColor('editorDragAndDropBackground', { +export const EDITOR_DRAG_AND_DROP_BACKGROUND = registerColor('editorGroup.dropBackground', { dark: Color.fromRGBA(new RGBA(83, 89, 93)).transparent(0.5), light: Color.fromRGBA(new RGBA(51, 153, 255)).transparent(0.18), hc: null }, nls.localize('editorDragAndDropBackground', "Background color when dragging editors around.")); -export const EDITOR_MASTER_DETAILS_BORDER = registerColor('editorMasterDetailsBorder', { +export const EDITOR_MASTER_DETAILS_BORDER = registerColor('masterDetailsEditor.border', { dark: '#000000', light: '#DDDDDD', hc: null @@ -96,31 +96,31 @@ export const EDITOR_MASTER_DETAILS_BORDER = registerColor('editorMasterDetailsBo // < --- Panels --- > -export const PANEL_BACKGROUND = registerColor('panelBackground', { +export const PANEL_BACKGROUND = registerColor('panel.background', { dark: editorBackground, light: editorBackground, hc: editorBackground }, nls.localize('panelBackground', "Panel background color. Panels are shown below the editor area and contain views like output and integrated terminal.")); -export const PANEL_BORDER_COLOR = registerColor('panelBorder', { +export const PANEL_BORDER_COLOR = registerColor('panel.border', { dark: Color.fromRGBA(new RGBA(128, 128, 128)).transparent(0.35), light: Color.fromRGBA(new RGBA(128, 128, 128)).transparent(0.35), hc: contrastBorder }, nls.localize('panelBorder', "Panel border color on the top separating to the editor. Panels are shown below the editor area and contain views like output and integrated terminal.")); -export const PANEL_ACTIVE_TITLE_COLOR = registerColor('panelActiveTitleForeground', { +export const PANEL_ACTIVE_TITLE_COLOR = registerColor('panelTitle.activeForeground', { dark: '#E7E7E7', light: '#424242', hc: Color.white }, nls.localize('panelActiveTitleForeground', "Title color for the active panel. Panels are shown below the editor area and contain views like output and integrated terminal.")); -export const PANEL_INACTIVE_TITLE_COLOR = registerColor('panelInactiveTitleForeground', { +export const PANEL_INACTIVE_TITLE_COLOR = registerColor('panelTitle.inactiveForeground', { dark: Color.fromRGBA(new RGBA(231, 231, 231)).transparent(0.5), light: Color.fromRGBA(new RGBA(66, 66, 66)).transparent(0.75), hc: Color.white }, nls.localize('panelInactiveTitleForeground', "Title color for the inactive panel. Panels are shown below the editor area and contain views like output and integrated terminal.")); -export const PANEL_ACTIVE_TITLE_BORDER = registerColor('panelActiveTitleBorder', { +export const PANEL_ACTIVE_TITLE_BORDER = registerColor('panelTitle.activeBorder', { dark: PANEL_BORDER_COLOR, light: PANEL_BORDER_COLOR, hc: contrastBorder @@ -130,43 +130,43 @@ export const PANEL_ACTIVE_TITLE_BORDER = registerColor('panelActiveTitleBorder', // < --- Status --- > -export const STATUS_BAR_FOREGROUND = registerColor('statusBarForeground', { +export const STATUS_BAR_FOREGROUND = registerColor('statusBar.foreground', { dark: '#FFFFFF', light: '#FFFFFF', hc: '#FFFFFF' }, nls.localize('statusBarForeground', "Status bar foreground color. The status bar is shown in the bottom of the window.")); -export const STATUS_BAR_BACKGROUND = registerColor('statusBarBackground', { +export const STATUS_BAR_BACKGROUND = registerColor('statusBar.background', { dark: '#007ACC', light: '#007ACC', hc: null }, nls.localize('statusBarBackground', "Standard status bar background color. The status bar is shown in the bottom of the window.")); -export const STATUS_BAR_NO_FOLDER_BACKGROUND = registerColor('statusBarNoFolderBackground', { +export const STATUS_BAR_NO_FOLDER_BACKGROUND = registerColor('statusBar.noFolderBackground', { dark: '#68217A', light: '#68217A', hc: null }, nls.localize('statusBarNoFolderBackground', "Status bar background color when no folder is opened. The status bar is shown in the bottom of the window.")); -export const STATUS_BAR_ITEM_ACTIVE_BACKGROUND = registerColor('statusBarItemActiveBackground', { +export const STATUS_BAR_ITEM_ACTIVE_BACKGROUND = registerColor('statusBarItem.activeBackground', { dark: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.18), light: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.18), hc: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.18) }, nls.localize('statusBarItemActiveBackground', "Status bar item background color when clicking. The status bar is shown in the bottom of the window.")); -export const STATUS_BAR_ITEM_HOVER_BACKGROUND = registerColor('statusBarItemHoverBackground', { +export const STATUS_BAR_ITEM_HOVER_BACKGROUND = registerColor('statusBarItem.hoverBackground', { dark: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12), light: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12), hc: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12) }, nls.localize('statusBarItemHoverBackground', "Status bar item background color when hovering. The status bar is shown in the bottom of the window.")); -export const STATUS_BAR_PROMINENT_ITEM_BACKGROUND = registerColor('statusBarProminentItemBackground', { +export const STATUS_BAR_PROMINENT_ITEM_BACKGROUND = registerColor('statusBarItem.prominentBackground', { dark: '#388A34', light: '#388A34', hc: '#3883A4' }, nls.localize('statusBarProminentItemBackground', "Status bar prominent items background color. Prominent items stand out from other status bar entries to indicate importance. The status bar is shown in the bottom of the window.")); -export const STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND = registerColor('statusBarProminentItemHoverBackground', { +export const STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND = registerColor('statusBarItem.prominentHoverBackground', { dark: '#369432', light: '#369432', hc: '#369432' @@ -176,31 +176,31 @@ export const STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND = registerColor('statusB // < --- Activity Bar --- > -export const ACTIVITY_BAR_BACKGROUND = registerColor('activityBarBackground', { +export const ACTIVITY_BAR_BACKGROUND = registerColor('activityBar.background', { dark: '#333333', light: '#2C2C2C', hc: '#000000' }, nls.localize('activityBarBackground', "Activity bar background color. The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); -export const ACTIVITY_BAR_FOREGROUND = registerColor('activityBarForeground', { +export const ACTIVITY_BAR_FOREGROUND = registerColor('activityBar.foreground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('activityBarForeground', "Activity bar foreground color (e.g. used for the icons). The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); -export const ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND = registerColor('activityBarDragAndDropBackground', { +export const ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND = registerColor('activityBar.dropBackground', { dark: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12), light: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12), hc: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12), }, nls.localize('activityBarDragAndDropBackground', "Drag and drop feedback color for the activity bar items. The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); -export const ACTIVITY_BAR_BADGE_BACKGROUND = registerColor('activityBarBadgeBackground', { +export const ACTIVITY_BAR_BADGE_BACKGROUND = registerColor('activityBarBadge.background', { dark: '#007ACC', light: '#007ACC', hc: '#000000' }, nls.localize('activityBarBadgeBackground', "Activity notification badge background color. The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); -export const ACTIVITY_BAR_BADGE_FOREGROUND = registerColor('activityBarBadgeForeground', { +export const ACTIVITY_BAR_BADGE_FOREGROUND = registerColor('activityBarBadge.foreground', { dark: Color.white, light: Color.white, hc: Color.white @@ -210,19 +210,19 @@ export const ACTIVITY_BAR_BADGE_FOREGROUND = registerColor('activityBarBadgeFore // < --- Side Bar --- > -export const SIDE_BAR_BACKGROUND = registerColor('sideBarBackground', { +export const SIDE_BAR_BACKGROUND = registerColor('sideBar.background', { dark: '#252526', light: '#F3F3F3', hc: '#000000' }, nls.localize('sideBarBackground', "Side bar background color. The side bar is the container for views like explorer and search.")); -export const SIDE_BAR_TITLE_FOREGROUND = registerColor('sideBarTitleForeground', { +export const SIDE_BAR_TITLE_FOREGROUND = registerColor('sideBarTitle.foreground', { dark: '#BBBBBB', light: '#6f6f6f', hc: '#FFFFFF' }, nls.localize('sideBarTitleForeground', "Side bar title foreground color. The side bar is the container for views like explorer and search.")); -export const SIDE_BAR_SECTION_HEADER_BACKGROUND = registerColor('sideBarSectionHeaderBackground', { +export const SIDE_BAR_SECTION_HEADER_BACKGROUND = registerColor('sideBarSectionHeader.background', { dark: Color.fromHex('#808080').transparent(0.2), light: Color.fromHex('#808080').transparent(0.2), hc: null @@ -232,25 +232,25 @@ export const SIDE_BAR_SECTION_HEADER_BACKGROUND = registerColor('sideBarSectionH // < --- Title Bar --- > -export const TITLE_BAR_ACTIVE_FOREGROUND = registerColor('titleBarActiveForeground', { +export const TITLE_BAR_ACTIVE_FOREGROUND = registerColor('titleBar.activeForeground', { dark: '#CCCCCC', light: '#333333', hc: '#FFFFFF' }, nls.localize('titleBarActiveForeground', "Title bar foreground when the window is active. Note that this color is currently only supported on macOS.")); -export const TITLE_BAR_INACTIVE_FOREGROUND = registerColor('titleBarInactiveForeground', { +export const TITLE_BAR_INACTIVE_FOREGROUND = registerColor('titleBar.inactiveForeground', { dark: Color.fromRGBA(new RGBA(204, 204, 204)).transparent(0.6), light: Color.fromRGBA(new RGBA(51, 51, 51)).transparent(0.6), hc: null }, nls.localize('titleBarInactiveForeground', "Title bar foreground when the window is inactive. Note that this color is currently only supported on macOS.")); -export const TITLE_BAR_ACTIVE_BACKGROUND = registerColor('titleBarActiveBackground', { +export const TITLE_BAR_ACTIVE_BACKGROUND = registerColor('titleBar.activeBackground', { dark: '#3C3C3C', light: '#DDDDDD', hc: '#000000' }, nls.localize('titleBarActiveBackground', "Title bar background when the window is active. Note that this color is currently only supported on macOS.")); -export const TITLE_BAR_INACTIVE_BACKGROUND = registerColor('titleBarInactiveBackground', { +export const TITLE_BAR_INACTIVE_BACKGROUND = registerColor('titleBar.inactiveBackground', { dark: Color.fromRGBA(new RGBA(60, 60, 60)).transparent(0.6), light: Color.fromRGBA(new RGBA(221, 221, 221)).transparent(0.6), hc: null @@ -258,13 +258,13 @@ export const TITLE_BAR_INACTIVE_BACKGROUND = registerColor('titleBarInactiveBack // < --- Notifications --- > -export const NOTIFICATIONS_FOREGROUND = registerColor('notificationsForeground', { +export const NOTIFICATIONS_FOREGROUND = registerColor('notification.foreground', { dark: '#EEEEEE', light: '#EEEEEE', hc: '#FFFFFF' }, nls.localize('notificationsForeground', "Notifications foreground color. Notifications slide in from the top of the window.")); -export const NOTIFICATIONS_BACKGROUND = registerColor('notificationsBackground', { +export const NOTIFICATIONS_BACKGROUND = registerColor('notification.background', { dark: '#333333', light: '#2C2C2C', hc: '#000000' diff --git a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts index 18a2e751a61f5..2287c14feb293 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts @@ -34,7 +34,7 @@ import { localize } from 'vs/nls'; const $ = builder.$; const DEBUG_ACTIONS_WIDGET_POSITION_KEY = 'debug.actionswidgetposition'; -export const debugToolBarBackground = registerColor('debugToolBarBackground', { +export const debugToolBarBackground = registerColor('debugToolBar.background', { dark: '#333333', light: '#F3F3F3', hc: '#000000' diff --git a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts index d4e280e232b04..805cc62a57d09 100644 --- a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts +++ b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts @@ -18,8 +18,8 @@ const $ = dom.$; // theming -export const debugExceptionWidgetBorder = registerColor('debugExceptionWidgetBorder', { dark: '#a31515', light: '#a31515', hc: '#a31515' }, nls.localize('debugExceptionWidgetBorder', 'Exception widget border color.')); -export const debugExceptionWidgetBackground = registerColor('debugExceptionWidgetBackground', { dark: '#a3151540', light: '#a315150d', hc: '#a3151573' }, nls.localize('debugExceptionWidgetBackground', 'Exception widget background color.')); +export const debugExceptionWidgetBorder = registerColor('debugExceptionWidget.border', { dark: '#a31515', light: '#a31515', hc: '#a31515' }, nls.localize('debugExceptionWidgetBorder', 'Exception widget border color.')); +export const debugExceptionWidgetBackground = registerColor('debugExceptionWidget.background', { dark: '#a3151540', light: '#a315150d', hc: '#a3151573' }, nls.localize('debugExceptionWidgetBackground', 'Exception widget background color.')); export class ExceptionWidget extends ZoneWidget { diff --git a/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.ts b/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.ts index e96198336b061..ff87ebc629e90 100644 --- a/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.ts +++ b/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.ts @@ -14,7 +14,7 @@ import { STATUS_BAR_NO_FOLDER_BACKGROUND, STATUS_BAR_BACKGROUND, Themable } from // colors for theming -export const STATUS_BAR_DEBUGGING_BACKGROUND = registerColor('statusBarDebuggingBackground', { +export const STATUS_BAR_DEBUGGING_BACKGROUND = registerColor('statusBar.debuggingBackground', { dark: '#CC6633', light: '#CC6633', hc: '#CC6633' diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts index 09f2bc7aaa2c6..16d29e6bf4bf4 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts @@ -14,7 +14,7 @@ import { registerColor, ColorIdentifier } from 'vs/platform/theme/common/colorRe export const ansiColorIdentifiers: ColorIdentifier[] = []; const ansiColorMap = { - terminalAnsiBlack: { + 'terminal.ansiBlack': { index: 0, defaults: { light: '#000000', @@ -22,7 +22,7 @@ const ansiColorMap = { hc: '#000000' } }, - terminalAnsiRed: { + 'terminal.ansiRed': { index: 1, defaults: { light: '#cd3131', @@ -30,7 +30,7 @@ const ansiColorMap = { hc: '#cd0000' } }, - terminalAnsiGreen: { + 'terminal.ansiGreen': { index: 2, defaults: { light: '#00BC00', @@ -38,7 +38,7 @@ const ansiColorMap = { hc: '#00cd00' } }, - terminalAnsiYellow: { + 'terminal.ansiYellow': { index: 3, defaults: { light: '#949800', @@ -46,7 +46,7 @@ const ansiColorMap = { hc: '#cdcd00' } }, - terminalAnsiBlue: { + 'terminal.ansiBlue': { index: 4, defaults: { light: '#0451a5', @@ -54,7 +54,7 @@ const ansiColorMap = { hc: '#0000ee' } }, - terminalAnsiMagenta: { + 'terminal.ansiMagenta': { index: 5, defaults: { light: '#bc05bc', @@ -62,7 +62,7 @@ const ansiColorMap = { hc: '#cd00cd' } }, - terminalAnsiCyan: { + 'terminal.ansiCyan': { index: 6, defaults: { light: '#0598bc', @@ -70,7 +70,7 @@ const ansiColorMap = { hc: '#00cdcd' } }, - terminalAnsiWhite: { + 'terminal.ansiWhite': { index: 7, defaults: { light: '#555555', @@ -78,7 +78,7 @@ const ansiColorMap = { hc: '#e5e5e5' } }, - terminalAnsiBrightBlack: { + 'terminal.ansiBrightBlack': { index: 8, defaults: { light: '#666666', @@ -86,7 +86,7 @@ const ansiColorMap = { hc: '#7f7f7f' } }, - terminalAnsiBrightRed: { + 'terminal.ansiBrightRed': { index: 9, defaults: { light: '#cd3131', @@ -94,7 +94,7 @@ const ansiColorMap = { hc: '#ff0000' } }, - terminalAnsiBrightGreen: { + 'terminal.ansiBrightGreen': { index: 10, defaults: { light: '#14CE14', @@ -102,7 +102,7 @@ const ansiColorMap = { hc: '#00ff00' } }, - terminalAnsiBrightYellow: { + 'terminal.ansiBrightYellow': { index: 11, defaults: { light: '#b5ba00', @@ -110,7 +110,7 @@ const ansiColorMap = { hc: '#ffff00' } }, - terminalAnsiBrightBlue: { + 'terminal.ansiBrightBlue': { index: 12, defaults: { light: '#0451a5', @@ -118,7 +118,7 @@ const ansiColorMap = { hc: '#5c5cff' } }, - terminalAnsiBrightMagenta: { + 'terminal.ansiBrightMagenta': { index: 13, defaults: { light: '#bc05bc', @@ -126,7 +126,7 @@ const ansiColorMap = { hc: '#ff00ff' } }, - terminalAnsiBrightCyan: { + 'terminal.ansiBrightCyan': { index: 14, defaults: { light: '#0598bc', @@ -134,7 +134,7 @@ const ansiColorMap = { hc: '#00ffff' } }, - terminalAnsiBrightWhite: { + 'terminal.ansiBrightWhite': { index: 15, defaults: { light: '#a5a5a5', From f042999623d6b85c4d59d25e4461bbe2a1f496ae Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 28 Apr 2017 15:57:44 +0200 Subject: [PATCH 0072/2747] themes - get rid of masterDetailsEditor.border --- extensions/theme-abyss/themes/abyss-color-theme.json | 1 - .../themes/solarized-dark-color-theme.json | 1 - src/vs/workbench/browser/parts/editor/sideBySideEditor.ts | 4 ++-- src/vs/workbench/common/theme.ts | 5 ----- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json index fc2572ec09f75..6dba39e891984 100644 --- a/extensions/theme-abyss/themes/abyss-color-theme.json +++ b/extensions/theme-abyss/themes/abyss-color-theme.json @@ -351,7 +351,6 @@ // "editorGroupHeader.noTabsBackground": "", "editorGroup.border": "#2b2b4a", "editorGroup.background": "#1c1c2a", - "masterDetailsEditor.border": "#10192c", "editorGroup.dropBackground": "#25375daa", // Workbench: Tabs diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index 6df7eeb4a248a..4c9c23c4ba6bb 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -389,7 +389,6 @@ // "editorGroupHeader.noTabsBackground": "", "editorGroup.border": "#00212B", "editorGroup.background": "#011b23", - "masterDetailsEditor.border": "#00212B", "editorGroup.dropBackground": "#00212BAA", // Workbench: Tabs diff --git a/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts b/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts index 34c2f8f68e868..1d3bcca6be131 100644 --- a/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts +++ b/src/vs/workbench/browser/parts/editor/sideBySideEditor.ts @@ -17,7 +17,7 @@ import { VSash } from 'vs/base/browser/ui/sash/sash'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { EDITOR_MASTER_DETAILS_BORDER } from 'vs/workbench/common/theme'; +import { scrollbarShadow } from 'vs/platform/theme/common/colorRegistry'; export class SideBySideEditor extends BaseEditor { @@ -165,7 +165,7 @@ export class SideBySideEditor extends BaseEditor { super.updateStyles(); if (this.masterEditorContainer) { - this.masterEditorContainer.style.boxShadow = `-6px 0 5px -5px ${this.getColor(EDITOR_MASTER_DETAILS_BORDER)}`; + this.masterEditorContainer.style.boxShadow = `-6px 0 5px -5px ${this.getColor(scrollbarShadow)}`; } } diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 389e76cdbac35..f4bbe73032f3e 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -87,11 +87,6 @@ export const EDITOR_DRAG_AND_DROP_BACKGROUND = registerColor('editorGroup.dropBa hc: null }, nls.localize('editorDragAndDropBackground', "Background color when dragging editors around.")); -export const EDITOR_MASTER_DETAILS_BORDER = registerColor('masterDetailsEditor.border', { - dark: '#000000', - light: '#DDDDDD', - hc: null -}, nls.localize('editorMasterDetailsBorder', "Border color to separate the details from the master side for side by side editors. Examples include diff editors and the settings editor.")); // < --- Panels --- > From b139e347a0ea4e0b49203fc75f3909ec6df451b7 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 28 Apr 2017 16:02:02 +0200 Subject: [PATCH 0073/2747] Fix #25508 - Let workspace configuration service fire change event during reload configuration and if configuration changes - Tests --- .../node/configurationService.ts | 9 +++ .../test/node/configurationService.test.ts | 70 +++++++++++++++++++ 2 files changed, 79 insertions(+) diff --git a/src/vs/workbench/services/configuration/node/configurationService.ts b/src/vs/workbench/services/configuration/node/configurationService.ts index d35876e8d5277..b0537b9a12ce2 100644 --- a/src/vs/workbench/services/configuration/node/configurationService.ts +++ b/src/vs/workbench/services/configuration/node/configurationService.ts @@ -167,7 +167,16 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp // Load configuration return this.baseConfigurationService.reloadConfiguration().then(() => { + const current = this.cachedConfig; return this.doLoadConfiguration().then(configuration => { + // emit this as update to listeners if changed + if (!objects.equals(current, this.cachedConfig)) { + this._onDidUpdateConfiguration.fire({ + config: configuration.consolidated, + source: ConfigurationSource.Workspace, + sourceConfig: configuration.workspace + }); + } return section ? configuration.consolidated[section] : configuration.consolidated; }); }); diff --git a/src/vs/workbench/services/configuration/test/node/configurationService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationService.test.ts index 7f211a0bb2a22..3d202425b4ad7 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationService.test.ts @@ -9,6 +9,7 @@ import assert = require('assert'); import os = require('os'); import path = require('path'); import fs = require('fs'); +import * as sinon from 'sinon'; import { TPromise } from 'vs/base/common/winjs.base'; import { Registry } from 'vs/platform/platform'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; @@ -227,6 +228,75 @@ suite('WorkspaceConfigurationService - Node', () => { }); }); + test('workspace reload should triggers event if content changed', (done: () => void) => { + createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { + const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); + const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); + const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); + + return service.initialize().then(() => { + const settingsFile = path.join(workspaceDir, '.vscode', 'settings.json'); + fs.writeFileSync(settingsFile, '{ "testworkbench.editor.icons": true }'); + + const target = sinon.stub(); + service.onDidUpdateConfiguration(event => target()); + + fs.writeFileSync(settingsFile, '{ "testworkbench.editor.icons": false }'); + + service.reloadConfiguration().done(() => { + assert.ok(target.calledOnce); + service.dispose(); + + cleanUp(done); + }); + }); + }); + }); + + test('workspace reload should not trigger event if nothing changed', (done: () => void) => { + createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { + const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); + const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); + const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); + + return service.initialize().then(() => { + const settingsFile = path.join(workspaceDir, '.vscode', 'settings.json'); + fs.writeFileSync(settingsFile, '{ "testworkbench.editor.icons": true }'); + + service.reloadConfiguration().done(() => { + const target = sinon.stub(); + service.onDidUpdateConfiguration(event => target()); + + service.reloadConfiguration().done(() => { + assert.ok(!target.called); + service.dispose(); + + cleanUp(done); + }); + }); + }); + }); + }); + + test('workspace reload should not trigger event if there is no model', (done: () => void) => { + createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { + const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); + const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); + const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); + + return service.initialize().then(() => { + const target = sinon.stub(); + service.onDidUpdateConfiguration(event => target()); + service.reloadConfiguration().done(() => { + assert.ok(!target.called); + service.dispose(); + cleanUp(done); + }); + }); + }); + }); + + test('lookup', (done: () => void) => { const configurationRegistry = Registry.as(ConfigurationExtensions.Configuration); configurationRegistry.registerConfiguration({ From bf8f73262e3edd60bb80fab62eaf76b80c56ddc4 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 28 Apr 2017 16:03:34 +0200 Subject: [PATCH 0074/2747] Error running rename in CSS. Fixes #25623 --- extensions/css/npm-shrinkwrap.json | 18 +++++++++--------- extensions/css/package.json | 2 +- extensions/css/server/npm-shrinkwrap.json | 19 +++++++++++++------ extensions/css/server/package.json | 2 +- 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/extensions/css/npm-shrinkwrap.json b/extensions/css/npm-shrinkwrap.json index a1df5a0b286da..eece4499ec94e 100644 --- a/extensions/css/npm-shrinkwrap.json +++ b/extensions/css/npm-shrinkwrap.json @@ -3,19 +3,19 @@ "version": "0.1.0", "dependencies": { "vscode-jsonrpc": { - "version": "3.1.0-alpha.1", - "from": "vscode-jsonrpc@>=3.1.0-alpha.1 <4.0.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.1.0-alpha.1.tgz" + "version": "3.2.0", + "from": "vscode-jsonrpc@>=3.2.0 <4.0.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.2.0.tgz" }, "vscode-languageclient": { - "version": "3.1.0-alpha.1", - "from": "vscode-languageclient@next", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-3.1.0-alpha.1.tgz" + "version": "3.2.0", + "from": "vscode-languageclient@3.2.0", + "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-3.2.0.tgz" }, "vscode-languageserver-types": { - "version": "3.0.3", - "from": "vscode-languageserver-types@>=3.0.3 <4.0.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.0.3.tgz" + "version": "3.2.0", + "from": "vscode-languageserver-types@>=3.2.0 <4.0.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.2.0.tgz" }, "vscode-nls": { "version": "2.0.2", diff --git a/extensions/css/package.json b/extensions/css/package.json index 7e963d2e97f9e..88da0e07ff7d8 100644 --- a/extensions/css/package.json +++ b/extensions/css/package.json @@ -672,7 +672,7 @@ } }, "dependencies": { - "vscode-languageclient": "^3.1.0-alpha.1", + "vscode-languageclient": "^3.2.0", "vscode-nls": "^2.0.2" }, "devDependencies": { diff --git a/extensions/css/server/npm-shrinkwrap.json b/extensions/css/server/npm-shrinkwrap.json index a33dc2d263d2d..bcb0fe3a8bb86 100644 --- a/extensions/css/server/npm-shrinkwrap.json +++ b/extensions/css/server/npm-shrinkwrap.json @@ -8,14 +8,21 @@ "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-2.0.2.tgz" }, "vscode-jsonrpc": { - "version": "3.1.0-alpha.1", - "from": "vscode-jsonrpc@>=3.1.0-alpha.1 <4.0.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.1.0-alpha.1.tgz" + "version": "3.2.0", + "from": "vscode-jsonrpc@>=3.2.0 <4.0.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.2.0.tgz" }, "vscode-languageserver": { - "version": "3.1.0-alpha.1", - "from": "vscode-languageserver@next", - "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-3.1.0-alpha.1.tgz" + "version": "3.2.0", + "from": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-3.2.0.tgz", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-3.2.0.tgz", + "dependencies": { + "vscode-languageserver-types": { + "version": "3.2.0", + "from": "vscode-languageserver-types@>=3.2.0 <4.0.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.2.0.tgz" + } + } }, "vscode-languageserver-types": { "version": "3.0.3", diff --git a/extensions/css/server/package.json b/extensions/css/server/package.json index 32845e75105ba..80864a44c9ead 100644 --- a/extensions/css/server/package.json +++ b/extensions/css/server/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "vscode-css-languageservice": "^2.0.2", - "vscode-languageserver": "^3.1.0-alpha.1" + "vscode-languageserver": "^3.2.0" }, "devDependencies": { "@types/node": "^6.0.51" From 6ee1fb1f7891cf283ee2c094d499a96825678aa6 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 28 Apr 2017 16:07:26 +0200 Subject: [PATCH 0075/2747] colorCustomizations: Do we need editorLinkForeground? Fixes #25474 --- src/vs/editor/contrib/links/browser/links.ts | 6 +----- src/vs/platform/theme/common/colorRegistry.ts | 1 - .../services/themes/electron-browser/themeCompatibility.ts | 2 -- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index 1c2e90ff97a37..cb507783d8132 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -24,7 +24,7 @@ import { getLinks, Link } from 'vs/editor/contrib/links/common/links'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { editorLinkForeground, editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; +import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { Position } from 'vs/editor/common/core/position'; class LinkOccurence { @@ -350,8 +350,4 @@ registerThemingParticipant((theme, collector) => { if (activeLinkForeground) { collector.addRule(`.monaco-editor.${theme.selector} .detected-link-active { color: ${activeLinkForeground} !important; }`); } - let linkForeground = theme.getColor(editorLinkForeground); - if (linkForeground) { - collector.addRule(`.monaco-editor.${theme.selector} .detected-link { color: ${linkForeground} !important; }`); - } }); \ No newline at end of file diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 1617e698148e3..a4c9e4cee5fcc 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -195,7 +195,6 @@ export const editorFindRangeHighlight = registerColor('editor.findRangeHighlight * Editor link colors */ export const editorActiveLinkForeground = registerColor('editorLink.activeForeground', { dark: '#4E94CE', light: Color.black, hc: Color.cyan }, nls.localize('activeLinkForeground', 'Color of active links.')); -export const editorLinkForeground = registerColor('editorLink.foreground', { dark: null, light: null, hc: null }, nls.localize('linkForeground', 'Color of links.')); /** * Find widget diff --git a/src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts b/src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts index 5e838e8d6d4e9..0f840bfd95f5d 100644 --- a/src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts +++ b/src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts @@ -57,8 +57,6 @@ addSettingMapping('selectionHighlightColor', colorRegistry.editorSelectionHighli addSettingMapping('findMatchHighlight', colorRegistry.editorFindMatchHighlight); addSettingMapping('currentFindMatchHighlight', colorRegistry.editorFindMatch); addSettingMapping('hoverHighlight', editorHoverHighlight); -addSettingMapping('hoverHighlight', editorHoverHighlight); -addSettingMapping('linkForeground', colorRegistry.editorLinkForeground); addSettingMapping('wordHighlight', wordHighlighter.editorWordHighlight); addSettingMapping('wordHighlightStrong', wordHighlighter.editorWordHighlightStrong); addSettingMapping('findRangeHighlight', colorRegistry.editorFindRangeHighlight); From 830b94b2c16951b25326b1962ce39f7939ccfeb4 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 28 Apr 2017 16:16:39 +0200 Subject: [PATCH 0076/2747] themes - get rid of tab.activeWithInactiveEditorGroupForeground and inactiveWithInactiveEditorGroupForeground --- .../theme-abyss/themes/abyss-color-theme.json | 2 -- .../themes/solarized-dark-color-theme.json | 2 -- .../themes/solarized-light-color-theme.json | 2 -- .../parts/editor/noTabsTitleControl.ts | 20 +++++++++---- .../browser/parts/editor/tabsTitleControl.ts | 30 +++++++++++++++++-- src/vs/workbench/common/theme.ts | 25 +++++----------- 6 files changed, 49 insertions(+), 32 deletions(-) diff --git a/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json index 6dba39e891984..c84a4df670002 100644 --- a/extensions/theme-abyss/themes/abyss-color-theme.json +++ b/extensions/theme-abyss/themes/abyss-color-theme.json @@ -359,9 +359,7 @@ // "tab.activeBackground": "", "tab.inactiveBackground": "#10192c", // "tab.activeForeground": "", - // "tab.activeWithInactiveEditorGroupForeground": "", // "tab.inactiveForeground": "", - // "tab.inactiveWithInactiveEditorGroupForeground": "", // Workbench: Activity Bar "activityBar.background": "#051336", diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index 4c9c23c4ba6bb..c1792c047ce14 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -398,8 +398,6 @@ "tab.inactiveBackground": "#004052", "editorGroupHeader.tabsBackground": "#004052", "tab.border": "#003847", - "tab.activeWithInactiveEditorGroupForeground": "#93A1A1", - "tab.inactiveWithInactiveEditorGroupForeground": "#93A1A1", // Workbench: Activity Bar "activityBar.background": "#003847", diff --git a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json index f15a87fc378c1..ebdc00f303e6b 100644 --- a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -321,8 +321,6 @@ "tab.inactiveBackground": "#CCC4B0", "editorGroupHeader.tabsBackground": "#CCC4B0", "tab.border": "#DDD6C1", - // "tab.activeWithInactiveEditorGroupForeground": "#586E75", - // "tab.inactiveWithInactiveEditorGroupForeground": "#586E75", "debugToolBar.background": "#EEE8D5", "dropdown.background": "#EEE8D5", "dropdown.border": "#2AA19899", diff --git a/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts index c27e28629ef33..fa83f95df080d 100644 --- a/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts @@ -12,7 +12,7 @@ import DOM = require('vs/base/browser/dom'); import { TitleControl } from 'vs/workbench/browser/parts/editor/titleControl'; import { EditorLabel } from 'vs/workbench/browser/labels'; import { Verbosity } from 'vs/platform/editor/common/editor'; -import { TAB_ACTIVE_GROUP_INACTIVE_FOREGROUND, TAB_ACTIVE_GROUP_ACTIVE_FOREGROUND } from 'vs/workbench/common/theme'; +import { TAB_ACTIVE_FOREGROUND } from 'vs/workbench/common/theme'; export class NoTabsTitleControl extends TitleControl { private titleContainer: HTMLElement; @@ -126,11 +126,19 @@ export class NoTabsTitleControl extends TitleControl { } this.editorLabel.setLabel({ name, description, resource }, { title, italic: !isPinned, extraClasses: ['title-label'] }); - if (isActive) { - this.editorLabel.element.style.color = this.getColor(TAB_ACTIVE_GROUP_ACTIVE_FOREGROUND); - } else { - this.editorLabel.element.style.color = this.getColor(TAB_ACTIVE_GROUP_INACTIVE_FOREGROUND); - } + this.editorLabel.element.style.color = this.getColor(TAB_ACTIVE_FOREGROUND, (color, theme) => { + if (!isActive) { + if (theme.type === 'dark') { + return color.transparent(0.5); + } + + if (theme.type === 'light') { + return color.transparent(0.7); + } + } + + return color; + }); // Update Editor Actions Toolbar this.updateEditorActionsToolbar(); diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index b708c5a6383fd..723495d1b7f69 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -40,7 +40,7 @@ import { LinkedMap } from 'vs/base/common/map'; import { DelegatingWorkbenchEditorService } from 'vs/workbench/services/editor/browser/editorService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; -import { TAB_INACTIVE_BACKGROUND, TAB_ACTIVE_BACKGROUND, TAB_ACTIVE_GROUP_ACTIVE_FOREGROUND, TAB_ACTIVE_GROUP_INACTIVE_FOREGROUND, TAB_INACTIVE_GROUP_ACTIVE_FOREGROUND, TAB_INACTIVE_GROUP_INACTIVE_FOREGROUND, TAB_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND } from 'vs/workbench/common/theme'; +import { TAB_INACTIVE_BACKGROUND, TAB_ACTIVE_BACKGROUND, TAB_ACTIVE_FOREGROUND, TAB_INACTIVE_FOREGROUND, TAB_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND } from 'vs/workbench/common/theme'; import { activeContrastBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; interface IEditorInputLabel { @@ -291,14 +291,38 @@ export class TabsTitleControl extends TitleControl { DOM.addClass(tabContainer, 'active'); tabContainer.setAttribute('aria-selected', 'true'); tabContainer.style.backgroundColor = this.getColor(TAB_ACTIVE_BACKGROUND); - tabLabel.element.style.color = this.getColor(isGroupActive ? TAB_ACTIVE_GROUP_ACTIVE_FOREGROUND : TAB_ACTIVE_GROUP_INACTIVE_FOREGROUND); + tabLabel.element.style.color = this.getColor(TAB_ACTIVE_FOREGROUND, (color, theme) => { + if (!isGroupActive) { + if (theme.type === 'dark') { + return color.transparent(0.5); + } + + if (theme.type === 'light') { + return color.transparent(0.7); + } + } + + return color; + }); this.activeTab = tabContainer; } else { DOM.removeClass(tabContainer, 'active'); tabContainer.setAttribute('aria-selected', 'false'); tabContainer.style.backgroundColor = this.getColor(TAB_INACTIVE_BACKGROUND); - tabLabel.element.style.color = this.getColor(isGroupActive ? TAB_INACTIVE_GROUP_ACTIVE_FOREGROUND : TAB_INACTIVE_GROUP_INACTIVE_FOREGROUND); + tabLabel.element.style.color = this.getColor(TAB_INACTIVE_FOREGROUND, (color, theme) => { + if (!isGroupActive) { + if (theme.type === 'dark') { + return color.transparent(0.5).transparent(0.5); + } + + if (theme.type === 'light') { + return color.transparent(0.7).transparent(0.5); + } + } + + return color; + }); } // Dirty State diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index f4bbe73032f3e..7f82968b4b2bf 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -35,31 +35,18 @@ export const TAB_BORDER = registerColor('tab.border', { hc: contrastBorder }, nls.localize('tabBorder', "Border to separate tabs from each other. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); -export const TAB_ACTIVE_GROUP_ACTIVE_FOREGROUND = registerColor('tab.activeForeground', { +export const TAB_ACTIVE_FOREGROUND = registerColor('tab.activeForeground', { dark: Color.white, light: Color.fromRGBA(new RGBA(51, 51, 51)), hc: Color.white }, nls.localize('tabActiveEditorGroupActiveForeground', "Active tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); -export const TAB_ACTIVE_GROUP_INACTIVE_FOREGROUND = registerColor('tab.activeWithInactiveEditorGroupForeground', { - dark: Color.white.transparent(0.5), - light: Color.fromRGBA(new RGBA(51, 51, 51)).transparent(0.7), - hc: Color.white -}, nls.localize('tabActiveEditorGroupInactiveForeground', "Active tab foreground color in an inactive group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); - -export const TAB_INACTIVE_GROUP_ACTIVE_FOREGROUND = registerColor('tab.inactiveForeground', { +export const TAB_INACTIVE_FOREGROUND = registerColor('tab.inactiveForeground', { dark: Color.white.transparent(0.5), light: Color.fromRGBA(new RGBA(51, 51, 51)).transparent(0.5), hc: Color.white }, nls.localize('tabInactiveEditorGroupActiveForeground', "Inactive tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); -export const TAB_INACTIVE_GROUP_INACTIVE_FOREGROUND = registerColor('tab.inactiveWithInactiveEditorGroupForeground', { - dark: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.5).transparent(0.5), - light: Color.fromRGBA(new RGBA(51, 51, 51)).transparent(0.5).transparent(0.7), - hc: Color.white -}, nls.localize('tabInactiveEditorGroupInactiveForeground', "Inactive tab foreground color in an inactive group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); - - // < --- Editors --- > @@ -298,8 +285,12 @@ export class Themable extends Disposable { // Subclasses to override } - protected getColor(id: string): string { - const color = this.theme.getColor(id); + protected getColor(id: string, modify?: (color: Color, theme: ITheme) => Color): string { + let color = this.theme.getColor(id); + + if (color && modify) { + color = modify(color, this.theme); + } return color ? color.toString() : null; } From 2865949f016fd5b891de36cfa43e1cef77ed8ddb Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 28 Apr 2017 16:19:38 +0200 Subject: [PATCH 0077/2747] Fixes #24153: ISO Keyboards: Backslash and IntlBackslash "swapped" --- npm-shrinkwrap.json | 6 +- package.json | 2 +- src/typings/native-keymap.d.ts | 2 + src/vs/code/electron-main/windows.ts | 43 ++++++++-- src/vs/workbench/electron-browser/window.ts | 4 +- .../common/macLinuxKeyboardMapper.ts | 25 +++++- .../electron-browser/keybindingService.ts | 11 ++- .../test/macLinuxKeyboardMapper.test.ts | 79 ++++++++++++++++++- 8 files changed, 150 insertions(+), 22 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index e997f8ba10ad9..cc268be6f5445 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -293,9 +293,9 @@ "resolved": "https://registry.npmjs.org/nan/-/nan-2.4.0.tgz" }, "native-keymap": { - "version": "1.2.2", - "from": "native-keymap@1.2.2", - "resolved": "https://registry.npmjs.org/native-keymap/-/native-keymap-1.2.2.tgz" + "version": "1.2.3", + "from": "native-keymap@1.2.3", + "resolved": "https://registry.npmjs.org/native-keymap/-/native-keymap-1.2.3.tgz" }, "normalize-path": { "version": "2.0.1", diff --git a/package.json b/package.json index 09aaf0585e3cf..718eb01e19eb0 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "iconv-lite": "0.4.15", "jschardet": "^1.4.2", "minimist": "1.2.0", - "native-keymap": "1.2.2", + "native-keymap": "1.2.3", "node-pty": "0.6.4", "semver": "4.3.6", "v8-profiler": "jrieken/v8-profiler#vscode", diff --git a/src/typings/native-keymap.d.ts b/src/typings/native-keymap.d.ts index 807935bbb49ff..65acdb584fa45 100644 --- a/src/typings/native-keymap.d.ts +++ b/src/typings/native-keymap.d.ts @@ -66,4 +66,6 @@ declare module 'native-keymap' { export function getCurrentKeyboardLayout(): IKeyboardLayoutInfo; export function onDidChangeKeyboardLayout(callback: () => void); + + export function isISOKeyboard(): boolean; } \ No newline at end of file diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 1308d9e82aa96..5b8428bf2e253 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -253,9 +253,9 @@ export class WindowsManager implements IWindowsMainService { this.lifecycleService.onBeforeWindowClose(win => this.onBeforeWindowClose(win)); this.lifecycleService.onBeforeQuit(() => this.onBeforeQuit()); - KeyboardLayoutMonitor.INSTANCE.onDidChangeKeyboardLayout(() => { + KeyboardLayoutMonitor.INSTANCE.onDidChangeKeyboardLayout((isISOKeyboard: boolean) => { WindowsManager.WINDOWS.forEach((window) => { - window.sendWhenReady('vscode:keyboardLayoutChanged'); + window.sendWhenReady('vscode:keyboardLayoutChanged', isISOKeyboard); }); }); } @@ -1329,21 +1329,52 @@ class KeyboardLayoutMonitor { public static INSTANCE = new KeyboardLayoutMonitor(); - private _emitter: Emitter; + private _emitter: Emitter; private _registered: boolean; private constructor() { - this._emitter = new Emitter(); + this._emitter = new Emitter(); this._registered = false; } - public onDidChangeKeyboardLayout(callback: () => void): IDisposable { + public onDidChangeKeyboardLayout(callback: (isISOKeyboard: boolean) => void): IDisposable { if (!this._registered) { this._registered = true; + nativeKeymap.onDidChangeKeyboardLayout(() => { - this._emitter.fire(); + this._emitter.fire(this._isISOKeyboard()); }); + + if (platform.isMacintosh) { + // See https://github.com/Microsoft/vscode/issues/24153 + // On OSX, on ISO keyboards, Chromium swaps the scan codes + // of IntlBackslash and Backquote. + // + // The C++ methods can give the current keyboard type (ISO or not) + // only after a NSEvent was handled. + // + // We therefore poll. + let prevValue: boolean = null; + setInterval(() => { + let newValue = this._isISOKeyboard(); + if (prevValue === newValue) { + // no change + return; + } + + prevValue = newValue; + this._emitter.fire(this._isISOKeyboard()); + + }, 3000); + } } return this._emitter.event(callback); } + + private _isISOKeyboard(): boolean { + if (platform.isMacintosh) { + return nativeKeymap.isISOKeyboard(); + } + return false; + } } diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index b7dca196d79c5..f779df1a85890 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -297,8 +297,8 @@ export class ElectronWindow extends Themable { }); // keyboard layout changed event - ipc.on('vscode:keyboardLayoutChanged', () => { - KeyboardMapperFactory.INSTANCE._onKeyboardLayoutChanged(); + ipc.on('vscode:keyboardLayoutChanged', (event, isISOKeyboard: boolean) => { + KeyboardMapperFactory.INSTANCE._onKeyboardLayoutChanged(isISOKeyboard); }); // Configuration changes diff --git a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts index 77fb903622581..b884e80add28e 100644 --- a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts @@ -510,7 +510,11 @@ class ScanCodeKeyCodeMapper { export class MacLinuxKeyboardMapper implements IKeyboardMapper { /** - * OS (can be Linux or Macintosh) + * Is the keyboard type ISO (on Mac) + */ + private readonly _isISOKeyboard: boolean; + /** + * Is this the standard US keyboard layout? */ private readonly _isUSStandard: boolean; /** @@ -534,7 +538,8 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { */ private readonly _scanCodeToDispatch: string[] = []; - constructor(isUSStandard: boolean, rawMappings: IMacLinuxKeyboardMapping, OS: OperatingSystem) { + constructor(isISOKeyboard: boolean, isUSStandard: boolean, rawMappings: IMacLinuxKeyboardMapping, OS: OperatingSystem) { + this._isISOKeyboard = isISOKeyboard; this._isUSStandard = isUSStandard; this._OS = OS; this._codeInfo = []; @@ -1051,11 +1056,27 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { public resolveKeyboardEvent(keyboardEvent: IKeyboardEvent): NativeResolvedKeybinding { let code = ScanCodeUtils.toEnum(keyboardEvent.code); + // Treat NumpadEnter as Enter if (code === ScanCode.NumpadEnter) { code = ScanCode.Enter; } + if (this._OS === OperatingSystem.Macintosh && this._isISOKeyboard) { + // See https://github.com/Microsoft/vscode/issues/24153 + // On OSX, on ISO keyboards, Chromium swaps the scan codes + // of IntlBackslash and Backquote. + + switch (code) { + case ScanCode.IntlBackslash: + code = ScanCode.Backquote; + break; + case ScanCode.Backquote: + code = ScanCode.IntlBackslash; + break; + } + } + const keyCode = keyboardEvent.keyCode; if ( diff --git a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts index 7b1edd55412d0..5b6e0095d1471 100644 --- a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts +++ b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts @@ -44,6 +44,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur export class KeyboardMapperFactory { public static INSTANCE = new KeyboardMapperFactory(); + private _isISOKeyboard: boolean; private _layoutInfo: nativeKeymap.IKeyboardLayoutInfo; private _rawMapping: nativeKeymap.IKeyboardMapping; private _keyboardMapper: IKeyboardMapper; @@ -53,13 +54,15 @@ export class KeyboardMapperFactory { public onDidChangeKeyboardMapper: Event = this._onDidChangeKeyboardMapper.event; private constructor() { + this._isISOKeyboard = false; this._layoutInfo = null; this._rawMapping = null; this._keyboardMapper = null; this._initialized = false; } - public _onKeyboardLayoutChanged(): void { + public _onKeyboardLayoutChanged(isISOKeyboard: boolean): void { + this._isISOKeyboard = isISOKeyboard; if (this._initialized) { this._setKeyboardData(nativeKeymap.getCurrentKeyboardLayout(), nativeKeymap.getKeyMap()); } @@ -124,11 +127,11 @@ export class KeyboardMapperFactory { this._initialized = true; this._rawMapping = rawMapping; - this._keyboardMapper = KeyboardMapperFactory._createKeyboardMapper(KeyboardMapperFactory._isUSStandard(this._layoutInfo), this._rawMapping); + this._keyboardMapper = KeyboardMapperFactory._createKeyboardMapper(this._isISOKeyboard, KeyboardMapperFactory._isUSStandard(this._layoutInfo), this._rawMapping); this._onDidChangeKeyboardMapper.fire(); } - private static _createKeyboardMapper(isUSStandard: boolean, rawMapping: nativeKeymap.IKeyboardMapping): IKeyboardMapper { + private static _createKeyboardMapper(isISOKeyboard: boolean, isUSStandard: boolean, rawMapping: nativeKeymap.IKeyboardMapping): IKeyboardMapper { if (OS === OperatingSystem.Windows) { return new WindowsKeyboardMapper(rawMapping); } @@ -138,7 +141,7 @@ export class KeyboardMapperFactory { return new MacLinuxFallbackKeyboardMapper(OS); } - return new MacLinuxKeyboardMapper(isUSStandard, rawMapping, OS); + return new MacLinuxKeyboardMapper(isISOKeyboard, isUSStandard, rawMapping, OS); } private static _equals(a: nativeKeymap.IKeyboardMapping, b: nativeKeymap.IKeyboardMapping): boolean { diff --git a/src/vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts b/src/vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts index 616e098a388db..d47b0dccf7730 100644 --- a/src/vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts +++ b/src/vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts @@ -19,7 +19,7 @@ const WRITE_FILE_IF_DIFFERENT = false; function createKeyboardMapper(isUSStandard: boolean, file: string, OS: OperatingSystem): TPromise { return readRawMapping(file).then((rawMappings) => { - return new MacLinuxKeyboardMapper(isUSStandard, rawMappings, OS); + return new MacLinuxKeyboardMapper(false, isUSStandard, rawMappings, OS); }); } @@ -1562,7 +1562,7 @@ suite('keyboardMapper - LINUX en_us', () => { suite('keyboardMapper', () => { test('issue #23706: Linux UK layout: Ctrl + Apostrophe also toggles terminal', () => { - let mapper = new MacLinuxKeyboardMapper(false, { + let mapper = new MacLinuxKeyboardMapper(false, false, { 'Backquote': { 'value': '`', 'withShift': '¬', @@ -1600,7 +1600,7 @@ suite('keyboardMapper', () => { }); test('issue #24064: NumLock/NumPad keys stopped working in 1.11 on Linux', () => { - let mapper = new MacLinuxKeyboardMapper(false, {}, OperatingSystem.Linux); + let mapper = new MacLinuxKeyboardMapper(false, false, {}, OperatingSystem.Linux); function assertNumpadKeyboardEvent(keyCode: KeyCode, code: string, label: string, electronAccelerator: string, userSettingsLabel: string, dispatch: string): void { assertResolveKeyboardEvent( @@ -1645,7 +1645,7 @@ suite('keyboardMapper', () => { }); test('issue #24107: Delete, Insert, Home, End, PgUp, PgDn, and arrow keys no longer work editor in 1.11', () => { - let mapper = new MacLinuxKeyboardMapper(false, {}, OperatingSystem.Linux); + let mapper = new MacLinuxKeyboardMapper(false, false, {}, OperatingSystem.Linux); function assertKeyboardEvent(keyCode: KeyCode, code: string, label: string, electronAccelerator: string, userSettingsLabel: string, dispatch: string): void { assertResolveKeyboardEvent( @@ -1701,6 +1701,77 @@ suite('keyboardMapper', () => { assertKeyboardEvent(KeyCode.UpArrow, 'Lang3', 'UpArrow', 'Up', 'up', '[ArrowUp]'); }); + test('issue #24153: ISO Keyboards: Backslash and IntlBackslash "swapped"', () => { + let mapper = new MacLinuxKeyboardMapper(true, false, { + 'Backquote': { + 'value': '`', + 'withShift': '~', + 'withAltGr': '`', + 'withShiftAltGr': '`' + }, + 'IntlBackslash': { + 'value': '§', + 'withShift': '°', + 'withAltGr': '§', + 'withShiftAltGr': '°' + } + }, OperatingSystem.Macintosh); + + assertResolveKeyboardEvent( + mapper, + { + ctrlKey: true, + shiftKey: false, + altKey: false, + metaKey: false, + keyCode: -1, + code: 'Backquote' + }, + { + label: '⌃§', + ariaLabel: 'Control+§', + labelWithoutModifiers: '§', + ariaLabelWithoutModifiers: '§', + electronAccelerator: null, + userSettingsLabel: 'ctrl+[IntlBackslash]', + isWYSIWYG: false, + isChord: false, + hasCtrlModifier: true, + hasShiftModifier: false, + hasAltModifier: false, + hasMetaModifier: false, + dispatchParts: ['ctrl+[IntlBackslash]', null], + } + ); + + assertResolveKeyboardEvent( + mapper, + { + ctrlKey: true, + shiftKey: false, + altKey: false, + metaKey: false, + keyCode: -1, + code: 'IntlBackslash' + }, + { + label: '⌃`', + ariaLabel: 'Control+`', + labelWithoutModifiers: '`', + ariaLabelWithoutModifiers: '`', + electronAccelerator: null, + userSettingsLabel: 'ctrl+`', + isWYSIWYG: true, + isChord: false, + hasCtrlModifier: true, + hasShiftModifier: false, + hasAltModifier: false, + hasMetaModifier: false, + dispatchParts: ['ctrl+[Backquote]', null], + } + ); + }); + }); suite('keyboardMapper - LINUX ru', () => { From 634770b35193a1c39442723f874a20815718f19c Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 28 Apr 2017 16:35:30 +0200 Subject: [PATCH 0078/2747] fix #23524, again... --- src/vs/workbench/electron-browser/shell.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 09186e6420669..e2e3976ebe727 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -265,7 +265,7 @@ export class WorkbenchShell { const action = this.workbench.getInstantiationService().createInstance(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL); createIssue = action.run(`:warning: Make sure to **attach** these files: :warning:\n${files.map(file => `-\`${join(profileStartup.dir, file)}\``).join('\n')}`).then(() => { - return this.windowsService.showItemInFolder(profileFiles[0]); + return this.windowsService.showItemInFolder(join(profileStartup.dir, files[0])); }); } createIssue.then(() => this.windowsService.relaunch({ removeArgs: ['--prof-startup'] })); From ccc0fa3c0bef6205c2db600670a89425accb8c67 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 28 Apr 2017 17:10:19 +0200 Subject: [PATCH 0079/2747] More fixes for 24153 --- src/vs/code/electron-main/window.ts | 4 ++++ src/vs/code/electron-main/windows.ts | 20 ++++++++++++------- src/vs/workbench/electron-browser/main.ts | 9 +++++++++ .../electron-browser/keybindingService.ts | 18 +++++++++-------- 4 files changed, 36 insertions(+), 15 deletions(-) diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index a2cdf2f52a193..610420ef66886 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -77,6 +77,10 @@ export interface IWindowConfiguration extends ParsedArgs { userEnv: platform.IProcessEnvironment; + /** + * The physical keyboard is of ISO type (on OSX) + */ + isISOKeyboard?: boolean; zoomLevel?: number; fullscreen?: boolean; highContrast?: boolean; diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 5b8428bf2e253..6fdb5efa1f4ae 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -733,6 +733,7 @@ export class WindowsManager implements IWindowsMainService { configuration.filesToCreate = filesToCreate; configuration.filesToDiff = filesToDiff; configuration.nodeCachedDataDir = this.environmentService.nodeCachedDataDir; + configuration.isISOKeyboard = KeyboardLayoutMonitor.INSTANCE.isISOKeyboard(); return configuration; } @@ -1331,10 +1332,12 @@ class KeyboardLayoutMonitor { private _emitter: Emitter; private _registered: boolean; + private _isISOKeyboard: boolean; private constructor() { this._emitter = new Emitter(); this._registered = false; + this._isISOKeyboard = this._readIsISOKeyboard(); } public onDidChangeKeyboardLayout(callback: (isISOKeyboard: boolean) => void): IDisposable { @@ -1342,7 +1345,7 @@ class KeyboardLayoutMonitor { this._registered = true; nativeKeymap.onDidChangeKeyboardLayout(() => { - this._emitter.fire(this._isISOKeyboard()); + this._emitter.fire(this._isISOKeyboard); }); if (platform.isMacintosh) { @@ -1354,16 +1357,15 @@ class KeyboardLayoutMonitor { // only after a NSEvent was handled. // // We therefore poll. - let prevValue: boolean = null; setInterval(() => { - let newValue = this._isISOKeyboard(); - if (prevValue === newValue) { + let newValue = this._readIsISOKeyboard(); + if (this._isISOKeyboard === newValue) { // no change return; } - prevValue = newValue; - this._emitter.fire(this._isISOKeyboard()); + this._isISOKeyboard = newValue; + this._emitter.fire(this._isISOKeyboard); }, 3000); } @@ -1371,10 +1373,14 @@ class KeyboardLayoutMonitor { return this._emitter.event(callback); } - private _isISOKeyboard(): boolean { + private _readIsISOKeyboard(): boolean { if (platform.isMacintosh) { return nativeKeymap.isISOKeyboard(); } return false; } + + public isISOKeyboard(): boolean { + return this._isISOKeyboard; + } } diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index a25d8300ddb49..77bc5addf9bd5 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -28,6 +28,7 @@ import gracefulFs = require('graceful-fs'); import { IPath, IOpenFileRequest } from 'vs/workbench/electron-browser/common'; import { IInitData } from 'vs/workbench/services/timer/common/timerService'; import { TimerService } from 'vs/workbench/services/timer/node/timerService'; +import { KeyboardMapperFactory } from "vs/workbench/services/keybinding/electron-browser/keybindingService"; import { webFrame } from 'electron'; @@ -35,6 +36,12 @@ import fs = require('fs'); gracefulFs.gracefulify(fs); // enable gracefulFs export interface IWindowConfiguration extends ParsedArgs, IOpenFileRequest { + + /** + * The physical keyboard is of ISO type (on OSX) + */ + isISOKeyboard?: boolean; + appRoot: string; execPath: string; @@ -53,6 +60,8 @@ export function startup(configuration: IWindowConfiguration): TPromise { browser.setZoomLevel(webFrame.getZoomLevel()); browser.setFullscreen(!!configuration.fullscreen); + KeyboardMapperFactory.INSTANCE._onKeyboardLayoutChanged(configuration.isISOKeyboard); + // Setup Intl comparer.setFileNameComparer(new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' })); diff --git a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts index 5b6e0095d1471..bc3f11a7eed14 100644 --- a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts +++ b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts @@ -62,15 +62,17 @@ export class KeyboardMapperFactory { } public _onKeyboardLayoutChanged(isISOKeyboard: boolean): void { - this._isISOKeyboard = isISOKeyboard; + isISOKeyboard = !!isISOKeyboard; if (this._initialized) { - this._setKeyboardData(nativeKeymap.getCurrentKeyboardLayout(), nativeKeymap.getKeyMap()); + this._setKeyboardData(isISOKeyboard, nativeKeymap.getCurrentKeyboardLayout(), nativeKeymap.getKeyMap()); + } else { + this._isISOKeyboard = isISOKeyboard; } } public getKeyboardMapper(dispatchConfig: DispatchConfig): IKeyboardMapper { if (!this._initialized) { - this._setKeyboardData(nativeKeymap.getCurrentKeyboardLayout(), nativeKeymap.getKeyMap()); + this._setKeyboardData(this._isISOKeyboard, nativeKeymap.getCurrentKeyboardLayout(), nativeKeymap.getKeyMap()); } if (dispatchConfig === DispatchConfig.KeyCode) { // Forcefully set to use keyCode @@ -81,7 +83,7 @@ export class KeyboardMapperFactory { public getCurrentKeyboardLayout(): nativeKeymap.IKeyboardLayoutInfo { if (!this._initialized) { - this._setKeyboardData(nativeKeymap.getCurrentKeyboardLayout(), nativeKeymap.getKeyMap()); + this._setKeyboardData(this._isISOKeyboard, nativeKeymap.getCurrentKeyboardLayout(), nativeKeymap.getKeyMap()); } return this._layoutInfo; } @@ -111,21 +113,21 @@ export class KeyboardMapperFactory { public getRawKeyboardMapping(): nativeKeymap.IKeyboardMapping { if (!this._initialized) { - this._setKeyboardData(nativeKeymap.getCurrentKeyboardLayout(), nativeKeymap.getKeyMap()); + this._setKeyboardData(this._isISOKeyboard, nativeKeymap.getCurrentKeyboardLayout(), nativeKeymap.getKeyMap()); } return this._rawMapping; } - private _setKeyboardData(layoutInfo: nativeKeymap.IKeyboardLayoutInfo, rawMapping: nativeKeymap.IKeyboardMapping): void { + private _setKeyboardData(isISOKeyboard: boolean, layoutInfo: nativeKeymap.IKeyboardLayoutInfo, rawMapping: nativeKeymap.IKeyboardMapping): void { this._layoutInfo = layoutInfo; - if (this._initialized && KeyboardMapperFactory._equals(this._rawMapping, rawMapping)) { + if (this._initialized && this._isISOKeyboard === isISOKeyboard && KeyboardMapperFactory._equals(this._rawMapping, rawMapping)) { // nothing to do... return; } this._initialized = true; - + this._isISOKeyboard = isISOKeyboard; this._rawMapping = rawMapping; this._keyboardMapper = KeyboardMapperFactory._createKeyboardMapper(this._isISOKeyboard, KeyboardMapperFactory._isUSStandard(this._layoutInfo), this._rawMapping); this._onDidChangeKeyboardMapper.fire(); From 77e7fa62f7764942516ec5b8315fb5183cde8c35 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 28 Apr 2017 17:33:19 +0200 Subject: [PATCH 0080/2747] Fixes #23964: Use keyCode based dispatching for DVORAK - QWERTY cmd keyboard layout --- .../electron-browser/keybindingService.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts index bc3f11a7eed14..fd17973d8a257 100644 --- a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts +++ b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts @@ -129,11 +129,11 @@ export class KeyboardMapperFactory { this._initialized = true; this._isISOKeyboard = isISOKeyboard; this._rawMapping = rawMapping; - this._keyboardMapper = KeyboardMapperFactory._createKeyboardMapper(this._isISOKeyboard, KeyboardMapperFactory._isUSStandard(this._layoutInfo), this._rawMapping); + this._keyboardMapper = KeyboardMapperFactory._createKeyboardMapper(this._isISOKeyboard, this._layoutInfo, this._rawMapping); this._onDidChangeKeyboardMapper.fire(); } - private static _createKeyboardMapper(isISOKeyboard: boolean, isUSStandard: boolean, rawMapping: nativeKeymap.IKeyboardMapping): IKeyboardMapper { + private static _createKeyboardMapper(isISOKeyboard: boolean, layoutInfo: nativeKeymap.IKeyboardLayoutInfo, rawMapping: nativeKeymap.IKeyboardMapping): IKeyboardMapper { if (OS === OperatingSystem.Windows) { return new WindowsKeyboardMapper(rawMapping); } @@ -143,6 +143,15 @@ export class KeyboardMapperFactory { return new MacLinuxFallbackKeyboardMapper(OS); } + if (OS === OperatingSystem.Macintosh) { + const kbInfo = layoutInfo; + if (kbInfo.id === 'com.apple.keylayout.DVORAK-QWERTYCMD') { + // Use keyCode based dispatching for DVORAK - QWERTY ⌘ + return new MacLinuxFallbackKeyboardMapper(OS); + } + } + + const isUSStandard = KeyboardMapperFactory._isUSStandard(layoutInfo); return new MacLinuxKeyboardMapper(isISOKeyboard, isUSStandard, rawMapping, OS); } From 770832f0ed81640392eec211c9293d945195fadc Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 28 Apr 2017 17:50:35 +0200 Subject: [PATCH 0081/2747] Remove keybinding migration prompt --- .../electron-browser/keybindingService.ts | 92 ------------------- 1 file changed, 92 deletions(-) diff --git a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts index fd17973d8a257..a569b80797182 100644 --- a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts +++ b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts @@ -34,10 +34,6 @@ import { WindowsKeyboardMapper, IWindowsKeyboardMapping, windowsKeyboardMappingE import { IMacLinuxKeyboardMapping, MacLinuxKeyboardMapper, macLinuxKeyboardMappingEquals } from 'vs/workbench/services/keybinding/common/macLinuxKeyboardMapper'; import { MacLinuxFallbackKeyboardMapper } from 'vs/workbench/services/keybinding/common/macLinuxFallbackKeyboardMapper'; import Event, { Emitter } from 'vs/base/common/event'; -import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; -import { Action } from 'vs/base/common/actions'; -import { TPromise } from 'vs/base/common/winjs.base'; -import Severity from 'vs/base/common/severity'; import { Extensions as ConfigExtensions, IConfigurationRegistry, IConfigurationNode } from 'vs/platform/configuration/common/configurationRegistry'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; @@ -88,10 +84,6 @@ export class KeyboardMapperFactory { return this._layoutInfo; } - public isUSStandard(): boolean { - return KeyboardMapperFactory._isUSStandard(this.getCurrentKeyboardLayout()); - } - private static _isUSStandard(_kbInfo: nativeKeymap.IKeyboardLayoutInfo): boolean { if (OS === OperatingSystem.Linux) { const kbInfo = _kbInfo; @@ -251,43 +243,6 @@ let keybindingsExtPoint = ExtensionsRegistry.registerExtensionPoint { - window.open('https://go.microsoft.com/fwlink/?linkid=846147'); // Don't change link. - return TPromise.as(true); - } - ); - const okAction = new Action( - 'keybindingMigration.ok', - nls.localize('keybindingMigration.ok', "OK"), - null, - true, - () => TPromise.as(true) - ); - this.messageService.show(Severity.Info, { - message: nls.localize('keybindingMigration.prompt', "Some keyboard shortcuts have changed for your keyboard layout."), - actions: [openDocumentation, okAction] - }); } public dumpDebugInfo(): string { From b941c0336a182dd1d0f30cd9e8e9fc7482c3c8c6 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 28 Apr 2017 17:51:24 +0200 Subject: [PATCH 0082/2747] WorkspaceEdit type mismatch in css server (for #25623) --- extensions/css/server/npm-shrinkwrap.json | 21 +++++++-------------- extensions/css/server/package.json | 2 +- 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/extensions/css/server/npm-shrinkwrap.json b/extensions/css/server/npm-shrinkwrap.json index bcb0fe3a8bb86..aebf5bf5121e4 100644 --- a/extensions/css/server/npm-shrinkwrap.json +++ b/extensions/css/server/npm-shrinkwrap.json @@ -3,9 +3,9 @@ "version": "1.0.0", "dependencies": { "vscode-css-languageservice": { - "version": "2.0.2", + "version": "2.0.3", "from": "vscode-css-languageservice@next", - "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-2.0.2.tgz" + "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-2.0.3.tgz" }, "vscode-jsonrpc": { "version": "3.2.0", @@ -14,20 +14,13 @@ }, "vscode-languageserver": { "version": "3.2.0", - "from": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-3.2.0.tgz", - "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-3.2.0.tgz", - "dependencies": { - "vscode-languageserver-types": { - "version": "3.2.0", - "from": "vscode-languageserver-types@>=3.2.0 <4.0.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.2.0.tgz" - } - } + "from": "vscode-languageserver@3.2.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-3.2.0.tgz" }, "vscode-languageserver-types": { - "version": "3.0.3", - "from": "vscode-languageserver-types@>=3.0.3 <4.0.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.0.3.tgz" + "version": "3.2.0", + "from": "vscode-languageserver-types@>=3.2.0 <4.0.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.2.0.tgz" }, "vscode-nls": { "version": "2.0.2", diff --git a/extensions/css/server/package.json b/extensions/css/server/package.json index 80864a44c9ead..9e4322d03fe88 100644 --- a/extensions/css/server/package.json +++ b/extensions/css/server/package.json @@ -8,7 +8,7 @@ "node": "*" }, "dependencies": { - "vscode-css-languageservice": "^2.0.2", + "vscode-css-languageservice": "^2.0.3", "vscode-languageserver": "^3.2.0" }, "devDependencies": { From 7f5ce0c5db17da796406f1adc5aad85184036ff7 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 28 Apr 2017 17:56:10 +0200 Subject: [PATCH 0083/2747] Peek view color mixup in update script --- build/npm/update-theme.js | 4 ++-- .../contrib/referenceSearch/browser/referencesWidget.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/npm/update-theme.js b/build/npm/update-theme.js index c6d1a327b957a..7e5649a1cbc71 100644 --- a/build/npm/update-theme.js +++ b/build/npm/update-theme.js @@ -19,10 +19,10 @@ var mappings = { "selectionHighlightColor": ["editor.selectionHighlightBackground"], "wordHighlight": ["editor.wordHighlightBackground"], "wordHighlightStrong": ["editor.wordHighlightStrongBackground"], - "findMatchHighlight": ["editor.findMatchHighlightBackground", "peekViewEditor.matchHighlightBackground"], + "findMatchHighlight": ["editor.findMatchHighlightBackground", "peekViewResult.matchHighlightBackground"], "currentFindMatchHighlight": ["editor.findMatchBackground"], "findRangeHighlight": ["editor.findRangeHighlightBackground"], - "referenceHighlight": ["peekViewResult.lineForeground"], + "referenceHighlight": ["peekViewEditor.matchHighlightBackground"], "lineHighlight": ["editor.lineHighlightBackground"], "rangeHighlight": ["editor.rangeHighlightBackground"], "caret": ["editorCursor.foreground"], diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index 097aa4ed1c59b..35a4b56d09691 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -803,8 +803,8 @@ export const peekViewTitleInfoForeground = registerColor('peekViewTitleDescripti export const peekViewBorder = registerColor('peekView.border', { dark: '#007acc', light: '#007acc', hc: contrastBorder }, nls.localize('peekViewBorder', 'Color of the peek view borders and arrow.')); export const peekViewResultsBackground = registerColor('peekViewResult.background', { dark: '#252526', light: '#F3F3F3', hc: Color.black }, nls.localize('peekViewResultsBackground', 'Background color of the peek view result list.')); -export const peekViewResultsMatchForeground = registerColor('peekViewResult.lineForeground', { dark: '#bbbbbb', light: '#646465', hc: Color.white }, nls.localize('peekViewResultsMatchForeground', 'Match entry foreground in the peek view result list.')); -export const peekViewResultsFileForeground = registerColor('peekViewResult.fileForeground', { dark: Color.white, light: '#1E1E1E', hc: Color.white }, nls.localize('peekViewResultsFileForeground', 'File entry foreground in the peek view result list.')); +export const peekViewResultsMatchForeground = registerColor('peekViewResult.lineForeground', { dark: '#bbbbbb', light: '#646465', hc: Color.white }, nls.localize('peekViewResultsMatchForeground', 'Foreground color for line nodes in the peek view result list.')); +export const peekViewResultsFileForeground = registerColor('peekViewResult.fileForeground', { dark: Color.white, light: '#1E1E1E', hc: Color.white }, nls.localize('peekViewResultsFileForeground', 'Foreground color for file nodes in the peek view result list.')); export const peekViewResultsSelectionBackground = registerColor('peekViewResult.selectionBackground', { dark: '#3399ff33', light: '#3399ff33', hc: null }, nls.localize('peekViewResultsSelectionBackground', 'Background color of the selected entry in the peek view result list.')); export const peekViewResultsSelectionForeground = registerColor('peekViewResult.selectionForeground', { dark: Color.white, light: '#6C6C6C', hc: Color.white }, nls.localize('peekViewResultsSelectionForeground', 'Foreground color of the selected entry in the peek view result list.')); export const peekViewEditorBackground = registerColor('peekViewEditor.background', { dark: '#001F33', light: '#F2F8FC', hc: Color.black }, nls.localize('peekViewEditorBackground', 'Background color of the peek view editor.')); From b80654d873bcb234d2d06ef9e86fffd0c54f25c3 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 28 Apr 2017 17:59:15 +0200 Subject: [PATCH 0084/2747] standalone editor color id rename --- src/vs/editor/common/standalone/themes.ts | 28 ++++++++++++----------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/vs/editor/common/standalone/themes.ts b/src/vs/editor/common/standalone/themes.ts index ade2a884b7654..a97a9fab1eede 100644 --- a/src/vs/editor/common/standalone/themes.ts +++ b/src/vs/editor/common/standalone/themes.ts @@ -6,6 +6,8 @@ 'use strict'; import { IStandaloneThemeData } from 'vs/editor/common/services/standaloneThemeService'; +import { editorBackground, editorForeground, editorSelectionHighlight, editorInactiveSelection } from "vs/platform/theme/common/colorRegistry"; +import { editorIndentGuides } from "vs/editor/common/view/editorColorRegistry"; /* -------------------------------- Begin vs theme -------------------------------- */ export const vs: IStandaloneThemeData = { @@ -68,11 +70,11 @@ export const vs: IStandaloneThemeData = { { token: 'predefined.sql', foreground: 'FF00FF' }, ], colors: { - editorBackground: '#FFFFFE', - editorForeground: '#000000', - editorInactiveSelection: '#E5EBF1', - editorIndentGuides: '#D3D3D3', - editorSelectionHighlight: '#ADD6FF4D' + [editorBackground]: '#FFFFFE', + [editorForeground]: '#000000', + [editorInactiveSelection]: '#E5EBF1', + [editorIndentGuides]: '#D3D3D3', + [editorSelectionHighlight]: '#ADD6FF4D' } }; /* -------------------------------- End vs theme -------------------------------- */ @@ -138,11 +140,11 @@ export const vs_dark: IStandaloneThemeData = { { token: 'predefined.sql', foreground: 'FF00FF' }, ], colors: { - editorBackground: '#1E1E1E', - editorForeground: '#D4D4D4', - editorInactiveSelection: '#3A3D41', - editorIndentGuides: '#404040', - editorSelectionHighlight: '#ADD6FF26' + [editorBackground]: '#1E1E1E', + [editorForeground]: '#D4D4D4', + [editorInactiveSelection]: '#3A3D41', + [editorIndentGuides]: '#404040', + [editorSelectionHighlight]: '#ADD6FF26' } }; /* -------------------------------- End vs-dark theme -------------------------------- */ @@ -200,9 +202,9 @@ export const hc_black: IStandaloneThemeData = { { token: 'predefined.sql', foreground: 'FF00FF' }, ], colors: { - editorBackground: '#000000', - editorForeground: '#FFFFFF', - editorIndentGuides: '#FFFFFF', + [editorBackground]: '#000000', + [editorForeground]: '#FFFFFF', + [editorIndentGuides]: '#FFFFFF', } }; /* -------------------------------- End hc-black theme -------------------------------- */ From a61ce06828c30fc6f51b08bb67574ac6ffb5d387 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 28 Apr 2017 19:07:46 +0200 Subject: [PATCH 0085/2747] theming - inherit some --- src/vs/workbench/common/theme.ts | 38 ++++++++++++++++---------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 7f82968b4b2bf..1516cc2e2238a 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import nls = require('vs/nls'); -import { registerColor, editorBackground, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, editorBackground, contrastBorder, transparent } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable, Disposable, dispose } from 'vs/base/common/lifecycle'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; import { Color, RGBA } from 'vs/base/common/color'; @@ -37,13 +37,13 @@ export const TAB_BORDER = registerColor('tab.border', { export const TAB_ACTIVE_FOREGROUND = registerColor('tab.activeForeground', { dark: Color.white, - light: Color.fromRGBA(new RGBA(51, 51, 51)), + light: '#333333', hc: Color.white }, nls.localize('tabActiveEditorGroupActiveForeground', "Active tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); export const TAB_INACTIVE_FOREGROUND = registerColor('tab.inactiveForeground', { - dark: Color.white.transparent(0.5), - light: Color.fromRGBA(new RGBA(51, 51, 51)).transparent(0.5), + dark: transparent(TAB_ACTIVE_FOREGROUND, 0.5), + light: transparent(TAB_ACTIVE_FOREGROUND, 0.5), hc: Color.white }, nls.localize('tabInactiveEditorGroupActiveForeground', "Inactive tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); @@ -97,8 +97,8 @@ export const PANEL_ACTIVE_TITLE_COLOR = registerColor('panelTitle.activeForegrou }, nls.localize('panelActiveTitleForeground', "Title color for the active panel. Panels are shown below the editor area and contain views like output and integrated terminal.")); export const PANEL_INACTIVE_TITLE_COLOR = registerColor('panelTitle.inactiveForeground', { - dark: Color.fromRGBA(new RGBA(231, 231, 231)).transparent(0.5), - light: Color.fromRGBA(new RGBA(66, 66, 66)).transparent(0.75), + dark: transparent(PANEL_ACTIVE_TITLE_COLOR, 0.5), + light: transparent(PANEL_ACTIVE_TITLE_COLOR, 0.75), hc: Color.white }, nls.localize('panelInactiveTitleForeground', "Title color for the inactive panel. Panels are shown below the editor area and contain views like output and integrated terminal.")); @@ -131,15 +131,15 @@ export const STATUS_BAR_NO_FOLDER_BACKGROUND = registerColor('statusBar.noFolder }, nls.localize('statusBarNoFolderBackground', "Status bar background color when no folder is opened. The status bar is shown in the bottom of the window.")); export const STATUS_BAR_ITEM_ACTIVE_BACKGROUND = registerColor('statusBarItem.activeBackground', { - dark: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.18), - light: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.18), - hc: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.18) + dark: Color.white.transparent(0.18), + light: Color.white.transparent(0.18), + hc: Color.white.transparent(0.18) }, nls.localize('statusBarItemActiveBackground', "Status bar item background color when clicking. The status bar is shown in the bottom of the window.")); export const STATUS_BAR_ITEM_HOVER_BACKGROUND = registerColor('statusBarItem.hoverBackground', { - dark: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12), - light: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12), - hc: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12) + dark: Color.white.transparent(0.12), + light: Color.white.transparent(0.12), + hc: Color.white.transparent(0.12) }, nls.localize('statusBarItemHoverBackground', "Status bar item background color when hovering. The status bar is shown in the bottom of the window.")); export const STATUS_BAR_PROMINENT_ITEM_BACKGROUND = registerColor('statusBarItem.prominentBackground', { @@ -171,9 +171,9 @@ export const ACTIVITY_BAR_FOREGROUND = registerColor('activityBar.foreground', { }, nls.localize('activityBarForeground', "Activity bar foreground color (e.g. used for the icons). The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); export const ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND = registerColor('activityBar.dropBackground', { - dark: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12), - light: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12), - hc: Color.fromRGBA(new RGBA(255, 255, 255)).transparent(0.12), + dark: Color.white.transparent(0.12), + light: Color.white.transparent(0.12), + hc: Color.white.transparent(0.12), }, nls.localize('activityBarDragAndDropBackground', "Drag and drop feedback color for the activity bar items. The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); export const ACTIVITY_BAR_BADGE_BACKGROUND = registerColor('activityBarBadge.background', { @@ -221,8 +221,8 @@ export const TITLE_BAR_ACTIVE_FOREGROUND = registerColor('titleBar.activeForegro }, nls.localize('titleBarActiveForeground', "Title bar foreground when the window is active. Note that this color is currently only supported on macOS.")); export const TITLE_BAR_INACTIVE_FOREGROUND = registerColor('titleBar.inactiveForeground', { - dark: Color.fromRGBA(new RGBA(204, 204, 204)).transparent(0.6), - light: Color.fromRGBA(new RGBA(51, 51, 51)).transparent(0.6), + dark: transparent(TITLE_BAR_ACTIVE_FOREGROUND, 0.6), + light: transparent(TITLE_BAR_ACTIVE_FOREGROUND, 0.6), hc: null }, nls.localize('titleBarInactiveForeground', "Title bar foreground when the window is inactive. Note that this color is currently only supported on macOS.")); @@ -233,8 +233,8 @@ export const TITLE_BAR_ACTIVE_BACKGROUND = registerColor('titleBar.activeBackgro }, nls.localize('titleBarActiveBackground', "Title bar background when the window is active. Note that this color is currently only supported on macOS.")); export const TITLE_BAR_INACTIVE_BACKGROUND = registerColor('titleBar.inactiveBackground', { - dark: Color.fromRGBA(new RGBA(60, 60, 60)).transparent(0.6), - light: Color.fromRGBA(new RGBA(221, 221, 221)).transparent(0.6), + dark: transparent(TITLE_BAR_ACTIVE_BACKGROUND, 0.6), + light: transparent(TITLE_BAR_ACTIVE_BACKGROUND, 0.6), hc: null }, nls.localize('titleBarInactiveBackground', "Title bar background when the window is inactive. Note that this color is currently only supported on macOS.")); From 8382490bdadd32486887a2bb49417065d5578257 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 28 Apr 2017 19:26:04 +0200 Subject: [PATCH 0086/2747] theme - get rid of list.focusAndSelectionForeground --- extensions/theme-abyss/themes/abyss-color-theme.json | 1 - .../theme-quietlight/themes/quietlight-color-theme.json | 1 - .../themes/solarized-dark-color-theme.json | 1 - src/vs/platform/theme/common/colorRegistry.ts | 1 - src/vs/platform/theme/common/styler.ts | 6 +++--- 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json index c84a4df670002..0fe1453410b0c 100644 --- a/extensions/theme-abyss/themes/abyss-color-theme.json +++ b/extensions/theme-abyss/themes/abyss-color-theme.json @@ -277,7 +277,6 @@ // "button.foreground": "", "list.focusAndSelectionBackground": "#08286b", - // "list.focusAndSelectionForeground": "", "list.activeSelectionBackground": "#011B51", // "list.activeSelectionForeground": "", "list.focusBackground": "#08286b", diff --git a/extensions/theme-quietlight/themes/quietlight-color-theme.json b/extensions/theme-quietlight/themes/quietlight-color-theme.json index 01a9a24087b2e..5b6e6e8cbab86 100644 --- a/extensions/theme-quietlight/themes/quietlight-color-theme.json +++ b/extensions/theme-quietlight/themes/quietlight-color-theme.json @@ -457,7 +457,6 @@ "pickerGroup.foreground": "#A6B39B", "pickerGroup.border": "#749351", "list.activeSelectionForeground": "#6c6c6c", - "list.focusAndSelectionForeground": "#6c6c6c", "list.focusBackground": "#CADEB9", "list.focusAndSelectionBackground": "#A2B294", "list.activeSelectionBackground": "#B6C8A7", diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index c1792c047ce14..bbf6457db31aa 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -317,7 +317,6 @@ // "button.foreground": "", "list.focusAndSelectionBackground": "#005A6F", - // "list.focusAndSelectionForeground": "", "list.activeSelectionBackground": "#004454", // "list.activeSelectionForeground": "", "list.focusBackground": "#005A6F", diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index a4c9e4cee5fcc..fc9d6c00f6a45 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -148,7 +148,6 @@ export const listActiveSelectionBackground = registerColor('list.activeSelection export const listInactiveSelectionBackground = registerColor('list.inactiveSelectionBackground', { dark: '#3F3F46', light: '#CCCEDB', hc: null }, nls.localize('listInactiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); export const listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('listActiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); export const listFocusAndSelectionBackground = registerColor('list.focusAndSelectionBackground', { dark: '#094771', light: '#3399FF', hc: null }, nls.localize('listFocusAndSelectionBackground', "List/Tree background color for the focused and selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not. This color wins over the individual selection and focus colors.")); -export const listFocusAndSelectionForeground = registerColor('list.focusAndSelectionForeground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('listFocusAndSelectionForeground', "List/Tree foreground color for the focused and selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not. This color wins over the individual selection and focus colors.")); export const listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, nls.localize('listHoverBackground', "List/Tree background when hovering over items using the mouse.")); export const listDropBackground = registerColor('list.dropBackground', { dark: '#383B3D', light: '#DDECFF', hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse.")); export const listHighlightForeground = registerColor('list.highlightForeground', { dark: '#219AE4', light: '#186B9E', hc: '#219AE4' }, nls.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.')); diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index a1988d07d854a..8af56194dea0a 100644 --- a/src/vs/platform/theme/common/styler.ts +++ b/src/vs/platform/theme/common/styler.ts @@ -6,7 +6,7 @@ 'use strict'; import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; -import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listFocusAndSelectionBackground, listFocusAndSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground } from 'vs/platform/theme/common/colorRegistry'; +import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listFocusAndSelectionBackground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable } from 'vs/base/common/lifecycle'; import { SIDE_BAR_SECTION_HEADER_BACKGROUND } from 'vs/workbench/common/theme'; @@ -143,7 +143,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || listActiveSelectionBackground, listActiveSelectionForeground: (style && style.listActiveSelectionForeground) || listActiveSelectionForeground, listFocusAndSelectionBackground: (style && style.listFocusAndSelectionBackground) || listFocusAndSelectionBackground, - listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listFocusAndSelectionForeground, + listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listActiveSelectionForeground, listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground, listHoverBackground: (style && style.listHoverBackground) || listHoverBackground, listDropBackground: (style && style.listDropBackground) || listDropBackground, @@ -173,7 +173,7 @@ export function attachListStyler(widget: IThemable, themeService: IThemeService, listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || listActiveSelectionBackground, listActiveSelectionForeground: (style && style.listActiveSelectionForeground) || listActiveSelectionForeground, listFocusAndSelectionBackground: (style && style.listFocusAndSelectionBackground) || listFocusAndSelectionBackground, - listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listFocusAndSelectionForeground, + listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listActiveSelectionForeground, listInactiveFocusBackground: (style && style.listInactiveFocusBackground), listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground, listHoverBackground: (style && style.listHoverBackground) || listHoverBackground, From 79b1ec851a6356396539abf3de13c9a08ea48cbb Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 28 Apr 2017 10:27:35 -0700 Subject: [PATCH 0087/2747] Run distro tool --- ThirdPartyNotices.txt | 6 ++---- extensions/docker/OSSREADME.json | 4 ++-- extensions/docker/syntaxes/docker.tmLanguage.json | 2 +- package.json | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ThirdPartyNotices.txt b/ThirdPartyNotices.txt index 7291abaeecdcf..49020843ae905 100644 --- a/ThirdPartyNotices.txt +++ b/ThirdPartyNotices.txt @@ -1,5 +1,3 @@ -===================BEGIN GENERATOR LOG -===================END GENERATOR LOG microsoft-vscode THIRD-PARTY SOFTWARE NOTICES AND INFORMATION @@ -29,7 +27,7 @@ This project incorporates components from the projects listed below. The origina 20. ionide/ionide-fsgrammar (https://github.com/ionide/ionide-fsgrammar) 21. js-beautify version 1.6.8 (https://github.com/beautify-web/js-beautify) 22. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert) -23. language-docker (https://github.com/docker/docker) +23. language-docker (https://github.com/moby/moby) 24. language-go version 0.39.0 (https://github.com/atom/language-go) 25. language-less (https://github.com/atom/language-less) 26. language-php (https://github.com/atom/language-php) @@ -1138,7 +1136,7 @@ END OF language-rust NOTICES AND INFORMATION ========================================= The MIT License -Copyright (c) 2015 MagicStack Inc. http://magic.io +Copyright (c) 2015-present MagicStack Inc. http://magic.io Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/extensions/docker/OSSREADME.json b/extensions/docker/OSSREADME.json index 33c86da5f8662..28c0191ec17fb 100644 --- a/extensions/docker/OSSREADME.json +++ b/extensions/docker/OSSREADME.json @@ -3,6 +3,6 @@ "name": "language-docker", "version": "0.0.0", "license": "Apache2", - "repositoryURL": "https://github.com/docker/docker", - "description": "The file syntaxes/Dockerfile.tmLanguage was included from https://github.com/docker/docker/blob/master/contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage." + "repositoryURL": "https://github.com/moby/moby", + "description": "The file syntaxes/Dockerfile.tmLanguage was included from https://github.com/moby/moby/blob/master/contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage." }] diff --git a/extensions/docker/syntaxes/docker.tmLanguage.json b/extensions/docker/syntaxes/docker.tmLanguage.json index 619bc3f3f83be..6ca5dc67b08fd 100644 --- a/extensions/docker/syntaxes/docker.tmLanguage.json +++ b/extensions/docker/syntaxes/docker.tmLanguage.json @@ -86,5 +86,5 @@ ], "scopeName": "source.dockerfile", "uuid": "a39d8795-59d2-49af-aa00-fe74ee29576e", - "version": "https://github.com/docker/docker/commit/4cb71f80823af345d063cf0ad657e73ce9caa75f" + "version": "https://github.com/moby/moby/commit/4cb71f80823af345d063cf0ad657e73ce9caa75f" } \ No newline at end of file diff --git a/package.json b/package.json index 718eb01e19eb0..7948ee29c34c2 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev", "version": "1.12.0", "electronVersion": "1.6.6", - "distro": "7a7491277aec9196cb60398d9dbe8520093ed862", + "distro": "c1989b3e8a8516b92a46c359eba624fb9f812201", "author": { "name": "Microsoft Corporation" }, From f22230f407631e41f030e2d89f690fb268c7acc1 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Fri, 28 Apr 2017 10:54:53 -0700 Subject: [PATCH 0088/2747] Fix #24050 - lost this error msg when I switched from an error blacklist to a whitelist --- .../services/search/node/ripgrepTextSearch.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts index 2fd67da8855d2..d70ff8bc2e297 100644 --- a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts +++ b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts @@ -152,7 +152,15 @@ export class RipgrepEngine { return this.config.searchPaths && this.config.searchPaths.indexOf(errorPath) >= 0 ? firstLine : undefined; } - return strings.startsWith(firstLine, 'Error parsing regex') ? firstLine : undefined; + if (strings.startsWith(firstLine, 'Error parsing regex')) { + return firstLine; + } + + if (strings.startsWith(firstLine, 'error parsing glob')) { + return firstLine; + } + + return undefined; } } From 2b73072d2e960ea5f7776ec3085f7955015742c9 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 28 Apr 2017 20:03:39 +0200 Subject: [PATCH 0089/2747] theme - get rid of list.focusAndSelectionBackground --- .../theme-abyss/themes/abyss-color-theme.json | 1 - .../themes/dimmed-monokai-color-theme.json | 1 - .../theme-monokai/themes/monokai-color-theme.json | 1 - .../themes/quietlight-color-theme.json | 1 - extensions/theme-red/themes/Red-color-theme.json | 1 - .../themes/solarized-dark-color-theme.json | 1 - .../themes/tomorrow-night-blue-theme.json | 1 - src/vs/platform/theme/common/colorRegistry.ts | 1 - src/vs/platform/theme/common/styler.ts | 15 ++++++++++----- 9 files changed, 10 insertions(+), 13 deletions(-) diff --git a/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json index 0fe1453410b0c..03c19413808c9 100644 --- a/extensions/theme-abyss/themes/abyss-color-theme.json +++ b/extensions/theme-abyss/themes/abyss-color-theme.json @@ -276,7 +276,6 @@ "button.hoverBackground": "#4A5C6B", // "button.foreground": "", - "list.focusAndSelectionBackground": "#08286b", "list.activeSelectionBackground": "#011B51", // "list.activeSelectionForeground": "", "list.focusBackground": "#08286b", diff --git a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json index 15410dcf938bf..173c9283c4eb6 100644 --- a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json +++ b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json @@ -5,7 +5,6 @@ // "focusBorder": "#00f9ff", "dropdown.background": "#383852", "list.activeSelectionBackground": "#303050", - "list.focusAndSelectionBackground": "#383852", "list.inactiveSelectionBackground": "#303d45", "list.hoverBackground": "#005070", "list.dropBackground": "#505590", diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index c9c0ff57dc3de..74d3acac33d21 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -6,7 +6,6 @@ "dropdown.background": "#383852", "list.activeSelectionBackground": "#303070", "list.focusBackground": "#394770", - "list.focusAndSelectionBackground": "#383852", "list.inactiveSelectionBackground": "#303d45", "list.hoverBackground": "#005070", "list.dropBackground": "#505590", diff --git a/extensions/theme-quietlight/themes/quietlight-color-theme.json b/extensions/theme-quietlight/themes/quietlight-color-theme.json index 5b6e6e8cbab86..e33c477a18ba9 100644 --- a/extensions/theme-quietlight/themes/quietlight-color-theme.json +++ b/extensions/theme-quietlight/themes/quietlight-color-theme.json @@ -458,7 +458,6 @@ "pickerGroup.border": "#749351", "list.activeSelectionForeground": "#6c6c6c", "list.focusBackground": "#CADEB9", - "list.focusAndSelectionBackground": "#A2B294", "list.activeSelectionBackground": "#B6C8A7", "editor.background": "#F5F5F5", "editorWhitespace.foreground": "#AAAAAA", diff --git a/extensions/theme-red/themes/Red-color-theme.json b/extensions/theme-red/themes/Red-color-theme.json index ecba98b7b0abe..55372ceb608e1 100644 --- a/extensions/theme-red/themes/Red-color-theme.json +++ b/extensions/theme-red/themes/Red-color-theme.json @@ -47,7 +47,6 @@ "list.activeSelectionBackground": "#700000", "list.inactiveSelectionBackground": "#770000", "list.focusBackground": "#660000", - "list.focusAndSelectionBackground": "#880000", "list.highlightForeground": "#ff4444", "notification.background": "#662222", "pickerGroup.foreground": "#cc9999", diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index bbf6457db31aa..116bdf1705abe 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -316,7 +316,6 @@ "button.hoverBackground": "#2AA19844", // "button.foreground": "", - "list.focusAndSelectionBackground": "#005A6F", "list.activeSelectionBackground": "#004454", // "list.activeSelectionForeground": "", "list.focusBackground": "#005A6F", diff --git a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json index 5510699e53973..a2d815a46a110 100644 --- a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json +++ b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json @@ -6,7 +6,6 @@ "dropdown.background": "#001733", "list.focusBackground": "#ffffff60", "list.activeSelectionBackground": "#ffffff50", - "list.focusAndSelectionBackground": "#ffffff60", "list.inactiveSelectionBackground": "#ffffff40", "list.hoverBackground": "#ffffff30", "list.dropBackground": "#ffffff60", diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index fc9d6c00f6a45..4ffdf7b94e387 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -147,7 +147,6 @@ export const listFocusBackground = registerColor('list.focusBackground', { dark: export const listActiveSelectionBackground = registerColor('list.activeSelectionBackground', { dark: '#0E639C', light: '#4FA7FF', hc: null }, nls.localize('listActiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); export const listInactiveSelectionBackground = registerColor('list.inactiveSelectionBackground', { dark: '#3F3F46', light: '#CCCEDB', hc: null }, nls.localize('listInactiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); export const listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('listActiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); -export const listFocusAndSelectionBackground = registerColor('list.focusAndSelectionBackground', { dark: '#094771', light: '#3399FF', hc: null }, nls.localize('listFocusAndSelectionBackground', "List/Tree background color for the focused and selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not. This color wins over the individual selection and focus colors.")); export const listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, nls.localize('listHoverBackground', "List/Tree background when hovering over items using the mouse.")); export const listDropBackground = registerColor('list.dropBackground', { dark: '#383B3D', light: '#DDECFF', hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse.")); export const listHighlightForeground = registerColor('list.highlightForeground', { dark: '#219AE4', light: '#186B9E', hc: '#219AE4' }, nls.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.')); diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index 8af56194dea0a..22ec31faf2ab9 100644 --- a/src/vs/platform/theme/common/styler.ts +++ b/src/vs/platform/theme/common/styler.ts @@ -6,7 +6,7 @@ 'use strict'; import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; -import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listFocusAndSelectionBackground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground } from 'vs/platform/theme/common/colorRegistry'; +import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, darken } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable } from 'vs/base/common/lifecycle'; import { SIDE_BAR_SECTION_HEADER_BACKGROUND } from 'vs/workbench/common/theme'; @@ -14,11 +14,16 @@ export interface IThemable { style(colors: { [name: string]: ColorIdentifier }): void; } -export function attachStyler(themeService: IThemeService, widget: IThemable, optionsMapping: { [optionsKey: string]: ColorIdentifier }): IDisposable { +export function attachStyler(themeService: IThemeService, widget: IThemable, optionsMapping: { [optionsKey: string]: ColorIdentifier | ColorFunction }): IDisposable { function applyStyles(theme: ITheme): void { const styles = Object.create(null); for (let key in optionsMapping) { - styles[key] = theme.getColor(optionsMapping[key]); + const value = optionsMapping[key]; + if (typeof value === 'string') { + styles[key] = theme.getColor(value); + } else if (typeof value === 'function') { + styles[key] = value(theme); + } } widget.style(styles); @@ -142,7 +147,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer listFocusBackground: (style && style.listFocusBackground) || listFocusBackground, listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || listActiveSelectionBackground, listActiveSelectionForeground: (style && style.listActiveSelectionForeground) || listActiveSelectionForeground, - listFocusAndSelectionBackground: (style && style.listFocusAndSelectionBackground) || listFocusAndSelectionBackground, + listFocusAndSelectionBackground: style && style.listFocusAndSelectionBackground || darken(listActiveSelectionBackground, 0.1), listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listActiveSelectionForeground, listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground, listHoverBackground: (style && style.listHoverBackground) || listHoverBackground, @@ -172,7 +177,7 @@ export function attachListStyler(widget: IThemable, themeService: IThemeService, listFocusBackground: (style && style.listFocusBackground) || listFocusBackground, listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || listActiveSelectionBackground, listActiveSelectionForeground: (style && style.listActiveSelectionForeground) || listActiveSelectionForeground, - listFocusAndSelectionBackground: (style && style.listFocusAndSelectionBackground) || listFocusAndSelectionBackground, + listFocusAndSelectionBackground: style && style.listFocusAndSelectionBackground || darken(listActiveSelectionBackground, 0.1), listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listActiveSelectionForeground, listInactiveFocusBackground: (style && style.listInactiveFocusBackground), listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground, From 5f41dccfe8985ca11ff18a6f69fc9019f7700f00 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 28 Apr 2017 20:12:33 +0200 Subject: [PATCH 0090/2747] theme - flip active selection colors --- src/vs/platform/theme/common/colorRegistry.ts | 12 +++++++++++- src/vs/platform/theme/common/styler.ts | 10 +++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 4ffdf7b94e387..53dab21612513 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -144,7 +144,7 @@ export const selectForeground = registerColor('dropdown.foreground', { dark: '#F export const selectBorder = registerColor('dropdown.border', { dark: selectBackground, light: '#CECECE', hc: contrastBorder }, nls.localize('dropdownBorder', "Dropdown border.")); export const listFocusBackground = registerColor('list.focusBackground', { dark: '#073655', light: '#DCEBFC', hc: null }, nls.localize('listFocusBackground', "List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); -export const listActiveSelectionBackground = registerColor('list.activeSelectionBackground', { dark: '#0E639C', light: '#4FA7FF', hc: null }, nls.localize('listActiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); +export const listActiveSelectionBackground = registerColor('list.activeSelectionBackground', { dark: '#094771', light: '#3399FF', hc: null }, nls.localize('listActiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); export const listInactiveSelectionBackground = registerColor('list.inactiveSelectionBackground', { dark: '#3F3F46', light: '#CCCEDB', hc: null }, nls.localize('listInactiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); export const listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('listActiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); export const listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, nls.localize('listHoverBackground', "List/Tree background when hovering over items using the mouse.")); @@ -212,6 +212,16 @@ export function darken(colorValue: ColorValue, factor: number): ColorFunction { }; } +export function lighten(colorValue: ColorValue, factor: number): ColorFunction { + return (theme) => { + let color = resolveColorValue(colorValue, theme); + if (color) { + return color.lighten(factor); + } + return null; + }; +} + export function transparent(colorValue: ColorValue, factor: number): ColorFunction { return (theme) => { let color = resolveColorValue(colorValue, theme); diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index 22ec31faf2ab9..796b99a6131b2 100644 --- a/src/vs/platform/theme/common/styler.ts +++ b/src/vs/platform/theme/common/styler.ts @@ -6,7 +6,7 @@ 'use strict'; import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; -import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, darken } from 'vs/platform/theme/common/colorRegistry'; +import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, lighten } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable } from 'vs/base/common/lifecycle'; import { SIDE_BAR_SECTION_HEADER_BACKGROUND } from 'vs/workbench/common/theme'; @@ -145,9 +145,9 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer inputValidationErrorBorder: (style && style.inputValidationErrorBorder) || inputValidationErrorBorder, inputValidationErrorBackground: (style && style.inputValidationErrorBackground) || inputValidationErrorBackground, listFocusBackground: (style && style.listFocusBackground) || listFocusBackground, - listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || listActiveSelectionBackground, + listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || lighten(listActiveSelectionBackground, 0.1), listActiveSelectionForeground: (style && style.listActiveSelectionForeground) || listActiveSelectionForeground, - listFocusAndSelectionBackground: style && style.listFocusAndSelectionBackground || darken(listActiveSelectionBackground, 0.1), + listFocusAndSelectionBackground: style && style.listFocusAndSelectionBackground || listActiveSelectionBackground, listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listActiveSelectionForeground, listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground, listHoverBackground: (style && style.listHoverBackground) || listHoverBackground, @@ -175,9 +175,9 @@ export function attachListStyler(widget: IThemable, themeService: IThemeService, }): IDisposable { return attachStyler(themeService, widget, { listFocusBackground: (style && style.listFocusBackground) || listFocusBackground, - listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || listActiveSelectionBackground, + listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || lighten(listActiveSelectionBackground, 0.1), listActiveSelectionForeground: (style && style.listActiveSelectionForeground) || listActiveSelectionForeground, - listFocusAndSelectionBackground: style && style.listFocusAndSelectionBackground || darken(listActiveSelectionBackground, 0.1), + listFocusAndSelectionBackground: style && style.listFocusAndSelectionBackground || listActiveSelectionBackground, listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listActiveSelectionForeground, listInactiveFocusBackground: (style && style.listInactiveFocusBackground), listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground, From 2def4bcaebf98655f7a67c7ea8fb33ccb0491786 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 28 Apr 2017 20:23:24 +0200 Subject: [PATCH 0091/2747] theme - fix broken scrollbars in hc mode --- src/vs/platform/theme/common/colorRegistry.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 53dab21612513..60c7b82aac645 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -159,9 +159,9 @@ export const buttonBackground = registerColor('button.background', { dark: '#0E6 export const buttonHoverBackground = registerColor('button.hoverBackground', { dark: '#006BB3', light: '#006BB3', hc: null }, nls.localize('buttonHoverBackground', "Button background color when hovering.")); export const scrollbarShadow = registerColor('scrollbar.shadow', { dark: '#000000', light: '#DDDDDD', hc: null }, nls.localize('scrollbarShadow', "Scrollbar shadow to indicate that the view is scrolled.")); -export const scrollbarSliderBackground = registerColor('scrollbarSlider.background', { dark: Color.fromHex('#797979').transparent(0.4), light: Color.fromHex('#646464').transparent(0.4), hc: Color.fromHex(contrastBorder).transparent(0.6) }, nls.localize('scrollbarSliderBackground', "Slider background color.")); -export const scrollbarSliderHoverBackground = registerColor('scrollbarSlider.hoverBackground', { dark: Color.fromHex('#646464').transparent(0.7), light: Color.fromHex('#646464').transparent(0.7), hc: Color.fromHex(contrastBorder).transparent(0.8) }, nls.localize('scrollbarSliderHoverBackground', "Slider background color when hovering.")); -export const scrollbarSliderActiveBackground = registerColor('scrollbarSlider.activeBackground', { dark: Color.fromHex('#BFBFBF').transparent(0.4), light: Color.fromHex('#000000').transparent(0.6), hc: Color.fromHex(contrastBorder) }, nls.localize('scrollbarSliderActiveBackground', "Slider background color when active.")); +export const scrollbarSliderBackground = registerColor('scrollbarSlider.background', { dark: Color.fromHex('#797979').transparent(0.4), light: Color.fromHex('#646464').transparent(0.4), hc: transparent(contrastBorder, 0.6) }, nls.localize('scrollbarSliderBackground', "Slider background color.")); +export const scrollbarSliderHoverBackground = registerColor('scrollbarSlider.hoverBackground', { dark: Color.fromHex('#646464').transparent(0.7), light: Color.fromHex('#646464').transparent(0.7), hc: transparent(contrastBorder, 0.8) }, nls.localize('scrollbarSliderHoverBackground', "Slider background color when hovering.")); +export const scrollbarSliderActiveBackground = registerColor('scrollbarSlider.activeBackground', { dark: Color.fromHex('#BFBFBF').transparent(0.4), light: Color.fromHex('#000000').transparent(0.6), hc: contrastBorder }, nls.localize('scrollbarSliderActiveBackground', "Slider background color when active.")); /** * Editor background color. From 0bec115779b11a9d78bdb24ad7918c22524ea2ac Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Fri, 28 Apr 2017 11:03:17 -0700 Subject: [PATCH 0092/2747] Pass results limit (fixes #15778) --- .../workbench/parts/search/common/searchModel.ts | 14 ++++++++++---- .../search/test/browser/searchActions.test.ts | 2 +- .../search/test/browser/searchViewlet.test.ts | 2 +- .../parts/search/test/common/searchResult.test.ts | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/search/common/searchModel.ts b/src/vs/workbench/parts/search/common/searchModel.ts index 6c0724c855b03..ed1489ad1ff87 100644 --- a/src/vs/workbench/parts/search/common/searchModel.ts +++ b/src/vs/workbench/parts/search/common/searchModel.ts @@ -120,7 +120,7 @@ export class FileMatch extends Disposable { private _updateScheduler: RunOnceScheduler; private _modelDecorations: string[] = []; - constructor(private _query: IPatternInfo, private _parent: SearchResult, private rawMatch: IFileMatch, + constructor(private _query: IPatternInfo, private _maxResults: number, private _parent: SearchResult, private rawMatch: IFileMatch, @IModelService private modelService: IModelService, @IReplaceService private replaceService: IReplaceService) { super(); this._resource = this.rawMatch.resource; @@ -187,7 +187,7 @@ export class FileMatch extends Disposable { } this._matches = new LinkedMap(); let matches = this._model - .findMatches(this._query.pattern, this._model.getFullModelRange(), this._query.isRegExp, this._query.isCaseSensitive, this._query.isWordMatch, false); + .findMatches(this._query.pattern, this._model.getFullModelRange(), this._query.isRegExp, this._query.isCaseSensitive, this._query.isWordMatch, false, this._maxResults); this.updateMatches(matches, true); } @@ -202,7 +202,7 @@ export class FileMatch extends Disposable { const oldMatches = this._matches.values().filter(match => match.range().startLineNumber === lineNumber); oldMatches.forEach(match => this._matches.delete(match.id())); - const matches = this._model.findMatches(this._query.pattern, range, this._query.isRegExp, this._query.isCaseSensitive, this._query.isWordMatch, false); + const matches = this._model.findMatches(this._query.pattern, range, this._query.isRegExp, this._query.isCaseSensitive, this._query.isWordMatch, false, this._maxResults); this.updateMatches(matches, modelChange); } @@ -330,6 +330,7 @@ export class SearchResult extends Disposable { private _fileMatches: LinkedMap; private _unDisposedFileMatches: LinkedMap; private _query: IPatternInfo = null; + private _maxResults: number; private _showHighlights: boolean; private _replacingAll: boolean = false; @@ -347,6 +348,10 @@ export class SearchResult extends Disposable { this._query = query; } + public set maxResults(maxResults: number) { + this._maxResults = maxResults; + } + public get searchModel(): SearchModel { return this._searchModel; } @@ -355,7 +360,7 @@ export class SearchResult extends Disposable { let changed: FileMatch[] = []; raw.forEach((rawFileMatch) => { if (!this._fileMatches.has(rawFileMatch.resource)) { - let fileMatch = this.instantiationService.createInstance(FileMatch, this._query, this, rawFileMatch); + let fileMatch = this.instantiationService.createInstance(FileMatch, this._query, this._maxResults, this, rawFileMatch); this.doAdd(fileMatch); changed.push(fileMatch); let disposable = fileMatch.onChange(() => this.onFileChange(fileMatch)); @@ -550,6 +555,7 @@ export class SearchModel extends Disposable { this.searchResult.clear(); this._searchResult.query = this._searchQuery.contentPattern; + this._searchResult.maxResults = this._searchQuery.maxResults; this._replacePattern = new ReplacePattern(this._replaceString, this._searchQuery.contentPattern); const onDone = fromPromise(this.currentRequest); diff --git a/src/vs/workbench/parts/search/test/browser/searchActions.test.ts b/src/vs/workbench/parts/search/test/browser/searchActions.test.ts index 705560719d8c1..912ef150a0519 100644 --- a/src/vs/workbench/parts/search/test/browser/searchActions.test.ts +++ b/src/vs/workbench/parts/search/test/browser/searchActions.test.ts @@ -131,7 +131,7 @@ suite('Search Actions', () => { resource: URI.file('somepath' + ++counter), lineMatches: [] }; - return instantiationService.createInstance(FileMatch, null, null, rawMatch); + return instantiationService.createInstance(FileMatch, null, null, null, rawMatch); } function aMatch(fileMatch: FileMatch): Match { diff --git a/src/vs/workbench/parts/search/test/browser/searchViewlet.test.ts b/src/vs/workbench/parts/search/test/browser/searchViewlet.test.ts index 1dabb3d08ae81..8e7432b9b0bbe 100644 --- a/src/vs/workbench/parts/search/test/browser/searchViewlet.test.ts +++ b/src/vs/workbench/parts/search/test/browser/searchViewlet.test.ts @@ -69,7 +69,7 @@ suite('Search - Viewlet', () => { resource: uri.file('C:\\' + path), lineMatches: lineMatches }; - return instantiation.createInstance(FileMatch, null, searchResult, rawMatch); + return instantiation.createInstance(FileMatch, null, null, searchResult, rawMatch); } function stubModelService(instantiationService: TestInstantiationService): IModelService { diff --git a/src/vs/workbench/parts/search/test/common/searchResult.test.ts b/src/vs/workbench/parts/search/test/common/searchResult.test.ts index 385918db51a52..d79a47921a3d0 100644 --- a/src/vs/workbench/parts/search/test/common/searchResult.test.ts +++ b/src/vs/workbench/parts/search/test/common/searchResult.test.ts @@ -363,7 +363,7 @@ suite('SearchResult', () => { resource: URI.file('/' + path), lineMatches: lineMatches }; - return instantiationService.createInstance(FileMatch, null, searchResult, rawMatch); + return instantiationService.createInstance(FileMatch, null, null, searchResult, rawMatch); } function aSearchResult(): SearchResult { From 85f6a1193bead2c9c0a190f48c40bdaf0551de78 Mon Sep 17 00:00:00 2001 From: Josh Lockhart Date: Fri, 28 Apr 2017 16:24:56 -0400 Subject: [PATCH 0093/2747] Standardize PHP validator settings --- extensions/php/package.json | 22 ++++- .../php/src/features/validationProvider.ts | 89 +++++++------------ 2 files changed, 55 insertions(+), 56 deletions(-) diff --git a/extensions/php/package.json b/extensions/php/package.json index 7f1aa55047898..616e0ef5504e2 100644 --- a/extensions/php/package.json +++ b/extensions/php/package.json @@ -86,6 +86,26 @@ ], "default": "onSave", "description": "%configuration.validate.run%" + }, + "php.validate.runInShell": { + "type": [ + "boolean", + "object" + ], + "default": false, + "description": "Do you want to validate your code with a shell?", + "properties": { + "shellArgs": { + "type": "array", + "default": ["-c"], + "description": "Arguments to pass to the shell" + }, + "shellExecutable": { + "type": "string", + "default": "C:\\Windows\\sysnative\\bash.exe", + "description": "The shell executable path" + } + } } } }, @@ -119,4 +139,4 @@ "devDependencies": { "@types/node": "^7.0.4" } -} \ No newline at end of file +} diff --git a/extensions/php/src/features/validationProvider.ts b/extensions/php/src/features/validationProvider.ts index 572b3a8419388..ea534001c6c44 100644 --- a/extensions/php/src/features/validationProvider.ts +++ b/extensions/php/src/features/validationProvider.ts @@ -97,9 +97,9 @@ export default class PHPValidationProvider { private diagnosticCollection: vscode.DiagnosticCollection; private delayers: { [key: string]: ThrottledDelayer }; - private validationExecutableIsShell: boolean; - private validationExecutableArgs: string = '-c'; - private validationShellExecutable: string = '/usr/bin/php'; + private runInShell: boolean = false; + private shellExecutable: string = 'C:\\Windows\\sysnative\\bash.exe'; + private shellArgs: string[] = ['-c']; constructor(private workspaceStore: vscode.Memento) { this.executable = null; @@ -144,20 +144,21 @@ export default class PHPValidationProvider { this.executableIsUserDefined = undefined; } - this.validationExecutableIsShell = section.get('validate.executableIsShell', false); - if (this.validationExecutableIsShell) { - let shellArgsInspect = section.inspect('validate.executableArgs'); - if (shellArgsInspect.workspaceValue) { - this.validationExecutableArgs = shellArgsInspect.workspaceValue; - } else if (shellArgsInspect.globalValue) { - this.validationExecutableArgs = shellArgsInspect.globalValue; + let shellSettings = section.get('validate.runInShell'); + if (typeof(shellSettings) === 'boolean') { + this.runInShell = shellSettings; + } else if (typeof(shellSettings) === 'object') { + this.runInShell = true; + if (shellSettings.shellExecutable && typeof(shellSettings.shellExecutable) === 'string') { + this.shellExecutable = shellSettings.shellExecutable; } - - let shellExecutableInspect = section.inspect('validate.shellExecutablePath'); - if (shellExecutableInspect.workspaceValue) { - this.validationShellExecutable = shellExecutableInspect.workspaceValue; - } else if (shellExecutableInspect.globalValue) { - this.validationShellExecutable = shellExecutableInspect.globalValue; + if (shellSettings.shellArgs) { + if (typeof(shellSettings.shellArgs) === 'string') { + this.shellArgs = [shellSettings.shellArgs]; + } + if (shellSettings.shellArgs instanceof Array) { + this.shellArgs = shellSettings.shellArgs.splice(0); + } } } @@ -246,7 +247,6 @@ export default class PHPValidationProvider { let decoder = new LineDecoder(); let diagnostics: vscode.Diagnostic[] = []; let processLine = (line: string) => { - console.log('Processing line', line); let matches = line.match(PHPValidationProvider.MatchExpression); if (matches) { let message = matches[1]; @@ -269,44 +269,34 @@ export default class PHPValidationProvider { } // Are we validating with WSL? - // TODO: Use config flag in this conditional - if (this.validationExecutableIsShell) { + if (this.runInShell) { + // Reset executable + let executableInShell = executable; + executable = this.shellExecutable; + // Shell args - let wslShellArgs = [this.validationExecutableArgs]; - let wslShellPhpExecutableArgs = args.slice(0); - options['shell'] = true; + let executableArgs = args.slice(0); // Transform Windows file path to Linux file path - let windowsPath = wslShellPhpExecutableArgs.pop(); + let windowsPath = executableArgs.pop(); let linuxPath = windowsPath.trim().replace(/^([a-zA-Z]):\\/, '/mnt/$1/').replace(/\\/g, '/'); - wslShellPhpExecutableArgs.push(linuxPath); + executableArgs.push(linuxPath); // Finalize executable args - args = wslShellArgs.concat(['"', this.validationShellExecutable, wslShellPhpExecutableArgs.join(' '), '"']); - } - - try { - // TESTING - - // Set executable to bash.exe - //executable = 'C:\\Windows\\sysnative\\bash'; + args = this.shellArgs.concat(['"', executableInShell, executableArgs.join(' '), '"']); - // Translate path name to Linux format (assume using /mnt// mount) - // let winPath = args.pop(); - // console.log('Old file path', winPath); - // let linuxPath = winPath.trim().replace(/^([a-zA-Z]):\\/, '/mnt/$1/').replace(/\\/g, '/'); - // console.log('New file path', linuxPath); - // args.push(linuxPath); + // Node spawn with shell + options['shell'] = true; + } - // Correct the args for bash.exe - //args = ['-c', '"php ' + args.join(' ') + '"']; - //options['shell'] = true; - // END TESTING + console.log('Validating with executable', executable); + console.log('Validating with shell?', this.runInShell); + console.log('Validating with shell executable', this.shellExecutable); + console.log('Validating with shell args', this.shellArgs); - console.log('Linting with executable', executable, args); + try { let childProcess = cp.spawn(executable, args, options); childProcess.on('error', (error: Error) => { - console.log('Child process error', error); if (this.pauseValidation) { resolve(); return; @@ -315,25 +305,15 @@ export default class PHPValidationProvider { this.pauseValidation = true; resolve(); }); - childProcess.on('exit', (code: Number, signal: String) => { - console.log('Child exit status', code); - console.log('Child exit signal', signal); - }); if (childProcess.pid) { if (this.trigger === RunTrigger.onType) { childProcess.stdin.write(textDocument.getText()); childProcess.stdin.end(); } childProcess.stdout.on('data', (data: Buffer) => { - console.log('Data returned from buffer', data); decoder.write(data).forEach(processLine); }); - childProcess.stderr.setEncoding('utf8'); - childProcess.stderr.on('data', (data) => { - console.log('Data returned from stderr', data); - }); childProcess.stdout.on('end', () => { - console.log('End buffer'); let line = decoder.end(); if (line) { processLine(line); @@ -342,7 +322,6 @@ export default class PHPValidationProvider { resolve(); }); } else { - console.log('Nuthin'); resolve(); } } catch (error) { From e062e906fdb065d84452f44ab28daacbca44d632 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 28 Apr 2017 15:13:57 -0700 Subject: [PATCH 0094/2747] 1.13 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7948ee29c34c2..1aa328903d362 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "code-oss-dev", - "version": "1.12.0", + "version": "1.13.0", "electronVersion": "1.6.6", "distro": "c1989b3e8a8516b92a46c359eba624fb9f812201", "author": { From d87e0fe9e8065ecdca99da3d68d5abff952229df Mon Sep 17 00:00:00 2001 From: Daniel Ye Date: Fri, 28 Apr 2017 18:03:41 -0700 Subject: [PATCH 0095/2747] 2017-04-28, merge in translation from transifex. --- .../chs/extensions/git/out/commands.i18n.json | 3 +- i18n/chs/extensions/git/package.i18n.json | 2 -- i18n/chs/extensions/grunt/out/main.i18n.json | 4 ++- i18n/chs/extensions/grunt/package.i18n.json | 4 ++- i18n/chs/extensions/gulp/package.i18n.json | 4 +-- .../out/features/bufferSyncSupport.i18n.json | 1 + .../out/typescriptServiceClient.i18n.json | 4 +-- .../out/utils/typingsStatus.i18n.json | 1 - .../browser/widget/diffEditorWidget.i18n.json | 7 +++- .../config/commonEditorConfig.i18n.json | 1 + .../common/view/editorColorRegistry.i18n.json | 2 +- .../browser/referencesModel.i18n.json | 3 ++ .../browser/referencesWidget.i18n.json | 4 +-- .../contrib/rename/browser/rename.i18n.json | 1 + .../browser/suggestController.i18n.json | 1 + .../suggest/browser/suggestWidget.i18n.json | 5 +++ .../menusExtensionPoint.i18n.json | 4 ++- .../platform/environment/node/argv.i18n.json | 1 + .../markers/common/problemMatcher.i18n.json | 3 ++ .../theme/common/colorRegistry.i18n.json | 36 +++++++++++++++---- .../api/node/extHostTreeView.i18n.json | 9 +++++ .../src/vs/workbench/common/theme.i18n.json | 27 ++++++-------- .../inspectKeybindings.i18n.json | 4 +-- .../browser/debugActionsWidget.i18n.json | 6 ++++ .../parts/debug/common/debugModel.i18n.json | 4 +-- .../parts/debug/common/debugSource.i18n.json | 8 +++++ .../treeExplorer.contribution.i18n.json | 4 --- .../keybindingsEditorContribution.i18n.json | 3 +- .../themes.contribution.i18n.json | 3 +- .../electron-browser/colorThemeData.i18n.json | 6 +--- .../workbenchThemeService.i18n.json | 3 +- i18n/cht/extensions/git/package.i18n.json | 4 +-- .../out/typescriptServiceClient.i18n.json | 2 -- .../browser/widget/diffEditorWidget.i18n.json | 5 ++- .../config/commonEditorConfig.i18n.json | 1 + .../editor/common/services/bulkEdit.i18n.json | 5 ++- .../browser/referencesModel.i18n.json | 8 ++++- .../browser/referencesWidget.i18n.json | 4 +-- .../contrib/rename/browser/rename.i18n.json | 1 + .../browser/suggestController.i18n.json | 1 + .../suggest/browser/suggestWidget.i18n.json | 5 +++ .../platform/environment/node/argv.i18n.json | 1 + .../markers/common/problemMatcher.i18n.json | 5 +++ .../theme/common/colorRegistry.i18n.json | 36 ++++++++++++++++--- .../api/node/extHostTreeView.i18n.json | 9 +++++ .../src/vs/workbench/common/theme.i18n.json | 23 +++++------- .../inspectKeybindings.i18n.json | 4 +-- .../browser/debugActionsWidget.i18n.json | 6 ++++ .../parts/debug/common/debugModel.i18n.json | 4 +-- .../parts/debug/common/debugSource.i18n.json | 8 +++++ .../treeExplorer.contribution.i18n.json | 4 --- .../extensionsViewlet.i18n.json | 1 + .../keybindingsEditorContribution.i18n.json | 3 +- .../themes.contribution.i18n.json | 3 +- .../electron-browser/colorThemeData.i18n.json | 6 +--- .../workbenchThemeService.i18n.json | 3 +- i18n/deu/extensions/git/out/main.i18n.json | 3 +- i18n/deu/extensions/git/out/model.i18n.json | 4 ++- i18n/deu/extensions/git/package.i18n.json | 4 +-- i18n/deu/extensions/grunt/out/main.i18n.json | 4 ++- i18n/deu/extensions/grunt/package.i18n.json | 4 ++- i18n/deu/extensions/gulp/out/main.i18n.json | 4 ++- .../deu/extensions/markdown/package.i18n.json | 3 +- i18n/deu/extensions/php/package.i18n.json | 3 +- .../out/typescriptServiceClient.i18n.json | 4 +-- .../extensions/typescript/package.i18n.json | 10 +++++- .../browser/widget/diffEditorWidget.i18n.json | 7 +++- .../editor/common/services/bulkEdit.i18n.json | 5 ++- .../browser/referencesModel.i18n.json | 5 ++- .../browser/referencesWidget.i18n.json | 4 +-- .../contrib/rename/browser/rename.i18n.json | 1 + .../browser/suggestController.i18n.json | 1 + .../suggest/browser/suggestWidget.i18n.json | 2 ++ .../theme/common/colorRegistry.i18n.json | 9 ++--- .../api/node/extHostTreeView.i18n.json | 9 +++++ .../src/vs/workbench/common/theme.i18n.json | 24 ++++++------- .../main.contribution.i18n.json | 3 ++ .../inspectKeybindings.i18n.json | 4 +-- .../browser/debugActionsWidget.i18n.json | 6 ++++ .../parts/debug/common/debugModel.i18n.json | 4 +-- .../parts/debug/common/debugSource.i18n.json | 8 +++++ .../debug.contribution.i18n.json | 3 +- .../treeExplorer.contribution.i18n.json | 4 --- .../extensionTipsService.i18n.json | 1 + .../extensionsViewlet.i18n.json | 1 + .../files/browser/saveErrorHandler.i18n.json | 1 + .../browser/keybindingsEditor.i18n.json | 2 ++ .../keybindingsEditorContribution.i18n.json | 3 +- .../common/keybindingsEditorModel.i18n.json | 4 ++- .../terminal.contribution.i18n.json | 1 + .../terminalConfigHelper.i18n.json | 1 + .../themes.contribution.i18n.json | 3 +- .../electron-browser/colorThemeData.i18n.json | 6 +--- .../workbenchThemeService.i18n.json | 3 +- .../extensions/git/out/askpass-main.i18n.json | 4 ++- .../esn/extensions/git/out/commands.i18n.json | 15 +++++++- i18n/esn/extensions/git/package.i18n.json | 5 +-- i18n/esn/extensions/gulp/package.i18n.json | 4 +-- .../out/typescriptServiceClient.i18n.json | 3 -- .../out/utils/typingsStatus.i18n.json | 1 - .../browser/widget/diffEditorWidget.i18n.json | 8 ++--- .../browser/referencesWidget.i18n.json | 7 ++-- .../suggest/browser/suggestWidget.i18n.json | 1 - .../theme/common/colorRegistry.i18n.json | 20 +---------- .../api/node/extHostTreeView.i18n.json | 9 +++++ .../src/vs/workbench/common/theme.i18n.json | 23 +++++------- .../inspectKeybindings.i18n.json | 4 +-- .../browser/debugActionsWidget.i18n.json | 6 ++++ .../parts/debug/common/debugModel.i18n.json | 4 +-- .../parts/debug/common/debugSource.i18n.json | 8 +++++ .../treeExplorer.contribution.i18n.json | 4 --- .../keybindingsEditorContribution.i18n.json | 3 +- .../themes.contribution.i18n.json | 3 +- .../electron-browser/colorThemeData.i18n.json | 6 +--- .../workbenchThemeService.i18n.json | 3 +- i18n/fra/extensions/git/out/main.i18n.json | 3 +- i18n/fra/extensions/git/out/model.i18n.json | 4 ++- i18n/fra/extensions/git/package.i18n.json | 4 +-- i18n/fra/extensions/grunt/out/main.i18n.json | 4 ++- i18n/fra/extensions/grunt/package.i18n.json | 4 ++- i18n/fra/extensions/gulp/out/main.i18n.json | 4 ++- .../fra/extensions/markdown/package.i18n.json | 4 ++- i18n/fra/extensions/php/package.i18n.json | 3 +- .../out/typescriptServiceClient.i18n.json | 4 +-- .../extensions/typescript/package.i18n.json | 10 +++++- .../src/vs/code/electron-main/menus.i18n.json | 6 ++++ .../browser/widget/diffEditorWidget.i18n.json | 7 +++- .../editor/common/services/bulkEdit.i18n.json | 5 ++- .../browser/goToDeclaration.i18n.json | 2 ++ .../multicursor/common/multicursor.i18n.json | 3 +- .../browser/referencesModel.i18n.json | 5 ++- .../browser/referencesWidget.i18n.json | 4 +-- .../contrib/rename/browser/rename.i18n.json | 1 + .../browser/suggestController.i18n.json | 1 + .../suggest/browser/suggestWidget.i18n.json | 2 ++ .../menusExtensionPoint.i18n.json | 1 + .../theme/common/colorRegistry.i18n.json | 9 +++-- .../api/node/extHostTreeView.i18n.json | 9 +++++ .../src/vs/workbench/common/theme.i18n.json | 24 ++++++------- .../main.contribution.i18n.json | 3 ++ .../inspectKeybindings.i18n.json | 4 +-- .../browser/debugActionsWidget.i18n.json | 6 ++++ .../parts/debug/common/debugModel.i18n.json | 4 +-- .../parts/debug/common/debugSource.i18n.json | 8 +++++ .../debug.contribution.i18n.json | 3 +- .../treeExplorer.contribution.i18n.json | 4 --- .../extensionTipsService.i18n.json | 1 + .../extensionsViewlet.i18n.json | 1 + .../files/browser/saveErrorHandler.i18n.json | 1 + .../browser/keybindingsEditor.i18n.json | 2 ++ .../keybindingsEditorContribution.i18n.json | 3 +- .../common/keybindingsEditorModel.i18n.json | 4 ++- .../terminal.contribution.i18n.json | 1 + .../terminalConfigHelper.i18n.json | 1 + .../themes.contribution.i18n.json | 3 +- .../electron-browser/colorThemeData.i18n.json | 6 +--- .../workbenchThemeService.i18n.json | 3 +- i18n/ita/extensions/git/out/model.i18n.json | 4 ++- i18n/ita/extensions/git/package.i18n.json | 8 ++--- i18n/ita/extensions/grunt/out/main.i18n.json | 4 ++- i18n/ita/extensions/grunt/package.i18n.json | 4 ++- i18n/ita/extensions/gulp/package.i18n.json | 4 +-- .../ita/extensions/markdown/package.i18n.json | 3 +- .../out/typescriptServiceClient.i18n.json | 3 -- .../extensions/typescript/package.i18n.json | 7 +++- .../resourceviewer/resourceViewer.i18n.json | 2 +- .../browser/widget/diffEditorWidget.i18n.json | 7 +++- .../editor/common/services/bulkEdit.i18n.json | 5 ++- .../common/bracketMatching.i18n.json | 2 +- .../format/browser/formatActions.i18n.json | 10 +++--- .../browser/referencesModel.i18n.json | 5 ++- .../browser/referencesWidget.i18n.json | 4 +-- .../contrib/rename/browser/rename.i18n.json | 1 + .../browser/suggestController.i18n.json | 1 + .../suggest/browser/suggestWidget.i18n.json | 2 ++ .../theme/common/colorRegistry.i18n.json | 9 ++--- .../api/node/extHostTreeView.i18n.json | 9 +++++ .../src/vs/workbench/common/theme.i18n.json | 24 ++++++------- .../main.contribution.i18n.json | 1 + .../inspectKeybindings.i18n.json | 4 +-- .../browser/debugActionsWidget.i18n.json | 6 ++++ .../parts/debug/common/debugModel.i18n.json | 4 +-- .../parts/debug/common/debugSource.i18n.json | 8 +++++ .../treeExplorer.contribution.i18n.json | 4 --- .../keybindingsEditorContribution.i18n.json | 3 +- .../terminalConfigHelper.i18n.json | 1 + .../themes.contribution.i18n.json | 3 +- .../electron-browser/colorThemeData.i18n.json | 6 +--- .../workbenchThemeService.i18n.json | 3 +- .../jpn/extensions/git/out/commands.i18n.json | 1 - i18n/jpn/extensions/git/out/model.i18n.json | 3 +- i18n/jpn/extensions/git/package.i18n.json | 2 -- i18n/jpn/extensions/grunt/out/main.i18n.json | 4 ++- i18n/jpn/extensions/grunt/package.i18n.json | 4 ++- .../out/typescriptServiceClient.i18n.json | 3 -- .../extensions/typescript/package.i18n.json | 5 ++- .../browser/widget/diffEditorWidget.i18n.json | 7 +++- .../editor/common/services/bulkEdit.i18n.json | 1 + .../browser/referencesModel.i18n.json | 5 ++- .../browser/referencesWidget.i18n.json | 4 +-- .../contrib/rename/browser/rename.i18n.json | 1 + .../browser/suggestController.i18n.json | 1 + .../suggest/browser/suggestWidget.i18n.json | 1 + .../markers/common/problemMatcher.i18n.json | 3 ++ .../theme/common/colorRegistry.i18n.json | 9 +++-- .../api/node/extHostTreeView.i18n.json | 9 +++++ .../src/vs/workbench/common/theme.i18n.json | 24 ++++++------- .../main.contribution.i18n.json | 2 ++ .../inspectKeybindings.i18n.json | 4 +-- .../browser/debugActionsWidget.i18n.json | 6 ++++ .../parts/debug/common/debugModel.i18n.json | 4 +-- .../parts/debug/common/debugSource.i18n.json | 8 +++++ .../debug.contribution.i18n.json | 3 +- .../treeExplorer.contribution.i18n.json | 4 --- .../extensionTipsService.i18n.json | 1 + .../files/browser/saveErrorHandler.i18n.json | 1 + .../browser/keybindingsEditor.i18n.json | 2 ++ .../keybindingsEditorContribution.i18n.json | 3 +- .../common/keybindingsEditorModel.i18n.json | 1 + .../search/browser/replaceService.i18n.json | 4 ++- .../task.contribution.i18n.json | 1 + .../terminalConfigHelper.i18n.json | 1 + .../themes.contribution.i18n.json | 3 +- .../electron-browser/colorThemeData.i18n.json | 6 +--- .../workbenchThemeService.i18n.json | 3 +- i18n/kor/extensions/git/out/model.i18n.json | 4 ++- i18n/kor/extensions/git/package.i18n.json | 4 +-- i18n/kor/extensions/grunt/out/main.i18n.json | 4 ++- i18n/kor/extensions/grunt/package.i18n.json | 4 ++- i18n/kor/extensions/gulp/out/main.i18n.json | 4 ++- .../kor/extensions/markdown/package.i18n.json | 4 ++- i18n/kor/extensions/php/package.i18n.json | 3 +- .../out/typescriptServiceClient.i18n.json | 4 +-- .../extensions/typescript/package.i18n.json | 8 ++++- .../src/vs/code/electron-main/menus.i18n.json | 5 +++ .../browser/widget/diffEditorWidget.i18n.json | 7 +++- .../editor/common/services/bulkEdit.i18n.json | 5 ++- .../browser/goToDeclaration.i18n.json | 1 + .../browser/referencesModel.i18n.json | 5 ++- .../browser/referencesWidget.i18n.json | 4 +-- .../contrib/rename/browser/rename.i18n.json | 1 + .../browser/suggestController.i18n.json | 1 + .../suggest/browser/suggestWidget.i18n.json | 2 ++ .../theme/common/colorRegistry.i18n.json | 9 +++-- .../api/node/extHostTreeView.i18n.json | 9 +++++ .../src/vs/workbench/common/theme.i18n.json | 24 ++++++------- .../main.contribution.i18n.json | 3 ++ .../inspectKeybindings.i18n.json | 4 +-- .../browser/debugActionsWidget.i18n.json | 6 ++++ .../parts/debug/common/debugModel.i18n.json | 4 +-- .../parts/debug/common/debugSource.i18n.json | 8 +++++ .../debug.contribution.i18n.json | 3 +- .../debug/electron-browser/repl.i18n.json | 1 + .../electron-browser/replViewer.i18n.json | 6 +++- .../treeExplorer.contribution.i18n.json | 4 --- .../extensionTipsService.i18n.json | 1 + .../extensionsViewlet.i18n.json | 1 + .../browser/keybindingsEditor.i18n.json | 2 ++ .../keybindingsEditorContribution.i18n.json | 3 +- .../common/keybindingsEditorModel.i18n.json | 1 + .../terminal.contribution.i18n.json | 1 + .../terminalConfigHelper.i18n.json | 1 + .../themes.contribution.i18n.json | 3 +- .../electron-browser/colorThemeData.i18n.json | 6 +--- .../workbenchThemeService.i18n.json | 3 +- i18n/rus/extensions/git/out/main.i18n.json | 3 +- i18n/rus/extensions/git/out/model.i18n.json | 4 ++- i18n/rus/extensions/git/package.i18n.json | 4 +-- i18n/rus/extensions/gulp/out/main.i18n.json | 4 ++- .../out/typescriptServiceClient.i18n.json | 4 +-- .../extensions/typescript/package.i18n.json | 5 ++- .../src/vs/code/electron-main/menus.i18n.json | 1 + .../browser/widget/diffEditorWidget.i18n.json | 7 +++- .../editor/common/services/bulkEdit.i18n.json | 5 ++- .../browser/referencesModel.i18n.json | 8 ++++- .../browser/referencesWidget.i18n.json | 4 +-- .../contrib/rename/browser/rename.i18n.json | 1 + .../browser/suggestController.i18n.json | 1 + .../suggest/browser/suggestWidget.i18n.json | 5 +++ .../platform/environment/node/argv.i18n.json | 1 + .../theme/common/colorRegistry.i18n.json | 36 +++++++++++++++---- .../api/node/extHostTreeView.i18n.json | 9 +++++ .../src/vs/workbench/common/theme.i18n.json | 23 +++++------- .../inspectKeybindings.i18n.json | 4 +-- .../browser/debugActionsWidget.i18n.json | 6 ++++ .../parts/debug/common/debugModel.i18n.json | 4 +-- .../parts/debug/common/debugSource.i18n.json | 8 +++++ .../treeExplorer.contribution.i18n.json | 4 --- .../files/browser/saveErrorHandler.i18n.json | 1 + .../keybindingsEditorContribution.i18n.json | 3 +- .../themes.contribution.i18n.json | 3 +- .../electron-browser/colorThemeData.i18n.json | 6 +--- .../workbenchThemeService.i18n.json | 3 +- 293 files changed, 920 insertions(+), 535 deletions(-) create mode 100644 i18n/chs/src/vs/workbench/api/node/extHostTreeView.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/debug/common/debugSource.i18n.json create mode 100644 i18n/cht/src/vs/workbench/api/node/extHostTreeView.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/debug/common/debugSource.i18n.json create mode 100644 i18n/deu/src/vs/workbench/api/node/extHostTreeView.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/debug/common/debugSource.i18n.json create mode 100644 i18n/esn/src/vs/workbench/api/node/extHostTreeView.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/debug/common/debugSource.i18n.json create mode 100644 i18n/fra/src/vs/workbench/api/node/extHostTreeView.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/debug/common/debugSource.i18n.json create mode 100644 i18n/ita/src/vs/workbench/api/node/extHostTreeView.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/debug/common/debugSource.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/api/node/extHostTreeView.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/debug/common/debugSource.i18n.json create mode 100644 i18n/kor/src/vs/workbench/api/node/extHostTreeView.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/debug/common/debugSource.i18n.json create mode 100644 i18n/rus/src/vs/workbench/api/node/extHostTreeView.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/debug/common/debugSource.i18n.json diff --git a/i18n/chs/extensions/git/out/commands.i18n.json b/i18n/chs/extensions/git/out/commands.i18n.json index 7746211bbf628..b7d7aed996083 100644 --- a/i18n/chs/extensions/git/out/commands.i18n.json +++ b/i18n/chs/extensions/git/out/commands.i18n.json @@ -16,15 +16,16 @@ "confirm discard": "确定要放弃 {0} 中更改吗?", "confirm discard multiple": "是否确实要放弃 {0} 文件中的更改?", "discard": "放弃更改", - "confirm discard all": "确定要放弃所有更改吗?此操作不可撤销!", "no changes": "没有要提交的更改。", "commit message": "提交消息", "provide commit message": "请提供提交消息", "branch name": "分支名称", "provide branch name": "请提供分支名称", + "no remotes to pull": "存储库未配置任何从其中进行拉取的远程存储库。", "no remotes to push": "存储库未配置任何要推送到的远程存储库。", "nobranch": "请签出一个分支以推送到远程。", "pick remote": "选取要将分支“{0}”发布到的远程:", + "sync is unpredictable": "此操作从“{0}”推送和拉取提交。", "ok": "确定", "never again": "好,永不再显示", "no remotes to publish": "存储库未配置任何要发布到的远程存储库。", diff --git a/i18n/chs/extensions/git/package.i18n.json b/i18n/chs/extensions/git/package.i18n.json index 27fa6e370caf2..d45df3f45c4b9 100644 --- a/i18n/chs/extensions/git/package.i18n.json +++ b/i18n/chs/extensions/git/package.i18n.json @@ -39,8 +39,6 @@ "config.autofetch": "是否启用了自动提取", "config.enableLongCommitWarning": "是否针对长段提交消息进行警告", "config.confirmSync": "同步 GIT 存储库前请先进行确认", - "config.countBadge": "控制 GIT 徽章计数器", - "config.checkoutType": "控制列出哪些分支类型", "config.ignoreLegacyWarning": "忽略旧版 Git 警告", "config.ignoreLimitWarning": "忽略“存储库中存在大量更改”的警告" } \ No newline at end of file diff --git a/i18n/chs/extensions/grunt/out/main.i18n.json b/i18n/chs/extensions/grunt/out/main.i18n.json index 8b6ad71cd4e6d..6f111606a092d 100644 --- a/i18n/chs/extensions/grunt/out/main.i18n.json +++ b/i18n/chs/extensions/grunt/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "自动检测 Grunt 失败,错误:{0}" +} \ No newline at end of file diff --git a/i18n/chs/extensions/grunt/package.i18n.json b/i18n/chs/extensions/grunt/package.i18n.json index 8b6ad71cd4e6d..750b3bc4c13af 100644 --- a/i18n/chs/extensions/grunt/package.i18n.json +++ b/i18n/chs/extensions/grunt/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.grunt.autoDetect": "控制自动检测 Grunt 任务是否打开。默认开启。" +} \ No newline at end of file diff --git a/i18n/chs/extensions/gulp/package.i18n.json b/i18n/chs/extensions/gulp/package.i18n.json index 045189a90f813..8b6ad71cd4e6d 100644 --- a/i18n/chs/extensions/gulp/package.i18n.json +++ b/i18n/chs/extensions/gulp/package.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "config.gulp.autoDetect": "控制自动检测 gulp 任务是否打开。默认开启。" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/chs/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/chs/extensions/typescript/out/features/bufferSyncSupport.i18n.json index b2cb78f102d0b..c885212097a21 100644 --- a/i18n/chs/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/chs/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "versionMismatch": "版本不匹配! 全局 tsc ({0}) != VS Code 的语言服务({1})。可能出现不一致的编译错误", "moreInformation": "详细信息", "doNotCheckAgain": "不要再次检查", "close": "关闭", diff --git a/i18n/chs/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/chs/extensions/typescript/out/typescriptServiceClient.i18n.json index 046adff9e707e..79910794a2266 100644 --- a/i18n/chs/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/chs/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,13 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "重启", - "restartTypeScriptServerBlurb": "重启 TypeScript 服务器以应用更改", - "later": "稍后", "channelName": "TypeScript", "noServerFound": "路径 {0} 未指向有效的 tsserver 安装。请回退到捆绑的 TypeScript 版本。", "noBundledServerFound": "其他应用程序(例如运行异常的病毒检测工具)已删除 VSCode 的 tsserver。请重新安装 VS Code。", "versionNumber.custom": "自定义", + "serverCouldNotBeStarted": "无法启动 TypeScript 语言服务器。错误消息为: {0}", "useVSCodeVersionOption": "使用 VSCode 的版本", "activeVersion": "当前处于活动状态", "useWorkspaceVersionOption": "使用工作区版本", diff --git a/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json index cba20c137972f..f6ee369cc4082 100644 --- a/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,7 +5,6 @@ // Do not edit this file. It is machine generated. { "installingPackages": "提取数据以实现更好的 TypeScript IntelliSense", - "typesInstallerInitializationFailed.title": "无法为 JavaScript 语言功能安装 typings 文件。请确认 NPM 已经安装", "typesInstallerInitializationFailed.moreInformation": "详细信息", "typesInstallerInitializationFailed.doNotCheckAgain": "不要再次检查", "typesInstallerInitializationFailed.close": "关闭" diff --git a/i18n/chs/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/chs/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index 8b6ad71cd4e6d..8b17b19639ade 100644 --- a/i18n/chs/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/chs/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "diffEditorInserted": "已插入文本的背景颜色。", + "diffEditorRemoved": "被删除文本的背景颜色。", + "diffEditorInsertedOutline": "插入的文本的轮廓颜色。", + "diffEditorRemovedOutline": "被删除文本的轮廓颜色。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json index c0bcb56318650..4a8ec7c378a9c 100644 --- a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -26,6 +26,7 @@ "wordWrap.on": "将在视区宽度处换行。", "wordWrap.wordWrapColumn": "将在 \"editor.wordWrapColumn\" 处换行。", "wordWrap.bounded": "将在最小视区和 \"editor.wordWrapColumn\" 处换行。", + "wordWrap": "控制换行方式。可以选择:\n - “off” (禁用换行),\n - “on” (视区换行),\n - “wordWrapColumn” (在 \"editor.wordWrapColumn\" 处换行`) 或\n - “bounded” (在视区和 \"editor.wordWrapColumn\" 中的最小值处换行)。", "wordWrapColumn": "在 \"editor.wordWrap\" 为 \"wordWrapColumn\" 或 \"bounded\" 时控制编辑器列的换行。", "wrappingIndent": "控制换行的行的缩进。可以是\\\\\"none\\\\\"、 \\\\\"same\\\\\" 或 \\\\\"indent\\\\\"。", "mouseWheelScrollSensitivity": "要对鼠标滚轮滚动事件的 \"deltaX\" 和 \"deltaY\" 使用的乘数 ", diff --git a/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json index 0d70c92f50016..d517535edcae2 100644 --- a/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "lineHighlight": "光标所在行高亮文本的背景颜色。", + "lineHighlight": "光标所在行高亮内容的背景颜色。", "lineHighlightBorderBox": "光标所在行四周边框的背景颜色。", "rangeHighlight": "突出显示范围的背景颜色,例如 \"Quick Open\" 和“查找”功能。", "caret": "编辑器光标颜色。", diff --git a/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index c0aa1adc88c76..26bf7a51ac5af 100644 --- a/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "aria.oneReference": "在文件 {0} 的 {1} 行 {2} 列的符号", + "aria.fileReferences.1": "{0} 中有 1 个符号", + "aria.fileReferences.N": "{1} 中有 {0} 个符号", "aria.result.0": "未找到结果", "aria.result.1": "在 {0} 中找到 1 个符号", "aria.result.n1": "在 {1} 中找到 {0} 个符号", diff --git a/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index eb47c72700185..e200e46e37675 100644 --- a/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -12,8 +12,8 @@ "noResults": "无结果", "peekView.alternateTitle": "引用", "peekViewTitleBackground": "速览视图标题区域背景颜色。", - "peekViewTitle": "速览视图标题颜色。", - "peekViewTitleInfo": "速览视图标题信息颜色。", + "peekViewTitleForeground": "速览视图标题颜色。", + "peekViewTitleInfoForeground": "速览视图标题信息颜色。", "peekViewBorder": "速览视图边框和箭头颜色。", "peekViewResultsBackground": "速览视图结果列表背景颜色。", "peekViewResultsMatchForeground": "在速览视图结果列表中匹配条目前景色。", diff --git a/i18n/chs/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/chs/src/vs/editor/contrib/rename/browser/rename.i18n.json index f965e61027712..1f33c3d33d2ba 100644 --- a/i18n/chs/src/vs/editor/contrib/rename/browser/rename.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "no result": "无结果。", + "aria": "成功将“{0}”重命名为“{1}”。摘要:{2}", "rename.failed": "抱歉,重命名无法执行。", "rename.label": "重命名符号" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json index 2f25ac5482136..ef3fe110728ff 100644 --- a/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "arai.alert.snippet": "确认“{0}”插入以下文本:{1}", "suggest.trigger.label": "触发建议" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 84279723b776b..12737ed6d9bdb 100644 --- a/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -4,6 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "editorSuggestWidgetBackground": "建议小组件的背景颜色", + "editorSuggestWidgetBorder": "建议小组件的边框颜色", + "editorSuggestWidgetForeground": "建议小组件的前景颜色。", + "editorSuggestWidgetSelectedBackground": "建议小组件中被选择条目的背景颜色。", + "editorSuggestWidgetHighlightForeground": "建议小组件中匹配内容的高亮颜色。", "readMore": "阅读更多...{0}", "suggestionWithDetailsAriaLabel": "{0}(建议)具有详细信息", "suggestionAriaLabel": "{0},建议", diff --git a/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 0699d103832e2..3aee009f0fbf4 100644 --- a/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "requirearray": "菜单项必须为一个数组", + "requirestring": "属性“{0}”是必要属性,其类型必须是“string”", "optstring": "属性“{0}”可以被省略,否则其类型必须为“string”", "vscode.extension.contributes.menuItem.command": "要执行的命令的标识符。该命令必须在 \"commands\" 部分中声明", "vscode.extension.contributes.menuItem.alt": "要执行的替代命令的标识符。该命令必须在“命令”部分中声明", @@ -35,5 +36,6 @@ "menuId.invalid": "“{0}”为无效菜单标识符", "missing.command": "菜单项引用未在“命令”部分进行定义的命令“{0}”。", "missing.altCommand": "菜单项引用未在“命令”部分进行定义的 alt 命令“{0}”。", - "dupe.command": "菜单项引用与默认和 alt 命令相同的命令" + "dupe.command": "菜单项引用与默认和 alt 命令相同的命令", + "nosupport.altCommand": "抱歉,目前仅有“editor/title”菜单的“navigation”组支持 alt 命令" } \ No newline at end of file diff --git a/i18n/chs/src/vs/platform/environment/node/argv.i18n.json b/i18n/chs/src/vs/platform/environment/node/argv.i18n.json index 7de2b4c533586..f5c7660b6175b 100644 --- a/i18n/chs/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/chs/src/vs/platform/environment/node/argv.i18n.json @@ -20,6 +20,7 @@ "showVersions": "使用 --list-extension 时,显示已安装扩展的版本。", "installExtension": "安装扩展。", "uninstallExtension": "卸载扩展。", + "experimentalApis": "启用扩展程序实验性 api 功能。", "disableExtensions": "禁用所有已安装的扩展。", "disableGPU": "禁用 GPU 硬件加速。", "version": "打印版本。", diff --git a/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json index 8a1380aeb6292..a28f091a27bc4 100644 --- a/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -7,6 +7,7 @@ "ProblemPatternParser.loopProperty.notLast": "循环属性仅在最一个行匹配程序上受支持。", "ProblemPatternParser.problemPattern.missingRegExp": "问题模式缺少正则表达式。", "ProblemPatternParser.problemPattern.missingProperty": "问题模式无效。它必须至少包含一个文件、消息和行或位置匹配组。", + "ProblemPatternParser.invalidRegexp": "错误:字符串 {0} 不是有效的正则表达式。\n", "ProblemPatternSchema.regexp": "用于在输出中查找错误、警告或信息的正则表达式。", "ProblemPatternSchema.file": "文件名的匹配组索引。如果省略,则使用 1。", "ProblemPatternSchema.location": "问题位置的匹配组索引。有效的位置模式为(line)、(line,column)和(startLine,startColumn,endLine,endColumn)。如果省略了,将假定(line,column)。", @@ -27,10 +28,12 @@ "ProblemMatcherParser.noProblemPattern": "错误: 描述未定义有效的问题模式:\n{0}\n", "ProblemMatcherParser.noOwner": "错误: 描述未定义所有者:\n{0}\n", "ProblemMatcherParser.noFileLocation": "错误: 描述未定义文件位置:\n{0}\n", + "ProblemMatcherParser.unknownSeverity": "信息:未知严重性 {0}。有效值为“error”、“warning”和“info”。\n", "ProblemMatcherParser.noDefinedPatter": "错误: 含标识符 {0} 的模式不存在。", "ProblemMatcherParser.noIdentifier": "错误: 模式属性引用空标识符。", "ProblemMatcherParser.noValidIdentifier": "错误: 模式属性 {0} 是无效的模式变量名。", "ProblemMatcherParser.problemPattern.watchingMatcher": "问题匹配程序必须定义监视的开始模式和结束模式。", + "ProblemMatcherParser.invalidRegexp": "错误: 字符串 {0} 不是有效的正则表达式。\n", "WatchingPatternSchema.regexp": "用于检测监视任务的开始和结束的正则表达式。", "WatchingPatternSchema.file": "文件名的匹配组索引。可以省略。", "PatternTypeSchema.name": "所提供或预定义模式的名称", diff --git a/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json index df4685c01a5f9..5f7643de9e4b5 100644 --- a/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,19 +4,44 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "无效的颜色格式。请使用 #RRGGBB 或 #RRGGBBAA", + "invalid.color": "颜色格式无效。请使用 #RGB、#RGBA、#RRGGBB 或 #RRGGBBAA", "schema.colors": "工作台中使用的颜色。", "foreground": "整体前景色。此颜色仅在不被组件覆盖时适用。", - "focusedElementOutline": "重点元素的整体边框颜色。此颜色仅在不被组件覆盖时适用。", - "highContrastBorder": "启用高对比度主题时,用于分隔组件的边框颜色。", - "highContrastOutline": "启用高对比度主题时,活动组件的轮廓颜色。", + "focusBorder": "焦点元素的整体边框颜色。此颜色仅在不被其他组件覆盖时适用。", + "contrastBorder": "在元素周围额外的一层边框,用来提高对比度从而区别其他元素。", + "activeContrastBorder": "在活动元素周围额外的一层边框,用来提高对比度从而区别其他元素。", + "widgetShadow": "编辑器内小组件(如查找/替换)的阴影颜色。", "inputBoxBackground": "输入框背景色。", "inputBoxForeground": "输入框前景色。", "inputBoxBorder": "输入框边框。", "inputBoxActiveOptionBorder": "输入字段中已激活选项的边框颜色。", + "inputValidationInfoBackground": "严重性为信息时输入验证的背景颜色。", + "inputValidationInfoBorder": "严重性为信息时输入验证的边框颜色。", + "inputValidationWarningBackground": "严重性为警告时输入验证的背景颜色。", + "inputValidationWarningBorder": "严重性为警告时输入验证的边框颜色。", + "inputValidationErrorBackground": "严重性为错误时输入验证的背景颜色。", + "inputValidationErrorBorder": "严重性为错误时输入验证的边框颜色。", "dropdownBackground": "下拉列表背景色。", "dropdownForeground": "下拉列表前景色。", "dropdownBorder": "下拉列表边框。", + "listFocusBackground": "焦点项在列表或树活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。", + "listActiveSelectionBackground": "已选项在列表或树活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。", + "listInactiveSelectionBackground": "已选项在列表或树非活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。", + "listActiveSelectionForeground": "已选项在列表或树活动时的前景颜色。活动的列表或树具有键盘焦点,非活动的没有。", + "listFocusAndSelectionBackground": "被选中且聚焦的项目在列表或树活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。此颜色比单独的选择和焦点颜色的优先级高。", + "listFocusAndSelectionForeground": "被选中且聚焦的项目在列表或树活动时的前景颜色。活动的列表或树具有键盘焦点,非活动的没有。此颜色比单独的选择和焦点颜色的优先级高。", + "listHoverBackground": "使用鼠标移动项目时,列表或树的背景颜色。", + "listDropBackground": "使用鼠标移动项目时,列表或树进行拖放的背景颜色。", + "highlight": "在列表或树中搜索时,其中匹配内容的高亮颜色。", + "pickerGroupForeground": "快速选取器分组标签的颜色。", + "pickerGroupBorder": "快速选取器分组边框的颜色。", + "buttonForeground": "按钮前景色。", + "buttonBackground": "按钮背景色。", + "buttonHoverBackground": "按钮在悬停时的背景颜色。", + "scrollbarShadow": "表示视图被滚动的滚动条阴影。", + "scrollbarSliderBackground": "滑块的背景颜色。", + "scrollbarSliderHoverBackground": "滑块在悬停时的背景颜色。", + "scrollbarSliderActiveBackground": "滑块在活动的背景颜色。", "editorBackground": "编辑器背景颜色。", "editorForeground": "编辑器默认前景色。", "editorSelection": "编辑器所选内容的颜色。", @@ -27,6 +52,5 @@ "findRangeHighlight": "限制搜索的范围的颜色。", "activeLinkForeground": "活动链接颜色。", "linkForeground": "链接颜色。", - "editorWidgetBackground": "编辑器组件(如查找/替换)背景颜色。", - "editorWidgetShadow": "编辑器组件(如查找/替换)阴影颜色。" + "editorWidgetBackground": "编辑器组件(如查找/替换)背景颜色。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/chs/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..dc7534a706017 --- /dev/null +++ b/i18n/chs/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "没有注册 ID 为“{0}”的 TreeExplorerNodeProvider。", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider“{0}”无法提供根节点。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/common/theme.i18n.json b/i18n/chs/src/vs/workbench/common/theme.i18n.json index 8cd936efa7a68..bff10399ed5f0 100644 --- a/i18n/chs/src/vs/workbench/common/theme.i18n.json +++ b/i18n/chs/src/vs/workbench/common/theme.i18n.json @@ -5,35 +5,30 @@ // Do not edit this file. It is machine generated. { "tabsContainerBackground": "选项卡容器的边框颜色。选项卡是编辑器区域中编辑器的容器。可在一个编辑器组中打开多个选项卡。可以存在多个编辑器组。", - "activeTabBackground": "活动选项卡的背景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", - "inactiveTabBackground": "非活动选项卡的背景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", - "activeTabActiveGroupForeground": "活动组中活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", - "activeTabInactiveGroupForeground": "非活动组中活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", - "inactiveTabActiveGroupForeground": "活动组中非活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", - "inactiveTabInactiveGroupForeground": "非活动组中非活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", + "tabActiveBackground": "活动选项卡的背景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", + "tabInactiveBackground": "非活动选项卡的背景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", "tabBorder": "用于将选项卡彼此分隔开的边框。选项卡是编辑器区域中编辑器的容器。可在一个编辑器组中打开多个选项卡。可以存在多个编辑器组。", - "editorHeaderBackground": "未启用任何选项卡的情况下,编辑器标题标头的背景颜色。", + "tabActiveEditorGroupActiveForeground": "活动组中活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", + "tabActiveEditorGroupInactiveForeground": "非活动组中活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", + "tabInactiveEditorGroupActiveForeground": "活动组中非活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", + "tabInactiveEditorGroupInactiveForeground": "非活动组中非活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", "editorGroupBorder": "将多个编辑器组彼此分隔开的颜色。编辑器组是编辑器的容器。", - "editorGroupBackground": "编辑器组的背景颜色。编辑器组是编辑器的容器。", "editorDragAndDropBackground": "随意拖动编辑器时的背景色。", - "editorSideBySideBorder": "用于将并排编辑器的详细信息与主边栏分隔开的边框颜色。", "panelBackground": "面板的背景色。面板显示在编辑器区域下方,可包含输出和集成终端等视图。", - "panelTopBorder": "分隔到编辑器的顶部面板边框色。面板显示在编辑器区域下方,可包含输出和集成终端等视图。", + "panelBorder": "分隔到编辑器的顶部面板边框色。面板显示在编辑器区域下方,可包含输出和集成终端等视图。", "panelActiveTitleForeground": "活动面板的标题颜色。面板显示在编辑器区域下方,并包含输出和集成终端等视图。", "panelInactiveTitleForeground": "非活动面板的标题颜色。面板显示在编辑器区域下方,并包含输出和集成终端等视图。", - "panelActiveTitleBorder": "活动面板标题的边框颜色。面板显示在编辑器区域下方,并包含输出和集成终端等视图。", + "panelActiveTitleBorder": "活动面板的边框颜色。面板显示在编辑器区域下方,包含输出和集成终端等视图。", "statusBarForeground": "状态栏前景色。状态栏显示在窗口底部。", "statusBarBackground": "标准状态栏背景色。状态栏显示在窗口底部。", "statusBarNoFolderBackground": "没有打开文件夹时状态栏的背景色。状态栏显示在窗口底部。", "statusBarItemActiveBackground": "单击时的状态栏项背景色。状态栏显示在窗口底部。", "statusBarItemHoverBackground": "悬停时的状态栏项背景色。状态栏显示在窗口底部。", - "statusBarInfoItemBackground": "状态栏信息项背景色。状态栏显示在窗口底部。", - "statusBarInfoItemHoverBackground": "悬停时的状态栏信息项背景色。状态栏显示在窗口底部。", "activityBarBackground": "活动栏背景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "activityBarForeground": "活动栏前景色(例如用于图标)。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", - "activityBarDragAndDropBackground": "拖放活动栏项的反馈颜色。 活动栏显示在最左侧或最右侧,并允许在侧边栏视图之间切换。", - "activityBadgeBackground": "活动通知提醒背景颜色。活动栏显示在最左侧或最右侧,并允许在侧边栏视图之间切换。", - "activityBadgeForeground": "活动通知提醒前景色。活动栏显示在最左侧或最右侧,并允许在侧边栏视图之间切换。", + "activityBarDragAndDropBackground": "活动栏项的拖放反馈颜色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", + "activityBarBadgeBackground": "活动通知徽章背景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", + "activityBarBadgeForeground": "活动通知徽章前景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "sideBarBackground": "侧边栏背景色。侧边栏是资源管理器和搜索等视图的容器。", "sideBarTitleForeground": "侧边栏标题前景色。侧边栏是资源管理器和搜索等视图的容器。", "titleBarActiveForeground": "窗口处于活动状态时的标题栏前景色。请注意,该颜色当前仅在 macOS 上受支持。", diff --git a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..8b6ad71cd4e6d 100644 --- a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/common/debugModel.i18n.json index 84e124d8037c0..8408a37f11a6e 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "未知源", "notAvailable": "不可用", - "startDebugFirst": "请启动调试会话以评估", - "unknownStack": "未知的堆栈位置" + "startDebugFirst": "请启动调试会话以评估" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..b9d67ae239156 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "未知源" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 5b9fad8155072..7ee7785b78143 100644 --- a/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "将自定义树资源管理器 viewlet 添加到边栏", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "用于标识通过 vscode.workspace.registerTreeExplorerNodeProvider 注册的提供程序的唯一 ID", - "vscode.extension.contributes.explorer.treeLabel": "用于呈现自定义树资源管理器的人工可读字符串", - "vscode.extension.contributes.explorer.icon": "活动栏上指向 viewlet 图标的路径", "showViewlet": "显示 {0}", "view": "查看" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 84943cf12d797..3db635ddc246b 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -6,6 +6,5 @@ { "defineKeybinding.start": "定义键绑定", "defineKeybinding.kbLayoutInfoMessage": "对于当前键盘布局,按 ", - "defineKeybinding.kbLayoutErrorMessage": "在当前键盘布局下无法生成此组合键。", - "DefineKeybindingAction": "定义键绑定" + "defineKeybinding.kbLayoutErrorMessage": "在当前键盘布局下无法生成此组合键。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 97293e743e379..e3d24891a1d48 100644 --- a/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,5 +14,6 @@ "noIconThemeDesc": "禁用文件图标", "problemChangingIconTheme": "设置图标主题时出现问题: {0}", "themes.selectIconTheme": "选择文件图标主题", - "preferences": "首选项" + "preferences": "首选项", + "developer": "开发者" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/chs/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 4f358c63711be..75fac41304394 100644 --- a/i18n/chs/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/chs/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "分析 JSON 主题文件 {0} 时出现问题", - "error.invalidformat": "分析 JSON 主题文件时出现问题: {0}。需要“令牌颜色”和“颜色”。", - "error.plist.invalidformat": "分析主题文件时出现问题: {0}。\"settings\" 不是数组。", - "error.cannotparse": "分析主题文件时出现问题: {0}", - "error.cannotload": "加载主题文件 {0} 时出现问题: {1}" + "error.cannotparsejson": "分析 JSON 主题文件 {0} 时出现问题" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 5428ed9e97e73..f8a9d4a4a14d0 100644 --- a/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,6 +25,5 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "覆盖当前所选颜色主题的颜色。 此为实验性设置,因为下一版本中将更改颜色名称。" + "iconThemeError": "File icon theme is unknown or not installed." } \ No newline at end of file diff --git a/i18n/cht/extensions/git/package.i18n.json b/i18n/cht/extensions/git/package.i18n.json index 2eb969e59eab4..25e06410e3dbf 100644 --- a/i18n/cht/extensions/git/package.i18n.json +++ b/i18n/cht/extensions/git/package.i18n.json @@ -38,7 +38,5 @@ "config.autorefresh": "是否啟用自動重新整理", "config.autofetch": "是否啟用自動擷取", "config.enableLongCommitWarning": "是否發出長認可訊息的警告", - "config.confirmSync": "請先確認再同步處理 GIT 存放庫", - "config.countBadge": "控制 GIT 徽章計數器", - "config.checkoutType": "控制要列出哪種類型的分支" + "config.confirmSync": "請先確認再同步處理 GIT 存放庫" } \ No newline at end of file diff --git a/i18n/cht/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/cht/extensions/typescript/out/typescriptServiceClient.i18n.json index 693e6c0ce7128..69c9930b11dc8 100644 --- a/i18n/cht/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/cht/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "重新啟動", - "later": "稍後", "channelName": "TypeScript", "noServerFound": "路徑 {0} 未指向有效的 tsserver 安裝。即將回復為配套的 TypeScript 版本。", "noBundledServerFound": "其他應用程式已刪除了 VSCode 的 tsserver,例如行為不當的病毒偵測工具。請重新安裝 VS Code。", diff --git a/i18n/cht/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/cht/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index 8b6ad71cd4e6d..121381958b165 100644 --- a/i18n/cht/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/cht/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "diffEditorInsertedOutline": "插入的文字外框色彩。", + "diffEditorRemovedOutline": "移除的文字外框色彩。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json index f935716347fda..ec8f05fe3403e 100644 --- a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -26,6 +26,7 @@ "wordWrap.on": "依檢視區寬度換行。", "wordWrap.wordWrapColumn": "於 'editor.wordWrapColumn' 換行。", "wordWrap.bounded": "當檢視區縮至最小並設定 'editor.wordWrapColumn' 時換行。", + "wordWrap": "控制是否自動換行。可以是:\n - 'off' (停用換行),\n - 'on' (檢視區換行),\n - 'wordWrapColumn' (於 'editor.wordWrapColumn' 換行`) 或\n - 'bounded' (當檢視區縮至最小並設定 'editor.wordWrapColumn' 時換行).", "wordWrapColumn": "當 `editor.wordWrap` 為 [wordWrapColumn] 或 [bounded] 時,控制編輯器中的資料行換行。", "wrappingIndent": "控制換行的縮排。可以是 [無]、[相同] 或 [縮排]。", "mouseWheelScrollSensitivity": "滑鼠滾輪捲動事件的 'deltaX' 與 'deltaY' 所使用的乘數", diff --git a/i18n/cht/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/cht/src/vs/editor/common/services/bulkEdit.i18n.json index 8cbdaf09d5d56..cf3f3771d6a2b 100644 --- a/i18n/cht/src/vs/editor/common/services/bulkEdit.i18n.json +++ b/i18n/cht/src/vs/editor/common/services/bulkEdit.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "conflict": "這些檔案已同時變更: {0}" + "conflict": "這些檔案已同時變更: {0}", + "summary.0": "未進行任何編輯", + "summary.nm": "在 {1} 個檔案中進行了 {0} 項文字編輯", + "summary.n0": "在一個檔案中進行了 {0} 項文字編輯" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 001af4741896b..5ee6d0db8a7ea 100644 --- a/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,5 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "aria.result.0": "找不到結果" + "aria.oneReference": "個符號位於 {0} 中的第 {1} 行第 {2} 欄", + "aria.fileReferences.1": "1 個符號位於 {0}", + "aria.fileReferences.N": "{0} 個符號位於 {1}", + "aria.result.0": "找不到結果", + "aria.result.1": "在 {0} 中找到 1 個符號", + "aria.result.n1": "在 {1} 中找到 {0} 個符號", + "aria.result.nm": "在 {1} 個檔案中找到 {0} 個符號" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index 4d3b844ac4876..3386dfa6e2192 100644 --- a/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -12,8 +12,8 @@ "noResults": "沒有結果", "peekView.alternateTitle": "參考", "peekViewTitleBackground": "預覽檢視標題區域的背景色彩。", - "peekViewTitle": "預覽檢視標題的色彩。", - "peekViewTitleInfo": "預覽檢視標題資訊的色彩。", + "peekViewTitleForeground": "預覽檢視標題的色彩。", + "peekViewTitleInfoForeground": "預覽檢視標題資訊的色彩。", "peekViewBorder": "預覽檢視之框線與箭頭的色彩。", "peekViewResultsBackground": "預覽檢視中結果清單的背景色彩。", "peekViewResultsMatchForeground": "在預覽檢視之結果清單中比對輸入時的前景。", diff --git a/i18n/cht/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/cht/src/vs/editor/contrib/rename/browser/rename.i18n.json index 59742a35f3a86..e1b559cf2ece6 100644 --- a/i18n/cht/src/vs/editor/contrib/rename/browser/rename.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "no result": "沒有結果。", + "aria": "已成功將 '{0}' 重新命名為 '{1}'。摘要: {2}", "rename.failed": "抱歉,無法執行重新命名。", "rename.label": "重新命名符號" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json index a43ef74dcf1b0..87e19ea32a121 100644 --- a/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "arai.alert.snippet": "接受 '{0}' 時接受了插入下列文字: {1}", "suggest.trigger.label": "觸發建議" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 322170be64d55..64120957b4fb4 100644 --- a/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -4,6 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "editorSuggestWidgetBackground": "建議小工具的背景色彩。", + "editorSuggestWidgetBorder": "建議小工具的邊界色彩。", + "editorSuggestWidgetForeground": "建議小工具的前景色彩。", + "editorSuggestWidgetSelectedBackground": "建議小工具中所選項目的背景色彩。", + "editorSuggestWidgetHighlightForeground": "建議小工具中相符醒目提示的色彩。", "readMore": "進一步了解...{0}", "suggestionWithDetailsAriaLabel": "{0},建議,有詳細資料", "suggestionAriaLabel": "{0},建議", diff --git a/i18n/cht/src/vs/platform/environment/node/argv.i18n.json b/i18n/cht/src/vs/platform/environment/node/argv.i18n.json index 5b3013c182fcf..e5703d3b95169 100644 --- a/i18n/cht/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/cht/src/vs/platform/environment/node/argv.i18n.json @@ -20,6 +20,7 @@ "showVersions": "使用 --list-extension 時,顯示安裝的擴充功能版本。", "installExtension": "安裝擴充功能。", "uninstallExtension": "解除安裝擴充功能。", + "experimentalApis": "為延伸模組啟用建議的 API 功能。", "disableExtensions": "停用所有已安裝的擴充功能。", "disableGPU": "停用 GPU 硬體加速。", "version": "列印版本。", diff --git a/i18n/cht/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/cht/src/vs/platform/markers/common/problemMatcher.i18n.json index 8f89b539f15cd..d924f278ad08e 100644 --- a/i18n/cht/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/cht/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -24,11 +24,16 @@ "NamedMultiLineProblemPatternSchema.patterns": "實際的模式。", "ProblemPatternExtPoint": "提供問題模式", "ProblemPatternRegistry.error": "問題模式無效。此模式將予忽略。", + "ProblemMatcherParser.noProblemMatcher": "錯誤: 無法將描述轉換成問題比對器:\n{0}\n", + "ProblemMatcherParser.noProblemPattern": "錯誤: 描述未定義有效的問題樣式:\n{0}\n", + "ProblemMatcherParser.noOwner": "錯誤: 描述未定義擁有者:\n{0}\n", + "ProblemMatcherParser.noFileLocation": "錯誤: 描述未定義檔案位置:\n{0}\n", "ProblemMatcherParser.unknownSeverity": "資訊: 嚴重性 {0} 不明。有效值為錯誤、警告和資訊。\n", "ProblemMatcherParser.noDefinedPatter": "錯誤: 沒有識別碼為 {0} 的樣式。", "ProblemMatcherParser.noIdentifier": "錯誤: 樣式屬性參考了空的識別碼。", "ProblemMatcherParser.noValidIdentifier": "錯誤: 樣式屬性 {0} 不是有效的樣式變數名稱。", "ProblemMatcherParser.problemPattern.watchingMatcher": "問題比對器必須同時定義監控的開始模式和結束模式。", + "ProblemMatcherParser.invalidRegexp": "錯誤: 字串 {0} 不是有效的規則運算式。\n", "WatchingPatternSchema.regexp": "規則運算式,用來偵測監看工作開始或結束。", "WatchingPatternSchema.file": "檔案名稱的符合群組索引。可以省略。", "PatternTypeSchema.name": "所提供或預先定義之模式的名稱", diff --git a/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json index 498fa64cbcfff..7ab7c658bae38 100644 --- a/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,19 +4,44 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "色彩格式無效。請使用 #RRGGBB 或 #RRGGBBAA", + "invalid.color": "色彩格式無效。請使用 #RGB、#RGBA、#RRGGBB 或 #RRGGBBAA", "schema.colors": "工作台中使用的色彩。", "foreground": "整體的前景色彩。僅當未被任何元件覆疊時,才會使用此色彩。", - "focusedElementOutline": "焦點項目的整體邊框/框線色彩。僅當未被任何元件覆疊時,才會使用此色彩。", - "highContrastBorder": "當啟用高對比佈景主題時,用以分隔元件的框線色彩。", - "highContrastOutline": "當啟用高對比佈景主題時,作用中元件的框線色彩。", + "focusBorder": "焦點項目的整體邊界色彩。只在沒有任何元件覆寫此色彩時,才會加以使用。", + "contrastBorder": "項目周圍的額外邊界,可將項目從其他項目中區隔出來以提高對比。", + "activeContrastBorder": "使用中項目周圍的額外邊界,可將項目從其他項目中區隔出來以提高對比。", + "widgetShadow": "小工具的陰影色彩,例如編輯器中的尋找/取代。", "inputBoxBackground": "輸入方塊的背景。", "inputBoxForeground": "輸入方塊的前景。", "inputBoxBorder": "輸入方塊的框線。", "inputBoxActiveOptionBorder": "輸入欄位中可使用之項目的框線色彩。", + "inputValidationInfoBackground": "資訊嚴重性的輸入驗證背景色彩。", + "inputValidationInfoBorder": "資訊嚴重性的輸入驗證邊界色彩。", + "inputValidationWarningBackground": "資訊警告的輸入驗證背景色彩。", + "inputValidationWarningBorder": "警告嚴重性的輸入驗證邊界色彩。", + "inputValidationErrorBackground": "錯誤嚴重性的輸入驗證背景色彩。", + "inputValidationErrorBorder": "錯誤嚴重性的輸入驗證邊界色彩。", "dropdownBackground": "下拉式清單的背景。", "dropdownForeground": "下拉式清單的前景。", "dropdownBorder": "下拉式清單的框線。", + "listFocusBackground": "當清單/樹狀為使用中狀態時,焦點項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", + "listActiveSelectionBackground": "當清單/樹狀為使用中狀態時,所選項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", + "listInactiveSelectionBackground": "當清單/樹狀為非使用中狀態時,所選項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", + "listActiveSelectionForeground": "當清單/樹狀為使用中狀態時,所選項目的清單/樹狀前景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", + "listFocusAndSelectionBackground": "當清單/樹狀為使用中狀態時,焦點和所選項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。此色彩優先於個別選取項目及焦點色彩。", + "listFocusAndSelectionForeground": "當清單/樹狀為使用中狀態時,焦點和所選項目的清單/樹狀前景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。此色彩優先於個別選取項目及焦點色彩。", + "listHoverBackground": "使用滑鼠暫留在項目時的清單/樹狀背景。", + "listDropBackground": "使用滑鼠四處移動項目時的清單/樹狀拖放背景。", + "highlight": "在清單/樹狀內搜尋時,相符醒目提示的清單/樹狀前景色彩。", + "pickerGroupForeground": "分組標籤的快速選擇器色彩。", + "pickerGroupBorder": "分組邊界的快速選擇器色彩。", + "buttonForeground": "按鈕前景色彩。", + "buttonBackground": "按鈕背景色彩。", + "buttonHoverBackground": "暫留時的按鈕背景色彩。", + "scrollbarShadow": "指出在捲動該檢視的捲軸陰影。", + "scrollbarSliderBackground": "滑桿背景色彩。", + "scrollbarSliderHoverBackground": "暫留時的滑桿背景色彩。", + "scrollbarSliderActiveBackground": "使用中狀態時的滑桿背景色彩。", "editorBackground": "編輯器的背景色彩。", "editorForeground": "編輯器的預設前景色彩。", "editorSelection": "編輯器選取範圍的色彩。", @@ -26,5 +51,6 @@ "findMatchHighlight": "符合其他搜尋的色彩。", "findRangeHighlight": "限制搜尋之範圍的色彩。", "activeLinkForeground": "使用中之連結的色彩。", - "linkForeground": "連結的色彩。" + "linkForeground": "連結的色彩。", + "editorWidgetBackground": "編輯器小工具的背景色彩,例如尋找/取代。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/cht/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..24e5da7900523 --- /dev/null +++ b/i18n/cht/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "未註冊識別碼為 '{0}' 的 TreeExplorerNodeProvider。", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider '{0}' 無法提供根節點。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/common/theme.i18n.json b/i18n/cht/src/vs/workbench/common/theme.i18n.json index 2299f7297c4ad..04db8d8c3c7c5 100644 --- a/i18n/cht/src/vs/workbench/common/theme.i18n.json +++ b/i18n/cht/src/vs/workbench/common/theme.i18n.json @@ -5,20 +5,17 @@ // Do not edit this file. It is machine generated. { "tabsContainerBackground": "索引標籤容器的背景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "activeTabBackground": "使用中之索引標籤的背景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "inactiveTabBackground": "非使用中之索引標籤的背景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "activeTabActiveGroupForeground": "使用中的群組內,使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "activeTabInactiveGroupForeground": "非使用中的群組內,使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "inactiveTabActiveGroupForeground": "使用中的群組內,非使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "inactiveTabInactiveGroupForeground": "非使用中的群組內,非使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", + "tabActiveBackground": "使用中之索引標籤的背景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", + "tabInactiveBackground": "非使用中之索引標籤的背景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", "tabBorder": "用以分隔索引標籤彼此的框線。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "editorHeaderBackground": "當未啟用任何索引標籤時,編輯器標題的背景色彩。", + "tabActiveEditorGroupActiveForeground": "使用中的群組內,使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", + "tabActiveEditorGroupInactiveForeground": "非使用中的群組內,使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", + "tabInactiveEditorGroupActiveForeground": "使用中的群組內,非使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", + "tabInactiveEditorGroupInactiveForeground": "非使用中的群組內,非使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", "editorGroupBorder": "用以分隔多個編輯器群組彼此的色彩。編輯器群組是編輯器的容器。", - "editorGroupBackground": "編輯器群組的背景色彩。編輯器群組是編輯器的容器。", "editorDragAndDropBackground": "拖曳編輯器時的背景色彩。", - "editorSideBySideBorder": "用以分隔詳細資料與並排編輯器之主要排的框線色彩。", "panelBackground": "面板的前景色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", - "panelTopBorder": "面板頂端用以分隔編輯器的邊框色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", + "panelBorder": "面板頂端用以分隔編輯器的邊框色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "panelActiveTitleForeground": "使用中之面板標題的標題色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "panelInactiveTitleForeground": "非使用中之面板標題的標題色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "panelActiveTitleBorder": "使用中之面板標題的框線色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", @@ -27,12 +24,10 @@ "statusBarNoFolderBackground": "當未開啟任何資料夾時,狀態列的背景色彩。狀態列會顯示在視窗的底部。", "statusBarItemActiveBackground": "按下滑鼠按鈕時,狀態列項目的背景色彩。狀態列會顯示在視窗的底部。", "statusBarItemHoverBackground": "動態顯示時,狀態列項目的背景色彩。狀態列會顯示在視窗的底部。", - "statusBarInfoItemBackground": "狀態列資訊項目的背景色彩。狀態列會顯示在視窗的底部。", - "statusBarInfoItemHoverBackground": "動態顯示時,狀態列資訊項目的背景色彩。狀態列會顯示在視窗的底部。", "activityBarBackground": "活動列背景的色彩。活動列會顯示在最左側或最右側,並可切換不同的提要欄位檢視。", "activityBarDragAndDropBackground": "拖放活動列項目之意見回應時的色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", - "activityBadgeBackground": "活動通知徽章的背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", - "activityBadgeForeground": "活動通知徽章的前背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", + "activityBarBadgeBackground": "活動通知徽章的背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", + "activityBarBadgeForeground": "活動通知徽章的前背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", "sideBarBackground": "提要欄位的背景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", "sideBarTitleForeground": "提要欄位標題的前景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", "titleBarActiveForeground": "作用中視窗之標題列的前景。請注意,目前只有 macOS 支援此色彩。", diff --git a/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..8b6ad71cd4e6d 100644 --- a/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/common/debugModel.i18n.json index 3a0b48960cd5a..0ebbbd8344989 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "未知的來源", "notAvailable": "無法使用", - "startDebugFirst": "請啟動偵錯工作階段進行評估", - "unknownStack": "不明堆疊位置" + "startDebugFirst": "請啟動偵錯工作階段進行評估" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..6ce65f7439bb8 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "未知的來源" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index dc585358a435f..83e61cd9ea9a8 100644 --- a/i18n/cht/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "提供自訂 Tree Explorer viewlet 到資訊看板", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "用以識別透過 vscode.workspace.registerTreeExplorerNodeProvider 所註冊之提供者的唯一識別碼", - "vscode.extension.contributes.explorer.treeLabel": "用以轉譯自訂 Tree Explorer 的易讀字串", - "vscode.extension.contributes.explorer.icon": "活動列上 viewlet 圖示的路徑", "showViewlet": "顯示 {0}", "view": "檢視" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index 25ecab5370988..ea8fa58020959 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -8,6 +8,7 @@ "extensions": "擴充功能", "sort by installs": "排序依據: 安裝計數", "sort by rating": "排序依據: 評等", + "sort by name": "排序依據: 名稱", "no extensions found": "找不到延伸模組。", "suggestProxyError": "Marketplace 傳回 'ECONNREFUSED'。請檢查 'http.proxy' 設定。", "outdatedExtensions": "{0} 過期的擴充功能" diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index d34b15d8697ff..0d448edf6a5ee 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -6,6 +6,5 @@ { "defineKeybinding.start": "定義按鍵繫結關係", "defineKeybinding.kbLayoutInfoMessage": "針對您目前的鍵盤配置,請按 ", - "defineKeybinding.kbLayoutErrorMessage": "您無法在目前的鍵盤配置下產生此按鍵組合。", - "DefineKeybindingAction": "定義按鍵繫結關係" + "defineKeybinding.kbLayoutErrorMessage": "您無法在目前的鍵盤配置下產生此按鍵組合。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 23deff159dbde..7cd1aafa6f1f3 100644 --- a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,5 +14,6 @@ "noIconThemeDesc": "停用檔案圖示", "problemChangingIconTheme": "設定圖示佈景主題時發生問題: {0}", "themes.selectIconTheme": "選取檔案圖示佈景主題", - "preferences": "喜好設定" + "preferences": "喜好設定", + "developer": "開發人員" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/cht/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 2e5056bf9ee8f..9fba242d4b973 100644 --- a/i18n/cht/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/cht/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "剖析 JSON 佈景主題檔案時發生問題: {0}", - "error.invalidformat": "剖析 JSON 佈景主題檔案時發生問題: {0}。應為 'tokenColors' 及 'colors'。", - "error.plist.invalidformat": "剖析佈景主題檔案 {0} 時出現問題。'settings' 不是陣列。", - "error.cannotparse": "剖析佈景主題檔案 {0} 時發生問題", - "error.cannotload": "載入佈景主題檔案 {0} 時發生問題: {1}" + "error.cannotparsejson": "剖析 JSON 佈景主題檔案時發生問題: {0}" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 50dce9f491f36..1940ac12b6aa3 100644 --- a/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,6 +25,5 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "覆寫目前選取之色彩佈景主題的色彩。此設定為實驗性質,色彩名稱將於下一版時變更。" + "iconThemeError": "File icon theme is unknown or not installed." } \ No newline at end of file diff --git a/i18n/deu/extensions/git/out/main.i18n.json b/i18n/deu/extensions/git/out/main.i18n.json index 07df5014a5b40..6cf07d1824f42 100644 --- a/i18n/deu/extensions/git/out/main.i18n.json +++ b/i18n/deu/extensions/git/out/main.i18n.json @@ -6,5 +6,6 @@ { "using git": "Verwenden von Git {0} von {1}", "updateGit": "Git aktualisieren", - "neverShowAgain": "Nicht mehr anzeigen" + "neverShowAgain": "Nicht mehr anzeigen", + "git20": "Sie haben anscheinend Git {0} installiert. Der Code funktioniert am besten mit Git 2 oder älter" } \ No newline at end of file diff --git a/i18n/deu/extensions/git/out/model.i18n.json b/i18n/deu/extensions/git/out/model.i18n.json index c9102d14eb434..681e5ffa79523 100644 --- a/i18n/deu/extensions/git/out/model.i18n.json +++ b/i18n/deu/extensions/git/out/model.i18n.json @@ -8,5 +8,7 @@ "merge changes": "Änderungen zusammenführen", "staged changes": "Bereitgestellte Änderungen", "changes": "Änderungen", - "ok": "OK" + "ok": "OK", + "neveragain": "Nie wieder anzeigen", + "huge": "Das Git-Repository unter {0} umfasst zu viele aktive Änderungen. Nur ein Teil der Git-Features wird aktiviert." } \ No newline at end of file diff --git a/i18n/deu/extensions/git/package.i18n.json b/i18n/deu/extensions/git/package.i18n.json index e85515266777e..3ea04a9fbbc51 100644 --- a/i18n/deu/extensions/git/package.i18n.json +++ b/i18n/deu/extensions/git/package.i18n.json @@ -39,6 +39,6 @@ "config.autofetch": "Gibt an, ob automatischer Abruf aktiviert ist.", "config.enableLongCommitWarning": "Gibt an, ob Warnungen zu langen Commitnachrichten erfolgen sollen.", "config.confirmSync": "Vor dem Synchronisieren von Git-Repositorys bestätigen.", - "config.countBadge": "Steuert die Git-Badgeanzahl.", - "config.checkoutType": "Steuert, welcher Branchtyp aufgelistet wird." + "config.ignoreLegacyWarning": "Ignoriert die Legacy-Git-Warnung.", + "config.ignoreLimitWarning": "Ignoriert Warnung bei zu hoher Anzahl von Änderungen in einem Repository" } \ No newline at end of file diff --git a/i18n/deu/extensions/grunt/out/main.i18n.json b/i18n/deu/extensions/grunt/out/main.i18n.json index 8b6ad71cd4e6d..b1c5165293c78 100644 --- a/i18n/deu/extensions/grunt/out/main.i18n.json +++ b/i18n/deu/extensions/grunt/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Fehler bei der automatischen Grunt-Erkennung. Fehlermeldung: {0}" +} \ No newline at end of file diff --git a/i18n/deu/extensions/grunt/package.i18n.json b/i18n/deu/extensions/grunt/package.i18n.json index 8b6ad71cd4e6d..41b1a3a2d810e 100644 --- a/i18n/deu/extensions/grunt/package.i18n.json +++ b/i18n/deu/extensions/grunt/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.grunt.autoDetect": "Steuert, ob die automatische Erkennung von Grunt-Tasks aktiviert oder deaktiviert ist. Standardmäßig ist die Funktion aktiviert." +} \ No newline at end of file diff --git a/i18n/deu/extensions/gulp/out/main.i18n.json b/i18n/deu/extensions/gulp/out/main.i18n.json index 8b6ad71cd4e6d..a4ddf3b18b832 100644 --- a/i18n/deu/extensions/gulp/out/main.i18n.json +++ b/i18n/deu/extensions/gulp/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Fehler bei der automatischen Gulp-Erkennung. Fehlermeldung: {0}" +} \ No newline at end of file diff --git a/i18n/deu/extensions/markdown/package.i18n.json b/i18n/deu/extensions/markdown/package.i18n.json index d8b94f2c035e4..5a1edbf1d8d54 100644 --- a/i18n/deu/extensions/markdown/package.i18n.json +++ b/i18n/deu/extensions/markdown/package.i18n.json @@ -17,5 +17,6 @@ "markdown.showSource.title": "Quelle anzeigen", "markdown.styles.dec": "Eine Liste von URLs oder lokalen Pfaden zu CSS-Stylesheets aus der Markdownvorschau, die verwendet werden sollen. Relative Pfade werden relativ zu dem Ordner interpretiert, der im Explorer geöffnet ist. Wenn kein Ordner geöffnet ist, werden sie relativ zum Speicherort der Markdowndatei interpretiert. Alle '\\' müssen als '\\\\' geschrieben werden.", "markdown.showPreviewSecuritySelector.title": "Sicherheitseinstellungen für Markdown-Vorschau ändern", - "markdown.preview.enableExperimentalExtensionApi.desc": "[Experimentell] Erlaube Erweiterungen die Markdown-Vorschau zu erweitern." + "markdown.preview.enableExperimentalExtensionApi.desc": "[Experimentell] Erlaube Erweiterungen die Markdown-Vorschau zu erweitern.", + "markdown.trace.desc": "Aktiviert die Debugprotokollierung für die Markdown-Erweiterung." } \ No newline at end of file diff --git a/i18n/deu/extensions/php/package.i18n.json b/i18n/deu/extensions/php/package.i18n.json index 0f34620884841..e6a425d7d9af2 100644 --- a/i18n/deu/extensions/php/package.i18n.json +++ b/i18n/deu/extensions/php/package.i18n.json @@ -9,5 +9,6 @@ "configuration.validate.executablePath": "Zeigt auf die ausführbare PHP-Datei.", "configuration.validate.run": "Gibt an, ob der Linter beim Speichern oder bei der Eingabe ausgeführt wird.", "configuration.title": "PHP", - "commands.categroy.php": "PHP" + "commands.categroy.php": "PHP", + "command.untrustValidationExecutable": "Ausführbare Datei für PHP-Überprüfung nicht zulassen (als Arbeitsbereicheinstellung definiert)" } \ No newline at end of file diff --git a/i18n/deu/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/deu/extensions/typescript/out/typescriptServiceClient.i18n.json index 6d17c22d103d4..d2333f5052c09 100644 --- a/i18n/deu/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/deu/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "Neu starten", - "later": "Später", "channelName": "TypeScript", "noServerFound": "Der Pfad \"{0}\" zeigt nicht auf eine gültige tsserver-Installation. Fallback auf gebündelte TypeScript-Version wird durchgeführt.", "noBundledServerFound": "Der tsserver von VSCode wurde von einer anderen Anwendung wie etwa einem fehlerhaften Tool zur Viruserkennung gelöscht. Führen Sie eine Neuinstallation von VS Code durch.", @@ -17,6 +15,8 @@ "learnMore": "Weitere Informationen", "selectTsVersion": "Wählen Sie die für die JavaScript- und TypeScript-Sprachfunktionen verwendete TypeScript-Version aus.", "typescript.openTsServerLog.notSupported": "Die TS Server-Protokollierung erfordert TS 2.2.2+.", + "typescript.openTsServerLog.loggingNotEnabled": "Die TS Server-Protokollierung ist deaktiviert. Legen Sie \"typescript.tsserver.log\" fest, und laden Sie VS Code erneut, um die Protokollierung zu aktivieren.", + "typescript.openTsServerLog.enableAndReloadOption": "Aktiviert die Protokollierung und startet den TS-Server neu.", "typescript.openTsServerLog.noLogFile": "TS Server hat noch nicht mit der Protokollierung begonnen.", "openTsServerLog.openFileFailedFailed": "Die TS-Server-Protokolldatei konnte nicht geöffnet werden.", "serverDiedAfterStart": "Der TypeScript-Sprachdienst wurde direkt nach seinem Start fünfmal beendet. Der Dienst wird nicht neu gestartet.", diff --git a/i18n/deu/extensions/typescript/package.i18n.json b/i18n/deu/extensions/typescript/package.i18n.json index c5276e8289314..61d500f2b8473 100644 --- a/i18n/deu/extensions/typescript/package.i18n.json +++ b/i18n/deu/extensions/typescript/package.i18n.json @@ -11,6 +11,8 @@ "typescript.tsdk.desc": "Gibt den Ordnerpfad mit den zu verwendenden tsserver- und lib*.d.ts-Dateien an.", "typescript.disableAutomaticTypeAcquisition": "Deaktiviert die automatische Typerfassung. Erfordert TypeScript >= 2.0.6 und einen Neustart nach der Änderung.", "typescript.check.tscVersion": "Überprüfen, ob sich ein global installierter TypeScript-Compiler (z. B. tsc) vom verwendeten TypeScript-Sprachdienst unterscheidet.", + "typescript.tsserver.log": "Aktiviert die Protokollierung des TS-Servers in eine Datei. Mithilfe der Protokolldatei lassen sich Probleme beim TS-Server diagnostizieren. Die Protokolldatei kann Dateipfade, Quellcode und weitere potenziell sensible Informationen aus Ihrem Projekt enthalten.", + "typescript.tsserver.trace": "Aktiviert die Ablaufverfolgung von an den TS-Server gesendeten Nachrichten. Mithilfe der Ablaufverfolgung lassen sich Probleme beim TS-Server diagnostizieren. Die Ablaufverfolgung kann Dateipfade, Quellcode und weitere potenziell sensible Informationen aus Ihrem Projekt enthalten.", "typescript.tsserver.experimentalAutoBuild": "Ermöglicht experimentelle automatische Buildvorgänge. Erfordert Version 1.9 dev oder 2.x tsserver sowie einen Neustart von VS Code nach der Änderung.", "typescript.validate.enable": "TypeScript-Überprüfung aktivieren/deaktivieren.", "typescript.format.enable": "Standardmäßigen TypeScript-Formatierer aktivieren/deaktivieren.", @@ -23,6 +25,7 @@ "format.insertSpaceBeforeFunctionParenthesis": "Definiert die Verarbeitung von Leerzeichen vor Funktionsargumentklammern. Erfordert TypeScript >= 2.1.5.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Definiert die Verarbeitung von Leerzeichen nach öffnenden und vor schließenden nicht leeren runden Klammern.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Definiert die Verarbeitung von Leerzeichen nach öffnenden und vor schließenden nicht leeren eckigen Klammern.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Definiert die Verarbeitung von Leerzeichen nach öffnenden und vor schließenden geschweiften Klammern. Erfordert TypeScript 2.3.0 oder höher.", "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Definiert die Verarbeitung von Leerzeichen nach öffnenden und vor schließenden geschweiften Klammern für Vorlagenzeichenfolgen. Erfordert TypeScript >= 2.0.6.", "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "Definiert die Verarbeitung von Leerzeichen nach öffnenden und vor schließenden geschweiften Klammern für JSX-Ausdrücke. Erfordert TypeScript >= 2.0.6.", "format.placeOpenBraceOnNewLineForFunctions": "Definiert, ob eine öffnende geschweifte Klammer für Funktionen in eine neue Zeile eingefügt wird.", @@ -30,6 +33,11 @@ "javascript.validate.enable": "JavaScript-Überprüfung aktivieren/deaktivieren.", "typescript.goToProjectConfig.title": "Zur Projektkonfiguration wechseln", "javascript.goToProjectConfig.title": "Zur Projektkonfiguration wechseln", + "typescript.referencesCodeLens.enabled": "Aktiviert oder deaktiviert CodeLens-Verweise. Erfordert TypeScript 2.0.6 oder höher.", + "typescript.implementationsCodeLens.enabled": "Aktiviert oder deaktiviert CodeLens-Implementierungen. Erfordert TypeScript 2.2.0 oder höher.", "typescript.openTsServerLog.title": "TS Server-Protokolldatei öffnen", - "typescript.selectTypeScriptVersion.title": "TypeScript-Version wählen" + "typescript.selectTypeScriptVersion.title": "TypeScript-Version wählen", + "jsDocCompletion.enabled": "Automatische JSDoc-Kommentare aktivieren/deaktivieren", + "javascript.implicitProjectConfig.checkJs": "Aktiviert/deaktiviert die Semantikprüfung bei JavaScript-Dateien. Diese Einstellung wird von vorhandenen \"jsconfig.json\"- oder \"tsconfig.json\"-Dateien außer Kraft gesetzt. Erfordert TypeScript 2.3.1 oder höher.", + "typescript.check.npmIsInstalled": "Überprüfen, ob NPM für automatische Typerfassung installiert ist" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/deu/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index 8b6ad71cd4e6d..51ebb551931c2 100644 --- a/i18n/deu/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/deu/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "diffEditorInserted": "Hintergrundfarbe für eingefügten Text.", + "diffEditorRemoved": "Hintergrundfarbe für entfernten Text.", + "diffEditorInsertedOutline": "Konturfarbe für eingefügten Text.", + "diffEditorRemovedOutline": "Konturfarbe für entfernten Text." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/deu/src/vs/editor/common/services/bulkEdit.i18n.json index 864b6f935a8d1..d7541e30bc744 100644 --- a/i18n/deu/src/vs/editor/common/services/bulkEdit.i18n.json +++ b/i18n/deu/src/vs/editor/common/services/bulkEdit.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "conflict": "Die folgenden Dateien wurden in der Zwischenzeit geändert: {0}" + "conflict": "Die folgenden Dateien wurden in der Zwischenzeit geändert: {0}", + "summary.0": "Keine Änderungen vorgenommen", + "summary.nm": "{0} Änderungen am Text in {1} Dateien vorgenommen", + "summary.n0": "{0} Änderungen am Text in einer Datei vorgenommen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 7204351782b4c..103994c579956 100644 --- a/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "aria.result.0": "Es wurden keine Ergebnisse gefunden." + "aria.result.0": "Es wurden keine Ergebnisse gefunden.", + "aria.result.1": "1 Symbol in {0} gefunden", + "aria.result.n1": "{0} Symbole in {1} gefunden", + "aria.result.nm": "{0} Symbole in {1} Dateien gefunden" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index 445846a21a318..5423f336ae329 100644 --- a/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -12,8 +12,8 @@ "noResults": "Keine Ergebnisse", "peekView.alternateTitle": "Verweise", "peekViewTitleBackground": "Hintergrundfarbe des Titelbereichs der Peek-Ansicht.", - "peekViewTitle": "Farbe des Titels in der Peek-Ansicht.", - "peekViewTitleInfo": "Farbe der Titelinformationen in der Peek-Ansicht.", + "peekViewTitleForeground": "Farbe des Titels in der Peek-Ansicht.", + "peekViewTitleInfoForeground": "Farbe der Titelinformationen in der Peek-Ansicht.", "peekViewBorder": "Farbe der Peek-Ansichtsränder und des Pfeils.", "peekViewResultsBackground": "Hintergrundfarbe der Ergebnisliste in der Peek-Ansicht.", "peekViewResultsMatchForeground": "Vordergrund für Übereinstimmungseinträge in der Ergebnisliste der Peek-Ansicht.", diff --git a/i18n/deu/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/deu/src/vs/editor/contrib/rename/browser/rename.i18n.json index 2f9ffc111f05f..0a095a2aa5eda 100644 --- a/i18n/deu/src/vs/editor/contrib/rename/browser/rename.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "no result": "Kein Ergebnis.", + "aria": "\"{0}\" erfolgreich in \"{1}\" umbenannt. Zusammenfassung: {2}", "rename.failed": "Fehler bei der Ausführung der Umbenennung.", "rename.label": "Symbol umbenennen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json index 3ba9d84591c9a..634627ef2a586 100644 --- a/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "arai.alert.snippet": "Durch Annahme von \"{0}\" wurde folgender Text eingefügt: {1}", "suggest.trigger.label": "Vorschlag auslösen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 80f4b97aa14c9..99e30e1b037a4 100644 --- a/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "editorSuggestWidgetBackground": "Hintergrundfarbe des Vorschlagswidgets.", + "editorSuggestWidgetBorder": "Rahmenfarbe des Vorschlagswidgets.", "readMore": "Mehr anzeigen...{0}", "suggestionWithDetailsAriaLabel": "{0}, Vorschlag, hat Details", "suggestionAriaLabel": "{0}, Vorschlag", diff --git a/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json index 37515c6a0476d..43f87d649f5da 100644 --- a/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,12 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "Ungültiges Farbformat. Verwenden Sie #RRGGBB oder #RRGGBBAA.", "schema.colors": "In der Workbench verwendete Farben.", "foreground": "Allgemeine Vordergrundfarbe. Diese Farbe wird nur verwendet, wenn sie nicht durch eine Komponente überschrieben wird.", - "focusedElementOutline": "Allgemeine Kontur-/Rahmenfarbe für fokussierte Elemente. Diese Farbe wird nur verwendet, wenn sie nicht durch eine Komponente überschrieben wird.", - "highContrastBorder": "Rahmenfarbe zum Trennen von Komponenten, wenn ein Design mit hohem Kontrast aktiviert wurde.", - "highContrastOutline": "Konturfarbe für aktive Komponenten, wenn ein Design mit hohem Kontrast aktiviert wurde.", "inputBoxBackground": "Hintergrund für Eingabefeld.", "inputBoxForeground": "Vordergrund für Eingabefeld.", "inputBoxBorder": "Rahmen für Eingabefeld.", @@ -17,6 +13,8 @@ "dropdownBackground": "Hintergrund für Dropdown.", "dropdownForeground": "Vordergrund für Dropdown.", "dropdownBorder": "Rahmen für Dropdown.", + "pickerGroupForeground": "Schnellauswahlfarbe für das Gruppieren von Bezeichnungen.", + "pickerGroupBorder": "Schnellauswahlfarbe für das Gruppieren von Rahmen.", "editorBackground": "Hintergrundfarbe des Editors.", "editorForeground": "Standardvordergrundfarbe des Editors.", "editorSelection": "Farbe der Editor-Auswahl.", @@ -27,6 +25,5 @@ "findRangeHighlight": "Farbe des Bereichs zur Einschränkung der Suche.", "activeLinkForeground": "Farbe der aktiven Links.", "linkForeground": "Farbe der Links.", - "editorWidgetBackground": "Hintergrundfarbe von Editor-Widgets wie zum Beispiel Suchen/Ersetzen.", - "editorWidgetShadow": "Farbe des Schattens von Editor-Widgets wie zum Beispiel Suchen/Ersetzen." + "editorWidgetBackground": "Hintergrundfarbe von Editor-Widgets wie zum Beispiel Suchen/Ersetzen." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/deu/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..c6eed83d99907 --- /dev/null +++ b/i18n/deu/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "Es ist kein TreeExplorerNodeProvider mit ID \"{0}\" registriert.", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider \"{0}\" hat keinen Stammknoten bereitgestellt." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/common/theme.i18n.json b/i18n/deu/src/vs/workbench/common/theme.i18n.json index c25cfc548044b..0fcf7d8cb71fd 100644 --- a/i18n/deu/src/vs/workbench/common/theme.i18n.json +++ b/i18n/deu/src/vs/workbench/common/theme.i18n.json @@ -5,20 +5,17 @@ // Do not edit this file. It is machine generated. { "tabsContainerBackground": "Hintergrundfarbe der aktiven Registerkarte. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", - "activeTabBackground": "Hintergrundfarbe der aktiven Registerkarte. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", - "inactiveTabBackground": "Hintergrundfarbe der inaktiven Registerkarte. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", - "activeTabActiveGroupForeground": "Vordergrundfarbe der aktiven Registerkarte in einer aktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", - "activeTabInactiveGroupForeground": "Vordergrundfarbe der aktiven Registerkarte in einer inaktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", - "inactiveTabActiveGroupForeground": "Vordergrundfarbe der inaktiven Registerkarte in einer aktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", - "inactiveTabInactiveGroupForeground": "Vordergrundfarbe der inaktiven Registerkarte in einer inaktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", + "tabActiveBackground": "Hintergrundfarbe der aktiven Registerkarte. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", + "tabInactiveBackground": "Hintergrundfarbe der inaktiven Registerkarte. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", "tabBorder": "Rahmen zum Trennen von Registerkarten. Registerkarten sind die Container für Editoren im Editor-Bereich. In einer Editor-Gruppe können mehrere Registerkarten geöffnet werden. Mehrere Editor-Gruppen sind möglich.", - "editorHeaderBackground": "Hintergrundfarbe der Titelüberschrift des Editors, wenn keine Registerkarten aktiviert sind.", + "tabActiveEditorGroupActiveForeground": "Vordergrundfarbe der aktiven Registerkarte in einer aktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", + "tabActiveEditorGroupInactiveForeground": "Vordergrundfarbe der aktiven Registerkarte in einer inaktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", + "tabInactiveEditorGroupActiveForeground": "Vordergrundfarbe der inaktiven Registerkarte in einer aktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", + "tabInactiveEditorGroupInactiveForeground": "Vordergrundfarbe der inaktiven Registerkarte in einer inaktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", "editorGroupBorder": "Farbe zum Trennen mehrerer Editor-Gruppen. Editor-Gruppen sind die Container der Editoren.", - "editorGroupBackground": "Hintergrundfarbe einer Editor-Gruppe. Editor-Gruppen sind die Container der Editoren.", "editorDragAndDropBackground": "Hintergrundfarbe beim Ziehen von Editoren.", - "editorSideBySideBorder": "Rahmenfarbe zum Trennen der Details der Masterseite für Editoren mit der Ansicht \"Nebeneinander\".", "panelBackground": "Hintergrundfarbe des Panels. Panels werden unter dem Editorbereich angezeigt und enthalten Ansichten wie die Ausgabe und das integrierte Terminal.", - "panelTopBorder": "Farbe des oberen Panelrahmens, der das Panel vom Editor abtrennt. Panels werden unter dem Editorbereich angezeigt und enthalten Ansichten wie die Ausgabe und das integrierten Terminal.", + "panelBorder": "Farbe des oberen Panelrahmens, der das Panel vom Editor abtrennt. Panels werden unter dem Editorbereich angezeigt und enthalten Ansichten wie die Ausgabe und das integrierten Terminal.", "panelActiveTitleForeground": "Titelfarbe für den aktiven Bereich. Bereiche werden unter dem Editorbereich angezeigt und enthalten Ansichten wie Ausgabe und integriertes Terminal.", "panelInactiveTitleForeground": "Titelfarbe für den inaktiven Bereich. Bereiche werden unter dem Editorbereich angezeigt und enthalten Ansichten wie Ausgabe und integriertes Terminal.", "panelActiveTitleBorder": "Rahmenfarbe für den Titel des aktiven Bereichs. Bereiche werden unter dem Editorbereich angezeigt und enthalten Ansichten wie Ausgabe und integriertes Terminal.", @@ -27,12 +24,11 @@ "statusBarNoFolderBackground": "Hintergrundfarbe der Statusleiste, wenn kein Ordner geöffnet ist. Die Statusleiste wird unten im Fenster angezeigt.", "statusBarItemActiveBackground": "Hintergrundfarbe für Statusleistenelemente beim Klicken. Die Statusleiste wird am unteren Rand des Fensters angezeigt.", "statusBarItemHoverBackground": "Hintergrundfarbe der Statusleistenelemente beim Daraufzeigen. Die Statusleiste wird am unteren Seitenrand angezeigt.", - "statusBarInfoItemBackground": "Hintergrundfarbe der Informationselemente der Statusleiste. Die Statusleiste wird am unteren Seitenrand angezeigt.", - "statusBarInfoItemHoverBackground": "Hintergrundfarbe der Informationselemente der Statusleiste beim Daraufzeigen. Die Statusleiste wird am unteren Seitenrand angezeigt.", "activityBarBackground": "Hintergrundfarbe der Aktivitätsleiste. Die Aktivitätsleiste wird ganz links oder rechts angezeigt und ermöglicht das Wechseln zwischen verschiedenen Ansichten der Seitenleiste.", + "activityBarForeground": "Vordergrundfarbe der Aktivitätsleiste (z. B. für Symbole). Die Aktivitätsleiste wird ganz links oder rechts angezeigt und ermöglicht das Wechseln zwischen verschiedenen Ansichten der Seitenleiste.", "activityBarDragAndDropBackground": "Drag Drop-Feedbackfarbe für Elemente der Aktivitätsleiste. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", - "activityBadgeBackground": "Hintergrundfarbe für Aktivitätsinfobadge. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", - "activityBadgeForeground": "Vordergrundfarbe für Aktivitätsinfobadge. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", + "activityBarBadgeBackground": "Hintergrundfarbe für Aktivitätsinfobadge. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", + "activityBarBadgeForeground": "Vordergrundfarbe für Aktivitätsinfobadge. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", "sideBarBackground": "Hintergrundfarbe der Seitenleiste. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", "sideBarTitleForeground": "Vordergrundfarbe der Seitenleiste. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", "titleBarActiveForeground": "Vordergrund der Titelleiste, wenn das Fenster aktiv ist. Diese Farbe wird derzeit nur von MacOS unterstützt.", diff --git a/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json index 7510208eaa27c..9f73db52ca6bb 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -20,6 +20,7 @@ "statusBarVisibility": "Steuert die Sichtbarkeit der Statusleiste im unteren Bereich der Workbench.", "activityBarVisibility": "Steuert die Sichtbarkeit der Aktivitätsleiste in der Workbench.", "closeOnFileDelete": "Steuert, ob Editoren, die eine Datei anzeigen, automatisch geschlossen werden sollen, wenn die Datei von einem anderen Prozess umbenannt oder gelöscht wird. Wenn Sie diese Option deaktivieren, bleibt der Editor bei einem solchen Ereignis als geändert offen. Bei Löschvorgängen innerhalb der Anwendung wird der Editor immer geschlossen, und geänderte Dateien werden nie geschlossen, damit Ihre Daten nicht verloren gehen.", + "swipeToNavigate": "Hiermit navigieren Sie per waagrechtem Wischen mit drei Fingen zwischen geöffneten Dateien.", "workbenchConfigurationTitle": "Workbench", "window.openFilesInNewWindow.on": "Dateien werden in einem neuen Fenster geöffnet.", "window.openFilesInNewWindow.off": "Dateien werden im Fenster mit dem geöffneten Dateiordner oder im letzten aktiven Fenster geöffnet.", @@ -48,10 +49,12 @@ "menuBarVisibility": "Steuert die Sichtbarkeit der Menüleiste. Die Einstellung \"Umschalten\" bedeutet, dass die Menüleiste durch einfaches Betätigen der ALT-Taste angezeigt und ausgeblendet wird. Die Menüleite wird standardmäßig angezeigt, sofern sich das Fenster nicht im Vollbildmodus befindet.", "autoDetectHighContrast": "Ist diese Option aktiviert, erfolgt automatisch ein Wechsel zu einem Design mit hohem Kontrast, wenn Windows ein Design mit hohem Kontrast verwendet, und zu einem dunklen Design, wenn Sie für Windows kein Design mit hohem Kontrast mehr verwenden.", "titleBarStyle": "Passt das Aussehen der Titelleiste des Fensters an. Zum Anwenden der Änderungen ist ein vollständiger Neustart erforderlich.", + "window.nativeTabs": "Aktiviert MacOS Sierra-Fensterregisterkarten. Beachten Sie, dass zum Übernehmen von Änderungen ein vollständiger Neustart erforderlich ist und durch ggf. konfigurierte native Registerkarten ein benutzerdefinierter Titelleistenstil deaktiviert wird.", "windowConfigurationTitle": "Fenster", "zenModeConfigurationTitle": "Zen-Modus", "zenMode.fullScreen": "Steuert, ob die Workbench durch das Aktivieren des Zen-Modus in den Vollbildmodus wechselt.", "zenMode.hideTabs": "Steuert, ob die Workbench-Registerkarten durch Aktivieren des Zen-Modus ebenfalls ausgeblendet werden.", "zenMode.hideStatusBar": "Steuert, ob die Statusleiste im unteren Bereich der Workbench durch Aktivieren des Zen-Modus ebenfalls ausgeblendet wird.", + "zenMode.hideActivityBar": "Steuert, ob die Aktivitätsleiste im linken Bereich der Workbench durch Aktivieren des Zen-Modus ebenfalls ausgeblendet wird.", "zenMode.restore": "Steuert, ob ein Fenster im Zen-Modus wiederhergestellt werden soll, wenn es im Zen-Modus beendet wurde." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..8b6ad71cd4e6d 100644 --- a/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/common/debugModel.i18n.json index e564397040762..6814de9d5ecd5 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "Unbekannte Quelle", "notAvailable": "Nicht verfügbar", - "startDebugFirst": "Bitte starten Sie eine Debugsitzung, um die Auswertung vorzunehmen.", - "unknownStack": "Unbekannte Stapelposition" + "startDebugFirst": "Bitte starten Sie eine Debugsitzung, um die Auswertung vorzunehmen." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..8e5e5b68c3db2 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "Unbekannte Quelle" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index e1408dc36749f..fe8164578a1a5 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -15,5 +15,6 @@ "allowBreakpointsEverywhere": "Ermöglicht das Festlegen von Haltepunkten für alle Dateien.", "openExplorerOnEnd": "Hiermit wird am Ende einer Debugsitzung automatisch eine Explorer-Ansicht geöffnet.", "inlineValues": "Variablenwerte beim Debuggen in Editor eingebunden anzeigen", - "hideActionBar": "Steuert, ob die unverankerte Debugaktionsleiste ausgeblendet werden soll" + "hideActionBar": "Steuert, ob die unverankerte Debugaktionsleiste ausgeblendet werden soll", + "launch": "Startkonfiguration für globales Debuggen. Sollte als Alternative zu \"launch.json\" verwendet werden, das übergreifend von mehreren Arbeitsbereichen genutzt wird" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index f6397044a9553..83d8c9273d19a 100644 --- a/i18n/deu/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "Stellt ein benutzerdefiniertes Viewlet für den Tree Explorer in der Seitenleiste zur Verfügung.", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "Eindeutige ID zum Identifizieren des über vscode.workspace.registerTreeExplorerNodeProvider registrierten Anbieters", - "vscode.extension.contributes.explorer.treeLabel": "Visuell lesbare Zeichenfolge zur Darstellung des benutzerdefinierten Tree Explorers", - "vscode.extension.contributes.explorer.icon": "Pfad zum Symbol des Viewlets auf der Aktivitätsleiste", "showViewlet": "{0} anzeigen", "view": "Anzeigen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 9ae60f8de9b3e..e734318d0be7c 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "reallyRecommended2": "Für diesen Dateityp wird die Erweiterung \"{0}\" empfohlen.", "showRecommendations": "Empfehlungen anzeigen", "neverShowAgain": "Nicht mehr anzeigen", "close": "Schließen", diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index 90b8ce77edcdc..ae64fcc4f4772 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -8,6 +8,7 @@ "extensions": "Extensions", "sort by installs": "Sortieren nach: Installationsanzahl", "sort by rating": "Sortieren nach: Bewertung", + "sort by name": "Sortieren nach: Name", "no extensions found": "Es wurden keine Erweiterungen gefunden.", "suggestProxyError": "Marketplace hat \"ECONNREFUSED\" zurückgegeben. Überprüfen Sie die Einstellung \"http.proxy\".", "outdatedExtensions": "{0} veraltete Extensions" diff --git a/i18n/deu/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/deu/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json index 7bf4de77404d3..6c52ba6976658 100644 --- a/i18n/deu/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json @@ -11,5 +11,6 @@ "genericSaveError": "Fehler beim Speichern von \"{0}\": {1}.", "staleSaveError": "Fehler beim Speichern von \"{0}\": Der Inhalt auf dem Datenträger ist neuer. Klicken Sie auf **Vergleichen**, um Ihre Version mit der Version auf dem Datenträger zu vergleichen.", "compareChanges": "Vergleichen", + "saveConflictDiffLabel": "{0} (auf Datenträger) ↔ {1} (in {2}): Speicherkonflikt lösen", "userGuide": "Verwenden Sie die Aktionen in der Editor-Symbolleiste, um Ihre Änderungen **rückgängig zu machen** oder den Inhalt auf dem Datenträger mit Ihren Änderungen zu **überschreiben**." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index e81b3231b59a4..b5dc5a9cd693e 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -7,6 +7,7 @@ "keybindingsInputName": "Tastenkombinationen", "SearchKeybindings.AriaLabel": "Tastenzuordnungen suchen", "SearchKeybindings.Placeholder": "Tastenzuordnungen suchen", + "sortByPrecedene": "Nach Priorität sortieren", "header-message": "Öffnen und bearbeiten Sie die folgende Datei, um erweiterte Anpassungen vorzunehmen:", "keybindings-file-name": "keybindings.json", "keybindingsLabel": "Tastenzuordnungen", @@ -14,6 +15,7 @@ "addLabel": "Tastenzuordnung hinzufügen", "removeLabel": "Tastenzuordnung entfernen", "resetLabel": "Tastenbindung zurücksetzen", + "showConflictsLabel": "Konflikte anzeigen", "copyLabel": "Kopieren", "error": "Fehler '{0}' beim Bearbeiten der Tastenzuordnung. Überprüfen Sie die Datei 'keybindings.json'.", "command": "Befehlstaste", diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 4680427977426..9a66f7f69c7ac 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -6,6 +6,5 @@ { "defineKeybinding.start": "Tastenbindung definieren", "defineKeybinding.kbLayoutInfoMessage": "Drücken Sie für Ihr aktuelles Tastaturlayout ", - "defineKeybinding.kbLayoutErrorMessage": "Sie können diese Tastenkombination mit Ihrem aktuellen Tastaturlayout nicht generieren.", - "DefineKeybindingAction": "Tastenbindung definieren" + "defineKeybinding.kbLayoutErrorMessage": "Sie können diese Tastenkombination mit Ihrem aktuellen Tastaturlayout nicht generieren." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json index f73934f542eee..794bf9b0aaffb 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "default": "Standard", - "user": "Benutzer" + "user": "Benutzer", + "meta": "meta", + "option": "option" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index 27454dd2e39bd..b89b0239d1c4c 100644 --- a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,6 +16,7 @@ "terminal.integrated.fontLigatures": "Steuert, ob Schriftartligaturen im Terminal aktiviert sind.", "terminal.integrated.fontSize": "Steuert den Schriftgrad des Terminals in Pixeln.", "terminal.integrated.lineHeight": "Steuert die Zeilenhöhe für das Terminal. Dieser Wert wird mit dem Schriftgrad des Terminals multipliziert, um die tatsächliche Zeilenhöhe in Pixeln zu erhalten.", + "terminal.integrated.enableBold": "Gibt an, ob Fettdruck im Terminal aktiviert werden soll. Dies muss durch die Terminalshell unterstützt werden.", "terminal.integrated.cursorBlinking": "Steuert, ob der Terminalcursor blinkt.", "terminal.integrated.cursorStyle": "Steuert den Stil des Terminalcursors.", "terminal.integrated.scrollback": "Steuert die maximale Anzahl von Zeilen, die das Terminal im Puffer beibehält.", diff --git a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json index 1ed48f98d5802..db78986c6f08c 100644 --- a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.integrated.allowWorkspaceShell": "Möchten Sie zulassen, dass {0} (als Arbeitsbereichseinstellung definiert) im Terminal gestartet wird?", "allow": "Allow", "disallow": "Disallow" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 50faf2f175c27..f973ef7e79841 100644 --- a/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,5 +14,6 @@ "noIconThemeDesc": "Dateisymbole deaktivieren", "problemChangingIconTheme": "Problem beim Festlegen des Symboldesigns: {0}", "themes.selectIconTheme": "Dateisymboldesign auswählen", - "preferences": "Einstellungen" + "preferences": "Einstellungen", + "developer": "Entwickler" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/deu/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 0e7b162df04b4..ef53547d99319 100644 --- a/i18n/deu/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/deu/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "Probleme beim Analysieren der JSON-Designdatei: {0}", - "error.invalidformat": "Problem beim Analysieren der JSON-Designdatei: {0}. \"tokenColors\" und \"colors\" wird erwartet.", - "error.plist.invalidformat": "Probleme beim Analysieren der Designdatei: {0}. \"settings\" ist kein Array", - "error.cannotparse": "Probleme beim Analysieren der Designdatei: {0}", - "error.cannotload": "Probleme beim Laden der Designdatei {0}: {1}" + "error.cannotparsejson": "Probleme beim Analysieren der JSON-Designdatei: {0}" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/deu/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 1f3a72388129a..e0608f319714d 100644 --- a/i18n/deu/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,6 +25,5 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "Überschreibt Farben aus dem derzeit ausgewählte Farbdesign. Diese Einstellung ist experimentell, da sich die Namen der Farben in der nächsten Version ändern." + "iconThemeError": "File icon theme is unknown or not installed." } \ No newline at end of file diff --git a/i18n/esn/extensions/git/out/askpass-main.i18n.json b/i18n/esn/extensions/git/out/askpass-main.i18n.json index 8b6ad71cd4e6d..1c3a1d90636cd 100644 --- a/i18n/esn/extensions/git/out/askpass-main.i18n.json +++ b/i18n/esn/extensions/git/out/askpass-main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "missOrInvalid": "Faltan las credenciales o no son válidas." +} \ No newline at end of file diff --git a/i18n/esn/extensions/git/out/commands.i18n.json b/i18n/esn/extensions/git/out/commands.i18n.json index 15d16fa77c71e..c27d7b65351dc 100644 --- a/i18n/esn/extensions/git/out/commands.i18n.json +++ b/i18n/esn/extensions/git/out/commands.i18n.json @@ -4,10 +4,23 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "tag at": "Etiqueta en {0}", + "remote branch at": "Rama remota en {0}", + "repourl": "URL del repositorio", "parent": "Directorio principal", + "cloning": "Clonando el repositorio GIT...", + "openrepo": "Abrir repositorio", + "proposeopen": "¿Desea abrir el repositorio clonado?", "confirm revert": "¿Está seguro de que desea revertir los cambios seleccionados en {0}?", "revert": "Revertir cambios", - "confirm discard all": "¿Está seguro de que quiere descartar TODOS los cambios? Esta acción es irreversible.", + "confirm discard": "¿Está seguro de que quiere descartar los cambios de {0}?", + "confirm discard multiple": "¿Está seguro de que quiere descartar los cambios de {0} archivos?", + "discard": "Descartar cambios", + "no changes": "No hay cambios para confirmar.", + "commit message": "Mensaje de confirmación", + "provide commit message": "Proporcione un mensaje de confirmación", + "branch name": "Nombre de rama", + "provide branch name": "Especifique un nombre para la rama", "no remotes to pull": "El repositorio no tiene remotos configurados de los que extraer.", "no remotes to push": "El repositorio no tiene remotos configurados en los que insertar.", "nobranch": "Extraiga del repositorio una rama para insertar un remoto.", diff --git a/i18n/esn/extensions/git/package.i18n.json b/i18n/esn/extensions/git/package.i18n.json index 85e968decdc41..4e347b856409d 100644 --- a/i18n/esn/extensions/git/package.i18n.json +++ b/i18n/esn/extensions/git/package.i18n.json @@ -10,11 +10,14 @@ "command.openChange": "Abrir cambios", "command.openFile": "Abrir archivo", "command.stage": "Almacenar cambios provisionalmente", + "command.stageAll": "Almacenar todos los cambios", "command.stageSelectedRanges": "Realizar copia intermedia de los intervalos seleccionados", "command.revertSelectedRanges": "Revertir los intervalos seleccionados", "command.unstage": "Cancelar almacenamiento provisional de los cambios", "command.unstageAll": "Cancelar almacenamiento provisional de todos los cambios", "command.unstageSelectedRanges": "Cancelar almacenamiento provisional de los intervalos seleccionados", + "command.clean": "Descartar cambios", + "command.cleanAll": "Descartar todos los cambios", "command.commit": "Confirmar", "command.commitStaged": "Confirmar almacenados provisionalmente", "command.commitStagedSigned": "Confirmar por etapas (Aprobado)", @@ -36,8 +39,6 @@ "config.autofetch": "Si la búsqueda automática está habilitada", "config.enableLongCommitWarning": "Si se debe advertir sobre los mensajes de confirmación largos", "config.confirmSync": "Confirmar antes de sincronizar repositorios GIT", - "config.countBadge": "Controla el contador de señales GIT", - "config.checkoutType": "Controla qué tipo de ramas figuran en la lista", "config.ignoreLegacyWarning": "Ignora las advertencias hereradas de Git", "config.ignoreLimitWarning": "\nIgnora advertencias cuando se encuentran muchos cambios en un repositorio." } \ No newline at end of file diff --git a/i18n/esn/extensions/gulp/package.i18n.json b/i18n/esn/extensions/gulp/package.i18n.json index 53e22e1765391..8b6ad71cd4e6d 100644 --- a/i18n/esn/extensions/gulp/package.i18n.json +++ b/i18n/esn/extensions/gulp/package.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "config.gulp.autoDetect": "Controla si la detección automática de tareas gulp esrta activada/desactivada. El vsalor predeterminado es \"activada\"." -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/esn/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/esn/extensions/typescript/out/typescriptServiceClient.i18n.json index d93aa704842d3..404195c7bb379 100644 --- a/i18n/esn/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/esn/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,9 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "Reiniciar", - "restartTypeScriptServerBlurb": "Reinicie el servidor de TypeScript para aplicar cambios", - "later": "Más tarde", "channelName": "TypeScript", "noServerFound": "La ruta de acceso {0} no apunta a una instalación válida de tsserver. Se usará la versión de TypeScript del paquete.", "noBundledServerFound": "Otra aplicación (por ejemplo, una herramienta de detección de virus con un comportamiento erróneo) eliminó el tsserver de VSCode. Debe reinstalar VS Code.", diff --git a/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json index 2f04fc83513d0..0d39c772a73fb 100644 --- a/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,7 +5,6 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Recuperando cambios en los datos para un mejor rendimiento de TypeScript IntelliSense", - "typesInstallerInitializationFailed.title": "No se pudo instalar los archivos de lenguaje de JavaScript . Asegúrese que NPM esté instalado. ", "typesInstallerInitializationFailed.moreInformation": "Más información", "typesInstallerInitializationFailed.doNotCheckAgain": "No volver a comprobar", "typesInstallerInitializationFailed.close": "Cerrar" diff --git a/i18n/esn/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/esn/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index c5040c18c929d..86449ea9fcd9d 100644 --- a/i18n/esn/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/esn/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "diffInserted": "Color de fondo para el texto insertado.", - "diffRemoved": "Color de fondo para el texto quitado.", - "diffInsertedOutline": "Color de contorno para el texto insertado.", - "diffRemovedOutline": "Color de contorno para el texto quitado." + "diffEditorInserted": "Color de fondo para el texto insertado.", + "diffEditorRemoved": "Color de fondo para el texto quitado.", + "diffEditorInsertedOutline": "Color de contorno para el texto insertado.", + "diffEditorRemovedOutline": "Color de contorno para el texto quitado." } \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index 9d5f0bccdc4bb..21b8d8ce3d62f 100644 --- a/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -7,16 +7,13 @@ "referencesFailre": "Error al resolver el archivo.", "referencesCount": "{0} referencias", "referenceCount": "{0} referencia", - "aria.fileReferences.1": "1 referencia en {0}", - "aria.fileReferences.N": "{0} referencias en {1}", - "aria.oneReference": "referencia en {0} linea {1} en la columna {2}", "missingPreviewMessage": "vista previa no disponible", "treeAriaLabel": "Referencias", "noResults": "No hay resultados.", "peekView.alternateTitle": "Referencias", "peekViewTitleBackground": "Color de fondo del área de título de la vista de inspección.", - "peekViewTitle": "Color del título de la vista de inpección.", - "peekViewTitleInfo": "Color de la información del título de la vista de inspección.", + "peekViewTitleForeground": "Color del título de la vista de inpección.", + "peekViewTitleInfoForeground": "Color de la información del título de la vista de inspección.", "peekViewBorder": "Color de los bordes y la flecha de la vista de inspección.", "peekViewResultsBackground": "Color de fondo de la lista de resultados de vista de inspección.", "peekViewResultsMatchForeground": "Buscar coincidencia con el primer plano de entrada de la lista de resultados de vista de inspección.", diff --git a/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 196d64bddd7b9..92df4e9611f96 100644 --- a/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -6,7 +6,6 @@ { "editorSuggestWidgetBackground": "Color de fondo del widget sugerido.", "editorSuggestWidgetBorder": "Color de borde del widget sugerido.", - "editorSuggestMatchHighlight": "Color del resaltado coincidido en el widget sugerido.", "readMore": "Leer más...{0}", "suggestionWithDetailsAriaLabel": "{0}, sugerencia, con detalles", "suggestionAriaLabel": "{0}, sugerencia", diff --git a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json index cfcf545ed6a9c..a2b4777b597fb 100644 --- a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,12 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "Formato de color no válido. Use #RRGGBB o #RRGGBBAA", "schema.colors": "Colores usados en el área de trabajo.", "foreground": "Color de primer plano general. Este color solo se usa si un componente no lo invalida.", - "focusedElementOutline": "Color general de contorno/borde de los elementos con foco. Este color solo se usa si un componente no lo invalida.", - "highContrastBorder": "Color de borde para separar componentes cuando está habilitado el tema de contraste alto.", - "highContrastOutline": "Color de contorno de componentes activos cuando está habilitado el tema de contraste alto.", "inputBoxBackground": "Fondo de cuadro de entrada.", "inputBoxForeground": "Primer plano de cuadro de entrada.", "inputBoxBorder": "Borde de cuadro de entrada.", @@ -17,19 +13,6 @@ "dropdownBackground": "Fondo de lista desplegable.", "dropdownForeground": "Primer plano de lista desplegable.", "dropdownBorder": "Borde de lista desplegable.", - "listFocusBackground": "List/Tree enfoca el fondo cuando está activo.", - "listInactiveFocusBackground": "List/Tree enfoca el fondo cuando está inactivo.", - "listActiveSelectionBackground": "List/Tree selección de fondo cuando está activo.", - "listActiveSelectionForeground": "List/Tree selección de primer plano cuando está activo.", - "listFocusAndSelectionBackground": "List/Tree enfocar y seleccionar fondo.", - "listFocusAndSelectionForeground": "List/Tree enfocar y seleccionar primer plano.", - "listInactiveSelectionBackground": "List/Tree selección de fondo cuando está inactivo.", - "listHoverBackground": "List/Tree mantener fondo.", - "listDropBackground": "List/Tree arrastrar y colocar fondo.", - "listFocusOutline": "List/Tree enfoca el color del contorno cuando está activo.", - "listInactiveFocusOutline": "List/Tree enfoca el color del contorno cuando está inactivo.", - "listSelectionOutline": "List/Tree selección de color del contorno.", - "listHoverOutline": "List/Tree mantener el color del contorno.", "pickerGroupForeground": "Selector de color rápido para la agrupación de etiquetas.", "pickerGroupBorder": "Selector de color rápido para la agrupación de bordes.", "editorBackground": "Color de fondo del editor.", @@ -42,6 +25,5 @@ "findRangeHighlight": "Color del intervalo que limita la búsqueda.", "activeLinkForeground": "Color de los vínculos activos.", "linkForeground": "Color de los vínculos.", - "editorWidgetBackground": "Color de fondo del editor de widgets como buscar/reemplazar", - "editorWidgetShadow": "Color de sombra del editor de widgets como buscar/reemplazar" + "editorWidgetBackground": "Color de fondo del editor de widgets como buscar/reemplazar" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/esn/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..7d556561528df --- /dev/null +++ b/i18n/esn/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "No hay registrado ningún TreeExplorerNodeProvider con el identificador \"{0}\".", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider \"{0}\" no pudo proporcionar el nodo raíz." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/common/theme.i18n.json b/i18n/esn/src/vs/workbench/common/theme.i18n.json index b79ad5ecaea57..9d8d6d091ae5e 100644 --- a/i18n/esn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/esn/src/vs/workbench/common/theme.i18n.json @@ -5,20 +5,17 @@ // Do not edit this file. It is machine generated. { "tabsContainerBackground": "Color de fondo del contenedor de las pestañas. Las pestañas son contenedores de editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores y puede haber varios grupos de editores.", - "activeTabBackground": "Color de fondo de la pestaña activa. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", - "inactiveTabBackground": "Color de fondo de la pestaña inactiva. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", - "activeTabActiveGroupForeground": "Color de primer plano de la pestaña activa en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", - "activeTabInactiveGroupForeground": "Color de primer plano de la pestaña activa en un grupo inactivo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", - "inactiveTabActiveGroupForeground": "Color de primer plano de la pestaña inactiva en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", - "inactiveTabInactiveGroupForeground": "Color de primer plano de la pestaña inactiva en un grupo inactivo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", + "tabActiveBackground": "Color de fondo de la pestaña activa. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", + "tabInactiveBackground": "Color de fondo de la pestaña inactiva. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "tabBorder": "Borde para separar las pestañas entre sí. Las pestañas son contenedores de editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", - "editorHeaderBackground": "Color de fondo del encabezado del titulo del editor cuando no hay pestañas habilitadas.", + "tabActiveEditorGroupActiveForeground": "Color de primer plano de la pestaña activa en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", + "tabActiveEditorGroupInactiveForeground": "Color de primer plano de la pestaña activa en un grupo inactivo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", + "tabInactiveEditorGroupActiveForeground": "Color de primer plano de la pestaña inactiva en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", + "tabInactiveEditorGroupInactiveForeground": "Color de primer plano de la pestaña inactiva en un grupo inactivo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "editorGroupBorder": "Color para separar varios grupos de editores entre sí. Los grupos de editores son los contenedores de los editores.", - "editorGroupBackground": "Color de fondo de un grupo de editores. Los grupos de editores son los contenedores de los editores.", "editorDragAndDropBackground": "Color de fondo cuando se arrastran editores.", - "editorSideBySideBorder": "Color del borde para separar los detalles del lado maestro de editores en paralelo.", "panelBackground": "Color de fondo del panel. Los paneles se muestran debajo del área de editores y contienen vistas, como Salida y Terminal integrado.", - "panelTopBorder": "Color del borde superior del panel que lo separa del editor. Los paneles se muestran debajo del área de editores y contienen vistas, como Salida y Terminal integrado.", + "panelBorder": "Color del borde superior del panel que lo separa del editor. Los paneles se muestran debajo del área de editores y contienen vistas, como Salida y Terminal integrado.", "panelActiveTitleForeground": "Color del título del panel activo. Los paneles se muestran debajo del área del editor y contienen vistas como Salida y Terminal integrado.", "panelInactiveTitleForeground": "Color del título del panel inactivo. Los paneles se muestran debajo del área del editor y contienen vistas como Salida y Terminal integrado.", "panelActiveTitleBorder": "Color de borde del título del panel activo. Los paneles se muestran debajo del área del editor y contienen vistas como Salida y Terminal integrado.", @@ -27,13 +24,11 @@ "statusBarNoFolderBackground": "Color de fondo de la barra de estado cuando no hay ninguna carpeta abierta. La barra de estado se muestra en la parte inferior de la ventana.", "statusBarItemActiveBackground": "Color de fondo de un elemento de la barra de estado al hacer clic. La barra de estado se muestra en la parte inferior de la ventana.", "statusBarItemHoverBackground": "Color de fondo de un elemento de la barra de estado al mantener el puntero. La barra de estado se muestra en la parte inferior de la ventana.", - "statusBarInfoItemBackground": "Color de fondo del elemento de información de la barra de estado, que se muestra en la parte inferior de la ventana.", - "statusBarInfoItemHoverBackground": "Color de fondo del elemento de información de la barra de estado, que se muestra en la parte inferior de la ventana.", "activityBarBackground": "Color de fondo de la barra de actividad, que se muestra en el lado izquierdo o derecho y que permite cambiar entre diferentes vistas de la barra lateral.", "activityBarForeground": "Color de fondo de la barra de actividad (por ejemplo utilizado por los iconos). La barra de actividad muestra en el lado izquierdo o derecho y permite cambiar entre diferentes vistas de la barra lateral.", "activityBarDragAndDropBackground": "Color de arrastrar y colocar comentarios de la barra de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", - "activityBadgeBackground": "Color de fondo de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", - "activityBadgeForeground": "Color de primer plano de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", + "activityBarBadgeBackground": "Color de fondo de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", + "activityBarBadgeForeground": "Color de primer plano de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", "sideBarBackground": "Color de fondo de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", "sideBarTitleForeground": "Color de primer plano del título de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", "titleBarActiveForeground": "Color de primer plano de la barra de título cuando la ventana está activa. Tenga en cuenta que, actualmente, este clor solo se admite en macOS.", diff --git a/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..8b6ad71cd4e6d 100644 --- a/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/common/debugModel.i18n.json index 1556a2e309e3e..e01a623f5d084 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "Origen desconocido", "notAvailable": "no disponible", - "startDebugFirst": "Inicie una sesión de depuración para evaluar", - "unknownStack": "Ubicación de pila desconocida" + "startDebugFirst": "Inicie una sesión de depuración para evaluar" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..733c87f80991d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "Origen desconocido" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 48ebc8de8ee27..feb00418ee773 100644 --- a/i18n/esn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "Aporta viewlet de Tree Explorer personalizado a la barra lateral", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "Identificador único usado para identificar el proveedor registrado a través de vscode.workspace.registerTreeExplorerNodeProvider", - "vscode.extension.contributes.explorer.treeLabel": "Cadena en lenguaje natural usada para representar el Tree Explorer personalizado", - "vscode.extension.contributes.explorer.icon": "Ruta de acceso al icono de viewlet en la barra de actividades", "showViewlet": "Mostrar {0}", "view": "Ver" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 194bd2ec3ecb9..cb715f512200f 100644 --- a/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -6,6 +6,5 @@ { "defineKeybinding.start": "Definir enlace de teclado", "defineKeybinding.kbLayoutInfoMessage": "Para la distribución del teclado actual, presione ", - "defineKeybinding.kbLayoutErrorMessage": "La distribución del teclado actual no permite reproducir esta combinación de teclas.", - "DefineKeybindingAction": "Definir enlace de teclado" + "defineKeybinding.kbLayoutErrorMessage": "La distribución del teclado actual no permite reproducir esta combinación de teclas." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 082899399d171..329fe3c8b2042 100644 --- a/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,5 +14,6 @@ "noIconThemeDesc": "Deshabilitar iconos de archivo", "problemChangingIconTheme": "Problema al configurar el tema de icono: {0}", "themes.selectIconTheme": "Seleccionar tema de icono de archivo", - "preferences": "Preferencias" + "preferences": "Preferencias", + "developer": "Desarrollador" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/esn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 3de654dadd4d2..d94eb7af67caa 100644 --- a/i18n/esn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/esn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "Problemas al analizar el archivo de tema JSON: {0}", - "error.invalidformat": "Hubo un problema al analizar el archivo de tema JSON: {0}. Se esperaba \"tokenColors\" y \"colors\".", - "error.plist.invalidformat": "Problema al analizar el archivo de tema: {0}. \"settings\" no es una matriz.", - "error.cannotparse": "Problemas al analizar el archivo de tema: {0}", - "error.cannotload": "Hubo problemas al cargar el archivo de tema {0}: {1}" + "error.cannotparsejson": "Problemas al analizar el archivo de tema JSON: {0}" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/esn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index d2927b70a397f..5d3877ecd7a70 100644 --- a/i18n/esn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/esn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,6 +25,5 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "Reemplaza los colores del tema de color seleccionado actualmente. Esta configuración es experimental ya que los nombres de los colores cambiarán en la próxima versión." + "iconThemeError": "File icon theme is unknown or not installed." } \ No newline at end of file diff --git a/i18n/fra/extensions/git/out/main.i18n.json b/i18n/fra/extensions/git/out/main.i18n.json index 253875106faa9..7ce7bde078c23 100644 --- a/i18n/fra/extensions/git/out/main.i18n.json +++ b/i18n/fra/extensions/git/out/main.i18n.json @@ -6,5 +6,6 @@ { "using git": "Utilisation de git {0} à partir de {1}", "updateGit": "Mettre à jour Git", - "neverShowAgain": "Ne plus afficher" + "neverShowAgain": "Ne plus afficher", + "git20": "Git {0} semble installé. Le code fonctionne mieux avec git >= 2" } \ No newline at end of file diff --git a/i18n/fra/extensions/git/out/model.i18n.json b/i18n/fra/extensions/git/out/model.i18n.json index ccd13dfdb2c62..70565ab624865 100644 --- a/i18n/fra/extensions/git/out/model.i18n.json +++ b/i18n/fra/extensions/git/out/model.i18n.json @@ -8,5 +8,7 @@ "merge changes": "Fusionner les modifications", "staged changes": "Modifications en zone de transit", "changes": "Modifications", - "ok": "OK" + "ok": "OK", + "neveragain": "Ne plus afficher", + "huge": "Le dépôt Git dans '{0}' a trop de modifications actives, seul un sous-ensemble de fonctionnalités Git sera activé." } \ No newline at end of file diff --git a/i18n/fra/extensions/git/package.i18n.json b/i18n/fra/extensions/git/package.i18n.json index 475cd6fdd1f46..a2aa4ce8ddf38 100644 --- a/i18n/fra/extensions/git/package.i18n.json +++ b/i18n/fra/extensions/git/package.i18n.json @@ -39,6 +39,6 @@ "config.autofetch": "Indique si la récupération automatique est activée", "config.enableLongCommitWarning": "Indique si les longs messages de validation doivent faire l'objet d'un avertissement", "config.confirmSync": "Confirmer avant de synchroniser des dépôts git", - "config.countBadge": "Contrôle le compteur de badges git", - "config.checkoutType": "Contrôle le type des branches listées" + "config.ignoreLegacyWarning": "Ignore l'avertissement Git hérité", + "config.ignoreLimitWarning": "Ignore l'avertissement quand il y a trop de modifications dans un dépôt" } \ No newline at end of file diff --git a/i18n/fra/extensions/grunt/out/main.i18n.json b/i18n/fra/extensions/grunt/out/main.i18n.json index 8b6ad71cd4e6d..831ac201fd974 100644 --- a/i18n/fra/extensions/grunt/out/main.i18n.json +++ b/i18n/fra/extensions/grunt/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Échec de la détection automatique des tâches Grunt avec l'erreur : {0}" +} \ No newline at end of file diff --git a/i18n/fra/extensions/grunt/package.i18n.json b/i18n/fra/extensions/grunt/package.i18n.json index 8b6ad71cd4e6d..bb010c3589a38 100644 --- a/i18n/fra/extensions/grunt/package.i18n.json +++ b/i18n/fra/extensions/grunt/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.grunt.autoDetect": "Contrôle si la détection automatique des tâches Grunt est activée ou désactivée. La valeur par défaut est activée." +} \ No newline at end of file diff --git a/i18n/fra/extensions/gulp/out/main.i18n.json b/i18n/fra/extensions/gulp/out/main.i18n.json index 8b6ad71cd4e6d..5baf80d099dfe 100644 --- a/i18n/fra/extensions/gulp/out/main.i18n.json +++ b/i18n/fra/extensions/gulp/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Échec de la détection automatique des tâches Gulp avec l'erreur : {0}" +} \ No newline at end of file diff --git a/i18n/fra/extensions/markdown/package.i18n.json b/i18n/fra/extensions/markdown/package.i18n.json index 2593fd137d5e7..5ec4dc8caeb28 100644 --- a/i18n/fra/extensions/markdown/package.i18n.json +++ b/i18n/fra/extensions/markdown/package.i18n.json @@ -16,5 +16,7 @@ "markdown.previewSide.title": "Ouvrir l'aperçu sur le côté", "markdown.showSource.title": "Afficher la source", "markdown.styles.dec": "Liste d'URL ou de chemins locaux de feuilles de style CSS à utiliser dans l'aperçu Markdown. Les chemins relatifs sont interprétés par rapport au dossier ouvert dans l'explorateur. S'il n'y a aucun dossier ouvert, ils sont interprétés par rapport à l'emplacement du fichier Markdown. Tous les signes '\\' doivent être écrits sous la forme '\\\\'.", - "markdown.showPreviewSecuritySelector.title": "Changer les paramètres de sécurité de l'aperçu Markdown" + "markdown.showPreviewSecuritySelector.title": "Changer les paramètres de sécurité de l'aperçu Markdown", + "markdown.preview.enableExperimentalExtensionApi.desc": "[Expérimental] Autorise les extensions à étendre l'aperçu Markdown.", + "markdown.trace.desc": "Active la journalisation du débogage pour l'extension Markdown." } \ No newline at end of file diff --git a/i18n/fra/extensions/php/package.i18n.json b/i18n/fra/extensions/php/package.i18n.json index c214e78c0aae9..ff6a902e3814a 100644 --- a/i18n/fra/extensions/php/package.i18n.json +++ b/i18n/fra/extensions/php/package.i18n.json @@ -9,5 +9,6 @@ "configuration.validate.executablePath": "Pointe vers l'exécutable PHP.", "configuration.validate.run": "Spécifie si linter est exécuté au moment de l'enregistrement ou de la saisie.", "configuration.title": "PHP", - "commands.categroy.php": "PHP" + "commands.categroy.php": "PHP", + "command.untrustValidationExecutable": "Interdire l'exécutable de validation PHP (défini comme paramètre d'espace de travail)" } \ No newline at end of file diff --git a/i18n/fra/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/fra/extensions/typescript/out/typescriptServiceClient.i18n.json index d6b2ab81b4189..3707e724af722 100644 --- a/i18n/fra/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/fra/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "Redémarrer", - "later": "Plus tard", "channelName": "TypeScript", "noServerFound": "Le chemin {0} ne pointe pas vers une installation tsserver valide. Utilisation par défaut de la version TypeScript groupée.", "noBundledServerFound": "Le tsserver de VSCode a été supprimé par une autre application, par exemple un outil de détection de virus mal configuré. Réinstallez VS Code.", @@ -17,6 +15,8 @@ "learnMore": "En savoir plus", "selectTsVersion": "Sélectionner la version TypeScript utilisée pour les fonctionnalités de langage JavaScript et TypeScript", "typescript.openTsServerLog.notSupported": "La journalisation du serveur TS nécessite TS 2.2.2+", + "typescript.openTsServerLog.loggingNotEnabled": "La journalisation du serveur TS est désactivée. Définissez 'typescript.tsserver.log' et redémarrez le serveur TS pour activer la journalisation", + "typescript.openTsServerLog.enableAndReloadOption": "Activer la journalisation et redémarrer le serveur TS", "typescript.openTsServerLog.noLogFile": "Le serveur TS n'a pas démarré la journalisation.", "openTsServerLog.openFileFailedFailed": "Impossible d'ouvrir le fichier journal du serveur TS", "serverDiedAfterStart": "Le service de langage TypeScript s'est subitement arrêté 5 fois juste après avoir démarré. Il n'y aura pas d'autres redémarrages.", diff --git a/i18n/fra/extensions/typescript/package.i18n.json b/i18n/fra/extensions/typescript/package.i18n.json index 3ea163efd6e6a..5fc1a277d9368 100644 --- a/i18n/fra/extensions/typescript/package.i18n.json +++ b/i18n/fra/extensions/typescript/package.i18n.json @@ -11,6 +11,8 @@ "typescript.tsdk.desc": "Spécifie le chemin de dossier contenant les fichiers tsserver et lib*.d.ts à utiliser.", "typescript.disableAutomaticTypeAcquisition": "Désactive l'acquisition de type automatique. Nécessite TypeScript >= 2.0.6 et un redémarrage, une fois le changement effectué.", "typescript.check.tscVersion": "Vérifiez si un compilateur TypeScript installé globalement (par exemple tsc) est différent du service de langage TypeScript.", + "typescript.tsserver.log": "Active la journalisation du serveur TS dans un fichier. Ce journal peut être utilisé pour diagnostiquer les problèmes du serveur TS. Il peut contenir des chemins de fichier, du code source et d'autres informations potentiellement sensibles de votre projet.", + "typescript.tsserver.trace": "Active le traçage des messages envoyés au serveur TS. Cette trace peut être utilisée pour diagnostiquer les problèmes du serveur TS. Elle peut contenir des chemins de fichier, du code source et d'autres informations potentiellement sensibles de votre projet.", "typescript.tsserver.experimentalAutoBuild": "Active la build automatique expérimentale. Nécessite la version 1.9 dev ou 2.x tsserver et le redémarrage du code VS une fois celui-ci modifié.", "typescript.validate.enable": "Activez/désactivez la validation TypeScript.", "typescript.format.enable": "Activez/désactivez le formateur TypeScript par défaut.", @@ -23,6 +25,7 @@ "format.insertSpaceBeforeFunctionParenthesis": "Définit la gestion des espaces avant les parenthèses des arguments d'une fonction. Nécessite TypeScript >= 2.1.5.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Définit le traitement des espaces après l'ouverture et avant la fermeture de parenthèses non vides.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Définit le traitement des espaces après l'ouverture et avant la fermeture de crochets non vides.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Définit la gestion de l'espace après l'ouverture et avant la fermeture des accolades non vides. Nécessite TypeScript >= 2.3.0.", "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Définit la gestion de l'espace après l'ouverture et avant la fermeture des accolades de la chaîne de modèle. Nécessite TypeScript >= 2.0.6.", "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "Définit la gestion de l'espace après l'ouverture et avant la fermeture des accolades de l'expression JSX. Nécessite TypeScript >= 2.0.6.", "format.placeOpenBraceOnNewLineForFunctions": "Définit si une accolade ouvrante dans une fonction est placée ou non sur une nouvelle ligne.", @@ -30,6 +33,11 @@ "javascript.validate.enable": "Activez/désactivez la validation JavaScript.", "typescript.goToProjectConfig.title": "Accéder à la configuration du projet", "javascript.goToProjectConfig.title": "Accéder à la configuration du projet", + "typescript.referencesCodeLens.enabled": "Activer/désactiver CodeLens dans les références. Nécessite TypeScript >= 2.0.6.", + "typescript.implementationsCodeLens.enabled": "Activer/désactiver CodeLens dans les implémentations. Nécessite TypeScript >= 2.2.0.", "typescript.openTsServerLog.title": "Ouvrir le fichier journal du serveur TS", - "typescript.selectTypeScriptVersion.title": "Sélectionner la version de TypeScript" + "typescript.selectTypeScriptVersion.title": "Sélectionner la version de TypeScript", + "jsDocCompletion.enabled": "Activer/désactiver les commentaires JSDoc automatiques", + "javascript.implicitProjectConfig.checkJs": "Activer/désactiver la vérification sémantique des fichiers JavaScript. Les fichiers jsconfig.json ou tsconfig.json existants remplacent ce paramètre. Nécessite TypeScript >=2.3.1.", + "typescript.check.npmIsInstalled": "Vérifie si NPM est installé pour l'acquisition automatique des typages" } \ No newline at end of file diff --git a/i18n/fra/src/vs/code/electron-main/menus.i18n.json b/i18n/fra/src/vs/code/electron-main/menus.i18n.json index a0ef32b732c72..6f57138a058b4 100644 --- a/i18n/fra/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/fra/src/vs/code/electron-main/menus.i18n.json @@ -6,6 +6,9 @@ { "mFile": "&&Fichier", "mEdit": "&&Modifier", + "mSelection": "&&Sélection", + "mView": "&&Afficher", + "mGoto": "&&Accéder", "mDebug": "&&Déboguer", "mWindow": "Fenêtre", "mHelp": "&&Aide", @@ -28,6 +31,7 @@ "miCloseWindow": "Ferm&&er la fenêtre", "miCloseFolder": "&&Fermer le dossier", "miCloseEditor": "Fermer l'édit&&eur", + "miExit": "Q&&uitter", "miOpenSettings": "&&Paramètres", "miOpenKeymap": "Racco&&urcis clavier", "miOpenKeymapExtensions": "&&Extensions de mappage de touches", @@ -39,6 +43,7 @@ "miClearRecentOpen": "&&Effacer les fichiers récents", "miUndo": "&&Annuler", "miRedo": "&&Rétablir", + "miCut": "Coupe&&r", "miCopy": "&&Copier", "miPaste": "&&Coller", "miFind": "&&Rechercher", @@ -92,6 +97,7 @@ "miZoomIn": "&&Zoom avant", "miZoomOut": "Zoo&&m arrière", "miZoomReset": "&&Réinitialiser le zoom", + "miBack": "&&Précédent", "miForward": "&&Suivant", "miNextEditor": "Éditeur &&suivant", "miPreviousEditor": "Éditeur pré&&cédent", diff --git a/i18n/fra/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/fra/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index 8b6ad71cd4e6d..102e04a7a89f0 100644 --- a/i18n/fra/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/fra/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "diffEditorInserted": "Couleur d'arrière-plan du texte inséré.", + "diffEditorRemoved": "Couleur d'arrière-plan du texte supprimé.", + "diffEditorInsertedOutline": "Couleur de contour du texte inséré.", + "diffEditorRemovedOutline": "Couleur de contour du texte supprimé." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/fra/src/vs/editor/common/services/bulkEdit.i18n.json index 4d5385f386dd2..9a1e91ba2a5ce 100644 --- a/i18n/fra/src/vs/editor/common/services/bulkEdit.i18n.json +++ b/i18n/fra/src/vs/editor/common/services/bulkEdit.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "conflict": "Ces fichiers ont changé pendant ce temps : {0}" + "conflict": "Ces fichiers ont changé pendant ce temps : {0}", + "summary.0": "Aucune modification effectuée", + "summary.nm": "{0} modifications de texte effectuées dans {1} fichiers", + "summary.n0": "{0} modifications de texte effectuées dans un fichier" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.i18n.json b/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.i18n.json index 938a77b32036f..5fee5001dd06d 100644 --- a/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.i18n.json @@ -12,10 +12,12 @@ "actions.previewDecl.label": "Apercu de définition", "goToImplementation.noResultWord": "Implémentation introuvable pour '{0}'", "goToImplementation.generic.noResults": "Implémentation introuvable", + "meta.implementations.title": "– Implémentations {0}", "actions.goToImplementation.label": "Accéder à l'implémentation", "actions.peekImplementation.label": "Aperçu de l'implémentation", "goToTypeDefinition.noResultWord": "Définition de type introuvable pour '{0}'", "goToTypeDefinition.generic.noResults": "Définition de type introuvable", + "meta.typeDefinitions.title": " – Définitions de type {0}", "actions.goToTypeDefinition.label": "Atteindre la définition de type", "actions.peekTypeDefinition.label": "Aperçu de la définition du type", "multipleResults": "Cliquez pour afficher {0} définitions." diff --git a/i18n/fra/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json b/i18n/fra/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json index 22c40bdd6d094..081fbcf0bec0a 100644 --- a/i18n/fra/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "mutlicursor.insertAbove": "Ajouter un curseur au-dessus", - "mutlicursor.insertBelow": "Ajouter un curseur en dessous" + "mutlicursor.insertBelow": "Ajouter un curseur en dessous", + "mutlicursor.insertAtEndOfEachLineSelected": "Ajouter des curseurs à la fin des lignes" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index d4516cedc780c..6440507bb5954 100644 --- a/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "aria.result.0": "Résultats introuvables" + "aria.result.0": "Résultats introuvables", + "aria.result.1": "1 symbole dans {0}", + "aria.result.n1": "{0} symboles dans {1}", + "aria.result.nm": "{0} symboles dans {1} fichiers" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index ff2057cf4f807..bb2792bf3e44e 100644 --- a/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -12,8 +12,8 @@ "noResults": "Aucun résultat", "peekView.alternateTitle": "Références", "peekViewTitleBackground": "Couleur d'arrière-plan de la zone de titre de l'affichage d'aperçu.", - "peekViewTitle": "Couleur du titre de l'affichage d'aperçu.", - "peekViewTitleInfo": "Couleur des informations sur le titre de l'affichage d'aperçu.", + "peekViewTitleForeground": "Couleur du titre de l'affichage d'aperçu.", + "peekViewTitleInfoForeground": "Couleur des informations sur le titre de l'affichage d'aperçu.", "peekViewBorder": "Couleur des bordures et de la flèche de l'affichage d'aperçu.", "peekViewResultsBackground": "Couleur d'arrière-plan de la liste des résultats de l'affichage d'aperçu.", "peekViewResultsMatchForeground": "Premier plan de l'entrée correspondante dans la liste des résultats de l'affichage d'aperçu.", diff --git a/i18n/fra/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/fra/src/vs/editor/contrib/rename/browser/rename.i18n.json index 9233f050e7582..d6f02080b63a5 100644 --- a/i18n/fra/src/vs/editor/contrib/rename/browser/rename.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "no result": "Aucun résultat.", + "aria": "'{0}' renommé en '{1}'. Récapitulatif : {2}", "rename.failed": "Échec de l'exécution du renommage.", "rename.label": "Renommer le symbole" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json index ce300ab5ae627..6715662ea09e6 100644 --- a/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "arai.alert.snippet": "L'acceptation de '{0}' a inséré le texte suivant : {1}", "suggest.trigger.label": "Suggestions pour Trigger" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 47653595d2e1c..cae2864bf7a10 100644 --- a/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "editorSuggestWidgetBackground": "Couleur d'arrière-plan du widget de suggestion.", + "editorSuggestWidgetBorder": "Couleur de bordure du widget de suggestion.", "readMore": "En savoir plus...{0}", "suggestionWithDetailsAriaLabel": "{0}, suggestion, avec détails", "suggestionAriaLabel": "{0}, suggestion", diff --git a/i18n/fra/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/fra/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index a0e16db5a082e..315671f3b2287 100644 --- a/i18n/fra/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/fra/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "requirearray": "les éléments de menu doivent figurer dans un tableau", "requirestring": "la propriété '{0}' est obligatoire et doit être de type 'string'", "optstring": "La propriété '{0}' peut être omise ou doit être de type 'string'", "vscode.extension.contributes.menuItem.command": "Identificateur de la commande à exécuter. La commande doit être déclarée dans la section 'commands'", diff --git a/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json index 645fb819b1981..1fad25c1f7158 100644 --- a/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,12 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "Format de couleur non valide. Utilisez #RRGGBB ou #RRGGBBAA", "schema.colors": "Couleurs utilisées dans le banc d'essai.", "foreground": "Couleur de premier plan globale. Cette couleur est utilisée si elle n'est pas remplacée par un composant.", - "focusedElementOutline": "Couleur de plan/bordure globale des éléments ayant le focus. Cette couleur est utilisée si elle n'est pas remplacée par un composant.", - "highContrastBorder": "Couleur de bordure séparant les composants quand un thème à contraste élevé est activé.", - "highContrastOutline": "Couleur de contour des composants actifs quand un thème à contraste élevé est activé.", "inputBoxBackground": "Arrière-plan de la zone d'entrée.", "inputBoxForeground": "Premier plan de la zone d'entrée.", "inputBoxBorder": "Bordure de la zone d'entrée.", @@ -17,6 +13,8 @@ "dropdownBackground": "Arrière-plan de la liste déroulante.", "dropdownForeground": "Premier plan de la liste déroulante.", "dropdownBorder": "Bordure de la liste déroulante.", + "pickerGroupForeground": "Couleur du sélecteur rapide pour les étiquettes de regroupement.", + "pickerGroupBorder": "Couleur du sélecteur rapide pour les bordures de regroupement.", "editorBackground": "Couleur d'arrière-plan de l'éditeur.", "editorForeground": "Couleur de premier plan par défaut de l'éditeur.", "editorSelection": "Couleur de la sélection de l'éditeur.", @@ -26,5 +24,6 @@ "findMatchHighlight": "Couleur des autres résultats de recherche.", "findRangeHighlight": "Couleur de la plage limitant la recherche.", "activeLinkForeground": "Couleur des liens actifs.", - "linkForeground": "Couleur des liens." + "linkForeground": "Couleur des liens.", + "editorWidgetBackground": "Couleur d'arrière-plan des gadgets de l'éditeur tels que rechercher/remplacer." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/fra/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..ff14373fbdcb2 --- /dev/null +++ b/i18n/fra/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "Aucun TreeExplorerNodeProvider ayant l'ID '{0}' n'est inscrit.", + "treeExplorer.failedToProvideRootNode": "Le TreeExplorerNodeProvider '{0}' n'a pas pu fournir le nœud racine." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/common/theme.i18n.json b/i18n/fra/src/vs/workbench/common/theme.i18n.json index 079c95390e018..d27b5b34976b7 100644 --- a/i18n/fra/src/vs/workbench/common/theme.i18n.json +++ b/i18n/fra/src/vs/workbench/common/theme.i18n.json @@ -5,20 +5,17 @@ // Do not edit this file. It is machine generated. { "tabsContainerBackground": "Couleur d'arrière-plan du conteneur d'onglets. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "activeTabBackground": "Couleur d'arrière-plan de l'onglet actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "inactiveTabBackground": "Couleur d'arrière-plan de l'onglet inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "activeTabActiveGroupForeground": "Couleur de premier plan de l'onglet actif dans un groupe actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "activeTabInactiveGroupForeground": "Couleur de premier plan de l'onglet actif dans un groupe inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "inactiveTabActiveGroupForeground": "Couleur de premier plan de l'onglet inactif dans un groupe actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "inactiveTabInactiveGroupForeground": "Couleur de premier plan de l'onglet inactif dans un groupe inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", + "tabActiveBackground": "Couleur d'arrière-plan de l'onglet actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", + "tabInactiveBackground": "Couleur d'arrière-plan de l'onglet inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", "tabBorder": "Bordure séparant les onglets les uns des autres. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "editorHeaderBackground": "Couleur d'arrière-plan de l'en-tête du titre de l'éditeur quand aucun onglet n'est activé.", + "tabActiveEditorGroupActiveForeground": "Couleur de premier plan de l'onglet actif dans un groupe actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", + "tabActiveEditorGroupInactiveForeground": "Couleur de premier plan de l'onglet actif dans un groupe inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", + "tabInactiveEditorGroupActiveForeground": "Couleur de premier plan de l'onglet inactif dans un groupe actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", + "tabInactiveEditorGroupInactiveForeground": "Couleur de premier plan de l'onglet inactif dans un groupe inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", "editorGroupBorder": "Couleur séparant plusieurs groupes d'éditeurs les uns des autres. Les groupes d'éditeurs sont les conteneurs des éditeurs.", - "editorGroupBackground": "Couleur d'arrière-plan d'un groupe d'éditeurs. Les groupes d'éditeurs sont les conteneurs des éditeurs.", "editorDragAndDropBackground": "Couleur d'arrière-plan durant le déplacement des éditeurs.", - "editorSideBySideBorder": "Couleur de bordure séparant les détails par rapport au côté maître pour les éditeurs côte à côte.", "panelBackground": "Couleur d'arrière-plan du panneau. Les panneaux s'affichent sous la zone d'éditeurs et contiennent des affichages tels que la sortie et le terminal intégré.", - "panelTopBorder": "Couleur de bordure de panneau dans la partie supérieure de séparation de l'éditeur. Les panneaux s'affichent sous la zone d'éditeurs et contiennent des affichages tels que la sortie et le terminal intégré.", + "panelBorder": "Couleur de bordure de panneau dans la partie supérieure de séparation de l'éditeur. Les panneaux s'affichent sous la zone d'éditeurs et contiennent des affichages tels que la sortie et le terminal intégré.", "panelActiveTitleForeground": "Couleur du titre du panneau actif. Les panneaux se situent sous la zone de l'éditeur et contiennent des affichages comme la sortie et le terminal intégré.", "panelInactiveTitleForeground": "Couleur du titre du panneau inactif. Les panneaux se situent sous la zone de l'éditeur et contiennent des affichages comme la sortie et le terminal intégré.", "panelActiveTitleBorder": "Couleur de la bordure du titre du panneau actif. Les panneaux se situent sous la zone de l'éditeur et contiennent des affichages comme la sortie et le terminal intégré.", @@ -27,12 +24,11 @@ "statusBarNoFolderBackground": "Couleur d'arrière-plan de la barre d'état quand aucun dossier n'est ouvert. La barre d'état est affichée en bas de la fenêtre.", "statusBarItemActiveBackground": "Couleur d'arrière-plan de l'élément de la barre d'état durant un clic. La barre d'état est affichée en bas de la fenêtre.", "statusBarItemHoverBackground": "Couleur d'arrière-plan de l'élément de la barre d'état durant un pointage. La barre d'état est affichée en bas de la fenêtre.", - "statusBarInfoItemBackground": "Couleur d'arrière-plan de l'élément d'information de la barre d'état. La barre d'état est affichée en bas de la fenêtre.", - "statusBarInfoItemHoverBackground": "Couleur d'arrière-plan de l'élément d'information de la barre d'état durant un pointage. La barre d'état est affichée en bas de la fenêtre.", "activityBarBackground": "Couleur d'arrière-plan de la barre d'activités. La barre d'activités s'affiche complètement à gauche ou à droite, et permet de naviguer entre les affichages de la barre latérale.", + "activityBarForeground": "Couleur de premier plan de la barre d'activités (par ex., utilisée pour les icônes). La barre d'activités s'affiche complètement à gauche ou à droite, et permet de parcourir les vues de la barre latérale.", "activityBarDragAndDropBackground": "Couleur des commentaires sur une opération de glisser-déplacer pour les éléments de la barre d'activités. La barre d'activités, située à l'extrême gauche ou droite, permet de basculer entre les affichages de la barre latérale.", - "activityBadgeBackground": "Couleur d'arrière-plan du badge de notification d'activité. La barre d'activités, située à l'extrême gauche ou droite, permet de basculer entre les affichages de la barre latérale.", - "activityBadgeForeground": "Couleur de premier plan du badge de notification d'activité. La barre d'activités, située à l'extrême gauche ou droite, permet de basculer entre les affichages de la barre latérale.", + "activityBarBadgeBackground": "Couleur d'arrière-plan du badge de notification d'activité. La barre d'activités, située à l'extrême gauche ou droite, permet de basculer entre les affichages de la barre latérale.", + "activityBarBadgeForeground": "Couleur de premier plan du badge de notification d'activité. La barre d'activités, située à l'extrême gauche ou droite, permet de basculer entre les affichages de la barre latérale.", "sideBarBackground": "Couleur d'arrière-plan de la barre latérale. La barre latérale est le conteneur des affichages tels que ceux de l'exploration et la recherche.", "sideBarTitleForeground": "Couleur de premier plan du titre de la barre latérale. La barre latérale est le conteneur des affichages tels que ceux de l'exploration et la recherche.", "titleBarActiveForeground": "Premier plan de la barre de titre quand la fenêtre est active. Notez que cette couleur est uniquement prise en charge sur macOS.", diff --git a/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json index 072882d123a12..e03298e00441f 100644 --- a/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -20,6 +20,7 @@ "statusBarVisibility": "Contrôle la visibilité de la barre d'état au bas du banc d'essai.", "activityBarVisibility": "Contrôle la visibilité de la barre d'activités dans le banc d'essai.", "closeOnFileDelete": "Contrôle si les éditeurs qui affichent un fichier doivent se fermer automatiquement quand ce fichier est supprimé ou renommé par un autre processus. Si vous désactivez cette option, l'éditeur reste ouvert dans un état indiquant une intégrité compromise. Notez que la suppression de fichiers à partir de l'application entraîne toujours la fermeture de l'éditeur, et que les fichiers à l'intégrité compromise ne sont jamais fermés pour permettre la conservation de vos données.", + "swipeToNavigate": "Parcourez les fichiers ouverts en faisant glisser trois doigts horizontalement. ", "workbenchConfigurationTitle": "Banc d'essai", "window.openFilesInNewWindow.on": "Les fichiers s'ouvrent dans une nouvelle fenêtre", "window.openFilesInNewWindow.off": "Les fichiers s'ouvrent dans la fenêtre du dossier conteneur ouvert ou dans la dernière fenêtre active", @@ -48,10 +49,12 @@ "menuBarVisibility": "Contrôle la visibilité de la barre de menus. Le paramètre 'toggle' signifie que la barre de menus est masquée, et qu'une seule pression sur la touche Alt permet de l'afficher. Par défaut, la barre de menus est visible, sauf si la fenêtre est en mode plein écran.", "autoDetectHighContrast": "Si cette option est activée, le thème à contraste élevé est automatiquement choisi quand Windows utilise un thème à contraste élevé. À l'inverse, le thème sombre est automatiquement choisi quand Windows n'utilise plus le thème à contraste élevé.", "titleBarStyle": "Ajustez l'apparence de la barre de titre de la fenêtre. Vous devez effectuer un redémarrage complet pour que les changements soient appliqués.", + "window.nativeTabs": "Active les onglets macOS Sierra. Notez que vous devez redémarrer l'ordinateur pour appliquer les modifications et que les onglets natifs désactivent tout style de barre de titre personnalisé configuré, le cas échéant.", "windowConfigurationTitle": "Fenêtre", "zenModeConfigurationTitle": "Mode Zen", "zenMode.fullScreen": "Contrôle si l'activation de Zen Mode met également le banc d'essai en mode plein écran.", "zenMode.hideTabs": "Contrôle si l'activation du mode Zen masque également les onglets du banc d'essai.", "zenMode.hideStatusBar": "Contrôle si l'activation du mode Zen masque également la barre d'état au bas du banc d'essai.", + "zenMode.hideActivityBar": "Contrôle si l'activation du mode Zen masque également la barre d'activités à gauche du banc d'essai.", "zenMode.restore": "Contrôle si une fenêtre doit être restaurée en mode zen, si elle a été fermée en mode zen." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..8b6ad71cd4e6d 100644 --- a/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/common/debugModel.i18n.json index f7685a761f1b5..6211ec4dc53f6 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "Source inconnue", "notAvailable": "non disponible", - "startDebugFirst": "Démarrez une session de débogage pour évaluation", - "unknownStack": "Emplacement de pile inconnu" + "startDebugFirst": "Démarrez une session de débogage pour évaluation" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..5573a24d50eae --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "Source inconnue" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index 65f0c5f78ba94..f3fe279805361 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -15,5 +15,6 @@ "allowBreakpointsEverywhere": "Permet de définir un point d'arrêt dans un fichier", "openExplorerOnEnd": "Ouvrir automatiquement le mode explorateur à la fin d'une session de débogage", "inlineValues": "Afficher les valeurs des variables inline dans l'éditeur pendant le débogage", - "hideActionBar": "Contrôle si la barre d'action de débogage flottante doit être masquée" + "hideActionBar": "Contrôle si la barre d'action de débogage flottante doit être masquée", + "launch": "Configuration du lancement du débogage global. Doit être utilisée comme alternative à 'launch.json' qui est partagé entre les espaces de travail" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 5d874fb9c0ec4..c0fac8346b81d 100644 --- a/i18n/fra/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "Utilise la viewlet du Tree Explorer personnalisé dans la barre latérale", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "ID unique permettant d'identifier le fournisseur inscrit via vscode.workspace.registerTreeExplorerNodeProvider", - "vscode.extension.contributes.explorer.treeLabel": "Chaîne contrôlable de visu permettant d'afficher le Tree Explorer personnalisé", - "vscode.extension.contributes.explorer.icon": "Chemin de l'icône de viewlet dans la barre d'activités", "showViewlet": "Afficher {0}", "view": "Affichage" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 18cf1088366c9..46cfb8cb55bcb 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "reallyRecommended2": "L'extension '{0}' est recommandée pour ce type de fichier.", "showRecommendations": "Afficher les recommandations", "neverShowAgain": "Ne plus afficher", "close": "Fermer", diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index 1c100c20c5a8d..57f672b5a2cc9 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -8,6 +8,7 @@ "extensions": "Extensions", "sort by installs": "Trier par : nombre d'installations", "sort by rating": "Trier par : évaluation", + "sort by name": "Trier par : Nom", "no extensions found": "Extensions introuvables.", "suggestProxyError": "Marketplace a retourné 'ECONNREFUSED'. Vérifiez le paramètre 'http.proxy'.", "outdatedExtensions": "{0} extensions obsolètes" diff --git a/i18n/fra/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/fra/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json index aa46d6e9d153d..b3c02d74e398e 100644 --- a/i18n/fra/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json @@ -11,5 +11,6 @@ "genericSaveError": "Échec d'enregistrement de '{0}' ({1}).", "staleSaveError": "Échec de l'enregistrement de '{0}' : le contenu sur disque est plus récent. Cliquez sur **Comparer** pour comparer votre version à celle située sur le disque.", "compareChanges": "Comparer", + "saveConflictDiffLabel": "{0} (sur le disque) ↔ {1} (dans {2}) - Résoudre le conflit d'enregistrement", "userGuide": "Utilisez les actions de la barre d'outils de l'éditeur pour **annuler** vos modifications, ou pour **remplacer** le contenu sur disque par le contenu incluant vos changements" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index daa7e32feafaf..7d18aea5f66e3 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -7,6 +7,7 @@ "keybindingsInputName": "Raccourcis clavier", "SearchKeybindings.AriaLabel": "Rechercher dans les combinaisons de touches", "SearchKeybindings.Placeholder": "Rechercher dans les combinaisons de touches", + "sortByPrecedene": "Trier par priorité", "header-message": "Pour des personnalisations avancées, ouvrez et modifiez", "keybindings-file-name": "keybindings.json", "keybindingsLabel": "Combinaisons de touches", @@ -14,6 +15,7 @@ "addLabel": "Ajouter une combinaison de touches", "removeLabel": "Supprimer la combinaison de touches", "resetLabel": "Définir une combinaison de touches", + "showConflictsLabel": "Afficher les conflits", "copyLabel": "Copier", "error": "Erreur '{0}' durant la modification de la combinaison de touches. Ouvrez le fichier 'keybindings.json', puis effectuez la vérification.", "command": "Commande", diff --git a/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 4d183869763e7..d147a9a8e3203 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -6,6 +6,5 @@ { "defineKeybinding.start": "Définir une combinaison de touches", "defineKeybinding.kbLayoutInfoMessage": "Pour votre disposition actuelle du clavier, appuyez sur ", - "defineKeybinding.kbLayoutErrorMessage": "Vous ne pouvez pas produire cette combinaison de touches avec la disposition actuelle du clavier.", - "DefineKeybindingAction": "Définir une combinaison de touches" + "defineKeybinding.kbLayoutErrorMessage": "Vous ne pouvez pas produire cette combinaison de touches avec la disposition actuelle du clavier." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json index ded62d720502b..7ee69533a0995 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "default": "Par défaut", - "user": "Utilisateur" + "user": "Utilisateur", + "meta": "méta", + "option": "option" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index ea30b101883e2..4f049d61996a8 100644 --- a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,6 +16,7 @@ "terminal.integrated.fontLigatures": "Contrôle si les ligatures de police sont activées sur le terminal.", "terminal.integrated.fontSize": "Contrôle la taille de police en pixels du terminal.", "terminal.integrated.lineHeight": "Contrôle la hauteur de ligne du terminal. La multiplication de ce nombre par la taille de police du terminal permet d'obtenir la hauteur de ligne réelle en pixels.", + "terminal.integrated.enableBold": "Indique s'il faut activer ou non le texte en gras dans le terminal, ce qui nécessite une prise en charge de l'interpréteur de commandes du terminal.", "terminal.integrated.cursorBlinking": "Contrôle si le curseur du terminal clignote.", "terminal.integrated.cursorStyle": "Contrôle le style du curseur du terminal.", "terminal.integrated.scrollback": "Contrôle la quantité maximale de lignes que le terminal conserve dans sa mémoire tampon.", diff --git a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json index 1ed48f98d5802..e1e7e6597fa17 100644 --- a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.integrated.allowWorkspaceShell": "Autorisez-vous le lancement de {0} (défini comme paramètre d'espace de travail) dans le terminal ?", "allow": "Allow", "disallow": "Disallow" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index b7953670b20fb..8ad3a81eb90a1 100644 --- a/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,5 +14,6 @@ "noIconThemeDesc": "Désactiver les icônes de fichiers", "problemChangingIconTheme": "Problème de définition du thème d'icône : {0}", "themes.selectIconTheme": "Sélectionner un thème d'icône de fichier", - "preferences": "Préférences" + "preferences": "Préférences", + "developer": "Développeur" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/fra/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 7bc684ce1fb5e..4849a048ec46d 100644 --- a/i18n/fra/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/fra/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "Problèmes durant l'analyse du fichier de thème JSON : {0}", - "error.invalidformat": "Problème durant l'analyse du fichier de thème JSON : {0}. 'tokenColors' et 'colors' attendus.", - "error.plist.invalidformat": "Problème durant l'analyse du fichier de thème : {0}. 'settings' n'est pas un tableau.", - "error.cannotparse": "Problèmes durant l'analyse du fichier de thème : {0}", - "error.cannotload": "Problèmes durant le chargement du fichier de thème {0} : {1}" + "error.cannotparsejson": "Problèmes durant l'analyse du fichier de thème JSON : {0}" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/fra/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 412a961a7e863..3181391a3b20c 100644 --- a/i18n/fra/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/fra/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,6 +25,5 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "Remplace les couleurs du thème de couleurs actuellement sélectionné. Ce paramètre est expérimental, et les noms des couleurs seront différents dans la prochaine version." + "iconThemeError": "File icon theme is unknown or not installed." } \ No newline at end of file diff --git a/i18n/ita/extensions/git/out/model.i18n.json b/i18n/ita/extensions/git/out/model.i18n.json index c66808a6fc46a..5cfce3e084435 100644 --- a/i18n/ita/extensions/git/out/model.i18n.json +++ b/i18n/ita/extensions/git/out/model.i18n.json @@ -8,5 +8,7 @@ "merge changes": "Esegui merge delle modifiche", "staged changes": "Modifiche preparate per il commit", "changes": "Modifiche", - "ok": "OK" + "ok": "OK", + "neveragain": "Non visualizzare più questo messaggio", + "huge": "Il repository git '{0}' ha troppe modifiche attive - verrà attivato solo un sottoinsieme delle funzionalità di Git." } \ No newline at end of file diff --git a/i18n/ita/extensions/git/package.i18n.json b/i18n/ita/extensions/git/package.i18n.json index 9175f30b457e4..c514f38f714d7 100644 --- a/i18n/ita/extensions/git/package.i18n.json +++ b/i18n/ita/extensions/git/package.i18n.json @@ -9,14 +9,11 @@ "command.refresh": "Aggiorna", "command.openChange": "Apri modifiche", "command.openFile": "Apri file", - "command.stage": "Prepara modifiche per commit", - "command.stageAll": "Prepara tutte le modifiche per commit", "command.stageSelectedRanges": "Prepara per il commit intervalli selezionati", "command.revertSelectedRanges": "Ripristina intervalli selezionati", "command.unstage": "Annulla preparazione modifiche per commit", "command.unstageAll": "Annulla preparazione di tutte le modifiche per commit", "command.unstageSelectedRanges": "Annulla preparazione per il commit di intervalli selezionati", - "command.clean": "Rimuovi modifiche", "command.cleanAll": "Rimuovi tutte le modifiche", "command.commit": "Commit", "command.commitStaged": "Esegui commit dei file preparati", @@ -39,7 +36,6 @@ "config.autofetch": "Indica se il recupero automatico è abilitato", "config.enableLongCommitWarning": "Indica se visualizzare un avviso in caso di messaggi di commit lunghi", "config.confirmSync": "Conferma prima di sincronizzare i repository GIT", - "config.countBadge": "Controlla il contatore dei log GIT", - "config.checkoutType": "Controlla il tipo di rami elencati", - "config.ignoreLegacyWarning": "Ignora l'avvertimento legacy di Git" + "config.ignoreLegacyWarning": "Ignora l'avvertimento legacy di Git", + "config.ignoreLimitWarning": "Ignora il messaggio di avviso quando ci sono troppi cambiamenti in un repository" } \ No newline at end of file diff --git a/i18n/ita/extensions/grunt/out/main.i18n.json b/i18n/ita/extensions/grunt/out/main.i18n.json index 8b6ad71cd4e6d..8defb3ed9235c 100644 --- a/i18n/ita/extensions/grunt/out/main.i18n.json +++ b/i18n/ita/extensions/grunt/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Rilevamento automatico di Grunt non riuscito - errore: {0}" +} \ No newline at end of file diff --git a/i18n/ita/extensions/grunt/package.i18n.json b/i18n/ita/extensions/grunt/package.i18n.json index 8b6ad71cd4e6d..46f902d3d6155 100644 --- a/i18n/ita/extensions/grunt/package.i18n.json +++ b/i18n/ita/extensions/grunt/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.grunt.autoDetect": "Controlla se la rilevazione automatica delle attività Grunt è on/off. L'impostazione predefinita è 'on'." +} \ No newline at end of file diff --git a/i18n/ita/extensions/gulp/package.i18n.json b/i18n/ita/extensions/gulp/package.i18n.json index c9bd05d8b6272..8b6ad71cd4e6d 100644 --- a/i18n/ita/extensions/gulp/package.i18n.json +++ b/i18n/ita/extensions/gulp/package.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "config.gulp.autoDetect": "Controlla se la rilevazione automatica delle attività gulp è on/off. L'impostazione predefinita è 'on'." -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/ita/extensions/markdown/package.i18n.json b/i18n/ita/extensions/markdown/package.i18n.json index d271102f8e31d..47991a79c7c83 100644 --- a/i18n/ita/extensions/markdown/package.i18n.json +++ b/i18n/ita/extensions/markdown/package.i18n.json @@ -17,5 +17,6 @@ "markdown.showSource.title": "Mostra origine", "markdown.styles.dec": "Elenco di URL o percorsi locali dei fogli di stile CSS da usare dall'anteprima markdown. I percorsi relativi vengono interpretati come relativi alla cartella aperta nella finestra di esplorazione. Se non è presente alcuna cartella aperta, vengono interpretati come relativi al percorso del file markdown. Tutti i caratteri '\\' devono essere scritti come '\\\\'.", "markdown.showPreviewSecuritySelector.title": "Modifica impostazioni di sicurezza anteprima markdown", - "markdown.preview.enableExperimentalExtensionApi.desc": "[Sperimentale] Consentire estensioni per estendere l'anteprima di markdown." + "markdown.preview.enableExperimentalExtensionApi.desc": "[Sperimentale] Consentire estensioni per estendere l'anteprima di markdown.", + "markdown.trace.desc": "Abilitare la registrazione debug per l'estensione markdown." } \ No newline at end of file diff --git a/i18n/ita/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/ita/extensions/typescript/out/typescriptServiceClient.i18n.json index 231924f91a9b2..97e691e49afb6 100644 --- a/i18n/ita/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/ita/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,9 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "Riavvia", - "restartTypeScriptServerBlurb": "Riavviare il Server TypeScript per applicare le modifiche", - "later": "In seguito", "channelName": "TypeScript", "noServerFound": "Il percorso {0} non punta a un'installazione valida di tsserver. Verrà eseguito il fallback alla versione in bundle di TypeScript.", "noBundledServerFound": "Il file tsserver di VSCode è stato eliminato da un'altra applicazione, ad esempio uno strumento di rilevamento virus che non funziona correttamente. Reinstallare VSCode.", diff --git a/i18n/ita/extensions/typescript/package.i18n.json b/i18n/ita/extensions/typescript/package.i18n.json index 342c392fcb12a..00ac1f3529e47 100644 --- a/i18n/ita/extensions/typescript/package.i18n.json +++ b/i18n/ita/extensions/typescript/package.i18n.json @@ -11,6 +11,8 @@ "typescript.tsdk.desc": "Specifica il percorso della cartella che contiene i file tsserver e lib*.d.ts da usare.", "typescript.disableAutomaticTypeAcquisition": "Disabilita l'acquisizione automatica del tipo. Richiede TypeScript >= 2.0.6 e un riavvio dopo la modifica.", "typescript.check.tscVersion": "Verifica se un compilatore TypeScript di installazione globale, ad esempio tsc, è diverso dal servizio di linguaggio TypeScript usato.", + "typescript.tsserver.log": "Abilita la registrazione del server TypeScript in un file. Questo registro può essere utilizzato per diagnosticare problemi del server TypeScript. Il registro può contenere percorsi di file, codice sorgente e altre informazioni del progetto potenzialmente riservate. ", + "typescript.tsserver.trace": "Abilita la traccia dei messaggi inviati al server TypeScript. Questa traccia può essere utilizzata per diagnosticare problemi del server TypeScript. La traccia può contenere percorsi di file, codice sorgente e altre informazioni del progetto potenzialmente riservate.", "typescript.tsserver.experimentalAutoBuild": "Abilita la compilazione automatica sperimentale. Richiede la versione 1.9 dev o 2.x tsserver e il riavvio di Visual Studio Code dopo la modifica.", "typescript.validate.enable": "Abilita/Disabilita la convalida TypeScript.", "typescript.format.enable": "Abilita/Disabilita il formattatore TypeScript predefinito.", @@ -23,6 +25,7 @@ "format.insertSpaceBeforeFunctionParenthesis": "Consente di definire la gestione dello spazio prima delle parentesi dell'argomento della funzione. Richiede TypeScript >= 2.1.5.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Consente di definire la gestione dello spazio dopo le parentesi tonde di apertura e di chiusura non vuote.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Consente di definire la gestione dello spazio dopo le parentesi quadre di apertura e di chiusura non vuote.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Consente di definire la gestione dello spazio dopo l'apertura e prima della chiusura di parentesi graffe non vuote. Richiede TypeScript >= 2.3.0.", "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Consente di definire la gestione dello spazio dopo la parentesi graffa iniziale e prima della parentesi graffa finale della stringa del modello. Richiede TypeScript >= 2.0.6", "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "Consente di definire la gestione dello spazio dopo la parentesi graffa iniziale e prima della parentesi graffa finale dell'espressione JSX. Richiede TypeScript >= 2.0.6", "format.placeOpenBraceOnNewLineForFunctions": "Consente di definire se una parentesi graffa di apertura viene o meno inserita su una riga per le funzioni.", @@ -34,5 +37,7 @@ "typescript.implementationsCodeLens.enabled": "Abilita/Disabilita le finestre CodeLens per le implementazioni. Richiede una versione di TypeScript uguale o successiva alla 2.2.0.", "typescript.openTsServerLog.title": "Apri file di log del server TypeScript", "typescript.selectTypeScriptVersion.title": "Seleziona la versione di TypeScript", - "jsDocCompletion.enabled": "Abilita/Disabilita commenti automatici JSDoc" + "jsDocCompletion.enabled": "Abilita/Disabilita commenti automatici JSDoc", + "javascript.implicitProjectConfig.checkJs": "Abilita/disabilita il controllo semantico di file JavaScript. File jsconfig.json o tsconfig.json esistenti sovrascrivono su questa impostazione. Richiede TypeScript >= 2.3.1.", + "typescript.check.npmIsInstalled": "Controllare se NPM è installato per l'acquisizione automatica delle definizioni di tipi" } \ No newline at end of file diff --git a/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index cf5a97543013e..0ccb13bf8a736 100644 --- a/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -7,7 +7,7 @@ "imgMeta": "{0}x{1} {2}", "largeImageError": "L'immagine è troppo grande per essere visualizzata nell'editor", "resourceOpenExternalButton": "Apri immagine", - "resourceOpenExternalText": "utilizzando un programma esterno?", + "resourceOpenExternalText": " con il programma esterno?", "nativeBinaryError": "Il file non verrà visualizzato nell'editor perché è binario, è molto grande o usa una codifica testo non supportata.", "sizeB": "{0} B", "sizeKB": "{0} KB", diff --git a/i18n/ita/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/ita/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index 8b6ad71cd4e6d..cddb1e2e74212 100644 --- a/i18n/ita/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/ita/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "diffEditorInserted": "Colore di sfondo del testo che è stato inserito.", + "diffEditorRemoved": "Colore di sfondo del testo che è stato rimosso.", + "diffEditorInsertedOutline": "Colore del contorno del testo che è stato inserito.", + "diffEditorRemovedOutline": "Colore del contorno del testo che è stato rimosso." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/ita/src/vs/editor/common/services/bulkEdit.i18n.json index 3cdcf98c0a045..10ea73bb963c4 100644 --- a/i18n/ita/src/vs/editor/common/services/bulkEdit.i18n.json +++ b/i18n/ita/src/vs/editor/common/services/bulkEdit.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "conflict": "Nel frattempo questi file sono stati modificati: {0}" + "conflict": "Nel frattempo questi file sono stati modificati: {0}", + "summary.0": "Non sono state effettuate modifiche", + "summary.nm": "Effettuate {0} modifiche al testo in {1} file", + "summary.n0": "Effettuate {0} modifiche al testo in un file" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json b/i18n/ita/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json index 2fc34fe0c2219..2e610be7babb7 100644 --- a/i18n/ita/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "smartSelect.jumpBracket": "Vai alla parentesi quadra" + "smartSelect.jumpBracket": "Vai alla parentesi" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/ita/src/vs/editor/contrib/format/browser/formatActions.i18n.json index d1fd1741e7486..d8f04efb024f6 100644 --- a/i18n/ita/src/vs/editor/contrib/format/browser/formatActions.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "hint11": "Made 1 formatting edit on line {0}", - "hintn1": "Made {0} formatting edits on line {1}", - "hint1n": "Made 1 formatting edit between lines {0} and {1}", + "hint11": "È stata apportata 1 modifica di formattazione a riga {0}", + "hintn1": "Sono state apportate {0} modifiche di formattazione a riga {1}", + "hint1n": "È stata apportata 1 modifica di formattazione tra le righe {0} e {1}", "hintnn": "Made {0} formatting edits between lines {1} and {2}", - "formatDocument.label": "Format Document", - "formatSelection.label": "Format Selection" + "formatDocument.label": "Formatta documento", + "formatSelection.label": "Formatta selezione" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index aa37caf90b194..c826bb2090e51 100644 --- a/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "aria.result.0": "Non sono stati trovati risultati" + "aria.result.0": "Non sono stati trovati risultati", + "aria.result.1": "Trovato 1 simbolo in {0}", + "aria.result.n1": "Trovati {0} simboli in {1}", + "aria.result.nm": "Trovati {0} simboli in {1} file" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index 3177bb1eccfc6..b86cbe1b98206 100644 --- a/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -12,8 +12,8 @@ "noResults": "Nessun risultato", "peekView.alternateTitle": "Riferimenti", "peekViewTitleBackground": "Colore di sfondo dell'area del titolo della visualizzazione rapida.", - "peekViewTitle": "Colore del titolo della visualizzazione rapida.", - "peekViewTitleInfo": "Colore delle informazioni del titolo della visualizzazione rapida.", + "peekViewTitleForeground": "Colore del titolo della visualizzazione rapida.", + "peekViewTitleInfoForeground": "Colore delle informazioni del titolo della visualizzazione rapida.", "peekViewBorder": "Colore dei bordi e della freccia della visualizzazione rapida.", "peekViewResultsBackground": "Colore di sfondo dell'elenco risultati della visualizzazione rapida.", "peekViewResultsMatchForeground": "Primo piano per l'immissione di corrispondenze nell'elenco risultati della visualizzazione rapida.", diff --git a/i18n/ita/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/ita/src/vs/editor/contrib/rename/browser/rename.i18n.json index bdc39890b60e2..c1a735fcca6af 100644 --- a/i18n/ita/src/vs/editor/contrib/rename/browser/rename.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "no result": "Nessun risultato.", + "aria": "Correttamente rinominato '{0}' in '{1}'. Sommario: {2}", "rename.failed": "L'esecuzione dell'operazione di ridenominazione non è riuscita.", "rename.label": "Rinomina simbolo" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json index 53dc4fa9aeebe..a68bd5b22dfb5 100644 --- a/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "arai.alert.snippet": "L'accettazione di '{0}' ha inserito il seguente testo: {1}", "suggest.trigger.label": "Attiva suggerimento" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 0734b51363fbc..8bd52bf065207 100644 --- a/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "editorSuggestWidgetBackground": "Colore di sfondo del widget dei suggerimenti.", + "editorSuggestWidgetBorder": "Colore del bordo del widget dei suggerimenti.", "readMore": "Altre informazioni...{0}", "suggestionWithDetailsAriaLabel": "{0}, suggerimento, con dettagli", "suggestionAriaLabel": "{0}, suggerimento", diff --git a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json index 54402b87f21e2..1f6ffb780e6bf 100644 --- a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,12 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "Formato colore non valido. Usare #RRGGBB o #RRGGBBAA", "schema.colors": "Colori usati nell'area di lavoro.", "foreground": "Colore primo piano. Questo colore è utilizzato solo se non viene sovrascritto da un componente.", - "focusedElementOutline": "Colore generale del bordo/contorno per elementi con lo stato attivo. Questo colore viene usato solo se non è sostituito da quello di un componente.", - "highContrastBorder": "Colore del bordo di separazione dei componenti quando è abilitato un tema a contrasto elevato.", - "highContrastOutline": "Colore del contorno dei componenti attivi quando è abilitato un tema a contrasto elevato.", "inputBoxBackground": "Sfondo della casella di input.", "inputBoxForeground": "Primo piano della casella di input.", "inputBoxBorder": "Bordo della casella di input.", @@ -17,6 +13,8 @@ "dropdownBackground": "Sfondo dell'elenco a discesa.", "dropdownForeground": "Primo piano dell'elenco a discesa.", "dropdownBorder": "Bordo dell'elenco a discesa.", + "pickerGroupForeground": "Colore di selezione rapida per il raggruppamento delle etichette.", + "pickerGroupBorder": "Colore di selezione rapida per il raggruppamento dei bordi.", "editorBackground": "Colore di sfondo dell'editor.", "editorForeground": "Colore primo piano predefinito dell'editor.", "editorSelection": "Colore della selezione dell'editor.", @@ -27,6 +25,5 @@ "findRangeHighlight": "Colore dell'intervallo di ricerca.", "activeLinkForeground": "Colore dei collegamenti attivi.", "linkForeground": "Colore dei collegamenti.", - "editorWidgetBackground": "Colore di sfondo dei widget dell'editor, ad esempio Trova/Sostituisci.", - "editorWidgetShadow": "Colore ombreggiatura dei widget dell'editor, come Trova/Sostituisci." + "editorWidgetBackground": "Colore di sfondo dei widget dell'editor, ad esempio Trova/Sostituisci." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/ita/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..8905123ff84d9 --- /dev/null +++ b/i18n/ita/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "Non è stato registrato alcun elemento TreeExplorerNodeProvider con ID '{0}'.", + "treeExplorer.failedToProvideRootNode": "Con l'elemento TreeExplorerNodeProvider '{0}' non è stato possibile fornire il nodo radice." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/common/theme.i18n.json b/i18n/ita/src/vs/workbench/common/theme.i18n.json index 3c4916242c07b..b194775f97923 100644 --- a/i18n/ita/src/vs/workbench/common/theme.i18n.json +++ b/i18n/ita/src/vs/workbench/common/theme.i18n.json @@ -5,20 +5,17 @@ // Do not edit this file. It is machine generated. { "tabsContainerBackground": "Colore di sfondo del contenitore delle scehde. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "activeTabBackground": "Colore di sfondo delle schede attive. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "inactiveTabBackground": "Colore di sfondo delle schede inattive. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "activeTabActiveGroupForeground": "Colore di primo piano delle schede attive in un gruppo attivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "activeTabInactiveGroupForeground": "Colore di primo piano delle schede attive in un gruppo inattivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "inactiveTabActiveGroupForeground": "Colore di primo piano delle schede inattive in un gruppo attivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "inactiveTabInactiveGroupForeground": "Colore di primo piano delle schede inattiva in un gruppo inattivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", + "tabActiveBackground": "Colore di sfondo delle schede attive. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", + "tabInactiveBackground": "Colore di sfondo delle schede inattive. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "tabBorder": "Bordo per separare le schede l'una dall'altra. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "editorHeaderBackground": "Colore di sfondo dell'intestazione del titolo dell'editor quando non ci sono schede abilitate.", + "tabActiveEditorGroupActiveForeground": "Colore di primo piano delle schede attive in un gruppo attivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", + "tabActiveEditorGroupInactiveForeground": "Colore di primo piano delle schede attive in un gruppo inattivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", + "tabInactiveEditorGroupActiveForeground": "Colore di primo piano delle schede inattive in un gruppo attivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", + "tabInactiveEditorGroupInactiveForeground": "Colore di primo piano delle schede inattiva in un gruppo inattivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "editorGroupBorder": "Colore per separare più gruppi di editor l'uno dall'altro. I gruppi di editor sono i contenitori degli editor.", - "editorGroupBackground": "Colore di sfondo di un gruppo di editor. I gruppi di editor sono contenitori di editor.", "editorDragAndDropBackground": "Colore di sfondo durante lo spostamento degli editor.", - "editorSideBySideBorder": "Colore del bordo per separare i dettagli dal lato master negli editor fianco a fianco.", "panelBackground": "Colore di sfondo dei pannelli. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e del terminale integrato.", - "panelTopBorder": "Colore del bordo dei pannelli nella parte superiore di separazione dall'editor. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e del terminale integrato.", + "panelBorder": "Colore del bordo dei pannelli nella parte superiore di separazione dall'editor. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e del terminale integrato.", "panelActiveTitleForeground": "Colore del titolo del pannello attivo. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e quella del terminale integrato.", "panelInactiveTitleForeground": "Colore del titolo del pannello inattivo. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e quella del terminale integrato.", "panelActiveTitleBorder": "Colore del bordo del titolo del pannello attivo. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e del terminale integrato.", @@ -27,12 +24,11 @@ "statusBarNoFolderBackground": "Colore di sfondo della barra di stato quando non ci sono cartelle aperte. La barra di stato è visualizzata nella parte inferiore della finestra.", "statusBarItemActiveBackground": "Colore di sfondo degli elementi della barra di stato quando si fa clic. La barra di stato è visualizzata nella parte inferiore della finestra.", "statusBarItemHoverBackground": "Colore di sfondo degli elementi della barra di stato al passaggio del mouse. La barra di stato è visualizzata nella parte inferiore della finestra.", - "statusBarInfoItemBackground": "Colore di sfondo degli elementi di informazioni della barra di stato. La barra di stato è visualizzata nella parte inferiore della finestra.", - "statusBarInfoItemHoverBackground": "Colore di sfondo degli elementi di informazioni della barra di stato al passaggio del mouse. La barra di stato è visualizzata nella parte inferiore della finestra.", "activityBarBackground": "Colore di sfondo della barra attività. La barra attività viene visualizzata nella parte inferiore sinistra/destra e consente il passaggio tra diverse visualizzazioni della barra laterale", + "activityBarForeground": "Colore primo piano della barra attività (ad es. quello utilizzato per le icone). La barra attività viene mostrata all'estrema sinistra o destra e permette di alternare le visualizzazioni della barra laterale.", "activityBarDragAndDropBackground": "Colore feedback drag and drop degli elementi della barra attività. La barra attività viene visualizzata nella parte inferiore sinistra/destra e consente il passaggio tra diverse visualizzazioni della barra laterale", - "activityBadgeBackground": "Colore di sfondo della notifica attività utente visuale. La barra attività viene visualizzata nella parte inferiore sinistra/destra e consente il passaggio tra diverse visualizzazioni della barra laterale", - "activityBadgeForeground": "Colore primo piano della notifica attività utente visuale. La barra attività viene visualizzata nella parte inferiore sinistra/destra e consente il passaggio tra diverse visualizzazioni della barra laterale", + "activityBarBadgeBackground": "Colore di sfondo della notifica utente dell'attività. La barra attività viene visualizzata all'estrema sinistra o all'estrema destra e consente di spostarsi tra le visualizzazioni della barra laterale.", + "activityBarBadgeForeground": "Colore primo piano della notifica utente dell'attività. La barra attività viene visualizzata all'estrema sinistra o all'estrema destra e consente di spostarsi tra le visualizzazioni della barra laterale.", "sideBarBackground": "Colore di sfondo della barra laterale. La barra laterale è il contenitore per visualizzazioni come Explorer e ricerca.", "sideBarTitleForeground": "Colore primo piano del titolo della barra laterale. La barra laterale è il contenitore per visualizzazioni come Explorer e ricerca.", "titleBarActiveForeground": "Colore primo piano della barra del titolo quando la finestra è attiva. Si noti che questo colore è attualmente supportato solo su macOS.", diff --git a/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json index 3fbffa2daf14a..caac04b4d8e65 100644 --- a/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -20,6 +20,7 @@ "statusBarVisibility": "Controlla la visibilità della barra di stato nella parte inferiore del workbench.", "activityBarVisibility": "Controlla la visibilità della barra attività nel workbench.", "closeOnFileDelete": "Controlla se gli editor che visualizzano un file devono chiudersi automaticamente quando il file viene eliminato o rinominato da un altro processo. Se si disabilita questa opzione, in una simile circostanza l'editor verrà aperto e i file risulteranno modificati ma non salvati. Nota: se si elimina il file dall'interno dell'applicazione, l'editor verrà sempre chiuso e i file modificati ma non salvati non verranno mai chiusi allo scopo di salvaguardare i dati.", + "swipeToNavigate": "Scorrere orizzontalmente con tre dita per spostarsi tra i file aperti.", "workbenchConfigurationTitle": "Area di lavoro", "window.openFilesInNewWindow.on": "I file verranno aperti in una nuova finestra", "window.openFilesInNewWindow.off": "I file verranno aperti nella finestra con la cartella dei file aperta o nell'ultima finestra attiva", diff --git a/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..8b6ad71cd4e6d 100644 --- a/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/common/debugModel.i18n.json index 2d0fb0063b3b2..f50b19ba962e5 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "Origine sconosciuta", "notAvailable": "non disponibile", - "startDebugFirst": "Per eseguire la valutazione, avviare una sessione di debug", - "unknownStack": "Posizione dello stack sconosciuta" + "startDebugFirst": "Per eseguire la valutazione, avviare una sessione di debug" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..506b3e40c55af --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "Origine sconosciuta" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 5139e3b6469ae..0a33d9bea9907 100644 --- a/i18n/ita/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "Aggiunge come contributo il viewlet Tree Explorer personalizzato alla barra laterale", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "ID univoco usato per identificare il provider registrato tramite vscode.workspace.registerTreeExplorerNodeProvider", - "vscode.extension.contributes.explorer.treeLabel": "Stringa leggibile usata per il rendering dell'istanza personalizzata di Tree Explorer", - "vscode.extension.contributes.explorer.icon": "Percorso dell'icona del viewlet sulla barra attività", "showViewlet": "Mostra {0}", "view": "Visualizza" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 991ee8c1264bb..670ffa4c4ac24 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -6,6 +6,5 @@ { "defineKeybinding.start": "Definisci tasto di scelta rapida", "defineKeybinding.kbLayoutInfoMessage": "Per il layout di tastiera corrente premere ", - "defineKeybinding.kbLayoutErrorMessage": "Non sarà possibile produrre questa combinazione di tasti con il layout di tastiera corrente.", - "DefineKeybindingAction": "Definisci tasto di scelta rapida" + "defineKeybinding.kbLayoutErrorMessage": "Non sarà possibile produrre questa combinazione di tasti con il layout di tastiera corrente." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json index 1ed48f98d5802..e4b5fdeb3bb26 100644 --- a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.integrated.allowWorkspaceShell": "Consentire l'esecuzione di {0} (definito come impostazione dell'area di lavoro) nel terminale?", "allow": "Allow", "disallow": "Disallow" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 5bffe6bee4014..f598673f2ce06 100644 --- a/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,5 +14,6 @@ "noIconThemeDesc": "Disabilita le icone dei file", "problemChangingIconTheme": "Problema durante l'impostazione del tema dell'icona: {0}", "themes.selectIconTheme": "Seleziona il tema dell'icona file", - "preferences": "Preferenze" + "preferences": "Preferenze", + "developer": "Sviluppatore" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/ita/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 3214ab31d60ea..25b7b98a369e5 100644 --- a/i18n/ita/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/ita/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "Problemi durante l'analisi del file di tema di JSON: {0}", - "error.invalidformat": "Si è verificato un problema durante l'analisi del file di tema di JSON: {0}. Sono previsti 'tokenColors' e 'colors'.", - "error.plist.invalidformat": "Problema durante l'analisi del file di tema: {0}. 'settings' non corrisponde a una matrice.", - "error.cannotparse": "Problemi durante l'analisi del file di tema: {0}", - "error.cannotload": "Si sono verificati problemi durante il caricamento del file di tema {0}: {1}" + "error.cannotparsejson": "Problemi durante l'analisi del file di tema di JSON: {0}" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/ita/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 31d2d4731d5a7..13457b15bc1e3 100644 --- a/i18n/ita/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,6 +25,5 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "Sostituisce i colori del tema colori attualmente selezionato. Questa impostazione è sperimentale perché i nomi dei colori verranno cambiati nella prossima versione." + "iconThemeError": "File icon theme is unknown or not installed." } \ No newline at end of file diff --git a/i18n/jpn/extensions/git/out/commands.i18n.json b/i18n/jpn/extensions/git/out/commands.i18n.json index bcbbb2f07dff7..9ff7d6a1f7c65 100644 --- a/i18n/jpn/extensions/git/out/commands.i18n.json +++ b/i18n/jpn/extensions/git/out/commands.i18n.json @@ -16,7 +16,6 @@ "confirm discard": "{0} の変更を破棄しますか?", "confirm discard multiple": "{0} 個のファイルの変更内容を破棄しますか?", "discard": "変更を破棄", - "confirm discard all": "すべての変更を破棄しますか? 変更は戻りません!", "no changes": "コミットする必要のある変更はありません。", "commit message": "コミット メッセージ", "provide commit message": "コミット メッセージを入力してください", diff --git a/i18n/jpn/extensions/git/out/model.i18n.json b/i18n/jpn/extensions/git/out/model.i18n.json index ad244859747e5..87fddca568846 100644 --- a/i18n/jpn/extensions/git/out/model.i18n.json +++ b/i18n/jpn/extensions/git/out/model.i18n.json @@ -9,5 +9,6 @@ "staged changes": "ステージング済みの変更", "changes": "変更", "ok": "OK", - "neveragain": "今後は表示しない" + "neveragain": "今後は表示しない", + "huge": "'{0}' のGit リポジトリにアクティブな変更が多いため、 Git 機能の一部のみが有効になります。" } \ No newline at end of file diff --git a/i18n/jpn/extensions/git/package.i18n.json b/i18n/jpn/extensions/git/package.i18n.json index 60aa93df42464..86293d87d2b55 100644 --- a/i18n/jpn/extensions/git/package.i18n.json +++ b/i18n/jpn/extensions/git/package.i18n.json @@ -39,8 +39,6 @@ "config.autofetch": "自動フェッチが有効かどうか", "config.enableLongCommitWarning": "長いコミット メッセージについて警告するかどうか", "config.confirmSync": "Git リポジトリを同期する前に確認する", - "config.countBadge": "Git バッジ カウンターを制御する", - "config.checkoutType": "一覧表示するブランチの種類を制御する", "config.ignoreLegacyWarning": "旧 Git の警告を無視します", "config.ignoreLimitWarning": "リポジトリ内に変更が多い場合は警告を無視します" } \ No newline at end of file diff --git a/i18n/jpn/extensions/grunt/out/main.i18n.json b/i18n/jpn/extensions/grunt/out/main.i18n.json index 8b6ad71cd4e6d..32ff080491f87 100644 --- a/i18n/jpn/extensions/grunt/out/main.i18n.json +++ b/i18n/jpn/extensions/grunt/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Grunt の自動検出が次のエラーで失敗しました: {0}" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/grunt/package.i18n.json b/i18n/jpn/extensions/grunt/package.i18n.json index 8b6ad71cd4e6d..ccfe3f9e22797 100644 --- a/i18n/jpn/extensions/grunt/package.i18n.json +++ b/i18n/jpn/extensions/grunt/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.grunt.autoDetect": "Grunt タスクの自動検出をオンにするかオフにするかを制御します。既定はオンです。" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/jpn/extensions/typescript/out/typescriptServiceClient.i18n.json index a0cf9808433c1..fd5967f381b4f 100644 --- a/i18n/jpn/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/jpn/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,9 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "再起動", - "restartTypeScriptServerBlurb": "変更を適用するために、TypeScript サーバーを再起動します", - "later": "後続", "channelName": "TypeScript", "noServerFound": "パス {0} は、有効な tsserver インストールを指していません。バンドルされている TypeScript バージョンにフォールバックしています。", "noBundledServerFound": "適切に動作しないウイルス検出ツールなどの他のアプリケーションにより、VSCode の tsserver は削除されました。VS Code を再インストールしてください。", diff --git a/i18n/jpn/extensions/typescript/package.i18n.json b/i18n/jpn/extensions/typescript/package.i18n.json index 2f2017c88b372..35c289eb3d5f1 100644 --- a/i18n/jpn/extensions/typescript/package.i18n.json +++ b/i18n/jpn/extensions/typescript/package.i18n.json @@ -25,6 +25,7 @@ "format.insertSpaceBeforeFunctionParenthesis": "関数の引数のかっこの前にあるスペース処理を定義します。TypeScript が 2.1.5. 以上である必要があります。", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "左右の空でないかっこの間のスペース処理を定義します。", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "左右の空でない角かっこの間のスペース処理を定義します。", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "左右の空でないかっこの間のスペース処理を定義します。TypeScript が 2.3.0 以上である必要があります。", "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "テンプレート文字列の始め波かっこの後と終わり波かっこの前のスペース処理を定義します。TypeScript が 2.0.6 以上である必要があります。", "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "JSX 式の始め波かっこの後と終わり波かっこの前のスペース処理を定義します。TypeScript が 2.0.6 以上である必要があります。", "format.placeOpenBraceOnNewLineForFunctions": "新しい行に関数の始め波かっこを配置するかどうかを定義します。", @@ -36,5 +37,7 @@ "typescript.implementationsCodeLens.enabled": "CodeLens の実装を有効/無効にします。TypeScript 2.2.0 以上が必要です。", "typescript.openTsServerLog.title": "TS サーバーのログ ファイルを開く", "typescript.selectTypeScriptVersion.title": "TypeScript のバージョンの選択", - "jsDocCompletion.enabled": " 自動 JSDoc コメントを有効/無効にします" + "jsDocCompletion.enabled": " 自動 JSDoc コメントを有効/無効にします", + "javascript.implicitProjectConfig.checkJs": "JavaScript ファイルのセマンティック チェックを有効/無効にします。既存の jsconfi.json や tsconfi.json ファイルの設定はこれより優先されます。 TypeScript は 2.3.1 以上である必要があります。", + "typescript.check.npmIsInstalled": "型定義の自動取得に NPM がインストールされているかどうかを確認する" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/jpn/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index 8b6ad71cd4e6d..a2fb9aab717a5 100644 --- a/i18n/jpn/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/jpn/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "diffEditorInserted": "挿入されたテキストの背景色。", + "diffEditorRemoved": "削除されたテキストの背景色。", + "diffEditorInsertedOutline": "挿入されたテキストの輪郭の色。", + "diffEditorRemovedOutline": "削除されたテキストの輪郭の色。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/jpn/src/vs/editor/common/services/bulkEdit.i18n.json index cc203857d2ae4..4c84c291c572b 100644 --- a/i18n/jpn/src/vs/editor/common/services/bulkEdit.i18n.json +++ b/i18n/jpn/src/vs/editor/common/services/bulkEdit.i18n.json @@ -6,5 +6,6 @@ { "conflict": "この間に次のファイルが変更されました: {0}", "summary.0": "編集は行われませんでした", + "summary.nm": "{1} 個のファイルで {0} 件のテキスト編集を実行", "summary.n0": "1 つのファイルで {0} 個のテキストを編集" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index bbd5849c3280b..33c314603a183 100644 --- a/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "aria.result.0": "一致する項目はありません" + "aria.result.0": "一致する項目はありません", + "aria.result.1": "{0} に 1 個のシンボルが見つかりました", + "aria.result.n1": "{1} に {0} 個のシンボルが見つかりました", + "aria.result.nm": "{1} 個のファイルに {0} 個のシンボルが見つかりました" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index f8423f1578979..f96e5015ff15e 100644 --- a/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -12,8 +12,8 @@ "noResults": "結果がありません", "peekView.alternateTitle": "参照", "peekViewTitleBackground": "ピーク ビューのタイトル領域の背景色。", - "peekViewTitle": "ピーク ビュー タイトルの色。", - "peekViewTitleInfo": "ピーク ビューのタイトル情報の色。", + "peekViewTitleForeground": "ピーク ビュー タイトルの色。", + "peekViewTitleInfoForeground": "ピーク ビューのタイトル情報の色。", "peekViewBorder": "ピーク ビューの境界と矢印の色。", "peekViewResultsBackground": "ピーク ビュー結果リストの背景色。", "peekViewResultsMatchForeground": "ピーク ビュー結果リストの一致したエントリの前景色。", diff --git a/i18n/jpn/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/jpn/src/vs/editor/contrib/rename/browser/rename.i18n.json index ed8c58a40b49d..65225095897b6 100644 --- a/i18n/jpn/src/vs/editor/contrib/rename/browser/rename.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "no result": "結果がありません。", + "aria": "'{0}' から '{1}' への名前変更が正常に完了しました。概要: {2}", "rename.failed": "申し訳ありません。名前の変更を実行できませんでした。", "rename.label": "シンボルの名前を変更" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json index 7042c13c94b8c..1c7707699b8b4 100644 --- a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "arai.alert.snippet": "'{0}' が次のテキストを挿入したことを承認しています: {1}", "suggest.trigger.label": "候補をトリガー" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index c7b3adcfa1ecb..b1177964ccfdc 100644 --- a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "editorSuggestWidgetBackground": "候補のウィジェットの背景色。", + "editorSuggestWidgetBorder": "候補ウィジェットの境界線色。", "readMore": "詳細を表示...{0}", "suggestionWithDetailsAriaLabel": "{0}、候補、詳細あり", "suggestionAriaLabel": "{0}、候補", diff --git a/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json index a9185ba12c4db..b656a78c799de 100644 --- a/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -25,6 +25,9 @@ "ProblemPatternExtPoint": "問題パターンを提供", "ProblemPatternRegistry.error": "無効な問題パターンです。パターンは無視されます。", "ProblemMatcherParser.noProblemMatcher": "エラー: 説明を問題マッチャーに変換することができません:\n{0}\n", + "ProblemMatcherParser.noProblemPattern": "エラー: 説明に有効な問題パターンが定義されていません:\n{0}\n", + "ProblemMatcherParser.noOwner": "エラー: 説明に所有者が定義されていません:\n{0}\n", + "ProblemMatcherParser.noFileLocation": "エラー: 説明にファイルの場所が定義されていません:\n{0}\n", "ProblemMatcherParser.unknownSeverity": "情報: 不明な重大度 {0}。有効な値は、error、warning、info です。\n", "ProblemMatcherParser.noDefinedPatter": "エラー: 識別子 {0} のパターンは存在しません。", "ProblemMatcherParser.noIdentifier": "エラー: パターン プロパティが空の識別子を参照しています。", diff --git a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json index 9a6df198aca14..a657f353140f8 100644 --- a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,12 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "無効な色形式です。#RRGGBB または #RRGGBBAA を使用してください", "schema.colors": "ワークベンチで使用する色。", "foreground": "全体の前景色。この色は、コンポーネントによってオーバーライドされていない場合にのみ使用されます。", - "focusedElementOutline": "フォーカスされた要素の輪郭全体の色。この色は、コンポーネントによってオーバーライドされていない場合にのみ使用されます。", - "highContrastBorder": "ハイ コントラスト テーマが有効になっている場合にコンポーネントを見分けるための境界線の色。", - "highContrastOutline": "ハイ コントラスト テーマが有効になっている場合のアクティブなコンポーネントの輪郭の色。", "inputBoxBackground": "入力ボックスの背景。", "inputBoxForeground": "入力ボックスの前景。", "inputBoxBorder": "入力ボックスの境界線。", @@ -17,6 +13,8 @@ "dropdownBackground": "ドロップダウンの背景。", "dropdownForeground": "ドロップダウンの前景。", "dropdownBorder": "ドロップダウンの境界線。", + "pickerGroupForeground": "ラベルをグループ化するためのクリック選択の色。", + "pickerGroupBorder": "境界線をグループ化するためのクイック選択の色。", "editorBackground": "エディターの背景色。", "editorForeground": "エディターの既定の前景色。", "editorSelection": "エディターの選択範囲の色。", @@ -26,5 +24,6 @@ "findMatchHighlight": "他の検索一致項目の色。", "findRangeHighlight": "検索を制限する範囲の色。", "activeLinkForeground": "アクティブなリンクの色。", - "linkForeground": "リンクの色。" + "linkForeground": "リンクの色。", + "editorWidgetBackground": "検索/置換窓など、エディター ウィジェットの背景色。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/jpn/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..6447043d7ee61 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "ID '{0}' の TreeExplorerNodeProvider は登録されていません。", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider '{0}' がルート ノードの指定に失敗しました。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/common/theme.i18n.json b/i18n/jpn/src/vs/workbench/common/theme.i18n.json index 83fe2efbc15b9..a7d6ea6e58cf2 100644 --- a/i18n/jpn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/jpn/src/vs/workbench/common/theme.i18n.json @@ -5,20 +5,17 @@ // Do not edit this file. It is machine generated. { "tabsContainerBackground": "タブ コンテナーの背景色。タブはエディター領域内にあるエディターのコンテナーです。複数のタブを 1 つのエディター グループで開くことができます。複数のエディター グループがある可能性があります。", - "activeTabBackground": "アクティブ タブの背景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", - "inactiveTabBackground": "非アクティブ タブの背景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", - "activeTabActiveGroupForeground": "アクティブ グループ内のアクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", - "activeTabInactiveGroupForeground": "非アクティブ グループ内のアクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", - "inactiveTabActiveGroupForeground": "アクティブ グループ内の非アクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", - "inactiveTabInactiveGroupForeground": "非アクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", + "tabActiveBackground": "アクティブ タブの背景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", + "tabInactiveBackground": "非アクティブ タブの背景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", "tabBorder": "タブ同士を分けるための境界線。タブはエディター領域内にあるエディターのコンテナーです。複数のタブを 1 つのエディター グループで開くことができます。複数のエディター グループがある可能性があります。", - "editorHeaderBackground": "有効なタブが存在しない場合のエディター タイトル ヘッダーの背景色。", + "tabActiveEditorGroupActiveForeground": "アクティブ グループ内のアクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", + "tabActiveEditorGroupInactiveForeground": "非アクティブ グループ内のアクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", + "tabInactiveEditorGroupActiveForeground": "アクティブ グループ内の非アクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", + "tabInactiveEditorGroupInactiveForeground": "非アクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", "editorGroupBorder": "複数のエディター グループを互いに分離するための色。エディター グループはエディターのコンテナーです。", - "editorGroupBackground": "エディター グループの背景色。エディター グループはエディターのコンテナーです。", "editorDragAndDropBackground": "エディターのドラッグ時の背景色。", - "editorSideBySideBorder": "エディターを横並びに表示している場合に、詳細をマスター側から分けて表示するための境界線の色。", "panelBackground": "パネルの背景色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", - "panelTopBorder": "エディターとの区切りを示すパネル上部の罫線の色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", + "panelBorder": "エディターとの区切りを示すパネル上部の罫線の色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelActiveTitleForeground": "アクティブ パネルのタイトルの色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelInactiveTitleForeground": "非アクティブ パネルのタイトルの色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelActiveTitleBorder": "アクティブ パネル タイトルの境界線の色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", @@ -27,12 +24,11 @@ "statusBarNoFolderBackground": "フォルダーが開いていないときのステータス バーの背景色。ステータス バーはウィンドウの下部に表示されます。", "statusBarItemActiveBackground": "クリック時のステータス バーの項目の背景色。ステータス バーはウィンドウの下部に表示されます。", "statusBarItemHoverBackground": "ホバーしたときのステータス バーの項目の背景色。ステータス バーはウィンドウの下部に表示されます。", - "statusBarInfoItemBackground": "ステータス バーの情報項目の背景色。ステータス バーはウィンドウの下部に表示されます。", - "statusBarInfoItemHoverBackground": "ホバーしたときのステータス バーの情報項目の背景色。ステータス バーはウィンドウの下部に表示されます。", "activityBarBackground": "アクティビティ バーの背景色。アクティビティ バーは左端または右端に表示され、サイド バーのビューを切り替えることができます。", + "activityBarForeground": "アクティビティ バーの前景色 (例: アイコンの色)。アクティビティ バーは左端または右端に表示され、サイド バーのビューを切り替えることができます。", "activityBarDragAndDropBackground": "アクティビティ バーの項目のドラッグ アンド ドロップ フィードバックの色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", - "activityBadgeBackground": "アクティビティ通知バッジの背景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", - "activityBadgeForeground": "アクティビティ通知バッジの前景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", + "activityBarBadgeBackground": "アクティビティ通知バッジの背景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", + "activityBarBadgeForeground": "アクティビティ通知バッジの前景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", "sideBarBackground": "サイド バーの背景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", "sideBarTitleForeground": "サイド バーのタイトルの前景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", "titleBarActiveForeground": "ウィンドウがアクティブな場合のタイトル バーの前景。現在、この色は macOS でのみサポートされているのでご注意ください。", diff --git a/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json index 6e280627aa378..5912f182d8294 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -20,6 +20,7 @@ "statusBarVisibility": "ワークベンチの下部にステータス バーを表示するかどうかを制御します。", "activityBarVisibility": "ワークベンチでのアクティビティ バーの表示をコントロールします。", "closeOnFileDelete": "ファイルを表示しているエディターを、ファイルが削除されるかその他のプロセスによって名前を変更された場合に、自動的に閉じるかどうかを制御します。これを無効にすると、このような場合にエディターはダーティで開かれたままになります。アプリケーション内で削除すると、必ずエディターは閉じられ、ダーティ ファイルは閉じられることがなく、データは保存されませんのでご注意ください。", + "swipeToNavigate": "3 本の指で横方向にスワイプすると、開いているファイル間を移動できます。", "workbenchConfigurationTitle": "ワークベンチ", "window.openFilesInNewWindow.on": "新しいウィンドウでファイルを開きます", "window.openFilesInNewWindow.off": "ファイルのフォルダーが開かれていたウィンドウまたは最後のアクティブ ウィンドウでファイルを開きます", @@ -48,6 +49,7 @@ "menuBarVisibility": "メニュー バーの表示/非表示を制御します。'切り替え' 設定は Alt キーを 1 回押すとメニュー バーの表示/非表示が切り替わることを意味します。既定では、ウィンドウが全画面表示の場合を除き、メニュー バーは表示されます。", "autoDetectHighContrast": "有効にすると、Windows でハイ コントラスト テーマが使用されている場合にはハイ コントラスト テーマに自動的に変更され、Windows のハイ コントラスト テーマから切り替えられている場合にはダーク テーマに自動的に変更されます。", "titleBarStyle": "ウィンドウのタイトル バーの外観を調整します。変更を適用するには、完全に再起動する必要があります。", + "window.nativeTabs": "macOS Sierra ウィンドウ タブを有効にします。この変更を適用するには完全な再起動が必要であり、ネイティブ タブでカスタムのタイトル バー スタイルが構成されていた場合はそれが無効になることに注意してください。", "windowConfigurationTitle": "ウィンドウ", "zenModeConfigurationTitle": "Zen Mode", "zenMode.fullScreen": "Zen Mode をオンにするとワークベンチを自動的に全画面モードに切り替えるかどうかを制御します。", diff --git a/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..8b6ad71cd4e6d 100644 --- a/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/common/debugModel.i18n.json index 682210ed726b6..f20d079084082 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "不明なソース", "notAvailable": "使用できません", - "startDebugFirst": "デバッグ セッションを開始して評価してください", - "unknownStack": "スタックの場所が不明です" + "startDebugFirst": "デバッグ セッションを開始して評価してください" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..72b04323d00d8 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "不明なソース" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index 3ea9762c5e759..4b7df0a6d3ce8 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -15,5 +15,6 @@ "allowBreakpointsEverywhere": "任意のファイルにブレークポイントを設定できるようにする", "openExplorerOnEnd": "デバッグ セッションの終わりにエクスプローラ ビューを自動的に開きます", "inlineValues": "デバッグ中にエディターの行内に変数値を表示します", - "hideActionBar": "浮動デバッグ操作バーを非表示にするかどうかを制御します" + "hideActionBar": "浮動デバッグ操作バーを非表示にするかどうかを制御します", + "launch": "グローバル デバッグ起動構成。ワークスペース間で共有される 'launch.json' の代わりとして使用する必要があります" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index ceb1408af9fa9..9192a65143bf9 100644 --- a/i18n/jpn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "カスタム Tree Explorer Viewlet をサイドバーに追加します", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "vscode.workspace.registerTreeExplorerNodeProvider を介して登録したプロバイダーを識別するための一意の ID", - "vscode.extension.contributes.explorer.treeLabel": "カスタム Tree Explorer の表示に使用される、人が判別できる文字列", - "vscode.extension.contributes.explorer.icon": "アクティビティ バーの Viewlet アイコンへのパス", "showViewlet": "{0} を表示", "view": "表示" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index cd8d804c21890..0e425d5535760 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "reallyRecommended2": "このファイルの種類には '{0}' 拡張子が推奨されています。", "showRecommendations": "推奨事項を表示", "neverShowAgain": "今後は表示しない", "close": "閉じる", diff --git a/i18n/jpn/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json index aedf7ed94edc9..c47a75120d044 100644 --- a/i18n/jpn/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json @@ -11,5 +11,6 @@ "genericSaveError": "'{0}' の保存に失敗しました: {1}", "staleSaveError": "'{0} の保存に失敗しました。ディスクの内容の方が新しくなっています。[比較] をクリックしてご使用のバージョンをディスク上のバージョンと比較してください。", "compareChanges": "比較", + "saveConflictDiffLabel": "{0} (ディスク上) ↔ {1} ({2} 内) - 保存の競合を解決", "userGuide": "エディター ツール バーの操作で、変更を [元に戻す] か、ディスクの内容を変更内容で [上書き] します" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index a98cebe13010e..9b0f4ce7178aa 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -7,6 +7,7 @@ "keybindingsInputName": "キーボード ショートカット", "SearchKeybindings.AriaLabel": "キー バインドの検索", "SearchKeybindings.Placeholder": "キー バインドの検索", + "sortByPrecedene": "優先順位で並べ替え", "header-message": "高度なカスタマイズを行うには、次を開いて編集:", "keybindings-file-name": "keybindings.json", "keybindingsLabel": "キー バインド", @@ -14,6 +15,7 @@ "addLabel": "キー バインドの追加", "removeLabel": "キー バインドの削除", "resetLabel": "キー バインドのリセット", + "showConflictsLabel": "競合の表示", "copyLabel": "コピー", "error": "キー バインドの編集中にエラー '{0}' が発生しました。'keybindings.json' ファイルを開いてご確認ください。", "command": "コマンド", diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 2b92bd3cf1ce4..08cb632b3e777 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -6,6 +6,5 @@ { "defineKeybinding.start": "キー バインドの定義", "defineKeybinding.kbLayoutInfoMessage": "現在のキーボード レイアウト用に", - "defineKeybinding.kbLayoutErrorMessage": "現在のキーボード レイアウトでは、このキーの組み合わせを生成することはできません。", - "DefineKeybindingAction": "キー バインドの定義" + "defineKeybinding.kbLayoutErrorMessage": "現在のキーボード レイアウトでは、このキーの組み合わせを生成することはできません。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json index 12c9ae6255c15..b7f60e7335a2b 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -6,5 +6,6 @@ { "default": "既定", "user": "ユーザー", + "meta": "meta", "option": "オプション" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/search/browser/replaceService.i18n.json b/i18n/jpn/src/vs/workbench/parts/search/browser/replaceService.i18n.json index 8b6ad71cd4e6d..2cdb182c5eeef 100644 --- a/i18n/jpn/src/vs/workbench/parts/search/browser/replaceService.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/search/browser/replaceService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "fileReplaceChanges": "{0} ↔ {1} (置換のプレビュー)" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 7ed8a4fbeae15..66c1ae4f80a81 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -25,6 +25,7 @@ "TaskSystem.active": "既に実行中のタスクがあります。まずこのタスクを終了してから、別のタスクを実行してください。", "TaskSystem.restartFailed": "タスク {0} を終了して再開できませんでした", "TaskSystem.configurationErrors": "エラー: 指定したタスク構成に検証エラーがあり、使用できません。最初にエラーを修正してください。", + "TaskSystem.invalidTaskJson": "エラー: tasks.json ファイルの内容に構文エラーがあります。訂正してからタスクを実行してください。\n", "TaskSystem.runningTask": "実行中のタスクがあります。終了しますか?", "TaskSystem.terminateTask": "タスクの終了(&&T)", "TaskSystem.noProcess": "起動したタスクは既に存在しません。タスクを起動したバックグラウンド プロセスが VS コードで終了すると、プロセスが孤立することがあります。これを回避するには、待機フラグを設定して最後のバックグラウンド プロセスを開始します。", diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json index 1ed48f98d5802..981936fe8f6e0 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.integrated.allowWorkspaceShell": "{0} (ワークスペースの設定として定義されている) をターミナルで起動することを許可しますか?", "allow": "Allow", "disallow": "Disallow" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 7a13ff5d81d24..e2d25e3da153e 100644 --- a/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,5 +14,6 @@ "noIconThemeDesc": "ファイル アイコンを無効にする", "problemChangingIconTheme": "アイコン テーマの設定で問題が発生しました: {0}", "themes.selectIconTheme": "ファイル アイコンのテーマを選択します", - "preferences": "基本設定" + "preferences": "基本設定", + "developer": "Developer" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 16b428a254000..83a24dfd0e0b3 100644 --- a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "JSON テーマ ファイルの解析中に問題が発生しました: {0}", - "error.invalidformat": "JSON テーマ ファイルの解析中に問題が発生しました: {0}。'tokenColors' と 'colors' が必要です。", - "error.plist.invalidformat": "テーマ ファイルの解析中に問題が発生しました: {0}. 'settings' は配列ではありません。", - "error.cannotparse": "テーマ ファイルの解析中に問題が発生しました: {0}", - "error.cannotload": "テーマ ファイル {0} の読み込み中に問題が発生しました: {1}" + "error.cannotparsejson": "JSON テーマ ファイルの解析中に問題が発生しました: {0}" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index cd176bc589646..a22528984cb81 100644 --- a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,6 +25,5 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "現在選択されている色のテーマから一部の色が上書きされます。次のリリースで色の名前が変更されるため、この設定は試験的なものです。" + "iconThemeError": "File icon theme is unknown or not installed." } \ No newline at end of file diff --git a/i18n/kor/extensions/git/out/model.i18n.json b/i18n/kor/extensions/git/out/model.i18n.json index e46bcb77cc136..79de8a8d0b39d 100644 --- a/i18n/kor/extensions/git/out/model.i18n.json +++ b/i18n/kor/extensions/git/out/model.i18n.json @@ -8,5 +8,7 @@ "merge changes": "변경 내용 병합", "staged changes": "스테이징된 변경 내용", "changes": "변경 내용", - "ok": "확인" + "ok": "확인", + "neveragain": "다시 표시 안 함", + "huge": "'{0}'의 Git 리포지토리에 활성 변경 내용이 너무 많습니다. Git 기능의 하위 집합만 사용할 수 있도록 설정됩니다." } \ No newline at end of file diff --git a/i18n/kor/extensions/git/package.i18n.json b/i18n/kor/extensions/git/package.i18n.json index e2892cf9cb9be..0aeb4b6401412 100644 --- a/i18n/kor/extensions/git/package.i18n.json +++ b/i18n/kor/extensions/git/package.i18n.json @@ -39,6 +39,6 @@ "config.autofetch": "자동 가져오기 사용 여부", "config.enableLongCommitWarning": "긴 커밋 메시지에 대해 경고할지 여부입니다.", "config.confirmSync": "Git 리포지토리를 동기화하기 전에 확인합니다.", - "config.countBadge": "Git 배지 카운터를 제어합니다.", - "config.checkoutType": "나열되는 분기 유형을 제어합니다." + "config.ignoreLegacyWarning": "레거시 Git 경고를 무시합니다.", + "config.ignoreLimitWarning": "리포지토리에 변경 내용이 너무 많으면 경고를 무시합니다." } \ No newline at end of file diff --git a/i18n/kor/extensions/grunt/out/main.i18n.json b/i18n/kor/extensions/grunt/out/main.i18n.json index 8b6ad71cd4e6d..8456653bb0cb2 100644 --- a/i18n/kor/extensions/grunt/out/main.i18n.json +++ b/i18n/kor/extensions/grunt/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Grunt 자동 검색에 실패하고 [0} 오류가 발생했습니다." +} \ No newline at end of file diff --git a/i18n/kor/extensions/grunt/package.i18n.json b/i18n/kor/extensions/grunt/package.i18n.json index 8b6ad71cd4e6d..927b720ee74cb 100644 --- a/i18n/kor/extensions/grunt/package.i18n.json +++ b/i18n/kor/extensions/grunt/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.grunt.autoDetect": "Grunt 작업의 자동 검색을 사용할지 여부를 제어합니다. 기본값은 [켜기]입니다." +} \ No newline at end of file diff --git a/i18n/kor/extensions/gulp/out/main.i18n.json b/i18n/kor/extensions/gulp/out/main.i18n.json index 8b6ad71cd4e6d..e88e41a1fa9d1 100644 --- a/i18n/kor/extensions/gulp/out/main.i18n.json +++ b/i18n/kor/extensions/gulp/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Gulp 자동 검색에 실패하고 {0} 오류가 발생했습니다." +} \ No newline at end of file diff --git a/i18n/kor/extensions/markdown/package.i18n.json b/i18n/kor/extensions/markdown/package.i18n.json index 40cb44f8c60cc..60b7a9a3727f5 100644 --- a/i18n/kor/extensions/markdown/package.i18n.json +++ b/i18n/kor/extensions/markdown/package.i18n.json @@ -16,5 +16,7 @@ "markdown.previewSide.title": "측면에서 미리 보기 열기", "markdown.showSource.title": "소스 표시", "markdown.styles.dec": "markdown 미리 보기에서 사용할 CSS 스타일시트의 URL 또는 로컬 경로 목록입니다. 상대 경로는 탐색기에서 열린 폴더를 기준으로 해석됩니다. 열린 폴더가 없으면 markdown 파일의 위치를 기준으로 해석됩니다. 모든 '\\'는 '\\\\'로 써야 합니다.", - "markdown.showPreviewSecuritySelector.title": "Markdown 미리 보기 보안 설정 변경" + "markdown.showPreviewSecuritySelector.title": "Markdown 미리 보기 보안 설정 변경", + "markdown.preview.enableExperimentalExtensionApi.desc": "[실험적] Markdown 미리 보기를 확장하는 확장을 허용합니다.", + "markdown.trace.desc": "Markdown 확장에 대해 디버그 로깅을 사용하도록 설정합니다." } \ No newline at end of file diff --git a/i18n/kor/extensions/php/package.i18n.json b/i18n/kor/extensions/php/package.i18n.json index 43315a6c2a96c..6bf56e30128c4 100644 --- a/i18n/kor/extensions/php/package.i18n.json +++ b/i18n/kor/extensions/php/package.i18n.json @@ -9,5 +9,6 @@ "configuration.validate.executablePath": "PHP 실행 파일을 가리킵니다.", "configuration.validate.run": "저장 시 또는 입력 시 Linter의 실행 여부입니다.", "configuration.title": "PHP", - "commands.categroy.php": "PHP" + "commands.categroy.php": "PHP", + "command.untrustValidationExecutable": "PHP 유효성 검사 실행 파일을 허용하지 않음(작업\n 영역 설정으로 정의됨)" } \ No newline at end of file diff --git a/i18n/kor/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/kor/extensions/typescript/out/typescriptServiceClient.i18n.json index eab7821856ad7..5ce4069a9b5de 100644 --- a/i18n/kor/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/kor/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "다시 시작", - "later": "나중에", "channelName": "TypeScript", "noServerFound": "경로 {0}이(가) 올바른 tsserver 설치를 가리키지 않습니다. 포함된 TypeScript 버전을 대신 사용합니다.", "noBundledServerFound": "잘못 동작하는 바이러스 감지 도구와 같은 다른 응용 프로그램에서 VSCode의 tsserver가 삭제되었습니다. VS Code를 다시 설치하세요.", @@ -17,6 +15,8 @@ "learnMore": "자세한 정보", "selectTsVersion": "JavaScript 및 TypeScript 언어 기능에 사용되는 TypeScript 버전 선택", "typescript.openTsServerLog.notSupported": "TS 서버 로깅을 사용하려면 TS 2.2.2 이상이 필요합니다.", + "typescript.openTsServerLog.loggingNotEnabled": "TS 서버 로깅이 꺼져 있습니다. `typescript.tsserver.log`를 설정하고 TS 서버를 다시 시작하여 로깅을 사용하도록 설정하세요.", + "typescript.openTsServerLog.enableAndReloadOption": "로깅 사용 및 TS 서버 다시 시작", "typescript.openTsServerLog.noLogFile": "TS 서버에서 로깅을 시작하지 않았습니다.", "openTsServerLog.openFileFailedFailed": "TS 서버 로그 파일을 열 수 없습니다.", "serverDiedAfterStart": "TypeScript 언어 서비스가 시작된 직후 5번 종료되었습니다. 서비스가 다시 시작되지 않습니다.", diff --git a/i18n/kor/extensions/typescript/package.i18n.json b/i18n/kor/extensions/typescript/package.i18n.json index e2add9ff83c0a..032e92f8c4d0d 100644 --- a/i18n/kor/extensions/typescript/package.i18n.json +++ b/i18n/kor/extensions/typescript/package.i18n.json @@ -11,6 +11,8 @@ "typescript.tsdk.desc": "사용할 tsserver 및 lib*.d.ts 파일이 들어 있는 폴더 경로를 지정합니다.", "typescript.disableAutomaticTypeAcquisition": "자동 형식 인식을 사용하지 않습니다. TypeScript >= 2.0.6이 필요하며 변경 후 다시 시작해야 합니다.", "typescript.check.tscVersion": "전역 설치 TypeScript 컴파일러(예: tsc)가 사용된 TypeScript 언어 서비스와 다른지 확인하세요.", + "typescript.tsserver.log": "파일에 대해 TS 서버 로깅을 사용하도록 설정합니다. 이 로그는 TS 서버 문제를 진단하는 데 사용될 수 있습니다. 로그에는 파일 경로, 소스 코드 및 프로젝트에서 잠재적으로 중요한 기타 정보가 포함될 수 있습니다.", + "typescript.tsserver.trace": "TS 서버로 전송한 메시지 추적을 사용하도록 설정합니다. 이\n 추적은 TS 서버 문제를 진단하는 데 사용될 수 있습니다. 추적에는 파일 경로, 소스 코드 및 프로젝트에서 잠재적으로 중요한\n 기타 정보가 포함될 수 있습니다.", "typescript.tsserver.experimentalAutoBuild": "실험적 자동 빌드를 사용하도록 설정합니다. 1.9 dev 또는 2.x tsserver 버전이 필요하며 변경 후에는 VS Code를 다시 시작해야 합니다.", "typescript.validate.enable": "TypeScript 유효성 검사를 사용하거나 사용하지 않습니다.", "typescript.format.enable": "기본 TypeScript 포맷터를 사용하거나 사용하지 않습니다.", @@ -23,6 +25,7 @@ "format.insertSpaceBeforeFunctionParenthesis": "함수 인수 괄호 앞에 오는 공백 처리를 정의합니다. TypeScript 2.1.5 이상이 필요합니다.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "비어 있지 않은 여는 괄호 뒤와 닫는 괄호 앞에 오는 공백 처리를 정의합니다.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "비어 있지 않은 여는 대괄호 뒤와 닫는 대괄호 앞에 오는 공백 처리를 정의합니다.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "비어 있지 않은 여는 중괄호 뒤와 닫는 중괄호 앞의 공백 처리를 정의합니다. TypeScript >= 2.3.0이 필요합니다.", "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "템플릿 문자열의 여는 중괄호 뒤와 닫는 중괄호 앞의 공백 처리를 정의합니다. TypeScript >= 2.0.6이 필요합니다.", "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "JSX 식의 여는 중괄호 뒤와 닫는 중괄호 앞의 공백 처리를 정의합니다. TypeScript >= 2.0.6이 필요합니다.", "format.placeOpenBraceOnNewLineForFunctions": "함수의 새 줄에 여는 중괄호를 넣을지 정의합니다.", @@ -33,5 +36,8 @@ "typescript.referencesCodeLens.enabled": "참조 CodeLens 사용하거나 사용하지 않도록 설정합니다. TypeScript >= 2.0.6이 필요합니다.", "typescript.implementationsCodeLens.enabled": "구현 CodeLens를 사용하거나 사용하지 않도록 설정합니다. TypeScript >= 2.2.0이 필요합니다.", "typescript.openTsServerLog.title": "TS 서버 로그 파일 열기", - "typescript.selectTypeScriptVersion.title": "TypeScript 버전 선택" + "typescript.selectTypeScriptVersion.title": "TypeScript 버전 선택", + "jsDocCompletion.enabled": "자동 JSDoc 주석 사용/사용 안 함", + "javascript.implicitProjectConfig.checkJs": "JavaScript 파일의 의미 체계 검사를 사용/사용하지 않습니다. 기존 jsconfig.json 또는 tsconfig.json 파일은 이 설정을 재정의합니다. TypeScript >=2.3.1이 필요합니다. ", + "typescript.check.npmIsInstalled": "자동 입력 인식에 대해 NPM이 설치되어 있는지 확인" } \ No newline at end of file diff --git a/i18n/kor/src/vs/code/electron-main/menus.i18n.json b/i18n/kor/src/vs/code/electron-main/menus.i18n.json index 5b7747bc602ac..76675a5647123 100644 --- a/i18n/kor/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/kor/src/vs/code/electron-main/menus.i18n.json @@ -6,7 +6,9 @@ { "mFile": "파일(&&F)", "mEdit": "편집(&&E)", + "mSelection": "선택 영역(&S)", "mView": "보기(&&V)", + "mGoto": "이동(&G)", "mDebug": "디버그(&&D)", "mWindow": "창", "mHelp": "도움말(&&H)", @@ -29,6 +31,8 @@ "miCloseWindow": "창 닫기(&&E)", "miCloseFolder": "폴더 닫기(&&F)", "miCloseEditor": "편집기 닫기(&&C)", + "miExit": "끝내기(&X)", + "miOpenSettings": "설정(&S)", "miOpenKeymap": "바로 가기 키(&&K)", "miOpenKeymapExtensions": "키맵 확장(&&K)", "miOpenSnippets": "사용자 코드 조각(&&S)", @@ -39,6 +43,7 @@ "miClearRecentOpen": "&&Clear Recent Files", "miUndo": "실행 취소(&&U)", "miRedo": "다시 실행(&&R)", + "miCut": "자르기(&T)", "miCopy": "복사(&&C)", "miPaste": "붙여넣기(&&P)", "miFind": "찾기(&&F)", diff --git a/i18n/kor/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/kor/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index 8b6ad71cd4e6d..84cb0a07a9707 100644 --- a/i18n/kor/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/kor/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "diffEditorInserted": "삽입된 텍스트의 배경색입니다.", + "diffEditorRemoved": "제거된 텍스트의 배경색입니다.", + "diffEditorInsertedOutline": "삽입된 텍스트의 윤곽선 색입니다.", + "diffEditorRemovedOutline": "제거된 텍스트의 윤곽선 색입니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/kor/src/vs/editor/common/services/bulkEdit.i18n.json index 2d03877793edc..e75053c8837c9 100644 --- a/i18n/kor/src/vs/editor/common/services/bulkEdit.i18n.json +++ b/i18n/kor/src/vs/editor/common/services/bulkEdit.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "conflict": "이러한 파일이 동시에 변경되었습니다. {0}" + "conflict": "이러한 파일이 동시에 변경되었습니다. {0}", + "summary.0": "편집하지 않음", + "summary.nm": "{1}개 파일에서 {0}개 텍스트 편집을 수행함", + "summary.n0": "1개 파일에서 {0}개 텍스트 편집을 수행함" } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.i18n.json b/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.i18n.json index 50c99b3be5d5c..6180413fbf30e 100644 --- a/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.i18n.json @@ -17,6 +17,7 @@ "actions.peekImplementation.label": "구현 미리 보기", "goToTypeDefinition.noResultWord": "'{0}'에 대한 형식 정의를 찾을 수 없습니다.", "goToTypeDefinition.generic.noResults": "형식 정의를 찾을 수 없습니다.", + "meta.typeDefinitions.title": "– {0} 형식 정의", "actions.goToTypeDefinition.label": "형식 정의로 이동", "actions.peekTypeDefinition.label": "형식 정의 미리 보기", "multipleResults": "{0}개 정의를 표시하려면 클릭하세요." diff --git a/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 19b0aa4d2c005..a6baba2d6b143 100644 --- a/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "aria.result.0": "결과 없음" + "aria.result.0": "결과 없음", + "aria.result.1": "{0}에서 기호 1개를 찾았습니다.", + "aria.result.n1": "{1}에서 기호 {0}개를 찾았습니다.", + "aria.result.nm": "{1}개 파일에서 기호 {0}개를 찾았습니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index bf4a925fa9808..502c4b44ac962 100644 --- a/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -12,8 +12,8 @@ "noResults": "결과 없음", "peekView.alternateTitle": "참조", "peekViewTitleBackground": "Peek 뷰 제목 영역의 배경색입니다.", - "peekViewTitle": "Peek 뷰 제목 색입니다.", - "peekViewTitleInfo": "Peek 뷰 제목 정보 색입니다.", + "peekViewTitleForeground": "Peek 뷰 제목 색입니다.", + "peekViewTitleInfoForeground": "Peek 뷰 제목 정보 색입니다.", "peekViewBorder": "Peek 뷰 테두리 및 화살표 색입니다.", "peekViewResultsBackground": "Peek 뷰 결과 목록의 배경색입니다.", "peekViewResultsMatchForeground": "Peek 뷰 결과 목록의 일치 항목 전경입니다.", diff --git a/i18n/kor/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/kor/src/vs/editor/contrib/rename/browser/rename.i18n.json index de17d2577844d..623526b74324f 100644 --- a/i18n/kor/src/vs/editor/contrib/rename/browser/rename.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "no result": "결과가 없습니다.", + "aria": "'{0}'을(를) '{1}'(으)로 이름을 변경했습니다. 요약: {2}", "rename.failed": "죄송합니다. 이름 바꾸기를 실행하지 못했습니다.", "rename.label": "기호 이름 바꾸기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json index a3ddfaa689737..c9232c0a95d13 100644 --- a/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "arai.alert.snippet": "'{0}'을(를) 적용하여 다음 텍스트가 삽입되었습니다.\n {1}", "suggest.trigger.label": "제안 항목 트리거" } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 1873d3575154f..569bfddeb5802 100644 --- a/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "editorSuggestWidgetBackground": "제안 위젯의 배경색입니다.", + "editorSuggestWidgetBorder": "제안 위젯의 테두리 색입니다.", "readMore": "자세히 알아보기...{0}", "suggestionWithDetailsAriaLabel": "{0}, 제안, 세부 정보 있음", "suggestionAriaLabel": "{0}, 제안", diff --git a/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json index e418155a93109..20e43b0f760f0 100644 --- a/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,12 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "잘못된 색 형식입니다. #RRGGBB 또는 #RRGGBBAA를 사용하세요.", "schema.colors": "워크벤치에서 사용되는 색입니다.", "foreground": "전체 전경색입니다. 이 색은 구성 요소에서 재정의하지 않은 경우에만 사용됩니다.", - "focusedElementOutline": "포커스가 있는 요소의 전체 윤곽/테두리 색입니다. 이 색은 구성 요소에서 재정의하지 않은 경우에만 사용됩니다.", - "highContrastBorder": "고대비 테마를 사용하도록 설정한 경우 별도 구성 요소의 테두리 색입니다.", - "highContrastOutline": "고대비 테마를 사용하도록 설정한 경우 활성 구성 요소의 윤곽 색입니다.", "inputBoxBackground": "입력 상자 배경입니다.", "inputBoxForeground": "입력 상자 전경입니다.", "inputBoxBorder": "입력 상자 테두리입니다.", @@ -17,6 +13,8 @@ "dropdownBackground": "드롭다운 배경입니다.", "dropdownForeground": "드롭다운 전경입니다.", "dropdownBorder": "드롭다운 테두리입니다.", + "pickerGroupForeground": "그룹화 레이블에 대한 빠른 선택기 색입니다.", + "pickerGroupBorder": "그룹화 테두리에 대한 빠른 선택기 색입니다.", "editorBackground": "편집기 배경색입니다.", "editorForeground": "편집기 기본 전경색입니다.", "editorSelection": "편집기 선택 영역의 색입니다.", @@ -26,5 +24,6 @@ "findMatchHighlight": "기타 검색 일치 항목의 색입니다.", "findRangeHighlight": "검색을 제한하는 영역의 색을 지정합니다.", "activeLinkForeground": "활성 링크의 색입니다.", - "linkForeground": "링크 색입니다." + "linkForeground": "링크 색입니다.", + "editorWidgetBackground": "찾기/바꾸기 같은 편집기 위젯의 배경색입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/kor/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..b5a9320355950 --- /dev/null +++ b/i18n/kor/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "ID가 '{0}'인 등록된 TreeExplorerNodeProvider가 없습니다.", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider '{0}'에서 루트 노드를 제공하지 못했습니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/common/theme.i18n.json b/i18n/kor/src/vs/workbench/common/theme.i18n.json index d3f3f890b2f8e..56bd399b45f3e 100644 --- a/i18n/kor/src/vs/workbench/common/theme.i18n.json +++ b/i18n/kor/src/vs/workbench/common/theme.i18n.json @@ -5,20 +5,17 @@ // Do not edit this file. It is machine generated. { "tabsContainerBackground": "탭 컨테이너의 배경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "activeTabBackground": "활성 탭 배경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "inactiveTabBackground": "비활성 탭 배경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "activeTabActiveGroupForeground": "활성 그룹의 활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "activeTabInactiveGroupForeground": "비활성 그룹의 활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "inactiveTabActiveGroupForeground": "활성 그룹의 비활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "inactiveTabInactiveGroupForeground": "비활성 그룹의 비활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", + "tabActiveBackground": "활성 탭 배경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", + "tabInactiveBackground": "비활성 탭 배경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", "tabBorder": "탭을 서로 구분하기 위한 테두리입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "editorHeaderBackground": "사용하도록 설정된 탭이 없는 경우 편집기 제목 머리글의 배경색입니다.", + "tabActiveEditorGroupActiveForeground": "활성 그룹의 활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", + "tabActiveEditorGroupInactiveForeground": "비활성 그룹의 활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", + "tabInactiveEditorGroupActiveForeground": "활성 그룹의 비활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", + "tabInactiveEditorGroupInactiveForeground": "비활성 그룹의 비활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", "editorGroupBorder": "여러 편집기 그룹을 서로 구분하기 위한 색입니다. 편집기 그룹은 편집기의 컨테이너입니다.", - "editorGroupBackground": "편집기 그룹의 배경색입니다. 편집기 그룹은 편집기의 컨테이너입니다.", "editorDragAndDropBackground": "편집기를 끌어올 때의 배경색입니다.", - "editorSideBySideBorder": "병렬 편집기에서 마스터 쪽의 세부 정보를 구분하기 위한 테두리 색입니다.", "panelBackground": "패널 배경색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", - "panelTopBorder": "편집기와 구분되는 맨 위의 패널 테두리 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", + "panelBorder": "편집기와 구분되는 맨 위의 패널 테두리 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "panelActiveTitleForeground": "활성 패널의 제목 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "panelInactiveTitleForeground": "비활성 패널의 제목 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "panelActiveTitleBorder": "활성 패널 제목의 테두리 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", @@ -27,12 +24,11 @@ "statusBarNoFolderBackground": "폴더가 열리지 않았을 때의 상태 표시줄 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "statusBarItemActiveBackground": "클릭할 때의 상태 표시줄 항목 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "statusBarItemHoverBackground": "마우스로 가리킬 때의 상태 표시줄 항목 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", - "statusBarInfoItemBackground": "상태 표시줄 정보 항목 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", - "statusBarInfoItemHoverBackground": "마우스로 가리킬 때의 상태 표시줄 정보 항목 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "activityBarBackground": "작업 막대 배경색입니다. 작업 막대는 맨 왼쪽이나 오른쪽에 표시되며 사이드바의 뷰 간을 전환하는 데 사용할 수 있습니다.", + "activityBarForeground": "작업 막대 전경 색(예: 아이콘에 사용됨)입니다. 작업 막대는 오른쪽이나 왼쪽 끝에 표시되며 사이드바의 보기 간을 전환할 수 있습니다.", "activityBarDragAndDropBackground": "작업 막대 항목의 끌어서 놓기 피드백 색입니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", - "activityBadgeBackground": "활동 알림 배지 배경색입니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", - "activityBadgeForeground": "활동 알림 배지 전경색입니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", + "activityBarBadgeBackground": "활동 알림 배지 배경색입니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", + "activityBarBadgeForeground": "활동 알림 배지 전경색입니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", "sideBarBackground": "사이드바 배경색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", "sideBarTitleForeground": "사이드바 제목 전경색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", "titleBarActiveForeground": "창이 활성화된 경우의 제목 표시줄 전경입니다. 이 색은 현재 macOS에서만 지원됩니다.", diff --git a/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json index 7aea99b100666..ca403839f4237 100644 --- a/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -20,6 +20,7 @@ "statusBarVisibility": "워크벤치 아래쪽에서 상태 표시줄의 표시 유형을 제어합니다.", "activityBarVisibility": "워크벤치에서 작업 막대의 표시 유형을 제어합니다.", "closeOnFileDelete": "일부 다른 프로세스에서 파일을 삭제하거나 이름을 바꿀 때 파일을 표시하는 편집기를 자동으로 닫을지 여부를 제어합니다. 사용하지 않도록 설정하는 경우 이러한 이벤트가 발생하면 편집기가 더티 상태로 계속 열려 있습니다. 응용 프로그램 내에서 삭제하면 항상 편집기가 닫히고 데이터를 유지하기 위해 더티 파일은 닫히지 않습니다.", + "swipeToNavigate": "세 손가락으로 가로로 살짝 밀어 열려 있는 파일 간을 이동합니다.", "workbenchConfigurationTitle": "워크벤치", "window.openFilesInNewWindow.on": "파일이 새 창에서 열립니다.", "window.openFilesInNewWindow.off": "파일이 파일의 폴더가 열려 있는 창 또는 마지막 활성 창에서 열립니다.", @@ -48,10 +49,12 @@ "menuBarVisibility": "메뉴 모음의 표시 여부를 제어합니다. '설정/해제'를 설정함으로써 메뉴 모음이 숨겨지고 키를 누를 때마다 메뉴 모음이 표시됩니다. 기본값으로, 창이 전체 화면인 경우를 제외하고 메뉴 모음이 표시됩니다.", "autoDetectHighContrast": "사용하도록 설정한 경우 Windows에서 고대비 테마를 사용 중이면 고대비 테마로 자동으로 변경되고 Windows 고대비 테마를 해제하면 어두운 테마로 변경됩니다.", "titleBarStyle": "창 제목 표시줄의 모양을 조정합니다. 변경 내용을 적용하려면 전체 다시 시작해야 합니다.", + "window.nativeTabs": "macOS Sierra 창 탭을 사용하도록 설정합니다. 변경\n 내용을 적용하려면 전체 다시 시작해야 하고, 기본 탭에서\n 사용자 지정 제목 표시줄 스타일(구성된 경우)을 비활성화합니다.", "windowConfigurationTitle": "창", "zenModeConfigurationTitle": "Zen 모드", "zenMode.fullScreen": "Zen 모드를 켜면 워크벤치도 전체 화면 모드로 전환되는지 여부를 제어합니다.", "zenMode.hideTabs": "Zen 모드를 켜면 워크벤치 탭도 숨길지를 제어합니다.", "zenMode.hideStatusBar": "Zen 모드를 켜면 워크벤치 하단에서 상태 표시줄도 숨길지를 제어합니다.", + "zenMode.hideActivityBar": "Zen 모드를 켜면 워크벤치의 왼쪽에 있는 작업 막대도 숨길지\n 여부를 제어합니다.", "zenMode.restore": "창이 Zen 모드에서 종료된 경우 Zen 모드로 복원할지 제어합니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..8b6ad71cd4e6d 100644 --- a/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/common/debugModel.i18n.json index 1100a58f7f991..68754cec55dff 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "알 수 없는 소스", "notAvailable": "사용할 수 없음", - "startDebugFirst": "평가할 디버그 세션을 시작하세요.", - "unknownStack": "알 수 없는 스택 위치" + "startDebugFirst": "평가할 디버그 세션을 시작하세요." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..6cb5f97282e99 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "알 수 없는 소스" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index f4b073b594339..fc577deeed81d 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -15,5 +15,6 @@ "allowBreakpointsEverywhere": "모든 파일에 대한 중단점을 설정할 수 있습니다.", "openExplorerOnEnd": "디버그 세션 끝에 탐색기 뷰를 자동으로 엽니다.", "inlineValues": "디버그하는 동안 편집기에서 변수 값을 인라인으로 표시합니다.", - "hideActionBar": "부동 디버그 작업 모음을 숨길지 여부를 제거합니다." + "hideActionBar": "부동 디버그 작업 모음을 숨길지 여부를 제거합니다.", + "launch": "전역 디버그 시작 구성입니다. 작업 영역에서 공유되는 \n 'launch.json'에 대한 대체로 사용되어야 합니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json index a5beb6f773c4d..1d1055d269125 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "replAriaLabel": "읽기 평가 인쇄 루프 패널", "actions.repl.historyPrevious": "기록 이전", "actions.repl.historyNext": "기록 다음", "actions.repl.acceptInput": "REPL 입력 적용" diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index 99f161cebd9bc..8145efa9749b7 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -6,5 +6,9 @@ { "stateCapture": "개체 상태는 첫 번재 평가에서 캡처됩니다.", "fileLinkMac": "클릭하여 이동(측면에서 열려면 Cmd 키를 누르고 클릭)", - "fileLink": "클릭하여 이동(측면에서 열려면 Ctrl 키를 누르고 클릭)" + "fileLink": "클릭하여 이동(측면에서 열려면 Ctrl 키를 누르고 클릭)", + "replVariableAriaLabel": "{0} 변수에 {1} 값이 있습니다. 읽기 평가 인쇄 루프, 디버그", + "replExpressionAriaLabel": "{0} 식에 {1} 값이 있습니다. 읽기 평가 인쇄 루프, 디버그", + "replValueOutputAriaLabel": "{0}, 읽기 평가 인쇄 루프, 디버그", + "replKeyValueOutputAriaLabel": "출력 변수 {0}에 {1} 값이 있습니다. 읽기 평가 인쇄 루프, 디버그" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index d190607cb9453..f4bb6b4c43199 100644 --- a/i18n/kor/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "사이드바에 사용자 지정 Tree Explorer 뷰렛을 적용합니다.", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "vscode.workspace.registerTreeExplorerNodeProvider를 통해 등록된 공급자를 식별하는 데 사용된 고유 ID", - "vscode.extension.contributes.explorer.treeLabel": "사용자 지정 Tree Explorer를 렌더링하는 데 사용되는 사람이 읽을 수 있는 문자열", - "vscode.extension.contributes.explorer.icon": "작업 막대에서 뷰렛 아이콘에 대한 경로", "showViewlet": "{0} 표시", "view": "보기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index afec853c06d77..76bb8574a7e13 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "reallyRecommended2": "이 파일 형식에 대해 '{0}' 확장이 권장됩니다.", "showRecommendations": "권장 사항 표시", "neverShowAgain": "다시 표시 안 함", "close": "닫기", diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index 1a0d8c6413199..0ba96cea01a12 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -8,6 +8,7 @@ "extensions": "확장", "sort by installs": "정렬 기준: 설치 수", "sort by rating": "정렬 기준: 등급", + "sort by name": "정렬 기준: 이름", "no extensions found": "확장을 찾을 수 없습니다.", "suggestProxyError": "마켓플레이스에서 'ECONNREFUSED'를 반환했습니다. 'http.proxy' 설정을 확인하세요.", "outdatedExtensions": "{0}개의 만료된 확장" diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index f2497f183b56c..f6f3684850fb6 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -7,6 +7,7 @@ "keybindingsInputName": "바로 가기 키(&&K)", "SearchKeybindings.AriaLabel": "키 바인딩 검색", "SearchKeybindings.Placeholder": "키 바인딩 검색", + "sortByPrecedene": "우선 순위별 정렬", "header-message": "고급 사용자 지정의 경우 다음 파일을 열고 편집하세요.", "keybindings-file-name": "keybindings.json", "keybindingsLabel": "키 바인딩", @@ -14,6 +15,7 @@ "addLabel": "키 바인딩 추가", "removeLabel": "키 바인딩 제거", "resetLabel": "키 바인딩 다시 설정", + "showConflictsLabel": "충돌 표시", "copyLabel": "복사", "error": "키 바인딩을 편집하는 동안 오류 '{0}'이(가) 발생했습니다. 'keybindings.json' 파일을 열고 확인하세요.", "command": "명령", diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index d217d2b183323..d03c1ba3ba27c 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -6,6 +6,5 @@ { "defineKeybinding.start": "키 바인딩 정의", "defineKeybinding.kbLayoutInfoMessage": "현재 자판 배열의 경우 다음을 누르세요.", - "defineKeybinding.kbLayoutErrorMessage": "현재 자판 배열에서는 이 키 조합을 생성할 수 없습니다.", - "DefineKeybindingAction": "키 바인딩 정의" + "defineKeybinding.kbLayoutErrorMessage": "현재 자판 배열에서는 이 키 조합을 생성할 수 없습니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json index d4e87482e3fa1..1387ce7c502ba 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -6,5 +6,6 @@ { "default": "기본값", "user": "사용자", + "meta": "메타", "option": "옵션" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index de06552d0766b..b87152b958ead 100644 --- a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,6 +16,7 @@ "terminal.integrated.fontLigatures": "터미널에서 글꼴 합자가 사용되는지를 제어합니다.", "terminal.integrated.fontSize": "터미널의 글꼴 크기(픽셀)를 제어합니다.", "terminal.integrated.lineHeight": "터미널의 줄 높이를 제어하며, 이 숫자는 터미널 글꼴 크기를 곱하여 실제 줄 높이(픽셀)를 얻습니다.", + "terminal.integrated.enableBold": "터미널 내에서 굵은 텍스트를 사용하도록 설정할지 여부이며, 터미널 셸의 지원이 필요합니다.", "terminal.integrated.cursorBlinking": "터미널 커서 깜박임 여부를 제어합니다.", "terminal.integrated.cursorStyle": "터미널 커서의 스타일을 제어합니다.", "terminal.integrated.scrollback": "터미널에서 버퍼에 유지하는 최대 줄 수를 제어합니다.", diff --git a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json index 1ed48f98d5802..85f72d33d656a 100644 --- a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.integrated.allowWorkspaceShell": "터미널에서 {0}(작업 영역 설정으로 정의됨)이(가) 시작되도록\n 허용할까요?", "allow": "Allow", "disallow": "Disallow" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 37af7b63cbfc3..e9cc7e8122ed1 100644 --- a/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,5 +14,6 @@ "noIconThemeDesc": "파일 아이콘 사용 안 함", "problemChangingIconTheme": "아이콘 테마를 설정하는 동안 문제 발생: {0}", "themes.selectIconTheme": "파일 아이콘 테마 선택", - "preferences": "기본 설정" + "preferences": "기본 설정", + "developer": "개발자" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/kor/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index bc1ada8f0ba0f..622950f98f88e 100644 --- a/i18n/kor/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/kor/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "JSON 테마 파일을 구문 분석하는 중 문제 발생: {0}", - "error.invalidformat": "JSON 테마 파일을 구문 분석하는 중 문제 발생: {0}. 'tokenColors' 및 'colors'가 필요합니다.", - "error.plist.invalidformat": "테마 파일({0})을 구문 분석하는 중 문제가 발생했습니다. 'settings'가 배열이 아닙니다.", - "error.cannotparse": "테마 파일({0})을 구문 분석하는 중 문제가 발생했습니다.", - "error.cannotload": "테마 파일 {0}을(를) 로드하는 중 문제 발생: {1}" + "error.cannotparsejson": "JSON 테마 파일을 구문 분석하는 중 문제 발생: {0}" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/kor/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index d6b5488116d42..b9570259fd28c 100644 --- a/i18n/kor/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,6 +25,5 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "현재 선택한 색 테마의 색을 재정의합니다. 다음 릴리스에서 색 이름이 변경될 예정이므로 이 설정은 실험적입니다." + "iconThemeError": "File icon theme is unknown or not installed." } \ No newline at end of file diff --git a/i18n/rus/extensions/git/out/main.i18n.json b/i18n/rus/extensions/git/out/main.i18n.json index b384f20a402a7..175b7f3a7cc39 100644 --- a/i18n/rus/extensions/git/out/main.i18n.json +++ b/i18n/rus/extensions/git/out/main.i18n.json @@ -6,5 +6,6 @@ { "using git": "Использование GIT {0} из {1}", "updateGit": "Обновить Git", - "neverShowAgain": "Больше не показывать" + "neverShowAgain": "Больше не показывать", + "git20": "У вас установлен Git {0}. Код лучше всего работает с Git >= 2." } \ No newline at end of file diff --git a/i18n/rus/extensions/git/out/model.i18n.json b/i18n/rus/extensions/git/out/model.i18n.json index 06cf3dbf85b8d..c349ed7bde0be 100644 --- a/i18n/rus/extensions/git/out/model.i18n.json +++ b/i18n/rus/extensions/git/out/model.i18n.json @@ -8,5 +8,7 @@ "merge changes": "Объединить изменения", "staged changes": "Промежуточно сохраненные изменения", "changes": "Изменения", - "ok": "ОК" + "ok": "ОК", + "neveragain": "Больше не показывать", + "huge": "Репозиторий git в '{0}' имеет очень много активных изменений, только часть функций Git будет доступна." } \ No newline at end of file diff --git a/i18n/rus/extensions/git/package.i18n.json b/i18n/rus/extensions/git/package.i18n.json index 447fd871e6b01..8b3e748068620 100644 --- a/i18n/rus/extensions/git/package.i18n.json +++ b/i18n/rus/extensions/git/package.i18n.json @@ -38,7 +38,5 @@ "config.autorefresh": "Включено ли автоматическое обновление", "config.autofetch": "Включено ли автоматическое получение", "config.enableLongCommitWarning": "Следует ли предупреждать о длинных сообщениях о фиксации", - "config.confirmSync": "Подтвердите синхронизацию репозиториев GIT.", - "config.countBadge": "Управляет счетчиком эмблем GIT.", - "config.checkoutType": "Определяет, какие типы ветвей перечисляются." + "config.confirmSync": "Подтвердите синхронизацию репозиториев GIT." } \ No newline at end of file diff --git a/i18n/rus/extensions/gulp/out/main.i18n.json b/i18n/rus/extensions/gulp/out/main.i18n.json index 8b6ad71cd4e6d..5a72cc938549a 100644 --- a/i18n/rus/extensions/gulp/out/main.i18n.json +++ b/i18n/rus/extensions/gulp/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Автообнаружение галпа с ошибкой {0}" +} \ No newline at end of file diff --git a/i18n/rus/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/rus/extensions/typescript/out/typescriptServiceClient.i18n.json index 43c18c9ae3a9e..aefaafd937378 100644 --- a/i18n/rus/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/rus/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "restartTsServerTitle": "Перезапустить", - "later": "Позже", "channelName": "TypeScript", "noServerFound": "Путь {0} не указывает на допустимый файл программы установки tsserver. Выполняется откат до пакетной версии TypeScript.", "noBundledServerFound": "Файл tsserver VSCode был удален другим приложением, например, в результате ошибочного срабатывания средства обнаружения вирусов. Переустановите VSCode.", @@ -17,6 +15,8 @@ "learnMore": "Дополнительные сведения", "selectTsVersion": "Выберите версию TypeScript, используемую для языковых функций JavaScript и TypeScript.", "typescript.openTsServerLog.notSupported": "Для ведения журнала сервера TS требуется TS 2.2.2+", + "typescript.openTsServerLog.loggingNotEnabled": "Вход в TS Server отключен. Задайте \"typescript.tsserver.log\" и перезагрузите VS Code, чтобы включить ведение журнала", + "typescript.openTsServerLog.enableAndReloadOption": "Войдите и перезагрузите TS server", "typescript.openTsServerLog.noLogFile": "Сервер TS не начал ведение журнала.", "openTsServerLog.openFileFailedFailed": "Не удалось открыть файл журнала сервера TS", "serverDiedAfterStart": "Языковая служба TypeScript пять раз завершила работу сразу после запуска. Служба не будет перезапущена.", diff --git a/i18n/rus/extensions/typescript/package.i18n.json b/i18n/rus/extensions/typescript/package.i18n.json index 7440e4fab2340..8d5b98b675b61 100644 --- a/i18n/rus/extensions/typescript/package.i18n.json +++ b/i18n/rus/extensions/typescript/package.i18n.json @@ -30,6 +30,9 @@ "javascript.validate.enable": "Включение или отключение проверки JavaScript.", "typescript.goToProjectConfig.title": "Перейти к конфигурации проекта", "javascript.goToProjectConfig.title": "Перейти к конфигурации проекта", + "typescript.referencesCodeLens.enabled": "Включить или отключить CodeLens для ссылок. Требуется TypeScript >= 2.0.6.", + "typescript.implementationsCodeLens.enabled": "Включить или отключить CodeLens для реализаций. Требуется TypeScript >= 2.2.0.", "typescript.openTsServerLog.title": "Открытие файла журнала сервера TS", - "typescript.selectTypeScriptVersion.title": "Выберите версию TypeScript." + "typescript.selectTypeScriptVersion.title": "Выберите версию TypeScript.", + "jsDocCompletion.enabled": "Включить или отключить JSDoc коментарии" } \ No newline at end of file diff --git a/i18n/rus/src/vs/code/electron-main/menus.i18n.json b/i18n/rus/src/vs/code/electron-main/menus.i18n.json index 611a20ee363e5..44d0d0569f30d 100644 --- a/i18n/rus/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/rus/src/vs/code/electron-main/menus.i18n.json @@ -127,6 +127,7 @@ "miNewBreakpoint": "&&Новая точка останова", "miDisableAllBreakpoints": "Отключить &&все точки останова", "miRemoveAllBreakpoints": "&&Удалить &&все точки останова", + "miInstallAdditionalDebuggers": "У&&становить дополнительные отладчики...", "mMinimize": "Свернуть", "mClose": "Закрыть", "mBringToFront": "Переместить все на передний план", diff --git a/i18n/rus/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/rus/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index 8b6ad71cd4e6d..8319f2c9379fa 100644 --- a/i18n/rus/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/rus/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "diffEditorInserted": "Цвет фона для добавленных строк.", + "diffEditorRemoved": "Цвет фона для удаленных строк.", + "diffEditorInsertedOutline": "Цвет контура для добавленных строк.", + "diffEditorRemovedOutline": "Цвет контура для удаленных строк." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/rus/src/vs/editor/common/services/bulkEdit.i18n.json index 547ede9558e2f..fc197d1c5c6b0 100644 --- a/i18n/rus/src/vs/editor/common/services/bulkEdit.i18n.json +++ b/i18n/rus/src/vs/editor/common/services/bulkEdit.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "conflict": "Следующие файлы были изменены: {0}" + "conflict": "Следующие файлы были изменены: {0}", + "summary.0": "Нет изменений", + "summary.nm": "Сделано изменений {0} в {1} файлах", + "summary.n0": "Сделано изменений {0} в одном файле" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 93d50bf6761d6..cbed271e42399 100644 --- a/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,5 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "aria.result.0": "Результаты не найдены" + "aria.oneReference": "ссылка в {0} в строке {1} и символе {2}", + "aria.fileReferences.1": "Обнаружен 1 символ в {0}", + "aria.fileReferences.N": "{0} символов в {1}", + "aria.result.0": "Результаты не найдены", + "aria.result.1": "Обнаружен 1 символ в {0}", + "aria.result.n1": "Обнаружено {0} символов в {1}", + "aria.result.nm": "Обнаружено {0} символов в {1} файлах" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index bbc7f37cdf2e4..e5f25fad6949e 100644 --- a/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -12,8 +12,8 @@ "noResults": "Результаты отсутствуют", "peekView.alternateTitle": "Ссылки", "peekViewTitleBackground": "Цвет фона области заголовка быстрого редактора.", - "peekViewTitle": "Цвет заголовка быстрого редактора.", - "peekViewTitleInfo": "Цвет сведений о заголовке быстрого редактора.", + "peekViewTitleForeground": "Цвет заголовка быстрого редактора.", + "peekViewTitleInfoForeground": "Цвет сведений о заголовке быстрого редактора.", "peekViewBorder": "Цвет границ быстрого редактора и массива.", "peekViewResultsBackground": "Цвет фона в списке результатов представления быстрого редактора.", "peekViewResultsMatchForeground": "Передний план совпадений в списке результатов быстрого редактора.", diff --git a/i18n/rus/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/rus/src/vs/editor/contrib/rename/browser/rename.i18n.json index a16315cff198d..10cdfc7238dc1 100644 --- a/i18n/rus/src/vs/editor/contrib/rename/browser/rename.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "no result": "Результаты отсутствуют.", + "aria": "«{0}» успешно переименован в «{1}». Сводка: {2}", "rename.failed": "Не удалось переименовать.", "rename.label": "Переименовать символ" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json index 032e964f688d7..b93db54e42c90 100644 --- a/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "arai.alert.snippet": "При принятии \"{0}\" был добавлен следующий текст: \"{1}\"", "suggest.trigger.label": "Переключить предложение" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index fdc5d78aa6f67..1b508516908e2 100644 --- a/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -4,6 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "editorSuggestWidgetBackground": "Цвет фона виджета подсказок.", + "editorSuggestWidgetBorder": "Цвет границ виджета подсказок.", + "editorSuggestWidgetForeground": "Цвет переднего плана мини-приложения предложений.", + "editorSuggestWidgetSelectedBackground": "Фоновый цвет выбранной записи в мини-приложении предложений.", + "editorSuggestWidgetHighlightForeground": "Цвет выделения соответствия в мини-приложении предложений.", "readMore": "Подробнее...{0}", "suggestionWithDetailsAriaLabel": "{0}, предложение, содержит данные", "suggestionAriaLabel": "{0}, предложение", diff --git a/i18n/rus/src/vs/platform/environment/node/argv.i18n.json b/i18n/rus/src/vs/platform/environment/node/argv.i18n.json index 0c42ab8ee0159..962ca99076ba6 100644 --- a/i18n/rus/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/rus/src/vs/platform/environment/node/argv.i18n.json @@ -20,6 +20,7 @@ "showVersions": "Показать версии установленных расширений при указании параметра --list-extension.", "installExtension": "Устанавливает расширение.", "uninstallExtension": "Удаляет расширение.", + "experimentalApis": "Включает предложенные функции API для расширения.", "disableExtensions": "Отключить все установленные расширения.", "disableGPU": "Отключить аппаратное ускорение GPU.", "version": "Печать версии.", diff --git a/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json index 78d1bc291dc31..fa30062c9dbac 100644 --- a/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,19 +4,44 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid.color": "Недопустимый формат цвета. Используйте #RRGGBB или #RRGGBBAA", + "invalid.color": "Недопустимый формат цвета. Используйте #RGB, #RGBA, #RRGGBB или #RRGGBBAA", "schema.colors": "Цвета, используемые на рабочем месте.", "foreground": "Общий цвет переднего плана. Этот цвет используется, только если его не переопределит компонент.", - "focusedElementOutline": "Общий цвет структуры и границ для элементов с фокусом. Этот цвет используется, только если его не переопределит компонент.", - "highContrastBorder": "Цвет границ для разделения компонентов при включенной теме с высокой контрастностью.", - "highContrastOutline": "Цвет контура для активных компонентов в теме с высокой контрастностью.", + "focusBorder": "Общий цвет границ для элементов с фокусом. Этот цвет используется только в том случае, если не переопределен в компоненте.", + "contrastBorder": "Дополнительная граница вокруг элементов, которая отделяет их от других элементов для улучшения контраста.", + "activeContrastBorder": "Дополнительная граница вокруг активных элементов, которая отделяет их от других элементов для улучшения контраста.", + "widgetShadow": "Цвет тени мини-приложений редактора, таких как \"Найти/заменить\".", "inputBoxBackground": "Фон поля ввода.", "inputBoxForeground": "Передний план поля ввода.", "inputBoxBorder": "Граница поля ввода.", "inputBoxActiveOptionBorder": "Цвет границ активированных параметров в полях ввода.", + "inputValidationInfoBackground": "Фоновый цвет проверки ввода для уровня серьезности \"Сведения\".", + "inputValidationInfoBorder": "Цвет границы проверки ввода для уровня серьезности \"Сведения\".", + "inputValidationWarningBackground": "Фоновый цвет проверки ввода для уровня серьезности \"Предупреждение\".", + "inputValidationWarningBorder": "Цвет границы проверки ввода для уровня серьезности \"Предупреждение\".", + "inputValidationErrorBackground": "Фоновый цвет проверки ввода для уровня серьезности \"Ошибка\".", + "inputValidationErrorBorder": "Цвет границы проверки ввода для уровня серьезности \"Ошибка\".", "dropdownBackground": "Фон раскрывающегося списка.", "dropdownForeground": "Передний план раскрывающегося списка.", "dropdownBorder": "Граница раскрывающегося списка.", + "listFocusBackground": "Фоновый цвет находящегося в фокусе элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", + "listActiveSelectionBackground": "Фоновый цвет выбранного элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", + "listInactiveSelectionBackground": "Фоновый цвет выбранного элемента List/Tree, когда элемент List/Tree неактивен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", + "listActiveSelectionForeground": "Цвет переднего плана выбранного элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", + "listFocusAndSelectionBackground": "Фоновый цвет находящегося в фокусе и выбранного элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет. Этот цвет имеет приоритет над индивидуальными цветами выделения и фокуса.", + "listFocusAndSelectionForeground": "Цвет переднего плана находящегося в фокусе и выбранного элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет. Этот цвет имеет приоритет над индивидуальными цветами выделения и фокуса.", + "listHoverBackground": "Фоновый цвет элементов List/Tree при наведении курсора мыши.", + "listDropBackground": "Фоновый цвет элементов List/Tree при перемещении с помощью мыши.", + "highlight": "Цвет переднего плана для выделения соответствия при поиске по элементу List/Tree.", + "pickerGroupForeground": "Цвет средства быстрого выбора для группировки меток.", + "pickerGroupBorder": "Цвет средства быстрого выбора для группировки границ.", + "buttonForeground": "Цвет переднего плана кнопки.", + "buttonBackground": "Цвет фона кнопки.", + "buttonHoverBackground": "Цвет фона кнопки при наведении.", + "scrollbarShadow": "Цвет тени полосы прокрутки, которая свидетельствует о том, что содержимое прокручивается.", + "scrollbarSliderBackground": "Цвет фона ползунка.", + "scrollbarSliderHoverBackground": "Цвет фона ползунка при наведении.", + "scrollbarSliderActiveBackground": "Цвет фона активного ползунка.", "editorBackground": "Цвет фона редактора.", "editorForeground": "Цвет переднего плана редактора по умолчанию.", "editorSelection": "Цвет выделения редактора.", @@ -27,6 +52,5 @@ "findRangeHighlight": "Цвет диапазона, ограничивающего поиск.", "activeLinkForeground": "Цвет активных ссылок.", "linkForeground": "Цвет ссылок.", - "editorWidgetBackground": "Цвет фона виджетов редактора, таких как найти/заменить.", - "editorWidgetShadow": "Цвет тени виджетов редактора, таких как найти/заменить." + "editorWidgetBackground": "Цвет фона виджетов редактора, таких как найти/заменить." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/node/extHostTreeView.i18n.json b/i18n/rus/src/vs/workbench/api/node/extHostTreeView.i18n.json new file mode 100644 index 0000000000000..69ab93e32faf9 --- /dev/null +++ b/i18n/rus/src/vs/workbench/api/node/extHostTreeView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "TreeExplorerNodeProvider с идентификатором \"{0}\" не зарегистрирован.", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider \"{0}\" не удалось предоставить корневой узел." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/common/theme.i18n.json b/i18n/rus/src/vs/workbench/common/theme.i18n.json index c1d77ad1616e7..bf046e997596e 100644 --- a/i18n/rus/src/vs/workbench/common/theme.i18n.json +++ b/i18n/rus/src/vs/workbench/common/theme.i18n.json @@ -5,20 +5,17 @@ // Do not edit this file. It is machine generated. { "tabsContainerBackground": "Цвет фона контейнера вкладок. Вкладки — это контейнеры для редакторов в области редакторов. В одной группе редакторов можно открыть несколько вкладок. Может быть несколько групп редакторов.", - "activeTabBackground": "Цвет фона активной вкладки. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", - "inactiveTabBackground": "Цвет фона неактивной вкладки. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", - "activeTabActiveGroupForeground": "Цвет переднего плана активной вкладки в активной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", - "activeTabInactiveGroupForeground": "Цвет переднего плана активной вкладки в неактивной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", - "inactiveTabActiveGroupForeground": "Цвет переднего плана неактивной вкладки в активной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", - "inactiveTabInactiveGroupForeground": "Цвет переднего плана неактивной вкладки в неактивной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", + "tabActiveBackground": "Цвет фона активной вкладки. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", + "tabInactiveBackground": "Цвет фона неактивной вкладки. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "tabBorder": "Граница для разделения вкладок. Вкладки — это контейнеры для редакторов в области редакторов. В одной группе редакторов можно открыть несколько вкладок. Может быть несколько групп редакторов.", - "editorHeaderBackground": "Цвет фона заголовка редактора, если нет разрешенных вкладок.", + "tabActiveEditorGroupActiveForeground": "Цвет переднего плана активной вкладки в активной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", + "tabActiveEditorGroupInactiveForeground": "Цвет переднего плана активной вкладки в неактивной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", + "tabInactiveEditorGroupActiveForeground": "Цвет переднего плана неактивной вкладки в активной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", + "tabInactiveEditorGroupInactiveForeground": "Цвет переднего плана неактивной вкладки в неактивной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "editorGroupBorder": "Цвет для разделения нескольких групп редакторов. Группы редакторов — это контейнеры редакторов.", - "editorGroupBackground": "Цвет фона в группе редакторов. Группы редакторов — это контейнеры редакторов.", "editorDragAndDropBackground": "Цвет фона при перетаскивании редакторов.", - "editorSideBySideBorder": "Цвет границ для отделения сведений от эталонной боковой панели для параллельных редакторов.", "panelBackground": "Цвет фона панели. Панели показаны под областью редактора и содержат такие представления, как выходные данные и встроенный терминал.", - "panelTopBorder": "Цвет верхней границы панели, отделяющей ее от редактора. Панели показаны под областью редактора и содержат такие представления, как выходные данные и встроенный терминал.", + "panelBorder": "Цвет верхней границы панели, отделяющей ее от редактора. Панели показаны под областью редактора и содержат такие представления, как выходные данные и встроенный терминал.", "panelActiveTitleForeground": "Цвет заголовка для активной панели. Панели отображаются под областью редактора и содержат такие представления, как окно вывода и встроенный терминал.", "panelInactiveTitleForeground": "Цвет заголовка для неактивной панели. Панели отображаются под областью редактора и содержат такие представления, как окно вывода и встроенный терминал.", "panelActiveTitleBorder": "Цвет границ для заголовка активной панели. Панели отображаются под областью редактора и содержат такие представления, как окно вывода и встроенный терминал.", @@ -27,12 +24,10 @@ "statusBarNoFolderBackground": "Цвет фона панели состояния, если папка не открыта. Панель состояния отображается внизу окна.", "statusBarItemActiveBackground": "Цвет фона элементов панели состояния при щелчке. Панель состояния отображается внизу окна.", "statusBarItemHoverBackground": "Цвет фона элементов панели состояния при наведении. Панель состояния отображается внизу окна.", - "statusBarInfoItemBackground": "Цвет фона элементов со сведениями о панели состояния. Панель состояния отображается внизу окна.", - "statusBarInfoItemHoverBackground": "Цвет фона элементов со сведениями о панели состояния при наведении указателя. Панель состояния отображается внизу окна.", "activityBarBackground": "Цвет фона панели действий. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", "activityBarDragAndDropBackground": "Цвет обратной связи при перетаскивании для элементов панели действий. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", - "activityBadgeBackground": "Цвет фона значка уведомлений о действиях. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", - "activityBadgeForeground": "Цвет переднего плана значка уведомлений о действиях. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", + "activityBarBadgeBackground": "Цвет фона значка уведомлений о действиях. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", + "activityBarBadgeForeground": "Цвет переднего плана значка уведомлений о действиях. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", "sideBarBackground": "Цвет фона боковой панели. Боковая панель — это контейнер таких представлений, как проводник и поиск.", "sideBarTitleForeground": "Цвет переднего плана заголовка боковой панели. Боковая панель — это контейнер для таких представлений, как проводник и поиск.", "titleBarActiveForeground": "Передний план панели заголовка, если окно активно. Обратите внимание, что этот цвет сейчас поддерживается только в macOS.", diff --git a/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index c5e4314489b8e..8b6ad71cd4e6d 100644 --- a/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "workbench.action.inspectKeyMap": "Developer: Inspect Key Mapppings" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/common/debugModel.i18n.json index 2253dc04d4642..efe04de8244e1 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/common/debugModel.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "unknownSource": "Неизвестный источник", "notAvailable": "недоступно", - "startDebugFirst": "Чтобы произвести вычисление, начните сеанс отладки", - "unknownStack": "Неизвестное расположение стека" + "startDebugFirst": "Чтобы произвести вычисление, начните сеанс отладки" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..e8f58d654cd3c --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "Неизвестный источник" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 86d73dd73f7e7..91e553b6c736e 100644 --- a/i18n/rus/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,10 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.explorer": "Добавляет в боковую панель настраиваемое мини-приложение обозревателя дерева", - "vscode.extension.contributes.explorer.treeExplorerNodeProviderId": "Уникальный идентификатор, используемый для обозначения поставщика, зарегистрированного при помощи vscode.workspace.registerTreeExplorerNodeProvider.", - "vscode.extension.contributes.explorer.treeLabel": "Понятная для пользователей строка, используемая для отображения настраиваемого обозревателя дерева", - "vscode.extension.contributes.explorer.icon": "Путь к значку деморолика на панели действий", "showViewlet": "Показать {0}", "view": "Просмотреть" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/rus/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json index bc922bbc4b04c..109bbf5c6cdcf 100644 --- a/i18n/rus/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json @@ -11,5 +11,6 @@ "genericSaveError": "Не удалось сохранить \"{0}\": {1}", "staleSaveError": "Не удалось сохранить \"{0}\": содержимое на диске более новое. Чтобы сравнить свою версию с версией на диске, нажмите **Сравнить**.", "compareChanges": "Сравнить", + "saveConflictDiffLabel": "{0} (на диске) ↔ {1} (в {2}) - Разрешить конфликт сохранения", "userGuide": "Используйте команды на панели инструментов для **отмены** изменений или **перезаписи** содержимого на диске" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 9023a755fd9c7..2798a3b44bd63 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -6,6 +6,5 @@ { "defineKeybinding.start": "Определить назначение клавиш", "defineKeybinding.kbLayoutInfoMessage": "Для текущей раскладки клавиатуры нажмите ", - "defineKeybinding.kbLayoutErrorMessage": "Вы не сможете нажать это сочетание клавиш в текущей раскладке клавиатуры.", - "DefineKeybindingAction": "Определить назначение клавиш" + "defineKeybinding.kbLayoutErrorMessage": "Вы не сможете нажать это сочетание клавиш в текущей раскладке клавиатуры." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 4c16e55f86088..ab56be435f7f9 100644 --- a/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,5 +14,6 @@ "noIconThemeDesc": "Отключить значки файлов", "problemChangingIconTheme": "Проблема при задании темы значка: {0}", "themes.selectIconTheme": "Выбрать тему значка файла", - "preferences": "Параметры" + "preferences": "Параметры", + "developer": "Разработчик" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/rus/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 6362159437b18..34c882751ea56 100644 --- a/i18n/rus/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/rus/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "Возникли проблемы при анализе файла JSON THEME: {0}.", - "error.invalidformat": "Проблемы при анализе файла темы JSON: {0}. Ожидаются \"tokenColors\" и \"colors\".", - "error.plist.invalidformat": "Ошибка при анализе файла темы: {0}. settings не является массивом.", - "error.cannotparse": "Ошибки при анализе файла темы: {0}", - "error.cannotload": "Проблемы при загрузке файла темы {0}: {1}" + "error.cannotparsejson": "Возникли проблемы при анализе файла JSON THEME: {0}." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/rus/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 40df43a9fd257..2701a620e308e 100644 --- a/i18n/rus/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,6 +25,5 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed.", - "workbenchColors": "Переопределяет цвета из выбранной цветовой темы. Это экспериментальный параметр, так как имена цветов изменятся в следующем выпуске." + "iconThemeError": "File icon theme is unknown or not installed." } \ No newline at end of file From e7ff4c373f4d2253617735e705d95b14fccb0b41 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Sat, 29 Apr 2017 15:01:44 +0200 Subject: [PATCH 0096/2747] Add workbench/editor colors to our built in themes (fixes #25327) --- .../theme-abyss/themes/abyss-color-theme.json | 77 ++++---- .../theme-defaults/themes/dark_defaults.json | 3 +- .../themes/kimbie-dark-color-theme.json | 29 ++- .../themes/dimmed-monokai-color-theme.json | 21 +- .../themes/monokai-color-theme.json | 18 +- .../themes/quietlight-color-theme.json | 11 +- .../theme-red/themes/Red-color-theme.json | 4 +- .../themes/solarized-dark-color-theme.json | 38 ++-- .../themes/solarized-light-color-theme.json | 181 +++++++++++++++--- .../themes/tomorrow-night-blue-theme.json | 10 +- src/vs/platform/theme/common/colorRegistry.ts | 4 +- 11 files changed, 290 insertions(+), 106 deletions(-) diff --git a/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json index 03c19413808c9..2a83d26cd9553 100644 --- a/extensions/theme-abyss/themes/abyss-color-theme.json +++ b/extensions/theme-abyss/themes/abyss-color-theme.json @@ -254,6 +254,8 @@ // Base // "foreground": "", "focusBorder": "#596F99", + // "contrastActiveBorder": "", + // "contrastBorder": "", // "widget.shadow": "", @@ -268,30 +270,29 @@ "inputValidation.errorBackground": "#A22D44", "inputValidation.errorBorder": "#AB395B", - // "dropdown.background": "#181f2f", + "dropdown.background": "#181f2f", // "dropdown.foreground": "", // "dropdown.border": "", - "button.background": "#455064", - "button.hoverBackground": "#4A5C6B", + "button.background": "#2B3C5D", // "button.foreground": "", - "list.activeSelectionBackground": "#011B51", + "list.activeSelectionBackground": "#08286b", // "list.activeSelectionForeground": "", "list.focusBackground": "#08286b", - "list.hoverBackground": "#041D52", + "list.hoverBackground": "#061940", "list.inactiveSelectionBackground": "#152037", "list.dropBackground": "#041D52", - // "list.highlightForeground": "", + "list.highlightForeground": "#0063a5", "scrollbar.shadow": "#515E91AA", "scrollbarSlider.activeBackground": "#3B3F5188", - "scrollbarSlider.background": "#1F223088", + "scrollbarSlider.background": "#1F2230AA", "scrollbarSlider.hoverBackground": "#3B3F5188", // Editor "editor.background": "#000c18", - "editor.foreground": "#6688cc", + // "editor.foreground": "#6688cc", "editorWidget.background": "#262641", "editorCursor.foreground": "#ddbb88", "editorWhitespace.foreground": "#103050", @@ -302,8 +303,8 @@ "editorHoverWidget.border": "#004c18", "editorLineNumber.foreground": "#406385", "editorMarkerNavigation.background": "#060621", - "editorMarkerNavigationError.background": "#FF0000", - "editorMarkerNavigationWarning.background": "#00FF00", + "editorMarkerNavigationError.background": "#AB395B", + "editorMarkerNavigationWarning.background": "#5B7E7A", "editorLink.activeForeground": "#0063a5", // "editor.findMatchBackground": "", "editor.findMatchHighlightBackground": "#eeeeee44", @@ -311,14 +312,18 @@ // "editor.hoverHighlightBackground": "", // "editor.inactiveSelectionBackground": "", // "editor.lineHighlightBorder": "", - "editorLink.foreground": "#0063a5", // "editor.rangeHighlightBackground": "", // "editor.selectionHighlightBackground": "", - // "editorSuggestWidget.background": "", - // "editorSuggestWidget.border": "", // "editor.wordHighlightBackground": "", // "editor.wordHighlightStrongBackground": "", + // Editor: Suggest Widget + // "editorSuggestWidget.background": "", + // "editorSuggestWidget.border": "", + // "editorSuggestWidget.foreground": "", + // "editorSuggestWidget.highlightForeground": "", + // "editorSuggestWidget.selectedBackground": "", + // Editor: Peek View "peekViewResult.background": "#060621", // "peekViewResult.lineForeground": "", @@ -342,7 +347,7 @@ // Workbench: Title "titleBar.activeBackground": "#10192c", // "titleBar.activeForeground": "", - "titleBar.inactiveBackground": "#10192caa", + // "titleBar.inactiveBackground": "", // "titleBar.inactiveForeground": "", // Workbench: Editors @@ -350,9 +355,9 @@ "editorGroup.border": "#2b2b4a", "editorGroup.background": "#1c1c2a", "editorGroup.dropBackground": "#25375daa", + "editorGroupHeader.tabsBackground": "#1c1c2a", // Workbench: Tabs - "editorGroupHeader.tabsBackground": "#1c1c2a", "tab.border": "#2b2b4a", // "tab.activeBackground": "", "tab.inactiveBackground": "#10192c", @@ -364,7 +369,7 @@ // "activityBar.foreground": "", "activityBarBadge.background": "#0063a5", // "activityBarBadge.foreground": "", - // "activityBar.dropBackground": "#25375daa", + // "activityBar.dropBackground": "", // Workbench: Panel // "panel.background": "", @@ -385,13 +390,13 @@ // "statusBar.foreground": "", "statusBarItem.prominentBackground": "#0063a5", "statusBarItem.prominentHoverBackground": "#0063a5dd", - "statusBarItem.activeBackground": "#ffffff33", - "statusBarItem.hoverBackground": "#ffffff22", + // "statusBarItem.activeBackground": "", + // "statusBarItem.hoverBackground": "", // Workbench: Debug "debugToolBar.background": "#051336", "debugExceptionWidget.background": "#051336", - // "debugExceptionWidget.border": "", + "debugExceptionWidget.border": "#AB395B", // Workbench: Notifications "notification.background": "#051336", @@ -399,24 +404,24 @@ // Workbench: Quick Open "pickerGroup.border": "#596F99", - "pickerGroup.foreground": "#596F99" + "pickerGroup.foreground": "#596F99", // Workbench: Terminal - // "terminal.ansiBlack": "", - // "terminal.ansiBlue": "", - // "terminal.ansiBrightBlack": "", - // "terminal.ansiBrightBlue": "", - // "terminal.ansiBrightCyan": "", - // "terminal.ansiBrightGreen": "", - // "terminal.ansiBrightMagenta": "", - // "terminal.ansiBrightRed": "", - // "terminal.ansiBrightWhite": "", - // "terminal.ansiBrightYellow": "", - // "terminal.ansiCyan": "", - // "terminal.ansiGreen": "", - // "terminal.ansiMagenta": "", - // "terminal.ansiRed": "", - // "terminal.ansiWhite": "", - // "terminal.ansiYellow": "" + "terminal.ansiBlack": "#111111", + "terminal.ansiRed": "#ff9da4", + "terminal.ansiGreen": "#d1f1a9", + "terminal.ansiYellow": "#ffeead", + "terminal.ansiBlue": "#bbdaff", + "terminal.ansiMagenta": "#ebbbff", + "terminal.ansiCyan": "#99ffff", + "terminal.ansiWhite": "#cccccc", + "terminal.ansiBrightBlack": "#333333", + "terminal.ansiBrightRed": "#ff7882", + "terminal.ansiBrightGreen": "#b8f171", + "terminal.ansiBrightYellow": "#ffe580", + "terminal.ansiBrightBlue": "#80baff", + "terminal.ansiBrightMagenta": "#d778ff", + "terminal.ansiBrightCyan": "#78ffff", + "terminal.ansiBrightWhite": "#ffffff" } } \ No newline at end of file diff --git a/extensions/theme-defaults/themes/dark_defaults.json b/extensions/theme-defaults/themes/dark_defaults.json index 597fe8c3d4bb2..690098711f959 100644 --- a/extensions/theme-defaults/themes/dark_defaults.json +++ b/extensions/theme-defaults/themes/dark_defaults.json @@ -6,6 +6,7 @@ "editor.foreground": "#D4D4D4", "editor.inactiveSelectionBackground": "#3A3D41", "editorIndentGuide.background": "#404040", - "editor.selectionHighlightBackground": "#add6ff26" + "editor.selectionHighlightBackground": "#add6ff26", + "list.dropBackground": "#383B3D" } } \ No newline at end of file diff --git a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json index 6f7a5dbfb787e..19589afca4c43 100644 --- a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json +++ b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json @@ -2,27 +2,42 @@ "name": "Kimbie Dark", "type": "dark", "colors": { - "input.background": "#2f2f2f", + "input.background": "#51412c", "editor.background": "#221a0f", "editor.foreground": "#d3af86", + "focusBorder": "#a57a4c", + "list.highlightForeground": "#e3b583", + "list.activeSelectionBackground": "#7c5021", + "list.hoverBackground": "#7c502166", + "list.focusBackground": "#7c5021AA", + "list.inactiveSelectionBackground": "#645342", + "pickerGroup.foreground": "#e3b583", + "pickerGroup.border": "#e3b583", + "inputOption.activeBorder": "#a57a4c", "editor.selectionBackground": "#84613daa", "editorWidget.background": "#131510", "editorHoverWidget.background": "#221a14", "editorGroupHeader.tabsBackground": "#131510", + "editorGroup.background": "#0f0c08", "tab.inactiveBackground": "#131510", - "statusBar.background": "#162257", + "titleBar.activeBackground": "#423523", + "statusBar.background": "#423523", + "statusBar.debuggingBackground": "#423523", + "statusBar.noFolderBackground": "#423523", "activityBar.background": "#221a0f", "activityBar.foreground": "#d3af86", - "activityBarBadge.background": "#162257", - "sideBar.background": "#131510", + "activityBarBadge.background": "#765e3e", + "sideBar.background": "#362712", "editor.lineHighlightBackground": "#5e452b", "editorCursor.foreground": "#d3af86", "editorWhitespace.foreground": "#a57a4c", - "peekViewTitle.background": "#131510", + "peekViewTitle.background": "#362712", "peekView.border": "#5e452b", - "peekViewResult.background": "#131510", + "peekViewResult.background": "#362712", "peekViewEditor.background": "#221a14", - "peekViewEditor.matchHighlightBackground": "#84613daa" + "peekViewEditor.matchHighlightBackground": "#84613daa", + "notification.background": "#473a29", + "button.background": "#6e583b" }, "tokenColors": [ { diff --git a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json index 173c9283c4eb6..b847fc95dce1f 100644 --- a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json +++ b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json @@ -1,34 +1,37 @@ { "type": "dark", "colors": { - // "foreground": "#ddffff", - // "focusBorder": "#00f9ff", "dropdown.background": "#383852", - "list.activeSelectionBackground": "#303050", - "list.inactiveSelectionBackground": "#303d45", + "list.activeSelectionBackground": "#303070", + "list.focusBackground": "#425370", + "list.inactiveSelectionBackground": "#23324e", "list.hoverBackground": "#005070", "list.dropBackground": "#505590", + "list.highlightForeground": "#e58520", "button.background": "#5088a3", - "button.hoverBackground": "#6099a3", "editor.background": "#202025", "editor.foreground": "#c5c8c6", "editor.selectionBackground": "#373b41", "editor.lineHighlightBackground": "#303030", - "editorCursor.foreground": "#fc5604", + "editorCursor.foreground": "#c07020", "editorWhitespace.foreground": "#383880", "editorIndentGuide.background": "#505037", "editorGroupHeader.tabsBackground": "#222228", - "tab.activeBackground": "#272740", + // "tab.activeBackground": "#272738", "tab.inactiveBackground": "#333340", "tab.border": "#000030", "panelTitle.activeForeground": "#ddffff", "statusBar.background": "#354550", + "statusBar.debuggingBackground": "#354550", + "statusBar.noFolderBackground": "#354550", + "titleBar.activeBackground": "#354550", "activityBar.background": "#292935", - "activityBar.foreground": "#f0f0ff", - "activityBarBadge.background": "#4045b0", + "activityBar.foreground": "#ffffff", + "activityBarBadge.background": "#3655b5", "sideBar.background": "#232327", "sideBarSectionHeader.background": "#424250", "notification.foreground": "#ffe0ff", + "pickerGroup.foreground": "#77a5b0", "terminal.ansiWhite": "#ddffff" }, "tokenColors": [ diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index 74d3acac33d21..c97b363b397f1 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -1,35 +1,37 @@ { "type": "dark", "colors": { - // "foreground": "#ddffff", - // "focusBorder": "#00f9ff", "dropdown.background": "#383852", - "list.activeSelectionBackground": "#303070", - "list.focusBackground": "#394770", - "list.inactiveSelectionBackground": "#303d45", + "list.activeSelectionBackground": "#383852", + "list.focusBackground": "#425370", + "list.inactiveSelectionBackground": "#23324e", "list.hoverBackground": "#005070", "list.dropBackground": "#505590", + "list.highlightForeground": "#e58520", "button.background": "#5088a3", - "button.hoverBackground": "#6099a3", "editor.background": "#202025", "editor.foreground": "#f8f8f2", "editor.selectionBackground": "#49483e", "editor.lineHighlightBackground": "#303030", - "editorCursor.foreground": "#f8f8f0", + "editorCursor.foreground": "#c07020", "editorWhitespace.foreground": "#383880", "editorIndentGuide.background": "#505037", "editorGroupHeader.tabsBackground": "#222228", - "tab.activeBackground": "#272740", + // "tab.activeBackground": "#272738", "tab.inactiveBackground": "#333340", "tab.border": "#000030", "panelTitle.activeForeground": "#ddffff", "statusBar.background": "#354550", + "statusBar.debuggingBackground": "#354550", + "statusBar.noFolderBackground": "#354550", + "titleBar.activeBackground": "#354550", "activityBar.background": "#292935", "activityBarBadge.foreground": "#ffffff", "activityBarBadge.background": "#3655b5", "sideBar.background": "#232327", "sideBarSectionHeader.background": "#424250", "notification.foreground": "#ffe0ff", + "pickerGroup.foreground": "#77a5b0", "terminal.ansiWhite": "#ddffff" }, diff --git a/extensions/theme-quietlight/themes/quietlight-color-theme.json b/extensions/theme-quietlight/themes/quietlight-color-theme.json index e33c477a18ba9..ee6b59a1d8689 100644 --- a/extensions/theme-quietlight/themes/quietlight-color-theme.json +++ b/extensions/theme-quietlight/themes/quietlight-color-theme.json @@ -458,13 +458,15 @@ "pickerGroup.border": "#749351", "list.activeSelectionForeground": "#6c6c6c", "list.focusBackground": "#CADEB9", - "list.activeSelectionBackground": "#B6C8A7", + "list.activeSelectionBackground": "#c4d9b1", + "list.inactiveSelectionBackground": "#d3dbcd", "editor.background": "#F5F5F5", "editorWhitespace.foreground": "#AAAAAA", "editor.lineHighlightBackground": "#E4F6D4", "editor.selectionBackground": "#C9D0D9", "panel.background": "#F5F5F5", "sideBar.background": "#F2F2F2", + "sideBarSectionHeader.background": "#ede8ef", "editorLineNumber.foreground": "#9DA39A", "editorCursor.foreground": "#54494B", "inputOption.activeBorder": "#adafb7", @@ -477,7 +479,12 @@ "peekViewResult.background": "#F2F8FC", "peekViewResult.matchHighlightBackground": "#93C6D6", "statusBar.background": "#705697", + "statusBar.noFolderBackground": "#705697", + "statusBar.debuggingBackground": "#705697", "activityBar.background": "#EDEDF5", - "activityBar.foreground": "#705697" + "activityBar.foreground": "#705697", + "titleBar.activeBackground": "#c4b7d7", + "button.background": "#705697", + "notification.background": "#442e66" } } \ No newline at end of file diff --git a/extensions/theme-red/themes/Red-color-theme.json b/extensions/theme-red/themes/Red-color-theme.json index 55372ceb608e1..6fbc185c97f3b 100644 --- a/extensions/theme-red/themes/Red-color-theme.json +++ b/extensions/theme-red/themes/Red-color-theme.json @@ -27,7 +27,6 @@ "editor.lineHighlightBackground": "#ff000033", "editor.hoverHighlightBackground": "#ff000044", "editor.selectionHighlightBackground": "#f5500039", - "editorLink.foreground": "#D69B6A", "editorLink.activeForeground": "#FFD0AA", "peekViewTitle.background": "#550000", "peekView.border": "#ff000044", @@ -37,14 +36,13 @@ "debugToolBar.background": "#660000", "focusBorder": "#ff6666aa", "button.background": "#885555", - "button.hoverBackground": "#aa5555", "dropdown.background": "#580000", "input.background": "#580000", "inputOption.activeBorder": "#cc0000", "inputValidation.infoBackground": "#550000", "inputValidation.infoBorder": "#773333", "list.hoverBackground": "#800000", - "list.activeSelectionBackground": "#700000", + "list.activeSelectionBackground": "#880000", "list.inactiveSelectionBackground": "#770000", "list.focusBackground": "#660000", "list.highlightForeground": "#ff4444", diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index 116bdf1705abe..9d5e9c8fe3839 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -296,11 +296,15 @@ // Base // "foreground": "", "focusBorder": "#2AA19899", + // "contrastActiveBorder": "", + // "contrastBorder": "", // "widget.shadow": "", "input.background": "#003847", "input.foreground": "#93A1A1", + // "input.border": "", + "inputOption.activeBorder": "#2AA19899", "inputValidation.infoBorder": "#384078", "inputValidation.infoBackground": "#051336", @@ -311,18 +315,18 @@ "dropdown.background": "#00212B", "dropdown.border": "#2AA19899", + // "dropdown.foreground": "", "button.background": "#2AA19899", - "button.hoverBackground": "#2AA19844", // "button.foreground": "", - "list.activeSelectionBackground": "#004454", + "list.activeSelectionBackground": "#005A6F", // "list.activeSelectionForeground": "", "list.focusBackground": "#005A6F", "list.hoverBackground": "#004454AA", "list.inactiveSelectionBackground": "#00445488", "list.dropBackground": "#00445488", - // "list.highlightForeground": "", + "list.highlightForeground": "#047aa6", // "scrollbar.shadow": "", // "scrollbarSlider.activeBackground": "", @@ -331,7 +335,7 @@ // Editor "editor.background": "#002B36", - "editor.foreground": "#6688cc", + // "editor.foreground": "#6688cc", "editorWidget.background": "#00212B", "editorCursor.foreground": "#D30102", "editorWhitespace.foreground": "#93A1A180", @@ -342,8 +346,8 @@ // "editorHoverWidget.border": "", // "editorLineNumber.foreground": "", // "editorMarkerNavigation.background": "", - // "editorMarkerNavigationError.background": "", - // "editorMarkerNavigationWarning.background": "", + "editorMarkerNavigationError.background": "#AB395B", + "editorMarkerNavigationWarning.background": "#5B7E7A", // "editorLink.activeForeground": "", // "editor.findMatchBackground": "", // "editor.findMatchHighlightBackground": "", @@ -351,14 +355,18 @@ // "editor.hoverHighlightBackground": "", // "editor.inactiveSelectionBackground": "", // "editor.lineHighlightBorder": "", - // "editorLink.foreground": "", // "editor.rangeHighlightBackground": "", // "editor.selectionHighlightBackground": "", - // "editorSuggestWidget.background": "", - // "editorSuggestWidget.border": "", // "editor.wordHighlightBackground": "", // "editor.wordHighlightStrongBackground": "", + // Editor: Suggest + // "editorSuggestWidget.background": "", + // "editorSuggestWidget.border": "", + // "editorSuggestWidget.foreground": "", + // "editorSuggestWidget.highlightForeground": "", + // "editorSuggestWidget.selectedBackground": "", + // Editor: Peek View "peekViewResult.background": "#00212B", // "peekViewResult.lineForeground": "", @@ -381,26 +389,30 @@ // Workbench: Title "titleBar.activeBackground": "#002C39", - "titleBar.inactiveBackground": "#002C39", + // "titleBar.inactiveBackground": "", + // "titleBar.activeForeground": "", + // "titleBar.inactiveForeground": "", // Workbench: Editors // "editorGroupHeader.noTabsBackground": "", "editorGroup.border": "#00212B", "editorGroup.background": "#011b23", "editorGroup.dropBackground": "#00212BAA", + "editorGroupHeader.tabsBackground": "#004052", // Workbench: Tabs "tab.activeForeground": "#d6dbdb", "tab.activeBackground": "#002B37", "tab.inactiveForeground": "#93A1A1", "tab.inactiveBackground": "#004052", - "editorGroupHeader.tabsBackground": "#004052", "tab.border": "#003847", // Workbench: Activity Bar "activityBar.background": "#003847", - // "activityBar.dropBackground": "#00212B", "activityBarBadge.background": "#047aa6", + // "activityBar.dropBackground": "", + // "activityBar.foreground": "", + // "activityBarBadge.foreground": "", // Workbench: Panel // "panel.background": "", @@ -427,7 +439,7 @@ // Workbench: Debug "debugToolBar.background": "#00212B", "debugExceptionWidget.background": "#00212B", - // "debugExceptionWidget.border": "", + "debugExceptionWidget.border": "#AB395B", // Workbench: Notifications "notification.background": "#003847", diff --git a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json index ebdc00f303e6b..de82f12028307 100644 --- a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -292,43 +292,180 @@ } ], "colors": { + + // Base + // "foreground": "", + "focusBorder": "#D3AF86", + // "contrastActiveBorder": "", + // "contrastBorder": "", + + // "widget.shadow": "", + + "input.background": "#DDD6C1", + // "input.border": "", + "input.foreground": "#586E75", + "inputOption.activeBorder": "#D3AF86", + // "inputValidation.infoBorder": "", + // "inputValidation.infoBackground": "", + // "inputValidation.warningBackground": "", + // "inputValidation.warningBorder": "", + // "inputValidation.errorBackground": "", + // "inputValidation.errorBorder": "", + + "dropdown.background": "#EEE8D5", + // "dropdown.foreground": "", + "dropdown.border": "#D3AF86", + + "button.background": "#AC9D57", + // "button.foreground": "", + + "list.activeSelectionBackground": "#DFCA88", + "list.activeSelectionForeground": "#6C6C6C", + "list.focusBackground": "#DFCA8866", + "list.hoverBackground": "#DFCA8844", + "list.inactiveSelectionBackground": "#D1CBB8", + "list.highlightForeground": "#B58900", + + // "scrollbar.shadow": "", + // "scrollbarSlider.activeBackground": "", + // "scrollbarSlider.background": "", + // "scrollbarSlider.hoverBackground": "", + + // Editor "editor.background": "#FDF6E3", + // "editor.foreground": "#6688cc", + "editorWidget.background": "#EEE8D5", "editorCursor.foreground": "#657B83", "editorWhitespace.foreground": "#586E7580", "editor.lineHighlightBackground": "#EEE8D5", "editor.selectionBackground": "#EEE8D5", + // "editorIndentGuide.background": "", + "editorHoverWidget.background": "#CCC4B0", + // "editorHoverWidget.border": "", + // "editorLineNumber.foreground": "", + // "editorMarkerNavigation.background": "", + // "editorMarkerNavigationError.background": "", + // "editorMarkerNavigationWarning.background": "", + // "editorLink.activeForeground": "", + // "editor.findMatchBackground": "", + // "editor.findMatchHighlightBackground": "", + // "editor.findRangeHighlightBackground": "", + // "editor.hoverHighlightBackground": "", + // "editor.inactiveSelectionBackground": "", + // "editor.lineHighlightBorder": "", + // "editor.rangeHighlightBackground": "", + // "editor.selectionHighlightBackground": "", + // "editor.wordHighlightBackground": "", + // "editor.wordHighlightStrongBackground": "", - "sideBar.background": "#EEE8D5", - "sideBarTitle.foreground": "#586E75", + // Editor: Suggest Widget + // "editorSuggestWidget.background": "", + // "editorSuggestWidget.border": "", + // "editorSuggestWidget.foreground": "", + // "editorSuggestWidget.highlightForeground": "", + // "editorSuggestWidget.selectedBackground": "", + + // Editor: Peek View + "peekViewResult.background": "#EEE8D5", + // "peekViewResult.lineForeground": "", + // "peekViewResult.selectionBackground": "", + // "peekViewResult.selectionForeground": "", + "peekViewEditor.background": "#FFFBF2", + "peekViewTitle.background": "#EEE8D5", + "peekView.border": "#B58900", + "peekViewEditor.matchHighlightBackground": "#7744AA40", + // "peekViewResult.fileForeground": "", + // "peekViewResult.matchHighlightBackground": "", + // "peekViewTitleLabel.foreground": "", + // "peekViewTitleDescription.foreground": "", + + // Editor: Diff + // "diffEditor.insertedTextBackground": "", + // "diffEditor.insertedTextBorder": "", + // "diffEditor.removedTextBackground": "", + // "diffEditor.removedTextBorder": "", + + // Workbench: Title + "titleBar.activeBackground": "#EEE8D5", + // "titleBar.activeForeground": "", + // "titleBar.inactiveBackground": "", + // "titleBar.inactiveForeground": "", + + // Workbench: Editors + // "editorGroupHeader.noTabsBackground": "", + "editorGroup.border": "#DDD6C1", + "editorGroup.background": "#FFFBF2", + "editorGroup.dropBackground": "#DDD6C1AA", + "editorGroupHeader.tabsBackground": "#D9D2C2", + + // Workbench: Tabs + "tab.border": "#DDD6C1", + "tab.activeBackground": "#FDF6E3", + "tab.inactiveForeground": "#586E75", + "tab.inactiveBackground": "#D3CBB7", + // "tab.activeBackground": "", + // "tab.activeForeground": "", + // "tab.inactiveForeground": "", + + // Workbench: Activity Bar "activityBar.background": "#DDD6C1", "activityBar.foreground": "#584c27", "activityBar.dropBackground": "#EEE8D5", "activityBarBadge.background": "#B58900", - "editorWidget.background": "#EEE8D5", - "input.background": "#DDD6C1", - "input.foreground": "#586E75", - "inputOption.activeBorder": "#2AA19899", - "focusBorder": "#2AA19899", - "titleBar.activeBackground": "#002C39", - "titleBar.inactiveBackground": "#002C39", + // "activityBarBadge.foreground": "", + + // Workbench: Panel + // "panel.background": "", + "panel.border": "#DDD6C1", + // "panelTitle.activeBorder": "", + // "panelTitle.activeForeground": "", + // "panelTitle.inactiveForeground": "", + + // Workbench: Side Bar + "sideBar.background": "#EEE8D5", + "sideBarTitle.foreground": "#586E75", + // "sideBarSectionHeader.background": "", + + // Workbench: Status Bar "statusBar.foreground": "#586E75", "statusBar.background": "#EEE8D5", "statusBar.debuggingBackground": "#EEE8D5", "statusBar.noFolderBackground": "#EEE8D5", - // "tab.activeForeground": "#d6dbdb", - "tab.activeBackground": "#FDF6E3", - "tab.inactiveForeground": "#586E75", - "tab.inactiveBackground": "#CCC4B0", - "editorGroupHeader.tabsBackground": "#CCC4B0", - "tab.border": "#DDD6C1", - "debugToolBar.background": "#EEE8D5", - "dropdown.background": "#EEE8D5", - "dropdown.border": "#2AA19899", + // "statusBar.foreground": "", + "statusBarItem.prominentBackground": "#DDD6C1", + "statusBarItem.prominentHoverBackground": "#DDD6C199", + // "statusBarItem.activeBackground": "", + // "statusBarItem.hoverBackground": "", - "peekViewResult.background": "#EEE8D5", - "peekViewTitle.background": "#EEE8D5", - "peekViewEditor.matchHighlightBackground": "#7744AA40", - "editorHoverWidget.background": "#CCC4B0" + // Workbench: Debug + "debugToolBar.background": "#DDD6C1", + "debugExceptionWidget.background": "#DDD6C1", + "debugExceptionWidget.border": "#AB395B", + + // Workbench: Notifications + "notification.background": "#999178", + // "notification.foreground": "", + + // Workbench: Quick Open + "pickerGroup.border": "#2AA19899", + "pickerGroup.foreground": "#2AA19899" + // Workbench: Terminal + // "terminal.ansiBlack": "#111111", + // "terminal.ansiRed": "#ff9da4", + // "terminal.ansiGreen": "#d1f1a9", + // "terminal.ansiYellow": "#ffeead", + // "terminal.ansiBlue": "#bbdaff", + // "terminal.ansiMagenta": "#ebbbff", + // "terminal.ansiCyan": "#99ffff", + // "terminal.ansiWhite": "#cccccc", + // "terminal.ansiBrightBlack": "#333333", + // "terminal.ansiBrightRed": "#ff7882", + // "terminal.ansiBrightGreen": "#b8f171", + // "terminal.ansiBrightYellow": "#ffe580", + // "terminal.ansiBrightBlue": "#80baff", + // "terminal.ansiBrightMagenta": "#d778ff", + // "terminal.ansiBrightCyan": "#78ffff", + // "terminal.ansiBrightWhite": "#ffffff" } } \ No newline at end of file diff --git a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json index a2d815a46a110..3b1d2c5acc225 100644 --- a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json +++ b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json @@ -5,10 +5,10 @@ "input.background": "#001733", "dropdown.background": "#001733", "list.focusBackground": "#ffffff60", - "list.activeSelectionBackground": "#ffffff50", + "list.activeSelectionBackground": "#ffffff60", "list.inactiveSelectionBackground": "#ffffff40", "list.hoverBackground": "#ffffff30", - "list.dropBackground": "#ffffff60", + "list.highlightForeground": "#bbdaff", "pickerGroup.foreground": "#bbdaff", "editor.background": "#002451", "editor.foreground": "#ffffff", @@ -21,14 +21,18 @@ "editorHoverWidget.border": "#ffffff44", "editorGroup.border": "#404f7d", "editorGroupHeader.tabsBackground": "#001733", + "editorGroup.background": "#1c1c2a", + "editorGroup.dropBackground": "#25375daa", + "peekViewResult.background": "#001c40", "tab.inactiveBackground": "#001c40", + "titleBar.activeBackground": "#001126", "statusBar.background": "#001126", "statusBar.noFolderBackground": "#001126", + "statusBar.debuggingBackground": "#ffeead", "activityBar.background": "#001733", "activityBarBadge.background": "#bbdaff", "activityBarBadge.foreground": "#001733", "sideBar.background": "#001c40", - "statusBar.debuggingBackground": "#ffeead", "terminal.ansiBlack": "#111111", "terminal.ansiRed": "#ff9da4", "terminal.ansiGreen": "#d1f1a9", diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 60c7b82aac645..c9a767329d0fc 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -148,7 +148,7 @@ export const listActiveSelectionBackground = registerColor('list.activeSelection export const listInactiveSelectionBackground = registerColor('list.inactiveSelectionBackground', { dark: '#3F3F46', light: '#CCCEDB', hc: null }, nls.localize('listInactiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); export const listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('listActiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); export const listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, nls.localize('listHoverBackground', "List/Tree background when hovering over items using the mouse.")); -export const listDropBackground = registerColor('list.dropBackground', { dark: '#383B3D', light: '#DDECFF', hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse.")); +export const listDropBackground = registerColor('list.dropBackground', { dark: listFocusBackground, light: listFocusBackground, hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse.")); export const listHighlightForeground = registerColor('list.highlightForeground', { dark: '#219AE4', light: '#186B9E', hc: '#219AE4' }, nls.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.')); export const pickerGroupForeground = registerColor('pickerGroup.foreground', { dark: Color.fromHex('#0097FB').transparent(0.6), light: Color.fromHex('#007ACC').transparent(0.6), hc: Color.white }, nls.localize('pickerGroupForeground', "Quick picker color for grouping labels.")); @@ -156,7 +156,7 @@ export const pickerGroupBorder = registerColor('pickerGroup.border', { dark: '#3 export const buttonForeground = registerColor('button.foreground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('buttonForeground', "Button foreground color.")); export const buttonBackground = registerColor('button.background', { dark: '#0E639C', light: '#007ACC', hc: null }, nls.localize('buttonBackground', "Button background color.")); -export const buttonHoverBackground = registerColor('button.hoverBackground', { dark: '#006BB3', light: '#006BB3', hc: null }, nls.localize('buttonHoverBackground', "Button background color when hovering.")); +export const buttonHoverBackground = registerColor('button.hoverBackground', { dark: lighten(buttonBackground, 0.2), light: darken(buttonBackground, 0.2), hc: null }, nls.localize('buttonHoverBackground', "Button background color when hovering.")); export const scrollbarShadow = registerColor('scrollbar.shadow', { dark: '#000000', light: '#DDDDDD', hc: null }, nls.localize('scrollbarShadow', "Scrollbar shadow to indicate that the view is scrolled.")); export const scrollbarSliderBackground = registerColor('scrollbarSlider.background', { dark: Color.fromHex('#797979').transparent(0.4), light: Color.fromHex('#646464').transparent(0.4), hc: transparent(contrastBorder, 0.6) }, nls.localize('scrollbarSliderBackground', "Slider background color.")); From 0533eec76c72f663eaf4f223672a77eb5d28c7aa Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Sun, 30 Apr 2017 12:27:50 -0700 Subject: [PATCH 0097/2747] Pick up TS 2.3.2 Fixes #25699 --- extensions/npm-shrinkwrap.json | 6 +++--- extensions/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/npm-shrinkwrap.json b/extensions/npm-shrinkwrap.json index 9079dd51c957d..34796990f9d12 100644 --- a/extensions/npm-shrinkwrap.json +++ b/extensions/npm-shrinkwrap.json @@ -3,9 +3,9 @@ "version": "0.0.1", "dependencies": { "typescript": { - "version": "2.3.1", - "from": "typescript@typescript@2.3.1", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.3.1.tgz" + "version": "2.3.2", + "from": "typescript@typescript@2.3.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.3.2.tgz" } } } diff --git a/extensions/package.json b/extensions/package.json index 59748875eb879..a25b7298ebfcd 100644 --- a/extensions/package.json +++ b/extensions/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "description": "Dependencies shared by all extensions", "dependencies": { - "typescript": "typescript@2.3.1" + "typescript": "typescript@2.3.2" }, "scripts": { "postinstall": "node ./postinstall" From e5979644f4ac498f263e795dac56f8616597a793 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 30 Apr 2017 12:42:55 -0700 Subject: [PATCH 0098/2747] Make debug status bar readable in tomorrow night blue theme Fixes #25640 --- .../themes/tomorrow-night-blue-theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json index 3b1d2c5acc225..3c746a4728bc4 100644 --- a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json +++ b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json @@ -28,7 +28,7 @@ "titleBar.activeBackground": "#001126", "statusBar.background": "#001126", "statusBar.noFolderBackground": "#001126", - "statusBar.debuggingBackground": "#ffeead", + "statusBar.debuggingBackground": "#001126", "activityBar.background": "#001733", "activityBarBadge.background": "#bbdaff", "activityBarBadge.foreground": "#001733", From 4188e91d5f1b74177fbd0be652d32ed205bac7b2 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 1 May 2017 09:32:39 +0200 Subject: [PATCH 0099/2747] Revert "commands - shortest match wins" This reverts commit be3e2a6d250d631c553af4f062880aa81a990b28. --- .../workbench/parts/quickopen/browser/commandsHandler.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts index 7683c5dad9e10..babd5ed62e214 100644 --- a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts @@ -285,12 +285,8 @@ export class CommandsHandler extends QuickOpenHandler { // Remove duplicates entries = arrays.distinct(entries, (entry) => entry.getLabel() + entry.getGroupLabel()); - // Sorting - if (!searchValue) { - entries = entries.sort((elementA, elementB) => elementA.getLabel().toLowerCase().localeCompare(elementB.getLabel().toLowerCase())); - } else { - entries = entries.sort((elementA, elementB) => elementA.getLabel().length - elementB.getLabel().length); - } + // Sort by name + entries = entries.sort((elementA, elementB) => elementA.getLabel().toLowerCase().localeCompare(elementB.getLabel().toLowerCase())); return TPromise.as(new QuickOpenModel(entries)); } From 818fa5a50f39ed9a3f4803a7fd5f3f1fe0be2247 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rokas=20Ge=C4=8Das?= Date: Mon, 1 May 2017 16:44:00 +0300 Subject: [PATCH 0100/2747] #10542 Ability to merge local git branches --- extensions/git/package.json | 5 +++++ extensions/git/package.nls.json | 1 + extensions/git/src/commands.ts | 35 ++++++++++++++++++++++++++++++--- extensions/git/src/git.ts | 5 +++++ extensions/git/src/model.ts | 7 ++++++- 5 files changed, 49 insertions(+), 4 deletions(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index bd3d175c58ae3..2d57328aeed69 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -172,6 +172,11 @@ "title": "%command.branch%", "category": "Git" }, + { + "command": "git.merge", + "title": "%command.merge%", + "category": "Git" + }, { "command": "git.pull", "title": "%command.pull%", diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index 11c7347fa07a8..0559e65750058 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -21,6 +21,7 @@ "command.undoCommit": "Undo Last Commit", "command.checkout": "Checkout to...", "command.branch": "Create Branch...", + "command.merge": "Merge Branch...", "command.pull": "Pull", "command.pullRebase": "Pull (Rebase)", "command.push": "Push", diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 399cfd10a163d..4f4856e634088 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -17,15 +17,21 @@ import * as nls from 'vscode-nls'; const localize = nls.loadMessageBundle(); -class CheckoutItem implements QuickPickItem { +class CheckoutBasicItem implements QuickPickItem { + get label(): string { return this.ref.name || ''; } + get description(): string { return this.ref.name || ''; } + + constructor(protected ref: Ref) { } +} + + +class CheckoutItem extends CheckoutBasicItem { protected get shortCommit(): string { return (this.ref.commit || '').substr(0, 8); } protected get treeish(): string | undefined { return this.ref.name; } get label(): string { return this.ref.name || this.shortCommit; } get description(): string { return this.shortCommit; } - constructor(protected ref: Ref) { } - async run(model: Model): Promise { const ref = this.treeish; @@ -671,6 +677,29 @@ export class CommandCenter { await this.model.branch(name); } + @command('git.merge') + async merge(): Promise { + const config = workspace.getConfiguration('git'); + const checkoutType = config.get('checkoutType') || 'all'; + const includeRemotes = checkoutType === 'all' || checkoutType === 'remote'; + + const heads = this.model.refs.filter(ref => ref.type === RefType.Head) + .map(ref => new CheckoutItem(ref)); + + const remoteHeads = (includeRemotes ? this.model.refs.filter(ref => ref.type === RefType.RemoteHead) : []) + .map(ref => new CheckoutRemoteHeadItem(ref)); + + const picks = [...heads, ...remoteHeads]; + const placeHolder = 'Select a ref to checkout'; + const choice = await window.showQuickPick(picks, { placeHolder }); + + if (!choice) { + return; + } + + await this.model.merge(choice.label); + } + @command('git.pull') async pull(): Promise { const remotes = this.model.remotes; diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 4adc617a3ebb0..e161b9ef65c30 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -650,6 +650,11 @@ export class Repository { await this.run(args); } + async merge(name: string): Promise { + const args = ['merge', name]; + await this.run(args); + } + async clean(paths: string[]): Promise { const pathsByGroup = groupBy(paths, p => path.dirname(p)); const groups = Object.keys(pathsByGroup).map(k => pathsByGroup[k]); diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index 1d74a87d3a3a0..f8b1ce56e06cf 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -211,7 +211,8 @@ export enum Operation { Init = 1 << 12, Show = 1 << 13, Stage = 1 << 14, - GetCommitTemplate = 1 << 15 + GetCommitTemplate = 1 << 15, + Merge = 1 << 16 } // function getOperationName(operation: Operation): string { @@ -454,6 +455,10 @@ export class Model implements Disposable { await this.run(Operation.Branch, () => this.repository.branch(name, true)); } + async merge(name: string): Promise { + await this.run(Operation.Merge, () => this.repository.merge(name)); + } + async checkout(treeish: string): Promise { await this.run(Operation.Checkout, () => this.repository.checkout(treeish, [])); } From b404610117a2e69306b66ca3a8ea29f976d89be8 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 1 May 2017 11:11:25 -0700 Subject: [PATCH 0101/2747] Tomorrow night blue: Style debug toolbar Fixes #25641 --- .../themes/tomorrow-night-blue-theme.json | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json index 3c746a4728bc4..1e1ba355fb2d2 100644 --- a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json +++ b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json @@ -25,6 +25,7 @@ "editorGroup.dropBackground": "#25375daa", "peekViewResult.background": "#001c40", "tab.inactiveBackground": "#001c40", + "debugToolBar.background": "#001c40", "titleBar.activeBackground": "#001126", "statusBar.background": "#001126", "statusBar.noFolderBackground": "#001126", From 36baf609e16154a711f619b7e5b5692d2f82c620 Mon Sep 17 00:00:00 2001 From: Andy Date: Mon, 1 May 2017 13:35:35 -0700 Subject: [PATCH 0102/2747] Remove unnecessary parentheses (#25573) --- extensions/typescript/src/typescriptServiceClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 2bbef406fa678..66e83da01853a 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -225,7 +225,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient if (this.servicePromise === null && (oldglobalTsdk !== this.globalTsdk || oldLocalTsdk !== this.localTsdk)) { this.startService(); - } else if (this.servicePromise !== null && (this.tsServerLogLevel !== oldLoggingLevel || (oldglobalTsdk !== this.globalTsdk || oldLocalTsdk !== this.localTsdk))) { + } else if (this.servicePromise !== null && (this.tsServerLogLevel !== oldLoggingLevel || oldglobalTsdk !== this.globalTsdk || oldLocalTsdk !== this.localTsdk)) { this.restartTsServer(); } })); From ef8f884a6552d9823b207677657d8cee8deab17b Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 1 May 2017 14:14:57 -0700 Subject: [PATCH 0103/2747] Tweak Red theme colors. Fixes #25744 --- extensions/theme-red/themes/Red-color-theme.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/extensions/theme-red/themes/Red-color-theme.json b/extensions/theme-red/themes/Red-color-theme.json index 6fbc185c97f3b..75bffa975466d 100644 --- a/extensions/theme-red/themes/Red-color-theme.json +++ b/extensions/theme-red/themes/Red-color-theme.json @@ -2,7 +2,7 @@ "tokenColors": "./red.tmTheme", "colors": { // window - "activityBarBadge.background": "#DB7E58", + "activityBarBadge.background": "#cc3333", "activityBar.background": "#580000", "tab.inactiveBackground": "#300a0a", "tab.activeBackground": "#490000", @@ -35,15 +35,17 @@ // UI "debugToolBar.background": "#660000", "focusBorder": "#ff6666aa", - "button.background": "#885555", + "button.background": "#833", "dropdown.background": "#580000", "input.background": "#580000", "inputOption.activeBorder": "#cc0000", "inputValidation.infoBackground": "#550000", - "inputValidation.infoBorder": "#773333", + "inputValidation.infoBorder": "#DB7E58", "list.hoverBackground": "#800000", "list.activeSelectionBackground": "#880000", "list.inactiveSelectionBackground": "#770000", + "list.dropBackground": "#662222", + "list.focusAndSelectionBackground": "#882222", "list.focusBackground": "#660000", "list.highlightForeground": "#ff4444", "notification.background": "#662222", From 24b71e9d56432fdb09bdb42ecc4d70099808a4c4 Mon Sep 17 00:00:00 2001 From: rebornix Date: Mon, 1 May 2017 14:51:20 -0700 Subject: [PATCH 0104/2747] Tweak Quite Light theme badge color. --- extensions/theme-quietlight/themes/quietlight-color-theme.json | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/theme-quietlight/themes/quietlight-color-theme.json b/extensions/theme-quietlight/themes/quietlight-color-theme.json index ee6b59a1d8689..6abbf60dddb82 100644 --- a/extensions/theme-quietlight/themes/quietlight-color-theme.json +++ b/extensions/theme-quietlight/themes/quietlight-color-theme.json @@ -483,6 +483,7 @@ "statusBar.debuggingBackground": "#705697", "activityBar.background": "#EDEDF5", "activityBar.foreground": "#705697", + "activityBarBadge.background": "#705697", "titleBar.activeBackground": "#c4b7d7", "button.background": "#705697", "notification.background": "#442e66" From de55855f3b893137c449431b59c115926b3592af Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 1 May 2017 15:12:07 -0700 Subject: [PATCH 0105/2747] Redo monokai colors Part of #25742 --- .../themes/monokai-color-theme.json | 99 +++++++++++++------ 1 file changed, 69 insertions(+), 30 deletions(-) diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index c97b363b397f1..7c44472891f3b 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -1,39 +1,78 @@ { "type": "dark", "colors": { - "dropdown.background": "#383852", - "list.activeSelectionBackground": "#383852", - "list.focusBackground": "#425370", - "list.inactiveSelectionBackground": "#23324e", - "list.hoverBackground": "#005070", - "list.dropBackground": "#505590", - "list.highlightForeground": "#e58520", - "button.background": "#5088a3", - "editor.background": "#202025", + "dropdown.background": "#414339", + "list.activeSelectionBackground": "#f92672", + "list.focusBackground": "#414339", + "list.inactiveSelectionBackground": "#414339", + "list.hoverBackground": "#272822", + "list.dropBackground": "#414339", + "list.highlightForeground": "#f92672", + "button.background": "#f92672", + "editor.background": "#272822", "editor.foreground": "#f8f8f2", "editor.selectionBackground": "#49483e", - "editor.lineHighlightBackground": "#303030", - "editorCursor.foreground": "#c07020", - "editorWhitespace.foreground": "#383880", - "editorIndentGuide.background": "#505037", - "editorGroupHeader.tabsBackground": "#222228", - // "tab.activeBackground": "#272738", - "tab.inactiveBackground": "#333340", + "editor.lineHighlightBackground": "#3e3d32", + "editorCursor.foreground": "#f8f8f0", + "editorWhitespace.foreground": "#464741", + "editorIndentGuide.background": "#464741", + "editorGroupHeader.tabsBackground": "#1e1f1c", + "editorGroup.dropBackground": "#41433980", + "tab.inactiveBackground": "#414339", "tab.border": "#000030", - "panelTitle.activeForeground": "#ddffff", - "statusBar.background": "#354550", - "statusBar.debuggingBackground": "#354550", - "statusBar.noFolderBackground": "#354550", - "titleBar.activeBackground": "#354550", - "activityBar.background": "#292935", - "activityBarBadge.foreground": "#ffffff", - "activityBarBadge.background": "#3655b5", - "sideBar.background": "#232327", - "sideBarSectionHeader.background": "#424250", - "notification.foreground": "#ffe0ff", - "pickerGroup.foreground": "#77a5b0", - "terminal.ansiWhite": "#ddffff" - + "tab.inactiveForeground": "#ccccc7", // needs to be bright so it's readable when another editor group is focused + "widget.shadow": "#1e1f1c", + "editorLineNumber.foreground": "#90908a", + "panelTitle.activeForeground": "#f8f8f2", + "panelTitle.activeBorder": "#f92672", + "panelTitle.inactiveForeground": "#75715E", // comment color + "panel.border": "#414339", + "statusBar.background": "#414339", + "statusBar.noFolderBackground": "#414339", + "statusBar.debuggingBackground": "#f92672", + "activityBar.background": "#272822", + "activityBarBadge.foreground": "#f8f8f2", + "activityBarBadge.background": "#f92672", + "activityBar.foreground": "#f8f8f2", + "activityBar.dropBackground": "#414339", + "sideBar.background": "#1e1f1c", + "sideBarSectionHeader.background": "#272822", + "notification.foreground": "#1e1f1c", + "pickerGroup.foreground": "#f92672", + "input.background": "#414339", + "focusBorder": "#f92672", + "editorWidget.background": "#1e1f1c", + "debugToolBar.background": "#1e1f1c", + "diffEditor.insertedTextBackground": "#66852880", // middle of #272822 and #a6e22e + "diffEditor.removedTextBackground": "#90274A80", // middle of f92672 and #a6e22e + "editorHoverWidget.background": "#414339", + "editorHoverWidget.border": "#75715E", // comment color + "editorSuggestWidget.background": "#272822", + "editorSuggestWidget.border": "#75715E", // comment color + "editorGroup.border": "#414339", // comment color + "peekView.border": "#f92672", + "peekViewEditor.background": "#272822", + "peekViewResult.background": "#1e1f1c", + "peekViewTitle.background": "#1e1f1c", + "peekViewResult.selectionBackground": "#414339", + "peekViewResult.matchHighlightBackground": "#75715E", + "peekViewEditor.matchHighlightBackground": "#75715E", + "terminal.ansiBlack": "#333333", + "terminal.ansiRed": "#f92672BF", + "terminal.ansiGreen": "#A6E22EBF", + "terminal.ansiYellow": "#e2e22eBF", + "terminal.ansiBlue": "#819affBF", + "terminal.ansiMagenta": "#AE81FFBF", + "terminal.ansiCyan": "#66D9EFBF", + "terminal.ansiWhite": "#e3e3dd", + "terminal.ansiBrightBlack": "#666666", + "terminal.ansiBrightRed": "#f92672", + "terminal.ansiBrightGreen": "#A6E22E", + "terminal.ansiBrightYellow": "#e2e22e", // hue shifted #A6E22E + "terminal.ansiBrightBlue": "#819aff", // hue shifted #AE81FF + "terminal.ansiBrightMagenta": "#AE81FF", + "terminal.ansiBrightCyan": "#66D9EF", + "terminal.ansiBrightWhite": "#f8f8f2" }, "tokenColors": [ { From 479eb68a13a1cf8b39cdb51bcc388d873763e420 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 1 May 2017 16:02:58 -0700 Subject: [PATCH 0106/2747] Fix monokai tab border color Part of #25742 --- extensions/theme-monokai/themes/monokai-color-theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index 7c44472891f3b..3f9ea01f819e4 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -19,7 +19,7 @@ "editorGroupHeader.tabsBackground": "#1e1f1c", "editorGroup.dropBackground": "#41433980", "tab.inactiveBackground": "#414339", - "tab.border": "#000030", + "tab.border": "#1e1f1c", "tab.inactiveForeground": "#ccccc7", // needs to be bright so it's readable when another editor group is focused "widget.shadow": "#1e1f1c", "editorLineNumber.foreground": "#90908a", From c623dfadd1cc16d02652de14e23d27218ca3e609 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Mon, 1 May 2017 16:18:01 -0700 Subject: [PATCH 0107/2747] [WelcomeUX] Windows: Filter current folder from Recent section (fixes #25750) --- .../welcome/page/electron-browser/welcomePage.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 8992dda52fadd..7231ee075f853 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -36,6 +36,7 @@ import { tildify } from 'vs/base/common/labels'; import { editorBackground } from 'vs/platform/theme/common/colorRegistry'; import { Themable } from 'vs/workbench/common/theme'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; +import { isLinux } from 'vs/base/common/platform'; used(); @@ -174,7 +175,7 @@ class WelcomePage { recentlyOpened.then(({ folders }) => { if (this.contextService.hasWorkspace()) { const current = this.contextService.getWorkspace().resource.fsPath; - folders = folders.filter(folder => folder !== current); + folders = folders.filter(folder => !this.pathEquals(folder, current)); } if (!folders.length) { const recent = container.querySelector('.welcomePage') as HTMLElement; @@ -254,6 +255,15 @@ class WelcomePage { this.disposables.push(new WelcomeTheming(this.themeService, container)); } + private pathEquals(path1: string, path2: string): boolean { + if (!isLinux) { + path1 = path1.toLowerCase(); + path2 = path2.toLowerCase(); + } + + return path1 === path2; + } + private installKeymap(keymapName: string, keymapIdentifier: string): void { this.telemetryService.publicLog('installKeymap', { from: telemetryFrom, From 9504f9e0544632ac5c7140cd037ef44845fd69a6 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 1 May 2017 18:37:54 -0700 Subject: [PATCH 0108/2747] Fix TS 2.3.2 compile error --- src/vs/base/common/network.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/common/network.ts b/src/vs/base/common/network.ts index 7444e2c3a5f53..109504468f80c 100644 --- a/src/vs/base/common/network.ts +++ b/src/vs/base/common/network.ts @@ -88,7 +88,7 @@ export function xhr(options: IXHROptions): TPromise { options.user, options.password ); - req.responseType = options.responseType || ''; + req.responseType = (options.responseType as XMLHttpRequestResponseType) || ''; Object.keys(options.headers || {}).forEach((k) => { req.setRequestHeader(k, options.headers[k]); From 5dbb1e5870c717d59adbe207b980e74f8765bcac Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Mon, 1 May 2017 19:03:19 -0700 Subject: [PATCH 0109/2747] Fixes #23005 --- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 729331aa2773c..958d45a3cc643 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -637,7 +637,7 @@ export class SuggestWidget implements IContentWidget, IDelegate this.completionModel = completionModel; - if (isFrozen && this.state !== State.Empty) { + if (isFrozen && this.state !== State.Empty && this.state !== State.Hidden) { this.setState(State.Frozen); return; } @@ -667,7 +667,11 @@ export class SuggestWidget implements IContentWidget, IDelegate this.list.setFocus([0]); this.list.reveal(0, 0); - this.setState(State.Open); + if (isFrozen) { + this.setState(State.Frozen); + } else { + this.setState(State.Open); + } } } From 2382a9da05dc6184ace7623a85592a380a5d9ea4 Mon Sep 17 00:00:00 2001 From: Bugra Cuhadaroglu Date: Mon, 1 May 2017 23:37:08 -0400 Subject: [PATCH 0110/2747] Fix - #24242 #24550 --- .../electron-browser/media/extensionsViewlet.css | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css b/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css index e6790ffae2abe..82fab9f5565bf 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css +++ b/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css @@ -71,6 +71,8 @@ flex: 1; padding: 4px 0; overflow: hidden; + + } .extensions-viewlet > .extensions .extension > .details > .header-container { @@ -82,10 +84,11 @@ .extensions-viewlet > .extensions .extension > .details > .header-container > .header { display: flex; align-items: baseline; - flex-wrap: wrap; + flex-wrap: nowrap; overflow: hidden; flex: 1; min-width: 0; + } .extensions-viewlet > .extensions .extension > .details > .header-container > .header > .name { @@ -155,8 +158,8 @@ .extensions-viewlet > .extensions .extension.disabled > .icon, .extensions-viewlet > .extensions .extension.disabled > .details > .header-container, -.extensions-viewlet > .extensions .extension.disabled > .details > .description, -.extensions-viewlet > .extensions .extension.disabled > .details > .footer > .author { +.extensions-viewlet > .extensions .extension.disabled > .details > .footer > .author +.extensions-viewlet > .extensions .extension.disabled > .details > .description { opacity: 0.5; } From a5d90e09c4c4a79e3cf97b4c8dbe5e6449ce5ac7 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 2 May 2017 07:50:21 +0200 Subject: [PATCH 0111/2747] more theme updates (for #25327) --- .../theme-abyss/themes/abyss-color-theme.json | 2 +- .../themes/kimbie-dark-color-theme.json | 10 ++++++++-- .../themes/dimmed-monokai-color-theme.json | 8 ++++---- .../themes/quietlight-color-theme.json | 11 ++++++++++- extensions/theme-red/themes/Red-color-theme.json | 1 + .../themes/solarized-dark-color-theme.json | 16 ++++++++-------- 6 files changed, 32 insertions(+), 16 deletions(-) diff --git a/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json index 2a83d26cd9553..aec2495fd14c4 100644 --- a/extensions/theme-abyss/themes/abyss-color-theme.json +++ b/extensions/theme-abyss/themes/abyss-color-theme.json @@ -399,7 +399,7 @@ "debugExceptionWidget.border": "#AB395B", // Workbench: Notifications - "notification.background": "#051336", + "notification.background": "#182543", // "notification.foreground": "", // Workbench: Quick Open diff --git a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json index 19589afca4c43..f98364ce67d12 100644 --- a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json +++ b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json @@ -26,7 +26,7 @@ "statusBar.noFolderBackground": "#423523", "activityBar.background": "#221a0f", "activityBar.foreground": "#d3af86", - "activityBarBadge.background": "#765e3e", + "activityBarBadge.background": "#7f5d38", "sideBar.background": "#362712", "editor.lineHighlightBackground": "#5e452b", "editorCursor.foreground": "#d3af86", @@ -37,7 +37,13 @@ "peekViewEditor.background": "#221a14", "peekViewEditor.matchHighlightBackground": "#84613daa", "notification.background": "#473a29", - "button.background": "#6e583b" + "button.background": "#6e583b", + "inputValidation.infoBorder": "#1b60a5", + "inputValidation.infoBackground": "#2b2a42", + "inputValidation.warningBackground": "#51412c", + // "inputValidation.warningBorder": "#5B7E7A", + "inputValidation.errorBackground": "#5f0d0d", + "inputValidation.errorBorder": "#9d2f23" }, "tokenColors": [ { diff --git a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json index b847fc95dce1f..4b598c44ec03d 100644 --- a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json +++ b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json @@ -6,9 +6,8 @@ "list.focusBackground": "#425370", "list.inactiveSelectionBackground": "#23324e", "list.hoverBackground": "#005070", - "list.dropBackground": "#505590", "list.highlightForeground": "#e58520", - "button.background": "#5088a3", + "button.background": "#1e4456", "editor.background": "#202025", "editor.foreground": "#c5c8c6", "editor.selectionBackground": "#373b41", @@ -17,9 +16,10 @@ "editorWhitespace.foreground": "#383880", "editorIndentGuide.background": "#505037", "editorGroupHeader.tabsBackground": "#222228", - // "tab.activeBackground": "#272738", + "editorGroup.background": "#1a1a1e", "tab.inactiveBackground": "#333340", "tab.border": "#000030", + "peekView.border": "#3655b5", "panelTitle.activeForeground": "#ddffff", "statusBar.background": "#354550", "statusBar.debuggingBackground": "#354550", @@ -30,7 +30,7 @@ "activityBarBadge.background": "#3655b5", "sideBar.background": "#232327", "sideBarSectionHeader.background": "#424250", - "notification.foreground": "#ffe0ff", + "notification.background": "#292935", "pickerGroup.foreground": "#77a5b0", "terminal.ansiWhite": "#ddffff" }, diff --git a/extensions/theme-quietlight/themes/quietlight-color-theme.json b/extensions/theme-quietlight/themes/quietlight-color-theme.json index 6abbf60dddb82..9e065fef1d672 100644 --- a/extensions/theme-quietlight/themes/quietlight-color-theme.json +++ b/extensions/theme-quietlight/themes/quietlight-color-theme.json @@ -460,6 +460,7 @@ "list.focusBackground": "#CADEB9", "list.activeSelectionBackground": "#c4d9b1", "list.inactiveSelectionBackground": "#d3dbcd", + "list.highlightForeground": "#9769dc", "editor.background": "#F5F5F5", "editorWhitespace.foreground": "#AAAAAA", "editor.lineHighlightBackground": "#E4F6D4", @@ -477,6 +478,7 @@ "peekViewTitle.background": "#F2F8FC", "peekViewEditor.background": "#F2F8FC", "peekViewResult.background": "#F2F8FC", + "peekView.border": "#705697", "peekViewResult.matchHighlightBackground": "#93C6D6", "statusBar.background": "#705697", "statusBar.noFolderBackground": "#705697", @@ -486,6 +488,13 @@ "activityBarBadge.background": "#705697", "titleBar.activeBackground": "#c4b7d7", "button.background": "#705697", - "notification.background": "#442e66" + "notification.background": "#442e66", + "editorGroup.dropBackground": "#C9D0D988", + "inputValidation.infoBorder": "#4ec1e5", + "inputValidation.infoBackground": "#f2fcff", + "inputValidation.warningBackground": "#fffee2", + "inputValidation.warningBorder": "#ffe055", + "inputValidation.errorBackground": "#ffeaea", + "inputValidation.errorBorder": "#f1897f" } } \ No newline at end of file diff --git a/extensions/theme-red/themes/Red-color-theme.json b/extensions/theme-red/themes/Red-color-theme.json index 75bffa975466d..9db55816d8089 100644 --- a/extensions/theme-red/themes/Red-color-theme.json +++ b/extensions/theme-red/themes/Red-color-theme.json @@ -15,6 +15,7 @@ // editor "editor.background": "#390000", "editorGroup.border": "#ff666633", + "editorGroup.background": "#1c0101", "editorCursor.foreground": "#970000", "editor.foreground": "#F8F8F8", "editorWhitespace.foreground": "#c10000", diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index 9d5e9c8fe3839..75862dc7088e6 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -306,12 +306,12 @@ // "input.border": "", "inputOption.activeBorder": "#2AA19899", - "inputValidation.infoBorder": "#384078", - "inputValidation.infoBackground": "#051336", - "inputValidation.warningBackground": "#5B7E7A", - "inputValidation.warningBorder": "#5B7E7A", - "inputValidation.errorBackground": "#A22D44", - "inputValidation.errorBorder": "#AB395B", + "inputValidation.infoBorder": "#363b5f", + "inputValidation.infoBackground": "#052730", + "inputValidation.warningBackground": "#5d5938", + "inputValidation.warningBorder": "#9d8a5e", + "inputValidation.errorBackground": "#571b26", + "inputValidation.errorBorder": "#a92049", "dropdown.background": "#00212B", "dropdown.border": "#2AA19899", @@ -326,7 +326,7 @@ "list.hoverBackground": "#004454AA", "list.inactiveSelectionBackground": "#00445488", "list.dropBackground": "#00445488", - "list.highlightForeground": "#047aa6", + "list.highlightForeground": "#1ebcc5", // "scrollbar.shadow": "", // "scrollbarSlider.activeBackground": "", @@ -397,7 +397,7 @@ // "editorGroupHeader.noTabsBackground": "", "editorGroup.border": "#00212B", "editorGroup.background": "#011b23", - "editorGroup.dropBackground": "#00212BAA", + "editorGroup.dropBackground": "#2AA19844", "editorGroupHeader.tabsBackground": "#004052", // Workbench: Tabs From 9f15e036fda5c01dffca48e5fa158da88f1b29cf Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 2 May 2017 08:00:07 +0200 Subject: [PATCH 0112/2747] fix compile error --- src/vs/base/common/network.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/common/network.ts b/src/vs/base/common/network.ts index 109504468f80c..571b7e1fb3c50 100644 --- a/src/vs/base/common/network.ts +++ b/src/vs/base/common/network.ts @@ -88,7 +88,7 @@ export function xhr(options: IXHROptions): TPromise { options.user, options.password ); - req.responseType = (options.responseType as XMLHttpRequestResponseType) || ''; + req.responseType = options.responseType as any || ''; Object.keys(options.headers || {}).forEach((k) => { req.setRequestHeader(k, options.headers[k]); From 404798fe934b8fd463e13a43d6ea1d96767633ce Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 2 May 2017 08:08:52 +0200 Subject: [PATCH 0113/2747] theme - :lipstick: --- src/vs/platform/theme/common/colorRegistry.ts | 6 +++--- src/vs/workbench/common/theme.ts | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index c9a767329d0fc..d988f47983183 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -6,7 +6,7 @@ import platform = require('vs/platform/platform'); import { IJSONSchema } from 'vs/base/common/jsonSchema'; -import { Color, RGBA } from 'vs/base/common/color'; +import { Color } from 'vs/base/common/color'; import { ITheme } from 'vs/platform/theme/common/themeService'; import nls = require('vs/nls'); @@ -120,7 +120,7 @@ export function registerColor(id: string, defaults: ColorDefaults, description: // ----- base colors export const foreground = registerColor('foreground', { dark: '#CCCCCC', light: '#6C6C6C', hc: '#FFFFFF' }, nls.localize('foreground', "Overall foreground color. This color is only used if not overridden by a component.")); -export const focusBorder = registerColor('focusBorder', { dark: Color.fromRGBA(new RGBA(14, 99, 156)).transparent(0.6), light: Color.fromRGBA(new RGBA(0, 122, 204)).transparent(0.4), hc: '#F38518' }, nls.localize('focusBorder', "Overall border color for focused elements. This color is only used if not overridden by a component.")); +export const focusBorder = registerColor('focusBorder', { dark: Color.fromHex('#0E639C').transparent(0.6), light: Color.fromHex('#007ACC').transparent(0.4), hc: '#F38518' }, nls.localize('focusBorder', "Overall border color for focused elements. This color is only used if not overridden by a component.")); export const contrastBorder = registerColor('contrastBorder', { light: null, dark: null, hc: '#6FC3DF' }, nls.localize('contrastBorder', "An extra border around elements to separate them from others for greater contrast.")); export const activeContrastBorder = registerColor('contrastActiveBorder', { light: null, dark: null, hc: focusBorder }, nls.localize('activeContrastBorder', "An extra border around active elements to separate them from others for greater contrast.")); @@ -149,7 +149,7 @@ export const listInactiveSelectionBackground = registerColor('list.inactiveSelec export const listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('listActiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); export const listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, nls.localize('listHoverBackground', "List/Tree background when hovering over items using the mouse.")); export const listDropBackground = registerColor('list.dropBackground', { dark: listFocusBackground, light: listFocusBackground, hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse.")); -export const listHighlightForeground = registerColor('list.highlightForeground', { dark: '#219AE4', light: '#186B9E', hc: '#219AE4' }, nls.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.')); +export const listHighlightForeground = registerColor('list.highlightForeground', { dark: '#0097fb', light: '#007acc', hc: focusBorder }, nls.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.')); export const pickerGroupForeground = registerColor('pickerGroup.foreground', { dark: Color.fromHex('#0097FB').transparent(0.6), light: Color.fromHex('#007ACC').transparent(0.6), hc: Color.white }, nls.localize('pickerGroupForeground', "Quick picker color for grouping labels.")); export const pickerGroupBorder = registerColor('pickerGroup.border', { dark: '#3F3F46', light: '#CCCEDB', hc: Color.white }, nls.localize('pickerGroupBorder', "Quick picker color for grouping borders.")); diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 1516cc2e2238a..44c3a6c51e1c9 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -7,7 +7,7 @@ import nls = require('vs/nls'); import { registerColor, editorBackground, contrastBorder, transparent } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable, Disposable, dispose } from 'vs/base/common/lifecycle'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; -import { Color, RGBA } from 'vs/base/common/color'; +import { Color } from 'vs/base/common/color'; // < --- Tabs --- > @@ -69,8 +69,8 @@ export const EDITOR_GROUP_BORDER_COLOR = registerColor('editorGroup.border', { }, nls.localize('editorGroupBorder', "Color to separate multiple editor groups from each other. Editor groups are the containers of editors.")); export const EDITOR_DRAG_AND_DROP_BACKGROUND = registerColor('editorGroup.dropBackground', { - dark: Color.fromRGBA(new RGBA(83, 89, 93)).transparent(0.5), - light: Color.fromRGBA(new RGBA(51, 153, 255)).transparent(0.18), + dark: Color.fromHex('#53595D').transparent(0.5), + light: Color.fromHex('#3399FF').transparent(0.18), hc: null }, nls.localize('editorDragAndDropBackground', "Background color when dragging editors around.")); @@ -85,8 +85,8 @@ export const PANEL_BACKGROUND = registerColor('panel.background', { }, nls.localize('panelBackground', "Panel background color. Panels are shown below the editor area and contain views like output and integrated terminal.")); export const PANEL_BORDER_COLOR = registerColor('panel.border', { - dark: Color.fromRGBA(new RGBA(128, 128, 128)).transparent(0.35), - light: Color.fromRGBA(new RGBA(128, 128, 128)).transparent(0.35), + dark: Color.fromHex('#808080').transparent(0.35), + light: Color.fromHex('#808080').transparent(0.35), hc: contrastBorder }, nls.localize('panelBorder', "Panel border color on the top separating to the editor. Panels are shown below the editor area and contain views like output and integrated terminal.")); From 3735a3609d8d78e4497940886045319a2d04e252 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 2 May 2017 08:10:30 +0200 Subject: [PATCH 0114/2747] List: bad color when focus moves out of selection and hovering (fixes #25634) --- src/vs/base/browser/ui/list/listWidget.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts index c7f365fb2b208..5750f6df6e03a 100644 --- a/src/vs/base/browser/ui/list/listWidget.ts +++ b/src/vs/base/browser/ui/list/listWidget.ts @@ -819,6 +819,7 @@ export class List implements ISpliceable, IDisposable { if (styles.listActiveSelectionBackground) { content.push(`.monaco-list.${this.idPrefix}:focus .monaco-list-row.selected { background-color: ${styles.listActiveSelectionBackground}; }`); + content.push(`.monaco-list.${this.idPrefix}:focus .monaco-list-row.selected:hover { background-color: ${styles.listActiveSelectionBackground}; }`); // overwrite :hover style in this case! } if (styles.listActiveSelectionForeground) { From 35a12c9483c6b7b6abb79364540355c6d3040cde Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 2 May 2017 10:30:52 +0200 Subject: [PATCH 0115/2747] Closing a tab using middle mouse button on the 'x' causes the tab to the right to also be clsosed (fixes #25529) --- src/vs/workbench/browser/parts/editor/tabsTitleControl.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index 723495d1b7f69..91f679da71199 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -521,7 +521,7 @@ export class TabsTitleControl extends TitleControl { tab.blur(); const { editor, position } = this.toTabContext(index); - if (e.button === 0 /* Left Button */ && !DOM.findParentWithClass((e.target || e.srcElement) as HTMLElement, 'monaco-action-bar', 'tab')) { + if (e.button === 0 /* Left Button */ && !this.isTabActionBar((e.target || e.srcElement) as HTMLElement)) { setTimeout(() => this.editorService.openEditor(editor, null, position).done(null, errors.onUnexpectedError)); // timeout to keep focus in editor after mouse up } })); @@ -531,7 +531,7 @@ export class TabsTitleControl extends TitleControl { DOM.EventHelper.stop(e); tab.blur(); - if (e.button === 1 /* Middle Button */) { + if (e.button === 1 /* Middle Button*/ && !this.isTabActionBar((e.target || e.srcElement) as HTMLElement)) { this.closeEditorAction.run(this.toTabContext(index)).done(null, errors.onUnexpectedError); } })); @@ -666,6 +666,10 @@ export class TabsTitleControl extends TitleControl { return combinedDisposable(disposables); } + private isTabActionBar(element: HTMLElement): boolean { + return !!DOM.findParentWithClass(element, 'monaco-action-bar', 'tab'); + } + private toTabContext(index: number): { group: IEditorGroup, position: Position, editor: IEditorInput } { const group = this.context; const position = this.stacks.positionOfGroup(group); From 61bc0447decd90b7a547b86c53b16dc1380a0378 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 2 May 2017 11:13:39 +0200 Subject: [PATCH 0116/2747] fix #25712 --- src/vs/workbench/browser/parts/quickopen/quickOpenController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index c801ec72380a8..edfd121cec2a5 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -216,7 +216,7 @@ export class QuickOpenController extends Component implements IQuickOpenService return new TPromise(init).then(item => { return currentValidation.then(valid => { if (valid && item) { - return lastValue || options.value || ''; + return lastValue === void 0 ? (options.value || '') : lastValue; } return undefined; }); From 910d113915c3860e403334d9f2a73263049ca59d Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 2 May 2017 11:18:56 +0200 Subject: [PATCH 0117/2747] Keybindings are not highlighted in Keyboard shortcuts editor (fixes #25762) --- .../preferences/browser/media/keybindingsEditor.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css b/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css index d40d9d9b4b36c..f208709fcc47e 100644 --- a/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css +++ b/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css @@ -163,9 +163,19 @@ } .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .highlight { + color: #007ACC; font-weight: bold; } +.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.selected > .column .highlight { + color: #1b3c53; +} + +.vs-dark .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.selected > .column .highlight, +.hc-black .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.selected > .column .highlight { + color: #049aff; +} + .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .monaco-action-bar { display: none; flex: 1; From 4f086127a43b65e64491ee8fda8afac94cc4c739 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 2 May 2017 11:20:12 +0200 Subject: [PATCH 0118/2747] :bug: don't use extension.uuid for download path fixes #25738 --- .../extensionManagement/node/extensionGalleryService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts index a0852ef7084c0..523bcbda9e9a5 100644 --- a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts +++ b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts @@ -7,6 +7,7 @@ import { localize } from 'vs/nls'; import { tmpdir } from 'os'; import * as path from 'path'; import { TPromise } from 'vs/base/common/winjs.base'; +import * as uuid from 'vs/base/common/uuid'; import { distinct } from 'vs/base/common/arrays'; import { getErrorMessage } from 'vs/base/common/errors'; import { ArraySet } from 'vs/base/common/set'; @@ -369,7 +370,7 @@ export class ExtensionGalleryService implements IExtensionGalleryService { download(extension: IGalleryExtension): TPromise { return this.loadCompatibleVersion(extension).then(extension => { - const zipPath = path.join(tmpdir(), extension.uuid); + const zipPath = path.join(tmpdir(), uuid.generateUuid()); const data = getGalleryExtensionTelemetryData(extension); const startTime = new Date().getTime(); const log = duration => this.telemetryService.publicLog('galleryService:downloadVSIX', assign(data, { duration })); From 643d3bdb17ec2b3c3fa95dd6852ea868284dc9e3 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 2 May 2017 11:51:21 +0200 Subject: [PATCH 0119/2747] fixes #25316 --- .../workbench/parts/git/browser/gitActions.contribution.ts | 5 +++-- src/vs/workbench/parts/git/browser/gitServices.ts | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/git/browser/gitActions.contribution.ts b/src/vs/workbench/parts/git/browser/gitActions.contribution.ts index f30a03acae1f0..6d2ea14290839 100644 --- a/src/vs/workbench/parts/git/browser/gitActions.contribution.ts +++ b/src/vs/workbench/parts/git/browser/gitActions.contribution.ts @@ -23,6 +23,7 @@ import gitei = require('vs/workbench/parts/git/browser/gitEditorInputs'); import { getSelectedChanges, applyChangesToModel, getChangeRevertEdits } from 'vs/workbench/parts/git/common/stageRanges'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; +import { IViewlet } from 'vs/workbench/common/viewlet'; import { IPartService, Parts } from 'vs/workbench/services/part/common/partService'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IFileService } from 'vs/platform/files/common/files'; @@ -115,7 +116,7 @@ class OpenInDiffAction extends baseeditor.EditorInputAction { const viewState = editor ? editor.saveViewState() : null; return this.gitService.getInput(this.getStatus()).then((input) => { - var promise = TPromise.as(null); + var promise = TPromise.as(null); if (this.partService.isVisible(Parts.SIDEBAR_PART)) { promise = this.viewletService.openViewlet(gitcontrib.VIEWLET_ID, false); @@ -656,7 +657,7 @@ class GlobalOpenChangeAction extends OpenChangeAction { var viewState = editor ? editor.saveViewState() : null; return this.gitService.getInput(status).then((input) => { - var promise = TPromise.as(null); + var promise = TPromise.as(null); if (this.partService.isVisible(Parts.SIDEBAR_PART)) { promise = this.viewletService.openViewlet(gitcontrib.VIEWLET_ID, false); diff --git a/src/vs/workbench/parts/git/browser/gitServices.ts b/src/vs/workbench/parts/git/browser/gitServices.ts index 2024cdfdbeacf..f494f7ef3b45e 100644 --- a/src/vs/workbench/parts/git/browser/gitServices.ts +++ b/src/vs/workbench/parts/git/browser/gitServices.ts @@ -193,10 +193,10 @@ class EditorInputCache { resource = URI.file(paths.join(model.getRepositoryRoot(), indexStatus.getRename())); } - return TPromise.as(this.editorService.createInput({ resource })); + return TPromise.as(this.editorService.createInput({ resource }) as EditorInput); case Status.BOTH_MODIFIED: - return TPromise.as(this.editorService.createInput({ resource })); + return TPromise.as(this.editorService.createInput({ resource }) as EditorInput); default: return TPromise.as(null); From e1b9f94c31dd4dee987fa23768ce4d909150cb40 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 2 May 2017 12:00:12 +0200 Subject: [PATCH 0120/2747] fix #25645 --- src/vs/editor/contrib/codelens/browser/codelens.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/codelens/browser/codelens.ts b/src/vs/editor/contrib/codelens/browser/codelens.ts index 9e2f14a662dc3..db424a9ea232b 100644 --- a/src/vs/editor/contrib/codelens/browser/codelens.ts +++ b/src/vs/editor/contrib/codelens/browser/codelens.ts @@ -472,11 +472,14 @@ export class CodeLensContribution implements editorCommon.IEditorContribution { // Ask for all references again scheduler.schedule(); })); - this._localToDispose.push(this._editor.onDidScrollChange((e) => { + this._localToDispose.push(this._editor.onDidScrollChange(e => { if (e.scrollTopChanged) { this._detectVisibleLenses.schedule(); } })); + this._localToDispose.push(this._editor.onDidLayoutChange(e => { + this._detectVisibleLenses.schedule(); + })); this._localToDispose.push({ dispose: () => { if (this._editor.getModel()) { From 564548fade4f6e70986cb951d3cc5d88e5764ada Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 2 May 2017 12:51:43 +0200 Subject: [PATCH 0121/2747] use native classlist when possible, fixes #25771 --- src/vs/base/browser/dom.ts | 198 ++++++++++++++------------- src/vs/base/test/browser/dom.test.ts | 6 +- 2 files changed, 107 insertions(+), 97 deletions(-) diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts index efe82b59b3cc7..b2ec45dbb77c5 100644 --- a/src/vs/base/browser/dom.ts +++ b/src/vs/base/browser/dom.ts @@ -56,125 +56,133 @@ export function isInDOM(node: Node): boolean { return false; } -let lastStart: number, lastEnd: number; +const _manualClassList = new class { -function _findClassName(node: HTMLElement, className: string): void { + private _lastStart: number; + private _lastEnd: number; - let classes = node.className; - if (!classes) { - lastStart = -1; - return; - } - - className = className.trim(); - - let classesLen = classes.length, - classLen = className.length; - - if (classLen === 0) { - lastStart = -1; - return; - } + private _findClassName(node: HTMLElement, className: string): void { - if (classesLen < classLen) { - lastStart = -1; - return; - } - - if (classes === className) { - lastStart = 0; - lastEnd = classesLen; - return; - } - - let idx = -1, - idxEnd: number; + let classes = node.className; + if (!classes) { + this._lastStart = -1; + return; + } - while ((idx = classes.indexOf(className, idx + 1)) >= 0) { + className = className.trim(); - idxEnd = idx + classLen; + let classesLen = classes.length, + classLen = className.length; - // a class that is followed by another class - if ((idx === 0 || classes.charCodeAt(idx - 1) === CharCode.Space) && classes.charCodeAt(idxEnd) === CharCode.Space) { - lastStart = idx; - lastEnd = idxEnd + 1; + if (classLen === 0) { + this._lastStart = -1; return; } - // last class - if (idx > 0 && classes.charCodeAt(idx - 1) === CharCode.Space && idxEnd === classesLen) { - lastStart = idx - 1; - lastEnd = idxEnd; + if (classesLen < classLen) { + this._lastStart = -1; return; } - // equal - duplicate of cmp above - if (idx === 0 && idxEnd === classesLen) { - lastStart = 0; - lastEnd = idxEnd; + if (classes === className) { + this._lastStart = 0; + this._lastEnd = classesLen; return; } + + let idx = -1, + idxEnd: number; + + while ((idx = classes.indexOf(className, idx + 1)) >= 0) { + + idxEnd = idx + classLen; + + // a class that is followed by another class + if ((idx === 0 || classes.charCodeAt(idx - 1) === CharCode.Space) && classes.charCodeAt(idxEnd) === CharCode.Space) { + this._lastStart = idx; + this._lastEnd = idxEnd + 1; + return; + } + + // last class + if (idx > 0 && classes.charCodeAt(idx - 1) === CharCode.Space && idxEnd === classesLen) { + this._lastStart = idx - 1; + this._lastEnd = idxEnd; + return; + } + + // equal - duplicate of cmp above + if (idx === 0 && idxEnd === classesLen) { + this._lastStart = 0; + this._lastEnd = idxEnd; + return; + } + } + + this._lastStart = -1; } - lastStart = -1; -} + hasClass(node: HTMLElement, className: string): boolean { + this._findClassName(node, className); + return this._lastStart !== -1; + } -/** - * @param node a dom node - * @param className a class name - * @return true if the className attribute of the provided node contains the provided className - */ -export function hasClass(node: HTMLElement, className: string): boolean { - _findClassName(node, className); - return lastStart !== -1; -} + addClass(node: HTMLElement, className: string): void { + if (!node.className) { // doesn't have it for sure + node.className = className; + } else { + this._findClassName(node, className); // see if it's already there + if (this._lastStart === -1) { + node.className = node.className + ' ' + className; + } + } + } -/** - * Adds the provided className to the provided node. This is a no-op - * if the class is already set. - * @param node a dom node - * @param className a class name - */ -export function addClass(node: HTMLElement, className: string): void { - if (!node.className) { // doesn't have it for sure - node.className = className; - } else { - _findClassName(node, className); // see if it's already there - if (lastStart === -1) { - node.className = node.className + ' ' + className; + removeClass(node: HTMLElement, className: string): void { + this._findClassName(node, className); + if (this._lastStart === -1) { + return; // Prevent styles invalidation if not necessary + } else { + node.className = node.className.substring(0, this._lastStart) + node.className.substring(this._lastEnd); } } -} -/** - * Removes the className for the provided node. This is a no-op - * if the class isn't present. - * @param node a dom node - * @param className a class name - */ -export function removeClass(node: HTMLElement, className: string): void { - _findClassName(node, className); - if (lastStart === -1) { - return; // Prevent styles invalidation if not necessary - } else { - node.className = node.className.substring(0, lastStart) + node.className.substring(lastEnd); + toggleClass(node: HTMLElement, className: string, shouldHaveIt?: boolean): void { + this._findClassName(node, className); + if (this._lastStart !== -1 && (shouldHaveIt === void 0 || !shouldHaveIt)) { + this.removeClass(node, className); + } + if (this._lastStart === -1 && (shouldHaveIt === void 0 || shouldHaveIt)) { + this.addClass(node, className); + } } -} +}; -/** - * @param node a dom node - * @param className a class name - * @param shouldHaveIt - */ -export function toggleClass(node: HTMLElement, className: string, shouldHaveIt?: boolean): void { - _findClassName(node, className); - if (lastStart !== -1 && (shouldHaveIt === void 0 || !shouldHaveIt)) { - removeClass(node, className); +const _nativeClassList = new class { + hasClass(node: HTMLElement, className: string): boolean { + return className && node.classList.contains(className); } - if (lastStart === -1 && (shouldHaveIt === void 0 || shouldHaveIt)) { - addClass(node, className); + + addClass(node: HTMLElement, className: string): void { + return className && node.classList.add(className); } -} + + removeClass(node: HTMLElement, className: string): void { + return className && node.classList.remove(className); + } + + toggleClass(node: HTMLElement, className: string, shouldHaveIt?: boolean): void { + node.classList.toggle(className, shouldHaveIt); + } +}; + +// In IE11 there is only partial support for `classList` which makes us keep our +// custom implementation. Otherwise use the native implementation, see: http://caniuse.com/#search=classlist +const _classList = browser.isIE ? _manualClassList : _nativeClassList; +export const hasClass: (node: HTMLElement, className: string) => boolean = _classList.hasClass.bind(_classList); +export const addClass: (node: HTMLElement, className: string) => void = _classList.addClass.bind(_classList); +export const removeClass: (node: HTMLElement, className: string) => void = _classList.removeClass.bind(_classList); +export const toggleClass: (node: HTMLElement, className: string, shouldHaveIt?: boolean) => void = _classList.toggleClass.bind(_classList); class DomListener implements IDisposable { @@ -1027,4 +1035,4 @@ export function domContentLoaded(): TPromise { window.addEventListener('DOMContentLoaded', c, false); } }); -} \ No newline at end of file +} diff --git a/src/vs/base/test/browser/dom.test.ts b/src/vs/base/test/browser/dom.test.ts index 3669f2eec122a..4b8239985f192 100644 --- a/src/vs/base/test/browser/dom.test.ts +++ b/src/vs/base/test/browser/dom.test.ts @@ -58,7 +58,9 @@ suite('dom', () => { test('removeClass should consider hyphens', function () { let element = document.createElement('div'); - dom.addClass(element, 'foo-bar bar'); + dom.addClass(element, 'foo-bar'); + dom.addClass(element, 'bar'); + assert(dom.hasClass(element, 'foo-bar')); assert(dom.hasClass(element, 'bar')); @@ -179,4 +181,4 @@ suite('dom', () => { assert.equal(div.firstChild.textContent, 'hello'); }); }); -}); \ No newline at end of file +}); From 3f4f7303a652e1a2be9158050ab8deaf49735501 Mon Sep 17 00:00:00 2001 From: Coenraad Stijne Date: Tue, 2 May 2017 12:51:23 +0200 Subject: [PATCH 0122/2747] expose stickyness decoration option --- src/vs/editor/common/editorCommon.ts | 1 + src/vs/vscode.d.ts | 16 ++++++++++++++++ src/vs/workbench/api/node/extHost.api.impl.ts | 3 ++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index 4010e1e617582..036430cf02c74 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -1616,6 +1616,7 @@ export interface IEditorContribution { * @internal */ export interface IThemeDecorationRenderOptions { + stickiness?: TrackedRangeStickiness; backgroundColor?: string; outline?: string; diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 5b5cd0a27af2d..ac030fc7434a5 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -698,6 +698,16 @@ declare module 'vscode' { Full = 7 } + /** + * Describes the behaviour of decorations when typing/editing near their edges. + */ + export enum TrackedRangeStickiness { + AlwaysGrowsWhenTypingAtEdges = 0, + NeverGrowsWhenTypingAtEdges = 1, + GrowsOnlyWhenTypingBefore = 2, + GrowsOnlyWhenTypingAfter = 3 + } + /** * Represents options to configure the behavior of showing a [document](#TextDocument) in an [editor](#TextEditor). */ @@ -725,6 +735,12 @@ declare module 'vscode' { * Represents theme specific rendering styles for a [text editor decoration](#TextEditorDecorationType). */ export interface ThemableDecorationRenderOptions { + /** + * Customize the growing behaviour of the decoration when typing at the edges of the decoration. + * Defaults to TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges + */ + stickiness?: TrackedRangeStickiness; + /** * Background color of the decoration. Use rgba() and define transparent background colors to play well with other decorations. */ diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 4b84e46809aac..bae4940952481 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -515,6 +515,7 @@ export function createApiFactory( OverviewRulerLane: EditorCommon.OverviewRulerLane, ParameterInformation: extHostTypes.ParameterInformation, Position: extHostTypes.Position, + ProgressLocation: extHostTypes.ProgressLocation, Range: extHostTypes.Range, Selection: extHostTypes.Selection, SignatureHelp: extHostTypes.SignatureHelp, @@ -529,10 +530,10 @@ export function createApiFactory( TextEditorLineNumbersStyle: extHostTypes.TextEditorLineNumbersStyle, TextEditorRevealType: extHostTypes.TextEditorRevealType, TextEditorSelectionChangeKind: extHostTypes.TextEditorSelectionChangeKind, + TrackedRangeStickiness: EditorCommon.TrackedRangeStickiness, Uri: URI, ViewColumn: extHostTypes.ViewColumn, WorkspaceEdit: extHostTypes.WorkspaceEdit, - ProgressLocation: extHostTypes.ProgressLocation, // functions FileLocationKind: extHostTypes.FileLocationKind, ApplyToKind: extHostTypes.ApplyToKind, From ddfce794d2234c864bd8aad9df0f8e343b66a9dc Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 2 May 2017 13:05:08 +0200 Subject: [PATCH 0123/2747] FIx for terminal color descriptions --- .../parts/terminal/electron-browser/terminalColorRegistry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts index 16d29e6bf4bf4..b0e8fc2ab439e 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts @@ -147,7 +147,7 @@ const ansiColorMap = { export function registerColors(): void { for (let id in ansiColorMap) { let entry = ansiColorMap[id]; - let colorName = id.substring(12); + let colorName = id.substring(13); ansiColorIdentifiers[entry.index] = registerColor(id, entry.defaults, nls.localize('terminal.ansiColor', '\'{0}\' ansi color in the terminal.', colorName)); } } From f315229abd0babad223d86008a190b1b2e248075 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 2 May 2017 13:06:08 +0200 Subject: [PATCH 0124/2747] Color registry documentation order --- src/vs/platform/theme/common/colorRegistry.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index d988f47983183..12f490e7c7613 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -105,7 +105,16 @@ class ColorRegistry implements IColorRegistry { } public toString() { - return Object.keys(this.colorsById).sort().map(k => `- \`${k}\`: ${this.colorsById[k].description}`).join('\n'); + let sorter = (a: string, b: string) => { + let cat1 = a.indexOf('.') === -1 ? 0 : 1; + let cat2 = b.indexOf('.') === -1 ? 0 : 1; + if (cat1 !== cat2) { + return cat1 - cat2; + } + return a.localeCompare(b); + }; + + return Object.keys(this.colorsById).sort(sorter).map(k => `- \`${k}\`: ${this.colorsById[k].description}`).join('\n'); } } From d39e7b017c624e382d9843ca76ee4fb0d1d64539 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 2 May 2017 14:03:54 +0200 Subject: [PATCH 0125/2747] Restore action to report negative startup times (insiders only) (fixes #25020) --- src/vs/workbench/electron-browser/shell.ts | 24 +++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index e2e3976ebe727..03296bc74ab3c 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -63,7 +63,7 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { IMessageService, IChoiceService, Severity } from 'vs/platform/message/common/message'; +import { IMessageService, IChoiceService, Severity, CloseAction } from 'vs/platform/message/common/message'; import { ChoiceChannel } from 'vs/platform/message/common/messageIpc'; import { ISearchService } from 'vs/platform/search/common/search'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; @@ -183,7 +183,7 @@ export class WorkbenchShell { onWorkbenchStarted: (info: IWorkbenchStartedInfo) => { // run workbench started logic - this.onWorkbenchStarted(info); + this.onWorkbenchStarted(instantiationService, info); // start cached data manager instantiationService.createInstance(NodeCachedDataManager); @@ -206,7 +206,7 @@ export class WorkbenchShell { return workbenchContainer; } - private onWorkbenchStarted(info: IWorkbenchStartedInfo): void { + private onWorkbenchStarted(instantiationService: IInstantiationService, info: IWorkbenchStartedInfo): void { // Telemetry: workspace info const { filesToOpen, filesToCreate, filesToDiff } = this.options; @@ -230,6 +230,12 @@ export class WorkbenchShell { this.timerService.restoreViewletDuration = info.restoreViewletDuration; this.extensionService.onReady().done(() => { this.telemetryService.publicLog('startupTime', this.timerService.startupMetrics); + + // Check for negative performance numbers (insiders only) + // TODO@Ben remove me + if (product.quality !== 'stable' && this.timerService.startupMetrics.ellapsed < 0) { + this.handleNegativePerformanceNumbers(instantiationService, this.timerService.startupMetrics.ellapsed); + } }); // Telemetry: workspace tags @@ -245,11 +251,9 @@ export class WorkbenchShell { const { profileStartup } = this.environmentService; if (profileStartup) { this.extensionService.onReady().then(() => stopProfiling(profileStartup.dir, profileStartup.prefix)).then(() => { - readdir(profileStartup.dir).then(files => { return files.filter(value => value.indexOf(profileStartup.prefix) === 0); }).then(files => { - const profileFiles = files.reduce((prev, cur) => `${prev}${join(profileStartup.dir, cur)}\n`, '\n'); const primaryButton = this.messageService.confirm({ @@ -275,6 +279,16 @@ export class WorkbenchShell { } } + private handleNegativePerformanceNumbers(i: IInstantiationService, time: number): void { + this.messageService.show(Severity.Warning, { + message: nls.localize('handleNegativePerformanceNumbers', "Something went wrong measuring startup performance numbers (ellapsed: {0}ms). We would like to learn more about this issue.", time), + actions: [ + i.createInstance(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL), + CloseAction + ] + }); + } + private initServiceCollection(container: HTMLElement): [IInstantiationService, ServiceCollection] { const disposables = new Disposables(); From bb77c3eb3417d971448ccc635bf4d3d93a65f4d1 Mon Sep 17 00:00:00 2001 From: Coenraad Stijne Date: Tue, 2 May 2017 14:55:30 +0200 Subject: [PATCH 0126/2747] set stickiness in codeeditorservice --- src/vs/editor/browser/services/codeEditorServiceImpl.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index f79bca4879d89..8782b344a4931 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -204,6 +204,7 @@ class DecorationTypeOptionsProvider implements IModelDecorationOptionsProvider { ); this.isWholeLine = Boolean(options.isWholeLine); + this.stickiness = options.stickiness; if ( typeof themedOpts.light.overviewRulerColor !== 'undefined' From 89089f17135b04a9505c000f358f29436d7c998f Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 2 May 2017 15:34:59 +0200 Subject: [PATCH 0127/2747] Quick open: Editor history selection lost once file results kick in (fixes #20828) --- .../workbench/browser/parts/quickopen/quickOpenController.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index edfd121cec2a5..7e7aa6fed45d3 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -860,10 +860,11 @@ export class QuickOpenController extends Component implements IQuickOpenService // Show additional handler results below any existing results if (additionalHandlerResults.length > 0) { + const autoFocusFirstEntry = (quickOpenModel.getEntries().length === 0); // the user might have selected another entry meanwhile in local history (see https://github.com/Microsoft/vscode/issues/20828) const useTopBorder = quickOpenModel.getEntries().length > 0; additionalHandlerResults[0] = new QuickOpenEntryGroup(additionalHandlerResults[0], groupLabel, useTopBorder); quickOpenModel.addEntries(additionalHandlerResults); - this.quickOpenWidget.refresh(quickOpenModel, { autoFocusFirstEntry: true }); + this.quickOpenWidget.refresh(quickOpenModel, { autoFocusFirstEntry }); } // Otherwise if no results are present (even from histoy) indicate this to the user From ac466c3cc8263e86a67fa3ae2682b9895134c4a3 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 2 May 2017 17:28:12 +0200 Subject: [PATCH 0128/2747] :lipstick: remove check for qunit --- src/vs/base/common/platform.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/vs/base/common/platform.ts b/src/vs/base/common/platform.ts index 77311e2dc5817..4e5c5266d0fd7 100644 --- a/src/vs/base/common/platform.ts +++ b/src/vs/base/common/platform.ts @@ -12,7 +12,6 @@ let _isLinux = false; let _isRootUser = false; let _isNative = false; let _isWeb = false; -let _isQunit = false; let _locale: string = undefined; let _language: string = undefined; @@ -68,7 +67,6 @@ if (typeof process === 'object') { _isWeb = true; _locale = navigator.language; _language = _locale; - _isQunit = !!(self).QUnit; } export enum Platform { @@ -95,7 +93,6 @@ export const isLinux = _isLinux; export const isRootUser = _isRootUser; export const isNative = _isNative; export const isWeb = _isWeb; -export const isQunit = _isQunit; export const platform = _platform; /** From 662397b9813dc811b3aac443302bde2060e75fe8 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 2 May 2017 17:39:02 +0200 Subject: [PATCH 0129/2747] :lipstick: remove unused code --- src/vs/base/common/network.ts | 64 ----------------------------------- 1 file changed, 64 deletions(-) diff --git a/src/vs/base/common/network.ts b/src/vs/base/common/network.ts index 571b7e1fb3c50..93de044478a53 100644 --- a/src/vs/base/common/network.ts +++ b/src/vs/base/common/network.ts @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { TPromise } from 'vs/base/common/winjs.base'; - export namespace Schemas { /** @@ -42,65 +40,3 @@ export namespace Schemas { export const untitled: string = 'untitled'; } - -export interface IXHROptions { - type?: string; - url?: string; - user?: string; - password?: string; - responseType?: string; - headers?: any; - customRequestInitializer?: (req: any) => void; - data?: any; -} - -export function xhr(options: IXHROptions): TPromise { - let req: XMLHttpRequest = null; - let canceled = false; - - return new TPromise((c, e, p) => { - req = new XMLHttpRequest(); - - req.onreadystatechange = () => { - if (canceled) { - return; - } - - if (req.readyState === 4) { - // Handle 1223: http://bugs.jquery.com/ticket/1450 - if ((req.status >= 200 && req.status < 300) || req.status === 1223) { - c(req); - } else { - e(req); - } - req.onreadystatechange = () => { }; - } else { - p(req); - } - }; - - req.open( - options.type || 'GET', - options.url, - // Promise based XHR does not support sync. - // - true, - options.user, - options.password - ); - req.responseType = options.responseType as any || ''; - - Object.keys(options.headers || {}).forEach((k) => { - req.setRequestHeader(k, options.headers[k]); - }); - - if (options.customRequestInitializer) { - options.customRequestInitializer(req); - } - - req.send(options.data); - }, () => { - canceled = true; - req.abort(); - }); -} \ No newline at end of file From 672663fcead83f64d34b179a5c6625727fdfac14 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 2 May 2017 17:55:46 +0200 Subject: [PATCH 0130/2747] :lipstick: or-types ftw --- src/vs/base/common/collections.ts | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/vs/base/common/collections.ts b/src/vs/base/common/collections.ts index ddd96a7298a89..ca4832b1ccba3 100644 --- a/src/vs/base/common/collections.ts +++ b/src/vs/base/common/collections.ts @@ -27,9 +27,7 @@ const hasOwnProperty = Object.prototype.hasOwnProperty; * Returns an array which contains all values that reside * in the given set. */ -export function values(from: IStringDictionary): T[]; -export function values(from: INumberDictionary): T[]; -export function values(from: any): any[] { +export function values(from: IStringDictionary | INumberDictionary): T[] { const result: T[] = []; for (var key in from) { if (hasOwnProperty.call(from, key)) { @@ -53,10 +51,8 @@ export function size(from: IStringDictionary | INumberDictionary): numb * Iterates over each entry in the provided set. The iterator allows * to remove elements and will stop when the callback returns {{false}}. */ -export function forEach(from: IStringDictionary, callback: (entry: { key: string; value: T; }, remove: Function) => any): void; -export function forEach(from: INumberDictionary, callback: (entry: { key: number; value: T; }, remove: Function) => any): void; -export function forEach(from: any, callback: (entry: { key: any; value: T; }, remove: Function) => any): void { - for (var key in from) { +export function forEach(from: IStringDictionary | INumberDictionary, callback: (entry: { key: any; value: T; }, remove: Function) => any): void { + for (let key in from) { if (hasOwnProperty.call(from, key)) { const result = callback({ key: key, value: from[key] }, function () { delete from[key]; @@ -72,9 +68,7 @@ export function forEach(from: any, callback: (entry: { key: any; value: T; }, * Removes an element from the dictionary. Returns {{false}} if the property * does not exists. */ -export function remove(from: IStringDictionary, key: string): boolean; -export function remove(from: INumberDictionary, key: string): boolean; -export function remove(from: any, key: string): boolean { +export function remove(from: IStringDictionary | INumberDictionary, key: string): boolean { if (!hasOwnProperty.call(from, key)) { return false; } From 0ddd558b297a67348ca5ec9b87ee357ed51d0bd0 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 2 May 2017 10:37:43 -0700 Subject: [PATCH 0131/2747] Pull in updated clojure grammar --- .../clojure/syntaxes/clojure.tmLanguage.json | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/extensions/clojure/syntaxes/clojure.tmLanguage.json b/extensions/clojure/syntaxes/clojure.tmLanguage.json index 9f130767d07bf..6e2d50b5ea544 100644 --- a/extensions/clojure/syntaxes/clojure.tmLanguage.json +++ b/extensions/clojure/syntaxes/clojure.tmLanguage.json @@ -240,8 +240,18 @@ ] }, "regexp": { - "begin": "#\\\"", - "end": "\\\"", + "begin": "#\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.regexp.begin.clojure" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.regexp.end.clojure" + } + }, "name": "string.regexp.clojure", "patterns": [ { @@ -301,7 +311,7 @@ "name": "meta.expression.clojure", "patterns": [ { - "begin": "(?<=\\()(ns|def|def-|defn|defn-|defvar|defvar-|defmacro|defmacro-|deftest)\\s+", + "begin": "(?<=\\()(ns|declare|def[\\w\\d._:+=> Date: Tue, 2 May 2017 10:49:45 -0700 Subject: [PATCH 0132/2747] More Monokai refinements - Focus color is now more muted - Fixed notification foreground - Added input option active border - Added input validation colors - Added title bar color Part of #25742 --- .../themes/monokai-color-theme.json | 43 ++++++++++++------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index 3f9ea01f819e4..b9331a910c26f 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -1,14 +1,20 @@ +// This theme's colors are based on the original Monokai: +// #1e1f1c (tab well, borders) +// #272822 (editor background) +// #414339 (selection) +// #75715e (focus) +// #f8f8f2 (editor foreground) { "type": "dark", "colors": { "dropdown.background": "#414339", - "list.activeSelectionBackground": "#f92672", + "list.activeSelectionBackground": "#75715E", "list.focusBackground": "#414339", "list.inactiveSelectionBackground": "#414339", "list.hoverBackground": "#272822", "list.dropBackground": "#414339", - "list.highlightForeground": "#f92672", - "button.background": "#f92672", + "list.highlightForeground": "#75715E", + "button.background": "#75715E", "editor.background": "#272822", "editor.foreground": "#f8f8f2", "editor.selectionBackground": "#49483e", @@ -24,33 +30,40 @@ "widget.shadow": "#1e1f1c", "editorLineNumber.foreground": "#90908a", "panelTitle.activeForeground": "#f8f8f2", - "panelTitle.activeBorder": "#f92672", - "panelTitle.inactiveForeground": "#75715E", // comment color + "panelTitle.activeBorder": "#75715E", + "panelTitle.inactiveForeground": "#75715E", "panel.border": "#414339", + "titleBar.activeBackground": "#414339", "statusBar.background": "#414339", "statusBar.noFolderBackground": "#414339", - "statusBar.debuggingBackground": "#f92672", + "statusBar.debuggingBackground": "#75715E", "activityBar.background": "#272822", "activityBarBadge.foreground": "#f8f8f2", - "activityBarBadge.background": "#f92672", + "activityBarBadge.background": "#75715E", "activityBar.foreground": "#f8f8f2", "activityBar.dropBackground": "#414339", "sideBar.background": "#1e1f1c", "sideBarSectionHeader.background": "#272822", - "notification.foreground": "#1e1f1c", - "pickerGroup.foreground": "#f92672", + "pickerGroup.foreground": "#75715E", "input.background": "#414339", - "focusBorder": "#f92672", + "inputOption.activeBorder": "#75715E", + "focusBorder": "#75715E", "editorWidget.background": "#1e1f1c", "debugToolBar.background": "#1e1f1c", "diffEditor.insertedTextBackground": "#66852880", // middle of #272822 and #a6e22e - "diffEditor.removedTextBackground": "#90274A80", // middle of f92672 and #a6e22e + "diffEditor.removedTextBackground": "#90274A80", // middle of #272822 and #f92672 + "inputValidation.errorBackground": "#90274A", // middle of #272822 and #f92672 + "inputValidation.errorBorder": "#f92672", + "inputValidation.warningBackground": "#848528", // middle of #272822 and #e2e22e + "inputValidation.warningBorder": "#e2e22e", + "inputValidation.infoBackground": "#546190", // middle of #272822 and #819aff + "inputValidation.infoBorder": "#819aff", "editorHoverWidget.background": "#414339", - "editorHoverWidget.border": "#75715E", // comment color + "editorHoverWidget.border": "#75715E", "editorSuggestWidget.background": "#272822", - "editorSuggestWidget.border": "#75715E", // comment color - "editorGroup.border": "#414339", // comment color - "peekView.border": "#f92672", + "editorSuggestWidget.border": "#75715E", + "editorGroup.border": "#414339", + "peekView.border": "#75715E", "peekViewEditor.background": "#272822", "peekViewResult.background": "#1e1f1c", "peekViewTitle.background": "#1e1f1c", From 4b9a244cbfaebe267545a80aee795f9c1b8ccd3c Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 2 May 2017 11:11:46 -0700 Subject: [PATCH 0133/2747] Restore monokai dimmed background - Restored dimmed monokai bg colors - Set saturation of blue tinted colors to 0 - Whitespace using indent guide color - Improve contrast of inactive tab - Add inputOption.activeBorder and focusBorder Fixes #25742 --- .../themes/dimmed-monokai-color-theme.json | 49 ++++++++++--------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json index 4b598c44ec03d..68aeef661f009 100644 --- a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json +++ b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json @@ -1,38 +1,41 @@ { "type": "dark", "colors": { - "dropdown.background": "#383852", - "list.activeSelectionBackground": "#303070", - "list.focusBackground": "#425370", - "list.inactiveSelectionBackground": "#23324e", - "list.hoverBackground": "#005070", + "dropdown.background": "#525252", + "list.activeSelectionBackground": "#707070", + "list.focusBackground": "#707070", + "list.inactiveSelectionBackground": "#4e4e4e", + "list.hoverBackground": "#707070", "list.highlightForeground": "#e58520", - "button.background": "#1e4456", - "editor.background": "#202025", + "button.background": "#565656", + "editor.background": "#1e1e1e", "editor.foreground": "#c5c8c6", "editor.selectionBackground": "#373b41", "editor.lineHighlightBackground": "#303030", "editorCursor.foreground": "#c07020", - "editorWhitespace.foreground": "#383880", + "editorWhitespace.foreground": "#505037", "editorIndentGuide.background": "#505037", - "editorGroupHeader.tabsBackground": "#222228", - "editorGroup.background": "#1a1a1e", - "tab.inactiveBackground": "#333340", - "tab.border": "#000030", + "editorGroupHeader.tabsBackground": "#282828", + "editorGroup.background": "#1e1e1e", + "tab.inactiveBackground": "#404040", + "tab.border": "#303030", + "tab.inactiveForeground": "#d8d8d8", "peekView.border": "#3655b5", - "panelTitle.activeForeground": "#ddffff", - "statusBar.background": "#354550", - "statusBar.debuggingBackground": "#354550", - "statusBar.noFolderBackground": "#354550", - "titleBar.activeBackground": "#354550", - "activityBar.background": "#292935", + "panelTitle.activeForeground": "#ffffff", + "statusBar.background": "#505050", + "statusBar.debuggingBackground": "#505050", + "statusBar.noFolderBackground": "#505050", + "titleBar.activeBackground": "#505050", + "activityBar.background": "#353535", "activityBar.foreground": "#ffffff", "activityBarBadge.background": "#3655b5", - "sideBar.background": "#232327", - "sideBarSectionHeader.background": "#424250", - "notification.background": "#292935", - "pickerGroup.foreground": "#77a5b0", - "terminal.ansiWhite": "#ddffff" + "sideBar.background": "#272727", + "sideBarSectionHeader.background": "#505050", + "notification.background": "#353535", + "pickerGroup.foreground": "#b0b0b0", + "terminal.ansiWhite": "#ffffff", + "inputOption.activeBorder": "#3655b5", + "focusBorder": "#3655b5" }, "tokenColors": [ { From 36ce3d156fc749ea9a8b9f82f87ee096020017fd Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 2 May 2017 13:38:01 -0700 Subject: [PATCH 0134/2747] Show header level in markdown Fixes #25574 --- extensions/markdown/src/documentSymbolProvider.ts | 2 +- extensions/markdown/src/tableOfContentsProvider.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/markdown/src/documentSymbolProvider.ts b/extensions/markdown/src/documentSymbolProvider.ts index e35e690d624fd..dec8161964831 100644 --- a/extensions/markdown/src/documentSymbolProvider.ts +++ b/extensions/markdown/src/documentSymbolProvider.ts @@ -19,7 +19,7 @@ export default class MDDocumentSymbolProvider implements vscode.DocumentSymbolPr provideDocumentSymbols(document: vscode.TextDocument): vscode.ProviderResult { const toc = new TableOfContentsProvider(this.engine, document); return toc.getToc().map(entry => { - return new vscode.SymbolInformation(entry.text, vscode.SymbolKind.Module, '', entry.location); + return new vscode.SymbolInformation(entry.text, vscode.SymbolKind.Namespace, '', entry.location); }); } } \ No newline at end of file diff --git a/extensions/markdown/src/tableOfContentsProvider.ts b/extensions/markdown/src/tableOfContentsProvider.ts index 7a08e6b4348ea..983b9113ffa58 100644 --- a/extensions/markdown/src/tableOfContentsProvider.ts +++ b/extensions/markdown/src/tableOfContentsProvider.ts @@ -66,7 +66,7 @@ export class TableOfContentsProvider { } private static getHeaderText(header: string): string { - return header.replace(/^\s*(#)+\s*(.*?)\s*\1*$/, '$2').trim(); + return header.replace(/^\s*(#+)\s*(.*?)\s*\1*$/, (_, level, word) => `${level} ${word.trim()}`); } public static slugify(header: string): string { From 8120c7f1b8591cd1825509d1abe8b6ddeab8b93b Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 2 May 2017 14:14:18 -0700 Subject: [PATCH 0135/2747] Use TypeScrit 2.3.2 for building VSCode (#25753) --- build/monaco/package.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/monaco/package.json b/build/monaco/package.json index 604ffd4b5fe10..a697b035f7139 100644 --- a/build/monaco/package.json +++ b/build/monaco/package.json @@ -48,7 +48,7 @@ "sinon": "^1.17.2", "source-map": "^0.4.4", "tslint": "^4.3.1", - "typescript": "2.2.2", + "typescript": "2.3.2", "typescript-formatter": "4.0.1", "underscore": "^1.8.2", "vinyl": "^0.4.5", diff --git a/package.json b/package.json index 1aa328903d362..49f1836ee4e0d 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "sinon": "^1.17.2", "source-map": "^0.4.4", "tslint": "^4.3.1", - "typescript": "2.2.2", + "typescript": "2.3.2", "typescript-formatter": "4.0.1", "uglify-js": "2.4.8", "underscore": "^1.8.2", From 05c771c2bba38a65b194cd804f687cce14182a09 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Tue, 2 May 2017 23:32:03 +0200 Subject: [PATCH 0136/2747] node-debug@1.13.0 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 08a775ce6e633..e5bab79358570 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -41,7 +41,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.12.14' }, + { name: 'ms-vscode.node-debug', version: '1.13.0' }, { name: 'ms-vscode.node-debug2', version: '1.12.4' } ]; From 7a378e4fb171d85087a15be47aaa89b50b081e46 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 3 May 2017 06:51:47 +0200 Subject: [PATCH 0137/2747] Can't split file when dragging from explorer (fixes #25789) --- .../browser/parts/editor/editorGroupsControl.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index 7a54896285ab5..d19a3395f438f 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -1282,8 +1282,14 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro // Drag enter let counter = 0; // see https://github.com/Microsoft/vscode/issues/14470 this.toUnbind.push(DOM.addDisposableListener(node, DOM.EventType.DRAG_ENTER, (e: DragEvent) => { - if (!TitleControl.getDraggedEditor() && !extractResources(e).length) { - return; // invalid DND + if (!TitleControl.getDraggedEditor()) { + // we used to check for the dragged resources here (via dnd.extractResources()) but this + // seems to be not possible on Linux and Windows where during DRAG_ENTER the resources + // are always undefined up until they are dropped when dragged from the tree. The workaround + // is to check for a datatransfer type being set. See https://github.com/Microsoft/vscode/issues/25789 + if (!e.dataTransfer.types.length) { + return; // invalid DND + } } counter++; From a7b1e6ccd2973d8d46d8a97777c720a6958aba64 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 3 May 2017 07:06:12 +0200 Subject: [PATCH 0138/2747] Windows: changes to node_modules folder are ignored due to watcherExclude setting (fixes #23954) --- src/vs/workbench/parts/files/browser/files.contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/files/browser/files.contribution.ts b/src/vs/workbench/parts/files/browser/files.contribution.ts index f65444bfadbc0..b3b9532576f05 100644 --- a/src/vs/workbench/parts/files/browser/files.contribution.ts +++ b/src/vs/workbench/parts/files/browser/files.contribution.ts @@ -261,7 +261,7 @@ configurationRegistry.registerConfiguration({ }, 'files.watcherExclude': { 'type': 'object', - 'default': { '**/.git/objects/**': true, '**/node_modules/**': true }, + 'default': platform.isWindows /* https://github.com/Microsoft/vscode/issues/23954 */ ? { '**/.git/objects/**': true, '**/node_modules/*/**': true } : { '**/.git/objects/**': true, '**/node_modules/**': true }, 'description': nls.localize('watcherExclude', "Configure glob patterns of file paths to exclude from file watching. Changing this setting requires a restart. When you experience Code consuming lots of cpu time on startup, you can exclude large folders to reduce the initial load.") }, 'files.hotExit': { From ea57f5c04ea39c9b221f5b132072e12461f9ee89 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 3 May 2017 07:10:39 +0200 Subject: [PATCH 0139/2747] :lipstick: --- src/vs/code/electron-main/windows.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 6fdb5efa1f4ae..a43d3844bb46e 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -253,11 +253,8 @@ export class WindowsManager implements IWindowsMainService { this.lifecycleService.onBeforeWindowClose(win => this.onBeforeWindowClose(win)); this.lifecycleService.onBeforeQuit(() => this.onBeforeQuit()); - KeyboardLayoutMonitor.INSTANCE.onDidChangeKeyboardLayout((isISOKeyboard: boolean) => { - WindowsManager.WINDOWS.forEach((window) => { - window.sendWhenReady('vscode:keyboardLayoutChanged', isISOKeyboard); - }); - }); + // Keyboard layout changes + KeyboardLayoutMonitor.INSTANCE.onDidChangeKeyboardLayout(isISOKeyboard => this.sendToAll('vscode:keyboardLayoutChanged', isISOKeyboard)); } // Note that onBeforeQuit() and onBeforeWindowClose() are fired in different order depending on the OS: From 8ea9e6d0af4a0587cf9802b316fade73224b179b Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 3 May 2017 07:29:01 +0200 Subject: [PATCH 0140/2747] Mac: Watcher fails on folders with glob characters in name (fixes #4586) --- src/typings/chokidar.d.ts | 5 +++++ .../files/node/watcher/unix/chokidarWatcherService.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/typings/chokidar.d.ts b/src/typings/chokidar.d.ts index 719eae1ea0659..019a9e80e6c22 100644 --- a/src/typings/chokidar.d.ts +++ b/src/typings/chokidar.d.ts @@ -57,6 +57,11 @@ declare module 'chokidar' { * (default: true). When false, only the symlinks themselves will be watched for changes instead of following the link references and bubbling events through the link's path. */ followSymlinks?: boolean; + + /** + * (default: false). If set to true then the strings passed to .watch() and .add() are treated as literal path names, even if they look like globs. + */ + disableGlobbing?: boolean; } export interface FSWatcher { diff --git a/src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts b/src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts index e5b47ec111d81..63a17ea995d4e 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts @@ -35,7 +35,8 @@ export class ChokidarWatcherService implements IWatcherService { followSymlinks: true, // this is the default of chokidar and supports file events through symlinks ignored: request.ignored, interval: 1000, // while not used in normal cases, if any error causes chokidar to fallback to polling, increase its intervals - binaryInterval: 1000 + binaryInterval: 1000, + disableGlobbing: true // fix https://github.com/Microsoft/vscode/issues/4586 }; // Chokidar fails when the basePath does not match case-identical to the path on disk From 8dc5b561207b563f863f02dd40af849f4c1fb569 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Tue, 2 May 2017 12:59:16 +0200 Subject: [PATCH 0141/2747] Fixes #4358: Output Window is removing new lines --- src/vs/base/node/decoder.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/vs/base/node/decoder.ts b/src/vs/base/node/decoder.ts index a725903b51013..112c6cdf6cb95 100644 --- a/src/vs/base/node/decoder.ts +++ b/src/vs/base/node/decoder.ts @@ -36,9 +36,6 @@ export class LineDecoder { } let start = 0; let ch: number; - while (start < value.length && ((ch = value.charCodeAt(start)) === CharCode.CarriageReturn || ch === CharCode.LineFeed)) { - start++; - } let idx = start; while (idx < value.length) { ch = value.charCodeAt(idx); From 378c4b5cd4b88bd27e305ca529dd879b70ef7244 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Wed, 26 Apr 2017 16:57:47 +0200 Subject: [PATCH 0142/2747] Fixes #452: Problem matcher severity handles "Note" and "Hint" as errors --- .../platform/markers/common/problemMatcher.ts | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/vs/platform/markers/common/problemMatcher.ts b/src/vs/platform/markers/common/problemMatcher.ts index 063c064e1ad57..b3120929f9c80 100644 --- a/src/vs/platform/markers/common/problemMatcher.ts +++ b/src/vs/platform/markers/common/problemMatcher.ts @@ -126,12 +126,6 @@ export function isNamedProblemMatcher(value: ProblemMatcher): value is NamedProb return value && Types.isString((value).name) ? true : false; } -let valueMap: { [key: string]: string; } = { - E: 'error', - W: 'warning', - I: 'info', -}; - interface Location { startLineNumber: number; startCharacter: number; @@ -192,7 +186,7 @@ export function createLineMatcher(matcher: ProblemMatcher): ILineMatcher { } } -class AbstractLineMatcher implements ILineMatcher { +abstract class AbstractLineMatcher implements ILineMatcher { private matcher: ProblemMatcher; constructor(matcher: ProblemMatcher) { @@ -207,9 +201,7 @@ class AbstractLineMatcher implements ILineMatcher { return null; } - public get matchLength(): number { - throw new Error('Subclass reponsibility'); - } + public abstract get matchLength(): number; protected fillProblemData(data: ProblemData, pattern: ProblemPattern, matches: RegExpExecArray): void { this.fillProperty(data, 'file', pattern, matches, true); @@ -302,11 +294,21 @@ class AbstractLineMatcher implements ILineMatcher { let result: Severity = null; if (data.severity) { let value = data.severity; - if (value && value.length > 0) { - if (value.length === 1 && valueMap[value[0]]) { - value = valueMap[value[0]]; - } + if (value) { result = Severity.fromValue(value); + if (result === Severity.Ignore) { + if (value === 'E') { + result = Severity.Error; + } else if (value === 'W') { + result = Severity.Warning; + } else if (value === 'I') { + result = Severity.Info; + } else if (Strings.equalsIgnoreCase(value, 'hint')) { + result = Severity.Info; + } else if (Strings.equalsIgnoreCase(value, 'note')) { + result = Severity.Info; + } + } } } if (result === null || result === Severity.Ignore) { From d9311bd3969c58563d72ae3d8de9f2ed07124c2e Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 3 May 2017 10:28:34 +0200 Subject: [PATCH 0143/2747] [theme] Workbench button.foreground doens't work. Fixes #25767 --- .../services/themes/electron-browser/workbenchThemeService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index afaaba898f8f9..2b5a118ce740c 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -407,6 +407,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { if (themeId === this.currentColorTheme.id && !this.currentColorTheme.isLoaded && this.currentColorTheme.hasEqualData(themeData)) { // the loaded theme is identical to the perisisted theme. Don't need to send an event. this.currentColorTheme = themeData; + themeData.setCustomColors(this.colorCustomizations); return TPromise.as(themeData); } themeData.setCustomColors(this.colorCustomizations); From 358eb92d72a97dbbfb27d19baa200cca82e6cac6 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 3 May 2017 14:34:45 +0200 Subject: [PATCH 0144/2747] make sure default editor position is set, fixes #25801 --- .../vscode-api-tests/src/window.test.ts | 21 ++++++++++++++++++- .../workbench/api/node/extHostTextEditors.ts | 2 ++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/extensions/vscode-api-tests/src/window.test.ts b/extensions/vscode-api-tests/src/window.test.ts index 94a11bdff8ea4..cb14027e666b6 100644 --- a/extensions/vscode-api-tests/src/window.test.ts +++ b/extensions/vscode-api-tests/src/window.test.ts @@ -8,7 +8,7 @@ import * as assert from 'assert'; import { workspace, window, commands, ViewColumn, TextEditorViewColumnChangeEvent, Uri, Selection, Position, CancellationTokenSource, TextEditorSelectionChangeKind } from 'vscode'; import { join } from 'path'; -import { cleanUp, pathEquals } from './utils'; +import { cleanUp, pathEquals, createRandomFile } from './utils'; suite('window namespace tests', () => { @@ -110,6 +110,25 @@ suite('window namespace tests', () => { }); }); + test('issue #25801 - default column when opening a file', async () => { + const [docA, docB, docC] = await Promise.all([ + workspace.openTextDocument(await createRandomFile()), + workspace.openTextDocument(await createRandomFile()), + workspace.openTextDocument(await createRandomFile()) + ]); + + await window.showTextDocument(docA, ViewColumn.One); + await window.showTextDocument(docB, ViewColumn.Two); + + assert.ok(window.activeTextEditor); + assert.ok(window.activeTextEditor!.document === docB); + assert.equal(window.activeTextEditor!.viewColumn, ViewColumn.Two); + + await window.showTextDocument(docC); + assert.ok(window.activeTextEditor!.document === docC); + assert.equal(window.activeTextEditor!.viewColumn, ViewColumn.One); + }); + test('issue #5362 - Incorrect TextEditor passed by onDidChangeTextEditorSelection', (done) => { const file10Path = join(workspace.rootPath || '', './10linefile.ts'); const file30Path = join(workspace.rootPath || '', './30linefile.ts'); diff --git a/src/vs/workbench/api/node/extHostTextEditors.ts b/src/vs/workbench/api/node/extHostTextEditors.ts index 94003fbaa333f..e95c96c3bba90 100644 --- a/src/vs/workbench/api/node/extHostTextEditors.ts +++ b/src/vs/workbench/api/node/extHostTextEditors.ts @@ -14,6 +14,7 @@ import { IResolvedTextEditorConfiguration, ISelectionChangeEvent } from 'vs/work import * as TypeConverters from './extHostTypeConverters'; import { TextEditorDecorationType, ExtHostTextEditor } from './extHostTextEditor'; import { ExtHostDocumentsAndEditors } from './extHostDocumentsAndEditors'; +import { Position as EditorPosition } from 'vs/platform/editor/common/editor'; import { MainContext, MainThreadEditorsShape, ExtHostEditorsShape, ITextDocumentShowOptions, ITextEditorPositionData } from './extHost.protocol'; import * as vscode from 'vscode'; @@ -74,6 +75,7 @@ export class ExtHostEditors extends ExtHostEditorsShape { }; } else { options = { + position: EditorPosition.ONE, preserveFocus: false, pinned: true }; From e52841338231906f7cb61b7ddf879d85d2960358 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 3 May 2017 02:59:24 -0700 Subject: [PATCH 0145/2747] Prepare for special handling of combos without ctrl+alt+ --- .../common/macLinuxKeyboardMapper.ts | 77 +++++++++++++------ 1 file changed, 52 insertions(+), 25 deletions(-) diff --git a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts index b884e80add28e..b517eea74a8b6 100644 --- a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts @@ -621,37 +621,85 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { // Handle all `withShiftAltGr` entries for (let i = mappings.length - 1; i >= 0; i--) { const mapping = mappings[i]; + const scanCode = mapping.scanCode; const withShiftAltGr = mapping.withShiftAltGr; if (withShiftAltGr === mapping.withAltGr || withShiftAltGr === mapping.withShift || withShiftAltGr === mapping.value) { // handled below continue; } - this._registerCharCode(mapping.scanCode, true, true, true, withShiftAltGr); + const kb = MacLinuxKeyboardMapper._charCodeToKb(withShiftAltGr); + if (!kb) { + this._registerAllCombos1(true, true, true, scanCode, KeyCode.Unknown); + continue; + } + const kbShiftKey = kb.shiftKey; + const keyCode = kb.keyCode; + + this._registerAllCombos2( + true, true, true, scanCode, + kbShiftKey, keyCode + ); } // Handle all `withAltGr` entries for (let i = mappings.length - 1; i >= 0; i--) { const mapping = mappings[i]; + const scanCode = mapping.scanCode; const withAltGr = mapping.withAltGr; if (withAltGr === mapping.withShift || withAltGr === mapping.value) { // handled below continue; } - this._registerCharCode(mapping.scanCode, true, false, true, withAltGr); + const kb = MacLinuxKeyboardMapper._charCodeToKb(withAltGr); + if (!kb) { + this._registerAllCombos1(true, false, true, scanCode, KeyCode.Unknown); + continue; + } + const kbShiftKey = kb.shiftKey; + const keyCode = kb.keyCode; + + this._registerAllCombos2( + true, false, true, scanCode, + kbShiftKey, keyCode + ); } // Handle all `withShift` entries for (let i = mappings.length - 1; i >= 0; i--) { const mapping = mappings[i]; + const scanCode = mapping.scanCode; const withShift = mapping.withShift; if (withShift === mapping.value) { // handled below continue; } - this._registerCharCode(mapping.scanCode, false, true, false, withShift); + const kb = MacLinuxKeyboardMapper._charCodeToKb(withShift); + if (!kb) { + this._registerAllCombos1(false, true, false, scanCode, KeyCode.Unknown); + continue; + } + const kbShiftKey = kb.shiftKey; + const keyCode = kb.keyCode; + + this._registerAllCombos2( + false, true, false, scanCode, + kbShiftKey, keyCode + ); } // Handle all `value` entries for (let i = mappings.length - 1; i >= 0; i--) { const mapping = mappings[i]; - this._registerCharCode(mapping.scanCode, false, false, false, mapping.value); + const scanCode = mapping.scanCode; + const kb = MacLinuxKeyboardMapper._charCodeToKb(mapping.value); + if (!kb) { + this._registerAllCombos1(false, false, false, scanCode, KeyCode.Unknown); + continue; + } + const kbShiftKey = kb.shiftKey; + const keyCode = kb.keyCode; + + this._registerAllCombos2( + false, false, false, scanCode, + kbShiftKey, keyCode + ); } // Handle all left-over available digits this._registerAllCombos1(false, false, false, ScanCode.Digit1, KeyCode.KEY_1); @@ -871,27 +919,6 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { } } - private _registerCharCode(scanCode: ScanCode, ctrlKey: boolean, shiftKey: boolean, altKey: boolean, charCode: number): void { - - let _kb = MacLinuxKeyboardMapper._charCodeToKb(charCode); - let kb = _kb ? { - ctrlKey: false, - shiftKey: _kb.shiftKey, - altKey: false, - keyCode: _kb.keyCode - } : null; - - if (!_kb) { - this._registerAllCombos1(ctrlKey, shiftKey, altKey, scanCode, KeyCode.Unknown); - return; - } - - this._registerAllCombos2( - ctrlKey, shiftKey, altKey, scanCode, - kb.shiftKey, kb.keyCode - ); - } - public simpleKeybindingToScanCodeBinding(keybinding: SimpleKeybinding): ScanCodeBinding[] { // Avoid double Enter bindings (both ScanCode.NumpadEnter and ScanCode.Enter point to KeyCode.Enter) if (keybinding.keyCode === KeyCode.Enter) { From e2004c216b2844c6f2be1b512ad616b88294e256 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 3 May 2017 03:48:06 -0700 Subject: [PATCH 0146/2747] Unroll key combination registration loops --- .../common/macLinuxKeyboardMapper.ts | 155 +++++++++--------- .../services/keybinding/test/linux_de_ch.txt | 7 +- .../services/keybinding/test/mac_de_ch.txt | 2 - 3 files changed, 76 insertions(+), 88 deletions(-) diff --git a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts index b517eea74a8b6..95be462efedf1 100644 --- a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts @@ -561,7 +561,7 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { for (let scanCode = ScanCode.None; scanCode < ScanCode.MAX_VALUE; scanCode++) { const keyCode = IMMUTABLE_CODE_TO_KEY_CODE[scanCode]; if (keyCode !== -1) { - this._registerAllCombos1(false, false, false, scanCode, keyCode); + this._registerAllCombos(0, 0, 0, scanCode, keyCode); this._scanCodeToLabel[scanCode] = KeyCodeUtils.toString(keyCode); if (keyCode === KeyCode.Unknown || keyCode === KeyCode.Ctrl || keyCode === KeyCode.Meta || keyCode === KeyCode.Alt || keyCode === KeyCode.Shift) { @@ -629,16 +629,19 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { } const kb = MacLinuxKeyboardMapper._charCodeToKb(withShiftAltGr); if (!kb) { - this._registerAllCombos1(true, true, true, scanCode, KeyCode.Unknown); + this._registerAllCombos(1, 1, 1, scanCode, KeyCode.Unknown); continue; } const kbShiftKey = kb.shiftKey; const keyCode = kb.keyCode; - this._registerAllCombos2( - true, true, true, scanCode, - kbShiftKey, keyCode - ); + if (kbShiftKey) { + // Ctrl+Shift+Alt+ScanCode => Shift+KeyCode + this._registerIfUnknown(1, 1, 1, scanCode, 0, 1, 0, keyCode); // Ctrl+Alt+ScanCode => Shift+KeyCode + } else { + // Ctrl+Shift+Alt+ScanCode => KeyCode + this._registerIfUnknown(1, 1, 1, scanCode, 0, 0, 0, keyCode); // Ctrl+Alt+ScanCode => KeyCode + } } // Handle all `withAltGr` entries for (let i = mappings.length - 1; i >= 0; i--) { @@ -651,16 +654,19 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { } const kb = MacLinuxKeyboardMapper._charCodeToKb(withAltGr); if (!kb) { - this._registerAllCombos1(true, false, true, scanCode, KeyCode.Unknown); + this._registerAllCombos(1, 0, 1, scanCode, KeyCode.Unknown); continue; } const kbShiftKey = kb.shiftKey; const keyCode = kb.keyCode; - this._registerAllCombos2( - true, false, true, scanCode, - kbShiftKey, keyCode - ); + if (kbShiftKey) { + // Ctrl+Alt+ScanCode => Shift+KeyCode + this._registerIfUnknown(1, 0, 1, scanCode, 0, 1, 0, keyCode); // Ctrl+Alt+ScanCode => Shift+KeyCode + } else { + // Ctrl+Alt+ScanCode => KeyCode + this._registerIfUnknown(1, 0, 1, scanCode, 0, 0, 0, keyCode); // Ctrl+Alt+ScanCode => KeyCode + } } // Handle all `withShift` entries for (let i = mappings.length - 1; i >= 0; i--) { @@ -673,16 +679,29 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { } const kb = MacLinuxKeyboardMapper._charCodeToKb(withShift); if (!kb) { - this._registerAllCombos1(false, true, false, scanCode, KeyCode.Unknown); + this._registerAllCombos(0, 1, 0, scanCode, KeyCode.Unknown); continue; } const kbShiftKey = kb.shiftKey; const keyCode = kb.keyCode; - this._registerAllCombos2( - false, true, false, scanCode, - kbShiftKey, keyCode - ); + if (kbShiftKey) { + // Shift+ScanCode => Shift+KeyCode + this._registerIfUnknown(0, 1, 0, scanCode, 0, 1, 0, keyCode); // Shift+ScanCode => Shift+KeyCode + this._registerIfUnknown(0, 1, 1, scanCode, 0, 1, 1, keyCode); // Shift+Alt+ScanCode => Shift+Alt+KeyCode + this._registerIfUnknown(1, 1, 0, scanCode, 1, 1, 0, keyCode); // Ctrl+Shift+ScanCode => Ctrl+Shift+KeyCode + this._registerIfUnknown(1, 1, 1, scanCode, 1, 1, 1, keyCode); // Ctrl+Shift+Alt+ScanCode => Ctrl+Shift+Alt+KeyCode + } else { + // Shift+ScanCode => KeyCode + this._registerIfUnknown(0, 1, 0, scanCode, 0, 0, 0, keyCode); // Shift+ScanCode => KeyCode + this._registerIfUnknown(0, 1, 0, scanCode, 0, 1, 0, keyCode); // Shift+ScanCode => Shift+KeyCode + this._registerIfUnknown(0, 1, 1, scanCode, 0, 0, 1, keyCode); // Shift+Alt+ScanCode => Alt+KeyCode + this._registerIfUnknown(0, 1, 1, scanCode, 0, 1, 1, keyCode); // Shift+Alt+ScanCode => Shift+Alt+KeyCode + this._registerIfUnknown(1, 1, 0, scanCode, 1, 0, 0, keyCode); // Ctrl+Shift+ScanCode => Ctrl+KeyCode + this._registerIfUnknown(1, 1, 0, scanCode, 1, 1, 0, keyCode); // Ctrl+Shift+ScanCode => Ctrl+Shift+KeyCode + this._registerIfUnknown(1, 1, 1, scanCode, 1, 0, 1, keyCode); // Ctrl+Shift+Alt+ScanCode => Ctrl+Alt+KeyCode + this._registerIfUnknown(1, 1, 1, scanCode, 1, 1, 1, keyCode); // Ctrl+Shift+Alt+ScanCode => Ctrl+Shift+Alt+KeyCode + } } // Handle all `value` entries for (let i = mappings.length - 1; i >= 0; i--) { @@ -690,28 +709,41 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { const scanCode = mapping.scanCode; const kb = MacLinuxKeyboardMapper._charCodeToKb(mapping.value); if (!kb) { - this._registerAllCombos1(false, false, false, scanCode, KeyCode.Unknown); + this._registerAllCombos(0, 0, 0, scanCode, KeyCode.Unknown); continue; } const kbShiftKey = kb.shiftKey; const keyCode = kb.keyCode; - this._registerAllCombos2( - false, false, false, scanCode, - kbShiftKey, keyCode - ); + if (kbShiftKey) { + // ScanCode => Shift+KeyCode + this._registerIfUnknown(0, 0, 0, scanCode, 0, 1, 0, keyCode); // ScanCode => Shift+KeyCode + this._registerIfUnknown(0, 0, 1, scanCode, 0, 1, 1, keyCode); // Alt+ScanCode => Shift+Alt+KeyCode + this._registerIfUnknown(1, 0, 0, scanCode, 1, 1, 0, keyCode); // Ctrl+ScanCode => Ctrl+Shift+KeyCode + this._registerIfUnknown(1, 0, 1, scanCode, 1, 1, 1, keyCode); // Ctrl+Alt+ScanCode => Ctrl+Shift+Alt+KeyCode + } else { + // ScanCode => KeyCode + this._registerIfUnknown(0, 0, 0, scanCode, 0, 0, 0, keyCode); // ScanCode => KeyCode + this._registerIfUnknown(0, 0, 1, scanCode, 0, 0, 1, keyCode); // Alt+ScanCode => Alt+KeyCode + this._registerIfUnknown(0, 1, 0, scanCode, 0, 1, 0, keyCode); // Shift+ScanCode => Shift+KeyCode + this._registerIfUnknown(0, 1, 1, scanCode, 0, 1, 1, keyCode); // Shift+Alt+ScanCode => Shift+Alt+KeyCode + this._registerIfUnknown(1, 0, 0, scanCode, 1, 0, 0, keyCode); // Ctrl+ScanCode => Ctrl+KeyCode + this._registerIfUnknown(1, 0, 1, scanCode, 1, 0, 1, keyCode); // Ctrl+Alt+ScanCode => Ctrl+Alt+KeyCode + this._registerIfUnknown(1, 1, 0, scanCode, 1, 1, 0, keyCode); // Ctrl+Shift+ScanCode => Ctrl+Shift+KeyCode + this._registerIfUnknown(1, 1, 1, scanCode, 1, 1, 1, keyCode); // Ctrl+Shift+Alt+ScanCode => Ctrl+Shift+Alt+KeyCode + } } // Handle all left-over available digits - this._registerAllCombos1(false, false, false, ScanCode.Digit1, KeyCode.KEY_1); - this._registerAllCombos1(false, false, false, ScanCode.Digit2, KeyCode.KEY_2); - this._registerAllCombos1(false, false, false, ScanCode.Digit3, KeyCode.KEY_3); - this._registerAllCombos1(false, false, false, ScanCode.Digit4, KeyCode.KEY_4); - this._registerAllCombos1(false, false, false, ScanCode.Digit5, KeyCode.KEY_5); - this._registerAllCombos1(false, false, false, ScanCode.Digit6, KeyCode.KEY_6); - this._registerAllCombos1(false, false, false, ScanCode.Digit7, KeyCode.KEY_7); - this._registerAllCombos1(false, false, false, ScanCode.Digit8, KeyCode.KEY_8); - this._registerAllCombos1(false, false, false, ScanCode.Digit9, KeyCode.KEY_9); - this._registerAllCombos1(false, false, false, ScanCode.Digit0, KeyCode.KEY_0); + this._registerAllCombos(0, 0, 0, ScanCode.Digit1, KeyCode.KEY_1); + this._registerAllCombos(0, 0, 0, ScanCode.Digit2, KeyCode.KEY_2); + this._registerAllCombos(0, 0, 0, ScanCode.Digit3, KeyCode.KEY_3); + this._registerAllCombos(0, 0, 0, ScanCode.Digit4, KeyCode.KEY_4); + this._registerAllCombos(0, 0, 0, ScanCode.Digit5, KeyCode.KEY_5); + this._registerAllCombos(0, 0, 0, ScanCode.Digit6, KeyCode.KEY_6); + this._registerAllCombos(0, 0, 0, ScanCode.Digit7, KeyCode.KEY_7); + this._registerAllCombos(0, 0, 0, ScanCode.Digit8, KeyCode.KEY_8); + this._registerAllCombos(0, 0, 0, ScanCode.Digit9, KeyCode.KEY_9); + this._registerAllCombos(0, 0, 0, ScanCode.Digit0, KeyCode.KEY_0); // Ensure letters are mapped this._registerLetterIfMissing(producesLetter, CharCode.A, ScanCode.KeyA, KeyCode.KEY_A); @@ -746,7 +778,7 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { private _registerLetterIfMissing(producesLetter: boolean[], charCode: CharCode, scanCode: ScanCode, keyCode: KeyCode): void { if (!producesLetter[charCode]) { - this._registerAllCombos1(false, false, false, scanCode, keyCode); + this._registerAllCombos(0, 0, 0, scanCode, keyCode); } } @@ -853,25 +885,22 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { } private _registerIfUnknown( - hwCtrlKey: boolean, hwShiftKey: boolean, hwAltKey: boolean, scanCode: ScanCode, - kbCtrlKey: boolean, kbShiftKey: boolean, kbAltKey: boolean, keyCode: KeyCode, + hwCtrlKey: 0 | 1, hwShiftKey: 0 | 1, hwAltKey: 0 | 1, scanCode: ScanCode, + kbCtrlKey: 0 | 1, kbShiftKey: 0 | 1, kbAltKey: 0 | 1, keyCode: KeyCode, ): void { this._scanCodeKeyCodeMapper.registerIfUnknown( - new ScanCodeCombo(hwCtrlKey, hwShiftKey, hwAltKey, scanCode), - new KeyCodeCombo(kbCtrlKey, kbShiftKey, kbAltKey, keyCode) + new ScanCodeCombo(hwCtrlKey ? true : false, hwShiftKey ? true : false, hwAltKey ? true : false, scanCode), + new KeyCodeCombo(kbCtrlKey ? true : false, kbShiftKey ? true : false, kbAltKey ? true : false, keyCode) ); } - private _registerAllCombos1( - _ctrlKey: boolean, _shiftKey: boolean, _altKey: boolean, scanCode: ScanCode, + private _registerAllCombos( + _ctrlKey: 0 | 1, _shiftKey: 0 | 1, _altKey: 0 | 1, scanCode: ScanCode, keyCode: KeyCode, ): void { - for (let _ctrl = (_ctrlKey ? 1 : 0); _ctrl <= 1; _ctrl++) { - const ctrlKey = (_ctrl ? true : false); - for (let _shift = (_shiftKey ? 1 : 0); _shift <= 1; _shift++) { - const shiftKey = (_shift ? true : false); - for (let _alt = (_altKey ? 1 : 0); _alt <= 1; _alt++) { - const altKey = (_alt ? true : false); + for (let ctrlKey = _ctrlKey; ctrlKey <= 1; ctrlKey++) { + for (let shiftKey = _shiftKey; shiftKey <= 1; shiftKey++) { + for (let altKey = _altKey; altKey <= 1; altKey++) { this._registerIfUnknown( ctrlKey, shiftKey, altKey, scanCode, ctrlKey, shiftKey, altKey, keyCode @@ -881,44 +910,6 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { } } - private _registerAllCombos2( - hwCtrlKey: boolean, hwShiftKey: boolean, hwAltKey: boolean, scanCode: ScanCode, - kbShiftKey: boolean, keyCode: KeyCode, - ): void { - this._registerIfUnknown( - hwCtrlKey, hwShiftKey, hwAltKey, scanCode, - false, kbShiftKey, false, keyCode - ); - - if (!kbShiftKey) { - for (let _ctrl = (hwCtrlKey ? 1 : 0); _ctrl <= 1; _ctrl++) { - const ctrlKey = (_ctrl ? true : false); - for (let _alt = (hwAltKey ? 1 : 0); _alt <= 1; _alt++) { - const altKey = (_alt ? true : false); - this._registerIfUnknown( - ctrlKey, hwShiftKey, altKey, scanCode, - ctrlKey, kbShiftKey, altKey, keyCode - ); - this._registerIfUnknown( - ctrlKey, true, altKey, scanCode, - ctrlKey, true, altKey, keyCode - ); - } - } - } else { - for (let _ctrl = (hwCtrlKey ? 1 : 0); _ctrl <= 1; _ctrl++) { - const ctrlKey = (_ctrl ? true : false); - for (let _alt = (hwAltKey ? 1 : 0); _alt <= 1; _alt++) { - const altKey = (_alt ? true : false); - this._registerIfUnknown( - ctrlKey, hwShiftKey, altKey, scanCode, - ctrlKey, kbShiftKey, altKey, keyCode - ); - } - } - } - } - public simpleKeybindingToScanCodeBinding(keybinding: SimpleKeybinding): ScanCodeBinding[] { // Avoid double Enter bindings (both ScanCode.NumpadEnter and ScanCode.Enter point to KeyCode.Enter) if (keybinding.keyCode === KeyCode.Enter) { diff --git a/src/vs/workbench/services/keybinding/test/linux_de_ch.txt b/src/vs/workbench/services/keybinding/test/linux_de_ch.txt index ed9a85c54bc6e..aaf9263ec263c 100644 --- a/src/vs/workbench/services/keybinding/test/linux_de_ch.txt +++ b/src/vs/workbench/services/keybinding/test/linux_de_ch.txt @@ -349,7 +349,6 @@ isUSStandard: false | | | ] | 1 | | | | | | | Shift+Alt+Digit9 | ) | Shift+Alt+9 | | Shift+Alt+9 | shift+alt+9 | Shift+Alt+9 | shift+alt+[Digit9] | | | Ctrl+Shift+Alt+Digit9 | ± | Ctrl+Shift+Alt+9 | | Ctrl+Shift+Alt+9 | ctrl+shift+alt+9 | Ctrl+Shift+Alt+9 | ctrl+shift+alt+[Digit9] | | -| | | Ctrl+Shift+Alt+] | 1 | | | | | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Digit0 | 0 | 0 | | 0 | 0 | 0 | [Digit0] | | | Ctrl+Digit0 | 0 | Ctrl+0 | | Ctrl+0 | ctrl+0 | Ctrl+0 | ctrl+[Digit0] | | @@ -392,7 +391,7 @@ isUSStandard: false | Alt+BracketLeft | ü | | | Alt+ü | alt+[BracketLeft] | null | alt+[BracketLeft] | NO | | Ctrl+Alt+BracketLeft | [ | [ | | Ctrl+Alt+ü | ctrl+alt+[BracketLeft] | null | ctrl+alt+[BracketLeft] | NO | | Shift+Alt+BracketLeft | è | | | Shift+Alt+ü | shift+alt+[BracketLeft] | null | shift+alt+[BracketLeft] | NO | -| Ctrl+Shift+Alt+BracketLeft | ˚ | Ctrl+Shift+Alt+[ | | Ctrl+Shift+Alt+ü | ctrl+shift+alt+[BracketLeft] | null | ctrl+shift+alt+[BracketLeft] | NO | +| Ctrl+Shift+Alt+BracketLeft | ˚ | | | Ctrl+Shift+Alt+ü | ctrl+shift+alt+[BracketLeft] | null | ctrl+shift+alt+[BracketLeft] | NO | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | BracketRight | ¨ | | | ¨ | [BracketRight] | null | [BracketRight] | NO | | Ctrl+BracketRight | ¨ | | | Ctrl+¨ | ctrl+[BracketRight] | null | ctrl+[BracketRight] | NO | @@ -401,7 +400,7 @@ isUSStandard: false | Alt+BracketRight | ¨ | | | Alt+¨ | alt+[BracketRight] | null | alt+[BracketRight] | NO | | Ctrl+Alt+BracketRight | ] | ] | 2 | Ctrl+Alt+¨ | ctrl+alt+[BracketRight] | null | ctrl+alt+[BracketRight] | NO | | Shift+Alt+BracketRight | ! | | | Shift+Alt+¨ | shift+alt+[BracketRight] | null | shift+alt+[BracketRight] | NO | -| Ctrl+Shift+Alt+BracketRight | ¯ | Ctrl+Shift+Alt+] | 2 | Ctrl+Shift+Alt+¨ | ctrl+shift+alt+[BracketRight] | null | ctrl+shift+alt+[BracketRight] | NO | +| Ctrl+Shift+Alt+BracketRight | ¯ | | | Ctrl+Shift+Alt+¨ | ctrl+shift+alt+[BracketRight] | null | ctrl+shift+alt+[BracketRight] | NO | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -506,7 +505,7 @@ isUSStandard: false | Alt+IntlBackslash | < | Shift+Alt+, | | Alt+< | alt+[IntlBackslash] | null | alt+[IntlBackslash] | NO | | Ctrl+Alt+IntlBackslash | \ | \ | | Ctrl+Alt+< | ctrl+alt+[IntlBackslash] | null | ctrl+alt+[IntlBackslash] | NO | | Shift+Alt+IntlBackslash | > | Shift+Alt+. | | Shift+Alt+< | shift+alt+[IntlBackslash] | null | shift+alt+[IntlBackslash] | NO | -| Ctrl+Shift+Alt+IntlBackslash | ¦ | Ctrl+Shift+Alt+\ | | Ctrl+Shift+Alt+< | ctrl+shift+alt+[IntlBackslash] | null | ctrl+shift+alt+[IntlBackslash] | NO | +| Ctrl+Shift+Alt+IntlBackslash | ¦ | Ctrl+Shift+Alt+. | | Ctrl+Shift+Alt+< | ctrl+shift+alt+[IntlBackslash] | null | ctrl+shift+alt+[IntlBackslash] | NO | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | IntlRo | --- | | | null | [IntlRo] | null | [IntlRo] | NO | | Ctrl+IntlRo | --- | | | null | ctrl+[IntlRo] | null | ctrl+[IntlRo] | NO | diff --git a/src/vs/workbench/services/keybinding/test/mac_de_ch.txt b/src/vs/workbench/services/keybinding/test/mac_de_ch.txt index 0adb9f82eb590..d4274eed3e082 100644 --- a/src/vs/workbench/services/keybinding/test/mac_de_ch.txt +++ b/src/vs/workbench/services/keybinding/test/mac_de_ch.txt @@ -304,7 +304,6 @@ isUSStandard: false | | | [ | | | | | | | | Shift+Alt+Digit5 | % | Shift+Alt+5 | | Shift+Alt+5 | shift+alt+5 | Shift+Alt+5 | shift+alt+[Digit5] | | | Ctrl+Shift+Alt+Digit5 | [ | Ctrl+Shift+Alt+5 | | Ctrl+Shift+Alt+5 | ctrl+shift+alt+5 | Ctrl+Shift+Alt+5 | ctrl+shift+alt+[Digit5] | | -| | | Ctrl+Shift+Alt+[ | | | | | | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | Digit6 | 6 | 6 | | 6 | 6 | 6 | [Digit6] | | | Ctrl+Digit6 | 6 | Ctrl+6 | | Ctrl+6 | ctrl+6 | Ctrl+6 | ctrl+[Digit6] | | @@ -315,7 +314,6 @@ isUSStandard: false | | | ] | | | | | | | | Shift+Alt+Digit6 | & | Shift+Alt+6 | | Shift+Alt+6 | shift+alt+6 | Shift+Alt+6 | shift+alt+[Digit6] | | | Ctrl+Shift+Alt+Digit6 | ] | Ctrl+Shift+Alt+6 | | Ctrl+Shift+Alt+6 | ctrl+shift+alt+6 | Ctrl+Shift+Alt+6 | ctrl+shift+alt+[Digit6] | | -| | | Ctrl+Shift+Alt+] | | | | | | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- From 5df5c920b58e09345f0152af0b5421d00b76dc0e Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 3 May 2017 04:18:47 -0700 Subject: [PATCH 0147/2747] Simplify registrations --- .../common/macLinuxKeyboardMapper.ts | 198 +++++++++--------- 1 file changed, 96 insertions(+), 102 deletions(-) diff --git a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts index 95be462efedf1..15050625c50eb 100644 --- a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts @@ -547,6 +547,37 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { this._scanCodeToLabel = []; this._scanCodeToDispatch = []; + const _registerIfUnknown = ( + hwCtrlKey: 0 | 1, hwShiftKey: 0 | 1, hwAltKey: 0 | 1, scanCode: ScanCode, + kbCtrlKey: 0 | 1, kbShiftKey: 0 | 1, kbAltKey: 0 | 1, keyCode: KeyCode, + ): void => { + this._scanCodeKeyCodeMapper.registerIfUnknown( + new ScanCodeCombo(hwCtrlKey ? true : false, hwShiftKey ? true : false, hwAltKey ? true : false, scanCode), + new KeyCodeCombo(kbCtrlKey ? true : false, kbShiftKey ? true : false, kbAltKey ? true : false, keyCode) + ); + }; + + const _registerAllCombos = (_ctrlKey: 0 | 1, _shiftKey: 0 | 1, _altKey: 0 | 1, scanCode: ScanCode, keyCode: KeyCode): void => { + for (let ctrlKey = _ctrlKey; ctrlKey <= 1; ctrlKey++) { + for (let shiftKey = _shiftKey; shiftKey <= 1; shiftKey++) { + for (let altKey = _altKey; altKey <= 1; altKey++) { + _registerIfUnknown( + ctrlKey, shiftKey, altKey, scanCode, + ctrlKey, shiftKey, altKey, keyCode + ); + } + } + } + }; + + let producesLetter: boolean[] = []; + const _registerLetterIfMissing = (charCode: CharCode, scanCode: ScanCode, keyCode: KeyCode): void => { + if (!producesLetter[charCode]) { + _registerAllCombos(0, 0, 0, scanCode, keyCode); + } + }; + + // Initialize `_scanCodeToLabel` for (let scanCode = ScanCode.None; scanCode < ScanCode.MAX_VALUE; scanCode++) { this._scanCodeToLabel[scanCode] = null; @@ -561,7 +592,7 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { for (let scanCode = ScanCode.None; scanCode < ScanCode.MAX_VALUE; scanCode++) { const keyCode = IMMUTABLE_CODE_TO_KEY_CODE[scanCode]; if (keyCode !== -1) { - this._registerAllCombos(0, 0, 0, scanCode, keyCode); + _registerAllCombos(0, 0, 0, scanCode, keyCode); this._scanCodeToLabel[scanCode] = KeyCodeUtils.toString(keyCode); if (keyCode === KeyCode.Unknown || keyCode === KeyCode.Ctrl || keyCode === KeyCode.Meta || keyCode === KeyCode.Alt || keyCode === KeyCode.Shift) { @@ -573,7 +604,6 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { } let mappings: IScanCodeMapping[] = [], mappingsLen = 0; - let producesLetter: boolean[] = []; for (let strScanCode in rawMappings) { if (rawMappings.hasOwnProperty(strScanCode)) { const scanCode = ScanCodeUtils.toEnum(strScanCode); @@ -629,7 +659,6 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { } const kb = MacLinuxKeyboardMapper._charCodeToKb(withShiftAltGr); if (!kb) { - this._registerAllCombos(1, 1, 1, scanCode, KeyCode.Unknown); continue; } const kbShiftKey = kb.shiftKey; @@ -637,10 +666,10 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { if (kbShiftKey) { // Ctrl+Shift+Alt+ScanCode => Shift+KeyCode - this._registerIfUnknown(1, 1, 1, scanCode, 0, 1, 0, keyCode); // Ctrl+Alt+ScanCode => Shift+KeyCode + _registerIfUnknown(1, 1, 1, scanCode, 0, 1, 0, keyCode); // Ctrl+Alt+ScanCode => Shift+KeyCode } else { // Ctrl+Shift+Alt+ScanCode => KeyCode - this._registerIfUnknown(1, 1, 1, scanCode, 0, 0, 0, keyCode); // Ctrl+Alt+ScanCode => KeyCode + _registerIfUnknown(1, 1, 1, scanCode, 0, 0, 0, keyCode); // Ctrl+Alt+ScanCode => KeyCode } } // Handle all `withAltGr` entries @@ -654,7 +683,6 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { } const kb = MacLinuxKeyboardMapper._charCodeToKb(withAltGr); if (!kb) { - this._registerAllCombos(1, 0, 1, scanCode, KeyCode.Unknown); continue; } const kbShiftKey = kb.shiftKey; @@ -662,10 +690,10 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { if (kbShiftKey) { // Ctrl+Alt+ScanCode => Shift+KeyCode - this._registerIfUnknown(1, 0, 1, scanCode, 0, 1, 0, keyCode); // Ctrl+Alt+ScanCode => Shift+KeyCode + _registerIfUnknown(1, 0, 1, scanCode, 0, 1, 0, keyCode); // Ctrl+Alt+ScanCode => Shift+KeyCode } else { // Ctrl+Alt+ScanCode => KeyCode - this._registerIfUnknown(1, 0, 1, scanCode, 0, 0, 0, keyCode); // Ctrl+Alt+ScanCode => KeyCode + _registerIfUnknown(1, 0, 1, scanCode, 0, 0, 0, keyCode); // Ctrl+Alt+ScanCode => KeyCode } } // Handle all `withShift` entries @@ -679,7 +707,6 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { } const kb = MacLinuxKeyboardMapper._charCodeToKb(withShift); if (!kb) { - this._registerAllCombos(0, 1, 0, scanCode, KeyCode.Unknown); continue; } const kbShiftKey = kb.shiftKey; @@ -687,20 +714,20 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { if (kbShiftKey) { // Shift+ScanCode => Shift+KeyCode - this._registerIfUnknown(0, 1, 0, scanCode, 0, 1, 0, keyCode); // Shift+ScanCode => Shift+KeyCode - this._registerIfUnknown(0, 1, 1, scanCode, 0, 1, 1, keyCode); // Shift+Alt+ScanCode => Shift+Alt+KeyCode - this._registerIfUnknown(1, 1, 0, scanCode, 1, 1, 0, keyCode); // Ctrl+Shift+ScanCode => Ctrl+Shift+KeyCode - this._registerIfUnknown(1, 1, 1, scanCode, 1, 1, 1, keyCode); // Ctrl+Shift+Alt+ScanCode => Ctrl+Shift+Alt+KeyCode + _registerIfUnknown(0, 1, 0, scanCode, 0, 1, 0, keyCode); // Shift+ScanCode => Shift+KeyCode + _registerIfUnknown(0, 1, 1, scanCode, 0, 1, 1, keyCode); // Shift+Alt+ScanCode => Shift+Alt+KeyCode + _registerIfUnknown(1, 1, 0, scanCode, 1, 1, 0, keyCode); // Ctrl+Shift+ScanCode => Ctrl+Shift+KeyCode + _registerIfUnknown(1, 1, 1, scanCode, 1, 1, 1, keyCode); // Ctrl+Shift+Alt+ScanCode => Ctrl+Shift+Alt+KeyCode } else { // Shift+ScanCode => KeyCode - this._registerIfUnknown(0, 1, 0, scanCode, 0, 0, 0, keyCode); // Shift+ScanCode => KeyCode - this._registerIfUnknown(0, 1, 0, scanCode, 0, 1, 0, keyCode); // Shift+ScanCode => Shift+KeyCode - this._registerIfUnknown(0, 1, 1, scanCode, 0, 0, 1, keyCode); // Shift+Alt+ScanCode => Alt+KeyCode - this._registerIfUnknown(0, 1, 1, scanCode, 0, 1, 1, keyCode); // Shift+Alt+ScanCode => Shift+Alt+KeyCode - this._registerIfUnknown(1, 1, 0, scanCode, 1, 0, 0, keyCode); // Ctrl+Shift+ScanCode => Ctrl+KeyCode - this._registerIfUnknown(1, 1, 0, scanCode, 1, 1, 0, keyCode); // Ctrl+Shift+ScanCode => Ctrl+Shift+KeyCode - this._registerIfUnknown(1, 1, 1, scanCode, 1, 0, 1, keyCode); // Ctrl+Shift+Alt+ScanCode => Ctrl+Alt+KeyCode - this._registerIfUnknown(1, 1, 1, scanCode, 1, 1, 1, keyCode); // Ctrl+Shift+Alt+ScanCode => Ctrl+Shift+Alt+KeyCode + _registerIfUnknown(0, 1, 0, scanCode, 0, 0, 0, keyCode); // Shift+ScanCode => KeyCode + _registerIfUnknown(0, 1, 0, scanCode, 0, 1, 0, keyCode); // Shift+ScanCode => Shift+KeyCode + _registerIfUnknown(0, 1, 1, scanCode, 0, 0, 1, keyCode); // Shift+Alt+ScanCode => Alt+KeyCode + _registerIfUnknown(0, 1, 1, scanCode, 0, 1, 1, keyCode); // Shift+Alt+ScanCode => Shift+Alt+KeyCode + _registerIfUnknown(1, 1, 0, scanCode, 1, 0, 0, keyCode); // Ctrl+Shift+ScanCode => Ctrl+KeyCode + _registerIfUnknown(1, 1, 0, scanCode, 1, 1, 0, keyCode); // Ctrl+Shift+ScanCode => Ctrl+Shift+KeyCode + _registerIfUnknown(1, 1, 1, scanCode, 1, 0, 1, keyCode); // Ctrl+Shift+Alt+ScanCode => Ctrl+Alt+KeyCode + _registerIfUnknown(1, 1, 1, scanCode, 1, 1, 1, keyCode); // Ctrl+Shift+Alt+ScanCode => Ctrl+Shift+Alt+KeyCode } } // Handle all `value` entries @@ -709,7 +736,6 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { const scanCode = mapping.scanCode; const kb = MacLinuxKeyboardMapper._charCodeToKb(mapping.value); if (!kb) { - this._registerAllCombos(0, 0, 0, scanCode, KeyCode.Unknown); continue; } const kbShiftKey = kb.shiftKey; @@ -717,71 +743,65 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { if (kbShiftKey) { // ScanCode => Shift+KeyCode - this._registerIfUnknown(0, 0, 0, scanCode, 0, 1, 0, keyCode); // ScanCode => Shift+KeyCode - this._registerIfUnknown(0, 0, 1, scanCode, 0, 1, 1, keyCode); // Alt+ScanCode => Shift+Alt+KeyCode - this._registerIfUnknown(1, 0, 0, scanCode, 1, 1, 0, keyCode); // Ctrl+ScanCode => Ctrl+Shift+KeyCode - this._registerIfUnknown(1, 0, 1, scanCode, 1, 1, 1, keyCode); // Ctrl+Alt+ScanCode => Ctrl+Shift+Alt+KeyCode + _registerIfUnknown(0, 0, 0, scanCode, 0, 1, 0, keyCode); // ScanCode => Shift+KeyCode + _registerIfUnknown(0, 0, 1, scanCode, 0, 1, 1, keyCode); // Alt+ScanCode => Shift+Alt+KeyCode + _registerIfUnknown(1, 0, 0, scanCode, 1, 1, 0, keyCode); // Ctrl+ScanCode => Ctrl+Shift+KeyCode + _registerIfUnknown(1, 0, 1, scanCode, 1, 1, 1, keyCode); // Ctrl+Alt+ScanCode => Ctrl+Shift+Alt+KeyCode } else { // ScanCode => KeyCode - this._registerIfUnknown(0, 0, 0, scanCode, 0, 0, 0, keyCode); // ScanCode => KeyCode - this._registerIfUnknown(0, 0, 1, scanCode, 0, 0, 1, keyCode); // Alt+ScanCode => Alt+KeyCode - this._registerIfUnknown(0, 1, 0, scanCode, 0, 1, 0, keyCode); // Shift+ScanCode => Shift+KeyCode - this._registerIfUnknown(0, 1, 1, scanCode, 0, 1, 1, keyCode); // Shift+Alt+ScanCode => Shift+Alt+KeyCode - this._registerIfUnknown(1, 0, 0, scanCode, 1, 0, 0, keyCode); // Ctrl+ScanCode => Ctrl+KeyCode - this._registerIfUnknown(1, 0, 1, scanCode, 1, 0, 1, keyCode); // Ctrl+Alt+ScanCode => Ctrl+Alt+KeyCode - this._registerIfUnknown(1, 1, 0, scanCode, 1, 1, 0, keyCode); // Ctrl+Shift+ScanCode => Ctrl+Shift+KeyCode - this._registerIfUnknown(1, 1, 1, scanCode, 1, 1, 1, keyCode); // Ctrl+Shift+Alt+ScanCode => Ctrl+Shift+Alt+KeyCode + _registerIfUnknown(0, 0, 0, scanCode, 0, 0, 0, keyCode); // ScanCode => KeyCode + _registerIfUnknown(0, 0, 1, scanCode, 0, 0, 1, keyCode); // Alt+ScanCode => Alt+KeyCode + _registerIfUnknown(0, 1, 0, scanCode, 0, 1, 0, keyCode); // Shift+ScanCode => Shift+KeyCode + _registerIfUnknown(0, 1, 1, scanCode, 0, 1, 1, keyCode); // Shift+Alt+ScanCode => Shift+Alt+KeyCode + _registerIfUnknown(1, 0, 0, scanCode, 1, 0, 0, keyCode); // Ctrl+ScanCode => Ctrl+KeyCode + _registerIfUnknown(1, 0, 1, scanCode, 1, 0, 1, keyCode); // Ctrl+Alt+ScanCode => Ctrl+Alt+KeyCode + _registerIfUnknown(1, 1, 0, scanCode, 1, 1, 0, keyCode); // Ctrl+Shift+ScanCode => Ctrl+Shift+KeyCode + _registerIfUnknown(1, 1, 1, scanCode, 1, 1, 1, keyCode); // Ctrl+Shift+Alt+ScanCode => Ctrl+Shift+Alt+KeyCode } } // Handle all left-over available digits - this._registerAllCombos(0, 0, 0, ScanCode.Digit1, KeyCode.KEY_1); - this._registerAllCombos(0, 0, 0, ScanCode.Digit2, KeyCode.KEY_2); - this._registerAllCombos(0, 0, 0, ScanCode.Digit3, KeyCode.KEY_3); - this._registerAllCombos(0, 0, 0, ScanCode.Digit4, KeyCode.KEY_4); - this._registerAllCombos(0, 0, 0, ScanCode.Digit5, KeyCode.KEY_5); - this._registerAllCombos(0, 0, 0, ScanCode.Digit6, KeyCode.KEY_6); - this._registerAllCombos(0, 0, 0, ScanCode.Digit7, KeyCode.KEY_7); - this._registerAllCombos(0, 0, 0, ScanCode.Digit8, KeyCode.KEY_8); - this._registerAllCombos(0, 0, 0, ScanCode.Digit9, KeyCode.KEY_9); - this._registerAllCombos(0, 0, 0, ScanCode.Digit0, KeyCode.KEY_0); + _registerAllCombos(0, 0, 0, ScanCode.Digit1, KeyCode.KEY_1); + _registerAllCombos(0, 0, 0, ScanCode.Digit2, KeyCode.KEY_2); + _registerAllCombos(0, 0, 0, ScanCode.Digit3, KeyCode.KEY_3); + _registerAllCombos(0, 0, 0, ScanCode.Digit4, KeyCode.KEY_4); + _registerAllCombos(0, 0, 0, ScanCode.Digit5, KeyCode.KEY_5); + _registerAllCombos(0, 0, 0, ScanCode.Digit6, KeyCode.KEY_6); + _registerAllCombos(0, 0, 0, ScanCode.Digit7, KeyCode.KEY_7); + _registerAllCombos(0, 0, 0, ScanCode.Digit8, KeyCode.KEY_8); + _registerAllCombos(0, 0, 0, ScanCode.Digit9, KeyCode.KEY_9); + _registerAllCombos(0, 0, 0, ScanCode.Digit0, KeyCode.KEY_0); // Ensure letters are mapped - this._registerLetterIfMissing(producesLetter, CharCode.A, ScanCode.KeyA, KeyCode.KEY_A); - this._registerLetterIfMissing(producesLetter, CharCode.B, ScanCode.KeyB, KeyCode.KEY_B); - this._registerLetterIfMissing(producesLetter, CharCode.C, ScanCode.KeyC, KeyCode.KEY_C); - this._registerLetterIfMissing(producesLetter, CharCode.D, ScanCode.KeyD, KeyCode.KEY_D); - this._registerLetterIfMissing(producesLetter, CharCode.E, ScanCode.KeyE, KeyCode.KEY_E); - this._registerLetterIfMissing(producesLetter, CharCode.F, ScanCode.KeyF, KeyCode.KEY_F); - this._registerLetterIfMissing(producesLetter, CharCode.G, ScanCode.KeyG, KeyCode.KEY_G); - this._registerLetterIfMissing(producesLetter, CharCode.H, ScanCode.KeyH, KeyCode.KEY_H); - this._registerLetterIfMissing(producesLetter, CharCode.I, ScanCode.KeyI, KeyCode.KEY_I); - this._registerLetterIfMissing(producesLetter, CharCode.J, ScanCode.KeyJ, KeyCode.KEY_J); - this._registerLetterIfMissing(producesLetter, CharCode.K, ScanCode.KeyK, KeyCode.KEY_K); - this._registerLetterIfMissing(producesLetter, CharCode.L, ScanCode.KeyL, KeyCode.KEY_L); - this._registerLetterIfMissing(producesLetter, CharCode.M, ScanCode.KeyM, KeyCode.KEY_M); - this._registerLetterIfMissing(producesLetter, CharCode.N, ScanCode.KeyN, KeyCode.KEY_N); - this._registerLetterIfMissing(producesLetter, CharCode.O, ScanCode.KeyO, KeyCode.KEY_O); - this._registerLetterIfMissing(producesLetter, CharCode.P, ScanCode.KeyP, KeyCode.KEY_P); - this._registerLetterIfMissing(producesLetter, CharCode.Q, ScanCode.KeyQ, KeyCode.KEY_Q); - this._registerLetterIfMissing(producesLetter, CharCode.R, ScanCode.KeyR, KeyCode.KEY_R); - this._registerLetterIfMissing(producesLetter, CharCode.S, ScanCode.KeyS, KeyCode.KEY_S); - this._registerLetterIfMissing(producesLetter, CharCode.T, ScanCode.KeyT, KeyCode.KEY_T); - this._registerLetterIfMissing(producesLetter, CharCode.U, ScanCode.KeyU, KeyCode.KEY_U); - this._registerLetterIfMissing(producesLetter, CharCode.V, ScanCode.KeyV, KeyCode.KEY_V); - this._registerLetterIfMissing(producesLetter, CharCode.W, ScanCode.KeyW, KeyCode.KEY_W); - this._registerLetterIfMissing(producesLetter, CharCode.X, ScanCode.KeyX, KeyCode.KEY_X); - this._registerLetterIfMissing(producesLetter, CharCode.Y, ScanCode.KeyY, KeyCode.KEY_Y); - this._registerLetterIfMissing(producesLetter, CharCode.Z, ScanCode.KeyZ, KeyCode.KEY_Z); + _registerLetterIfMissing(CharCode.A, ScanCode.KeyA, KeyCode.KEY_A); + _registerLetterIfMissing(CharCode.B, ScanCode.KeyB, KeyCode.KEY_B); + _registerLetterIfMissing(CharCode.C, ScanCode.KeyC, KeyCode.KEY_C); + _registerLetterIfMissing(CharCode.D, ScanCode.KeyD, KeyCode.KEY_D); + _registerLetterIfMissing(CharCode.E, ScanCode.KeyE, KeyCode.KEY_E); + _registerLetterIfMissing(CharCode.F, ScanCode.KeyF, KeyCode.KEY_F); + _registerLetterIfMissing(CharCode.G, ScanCode.KeyG, KeyCode.KEY_G); + _registerLetterIfMissing(CharCode.H, ScanCode.KeyH, KeyCode.KEY_H); + _registerLetterIfMissing(CharCode.I, ScanCode.KeyI, KeyCode.KEY_I); + _registerLetterIfMissing(CharCode.J, ScanCode.KeyJ, KeyCode.KEY_J); + _registerLetterIfMissing(CharCode.K, ScanCode.KeyK, KeyCode.KEY_K); + _registerLetterIfMissing(CharCode.L, ScanCode.KeyL, KeyCode.KEY_L); + _registerLetterIfMissing(CharCode.M, ScanCode.KeyM, KeyCode.KEY_M); + _registerLetterIfMissing(CharCode.N, ScanCode.KeyN, KeyCode.KEY_N); + _registerLetterIfMissing(CharCode.O, ScanCode.KeyO, KeyCode.KEY_O); + _registerLetterIfMissing(CharCode.P, ScanCode.KeyP, KeyCode.KEY_P); + _registerLetterIfMissing(CharCode.Q, ScanCode.KeyQ, KeyCode.KEY_Q); + _registerLetterIfMissing(CharCode.R, ScanCode.KeyR, KeyCode.KEY_R); + _registerLetterIfMissing(CharCode.S, ScanCode.KeyS, KeyCode.KEY_S); + _registerLetterIfMissing(CharCode.T, ScanCode.KeyT, KeyCode.KEY_T); + _registerLetterIfMissing(CharCode.U, ScanCode.KeyU, KeyCode.KEY_U); + _registerLetterIfMissing(CharCode.V, ScanCode.KeyV, KeyCode.KEY_V); + _registerLetterIfMissing(CharCode.W, ScanCode.KeyW, KeyCode.KEY_W); + _registerLetterIfMissing(CharCode.X, ScanCode.KeyX, KeyCode.KEY_X); + _registerLetterIfMissing(CharCode.Y, ScanCode.KeyY, KeyCode.KEY_Y); + _registerLetterIfMissing(CharCode.Z, ScanCode.KeyZ, KeyCode.KEY_Z); this._scanCodeKeyCodeMapper.registrationComplete(); } - private _registerLetterIfMissing(producesLetter: boolean[], charCode: CharCode, scanCode: ScanCode, keyCode: KeyCode): void { - if (!producesLetter[charCode]) { - this._registerAllCombos(0, 0, 0, scanCode, keyCode); - } - } - public dumpDebugInfo(): string { let result: string[] = []; @@ -884,32 +904,6 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { return str; } - private _registerIfUnknown( - hwCtrlKey: 0 | 1, hwShiftKey: 0 | 1, hwAltKey: 0 | 1, scanCode: ScanCode, - kbCtrlKey: 0 | 1, kbShiftKey: 0 | 1, kbAltKey: 0 | 1, keyCode: KeyCode, - ): void { - this._scanCodeKeyCodeMapper.registerIfUnknown( - new ScanCodeCombo(hwCtrlKey ? true : false, hwShiftKey ? true : false, hwAltKey ? true : false, scanCode), - new KeyCodeCombo(kbCtrlKey ? true : false, kbShiftKey ? true : false, kbAltKey ? true : false, keyCode) - ); - } - - private _registerAllCombos( - _ctrlKey: 0 | 1, _shiftKey: 0 | 1, _altKey: 0 | 1, scanCode: ScanCode, - keyCode: KeyCode, - ): void { - for (let ctrlKey = _ctrlKey; ctrlKey <= 1; ctrlKey++) { - for (let shiftKey = _shiftKey; shiftKey <= 1; shiftKey++) { - for (let altKey = _altKey; altKey <= 1; altKey++) { - this._registerIfUnknown( - ctrlKey, shiftKey, altKey, scanCode, - ctrlKey, shiftKey, altKey, keyCode - ); - } - } - } - } - public simpleKeybindingToScanCodeBinding(keybinding: SimpleKeybinding): ScanCodeBinding[] { // Avoid double Enter bindings (both ScanCode.NumpadEnter and ScanCode.Enter point to KeyCode.Enter) if (keybinding.keyCode === KeyCode.Enter) { From 31d62841b6d44d97636ec164c3ecce87102f9564 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 3 May 2017 05:34:29 -0700 Subject: [PATCH 0148/2747] Debt: Correct types for ResolvedKeybinding.getParts() --- .../ui/keybindingLabel/keybindingLabel.ts | 14 +++--- src/vs/base/common/keyCodes.ts | 23 +++++++++- .../common/usLayoutResolvedKeybinding.ts | 24 ++++++++-- .../common/keybindingsEditorModel.ts | 44 +++++++++---------- .../common/macLinuxKeyboardMapper.ts | 24 ++++++++-- .../common/windowsKeyboardMapper.ts | 24 ++++++++-- 6 files changed, 113 insertions(+), 40 deletions(-) diff --git a/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.ts b/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.ts index e2a7ae59e0872..e75c3faade7ab 100644 --- a/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.ts +++ b/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.ts @@ -8,7 +8,7 @@ import 'vs/css!./keybindingLabel'; import { IDisposable } from 'vs/base/common/lifecycle'; import { equals } from 'vs/base/common/objects'; import { OperatingSystem } from 'vs/base/common/platform'; -import { ResolvedKeybinding } from 'vs/base/common/keycodes'; +import { ResolvedKeybinding, ResolvedKeybindingPart } from 'vs/base/common/keyCodes'; import { UILabelProvider } from 'vs/platform/keybinding/common/keybindingLabels'; import * as dom from 'vs/base/browser/dom'; @@ -72,21 +72,21 @@ export class KeybindingLabel implements IDisposable { this.didEverRender = true; } - private renderPart(parent: HTMLElement, part: ResolvedKeybinding, match: PartMatches) { + private renderPart(parent: HTMLElement, part: ResolvedKeybindingPart, match: PartMatches) { const modifierLabels = UILabelProvider.modifierLabels[this.os]; - if (part.hasCtrlModifier()) { + if (part.ctrlKey) { this.renderKey(parent, modifierLabels.ctrlKey, match && match.ctrlKey, modifierLabels.separator); } - if (part.hasShiftModifier()) { + if (part.shiftKey) { this.renderKey(parent, modifierLabels.shiftKey, match && match.shiftKey, modifierLabels.separator); } - if (part.hasAltModifier()) { + if (part.altKey) { this.renderKey(parent, modifierLabels.altKey, match && match.altKey, modifierLabels.separator); } - if (part.hasMetaModifier()) { + if (part.metaKey) { this.renderKey(parent, modifierLabels.metaKey, match && match.metaKey, modifierLabels.separator); } - const keyLabel = part.getLabelWithoutModifiers(); + const keyLabel = part.kbLabel; if (keyLabel) { this.renderKey(parent, keyLabel, match && match.keyCode, ''); } diff --git a/src/vs/base/common/keyCodes.ts b/src/vs/base/common/keyCodes.ts index 5ee3473699295..289e2811aab06 100644 --- a/src/vs/base/common/keyCodes.ts +++ b/src/vs/base/common/keyCodes.ts @@ -546,8 +546,27 @@ export class ChordKeybinding { export type Keybinding = SimpleKeybinding | ChordKeybinding; +export class ResolvedKeybindingPart { + readonly ctrlKey: boolean; + readonly shiftKey: boolean; + readonly altKey: boolean; + readonly metaKey: boolean; + + readonly kbLabel: string; + readonly kbAriaLabel: string; + + constructor(ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean, kbLabel: string, kbAriaLabel: string) { + this.ctrlKey = ctrlKey; + this.shiftKey = shiftKey; + this.altKey = altKey; + this.metaKey = metaKey; + this.kbLabel = kbLabel; + this.kbAriaLabel = kbAriaLabel; + } +} + /** - * A resolved keybinding. + * A resolved keybinding. Can be a simple keybinding or a chord keybinding. */ export abstract class ResolvedKeybinding { /** @@ -612,5 +631,5 @@ export abstract class ResolvedKeybinding { /** * Returns the firstPart, chordPart of the keybinding */ - public abstract getParts(): [ResolvedKeybinding, ResolvedKeybinding]; + public abstract getParts(): [ResolvedKeybindingPart, ResolvedKeybindingPart]; } diff --git a/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts b/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts index 5e204fc8be267..7529049b83774 100644 --- a/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts +++ b/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { ResolvedKeybinding, KeyCode, KeyCodeUtils, USER_SETTINGS, Keybinding, KeybindingType, SimpleKeybinding } from 'vs/base/common/keyCodes'; +import { ResolvedKeybinding, ResolvedKeybindingPart, KeyCode, KeyCodeUtils, USER_SETTINGS, Keybinding, KeybindingType, SimpleKeybinding } from 'vs/base/common/keyCodes'; import { UILabelProvider, AriaLabelProvider, ElectronAcceleratorLabelProvider, UserSettingsLabelProvider, NO_MODIFIERS } from 'vs/platform/keybinding/common/keybindingLabels'; import { OperatingSystem } from 'vs/base/common/platform'; @@ -185,8 +185,26 @@ export class USLayoutResolvedKeybinding extends ResolvedKeybinding { return this._firstPart.metaKey; } - public getParts(): [ResolvedKeybinding, ResolvedKeybinding] { - return [new USLayoutResolvedKeybinding(this._firstPart, this._os), this._chordPart ? new USLayoutResolvedKeybinding(this._chordPart, this._os) : null]; + public getParts(): [ResolvedKeybindingPart, ResolvedKeybindingPart] { + return [ + this._toResolvedKeybindingPart(this._firstPart), + this._toResolvedKeybindingPart(this._chordPart) + ]; + } + + private _toResolvedKeybindingPart(keybinding: SimpleKeybinding): ResolvedKeybindingPart { + if (!keybinding) { + return null; + } + + return new ResolvedKeybindingPart( + keybinding.ctrlKey, + keybinding.shiftKey, + keybinding.altKey, + keybinding.metaKey, + this._getUILabelForKeybinding(keybinding), + this._getAriaLabelForKeybinding(keybinding) + ); } public getDispatchParts(): [string, string] { diff --git a/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts b/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts index a1f187ccc3137..43b5b6f0c26b2 100644 --- a/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts +++ b/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts @@ -10,7 +10,7 @@ import * as strings from 'vs/base/common/strings'; import { OperatingSystem, language, LANGUAGE_DEFAULT } from 'vs/base/common/platform'; import { IMatch, IFilter, or, matchesContiguousSubString, matchesPrefix, matchesCamelCase, matchesWords } from 'vs/base/common/filters'; import { Registry } from 'vs/platform/platform'; -import { ResolvedKeybinding } from 'vs/base/common/keyCodes'; +import { ResolvedKeybinding, ResolvedKeybindingPart } from 'vs/base/common/keyCodes'; import { AriaLabelProvider, UserSettingsLabelProvider, UILabelProvider, ModifierLabels as ModLabels } from 'vs/platform/keybinding/common/keybindingLabels'; import { CommonEditorRegistry, EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { MenuRegistry, ILocalizedString, SyncActionDescriptor, ICommandAction } from 'vs/platform/actions/common/actions'; @@ -355,7 +355,7 @@ class KeybindingItemMatches { return this.hasAnyMatch(firstPartMatch) || this.hasAnyMatch(chordPartMatch) ? { firstPart: firstPartMatch, chordPart: chordPartMatch } : null; } - private matchPart(part: ResolvedKeybinding, match: KeybindingMatch, word: string): boolean { + private matchPart(part: ResolvedKeybindingPart, match: KeybindingMatch, word: string): boolean { let matched = false; if (this.matchesMetaModifier(part, word)) { matched = true; @@ -380,11 +380,11 @@ class KeybindingItemMatches { return matched; } - private matchesKeyCode(keybinding: ResolvedKeybinding, word: string): boolean { + private matchesKeyCode(keybinding: ResolvedKeybindingPart, word: string): boolean { if (!keybinding) { return false; } - const ariaLabel = keybinding.getAriaLabelWithoutModifiers(); + const ariaLabel = keybinding.kbAriaLabel; if (ariaLabel.length === 1 || word.length === 1) { if (strings.compareIgnoreCase(ariaLabel, word) === 0) { return true; @@ -397,11 +397,11 @@ class KeybindingItemMatches { return false; } - private matchesMetaModifier(keybinding: ResolvedKeybinding, word: string): boolean { + private matchesMetaModifier(keybinding: ResolvedKeybindingPart, word: string): boolean { if (!keybinding) { return false; } - if (!keybinding.hasMetaModifier()) { + if (!keybinding.metaKey) { return false; } return this.wordMatchesMetaModifier(word); @@ -423,11 +423,11 @@ class KeybindingItemMatches { return false; } - private matchesCtrlModifier(keybinding: ResolvedKeybinding, word: string): boolean { + private matchesCtrlModifier(keybinding: ResolvedKeybindingPart, word: string): boolean { if (!keybinding) { return false; } - if (!keybinding.hasCtrlModifier()) { + if (!keybinding.ctrlKey) { return false; } return this.wordMatchesCtrlModifier(word); @@ -446,11 +446,11 @@ class KeybindingItemMatches { return false; } - private matchesShiftModifier(keybinding: ResolvedKeybinding, word: string): boolean { + private matchesShiftModifier(keybinding: ResolvedKeybindingPart, word: string): boolean { if (!keybinding) { return false; } - if (!keybinding.hasShiftModifier()) { + if (!keybinding.shiftKey) { return false; } return this.wordMatchesShiftModifier(word); @@ -469,11 +469,11 @@ class KeybindingItemMatches { return false; } - private matchesAltModifier(keybinding: ResolvedKeybinding, word: string): boolean { + private matchesAltModifier(keybinding: ResolvedKeybindingPart, word: string): boolean { if (!keybinding) { return false; } - if (!keybinding.hasAltModifier()) { + if (!keybinding.altKey) { return false; } return this.wordMatchesAltModifier(word); @@ -503,42 +503,42 @@ class KeybindingItemMatches { keybindingMatch.keyCode; } - private isCompleteMatch(part: ResolvedKeybinding, match: KeybindingMatch): boolean { + private isCompleteMatch(part: ResolvedKeybindingPart, match: KeybindingMatch): boolean { if (!part) { return true; } if (!match.keyCode) { return false; } - if (part.hasMetaModifier() && !match.metaKey) { + if (part.metaKey && !match.metaKey) { return false; } - if (part.hasAltModifier() && !match.altKey) { + if (part.altKey && !match.altKey) { return false; } - if (part.hasCtrlModifier() && !match.ctrlKey) { + if (part.ctrlKey && !match.ctrlKey) { return false; } - if (part.hasShiftModifier() && !match.shiftKey) { + if (part.shiftKey && !match.shiftKey) { return false; } return true; } - private createCompleteMatch(part: ResolvedKeybinding): KeybindingMatch { + private createCompleteMatch(part: ResolvedKeybindingPart): KeybindingMatch { let match: KeybindingMatch = {}; if (part) { match.keyCode = true; - if (part.hasMetaModifier()) { + if (part.metaKey) { match.metaKey = true; } - if (part.hasAltModifier()) { + if (part.altKey) { match.altKey = true; } - if (part.hasCtrlModifier()) { + if (part.ctrlKey) { match.ctrlKey = true; } - if (part.hasShiftModifier()) { + if (part.shiftKey) { match.shiftKey = true; } } diff --git a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts index 15050625c50eb..51cb59538fc1a 100644 --- a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts @@ -6,7 +6,7 @@ 'use strict'; import { OperatingSystem } from 'vs/base/common/platform'; -import { KeyCode, ResolvedKeybinding, KeyCodeUtils, SimpleKeybinding, Keybinding, KeybindingType, USER_SETTINGS } from 'vs/base/common/keyCodes'; +import { KeyCode, ResolvedKeybinding, KeyCodeUtils, SimpleKeybinding, Keybinding, KeybindingType, USER_SETTINGS, ResolvedKeybindingPart } from 'vs/base/common/keyCodes'; import { ScanCode, ScanCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE, IMMUTABLE_KEY_CODE_TO_CODE, ScanCodeBinding } from 'vs/workbench/services/keybinding/common/scanCode'; import { CharCode } from 'vs/base/common/charCode'; import { UILabelProvider, AriaLabelProvider, UserSettingsLabelProvider, ElectronAcceleratorLabelProvider, NO_MODIFIERS } from 'vs/platform/keybinding/common/keybindingLabels'; @@ -222,8 +222,26 @@ export class NativeResolvedKeybinding extends ResolvedKeybinding { return this._firstPart.metaKey; } - public getParts(): [ResolvedKeybinding, ResolvedKeybinding] { - return [new NativeResolvedKeybinding(this._mapper, this._OS, this._firstPart, null), this._chordPart ? new NativeResolvedKeybinding(this._mapper, this._OS, this._chordPart, null) : null]; + public getParts(): [ResolvedKeybindingPart, ResolvedKeybindingPart] { + return [ + this._toResolvedKeybindingPart(this._firstPart), + this._toResolvedKeybindingPart(this._chordPart) + ]; + } + + private _toResolvedKeybindingPart(binding: ScanCodeBinding): ResolvedKeybindingPart { + if (!binding) { + return null; + } + + return new ResolvedKeybindingPart( + binding.ctrlKey, + binding.shiftKey, + binding.altKey, + binding.metaKey, + this._getUILabelForScanCodeBinding(binding), + this._getAriaLabelForScanCodeBinding(binding) + ); } public getDispatchParts(): [string, string] { diff --git a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts index 04c1a8e401035..3add1f33869aa 100644 --- a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts @@ -5,7 +5,7 @@ 'use strict'; -import { KeyCode, KeyCodeUtils, ResolvedKeybinding, Keybinding, SimpleKeybinding, KeybindingType, USER_SETTINGS } from 'vs/base/common/keyCodes'; +import { KeyCode, KeyCodeUtils, ResolvedKeybinding, Keybinding, SimpleKeybinding, KeybindingType, USER_SETTINGS, ResolvedKeybindingPart } from 'vs/base/common/keyCodes'; import { ScanCode, ScanCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE, ScanCodeBinding } from 'vs/workbench/services/keybinding/common/scanCode'; import { CharCode } from 'vs/base/common/charCode'; import { UILabelProvider, AriaLabelProvider, ElectronAcceleratorLabelProvider, UserSettingsLabelProvider, NO_MODIFIERS } from 'vs/platform/keybinding/common/keybindingLabels'; @@ -235,8 +235,26 @@ export class WindowsNativeResolvedKeybinding extends ResolvedKeybinding { return this._firstPart.metaKey; } - public getParts(): [ResolvedKeybinding, ResolvedKeybinding] { - return [new WindowsNativeResolvedKeybinding(this._mapper, this._firstPart, null), this._chordPart ? new WindowsNativeResolvedKeybinding(this._mapper, this._chordPart, null) : null]; + public getParts(): [ResolvedKeybindingPart, ResolvedKeybindingPart] { + return [ + this._toResolvedKeybindingPart(this._firstPart), + this._toResolvedKeybindingPart(this._chordPart) + ]; + } + + private _toResolvedKeybindingPart(keybinding: SimpleKeybinding): ResolvedKeybindingPart { + if (!keybinding) { + return null; + } + + return new ResolvedKeybindingPart( + keybinding.ctrlKey, + keybinding.shiftKey, + keybinding.altKey, + keybinding.metaKey, + this._getUILabelForKeybinding(keybinding), + this._getAriaLabelForKeybinding(keybinding) + ); } public getDispatchParts(): [string, string] { From c688f7c57985fc91caff3d196a7d3ef28799f309 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 3 May 2017 05:52:52 -0700 Subject: [PATCH 0149/2747] Remove unused ResolvedKeybinding methods --- src/vs/base/common/keyCodes.ts | 31 +- .../quickopen/browser/quickOpenWidget.ts | 11 +- .../keybinding/common/keybindingLabels.ts | 7 - .../common/usLayoutResolvedKeybinding.ts | 42 +- .../test/common/keybindingLabels.test.ts | 63 --- .../browser/parts/editor/editorPicker.ts | 8 +- .../common/macLinuxKeyboardMapper.ts | 42 +- .../common/windowsKeyboardMapper.ts | 42 +- .../test/keyboardMapperTestUtils.ts | 12 - .../macLinuxFallbackKeyboardMapper.test.ts | 66 --- .../test/macLinuxKeyboardMapper.test.ts | 396 ------------------ .../test/windowsKeyboardMapper.test.ts | 120 ------ 12 files changed, 18 insertions(+), 822 deletions(-) diff --git a/src/vs/base/common/keyCodes.ts b/src/vs/base/common/keyCodes.ts index 289e2811aab06..bed55f19ceb84 100644 --- a/src/vs/base/common/keyCodes.ts +++ b/src/vs/base/common/keyCodes.ts @@ -573,18 +573,10 @@ export abstract class ResolvedKeybinding { * This prints the binding in a format suitable for displaying in the UI. */ public abstract getLabel(): string; - /** - * Returns the UI label of the binding without modifiers - */ - public abstract getLabelWithoutModifiers(): string; /** * This prints the binding in a format suitable for ARIA. */ public abstract getAriaLabel(): string; - /** - * Returns the ARIA label of the bindings without modifiers - */ - public abstract getAriaLabelWithoutModifiers(): string; /** * This prints the binding in a format suitable for electron's accelerators. * See https://github.com/electron/electron/blob/master/docs/api/accelerator.md @@ -603,33 +595,14 @@ export abstract class ResolvedKeybinding { * Is the binding a chord? */ public abstract isChord(): boolean; - /** - * Does this binding use the ctrl modifier key. - * If it is a chord, it always returns false. - */ - public abstract hasCtrlModifier(): boolean; - /** - * Does this binding use the shift modifier key. - * If it is a chord, it always returns false. - */ - public abstract hasShiftModifier(): boolean; - /** - * Does this binding use the alt modifier key. - * If it is a chord, it always returns false. - */ - public abstract hasAltModifier(): boolean; - /** - * Does this binding use the meta modifier key. - * If it is a chord, it always returns false. - */ - public abstract hasMetaModifier(): boolean; /** * Returns the firstPart, chordPart that should be used for dispatching. */ public abstract getDispatchParts(): [string, string]; /** - * Returns the firstPart, chordPart of the keybinding + * Returns the firstPart, chordPart of the keybinding. + * For simple keybindings, the second element will be null. */ public abstract getParts(): [ResolvedKeybindingPart, ResolvedKeybindingPart]; } diff --git a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts index c5e7f8c2ae7d1..d83ef8e83802e 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts @@ -279,11 +279,12 @@ export class QuickOpenWidget implements IModelProvider { // Select element when keys are pressed that signal it const quickNavKeys = this.quickNavigateConfiguration.keybindings; const wasTriggerKeyPressed = keyCode === KeyCode.Enter || quickNavKeys.some((k) => { - if (k.isChord()) { + const [firstPart, chordPart] = k.getParts(); + if (chordPart) { return false; } - if (k.hasShiftModifier() && keyCode === KeyCode.Shift) { + if (firstPart.shiftKey && keyCode === KeyCode.Shift) { if (keyboardEvent.ctrlKey || keyboardEvent.altKey || keyboardEvent.metaKey) { return false; // this is an optimistic check for the shift key being used to navigate back in quick open } @@ -291,15 +292,15 @@ export class QuickOpenWidget implements IModelProvider { return true; } - if (k.hasAltModifier() && keyCode === KeyCode.Alt) { + if (firstPart.altKey && keyCode === KeyCode.Alt) { return true; } - if (k.hasCtrlModifier() && keyCode === KeyCode.Ctrl) { + if (firstPart.ctrlKey && keyCode === KeyCode.Ctrl) { return true; } - if (k.hasMetaModifier() && keyCode === KeyCode.Meta) { + if (firstPart.metaKey && keyCode === KeyCode.Meta) { return true; } diff --git a/src/vs/platform/keybinding/common/keybindingLabels.ts b/src/vs/platform/keybinding/common/keybindingLabels.ts index ef961ee79c5fe..c9a7cec8e18d8 100644 --- a/src/vs/platform/keybinding/common/keybindingLabels.ts +++ b/src/vs/platform/keybinding/common/keybindingLabels.ts @@ -23,13 +23,6 @@ export interface Modifiers { readonly metaKey: boolean; } -export const NO_MODIFIERS: Modifiers = { - ctrlKey: false, - shiftKey: false, - altKey: false, - metaKey: false -}; - export class ModifierLabelProvider { public readonly modifierLabels: ModifierLabels[]; diff --git a/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts b/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts index 7529049b83774..11bf5ad1801f3 100644 --- a/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts +++ b/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts @@ -5,7 +5,7 @@ 'use strict'; import { ResolvedKeybinding, ResolvedKeybindingPart, KeyCode, KeyCodeUtils, USER_SETTINGS, Keybinding, KeybindingType, SimpleKeybinding } from 'vs/base/common/keyCodes'; -import { UILabelProvider, AriaLabelProvider, ElectronAcceleratorLabelProvider, UserSettingsLabelProvider, NO_MODIFIERS } from 'vs/platform/keybinding/common/keybindingLabels'; +import { UILabelProvider, AriaLabelProvider, ElectronAcceleratorLabelProvider, UserSettingsLabelProvider } from 'vs/platform/keybinding/common/keybindingLabels'; import { OperatingSystem } from 'vs/base/common/platform'; /** @@ -64,12 +64,6 @@ export class USLayoutResolvedKeybinding extends ResolvedKeybinding { return UILabelProvider.toLabel(this._firstPart, firstPart, this._chordPart, chordPart, this._os); } - public getLabelWithoutModifiers(): string { - let firstPart = this._getUILabelForKeybinding(this._firstPart); - let chordPart = this._getUILabelForKeybinding(this._chordPart); - return UILabelProvider.toLabel(NO_MODIFIERS, firstPart, NO_MODIFIERS, chordPart, this._os); - } - private _getAriaLabelForKeybinding(keybinding: SimpleKeybinding): string { if (!keybinding) { return null; @@ -86,12 +80,6 @@ export class USLayoutResolvedKeybinding extends ResolvedKeybinding { return AriaLabelProvider.toLabel(this._firstPart, firstPart, this._chordPart, chordPart, this._os); } - public getAriaLabelWithoutModifiers(): string { - let firstPart = this._getAriaLabelForKeybinding(this._firstPart); - let chordPart = this._getAriaLabelForKeybinding(this._chordPart); - return AriaLabelProvider.toLabel(NO_MODIFIERS, firstPart, NO_MODIFIERS, chordPart, this._os); - } - private _keyCodeToElectronAccelerator(keyCode: KeyCode): string { if (keyCode >= KeyCode.NUMPAD_0 && keyCode <= KeyCode.NUMPAD_DIVIDE) { // Electron cannot handle numpad keys @@ -157,34 +145,6 @@ export class USLayoutResolvedKeybinding extends ResolvedKeybinding { return (this._chordPart ? true : false); } - public hasCtrlModifier(): boolean { - if (this._chordPart) { - return false; - } - return this._firstPart.ctrlKey; - } - - public hasShiftModifier(): boolean { - if (this._chordPart) { - return false; - } - return this._firstPart.shiftKey; - } - - public hasAltModifier(): boolean { - if (this._chordPart) { - return false; - } - return this._firstPart.altKey; - } - - public hasMetaModifier(): boolean { - if (this._chordPart) { - return false; - } - return this._firstPart.metaKey; - } - public getParts(): [ResolvedKeybindingPart, ResolvedKeybindingPart] { return [ this._toResolvedKeybindingPart(this._firstPart), diff --git a/src/vs/platform/keybinding/test/common/keybindingLabels.test.ts b/src/vs/platform/keybinding/test/common/keybindingLabels.test.ts index dacc7a9e157b0..19f285354cc75 100644 --- a/src/vs/platform/keybinding/test/common/keybindingLabels.test.ts +++ b/src/vs/platform/keybinding/test/common/keybindingLabels.test.ts @@ -16,25 +16,15 @@ suite('KeybindingLabels', () => { assert.equal(usResolvedKeybinding.getLabel(), expected); } - function assertUSLabelWithoutModifiers(OS: OperatingSystem, keybinding: number, expected: string): void { - const usResolvedKeybinding = new USLayoutResolvedKeybinding(createKeybinding(keybinding, OS), OS); - assert.equal(usResolvedKeybinding.getLabelWithoutModifiers(), expected); - } - test('Windows US label', () => { // no modifier assertUSLabel(OperatingSystem.Windows, KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyCode.KEY_A, 'A'); // one modifier assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyCode.KEY_A, 'Ctrl+A'); assertUSLabel(OperatingSystem.Windows, KeyMod.Shift | KeyCode.KEY_A, 'Shift+A'); assertUSLabel(OperatingSystem.Windows, KeyMod.Alt | KeyCode.KEY_A, 'Alt+A'); assertUSLabel(OperatingSystem.Windows, KeyMod.WinCtrl | KeyCode.KEY_A, 'Windows+A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.Shift | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // two modifiers assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_A, 'Ctrl+Shift+A'); @@ -43,46 +33,29 @@ suite('KeybindingLabels', () => { assertUSLabel(OperatingSystem.Windows, KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'Shift+Alt+A'); assertUSLabel(OperatingSystem.Windows, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'Shift+Windows+A'); assertUSLabel(OperatingSystem.Windows, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Alt+Windows+A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // three modifiers assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'Ctrl+Shift+Alt+A'); assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Shift+Windows+A'); assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Alt+Windows+A'); assertUSLabel(OperatingSystem.Windows, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Shift+Alt+Windows+A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // four modifiers assertUSLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Shift+Alt+Windows+A'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // chord assertUSLabel(OperatingSystem.Windows, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), 'Ctrl+A Ctrl+B'); - assertUSLabelWithoutModifiers(OperatingSystem.Windows, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), 'A B'); }); test('Linux US label', () => { // no modifier assertUSLabel(OperatingSystem.Linux, KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyCode.KEY_A, 'A'); // one modifier assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyCode.KEY_A, 'Ctrl+A'); assertUSLabel(OperatingSystem.Linux, KeyMod.Shift | KeyCode.KEY_A, 'Shift+A'); assertUSLabel(OperatingSystem.Linux, KeyMod.Alt | KeyCode.KEY_A, 'Alt+A'); assertUSLabel(OperatingSystem.Linux, KeyMod.WinCtrl | KeyCode.KEY_A, 'Windows+A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.Shift | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // two modifiers assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_A, 'Ctrl+Shift+A'); @@ -91,46 +64,29 @@ suite('KeybindingLabels', () => { assertUSLabel(OperatingSystem.Linux, KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'Shift+Alt+A'); assertUSLabel(OperatingSystem.Linux, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'Shift+Windows+A'); assertUSLabel(OperatingSystem.Linux, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Alt+Windows+A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // three modifiers assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'Ctrl+Shift+Alt+A'); assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Shift+Windows+A'); assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Alt+Windows+A'); assertUSLabel(OperatingSystem.Linux, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Shift+Alt+Windows+A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // four modifiers assertUSLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Ctrl+Shift+Alt+Windows+A'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // chord assertUSLabel(OperatingSystem.Linux, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), 'Ctrl+A Ctrl+B'); - assertUSLabelWithoutModifiers(OperatingSystem.Linux, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), 'A B'); }); test('Mac US label', () => { // no modifier assertUSLabel(OperatingSystem.Macintosh, KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyCode.KEY_A, 'A'); // one modifier assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyCode.KEY_A, '⌘A'); assertUSLabel(OperatingSystem.Macintosh, KeyMod.Shift | KeyCode.KEY_A, '⇧A'); assertUSLabel(OperatingSystem.Macintosh, KeyMod.Alt | KeyCode.KEY_A, '⌥A'); assertUSLabel(OperatingSystem.Macintosh, KeyMod.WinCtrl | KeyCode.KEY_A, '⌃A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.Shift | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // two modifiers assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_A, '⇧⌘A'); @@ -139,30 +95,18 @@ suite('KeybindingLabels', () => { assertUSLabel(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, '⇧⌥A'); assertUSLabel(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⇧A'); assertUSLabel(OperatingSystem.Macintosh, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⌥A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // three modifiers assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, '⇧⌥⌘A'); assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⇧⌘A'); assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⌥⌘A'); assertUSLabel(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⇧⌥A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // four modifiers assertUSLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, '⌃⇧⌥⌘A'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); // chord assertUSLabel(OperatingSystem.Macintosh, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), '⌘A ⌘B'); - assertUSLabelWithoutModifiers(OperatingSystem.Macintosh, KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_A, KeyMod.CtrlCmd | KeyCode.KEY_B), 'A B'); // special keys assertUSLabel(OperatingSystem.Macintosh, KeyCode.LeftArrow, '←'); @@ -176,17 +120,10 @@ suite('KeybindingLabels', () => { const usResolvedKeybinding = new USLayoutResolvedKeybinding(createKeybinding(keybinding, OS), OS); assert.equal(usResolvedKeybinding.getAriaLabel(), expected); } - function assertAriaLabelWithoutModifiers(OS: OperatingSystem, keybinding: number, expected: string): void { - const usResolvedKeybinding = new USLayoutResolvedKeybinding(createKeybinding(keybinding, OS), OS); - assert.equal(usResolvedKeybinding.getAriaLabelWithoutModifiers(), expected); - } assertAriaLabel(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Control+Shift+Alt+Windows+A'); assertAriaLabel(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Control+Shift+Alt+Windows+A'); assertAriaLabel(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'Control+Shift+Alt+Command+A'); - assertAriaLabelWithoutModifiers(OperatingSystem.Windows, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertAriaLabelWithoutModifiers(OperatingSystem.Linux, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); - assertAriaLabelWithoutModifiers(OperatingSystem.Macintosh, KeyMod.CtrlCmd | KeyMod.Shift | KeyMod.Alt | KeyMod.WinCtrl | KeyCode.KEY_A, 'A'); }); test('Electron Accelerator label', () => { diff --git a/src/vs/workbench/browser/parts/editor/editorPicker.ts b/src/vs/workbench/browser/parts/editor/editorPicker.ts index 4fc02ffaf0cb0..d1a0d74383df7 100644 --- a/src/vs/workbench/browser/parts/editor/editorPicker.ts +++ b/src/vs/workbench/browser/parts/editor/editorPicker.ts @@ -198,7 +198,13 @@ export abstract class EditorGroupPicker extends BaseEditorPicker { return super.getAutoFocus(searchValue); } - const isShiftNavigate = (quickNavigateConfiguration && quickNavigateConfiguration.keybindings.some(k => !k.isChord() && k.hasShiftModifier())); + const isShiftNavigate = (quickNavigateConfiguration && quickNavigateConfiguration.keybindings.some(k => { + const [firstPart, chordPart] = k.getParts(); + if (chordPart) { + return false; + } + return firstPart.shiftKey; + })); if (isShiftNavigate) { return { autoFocusLastEntry: true diff --git a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts index 51cb59538fc1a..d77347961a45b 100644 --- a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts @@ -9,7 +9,7 @@ import { OperatingSystem } from 'vs/base/common/platform'; import { KeyCode, ResolvedKeybinding, KeyCodeUtils, SimpleKeybinding, Keybinding, KeybindingType, USER_SETTINGS, ResolvedKeybindingPart } from 'vs/base/common/keyCodes'; import { ScanCode, ScanCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE, IMMUTABLE_KEY_CODE_TO_CODE, ScanCodeBinding } from 'vs/workbench/services/keybinding/common/scanCode'; import { CharCode } from 'vs/base/common/charCode'; -import { UILabelProvider, AriaLabelProvider, UserSettingsLabelProvider, ElectronAcceleratorLabelProvider, NO_MODIFIERS } from 'vs/platform/keybinding/common/keybindingLabels'; +import { UILabelProvider, AriaLabelProvider, UserSettingsLabelProvider, ElectronAcceleratorLabelProvider } from 'vs/platform/keybinding/common/keybindingLabels'; import { IKeyboardMapper } from 'vs/workbench/services/keybinding/common/keyboardMapper'; import { IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding'; @@ -103,12 +103,6 @@ export class NativeResolvedKeybinding extends ResolvedKeybinding { return UILabelProvider.toLabel(this._firstPart, firstPart, this._chordPart, chordPart, this._OS); } - public getLabelWithoutModifiers(): string { - let firstPart = this._getUILabelForScanCodeBinding(this._firstPart); - let chordPart = this._getUILabelForScanCodeBinding(this._chordPart); - return UILabelProvider.toLabel(NO_MODIFIERS, firstPart, NO_MODIFIERS, chordPart, this._OS); - } - private _getAriaLabelForScanCodeBinding(binding: ScanCodeBinding): string { if (!binding) { return null; @@ -125,12 +119,6 @@ export class NativeResolvedKeybinding extends ResolvedKeybinding { return AriaLabelProvider.toLabel(this._firstPart, firstPart, this._chordPart, chordPart, this._OS); } - public getAriaLabelWithoutModifiers(): string { - let firstPart = this._getAriaLabelForScanCodeBinding(this._firstPart); - let chordPart = this._getAriaLabelForScanCodeBinding(this._chordPart); - return AriaLabelProvider.toLabel(NO_MODIFIERS, firstPart, NO_MODIFIERS, chordPart, this._OS); - } - private _getElectronAcceleratorLabelForScanCodeBinding(binding: ScanCodeBinding): string { if (!binding) { return null; @@ -194,34 +182,6 @@ export class NativeResolvedKeybinding extends ResolvedKeybinding { return (this._chordPart ? true : false); } - public hasCtrlModifier(): boolean { - if (this._chordPart) { - return false; - } - return this._firstPart.ctrlKey; - } - - public hasShiftModifier(): boolean { - if (this._chordPart) { - return false; - } - return this._firstPart.shiftKey; - } - - public hasAltModifier(): boolean { - if (this._chordPart) { - return false; - } - return this._firstPart.altKey; - } - - public hasMetaModifier(): boolean { - if (this._chordPart) { - return false; - } - return this._firstPart.metaKey; - } - public getParts(): [ResolvedKeybindingPart, ResolvedKeybindingPart] { return [ this._toResolvedKeybindingPart(this._firstPart), diff --git a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts index 3add1f33869aa..a6e058cb850d8 100644 --- a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts @@ -8,7 +8,7 @@ import { KeyCode, KeyCodeUtils, ResolvedKeybinding, Keybinding, SimpleKeybinding, KeybindingType, USER_SETTINGS, ResolvedKeybindingPart } from 'vs/base/common/keyCodes'; import { ScanCode, ScanCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE, ScanCodeBinding } from 'vs/workbench/services/keybinding/common/scanCode'; import { CharCode } from 'vs/base/common/charCode'; -import { UILabelProvider, AriaLabelProvider, ElectronAcceleratorLabelProvider, UserSettingsLabelProvider, NO_MODIFIERS } from 'vs/platform/keybinding/common/keybindingLabels'; +import { UILabelProvider, AriaLabelProvider, ElectronAcceleratorLabelProvider, UserSettingsLabelProvider } from 'vs/platform/keybinding/common/keybindingLabels'; import { OperatingSystem } from 'vs/base/common/platform'; import { IKeyboardMapper } from 'vs/workbench/services/keybinding/common/keyboardMapper'; import { IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding'; @@ -107,12 +107,6 @@ export class WindowsNativeResolvedKeybinding extends ResolvedKeybinding { return UILabelProvider.toLabel(this._firstPart, firstPart, this._chordPart, chordPart, OperatingSystem.Windows); } - public getLabelWithoutModifiers(): string { - let firstPart = this._getUILabelForKeybinding(this._firstPart); - let chordPart = this._getUILabelForKeybinding(this._chordPart); - return UILabelProvider.toLabel(NO_MODIFIERS, firstPart, NO_MODIFIERS, chordPart, OperatingSystem.Windows); - } - private _getAriaLabelForKeybinding(keybinding: SimpleKeybinding): string { if (!keybinding) { return null; @@ -129,12 +123,6 @@ export class WindowsNativeResolvedKeybinding extends ResolvedKeybinding { return AriaLabelProvider.toLabel(this._firstPart, firstPart, this._chordPart, chordPart, OperatingSystem.Windows); } - public getAriaLabelWithoutModifiers(): string { - let firstPart = this._getAriaLabelForKeybinding(this._firstPart); - let chordPart = this._getAriaLabelForKeybinding(this._chordPart); - return AriaLabelProvider.toLabel(NO_MODIFIERS, firstPart, NO_MODIFIERS, chordPart, OperatingSystem.Windows); - } - private _keyCodeToElectronAccelerator(keyCode: KeyCode): string { if (keyCode >= KeyCode.NUMPAD_0 && keyCode <= KeyCode.NUMPAD_DIVIDE) { // Electron cannot handle numpad keys @@ -207,34 +195,6 @@ export class WindowsNativeResolvedKeybinding extends ResolvedKeybinding { return (this._chordPart ? true : false); } - public hasCtrlModifier(): boolean { - if (this._chordPart) { - return false; - } - return this._firstPart.ctrlKey; - } - - public hasShiftModifier(): boolean { - if (this._chordPart) { - return false; - } - return this._firstPart.shiftKey; - } - - public hasAltModifier(): boolean { - if (this._chordPart) { - return false; - } - return this._firstPart.altKey; - } - - public hasMetaModifier(): boolean { - if (this._chordPart) { - return false; - } - return this._firstPart.metaKey; - } - public getParts(): [ResolvedKeybindingPart, ResolvedKeybindingPart] { return [ this._toResolvedKeybindingPart(this._firstPart), diff --git a/src/vs/workbench/services/keybinding/test/keyboardMapperTestUtils.ts b/src/vs/workbench/services/keybinding/test/keyboardMapperTestUtils.ts index 8f5acff5abf7a..ae6d665728b9a 100644 --- a/src/vs/workbench/services/keybinding/test/keyboardMapperTestUtils.ts +++ b/src/vs/workbench/services/keybinding/test/keyboardMapperTestUtils.ts @@ -17,34 +17,22 @@ import { ScanCodeBinding } from 'vs/workbench/services/keybinding/common/scanCod export interface IResolvedKeybinding { label: string; - labelWithoutModifiers: string; ariaLabel: string; - ariaLabelWithoutModifiers: string; electronAccelerator: string; userSettingsLabel: string; isWYSIWYG: boolean; isChord: boolean; - hasCtrlModifier: boolean; - hasShiftModifier: boolean; - hasAltModifier: boolean; - hasMetaModifier: boolean; dispatchParts: [string, string]; } function toIResolvedKeybinding(kb: ResolvedKeybinding): IResolvedKeybinding { return { label: kb.getLabel(), - labelWithoutModifiers: kb.getLabelWithoutModifiers(), ariaLabel: kb.getAriaLabel(), - ariaLabelWithoutModifiers: kb.getAriaLabelWithoutModifiers(), electronAccelerator: kb.getElectronAccelerator(), userSettingsLabel: kb.getUserSettingsLabel(), isWYSIWYG: kb.isWYSIWYG(), isChord: kb.isChord(), - hasCtrlModifier: kb.hasCtrlModifier(), - hasShiftModifier: kb.hasShiftModifier(), - hasAltModifier: kb.hasAltModifier(), - hasMetaModifier: kb.hasMetaModifier(), dispatchParts: kb.getDispatchParts(), }; } diff --git a/src/vs/workbench/services/keybinding/test/macLinuxFallbackKeyboardMapper.test.ts b/src/vs/workbench/services/keybinding/test/macLinuxFallbackKeyboardMapper.test.ts index 5c6156521d78f..73ff188981b1a 100644 --- a/src/vs/workbench/services/keybinding/test/macLinuxFallbackKeyboardMapper.test.ts +++ b/src/vs/workbench/services/keybinding/test/macLinuxFallbackKeyboardMapper.test.ts @@ -25,16 +25,10 @@ suite('keyboardMapper - MAC fallback', () => { [{ label: '⌘Z', ariaLabel: 'Command+Z', - labelWithoutModifiers: 'Z', - ariaLabelWithoutModifiers: 'Z', electronAccelerator: 'Cmd+Z', userSettingsLabel: 'cmd+z', isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: ['meta+Z', null], }] ); @@ -46,16 +40,10 @@ suite('keyboardMapper - MAC fallback', () => { [{ label: '⌘K ⌘=', ariaLabel: 'Command+K Command+=', - labelWithoutModifiers: 'K =', - ariaLabelWithoutModifiers: 'K =', electronAccelerator: null, userSettingsLabel: 'cmd+k cmd+=', isWYSIWYG: true, isChord: true, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['meta+K', 'meta+='], }] ); @@ -75,16 +63,10 @@ suite('keyboardMapper - MAC fallback', () => { { label: '⌘Z', ariaLabel: 'Command+Z', - labelWithoutModifiers: 'Z', - ariaLabelWithoutModifiers: 'Z', electronAccelerator: 'Cmd+Z', userSettingsLabel: 'cmd+z', isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: ['meta+Z', null], } ); @@ -98,16 +80,10 @@ suite('keyboardMapper - MAC fallback', () => { [{ label: '⌘, ⌘/', ariaLabel: 'Command+, Command+/', - labelWithoutModifiers: ', /', - ariaLabelWithoutModifiers: ', /', electronAccelerator: null, userSettingsLabel: 'cmd+, cmd+/', isWYSIWYG: true, isChord: true, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['meta+,', 'meta+/'], }] ); @@ -127,16 +103,10 @@ suite('keyboardMapper - MAC fallback', () => { { label: '⌘', ariaLabel: 'Command+', - labelWithoutModifiers: '', - ariaLabelWithoutModifiers: '', electronAccelerator: null, userSettingsLabel: 'cmd+', isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: [null, null], } ); @@ -157,16 +127,10 @@ suite('keyboardMapper - LINUX fallback', () => { [{ label: 'Ctrl+Z', ariaLabel: 'Control+Z', - labelWithoutModifiers: 'Z', - ariaLabelWithoutModifiers: 'Z', electronAccelerator: 'Ctrl+Z', userSettingsLabel: 'ctrl+z', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+Z', null], }] ); @@ -178,16 +142,10 @@ suite('keyboardMapper - LINUX fallback', () => { [{ label: 'Ctrl+K Ctrl+=', ariaLabel: 'Control+K Control+=', - labelWithoutModifiers: 'K =', - ariaLabelWithoutModifiers: 'K =', electronAccelerator: null, userSettingsLabel: 'ctrl+k ctrl+=', isWYSIWYG: true, isChord: true, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+K', 'ctrl+='], }] ); @@ -207,16 +165,10 @@ suite('keyboardMapper - LINUX fallback', () => { { label: 'Ctrl+Z', ariaLabel: 'Control+Z', - labelWithoutModifiers: 'Z', - ariaLabelWithoutModifiers: 'Z', electronAccelerator: 'Ctrl+Z', userSettingsLabel: 'ctrl+z', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+Z', null], } ); @@ -230,16 +182,10 @@ suite('keyboardMapper - LINUX fallback', () => { [{ label: 'Ctrl+, Ctrl+/', ariaLabel: 'Control+, Control+/', - labelWithoutModifiers: ', /', - ariaLabelWithoutModifiers: ', /', electronAccelerator: null, userSettingsLabel: 'ctrl+, ctrl+/', isWYSIWYG: true, isChord: true, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+,', 'ctrl+/'], }] ); @@ -253,16 +199,10 @@ suite('keyboardMapper - LINUX fallback', () => { [{ label: 'Ctrl+,', ariaLabel: 'Control+,', - labelWithoutModifiers: ',', - ariaLabelWithoutModifiers: ',', electronAccelerator: 'Ctrl+,', userSettingsLabel: 'ctrl+,', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+,', null], }] ); @@ -282,16 +222,10 @@ suite('keyboardMapper - LINUX fallback', () => { { label: 'Ctrl+', ariaLabel: 'Control+', - labelWithoutModifiers: '', - ariaLabelWithoutModifiers: '', electronAccelerator: null, userSettingsLabel: 'ctrl+', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: [null, null], } ); diff --git a/src/vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts b/src/vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts index d47b0dccf7730..524ef34f3a6a2 100644 --- a/src/vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts +++ b/src/vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts @@ -67,16 +67,10 @@ suite('keyboardMapper - MAC de_ch', () => { [{ label: '⌘A', ariaLabel: 'Command+A', - labelWithoutModifiers: 'A', - ariaLabelWithoutModifiers: 'A', electronAccelerator: 'Cmd+A', userSettingsLabel: 'cmd+a', isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: ['meta+[KeyA]', null], }] ); @@ -88,16 +82,10 @@ suite('keyboardMapper - MAC de_ch', () => { [{ label: '⌘B', ariaLabel: 'Command+B', - labelWithoutModifiers: 'B', - ariaLabelWithoutModifiers: 'B', electronAccelerator: 'Cmd+B', userSettingsLabel: 'cmd+b', isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: ['meta+[KeyB]', null], }] ); @@ -109,16 +97,10 @@ suite('keyboardMapper - MAC de_ch', () => { [{ label: '⌘Z', ariaLabel: 'Command+Z', - labelWithoutModifiers: 'Z', - ariaLabelWithoutModifiers: 'Z', electronAccelerator: 'Cmd+Z', userSettingsLabel: 'cmd+z', isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: ['meta+[KeyY]', null], }] ); @@ -138,16 +120,10 @@ suite('keyboardMapper - MAC de_ch', () => { { label: '⌘Z', ariaLabel: 'Command+Z', - labelWithoutModifiers: 'Z', - ariaLabelWithoutModifiers: 'Z', electronAccelerator: 'Cmd+Z', userSettingsLabel: 'cmd+z', isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: ['meta+[KeyY]', null], } ); @@ -159,16 +135,10 @@ suite('keyboardMapper - MAC de_ch', () => { [{ label: '⌃⌥⌘6', ariaLabel: 'Control+Alt+Command+6', - labelWithoutModifiers: '6', - ariaLabelWithoutModifiers: '6', electronAccelerator: 'Ctrl+Alt+Cmd+6', userSettingsLabel: 'ctrl+alt+cmd+6', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: true, - hasMetaModifier: true, dispatchParts: ['ctrl+alt+meta+[Digit6]', null], }] ); @@ -188,16 +158,10 @@ suite('keyboardMapper - MAC de_ch', () => { { label: '⌘¨', ariaLabel: 'Command+¨', - labelWithoutModifiers: '¨', - ariaLabelWithoutModifiers: '¨', electronAccelerator: null, userSettingsLabel: 'cmd+[BracketRight]', isWYSIWYG: false, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: ['meta+[BracketRight]', null], } ); @@ -209,16 +173,10 @@ suite('keyboardMapper - MAC de_ch', () => { [{ label: '⌃⌥9', ariaLabel: 'Control+Alt+9', - labelWithoutModifiers: '9', - ariaLabelWithoutModifiers: '9', electronAccelerator: 'Ctrl+Alt+9', userSettingsLabel: 'ctrl+alt+9', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: true, - hasMetaModifier: false, dispatchParts: ['ctrl+alt+[Digit9]', null], }] ); @@ -230,16 +188,10 @@ suite('keyboardMapper - MAC de_ch', () => { [{ label: '⇧⌘7', ariaLabel: 'Shift+Command+7', - labelWithoutModifiers: '7', - ariaLabelWithoutModifiers: '7', electronAccelerator: 'Shift+Cmd+7', userSettingsLabel: 'shift+cmd+7', isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: true, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: ['shift+meta+[Digit7]', null], }] ); @@ -251,16 +203,10 @@ suite('keyboardMapper - MAC de_ch', () => { [{ label: '⇧⌘\'', ariaLabel: 'Shift+Command+\'', - labelWithoutModifiers: '\'', - ariaLabelWithoutModifiers: '\'', electronAccelerator: null, userSettingsLabel: 'shift+cmd+[Minus]', isWYSIWYG: false, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: true, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: ['shift+meta+[Minus]', null], }] ); @@ -272,16 +218,10 @@ suite('keyboardMapper - MAC de_ch', () => { [{ label: '⌘K ⌃⇧⌥⌘7', ariaLabel: 'Command+K Control+Shift+Alt+Command+7', - labelWithoutModifiers: 'K 7', - ariaLabelWithoutModifiers: 'K 7', electronAccelerator: null, userSettingsLabel: 'cmd+k ctrl+shift+alt+cmd+7', isWYSIWYG: true, isChord: true, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['meta+[KeyK]', 'ctrl+shift+alt+meta+[Digit7]'], }] ); @@ -293,16 +233,10 @@ suite('keyboardMapper - MAC de_ch', () => { [{ label: '⌘K ⇧⌘0', ariaLabel: 'Command+K Shift+Command+0', - labelWithoutModifiers: 'K 0', - ariaLabelWithoutModifiers: 'K 0', electronAccelerator: null, userSettingsLabel: 'cmd+k shift+cmd+0', isWYSIWYG: true, isChord: true, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['meta+[KeyK]', 'shift+meta+[Digit0]'], }] ); @@ -314,16 +248,10 @@ suite('keyboardMapper - MAC de_ch', () => { [{ label: '⌘↓', ariaLabel: 'Command+DownArrow', - labelWithoutModifiers: '↓', - ariaLabelWithoutModifiers: 'DownArrow', electronAccelerator: 'Cmd+Down', userSettingsLabel: 'cmd+down', isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: ['meta+[ArrowDown]', null], }] ); @@ -335,16 +263,10 @@ suite('keyboardMapper - MAC de_ch', () => { [{ label: '⌘NumPad0', ariaLabel: 'Command+NumPad0', - labelWithoutModifiers: 'NumPad0', - ariaLabelWithoutModifiers: 'NumPad0', electronAccelerator: null, userSettingsLabel: 'cmd+numpad0', isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: ['meta+[Numpad0]', null], }] ); @@ -356,16 +278,10 @@ suite('keyboardMapper - MAC de_ch', () => { [{ label: '⌘Home', ariaLabel: 'Command+Home', - labelWithoutModifiers: 'Home', - ariaLabelWithoutModifiers: 'Home', electronAccelerator: 'Cmd+Home', userSettingsLabel: 'cmd+home', isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: ['meta+[Home]', null], }] ); @@ -385,16 +301,10 @@ suite('keyboardMapper - MAC de_ch', () => { { label: '⌘Home', ariaLabel: 'Command+Home', - labelWithoutModifiers: 'Home', - ariaLabelWithoutModifiers: 'Home', electronAccelerator: 'Cmd+Home', userSettingsLabel: 'cmd+home', isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: ['meta+[Home]', null], } ); @@ -408,16 +318,10 @@ suite('keyboardMapper - MAC de_ch', () => { [{ label: '⌘, ⇧⌘7', ariaLabel: 'Command+, Shift+Command+7', - labelWithoutModifiers: ', 7', - ariaLabelWithoutModifiers: ', 7', electronAccelerator: null, userSettingsLabel: 'cmd+[Comma] shift+cmd+7', isWYSIWYG: false, isChord: true, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['meta+[Comma]', 'shift+meta+[Digit7]'], }] ); @@ -437,16 +341,10 @@ suite('keyboardMapper - MAC de_ch', () => { { label: '⌘', ariaLabel: 'Command+', - labelWithoutModifiers: '', - ariaLabelWithoutModifiers: '', electronAccelerator: null, userSettingsLabel: 'cmd+', isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: [null, null], } ); @@ -466,16 +364,10 @@ suite('keyboardMapper - MAC de_ch', () => { { label: '⌘', ariaLabel: 'Command+', - labelWithoutModifiers: '', - ariaLabelWithoutModifiers: '', electronAccelerator: null, userSettingsLabel: 'cmd+', isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: [null, null], } ); @@ -505,16 +397,10 @@ suite('keyboardMapper - MAC en_us', () => { [{ label: '⌘, ⌘/', ariaLabel: 'Command+, Command+/', - labelWithoutModifiers: ', /', - ariaLabelWithoutModifiers: ', /', electronAccelerator: null, userSettingsLabel: 'cmd+, cmd+/', isWYSIWYG: true, isChord: true, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['meta+[Comma]', 'meta+[Slash]'], }] ); @@ -534,16 +420,10 @@ suite('keyboardMapper - MAC en_us', () => { { label: '⌘', ariaLabel: 'Command+', - labelWithoutModifiers: '', - ariaLabelWithoutModifiers: '', electronAccelerator: null, userSettingsLabel: 'cmd+', isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: [null, null], } ); @@ -563,16 +443,10 @@ suite('keyboardMapper - MAC en_us', () => { { label: '⌘', ariaLabel: 'Command+', - labelWithoutModifiers: '', - ariaLabelWithoutModifiers: '', electronAccelerator: null, userSettingsLabel: 'cmd+', isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: true, dispatchParts: [null, null], } ); @@ -623,16 +497,10 @@ suite('keyboardMapper - LINUX de_ch', () => { [{ label: 'Ctrl+A', ariaLabel: 'Control+A', - labelWithoutModifiers: 'A', - ariaLabelWithoutModifiers: 'A', electronAccelerator: 'Ctrl+A', userSettingsLabel: 'ctrl+a', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[KeyA]', null], }] ); @@ -644,16 +512,10 @@ suite('keyboardMapper - LINUX de_ch', () => { [{ label: 'Ctrl+Z', ariaLabel: 'Control+Z', - labelWithoutModifiers: 'Z', - ariaLabelWithoutModifiers: 'Z', electronAccelerator: 'Ctrl+Z', userSettingsLabel: 'ctrl+z', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[KeyY]', null], }] ); @@ -673,16 +535,10 @@ suite('keyboardMapper - LINUX de_ch', () => { { label: 'Ctrl+Z', ariaLabel: 'Control+Z', - labelWithoutModifiers: 'Z', - ariaLabelWithoutModifiers: 'Z', electronAccelerator: 'Ctrl+Z', userSettingsLabel: 'ctrl+z', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[KeyY]', null], } ); @@ -709,16 +565,10 @@ suite('keyboardMapper - LINUX de_ch', () => { { label: 'Ctrl+¨', ariaLabel: 'Control+¨', - labelWithoutModifiers: '¨', - ariaLabelWithoutModifiers: '¨', electronAccelerator: null, userSettingsLabel: 'ctrl+[BracketRight]', isWYSIWYG: false, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[BracketRight]', null], } ); @@ -730,30 +580,18 @@ suite('keyboardMapper - LINUX de_ch', () => { [{ label: 'Ctrl+Alt+0', ariaLabel: 'Control+Alt+0', - labelWithoutModifiers: '0', - ariaLabelWithoutModifiers: '0', electronAccelerator: 'Ctrl+Alt+0', userSettingsLabel: 'ctrl+alt+0', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: true, - hasMetaModifier: false, dispatchParts: ['ctrl+alt+[Digit0]', null], }, { label: 'Ctrl+Alt+$', ariaLabel: 'Control+Alt+$', - labelWithoutModifiers: '$', - ariaLabelWithoutModifiers: '$', electronAccelerator: null, userSettingsLabel: 'ctrl+alt+[Backslash]', isWYSIWYG: false, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: true, - hasMetaModifier: false, dispatchParts: ['ctrl+alt+[Backslash]', null], }] ); @@ -765,16 +603,10 @@ suite('keyboardMapper - LINUX de_ch', () => { [{ label: 'Ctrl+Shift+7', ariaLabel: 'Control+Shift+7', - labelWithoutModifiers: '7', - ariaLabelWithoutModifiers: '7', electronAccelerator: 'Ctrl+Shift+7', userSettingsLabel: 'ctrl+shift+7', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: true, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+shift+[Digit7]', null], }] ); @@ -786,16 +618,10 @@ suite('keyboardMapper - LINUX de_ch', () => { [{ label: 'Ctrl+Shift+\'', ariaLabel: 'Control+Shift+\'', - labelWithoutModifiers: '\'', - ariaLabelWithoutModifiers: '\'', electronAccelerator: null, userSettingsLabel: 'ctrl+shift+[Minus]', isWYSIWYG: false, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: true, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+shift+[Minus]', null], }] ); @@ -814,16 +640,10 @@ suite('keyboardMapper - LINUX de_ch', () => { [{ label: 'Ctrl+K Ctrl+Shift+0', ariaLabel: 'Control+K Control+Shift+0', - labelWithoutModifiers: 'K 0', - ariaLabelWithoutModifiers: 'K 0', electronAccelerator: null, userSettingsLabel: 'ctrl+k ctrl+shift+0', isWYSIWYG: true, isChord: true, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[KeyK]', 'ctrl+shift+[Digit0]'], }] ); @@ -835,16 +655,10 @@ suite('keyboardMapper - LINUX de_ch', () => { [{ label: 'Ctrl+DownArrow', ariaLabel: 'Control+DownArrow', - labelWithoutModifiers: 'DownArrow', - ariaLabelWithoutModifiers: 'DownArrow', electronAccelerator: 'Ctrl+Down', userSettingsLabel: 'ctrl+down', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[ArrowDown]', null], }] ); @@ -856,16 +670,10 @@ suite('keyboardMapper - LINUX de_ch', () => { [{ label: 'Ctrl+NumPad0', ariaLabel: 'Control+NumPad0', - labelWithoutModifiers: 'NumPad0', - ariaLabelWithoutModifiers: 'NumPad0', electronAccelerator: null, userSettingsLabel: 'ctrl+numpad0', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[Numpad0]', null], }] ); @@ -877,16 +685,10 @@ suite('keyboardMapper - LINUX de_ch', () => { [{ label: 'Ctrl+Home', ariaLabel: 'Control+Home', - labelWithoutModifiers: 'Home', - ariaLabelWithoutModifiers: 'Home', electronAccelerator: 'Ctrl+Home', userSettingsLabel: 'ctrl+home', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[Home]', null], }] ); @@ -906,16 +708,10 @@ suite('keyboardMapper - LINUX de_ch', () => { { label: 'Ctrl+Home', ariaLabel: 'Control+Home', - labelWithoutModifiers: 'Home', - ariaLabelWithoutModifiers: 'Home', electronAccelerator: 'Ctrl+Home', userSettingsLabel: 'ctrl+home', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[Home]', null], } ); @@ -935,16 +731,10 @@ suite('keyboardMapper - LINUX de_ch', () => { { label: 'Ctrl+X', ariaLabel: 'Control+X', - labelWithoutModifiers: 'X', - ariaLabelWithoutModifiers: 'X', electronAccelerator: 'Ctrl+X', userSettingsLabel: 'ctrl+x', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[KeyX]', null], } ); @@ -958,16 +748,10 @@ suite('keyboardMapper - LINUX de_ch', () => { [{ label: 'Ctrl+, Ctrl+Shift+7', ariaLabel: 'Control+, Control+Shift+7', - labelWithoutModifiers: ', 7', - ariaLabelWithoutModifiers: ', 7', electronAccelerator: null, userSettingsLabel: 'ctrl+[Comma] ctrl+shift+7', isWYSIWYG: false, isChord: true, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[Comma]', 'ctrl+shift+[Digit7]'], }] ); @@ -987,16 +771,10 @@ suite('keyboardMapper - LINUX de_ch', () => { { label: 'Ctrl+', ariaLabel: 'Control+', - labelWithoutModifiers: '', - ariaLabelWithoutModifiers: '', electronAccelerator: null, userSettingsLabel: 'ctrl+', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: [null, null], } ); @@ -1016,16 +794,10 @@ suite('keyboardMapper - LINUX de_ch', () => { { label: 'Ctrl+', ariaLabel: 'Control+', - labelWithoutModifiers: '', - ariaLabelWithoutModifiers: '', electronAccelerator: null, userSettingsLabel: 'ctrl+', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: [null, null], } ); @@ -1057,16 +829,10 @@ suite('keyboardMapper - LINUX en_us', () => { [{ label: 'Ctrl+A', ariaLabel: 'Control+A', - labelWithoutModifiers: 'A', - ariaLabelWithoutModifiers: 'A', electronAccelerator: 'Ctrl+A', userSettingsLabel: 'ctrl+a', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[KeyA]', null], }] ); @@ -1078,16 +844,10 @@ suite('keyboardMapper - LINUX en_us', () => { [{ label: 'Ctrl+Z', ariaLabel: 'Control+Z', - labelWithoutModifiers: 'Z', - ariaLabelWithoutModifiers: 'Z', electronAccelerator: 'Ctrl+Z', userSettingsLabel: 'ctrl+z', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[KeyZ]', null], }] ); @@ -1107,16 +867,10 @@ suite('keyboardMapper - LINUX en_us', () => { { label: 'Ctrl+Z', ariaLabel: 'Control+Z', - labelWithoutModifiers: 'Z', - ariaLabelWithoutModifiers: 'Z', electronAccelerator: 'Ctrl+Z', userSettingsLabel: 'ctrl+z', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[KeyZ]', null], } ); @@ -1128,16 +882,10 @@ suite('keyboardMapper - LINUX en_us', () => { [{ label: 'Ctrl+]', ariaLabel: 'Control+]', - labelWithoutModifiers: ']', - ariaLabelWithoutModifiers: ']', electronAccelerator: 'Ctrl+]', userSettingsLabel: 'ctrl+]', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[BracketRight]', null], }] ); @@ -1157,16 +905,10 @@ suite('keyboardMapper - LINUX en_us', () => { { label: 'Ctrl+]', ariaLabel: 'Control+]', - labelWithoutModifiers: ']', - ariaLabelWithoutModifiers: ']', electronAccelerator: 'Ctrl+]', userSettingsLabel: 'ctrl+]', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[BracketRight]', null], } ); @@ -1178,16 +920,10 @@ suite('keyboardMapper - LINUX en_us', () => { [{ label: 'Shift+]', ariaLabel: 'Shift+]', - labelWithoutModifiers: ']', - ariaLabelWithoutModifiers: ']', electronAccelerator: 'Shift+]', userSettingsLabel: 'shift+]', isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: true, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['shift+[BracketRight]', null], }] ); @@ -1199,16 +935,10 @@ suite('keyboardMapper - LINUX en_us', () => { [{ label: 'Ctrl+/', ariaLabel: 'Control+/', - labelWithoutModifiers: '/', - ariaLabelWithoutModifiers: '/', electronAccelerator: 'Ctrl+/', userSettingsLabel: 'ctrl+/', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[Slash]', null], }] ); @@ -1220,16 +950,10 @@ suite('keyboardMapper - LINUX en_us', () => { [{ label: 'Ctrl+Shift+/', ariaLabel: 'Control+Shift+/', - labelWithoutModifiers: '/', - ariaLabelWithoutModifiers: '/', electronAccelerator: 'Ctrl+Shift+/', userSettingsLabel: 'ctrl+shift+/', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: true, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+shift+[Slash]', null], }] ); @@ -1241,16 +965,10 @@ suite('keyboardMapper - LINUX en_us', () => { [{ label: 'Ctrl+K Ctrl+\\', ariaLabel: 'Control+K Control+\\', - labelWithoutModifiers: 'K \\', - ariaLabelWithoutModifiers: 'K \\', electronAccelerator: null, userSettingsLabel: 'ctrl+k ctrl+\\', isWYSIWYG: true, isChord: true, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[KeyK]', 'ctrl+[Backslash]'], }] ); @@ -1262,16 +980,10 @@ suite('keyboardMapper - LINUX en_us', () => { [{ label: 'Ctrl+K Ctrl+=', ariaLabel: 'Control+K Control+=', - labelWithoutModifiers: 'K =', - ariaLabelWithoutModifiers: 'K =', electronAccelerator: null, userSettingsLabel: 'ctrl+k ctrl+=', isWYSIWYG: true, isChord: true, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[KeyK]', 'ctrl+[Equal]'], }] ); @@ -1283,16 +995,10 @@ suite('keyboardMapper - LINUX en_us', () => { [{ label: 'Ctrl+DownArrow', ariaLabel: 'Control+DownArrow', - labelWithoutModifiers: 'DownArrow', - ariaLabelWithoutModifiers: 'DownArrow', electronAccelerator: 'Ctrl+Down', userSettingsLabel: 'ctrl+down', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[ArrowDown]', null], }] ); @@ -1304,16 +1010,10 @@ suite('keyboardMapper - LINUX en_us', () => { [{ label: 'Ctrl+NumPad0', ariaLabel: 'Control+NumPad0', - labelWithoutModifiers: 'NumPad0', - ariaLabelWithoutModifiers: 'NumPad0', electronAccelerator: null, userSettingsLabel: 'ctrl+numpad0', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[Numpad0]', null], }] ); @@ -1325,16 +1025,10 @@ suite('keyboardMapper - LINUX en_us', () => { [{ label: 'Ctrl+Home', ariaLabel: 'Control+Home', - labelWithoutModifiers: 'Home', - ariaLabelWithoutModifiers: 'Home', electronAccelerator: 'Ctrl+Home', userSettingsLabel: 'ctrl+home', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[Home]', null], }] ); @@ -1354,16 +1048,10 @@ suite('keyboardMapper - LINUX en_us', () => { { label: 'Ctrl+Home', ariaLabel: 'Control+Home', - labelWithoutModifiers: 'Home', - ariaLabelWithoutModifiers: 'Home', electronAccelerator: 'Ctrl+Home', userSettingsLabel: 'ctrl+home', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[Home]', null], } ); @@ -1375,30 +1063,18 @@ suite('keyboardMapper - LINUX en_us', () => { [{ label: 'Ctrl+Shift+,', ariaLabel: 'Control+Shift+,', - labelWithoutModifiers: ',', - ariaLabelWithoutModifiers: ',', electronAccelerator: 'Ctrl+Shift+,', userSettingsLabel: 'ctrl+shift+,', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: true, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+shift+[Comma]', null], }, { label: 'Ctrl+<', ariaLabel: 'Control+<', - labelWithoutModifiers: '<', - ariaLabelWithoutModifiers: '<', electronAccelerator: null, userSettingsLabel: 'ctrl+[IntlBackslash]', isWYSIWYG: false, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[IntlBackslash]', null], }] ); @@ -1410,16 +1086,10 @@ suite('keyboardMapper - LINUX en_us', () => { [{ label: 'Ctrl+Enter', ariaLabel: 'Control+Enter', - labelWithoutModifiers: 'Enter', - ariaLabelWithoutModifiers: 'Enter', electronAccelerator: 'Ctrl+Enter', userSettingsLabel: 'ctrl+enter', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[Enter]', null], }] ); @@ -1439,16 +1109,10 @@ suite('keyboardMapper - LINUX en_us', () => { { label: 'Ctrl+Enter', ariaLabel: 'Control+Enter', - labelWithoutModifiers: 'Enter', - ariaLabelWithoutModifiers: 'Enter', electronAccelerator: 'Ctrl+Enter', userSettingsLabel: 'ctrl+enter', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[Enter]', null], } ); @@ -1462,16 +1126,10 @@ suite('keyboardMapper - LINUX en_us', () => { [{ label: 'Ctrl+, Ctrl+/', ariaLabel: 'Control+, Control+/', - labelWithoutModifiers: ', /', - ariaLabelWithoutModifiers: ', /', electronAccelerator: null, userSettingsLabel: 'ctrl+, ctrl+/', isWYSIWYG: true, isChord: true, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[Comma]', 'ctrl+[Slash]'], }] ); @@ -1485,16 +1143,10 @@ suite('keyboardMapper - LINUX en_us', () => { [{ label: 'Ctrl+,', ariaLabel: 'Control+,', - labelWithoutModifiers: ',', - ariaLabelWithoutModifiers: ',', electronAccelerator: 'Ctrl+,', userSettingsLabel: 'ctrl+,', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[Comma]', null], }] ); @@ -1514,16 +1166,10 @@ suite('keyboardMapper - LINUX en_us', () => { { label: 'Ctrl+', ariaLabel: 'Control+', - labelWithoutModifiers: '', - ariaLabelWithoutModifiers: '', electronAccelerator: null, userSettingsLabel: 'ctrl+', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: [null, null], } ); @@ -1543,16 +1189,10 @@ suite('keyboardMapper - LINUX en_us', () => { { label: 'Ctrl+', ariaLabel: 'Control+', - labelWithoutModifiers: '', - ariaLabelWithoutModifiers: '', electronAccelerator: null, userSettingsLabel: 'ctrl+', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: [null, null], } ); @@ -1584,16 +1224,10 @@ suite('keyboardMapper', () => { { label: 'Ctrl+`', ariaLabel: 'Control+`', - labelWithoutModifiers: '`', - ariaLabelWithoutModifiers: '`', electronAccelerator: null, userSettingsLabel: 'ctrl+`', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[Backquote]', null], } ); @@ -1616,16 +1250,10 @@ suite('keyboardMapper', () => { { label: label, ariaLabel: label, - labelWithoutModifiers: label, - ariaLabelWithoutModifiers: label, electronAccelerator: electronAccelerator, userSettingsLabel: userSettingsLabel, isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: [dispatch, null], } ); @@ -1661,16 +1289,10 @@ suite('keyboardMapper', () => { { label: label, ariaLabel: label, - labelWithoutModifiers: label, - ariaLabelWithoutModifiers: label, electronAccelerator: electronAccelerator, userSettingsLabel: userSettingsLabel, isWYSIWYG: true, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: [dispatch, null], } ); @@ -1730,16 +1352,10 @@ suite('keyboardMapper', () => { { label: '⌃§', ariaLabel: 'Control+§', - labelWithoutModifiers: '§', - ariaLabelWithoutModifiers: '§', electronAccelerator: null, userSettingsLabel: 'ctrl+[IntlBackslash]', isWYSIWYG: false, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[IntlBackslash]', null], } ); @@ -1757,16 +1373,10 @@ suite('keyboardMapper', () => { { label: '⌃`', ariaLabel: 'Control+`', - labelWithoutModifiers: '`', - ariaLabelWithoutModifiers: '`', electronAccelerator: null, userSettingsLabel: 'ctrl+`', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[Backquote]', null], } ); @@ -1799,16 +1409,10 @@ suite('keyboardMapper - LINUX ru', () => { [{ label: 'Ctrl+ы', ariaLabel: 'Control+ы', - labelWithoutModifiers: 'ы', - ariaLabelWithoutModifiers: 'ы', electronAccelerator: 'Ctrl+S', userSettingsLabel: 'ctrl+s', isWYSIWYG: false, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+[KeyS]', null], }] ); diff --git a/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts b/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts index e5304ffae298f..a2ff068f70ba2 100644 --- a/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts +++ b/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts @@ -46,16 +46,10 @@ suite('keyboardMapper - WINDOWS de_ch', () => { [{ label: 'Ctrl+A', ariaLabel: 'Control+A', - labelWithoutModifiers: 'A', - ariaLabelWithoutModifiers: 'A', electronAccelerator: 'Ctrl+A', userSettingsLabel: 'ctrl+a', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+A', null], }] ); @@ -68,16 +62,10 @@ suite('keyboardMapper - WINDOWS de_ch', () => { [{ label: 'Ctrl+Z', ariaLabel: 'Control+Z', - labelWithoutModifiers: 'Z', - ariaLabelWithoutModifiers: 'Z', electronAccelerator: 'Ctrl+Z', userSettingsLabel: 'ctrl+z', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+Z', null], }] ); @@ -97,16 +85,10 @@ suite('keyboardMapper - WINDOWS de_ch', () => { { label: 'Ctrl+Z', ariaLabel: 'Control+Z', - labelWithoutModifiers: 'Z', - ariaLabelWithoutModifiers: 'Z', electronAccelerator: 'Ctrl+Z', userSettingsLabel: 'ctrl+z', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+Z', null], } ); @@ -119,16 +101,10 @@ suite('keyboardMapper - WINDOWS de_ch', () => { [{ label: 'Ctrl+^', ariaLabel: 'Control+^', - labelWithoutModifiers: '^', - ariaLabelWithoutModifiers: '^', electronAccelerator: 'Ctrl+]', userSettingsLabel: 'ctrl+]', isWYSIWYG: false, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+]', null], }] ); @@ -148,16 +124,10 @@ suite('keyboardMapper - WINDOWS de_ch', () => { { label: 'Ctrl+^', ariaLabel: 'Control+^', - labelWithoutModifiers: '^', - ariaLabelWithoutModifiers: '^', electronAccelerator: 'Ctrl+]', userSettingsLabel: 'ctrl+]', isWYSIWYG: false, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+]', null], } ); @@ -170,16 +140,10 @@ suite('keyboardMapper - WINDOWS de_ch', () => { [{ label: 'Shift+^', ariaLabel: 'Shift+^', - labelWithoutModifiers: '^', - ariaLabelWithoutModifiers: '^', electronAccelerator: 'Shift+]', userSettingsLabel: 'shift+]', isWYSIWYG: false, isChord: false, - hasCtrlModifier: false, - hasShiftModifier: true, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['shift+]', null], }] ); @@ -192,16 +156,10 @@ suite('keyboardMapper - WINDOWS de_ch', () => { [{ label: 'Ctrl+§', ariaLabel: 'Control+§', - labelWithoutModifiers: '§', - ariaLabelWithoutModifiers: '§', electronAccelerator: 'Ctrl+/', userSettingsLabel: 'ctrl+/', isWYSIWYG: false, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+/', null], }] ); @@ -214,16 +172,10 @@ suite('keyboardMapper - WINDOWS de_ch', () => { [{ label: 'Ctrl+Shift+§', ariaLabel: 'Control+Shift+§', - labelWithoutModifiers: '§', - ariaLabelWithoutModifiers: '§', electronAccelerator: 'Ctrl+Shift+/', userSettingsLabel: 'ctrl+shift+/', isWYSIWYG: false, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: true, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+shift+/', null], }] ); @@ -236,16 +188,10 @@ suite('keyboardMapper - WINDOWS de_ch', () => { [{ label: 'Ctrl+K Ctrl+ä', ariaLabel: 'Control+K Control+ä', - labelWithoutModifiers: 'K ä', - ariaLabelWithoutModifiers: 'K ä', electronAccelerator: null, userSettingsLabel: 'ctrl+k ctrl+\\', isWYSIWYG: false, isChord: true, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+K', 'ctrl+\\'], }] ); @@ -266,16 +212,10 @@ suite('keyboardMapper - WINDOWS de_ch', () => { [{ label: 'Ctrl+DownArrow', ariaLabel: 'Control+DownArrow', - labelWithoutModifiers: 'DownArrow', - ariaLabelWithoutModifiers: 'DownArrow', electronAccelerator: 'Ctrl+Down', userSettingsLabel: 'ctrl+down', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+DownArrow', null], }] ); @@ -288,16 +228,10 @@ suite('keyboardMapper - WINDOWS de_ch', () => { [{ label: 'Ctrl+NumPad0', ariaLabel: 'Control+NumPad0', - labelWithoutModifiers: 'NumPad0', - ariaLabelWithoutModifiers: 'NumPad0', electronAccelerator: null, userSettingsLabel: 'ctrl+numpad0', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+NumPad0', null], }] ); @@ -310,16 +244,10 @@ suite('keyboardMapper - WINDOWS de_ch', () => { [{ label: 'Ctrl+Home', ariaLabel: 'Control+Home', - labelWithoutModifiers: 'Home', - ariaLabelWithoutModifiers: 'Home', electronAccelerator: 'Ctrl+Home', userSettingsLabel: 'ctrl+home', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+Home', null], }] ); @@ -339,16 +267,10 @@ suite('keyboardMapper - WINDOWS de_ch', () => { { label: 'Ctrl+Home', ariaLabel: 'Control+Home', - labelWithoutModifiers: 'Home', - ariaLabelWithoutModifiers: 'Home', electronAccelerator: 'Ctrl+Home', userSettingsLabel: 'ctrl+home', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+Home', null], } ); @@ -362,16 +284,10 @@ suite('keyboardMapper - WINDOWS de_ch', () => { [{ label: 'Ctrl+, Ctrl+§', ariaLabel: 'Control+, Control+§', - labelWithoutModifiers: ', §', - ariaLabelWithoutModifiers: ', §', electronAccelerator: null, userSettingsLabel: 'ctrl+, ctrl+/', isWYSIWYG: false, isChord: true, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+,', 'ctrl+/'], }] ); @@ -391,16 +307,10 @@ suite('keyboardMapper - WINDOWS de_ch', () => { { label: 'Ctrl+', ariaLabel: 'Control+', - labelWithoutModifiers: '', - ariaLabelWithoutModifiers: '', electronAccelerator: null, userSettingsLabel: 'ctrl+', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: [null, null], } ); @@ -429,16 +339,10 @@ suite('keyboardMapper - WINDOWS en_us', () => { [{ label: 'Ctrl+K Ctrl+\\', ariaLabel: 'Control+K Control+\\', - labelWithoutModifiers: 'K \\', - ariaLabelWithoutModifiers: 'K \\', electronAccelerator: null, userSettingsLabel: 'ctrl+k ctrl+\\', isWYSIWYG: true, isChord: true, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+K', 'ctrl+\\'], }] ); @@ -452,16 +356,10 @@ suite('keyboardMapper - WINDOWS en_us', () => { [{ label: 'Ctrl+, Ctrl+/', ariaLabel: 'Control+, Control+/', - labelWithoutModifiers: ', /', - ariaLabelWithoutModifiers: ', /', electronAccelerator: null, userSettingsLabel: 'ctrl+, ctrl+/', isWYSIWYG: true, isChord: true, - hasCtrlModifier: false, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+,', 'ctrl+/'], }] ); @@ -475,16 +373,10 @@ suite('keyboardMapper - WINDOWS en_us', () => { [{ label: 'Ctrl+,', ariaLabel: 'Control+,', - labelWithoutModifiers: ',', - ariaLabelWithoutModifiers: ',', electronAccelerator: 'Ctrl+,', userSettingsLabel: 'ctrl+,', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+,', null], }] ); @@ -504,16 +396,10 @@ suite('keyboardMapper - WINDOWS en_us', () => { { label: 'Ctrl+', ariaLabel: 'Control+', - labelWithoutModifiers: '', - ariaLabelWithoutModifiers: '', electronAccelerator: null, userSettingsLabel: 'ctrl+', isWYSIWYG: true, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: [null, null], } ); @@ -545,16 +431,10 @@ suite('misc', () => { [{ label: 'Ctrl+لا', ariaLabel: 'Control+لا', - labelWithoutModifiers: 'لا', - ariaLabelWithoutModifiers: 'لا', electronAccelerator: 'Ctrl+B', userSettingsLabel: 'ctrl+b', isWYSIWYG: false, isChord: false, - hasCtrlModifier: true, - hasShiftModifier: false, - hasAltModifier: false, - hasMetaModifier: false, dispatchParts: ['ctrl+B', null], }] ); From c749f235fa0828263e7ae3ba9cd2aef6c547cae1 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 3 May 2017 07:09:46 -0700 Subject: [PATCH 0150/2747] Fixes #24522: Ctrl+Alt+[Minus] under English (UK) keyboard layout on Linux --- .../ui/keybindingLabel/keybindingLabel.ts | 2 +- src/vs/base/common/keyCodes.ts | 8 +- .../common/keybindingsEditorModel.ts | 2 +- .../common/macLinuxKeyboardMapper.ts | 133 +-- .../services/keybinding/test/linux_en_uk.js | 1046 +++++++++++++++++ .../services/keybinding/test/linux_en_uk.txt | 517 ++++++++ .../test/macLinuxKeyboardMapper.test.ts | 39 + 7 files changed, 1671 insertions(+), 76 deletions(-) create mode 100644 src/vs/workbench/services/keybinding/test/linux_en_uk.js create mode 100644 src/vs/workbench/services/keybinding/test/linux_en_uk.txt diff --git a/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.ts b/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.ts index e75c3faade7ab..cee68a0de3a7a 100644 --- a/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.ts +++ b/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.ts @@ -86,7 +86,7 @@ export class KeybindingLabel implements IDisposable { if (part.metaKey) { this.renderKey(parent, modifierLabels.metaKey, match && match.metaKey, modifierLabels.separator); } - const keyLabel = part.kbLabel; + const keyLabel = part.keyLabel; if (keyLabel) { this.renderKey(parent, keyLabel, match && match.keyCode, ''); } diff --git a/src/vs/base/common/keyCodes.ts b/src/vs/base/common/keyCodes.ts index bed55f19ceb84..ff89f086e5783 100644 --- a/src/vs/base/common/keyCodes.ts +++ b/src/vs/base/common/keyCodes.ts @@ -552,16 +552,16 @@ export class ResolvedKeybindingPart { readonly altKey: boolean; readonly metaKey: boolean; - readonly kbLabel: string; - readonly kbAriaLabel: string; + readonly keyLabel: string; + readonly keyAriaLabel: string; constructor(ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean, kbLabel: string, kbAriaLabel: string) { this.ctrlKey = ctrlKey; this.shiftKey = shiftKey; this.altKey = altKey; this.metaKey = metaKey; - this.kbLabel = kbLabel; - this.kbAriaLabel = kbAriaLabel; + this.keyLabel = kbLabel; + this.keyAriaLabel = kbAriaLabel; } } diff --git a/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts b/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts index 43b5b6f0c26b2..65379a3689fc2 100644 --- a/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts +++ b/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts @@ -384,7 +384,7 @@ class KeybindingItemMatches { if (!keybinding) { return false; } - const ariaLabel = keybinding.kbAriaLabel; + const ariaLabel = keybinding.keyAriaLabel; if (ariaLabel.length === 1 || word.length === 1) { if (strings.compareIgnoreCase(ariaLabel, word) === 0) { return true; diff --git a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts index d77347961a45b..e7eacdb6a965a 100644 --- a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts @@ -87,80 +87,43 @@ export class NativeResolvedKeybinding extends ResolvedKeybinding { this._chordPart = chordPart; } - private _getUILabelForScanCodeBinding(binding: ScanCodeBinding): string { - if (!binding) { - return null; - } - if (binding.isDuplicateModifierCase()) { - return ''; - } - return this._mapper.getUILabelForScanCode(binding.scanCode); - } - public getLabel(): string { - let firstPart = this._getUILabelForScanCodeBinding(this._firstPart); - let chordPart = this._getUILabelForScanCodeBinding(this._chordPart); + let firstPart = this._mapper.getUILabelForScanCodeBinding(this._firstPart); + let chordPart = this._mapper.getUILabelForScanCodeBinding(this._chordPart); return UILabelProvider.toLabel(this._firstPart, firstPart, this._chordPart, chordPart, this._OS); } - private _getAriaLabelForScanCodeBinding(binding: ScanCodeBinding): string { - if (!binding) { - return null; - } - if (binding.isDuplicateModifierCase()) { - return ''; - } - return this._mapper.getAriaLabelForScanCode(binding.scanCode); - } - public getAriaLabel(): string { - let firstPart = this._getAriaLabelForScanCodeBinding(this._firstPart); - let chordPart = this._getAriaLabelForScanCodeBinding(this._chordPart); + let firstPart = this._mapper.getAriaLabelForScanCodeBinding(this._firstPart); + let chordPart = this._mapper.getAriaLabelForScanCodeBinding(this._chordPart); return AriaLabelProvider.toLabel(this._firstPart, firstPart, this._chordPart, chordPart, this._OS); } - private _getElectronAcceleratorLabelForScanCodeBinding(binding: ScanCodeBinding): string { - if (!binding) { - return null; - } - if (binding.isDuplicateModifierCase()) { - return null; - } - return this._mapper.getElectronLabelForScanCode(binding.scanCode); - } - public getElectronAccelerator(): string { if (this._chordPart !== null) { // Electron cannot handle chords return null; } - let firstPart = this._getElectronAcceleratorLabelForScanCodeBinding(this._firstPart); + let firstPart = this._mapper.getElectronAcceleratorLabelForScanCodeBinding(this._firstPart); return ElectronAcceleratorLabelProvider.toLabel(this._firstPart, firstPart, null, null, this._OS); } - private _getUserSettingsLabelForScanCodeBinding(binding: ScanCodeBinding): string { - if (!binding) { - return null; - } - if (binding.isDuplicateModifierCase()) { - return ''; - } - return this._mapper.getUserSettingsLabel(binding.scanCode); - } - public getUserSettingsLabel(): string { - let firstPart = this._getUserSettingsLabelForScanCodeBinding(this._firstPart); - let chordPart = this._getUserSettingsLabelForScanCodeBinding(this._chordPart); + let firstPart = this._mapper.getUserSettingsLabelForScanCodeBinding(this._firstPart); + let chordPart = this._mapper.getUserSettingsLabelForScanCodeBinding(this._chordPart); return UserSettingsLabelProvider.toLabel(this._firstPart, firstPart, this._chordPart, chordPart, this._OS); } - private _isWYSIWYG(scanCode: ScanCode): boolean { - if (IMMUTABLE_CODE_TO_KEY_CODE[scanCode] !== -1) { + private _isWYSIWYG(binding: ScanCodeBinding): boolean { + if (!binding) { return true; } - let a = this._mapper.getAriaLabelForScanCode(scanCode); - let b = this._mapper.getUserSettingsLabel(scanCode); + if (IMMUTABLE_CODE_TO_KEY_CODE[binding.scanCode] !== -1) { + return true; + } + let a = this._mapper.getAriaLabelForScanCodeBinding(binding); + let b = this._mapper.getUserSettingsLabelForScanCodeBinding(binding); if (!a && !b) { return true; @@ -172,10 +135,7 @@ export class NativeResolvedKeybinding extends ResolvedKeybinding { } public isWYSIWYG(): boolean { - let result = true; - result = result && (this._firstPart ? this._isWYSIWYG(this._firstPart.scanCode) : true); - result = result && (this._chordPart ? this._isWYSIWYG(this._chordPart.scanCode) : true); - return result; + return (this._isWYSIWYG(this._firstPart) && this._isWYSIWYG(this._chordPart)); } public isChord(): boolean { @@ -199,8 +159,8 @@ export class NativeResolvedKeybinding extends ResolvedKeybinding { binding.shiftKey, binding.altKey, binding.metaKey, - this._getUILabelForScanCodeBinding(binding), - this._getAriaLabelForScanCodeBinding(binding) + this._mapper.getUILabelForScanCodeBinding(binding), + this._mapper.getAriaLabelForScanCodeBinding(binding) ); } @@ -900,9 +860,15 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { return result; } - public getUILabelForScanCode(scanCode: ScanCode): string { + public getUILabelForScanCodeBinding(binding: ScanCodeBinding): string { + if (!binding) { + return null; + } + if (binding.isDuplicateModifierCase()) { + return ''; + } if (this._OS === OperatingSystem.Macintosh) { - switch (scanCode) { + switch (binding.scanCode) { case ScanCode.ArrowLeft: return '←'; case ScanCode.ArrowUp: @@ -913,11 +879,17 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { return '↓'; } } - return this._scanCodeToLabel[scanCode]; + return this._scanCodeToLabel[binding.scanCode]; } - public getAriaLabelForScanCode(scanCode: ScanCode): string { - return this._scanCodeToLabel[scanCode]; + public getAriaLabelForScanCodeBinding(binding: ScanCodeBinding): string { + if (!binding) { + return null; + } + if (binding.isDuplicateModifierCase()) { + return ''; + } + return this._scanCodeToLabel[binding.scanCode]; } public getDispatchStrForScanCodeBinding(keypress: ScanCodeBinding): string { @@ -944,19 +916,33 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { return result; } - public getUserSettingsLabel(scanCode: ScanCode): string { - const immutableKeyCode = IMMUTABLE_CODE_TO_KEY_CODE[scanCode]; + public getUserSettingsLabelForScanCodeBinding(binding: ScanCodeBinding): string { + if (!binding) { + return null; + } + if (binding.isDuplicateModifierCase()) { + return ''; + } + + const immutableKeyCode = IMMUTABLE_CODE_TO_KEY_CODE[binding.scanCode]; if (immutableKeyCode !== -1) { return USER_SETTINGS.fromKeyCode(immutableKeyCode).toLowerCase(); } // Check if this scanCode always maps to the same keyCode and back - let constantKeyCode: KeyCode = this._scanCodeKeyCodeMapper.guessStableKeyCode(scanCode); + let constantKeyCode: KeyCode = this._scanCodeKeyCodeMapper.guessStableKeyCode(binding.scanCode); if (constantKeyCode !== -1) { - return USER_SETTINGS.fromKeyCode(constantKeyCode).toLowerCase(); + // Verify that this is a good key code that can be mapped back to the same scan code + let reverseBindings = this.simpleKeybindingToScanCodeBinding(new SimpleKeybinding(binding.ctrlKey, binding.shiftKey, binding.altKey, binding.metaKey, constantKeyCode)); + for (let i = 0, len = reverseBindings.length; i < len; i++) { + const reverseBinding = reverseBindings[i]; + if (reverseBinding.scanCode === binding.scanCode) { + return USER_SETTINGS.fromKeyCode(constantKeyCode).toLowerCase(); + } + } } - return this._scanCodeToDispatch[scanCode]; + return this._scanCodeToDispatch[binding.scanCode]; } private _getElectronLabelForKeyCode(keyCode: KeyCode): string { @@ -980,14 +966,21 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { return KeyCodeUtils.toString(keyCode); } - public getElectronLabelForScanCode(scanCode: ScanCode): string { - const immutableKeyCode = IMMUTABLE_CODE_TO_KEY_CODE[scanCode]; + public getElectronAcceleratorLabelForScanCodeBinding(binding: ScanCodeBinding): string { + if (!binding) { + return null; + } + if (binding.isDuplicateModifierCase()) { + return null; + } + + const immutableKeyCode = IMMUTABLE_CODE_TO_KEY_CODE[binding.scanCode]; if (immutableKeyCode !== -1) { return this._getElectronLabelForKeyCode(immutableKeyCode); } // Check if this scanCode always maps to the same keyCode and back - let constantKeyCode: KeyCode = this._scanCodeKeyCodeMapper.guessStableKeyCode(scanCode); + const constantKeyCode: KeyCode = this._scanCodeKeyCodeMapper.guessStableKeyCode(binding.scanCode); if (!this._isUSStandard) { // Electron cannot handle these key codes on anything else than standard US diff --git a/src/vs/workbench/services/keybinding/test/linux_en_uk.js b/src/vs/workbench/services/keybinding/test/linux_en_uk.js new file mode 100644 index 0000000000000..57b55abead3ee --- /dev/null +++ b/src/vs/workbench/services/keybinding/test/linux_en_uk.js @@ -0,0 +1,1046 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +define({ + "Sleep": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "WakeUp": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "KeyA": { + "value": "a", + "withShift": "A", + "withAltGr": "æ", + "withShiftAltGr": "Æ" + }, + "KeyB": { + "value": "b", + "withShift": "B", + "withAltGr": "”", + "withShiftAltGr": "’" + }, + "KeyC": { + "value": "c", + "withShift": "C", + "withAltGr": "¢", + "withShiftAltGr": "©" + }, + "KeyD": { + "value": "d", + "withShift": "D", + "withAltGr": "ð", + "withShiftAltGr": "Ð" + }, + "KeyE": { + "value": "e", + "withShift": "E", + "withAltGr": "e", + "withShiftAltGr": "E" + }, + "KeyF": { + "value": "f", + "withShift": "F", + "withAltGr": "đ", + "withShiftAltGr": "ª" + }, + "KeyG": { + "value": "g", + "withShift": "G", + "withAltGr": "ŋ", + "withShiftAltGr": "Ŋ" + }, + "KeyH": { + "value": "h", + "withShift": "H", + "withAltGr": "ħ", + "withShiftAltGr": "Ħ" + }, + "KeyI": { + "value": "i", + "withShift": "I", + "withAltGr": "→", + "withShiftAltGr": "ı" + }, + "KeyJ": { + "value": "j", + "withShift": "J", + "withAltGr": "̉", + "withShiftAltGr": "̛" + }, + "KeyK": { + "value": "k", + "withShift": "K", + "withAltGr": "ĸ", + "withShiftAltGr": "&" + }, + "KeyL": { + "value": "l", + "withShift": "L", + "withAltGr": "ł", + "withShiftAltGr": "Ł" + }, + "KeyM": { + "value": "m", + "withShift": "M", + "withAltGr": "µ", + "withShiftAltGr": "º" + }, + "KeyN": { + "value": "n", + "withShift": "N", + "withAltGr": "n", + "withShiftAltGr": "N" + }, + "KeyO": { + "value": "o", + "withShift": "O", + "withAltGr": "ø", + "withShiftAltGr": "Ø" + }, + "KeyP": { + "value": "p", + "withShift": "P", + "withAltGr": "þ", + "withShiftAltGr": "Þ" + }, + "KeyQ": { + "value": "q", + "withShift": "Q", + "withAltGr": "@", + "withShiftAltGr": "Ω" + }, + "KeyR": { + "value": "r", + "withShift": "R", + "withAltGr": "¶", + "withShiftAltGr": "®" + }, + "KeyS": { + "value": "s", + "withShift": "S", + "withAltGr": "ß", + "withShiftAltGr": "§" + }, + "KeyT": { + "value": "t", + "withShift": "T", + "withAltGr": "ŧ", + "withShiftAltGr": "Ŧ" + }, + "KeyU": { + "value": "u", + "withShift": "U", + "withAltGr": "↓", + "withShiftAltGr": "↑" + }, + "KeyV": { + "value": "v", + "withShift": "V", + "withAltGr": "“", + "withShiftAltGr": "‘" + }, + "KeyW": { + "value": "w", + "withShift": "W", + "withAltGr": "ł", + "withShiftAltGr": "Ł" + }, + "KeyX": { + "value": "x", + "withShift": "X", + "withAltGr": "»", + "withShiftAltGr": ">" + }, + "KeyY": { + "value": "y", + "withShift": "Y", + "withAltGr": "←", + "withShiftAltGr": "¥" + }, + "KeyZ": { + "value": "z", + "withShift": "Z", + "withAltGr": "«", + "withShiftAltGr": "<" + }, + "Digit1": { + "value": "1", + "withShift": "!", + "withAltGr": "¹", + "withShiftAltGr": "¡" + }, + "Digit2": { + "value": "2", + "withShift": "\"", + "withAltGr": "²", + "withShiftAltGr": "⅛" + }, + "Digit3": { + "value": "3", + "withShift": "£", + "withAltGr": "³", + "withShiftAltGr": "£" + }, + "Digit4": { + "value": "4", + "withShift": "$", + "withAltGr": "€", + "withShiftAltGr": "¼" + }, + "Digit5": { + "value": "5", + "withShift": "%", + "withAltGr": "½", + "withShiftAltGr": "⅜" + }, + "Digit6": { + "value": "6", + "withShift": "^", + "withAltGr": "¾", + "withShiftAltGr": "⅝" + }, + "Digit7": { + "value": "7", + "withShift": "&", + "withAltGr": "{", + "withShiftAltGr": "⅞" + }, + "Digit8": { + "value": "8", + "withShift": "*", + "withAltGr": "[", + "withShiftAltGr": "™" + }, + "Digit9": { + "value": "9", + "withShift": "(", + "withAltGr": "]", + "withShiftAltGr": "±" + }, + "Digit0": { + "value": "0", + "withShift": ")", + "withAltGr": "}", + "withShiftAltGr": "°" + }, + "Enter": { + "value": "\r", + "withShift": "\r", + "withAltGr": "\r", + "withShiftAltGr": "\r" + }, + "Escape": { + "value": "\u001b", + "withShift": "\u001b", + "withAltGr": "\u001b", + "withShiftAltGr": "\u001b" + }, + "Backspace": { + "value": "\b", + "withShift": "\b", + "withAltGr": "\b", + "withShiftAltGr": "\b" + }, + "Tab": { + "value": "\t", + "withShift": "", + "withAltGr": "\t", + "withShiftAltGr": "" + }, + "Space": { + "value": " ", + "withShift": " ", + "withAltGr": " ", + "withShiftAltGr": " " + }, + "Minus": { + "value": "-", + "withShift": "_", + "withAltGr": "\\", + "withShiftAltGr": "¿" + }, + "Equal": { + "value": "=", + "withShift": "+", + "withAltGr": "̧", + "withShiftAltGr": "̨" + }, + "BracketLeft": { + "value": "[", + "withShift": "{", + "withAltGr": "̈", + "withShiftAltGr": "̊" + }, + "BracketRight": { + "value": "]", + "withShift": "}", + "withAltGr": "̃", + "withShiftAltGr": "̄" + }, + "Backslash": { + "value": "#", + "withShift": "~", + "withAltGr": "̀", + "withShiftAltGr": "̆" + }, + "Semicolon": { + "value": ";", + "withShift": ":", + "withAltGr": "́", + "withShiftAltGr": "̋" + }, + "Quote": { + "value": "'", + "withShift": "@", + "withAltGr": "̂", + "withShiftAltGr": "̌" + }, + "Backquote": { + "value": "`", + "withShift": "¬", + "withAltGr": "|", + "withShiftAltGr": "|" + }, + "Comma": { + "value": ",", + "withShift": "<", + "withAltGr": "─", + "withShiftAltGr": "×" + }, + "Period": { + "value": ".", + "withShift": ">", + "withAltGr": "·", + "withShiftAltGr": "÷" + }, + "Slash": { + "value": "/", + "withShift": "?", + "withAltGr": "̣", + "withShiftAltGr": "̇" + }, + "CapsLock": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F1": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F2": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F3": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F4": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F5": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F6": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F7": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F8": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F9": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F10": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F11": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F12": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "PrintScreen": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "ScrollLock": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Pause": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Insert": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Home": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "PageUp": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Delete": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "End": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "PageDown": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "ArrowRight": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "ArrowLeft": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "ArrowDown": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "ArrowUp": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "NumLock": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "NumpadDivide": { + "value": "/", + "withShift": "/", + "withAltGr": "/", + "withShiftAltGr": "/" + }, + "NumpadMultiply": { + "value": "*", + "withShift": "*", + "withAltGr": "*", + "withShiftAltGr": "*" + }, + "NumpadSubtract": { + "value": "-", + "withShift": "-", + "withAltGr": "-", + "withShiftAltGr": "-" + }, + "NumpadAdd": { + "value": "+", + "withShift": "+", + "withAltGr": "+", + "withShiftAltGr": "+" + }, + "NumpadEnter": { + "value": "\r", + "withShift": "\r", + "withAltGr": "\r", + "withShiftAltGr": "\r" + }, + "Numpad1": { + "value": "", + "withShift": "1", + "withAltGr": "", + "withShiftAltGr": "1" + }, + "Numpad2": { + "value": "", + "withShift": "2", + "withAltGr": "", + "withShiftAltGr": "2" + }, + "Numpad3": { + "value": "", + "withShift": "3", + "withAltGr": "", + "withShiftAltGr": "3" + }, + "Numpad4": { + "value": "", + "withShift": "4", + "withAltGr": "", + "withShiftAltGr": "4" + }, + "Numpad5": { + "value": "", + "withShift": "5", + "withAltGr": "", + "withShiftAltGr": "5" + }, + "Numpad6": { + "value": "", + "withShift": "6", + "withAltGr": "", + "withShiftAltGr": "6" + }, + "Numpad7": { + "value": "", + "withShift": "7", + "withAltGr": "", + "withShiftAltGr": "7" + }, + "Numpad8": { + "value": "", + "withShift": "8", + "withAltGr": "", + "withShiftAltGr": "8" + }, + "Numpad9": { + "value": "", + "withShift": "9", + "withAltGr": "", + "withShiftAltGr": "9" + }, + "Numpad0": { + "value": "", + "withShift": "0", + "withAltGr": "", + "withShiftAltGr": "0" + }, + "NumpadDecimal": { + "value": "", + "withShift": ".", + "withAltGr": "", + "withShiftAltGr": "." + }, + "IntlBackslash": { + "value": "\\", + "withShift": "|", + "withAltGr": "|", + "withShiftAltGr": "¦" + }, + "ContextMenu": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Power": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "NumpadEqual": { + "value": "=", + "withShift": "=", + "withAltGr": "=", + "withShiftAltGr": "=" + }, + "F13": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F14": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F15": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F16": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F17": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F18": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F19": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F20": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F21": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F22": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F23": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "F24": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Open": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Help": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Select": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Again": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Undo": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Cut": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Copy": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Paste": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Find": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "AudioVolumeMute": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "AudioVolumeUp": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "AudioVolumeDown": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "NumpadComma": { + "value": ".", + "withShift": ".", + "withAltGr": ".", + "withShiftAltGr": "." + }, + "IntlRo": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "KanaMode": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "IntlYen": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Convert": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "NonConvert": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Lang1": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Lang2": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Lang3": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Lang4": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Lang5": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "NumpadParenLeft": { + "value": "(", + "withShift": "(", + "withAltGr": "(", + "withShiftAltGr": "(" + }, + "NumpadParenRight": { + "value": ")", + "withShift": ")", + "withAltGr": ")", + "withShiftAltGr": ")" + }, + "ControlLeft": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "ShiftLeft": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "AltLeft": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "MetaLeft": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "ControlRight": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "ShiftRight": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "AltRight": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "MetaRight": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "BrightnessUp": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "BrightnessDown": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "MediaPlay": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "MediaRecord": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "MediaFastForward": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "MediaRewind": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "MediaTrackNext": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "MediaTrackPrevious": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "MediaStop": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "Eject": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "MediaPlayPause": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "MediaSelect": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "LaunchMail": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "LaunchApp2": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "LaunchApp1": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "SelectTask": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "LaunchScreenSaver": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "BrowserSearch": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "BrowserHome": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "BrowserBack": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "BrowserForward": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "BrowserStop": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "BrowserRefresh": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "BrowserFavorites": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "MailReply": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "MailForward": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + }, + "MailSend": { + "value": "", + "withShift": "", + "withAltGr": "", + "withShiftAltGr": "" + } +}); diff --git a/src/vs/workbench/services/keybinding/test/linux_en_uk.txt b/src/vs/workbench/services/keybinding/test/linux_en_uk.txt new file mode 100644 index 0000000000000..9d1ab7184c4ea --- /dev/null +++ b/src/vs/workbench/services/keybinding/test/linux_en_uk.txt @@ -0,0 +1,517 @@ +isUSStandard: false +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyA | a | A | | A | a | A | [KeyA] | | +| Ctrl+KeyA | a | Ctrl+A | | Ctrl+A | ctrl+a | Ctrl+A | ctrl+[KeyA] | | +| Shift+KeyA | A | Shift+A | | Shift+A | shift+a | Shift+A | shift+[KeyA] | | +| Ctrl+Shift+KeyA | A | Ctrl+Shift+A | | Ctrl+Shift+A | ctrl+shift+a | Ctrl+Shift+A | ctrl+shift+[KeyA] | | +| Alt+KeyA | a | Alt+A | | Alt+A | alt+a | Alt+A | alt+[KeyA] | | +| Ctrl+Alt+KeyA | æ | Ctrl+Alt+A | | Ctrl+Alt+A | ctrl+alt+a | Ctrl+Alt+A | ctrl+alt+[KeyA] | | +| Shift+Alt+KeyA | A | Shift+Alt+A | | Shift+Alt+A | shift+alt+a | Shift+Alt+A | shift+alt+[KeyA] | | +| Ctrl+Shift+Alt+KeyA | Æ | Ctrl+Shift+Alt+A | | Ctrl+Shift+Alt+A | ctrl+shift+alt+a | Ctrl+Shift+Alt+A | ctrl+shift+alt+[KeyA] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyB | b | B | | B | b | B | [KeyB] | | +| Ctrl+KeyB | b | Ctrl+B | | Ctrl+B | ctrl+b | Ctrl+B | ctrl+[KeyB] | | +| Shift+KeyB | B | Shift+B | | Shift+B | shift+b | Shift+B | shift+[KeyB] | | +| Ctrl+Shift+KeyB | B | Ctrl+Shift+B | | Ctrl+Shift+B | ctrl+shift+b | Ctrl+Shift+B | ctrl+shift+[KeyB] | | +| Alt+KeyB | b | Alt+B | | Alt+B | alt+b | Alt+B | alt+[KeyB] | | +| Ctrl+Alt+KeyB | ” | Ctrl+Alt+B | | Ctrl+Alt+B | ctrl+alt+b | Ctrl+Alt+B | ctrl+alt+[KeyB] | | +| Shift+Alt+KeyB | B | Shift+Alt+B | | Shift+Alt+B | shift+alt+b | Shift+Alt+B | shift+alt+[KeyB] | | +| Ctrl+Shift+Alt+KeyB | ’ | Ctrl+Shift+Alt+B | | Ctrl+Shift+Alt+B | ctrl+shift+alt+b | Ctrl+Shift+Alt+B | ctrl+shift+alt+[KeyB] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyC | c | C | | C | c | C | [KeyC] | | +| Ctrl+KeyC | c | Ctrl+C | | Ctrl+C | ctrl+c | Ctrl+C | ctrl+[KeyC] | | +| Shift+KeyC | C | Shift+C | | Shift+C | shift+c | Shift+C | shift+[KeyC] | | +| Ctrl+Shift+KeyC | C | Ctrl+Shift+C | | Ctrl+Shift+C | ctrl+shift+c | Ctrl+Shift+C | ctrl+shift+[KeyC] | | +| Alt+KeyC | c | Alt+C | | Alt+C | alt+c | Alt+C | alt+[KeyC] | | +| Ctrl+Alt+KeyC | ¢ | Ctrl+Alt+C | | Ctrl+Alt+C | ctrl+alt+c | Ctrl+Alt+C | ctrl+alt+[KeyC] | | +| Shift+Alt+KeyC | C | Shift+Alt+C | | Shift+Alt+C | shift+alt+c | Shift+Alt+C | shift+alt+[KeyC] | | +| Ctrl+Shift+Alt+KeyC | © | Ctrl+Shift+Alt+C | | Ctrl+Shift+Alt+C | ctrl+shift+alt+c | Ctrl+Shift+Alt+C | ctrl+shift+alt+[KeyC] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyD | d | D | | D | d | D | [KeyD] | | +| Ctrl+KeyD | d | Ctrl+D | | Ctrl+D | ctrl+d | Ctrl+D | ctrl+[KeyD] | | +| Shift+KeyD | D | Shift+D | | Shift+D | shift+d | Shift+D | shift+[KeyD] | | +| Ctrl+Shift+KeyD | D | Ctrl+Shift+D | | Ctrl+Shift+D | ctrl+shift+d | Ctrl+Shift+D | ctrl+shift+[KeyD] | | +| Alt+KeyD | d | Alt+D | | Alt+D | alt+d | Alt+D | alt+[KeyD] | | +| Ctrl+Alt+KeyD | ð | Ctrl+Alt+D | | Ctrl+Alt+D | ctrl+alt+d | Ctrl+Alt+D | ctrl+alt+[KeyD] | | +| Shift+Alt+KeyD | D | Shift+Alt+D | | Shift+Alt+D | shift+alt+d | Shift+Alt+D | shift+alt+[KeyD] | | +| Ctrl+Shift+Alt+KeyD | Ð | Ctrl+Shift+Alt+D | | Ctrl+Shift+Alt+D | ctrl+shift+alt+d | Ctrl+Shift+Alt+D | ctrl+shift+alt+[KeyD] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyE | e | E | | E | e | E | [KeyE] | | +| Ctrl+KeyE | e | Ctrl+E | | Ctrl+E | ctrl+e | Ctrl+E | ctrl+[KeyE] | | +| Shift+KeyE | E | Shift+E | | Shift+E | shift+e | Shift+E | shift+[KeyE] | | +| Ctrl+Shift+KeyE | E | Ctrl+Shift+E | | Ctrl+Shift+E | ctrl+shift+e | Ctrl+Shift+E | ctrl+shift+[KeyE] | | +| Alt+KeyE | e | Alt+E | | Alt+E | alt+e | Alt+E | alt+[KeyE] | | +| Ctrl+Alt+KeyE | e | Ctrl+Alt+E | | Ctrl+Alt+E | ctrl+alt+e | Ctrl+Alt+E | ctrl+alt+[KeyE] | | +| Shift+Alt+KeyE | E | Shift+Alt+E | | Shift+Alt+E | shift+alt+e | Shift+Alt+E | shift+alt+[KeyE] | | +| Ctrl+Shift+Alt+KeyE | E | Ctrl+Shift+Alt+E | | Ctrl+Shift+Alt+E | ctrl+shift+alt+e | Ctrl+Shift+Alt+E | ctrl+shift+alt+[KeyE] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyF | f | F | | F | f | F | [KeyF] | | +| Ctrl+KeyF | f | Ctrl+F | | Ctrl+F | ctrl+f | Ctrl+F | ctrl+[KeyF] | | +| Shift+KeyF | F | Shift+F | | Shift+F | shift+f | Shift+F | shift+[KeyF] | | +| Ctrl+Shift+KeyF | F | Ctrl+Shift+F | | Ctrl+Shift+F | ctrl+shift+f | Ctrl+Shift+F | ctrl+shift+[KeyF] | | +| Alt+KeyF | f | Alt+F | | Alt+F | alt+f | Alt+F | alt+[KeyF] | | +| Ctrl+Alt+KeyF | đ | Ctrl+Alt+F | | Ctrl+Alt+F | ctrl+alt+f | Ctrl+Alt+F | ctrl+alt+[KeyF] | | +| Shift+Alt+KeyF | F | Shift+Alt+F | | Shift+Alt+F | shift+alt+f | Shift+Alt+F | shift+alt+[KeyF] | | +| Ctrl+Shift+Alt+KeyF | ª | Ctrl+Shift+Alt+F | | Ctrl+Shift+Alt+F | ctrl+shift+alt+f | Ctrl+Shift+Alt+F | ctrl+shift+alt+[KeyF] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyG | g | G | | G | g | G | [KeyG] | | +| Ctrl+KeyG | g | Ctrl+G | | Ctrl+G | ctrl+g | Ctrl+G | ctrl+[KeyG] | | +| Shift+KeyG | G | Shift+G | | Shift+G | shift+g | Shift+G | shift+[KeyG] | | +| Ctrl+Shift+KeyG | G | Ctrl+Shift+G | | Ctrl+Shift+G | ctrl+shift+g | Ctrl+Shift+G | ctrl+shift+[KeyG] | | +| Alt+KeyG | g | Alt+G | | Alt+G | alt+g | Alt+G | alt+[KeyG] | | +| Ctrl+Alt+KeyG | ŋ | Ctrl+Alt+G | | Ctrl+Alt+G | ctrl+alt+g | Ctrl+Alt+G | ctrl+alt+[KeyG] | | +| Shift+Alt+KeyG | G | Shift+Alt+G | | Shift+Alt+G | shift+alt+g | Shift+Alt+G | shift+alt+[KeyG] | | +| Ctrl+Shift+Alt+KeyG | Ŋ | Ctrl+Shift+Alt+G | | Ctrl+Shift+Alt+G | ctrl+shift+alt+g | Ctrl+Shift+Alt+G | ctrl+shift+alt+[KeyG] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyH | h | H | | H | h | H | [KeyH] | | +| Ctrl+KeyH | h | Ctrl+H | | Ctrl+H | ctrl+h | Ctrl+H | ctrl+[KeyH] | | +| Shift+KeyH | H | Shift+H | | Shift+H | shift+h | Shift+H | shift+[KeyH] | | +| Ctrl+Shift+KeyH | H | Ctrl+Shift+H | | Ctrl+Shift+H | ctrl+shift+h | Ctrl+Shift+H | ctrl+shift+[KeyH] | | +| Alt+KeyH | h | Alt+H | | Alt+H | alt+h | Alt+H | alt+[KeyH] | | +| Ctrl+Alt+KeyH | ħ | Ctrl+Alt+H | | Ctrl+Alt+H | ctrl+alt+h | Ctrl+Alt+H | ctrl+alt+[KeyH] | | +| Shift+Alt+KeyH | H | Shift+Alt+H | | Shift+Alt+H | shift+alt+h | Shift+Alt+H | shift+alt+[KeyH] | | +| Ctrl+Shift+Alt+KeyH | Ħ | Ctrl+Shift+Alt+H | | Ctrl+Shift+Alt+H | ctrl+shift+alt+h | Ctrl+Shift+Alt+H | ctrl+shift+alt+[KeyH] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyI | i | I | | I | i | I | [KeyI] | | +| Ctrl+KeyI | i | Ctrl+I | | Ctrl+I | ctrl+i | Ctrl+I | ctrl+[KeyI] | | +| Shift+KeyI | I | Shift+I | | Shift+I | shift+i | Shift+I | shift+[KeyI] | | +| Ctrl+Shift+KeyI | I | Ctrl+Shift+I | | Ctrl+Shift+I | ctrl+shift+i | Ctrl+Shift+I | ctrl+shift+[KeyI] | | +| Alt+KeyI | i | Alt+I | | Alt+I | alt+i | Alt+I | alt+[KeyI] | | +| Ctrl+Alt+KeyI | → | Ctrl+Alt+I | | Ctrl+Alt+I | ctrl+alt+i | Ctrl+Alt+I | ctrl+alt+[KeyI] | | +| Shift+Alt+KeyI | I | Shift+Alt+I | | Shift+Alt+I | shift+alt+i | Shift+Alt+I | shift+alt+[KeyI] | | +| Ctrl+Shift+Alt+KeyI | ı | Ctrl+Shift+Alt+I | | Ctrl+Shift+Alt+I | ctrl+shift+alt+i | Ctrl+Shift+Alt+I | ctrl+shift+alt+[KeyI] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyJ | j | J | | J | j | J | [KeyJ] | | +| Ctrl+KeyJ | j | Ctrl+J | | Ctrl+J | ctrl+j | Ctrl+J | ctrl+[KeyJ] | | +| Shift+KeyJ | J | Shift+J | | Shift+J | shift+j | Shift+J | shift+[KeyJ] | | +| Ctrl+Shift+KeyJ | J | Ctrl+Shift+J | | Ctrl+Shift+J | ctrl+shift+j | Ctrl+Shift+J | ctrl+shift+[KeyJ] | | +| Alt+KeyJ | j | Alt+J | | Alt+J | alt+j | Alt+J | alt+[KeyJ] | | +| Ctrl+Alt+KeyJ | U+309 | Ctrl+Alt+J | | Ctrl+Alt+J | ctrl+alt+j | Ctrl+Alt+J | ctrl+alt+[KeyJ] | | +| Shift+Alt+KeyJ | J | Shift+Alt+J | | Shift+Alt+J | shift+alt+j | Shift+Alt+J | shift+alt+[KeyJ] | | +| Ctrl+Shift+Alt+KeyJ | U+31b | Ctrl+Shift+Alt+J | | Ctrl+Shift+Alt+J | ctrl+shift+alt+j | Ctrl+Shift+Alt+J | ctrl+shift+alt+[KeyJ] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyK | k | K | | K | k | K | [KeyK] | | +| Ctrl+KeyK | k | Ctrl+K | | Ctrl+K | ctrl+k | Ctrl+K | ctrl+[KeyK] | | +| Shift+KeyK | K | Shift+K | | Shift+K | shift+k | Shift+K | shift+[KeyK] | | +| Ctrl+Shift+KeyK | K | Ctrl+Shift+K | | Ctrl+Shift+K | ctrl+shift+k | Ctrl+Shift+K | ctrl+shift+[KeyK] | | +| Alt+KeyK | k | Alt+K | | Alt+K | alt+k | Alt+K | alt+[KeyK] | | +| Ctrl+Alt+KeyK | ĸ | Ctrl+Alt+K | | Ctrl+Alt+K | ctrl+alt+k | Ctrl+Alt+K | ctrl+alt+[KeyK] | | +| Shift+Alt+KeyK | K | Shift+Alt+K | | Shift+Alt+K | shift+alt+k | Shift+Alt+K | shift+alt+[KeyK] | | +| Ctrl+Shift+Alt+KeyK | & | Ctrl+Shift+Alt+K | | Ctrl+Shift+Alt+K | ctrl+shift+alt+k | Ctrl+Shift+Alt+K | ctrl+shift+alt+[KeyK] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyL | l | L | | L | l | L | [KeyL] | | +| Ctrl+KeyL | l | Ctrl+L | | Ctrl+L | ctrl+l | Ctrl+L | ctrl+[KeyL] | | +| Shift+KeyL | L | Shift+L | | Shift+L | shift+l | Shift+L | shift+[KeyL] | | +| Ctrl+Shift+KeyL | L | Ctrl+Shift+L | | Ctrl+Shift+L | ctrl+shift+l | Ctrl+Shift+L | ctrl+shift+[KeyL] | | +| Alt+KeyL | l | Alt+L | | Alt+L | alt+l | Alt+L | alt+[KeyL] | | +| Ctrl+Alt+KeyL | ł | Ctrl+Alt+L | | Ctrl+Alt+L | ctrl+alt+l | Ctrl+Alt+L | ctrl+alt+[KeyL] | | +| Shift+Alt+KeyL | L | Shift+Alt+L | | Shift+Alt+L | shift+alt+l | Shift+Alt+L | shift+alt+[KeyL] | | +| Ctrl+Shift+Alt+KeyL | Ł | Ctrl+Shift+Alt+L | | Ctrl+Shift+Alt+L | ctrl+shift+alt+l | Ctrl+Shift+Alt+L | ctrl+shift+alt+[KeyL] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyM | m | M | | M | m | M | [KeyM] | | +| Ctrl+KeyM | m | Ctrl+M | | Ctrl+M | ctrl+m | Ctrl+M | ctrl+[KeyM] | | +| Shift+KeyM | M | Shift+M | | Shift+M | shift+m | Shift+M | shift+[KeyM] | | +| Ctrl+Shift+KeyM | M | Ctrl+Shift+M | | Ctrl+Shift+M | ctrl+shift+m | Ctrl+Shift+M | ctrl+shift+[KeyM] | | +| Alt+KeyM | m | Alt+M | | Alt+M | alt+m | Alt+M | alt+[KeyM] | | +| Ctrl+Alt+KeyM | µ | Ctrl+Alt+M | | Ctrl+Alt+M | ctrl+alt+m | Ctrl+Alt+M | ctrl+alt+[KeyM] | | +| Shift+Alt+KeyM | M | Shift+Alt+M | | Shift+Alt+M | shift+alt+m | Shift+Alt+M | shift+alt+[KeyM] | | +| Ctrl+Shift+Alt+KeyM | º | Ctrl+Shift+Alt+M | | Ctrl+Shift+Alt+M | ctrl+shift+alt+m | Ctrl+Shift+Alt+M | ctrl+shift+alt+[KeyM] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyN | n | N | | N | n | N | [KeyN] | | +| Ctrl+KeyN | n | Ctrl+N | | Ctrl+N | ctrl+n | Ctrl+N | ctrl+[KeyN] | | +| Shift+KeyN | N | Shift+N | | Shift+N | shift+n | Shift+N | shift+[KeyN] | | +| Ctrl+Shift+KeyN | N | Ctrl+Shift+N | | Ctrl+Shift+N | ctrl+shift+n | Ctrl+Shift+N | ctrl+shift+[KeyN] | | +| Alt+KeyN | n | Alt+N | | Alt+N | alt+n | Alt+N | alt+[KeyN] | | +| Ctrl+Alt+KeyN | n | Ctrl+Alt+N | | Ctrl+Alt+N | ctrl+alt+n | Ctrl+Alt+N | ctrl+alt+[KeyN] | | +| Shift+Alt+KeyN | N | Shift+Alt+N | | Shift+Alt+N | shift+alt+n | Shift+Alt+N | shift+alt+[KeyN] | | +| Ctrl+Shift+Alt+KeyN | N | Ctrl+Shift+Alt+N | | Ctrl+Shift+Alt+N | ctrl+shift+alt+n | Ctrl+Shift+Alt+N | ctrl+shift+alt+[KeyN] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyO | o | O | | O | o | O | [KeyO] | | +| Ctrl+KeyO | o | Ctrl+O | | Ctrl+O | ctrl+o | Ctrl+O | ctrl+[KeyO] | | +| Shift+KeyO | O | Shift+O | | Shift+O | shift+o | Shift+O | shift+[KeyO] | | +| Ctrl+Shift+KeyO | O | Ctrl+Shift+O | | Ctrl+Shift+O | ctrl+shift+o | Ctrl+Shift+O | ctrl+shift+[KeyO] | | +| Alt+KeyO | o | Alt+O | | Alt+O | alt+o | Alt+O | alt+[KeyO] | | +| Ctrl+Alt+KeyO | ø | Ctrl+Alt+O | | Ctrl+Alt+O | ctrl+alt+o | Ctrl+Alt+O | ctrl+alt+[KeyO] | | +| Shift+Alt+KeyO | O | Shift+Alt+O | | Shift+Alt+O | shift+alt+o | Shift+Alt+O | shift+alt+[KeyO] | | +| Ctrl+Shift+Alt+KeyO | Ø | Ctrl+Shift+Alt+O | | Ctrl+Shift+Alt+O | ctrl+shift+alt+o | Ctrl+Shift+Alt+O | ctrl+shift+alt+[KeyO] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyP | p | P | | P | p | P | [KeyP] | | +| Ctrl+KeyP | p | Ctrl+P | | Ctrl+P | ctrl+p | Ctrl+P | ctrl+[KeyP] | | +| Shift+KeyP | P | Shift+P | | Shift+P | shift+p | Shift+P | shift+[KeyP] | | +| Ctrl+Shift+KeyP | P | Ctrl+Shift+P | | Ctrl+Shift+P | ctrl+shift+p | Ctrl+Shift+P | ctrl+shift+[KeyP] | | +| Alt+KeyP | p | Alt+P | | Alt+P | alt+p | Alt+P | alt+[KeyP] | | +| Ctrl+Alt+KeyP | þ | Ctrl+Alt+P | | Ctrl+Alt+P | ctrl+alt+p | Ctrl+Alt+P | ctrl+alt+[KeyP] | | +| Shift+Alt+KeyP | P | Shift+Alt+P | | Shift+Alt+P | shift+alt+p | Shift+Alt+P | shift+alt+[KeyP] | | +| Ctrl+Shift+Alt+KeyP | Þ | Ctrl+Shift+Alt+P | | Ctrl+Shift+Alt+P | ctrl+shift+alt+p | Ctrl+Shift+Alt+P | ctrl+shift+alt+[KeyP] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyQ | q | Q | | Q | q | Q | [KeyQ] | | +| Ctrl+KeyQ | q | Ctrl+Q | | Ctrl+Q | ctrl+q | Ctrl+Q | ctrl+[KeyQ] | | +| Shift+KeyQ | Q | Shift+Q | | Shift+Q | shift+q | Shift+Q | shift+[KeyQ] | | +| Ctrl+Shift+KeyQ | Q | Ctrl+Shift+Q | | Ctrl+Shift+Q | ctrl+shift+q | Ctrl+Shift+Q | ctrl+shift+[KeyQ] | | +| Alt+KeyQ | q | Alt+Q | | Alt+Q | alt+q | Alt+Q | alt+[KeyQ] | | +| Ctrl+Alt+KeyQ | @ | Ctrl+Alt+Q | | Ctrl+Alt+Q | ctrl+alt+q | Ctrl+Alt+Q | ctrl+alt+[KeyQ] | | +| Shift+Alt+KeyQ | Q | Shift+Alt+Q | | Shift+Alt+Q | shift+alt+q | Shift+Alt+Q | shift+alt+[KeyQ] | | +| Ctrl+Shift+Alt+KeyQ | Ω | Ctrl+Shift+Alt+Q | | Ctrl+Shift+Alt+Q | ctrl+shift+alt+q | Ctrl+Shift+Alt+Q | ctrl+shift+alt+[KeyQ] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyR | r | R | | R | r | R | [KeyR] | | +| Ctrl+KeyR | r | Ctrl+R | | Ctrl+R | ctrl+r | Ctrl+R | ctrl+[KeyR] | | +| Shift+KeyR | R | Shift+R | | Shift+R | shift+r | Shift+R | shift+[KeyR] | | +| Ctrl+Shift+KeyR | R | Ctrl+Shift+R | | Ctrl+Shift+R | ctrl+shift+r | Ctrl+Shift+R | ctrl+shift+[KeyR] | | +| Alt+KeyR | r | Alt+R | | Alt+R | alt+r | Alt+R | alt+[KeyR] | | +| Ctrl+Alt+KeyR | ¶ | Ctrl+Alt+R | | Ctrl+Alt+R | ctrl+alt+r | Ctrl+Alt+R | ctrl+alt+[KeyR] | | +| Shift+Alt+KeyR | R | Shift+Alt+R | | Shift+Alt+R | shift+alt+r | Shift+Alt+R | shift+alt+[KeyR] | | +| Ctrl+Shift+Alt+KeyR | ® | Ctrl+Shift+Alt+R | | Ctrl+Shift+Alt+R | ctrl+shift+alt+r | Ctrl+Shift+Alt+R | ctrl+shift+alt+[KeyR] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyS | s | S | | S | s | S | [KeyS] | | +| Ctrl+KeyS | s | Ctrl+S | | Ctrl+S | ctrl+s | Ctrl+S | ctrl+[KeyS] | | +| Shift+KeyS | S | Shift+S | | Shift+S | shift+s | Shift+S | shift+[KeyS] | | +| Ctrl+Shift+KeyS | S | Ctrl+Shift+S | | Ctrl+Shift+S | ctrl+shift+s | Ctrl+Shift+S | ctrl+shift+[KeyS] | | +| Alt+KeyS | s | Alt+S | | Alt+S | alt+s | Alt+S | alt+[KeyS] | | +| Ctrl+Alt+KeyS | ß | Ctrl+Alt+S | | Ctrl+Alt+S | ctrl+alt+s | Ctrl+Alt+S | ctrl+alt+[KeyS] | | +| Shift+Alt+KeyS | S | Shift+Alt+S | | Shift+Alt+S | shift+alt+s | Shift+Alt+S | shift+alt+[KeyS] | | +| Ctrl+Shift+Alt+KeyS | § | Ctrl+Shift+Alt+S | | Ctrl+Shift+Alt+S | ctrl+shift+alt+s | Ctrl+Shift+Alt+S | ctrl+shift+alt+[KeyS] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyT | t | T | | T | t | T | [KeyT] | | +| Ctrl+KeyT | t | Ctrl+T | | Ctrl+T | ctrl+t | Ctrl+T | ctrl+[KeyT] | | +| Shift+KeyT | T | Shift+T | | Shift+T | shift+t | Shift+T | shift+[KeyT] | | +| Ctrl+Shift+KeyT | T | Ctrl+Shift+T | | Ctrl+Shift+T | ctrl+shift+t | Ctrl+Shift+T | ctrl+shift+[KeyT] | | +| Alt+KeyT | t | Alt+T | | Alt+T | alt+t | Alt+T | alt+[KeyT] | | +| Ctrl+Alt+KeyT | ŧ | Ctrl+Alt+T | | Ctrl+Alt+T | ctrl+alt+t | Ctrl+Alt+T | ctrl+alt+[KeyT] | | +| Shift+Alt+KeyT | T | Shift+Alt+T | | Shift+Alt+T | shift+alt+t | Shift+Alt+T | shift+alt+[KeyT] | | +| Ctrl+Shift+Alt+KeyT | Ŧ | Ctrl+Shift+Alt+T | | Ctrl+Shift+Alt+T | ctrl+shift+alt+t | Ctrl+Shift+Alt+T | ctrl+shift+alt+[KeyT] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyU | u | U | | U | u | U | [KeyU] | | +| Ctrl+KeyU | u | Ctrl+U | | Ctrl+U | ctrl+u | Ctrl+U | ctrl+[KeyU] | | +| Shift+KeyU | U | Shift+U | | Shift+U | shift+u | Shift+U | shift+[KeyU] | | +| Ctrl+Shift+KeyU | U | Ctrl+Shift+U | | Ctrl+Shift+U | ctrl+shift+u | Ctrl+Shift+U | ctrl+shift+[KeyU] | | +| Alt+KeyU | u | Alt+U | | Alt+U | alt+u | Alt+U | alt+[KeyU] | | +| Ctrl+Alt+KeyU | ↓ | Ctrl+Alt+U | | Ctrl+Alt+U | ctrl+alt+u | Ctrl+Alt+U | ctrl+alt+[KeyU] | | +| Shift+Alt+KeyU | U | Shift+Alt+U | | Shift+Alt+U | shift+alt+u | Shift+Alt+U | shift+alt+[KeyU] | | +| Ctrl+Shift+Alt+KeyU | ↑ | Ctrl+Shift+Alt+U | | Ctrl+Shift+Alt+U | ctrl+shift+alt+u | Ctrl+Shift+Alt+U | ctrl+shift+alt+[KeyU] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyV | v | V | | V | v | V | [KeyV] | | +| Ctrl+KeyV | v | Ctrl+V | | Ctrl+V | ctrl+v | Ctrl+V | ctrl+[KeyV] | | +| Shift+KeyV | V | Shift+V | | Shift+V | shift+v | Shift+V | shift+[KeyV] | | +| Ctrl+Shift+KeyV | V | Ctrl+Shift+V | | Ctrl+Shift+V | ctrl+shift+v | Ctrl+Shift+V | ctrl+shift+[KeyV] | | +| Alt+KeyV | v | Alt+V | | Alt+V | alt+v | Alt+V | alt+[KeyV] | | +| Ctrl+Alt+KeyV | “ | Ctrl+Alt+V | | Ctrl+Alt+V | ctrl+alt+v | Ctrl+Alt+V | ctrl+alt+[KeyV] | | +| Shift+Alt+KeyV | V | Shift+Alt+V | | Shift+Alt+V | shift+alt+v | Shift+Alt+V | shift+alt+[KeyV] | | +| Ctrl+Shift+Alt+KeyV | ‘ | Ctrl+Shift+Alt+V | | Ctrl+Shift+Alt+V | ctrl+shift+alt+v | Ctrl+Shift+Alt+V | ctrl+shift+alt+[KeyV] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyW | w | W | | W | w | W | [KeyW] | | +| Ctrl+KeyW | w | Ctrl+W | | Ctrl+W | ctrl+w | Ctrl+W | ctrl+[KeyW] | | +| Shift+KeyW | W | Shift+W | | Shift+W | shift+w | Shift+W | shift+[KeyW] | | +| Ctrl+Shift+KeyW | W | Ctrl+Shift+W | | Ctrl+Shift+W | ctrl+shift+w | Ctrl+Shift+W | ctrl+shift+[KeyW] | | +| Alt+KeyW | w | Alt+W | | Alt+W | alt+w | Alt+W | alt+[KeyW] | | +| Ctrl+Alt+KeyW | ł | Ctrl+Alt+W | | Ctrl+Alt+W | ctrl+alt+w | Ctrl+Alt+W | ctrl+alt+[KeyW] | | +| Shift+Alt+KeyW | W | Shift+Alt+W | | Shift+Alt+W | shift+alt+w | Shift+Alt+W | shift+alt+[KeyW] | | +| Ctrl+Shift+Alt+KeyW | Ł | Ctrl+Shift+Alt+W | | Ctrl+Shift+Alt+W | ctrl+shift+alt+w | Ctrl+Shift+Alt+W | ctrl+shift+alt+[KeyW] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyX | x | X | | X | x | X | [KeyX] | | +| Ctrl+KeyX | x | Ctrl+X | | Ctrl+X | ctrl+x | Ctrl+X | ctrl+[KeyX] | | +| Shift+KeyX | X | Shift+X | | Shift+X | shift+x | Shift+X | shift+[KeyX] | | +| Ctrl+Shift+KeyX | X | Ctrl+Shift+X | | Ctrl+Shift+X | ctrl+shift+x | Ctrl+Shift+X | ctrl+shift+[KeyX] | | +| Alt+KeyX | x | Alt+X | | Alt+X | alt+x | Alt+X | alt+[KeyX] | | +| Ctrl+Alt+KeyX | » | Ctrl+Alt+X | | Ctrl+Alt+X | ctrl+alt+x | Ctrl+Alt+X | ctrl+alt+[KeyX] | | +| Shift+Alt+KeyX | X | Shift+Alt+X | | Shift+Alt+X | shift+alt+x | Shift+Alt+X | shift+alt+[KeyX] | | +| Ctrl+Shift+Alt+KeyX | > | Ctrl+Shift+Alt+X | | Ctrl+Shift+Alt+X | ctrl+shift+alt+x | Ctrl+Shift+Alt+X | ctrl+shift+alt+[KeyX] | | +| | | Shift+. | 2 | | | | | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyY | y | Y | | Y | y | Y | [KeyY] | | +| Ctrl+KeyY | y | Ctrl+Y | | Ctrl+Y | ctrl+y | Ctrl+Y | ctrl+[KeyY] | | +| Shift+KeyY | Y | Shift+Y | | Shift+Y | shift+y | Shift+Y | shift+[KeyY] | | +| Ctrl+Shift+KeyY | Y | Ctrl+Shift+Y | | Ctrl+Shift+Y | ctrl+shift+y | Ctrl+Shift+Y | ctrl+shift+[KeyY] | | +| Alt+KeyY | y | Alt+Y | | Alt+Y | alt+y | Alt+Y | alt+[KeyY] | | +| Ctrl+Alt+KeyY | ← | Ctrl+Alt+Y | | Ctrl+Alt+Y | ctrl+alt+y | Ctrl+Alt+Y | ctrl+alt+[KeyY] | | +| Shift+Alt+KeyY | Y | Shift+Alt+Y | | Shift+Alt+Y | shift+alt+y | Shift+Alt+Y | shift+alt+[KeyY] | | +| Ctrl+Shift+Alt+KeyY | ¥ | Ctrl+Shift+Alt+Y | | Ctrl+Shift+Alt+Y | ctrl+shift+alt+y | Ctrl+Shift+Alt+Y | ctrl+shift+alt+[KeyY] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| KeyZ | z | Z | | Z | z | Z | [KeyZ] | | +| Ctrl+KeyZ | z | Ctrl+Z | | Ctrl+Z | ctrl+z | Ctrl+Z | ctrl+[KeyZ] | | +| Shift+KeyZ | Z | Shift+Z | | Shift+Z | shift+z | Shift+Z | shift+[KeyZ] | | +| Ctrl+Shift+KeyZ | Z | Ctrl+Shift+Z | | Ctrl+Shift+Z | ctrl+shift+z | Ctrl+Shift+Z | ctrl+shift+[KeyZ] | | +| Alt+KeyZ | z | Alt+Z | | Alt+Z | alt+z | Alt+Z | alt+[KeyZ] | | +| Ctrl+Alt+KeyZ | « | Ctrl+Alt+Z | | Ctrl+Alt+Z | ctrl+alt+z | Ctrl+Alt+Z | ctrl+alt+[KeyZ] | | +| Shift+Alt+KeyZ | Z | Shift+Alt+Z | | Shift+Alt+Z | shift+alt+z | Shift+Alt+Z | shift+alt+[KeyZ] | | +| Ctrl+Shift+Alt+KeyZ | < | Ctrl+Shift+Alt+Z | | Ctrl+Shift+Alt+Z | ctrl+shift+alt+z | Ctrl+Shift+Alt+Z | ctrl+shift+alt+[KeyZ] | | +| | | Shift+, | 2 | | | | | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Digit1 | 1 | 1 | | 1 | 1 | 1 | [Digit1] | | +| Ctrl+Digit1 | 1 | Ctrl+1 | | Ctrl+1 | ctrl+1 | Ctrl+1 | ctrl+[Digit1] | | +| Shift+Digit1 | ! | Shift+1 | | Shift+1 | shift+1 | Shift+1 | shift+[Digit1] | | +| Ctrl+Shift+Digit1 | ! | Ctrl+Shift+1 | | Ctrl+Shift+1 | ctrl+shift+1 | Ctrl+Shift+1 | ctrl+shift+[Digit1] | | +| Alt+Digit1 | 1 | Alt+1 | | Alt+1 | alt+1 | Alt+1 | alt+[Digit1] | | +| Ctrl+Alt+Digit1 | ¹ | Ctrl+Alt+1 | | Ctrl+Alt+1 | ctrl+alt+1 | Ctrl+Alt+1 | ctrl+alt+[Digit1] | | +| Shift+Alt+Digit1 | ! | Shift+Alt+1 | | Shift+Alt+1 | shift+alt+1 | Shift+Alt+1 | shift+alt+[Digit1] | | +| Ctrl+Shift+Alt+Digit1 | ¡ | Ctrl+Shift+Alt+1 | | Ctrl+Shift+Alt+1 | ctrl+shift+alt+1 | Ctrl+Shift+Alt+1 | ctrl+shift+alt+[Digit1] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Digit2 | 2 | 2 | | 2 | 2 | 2 | [Digit2] | | +| Ctrl+Digit2 | 2 | Ctrl+2 | | Ctrl+2 | ctrl+2 | Ctrl+2 | ctrl+[Digit2] | | +| Shift+Digit2 | " | Shift+2 | | Shift+2 | shift+2 | Shift+2 | shift+[Digit2] | | +| | | Shift+' | 2 | | | | | | +| Ctrl+Shift+Digit2 | " | Ctrl+Shift+2 | | Ctrl+Shift+2 | ctrl+shift+2 | Ctrl+Shift+2 | ctrl+shift+[Digit2] | | +| | | Ctrl+Shift+' | 2 | | | | | | +| Alt+Digit2 | 2 | Alt+2 | | Alt+2 | alt+2 | Alt+2 | alt+[Digit2] | | +| Ctrl+Alt+Digit2 | ² | Ctrl+Alt+2 | | Ctrl+Alt+2 | ctrl+alt+2 | Ctrl+Alt+2 | ctrl+alt+[Digit2] | | +| Shift+Alt+Digit2 | " | Shift+Alt+2 | | Shift+Alt+2 | shift+alt+2 | Shift+Alt+2 | shift+alt+[Digit2] | | +| | | Shift+Alt+' | 2 | | | | | | +| Ctrl+Shift+Alt+Digit2 | ⅛ | Ctrl+Shift+Alt+2 | | Ctrl+Shift+Alt+2 | ctrl+shift+alt+2 | Ctrl+Shift+Alt+2 | ctrl+shift+alt+[Digit2] | | +| | | Ctrl+Shift+Alt+' | 2 | | | | | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Digit3 | 3 | 3 | | 3 | 3 | 3 | [Digit3] | | +| Ctrl+Digit3 | 3 | Ctrl+3 | | Ctrl+3 | ctrl+3 | Ctrl+3 | ctrl+[Digit3] | | +| Shift+Digit3 | £ | Shift+3 | | Shift+3 | shift+3 | Shift+3 | shift+[Digit3] | | +| Ctrl+Shift+Digit3 | £ | Ctrl+Shift+3 | | Ctrl+Shift+3 | ctrl+shift+3 | Ctrl+Shift+3 | ctrl+shift+[Digit3] | | +| Alt+Digit3 | 3 | Alt+3 | | Alt+3 | alt+3 | Alt+3 | alt+[Digit3] | | +| Ctrl+Alt+Digit3 | ³ | Ctrl+Alt+3 | | Ctrl+Alt+3 | ctrl+alt+3 | Ctrl+Alt+3 | ctrl+alt+[Digit3] | | +| Shift+Alt+Digit3 | £ | Shift+Alt+3 | | Shift+Alt+3 | shift+alt+3 | Shift+Alt+3 | shift+alt+[Digit3] | | +| Ctrl+Shift+Alt+Digit3 | £ | Ctrl+Shift+Alt+3 | | Ctrl+Shift+Alt+3 | ctrl+shift+alt+3 | Ctrl+Shift+Alt+3 | ctrl+shift+alt+[Digit3] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Digit4 | 4 | 4 | | 4 | 4 | 4 | [Digit4] | | +| Ctrl+Digit4 | 4 | Ctrl+4 | | Ctrl+4 | ctrl+4 | Ctrl+4 | ctrl+[Digit4] | | +| Shift+Digit4 | $ | Shift+4 | | Shift+4 | shift+4 | Shift+4 | shift+[Digit4] | | +| Ctrl+Shift+Digit4 | $ | Ctrl+Shift+4 | | Ctrl+Shift+4 | ctrl+shift+4 | Ctrl+Shift+4 | ctrl+shift+[Digit4] | | +| Alt+Digit4 | 4 | Alt+4 | | Alt+4 | alt+4 | Alt+4 | alt+[Digit4] | | +| Ctrl+Alt+Digit4 | € | Ctrl+Alt+4 | | Ctrl+Alt+4 | ctrl+alt+4 | Ctrl+Alt+4 | ctrl+alt+[Digit4] | | +| Shift+Alt+Digit4 | $ | Shift+Alt+4 | | Shift+Alt+4 | shift+alt+4 | Shift+Alt+4 | shift+alt+[Digit4] | | +| Ctrl+Shift+Alt+Digit4 | ¼ | Ctrl+Shift+Alt+4 | | Ctrl+Shift+Alt+4 | ctrl+shift+alt+4 | Ctrl+Shift+Alt+4 | ctrl+shift+alt+[Digit4] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Digit5 | 5 | 5 | | 5 | 5 | 5 | [Digit5] | | +| Ctrl+Digit5 | 5 | Ctrl+5 | | Ctrl+5 | ctrl+5 | Ctrl+5 | ctrl+[Digit5] | | +| Shift+Digit5 | % | Shift+5 | | Shift+5 | shift+5 | Shift+5 | shift+[Digit5] | | +| Ctrl+Shift+Digit5 | % | Ctrl+Shift+5 | | Ctrl+Shift+5 | ctrl+shift+5 | Ctrl+Shift+5 | ctrl+shift+[Digit5] | | +| Alt+Digit5 | 5 | Alt+5 | | Alt+5 | alt+5 | Alt+5 | alt+[Digit5] | | +| Ctrl+Alt+Digit5 | ½ | Ctrl+Alt+5 | | Ctrl+Alt+5 | ctrl+alt+5 | Ctrl+Alt+5 | ctrl+alt+[Digit5] | | +| Shift+Alt+Digit5 | % | Shift+Alt+5 | | Shift+Alt+5 | shift+alt+5 | Shift+Alt+5 | shift+alt+[Digit5] | | +| Ctrl+Shift+Alt+Digit5 | ⅜ | Ctrl+Shift+Alt+5 | | Ctrl+Shift+Alt+5 | ctrl+shift+alt+5 | Ctrl+Shift+Alt+5 | ctrl+shift+alt+[Digit5] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Digit6 | 6 | 6 | | 6 | 6 | 6 | [Digit6] | | +| Ctrl+Digit6 | 6 | Ctrl+6 | | Ctrl+6 | ctrl+6 | Ctrl+6 | ctrl+[Digit6] | | +| Shift+Digit6 | ^ | Shift+6 | | Shift+6 | shift+6 | Shift+6 | shift+[Digit6] | | +| Ctrl+Shift+Digit6 | ^ | Ctrl+Shift+6 | | Ctrl+Shift+6 | ctrl+shift+6 | Ctrl+Shift+6 | ctrl+shift+[Digit6] | | +| Alt+Digit6 | 6 | Alt+6 | | Alt+6 | alt+6 | Alt+6 | alt+[Digit6] | | +| Ctrl+Alt+Digit6 | ¾ | Ctrl+Alt+6 | | Ctrl+Alt+6 | ctrl+alt+6 | Ctrl+Alt+6 | ctrl+alt+[Digit6] | | +| Shift+Alt+Digit6 | ^ | Shift+Alt+6 | | Shift+Alt+6 | shift+alt+6 | Shift+Alt+6 | shift+alt+[Digit6] | | +| Ctrl+Shift+Alt+Digit6 | ⅝ | Ctrl+Shift+Alt+6 | | Ctrl+Shift+Alt+6 | ctrl+shift+alt+6 | Ctrl+Shift+Alt+6 | ctrl+shift+alt+[Digit6] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Digit7 | 7 | 7 | | 7 | 7 | 7 | [Digit7] | | +| Ctrl+Digit7 | 7 | Ctrl+7 | | Ctrl+7 | ctrl+7 | Ctrl+7 | ctrl+[Digit7] | | +| Shift+Digit7 | & | Shift+7 | | Shift+7 | shift+7 | Shift+7 | shift+[Digit7] | | +| Ctrl+Shift+Digit7 | & | Ctrl+Shift+7 | | Ctrl+Shift+7 | ctrl+shift+7 | Ctrl+Shift+7 | ctrl+shift+[Digit7] | | +| Alt+Digit7 | 7 | Alt+7 | | Alt+7 | alt+7 | Alt+7 | alt+[Digit7] | | +| Ctrl+Alt+Digit7 | { | Ctrl+Alt+7 | | Ctrl+Alt+7 | ctrl+alt+7 | Ctrl+Alt+7 | ctrl+alt+[Digit7] | | +| | | Shift+[ | 2 | | | | | | +| Shift+Alt+Digit7 | & | Shift+Alt+7 | | Shift+Alt+7 | shift+alt+7 | Shift+Alt+7 | shift+alt+[Digit7] | | +| Ctrl+Shift+Alt+Digit7 | ⅞ | Ctrl+Shift+Alt+7 | | Ctrl+Shift+Alt+7 | ctrl+shift+alt+7 | Ctrl+Shift+Alt+7 | ctrl+shift+alt+[Digit7] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Digit8 | 8 | 8 | | 8 | 8 | 8 | [Digit8] | | +| Ctrl+Digit8 | 8 | Ctrl+8 | | Ctrl+8 | ctrl+8 | Ctrl+8 | ctrl+[Digit8] | | +| Shift+Digit8 | * | Shift+8 | | Shift+8 | shift+8 | Shift+8 | shift+[Digit8] | | +| Ctrl+Shift+Digit8 | * | Ctrl+Shift+8 | | Ctrl+Shift+8 | ctrl+shift+8 | Ctrl+Shift+8 | ctrl+shift+[Digit8] | | +| Alt+Digit8 | 8 | Alt+8 | | Alt+8 | alt+8 | Alt+8 | alt+[Digit8] | | +| Ctrl+Alt+Digit8 | [ | Ctrl+Alt+8 | | Ctrl+Alt+8 | ctrl+alt+8 | Ctrl+Alt+8 | ctrl+alt+[Digit8] | | +| | | [ | 2 | | | | | | +| Shift+Alt+Digit8 | * | Shift+Alt+8 | | Shift+Alt+8 | shift+alt+8 | Shift+Alt+8 | shift+alt+[Digit8] | | +| Ctrl+Shift+Alt+Digit8 | ™ | Ctrl+Shift+Alt+8 | | Ctrl+Shift+Alt+8 | ctrl+shift+alt+8 | Ctrl+Shift+Alt+8 | ctrl+shift+alt+[Digit8] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Digit9 | 9 | 9 | | 9 | 9 | 9 | [Digit9] | | +| Ctrl+Digit9 | 9 | Ctrl+9 | | Ctrl+9 | ctrl+9 | Ctrl+9 | ctrl+[Digit9] | | +| Shift+Digit9 | ( | Shift+9 | | Shift+9 | shift+9 | Shift+9 | shift+[Digit9] | | +| Ctrl+Shift+Digit9 | ( | Ctrl+Shift+9 | | Ctrl+Shift+9 | ctrl+shift+9 | Ctrl+Shift+9 | ctrl+shift+[Digit9] | | +| Alt+Digit9 | 9 | Alt+9 | | Alt+9 | alt+9 | Alt+9 | alt+[Digit9] | | +| Ctrl+Alt+Digit9 | ] | Ctrl+Alt+9 | | Ctrl+Alt+9 | ctrl+alt+9 | Ctrl+Alt+9 | ctrl+alt+[Digit9] | | +| | | ] | 2 | | | | | | +| Shift+Alt+Digit9 | ( | Shift+Alt+9 | | Shift+Alt+9 | shift+alt+9 | Shift+Alt+9 | shift+alt+[Digit9] | | +| Ctrl+Shift+Alt+Digit9 | ± | Ctrl+Shift+Alt+9 | | Ctrl+Shift+Alt+9 | ctrl+shift+alt+9 | Ctrl+Shift+Alt+9 | ctrl+shift+alt+[Digit9] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Digit0 | 0 | 0 | | 0 | 0 | 0 | [Digit0] | | +| Ctrl+Digit0 | 0 | Ctrl+0 | | Ctrl+0 | ctrl+0 | Ctrl+0 | ctrl+[Digit0] | | +| Shift+Digit0 | ) | Shift+0 | | Shift+0 | shift+0 | Shift+0 | shift+[Digit0] | | +| Ctrl+Shift+Digit0 | ) | Ctrl+Shift+0 | | Ctrl+Shift+0 | ctrl+shift+0 | Ctrl+Shift+0 | ctrl+shift+[Digit0] | | +| Alt+Digit0 | 0 | Alt+0 | | Alt+0 | alt+0 | Alt+0 | alt+[Digit0] | | +| Ctrl+Alt+Digit0 | } | Ctrl+Alt+0 | | Ctrl+Alt+0 | ctrl+alt+0 | Ctrl+Alt+0 | ctrl+alt+[Digit0] | | +| | | Shift+] | 2 | | | | | | +| Shift+Alt+Digit0 | ) | Shift+Alt+0 | | Shift+Alt+0 | shift+alt+0 | Shift+Alt+0 | shift+alt+[Digit0] | | +| Ctrl+Shift+Alt+Digit0 | ° | Ctrl+Shift+Alt+0 | | Ctrl+Shift+Alt+0 | ctrl+shift+alt+0 | Ctrl+Shift+Alt+0 | ctrl+shift+alt+[Digit0] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Minus | - | - | | - | - | null | [Minus] | | +| Ctrl+Minus | - | Ctrl+- | | Ctrl+- | ctrl+- | null | ctrl+[Minus] | | +| Shift+Minus | _ | Shift+- | | Shift+- | shift+- | null | shift+[Minus] | | +| Ctrl+Shift+Minus | _ | Ctrl+Shift+- | | Ctrl+Shift+- | ctrl+shift+- | null | ctrl+shift+[Minus] | | +| Alt+Minus | - | Alt+- | | Alt+- | alt+- | null | alt+[Minus] | | +| Ctrl+Alt+Minus | \ | \ | 1 | Ctrl+Alt+- | ctrl+alt+[Minus] | null | ctrl+alt+[Minus] | NO | +| Shift+Alt+Minus | _ | Shift+Alt+- | | Shift+Alt+- | shift+alt+- | null | shift+alt+[Minus] | | +| Ctrl+Shift+Alt+Minus | ¿ | Ctrl+Shift+Alt+- | | Ctrl+Shift+Alt+- | ctrl+shift+alt+- | null | ctrl+shift+alt+[Minus] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Equal | = | = | | = | = | null | [Equal] | | +| Ctrl+Equal | = | Ctrl+= | | Ctrl+= | ctrl+= | null | ctrl+[Equal] | | +| Shift+Equal | + | Shift+= | | Shift+= | shift+= | null | shift+[Equal] | | +| Ctrl+Shift+Equal | + | Ctrl+Shift+= | | Ctrl+Shift+= | ctrl+shift+= | null | ctrl+shift+[Equal] | | +| Alt+Equal | = | Alt+= | | Alt+= | alt+= | null | alt+[Equal] | | +| Ctrl+Alt+Equal | U+327 | Ctrl+Alt+= | | Ctrl+Alt+= | ctrl+alt+= | null | ctrl+alt+[Equal] | | +| Shift+Alt+Equal | + | Shift+Alt+= | | Shift+Alt+= | shift+alt+= | null | shift+alt+[Equal] | | +| Ctrl+Shift+Alt+Equal | U+328 | Ctrl+Shift+Alt+= | | Ctrl+Shift+Alt+= | ctrl+shift+alt+= | null | ctrl+shift+alt+[Equal] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| BracketLeft | [ | [ | 1 | [ | [ | null | [BracketLeft] | | +| Ctrl+BracketLeft | [ | Ctrl+[ | | Ctrl+[ | ctrl+[ | null | ctrl+[BracketLeft] | | +| Shift+BracketLeft | { | Shift+[ | 1 | Shift+[ | shift+[ | null | shift+[BracketLeft] | | +| Ctrl+Shift+BracketLeft | { | Ctrl+Shift+[ | | Ctrl+Shift+[ | ctrl+shift+[ | null | ctrl+shift+[BracketLeft] | | +| Alt+BracketLeft | [ | Alt+[ | | Alt+[ | alt+[ | null | alt+[BracketLeft] | | +| Ctrl+Alt+BracketLeft | ¨ | Ctrl+Alt+[ | | Ctrl+Alt+[ | ctrl+alt+[ | null | ctrl+alt+[BracketLeft] | | +| Shift+Alt+BracketLeft | { | Shift+Alt+[ | | Shift+Alt+[ | shift+alt+[ | null | shift+alt+[BracketLeft] | | +| Ctrl+Shift+Alt+BracketLeft | ˚ | Ctrl+Shift+Alt+[ | | Ctrl+Shift+Alt+[ | ctrl+shift+alt+[ | null | ctrl+shift+alt+[BracketLeft] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| BracketRight | ] | ] | 1 | ] | ] | null | [BracketRight] | | +| Ctrl+BracketRight | ] | Ctrl+] | | Ctrl+] | ctrl+] | null | ctrl+[BracketRight] | | +| Shift+BracketRight | } | Shift+] | 1 | Shift+] | shift+] | null | shift+[BracketRight] | | +| Ctrl+Shift+BracketRight | } | Ctrl+Shift+] | | Ctrl+Shift+] | ctrl+shift+] | null | ctrl+shift+[BracketRight] | | +| Alt+BracketRight | ] | Alt+] | | Alt+] | alt+] | null | alt+[BracketRight] | | +| Ctrl+Alt+BracketRight | ˜ | Ctrl+Alt+] | | Ctrl+Alt+] | ctrl+alt+] | null | ctrl+alt+[BracketRight] | | +| Shift+Alt+BracketRight | } | Shift+Alt+] | | Shift+Alt+] | shift+alt+] | null | shift+alt+[BracketRight] | | +| Ctrl+Shift+Alt+BracketRight | ¯ | Ctrl+Shift+Alt+] | | Ctrl+Shift+Alt+] | ctrl+shift+alt+] | null | ctrl+shift+alt+[BracketRight] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Backslash | # | | | # | [Backslash] | null | [Backslash] | NO | +| Ctrl+Backslash | # | | | Ctrl+# | ctrl+[Backslash] | null | ctrl+[Backslash] | NO | +| Shift+Backslash | ~ | Shift+` | 2 | Shift+# | shift+[Backslash] | null | shift+[Backslash] | NO | +| Ctrl+Shift+Backslash | ~ | Ctrl+Shift+` | 2 | Ctrl+Shift+# | ctrl+shift+[Backslash] | null | ctrl+shift+[Backslash] | NO | +| Alt+Backslash | # | | | Alt+# | alt+[Backslash] | null | alt+[Backslash] | NO | +| Ctrl+Alt+Backslash | ` | ` | 2 | Ctrl+Alt+# | ctrl+alt+[Backslash] | null | ctrl+alt+[Backslash] | NO | +| Shift+Alt+Backslash | ~ | Shift+Alt+` | 2 | Shift+Alt+# | shift+alt+[Backslash] | null | shift+alt+[Backslash] | NO | +| Ctrl+Shift+Alt+Backslash | ˘ | Ctrl+Shift+Alt+` | 2 | Ctrl+Shift+Alt+# | ctrl+shift+alt+[Backslash] | null | ctrl+shift+alt+[Backslash] | NO | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| IntlHash | --- | | | null | null | null | null | | +| Ctrl+IntlHash | --- | | | null | null | null | null | | +| Shift+IntlHash | --- | | | null | null | null | null | | +| Ctrl+Shift+IntlHash | --- | | | null | null | null | null | | +| Alt+IntlHash | --- | | | null | null | null | null | | +| Ctrl+Alt+IntlHash | --- | | | null | null | null | null | | +| Shift+Alt+IntlHash | --- | | | null | null | null | null | | +| Ctrl+Shift+Alt+IntlHash | --- | | | null | null | null | null | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Semicolon | ; | ; | | ; | ; | null | [Semicolon] | | +| Ctrl+Semicolon | ; | Ctrl+; | | Ctrl+; | ctrl+; | null | ctrl+[Semicolon] | | +| Shift+Semicolon | : | Shift+; | | Shift+; | shift+; | null | shift+[Semicolon] | | +| Ctrl+Shift+Semicolon | : | Ctrl+Shift+; | | Ctrl+Shift+; | ctrl+shift+; | null | ctrl+shift+[Semicolon] | | +| Alt+Semicolon | ; | Alt+; | | Alt+; | alt+; | null | alt+[Semicolon] | | +| Ctrl+Alt+Semicolon | ´ | Ctrl+Alt+; | | Ctrl+Alt+; | ctrl+alt+; | null | ctrl+alt+[Semicolon] | | +| Shift+Alt+Semicolon | : | Shift+Alt+; | | Shift+Alt+; | shift+alt+; | null | shift+alt+[Semicolon] | | +| Ctrl+Shift+Alt+Semicolon | ˝ | Ctrl+Shift+Alt+; | | Ctrl+Shift+Alt+; | ctrl+shift+alt+; | null | ctrl+shift+alt+[Semicolon] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Quote | ' | ' | | ' | ' | ' | [Quote] | | +| Ctrl+Quote | ' | Ctrl+' | | Ctrl+' | ctrl+' | Ctrl+' | ctrl+[Quote] | | +| Shift+Quote | @ | Shift+' | 1 | Shift+' | shift+' | Shift+' | shift+[Quote] | | +| Ctrl+Shift+Quote | @ | Ctrl+Shift+' | 1 | Ctrl+Shift+' | ctrl+shift+' | Ctrl+Shift+' | ctrl+shift+[Quote] | | +| Alt+Quote | ' | Alt+' | | Alt+' | alt+' | Alt+' | alt+[Quote] | | +| Ctrl+Alt+Quote | ^ | Ctrl+Alt+' | | Ctrl+Alt+' | ctrl+alt+' | Ctrl+Alt+' | ctrl+alt+[Quote] | | +| Shift+Alt+Quote | @ | Shift+Alt+' | 1 | Shift+Alt+' | shift+alt+' | Shift+Alt+' | shift+alt+[Quote] | | +| Ctrl+Shift+Alt+Quote | U+30c | Ctrl+Shift+Alt+' | 1 | Ctrl+Shift+Alt+' | ctrl+shift+alt+' | Ctrl+Shift+Alt+' | ctrl+shift+alt+[Quote] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Backquote | ` | ` | 1 | ` | ` | null | [Backquote] | | +| Ctrl+Backquote | ` | Ctrl+` | | Ctrl+` | ctrl+` | null | ctrl+[Backquote] | | +| Shift+Backquote | ¬ | Shift+` | 1 | Shift+` | shift+` | null | shift+[Backquote] | | +| Ctrl+Shift+Backquote | ¬ | Ctrl+Shift+` | 1 | Ctrl+Shift+` | ctrl+shift+` | null | ctrl+shift+[Backquote] | | +| Alt+Backquote | ` | Alt+` | | Alt+` | alt+` | null | alt+[Backquote] | | +| Ctrl+Alt+Backquote | | | Shift+\ | 1 | Ctrl+Alt+` | ctrl+alt+[Backquote] | null | ctrl+alt+[Backquote] | NO | +| Shift+Alt+Backquote | ¬ | Shift+Alt+` | 1 | Shift+Alt+` | shift+alt+` | null | shift+alt+[Backquote] | | +| Ctrl+Shift+Alt+Backquote | | | Ctrl+Shift+Alt+` | 1 | Ctrl+Shift+Alt+` | ctrl+shift+alt+` | null | ctrl+shift+alt+[Backquote] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Comma | , | , | | , | , | null | [Comma] | | +| Ctrl+Comma | , | Ctrl+, | | Ctrl+, | ctrl+, | null | ctrl+[Comma] | | +| Shift+Comma | < | Shift+, | 1 | Shift+, | shift+, | null | shift+[Comma] | | +| Ctrl+Shift+Comma | < | Ctrl+Shift+, | | Ctrl+Shift+, | ctrl+shift+, | null | ctrl+shift+[Comma] | | +| Alt+Comma | , | Alt+, | | Alt+, | alt+, | null | alt+[Comma] | | +| Ctrl+Alt+Comma | ─ | Ctrl+Alt+, | | Ctrl+Alt+, | ctrl+alt+, | null | ctrl+alt+[Comma] | | +| Shift+Alt+Comma | < | Shift+Alt+, | | Shift+Alt+, | shift+alt+, | null | shift+alt+[Comma] | | +| Ctrl+Shift+Alt+Comma | × | Ctrl+Shift+Alt+, | | Ctrl+Shift+Alt+, | ctrl+shift+alt+, | null | ctrl+shift+alt+[Comma] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Period | . | . | | . | . | null | [Period] | | +| Ctrl+Period | . | Ctrl+. | | Ctrl+. | ctrl+. | null | ctrl+[Period] | | +| Shift+Period | > | Shift+. | 1 | Shift+. | shift+. | null | shift+[Period] | | +| Ctrl+Shift+Period | > | Ctrl+Shift+. | | Ctrl+Shift+. | ctrl+shift+. | null | ctrl+shift+[Period] | | +| Alt+Period | . | Alt+. | | Alt+. | alt+. | null | alt+[Period] | | +| Ctrl+Alt+Period | · | Ctrl+Alt+. | | Ctrl+Alt+. | ctrl+alt+. | null | ctrl+alt+[Period] | | +| Shift+Alt+Period | > | Shift+Alt+. | | Shift+Alt+. | shift+alt+. | null | shift+alt+[Period] | | +| Ctrl+Shift+Alt+Period | ÷ | Ctrl+Shift+Alt+. | | Ctrl+Shift+Alt+. | ctrl+shift+alt+. | null | ctrl+shift+alt+[Period] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Slash | / | / | | / | / | null | [Slash] | | +| Ctrl+Slash | / | Ctrl+/ | | Ctrl+/ | ctrl+/ | null | ctrl+[Slash] | | +| Shift+Slash | ? | Shift+/ | | Shift+/ | shift+/ | null | shift+[Slash] | | +| Ctrl+Shift+Slash | ? | Ctrl+Shift+/ | | Ctrl+Shift+/ | ctrl+shift+/ | null | ctrl+shift+[Slash] | | +| Alt+Slash | / | Alt+/ | | Alt+/ | alt+/ | null | alt+[Slash] | | +| Ctrl+Alt+Slash | U+323 | Ctrl+Alt+/ | | Ctrl+Alt+/ | ctrl+alt+/ | null | ctrl+alt+[Slash] | | +| Shift+Alt+Slash | ? | Shift+Alt+/ | | Shift+Alt+/ | shift+alt+/ | null | shift+alt+[Slash] | | +| Ctrl+Shift+Alt+Slash | ˙ | Ctrl+Shift+Alt+/ | | Ctrl+Shift+Alt+/ | ctrl+shift+alt+/ | null | ctrl+shift+alt+[Slash] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| ArrowUp | --- | UpArrow | | UpArrow | up | Up | [ArrowUp] | | +| Ctrl+ArrowUp | --- | Ctrl+UpArrow | | Ctrl+UpArrow | ctrl+up | Ctrl+Up | ctrl+[ArrowUp] | | +| Shift+ArrowUp | --- | Shift+UpArrow | | Shift+UpArrow | shift+up | Shift+Up | shift+[ArrowUp] | | +| Ctrl+Shift+ArrowUp | --- | Ctrl+Shift+UpArrow | | Ctrl+Shift+UpArrow | ctrl+shift+up | Ctrl+Shift+Up | ctrl+shift+[ArrowUp] | | +| Alt+ArrowUp | --- | Alt+UpArrow | | Alt+UpArrow | alt+up | Alt+Up | alt+[ArrowUp] | | +| Ctrl+Alt+ArrowUp | --- | Ctrl+Alt+UpArrow | | Ctrl+Alt+UpArrow | ctrl+alt+up | Ctrl+Alt+Up | ctrl+alt+[ArrowUp] | | +| Shift+Alt+ArrowUp | --- | Shift+Alt+UpArrow | | Shift+Alt+UpArrow | shift+alt+up | Shift+Alt+Up | shift+alt+[ArrowUp] | | +| Ctrl+Shift+Alt+ArrowUp | --- | Ctrl+Shift+Alt+UpArrow | | Ctrl+Shift+Alt+UpArrow | ctrl+shift+alt+up | Ctrl+Shift+Alt+Up | ctrl+shift+alt+[ArrowUp] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| Numpad0 | --- | NumPad0 | | NumPad0 | numpad0 | null | [Numpad0] | | +| Ctrl+Numpad0 | --- | Ctrl+NumPad0 | | Ctrl+NumPad0 | ctrl+numpad0 | null | ctrl+[Numpad0] | | +| Shift+Numpad0 | --- | Shift+NumPad0 | | Shift+NumPad0 | shift+numpad0 | null | shift+[Numpad0] | | +| Ctrl+Shift+Numpad0 | --- | Ctrl+Shift+NumPad0 | | Ctrl+Shift+NumPad0 | ctrl+shift+numpad0 | null | ctrl+shift+[Numpad0] | | +| Alt+Numpad0 | --- | Alt+NumPad0 | | Alt+NumPad0 | alt+numpad0 | null | alt+[Numpad0] | | +| Ctrl+Alt+Numpad0 | --- | Ctrl+Alt+NumPad0 | | Ctrl+Alt+NumPad0 | ctrl+alt+numpad0 | null | ctrl+alt+[Numpad0] | | +| Shift+Alt+Numpad0 | --- | Shift+Alt+NumPad0 | | Shift+Alt+NumPad0 | shift+alt+numpad0 | null | shift+alt+[Numpad0] | | +| Ctrl+Shift+Alt+Numpad0 | --- | Ctrl+Shift+Alt+NumPad0 | | Ctrl+Shift+Alt+NumPad0 | ctrl+shift+alt+numpad0 | null | ctrl+shift+alt+[Numpad0] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| IntlBackslash | \ | \ | 2 | \ | \ | null | [IntlBackslash] | | +| Ctrl+IntlBackslash | \ | Ctrl+\ | | Ctrl+\ | ctrl+\ | null | ctrl+[IntlBackslash] | | +| Shift+IntlBackslash | | | Shift+\ | 2 | Shift+\ | shift+\ | null | shift+[IntlBackslash] | | +| Ctrl+Shift+IntlBackslash | | | Ctrl+Shift+\ | | Ctrl+Shift+\ | ctrl+shift+\ | null | ctrl+shift+[IntlBackslash] | | +| Alt+IntlBackslash | \ | Alt+\ | | Alt+\ | alt+\ | null | alt+[IntlBackslash] | | +| Ctrl+Alt+IntlBackslash | | | Ctrl+Alt+\ | | Ctrl+Alt+\ | ctrl+alt+\ | null | ctrl+alt+[IntlBackslash] | | +| Shift+Alt+IntlBackslash | | | Shift+Alt+\ | | Shift+Alt+\ | shift+alt+\ | null | shift+alt+[IntlBackslash] | | +| Ctrl+Shift+Alt+IntlBackslash | ¦ | Ctrl+Shift+Alt+\ | | Ctrl+Shift+Alt+\ | ctrl+shift+alt+\ | null | ctrl+shift+alt+[IntlBackslash] | | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| IntlRo | --- | | | null | [IntlRo] | null | [IntlRo] | NO | +| Ctrl+IntlRo | --- | | | null | ctrl+[IntlRo] | null | ctrl+[IntlRo] | NO | +| Shift+IntlRo | --- | | | null | shift+[IntlRo] | null | shift+[IntlRo] | NO | +| Ctrl+Shift+IntlRo | --- | | | null | ctrl+shift+[IntlRo] | null | ctrl+shift+[IntlRo] | NO | +| Alt+IntlRo | --- | | | null | alt+[IntlRo] | null | alt+[IntlRo] | NO | +| Ctrl+Alt+IntlRo | --- | | | null | ctrl+alt+[IntlRo] | null | ctrl+alt+[IntlRo] | NO | +| Shift+Alt+IntlRo | --- | | | null | shift+alt+[IntlRo] | null | shift+alt+[IntlRo] | NO | +| Ctrl+Shift+Alt+IntlRo | --- | | | null | ctrl+shift+alt+[IntlRo] | null | ctrl+shift+alt+[IntlRo] | NO | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +| IntlYen | --- | | | null | [IntlYen] | null | [IntlYen] | NO | +| Ctrl+IntlYen | --- | | | null | ctrl+[IntlYen] | null | ctrl+[IntlYen] | NO | +| Shift+IntlYen | --- | | | null | shift+[IntlYen] | null | shift+[IntlYen] | NO | +| Ctrl+Shift+IntlYen | --- | | | null | ctrl+shift+[IntlYen] | null | ctrl+shift+[IntlYen] | NO | +| Alt+IntlYen | --- | | | null | alt+[IntlYen] | null | alt+[IntlYen] | NO | +| Ctrl+Alt+IntlYen | --- | | | null | ctrl+alt+[IntlYen] | null | ctrl+alt+[IntlYen] | NO | +| Shift+Alt+IntlYen | --- | | | null | shift+alt+[IntlYen] | null | shift+alt+[IntlYen] | NO | +| Ctrl+Shift+Alt+IntlYen | --- | | | null | ctrl+shift+alt+[IntlYen] | null | ctrl+shift+alt+[IntlYen] | NO | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts b/src/vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts index 524ef34f3a6a2..8c6cc2a864de4 100644 --- a/src/vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts +++ b/src/vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts @@ -1419,6 +1419,45 @@ suite('keyboardMapper - LINUX ru', () => { }); }); +suite('keyboardMapper - LINUX en_uk', () => { + + let mapper: MacLinuxKeyboardMapper; + + suiteSetup((done) => { + createKeyboardMapper(false, 'linux_en_uk', OperatingSystem.Linux).then((_mapper) => { + mapper = _mapper; + done(); + }, done); + }); + + test('mapping', (done) => { + assertMapping(WRITE_FILE_IF_DIFFERENT, mapper, 'linux_en_uk.txt', done); + }); + + test('issue #24522: resolveKeyboardEvent Ctrl+Alt+[Minus]', () => { + assertResolveKeyboardEvent( + mapper, + { + ctrlKey: true, + shiftKey: false, + altKey: true, + metaKey: false, + keyCode: -1, + code: 'Minus' + }, + { + label: 'Ctrl+Alt+-', + ariaLabel: 'Control+Alt+-', + electronAccelerator: null, + userSettingsLabel: 'ctrl+alt+[Minus]', + isWYSIWYG: false, + isChord: false, + dispatchParts: ['ctrl+alt+[Minus]', null], + } + ); + }); +}); + function _assertKeybindingTranslation(mapper: MacLinuxKeyboardMapper, OS: OperatingSystem, kb: number, _expected: string | string[]): void { let expected: string[]; if (typeof _expected === 'string') { From 5397df989dbfaa410aa21c040efe157175a52842 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 3 May 2017 16:41:34 +0200 Subject: [PATCH 0151/2747] Debt: Remove dead code --- .../contentWidgets/contentWidgets.ts | 13 ++----- .../viewParts/decorations/decorations.ts | 9 ----- .../editorScrollbar/editorScrollbar.ts | 36 ------------------- .../viewParts/glyphMargin/glyphMargin.ts | 9 ----- .../viewParts/lineNumbers/lineNumbers.ts | 9 ----- .../linesDecorations/linesDecorations.ts | 9 ----- .../marginDecorations/marginDecorations.ts | 9 ----- .../editor/browser/viewParts/rulers/rulers.ts | 2 +- .../viewParts/selections/selections.ts | 6 ---- .../viewParts/viewCursors/viewCursors.ts | 2 +- .../common/viewModel/viewEventHandler.ts | 2 +- 11 files changed, 5 insertions(+), 101 deletions(-) diff --git a/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts b/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts index 3a2a8ae1fe1bb..8d57aa5bce03f 100644 --- a/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts +++ b/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts @@ -106,7 +106,7 @@ export class ViewContentWidgets extends ViewPart { if (this._contentWidth !== this._context.configuration.editor.layoutInfo.contentWidth) { this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; - // update the maxWidth on widgets nodes, such that `onReadAfterForcedLayout` + // update the maxWidth on widgets nodes, such that `prepareRender` // below can read out the adjusted width/height of widgets let keys = Object.keys(this._widgets); for (let i = 0, len = keys.length; i < len; i++) { @@ -122,15 +122,9 @@ export class ViewContentWidgets extends ViewPart { } return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { - return false; - } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - return false; - } public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { // true for inline decorations that can end up relayouting text - return true;//e.inlineDecorationsChanged; + return true; } public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { return true; @@ -144,9 +138,6 @@ export class ViewContentWidgets extends ViewPart { public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { - return false; - } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return true; } diff --git a/src/vs/editor/browser/viewParts/decorations/decorations.ts b/src/vs/editor/browser/viewParts/decorations/decorations.ts index fc067376be2be..19122062c67ec 100644 --- a/src/vs/editor/browser/viewParts/decorations/decorations.ts +++ b/src/vs/editor/browser/viewParts/decorations/decorations.ts @@ -43,12 +43,6 @@ export class DecorationsOverlay extends DynamicViewOverlay { } return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { - return false; - } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - return false; - } public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { return true; } @@ -64,9 +58,6 @@ export class DecorationsOverlay extends DynamicViewOverlay { public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { - return false; - } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged || e.scrollWidthChanged; } diff --git a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts index e5235c6eb2e93..dce83c0f62ef6 100644 --- a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts +++ b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts @@ -142,45 +142,9 @@ export class EditorScrollbar extends ViewPart { } return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { - return false; - } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - return false; - } - public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { - return false; - } - public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { - return false; - } - public onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean { - return false; - } - public onLineMappingChanged(e: viewEvents.ViewLineMappingChangedEvent): boolean { - return false; - } - public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { - return false; - } - public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { - return false; - } - public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { - return false; - } - public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { - return false; - } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return true; } - public onTokensChanged(e: viewEvents.ViewTokensChangedEvent): boolean { - return false; - } - public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { - return false; - } // --- end event handlers diff --git a/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts b/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts index e717800496a22..0e37f17d7a7f9 100644 --- a/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts +++ b/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts @@ -119,12 +119,6 @@ export class GlyphMarginOverlay extends DedupOverlay { } return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { - return false; - } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - return false; - } public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { return true; } @@ -140,9 +134,6 @@ export class GlyphMarginOverlay extends DedupOverlay { public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { - return false; - } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged; } diff --git a/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts b/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts index 677b42f4b53b4..673bdb0c4216d 100644 --- a/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts +++ b/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts @@ -69,12 +69,6 @@ export class LineNumbersOverlay extends DynamicViewOverlay { } return false; } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - return false; - } - public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { - return false; - } public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { return true; } @@ -87,9 +81,6 @@ export class LineNumbersOverlay extends DynamicViewOverlay { public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { - return false; - } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged; } diff --git a/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.ts b/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.ts index a5e31040b9d85..d9492ecd0fcff 100644 --- a/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.ts +++ b/src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.ts @@ -44,12 +44,6 @@ export class LinesDecorationsOverlay extends DedupOverlay { } return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { - return false; - } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - return false; - } public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { return true; } @@ -65,9 +59,6 @@ export class LinesDecorationsOverlay extends DedupOverlay { public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { - return false; - } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged; } diff --git a/src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.ts b/src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.ts index 07a6ea886598c..e1880451dd70b 100644 --- a/src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.ts +++ b/src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.ts @@ -34,12 +34,6 @@ export class MarginViewLineDecorationsOverlay extends DedupOverlay { public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { - return false; - } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - return false; - } public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { return true; } @@ -55,9 +49,6 @@ export class MarginViewLineDecorationsOverlay extends DedupOverlay { public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { - return false; - } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged; } diff --git a/src/vs/editor/browser/viewParts/rulers/rulers.ts b/src/vs/editor/browser/viewParts/rulers/rulers.ts index 6d4f6247bffae..9479cc74bdbc4 100644 --- a/src/vs/editor/browser/viewParts/rulers/rulers.ts +++ b/src/vs/editor/browser/viewParts/rulers/rulers.ts @@ -46,7 +46,7 @@ export class Rulers extends ViewPart { return false; } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { - return super.onScrollChanged(e) || e.scrollHeightChanged; + return e.scrollHeightChanged; } // --- end event handlers diff --git a/src/vs/editor/browser/viewParts/selections/selections.ts b/src/vs/editor/browser/viewParts/selections/selections.ts index 38ee5869922dc..fc8ac41ed927c 100644 --- a/src/vs/editor/browser/viewParts/selections/selections.ts +++ b/src/vs/editor/browser/viewParts/selections/selections.ts @@ -110,9 +110,6 @@ export class SelectionsOverlay extends DynamicViewOverlay { } return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { - return false; - } public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { this._selections = [e.selection]; this._selections = this._selections.concat(e.secondarySelections); @@ -134,9 +131,6 @@ export class SelectionsOverlay extends DynamicViewOverlay { public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { return true; } - public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { - return false; - } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return e.scrollTopChanged; } diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts index e9c9ea9fe7874..7d8185da71cba 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts @@ -138,7 +138,7 @@ export class ViewCursors extends ViewPart { } public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { // true for inline decorations that can end up relayouting text - return true;//e.inlineDecorationsChanged; + return true; } public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { this._primaryCursor.onFlushed(); diff --git a/src/vs/editor/common/viewModel/viewEventHandler.ts b/src/vs/editor/common/viewModel/viewEventHandler.ts index ff0ec8c10d9d9..4a76918e20bc8 100644 --- a/src/vs/editor/common/viewModel/viewEventHandler.ts +++ b/src/vs/editor/common/viewModel/viewEventHandler.ts @@ -70,7 +70,7 @@ export class ViewEventHandler extends Disposable { public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return false; } - public onScrollRequest(e: viewEvents.ViewScrollRequestEvent): boolean { // TODO@cursor + public onScrollRequest(e: viewEvents.ViewScrollRequestEvent): boolean { return false; } public onTokensChanged(e: viewEvents.ViewTokensChangedEvent): boolean { From 23cafd02483c2aaa373c4172b0b754d138b6ec08 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 3 May 2017 17:00:39 +0200 Subject: [PATCH 0152/2747] Move text area related code to /browser/ --- .../controller/input/textAreaWrapper.ts | 2 +- .../browser/controller/keyboardHandler.ts | 4 +- .../controller/textAreaHandler.ts | 4 +- .../controller/textAreaState.ts | 0 src/vs/editor/browser/view/viewImpl.ts | 6 +- src/vs/editor/common/viewLayout/viewLayout.ts | 4 +- .../editor/common/viewModel/viewModelImpl.ts | 2 +- .../contrib/clipboard/browser/clipboard.ts | 2 +- .../test/browser/controller/imeTester.ts | 4 +- .../controller/textAreaState.test.ts | 90 +++++++++++++++++- .../test/common/mocks/mockTextAreaWrapper.ts | 94 ------------------- 11 files changed, 102 insertions(+), 110 deletions(-) rename src/vs/editor/{common => browser}/controller/textAreaHandler.ts (99%) rename src/vs/editor/{common => browser}/controller/textAreaState.ts (100%) rename src/vs/editor/test/{common => browser}/controller/textAreaState.test.ts (83%) delete mode 100644 src/vs/editor/test/common/mocks/mockTextAreaWrapper.ts diff --git a/src/vs/editor/browser/controller/input/textAreaWrapper.ts b/src/vs/editor/browser/controller/input/textAreaWrapper.ts index ab895c1831f60..538fcaac34d01 100644 --- a/src/vs/editor/browser/controller/input/textAreaWrapper.ts +++ b/src/vs/editor/browser/controller/input/textAreaWrapper.ts @@ -9,7 +9,7 @@ import { Disposable } from 'vs/base/common/lifecycle'; import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; -import { IClipboardEvent, ICompositionEvent, IKeyboardEventWrapper, ITextAreaWrapper } from 'vs/editor/common/controller/textAreaState'; +import { IClipboardEvent, ICompositionEvent, IKeyboardEventWrapper, ITextAreaWrapper } from 'vs/editor/browser/controller/textAreaState'; import { FastDomNode } from 'vs/base/browser/fastDomNode'; class ClipboardEventWrapper implements IClipboardEvent { diff --git a/src/vs/editor/browser/controller/keyboardHandler.ts b/src/vs/editor/browser/controller/keyboardHandler.ts index e138406fa13a5..4c9f52ecdb44b 100644 --- a/src/vs/editor/browser/controller/keyboardHandler.ts +++ b/src/vs/editor/browser/controller/keyboardHandler.ts @@ -8,8 +8,8 @@ import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { GlobalScreenReaderNVDA } from 'vs/editor/common/config/commonEditorConfig'; -import { TextAreaHandler } from 'vs/editor/common/controller/textAreaHandler'; -import { TextAreaStrategy } from 'vs/editor/common/controller/textAreaState'; +import { TextAreaHandler } from 'vs/editor/browser/controller/textAreaHandler'; +import { TextAreaStrategy } from 'vs/editor/browser/controller/textAreaState'; import { Range } from 'vs/editor/common/core/range'; import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler'; import { Configuration } from 'vs/editor/browser/config/configuration'; diff --git a/src/vs/editor/common/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts similarity index 99% rename from src/vs/editor/common/controller/textAreaHandler.ts rename to src/vs/editor/browser/controller/textAreaHandler.ts index f448f6a6d87f6..394e67bee86c7 100644 --- a/src/vs/editor/common/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -9,7 +9,7 @@ import * as strings from 'vs/base/common/strings'; import Event, { Emitter } from 'vs/base/common/event'; import { KeyCode } from 'vs/base/common/keyCodes'; import { Disposable } from 'vs/base/common/lifecycle'; -import { IClipboardEvent, ICompositionEvent, IKeyboardEventWrapper, ISimpleModel, ITextAreaWrapper, ITypeData, TextAreaState, TextAreaStrategy, createTextAreaState } from 'vs/editor/common/controller/textAreaState'; +import { IClipboardEvent, ICompositionEvent, IKeyboardEventWrapper, ISimpleModel, ITextAreaWrapper, ITypeData, TextAreaState, TextAreaStrategy, createTextAreaState } from 'vs/editor/browser/controller/textAreaState'; import { Range } from 'vs/editor/common/core/range'; export const CopyOptions = { @@ -383,4 +383,4 @@ export class TextAreaHandler extends Disposable { this.lastCopiedValueIsFromEmptySelection = (selections.length === 1 && selections[0].isEmpty()); } } -} \ No newline at end of file +} diff --git a/src/vs/editor/common/controller/textAreaState.ts b/src/vs/editor/browser/controller/textAreaState.ts similarity index 100% rename from src/vs/editor/common/controller/textAreaState.ts rename to src/vs/editor/browser/controller/textAreaState.ts diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index 82d1a1914bbfb..b84b23ff234af 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -20,7 +20,7 @@ import * as editorBrowser from 'vs/editor/browser/editorBrowser'; import { ViewController, ExecCoreEditorCommandFunc } from 'vs/editor/browser/view/viewController'; import { ViewEventDispatcher } from 'vs/editor/common/view/viewEventDispatcher'; import { ContentViewOverlays, MarginViewOverlays } from 'vs/editor/browser/view/viewOverlays'; -import { LayoutProvider } from 'vs/editor/common/viewLayout/viewLayout'; +import { ViewLayout } from 'vs/editor/common/viewLayout/viewLayout'; import { ViewContentWidgets } from 'vs/editor/browser/viewParts/contentWidgets/contentWidgets'; import { CurrentLineHighlightOverlay } from 'vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight'; import { CurrentLineMarginHighlightOverlay } from 'vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight'; @@ -66,7 +66,7 @@ export class View extends ViewEventHandler { private eventDispatcher: ViewEventDispatcher; - private layoutProvider: LayoutProvider; + private layoutProvider: ViewLayout; private _scrollbar: EditorScrollbar; public _context: ViewContext; @@ -121,7 +121,7 @@ export class View extends ViewEventHandler { // - scrolling (i.e. viewport / full size) & co. // - whitespaces (a.k.a. view zones) management & co. // - line heights updating & co. - this.layoutProvider = new LayoutProvider(configuration, model.getLineCount(), this.eventDispatcher); + this.layoutProvider = new ViewLayout(configuration, model.getLineCount(), this.eventDispatcher); // The view context is passed on to most classes (basically to reduce param. counts in ctors) this._context = new ViewContext(configuration, model, this.eventDispatcher); diff --git a/src/vs/editor/common/viewLayout/viewLayout.ts b/src/vs/editor/common/viewLayout/viewLayout.ts index dc1daf701f2f2..f7bf44a4bdc7e 100644 --- a/src/vs/editor/common/viewLayout/viewLayout.ts +++ b/src/vs/editor/common/viewLayout/viewLayout.ts @@ -14,7 +14,7 @@ import { ViewEventDispatcher } from 'vs/editor/common/view/viewEventDispatcher'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; -export class LayoutProvider extends Disposable implements IViewLayout { +export class ViewLayout extends Disposable implements IViewLayout { static LINES_HORIZONTAL_EXTRA_PX = 30; @@ -129,7 +129,7 @@ export class LayoutProvider extends Disposable implements IViewLayout { private _computeScrollWidth(maxLineWidth: number, viewportWidth: number): number { let isViewportWrapping = this._configuration.editor.wrappingInfo.isViewportWrapping; if (!isViewportWrapping) { - return Math.max(maxLineWidth + LayoutProvider.LINES_HORIZONTAL_EXTRA_PX, viewportWidth); + return Math.max(maxLineWidth + ViewLayout.LINES_HORIZONTAL_EXTRA_PX, viewportWidth); } return Math.max(maxLineWidth, viewportWidth); } diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index f9f313c6f3945..9a2122971a93d 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -568,7 +568,7 @@ export class ViewModel extends Disposable implements IViewModel { if (range.isEmpty()) { if (enableEmptySelectionClipboard) { let modelLineNumber = this.coordinatesConverter.convertViewPositionToModelPosition(new Position(range.startLineNumber, 1)).lineNumber; - return this.getModelLineContent(modelLineNumber) + newLineCharacter; + return this.model.getLineContent(modelLineNumber) + newLineCharacter; } else { return ''; } diff --git a/src/vs/editor/contrib/clipboard/browser/clipboard.ts b/src/vs/editor/contrib/clipboard/browser/clipboard.ts index 2dd0f763ede74..4c6f0692faee3 100644 --- a/src/vs/editor/contrib/clipboard/browser/clipboard.ts +++ b/src/vs/editor/contrib/clipboard/browser/clipboard.ts @@ -13,7 +13,7 @@ import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { editorAction, IActionOptions, EditorAction } from 'vs/editor/common/editorCommonExtensions'; -import { CopyOptions } from 'vs/editor/common/controller/textAreaHandler'; +import { CopyOptions } from 'vs/editor/browser/controller/textAreaHandler'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; const CLIPBOARD_CONTEXT_MENU_GROUP = '9_cutcopypaste'; diff --git a/src/vs/editor/test/browser/controller/imeTester.ts b/src/vs/editor/test/browser/controller/imeTester.ts index 456f6f0a8fddb..09d862654eeea 100644 --- a/src/vs/editor/test/browser/controller/imeTester.ts +++ b/src/vs/editor/test/browser/controller/imeTester.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { TextAreaHandler } from 'vs/editor/common/controller/textAreaHandler'; +import { TextAreaHandler } from 'vs/editor/browser/controller/textAreaHandler'; import * as browser from 'vs/base/browser/browser'; -import { TextAreaStrategy, ISimpleModel } from 'vs/editor/common/controller/textAreaState'; +import { TextAreaStrategy, ISimpleModel } from 'vs/editor/browser/controller/textAreaState'; import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { TextAreaWrapper } from 'vs/editor/browser/controller/input/textAreaWrapper'; diff --git a/src/vs/editor/test/common/controller/textAreaState.test.ts b/src/vs/editor/test/browser/controller/textAreaState.test.ts similarity index 83% rename from src/vs/editor/test/common/controller/textAreaState.test.ts rename to src/vs/editor/test/browser/controller/textAreaState.test.ts index 6da10786e1f45..6cdbeb4f50b41 100644 --- a/src/vs/editor/test/common/controller/textAreaState.test.ts +++ b/src/vs/editor/test/browser/controller/textAreaState.test.ts @@ -5,11 +5,97 @@ 'use strict'; import * as assert from 'assert'; -import { IENarratorTextAreaState, ISimpleModel, TextAreaState } from 'vs/editor/common/controller/textAreaState'; +import { IENarratorTextAreaState, ISimpleModel, TextAreaState, IClipboardEvent, ICompositionEvent, IKeyboardEventWrapper, ITextAreaWrapper } from 'vs/editor/browser/controller/textAreaState'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; -import { MockTextAreaWrapper } from 'vs/editor/test/common/mocks/mockTextAreaWrapper'; +import Event, { Emitter } from 'vs/base/common/event'; +import { Disposable } from 'vs/base/common/lifecycle'; + +export class MockTextAreaWrapper extends Disposable implements ITextAreaWrapper { + + private _onKeyDown = this._register(new Emitter()); + public onKeyDown: Event = this._onKeyDown.event; + + private _onKeyUp = this._register(new Emitter()); + public onKeyUp: Event = this._onKeyUp.event; + + private _onKeyPress = this._register(new Emitter()); + public onKeyPress: Event = this._onKeyPress.event; + + private _onCompositionStart = this._register(new Emitter()); + public onCompositionStart: Event = this._onCompositionStart.event; + + private _onCompositionUpdate = this._register(new Emitter()); + public onCompositionUpdate: Event = this._onCompositionUpdate.event; + + private _onCompositionEnd = this._register(new Emitter()); + public onCompositionEnd: Event = this._onCompositionEnd.event; + + private _onInput = this._register(new Emitter()); + public onInput: Event = this._onInput.event; + + private _onCut = this._register(new Emitter()); + public onCut: Event = this._onCut.event; + + private _onCopy = this._register(new Emitter()); + public onCopy: Event = this._onCopy.event; + + private _onPaste = this._register(new Emitter()); + public onPaste: Event = this._onPaste.event; + + public _value: string; + public _selectionStart: number; + public _selectionEnd: number; + public _isInOverwriteMode: boolean; + + constructor() { + super(); + this._value = ''; + this._selectionStart = 0; + this._selectionEnd = 0; + this._isInOverwriteMode = false; + } + + public getValue(): string { + return this._value; + } + + public setValue(reason: string, value: string): void { + this._value = value; + this._selectionStart = this._value.length; + this._selectionEnd = this._value.length; + } + + public getSelectionStart(): number { + return this._selectionStart; + } + + public getSelectionEnd(): number { + return this._selectionEnd; + } + + public setSelectionRange(selectionStart: number, selectionEnd: number): void { + if (selectionStart < 0) { + selectionStart = 0; + } + if (selectionStart > this._value.length) { + selectionStart = this._value.length; + } + if (selectionEnd < 0) { + selectionEnd = 0; + } + if (selectionEnd > this._value.length) { + selectionEnd = this._value.length; + } + this._selectionStart = selectionStart; + this._selectionEnd = selectionEnd; + } + + public isInOverwriteMode(): boolean { + return this._isInOverwriteMode; + } +} suite('TextAreaState', () => { diff --git a/src/vs/editor/test/common/mocks/mockTextAreaWrapper.ts b/src/vs/editor/test/common/mocks/mockTextAreaWrapper.ts deleted file mode 100644 index 77d242da63c53..0000000000000 --- a/src/vs/editor/test/common/mocks/mockTextAreaWrapper.ts +++ /dev/null @@ -1,94 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import Event, { Emitter } from 'vs/base/common/event'; -import { Disposable } from 'vs/base/common/lifecycle'; -import { IClipboardEvent, ICompositionEvent, IKeyboardEventWrapper, ITextAreaWrapper } from 'vs/editor/common/controller/textAreaState'; - -export class MockTextAreaWrapper extends Disposable implements ITextAreaWrapper { - - private _onKeyDown = this._register(new Emitter()); - public onKeyDown: Event = this._onKeyDown.event; - - private _onKeyUp = this._register(new Emitter()); - public onKeyUp: Event = this._onKeyUp.event; - - private _onKeyPress = this._register(new Emitter()); - public onKeyPress: Event = this._onKeyPress.event; - - private _onCompositionStart = this._register(new Emitter()); - public onCompositionStart: Event = this._onCompositionStart.event; - - private _onCompositionUpdate = this._register(new Emitter()); - public onCompositionUpdate: Event = this._onCompositionUpdate.event; - - private _onCompositionEnd = this._register(new Emitter()); - public onCompositionEnd: Event = this._onCompositionEnd.event; - - private _onInput = this._register(new Emitter()); - public onInput: Event = this._onInput.event; - - private _onCut = this._register(new Emitter()); - public onCut: Event = this._onCut.event; - - private _onCopy = this._register(new Emitter()); - public onCopy: Event = this._onCopy.event; - - private _onPaste = this._register(new Emitter()); - public onPaste: Event = this._onPaste.event; - - public _value: string; - public _selectionStart: number; - public _selectionEnd: number; - public _isInOverwriteMode: boolean; - - constructor() { - super(); - this._value = ''; - this._selectionStart = 0; - this._selectionEnd = 0; - this._isInOverwriteMode = false; - } - - public getValue(): string { - return this._value; - } - - public setValue(reason: string, value: string): void { - this._value = value; - this._selectionStart = this._value.length; - this._selectionEnd = this._value.length; - } - - public getSelectionStart(): number { - return this._selectionStart; - } - - public getSelectionEnd(): number { - return this._selectionEnd; - } - - public setSelectionRange(selectionStart: number, selectionEnd: number): void { - if (selectionStart < 0) { - selectionStart = 0; - } - if (selectionStart > this._value.length) { - selectionStart = this._value.length; - } - if (selectionEnd < 0) { - selectionEnd = 0; - } - if (selectionEnd > this._value.length) { - selectionEnd = this._value.length; - } - this._selectionStart = selectionStart; - this._selectionEnd = selectionEnd; - } - - public isInOverwriteMode(): boolean { - return this._isInOverwriteMode; - } -} From b4afac4373163c29142cf2fe2eb606f1a8110190 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 3 May 2017 17:05:36 +0200 Subject: [PATCH 0153/2747] [folding] Allow to specify if decorator should hide in collapsed region. Fixes #4812 --- .../editor/common/config/commonEditorConfig.ts | 6 ++++++ src/vs/editor/common/config/defaultConfig.ts | 1 + src/vs/editor/common/config/editorOptions.ts | 9 +++++++++ .../editor/contrib/folding/browser/folding.css | 16 ++++++++++------ src/vs/editor/contrib/folding/browser/folding.ts | 16 ++++++++++++++++ src/vs/monaco.d.ts | 6 ++++++ 6 files changed, 48 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index c8655516e9fea..4a5ce1d8dadb4 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -329,6 +329,7 @@ class InternalEditorOptionsHelper { occurrencesHighlight: toBoolean(opts.occurrencesHighlight), codeLens: opts.referenceInfos && opts.codeLens, folding: toBoolean(opts.folding), + hideFoldIcons: toBoolean(opts.hideFoldIcons), matchBrackets: toBoolean(opts.matchBrackets), }); @@ -932,6 +933,11 @@ const editorConfiguration: IConfigurationNode = { 'default': DefaultConfig.editor.folding, 'description': nls.localize('folding', "Controls whether the editor has code folding enabled") }, + 'editor.hideFoldIcons': { + 'type': 'boolean', + 'default': DefaultConfig.editor.hideFoldIcons, + 'description': nls.localize('hideFoldIcons', "Controls whether the fold icons on the gutter are automatically hidden.") + }, 'editor.matchBrackets': { 'type': 'boolean', 'default': DefaultConfig.editor.matchBrackets, diff --git a/src/vs/editor/common/config/defaultConfig.ts b/src/vs/editor/common/config/defaultConfig.ts index 7bd8bc3ea12ff..b7224baf580c2 100644 --- a/src/vs/editor/common/config/defaultConfig.ts +++ b/src/vs/editor/common/config/defaultConfig.ts @@ -106,6 +106,7 @@ class ConfigClass implements IConfiguration { codeLens: true, referenceInfos: true, folding: true, + hideFoldIcons: true, renderWhitespace: 'none', renderControlCharacters: false, renderIndentGuides: false, diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index e8bee72579b05..cb25845017ae8 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -420,6 +420,11 @@ export interface IEditorOptions { * Defaults to true in vscode and to false in monaco-editor. */ folding?: boolean; + /** + * Enable automatic hiding of non-collapsed fold icons in the gutter. + * Defaults to true. + */ + hideFoldIcons?: boolean; /** * Enable highlighting of matching brackets. * Defaults to true. @@ -1017,6 +1022,7 @@ export class EditorContribOptions { readonly occurrencesHighlight: boolean; readonly codeLens: boolean; readonly folding: boolean; + readonly hideFoldIcons: boolean; readonly matchBrackets: boolean; /** @@ -1044,6 +1050,7 @@ export class EditorContribOptions { occurrencesHighlight: boolean; codeLens: boolean; folding: boolean; + hideFoldIcons: boolean; matchBrackets: boolean; }) { this.selectionClipboard = Boolean(source.selectionClipboard); @@ -1067,6 +1074,7 @@ export class EditorContribOptions { this.occurrencesHighlight = Boolean(source.occurrencesHighlight); this.codeLens = Boolean(source.codeLens); this.folding = Boolean(source.folding); + this.hideFoldIcons = Boolean(source.hideFoldIcons); this.matchBrackets = Boolean(source.matchBrackets); } @@ -1096,6 +1104,7 @@ export class EditorContribOptions { && this.occurrencesHighlight === other.occurrencesHighlight && this.codeLens === other.codeLens && this.folding === other.folding + && this.hideFoldIcons === other.hideFoldIcons && this.matchBrackets === other.matchBrackets ); } diff --git a/src/vs/editor/contrib/folding/browser/folding.css b/src/vs/editor/contrib/folding/browser/folding.css index 14c6c882bd1d7..fbc0462fe351e 100644 --- a/src/vs/editor/contrib/folding/browser/folding.css +++ b/src/vs/editor/contrib/folding/browser/folding.css @@ -14,8 +14,17 @@ transition: opacity 0.5s; } -.monaco-editor .margin-view-overlays:hover .folding { +.monaco-editor .margin-view-overlays .folding { background-image: url('arrow-expand.svg'); +} + +.monaco-editor.hc-black .margin-view-overlays .folding, +.monaco-editor.vs-dark .margin-view-overlays .folding { + background-image: url('arrow-expand-dark.svg'); +} + +.monaco-editor .margin-view-overlays:hover .folding, +.monaco-editor.alwaysShowFoldIcons .margin-view-overlays .folding { opacity: 1; } @@ -24,11 +33,6 @@ opacity: 1; } -.monaco-editor.hc-black .margin-view-overlays:hover .folding, -.monaco-editor.vs-dark .margin-view-overlays:hover .folding { - background-image: url('arrow-expand-dark.svg'); -} - .monaco-editor.hc-black .margin-view-overlays .folding.collapsed, .monaco-editor.vs-dark .margin-view-overlays .folding.collapsed { background-image: url('arrow-collapse-dark.svg'); diff --git a/src/vs/editor/contrib/folding/browser/folding.ts b/src/vs/editor/contrib/folding/browser/folding.ts index 613db084fc24f..24fe018b8de11 100644 --- a/src/vs/editor/contrib/folding/browser/folding.ts +++ b/src/vs/editor/contrib/folding/browser/folding.ts @@ -8,6 +8,7 @@ import * as nls from 'vs/nls'; import * as types from 'vs/base/common/types'; +import * as dom from 'vs/base/browser/dom'; import { RunOnceScheduler } from 'vs/base/common/async'; import { KeyCode, KeyMod, KeyChord } from 'vs/base/common/keyCodes'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; @@ -35,6 +36,7 @@ export class FoldingController implements IFoldingController { private editor: ICodeEditor; private _isEnabled: boolean; + private _hideFoldIcons: boolean; private globalToDispose: IDisposable[]; private computeToken: number; @@ -47,6 +49,7 @@ export class FoldingController implements IFoldingController { constructor(editor: ICodeEditor) { this.editor = editor; this._isEnabled = this.editor.getConfiguration().contribInfo.folding; + this._hideFoldIcons = this.editor.getConfiguration().contribInfo.hideFoldIcons; this.globalToDispose = []; this.localToDispose = []; @@ -60,6 +63,11 @@ export class FoldingController implements IFoldingController { if (oldIsEnabled !== this._isEnabled) { this.onModelChanged(); } + let oldHideFoldIcons = this._hideFoldIcons; + this._hideFoldIcons = this.editor.getConfiguration().contribInfo.hideFoldIcons; + if (oldHideFoldIcons !== this._hideFoldIcons) { + this.updateHideFoldIconClass(); + } })); this.onModelChanged(); @@ -74,6 +82,13 @@ export class FoldingController implements IFoldingController { this.globalToDispose = dispose(this.globalToDispose); } + private updateHideFoldIconClass(): void { + let domNode = this.editor.getDomNode(); + if (domNode) { + dom.toggleClass(domNode, 'alwaysShowFoldIcons', this._hideFoldIcons === false); + } + } + /** * Store view state. */ @@ -190,6 +205,7 @@ export class FoldingController implements IFoldingController { private onModelChanged(): void { this.cleanState(); + this.updateHideFoldIconClass(); let model = this.editor.getModel(); if (!this._isEnabled || !model) { diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index aba5742243fe3..328340dc7eeef 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2955,6 +2955,11 @@ declare module monaco.editor { * Defaults to true in vscode and to false in monaco-editor. */ folding?: boolean; + /** + * Enable automatic hiding of non-collapsed fold icons in the gutter + * Defaults to true + */ + hideFoldIcons?: boolean; /** * Enable highlighting of matching brackets. * Defaults to true. @@ -3215,6 +3220,7 @@ declare module monaco.editor { readonly occurrencesHighlight: boolean; readonly codeLens: boolean; readonly folding: boolean; + readonly hideFoldIcons: boolean; readonly matchBrackets: boolean; } From 5f87c7b13ebc611c54db83af5994fc97218e34bd Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 3 May 2017 17:45:50 +0200 Subject: [PATCH 0154/2747] Got rid of fs.stat for validation. Amended regex to be more precise with resource schemes. --- .../parts/debug/browser/linkDetector.ts | 89 ++++++++----------- 1 file changed, 35 insertions(+), 54 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/linkDetector.ts b/src/vs/workbench/parts/debug/browser/linkDetector.ts index 53fdaf1d23145..a94baa7b26c2c 100644 --- a/src/vs/workbench/parts/debug/browser/linkDetector.ts +++ b/src/vs/workbench/parts/debug/browser/linkDetector.ts @@ -3,6 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import strings = require('vs/base/common/strings'); import uri from 'vs/base/common/uri'; import { isMacintosh } from 'vs/base/common/platform'; import * as errors from 'vs/base/common/errors'; @@ -10,7 +11,6 @@ import { IMouseEvent, StandardMouseEvent } from 'vs/base/browser/mouseEvent'; import * as nls from 'vs/nls'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import fs = require('fs'); export class LinkDetector { private static FILE_LOCATION_PATTERNS: RegExp[] = [ @@ -20,7 +20,7 @@ export class LinkDetector { // group 3: line number // group 4: column number // eg: at Context. (c:\Users\someone\Desktop\mocha-runner\test\test.js:26:11) - /(?![\(])(?:file:\/\/)?((?:([a-zA-Z]:)|[^\(\)<>\'\"\[\]:\s]+)(?:[\\/][^\(\)<>\'\"\[\]:]*)?):(\d+)(?::(\d+))?/g + /(?![\(])(?:file:\/\/)?((?:([a-zA-Z]+:)|[^\(\)<>\'\"\[\]:\s]+)(?:[\\/][^\(\)<>\'\"\[\]:]*)?\.[a-zA-Z]+[0-9]*):(\d+)(?::(\d+))?/g ]; constructor( @@ -41,48 +41,43 @@ export class LinkDetector { while (match !== null) { let resource: uri = null; try { - resource = match && (match[2] ? uri.file(match[1]) : this.contextService.toResource(match[1])); + resource = (match && !strings.startsWith(match[0], 'http')) && (match[2] ? uri.file(match[1]) : this.contextService.toResource(match[1])); } catch (e) { } - if (resource) { - if (!linkContainer) { - linkContainer = document.createElement('span'); - } - - const valid = this.fileExists(resource.fsPath); - if (valid) { - let textBeforeLink = text.substring(lastMatchIndex, match.index); - if (textBeforeLink) { - let span = document.createElement('span'); - span.textContent = textBeforeLink; - linkContainer.appendChild(span); - } - - const link = document.createElement('a'); - link.textContent = text.substr(match.index, match[0].length); - link.title = isMacintosh ? nls.localize('fileLinkMac', "Click to follow (Cmd + click opens to the side)") : nls.localize('fileLink', "Click to follow (Ctrl + click opens to the side)"); - linkContainer.appendChild(link); - const line = Number(match[3]); - const column = match[4] ? Number(match[4]) : undefined; - link.onclick = (e) => this.onLinkClick(new StandardMouseEvent(e), resource, line, column); - } else { - let plainText = document.createElement('span'); - plainText.textContent = text.substring(lastMatchIndex, match.index + match[0].length); - linkContainer.appendChild(plainText); - } - - lastMatchIndex = pattern.lastIndex; - const currentMatch = match; + if (!resource) { match = pattern.exec(text); + continue; + } + if (!linkContainer) { + linkContainer = document.createElement('span'); + } - // Append last string part if no more link matches - if (!match) { - let textAfterLink = text.substr(currentMatch.index + currentMatch[0].length); - if (textAfterLink) { - let span = document.createElement('span'); - span.textContent = textAfterLink; - linkContainer.appendChild(span); - } + let textBeforeLink = text.substring(lastMatchIndex, match.index); + if (textBeforeLink) { + let span = document.createElement('span'); + span.textContent = textBeforeLink; + linkContainer.appendChild(span); + } + + const link = document.createElement('a'); + link.textContent = text.substr(match.index, match[0].length); + link.title = isMacintosh ? nls.localize('fileLinkMac', "Click to follow (Cmd + click opens to the side)") : nls.localize('fileLink', "Click to follow (Ctrl + click opens to the side)"); + linkContainer.appendChild(link); + const line = Number(match[3]); + const column = match[4] ? Number(match[4]) : undefined; + link.onclick = (e) => this.onLinkClick(new StandardMouseEvent(e), resource, line, column); + + lastMatchIndex = pattern.lastIndex; + const currentMatch = match; + match = pattern.exec(text); + + // Append last string part if no more link matches + if (!match) { + let textAfterLink = text.substr(currentMatch.index + currentMatch[0].length); + if (textAfterLink) { + let span = document.createElement('span'); + span.textContent = textAfterLink; + linkContainer.appendChild(span); } } } @@ -109,18 +104,4 @@ export class LinkDetector { } }, event.ctrlKey || event.metaKey).done(null, errors.onUnexpectedError); } - - private fileExists(path: string): boolean { - let stat; - try { - stat = fs.statSync(path); - } catch (e) { - return false; - } - - if (stat.isFile()) { - return true; - } - return false; - } } From 636e3b3cb2fd92ab37ac6abd9d71429a3631fb1d Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 3 May 2017 09:56:55 -0700 Subject: [PATCH 0155/2747] Fix a potential hang when tsserver exits improperly (#25808) **Bug** If the TSServer restarts with ongoing requests queued, the new server instance may not properly startup. in the logs, this looks like a series of cancelled request followed by a restart message, and then more cancelled requests of the same series **fix** I believe the root cause of this is that the request queue is not properly flushed and the request sequence numbers are not properly reset when starting the new server instance. Fixes #25807 --- extensions/typescript/src/typescriptServiceClient.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 66e83da01853a..71e7e2adf160e 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -153,7 +153,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private lastError: Error | null; private reader: Reader; private sequenceNumber: number; - private exitRequested: boolean; private firstStart: number; private lastStart: number; private numberRestarts: number; @@ -187,7 +186,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.servicePromise = null; this.lastError = null; this.sequenceNumber = 0; - this.exitRequested = false; this.firstStart = Date.now(); this.numberRestarts = 0; @@ -522,6 +520,11 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.globalState.update(doGlobalVersionCheckKey, true); } + this.sequenceNumber = 0; + this.requestQueue = []; + this.pendingResponses = 0; + this.lastError = null; + try { let options: electron.IForkOptions = { execArgv: [] // [`--debug-brk=5859`] @@ -851,7 +854,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.callbacks[parseInt(key)].e(new Error('Service died.')); }); this.callbacks = Object.create(null); - if (!this.exitRequested && restart) { + if (restart) { let diff = Date.now() - this.lastStart; this.numberRestarts++; let startService = true; From a11885872a0f47fdd85ef34b5b16395773f0cf87 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 3 May 2017 17:42:52 +0200 Subject: [PATCH 0156/2747] Debt: Simplify text area handling code --- .../controller/input/textAreaWrapper.ts | 119 ++++++------------ .../browser/controller/keyboardHandler.ts | 43 +++---- .../browser/controller/textAreaHandler.ts | 71 +++++------ .../browser/controller/textAreaState.ts | 43 +------ .../test/browser/controller/imeTester.ts | 6 +- .../browser/controller/textAreaState.test.ts | 35 +----- 6 files changed, 102 insertions(+), 215 deletions(-) diff --git a/src/vs/editor/browser/controller/input/textAreaWrapper.ts b/src/vs/editor/browser/controller/input/textAreaWrapper.ts index 538fcaac34d01..886c7ae28e6ec 100644 --- a/src/vs/editor/browser/controller/input/textAreaWrapper.ts +++ b/src/vs/editor/browser/controller/input/textAreaWrapper.ts @@ -9,10 +9,9 @@ import { Disposable } from 'vs/base/common/lifecycle'; import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; -import { IClipboardEvent, ICompositionEvent, IKeyboardEventWrapper, ITextAreaWrapper } from 'vs/editor/browser/controller/textAreaState'; import { FastDomNode } from 'vs/base/browser/fastDomNode'; -class ClipboardEventWrapper implements IClipboardEvent { +export class ClipboardEventWrapper { private _event: ClipboardEvent; @@ -64,76 +63,48 @@ class ClipboardEventWrapper implements IClipboardEvent { } } -class KeyboardEventWrapper implements IKeyboardEventWrapper { +export class TextAreaWrapper extends Disposable { - public _actual: IKeyboardEvent; + public readonly actual: FastDomNode; - constructor(actual: IKeyboardEvent) { - this._actual = actual; - } - - public equals(keybinding: number): boolean { - return this._actual.equals(keybinding); - } - - public preventDefault(): void { - this._actual.preventDefault(); - } - - public stopPropagation(): void { - this._actual.stopPropagation(); - } - - public isDefaultPrevented(): boolean { - if (this._actual.browserEvent) { - return this._actual.browserEvent.defaultPrevented; - } - return false; - } -} - -export class TextAreaWrapper extends Disposable implements ITextAreaWrapper { - - private _textArea: FastDomNode; + private _onKeyDown = this._register(new Emitter()); + public onKeyDown: Event = this._onKeyDown.event; - private _onKeyDown = this._register(new Emitter()); - public onKeyDown: Event = this._onKeyDown.event; + private _onKeyUp = this._register(new Emitter()); + public onKeyUp: Event = this._onKeyUp.event; - private _onKeyUp = this._register(new Emitter()); - public onKeyUp: Event = this._onKeyUp.event; + private _onKeyPress = this._register(new Emitter()); + public onKeyPress: Event = this._onKeyPress.event; - private _onKeyPress = this._register(new Emitter()); - public onKeyPress: Event = this._onKeyPress.event; + private _onCompositionStart = this._register(new Emitter()); + public onCompositionStart: Event = this._onCompositionStart.event; - private _onCompositionStart = this._register(new Emitter()); - public onCompositionStart: Event = this._onCompositionStart.event; + private _onCompositionUpdate = this._register(new Emitter()); + public onCompositionUpdate: Event = this._onCompositionUpdate.event; - private _onCompositionUpdate = this._register(new Emitter()); - public onCompositionUpdate: Event = this._onCompositionUpdate.event; - - private _onCompositionEnd = this._register(new Emitter()); - public onCompositionEnd: Event = this._onCompositionEnd.event; + private _onCompositionEnd = this._register(new Emitter()); + public onCompositionEnd: Event = this._onCompositionEnd.event; private _onInput = this._register(new Emitter()); public onInput: Event = this._onInput.event; - private _onCut = this._register(new Emitter()); - public onCut: Event = this._onCut.event; + private _onCut = this._register(new Emitter()); + public onCut: Event = this._onCut.event; - private _onCopy = this._register(new Emitter()); - public onCopy: Event = this._onCopy.event; + private _onCopy = this._register(new Emitter()); + public onCopy: Event = this._onCopy.event; - private _onPaste = this._register(new Emitter()); - public onPaste: Event = this._onPaste.event; + private _onPaste = this._register(new Emitter()); + public onPaste: Event = this._onPaste.event; constructor(_textArea: FastDomNode) { super(); - this._textArea = _textArea; + this.actual = _textArea; - const textArea = this._textArea.domNode; - this._register(dom.addStandardDisposableListener(textArea, 'keydown', (e) => this._onKeyDown.fire(new KeyboardEventWrapper(e)))); - this._register(dom.addStandardDisposableListener(textArea, 'keyup', (e) => this._onKeyUp.fire(new KeyboardEventWrapper(e)))); - this._register(dom.addStandardDisposableListener(textArea, 'keypress', (e) => this._onKeyPress.fire(new KeyboardEventWrapper(e)))); + const textArea = this.actual.domNode; + this._register(dom.addStandardDisposableListener(textArea, 'keydown', (e) => this._onKeyDown.fire(e))); + this._register(dom.addStandardDisposableListener(textArea, 'keyup', (e) => this._onKeyUp.fire(e))); + this._register(dom.addStandardDisposableListener(textArea, 'keypress', (e) => this._onKeyPress.fire(e))); this._register(dom.addDisposableListener(textArea, 'compositionstart', (e) => this._onCompositionStart.fire(e))); this._register(dom.addDisposableListener(textArea, 'compositionupdate', (e) => this._onCompositionUpdate.fire(e))); this._register(dom.addDisposableListener(textArea, 'compositionend', (e) => this._onCompositionEnd.fire(e))); @@ -143,52 +114,44 @@ export class TextAreaWrapper extends Disposable implements ITextAreaWrapper { this._register(dom.addDisposableListener(textArea, 'paste', (e: ClipboardEvent) => this._onPaste.fire(new ClipboardEventWrapper(e)))); } - public get actual(): FastDomNode { - return this._textArea; - } - public getValue(): string { // console.log('current value: ' + this._textArea.value); - const textArea = this._textArea.domNode; + const textArea = this.actual.domNode; return textArea.value; } public setValue(reason: string, value: string): void { // console.log('reason: ' + reason + ', current value: ' + this._textArea.value + ' => new value: ' + value); - const textArea = this._textArea.domNode; + const textArea = this.actual.domNode; textArea.value = value; } public getSelectionStart(): number { - const textArea = this._textArea.domNode; + const textArea = this.actual.domNode; return textArea.selectionStart; } public getSelectionEnd(): number { - const textArea = this._textArea.domNode; + const textArea = this.actual.domNode; return textArea.selectionEnd; } public setSelectionRange(selectionStart: number, selectionEnd: number): void { - const textArea = this._textArea.domNode; + const textArea = this.actual.domNode; const activeElement = document.activeElement; if (activeElement === textArea) { textArea.setSelectionRange(selectionStart, selectionEnd); } else { - this._setSelectionRangeJumpy(selectionStart, selectionEnd); - } - } - - private _setSelectionRangeJumpy(selectionStart: number, selectionEnd: number): void { - const textArea = this._textArea.domNode; - try { - let scrollState = dom.saveParentsScrollTop(textArea); - textArea.focus(); - textArea.setSelectionRange(selectionStart, selectionEnd); - dom.restoreParentsScrollTop(textArea, scrollState); - } catch (e) { - // Sometimes IE throws when setting selection (e.g. textarea is off-DOM) - console.log('an error has been thrown!'); + // If the focus is outside the textarea, browsers will try really hard to reveal the textarea. + // Here, we try to undo the browser's desperate reveal. + try { + const scrollState = dom.saveParentsScrollTop(textArea); + textArea.focus(); + textArea.setSelectionRange(selectionStart, selectionEnd); + dom.restoreParentsScrollTop(textArea, scrollState); + } catch (e) { + // Sometimes IE throws when setting selection (e.g. textarea is off-DOM) + } } } diff --git a/src/vs/editor/browser/controller/keyboardHandler.ts b/src/vs/editor/browser/controller/keyboardHandler.ts index 4c9f52ecdb44b..c1b61ce4af0d3 100644 --- a/src/vs/editor/browser/controller/keyboardHandler.ts +++ b/src/vs/editor/browser/controller/keyboardHandler.ts @@ -6,7 +6,6 @@ import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; -import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { GlobalScreenReaderNVDA } from 'vs/editor/common/config/commonEditorConfig'; import { TextAreaHandler } from 'vs/editor/browser/controller/textAreaHandler'; import { TextAreaStrategy } from 'vs/editor/browser/controller/textAreaState'; @@ -15,7 +14,6 @@ import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler'; import { Configuration } from 'vs/editor/browser/config/configuration'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { HorizontalRange } from 'vs/editor/common/view/renderingContext'; -import { TextAreaWrapper } from 'vs/editor/browser/controller/input/textAreaWrapper'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { FastDomNode } from 'vs/base/browser/fastDomNode'; import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; @@ -44,7 +42,7 @@ export class KeyboardHandler extends ViewEventHandler { private _context: ViewContext; private viewController: ViewController; private viewHelper: IKeyboardHandlerHelper; - private textArea: TextAreaWrapper; + private textArea: FastDomNode; private textAreaHandler: TextAreaHandler; private contentLeft: number; @@ -59,8 +57,8 @@ export class KeyboardHandler extends ViewEventHandler { this._context = context; this.viewController = viewController; - this.textArea = new TextAreaWrapper(viewHelper.textArea); - Configuration.applyFontInfo(this.textArea.actual, this._context.configuration.editor.fontInfo); + this.textArea = viewHelper.textArea; + Configuration.applyFontInfo(this.textArea, this._context.configuration.editor.fontInfo); this.viewHelper = viewHelper; this.visiblePosition = null; @@ -69,10 +67,10 @@ export class KeyboardHandler extends ViewEventHandler { this.scrollLeft = 0; this.scrollTop = 0; - this.textAreaHandler = new TextAreaHandler(browser, this._getStrategy(), this.textArea, this._context.model); + this.textAreaHandler = new TextAreaHandler(this._getStrategy(), this.textArea, this._context.model); - this._register(this.textAreaHandler.onKeyDown((e) => this.viewController.emitKeyDown(e._actual))); - this._register(this.textAreaHandler.onKeyUp((e) => this.viewController.emitKeyUp(e._actual))); + this._register(this.textAreaHandler.onKeyDown((e) => this.viewController.emitKeyDown(e))); + this._register(this.textAreaHandler.onKeyUp((e) => this.viewController.emitKeyUp(e))); this._register(this.textAreaHandler.onPaste((e) => this.viewController.paste('keyboard', e.text, e.pasteOnNewLine))); this._register(this.textAreaHandler.onCut((e) => this.viewController.cut('keyboard'))); this._register(this.textAreaHandler.onType((e) => { @@ -100,12 +98,12 @@ export class KeyboardHandler extends ViewEventHandler { this.viewHelper.getVerticalOffsetForLineNumber(lineNumber), visibleRange.left ); - this.textArea.actual.setTop(this.visiblePosition.top - this.scrollTop); - this.textArea.actual.setLeft(this.contentLeft + this.visiblePosition.left - this.scrollLeft); + this.textArea.setTop(this.visiblePosition.top - this.scrollTop); + this.textArea.setLeft(this.contentLeft + this.visiblePosition.left - this.scrollLeft); } // Show the textarea - this.textArea.actual.setHeight(this._context.configuration.editor.lineHeight); + this.textArea.setHeight(this._context.configuration.editor.lineHeight); this.viewHelper.viewDomNode.addClassName('ime-input'); this.viewController.compositionStart('keyboard'); @@ -115,30 +113,30 @@ export class KeyboardHandler extends ViewEventHandler { if (browser.isEdgeOrIE) { // Due to isEdgeOrIE (where the textarea was not cleared initially) // we cannot assume the text consists only of the composited text - this.textArea.actual.setWidth(0); + this.textArea.setWidth(0); } else { // adjust width by its size let canvasElem = document.createElement('canvas'); let context = canvasElem.getContext('2d'); - let cs = dom.getComputedStyle(this.textArea.actual.domNode); + let cs = dom.getComputedStyle(this.textArea.domNode); if (browser.isFirefox) { // computedStyle.font is empty in Firefox... context.font = `${cs.fontStyle} ${cs.fontVariant} ${cs.fontWeight} ${cs.fontStretch} ${cs.fontSize} / ${cs.lineHeight} ${cs.fontFamily}`; let metrics = context.measureText(e.data); - this.textArea.actual.setWidth(metrics.width + 2); // +2 for Japanese... + this.textArea.setWidth(metrics.width + 2); // +2 for Japanese... } else { context.font = cs.font; let metrics = context.measureText(e.data); - this.textArea.actual.setWidth(metrics.width); + this.textArea.setWidth(metrics.width); } } })); this._register(this.textAreaHandler.onCompositionEnd((e) => { - this.textArea.actual.unsetHeight(); - this.textArea.actual.unsetWidth(); - this.textArea.actual.setLeft(0); - this.textArea.actual.setTop(0); + this.textArea.unsetHeight(); + this.textArea.unsetWidth(); + this.textArea.setLeft(0); + this.textArea.setTop(0); this.viewHelper.viewDomNode.removeClassName('ime-input'); this.visiblePosition = null; @@ -156,7 +154,6 @@ export class KeyboardHandler extends ViewEventHandler { public dispose(): void { this._context.removeEventHandler(this); this.textAreaHandler.dispose(); - this.textArea.dispose(); super.dispose(); } @@ -179,7 +176,7 @@ export class KeyboardHandler extends ViewEventHandler { public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { // Give textarea same font size & line height as editor, for the IME case (when the textarea is visible) if (e.fontInfo) { - Configuration.applyFontInfo(this.textArea.actual, this._context.configuration.editor.fontInfo); + Configuration.applyFontInfo(this.textArea, this._context.configuration.editor.fontInfo); } if (e.viewInfo.experimentalScreenReader) { this.textAreaHandler.setStrategy(this._getStrategy()); @@ -206,8 +203,8 @@ export class KeyboardHandler extends ViewEventHandler { this.scrollLeft = e.scrollLeft; this.scrollTop = e.scrollTop; if (this.visiblePosition) { - this.textArea.actual.setTop(this.visiblePosition.top - this.scrollTop); - this.textArea.actual.setLeft(this.contentLeft + this.visiblePosition.left - this.scrollLeft); + this.textArea.setTop(this.visiblePosition.top - this.scrollTop); + this.textArea.setLeft(this.contentLeft + this.visiblePosition.left - this.scrollLeft); } return false; } diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index 394e67bee86c7..7dbd21c82b122 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -9,8 +9,17 @@ import * as strings from 'vs/base/common/strings'; import Event, { Emitter } from 'vs/base/common/event'; import { KeyCode } from 'vs/base/common/keyCodes'; import { Disposable } from 'vs/base/common/lifecycle'; -import { IClipboardEvent, ICompositionEvent, IKeyboardEventWrapper, ISimpleModel, ITextAreaWrapper, ITypeData, TextAreaState, TextAreaStrategy, createTextAreaState } from 'vs/editor/browser/controller/textAreaState'; +import { ISimpleModel, ITypeData, TextAreaState, TextAreaStrategy, createTextAreaState } from 'vs/editor/browser/controller/textAreaState'; import { Range } from 'vs/editor/common/core/range'; +import * as browser from 'vs/base/browser/browser'; +import { ClipboardEventWrapper, TextAreaWrapper } from "vs/editor/browser/controller/input/textAreaWrapper"; +import { IKeyboardEvent } from "vs/base/browser/keyboardEvent"; +import { FastDomNode } from "vs/base/browser/fastDomNode"; + +export interface ICompositionEvent { + data: string; + locale: string; +} export const CopyOptions = { forceCopyWithSyntaxHighlighting: false @@ -21,14 +30,6 @@ const enum ReadFromTextArea { Paste } -export interface IBrowser { - isIPad: boolean; - isChrome: boolean; - isEdgeOrIE: boolean; - isFirefox: boolean; - enableEmptySelectionClipboard: boolean; -} - export interface IPasteData { text: string; pasteOnNewLine: boolean; @@ -48,11 +49,11 @@ const isChromev55_v56 = ( export class TextAreaHandler extends Disposable { - private _onKeyDown = this._register(new Emitter()); - public onKeyDown: Event = this._onKeyDown.event; + private _onKeyDown = this._register(new Emitter()); + public onKeyDown: Event = this._onKeyDown.event; - private _onKeyUp = this._register(new Emitter()); - public onKeyUp: Event = this._onKeyUp.event; + private _onKeyUp = this._register(new Emitter()); + public onKeyUp: Event = this._onKeyUp.event; private _onCut = this._register(new Emitter()); public onCut: Event = this._onCut.event; @@ -72,8 +73,7 @@ export class TextAreaHandler extends Disposable { private _onCompositionEnd = this._register(new Emitter()); public onCompositionEnd: Event = this._onCompositionEnd.event; - private Browser: IBrowser; - private textArea: ITextAreaWrapper; + private textArea: TextAreaWrapper; private model: ISimpleModel; private selection: Range; @@ -82,8 +82,6 @@ export class TextAreaHandler extends Disposable { private asyncTriggerCut: RunOnceScheduler; - private lastCompositionEndTime: number; - private textAreaState: TextAreaState; private textareaIsShownAtCursor: boolean; @@ -92,16 +90,15 @@ export class TextAreaHandler extends Disposable { private _nextCommand: ReadFromTextArea; - constructor(Browser: IBrowser, strategy: TextAreaStrategy, textArea: ITextAreaWrapper, model: ISimpleModel) { + constructor(strategy: TextAreaStrategy, textArea: FastDomNode, model: ISimpleModel) { super(); - this.Browser = Browser; - this.textArea = textArea; + this.textArea = this._register(new TextAreaWrapper(textArea)); this.model = model; this.selection = new Range(1, 1, 1, 1); this.selections = [new Range(1, 1, 1, 1)]; this._nextCommand = ReadFromTextArea.Type; - this.asyncTriggerCut = new RunOnceScheduler(() => this._onCut.fire(), 0); + this.asyncTriggerCut = this._register(new RunOnceScheduler(() => this._onCut.fire(), 0)); this.lastCopiedValue = null; this.lastCopiedValueIsFromEmptySelection = false; @@ -109,8 +106,6 @@ export class TextAreaHandler extends Disposable { this.hasFocus = false; - this.lastCompositionEndTime = 0; - this._register(this.textArea.onKeyDown((e) => this._onKeyDownHandler(e))); this._register(this.textArea.onKeyUp((e) => this._onKeyUp.fire(e))); this._register(this.textArea.onKeyPress((e) => this._onKeyPressHandler(e))); @@ -127,7 +122,7 @@ export class TextAreaHandler extends Disposable { this.textareaIsShownAtCursor = true; // In IE we cannot set .value when handling 'compositionstart' because the entire composition will get canceled. - if (!this.Browser.isEdgeOrIE) { + if (!browser.isEdgeOrIE) { this.setTextAreaState('compositionstart', this.textAreaState.toEmpty(), false); } @@ -148,7 +143,7 @@ export class TextAreaHandler extends Disposable { return; } - if (Browser.isEdgeOrIE && e.locale === 'ja') { + if (browser.isEdgeOrIE && e.locale === 'ja') { // https://github.com/Microsoft/monaco-editor/issues/339 // Multi-part Japanese compositions reset cursor in Edge/IE, Chinese and Korean IME don't have this issue. // The reason that we can't use this path for all CJK IME is IE and Edge behave differently when handling Korean IME, @@ -188,7 +183,7 @@ export class TextAreaHandler extends Disposable { this._register(this.textArea.onCompositionEnd((e) => { // console.log('onCompositionEnd: ' + e.data); - if (Browser.isEdgeOrIE && e.locale === 'ja') { + if (browser.isEdgeOrIE && e.locale === 'ja') { // https://github.com/Microsoft/monaco-editor/issues/339 this.textAreaState = this.textAreaState.fromTextArea(this.textArea); let typeInput = this.textAreaState.deduceInput(); @@ -202,11 +197,10 @@ export class TextAreaHandler extends Disposable { // Due to isEdgeOrIE (where the textarea was not cleared initially) and isChrome (the textarea is not updated correctly when composition ends) // we cannot assume the text at the end consists only of the composited text - if (Browser.isEdgeOrIE || Browser.isChrome) { + if (browser.isEdgeOrIE || browser.isChrome) { this.textAreaState = this.textAreaState.fromTextArea(this.textArea); } - this.lastCompositionEndTime = (new Date()).getTime(); if (!this.textareaIsShownAtCursor) { return; } @@ -264,7 +258,6 @@ export class TextAreaHandler extends Disposable { } public dispose(): void { - this.asyncTriggerCut.dispose(); super.dispose(); } @@ -302,7 +295,7 @@ export class TextAreaHandler extends Disposable { this.textAreaState = textAreaState; } - private _onKeyDownHandler(e: IKeyboardEventWrapper): void { + private _onKeyDownHandler(e: IKeyboardEvent): void { if (this.textareaIsShownAtCursor && e.equals(KeyCode.KEY_IN_COMPOSITION)) { // Stop propagation for keyDown events if the IME is processing key input e.stopPropagation(); @@ -316,7 +309,7 @@ export class TextAreaHandler extends Disposable { this._onKeyDown.fire(e); } - private _onKeyPressHandler(e: IKeyboardEventWrapper): void { + private _onKeyPressHandler(e: IKeyboardEvent): void { if (!this.hasFocus) { // Sometimes, when doing Alt-Tab, in FF, a 'keypress' is sent before a 'focus' return; @@ -331,7 +324,7 @@ export class TextAreaHandler extends Disposable { } let pasteOnNewLine = false; - if (this.Browser.enableEmptySelectionClipboard) { + if (browser.enableEmptySelectionClipboard) { pasteOnNewLine = (txt === this.lastCopiedValue && this.lastCopiedValueIsFromEmptySelection); } this._onPaste.fire({ @@ -347,7 +340,7 @@ export class TextAreaHandler extends Disposable { private _writePlaceholderAndSelectTextArea(reason: string, forceFocus: boolean): void { if (!this.textareaIsShownAtCursor) { // Do not write to the textarea if it is visible. - if (this.Browser.isIPad) { + if (browser.isIPad) { // Do not place anything in the textarea for the iPad this.setTextAreaState(reason, this.textAreaState.toEmpty(), forceFocus); } else { @@ -358,20 +351,20 @@ export class TextAreaHandler extends Disposable { // ------------- Clipboard operations - private _ensureClipboardGetsEditorSelection(e: IClipboardEvent): void { - let whatToCopy = this.model.getPlainTextToCopy(this.selections, this.Browser.enableEmptySelectionClipboard); + private _ensureClipboardGetsEditorSelection(e: ClipboardEventWrapper): void { + let whatToCopy = this.model.getPlainTextToCopy(this.selections, browser.enableEmptySelectionClipboard); if (e.canUseTextData()) { let whatHTMLToCopy: string = null; - if (!this.Browser.isEdgeOrIE && (whatToCopy.length < 65536 || CopyOptions.forceCopyWithSyntaxHighlighting)) { - whatHTMLToCopy = this.model.getHTMLToCopy(this.selections, this.Browser.enableEmptySelectionClipboard); + if (!browser.isEdgeOrIE && (whatToCopy.length < 65536 || CopyOptions.forceCopyWithSyntaxHighlighting)) { + whatHTMLToCopy = this.model.getHTMLToCopy(this.selections, browser.enableEmptySelectionClipboard); } e.setTextData(whatToCopy, whatHTMLToCopy); } else { this.setTextAreaState('copy or cut', this.textAreaState.fromText(whatToCopy), false); } - if (this.Browser.enableEmptySelectionClipboard) { - if (this.Browser.isFirefox) { + if (browser.enableEmptySelectionClipboard) { + if (browser.isFirefox) { // When writing "LINE\r\n" to the clipboard and then pasting, // Firefox pastes "LINE\n", so let's work around this quirk this.lastCopiedValue = whatToCopy.replace(/\r\n/g, '\n'); diff --git a/src/vs/editor/browser/controller/textAreaState.ts b/src/vs/editor/browser/controller/textAreaState.ts index 1090e2a10dc4e..8f2500c4761ae 100644 --- a/src/vs/editor/browser/controller/textAreaState.ts +++ b/src/vs/editor/browser/controller/textAreaState.ts @@ -4,44 +4,13 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import Event from 'vs/base/common/event'; import { commonPrefixLength, commonSuffixLength } from 'vs/base/common/strings'; import { Range } from 'vs/editor/common/core/range'; import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; import { Position } from 'vs/editor/common/core/position'; import { Constants } from 'vs/editor/common/core/uint'; -export interface IClipboardEvent { - canUseTextData(): boolean; - setTextData(text: string, richText: string): void; - getTextData(): string; -} - -export interface ICompositionEvent { - data: string; - locale: string; -} - -export interface IKeyboardEventWrapper { - _actual: any; - equals(keybinding: number): boolean; - preventDefault(): void; - stopPropagation(): void; - isDefaultPrevented(): boolean; -} - -export interface ITextAreaWrapper { - onKeyDown: Event; - onKeyUp: Event; - onKeyPress: Event; - onCompositionStart: Event; - onCompositionUpdate: Event; - onCompositionEnd: Event; - onInput: Event; - onCut: Event; - onCopy: Event; - onPaste: Event; - +export interface ISimpleTextAreaWrapper { getValue(): string; setValue(reason: string, value: string): void; getSelectionStart(): number; @@ -113,7 +82,7 @@ export abstract class TextAreaState { public abstract equals(other: TextAreaState): boolean; - public abstract fromTextArea(textArea: ITextAreaWrapper): TextAreaState; + public abstract fromTextArea(textArea: ISimpleTextAreaWrapper): TextAreaState; public abstract fromEditorSelection(model: ISimpleModel, selection: Range); @@ -144,7 +113,7 @@ export abstract class TextAreaState { return this.value; } - public applyToTextArea(reason: string, textArea: ITextAreaWrapper, select: boolean): void { + public applyToTextArea(reason: string, textArea: ISimpleTextAreaWrapper, select: boolean): void { // console.log(Date.now() + ': applyToTextArea ' + reason + ': ' + this.toString()); if (textArea.getValue() !== this.value) { textArea.setValue(reason, this.value); @@ -274,7 +243,7 @@ export class IENarratorTextAreaState extends TextAreaState { return false; } - public fromTextArea(textArea: ITextAreaWrapper): TextAreaState { + public fromTextArea(textArea: ISimpleTextAreaWrapper): TextAreaState { return new IENarratorTextAreaState(this, textArea.getValue(), textArea.getSelectionStart(), textArea.getSelectionEnd(), textArea.isInOverwriteMode(), this.selectionToken); } @@ -375,7 +344,7 @@ export class NVDAPagedTextAreaState extends TextAreaState { return false; } - public fromTextArea(textArea: ITextAreaWrapper): TextAreaState { + public fromTextArea(textArea: ISimpleTextAreaWrapper): TextAreaState { return new NVDAPagedTextAreaState(this, textArea.getValue(), textArea.getSelectionStart(), textArea.getSelectionEnd(), textArea.isInOverwriteMode()); } @@ -484,7 +453,7 @@ export class NVDAFullTextAreaState extends TextAreaState { return false; } - public fromTextArea(textArea: ITextAreaWrapper): TextAreaState { + public fromTextArea(textArea: ISimpleTextAreaWrapper): TextAreaState { return new NVDAFullTextAreaState(this, textArea.getValue(), textArea.getSelectionStart(), textArea.getSelectionEnd(), textArea.isInOverwriteMode()); } diff --git a/src/vs/editor/test/browser/controller/imeTester.ts b/src/vs/editor/test/browser/controller/imeTester.ts index 09d862654eeea..faaa003cc129e 100644 --- a/src/vs/editor/test/browser/controller/imeTester.ts +++ b/src/vs/editor/test/browser/controller/imeTester.ts @@ -5,11 +5,9 @@ 'use strict'; import { TextAreaHandler } from 'vs/editor/browser/controller/textAreaHandler'; -import * as browser from 'vs/base/browser/browser'; import { TextAreaStrategy, ISimpleModel } from 'vs/editor/browser/controller/textAreaState'; import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { TextAreaWrapper } from 'vs/editor/browser/controller/input/textAreaWrapper'; import { Position } from 'vs/editor/common/core/position'; import { createFastDomNode } from 'vs/base/browser/fastDomNode'; @@ -101,11 +99,9 @@ function doCreateTest(strategy: TextAreaStrategy, description: string, inputStr: input.setAttribute('cols', '40'); container.appendChild(input); - let textAreaWrapper = new TextAreaWrapper(createFastDomNode(input)); - let model = new SingleLineTestModel('some text'); - let handler = new TextAreaHandler(browser, strategy, textAreaWrapper, model); + let handler = new TextAreaHandler(strategy, createFastDomNode(input), model); input.onfocus = () => { handler.setHasFocus(true); diff --git a/src/vs/editor/test/browser/controller/textAreaState.test.ts b/src/vs/editor/test/browser/controller/textAreaState.test.ts index 6cdbeb4f50b41..ed1a3b4f71f4a 100644 --- a/src/vs/editor/test/browser/controller/textAreaState.test.ts +++ b/src/vs/editor/test/browser/controller/textAreaState.test.ts @@ -5,44 +5,13 @@ 'use strict'; import * as assert from 'assert'; -import { IENarratorTextAreaState, ISimpleModel, TextAreaState, IClipboardEvent, ICompositionEvent, IKeyboardEventWrapper, ITextAreaWrapper } from 'vs/editor/browser/controller/textAreaState'; +import { IENarratorTextAreaState, ISimpleModel, TextAreaState, ISimpleTextAreaWrapper } from 'vs/editor/browser/controller/textAreaState'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; -import Event, { Emitter } from 'vs/base/common/event'; import { Disposable } from 'vs/base/common/lifecycle'; -export class MockTextAreaWrapper extends Disposable implements ITextAreaWrapper { - - private _onKeyDown = this._register(new Emitter()); - public onKeyDown: Event = this._onKeyDown.event; - - private _onKeyUp = this._register(new Emitter()); - public onKeyUp: Event = this._onKeyUp.event; - - private _onKeyPress = this._register(new Emitter()); - public onKeyPress: Event = this._onKeyPress.event; - - private _onCompositionStart = this._register(new Emitter()); - public onCompositionStart: Event = this._onCompositionStart.event; - - private _onCompositionUpdate = this._register(new Emitter()); - public onCompositionUpdate: Event = this._onCompositionUpdate.event; - - private _onCompositionEnd = this._register(new Emitter()); - public onCompositionEnd: Event = this._onCompositionEnd.event; - - private _onInput = this._register(new Emitter()); - public onInput: Event = this._onInput.event; - - private _onCut = this._register(new Emitter()); - public onCut: Event = this._onCut.event; - - private _onCopy = this._register(new Emitter()); - public onCopy: Event = this._onCopy.event; - - private _onPaste = this._register(new Emitter()); - public onPaste: Event = this._onPaste.event; +export class MockTextAreaWrapper extends Disposable implements ISimpleTextAreaWrapper { public _value: string; public _selectionStart: number; From 9cdd0987b4d8cea724a3087da2d1b5f184859aa5 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 3 May 2017 18:00:05 +0200 Subject: [PATCH 0157/2747] Debt: Simplify TextAreaHandler --- .../controller/input/textAreaWrapper.ts | 165 ------------------ .../browser/controller/textAreaHandler.ts | 134 ++++++++++++-- .../browser/controller/textAreaState.ts | 12 +- .../browser/controller/textAreaState.test.ts | 4 +- 4 files changed, 125 insertions(+), 190 deletions(-) delete mode 100644 src/vs/editor/browser/controller/input/textAreaWrapper.ts diff --git a/src/vs/editor/browser/controller/input/textAreaWrapper.ts b/src/vs/editor/browser/controller/input/textAreaWrapper.ts deleted file mode 100644 index 886c7ae28e6ec..0000000000000 --- a/src/vs/editor/browser/controller/input/textAreaWrapper.ts +++ /dev/null @@ -1,165 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import Event, { Emitter } from 'vs/base/common/event'; -import { Disposable } from 'vs/base/common/lifecycle'; -import * as browser from 'vs/base/browser/browser'; -import * as dom from 'vs/base/browser/dom'; -import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; -import { FastDomNode } from 'vs/base/browser/fastDomNode'; - -export class ClipboardEventWrapper { - - private _event: ClipboardEvent; - - constructor(event: ClipboardEvent) { - this._event = event; - } - - public canUseTextData(): boolean { - if (this._event.clipboardData) { - return true; - } - if ((window).clipboardData) { - return true; - } - return false; - } - - public setTextData(text: string, richText: string): void { - if (this._event.clipboardData) { - this._event.clipboardData.setData('text/plain', text); - if (richText !== null) { - this._event.clipboardData.setData('text/html', richText); - } - this._event.preventDefault(); - return; - } - - if ((window).clipboardData) { - (window).clipboardData.setData('Text', text); - this._event.preventDefault(); - return; - } - - throw new Error('ClipboardEventWrapper.setTextData: Cannot use text data!'); - } - - public getTextData(): string { - if (this._event.clipboardData) { - this._event.preventDefault(); - return this._event.clipboardData.getData('text/plain'); - } - - if ((window).clipboardData) { - this._event.preventDefault(); - return (window).clipboardData.getData('Text'); - } - - throw new Error('ClipboardEventWrapper.getTextData: Cannot use text data!'); - } -} - -export class TextAreaWrapper extends Disposable { - - public readonly actual: FastDomNode; - - private _onKeyDown = this._register(new Emitter()); - public onKeyDown: Event = this._onKeyDown.event; - - private _onKeyUp = this._register(new Emitter()); - public onKeyUp: Event = this._onKeyUp.event; - - private _onKeyPress = this._register(new Emitter()); - public onKeyPress: Event = this._onKeyPress.event; - - private _onCompositionStart = this._register(new Emitter()); - public onCompositionStart: Event = this._onCompositionStart.event; - - private _onCompositionUpdate = this._register(new Emitter()); - public onCompositionUpdate: Event = this._onCompositionUpdate.event; - - private _onCompositionEnd = this._register(new Emitter()); - public onCompositionEnd: Event = this._onCompositionEnd.event; - - private _onInput = this._register(new Emitter()); - public onInput: Event = this._onInput.event; - - private _onCut = this._register(new Emitter()); - public onCut: Event = this._onCut.event; - - private _onCopy = this._register(new Emitter()); - public onCopy: Event = this._onCopy.event; - - private _onPaste = this._register(new Emitter()); - public onPaste: Event = this._onPaste.event; - - constructor(_textArea: FastDomNode) { - super(); - this.actual = _textArea; - - const textArea = this.actual.domNode; - this._register(dom.addStandardDisposableListener(textArea, 'keydown', (e) => this._onKeyDown.fire(e))); - this._register(dom.addStandardDisposableListener(textArea, 'keyup', (e) => this._onKeyUp.fire(e))); - this._register(dom.addStandardDisposableListener(textArea, 'keypress', (e) => this._onKeyPress.fire(e))); - this._register(dom.addDisposableListener(textArea, 'compositionstart', (e) => this._onCompositionStart.fire(e))); - this._register(dom.addDisposableListener(textArea, 'compositionupdate', (e) => this._onCompositionUpdate.fire(e))); - this._register(dom.addDisposableListener(textArea, 'compositionend', (e) => this._onCompositionEnd.fire(e))); - this._register(dom.addDisposableListener(textArea, 'input', (e) => this._onInput.fire())); - this._register(dom.addDisposableListener(textArea, 'cut', (e: ClipboardEvent) => this._onCut.fire(new ClipboardEventWrapper(e)))); - this._register(dom.addDisposableListener(textArea, 'copy', (e: ClipboardEvent) => this._onCopy.fire(new ClipboardEventWrapper(e)))); - this._register(dom.addDisposableListener(textArea, 'paste', (e: ClipboardEvent) => this._onPaste.fire(new ClipboardEventWrapper(e)))); - } - - public getValue(): string { - // console.log('current value: ' + this._textArea.value); - const textArea = this.actual.domNode; - return textArea.value; - } - - public setValue(reason: string, value: string): void { - // console.log('reason: ' + reason + ', current value: ' + this._textArea.value + ' => new value: ' + value); - const textArea = this.actual.domNode; - textArea.value = value; - } - - public getSelectionStart(): number { - const textArea = this.actual.domNode; - return textArea.selectionStart; - } - - public getSelectionEnd(): number { - const textArea = this.actual.domNode; - return textArea.selectionEnd; - } - - public setSelectionRange(selectionStart: number, selectionEnd: number): void { - const textArea = this.actual.domNode; - const activeElement = document.activeElement; - if (activeElement === textArea) { - textArea.setSelectionRange(selectionStart, selectionEnd); - } else { - // If the focus is outside the textarea, browsers will try really hard to reveal the textarea. - // Here, we try to undo the browser's desperate reveal. - try { - const scrollState = dom.saveParentsScrollTop(textArea); - textArea.focus(); - textArea.setSelectionRange(selectionStart, selectionEnd); - dom.restoreParentsScrollTop(textArea, scrollState); - } catch (e) { - // Sometimes IE throws when setting selection (e.g. textarea is off-DOM) - } - } - } - - public isInOverwriteMode(): boolean { - // In IE, pressing Insert will bring the typing into overwrite mode - if (browser.isIE && document.queryCommandValue('OverWrite')) { - return true; - } - return false; - } -} diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index 7dbd21c82b122..8f0caefae587c 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -9,10 +9,10 @@ import * as strings from 'vs/base/common/strings'; import Event, { Emitter } from 'vs/base/common/event'; import { KeyCode } from 'vs/base/common/keyCodes'; import { Disposable } from 'vs/base/common/lifecycle'; -import { ISimpleModel, ITypeData, TextAreaState, TextAreaStrategy, createTextAreaState } from 'vs/editor/browser/controller/textAreaState'; +import { ISimpleModel, ITypeData, TextAreaState, TextAreaStrategy, createTextAreaState, ITextAreaWrapper } from 'vs/editor/browser/controller/textAreaState'; import { Range } from 'vs/editor/common/core/range'; import * as browser from 'vs/base/browser/browser'; -import { ClipboardEventWrapper, TextAreaWrapper } from "vs/editor/browser/controller/input/textAreaWrapper"; +import * as dom from 'vs/base/browser/dom'; import { IKeyboardEvent } from "vs/base/browser/keyboardEvent"; import { FastDomNode } from "vs/base/browser/fastDomNode"; @@ -106,14 +106,14 @@ export class TextAreaHandler extends Disposable { this.hasFocus = false; - this._register(this.textArea.onKeyDown((e) => this._onKeyDownHandler(e))); - this._register(this.textArea.onKeyUp((e) => this._onKeyUp.fire(e))); - this._register(this.textArea.onKeyPress((e) => this._onKeyPressHandler(e))); + this._register(dom.addStandardDisposableListener(textArea.domNode, 'keydown', (e: IKeyboardEvent) => this._onKeyDownHandler(e))); + this._register(dom.addStandardDisposableListener(textArea.domNode, 'keyup', (e: IKeyboardEvent) => this._onKeyUp.fire(e))); + this._register(dom.addStandardDisposableListener(textArea.domNode, 'keypress', (e: IKeyboardEvent) => this._onKeyPressHandler(e))); this.textareaIsShownAtCursor = false; let compositionLocale = null; - this._register(this.textArea.onCompositionStart((e) => { + this._register(dom.addDisposableListener(textArea.domNode, 'compositionstart', (e: CompositionEvent) => { if (this.textareaIsShownAtCursor) { return; @@ -132,7 +132,7 @@ export class TextAreaHandler extends Disposable { }); })); - this._register(this.textArea.onCompositionUpdate((e) => { + this._register(dom.addDisposableListener(textArea.domNode, 'compositionupdate', (e: CompositionEvent) => { if (isChromev55_v56) { // See https://github.com/Microsoft/monaco-editor/issues/320 // where compositionupdate .data is broken in Chrome v55 and v56 @@ -181,7 +181,7 @@ export class TextAreaHandler extends Disposable { } }; - this._register(this.textArea.onCompositionEnd((e) => { + this._register(dom.addDisposableListener(textArea.domNode, 'compositionend', (e: CompositionEvent) => { // console.log('onCompositionEnd: ' + e.data); if (browser.isEdgeOrIE && e.locale === 'ja') { // https://github.com/Microsoft/monaco-editor/issues/339 @@ -209,7 +209,7 @@ export class TextAreaHandler extends Disposable { this._onCompositionEnd.fire(); })); - this._register(this.textArea.onInput(() => { + this._register(dom.addDisposableListener(textArea.domNode, 'input', () => { // console.log('onInput: ' + this.textArea.getValue()); if (this.textareaIsShownAtCursor) { // See https://github.com/Microsoft/monaco-editor/issues/320 @@ -233,18 +233,18 @@ export class TextAreaHandler extends Disposable { // --- Clipboard operations - this._register(this.textArea.onCut((e) => { + this._register(dom.addDisposableListener(textArea.domNode, 'cut', (e: ClipboardEvent) => { this._ensureClipboardGetsEditorSelection(e); this.asyncTriggerCut.schedule(); })); - this._register(this.textArea.onCopy((e) => { + this._register(dom.addDisposableListener(textArea.domNode, 'copy', (e: ClipboardEvent) => { this._ensureClipboardGetsEditorSelection(e); })); - this._register(this.textArea.onPaste((e) => { - if (e.canUseTextData()) { - this.executePaste(e.getTextData()); + this._register(dom.addDisposableListener(textArea.domNode, 'paste', (e: ClipboardEvent) => { + if (ClipboardEventUtils.canUseTextData(e)) { + this.executePaste(ClipboardEventUtils.getTextData(e)); } else { if (this.textArea.getSelectionStart() !== this.textArea.getSelectionEnd()) { // Clean up the textarea, to get a clean paste @@ -351,14 +351,14 @@ export class TextAreaHandler extends Disposable { // ------------- Clipboard operations - private _ensureClipboardGetsEditorSelection(e: ClipboardEventWrapper): void { + private _ensureClipboardGetsEditorSelection(e: ClipboardEvent): void { let whatToCopy = this.model.getPlainTextToCopy(this.selections, browser.enableEmptySelectionClipboard); - if (e.canUseTextData()) { + if (ClipboardEventUtils.canUseTextData(e)) { let whatHTMLToCopy: string = null; if (!browser.isEdgeOrIE && (whatToCopy.length < 65536 || CopyOptions.forceCopyWithSyntaxHighlighting)) { whatHTMLToCopy = this.model.getHTMLToCopy(this.selections, browser.enableEmptySelectionClipboard); } - e.setTextData(whatToCopy, whatHTMLToCopy); + ClipboardEventUtils.setTextData(e, whatToCopy, whatHTMLToCopy); } else { this.setTextAreaState('copy or cut', this.textAreaState.fromText(whatToCopy), false); } @@ -377,3 +377,103 @@ export class TextAreaHandler extends Disposable { } } } + +class ClipboardEventUtils { + + public static canUseTextData(e: ClipboardEvent): boolean { + if (e.clipboardData) { + return true; + } + if ((window).clipboardData) { + return true; + } + return false; + } + + public static getTextData(e: ClipboardEvent): string { + if (e.clipboardData) { + e.preventDefault(); + return e.clipboardData.getData('text/plain'); + } + + if ((window).clipboardData) { + e.preventDefault(); + return (window).clipboardData.getData('Text'); + } + + throw new Error('ClipboardEventUtils.getTextData: Cannot use text data!'); + } + + public static setTextData(e: ClipboardEvent, text: string, richText: string): void { + if (e.clipboardData) { + e.clipboardData.setData('text/plain', text); + if (richText !== null) { + e.clipboardData.setData('text/html', richText); + } + e.preventDefault(); + return; + } + + if ((window).clipboardData) { + (window).clipboardData.setData('Text', text); + e.preventDefault(); + return; + } + + throw new Error('ClipboardEventUtils.setTextData: Cannot use text data!'); + } +} + +class TextAreaWrapper extends Disposable implements ITextAreaWrapper { + + private readonly _actual: FastDomNode; + + constructor(_textArea: FastDomNode) { + super(); + this._actual = _textArea; + } + + public getValue(): string { + // console.log('current value: ' + this._textArea.value); + return this._actual.domNode.value; + } + + public setValue(reason: string, value: string): void { + // console.log('reason: ' + reason + ', current value: ' + this._textArea.value + ' => new value: ' + value); + this._actual.domNode.value = value; + } + + public getSelectionStart(): number { + return this._actual.domNode.selectionStart; + } + + public getSelectionEnd(): number { + return this._actual.domNode.selectionEnd; + } + + public setSelectionRange(selectionStart: number, selectionEnd: number): void { + const textArea = this._actual.domNode; + if (document.activeElement === textArea) { + textArea.setSelectionRange(selectionStart, selectionEnd); + } else { + // If the focus is outside the textarea, browsers will try really hard to reveal the textarea. + // Here, we try to undo the browser's desperate reveal. + try { + const scrollState = dom.saveParentsScrollTop(textArea); + textArea.focus(); + textArea.setSelectionRange(selectionStart, selectionEnd); + dom.restoreParentsScrollTop(textArea, scrollState); + } catch (e) { + // Sometimes IE throws when setting selection (e.g. textarea is off-DOM) + } + } + } + + public isInOverwriteMode(): boolean { + // In IE, pressing Insert will bring the typing into overwrite mode + if (browser.isIE && document.queryCommandValue('OverWrite')) { + return true; + } + return false; + } +} diff --git a/src/vs/editor/browser/controller/textAreaState.ts b/src/vs/editor/browser/controller/textAreaState.ts index 8f2500c4761ae..6b55e6e5db709 100644 --- a/src/vs/editor/browser/controller/textAreaState.ts +++ b/src/vs/editor/browser/controller/textAreaState.ts @@ -10,7 +10,7 @@ import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; import { Position } from 'vs/editor/common/core/position'; import { Constants } from 'vs/editor/common/core/uint'; -export interface ISimpleTextAreaWrapper { +export interface ITextAreaWrapper { getValue(): string; setValue(reason: string, value: string): void; getSelectionStart(): number; @@ -82,7 +82,7 @@ export abstract class TextAreaState { public abstract equals(other: TextAreaState): boolean; - public abstract fromTextArea(textArea: ISimpleTextAreaWrapper): TextAreaState; + public abstract fromTextArea(textArea: ITextAreaWrapper): TextAreaState; public abstract fromEditorSelection(model: ISimpleModel, selection: Range); @@ -113,7 +113,7 @@ export abstract class TextAreaState { return this.value; } - public applyToTextArea(reason: string, textArea: ISimpleTextAreaWrapper, select: boolean): void { + public applyToTextArea(reason: string, textArea: ITextAreaWrapper, select: boolean): void { // console.log(Date.now() + ': applyToTextArea ' + reason + ': ' + this.toString()); if (textArea.getValue() !== this.value) { textArea.setValue(reason, this.value); @@ -243,7 +243,7 @@ export class IENarratorTextAreaState extends TextAreaState { return false; } - public fromTextArea(textArea: ISimpleTextAreaWrapper): TextAreaState { + public fromTextArea(textArea: ITextAreaWrapper): TextAreaState { return new IENarratorTextAreaState(this, textArea.getValue(), textArea.getSelectionStart(), textArea.getSelectionEnd(), textArea.isInOverwriteMode(), this.selectionToken); } @@ -344,7 +344,7 @@ export class NVDAPagedTextAreaState extends TextAreaState { return false; } - public fromTextArea(textArea: ISimpleTextAreaWrapper): TextAreaState { + public fromTextArea(textArea: ITextAreaWrapper): TextAreaState { return new NVDAPagedTextAreaState(this, textArea.getValue(), textArea.getSelectionStart(), textArea.getSelectionEnd(), textArea.isInOverwriteMode()); } @@ -453,7 +453,7 @@ export class NVDAFullTextAreaState extends TextAreaState { return false; } - public fromTextArea(textArea: ISimpleTextAreaWrapper): TextAreaState { + public fromTextArea(textArea: ITextAreaWrapper): TextAreaState { return new NVDAFullTextAreaState(this, textArea.getValue(), textArea.getSelectionStart(), textArea.getSelectionEnd(), textArea.isInOverwriteMode()); } diff --git a/src/vs/editor/test/browser/controller/textAreaState.test.ts b/src/vs/editor/test/browser/controller/textAreaState.test.ts index ed1a3b4f71f4a..3513a18c665fa 100644 --- a/src/vs/editor/test/browser/controller/textAreaState.test.ts +++ b/src/vs/editor/test/browser/controller/textAreaState.test.ts @@ -5,13 +5,13 @@ 'use strict'; import * as assert from 'assert'; -import { IENarratorTextAreaState, ISimpleModel, TextAreaState, ISimpleTextAreaWrapper } from 'vs/editor/browser/controller/textAreaState'; +import { IENarratorTextAreaState, ISimpleModel, TextAreaState, ITextAreaWrapper } from 'vs/editor/browser/controller/textAreaState'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; import { Disposable } from 'vs/base/common/lifecycle'; -export class MockTextAreaWrapper extends Disposable implements ISimpleTextAreaWrapper { +export class MockTextAreaWrapper extends Disposable implements ITextAreaWrapper { public _value: string; public _selectionStart: number; From c3ce62100a04ad9fa629b284dcc1a44d599ae478 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 3 May 2017 18:48:54 +0200 Subject: [PATCH 0158/2747] Debt: Simplify TextAreaHandler --- .../browser/controller/keyboardHandler.ts | 72 +++++- .../browser/controller/textAreaHandler.ts | 237 ++++++++---------- .../browser/controller/textAreaState.ts | 11 +- src/vs/editor/common/viewModel/viewModel.ts | 2 - .../editor/common/viewModel/viewModelImpl.ts | 10 +- .../test/browser/controller/imeTester.ts | 32 +-- .../browser/controller/textAreaState.test.ts | 23 -- 7 files changed, 172 insertions(+), 215 deletions(-) diff --git a/src/vs/editor/browser/controller/keyboardHandler.ts b/src/vs/editor/browser/controller/keyboardHandler.ts index c1b61ce4af0d3..d40903f294001 100644 --- a/src/vs/editor/browser/controller/keyboardHandler.ts +++ b/src/vs/editor/browser/controller/keyboardHandler.ts @@ -7,8 +7,8 @@ import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; import { GlobalScreenReaderNVDA } from 'vs/editor/common/config/commonEditorConfig'; -import { TextAreaHandler } from 'vs/editor/browser/controller/textAreaHandler'; -import { TextAreaStrategy } from 'vs/editor/browser/controller/textAreaState'; +import { TextAreaHandler, ITextAreaHandlerHost } from 'vs/editor/browser/controller/textAreaHandler'; +import { TextAreaStrategy, ISimpleModel } from 'vs/editor/browser/controller/textAreaState'; import { Range } from 'vs/editor/common/core/range'; import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler'; import { Configuration } from 'vs/editor/browser/config/configuration'; @@ -18,6 +18,7 @@ import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { FastDomNode } from 'vs/base/browser/fastDomNode'; import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; import { ViewController } from 'vs/editor/browser/view/viewController'; +import { EndOfLinePreference } from "vs/editor/common/editorCommon"; export interface IKeyboardHandlerHelper { viewDomNode: FastDomNode; @@ -41,16 +42,20 @@ export class KeyboardHandler extends ViewEventHandler { private _context: ViewContext; private viewController: ViewController; - private viewHelper: IKeyboardHandlerHelper; private textArea: FastDomNode; - private textAreaHandler: TextAreaHandler; + private viewHelper: IKeyboardHandlerHelper; + private visiblePosition: TextAreaVisiblePosition; private contentLeft: number; private contentWidth: number; private scrollLeft: number; private scrollTop: number; - private visiblePosition: TextAreaVisiblePosition; + private _selections: Range[]; + private _lastCopiedValue: string; + private _lastCopiedValueIsFromEmptySelection: boolean; + + private textAreaHandler: TextAreaHandler; constructor(context: ViewContext, viewController: ViewController, viewHelper: IKeyboardHandlerHelper) { super(); @@ -67,11 +72,55 @@ export class KeyboardHandler extends ViewEventHandler { this.scrollLeft = 0; this.scrollTop = 0; - this.textAreaHandler = new TextAreaHandler(this._getStrategy(), this.textArea, this._context.model); + this._selections = [new Range(1, 1, 1, 1)]; + this._lastCopiedValue = null; + this._lastCopiedValueIsFromEmptySelection = false; + + const textAreaHandlerHost: ITextAreaHandlerHost = { + getPlainTextToCopy: (): string => { + const whatToCopy = this._context.model.getPlainTextToCopy(this._selections, browser.enableEmptySelectionClipboard); + + if (browser.enableEmptySelectionClipboard) { + if (browser.isFirefox) { + // When writing "LINE\r\n" to the clipboard and then pasting, + // Firefox pastes "LINE\n", so let's work around this quirk + this._lastCopiedValue = whatToCopy.replace(/\r\n/g, '\n'); + } else { + this._lastCopiedValue = whatToCopy; + } + + let selections = this._selections; + this._lastCopiedValueIsFromEmptySelection = (selections.length === 1 && selections[0].isEmpty()); + } + + return whatToCopy; + }, + getHTMLToCopy: (): string => { + return this._context.model.getHTMLToCopy(this._selections, browser.enableEmptySelectionClipboard); + } + }; + const simpleModel: ISimpleModel = { + getLineCount: (): number => { + return this._context.model.getLineCount(); + }, + getLineMaxColumn: (lineNumber: number): number => { + return this._context.model.getLineMaxColumn(lineNumber); + }, + getValueInRange: (range: Range, eol: EndOfLinePreference): string => { + return this._context.model.getValueInRange(range, eol); + } + }; + this.textAreaHandler = new TextAreaHandler(textAreaHandlerHost, this._getStrategy(), this.textArea, simpleModel); this._register(this.textAreaHandler.onKeyDown((e) => this.viewController.emitKeyDown(e))); this._register(this.textAreaHandler.onKeyUp((e) => this.viewController.emitKeyUp(e))); - this._register(this.textAreaHandler.onPaste((e) => this.viewController.paste('keyboard', e.text, e.pasteOnNewLine))); + this._register(this.textAreaHandler.onPaste((e) => { + let pasteOnNewLine = false; + if (browser.enableEmptySelectionClipboard) { + pasteOnNewLine = (e.text === this._lastCopiedValue && this._lastCopiedValueIsFromEmptySelection); + } + this.viewController.paste('keyboard', e.text, pasteOnNewLine); + })); this._register(this.textAreaHandler.onCut((e) => this.viewController.cut('keyboard'))); this._register(this.textAreaHandler.onType((e) => { if (e.replaceCharCnt) { @@ -80,9 +129,9 @@ export class KeyboardHandler extends ViewEventHandler { this.viewController.type('keyboard', e.text); } })); - this._register(this.textAreaHandler.onCompositionStart((e) => { - const lineNumber = e.showAtLineNumber; - const column = e.showAtColumn; + this._register(this.textAreaHandler.onCompositionStart(() => { + const lineNumber = this._selections[0].startLineNumber; + const column = this._selections[0].startColumn; this._context.privateViewEventBus.emit(new viewEvents.ViewRevealRangeRequestEvent( new Range(lineNumber, column, lineNumber, column), @@ -132,7 +181,7 @@ export class KeyboardHandler extends ViewEventHandler { } })); - this._register(this.textAreaHandler.onCompositionEnd((e) => { + this._register(this.textAreaHandler.onCompositionEnd(() => { this.textArea.unsetHeight(); this.textArea.unsetWidth(); this.textArea.setLeft(0); @@ -190,6 +239,7 @@ export class KeyboardHandler extends ViewEventHandler { private _lastCursorSelectionChanged: viewEvents.ViewCursorSelectionChangedEvent = null; public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { + this._selections = [e.selection].concat(e.secondarySelections); this._lastCursorSelectionChanged = e; return false; } diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index 8f0caefae587c..78517360e7023 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -32,12 +32,6 @@ const enum ReadFromTextArea { export interface IPasteData { text: string; - pasteOnNewLine: boolean; -} - -export interface ICompositionStartData { - showAtLineNumber: number; - showAtColumn: number; } // See https://github.com/Microsoft/monaco-editor/issues/320 @@ -47,6 +41,11 @@ const isChromev55_v56 = ( && navigator.userAgent.indexOf('Edge/') === -1 ); +export interface ITextAreaHandlerHost { + getPlainTextToCopy(): string; + getHTMLToCopy(): string; +} + export class TextAreaHandler extends Disposable { private _onKeyDown = this._register(new Emitter()); @@ -64,72 +63,81 @@ export class TextAreaHandler extends Disposable { private _onType = this._register(new Emitter()); public onType: Event = this._onType.event; - private _onCompositionStart = this._register(new Emitter()); - public onCompositionStart: Event = this._onCompositionStart.event; + private _onCompositionStart = this._register(new Emitter()); + public onCompositionStart: Event = this._onCompositionStart.event; private _onCompositionUpdate = this._register(new Emitter()); public onCompositionUpdate: Event = this._onCompositionUpdate.event; - private _onCompositionEnd = this._register(new Emitter()); - public onCompositionEnd: Event = this._onCompositionEnd.event; + private _onCompositionEnd = this._register(new Emitter()); + public onCompositionEnd: Event = this._onCompositionEnd.event; - private textArea: TextAreaWrapper; - private model: ISimpleModel; + // --- - private selection: Range; - private selections: Range[]; - private hasFocus: boolean; + private readonly _host: ITextAreaHandlerHost; + private readonly _textArea: TextAreaWrapper; + private readonly _model: ISimpleModel; - private asyncTriggerCut: RunOnceScheduler; + private _selection: Range; + private _hasFocus: boolean; - private textAreaState: TextAreaState; - private textareaIsShownAtCursor: boolean; + private readonly _asyncTriggerCut: RunOnceScheduler; - private lastCopiedValue: string; - private lastCopiedValueIsFromEmptySelection: boolean; + private _textAreaState: TextAreaState; + private _isDoingComposition: boolean; private _nextCommand: ReadFromTextArea; - constructor(strategy: TextAreaStrategy, textArea: FastDomNode, model: ISimpleModel) { + constructor(host: ITextAreaHandlerHost, strategy: TextAreaStrategy, textArea: FastDomNode, model: ISimpleModel) { super(); - this.textArea = this._register(new TextAreaWrapper(textArea)); - this.model = model; - this.selection = new Range(1, 1, 1, 1); - this.selections = [new Range(1, 1, 1, 1)]; - this._nextCommand = ReadFromTextArea.Type; + this._host = host; + this._textArea = this._register(new TextAreaWrapper(textArea)); + this._model = model; + + this._selection = new Range(1, 1, 1, 1); + this._hasFocus = false; + + this._asyncTriggerCut = this._register(new RunOnceScheduler(() => this._onCut.fire(), 0)); + + this._textAreaState = createTextAreaState(strategy); + this._isDoingComposition = false; - this.asyncTriggerCut = this._register(new RunOnceScheduler(() => this._onCut.fire(), 0)); + this._nextCommand = ReadFromTextArea.Type; - this.lastCopiedValue = null; - this.lastCopiedValueIsFromEmptySelection = false; - this.textAreaState = createTextAreaState(strategy); + this._register(dom.addStandardDisposableListener(textArea.domNode, 'keydown', (e: IKeyboardEvent) => { + if (this._isDoingComposition && e.equals(KeyCode.KEY_IN_COMPOSITION)) { + // Stop propagation for keyDown events if the IME is processing key input + e.stopPropagation(); + } - this.hasFocus = false; + if (e.equals(KeyCode.Escape)) { + // Prevent default always for `Esc`, otherwise it will generate a keypress + // See https://msdn.microsoft.com/en-us/library/ie/ms536939(v=vs.85).aspx + e.preventDefault(); + } + this._onKeyDown.fire(e); + })); - this._register(dom.addStandardDisposableListener(textArea.domNode, 'keydown', (e: IKeyboardEvent) => this._onKeyDownHandler(e))); - this._register(dom.addStandardDisposableListener(textArea.domNode, 'keyup', (e: IKeyboardEvent) => this._onKeyUp.fire(e))); - this._register(dom.addStandardDisposableListener(textArea.domNode, 'keypress', (e: IKeyboardEvent) => this._onKeyPressHandler(e))); + this._register(dom.addStandardDisposableListener(textArea.domNode, 'keyup', (e: IKeyboardEvent) => { + this._onKeyUp.fire(e); + })); - this.textareaIsShownAtCursor = false; let compositionLocale = null; this._register(dom.addDisposableListener(textArea.domNode, 'compositionstart', (e: CompositionEvent) => { - if (this.textareaIsShownAtCursor) { + if (this._isDoingComposition) { return; } - this.textareaIsShownAtCursor = true; + this._isDoingComposition = true; // In IE we cannot set .value when handling 'compositionstart' because the entire composition will get canceled. if (!browser.isEdgeOrIE) { - this.setTextAreaState('compositionstart', this.textAreaState.toEmpty(), false); + this.setTextAreaState('compositionstart', this._textAreaState.toEmpty(), false); } - this._onCompositionStart.fire({ - showAtLineNumber: this.selection.startLineNumber, - showAtColumn: this.selection.startColumn - }); + this._onCompositionStart.fire(); })); this._register(dom.addDisposableListener(textArea.domNode, 'compositionupdate', (e: CompositionEvent) => { @@ -148,75 +156,55 @@ export class TextAreaHandler extends Disposable { // Multi-part Japanese compositions reset cursor in Edge/IE, Chinese and Korean IME don't have this issue. // The reason that we can't use this path for all CJK IME is IE and Edge behave differently when handling Korean IME, // which breaks this path of code. - this.textAreaState = this.textAreaState.fromTextArea(this.textArea); - let typeInput = this.textAreaState.deduceInput(); + this._textAreaState = this._textAreaState.fromTextArea(this._textArea); + let typeInput = this._textAreaState.deduceInput(); this._onType.fire(typeInput); this._onCompositionUpdate.fire(e); return; } - this.textAreaState = this.textAreaState.fromText(e.data); - let typeInput = this.textAreaState.updateComposition(); + this._textAreaState = this._textAreaState.fromText(e.data); + let typeInput = this._textAreaState.updateComposition(); this._onType.fire(typeInput); this._onCompositionUpdate.fire(e); })); - let readFromTextArea = () => { - let tempTextAreaState = this.textAreaState.fromTextArea(this.textArea); - let typeInput = tempTextAreaState.deduceInput(); - if (typeInput.replaceCharCnt === 0 && typeInput.text.length === 1 && strings.isHighSurrogate(typeInput.text.charCodeAt(0))) { - // Ignore invalid input but keep it around for next time - return; - } - - this.textAreaState = tempTextAreaState; - // console.log('==> DEDUCED INPUT: ' + JSON.stringify(typeInput)); - if (this._nextCommand === ReadFromTextArea.Type) { - if (typeInput.text !== '') { - this._onType.fire(typeInput); - } - } else { - this.executePaste(typeInput.text); - this._nextCommand = ReadFromTextArea.Type; - } - }; - this._register(dom.addDisposableListener(textArea.domNode, 'compositionend', (e: CompositionEvent) => { // console.log('onCompositionEnd: ' + e.data); if (browser.isEdgeOrIE && e.locale === 'ja') { // https://github.com/Microsoft/monaco-editor/issues/339 - this.textAreaState = this.textAreaState.fromTextArea(this.textArea); - let typeInput = this.textAreaState.deduceInput(); + this._textAreaState = this._textAreaState.fromTextArea(this._textArea); + let typeInput = this._textAreaState.deduceInput(); this._onType.fire(typeInput); } else { - this.textAreaState = this.textAreaState.fromText(e.data); - let typeInput = this.textAreaState.updateComposition(); + this._textAreaState = this._textAreaState.fromText(e.data); + let typeInput = this._textAreaState.updateComposition(); this._onType.fire(typeInput); } // Due to isEdgeOrIE (where the textarea was not cleared initially) and isChrome (the textarea is not updated correctly when composition ends) // we cannot assume the text at the end consists only of the composited text if (browser.isEdgeOrIE || browser.isChrome) { - this.textAreaState = this.textAreaState.fromTextArea(this.textArea); + this._textAreaState = this._textAreaState.fromTextArea(this._textArea); } - if (!this.textareaIsShownAtCursor) { + if (!this._isDoingComposition) { return; } - this.textareaIsShownAtCursor = false; + this._isDoingComposition = false; this._onCompositionEnd.fire(); })); this._register(dom.addDisposableListener(textArea.domNode, 'input', () => { // console.log('onInput: ' + this.textArea.getValue()); - if (this.textareaIsShownAtCursor) { + if (this._isDoingComposition) { // See https://github.com/Microsoft/monaco-editor/issues/320 if (isChromev55_v56) { - let text = this.textArea.getValue(); - this.textAreaState = this.textAreaState.fromText(text); - let typeInput = this.textAreaState.updateComposition(); + let text = this._textArea.getValue(); + this._textAreaState = this._textAreaState.fromText(text); + let typeInput = this._textAreaState.updateComposition(); this._onType.fire(typeInput); let e = { locale: compositionLocale, @@ -228,14 +216,30 @@ export class TextAreaHandler extends Disposable { return; } - readFromTextArea(); + let tempTextAreaState = this._textAreaState.fromTextArea(this._textArea); + let typeInput = tempTextAreaState.deduceInput(); + if (typeInput.replaceCharCnt === 0 && typeInput.text.length === 1 && strings.isHighSurrogate(typeInput.text.charCodeAt(0))) { + // Ignore invalid input but keep it around for next time + return; + } + + this._textAreaState = tempTextAreaState; + // console.log('==> DEDUCED INPUT: ' + JSON.stringify(typeInput)); + if (this._nextCommand === ReadFromTextArea.Type) { + if (typeInput.text !== '') { + this._onType.fire(typeInput); + } + } else { + this.executePaste(typeInput.text); + this._nextCommand = ReadFromTextArea.Type; + } })); // --- Clipboard operations this._register(dom.addDisposableListener(textArea.domNode, 'cut', (e: ClipboardEvent) => { this._ensureClipboardGetsEditorSelection(e); - this.asyncTriggerCut.schedule(); + this._asyncTriggerCut.schedule(); })); this._register(dom.addDisposableListener(textArea.domNode, 'copy', (e: ClipboardEvent) => { @@ -246,9 +250,9 @@ export class TextAreaHandler extends Disposable { if (ClipboardEventUtils.canUseTextData(e)) { this.executePaste(ClipboardEventUtils.getTextData(e)); } else { - if (this.textArea.getSelectionStart() !== this.textArea.getSelectionEnd()) { + if (this._textArea.getSelectionStart() !== this._textArea.getSelectionEnd()) { // Clean up the textarea, to get a clean paste - this.setTextAreaState('paste', this.textAreaState.toEmpty(), false); + this.setTextAreaState('paste', this._textAreaState.toEmpty(), false); } this._nextCommand = ReadFromTextArea.Paste; } @@ -264,56 +268,34 @@ export class TextAreaHandler extends Disposable { // --- begin event handlers public setStrategy(strategy: TextAreaStrategy): void { - this.textAreaState = this.textAreaState.toStrategy(strategy); + this._textAreaState = this._textAreaState.toStrategy(strategy); } public setHasFocus(isFocused: boolean): void { - if (this.hasFocus === isFocused) { + if (this._hasFocus === isFocused) { // no change return; } - this.hasFocus = isFocused; - if (this.hasFocus) { + this._hasFocus = isFocused; + if (this._hasFocus) { this._writePlaceholderAndSelectTextArea('focusgain', false); } } public setCursorSelections(primary: Range, secondary: Range[]): void { - this.selection = primary; - this.selections = [primary].concat(secondary); + this._selection = primary; this._writePlaceholderAndSelectTextArea('selection changed', false); } // --- end event handlers private setTextAreaState(reason: string, textAreaState: TextAreaState, forceFocus: boolean): void { - if (!this.hasFocus) { + if (!this._hasFocus) { textAreaState = textAreaState.resetSelection(); } - textAreaState.applyToTextArea(reason, this.textArea, this.hasFocus || forceFocus); - this.textAreaState = textAreaState; - } - - private _onKeyDownHandler(e: IKeyboardEvent): void { - if (this.textareaIsShownAtCursor && e.equals(KeyCode.KEY_IN_COMPOSITION)) { - // Stop propagation for keyDown events if the IME is processing key input - e.stopPropagation(); - } - - if (e.equals(KeyCode.Escape)) { - // Prevent default always for `Esc`, otherwise it will generate a keypress - // See https://msdn.microsoft.com/en-us/library/ie/ms536939(v=vs.85).aspx - e.preventDefault(); - } - this._onKeyDown.fire(e); - } - - private _onKeyPressHandler(e: IKeyboardEvent): void { - if (!this.hasFocus) { - // Sometimes, when doing Alt-Tab, in FF, a 'keypress' is sent before a 'focus' - return; - } + textAreaState.applyToTextArea(reason, this._textArea, this._hasFocus || forceFocus); + this._textAreaState = textAreaState; } // ------------- Operations that are always executed asynchronously @@ -322,14 +304,8 @@ export class TextAreaHandler extends Disposable { if (txt === '') { return; } - - let pasteOnNewLine = false; - if (browser.enableEmptySelectionClipboard) { - pasteOnNewLine = (txt === this.lastCopiedValue && this.lastCopiedValueIsFromEmptySelection); - } this._onPaste.fire({ - text: txt, - pasteOnNewLine: pasteOnNewLine + text: txt }); } @@ -338,13 +314,13 @@ export class TextAreaHandler extends Disposable { } private _writePlaceholderAndSelectTextArea(reason: string, forceFocus: boolean): void { - if (!this.textareaIsShownAtCursor) { + if (!this._isDoingComposition) { // Do not write to the textarea if it is visible. if (browser.isIPad) { // Do not place anything in the textarea for the iPad - this.setTextAreaState(reason, this.textAreaState.toEmpty(), forceFocus); + this.setTextAreaState(reason, this._textAreaState.toEmpty(), forceFocus); } else { - this.setTextAreaState(reason, this.textAreaState.fromEditorSelection(this.model, this.selection), forceFocus); + this.setTextAreaState(reason, this._textAreaState.fromEditorSelection(this._model, this._selection), forceFocus); } } } @@ -352,28 +328,15 @@ export class TextAreaHandler extends Disposable { // ------------- Clipboard operations private _ensureClipboardGetsEditorSelection(e: ClipboardEvent): void { - let whatToCopy = this.model.getPlainTextToCopy(this.selections, browser.enableEmptySelectionClipboard); + let whatToCopy = this._host.getPlainTextToCopy(); if (ClipboardEventUtils.canUseTextData(e)) { let whatHTMLToCopy: string = null; if (!browser.isEdgeOrIE && (whatToCopy.length < 65536 || CopyOptions.forceCopyWithSyntaxHighlighting)) { - whatHTMLToCopy = this.model.getHTMLToCopy(this.selections, browser.enableEmptySelectionClipboard); + whatHTMLToCopy = this._host.getHTMLToCopy(); } ClipboardEventUtils.setTextData(e, whatToCopy, whatHTMLToCopy); } else { - this.setTextAreaState('copy or cut', this.textAreaState.fromText(whatToCopy), false); - } - - if (browser.enableEmptySelectionClipboard) { - if (browser.isFirefox) { - // When writing "LINE\r\n" to the clipboard and then pasting, - // Firefox pastes "LINE\n", so let's work around this quirk - this.lastCopiedValue = whatToCopy.replace(/\r\n/g, '\n'); - } else { - this.lastCopiedValue = whatToCopy; - } - - let selections = this.selections; - this.lastCopiedValueIsFromEmptySelection = (selections.length === 1 && selections[0].isEmpty()); + this.setTextAreaState('copy or cut', this._textAreaState.fromText(whatToCopy), false); } } } diff --git a/src/vs/editor/browser/controller/textAreaState.ts b/src/vs/editor/browser/controller/textAreaState.ts index 6b55e6e5db709..e5ebbe1e456d2 100644 --- a/src/vs/editor/browser/controller/textAreaState.ts +++ b/src/vs/editor/browser/controller/textAreaState.ts @@ -7,7 +7,6 @@ import { commonPrefixLength, commonSuffixLength } from 'vs/base/common/strings'; import { Range } from 'vs/editor/common/core/range'; import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; -import { Position } from 'vs/editor/common/core/position'; import { Constants } from 'vs/editor/common/core/uint'; export interface ITextAreaWrapper { @@ -21,17 +20,9 @@ export interface ITextAreaWrapper { } export interface ISimpleModel { + getLineCount(): number; getLineMaxColumn(lineNumber: number): number; - getEOL(): string; getValueInRange(range: Range, eol: EndOfLinePreference): string; - getModelLineContent(lineNumber: number): string; - getLineCount(): number; - getPlainTextToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string; - getHTMLToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string; - - coordinatesConverter: { - convertViewPositionToModelPosition(viewPosition: Position): Position; - }; } export interface ITypeData { diff --git a/src/vs/editor/common/viewModel/viewModel.ts b/src/vs/editor/common/viewModel/viewModel.ts index b9ccbc9982e36..19a4b265f789e 100644 --- a/src/vs/editor/common/viewModel/viewModel.ts +++ b/src/vs/editor/common/viewModel/viewModel.ts @@ -112,10 +112,8 @@ export interface IViewModel { getLineMaxColumn(lineNumber: number): number; getLineRenderLineNumber(lineNumber: number): string; getAllOverviewRulerDecorations(): ViewModelDecoration[]; - getEOL(): string; getValueInRange(range: Range, eol: EndOfLinePreference): string; - getModelLineContent(modelLineNumber: number): string; getModelLineMaxColumn(modelLineNumber: number): number; validateModelPosition(modelPosition: IPosition): Position; diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index 9a2122971a93d..3f75c1f17ce80 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -539,19 +539,11 @@ export class ViewModel extends Disposable implements IViewModel { return this.decorations.getAllOverviewRulerDecorations(); } - public getEOL(): string { - return this.model.getEOL(); - } - public getValueInRange(range: Range, eol: editorCommon.EndOfLinePreference): string { var modelRange = this.coordinatesConverter.convertViewRangeToModelRange(range); return this.model.getValueInRange(modelRange, eol); } - public getModelLineContent(modelLineNumber: number): string { - return this.model.getLineContent(modelLineNumber); - } - public getModelLineMaxColumn(modelLineNumber: number): number { return this.model.getLineMaxColumn(modelLineNumber); } @@ -561,7 +553,7 @@ export class ViewModel extends Disposable implements IViewModel { } public getPlainTextToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string { - let newLineCharacter = this.getEOL(); + let newLineCharacter = this.model.getEOL(); if (ranges.length === 1) { let range: Range = ranges[0]; diff --git a/src/vs/editor/test/browser/controller/imeTester.ts b/src/vs/editor/test/browser/controller/imeTester.ts index faaa003cc129e..9ee87fcd50fc9 100644 --- a/src/vs/editor/test/browser/controller/imeTester.ts +++ b/src/vs/editor/test/browser/controller/imeTester.ts @@ -4,11 +4,10 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { TextAreaHandler } from 'vs/editor/browser/controller/textAreaHandler'; +import { TextAreaHandler, ITextAreaHandlerHost } from 'vs/editor/browser/controller/textAreaHandler'; import { TextAreaStrategy, ISimpleModel } from 'vs/editor/browser/controller/textAreaState'; import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { Position } from 'vs/editor/common/core/position'; import { createFastDomNode } from 'vs/base/browser/fastDomNode'; // To run this test, open imeTester.html @@ -18,18 +17,12 @@ class SingleLineTestModel implements ISimpleModel { private _line: string; private _eol: string; - public coordinatesConverter = { - convertViewPositionToModelPosition: (viewPosition: Position): Position => { - return viewPosition; - } - }; - constructor(line: string) { this._line = line; this._eol = '\n'; } - setText(text: string) { + _setText(text: string) { this._line = text; } @@ -37,10 +30,6 @@ class SingleLineTestModel implements ISimpleModel { return this._line.length + 1; } - getEOL(): string { - return this._eol; - } - getValueInRange(range: IRange, eol: editorCommon.EndOfLinePreference): string { return this._line.substring(range.startColumn - 1, range.endColumn - 1); } @@ -52,14 +41,6 @@ class SingleLineTestModel implements ISimpleModel { getLineCount(): number { return 1; } - - public getPlainTextToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string { - return ''; - } - - public getHTMLToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string { - return ''; - } } class TestView { @@ -101,7 +82,12 @@ function doCreateTest(strategy: TextAreaStrategy, description: string, inputStr: let model = new SingleLineTestModel('some text'); - let handler = new TextAreaHandler(strategy, createFastDomNode(input), model); + const textAreaHandlerHost: ITextAreaHandlerHost = { + getPlainTextToCopy: (): string => '', + getHTMLToCopy: (): string => '' + }; + + let handler = new TextAreaHandler(textAreaHandlerHost, strategy, createFastDomNode(input), model); input.onfocus = () => { handler.setHasFocus(true); @@ -135,7 +121,7 @@ function doCreateTest(strategy: TextAreaStrategy, description: string, inputStr: }; let updateModelAndPosition = (text: string, off: number, len: number) => { - model.setText(text); + model._setText(text); updatePosition(off, len); view.paint(output); diff --git a/src/vs/editor/test/browser/controller/textAreaState.test.ts b/src/vs/editor/test/browser/controller/textAreaState.test.ts index 3513a18c665fa..3ae07ec1733f1 100644 --- a/src/vs/editor/test/browser/controller/textAreaState.test.ts +++ b/src/vs/editor/test/browser/controller/textAreaState.test.ts @@ -6,7 +6,6 @@ import * as assert from 'assert'; import { IENarratorTextAreaState, ISimpleModel, TextAreaState, ITextAreaWrapper } from 'vs/editor/browser/controller/textAreaState'; -import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; import { Disposable } from 'vs/base/common/lifecycle'; @@ -466,12 +465,6 @@ class SimpleModel implements ISimpleModel { private _lines: string[]; private _eol: string; - public coordinatesConverter = { - convertViewPositionToModelPosition: (viewPosition: Position): Position => { - return viewPosition; - } - }; - constructor(lines: string[], eol: string) { this._lines = lines; this._eol = eol; @@ -493,10 +486,6 @@ class SimpleModel implements ISimpleModel { throw new Error('Unknown EOL preference'); } - public getEOL(): string { - return this._eol; - } - public getValueInRange(range: Range, eol: EndOfLinePreference): string { if (Range.isEmpty(range)) { return ''; @@ -520,19 +509,7 @@ class SimpleModel implements ISimpleModel { return resultLines.join(lineEnding); } - public getModelLineContent(lineNumber: number): string { - return this._lines[lineNumber - 1]; - } - public getLineCount(): number { return this._lines.length; } - - public getPlainTextToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string { - return ''; - } - - public getHTMLToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string { - return ''; - } } From 710b7b45093b38ed73b815e124099e84f06839c6 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 3 May 2017 19:13:58 +0200 Subject: [PATCH 0159/2747] Fix build --- src/vs/monaco.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 328340dc7eeef..e26814d708c9c 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2956,8 +2956,8 @@ declare module monaco.editor { */ folding?: boolean; /** - * Enable automatic hiding of non-collapsed fold icons in the gutter - * Defaults to true + * Enable automatic hiding of non-collapsed fold icons in the gutter. + * Defaults to true. */ hideFoldIcons?: boolean; /** From 1a8b7a7dc7c0e06ece542256ae78bd923aba61c8 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 3 May 2017 12:47:53 -0700 Subject: [PATCH 0160/2747] Treat Script Tag Contents in HTML as JS (#25847) **Bug** Script contents in html are treated as typescript instead of javascript **Fix** Explicitly set the script kind to js Fixes #25846 --- extensions/html/server/src/modes/javascriptMode.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/html/server/src/modes/javascriptMode.ts b/extensions/html/server/src/modes/javascriptMode.ts index 0340f1be6b213..c31fb273a2a32 100644 --- a/extensions/html/server/src/modes/javascriptMode.ts +++ b/extensions/html/server/src/modes/javascriptMode.ts @@ -30,9 +30,10 @@ export function getJavascriptMode(documentRegions: LanguageModelCache compilerOptions, getScriptFileNames: () => [FILE_NAME, JQUERY_D_TS], + getScriptKind: () => ts.ScriptKind.JS, getScriptVersion: (fileName: string) => { if (fileName === FILE_NAME) { return String(scriptFileVersion); From b8e4c9b894d1ab1082c17c1b5a3e33e5a63119bd Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 3 May 2017 23:01:09 +0200 Subject: [PATCH 0161/2747] Debt: Simplify TextAreaState --- .../browser/controller/keyboardHandler.ts | 4 +- .../browser/controller/textAreaHandler.ts | 175 ++++++---- .../browser/controller/textAreaState.ts | 308 ++++-------------- .../test/browser/controller/imeTester.ts | 17 +- .../browser/controller/textAreaState.test.ts | 212 ++++++------ 5 files changed, 278 insertions(+), 438 deletions(-) diff --git a/src/vs/editor/browser/controller/keyboardHandler.ts b/src/vs/editor/browser/controller/keyboardHandler.ts index d40903f294001..225f4ad4c4883 100644 --- a/src/vs/editor/browser/controller/keyboardHandler.ts +++ b/src/vs/editor/browser/controller/keyboardHandler.ts @@ -7,8 +7,8 @@ import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; import { GlobalScreenReaderNVDA } from 'vs/editor/common/config/commonEditorConfig'; -import { TextAreaHandler, ITextAreaHandlerHost } from 'vs/editor/browser/controller/textAreaHandler'; -import { TextAreaStrategy, ISimpleModel } from 'vs/editor/browser/controller/textAreaState'; +import { TextAreaHandler, ITextAreaHandlerHost, TextAreaStrategy } from 'vs/editor/browser/controller/textAreaHandler'; +import { ISimpleModel } from 'vs/editor/browser/controller/textAreaState'; import { Range } from 'vs/editor/common/core/range'; import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler'; import { Configuration } from 'vs/editor/browser/config/configuration'; diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index 78517360e7023..5c613ee891698 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -9,7 +9,7 @@ import * as strings from 'vs/base/common/strings'; import Event, { Emitter } from 'vs/base/common/event'; import { KeyCode } from 'vs/base/common/keyCodes'; import { Disposable } from 'vs/base/common/lifecycle'; -import { ISimpleModel, ITypeData, TextAreaState, TextAreaStrategy, createTextAreaState, ITextAreaWrapper } from 'vs/editor/browser/controller/textAreaState'; +import { ISimpleModel, ITypeData, TextAreaState, ITextAreaWrapper, IENarratorStrategy, NVDAPagedStrategy } from 'vs/editor/browser/controller/textAreaState'; import { Range } from 'vs/editor/common/core/range'; import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; @@ -18,13 +18,17 @@ import { FastDomNode } from "vs/base/browser/fastDomNode"; export interface ICompositionEvent { data: string; - locale: string; } export const CopyOptions = { forceCopyWithSyntaxHighlighting: false }; +export const enum TextAreaStrategy { + IENarrator, + NVDA +} + const enum ReadFromTextArea { Type, Paste @@ -78,6 +82,7 @@ export class TextAreaHandler extends Disposable { private readonly _textArea: TextAreaWrapper; private readonly _model: ISimpleModel; + private _textAreaStrategy: TextAreaStrategy; private _selection: Range; private _hasFocus: boolean; @@ -94,12 +99,13 @@ export class TextAreaHandler extends Disposable { this._textArea = this._register(new TextAreaWrapper(textArea)); this._model = model; + this._textAreaStrategy = strategy; this._selection = new Range(1, 1, 1, 1); this._hasFocus = false; this._asyncTriggerCut = this._register(new RunOnceScheduler(() => this._onCut.fire(), 0)); - this._textAreaState = createTextAreaState(strategy); + this._textAreaState = TextAreaState.EMPTY; this._isDoingComposition = false; this._nextCommand = ReadFromTextArea.Type; @@ -122,30 +128,47 @@ export class TextAreaHandler extends Disposable { this._onKeyUp.fire(e); })); - let compositionLocale = null; - this._register(dom.addDisposableListener(textArea.domNode, 'compositionstart', (e: CompositionEvent) => { - if (this._isDoingComposition) { return; } - this._isDoingComposition = true; // In IE we cannot set .value when handling 'compositionstart' because the entire composition will get canceled. if (!browser.isEdgeOrIE) { - this.setTextAreaState('compositionstart', this._textAreaState.toEmpty(), false); + this._setAndWriteTextAreaState('compositionstart', TextAreaState.EMPTY, false); } this._onCompositionStart.fire(); })); + /** + * Deduce the typed input from a text area's value and the last observed state. + */ + const deduceInputFromTextAreaValue = (): [TextAreaState, ITypeData] => { + const oldState = this._textAreaState; + const newState = this._textAreaState.readFromTextArea(this._textArea); + return [newState, TextAreaState.deduceInput(oldState, newState)]; + }; + + /** + * Deduce the composition input from a string. + */ + const deduceComposition = (text: string): [TextAreaState, ITypeData] => { + const oldState = this._textAreaState; + const newState = TextAreaState.selectedText(text); + const typeInput: ITypeData = { + text: newState.value, + replaceCharCnt: oldState.selectionEnd - oldState.selectionStart + }; + return [newState, typeInput]; + }; + this._register(dom.addDisposableListener(textArea.domNode, 'compositionupdate', (e: CompositionEvent) => { if (isChromev55_v56) { // See https://github.com/Microsoft/monaco-editor/issues/320 // where compositionupdate .data is broken in Chrome v55 and v56 // See https://bugs.chromium.org/p/chromium/issues/detail?id=677050#c9 - compositionLocale = e.locale; // The textArea doesn't get the composition update yet, the value of textarea is still obsolete // so we can't correct e at this moment. return; @@ -156,15 +179,15 @@ export class TextAreaHandler extends Disposable { // Multi-part Japanese compositions reset cursor in Edge/IE, Chinese and Korean IME don't have this issue. // The reason that we can't use this path for all CJK IME is IE and Edge behave differently when handling Korean IME, // which breaks this path of code. - this._textAreaState = this._textAreaState.fromTextArea(this._textArea); - let typeInput = this._textAreaState.deduceInput(); + const [newState, typeInput] = deduceInputFromTextAreaValue(); + this._textAreaState = newState; this._onType.fire(typeInput); this._onCompositionUpdate.fire(e); return; } - this._textAreaState = this._textAreaState.fromText(e.data); - let typeInput = this._textAreaState.updateComposition(); + const [newState, typeInput] = deduceComposition(e.data); + this._textAreaState = newState; this._onType.fire(typeInput); this._onCompositionUpdate.fire(e); })); @@ -173,20 +196,20 @@ export class TextAreaHandler extends Disposable { // console.log('onCompositionEnd: ' + e.data); if (browser.isEdgeOrIE && e.locale === 'ja') { // https://github.com/Microsoft/monaco-editor/issues/339 - this._textAreaState = this._textAreaState.fromTextArea(this._textArea); - let typeInput = this._textAreaState.deduceInput(); + const [newState, typeInput] = deduceInputFromTextAreaValue(); + this._textAreaState = newState; this._onType.fire(typeInput); } else { - this._textAreaState = this._textAreaState.fromText(e.data); - let typeInput = this._textAreaState.updateComposition(); + const [newState, typeInput] = deduceComposition(e.data); + this._textAreaState = newState; this._onType.fire(typeInput); } // Due to isEdgeOrIE (where the textarea was not cleared initially) and isChrome (the textarea is not updated correctly when composition ends) // we cannot assume the text at the end consists only of the composited text if (browser.isEdgeOrIE || browser.isChrome) { - this._textAreaState = this._textAreaState.fromTextArea(this._textArea); + this._textAreaState = this._textAreaState.readFromTextArea(this._textArea); } if (!this._isDoingComposition) { @@ -202,13 +225,12 @@ export class TextAreaHandler extends Disposable { if (this._isDoingComposition) { // See https://github.com/Microsoft/monaco-editor/issues/320 if (isChromev55_v56) { - let text = this._textArea.getValue(); - this._textAreaState = this._textAreaState.fromText(text); - let typeInput = this._textAreaState.updateComposition(); + const [newState, typeInput] = deduceComposition(this._textArea.getValue()); + this._textAreaState = newState; + this._onType.fire(typeInput); - let e = { - locale: compositionLocale, - data: text + let e: ICompositionEvent = { + data: typeInput.text }; this._onCompositionUpdate.fire(e); } @@ -216,8 +238,7 @@ export class TextAreaHandler extends Disposable { return; } - let tempTextAreaState = this._textAreaState.fromTextArea(this._textArea); - let typeInput = tempTextAreaState.deduceInput(); + const [tempTextAreaState, typeInput] = deduceInputFromTextAreaValue(); if (typeInput.replaceCharCnt === 0 && typeInput.text.length === 1 && strings.isHighSurrogate(typeInput.text.charCodeAt(0))) { // Ignore invalid input but keep it around for next time return; @@ -230,7 +251,11 @@ export class TextAreaHandler extends Disposable { this._onType.fire(typeInput); } } else { - this.executePaste(typeInput.text); + if (typeInput.text !== '') { + this._onPaste.fire({ + text: typeInput.text + }); + } this._nextCommand = ReadFromTextArea.Type; } })); @@ -248,11 +273,16 @@ export class TextAreaHandler extends Disposable { this._register(dom.addDisposableListener(textArea.domNode, 'paste', (e: ClipboardEvent) => { if (ClipboardEventUtils.canUseTextData(e)) { - this.executePaste(ClipboardEventUtils.getTextData(e)); + const pastePlainText = ClipboardEventUtils.getTextData(e); + if (pastePlainText !== '') { + this._onPaste.fire({ + text: pastePlainText + }); + } } else { if (this._textArea.getSelectionStart() !== this._textArea.getSelectionEnd()) { // Clean up the textarea, to get a clean paste - this.setTextAreaState('paste', this._textAreaState.toEmpty(), false); + this._setAndWriteTextAreaState('paste', TextAreaState.EMPTY, false); } this._nextCommand = ReadFromTextArea.Paste; } @@ -268,7 +298,12 @@ export class TextAreaHandler extends Disposable { // --- begin event handlers public setStrategy(strategy: TextAreaStrategy): void { - this._textAreaState = this._textAreaState.toStrategy(strategy); + if (this._textAreaStrategy === strategy) { + // no change + return; + } + this._textAreaStrategy = strategy; + this._writePlaceholderAndSelectTextArea('strategy changed', false); } public setHasFocus(isFocused: boolean): void { @@ -289,56 +324,59 @@ export class TextAreaHandler extends Disposable { // --- end event handlers - private setTextAreaState(reason: string, textAreaState: TextAreaState, forceFocus: boolean): void { + private _setAndWriteTextAreaState(reason: string, textAreaState: TextAreaState, forceFocus: boolean): void { if (!this._hasFocus) { - textAreaState = textAreaState.resetSelection(); + textAreaState = textAreaState.collapseSelection(); } - textAreaState.applyToTextArea(reason, this._textArea, this._hasFocus || forceFocus); + textAreaState.writeToTextArea(reason, this._textArea, this._hasFocus || forceFocus); this._textAreaState = textAreaState; } // ------------- Operations that are always executed asynchronously - private executePaste(txt: string): void { - if (txt === '') { - return; - } - this._onPaste.fire({ - text: txt - }); - } - public focusTextArea(): void { this._writePlaceholderAndSelectTextArea('focusTextArea', true); } private _writePlaceholderAndSelectTextArea(reason: string, forceFocus: boolean): void { - if (!this._isDoingComposition) { - // Do not write to the textarea if it is visible. - if (browser.isIPad) { - // Do not place anything in the textarea for the iPad - this.setTextAreaState(reason, this._textAreaState.toEmpty(), forceFocus); - } else { - this.setTextAreaState(reason, this._textAreaState.fromEditorSelection(this._model, this._selection), forceFocus); - } + if (this._isDoingComposition) { + // Do not write to the text area when doing composition + return; } - } - // ------------- Clipboard operations + if (browser.isIPad) { + // Do not place anything in the textarea for the iPad + this._setAndWriteTextAreaState(reason, TextAreaState.EMPTY, forceFocus); + + } else if (this._textAreaStrategy === TextAreaStrategy.IENarrator) { + + const newState = IENarratorStrategy.fromEditorSelection(this._textAreaState, this._model, this._selection); + this._setAndWriteTextAreaState(reason, newState, forceFocus); - private _ensureClipboardGetsEditorSelection(e: ClipboardEvent): void { - let whatToCopy = this._host.getPlainTextToCopy(); - if (ClipboardEventUtils.canUseTextData(e)) { - let whatHTMLToCopy: string = null; - if (!browser.isEdgeOrIE && (whatToCopy.length < 65536 || CopyOptions.forceCopyWithSyntaxHighlighting)) { - whatHTMLToCopy = this._host.getHTMLToCopy(); - } - ClipboardEventUtils.setTextData(e, whatToCopy, whatHTMLToCopy); } else { - this.setTextAreaState('copy or cut', this._textAreaState.fromText(whatToCopy), false); + + const newState = NVDAPagedStrategy.fromEditorSelection(this._textAreaState, this._model, this._selection); + this._setAndWriteTextAreaState(reason, newState, forceFocus); + } } + + private _ensureClipboardGetsEditorSelection(e: ClipboardEvent): void { + const copyPlainText = this._host.getPlainTextToCopy(); + if (!ClipboardEventUtils.canUseTextData(e)) { + // Looks like an old browser. The strategy is to place the text + // we'd like to be copied to the clipboard in the textarea and select it. + this._setAndWriteTextAreaState('copy or cut', TextAreaState.selectedText(copyPlainText), false); + return; + } + + let copyHTML: string = null; + if (!browser.isEdgeOrIE && (copyPlainText.length < 65536 || CopyOptions.forceCopyWithSyntaxHighlighting)) { + copyHTML = this._host.getHTMLToCopy(); + } + ClipboardEventUtils.setTextData(e, copyPlainText, copyHTML); + } } class ClipboardEventUtils { @@ -402,8 +440,13 @@ class TextAreaWrapper extends Disposable implements ITextAreaWrapper { } public setValue(reason: string, value: string): void { + const textArea = this._actual.domNode; + if (textArea.value === value) { + // No change + return; + } // console.log('reason: ' + reason + ', current value: ' + this._textArea.value + ' => new value: ' + value); - this._actual.domNode.value = value; + textArea.value = value; } public getSelectionStart(): number { @@ -431,12 +474,4 @@ class TextAreaWrapper extends Disposable implements ITextAreaWrapper { } } } - - public isInOverwriteMode(): boolean { - // In IE, pressing Insert will bring the typing into overwrite mode - if (browser.isIE && document.queryCommandValue('OverWrite')) { - return true; - } - return false; - } } diff --git a/src/vs/editor/browser/controller/textAreaState.ts b/src/vs/editor/browser/controller/textAreaState.ts index e5ebbe1e456d2..38e82909a6670 100644 --- a/src/vs/editor/browser/controller/textAreaState.ts +++ b/src/vs/editor/browser/controller/textAreaState.ts @@ -12,11 +12,10 @@ import { Constants } from 'vs/editor/common/core/uint'; export interface ITextAreaWrapper { getValue(): string; setValue(reason: string, value: string): void; + getSelectionStart(): number; getSelectionEnd(): number; - setSelectionRange(selectionStart: number, selectionEnd: number): void; - isInOverwriteMode(): boolean; } export interface ISimpleModel { @@ -30,92 +29,60 @@ export interface ITypeData { replaceCharCnt: number; } -export enum TextAreaStrategy { - IENarrator, - NVDA -} +export class TextAreaState { -const USE_NVDA_FULL_TEXT = false; + public static EMPTY = new TextAreaState('', 0, 0, 0); -export function createTextAreaState(strategy: TextAreaStrategy): TextAreaState { - if (strategy === TextAreaStrategy.IENarrator) { - return IENarratorTextAreaState.EMPTY; - } - if (USE_NVDA_FULL_TEXT) { - return NVDAFullTextAreaState.EMPTY; - } - return NVDAPagedTextAreaState.EMPTY; -} - -export abstract class TextAreaState { + public readonly value: string; + public readonly selectionStart: number; + public readonly selectionEnd: number; + public readonly selectionToken: number; - protected previousState: TextAreaState; - protected value: string; - protected selectionStart: number; - protected selectionEnd: number; - protected isInOverwriteMode: boolean; - - constructor(previousState: TextAreaState, value: string, selectionStart: number, selectionEnd: number, isInOverwriteMode: boolean) { - this.previousState = previousState ? previousState.shallowClone() : null; + constructor(value: string, selectionStart: number, selectionEnd: number, selectionToken: number) { this.value = value; this.selectionStart = selectionStart; this.selectionEnd = selectionEnd; - this.isInOverwriteMode = isInOverwriteMode; + this.selectionToken = selectionToken; } - protected abstract shallowClone(): TextAreaState; - - public abstract toEmpty(): TextAreaState; - - public abstract toString(): string; - - public abstract toStrategy(strategy: TextAreaStrategy): TextAreaState; - - public abstract equals(other: TextAreaState): boolean; - - public abstract fromTextArea(textArea: ITextAreaWrapper): TextAreaState; - - public abstract fromEditorSelection(model: ISimpleModel, selection: Range); - - public abstract fromText(text: string): TextAreaState; - - public updateComposition(): ITypeData { - if (!this.previousState) { - // This is the EMPTY state - return { - text: '', - replaceCharCnt: 0 - }; + public equals(other: TextAreaState): boolean { + if (other instanceof TextAreaState) { + return ( + this.value === other.value + && this.selectionStart === other.selectionStart + && this.selectionEnd === other.selectionEnd + && this.selectionToken === other.selectionToken + ); } - - return { - text: this.value, - replaceCharCnt: this.previousState.selectionEnd - this.previousState.selectionStart - }; + return false; } - public abstract resetSelection(): TextAreaState; + public toString(): string { + return '[ <' + this.value + '>, selectionStart: ' + this.selectionStart + ', selectionEnd: ' + this.selectionEnd + ', selectionToken: ' + this.selectionToken + ']'; + } - public getSelectionStart(): number { - return this.selectionStart; + public readFromTextArea(textArea: ITextAreaWrapper): TextAreaState { + return new TextAreaState(textArea.getValue(), textArea.getSelectionStart(), textArea.getSelectionEnd(), this.selectionToken); } - public getValue(): string { - return this.value; + public collapseSelection(): TextAreaState { + return new TextAreaState(this.value, this.value.length, this.value.length, this.selectionToken); } - public applyToTextArea(reason: string, textArea: ITextAreaWrapper, select: boolean): void { + public writeToTextArea(reason: string, textArea: ITextAreaWrapper, select: boolean): void { // console.log(Date.now() + ': applyToTextArea ' + reason + ': ' + this.toString()); - if (textArea.getValue() !== this.value) { - textArea.setValue(reason, this.value); - } + textArea.setValue(reason, this.value); if (select) { textArea.setSelectionRange(this.selectionStart, this.selectionEnd); } } - public deduceInput(): ITypeData { - if (!this.previousState) { + public static selectedText(text: string): TextAreaState { + return new TextAreaState(text, 0, text.length, 0); + } + + public static deduceInput(previousState: TextAreaState, currentState: TextAreaState): ITypeData { + if (!previousState) { // This is the EMPTY state return { text: '', @@ -124,15 +91,15 @@ export abstract class TextAreaState { } // console.log('------------------------deduceInput'); - // console.log('CURRENT STATE: ' + this.toString()); - // console.log('PREVIOUS STATE: ' + this.previousState.toString()); + // console.log('CURRENT STATE: ' + currentState.toString()); + // console.log('PREVIOUS STATE: ' + prevState.toString()); - let previousValue = this.previousState.value; - let previousSelectionStart = this.previousState.selectionStart; - let previousSelectionEnd = this.previousState.selectionEnd; - let currentValue = this.value; - let currentSelectionStart = this.selectionStart; - let currentSelectionEnd = this.selectionEnd; + let previousValue = previousState.value; + let previousSelectionStart = previousState.selectionStart; + let previousSelectionEnd = previousState.selectionEnd; + let currentValue = currentState.value; + let currentSelectionStart = currentState.selectionStart; + let currentSelectionEnd = currentState.selectionEnd; // Strip the previous suffix from the value (without interfering with the current selection) let previousSuffix = previousValue.substring(previousSelectionEnd); @@ -189,56 +156,9 @@ export abstract class TextAreaState { } } -export class IENarratorTextAreaState extends TextAreaState { - public static EMPTY = new IENarratorTextAreaState(null, '', 0, 0, false, 0); - - private selectionToken: number; +export class IENarratorStrategy { - constructor(previousState: TextAreaState, value: string, selectionStart: number, selectionEnd: number, isInOverwriteMode: boolean, selectionToken: number) { - super(previousState, value, selectionStart, selectionEnd, isInOverwriteMode); - this.selectionToken = selectionToken; - } - - protected shallowClone(): TextAreaState { - return new IENarratorTextAreaState(null, this.value, this.selectionStart, this.selectionEnd, this.isInOverwriteMode, this.selectionToken); - } - - public toEmpty(): TextAreaState { - return IENarratorTextAreaState.EMPTY; - } - - public toString(): string { - return '[ <' + this.value + '>, selectionStart: ' + this.selectionStart + ', selectionEnd: ' + this.selectionEnd + ', isInOverwriteMode: ' + this.isInOverwriteMode + ', selectionToken: ' + this.selectionToken + ']'; - } - - public toStrategy(strategy: TextAreaStrategy): TextAreaState { - if (strategy === TextAreaStrategy.IENarrator) { - return this; - } - if (USE_NVDA_FULL_TEXT) { - return new NVDAFullTextAreaState(this.previousState, this.value, this.selectionStart, this.selectionEnd, this.isInOverwriteMode); - } - return new NVDAPagedTextAreaState(this.previousState, this.value, this.selectionStart, this.selectionEnd, this.isInOverwriteMode); - } - - public equals(other: TextAreaState): boolean { - if (other instanceof IENarratorTextAreaState) { - return ( - this.value === other.value - && this.selectionStart === other.selectionStart - && this.selectionEnd === other.selectionEnd - && this.isInOverwriteMode === other.isInOverwriteMode - && this.selectionToken === other.selectionToken - ); - } - return false; - } - - public fromTextArea(textArea: ITextAreaWrapper): TextAreaState { - return new IENarratorTextAreaState(this, textArea.getValue(), textArea.getSelectionStart(), textArea.getSelectionEnd(), textArea.isInOverwriteMode(), this.selectionToken); - } - - public fromEditorSelection(model: ISimpleModel, selection: Range): TextAreaState { + public static fromEditorSelection(previousState: TextAreaState, model: ISimpleModel, selection: Range): TextAreaState { let LIMIT_CHARS = 100; let PADDING_LINES_COUNT = 0; @@ -249,7 +169,7 @@ export class IENarratorTextAreaState extends TextAreaState { selectionEndLineNumberMaxColumn = model.getLineMaxColumn(selectionEndLineNumber); // If the selection is empty and we have switched line numbers, expand selection to full line (helps Narrator trigger a full line read) - if (selection.isEmpty() && this.selectionToken !== selectionStartLineNumber) { + if (selection.isEmpty() && previousState && previousState.selectionToken !== selectionStartLineNumber) { selectionStartColumn = 1; selectionEndColumn = selectionEndLineNumberMaxColumn; } @@ -284,79 +204,31 @@ export class IENarratorTextAreaState extends TextAreaState { text = text.substring(0, LIMIT_CHARS) + String.fromCharCode(8230) + text.substring(text.length - LIMIT_CHARS, text.length); } - return new IENarratorTextAreaState(this, pretext + text + posttext, pretext.length, pretext.length + text.length, false, selectionStartLineNumber); - } - - public fromText(text: string): TextAreaState { - return new IENarratorTextAreaState(this, text, 0, text.length, false, 0); - } - - public resetSelection(): TextAreaState { - return new IENarratorTextAreaState(this.previousState, this.value, this.value.length, this.value.length, this.isInOverwriteMode, this.selectionToken); + return new TextAreaState(pretext + text + posttext, pretext.length, pretext.length + text.length, selectionStartLineNumber); } } -export class NVDAPagedTextAreaState extends TextAreaState { - public static EMPTY = new NVDAPagedTextAreaState(null, '', 0, 0, false); +export class NVDAPagedStrategy { private static _LINES_PER_PAGE = 10; - constructor(previousState: TextAreaState, value: string, selectionStart: number, selectionEnd: number, isInOverwriteMode: boolean) { - super(previousState, value, selectionStart, selectionEnd, isInOverwriteMode); - } - - protected shallowClone(): TextAreaState { - return new NVDAPagedTextAreaState(null, this.value, this.selectionStart, this.selectionEnd, this.isInOverwriteMode); - } - - public toEmpty(): TextAreaState { - return NVDAPagedTextAreaState.EMPTY; - } - - public toString(): string { - return '[ <' + this.value + '>, selectionStart: ' + this.selectionStart + ', selectionEnd: ' + this.selectionEnd + ', isInOverwriteMode: ' + this.isInOverwriteMode + ']'; - } - - public toStrategy(strategy: TextAreaStrategy): TextAreaState { - if (strategy === TextAreaStrategy.NVDA) { - return this; - } - return new IENarratorTextAreaState(this.previousState, this.value, this.selectionStart, this.selectionEnd, this.isInOverwriteMode, 0); - } - - public equals(other: TextAreaState): boolean { - if (other instanceof NVDAPagedTextAreaState) { - return ( - this.value === other.value - && this.selectionStart === other.selectionStart - && this.selectionEnd === other.selectionEnd - && this.isInOverwriteMode === other.isInOverwriteMode - ); - } - return false; - } - - public fromTextArea(textArea: ITextAreaWrapper): TextAreaState { - return new NVDAPagedTextAreaState(this, textArea.getValue(), textArea.getSelectionStart(), textArea.getSelectionEnd(), textArea.isInOverwriteMode()); - } - private static _getPageOfLine(lineNumber: number): number { - return Math.floor((lineNumber - 1) / NVDAPagedTextAreaState._LINES_PER_PAGE); + return Math.floor((lineNumber - 1) / NVDAPagedStrategy._LINES_PER_PAGE); } private static _getRangeForPage(page: number): Range { - let offset = page * NVDAPagedTextAreaState._LINES_PER_PAGE; + let offset = page * NVDAPagedStrategy._LINES_PER_PAGE; let startLineNumber = offset + 1; - let endLineNumber = offset + NVDAPagedTextAreaState._LINES_PER_PAGE; + let endLineNumber = offset + NVDAPagedStrategy._LINES_PER_PAGE; return new Range(startLineNumber, 1, endLineNumber, Constants.MAX_SAFE_SMALL_INTEGER); } - public fromEditorSelection(model: ISimpleModel, selection: Range): TextAreaState { + public static fromEditorSelection(previousState: TextAreaState, model: ISimpleModel, selection: Range): TextAreaState { - let selectionStartPage = NVDAPagedTextAreaState._getPageOfLine(selection.startLineNumber); - let selectionStartPageRange = NVDAPagedTextAreaState._getRangeForPage(selectionStartPage); + let selectionStartPage = NVDAPagedStrategy._getPageOfLine(selection.startLineNumber); + let selectionStartPageRange = NVDAPagedStrategy._getRangeForPage(selectionStartPage); - let selectionEndPage = NVDAPagedTextAreaState._getPageOfLine(selection.endLineNumber); - let selectionEndPageRange = NVDAPagedTextAreaState._getRangeForPage(selectionEndPage); + let selectionEndPage = NVDAPagedStrategy._getPageOfLine(selection.endLineNumber); + let selectionEndPageRange = NVDAPagedStrategy._getRangeForPage(selectionEndPage); let pretextRange = selectionStartPageRange.intersectRanges(new Range(1, 1, selection.startLineNumber, selection.startColumn)); let pretext = model.getValueInRange(pretextRange, EndOfLinePreference.LF); @@ -393,76 +265,6 @@ export class NVDAPagedTextAreaState extends TextAreaState { text = text.substring(0, LIMIT_CHARS) + String.fromCharCode(8230) + text.substring(text.length - LIMIT_CHARS, text.length); } - return new NVDAPagedTextAreaState(this, pretext + text + posttext, pretext.length, pretext.length + text.length, false); - } - - public fromText(text: string): TextAreaState { - return new NVDAPagedTextAreaState(this, text, 0, text.length, false); - } - - public resetSelection(): TextAreaState { - return new NVDAPagedTextAreaState(this.previousState, this.value, this.value.length, this.value.length, this.isInOverwriteMode); - } -} - - -export class NVDAFullTextAreaState extends TextAreaState { - public static EMPTY = new NVDAFullTextAreaState(null, '', 0, 0, false); - - constructor(previousState: TextAreaState, value: string, selectionStart: number, selectionEnd: number, isInOverwriteMode: boolean) { - super(previousState, value, selectionStart, selectionEnd, isInOverwriteMode); - } - - protected shallowClone(): TextAreaState { - return new NVDAFullTextAreaState(null, this.value, this.selectionStart, this.selectionEnd, this.isInOverwriteMode); - } - - public toEmpty(): TextAreaState { - return NVDAFullTextAreaState.EMPTY; - } - - public toString(): string { - return '[ , selectionStart: ' + this.selectionStart + ', selectionEnd: ' + this.selectionEnd + ', isInOverwriteMode: ' + this.isInOverwriteMode + ']'; - } - - public toStrategy(strategy: TextAreaStrategy): TextAreaState { - if (strategy === TextAreaStrategy.NVDA) { - return this; - } - return new IENarratorTextAreaState(this.previousState, this.value, this.selectionStart, this.selectionEnd, this.isInOverwriteMode, 0); - } - - public equals(other: TextAreaState): boolean { - if (other instanceof NVDAFullTextAreaState) { - return ( - this.value === other.value - && this.selectionStart === other.selectionStart - && this.selectionEnd === other.selectionEnd - && this.isInOverwriteMode === other.isInOverwriteMode - ); - } - return false; - } - - public fromTextArea(textArea: ITextAreaWrapper): TextAreaState { - return new NVDAFullTextAreaState(this, textArea.getValue(), textArea.getSelectionStart(), textArea.getSelectionEnd(), textArea.isInOverwriteMode()); - } - - public fromEditorSelection(model: ISimpleModel, selection: Range): TextAreaState { - let pretext = model.getValueInRange(new Range(1, 1, selection.startLineNumber, selection.startColumn), EndOfLinePreference.LF); - let text = model.getValueInRange(selection, EndOfLinePreference.LF); - let lastLine = model.getLineCount(); - let lastLineMaxColumn = model.getLineMaxColumn(lastLine); - let posttext = model.getValueInRange(new Range(selection.endLineNumber, selection.endColumn, lastLine, lastLineMaxColumn), EndOfLinePreference.LF); - - return new NVDAFullTextAreaState(this, pretext + text + posttext, pretext.length, pretext.length + text.length, false); - } - - public fromText(text: string): TextAreaState { - return new NVDAFullTextAreaState(this, text, 0, text.length, false); - } - - public resetSelection(): TextAreaState { - return new NVDAFullTextAreaState(this.previousState, this.value, this.value.length, this.value.length, this.isInOverwriteMode); + return new TextAreaState(pretext + text + posttext, pretext.length, pretext.length + text.length, selection.startLineNumber); } } diff --git a/src/vs/editor/test/browser/controller/imeTester.ts b/src/vs/editor/test/browser/controller/imeTester.ts index 9ee87fcd50fc9..97b96d7ec6ce3 100644 --- a/src/vs/editor/test/browser/controller/imeTester.ts +++ b/src/vs/editor/test/browser/controller/imeTester.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { TextAreaHandler, ITextAreaHandlerHost } from 'vs/editor/browser/controller/textAreaHandler'; -import { TextAreaStrategy, ISimpleModel } from 'vs/editor/browser/controller/textAreaState'; +import { TextAreaHandler, ITextAreaHandlerHost, TextAreaStrategy } from 'vs/editor/browser/controller/textAreaHandler'; +import { ISimpleModel } from 'vs/editor/browser/controller/textAreaState'; import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { createFastDomNode } from 'vs/base/browser/fastDomNode'; @@ -67,7 +67,18 @@ function doCreateTest(strategy: TextAreaStrategy, description: string, inputStr: let title = document.createElement('div'); title.className = 'title'; - title.innerHTML = TextAreaStrategy[strategy] + ' strategy: ' + description + '. Type ' + inputStr + ''; + + const toStr = (value: TextAreaStrategy): string => { + if (value === TextAreaStrategy.IENarrator) { + return 'IENarrator'; + } + if (value === TextAreaStrategy.NVDA) { + return 'NVDA'; + } + return '???'; + }; + + title.innerHTML = toStr(strategy) + ' strategy: ' + description + '. Type ' + inputStr + ''; container.appendChild(title); let startBtn = document.createElement('button'); diff --git a/src/vs/editor/test/browser/controller/textAreaState.test.ts b/src/vs/editor/test/browser/controller/textAreaState.test.ts index 3ae07ec1733f1..9f99fc9a86a95 100644 --- a/src/vs/editor/test/browser/controller/textAreaState.test.ts +++ b/src/vs/editor/test/browser/controller/textAreaState.test.ts @@ -5,7 +5,7 @@ 'use strict'; import * as assert from 'assert'; -import { IENarratorTextAreaState, ISimpleModel, TextAreaState, ITextAreaWrapper } from 'vs/editor/browser/controller/textAreaState'; +import { ISimpleModel, TextAreaState, ITextAreaWrapper, IENarratorStrategy } from 'vs/editor/browser/controller/textAreaState'; import { Range } from 'vs/editor/common/core/range'; import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; import { Disposable } from 'vs/base/common/lifecycle'; @@ -15,14 +15,12 @@ export class MockTextAreaWrapper extends Disposable implements ITextAreaWrapper public _value: string; public _selectionStart: number; public _selectionEnd: number; - public _isInOverwriteMode: boolean; constructor() { super(); this._value = ''; this._selectionStart = 0; this._selectionEnd = 0; - this._isInOverwriteMode = false; } public getValue(): string { @@ -59,16 +57,12 @@ export class MockTextAreaWrapper extends Disposable implements ITextAreaWrapper this._selectionStart = selectionStart; this._selectionEnd = selectionEnd; } - - public isInOverwriteMode(): boolean { - return this._isInOverwriteMode; - } } suite('TextAreaState', () => { - function assertTextAreaState(actual: TextAreaState, value: string, selectionStart: number, selectionEnd: number, isInOverwriteMode: boolean, selectionToken: number): void { - let desired = new IENarratorTextAreaState(null, value, selectionStart, selectionEnd, isInOverwriteMode, selectionToken); + function assertTextAreaState(actual: TextAreaState, value: string, selectionStart: number, selectionEnd: number, selectionToken: number): void { + let desired = new TextAreaState(value, selectionStart, selectionEnd, selectionToken); assert.ok(desired.equals(actual), desired.toString() + ' == ' + actual.toString()); } @@ -77,15 +71,14 @@ suite('TextAreaState', () => { textArea._value = 'Hello world!'; textArea._selectionStart = 1; textArea._selectionEnd = 12; - textArea._isInOverwriteMode = false; - let actual = IENarratorTextAreaState.EMPTY.fromTextArea(textArea); + let actual = TextAreaState.EMPTY.readFromTextArea(textArea); - assertTextAreaState(actual, 'Hello world!', 1, 12, false, 0); - assert.equal(actual.getValue(), 'Hello world!'); - assert.equal(actual.getSelectionStart(), 1); + assertTextAreaState(actual, 'Hello world!', 1, 12, 0); + assert.equal(actual.value, 'Hello world!'); + assert.equal(actual.selectionStart, 1); - actual = actual.resetSelection(); - assertTextAreaState(actual, 'Hello world!', 12, 12, false, 0); + actual = actual.collapseSelection(); + assertTextAreaState(actual, 'Hello world!', 12, 12, 0); textArea.dispose(); }); @@ -95,24 +88,23 @@ suite('TextAreaState', () => { textArea._value = 'Hello world!'; textArea._selectionStart = 1; textArea._selectionEnd = 12; - textArea._isInOverwriteMode = false; - let state = new IENarratorTextAreaState(null, 'Hi world!', 2, 2, false, 0); - state.applyToTextArea('test', textArea, false); + let state = new TextAreaState('Hi world!', 2, 2, 0); + state.writeToTextArea('test', textArea, false); assert.equal(textArea._value, 'Hi world!'); assert.equal(textArea._selectionStart, 9); assert.equal(textArea._selectionEnd, 9); - state = new IENarratorTextAreaState(null, 'Hi world!', 3, 3, false, 0); - state.applyToTextArea('test', textArea, false); + state = new TextAreaState('Hi world!', 3, 3, 0); + state.writeToTextArea('test', textArea, false); assert.equal(textArea._value, 'Hi world!'); assert.equal(textArea._selectionStart, 9); assert.equal(textArea._selectionEnd, 9); - state = new IENarratorTextAreaState(null, 'Hi world!', 0, 2, false, 0); - state.applyToTextArea('test', textArea, true); + state = new TextAreaState('Hi world!', 0, 2, 0); + state.writeToTextArea('test', textArea, true); assert.equal(textArea._value, 'Hi world!'); assert.equal(textArea._selectionStart, 0); @@ -121,16 +113,16 @@ suite('TextAreaState', () => { textArea.dispose(); }); - function testDeduceInput(prevState: TextAreaState, value: string, selectionStart: number, selectionEnd: number, isInOverwriteMode: boolean, expected: string, expectedCharReplaceCnt: number): void { + function testDeduceInput(prevState: TextAreaState, value: string, selectionStart: number, selectionEnd: number, expected: string, expectedCharReplaceCnt: number): void { + prevState = prevState || TextAreaState.EMPTY; + let textArea = new MockTextAreaWrapper(); textArea._value = value; textArea._selectionStart = selectionStart; textArea._selectionEnd = selectionEnd; - textArea._isInOverwriteMode = isInOverwriteMode; - - let newState = (prevState || IENarratorTextAreaState.EMPTY).fromTextArea(textArea); - let actual = newState.deduceInput(); + let newState = prevState.readFromTextArea(textArea); + let actual = TextAreaState.deduceInput(prevState, newState); assert.equal(actual.text, expected); assert.equal(actual.replaceCharCnt, expectedCharReplaceCnt); @@ -146,92 +138,92 @@ suite('TextAreaState', () => { // - expected: せんせい // s - // PREVIOUS STATE: [ <>, selectionStart: 0, selectionEnd: 0, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <s>, selectionStart: 0, selectionEnd: 1, isInOverwriteMode: false, selectionToken: 0] + // PREVIOUS STATE: [ <>, selectionStart: 0, selectionEnd: 0, selectionToken: 0] + // CURRENT STATE: [ <s>, selectionStart: 0, selectionEnd: 1, selectionToken: 0] testDeduceInput( - new IENarratorTextAreaState(null, '', 0, 0, false, 0), + TextAreaState.EMPTY, 's', - 0, 1, false, + 0, 1, 's', 0 ); // e - // PREVIOUS STATE: [ <s>, selectionStart: 0, selectionEnd: 1, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せ>, selectionStart: 0, selectionEnd: 1, isInOverwriteMode: false, selectionToken: 0] + // PREVIOUS STATE: [ <s>, selectionStart: 0, selectionEnd: 1, selectionToken: 0] + // CURRENT STATE: [ <せ>, selectionStart: 0, selectionEnd: 1, selectionToken: 0] testDeduceInput( - new IENarratorTextAreaState(null, 's', 0, 1, false, 0), + new TextAreaState('s', 0, 1, 0), 'せ', - 0, 1, false, + 0, 1, 'せ', 1 ); // n - // PREVIOUS STATE: [ <せ>, selectionStart: 0, selectionEnd: 1, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せn>, selectionStart: 0, selectionEnd: 2, isInOverwriteMode: false, selectionToken: 0] + // PREVIOUS STATE: [ <せ>, selectionStart: 0, selectionEnd: 1, selectionToken: 0] + // CURRENT STATE: [ <せn>, selectionStart: 0, selectionEnd: 2, selectionToken: 0] testDeduceInput( - new IENarratorTextAreaState(null, 'せ', 0, 1, false, 0), + new TextAreaState('せ', 0, 1, 0), 'せn', - 0, 2, false, + 0, 2, 'せn', 1 ); // n - // PREVIOUS STATE: [ <せn>, selectionStart: 0, selectionEnd: 2, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せん>, selectionStart: 0, selectionEnd: 2, isInOverwriteMode: false, selectionToken: 0] + // PREVIOUS STATE: [ <せn>, selectionStart: 0, selectionEnd: 2, selectionToken: 0] + // CURRENT STATE: [ <せん>, selectionStart: 0, selectionEnd: 2, selectionToken: 0] testDeduceInput( - new IENarratorTextAreaState(null, 'せn', 0, 2, false, 0), + new TextAreaState('せn', 0, 2, 0), 'せん', - 0, 2, false, + 0, 2, 'せん', 2 ); // s - // PREVIOUS STATE: [ <せん>, selectionStart: 0, selectionEnd: 2, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せんs>, selectionStart: 0, selectionEnd: 3, isInOverwriteMode: false, selectionToken: 0] + // PREVIOUS STATE: [ <せん>, selectionStart: 0, selectionEnd: 2, selectionToken: 0] + // CURRENT STATE: [ <せんs>, selectionStart: 0, selectionEnd: 3, selectionToken: 0] testDeduceInput( - new IENarratorTextAreaState(null, 'せん', 0, 2, false, 0), + new TextAreaState('せん', 0, 2, 0), 'せんs', - 0, 3, false, + 0, 3, 'せんs', 2 ); // e - // PREVIOUS STATE: [ <せんs>, selectionStart: 0, selectionEnd: 3, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せんせ>, selectionStart: 0, selectionEnd: 3, isInOverwriteMode: false, selectionToken: 0] + // PREVIOUS STATE: [ <せんs>, selectionStart: 0, selectionEnd: 3, selectionToken: 0] + // CURRENT STATE: [ <せんせ>, selectionStart: 0, selectionEnd: 3, selectionToken: 0] testDeduceInput( - new IENarratorTextAreaState(null, 'せんs', 0, 3, false, 0), + new TextAreaState('せんs', 0, 3, 0), 'せんせ', - 0, 3, false, + 0, 3, 'せんせ', 3 ); // no-op? [was recorded] - // PREVIOUS STATE: [ <せんせ>, selectionStart: 0, selectionEnd: 3, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せんせ>, selectionStart: 0, selectionEnd: 3, isInOverwriteMode: false, selectionToken: 0] + // PREVIOUS STATE: [ <せんせ>, selectionStart: 0, selectionEnd: 3, selectionToken: 0] + // CURRENT STATE: [ <せんせ>, selectionStart: 0, selectionEnd: 3, selectionToken: 0] testDeduceInput( - new IENarratorTextAreaState(null, 'せんせ', 0, 3, false, 0), + new TextAreaState('せんせ', 0, 3, 0), 'せんせ', - 0, 3, false, + 0, 3, 'せんせ', 3 ); // i - // PREVIOUS STATE: [ <せんせ>, selectionStart: 0, selectionEnd: 3, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, isInOverwriteMode: false, selectionToken: 0] + // PREVIOUS STATE: [ <せんせ>, selectionStart: 0, selectionEnd: 3, selectionToken: 0] + // CURRENT STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, selectionToken: 0] testDeduceInput( - new IENarratorTextAreaState(null, 'せんせ', 0, 3, false, 0), + new TextAreaState('せんせ', 0, 3, 0), 'せんせい', - 0, 4, false, + 0, 4, 'せんせい', 3 ); // ENTER (accept) - // PREVIOUS STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せんせい>, selectionStart: 4, selectionEnd: 4, isInOverwriteMode: false, selectionToken: 0] + // PREVIOUS STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, selectionToken: 0] + // CURRENT STATE: [ <せんせい>, selectionStart: 4, selectionEnd: 4, selectionToken: 0] testDeduceInput( - new IENarratorTextAreaState(null, 'せんせい', 0, 4, false, 0), + new TextAreaState('せんせい', 0, 4, 0), 'せんせい', - 4, 4, false, + 4, 4, '', 0 ); }); @@ -245,32 +237,32 @@ suite('TextAreaState', () => { // - expected: せんせい // sennsei - // PREVIOUS STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, isInOverwriteMode: false, selectionToken: 0] + // PREVIOUS STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, selectionToken: 0] + // CURRENT STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, selectionToken: 0] testDeduceInput( - new IENarratorTextAreaState(null, 'せんせい', 0, 4, false, 0), + new TextAreaState('せんせい', 0, 4, 0), 'せんせい', - 0, 4, false, + 0, 4, 'せんせい', 4 ); // arrow down - // CURRENT STATE: [ <先生>, selectionStart: 0, selectionEnd: 2, isInOverwriteMode: false, selectionToken: 0] - // PREVIOUS STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, isInOverwriteMode: false, selectionToken: 0] + // CURRENT STATE: [ <先生>, selectionStart: 0, selectionEnd: 2, selectionToken: 0] + // PREVIOUS STATE: [ <せんせい>, selectionStart: 0, selectionEnd: 4, selectionToken: 0] testDeduceInput( - new IENarratorTextAreaState(null, 'せんせい', 0, 4, false, 0), + new TextAreaState('せんせい', 0, 4, 0), '先生', - 0, 2, false, + 0, 2, '先生', 4 ); // ENTER (accept) - // PREVIOUS STATE: [ <先生>, selectionStart: 0, selectionEnd: 2, isInOverwriteMode: false, selectionToken: 0] - // CURRENT STATE: [ <先生>, selectionStart: 2, selectionEnd: 2, isInOverwriteMode: false, selectionToken: 0] + // PREVIOUS STATE: [ <先生>, selectionStart: 0, selectionEnd: 2, selectionToken: 0] + // CURRENT STATE: [ <先生>, selectionStart: 2, selectionEnd: 2, selectionToken: 0] testDeduceInput( - new IENarratorTextAreaState(null, '先生', 0, 2, false, 0), + new TextAreaState('先生', 0, 2, 0), '先生', - 2, 2, false, + 2, 2, '', 0 ); }); @@ -279,16 +271,16 @@ suite('TextAreaState', () => { testDeduceInput( null, 'a', - 0, 1, false, + 0, 1, 'a', 0 ); }); test('issue #2586: Replacing selected end-of-line with newline locks up the document', () => { testDeduceInput( - new IENarratorTextAreaState(null, ']\n', 1, 2, false, 0), + new TextAreaState(']\n', 1, 2, 0), ']\n', - 2, 2, false, + 2, 2, '\n', 0 ); }); @@ -297,123 +289,123 @@ suite('TextAreaState', () => { testDeduceInput( null, 'a', - 1, 1, false, + 1, 1, 'a', 0 ); }); test('extractNewText - typing does not cause a selection', () => { testDeduceInput( - new IENarratorTextAreaState(null, '', 0, 0, false, 0), + TextAreaState.EMPTY, 'a', - 0, 1, false, + 0, 1, 'a', 0 ); }); test('extractNewText - had the textarea empty', () => { testDeduceInput( - new IENarratorTextAreaState(null, '', 0, 0, false, 0), + TextAreaState.EMPTY, 'a', - 1, 1, false, + 1, 1, 'a', 0 ); }); test('extractNewText - had the entire line selected', () => { testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 0, 12, false, 0), + new TextAreaState('Hello world!', 0, 12, 0), 'H', - 1, 1, false, + 1, 1, 'H', 0 ); }); test('extractNewText - had previous text 1', () => { testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 12, 12, false, 0), + new TextAreaState('Hello world!', 12, 12, 0), 'Hello world!a', - 13, 13, false, + 13, 13, 'a', 0 ); }); test('extractNewText - had previous text 2', () => { testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 0, 0, false, 0), + new TextAreaState('Hello world!', 0, 0, 0), 'aHello world!', - 1, 1, false, + 1, 1, 'a', 0 ); }); test('extractNewText - had previous text 3', () => { testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 6, 11, false, 0), + new TextAreaState('Hello world!', 6, 11, 0), 'Hello other!', - 11, 11, false, + 11, 11, 'other', 0 ); }); test('extractNewText - IME', () => { testDeduceInput( - new IENarratorTextAreaState(null, '', 0, 0, false, 0), + TextAreaState.EMPTY, 'これは', - 3, 3, false, + 3, 3, 'これは', 0 ); }); test('extractNewText - isInOverwriteMode', () => { testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 0, 0, false, 0), + new TextAreaState('Hello world!', 0, 0, 0), 'Aello world!', - 1, 1, true, + 1, 1, 'A', 0 ); }); test('extractMacReplacedText - does nothing if there is selection', () => { testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 5, 5, false, 0), + new TextAreaState('Hello world!', 5, 5, 0), 'Hellö world!', - 4, 5, false, + 4, 5, 'ö', 0 ); }); test('extractMacReplacedText - does nothing if there is more than one extra char', () => { testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 5, 5, false, 0), + new TextAreaState('Hello world!', 5, 5, 0), 'Hellöö world!', - 5, 5, false, + 5, 5, 'öö', 1 ); }); test('extractMacReplacedText - does nothing if there is more than one changed char', () => { testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 5, 5, false, 0), + new TextAreaState('Hello world!', 5, 5, 0), 'Helöö world!', - 5, 5, false, + 5, 5, 'öö', 2 ); }); test('extractMacReplacedText', () => { testDeduceInput( - new IENarratorTextAreaState(null, 'Hello world!', 5, 5, false, 0), + new TextAreaState('Hello world!', 5, 5, 0), 'Hellö world!', - 5, 5, false, + 5, 5, 'ö', 1 ); }); function testFromEditorSelectionAndPreviousState(eol: string, lines: string[], range: Range, prevSelectionToken: number): TextAreaState { let model = new SimpleModel(lines, eol); - let previousState = new IENarratorTextAreaState(null, '', 0, 0, false, prevSelectionToken); - return previousState.fromEditorSelection(model, range); + let previousState = new TextAreaState('', 0, 0, prevSelectionToken); + return IENarratorStrategy.fromEditorSelection(previousState, model, range); } test('fromEditorSelectionAndPreviousState - no selection on first line', () => { @@ -421,7 +413,7 @@ suite('TextAreaState', () => { 'Just a line', 'And another line' ], new Range(1, 1, 1, 1), 0); - assertTextAreaState(actual, 'Just a line', 0, 11, false, 1); + assertTextAreaState(actual, 'Just a line', 0, 11, 1); }); test('fromEditorSelectionAndPreviousState - no selection on second line', () => { @@ -430,7 +422,7 @@ suite('TextAreaState', () => { 'And another line', 'And yet another line', ], new Range(2, 1, 2, 1), 0); - assertTextAreaState(actual, 'And another line', 0, 16, false, 2); + assertTextAreaState(actual, 'And another line', 0, 16, 2); }); test('fromEditorSelectionAndPreviousState - on a long line with selectionToken mismatch', () => { @@ -443,7 +435,7 @@ suite('TextAreaState', () => { aLongLine, 'And yet another line', ], new Range(2, 500, 2, 500), 0); - assertTextAreaState(actual, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa…aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 0, 201, false, 2); + assertTextAreaState(actual, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa…aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 0, 201, 2); }); test('fromEditorSelectionAndPreviousState - on a long line with same selectionToken', () => { @@ -456,7 +448,7 @@ suite('TextAreaState', () => { aLongLine, 'And yet another line', ], new Range(2, 500, 2, 500), 2); - assertTextAreaState(actual, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 100, 100, false, 2); + assertTextAreaState(actual, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 100, 100, 2); }); }); From 0e40dd740f26dfcf1b7d2f4cecd0e2bdecf50561 Mon Sep 17 00:00:00 2001 From: Maik Riechert Date: Wed, 3 May 2017 22:53:26 +0100 Subject: [PATCH 0162/2747] add git delete branch command --- extensions/git/package.json | 9 ++++++++ extensions/git/package.nls.json | 1 + extensions/git/src/commands.ts | 39 +++++++++++++++++++++++++++++++++ extensions/git/src/git.ts | 5 +++++ extensions/git/src/model.ts | 7 +++++- 5 files changed, 60 insertions(+), 1 deletion(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index bd3d175c58ae3..90d477cf59462 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -172,6 +172,11 @@ "title": "%command.branch%", "category": "Git" }, + { + "command": "git.deleteBranch", + "title": "%command.deleteBranch%", + "category": "Git" + }, { "command": "git.pull", "title": "%command.pull%", @@ -298,6 +303,10 @@ "command": "git.branch", "when": "config.git.enabled && scmProvider == git && gitState == idle" }, + { + "command": "git.deleteBranch", + "when": "config.git.enabled && scmProvider == git && gitState == idle" + }, { "command": "git.pull", "when": "config.git.enabled && scmProvider == git && gitState == idle" diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index 11c7347fa07a8..9844e0606597f 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -21,6 +21,7 @@ "command.undoCommit": "Undo Last Commit", "command.checkout": "Checkout to...", "command.branch": "Create Branch...", + "command.deleteBranch": "Delete Branch...", "command.pull": "Pull", "command.pullRebase": "Pull (Rebase)", "command.push": "Push", diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 399cfd10a163d..001532ff9ddd2 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -60,6 +60,26 @@ class CheckoutRemoteHeadItem extends CheckoutItem { } } +class BranchDeleteItem implements QuickPickItem { + + protected get shortCommit(): string { return (this.ref.commit || '').substr(0, 8); } + protected get treeish(): string | undefined { return this.ref.name; } + get label(): string { return this.ref.name || this.shortCommit; } + get description(): string { return this.shortCommit; } + + constructor(protected ref: Ref) { } + + async run(model: Model): Promise { + const ref = this.treeish; + + if (!ref) { + return; + } + + await model.deleteBranch(ref); + } +} + interface Command { commandId: string; key: string; @@ -671,6 +691,25 @@ export class CommandCenter { await this.model.branch(name); } + @command('git.deleteBranch') + async deleteBranch(branchName: string): Promise { + if (typeof branchName === 'string') { + return await this.model.deleteBranch(branchName); + } + const currentHead = this.model.HEAD && this.model.HEAD.name; + const heads = this.model.refs.filter(ref => ref.type === RefType.Head && ref.name !== currentHead) + .map(ref => new BranchDeleteItem(ref)); + + const placeHolder = 'Select a branch to delete'; + const choice = await window.showQuickPick(heads, { placeHolder }); + + if (!choice) { + return; + } + + await choice.run(this.model); + } + @command('git.pull') async pull(): Promise { const remotes = this.model.remotes; diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 4adc617a3ebb0..a242d03465420 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -650,6 +650,11 @@ export class Repository { await this.run(args); } + async deleteBranch(name: string): Promise { + const args = ['branch', '-d', name]; + await this.run(args); + } + async clean(paths: string[]): Promise { const pathsByGroup = groupBy(paths, p => path.dirname(p)); const groups = Object.keys(pathsByGroup).map(k => pathsByGroup[k]); diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index 1d74a87d3a3a0..0446a3c5e093f 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -211,7 +211,8 @@ export enum Operation { Init = 1 << 12, Show = 1 << 13, Stage = 1 << 14, - GetCommitTemplate = 1 << 15 + GetCommitTemplate = 1 << 15, + DeleteBranch = 1 << 16 } // function getOperationName(operation: Operation): string { @@ -454,6 +455,10 @@ export class Model implements Disposable { await this.run(Operation.Branch, () => this.repository.branch(name, true)); } + async deleteBranch(name: string): Promise { + await this.run(Operation.DeleteBranch, () => this.repository.deleteBranch(name)); + } + async checkout(treeish: string): Promise { await this.run(Operation.Checkout, () => this.repository.checkout(treeish, [])); } From 242cb936f0b703a92547c8884dc0c5609eab01e9 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 4 May 2017 00:00:43 +0200 Subject: [PATCH 0163/2747] Fixes #16520 --- .../browser/controller/textAreaHandler.ts | 66 ++++++++-------- .../browser/controller/textAreaState.ts | 27 +++---- .../browser/controller/textAreaState.test.ts | 78 ++++++++++++------- 3 files changed, 97 insertions(+), 74 deletions(-) diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index 5c613ee891698..dad5cd60d02e8 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -136,7 +136,7 @@ export class TextAreaHandler extends Disposable { // In IE we cannot set .value when handling 'compositionstart' because the entire composition will get canceled. if (!browser.isEdgeOrIE) { - this._setAndWriteTextAreaState('compositionstart', TextAreaState.EMPTY, false); + this._setAndWriteTextAreaState('compositionstart', TextAreaState.EMPTY); } this._onCompositionStart.fire(); @@ -145,10 +145,10 @@ export class TextAreaHandler extends Disposable { /** * Deduce the typed input from a text area's value and the last observed state. */ - const deduceInputFromTextAreaValue = (): [TextAreaState, ITypeData] => { + const deduceInputFromTextAreaValue = (isDoingComposition: boolean): [TextAreaState, ITypeData] => { const oldState = this._textAreaState; const newState = this._textAreaState.readFromTextArea(this._textArea); - return [newState, TextAreaState.deduceInput(oldState, newState)]; + return [newState, TextAreaState.deduceInput(oldState, newState, isDoingComposition)]; }; /** @@ -179,7 +179,7 @@ export class TextAreaHandler extends Disposable { // Multi-part Japanese compositions reset cursor in Edge/IE, Chinese and Korean IME don't have this issue. // The reason that we can't use this path for all CJK IME is IE and Edge behave differently when handling Korean IME, // which breaks this path of code. - const [newState, typeInput] = deduceInputFromTextAreaValue(); + const [newState, typeInput] = deduceInputFromTextAreaValue(true); this._textAreaState = newState; this._onType.fire(typeInput); this._onCompositionUpdate.fire(e); @@ -196,7 +196,7 @@ export class TextAreaHandler extends Disposable { // console.log('onCompositionEnd: ' + e.data); if (browser.isEdgeOrIE && e.locale === 'ja') { // https://github.com/Microsoft/monaco-editor/issues/339 - const [newState, typeInput] = deduceInputFromTextAreaValue(); + const [newState, typeInput] = deduceInputFromTextAreaValue(true); this._textAreaState = newState; this._onType.fire(typeInput); } @@ -238,13 +238,13 @@ export class TextAreaHandler extends Disposable { return; } - const [tempTextAreaState, typeInput] = deduceInputFromTextAreaValue(); + const [newState, typeInput] = deduceInputFromTextAreaValue(false); if (typeInput.replaceCharCnt === 0 && typeInput.text.length === 1 && strings.isHighSurrogate(typeInput.text.charCodeAt(0))) { // Ignore invalid input but keep it around for next time return; } - this._textAreaState = tempTextAreaState; + this._textAreaState = newState; // console.log('==> DEDUCED INPUT: ' + JSON.stringify(typeInput)); if (this._nextCommand === ReadFromTextArea.Type) { if (typeInput.text !== '') { @@ -282,28 +282,33 @@ export class TextAreaHandler extends Disposable { } else { if (this._textArea.getSelectionStart() !== this._textArea.getSelectionEnd()) { // Clean up the textarea, to get a clean paste - this._setAndWriteTextAreaState('paste', TextAreaState.EMPTY, false); + this._setAndWriteTextAreaState('paste', TextAreaState.EMPTY); } this._nextCommand = ReadFromTextArea.Paste; } })); - this._writePlaceholderAndSelectTextArea('ctor', false); + this._writeScreenReaderContent('ctor'); } public dispose(): void { super.dispose(); } - // --- begin event handlers - public setStrategy(strategy: TextAreaStrategy): void { if (this._textAreaStrategy === strategy) { // no change return; } this._textAreaStrategy = strategy; - this._writePlaceholderAndSelectTextArea('strategy changed', false); + this._writeScreenReaderContent('strategy changed'); + } + + public focusTextArea(): void { + // Setting this._hasFocus and writing the screen reader content + // will result in a set selection range in the textarea + this._hasFocus = true; + this._writeScreenReaderContent('focusTextArea'); } public setHasFocus(isFocused: boolean): void { @@ -313,33 +318,31 @@ export class TextAreaHandler extends Disposable { } this._hasFocus = isFocused; if (this._hasFocus) { - this._writePlaceholderAndSelectTextArea('focusgain', false); + if (browser.isEdge) { + // Edge has a bug where setting the selection range while the focus event + // is dispatching doesn't work. To reproduce, "tab into" the editor. + this._setAndWriteTextAreaState('focusgain', TextAreaState.EMPTY); + } else { + this._writeScreenReaderContent('focusgain'); + } } } public setCursorSelections(primary: Range, secondary: Range[]): void { this._selection = primary; - this._writePlaceholderAndSelectTextArea('selection changed', false); + this._writeScreenReaderContent('selection changed'); } - // --- end event handlers - - private _setAndWriteTextAreaState(reason: string, textAreaState: TextAreaState, forceFocus: boolean): void { + private _setAndWriteTextAreaState(reason: string, textAreaState: TextAreaState): void { if (!this._hasFocus) { textAreaState = textAreaState.collapseSelection(); } - textAreaState.writeToTextArea(reason, this._textArea, this._hasFocus || forceFocus); + textAreaState.writeToTextArea(reason, this._textArea, this._hasFocus); this._textAreaState = textAreaState; } - // ------------- Operations that are always executed asynchronously - - public focusTextArea(): void { - this._writePlaceholderAndSelectTextArea('focusTextArea', true); - } - - private _writePlaceholderAndSelectTextArea(reason: string, forceFocus: boolean): void { + private _writeScreenReaderContent(reason: string): void { if (this._isDoingComposition) { // Do not write to the text area when doing composition return; @@ -347,17 +350,17 @@ export class TextAreaHandler extends Disposable { if (browser.isIPad) { // Do not place anything in the textarea for the iPad - this._setAndWriteTextAreaState(reason, TextAreaState.EMPTY, forceFocus); + this._setAndWriteTextAreaState(reason, TextAreaState.EMPTY); } else if (this._textAreaStrategy === TextAreaStrategy.IENarrator) { const newState = IENarratorStrategy.fromEditorSelection(this._textAreaState, this._model, this._selection); - this._setAndWriteTextAreaState(reason, newState, forceFocus); + this._setAndWriteTextAreaState(reason, newState); } else { const newState = NVDAPagedStrategy.fromEditorSelection(this._textAreaState, this._model, this._selection); - this._setAndWriteTextAreaState(reason, newState, forceFocus); + this._setAndWriteTextAreaState(reason, newState); } } @@ -367,7 +370,7 @@ export class TextAreaHandler extends Disposable { if (!ClipboardEventUtils.canUseTextData(e)) { // Looks like an old browser. The strategy is to place the text // we'd like to be copied to the clipboard in the textarea and select it. - this._setAndWriteTextAreaState('copy or cut', TextAreaState.selectedText(copyPlainText), false); + this._setAndWriteTextAreaState('copy or cut', TextAreaState.selectedText(copyPlainText)); return; } @@ -445,7 +448,7 @@ class TextAreaWrapper extends Disposable implements ITextAreaWrapper { // No change return; } - // console.log('reason: ' + reason + ', current value: ' + this._textArea.value + ' => new value: ' + value); + // console.log('reason: ' + reason + ', current value: ' + textArea.value + ' => new value: ' + value); textArea.value = value; } @@ -457,7 +460,8 @@ class TextAreaWrapper extends Disposable implements ITextAreaWrapper { return this._actual.domNode.selectionEnd; } - public setSelectionRange(selectionStart: number, selectionEnd: number): void { + public setSelectionRange(reason: string, selectionStart: number, selectionEnd: number): void { + // console.log('reason: ' + reason + ', setSelectionRange: ' + selectionStart + ' -> ' + selectionEnd); const textArea = this._actual.domNode; if (document.activeElement === textArea) { textArea.setSelectionRange(selectionStart, selectionEnd); diff --git a/src/vs/editor/browser/controller/textAreaState.ts b/src/vs/editor/browser/controller/textAreaState.ts index 38e82909a6670..d66e788c53d1d 100644 --- a/src/vs/editor/browser/controller/textAreaState.ts +++ b/src/vs/editor/browser/controller/textAreaState.ts @@ -15,7 +15,7 @@ export interface ITextAreaWrapper { getSelectionStart(): number; getSelectionEnd(): number; - setSelectionRange(selectionStart: number, selectionEnd: number): void; + setSelectionRange(reason: string, selectionStart: number, selectionEnd: number): void; } export interface ISimpleModel { @@ -73,7 +73,7 @@ export class TextAreaState { // console.log(Date.now() + ': applyToTextArea ' + reason + ': ' + this.toString()); textArea.setValue(reason, this.value); if (select) { - textArea.setSelectionRange(this.selectionStart, this.selectionEnd); + textArea.setSelectionRange(reason, this.selectionStart, this.selectionEnd); } } @@ -81,7 +81,7 @@ export class TextAreaState { return new TextAreaState(text, 0, text.length, 0); } - public static deduceInput(previousState: TextAreaState, currentState: TextAreaState): ITypeData { + public static deduceInput(previousState: TextAreaState, currentState: TextAreaState, isDoingComposition: boolean): ITypeData { if (!previousState) { // This is the EMPTY state return { @@ -92,7 +92,7 @@ export class TextAreaState { // console.log('------------------------deduceInput'); // console.log('CURRENT STATE: ' + currentState.toString()); - // console.log('PREVIOUS STATE: ' + prevState.toString()); + // console.log('PREVIOUS STATE: ' + previousState.toString()); let previousValue = previousState.value; let previousSelectionStart = previousState.selectionStart; @@ -102,15 +102,15 @@ export class TextAreaState { let currentSelectionEnd = currentState.selectionEnd; // Strip the previous suffix from the value (without interfering with the current selection) - let previousSuffix = previousValue.substring(previousSelectionEnd); - let currentSuffix = currentValue.substring(currentSelectionEnd); - let suffixLength = commonSuffixLength(previousSuffix, currentSuffix); + const previousSuffix = previousValue.substring(previousSelectionEnd); + const currentSuffix = currentValue.substring(currentSelectionEnd); + const suffixLength = commonSuffixLength(previousSuffix, currentSuffix); currentValue = currentValue.substring(0, currentValue.length - suffixLength); previousValue = previousValue.substring(0, previousValue.length - suffixLength); - let previousPrefix = previousValue.substring(0, previousSelectionStart); - let currentPrefix = currentValue.substring(0, currentSelectionStart); - let prefixLength = commonPrefixLength(previousPrefix, currentPrefix); + const previousPrefix = previousValue.substring(0, previousSelectionStart); + const currentPrefix = currentValue.substring(0, currentSelectionStart); + const prefixLength = commonPrefixLength(previousPrefix, currentPrefix); currentValue = currentValue.substring(prefixLength); previousValue = previousValue.substring(prefixLength); currentSelectionStart -= prefixLength; @@ -125,7 +125,8 @@ export class TextAreaState { // composition accept case // [blahblah] => blahblah| if ( - previousValue === currentValue + isDoingComposition + && previousValue === currentValue && previousSelectionStart === 0 && previousSelectionEnd === previousValue.length && currentSelectionStart === currentValue.length @@ -138,7 +139,7 @@ export class TextAreaState { } // no current selection - let replacePreviousCharacters = (previousPrefix.length - prefixLength); + const replacePreviousCharacters = (previousPrefix.length - prefixLength); // console.log('REMOVE PREVIOUS: ' + (previousPrefix.length - prefixLength) + ' chars'); return { @@ -148,7 +149,7 @@ export class TextAreaState { } // there is a current selection => composition case - let replacePreviousCharacters = previousSelectionEnd - previousSelectionStart; + const replacePreviousCharacters = previousSelectionEnd - previousSelectionStart; return { text: currentValue, replaceCharCnt: replacePreviousCharacters diff --git a/src/vs/editor/test/browser/controller/textAreaState.test.ts b/src/vs/editor/test/browser/controller/textAreaState.test.ts index 9f99fc9a86a95..8cc54071934f8 100644 --- a/src/vs/editor/test/browser/controller/textAreaState.test.ts +++ b/src/vs/editor/test/browser/controller/textAreaState.test.ts @@ -41,7 +41,7 @@ export class MockTextAreaWrapper extends Disposable implements ITextAreaWrapper return this._selectionEnd; } - public setSelectionRange(selectionStart: number, selectionEnd: number): void { + public setSelectionRange(reason: string, selectionStart: number, selectionEnd: number): void { if (selectionStart < 0) { selectionStart = 0; } @@ -113,7 +113,7 @@ suite('TextAreaState', () => { textArea.dispose(); }); - function testDeduceInput(prevState: TextAreaState, value: string, selectionStart: number, selectionEnd: number, expected: string, expectedCharReplaceCnt: number): void { + function testDeduceInput(prevState: TextAreaState, value: string, selectionStart: number, selectionEnd: number, isDoingComposition: boolean, expected: string, expectedCharReplaceCnt: number): void { prevState = prevState || TextAreaState.EMPTY; let textArea = new MockTextAreaWrapper(); @@ -122,7 +122,7 @@ suite('TextAreaState', () => { textArea._selectionEnd = selectionEnd; let newState = prevState.readFromTextArea(textArea); - let actual = TextAreaState.deduceInput(prevState, newState); + let actual = TextAreaState.deduceInput(prevState, newState, isDoingComposition); assert.equal(actual.text, expected); assert.equal(actual.replaceCharCnt, expectedCharReplaceCnt); @@ -143,7 +143,7 @@ suite('TextAreaState', () => { testDeduceInput( TextAreaState.EMPTY, 's', - 0, 1, + 0, 1, true, 's', 0 ); @@ -153,7 +153,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('s', 0, 1, 0), 'せ', - 0, 1, + 0, 1, true, 'せ', 1 ); @@ -163,7 +163,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せ', 0, 1, 0), 'せn', - 0, 2, + 0, 2, true, 'せn', 1 ); @@ -173,7 +173,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せn', 0, 2, 0), 'せん', - 0, 2, + 0, 2, true, 'せん', 2 ); @@ -183,7 +183,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せん', 0, 2, 0), 'せんs', - 0, 3, + 0, 3, true, 'せんs', 2 ); @@ -193,7 +193,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せんs', 0, 3, 0), 'せんせ', - 0, 3, + 0, 3, true, 'せんせ', 3 ); @@ -203,7 +203,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せんせ', 0, 3, 0), 'せんせ', - 0, 3, + 0, 3, true, 'せんせ', 3 ); @@ -213,7 +213,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せんせ', 0, 3, 0), 'せんせい', - 0, 4, + 0, 4, true, 'せんせい', 3 ); @@ -223,7 +223,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せんせい', 0, 4, 0), 'せんせい', - 4, 4, + 4, 4, true, '', 0 ); }); @@ -242,7 +242,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せんせい', 0, 4, 0), 'せんせい', - 0, 4, + 0, 4, true, 'せんせい', 4 ); @@ -252,7 +252,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せんせい', 0, 4, 0), '先生', - 0, 2, + 0, 2, true, '先生', 4 ); @@ -262,7 +262,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('先生', 0, 2, 0), '先生', - 2, 2, + 2, 2, true, '', 0 ); }); @@ -271,7 +271,7 @@ suite('TextAreaState', () => { testDeduceInput( null, 'a', - 0, 1, + 0, 1, false, 'a', 0 ); }); @@ -280,7 +280,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState(']\n', 1, 2, 0), ']\n', - 2, 2, + 2, 2, false, '\n', 0 ); }); @@ -289,7 +289,7 @@ suite('TextAreaState', () => { testDeduceInput( null, 'a', - 1, 1, + 1, 1, false, 'a', 0 ); }); @@ -298,7 +298,7 @@ suite('TextAreaState', () => { testDeduceInput( TextAreaState.EMPTY, 'a', - 0, 1, + 0, 1, false, 'a', 0 ); }); @@ -307,7 +307,7 @@ suite('TextAreaState', () => { testDeduceInput( TextAreaState.EMPTY, 'a', - 1, 1, + 1, 1, false, 'a', 0 ); }); @@ -316,7 +316,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 0, 12, 0), 'H', - 1, 1, + 1, 1, false, 'H', 0 ); }); @@ -325,7 +325,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 12, 12, 0), 'Hello world!a', - 13, 13, + 13, 13, false, 'a', 0 ); }); @@ -334,7 +334,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 0, 0, 0), 'aHello world!', - 1, 1, + 1, 1, false, 'a', 0 ); }); @@ -343,7 +343,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 6, 11, 0), 'Hello other!', - 11, 11, + 11, 11, false, 'other', 0 ); }); @@ -352,7 +352,7 @@ suite('TextAreaState', () => { testDeduceInput( TextAreaState.EMPTY, 'これは', - 3, 3, + 3, 3, true, 'これは', 0 ); }); @@ -361,7 +361,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 0, 0, 0), 'Aello world!', - 1, 1, + 1, 1, false, 'A', 0 ); }); @@ -370,7 +370,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 5, 5, 0), 'Hellö world!', - 4, 5, + 4, 5, false, 'ö', 0 ); }); @@ -379,7 +379,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 5, 5, 0), 'Hellöö world!', - 5, 5, + 5, 5, false, 'öö', 1 ); }); @@ -388,7 +388,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 5, 5, 0), 'Helöö world!', - 5, 5, + 5, 5, false, 'öö', 2 ); }); @@ -397,11 +397,29 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 5, 5, 0), 'Hellö world!', - 5, 5, + 5, 5, false, 'ö', 1 ); }); + test('issue #25101 - First key press ignored', () => { + testDeduceInput( + new TextAreaState('a', 0, 1, 0), + 'a', + 1, 1, false, + 'a', 0 + ); + }); + + test('issue #16520 - Cmd-d of single character followed by typing same character as has no effect', () => { + testDeduceInput( + new TextAreaState('x x', 0, 1, 0), + 'x x', + 1, 1, false, + 'x', 0 + ); + }); + function testFromEditorSelectionAndPreviousState(eol: string, lines: string[], range: Range, prevSelectionToken: number): TextAreaState { let model = new SimpleModel(lines, eol); let previousState = new TextAreaState('', 0, 0, prevSelectionToken); From 9b0141aaec153a12a738fd96558393968faa69ef Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 3 May 2017 15:23:04 -0700 Subject: [PATCH 0164/2747] Enable Semantics Diagnostics for Inline JS (#25850) Fixes #25809 **Bug** Inline js in html currently only reports semantic errors. This means that `// @ts-check` does not work to help catch programming errors **Fix** Also report semantic errors in script tags --- extensions/html/server/src/modes/javascriptMode.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extensions/html/server/src/modes/javascriptMode.ts b/extensions/html/server/src/modes/javascriptMode.ts index c31fb273a2a32..b9cd9075b2001 100644 --- a/extensions/html/server/src/modes/javascriptMode.ts +++ b/extensions/html/server/src/modes/javascriptMode.ts @@ -71,8 +71,9 @@ export function getJavascriptMode(documentRegions: LanguageModelCache { + const syntaxDiagnostics = jsLanguageService.getSyntacticDiagnostics(FILE_NAME); + const semanticDiagnostics = jsLanguageService.getSemanticDiagnostics(FILE_NAME); + return syntaxDiagnostics.concat(semanticDiagnostics).map((diag): Diagnostic => { return { range: convertRange(currentTextDocument, diag), severity: DiagnosticSeverity.Error, From c90c82fa7196a3e017a5b14c3448975696f8c429 Mon Sep 17 00:00:00 2001 From: Daniel Ye Date: Wed, 3 May 2017 15:28:54 -0700 Subject: [PATCH 0165/2747] 2017-05-03, Merge in translation from transifex. --- .../chs/extensions/git/out/commands.i18n.json | 3 +++ i18n/chs/extensions/git/package.i18n.json | 2 ++ i18n/chs/extensions/gulp/package.i18n.json | 4 ++- .../out/utils/typingsStatus.i18n.json | 1 + .../menusExtensionPoint.i18n.json | 6 ++--- .../parts/editor/editorActions.i18n.json | 2 ++ .../src/vs/workbench/common/theme.i18n.json | 10 ++++++- .../inspectKeybindings.i18n.json | 4 ++- .../debug/browser/debugActions.i18n.json | 1 + .../browser/debugActionsWidget.i18n.json | 4 ++- .../parts/debug/node/debugAdapter.i18n.json | 1 + .../treeExplorer.contribution.i18n.json | 5 ++++ .../browser/views/empty/emptyView.i18n.json | 2 +- .../browser/preferencesActions.i18n.json | 1 + .../task.contribution.i18n.json | 1 + .../themes.contribution.i18n.json | 1 + .../electron-browser/watermark.i18n.json | 2 +- .../walkThroughPart.i18n.json | 3 ++- .../themes/common/colorThemeSchema.i18n.json | 3 ++- .../electron-browser/colorThemeData.i18n.json | 7 ++++- .../workbenchThemeService.i18n.json | 5 +++- .../cht/extensions/git/out/commands.i18n.json | 3 +++ i18n/cht/extensions/git/out/main.i18n.json | 3 ++- i18n/cht/extensions/git/out/model.i18n.json | 4 ++- i18n/cht/extensions/git/package.i18n.json | 5 +++- i18n/cht/extensions/grunt/out/main.i18n.json | 4 ++- i18n/cht/extensions/gulp/out/main.i18n.json | 4 ++- i18n/cht/extensions/php/package.i18n.json | 3 ++- .../out/typescriptServiceClient.i18n.json | 2 ++ .../extensions/typescript/package.i18n.json | 7 ++++- .../src/vs/code/electron-main/menus.i18n.json | 4 +++ .../browser/widget/diffEditorWidget.i18n.json | 2 ++ .../src/vs/workbench/common/theme.i18n.json | 4 ++- .../inspectKeybindings.i18n.json | 4 ++- .../debug/browser/debugActions.i18n.json | 1 + .../browser/debugActionsWidget.i18n.json | 4 ++- .../debug.contribution.i18n.json | 3 ++- .../parts/debug/node/debugAdapter.i18n.json | 1 + .../treeExplorer.contribution.i18n.json | 5 ++++ .../extensionTipsService.i18n.json | 1 + .../files/browser/saveErrorHandler.i18n.json | 1 + .../browser/keybindingsEditor.i18n.json | 2 ++ .../browser/preferencesActions.i18n.json | 1 + .../common/keybindingsEditorModel.i18n.json | 1 + .../workbenchThemeService.i18n.json | 3 ++- .../browser/referencesModel.i18n.json | 3 +++ .../theme/common/colorRegistry.i18n.json | 1 + .../esn/extensions/git/out/commands.i18n.json | 3 +++ i18n/esn/extensions/git/package.i18n.json | 2 ++ i18n/esn/extensions/gulp/package.i18n.json | 4 ++- .../out/utils/typingsStatus.i18n.json | 1 + .../browser/referencesModel.i18n.json | 3 +++ .../suggest/browser/suggestWidget.i18n.json | 3 +++ .../platform/environment/node/argv.i18n.json | 1 + .../theme/common/colorRegistry.i18n.json | 27 +++++++++++++++++++ .../parts/editor/editorActions.i18n.json | 2 ++ .../src/vs/workbench/common/theme.i18n.json | 1 + .../inspectKeybindings.i18n.json | 4 ++- .../debug/browser/debugActions.i18n.json | 1 + .../browser/debugActionsWidget.i18n.json | 4 ++- .../parts/debug/node/debugAdapter.i18n.json | 1 + .../treeExplorer.contribution.i18n.json | 5 ++++ .../browser/preferencesActions.i18n.json | 1 + .../task.contribution.i18n.json | 1 + .../themes.contribution.i18n.json | 1 + .../walkThroughPart.i18n.json | 3 ++- .../themes/common/colorThemeSchema.i18n.json | 3 ++- .../electron-browser/colorThemeData.i18n.json | 7 ++++- .../workbenchThemeService.i18n.json | 5 +++- .../fra/extensions/git/out/commands.i18n.json | 3 +++ i18n/fra/extensions/git/package.i18n.json | 2 ++ i18n/fra/extensions/gulp/package.i18n.json | 4 ++- .../out/utils/typingsStatus.i18n.json | 1 + .../browser/referencesModel.i18n.json | 3 +++ .../suggest/browser/suggestWidget.i18n.json | 3 +++ .../platform/environment/node/argv.i18n.json | 1 + .../theme/common/colorRegistry.i18n.json | 27 +++++++++++++++++++ .../parts/editor/editorActions.i18n.json | 2 ++ .../src/vs/workbench/common/theme.i18n.json | 10 ++++++- .../inspectKeybindings.i18n.json | 4 ++- .../debug/browser/debugActions.i18n.json | 1 + .../browser/debugActionsWidget.i18n.json | 4 ++- .../parts/debug/node/debugAdapter.i18n.json | 1 + .../treeExplorer.contribution.i18n.json | 5 ++++ .../browser/preferencesActions.i18n.json | 1 + .../task.contribution.i18n.json | 1 + .../themes.contribution.i18n.json | 1 + .../walkThroughPart.i18n.json | 3 ++- .../themes/common/colorThemeSchema.i18n.json | 3 ++- .../electron-browser/colorThemeData.i18n.json | 7 ++++- .../workbenchThemeService.i18n.json | 5 +++- .../browser/referencesModel.i18n.json | 3 +++ .../suggest/browser/suggestWidget.i18n.json | 3 +++ .../platform/environment/node/argv.i18n.json | 1 + .../theme/common/colorRegistry.i18n.json | 21 +++++++++++++++ .../jpn/extensions/git/out/commands.i18n.json | 2 ++ i18n/jpn/extensions/git/package.i18n.json | 1 + i18n/jpn/extensions/gulp/package.i18n.json | 4 ++- .../out/utils/typingsStatus.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 2 +- .../browser/referencesModel.i18n.json | 3 +++ .../suggest/browser/suggestWidget.i18n.json | 3 +++ .../platform/environment/node/argv.i18n.json | 1 + .../theme/common/colorRegistry.i18n.json | 10 +++++++ .../parts/editor/editorActions.i18n.json | 2 ++ .../src/vs/workbench/common/theme.i18n.json | 9 ++++++- .../inspectKeybindings.i18n.json | 4 ++- .../debug/browser/debugActions.i18n.json | 1 + .../browser/debugActionsWidget.i18n.json | 4 ++- .../parts/debug/node/debugAdapter.i18n.json | 1 + .../treeExplorer.contribution.i18n.json | 4 +++ .../extensionTipsService.i18n.json | 2 +- .../browser/preferencesActions.i18n.json | 1 + .../task.contribution.i18n.json | 1 + .../themes.contribution.i18n.json | 1 + .../welcomePage.contribution.i18n.json | 2 +- .../walkThroughPart.i18n.json | 3 ++- .../electron-browser/colorThemeData.i18n.json | 5 +++- .../workbenchThemeService.i18n.json | 4 ++- .../browser/referencesModel.i18n.json | 3 +++ .../suggest/browser/suggestWidget.i18n.json | 3 +++ .../platform/environment/node/argv.i18n.json | 1 + .../theme/common/colorRegistry.i18n.json | 27 +++++++++++++++++++ .../rus/extensions/git/out/commands.i18n.json | 3 +++ i18n/rus/extensions/git/package.i18n.json | 4 ++- i18n/rus/extensions/grunt/out/main.i18n.json | 4 ++- i18n/rus/extensions/grunt/package.i18n.json | 4 ++- i18n/rus/extensions/gulp/package.i18n.json | 4 ++- .../rus/extensions/markdown/package.i18n.json | 4 ++- i18n/rus/extensions/php/package.i18n.json | 3 ++- .../out/utils/typingsStatus.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 5 +++- 132 files changed, 427 insertions(+), 57 deletions(-) diff --git a/i18n/chs/extensions/git/out/commands.i18n.json b/i18n/chs/extensions/git/out/commands.i18n.json index b7d7aed996083..2bf666865ec0f 100644 --- a/i18n/chs/extensions/git/out/commands.i18n.json +++ b/i18n/chs/extensions/git/out/commands.i18n.json @@ -16,6 +16,8 @@ "confirm discard": "确定要放弃 {0} 中更改吗?", "confirm discard multiple": "是否确实要放弃 {0} 文件中的更改?", "discard": "放弃更改", + "confirm discard all": "确定要放弃所有更改吗?此操作不可撤销!", + "discardAll": "放弃所有更改", "no changes": "没有要提交的更改。", "commit message": "提交消息", "provide commit message": "请提供提交消息", @@ -31,6 +33,7 @@ "no remotes to publish": "存储库未配置任何要发布到的远程存储库。", "disabled": "此工作区已禁用或不支持 GIT", "clean repo": "在签出前,请清理存储库工作树。", + "cant push": "无法推送 refs 到远端。请先运行“拉取”功能以整合你的更改。", "git error details": "Git:{0}", "git error": "Git 错误", "open git log": "打开 GIT 日志" diff --git a/i18n/chs/extensions/git/package.i18n.json b/i18n/chs/extensions/git/package.i18n.json index d45df3f45c4b9..06d049a0aeb80 100644 --- a/i18n/chs/extensions/git/package.i18n.json +++ b/i18n/chs/extensions/git/package.i18n.json @@ -39,6 +39,8 @@ "config.autofetch": "是否启用了自动提取", "config.enableLongCommitWarning": "是否针对长段提交消息进行警告", "config.confirmSync": "同步 GIT 存储库前请先进行确认", + "config.countBadge": "控制 Git 徽章计数器。“all”计算所有更改。“tracked”只计算跟踪的更改。“off”关闭此功能。", + "config.checkoutType": "控制运行“签出到...”时列出的分支的类型。“all”显示所有 refs,“local”只显示本地分支,“tags”只显示标签,“remote”只显示远程分支。", "config.ignoreLegacyWarning": "忽略旧版 Git 警告", "config.ignoreLimitWarning": "忽略“存储库中存在大量更改”的警告" } \ No newline at end of file diff --git a/i18n/chs/extensions/gulp/package.i18n.json b/i18n/chs/extensions/gulp/package.i18n.json index 8b6ad71cd4e6d..368a4601441ee 100644 --- a/i18n/chs/extensions/gulp/package.i18n.json +++ b/i18n/chs/extensions/gulp/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.gulp.autoDetect": "控制自动检测 Gulp 任务是否打开。默认开启。" +} \ No newline at end of file diff --git a/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json index f6ee369cc4082..01709f2e6d3d3 100644 --- a/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "提取数据以实现更好的 TypeScript IntelliSense", + "typesInstallerInitializationFailed.title": "无法为 JavaScript 语言功能安装 typings 文件。请确认 NPM 已经安装且位于 PATH 中", "typesInstallerInitializationFailed.moreInformation": "详细信息", "typesInstallerInitializationFailed.doNotCheckAgain": "不要再次检查", "typesInstallerInitializationFailed.close": "关闭" diff --git a/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 3aee009f0fbf4..806db0f074865 100644 --- a/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -18,9 +18,9 @@ "menus.explorerContext": "文件资源管理器上下文菜单", "menus.editorTabContext": "编辑器选项卡上下文菜单", "menus.debugCallstackContext": "调试调用堆栈上下文菜单", - "menus.scmTitle": "源控件标题菜单", - "menus.resourceGroupContext": "源控件资源组上下文菜单", - "menus.resourceStateContext": "源控件资源状态上下文菜单", + "menus.scmTitle": "源代码管理标题菜单", + "menus.resourceGroupContext": "源代码管理资源组上下文菜单", + "menus.resourceStateContext": "源代码管理资源状态上下文菜单", "nonempty": "应为非空值。", "opticon": "可以省略属性“图标”或者它必须是一个字符串或类似“{dark, light}”的文本", "requireStringOrObject": "属性“{0}”为必需且其类型必须为“字符串”或“对象”", diff --git a/i18n/chs/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index b2df0032ff4a9..dc267856d02f8 100644 --- a/i18n/chs/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -44,6 +44,8 @@ "openPreviousRecentlyUsedEditorInGroup": "打开组中上一个最近使用的编辑器", "openNextRecentlyUsedEditorInGroup": "打开组中下一个最近使用的编辑器", "navigateEditorHistoryByInput": "从历史记录里打开上一个编辑器", + "openNextRecentlyUsedEditor": "打开下一个最近使用的编辑器", + "openPreviousRecentlyUsedEditor": "打开上一个最近使用的编辑器", "clearEditorHistory": "清除编辑器历史记录", "focusLastEditorInStack": "打开组中上一个编辑器", "moveEditorLeft": "向左移动编辑器", diff --git a/i18n/chs/src/vs/workbench/common/theme.i18n.json b/i18n/chs/src/vs/workbench/common/theme.i18n.json index bff10399ed5f0..82541213ad4dc 100644 --- a/i18n/chs/src/vs/workbench/common/theme.i18n.json +++ b/i18n/chs/src/vs/workbench/common/theme.i18n.json @@ -12,8 +12,11 @@ "tabActiveEditorGroupInactiveForeground": "非活动组中活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", "tabInactiveEditorGroupActiveForeground": "活动组中非活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", "tabInactiveEditorGroupInactiveForeground": "非活动组中非活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", + "editorGroupBackground": "编辑器组的背景颜色。编辑器组是编辑器的容器。此颜色在拖动编辑器组时显示。", + "editorGroupHeaderBackground": "禁用选项卡时编辑器组标题的背景颜色。编辑器组是编辑器的容器。", "editorGroupBorder": "将多个编辑器组彼此分隔开的颜色。编辑器组是编辑器的容器。", "editorDragAndDropBackground": "随意拖动编辑器时的背景色。", + "editorMasterDetailsBorder": "并排编辑器中将主视图与细节视图分隔开的边框颜色。", "panelBackground": "面板的背景色。面板显示在编辑器区域下方,可包含输出和集成终端等视图。", "panelBorder": "分隔到编辑器的顶部面板边框色。面板显示在编辑器区域下方,可包含输出和集成终端等视图。", "panelActiveTitleForeground": "活动面板的标题颜色。面板显示在编辑器区域下方,并包含输出和集成终端等视图。", @@ -24,6 +27,8 @@ "statusBarNoFolderBackground": "没有打开文件夹时状态栏的背景色。状态栏显示在窗口底部。", "statusBarItemActiveBackground": "单击时的状态栏项背景色。状态栏显示在窗口底部。", "statusBarItemHoverBackground": "悬停时的状态栏项背景色。状态栏显示在窗口底部。", + "statusBarProminentItemBackground": "状态栏突出显示项的背景颜色。突出显示项比状态栏中的其他条目更显眼,表明其重要性更高。状态栏显示在窗口底部。", + "statusBarProminentItemHoverBackground": "状态栏突出显示项在悬停时的背景颜色。突出显示项比状态栏中的其他条目更显眼,表明其重要性更高。状态栏显示在窗口底部。", "activityBarBackground": "活动栏背景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "activityBarForeground": "活动栏前景色(例如用于图标)。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "activityBarDragAndDropBackground": "活动栏项的拖放反馈颜色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", @@ -31,8 +36,11 @@ "activityBarBadgeForeground": "活动通知徽章前景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "sideBarBackground": "侧边栏背景色。侧边栏是资源管理器和搜索等视图的容器。", "sideBarTitleForeground": "侧边栏标题前景色。侧边栏是资源管理器和搜索等视图的容器。", + "sideBarSectionHeaderBackground": "侧边栏节标题的背景颜色。侧边栏是资源管理器和搜索等视图的容器。", "titleBarActiveForeground": "窗口处于活动状态时的标题栏前景色。请注意,该颜色当前仅在 macOS 上受支持。", "titleBarInactiveForeground": "窗口处于非活动状态时的标题栏前景色。请注意,该颜色当前仅在 macOS 上受支持。", "titleBarActiveBackground": "窗口处于活动状态时的标题栏背景色。请注意,该颜色当前仅在 macOS 上受支持。", - "titleBarInactiveBackground": "窗口处于非活动状态时的标题栏背景色。请注意,该颜色当前仅在 macOS 上受支持。" + "titleBarInactiveBackground": "窗口处于非活动状态时的标题栏背景色。请注意,该颜色当前仅在 macOS 上受支持。", + "notificationsForeground": "通知前景色。通知从窗口顶部滑入。", + "notificationsBackground": "通知背颜色。通知从窗口顶部滑入。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index 8b6ad71cd4e6d..a188f9c1e90a0 100644 --- a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "workbench.action.inspectKeyMap": "开发者:检查键映射" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index 0dcbbe504420e..2ed88fc75455e 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -34,6 +34,7 @@ "editConditionalBreakpoint": "编辑断点...", "setValue": "设置值", "addWatchExpression": "添加表达式", + "editWatchExpression": "编辑表达式", "addToWatchExpressions": "添加到监视", "removeWatchExpression": "删除表达式", "removeAllWatchExpressions": "删除所有表达式", diff --git a/i18n/chs/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json index 8b6ad71cd4e6d..fd9702e842b93 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "debugToolBarBackground": "调试工具栏背景颜色。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index e1f50545d948d..59d49516599d1 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "调试适配器可执行的“{0}”不存在。", "debugAdapterCannotDetermineExecutable": "无法确定调试适配器“{0}”的可执行文件。", "debugType": "配置类型。", + "debugTypeNotRecognised": "无法识别此调试类型。请安装相应的调试扩展。", "node2NotSupported": "不再支持 \"node2\",改用 \"node\",并将 \"protocol\" 属性设为 \"inspector\"。", "debugName": "配置名称;在启动配置下拉菜单中显示。", "debugRequest": "请求配置类型。可以是“启动”或“附加”。", diff --git a/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 7ee7785b78143..5d52f90d6278b 100644 --- a/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,6 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "vscode.extension.contributes.view": "贡献自定义视图", + "vscode.extension.contributes.view.id": "用于标识通过 vscode.workspace.createTreeView 创建的视图的唯一 ID", + "vscode.extension.contributes.view.label": "用于呈现视图的人类可读的字符串", + "vscode.extension.contributes.view.icon": "视图图标的路径", + "vscode.extension.contributes.views": "贡献自定义视图", "showViewlet": "显示 {0}", "view": "查看" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/git/browser/views/empty/emptyView.i18n.json b/i18n/chs/src/vs/workbench/parts/git/browser/views/empty/emptyView.i18n.json index d4d866094c63b..e4d4e20d71555 100644 --- a/i18n/chs/src/vs/workbench/parts/git/browser/views/empty/emptyView.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/git/browser/views/empty/emptyView.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "noGit": "此工作区尚未在 GIT 源控件之下。", + "noGit": "此工作区尚未使用 Git 源代码管理。", "gitinit": "初始化 GIT 存储库" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 0bf6b9af9955e..058e01cd6bf65 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "打开用户设置", "openGlobalKeybindings": "打开键盘快捷方式", + "openGlobalKeybindingsFile": "打开键盘快捷键文件", "openWorkspaceSettings": "打开工作区设置", "configureLanguageBasedSettings": "配置语言特定的设置...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index af44cd6b11227..a1a07ebb7f946 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,6 +9,7 @@ "ConfigureTaskRunnerAction.quickPick.template": "选择任务运行程序", "ConfigureTaskRunnerAction.autoDetecting": "适用于 {0} 的自动检测任务", "ConfigureTaskRunnerAction.autoDetect": "自动检测系统任务失败。请使用默认模板。有关详细信息,请参阅任务输出。", + "ConfigureTaskRunnerAction.autoDetectError": "自动检测任务系统时出现错误。有关详细信息,请参阅任务输出。", "ConfigureTaskRunnerAction.failed": "无法在 \".vscode\" 文件夹中创建 \"tasks.json\" 文件。查看任务输出了解详细信息。", "ConfigureTaskRunnerAction.label": "配置任务运行程序", "ConfigureBuildTaskAction.label": "配置生成任务", diff --git a/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index e3d24891a1d48..1e8d0fdd5a84f 100644 --- a/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,6 +14,7 @@ "noIconThemeDesc": "禁用文件图标", "problemChangingIconTheme": "设置图标主题时出现问题: {0}", "themes.selectIconTheme": "选择文件图标主题", + "generateColorTheme.label": "使用当前设置生成颜色主题", "preferences": "首选项", "developer": "开发者" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/chs/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json index 076dd52ebbba1..082e49f08bc47 100644 --- a/i18n/chs/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -17,7 +17,7 @@ "watermark.selectTheme": "更改主题", "watermark.selectKeymap": "更改键映射", "watermark.keybindingsReference": "键盘参考", - "watermark.openGlobalKeybindings": "键盘快捷方式(&&K)", + "watermark.openGlobalKeybindings": "键盘快捷键", "watermark.unboundCommand": "未绑定", "workbenchConfigurationTitle": "工作台", "tips.enabled": "启用后,当没有打开编辑器时将显示水印提示。" diff --git a/i18n/chs/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index 919a9e29fe9b0..20d662cd6cf92 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "未绑定" + "walkThrough.unboundCommand": "未绑定", + "walkThrough.gitNotFound": "你的系统上似乎未安装 Git。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/chs/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index c9bf9070daa1f..d745afc220794 100644 --- a/i18n/chs/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/chs/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "语法突出显示颜色", "schema.properties.name": "规则描述", - "schema.fontStyle": "规则字体样式:“斜体”、“粗体”和“下划线”中的一种或者组合" + "schema.fontStyle": "规则字体样式:“斜体”、“粗体”和“下划线”中的一种或者组合", + "schema.tokenColors.path": "tmTheme 文件路径(相对于当前文件)" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/chs/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 75fac41304394..88cd69f245175 100644 --- a/i18n/chs/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/chs/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,5 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "分析 JSON 主题文件 {0} 时出现问题" + "error.cannotparsejson": "分析 JSON 主题文件 {0} 时出现问题", + "error.invalidformat.colors": "分析颜色主题文件时出现问题:{0}。属性“colors”不是“object”类型。", + "error.invalidformat.tokenColors": "分析颜色主题文件时出现问题:{0}。属性“tokenColors”应为指定颜色的数组或是指向 TextMate 主题文件的路径", + "error.plist.invalidformat": "分析 tmTheme 文件时出现问题:{0}。“settings”不是数组。", + "error.cannotparse": "分析 tmTheme 文件时出现问题:{0}", + "error.cannotload": "分析 tmTheme 文件 {0} 时出现问题:{1}" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index f8a9d4a4a14d0..69e35ac02d635 100644 --- a/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,5 +25,8 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed." + "iconThemeError": "File icon theme is unknown or not installed.", + "workbenchColors": "覆盖当前所选颜色主题的颜色。", + "workbenchColors.deprecated": "该设置不再是实验性设置,并已重命名为“workbench.colorCustomizations”", + "workbenchColors.deprecatedDescription": "改用“workbench.colorCustomizations”" } \ No newline at end of file diff --git a/i18n/cht/extensions/git/out/commands.i18n.json b/i18n/cht/extensions/git/out/commands.i18n.json index 1cdcbdecd44a3..446fe9ba0491a 100644 --- a/i18n/cht/extensions/git/out/commands.i18n.json +++ b/i18n/cht/extensions/git/out/commands.i18n.json @@ -16,6 +16,8 @@ "confirm discard": "確定要捨棄 {0} 中的變更嗎?", "confirm discard multiple": "確定要捨棄 {0} 檔案中的變更嗎?", "discard": "捨棄變更", + "confirm discard all": "確定要捨棄所有變更嗎? 此動作無法復原!", + "discardAll": "捨棄所有變更", "no changes": "沒有任何變更要認可。", "commit message": "認可訊息", "provide commit message": "請提供認可訊息", @@ -31,6 +33,7 @@ "no remotes to publish": "您的存放庫未設定要發行的目標遠端。", "disabled": "Git 已停用,或在此工作區不受支援", "clean repo": "請先清除您的存放庫工作樹狀再簽出。", + "cant push": "無法將參考推送到遠端。請先執行 [提取] 以整合您的變更。", "git error details": "Git: {0}", "git error": "Git 錯誤", "open git log": "開啟 Git 記錄" diff --git a/i18n/cht/extensions/git/out/main.i18n.json b/i18n/cht/extensions/git/out/main.i18n.json index 710676d3a31ae..1a5f7ab3b83f2 100644 --- a/i18n/cht/extensions/git/out/main.i18n.json +++ b/i18n/cht/extensions/git/out/main.i18n.json @@ -6,5 +6,6 @@ { "using git": "正在使用來自 {1} 的 git {0}", "updateGit": "更新 Git", - "neverShowAgain": "不要再顯示" + "neverShowAgain": "不要再顯示", + "git20": "您似乎已安裝 Git {0}。Code 搭配 Git >= 2 的執行效果最佳" } \ No newline at end of file diff --git a/i18n/cht/extensions/git/out/model.i18n.json b/i18n/cht/extensions/git/out/model.i18n.json index 69c8e98ba1901..7a7210148645c 100644 --- a/i18n/cht/extensions/git/out/model.i18n.json +++ b/i18n/cht/extensions/git/out/model.i18n.json @@ -8,5 +8,7 @@ "merge changes": "合併變更", "staged changes": "已分段的變更", "changes": "變更", - "ok": "確定" + "ok": "確定", + "neveragain": "不要再顯示", + "huge": "位於 '{0}' 的 Git 存放庫有過多使用中的變更,只會啟用一部份 Git 功能。" } \ No newline at end of file diff --git a/i18n/cht/extensions/git/package.i18n.json b/i18n/cht/extensions/git/package.i18n.json index 25e06410e3dbf..b89e59919000b 100644 --- a/i18n/cht/extensions/git/package.i18n.json +++ b/i18n/cht/extensions/git/package.i18n.json @@ -38,5 +38,8 @@ "config.autorefresh": "是否啟用自動重新整理", "config.autofetch": "是否啟用自動擷取", "config.enableLongCommitWarning": "是否發出長認可訊息的警告", - "config.confirmSync": "請先確認再同步處理 GIT 存放庫" + "config.confirmSync": "請先確認再同步處理 GIT 存放庫", + "config.countBadge": "控制 git 徽章計數器。[全部] 會計算所有變更。[已追蹤] 只會計算追蹤的變更。[關閉] 會將其關閉。", + "config.checkoutType": "控制在執行 [簽出至...] 時,會列出那些類型的分支。[全部] 會顯示所有參考,[本機] 只會顯示本機分支,[標記] 只會顯示標記,[遠端] 只會顯示遠端分支。", + "config.ignoreLimitWarning": "當存放庫中有過多變更時,略過警告。" } \ No newline at end of file diff --git a/i18n/cht/extensions/grunt/out/main.i18n.json b/i18n/cht/extensions/grunt/out/main.i18n.json index 8b6ad71cd4e6d..39e6cf64ecbd3 100644 --- a/i18n/cht/extensions/grunt/out/main.i18n.json +++ b/i18n/cht/extensions/grunt/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Grunt 的自動偵測失敗。錯誤: {0}" +} \ No newline at end of file diff --git a/i18n/cht/extensions/gulp/out/main.i18n.json b/i18n/cht/extensions/gulp/out/main.i18n.json index 8b6ad71cd4e6d..019ce972d1c96 100644 --- a/i18n/cht/extensions/gulp/out/main.i18n.json +++ b/i18n/cht/extensions/gulp/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Gulp 的自動偵測失敗。錯誤: {0}" +} \ No newline at end of file diff --git a/i18n/cht/extensions/php/package.i18n.json b/i18n/cht/extensions/php/package.i18n.json index ea8c697e6aa45..5f7fb84195495 100644 --- a/i18n/cht/extensions/php/package.i18n.json +++ b/i18n/cht/extensions/php/package.i18n.json @@ -9,5 +9,6 @@ "configuration.validate.executablePath": "指向 PHP 可執行檔。", "configuration.validate.run": "是否在儲存或輸入時執行 linter。", "configuration.title": "PHP", - "commands.categroy.php": "PHP" + "commands.categroy.php": "PHP", + "command.untrustValidationExecutable": "禁止 PHP 驗證可執行檔 (定義為工作區設定)" } \ No newline at end of file diff --git a/i18n/cht/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/cht/extensions/typescript/out/typescriptServiceClient.i18n.json index 69c9930b11dc8..cbb3857f33152 100644 --- a/i18n/cht/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/cht/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -15,6 +15,8 @@ "learnMore": "深入了解", "selectTsVersion": "選取 JavaScript 與 TypeScript 功能使用的 TypeScript 版本", "typescript.openTsServerLog.notSupported": "TS 伺服器的記錄功能需要 TS 2.2.2+", + "typescript.openTsServerLog.loggingNotEnabled": "TS 伺服器記錄功能已關閉。請設定 `typescript.tsserver.log` 並重新啟動 TS 伺服器,以啟用記錄功能", + "typescript.openTsServerLog.enableAndReloadOption": "啟用記錄功能並重新啟動 TS 伺服器", "typescript.openTsServerLog.noLogFile": "TS 伺服器尚未開始記錄。", "openTsServerLog.openFileFailedFailed": "無法開啟 TS 伺服器記錄檔", "serverDiedAfterStart": "TypeScript 語言服務在啟動後立即中止 5 次。服務將不會重新啟動。", diff --git a/i18n/cht/extensions/typescript/package.i18n.json b/i18n/cht/extensions/typescript/package.i18n.json index 474b92a51c1a0..16a2c1a55f137 100644 --- a/i18n/cht/extensions/typescript/package.i18n.json +++ b/i18n/cht/extensions/typescript/package.i18n.json @@ -11,6 +11,7 @@ "typescript.tsdk.desc": "指定資料夾路徑,其中包含要使用的 tsserver 和 lib*.d.ts 檔案。", "typescript.disableAutomaticTypeAcquisition": "停用自動類型取得。需要 TypeScript >= 2.0.6,並需要在變更後重新啟動。", "typescript.check.tscVersion": "請檢查全域安裝 TypeScript 編譯器 (例如 tsc) 是否不同於使用的 TypeScript 語言服務。", + "typescript.tsserver.log": "允許 TS 伺服器記錄到檔案。此記錄可用來診斷 TS 伺服器問題。記錄可能包含檔案路徑、原始程式碼及您專案中可能具有敏感性的其他資訊。", "typescript.tsserver.experimentalAutoBuild": "啟用實驗性自動建置。需要 1.9 dev 或 2.x tsserver 版本,且在變更後必須重新啟動 VS Code。", "typescript.validate.enable": "啟用/停用 TypeScript 驗證。", "typescript.format.enable": "啟用/停用預設 TypeScript 格式器。", @@ -30,6 +31,10 @@ "javascript.validate.enable": "啟用/停用 JavaScript 驗證。", "typescript.goToProjectConfig.title": "移至專案組態", "javascript.goToProjectConfig.title": "移至專案組態", + "typescript.referencesCodeLens.enabled": "啟用/停用參考 CodeLens。需要 TypeScript >= 2.0.6。", + "typescript.implementationsCodeLens.enabled": "啟用/停用實作 CodeLens。需要 TypeScript >= 2.2.0。", "typescript.openTsServerLog.title": "開啟 TS 伺服器記錄檔", - "typescript.selectTypeScriptVersion.title": "選取 TypeScript 版本" + "typescript.selectTypeScriptVersion.title": "選取 TypeScript 版本", + "jsDocCompletion.enabled": "啟用/停用自動 JSDoc 註解", + "javascript.implicitProjectConfig.checkJs": "啟用/停用 JavaScript 檔案的語意檢查。現有的 jsconfig.json 或 tsconfig.json 檔案會覆寫此設定。需要 TypeScript >=2.3.1。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/code/electron-main/menus.i18n.json b/i18n/cht/src/vs/code/electron-main/menus.i18n.json index a0c96430b3eb7..20490cb499d10 100644 --- a/i18n/cht/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/cht/src/vs/code/electron-main/menus.i18n.json @@ -6,7 +6,9 @@ { "mFile": "檔案 (&&F)", "mEdit": "編輯(&&E)", + "mSelection": "選取項目(&&S)", "mView": "檢視 (&&V)", + "mGoto": "前往(&&G)", "mDebug": "偵錯 (&&D)", "mWindow": "視窗", "mHelp": "說明 (&&H)", @@ -29,6 +31,7 @@ "miCloseWindow": "關閉視窗(&&E)", "miCloseFolder": "關閉資料夾(&&F)", "miCloseEditor": "關閉編輯器(&&C)", + "miExit": "結束(&&X)", "miOpenSettings": "設定(&&S)", "miOpenKeymap": "鍵盤快速鍵(&&K)", "miOpenKeymapExtensions": "按鍵對應延伸模組(&&K)", @@ -40,6 +43,7 @@ "miClearRecentOpen": "清理最近的檔案(&&C)", "miUndo": "復原(&&U)", "miRedo": "重做(&&R)", + "miCut": "剪下(&&T)", "miCopy": "複製(&&C)", "miPaste": "貼上(&&P)", "miFind": "尋找(&&F)", diff --git a/i18n/cht/src/vs/editor/browser/widget/diffEditorWidget.i18n.json b/i18n/cht/src/vs/editor/browser/widget/diffEditorWidget.i18n.json index 121381958b165..a4ab50f8f6a76 100644 --- a/i18n/cht/src/vs/editor/browser/widget/diffEditorWidget.i18n.json +++ b/i18n/cht/src/vs/editor/browser/widget/diffEditorWidget.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "diffEditorInserted": "插入文字的背景色彩。", + "diffEditorRemoved": "移除文字的背景色彩。", "diffEditorInsertedOutline": "插入的文字外框色彩。", "diffEditorRemovedOutline": "移除的文字外框色彩。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/common/theme.i18n.json b/i18n/cht/src/vs/workbench/common/theme.i18n.json index 04db8d8c3c7c5..57facd966f85b 100644 --- a/i18n/cht/src/vs/workbench/common/theme.i18n.json +++ b/i18n/cht/src/vs/workbench/common/theme.i18n.json @@ -33,5 +33,7 @@ "titleBarActiveForeground": "作用中視窗之標題列的前景。請注意,目前只有 macOS 支援此色彩。", "titleBarInactiveForeground": "非作用中視窗之標題列的前景。請注意,目前只有 macOS 支援此色彩。", "titleBarActiveBackground": "作用中視窗之標題列的背景。請注意,目前只有 macOS 支援此色彩。", - "titleBarInactiveBackground": "非作用中視窗之標題列的背景。請注意,目前只有 macOS 支援此色彩。" + "titleBarInactiveBackground": "非作用中視窗之標題列的背景。請注意,目前只有 macOS 支援此色彩。", + "notificationsForeground": "通知的前景色彩。通知從視窗的上方滑入。", + "notificationsBackground": "通知的背景色彩。通知從視窗的上方滑入。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index 8b6ad71cd4e6d..ff6f3d234e919 100644 --- a/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "workbench.action.inspectKeyMap": "開發人員: 檢查按鍵對應" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index e61ce405342c6..c2ab22390ca55 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -34,6 +34,7 @@ "editConditionalBreakpoint": "編輯中斷點...", "setValue": "設定值", "addWatchExpression": "加入運算式", + "editWatchExpression": "編輯運算式", "addToWatchExpressions": "加入監看", "removeWatchExpression": "移除運算式", "removeAllWatchExpressions": "移除所有運算式", diff --git a/i18n/cht/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json index 8b6ad71cd4e6d..8bd875c749d3c 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "debugToolBarBackground": "偵錯工具列背景色彩。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index 02c3d441b7f8c..da46c1cbcd0d3 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -15,5 +15,6 @@ "allowBreakpointsEverywhere": "允許在任何檔案設定中斷點", "openExplorerOnEnd": "自動於偵錯工作階段結束時開啟總管檢視", "inlineValues": "在偵錯時於編輯器以內嵌方式顯示變數值", - "hideActionBar": "控制是否應隱藏浮點偵錯動作列" + "hideActionBar": "控制是否應隱藏浮點偵錯動作列", + "launch": "全域偵錯啟動組態。應當做在工作區之間共用的 'launch.json' 替代方案使用" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index f41f30d55245c..d2d63b8b78c2e 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "偵錯配接器可執行檔 '{0}' 不存在。", "debugAdapterCannotDetermineExecutable": "無法判斷偵錯配接器 '{0}' 的可執行檔。", "debugType": "組態的類型。", + "debugTypeNotRecognised": "無法辨識此偵錯類型。請安裝對應的偵錯延伸模組。", "node2NotSupported": "\"node2\" 已不再支援,請改用 \"node\",並將 \"protocol\" 屬性設為 \"inspector\"。", "debugName": "組態的名稱; 出現在啟動組態下拉式功能表中。", "debugRequest": "要求組態的類型。可以是 [啟動] 或 [附加]。", diff --git a/i18n/cht/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 83e61cd9ea9a8..71c9d68e1927f 100644 --- a/i18n/cht/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,6 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "vscode.extension.contributes.view": "提供自訂檢視", + "vscode.extension.contributes.view.id": "用以識別透過 vscode.workspace.createTreeView 建立之檢視的唯一識別碼", + "vscode.extension.contributes.view.label": "用以轉譯檢視的易讀字串", + "vscode.extension.contributes.view.icon": "連到檢視圖示的路徑", + "vscode.extension.contributes.views": "提供自訂檢視", "showViewlet": "顯示 {0}", "view": "檢視" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index c4ae560325bf2..785e1cb774aca 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "reallyRecommended2": "建議對此檔案類型使用 '{0}' 延伸模組。", "showRecommendations": "顯示建議", "neverShowAgain": "不要再顯示", "close": "關閉", diff --git a/i18n/cht/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/cht/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json index 84b98eb14e0cf..4a54d52ef909c 100644 --- a/i18n/cht/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json @@ -11,5 +11,6 @@ "genericSaveError": "無法儲存 '{0}': {1}", "staleSaveError": "無法儲存 '{0}': 磁碟上的內容較新。請按一下 [比較],比較您的版本與磁碟上的版本。", "compareChanges": "比較", + "saveConflictDiffLabel": "{0} (位於磁碟) ↔ {1} (在 {2} 中) - 解決儲存衝突", "userGuide": "使用編輯器工具列中的動作來「復原」您的變更,或以您的變更「覆寫」磁碟上的內容" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index c3aa093a86d83..45b8b75fa8315 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -7,6 +7,7 @@ "keybindingsInputName": "鍵盤快速鍵(&&K)", "SearchKeybindings.AriaLabel": "搜尋按鍵繫結關係", "SearchKeybindings.Placeholder": "搜尋按鍵繫結關係", + "sortByPrecedene": "依優先順序排序", "header-message": "開啟及編輯進階自訂項目時使用", "keybindings-file-name": "keybindings.json", "keybindingsLabel": "按鍵繫結關係", @@ -14,6 +15,7 @@ "addLabel": "新增按鍵繫結關係", "removeLabel": "移除按鍵繫結關係", "resetLabel": "重設按鍵繫結關係", + "showConflictsLabel": "顯示衝突", "copyLabel": "複製", "error": "編輯按鍵繫結關係時發生錯誤 '{0}'。請開啟 'keybindings.json' 檔案加以檢查。", "command": "Command", diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index ae979e3f75301..a92d2c49e8bbe 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "開啟使用者設定", "openGlobalKeybindings": "開啟鍵盤快速鍵", + "openGlobalKeybindingsFile": "開啟鍵盤快速鍵檔案", "openWorkspaceSettings": "開啟工作區設定", "configureLanguageBasedSettings": "設定語言專屬設定...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/cht/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json index 6ecaf06064a46..c9a1d53702206 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -6,5 +6,6 @@ { "default": "預設", "user": "使用者", + "meta": "中繼", "option": "選項" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 1940ac12b6aa3..8cd8c12aa7220 100644 --- a/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,5 +25,6 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed." + "iconThemeError": "File icon theme is unknown or not installed.", + "workbenchColors.deprecatedDescription": "改用'workbench.colorCustomizations'" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 103994c579956..ff88046159d0f 100644 --- a/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "aria.oneReference": "Symbol in {0} in Zeile {1}, Spalte {2}", + "aria.fileReferences.1": "1 Symbol in {0}", + "aria.fileReferences.N": "{0} Symbole in {1}", "aria.result.0": "Es wurden keine Ergebnisse gefunden.", "aria.result.1": "1 Symbol in {0} gefunden", "aria.result.n1": "{0} Symbole in {1} gefunden", diff --git a/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json index 43f87d649f5da..feac598aaf2a0 100644 --- a/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.color": "Ungültiges Farbformat. Verwenden Sie #RGB, #RGBA, #RRGGBB oder #RRGGBBAA.", "schema.colors": "In der Workbench verwendete Farben.", "foreground": "Allgemeine Vordergrundfarbe. Diese Farbe wird nur verwendet, wenn sie nicht durch eine Komponente überschrieben wird.", "inputBoxBackground": "Hintergrund für Eingabefeld.", diff --git a/i18n/esn/extensions/git/out/commands.i18n.json b/i18n/esn/extensions/git/out/commands.i18n.json index c27d7b65351dc..9dab0b5e8a8b5 100644 --- a/i18n/esn/extensions/git/out/commands.i18n.json +++ b/i18n/esn/extensions/git/out/commands.i18n.json @@ -16,6 +16,8 @@ "confirm discard": "¿Está seguro de que quiere descartar los cambios de {0}?", "confirm discard multiple": "¿Está seguro de que quiere descartar los cambios de {0} archivos?", "discard": "Descartar cambios", + "confirm discard all": "¿Está seguro de que quiere descartar TODOS los cambios? Esta acción es irreversible.", + "discardAll": "Descartar cambios", "no changes": "No hay cambios para confirmar.", "commit message": "Mensaje de confirmación", "provide commit message": "Proporcione un mensaje de confirmación", @@ -31,6 +33,7 @@ "no remotes to publish": "El repositorio no tiene remotos configurados en los que publicar.", "disabled": "GIT está deshabilitado o no se admite en esta área de trabajo", "clean repo": "Limpie el árbol de trabajo del repositorio antes de la desprotección.", + "cant push": " No puede ejecutar la solicitud de inserción remotamente. Solicite un Pull para integrar los cambios.", "git error details": "GIT: {0}", "git error": "Error de GIT", "open git log": "Abrir registro de GIT" diff --git a/i18n/esn/extensions/git/package.i18n.json b/i18n/esn/extensions/git/package.i18n.json index 4e347b856409d..ee4b5566a5e76 100644 --- a/i18n/esn/extensions/git/package.i18n.json +++ b/i18n/esn/extensions/git/package.i18n.json @@ -39,6 +39,8 @@ "config.autofetch": "Si la búsqueda automática está habilitada", "config.enableLongCommitWarning": "Si se debe advertir sobre los mensajes de confirmación largos", "config.confirmSync": "Confirmar antes de sincronizar repositorios GIT", + "config.countBadge": "Controla el contador de insignia de Git. \"Todo\" cuenta todos los cambios. \"Seguimiento\" solamente cuenta los cambios realizados. \"Desactivado\" lo desconecta.", + "config.checkoutType": "Controla el tipo de ramas listadas cuando ejecuta \"Desproteger\". \"Todo\" muetra todas las referencias, \"local\" solamente las ramas locales y \"remoto\" las ramas remotas.", "config.ignoreLegacyWarning": "Ignora las advertencias hereradas de Git", "config.ignoreLimitWarning": "\nIgnora advertencias cuando se encuentran muchos cambios en un repositorio." } \ No newline at end of file diff --git a/i18n/esn/extensions/gulp/package.i18n.json b/i18n/esn/extensions/gulp/package.i18n.json index 8b6ad71cd4e6d..b8595f4e95f15 100644 --- a/i18n/esn/extensions/gulp/package.i18n.json +++ b/i18n/esn/extensions/gulp/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.gulp.autoDetect": "Controla si la detección automática de tareas Gulp esta activada/desactivada. El valor predeterminado es \"activada\"." +} \ No newline at end of file diff --git a/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json index 0d39c772a73fb..f522401a83d6e 100644 --- a/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Recuperando cambios en los datos para un mejor rendimiento de TypeScript IntelliSense", + "typesInstallerInitializationFailed.title": "No se pudieron instalar los archivos de lenguaje para las características de lenguaje JavaScript. Asegúrese que NPM está instalado y en su ruta de acceso", "typesInstallerInitializationFailed.moreInformation": "Más información", "typesInstallerInitializationFailed.doNotCheckAgain": "No volver a comprobar", "typesInstallerInitializationFailed.close": "Cerrar" diff --git a/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 9622f6f18deab..515c40c0c1d5e 100644 --- a/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "aria.oneReference": "símbolo en {0} linea {1} en la columna {2}", + "aria.fileReferences.1": "1 símbolo en {0}", + "aria.fileReferences.N": "{0} símbolos en {1}", "aria.result.0": "No se encontraron resultados", "aria.result.1": "Encontró 1 símbolo en {0}", "aria.result.n1": "Encontró {0} símbolos en {1}", diff --git a/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 92df4e9611f96..c39e54e06e856 100644 --- a/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -6,6 +6,9 @@ { "editorSuggestWidgetBackground": "Color de fondo del widget sugerido.", "editorSuggestWidgetBorder": "Color de borde del widget sugerido.", + "editorSuggestWidgetForeground": "Color de primer plano del widget sugerido.", + "editorSuggestWidgetSelectedBackground": "Color de fondo de la entrada seleccionada del widget sugerido.", + "editorSuggestWidgetHighlightForeground": "Color del resaltado coincidido en el widget sugerido.", "readMore": "Leer más...{0}", "suggestionWithDetailsAriaLabel": "{0}, sugerencia, con detalles", "suggestionAriaLabel": "{0}, sugerencia", diff --git a/i18n/esn/src/vs/platform/environment/node/argv.i18n.json b/i18n/esn/src/vs/platform/environment/node/argv.i18n.json index 7023f1d6e99d1..1a1f18154df7d 100644 --- a/i18n/esn/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/esn/src/vs/platform/environment/node/argv.i18n.json @@ -20,6 +20,7 @@ "showVersions": "Muestra las versiones de las extensiones instaladas cuando se usa --list-extension.", "installExtension": "Instala una extensión.", "uninstallExtension": "Desinstala una extensión.", + "experimentalApis": "Habilita características de API propuestas para una extensión.", "disableExtensions": "Deshabilite todas las extensiones instaladas.", "disableGPU": "Deshabilita la aceleración de hardware de GPU.", "version": "Versión de impresión.", diff --git a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json index a2b4777b597fb..9d9422600d4db 100644 --- a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,17 +4,44 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.color": "Formato de color no válido. Use #TGB, #RBGA, #RRGGBB o #RRGGBBAA", "schema.colors": "Colores usados en el área de trabajo.", "foreground": "Color de primer plano general. Este color solo se usa si un componente no lo invalida.", + "focusBorder": "Color de borde de los elementos con foco. Este color solo se usa si un componente no lo invalida.", + "contrastBorder": "Un borde adicional alrededor de los elementos para separarlos unos de otros y así mejorar el contraste.", + "activeContrastBorder": "Un borde adicional alrededor de los elementos activos para separarlos unos de otros y así mejorar el contraste.", + "widgetShadow": "Color de sombra de los widgets dentro del editor, como buscar/reemplazar", "inputBoxBackground": "Fondo de cuadro de entrada.", "inputBoxForeground": "Primer plano de cuadro de entrada.", "inputBoxBorder": "Borde de cuadro de entrada.", "inputBoxActiveOptionBorder": "Color de borde de opciones activadas en campos de entrada.", + "inputValidationInfoBackground": "Color de fondo de validación de entrada para gravedad de información.", + "inputValidationInfoBorder": "Color de borde de validación de entrada para gravedad de información.", + "inputValidationWarningBackground": "Color de fondo de validación de entrada para advertencia de información.", + "inputValidationWarningBorder": "Color de borde de validación de entrada para gravedad de advertencia.", + "inputValidationErrorBackground": "Color de fondo de validación de entrada para gravedad de error.", + "inputValidationErrorBorder": "Color de borde de valdación de entrada para gravedad de error.", "dropdownBackground": "Fondo de lista desplegable.", "dropdownForeground": "Primer plano de lista desplegable.", "dropdownBorder": "Borde de lista desplegable.", + "listFocusBackground": "Color de fondo de la lista o el árbol del elemento con el foco cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", + "listActiveSelectionBackground": "Color de fondo de la lista o el árbol del elemento seleccionado cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", + "listInactiveSelectionBackground": "Color de fondo de la lista o el árbol del elemento seleccionado cuando la lista o el árbol están inactivos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", + "listActiveSelectionForeground": "Color de primer plano de la lista o el árbol del elemento con el foco cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", + "listFocusAndSelectionBackground": "Color de fondo de la lista o el árbol del elemento con foco y seleccionado cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no. Este color tiene preferencia sobre los colores de selección y foco individuales.", + "listFocusAndSelectionForeground": "Color de primer plano de la lista o el árbol del elemento con foco y seleccionado cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no. Este color tiene preferencia sobre los colores de selección y foco individuales.", + "listHoverBackground": "Fondo de la lista o el árbol al mantener el mouse sobre los elementos.", + "listDropBackground": "Fondo de arrastrar y colocar la lista o el árbol al mover los elementos con el mouse.", + "highlight": "Color de primer plano de la lista o el árbol de las coincidencias resaltadas al buscar dentro de la lista o el ábol.", "pickerGroupForeground": "Selector de color rápido para la agrupación de etiquetas.", "pickerGroupBorder": "Selector de color rápido para la agrupación de bordes.", + "buttonForeground": "Color de primer plano del botón.", + "buttonBackground": "Color de fondo del botón.", + "buttonHoverBackground": "Color de fondo del botón al mantener el puntero.", + "scrollbarShadow": "Sombra de la barra de desplazamiento indica que la vista se ha despazado.", + "scrollbarSliderBackground": "Color de fondo del control deslizante.", + "scrollbarSliderHoverBackground": "Color de fondo del control deslizante al mantener el puntero.", + "scrollbarSliderActiveBackground": "Color de fondo del control deslizante cuando está activo.", "editorBackground": "Color de fondo del editor.", "editorForeground": "Color de primer plano predeterminado del editor.", "editorSelection": "Color de la selección del editor.", diff --git a/i18n/esn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/esn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 88b1764fba97d..c59c8f1f1b3d7 100644 --- a/i18n/esn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -44,6 +44,8 @@ "openPreviousRecentlyUsedEditorInGroup": "Abrir el editor recientemente usado anterior en el grupo", "openNextRecentlyUsedEditorInGroup": "Abrir el siguiente editor recientemente usado en el grupo", "navigateEditorHistoryByInput": "Abrir el editor anterior desde el historial", + "openNextRecentlyUsedEditor": "Abrir el siguiente editor recientemente usado", + "openPreviousRecentlyUsedEditor": "Abrir el anterior editor recientemente usado", "clearEditorHistory": "Borrar historial del editor", "focusLastEditorInStack": "Abrir el último editor del grupo", "moveEditorLeft": "Mover el editor a la izquierda", diff --git a/i18n/esn/src/vs/workbench/common/theme.i18n.json b/i18n/esn/src/vs/workbench/common/theme.i18n.json index 9d8d6d091ae5e..833a10e06c034 100644 --- a/i18n/esn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/esn/src/vs/workbench/common/theme.i18n.json @@ -12,6 +12,7 @@ "tabActiveEditorGroupInactiveForeground": "Color de primer plano de la pestaña activa en un grupo inactivo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "tabInactiveEditorGroupActiveForeground": "Color de primer plano de la pestaña inactiva en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "tabInactiveEditorGroupInactiveForeground": "Color de primer plano de la pestaña inactiva en un grupo inactivo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", + "editorGroupBackground": "Color de fondo de un grupo de editores. Los grupos de editores son los contenedores de los editores. El color de fondo se ve cuando se mueven arrastrando los grupos de editores.", "editorGroupBorder": "Color para separar varios grupos de editores entre sí. Los grupos de editores son los contenedores de los editores.", "editorDragAndDropBackground": "Color de fondo cuando se arrastran editores.", "panelBackground": "Color de fondo del panel. Los paneles se muestran debajo del área de editores y contienen vistas, como Salida y Terminal integrado.", diff --git a/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index 8b6ad71cd4e6d..1a9d83970b8bd 100644 --- a/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "workbench.action.inspectKeyMap": "Desarrollador: inspeccionar asignaciones de teclas " +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index 5850e2e3bb205..820ecf1008f1f 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -34,6 +34,7 @@ "editConditionalBreakpoint": "Editar punto de interrupción...", "setValue": "Establecer valor", "addWatchExpression": "Agregar expresión", + "editWatchExpression": "Editar expresión", "addToWatchExpressions": "Agregar a inspección", "removeWatchExpression": "Quitar expresión", "removeAllWatchExpressions": "Quitar todas las expresiones", diff --git a/i18n/esn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json index 8b6ad71cd4e6d..807b2b2952eb9 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "debugToolBarBackground": "Color de fondo de la barra de herramientas de depuración" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 3ebe0e2280865..7a35ad366fb07 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "El ejecutable del adaptador de depuración \"{0}\" no existe.", "debugAdapterCannotDetermineExecutable": "No se puede determinar el ejecutable para el adaptador de depuración \"{0}\".", "debugType": "Tipo de configuración.", + "debugTypeNotRecognised": "Este tipo de depuración no se reconoce. Instale la correspondiente extensión de depuración.", "node2NotSupported": "\"node2\" ya no se admite; use \"node\" en su lugar y establezca el atributo \"protocol\" en \"inspector\".", "debugName": "Nombre de la configuración. Aparece en el menú desplegable de la configuración de inicio.", "debugRequest": "Tipo de solicitud de la configuración. Puede ser \"launch\" o \"attach\".", diff --git a/i18n/esn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index feb00418ee773..37239ff3cca88 100644 --- a/i18n/esn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,6 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "vscode.extension.contributes.view": "Aporta una vista personalizada", + "vscode.extension.contributes.view.id": "Identificador único usado para identificar la vista creada a través de vscode.workspace.createTreeView", + "vscode.extension.contributes.view.label": "Cadena en lenguaje natural usada para representar la vista.", + "vscode.extension.contributes.view.icon": "Ruta de acceso al icono de la vista", + "vscode.extension.contributes.views": "Aporta vistas personalizada", "showViewlet": "Mostrar {0}", "view": "Ver" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 7ef1283f9ade4..3131805763058 100644 --- a/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "Abrir configuración de usuario", "openGlobalKeybindings": "Abrir métodos abreviados de teclado", + "openGlobalKeybindingsFile": "Abrir el archivo de métodos abreviados de teclado", "openWorkspaceSettings": "Abrir configuración del área de trabajo", "configureLanguageBasedSettings": "Configurar opciones específicas del lenguaje...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index b8ae0ec102fa9..05a4cfef6c77a 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,6 +9,7 @@ "ConfigureTaskRunnerAction.quickPick.template": "Seleccionar un ejecutador de tareas", "ConfigureTaskRunnerAction.autoDetecting": "Detectando tareas automáticamente para {0}", "ConfigureTaskRunnerAction.autoDetect": "Error de detección automática del sistema de tareas. Se usa la plantilla predeterminada. Consulte el resultado de la tarea para obtener más detalles", + "ConfigureTaskRunnerAction.autoDetectError": "Error de detección automática del sistema de tareas. Consulte el resultado de la tarea para obtener más detalles", "ConfigureTaskRunnerAction.failed": "No se puede crear el archivo \"tasks.json\" dentro de la carpeta \".vscode\". Consulte el resultado de la tarea para obtener más detalles.", "ConfigureTaskRunnerAction.label": "Configurar ejecutor de tareas", "ConfigureBuildTaskAction.label": "Configurar tarea de compilación", diff --git a/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 329fe3c8b2042..a2ca73e3dc141 100644 --- a/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,6 +14,7 @@ "noIconThemeDesc": "Deshabilitar iconos de archivo", "problemChangingIconTheme": "Problema al configurar el tema de icono: {0}", "themes.selectIconTheme": "Seleccionar tema de icono de archivo", + "generateColorTheme.label": "General el tema de color desde la configuración actual", "preferences": "Preferencias", "developer": "Desarrollador" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/esn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index b18644a031aff..bf82a6e7f653c 100644 --- a/i18n/esn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "sin enlazar" + "walkThrough.unboundCommand": "sin enlazar", + "walkThrough.gitNotFound": "Parece que GIT no está instalado en el sistema." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/esn/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index a9799ee79c856..a21b957751a11 100644 --- a/i18n/esn/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/esn/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "Colores para resaltado de sintaxis", "schema.properties.name": "Descripción de la regla", - "schema.fontStyle": "Estilo de fuente de la regla: una opción de \"italic\", \"bold\" y \"underline\", o una combinación de ellas." + "schema.fontStyle": "Estilo de fuente de la regla: una opción de \"italic\", \"bold\" y \"underline\", o una combinación de ellas.", + "schema.tokenColors.path": "Ruta de acceso de la archivo de tema (relativa al archivo actual)" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/esn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index d94eb7af67caa..464fd1a886e83 100644 --- a/i18n/esn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/esn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,5 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "Problemas al analizar el archivo de tema JSON: {0}" + "error.cannotparsejson": "Problemas al analizar el archivo de tema JSON: {0}", + "error.invalidformat.colors": "Problema al analizar el archivo de tema: {0}. La propiedad \"colors\" no es tipo \"object\".", + "error.invalidformat.tokenColors": "Problema al analizar el archivo de tema: {0}. La propiedad 'tokenColors' debería ser una matriz de colores o una ruta de acceso a un archivo texto de tema.", + "error.plist.invalidformat": "Problema al analizar el archivo de tema: {0}. \"settings\" no es una matriz.", + "error.cannotparse": "Problemas al analizar el archivo de tema: {0}", + "error.cannotload": "Problemas al analizar el archivo de tema: {0}:{1}" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/esn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 5d3877ecd7a70..1dd28c717de07 100644 --- a/i18n/esn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/esn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,5 +25,8 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed." + "iconThemeError": "File icon theme is unknown or not installed.", + "workbenchColors": "Reemplaza los colores del tema de color actual", + "workbenchColors.deprecated": "Esta configuracion no es experimental y se ha cambiado de nombre a 'workbench.colorCustomizations'", + "workbenchColors.deprecatedDescription": "Utilice 'workbench.colorCustomizations' en su lugar" } \ No newline at end of file diff --git a/i18n/fra/extensions/git/out/commands.i18n.json b/i18n/fra/extensions/git/out/commands.i18n.json index 738f408aeaa24..2f26d293f1e6c 100644 --- a/i18n/fra/extensions/git/out/commands.i18n.json +++ b/i18n/fra/extensions/git/out/commands.i18n.json @@ -16,6 +16,8 @@ "confirm discard": "Voulez-vous vraiment abandonner les changements apportés à {0} ?", "confirm discard multiple": "Voulez-vous vraiment abandonner les changements apportés à {0} fichiers ?", "discard": "Ignorer les modifications", + "confirm discard all": "Voulez-vous vraiment ignorer TOUTES les modifications ? Cette action est IRRÉVERSIBLE.", + "discardAll": "Ignorer TOUTES les modifications", "no changes": "Il n'existe aucun changement à valider.", "commit message": "Message de validation", "provide commit message": "Indiquez un message de validation", @@ -31,6 +33,7 @@ "no remotes to publish": "Votre dépôt n'a aucun dépôt distant configuré pour une publication.", "disabled": "Git est désactivé ou non pris en charge dans cet espace de travail", "clean repo": "Nettoyez l'arborescence de travail de votre dépôt avant l'extraction.", + "cant push": "Push impossible des références vers la branche distante. Exécutez d'abord 'Extraire' pour intégrer vos modifications.", "git error details": "Git : {0}", "git error": "Erreur Git", "open git log": "Ouvrir le journal Git" diff --git a/i18n/fra/extensions/git/package.i18n.json b/i18n/fra/extensions/git/package.i18n.json index a2aa4ce8ddf38..801419a6433bb 100644 --- a/i18n/fra/extensions/git/package.i18n.json +++ b/i18n/fra/extensions/git/package.i18n.json @@ -39,6 +39,8 @@ "config.autofetch": "Indique si la récupération automatique est activée", "config.enableLongCommitWarning": "Indique si les longs messages de validation doivent faire l'objet d'un avertissement", "config.confirmSync": "Confirmer avant de synchroniser des dépôts git", + "config.countBadge": "Contrôle le compteur de badges Git. La valeur 'toutes' compte toutes les modifications. La valeur 'suivies' compte uniquement les modifications suivies. La valeur 'désactivé' désactive le compteur.", + "config.checkoutType": "Contrôle le type des branches répertoriées pendant l'exécution de 'Extraire vers...'. La valeur 'toutes' montre toutes les références, la valeur 'locales' montre uniquement les branches locales, la valeur 'balises' montre uniquement les balises et la valeur 'distantes' montre uniquement les branches distantes.", "config.ignoreLegacyWarning": "Ignore l'avertissement Git hérité", "config.ignoreLimitWarning": "Ignore l'avertissement quand il y a trop de modifications dans un dépôt" } \ No newline at end of file diff --git a/i18n/fra/extensions/gulp/package.i18n.json b/i18n/fra/extensions/gulp/package.i18n.json index 8b6ad71cd4e6d..98a28783ec8d4 100644 --- a/i18n/fra/extensions/gulp/package.i18n.json +++ b/i18n/fra/extensions/gulp/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.gulp.autoDetect": "Contrôle si la détection automatique des tâches Gulp est activée ou désactivée. La valeur par défaut est activée." +} \ No newline at end of file diff --git a/i18n/fra/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/fra/extensions/typescript/out/utils/typingsStatus.i18n.json index 0b61796218ce7..d9cc787276c71 100644 --- a/i18n/fra/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/fra/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Récupération (fetch) des données pour l'amélioration de TypeScript IntelliSense", + "typesInstallerInitializationFailed.title": "Impossible d'installer des fichiers de typages pour les fonctionnalités du langage JavaScript. Vérifiez que NPM est installé et se trouve dans votre chemin", "typesInstallerInitializationFailed.moreInformation": "Informations", "typesInstallerInitializationFailed.doNotCheckAgain": "Ne plus vérifier", "typesInstallerInitializationFailed.close": "Fermer" diff --git a/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 6440507bb5954..e4871d36b8975 100644 --- a/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "aria.oneReference": "symbole dans {0} sur la ligne {1}, colonne {2}", + "aria.fileReferences.1": "1 symbole dans {0}", + "aria.fileReferences.N": "{0} symboles dans {1}", "aria.result.0": "Résultats introuvables", "aria.result.1": "1 symbole dans {0}", "aria.result.n1": "{0} symboles dans {1}", diff --git a/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index cae2864bf7a10..3e58c829119ca 100644 --- a/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -6,6 +6,9 @@ { "editorSuggestWidgetBackground": "Couleur d'arrière-plan du widget de suggestion.", "editorSuggestWidgetBorder": "Couleur de bordure du widget de suggestion.", + "editorSuggestWidgetForeground": "Couleur de premier plan du widget de suggestion.", + "editorSuggestWidgetSelectedBackground": "Couleur d'arrière-plan de l'entrée sélectionnée dans le widget de suggestion.", + "editorSuggestWidgetHighlightForeground": "Couleur de la surbrillance des correspondances dans le widget de suggestion.", "readMore": "En savoir plus...{0}", "suggestionWithDetailsAriaLabel": "{0}, suggestion, avec détails", "suggestionAriaLabel": "{0}, suggestion", diff --git a/i18n/fra/src/vs/platform/environment/node/argv.i18n.json b/i18n/fra/src/vs/platform/environment/node/argv.i18n.json index 49e7a2656683a..b4a7b53c42bea 100644 --- a/i18n/fra/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/fra/src/vs/platform/environment/node/argv.i18n.json @@ -20,6 +20,7 @@ "showVersions": "Affichez les versions des extensions installées, quand --list-extension est utilisé.", "installExtension": "Installe une extension.", "uninstallExtension": "Désinstalle une extension.", + "experimentalApis": "Active les fonctionnalités d'API proposées pour une extension.", "disableExtensions": "Désactivez toutes les extensions installées.", "disableGPU": "Désactivez l'accélération matérielle du GPU.", "version": "Affichez la version.", diff --git a/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json index 1fad25c1f7158..45d1776b2ba4a 100644 --- a/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,17 +4,44 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.color": "Format de couleur non valide. Utilisez #RGB, #RGBA, #RRGGBB ou #RRGGBBAA", "schema.colors": "Couleurs utilisées dans le banc d'essai.", "foreground": "Couleur de premier plan globale. Cette couleur est utilisée si elle n'est pas remplacée par un composant.", + "focusBorder": "Couleur de bordure globale des éléments ayant le focus. Cette couleur est utilisée si elle n'est pas remplacée par un composant.", + "contrastBorder": "Bordure supplémentaire autour des éléments pour les séparer des autres et obtenir un meilleur contraste.", + "activeContrastBorder": "Bordure supplémentaire autour des éléments actifs pour les séparer des autres et obtenir un meilleur contraste.", + "widgetShadow": "Couleur de l'ombre des widgets, comme rechercher/remplacer, au sein de l'éditeur.", "inputBoxBackground": "Arrière-plan de la zone d'entrée.", "inputBoxForeground": "Premier plan de la zone d'entrée.", "inputBoxBorder": "Bordure de la zone d'entrée.", "inputBoxActiveOptionBorder": "Couleur de la bordure des options activées dans les champs d'entrée.", + "inputValidationInfoBackground": "Couleur d'arrière-plan de la validation d'entrée pour la gravité des informations.", + "inputValidationInfoBorder": "Couleur de bordure de la validation d'entrée pour la gravité des informations.", + "inputValidationWarningBackground": "Couleur d'arrière-plan de la validation d'entrée pour l'avertissement sur les informations.", + "inputValidationWarningBorder": "Couleur de bordure de la validation d'entrée pour la gravité de l'avertissement.", + "inputValidationErrorBackground": "Couleur d'arrière-plan de la validation d'entrée pour la gravité de l'erreur.", + "inputValidationErrorBorder": "Couleur de bordure de la validation d'entrée pour la gravité de l'erreur. ", "dropdownBackground": "Arrière-plan de la liste déroulante.", "dropdownForeground": "Premier plan de la liste déroulante.", "dropdownBorder": "Bordure de la liste déroulante.", + "listFocusBackground": "Couleur d'arrière-plan de la liste/l'arborescence pour l'élément ayant le focus quand la liste/l'arborescence est active. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", + "listActiveSelectionBackground": "Couleur d'arrière-plan de la liste/l'arborescence de l'élément sélectionné quand la liste/l'arborescence est active. Une liste/arborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", + "listInactiveSelectionBackground": "Couleur d'arrière-plan de la liste/l'arborescence pour l'élément sélectionné quand la liste/l'arborescence est inactive. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", + "listActiveSelectionForeground": "Couleur de premier plan de la liste/l'arborescence pour l'élément sélectionné quand la liste/l'arborescence est active. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", + "listFocusAndSelectionBackground": "Couleur d'arrière-plan de la liste/l'arborescence pour l'élément ayant le focus et sélectionné quand la liste/l'arborescence est active. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive. Cette couleur l'emporte sur les couleurs individuelles de la sélection et du focus.", + "listFocusAndSelectionForeground": "Couleur de premier plan de la liste/l'arborescence pour l'élément ayant le focus et sélectionné quand la liste/l'arborescence est active. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive. Cette couleur l'emporte sur les couleurs individuelles de la sélection et du focus.", + "listHoverBackground": "Arrière-plan de la liste/l'arborescence pendant le pointage sur des éléments avec la souris.", + "listDropBackground": "Arrière-plan de l'opération de glisser-déplacer dans une liste/arborescence pendant le déplacement d'éléments avec la souris.", + "highlight": "Couleur de premier plan dans la liste/l'arborescence pour la surbrillance des correspondances pendant la recherche dans une liste/arborescence.", "pickerGroupForeground": "Couleur du sélecteur rapide pour les étiquettes de regroupement.", "pickerGroupBorder": "Couleur du sélecteur rapide pour les bordures de regroupement.", + "buttonForeground": "Couleur de premier plan du bouton.", + "buttonBackground": "Couleur d'arrière-plan du bouton.", + "buttonHoverBackground": "Couleur d'arrière-plan du bouton pendant le pointage.", + "scrollbarShadow": "Ombre de la barre de défilement pour indiquer que la vue défile.", + "scrollbarSliderBackground": "Couleur d'arrière-plan du curseur.", + "scrollbarSliderHoverBackground": "Couleur d'arrière-plan du curseur pendant le pointage.", + "scrollbarSliderActiveBackground": "Couleur d'arrière-plan du curseur actif.", "editorBackground": "Couleur d'arrière-plan de l'éditeur.", "editorForeground": "Couleur de premier plan par défaut de l'éditeur.", "editorSelection": "Couleur de la sélection de l'éditeur.", diff --git a/i18n/fra/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/fra/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 461dbd7c73bbe..044f984b1ac38 100644 --- a/i18n/fra/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -44,6 +44,8 @@ "openPreviousRecentlyUsedEditorInGroup": "Ouvrir l'éditeur précédent du groupe", "openNextRecentlyUsedEditorInGroup": "Ouvrir l'éditeur suivant du groupe", "navigateEditorHistoryByInput": "Ouvrir l'éditeur précédent dans l'historique", + "openNextRecentlyUsedEditor": "Ouvrir l'éditeur suivant", + "openPreviousRecentlyUsedEditor": "Ouvrir l'éditeur précédent", "clearEditorHistory": "Effacer l'historique de l'éditeur", "focusLastEditorInStack": "Ouvrir le dernier éditeur du groupe", "moveEditorLeft": "Déplacer l'éditeur vers la gauche", diff --git a/i18n/fra/src/vs/workbench/common/theme.i18n.json b/i18n/fra/src/vs/workbench/common/theme.i18n.json index d27b5b34976b7..e958fad7ce594 100644 --- a/i18n/fra/src/vs/workbench/common/theme.i18n.json +++ b/i18n/fra/src/vs/workbench/common/theme.i18n.json @@ -12,8 +12,11 @@ "tabActiveEditorGroupInactiveForeground": "Couleur de premier plan de l'onglet actif dans un groupe inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", "tabInactiveEditorGroupActiveForeground": "Couleur de premier plan de l'onglet inactif dans un groupe actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", "tabInactiveEditorGroupInactiveForeground": "Couleur de premier plan de l'onglet inactif dans un groupe inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", + "editorGroupBackground": "Couleur d'arrière-plan d'un groupe d'éditeurs. Les groupes d'éditeurs sont les conteneurs des éditeurs. La couleur d'arrière-plan s'affiche pendant le glissement de groupes d'éditeurs.", + "editorGroupHeaderBackground": "Couleur d'arrière-plan de l'en-tête du titre du groupe d'éditeurs quand les onglets sont désactivés. Les groupes d'éditeurs sont les conteneurs des éditeurs.", "editorGroupBorder": "Couleur séparant plusieurs groupes d'éditeurs les uns des autres. Les groupes d'éditeurs sont les conteneurs des éditeurs.", "editorDragAndDropBackground": "Couleur d'arrière-plan durant le déplacement des éditeurs.", + "editorMasterDetailsBorder": "Couleur de bordure séparant les détails côté maître des éditeurs côte à côte. Par exemple, les éditeurs de différences et l'éditeur de paramètres.", "panelBackground": "Couleur d'arrière-plan du panneau. Les panneaux s'affichent sous la zone d'éditeurs et contiennent des affichages tels que la sortie et le terminal intégré.", "panelBorder": "Couleur de bordure de panneau dans la partie supérieure de séparation de l'éditeur. Les panneaux s'affichent sous la zone d'éditeurs et contiennent des affichages tels que la sortie et le terminal intégré.", "panelActiveTitleForeground": "Couleur du titre du panneau actif. Les panneaux se situent sous la zone de l'éditeur et contiennent des affichages comme la sortie et le terminal intégré.", @@ -24,6 +27,8 @@ "statusBarNoFolderBackground": "Couleur d'arrière-plan de la barre d'état quand aucun dossier n'est ouvert. La barre d'état est affichée en bas de la fenêtre.", "statusBarItemActiveBackground": "Couleur d'arrière-plan de l'élément de la barre d'état durant un clic. La barre d'état est affichée en bas de la fenêtre.", "statusBarItemHoverBackground": "Couleur d'arrière-plan de l'élément de la barre d'état durant un pointage. La barre d'état est affichée en bas de la fenêtre.", + "statusBarProminentItemBackground": "Couleur d'arrière-plan des éléments importants de la barre d'état. Les éléments importants se différencient des autres entrées de la barre d'état pour indiquer l'importance. La barre d'état est affichée en bas de la fenêtre.", + "statusBarProminentItemHoverBackground": "Couleur d'arrière-plan des éléments importants de la barre d'état pendant le pointage. Les éléments importants se différencient des autres entrées de la barre d'état pour indiquer l'importance. La barre d'état est affichée en bas de la fenêtre.", "activityBarBackground": "Couleur d'arrière-plan de la barre d'activités. La barre d'activités s'affiche complètement à gauche ou à droite, et permet de naviguer entre les affichages de la barre latérale.", "activityBarForeground": "Couleur de premier plan de la barre d'activités (par ex., utilisée pour les icônes). La barre d'activités s'affiche complètement à gauche ou à droite, et permet de parcourir les vues de la barre latérale.", "activityBarDragAndDropBackground": "Couleur des commentaires sur une opération de glisser-déplacer pour les éléments de la barre d'activités. La barre d'activités, située à l'extrême gauche ou droite, permet de basculer entre les affichages de la barre latérale.", @@ -31,8 +36,11 @@ "activityBarBadgeForeground": "Couleur de premier plan du badge de notification d'activité. La barre d'activités, située à l'extrême gauche ou droite, permet de basculer entre les affichages de la barre latérale.", "sideBarBackground": "Couleur d'arrière-plan de la barre latérale. La barre latérale est le conteneur des affichages tels que ceux de l'exploration et la recherche.", "sideBarTitleForeground": "Couleur de premier plan du titre de la barre latérale. La barre latérale est le conteneur des affichages tels que ceux de l'exploration et la recherche.", + "sideBarSectionHeaderBackground": "Couleur d'arrière-plan de l'en-tête de section de la barre latérale. La barre latérale est le conteneur des vues comme celles de l'explorateur et la recherche.", "titleBarActiveForeground": "Premier plan de la barre de titre quand la fenêtre est active. Notez que cette couleur est uniquement prise en charge sur macOS.", "titleBarInactiveForeground": "Premier plan de la barre de titre quand la fenêtre est inactive. Notez que cette couleur est uniquement prise en charge sur macOS.", "titleBarActiveBackground": "Arrière-plan de la barre de titre quand la fenêtre est active. Notez que cette couleur est uniquement prise en charge sur macOS.", - "titleBarInactiveBackground": "Arrière-plan de la barre de titre quand la fenêtre est inactive. Notez que cette couleur est uniquement prise en charge sur macOS." + "titleBarInactiveBackground": "Arrière-plan de la barre de titre quand la fenêtre est inactive. Notez que cette couleur est uniquement prise en charge sur macOS.", + "notificationsForeground": "Couleur de premier plan des notifications. Les notifications défilent à partir du haut de la fenêtre.", + "notificationsBackground": "Couleur d'arrière-plan des notifications. Les notifications défilent à paritr du haut de la fenêtre." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index 8b6ad71cd4e6d..e677c5f357140 100644 --- a/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "workbench.action.inspectKeyMap": "Développeur : Inspecter les mappages de touches" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index e52f1c8e8ea34..1783ec559cbd7 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -34,6 +34,7 @@ "editConditionalBreakpoint": "Modifier un point d'arrêt...", "setValue": "Définir la valeur", "addWatchExpression": "Ajouter une expression", + "editWatchExpression": "Modifier l'expression", "addToWatchExpressions": "Ajouter à la fenêtre Espion", "removeWatchExpression": "Supprimer une expression", "removeAllWatchExpressions": "Supprimer toutes les expressions", diff --git a/i18n/fra/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json index 8b6ad71cd4e6d..2cfe628ea3985 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "debugToolBarBackground": "Couleur d'arrière-plan de la barre d'outils de débogage." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 37eac1f96200e..bcdf182d5223d 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "L'exécutable d'adaptateur de débogage '{0}' n'existe pas.", "debugAdapterCannotDetermineExecutable": "Impossible de déterminer l'exécutable pour l'adaptateur de débogage '{0}'.", "debugType": "Type de configuration.", + "debugTypeNotRecognised": "Ce type de débogage n'est pas reconnu. Installez l'extension de débogage correspondante.", "node2NotSupported": "\"node2\" n'est plus pris en charge. Utilisez \"node\" à la place, et affectez la valeur \"inspector\" à l'attribut \"protocol\".", "debugName": "Le nom de la configuration s'affiche dans le menu déroulant de la configuration de lancement.", "debugRequest": "Type de requête de configuration. Il peut s'agir de \"launch\" ou \"attach\".", diff --git a/i18n/fra/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index c0fac8346b81d..82bea9c4375fd 100644 --- a/i18n/fra/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,6 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "vscode.extension.contributes.view": "Ajoute une vue personnalisée", + "vscode.extension.contributes.view.id": "ID unique utilisé pour identifier la vue créée avec vscode.workspace.createTreeView", + "vscode.extension.contributes.view.label": "Chaîne contrôlable de visu permettant d'afficher la vue", + "vscode.extension.contributes.view.icon": "Chemin de l'icône de la vue", + "vscode.extension.contributes.views": "Ajoute des vues personnalisées", "showViewlet": "Afficher {0}", "view": "Affichage" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 5f3ed88ebd24b..61742507b3662 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "Ouvrir les paramètres utilisateur", "openGlobalKeybindings": "Ouvrir les raccourcis clavier", + "openGlobalKeybindingsFile": "Ouvrir le fichier des raccourcis clavier", "openWorkspaceSettings": "Ouvrir les paramètres d'espace de travail", "configureLanguageBasedSettings": "Configurer les paramètres spécifiques au langage...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 0c1b20136eabb..e0173fcde81cf 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,6 +9,7 @@ "ConfigureTaskRunnerAction.quickPick.template": "Sélectionner un exécuteur de tâches", "ConfigureTaskRunnerAction.autoDetecting": "Détection automatique des tâches pour {0}", "ConfigureTaskRunnerAction.autoDetect": "En raison de l'échec de la détection automatique du système de tâche, le modèle par défaut va être utilisé. Pour plus d'informations, consultez la sortie de la tâche.", + "ConfigureTaskRunnerAction.autoDetectError": "La détection automatique du système de tâche a produit des erreurs. Consultez la sortie de la tâche pour plus d'informations.", "ConfigureTaskRunnerAction.failed": "Impossible de créer le fichier 'tasks.json' dans le dossier '.vscode'. Pour plus d'informations, consultez la sortie de la tâche.", "ConfigureTaskRunnerAction.label": "Configurer l'exécuteur de tâches", "ConfigureBuildTaskAction.label": "Configurer une tâche de build", diff --git a/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 8ad3a81eb90a1..17bcf71d09f23 100644 --- a/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,6 +14,7 @@ "noIconThemeDesc": "Désactiver les icônes de fichiers", "problemChangingIconTheme": "Problème de définition du thème d'icône : {0}", "themes.selectIconTheme": "Sélectionner un thème d'icône de fichier", + "generateColorTheme.label": "Générer le thème de couleur à partir des paramètres actuels", "preferences": "Préférences", "developer": "Développeur" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/fra/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index 1b65f474a566f..a27dad756b16e 100644 --- a/i18n/fra/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "indépendant" + "walkThrough.unboundCommand": "indépendant", + "walkThrough.gitNotFound": "Git semble ne pas être installé sur votre système." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/fra/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index d48cbf383ce4a..2eb4254690560 100644 --- a/i18n/fra/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/fra/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "Couleurs de la coloration syntaxique", "schema.properties.name": "Description de la règle", - "schema.fontStyle": "Style de police de la règle : 'italique', 'gras' ou 'souligné', ou une combinaison de ces styles" + "schema.fontStyle": "Style de police de la règle : 'italique', 'gras' ou 'souligné', ou une combinaison de ces styles", + "schema.tokenColors.path": "Chemin d'un fichier tmTheme (relatif au fichier actuel)" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/fra/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 4849a048ec46d..2d6a6848e2769 100644 --- a/i18n/fra/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/fra/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,5 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "Problèmes durant l'analyse du fichier de thème JSON : {0}" + "error.cannotparsejson": "Problèmes durant l'analyse du fichier de thème JSON : {0}", + "error.invalidformat.colors": "Problème pendant l'analyse du fichier de thème de couleur : {0}. La propriété 'colors' n'est pas de type 'object'.", + "error.invalidformat.tokenColors": "Problème pendant l'analyse du fichier de thème de couleur : {0}. La propriété 'tokenColors' doit être un tableau spécifiant des couleurs ou le chemin d'un fichier de thème TextMate", + "error.plist.invalidformat": "Problème pendant l'analyse du fichier tmTheme : {0}. 'settings' n'est pas un tableau.", + "error.cannotparse": "Problèmes pendant l'analyse du fichier tmTheme : {0}", + "error.cannotload": "Problèmes pendant le chargement du fichier tmTheme {0} : {1}" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/fra/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 3181391a3b20c..01dfa20dfb850 100644 --- a/i18n/fra/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/fra/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,5 +25,8 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed." + "iconThemeError": "File icon theme is unknown or not installed.", + "workbenchColors": "Remplace les couleurs du thème de couleur sélectionné.", + "workbenchColors.deprecated": "Le paramètre n'est plus expérimental et a été renommé 'workbench.colorCustomizations'", + "workbenchColors.deprecatedDescription": "Utiliser 'workbench.colorCustomizations' à la place" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index c826bb2090e51..63fbdbdb30f16 100644 --- a/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "aria.oneReference": "simbolo in {0} alla riga {1} colonna {2}", + "aria.fileReferences.1": "1 simbolo in {0}", + "aria.fileReferences.N": "{0} simboli in {1}", "aria.result.0": "Non sono stati trovati risultati", "aria.result.1": "Trovato 1 simbolo in {0}", "aria.result.n1": "Trovati {0} simboli in {1}", diff --git a/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 8bd52bf065207..6d495a04fda11 100644 --- a/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -6,6 +6,9 @@ { "editorSuggestWidgetBackground": "Colore di sfondo del widget dei suggerimenti.", "editorSuggestWidgetBorder": "Colore del bordo del widget dei suggerimenti.", + "editorSuggestWidgetForeground": "Colore primo piano del widget dei suggerimenti.", + "editorSuggestWidgetSelectedBackground": "Colore di sfondo della voce selezionata del widget dei suggerimenti.", + "editorSuggestWidgetHighlightForeground": "Colore delle evidenziazioni corrispondenze nel widget dei suggerimenti.", "readMore": "Altre informazioni...{0}", "suggestionWithDetailsAriaLabel": "{0}, suggerimento, con dettagli", "suggestionAriaLabel": "{0}, suggerimento", diff --git a/i18n/ita/src/vs/platform/environment/node/argv.i18n.json b/i18n/ita/src/vs/platform/environment/node/argv.i18n.json index ef50677325d0c..e9a4ecff7e02e 100644 --- a/i18n/ita/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/ita/src/vs/platform/environment/node/argv.i18n.json @@ -20,6 +20,7 @@ "showVersions": "Mostra le versioni delle estensioni installate, quando si usa --list-extension.", "installExtension": "Installa un'estensione.", "uninstallExtension": "Disinstalla un'estensione.", + "experimentalApis": "Abilita funzionalità di API proposte per un'estensione specifica.", "disableExtensions": "Disabilita tutte le estensioni installate.", "disableGPU": "Disabilita l'accelerazione hardware della GPU.", "version": "Visualizza la versione.", diff --git a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json index 1f6ffb780e6bf..92990d65a8a1b 100644 --- a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,17 +4,38 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.color": "Formato colore non valido. Usare #RGB, #RGBA, #RRGGBB o #RRGGBBAA", "schema.colors": "Colori usati nell'area di lavoro.", "foreground": "Colore primo piano. Questo colore è utilizzato solo se non viene sovrascritto da un componente.", + "focusBorder": "Colore dei bordi degli elementi evidenziati. Questo colore è utilizzato solo se non viene sovrascritto da un componente.", + "contrastBorder": "Un bordo supplementare attorno agli elementi per contrastarli maggiormente rispetto agli altri.", + "activeContrastBorder": "Un bordo supplementare intorno agli elementi attivi per contrastarli maggiormente rispetto agli altri.", + "widgetShadow": "Colore ombreggiatura dei widget, ad es. Trova/Sostituisci all'interno dell'editor.", "inputBoxBackground": "Sfondo della casella di input.", "inputBoxForeground": "Primo piano della casella di input.", "inputBoxBorder": "Bordo della casella di input.", "inputBoxActiveOptionBorder": "Colore del bordo di opzioni attivate nei campi di input.", + "inputValidationInfoBackground": "Colore di sfondo di convalida dell'input di tipo Informazione.", + "inputValidationInfoBorder": "Colore bordo di convalida dell'input di tipo Informazione.", + "inputValidationWarningBackground": "Colore di sfondo di convalida dell'input di tipo Avviso.", + "inputValidationWarningBorder": "Colore bordo di convalida dell'input di tipo Avviso.", + "inputValidationErrorBackground": "Colore di sfondo di convalida dell'input di tipo Errore.", + "inputValidationErrorBorder": "Colore bordo di convalida dell'input di tipo Errore.", "dropdownBackground": "Sfondo dell'elenco a discesa.", "dropdownForeground": "Primo piano dell'elenco a discesa.", "dropdownBorder": "Bordo dell'elenco a discesa.", + "listHoverBackground": "Sfondo Elenco/Struttura ad albero al passaggio del mouse sugli elementi.", + "listDropBackground": "Sfondo Elenco/Struttura ad albero durante il trascinamento degli elementi selezionati.", + "highlight": "Colore primo piano Elenco/Struttura ad albero delle occorrenze trovate durante la ricerca nell'Elenco/Struttura ad albero.", "pickerGroupForeground": "Colore di selezione rapida per il raggruppamento delle etichette.", "pickerGroupBorder": "Colore di selezione rapida per il raggruppamento dei bordi.", + "buttonForeground": "Colore primo piano del pulsante.", + "buttonBackground": "Colore di sfondo del pulsante.", + "buttonHoverBackground": "Colore di sfondo del pulsante al passaggio del mouse.", + "scrollbarShadow": "Ombra di ScrollBar per indicare lo scorrimento della visualizzazione.", + "scrollbarSliderBackground": "Colore di sfondo dello Slider.", + "scrollbarSliderHoverBackground": "Colore di sfondo dello Slider al passaggio del mouse", + "scrollbarSliderActiveBackground": "Colore di sfondo dello Slider quando attivo.", "editorBackground": "Colore di sfondo dell'editor.", "editorForeground": "Colore primo piano predefinito dell'editor.", "editorSelection": "Colore della selezione dell'editor.", diff --git a/i18n/jpn/extensions/git/out/commands.i18n.json b/i18n/jpn/extensions/git/out/commands.i18n.json index 9ff7d6a1f7c65..0e42fe3c0fdc1 100644 --- a/i18n/jpn/extensions/git/out/commands.i18n.json +++ b/i18n/jpn/extensions/git/out/commands.i18n.json @@ -16,6 +16,8 @@ "confirm discard": "{0} の変更を破棄しますか?", "confirm discard multiple": "{0} 個のファイルの変更内容を破棄しますか?", "discard": "変更を破棄", + "confirm discard all": "すべての変更を破棄しますか? 変更は戻りません!", + "discardAll": "すべての変更を破棄", "no changes": "コミットする必要のある変更はありません。", "commit message": "コミット メッセージ", "provide commit message": "コミット メッセージを入力してください", diff --git a/i18n/jpn/extensions/git/package.i18n.json b/i18n/jpn/extensions/git/package.i18n.json index 86293d87d2b55..f991c6d178927 100644 --- a/i18n/jpn/extensions/git/package.i18n.json +++ b/i18n/jpn/extensions/git/package.i18n.json @@ -39,6 +39,7 @@ "config.autofetch": "自動フェッチが有効かどうか", "config.enableLongCommitWarning": "長いコミット メッセージについて警告するかどうか", "config.confirmSync": "Git リポジトリを同期する前に確認する", + "config.countBadge": "Git バッジ カウンターを制御します。`all` はすべての変更をカウントします。 `tracked` は追跡している変更のみカウントします。 `off` はカウントをオフします。", "config.ignoreLegacyWarning": "旧 Git の警告を無視します", "config.ignoreLimitWarning": "リポジトリ内に変更が多い場合は警告を無視します" } \ No newline at end of file diff --git a/i18n/jpn/extensions/gulp/package.i18n.json b/i18n/jpn/extensions/gulp/package.i18n.json index 8b6ad71cd4e6d..1db590a13548c 100644 --- a/i18n/jpn/extensions/gulp/package.i18n.json +++ b/i18n/jpn/extensions/gulp/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.gulp.autoDetect": "Gulp タスクの自動検出をオンにするかオフにするかを制御します。既定はオンです。" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/jpn/extensions/typescript/out/utils/typingsStatus.i18n.json index 3a40c2e29d9d1..5696b94039210 100644 --- a/i18n/jpn/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/jpn/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "より適した TypeScript IntelliSense に関するデータをフェッチしています", + "typesInstallerInitializationFailed.title": "JavaScript 言語機能のための型定義ファイルをインストールできませんでした。NPM がインストールされ、PATH にあることを確認してください。", "typesInstallerInitializationFailed.moreInformation": "詳細情報", "typesInstallerInitializationFailed.doNotCheckAgain": "今後確認しない", "typesInstallerInitializationFailed.close": "閉じる" diff --git a/i18n/jpn/extensions/typescript/package.i18n.json b/i18n/jpn/extensions/typescript/package.i18n.json index 35c289eb3d5f1..ebe67b59e7572 100644 --- a/i18n/jpn/extensions/typescript/package.i18n.json +++ b/i18n/jpn/extensions/typescript/package.i18n.json @@ -38,6 +38,6 @@ "typescript.openTsServerLog.title": "TS サーバーのログ ファイルを開く", "typescript.selectTypeScriptVersion.title": "TypeScript のバージョンの選択", "jsDocCompletion.enabled": " 自動 JSDoc コメントを有効/無効にします", - "javascript.implicitProjectConfig.checkJs": "JavaScript ファイルのセマンティック チェックを有効/無効にします。既存の jsconfi.json や tsconfi.json ファイルの設定はこれより優先されます。 TypeScript は 2.3.1 以上である必要があります。", + "javascript.implicitProjectConfig.checkJs": "JavaScript ファイルのセマンティック チェックを有効/無効にします。既存の jsconfi.json や tsconfi.json ファイルの設定はこれより優先されます。TypeScript は 2.3.1 以上である必要があります。", "typescript.check.npmIsInstalled": "型定義の自動取得に NPM がインストールされているかどうかを確認する" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 33c314603a183..0e09eb3904df0 100644 --- a/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "aria.oneReference": "列 {2} の {1} 行目に {0} つのシンボル", + "aria.fileReferences.1": "{0} に 1 個のシンボル", + "aria.fileReferences.N": "{1} に {0} 個のシンボル", "aria.result.0": "一致する項目はありません", "aria.result.1": "{0} に 1 個のシンボルが見つかりました", "aria.result.n1": "{1} に {0} 個のシンボルが見つかりました", diff --git a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index b1177964ccfdc..225b4c1b85d41 100644 --- a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -6,6 +6,9 @@ { "editorSuggestWidgetBackground": "候補のウィジェットの背景色。", "editorSuggestWidgetBorder": "候補ウィジェットの境界線色。", + "editorSuggestWidgetForeground": "候補ウィジェットの前景色。", + "editorSuggestWidgetSelectedBackground": "候補ウィジェット内で選択済みエントリの背景色。", + "editorSuggestWidgetHighlightForeground": "候補のウィジェット内で一致したハイライトの色。", "readMore": "詳細を表示...{0}", "suggestionWithDetailsAriaLabel": "{0}、候補、詳細あり", "suggestionAriaLabel": "{0}、候補", diff --git a/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json b/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json index b51838a0db547..f63839a1d9b13 100644 --- a/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json @@ -20,6 +20,7 @@ "showVersions": "#NAME?", "installExtension": "拡張機能をインストールします。", "uninstallExtension": "拡張機能をアンインストールします。", + "experimentalApis": "拡張機能に対して Proposed API 機能を有効にします。", "disableExtensions": "インストールされたすべての拡張機能を無効にします。", "disableGPU": "GPU ハードウェア アクセラレータを無効にします。", "version": "バージョンを印刷します。", diff --git a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json index a657f353140f8..857fb4711f48a 100644 --- a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,8 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.color": "無効な色形式です。 #RGB、#RGBA、#RRGGBB、#RRGGBBAA のいずれかを使用してください", "schema.colors": "ワークベンチで使用する色。", "foreground": "全体の前景色。この色は、コンポーネントによってオーバーライドされていない場合にのみ使用されます。", + "focusBorder": "フォーカスされた要素の境界線全体の色。この色はコンポーネントによって上書きされていない場合にのみ使用されます。", + "widgetShadow": "エディター内の検索/置換窓など、エディター ウィジェットの影の色。", "inputBoxBackground": "入力ボックスの背景。", "inputBoxForeground": "入力ボックスの前景。", "inputBoxBorder": "入力ボックスの境界線。", @@ -15,6 +18,13 @@ "dropdownBorder": "ドロップダウンの境界線。", "pickerGroupForeground": "ラベルをグループ化するためのクリック選択の色。", "pickerGroupBorder": "境界線をグループ化するためのクイック選択の色。", + "buttonForeground": "ボタンの前景色。", + "buttonBackground": "ボタンの背景色。", + "buttonHoverBackground": "ホバー時のボタン背景色。", + "scrollbarShadow": "ビューがスクロールされたことを示すスクロール バーの影。", + "scrollbarSliderBackground": "スライダーの背景色。", + "scrollbarSliderHoverBackground": "ホバー時のスライダー背景色。", + "scrollbarSliderActiveBackground": "アクティブ時のスライダー背景色。", "editorBackground": "エディターの背景色。", "editorForeground": "エディターの既定の前景色。", "editorSelection": "エディターの選択範囲の色。", diff --git a/i18n/jpn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/jpn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 5f83155a33c87..7af5bc08c38ca 100644 --- a/i18n/jpn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -44,6 +44,8 @@ "openPreviousRecentlyUsedEditorInGroup": "グループ内の最近使用したエディターのうち前のエディターを開く", "openNextRecentlyUsedEditorInGroup": "グループ内の最近使用したエディターのうち次のエディターを開く", "navigateEditorHistoryByInput": "履歴から以前のエディターを開く", + "openNextRecentlyUsedEditor": "最近使用したエディターのうち次のエディターを開く", + "openPreviousRecentlyUsedEditor": "最近使用したエディターのうち前のエディターを開く", "clearEditorHistory": "エディター履歴のクリア", "focusLastEditorInStack": "グループ内の最後のエディターを開く", "moveEditorLeft": "エディターを左へ移動", diff --git a/i18n/jpn/src/vs/workbench/common/theme.i18n.json b/i18n/jpn/src/vs/workbench/common/theme.i18n.json index a7d6ea6e58cf2..7dd2454d3cb84 100644 --- a/i18n/jpn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/jpn/src/vs/workbench/common/theme.i18n.json @@ -12,6 +12,8 @@ "tabActiveEditorGroupInactiveForeground": "非アクティブ グループ内のアクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", "tabInactiveEditorGroupActiveForeground": "アクティブ グループ内の非アクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", "tabInactiveEditorGroupInactiveForeground": "非アクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", + "editorGroupBackground": "エディター グループの背景色。エディター グループはエディターのコンテナーです。背景色はエディター グループをドラッグすると表示されます。", + "editorGroupHeaderBackground": "タブが無効な場合の エディター グループ タイトル ヘッダーの背景色。エディター グループはエディターのコンテナーです。", "editorGroupBorder": "複数のエディター グループを互いに分離するための色。エディター グループはエディターのコンテナーです。", "editorDragAndDropBackground": "エディターのドラッグ時の背景色。", "panelBackground": "パネルの背景色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", @@ -24,6 +26,8 @@ "statusBarNoFolderBackground": "フォルダーが開いていないときのステータス バーの背景色。ステータス バーはウィンドウの下部に表示されます。", "statusBarItemActiveBackground": "クリック時のステータス バーの項目の背景色。ステータス バーはウィンドウの下部に表示されます。", "statusBarItemHoverBackground": "ホバーしたときのステータス バーの項目の背景色。ステータス バーはウィンドウの下部に表示されます。", + "statusBarProminentItemBackground": "ステータス バーの重要な項目の背景色。重要な項目は、重要性を示すために他のステータスバーの項目から際立っています。 ステータス バーはウィンドウの下部に表示されます。", + "statusBarProminentItemHoverBackground": "ホバーしたときのステータス バーの重要な項目の背景色。重要な項目は、重要性を示すために他のステータスバーの項目から際立っています。 ステータス バーはウィンドウの下部に表示されます。", "activityBarBackground": "アクティビティ バーの背景色。アクティビティ バーは左端または右端に表示され、サイド バーのビューを切り替えることができます。", "activityBarForeground": "アクティビティ バーの前景色 (例: アイコンの色)。アクティビティ バーは左端または右端に表示され、サイド バーのビューを切り替えることができます。", "activityBarDragAndDropBackground": "アクティビティ バーの項目のドラッグ アンド ドロップ フィードバックの色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", @@ -31,8 +35,11 @@ "activityBarBadgeForeground": "アクティビティ通知バッジの前景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", "sideBarBackground": "サイド バーの背景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", "sideBarTitleForeground": "サイド バーのタイトルの前景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", + "sideBarSectionHeaderBackground": "サイド バーのセクション ヘッダーの背景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", "titleBarActiveForeground": "ウィンドウがアクティブな場合のタイトル バーの前景。現在、この色は macOS でのみサポートされているのでご注意ください。", "titleBarInactiveForeground": "ウィンドウが非アクティブな場合のタイトル バーの前景。現在、この色は macOS でのみサポートされているのでご注意ください。", "titleBarActiveBackground": "ウィンドウがアクティブな場合のタイトル バーの背景。現在、この色は macOS でのみサポートされているのでご注意ください。", - "titleBarInactiveBackground": "ウィンドウが非アクティブな場合のタイトル バーの背景。現在、この色は macOS でのみサポートされているのでご注意ください。" + "titleBarInactiveBackground": "ウィンドウが非アクティブな場合のタイトル バーの背景。現在、この色は macOS でのみサポートされているのでご注意ください。", + "notificationsForeground": "通知の前景色。通知はウィンドウの上部からスライド表示します。", + "notificationsBackground": "通知の背景色。通知はウィンドウの上部からスライド表示します。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index 8b6ad71cd4e6d..d24a34e3065f5 100644 --- a/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "workbench.action.inspectKeyMap": "開発者: キー マッピングを検査する" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index 2be30d1f34b25..e41cc2280f6cc 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -34,6 +34,7 @@ "editConditionalBreakpoint": "ブレークポイントの編集...", "setValue": "値の設定", "addWatchExpression": "式の追加", + "editWatchExpression": "式の編集", "addToWatchExpressions": "ウォッチに追加", "removeWatchExpression": "式の削除", "removeAllWatchExpressions": "すべての式を削除する", diff --git a/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json index 8b6ad71cd4e6d..8876044c17ee8 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "debugToolBarBackground": "デバッグ ツール バーの背景色。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 75ed35238e11c..efdfa523258ce 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "デバッグ アダプターの実行可能ファイル '{0}' がありません。", "debugAdapterCannotDetermineExecutable": "デバッグ アダプター '{0}' の実行可能ファイルを判別できません。", "debugType": "構成の種類。", + "debugTypeNotRecognised": "デバッグの種類は認識されませんでした。対応するデバッグの拡張機能をインストールしてください。", "node2NotSupported": "\"node2\" はサポートされていません。代わりに \"node\" を使用し、\"protocol\" 属性を \"inspector\" に設定してください。", "debugName": "構成の名前。起動構成のドロップダウン メニューに表示されます。", "debugRequest": "構成の要求の種類。\"launch\" または \"attach\" です。", diff --git a/i18n/jpn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 9192a65143bf9..2369ff57b02bf 100644 --- a/i18n/jpn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,6 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "vscode.extension.contributes.view": "カスタム ビューを提供します", + "vscode.extension.contributes.view.id": "vscode.workspace.createTreeView を介して生成した、ビューを認識するための一意の ID", + "vscode.extension.contributes.view.icon": "ビュー アイコンへのパス", + "vscode.extension.contributes.views": "複数のカスタム ビューを提供します", "showViewlet": "{0} を表示", "view": "表示" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 0e425d5535760..41b230f31e5df 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "reallyRecommended2": "このファイルの種類には '{0}' 拡張子が推奨されています。", + "reallyRecommended2": "このファイルの種類には拡張機能 '{0}' が推奨されます。", "showRecommendations": "推奨事項を表示", "neverShowAgain": "今後は表示しない", "close": "閉じる", diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index e8b7110516d21..b2c93cd566fb4 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "ユーザー設定を開く", "openGlobalKeybindings": "キーボード ショートカットを開く", + "openGlobalKeybindingsFile": "キーボード ショートカット ファイルを開く", "openWorkspaceSettings": "ワークスペース設定を開く", "configureLanguageBasedSettings": "言語固有の設定を構成します...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 66c1ae4f80a81..8329808fc1e04 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,6 +9,7 @@ "ConfigureTaskRunnerAction.quickPick.template": "タスク ランナーを選択", "ConfigureTaskRunnerAction.autoDetecting": "{0} のタスクを自動検出", "ConfigureTaskRunnerAction.autoDetect": "タスク システムの自動検出が失敗しました。既定のテンプレートを使用しています。詳細については、タスク出力を参照してください", + "ConfigureTaskRunnerAction.autoDetectError": "タスク システムの自動検出でエラーが発生しました。詳細については、タスク出力を参照してください。", "ConfigureTaskRunnerAction.failed": "'.vscode' フォルダー内に 'tasks.json' ファイルを作成できません。詳細については、タスク出力を参照してください。", "ConfigureTaskRunnerAction.label": "タスク ランナーの構成", "ConfigureBuildTaskAction.label": "ビルド タスクを構成します", diff --git a/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index e2d25e3da153e..c22c825281d78 100644 --- a/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,6 +14,7 @@ "noIconThemeDesc": "ファイル アイコンを無効にする", "problemChangingIconTheme": "アイコン テーマの設定で問題が発生しました: {0}", "themes.selectIconTheme": "ファイル アイコンのテーマを選択します", + "generateColorTheme.label": "現在の設定から配色テーマを生成する", "preferences": "基本設定", "developer": "Developer" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index 57e82748c8e9c..09458a86c492a 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -5,6 +5,6 @@ // Do not edit this file. It is machine generated. { "workbenchConfigurationTitle": "ワークベンチ", - "welcomePage.enabled": "有効にすると、スタートアップ時に、ようこそページが表示されます。", + "welcomePage.enabled": "有効にすると、起動時にウェルカム ページを表示します。", "help": "ヘルプ" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index e4999a3c4e895..0a5b15ce4a406 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "バインドなし" + "walkThrough.unboundCommand": "バインドなし", + "walkThrough.gitNotFound": "システムに Git がインストールされていない可能性があります。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 83a24dfd0e0b3..c84f5026160c1 100644 --- a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,5 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "JSON テーマ ファイルの解析中に問題が発生しました: {0}" + "error.cannotparsejson": "JSON テーマ ファイルの解析中に問題が発生しました: {0}", + "error.plist.invalidformat": "tmTheme ファイルの解析中に問題が発生しました: {0}。'settings' は配列ではありません。", + "error.cannotparse": "tmTheme ファイルの解析中に問題が発生しました: {0}", + "error.cannotload": "tmTheme ファイル {0} の読み込み中に問題が発生しました: {1}" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index a22528984cb81..99cd34d1f8d3b 100644 --- a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,5 +25,7 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed." + "iconThemeError": "File icon theme is unknown or not installed.", + "workbenchColors": "現在選択している配色テーマで配色を上書きします。", + "workbenchColors.deprecatedDescription": "代わりに 'workbench.colorCustomizations' を使用してください" } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index a6baba2d6b143..2aeba994a61d1 100644 --- a/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "aria.oneReference": "{2}열, {1}줄, {0}의 기호", + "aria.fileReferences.1": "{0}의 기호 1개", + "aria.fileReferences.N": "{1}의 기호 {0}개", "aria.result.0": "결과 없음", "aria.result.1": "{0}에서 기호 1개를 찾았습니다.", "aria.result.n1": "{1}에서 기호 {0}개를 찾았습니다.", diff --git a/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 569bfddeb5802..5903be2fd573b 100644 --- a/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -6,6 +6,9 @@ { "editorSuggestWidgetBackground": "제안 위젯의 배경색입니다.", "editorSuggestWidgetBorder": "제안 위젯의 테두리 색입니다.", + "editorSuggestWidgetForeground": "제안 위젯의 전경색입니다.", + "editorSuggestWidgetSelectedBackground": "제한 위젯에서 선택된 항목의 배경색입니다.", + "editorSuggestWidgetHighlightForeground": "제안 위젯의 일치 항목 강조 표시 색입니다.", "readMore": "자세히 알아보기...{0}", "suggestionWithDetailsAriaLabel": "{0}, 제안, 세부 정보 있음", "suggestionAriaLabel": "{0}, 제안", diff --git a/i18n/kor/src/vs/platform/environment/node/argv.i18n.json b/i18n/kor/src/vs/platform/environment/node/argv.i18n.json index 5596f41cdd4be..95f21567a73b1 100644 --- a/i18n/kor/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/kor/src/vs/platform/environment/node/argv.i18n.json @@ -20,6 +20,7 @@ "showVersions": "#NAME?", "installExtension": "확장을 설치합니다.", "uninstallExtension": "확장을 제거합니다.", + "experimentalApis": "확장에 대해 제안된 API 기능을 사용하도록 설정합니다.", "disableExtensions": "설치된 모든 확장을 사용하지 않도록 설정합니다.", "disableGPU": "GPU 하드웨어 가속을 사용하지 않도록 설정합니다.", "version": "버전을 출력합니다.", diff --git a/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json index 20e43b0f760f0..411e1a2c08a6b 100644 --- a/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -4,17 +4,44 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "invalid.color": "잘못된 색 형식입니다. #RGB, #RGBA, #RRGGBB 또는 #RRGGBBAA를 사용하세요.", "schema.colors": "워크벤치에서 사용되는 색입니다.", "foreground": "전체 전경색입니다. 이 색은 구성 요소에서 재정의하지 않은 경우에만 사용됩니다.", + "focusBorder": "포커스가 있는 요소의 전체 테두리 색입니다. 이 색은 구성 요소에서 재정의하지 않은 경우에만 사용됩니다.", + "contrastBorder": "더 뚜렷이 대비되도록 요소를 다른 요소와 구분하는 요소 주위의 추가 테두리입니다.", + "activeContrastBorder": "더 뚜렷이 대비되도록 요소를 다른 요소와 구분하는 활성 요소 주위의 추가 테두리입니다.", + "widgetShadow": "편집기 내에서 찾기/바꾸기 같은 위젯의 그림자 색입니다.", "inputBoxBackground": "입력 상자 배경입니다.", "inputBoxForeground": "입력 상자 전경입니다.", "inputBoxBorder": "입력 상자 테두리입니다.", "inputBoxActiveOptionBorder": "입력 필드에서 활성화된 옵션의 테두리 색입니다.", + "inputValidationInfoBackground": "정보 심각도의 입력 유효성 검사 배경색입니다.", + "inputValidationInfoBorder": "정보 심각도의 입력 유효성 검사 테두리 색입니다.", + "inputValidationWarningBackground": "정보 경고의 입력 유효성 검사 배경색입니다.", + "inputValidationWarningBorder": "경고 심각도의 입력 유효성 검사 테두리 색입니다.", + "inputValidationErrorBackground": "오류 심각도의 입력 유효성 검사 배경색입니다.", + "inputValidationErrorBorder": "오류 심각도의 입력 유효성 검사 테두리 색입니다.", "dropdownBackground": "드롭다운 배경입니다.", "dropdownForeground": "드롭다운 전경입니다.", "dropdownBorder": "드롭다운 테두리입니다.", + "listFocusBackground": "목록/트리가 활성 상태인 경우 포커스가 있는 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", + "listActiveSelectionBackground": "목록/트리가 활성 상태인 경우 선택한 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", + "listInactiveSelectionBackground": "목록/트리가 비활성 상태인 경우 선택한 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", + "listActiveSelectionForeground": "목록/트리가 활성 상태인 경우 선택한 항목의 목록/트리 전경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", + "listFocusAndSelectionBackground": "목록/트리가 활성 상태인 경우 포커스가 있는 선택한 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다. 이 색은 개별 선택 및 포커스 색보다 우선합니다.", + "listFocusAndSelectionForeground": "목록/트리가 활성 상태인 경우 포커스가 있는 선택한 항목의 목록/트리 전경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다. 이 색은 개별 선택 및 포커스 색보다 우선합니다.", + "listHoverBackground": "마우스로 항목을 가리킬 때 목록/트리 배경입니다.", + "listDropBackground": "마우스로 항목을 이동할 때 목록/트리 끌어서 놓기 배경입니다.", + "highlight": "목록/트리 내에서 검색할 때 일치 항목 강조 표시의 목록/트리 전경색입니다.", "pickerGroupForeground": "그룹화 레이블에 대한 빠른 선택기 색입니다.", "pickerGroupBorder": "그룹화 테두리에 대한 빠른 선택기 색입니다.", + "buttonForeground": "단추 기본 전경색입니다.", + "buttonBackground": "단추 배경색입니다.", + "buttonHoverBackground": "마우스로 가리킬 때 단추 배경색입니다.", + "scrollbarShadow": "스크롤되는 보기를 나타내는 스크롤 막대 그림자입니다.", + "scrollbarSliderBackground": "슬라이더 배경색입니다.", + "scrollbarSliderHoverBackground": "마우스로 가리킬 때 슬라이더 배경색입니다.", + "scrollbarSliderActiveBackground": "활성 상태인 경우 슬라이더 배경색입니다.", "editorBackground": "편집기 배경색입니다.", "editorForeground": "편집기 기본 전경색입니다.", "editorSelection": "편집기 선택 영역의 색입니다.", diff --git a/i18n/rus/extensions/git/out/commands.i18n.json b/i18n/rus/extensions/git/out/commands.i18n.json index dfbba57f8c36a..a55cd67aaa0a7 100644 --- a/i18n/rus/extensions/git/out/commands.i18n.json +++ b/i18n/rus/extensions/git/out/commands.i18n.json @@ -16,6 +16,8 @@ "confirm discard": "Вы действительно хотите отменить изменения в {0}?", "confirm discard multiple": "Вы действительно хотите отменить изменения в файлах ({0})?", "discard": "Отменить изменения", + "confirm discard all": "Вы действительно хотите отменить все изменения? Отменить это действие нельзя!", + "discardAll": "Отменить все изменения", "no changes": "Нет изменений для фиксации.", "commit message": "Сообщение о фиксации", "provide commit message": "Введите сообщение фиксации.", @@ -31,6 +33,7 @@ "no remotes to publish": "Для вашего репозитория не настроены удаленные репозитории для публикации.", "disabled": "GIT отключен или не поддерживается в этой рабочей области", "clean repo": "Очистите рабочее дерево репозитория перед извлечением.", + "cant push": "Не удается отправить ссылки в удаленную ветвь. Сначала выберите \"Извлечь\", чтобы интегрировать изменения.", "git error details": "Git: {0}", "git error": "Ошибка Git", "open git log": "Открыть журнал GIT" diff --git a/i18n/rus/extensions/git/package.i18n.json b/i18n/rus/extensions/git/package.i18n.json index 8b3e748068620..071a37d0e5bc5 100644 --- a/i18n/rus/extensions/git/package.i18n.json +++ b/i18n/rus/extensions/git/package.i18n.json @@ -38,5 +38,7 @@ "config.autorefresh": "Включено ли автоматическое обновление", "config.autofetch": "Включено ли автоматическое получение", "config.enableLongCommitWarning": "Следует ли предупреждать о длинных сообщениях о фиксации", - "config.confirmSync": "Подтвердите синхронизацию репозиториев GIT." + "config.confirmSync": "Подтвердите синхронизацию репозиториев GIT.", + "config.countBadge": "\nУправляет счетчиком Git. При указании значения \"all\" подсчитываются все изменения, при указании значения \"tracked\" — только отслеживаемые изменения, при указании значения \"off\" счетчик отключается.", + "config.checkoutType": "Определяет типы ветвей, которые выводятся при выборе пункта меню \"Извлечь в...\". При указании значения \"all\" отображаются все ссылки, \"local\" — только локальные ветви, \"tags\" — только теги, а \"remote\" — только удаленные ветви." } \ No newline at end of file diff --git a/i18n/rus/extensions/grunt/out/main.i18n.json b/i18n/rus/extensions/grunt/out/main.i18n.json index 8b6ad71cd4e6d..7d21b8b17d93b 100644 --- a/i18n/rus/extensions/grunt/out/main.i18n.json +++ b/i18n/rus/extensions/grunt/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Сбой автоматического определений заданий Grunt. Ошибка: {0}" +} \ No newline at end of file diff --git a/i18n/rus/extensions/grunt/package.i18n.json b/i18n/rus/extensions/grunt/package.i18n.json index 8b6ad71cd4e6d..b73dd0e278867 100644 --- a/i18n/rus/extensions/grunt/package.i18n.json +++ b/i18n/rus/extensions/grunt/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.grunt.autoDetect": "Включает или отключает автоматическое определние заданий Grunt. Значение по умолчанию — \"включено\"." +} \ No newline at end of file diff --git a/i18n/rus/extensions/gulp/package.i18n.json b/i18n/rus/extensions/gulp/package.i18n.json index 8b6ad71cd4e6d..37a145323f2e9 100644 --- a/i18n/rus/extensions/gulp/package.i18n.json +++ b/i18n/rus/extensions/gulp/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.gulp.autoDetect": "Включает или отключает автоматическое определение заданий Gulp. Значение по умолчанию — \"включено\"." +} \ No newline at end of file diff --git a/i18n/rus/extensions/markdown/package.i18n.json b/i18n/rus/extensions/markdown/package.i18n.json index d3ac28369f50b..9583a03ad7738 100644 --- a/i18n/rus/extensions/markdown/package.i18n.json +++ b/i18n/rus/extensions/markdown/package.i18n.json @@ -16,5 +16,7 @@ "markdown.previewSide.title": "Открыть область предварительного просмотра сбоку", "markdown.showSource.title": "Показать источник", "markdown.styles.dec": "Список URL-адресов или локальных путей к таблицам стилей CSS, используемых из области предварительного просмотра файла Markdown. Относительные пути интерпретируются относительно папки, открытой в проводнике. Если папка не открыта, они интерпретируются относительно расположения файла Markdown. Все символы '\\' должны записываться в виде '\\\\'.", - "markdown.showPreviewSecuritySelector.title": "Изменить параметры безопасности для предварительного просмотра Markdown" + "markdown.showPreviewSecuritySelector.title": "Изменить параметры безопасности для предварительного просмотра Markdown", + "markdown.preview.enableExperimentalExtensionApi.desc": "[Экспериментальная функция] Разрешить расширениям расширять предварительный просмотр Markdown.", + "markdown.trace.desc": "Включить ведение журнала отладки для расширения Markdown." } \ No newline at end of file diff --git a/i18n/rus/extensions/php/package.i18n.json b/i18n/rus/extensions/php/package.i18n.json index b16d4c3729eb0..f722b3cf8cbb0 100644 --- a/i18n/rus/extensions/php/package.i18n.json +++ b/i18n/rus/extensions/php/package.i18n.json @@ -9,5 +9,6 @@ "configuration.validate.executablePath": "Указывает на исполняемый файл PHP.", "configuration.validate.run": "Запускается ли анализатор кода при сохранении или при печати.", "configuration.title": "PHP", - "commands.categroy.php": "PHP" + "commands.categroy.php": "PHP", + "command.untrustValidationExecutable": "Запретить исполняемый файл проверки PHP (определяется как параметр рабочей области)" } \ No newline at end of file diff --git a/i18n/rus/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/rus/extensions/typescript/out/utils/typingsStatus.i18n.json index 506fc2b22fb21..4adb921367a61 100644 --- a/i18n/rus/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/rus/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Получение данных для повышения эффективности IntelliSense TypeScript", + "typesInstallerInitializationFailed.title": "Не удалось установить файлы типизации для языка JavaScript. Убедитесь, что NPM установлен и путь к нему указан в переменной PATH", "typesInstallerInitializationFailed.moreInformation": "Дополнительные сведения", "typesInstallerInitializationFailed.doNotCheckAgain": "Больше не проверять", "typesInstallerInitializationFailed.close": "Закрыть" diff --git a/i18n/rus/extensions/typescript/package.i18n.json b/i18n/rus/extensions/typescript/package.i18n.json index 8d5b98b675b61..3a3b49070991f 100644 --- a/i18n/rus/extensions/typescript/package.i18n.json +++ b/i18n/rus/extensions/typescript/package.i18n.json @@ -23,6 +23,7 @@ "format.insertSpaceBeforeFunctionParenthesis": "Определяет метод обработки пробелов перед скобками аргумента функции. Требует TypeScript >= 2.1.5.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Определяет метод обработки пробелов после открытия и до закрытия непустых круглых скобок.", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Определяет метод обработки пробелов после открытия и до закрытия непустых квадратных скобок.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Определяет метод обработки пробелов после открытия и до закрытия непустых скобок. Требуется TypeScript 2.3.0 или более поздней версии.", "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Определяет метод обработки пробелов после открытия и до закрытия скобок в строке шаблона. Требуется TypeScript 2.0.6 или более поздней версии.", "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "Определяет метод обработки пробелов после открытия и до закрытия скобок выражения JSX. Требуется TypeScript 2.0.6 или более поздней версии.", "format.placeOpenBraceOnNewLineForFunctions": "Определяет, ставится ли открывающая фигурная скобка с новой строки в функциях.", @@ -34,5 +35,7 @@ "typescript.implementationsCodeLens.enabled": "Включить или отключить CodeLens для реализаций. Требуется TypeScript >= 2.2.0.", "typescript.openTsServerLog.title": "Открытие файла журнала сервера TS", "typescript.selectTypeScriptVersion.title": "Выберите версию TypeScript.", - "jsDocCompletion.enabled": "Включить или отключить JSDoc коментарии" + "jsDocCompletion.enabled": "Включить или отключить JSDoc коментарии", + "javascript.implicitProjectConfig.checkJs": "Включает/отключает семантическую проверку файлов JavaScript. Этот параметр может переопределяться в файле jsconfig.json или tsconfig.json. Требуется TypeScript 2.3.1 или более поздней версии.", + "typescript.check.npmIsInstalled": "Проверяет, установлен ли NPM для автоматического получения типов" } \ No newline at end of file From fa5e110afbddb286928810da4658483be1ea432e Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Thu, 4 May 2017 00:50:20 +0200 Subject: [PATCH 0166/2747] node-debug@1.13.1 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index e5bab79358570..a2a2ca2df0beb 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -41,7 +41,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.13.0' }, + { name: 'ms-vscode.node-debug', version: '1.13.1' }, { name: 'ms-vscode.node-debug2', version: '1.12.4' } ]; From 36c491ee02bf731a4d9aca3dd773cf6392f4fb43 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 4 May 2017 10:54:26 +0200 Subject: [PATCH 0167/2747] remove references to ArraySet related to #25780 --- src/vs/base/common/paging.ts | 11 +++++------ .../node/extensionGalleryService.ts | 8 ++++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/vs/base/common/paging.ts b/src/vs/base/common/paging.ts index a8f8208c58158..de3319b503863 100644 --- a/src/vs/base/common/paging.ts +++ b/src/vs/base/common/paging.ts @@ -6,7 +6,6 @@ 'use strict'; import { TPromise } from 'vs/base/common/winjs.base'; -import { ArraySet } from 'vs/base/common/set'; import { isArray } from 'vs/base/common/types'; /** @@ -22,7 +21,7 @@ export interface IPager { interface IPage { isResolved: boolean; promise: TPromise; - promiseIndexes: ArraySet; + promiseIndexes: Set; elements: T[]; } @@ -55,12 +54,12 @@ export class PagedModel implements IPagedModel { constructor(private arg: IPager | T[], private pageTimeout: number = 500) { this.pager = isArray(arg) ? singlePagePager(arg) : arg; - this.pages = [{ isResolved: true, promise: null, promiseIndexes: new ArraySet(), elements: this.pager.firstPage.slice() }]; + this.pages = [{ isResolved: true, promise: null, promiseIndexes: new Set(), elements: this.pager.firstPage.slice() }]; const totalPages = Math.ceil(this.pager.total / this.pager.pageSize); for (let i = 0, len = totalPages - 1; i < len; i++) { - this.pages.push({ isResolved: false, promise: null, promiseIndexes: new ArraySet(), elements: [] }); + this.pages.push({ isResolved: false, promise: null, promiseIndexes: new Set(), elements: [] }); } } @@ -102,14 +101,14 @@ export class PagedModel implements IPagedModel { } return new TPromise((c, e) => { - page.promiseIndexes.set(index); + page.promiseIndexes.add(index); page.promise.done(() => c(page.elements[indexInPage])); }, () => { if (!page.promise) { return; } - page.promiseIndexes.unset(index); + page.promiseIndexes.delete(index); if (page.promiseIndexes.size === 0) { page.promise.cancel(); diff --git a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts index 523bcbda9e9a5..ccce0192774ae 100644 --- a/src/vs/platform/extensionManagement/node/extensionGalleryService.ts +++ b/src/vs/platform/extensionManagement/node/extensionGalleryService.ts @@ -10,7 +10,6 @@ import { TPromise } from 'vs/base/common/winjs.base'; import * as uuid from 'vs/base/common/uuid'; import { distinct } from 'vs/base/common/arrays'; import { getErrorMessage } from 'vs/base/common/errors'; -import { ArraySet } from 'vs/base/common/set'; import { IGalleryExtension, IExtensionGalleryService, IGalleryExtensionAsset, IQueryOptions, SortBy, SortOrder, IExtensionManifest } from 'vs/platform/extensionManagement/common/extensionManagement'; import { getGalleryExtensionId, getGalleryExtensionTelemetryData, adoptToGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { assign, getOrDefault } from 'vs/base/common/objects'; @@ -475,14 +474,15 @@ export class ExtensionGalleryService implements IExtensionGalleryService { return this.loadDependencies(toGet) .then(loadedDependencies => { - const dependenciesSet = new ArraySet(); + const dependenciesSet = new Set(); for (const dep of loadedDependencies) { if (dep.properties.dependencies) { - dep.properties.dependencies.forEach(d => dependenciesSet.set(d)); + dep.properties.dependencies.forEach(d => dependenciesSet.add(d)); } } result = distinct(result.concat(loadedDependencies), d => d.uuid); - const dependencies = dependenciesSet.elements.filter(d => !ExtensionGalleryService.hasExtensionByName(result, d)); + const dependencies: string[] = []; + dependenciesSet.forEach(d => !ExtensionGalleryService.hasExtensionByName(result, d) && dependencies.push(d)); return this.getDependenciesReccursively(dependencies, result, root); }); } From 0701b576ca095a455e0a8371e1fde31621928aaf Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 4 May 2017 11:09:23 +0200 Subject: [PATCH 0168/2747] debug: better handling of configuration actions when there is no folder open fixes #25466 --- src/vs/workbench/parts/debug/browser/debugActions.ts | 6 +++++- .../parts/debug/electron-browser/debugCommands.ts | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/browser/debugActions.ts b/src/vs/workbench/parts/debug/browser/debugActions.ts index 714284ed6423c..6a23b8588cd8a 100644 --- a/src/vs/workbench/parts/debug/browser/debugActions.ts +++ b/src/vs/workbench/parts/debug/browser/debugActions.ts @@ -6,12 +6,14 @@ import * as nls from 'vs/nls'; import { Action } from 'vs/base/common/actions'; import * as lifecycle from 'vs/base/common/lifecycle'; +import severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IFileService } from 'vs/platform/files/common/files'; +import { IMessageService } from 'vs/platform/message/common/message'; import { IDebugService, State, IProcess, IThread, IEnablement, IBreakpoint, IStackFrame, IFunctionBreakpoint, IDebugEditorContribution, EDITOR_CONTRIBUTION_ID, IExpression, REPL_ID } from 'vs/workbench/parts/debug/common/debug'; import { Variable, Expression, Thread, Breakpoint, Process } from 'vs/workbench/parts/debug/common/debugModel'; @@ -75,7 +77,8 @@ export class ConfigureAction extends AbstractDebugAction { constructor(id: string, label: string, @IDebugService debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService, - @IWorkspaceContextService private contextService: IWorkspaceContextService + @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IMessageService private messageService: IMessageService ) { super(id, label, 'debug-action configure', debugService, keybindingService); this.toDispose.push(debugService.getViewModel().onDidSelectConfiguration(configurationName => this.updateClass())); @@ -96,6 +99,7 @@ export class ConfigureAction extends AbstractDebugAction { public run(event?: any): TPromise { if (!this.contextService.getWorkspace()) { + this.messageService.show(severity.Info, nls.localize('noFolderDebugConfig', "Please first open a folder in order to do advanced debug configuration.")); return TPromise.as(null); } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts b/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts index 9138126104f42..ec6a8673d4f3b 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts @@ -3,7 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import * as nls from 'vs/nls'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; +import { TPromise } from 'vs/base/common/winjs.base'; import severity from 'vs/base/common/severity'; import { List } from 'vs/base/browser/ui/list/listWidget'; import * as errors from 'vs/base/common/errors'; @@ -11,6 +13,8 @@ import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { IListService } from 'vs/platform/list/browser/listService'; +import { IMessageService } from 'vs/platform/message/common/message'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IDebugService, IConfig, IEnablement, CONTEXT_NOT_IN_DEBUG_MODE, CONTEXT_IN_DEBUG_MODE, CONTEXT_BREAKPOINTS_FOCUSED, CONTEXT_WATCH_EXPRESSIONS_FOCUSED, CONTEXT_VARIABLES_FOCUSED, EDITOR_CONTRIBUTION_ID, IDebugEditorContribution } from 'vs/workbench/parts/debug/common/debug'; import { Expression, Variable, Breakpoint, FunctionBreakpoint } from 'vs/workbench/parts/debug/common/debugModel'; import { IExtensionsViewlet, VIEWLET_ID as EXTENSIONS_VIEWLET_ID } from 'vs/workbench/parts/extensions/common/extensions'; @@ -195,6 +199,11 @@ export function registerCommands(): void { primary: undefined, handler: (accessor) => { const manager = accessor.get(IDebugService).getConfigurationManager(); + if (!accessor.get(IWorkspaceContextService).getWorkspace()) { + accessor.get(IMessageService).show(severity.Info, nls.localize('noFolderDebugConfig', "Please first open a folder in order to do advanced debug configuration.")); + return TPromise.as(null); + } + return manager.openConfigFile(false).done(editor => { if (editor) { const codeEditor = editor.getControl(); From 0d72a8e724715885a798913224711a721f6abfb5 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 4 May 2017 11:17:15 +0200 Subject: [PATCH 0169/2747] Theme: Generate Color Theme creates file in fs root. Fixes #25765 --- .../parts/themes/electron-browser/themes.contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts b/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts index b66dcb4352ba3..8ae5925e78b3c 100644 --- a/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts +++ b/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts @@ -198,7 +198,7 @@ class GenerateColorThemeAction extends Action { colors: resultingColors, tokenColors: theme.tokenColors }, null, '\t'); - return this.editorService.openEditor({ contents, language: 'json', filePath: 'custom-color-theme.json' }); + return this.editorService.openEditor({ contents, language: 'json' }); } } From 56197e2acc0303eaf180fe4273cb16cf187dda2a Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 4 May 2017 12:28:42 +0200 Subject: [PATCH 0170/2747] debug: respect breakpoint.column when sorting fixes #25819 --- src/vs/workbench/parts/debug/electron-browser/debugViews.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts index cf22f4dcaee73..73a2367db0533 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts @@ -447,6 +447,9 @@ export class BreakpointsView extends AdaptiveCollapsibleViewletView { if (first.uri.toString() !== second.uri.toString()) { return paths.basename(first.uri.fsPath).localeCompare(paths.basename(second.uri.fsPath)); } + if (first.lineNumber === second.lineNumber) { + return first.column - second.column; + } return first.lineNumber - second.lineNumber; } From a61d606b284d4c50902d8fa14f53c41a17b83d2f Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 4 May 2017 12:33:36 +0200 Subject: [PATCH 0171/2747] debug: show columns in callstack view fixes #25818 --- src/vs/workbench/parts/debug/electron-browser/debugViewer.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index 190059b707c8c..b91233d73072c 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -540,6 +540,9 @@ export class CallStackRenderer implements IRenderer { data.fileName.textContent = getSourceName(stackFrame.source, this.contextService); if (stackFrame.lineNumber !== undefined) { data.lineNumber.textContent = `${stackFrame.lineNumber}`; + if (stackFrame.column) { + data.lineNumber.textContent += `:${stackFrame.column}`; + } dom.removeClass(data.lineNumber, 'unavailable'); } else { dom.addClass(data.lineNumber, 'unavailable'); From 6038a110d5bc375f636d0130898e33702132dede Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 4 May 2017 10:10:02 +0200 Subject: [PATCH 0172/2747] Rename TextAreaHandler to TextAreaInput --- src/vs/base/browser/browser.ts | 6 ++-- .../browser/controller/keyboardHandler.ts | 36 +++++++++---------- .../{textAreaHandler.ts => textAreaInput.ts} | 27 +++++++------- .../contrib/clipboard/browser/clipboard.ts | 2 +- .../test/browser/controller/imeTester.ts | 6 ++-- 5 files changed, 39 insertions(+), 38 deletions(-) rename src/vs/editor/browser/controller/{textAreaHandler.ts => textAreaInput.ts} (96%) diff --git a/src/vs/base/browser/browser.ts b/src/vs/base/browser/browser.ts index 558dcf75839bd..29d7a261edd82 100644 --- a/src/vs/base/browser/browser.ts +++ b/src/vs/base/browser/browser.ts @@ -124,10 +124,10 @@ export const isChrome = (userAgent.indexOf('Chrome') >= 0); export const isSafari = (userAgent.indexOf('Chrome') === -1) && (userAgent.indexOf('Safari') >= 0); export const isIPad = (userAgent.indexOf('iPad') >= 0); -const isChromev56 = ( - navigator.userAgent.indexOf('Chrome/56.') >= 0 +export const isChromev56 = ( + userAgent.indexOf('Chrome/56.') >= 0 // Edge likes to impersonate Chrome sometimes - && navigator.userAgent.indexOf('Edge/') === -1 + && userAgent.indexOf('Edge/') === -1 ); export const supportsTranslate3d = !isFirefox; diff --git a/src/vs/editor/browser/controller/keyboardHandler.ts b/src/vs/editor/browser/controller/keyboardHandler.ts index 225f4ad4c4883..1be3215f80664 100644 --- a/src/vs/editor/browser/controller/keyboardHandler.ts +++ b/src/vs/editor/browser/controller/keyboardHandler.ts @@ -7,7 +7,7 @@ import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; import { GlobalScreenReaderNVDA } from 'vs/editor/common/config/commonEditorConfig'; -import { TextAreaHandler, ITextAreaHandlerHost, TextAreaStrategy } from 'vs/editor/browser/controller/textAreaHandler'; +import { TextAreaInput, ITextAreaInputHost, TextAreaStrategy } from 'vs/editor/browser/controller/textAreaInput'; import { ISimpleModel } from 'vs/editor/browser/controller/textAreaState'; import { Range } from 'vs/editor/common/core/range'; import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler'; @@ -55,7 +55,7 @@ export class KeyboardHandler extends ViewEventHandler { private _lastCopiedValue: string; private _lastCopiedValueIsFromEmptySelection: boolean; - private textAreaHandler: TextAreaHandler; + private _textAreaInput: TextAreaInput; constructor(context: ViewContext, viewController: ViewController, viewHelper: IKeyboardHandlerHelper) { super(); @@ -76,7 +76,7 @@ export class KeyboardHandler extends ViewEventHandler { this._lastCopiedValue = null; this._lastCopiedValueIsFromEmptySelection = false; - const textAreaHandlerHost: ITextAreaHandlerHost = { + const textAreaInputHost: ITextAreaInputHost = { getPlainTextToCopy: (): string => { const whatToCopy = this._context.model.getPlainTextToCopy(this._selections, browser.enableEmptySelectionClipboard); @@ -110,26 +110,26 @@ export class KeyboardHandler extends ViewEventHandler { return this._context.model.getValueInRange(range, eol); } }; - this.textAreaHandler = new TextAreaHandler(textAreaHandlerHost, this._getStrategy(), this.textArea, simpleModel); + this._textAreaInput = new TextAreaInput(textAreaInputHost, this._getStrategy(), this.textArea, simpleModel); - this._register(this.textAreaHandler.onKeyDown((e) => this.viewController.emitKeyDown(e))); - this._register(this.textAreaHandler.onKeyUp((e) => this.viewController.emitKeyUp(e))); - this._register(this.textAreaHandler.onPaste((e) => { + this._register(this._textAreaInput.onKeyDown((e) => this.viewController.emitKeyDown(e))); + this._register(this._textAreaInput.onKeyUp((e) => this.viewController.emitKeyUp(e))); + this._register(this._textAreaInput.onPaste((e) => { let pasteOnNewLine = false; if (browser.enableEmptySelectionClipboard) { pasteOnNewLine = (e.text === this._lastCopiedValue && this._lastCopiedValueIsFromEmptySelection); } this.viewController.paste('keyboard', e.text, pasteOnNewLine); })); - this._register(this.textAreaHandler.onCut((e) => this.viewController.cut('keyboard'))); - this._register(this.textAreaHandler.onType((e) => { + this._register(this._textAreaInput.onCut((e) => this.viewController.cut('keyboard'))); + this._register(this._textAreaInput.onType((e) => { if (e.replaceCharCnt) { this.viewController.replacePreviousChar('keyboard', e.text, e.replaceCharCnt); } else { this.viewController.type('keyboard', e.text); } })); - this._register(this.textAreaHandler.onCompositionStart(() => { + this._register(this._textAreaInput.onCompositionStart(() => { const lineNumber = this._selections[0].startLineNumber; const column = this._selections[0].startColumn; @@ -158,7 +158,7 @@ export class KeyboardHandler extends ViewEventHandler { this.viewController.compositionStart('keyboard'); })); - this._register(this.textAreaHandler.onCompositionUpdate((e) => { + this._register(this._textAreaInput.onCompositionUpdate((e) => { if (browser.isEdgeOrIE) { // Due to isEdgeOrIE (where the textarea was not cleared initially) // we cannot assume the text consists only of the composited text @@ -181,7 +181,7 @@ export class KeyboardHandler extends ViewEventHandler { } })); - this._register(this.textAreaHandler.onCompositionEnd(() => { + this._register(this._textAreaInput.onCompositionEnd(() => { this.textArea.unsetHeight(); this.textArea.unsetWidth(); this.textArea.setLeft(0); @@ -193,7 +193,7 @@ export class KeyboardHandler extends ViewEventHandler { this.viewController.compositionEnd('keyboard'); })); this._register(GlobalScreenReaderNVDA.onChange((value) => { - this.textAreaHandler.setStrategy(this._getStrategy()); + this._textAreaInput.setStrategy(this._getStrategy()); })); @@ -202,7 +202,7 @@ export class KeyboardHandler extends ViewEventHandler { public dispose(): void { this._context.removeEventHandler(this); - this.textAreaHandler.dispose(); + this._textAreaInput.dispose(); super.dispose(); } @@ -217,7 +217,7 @@ export class KeyboardHandler extends ViewEventHandler { } public focusTextArea(): void { - this.textAreaHandler.focusTextArea(); + this._textAreaInput.focusTextArea(); } // --- begin event handlers @@ -228,7 +228,7 @@ export class KeyboardHandler extends ViewEventHandler { Configuration.applyFontInfo(this.textArea, this._context.configuration.editor.fontInfo); } if (e.viewInfo.experimentalScreenReader) { - this.textAreaHandler.setStrategy(this._getStrategy()); + this._textAreaInput.setStrategy(this._getStrategy()); } if (e.layoutInfo) { this.contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; @@ -245,7 +245,7 @@ export class KeyboardHandler extends ViewEventHandler { } public onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean { - this.textAreaHandler.setHasFocus(e.isFocused); + this._textAreaInput.setHasFocus(e.isFocused); return false; } @@ -265,7 +265,7 @@ export class KeyboardHandler extends ViewEventHandler { if (this._lastCursorSelectionChanged) { let e = this._lastCursorSelectionChanged; this._lastCursorSelectionChanged = null; - this.textAreaHandler.setCursorSelections(e.selection, e.secondarySelections); + this._textAreaInput.setCursorSelections(e.selection, e.secondarySelections); } } diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaInput.ts similarity index 96% rename from src/vs/editor/browser/controller/textAreaHandler.ts rename to src/vs/editor/browser/controller/textAreaInput.ts index dad5cd60d02e8..3edfd54fecb81 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaInput.ts @@ -38,19 +38,20 @@ export interface IPasteData { text: string; } -// See https://github.com/Microsoft/monaco-editor/issues/320 -const isChromev55_v56 = ( - (navigator.userAgent.indexOf('Chrome/55.') >= 0 || navigator.userAgent.indexOf('Chrome/56.') >= 0) - /* Edge likes to impersonate Chrome sometimes */ - && navigator.userAgent.indexOf('Edge/') === -1 -); - -export interface ITextAreaHandlerHost { +export interface ITextAreaInputHost { getPlainTextToCopy(): string; getHTMLToCopy(): string; } -export class TextAreaHandler extends Disposable { +/** + * Writes screen reader content to the textarea and is able to analyze its input events to generate: + * - onCut + * - onPaste + * - onType + * + * Composition events are generated for presentation purposes (composition input is reflected in onType). + */ +export class TextAreaInput extends Disposable { private _onKeyDown = this._register(new Emitter()); public onKeyDown: Event = this._onKeyDown.event; @@ -78,7 +79,7 @@ export class TextAreaHandler extends Disposable { // --- - private readonly _host: ITextAreaHandlerHost; + private readonly _host: ITextAreaInputHost; private readonly _textArea: TextAreaWrapper; private readonly _model: ISimpleModel; @@ -93,7 +94,7 @@ export class TextAreaHandler extends Disposable { private _nextCommand: ReadFromTextArea; - constructor(host: ITextAreaHandlerHost, strategy: TextAreaStrategy, textArea: FastDomNode, model: ISimpleModel) { + constructor(host: ITextAreaInputHost, strategy: TextAreaStrategy, textArea: FastDomNode, model: ISimpleModel) { super(); this._host = host; this._textArea = this._register(new TextAreaWrapper(textArea)); @@ -165,7 +166,7 @@ export class TextAreaHandler extends Disposable { }; this._register(dom.addDisposableListener(textArea.domNode, 'compositionupdate', (e: CompositionEvent) => { - if (isChromev55_v56) { + if (browser.isChromev56) { // See https://github.com/Microsoft/monaco-editor/issues/320 // where compositionupdate .data is broken in Chrome v55 and v56 // See https://bugs.chromium.org/p/chromium/issues/detail?id=677050#c9 @@ -224,7 +225,7 @@ export class TextAreaHandler extends Disposable { // console.log('onInput: ' + this.textArea.getValue()); if (this._isDoingComposition) { // See https://github.com/Microsoft/monaco-editor/issues/320 - if (isChromev55_v56) { + if (browser.isChromev56) { const [newState, typeInput] = deduceComposition(this._textArea.getValue()); this._textAreaState = newState; diff --git a/src/vs/editor/contrib/clipboard/browser/clipboard.ts b/src/vs/editor/contrib/clipboard/browser/clipboard.ts index 4c6f0692faee3..5f0be755a1491 100644 --- a/src/vs/editor/contrib/clipboard/browser/clipboard.ts +++ b/src/vs/editor/contrib/clipboard/browser/clipboard.ts @@ -13,7 +13,7 @@ import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { editorAction, IActionOptions, EditorAction } from 'vs/editor/common/editorCommonExtensions'; -import { CopyOptions } from 'vs/editor/browser/controller/textAreaHandler'; +import { CopyOptions } from 'vs/editor/browser/controller/textAreaInput'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; const CLIPBOARD_CONTEXT_MENU_GROUP = '9_cutcopypaste'; diff --git a/src/vs/editor/test/browser/controller/imeTester.ts b/src/vs/editor/test/browser/controller/imeTester.ts index 97b96d7ec6ce3..c47b41d7fb1a9 100644 --- a/src/vs/editor/test/browser/controller/imeTester.ts +++ b/src/vs/editor/test/browser/controller/imeTester.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { TextAreaHandler, ITextAreaHandlerHost, TextAreaStrategy } from 'vs/editor/browser/controller/textAreaHandler'; +import { TextAreaInput, ITextAreaInputHost, TextAreaStrategy } from 'vs/editor/browser/controller/textAreaInput'; import { ISimpleModel } from 'vs/editor/browser/controller/textAreaState'; import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; @@ -93,12 +93,12 @@ function doCreateTest(strategy: TextAreaStrategy, description: string, inputStr: let model = new SingleLineTestModel('some text'); - const textAreaHandlerHost: ITextAreaHandlerHost = { + const textAreaInputHost: ITextAreaInputHost = { getPlainTextToCopy: (): string => '', getHTMLToCopy: (): string => '' }; - let handler = new TextAreaHandler(textAreaHandlerHost, strategy, createFastDomNode(input), model); + let handler = new TextAreaInput(textAreaInputHost, strategy, createFastDomNode(input), model); input.onfocus = () => { handler.setHasFocus(true); From 471124c5d1b01bb6075063bcbcb6df14fd2bd901 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 4 May 2017 11:13:26 +0200 Subject: [PATCH 0173/2747] ITextAreaInputHost provides screen reader content --- .../browser/controller/keyboardHandler.ts | 196 ++++++++++-------- .../browser/controller/textAreaInput.ts | 115 ++++------ src/vs/editor/browser/view/viewImpl.ts | 4 +- .../common/config/commonEditorConfig.ts | 22 -- .../accessibility/browser/accessibility.ts | 26 +-- .../test/browser/controller/imeTester.ts | 33 ++- 6 files changed, 179 insertions(+), 217 deletions(-) diff --git a/src/vs/editor/browser/controller/keyboardHandler.ts b/src/vs/editor/browser/controller/keyboardHandler.ts index 1be3215f80664..742a2e70ae8c1 100644 --- a/src/vs/editor/browser/controller/keyboardHandler.ts +++ b/src/vs/editor/browser/controller/keyboardHandler.ts @@ -6,9 +6,8 @@ import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; -import { GlobalScreenReaderNVDA } from 'vs/editor/common/config/commonEditorConfig'; -import { TextAreaInput, ITextAreaInputHost, TextAreaStrategy } from 'vs/editor/browser/controller/textAreaInput'; -import { ISimpleModel } from 'vs/editor/browser/controller/textAreaState'; +import { TextAreaInput, ITextAreaInputHost, IPasteData, ICompositionData } from 'vs/editor/browser/controller/textAreaInput'; +import { ISimpleModel, ITypeData, TextAreaState, IENarratorStrategy, NVDAPagedStrategy } from 'vs/editor/browser/controller/textAreaState'; import { Range } from 'vs/editor/common/core/range'; import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler'; import { Configuration } from 'vs/editor/browser/config/configuration'; @@ -19,6 +18,7 @@ import { FastDomNode } from 'vs/base/browser/fastDomNode'; import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; import { ViewController } from 'vs/editor/browser/view/viewController'; import { EndOfLinePreference } from "vs/editor/common/editorCommon"; +import { IKeyboardEvent } from "vs/base/browser/keyboardEvent"; export interface IKeyboardHandlerHelper { viewDomNode: FastDomNode; @@ -38,44 +38,62 @@ class TextAreaVisiblePosition { this.left = left; } } + +export const enum TextAreaStrategy { + IENarrator, + NVDA +} + export class KeyboardHandler extends ViewEventHandler { - private _context: ViewContext; - private viewController: ViewController; - private textArea: FastDomNode; - private viewHelper: IKeyboardHandlerHelper; - private visiblePosition: TextAreaVisiblePosition; + private readonly _context: ViewContext; + private readonly _viewController: ViewController; + private readonly _textArea: FastDomNode; + private readonly _viewHelper: IKeyboardHandlerHelper; - private contentLeft: number; - private contentWidth: number; - private scrollLeft: number; - private scrollTop: number; + private _contentLeft: number; + private _contentWidth: number; + private _scrollLeft: number; + private _scrollTop: number; + private _visiblePosition: TextAreaVisiblePosition; private _selections: Range[]; private _lastCopiedValue: string; private _lastCopiedValueIsFromEmptySelection: boolean; - private _textAreaInput: TextAreaInput; + private readonly _textAreaInput: TextAreaInput; constructor(context: ViewContext, viewController: ViewController, viewHelper: IKeyboardHandlerHelper) { super(); this._context = context; - this.viewController = viewController; - this.textArea = viewHelper.textArea; - Configuration.applyFontInfo(this.textArea, this._context.configuration.editor.fontInfo); - this.viewHelper = viewHelper; - this.visiblePosition = null; + this._viewController = viewController; + this._textArea = viewHelper.textArea; + Configuration.applyFontInfo(this._textArea, this._context.configuration.editor.fontInfo); + this._viewHelper = viewHelper; - this.contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; - this.contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; - this.scrollLeft = 0; - this.scrollTop = 0; + this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; + this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; + this._scrollLeft = 0; + this._scrollTop = 0; + this._visiblePosition = null; this._selections = [new Range(1, 1, 1, 1)]; this._lastCopiedValue = null; this._lastCopiedValueIsFromEmptySelection = false; + const simpleModel: ISimpleModel = { + getLineCount: (): number => { + return this._context.model.getLineCount(); + }, + getLineMaxColumn: (lineNumber: number): number => { + return this._context.model.getLineMaxColumn(lineNumber); + }, + getValueInRange: (range: Range, eol: EndOfLinePreference): string => { + return this._context.model.getValueInRange(range, eol); + } + }; + const textAreaInputHost: ITextAreaInputHost = { getPlainTextToCopy: (): string => { const whatToCopy = this._context.model.getPlainTextToCopy(this._selections, browser.enableEmptySelectionClipboard); @@ -95,40 +113,59 @@ export class KeyboardHandler extends ViewEventHandler { return whatToCopy; }, + getHTMLToCopy: (): string => { return this._context.model.getHTMLToCopy(this._selections, browser.enableEmptySelectionClipboard); - } - }; - const simpleModel: ISimpleModel = { - getLineCount: (): number => { - return this._context.model.getLineCount(); - }, - getLineMaxColumn: (lineNumber: number): number => { - return this._context.model.getLineMaxColumn(lineNumber); }, - getValueInRange: (range: Range, eol: EndOfLinePreference): string => { - return this._context.model.getValueInRange(range, eol); + + getScreenReaderContent: (currentState: TextAreaState): TextAreaState => { + + if (browser.isIPad) { + // Do not place anything in the textarea for the iPad + return TextAreaState.EMPTY; + } + + const strategy = this._getStrategy(); + const selection = this._selections[0]; + + if (strategy === TextAreaStrategy.IENarrator) { + return IENarratorStrategy.fromEditorSelection(currentState, simpleModel, selection); + } + + return NVDAPagedStrategy.fromEditorSelection(currentState, simpleModel, selection); } }; - this._textAreaInput = new TextAreaInput(textAreaInputHost, this._getStrategy(), this.textArea, simpleModel); - this._register(this._textAreaInput.onKeyDown((e) => this.viewController.emitKeyDown(e))); - this._register(this._textAreaInput.onKeyUp((e) => this.viewController.emitKeyUp(e))); - this._register(this._textAreaInput.onPaste((e) => { + this._textAreaInput = this._register(new TextAreaInput(textAreaInputHost, this._textArea)); + + this._register(this._textAreaInput.onKeyDown((e: IKeyboardEvent) => { + this._viewController.emitKeyDown(e); + })); + + this._register(this._textAreaInput.onKeyUp((e: IKeyboardEvent) => { + this._viewController.emitKeyUp(e); + })); + + this._register(this._textAreaInput.onPaste((e: IPasteData) => { let pasteOnNewLine = false; if (browser.enableEmptySelectionClipboard) { pasteOnNewLine = (e.text === this._lastCopiedValue && this._lastCopiedValueIsFromEmptySelection); } - this.viewController.paste('keyboard', e.text, pasteOnNewLine); + this._viewController.paste('keyboard', e.text, pasteOnNewLine); + })); + + this._register(this._textAreaInput.onCut(() => { + this._viewController.cut('keyboard'); })); - this._register(this._textAreaInput.onCut((e) => this.viewController.cut('keyboard'))); - this._register(this._textAreaInput.onType((e) => { + + this._register(this._textAreaInput.onType((e: ITypeData) => { if (e.replaceCharCnt) { - this.viewController.replacePreviousChar('keyboard', e.text, e.replaceCharCnt); + this._viewController.replacePreviousChar('keyboard', e.text, e.replaceCharCnt); } else { - this.viewController.type('keyboard', e.text); + this._viewController.type('keyboard', e.text); } })); + this._register(this._textAreaInput.onCompositionStart(() => { const lineNumber = this._selections[0].startLineNumber; const column = this._selections[0].startColumn; @@ -140,76 +177,68 @@ export class KeyboardHandler extends ViewEventHandler { )); // Find range pixel position - const visibleRange = this.viewHelper.visibleRangeForPositionRelativeToEditor(lineNumber, column); + const visibleRange = this._viewHelper.visibleRangeForPositionRelativeToEditor(lineNumber, column); if (visibleRange) { - this.visiblePosition = new TextAreaVisiblePosition( - this.viewHelper.getVerticalOffsetForLineNumber(lineNumber), + this._visiblePosition = new TextAreaVisiblePosition( + this._viewHelper.getVerticalOffsetForLineNumber(lineNumber), visibleRange.left ); - this.textArea.setTop(this.visiblePosition.top - this.scrollTop); - this.textArea.setLeft(this.contentLeft + this.visiblePosition.left - this.scrollLeft); + this._textArea.setTop(this._visiblePosition.top - this._scrollTop); + this._textArea.setLeft(this._contentLeft + this._visiblePosition.left - this._scrollLeft); } // Show the textarea - this.textArea.setHeight(this._context.configuration.editor.lineHeight); - this.viewHelper.viewDomNode.addClassName('ime-input'); + this._textArea.setHeight(this._context.configuration.editor.lineHeight); + this._viewHelper.viewDomNode.addClassName('ime-input'); - this.viewController.compositionStart('keyboard'); + this._viewController.compositionStart('keyboard'); })); - this._register(this._textAreaInput.onCompositionUpdate((e) => { + this._register(this._textAreaInput.onCompositionUpdate((e: ICompositionData) => { if (browser.isEdgeOrIE) { // Due to isEdgeOrIE (where the textarea was not cleared initially) // we cannot assume the text consists only of the composited text - this.textArea.setWidth(0); + this._textArea.setWidth(0); } else { // adjust width by its size let canvasElem = document.createElement('canvas'); let context = canvasElem.getContext('2d'); - let cs = dom.getComputedStyle(this.textArea.domNode); + let cs = dom.getComputedStyle(this._textArea.domNode); if (browser.isFirefox) { // computedStyle.font is empty in Firefox... context.font = `${cs.fontStyle} ${cs.fontVariant} ${cs.fontWeight} ${cs.fontStretch} ${cs.fontSize} / ${cs.lineHeight} ${cs.fontFamily}`; let metrics = context.measureText(e.data); - this.textArea.setWidth(metrics.width + 2); // +2 for Japanese... + this._textArea.setWidth(metrics.width + 2); // +2 for Japanese... } else { context.font = cs.font; let metrics = context.measureText(e.data); - this.textArea.setWidth(metrics.width); + this._textArea.setWidth(metrics.width); } } })); this._register(this._textAreaInput.onCompositionEnd(() => { - this.textArea.unsetHeight(); - this.textArea.unsetWidth(); - this.textArea.setLeft(0); - this.textArea.setTop(0); - this.viewHelper.viewDomNode.removeClassName('ime-input'); + this._textArea.unsetHeight(); + this._textArea.unsetWidth(); + this._textArea.setLeft(0); + this._textArea.setTop(0); + this._viewHelper.viewDomNode.removeClassName('ime-input'); - this.visiblePosition = null; + this._visiblePosition = null; - this.viewController.compositionEnd('keyboard'); - })); - this._register(GlobalScreenReaderNVDA.onChange((value) => { - this._textAreaInput.setStrategy(this._getStrategy()); + this._viewController.compositionEnd('keyboard'); })); - this._context.addEventHandler(this); } public dispose(): void { this._context.removeEventHandler(this); - this._textAreaInput.dispose(); super.dispose(); } private _getStrategy(): TextAreaStrategy { - if (GlobalScreenReaderNVDA.getValue()) { - return TextAreaStrategy.NVDA; - } if (this._context.configuration.editor.viewInfo.experimentalScreenReader) { return TextAreaStrategy.NVDA; } @@ -225,22 +254,20 @@ export class KeyboardHandler extends ViewEventHandler { public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { // Give textarea same font size & line height as editor, for the IME case (when the textarea is visible) if (e.fontInfo) { - Configuration.applyFontInfo(this.textArea, this._context.configuration.editor.fontInfo); + Configuration.applyFontInfo(this._textArea, this._context.configuration.editor.fontInfo); } if (e.viewInfo.experimentalScreenReader) { - this._textAreaInput.setStrategy(this._getStrategy()); + this._textAreaInput.writeScreenReaderContent('strategy changed'); } if (e.layoutInfo) { - this.contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; - this.contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; + this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; + this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; } return false; } - private _lastCursorSelectionChanged: viewEvents.ViewCursorSelectionChangedEvent = null; public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { this._selections = [e.selection].concat(e.secondarySelections); - this._lastCursorSelectionChanged = e; return false; } @@ -250,11 +277,11 @@ export class KeyboardHandler extends ViewEventHandler { } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { - this.scrollLeft = e.scrollLeft; - this.scrollTop = e.scrollTop; - if (this.visiblePosition) { - this.textArea.setTop(this.visiblePosition.top - this.scrollTop); - this.textArea.setLeft(this.contentLeft + this.visiblePosition.left - this.scrollLeft); + this._scrollLeft = e.scrollLeft; + this._scrollTop = e.scrollTop; + if (this._visiblePosition) { + this._textArea.setTop(this._visiblePosition.top - this._scrollTop); + this._textArea.setLeft(this._contentLeft + this._visiblePosition.left - this._scrollLeft); } return false; } @@ -262,11 +289,6 @@ export class KeyboardHandler extends ViewEventHandler { // --- end event handlers public writeToTextArea(): void { - if (this._lastCursorSelectionChanged) { - let e = this._lastCursorSelectionChanged; - this._lastCursorSelectionChanged = null; - this._textAreaInput.setCursorSelections(e.selection, e.secondarySelections); - } + this._textAreaInput.writeScreenReaderContent('selection changed'); } - -} \ No newline at end of file +} diff --git a/src/vs/editor/browser/controller/textAreaInput.ts b/src/vs/editor/browser/controller/textAreaInput.ts index 3edfd54fecb81..c356dca3cd2fd 100644 --- a/src/vs/editor/browser/controller/textAreaInput.ts +++ b/src/vs/editor/browser/controller/textAreaInput.ts @@ -9,14 +9,13 @@ import * as strings from 'vs/base/common/strings'; import Event, { Emitter } from 'vs/base/common/event'; import { KeyCode } from 'vs/base/common/keyCodes'; import { Disposable } from 'vs/base/common/lifecycle'; -import { ISimpleModel, ITypeData, TextAreaState, ITextAreaWrapper, IENarratorStrategy, NVDAPagedStrategy } from 'vs/editor/browser/controller/textAreaState'; -import { Range } from 'vs/editor/common/core/range'; +import { ITypeData, TextAreaState, ITextAreaWrapper } from 'vs/editor/browser/controller/textAreaState'; import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; import { IKeyboardEvent } from "vs/base/browser/keyboardEvent"; import { FastDomNode } from "vs/base/browser/fastDomNode"; -export interface ICompositionEvent { +export interface ICompositionData { data: string; } @@ -24,11 +23,6 @@ export const CopyOptions = { forceCopyWithSyntaxHighlighting: false }; -export const enum TextAreaStrategy { - IENarrator, - NVDA -} - const enum ReadFromTextArea { Type, Paste @@ -41,6 +35,7 @@ export interface IPasteData { export interface ITextAreaInputHost { getPlainTextToCopy(): string; getHTMLToCopy(): string; + getScreenReaderContent(currentState: TextAreaState): TextAreaState; } /** @@ -71,8 +66,8 @@ export class TextAreaInput extends Disposable { private _onCompositionStart = this._register(new Emitter()); public onCompositionStart: Event = this._onCompositionStart.event; - private _onCompositionUpdate = this._register(new Emitter()); - public onCompositionUpdate: Event = this._onCompositionUpdate.event; + private _onCompositionUpdate = this._register(new Emitter()); + public onCompositionUpdate: Event = this._onCompositionUpdate.event; private _onCompositionEnd = this._register(new Emitter()); public onCompositionEnd: Event = this._onCompositionEnd.event; @@ -81,34 +76,25 @@ export class TextAreaInput extends Disposable { private readonly _host: ITextAreaInputHost; private readonly _textArea: TextAreaWrapper; - private readonly _model: ISimpleModel; - - private _textAreaStrategy: TextAreaStrategy; - private _selection: Range; - private _hasFocus: boolean; - private readonly _asyncTriggerCut: RunOnceScheduler; private _textAreaState: TextAreaState; - private _isDoingComposition: boolean; + private _hasFocus: boolean; + private _isDoingComposition: boolean; private _nextCommand: ReadFromTextArea; - constructor(host: ITextAreaInputHost, strategy: TextAreaStrategy, textArea: FastDomNode, model: ISimpleModel) { + constructor(host: ITextAreaInputHost, textArea: FastDomNode) { super(); this._host = host; this._textArea = this._register(new TextAreaWrapper(textArea)); - this._model = model; - - this._textAreaStrategy = strategy; - this._selection = new Range(1, 1, 1, 1); - this._hasFocus = false; - this._asyncTriggerCut = this._register(new RunOnceScheduler(() => this._onCut.fire(), 0)); this._textAreaState = TextAreaState.EMPTY; - this._isDoingComposition = false; + this.writeScreenReaderContent('ctor'); + this._hasFocus = false; + this._isDoingComposition = false; this._nextCommand = ReadFromTextArea.Type; this._register(dom.addStandardDisposableListener(textArea.domNode, 'keydown', (e: IKeyboardEvent) => { @@ -230,7 +216,7 @@ export class TextAreaInput extends Disposable { this._textAreaState = newState; this._onType.fire(typeInput); - let e: ICompositionEvent = { + let e: ICompositionData = { data: typeInput.text }; this._onCompositionUpdate.fire(e); @@ -288,28 +274,17 @@ export class TextAreaInput extends Disposable { this._nextCommand = ReadFromTextArea.Paste; } })); - - this._writeScreenReaderContent('ctor'); } public dispose(): void { super.dispose(); } - public setStrategy(strategy: TextAreaStrategy): void { - if (this._textAreaStrategy === strategy) { - // no change - return; - } - this._textAreaStrategy = strategy; - this._writeScreenReaderContent('strategy changed'); - } - public focusTextArea(): void { // Setting this._hasFocus and writing the screen reader content // will result in a set selection range in the textarea this._hasFocus = true; - this._writeScreenReaderContent('focusTextArea'); + this.writeScreenReaderContent('focusTextArea'); } public setHasFocus(isFocused: boolean): void { @@ -324,16 +299,11 @@ export class TextAreaInput extends Disposable { // is dispatching doesn't work. To reproduce, "tab into" the editor. this._setAndWriteTextAreaState('focusgain', TextAreaState.EMPTY); } else { - this._writeScreenReaderContent('focusgain'); + this.writeScreenReaderContent('focusgain'); } } } - public setCursorSelections(primary: Range, secondary: Range[]): void { - this._selection = primary; - this._writeScreenReaderContent('selection changed'); - } - private _setAndWriteTextAreaState(reason: string, textAreaState: TextAreaState): void { if (!this._hasFocus) { textAreaState = textAreaState.collapseSelection(); @@ -343,27 +313,13 @@ export class TextAreaInput extends Disposable { this._textAreaState = textAreaState; } - private _writeScreenReaderContent(reason: string): void { + public writeScreenReaderContent(reason: string): void { if (this._isDoingComposition) { // Do not write to the text area when doing composition return; } - if (browser.isIPad) { - // Do not place anything in the textarea for the iPad - this._setAndWriteTextAreaState(reason, TextAreaState.EMPTY); - - } else if (this._textAreaStrategy === TextAreaStrategy.IENarrator) { - - const newState = IENarratorStrategy.fromEditorSelection(this._textAreaState, this._model, this._selection); - this._setAndWriteTextAreaState(reason, newState); - - } else { - - const newState = NVDAPagedStrategy.fromEditorSelection(this._textAreaState, this._model, this._selection); - this._setAndWriteTextAreaState(reason, newState); - - } + this._setAndWriteTextAreaState(reason, this._host.getScreenReaderContent(this._textAreaState)); } private _ensureClipboardGetsEditorSelection(e: ClipboardEvent): void { @@ -462,21 +418,34 @@ class TextAreaWrapper extends Disposable implements ITextAreaWrapper { } public setSelectionRange(reason: string, selectionStart: number, selectionEnd: number): void { - // console.log('reason: ' + reason + ', setSelectionRange: ' + selectionStart + ' -> ' + selectionEnd); const textArea = this._actual.domNode; - if (document.activeElement === textArea) { + + const currentIsFocused = (document.activeElement === textArea); + const currentSelectionStart = textArea.selectionStart; + const currentSelectionEnd = textArea.selectionEnd; + + if (currentIsFocused && currentSelectionStart === selectionStart && currentSelectionEnd === selectionEnd) { + // No change + return; + } + + // console.log('reason: ' + reason + ', setSelectionRange: ' + selectionStart + ' -> ' + selectionEnd); + + if (currentIsFocused) { + // No need to focus, only need to change the selection range textArea.setSelectionRange(selectionStart, selectionEnd); - } else { - // If the focus is outside the textarea, browsers will try really hard to reveal the textarea. - // Here, we try to undo the browser's desperate reveal. - try { - const scrollState = dom.saveParentsScrollTop(textArea); - textArea.focus(); - textArea.setSelectionRange(selectionStart, selectionEnd); - dom.restoreParentsScrollTop(textArea, scrollState); - } catch (e) { - // Sometimes IE throws when setting selection (e.g. textarea is off-DOM) - } + return; + } + + // If the focus is outside the textarea, browsers will try really hard to reveal the textarea. + // Here, we try to undo the browser's desperate reveal. + try { + const scrollState = dom.saveParentsScrollTop(textArea); + textArea.focus(); + textArea.setSelectionRange(selectionStart, selectionEnd); + dom.restoreParentsScrollTop(textArea, scrollState); + } catch (e) { + // Sometimes IE throws when setting selection (e.g. textarea is off-DOM) } } } diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index b84b23ff234af..4ba8f9e2739a7 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -68,7 +68,7 @@ export class View extends ViewEventHandler { private layoutProvider: ViewLayout; private _scrollbar: EditorScrollbar; - public _context: ViewContext; + private _context: ViewContext; // The view lines private viewLines: ViewLines; @@ -88,7 +88,7 @@ export class View extends ViewEventHandler { // Dom nodes private linesContent: FastDomNode; public domNode: FastDomNode; - public textArea: FastDomNode; + private textArea: FastDomNode; private textAreaCover: FastDomNode; private overflowGuardContainer: FastDomNode; diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 4a5ce1d8dadb4..fb554283298f6 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -52,28 +52,6 @@ export const TabFocus: ITabFocus = new class { } }; -/** - * Experimental screen reader support toggle - */ -export class GlobalScreenReaderNVDA { - - private static _value = false; - private static _onChange = new Emitter(); - public static onChange: Event = GlobalScreenReaderNVDA._onChange.event; - - public static getValue(): boolean { - return this._value; - } - - public static setValue(value: boolean): void { - if (this._value === value) { - return; - } - this._value = value; - this._onChange.fire(this._value); - } -} - export class ConfigurationWithDefaults { private _editor: editorOptions.IEditorOptions; diff --git a/src/vs/editor/contrib/accessibility/browser/accessibility.ts b/src/vs/editor/contrib/accessibility/browser/accessibility.ts index 508072bd26d58..dc68a6a47152c 100644 --- a/src/vs/editor/contrib/accessibility/browser/accessibility.ts +++ b/src/vs/editor/contrib/accessibility/browser/accessibility.ts @@ -17,11 +17,9 @@ import { Widget } from 'vs/base/browser/ui/widget'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; -import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; -import { GlobalScreenReaderNVDA } from 'vs/editor/common/config/commonEditorConfig'; import { ICommonCodeEditor, IEditorContribution } from 'vs/editor/common/editorCommon'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; -import { editorAction, CommonEditorRegistry, EditorAction, EditorCommand, Command } from 'vs/editor/common/editorCommonExtensions'; +import { editorAction, CommonEditorRegistry, EditorAction, EditorCommand } from 'vs/editor/common/editorCommonExtensions'; import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition } from 'vs/editor/browser/editorBrowser'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { ToggleTabFocusModeAction } from 'vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode'; @@ -29,7 +27,6 @@ import { registerThemingParticipant } from 'vs/platform/theme/common/themeServic import { editorWidgetBackground, widgetShadow, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; const CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE = new RawContextKey('accessibilityHelpWidgetVisible', false); -const TOGGLE_EXPERIMENTAL_SCREEN_READER_SUPPORT_COMMAND_ID = 'toggleExperimentalScreenReaderSupport'; @editorContribution class AccessibilityHelpController extends Disposable implements IEditorContribution { @@ -234,27 +231,6 @@ CommonEditorRegistry.registerEditorCommand(new AccessibilityHelpCommand({ } })); -class ToggleExperimentalScreenReaderSupportCommand extends Command { - constructor() { - super({ - id: TOGGLE_EXPERIMENTAL_SCREEN_READER_SUPPORT_COMMAND_ID, - precondition: null, - kbOpts: { - weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), - kbExpr: null, - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_R - } - }); - } - - public runCommand(accessor: ServicesAccessor, args: any): void { - let currentValue = GlobalScreenReaderNVDA.getValue(); - GlobalScreenReaderNVDA.setValue(!currentValue); - } -} -const command = new ToggleExperimentalScreenReaderSupportCommand(); -KeybindingsRegistry.registerCommandAndKeybindingRule(command.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib())); - registerThemingParticipant((theme, collector) => { let widgetBackground = theme.getColor(editorWidgetBackground); if (widgetBackground) { diff --git a/src/vs/editor/test/browser/controller/imeTester.ts b/src/vs/editor/test/browser/controller/imeTester.ts index c47b41d7fb1a9..5c5ccc9e076c8 100644 --- a/src/vs/editor/test/browser/controller/imeTester.ts +++ b/src/vs/editor/test/browser/controller/imeTester.ts @@ -4,11 +4,13 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { TextAreaInput, ITextAreaInputHost, TextAreaStrategy } from 'vs/editor/browser/controller/textAreaInput'; -import { ISimpleModel } from 'vs/editor/browser/controller/textAreaState'; +import { TextAreaInput, ITextAreaInputHost } from 'vs/editor/browser/controller/textAreaInput'; +import { ISimpleModel, TextAreaState, IENarratorStrategy, NVDAPagedStrategy } from 'vs/editor/browser/controller/textAreaState'; import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { createFastDomNode } from 'vs/base/browser/fastDomNode'; +import * as browser from 'vs/base/browser/browser'; +import { TextAreaStrategy } from "vs/editor/browser/controller/keyboardHandler"; // To run this test, open imeTester.html @@ -62,6 +64,9 @@ class TestView { } function doCreateTest(strategy: TextAreaStrategy, description: string, inputStr: string, expectedStr: string): HTMLElement { + let cursorOffset: number = 0; + let cursorLength: number = 0; + let container = document.createElement('div'); container.className = 'container'; @@ -95,10 +100,25 @@ function doCreateTest(strategy: TextAreaStrategy, description: string, inputStr: const textAreaInputHost: ITextAreaInputHost = { getPlainTextToCopy: (): string => '', - getHTMLToCopy: (): string => '' + getHTMLToCopy: (): string => '', + getScreenReaderContent: (currentState: TextAreaState): TextAreaState => { + + if (browser.isIPad) { + // Do not place anything in the textarea for the iPad + return TextAreaState.EMPTY; + } + + const selection = new Range(1, 1 + cursorOffset, 1, 1 + cursorOffset + cursorLength); + + if (strategy === TextAreaStrategy.IENarrator) { + return IENarratorStrategy.fromEditorSelection(currentState, model, selection); + } + + return NVDAPagedStrategy.fromEditorSelection(currentState, model, selection); + } }; - let handler = new TextAreaInput(textAreaInputHost, strategy, createFastDomNode(input), model); + let handler = new TextAreaInput(textAreaInputHost, createFastDomNode(input)); input.onfocus = () => { handler.setHasFocus(true); @@ -121,13 +141,10 @@ function doCreateTest(strategy: TextAreaStrategy, description: string, inputStr: let view = new TestView(model); - - let cursorOffset: number; - let cursorLength: number; let updatePosition = (off: number, len: number) => { cursorOffset = off; cursorLength = len; - handler.setCursorSelections(new Range(1, 1 + cursorOffset, 1, 1 + cursorOffset + cursorLength), []); + handler.writeScreenReaderContent('selection changed'); handler.focusTextArea(); }; From de797d873d62aa68b221c8c1a3a61ab7ea0dfe37 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 4 May 2017 12:19:00 +0200 Subject: [PATCH 0174/2747] Move focus related code to TextAreaInput --- .../browser/controller/keyboardHandler.ts | 38 ++++++++++++++++--- .../browser/controller/textAreaInput.ts | 31 ++++++++++++--- src/vs/editor/browser/view/viewImpl.ts | 35 +---------------- .../test/browser/controller/imeTester.ts | 7 ---- 4 files changed, 60 insertions(+), 51 deletions(-) diff --git a/src/vs/editor/browser/controller/keyboardHandler.ts b/src/vs/editor/browser/controller/keyboardHandler.ts index 742a2e70ae8c1..f442e4a5b1629 100644 --- a/src/vs/editor/browser/controller/keyboardHandler.ts +++ b/src/vs/editor/browser/controller/keyboardHandler.ts @@ -230,6 +230,14 @@ export class KeyboardHandler extends ViewEventHandler { this._viewController.compositionEnd('keyboard'); })); + this._register(this._textAreaInput.onFocus(() => { + this._context.privateViewEventBus.emit(new viewEvents.ViewFocusChangedEvent(true)); + })); + + this._register(this._textAreaInput.onBlur(() => { + this._context.privateViewEventBus.emit(new viewEvents.ViewFocusChangedEvent(false)); + })); + this._context.addEventHandler(this); } @@ -245,6 +253,10 @@ export class KeyboardHandler extends ViewEventHandler { return TextAreaStrategy.IENarrator; } + public isFocused(): boolean { + return this._textAreaInput.isFocused(); + } + public focusTextArea(): void { this._textAreaInput.focusTextArea(); } @@ -263,6 +275,9 @@ export class KeyboardHandler extends ViewEventHandler { this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; } + if (e.viewInfo.ariaLabel) { + this._textArea.setAttribute('aria-label', this._context.configuration.editor.viewInfo.ariaLabel); + } return false; } @@ -271,11 +286,6 @@ export class KeyboardHandler extends ViewEventHandler { return false; } - public onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean { - this._textAreaInput.setHasFocus(e.isFocused); - return false; - } - public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { this._scrollLeft = e.scrollLeft; this._scrollTop = e.scrollTop; @@ -288,7 +298,25 @@ export class KeyboardHandler extends ViewEventHandler { // --- end event handlers + // --- begin view API + public writeToTextArea(): void { this._textAreaInput.writeScreenReaderContent('selection changed'); } + + public setAriaActiveDescendant(id: string): void { + if (id) { + this._textArea.setAttribute('role', 'combobox'); + if (this._textArea.getAttribute('aria-activedescendant') !== id) { + this._textArea.setAttribute('aria-haspopup', 'true'); + this._textArea.setAttribute('aria-activedescendant', id); + } + } else { + this._textArea.setAttribute('role', 'textbox'); + this._textArea.removeAttribute('aria-activedescendant'); + this._textArea.removeAttribute('aria-haspopup'); + } + } + + // --- end view API } diff --git a/src/vs/editor/browser/controller/textAreaInput.ts b/src/vs/editor/browser/controller/textAreaInput.ts index c356dca3cd2fd..7d921e1936c0e 100644 --- a/src/vs/editor/browser/controller/textAreaInput.ts +++ b/src/vs/editor/browser/controller/textAreaInput.ts @@ -48,6 +48,12 @@ export interface ITextAreaInputHost { */ export class TextAreaInput extends Disposable { + private _onFocus = this._register(new Emitter()); + public onFocus: Event = this._onFocus.event; + + private _onBlur = this._register(new Emitter()); + public onBlur: Event = this._onBlur.event; + private _onKeyDown = this._register(new Emitter()); public onKeyDown: Event = this._onKeyDown.event; @@ -274,6 +280,9 @@ export class TextAreaInput extends Disposable { this._nextCommand = ReadFromTextArea.Paste; } })); + + this._register(dom.addDisposableListener(textArea.domNode, 'focus', () => this._setHasFocus(true))); + this._register(dom.addDisposableListener(textArea.domNode, 'blur', () => this._setHasFocus(false))); } public dispose(): void { @@ -282,17 +291,21 @@ export class TextAreaInput extends Disposable { public focusTextArea(): void { // Setting this._hasFocus and writing the screen reader content - // will result in a set selection range in the textarea - this._hasFocus = true; - this.writeScreenReaderContent('focusTextArea'); + // will result in a focus() and setSelectionRange() in the textarea + this._setHasFocus(true); + } + + public isFocused(): boolean { + return this._hasFocus; } - public setHasFocus(isFocused: boolean): void { - if (this._hasFocus === isFocused) { + private _setHasFocus(newHasFocus: boolean): void { + if (this._hasFocus === newHasFocus) { // no change return; } - this._hasFocus = isFocused; + this._hasFocus = newHasFocus; + if (this._hasFocus) { if (browser.isEdge) { // Edge has a bug where setting the selection range while the focus event @@ -302,6 +315,12 @@ export class TextAreaInput extends Disposable { this.writeScreenReaderContent('focusgain'); } } + + if (this._hasFocus) { + this._onFocus.fire(); + } else { + this._onBlur.fire(); + } } private _setAndWriteTextAreaState(reason: string, textAreaState: TextAreaState): void { diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index 4ba8f9e2739a7..b330154273698 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -93,7 +93,6 @@ export class View extends ViewEventHandler { private overflowGuardContainer: FastDomNode; // Actual mutable state - private hasFocus: boolean; private _isDisposed: boolean; private _renderAnimationFrame: IDisposable; @@ -136,8 +135,6 @@ export class View extends ViewEventHandler { // Pointer handler this.pointerHandler = new PointerHandler(this._context, viewController, this.createPointerHandlerHelper()); - this.hasFocus = false; - this._register(model.addEventListener((events: viewEvents.ViewEvent[]) => { this.eventDispatcher.emitMany(events); })); @@ -161,9 +158,6 @@ export class View extends ViewEventHandler { this.textArea.setTop(0); this.textArea.setLeft(0); - this._register(dom.addDisposableListener(this.textArea.domNode, 'focus', () => this._setHasFocus(true))); - this._register(dom.addDisposableListener(this.textArea.domNode, 'blur', () => this._setHasFocus(false))); - // On top of the text area, we position a dom node to cover it up // (there have been reports of tiny blinking cursors) // (in WebKit the textarea is 1px by 1px because it cannot handle input to a 0x0 textarea) @@ -391,9 +385,6 @@ export class View extends ViewEventHandler { if (e.viewInfo.editorClassName) { this.domNode.setClassName(this._context.configuration.editor.viewInfo.editorClassName); } - if (e.viewInfo.ariaLabel) { - this.textArea.setAttribute('aria-label', this._context.configuration.editor.viewInfo.ariaLabel); - } if (e.layoutInfo) { this._setLayout(); } @@ -537,13 +528,6 @@ export class View extends ViewEventHandler { } } - private _setHasFocus(newHasFocus: boolean): void { - if (this.hasFocus !== newHasFocus) { - this.hasFocus = newHasFocus; - this._context.privateViewEventBus.emit(new viewEvents.ViewFocusChangedEvent(this.hasFocus)); - } - } - // --- BEGIN CodeEditor helpers public getScrollWidth(): number { @@ -683,17 +667,7 @@ export class View extends ViewEventHandler { } public setAriaActiveDescendant(id: string): void { - if (id) { - this.textArea.setAttribute('role', 'combobox'); - if (this.textArea.getAttribute('aria-activedescendant') !== id) { - this.textArea.setAttribute('aria-haspopup', 'true'); - this.textArea.setAttribute('aria-activedescendant', id); - } - } else { - this.textArea.setAttribute('role', 'textbox'); - this.textArea.removeAttribute('aria-activedescendant'); - this.textArea.removeAttribute('aria-haspopup'); - } + this.keyboardHandler.setAriaActiveDescendant(id); } public saveState(): editorCommon.IViewState { @@ -706,15 +680,10 @@ export class View extends ViewEventHandler { public focus(): void { this.keyboardHandler.focusTextArea(); - - // IE does not trigger the focus event immediately, so we must help it a little bit - if (document.activeElement === this.textArea.domNode) { - this._setHasFocus(true); - } } public isFocused(): boolean { - return this.hasFocus; + return this.keyboardHandler.isFocused(); } public addContentWidget(widgetData: IContentWidgetData): void { diff --git a/src/vs/editor/test/browser/controller/imeTester.ts b/src/vs/editor/test/browser/controller/imeTester.ts index 5c5ccc9e076c8..828c278edb4c9 100644 --- a/src/vs/editor/test/browser/controller/imeTester.ts +++ b/src/vs/editor/test/browser/controller/imeTester.ts @@ -120,13 +120,6 @@ function doCreateTest(strategy: TextAreaStrategy, description: string, inputStr: let handler = new TextAreaInput(textAreaInputHost, createFastDomNode(input)); - input.onfocus = () => { - handler.setHasFocus(true); - }; - input.onblur = () => { - handler.setHasFocus(false); - }; - let output = document.createElement('pre'); output.className = 'output'; container.appendChild(output); From acff3d07e3d87dc2602ff5716181a9cad08dae4b Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 4 May 2017 12:29:45 +0200 Subject: [PATCH 0175/2747] Move text area creation to TextAreaHandler --- ...{keyboardHandler.ts => textAreaHandler.ts} | 102 ++++++++++++------ src/vs/editor/browser/view/viewImpl.ts | 74 +++---------- .../test/browser/controller/imeTester.ts | 2 +- 3 files changed, 87 insertions(+), 91 deletions(-) rename src/vs/editor/browser/controller/{keyboardHandler.ts => textAreaHandler.ts} (71%) diff --git a/src/vs/editor/browser/controller/keyboardHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts similarity index 71% rename from src/vs/editor/browser/controller/keyboardHandler.ts rename to src/vs/editor/browser/controller/textAreaHandler.ts index f442e4a5b1629..90c12809f3efd 100644 --- a/src/vs/editor/browser/controller/keyboardHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -14,15 +14,17 @@ import { Configuration } from 'vs/editor/browser/config/configuration'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { HorizontalRange } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { FastDomNode } from 'vs/base/browser/fastDomNode'; +import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; import { ViewController } from 'vs/editor/browser/view/viewController'; import { EndOfLinePreference } from "vs/editor/common/editorCommon"; import { IKeyboardEvent } from "vs/base/browser/keyboardEvent"; +import { PartFingerprints, PartFingerprint } from "vs/editor/browser/view/viewPart"; +import { Margin } from "vs/editor/browser/viewParts/margin/margin"; +import { LineNumbersOverlay } from "vs/editor/browser/viewParts/lineNumbers/lineNumbers"; -export interface IKeyboardHandlerHelper { +export interface ITextAreaHandlerHelper { viewDomNode: FastDomNode; - textArea: FastDomNode; visibleRangeForPositionRelativeToEditor(lineNumber: number, column: number): HorizontalRange; getVerticalOffsetForLineNumber(lineNumber: number): number; } @@ -44,12 +46,11 @@ export const enum TextAreaStrategy { NVDA } -export class KeyboardHandler extends ViewEventHandler { +export class TextAreaHandler extends ViewEventHandler { private readonly _context: ViewContext; private readonly _viewController: ViewController; - private readonly _textArea: FastDomNode; - private readonly _viewHelper: IKeyboardHandlerHelper; + private readonly _viewHelper: ITextAreaHandlerHelper; private _contentLeft: number; private _contentWidth: number; @@ -61,15 +62,15 @@ export class KeyboardHandler extends ViewEventHandler { private _lastCopiedValue: string; private _lastCopiedValueIsFromEmptySelection: boolean; + public readonly textArea: FastDomNode; + public readonly textAreaCover: FastDomNode; private readonly _textAreaInput: TextAreaInput; - constructor(context: ViewContext, viewController: ViewController, viewHelper: IKeyboardHandlerHelper) { + constructor(context: ViewContext, viewController: ViewController, viewHelper: ITextAreaHandlerHelper) { super(); this._context = context; this._viewController = viewController; - this._textArea = viewHelper.textArea; - Configuration.applyFontInfo(this._textArea, this._context.configuration.editor.fontInfo); this._viewHelper = viewHelper; this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; @@ -82,6 +83,43 @@ export class KeyboardHandler extends ViewEventHandler { this._lastCopiedValue = null; this._lastCopiedValueIsFromEmptySelection = false; + // Text Area (The focus will always be in the textarea when the cursor is blinking) + this.textArea = createFastDomNode(document.createElement('textarea')); + PartFingerprints.write(this.textArea, PartFingerprint.TextArea); + this.textArea.setClassName('inputarea'); + this.textArea.setAttribute('wrap', 'off'); + this.textArea.setAttribute('autocorrect', 'off'); + this.textArea.setAttribute('autocapitalize', 'off'); + this.textArea.setAttribute('spellcheck', 'false'); + this.textArea.setAttribute('aria-label', this._context.configuration.editor.viewInfo.ariaLabel); + this.textArea.setAttribute('role', 'textbox'); + this.textArea.setAttribute('aria-multiline', 'true'); + this.textArea.setAttribute('aria-haspopup', 'false'); + this.textArea.setAttribute('aria-autocomplete', 'both'); + + this.textArea.setTop(0); + this.textArea.setLeft(0); + Configuration.applyFontInfo(this.textArea, this._context.configuration.editor.fontInfo); + + // On top of the text area, we position a dom node to cover it up + // (there have been reports of tiny blinking cursors) + // (in WebKit the textarea is 1px by 1px because it cannot handle input to a 0x0 textarea) + this.textAreaCover = createFastDomNode(document.createElement('div')); + if (this._context.configuration.editor.viewInfo.glyphMargin) { + this.textAreaCover.setClassName('monaco-editor-background ' + Margin.CLASS_NAME + ' ' + 'textAreaCover'); + } else { + if (this._context.configuration.editor.viewInfo.renderLineNumbers) { + this.textAreaCover.setClassName('monaco-editor-background ' + LineNumbersOverlay.CLASS_NAME + ' ' + 'textAreaCover'); + } else { + this.textAreaCover.setClassName('monaco-editor-background ' + 'textAreaCover'); + } + } + this.textAreaCover.setPosition('absolute'); + this.textAreaCover.setWidth(1); + this.textAreaCover.setHeight(1); + this.textAreaCover.setTop(0); + this.textAreaCover.setLeft(0); + const simpleModel: ISimpleModel = { getLineCount: (): number => { return this._context.model.getLineCount(); @@ -136,7 +174,7 @@ export class KeyboardHandler extends ViewEventHandler { } }; - this._textAreaInput = this._register(new TextAreaInput(textAreaInputHost, this._textArea)); + this._textAreaInput = this._register(new TextAreaInput(textAreaInputHost, this.textArea)); this._register(this._textAreaInput.onKeyDown((e: IKeyboardEvent) => { this._viewController.emitKeyDown(e); @@ -184,12 +222,12 @@ export class KeyboardHandler extends ViewEventHandler { this._viewHelper.getVerticalOffsetForLineNumber(lineNumber), visibleRange.left ); - this._textArea.setTop(this._visiblePosition.top - this._scrollTop); - this._textArea.setLeft(this._contentLeft + this._visiblePosition.left - this._scrollLeft); + this.textArea.setTop(this._visiblePosition.top - this._scrollTop); + this.textArea.setLeft(this._contentLeft + this._visiblePosition.left - this._scrollLeft); } // Show the textarea - this._textArea.setHeight(this._context.configuration.editor.lineHeight); + this.textArea.setHeight(this._context.configuration.editor.lineHeight); this._viewHelper.viewDomNode.addClassName('ime-input'); this._viewController.compositionStart('keyboard'); @@ -199,30 +237,30 @@ export class KeyboardHandler extends ViewEventHandler { if (browser.isEdgeOrIE) { // Due to isEdgeOrIE (where the textarea was not cleared initially) // we cannot assume the text consists only of the composited text - this._textArea.setWidth(0); + this.textArea.setWidth(0); } else { // adjust width by its size let canvasElem = document.createElement('canvas'); let context = canvasElem.getContext('2d'); - let cs = dom.getComputedStyle(this._textArea.domNode); + let cs = dom.getComputedStyle(this.textArea.domNode); if (browser.isFirefox) { // computedStyle.font is empty in Firefox... context.font = `${cs.fontStyle} ${cs.fontVariant} ${cs.fontWeight} ${cs.fontStretch} ${cs.fontSize} / ${cs.lineHeight} ${cs.fontFamily}`; let metrics = context.measureText(e.data); - this._textArea.setWidth(metrics.width + 2); // +2 for Japanese... + this.textArea.setWidth(metrics.width + 2); // +2 for Japanese... } else { context.font = cs.font; let metrics = context.measureText(e.data); - this._textArea.setWidth(metrics.width); + this.textArea.setWidth(metrics.width); } } })); this._register(this._textAreaInput.onCompositionEnd(() => { - this._textArea.unsetHeight(); - this._textArea.unsetWidth(); - this._textArea.setLeft(0); - this._textArea.setTop(0); + this.textArea.unsetHeight(); + this.textArea.unsetWidth(); + this.textArea.setLeft(0); + this.textArea.setTop(0); this._viewHelper.viewDomNode.removeClassName('ime-input'); this._visiblePosition = null; @@ -266,7 +304,7 @@ export class KeyboardHandler extends ViewEventHandler { public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { // Give textarea same font size & line height as editor, for the IME case (when the textarea is visible) if (e.fontInfo) { - Configuration.applyFontInfo(this._textArea, this._context.configuration.editor.fontInfo); + Configuration.applyFontInfo(this.textArea, this._context.configuration.editor.fontInfo); } if (e.viewInfo.experimentalScreenReader) { this._textAreaInput.writeScreenReaderContent('strategy changed'); @@ -276,7 +314,7 @@ export class KeyboardHandler extends ViewEventHandler { this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; } if (e.viewInfo.ariaLabel) { - this._textArea.setAttribute('aria-label', this._context.configuration.editor.viewInfo.ariaLabel); + this.textArea.setAttribute('aria-label', this._context.configuration.editor.viewInfo.ariaLabel); } return false; } @@ -290,8 +328,8 @@ export class KeyboardHandler extends ViewEventHandler { this._scrollLeft = e.scrollLeft; this._scrollTop = e.scrollTop; if (this._visiblePosition) { - this._textArea.setTop(this._visiblePosition.top - this._scrollTop); - this._textArea.setLeft(this._contentLeft + this._visiblePosition.left - this._scrollLeft); + this.textArea.setTop(this._visiblePosition.top - this._scrollTop); + this.textArea.setLeft(this._contentLeft + this._visiblePosition.left - this._scrollLeft); } return false; } @@ -306,15 +344,15 @@ export class KeyboardHandler extends ViewEventHandler { public setAriaActiveDescendant(id: string): void { if (id) { - this._textArea.setAttribute('role', 'combobox'); - if (this._textArea.getAttribute('aria-activedescendant') !== id) { - this._textArea.setAttribute('aria-haspopup', 'true'); - this._textArea.setAttribute('aria-activedescendant', id); + this.textArea.setAttribute('role', 'combobox'); + if (this.textArea.getAttribute('aria-activedescendant') !== id) { + this.textArea.setAttribute('aria-haspopup', 'true'); + this.textArea.setAttribute('aria-activedescendant', id); } } else { - this._textArea.setAttribute('role', 'textbox'); - this._textArea.removeAttribute('aria-activedescendant'); - this._textArea.removeAttribute('aria-haspopup'); + this.textArea.setAttribute('role', 'textbox'); + this.textArea.removeAttribute('aria-activedescendant'); + this.textArea.removeAttribute('aria-haspopup'); } } diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index b330154273698..c2dbbd4c6ce49 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -14,7 +14,7 @@ import { Range } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler'; import { Configuration } from 'vs/editor/browser/config/configuration'; -import { KeyboardHandler, IKeyboardHandlerHelper } from 'vs/editor/browser/controller/keyboardHandler'; +import { TextAreaHandler, ITextAreaHandlerHelper } from 'vs/editor/browser/controller/textAreaHandler'; import { PointerHandler } from 'vs/editor/browser/controller/pointerHandler'; import * as editorBrowser from 'vs/editor/browser/editorBrowser'; import { ViewController, ExecCoreEditorCommandFunc } from 'vs/editor/browser/view/viewController'; @@ -80,16 +80,14 @@ export class View extends ViewEventHandler { private viewCursors: ViewCursors; private viewParts: ViewPart[]; - private keyboardHandler: KeyboardHandler; - private pointerHandler: PointerHandler; + private readonly _textAreaHandler: TextAreaHandler; + private readonly pointerHandler: PointerHandler; private outgoingEvents: ViewOutgoingEvents; // Dom nodes private linesContent: FastDomNode; public domNode: FastDomNode; - private textArea: FastDomNode; - private textAreaCover: FastDomNode; private overflowGuardContainer: FastDomNode; // Actual mutable state @@ -125,13 +123,12 @@ export class View extends ViewEventHandler { // The view context is passed on to most classes (basically to reduce param. counts in ctors) this._context = new ViewContext(configuration, model, this.eventDispatcher); - this.createTextArea(); + // Keyboard handler + this._textAreaHandler = new TextAreaHandler(this._context, viewController, this.createTextAreaHandlerHelper()); + this.createViewParts(); this._setLayout(); - // Keyboard handler - this.keyboardHandler = new KeyboardHandler(this._context, viewController, this.createKeyboardHandlerHelper()); - // Pointer handler this.pointerHandler = new PointerHandler(this._context, viewController, this.createPointerHandlerHelper()); @@ -140,44 +137,6 @@ export class View extends ViewEventHandler { })); } - private createTextArea(): void { - // Text Area (The focus will always be in the textarea when the cursor is blinking) - this.textArea = createFastDomNode(document.createElement('textarea')); - PartFingerprints.write(this.textArea, PartFingerprint.TextArea); - this.textArea.setClassName('inputarea'); - this.textArea.setAttribute('wrap', 'off'); - this.textArea.setAttribute('autocorrect', 'off'); - this.textArea.setAttribute('autocapitalize', 'off'); - this.textArea.setAttribute('spellcheck', 'false'); - this.textArea.setAttribute('aria-label', this._context.configuration.editor.viewInfo.ariaLabel); - this.textArea.setAttribute('role', 'textbox'); - this.textArea.setAttribute('aria-multiline', 'true'); - this.textArea.setAttribute('aria-haspopup', 'false'); - this.textArea.setAttribute('aria-autocomplete', 'both'); - - this.textArea.setTop(0); - this.textArea.setLeft(0); - - // On top of the text area, we position a dom node to cover it up - // (there have been reports of tiny blinking cursors) - // (in WebKit the textarea is 1px by 1px because it cannot handle input to a 0x0 textarea) - this.textAreaCover = createFastDomNode(document.createElement('div')); - if (this._context.configuration.editor.viewInfo.glyphMargin) { - this.textAreaCover.setClassName('monaco-editor-background ' + Margin.CLASS_NAME + ' ' + 'textAreaCover'); - } else { - if (this._context.configuration.editor.viewInfo.renderLineNumbers) { - this.textAreaCover.setClassName('monaco-editor-background ' + LineNumbersOverlay.CLASS_NAME + ' ' + 'textAreaCover'); - } else { - this.textAreaCover.setClassName('monaco-editor-background ' + 'textAreaCover'); - } - } - this.textAreaCover.setPosition('absolute'); - this.textAreaCover.setWidth(1); - this.textAreaCover.setHeight(1); - this.textAreaCover.setTop(0); - this.textAreaCover.setLeft(0); - } - private createViewParts(): void { // These two dom nodes must be constructed up front, since references are needed in the layout provider (scrolling & co.) this.linesContent = createFastDomNode(document.createElement('div')); @@ -268,8 +227,8 @@ export class View extends ViewEventHandler { this.overflowGuardContainer.appendChild(this._scrollbar.getDomNode()); this.overflowGuardContainer.appendChild(scrollDecoration.getDomNode()); this.overflowGuardContainer.appendChild(this.overlayWidgets.getDomNode()); - this.overflowGuardContainer.appendChild(this.textArea); - this.overflowGuardContainer.appendChild(this.textAreaCover); + this.overflowGuardContainer.appendChild(this._textAreaHandler.textArea); + this.overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover); this.overflowGuardContainer.appendChild(minimap.getDomNode()); this.domNode.appendChild(this.overflowGuardContainer); this.domNode.appendChild(this.contentWidgets.overflowingContentWidgetsDomNode); @@ -341,10 +300,9 @@ export class View extends ViewEventHandler { }; } - private createKeyboardHandlerHelper(): IKeyboardHandlerHelper { + private createTextAreaHandlerHelper(): ITextAreaHandlerHelper { return { viewDomNode: this.domNode, - textArea: this.textArea, visibleRangeForPositionRelativeToEditor: (lineNumber: number, column: number) => { this._flushAccumulatedAndRenderNow(); let visibleRanges = this.viewLines.visibleRangesForRange2(new Range(lineNumber, column, lineNumber, column)); @@ -435,7 +393,7 @@ export class View extends ViewEventHandler { this.eventDispatcher.removeEventHandler(this); this.outgoingEvents.dispose(); - this.keyboardHandler.dispose(); + this._textAreaHandler.dispose(); this.pointerHandler.dispose(); this.viewLines.dispose(); @@ -492,7 +450,7 @@ export class View extends ViewEventHandler { if (!this.viewLines.shouldRender() && viewPartsToRender.length === 0) { // Nothing to render - this.keyboardHandler.writeToTextArea(); + this._textAreaHandler.writeToTextArea(); return; } @@ -503,14 +461,14 @@ export class View extends ViewEventHandler { if (this.viewLines.shouldRender()) { this.viewLines.renderText(viewportData, () => { - this.keyboardHandler.writeToTextArea(); + this._textAreaHandler.writeToTextArea(); }); this.viewLines.onDidRender(); // Rendering of viewLines might cause scroll events to occur, so collect view parts to render again viewPartsToRender = this._getViewPartsToRender(); } else { - this.keyboardHandler.writeToTextArea(); + this._textAreaHandler.writeToTextArea(); } let renderingContext = new RenderingContext(this.layoutProvider, viewportData, this.viewLines); @@ -667,7 +625,7 @@ export class View extends ViewEventHandler { } public setAriaActiveDescendant(id: string): void { - this.keyboardHandler.setAriaActiveDescendant(id); + this._textAreaHandler.setAriaActiveDescendant(id); } public saveState(): editorCommon.IViewState { @@ -679,11 +637,11 @@ export class View extends ViewEventHandler { } public focus(): void { - this.keyboardHandler.focusTextArea(); + this._textAreaHandler.focusTextArea(); } public isFocused(): boolean { - return this.keyboardHandler.isFocused(); + return this._textAreaHandler.isFocused(); } public addContentWidget(widgetData: IContentWidgetData): void { diff --git a/src/vs/editor/test/browser/controller/imeTester.ts b/src/vs/editor/test/browser/controller/imeTester.ts index 828c278edb4c9..63999ce1c14de 100644 --- a/src/vs/editor/test/browser/controller/imeTester.ts +++ b/src/vs/editor/test/browser/controller/imeTester.ts @@ -10,7 +10,7 @@ import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { createFastDomNode } from 'vs/base/browser/fastDomNode'; import * as browser from 'vs/base/browser/browser'; -import { TextAreaStrategy } from "vs/editor/browser/controller/keyboardHandler"; +import { TextAreaStrategy } from "vs/editor/browser/controller/textAreaHandler"; // To run this test, open imeTester.html From fa1bcc909cb6ce37b01ee6871cfec5ee98e12533 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 4 May 2017 12:44:03 +0200 Subject: [PATCH 0176/2747] Extract text area related CSS to textAreaHandler.css --- .../browser/controller/textAreaHandler.css | 42 ++++++++++++++++++ .../browser/controller/textAreaHandler.ts | 6 +-- src/vs/editor/browser/view/viewImpl.ts | 3 +- src/vs/editor/browser/widget/media/editor.css | 44 +------------------ .../editor/common/view/editorColorRegistry.ts | 2 +- 5 files changed, 49 insertions(+), 48 deletions(-) create mode 100644 src/vs/editor/browser/controller/textAreaHandler.css diff --git a/src/vs/editor/browser/controller/textAreaHandler.css b/src/vs/editor/browser/controller/textAreaHandler.css new file mode 100644 index 0000000000000..e4c5188f7d370 --- /dev/null +++ b/src/vs/editor/browser/controller/textAreaHandler.css @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +.monaco-editor .inputarea { + /*Chrome cannot handle typing in a 0x0 textarea*/ + width: 1px; + height: 1px; + min-width: 0; + min-height: 0; + margin: 0; + padding: 0; + position: absolute; + outline: none !important; + resize: none; + border: none; + overflow: hidden; +} +/*.monaco-editor .inputarea { + position: fixed !important; + width: 800px !important; + height: 500px !important; + top: initial !important; + left: initial !important; + bottom: 0 !important; + right: 0 !important; +}*/ +.monaco-editor.ff .inputarea, +.monaco-editor.ie .inputarea { + width: 0; + height: 0; +} +.monaco-editor .ime-input.inputarea { + z-index: 10; +} +.monaco-editor .ime-input.inputarea { + background: rgba(255, 255, 255, 0.85); +} +.monaco-editor.vs-dark .ime-input.inputarea { + background: rgba(0, 0, 0, 0.65); +} diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index 90c12809f3efd..22bf4288df370 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import 'vs/css!./textAreaHandler'; import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; import { TextAreaInput, ITextAreaInputHost, IPasteData, ICompositionData } from 'vs/editor/browser/controller/textAreaInput'; @@ -24,7 +25,6 @@ import { Margin } from "vs/editor/browser/viewParts/margin/margin"; import { LineNumbersOverlay } from "vs/editor/browser/viewParts/lineNumbers/lineNumbers"; export interface ITextAreaHandlerHelper { - viewDomNode: FastDomNode; visibleRangeForPositionRelativeToEditor(lineNumber: number, column: number): HorizontalRange; getVerticalOffsetForLineNumber(lineNumber: number): number; } @@ -228,7 +228,7 @@ export class TextAreaHandler extends ViewEventHandler { // Show the textarea this.textArea.setHeight(this._context.configuration.editor.lineHeight); - this._viewHelper.viewDomNode.addClassName('ime-input'); + this.textArea.setClassName('inputarea ime-input'); this._viewController.compositionStart('keyboard'); })); @@ -261,7 +261,7 @@ export class TextAreaHandler extends ViewEventHandler { this.textArea.unsetWidth(); this.textArea.setLeft(0); this.textArea.setTop(0); - this._viewHelper.viewDomNode.removeClassName('ime-input'); + this.textArea.setClassName('inputarea'); this._visiblePosition = null; diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index c2dbbd4c6ce49..97f14e18708e9 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -83,7 +83,7 @@ export class View extends ViewEventHandler { private readonly _textAreaHandler: TextAreaHandler; private readonly pointerHandler: PointerHandler; - private outgoingEvents: ViewOutgoingEvents; + private readonly outgoingEvents: ViewOutgoingEvents; // Dom nodes private linesContent: FastDomNode; @@ -302,7 +302,6 @@ export class View extends ViewEventHandler { private createTextAreaHandlerHelper(): ITextAreaHandlerHelper { return { - viewDomNode: this.domNode, visibleRangeForPositionRelativeToEditor: (lineNumber: number, column: number) => { this._flushAccumulatedAndRenderNow(); let visibleRanges = this.viewLines.visibleRangesForRange2(new Range(lineNumber, column, lineNumber, column)); diff --git a/src/vs/editor/browser/widget/media/editor.css b/src/vs/editor/browser/widget/media/editor.css index 90a691620e89e..e47af5c00c7fc 100644 --- a/src/vs/editor/browser/widget/media/editor.css +++ b/src/vs/editor/browser/widget/media/editor.css @@ -15,7 +15,7 @@ color: inherit; } -/* -------------------- Editor, inputarea and background -------------------- */ +/* -------------------- Editor -------------------- */ .monaco-editor { position: relative; @@ -29,40 +29,8 @@ -webkit-font-feature-settings: "liga" on, "calt" on; font-feature-settings: "liga" on, "calt" on; } -.monaco-editor .inputarea { - /*Chrome cannot handle typing in a 0x0 textarea*/ - width: 1px; - height: 1px; - min-width: 0; - min-height: 0; - margin: 0; - padding: 0; - position: absolute; - outline: none !important; - resize: none; - border: none; - overflow: hidden; -} -/*.monaco-editor .inputarea { - position: fixed !important; - width: 800px !important; - height: 200px !important; - top: initial !important; - left: initial !important; - bottom: 0 !important; - right: 0 !important; -}*/ -.monaco-editor.ff .inputarea, -.monaco-editor.ie .inputarea { - width: 0; - height: 0; -} -.monaco-editor.ime-input .inputarea { - z-index: 10; -} -.monaco-editor, -.monaco-editor .inputarea { +.monaco-editor { color: #333; /* * WORKAROUND: @@ -71,22 +39,14 @@ */ background: #fffffe; } -.monaco-editor.ime-input .inputarea { - background: rgba(255, 255, 255, 0.85); -} .monaco-editor.vs-dark, -.monaco-editor.vs-dark .inputarea, .monaco-editor.vs-dark .zone-widget .monaco-editor { color: #BBB; background: #1E1E1E; } -.monaco-editor.vs-dark.ime-input .inputarea { - background: rgba(0, 0, 0, 0.65); -} .monaco-editor.hc-black, -.monaco-editor.hc-black .inputarea, .monaco-editor.hc-black .zone-widget .monaco-editor { color: #fff; background: #000; diff --git a/src/vs/editor/common/view/editorColorRegistry.ts b/src/vs/editor/common/view/editorColorRegistry.ts index e6a96f190434f..1dd21ca5506a4 100644 --- a/src/vs/editor/common/view/editorColorRegistry.ts +++ b/src/vs/editor/common/view/editorColorRegistry.ts @@ -25,7 +25,7 @@ registerThemingParticipant((theme, collector) => { let background = theme.getColor(editorBackground); if (background) { - collector.addRule(`.monaco-editor.${theme.selector} .monaco-editor-background { background-color: ${background}; }`); + collector.addRule(`.monaco-editor.${theme.selector} .monaco-editor-background, .monaco-editor.${theme.selector} .inputarea { background-color: ${background}; }`); } let foreground = theme.getColor(editorForeground); if (foreground) { From 3782c32cff6565a22f39924404183fc04cad2f85 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 4 May 2017 14:01:33 +0200 Subject: [PATCH 0177/2747] Fix issue with Japanese IM in FF --- src/vs/base/common/strings.ts | 9 +++ .../browser/controller/textAreaHandler.ts | 77 ++++++++++--------- .../browser/controller/textAreaInput.ts | 10 +-- .../browser/controller/textAreaState.ts | 23 +++--- .../test/browser/controller/imeTester.ts | 6 +- .../browser/controller/textAreaState.test.ts | 62 +++++++-------- 6 files changed, 101 insertions(+), 86 deletions(-) diff --git a/src/vs/base/common/strings.ts b/src/vs/base/common/strings.ts index 85a902fd56b5a..ea4259e8f36b5 100644 --- a/src/vs/base/common/strings.ts +++ b/src/vs/base/common/strings.ts @@ -511,6 +511,15 @@ export function isBasicASCII(str: string): boolean { return IS_BASIC_ASCII.test(str); } +export function containsFullWidthCharacter(str: string): boolean { + for (let i = 0, len = str.length; i < len; i++) { + if (isFullWidthCharacter(str.charCodeAt(i))) { + return true; + } + } + return false; +} + export function isFullWidthCharacter(charCode: number): boolean { // Do a cheap trick to better support wrapping of wide characters, treat them as 2 columns // http://jrgraphix.net/research/unicode_blocks.php diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index 22bf4288df370..a7bb2de87726c 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -6,7 +6,6 @@ import 'vs/css!./textAreaHandler'; import * as browser from 'vs/base/browser/browser'; -import * as dom from 'vs/base/browser/dom'; import { TextAreaInput, ITextAreaInputHost, IPasteData, ICompositionData } from 'vs/editor/browser/controller/textAreaInput'; import { ISimpleModel, ITypeData, TextAreaState, IENarratorStrategy, NVDAPagedStrategy } from 'vs/editor/browser/controller/textAreaState'; import { Range } from 'vs/editor/common/core/range'; @@ -23,6 +22,7 @@ import { IKeyboardEvent } from "vs/base/browser/keyboardEvent"; import { PartFingerprints, PartFingerprint } from "vs/editor/browser/view/viewPart"; import { Margin } from "vs/editor/browser/viewParts/margin/margin"; import { LineNumbersOverlay } from "vs/editor/browser/viewParts/lineNumbers/lineNumbers"; +import { BareFontInfo } from "vs/editor/common/config/fontInfo"; export interface ITextAreaHandlerHelper { visibleRangeForPositionRelativeToEditor(lineNumber: number, column: number): HorizontalRange; @@ -41,11 +41,6 @@ class TextAreaVisiblePosition { } } -export const enum TextAreaStrategy { - IENarrator, - NVDA -} - export class TextAreaHandler extends ViewEventHandler { private readonly _context: ViewContext; @@ -163,14 +158,13 @@ export class TextAreaHandler extends ViewEventHandler { return TextAreaState.EMPTY; } - const strategy = this._getStrategy(); const selection = this._selections[0]; - if (strategy === TextAreaStrategy.IENarrator) { - return IENarratorStrategy.fromEditorSelection(currentState, simpleModel, selection); + if (this._context.configuration.editor.viewInfo.experimentalScreenReader) { + return NVDAPagedStrategy.fromEditorSelection(currentState, simpleModel, selection); } - return NVDAPagedStrategy.fromEditorSelection(currentState, simpleModel, selection); + return IENarratorStrategy.fromEditorSelection(currentState, simpleModel, selection); } }; @@ -240,19 +234,7 @@ export class TextAreaHandler extends ViewEventHandler { this.textArea.setWidth(0); } else { // adjust width by its size - let canvasElem = document.createElement('canvas'); - let context = canvasElem.getContext('2d'); - let cs = dom.getComputedStyle(this.textArea.domNode); - if (browser.isFirefox) { - // computedStyle.font is empty in Firefox... - context.font = `${cs.fontStyle} ${cs.fontVariant} ${cs.fontWeight} ${cs.fontStretch} ${cs.fontSize} / ${cs.lineHeight} ${cs.fontFamily}`; - let metrics = context.measureText(e.data); - this.textArea.setWidth(metrics.width + 2); // +2 for Japanese... - } else { - context.font = cs.font; - let metrics = context.measureText(e.data); - this.textArea.setWidth(metrics.width); - } + this.textArea.setWidth(measureText(e.data, this._context.configuration.editor.fontInfo)); } })); @@ -284,21 +266,6 @@ export class TextAreaHandler extends ViewEventHandler { super.dispose(); } - private _getStrategy(): TextAreaStrategy { - if (this._context.configuration.editor.viewInfo.experimentalScreenReader) { - return TextAreaStrategy.NVDA; - } - return TextAreaStrategy.IENarrator; - } - - public isFocused(): boolean { - return this._textAreaInput.isFocused(); - } - - public focusTextArea(): void { - this._textAreaInput.focusTextArea(); - } - // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { @@ -338,6 +305,14 @@ export class TextAreaHandler extends ViewEventHandler { // --- begin view API + public isFocused(): boolean { + return this._textAreaInput.isFocused(); + } + + public focusTextArea(): void { + this._textAreaInput.focusTextArea(); + } + public writeToTextArea(): void { this._textAreaInput.writeScreenReaderContent('selection changed'); } @@ -358,3 +333,29 @@ export class TextAreaHandler extends ViewEventHandler { // --- end view API } + +function measureText(text: string, fontInfo: BareFontInfo): number { + // adjust width by its size + const canvasElem = document.createElement('canvas'); + const context = canvasElem.getContext('2d'); + context.font = createFontString(fontInfo); + const metrics = context.measureText(text); + + if (browser.isFirefox) { + return metrics.width + 2; // +2 for Japanese... + } else { + return metrics.width; + } +} + +function createFontString(bareFontInfo: BareFontInfo): string { + return doCreateFontString('normal', bareFontInfo.fontWeight, bareFontInfo.fontSize, bareFontInfo.lineHeight, bareFontInfo.fontFamily); +} + +function doCreateFontString(fontStyle: string, fontWeight: string, fontSize: number, lineHeight: number, fontFamily: string): string { + // The full font syntax is: + // style | variant | weight | stretch | size/line-height | fontFamily + // (https://developer.mozilla.org/en-US/docs/Web/CSS/font) + // But it appears Edge and IE11 cannot properly parse `stretch`. + return `${fontStyle} normal ${fontWeight} ${fontSize}px / ${lineHeight}px ${fontFamily}`; +} diff --git a/src/vs/editor/browser/controller/textAreaInput.ts b/src/vs/editor/browser/controller/textAreaInput.ts index 7d921e1936c0e..ea20af1e43686 100644 --- a/src/vs/editor/browser/controller/textAreaInput.ts +++ b/src/vs/editor/browser/controller/textAreaInput.ts @@ -138,10 +138,10 @@ export class TextAreaInput extends Disposable { /** * Deduce the typed input from a text area's value and the last observed state. */ - const deduceInputFromTextAreaValue = (isDoingComposition: boolean): [TextAreaState, ITypeData] => { + const deduceInputFromTextAreaValue = (): [TextAreaState, ITypeData] => { const oldState = this._textAreaState; const newState = this._textAreaState.readFromTextArea(this._textArea); - return [newState, TextAreaState.deduceInput(oldState, newState, isDoingComposition)]; + return [newState, TextAreaState.deduceInput(oldState, newState)]; }; /** @@ -172,7 +172,7 @@ export class TextAreaInput extends Disposable { // Multi-part Japanese compositions reset cursor in Edge/IE, Chinese and Korean IME don't have this issue. // The reason that we can't use this path for all CJK IME is IE and Edge behave differently when handling Korean IME, // which breaks this path of code. - const [newState, typeInput] = deduceInputFromTextAreaValue(true); + const [newState, typeInput] = deduceInputFromTextAreaValue(); this._textAreaState = newState; this._onType.fire(typeInput); this._onCompositionUpdate.fire(e); @@ -189,7 +189,7 @@ export class TextAreaInput extends Disposable { // console.log('onCompositionEnd: ' + e.data); if (browser.isEdgeOrIE && e.locale === 'ja') { // https://github.com/Microsoft/monaco-editor/issues/339 - const [newState, typeInput] = deduceInputFromTextAreaValue(true); + const [newState, typeInput] = deduceInputFromTextAreaValue(); this._textAreaState = newState; this._onType.fire(typeInput); } @@ -231,7 +231,7 @@ export class TextAreaInput extends Disposable { return; } - const [newState, typeInput] = deduceInputFromTextAreaValue(false); + const [newState, typeInput] = deduceInputFromTextAreaValue(); if (typeInput.replaceCharCnt === 0 && typeInput.text.length === 1 && strings.isHighSurrogate(typeInput.text.charCodeAt(0))) { // Ignore invalid input but keep it around for next time return; diff --git a/src/vs/editor/browser/controller/textAreaState.ts b/src/vs/editor/browser/controller/textAreaState.ts index d66e788c53d1d..c9218a06db073 100644 --- a/src/vs/editor/browser/controller/textAreaState.ts +++ b/src/vs/editor/browser/controller/textAreaState.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { commonPrefixLength, commonSuffixLength } from 'vs/base/common/strings'; import { Range } from 'vs/editor/common/core/range'; import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; import { Constants } from 'vs/editor/common/core/uint'; +import * as strings from 'vs/base/common/strings'; export interface ITextAreaWrapper { getValue(): string; @@ -81,7 +81,7 @@ export class TextAreaState { return new TextAreaState(text, 0, text.length, 0); } - public static deduceInput(previousState: TextAreaState, currentState: TextAreaState, isDoingComposition: boolean): ITypeData { + public static deduceInput(previousState: TextAreaState, currentState: TextAreaState): ITypeData { if (!previousState) { // This is the EMPTY state return { @@ -104,13 +104,13 @@ export class TextAreaState { // Strip the previous suffix from the value (without interfering with the current selection) const previousSuffix = previousValue.substring(previousSelectionEnd); const currentSuffix = currentValue.substring(currentSelectionEnd); - const suffixLength = commonSuffixLength(previousSuffix, currentSuffix); + const suffixLength = strings.commonSuffixLength(previousSuffix, currentSuffix); currentValue = currentValue.substring(0, currentValue.length - suffixLength); previousValue = previousValue.substring(0, previousValue.length - suffixLength); const previousPrefix = previousValue.substring(0, previousSelectionStart); const currentPrefix = currentValue.substring(0, currentSelectionStart); - const prefixLength = commonPrefixLength(previousPrefix, currentPrefix); + const prefixLength = strings.commonPrefixLength(previousPrefix, currentPrefix); currentValue = currentValue.substring(prefixLength); previousValue = previousValue.substring(prefixLength); currentSelectionStart -= prefixLength; @@ -122,20 +122,21 @@ export class TextAreaState { // console.log('AFTER DIFFING PREVIOUS STATE: <' + previousValue + '>, selectionStart: ' + previousSelectionStart + ', selectionEnd: ' + previousSelectionEnd); if (currentSelectionStart === currentSelectionEnd) { - // composition accept case + // composition accept case (noticed in FF + Japanese) // [blahblah] => blahblah| if ( - isDoingComposition - && previousValue === currentValue + previousValue === currentValue && previousSelectionStart === 0 && previousSelectionEnd === previousValue.length && currentSelectionStart === currentValue.length && currentValue.indexOf('\n') === -1 ) { - return { - text: '', - replaceCharCnt: 0 - }; + if (strings.containsFullWidthCharacter(currentValue)) { + return { + text: '', + replaceCharCnt: 0 + }; + } } // no current selection diff --git a/src/vs/editor/test/browser/controller/imeTester.ts b/src/vs/editor/test/browser/controller/imeTester.ts index 63999ce1c14de..855ab7156b7a4 100644 --- a/src/vs/editor/test/browser/controller/imeTester.ts +++ b/src/vs/editor/test/browser/controller/imeTester.ts @@ -10,10 +10,14 @@ import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { createFastDomNode } from 'vs/base/browser/fastDomNode'; import * as browser from 'vs/base/browser/browser'; -import { TextAreaStrategy } from "vs/editor/browser/controller/textAreaHandler"; // To run this test, open imeTester.html +const enum TextAreaStrategy { + IENarrator, + NVDA +} + class SingleLineTestModel implements ISimpleModel { private _line: string; diff --git a/src/vs/editor/test/browser/controller/textAreaState.test.ts b/src/vs/editor/test/browser/controller/textAreaState.test.ts index 8cc54071934f8..ca8cad271a0cd 100644 --- a/src/vs/editor/test/browser/controller/textAreaState.test.ts +++ b/src/vs/editor/test/browser/controller/textAreaState.test.ts @@ -113,7 +113,7 @@ suite('TextAreaState', () => { textArea.dispose(); }); - function testDeduceInput(prevState: TextAreaState, value: string, selectionStart: number, selectionEnd: number, isDoingComposition: boolean, expected: string, expectedCharReplaceCnt: number): void { + function testDeduceInput(prevState: TextAreaState, value: string, selectionStart: number, selectionEnd: number, expected: string, expectedCharReplaceCnt: number): void { prevState = prevState || TextAreaState.EMPTY; let textArea = new MockTextAreaWrapper(); @@ -122,7 +122,7 @@ suite('TextAreaState', () => { textArea._selectionEnd = selectionEnd; let newState = prevState.readFromTextArea(textArea); - let actual = TextAreaState.deduceInput(prevState, newState, isDoingComposition); + let actual = TextAreaState.deduceInput(prevState, newState); assert.equal(actual.text, expected); assert.equal(actual.replaceCharCnt, expectedCharReplaceCnt); @@ -143,7 +143,7 @@ suite('TextAreaState', () => { testDeduceInput( TextAreaState.EMPTY, 's', - 0, 1, true, + 0, 1, 's', 0 ); @@ -153,7 +153,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('s', 0, 1, 0), 'せ', - 0, 1, true, + 0, 1, 'せ', 1 ); @@ -163,7 +163,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せ', 0, 1, 0), 'せn', - 0, 2, true, + 0, 2, 'せn', 1 ); @@ -173,7 +173,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せn', 0, 2, 0), 'せん', - 0, 2, true, + 0, 2, 'せん', 2 ); @@ -183,7 +183,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せん', 0, 2, 0), 'せんs', - 0, 3, true, + 0, 3, 'せんs', 2 ); @@ -193,7 +193,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せんs', 0, 3, 0), 'せんせ', - 0, 3, true, + 0, 3, 'せんせ', 3 ); @@ -203,7 +203,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せんせ', 0, 3, 0), 'せんせ', - 0, 3, true, + 0, 3, 'せんせ', 3 ); @@ -213,7 +213,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せんせ', 0, 3, 0), 'せんせい', - 0, 4, true, + 0, 4, 'せんせい', 3 ); @@ -223,7 +223,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せんせい', 0, 4, 0), 'せんせい', - 4, 4, true, + 4, 4, '', 0 ); }); @@ -242,7 +242,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せんせい', 0, 4, 0), 'せんせい', - 0, 4, true, + 0, 4, 'せんせい', 4 ); @@ -252,7 +252,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('せんせい', 0, 4, 0), '先生', - 0, 2, true, + 0, 2, '先生', 4 ); @@ -262,7 +262,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('先生', 0, 2, 0), '先生', - 2, 2, true, + 2, 2, '', 0 ); }); @@ -271,7 +271,7 @@ suite('TextAreaState', () => { testDeduceInput( null, 'a', - 0, 1, false, + 0, 1, 'a', 0 ); }); @@ -280,7 +280,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState(']\n', 1, 2, 0), ']\n', - 2, 2, false, + 2, 2, '\n', 0 ); }); @@ -289,7 +289,7 @@ suite('TextAreaState', () => { testDeduceInput( null, 'a', - 1, 1, false, + 1, 1, 'a', 0 ); }); @@ -298,7 +298,7 @@ suite('TextAreaState', () => { testDeduceInput( TextAreaState.EMPTY, 'a', - 0, 1, false, + 0, 1, 'a', 0 ); }); @@ -307,7 +307,7 @@ suite('TextAreaState', () => { testDeduceInput( TextAreaState.EMPTY, 'a', - 1, 1, false, + 1, 1, 'a', 0 ); }); @@ -316,7 +316,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 0, 12, 0), 'H', - 1, 1, false, + 1, 1, 'H', 0 ); }); @@ -325,7 +325,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 12, 12, 0), 'Hello world!a', - 13, 13, false, + 13, 13, 'a', 0 ); }); @@ -334,7 +334,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 0, 0, 0), 'aHello world!', - 1, 1, false, + 1, 1, 'a', 0 ); }); @@ -343,7 +343,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 6, 11, 0), 'Hello other!', - 11, 11, false, + 11, 11, 'other', 0 ); }); @@ -352,7 +352,7 @@ suite('TextAreaState', () => { testDeduceInput( TextAreaState.EMPTY, 'これは', - 3, 3, true, + 3, 3, 'これは', 0 ); }); @@ -361,7 +361,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 0, 0, 0), 'Aello world!', - 1, 1, false, + 1, 1, 'A', 0 ); }); @@ -370,7 +370,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 5, 5, 0), 'Hellö world!', - 4, 5, false, + 4, 5, 'ö', 0 ); }); @@ -379,7 +379,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 5, 5, 0), 'Hellöö world!', - 5, 5, false, + 5, 5, 'öö', 1 ); }); @@ -388,7 +388,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 5, 5, 0), 'Helöö world!', - 5, 5, false, + 5, 5, 'öö', 2 ); }); @@ -397,7 +397,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('Hello world!', 5, 5, 0), 'Hellö world!', - 5, 5, false, + 5, 5, 'ö', 1 ); }); @@ -406,7 +406,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('a', 0, 1, 0), 'a', - 1, 1, false, + 1, 1, 'a', 0 ); }); @@ -415,7 +415,7 @@ suite('TextAreaState', () => { testDeduceInput( new TextAreaState('x x', 0, 1, 0), 'x x', - 1, 1, false, + 1, 1, 'x', 0 ); }); From dcd784ee1662a9e1ee2a59839692d41d50b8a6ac Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 4 May 2017 15:51:09 +0200 Subject: [PATCH 0178/2747] adopt new loader, fixes #25229 --- src/vs/loader.js | 145 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 105 insertions(+), 40 deletions(-) diff --git a/src/vs/loader.js b/src/vs/loader.js index 93484a427e4c2..82f9afa1c3e5b 100644 --- a/src/vs/loader.js +++ b/src/vs/loader.js @@ -583,24 +583,86 @@ var AMDLoader; }()); var NodeScriptLoader = (function () { function NodeScriptLoader() { - this._initialized = false; + this._didInitialize = false; + this._didPatchNodeRequire = false; + // js-flags have an impact on cached data + this._jsflags = ''; + for (var _i = 0, _a = process.argv; _i < _a.length; _i++) { + var arg = _a[_i]; + if (arg.indexOf('--js-flags=') === 0) { + this._jsflags = arg; + break; + } + } } NodeScriptLoader.prototype._init = function (nodeRequire) { - if (this._initialized) { + if (this._didInitialize) { return; } - this._initialized = true; + this._didInitialize = true; this._fs = nodeRequire('fs'); this._vm = nodeRequire('vm'); this._path = nodeRequire('path'); this._crypto = nodeRequire('crypto'); }; + // patch require-function of nodejs such that we can manually create a script + // from cached data. this is done by overriding the `Module._compile` function + NodeScriptLoader.prototype._initNodeRequire = function (nodeRequire, moduleManager) { + var nodeCachedDataDir = moduleManager.getConfig().getOptionsLiteral().nodeCachedDataDir; + if (!nodeCachedDataDir || this._didPatchNodeRequire) { + return; + } + this._didPatchNodeRequire = true; + var that = this; + var Module = nodeRequire('module'); + function makeRequireFunction(mod) { + var Module = mod.constructor; + var require = function require(path) { + try { + return mod.require(path); + } + finally { + // nothing + } + }; + require.resolve = function resolve(request) { + return Module._resolveFilename(request, mod); + }; + require.main = process.mainModule; + require.extensions = Module._extensions; + require.cache = Module._cache; + return require; + } + Module.prototype._compile = function (content, filename) { + // remove shebang + content = content.replace(/^#!.*/, ''); + // create wrapper function + var wrapper = Module.wrap(content); + var cachedDataPath = that._getCachedDataPath(nodeCachedDataDir, filename); + var options = { filename: filename }; + try { + options.cachedData = that._fs.readFileSync(cachedDataPath); + } + catch (e) { + options.produceCachedData = true; + } + var script = new that._vm.Script(wrapper, options); + var compileWrapper = script.runInThisContext(options); + var dirname = that._path.dirname(filename); + var require = makeRequireFunction(this); + var args = [this.exports, require, this, filename, dirname, process, AMDLoader.global, Buffer]; + var result = compileWrapper.apply(this.exports, args); + that._processCachedData(moduleManager, script, cachedDataPath); + return result; + }; + }; NodeScriptLoader.prototype.load = function (moduleManager, scriptSrc, callback, errorback) { var _this = this; var opts = moduleManager.getConfig().getOptionsLiteral(); var nodeRequire = (opts.nodeRequire || AMDLoader.global.nodeRequire); var nodeInstrumenter = (opts.nodeInstrumenter || function (c) { return c; }); this._init(nodeRequire); + this._initNodeRequire(nodeRequire, moduleManager); var recorder = moduleManager.getRecorder(); if (/^node\|/.test(scriptSrc)) { var pieces = scriptSrc.split('|'); @@ -646,44 +708,16 @@ var AMDLoader; } else { var cachedDataPath_1 = _this._getCachedDataPath(opts.nodeCachedDataDir, scriptSrc); - _this._fs.readFile(cachedDataPath_1, function (err, data) { + _this._fs.readFile(cachedDataPath_1, function (err, cachedData) { // create script options - var scriptOptions = { + var options = { filename: vmScriptSrc, - produceCachedData: typeof data === 'undefined', - cachedData: data + produceCachedData: typeof cachedData === 'undefined', + cachedData: cachedData }; - var script = _this._loadAndEvalScript(scriptSrc, vmScriptSrc, contents, scriptOptions, recorder); + var script = _this._loadAndEvalScript(scriptSrc, vmScriptSrc, contents, options, recorder); callback(); - // cached code after math - if (script.cachedDataRejected) { - // data rejected => delete cache file - opts.onNodeCachedDataError({ - errorCode: 'cachedDataRejected', - path: cachedDataPath_1 - }); - NodeScriptLoader._runSoon(function () { return _this._fs.unlink(cachedDataPath_1, function (err) { - if (err) { - moduleManager.getConfig().getOptionsLiteral().onNodeCachedDataError({ - errorCode: 'unlink', - path: cachedDataPath_1, - detail: err - }); - } - }); }, opts.nodeCachedDataWriteDelay); - } - else if (script.cachedDataProduced) { - // data produced => write cache file - NodeScriptLoader._runSoon(function () { return _this._fs.writeFile(cachedDataPath_1, script.cachedData, function (err) { - if (err) { - moduleManager.getConfig().getOptionsLiteral().onNodeCachedDataError({ - errorCode: 'writeFile', - path: cachedDataPath_1, - detail: err - }); - } - }); }, opts.nodeCachedDataWriteDelay); - } + _this._processCachedData(moduleManager, script, cachedDataPath_1); }); } }); @@ -699,10 +733,41 @@ var AMDLoader; recorder.record(AMDLoader.LoaderEventType.NodeEndEvaluatingScript, scriptSrc); return script; }; - NodeScriptLoader.prototype._getCachedDataPath = function (baseDir, filename) { - var hash = this._crypto.createHash('md5').update(filename, 'utf8').digest('hex'); + NodeScriptLoader.prototype._getCachedDataPath = function (basedir, filename) { + var hash = this._crypto.createHash('md5').update(filename, 'utf8').update(this._jsflags, 'utf8').digest('hex'); var basename = this._path.basename(filename).replace(/\.js$/, ''); - return this._path.join(baseDir, hash + "-" + basename + ".code"); + return this._path.join(basedir, basename + "-" + hash + ".code"); + }; + NodeScriptLoader.prototype._processCachedData = function (moduleManager, script, cachedDataPath) { + var _this = this; + if (script.cachedDataRejected) { + // data rejected => delete cache file + moduleManager.getConfig().getOptionsLiteral().onNodeCachedDataError({ + errorCode: 'cachedDataRejected', + path: cachedDataPath + }); + NodeScriptLoader._runSoon(function () { return _this._fs.unlink(cachedDataPath, function (err) { + if (err) { + moduleManager.getConfig().getOptionsLiteral().onNodeCachedDataError({ + errorCode: 'unlink', + path: cachedDataPath, + detail: err + }); + } + }); }, moduleManager.getConfig().getOptionsLiteral().nodeCachedDataWriteDelay); + } + else if (script.cachedDataProduced) { + // data produced => write cache file + NodeScriptLoader._runSoon(function () { return _this._fs.writeFile(cachedDataPath, script.cachedData, function (err) { + if (err) { + moduleManager.getConfig().getOptionsLiteral().onNodeCachedDataError({ + errorCode: 'writeFile', + path: cachedDataPath, + detail: err + }); + } + }); }, moduleManager.getConfig().getOptionsLiteral().nodeCachedDataWriteDelay); + } }; NodeScriptLoader._runSoon = function (callback, minTimeout) { var timeout = minTimeout + Math.ceil(Math.random() * minTimeout); From 9554695a01428b8ea37213798a757fd8fdfb0faa Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 4 May 2017 16:03:02 +0200 Subject: [PATCH 0179/2747] Diff editor: avoid hardcoded modified-side shadow. Fixes #25625 --- src/vs/editor/browser/widget/diffEditorWidget.ts | 6 +++++- src/vs/editor/browser/widget/media/diffEditor.css | 3 --- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index 10a24f7f8ccee..d6fd59992d424 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -34,7 +34,7 @@ import { ColorId, MetadataConsts, FontStyle } from 'vs/editor/common/modes'; import Event, { Emitter } from 'vs/base/common/event'; import * as editorOptions from 'vs/editor/common/config/editorOptions'; import { registerThemingParticipant, IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; -import { registerColor } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, scrollbarShadow } from 'vs/platform/theme/common/colorRegistry'; import { Color, RGBA } from 'vs/base/common/color'; import { OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; @@ -1979,4 +1979,8 @@ registerThemingParticipant((theme, collector) => { if (removedOutline) { collector.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px dashed ${removedOutline}; }`); } + let shadow = theme.getColor(scrollbarShadow); + if (shadow) { + collector.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${shadow}; }`); + } }); \ No newline at end of file diff --git a/src/vs/editor/browser/widget/media/diffEditor.css b/src/vs/editor/browser/widget/media/diffEditor.css index 0c1bb226785a7..76d1969cddcab 100644 --- a/src/vs/editor/browser/widget/media/diffEditor.css +++ b/src/vs/editor/browser/widget/media/diffEditor.css @@ -31,9 +31,6 @@ .modified-in-monaco-diff-editor .slider.active { background: rgba(171, 171, 171, .4); } .modified-in-monaco-diff-editor.hc-black .slider.active { background: none; } -.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px #DDD; } -.monaco-diff-editor.side-by-side.vs-dark .editor.modified { box-shadow: -6px 0 5px -5px black; } - /* ---------- Diff ---------- */ .monaco-editor .insert-sign, .monaco-editor .delete-sign { From af6f8aa748e7cc5b53a2953df2f43c38db215e45 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 4 May 2017 16:04:30 +0200 Subject: [PATCH 0180/2747] clean up #24950 --- extensions/git/package.json | 4 ++-- extensions/git/package.nls.json | 2 +- extensions/git/src/commands.ts | 4 ++-- .../workbench/parts/git/browser/gitWorkbenchContributions.ts | 5 ----- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index e6e7d350c4567..9bbce1ea3710f 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -609,10 +609,10 @@ "description": "%config.ignoreLimitWarning%", "default": false }, - "git.cloneDirectory": { + "git.defaultCloneDirectory": { "type": "string", "default": null, - "description": "%config.cloneDirectory%" + "description": "%config.defaultCloneDirectory%" } } } diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index 270283993d4a1..81188ab18a386 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -38,5 +38,5 @@ "config.checkoutType": "Controls what type of branches are listed when running `Checkout to...`. `all` shows all refs, `local` shows only the local branchs, `tags` shows only tags and `remote` shows only remote branches.", "config.ignoreLegacyWarning": "Ignores the legacy Git warning", "config.ignoreLimitWarning": "Ignores the warning when there are too many changes in a repository", - "config.cloneDirectory": "When cloning a new repository, the default location will be set to this directory" + "config.defaultCloneDirectory": "The default location where to clone a git repository" } \ No newline at end of file diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index a938cb31197e1..5f2ea323c1c1f 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -203,11 +203,11 @@ export class CommandCenter { } const config = workspace.getConfiguration('git'); - const cloneDirectory = config.get('cloneDirectory') || os.homedir(); + const value = config.get('defaultCloneDirectory') || os.homedir(); const parentPath = await window.showInputBox({ prompt: localize('parent', "Parent Directory"), - value: cloneDirectory, + value, ignoreFocusOut: true }); diff --git a/src/vs/workbench/parts/git/browser/gitWorkbenchContributions.ts b/src/vs/workbench/parts/git/browser/gitWorkbenchContributions.ts index 0bdf195f96c11..e35495db43325 100644 --- a/src/vs/workbench/parts/git/browser/gitWorkbenchContributions.ts +++ b/src/vs/workbench/parts/git/browser/gitWorkbenchContributions.ts @@ -235,11 +235,6 @@ export function registerContributions(): void { enum: ['all', 'local', 'tags', 'remote'], default: 'all', description: nls.localize('checkoutType', "Controls what type of branches are listed."), - }, - 'git.cloneDirectory': { - type: 'string', - default: null, - description: nls.localize('cloneDirectory', "When cloning a new repository, the default location will be set to this directory."), } } }); From 00cbee4bbf66290b81eb737367016586bfbdba25 Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 4 May 2017 15:23:43 +0200 Subject: [PATCH 0181/2747] debug: remove heuristic for evaluate name fixes #25166 --- .../parts/debug/common/debugModel.ts | 33 +------------------ 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index d1189a6d8cebe..4326c55e2d840 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -250,15 +250,13 @@ export class Variable extends ExpressionContainer implements IExpression { // Used to show the error message coming from the adapter when setting the value #7807 public errorMessage: string; - private static NOT_PROPERTY_SYNTAX = /^[a-zA-Z_][a-zA-Z0-9_]*$/; - private static ARRAY_ELEMENT_SYNTAX = /\[.*\]$/; constructor( process: IProcess, public parent: IExpressionContainer, reference: number, public name: string, - private _evaluateName: string, + public evaluateName: string, value: string, namedVariables: number, indexedVariables: number, @@ -270,35 +268,6 @@ export class Variable extends ExpressionContainer implements IExpression { this.value = value; } - public get evaluateName(): string { - if (this._evaluateName) { - return this._evaluateName; - } - - // TODO@Isidor get rid of this ugly heuristic - let names = [this.name]; - let v = this.parent; - while (v instanceof Variable || v instanceof Expression) { - names.push((v).name); - v = (v).parent; - } - names = names.reverse(); - - let result = null; - names.forEach(name => { - if (!result) { - result = name; - } else if (Variable.ARRAY_ELEMENT_SYNTAX.test(name) || (this.process.configuration.type === 'node' && !Variable.NOT_PROPERTY_SYNTAX.test(name))) { - // use safe way to access node properties a['property_name']. Also handles array elements. - result = name && name.indexOf('[') === 0 ? `${result}${name}` : `${result}['${name}']`; - } else { - result = `${result}.${name}`; - } - }); - - return result; - } - public setVariable(value: string): TPromise { return this.process.session.setVariable({ name: this.name, From b7bb7dd96cd46e313cd914da94f70fd1dca63db6 Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 4 May 2017 15:35:16 +0200 Subject: [PATCH 0182/2747] Only show context menu on "real" variables. Not on array chunk nodes. fixes #25147 --- src/vs/workbench/parts/debug/electron-browser/debugViewer.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index b91233d73072c..7bde56e351149 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -589,7 +589,8 @@ export class VariablesActionProvider implements IActionProvider { } public hasSecondaryActions(tree: ITree, element: any): boolean { - return element instanceof Variable; + // Only show context menu on "real" variables. Not on array chunk nodes. + return element instanceof Variable && !!element.value; } public getSecondaryActions(tree: ITree, element: any): TPromise { From 1cc913fcaf71d2e960afee6247367c13d8ef62c3 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 4 May 2017 16:08:54 +0200 Subject: [PATCH 0183/2747] merge extension config contribution --- .../electron-browser/extensions.contribution.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts index 1e3629f42b123..827ae6984e184 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts @@ -165,17 +165,7 @@ Registry.as(ConfigurationExtensions.Configuration) type: 'boolean', description: localize('extensionsAutoUpdate', "Automatically update extensions"), default: false - } - } - }); - -Registry.as(ConfigurationExtensions.Configuration) - .registerConfiguration({ - id: 'extensions', - order: 30, - title: localize('extensionsConfigurationTitle', "Extensions"), - type: 'object', - properties: { + }, 'extensions.ignoreRecommendations': { type: 'boolean', description: localize('extensionsIgnoreRecommendations', "Ignore extension recommendations"), From 0380d85f0fca371c35f44a99c74147dc654278d7 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 4 May 2017 16:13:27 +0200 Subject: [PATCH 0184/2747] cleanup --- .../electron-browser/extensionTipsService.ts | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts index 80de571917d67..78bf2b91c7135 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts @@ -157,8 +157,10 @@ export class ExtensionTipsService implements IExtensionTipsService { JSON.stringify(Object.keys(this._recommendations)), StorageScope.GLOBAL ); - const ignoreSuggestions = this.getIgnoreRecommendationsConfig(); - if (ignoreSuggestions) { + + const config = this.configurationService.getConfiguration(ConfigurationKey); + + if (config.ignoreRecommendations) { return; } @@ -205,11 +207,11 @@ export class ExtensionTipsService implements IExtensionTipsService { return; } - const ignoreSuggestions = this.getIgnoreRecommendationsConfig(); - if (ignoreSuggestions) { + const config = this.configurationService.getConfiguration(ConfigurationKey); + + if (config.ignoreRecommendations) { return; } - this.getWorkspaceRecommendations().done(allRecommendations => { if (!allRecommendations.length) { return; @@ -250,7 +252,7 @@ export class ExtensionTipsService implements IExtensionTipsService { localize('cancel', "Cancel") ]; - this.choiceService.choose(Severity.Info, message, options).done(choice => { + this.choiceService.choose(Severity.Info, message, options, 2).done(choice => { switch (choice) { case 0: // If the user ignores the current message and selects different file type // we should hide all the stacked up messages as he has selected Yes, Ignore All @@ -273,11 +275,6 @@ export class ExtensionTipsService implements IExtensionTipsService { } } - getIgnoreRecommendationsConfig(): boolean { - const config = this.configurationService.getConfiguration(ConfigurationKey); - return config.ignoreRecommendations ? true : false; - } - getKeywordsForExtension(extension: string): string[] { const keywords = product.extensionKeywords || {}; return keywords[extension] || []; From 127b909c1083215df409f7ec372caefc56a3883a Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 4 May 2017 16:22:19 +0200 Subject: [PATCH 0185/2747] some api test love --- .../src/configuration.test.ts | 29 +- .../vscode-api-tests/src/workspace.test.ts | 294 ++++++++---------- 2 files changed, 159 insertions(+), 164 deletions(-) diff --git a/extensions/vscode-api-tests/src/configuration.test.ts b/extensions/vscode-api-tests/src/configuration.test.ts index 8b063ae4c7819..65dc52e453783 100644 --- a/extensions/vscode-api-tests/src/configuration.test.ts +++ b/extensions/vscode-api-tests/src/configuration.test.ts @@ -8,7 +8,7 @@ import * as vscode from 'vscode'; suite('Configuration tests', () => { - test('Default configurations', function () { + test('configurations, language defaults', function () { const defaultLanguageSettings = vscode.workspace.getConfiguration().get('[abcLang]'); assert.deepEqual(defaultLanguageSettings, { @@ -17,4 +17,29 @@ suite('Configuration tests', () => { }); }); -}); \ No newline at end of file + test('configuration, defaults', () => { + const config = vscode.workspace.getConfiguration('farboo'); + + assert.ok(config.has('config0')); + assert.equal(config.get('config0'), true); + assert.equal(config.get('config4'), ''); + assert.equal(config['config0'], true); + assert.equal(config['config4'], ''); + + assert.throws(() => (config)['config4'] = 'valuevalue'); + + assert.ok(config.has('nested.config1')); + assert.equal(config.get('nested.config1'), 42); + assert.ok(config.has('nested.config2')); + assert.equal(config.get('nested.config2'), 'Das Pferd frisst kein Reis.'); + }); + + test('configuration, name vs property', () => { + const config = vscode.workspace.getConfiguration('farboo'); + + assert.ok(config.has('get')); + assert.equal(config.get('get'), 'get-prop'); + assert.deepEqual(config['get'], config.get); + assert.throws(() => config['get'] = 'get-prop'); + }); +}); diff --git a/extensions/vscode-api-tests/src/workspace.test.ts b/extensions/vscode-api-tests/src/workspace.test.ts index 31303542fad61..54aaa0f796293 100644 --- a/extensions/vscode-api-tests/src/workspace.test.ts +++ b/extensions/vscode-api-tests/src/workspace.test.ts @@ -6,7 +6,7 @@ 'use strict'; import * as assert from 'assert'; -import { workspace, TextDocument, window, Position, Uri, EventEmitter, WorkspaceEdit, Disposable, EndOfLine } from 'vscode'; +import * as vscode from 'vscode'; import { createRandomFile, deleteFile, cleanUp, pathEquals } from './utils'; import { join, basename } from 'path'; import * as fs from 'fs'; @@ -15,59 +15,29 @@ suite('workspace-namespace', () => { teardown(cleanUp); - test('configuration, defaults', () => { - const config = workspace.getConfiguration('farboo'); - - assert.ok(config.has('config0')); - assert.equal(config.get('config0'), true); - assert.equal(config.get('config4'), ''); - assert.equal(config['config0'], true); - assert.equal(config['config4'], ''); - - assert.throws(() => (config)['config4'] = 'valuevalue'); - - assert.ok(config.has('nested.config1')); - assert.equal(config.get('nested.config1'), 42); - assert.ok(config.has('nested.config2')); - assert.equal(config.get('nested.config2'), 'Das Pferd frisst kein Reis.'); - }); - - test('configuration, name vs property', () => { - const config = workspace.getConfiguration('farboo'); - - assert.ok(config.has('get')); - assert.equal(config.get('get'), 'get-prop'); - assert.deepEqual(config['get'], config.get); - assert.throws(() => config['get'] = 'get-prop'); - }); - - // test('configuration, getConfig/value', () => { - // const value = workspace.getConfiguration('farboo.config0'); - // assert.equal(Object.keys(value).length, 3); - // }); test('textDocuments', () => { - assert.ok(Array.isArray(workspace.textDocuments)); - assert.throws(() => (workspace).textDocuments = null); + assert.ok(Array.isArray(vscode.workspace.textDocuments)); + assert.throws(() => (vscode.workspace).textDocuments = null); }); test('rootPath', () => { - if (workspace.rootPath) { - assert.ok(pathEquals(workspace.rootPath, join(__dirname, '../testWorkspace'))); + if (vscode.workspace.rootPath) { + assert.ok(pathEquals(vscode.workspace.rootPath, join(__dirname, '../testWorkspace'))); } - assert.throws(() => workspace.rootPath = 'farboo'); + assert.throws(() => vscode.workspace.rootPath = 'farboo'); }); test('openTextDocument', () => { - let len = workspace.textDocuments.length; - return workspace.openTextDocument(join(workspace.rootPath || '', './simple.txt')).then(doc => { + let len = vscode.workspace.textDocuments.length; + return vscode.workspace.openTextDocument(join(vscode.workspace.rootPath || '', './simple.txt')).then(doc => { assert.ok(doc); - assert.equal(workspace.textDocuments.length, len + 1); + assert.equal(vscode.workspace.textDocuments.length, len + 1); }); }); test('openTextDocument, illegal path', () => { - return workspace.openTextDocument('funkydonky.txt').then(doc => { + return vscode.workspace.openTextDocument('funkydonky.txt').then(doc => { throw new Error('missing error'); }, err => { // good! @@ -75,28 +45,28 @@ suite('workspace-namespace', () => { }); test('openTextDocument, untitled is dirty', function () { - return workspace.openTextDocument(Uri.parse('untitled:' + join(workspace.rootPath || '', './newfile.txt'))).then(doc => { + return vscode.workspace.openTextDocument(vscode.Uri.parse('untitled:' + join(vscode.workspace.rootPath || '', './newfile.txt'))).then(doc => { assert.equal(doc.uri.scheme, 'untitled'); assert.ok(doc.isDirty); }); }); test('openTextDocument, untitled with host', function () { - const uri = Uri.parse('untitled://localhost/c%24/Users/jrieken/code/samples/foobar.txt'); - return workspace.openTextDocument(uri).then(doc => { + const uri = vscode.Uri.parse('untitled://localhost/c%24/Users/jrieken/code/samples/foobar.txt'); + return vscode.workspace.openTextDocument(uri).then(doc => { assert.equal(doc.uri.scheme, 'untitled'); }); }); test('openTextDocument, untitled without path', function () { - return workspace.openTextDocument().then(doc => { + return vscode.workspace.openTextDocument().then(doc => { assert.equal(doc.uri.scheme, 'untitled'); assert.ok(doc.isDirty); }); }); test('openTextDocument, untitled without path but language ID', function () { - return workspace.openTextDocument({ language: 'xml' }).then(doc => { + return vscode.workspace.openTextDocument({ language: 'xml' }).then(doc => { assert.equal(doc.uri.scheme, 'untitled'); assert.equal(doc.languageId, 'xml'); assert.ok(doc.isDirty); @@ -104,7 +74,7 @@ suite('workspace-namespace', () => { }); test('openTextDocument, untitled without path but language ID and content', function () { - return workspace.openTextDocument({ language: 'html', content: '

Hello world!

' }).then(doc => { + return vscode.workspace.openTextDocument({ language: 'html', content: '

Hello world!

' }).then(doc => { assert.equal(doc.uri.scheme, 'untitled'); assert.equal(doc.languageId, 'html'); assert.ok(doc.isDirty); @@ -113,16 +83,16 @@ suite('workspace-namespace', () => { }); test('openTextDocument, untitled closes on save', function (done) { - const path = join(workspace.rootPath || '', './newfile.txt'); + const path = join(vscode.workspace.rootPath || '', './newfile.txt'); - return workspace.openTextDocument(Uri.parse('untitled:' + path)).then(doc => { + return vscode.workspace.openTextDocument(vscode.Uri.parse('untitled:' + path)).then(doc => { assert.equal(doc.uri.scheme, 'untitled'); assert.ok(doc.isDirty); - let closed: TextDocument; - let d0 = workspace.onDidCloseTextDocument(e => closed = e); + let closed: vscode.TextDocument; + let d0 = vscode.workspace.onDidCloseTextDocument(e => closed = e); - return window.showTextDocument(doc).then(() => { + return vscode.window.showTextDocument(doc).then(() => { return doc.save().then(() => { assert.ok(closed === doc); assert.ok(!doc.isDirty); @@ -130,7 +100,7 @@ suite('workspace-namespace', () => { d0.dispose(); - return deleteFile(Uri.file(join(workspace.rootPath || '', './newfile.txt'))).then(() => done(null)); + return deleteFile(vscode.Uri.file(join(vscode.workspace.rootPath || '', './newfile.txt'))).then(() => done(null)); }); }); @@ -139,22 +109,22 @@ suite('workspace-namespace', () => { test('openTextDocument, uri scheme/auth/path', function () { - let registration = workspace.registerTextDocumentContentProvider('sc', { + let registration = vscode.workspace.registerTextDocumentContentProvider('sc', { provideTextDocumentContent() { return 'SC'; } }); return Promise.all([ - workspace.openTextDocument(Uri.parse('sc://auth')).then(doc => { + vscode.workspace.openTextDocument(vscode.Uri.parse('sc://auth')).then(doc => { assert.equal(doc.uri.authority, 'auth'); assert.equal(doc.uri.path, ''); }), - workspace.openTextDocument(Uri.parse('sc:///path')).then(doc => { + vscode.workspace.openTextDocument(vscode.Uri.parse('sc:///path')).then(doc => { assert.equal(doc.uri.authority, ''); assert.equal(doc.uri.path, '/path'); }), - workspace.openTextDocument(Uri.parse('sc://auth/path')).then(doc => { + vscode.workspace.openTextDocument(vscode.Uri.parse('sc://auth/path')).then(doc => { assert.equal(doc.uri.authority, 'auth'); assert.equal(doc.uri.path, '/path'); }) @@ -165,110 +135,110 @@ suite('workspace-namespace', () => { test('eol, read', () => { const a = createRandomFile('foo\nbar\nbar').then(file => { - return workspace.openTextDocument(file).then(doc => { - assert.equal(doc.eol, EndOfLine.LF); + return vscode.workspace.openTextDocument(file).then(doc => { + assert.equal(doc.eol, vscode.EndOfLine.LF); }); }); const b = createRandomFile('foo\nbar\nbar\r\nbaz').then(file => { - return workspace.openTextDocument(file).then(doc => { - assert.equal(doc.eol, EndOfLine.LF); + return vscode.workspace.openTextDocument(file).then(doc => { + assert.equal(doc.eol, vscode.EndOfLine.LF); }); }); const c = createRandomFile('foo\r\nbar\r\nbar').then(file => { - return workspace.openTextDocument(file).then(doc => { - assert.equal(doc.eol, EndOfLine.CRLF); + return vscode.workspace.openTextDocument(file).then(doc => { + assert.equal(doc.eol, vscode.EndOfLine.CRLF); }); }); return Promise.all([a, b, c]); }); - // test('eol, change via editor', () => { - // return createRandomFile('foo\nbar\nbar').then(file => { - // return workspace.openTextDocument(file).then(doc => { - // assert.equal(doc.eol, EndOfLine.LF); - // return window.showTextDocument(doc).then(editor => { - // return editor.edit(builder => builder.setEndOfLine(EndOfLine.CRLF)); - - // }).then(value => { - // assert.ok(value); - // assert.ok(doc.isDirty); - // assert.equal(doc.eol, EndOfLine.CRLF); - // }); - // }); - // }); - // }); + test('eol, change via editor', () => { + return createRandomFile('foo\nbar\nbar').then(file => { + return vscode.workspace.openTextDocument(file).then(doc => { + assert.equal(doc.eol, vscode.EndOfLine.LF); + return vscode.window.showTextDocument(doc).then(editor => { + return editor.edit(builder => builder.setEndOfLine(vscode.EndOfLine.CRLF)); + + }).then(value => { + assert.ok(value); + assert.ok(doc.isDirty); + assert.equal(doc.eol, vscode.EndOfLine.CRLF); + }); + }); + }); + }); - // test('eol, change via applyEdit', () => { - // return createRandomFile('foo\nbar\nbar').then(file => { - // return workspace.openTextDocument(file).then(doc => { - // assert.equal(doc.eol, EndOfLine.LF); - - // const edit = new WorkspaceEdit(); - // edit.set(file, [TextEdit.setEndOfLine(EndOfLine.CRLF)]); - // return workspace.applyEdit(edit).then(value => { - // assert.ok(value); - // assert.ok(doc.isDirty); - // assert.equal(doc.eol, EndOfLine.CRLF); - // }); - // }); - // }); - // }); + test('eol, change via applyEdit', () => { + return createRandomFile('foo\nbar\nbar').then(file => { + return vscode.workspace.openTextDocument(file).then(doc => { + assert.equal(doc.eol, vscode.EndOfLine.LF); + + const edit = new vscode.WorkspaceEdit(); + edit.set(file, [vscode.TextEdit.setEndOfLine(vscode.EndOfLine.CRLF)]); + return vscode.workspace.applyEdit(edit).then(value => { + assert.ok(value); + assert.ok(doc.isDirty); + assert.equal(doc.eol, vscode.EndOfLine.CRLF); + }); + }); + }); + }); - // test('eol, change via onWillSave', () => { + test('eol, change via onWillSave', () => { - // let called = false; - // let sub = workspace.onWillSaveTextDocument(e => { - // called = true; - // e.waitUntil(Promise.resolve([TextEdit.setEndOfLine(EndOfLine.LF)])); - // }); + let called = false; + let sub = vscode.workspace.onWillSaveTextDocument(e => { + called = true; + e.waitUntil(Promise.resolve([vscode.TextEdit.setEndOfLine(vscode.EndOfLine.LF)])); + }); - // return createRandomFile('foo\r\nbar\r\nbar').then(file => { - // return workspace.openTextDocument(file).then(doc => { - // assert.equal(doc.eol, EndOfLine.CRLF); - // const edit = new WorkspaceEdit(); - // edit.set(file, [TextEdit.insert(new Position(0, 0), '-changes-')]); - - // return workspace.applyEdit(edit).then(success => { - // assert.ok(success); - // return doc.save(); - - // }).then(success => { - // assert.ok(success); - // assert.ok(called); - // assert.ok(!doc.isDirty); - // assert.equal(doc.eol, EndOfLine.LF); - // sub.dispose(); - // }); - // }); - // }); - // }); + return createRandomFile('foo\r\nbar\r\nbar').then(file => { + return vscode.workspace.openTextDocument(file).then(doc => { + assert.equal(doc.eol, vscode.EndOfLine.CRLF); + const edit = new vscode.WorkspaceEdit(); + edit.set(file, [vscode.TextEdit.insert(new vscode.Position(0, 0), '-changes-')]); + + return vscode.workspace.applyEdit(edit).then(success => { + assert.ok(success); + return doc.save(); + + }).then(success => { + assert.ok(success); + assert.ok(called); + assert.ok(!doc.isDirty); + assert.equal(doc.eol, vscode.EndOfLine.LF); + sub.dispose(); + }); + }); + }); + }); test('events: onDidOpenTextDocument, onDidChangeTextDocument, onDidSaveTextDocument', () => { return createRandomFile().then(file => { - let disposables: Disposable[] = []; + let disposables: vscode.Disposable[] = []; let onDidOpenTextDocument = false; - disposables.push(workspace.onDidOpenTextDocument(e => { + disposables.push(vscode.workspace.onDidOpenTextDocument(e => { assert.ok(pathEquals(e.uri.fsPath, file.fsPath)); onDidOpenTextDocument = true; })); let onDidChangeTextDocument = false; - disposables.push(workspace.onDidChangeTextDocument(e => { + disposables.push(vscode.workspace.onDidChangeTextDocument(e => { assert.ok(pathEquals(e.document.uri.fsPath, file.fsPath)); onDidChangeTextDocument = true; })); let onDidSaveTextDocument = false; - disposables.push(workspace.onDidSaveTextDocument(e => { + disposables.push(vscode.workspace.onDidSaveTextDocument(e => { assert.ok(pathEquals(e.uri.fsPath, file.fsPath)); onDidSaveTextDocument = true; })); - return workspace.openTextDocument(file).then(doc => { - return window.showTextDocument(doc).then((editor) => { + return vscode.workspace.openTextDocument(file).then(doc => { + return vscode.window.showTextDocument(doc).then((editor) => { return editor.edit((builder) => { - builder.insert(new Position(0, 0), 'Hello World'); + builder.insert(new vscode.Position(0, 0), 'Hello World'); }).then(applied => { return doc.save().then(saved => { assert.ok(onDidOpenTextDocument); @@ -292,14 +262,14 @@ suite('workspace-namespace', () => { test('registerTextDocumentContentProvider, simple', function () { - let registration = workspace.registerTextDocumentContentProvider('foo', { + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri) { return uri.toString(); } }); - const uri = Uri.parse('foo://testing/virtual.js'); - return workspace.openTextDocument(uri).then(doc => { + const uri = vscode.Uri.parse('foo://testing/virtual.js'); + return vscode.workspace.openTextDocument(uri).then(doc => { assert.equal(doc.getText(), uri.toString()); assert.equal(doc.isDirty, false); assert.equal(doc.uri.toString(), uri.toString()); @@ -311,15 +281,15 @@ suite('workspace-namespace', () => { // built-in assert.throws(function () { - workspace.registerTextDocumentContentProvider('untitled', { provideTextDocumentContent() { return null; } }); + vscode.workspace.registerTextDocumentContentProvider('untitled', { provideTextDocumentContent() { return null; } }); }); // built-in assert.throws(function () { - workspace.registerTextDocumentContentProvider('file', { provideTextDocumentContent() { return null; } }); + vscode.workspace.registerTextDocumentContentProvider('file', { provideTextDocumentContent() { return null; } }); }); // missing scheme - return workspace.openTextDocument(Uri.parse('notThere://foo/far/boo/bar')).then(() => { + return vscode.workspace.openTextDocument(vscode.Uri.parse('notThere://foo/far/boo/bar')).then(() => { assert.ok(false, 'expected failure'); }, err => { // expected @@ -329,14 +299,14 @@ suite('workspace-namespace', () => { test('registerTextDocumentContentProvider, multiple', function () { // duplicate registration - let registration1 = workspace.registerTextDocumentContentProvider('foo', { + let registration1 = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri) { if (uri.authority === 'foo') { return '1'; } } }); - let registration2 = workspace.registerTextDocumentContentProvider('foo', { + let registration2 = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri) { if (uri.authority === 'bar') { return '2'; @@ -345,8 +315,8 @@ suite('workspace-namespace', () => { }); return Promise.all([ - workspace.openTextDocument(Uri.parse('foo://foo/bla')).then(doc => { assert.equal(doc.getText(), '1'); }), - workspace.openTextDocument(Uri.parse('foo://bar/bla')).then(doc => { assert.equal(doc.getText(), '2'); }) + vscode.workspace.openTextDocument(vscode.Uri.parse('foo://foo/bla')).then(doc => { assert.equal(doc.getText(), '1'); }), + vscode.workspace.openTextDocument(vscode.Uri.parse('foo://bar/bla')).then(doc => { assert.equal(doc.getText(), '2'); }) ]).then(() => { registration1.dispose(); registration2.dispose(); @@ -356,18 +326,18 @@ suite('workspace-namespace', () => { test('registerTextDocumentContentProvider, evil provider', function () { // duplicate registration - let registration1 = workspace.registerTextDocumentContentProvider('foo', { + let registration1 = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri) { return '1'; } }); - let registration2 = workspace.registerTextDocumentContentProvider('foo', { + let registration2 = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri): string { throw new Error('fail'); } }); - return workspace.openTextDocument(Uri.parse('foo://foo/bla')).then(doc => { + return vscode.workspace.openTextDocument(vscode.Uri.parse('foo://foo/bla')).then(doc => { assert.equal(doc.getText(), '1'); registration1.dispose(); registration2.dispose(); @@ -376,12 +346,12 @@ suite('workspace-namespace', () => { test('registerTextDocumentContentProvider, invalid text', function () { - let registration = workspace.registerTextDocumentContentProvider('foo', { + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri) { return 123; } }); - return workspace.openTextDocument(Uri.parse('foo://auth/path')).then(() => { + return vscode.workspace.openTextDocument(vscode.Uri.parse('foo://auth/path')).then(() => { assert.ok(false, 'expected failure'); }, err => { // expected @@ -391,14 +361,14 @@ suite('workspace-namespace', () => { test('registerTextDocumentContentProvider, show virtual document', function () { - let registration = workspace.registerTextDocumentContentProvider('foo', { + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri) { return 'I am virtual'; } }); - return workspace.openTextDocument(Uri.parse('foo://something/path')).then(doc => { - return window.showTextDocument(doc).then(editor => { + return vscode.workspace.openTextDocument(vscode.Uri.parse('foo://something/path')).then(doc => { + return vscode.window.showTextDocument(doc).then(editor => { assert.ok(editor.document === doc); assert.equal(editor.document.getText(), 'I am virtual'); @@ -410,19 +380,19 @@ suite('workspace-namespace', () => { test('registerTextDocumentContentProvider, open/open document', function () { let callCount = 0; - let registration = workspace.registerTextDocumentContentProvider('foo', { + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri) { callCount += 1; return 'I am virtual'; } }); - const uri = Uri.parse('foo://testing/path'); + const uri = vscode.Uri.parse('foo://testing/path'); - return Promise.all([workspace.openTextDocument(uri), workspace.openTextDocument(uri)]).then(docs => { + return Promise.all([vscode.workspace.openTextDocument(uri), vscode.workspace.openTextDocument(uri)]).then(docs => { let [first, second] = docs; assert.ok(first === second); - assert.ok(workspace.textDocuments.some(doc => doc.uri.toString() === uri.toString())); + assert.ok(vscode.workspace.textDocuments.some(doc => doc.uri.toString() === uri.toString())); assert.equal(callCount, 1); registration.dispose(); }); @@ -430,15 +400,15 @@ suite('workspace-namespace', () => { test('registerTextDocumentContentProvider, empty doc', function () { - let registration = workspace.registerTextDocumentContentProvider('foo', { + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { provideTextDocumentContent(uri) { return ''; } }); - const uri = Uri.parse('foo:doc/empty'); + const uri = vscode.Uri.parse('foo:doc/empty'); - return workspace.openTextDocument(uri).then(doc => { + return vscode.workspace.openTextDocument(uri).then(doc => { assert.equal(doc.getText(), ''); assert.equal(doc.uri.toString(), uri.toString()); registration.dispose(); @@ -448,25 +418,25 @@ suite('workspace-namespace', () => { test('registerTextDocumentContentProvider, change event', function () { let callCount = 0; - let emitter = new EventEmitter(); + let emitter = new vscode.EventEmitter(); - let registration = workspace.registerTextDocumentContentProvider('foo', { + let registration = vscode.workspace.registerTextDocumentContentProvider('foo', { onDidChange: emitter.event, provideTextDocumentContent(uri) { return 'call' + (callCount++); } }); - const uri = Uri.parse('foo://testing/path3'); + const uri = vscode.Uri.parse('foo://testing/path3'); - return workspace.openTextDocument(uri).then(doc => { + return vscode.workspace.openTextDocument(uri).then(doc => { assert.equal(callCount, 1); assert.equal(doc.getText(), 'call0'); return new Promise((resolve, reject) => { - let subscription = workspace.onDidChangeTextDocument(event => { + let subscription = vscode.workspace.onDidChangeTextDocument(event => { subscription.dispose(); assert.ok(event.document === doc); assert.equal(event.document.getText(), 'call1'); @@ -481,9 +451,9 @@ suite('workspace-namespace', () => { }); test('findFiles', () => { - return workspace.findFiles('*.js').then((res) => { + return vscode.workspace.findFiles('*.js').then((res) => { assert.equal(res.length, 1); - assert.equal(basename(workspace.asRelativePath(res[0])), 'far.js'); + assert.equal(basename(vscode.workspace.asRelativePath(res[0])), 'far.js'); }); }); @@ -494,17 +464,17 @@ suite('workspace-namespace', () => { // const token = source.token; // just to get an instance first // source.cancel(); - // return workspace.findFiles('*.js', null, 100, token).then((res) => { + // return vscode.workspace.findFiles('*.js', null, 100, token).then((res) => { // assert.equal(res, void 0); // }); // }); test('applyEdit', () => { - return workspace.openTextDocument(Uri.parse('untitled:' + join(workspace.rootPath || '', './new2.txt'))).then(doc => { - let edit = new WorkspaceEdit(); - edit.insert(doc.uri, new Position(0, 0), new Array(1000).join('Hello World')); - return workspace.applyEdit(edit); + return vscode.workspace.openTextDocument(vscode.Uri.parse('untitled:' + join(vscode.workspace.rootPath || '', './new2.txt'))).then(doc => { + let edit = new vscode.WorkspaceEdit(); + edit.insert(doc.uri, new vscode.Position(0, 0), new Array(1000).join('Hello World')); + return vscode.workspace.applyEdit(edit); }); }); }); From b31c1e1fc96efd56a892844f942c125d5f0b1e5e Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 4 May 2017 16:42:02 +0200 Subject: [PATCH 0186/2747] use global settings --- extensions/git/src/commands.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 6aa35dae3df5b..45a2a81f51afe 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -540,22 +540,18 @@ export class CommandCenter { // no changes, and the user has not configured to commit all in this case if (!noUnstagedChanges && noStagedChanges && !enableSmartCommit) { - // prompt the user if we want to commit all or not - const message = localize('no staged changes', "There are no staged changes to commit. Would you like to stage all changes and commit them?"); + // prompt the user if we want to commit all or not + const message = localize('no staged changes', "There are no staged changes to commit.\n\nWould you like to automatically stage all your changes and commit them directly?"); const yes = localize('yes', "Yes"); const always = localize('always', "Always"); const pick = await window.showWarningMessage(message, { modal: true }, yes, always); if (pick === always) { - // update preference to enable smart commit always - config.update('enableSmartCommit', true, false); - } - else if (pick !== yes) { - // do not commit on cancel - return false; + config.update('enableSmartCommit', true, true); + } else if (pick !== yes) { + return false; // do not commit on cancel } - // for yes or always, continue onto previous smart commit behavior } if (!opts) { From 4c62dfa0a436bf907966eea1634383eca0d0d477 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 4 May 2017 16:45:49 +0200 Subject: [PATCH 0187/2747] git commit with input bail early --- extensions/git/src/commands.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 45a2a81f51afe..24f9c35129a84 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -608,6 +608,10 @@ export class CommandCenter { @command('git.commitWithInput') async commitWithInput(): Promise { + if (!scm.inputBox.value) { + return; + } + const didCommit = await this.smartCommit(async () => scm.inputBox.value); if (didCommit) { From a34e5de6ff26e1f03ce151781b2e231abbffe4f8 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 4 May 2017 16:48:41 +0200 Subject: [PATCH 0188/2747] add SCM Providers as marketplace category --- src/vs/platform/extensions/common/extensionsRegistry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/platform/extensions/common/extensionsRegistry.ts b/src/vs/platform/extensions/common/extensionsRegistry.ts index a3b94131189bd..44cbf08d21ff4 100644 --- a/src/vs/platform/extensions/common/extensionsRegistry.ts +++ b/src/vs/platform/extensions/common/extensionsRegistry.ts @@ -139,7 +139,7 @@ const schema: IJSONSchema = { uniqueItems: true, items: { type: 'string', - enum: ['Languages', 'Snippets', 'Linters', 'Themes', 'Debuggers', 'Other', 'Keymaps', 'Formatters', 'Extension Packs'] + enum: ['Languages', 'Snippets', 'Linters', 'Themes', 'Debuggers', 'Other', 'Keymaps', 'Formatters', 'Extension Packs', 'SCM Providers'] } }, galleryBanner: { From 174fafae53ec26bc3dc1216080061449b17fb080 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 4 May 2017 17:12:47 +0200 Subject: [PATCH 0189/2747] load main.js while waiting for app.isReady, #17108 --- src/main.js | 17 ++++++++--------- src/vs/code/electron-main/main.ts | 14 +++++++++++++- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/main.js b/src/main.js index 60070c76804ba..43a92f8069a62 100644 --- a/src/main.js +++ b/src/main.js @@ -222,13 +222,12 @@ var nodeCachedDataDir = getNodeCachedDataDir().then(function (value) { } }); -// Load our code once ready -app.once('ready', function () { - global.perfAppReady = Date.now(); - var nlsConfig = getNLSConfiguration(); - process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig); - - nodeCachedDataDir.then(function () { - require('./bootstrap-amd').bootstrap('vs/code/electron-main/main'); - }, console.error); +var nlsConfig = getNLSConfiguration(); +process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig); + +var bootstrap = require('./bootstrap-amd'); +nodeCachedDataDir.then(function () { + bootstrap.bootstrap('vs/code/electron-main/main'); +}, function (err) { + console.error(err); }); diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts index e76e0685b51b5..8294cc1f22bdb 100644 --- a/src/vs/code/electron-main/main.ts +++ b/src/vs/code/electron-main/main.ts @@ -199,4 +199,16 @@ function main() { }).done(null, err => instantiationService.invokeFunction(quit, err)); } -main(); \ No newline at end of file +// Get going once we are ready +// TODO@Joh,Joao there more more potential here +// we should check for other instances etc while +// waiting for getting ready +if (app.isReady()) { + global.perfAppReady = Date.now(); + main(); +} else { + app.once('ready', () => { + global.perfAppReady = Date.now(); + main(); + }); +} From d13f3e79c8a6d8e49d4cfc386d83e7d467896ee9 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 4 May 2017 09:14:05 -0700 Subject: [PATCH 0190/2747] Fix markdown preview no longer marking selection Fixs #25802 --- extensions/markdown/src/previewContentProvider.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/markdown/src/previewContentProvider.ts b/extensions/markdown/src/previewContentProvider.ts index 7e98548f2121c..e1ce84caba328 100644 --- a/extensions/markdown/src/previewContentProvider.ts +++ b/extensions/markdown/src/previewContentProvider.ts @@ -73,6 +73,7 @@ class MarkdownPreviewConfig { this.scrollPreviewWithEditorSelection = !!markdownConfig.get('preview.scrollPreviewWithEditorSelection', true); this.scrollEditorWithPreview = !!markdownConfig.get('preview.scrollEditorWithPreview', true); this.doubleClickToSwitchToEditor = !!markdownConfig.get('preview.doubleClickToSwitchToEditor', true); + this.markEditorSelection = !!markdownConfig.get('preview.markEditorSelection', true); this.fontFamily = markdownConfig.get('preview.fontFamily', undefined); this.fontSize = +markdownConfig.get('preview.fontSize', NaN); From 29c39f9d301dad20cc84efa2dfd6dfed28a0c49b Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 4 May 2017 09:20:18 -0700 Subject: [PATCH 0191/2747] Check stats for undefined (fixes #25902) --- src/vs/workbench/parts/search/browser/openAnythingHandler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts index cb6117d44bc22..cc77586caa21f 100644 --- a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts +++ b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts @@ -338,7 +338,7 @@ export class OpenAnythingHandler extends QuickOpenHandler { sortedResultDuration: telemetry.sortedResultTime - startTime, resultCount: telemetry.resultCount, symbols: telemetry.symbols, - files: this.createFileEventData(startTime, telemetry.files) + files: telemetry.files && this.createFileEventData(startTime, telemetry.files) }; } From a167edd5f1dbd1ff2a4a02167afa27625ffa6b33 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 4 May 2017 17:54:32 +0200 Subject: [PATCH 0192/2747] Convert TextAreaHandler to a ViewPart --- .../browser/controller/textAreaHandler.css | 14 -- .../browser/controller/textAreaHandler.ts | 161 +++++++++++------- .../browser/controller/textAreaInput.ts | 3 - src/vs/editor/browser/view/viewImpl.ts | 6 +- 4 files changed, 106 insertions(+), 78 deletions(-) diff --git a/src/vs/editor/browser/controller/textAreaHandler.css b/src/vs/editor/browser/controller/textAreaHandler.css index e4c5188f7d370..1e6ec8effa1ff 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.css +++ b/src/vs/editor/browser/controller/textAreaHandler.css @@ -4,9 +4,6 @@ *--------------------------------------------------------------------------------------------*/ .monaco-editor .inputarea { - /*Chrome cannot handle typing in a 0x0 textarea*/ - width: 1px; - height: 1px; min-width: 0; min-height: 0; margin: 0; @@ -26,17 +23,6 @@ bottom: 0 !important; right: 0 !important; }*/ -.monaco-editor.ff .inputarea, -.monaco-editor.ie .inputarea { - width: 0; - height: 0; -} .monaco-editor .ime-input.inputarea { z-index: 10; } -.monaco-editor .ime-input.inputarea { - background: rgba(255, 255, 255, 0.85); -} -.monaco-editor.vs-dark .ime-input.inputarea { - background: rgba(0, 0, 0, 0.65); -} diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index a7bb2de87726c..9e2eea04dbbd7 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -9,17 +9,16 @@ import * as browser from 'vs/base/browser/browser'; import { TextAreaInput, ITextAreaInputHost, IPasteData, ICompositionData } from 'vs/editor/browser/controller/textAreaInput'; import { ISimpleModel, ITypeData, TextAreaState, IENarratorStrategy, NVDAPagedStrategy } from 'vs/editor/browser/controller/textAreaState'; import { Range } from 'vs/editor/common/core/range'; -import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler'; import { Configuration } from 'vs/editor/browser/config/configuration'; import { ViewContext } from 'vs/editor/common/view/viewContext'; -import { HorizontalRange } from 'vs/editor/common/view/renderingContext'; +import { HorizontalRange, RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; import { ViewController } from 'vs/editor/browser/view/viewController'; import { EndOfLinePreference } from "vs/editor/common/editorCommon"; import { IKeyboardEvent } from "vs/base/browser/keyboardEvent"; -import { PartFingerprints, PartFingerprint } from "vs/editor/browser/view/viewPart"; +import { PartFingerprints, PartFingerprint, ViewPart } from "vs/editor/browser/view/viewPart"; import { Margin } from "vs/editor/browser/viewParts/margin/margin"; import { LineNumbersOverlay } from "vs/editor/browser/viewParts/lineNumbers/lineNumbers"; import { BareFontInfo } from "vs/editor/common/config/fontInfo"; @@ -29,21 +28,28 @@ export interface ITextAreaHandlerHelper { getVerticalOffsetForLineNumber(lineNumber: number): number; } -class TextAreaVisiblePosition { - _textAreaVisiblePosition: void; +class VisibleTextArea { + _visibleTextAreaBrand: void; public readonly top: number; public readonly left: number; + public readonly width: number; - constructor(top: number, left: number) { + constructor(top: number, left: number, width: number) { this.top = top; this.left = left; + this.width = width; + } + + public setWidth(width: number): VisibleTextArea { + return new VisibleTextArea(this.top, this.left, width); } } -export class TextAreaHandler extends ViewEventHandler { +const canUseZeroSizeTextarea = (browser.isEdgeOrIE || browser.isFirefox); + +export class TextAreaHandler extends ViewPart { - private readonly _context: ViewContext; private readonly _viewController: ViewController; private readonly _viewHelper: ITextAreaHandlerHelper; @@ -51,8 +57,14 @@ export class TextAreaHandler extends ViewEventHandler { private _contentWidth: number; private _scrollLeft: number; private _scrollTop: number; - - private _visiblePosition: TextAreaVisiblePosition; + private _experimentalScreenReader: boolean; + private _fontInfo: BareFontInfo; + private _lineHeight: number; + + /** + * Defined only when the text area is visible (composition case). + */ + private _visibleTextArea: VisibleTextArea; private _selections: Range[]; private _lastCopiedValue: string; private _lastCopiedValueIsFromEmptySelection: boolean; @@ -62,7 +74,7 @@ export class TextAreaHandler extends ViewEventHandler { private readonly _textAreaInput: TextAreaInput; constructor(context: ViewContext, viewController: ViewController, viewHelper: ITextAreaHandlerHelper) { - super(); + super(context); this._context = context; this._viewController = viewController; @@ -72,8 +84,11 @@ export class TextAreaHandler extends ViewEventHandler { this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; this._scrollLeft = 0; this._scrollTop = 0; + this._experimentalScreenReader = this._context.configuration.editor.viewInfo.experimentalScreenReader; + this._fontInfo = this._context.configuration.editor.fontInfo; + this._lineHeight = this._context.configuration.editor.lineHeight; - this._visiblePosition = null; + this._visibleTextArea = null; this._selections = [new Range(1, 1, 1, 1)]; this._lastCopiedValue = null; this._lastCopiedValueIsFromEmptySelection = false; @@ -92,28 +107,10 @@ export class TextAreaHandler extends ViewEventHandler { this.textArea.setAttribute('aria-haspopup', 'false'); this.textArea.setAttribute('aria-autocomplete', 'both'); - this.textArea.setTop(0); - this.textArea.setLeft(0); - Configuration.applyFontInfo(this.textArea, this._context.configuration.editor.fontInfo); + Configuration.applyFontInfo(this.textArea, this._fontInfo); - // On top of the text area, we position a dom node to cover it up - // (there have been reports of tiny blinking cursors) - // (in WebKit the textarea is 1px by 1px because it cannot handle input to a 0x0 textarea) this.textAreaCover = createFastDomNode(document.createElement('div')); - if (this._context.configuration.editor.viewInfo.glyphMargin) { - this.textAreaCover.setClassName('monaco-editor-background ' + Margin.CLASS_NAME + ' ' + 'textAreaCover'); - } else { - if (this._context.configuration.editor.viewInfo.renderLineNumbers) { - this.textAreaCover.setClassName('monaco-editor-background ' + LineNumbersOverlay.CLASS_NAME + ' ' + 'textAreaCover'); - } else { - this.textAreaCover.setClassName('monaco-editor-background ' + 'textAreaCover'); - } - } this.textAreaCover.setPosition('absolute'); - this.textAreaCover.setWidth(1); - this.textAreaCover.setHeight(1); - this.textAreaCover.setTop(0); - this.textAreaCover.setLeft(0); const simpleModel: ISimpleModel = { getLineCount: (): number => { @@ -160,7 +157,7 @@ export class TextAreaHandler extends ViewEventHandler { const selection = this._selections[0]; - if (this._context.configuration.editor.viewInfo.experimentalScreenReader) { + if (this._experimentalScreenReader) { return NVDAPagedStrategy.fromEditorSelection(currentState, simpleModel, selection); } @@ -212,16 +209,11 @@ export class TextAreaHandler extends ViewEventHandler { const visibleRange = this._viewHelper.visibleRangeForPositionRelativeToEditor(lineNumber, column); if (visibleRange) { - this._visiblePosition = new TextAreaVisiblePosition( - this._viewHelper.getVerticalOffsetForLineNumber(lineNumber), - visibleRange.left - ); - this.textArea.setTop(this._visiblePosition.top - this._scrollTop); - this.textArea.setLeft(this._contentLeft + this._visiblePosition.left - this._scrollLeft); + this._visibleTextArea = new VisibleTextArea(this._viewHelper.getVerticalOffsetForLineNumber(lineNumber), visibleRange.left, 0); + this._render(); } // Show the textarea - this.textArea.setHeight(this._context.configuration.editor.lineHeight); this.textArea.setClassName('inputarea ime-input'); this._viewController.compositionStart('keyboard'); @@ -231,22 +223,20 @@ export class TextAreaHandler extends ViewEventHandler { if (browser.isEdgeOrIE) { // Due to isEdgeOrIE (where the textarea was not cleared initially) // we cannot assume the text consists only of the composited text - this.textArea.setWidth(0); + this._visibleTextArea = this._visibleTextArea.setWidth(0); } else { // adjust width by its size - this.textArea.setWidth(measureText(e.data, this._context.configuration.editor.fontInfo)); + this._visibleTextArea = this._visibleTextArea.setWidth(measureText(e.data, this._fontInfo)); } + this._render(); })); this._register(this._textAreaInput.onCompositionEnd(() => { - this.textArea.unsetHeight(); - this.textArea.unsetWidth(); - this.textArea.setLeft(0); - this.textArea.setTop(0); - this.textArea.setClassName('inputarea'); - this._visiblePosition = null; + this._visibleTextArea = null; + this._render(); + this.textArea.setClassName('inputarea'); this._viewController.compositionEnd('keyboard'); })); @@ -257,12 +247,9 @@ export class TextAreaHandler extends ViewEventHandler { this._register(this._textAreaInput.onBlur(() => { this._context.privateViewEventBus.emit(new viewEvents.ViewFocusChangedEvent(false)); })); - - this._context.addEventHandler(this); } public dispose(): void { - this._context.removeEventHandler(this); super.dispose(); } @@ -271,9 +258,11 @@ export class TextAreaHandler extends ViewEventHandler { public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { // Give textarea same font size & line height as editor, for the IME case (when the textarea is visible) if (e.fontInfo) { - Configuration.applyFontInfo(this.textArea, this._context.configuration.editor.fontInfo); + this._fontInfo = this._context.configuration.editor.fontInfo; + Configuration.applyFontInfo(this.textArea, this._fontInfo); } if (e.viewInfo.experimentalScreenReader) { + this._experimentalScreenReader = this._context.configuration.editor.viewInfo.experimentalScreenReader; this._textAreaInput.writeScreenReaderContent('strategy changed'); } if (e.layoutInfo) { @@ -283,22 +272,22 @@ export class TextAreaHandler extends ViewEventHandler { if (e.viewInfo.ariaLabel) { this.textArea.setAttribute('aria-label', this._context.configuration.editor.viewInfo.ariaLabel); } - return false; + if (e.lineHeight) { + this._lineHeight = this._context.configuration.editor.lineHeight; + } + return true; } public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { this._selections = [e.selection].concat(e.secondarySelections); - return false; + return true; } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { this._scrollLeft = e.scrollLeft; this._scrollTop = e.scrollTop; - if (this._visiblePosition) { - this.textArea.setTop(this._visiblePosition.top - this._scrollTop); - this.textArea.setLeft(this._contentLeft + this._visiblePosition.left - this._scrollLeft); - } - return false; + + return true; } // --- end event handlers @@ -332,6 +321,62 @@ export class TextAreaHandler extends ViewEventHandler { } // --- end view API + + public prepareRender(ctx: RenderingContext): void { + } + + public render(ctx: RestrictedRenderingContext): void { + this._render(); + } + + private _render(): void { + if (this._visibleTextArea) { + + // The text area is visible for composition reasons + this.textArea.setTop(this._visibleTextArea.top - this._scrollTop); + this.textArea.setLeft(this._contentLeft + this._visibleTextArea.left - this._scrollLeft); + this.textArea.setWidth(this._visibleTextArea.width); + this.textArea.setHeight(this._lineHeight); + + this.textAreaCover.setWidth(0); + this.textAreaCover.setHeight(0); + this.textAreaCover.setTop(0); + this.textAreaCover.setLeft(0); + + } else { + + this.textArea.setTop(0); + this.textArea.setLeft(0); + this.textAreaCover.setTop(0); + this.textAreaCover.setLeft(0); + + if (canUseZeroSizeTextarea) { + this.textArea.setWidth(0); + this.textArea.setHeight(0); + this.textAreaCover.setWidth(0); + this.textAreaCover.setHeight(0); + } else { + // (in WebKit the textarea is 1px by 1px because it cannot handle input to a 0x0 textarea) + // specifically, when doing Korean IME, setting the textare to 0x0 breaks IME badly. + + this.textArea.setWidth(1); + this.textArea.setHeight(1); + this.textAreaCover.setWidth(1); + this.textAreaCover.setHeight(1); + + if (this._context.configuration.editor.viewInfo.glyphMargin) { + this.textAreaCover.setClassName('monaco-editor-background textAreaCover ' + Margin.CLASS_NAME); + } else { + if (this._context.configuration.editor.viewInfo.renderLineNumbers) { + this.textAreaCover.setClassName('monaco-editor-background textAreaCover ' + LineNumbersOverlay.CLASS_NAME); + } else { + this.textAreaCover.setClassName('monaco-editor-background textAreaCover'); + } + } + } + + } + } } function measureText(text: string, fontInfo: BareFontInfo): number { diff --git a/src/vs/editor/browser/controller/textAreaInput.ts b/src/vs/editor/browser/controller/textAreaInput.ts index ea20af1e43686..08f91649c4183 100644 --- a/src/vs/editor/browser/controller/textAreaInput.ts +++ b/src/vs/editor/browser/controller/textAreaInput.ts @@ -186,7 +186,6 @@ export class TextAreaInput extends Disposable { })); this._register(dom.addDisposableListener(textArea.domNode, 'compositionend', (e: CompositionEvent) => { - // console.log('onCompositionEnd: ' + e.data); if (browser.isEdgeOrIE && e.locale === 'ja') { // https://github.com/Microsoft/monaco-editor/issues/339 const [newState, typeInput] = deduceInputFromTextAreaValue(); @@ -214,7 +213,6 @@ export class TextAreaInput extends Disposable { })); this._register(dom.addDisposableListener(textArea.domNode, 'input', () => { - // console.log('onInput: ' + this.textArea.getValue()); if (this._isDoingComposition) { // See https://github.com/Microsoft/monaco-editor/issues/320 if (browser.isChromev56) { @@ -227,7 +225,6 @@ export class TextAreaInput extends Disposable { }; this._onCompositionUpdate.fire(e); } - // console.log('::ignoring input event because the textarea is shown at cursor: ' + this.textArea.getValue()); return; } diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index 97f14e18708e9..a9a2d8f5491b2 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -123,8 +123,11 @@ export class View extends ViewEventHandler { // The view context is passed on to most classes (basically to reduce param. counts in ctors) this._context = new ViewContext(configuration, model, this.eventDispatcher); + this.viewParts = []; + // Keyboard handler this._textAreaHandler = new TextAreaHandler(this._context, viewController, this.createTextAreaHandlerHelper()); + this.viewParts.push(this._textAreaHandler); this.createViewParts(); this._setLayout(); @@ -150,8 +153,6 @@ export class View extends ViewEventHandler { PartFingerprints.write(this.overflowGuardContainer, PartFingerprint.OverflowGuard); this.overflowGuardContainer.setClassName('overflow-guard'); - this.viewParts = []; - this._scrollbar = new EditorScrollbar(this._context, this.layoutProvider.getScrollable(), this.linesContent, this.domNode, this.overflowGuardContainer); this.viewParts.push(this._scrollbar); @@ -392,7 +393,6 @@ export class View extends ViewEventHandler { this.eventDispatcher.removeEventHandler(this); this.outgoingEvents.dispose(); - this._textAreaHandler.dispose(); this.pointerHandler.dispose(); this.viewLines.dispose(); From ad023e4bc26865d91a5450ad209b7e1dd6bd7f45 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 4 May 2017 18:36:31 +0200 Subject: [PATCH 0193/2747] Position textarea with the primary cursor (#356) --- .../browser/controller/textAreaHandler.css | 3 +- .../browser/controller/textAreaHandler.ts | 147 +++++++++++++----- .../editor/common/view/editorColorRegistry.ts | 2 +- 3 files changed, 108 insertions(+), 44 deletions(-) diff --git a/src/vs/editor/browser/controller/textAreaHandler.css b/src/vs/editor/browser/controller/textAreaHandler.css index 1e6ec8effa1ff..e80b2bf6b32ab 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.css +++ b/src/vs/editor/browser/controller/textAreaHandler.css @@ -13,6 +13,7 @@ resize: none; border: none; overflow: hidden; + background-color: transparent; } /*.monaco-editor .inputarea { position: fixed !important; @@ -23,6 +24,6 @@ bottom: 0 !important; right: 0 !important; }*/ -.monaco-editor .ime-input.inputarea { +.monaco-editor .inputarea.ime-input { z-index: 10; } diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index 9e2eea04dbbd7..9d3c60eaf2a16 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -9,6 +9,8 @@ import * as browser from 'vs/base/browser/browser'; import { TextAreaInput, ITextAreaInputHost, IPasteData, ICompositionData } from 'vs/editor/browser/controller/textAreaInput'; import { ISimpleModel, ITypeData, TextAreaState, IENarratorStrategy, NVDAPagedStrategy } from 'vs/editor/browser/controller/textAreaState'; import { Range } from 'vs/editor/common/core/range'; +import { Selection } from 'vs/editor/common/core/selection'; +import { Position } from 'vs/editor/common/core/position'; import { Configuration } from 'vs/editor/browser/config/configuration'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { HorizontalRange, RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; @@ -55,6 +57,7 @@ export class TextAreaHandler extends ViewPart { private _contentLeft: number; private _contentWidth: number; + private _contentHeight: number; private _scrollLeft: number; private _scrollTop: number; private _experimentalScreenReader: boolean; @@ -65,7 +68,7 @@ export class TextAreaHandler extends ViewPart { * Defined only when the text area is visible (composition case). */ private _visibleTextArea: VisibleTextArea; - private _selections: Range[]; + private _selections: Selection[]; private _lastCopiedValue: string; private _lastCopiedValueIsFromEmptySelection: boolean; @@ -82,6 +85,7 @@ export class TextAreaHandler extends ViewPart { this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; + this._contentHeight = this._context.configuration.editor.layoutInfo.contentHeight; this._scrollLeft = 0; this._scrollTop = 0; this._experimentalScreenReader = this._context.configuration.editor.viewInfo.experimentalScreenReader; @@ -89,7 +93,7 @@ export class TextAreaHandler extends ViewPart { this._lineHeight = this._context.configuration.editor.lineHeight; this._visibleTextArea = null; - this._selections = [new Range(1, 1, 1, 1)]; + this._selections = [new Selection(1, 1, 1, 1)]; this._lastCopiedValue = null; this._lastCopiedValueIsFromEmptySelection = false; @@ -268,6 +272,7 @@ export class TextAreaHandler extends ViewPart { if (e.layoutInfo) { this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; + this._contentHeight = this._context.configuration.editor.layoutInfo.contentHeight; } if (e.viewInfo.ariaLabel) { this.textArea.setAttribute('aria-label', this._context.configuration.editor.viewInfo.ariaLabel); @@ -277,16 +282,32 @@ export class TextAreaHandler extends ViewPart { } return true; } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { this._selections = [e.selection].concat(e.secondarySelections); return true; } - + public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { + // true for inline decorations that can end up relayouting text + return true; + } + public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { + return true; + } + public onLinesChanged(e: viewEvents.ViewLinesChangedEvent): boolean { + return true; + } + public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { + return true; + } + public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { + return true; + } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { this._scrollLeft = e.scrollLeft; this._scrollTop = e.scrollTop; - + return true; + } + public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { return true; } @@ -322,7 +343,11 @@ export class TextAreaHandler extends ViewPart { // --- end view API + private _primaryCursorVisibleRange: HorizontalRange = null; + public prepareRender(ctx: RenderingContext): void { + const primaryCursorPosition = new Position(this._selections[0].positionLineNumber, this._selections[0].positionColumn); + this._primaryCursorVisibleRange = ctx.visibleRangeForPosition(primaryCursorPosition); } public render(ctx: RestrictedRenderingContext): void { @@ -331,50 +356,88 @@ export class TextAreaHandler extends ViewPart { private _render(): void { if (this._visibleTextArea) { - // The text area is visible for composition reasons - this.textArea.setTop(this._visibleTextArea.top - this._scrollTop); - this.textArea.setLeft(this._contentLeft + this._visibleTextArea.left - this._scrollLeft); - this.textArea.setWidth(this._visibleTextArea.width); - this.textArea.setHeight(this._lineHeight); + this._renderInsideEditor( + this._visibleTextArea.top - this._scrollTop, + this._contentLeft + this._visibleTextArea.left - this._scrollLeft, + this._visibleTextArea.width, + this._lineHeight + ); + return; + } - this.textAreaCover.setWidth(0); - this.textAreaCover.setHeight(0); - this.textAreaCover.setTop(0); - this.textAreaCover.setLeft(0); + if (!this._primaryCursorVisibleRange) { + // The primary cursor is outside the viewport => place textarea to the top left + this._renderAtTopLeft(); + return; + } - } else { + const left = this._contentLeft + this._primaryCursorVisibleRange.left - this._scrollLeft; + if (left < this._contentLeft || left > this._contentLeft + this._contentWidth) { + // cursor is outside the viewport + this._renderAtTopLeft(); + return; + } + + const top = this._viewHelper.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber) - this._scrollTop; + if (top < 0 || top > this._contentHeight) { + // cursor is outside the viewport + this._renderAtTopLeft(); + return; + } + + // The primary cursor is in the viewport (at least vertically) => place textarea on the cursor + this._renderInsideEditor(top, left, canUseZeroSizeTextarea ? 0 : 1, canUseZeroSizeTextarea ? 0 : 1); + } + + private _renderInsideEditor(top: number, left: number, width: number, height: number): void { + const ta = this.textArea; + const tac = this.textAreaCover; + + ta.setTop(top); + ta.setLeft(left); + ta.setWidth(width); + ta.setHeight(height); + + tac.setTop(0); + tac.setLeft(0); + tac.setWidth(0); + tac.setHeight(0); + } + + private _renderAtTopLeft(): void { + const ta = this.textArea; + const tac = this.textAreaCover; + + ta.setTop(0); + ta.setLeft(0); + tac.setTop(0); + tac.setLeft(0); + + if (canUseZeroSizeTextarea) { + ta.setWidth(0); + ta.setHeight(0); + tac.setWidth(0); + tac.setHeight(0); + return; + } - this.textArea.setTop(0); - this.textArea.setLeft(0); - this.textAreaCover.setTop(0); - this.textAreaCover.setLeft(0); + // (in WebKit the textarea is 1px by 1px because it cannot handle input to a 0x0 textarea) + // specifically, when doing Korean IME, setting the textare to 0x0 breaks IME badly. - if (canUseZeroSizeTextarea) { - this.textArea.setWidth(0); - this.textArea.setHeight(0); - this.textAreaCover.setWidth(0); - this.textAreaCover.setHeight(0); + ta.setWidth(1); + ta.setHeight(1); + tac.setWidth(1); + tac.setHeight(1); + + if (this._context.configuration.editor.viewInfo.glyphMargin) { + tac.setClassName('monaco-editor-background textAreaCover ' + Margin.CLASS_NAME); + } else { + if (this._context.configuration.editor.viewInfo.renderLineNumbers) { + tac.setClassName('monaco-editor-background textAreaCover ' + LineNumbersOverlay.CLASS_NAME); } else { - // (in WebKit the textarea is 1px by 1px because it cannot handle input to a 0x0 textarea) - // specifically, when doing Korean IME, setting the textare to 0x0 breaks IME badly. - - this.textArea.setWidth(1); - this.textArea.setHeight(1); - this.textAreaCover.setWidth(1); - this.textAreaCover.setHeight(1); - - if (this._context.configuration.editor.viewInfo.glyphMargin) { - this.textAreaCover.setClassName('monaco-editor-background textAreaCover ' + Margin.CLASS_NAME); - } else { - if (this._context.configuration.editor.viewInfo.renderLineNumbers) { - this.textAreaCover.setClassName('monaco-editor-background textAreaCover ' + LineNumbersOverlay.CLASS_NAME); - } else { - this.textAreaCover.setClassName('monaco-editor-background textAreaCover'); - } - } + tac.setClassName('monaco-editor-background textAreaCover'); } - } } } diff --git a/src/vs/editor/common/view/editorColorRegistry.ts b/src/vs/editor/common/view/editorColorRegistry.ts index 1dd21ca5506a4..05e930fbb6824 100644 --- a/src/vs/editor/common/view/editorColorRegistry.ts +++ b/src/vs/editor/common/view/editorColorRegistry.ts @@ -25,7 +25,7 @@ registerThemingParticipant((theme, collector) => { let background = theme.getColor(editorBackground); if (background) { - collector.addRule(`.monaco-editor.${theme.selector} .monaco-editor-background, .monaco-editor.${theme.selector} .inputarea { background-color: ${background}; }`); + collector.addRule(`.monaco-editor.${theme.selector} .monaco-editor-background, .monaco-editor.${theme.selector} .inputarea.ime-input { background-color: ${background}; }`); } let foreground = theme.getColor(editorForeground); if (foreground) { From ed1adb66da3b11f055dbe53ad273f1b85aa9d419 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 4 May 2017 11:02:26 -0700 Subject: [PATCH 0194/2747] Fix some wording on restart alert messages --- src/vs/workbench/browser/actions/configureLocale.ts | 2 +- .../workbench/parts/tasks/electron-browser/task.contribution.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/actions/configureLocale.ts b/src/vs/workbench/browser/actions/configureLocale.ts index 02c70d9f47f37..f9181f4260965 100644 --- a/src/vs/workbench/browser/actions/configureLocale.ts +++ b/src/vs/workbench/browser/actions/configureLocale.ts @@ -32,7 +32,7 @@ class ConfigureLocaleAction extends Action { '{', `\t// ${nls.localize('displayLanguage', 'Defines VSCode\'s display language.')}`, `\t// ${nls.localize('doc', 'See {0} for a list of supported languages.', 'https://go.microsoft.com/fwlink/?LinkId=761051')}`, - `\t// ${nls.localize('restart', 'Changing the value requires to restart VSCode.')}`, + `\t// ${nls.localize('restart', 'Changing the value requires restarting VSCode.')}`, `\t"locale":"${Platform.language}"`, '}' ].join('\n'); diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 314a626f91de3..a779eaf04c5e9 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -577,7 +577,7 @@ class TaskService extends EventEmitter implements ITaskService { ? ExecutionEngine.Process : ExecutionEngine.Unknown; if (currentExecutionEngine !== this.getExecutionEngine()) { - this.messageService.show(Severity.Info, nls.localize('TaskSystem.noHotSwap', 'Changing the task execution engine requires to restart VS Code. The change is ignored.')); + this.messageService.show(Severity.Info, nls.localize('TaskSystem.noHotSwap', 'Changing the task execution engine requires restarting VS Code. The change is ignored.')); } }); lifecycleService.onWillShutdown(event => event.veto(this.beforeShutdown())); From 799166a481b75d6d3dc9f7f999f89e5b5645abcc Mon Sep 17 00:00:00 2001 From: Daniel Ye Date: Thu, 4 May 2017 11:46:23 -0700 Subject: [PATCH 0195/2747] 2017-05-04, Merge in translation from transifex. --- i18n/chs/extensions/json/package.i18n.json | 2 +- .../menusExtensionPoint.i18n.json | 1 - i18n/cht/extensions/git/package.i18n.json | 1 + i18n/cht/extensions/grunt/package.i18n.json | 4 ++- i18n/cht/extensions/gulp/package.i18n.json | 4 ++- .../cht/extensions/markdown/package.i18n.json | 4 ++- .../out/utils/typingsStatus.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 5 +++- .../parts/editor/editorActions.i18n.json | 2 ++ .../src/vs/workbench/common/theme.i18n.json | 7 +++++ .../main.contribution.i18n.json | 3 +++ .../task.contribution.i18n.json | 1 + .../terminal.contribution.i18n.json | 1 + .../terminalConfigHelper.i18n.json | 1 + .../themes.contribution.i18n.json | 1 + .../walkThroughPart.i18n.json | 3 ++- .../themes/common/colorThemeSchema.i18n.json | 3 ++- .../electron-browser/colorThemeData.i18n.json | 7 ++++- .../workbenchThemeService.i18n.json | 2 ++ .../deu/extensions/git/out/commands.i18n.json | 3 +++ i18n/deu/extensions/git/package.i18n.json | 2 ++ i18n/deu/extensions/gulp/package.i18n.json | 4 ++- .../out/utils/typingsStatus.i18n.json | 1 + .../suggest/browser/suggestWidget.i18n.json | 3 +++ .../platform/environment/node/argv.i18n.json | 1 + .../theme/common/colorRegistry.i18n.json | 26 +++++++++++++++++++ .../parts/editor/editorActions.i18n.json | 2 ++ .../src/vs/workbench/common/theme.i18n.json | 10 ++++++- .../inspectKeybindings.i18n.json | 4 ++- .../debug/browser/debugActions.i18n.json | 1 + .../browser/debugActionsWidget.i18n.json | 4 ++- .../parts/debug/node/debugAdapter.i18n.json | 1 + .../treeExplorer.contribution.i18n.json | 5 ++++ .../browser/preferencesActions.i18n.json | 1 + .../task.contribution.i18n.json | 1 + .../themes.contribution.i18n.json | 1 + .../walkThroughPart.i18n.json | 3 ++- .../themes/common/colorThemeSchema.i18n.json | 3 ++- .../electron-browser/colorThemeData.i18n.json | 7 ++++- .../workbenchThemeService.i18n.json | 5 +++- .../src/vs/workbench/common/theme.i18n.json | 9 ++++++- .../ita/extensions/git/out/commands.i18n.json | 3 +++ i18n/ita/extensions/git/package.i18n.json | 5 ++++ i18n/ita/extensions/gulp/package.i18n.json | 4 ++- .../out/utils/typingsStatus.i18n.json | 1 + .../theme/common/colorRegistry.i18n.json | 6 +++++ .../parts/editor/editorActions.i18n.json | 2 ++ .../src/vs/workbench/common/theme.i18n.json | 12 +++++++-- .../inspectKeybindings.i18n.json | 4 ++- .../debug/browser/debugActions.i18n.json | 1 + .../browser/debugActionsWidget.i18n.json | 4 ++- .../parts/debug/node/debugAdapter.i18n.json | 1 + .../treeExplorer.contribution.i18n.json | 5 ++++ .../browser/preferencesActions.i18n.json | 1 + .../task.contribution.i18n.json | 1 + .../themes.contribution.i18n.json | 1 + .../walkThroughPart.i18n.json | 3 ++- .../themes/common/colorThemeSchema.i18n.json | 3 ++- .../electron-browser/colorThemeData.i18n.json | 7 ++++- .../workbenchThemeService.i18n.json | 5 +++- .../jpn/extensions/git/out/commands.i18n.json | 1 + i18n/jpn/extensions/git/package.i18n.json | 1 + .../menusExtensionPoint.i18n.json | 10 +++---- .../node/extensionValidator.i18n.json | 16 ++++++------ .../theme/common/colorRegistry.i18n.json | 17 ++++++++++++ .../src/vs/workbench/common/theme.i18n.json | 1 + .../debugConfigurationManager.i18n.json | 2 +- .../treeExplorer.contribution.i18n.json | 1 + .../tasks/common/taskConfiguration.i18n.json | 2 +- .../keybindingService.i18n.json | 4 +-- .../common/workbenchModeService.i18n.json | 14 +++++----- .../themes/common/colorThemeSchema.i18n.json | 3 ++- .../electron-browser/colorThemeData.i18n.json | 2 ++ .../workbenchThemeService.i18n.json | 1 + .../kor/extensions/git/out/commands.i18n.json | 3 +++ .../extensions/git/out/scmProvider.i18n.json | 2 +- i18n/kor/extensions/git/package.i18n.json | 2 ++ i18n/kor/extensions/gulp/package.i18n.json | 4 ++- .../out/utils/typingsStatus.i18n.json | 1 + .../parts/editor/editorActions.i18n.json | 2 ++ .../src/vs/workbench/common/theme.i18n.json | 10 ++++++- .../inspectKeybindings.i18n.json | 4 ++- .../debug/browser/debugActions.i18n.json | 1 + .../browser/debugActionsWidget.i18n.json | 4 ++- .../parts/debug/node/debugAdapter.i18n.json | 1 + .../treeExplorer.contribution.i18n.json | 5 ++++ .../browser/preferencesActions.i18n.json | 1 + .../task.contribution.i18n.json | 1 + .../themes.contribution.i18n.json | 1 + .../walkThroughPart.i18n.json | 3 ++- .../themes/common/colorThemeSchema.i18n.json | 3 ++- .../electron-browser/colorThemeData.i18n.json | 7 ++++- .../workbenchThemeService.i18n.json | 5 +++- i18n/rus/extensions/git/package.i18n.json | 4 ++- .../extensions/typescript/package.i18n.json | 2 ++ .../src/vs/code/electron-main/menus.i18n.json | 5 ++++ .../parts/editor/editorActions.i18n.json | 2 ++ .../src/vs/workbench/common/theme.i18n.json | 11 +++++++- .../main.contribution.i18n.json | 3 +++ .../inspectKeybindings.i18n.json | 4 ++- .../debug/browser/debugActions.i18n.json | 1 + .../browser/debugActionsWidget.i18n.json | 4 ++- .../debug.contribution.i18n.json | 3 ++- .../parts/debug/node/debugAdapter.i18n.json | 1 + .../treeExplorer.contribution.i18n.json | 5 ++++ .../extensionTipsService.i18n.json | 1 + .../extensionsViewlet.i18n.json | 1 + .../browser/keybindingsEditor.i18n.json | 2 ++ .../browser/preferencesActions.i18n.json | 1 + .../common/keybindingsEditorModel.i18n.json | 4 ++- .../search/browser/replaceService.i18n.json | 4 ++- .../task.contribution.i18n.json | 1 + .../terminal.contribution.i18n.json | 1 + .../terminalConfigHelper.i18n.json | 1 + .../themes.contribution.i18n.json | 1 + .../walkThroughPart.i18n.json | 3 ++- .../themes/common/colorThemeSchema.i18n.json | 3 ++- .../electron-browser/colorThemeData.i18n.json | 7 ++++- .../workbenchThemeService.i18n.json | 5 +++- 119 files changed, 362 insertions(+), 72 deletions(-) diff --git a/i18n/chs/extensions/json/package.i18n.json b/i18n/chs/extensions/json/package.i18n.json index 6c9d2ad0143e9..f147c64ed829b 100644 --- a/i18n/chs/extensions/json/package.i18n.json +++ b/i18n/chs/extensions/json/package.i18n.json @@ -10,6 +10,6 @@ "json.schemas.fileMatch.item.desc": "将 JSON 文件解析到架构时,用于匹配的可以包含 \"*\" 的文件模式。", "json.schemas.schema.desc": "给定 URL 的架构定义。只需提供该架构以避免对架构 URL 的访问。", "json.format.enable.desc": "启用/禁用默认 JSON 格式化程序(需要重启)", - "json.tracing.desc": "跟踪 VS Code 和 JSON 语言服务器之间的通信。", + "json.tracing.desc": "跟踪 VS Code 与 JSON 语言服务器之间的通信。", "json.colorDecorators.enable.desc": "启用或禁用颜色修饰器" } \ No newline at end of file diff --git a/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 806db0f074865..9065a3c4a530b 100644 --- a/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -19,7 +19,6 @@ "menus.editorTabContext": "编辑器选项卡上下文菜单", "menus.debugCallstackContext": "调试调用堆栈上下文菜单", "menus.scmTitle": "源代码管理标题菜单", - "menus.resourceGroupContext": "源代码管理资源组上下文菜单", "menus.resourceStateContext": "源代码管理资源状态上下文菜单", "nonempty": "应为非空值。", "opticon": "可以省略属性“图标”或者它必须是一个字符串或类似“{dark, light}”的文本", diff --git a/i18n/cht/extensions/git/package.i18n.json b/i18n/cht/extensions/git/package.i18n.json index b89e59919000b..8bab2a3d3eb7b 100644 --- a/i18n/cht/extensions/git/package.i18n.json +++ b/i18n/cht/extensions/git/package.i18n.json @@ -41,5 +41,6 @@ "config.confirmSync": "請先確認再同步處理 GIT 存放庫", "config.countBadge": "控制 git 徽章計數器。[全部] 會計算所有變更。[已追蹤] 只會計算追蹤的變更。[關閉] 會將其關閉。", "config.checkoutType": "控制在執行 [簽出至...] 時,會列出那些類型的分支。[全部] 會顯示所有參考,[本機] 只會顯示本機分支,[標記] 只會顯示標記,[遠端] 只會顯示遠端分支。", + "config.ignoreLegacyWarning": "略過舊的 Git 警告", "config.ignoreLimitWarning": "當存放庫中有過多變更時,略過警告。" } \ No newline at end of file diff --git a/i18n/cht/extensions/grunt/package.i18n.json b/i18n/cht/extensions/grunt/package.i18n.json index 8b6ad71cd4e6d..01c2df22d6d1f 100644 --- a/i18n/cht/extensions/grunt/package.i18n.json +++ b/i18n/cht/extensions/grunt/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.grunt.autoDetect": "控制 Grunt 工作的自動偵測為開啟或關閉。預設為開。" +} \ No newline at end of file diff --git a/i18n/cht/extensions/gulp/package.i18n.json b/i18n/cht/extensions/gulp/package.i18n.json index 8b6ad71cd4e6d..e91e1955eec75 100644 --- a/i18n/cht/extensions/gulp/package.i18n.json +++ b/i18n/cht/extensions/gulp/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.gulp.autoDetect": "控制 Gulp 工作的自動偵測為開啟或關閉。預設為開。" +} \ No newline at end of file diff --git a/i18n/cht/extensions/markdown/package.i18n.json b/i18n/cht/extensions/markdown/package.i18n.json index 8944d1dde4330..6c7136baba315 100644 --- a/i18n/cht/extensions/markdown/package.i18n.json +++ b/i18n/cht/extensions/markdown/package.i18n.json @@ -16,5 +16,7 @@ "markdown.previewSide.title": "在一側開啟預覽", "markdown.showSource.title": "顯示來源", "markdown.styles.dec": "可從 Markdown 預覽使用之 CSS 樣式表的 URL 或本機路徑清單。相對路徑是相對於在總管中開啟的資料夾來進行解釋。若沒有開啟資料夾,路徑則是相對於 Markdown 檔案的位置來進行解釋。所有 '\\' 都必須寫成 '\\\\'。", - "markdown.showPreviewSecuritySelector.title": "變更 Markdown 預覽安全性設定" + "markdown.showPreviewSecuritySelector.title": "變更 Markdown 預覽安全性設定", + "markdown.preview.enableExperimentalExtensionApi.desc": "[實驗性] 允許延伸模組延伸 Markdown 預覽。", + "markdown.trace.desc": "允許 Markdown 延伸模組進行偵錯記錄。" } \ No newline at end of file diff --git a/i18n/cht/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/cht/extensions/typescript/out/utils/typingsStatus.i18n.json index 4f15ff5fc04f8..1c4d07bd74611 100644 --- a/i18n/cht/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/cht/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "正在擷取資料以改善 TypeScript IntelliSense", + "typesInstallerInitializationFailed.title": "無法安裝鍵入檔案以取得 JavaScript 語言功能。請確認 NPM 已安裝,且位於您的 PATH", "typesInstallerInitializationFailed.moreInformation": "詳細資訊", "typesInstallerInitializationFailed.doNotCheckAgain": "不要再檢查", "typesInstallerInitializationFailed.close": "關閉" diff --git a/i18n/cht/extensions/typescript/package.i18n.json b/i18n/cht/extensions/typescript/package.i18n.json index 16a2c1a55f137..c5b2c54edf83f 100644 --- a/i18n/cht/extensions/typescript/package.i18n.json +++ b/i18n/cht/extensions/typescript/package.i18n.json @@ -12,6 +12,7 @@ "typescript.disableAutomaticTypeAcquisition": "停用自動類型取得。需要 TypeScript >= 2.0.6,並需要在變更後重新啟動。", "typescript.check.tscVersion": "請檢查全域安裝 TypeScript 編譯器 (例如 tsc) 是否不同於使用的 TypeScript 語言服務。", "typescript.tsserver.log": "允許 TS 伺服器記錄到檔案。此記錄可用來診斷 TS 伺服器問題。記錄可能包含檔案路徑、原始程式碼及您專案中可能具有敏感性的其他資訊。", + "typescript.tsserver.trace": "允許將訊息追蹤傳送到 TS 伺服器。此追蹤可用來診斷 TS 伺服器問題。追蹤可能包含檔案路徑、原始程式碼及您專案中可能具有敏感性的其他資訊。", "typescript.tsserver.experimentalAutoBuild": "啟用實驗性自動建置。需要 1.9 dev 或 2.x tsserver 版本,且在變更後必須重新啟動 VS Code。", "typescript.validate.enable": "啟用/停用 TypeScript 驗證。", "typescript.format.enable": "啟用/停用預設 TypeScript 格式器。", @@ -24,6 +25,7 @@ "format.insertSpaceBeforeFunctionParenthesis": "定義如何處理函式引數括號之前的空格。TypeScript 必須 >= 2.1.5。", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "定義左右非空白括弧間的空格處理。", "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "定義左右非空白中括弧間的空格處理。", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "定義範非空白左右大括弧間的空格處理。需要 TypeScript >= 2.3.0。", "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "定義範本字串左右大括弧間的空格處理。需要 TypeScript >= 2.0.6。", "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "定義 JSX 運算式左右大括弧間的空格處理。需要 TypeScript >= 2.0.6。", "format.placeOpenBraceOnNewLineForFunctions": "定義是否將左大括弧放入函式的新行。", @@ -36,5 +38,6 @@ "typescript.openTsServerLog.title": "開啟 TS 伺服器記錄檔", "typescript.selectTypeScriptVersion.title": "選取 TypeScript 版本", "jsDocCompletion.enabled": "啟用/停用自動 JSDoc 註解", - "javascript.implicitProjectConfig.checkJs": "啟用/停用 JavaScript 檔案的語意檢查。現有的 jsconfig.json 或 tsconfig.json 檔案會覆寫此設定。需要 TypeScript >=2.3.1。" + "javascript.implicitProjectConfig.checkJs": "啟用/停用 JavaScript 檔案的語意檢查。現有的 jsconfig.json 或 tsconfig.json 檔案會覆寫此設定。需要 TypeScript >=2.3.1。", + "typescript.check.npmIsInstalled": "檢查是否已安裝 NPM,以取得自動鍵入" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/cht/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 7262a8948e380..1228bd7f60dca 100644 --- a/i18n/cht/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -44,6 +44,8 @@ "openPreviousRecentlyUsedEditorInGroup": "開啟群組中上一個最近使用的編輯器", "openNextRecentlyUsedEditorInGroup": "開啟群組中下一個最近使用的編輯器", "navigateEditorHistoryByInput": "從記錄中開啟上一個編輯器", + "openNextRecentlyUsedEditor": "開啟下一個最近使用的編輯器", + "openPreviousRecentlyUsedEditor": "開啟上一個最近使用的編輯器", "clearEditorHistory": "清除編輯器記錄", "focusLastEditorInStack": "開啟群組中最後一個編輯器", "moveEditorLeft": "將編輯器左移", diff --git a/i18n/cht/src/vs/workbench/common/theme.i18n.json b/i18n/cht/src/vs/workbench/common/theme.i18n.json index 57facd966f85b..ad80aac308959 100644 --- a/i18n/cht/src/vs/workbench/common/theme.i18n.json +++ b/i18n/cht/src/vs/workbench/common/theme.i18n.json @@ -12,8 +12,11 @@ "tabActiveEditorGroupInactiveForeground": "非使用中的群組內,使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", "tabInactiveEditorGroupActiveForeground": "使用中的群組內,非使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", "tabInactiveEditorGroupInactiveForeground": "非使用中的群組內,非使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", + "editorGroupBackground": "編輯器群組的背景色彩。編輯器群組是編輯器的容器。當拖曳編輯器群組時會顯示背景色彩。", + "editorGroupHeaderBackground": "當索引標籤禁用的時候編輯器群組標題的背景顏色。編輯器群組是編輯器的容器。", "editorGroupBorder": "用以分隔多個編輯器群組彼此的色彩。編輯器群組是編輯器的容器。", "editorDragAndDropBackground": "拖曳編輯器時的背景色彩。", + "editorMasterDetailsBorder": "並排編輯器中將主視窗和詳細視窗分隔開的框線色彩。\n範例包括diff編輯器和設定編輯器。", "panelBackground": "面板的前景色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "panelBorder": "面板頂端用以分隔編輯器的邊框色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "panelActiveTitleForeground": "使用中之面板標題的標題色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", @@ -24,12 +27,16 @@ "statusBarNoFolderBackground": "當未開啟任何資料夾時,狀態列的背景色彩。狀態列會顯示在視窗的底部。", "statusBarItemActiveBackground": "按下滑鼠按鈕時,狀態列項目的背景色彩。狀態列會顯示在視窗的底部。", "statusBarItemHoverBackground": "動態顯示時,狀態列項目的背景色彩。狀態列會顯示在視窗的底部。", + "statusBarProminentItemBackground": "狀態列突出項目的背景顏色。突出項目比狀態列的其他項目更顯眼,用於表示重要性更高。狀態列會顯示在視窗的底部。", + "statusBarProminentItemHoverBackground": "狀態列突出項目暫留時的背景顏色。突出項目比狀態列的其他項目更顯眼,用於表示重要性更高。狀態列會顯示在視窗的底部。", "activityBarBackground": "活動列背景的色彩。活動列會顯示在最左側或最右側,並可切換不同的提要欄位檢視。", + "activityBarForeground": "活動列的前背景色彩(例如用於圖示)。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", "activityBarDragAndDropBackground": "拖放活動列項目之意見回應時的色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", "activityBarBadgeBackground": "活動通知徽章的背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", "activityBarBadgeForeground": "活動通知徽章的前背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", "sideBarBackground": "提要欄位的背景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", "sideBarTitleForeground": "提要欄位標題的前景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", + "sideBarSectionHeaderBackground": "提要欄位區段標頭的背景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", "titleBarActiveForeground": "作用中視窗之標題列的前景。請注意,目前只有 macOS 支援此色彩。", "titleBarInactiveForeground": "非作用中視窗之標題列的前景。請注意,目前只有 macOS 支援此色彩。", "titleBarActiveBackground": "作用中視窗之標題列的背景。請注意,目前只有 macOS 支援此色彩。", diff --git a/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json index f9a78df403212..f23a60a5640b8 100644 --- a/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -20,6 +20,7 @@ "statusBarVisibility": "控制 Workbench 底端狀態列的可視性。", "activityBarVisibility": "控制活動列在 workbench 中的可見度。", "closeOnFileDelete": "控制顯示檔案的編輯器是否應在其他處理序刪除或重新命名該檔案時自動關閉。若停用此選項,當發生前述狀況時,編輯器會保持開啟,並呈現已變更的狀態。請注意,從應用程式內刪除一律會關閉編輯器,但已變更的檔案在資料未儲存前一律不會關閉。", + "swipeToNavigate": "利用三指水平撥動在開啟的檔案間瀏覽。", "workbenchConfigurationTitle": "工作台", "window.openFilesInNewWindow.on": "檔案會在新視窗中開啟", "window.openFilesInNewWindow.off": "檔案會在開啟了檔案資料夾的視窗,或在上一個使用中的視窗中開啟", @@ -48,10 +49,12 @@ "menuBarVisibility": "控制功能表列的可見度。[切換] 設定表示會隱藏功能表列,按一下 Alt 鍵則會顯示。除非視窗是全螢幕,否則預設會顯示功能表列。", "autoDetectHighContrast": "若啟用,如果 Windows 使用高對比佈景主題,就會自動變更為高對比佈景主題,切換掉 Windows 高對比佈景主題時則變更為深色佈景主題。", "titleBarStyle": "調整視窗標題列的外觀。變更需要完整重新啟動才會套用。", + "window.nativeTabs": "啟用 macOS Sierra 視窗索引標籤。請注意需要完全重新啟動才能套用變更,並且完成設定後原始索引標籤將會停用自訂標題列樣式。", "windowConfigurationTitle": "視窗", "zenModeConfigurationTitle": "Zen Mode", "zenMode.fullScreen": "控制開啟 Zen Mode 是否也會將 Workbench 轉換為全螢幕模式。", "zenMode.hideTabs": "控制開啟 Zen Mode 是否也會隱藏 Workbench 索引標籤。", "zenMode.hideStatusBar": "控制開啟 Zen Mode 是否也會隱藏 Workbench 底部的狀態列。", + "zenMode.hideActivityBar": "控制開啟 Zen Mode 是否也會隱藏 Workbench 左方的活動列。", "zenMode.restore": "控制視窗如果在 Zen Mode 下結束,是否應還原為 Zen Mode。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 7758b0a3da047..c0537ee4cdfbc 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,6 +9,7 @@ "ConfigureTaskRunnerAction.quickPick.template": "選取工作執行器", "ConfigureTaskRunnerAction.autoDetecting": "自動偵測 {0} 的工作", "ConfigureTaskRunnerAction.autoDetect": "自動偵測工作系統失敗。正在使用預設範本。如需詳細資料,請參閱工作輸出。", + "ConfigureTaskRunnerAction.autoDetectError": "自動偵測工作系統產生錯誤。如需詳細資料,請參閱工作輸出。", "ConfigureTaskRunnerAction.failed": "無法在 '.vscode' 資料夾中建立 'tasks.json' 檔案。如需詳細資訊,請參閱工作輸出。", "ConfigureTaskRunnerAction.label": "設定工作執行器", "ConfigureBuildTaskAction.label": "設定建置工作", diff --git a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index e9ec0d1fe5459..38cbc1a135f20 100644 --- a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,6 +16,7 @@ "terminal.integrated.fontLigatures": "控制是否在終端機中啟用連字字型。", "terminal.integrated.fontSize": "控制終端機的字型大小 (以像素為單位)。", "terminal.integrated.lineHeight": "控制終端機的行高,此數字會乘上終端機字型大小,以取得以像素為單位的實際行高。", + "terminal.integrated.enableBold": "是否要在終端機內啟用粗體文字。此動作需要終端機殼層的支援。", "terminal.integrated.cursorBlinking": "控制終端機資料指標是否閃爍。", "terminal.integrated.cursorStyle": "控制終端機資料指標的樣式。", "terminal.integrated.scrollback": "控制終端機保留在其緩衝區中的行數上限。", diff --git a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json index 1ed48f98d5802..8d475ec070173 100644 --- a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.integrated.allowWorkspaceShell": "要允許 {0} (定義為工作區設定) 在終端機中啟動嗎?", "allow": "Allow", "disallow": "Disallow" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 7cd1aafa6f1f3..d5c740838a659 100644 --- a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,6 +14,7 @@ "noIconThemeDesc": "停用檔案圖示", "problemChangingIconTheme": "設定圖示佈景主題時發生問題: {0}", "themes.selectIconTheme": "選取檔案圖示佈景主題", + "generateColorTheme.label": "依目前的設定產生色彩佈景主題", "preferences": "喜好設定", "developer": "開發人員" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index 88da29e3eed52..62ddb9869c6e7 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "未繫結" + "walkThrough.unboundCommand": "未繫結", + "walkThrough.gitNotFound": "您的系統上似乎未安裝 Git。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/cht/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index b08073157603f..fe793cb749abc 100644 --- a/i18n/cht/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/cht/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "反白顯示語法時的色彩", "schema.properties.name": "規則描述", - "schema.fontStyle": "規則的字型樣式:「斜體」、「粗體」或「底線」之一或其組合" + "schema.fontStyle": "規則的字型樣式:「斜體」、「粗體」或「底線」之一或其組合", + "schema.tokenColors.path": "tmTheme 檔案的路徑 (相對於目前檔案)。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/cht/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 9fba242d4b973..7c45152f8a53b 100644 --- a/i18n/cht/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/cht/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,5 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "剖析 JSON 佈景主題檔案時發生問題: {0}" + "error.cannotparsejson": "剖析 JSON 佈景主題檔案時發生問題: {0}", + "error.invalidformat.colors": "剖析彩色佈景主題檔案 {0} 時出現問題。屬性 'settings' 不是 'object' 類型。", + "error.invalidformat.tokenColors": "剖析彩色佈景主題檔案 {0} 時出現問題。屬性 'tokenColors' 應為指定顏色的陣列,或為通往文字配對佈景主題檔案的路徑", + "error.plist.invalidformat": "剖析 tmTheme 檔案 {0} 時出現問題。'settings' 不是陣列。", + "error.cannotparse": "剖析 tmTheme 檔案 {0} 時發生問題", + "error.cannotload": "載入 tmTheme 檔案 {0} 時發生問題: {1}" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 8cd8c12aa7220..cc25166bd6705 100644 --- a/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -26,5 +26,7 @@ "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", "iconThemeError": "File icon theme is unknown or not installed.", + "workbenchColors": "依目前選擇的彩色佈景主題覆寫顏色", + "workbenchColors.deprecated": "此設定不再為實驗性,且已被重新命名為 'workbench.colorCustomizations'", "workbenchColors.deprecatedDescription": "改用'workbench.colorCustomizations'" } \ No newline at end of file diff --git a/i18n/deu/extensions/git/out/commands.i18n.json b/i18n/deu/extensions/git/out/commands.i18n.json index 3470905699d9f..ee0bf8628561a 100644 --- a/i18n/deu/extensions/git/out/commands.i18n.json +++ b/i18n/deu/extensions/git/out/commands.i18n.json @@ -16,6 +16,8 @@ "confirm discard": "Möchten Sie die Änderungen in {0} wirklich verwerfen?", "confirm discard multiple": "Möchten Sie wirklich Änderungen in {0} Dateien verwerfen?", "discard": "Änderungen verwerfen", + "confirm discard all": "Möchten Sie wirklich ALLE Änderungen verwerfen? Dieser Vorgang kann nicht rückgängig gemacht werden!", + "discardAll": "ALLE Änderungen verwerfen", "no changes": "Keine Änderungen zum Speichern vorhanden.", "commit message": "Commit-Nachricht", "provide commit message": "Geben Sie eine Commit-Nachrichte ein.", @@ -31,6 +33,7 @@ "no remotes to publish": "In Ihrem Repository wurden keine Remoteelemente für die Veröffentlichung konfiguriert.", "disabled": "Git ist deaktiviert oder wird in diesem Arbeitsbereich nicht unterstützt.", "clean repo": "Bereinigen Sie Ihre Repository-Arbeitsstruktur vor Auftragsabschluss.", + "cant push": "Verweise können nicht per Push an einen Remotespeicherort übertragen werden. Führen Sie zuerst \"Pull\" aus, um Ihre Änderungen zu integrieren.", "git error details": "Git: {0}", "git error": "Git-Fehler", "open git log": "Git-Protokoll öffnen" diff --git a/i18n/deu/extensions/git/package.i18n.json b/i18n/deu/extensions/git/package.i18n.json index 3ea04a9fbbc51..91f8db11a7f28 100644 --- a/i18n/deu/extensions/git/package.i18n.json +++ b/i18n/deu/extensions/git/package.i18n.json @@ -39,6 +39,8 @@ "config.autofetch": "Gibt an, ob automatischer Abruf aktiviert ist.", "config.enableLongCommitWarning": "Gibt an, ob Warnungen zu langen Commitnachrichten erfolgen sollen.", "config.confirmSync": "Vor dem Synchronisieren von Git-Repositorys bestätigen.", + "config.countBadge": "Steuert die Git-Badgeanzahl. \"Alle\" zählt alle Änderungen. \"tracked\" (Nachverfolgt) zählt nur die nachverfolgten Änderungen. \"off\" (Aus) deaktiviert dies.", + "config.checkoutType": "Steuert, welcher Branchtyp beim Ausführen von \"Auschecken an...\" aufgelistet wird. \"Alle\" zeigt alle Verweise an, \"Lokal\" nur die lokalen Branches, \"Tags\" zeigt nur Tags an, und \"Remote\" zeigt nur Remotebranches an.", "config.ignoreLegacyWarning": "Ignoriert die Legacy-Git-Warnung.", "config.ignoreLimitWarning": "Ignoriert Warnung bei zu hoher Anzahl von Änderungen in einem Repository" } \ No newline at end of file diff --git a/i18n/deu/extensions/gulp/package.i18n.json b/i18n/deu/extensions/gulp/package.i18n.json index 8b6ad71cd4e6d..b6b5c532278f5 100644 --- a/i18n/deu/extensions/gulp/package.i18n.json +++ b/i18n/deu/extensions/gulp/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.gulp.autoDetect": "Steuert, ob die automatische Erkennung von Gulp-Tasks aktiviert oder deaktiviert ist. Standardmäßig ist die Funktion aktiviert." +} \ No newline at end of file diff --git a/i18n/deu/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/deu/extensions/typescript/out/utils/typingsStatus.i18n.json index 6d9362666976d..abc0ee901f85f 100644 --- a/i18n/deu/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/deu/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Daten werden zum Optimieren von TypeScript IntelliSense abgerufen", + "typesInstallerInitializationFailed.title": "Typisierungsdateien für JavaScript-Sprachfunktionen konnten nicht installiert werden. Stellen Sie sicher, das NPM installiert ist und sich in Ihrem PFAD befindet.", "typesInstallerInitializationFailed.moreInformation": "Weitere Informationen", "typesInstallerInitializationFailed.doNotCheckAgain": "Nicht erneut überprüfen", "typesInstallerInitializationFailed.close": "Schließen" diff --git a/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 99e30e1b037a4..7e17060c7d1be 100644 --- a/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -6,6 +6,9 @@ { "editorSuggestWidgetBackground": "Hintergrundfarbe des Vorschlagswidgets.", "editorSuggestWidgetBorder": "Rahmenfarbe des Vorschlagswidgets.", + "editorSuggestWidgetForeground": "Vordergrundfarbe des Vorschlagswidgets.", + "editorSuggestWidgetSelectedBackground": "Hintergrundfarbe des ausgewählten Eintrags im Vorschlagswidget.", + "editorSuggestWidgetHighlightForeground": "Farbe der Trefferhervorhebung im Vorschlagswidget.", "readMore": "Mehr anzeigen...{0}", "suggestionWithDetailsAriaLabel": "{0}, Vorschlag, hat Details", "suggestionAriaLabel": "{0}, Vorschlag", diff --git a/i18n/deu/src/vs/platform/environment/node/argv.i18n.json b/i18n/deu/src/vs/platform/environment/node/argv.i18n.json index 8104fc70ba050..058d98933af62 100644 --- a/i18n/deu/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/deu/src/vs/platform/environment/node/argv.i18n.json @@ -20,6 +20,7 @@ "showVersions": "Zeigt Versionen der installierten Erweiterungen an, wenn \"--list-extension\" verwendet wird.", "installExtension": "Installiert eine Extension.", "uninstallExtension": "Deinstalliert eine Extension.", + "experimentalApis": "Aktiviert vorgeschlagene API-Features für eine Erweiterung.", "disableExtensions": "Deaktiviert alle installierten Extensions.", "disableGPU": "Deaktiviert die GPU-Hardwarebeschleunigung.", "version": "Gibt die Version aus.", diff --git a/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json index feac598aaf2a0..cbffdc177519f 100644 --- a/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -7,15 +7,41 @@ "invalid.color": "Ungültiges Farbformat. Verwenden Sie #RGB, #RGBA, #RRGGBB oder #RRGGBBAA.", "schema.colors": "In der Workbench verwendete Farben.", "foreground": "Allgemeine Vordergrundfarbe. Diese Farbe wird nur verwendet, wenn sie nicht durch eine Komponente überschrieben wird.", + "focusBorder": "Allgemeine Rahmenfarbe für fokussierte Elemente. Diese Farbe wird nur verwendet, wenn sie nicht durch eine Komponente überschrieben wird.", + "contrastBorder": "Ein zusätzlicher Rahmen um Elemente, mit dem diese von anderen getrennt werden, um einen größeren Kontrast zu erreichen.", + "activeContrastBorder": "Ein zusätzlicher Rahmen um aktive Elemente, mit dem diese von anderen getrennt werden, um einen größeren Kontrast zu erreichen.", + "widgetShadow": "Schattenfarbe von Widgets wie zum Beispiel Suchen/Ersetzen innerhalb des Editors.", "inputBoxBackground": "Hintergrund für Eingabefeld.", "inputBoxForeground": "Vordergrund für Eingabefeld.", "inputBoxBorder": "Rahmen für Eingabefeld.", "inputBoxActiveOptionBorder": "Rahmenfarbe für aktivierte Optionen in Eingabefeldern.", + "inputValidationInfoBackground": "Hintergrundfarbe bei der Eingabevalidierung für den Schweregrad der Information.", + "inputValidationInfoBorder": "Rahmenfarbe bei der Eingabevalidierung für den Schweregrad der Information.", + "inputValidationWarningBackground": "Hintergrundfarbe bei der Eingabevalidierung für eine Warnung zur Information.", + "inputValidationWarningBorder": "Rahmenfarbe bei der Eingabevalidierung für den Schweregrad der Warnung.", + "inputValidationErrorBackground": "Hintergrundfarbe bei der Eingabevalidierung für den Schweregrad des Fehlers.", + "inputValidationErrorBorder": "Rahmenfarbe bei der Eingabevalidierung für den Schweregrad des Fehlers.", "dropdownBackground": "Hintergrund für Dropdown.", "dropdownForeground": "Vordergrund für Dropdown.", "dropdownBorder": "Rahmen für Dropdown.", + "listFocusBackground": "Hintergrundfarbe der Liste/Struktur für das fokussierte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", + "listActiveSelectionBackground": "Hintergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", + "listInactiveSelectionBackground": "Hintergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur inaktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", + "listActiveSelectionForeground": "Vordergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", + "listFocusAndSelectionBackground": "Hintergrundfarbe der Liste/Struktur für das fokussierte und ausgewählte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht. Diese Farbe hat Vorrang vor der individuellen Auswahl und den Fokusfarben.", + "listFocusAndSelectionForeground": "Vordergrundfarbe der Liste/Struktur für das fokussierte und ausgewählte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht. Diese Farbe hat Vorrang vor der individuellen Auswahl und den Fokusfarben.", + "listHoverBackground": "Hintergrund der Liste/Struktur, wenn mit der Maus auf Elemente gezeigt wird.", + "listDropBackground": "Drag & Drop-Hintergrund der Liste/Struktur, wenn Elemente mithilfe der Maus verschoben werden.", + "highlight": "Vordergrundfarbe der Liste/Struktur zur Trefferhervorhebung beim Suchen innerhalb der Liste/Struktur.", "pickerGroupForeground": "Schnellauswahlfarbe für das Gruppieren von Bezeichnungen.", "pickerGroupBorder": "Schnellauswahlfarbe für das Gruppieren von Rahmen.", + "buttonForeground": "Vordergrundfarbe der Schaltfläche.", + "buttonBackground": "Hintergrundfarbe der Schaltfläche.", + "buttonHoverBackground": "Hintergrundfarbe der Schaltfläche, wenn darauf gezeigt wird.", + "scrollbarShadow": "Schatten der Scrollleiste, um anzuzeigen, dass die Ansicht gescrollt wird.", + "scrollbarSliderBackground": "Hintergrundfarbe des Schiebereglers.", + "scrollbarSliderHoverBackground": "Hintergrundfarbe des Schiebereglers, wenn darauf gezeigt wird.", + "scrollbarSliderActiveBackground": "Hintergrundfarbe des Schiebereglers, wenn dieser aktiv ist.", "editorBackground": "Hintergrundfarbe des Editors.", "editorForeground": "Standardvordergrundfarbe des Editors.", "editorSelection": "Farbe der Editor-Auswahl.", diff --git a/i18n/deu/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 818cf12465ed1..fa4ed40683448 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -44,6 +44,8 @@ "openPreviousRecentlyUsedEditorInGroup": "Vorherigen zuletzt verwendeten Editor in der Gruppe öffnen", "openNextRecentlyUsedEditorInGroup": "Nächsten zuletzt verwendeten Editor in der Gruppe öffnen", "navigateEditorHistoryByInput": "Vorherigen Editor aus Verlauf öffnen", + "openNextRecentlyUsedEditor": "Nächsten zuletzt verwendeten Editor öffnen", + "openPreviousRecentlyUsedEditor": "Vorherigen zuletzt verwendeten Editor öffnen", "clearEditorHistory": "Editor-Verlauf löschen", "focusLastEditorInStack": "Letzten Editor in der Gruppe öffnen", "moveEditorLeft": "Editor nach links verschieben", diff --git a/i18n/deu/src/vs/workbench/common/theme.i18n.json b/i18n/deu/src/vs/workbench/common/theme.i18n.json index 0fcf7d8cb71fd..3fab9e56ce5bd 100644 --- a/i18n/deu/src/vs/workbench/common/theme.i18n.json +++ b/i18n/deu/src/vs/workbench/common/theme.i18n.json @@ -12,8 +12,11 @@ "tabActiveEditorGroupInactiveForeground": "Vordergrundfarbe der aktiven Registerkarte in einer inaktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", "tabInactiveEditorGroupActiveForeground": "Vordergrundfarbe der inaktiven Registerkarte in einer aktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", "tabInactiveEditorGroupInactiveForeground": "Vordergrundfarbe der inaktiven Registerkarte in einer inaktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", + "editorGroupBackground": "Hintergrundfarbe einer Editor-Gruppe. Editor-Gruppen sind die Container der Editoren. Die Hintergrundfarbe wird beim Ziehen von Editoren angezeigt.", + "editorGroupHeaderBackground": "Hintergrundfarbe der Titelüberschrift des Editors, wenn die Registerkarten deaktiviert sind. Editor-Gruppen sind die Container der Editoren.", "editorGroupBorder": "Farbe zum Trennen mehrerer Editor-Gruppen. Editor-Gruppen sind die Container der Editoren.", "editorDragAndDropBackground": "Hintergrundfarbe beim Ziehen von Editoren.", + "editorMasterDetailsBorder": "Rahmenfarbe zum Trennen der Details der Masterseite für Editoren mit der Ansicht \"Nebeneinander\". Beispiele sind etwa Diff-Editoren und der Einstellungseditor.", "panelBackground": "Hintergrundfarbe des Panels. Panels werden unter dem Editorbereich angezeigt und enthalten Ansichten wie die Ausgabe und das integrierte Terminal.", "panelBorder": "Farbe des oberen Panelrahmens, der das Panel vom Editor abtrennt. Panels werden unter dem Editorbereich angezeigt und enthalten Ansichten wie die Ausgabe und das integrierten Terminal.", "panelActiveTitleForeground": "Titelfarbe für den aktiven Bereich. Bereiche werden unter dem Editorbereich angezeigt und enthalten Ansichten wie Ausgabe und integriertes Terminal.", @@ -24,6 +27,8 @@ "statusBarNoFolderBackground": "Hintergrundfarbe der Statusleiste, wenn kein Ordner geöffnet ist. Die Statusleiste wird unten im Fenster angezeigt.", "statusBarItemActiveBackground": "Hintergrundfarbe für Statusleistenelemente beim Klicken. Die Statusleiste wird am unteren Rand des Fensters angezeigt.", "statusBarItemHoverBackground": "Hintergrundfarbe der Statusleistenelemente beim Daraufzeigen. Die Statusleiste wird am unteren Seitenrand angezeigt.", + "statusBarProminentItemBackground": "Hintergrundfarbe für markante Elemente der Statusleiste. Markante Elemente sind im Vergleich zu anderen Statusleisteneinträgen hervorgehoben, um auf ihre Bedeutung hinzuweisen. Die Statusleiste wird unten im Fenster angezeigt.", + "statusBarProminentItemHoverBackground": "Hintergrundfarbe für markante Elemente der Statusleiste, wenn auf diese gezeigt wird. Markante Elemente sind im Vergleich zu anderen Statusleisteneinträgen hervorgehoben, um auf ihre Bedeutung hinzuweisen. Die Statusleiste wird unten im Fenster angezeigt.", "activityBarBackground": "Hintergrundfarbe der Aktivitätsleiste. Die Aktivitätsleiste wird ganz links oder rechts angezeigt und ermöglicht das Wechseln zwischen verschiedenen Ansichten der Seitenleiste.", "activityBarForeground": "Vordergrundfarbe der Aktivitätsleiste (z. B. für Symbole). Die Aktivitätsleiste wird ganz links oder rechts angezeigt und ermöglicht das Wechseln zwischen verschiedenen Ansichten der Seitenleiste.", "activityBarDragAndDropBackground": "Drag Drop-Feedbackfarbe für Elemente der Aktivitätsleiste. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", @@ -31,8 +36,11 @@ "activityBarBadgeForeground": "Vordergrundfarbe für Aktivitätsinfobadge. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", "sideBarBackground": "Hintergrundfarbe der Seitenleiste. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", "sideBarTitleForeground": "Vordergrundfarbe der Seitenleiste. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", + "sideBarSectionHeaderBackground": "Hintergrundfarbe der Abschnittsüberschrift der Seitenleiste. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", "titleBarActiveForeground": "Vordergrund der Titelleiste, wenn das Fenster aktiv ist. Diese Farbe wird derzeit nur von MacOS unterstützt.", "titleBarInactiveForeground": "Vordergrund der Titelleiste, wenn das Fenster inaktiv ist. Diese Farbe wird derzeit nur von MacOS unterstützt.", "titleBarActiveBackground": "Hintergrund der Titelleiste, wenn das Fenster aktiv ist. Diese Farbe wird derzeit nur von MacOS unterstützt.", - "titleBarInactiveBackground": "Hintergrund der Titelleiste, wenn das Fenster inaktiv ist. Diese Farbe wird derzeit nur von MacOS unterstützt." + "titleBarInactiveBackground": "Hintergrund der Titelleiste, wenn das Fenster inaktiv ist. Diese Farbe wird derzeit nur von MacOS unterstützt.", + "notificationsForeground": "Vordergrundfarbe für Benachrichtigungen. Benachrichtigungen werden oben im Fenster eingeblendet.", + "notificationsBackground": "Hintergrundfarbe für Benachrichtigungen. Benachrichtigungen werden oben im Fenster eingeblendet." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index 8b6ad71cd4e6d..60061e8550449 100644 --- a/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "workbench.action.inspectKeyMap": "Entwickler: Wichtige Zuordnungen prüfen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index c2e596b32963a..11b3d69c656dc 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -34,6 +34,7 @@ "editConditionalBreakpoint": "Haltepunkt bearbeiten...", "setValue": "Wert festlegen", "addWatchExpression": "Ausdruck hinzufügen", + "editWatchExpression": "Ausdruck bearbeiten", "addToWatchExpressions": "Zur Überwachung hinzufügen", "removeWatchExpression": "Ausdruck entfernen", "removeAllWatchExpressions": "Alle Ausdrücke entfernen", diff --git a/i18n/deu/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json index 8b6ad71cd4e6d..e3b17702d867e 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "debugToolBarBackground": "Hintergrundfarbe der Debug-Symbolleiste." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 213056c17ed22..7f72591cc14a9 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "Die ausführbare Datei \"{0}\" des Debugadapters ist nicht vorhanden.", "debugAdapterCannotDetermineExecutable": "Die ausführbare Datei \"{0}\" des Debugadapters kann nicht bestimmt werden.", "debugType": "Der Typ der Konfiguration.", + "debugTypeNotRecognised": "Dieser Debugging-Typ wurde nicht erkannt. Bitte installiere die dazugehörige Debugging-Erweiterung.", "node2NotSupported": "\"node2\" wird nicht mehr unterstützt, verwenden Sie stattdessen \"node\", und legen Sie das Attribut \"protocol\" auf \"inspector\" fest.", "debugName": "Der Name der Konfiguration. Er wird im Dropdownmenü der Startkonfiguration angezeigt.", "debugRequest": "Der Anforderungstyp der Konfiguration. Der Wert kann \"launch\" oder \"attach\" sein.", diff --git a/i18n/deu/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 83d8c9273d19a..88f9247b746a4 100644 --- a/i18n/deu/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,6 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "vscode.extension.contributes.view": "Trägt eine benutzerdefinierte Ansicht bei", + "vscode.extension.contributes.view.id": "Eindeutige ID zum Identifizieren der über vscode.workspace.createTreeView erstellten Ansicht", + "vscode.extension.contributes.view.label": "Visuell lesbare Zeichenfolge zum Rendern der Ansicht", + "vscode.extension.contributes.view.icon": "Pfad zum Ansichtssymbol", + "vscode.extension.contributes.views": "Trägt benutzerdefinierte Ansichten bei", "showViewlet": "{0} anzeigen", "view": "Anzeigen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index b3f77a860dbb7..157325389a5f2 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "Benutzereinstellungen öffnen", "openGlobalKeybindings": "Tastaturkurzbefehle öffnen", + "openGlobalKeybindingsFile": "Datei mit Tastaturkurzbefehlen öffnen", "openWorkspaceSettings": "Arbeitsbereichseinstellungen öffnen", "configureLanguageBasedSettings": "Sprachspezifische Einstellungen konfigurieren...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 5eb77bdab0b95..49ebe70befe15 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,6 +9,7 @@ "ConfigureTaskRunnerAction.quickPick.template": "Taskausführung auswählen", "ConfigureTaskRunnerAction.autoDetecting": "Tasks für {0} werden automatisch erkannt.", "ConfigureTaskRunnerAction.autoDetect": "Fehler bei der automatischen Erkennung des Tasksystems. Die Standardvorlage wird verwendet. Einzelheiten finden Sie in der Taskausgabe.", + "ConfigureTaskRunnerAction.autoDetectError": "Bei der automatischen Erkennung des Tasksystems sind Fehler aufgetreten. Einzelheiten finden Sie in der Taskausgabe.", "ConfigureTaskRunnerAction.failed": "Die Datei \"tasks.json\" kann nicht im Ordner \".vscode\" erstellt werden. Einzelheiten finden Sie in der Taskausgabe.", "ConfigureTaskRunnerAction.label": "Taskausführung konfigurieren", "ConfigureBuildTaskAction.label": "Buildtask konfigurieren", diff --git a/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index f973ef7e79841..30cc79ff848c0 100644 --- a/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,6 +14,7 @@ "noIconThemeDesc": "Dateisymbole deaktivieren", "problemChangingIconTheme": "Problem beim Festlegen des Symboldesigns: {0}", "themes.selectIconTheme": "Dateisymboldesign auswählen", + "generateColorTheme.label": "Farbdesign aus aktuellen Einstellungen erstellen", "preferences": "Einstellungen", "developer": "Entwickler" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/deu/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index 72f6389099983..197be5e3800c3 100644 --- a/i18n/deu/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "Ungebunden" + "walkThrough.unboundCommand": "Ungebunden", + "walkThrough.gitNotFound": "Git scheint auf Ihrem System nicht installiert zu sein." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/deu/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index 125841ae8560e..132f19f4c7b82 100644 --- a/i18n/deu/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/deu/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "Farben für die Syntaxhervorhebung", "schema.properties.name": "Beschreibung der Regel", - "schema.fontStyle": "Schriftschnitt der Regel: kursiv, fett und unterstrichen (einzeln oder in Kombination)" + "schema.fontStyle": "Schriftschnitt der Regel: kursiv, fett und unterstrichen (einzeln oder in Kombination)", + "schema.tokenColors.path": "Pfad zu einer tmTheme-Designdatei (relativ zur aktuellen Datei)" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/deu/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index ef53547d99319..2d04a1d985b58 100644 --- a/i18n/deu/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/deu/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,5 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "Probleme beim Analysieren der JSON-Designdatei: {0}" + "error.cannotparsejson": "Probleme beim Analysieren der JSON-Designdatei: {0}", + "error.invalidformat.colors": "Probleme beim Analysieren der Farbdesigndatei: {0}. Die Eigenschaft \"colors\" ist nicht vom Typ \"object\".", + "error.invalidformat.tokenColors": "Probleme beim Analysieren der Farbdesigndatei: {0}. Die Eigenschaft \"tokenColors\" muss entweder ein Array sein, das Farben angibt, oder ein Pfad zu einer TextMate-Designdatei.", + "error.plist.invalidformat": "Probleme beim Analysieren der tmTheme-Designdatei: {0}. \"settings\" ist kein Array", + "error.cannotparse": "Probleme beim Analysieren der tmTheme-Designdatei: {0}", + "error.cannotload": "Probleme beim Laden der tmTheme-Designdatei {0}: {1}" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/deu/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index e0608f319714d..f9fa891eed388 100644 --- a/i18n/deu/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,5 +25,8 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed." + "iconThemeError": "File icon theme is unknown or not installed.", + "workbenchColors": "Überschreibt Farben aus dem derzeit ausgewählte Farbdesign.", + "workbenchColors.deprecated": "Diese Einstellung ist nicht mehr experimentell und wurde in \"workbench.colorCustomizations\" umbenannt.", + "workbenchColors.deprecatedDescription": "Verwenden Sie stattdessen \"workbench.colorCustomizations\"." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/common/theme.i18n.json b/i18n/esn/src/vs/workbench/common/theme.i18n.json index 833a10e06c034..c6ab3bc258a0a 100644 --- a/i18n/esn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/esn/src/vs/workbench/common/theme.i18n.json @@ -13,8 +13,10 @@ "tabInactiveEditorGroupActiveForeground": "Color de primer plano de la pestaña inactiva en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "tabInactiveEditorGroupInactiveForeground": "Color de primer plano de la pestaña inactiva en un grupo inactivo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "editorGroupBackground": "Color de fondo de un grupo de editores. Los grupos de editores son los contenedores de los editores. El color de fondo se ve cuando se mueven arrastrando los grupos de editores.", + "editorGroupHeaderBackground": "Color de fondo del encabezado del título del grupo de editores cuando las fichas están deshabilitadas. Los grupos de editores son contenedores de editores.", "editorGroupBorder": "Color para separar varios grupos de editores entre sí. Los grupos de editores son los contenedores de los editores.", "editorDragAndDropBackground": "Color de fondo cuando se arrastran editores.", + "editorMasterDetailsBorder": "Color del borde para separar los detalles del lado maestro de editores en paralelo, por ejemplo el editor de diff y el de configuración.", "panelBackground": "Color de fondo del panel. Los paneles se muestran debajo del área de editores y contienen vistas, como Salida y Terminal integrado.", "panelBorder": "Color del borde superior del panel que lo separa del editor. Los paneles se muestran debajo del área de editores y contienen vistas, como Salida y Terminal integrado.", "panelActiveTitleForeground": "Color del título del panel activo. Los paneles se muestran debajo del área del editor y contienen vistas como Salida y Terminal integrado.", @@ -25,6 +27,8 @@ "statusBarNoFolderBackground": "Color de fondo de la barra de estado cuando no hay ninguna carpeta abierta. La barra de estado se muestra en la parte inferior de la ventana.", "statusBarItemActiveBackground": "Color de fondo de un elemento de la barra de estado al hacer clic. La barra de estado se muestra en la parte inferior de la ventana.", "statusBarItemHoverBackground": "Color de fondo de un elemento de la barra de estado al mantener el puntero. La barra de estado se muestra en la parte inferior de la ventana.", + "statusBarProminentItemBackground": "Color de fondo de los elementos destacados en la barra de estado. Estos elementos sobresalen para indicar importancia. La barra de estado está ubicada en la parte inferior de la ventana.", + "statusBarProminentItemHoverBackground": "Color de fondo de los elementos destacados en la barra de estado cuando se mantiene el mouse sobre estos elementos. Estos elementos sobresalen para indicar importancia. La barra de estado está ubicada en la parte inferior de la ventana.", "activityBarBackground": "Color de fondo de la barra de actividad, que se muestra en el lado izquierdo o derecho y que permite cambiar entre diferentes vistas de la barra lateral.", "activityBarForeground": "Color de fondo de la barra de actividad (por ejemplo utilizado por los iconos). La barra de actividad muestra en el lado izquierdo o derecho y permite cambiar entre diferentes vistas de la barra lateral.", "activityBarDragAndDropBackground": "Color de arrastrar y colocar comentarios de la barra de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", @@ -32,8 +36,11 @@ "activityBarBadgeForeground": "Color de primer plano de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", "sideBarBackground": "Color de fondo de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", "sideBarTitleForeground": "Color de primer plano del título de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", + "sideBarSectionHeaderBackground": "Color de fondo del encabezado de sección de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", "titleBarActiveForeground": "Color de primer plano de la barra de título cuando la ventana está activa. Tenga en cuenta que, actualmente, este clor solo se admite en macOS.", "titleBarInactiveForeground": "Color de primer plano de la barra de título cuando la ventana está inactiva. Tenga en cuenta que, actualmente, este color solo se admite en macOS.", "titleBarActiveBackground": "Fondo de la barra de título cuando la ventana está activa. Tenga en cuenta que, actualmente, este color solo se admite en macOS.", - "titleBarInactiveBackground": "Color de fondo de la barra de título cuando la ventana está inactiva. Tenga en cuenta que, actualmente, este color solo se admite en macOS." + "titleBarInactiveBackground": "Color de fondo de la barra de título cuando la ventana está inactiva. Tenga en cuenta que, actualmente, este color solo se admite en macOS.", + "notificationsForeground": "Color de primer plano de las notificaciones. Estas se deslizan en la parte superior de la ventana. ", + "notificationsBackground": "Color de fondo de las notificaciones. Estas se deslizan en la parte superior de la ventana. " } \ No newline at end of file diff --git a/i18n/ita/extensions/git/out/commands.i18n.json b/i18n/ita/extensions/git/out/commands.i18n.json index 341133e58276a..8e28758d2344f 100644 --- a/i18n/ita/extensions/git/out/commands.i18n.json +++ b/i18n/ita/extensions/git/out/commands.i18n.json @@ -16,6 +16,8 @@ "confirm discard": "Rimuovere le modifiche in {0}?", "confirm discard multiple": "Rimuovere le modifiche in {0} file?", "discard": "Rimuovi modifiche", + "confirm discard all": "Sei sicuro di voler annullare TUTTE le modifiche? Quest'azione è IRREVERSIBILE!", + "discardAll": "Rimuovi TUTTE le modifiche", "no changes": "Non ci sono modifiche di cui eseguire il commit.", "commit message": "Messaggio di commit", "provide commit message": "Specificare un messaggio di commit", @@ -31,6 +33,7 @@ "no remotes to publish": "Il repository non contiene elementi remoti configurati come destinazione della pubblicazione.", "disabled": "GIT è disabilitato oppure non supportato in quest'area di lavoro", "clean repo": "Pulire l'albero di lavoro del repository prima dell'estrazione.", + "cant push": "Impossibile effettuare il push in remoto. Effettua prima un 'pull' per integrare le tue modifiche.", "git error details": "GIT: {0}", "git error": "Errore GIT", "open git log": "Apri log GIT" diff --git a/i18n/ita/extensions/git/package.i18n.json b/i18n/ita/extensions/git/package.i18n.json index c514f38f714d7..ec477ab6861ac 100644 --- a/i18n/ita/extensions/git/package.i18n.json +++ b/i18n/ita/extensions/git/package.i18n.json @@ -9,11 +9,14 @@ "command.refresh": "Aggiorna", "command.openChange": "Apri modifiche", "command.openFile": "Apri file", + "command.stage": "Prepara modifiche per commit", + "command.stageAll": "Prepara tutte le modifiche per commit", "command.stageSelectedRanges": "Prepara per il commit intervalli selezionati", "command.revertSelectedRanges": "Ripristina intervalli selezionati", "command.unstage": "Annulla preparazione modifiche per commit", "command.unstageAll": "Annulla preparazione di tutte le modifiche per commit", "command.unstageSelectedRanges": "Annulla preparazione per il commit di intervalli selezionati", + "command.clean": "Rimuovi modifiche", "command.cleanAll": "Rimuovi tutte le modifiche", "command.commit": "Commit", "command.commitStaged": "Esegui commit dei file preparati", @@ -36,6 +39,8 @@ "config.autofetch": "Indica se il recupero automatico è abilitato", "config.enableLongCommitWarning": "Indica se visualizzare un avviso in caso di messaggi di commit lunghi", "config.confirmSync": "Conferma prima di sincronizzare i repository GIT", + "config.countBadge": "Controlla il contatore delle notifiche git. Con `all` vengono conteggiate tutte le modifiche. Con `tracked` vengono conteggiate solo le revisioni. Con `off` il contatore è disattivato.", + "config.checkoutType": "Controlla il tipo di branch mostrati eseguendo il comando `Checkout in...`. `all` mostra tutti i refs, `local` mostra solamente i branch locali, `tags` mostra solamente i tag e `remote` mostra solamente i branch remoti.", "config.ignoreLegacyWarning": "Ignora l'avvertimento legacy di Git", "config.ignoreLimitWarning": "Ignora il messaggio di avviso quando ci sono troppi cambiamenti in un repository" } \ No newline at end of file diff --git a/i18n/ita/extensions/gulp/package.i18n.json b/i18n/ita/extensions/gulp/package.i18n.json index 8b6ad71cd4e6d..c9bd05d8b6272 100644 --- a/i18n/ita/extensions/gulp/package.i18n.json +++ b/i18n/ita/extensions/gulp/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.gulp.autoDetect": "Controlla se la rilevazione automatica delle attività gulp è on/off. L'impostazione predefinita è 'on'." +} \ No newline at end of file diff --git a/i18n/ita/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/ita/extensions/typescript/out/utils/typingsStatus.i18n.json index 4cc0b902ae3ef..ede347b577631 100644 --- a/i18n/ita/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/ita/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Recupero dei dati per ottimizzare IntelliSense in TypeScript", + "typesInstallerInitializationFailed.title": "Non è stato possibile installare i file di definizione tipi per le funzionalità del linguaggio JavaScript. Verificare che NPM sia installato e che sia incluso nel PATH", "typesInstallerInitializationFailed.moreInformation": "Altre informazioni", "typesInstallerInitializationFailed.doNotCheckAgain": "Non eseguire più la verifica", "typesInstallerInitializationFailed.close": "Chiudi" diff --git a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json index 92990d65a8a1b..8b28f9f169f77 100644 --- a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -24,6 +24,12 @@ "dropdownBackground": "Sfondo dell'elenco a discesa.", "dropdownForeground": "Primo piano dell'elenco a discesa.", "dropdownBorder": "Bordo dell'elenco a discesa.", + "listFocusBackground": "Colore sfondo Elenco/Struttura ad albero per l'elemento evidenziato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", + "listActiveSelectionBackground": "Colore sfondo Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", + "listInactiveSelectionBackground": "Colore sfondo Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è inattivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", + "listActiveSelectionForeground": "Colore primo piano Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", + "listFocusAndSelectionBackground": "Colore sfondo Elenco/Struttura ad albero per l'elemento evidenziato e selezionato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no. Questo colore ha la precedenza su colori specificati singolarmente per selezione e focus.", + "listFocusAndSelectionForeground": "Colore primo piano Elenco/Struttura ad albero per l'elemento evidenziato e selezionato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no. Questo colore ha la precedenza su colori specificati singolarmente per selezione e focus.", "listHoverBackground": "Sfondo Elenco/Struttura ad albero al passaggio del mouse sugli elementi.", "listDropBackground": "Sfondo Elenco/Struttura ad albero durante il trascinamento degli elementi selezionati.", "highlight": "Colore primo piano Elenco/Struttura ad albero delle occorrenze trovate durante la ricerca nell'Elenco/Struttura ad albero.", diff --git a/i18n/ita/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/ita/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 5bfe3f067f450..7f7ba33c59baa 100644 --- a/i18n/ita/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -44,6 +44,8 @@ "openPreviousRecentlyUsedEditorInGroup": "Apri editor precedente usato di recente nel gruppo", "openNextRecentlyUsedEditorInGroup": "Apri editor successivo usato di recente nel gruppo", "navigateEditorHistoryByInput": "Apri editor precedente dalla cronologia", + "openNextRecentlyUsedEditor": "Apri editor successivo usato di recente", + "openPreviousRecentlyUsedEditor": "Apri editor precedente usato di recente", "clearEditorHistory": "Cancella cronologia degli editor", "focusLastEditorInStack": "Apri ultimo editor del gruppo", "moveEditorLeft": "Sposta editor a sinistra", diff --git a/i18n/ita/src/vs/workbench/common/theme.i18n.json b/i18n/ita/src/vs/workbench/common/theme.i18n.json index b194775f97923..ea57126fbcd24 100644 --- a/i18n/ita/src/vs/workbench/common/theme.i18n.json +++ b/i18n/ita/src/vs/workbench/common/theme.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "Colore di sfondo del contenitore delle scehde. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", + "tabsContainerBackground": "Colore di sfondo del contenitore delle schede. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "tabActiveBackground": "Colore di sfondo delle schede attive. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "tabInactiveBackground": "Colore di sfondo delle schede inattive. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "tabBorder": "Bordo per separare le schede l'una dall'altra. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", @@ -12,8 +12,11 @@ "tabActiveEditorGroupInactiveForeground": "Colore di primo piano delle schede attive in un gruppo inattivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "tabInactiveEditorGroupActiveForeground": "Colore di primo piano delle schede inattive in un gruppo attivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "tabInactiveEditorGroupInactiveForeground": "Colore di primo piano delle schede inattiva in un gruppo inattivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", + "editorGroupBackground": "Colore di sfondo di un gruppo di editor. I gruppi di editor sono contenitori di editor. Il colore di sfondo viene visualizzato quando si trascinano i gruppi di editor in un'altra posizione.", + "editorGroupHeaderBackground": "Colore di sfondo dell'intestazione del titolo dell'editor quando le schede sono disabilitate. I gruppi di editor sono contenitori di editor.", "editorGroupBorder": "Colore per separare più gruppi di editor l'uno dall'altro. I gruppi di editor sono i contenitori degli editor.", "editorDragAndDropBackground": "Colore di sfondo durante lo spostamento degli editor.", + "editorMasterDetailsBorder": "Colore del bordo per separare i dettagli dal lato master per gli editor affiancati. Gli esempi includono editor diff e l'editor impostazioni.", "panelBackground": "Colore di sfondo dei pannelli. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e del terminale integrato.", "panelBorder": "Colore del bordo dei pannelli nella parte superiore di separazione dall'editor. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e del terminale integrato.", "panelActiveTitleForeground": "Colore del titolo del pannello attivo. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e quella del terminale integrato.", @@ -24,6 +27,8 @@ "statusBarNoFolderBackground": "Colore di sfondo della barra di stato quando non ci sono cartelle aperte. La barra di stato è visualizzata nella parte inferiore della finestra.", "statusBarItemActiveBackground": "Colore di sfondo degli elementi della barra di stato quando si fa clic. La barra di stato è visualizzata nella parte inferiore della finestra.", "statusBarItemHoverBackground": "Colore di sfondo degli elementi della barra di stato al passaggio del mouse. La barra di stato è visualizzata nella parte inferiore della finestra.", + "statusBarProminentItemBackground": "Colore di sfondo degli elementi rilevanti della barra di stato. Gli elementi rilevanti spiccano rispetto ad altre voci della barra di stato. La barra di stato è visualizzata nella parte inferiore della finestra.", + "statusBarProminentItemHoverBackground": "Colore di sfondo degli elementi rilevanti della barra di stato al passaggio del mouse. Gli elementi rilevanti spiccano rispetto ad altre voci della barra di stato. La barra di stato è visualizzata nella parte inferiore della finestra.", "activityBarBackground": "Colore di sfondo della barra attività. La barra attività viene visualizzata nella parte inferiore sinistra/destra e consente il passaggio tra diverse visualizzazioni della barra laterale", "activityBarForeground": "Colore primo piano della barra attività (ad es. quello utilizzato per le icone). La barra attività viene mostrata all'estrema sinistra o destra e permette di alternare le visualizzazioni della barra laterale.", "activityBarDragAndDropBackground": "Colore feedback drag and drop degli elementi della barra attività. La barra attività viene visualizzata nella parte inferiore sinistra/destra e consente il passaggio tra diverse visualizzazioni della barra laterale", @@ -31,8 +36,11 @@ "activityBarBadgeForeground": "Colore primo piano della notifica utente dell'attività. La barra attività viene visualizzata all'estrema sinistra o all'estrema destra e consente di spostarsi tra le visualizzazioni della barra laterale.", "sideBarBackground": "Colore di sfondo della barra laterale. La barra laterale è il contenitore per visualizzazioni come Explorer e ricerca.", "sideBarTitleForeground": "Colore primo piano del titolo della barra laterale. La barra laterale è il contenitore per visualizzazioni come Explorer e ricerca.", + "sideBarSectionHeaderBackground": "Colore di sfondo dell'intestazione di sezione della barra laterale. La barra laterale è il contenitore di visualizzazioni quali Esplora risorse e Cerca.", "titleBarActiveForeground": "Colore primo piano della barra del titolo quando la finestra è attiva. Si noti che questo colore è attualmente supportato solo su macOS.", "titleBarInactiveForeground": "Colore primo piano della barra del titolo quando la finestra è inattiva. Si noti che questo colore è attualmente supportato solo su macOS.", "titleBarActiveBackground": "Colore di sfondo della barra di titolo quando la finestra è attiva. Si noti che questo colore è attualmente solo supportati su macOS.", - "titleBarInactiveBackground": "Colore di sfondo della barra del titolo quando la finestra è inattiva. Si noti che questo colore è attualmente supportato solo su macOS." + "titleBarInactiveBackground": "Colore di sfondo della barra del titolo quando la finestra è inattiva. Si noti che questo colore è attualmente supportato solo su macOS.", + "notificationsForeground": "Colore primo piano delle notifiche. Le notifiche scorrono dalla parte superiore della finestra.", + "notificationsBackground": "Colore di sfondo delle notifiche. Le notifiche scorrono dalla parte superiore della finestra." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index 8b6ad71cd4e6d..e11f9e61fe085 100644 --- a/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "workbench.action.inspectKeyMap": "Sviluppatore: controlla mapping tasti" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index f0e210641bfd9..d4c6f2a648693 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -34,6 +34,7 @@ "editConditionalBreakpoint": "Modifica punto di interruzione...", "setValue": "Imposta valore", "addWatchExpression": "Aggiungi espressione", + "editWatchExpression": "Modifica espressione", "addToWatchExpressions": "Aggiungi a espressione di controllo", "removeWatchExpression": "Rimuovi espressione", "removeAllWatchExpressions": "Rimuovi tutte le espressioni", diff --git a/i18n/ita/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json index 8b6ad71cd4e6d..2e0a0d42956f6 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "debugToolBarBackground": "Colore di sfondo della barra degli strumenti di debug." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 2018bb4806656..1c2127860d591 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "Il file eseguibile '{0}' dell'adattatore di debug non esiste.", "debugAdapterCannotDetermineExecutable": "Non è possibile determinare il file eseguibile per l'adattatore di debug '{0}'.", "debugType": "Tipo di configurazione.", + "debugTypeNotRecognised": "Questo tipo di debug non è riconosciuto. Installare l'estensione di debug corrispondente.", "node2NotSupported": "\"node2\" non è più supportato. In alternativa, usare \"node\" e impostare l'attributo \"protocol\" su \"inspector\".", "debugName": "Nome della configurazione. Viene visualizzato nel menu a discesa della configurazione di avvio.", "debugRequest": "Tipo della richiesta di configurazione. Può essere \"launch\" o \"attach\".", diff --git a/i18n/ita/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 0a33d9bea9907..8dbebb2e4a72b 100644 --- a/i18n/ita/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,6 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "vscode.extension.contributes.view": "Visualizzazione personalizzata per contributes", + "vscode.extension.contributes.view.id": "ID univoco usato per identificare la visualizzazione creata tramite vscode.workspace.createTreeView", + "vscode.extension.contributes.view.label": "Stringa leggibile usata per il rendering della visualizzazione", + "vscode.extension.contributes.view.icon": "Percorso dell'icona della visualizzazione", + "vscode.extension.contributes.views": "Visualizzazioni personalizzate per contributes", "showViewlet": "Mostra {0}", "view": "Visualizza" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 8fa5a9b9b2aee..12a31fb4c16d1 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "Apri impostazioni utente", "openGlobalKeybindings": "Apri tasti di scelta rapida", + "openGlobalKeybindingsFile": "Apri file dei tasti di scelta rapida", "openWorkspaceSettings": "Apri impostazioni area di lavoro", "configureLanguageBasedSettings": "Configura impostazioni specifiche del linguaggio...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index fabad77044f3c..9ff412434bcf0 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,6 +9,7 @@ "ConfigureTaskRunnerAction.quickPick.template": "Seleziona strumento di esecuzione attività", "ConfigureTaskRunnerAction.autoDetecting": "Rilevamento automatico delle attività per {0}", "ConfigureTaskRunnerAction.autoDetect": "Il rilevamento automatico del sistema dell'attività non è riuscito. Verrà usato il modello predefinito. Per i dettagli, vedere l'output dell'attività.", + "ConfigureTaskRunnerAction.autoDetectError": "Il rilevamento automatico del sistema dell'attività ha restituito errori. Per i dettagli, vedere l'output dell'attività.", "ConfigureTaskRunnerAction.failed": "Non è possibile creare il file 'tasks.json' all'interno della cartella '.vscode'. Per dettagli, vedere l'output dell'attività.", "ConfigureTaskRunnerAction.label": "Configura esecuzione attività", "ConfigureBuildTaskAction.label": "Configura attività di compilazione", diff --git a/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index f598673f2ce06..823156a484285 100644 --- a/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,6 +14,7 @@ "noIconThemeDesc": "Disabilita le icone dei file", "problemChangingIconTheme": "Problema durante l'impostazione del tema dell'icona: {0}", "themes.selectIconTheme": "Seleziona il tema dell'icona file", + "generateColorTheme.label": "Genera tema colore da impostazioni correnti", "preferences": "Preferenze", "developer": "Sviluppatore" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/ita/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index 4550587650cf7..e40df93be8dd2 100644 --- a/i18n/ita/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "non associato" + "walkThrough.unboundCommand": "non associato", + "walkThrough.gitNotFound": "Sembra che GIT non sia installato nel sistema." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/ita/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index eca6a3b65b445..4d36ef2de5e09 100644 --- a/i18n/ita/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/ita/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "Colori per l'evidenziazione della sintassi", "schema.properties.name": "Descrizione della regola", - "schema.fontStyle": "Stile del carattere della regola: uno o combinazione di 'italic', 'bold' e 'underline'" + "schema.fontStyle": "Stile del carattere della regola: uno o combinazione di 'italic', 'bold' e 'underline'", + "schema.tokenColors.path": "Percorso di un file tmTheme (relativo al file corrente)" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/ita/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 25b7b98a369e5..0aee1a7594dd1 100644 --- a/i18n/ita/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/ita/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,5 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "Problemi durante l'analisi del file di tema di JSON: {0}" + "error.cannotparsejson": "Problemi durante l'analisi del file di tema di JSON: {0}", + "error.invalidformat.colors": "Si è verificato un problema durante l'analisi del file di tema {0}. La proprietà 'colors' non è di tipo 'object'.", + "error.invalidformat.tokenColors": "Si è verificato un problema durante l'analisi del file di tema {0}. La proprietà 'tokenColors' deve essere una matrice che specifica i colori o un percorso di un file di tema TextMate", + "error.plist.invalidformat": "Si è verificato un problema durante l'analisi del file tmTheme {0}. 'settings' non è una matrice.", + "error.cannotparse": "Si sono verificati problemi durante l'analisi del file tmTheme {0}", + "error.cannotload": "Si sono verificati problemi durante il caricamento del file tmTheme {0}: {1}" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/ita/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 13457b15bc1e3..78a199c933a69 100644 --- a/i18n/ita/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,5 +25,8 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed." + "iconThemeError": "File icon theme is unknown or not installed.", + "workbenchColors": "Sostituisce i colori del tema colori attualmente selezionato.", + "workbenchColors.deprecated": "L'impostazione non è più sperimentale ed è stata rinominata in 'workbench.colorCustomizations'", + "workbenchColors.deprecatedDescription": "In alternativa, usare 'workbench.colorCustomizations'" } \ No newline at end of file diff --git a/i18n/jpn/extensions/git/out/commands.i18n.json b/i18n/jpn/extensions/git/out/commands.i18n.json index 0e42fe3c0fdc1..e84147ee8b404 100644 --- a/i18n/jpn/extensions/git/out/commands.i18n.json +++ b/i18n/jpn/extensions/git/out/commands.i18n.json @@ -33,6 +33,7 @@ "no remotes to publish": "リポジトリには、発行先として構成されているリモートがありません。", "disabled": "このワークスペースでは、Git が無効になっているか、サポートされていません", "clean repo": "チェックアウトの前に、リポジトリの作業ツリーを消去してください。", + "cant push": "参照仕様をリモートにプッシュできません。最初に 'Pull' を実行して変更を統合してください。", "git error details": "Git: {0}", "git error": "Git エラー", "open git log": "Git ログを開く" diff --git a/i18n/jpn/extensions/git/package.i18n.json b/i18n/jpn/extensions/git/package.i18n.json index f991c6d178927..c13c203332af5 100644 --- a/i18n/jpn/extensions/git/package.i18n.json +++ b/i18n/jpn/extensions/git/package.i18n.json @@ -40,6 +40,7 @@ "config.enableLongCommitWarning": "長いコミット メッセージについて警告するかどうか", "config.confirmSync": "Git リポジトリを同期する前に確認する", "config.countBadge": "Git バッジ カウンターを制御します。`all` はすべての変更をカウントします。 `tracked` は追跡している変更のみカウントします。 `off` はカウントをオフします。", + "config.checkoutType": "`Checkout to...` を実行するときに表示されるブランチの種類を制御します。`all` はすべての参照を表示します。`local` はローカル ブランチのみ、`tags` はタグのみ、`remote` はリモート ブランチのみを表示します。 ", "config.ignoreLegacyWarning": "旧 Git の警告を無視します", "config.ignoreLimitWarning": "リポジトリ内に変更が多い場合は警告を無視します" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/jpn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 5a962ce17d0b2..5b2270de60407 100644 --- a/i18n/jpn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/jpn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "requirearray": "メニュー項目は配列にする必要があります", - "requirestring": "プロパティ `{0}` は必須で、型 `string` でなければなりません", - "optstring": "プロパティ `{0}` は省略するか、型 `string` にする必要があります", + "requirestring": "`{0}` プロパティは必須で、`string` 型でなければなりません", + "optstring": "`{0}` プロパティは省略するか、`string` 型にする必要があります", "vscode.extension.contributes.menuItem.command": "実行するコマンドの識別子。コマンドは 'commands' セクションで宣言する必要があります", "vscode.extension.contributes.menuItem.alt": "実行する別のコマンドの識別子。コマンドは 'commands' セクションで宣言する必要があります", "vscode.extension.contributes.menuItem.when": "この項目を表示するために満たす必要がある条件", @@ -22,9 +22,9 @@ "menus.resourceGroupContext": "ソース管理リソース グループのコンテキスト メニュー", "menus.resourceStateContext": "ソース管理リソース状態のコンテキスト メニュー", "nonempty": "空以外の値が必要です。", - "opticon": "プロパティ `icon` は省略できます。指定する場合には、文字列または `{dark, light}` などのリテラルにする必要があります", - "requireStringOrObject": "プロパティ `{0}` は必須で、`string` または `object` の型でなければなりません", - "requirestrings": "プロパティ `{0}` と `{1}` は必須で、型 `string` でなければなりません", + "opticon": "`icon` プロパティは省略できます。指定する場合には、文字列または `{dark, light}` などのリテラルにする必要があります", + "requireStringOrObject": "`{0}` プロパティは必須で、`string` または `object` の型でなければなりません", + "requirestrings": "プロパティの `{0}` と `{1}` は必須で、`string` 型でなければなりません", "vscode.extension.contributes.commandType.command": "実行するコマンドの識別子", "vscode.extension.contributes.commandType.title": "コマンドが UI に表示される際のタイトル", "vscode.extension.contributes.commandType.category": "(省略可能) コマンド別のカテゴリ文字列が UI でグループ分けされます", diff --git a/i18n/jpn/src/vs/platform/extensions/node/extensionValidator.i18n.json b/i18n/jpn/src/vs/platform/extensions/node/extensionValidator.i18n.json index d8c385410db94..f3a171986705e 100644 --- a/i18n/jpn/src/vs/platform/extensions/node/extensionValidator.i18n.json +++ b/i18n/jpn/src/vs/platform/extensions/node/extensionValidator.i18n.json @@ -9,15 +9,15 @@ "versionSpecificity2": "`engines.vscode` ({0}) で指定されたバージョンが明確ではありません。1.0.0 より後のバージョンの vscode の場合は、少なくとも、想定されているメジャー バージョンを定義してください。例 ^1.10.0、1.10.x、1.x.x、2.x.x など。", "versionMismatch": "拡張機能が Code {0} と互換性がありません。拡張機能に必要なバージョン: {1}。", "extensionDescription.empty": "空の拡張機能の説明を入手しました", - "extensionDescription.publisher": "プロパティ `{0}` は必須で、型 `string` でなければなりません", - "extensionDescription.name": "プロパティ `{0}` は必須で、型 `string` でなければなりません", - "extensionDescription.version": "プロパティ `{0}` は必須で、型 `string` でなければなりません", - "extensionDescription.engines": "プロパティ `{0}` は必須で、型 `object` でなければなりません", - "extensionDescription.engines.vscode": "プロパティ `{0}` は必須で、型 `string` でなければなりません", - "extensionDescription.extensionDependencies": "プロパティ `{0}` は省略するか、型 `string[]` にする必要があります", - "extensionDescription.activationEvents1": "プロパティ `{0}` は省略するか、型 `string[]` にする必要があります", + "extensionDescription.publisher": "`{0}` プロパティは必須で、`string` 型でなければなりません", + "extensionDescription.name": "`{0}` プロパティは必須で、`string` 型でなければなりません", + "extensionDescription.version": "`{0}` プロパティは必須で、`string` 型でなければなりません", + "extensionDescription.engines": "`{0}` プロパティは必須で、`string` 型でなければなりません", + "extensionDescription.engines.vscode": "`{0}` プロパティは必須で、`string` 型でなければなりません", + "extensionDescription.extensionDependencies": "`{0}` プロパティは省略するか、`string[]` 型にする必要があります", + "extensionDescription.activationEvents1": "`{0}` プロパティは省略するか、`string[]` 型にする必要があります", "extensionDescription.activationEvents2": "プロパティ `{0}` と `{1}` は、両方とも指定するか両方とも省略しなければなりません", - "extensionDescription.main1": "プロパティ `{0}` は省略するか、型 `string` にする必要があります", + "extensionDescription.main1": "`{0}` プロパティは省略するか、`string` 型にする必要があります", "extensionDescription.main2": "拡張機能のフォルダー ({1}) の中に `main` ({0}) が含まれることが予期されます。これにより拡張機能を移植できなくなる可能性があります。", "extensionDescription.main3": "プロパティ `{0}` と `{1}` は、両方とも指定するか両方とも省略しなければなりません", "notSemver": "拡張機能のバージョンが semver と互換性がありません。" diff --git a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json index 857fb4711f48a..cae6a6693a278 100644 --- a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -8,14 +8,31 @@ "schema.colors": "ワークベンチで使用する色。", "foreground": "全体の前景色。この色は、コンポーネントによってオーバーライドされていない場合にのみ使用されます。", "focusBorder": "フォーカスされた要素の境界線全体の色。この色はコンポーネントによって上書きされていない場合にのみ使用されます。", + "contrastBorder": "コントラストを強めるために、他の要素と隔てる追加の境界線。", + "activeContrastBorder": "コントラストを強めるために、アクティブな他要素と隔てる追加の境界線。", "widgetShadow": "エディター内の検索/置換窓など、エディター ウィジェットの影の色。", "inputBoxBackground": "入力ボックスの背景。", "inputBoxForeground": "入力ボックスの前景。", "inputBoxBorder": "入力ボックスの境界線。", "inputBoxActiveOptionBorder": "入力フィールドのアクティブ オプションの境界線の色。", + "inputValidationInfoBackground": "情報の重大度を示す入力検証の背景色。", + "inputValidationInfoBorder": "情報の重大度を示す入力検証の境界線色。", + "inputValidationWarningBackground": "警告の重大度を示す入力検証の背景色。", + "inputValidationWarningBorder": "警告の重大度を示す入力検証の境界線色。", + "inputValidationErrorBackground": "エラーの重大度を示す入力検証の背景色。", + "inputValidationErrorBorder": "エラーの重大度を示す入力検証の境界線色。", "dropdownBackground": "ドロップダウンの背景。", "dropdownForeground": "ドロップダウンの前景。", "dropdownBorder": "ドロップダウンの境界線。", + "listFocusBackground": "ツリーリストがアクティブのとき、フォーカスされた項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", + "listActiveSelectionBackground": "ツリーリストがアクティブのとき、選択された項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", + "listInactiveSelectionBackground": "ツリーリストが非アクティブのとき、フォーカスされた項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", + "listActiveSelectionForeground": "ツリーリストがアクティブのとき、選択された項目のツリーリスト前景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", + "listFocusAndSelectionBackground": "ツリーリストがアクティブのとき、フォーカスと選択された項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。この色は、各選択とフォーカスの色設定より優先します。", + "listFocusAndSelectionForeground": "ツリーリストがアクティブのとき、フォーカスと選択された項目のツリーリスト前景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。この色は、各選択とフォーカスの色設定より優先します。", + "listHoverBackground": "マウス操作で項目をホバーするときのツリーリスト背景。", + "listDropBackground": "マウス操作で項目を移動するときのツリーリスト ドラッグ アンド ドロップの背景。", + "highlight": "ツリーリスト内を検索しているとき、一致した強調のツリーリスト前景色。", "pickerGroupForeground": "ラベルをグループ化するためのクリック選択の色。", "pickerGroupBorder": "境界線をグループ化するためのクイック選択の色。", "buttonForeground": "ボタンの前景色。", diff --git a/i18n/jpn/src/vs/workbench/common/theme.i18n.json b/i18n/jpn/src/vs/workbench/common/theme.i18n.json index 7dd2454d3cb84..f1767a2955659 100644 --- a/i18n/jpn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/jpn/src/vs/workbench/common/theme.i18n.json @@ -16,6 +16,7 @@ "editorGroupHeaderBackground": "タブが無効な場合の エディター グループ タイトル ヘッダーの背景色。エディター グループはエディターのコンテナーです。", "editorGroupBorder": "複数のエディター グループを互いに分離するための色。エディター グループはエディターのコンテナーです。", "editorDragAndDropBackground": "エディターのドラッグ時の背景色。", + "editorMasterDetailsBorder": "エディターを横並びに表示している場合に、詳細をマスター側から分けて表示するための境界線色。たとえば、差分エディターや設定エディターです。", "panelBackground": "パネルの背景色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelBorder": "エディターとの区切りを示すパネル上部の罫線の色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelActiveTitleForeground": "アクティブ パネルのタイトルの色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json index aabd2eeb0588d..aef1178470743 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -32,7 +32,7 @@ "app.launch.json.compounds": "複合の一覧。各複合は、同時に起動される複数の構成を参照します。", "app.launch.json.compound.name": "複合の名前。起動構成のドロップダウン メニューに表示されます。", "app.launch.json.compounds.configurations": "この複合の一部として開始される構成の名前。", - "debugNoType": "デバッグ アダプター 'type' は省略不可で、型 'string' でなければなりません。", + "debugNoType": "デバッグ アダプター 'type' は省略不可で、'string' 型でなければなりません。", "DebugConfig.failed": "'launch.json' ファイルを '.vscode' フォルダー ({0}) 内に作成できません。", "selectDebug": "環境の選択" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 2369ff57b02bf..497be6143f794 100644 --- a/i18n/jpn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -6,6 +6,7 @@ { "vscode.extension.contributes.view": "カスタム ビューを提供します", "vscode.extension.contributes.view.id": "vscode.workspace.createTreeView を介して生成した、ビューを認識するための一意の ID", + "vscode.extension.contributes.view.label": "ビューの表示に使用する、他人が解釈できる文字列", "vscode.extension.contributes.view.icon": "ビュー アイコンへのパス", "vscode.extension.contributes.views": "複数のカスタム ビューを提供します", "showViewlet": "{0} を表示", diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 4605e28e85a63..c7b8031b6e5c3 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "ConfigurationParser.invalidCWD": "警告: options.cwd は、型 string でなければなりません。値 {0} を無視します\n", + "ConfigurationParser.invalidCWD": "警告: options.cwd は、string 型でなければなりません。値 {0} を無視します", "ConfigurationParser.noShell": "警告: シェル構成がサポートされるのは、ターミナルでタスクを実行している場合のみです。", "ConfigurationParser.noargs": "エラー: コマンド引数は文字列の配列でなければなりません。指定された値:\n{0}", "ConfigurationParser.noName": "エラー: 宣言スコープ内の問題マッチャーに次の名前がなければなりません:\n{0}\n", diff --git a/i18n/jpn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/jpn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 7cace13d285a5..590d8c39681c8 100644 --- a/i18n/jpn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "nonempty": "空以外の値が必要です。", - "requirestring": "プロパティ `{0}` は必須で、型 `string` でなければなりません", - "optstring": "プロパティ `{0}` は省略するか、型 `string` にする必要があります", + "requirestring": "`{0}` プロパティは必須で、`string` 型でなければなりません", + "optstring": "`{0}` プロパティは省略するか、`string` 型にする必要があります", "vscode.extension.contributes.keybindings.command": "キー バインドのトリガー時に実行するコマンドの識別子。", "vscode.extension.contributes.keybindings.key": "キーまたはキー シーケンス (キーは + で区切り、シーケンスはスペースで区切る。例: Ctrl+O、Ctrl+L L で同時に押す", "vscode.extension.contributes.keybindings.mac": "Mac 固有のキーまたはキー シーケンス。", diff --git a/i18n/jpn/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/jpn/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json index 03cdc9aeaad18..22d698c140710 100644 --- a/i18n/jpn/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -6,11 +6,11 @@ { "invalid": "`contributes.{0}` が無効です。配列が必要です。", "invalid.empty": "`contributes.{0}` に対する空の値", - "require.id": "プロパティ `{0}` は必須で、型 `string` でなければなりません", - "opt.extensions": "プロパティ `{0}` を省略するか、型 `string[]` にする必要があります", - "opt.filenames": "プロパティ `{0}` を省略するか、型 `string[]` にする必要があります", - "opt.firstLine": "プロパティ `{0}` を省略するか、型 `string` にする必要があります", - "opt.configuration": "プロパティ `{0}` を省略するか、型 `string` にする必要があります", - "opt.aliases": "プロパティ `{0}` を省略するか、型 `string[]` にする必要があります", - "opt.mimetypes": "プロパティ `{0}` を省略するか、型 `string[]` にする必要があります" + "require.id": "`{0}` プロパティは必須で、`string` 型でなければなりません", + "opt.extensions": "`{0}` プロパティを省略するか、`string[]` 型にする必要があります", + "opt.filenames": "`{0}` プロパティを省略するか、`string[]` 型にする必要があります", + "opt.firstLine": "`{0}` プロパティを省略するか、`string` 型にする必要があります", + "opt.configuration": "`{0}` プロパティを省略するか、`string` 型にする必要があります", + "opt.aliases": "`{0}` プロパティを省略するか、`string[]` 型にする必要があります", + "opt.mimetypes": "`{0}` プロパティを省略するか、`string[]` 型にする必要があります" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/jpn/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index f0fb6370546c3..978edc391415a 100644 --- a/i18n/jpn/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "構文の強調表示をする色", "schema.properties.name": "ルールの説明", - "schema.fontStyle": "ルールのフォント スタイル: '斜体'、'太字'、'下線' のいずれかまたはこれらの組み合わせ" + "schema.fontStyle": "ルールのフォント スタイル: '斜体'、'太字'、'下線' のいずれかまたはこれらの組み合わせ", + "schema.tokenColors.path": "tmTheme ファイルへのパス (現在のファイルとの相対パス)" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index c84f5026160c1..782cc7b29de19 100644 --- a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "error.cannotparsejson": "JSON テーマ ファイルの解析中に問題が発生しました: {0}", + "error.invalidformat.colors": "配色テーマ ファイルの解析中に問題が発生しました: {0}。'colors' プロパティは 'object' 型ではありません。", + "error.invalidformat.tokenColors": "配色テーマ ファイルの解析中に問題が発生しました: {0}。'tokenColors' プロパティは、配色を指定する配列か、TextMate テーマファイルへのパスでなければなりません", "error.plist.invalidformat": "tmTheme ファイルの解析中に問題が発生しました: {0}。'settings' は配列ではありません。", "error.cannotparse": "tmTheme ファイルの解析中に問題が発生しました: {0}", "error.cannotload": "tmTheme ファイル {0} の読み込み中に問題が発生しました: {1}" diff --git a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 99cd34d1f8d3b..eb295ac74b0a0 100644 --- a/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -27,5 +27,6 @@ "noIconThemeDesc": "No file icons", "iconThemeError": "File icon theme is unknown or not installed.", "workbenchColors": "現在選択している配色テーマで配色を上書きします。", + "workbenchColors.deprecated": "この設定はもう試験的なものではなく、名前が 'workbench.colorCustomizations' に変更されています", "workbenchColors.deprecatedDescription": "代わりに 'workbench.colorCustomizations' を使用してください" } \ No newline at end of file diff --git a/i18n/kor/extensions/git/out/commands.i18n.json b/i18n/kor/extensions/git/out/commands.i18n.json index 4a4101b4207de..99d98e59a53e6 100644 --- a/i18n/kor/extensions/git/out/commands.i18n.json +++ b/i18n/kor/extensions/git/out/commands.i18n.json @@ -16,6 +16,8 @@ "confirm discard": "{0}의 변경 내용을 취소하시겠습니까?", "confirm discard multiple": "{0}개 파일의 변경 내용을 취소하시겠습니까?", "discard": "변경 내용 취소", + "confirm discard all": "모든 변경 내용을 취소하시겠습니까? 이 작업은 되돌릴 수 없습니다.", + "discardAll": "모든 변경 내용 취소", "no changes": "커밋할 변경 내용이 없습니다.", "commit message": "커밋 메시지", "provide commit message": "커밋 메시지를 제공하세요.", @@ -31,6 +33,7 @@ "no remotes to publish": "리포지토리에 게시하도록 구성된 원격이 없습니다.", "disabled": "Git은 이 작업 영역에서 사용하지 않도록 설정되어 있거나 지원되지 않습니다.", "clean repo": "체크 아웃하기 전에 리포지토리 작업 트리를 정리하세요.", + "cant push": "참조를 원격에 푸시할 수 없습니다. 먼저 '풀'을 실행하여 변경 내용을 통합하세요.", "git error details": "Git: {0}", "git error": "Git 오류", "open git log": "Git 로그 열기" diff --git a/i18n/kor/extensions/git/out/scmProvider.i18n.json b/i18n/kor/extensions/git/out/scmProvider.i18n.json index 7fded37328a95..69250749f7723 100644 --- a/i18n/kor/extensions/git/out/scmProvider.i18n.json +++ b/i18n/kor/extensions/git/out/scmProvider.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "commit": "Commit" + "commit": "커밋" } \ No newline at end of file diff --git a/i18n/kor/extensions/git/package.i18n.json b/i18n/kor/extensions/git/package.i18n.json index 0aeb4b6401412..aed0ca69317b0 100644 --- a/i18n/kor/extensions/git/package.i18n.json +++ b/i18n/kor/extensions/git/package.i18n.json @@ -39,6 +39,8 @@ "config.autofetch": "자동 가져오기 사용 여부", "config.enableLongCommitWarning": "긴 커밋 메시지에 대해 경고할지 여부입니다.", "config.confirmSync": "Git 리포지토리를 동기화하기 전에 확인합니다.", + "config.countBadge": "Git 배지 카운터를 제어합니다. `all`이면 변경 내용을 모두 계산하고, `tracked`이면 추적된 변경 내용만 계산하고, `off`이면 해제합니다.", + "config.checkoutType": "`다음으로 체크 아웃...`을 실행할 때 나열되는 분기 유형을 제어합니다. `all`이면 모든 참조를 표시하고, `local`이면 로컬 분기만 표시하고, `tags`이면 태그만 표시하고, `remote`이면 원격 분기만 표시합니다.", "config.ignoreLegacyWarning": "레거시 Git 경고를 무시합니다.", "config.ignoreLimitWarning": "리포지토리에 변경 내용이 너무 많으면 경고를 무시합니다." } \ No newline at end of file diff --git a/i18n/kor/extensions/gulp/package.i18n.json b/i18n/kor/extensions/gulp/package.i18n.json index 8b6ad71cd4e6d..9dc5dc5daa605 100644 --- a/i18n/kor/extensions/gulp/package.i18n.json +++ b/i18n/kor/extensions/gulp/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.gulp.autoDetect": "Gulp 작업의 자동 검색을 사용할지 여부를 제어합니다. 기본값은 [켜기]입니다." +} \ No newline at end of file diff --git a/i18n/kor/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/kor/extensions/typescript/out/utils/typingsStatus.i18n.json index bba27308a2312..07c376496cff1 100644 --- a/i18n/kor/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/kor/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "TypeScript IntelliSense를 향상하기 위해 데이터를 페치하는 중", + "typesInstallerInitializationFailed.title": "JavaScript 언어 기능에 대해 입력 파일을 설치할 수 없습니다. NPM이 설치되어 있고 PATH에 있는지 확인하세요.", "typesInstallerInitializationFailed.moreInformation": "추가 정보", "typesInstallerInitializationFailed.doNotCheckAgain": "다시 확인 안 함", "typesInstallerInitializationFailed.close": "닫기" diff --git a/i18n/kor/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 92d7d86820fb6..66ca4a6169bf8 100644 --- a/i18n/kor/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -44,6 +44,8 @@ "openPreviousRecentlyUsedEditorInGroup": "그룹에서 최근에 사용한 이전 편집기 열기", "openNextRecentlyUsedEditorInGroup": "그룹에서 최근에 사용한 다음 편집기 열기", "navigateEditorHistoryByInput": "기록에서 이전 편집기 열기", + "openNextRecentlyUsedEditor": "최근에 사용한 다음 편집기 열기", + "openPreviousRecentlyUsedEditor": "최근에 사용한 이전 편집기 열기", "clearEditorHistory": "편집기 기록 지우기", "focusLastEditorInStack": "그룹의 마지막 편집기 열기", "moveEditorLeft": "왼쪽으로 편집기 이동", diff --git a/i18n/kor/src/vs/workbench/common/theme.i18n.json b/i18n/kor/src/vs/workbench/common/theme.i18n.json index 56bd399b45f3e..1cd988db67ead 100644 --- a/i18n/kor/src/vs/workbench/common/theme.i18n.json +++ b/i18n/kor/src/vs/workbench/common/theme.i18n.json @@ -12,8 +12,11 @@ "tabActiveEditorGroupInactiveForeground": "비활성 그룹의 활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", "tabInactiveEditorGroupActiveForeground": "활성 그룹의 비활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", "tabInactiveEditorGroupInactiveForeground": "비활성 그룹의 비활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", + "editorGroupBackground": "편집기 그룹의 배경색입니다. 편집기 그룹은 편집기의 컨테이너입니다. 배경색은 편집기 그룹을 끌 때 표시됩니다.", + "editorGroupHeaderBackground": "탭을 사용하지 않도록 설정한 경우 편집기 그룹 제목 머리글의 배경색입니다. 편집기 그룹은 편집기의 컨테이너입니다.", "editorGroupBorder": "여러 편집기 그룹을 서로 구분하기 위한 색입니다. 편집기 그룹은 편집기의 컨테이너입니다.", "editorDragAndDropBackground": "편집기를 끌어올 때의 배경색입니다.", + "editorMasterDetailsBorder": "병렬 편집기에서 마스터 쪽의 세부 정보를 구분하기 위한 테두리 색입니다. Diff 편집기, 설정 편집기 등을 예로 들 수 있습니다.", "panelBackground": "패널 배경색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "panelBorder": "편집기와 구분되는 맨 위의 패널 테두리 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "panelActiveTitleForeground": "활성 패널의 제목 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", @@ -24,6 +27,8 @@ "statusBarNoFolderBackground": "폴더가 열리지 않았을 때의 상태 표시줄 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "statusBarItemActiveBackground": "클릭할 때의 상태 표시줄 항목 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "statusBarItemHoverBackground": "마우스로 가리킬 때의 상태 표시줄 항목 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", + "statusBarProminentItemBackground": "상태 표시줄 주요 항목 배경색입니다. 주요 항목은 중요도를 나타내는 다른 상태 표시줄 항목보다 눈에 잘 띕니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", + "statusBarProminentItemHoverBackground": "마우스로 가리킬 때의 상태 표시줄 주요 항목 배경색입니다. 주요 항목은 중요도를를 나타내는 다른 상태 표시줄 항목보다 눈에 잘 띕니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "activityBarBackground": "작업 막대 배경색입니다. 작업 막대는 맨 왼쪽이나 오른쪽에 표시되며 사이드바의 뷰 간을 전환하는 데 사용할 수 있습니다.", "activityBarForeground": "작업 막대 전경 색(예: 아이콘에 사용됨)입니다. 작업 막대는 오른쪽이나 왼쪽 끝에 표시되며 사이드바의 보기 간을 전환할 수 있습니다.", "activityBarDragAndDropBackground": "작업 막대 항목의 끌어서 놓기 피드백 색입니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", @@ -31,8 +36,11 @@ "activityBarBadgeForeground": "활동 알림 배지 전경색입니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", "sideBarBackground": "사이드바 배경색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", "sideBarTitleForeground": "사이드바 제목 전경색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", + "sideBarSectionHeaderBackground": "사이드바 섹션 헤더 배경색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", "titleBarActiveForeground": "창이 활성화된 경우의 제목 표시줄 전경입니다. 이 색은 현재 macOS에서만 지원됩니다.", "titleBarInactiveForeground": "창이 비활성화된 경우의 제목 표시줄 전경입니다. 이 색은 현재 macOS에서만 지원됩니다.", "titleBarActiveBackground": "창을 활성화할 때의 제목 표시줄 전경입니다. 이 색은 현재 macOS에서만 지원됩니다.", - "titleBarInactiveBackground": "창이 비활성화된 경우의 제목 표시줄 배경입니다. 이 색은 현재 macOS에서만 지원됩니다." + "titleBarInactiveBackground": "창이 비활성화된 경우의 제목 표시줄 배경입니다. 이 색은 현재 macOS에서만 지원됩니다.", + "notificationsForeground": "알림 전경색입니다. 알림은 창의 위쪽에 표시됩니다.", + "notificationsBackground": "알림 배경색입니다. 알림은 창의 위쪽에 표시됩니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index 8b6ad71cd4e6d..e7e7cdc921dcf 100644 --- a/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "workbench.action.inspectKeyMap": "개발자: 키 매핑 검사" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index c3b7509d8a4b5..60f3a2078085d 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -34,6 +34,7 @@ "editConditionalBreakpoint": "중단점 편집...", "setValue": "값 설정", "addWatchExpression": "식 추가", + "editWatchExpression": "식 편집", "addToWatchExpressions": "조사식에 추가", "removeWatchExpression": "식 제거", "removeAllWatchExpressions": "모든 식 제거", diff --git a/i18n/kor/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json index 8b6ad71cd4e6d..e3166a31b496d 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "debugToolBarBackground": "디버그 도구 모음 배경색입니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index cdf01baf557a1..bac1b32e92a96 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "디버그 어댑터 실행 파일 '{0}'이(가) 없습니다.", "debugAdapterCannotDetermineExecutable": "디버그 어댑터 '{0}'에 대한 실행 파일을 확인할 수 없습니다.", "debugType": "구성의 형식입니다.", + "debugTypeNotRecognised": "이 디버그 형식은 인식되지 않습니다. 해당하는 디버그 확장을 설치하세요.", "node2NotSupported": "\"node2\"는 더 이상 지원되지 않습니다. 대신 \"node\"를 사용하고 \"protocol\" 특성을 \"inspector\"로 설정하세요.", "debugName": "구성 이름이며, 구성 시작 드롭다운 메뉴에 표시됩니다.", "debugRequest": "구성 형식을 요청합니다. \"시작\" 또는 \"연결\"일 수 있습니다.", diff --git a/i18n/kor/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index f4bb6b4c43199..1d9370c72b065 100644 --- a/i18n/kor/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,6 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "vscode.extension.contributes.view": "사용자 지정 뷰를 적용합니다.", + "vscode.extension.contributes.view.id": "vscode.workspace.createTreeView를 통해 만든 뷰를 식별하는 데 사용된 고유 ID", + "vscode.extension.contributes.view.label": "뷰를 렌더링하는 데 사용되는 사람이 읽을 수 있는 문자열", + "vscode.extension.contributes.view.icon": "뷰 아이콘의 경로", + "vscode.extension.contributes.views": "사용자 지정 뷰를 적용합니다.", "showViewlet": "{0} 표시", "view": "보기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index d8fa05234c464..474bdeb6edf46 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "사용자 설정 열기", "openGlobalKeybindings": "바로 가기 키 열기", + "openGlobalKeybindingsFile": "바로 가기 키 파일 열기", "openWorkspaceSettings": "작업 영역 설정 열기", "configureLanguageBasedSettings": "언어별 설정 구성...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 660da9b820c46..c5708dad5de0d 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,6 +9,7 @@ "ConfigureTaskRunnerAction.quickPick.template": "Task Runner 선택", "ConfigureTaskRunnerAction.autoDetecting": "{0} 작업을 자동 검색 중", "ConfigureTaskRunnerAction.autoDetect": "작업 시스템을 자동으로 감지하지 못했습니다. 기본 템플릿을 사용하는 중입니다. 자세한 내용은 작업 출력을 참조하세요.", + "ConfigureTaskRunnerAction.autoDetectError": "작업 시스템을 자동으로 감지하는 중 오류가 발생했습니다. 자세한 내용은 작업 출력을 참조하세요.", "ConfigureTaskRunnerAction.failed": "'.vscode' 폴더 내에 'tasks.json' 파일을 만들 수 없습니다. 자세한 내용은 작업 출력을 참조하세요.", "ConfigureTaskRunnerAction.label": "Task Runner 구성", "ConfigureBuildTaskAction.label": "빌드 작업 구성", diff --git a/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index e9cc7e8122ed1..90ad2a84f5953 100644 --- a/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,6 +14,7 @@ "noIconThemeDesc": "파일 아이콘 사용 안 함", "problemChangingIconTheme": "아이콘 테마를 설정하는 동안 문제 발생: {0}", "themes.selectIconTheme": "파일 아이콘 테마 선택", + "generateColorTheme.label": "현재 설정에서 색 테마 생성", "preferences": "기본 설정", "developer": "개발자" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/kor/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index e579f606de72a..7f6ec89a740b2 100644 --- a/i18n/kor/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "바인딩 안 됨" + "walkThrough.unboundCommand": "바인딩 안 됨", + "walkThrough.gitNotFound": "Git가 시스템에 설치되지 않은 것 같습니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/kor/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index ef85a3ba9f602..67d59d097a592 100644 --- a/i18n/kor/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/kor/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "구문 강조 표시를 위한 색", "schema.properties.name": "규칙에 대한 설명", - "schema.fontStyle": "규칙의 글꼴 스타일: '기울임꼴, '굵게' 및 '밑줄' 중 하나 또는 이들의 조합" + "schema.fontStyle": "규칙의 글꼴 스타일: '기울임꼴, '굵게' 및 '밑줄' 중 하나 또는 이들의 조합", + "schema.tokenColors.path": "tmTheme 파일의 경로(현재 파일의 상대 경로)" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/kor/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 622950f98f88e..1acfa7a4ff492 100644 --- a/i18n/kor/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/kor/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,5 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "JSON 테마 파일을 구문 분석하는 중 문제 발생: {0}" + "error.cannotparsejson": "JSON 테마 파일을 구문 분석하는 중 문제 발생: {0}", + "error.invalidformat.colors": "색 테마 파일 {0}을(를) 구문 분석하는 중 문제가 발생했습니다. 'colors' 속성이 'object' 형식이 아닙니다.", + "error.invalidformat.tokenColors": "색 테마 파일 {0}을(를) 구문 분석하는 중 문제가 발생했습니다. 'tokenColors' 속성이 'object' 형식이 아닙니다. 'tokenColors' 속성은 색을 지정하는 배열 또는 텍스트 짝 테마 파일의 경로여야 합니다.", + "error.plist.invalidformat": "tmTheme 파일 {0}을(를) 구문 분석하는 중 문제가 발생했습니다. 'settings'가 배열이 아닙니다.", + "error.cannotparse": "tmTheme 파일 {0}을(를) 구문 분석하는 중 문제가 발생했습니다.", + "error.cannotload": "tmTheme 파일 {0}을(를) 로드하는 중 문제가 발생했습니다. {1}" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/kor/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index b9570259fd28c..dc5e319d6e7df 100644 --- a/i18n/kor/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,5 +25,8 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed." + "iconThemeError": "File icon theme is unknown or not installed.", + "workbenchColors": "현재 선택한 색 테마에서 색을 재정의합니다.", + "workbenchColors.deprecated": "이 설정은 더 이상 실험적 설정이 아니며 이름이\n 'workbench.colorCustomizations'로 변경되었습니다.", + "workbenchColors.deprecatedDescription": "대신 'workbench.colorCustomizations'를 사용합니다." } \ No newline at end of file diff --git a/i18n/rus/extensions/git/package.i18n.json b/i18n/rus/extensions/git/package.i18n.json index 071a37d0e5bc5..5236c98c9748f 100644 --- a/i18n/rus/extensions/git/package.i18n.json +++ b/i18n/rus/extensions/git/package.i18n.json @@ -40,5 +40,7 @@ "config.enableLongCommitWarning": "Следует ли предупреждать о длинных сообщениях о фиксации", "config.confirmSync": "Подтвердите синхронизацию репозиториев GIT.", "config.countBadge": "\nУправляет счетчиком Git. При указании значения \"all\" подсчитываются все изменения, при указании значения \"tracked\" — только отслеживаемые изменения, при указании значения \"off\" счетчик отключается.", - "config.checkoutType": "Определяет типы ветвей, которые выводятся при выборе пункта меню \"Извлечь в...\". При указании значения \"all\" отображаются все ссылки, \"local\" — только локальные ветви, \"tags\" — только теги, а \"remote\" — только удаленные ветви." + "config.checkoutType": "Определяет типы ветвей, которые выводятся при выборе пункта меню \"Извлечь в...\". При указании значения \"all\" отображаются все ссылки, \"local\" — только локальные ветви, \"tags\" — только теги, а \"remote\" — только удаленные ветви.", + "config.ignoreLegacyWarning": "Игнорирует предупреждение об устаревшей версии Git", + "config.ignoreLimitWarning": "Игнорировать предупреждение, когда в репозитории слишком много изменений" } \ No newline at end of file diff --git a/i18n/rus/extensions/typescript/package.i18n.json b/i18n/rus/extensions/typescript/package.i18n.json index 3a3b49070991f..683ce96350f98 100644 --- a/i18n/rus/extensions/typescript/package.i18n.json +++ b/i18n/rus/extensions/typescript/package.i18n.json @@ -11,6 +11,8 @@ "typescript.tsdk.desc": "Указывает путь к папке, содержащей файлы tsserver и lib*.d.ts, которые необходимо использовать.", "typescript.disableAutomaticTypeAcquisition": "Отключает автоматическое получение типа. Требуется TypeScript 2.0.6 и более поздней версии и перезапуск после его изменения.", "typescript.check.tscVersion": "Проверка отличия компилятора TypeScript глобальной установки (например, tsc) от используемой языковой службы TypeScript.", + "typescript.tsserver.log": "Включает ведение журнала для сервера TS. Этот журнал можно использовать для диагностики проблем сервера TS. В журнале могут содержаться пути к файлам, исходный код и другие сведения из вашего проекта, в том числе носящие конфиденциальный характер.", + "typescript.tsserver.trace": "Включает трассировку сообщений, отправляемых на сервер TS. Эту трассировку можно использовать для диагностики проблем сервера TS. Трассировка может содержать пути к файлам, исходный код и другие сведения из вашего проекта, в том числе конфиденциальные данные.", "typescript.tsserver.experimentalAutoBuild": "Включает экспериментальную автосборку. Требуется версия 1.9 dev или версия 2.x tsserver и перезапуск VS Code после изменения.", "typescript.validate.enable": "Включение или отключение проверки TypeScript.", "typescript.format.enable": "Включение или отключение модуля форматирования TypeScript по умолчанию.", diff --git a/i18n/rus/src/vs/code/electron-main/menus.i18n.json b/i18n/rus/src/vs/code/electron-main/menus.i18n.json index 44d0d0569f30d..d970ca1ef1c6b 100644 --- a/i18n/rus/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/rus/src/vs/code/electron-main/menus.i18n.json @@ -7,6 +7,8 @@ "mFile": "&&Файл", "mEdit": "&&Изменить", "mSelection": "&&Выделений", + "mView": "&&Просмотреть", + "mGoto": "&&Перейти", "mDebug": "&&Отладка", "mWindow": "Окно", "mHelp": "&&Справка", @@ -29,6 +31,7 @@ "miCloseWindow": "Закрыть &&окно", "miCloseFolder": "Закрыть &&папку", "miCloseEditor": "&&Закрыть редактор", + "miExit": "В&&ыход", "miOpenSettings": "&&Параметры", "miOpenKeymap": "&&Сочетания клавиш", "miOpenKeymapExtensions": "&&Расширения раскладки клавиатуры", @@ -40,6 +43,7 @@ "miClearRecentOpen": "Очистить последние файлы", "miUndo": "Отменить", "miRedo": "Вернуть", + "miCut": "Вы&&резать", "miCopy": "Копировать", "miPaste": "Вставить", "miFind": "Найти", @@ -93,6 +97,7 @@ "miZoomIn": "&&Увеличить", "miZoomOut": "У&&меньшить", "miZoomReset": "&&Сбросить масштаб", + "miBack": "&&Назад", "miForward": "&&Вперед", "miNextEditor": "&&Следующий редактор", "miPreviousEditor": "&&Предыдущий редактор", diff --git a/i18n/rus/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/rus/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index 2259656b83fe2..e8ab2008c4678 100644 --- a/i18n/rus/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -44,6 +44,8 @@ "openPreviousRecentlyUsedEditorInGroup": "Открыть предыдущий недавно использованный редактор в группе", "openNextRecentlyUsedEditorInGroup": "Открыть следующий недавно использованный редактор в группе", "navigateEditorHistoryByInput": "Открыть предыдущий редактор из журнала", + "openNextRecentlyUsedEditor": "Открыть следующий недавно использованный редактор", + "openPreviousRecentlyUsedEditor": "Открыть предыдущий недавно использованный редактор", "clearEditorHistory": "Очистить журнал редактора", "focusLastEditorInStack": "Открыть последний редактор в группе", "moveEditorLeft": "Переместить редактор влево", diff --git a/i18n/rus/src/vs/workbench/common/theme.i18n.json b/i18n/rus/src/vs/workbench/common/theme.i18n.json index bf046e997596e..f3d59ca959ea9 100644 --- a/i18n/rus/src/vs/workbench/common/theme.i18n.json +++ b/i18n/rus/src/vs/workbench/common/theme.i18n.json @@ -12,8 +12,11 @@ "tabActiveEditorGroupInactiveForeground": "Цвет переднего плана активной вкладки в неактивной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "tabInactiveEditorGroupActiveForeground": "Цвет переднего плана неактивной вкладки в активной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "tabInactiveEditorGroupInactiveForeground": "Цвет переднего плана неактивной вкладки в неактивной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", + "editorGroupBackground": "Цвет фона группы редакторов. Группы редакторов представляют собой контейнеры редакторов. Цвет фона отображается при перетаскивании групп редакторов.", + "editorGroupHeaderBackground": "Цвет фона для заголовка группы редакторов, когда вкладки отключены. Группы редакторов представляют собой контейнеры редакторов.", "editorGroupBorder": "Цвет для разделения нескольких групп редакторов. Группы редакторов — это контейнеры редакторов.", "editorDragAndDropBackground": "Цвет фона при перетаскивании редакторов.", + "editorMasterDetailsBorder": "Цвет контура для отделения сведений от главной панели для параллельных редакторов. К примерам таких редакторов относятся редакторы несовпадений и редактор параметров.", "panelBackground": "Цвет фона панели. Панели показаны под областью редактора и содержат такие представления, как выходные данные и встроенный терминал.", "panelBorder": "Цвет верхней границы панели, отделяющей ее от редактора. Панели показаны под областью редактора и содержат такие представления, как выходные данные и встроенный терминал.", "panelActiveTitleForeground": "Цвет заголовка для активной панели. Панели отображаются под областью редактора и содержат такие представления, как окно вывода и встроенный терминал.", @@ -24,14 +27,20 @@ "statusBarNoFolderBackground": "Цвет фона панели состояния, если папка не открыта. Панель состояния отображается внизу окна.", "statusBarItemActiveBackground": "Цвет фона элементов панели состояния при щелчке. Панель состояния отображается внизу окна.", "statusBarItemHoverBackground": "Цвет фона элементов панели состояния при наведении. Панель состояния отображается внизу окна.", + "statusBarProminentItemBackground": "Цвет фона приоритетных элементов панели состояния. Приоритетные элементы выделяются на фоне других элементов панели состояния, чтобы подчеркнуть их значение. Панель состояния отображается в нижней части окна.", + "statusBarProminentItemHoverBackground": "Цвет фона приоритетных элементов панели состояния при наведении. Приоритетные элементы выделяются на фоне других элементов панели состояния, чтобы подчеркнуть их значение. Панель состояния отображается в нижней части окна.", "activityBarBackground": "Цвет фона панели действий. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", + "activityBarForeground": "Цвет переднего плана панели действий (например, цвет, используемый для значков). Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", "activityBarDragAndDropBackground": "Цвет обратной связи при перетаскивании для элементов панели действий. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", "activityBarBadgeBackground": "Цвет фона значка уведомлений о действиях. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", "activityBarBadgeForeground": "Цвет переднего плана значка уведомлений о действиях. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", "sideBarBackground": "Цвет фона боковой панели. Боковая панель — это контейнер таких представлений, как проводник и поиск.", "sideBarTitleForeground": "Цвет переднего плана заголовка боковой панели. Боковая панель — это контейнер для таких представлений, как проводник и поиск.", + "sideBarSectionHeaderBackground": "Цвет фона для заголовка раздела боковой панели. Боковая панель — это контейнер для таких представлений, как проводник и поиск.", "titleBarActiveForeground": "Передний план панели заголовка, если окно активно. Обратите внимание, что этот цвет сейчас поддерживается только в macOS.", "titleBarInactiveForeground": "Передний план панели заголовка, если окно неактивно. Обратите внимание, что этот цвет сейчас поддерживается только в macOS.", "titleBarActiveBackground": "Фон панели заголовка, если окно активно. Обратите внимание, что этот цвет сейчас поддерживается только в macOS.", - "titleBarInactiveBackground": "Фон панели заголовка, если окно неактивно. Обратите внимание, что этот цвет сейчас поддерживается только в macOS." + "titleBarInactiveBackground": "Фон панели заголовка, если окно неактивно. Обратите внимание, что этот цвет сейчас поддерживается только в macOS.", + "notificationsForeground": "Цвет переднего плана для уведомлений. Уведомления отображаются в верхней части окна.", + "notificationsBackground": "Цвет фона для уведомлений. Уведомления отображаются в верхней части окна." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json index 68ba046d91611..f2bf936917329 100644 --- a/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -20,6 +20,7 @@ "statusBarVisibility": "Управляет видимостью строки состояния в нижней части рабочего места.", "activityBarVisibility": "Управляет видимостью панели действий на рабочем месте.", "closeOnFileDelete": "Определяет, следует ли автоматически закрывать редакторы, когда отображаемый в них файл удален или переименован другим процессом. При отключении этой функции редактор остается открытым в качестве черновика. Обратите внимание, что при удалении из приложения редактор закрывается всегда и что файлы черновиков никогда не закрываются для сохранения данных.", + "swipeToNavigate": "Переключайтесь между открытыми файлами, проводя по экрану по горизонтали тремя пальцами.", "workbenchConfigurationTitle": "Workbench", "window.openFilesInNewWindow.on": "Файлы будут открываться в новом окне.", "window.openFilesInNewWindow.off": "Файлы будут открываться в окне с открытой папкой файлов или последнем активном окне.", @@ -48,10 +49,12 @@ "menuBarVisibility": "Определяет видимость строки меню. Значение toggle указывает, что строка меню скрыта и для ее вывода нужно один раз нажать клавишу ALT. По умолчанию строка меню не будет отображаться только в полноэкранном режиме.", "autoDetectHighContrast": "Если включено, будет выполняться автоматический переход к высококонтрастной теме, если в Windows используется тема высокой контрастности, или к темной теме при выходе из темы высокой контрастности Windows.", "titleBarStyle": "Настройка внешнего вида заголовка окна. Чтобы применить изменения, потребуется полный перезапуск.", + "window.nativeTabs": "Включает вкладки окна macOS Sierra. Обратите внимание, что для применения этих изменений потребуется полная перезагрузка, и что для всех внутренних вкладок будет отключен пользовательский стиль заголовка, если он был настроен.", "windowConfigurationTitle": "Окно", "zenModeConfigurationTitle": "Режим Zen", "zenMode.fullScreen": "Определяет, будет ли переключение в режим Zen переключать рабочее пространство в полноэкранный режим.", "zenMode.hideTabs": "Определяет, будет ли включение режима Zen также скрывать вкладки рабочего места.", "zenMode.hideStatusBar": "Определяет, будет ли включение режима Zen также скрывать строку состояния в нижней части рабочего места.", + "zenMode.hideActivityBar": "Определяет, будет ли при включении режима Zen скрыта панель действий в левой части рабочей области.", "zenMode.restore": "Определяет, должно ли окно восстанавливаться в режиме Zen, если закрылось в режиме Zen." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index 8b6ad71cd4e6d..5e643a6120328 100644 --- a/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "workbench.action.inspectKeyMap": "Разработчик: исследование сопоставлений ключей" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index d73136084f240..0a2abc6c1db6a 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -34,6 +34,7 @@ "editConditionalBreakpoint": "Изменить точку останова…", "setValue": "Задать значение", "addWatchExpression": "Добавить выражение", + "editWatchExpression": "Изменить выражение", "addToWatchExpressions": "Добавить контрольное значение", "removeWatchExpression": "Удалить выражение", "removeAllWatchExpressions": "Удалить все выражения", diff --git a/i18n/rus/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json index 8b6ad71cd4e6d..6543390a263a3 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "debugToolBarBackground": "Цвет фона для панели инструментов отладки." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json index a0a2e36433563..9c4ea4ee97580 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -15,5 +15,6 @@ "allowBreakpointsEverywhere": "Разрешает задание точки останова в любом файле", "openExplorerOnEnd": "Автоматически открывать представление обозревателя в конце сеанса отладки", "inlineValues": "Показывать значения переменных в редакторе во время отладки", - "hideActionBar": "Определяет, следует ли скрыть всплывающую панель действий отладки." + "hideActionBar": "Определяет, следует ли скрыть всплывающую панель действий отладки.", + "launch": "Глобальная конфигурация запуска отладки. Должна использоваться в качестве альтернативы для конфигурации \"launch.json\", которая является общей для рабочих пространств" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 88d355f7a2728..8ea4b501a1ea6 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "Исполняемый файл адаптера отладки \"{0}\" не существует.", "debugAdapterCannotDetermineExecutable": "Невозможно определить исполняемый файл для адаптера отладки \"{0}\".", "debugType": "Тип конфигурации.", + "debugTypeNotRecognised": "Не удается распознать тип отладки. Установите соответствующее расширение отладки.", "node2NotSupported": "Значение \"node2\" больше не поддерживается; используйте \"node\" и задайте для атрибута \"protocol\" значение \"inspector\".", "debugName": "Имя конфигурации; отображается в раскрывающемся меню конфигурации запуска.", "debugRequest": "Запросите тип конфигурации. Возможные типы: \"запуск\" и \"подключение\".", diff --git a/i18n/rus/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 91e553b6c736e..2322bd36fa802 100644 --- a/i18n/rus/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,6 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "vscode.extension.contributes.view": "Добавляет пользовательское представление", + "vscode.extension.contributes.view.id": "Уникальный идентификатор представления, созданного с помощью vscode.workspace.createTreeView", + "vscode.extension.contributes.view.label": "Строка для отображения представления в понятном для пользователя формате", + "vscode.extension.contributes.view.icon": "Путь к значку представления", + "vscode.extension.contributes.views": "Добавляет пользовательские представления", "showViewlet": "Показать {0}", "view": "Просмотреть" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 6d9a00632d2a4..6380e0caa1e07 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "reallyRecommended2": "Расширение '{0}' не рекомендуется для этого типа файлов.", "showRecommendations": "Показать рекомендации", "neverShowAgain": "Больше не показывать", "close": "Закрыть", diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index 183b5ea953517..325a13dfd7ac6 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -8,6 +8,7 @@ "extensions": "Расширения", "sort by installs": "Сортировать по: числу установок", "sort by rating": "Сортировать по: рейтинг", + "sort by name": "Сортировать по: название", "no extensions found": "Расширений не найдено.", "suggestProxyError": "Marketplace вернул значение \"ECONNREFUSED\". Проверьте параметр \"http.proxy\".", "outdatedExtensions": "Устаревшие расширения: {0}" diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index 29ff1ceed65ca..4338bc61e7b6a 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -7,6 +7,7 @@ "keybindingsInputName": "Сочетания клавиш", "SearchKeybindings.AriaLabel": "Поиск настраиваемых сочетаний клавиш", "SearchKeybindings.Placeholder": "Поиск настраиваемых сочетаний клавиш", + "sortByPrecedene": "Сортировать по приоритету", "header-message": "Для использования расширенных настроек откройте и измените", "keybindings-file-name": "keybindings.json", "keybindingsLabel": "Настраиваемые сочетания клавиш", @@ -14,6 +15,7 @@ "addLabel": "Добавить настраиваемое сочетание клавиш", "removeLabel": "Удаление настраиваемого сочетания клавиш", "resetLabel": "Сбросить настраиваемое сочетание клавиш", + "showConflictsLabel": "Показать конфиликты", "copyLabel": "Копировать", "error": "Произошла ошибка \"{0}\" при редактировании настраиваемого сочетания клавиш. Откройте и проверьте файл \"keybindings.json\".", "command": "Команда", diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index dd62a90ff3e8e..b82ad2f758e37 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,6 +6,7 @@ { "openGlobalSettings": "Открыть пользовательские параметры", "openGlobalKeybindings": "Открыть сочетания клавиш", + "openGlobalKeybindingsFile": "Открыть файл сочетаний клавиш", "openWorkspaceSettings": "Открыть параметры рабочей области", "configureLanguageBasedSettings": "Настроить параметры языка...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/rus/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json index 2ecce32e28ae1..01326f09a14a7 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "default": "По умолчанию", - "user": "Пользователь" + "user": "Пользователь", + "meta": "meta", + "option": "параметр" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/search/browser/replaceService.i18n.json b/i18n/rus/src/vs/workbench/parts/search/browser/replaceService.i18n.json index 8b6ad71cd4e6d..7f4464d3a78f7 100644 --- a/i18n/rus/src/vs/workbench/parts/search/browser/replaceService.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/search/browser/replaceService.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "fileReplaceChanges": "{0} ↔ {1} (заменить предварительную версию)" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index c172163eb520a..da2bdae0add1c 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -9,6 +9,7 @@ "ConfigureTaskRunnerAction.quickPick.template": "Выбрать средство выполнения задач", "ConfigureTaskRunnerAction.autoDetecting": "Автообнаружение задач для {0}", "ConfigureTaskRunnerAction.autoDetect": "Не удалось автоматически определить систему задачи, используется шаблон по умолчанию. Подробности см. в выходных данных задачи.", + "ConfigureTaskRunnerAction.autoDetectError": "При определении системы задачи возникли ошибки. Дополнительные сведения см. в выходных данных задачи.", "ConfigureTaskRunnerAction.failed": "Не удается создать файл tasks.json в папке .vscode. Подробности см. в выходных данных задачи.", "ConfigureTaskRunnerAction.label": "Настроить средство выполнения задач", "ConfigureBuildTaskAction.label": "Настроить задачу сборки", diff --git a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index 03b66cf3c552e..4523bac1924f8 100644 --- a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -16,6 +16,7 @@ "terminal.integrated.fontLigatures": "Определяет, будут ли включены лигатуры шрифтов для терминала.", "terminal.integrated.fontSize": "Определяет размер шрифта (в пикселях) для терминала.", "terminal.integrated.lineHeight": "Определяет высоту строки терминала; это число умножается на размер шрифта терминала, что дает фактическую высоту строки в пикселях.", + "terminal.integrated.enableBold": "Следует ли разрешить полужирный текст в терминале. Эта функция должна поддерживаться оболочкой терминала.", "terminal.integrated.cursorBlinking": "Управляет миганием курсора терминала.", "terminal.integrated.cursorStyle": "Определяет стиль курсора терминала.", "terminal.integrated.scrollback": "Определяет предельное число строк в буфере терминала.", diff --git a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json index 1ed48f98d5802..d683bd1c3d94c 100644 --- a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.integrated.allowWorkspaceShell": "Вы хотите разрешить запуск {0} (определяется как параметр рабочей области) в терминале?", "allow": "Allow", "disallow": "Disallow" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index ab56be435f7f9..7cd864203eac5 100644 --- a/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -14,6 +14,7 @@ "noIconThemeDesc": "Отключить значки файлов", "problemChangingIconTheme": "Проблема при задании темы значка: {0}", "themes.selectIconTheme": "Выбрать тему значка файла", + "generateColorTheme.label": "Создать цветовую тему на основе текущих параметров", "preferences": "Параметры", "developer": "Разработчик" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/rus/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index d599004ee21dc..c86c05dcae5df 100644 --- a/i18n/rus/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "walkThrough.unboundCommand": "свободный" + "walkThrough.unboundCommand": "свободный", + "walkThrough.gitNotFound": "Похоже, Git не установлен в вашей системе." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/rus/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json index c953639514d60..9f08b3aed1fa9 100644 --- a/i18n/rus/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json +++ b/i18n/rus/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -6,5 +6,6 @@ { "schema.colors": "Цвета для выделения синтаксических конструкций", "schema.properties.name": "Описание правила", - "schema.fontStyle": "Начертание шрифта для правила: один либо сочетание курсива, полужирного и подчеркивания." + "schema.fontStyle": "Начертание шрифта для правила: один либо сочетание курсива, полужирного и подчеркивания.", + "schema.tokenColors.path": "Путь к файлу tmTheme (по отношению к текущему файлу)" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/rus/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json index 34c882751ea56..ac6d90763578d 100644 --- a/i18n/rus/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json +++ b/i18n/rus/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -4,5 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.cannotparsejson": "Возникли проблемы при анализе файла JSON THEME: {0}." + "error.cannotparsejson": "Возникли проблемы при анализе файла JSON THEME: {0}.", + "error.invalidformat.colors": "Ошибка при анализе файла цветовой темы: {0}. Свойство 'colors' не имеет тип 'object'.", + "error.invalidformat.tokenColors": "Ошибка при анализе файла цветовой темы: {0}. Свойство 'tokenColors' должно содержать массив цветов или путь к текстовому файлу цветовой темы", + "error.plist.invalidformat": "Ошибка при анализе файла tmTheme: {0}. 'settings' не является массивом.", + "error.cannotparse": "Ошибка при анализе файла tmTheme: {0}", + "error.cannotload": "Ошибка при загрузке файла tmTheme {0}: {1}" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/rus/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 2701a620e308e..f7243407022e7 100644 --- a/i18n/rus/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -25,5 +25,8 @@ "colorThemeError": "Theme is unknown or not installed.", "iconTheme": "Specifies the icon theme used in the workbench.", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed." + "iconThemeError": "File icon theme is unknown or not installed.", + "workbenchColors": "Переопределяет цвета из выбранной цветовой темы.", + "workbenchColors.deprecated": "Параметр больше не является экспериментальным и был переименован в 'workbench.colorCustomizations'", + "workbenchColors.deprecatedDescription": "Используйте параметр 'workbench.colorCustomizations'" } \ No newline at end of file From 76ec19f240150ea86729286c129a72d845adb10a Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 4 May 2017 13:01:01 -0700 Subject: [PATCH 0196/2747] Monokai: Use standard fg for list highlight Fixes #25868 --- extensions/theme-monokai/themes/monokai-color-theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index b9331a910c26f..7f54f825424d2 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -13,7 +13,7 @@ "list.inactiveSelectionBackground": "#414339", "list.hoverBackground": "#272822", "list.dropBackground": "#414339", - "list.highlightForeground": "#75715E", + "list.highlightForeground": "#f8f8f2", "button.background": "#75715E", "editor.background": "#272822", "editor.foreground": "#f8f8f2", From 0a6066eebffb8d760ddfe65539d5ead41dbb7766 Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 4 May 2017 22:18:58 +0200 Subject: [PATCH 0197/2747] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 49f1836ee4e0d..ffb1d379bcb45 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev", "version": "1.13.0", "electronVersion": "1.6.6", - "distro": "c1989b3e8a8516b92a46c359eba624fb9f812201", + "distro": "bb676c1d1f91a0c6d3050d8ca8a49ba7743108c5", "author": { "name": "Microsoft Corporation" }, From d6c61a0e12493068d2da532fdf866eb5fc3201fb Mon Sep 17 00:00:00 2001 From: Bradley Meck Date: Thu, 4 May 2017 18:21:08 -0500 Subject: [PATCH 0198/2747] Add .mjs to known JavaScript file extensions (#25747) Also add .es6 in missing places --- extensions/javascript/package.json | 3 ++- extensions/javascript/syntaxes/JavaScript.tmLanguage.json | 4 +++- extensions/markdown/syntaxes/gulpfile.js | 2 +- extensions/markdown/syntaxes/markdown.tmLanguage | 2 +- extensions/typescript/build/update-grammars.js | 2 +- extensions/typescript/src/typescriptMain.ts | 2 +- src/vs/base/test/node/glob.test.ts | 4 ++-- 7 files changed, 11 insertions(+), 8 deletions(-) diff --git a/extensions/javascript/package.json b/extensions/javascript/package.json index aeb014688ae9c..b8c76ba64aaf2 100644 --- a/extensions/javascript/package.json +++ b/extensions/javascript/package.json @@ -41,7 +41,8 @@ ], "extensions": [ ".js", - ".es6" + ".es6", + ".mjs" ], "filenames": [ "jakefile" diff --git a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json index bda3bd858cd37..7d5f08c0d4948 100644 --- a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json +++ b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json @@ -3,7 +3,9 @@ "scopeName": "source.js", "fileTypes": [ ".js", - ".jsx" + ".jsx", + ".es6", + ".mjs" ], "uuid": "805375ec-d614-41f5-8993-5843fe63ea82", "patterns": [ diff --git a/extensions/markdown/syntaxes/gulpfile.js b/extensions/markdown/syntaxes/gulpfile.js index f57cb80fb9d77..a01ff06499cb9 100644 --- a/extensions/markdown/syntaxes/gulpfile.js +++ b/extensions/markdown/syntaxes/gulpfile.js @@ -34,7 +34,7 @@ const languages = [ { name: 'groovy', identifiers: ['groovy', 'gvy'], source: 'source.groovy' }, { name: 'jade', identifiers: ['jade'], source: 'text.jade' }, - { name: 'js', identifiers: ['js', 'jsx', 'javascript'], source: 'source.js' }, + { name: 'js', identifiers: ['js', 'jsx', 'javascript', 'es6', 'mjs'], source: 'source.js' }, { name: 'js_regexp', identifiers: ['regexp'], source: 'source.js.regexp' }, { name: 'json', identifiers: ['json', 'sublime-settings', 'sublime-menu', 'sublime-keymap', 'sublime-mousemap', 'sublime-theme', 'sublime-build', 'sublime-project', 'sublime-completions'], source: 'source.json' }, { name: 'less', identifiers: ['less'], source: 'source.css.less' }, diff --git a/extensions/markdown/syntaxes/markdown.tmLanguage b/extensions/markdown/syntaxes/markdown.tmLanguage index df4657d201426..38d1292f7e4c1 100644 --- a/extensions/markdown/syntaxes/markdown.tmLanguage +++ b/extensions/markdown/syntaxes/markdown.tmLanguage @@ -1965,7 +1965,7 @@ fenced_code_block_js begin - (^|\G)(\s*)([`~]{3,})\s*((js|jsx|javascript)(\s+[^`~]*)?$) + (^|\G)(\s*)([`~]{3,})\s*((js|jsx|javascript|es6|mjs)(\s+[^`~]*)?$) name markup.fenced_code.block.markdown end diff --git a/extensions/typescript/build/update-grammars.js b/extensions/typescript/build/update-grammars.js index 2ce6ee9d828a1..c38d6f1051017 100644 --- a/extensions/typescript/build/update-grammars.js +++ b/extensions/typescript/build/update-grammars.js @@ -8,7 +8,7 @@ var updateGrammar = require('../../../build/npm/update-grammar'); function adaptToJavaScript(grammar) { grammar.name = 'JavaScript (with React support)'; - grammar.fileTypes = ['.js', '.jsx' ]; + grammar.fileTypes = ['.js', '.jsx', '.es6', '.mjs' ]; grammar.scopeName = 'source.js'; var fixScopeNames = function(rule) { diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index cc01c02942b8d..fbc5b02ce7a96 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -84,7 +84,7 @@ export function activate(context: ExtensionContext): void { id: 'javascript', diagnosticSource: 'js', modeIds: [MODE_ID_JS, MODE_ID_JSX], - extensions: ['.js', '.jsx'], + extensions: ['.js', '.jsx', '.es6', '.mjs'], configFile: 'jsconfig.json' } ], context.storagePath, context.globalState, context.workspaceState); diff --git a/src/vs/base/test/node/glob.test.ts b/src/vs/base/test/node/glob.test.ts index c48e8a3edf7ad..eb9ee5e87560e 100644 --- a/src/vs/base/test/node/glob.test.ts +++ b/src/vs/base/test/node/glob.test.ts @@ -15,12 +15,12 @@ suite('Glob', () => { // let patterns = [ // '{**/*.cs,**/*.json,**/*.csproj,**/*.sln}', // '{**/*.cs,**/*.csproj,**/*.sln}', - // '{**/*.ts,**/*.tsx,**/*.js,**/*.jsx,**/*.es6}', + // '{**/*.ts,**/*.tsx,**/*.js,**/*.jsx,**/*.es6,**/*.mjs}', // '**/*.go', // '{**/*.ps,**/*.ps1}', // '{**/*.c,**/*.cpp,**/*.h}', // '{**/*.fsx,**/*.fsi,**/*.fs,**/*.ml,**/*.mli}', - // '{**/*.js,**/*.jsx,**/*.es6}', + // '{**/*.js,**/*.jsx,**/*.es6,**/*.mjs}', // '{**/*.ts,**/*.tsx}', // '{**/*.php}', // '{**/*.php}', From 4fce360efb3d0a51791a79460be2200bd0842974 Mon Sep 17 00:00:00 2001 From: Ilie Halip Date: Fri, 5 May 2017 08:36:40 +0300 Subject: [PATCH 0199/2747] make it possible to change a SCMResourceGroup's label --- src/vs/vscode.d.ts | 2 +- src/vs/workbench/api/node/extHost.protocol.ts | 1 + src/vs/workbench/api/node/extHostSCM.ts | 5 +++++ src/vs/workbench/api/node/mainThreadSCM.ts | 21 +++++++++++++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 5b5cd0a27af2d..95fd5de30fd1b 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -4735,7 +4735,7 @@ declare module 'vscode' { /** * The label of this source control resource group. */ - readonly label: string; + label: string; /** * Whether this source control resource group is hidden when it contains diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index d4cd004550a1c..cf5122a2e905b 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -295,6 +295,7 @@ export abstract class MainThreadSCMShape { $registerGroup(sourceControlHandle: number, handle: number, id: string, label: string): void { throw ni(); } $updateGroup(sourceControlHandle: number, handle: number, features: SCMGroupFeatures): void { throw ni(); } + $updateGroupLabel(sourceControlHandle: number, handle: number, label: string): void { throw ni(); } $updateGroupResourceStates(sourceControlHandle: number, groupHandle: number, resources: SCMRawResource[]): void { throw ni(); } $unregisterGroup(sourceControlHandle: number, handle: number): void { throw ni(); } diff --git a/src/vs/workbench/api/node/extHostSCM.ts b/src/vs/workbench/api/node/extHostSCM.ts index 079d623d5dd0d..9d40839b17791 100644 --- a/src/vs/workbench/api/node/extHostSCM.ts +++ b/src/vs/workbench/api/node/extHostSCM.ts @@ -81,6 +81,11 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG return this._label; } + set label(label: string) { + this._label = label; + this._proxy.$updateGroupLabel(this._sourceControlHandle, this._handle, label); + } + private _hideWhenEmpty: boolean | undefined = undefined; get hideWhenEmpty(): boolean | undefined { diff --git a/src/vs/workbench/api/node/mainThreadSCM.ts b/src/vs/workbench/api/node/mainThreadSCM.ts index 42129cde3ec88..6223b3e3bc9d7 100644 --- a/src/vs/workbench/api/node/mainThreadSCM.ts +++ b/src/vs/workbench/api/node/mainThreadSCM.ts @@ -137,6 +137,17 @@ class MainThreadSCMProvider implements ISCMProvider { this._onDidChange.fire(); } + $updateGroupLabel(handle: number, label: string): void { + const group = this._groupsByHandle[handle]; + + if (!group) { + return; + } + + group.label = label; + this._onDidChange.fire(); + } + $updateGroupResourceStates(groupHandle: number, resources: SCMRawResource[]): void { const group = this._groupsByHandle[groupHandle]; @@ -263,6 +274,16 @@ export class MainThreadSCM extends MainThreadSCMShape { provider.$updateGroup(groupHandle, features); } + $updateGroupLabel(sourceControlHandle: number, groupHandle: number, label: string): void { + const provider = this._sourceControls[sourceControlHandle]; + + if (!provider) { + return; + } + + provider.$updateGroupLabel(groupHandle, label); + } + $updateGroupResourceStates(sourceControlHandle: number, groupHandle: number, resources: SCMRawResource[]): void { const provider = this._sourceControls[sourceControlHandle]; From 79f9601273ee32506149e84d1c0e714c15acf9e0 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 4 May 2017 23:37:05 -0700 Subject: [PATCH 0200/2747] Fix configFileWatcher being disposed of incorrectly --- extensions/typescript/src/typescriptMain.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index fbc5b02ce7a96..2b3536bb290b6 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -9,7 +9,7 @@ * ------------------------------------------------------------------------------------------ */ 'use strict'; -import { env, languages, commands, workspace, window, ExtensionContext, Memento, IndentAction, Diagnostic, DiagnosticCollection, Range, Disposable, Uri, MessageItem, TextEditor, FileSystemWatcher, DiagnosticSeverity } from 'vscode'; +import { env, languages, commands, workspace, window, ExtensionContext, Memento, IndentAction, Diagnostic, DiagnosticCollection, Range, Disposable, Uri, MessageItem, TextEditor, DiagnosticSeverity } from 'vscode'; // This must be the first statement otherwise modules might got loaded with // the wrong locale. @@ -418,7 +418,6 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { private client: TypeScriptServiceClient; private languages: LanguageProvider[]; private languagePerId: ObjectMap; - private configFileWatcher: FileSystemWatcher; private readonly disposables: Disposable[] = []; constructor( @@ -460,7 +459,6 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { obj.dispose(); } } - this.configFileWatcher.dispose(); } public get serviceClient(): TypeScriptServiceClient { From d1768a78bce98a5ce06373a67631fab49d326955 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 5 May 2017 09:25:20 +0200 Subject: [PATCH 0201/2747] fix #25959 --- src/vs/editor/contrib/suggest/browser/suggestController.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/editor/contrib/suggest/browser/suggestController.ts b/src/vs/editor/contrib/suggest/browser/suggestController.ts index 241c5141a1878..95fa44e98ae1d 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestController.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestController.ts @@ -130,6 +130,9 @@ export class SuggestController implements IEditorContribution { let value = true; if ( this._model.state === State.Auto + && !item.suggestion.command + && !item.suggestion.additionalTextEdits + && !item.suggestion.snippetType && endColumn - startColumn === item.suggestion.insertText.length ) { const oldText = this._editor.getModel().getValueInRange({ From f8ede24fd90af759ee23de89f2baf8b4c5032011 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 5 May 2017 09:27:09 +0200 Subject: [PATCH 0202/2747] correct snippet handling, #25959 --- src/vs/editor/contrib/suggest/browser/suggestController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestController.ts b/src/vs/editor/contrib/suggest/browser/suggestController.ts index 95fa44e98ae1d..09720eae57b20 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestController.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestController.ts @@ -132,7 +132,7 @@ export class SuggestController implements IEditorContribution { this._model.state === State.Auto && !item.suggestion.command && !item.suggestion.additionalTextEdits - && !item.suggestion.snippetType + && item.suggestion.snippetType !== 'textmate' && endColumn - startColumn === item.suggestion.insertText.length ) { const oldText = this._editor.getModel().getValueInRange({ From 689a607b9719f955508dc10b5c20366b91635797 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 5 May 2017 10:35:14 +0200 Subject: [PATCH 0203/2747] Always have a size >0 on Chrome for the textarea (#356) --- src/vs/editor/browser/controller/textAreaHandler.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index 9d3c60eaf2a16..7b51925e3c73d 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -213,7 +213,11 @@ export class TextAreaHandler extends ViewPart { const visibleRange = this._viewHelper.visibleRangeForPositionRelativeToEditor(lineNumber, column); if (visibleRange) { - this._visibleTextArea = new VisibleTextArea(this._viewHelper.getVerticalOffsetForLineNumber(lineNumber), visibleRange.left, 0); + this._visibleTextArea = new VisibleTextArea( + this._viewHelper.getVerticalOffsetForLineNumber(lineNumber), + visibleRange.left, + canUseZeroSizeTextarea ? 0 : 1 + ); this._render(); } From 1ddb778ea389513c394c687f7d7608a34d6dcf27 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 5 May 2017 11:04:25 +0200 Subject: [PATCH 0204/2747] Fixes #13093: Have the font size be really small when the textarea is positioned at the primary cursor --- .../browser/controller/textAreaHandler.ts | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index 7b51925e3c73d..b438d95510a92 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -111,8 +111,6 @@ export class TextAreaHandler extends ViewPart { this.textArea.setAttribute('aria-haspopup', 'false'); this.textArea.setAttribute('aria-autocomplete', 'both'); - Configuration.applyFontInfo(this.textArea, this._fontInfo); - this.textAreaCover = createFastDomNode(document.createElement('div')); this.textAreaCover.setPosition('absolute'); @@ -267,7 +265,6 @@ export class TextAreaHandler extends ViewPart { // Give textarea same font size & line height as editor, for the IME case (when the textarea is visible) if (e.fontInfo) { this._fontInfo = this._context.configuration.editor.fontInfo; - Configuration.applyFontInfo(this.textArea, this._fontInfo); } if (e.viewInfo.experimentalScreenReader) { this._experimentalScreenReader = this._context.configuration.editor.viewInfo.experimentalScreenReader; @@ -365,7 +362,8 @@ export class TextAreaHandler extends ViewPart { this._visibleTextArea.top - this._scrollTop, this._contentLeft + this._visibleTextArea.left - this._scrollLeft, this._visibleTextArea.width, - this._lineHeight + this._lineHeight, + true ); return; } @@ -391,13 +389,24 @@ export class TextAreaHandler extends ViewPart { } // The primary cursor is in the viewport (at least vertically) => place textarea on the cursor - this._renderInsideEditor(top, left, canUseZeroSizeTextarea ? 0 : 1, canUseZeroSizeTextarea ? 0 : 1); + this._renderInsideEditor( + top, left, + canUseZeroSizeTextarea ? 0 : 1, canUseZeroSizeTextarea ? 0 : 1, + false + ); } - private _renderInsideEditor(top: number, left: number, width: number, height: number): void { + private _renderInsideEditor(top: number, left: number, width: number, height: number, useEditorFont: boolean): void { const ta = this.textArea; const tac = this.textAreaCover; + if (useEditorFont) { + Configuration.applyFontInfo(ta, this._fontInfo); + } else { + ta.setFontSize(1); + ta.setLineHeight(1); + } + ta.setTop(top); ta.setLeft(left); ta.setWidth(width); From 1a4f9ab0e611a83d5d30e6b178e141613a9d5b47 Mon Sep 17 00:00:00 2001 From: Maik Riechert Date: Fri, 5 May 2017 10:15:08 +0100 Subject: [PATCH 0205/2747] show ahead/behind while git syncing reverts fab6f8871ad --- extensions/git/src/statusbar.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/extensions/git/src/statusbar.ts b/extensions/git/src/statusbar.ts index b12dd9664c498..c609d570b9d43 100644 --- a/extensions/git/src/statusbar.ts +++ b/extensions/git/src/statusbar.ts @@ -127,7 +127,6 @@ class SyncStatusBar { if (this.state.isSyncRunning) { icon = '$(sync~spin)'; - text = ''; command = ''; tooltip = localize('syncing changes', "Synchronizing changes..."); } From 8b4a17ca41dcc761ff1216f775941a4cb61c94b6 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 5 May 2017 11:43:39 +0200 Subject: [PATCH 0206/2747] Fixes #2773: Ignore replacePreviousChar if the editor has a selection --- .../common/controller/cursorTypeOperations.ts | 7 +++++ .../test/common/controller/cursor.test.ts | 26 +++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index 13b79a281fece..c564895b614aa 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -227,6 +227,13 @@ export class TypeOperations { let commands: CommandResult[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; + if (!cursor.selection.isEmpty()) { + // looks like https://github.com/Microsoft/vscode/issues/2773 + // where a cursor operation occured before a canceled composition + // => ignore composition + commands[i] = null; + continue; + } let pos = cursor.position; let startColumn = Math.max(1, pos.column - replaceCharCnt); let range = new Range(pos.lineNumber, startColumn, pos.lineNumber, pos.column); diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index 59ea9aa805c0f..a543e5dac9aa7 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -3145,6 +3145,32 @@ suite('autoClosingPairs', () => { mode.dispose(); }); + test('issue #2773: Accents (´`¨^, others?) are inserted in the wrong position (Mac)', () => { + let mode = new AutoClosingMode(); + usingCursor({ + text: [ + 'hello', + 'world' + ], + languageIdentifier: mode.getLanguageIdentifier() + }, (model, cursor) => { + assertCursor(cursor, new Position(1, 1)); + + // Typing ` and pressing shift+down on the mac US intl kb layout + // Here we're just replaying what the cursor gets + cursorCommand(cursor, H.CompositionStart, null, 'keyboard'); + cursorCommand(cursor, H.Type, { text: '`' }, 'keyboard'); + moveDown(cursor, true); + cursorCommand(cursor, H.ReplacePreviousChar, { replaceCharCnt: 1, text: '`' }, 'keyboard'); + cursorCommand(cursor, H.ReplacePreviousChar, { replaceCharCnt: 1, text: '`' }, 'keyboard'); + cursorCommand(cursor, H.CompositionEnd, null, 'keyboard'); + + assert.equal(model.getValue(), '`hello\nworld'); + assertCursor(cursor, new Selection(1, 2, 2, 2)); + }); + mode.dispose(); + }); + test('issue #20891: All cursors should do the same thing', () => { let mode = new AutoClosingMode(); usingCursor({ From ccae6f96efd7c4e5598c37210e0c970e1ee18da2 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 5 May 2017 11:58:04 +0200 Subject: [PATCH 0207/2747] Contribute explorer views - Adopt proposed API to contribute explorer views - Adopt extension host and main to contribute explorer views - Implement contributable views in explorer viewlet --- src/vs/vscode.proposed.d.ts | 24 +- src/vs/workbench/api/node/extHost.api.impl.ts | 8 +- .../api/node/extHost.contribution.ts | 4 +- src/vs/workbench/api/node/extHost.protocol.ts | 33 +- ...HostTreeView.ts => extHostExplorerView.ts} | 69 +-- ...dTreeView.ts => mainThreadExplorerView.ts} | 55 ++- src/vs/workbench/browser/viewlet.ts | 3 +- .../electron-browser/workbench.main.ts | 3 +- .../browser/explorer.contribution.ts | 10 + .../parts/explorers/browser/explorerView.ts | 407 ++++++++++++++++++ .../parts/explorers/common/explorer.ts | 36 ++ .../parts/files/browser/explorerViewlet.ts | 125 +++--- 12 files changed, 620 insertions(+), 157 deletions(-) rename src/vs/workbench/api/node/{extHostTreeView.ts => extHostExplorerView.ts} (66%) rename src/vs/workbench/api/node/{mainThreadTreeView.ts => mainThreadExplorerView.ts} (51%) create mode 100644 src/vs/workbench/parts/explorers/browser/explorer.contribution.ts create mode 100644 src/vs/workbench/parts/explorers/browser/explorerView.ts create mode 100644 src/vs/workbench/parts/explorers/common/explorer.ts diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index f72a9baa87392..60d118eefc67f 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -530,20 +530,20 @@ declare module 'vscode' { export namespace window { /** - * Create a new [TreeView](#TreeView) instance. + * Create a new explorer view. * - * @param viewId A unique id that identifies the view. - * @param provider A [TreeDataProvider](#TreeDataProvider). - * @return An instance of [TreeView](#TreeView). + * @param id View id. + * @param name View name. + * @param dataProvider A [TreeDataProvider](#TreeDataProvider). + * @return An instance of [View](#View). */ - export function createTreeView(viewId: string, provider: TreeDataProvider): TreeView; + export function createExplorerView(id: string, name: string, dataProvider: TreeDataProvider): View; } /** - * An source control is able to provide [resource states](#SourceControlResourceState) - * to the editor and interact with the editor in several source control related ways. + * A view to interact with nodes */ - export interface TreeView { + export interface View { /** * Refresh the given nodes @@ -602,6 +602,14 @@ declare module 'vscode' { */ getHasChildren?(node: T): boolean; + /** + * Provider a context key to be set for the node. This can be used to describe actions for each node. + * + * @param node The node from which the provider computes context key. + * @return A context key. + */ + getContextKey?(node: T): string; + /** * Get the command to execute when `node` is clicked. * diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 4b84e46809aac..b1e56a9c7e12f 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -18,7 +18,7 @@ import { ExtHostDocuments } from 'vs/workbench/api/node/extHostDocuments'; import { ExtHostDocumentSaveParticipant } from 'vs/workbench/api/node/extHostDocumentSaveParticipant'; import { ExtHostConfiguration } from 'vs/workbench/api/node/extHostConfiguration'; import { ExtHostDiagnostics } from 'vs/workbench/api/node/extHostDiagnostics'; -import { ExtHostTreeView } from 'vs/workbench/api/node/extHostTreeView'; +import { ExtHostExplorerView } from 'vs/workbench/api/node/extHostExplorerView'; import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; import { ExtHostQuickOpen } from 'vs/workbench/api/node/extHostQuickOpen'; import { ExtHostProgress } from 'vs/workbench/api/node/extHostProgress'; @@ -111,7 +111,7 @@ export function createApiFactory( const extHostDocumentSaveParticipant = col.define(ExtHostContext.ExtHostDocumentSaveParticipant).set(new ExtHostDocumentSaveParticipant(extHostDocuments, threadService.get(MainContext.MainThreadWorkspace))); const extHostEditors = col.define(ExtHostContext.ExtHostEditors).set(new ExtHostEditors(threadService, extHostDocumentsAndEditors)); const extHostCommands = col.define(ExtHostContext.ExtHostCommands).set(new ExtHostCommands(threadService, extHostHeapService)); - const extHostTreeView = col.define(ExtHostContext.ExtHostTreeView).set(new ExtHostTreeView(threadService, extHostCommands)); + const extHostExplorerView = col.define(ExtHostContext.ExtHostExplorerView).set(new ExtHostExplorerView(threadService, extHostCommands)); const extHostConfiguration = col.define(ExtHostContext.ExtHostConfiguration).set(new ExtHostConfiguration(threadService.get(MainContext.MainThreadConfiguration), initData.configuration)); const extHostDiagnostics = col.define(ExtHostContext.ExtHostDiagnostics).set(new ExtHostDiagnostics(threadService)); const languageFeatures = col.define(ExtHostContext.ExtHostLanguageFeatures).set(new ExtHostLanguageFeatures(threadService, extHostDocuments, extHostCommands, extHostHeapService, extHostDiagnostics)); @@ -369,8 +369,8 @@ export function createApiFactory( sampleFunction: proposedApiFunction(extension, () => { return extHostMessageService.showMessage(Severity.Info, 'Hello Proposed Api!', {}, []); }), - createTreeView: proposedApiFunction(extension, (providerId: string, provider: vscode.TreeDataProvider): vscode.TreeView => { - return extHostTreeView.createTreeView(providerId, provider); + createExplorerView: proposedApiFunction(extension, (id: string, name: string, provider: vscode.TreeDataProvider): vscode.View => { + return extHostExplorerView.createExplorerView(id, name, provider); }) }; diff --git a/src/vs/workbench/api/node/extHost.contribution.ts b/src/vs/workbench/api/node/extHost.contribution.ts index 2a0e9f874862e..648e50ea3c122 100644 --- a/src/vs/workbench/api/node/extHost.contribution.ts +++ b/src/vs/workbench/api/node/extHost.contribution.ts @@ -19,7 +19,7 @@ import { MainThreadDiagnostics } from './mainThreadDiagnostics'; import { MainThreadDocuments } from './mainThreadDocuments'; import { MainThreadEditors } from './mainThreadEditors'; import { MainThreadErrors } from './mainThreadErrors'; -import { MainThreadTreeView } from './mainThreadTreeView'; +import { MainThreadExplorerView } from './mainThreadExplorerView'; import { MainThreadLanguageFeatures } from './mainThreadLanguageFeatures'; import { MainThreadLanguages } from './mainThreadLanguages'; import { MainThreadMessageService } from './mainThreadMessageService'; @@ -74,7 +74,7 @@ export class ExtHostContribution implements IWorkbenchContribution { col.define(MainContext.MainThreadDocuments).set(this.instantiationService.createInstance(MainThreadDocuments, documentsAndEditors)); col.define(MainContext.MainThreadEditors).set(this.instantiationService.createInstance(MainThreadEditors, documentsAndEditors)); col.define(MainContext.MainThreadErrors).set(create(MainThreadErrors)); - col.define(MainContext.MainThreadExplorers).set(create(MainThreadTreeView)); + col.define(MainContext.MainThreadExplorerViews).set(create(MainThreadExplorerView)); col.define(MainContext.MainThreadLanguageFeatures).set(create(MainThreadLanguageFeatures)); col.define(MainContext.MainThreadLanguages).set(create(MainThreadLanguages)); col.define(MainContext.MainThreadMessageService).set(create(MainThreadMessageService)); diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index d4cd004550a1c..8a40eb6f740f7 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -37,7 +37,6 @@ import { IPickOpenEntry, IPickOptions } from 'vs/platform/quickOpen/common/quick import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; import { IApplyEditsOptions, IUndoStopOptions, TextEditorRevealType, ITextEditorConfigurationUpdate, IResolvedTextEditorConfiguration, ISelectionChangeEvent } from './mainThreadEditor'; -import { InternalTreeNodeContent } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel'; import { TaskSet } from 'vs/workbench/parts/tasks/common/tasks'; import { IModelChangedEvent } from 'vs/editor/common/model/mirrorModel'; import { IPosition } from 'vs/editor/common/core/position'; @@ -155,14 +154,17 @@ export abstract class MainThreadEditorsShape { $getDiffInformation(id: string): TPromise { throw ni(); } } -export abstract class MainThreadTreeViewShape { - $registerTreeDataProvider(providerId: string): void { throw ni(); } - $refresh(providerId: string, node: InternalTreeNodeContent): void { throw ni(); } +export interface ITreeNode { + id: string; + label: string; + hasChildren: boolean; + clickCommand: string; + contextKey: string; } -export abstract class MainThreadTreeShape { - $registerTreeExplorerNodeProvider(providerId: string, node: InternalTreeNodeContent): void { throw ni(); } - $refresh(providerId: string, node: InternalTreeNodeContent): void { throw ni(); } +export abstract class MainThreadExplorerViewShape { + $registerView(id: string, name: string): void { throw ni(); } + $refresh(viewId: string, node: ITreeNode): void { throw ni(); } } export abstract class MainThreadErrorsShape { @@ -366,15 +368,10 @@ export abstract class ExtHostDocumentsAndEditorsShape { } -export abstract class ExtHostTreeViewShape { - $provideRootNode(providerId: string): TPromise { throw ni(); }; - $resolveChildren(providerId: string, node: InternalTreeNodeContent): TPromise { throw ni(); } - $getInternalCommand(providerId: string, node: InternalTreeNodeContent): TPromise { throw ni(); } -} - -export abstract class ExtHostTreeShape { - $resolveChildren(providerId: string, node: InternalTreeNodeContent): TPromise { throw ni(); } - $getInternalCommand(providerId: string, node: InternalTreeNodeContent): TPromise { throw ni(); } +export abstract class ExtHostExplorerViewShape { + $provideRootNode(viewId: string): TPromise { throw ni(); }; + $resolveChildren(viewId: string, node: ITreeNode): TPromise { throw ni(); } + $getInternalCommand(viewId: string, node: ITreeNode): TPromise { throw ni(); } } export abstract class ExtHostExtensionServiceShape { @@ -465,7 +462,7 @@ export const MainContext = { MainThreadDocuments: createMainId('MainThreadDocuments', MainThreadDocumentsShape), MainThreadEditors: createMainId('MainThreadEditors', MainThreadEditorsShape), MainThreadErrors: createMainId('MainThreadErrors', MainThreadErrorsShape), - MainThreadExplorers: createMainId('MainThreadTreeView', MainThreadTreeViewShape), + MainThreadExplorerViews: createMainId('MainThreadExplorerView', MainThreadExplorerViewShape), MainThreadLanguageFeatures: createMainId('MainThreadLanguageFeatures', MainThreadLanguageFeaturesShape), MainThreadLanguages: createMainId('MainThreadLanguages', MainThreadLanguagesShape), MainThreadMessageService: createMainId('MainThreadMessageService', MainThreadMessageServiceShape), @@ -490,7 +487,7 @@ export const ExtHostContext = { ExtHostDocuments: createExtId('ExtHostDocuments', ExtHostDocumentsShape), ExtHostDocumentSaveParticipant: createExtId('ExtHostDocumentSaveParticipant', ExtHostDocumentSaveParticipantShape), ExtHostEditors: createExtId('ExtHostEditors', ExtHostEditorsShape), - ExtHostTreeView: createExtId('ExtHostTreeView', ExtHostTreeViewShape), + ExtHostExplorerView: createExtId('ExtHostExplorerView', ExtHostExplorerViewShape), ExtHostFileSystemEventService: createExtId('ExtHostFileSystemEventService', ExtHostFileSystemEventServiceShape), ExtHostHeapService: createExtId('ExtHostHeapMonitor', ExtHostHeapServiceShape), ExtHostLanguageFeatures: createExtId('ExtHostLanguageFeatures', ExtHostLanguageFeaturesShape), diff --git a/src/vs/workbench/api/node/extHostTreeView.ts b/src/vs/workbench/api/node/extHostExplorerView.ts similarity index 66% rename from src/vs/workbench/api/node/extHostTreeView.ts rename to src/vs/workbench/api/node/extHostExplorerView.ts index ec6318eec3aa2..cb2bd09645b5f 100644 --- a/src/vs/workbench/api/node/extHostTreeView.ts +++ b/src/vs/workbench/api/node/extHostExplorerView.ts @@ -5,27 +5,28 @@ 'use strict'; import { localize } from 'vs/nls'; -import { TreeView, TreeDataProvider } from 'vscode'; +import { View, TreeDataProvider } from 'vscode'; import { defaultGenerator } from 'vs/base/common/idGenerator'; import { TPromise } from 'vs/base/common/winjs.base'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { MainContext, ExtHostTreeViewShape, MainThreadTreeViewShape } from './extHost.protocol'; -import { InternalTreeNode } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel'; +import { MainContext, ExtHostExplorerViewShape, MainThreadExplorerViewShape, ITreeNode } from './extHost.protocol'; import { ExtHostCommands } from 'vs/workbench/api/node/extHostCommands'; import { asWinJsPromise } from 'vs/base/common/async'; import * as modes from 'vs/editor/common/modes'; -class InternalTreeNodeImpl implements InternalTreeNode { +class TreeNodeImpl implements ITreeNode { readonly id: string; label: string; hasChildren: boolean; clickCommand: string = null; + contextKey: string; constructor(readonly providerId: string, node: any, provider: TreeDataProvider) { this.id = defaultGenerator.nextId(); this.label = provider.getLabel ? provider.getLabel(node) : node.toString(); this.hasChildren = provider.getHasChildren ? provider.getHasChildren(node) : true; + this.contextKey = provider.getContextKey ? provider.getContextKey(node) : null; if (provider.getClickCommand) { const command = provider.getClickCommand(node); if (command) { @@ -35,13 +36,13 @@ class InternalTreeNodeImpl implements InternalTreeNode { } } -export class ExtHostTreeView extends ExtHostTreeViewShape { - private _proxy: MainThreadTreeViewShape; +export class ExtHostExplorerView extends ExtHostExplorerViewShape { + private _proxy: MainThreadExplorerViewShape; private _extNodeProviders: { [providerId: string]: TreeDataProvider }; - private _extViews: Map> = new Map>(); - private _extNodeMaps: { [providerId: string]: { [id: string]: InternalTreeNode } }; - private _mainNodesMap: Map>; + private _extViews: Map> = new Map>(); + private _extNodeMaps: { [providerId: string]: { [id: string]: ITreeNode } }; + private _mainNodesMap: Map>; private _childrenNodesMap: Map>; constructor( @@ -50,11 +51,11 @@ export class ExtHostTreeView extends ExtHostTreeViewShape { ) { super(); - this._proxy = threadService.get(MainContext.MainThreadExplorers); + this._proxy = threadService.get(MainContext.MainThreadExplorerViews); this._extNodeProviders = Object.create(null); this._extNodeMaps = Object.create(null); - this._mainNodesMap = new Map>(); + this._mainNodesMap = new Map>(); this._childrenNodesMap = new Map>(); commands.registerArgumentProcessor({ @@ -68,39 +69,39 @@ export class ExtHostTreeView extends ExtHostTreeViewShape { }); } - createTreeView(providerId: string, provider: TreeDataProvider): TreeView { - this._proxy.$registerTreeDataProvider(providerId); - this._extNodeProviders[providerId] = provider; - this._mainNodesMap.set(providerId, new Map()); - this._childrenNodesMap.set(providerId, new Map()); + createExplorerView(viewId: string, viewName: string, provider: TreeDataProvider): View { + this._proxy.$registerView(viewId, viewName); + this._extNodeProviders[viewId] = provider; + this._mainNodesMap.set(viewId, new Map()); + this._childrenNodesMap.set(viewId, new Map()); - const treeView: TreeView = { + const treeView: View = { refresh: (node: T) => { - const mainThreadNode = this._mainNodesMap.get(providerId).get(node); - this._proxy.$refresh(providerId, mainThreadNode); + const mainThreadNode = this._mainNodesMap.get(viewId).get(node); + this._proxy.$refresh(viewId, mainThreadNode); }, dispose: () => { - delete this._extNodeProviders[providerId]; - delete this._extNodeProviders[providerId]; - this._mainNodesMap.delete(providerId); - this._childrenNodesMap.delete(providerId); - this._extViews.delete(providerId); + delete this._extNodeProviders[viewId]; + delete this._extNodeProviders[viewId]; + this._mainNodesMap.delete(viewId); + this._childrenNodesMap.delete(viewId); + this._extViews.delete(viewId); } }; - this._extViews.set(providerId, treeView); + this._extViews.set(viewId, treeView); return treeView; } - $provideRootNode(providerId: string): TPromise { + $provideRootNode(providerId: string): TPromise { const provider = this._extNodeProviders[providerId]; if (!provider) { const errMessage = localize('treeExplorer.notRegistered', 'No TreeExplorerNodeProvider with id \'{0}\' registered.', providerId); - return TPromise.wrapError(errMessage); + return TPromise.wrapError(errMessage); } return asWinJsPromise(() => provider.provideRootNode()).then(extRootNode => { - const extNodeMap: { [id: string]: InternalTreeNode } = Object.create(null); - const internalRootNode = new InternalTreeNodeImpl(providerId, extRootNode, provider); + const extNodeMap: { [id: string]: ITreeNode } = Object.create(null); + const internalRootNode = new TreeNodeImpl(providerId, extRootNode, provider); extNodeMap[internalRootNode.id] = extRootNode; this._extNodeMaps[providerId] = extNodeMap; @@ -110,15 +111,15 @@ export class ExtHostTreeView extends ExtHostTreeViewShape { return internalRootNode; }, err => { const errMessage = localize('treeExplorer.failedToProvideRootNode', 'TreeExplorerNodeProvider \'{0}\' failed to provide root node.', providerId); - return TPromise.wrapError(errMessage); + return TPromise.wrapError(errMessage); }); } - $resolveChildren(providerId: string, mainThreadNode: InternalTreeNode): TPromise { + $resolveChildren(providerId: string, mainThreadNode: ITreeNode): TPromise { const provider = this._extNodeProviders[providerId]; if (!provider) { const errMessage = localize('treeExplorer.notRegistered', 'No TreeExplorerNodeProvider with id \'{0}\' registered.', providerId); - return TPromise.wrapError(errMessage); + return TPromise.wrapError(errMessage); } const extNodeMap = this._extNodeMaps[providerId]; @@ -133,7 +134,7 @@ export class ExtHostTreeView extends ExtHostTreeViewShape { return asWinJsPromise(() => provider.resolveChildren(extNode)).then(children => { return children.map(extChild => { - const internalChild = new InternalTreeNodeImpl(providerId, extChild, provider); + const internalChild = new TreeNodeImpl(providerId, extChild, provider); extNodeMap[internalChild.id] = extChild; this._mainNodesMap.get(providerId).set(extChild, internalChild); return internalChild; @@ -142,7 +143,7 @@ export class ExtHostTreeView extends ExtHostTreeViewShape { } // Convert the command on the ExtHost side so we can pass the original externalNode to the registered handler - $getInternalCommand(providerId: string, mainThreadNode: InternalTreeNode): TPromise { + $getInternalCommand(providerId: string, mainThreadNode: ITreeNode): TPromise { const commandConverter = this.commands.converter; if (mainThreadNode.clickCommand) { diff --git a/src/vs/workbench/api/node/mainThreadTreeView.ts b/src/vs/workbench/api/node/mainThreadExplorerView.ts similarity index 51% rename from src/vs/workbench/api/node/mainThreadTreeView.ts rename to src/vs/workbench/api/node/mainThreadExplorerView.ts index 54168aecf5c79..4ffaa3977c200 100644 --- a/src/vs/workbench/api/node/mainThreadTreeView.ts +++ b/src/vs/workbench/api/node/mainThreadExplorerView.ts @@ -7,56 +7,73 @@ import { TPromise } from 'vs/base/common/winjs.base'; import Event, { Emitter } from 'vs/base/common/event'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { ExtHostContext, MainThreadTreeViewShape, ExtHostTreeViewShape } from './extHost.protocol'; -import { ITreeExplorerService } from 'vs/workbench/parts/explorers/common/treeExplorerService'; -import { InternalTreeNodeContent, InternalTreeNodeProvider } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel'; +import { ExtHostContext, MainThreadExplorerViewShape, ExtHostExplorerViewShape, ITreeNode } from './extHost.protocol'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { ICommandService } from 'vs/platform/commands/common/commands'; +import { IExplorerViewsService, IExplorerViewDataProvider, IExplorerView } from 'vs/workbench/parts/explorers/common/explorer'; -export class MainThreadTreeView extends MainThreadTreeViewShape { - private _proxy: ExtHostTreeViewShape; +export class MainThreadExplorerView extends MainThreadExplorerViewShape { + + private _proxy: ExtHostExplorerViewShape; + private _views: Map> = new Map>(); constructor( @IThreadService threadService: IThreadService, - @ITreeExplorerService private treeExplorerService: ITreeExplorerService, + @IExplorerViewsService private explorerViewsService: IExplorerViewsService, @IMessageService private messageService: IMessageService, @ICommandService private commandService: ICommandService ) { super(); - - this._proxy = threadService.get(ExtHostContext.ExtHostTreeView); + this._proxy = threadService.get(ExtHostContext.ExtHostExplorerView); } - $registerTreeDataProvider(providerId: string): void { + $registerView(providerId: string, name: string): void { const provider = new TreeExplorerNodeProvider(providerId, this._proxy, this.messageService, this.commandService); - this.treeExplorerService.registerTreeExplorerNodeProvider(providerId, provider); + const view = this.explorerViewsService.createView(providerId, name, provider); + this._views.set(providerId, view); } - $refresh(providerId: string, node: InternalTreeNodeContent): void { - (this.treeExplorerService.getProvider(providerId))._onRefresh.fire(node); + $refresh(providerId: string, node: ITreeNode): void { + this._views.get(providerId).refresh(node); } } -class TreeExplorerNodeProvider implements InternalTreeNodeProvider { +class TreeExplorerNodeProvider implements IExplorerViewDataProvider { - readonly _onRefresh: Emitter = new Emitter(); - readonly onRefresh: Event = this._onRefresh.event; + readonly _onRefresh: Emitter = new Emitter(); + readonly onRefresh: Event = this._onRefresh.event; - constructor(public readonly id: string, private _proxy: ExtHostTreeViewShape, + constructor(public readonly id: string, private _proxy: ExtHostExplorerViewShape, private messageService: IMessageService, private commandService: ICommandService ) { } - provideRootNode(): TPromise { + provideRoot(): TPromise { return this._proxy.$provideRootNode(this.id).then(rootNode => rootNode, err => this.messageService.show(Severity.Error, err)); } - resolveChildren(node: InternalTreeNodeContent): TPromise { + resolveChildren(node: ITreeNode): TPromise { return this._proxy.$resolveChildren(this.id, node).then(children => children, err => this.messageService.show(Severity.Error, err)); } - executeCommand(node: InternalTreeNodeContent): TPromise { + hasChildren(node: ITreeNode): boolean { + return node.hasChildren; + } + + getLabel(node: ITreeNode): string { + return node.label; + } + + getId(node: ITreeNode): string { + return node.id; + } + + getContextKey(node: ITreeNode): string { + return node.contextKey; + } + + executeCommand(node: ITreeNode): TPromise { return this._proxy.$getInternalCommand(this.id, node).then(command => { return this.commandService.executeCommand(command.id, ...command.arguments); }); diff --git a/src/vs/workbench/browser/viewlet.ts b/src/vs/workbench/browser/viewlet.ts index 1ad83a799aea6..b6b84f4b4c8f2 100644 --- a/src/vs/workbench/browser/viewlet.ts +++ b/src/vs/workbench/browser/viewlet.ts @@ -24,6 +24,7 @@ import { Composite, CompositeDescriptor, CompositeRegistry } from 'vs/workbench/ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IMessageService } from 'vs/platform/message/common/message'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { IThemable } from 'vs/platform/theme/common/styler'; export abstract class Viewlet extends Composite implements IViewlet { @@ -288,7 +289,7 @@ export class CollapseAction extends Action { } } -export interface IViewletView extends IView { +export interface IViewletView extends IView, IThemable { create(): TPromise; setVisible(visible: boolean): TPromise; getActions(): IAction[]; diff --git a/src/vs/workbench/electron-browser/workbench.main.ts b/src/vs/workbench/electron-browser/workbench.main.ts index 1845a488d23f5..8b28703898591 100644 --- a/src/vs/workbench/electron-browser/workbench.main.ts +++ b/src/vs/workbench/electron-browser/workbench.main.ts @@ -69,8 +69,7 @@ import 'vs/workbench/parts/extensions/electron-browser/extensionsViewlet'; // ca import 'vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution'; -import 'vs/workbench/parts/explorers/browser/treeExplorer.contribution'; -import 'vs/workbench/parts/explorers/browser/treeExplorerViewlet'; // can be packaged separately +import 'vs/workbench/parts/explorers/browser/explorer.contribution'; import 'vs/workbench/parts/output/browser/output.contribution'; import 'vs/workbench/parts/output/browser/outputPanel'; // can be packaged separately diff --git a/src/vs/workbench/parts/explorers/browser/explorer.contribution.ts b/src/vs/workbench/parts/explorers/browser/explorer.contribution.ts new file mode 100644 index 0000000000000..2c3a9eecbf06e --- /dev/null +++ b/src/vs/workbench/parts/explorers/browser/explorer.contribution.ts @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { IExplorerViewsService } from 'vs/workbench/parts/explorers/common/explorer'; +import { ExplorerViewsService } from 'vs/workbench/parts/explorers/browser/explorerView'; +import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; + +registerSingleton(IExplorerViewsService, ExplorerViewsService); \ No newline at end of file diff --git a/src/vs/workbench/parts/explorers/browser/explorerView.ts b/src/vs/workbench/parts/explorers/browser/explorerView.ts new file mode 100644 index 0000000000000..7e11e5fca636e --- /dev/null +++ b/src/vs/workbench/parts/explorers/browser/explorerView.ts @@ -0,0 +1,407 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import Event, { Emitter } from 'vs/base/common/event'; +import { IDisposable, Disposable, dispose, empty as EmptyDisposable, toDisposable } from 'vs/base/common/lifecycle'; +import { IViewletView, CollapsibleViewletView } from 'vs/workbench/browser/viewlet'; +import { IExplorerViewsService, IExplorerViewDataProvider, IExplorerView } from 'vs/workbench/parts/explorers/common/explorer'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { TPromise } from 'vs/base/common/winjs.base'; +import * as DOM from 'vs/base/browser/dom'; +import { Builder, $ } from 'vs/base/browser/builder'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IAction, IActionRunner, IActionItem, ActionRunner } from 'vs/base/common/actions'; +import { IMessageService } from 'vs/platform/message/common/message'; +import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; +import { IListService } from 'vs/platform/list/browser/listService'; +import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; +import { ClickBehavior, DefaultController } from 'vs/base/parts/tree/browser/treeDefaults'; +import { IMenuService, MenuId, MenuItemAction } from 'vs/platform/actions/common/actions'; +import { attachListStyler } from 'vs/platform/theme/common/styler'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { createActionItem, fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; +import { IProgressService } from 'vs/platform/progress/common/progress'; +import { ITree, IDataSource, IRenderer, ContextMenuEvent } from 'vs/base/parts/tree/browser/tree'; +import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; +import { ResolvedKeybinding } from 'vs/base/common/keyCodes'; +import { ActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; + +export interface IViewInstantiator { + instantiate(actionRunner: IActionRunner, viewletSetings: any, instantiationService: IInstantiationService): IViewletView; +} + +export class ExplorerViewsService implements IExplorerViewsService { + + public _serviceBrand: any; + + private explorerViews: Map> = new Map>(); + + private _onViewCreated: Emitter> = new Emitter>(); + public readonly onViewCreated: Event> = this._onViewCreated.event; + + private _onDataProviderRegistered: Emitter> = new Emitter>(); + public readonly onDataProviderRegistered: Event> = this._onDataProviderRegistered.event; + + createView(id: string, name: string, dataProvider: IExplorerViewDataProvider): IExplorerView { + const view = new ExplorerView(id, name, dataProvider); + this.explorerViews.set(id, view); + this._onViewCreated.fire(view); + return view; + } + + public getViews(): IExplorerView[] { + const views = []; + this.explorerViews.forEach(view => { + views.push(view); + }); + return views; + } +} + +class ExplorerView extends Disposable implements IExplorerView, IViewInstantiator { + + private view: TreeExplorerView; + + constructor(private id: string, private name: string, private dataProvider: IExplorerViewDataProvider) { + super(); + } + + refresh(element: T): void { + if (this.view) { + this.view.refresh(element); + } + } + + instantiate(actionRunner: IActionRunner, viewletSettings: any, instantiationService: IInstantiationService): IViewletView { + if (!this.view) { + this.view = instantiationService.createInstance(TreeExplorerView, this.id, this.name, this.dataProvider, actionRunner); + } + return this.view; + } +} + +class TreeExplorerView extends CollapsibleViewletView { + + private menus: Menus; + private viewFocusContext: IContextKey; + + constructor( + private id: string, + private name: string, + private dataProvider: IExplorerViewDataProvider, + actionRunner: IActionRunner, + @IMessageService messageService: IMessageService, + @IKeybindingService keybindingService: IKeybindingService, + @IContextMenuService contextMenuService: IContextMenuService, + @IWorkspaceContextService contextService: IWorkspaceContextService, + @IInstantiationService private instantiationService: IInstantiationService, + @IListService private listService: IListService, + @IThemeService private themeService: IThemeService, + @IContextKeyService private contextKeyService: IContextKeyService, + @IExplorerViewsService private explorerViewsService: IExplorerViewsService + ) { + super(actionRunner, false, name, messageService, keybindingService, contextMenuService); + this.menus = this.instantiationService.createInstance(Menus, this.id, this.dataProvider); + this.viewFocusContext = this.contextKeyService.createKey(this.id, void 0); + } + + public renderHeader(container: HTMLElement): void { + const titleDiv = $('div.title').appendTo(container); + $('span').text(this.name).appendTo(titleDiv); + super.renderHeader(container); + } + + public renderBody(container: HTMLElement): void { + this.treeContainer = super.renderViewTree(container); + DOM.addClass(this.treeContainer, 'tree-explorer-viewlet-tree-view'); + + this.tree = this.createViewer($(this.treeContainer)); + } + + public createViewer(container: Builder): ITree { + const dataSource = this.instantiationService.createInstance(TreeDataSource, this.dataProvider); + const renderer = this.instantiationService.createInstance(TreeRenderer, this.dataProvider); + const controller = this.instantiationService.createInstance(TreeController, this.menus); + const tree = new Tree(container.getHTMLElement(), { + dataSource, + renderer, + controller + }, { + keyboardSupport: false + }); + + this.toDispose.push(attachListStyler(tree, this.themeService)); + this.toDispose.push(this.listService.register(tree, [this.viewFocusContext])); + + return tree; + } + + getActions(): IAction[] { + return [...this.menus.getTitleActions()]; + } + + getSecondaryActions(): IAction[] { + return this.menus.getTitleSecondaryActions(); + } + + getActionItem(action: IAction): IActionItem { + return createActionItem(action, this.keybindingService, this.messageService); + } + + public create(): TPromise { + return this.updateInput(); + } + + public setVisible(visible: boolean): TPromise { + return super.setVisible(visible); + } + + public updateInput(): TPromise { + return this.dataProvider.provideRoot() + .then(root => this.tree.setInput(root)); + } + + public getOptimalWidth(): number { + const parentNode = this.tree.getHTMLElement(); + const childNodes = [].slice.call(parentNode.querySelectorAll('.outline-item-label > a')); + + return DOM.getLargestChildWidth(parentNode, childNodes); + } + + refresh(element: any) { + this.tree.refresh(element); + } +} + +class TreeDataSource implements IDataSource { + + constructor( + private dataProvider: IExplorerViewDataProvider, + @IProgressService private progressService: IProgressService, + @IExplorerViewsService private explorerViewsService: IExplorerViewsService + ) { + } + + public getId(tree: ITree, node: any): string { + return this.dataProvider.getId(node); + } + + public hasChildren(tree: ITree, node: any): boolean { + return this.dataProvider.hasChildren(node); + } + + public getChildren(tree: ITree, node: any): TPromise { + const promise = this.dataProvider.resolveChildren(node); + + this.progressService.showWhile(promise, 800); + + return promise; + } + + public getParent(tree: ITree, node: any): TPromise { + return TPromise.as(null); + } +} + +interface ITreeExplorerTemplateData { + label: Builder; +} + +class TreeRenderer implements IRenderer { + + private static ITEM_HEIGHT = 22; + private static TREE_TEMPLATE_ID = 'treeExplorer'; + + constructor( + private dataProvider: IExplorerViewDataProvider, + @IExplorerViewsService private explorerViewsService: IExplorerViewsService + ) { + } + + public getHeight(tree: ITree, element: any): number { + return TreeRenderer.ITEM_HEIGHT; + } + + public getTemplateId(tree: ITree, element: any): string { + return TreeRenderer.TREE_TEMPLATE_ID; + } + + public renderTemplate(tree: ITree, templateId: string, container: HTMLElement): ITreeExplorerTemplateData { + const el = $(container); + const item = $('.custom-viewlet-tree-node-item'); + item.appendTo(el); + + const label = $('.custom-viewlet-tree-node-item-label').appendTo(item); + const link = $('a.plain').appendTo(label); + + return { label: link }; + } + + public renderElement(tree: ITree, node: any, templateId: string, templateData: ITreeExplorerTemplateData): void { + const label = this.dataProvider.getLabel(node); + templateData.label.text(label).title(label); + } + + public disposeTemplate(tree: ITree, templateId: string, templateData: ITreeExplorerTemplateData): void { + } +} + +class TreeController extends DefaultController { + + constructor( + private menus: Menus, + @IContextMenuService private contextMenuService: IContextMenuService, + @IKeybindingService private _keybindingService: IKeybindingService + ) { + super({ clickBehavior: ClickBehavior.ON_MOUSE_UP /* do not change to not break DND */, keyboardSupport: false }); + } + + public onContextMenu(tree: ITree, node: any, event: ContextMenuEvent): boolean { + tree.setFocus(node); + const actions = this.menus.getResourceContextActions(node); + if (!actions.length) { + return true; + } + const anchor = { x: event.posx + 1, y: event.posy }; + this.contextMenuService.showContextMenu({ + getAnchor: () => anchor, + + getActions: () => { + return TPromise.as(actions); + }, + + getActionItem: (action) => { + const keybinding = this._keybindingFor(action); + if (keybinding) { + return new ActionItem(action, action, { label: true, keybinding: keybinding.getLabel() }); + } + return null; + }, + + getKeyBinding: (action): ResolvedKeybinding => { + return this._keybindingFor(action); + }, + + onHide: (wasCancelled?: boolean) => { + if (wasCancelled) { + tree.DOMFocus(); + } + }, + + getActionsContext: () => node, + + actionRunner: new MultipleSelectionActionRunner(() => tree.getSelection()) + }); + + return true; + } + + private _keybindingFor(action: IAction): ResolvedKeybinding { + return this._keybindingService.lookupKeybinding(action.id); + } +} + +class MultipleSelectionActionRunner extends ActionRunner { + + constructor(private getSelectedResources: () => any[]) { + super(); + } + + runAction(action: IAction, context: any): TPromise { + if (action instanceof MenuItemAction) { + const selection = this.getSelectedResources(); + const filteredSelection = selection.filter(s => s !== context); + + if (selection.length === filteredSelection.length || selection.length === 1) { + return action.run(context); + } + + return action.run(context, ...filteredSelection); + } + + return super.runAction(action, context); + } +} + +class Menus implements IDisposable { + + private disposables: IDisposable[] = []; + private titleDisposable: IDisposable = EmptyDisposable; + private titleActions: IAction[] = []; + private titleSecondaryActions: IAction[] = []; + + private _onDidChangeTitle = new Emitter(); + get onDidChangeTitle(): Event { return this._onDidChangeTitle.event; } + + constructor( + private viewId: string, + private dataProvider: IExplorerViewDataProvider, + @IContextKeyService private contextKeyService: IContextKeyService, + @IMenuService private menuService: IMenuService, + @IExplorerViewsService private explorerViewsService: IExplorerViewsService + ) { + if (this.titleDisposable) { + this.titleDisposable.dispose(); + this.titleDisposable = EmptyDisposable; + } + + const _contextKeyService = this.contextKeyService.createScoped(); + contextKeyService.createKey('view', viewId); + + const titleMenu = this.menuService.createMenu(MenuId.ViewTitle, _contextKeyService); + const updateActions = () => { + this.titleActions = []; + this.titleSecondaryActions = []; + fillInActions(titleMenu, null, { primary: this.titleActions, secondary: this.titleSecondaryActions }); + this._onDidChangeTitle.fire(); + }; + + const listener = titleMenu.onDidChange(updateActions); + updateActions(); + + + this.titleDisposable = toDisposable(() => { + listener.dispose(); + titleMenu.dispose(); + _contextKeyService.dispose(); + this.titleActions = []; + this.titleSecondaryActions = []; + }); + } + + getTitleActions(): IAction[] { + return this.titleActions; + } + + getTitleSecondaryActions(): IAction[] { + return this.titleSecondaryActions; + } + + getResourceContextActions(element: any): IAction[] { + return this.getActions(MenuId.ViewResource, { key: 'resource', value: this.dataProvider.getContextKey(element) }).secondary; + } + + private getActions(menuId: MenuId, context: { key: string, value: string }): { primary: IAction[]; secondary: IAction[]; } { + const contextKeyService = this.contextKeyService.createScoped(); + contextKeyService.createKey('view', this.viewId); + contextKeyService.createKey(context.key, context.value); + + const menu = this.menuService.createMenu(menuId, contextKeyService); + const primary = []; + const secondary = []; + const result = { primary, secondary }; + fillInActions(menu, { shouldForwardArgs: true }, result, g => g === 'inline'); + + menu.dispose(); + contextKeyService.dispose(); + + return result; + } + + dispose(): void { + this.disposables = dispose(this.disposables); + } +} diff --git a/src/vs/workbench/parts/explorers/common/explorer.ts b/src/vs/workbench/parts/explorers/common/explorer.ts new file mode 100644 index 0000000000000..b6a1731fb9b06 --- /dev/null +++ b/src/vs/workbench/parts/explorers/common/explorer.ts @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import Event from 'vs/base/common/event'; +import { IDisposable } from 'vs/base/common/lifecycle'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { IActionRunner } from 'vs/base/common/actions'; +import { createDecorator, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; + +export const IExplorerViewsService = createDecorator('explorerViewsService'); + +export interface IExplorerViewsService { + _serviceBrand: any; + + readonly onViewCreated: Event>; + + createView(id: string, name: string, dataProvider: IExplorerViewDataProvider): IExplorerView; + getViews(): IExplorerView[]; +} + +export interface IExplorerView extends IDisposable { + refresh(element: T): void; + instantiate(actionRunner: IActionRunner, viewletSetings: any, instantiationService: IInstantiationService): any; +} + +export interface IExplorerViewDataProvider { + provideRoot(): TPromise; + resolveChildren(element: T): TPromise; + getId(element: T): string; + getLabel(element: T): string; + getContextKey(element: T): string; + hasChildren(element: T): boolean; +} diff --git a/src/vs/workbench/parts/files/browser/explorerViewlet.ts b/src/vs/workbench/parts/files/browser/explorerViewlet.ts index e32cb7f884322..5aa2a30f53513 100644 --- a/src/vs/workbench/parts/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/browser/explorerViewlet.ts @@ -13,7 +13,7 @@ import { Dimension, Builder } from 'vs/base/browser/builder'; import { Scope } from 'vs/workbench/common/memento'; import { VIEWLET_ID, ExplorerViewletVisibleContext, IFilesConfiguration } from 'vs/workbench/parts/files/common/files'; import { IViewletView, Viewlet } from 'vs/workbench/browser/viewlet'; -import { SplitView, Orientation } from 'vs/base/browser/ui/splitview/splitview'; +import { SplitView } from 'vs/base/browser/ui/splitview/splitview'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ActionRunner, FileViewletState } from 'vs/workbench/parts/files/browser/views/explorerViewer'; import { ExplorerView } from 'vs/workbench/parts/files/browser/views/explorerView'; @@ -32,6 +32,7 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { attachHeaderViewStyler } from 'vs/platform/theme/common/styler'; +import { IExplorerViewsService } from 'vs/workbench/parts/explorers/common/explorer'; export class ExplorerViewlet extends Viewlet { private viewletContainer: Builder; @@ -43,7 +44,7 @@ export class ExplorerViewlet extends Viewlet { private emptyView: EmptyView; private openEditorsVisible: boolean; - private lastFocusedView: ExplorerView | OpenEditorsView | EmptyView; + private lastFocusedView: IViewletView; private focusListener: IDisposable; private delayEditorOpeningInOpenedEditors: boolean; @@ -62,7 +63,8 @@ export class ExplorerViewlet extends Viewlet { @IConfigurationService private configurationService: IConfigurationService, @IInstantiationService private instantiationService: IInstantiationService, @IContextKeyService contextKeyService: IContextKeyService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @IExplorerViewsService private explorerViewsService: IExplorerViewsService ) { super(VIEWLET_ID, telemetryService, themeService); @@ -73,6 +75,7 @@ export class ExplorerViewlet extends Viewlet { this.viewletSettings = this.getMemento(storageService, Scope.WORKSPACE); this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(e.config)); + this.explorerViewsService.onViewCreated(view => this.render()); } public create(parent: Builder): TPromise { @@ -80,78 +83,79 @@ export class ExplorerViewlet extends Viewlet { this.viewletContainer = parent.div().addClass('explorer-viewlet'); - const settings = this.configurationService.getConfiguration(); - - return this.onConfigurationUpdated(settings); + return this.render(); } public getActions(): IAction[] { - if (this.openEditorsVisible) { - return []; - } - - if (this.explorerView) { - return this.explorerView.getActions(); + if (this.views.length === 1) { + return this.views[0].getActions(); } - return []; } - private onConfigurationUpdated(config: IFilesConfiguration): TPromise { + private render(): TPromise { + const config = this.configurationService.getConfiguration(); // No need to delay if preview is disabled this.delayEditorOpeningInOpenedEditors = !!config.workbench.editor.enablePreview; // Open editors view should always be visible in no folder workspace. - const openEditorsVisible = !this.contextService.hasWorkspace() || config.explorer.openEditors.visible !== 0; + this.openEditorsVisible = !this.contextService.hasWorkspace() || config.explorer.openEditors.visible !== 0; - // Create views on startup and if open editors visibility has changed #6919 - if (this.openEditorsVisible !== openEditorsVisible) { - this.dispose(); - this.openEditorsVisible = openEditorsVisible; - this.views = []; - this.viewletContainer.clearChildren(); + this.dispose(); + this.views = []; + this.viewletContainer.clearChildren(); - if (this.openEditorsVisible) { - this.splitView = new SplitView(this.viewletContainer.getHTMLElement()); + this.splitView = new SplitView(this.viewletContainer.getHTMLElement()); + // Track focus + this.focusListener = this.splitView.onFocus((view: IViewletView) => { + this.lastFocusedView = view; + }); - // Open editors view - this.addOpenEditorsView(); + const customViews = this.explorerViewsService.getViews(); - // Track focus - this.focusListener = this.splitView.onFocus((view: ExplorerView | OpenEditorsView | EmptyView) => { - this.lastFocusedView = view; - }); - } + if (this.openEditorsVisible) { + // Open editors view + this.openEditorsView = this.instantiationService.createInstance(OpenEditorsView, this.getActionRunner(), this.viewletSettings); + this.views.push(this.openEditorsView); + } - // Explorer view - this.addExplorerView(); - this.lastFocusedView = this.explorerView; + // Explorer view + this.createExplorerView(this.views.length || customViews.length ? undefined : 0); + this.views.push(this.explorerView); - return TPromise.join(this.views.map(view => view.create())).then(() => void 0).then(() => { - if (this.dimension) { - this.layout(this.dimension); - } + // custom views + for (const view of customViews) { + this.views.push(view.instantiate(this.getActionRunner(), this.viewletSettings, this.instantiationService)); + } - // Update title area since the title actions have changed. - this.updateTitleArea(); - return this.setVisible(this.isVisible()).then(() => this.focus()); // Focus the viewlet since that triggers a rerender. - }); + for (const view of this.views) { + attachHeaderViewStyler(view, this.themeService); + this.splitView.addView(view); } - return TPromise.as(null); - } + this.lastFocusedView = this.explorerView; - private addOpenEditorsView(): void { - this.openEditorsView = this.instantiationService.createInstance(OpenEditorsView, this.getActionRunner(), this.viewletSettings); - attachHeaderViewStyler(this.openEditorsView, this.themeService); + return TPromise.join(this.views.map(view => view.create())).then(() => void 0).then(() => { + if (this.dimension) { + this.layout(this.dimension); + } - this.splitView.addView(this.openEditorsView); + // Update title area since the title actions have changed. + this.updateTitleArea(); + return this.setVisible(this.isVisible()).then(() => this.focus()); // Focus the viewlet since that triggers a rerender. + }); + } - this.views.push(this.openEditorsView); + private onConfigurationUpdated(config: IFilesConfiguration): void { + // Open editors view should always be visible in no folder workspace. + const openEditorsVisible = !this.contextService.hasWorkspace() || config.explorer.openEditors.visible !== 0; + if (this.openEditorsVisible !== openEditorsVisible) { + this.render(); + } } - private addExplorerView(): void { + private createExplorerView(headerSize: number): void { let explorerOrEmptyView: ExplorerView | EmptyView; // With a Workspace @@ -188,25 +192,13 @@ export class ExplorerViewlet extends Viewlet { }); const explorerInstantiator = this.instantiationService.createChild(new ServiceCollection([IWorkbenchEditorService, delegatingEditorService])); - - const headerSize = this.openEditorsVisible ? undefined : 0; // If open editors are not visible set header size explicitly to 0, otherwise const it be computed by super class. this.explorerView = explorerOrEmptyView = explorerInstantiator.createInstance(ExplorerView, this.viewletState, this.getActionRunner(), this.viewletSettings, headerSize); - attachHeaderViewStyler(this.explorerView, this.themeService); } // No workspace else { this.emptyView = explorerOrEmptyView = this.instantiationService.createInstance(EmptyView, this.getActionRunner()); - attachHeaderViewStyler(this.emptyView, this.themeService); - } - - if (this.openEditorsVisible) { - this.splitView.addView(explorerOrEmptyView); - } else { - explorerOrEmptyView.render(this.viewletContainer.getHTMLElement(), Orientation.VERTICAL); } - - this.views.push(explorerOrEmptyView); } public getExplorerView(): ExplorerView { @@ -260,7 +252,7 @@ export class ExplorerViewlet extends Viewlet { return this.openEditorsView.focus(); } - private hasSelectionOrFocus(view: ExplorerView | OpenEditorsView | EmptyView): boolean { + private hasSelectionOrFocus(view: IViewletView): boolean { if (!view) { return false; } @@ -284,12 +276,7 @@ export class ExplorerViewlet extends Viewlet { public layout(dimension: Dimension): void { this.dimension = dimension; - - if (this.openEditorsVisible) { - this.splitView.layout(dimension.height); - } else if (this.explorerView) { - this.explorerView.layout(dimension.height, Orientation.VERTICAL); - } + this.splitView.layout(dimension.height); } public getActionRunner(): IActionRunner { @@ -306,7 +293,7 @@ export class ExplorerViewlet extends Viewlet { public getOptimalWidth(): number { const additionalMargin = 16; - const openedEditorsViewWidth = this.openEditorsVisible ? this.openEditorsView.getOptimalWidth() : 0; + const openedEditorsViewWidth = this.openEditorsView ? this.openEditorsView.getOptimalWidth() : 0; const explorerView = this.getExplorerView(); const explorerViewWidth = explorerView ? explorerView.getOptimalWidth() : 0; const optimalWidth = Math.max(openedEditorsViewWidth, explorerViewWidth); From d2fa4864de460efaa6a8274e51275ff956423f31 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 5 May 2017 12:30:21 +0200 Subject: [PATCH 0208/2747] :lipstick: --- .../extensions/electron-browser/media/extensionsViewlet.css | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css b/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css index 82fab9f5565bf..42b73f8bfc6fd 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css +++ b/src/vs/workbench/parts/extensions/electron-browser/media/extensionsViewlet.css @@ -71,8 +71,6 @@ flex: 1; padding: 4px 0; overflow: hidden; - - } .extensions-viewlet > .extensions .extension > .details > .header-container { @@ -158,8 +156,8 @@ .extensions-viewlet > .extensions .extension.disabled > .icon, .extensions-viewlet > .extensions .extension.disabled > .details > .header-container, -.extensions-viewlet > .extensions .extension.disabled > .details > .footer > .author -.extensions-viewlet > .extensions .extension.disabled > .details > .description { +.extensions-viewlet > .extensions .extension.disabled > .details > .description +.extensions-viewlet > .extensions .extension.disabled > .details > .footer > .author { opacity: 0.5; } From e0f50d1eb00d411179cd4a402d281697b4c60c5b Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 5 May 2017 12:37:07 +0200 Subject: [PATCH 0209/2747] 'editor.lineHighlightBorder' not working if lineHighlightBackground is set. Fixes #26017 --- src/vs/base/common/color.ts | 4 ++++ .../browser/services/standaloneThemeServiceImpl.ts | 9 ++------- .../currentLineHighlight/currentLineHighlight.ts | 11 ++++++----- src/vs/platform/theme/common/themeService.ts | 5 +++-- .../electron-browser/terminalColorRegistry.test.ts | 2 +- .../themes/electron-browser/colorThemeData.ts | 9 ++------- src/vs/workbench/test/workbenchTestServices.ts | 2 +- 7 files changed, 19 insertions(+), 23 deletions(-) diff --git a/src/vs/base/common/color.ts b/src/vs/base/common/color.ts index ad17cab9171f4..e35bf39d7cb3b 100644 --- a/src/vs/base/common/color.ts +++ b/src/vs/base/common/color.ts @@ -382,6 +382,10 @@ export class Color { return new Color(new RGBA(p.r, p.g, p.b, Math.round(p.a * factor))); } + public isTransparent(): boolean { + return this.rgba.a === 0; + } + public opposite(): Color { return new Color(new RGBA( 255 - this.rgba.r, diff --git a/src/vs/editor/browser/services/standaloneThemeServiceImpl.ts b/src/vs/editor/browser/services/standaloneThemeServiceImpl.ts index 09969e5f76853..35132a10cba52 100644 --- a/src/vs/editor/browser/services/standaloneThemeServiceImpl.ts +++ b/src/vs/editor/browser/services/standaloneThemeServiceImpl.ts @@ -67,13 +67,8 @@ class StandaloneTheme implements IStandaloneTheme { return color; } - public isDefault(colorId: ColorIdentifier): boolean { - if (!this.colors.hasOwnProperty(colorId)) { - return true; - } - let color = this.colors[colorId]; - let defaultValue = this.getDefault(colorId); - return color ? !!defaultValue : color.equals(defaultValue); + public defines(colorId: ColorIdentifier): boolean { + return this.colors.hasOwnProperty(colorId); } public get type() { diff --git a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts index e0ec23a3868d5..2aac9fc555736 100644 --- a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts +++ b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts @@ -134,14 +134,15 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay { registerThemingParticipant((theme, collector) => { let lineHighlight = theme.getColor(editorLineHighlight); if (lineHighlight) { - collector.addRule(`.monaco-editor.${theme.selector} .view-overlays .current-line { background-color: ${lineHighlight}; border: none; }`); - } else { + collector.addRule(`.monaco-editor.${theme.selector} .view-overlays .current-line { background-color: ${lineHighlight}; }`); + } + if (!lineHighlight || lineHighlight.isTransparent() || theme.defines(editorLineHighlightBorder)) { let lineHighlightBorder = theme.getColor(editorLineHighlightBorder); if (lineHighlightBorder) { collector.addRule(`.monaco-editor.${theme.selector} .view-overlays .current-line { border: 2px solid ${lineHighlightBorder}; }`); - } - if (theme.type === 'hc') { - collector.addRule(`.monaco-editor.${theme.selector} .view-overlays .current-line { border-width: 1px; }`); + if (theme.type === 'hc') { + collector.addRule(`.monaco-editor.${theme.selector} .view-overlays .current-line { border-width: 1px; }`); + } } } }); diff --git a/src/vs/platform/theme/common/themeService.ts b/src/vs/platform/theme/common/themeService.ts index ff9f54c95f5ac..d6d7c4a0639cf 100644 --- a/src/vs/platform/theme/common/themeService.ts +++ b/src/vs/platform/theme/common/themeService.ts @@ -32,9 +32,10 @@ export interface ITheme { getColor(color: ColorIdentifier, useDefault?: boolean): Color; /** - * Returns wheter the current color matches the default color + * Returns wheter the theme defines a value for the color. If not, that means the + * default color will be used. */ - isDefault(color: ColorIdentifier): boolean; + defines(color: ColorIdentifier): boolean; } export interface ICssStyleCollector { diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalColorRegistry.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalColorRegistry.test.ts index 7a6317a72957b..f2a9ca2fa5291 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalColorRegistry.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalColorRegistry.test.ts @@ -20,7 +20,7 @@ function getMockTheme(type: ThemeType): ITheme { label: '', type: type, getColor: (colorId) => themingRegistry.resolveDefaultColor(colorId, theme), - isDefault: () => true + defines: () => true }; return theme; } diff --git a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts index 26093f69f5567..b545524e4c193 100644 --- a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts +++ b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts @@ -56,13 +56,8 @@ export class ColorThemeData implements IColorTheme { return colorRegistry.resolveDefaultColor(colorId, this); } - public isDefault(colorId: ColorIdentifier): boolean { - let color = this.colorMap[colorId]; - if (types.isUndefined(color)) { - return true; - } - let defaultValue = this.getDefault(colorId); - return color === null ? defaultValue === null : color.equals(defaultValue); + public defines(colorId: ColorIdentifier): boolean { + return this.customColorMap.hasOwnProperty(colorId) || this.colorMap.hasOwnProperty(colorId); } public setCustomColors(colors: IColorCustomizations) { diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index d5d1d7cd65ab5..37cc7b6cb355d 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -1006,7 +1006,7 @@ export class TestTheme implements ITheme { throw new Error('Method not implemented.'); } - isDefault(color: string): boolean { + defines(color: string): boolean { throw new Error('Method not implemented.'); } } From 17f2cc03c7175752b100a3106aad31c3df773ab0 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 5 May 2017 12:04:23 +0200 Subject: [PATCH 0210/2747] more snippet parse info, prep for #16037 --- .../contrib/snippet/common/snippetParser.ts | 68 ++++++++++++++++++ .../snippet/test/common/snippetParser.test.ts | 70 ++++++++++++++++++- 2 files changed, 137 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index 7017f77383cd5..193a208990d94 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -135,6 +135,9 @@ export abstract class Marker { toString() { return ''; } + len(): number { + return 0; + } } export class Text extends Marker { @@ -144,6 +147,9 @@ export class Text extends Marker { toString() { return this.string; } + len(): number { + return this.string.length; + } } export class Placeholder extends Marker { @@ -171,9 +177,71 @@ export class Variable extends Marker { return this.isDefined ? this.resolvedValue : Marker.toString(this.defaultValue); } } +export function walk(marker: Marker[], visitor: (marker: Marker) => boolean): void { + const stack = [...marker]; + while (stack.length > 0) { + const marker = stack.shift(); + const recurse = visitor(marker); + if (!recurse) { + break; + } + if (marker instanceof Placeholder || marker instanceof Variable) { + stack.unshift(...marker.defaultValue); + } + } +} + +export class TextmateSnippet { + + readonly marker: Marker[]; + + constructor(marker: Marker[]) { + this.marker = marker; + } + + offset(marker: Marker): number { + let pos = 0; + let found = false; + walk(this.marker, candidate => { + if (candidate === marker) { + found = true; + return false; + } + pos += candidate.len(); + return true; + }); + + if (!found) { + return -1; + } + return pos; + } + + placeholders(): Map { + const map = new Map(); + walk(this.marker, candidate => { + if (candidate instanceof Placeholder) { + let array = map.get(candidate.name); + if (!array) { + map.set(candidate.name, [candidate]); + } else { + array.push(candidate); + } + } + return true; + }); + return map; + } + +} export class SnippetParser { + static parse(template: string): TextmateSnippet { + const marker = new SnippetParser(true, false).parse(template); + return new TextmateSnippet(marker); + } + private _enableTextMate: boolean; private _enableInternal: boolean; private _scanner = new Scanner(); diff --git a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts index 100c4be86799c..1fa9d89e6e593 100644 --- a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts +++ b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts @@ -5,7 +5,7 @@ 'use strict'; import * as assert from 'assert'; -import { Scanner, TokenType, SnippetParser, Text, Placeholder, Variable, Marker } from 'vs/editor/contrib/snippet/common/snippetParser'; +import { Scanner, TokenType, SnippetParser, Text, Placeholder, Variable, Marker, walk } from 'vs/editor/contrib/snippet/common/snippetParser'; suite('SnippetParser', () => { @@ -294,4 +294,72 @@ suite('SnippetParser', () => { actual = new SnippetParser(true, false).escape('${1:foo:bar}'); assert.equal(actual, 'foo:bar'); }); + + test('marker#len', () => { + + function assertLen(template: string, ...lengths: number[]): void { + const { marker } = SnippetParser.parse(template); + walk(marker, m => { + const expected = lengths.shift(); + assert.equal(m.len(), expected); + return true; + }); + assert.equal(lengths.length, 0); + } + + assertLen('text', 4); + assertLen('$1text', 0, 4); + assertLen('te$1xt', 2, 0, 2); + assertLen('errorContext: `${1:err}`, error: $0', 15, 0, 3, 10, 0); + assertLen('errorContext: `${1:err}`, error: $1', 15, 0, 3, 10, 0, 3); + assertLen('$TM_SELECTED_TEXT', 0); + assertLen('${TM_SELECTED_TEXT:def}', 0, 3); + }); + + test('TextmateSnippet#offset', () => { + let snippet = SnippetParser.parse('te$1xt'); + assert.equal(snippet.offset(snippet.marker[0]), 0); + assert.equal(snippet.offset(snippet.marker[1]), 2); + assert.equal(snippet.offset(snippet.marker[2]), 2); + + snippet = SnippetParser.parse('${TM_SELECTED_TEXT:def}'); + assert.equal(snippet.offset(snippet.marker[0]), 0); + assert.equal(snippet.offset((snippet.marker[0]).defaultValue[0]), 0); + + // forgein marker + assert.equal(snippet.offset(new Text('foo')), -1); + }); + + test('TextmateSnippet#placeholder', () => { + let snippet = SnippetParser.parse('te$1xt'); + let placeholders = snippet.placeholders(); + assert.equal(placeholders.size, 1); + let array = placeholders.get('1'); + assert.equal(array.length, 1); + + snippet = SnippetParser.parse('te$1xt$1'); + placeholders = snippet.placeholders(); + assert.equal(placeholders.size, 1); + array = placeholders.get('1'); + assert.equal(array.length, 2); + + snippet = SnippetParser.parse('te$1xt$2'); + placeholders = snippet.placeholders(); + assert.equal(placeholders.size, 2); + array = placeholders.get('1'); + assert.equal(array.length, 1); + array = placeholders.get('2'); + assert.equal(array.length, 1); + + snippet = SnippetParser.parse('${1:bar${2:foo}bar}'); + placeholders = snippet.placeholders(); + assert.equal(placeholders.size, 2); + array = placeholders.get('1'); + assert.equal(array.length, 1); + assert.equal(snippet.offset(array[0]), 0); + + array = placeholders.get('2'); + assert.equal(array.length, 1); + assert.equal(snippet.offset(array[0]), 3); + }); }); From 195a8e2526707e2c878ea33b07214520421f4897 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 5 May 2017 12:53:58 +0200 Subject: [PATCH 0211/2747] add indent adjust logic to snippet, prep for #16037 --- src/vs/base/common/strings.ts | 8 +++---- src/vs/base/test/common/strings.test.ts | 7 ++++++ .../contrib/snippet/common/snippetParser.ts | 23 +++++++++++++++++++ .../snippet/test/common/snippetParser.test.ts | 18 +++++++++++++++ 4 files changed, 52 insertions(+), 4 deletions(-) diff --git a/src/vs/base/common/strings.ts b/src/vs/base/common/strings.ts index ea4259e8f36b5..1886577902bfe 100644 --- a/src/vs/base/common/strings.ts +++ b/src/vs/base/common/strings.ts @@ -293,14 +293,14 @@ export function firstNonWhitespaceIndex(str: string): number { * Returns the leading whitespace of the string. * If the string contains only whitespaces, returns entire string */ -export function getLeadingWhitespace(str: string): string { - for (let i = 0, len = str.length; i < len; i++) { +export function getLeadingWhitespace(str: string, from: number = 0): string { + for (let i = from, len = str.length; i < len; i++) { let chCode = str.charCodeAt(i); if (chCode !== CharCode.Space && chCode !== CharCode.Tab) { - return str.substring(0, i); + return str.substring(from, i); } } - return str; + return str.substr(from); } /** diff --git a/src/vs/base/test/common/strings.test.ts b/src/vs/base/test/common/strings.test.ts index ef9e73d6c560e..7681a2e702c6e 100644 --- a/src/vs/base/test/common/strings.test.ts +++ b/src/vs/base/test/common/strings.test.ts @@ -306,4 +306,11 @@ suite('Strings', () => { assert(!regExpWithFlags.ignoreCase); assert(regExpWithFlags.multiline); }); + + test('getLeadingWhitespace', () => { + assert.equal(strings.getLeadingWhitespace(' foo'), ' '); + assert.equal(strings.getLeadingWhitespace(' foo', 2), ''); + assert.equal(strings.getLeadingWhitespace(' '), ' '); + assert.equal(strings.getLeadingWhitespace(' ', 1), ' '); + }); }); diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index 193a208990d94..026247a5e1bb5 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -6,6 +6,7 @@ 'use strict'; import { CharCode } from 'vs/base/common/charCode'; +import { getLeadingWhitespace } from 'vs/base/common/strings'; export enum TokenType { Dollar, @@ -233,6 +234,28 @@ export class TextmateSnippet { return map; } + adjustIndentation(normalizer: (whitespace: string) => string): void { + + walk(this.marker, candidate => { + if (candidate instanceof Text) { + //check for newline characters and adjust indent + let regex = /\r\n|\r|\n/g; + let match: RegExpMatchArray; + while (match = regex.exec(candidate.string)) { + let pos = regex.lastIndex; + let whitespace = getLeadingWhitespace(candidate.string, pos); + let normalized = normalizer(whitespace); + if (whitespace !== normalized) { + candidate.string = candidate.string.substr(0, pos) + + normalized + + candidate.string.substr(pos + whitespace.length); + } + } + } + return true; + }); + } + } export class SnippetParser { diff --git a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts index 1fa9d89e6e593..60e200e810290 100644 --- a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts +++ b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts @@ -362,4 +362,22 @@ suite('SnippetParser', () => { assert.equal(array.length, 1); assert.equal(snippet.offset(array[0]), 3); }); + + test('TextmateSnippet#adjustIndentation', () => { + let snippet = SnippetParser.parse('foo\n bar'); + assert.equal(Marker.toString(snippet.marker), 'foo\n bar'); + snippet.adjustIndentation(s => s.replace(/ /, '\t')); + assert.equal(Marker.toString(snippet.marker), 'foo\n\tbar'); + + snippet = SnippetParser.parse('foo\r\n bar\r\n far'); + assert.equal(Marker.toString(snippet.marker), 'foo\r\n bar\r\n far'); + snippet.adjustIndentation(s => s.replace(/ /, '\t')); + assert.equal(Marker.toString(snippet.marker), 'foo\r\n\tbar\r\n\tfar'); + + snippet = SnippetParser.parse('foo${1:bar\r far\r boo}'); + assert.equal(Marker.toString(snippet.marker), 'foobar\r far\r boo'); + snippet.adjustIndentation(s => s.replace(/ /, '\t')); + assert.equal(Marker.toString(snippet.marker), 'foobar\r\tfar\r\tboo'); + + }); }); From 89cd05f877231e54c8c099142f03689d9feff451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rokas=20Ge=C4=8Das?= Date: Fri, 5 May 2017 14:12:31 +0300 Subject: [PATCH 0212/2747] #10542 MergeItem class created, localized strings --- extensions/git/src/commands.ts | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 4f4856e634088..5bcfa2fa9aea4 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -17,21 +17,15 @@ import * as nls from 'vscode-nls'; const localize = nls.loadMessageBundle(); -class CheckoutBasicItem implements QuickPickItem { - get label(): string { return this.ref.name || ''; } - get description(): string { return this.ref.name || ''; } - - constructor(protected ref: Ref) { } -} - - -class CheckoutItem extends CheckoutBasicItem { +class CheckoutItem implements QuickPickItem { protected get shortCommit(): string { return (this.ref.commit || '').substr(0, 8); } protected get treeish(): string | undefined { return this.ref.name; } get label(): string { return this.ref.name || this.shortCommit; } get description(): string { return this.shortCommit; } + constructor(protected ref: Ref) { } + async run(model: Model): Promise { const ref = this.treeish; @@ -66,6 +60,14 @@ class CheckoutRemoteHeadItem extends CheckoutItem { } } +class MergeItem implements QuickPickItem { + + get label(): string { return this.ref.name || ''; } + get description(): string { return this.ref.name || ''; } + + constructor(protected ref: Ref) { } +} + interface Command { commandId: string; key: string; @@ -651,7 +653,7 @@ export class CommandCenter { .map(ref => new CheckoutRemoteHeadItem(ref)); const picks = [...heads, ...tags, ...remoteHeads]; - const placeHolder = 'Select a ref to checkout'; + const placeHolder = localize('select a ref to checkout', 'Select a ref to checkout'); const choice = await window.showQuickPick(picks, { placeHolder }); if (!choice) { @@ -684,14 +686,14 @@ export class CommandCenter { const includeRemotes = checkoutType === 'all' || checkoutType === 'remote'; const heads = this.model.refs.filter(ref => ref.type === RefType.Head) - .map(ref => new CheckoutItem(ref)); + .map(ref => new MergeItem(ref)); const remoteHeads = (includeRemotes ? this.model.refs.filter(ref => ref.type === RefType.RemoteHead) : []) - .map(ref => new CheckoutRemoteHeadItem(ref)); + .map(ref => new MergeItem(ref)); const picks = [...heads, ...remoteHeads]; - const placeHolder = 'Select a ref to checkout'; - const choice = await window.showQuickPick(picks, { placeHolder }); + const placeHolder = localize('select a branch to merge from', 'Select a branch to merge from'); + const choice = await window.showQuickPick(picks, { placeHolder }); if (!choice) { return; From 58da79c89c75e38fd63cd993066f6b9bd471c6f5 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 5 May 2017 14:10:19 +0200 Subject: [PATCH 0213/2747] make sure adjust indentation creates a copy of the snippet, #16037 --- .../contrib/snippet/common/snippetParser.ts | 48 +++++++++++++++---- .../snippet/test/common/snippetParser.test.ts | 17 ++++--- 2 files changed, 48 insertions(+), 17 deletions(-) diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index 026247a5e1bb5..e06dc9621dd57 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -151,6 +151,13 @@ export class Text extends Marker { len(): number { return this.string.length; } + with(string: string): Text { + if (this.string !== string) { + return new Text(string); + } else { + return this; + } + } } export class Placeholder extends Marker { @@ -160,6 +167,9 @@ export class Placeholder extends Marker { toString() { return Marker.toString(this.defaultValue); } + with(defaultValue: Marker[]): Placeholder { + return new Placeholder(this.name, defaultValue); + } } export class Variable extends Marker { @@ -169,14 +179,17 @@ export class Variable extends Marker { constructor(public name: string = '', public defaultValue: Marker[]) { super(); } - get isDefined(): boolean { return this.resolvedValue !== undefined; } - toString() { return this.isDefined ? this.resolvedValue : Marker.toString(this.defaultValue); } + with(defaultValue: Marker[]): Variable { + let ret = new Variable(this.name, defaultValue); + ret.resolvedValue = this.resolvedValue; + return ret; + } } export function walk(marker: Marker[], visitor: (marker: Marker) => boolean): void { const stack = [...marker]; @@ -234,26 +247,41 @@ export class TextmateSnippet { return map; } - adjustIndentation(normalizer: (whitespace: string) => string): void { + withIndentation(normalizer: (whitespace: string) => string): TextmateSnippet { + // create a new snippet because this can be + // different for each and every cursor + const newMarker = [...this.marker]; + TextmateSnippet._adjustIndentation(newMarker, normalizer); + return new TextmateSnippet(newMarker); + } - walk(this.marker, candidate => { + private static _adjustIndentation(marker: Marker[], normalizer: (whitespace: string) => string): void { + for (let i = 0; i < marker.length; i++) { + const candidate = marker[i]; if (candidate instanceof Text) { //check for newline characters and adjust indent let regex = /\r\n|\r|\n/g; let match: RegExpMatchArray; - while (match = regex.exec(candidate.string)) { + let value = candidate.string; + while (match = regex.exec(value)) { let pos = regex.lastIndex; - let whitespace = getLeadingWhitespace(candidate.string, pos); + let whitespace = getLeadingWhitespace(value, pos); let normalized = normalizer(whitespace); if (whitespace !== normalized) { - candidate.string = candidate.string.substr(0, pos) + value = value.substr(0, pos) + normalized - + candidate.string.substr(pos + whitespace.length); + + value.substr(pos + whitespace.length); + + marker[i] = candidate.with(value); } } + } else if (candidate instanceof Placeholder || candidate instanceof Variable) { + // recurse with a copied array + let children = [...candidate.defaultValue]; + TextmateSnippet._adjustIndentation(children, normalizer); + marker[i] = candidate.with(children); } - return true; - }); + } } } diff --git a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts index 60e200e810290..01e98e161232b 100644 --- a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts +++ b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts @@ -363,21 +363,24 @@ suite('SnippetParser', () => { assert.equal(snippet.offset(array[0]), 3); }); - test('TextmateSnippet#adjustIndentation', () => { + test('TextmateSnippet#withIndentation', () => { let snippet = SnippetParser.parse('foo\n bar'); assert.equal(Marker.toString(snippet.marker), 'foo\n bar'); - snippet.adjustIndentation(s => s.replace(/ /, '\t')); - assert.equal(Marker.toString(snippet.marker), 'foo\n\tbar'); + let newSnippet = snippet.withIndentation(s => s.replace(/ /, '\t')); + assert.equal(Marker.toString(snippet.marker), 'foo\n bar'); + assert.equal(Marker.toString(newSnippet.marker), 'foo\n\tbar'); snippet = SnippetParser.parse('foo\r\n bar\r\n far'); assert.equal(Marker.toString(snippet.marker), 'foo\r\n bar\r\n far'); - snippet.adjustIndentation(s => s.replace(/ /, '\t')); - assert.equal(Marker.toString(snippet.marker), 'foo\r\n\tbar\r\n\tfar'); + newSnippet = snippet.withIndentation(s => s.replace(/ /, '\t')); + assert.equal(Marker.toString(snippet.marker), 'foo\r\n bar\r\n far'); + assert.equal(Marker.toString(newSnippet.marker), 'foo\r\n\tbar\r\n\tfar'); snippet = SnippetParser.parse('foo${1:bar\r far\r boo}'); assert.equal(Marker.toString(snippet.marker), 'foobar\r far\r boo'); - snippet.adjustIndentation(s => s.replace(/ /, '\t')); - assert.equal(Marker.toString(snippet.marker), 'foobar\r\tfar\r\tboo'); + newSnippet = snippet.withIndentation(s => s.replace(/ /, '\t')); + assert.equal(Marker.toString(snippet.marker), 'foobar\r far\r boo'); + assert.equal(Marker.toString(newSnippet.marker), 'foobar\r\tfar\r\tboo'); }); }); From 003452b28e3572bec2fe941c6df0807bd415d905 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 5 May 2017 14:23:42 +0200 Subject: [PATCH 0214/2747] more tests, #16037 --- .../contrib/snippet/test/common/snippetParser.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts index 01e98e161232b..11cc8b994e893 100644 --- a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts +++ b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts @@ -366,6 +366,14 @@ suite('SnippetParser', () => { test('TextmateSnippet#withIndentation', () => { let snippet = SnippetParser.parse('foo\n bar'); assert.equal(Marker.toString(snippet.marker), 'foo\n bar'); + let snippet1 = snippet.withIndentation(s => s.replace(/ /, '\t')); + let snippet2 = snippet.withIndentation(s => s.replace(/ /, ' ')); + assert.equal(Marker.toString(snippet.marker), 'foo\n bar'); + assert.equal(Marker.toString(snippet1.marker), 'foo\n\tbar'); + assert.equal(Marker.toString(snippet2.marker), 'foo\n bar'); + + snippet = SnippetParser.parse('foo\n bar'); + assert.equal(Marker.toString(snippet.marker), 'foo\n bar'); let newSnippet = snippet.withIndentation(s => s.replace(/ /, '\t')); assert.equal(Marker.toString(snippet.marker), 'foo\n bar'); assert.equal(Marker.toString(newSnippet.marker), 'foo\n\tbar'); From e66892f521ca0e30d8d4e43eb4c3b3b9efa34ad5 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 5 May 2017 14:41:05 +0200 Subject: [PATCH 0215/2747] TextmateSnippet#value, #16037 --- .../contrib/snippet/common/snippetParser.ts | 4 +++ .../snippet/test/common/snippetParser.test.ts | 26 +++++++++---------- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index e06dc9621dd57..dd7fdfc42d79f 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -247,6 +247,10 @@ export class TextmateSnippet { return map; } + get value() { + return Marker.toString(this.marker); + } + withIndentation(normalizer: (whitespace: string) => string): TextmateSnippet { // create a new snippet because this can be // different for each and every cursor diff --git a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts index 11cc8b994e893..e5acd64f7ec76 100644 --- a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts +++ b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts @@ -365,30 +365,30 @@ suite('SnippetParser', () => { test('TextmateSnippet#withIndentation', () => { let snippet = SnippetParser.parse('foo\n bar'); - assert.equal(Marker.toString(snippet.marker), 'foo\n bar'); + assert.equal(snippet.value, 'foo\n bar'); let snippet1 = snippet.withIndentation(s => s.replace(/ /, '\t')); let snippet2 = snippet.withIndentation(s => s.replace(/ /, ' ')); - assert.equal(Marker.toString(snippet.marker), 'foo\n bar'); - assert.equal(Marker.toString(snippet1.marker), 'foo\n\tbar'); - assert.equal(Marker.toString(snippet2.marker), 'foo\n bar'); + assert.equal(snippet.value, 'foo\n bar'); + assert.equal(snippet1.value, 'foo\n\tbar'); + assert.equal(snippet2.value, 'foo\n bar'); snippet = SnippetParser.parse('foo\n bar'); - assert.equal(Marker.toString(snippet.marker), 'foo\n bar'); + assert.equal(snippet.value, 'foo\n bar'); let newSnippet = snippet.withIndentation(s => s.replace(/ /, '\t')); - assert.equal(Marker.toString(snippet.marker), 'foo\n bar'); - assert.equal(Marker.toString(newSnippet.marker), 'foo\n\tbar'); + assert.equal(snippet.value, 'foo\n bar'); + assert.equal(newSnippet.value, 'foo\n\tbar'); snippet = SnippetParser.parse('foo\r\n bar\r\n far'); - assert.equal(Marker.toString(snippet.marker), 'foo\r\n bar\r\n far'); + assert.equal(snippet.value, 'foo\r\n bar\r\n far'); newSnippet = snippet.withIndentation(s => s.replace(/ /, '\t')); - assert.equal(Marker.toString(snippet.marker), 'foo\r\n bar\r\n far'); - assert.equal(Marker.toString(newSnippet.marker), 'foo\r\n\tbar\r\n\tfar'); + assert.equal(snippet.value, 'foo\r\n bar\r\n far'); + assert.equal(newSnippet.value, 'foo\r\n\tbar\r\n\tfar'); snippet = SnippetParser.parse('foo${1:bar\r far\r boo}'); - assert.equal(Marker.toString(snippet.marker), 'foobar\r far\r boo'); + assert.equal(snippet.value, 'foobar\r far\r boo'); newSnippet = snippet.withIndentation(s => s.replace(/ /, '\t')); - assert.equal(Marker.toString(snippet.marker), 'foobar\r far\r boo'); - assert.equal(Marker.toString(newSnippet.marker), 'foobar\r\tfar\r\tboo'); + assert.equal(snippet.value, 'foobar\r far\r boo'); + assert.equal(newSnippet.value, 'foobar\r\tfar\r\tboo'); }); }); From 688b96f7dfa37b53b88eec4e6cb9af75a499fe86 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 5 May 2017 14:54:10 +0200 Subject: [PATCH 0216/2747] fix #26021 --- src/vs/base/browser/dom.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts index b2ec45dbb77c5..21698e938db4a 100644 --- a/src/vs/base/browser/dom.ts +++ b/src/vs/base/browser/dom.ts @@ -160,19 +160,25 @@ const _manualClassList = new class { const _nativeClassList = new class { hasClass(node: HTMLElement, className: string): boolean { - return className && node.classList.contains(className); + return className && node.classList && node.classList.contains(className); } addClass(node: HTMLElement, className: string): void { - return className && node.classList.add(className); + if (className && node.classList) { + node.classList.add(className); + } } removeClass(node: HTMLElement, className: string): void { - return className && node.classList.remove(className); + if (className && node.classList) { + node.classList.remove(className); + } } toggleClass(node: HTMLElement, className: string, shouldHaveIt?: boolean): void { - node.classList.toggle(className, shouldHaveIt); + if (node.classList) { + node.classList.toggle(className, shouldHaveIt); + } } }; From 8dd1383ccd4606653f2497f7712ba60da35ddb62 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 5 May 2017 15:34:20 +0200 Subject: [PATCH 0217/2747] debug: introduce internalConsoleOptions in settings fixes #18398 --- src/vs/workbench/parts/debug/common/debug.ts | 7 +++++++ .../parts/debug/electron-browser/debug.contribution.ts | 3 ++- .../parts/debug/electron-browser/debugService.ts | 4 +++- src/vs/workbench/parts/debug/node/debugAdapter.ts | 8 ++------ 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debug.ts b/src/vs/workbench/parts/debug/common/debug.ts index c870954e3e292..ccee37d19f4ca 100644 --- a/src/vs/workbench/parts/debug/common/debug.ts +++ b/src/vs/workbench/parts/debug/common/debug.ts @@ -3,6 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import * as nls from 'vs/nls'; import uri from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; import severity from 'vs/base/common/severity'; @@ -36,6 +37,11 @@ export const CONTEXT_VARIABLES_FOCUSED = new RawContextKey('variablesFo export const EDITOR_CONTRIBUTION_ID = 'editor.contrib.debug'; export const DEBUG_SCHEME = 'debug'; +export const INTERNAL_CONSOLE_OPTIONS_SCHEMA = { + enum: ['neverOpen', 'openOnSessionStart', 'openOnFirstSessionStart'], + default: 'openOnFirstSessionStart', + description: nls.localize('internalConsoleOptions', "Controls behavior of the internal debug console.") +}; // raw @@ -294,6 +300,7 @@ export interface IDebugConfiguration { openExplorerOnEnd: boolean; inlineValues: boolean; hideActionBar: boolean; + internalConsoleOptions: string; } export interface IGlobalConfig { diff --git a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts index 9baa6c912104a..22c7191e5170c 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts @@ -18,7 +18,7 @@ import { TogglePanelAction, Extensions as PanelExtensions, PanelRegistry, PanelD import { DebugViewRegistry } from 'vs/workbench/parts/debug/browser/debugViewRegistry'; import { VariablesView, WatchExpressionsView, CallStackView, BreakpointsView } from 'vs/workbench/parts/debug/electron-browser/debugViews'; import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions'; -import { IDebugService, VIEWLET_ID, REPL_ID, CONTEXT_NOT_IN_DEBUG_MODE, CONTEXT_IN_DEBUG_MODE } from 'vs/workbench/parts/debug/common/debug'; +import { IDebugService, VIEWLET_ID, REPL_ID, CONTEXT_NOT_IN_DEBUG_MODE, CONTEXT_IN_DEBUG_MODE, INTERNAL_CONSOLE_OPTIONS_SCHEMA } from 'vs/workbench/parts/debug/common/debug'; import { IPartService } from 'vs/workbench/services/part/common/partService'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { DebugEditorModelManager } from 'vs/workbench/parts/debug/browser/debugEditorModelManager'; @@ -172,6 +172,7 @@ configurationRegistry.registerConfiguration({ description: nls.localize({ comment: ['This is the description for a setting'], key: 'hideActionBar' }, "Controls if the floating debug action bar should be hidden"), default: false }, + 'debug.internalConsoleOptions': INTERNAL_CONSOLE_OPTIONS_SCHEMA, 'launch': { type: 'object', description: nls.localize({ comment: ['This is the description for a setting'], key: 'launch' }, "Global debug launch configuration. Should be used as an alternative to 'launch.json' that is shared across workspaces"), diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 359b940f29d95..0a3a30779566d 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -765,7 +765,9 @@ export class DebugService implements debug.IDebugService { if (!this.viewModel.focusedProcess) { this.focusStackFrameAndEvaluate(null, process); } - if (configuration.internalConsoleOptions === 'openOnSessionStart' || (!this.viewModel.changedWorkbenchViewState && configuration.internalConsoleOptions !== 'neverOpen')) { + + const internalConsoleOptions = configuration.internalConsoleOptions || this.configurationService.getConfiguration('debug').internalConsoleOptions; + if (internalConsoleOptions === 'openOnSessionStart' || (!this.viewModel.changedWorkbenchViewState && internalConsoleOptions === 'openOnFirstSessionStart')) { this.panelService.openPanel(debug.REPL_ID, false).done(undefined, errors.onUnexpectedError); } diff --git a/src/vs/workbench/parts/debug/node/debugAdapter.ts b/src/vs/workbench/parts/debug/node/debugAdapter.ts index 6926d85d52936..973340ea1d995 100644 --- a/src/vs/workbench/parts/debug/node/debugAdapter.ts +++ b/src/vs/workbench/parts/debug/node/debugAdapter.ts @@ -12,7 +12,7 @@ import * as objects from 'vs/base/common/objects'; import * as paths from 'vs/base/common/paths'; import * as platform from 'vs/base/common/platform'; import { IJSONSchema, IJSONSchemaSnippet } from 'vs/base/common/jsonSchema'; -import { IRawAdapter, IAdapterExecutable } from 'vs/workbench/parts/debug/common/debug'; +import { IRawAdapter, IAdapterExecutable, INTERNAL_CONSOLE_OPTIONS_SCHEMA } from 'vs/workbench/parts/debug/common/debug'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { IConfigurationResolverService } from 'vs/workbench/services/configurationResolver/common/configurationResolver'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; @@ -205,11 +205,7 @@ export class Adapter { default: null, description: nls.localize('debugPrelaunchTask', "Task to run before debug session starts.") }; - properties['internalConsoleOptions'] = { - enum: ['neverOpen', 'openOnSessionStart', 'openOnFirstSessionStart'], - default: 'openOnFirstSessionStart', - description: nls.localize('internalConsoleOptions', "Controls behavior of the internal debug console.") - }; + properties['internalConsoleOptions'] = INTERNAL_CONSOLE_OPTIONS_SCHEMA; const osProperties = objects.deepClone(properties); properties['windows'] = { From c2c39e14a2da62b7aefcbb6c23487d9c6547f338 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 5 May 2017 15:35:22 +0200 Subject: [PATCH 0218/2747] remove legacy git fixes #8809 fixes #24014 --- src/vs/code/electron-main/app.ts | 7 - .../api/node/mainThreadExtensionService.ts | 3 - .../parts/activitybar/activitybarPart.ts | 10 +- src/vs/workbench/electron-browser/shell.ts | 5 +- .../electron-browser/workbench.main.ts | 5 - .../git/browser/gitActions.contribution.ts | 749 ---------- .../workbench/parts/git/browser/gitActions.ts | 1299 ----------------- .../git/browser/gitEditorContributions.ts | 181 --- .../parts/git/browser/gitEditorInputs.ts | 160 -- .../parts/git/browser/gitOperations.ts | 25 - .../workbench/parts/git/browser/gitOutput.ts | 42 - .../parts/git/browser/gitQuickOpen.ts | 271 ---- src/vs/workbench/parts/git/browser/gitScm.ts | 125 -- .../parts/git/browser/gitServices.ts | 908 ------------ .../workbench/parts/git/browser/gitViewlet.ts | 215 --- .../workbench/parts/git/browser/gitWidgets.ts | 209 --- .../git/browser/gitWorkbenchContributions.ts | 241 --- .../parts/git/browser/media/Compare.svg | 1 - .../git/browser/media/Compare_inverse.svg | 1 - .../parts/git/browser/media/OpenEditor.svg | 3 - .../git/browser/media/OpenEditor_inverse.svg | 1 - .../parts/git/browser/media/Refresh.svg | 1 - .../parts/git/browser/media/add-focus.svg | 1 - .../parts/git/browser/media/add-inverse.svg | 1 - .../workbench/parts/git/browser/media/add.svg | 1 - .../parts/git/browser/media/check-inverse.svg | 1 - .../parts/git/browser/media/check.svg | 1 - .../parts/git/browser/media/git-dark.svg | 1 - .../git/browser/media/git.contribution.css | 155 -- .../workbench/parts/git/browser/media/git.svg | 1 - .../parts/git/browser/media/gitViewlet.css | 93 -- .../parts/git/browser/media/pull-inverse.svg | 1 - .../parts/git/browser/media/pull.svg | 1 - .../parts/git/browser/media/push-inverse.svg | 1 - .../parts/git/browser/media/push.svg | 1 - .../git/browser/media/refresh-inverse.svg | 1 - .../git/browser/media/subtract-focus.svg | 1 - .../git/browser/media/subtract-inverse.svg | 1 - .../parts/git/browser/media/subtract.svg | 1 - .../parts/git/browser/media/sync.svg | 1 - .../parts/git/browser/media/undo-focus.svg | 1 - .../parts/git/browser/media/undo-inverse.svg | 1 - .../parts/git/browser/media/undo.svg | 1 - .../git/browser/views/changes/changesView.css | 171 --- .../git/browser/views/changes/changesView.ts | 496 ------- .../browser/views/changes/changesViewer.ts | 921 ------------ .../browser/views/disabled/disabledView.css | 8 - .../browser/views/disabled/disabledView.ts | 63 - .../git/browser/views/empty/emptyView.css | 30 - .../git/browser/views/empty/emptyView.ts | 174 --- .../git/browser/views/gitless/gitlessView.css | 23 - .../git/browser/views/gitless/gitlessView.ts | 98 -- .../parts/git/browser/views/huge/hugeView.css | 12 - .../parts/git/browser/views/huge/hugeView.ts | 86 -- .../git/browser/views/notroot/notrootView.css | 23 - .../git/browser/views/notroot/notrootView.ts | 63 - .../views/noworkspace/noworkspaceView.css | 12 - .../views/noworkspace/noworkspaceView.ts | 95 -- .../workbench/parts/git/browser/views/view.ts | 24 - src/vs/workbench/parts/git/common/git.ts | 342 ----- src/vs/workbench/parts/git/common/gitIpc.ts | 267 ---- src/vs/workbench/parts/git/common/gitModel.ts | 412 ------ .../workbench/parts/git/common/stageRanges.ts | 238 --- .../electron-browser/electronGitService.ts | 235 --- .../git/electron-browser/git.contribution.ts | 44 - .../parts/git/electron-browser/gitActions.ts | 92 -- .../parts/git/electron-main/askpassService.ts | 75 - .../workbench/parts/git/electron-main/git.svg | 6 - .../parts/git/electron-main/index.html | 138 -- src/vs/workbench/parts/git/node/askpass.sh | 5 - src/vs/workbench/parts/git/node/askpass.ts | 58 - src/vs/workbench/parts/git/node/git.lib.ts | 735 ---------- src/vs/workbench/parts/git/node/gitApp.ts | 15 - .../workbench/parts/git/node/rawGitService.ts | 237 --- .../parts/git/node/rawGitServiceBootstrap.ts | 52 - .../parts/git/node/unscopedGitService.ts | 135 -- .../parts/git/test/common/gitModel.test.ts | 188 --- .../parts/git/test/common/stageRanges.test.ts | 475 ------ .../workbench/parts/scm/browser/scmPreview.ts | 96 -- .../scm/electron-browser/scm.contribution.ts | 67 +- .../welcome/overlay/browser/welcomeOverlay.ts | 3 +- .../electron-browser/walkThroughPart.ts | 5 +- 82 files changed, 36 insertions(+), 10912 deletions(-) delete mode 100644 src/vs/workbench/parts/git/browser/gitActions.contribution.ts delete mode 100644 src/vs/workbench/parts/git/browser/gitActions.ts delete mode 100644 src/vs/workbench/parts/git/browser/gitEditorContributions.ts delete mode 100644 src/vs/workbench/parts/git/browser/gitEditorInputs.ts delete mode 100644 src/vs/workbench/parts/git/browser/gitOperations.ts delete mode 100644 src/vs/workbench/parts/git/browser/gitOutput.ts delete mode 100644 src/vs/workbench/parts/git/browser/gitQuickOpen.ts delete mode 100644 src/vs/workbench/parts/git/browser/gitScm.ts delete mode 100644 src/vs/workbench/parts/git/browser/gitServices.ts delete mode 100644 src/vs/workbench/parts/git/browser/gitViewlet.ts delete mode 100644 src/vs/workbench/parts/git/browser/gitWidgets.ts delete mode 100644 src/vs/workbench/parts/git/browser/gitWorkbenchContributions.ts delete mode 100644 src/vs/workbench/parts/git/browser/media/Compare.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/Compare_inverse.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/OpenEditor.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/OpenEditor_inverse.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/Refresh.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/add-focus.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/add-inverse.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/add.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/check-inverse.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/check.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/git-dark.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/git.contribution.css delete mode 100644 src/vs/workbench/parts/git/browser/media/git.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/gitViewlet.css delete mode 100644 src/vs/workbench/parts/git/browser/media/pull-inverse.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/pull.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/push-inverse.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/push.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/refresh-inverse.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/subtract-focus.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/subtract-inverse.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/subtract.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/sync.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/undo-focus.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/undo-inverse.svg delete mode 100644 src/vs/workbench/parts/git/browser/media/undo.svg delete mode 100644 src/vs/workbench/parts/git/browser/views/changes/changesView.css delete mode 100644 src/vs/workbench/parts/git/browser/views/changes/changesView.ts delete mode 100644 src/vs/workbench/parts/git/browser/views/changes/changesViewer.ts delete mode 100644 src/vs/workbench/parts/git/browser/views/disabled/disabledView.css delete mode 100644 src/vs/workbench/parts/git/browser/views/disabled/disabledView.ts delete mode 100644 src/vs/workbench/parts/git/browser/views/empty/emptyView.css delete mode 100644 src/vs/workbench/parts/git/browser/views/empty/emptyView.ts delete mode 100644 src/vs/workbench/parts/git/browser/views/gitless/gitlessView.css delete mode 100644 src/vs/workbench/parts/git/browser/views/gitless/gitlessView.ts delete mode 100644 src/vs/workbench/parts/git/browser/views/huge/hugeView.css delete mode 100644 src/vs/workbench/parts/git/browser/views/huge/hugeView.ts delete mode 100644 src/vs/workbench/parts/git/browser/views/notroot/notrootView.css delete mode 100644 src/vs/workbench/parts/git/browser/views/notroot/notrootView.ts delete mode 100644 src/vs/workbench/parts/git/browser/views/noworkspace/noworkspaceView.css delete mode 100644 src/vs/workbench/parts/git/browser/views/noworkspace/noworkspaceView.ts delete mode 100644 src/vs/workbench/parts/git/browser/views/view.ts delete mode 100644 src/vs/workbench/parts/git/common/git.ts delete mode 100644 src/vs/workbench/parts/git/common/gitIpc.ts delete mode 100644 src/vs/workbench/parts/git/common/gitModel.ts delete mode 100644 src/vs/workbench/parts/git/common/stageRanges.ts delete mode 100644 src/vs/workbench/parts/git/electron-browser/electronGitService.ts delete mode 100644 src/vs/workbench/parts/git/electron-browser/git.contribution.ts delete mode 100644 src/vs/workbench/parts/git/electron-browser/gitActions.ts delete mode 100644 src/vs/workbench/parts/git/electron-main/askpassService.ts delete mode 100644 src/vs/workbench/parts/git/electron-main/git.svg delete mode 100644 src/vs/workbench/parts/git/electron-main/index.html delete mode 100755 src/vs/workbench/parts/git/node/askpass.sh delete mode 100644 src/vs/workbench/parts/git/node/askpass.ts delete mode 100644 src/vs/workbench/parts/git/node/git.lib.ts delete mode 100644 src/vs/workbench/parts/git/node/gitApp.ts delete mode 100644 src/vs/workbench/parts/git/node/rawGitService.ts delete mode 100644 src/vs/workbench/parts/git/node/rawGitServiceBootstrap.ts delete mode 100644 src/vs/workbench/parts/git/node/unscopedGitService.ts delete mode 100644 src/vs/workbench/parts/git/test/common/gitModel.test.ts delete mode 100644 src/vs/workbench/parts/git/test/common/stageRanges.test.ts delete mode 100644 src/vs/workbench/parts/scm/browser/scmPreview.ts diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 151d6ac5b20ed..03609bc577273 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -20,8 +20,6 @@ import { UpdateChannel } from 'vs/platform/update/common/updateIpc'; import { UpdateService } from 'vs/platform/update/electron-main/updateService'; import { Server as ElectronIPCServer } from 'vs/base/parts/ipc/electron-main/ipc.electron-main'; import { Server, connect, Client } from 'vs/base/parts/ipc/node/ipc.net'; -import { AskpassChannel } from 'vs/workbench/parts/git/common/gitIpc'; -import { GitAskpassService } from 'vs/workbench/parts/git/electron-main/askpassService'; import { SharedProcess } from 'vs/code/electron-main/sharedProcess'; import { Mutex } from 'windows-mutex'; import { LaunchService, LaunchChannel, ILaunchService } from './launch'; @@ -138,11 +136,6 @@ export class VSCodeApplication { app.setAppUserModelId(product.win32AppUserModelId); } - // Register Main IPC connections - const askpassService = new GitAskpassService(); - const askpassChannel = new AskpassChannel(askpassService); - this.mainIpcServer.registerChannel('askpass', askpassChannel); - // Create Electron IPC Server this.electronIpcServer = new ElectronIPCServer(); diff --git a/src/vs/workbench/api/node/mainThreadExtensionService.ts b/src/vs/workbench/api/node/mainThreadExtensionService.ts index 414cc32accf2a..05ca99e2f244c 100644 --- a/src/vs/workbench/api/node/mainThreadExtensionService.ts +++ b/src/vs/workbench/api/node/mainThreadExtensionService.ts @@ -60,8 +60,6 @@ export class MainProcessExtensionService extends AbstractExtensionService scm viewlet - - const map = SCMPreview.enabled - ? (id => id === 'workbench.view.git' ? 'workbench.view.scm' : id) - : (id => id === 'workbench.view.scm' ? 'workbench.view.git' : id); - this.pinnedViewlets = pinnedViewlets - .map(map) + // TODO@Ben: Migrate git => scm viewlet + .map(id => id === 'workbench.view.git' ? 'workbench.view.scm' : id) .filter(arrays.uniqueFilter(str => str)); } else { diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 03296bc74ab3c..33d9257064c2c 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -97,7 +97,6 @@ import { MainProcessTextMateSyntax } from 'vs/editor/electron-browser/textMate/T import { BareFontInfo } from 'vs/editor/common/config/fontInfo'; import { restoreFontInfo, readFontInfo, saveFontInfo } from 'vs/editor/browser/config/configuration'; import * as browser from 'vs/base/browser/browser'; -import SCMPreview from 'vs/workbench/parts/scm/browser/scmPreview'; import { readdir } from 'vs/base/node/pfs'; import { join } from 'path'; import 'vs/platform/opener/browser/opener.contribution'; @@ -386,9 +385,7 @@ export class WorkbenchShell { this.timerService.beforeExtensionLoad = Date.now(); - // TODO@Joao: remove - const disabledExtensions = SCMPreview.enabled ? [] : ['vscode.git']; - this.extensionService = instantiationService.createInstance(MainProcessExtensionService, disabledExtensions); + this.extensionService = instantiationService.createInstance(MainProcessExtensionService); serviceCollection.set(IExtensionService, this.extensionService); extensionHostProcessWorker.start(this.extensionService); this.extensionService.onReady().done(() => { diff --git a/src/vs/workbench/electron-browser/workbench.main.ts b/src/vs/workbench/electron-browser/workbench.main.ts index 8b28703898591..f71d678b112d9 100644 --- a/src/vs/workbench/electron-browser/workbench.main.ts +++ b/src/vs/workbench/electron-browser/workbench.main.ts @@ -45,11 +45,6 @@ import 'vs/workbench/parts/search/browser/openAnythingHandler'; // can be packag import 'vs/workbench/parts/scm/electron-browser/scm.contribution'; import 'vs/workbench/parts/scm/electron-browser/scmViewlet'; // can be packaged separately -import 'vs/workbench/parts/git/electron-browser/git.contribution'; -import 'vs/workbench/parts/git/browser/gitQuickOpen'; -import 'vs/workbench/parts/git/browser/gitActions.contribution'; -import 'vs/workbench/parts/git/browser/gitViewlet'; // can be packaged separately - import 'vs/workbench/parts/debug/electron-browser/debug.contribution'; import 'vs/workbench/parts/debug/browser/debugQuickOpen'; import 'vs/workbench/parts/debug/electron-browser/repl'; diff --git a/src/vs/workbench/parts/git/browser/gitActions.contribution.ts b/src/vs/workbench/parts/git/browser/gitActions.contribution.ts deleted file mode 100644 index 6d2ea14290839..0000000000000 --- a/src/vs/workbench/parts/git/browser/gitActions.contribution.ts +++ /dev/null @@ -1,749 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import nls = require('vs/nls'); -import lifecycle = require('vs/base/common/lifecycle'); -import platform = require('vs/platform/platform'); -import abr = require('vs/workbench/browser/actionBarRegistry'); -import { TPromise } from 'vs/base/common/winjs.base'; -import editorbrowser = require('vs/editor/browser/editorBrowser'); -import editorcommon = require('vs/editor/common/editorCommon'); -import baseeditor = require('vs/workbench/browser/parts/editor/baseEditor'); -import WorkbenchEditorCommon = require('vs/workbench/common/editor'); -import tdeditor = require('vs/workbench/browser/parts/editor/textDiffEditor'); -import teditor = require('vs/workbench/browser/parts/editor/textEditor'); -import filesCommon = require('vs/workbench/parts/files/common/files'); -import gitcontrib = require('vs/workbench/parts/git/browser/gitWorkbenchContributions'); -import diffei = require('vs/workbench/common/editor/diffEditorInput'); -import { IGitService, Status, IFileStatus, StatusType } from 'vs/workbench/parts/git/common/git'; -import gitei = require('vs/workbench/parts/git/browser/gitEditorInputs'); -import { getSelectedChanges, applyChangesToModel, getChangeRevertEdits } from 'vs/workbench/parts/git/common/stageRanges'; -import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; -import { IViewlet } from 'vs/workbench/common/viewlet'; -import { IPartService, Parts } from 'vs/workbench/services/part/common/partService'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { IFileService } from 'vs/platform/files/common/files'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import wbar = require('vs/workbench/common/actionRegistry'); -import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; -import { - OpenChangeAction, OpenFileAction, SyncAction, PullAction, PushAction, - PushToRemoteAction, PublishAction, StartGitBranchAction, StartGitCheckoutAction, - InputCommitAction, UndoLastCommitAction, BaseStageAction, BaseUnstageAction, - PullWithRebaseAction -} from './gitActions'; -import paths = require('vs/base/common/paths'); -import URI from 'vs/base/common/uri'; -import { FileEditorInput } from 'vs/workbench/parts/files/common/editors/fileEditorInput'; -import SCMPreview from 'vs/workbench/parts/scm/browser/scmPreview'; -import { IMessageService } from 'vs/platform/message/common/message'; - -function getStatus(gitService: IGitService, contextService: IWorkspaceContextService, input: WorkbenchEditorCommon.IFileEditorInput): IFileStatus { - const model = gitService.getModel(); - const repositoryRoot = model.getRepositoryRoot(); - const statusModel = model.getStatus(); - const repositoryRelativePath = paths.normalize(paths.relative(repositoryRoot, input.getResource().fsPath)); - - return statusModel.getWorkingTreeStatus().find(repositoryRelativePath) || - statusModel.getIndexStatus().find(repositoryRelativePath) || - statusModel.getMergeStatus().find(repositoryRelativePath); -} - -class OpenInDiffAction extends baseeditor.EditorInputAction { - - static ID = 'workbench.action.git.openInDiff'; - static Label = nls.localize('switchToChangesView', "Switch to Changes View"); - - private gitService: IGitService; - private viewletService: IViewletService; - private editorService: IWorkbenchEditorService; - private partService: IPartService; - private contextService: IWorkspaceContextService; - private toDispose: lifecycle.IDisposable[]; - - constructor( @IWorkbenchEditorService editorService: IWorkbenchEditorService, @IGitService gitService: IGitService, @IViewletService viewletService: IViewletService, @IPartService partService: IPartService, @IWorkspaceContextService contextService: IWorkspaceContextService) { - super(OpenInDiffAction.ID, OpenInDiffAction.Label); - - this.class = 'git-action open-in-diff'; - this.gitService = gitService; - this.viewletService = viewletService; - this.editorService = editorService; - this.partService = partService; - this.contextService = contextService; - - this.toDispose = [this.gitService.addBulkListener(() => this.onGitStateChanged())]; - - this.enabled = this.isEnabled(); - } - - public isEnabled(): boolean { - if (!super.isEnabled()) { - return false; - } - - const model = this.gitService.getModel(); - if (!model || !(typeof model.getRepositoryRoot() === 'string')) { - return false; - } - - var status = this.getStatus(); - - return status && ( - status.getStatus() === Status.MODIFIED || - status.getStatus() === Status.INDEX_MODIFIED || - status.getStatus() === Status.INDEX_RENAMED - ); - } - - private onGitStateChanged(): void { - if (this.gitService.isIdle()) { - this.enabled = this.isEnabled(); - } - } - - private getStatus(): IFileStatus { - return getStatus(this.gitService, this.contextService, this.input); - } - - public run(context?: WorkbenchEditorCommon.IEditorContext): TPromise { - const event = context ? context.event : null; - const sideBySide = !!(event && (event.ctrlKey || event.metaKey)); - const editor = this.editorService.getActiveEditor().getControl(); - const viewState = editor ? editor.saveViewState() : null; - - return this.gitService.getInput(this.getStatus()).then((input) => { - var promise = TPromise.as(null); - - if (this.partService.isVisible(Parts.SIDEBAR_PART)) { - promise = this.viewletService.openViewlet(gitcontrib.VIEWLET_ID, false); - } - - return promise.then(() => { - var options = new WorkbenchEditorCommon.TextDiffEditorOptions(); - options.forceOpen = true; - options.autoRevealFirstChange = false; - - return this.editorService.openEditor(input, options, sideBySide).then((editor) => { - if (viewState) { - var codeEditor = this.editorService.getActiveEditor().getControl(); - codeEditor.restoreViewState({ - original: { - cursorState: undefined, - viewState: undefined, - contributionsState: undefined - }, - modified: viewState - }); - } - }); - }); - }); - } - - public dispose(): void { - this.toDispose = lifecycle.dispose(this.toDispose); - } -} - -class OpenInEditorAction extends baseeditor.EditorInputAction { - - private static DELETED_STATES = [Status.BOTH_DELETED, Status.DELETED, Status.DELETED_BY_US, Status.INDEX_DELETED]; - static ID = 'workbench.action.git.openInEditor'; - static LABEL = nls.localize('openInEditor', "Switch to Editor View"); - - private gitService: IGitService; - private fileService: IFileService; - private viewletService: IViewletService; - private editorService: IWorkbenchEditorService; - private partService: IPartService; - private contextService: IWorkspaceContextService; - - constructor( @IFileService fileService: IFileService, @IWorkbenchEditorService editorService: IWorkbenchEditorService, @IGitService gitService: IGitService, @IViewletService viewletService: IViewletService, @IPartService partService: IPartService, @IWorkspaceContextService contextService: IWorkspaceContextService) { - super(OpenInEditorAction.ID, OpenInEditorAction.LABEL); - - this.class = 'git-action open-in-editor'; - this.gitService = gitService; - this.fileService = fileService; - this.viewletService = viewletService; - this.editorService = editorService; - this.partService = partService; - this.contextService = contextService; - - this.enabled = this.isEnabled(); - } - - public isEnabled(): boolean { - if (!super.isEnabled()) { - return false; - } - - const model = this.gitService.getModel(); - if (!model || !(typeof model.getRepositoryRoot() === 'string')) { - return false; - } - - var status: IFileStatus = (this.input).getFileStatus(); - if (OpenInEditorAction.DELETED_STATES.indexOf(status.getStatus()) > -1) { - return false; - } - - return true; - } - - public run(context?: WorkbenchEditorCommon.IEditorContext): TPromise { - const model = this.gitService.getModel(); - const resource = URI.file(paths.join(model.getRepositoryRoot(), this.getRepositoryRelativePath())); - const event = context ? context.event : null; - const sideBySide = !!(event && (event.ctrlKey || event.metaKey)); - const modifiedViewState = this.saveTextViewState(); - - return this.fileService.resolveFile(resource).then(stat => { - return this.editorService.openEditor({ - resource: stat.resource, - options: { - forceOpen: true - } - }, sideBySide).then(editor => { - this.restoreTextViewState(modifiedViewState); - - if (this.partService.isVisible(Parts.SIDEBAR_PART)) { - return this.viewletService.openViewlet(filesCommon.VIEWLET_ID, false); - } - return undefined; - }); - }); - } - - private saveTextViewState(): editorcommon.ICodeEditorViewState { - var textEditor = this.getTextEditor(); - if (textEditor) { - return textEditor.saveViewState(); - } - - return null; - } - - private restoreTextViewState(state: editorcommon.ICodeEditorViewState): void { - var textEditor = this.getTextEditor(); - if (textEditor) { - return textEditor.restoreViewState(state); - } - } - - private getTextEditor(): editorcommon.ICommonCodeEditor { - var editor = this.editorService.getActiveEditor(); - - if (editor instanceof tdeditor.TextDiffEditor) { - return (editor.getControl()).getModifiedEditor(); - } else if (editor instanceof teditor.BaseTextEditor) { - return editor.getControl(); - } - - return null; - } - - private getRepositoryRelativePath(): string { - var status: IFileStatus = (this.input).getFileStatus(); - - if (status.getStatus() === Status.INDEX_RENAMED) { - return status.getRename(); - } else { - var indexStatus = this.gitService.getModel().getStatus().find(status.getPath(), StatusType.INDEX); - - if (indexStatus && indexStatus.getStatus() === Status.INDEX_RENAMED) { - return indexStatus.getRename(); - } else { - return status.getPath(); - } - } - } -} - -export class WorkbenchStageAction extends BaseStageAction { - - static ID = 'workbench.action.git.stage'; - static LABEL = nls.localize('workbenchStage', "Stage"); - private contextService: IWorkspaceContextService; - - constructor( - id = WorkbenchStageAction.ID, - label = WorkbenchStageAction.LABEL, - @IGitService gitService: IGitService, - @IWorkbenchEditorService editorService: IWorkbenchEditorService, - @IWorkspaceContextService contextService: IWorkspaceContextService - ) { - super(id, label, '', gitService, editorService); - this.contextService = contextService; - this.onGitServiceChange(); - } - - protected updateEnablement(): void { - if (this.contextService) { - this.enabled = this.isEnabled(); - } else { - this.enabled = super.isEnabled(); - } - } - - isEnabled(): boolean { - if (!super.isEnabled()) { - return false; - } - - const editor = this.editorService.getActiveEditor(); - if (!editor || !(editor instanceof baseeditor.BaseEditor)) { - return false; - } - - return true; - } - - run(context?: any): TPromise { - const input = this.editorService.getActiveEditor().input; - let fileStatus: IFileStatus; - - if (gitei.isGitEditorInput(input)) { - const gitInput = input as gitei.GitDiffEditorInput; - fileStatus = gitInput.getFileStatus(); - } else { - fileStatus = getStatus(this.gitService, this.contextService, input as WorkbenchEditorCommon.IFileEditorInput); - } - - if (!fileStatus) { - return TPromise.as(null); - } - - return super.run(fileStatus); - } -} - -export class WorkbenchUnstageAction extends BaseUnstageAction { - - static ID = 'workbench.action.git.unstage'; - static LABEL = nls.localize('workbenchUnstage', "Unstage"); - private contextService: IWorkspaceContextService; - - constructor( - id = WorkbenchUnstageAction.ID, - label = WorkbenchUnstageAction.LABEL, - @IGitService gitService: IGitService, - @IWorkbenchEditorService editorService: IWorkbenchEditorService, - @IWorkspaceContextService contextService: IWorkspaceContextService - ) { - super(id, label, '', gitService, editorService); - this.contextService = contextService; - this.onGitServiceChange(); - } - - protected updateEnablement(): void { - if (this.contextService) { - this.enabled = this.isEnabled(); - } else { - this.enabled = super.isEnabled(); - } - } - - isEnabled(): boolean { - if (!super.isEnabled()) { - return false; - } - - const editor = this.editorService.getActiveEditor(); - if (!editor || !(editor instanceof baseeditor.BaseEditor)) { - return false; - } - - return true; - } - - run(context?: any): TPromise { - const input = this.editorService.getActiveEditor().input; - let fileStatus: IFileStatus; - - if (gitei.isGitEditorInput(input)) { - const gitInput = input as gitei.GitDiffEditorInput; - fileStatus = gitInput.getFileStatus(); - } else { - fileStatus = getStatus(this.gitService, this.contextService, input as WorkbenchEditorCommon.IFileEditorInput); - } - - if (!fileStatus) { - return TPromise.as(null); - } - - return super.run(fileStatus); - } -} - -export abstract class BaseStageRangesAction extends baseeditor.EditorInputAction { - private gitService: IGitService; - private editorService: IWorkbenchEditorService; - private editor: editorbrowser.IDiffEditor; - - constructor(id: string, label: string, editor: tdeditor.TextDiffEditor, @IGitService gitService: IGitService, @IWorkbenchEditorService editorService: IWorkbenchEditorService) { - super(id, label); - - this.editorService = editorService; - this.gitService = gitService; - this.editor = editor.getControl(); - this.editor.getModifiedEditor().onDidChangeCursorSelection(() => this.updateEnablement()); - this.editor.onDidUpdateDiff(() => this.updateEnablement()); - this.class = 'git-action stage-ranges'; - } - - public isEnabled(): boolean { - if (!super.isEnabled()) { - return false; - } - - if (!this.gitService || !this.editorService) { - return false; - } - - var changes = this.editor.getLineChanges(); - var selections = this.editor.getSelections(); - - if (!changes || !selections || selections.length === 0) { - return false; - } - - return getSelectedChanges(changes, selections).length > 0; - } - - protected getRangesAppliedResult(editor: editorbrowser.IDiffEditor) { - var selections = editor.getSelections(); - var changes = getSelectedChanges(editor.getLineChanges(), selections); - return applyChangesToModel(editor.getModel().original, editor.getModel().modified, changes); - } - - public run(): TPromise { - var result = this.getRangesAppliedResult(this.editor); - - var status = (this.input).getFileStatus(); - var path = status.getPath(); - var viewState = this.editor.saveViewState(); - - return this.gitService.stage(status.getPath(), result).then(() => { - var statusModel = this.gitService.getModel().getStatus(); - - status = statusModel.getWorkingTreeStatus().find(path) || statusModel.getIndexStatus().find(path); - - if (status) { - return this.gitService.getInput(status).then((input) => { - var options = new WorkbenchEditorCommon.TextDiffEditorOptions(); - options.forceOpen = true; - options.autoRevealFirstChange = false; - - return this.editorService.openEditor(input, options, this.position).then(() => { - this.editor.restoreViewState(viewState); - }); - }); - } - return undefined; - }); - } - - private updateEnablement(): void { - this.enabled = this.isEnabled(); - } -} - -export class StageRangesAction extends BaseStageRangesAction { - static ID = 'workbench.action.git.stageRanges'; - static LABEL = nls.localize('stageSelectedLines', "Stage Selected Lines"); - - constructor(editor: tdeditor.TextDiffEditor, @IGitService gitService: IGitService, @IWorkbenchEditorService editorService: IWorkbenchEditorService) { - super(StageRangesAction.ID, StageRangesAction.LABEL, editor, gitService, editorService); - } -} - -export class UnstageRangesAction extends BaseStageRangesAction { - static ID = 'workbench.action.git.unstageRanges'; - static LABEL = nls.localize('unstageSelectedLines', "Unstage Selected Lines"); - - constructor(editor: tdeditor.TextDiffEditor, @IGitService gitService: IGitService, @IWorkbenchEditorService editorService: IWorkbenchEditorService) { - super(UnstageRangesAction.ID, UnstageRangesAction.LABEL, editor, gitService, editorService); - } - - protected getRangesAppliedResult(editor: editorbrowser.IDiffEditor) { - const selections = editor.getSelections(); - const changes = getSelectedChanges(editor.getLineChanges(), selections) - .map(c => ({ - modifiedStartLineNumber: c.originalStartLineNumber, - modifiedEndLineNumber: c.originalEndLineNumber, - originalStartLineNumber: c.modifiedStartLineNumber, - originalEndLineNumber: c.modifiedEndLineNumber - })); - - return applyChangesToModel(editor.getModel().modified, editor.getModel().original, changes); - } -} - -export class RevertRangesAction extends baseeditor.EditorInputAction { - static ID = 'workbench.action.git.revertRanges'; - static LABEL = nls.localize('revertSelectedLines', "Revert Selected Lines"); - - private editor: editorbrowser.IDiffEditor; - - constructor( - editor: tdeditor.TextDiffEditor, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IMessageService private messageService: IMessageService - ) { - super(RevertRangesAction.ID, RevertRangesAction.LABEL); - - this.editor = editor.getControl(); - this.editor.getModifiedEditor().onDidChangeCursorSelection(() => this.updateEnablement()); - this.editor.onDidUpdateDiff(() => this.updateEnablement()); - this.class = 'git-action revert-ranges'; - } - - public isEnabled(): boolean { - if (!super.isEnabled()) { - return false; - } - - if (!this.editorService) { - return false; - } - - const changes = this.editor.getLineChanges(); - const selections = this.editor.getSelections(); - - if (!changes || !selections || selections.length === 0) { - return false; - } - - return getSelectedChanges(changes, selections).length > 0; - } - - public run(): TPromise { - const selections = this.editor.getSelections(); - const changes = getSelectedChanges(this.editor.getLineChanges(), selections); - const { original, modified } = this.editor.getModel(); - - const revertEdits = getChangeRevertEdits(original, modified, changes); - - if (revertEdits.length === 0) { - return TPromise.as(null); - } - - const confirm = { - message: nls.localize('confirmRevertMessage', "Are you sure you want to revert the selected changes?"), - detail: nls.localize('irreversible', "This action is irreversible!"), - primaryButton: nls.localize({ key: 'revertChangesLabel', comment: ['&& denotes a mnemonic'] }, "&&Revert Changes") - }; - - if (!this.messageService.confirm(confirm)) { - return TPromise.as(null); - } - - modified.pushEditOperations(selections, revertEdits, () => selections); - modified.pushStackElement(); - - return TPromise.wrap(null); - } - - private updateEnablement(): void { - this.enabled = this.isEnabled(); - } -} - -class FileEditorActionContributor extends baseeditor.EditorInputActionContributor { - private instantiationService: IInstantiationService; - - constructor( @IInstantiationService instantiationService: IInstantiationService) { - super(); - - this.instantiationService = instantiationService; - } - - public hasActionsForEditorInput(context: baseeditor.IEditorInputActionContext): boolean { - return context.input instanceof FileEditorInput; - } - - public getActionsForEditorInput(context: baseeditor.IEditorInputActionContext): baseeditor.IEditorInputAction[] { - return [this.instantiationService.createInstance(OpenInDiffAction)]; - } -} - -class GitEditorActionContributor extends baseeditor.EditorInputActionContributor { - private instantiationService: IInstantiationService; - - constructor( @IInstantiationService instantiationService: IInstantiationService) { - super(); - - this.instantiationService = instantiationService; - } - - public hasActionsForEditorInput(context: baseeditor.IEditorInputActionContext): boolean { - return gitei.isGitEditorInput(context.input); - } - - public getActionsForEditorInput(context: baseeditor.IEditorInputActionContext): baseeditor.IEditorInputAction[] { - return [this.instantiationService.createInstance(OpenInEditorAction)]; - } -} - -class GitWorkingTreeDiffEditorActionContributor extends baseeditor.EditorInputActionContributor { - private instantiationService: IInstantiationService; - - constructor( @IInstantiationService instantiationService: IInstantiationService) { - super(); - - this.instantiationService = instantiationService; - } - - public hasSecondaryActionsForEditorInput(context: baseeditor.IEditorInputActionContext): boolean { - return (context.input instanceof gitei.GitDiffEditorInput && context.editor instanceof tdeditor.TextDiffEditor); - } - - public getSecondaryActionsForEditorInput(context: baseeditor.IEditorInputActionContext): baseeditor.IEditorInputAction[] { - if (context.input instanceof gitei.GitIndexDiffEditorInput) { - return [this.instantiationService.createInstance(UnstageRangesAction, context.editor)]; - } - - return [ - this.instantiationService.createInstance(StageRangesAction, context.editor), - this.instantiationService.createInstance(RevertRangesAction, context.editor)]; - } -} - -class GlobalOpenChangeAction extends OpenChangeAction { - - static ID = 'workbench.action.git.globalOpenChange'; - static LABEL = nls.localize('openChange', "Open Change"); - - constructor( - id: string, - label: string, - @IWorkbenchEditorService editorService: IWorkbenchEditorService, - @IGitService gitService: IGitService, - @IWorkspaceContextService protected contextService: IWorkspaceContextService, - @IViewletService protected viewletService: IViewletService, - @IPartService protected partService: IPartService - ) { - super(editorService, gitService); - } - - public getInput(): WorkbenchEditorCommon.IFileEditorInput { - const input = this.editorService.getActiveEditorInput(); - if (input instanceof FileEditorInput) { - return input; - } - - return null; - } - - public run(context?: any): TPromise { - let input = this.getInput(); - - if (!input) { - return TPromise.as(null); - } - - let status = getStatus(this.gitService, this.contextService, input); - - if (!status) { - return TPromise.as(null); - } - - var sideBySide = !!(context && (context.ctrlKey || context.metaKey)); - var editor = this.editorService.getActiveEditor().getControl(); - var viewState = editor ? editor.saveViewState() : null; - - return this.gitService.getInput(status).then((input) => { - var promise = TPromise.as(null); - - if (this.partService.isVisible(Parts.SIDEBAR_PART)) { - promise = this.viewletService.openViewlet(gitcontrib.VIEWLET_ID, false); - } - - return promise.then(() => { - var options = new WorkbenchEditorCommon.TextDiffEditorOptions(); - options.forceOpen = true; - options.autoRevealFirstChange = false; - - return this.editorService.openEditor(input, options, sideBySide).then((editor) => { - if (viewState) { - var codeEditor = this.editorService.getActiveEditor().getControl(); - codeEditor.restoreViewState({ - original: { - cursorState: undefined, - viewState: undefined, - contributionsState: undefined - }, - modified: viewState - }); - } - }); - }); - }); - } -} - -class GlobalOpenInEditorAction extends OpenFileAction { - - static ID = 'workbench.action.git.globalOpenFile'; - static LABEL = nls.localize('openFile', "Open File"); - - constructor( - id = GlobalOpenInEditorAction.ID, - label = GlobalOpenInEditorAction.LABEL, - @IWorkbenchEditorService editorService: IWorkbenchEditorService, - @IFileService fileService: IFileService, - @IGitService gitService: IGitService, - @IWorkspaceContextService contextService: IWorkspaceContextService - ) { - super(editorService, fileService, gitService, contextService); - } - - public run(event?: any): TPromise { - let input = this.editorService.getActiveEditorInput(); - if (input instanceof diffei.DiffEditorInput) { - input = input.modifiedInput; - } - - if (!(input instanceof FileEditorInput)) { - return TPromise.as(null); - } - - const status = getStatus(this.gitService, this.contextService, input); - - if (!status) { - return TPromise.as(null); - } - - return super.run(status); - } -} - -if (!SCMPreview.enabled) { - var actionBarRegistry = platform.Registry.as(abr.Extensions.Actionbar); - actionBarRegistry.registerActionBarContributor(abr.Scope.EDITOR, FileEditorActionContributor); - actionBarRegistry.registerActionBarContributor(abr.Scope.EDITOR, GitEditorActionContributor); - actionBarRegistry.registerActionBarContributor(abr.Scope.EDITOR, GitWorkingTreeDiffEditorActionContributor); - - let workbenchActionRegistry = (platform.Registry.as(wbar.Extensions.WorkbenchActions)); - - // Register Actions - const category = nls.localize('git', "Git"); - workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(GlobalOpenChangeAction, GlobalOpenChangeAction.ID, GlobalOpenChangeAction.LABEL), 'Git: Open Change', category); - workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(GlobalOpenInEditorAction, GlobalOpenInEditorAction.ID, GlobalOpenInEditorAction.LABEL), 'Git: Open File', category); - workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(PullAction, PullAction.ID, PullAction.LABEL), 'Git: Pull', category); - workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(PullWithRebaseAction, PullWithRebaseAction.ID, PullWithRebaseAction.LABEL), 'Git: Pull (Rebase)', category); - workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(PushAction, PushAction.ID, PushAction.LABEL), 'Git: Push', category); - workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(PushToRemoteAction, PushToRemoteAction.ID, PushToRemoteAction.LABEL), 'Git: Push to...', category); - workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(SyncAction, SyncAction.ID, SyncAction.LABEL), 'Git: Sync', category); - workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(PublishAction, PublishAction.ID, PublishAction.LABEL), 'Git: Publish', category); - workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(StartGitBranchAction, StartGitBranchAction.ID, StartGitBranchAction.LABEL), 'Git: Branch', category); - workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(StartGitCheckoutAction, StartGitCheckoutAction.ID, StartGitCheckoutAction.LABEL), 'Git: Checkout', category); - workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(InputCommitAction, InputCommitAction.ID, InputCommitAction.LABEL), 'Git: Commit', category); - workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(UndoLastCommitAction, UndoLastCommitAction.ID, UndoLastCommitAction.LABEL), 'Git: Undo Last Commit', category); - workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(WorkbenchStageAction, WorkbenchStageAction.ID, WorkbenchStageAction.LABEL), 'Git: Stage', category); - workbenchActionRegistry.registerWorkbenchAction(new SyncActionDescriptor(WorkbenchUnstageAction, WorkbenchUnstageAction.ID, WorkbenchUnstageAction.LABEL), 'Git: Unstage', category); -} diff --git a/src/vs/workbench/parts/git/browser/gitActions.ts b/src/vs/workbench/parts/git/browser/gitActions.ts deleted file mode 100644 index 0b80d5e1663cc..0000000000000 --- a/src/vs/workbench/parts/git/browser/gitActions.ts +++ /dev/null @@ -1,1299 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { Promise, TPromise } from 'vs/base/common/winjs.base'; -import nls = require('vs/nls'); -import { IEventEmitter } from 'vs/base/common/eventEmitter'; -import { ITree } from 'vs/base/parts/tree/browser/tree'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { isString } from 'vs/base/common/types'; -import { Action } from 'vs/base/common/actions'; -import { IDiffEditor, ICodeEditor } from 'vs/editor/browser/editorBrowser'; -import model = require('vs/workbench/parts/git/common/gitModel'); -import inputs = require('vs/workbench/parts/git/browser/gitEditorInputs'); -import { TextDiffEditorOptions } from 'vs/workbench/common/editor'; -import errors = require('vs/base/common/errors'); -import platform = require('vs/base/common/platform'); -import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { IEditor } from 'vs/platform/editor/common/editor'; -import { IFileService, IFileStat } from 'vs/platform/files/common/files'; -import { IMessageService, IConfirmation, IChoiceService } from 'vs/platform/message/common/message'; -import Severity from 'vs/base/common/severity'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IGitService, IFileStatus, Status, StatusType, ServiceState, IModel, IBranch, GitErrorCodes, IGitConfiguration } from 'vs/workbench/parts/git/common/git'; -import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; -import paths = require('vs/base/common/paths'); -import URI from 'vs/base/common/uri'; -import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; - -function flatten(context?: any, preferFocus = false): IFileStatus[] { - if (!context) { - return context; - - } else if (Array.isArray(context)) { - if (context.some((c: any) => !(c instanceof model.FileStatus))) { - throw new Error('Invalid context.'); - } - return context; - - } else if (context instanceof model.FileStatus) { - return [context]; - - } else if (context instanceof model.StatusGroup) { - return (context).all(); - - } else if (context.tree) { - var elements = (context.tree).getSelection(); - return elements.indexOf(context.fileStatus) > -1 ? elements : [context.fileStatus]; - - } else if (context.selection) { - return !preferFocus && context.selection.indexOf(context.focus) > -1 ? context.selection : [context.focus]; - - } else { - throw new Error('Invalid context.'); - } -} - -export abstract class GitAction extends Action { - - protected gitService: IGitService; - protected toDispose: IDisposable[]; - - constructor(id: string, label: string, cssClass: string, gitService: IGitService) { - super(id, label, cssClass, false); - - this.gitService = gitService; - this.toDispose = [this.gitService.addBulkListener(() => this.onGitServiceChange())]; - this.onGitServiceChange(); - } - - protected onGitServiceChange(): void { - this.updateEnablement(); - } - - protected updateEnablement(): void { - this.enabled = this.isEnabled(); - } - - protected isEnabled(): boolean { - return !!this.gitService; - } - - public abstract run(e?: any): Promise; - - public dispose(): void { - this.gitService = null; - this.toDispose = dispose(this.toDispose); - - super.dispose(); - } -} - -export class OpenChangeAction extends GitAction { - - static ID = 'workbench.action.git.openChange'; - protected editorService: IWorkbenchEditorService; - - constructor( @IWorkbenchEditorService editorService: IWorkbenchEditorService, @IGitService gitService: IGitService) { - super(OpenChangeAction.ID, nls.localize('openChange', "Open Change"), 'git-action open-change', gitService); - this.editorService = editorService; - this.onGitServiceChange(); - } - - protected isEnabled(): boolean { - return super.isEnabled() && !!this.editorService; - } - - public run(context?: any): Promise { - var statuses = flatten(context, true); - - return this.gitService.getInput(statuses[0]).then((input) => { - var options = new TextDiffEditorOptions(); - - options.forceOpen = true; - - return this.editorService.openEditor(input, options); - }); - } -} - -export class OpenFileAction extends GitAction { - - private static DELETED_STATES = [Status.BOTH_DELETED, Status.DELETED, Status.DELETED_BY_US, Status.INDEX_DELETED]; - static ID = 'workbench.action.git.openFile'; - - protected fileService: IFileService; - protected editorService: IWorkbenchEditorService; - protected contextService: IWorkspaceContextService; - - constructor( @IWorkbenchEditorService editorService: IWorkbenchEditorService, @IFileService fileService: IFileService, @IGitService gitService: IGitService, @IWorkspaceContextService contextService: IWorkspaceContextService) { - super(OpenFileAction.ID, nls.localize('openFile', "Open File"), 'git-action open-file', gitService); - this.fileService = fileService; - this.editorService = editorService; - this.contextService = contextService; - this.onGitServiceChange(); - } - - protected isEnabled(): boolean { - return super.isEnabled() && !!this.editorService || !!this.fileService; - } - - private getPath(status: IFileStatus): string { - if (status.getStatus() === Status.INDEX_RENAMED) { - return status.getRename(); - } else { - var indexStatus = this.gitService.getModel().getStatus().find(status.getPath(), StatusType.INDEX); - - if (indexStatus && indexStatus.getStatus() === Status.INDEX_RENAMED) { - return status.getRename(); - } else { - return status.getPath(); - } - } - } - - public run(context?: any): Promise { - var statuses = flatten(context, true); - var status = statuses[0]; - - if (!(status instanceof model.FileStatus)) { - return Promise.wrapError(new Error('Can\'t open file.')); - } - - if (OpenFileAction.DELETED_STATES.indexOf(status.getStatus()) > -1) { - return Promise.wrapError(new Error('Can\'t open file which has been deleted.')); - } - - const resource = URI.file(paths.join(this.gitService.getModel().getRepositoryRoot(), this.getPath(status))); - - return this.fileService.resolveFile(resource) - .then(stat => this.editorService.openEditor({ - resource: stat.resource, - options: { forceOpen: true } - })); - } -} - -export class InitAction extends GitAction { - - static ID = 'workbench.action.git.init'; - - constructor( @IGitService gitService: IGitService) { - super(InitAction.ID, nls.localize('init', "Init"), 'git-action init', gitService); - } - - protected isEnabled(): boolean { - return super.isEnabled() && this.gitService.getState() === ServiceState.NotARepo; - } - - public run(): Promise { - return this.gitService.init(); - } -} - -export class RefreshAction extends GitAction { - - static ID = 'workbench.action.git.refresh'; - - constructor( @IGitService gitService: IGitService) { - super(RefreshAction.ID, nls.localize('refresh', "Refresh"), 'git-action refresh', gitService); - } - - public run(): Promise { - return this.gitService.status(); - } -} - -export abstract class BaseStageAction extends GitAction { - protected editorService: IWorkbenchEditorService; - - constructor(id: string, label: string, className: string, gitService: IGitService, editorService: IWorkbenchEditorService) { - super(id, label, className, gitService); - this.editorService = editorService; - } - - public run(context?: any): Promise { - var flatContext = flatten(context); - - return this.gitService.add(flatContext).then(status => { - var targetEditor = this.findGitWorkingTreeEditor(); - if (!targetEditor) { - return TPromise.as(status); - } - - var currentGitEditorInput = (targetEditor.input); - var currentFileStatus = currentGitEditorInput.getFileStatus(); - - if (flatContext && flatContext.every((f) => f !== currentFileStatus)) { - return TPromise.as(status); - } - - var path = currentGitEditorInput.getFileStatus().getPath(); - var fileStatus = status.getStatus().find(path, StatusType.INDEX); - - if (!fileStatus) { - return TPromise.as(status); - } - - var editorControl = targetEditor.getControl(); - var viewState = editorControl ? editorControl.saveViewState() : null; - - return this.gitService.getInput(fileStatus).then(input => { - var options = new TextDiffEditorOptions(); - options.forceOpen = true; - - return this.editorService.openEditor(input, options, targetEditor.position).then((editor) => { - if (viewState) { - editorControl.restoreViewState(viewState); - } - - return status; - }); - }); - }); - } - - private findGitWorkingTreeEditor(): IEditor { - var editors = this.editorService.getVisibleEditors(); - for (var i = 0; i < editors.length; i++) { - var editor = editors[i]; - if (inputs.isGitEditorInput(editor.input)) { - return editor; - } - } - - return null; - } - - public dispose(): void { - this.editorService = null; - - super.dispose(); - } -} - -export class StageAction extends BaseStageAction { - static ID = 'workbench.action.git.stage'; - static LABEL = nls.localize('stageChanges', "Stage"); - - constructor( - @IGitService gitService: IGitService, - @IWorkbenchEditorService editorService: IWorkbenchEditorService - ) { - super(StageAction.ID, StageAction.LABEL, 'git-action stage', gitService, editorService); - } -} - -export class GlobalStageAction extends BaseStageAction { - - static ID = 'workbench.action.git.stageAll'; - - constructor( @IGitService gitService: IGitService, @IWorkbenchEditorService editorService: IWorkbenchEditorService) { - super(GlobalStageAction.ID, nls.localize('stageAllChanges', "Stage All"), 'git-action stage', gitService, editorService); - } - - protected isEnabled(): boolean { - return super.isEnabled() && this.gitService.getModel().getStatus().getWorkingTreeStatus().all().length > 0; - } - - public run(context?: any): Promise { - return super.run(); - } -} - -export abstract class BaseUndoAction extends GitAction { - - private editorService: IWorkbenchEditorService; - private messageService: IMessageService; - private fileService: IFileService; - private contextService: IWorkspaceContextService; - - constructor(id: string, label: string, className: string, gitService: IGitService, messageService: IMessageService, fileService: IFileService, editorService: IWorkbenchEditorService, contextService: IWorkspaceContextService) { - super(id, label, className, gitService); - this.editorService = editorService; - this.messageService = messageService; - this.fileService = fileService; - this.contextService = contextService; - this.onGitServiceChange(); - } - - protected isEnabled(): boolean { - return super.isEnabled() && !!this.editorService && !!this.fileService; - } - - public run(context?: any): Promise { - if (!this.messageService.confirm(this.getConfirm(context))) { - return TPromise.as(null); - } - - var promises: Promise[] = []; - - if (context instanceof model.StatusGroup) { - promises = [this.gitService.undo()]; - - } else { - var all: IFileStatus[] = flatten(context); - var toClean: IFileStatus[] = []; - var toCheckout: IFileStatus[] = []; - - for (var i = 0; i < all.length; i++) { - var status = all[i].clone(); - - switch (status.getStatus()) { - case Status.UNTRACKED: - case Status.IGNORED: - toClean.push(status); - break; - - default: - toCheckout.push(status); - break; - } - } - - if (toClean.length > 0) { - promises.push(this.gitService.clean(toClean)); - } - - if (toCheckout.length > 0) { - promises.push(this.gitService.checkout('', toCheckout)); - } - } - - return Promise.join(promises).then((statuses: IModel[]) => { - if (statuses.length === 0) { - return TPromise.as(null); - } - - var status = statuses[statuses.length - 1]; - - var targetEditor = this.findWorkingTreeDiffEditor(); - if (!targetEditor) { - return TPromise.as(status); - } - - var currentGitEditorInput = targetEditor.input; - var currentFileStatus = currentGitEditorInput.getFileStatus(); - - if (all && all.every((f) => f !== currentFileStatus)) { - return TPromise.as(status); - } - - var path = currentGitEditorInput.getFileStatus().getPath(); - - var editor = targetEditor.getControl(); - var modifiedEditorControl = editor ? editor.getModifiedEditor() : null; - var modifiedViewState = modifiedEditorControl ? modifiedEditorControl.saveViewState() : null; - - return this.fileService.resolveFile(this.contextService.toResource(path)).then((stat: IFileStat) => { - return this.editorService.openEditor({ - resource: stat.resource, - options: { - forceOpen: true - } - }, targetEditor.position).then((editor) => { - if (modifiedViewState) { - var codeEditor = targetEditor.getControl(); - - if (codeEditor) { - codeEditor.restoreViewState(modifiedViewState); - } - } - }); - }); - }).then(null, (errors: any[]): Promise => { - console.error('One or more errors occurred', errors); - return Promise.wrapError(errors[0]); - }); - } - - private findWorkingTreeDiffEditor(): IEditor { - var editors = this.editorService.getVisibleEditors(); - for (var i = 0; i < editors.length; i++) { - var editor = editors[i]; - if (editor.input instanceof inputs.GitWorkingTreeDiffEditorInput) { - return editor; - } - } - - return null; - } - - private getConfirm(context: any): IConfirmation { - const all = flatten(context); - - if (all.length > 1) { - const count = all.length; - - return { - message: nls.localize('confirmUndoMessage', "Are you sure you want to clean all changes?"), - detail: count === 1 - ? nls.localize('confirmUndoAllOne', "There are unstaged changes in {0} file.\n\nThis action is irreversible!", count) - : nls.localize('confirmUndoAllMultiple', "There are unstaged changes in {0} files.\n\nThis action is irreversible!", count), - primaryButton: nls.localize({ key: 'cleanChangesLabel', comment: ['&& denotes a mnemonic'] }, "&&Clean Changes") - }; - } - - const label = all[0].getPathComponents().reverse()[0]; - - return { - message: nls.localize('confirmUndo', "Are you sure you want to clean changes in '{0}'?", label), - detail: nls.localize('irreversible', "This action is irreversible!"), - primaryButton: nls.localize({ key: 'cleanChangesLabel', comment: ['&& denotes a mnemonic'] }, "&&Clean Changes") - }; - } - - public dispose(): void { - this.editorService = null; - this.fileService = null; - - super.dispose(); - } -} - -export class UndoAction extends BaseUndoAction { - static ID = 'workbench.action.git.undo'; - constructor( @IGitService gitService: IGitService, @IMessageService messageService: IMessageService, @IFileService fileService: IFileService, @IWorkbenchEditorService editorService: IWorkbenchEditorService, @IWorkspaceContextService contextService: IWorkspaceContextService) { - super(UndoAction.ID, nls.localize('undoChanges', "Clean"), 'git-action undo', gitService, messageService, fileService, editorService, contextService); - } -} - -export class GlobalUndoAction extends BaseUndoAction { - - static ID = 'workbench.action.git.undoAll'; - - constructor( @IGitService gitService: IGitService, @IMessageService messageService: IMessageService, @IFileService fileService: IFileService, @IWorkbenchEditorService editorService: IWorkbenchEditorService, @IWorkspaceContextService contextService: IWorkspaceContextService) { - super(GlobalUndoAction.ID, nls.localize('undoAllChanges', "Clean All"), 'git-action undo', gitService, messageService, fileService, editorService, contextService); - } - - protected isEnabled(): boolean { - return super.isEnabled() && this.gitService.getModel().getStatus().getWorkingTreeStatus().all().length > 0; - } - - public run(context?: any): Promise { - return super.run(this.gitService.getModel().getStatus().getWorkingTreeStatus()); - } -} - -export abstract class BaseUnstageAction extends GitAction { - - protected editorService: IWorkbenchEditorService; - - constructor(id: string, label: string, className: string, gitService: IGitService, editorService: IWorkbenchEditorService) { - super(id, label, className, gitService); - this.editorService = editorService; - this.onGitServiceChange(); - } - - protected isEnabled(): boolean { - return super.isEnabled() && !!this.editorService; - } - - public run(context?: any): Promise { - var flatContext = flatten(context); - - return this.gitService.revertFiles('HEAD', flatContext).then((status: IModel) => { - var targetEditor = this.findGitIndexEditor(); - if (!targetEditor) { - return TPromise.as(status); - } - - var currentGitEditorInput = (targetEditor.input); - var currentFileStatus = currentGitEditorInput.getFileStatus(); - - if (flatContext && flatContext.every((f) => f !== currentFileStatus)) { - return TPromise.as(status); - } - - var path = currentGitEditorInput.getFileStatus().getPath(); - var fileStatus = status.getStatus().find(path, StatusType.WORKING_TREE); - - if (!fileStatus) { - return TPromise.as(status); - } - - var editorControl = targetEditor.getControl(); - var viewState = editorControl ? editorControl.saveViewState() : null; - - return this.gitService.getInput(fileStatus).then((input) => { - var options = new TextDiffEditorOptions(); - options.forceOpen = true; - - return this.editorService.openEditor(input, options, targetEditor.position).then((editor) => { - if (viewState) { - editorControl.restoreViewState(viewState); - } - - return status; - }); - }); - }); - } - - private findGitIndexEditor(): IEditor { - var editors = this.editorService.getVisibleEditors(); - for (var i = 0; i < editors.length; i++) { - var editor = editors[i]; - if (inputs.isGitEditorInput(editor.input)) { - return editor; - } - } - - return null; - } - - public dispose(): void { - this.editorService = null; - - super.dispose(); - } -} - -export class UnstageAction extends BaseUnstageAction { - static ID = 'workbench.action.git.unstage'; - static LABEL = nls.localize('unstage', "Unstage"); - - constructor( - @IGitService gitService: IGitService, - @IWorkbenchEditorService editorService: IWorkbenchEditorService - ) { - super(UnstageAction.ID, UnstageAction.LABEL, 'git-action unstage', gitService, editorService); - } -} - -export class GlobalUnstageAction extends BaseUnstageAction { - - static ID = 'workbench.action.git.unstageAll'; - - constructor( @IGitService gitService: IGitService, @IWorkbenchEditorService editorService: IWorkbenchEditorService) { - super(GlobalUnstageAction.ID, nls.localize('unstageAllChanges', "Unstage All"), 'git-action unstage', gitService, editorService); - } - - protected isEnabled(): boolean { - return super.isEnabled() && this.gitService.getModel().getStatus().getIndexStatus().all().length > 0; - } - - public run(context?: any): Promise { - return super.run(); - } -} - -enum LifecycleState { - Alive, - Disposing, - Disposed -} - -export class CheckoutAction extends GitAction { - - static ID = 'workbench.action.git.checkout'; - private editorService: IWorkbenchEditorService; - private branch: IBranch; - private HEAD: IBranch; - - private state: LifecycleState; - private runPromises: Promise[]; - - constructor(branch: IBranch, @IGitService gitService: IGitService, @IWorkbenchEditorService editorService: IWorkbenchEditorService) { - super(CheckoutAction.ID, branch.name, 'git-action checkout', gitService); - - this.editorService = editorService; - this.branch = branch; - this.HEAD = null; - this.state = LifecycleState.Alive; - this.runPromises = []; - this.onGitServiceChange(); - } - - protected onGitServiceChange(): void { - if (this.gitService.getState() === ServiceState.OK) { - this.HEAD = this.gitService.getModel().getHEAD(); - - if (this.HEAD && this.HEAD.name === this.branch.name) { - this.class = 'git-action checkout HEAD'; - } else { - this.class = 'git-action checkout'; - } - } - - super.onGitServiceChange(); - } - - protected isEnabled(): boolean { - return super.isEnabled() && !!this.HEAD; - } - - public run(context?: any): Promise { - if (this.state !== LifecycleState.Alive) { - return Promise.wrapError('action disposed'); - } else if (this.HEAD && this.HEAD.name === this.branch.name) { - return TPromise.as(null); - } - - var result = this.gitService.checkout(this.branch.name).then(null, (err) => { - if (err.gitErrorCode === GitErrorCodes.DirtyWorkTree) { - return Promise.wrapError(new Error(nls.localize('dirtyTreeCheckout', "Can't checkout. Please commit or stash your work first."))); - } - - return Promise.wrapError(err); - }); - - this.runPromises.push(result); - result.done(() => this.runPromises.splice(this.runPromises.indexOf(result), 1)); - - return result; - } - - public dispose(): void { - if (this.state !== LifecycleState.Alive) { - return; - } - - this.state = LifecycleState.Disposing; - Promise.join(this.runPromises).done(() => this.actuallyDispose()); - } - - private actuallyDispose(): void { - this.editorService = null; - this.branch = null; - this.HEAD = null; - - super.dispose(); - - this.state = LifecycleState.Disposed; - } -} - -export class BranchAction extends GitAction { - - static ID = 'workbench.action.git.branch'; - private checkout: boolean; - - constructor(checkout: boolean, @IGitService gitService: IGitService) { - super(BranchAction.ID, 'Branch', 'git-action checkout', gitService); - this.checkout = checkout; - } - - public run(context?: any): Promise { - if (!isString(context)) { - return TPromise.as(false); - } - - return this.gitService.branch(context, this.checkout); - } -} - -export interface ICommitState extends IEventEmitter { - getCommitMessage(): string; - onEmptyCommitMessage(): void; -} - -export abstract class BaseCommitAction extends GitAction { - protected commitState: ICommitState; - - constructor(commitState: ICommitState, id: string, label: string, cssClass: string, gitService: IGitService) { - super(id, label, cssClass, gitService); - - this.commitState = commitState; - - this.toDispose.push(commitState.addListener('change/commitInputBox', () => { - this.updateEnablement(); - })); - - this.onGitServiceChange(); - } - - protected isEnabled(): boolean { - return super.isEnabled() && this.gitService.getModel().getStatus().getIndexStatus().all().length > 0; - } - - public run(context?: any): Promise { - if (!this.commitState.getCommitMessage()) { - this.commitState.onEmptyCommitMessage(); - return TPromise.as(null); - } - - return this.commit(); - } - - protected abstract commit(): Promise; -} - -export class CommitAction extends BaseCommitAction { - - static ID = 'workbench.action.git.commit'; - - constructor(commitState: ICommitState, @IGitService gitService: IGitService) { - super(commitState, CommitAction.ID, nls.localize('commitStaged', "Commit Staged"), 'git-action commit', gitService); - } - - protected commit(): Promise { - return this.gitService.commit(this.commitState.getCommitMessage()); - } -} - -export class CommitAmendAction extends BaseCommitAction { - - static ID = 'workbench.action.git.commitAmend'; - - constructor(commitState: ICommitState, @IGitService gitService: IGitService) { - super(commitState, CommitAction.ID, nls.localize('commitStagedAmend', "Commit Staged (Amend)"), 'git-action commit-amend', gitService); - } - - protected commit(): Promise { - return this.gitService.commit(this.commitState.getCommitMessage(), true); - } -} - -export class CommitSignedOffAction extends BaseCommitAction { - - static ID = 'workbench.action.git.commitSignedOff'; - - constructor(commitState: ICommitState, @IGitService gitService: IGitService) { - super(commitState, CommitAction.ID, nls.localize('commitStagedSignedOff', "Commit Staged (Signed Off)"), 'git-action commit-signed-off', gitService); - } - - protected commit(): Promise { - return this.gitService.commit(this.commitState.getCommitMessage(), undefined, undefined, true); - } -} - -export class InputCommitAction extends GitAction { - - static ID = 'workbench.action.git.input-commit'; - static LABEL = nls.localize('commit', "Commit"); - - constructor( - id = InputCommitAction.ID, - label = InputCommitAction.LABEL, - @IGitService gitService: IGitService, - @IQuickOpenService private quickOpenService: IQuickOpenService - ) { - super(id, label, '', gitService); - } - - protected isEnabled(): boolean { - if (!this.gitService) { - return false; - } - - if (!this.gitService.isIdle()) { - return false; - } - - const status = this.gitService.getModel().getStatus(); - - return status.getIndexStatus().all().length > 0 || status.getWorkingTreeStatus().all().length > 0; - } - - run(): TPromise { - if (!this.enabled) { - return TPromise.as(null); - } - - const status = this.gitService.getModel().getStatus(); - - return this.quickOpenService.input({ prompt: nls.localize('commitMessage', "Commit Message") }) - .then(message => message && this.gitService.commit(message, false, status.getIndexStatus().all().length === 0)); - } -} - -export class StageAndCommitAction extends BaseCommitAction { - - static ID = 'workbench.action.git.stageAndCommit'; - static LABEL = nls.localize('commitAll', "Commit All"); - static CSSCLASS = 'git-action stage-and-commit'; - - constructor( - commitState: ICommitState, - id: string = StageAndCommitAction.ID, - label: string = StageAndCommitAction.LABEL, - cssClass: string = StageAndCommitAction.CSSCLASS, - @IGitService gitService: IGitService - ) { - super(commitState, id, label, cssClass, gitService); - } - - protected isEnabled(): boolean { - if (!this.gitService) { - return false; - } - - if (!this.gitService.isIdle()) { - return false; - } - - var status = this.gitService.getModel().getStatus(); - - return status.getIndexStatus().all().length > 0 - || status.getWorkingTreeStatus().all().length > 0; - } - - protected commit(): Promise { - return this.gitService.commit(this.commitState.getCommitMessage(), false, true); - } -} - -export class StageAndCommitSignedOffAction extends StageAndCommitAction { - - static ID = 'workbench.action.git.stageAndCommitSignedOff'; - - constructor(commitState: ICommitState, @IGitService gitService: IGitService) { - super(commitState, StageAndCommitAction.ID, nls.localize('commitAllSignedOff', "Commit All (Signed Off)"), 'git-action stage-and-commit-signed-off', gitService); - } - - protected commit(): Promise { - return this.gitService.commit(this.commitState.getCommitMessage(), false, true, true); - } -} - -export class SmartCommitAction extends BaseCommitAction { - - static ID = 'workbench.action.git.commitAll'; - private static ALL = nls.localize('commitAll2', "Commit All"); - private static STAGED = nls.localize('commitStaged2', "Commit Staged"); - - private messageService: IMessageService; - - constructor(commitState: ICommitState, @IGitService gitService: IGitService, @IMessageService messageService: IMessageService) { - super(commitState, SmartCommitAction.ID, SmartCommitAction.ALL, 'git-action smart-commit', gitService); - this.messageService = messageService; - this.onGitServiceChange(); - } - - protected onGitServiceChange(): void { - super.onGitServiceChange(); - - if (!this.enabled) { - this.label = SmartCommitAction.ALL; - return; - } - - var status = this.gitService.getModel().getStatus(); - - if (status.getIndexStatus().all().length > 0) { - this.label = SmartCommitAction.STAGED; - } else { - this.label = SmartCommitAction.ALL; - } - - this.label += ' (' + (platform.isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter') + ')'; - } - - protected isEnabled(): boolean { - if (!this.gitService) { - return false; - } - - if (!this.gitService.isIdle()) { - return false; - } - - var status = this.gitService.getModel().getStatus(); - - return status.getIndexStatus().all().length > 0 - || status.getWorkingTreeStatus().all().length > 0; - } - - protected commit(): Promise { - const status = this.gitService.getModel().getStatus(); - return this.gitService.commit(this.commitState.getCommitMessage(), false, status.getIndexStatus().all().length === 0); - } -} - -export class PullAction extends GitAction { - - static ID = 'workbench.action.git.pull'; - static LABEL = 'Pull'; - - constructor( - id = PullAction.ID, - label = PullAction.LABEL, - @IGitService gitService: IGitService - ) { - super(id, label, 'git-action pull', gitService); - } - - protected isEnabled(): boolean { - if (!super.isEnabled()) { - return false; - } - - if (!this.gitService.isIdle()) { - return false; - } - - var model = this.gitService.getModel(); - var HEAD = model.getHEAD(); - - if (!HEAD || !HEAD.name || !HEAD.upstream) { - return false; - } - - return true; - } - - public run(context?: any): Promise { - return this.pull(); - } - - protected pull(rebase = false): Promise { - return this.gitService.pull(rebase).then(null, (err) => { - if (err.gitErrorCode === GitErrorCodes.DirtyWorkTree) { - return Promise.wrapError(errors.create(nls.localize('dirtyTreePull', "Can't pull. Please commit or stash your work first."), { severity: Severity.Warning })); - } else if (err.gitErrorCode === GitErrorCodes.AuthenticationFailed) { - return Promise.wrapError(errors.create(nls.localize('authFailed', "Authentication failed on the git remote."))); - } - - return Promise.wrapError(err); - }); - } -} - -export class PullWithRebaseAction extends PullAction { - - static ID = 'workbench.action.git.pull.rebase'; - static LABEL = 'Pull (Rebase)'; - - constructor( - id = PullWithRebaseAction.ID, - label = PullWithRebaseAction.LABEL, - @IGitService gitService: IGitService - ) { - super(id, label, gitService); - } - - public run(context?: any): Promise { - return this.pull(true); - } -} - -export class PushAction extends GitAction { - - static ID = 'workbench.action.git.push'; - static LABEL = 'Push'; - - constructor( - id: string = PushAction.ID, - label: string = PushAction.LABEL, - @IGitService gitService: IGitService - ) { - super(id, label, 'git-action push', gitService); - } - - protected isEnabled(): boolean { - if (!super.isEnabled()) { - return false; - } - - if (!this.gitService.isIdle()) { - return false; - } - - var model = this.gitService.getModel(); - var HEAD = model.getHEAD(); - - if (!HEAD || !HEAD.name || !HEAD.upstream) { - return false; - } - - if (!HEAD.ahead) { // no commits to pull or push - return false; - } - - return true; - } - - public run(context?: any): Promise { - return this.gitService.push().then(null, (err) => { - if (err.gitErrorCode === GitErrorCodes.AuthenticationFailed) { - return Promise.wrapError(errors.create(nls.localize('authFailed', "Authentication failed on the git remote."))); - } - - return Promise.wrapError(err); - }); - } -} - -export class PushToRemoteAction extends GitAction { - - static ID = 'workbench.action.git.pushToRemote'; - static LABEL = nls.localize('pushToRemote', "Push to..."); - - constructor( - id: string = PushToRemoteAction.ID, - label: string = PushToRemoteAction.LABEL, - @IGitService gitService: IGitService, - @IQuickOpenService private quickOpenService: IQuickOpenService - ) { - super(id, label, 'git-action publish', gitService); - } - - protected isEnabled(): boolean { - if (!super.isEnabled()) { - return false; - } - - if (!this.gitService.isIdle()) { - return false; - } - - const model = this.gitService.getModel(); - - if (model.getRemotes().length === 0) { - return false; - } - - const HEAD = model.getHEAD(); - - if (!HEAD || !HEAD.name) { - return false; - } - - return true; - } - - public run(context?: any): Promise { - const model = this.gitService.getModel(); - const remotes = model.getRemotes(); - const branchName = model.getHEAD().name; - const picks = remotes.map(({ name, url }) => ({ label: name, description: url })); - const placeHolder = nls.localize('pushToRemotePickMessage', "Pick a remote to push the branch '{0}' to:", branchName); - - return this.quickOpenService.pick(picks, { placeHolder }) - .then(pick => pick && pick.label) - .then(remote => remote && this.gitService.push(remote, branchName)) - .then(null, err => { - if (err.gitErrorCode === GitErrorCodes.AuthenticationFailed) { - return Promise.wrapError(errors.create(nls.localize('authFailed', "Authentication failed on the git remote."))); - } - - return Promise.wrapError(err); - }); - } -} - -export class PublishAction extends GitAction { - - static ID = 'workbench.action.git.publish'; - static LABEL = nls.localize('publish', "Publish"); - - constructor( - id: string = PublishAction.ID, - label: string = PublishAction.LABEL, - @IGitService gitService: IGitService, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IMessageService private messageService: IMessageService - ) { - super(id, label, 'git-action publish', gitService); - } - - protected isEnabled(): boolean { - if (!super.isEnabled()) { - return false; - } - - if (!this.gitService.isIdle()) { - return false; - } - - const model = this.gitService.getModel(); - - if (model.getRemotes().length === 0) { - return false; - } - - const HEAD = model.getHEAD(); - - if (!HEAD || !HEAD.name || HEAD.upstream) { - return false; - } - - return true; - } - - public run(context?: any): Promise { - const model = this.gitService.getModel(); - const remotes = model.getRemotes(); - const branchName = model.getHEAD().name; - let promise: TPromise; - - if (remotes.length === 1) { - const remoteName = remotes[0].name; - - const result = this.messageService.confirm({ - message: nls.localize('confirmPublishMessage', "Are you sure you want to publish '{0}' to '{1}'?", branchName, remoteName), - primaryButton: nls.localize({ key: 'confirmPublishMessageButton', comment: ['&& denotes a mnemonic'] }, "&&Publish") - }); - - promise = TPromise.as(result ? remoteName : null); - } else { - const picks = remotes.map(({ name, url }) => ({ - label: name, - description: url - })); - - const placeHolder = nls.localize('publishPickMessage', "Pick a remote to publish the branch '{0}' to:", branchName); - - promise = this.quickOpenService.pick(picks, { placeHolder }) - .then(pick => pick && pick.label); - } - - return promise - .then(remote => remote && this.gitService.push(remote, branchName, { setUpstream: true })) - .then(null, err => { - if (err.gitErrorCode === GitErrorCodes.AuthenticationFailed) { - return Promise.wrapError(errors.create(nls.localize('authFailed', "Authentication failed on the git remote."))); - } - - return Promise.wrapError(err); - }); - } -} - -export class SyncAction extends GitAction { - - static ID = 'workbench.action.git.sync'; - static LABEL = 'Sync'; - - constructor(id: string, label: string, - @IGitService gitService: IGitService, - @IConfigurationService private configurationService: IConfigurationService, - @IConfigurationEditingService private configurationEditingService: IConfigurationEditingService, - @IChoiceService private choiceService: IChoiceService - ) { - super(id, label, 'git-action sync', gitService); - } - - protected isEnabled(): boolean { - if (!super.isEnabled()) { - return false; - } - - if (!this.gitService.isIdle()) { - return false; - } - - var model = this.gitService.getModel(); - var HEAD = model.getHEAD(); - - if (!HEAD || !HEAD.name || !HEAD.upstream) { - return false; - } - - return true; - } - - public run(context?: any): Promise { - if (!this.enabled) { - return TPromise.as(null); - } - - const shouldPrompt = this.configurationService.getConfiguration('git').confirmSync; - - if (!shouldPrompt) { - return this.sync(); - } - - - const model = this.gitService.getModel(); - const HEAD = model.getHEAD(); - const message = nls.localize('sync is unpredictable', "This action will push and pull commits to and from '{0}'.", HEAD.upstream); - const options = [nls.localize('ok', "OK"), nls.localize('cancel', "Cancel"), nls.localize('never again', "OK, Never Show Again")]; - - return this.choiceService.choose(Severity.Warning, message, options, 1).then(choice => { - switch (choice) { - case 0: - return this.sync(); - case 1: - return TPromise.as(null); - case 2: - return this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: 'git.confirmSync', value: false }) - .then(() => this.sync()); - default: - return TPromise.as(null); - } - }); - } - - private sync(): TPromise { - return this.gitService.sync().then(null, (err) => { - if (err.gitErrorCode === GitErrorCodes.AuthenticationFailed) { - return Promise.wrapError(errors.create(nls.localize('authFailed', "Authentication failed on the git remote."))); - } - - return Promise.wrapError(err); - }); - } -} - -export class UndoLastCommitAction extends GitAction { - - static ID = 'workbench.action.git.undoLastCommit'; - static LABEL = nls.localize('undoLastCommit', "Undo Last Commit"); - - constructor( - id = UndoLastCommitAction.ID, - label = UndoLastCommitAction.LABEL, - @IGitService gitService: IGitService - ) { - super(UndoLastCommitAction.ID, UndoLastCommitAction.LABEL, 'git-action undo-last-commit', gitService); - } - - protected isEnabled(): boolean { - if (!super.isEnabled()) { - return false; - } - - if (!this.gitService.isIdle()) { - return false; - } - - const model = this.gitService.getModel(); - const HEAD = model.getHEAD(); - - return !!(HEAD && HEAD.commit); - } - - public run(): Promise { - return this.gitService.reset('HEAD~'); - } -} - -export class StartGitCheckoutAction extends Action { - - public static ID = 'workbench.action.git.startGitCheckout'; - public static LABEL = 'Checkout'; - private quickOpenService: IQuickOpenService; - - constructor(id: string, label: string, @IQuickOpenService quickOpenService: IQuickOpenService) { - super(id, label); - this.quickOpenService = quickOpenService; - } - - public run(event?: any): Promise { - this.quickOpenService.show('git checkout '); - return TPromise.as(null); - } -} - -export class StartGitBranchAction extends Action { - - public static ID = 'workbench.action.git.startGitBranch'; - public static LABEL = 'Branch'; - private quickOpenService: IQuickOpenService; - - constructor(id: string, label: string, @IQuickOpenService quickOpenService: IQuickOpenService) { - super(id, label); - this.quickOpenService = quickOpenService; - } - - public run(event?: any): Promise { - this.quickOpenService.show('git branch '); - return TPromise.as(null); - } -} diff --git a/src/vs/workbench/parts/git/browser/gitEditorContributions.ts b/src/vs/workbench/parts/git/browser/gitEditorContributions.ts deleted file mode 100644 index c303f0d05eb19..0000000000000 --- a/src/vs/workbench/parts/git/browser/gitEditorContributions.ts +++ /dev/null @@ -1,181 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; -import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; -import { IModel, IModelDeltaDecoration, IModelDecorationOptions, OverviewRulerLane, IEditorContribution, TrackedRangeStickiness } from 'vs/editor/common/editorCommon'; -import { IGitService, ModelEvents, StatusType } from 'vs/workbench/parts/git/common/git'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { Disposable } from 'vs/base/common/lifecycle'; -import { Delayer } from 'vs/base/common/async'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import SCMPreview from 'vs/workbench/parts/scm/browser/scmPreview'; - -const pattern = /^<<<<<<<|^=======|^>>>>>>>/; - -function decorate(model: IModel): IModelDeltaDecoration[] { - const options = MergeDecorator.DECORATION_OPTIONS; - - return model.getLinesContent() - .map((line, i) => pattern.test(line) ? i : null) - .filter(i => i !== null) - .map(i => ({ startLineNumber: i + 1, startColumn: 1, endLineNumber: i + 1, endColumn: 1 })) - .map(range => ({ range, options })); -} - -class MergeDecoratorBoundToModel extends Disposable { - - private decorations: string[]; - - constructor( - private editor: ICodeEditor, - private model: IModel, - private filePath: string, - private gitService: IGitService - ) { - super(); - - this.decorations = []; - - const delayer = new Delayer(300); - delayer.trigger(() => this.redecorate()); - - const gitModel = gitService.getModel(); - this._register(model.onDidChangeContent(() => delayer.trigger(() => this.redecorate()))); - this._register(gitModel.addListener(ModelEvents.STATUS_MODEL_UPDATED, () => delayer.trigger(() => this.redecorate()))); - } - - private _setDecorations(newDecorations: IModelDeltaDecoration[]): void { - this.decorations = this.editor.deltaDecorations(this.decorations, newDecorations); - } - - private redecorate(): void { - if (this.model.isDisposed()) { - return; - } - - const gitModel = this.gitService.getModel(); - - if (!gitModel) { - return; - } - - const mergeStatus = gitModel.getStatus().find(this.filePath, StatusType.MERGE); - - if (!mergeStatus) { - return; - } - - this._setDecorations(decorate(this.model)); - } - - dispose(): void { - this._setDecorations([]); - super.dispose(); - } -} - -export class MergeDecorator extends Disposable implements IEditorContribution { - - static ID = 'vs.git.editor.merge.decorator'; - - static DECORATION_OPTIONS: IModelDecorationOptions = { - className: 'git-merge-control-decoration', - isWholeLine: true, - overviewRuler: { - color: 'rgb(197, 118, 0)', - darkColor: 'rgb(197, 118, 0)', - position: OverviewRulerLane.Left - }, - stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges - }; - - private mergeDecorator: MergeDecoratorBoundToModel; - - constructor( - private editor: ICodeEditor, - @IGitService private gitService: IGitService, - @IWorkspaceContextService private contextService: IWorkspaceContextService - ) { - super(); - - this._register(this.editor.onDidChangeModel(() => this.onModelChanged())); - this.mergeDecorator = null; - } - - getId(): string { - return MergeDecorator.ID; - } - - private onModelChanged(): void { - if (this.mergeDecorator) { - this.mergeDecorator.dispose(); - this.mergeDecorator = null; - } - - if (!this.contextService || !this.gitService) { - return; - } - - const model = this.editor.getModel(); - if (!model) { - return; - } - - const resource = model.uri; - if (!resource) { - return; - } - - const path = this.contextService.toWorkspaceRelativePath(resource); - if (!path) { - return; - } - - this.mergeDecorator = new MergeDecoratorBoundToModel(this.editor, model, path, this.gitService); - } - - dispose(): void { - if (this.mergeDecorator) { - this.mergeDecorator.dispose(); - this.mergeDecorator = null; - } - - super.dispose(); - } -} - -// TODO@Joao: remove -@editorContribution -export class MergeDecoratorWrapper extends Disposable implements IEditorContribution { - - static ID = 'vs.git.editor.merge.decoratorwrapper'; - private decorator: MergeDecorator; - - constructor( - private editor: ICodeEditor, - @IInstantiationService instantiationService: IInstantiationService - ) { - super(); - - if (SCMPreview.enabled) { - return; - } - - this.decorator = instantiationService.createInstance(MergeDecorator, editor); - } - - getId(): string { - return MergeDecoratorWrapper.ID; - } - - dispose(): void { - if (this.decorator) { - this.decorator.dispose(); - this.decorator = null; - } - } -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/gitEditorInputs.ts b/src/vs/workbench/parts/git/browser/gitEditorInputs.ts deleted file mode 100644 index 3cc7c790f50b7..0000000000000 --- a/src/vs/workbench/parts/git/browser/gitEditorInputs.ts +++ /dev/null @@ -1,160 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import winjs = require('vs/base/common/winjs.base'); -import lifecycle = require('vs/base/common/lifecycle'); -import async = require('vs/base/common/async'); -import WorkbenchEditorCommon = require('vs/workbench/common/editor'); -import stringei = require('vs/workbench/common/editor/stringEditorInput'); -import diffei = require('vs/workbench/common/editor/diffEditorInput'); -import git = require('vs/workbench/parts/git/common/git'); -import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { IEditorInput } from 'vs/platform/editor/common/editor'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; - -import IGitService = git.IGitService; - -export interface IEditorInputWithStatus { - getFileStatus(): git.IFileStatus; -} - -export function isGitEditorInput(input: IEditorInput): boolean { - return input instanceof GitDiffEditorInput || input instanceof NativeGitIndexStringEditorInput; -} - -export class GitDiffEditorInput - extends diffei.DiffEditorInput - implements IEditorInputWithStatus { - private status: git.IFileStatus; - - constructor(name: string, description: string, originalInput: WorkbenchEditorCommon.EditorInput, modifiedInput: WorkbenchEditorCommon.EditorInput, status: git.IFileStatus) { - super(name, description, originalInput, modifiedInput); - - this.status = status; - } - - public getFileStatus(): git.IFileStatus { - return this.status; - } - - public contains(otherInput: any): boolean { - if (this.matches(otherInput)) { - return true; - } - - var originalInput = this.originalInput; - if (originalInput && originalInput.matches(otherInput)) { - return true; - } - - var modifiedInput = this.modifiedInput; - if (modifiedInput && modifiedInput.matches(otherInput)) { - return true; - } - - return false; - } -} - -export class GitWorkingTreeDiffEditorInput extends GitDiffEditorInput { - - static ID = 'vs.git.workingTreeDiffInput'; - - constructor(name: string, description: string, originalInput: WorkbenchEditorCommon.EditorInput, modifiedInput: WorkbenchEditorCommon.EditorInput, status: git.IFileStatus) { - super(name, description, originalInput, modifiedInput, status); - } - - public getTypeId(): string { - return GitWorkingTreeDiffEditorInput.ID; - } -} - -export class GitIndexDiffEditorInput extends GitDiffEditorInput { - - static ID: string = 'vs.git.indexDiffInput'; - - constructor(name: string, description: string, originalInput: WorkbenchEditorCommon.EditorInput, modifiedInput: WorkbenchEditorCommon.EditorInput, status: git.IFileStatus) { - super(name, description, originalInput, modifiedInput, status); - } - - public getTypeId(): string { - return GitIndexDiffEditorInput.ID; - } -} - -export class NativeGitIndexStringEditorInput - extends stringei.StringEditorInput - implements IEditorInputWithStatus { - public static ID = 'vs.git.stringEditorInput'; - - private gitService: IGitService; - private editorService: IWorkbenchEditorService; - private status: git.IFileStatus; - private path: string; - private treeish: string; - private delayer: async.ThrottledDelayer; - private toDispose: lifecycle.IDisposable[]; - - constructor(name: any, description: string, mime: string, status: git.IFileStatus, path: string, treeish: string, - @IGitService gitService: IGitService, - @IWorkbenchEditorService editorService: IWorkbenchEditorService, - @IInstantiationService instantiationService: IInstantiationService - ) { - super(name, description, null, mime, false, instantiationService); - - this.gitService = gitService; - this.editorService = editorService; - this.status = status; - this.path = path; - this.treeish = treeish; - this.delayer = new async.ThrottledDelayer(1000); - - this.toDispose = []; - this.toDispose.push(this.gitService.addListener(git.ServiceEvents.STATE_CHANGED, () => this.onGitServiceStateChange())); - this.toDispose.push(this.gitService.addListener(git.ServiceEvents.OPERATION_END, () => this.onGitServiceStateChange())); - } - - public getTypeId(): string { - return NativeGitIndexStringEditorInput.ID; - } - - public getFileStatus(): git.IFileStatus { - return this.status; - } - - public resolve(refresh?: boolean): winjs.TPromise { - if (refresh || !this.getValue()) { - return this.gitService.buffer(this.path, this.treeish).then(contents => { - if (this.getValue() !== contents) { - this.setValue(contents); - } - - return super.resolve(refresh); - }); - } else { - return super.resolve(refresh); - } - } - - private onGitServiceStateChange(): void { - var isVisible = this.editorService.isVisible(this, true); - if (!isVisible) { - return; - } - - this.delayer.trigger(() => this.resolve(true)); - } - - public dispose(): void { - if (this.delayer) { - this.delayer.cancel(); - this.delayer = null; - } - - this.toDispose = lifecycle.dispose(this.toDispose); - super.dispose(); - } -} diff --git a/src/vs/workbench/parts/git/browser/gitOperations.ts b/src/vs/workbench/parts/git/browser/gitOperations.ts deleted file mode 100644 index 669c5a923206e..0000000000000 --- a/src/vs/workbench/parts/git/browser/gitOperations.ts +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { IGitOperation, IRawStatus } from 'vs/workbench/parts/git/common/git'; -import { TPromise } from 'vs/base/common/winjs.base'; - -export class GitOperation implements IGitOperation { - - id: string; - - constructor(id: string, private fn: () => TPromise) { - this.id = id; - } - - run(): TPromise { - return this.fn(); - } - - dispose(): void { - // noop - } -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/gitOutput.ts b/src/vs/workbench/parts/git/browser/gitOutput.ts deleted file mode 100644 index f760e2e3d3340..0000000000000 --- a/src/vs/workbench/parts/git/browser/gitOutput.ts +++ /dev/null @@ -1,42 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { IGitService, ServiceEvents } from 'vs/workbench/parts/git/common/git'; -import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; -import { IOutputService } from 'vs/workbench/parts/output/common/output'; - -export class GitOutput implements IWorkbenchContribution { - - static ID = 'vs.git.output'; - - private outputListener: IDisposable; - private gitService: IGitService; - private outputService: IOutputService; - - constructor( @IGitService gitService: IGitService, @IOutputService outputService: IOutputService) { - this.gitService = gitService; - this.outputService = outputService; - - const listener = gitService.addListener(ServiceEvents.OPERATION_START, () => { - this.outputListener = this.gitService.onOutput(output => this.onOutput(output)); - listener.dispose(); - }); - } - - getId(): string { - return GitOutput.ID; - } - - private onOutput(output: string): void { - this.outputService.getChannel('Git').append(output); - } - - dispose(): void { - this.outputListener = dispose(this.outputListener); - } -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/gitQuickOpen.ts b/src/vs/workbench/parts/git/browser/gitQuickOpen.ts deleted file mode 100644 index bbe0a035bac18..0000000000000 --- a/src/vs/workbench/parts/git/browser/gitQuickOpen.ts +++ /dev/null @@ -1,271 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { localize } from 'vs/nls'; -import { matchesContiguousSubString } from 'vs/base/common/filters'; -import { TPromise } from 'vs/base/common/winjs.base'; -import Severity from 'vs/base/common/severity'; -import { IGitService, RefType, IRef, IGitConfiguration } from 'vs/workbench/parts/git/common/git'; -import { ICommand, CommandQuickOpenHandler } from 'vs/workbench/browser/quickopen'; -import { Mode } from 'vs/base/parts/quickopen/common/quickOpen'; -import { QuickOpenEntry, IHighlight, IContext, QuickOpenEntryGroup } from 'vs/base/parts/quickopen/browser/quickOpenModel'; -import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; -import { IMessageService } from 'vs/platform/message/common/message'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; - -class AbstractRefEntry extends QuickOpenEntry { - - protected gitService: IGitService; - protected messageService: IMessageService; - protected ref: IRef; - - constructor(gitService: IGitService, messageService: IMessageService, ref: IRef, highlights: IHighlight[]) { - super(highlights); - - this.gitService = gitService; - this.messageService = messageService; - this.ref = ref; - } - - getIcon(): string { return 'git'; } - getLabel(): string { return this.ref.name; } - getDescription(): string { return ''; } - getAriaLabel(): string { return localize('refAriaLabel', "{0}, git", this.getLabel()); } - - run(mode: Mode, context: IContext): boolean { - if (mode === Mode.PREVIEW) { - return false; - } - - return true; - } -} - -class CheckoutHeadEntry extends AbstractRefEntry { - - getDescription(): string { return localize('checkoutBranch', "Branch at {0}", this.ref.commit.substr(0, 8)); } - - run(mode: Mode, context: IContext): boolean { - if (mode === Mode.PREVIEW) { - return false; - } - - this.gitService.checkout(this.ref.name).done(null, e => this.messageService.show(Severity.Error, e)); - return true; - } -} - -class CheckoutRemoteHeadEntry extends AbstractRefEntry { - - getDescription(): string { return localize('checkoutRemoteBranch', "Remote branch at {0}", this.ref.commit.substr(0, 8)); } - - run(mode: Mode, context: IContext): boolean { - if (mode === Mode.PREVIEW) { - return false; - } - - const match = /^[^/]+\/(.*)$/.exec(this.ref.name); - const name = match ? match[1] : this.ref.name; - - this.gitService.checkout(name).done(null, e => this.messageService.show(Severity.Error, e)); - return true; - } -} - -class CheckoutTagEntry extends AbstractRefEntry { - - getDescription(): string { return localize('checkoutTag', "Tag at {0}", this.ref.commit.substr(0, 8)); } - - run(mode: Mode, context: IContext): boolean { - if (mode === Mode.PREVIEW) { - return false; - } - - this.gitService.checkout(this.ref.name).done(null, e => this.messageService.show(Severity.Error, e)); - return true; - } -} - -class CurrentHeadEntry extends AbstractRefEntry { - getDescription(): string { return localize('alreadyCheckedOut', "Branch {0} is already the current branch", this.ref.name); } -} - -class BranchEntry extends QuickOpenEntry { - - private gitService: IGitService; - private messageService: IMessageService; - private name: string; - - constructor(gitService: IGitService, messageService: IMessageService, name: string) { - super([{ start: 0, end: name.length }]); - - this.gitService = gitService; - this.messageService = messageService; - - // sanitize name - this.name = name.replace(/^\.|\/\.|\.\.|~|\^|:|\/$|\.lock$|\.lock\/|\\|\*|\s|^\s*$|\.$/g, '-'); - } - - getIcon(): string { return 'git'; } - getLabel(): string { return this.name; } - getAriaLabel(): string { return localize({ key: 'branchAriaLabel', comment: ['the branch name'] }, "{0}, git branch", this.getLabel()); } - getDescription(): string { return localize('createBranch', "Create branch {0}", this.name); } - - run(mode: Mode, context: IContext): boolean { - if (mode === Mode.PREVIEW) { - return false; - } - - this.gitService.branch(this.name, true).done(null, e => this.messageService.show(Severity.Error, e)); - return true; - } -} - -// Commands - -class CheckoutCommand implements ICommand { - - aliases = ['checkout', 'co']; - icon = 'git'; - - constructor(private gitService: IGitService, private messageService: IMessageService, private configurationService: IConfigurationService) { - // noop - } - - getResults(input: string): TPromise { - input = input.trim(); - - const config = this.configurationService.getConfiguration('git'); - const checkoutType = config.checkoutType; - const includeTags = checkoutType === 'all' || checkoutType === 'tags'; - const includeRemotes = checkoutType === 'all' || checkoutType === 'remote'; - - const gitModel = this.gitService.getModel(); - const currentHead = gitModel.getHEAD(); - const refs = gitModel.getRefs(); - const heads = refs.filter(ref => ref.type === RefType.Head); - const tags = includeTags ? refs.filter(ref => ref.type === RefType.Tag) : []; - const remoteHeads = includeRemotes ? refs.filter(ref => ref.type === RefType.RemoteHead) : []; - - const headMatches = heads - .map(head => ({ head, highlights: matchesContiguousSubString(input, head.name) })) - .filter(({ highlights }) => !!highlights); - - const headEntries: QuickOpenEntry[] = headMatches - .filter(({ head }) => head.name !== currentHead.name) - .map(({ head, highlights }) => new CheckoutHeadEntry(this.gitService, this.messageService, head, highlights)); - - const tagMatches = tags - .map(head => ({ head, highlights: matchesContiguousSubString(input, head.name) })) - .filter(({ highlights }) => !!highlights); - - const tagEntries = tagMatches - .filter(({ head }) => head.name !== currentHead.name) - .map(({ head, highlights }) => new CheckoutTagEntry(this.gitService, this.messageService, head, highlights)); - - const checkoutEntries = headEntries - .concat(tagEntries) - .sort((a, b) => a.getLabel().localeCompare(b.getLabel())); - - const remoteHeadMatches = remoteHeads - .map(head => ({ head, highlights: matchesContiguousSubString(input, head.name) })) - .filter(({ highlights }) => !!highlights); - - const remoteHeadEntries: QuickOpenEntry[] = remoteHeadMatches - .filter(({ head }) => head.name !== currentHead.name) - .map(({ head, highlights }) => new CheckoutRemoteHeadEntry(this.gitService, this.messageService, head, highlights)) - .sort((a, b) => a.getLabel().localeCompare(b.getLabel())); - - if (checkoutEntries.length > 0) { - checkoutEntries[0] = new QuickOpenEntryGroup(checkoutEntries[0], 'checkout', false); - } - - if (remoteHeadEntries.length > 0) { - remoteHeadEntries[0] = new QuickOpenEntryGroup(remoteHeadEntries[0], 'checkout remote', checkoutEntries.length > 0); - } - - const entries = checkoutEntries - .sort((a, b) => a.getLabel().localeCompare(b.getLabel())) - .concat(remoteHeadEntries); - - const allMatches = headMatches.concat(tagMatches).concat(remoteHeadMatches); - const exactMatches = allMatches.filter(({ head }) => head.name === input); - const currentHeadMatches = exactMatches.filter(({ head }) => head.name === currentHead.name); - - if (currentHeadMatches.length > 0) { - entries.unshift(new CurrentHeadEntry(this.gitService, this.messageService, currentHeadMatches[0].head, currentHeadMatches[0].highlights)); - - } else if (exactMatches.length === 0 && input) { - const branchEntry = new BranchEntry(this.gitService, this.messageService, input); - entries.push(new QuickOpenEntryGroup(branchEntry, 'branch', checkoutEntries.length > 0 || remoteHeadEntries.length > 0)); - } - - return TPromise.as(entries); - } - - getEmptyLabel(input: string): string { - return localize('noBranches', "No other branches"); - } -} - -class BranchCommand implements ICommand { - - aliases = ['branch']; - icon = 'git'; - - constructor(private gitService: IGitService, private messageService: IMessageService) { - // noop - } - - getResults(input: string): TPromise { - input = input.trim(); - - if (!input) { - return TPromise.as([]); - } - - const gitModel = this.gitService.getModel(); - const currentHead = gitModel.getHEAD(); - - const matches = gitModel.getRefs() - .map(head => ({ head, highlights: matchesContiguousSubString(input, head.name) })) - .filter(({ highlights }) => !!highlights); - - const exactMatches = matches.filter(({ head }) => head.name === input); - const headMatches = exactMatches.filter(({ head }) => head.name === currentHead.name); - - if (headMatches.length > 0) { - return TPromise.as([new CurrentHeadEntry(this.gitService, this.messageService, headMatches[0].head, headMatches[0].highlights)]); - } else if (exactMatches.length > 0) { - return TPromise.as([new CheckoutHeadEntry(this.gitService, this.messageService, exactMatches[0].head, exactMatches[0].highlights)]); - } - - const branchEntry = new BranchEntry(this.gitService, this.messageService, input); - return TPromise.as([new QuickOpenEntryGroup(branchEntry, 'branch', false)]); - } - - getEmptyLabel(input: string): string { - return localize('notValidBranchName', "Please provide a valid branch name"); - } -} - -export class GitCommandQuickOpenHandler extends CommandQuickOpenHandler { - - constructor( - @IQuickOpenService quickOpenService: IQuickOpenService, - @IGitService gitService: IGitService, - @IMessageService messageService: IMessageService, - @IConfigurationService configurationService: IConfigurationService - ) { - super(quickOpenService, { - prefix: 'git', - commands: [ - new CheckoutCommand(gitService, messageService, configurationService), - new BranchCommand(gitService, messageService) - ] - }); - } -} diff --git a/src/vs/workbench/parts/git/browser/gitScm.ts b/src/vs/workbench/parts/git/browser/gitScm.ts deleted file mode 100644 index b0c345413e4a7..0000000000000 --- a/src/vs/workbench/parts/git/browser/gitScm.ts +++ /dev/null @@ -1,125 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import Event, { Emitter } from 'vs/base/common/event'; -import { dispose } from 'vs/base/common/lifecycle'; -import URI from 'vs/base/common/uri'; -import { IModel } from 'vs/editor/common/editorCommon'; -import { ISCMService, ISCMProvider, ISCMResource, ISCMResourceGroup } from 'vs/workbench/services/scm/common/scm'; -import { ITextModelResolverService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; -import { IModelService } from 'vs/editor/common/services/modelService'; -import { Throttler } from 'vs/base/common/async'; -import * as paths from 'vs/base/common/paths'; -import { IGitService, StatusType, ServiceEvents, ServiceOperations, ServiceState } from 'vs/workbench/parts/git/common/git'; -import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; - -// TODO@Joao: remove -export class GitSCMProvider implements IWorkbenchContribution, ISCMProvider, ITextModelContentProvider { - - get id() { return 'git-internal'; } - get label() { return 'Git'; } - get resources() { return []; } - - private _onDidChange = new Emitter(); - get onDidChange(): Event { - return this._onDidChange.event; - } - - constructor( - @ITextModelResolverService textModelResolverService: ITextModelResolverService, - @IModelService private modelService: IModelService, - @IGitService private gitService: IGitService, - @ISCMService scmService: ISCMService - ) { - scmService.registerSCMProvider(this); - textModelResolverService.registerTextModelContentProvider('git', this); - } - - getId(): string { - return 'git.contentprovider'; - } - - open(uri: ISCMResource): TPromise { - return TPromise.wrapError('not implemented'); - } - - acceptChanges(): TPromise { - return TPromise.wrapError('not implemented'); - } - - drag(from: ISCMResource, to: ISCMResourceGroup): TPromise { - return TPromise.wrapError('not implemented'); - } - - getOriginalResource(uri: URI): TPromise { - if (uri.scheme !== 'file') { - return TPromise.as(null); - } - - return TPromise.as(uri.with({ scheme: 'git' })); - } - - provideTextContent(uri: URI): TPromise { - const model = this.modelService.createModel('', null, uri); - const throttler = new Throttler(); - - const setModelContents = contents => { - if (model.isDisposed()) { - return; - } - - model.setValue(contents || ''); - }; - - const updateModel = () => { - const gitModel = this.gitService.getModel(); - const root = gitModel.getRepositoryRoot(); - - if (!root) { - return TPromise.as(null); - } - - const path = uri.fsPath; - const relativePath = paths.relative(root, path).replace(/\\/g, '/'); - - if (/^\.\./.test(relativePath)) { - return TPromise.as(null); - } - - const treeish = gitModel.getStatus().find(relativePath, StatusType.INDEX) ? '~' : 'HEAD'; - - return this.gitService.buffer(path, treeish).then(setModelContents); - }; - - const triggerModelUpdate = () => { - if (this.gitService.getState() !== ServiceState.OK) { - return; - } - - throttler.queue(updateModel); - }; - - const disposables = [ - this.gitService.addListener(ServiceEvents.STATE_CHANGED, triggerModelUpdate), - this.gitService.addListener(ServiceEvents.OPERATION_END, e => { - if (e.operation.id !== ServiceOperations.BACKGROUND_FETCH) { - triggerModelUpdate(); - } - }) - ]; - - model.onWillDispose(() => dispose(disposables)); - triggerModelUpdate(); - - return TPromise.as(model); - } - - dispose(): void { - - } -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/gitServices.ts b/src/vs/workbench/parts/git/browser/gitServices.ts deleted file mode 100644 index f494f7ef3b45e..0000000000000 --- a/src/vs/workbench/parts/git/browser/gitServices.ts +++ /dev/null @@ -1,908 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { localize } from 'vs/nls'; -import * as platform from 'vs/base/common/platform'; -import { TPromise } from 'vs/base/common/winjs.base'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { Action } from 'vs/base/common/actions'; -import { isPromiseCanceledError, create as createError } from 'vs/base/common/errors'; -import * as mime from 'vs/base/common/mime'; -import * as paths from 'vs/base/common/paths'; -import Event, { once } from 'vs/base/common/event'; -import { EventEmitter } from 'vs/base/common/eventEmitter'; -import { EditorInput } from 'vs/workbench/common/editor'; -import { - IFileStatus, IGitServiceError, GitErrorCodes, Status, StatusType, AutoFetcherState, IGitConfiguration, IAutoFetcher, ServiceEvents, ServiceState, - IModel, IGitOperation, IRawGitService, IGitService, RawServiceState, ServiceOperations, IPushOptions, ICommit, IRawStatus -} from 'vs/workbench/parts/git/common/git'; -import { Model } from 'vs/workbench/parts/git/common/gitModel'; -import { NativeGitIndexStringEditorInput, GitIndexDiffEditorInput, GitWorkingTreeDiffEditorInput, GitDiffEditorInput } from 'vs/workbench/parts/git/browser/gitEditorInputs'; -import { GitOperation } from 'vs/workbench/parts/git/browser/gitOperations'; -import { TextFileModelChangeEvent, ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; -import { IFileService, FileChangesEvent, FileChangeType } from 'vs/platform/files/common/files'; -import { ThrottledDelayer, PeriodThrottledDelayer } from 'vs/base/common/async'; -import severity from 'vs/base/common/severity'; -import { IOutputService } from 'vs/workbench/parts/output/common/output'; -import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IMessageService, CloseAction } from 'vs/platform/message/common/message'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; -import URI from 'vs/base/common/uri'; -import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; -import { domEvent } from 'vs/base/browser/event'; -import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; - -function toReadablePath(path: string): string { - if (!platform.isWindows) { - return path; - } - - return path.replace(/\//g, '\\'); -} - -class EditorInputCache { - private gitService: GitService; - private fileService: IFileService; - private instantiationService: IInstantiationService; - private editorService: IWorkbenchEditorService; - private editorGroupService: IEditorGroupService; - private contextService: IWorkspaceContextService; - private cache: { [key: string]: TPromise }; - private toDispose: IDisposable[]; - - constructor(gitService: GitService, - @IInstantiationService instantiationService: IInstantiationService, - @IFileService fileService: IFileService, - @IWorkbenchEditorService editorService: IWorkbenchEditorService, - @IEditorGroupService editorGroupService: IEditorGroupService, - @IWorkspaceContextService contextService: IWorkspaceContextService - ) { - this.instantiationService = instantiationService; - this.fileService = fileService; - this.editorService = editorService; - this.editorGroupService = editorGroupService; - this.contextService = contextService; - - this.gitService = gitService; - - this.cache = {}; - this.toDispose = []; - - this.toDispose.push(this.gitService.getModel().addListener('fileStatus:dispose', (fileStatus: IFileStatus) => this.onFileStatusDispose(fileStatus))); - } - - getInput(status: IFileStatus): TPromise { - var result = this.cache[status.getId()]; - - if (result) { - return result; - } - - result = this.createInput(status); - this.cache[status.getId()] = result; - return result; - } - - private createInput(status: IFileStatus): TPromise { - return TPromise.join([this.createLeftInput(status), this.createRightInput(status)]).then((result) => { - var leftInput = result[0]; - var rightInput = result[1]; - - var fileSegment: string; - var folderSegment: string; - - if (status.getStatus() === Status.INDEX_RENAMED) { - let pathComponents = status.getRename().split('/'); - fileSegment = pathComponents[pathComponents.length - 1]; - folderSegment = toReadablePath(pathComponents.slice(0, pathComponents.length - 1).join('/')); - } else { - let pathComponents = status.getPathComponents(); - fileSegment = pathComponents[pathComponents.length - 1]; - folderSegment = toReadablePath(pathComponents.slice(0, pathComponents.length - 1).join('/')); - } - - if (!leftInput) { - if (!rightInput) { - var error = new Error(localize('cantOpen', "Can't open this git resource.")); - (error).gitErrorCode = GitErrorCodes.CantOpenResource; - return TPromise.wrapError(error); - } - - return TPromise.as(rightInput); - } - - switch (status.getStatus()) { - case Status.INDEX_MODIFIED: - return TPromise.as(new GitIndexDiffEditorInput(localize('gitIndexChanges', "{0} (index) ↔ {1}", fileSegment, fileSegment), localize('gitIndexChangesDesc', "{0} - Changes on index", folderSegment), leftInput, rightInput, status)); - case Status.INDEX_RENAMED: - return TPromise.as(new GitIndexDiffEditorInput(localize('gitIndexChangesRenamed', "{0} ← {1}", status.getRename(), status.getPath()), localize('gitIndexChangesRenamedDesc', "{0} - Renamed - Changes on index", folderSegment), leftInput, rightInput, status)); - case Status.MODIFIED: - return TPromise.as(new GitWorkingTreeDiffEditorInput(localize('workingTreeChanges', "{0} (HEAD) ↔ {1}", fileSegment, fileSegment), localize('workingTreeChangesDesc', "{0} - Changes on working tree", folderSegment), leftInput, rightInput, status)); - default: - return TPromise.as(new GitDiffEditorInput(localize('gitMergeChanges', "{0} (merge) ↔ {1}", fileSegment, fileSegment), localize('gitMergeChangesDesc', "{0} - Merge changes", folderSegment), leftInput, rightInput, status)); - } - }).then((editorInput: EditorInput) => { - const onceDispose = once(editorInput.onDispose); - onceDispose(() => { - delete this.cache[status.getId()]; - }); - - return editorInput; - }, (errs) => { - return TPromise.wrapError(Array.isArray(errs) ? errs[0] || errs[1] : errs); - }); - } - - private createLeftInput(status: IFileStatus): TPromise { - var path = status.getPath(); - var model = this.gitService.getModel(); - - switch (status.getStatus()) { - case Status.INDEX_MODIFIED: - case Status.INDEX_RENAMED: - return this.gitService.show(path, status, 'HEAD', status.getMimetype()); - - case Status.MODIFIED: - var indexStatus = model.getStatus().find(path, StatusType.INDEX); - - if (indexStatus && indexStatus.getStatus() === Status.INDEX_RENAMED) { - return this.gitService.show(indexStatus.getRename(), status, '~', status.getMimetype()); - } - - if (indexStatus) { - return this.gitService.show(path, status, '~', status.getMimetype()); - } - - return this.gitService.show(path, status, 'HEAD', status.getMimetype()); - - default: - return TPromise.as(null); - } - } - - private createRightInput(status: IFileStatus): TPromise { - const model = this.gitService.getModel(); - const path = status.getPath(); - let resource = URI.file(paths.join(model.getRepositoryRoot(), path)); - - switch (status.getStatus()) { - case Status.INDEX_MODIFIED: - case Status.INDEX_ADDED: - case Status.INDEX_COPIED: - return this.gitService.show(path, status, '~', status.getMimetype()); - - case Status.INDEX_RENAMED: - return this.gitService.show(status.getRename(), status, '~', status.getMimetype()); - - case Status.INDEX_DELETED: - case Status.DELETED: - return this.gitService.show(path, status, 'HEAD', status.getMimetype()); - - case Status.MODIFIED: - case Status.UNTRACKED: - case Status.IGNORED: - var indexStatus = model.getStatus().find(path, StatusType.INDEX); - - if (indexStatus && indexStatus.getStatus() === Status.INDEX_RENAMED) { - resource = URI.file(paths.join(model.getRepositoryRoot(), indexStatus.getRename())); - } - - return TPromise.as(this.editorService.createInput({ resource }) as EditorInput); - - case Status.BOTH_MODIFIED: - return TPromise.as(this.editorService.createInput({ resource }) as EditorInput); - - default: - return TPromise.as(null); - } - } - - private onFileStatusDispose(fileStatus: IFileStatus): void { - var id = fileStatus.getId(); - var editorInputPromise = this.cache[id]; - - if (editorInputPromise) { - editorInputPromise.done((editorInput) => { this.eventuallyDispose(editorInput); }); - } - } - - /** - * If the disposed status is the same as this input's status, we must try to dispose the input. - * But we should not do it while the input is still open. This method will eventually call dispose - * when the editor input goes out of the visible editors. - */ - private eventuallyDispose(editorInput: EditorInput): void { - if (!this.maybeDispose(editorInput)) { - var listener = this.editorGroupService.onEditorsChanged(() => { - if (this.maybeDispose(editorInput)) { - listener.dispose(); - } - }); - } - } - - private maybeDispose(editorInput: EditorInput): boolean { - if (!editorInput.isDirty() && !this.editorService.getVisibleEditors().some((editor) => editor.input && editor.input.matches(editorInput))) { - editorInput.dispose(); - return true; - } - - return false; - } - - dispose(): void { - Object.keys(this.cache).forEach(key => { - this.cache[key].done((editorInput) => { editorInput.dispose(); }); - delete this.cache[key]; - }); - - this.toDispose = dispose(this.toDispose); - } -} - -export class AutoFetcher implements IAutoFetcher, IDisposable { - private static MIN_TIMEOUT = 2 * 60 * 1000; // every two minutes - private static MAX_TIMEOUT = 5 * 60 * 1000; // every five minutes - - private _state: AutoFetcherState; - private gitService: GitService; - private messageService: IMessageService; - private configurationService: IConfigurationService; - private instantiationService: IInstantiationService; - private currentRequest: TPromise; - private timeout: number; - private toDispose: IDisposable[]; - private gitServiceStateDisposable: IDisposable; - - constructor(gitService: GitService, // gitService passed as argument, not by injection - @IMessageService messageService: IMessageService, - @IWorkbenchEditorService editorService: IWorkbenchEditorService, - @IConfigurationService configurationService: IConfigurationService, - @IInstantiationService instantiationService: IInstantiationService - ) { - this._state = AutoFetcherState.Disabled; - this.gitService = gitService; - this.messageService = messageService; - this.configurationService = configurationService; - this.instantiationService = instantiationService; - this.currentRequest = null; - this.timeout = AutoFetcher.MIN_TIMEOUT; - - this.toDispose = []; - this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfiguration(e.config.git))); - this.onConfiguration(configurationService.getConfiguration('git')); - } - - get state(): AutoFetcherState { - return this._state; - } - - private onConfiguration(config: IGitConfiguration): void { - if (config.autofetch === false) { - this.disable(); - } else { - this.enable(); - } - } - - enable(): void { - if (this._state !== AutoFetcherState.Disabled) { - return; - } - - this.gitServiceStateDisposable = this.gitService.addListener(ServiceEvents.STATE_CHANGED, (e) => this.onGitServiceStateChange(e)); - this._state = AutoFetcherState.Active; - this.onGitServiceStateChange(this.gitService.getState()); - } - - disable(): void { - if (this.gitServiceStateDisposable) { - this.gitServiceStateDisposable.dispose(); - this.gitServiceStateDisposable = null; - } - - this.deactivate(); - this._state = AutoFetcherState.Disabled; - } - - private onGitServiceStateChange(state: ServiceState): void { - if (state === ServiceState.OK) { - this.activate(); - } else { - this.deactivate(); - } - } - - activate(): void { - if (this.currentRequest) { - this.currentRequest.cancel(); - } - - this._state = AutoFetcherState.Active; - this.loop(); - } - - deactivate(): void { - if (!this.currentRequest) { - return; - } - - this._state = AutoFetcherState.Inactive; - this.currentRequest.cancel(); - this.currentRequest = null; - } - - private loop(): void { - this._state = AutoFetcherState.Fetching; - - const model = this.gitService.getModel(); - const remotes = model ? model.getRemotes() : []; - - if (remotes.length === 0) { - this.timeout = AutoFetcher.MIN_TIMEOUT; - this.currentRequest = TPromise.as(null); - } else { - this.currentRequest = this.gitService.fetch().then(() => { - this.timeout = AutoFetcher.MIN_TIMEOUT; - }, (err) => { - if (isPromiseCanceledError(err)) { - return TPromise.wrapError(err); - } else if (err.gitErrorCode === GitErrorCodes.AuthenticationFailed) { - return TPromise.wrapError(err); - } else { - this.timeout = Math.min(Math.round(this.timeout * 1.2), AutoFetcher.MAX_TIMEOUT); // backoff - } - return undefined; - }); - } - - this.currentRequest.then(() => { - this._state = AutoFetcherState.Active; - this.currentRequest = TPromise.timeout(this.timeout); - return this.currentRequest; - }).then(() => this.loop(), (err) => this.deactivate()); - } - - dispose(): void { - this.disable(); - } -} - -const IgnoreOldGitStorageKey = 'settings.workspace.git.ignoreOld'; - -export class GitService extends EventEmitter - implements - IGitService { - - _serviceBrand: any; - - private contextService: IWorkspaceContextService; - private messageService: IMessageService; - private textFileService: ITextFileService; - private instantiationService: IInstantiationService; - private editorService: IWorkbenchEditorService; - private lifecycleService: ILifecycleService; - private outputService: IOutputService; - protected raw: IRawGitService; - - private state: ServiceState; - private operations: IGitOperation[]; - private model: IModel; - private inputCache: EditorInputCache; - private toDispose: IDisposable[]; - private needsRefresh: boolean; - private statusDelayer: ThrottledDelayer; - private reactiveStatusDelayer: PeriodThrottledDelayer; - private autoFetcher: AutoFetcher; - private isStatusPending = false; - - private _allowHugeRepositories: boolean; - get allowHugeRepositories(): boolean { return this._allowHugeRepositories; } - set allowHugeRepositories(value: boolean) { - this._allowHugeRepositories = value; - - if (value && this.state === ServiceState.Huge) { - this.transition(ServiceState.OK); - } - } - - get onOutput(): Event { return this.raw.onOutput; } - - constructor( - raw: IRawGitService, - @IInstantiationService instantiationService: IInstantiationService, - @IFileService private fileService: IFileService, - @IMessageService messageService: IMessageService, - @IWorkbenchEditorService editorService: IWorkbenchEditorService, - @IOutputService outputService: IOutputService, - @ITextFileService textFileService: ITextFileService, - @IWorkspaceContextService contextService: IWorkspaceContextService, - @ILifecycleService lifecycleService: ILifecycleService, - @IStorageService storageService: IStorageService, - @IConfigurationService private configurationService: IConfigurationService - ) { - super(); - - this.instantiationService = instantiationService; - this.messageService = messageService; - this.editorService = editorService; - this.textFileService = textFileService; - this.outputService = outputService; - this.contextService = contextService; - this.lifecycleService = lifecycleService; - - this.raw = raw; - this.state = ServiceState.NotInitialized; - this.operations = []; - this.model = new Model(); - this.toDispose = []; - - this.needsRefresh = false; - this.statusDelayer = new ThrottledDelayer(500); - this.reactiveStatusDelayer = new PeriodThrottledDelayer(500, 10000); - this.autoFetcher = this.instantiationService.createInstance(AutoFetcher, this); - this._allowHugeRepositories = false; - - this.registerListeners(); - - this.inputCache = this.instantiationService.createInstance(EditorInputCache, this); - - this.triggerAutoStatus(true); // trigger initial status - - if (!storageService.getBoolean(IgnoreOldGitStorageKey, StorageScope.GLOBAL, false)) { - this.raw.serviceState().done(state => { - if (state !== RawServiceState.OK) { - return undefined; - } - - return this.raw.getVersion().then(version => { - const match = /^(\d+)\.\d+\.\d+/.exec(version || ''); - const major = match && parseInt(match[1]); - - if (major && major < 2) { - messageService.show(severity.Warning, { - message: localize('updateGit', "You seem to have git {0} installed. Code works best with git >=2.0.0.", version), - actions: [ - new Action('downloadLatest', localize('download', "Download"), '', true, () => { - window.open('https://git-scm.com/'); - return null; - }), - new Action('neverShowAgain', localize('neverShowAgain', "Don't show again"), null, true, () => { - storageService.store(IgnoreOldGitStorageKey, true, StorageScope.GLOBAL); - return null; - }), - CloseAction - ] - }); - } - }); - }); - } - } - - private registerListeners(): void { - this.toDispose.push(this.fileService.onFileChanges((e) => this.onFileChanges(e))); - this.toDispose.push(this.textFileService.models.onModelSaved((e) => this.onTextFileChange(e))); - this.toDispose.push(this.textFileService.models.onModelReverted((e) => this.onTextFileChange(e))); - this.toDispose.push(this.configurationService.onDidUpdateConfiguration(() => { - if (this._allowHugeRepositories) { - return; - } - - const config = this.configurationService.getConfiguration('git'); - this._allowHugeRepositories = config.allowLargeRepositories; - - if (this._allowHugeRepositories) { - this.triggerAutoStatus(); - } - })); - this.lifecycleService.onShutdown(this.dispose, this); - - const focusEvent = domEvent(window, 'focus'); - this.toDispose.push(focusEvent(() => { - if (this.isStatusPending) { - this.triggerAutoStatus(); - } - })); - } - - private onTextFileChange(e: TextFileModelChangeEvent): void { - var shouldTriggerStatus = paths.basename(e.resource.fsPath) === '.gitignore'; - - if (!shouldTriggerStatus) { - return; - } - - this.triggerAutoStatus(); - } - - private onFileChanges(e: FileChangesEvent): void { - var isIdle = this.isIdle(); - - var shouldTriggerStatus = e.changes.some(c => { - var workspacePath = this.contextService.toWorkspaceRelativePath(c.resource); - if (!workspacePath) { - return false; // ignore out of workspace files - } - - // for .gitindex, the service must be idle - if ('.git/index' === workspacePath) { - return isIdle; - } - - // for anything other that .git* - if (!/^\.git/.test(workspacePath)) { - return true; - } - - // added or deleted .git folder - if (workspacePath === '.git') { - return c.type === FileChangeType.ADDED || c.type === FileChangeType.DELETED; - } - - return ['.git/index.lock', '.git/FETCH_HEAD', '.gitignore', '.gitmodules'].indexOf(workspacePath) === -1; - }); - - if (!shouldTriggerStatus) { - return; - } - - this.triggerAutoStatus(); - } - - private onGitServiceOperationEnd(e: { operation: IGitOperation; }): void { - if (e.operation.id === ServiceOperations.COMMAND) { - this.triggerAutoStatus(); - } - } - - getState(): ServiceState { - return this.state; - } - - getModel(): IModel { - return this.model; - } - - status(): TPromise { - return this.statusDelayer.trigger(() => this._status()); - } - - private _status(): TPromise { - const config = this.configurationService.getConfiguration('git'); - - if (this._allowHugeRepositories || config.allowLargeRepositories) { - return this.run(ServiceOperations.STATUS, () => this.raw.status()); - } - - if (this.state === ServiceState.Huge) { - return TPromise.as(this.model); - } - - return this.raw.statusCount().then(count => { - if (count > 5000 && !this._allowHugeRepositories) { - this.transition(ServiceState.Huge); - return TPromise.as(this.model); - } - - return this.run(ServiceOperations.STATUS, () => this.raw.status()); - }); - } - - private triggerAutoStatus(force = false): void { - this.isStatusPending = true; - - if (!document.hasFocus() && !force) { - return; - } - - this.isStatusPending = false; - - const config = this.configurationService.getConfiguration('git'); - - if (!config.autorefresh) { - return; - } - - this.reactiveStatusDelayer.trigger(() => this.status()).done(null, e => { - if (isPromiseCanceledError(e)) { - return; - } - - this.messageService.show(severity.Error, e); - }); - } - - init(): TPromise { - return this.run(ServiceOperations.INIT, () => this.raw.init()); - } - - add(files?: IFileStatus[]): TPromise { - return this.run(ServiceOperations.ADD, () => this.raw.add(GitService.toPaths(files))); - } - - stage(filePath: string, content: string): TPromise { - return this.run(ServiceOperations.STAGE, () => this.raw.stage(filePath, content)); - } - - branch(name: string, checkout: boolean = false): TPromise { - return this.run(ServiceOperations.BRANCH, () => this.raw.branch(name, checkout)); - } - - checkout(treeish: string = '', files: IFileStatus[] = null): TPromise { - return this.run(ServiceOperations.CHECKOUT, () => this.raw.checkout(treeish, GitService.toPaths(files))); - } - - clean(files: IFileStatus[]): TPromise { - return this.run(ServiceOperations.CLEAN, () => this.raw.clean(files.map((s) => s.getPath()))); - } - - undo(): TPromise { - return this.run(ServiceOperations.UNDO, () => this.raw.undo()); - } - - reset(treeish: string, hard?: boolean): TPromise { - return this.run(ServiceOperations.RESET, () => this.raw.reset(treeish, hard)); - } - - revertFiles(treeish: string, files?: IFileStatus[]): TPromise { - return this.run(ServiceOperations.REVERT, () => this.raw.revertFiles(treeish, (files || []).map((s) => s.getPath()))); - } - - fetch(): TPromise { - return this.run(ServiceOperations.BACKGROUND_FETCH, () => this.raw.fetch()); - } - - pull(rebase?: boolean): TPromise { - return this.run(ServiceOperations.PULL, () => this.raw.pull(rebase)); - } - - push(remote?: string, name?: string, options?: IPushOptions): TPromise { - return this.run(ServiceOperations.PUSH, () => this.raw.push(remote, name, options)); - } - - sync(rebase?: boolean): TPromise { - const head = this.model.getHEAD(); - const isAhead = head && head.upstream && !!head.ahead; - - if (!isAhead) { - return this.run(ServiceOperations.SYNC, () => this.raw.pull(rebase)); - } else { - return this.run(ServiceOperations.SYNC, () => this.raw.sync()); - } - } - - commit(message: string, amend: boolean = false, stage: boolean = false, signoff: boolean = false): TPromise { - return this.run(ServiceOperations.COMMIT, () => this.raw.commit(message, amend, stage, signoff)); - } - - getCommitTemplate(): TPromise { - return this.raw.getCommitTemplate(); - } - - getCommit(ref: string): TPromise { - return this.raw.getCommit(ref); - } - - detectMimetypes(path: string, treeish: string = '~'): TPromise { - return this.raw.detectMimetypes(path, treeish); - } - - clone(url: string, parentPath: string): TPromise { - return this.raw.clone(url, parentPath) - .then(null, e => this.wrapGitError(e)); - } - - private run(operationId: string, fn: () => TPromise): TPromise { - return this.raw.serviceState().then(state => { - if (state === RawServiceState.GitNotFound) { - this.transition(ServiceState.NoGit); - return TPromise.as(null); - } else if (state === RawServiceState.Disabled) { - this.transition(ServiceState.Disabled); - return TPromise.as(null); - } else { - return this._run(operationId, fn); - } - }); - } - - private _run(operationId: string, fn: () => TPromise): TPromise { - var operation = new GitOperation(operationId, fn); - - this.operations.push(operation); - this.emit(ServiceEvents.OPERATION_START, operation); - this.emit(ServiceEvents.OPERATION, operation); - - var onDone = (error: any = null) => { - var index = this.operations.indexOf(operation); - - if (index > -1) { - this.operations.splice(index, 1); - } - - var e = { operation: operation, error: error }; - this.emit(ServiceEvents.OPERATION_END, e); - this.onGitServiceOperationEnd(e); - this.emit(ServiceEvents.OPERATION, operation); - }; - - return operation.run().then((status: IRawStatus) => { - this.model.update(status); - - onDone(); - - if (status) { - this.transition(status.state === null || status.state === undefined ? ServiceState.OK : status.state); - } else { - this.transition(ServiceState.NotARepo); - } - - return this.model; - }, (e) => { - onDone(e); - - if (isPromiseCanceledError(e)) { - return TPromise.wrapError(e); - } - - var gitErrorCode: string = e.gitErrorCode || null; - - if (gitErrorCode === GitErrorCodes.NotAtRepositoryRoot) { - this.transition(ServiceState.NotAtRepoRoot); - return TPromise.as(this.model); - } - - this.emit(ServiceEvents.ERROR, e); - this.transition(ServiceState.OK); - - if (gitErrorCode === GitErrorCodes.NoUserNameConfigured || gitErrorCode === GitErrorCodes.NoUserEmailConfigured) { - this.messageService.show(severity.Warning, localize('configureUsernameEmail', "Please configure your git user name and e-mail.")); - - return TPromise.as(null); - - } else if (gitErrorCode === GitErrorCodes.BadConfigFile) { - this.messageService.show(severity.Error, localize('badConfigFile', "Git {0}", e.message)); - return TPromise.as(null); - - } else if (gitErrorCode === GitErrorCodes.UnmergedChanges) { - this.messageService.show(severity.Warning, localize('unmergedChanges', "You should first resolve the unmerged changes before committing your changes.")); - return TPromise.as(null); - } - - return this.wrapGitError(e); - }); - } - - private wrapGitError(e: any): TPromise { - const gitErrorCode: string = e.gitErrorCode || null; - const showOutputAction = new Action('show.gitOutput', localize('showOutput', "Show Output"), null, true, () => this.outputService.getChannel('Git').show()); - const cancelAction = new Action('close.message', localize('cancel', "Cancel"), null, true, () => TPromise.as(true)); - const error = createError( - localize('checkNativeConsole', "There was an issue running a git operation. Please review the output or use a console to check the state of your repository."), - { actions: [cancelAction, showOutputAction] } - ); - - (error).gitErrorCode = gitErrorCode; - (error).stdout = e.stdout; - (error).stderr = e.stderr; - - return TPromise.wrapError(error); - } - - private transition(state: ServiceState): void { - var oldState = this.state; - - this.state = state; - - if (state !== oldState) { - this.emit(ServiceEvents.STATE_CHANGED, state); - } - } - - buffer(path: string, treeish: string = '~'): TPromise { - return this.raw.show(path, treeish); - } - - show(path: string, status: IFileStatus, treeish: string = '~', mimetype: string = 'text/plain'): TPromise { - return this.detectMimetypes(path, treeish).then((mimetypes: string[]) => { - var pathComponents = status.getPathComponents(); - var fileSegment = pathComponents[pathComponents.length - 1]; - var folderSegment = toReadablePath(pathComponents.slice(0, pathComponents.length - 1).join('/')); - - var label: string; - var description: string; - - if (treeish === '~') { - label = localize('changesFromIndex', "{0} (index)", fileSegment); - description = localize('changesFromIndexDesc', "{0} - Changes on index", folderSegment); - } else { - label = localize('changesFromTree', "{0} ({1})", fileSegment, treeish); - description = localize('changesFromTreeDesc', "{0} - Changes on {1}", folderSegment, treeish); - } - - if (mime.isUnspecific(mimetypes)) { - mimetypes = mime.guessMimeTypes(path); // guess from path if our detection did not yield results - } - - // Binary: our story is weak here for binary files on the index. Since we run natively, we do not have a way currently - // to e.g. show images as binary inside the renderer because images need to be served through a URL to show. We could revisit this by - // allowing to use data URLs for resource inputs to render them. However, this would mean potentially loading a large file into memory - // - // Our solution now is to detect binary files and immediately return an input that is flagged as binary unknown mime type. - if (mime.isBinaryMime(mime.guessMimeTypes(path)) || mimetypes.indexOf(mime.MIME_BINARY) >= 0) { - return TPromise.wrapError(new Error('The resource seems to be binary and cannot be displayed')); - } - - // Text - return TPromise.as(this.instantiationService.createInstance(NativeGitIndexStringEditorInput, label, description, mimetypes.join(', '), status, path, treeish)); - }); - } - - getInput(status: IFileStatus): TPromise { - return this.inputCache.getInput(status).then(null, (err) => { - if (err.gitErrorCode = GitErrorCodes.CantOpenResource) { - this.messageService.show(severity.Warning, localize('cantOpenResource', "Can't open this git resource.")); - return TPromise.as(null); - } - - return TPromise.wrapError(err); - }); - } - - isInitialized(): boolean { - return this.state === ServiceState.OK; - } - - isIdle(): boolean { - return this.isInitialized() && !this.operations.some(op => op.id !== ServiceOperations.BACKGROUND_FETCH); - } - - getRunningOperations(): IGitOperation[] { - return this.operations; - } - - getAutoFetcher(): IAutoFetcher { - return this.autoFetcher; - } - - private static toPaths(files: IFileStatus[]): string[] { - if (!files) { - return null; - } - - return files.map((status) => { - /* In the case that a file was renamed in the index and (changed || deleted) in the - working tree, we must use its new name, running the checkout command. - */ - - switch (status.getStatus()) { - case Status.MODIFIED: - case Status.DELETED: - if (status.getRename()) { - return status.getRename(); - } - - default: - return status.getPath(); - } - }); - } - - dispose(): void { - this.emit(ServiceEvents.DISPOSE); - - if (this.model) { - this.model.dispose(); - this.model = null; - } - - super.dispose(); - } -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/gitViewlet.ts b/src/vs/workbench/parts/git/browser/gitViewlet.ts deleted file mode 100644 index 02b64d84ded17..0000000000000 --- a/src/vs/workbench/parts/git/browser/gitViewlet.ts +++ /dev/null @@ -1,215 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import 'vs/css!./media/gitViewlet'; -import winjs = require('vs/base/common/winjs.base'); -import lifecycle = require('vs/base/common/lifecycle'); -import eventemitter = require('vs/base/common/eventEmitter'); -import $ = require('vs/base/browser/builder'); -import actions = require('vs/base/common/actions'); -import viewlet = require('vs/workbench/browser/viewlet'); -import git = require('vs/workbench/parts/git/common/git'); -import contrib = require('vs/workbench/parts/git/browser/gitWorkbenchContributions'); -import view = require('vs/workbench/parts/git/browser/views/view'); -import changes = require('vs/workbench/parts/git/browser/views/changes/changesView'); -import empty = require('vs/workbench/parts/git/browser/views/empty/emptyView'); -import gitless = require('vs/workbench/parts/git/browser/views/gitless/gitlessView'); -import notroot = require('vs/workbench/parts/git/browser/views/notroot/notrootView'); -import noworkspace = require('vs/workbench/parts/git/browser/views/noworkspace/noworkspaceView'); -import { DisabledView } from './views/disabled/disabledView'; -import { HugeView } from './views/huge/hugeView'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IProgressService, IProgressRunner } from 'vs/platform/progress/common/progress'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; - -import IGitService = git.IGitService; - -export class GitViewlet - extends viewlet.Viewlet - implements view.IController { - private progressService: IProgressService; - private gitService: git.IGitService; - private instantiationService: IInstantiationService; - - private $el: $.Builder; - private currentView: view.IView; - private progressRunner: IProgressRunner; - - private currentDimension: $.Dimension; - private views: { [id: string]: view.IView; }; - - private toDispose: lifecycle.IDisposable[]; - - constructor( @ITelemetryService telemetryService: ITelemetryService, @IProgressService progressService: IProgressService, @IInstantiationService instantiationService: IInstantiationService, @IGitService gitService: IGitService, @IThemeService themeService: IThemeService) { - super(contrib.VIEWLET_ID, telemetryService, themeService); - - this.progressService = progressService; - this.instantiationService = instantiationService; - this.gitService = gitService; - - this.progressRunner = null; - this.views = {}; - this.toDispose = []; - - var views: view.IView[] = [ - this.instantiationService.createInstance(changes.ChangesView, this.getActionRunner()), - this.instantiationService.createInstance(empty.EmptyView, this, this.getActionRunner()), - this.instantiationService.createInstance(gitless.GitlessView), - new notroot.NotRootView(), - this.instantiationService.createInstance(noworkspace.NoWorkspaceView, this.getActionRunner()), - new DisabledView(), - this.instantiationService.createInstance(HugeView) - ]; - - views.forEach(v => { - this.views[v.ID] = v; - this.toDispose.push(v); - }); - - this.toUnbind.push(this.gitService.addBulkListener(() => this.onGitServiceChanges())); - } - - // GitView.IController - - public setView(id: string): winjs.Promise { - if (!this.$el) { - return winjs.TPromise.as(null); - } - - var view = this.views[id]; - - if (!view) { - return winjs.Promise.wrapError(new Error('Could not find view.')); - } - - if (this.currentView === view) { - return winjs.TPromise.as(null); - } - - var promise = winjs.TPromise.as(null); - - if (this.currentView) { - promise = this.currentView.setVisible(false); - } - - var element = view.element; - this.currentView = view; - this.updateTitleArea(); - - var el = this.$el.getHTMLElement(); - while (el.firstChild) { - el.removeChild(el.firstChild); - } - - el.appendChild(element); - view.layout(this.currentDimension); - - return promise.then(() => view.setVisible(true)); - } - - // Viewlet - - public create(parent: $.Builder): winjs.TPromise { - super.create(parent); - - this.$el = parent.div().addClass('git-viewlet'); - - return winjs.TPromise.as(null); - } - - public setVisible(visible: boolean): winjs.TPromise { - if (visible) { - this.onGitServiceChanges(); - - this.gitService.status().done(); - - return super.setVisible(visible).then(() => { - if (this.currentView) { - return this.currentView.setVisible(visible); - } - return undefined; - }); - } else { - return (this.currentView ? this.currentView.setVisible(visible) : winjs.TPromise.as(null)).then(() => { - super.setVisible(visible); - }); - } - } - - public focus(): void { - super.focus(); - - if (this.currentView) { - this.currentView.focus(); - } - } - - public layout(dimension: $.Dimension = this.currentDimension): void { - this.currentDimension = dimension; - - if (this.currentView) { - this.currentView.layout(dimension); - } - } - - public getActions(): actions.IAction[] { - return this.currentView ? this.currentView.getActions() : []; - } - - public getSecondaryActions(): actions.IAction[] { - return this.currentView ? this.currentView.getSecondaryActions() : []; - } - - public getControl(): eventemitter.IEventEmitter { - if (!this.currentView) { - return null; - } - - return this.currentView.getControl(); - } - - // Event handlers - - private onGitServiceChanges(): void { - if (this.progressRunner) { - this.progressRunner.done(); - } - - if (this.gitService.getState() === git.ServiceState.NoGit) { - this.setView('gitless'); - this.progressRunner = null; - } else if (this.gitService.getState() === git.ServiceState.Disabled) { - this.setView('disabled'); - this.progressRunner = null; - } else if (this.gitService.getState() === git.ServiceState.NotARepo) { - this.setView('empty'); - this.progressRunner = null; - } else if (this.gitService.getState() === git.ServiceState.NotAWorkspace) { - this.setView('noworkspace'); - this.progressRunner = null; - } else if (this.gitService.getState() === git.ServiceState.NotAtRepoRoot) { - this.setView('notroot'); - this.progressRunner = null; - } else if (this.gitService.getState() === git.ServiceState.Huge) { - this.setView('huge'); - this.progressRunner = null; - } else if (this.gitService.isIdle()) { - this.setView('changes'); - this.progressRunner = null; - } else { - this.progressRunner = this.progressService.show(true); - } - } - - public dispose(): void { - this.toDispose = lifecycle.dispose(this.toDispose); - this.views = null; - - super.dispose(); - } -} diff --git a/src/vs/workbench/parts/git/browser/gitWidgets.ts b/src/vs/workbench/parts/git/browser/gitWidgets.ts deleted file mode 100644 index d2db61f03d1eb..0000000000000 --- a/src/vs/workbench/parts/git/browser/gitWidgets.ts +++ /dev/null @@ -1,209 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import nls = require('vs/nls'); -import strings = require('vs/base/common/strings'); -import { Delayer } from 'vs/base/common/async'; -import { $, append, show, hide, toggleClass } from 'vs/base/browser/dom'; -import { IAction } from 'vs/base/common/actions'; -import { IDisposable, combinedDisposable } from 'vs/base/common/lifecycle'; -import { IGitService, ServiceState, IBranch, ServiceOperations, IRemote } from 'vs/workbench/parts/git/common/git'; -import { IStatusbarItem } from 'vs/workbench/browser/parts/statusbar/statusbar'; -import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { SyncAction, PublishAction } from './gitActions'; -import Severity from 'vs/base/common/severity'; -import { IMessageService } from 'vs/platform/message/common/message'; - -interface IState { - serviceState: ServiceState; - isBusy: boolean; - isSyncing: boolean; - HEAD: IBranch; - remotes: IRemote[]; - ps1: string; -} - -const DisablementDelay = 500; - -export class GitStatusbarItem implements IStatusbarItem { - - private instantiationService: IInstantiationService; - private gitService: IGitService; - private quickOpenService: IQuickOpenService; - private state: IState; - private element: HTMLElement; - private branchElement: HTMLElement; - private publishElement: HTMLElement; - private syncElement: HTMLElement; - private syncLabelElement: HTMLElement; - private disablementDelayer: Delayer; - - private syncAction: SyncAction; - private publishAction: PublishAction; - - private toDispose: IDisposable[]; - - constructor( - @IInstantiationService instantiationService: IInstantiationService, - @IGitService gitService: IGitService, - @IQuickOpenService quickOpenService: IQuickOpenService, - @IMessageService private messageService: IMessageService, - @ITelemetryService private telemetryService: ITelemetryService - ) { - this.instantiationService = instantiationService; - this.gitService = gitService; - this.quickOpenService = quickOpenService; - this.disablementDelayer = new Delayer(DisablementDelay); - - this.syncAction = instantiationService.createInstance(SyncAction, SyncAction.ID, SyncAction.LABEL); - this.publishAction = instantiationService.createInstance(PublishAction, PublishAction.ID, PublishAction.LABEL); - - this.toDispose = [ - this.syncAction, - this.publishAction - ]; - - this.state = { - serviceState: ServiceState.NotInitialized, - isBusy: false, - isSyncing: false, - HEAD: null, - remotes: [], - ps1: '' - }; - } - - public render(container: HTMLElement): IDisposable { - this.element = append(container, $('.git-statusbar-group')); - - this.branchElement = append(this.element, $('a')); - - this.publishElement = append(this.element, $('a.octicon.octicon-cloud-upload')); - this.publishElement.title = nls.localize('publishBranch', "Publish Branch"); - this.publishElement.onclick = () => this.onPublishClick(); - - this.syncElement = append(this.element, $('a.git-statusbar-sync-item')); - this.syncElement.title = nls.localize('syncBranch', "Synchronize Changes"); - this.syncElement.onclick = () => this.onSyncClick(); - append(this.syncElement, $('span.octicon.octicon-sync')); - - this.syncLabelElement = append(this.syncElement, $('span.ahead-behind')); - - this.setState(this.state); - this.toDispose.push(this.gitService.addBulkListener(() => this.onGitServiceChange())); - return combinedDisposable(this.toDispose); - } - - private onGitServiceChange(): void { - const model = this.gitService.getModel(); - - this.setState({ - serviceState: this.gitService.getState(), - isBusy: this.gitService.getRunningOperations().some(op => op.id === ServiceOperations.CHECKOUT || op.id === ServiceOperations.BRANCH), - isSyncing: this.gitService.getRunningOperations().some(op => op.id === ServiceOperations.SYNC), - HEAD: model.getHEAD(), - remotes: model.getRemotes(), - ps1: model.getPS1() - }); - } - - private setState(state: IState): void { - this.state = state; - - let isGitDisabled = false; - let className = 'git-statusbar-branch-item'; - let textContent: string; - let aheadBehindLabel = ''; - let title = ''; - let onclick: () => void = null; - - if (state.serviceState !== ServiceState.OK) { - isGitDisabled = true; - className += ' disabled'; - title = nls.localize('gitNotEnabled', "Git is not enabled in this workspace."); - textContent = '\u00a0'; - } else { - const HEAD = state.HEAD; - - if (state.isBusy) { - className += ' busy'; - } else { - onclick = () => this.onBranchClick(); - } - - if (!HEAD) { - textContent = state.ps1; - } else if (!HEAD.name) { - textContent = state.ps1; - className += ' headless'; - } else if (!HEAD.commit || !HEAD.upstream || (!HEAD.ahead && !HEAD.behind)) { - textContent = state.ps1; - } else { - textContent = state.ps1; - aheadBehindLabel = strings.format('{0}↓ {1}↑', HEAD.behind, HEAD.ahead); - } - } - - this.branchElement.className = className; - this.branchElement.title = title; - this.branchElement.textContent = textContent; - this.branchElement.onclick = onclick; - this.syncLabelElement.textContent = aheadBehindLabel; - - if (isGitDisabled) { - hide(this.branchElement); - hide(this.publishElement); - hide(this.syncElement); - } else { - show(this.branchElement); - - if (state.HEAD && !!state.HEAD.upstream) { - show(this.syncElement); - toggleClass(this.syncElement, 'syncing', this.state.isSyncing); - toggleClass(this.syncElement, 'empty', !aheadBehindLabel); - this.disablementDelayer.trigger( - () => toggleClass(this.syncElement, 'disabled', !this.syncAction.enabled), - this.syncAction.enabled ? 0 : DisablementDelay - ); - hide(this.publishElement); - } else if (state.remotes.length > 0) { - hide(this.syncElement); - show(this.publishElement); - this.disablementDelayer.trigger( - () => toggleClass(this.publishElement, 'disabled', !this.publishAction.enabled), - this.publishAction.enabled ? 0 : DisablementDelay - ); - } else { - hide(this.syncElement); - hide(this.publishElement); - } - } - } - - private onBranchClick(): void { - this.quickOpenService.show('git checkout '); - } - - private onPublishClick(): void { - this.runAction(this.publishAction); - } - - private onSyncClick(): void { - this.runAction(this.syncAction); - } - - private runAction(action: IAction): void { - if (!action.enabled) { - return; - } - - this.telemetryService.publicLog('workbenchActionExecuted', { id: action.id, from: 'status bar' }); - - action.run() - .done(null, err => this.messageService.show(Severity.Error, err)); - } -} diff --git a/src/vs/workbench/parts/git/browser/gitWorkbenchContributions.ts b/src/vs/workbench/parts/git/browser/gitWorkbenchContributions.ts deleted file mode 100644 index e35495db43325..0000000000000 --- a/src/vs/workbench/parts/git/browser/gitWorkbenchContributions.ts +++ /dev/null @@ -1,241 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import 'vs/css!./media/git.contribution'; -import nls = require('vs/nls'); -import async = require('vs/base/common/async'); -import lifecycle = require('vs/base/common/lifecycle'); -import ext = require('vs/workbench/common/contributions'); -import git = require('vs/workbench/parts/git/common/git'); -import viewlet = require('vs/workbench/browser/viewlet'); -import statusbar = require('vs/workbench/browser/parts/statusbar/statusbar'); -import platform = require('vs/platform/platform'); -import widgets = require('vs/workbench/parts/git/browser/gitWidgets'); -import wbar = require('vs/workbench/common/actionRegistry'); -import gitoutput = require('vs/workbench/parts/git/browser/gitOutput'); -import output = require('vs/workbench/parts/output/common/output'); -import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; -import confregistry = require('vs/platform/configuration/common/configurationRegistry'); -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import quickopen = require('vs/workbench/browser/quickopen'); -import 'vs/workbench/parts/git/browser/gitEditorContributions'; -import { IActivityBarService, ProgressBadge, NumberBadge } from 'vs/workbench/services/activity/common/activityBarService'; -import { IMessageService } from 'vs/platform/message/common/message'; -import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; -import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; -import { GitSCMProvider } from './gitScm'; - -import IGitService = git.IGitService; - -export class StatusUpdater implements ext.IWorkbenchContribution { - static ID = 'vs.git.statusUpdater'; - - private gitService: IGitService; - private activityBarService: IActivityBarService; - private messageService: IMessageService; - private configurationService: IConfigurationService; - private progressBadgeDelayer: async.Delayer; - private badgeHandle: lifecycle.IDisposable; - private toDispose: lifecycle.IDisposable[]; - - constructor( - @IGitService gitService: IGitService, - @IActivityBarService activityBarService: IActivityBarService, - @IMessageService messageService: IMessageService, - @IConfigurationService configurationService: IConfigurationService - ) { - this.gitService = gitService; - this.activityBarService = activityBarService; - this.messageService = messageService; - this.configurationService = configurationService; - - this.progressBadgeDelayer = new async.Delayer(200); - - this.toDispose = []; - this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onGitServiceChange())); - this.toDispose.push(this.gitService.addBulkListener(e => this.onGitServiceChange())); - } - - private onGitServiceChange(): void { - - lifecycle.dispose(this.badgeHandle); - - if (this.gitService.getState() !== git.ServiceState.OK) { - this.progressBadgeDelayer.cancel(); - - } else if (this.gitService.isIdle()) { - this.showChangesBadge(); - } else { - this.progressBadgeDelayer.trigger(() => { - this.badgeHandle = this.activityBarService.showActivity('workbench.view.git', new ProgressBadge(() => nls.localize('gitProgressBadge', 'Running git status')), 'git-viewlet-label-progress'); - }); - } - } - - private showChangesBadge(): void { - this.progressBadgeDelayer.cancel(); - - const { countBadge } = this.configurationService.getConfiguration('git'); - - if (countBadge === 'off') { - return; - } - - const filter = countBadge === 'tracked' - ? s => s.getStatus() !== git.Status.UNTRACKED - : () => true; - - const statuses = this.gitService.getModel().getStatus().getGroups() - .map(g => g.all()) - .reduce((r, g) => r.concat(g), []) - .filter(filter); - - const badge = new NumberBadge(statuses.length, num => nls.localize('gitPendingChangesBadge', '{0} pending changes', num)); - this.badgeHandle = this.activityBarService.showActivity('workbench.view.git', badge, 'git-viewlet-label'); - } - - public getId(): string { - return StatusUpdater.ID; - } - - public dispose(): void { - this.toDispose = lifecycle.dispose(this.toDispose); - lifecycle.dispose(this.badgeHandle); - } -} - -export const VIEWLET_ID = 'workbench.view.git'; - -class OpenGitViewletAction extends viewlet.ToggleViewletAction { - public static ID = VIEWLET_ID; - public static LABEL = nls.localize('toggleGitViewlet', "Show Git"); - - constructor(id: string, label: string, @IViewletService viewletService: IViewletService, @IWorkbenchEditorService editorService: IWorkbenchEditorService) { - super(id, label, VIEWLET_ID, viewletService, editorService); - } -} - -export function registerContributions(): void { - - // Register Statusbar item - (platform.Registry.as(statusbar.Extensions.Statusbar)).registerStatusbarItem(new statusbar.StatusbarItemDescriptor( - widgets.GitStatusbarItem, - statusbar.StatusbarAlignment.LEFT, - 100 /* High Priority */ - )); - - // Register Output Channel - var outputChannelRegistry = platform.Registry.as(output.Extensions.OutputChannels); - outputChannelRegistry.registerChannel('Git', nls.localize('git', "Git")); - - // Register Git Output - (platform.Registry.as(ext.Extensions.Workbench)).registerWorkbenchContribution( - gitoutput.GitOutput - ); - - // Register Viewlet - (platform.Registry.as(viewlet.Extensions.Viewlets)).registerViewlet(new viewlet.ViewletDescriptor( - 'vs/workbench/parts/git/browser/gitViewlet', - 'GitViewlet', - VIEWLET_ID, - nls.localize('git', "Git"), - 'git', - 35 - )); - - // Register Action to Open Viewlet - (platform.Registry.as(wbar.Extensions.WorkbenchActions)).registerWorkbenchAction( - new SyncActionDescriptor(OpenGitViewletAction, OpenGitViewletAction.ID, OpenGitViewletAction.LABEL, { - primary: null, - win: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G }, - linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G }, - mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_G } - }), - 'View: Show Git', - nls.localize('view', "View") - ); - - // Register StatusUpdater - (platform.Registry.as(ext.Extensions.Workbench)).registerWorkbenchContribution( - StatusUpdater - ); - - // Register GitSCMProvider - (platform.Registry.as(ext.Extensions.Workbench)).registerWorkbenchContribution( - GitSCMProvider - ); - - // Register Quick Open for git - (platform.Registry.as(quickopen.Extensions.Quickopen)).registerQuickOpenHandler( - new quickopen.QuickOpenHandlerDescriptor( - 'vs/workbench/parts/git/browser/gitQuickOpen', - 'GitCommandQuickOpenHandler', - 'git ', - nls.localize('gitCommands', "Git Commands") - ) - ); - - // Register configuration - var configurationRegistry = platform.Registry.as(confregistry.Extensions.Configuration); - configurationRegistry.registerConfiguration({ - id: 'git', - order: 15, - title: nls.localize('gitConfigurationTitle', "Git"), - type: 'object', - properties: { - 'git.enabled': { - type: 'boolean', - description: nls.localize('gitEnabled', "Is git enabled"), - default: true - }, - 'git.path': { - type: ['string', 'null'], - description: nls.localize('gitPath', "Path to the git executable"), - default: null, - isExecutable: true - }, - 'git.autorefresh': { - type: 'boolean', - description: nls.localize('gitAutoRefresh', "Whether auto refreshing is enabled"), - default: true - }, - 'git.autofetch': { - type: 'boolean', - description: nls.localize('gitAutoFetch', "Whether auto fetching is enabled."), - default: true - }, - 'git.enableLongCommitWarning': { - type: 'boolean', - description: nls.localize('gitLongCommit', "Whether long commit messages should be warned about."), - default: true - }, - 'git.allowLargeRepositories': { - type: 'boolean', - description: nls.localize('gitLargeRepos', "Always allow large repositories to be managed by Code."), - default: false - }, - 'git.confirmSync': { - type: 'boolean', - description: nls.localize('confirmSync', "Confirm before synchronizing git repositories."), - default: true - }, - 'git.countBadge': { - type: 'string', - enum: ['all', 'tracked', 'off'], - default: 'all', - description: nls.localize('countBadge', "Controls the git badge counter."), - }, - 'git.checkoutType': { - type: 'string', - enum: ['all', 'local', 'tags', 'remote'], - default: 'all', - description: nls.localize('checkoutType', "Controls what type of branches are listed."), - } - } - }); -} diff --git a/src/vs/workbench/parts/git/browser/media/Compare.svg b/src/vs/workbench/parts/git/browser/media/Compare.svg deleted file mode 100644 index 3a205509bca81..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/Compare.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/Compare_inverse.svg b/src/vs/workbench/parts/git/browser/media/Compare_inverse.svg deleted file mode 100644 index c951728abac47..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/Compare_inverse.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/OpenEditor.svg b/src/vs/workbench/parts/git/browser/media/OpenEditor.svg deleted file mode 100644 index 85a001dccc2e3..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/OpenEditor.svg +++ /dev/null @@ -1,3 +0,0 @@ - -]> \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/OpenEditor_inverse.svg b/src/vs/workbench/parts/git/browser/media/OpenEditor_inverse.svg deleted file mode 100644 index f6302185aa4b3..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/OpenEditor_inverse.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/Refresh.svg b/src/vs/workbench/parts/git/browser/media/Refresh.svg deleted file mode 100644 index e0345748192ee..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/Refresh.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/add-focus.svg b/src/vs/workbench/parts/git/browser/media/add-focus.svg deleted file mode 100644 index 5e9f5851e8bd2..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/add-focus.svg +++ /dev/null @@ -1 +0,0 @@ -Layer 1 \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/add-inverse.svg b/src/vs/workbench/parts/git/browser/media/add-inverse.svg deleted file mode 100644 index 3475c1e1963ed..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/add-inverse.svg +++ /dev/null @@ -1 +0,0 @@ -Layer 1 \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/add.svg b/src/vs/workbench/parts/git/browser/media/add.svg deleted file mode 100644 index bdecdb0e45bfb..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/add.svg +++ /dev/null @@ -1 +0,0 @@ -Layer 1 \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/check-inverse.svg b/src/vs/workbench/parts/git/browser/media/check-inverse.svg deleted file mode 100644 index c225b2f597f34..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/check-inverse.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/check.svg b/src/vs/workbench/parts/git/browser/media/check.svg deleted file mode 100644 index d45df06edf810..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/check.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/git-dark.svg b/src/vs/workbench/parts/git/browser/media/git-dark.svg deleted file mode 100644 index c08b1c2e40305..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/git-dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/git.contribution.css b/src/vs/workbench/parts/git/browser/media/git.contribution.css deleted file mode 100644 index 80ad1fe1419ea..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/git.contribution.css +++ /dev/null @@ -1,155 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -/* Appbar */ - -.monaco-workbench .git-action.open-in-diff { - background: url('Compare.svg') center center no-repeat; -} - -.monaco-workbench .git-action.open-in-editor { - background: url('OpenEditor.svg') center center no-repeat; -} - -.vs-dark .monaco-workbench .git-action.open-in-diff, -.hc-black .monaco-workbench .git-action.open-in-diff { - background: url('Compare_inverse.svg') center center no-repeat; -} - -.vs-dark .monaco-workbench .git-action.open-in-editor, -.hc-black .monaco-workbench .git-action.open-in-editor { - background: url('OpenEditor_inverse.svg') center center no-repeat; -} - -/* Activity Bar */ -.monaco-workbench > .activitybar .monaco-action-bar .action-label.git { - -webkit-mask: url('git-dark.svg') no-repeat 50% 50%; -} - -/* Status / Quick Open */ -.monaco-shell .git-statusbar-group > .git-statusbar-branch-item, -.vs-dark .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.git { - background-image: url('git-dark.svg'); -} - -/* Git viewlet label */ - -.git-viewlet-label-progress > .badge-content { - background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNCIgaGVpZ2h0PSIxNCIgdmlld0JveD0iMiAyIDE0IDE0IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDIgMiAxNCAxNCI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTkgMTZjLTMuODYgMC03LTMuMTQtNy03czMuMTQtNyA3LTdjMy44NTkgMCA3IDMuMTQxIDcgN3MtMy4xNDEgNy03IDd6bTAtMTIuNmMtMy4wODggMC01LjYgMi41MTMtNS42IDUuNnMyLjUxMiA1LjYgNS42IDUuNiA1LjYtMi41MTIgNS42LTUuNi0yLjUxMi01LjYtNS42LTUuNnptMy44NiA3LjFsLTMuMTYtMS44OTZ2LTMuODA0aC0xLjR2NC41OTZsMy44NCAyLjMwNS43Mi0xLjIwMXoiLz48L3N2Zz4="); - background-position: center center; - background-repeat: no-repeat; -} - -/* Git merge editor decorations */ -.monaco-editor .git-merge-control-decoration { - background-color: rgba(255, 139, 0, 0.3); -} -.monaco-editor.vs-dark .git-merge-control-decoration { - background-color: rgba(235, 59, 0, 0.3); -} - -.monaco-shell .git-branch-dropdown-menu .action-label.git-action.checkout.HEAD { - font-weight: bold; -} - -.monaco-shell .git-branch-dropdown-menu .monaco-inputbox { - font-size: 12px; - width: 100%; -} - -.monaco-shell .git-branch-dropdown-menu .monaco-inputbox > .wrapper > .input { - background-color: transparent; -} - -.monaco-shell .git-branch-dropdown-menu .monaco-inputbox > .wrapper > .input { - padding: 0.8em 1em; -} - -/* Quick Open */ - -.monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.git { - background-size: 100%; -} - -.vs .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.git { - background-image: url('git.svg'); -} - -/* Actions */ - -.monaco-shell .git-action.live-sync.icon { - background: url('sync.svg') 7px center no-repeat; -} - -.monaco-shell .git-action.live-sync.icon.loading { - animation: spin-forever 1.6s linear infinite; -} - -@keyframes spin-forever { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } - -/* High Contrast Theming */ -.hc-black .monaco-workbench > .activitybar .monaco-action-bar .badge.git-viewlet-label-progress .badge-content { - width: 1px; -} - -/* Status bar */ - -.monaco-shell .git-statusbar-group > a { - padding: 0 5px; -} - -.monaco-shell .git-statusbar-group > a.disabled { - opacity: 0.7; -} - -.monaco-shell .git-statusbar-group > a.octicon { - line-height: 22px; - width: 16px; - text-align: center; -} - -.monaco-shell .git-statusbar-group .octicon { - font-size: 14px; -} - -.monaco-shell .git-statusbar-group > .git-statusbar-sync-item:not(.empty) > span.octicon { - margin-right: 6px; -} - -@keyframes spin { - from { transform: rotate(0deg); } - to { transform: rotate(1080deg); } -} - -.monaco-shell .git-statusbar-group > .git-statusbar-sync-item.syncing > .octicon { - animation: 2s ease-in-out infinite spin; -} - -.monaco-shell .git-statusbar-group > .git-statusbar-sync-item.disabled > .ahead-behind, -.monaco-shell .git-statusbar-group > .git-statusbar-sync-item.busy > .ahead-behind { - cursor: default; -} - -.monaco-shell .git-statusbar-group > .git-statusbar-branch-item { - background-repeat: no-repeat; - background-position: 4px 50%; - background-size: 17px; - cursor: default; - padding: 0 5px 0 22px; -} - -.monaco-shell .git-statusbar-group > a:not(.disabled):not(.busy) { - cursor: pointer; -} - -.monaco-shell .git-statusbar-group > .busy, -.monaco-shell .git-statusbar-group > .disabled, { - opacity: 0.6; - cursor: default; -} - -.monaco-shell .git-statusbar-group > .git-statusbar-branch-item.headless { - font-style: italic; -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/git.svg b/src/vs/workbench/parts/git/browser/media/git.svg deleted file mode 100644 index d1049a44d0d3e..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/git.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/gitViewlet.css b/src/vs/workbench/parts/git/browser/media/gitViewlet.css deleted file mode 100644 index 10037adab11a1..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/gitViewlet.css +++ /dev/null @@ -1,93 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -/* Git viewlet */ - -.git-viewlet { - height: 100%; -} - -/* Actionbar actions */ - -.git-action.refresh { - background: url('Refresh.svg') center center no-repeat; -} - -.git-action.smart-commit { - background: url('check.svg') center center no-repeat; -} - -.git-action.run-pull { - background: url('pull.svg') center center no-repeat; -} - -.git-action.run-push { - background: url('push.svg') center center no-repeat; -} - -/* Tree actions */ - -.git-action.stage { - background: url('add.svg') center center no-repeat; -} - -.git-viewlet .focused .monaco-tree-row.selected:not(.highlighted) > .content.actions .git-action.stage { - background: url('add-focus.svg') center center no-repeat; -} - -.git-action.undo { - background: url('undo.svg') center center no-repeat; -} - -.git-viewlet .focused .monaco-tree-row.selected:not(.highlighted) > .content.actions .git-action.undo { - background: url('undo-focus.svg') center center no-repeat; -} - -.git-action.unstage { - background: url('subtract.svg') center center no-repeat; -} - -.git-viewlet .focused .monaco-tree-row.selected:not(.highlighted) > .content.actions .git-action.unstage { - background: url('subtract-focus.svg') center center no-repeat; -} - -/* Dark theme actions */ - -.vs-dark .git-action.refresh, -.hc-black .git-action.refresh { - background: url('refresh-inverse.svg') center center no-repeat; -} - -.vs-dark .git-action.commit, -.hc-black .git-action.commit, -.vs-dark .git-action.stage-and-commit, -.hc-black .git-action.stage-and-commit, -.vs-dark .git-action.smart-commit, -.hc-black .git-action.smart-commit { - background: url('check-inverse.svg') center center no-repeat; -} - -.vs-dark .git-action.run-pull { - background: url('pull-inverse.svg') center center no-repeat; -} - -.vs-dark .git-action.run-push { - background: url('push-inverse.svg') center center no-repeat; -} - -.vs-dark .git-action.stage, -.hc-black .git-action.stage { - background: url('add-inverse.svg') center center no-repeat; -} - -.vs-dark .git-action.undo, -.hc-black .git-action.undo { - background: url('undo-inverse.svg') center center no-repeat; -} - -.vs-dark .git-action.unstage, -.hc-black .git-action.unstage { - background: url('subtract-inverse.svg') center center no-repeat; -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/pull-inverse.svg b/src/vs/workbench/parts/git/browser/media/pull-inverse.svg deleted file mode 100644 index 6f2df243de8c5..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/pull-inverse.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/pull.svg b/src/vs/workbench/parts/git/browser/media/pull.svg deleted file mode 100644 index 6d2ccb6464940..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/pull.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/push-inverse.svg b/src/vs/workbench/parts/git/browser/media/push-inverse.svg deleted file mode 100644 index 5afca6bc64eaa..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/push-inverse.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/push.svg b/src/vs/workbench/parts/git/browser/media/push.svg deleted file mode 100644 index 7b57be602b9ef..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/push.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/refresh-inverse.svg b/src/vs/workbench/parts/git/browser/media/refresh-inverse.svg deleted file mode 100644 index d79fdaa4e8e4d..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/refresh-inverse.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/subtract-focus.svg b/src/vs/workbench/parts/git/browser/media/subtract-focus.svg deleted file mode 100644 index 64cecb0d2229a..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/subtract-focus.svg +++ /dev/null @@ -1 +0,0 @@ -Layer 1 \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/subtract-inverse.svg b/src/vs/workbench/parts/git/browser/media/subtract-inverse.svg deleted file mode 100644 index 2de46fcf5b506..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/subtract-inverse.svg +++ /dev/null @@ -1 +0,0 @@ -Layer 1 \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/subtract.svg b/src/vs/workbench/parts/git/browser/media/subtract.svg deleted file mode 100644 index f5d128b2df8c1..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/subtract.svg +++ /dev/null @@ -1 +0,0 @@ -Layer 1 \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/sync.svg b/src/vs/workbench/parts/git/browser/media/sync.svg deleted file mode 100644 index 5a4bf0799e434..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/sync.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/undo-focus.svg b/src/vs/workbench/parts/git/browser/media/undo-focus.svg deleted file mode 100644 index c2d0cda307a57..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/undo-focus.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/undo-inverse.svg b/src/vs/workbench/parts/git/browser/media/undo-inverse.svg deleted file mode 100644 index 9f1756333891d..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/undo-inverse.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/media/undo.svg b/src/vs/workbench/parts/git/browser/media/undo.svg deleted file mode 100644 index 1fa6ba48a19e6..0000000000000 --- a/src/vs/workbench/parts/git/browser/media/undo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/views/changes/changesView.css b/src/vs/workbench/parts/git/browser/views/changes/changesView.css deleted file mode 100644 index bd5892f7cc49c..0000000000000 --- a/src/vs/workbench/parts/git/browser/views/changes/changesView.css +++ /dev/null @@ -1,171 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -/* Commit view */ - -.git-viewlet > .changes-view > .commit-view { - box-sizing: border-box; - padding: 5px 9px 5px 16px; -} - -.git-viewlet > .changes-view > .commit-view > .monaco-inputbox { - width: 100%; -} - -.git-viewlet > .changes-view > .commit-view > .monaco-inputbox > .wrapper > .mirror { - max-height: 134px; -} - -.git-viewlet > .changes-view > .commit-view > .monaco-inputbox > .wrapper > textarea.input { - min-height: 26px; -} - -.git-viewlet > .changes-view > .commit-view.scroll > .monaco-inputbox > .wrapper > textarea.input { - overflow-y: scroll; -} - -/* Status view */ - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .content { - line-height: 22px; - display: flex; -} - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .content .monaco-action-bar { - display: none; - margin-right: 12px; -} - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .content .monaco-action-bar .action-item { - margin-top: 2px; -} - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .content .monaco-action-bar .action-label { - width: 16px; - height: 16px; -} - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row:hover .content .monaco-action-bar, -.git-viewlet > .changes-view > .status-view > .monaco-tree.focused .monaco-tree-row.focused .content .monaco-action-bar { - display: block; -} - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row:hover .content .monaco-count-badge, -.git-viewlet > .changes-view > .status-view > .monaco-tree.focused .monaco-tree-row.focused .content .monaco-count-badge { - display: none; -} - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-rows > .monaco-tree-row > .content:before { - background: none; -} - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .status-group { - font-size: 11px; - font-weight: bold; - text-transform: uppercase; - cursor: default; -} - -/* Bold font style does not go well with CJK fonts */ -.git-viewlet:lang(zh-Hans) > .changes-view > .status-view > .monaco-tree .monaco-tree-row .status-group, -.git-viewlet:lang(zh-Hant) > .changes-view > .status-view > .monaco-tree .monaco-tree-row .status-group, -.git-viewlet:lang(ja) > .changes-view > .status-view > .monaco-tree .monaco-tree-row .status-group, -.git-viewlet:lang(ko) > .changes-view > .status-view > .monaco-tree .monaco-tree-row .status-group { font-weight: normal; } - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .count-badge-wrapper { - padding-right: 12px; -} - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .status-group, -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status { - overflow: hidden; - text-overflow: ellipsis; - flex: 1; -} - -.vs-dark .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .status-group { - color: inherit; -} - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.out-of-workspace { - opacity: 0.5; -} - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status .status { - padding: 2px 4px; - font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Inconsolata", "Courier New", monospace, "Droid Sans Fallback"; - font-size: 70%; - color: white; - text-align: center; - border-radius: 0.5em; - vertical-align: bottom; -} - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status .name { - margin-left: 0.4em; -} - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.modified .status { background-color: #007ACC; } -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.added .status { background-color: #2d883e; } -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.deleted .status { background-color: #B9131A; } -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.renamed .status { background-color: #4668C5; } -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.copied .status { background-color: #682079; } -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.untracked .status { background-color: #6C6C6C; } -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.ignored .status { background-color: #969696; } -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.conflict .status { background-color: #9B4F96; } -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row.selected .file-status .status { background-color: #ffffff; color: #666; } - -.vs-dark .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.modified .status { background-color: #1B80B2; } -.vs-dark .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.added .status { background-color: #3c8746; } -.vs-dark .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.deleted .status { background-color: #9E121D; } -.vs-dark .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.copied .status { background-color: #692C77; } -.vs-dark .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.conflict .status { background-color: #7F4E7E; } -.vs-dark .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row.selected .file-status .status { background-color: #ffffff; color: #666; } - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.deleted .name, -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.both-deleted .name, -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.deleted-by-them .name, -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.deleted-by-us .name { - text-decoration: line-through; -} - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status:not(.renamed) > .rename { - display: none; -} - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status .rename-name:not(:empty), -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status .rename-arrow { - margin-left: 0.4em; -} - -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status .rename-folder:not(:empty), -.git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status .folder:not(:empty) { - opacity: 0.7; - font-size: 0.9em; - margin-left: 0.8em; -} - -/* High Contrast Theming */ -.hc-black .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .content { - line-height: 20px; -} - -.hc-black .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status .status { - top: 2px; -} - -.hc-black .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.modified .status, -.hc-black .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.added .status, -.hc-black .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.deleted .status, -.hc-black .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.renamed .status, -.hc-black .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.copied .status, -.hc-black .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.untracked .status, -.hc-black .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.ignored .status, -.hc-black .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row .file-status.conflict .status, -.hc-black .git-viewlet > .changes-view > .status-view > .monaco-tree .monaco-tree-row.selected .file-status .status { - background-color: #000; - color: #fff; - border: 1px solid #6FC3DF; -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/views/changes/changesView.ts b/src/vs/workbench/parts/git/browser/views/changes/changesView.ts deleted file mode 100644 index 6f92d46483298..0000000000000 --- a/src/vs/workbench/parts/git/browser/views/changes/changesView.ts +++ /dev/null @@ -1,496 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import 'vs/css!./changesView'; -import nls = require('vs/nls'); -import Platform = require('vs/base/common/platform'); -import Lifecycle = require('vs/base/common/lifecycle'); -import EventEmitter = require('vs/base/common/eventEmitter'); -import Strings = require('vs/base/common/strings'); -import Errors = require('vs/base/common/errors'); -import * as paths from 'vs/base/common/paths'; -import WinJS = require('vs/base/common/winjs.base'); -import Builder = require('vs/base/browser/builder'); -import { StandardKeyboardEvent, IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; -import Actions = require('vs/base/common/actions'); -import ActionBar = require('vs/base/browser/ui/actionbar/actionbar'); -import Tree = require('vs/base/parts/tree/browser/tree'); -import TreeImpl = require('vs/base/parts/tree/browser/treeImpl'); -import git = require('vs/workbench/parts/git/common/git'); -import GitView = require('vs/workbench/parts/git/browser/views/view'); -import GitActions = require('vs/workbench/parts/git/browser/gitActions'); -import GitModel = require('vs/workbench/parts/git/common/gitModel'); -import Viewer = require('vs/workbench/parts/git/browser/views/changes/changesViewer'); -import GitEditorInputs = require('vs/workbench/parts/git/browser/gitEditorInputs'); -import { IOutputService } from 'vs/workbench/parts/output/common/output'; -import WorkbenchEditorCommon = require('vs/workbench/common/editor'); -import InputBox = require('vs/base/browser/ui/inputbox/inputBox'); -import Severity from 'vs/base/common/severity'; -import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; -import { IEditorInput } from 'vs/platform/editor/common/editor'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IMessageService } from 'vs/platform/message/common/message'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; -import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { isEqualOrParent } from 'vs/platform/files/common/files'; -import { attachInputBoxStyler, attachListStyler } from 'vs/platform/theme/common/styler'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; - -import IGitService = git.IGitService; - -var $ = Builder.$; - -export class ChangesView extends EventEmitter.EventEmitter implements GitView.IView, GitActions.ICommitState { - - public ID = 'changes'; - - private static COMMIT_KEYBINDING = Platform.isMacintosh ? 'Cmd+Enter' : 'Ctrl+Enter'; - private static NEED_MESSAGE = nls.localize('needMessage', "Please provide a commit message. You can always press **{0}** to commit changes. If there are any staged changes, only those will be committed; otherwise, all changes will.", ChangesView.COMMIT_KEYBINDING); - private static NOTHING_TO_COMMIT = nls.localize('nothingToCommit', "Once there are some changes to commit, type in the commit message and either press **{0}** to commit changes. If there are any staged changes, only those will be committed; otherwise, all changes will.", ChangesView.COMMIT_KEYBINDING); - private static LONG_COMMIT = nls.localize('longCommit', "It is recommended to keep the commit's first line under 50 characters. Feel free to use more lines for extra information."); - - private instantiationService: IInstantiationService; - private editorService: IWorkbenchEditorService; - private messageService: IMessageService; - private contextViewService: IContextViewService; - private contextService: IWorkspaceContextService; - private gitService: IGitService; - private outputService: IOutputService; - - private $el: Builder.Builder; - private $commitView: Builder.Builder; - private $statusView: Builder.Builder; - private commitInputBox: InputBox.InputBox; - private tree: Tree.ITree; - - private visible: boolean; - private currentDimension: Builder.Dimension; - - private smartCommitAction: GitActions.SmartCommitAction; - private actions: Actions.IAction[]; - private secondaryActions: Actions.IAction[]; - private actionRunner: Actions.IActionRunner; - - private toDispose: Lifecycle.IDisposable[]; - - constructor(actionRunner: Actions.IActionRunner, - @IInstantiationService instantiationService: IInstantiationService, - @IWorkbenchEditorService editorService: IWorkbenchEditorService, - @IEditorGroupService editorGroupService: IEditorGroupService, - @IMessageService messageService: IMessageService, - @IContextViewService contextViewService: IContextViewService, - @IWorkspaceContextService contextService: IWorkspaceContextService, - @IGitService gitService: IGitService, - @IOutputService outputService: IOutputService, - @IConfigurationService private configurationService: IConfigurationService, - @IThemeService private themeService: IThemeService - ) { - super(); - - this.instantiationService = instantiationService; - this.editorService = editorService; - this.messageService = messageService; - this.contextViewService = contextViewService; - this.contextService = contextService; - this.gitService = gitService; - this.outputService = outputService; - - this.visible = false; - this.currentDimension = null; - this.actionRunner = actionRunner; - - this.toDispose = [ - this.smartCommitAction = this.instantiationService.createInstance(GitActions.SmartCommitAction, this), - editorGroupService.onEditorsChanged(() => this.onEditorsChanged(this.editorService.getActiveEditorInput()).done(null, Errors.onUnexpectedError)), - this.gitService.addListener(git.ServiceEvents.OPERATION_START, (e) => this.onGitOperationStart(e)), - this.gitService.addListener(git.ServiceEvents.OPERATION_END, (e) => this.onGitOperationEnd(e)), - this.gitService.getModel().addListener(git.ModelEvents.MODEL_UPDATED, this.onGitModelUpdate.bind(this)) - ]; - } - - // IView - - public get element(): HTMLElement { - this.render(); - return this.$el.getHTMLElement(); - } - - private render(): void { - if (this.$el) { - return; - } - - this.$el = $('.changes-view'); - this.$commitView = $('.commit-view').appendTo(this.$el); - - // Commit view - - this.commitInputBox = new InputBox.InputBox(this.$commitView.getHTMLElement(), this.contextViewService, { - placeholder: nls.localize('commitMessage', "Message (press {0} to commit)", ChangesView.COMMIT_KEYBINDING), - validationOptions: { - showMessage: true, - validation: (value): InputBox.IMessage => { - const config = this.configurationService.getConfiguration('git'); - - if (!config.enableLongCommitWarning) { - return null; - } - - if (/^[^\n]{51}/.test(value)) { - return { - content: ChangesView.LONG_COMMIT, - type: InputBox.MessageType.WARNING - }; - } - - return null; - } - }, - ariaLabel: nls.localize('commitMessageAriaLabel', "Git: Type commit message and press {0} to commit", ChangesView.COMMIT_KEYBINDING), - flexibleHeight: true - }); - this.toDispose.push(attachInputBoxStyler(this.commitInputBox, this.themeService)); - - this.commitInputBox.onDidChange((value) => this.emit('change', value)); - this.commitInputBox.onDidHeightChange((value) => this.emit('heightchange', value)); - - $(this.commitInputBox.inputElement).on('keydown', (e: KeyboardEvent) => { - var keyboardEvent = new StandardKeyboardEvent(e); - - if (keyboardEvent.equals(KeyMod.CtrlCmd | KeyCode.Enter) || keyboardEvent.equals(KeyMod.CtrlCmd | KeyCode.KEY_S)) { - if (this.smartCommitAction.enabled) { - this.actionRunner.run(this.smartCommitAction).done(); - } else { - this.commitInputBox.showMessage({ content: ChangesView.NOTHING_TO_COMMIT, formatContent: true, type: InputBox.MessageType.INFO }); - } - } - }).on('blur', () => { - this.commitInputBox.hideMessage(); - }); - - // Status view - - this.$statusView = $('.status-view').appendTo(this.$el); - - var actionProvider = this.instantiationService.createInstance(Viewer.ActionProvider); - var renderer = this.instantiationService.createInstance(Viewer.Renderer, actionProvider, this.actionRunner); - var dnd = this.instantiationService.createInstance(Viewer.DragAndDrop); - var controller = this.instantiationService.createInstance(Viewer.Controller, actionProvider); - - this.tree = new TreeImpl.Tree(this.$statusView.getHTMLElement(), { - dataSource: new Viewer.DataSource(), - renderer: renderer, - filter: new Viewer.Filter(), - sorter: new Viewer.Sorter(), - accessibilityProvider: new Viewer.AccessibilityProvider(), - dnd: dnd, - controller: controller - }, { - indentPixels: 0, - twistiePixels: 20, - ariaLabel: nls.localize('treeAriaLabel', "Git Changes View") - }); - - this.toDispose.push(attachListStyler(this.tree, this.themeService)); - this.tree.setInput(this.gitService.getModel().getStatus()); - this.tree.expandAll(this.gitService.getModel().getStatus().getGroups()); - - this.toDispose.push(this.tree.addListener('selection', (e) => this.onSelection(e))); - this.toDispose.push(this.commitInputBox.onDidHeightChange(() => this.layout())); - } - - public focus(): void { - var selection = this.tree.getSelection(); - if (selection.length > 0) { - this.tree.reveal(selection[0], 0.5).done(null, Errors.onUnexpectedError); - } - - this.commitInputBox.focus(); - } - - public layout(dimension: Builder.Dimension = this.currentDimension): void { - if (!dimension) { - return; - } - - this.currentDimension = dimension; - - this.commitInputBox.layout(); - var statusViewHeight = dimension.height - (this.commitInputBox.height + 12 /* margin */); - this.$statusView.size(dimension.width, statusViewHeight); - this.tree.layout(statusViewHeight); - - if (this.commitInputBox.height === 134) { - this.$commitView.addClass('scroll'); - } else { - this.$commitView.removeClass('scroll'); - } - } - - public setVisible(visible: boolean): WinJS.TPromise { - this.visible = visible; - - if (visible) { - this.tree.onVisible(); - this.updateCommitInputTemplate(); - return this.onEditorsChanged(this.editorService.getActiveEditorInput()); - } else { - this.tree.onHidden(); - return WinJS.TPromise.as(null); - } - } - - private onUndoLastCommit(commit: git.ICommit): void { - if (this.commitInputBox.value) { - return; - } - - this.commitInputBox.value = commit.message; - } - - private updateCommitInputTemplate(): void { - if (this.commitInputBox.value) { - return; - } - - this.gitService.getCommitTemplate() - .then(template => template && (this.commitInputBox.value = template)) - .done(null, Errors.onUnexpectedError); - } - - public getControl(): Tree.ITree { - return this.tree; - } - - public getActions(): Actions.IAction[] { - if (!this.actions) { - this.actions = [ - this.smartCommitAction, - this.instantiationService.createInstance(GitActions.RefreshAction) - ]; - - this.actions.forEach(a => this.toDispose.push(a)); - } - - return this.actions; - } - - public getSecondaryActions(): Actions.IAction[] { - if (!this.secondaryActions) { - this.secondaryActions = [ - this.instantiationService.createInstance(GitActions.SyncAction, GitActions.SyncAction.ID, GitActions.SyncAction.LABEL), - this.instantiationService.createInstance(GitActions.PullAction, GitActions.PullAction.ID, GitActions.PullAction.LABEL), - this.instantiationService.createInstance(GitActions.PullWithRebaseAction, GitActions.PullWithRebaseAction.ID, GitActions.PullWithRebaseAction.LABEL), - this.instantiationService.createInstance(GitActions.PushAction, GitActions.PushAction.ID, GitActions.PushAction.LABEL), - this.instantiationService.createInstance(GitActions.PushToRemoteAction, GitActions.PushToRemoteAction.ID, GitActions.PushToRemoteAction.LABEL), - new ActionBar.Separator(), - this.instantiationService.createInstance(GitActions.PublishAction, GitActions.PublishAction.ID, GitActions.PublishAction.LABEL), - new ActionBar.Separator(), - this.instantiationService.createInstance(GitActions.CommitAction, this), - this.instantiationService.createInstance(GitActions.CommitSignedOffAction, this), - this.instantiationService.createInstance(GitActions.CommitAmendAction, this), - this.instantiationService.createInstance(GitActions.StageAndCommitAction, this, GitActions.StageAndCommitAction.ID, GitActions.StageAndCommitAction.LABEL, GitActions.StageAndCommitAction.CSSCLASS), - this.instantiationService.createInstance(GitActions.StageAndCommitSignedOffAction, this), - this.instantiationService.createInstance(GitActions.UndoLastCommitAction, GitActions.UndoLastCommitAction.ID, GitActions.UndoLastCommitAction.LABEL), - new ActionBar.Separator(), - this.instantiationService.createInstance(GitActions.GlobalUnstageAction), - this.instantiationService.createInstance(GitActions.GlobalUndoAction), - new ActionBar.Separator(), - new Actions.Action('show.gitOutput', nls.localize('showOutput', "Show Git Output"), null, true, () => this.outputService.getChannel('Git').show()) - ]; - - this.secondaryActions.forEach(a => this.toDispose.push(a)); - } - - return this.secondaryActions; - } - - // ICommitState - - public getCommitMessage(): string { - return Strings.trim(this.commitInputBox.value); - } - - public onEmptyCommitMessage(): void { - this.commitInputBox.focus(); - this.commitInputBox.showMessage({ content: ChangesView.NEED_MESSAGE, formatContent: true, type: InputBox.MessageType.INFO }); - } - - // Events - - private onGitModelUpdate(): void { - if (this.tree) { - this.tree.refresh().done(() => { - return this.tree.expandAll(this.gitService.getModel().getStatus().getGroups()); - }); - } - } - - private onEditorsChanged(input: IEditorInput): WinJS.TPromise { - if (!this.tree) { - return WinJS.TPromise.as(null); - } - - var status = this.getStatusFromInput(input); - - if (!status) { - this.tree.clearSelection(); - } - - if (this.visible && this.tree.getSelection().indexOf(status) === -1) { - return this.tree.reveal(status, 0.5).then(() => { - this.tree.setSelection([status], { origin: 'implicit' }); - }); - } - - return WinJS.TPromise.as(null); - } - - private onSelection(e: Tree.ISelectionEvent): void { - if (e.payload && e.payload && e.payload.origin === 'implicit') { - return; - } - - if (e.selection.length !== 1) { - return; - } - - var element = e.selection[0]; - - if (!(element instanceof GitModel.FileStatus)) { - return; - } - - if (e.payload && e.payload.origin === 'keyboard' && !(e.payload.originalEvent).equals(KeyCode.Enter)) { - return; - } - - var isMouseOrigin = e.payload && (e.payload.origin === 'mouse'); - - if (isMouseOrigin && (e.payload.originalEvent.metaKey || e.payload.originalEvent.shiftKey)) { - return; - } - - var isDoubleClick = isMouseOrigin && e.payload.originalEvent && e.payload.originalEvent.detail === 2; - - var status = element; - - this.gitService.getInput(status).done((input) => { - var options = new WorkbenchEditorCommon.TextDiffEditorOptions(); - - if (isMouseOrigin) { - options.preserveFocus = true; - - var originalEvent: MouseEvent = e && e.payload && e.payload.origin === 'mouse' && e.payload.originalEvent; - if (originalEvent && originalEvent.detail === 2) { - options.preserveFocus = false; - originalEvent.preventDefault(); // focus moves to editor, we need to prevent default - } - } - - options.forceOpen = true; - options.pinned = isDoubleClick; - - var sideBySide = (e && e.payload && e.payload.originalEvent && e.payload.originalEvent.altKey); - - return this.editorService.openEditor(input, options, sideBySide); - }, (e) => { - if (e.gitErrorCode === git.GitErrorCodes.CantOpenResource) { - this.messageService.show(Severity.Warning, e); - return; - } - - this.messageService.show(Severity.Error, e); - }); - } - - private onGitOperationStart(operation: git.IGitOperation): void { - if (operation.id === git.ServiceOperations.COMMIT) { - if (this.commitInputBox) { - this.commitInputBox.disable(); - } - } else if (operation.id === git.ServiceOperations.RESET) { - const promise = this.gitService.getCommit('HEAD'); - const listener = this.gitService.addListener(git.ServiceEvents.OPERATION_END, e => { - if (e.operation.id === git.ServiceOperations.RESET && !e.error) { - promise.done(c => this.onUndoLastCommit(c)); - listener.dispose(); - } - }); - } - } - - private onGitOperationEnd(e: { operation: git.IGitOperation; error: any; }): void { - if (e.operation.id === git.ServiceOperations.COMMIT) { - if (this.commitInputBox) { - this.commitInputBox.enable(); - - if (!e.error) { - this.commitInputBox.value = ''; - this.updateCommitInputTemplate(); - } - } - } - } - - // Misc - - private getStatusFromInput(input: IEditorInput): git.IFileStatus { - if (!input) { - return null; - } - - if (input instanceof GitEditorInputs.GitDiffEditorInput) { - return (input).getFileStatus(); - } - - if (input instanceof GitEditorInputs.NativeGitIndexStringEditorInput) { - return (input).getFileStatus() || null; - } - - const resource = WorkbenchEditorCommon.toResource(input, { filter: 'file' }); - if (resource) { - const workspaceRoot = this.contextService.getWorkspace().resource.fsPath; - if (!workspaceRoot || !isEqualOrParent(resource.fsPath, workspaceRoot, !Platform.isLinux /* ignorecase */)) { - return null; // out of workspace not yet supported - } - - const repositoryRoot = this.gitService.getModel().getRepositoryRoot(); - if (!repositoryRoot || !isEqualOrParent(resource.fsPath, repositoryRoot, !Platform.isLinux /* ignorecase */)) { - return null; // out of repository not supported - } - - const repositoryRelativePath = paths.normalize(paths.relative(repositoryRoot, resource.fsPath)); - - var status = this.gitService.getModel().getStatus().getWorkingTreeStatus().find(repositoryRelativePath); - if (status && (status.getStatus() === git.Status.UNTRACKED || status.getStatus() === git.Status.IGNORED)) { - return status; - } - - status = this.gitService.getModel().getStatus().getMergeStatus().find(repositoryRelativePath); - if (status) { - return status; - } - } - - return null; - } - - public dispose(): void { - if (this.$el) { - this.$el.dispose(); - this.$el = null; - } - - this.toDispose = Lifecycle.dispose(this.toDispose); - - super.dispose(); - } -} diff --git a/src/vs/workbench/parts/git/browser/views/changes/changesViewer.ts b/src/vs/workbench/parts/git/browser/views/changes/changesViewer.ts deleted file mode 100644 index 4dd5130e98743..0000000000000 --- a/src/vs/workbench/parts/git/browser/views/changes/changesViewer.ts +++ /dev/null @@ -1,921 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import winjs = require('vs/base/common/winjs.base'); -import nls = require('vs/nls'); -import platform = require('vs/base/common/platform'); -import paths = require('vs/base/common/paths'); -import severity from 'vs/base/common/severity'; -import lifecycle = require('vs/base/common/lifecycle'); -import dom = require('vs/base/browser/dom'); -import keyboard = require('vs/base/browser/keyboardEvent'); -import mouse = require('vs/base/browser/mouseEvent'); -import comparers = require('vs/base/common/comparers'); -import actions = require('vs/base/common/actions'); -import actionbar = require('vs/base/browser/ui/actionbar/actionbar'); -import countbadge = require('vs/base/browser/ui/countBadge/countBadge'); -import tree = require('vs/base/parts/tree/browser/tree'); -import treednd = require('vs/base/parts/tree/browser/treeDnd'); -import treedefaults = require('vs/base/parts/tree/browser/treeDefaults'); -import * as git from 'vs/workbench/parts/git/common/git'; -import gitmodel = require('vs/workbench/parts/git/common/gitModel'); -import gitactions = require('vs/workbench/parts/git/browser/gitActions'); -import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IMessageService } from 'vs/platform/message/common/message'; -import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import URI from 'vs/base/common/uri'; - -import IGitService = git.IGitService; - -function toReadablePath(path: string): string { - if (!platform.isWindows) { - return path; - } - - return path.replace(/\//g, '\\'); -} - -const $ = dom.$; - -export class ActionContainer implements lifecycle.IDisposable { - - private cache: { [actionId: string]: actions.IAction; }; - private instantiationService: IInstantiationService; - - constructor(instantiationService: IInstantiationService) { - this.cache = {}; - this.instantiationService = instantiationService; - } - - protected getAction(ctor: any, ...args: any[]): any { - var action = this.cache[ctor.ID]; - - if (!action) { - args.unshift(ctor); - action = this.cache[ctor.ID] = this.instantiationService.createInstance.apply(this.instantiationService, args); - } - - return action; - } - - public dispose(): void { - Object.keys(this.cache).forEach(k => { - this.cache[k].dispose(); - }); - - this.cache = null; - } -} - -export class DataSource implements tree.IDataSource { - - public getId(tree: tree.ITree, element: any): string { - if (element instanceof gitmodel.StatusModel) { - return 'root'; - } else if (element instanceof gitmodel.StatusGroup) { - var statusGroup = element; - - switch (statusGroup.getType()) { - case git.StatusType.INDEX: return 'index'; - case git.StatusType.WORKING_TREE: return 'workingTree'; - case git.StatusType.MERGE: return 'merge'; - default: throw new Error('Invalid group type'); - } - } - - var status = element; - return status.getId(); - } - - public hasChildren(tree: tree.ITree, element: any): boolean { - if (element instanceof gitmodel.StatusModel) { - return true; - } else if (element instanceof gitmodel.StatusGroup) { - var statusGroup = element; - return statusGroup.all().length > 0; - } - return false; - } - - public getChildren(tree: tree.ITree, element: any): winjs.Promise { - if (element instanceof gitmodel.StatusModel) { - var model = element; - return winjs.TPromise.as(model.getGroups()); - - } else if (element instanceof gitmodel.StatusGroup) { - var statusGroup = element; - return winjs.TPromise.as(statusGroup.all()); - } - - return winjs.TPromise.as([]); - } - - public getParent(tree: tree.ITree, element: any): winjs.Promise { - return winjs.TPromise.as(null); - } -} - -export class ActionProvider extends ActionContainer implements tree.IActionProvider { - - private gitService: git.IGitService; - - constructor( @IInstantiationService instantiationService: IInstantiationService, @IGitService gitService: IGitService) { - super(instantiationService); - this.gitService = gitService; - } - - public hasActions(tree: tree.ITree, element: any): boolean { - if (element instanceof gitmodel.FileStatus) { - return true; - } else if (element instanceof gitmodel.StatusGroup && (element).all().length > 0) { - return true; - } - return false; - } - - public getActions(tree: tree.ITree, element: any): winjs.TPromise { - if (element instanceof gitmodel.StatusGroup) { - return winjs.TPromise.as(this.getActionsForGroupStatusType(element.getType())); - } else { - return winjs.TPromise.as(this.getActionsForFileStatusType(element.getType())); - } - } - - public getActionsForFileStatusType(statusType: git.StatusType): actions.IAction[] { - switch (statusType) { - case git.StatusType.INDEX: - return [this.getAction(gitactions.UnstageAction)]; - case git.StatusType.WORKING_TREE: - return [this.getAction(gitactions.UndoAction), this.getAction(gitactions.StageAction)]; - case git.StatusType.MERGE: - return [this.getAction(gitactions.StageAction)]; - default: - return []; - } - } - - public getActionsForGroupStatusType(statusType: git.StatusType): actions.IAction[] { - switch (statusType) { - case git.StatusType.INDEX: - return [this.getAction(gitactions.GlobalUnstageAction)]; - case git.StatusType.WORKING_TREE: - return [this.getAction(gitactions.GlobalUndoAction), this.getAction(gitactions.GlobalStageAction)]; - case git.StatusType.MERGE: - return [this.getAction(gitactions.StageAction)]; - default: - return []; - } - } - - public hasSecondaryActions(tree: tree.ITree, element: any): boolean { - return this.hasActions(tree, element); - } - - public getSecondaryActions(tree: tree.ITree, element: any): winjs.TPromise { - return this.getActions(tree, element).then((actions: actions.IAction[]) => { - - if (element instanceof gitmodel.FileStatus) { - var fileStatus = element; - var status = fileStatus.getStatus(); - - actions.push(new actionbar.Separator()); - - if (status !== git.Status.DELETED && status !== git.Status.INDEX_DELETED) { - actions.push(this.getAction(gitactions.OpenFileAction)); - } - - actions.push(this.getAction(gitactions.OpenChangeAction)); - } - - actions.reverse(); - return actions; - }); - } - - public getActionItem(tree: tree.ITree, element: any, action: actions.IAction): actionbar.IActionItem { - return null; - } -} - -interface IFileStatusTemplateData { - root: HTMLElement; - status: HTMLElement; - name: HTMLElement; - folder: HTMLElement; - renameName: HTMLElement; - renameFolder: HTMLElement; - actionBar: actionbar.ActionBar; -} - -interface IStatusGroupTemplateData { - root: HTMLElement; - count: countbadge.CountBadge; - actionBar: actionbar.ActionBar; -} - -const STAGED_CHANGES = nls.localize('stagedChanges', "Staged Changes"); -const CHANGES = nls.localize('allChanges', "Changes"); -const MERGE_CHANGES = nls.localize('mergeChanges', "Merge Changes"); - -export class Renderer implements tree.IRenderer { - - constructor( - private actionProvider: ActionProvider, - private actionRunner: actions.IActionRunner, - @IMessageService private messageService: IMessageService, - @IGitService private gitService: IGitService, - @IWorkspaceContextService private contextService: IWorkspaceContextService - ) { - // noop - } - - public getHeight(tree: tree.ITree, element: any): number { - return 22; - } - - public getTemplateId(tree: tree.ITree, element: any): string { - if (element instanceof gitmodel.StatusGroup) { - switch (element.getType()) { - case git.StatusType.INDEX: return 'index'; - case git.StatusType.WORKING_TREE: return 'workingTree'; - case git.StatusType.MERGE: return 'merge'; - } - } - - if (element instanceof gitmodel.FileStatus) { - switch (element.getType()) { - case git.StatusType.INDEX: return 'file:index'; - case git.StatusType.WORKING_TREE: return 'file:workingTree'; - case git.StatusType.MERGE: return 'file:merge'; - } - } - - return null; - } - - public renderTemplate(tree: tree.ITree, templateId: string, container: HTMLElement): any { - if (/^file:/.test(templateId)) { - return this.renderFileStatusTemplate(Renderer.templateIdToStatusType(templateId), container); - } else { - return this.renderStatusGroupTemplate(Renderer.templateIdToStatusType(templateId), container); - } - } - - private renderStatusGroupTemplate(statusType: git.StatusType, container: HTMLElement): IStatusGroupTemplateData { - var data: IStatusGroupTemplateData = Object.create(null); - - data.root = dom.append(container, $('.status-group')); - - switch (statusType) { - case git.StatusType.INDEX: data.root.textContent = STAGED_CHANGES; break; - case git.StatusType.WORKING_TREE: data.root.textContent = CHANGES; break; - case git.StatusType.MERGE: data.root.textContent = MERGE_CHANGES; break; - } - - const wrapper = dom.append(container, $('.count-badge-wrapper')); - data.count = new countbadge.CountBadge(wrapper); - - data.actionBar = new actionbar.ActionBar(container, { actionRunner: this.actionRunner }); - data.actionBar.push(this.actionProvider.getActionsForGroupStatusType(statusType), { icon: true, label: false }); - data.actionBar.addListener('run', e => e.error && this.onError(e.error)); - - return data; - } - - private renderFileStatusTemplate(statusType: git.StatusType, container: HTMLElement): IFileStatusTemplateData { - var data: IFileStatusTemplateData = Object.create(null); - - data.root = dom.append(container, $('.file-status')); - data.status = dom.append(data.root, $('span.status')); - data.name = dom.append(data.root, $('a.name.plain')); - data.folder = dom.append(data.root, $('span.folder')); - - var rename = dom.append(data.root, $('span.rename')); - var arrow = dom.append(rename, $('span.rename-arrow')); - arrow.textContent = '←'; - - data.renameName = dom.append(rename, $('span.rename-name')); - data.renameFolder = dom.append(rename, $('span.rename-folder')); - - data.actionBar = new actionbar.ActionBar(container, { actionRunner: this.actionRunner }); - data.actionBar.push(this.actionProvider.getActionsForFileStatusType(statusType), { icon: true, label: false }); - data.actionBar.addListener('run', e => e.error && this.onError(e.error)); - - return data; - } - - public renderElement(tree: tree.ITree, element: any, templateId: string, templateData: any): void { - if (/^file:/.test(templateId)) { - this.renderFileStatus(tree, element, templateData); - } else { - Renderer.renderStatusGroup(element, templateData); - } - } - - private static renderStatusGroup(statusGroup: git.IStatusGroup, data: IStatusGroupTemplateData): void { - data.actionBar.context = statusGroup; - data.count.setCount(statusGroup.all().length); - } - - private renderFileStatus(tree: tree.ITree, fileStatus: git.IFileStatus, data: IFileStatusTemplateData): void { - data.actionBar.context = { - tree: tree, - fileStatus: fileStatus - }; - - const repositoryRoot = this.gitService.getModel().getRepositoryRoot(); - - const status = fileStatus.getStatus(); - const renamePath = fileStatus.getRename(); - const path = fileStatus.getPath(); - const lastSlashIndex = path.lastIndexOf('/'); - const name = lastSlashIndex === -1 ? path : path.substr(lastSlashIndex + 1, path.length); - const folder = (lastSlashIndex === -1 ? '' : path.substr(0, lastSlashIndex)); - - data.root.className = 'file-status ' + Renderer.statusToClass(status); - data.status.textContent = Renderer.statusToChar(status); - data.status.title = Renderer.statusToTitle(status); - - const resource = URI.file(paths.normalize(paths.join(repositoryRoot, path))); - let isInWorkspace = this.contextService.isInsideWorkspace(resource); - - let rename = ''; - let renameFolder = ''; - - if (renamePath) { - const renameLastSlashIndex = renamePath.lastIndexOf('/'); - rename = renameLastSlashIndex === -1 ? renamePath : renamePath.substr(renameLastSlashIndex + 1, renamePath.length); - renameFolder = (renameLastSlashIndex === -1 ? '' : renamePath.substr(0, renameLastSlashIndex)); - - data.renameName.textContent = name; - data.renameFolder.textContent = folder; - - const resource = URI.file(paths.normalize(paths.join(repositoryRoot, renamePath))); - isInWorkspace = this.contextService.isInsideWorkspace(resource); - } - - if (isInWorkspace) { - data.root.title = ''; - } else { - data.root.title = nls.localize('outsideOfWorkspace', "This file is located outside the current workspace."); - data.root.className += ' out-of-workspace'; - } - - data.name.textContent = rename || name; - data.name.title = renamePath || path; - data.folder.textContent = toReadablePath(renameFolder || folder); - } - - public disposeTemplate(tree: tree.ITree, templateId: string, templateData: any): void { - if (/^file:/.test(templateId)) { - Renderer.disposeFileStatusTemplate(templateData); - } - } - - private static disposeFileStatusTemplate(templateData: IFileStatusTemplateData): void { - templateData.actionBar.dispose(); - } - - private static statusToChar(status: git.Status): string { - switch (status) { - case git.Status.INDEX_MODIFIED: return nls.localize('modified-char', "M"); - case git.Status.MODIFIED: return nls.localize('modified-char', "M"); - case git.Status.INDEX_ADDED: return nls.localize('added-char', "A"); - case git.Status.INDEX_DELETED: return nls.localize('deleted-char', "D"); - case git.Status.DELETED: return nls.localize('deleted-char', "D"); - case git.Status.INDEX_RENAMED: return nls.localize('renamed-char', "R"); - case git.Status.INDEX_COPIED: return nls.localize('copied-char', "C"); - case git.Status.UNTRACKED: return nls.localize('untracked-char', "U"); - case git.Status.IGNORED: return nls.localize('ignored-char', "!"); - case git.Status.BOTH_DELETED: return nls.localize('deleted-char', "D"); - case git.Status.ADDED_BY_US: return nls.localize('added-char', "A"); - case git.Status.DELETED_BY_THEM: return nls.localize('deleted-char', "D"); - case git.Status.ADDED_BY_THEM: return nls.localize('added-char', "A"); - case git.Status.DELETED_BY_US: return nls.localize('deleted-char', "D"); - case git.Status.BOTH_ADDED: return nls.localize('added-char', "A"); - case git.Status.BOTH_MODIFIED: return nls.localize('modified-char', "M"); - default: return ''; - } - } - - public static statusToTitle(status: git.Status): string { - switch (status) { - case git.Status.INDEX_MODIFIED: return nls.localize('title-index-modified', "Modified in index"); - case git.Status.MODIFIED: return nls.localize('title-modified', "Modified"); - case git.Status.INDEX_ADDED: return nls.localize('title-index-added', "Added to index"); - case git.Status.INDEX_DELETED: return nls.localize('title-index-deleted', "Deleted in index"); - case git.Status.DELETED: return nls.localize('title-deleted', "Deleted"); - case git.Status.INDEX_RENAMED: return nls.localize('title-index-renamed', "Renamed in index"); - case git.Status.INDEX_COPIED: return nls.localize('title-index-copied', "Copied in index"); - case git.Status.UNTRACKED: return nls.localize('title-untracked', "Untracked"); - case git.Status.IGNORED: return nls.localize('title-ignored', "Ignored"); - case git.Status.BOTH_DELETED: return nls.localize('title-conflict-both-deleted', "Conflict: both deleted"); - case git.Status.ADDED_BY_US: return nls.localize('title-conflict-added-by-us', "Conflict: added by us"); - case git.Status.DELETED_BY_THEM: return nls.localize('title-conflict-deleted-by-them', "Conflict: deleted by them"); - case git.Status.ADDED_BY_THEM: return nls.localize('title-conflict-added-by-them', "Conflict: added by them"); - case git.Status.DELETED_BY_US: return nls.localize('title-conflict-deleted-by-us', "Conflict: deleted by us"); - case git.Status.BOTH_ADDED: return nls.localize('title-conflict-both-added', "Conflict: both added"); - case git.Status.BOTH_MODIFIED: return nls.localize('title-conflict-both-modified', "Conflict: both modified"); - default: return ''; - } - } - - private static statusToClass(status: git.Status): string { - switch (status) { - case git.Status.INDEX_MODIFIED: return 'modified'; - case git.Status.MODIFIED: return 'modified'; - case git.Status.INDEX_ADDED: return 'added'; - case git.Status.INDEX_DELETED: return 'deleted'; - case git.Status.DELETED: return 'deleted'; - case git.Status.INDEX_RENAMED: return 'renamed'; - case git.Status.INDEX_COPIED: return 'copied'; - case git.Status.UNTRACKED: return 'untracked'; - case git.Status.IGNORED: return 'ignored'; - case git.Status.BOTH_DELETED: return 'conflict both-deleted'; - case git.Status.ADDED_BY_US: return 'conflict added-by-us'; - case git.Status.DELETED_BY_THEM: return 'conflict deleted-by-them'; - case git.Status.ADDED_BY_THEM: return 'conflict added-by-them'; - case git.Status.DELETED_BY_US: return 'conflict deleted-by-us'; - case git.Status.BOTH_ADDED: return 'conflict both-added'; - case git.Status.BOTH_MODIFIED: return 'conflict both-modified'; - default: return ''; - } - } - - private static templateIdToStatusType(templateId: string): git.StatusType { - if (/index$/.test(templateId)) { - return git.StatusType.INDEX; - } else if (/workingTree$/.test(templateId)) { - return git.StatusType.WORKING_TREE; - } else { - return git.StatusType.MERGE; - } - } - - private onError(error: any): void { - this.messageService.show(severity.Error, error); - } -} - -export class Filter implements tree.IFilter { - - public isVisible(tree: tree.ITree, element: any): boolean { - if (element instanceof gitmodel.StatusGroup) { - var statusGroup = element; - - switch (statusGroup.getType()) { - case git.StatusType.INDEX: - case git.StatusType.MERGE: - return statusGroup.all().length > 0; - case git.StatusType.WORKING_TREE: - return true; - } - } - - return true; - } -} - -export class Sorter implements tree.ISorter { - - public compare(tree: tree.ITree, element: any, otherElement: any): number { - if (!(element instanceof gitmodel.FileStatus && otherElement instanceof gitmodel.FileStatus)) { - return 0; - } - - return Sorter.compareStatus(element, otherElement); - } - - private static compareStatus(element: git.IFileStatus, otherElement: git.IFileStatus): number { - var one = element.getPathComponents(); - var other = otherElement.getPathComponents(); - var lastOne = one.length - 1; - var lastOther = other.length - 1; - - var endOne: boolean, endOther: boolean, onePart: string, otherPart: string; - - for (var i = 0; ; i++) { - endOne = lastOne === i; - endOther = lastOther === i; - - if (endOne && endOther) { - return comparers.compareFileNames(one[i], other[i]); - } else if (endOne) { - return -1; - } else if (endOther) { - return 1; - } else if ((onePart = one[i].toLowerCase()) !== (otherPart = other[i].toLowerCase())) { - return onePart < otherPart ? -1 : 1; - } - } - } -} - -export class DragAndDrop extends ActionContainer implements tree.IDragAndDrop { - - private gitService: git.IGitService; - private messageService: IMessageService; - - constructor( @IInstantiationService instantiationService: IInstantiationService, @IGitService gitService: IGitService, @IMessageService messageService: IMessageService) { - super(instantiationService); - this.gitService = gitService; - this.messageService = messageService; - } - - public getDragURI(tree: tree.ITree, element: any): string { - if (element instanceof gitmodel.StatusGroup) { - var statusGroup = element; - return 'git:' + statusGroup.getType(); - } else if (element instanceof gitmodel.FileStatus) { - var status = element; - return 'git:' + status.getType() + ':' + status.getPath(); - } - - return null; - } - - getDragLabel(tree: tree.ITree, elements: any[]): string { - if (elements.length > 1) { - return String(elements.length); - } - - const element = elements[0]; - - if (element instanceof gitmodel.StatusGroup) { - const group = element as gitmodel.StatusGroup; - - switch (group.getType()) { - case git.StatusType.INDEX: return STAGED_CHANGES; - case git.StatusType.WORKING_TREE: return CHANGES; - case git.StatusType.MERGE: return MERGE_CHANGES; - } - } - - const status = element as gitmodel.FileStatus; - return paths.basename(status.getPath()); - } - - public onDragStart(tree: tree.ITree, data: tree.IDragAndDropData, originalEvent: mouse.DragMouseEvent): void { - // no-op - } - - public onDragOver(_tree: tree.ITree, data: tree.IDragAndDropData, targetElement: any, originalEvent: mouse.DragMouseEvent): tree.IDragOverReaction { - if (!this.gitService.isIdle()) { - return tree.DRAG_OVER_REJECT; - } - - if (!(data instanceof treednd.ElementsDragAndDropData)) { - return tree.DRAG_OVER_REJECT; - } - - var elements: any[] = data.getData(); - var element = elements[0]; - - if (element instanceof gitmodel.StatusGroup) { - var statusGroup = element; - return this.onDrag(targetElement, statusGroup.getType()); - - } else if (element instanceof gitmodel.FileStatus) { - var status = element; - return this.onDrag(targetElement, status.getType()); - - } else { - return tree.DRAG_OVER_REJECT; - } - } - - private onDrag(targetElement: any, type: git.StatusType): tree.IDragOverReaction { - if (type === git.StatusType.WORKING_TREE) { - return this.onDragWorkingTree(targetElement); - } else if (type === git.StatusType.INDEX) { - return this.onDragIndex(targetElement); - } else if (type === git.StatusType.MERGE) { - return this.onDragMerge(targetElement); - } else { - return tree.DRAG_OVER_REJECT; - } - } - - private onDragWorkingTree(targetElement: any): tree.IDragOverReaction { - if (targetElement instanceof gitmodel.StatusGroup) { - var targetStatusGroup = targetElement; - return targetStatusGroup.getType() === git.StatusType.INDEX ? tree.DRAG_OVER_ACCEPT_BUBBLE_DOWN(false) : tree.DRAG_OVER_REJECT; - } else if (targetElement instanceof gitmodel.FileStatus) { - var targetStatus = targetElement; - return targetStatus.getType() === git.StatusType.INDEX ? tree.DRAG_OVER_ACCEPT_BUBBLE_UP : tree.DRAG_OVER_REJECT; - } else { - return tree.DRAG_OVER_REJECT; - } - } - - private onDragIndex(targetElement: any): tree.IDragOverReaction { - if (targetElement instanceof gitmodel.StatusGroup) { - var targetStatusGroup = targetElement; - return targetStatusGroup.getType() === git.StatusType.WORKING_TREE ? tree.DRAG_OVER_ACCEPT_BUBBLE_DOWN(false) : tree.DRAG_OVER_REJECT; - } else if (targetElement instanceof gitmodel.FileStatus) { - var targetStatus = targetElement; - return targetStatus.getType() === git.StatusType.WORKING_TREE ? tree.DRAG_OVER_ACCEPT_BUBBLE_UP : tree.DRAG_OVER_REJECT; - } else { - return tree.DRAG_OVER_REJECT; - } - } - - private onDragMerge(targetElement: any): tree.IDragOverReaction { - if (targetElement instanceof gitmodel.StatusGroup) { - var targetStatusGroup = targetElement; - return targetStatusGroup.getType() === git.StatusType.INDEX ? tree.DRAG_OVER_ACCEPT_BUBBLE_DOWN(false) : tree.DRAG_OVER_REJECT; - } else if (targetElement instanceof gitmodel.FileStatus) { - var targetStatus = targetElement; - return targetStatus.getType() === git.StatusType.INDEX ? tree.DRAG_OVER_ACCEPT_BUBBLE_UP : tree.DRAG_OVER_REJECT; - } else { - return tree.DRAG_OVER_REJECT; - } - } - - public drop(tree: tree.ITree, data: tree.IDragAndDropData, targetElement: any, originalEvent: mouse.DragMouseEvent): void { - var elements: any[] = data.getData(); - var element = elements[0]; - var files: git.IFileStatus[]; - - if (element instanceof gitmodel.StatusGroup) { - files = (element).all(); - // } else if (element instanceof gitmodel.FileStatus) { - // files = [ element ]; - } else { - files = elements; - // throw new Error('Invalid drag and drop data.'); - } - - var targetGroup = targetElement; - - // Add files to index - if (targetGroup.getType() === git.StatusType.INDEX) { - this.getAction(gitactions.StageAction).run(files).done(null, (e: Error) => this.onError(e)); - } - - // Remove files from index - if (targetGroup.getType() === git.StatusType.WORKING_TREE) { - this.getAction(gitactions.UnstageAction).run(files).done(null, (e: Error) => this.onError(e)); - } - } - - private onError(error: any): void { - this.messageService.show(severity.Error, error); - } -} - -export class AccessibilityProvider implements tree.IAccessibilityProvider { - - public getAriaLabel(tree: tree.ITree, element: any): string { - if (element instanceof gitmodel.FileStatus) { - const fileStatus = element; - const status = fileStatus.getStatus(); - const path = fileStatus.getPath(); - const lastSlashIndex = path.lastIndexOf('/'); - const name = lastSlashIndex === -1 ? path : path.substr(lastSlashIndex + 1, path.length); - const folder = (lastSlashIndex === -1 ? '' : path.substr(0, lastSlashIndex)); - - return nls.localize('fileStatusAriaLabel', "File {0} in folder {1} has status: {2}, Git", name, folder, Renderer.statusToTitle(status)); - } - - if (element instanceof gitmodel.StatusGroup) { - switch ((element).getType()) { - case git.StatusType.INDEX: return nls.localize('ariaLabelStagedChanges', "Staged Changes, Git"); - case git.StatusType.WORKING_TREE: return nls.localize('ariaLabelChanges', "Changes, Git"); - case git.StatusType.MERGE: return nls.localize('ariaLabelMerge', "Merge, Git"); - } - } - return undefined; - } -} - -export class Controller extends treedefaults.DefaultController { - - private contextMenuService: IContextMenuService; - private actionProvider: tree.IActionProvider; - - constructor(actionProvider: tree.IActionProvider, @IContextMenuService contextMenuService: IContextMenuService) { - super({ clickBehavior: treedefaults.ClickBehavior.ON_MOUSE_UP }); - - this.actionProvider = actionProvider; - this.contextMenuService = contextMenuService; - - this.downKeyBindingDispatcher.set(KeyMod.Shift | KeyCode.UpArrow, this.onUp.bind(this)); - this.downKeyBindingDispatcher.set(KeyMod.Shift | KeyCode.DownArrow, this.onDown.bind(this)); - this.downKeyBindingDispatcher.set(KeyMod.Shift | KeyCode.PageUp, this.onPageUp.bind(this)); - this.downKeyBindingDispatcher.set(KeyMod.Shift | KeyCode.PageDown, this.onPageDown.bind(this)); - } - - protected onLeftClick(tree: tree.ITree, element: any, event: mouse.IMouseEvent): boolean { - // Status group should never get selected nor expanded/collapsed - if (element instanceof gitmodel.StatusGroup) { - event.preventDefault(); - event.stopPropagation(); - - return true; - } - - if (event.shiftKey) { - var focus = tree.getFocus(); - - if (!(focus instanceof gitmodel.FileStatus) || !(element instanceof gitmodel.FileStatus)) { - return undefined; - } - - var focusStatus = focus; - var elementStatus = element; - - if (focusStatus.getType() !== elementStatus.getType()) { - return undefined; - } - - if (this.canSelect(tree, element)) { - tree.setFocus(element); - if (tree.isSelected(element)) { - tree.deselectRange(focusStatus, elementStatus); - } else { - tree.selectRange(focusStatus, elementStatus); - } - } - - return undefined; - } - - tree.setFocus(element); - - if (platform.isMacintosh ? event.metaKey : event.ctrlKey) { - if (this.canSelect(tree, element)) { - tree.toggleSelection(element, { origin: 'mouse', originalEvent: event }); - } - - return undefined; - } - - return super.onLeftClick(tree, element, event); - } - - protected onEnter(tree: tree.ITree, event: keyboard.IKeyboardEvent): boolean { - var element = tree.getFocus(); - - // Status group should never get selected nor expanded/collapsed - if (element instanceof gitmodel.StatusGroup) { - event.preventDefault(); - event.stopPropagation(); - - return true; - } - - return super.onEnter(tree, event); - } - - protected onSpace(tree: tree.ITree, event: keyboard.IKeyboardEvent): boolean { - var focus = tree.getFocus(); - - if (!focus) { - event.preventDefault(); - event.stopPropagation(); - return true; - } - - if (!this.canSelect(tree, focus)) { - return false; - } - - tree.toggleSelection(focus, { origin: 'keyboard', originalEvent: event }); - event.preventDefault(); - event.stopPropagation(); - return true; - } - - public onContextMenu(tree: tree.ITree, element: any, event: tree.ContextMenuEvent): boolean { - if (event.target && event.target.tagName && event.target.tagName.toLowerCase() === 'input') { - return false; - } - - event.preventDefault(); - event.stopPropagation(); - - tree.setFocus(element); - - if (this.actionProvider.hasSecondaryActions(tree, element)) { - var anchor = { x: event.posx + 1, y: event.posy }; - var context = { - selection: tree.getSelection(), - focus: element - }; - - this.contextMenuService.showContextMenu({ - getAnchor: () => anchor, - getActions: () => this.actionProvider.getSecondaryActions(tree, element), - getActionItem: this.actionProvider.getActionItem.bind(this.actionProvider, tree, element), - getActionsContext: () => context, - onHide: (wasCancelled?: boolean) => { - if (wasCancelled) { - tree.DOMFocus(); - } - } - }); - - return true; - } - - return false; - } - - protected onLeft(tree: tree.ITree, event: keyboard.IKeyboardEvent): boolean { - return true; - } - - protected onRight(tree: tree.ITree, event: keyboard.IKeyboardEvent): boolean { - return true; - } - - protected onUp(tree: tree.ITree, event: keyboard.IKeyboardEvent): boolean { - var oldFocus = tree.getFocus(); - var base = super.onUp(tree, event); - - if (!base || !event.shiftKey) { - return false; - } - - return this.shiftSelect(tree, oldFocus, event); - } - - protected onPageUp(tree: tree.ITree, event: keyboard.IKeyboardEvent): boolean { - var oldFocus = tree.getFocus(); - var base = super.onPageUp(tree, event); - - if (!base || !event.shiftKey) { - return false; - } - - return this.shiftSelect(tree, oldFocus, event); - } - - protected onDown(tree: tree.ITree, event: keyboard.IKeyboardEvent): boolean { - var oldFocus = tree.getFocus(); - var base = super.onDown(tree, event); - - if (!base || !event.shiftKey) { - return false; - } - - return this.shiftSelect(tree, oldFocus, event); - } - - protected onPageDown(tree: tree.ITree, event: keyboard.IKeyboardEvent): boolean { - var oldFocus = tree.getFocus(); - var base = super.onPageDown(tree, event); - - if (!base || !event.shiftKey) { - return false; - } - - return this.shiftSelect(tree, oldFocus, event); - } - - private canSelect(tree: tree.ITree, ...elements: any[]): boolean { - if (elements.some(e => e instanceof gitmodel.StatusGroup || e instanceof gitmodel.StatusModel)) { - return false; - } - - return elements.every(e => { - var first = tree.getSelection()[0]; - var clicked = e; - return !first || (first.getType() === clicked.getType()); - }); - } - - private shiftSelect(tree: tree.ITree, oldFocus: any, event: keyboard.IKeyboardEvent): boolean { - var payload = { origin: 'keyboard', originalEvent: event }; - var focus = tree.getFocus(); - - if (focus === oldFocus) { - return false; - } - - var oldFocusIsSelected = tree.isSelected(oldFocus); - var focusIsSelected = tree.isSelected(focus); - - if (oldFocusIsSelected && focusIsSelected) { - tree.deselectRange(focus, oldFocus, payload); - } else if (!oldFocusIsSelected && !focusIsSelected) { - if (this.canSelect(tree, oldFocus, focus)) { - tree.selectRange(focus, oldFocus, payload); - } - } else if (oldFocusIsSelected) { - if (this.canSelect(tree, focus)) { - tree.selectRange(focus, oldFocus, payload); - } - } else { - tree.deselectRange(focus, oldFocus, payload); - } - - return true; - } -} diff --git a/src/vs/workbench/parts/git/browser/views/disabled/disabledView.css b/src/vs/workbench/parts/git/browser/views/disabled/disabledView.css deleted file mode 100644 index f5e5b1994a5df..0000000000000 --- a/src/vs/workbench/parts/git/browser/views/disabled/disabledView.css +++ /dev/null @@ -1,8 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -.git-viewlet > .disabled-view { - padding: 0 20px 0 20px; -} diff --git a/src/vs/workbench/parts/git/browser/views/disabled/disabledView.ts b/src/vs/workbench/parts/git/browser/views/disabled/disabledView.ts deleted file mode 100644 index 43351e73218b9..0000000000000 --- a/src/vs/workbench/parts/git/browser/views/disabled/disabledView.ts +++ /dev/null @@ -1,63 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import 'vs/css!./disabledView'; -import nls = require('vs/nls'); -import winjs = require('vs/base/common/winjs.base'); -import ee = require('vs/base/common/eventEmitter'); -import view = require('vs/workbench/parts/git/browser/views/view'); -import builder = require('vs/base/browser/builder'); -import actions = require('vs/base/common/actions'); - -var $ = builder.$; - -export class DisabledView - extends ee.EventEmitter - implements view.IView { - public ID = 'disabled'; - private _element: HTMLElement; - - public get element(): HTMLElement { - if (!this._element) { - this.render(); - } - - return this._element; - } - - private render(): void { - this._element = $([ - '
', - '

', nls.localize('disabled', "Git is disabled in the settings."), '

', - '
' - ].join('')).getHTMLElement(); - } - - public focus(): void { - return; - } - - public layout(dimension: builder.Dimension): void { - return; - } - - public setVisible(visible: boolean): winjs.TPromise { - return winjs.TPromise.as(null); - } - - public getControl(): ee.IEventEmitter { - return null; - } - - public getActions(): actions.IAction[] { - return []; - } - - public getSecondaryActions(): actions.IAction[] { - return []; - } -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/views/empty/emptyView.css b/src/vs/workbench/parts/git/browser/views/empty/emptyView.css deleted file mode 100644 index e7b57f201fd7d..0000000000000 --- a/src/vs/workbench/parts/git/browser/views/empty/emptyView.css +++ /dev/null @@ -1,30 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -.git-viewlet > .empty-view { - padding: 0 20px 0 20px; -} - -.git-viewlet > .empty-view > .section:not(:empty) { - margin: 20px 0; - padding-top: 20px; - border-top: 1px solid rgba(0, 0, 0, 0.05); -} - -.git-viewlet > .empty-view > .section > p:first-child { - margin-top: 0; -} - -.git-viewlet > .empty-view .monaco-inputbox { - width: 100%; - margin-bottom: 10px; -} - -.git-viewlet > .empty-view .combo-box { - width: 100%; - min-width: inherit; - padding: 4px 4px 4px 0; - margin-bottom: 10px; -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/views/empty/emptyView.ts b/src/vs/workbench/parts/git/browser/views/empty/emptyView.ts deleted file mode 100644 index 730837e4a3892..0000000000000 --- a/src/vs/workbench/parts/git/browser/views/empty/emptyView.ts +++ /dev/null @@ -1,174 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import 'vs/css!./emptyView'; -import nls = require('vs/nls'); -import Lifecycle = require('vs/base/common/lifecycle'); -import EventEmitter = require('vs/base/common/eventEmitter'); -import DOM = require('vs/base/browser/dom'); -import { Button } from 'vs/base/browser/ui/button/button'; -import WinJS = require('vs/base/common/winjs.base'); -import Builder = require('vs/base/browser/builder'); -import Actions = require('vs/base/common/actions'); -import InputBox = require('vs/base/browser/ui/inputbox/inputBox'); -import GitView = require('vs/workbench/parts/git/browser/views/view'); -import GitActions = require('vs/workbench/parts/git/browser/gitActions'); -import { IFileService } from 'vs/platform/files/common/files'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IMessageService } from 'vs/platform/message/common/message'; -import { IGitService } from 'vs/workbench/parts/git/common/git'; -import { attachButtonStyler } from 'vs/platform/theme/common/styler'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; - -var $ = Builder.$; - -export class EmptyView extends EventEmitter.EventEmitter implements GitView.IView { - - public ID = 'empty'; - - private static EMPTY_MESSAGE = nls.localize('noGit', "This workspace isn't yet under git source control."); - - private gitService: IGitService; - private instantiationService: IInstantiationService; - private messageService: IMessageService; - private fileService: IFileService; - - private actionRunner: Actions.IActionRunner; - private refreshAction: Actions.IAction; - private isVisible: boolean; - private needsRender: boolean; - private $el: Builder.Builder; - private urlInputBox: InputBox.InputBox; - private cloneButton: Button; - private initButton: Button; - private controller: GitView.IController; - private toDispose: Lifecycle.IDisposable[]; - - constructor(controller: GitView.IController, actionRunner: Actions.IActionRunner, - @IGitService gitService: IGitService, - @IInstantiationService instantiationService: IInstantiationService, - @IMessageService messageService: IMessageService, - @IFileService fileService: IFileService, - @IThemeService private themeService: IThemeService - ) { - super(); - - this.gitService = gitService; - this.instantiationService = instantiationService; - this.messageService = messageService; - this.fileService = fileService; - - this.actionRunner = actionRunner; - this.isVisible = false; - this.needsRender = false; - this.controller = controller; - this.toDispose = []; - } - - // Properties - - private _initAction: GitActions.InitAction; - private get initAction(): GitActions.InitAction { - if (!this._initAction) { - this._initAction = this.instantiationService.createInstance(GitActions.InitAction); - } - - return this._initAction; - } - - // IView - - public get element(): HTMLElement { - this.render(); - return this.$el.getHTMLElement(); - } - - private render(): void { - if (this.$el) { - return; - } - - this.$el = $('.empty-view'); - - $('p').appendTo(this.$el).text(EmptyView.EMPTY_MESSAGE); - - var initSection = $('.section').appendTo(this.$el); - this.initButton = new Button(initSection); - attachButtonStyler(this.initButton, this.themeService); - this.initButton.label = nls.localize('gitinit', 'Initialize Git Repository'); - this.initButton.addListener('click', (e) => { - DOM.EventHelper.stop(e); - - this.disableUI(); - this.actionRunner.run(this.initAction).done(() => this.enableUI()); - }); - } - - private disableUI(): void { - if (this.urlInputBox) { - this.urlInputBox.disable(); - } - - if (this.cloneButton) { - this.cloneButton.enabled = false; - } - - this.initButton.enabled = false; - } - - private enableUI(): void { - if (this.gitService.getRunningOperations().length > 0) { - return; - } - - if (this.urlInputBox) { - this.urlInputBox.enable(); - this.urlInputBox.validate(); - } - - this.initButton.enabled = true; - } - - public focus(): void { - this.initButton.focus(); - } - - public layout(dimension: Builder.Dimension): void { - // no-op - } - - public setVisible(visible: boolean): WinJS.TPromise { - this.isVisible = visible; - - return WinJS.TPromise.as(null); - } - - public getControl(): EventEmitter.IEventEmitter { - return null; - } - - public getActions(): Actions.IAction[] { - return this.refreshAction ? [this.refreshAction] : []; - } - - public getSecondaryActions(): Actions.IAction[] { - return []; - } - - // Events - - public dispose(): void { - if (this.$el) { - this.$el.dispose(); - this.$el = null; - } - - this.toDispose = Lifecycle.dispose(this.toDispose); - - super.dispose(); - } -} diff --git a/src/vs/workbench/parts/git/browser/views/gitless/gitlessView.css b/src/vs/workbench/parts/git/browser/views/gitless/gitlessView.css deleted file mode 100644 index a06817221dadf..0000000000000 --- a/src/vs/workbench/parts/git/browser/views/gitless/gitlessView.css +++ /dev/null @@ -1,23 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -.git-viewlet > .gitless-view { - padding: 0 20px 0 20px; -} - -.git-viewlet > .gitless-view > p { - line-height: 1.5em; -} - -.git-viewlet > .gitless-view .code { - display: inline; -} - -.git-viewlet > .gitless-view a -{ - color: inherit; - font-weight: bold; - text-decoration: underline; -} diff --git a/src/vs/workbench/parts/git/browser/views/gitless/gitlessView.ts b/src/vs/workbench/parts/git/browser/views/gitless/gitlessView.ts deleted file mode 100644 index e615cf87e76f8..0000000000000 --- a/src/vs/workbench/parts/git/browser/views/gitless/gitlessView.ts +++ /dev/null @@ -1,98 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import 'vs/css!./gitlessView'; -import nls = require('vs/nls'); -import platform = require('vs/base/common/platform'); -import winjs = require('vs/base/common/winjs.base'); -import ee = require('vs/base/common/eventEmitter'); -import view = require('vs/workbench/parts/git/browser/views/view'); -import builder = require('vs/base/browser/builder'); -import actions = require('vs/base/common/actions'); - -var $ = builder.$; - -export class GitlessView - extends ee.EventEmitter - implements view.IView { - public ID = 'gitless'; - private _element: HTMLElement; - - constructor() { - super(); - } - - public get element(): HTMLElement { - if (!this._element) { - this.render(); - } - - return this._element; - } - - private render(): void { - var instructions: string; - - if (platform.isMacintosh) { - instructions = nls.localize('macInstallWith', - "You can either install it with {0}, download it from {1} or install the {2} command line developer tools, by simply typing {3} on a Terminal prompt.", - 'Homebrew', - 'git-scm.com', - 'XCode', - 'git' - ); - } else if (platform.isWindows) { - instructions = nls.localize('winInstallWith', - "You can either install it with {0} or download it from {1}.", - 'Chocolatey', - 'git-scm.com' - ); - } else if (platform.isLinux) { - instructions = nls.localize('linuxDownloadFrom', - "You can download it from {0}.", - 'git-scm.com' - ); - } else { - instructions = nls.localize('downloadFrom', - "You can download it from {0}.", - 'git-scm.com' - ); - } - - this._element = $([ - '
', - '

', nls.localize('looksLike', "It looks like git is not installed on your system."), '

', - '

', instructions, '

', - '

', nls.localize('pleaseRestart', "Once git is installed, please restart VSCode."), '

', - '
' - ].join('')).getHTMLElement(); - } - - public focus(): void { - return; - } - - public layout(dimension: builder.Dimension): void { - return; - } - - public setVisible(visible: boolean): winjs.TPromise { - return winjs.TPromise.as(null); - } - - public getControl(): ee.IEventEmitter { - return null; - } - - public getActions(): actions.IAction[] { - return []; - } - - public getSecondaryActions(): actions.IAction[] { - return []; - } -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/views/huge/hugeView.css b/src/vs/workbench/parts/git/browser/views/huge/hugeView.css deleted file mode 100644 index a428d2328c07d..0000000000000 --- a/src/vs/workbench/parts/git/browser/views/huge/hugeView.css +++ /dev/null @@ -1,12 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -.git-viewlet > .huge-view { - padding: 0 20px 0 20px; -} - -.git-viewlet > .huge-view > p { - line-height: 1.5em; -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/views/huge/hugeView.ts b/src/vs/workbench/parts/git/browser/views/huge/hugeView.ts deleted file mode 100644 index 7e6173e8422d4..0000000000000 --- a/src/vs/workbench/parts/git/browser/views/huge/hugeView.ts +++ /dev/null @@ -1,86 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import 'vs/css!./hugeView'; -import nls = require('vs/nls'); -import winjs = require('vs/base/common/winjs.base'); -import ee = require('vs/base/common/eventEmitter'); -import view = require('vs/workbench/parts/git/browser/views/view'); -import builder = require('vs/base/browser/builder'); -import actions = require('vs/base/common/actions'); -import * as dom from 'vs/base/browser/dom'; -import { IGitService } from 'vs/workbench/parts/git/common/git'; -import { onUnexpectedError } from 'vs/base/common/errors'; -import { Button } from 'vs/base/browser/ui/button/button'; -import { attachButtonStyler } from 'vs/platform/theme/common/styler'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; - -const $ = dom.$; - -export class HugeView extends ee.EventEmitter implements view.IView { - - ID = 'huge'; - private _element: HTMLElement; - - constructor( @IGitService private gitService: IGitService, @IThemeService private themeService: IThemeService) { - super(); - } - - get element(): HTMLElement { - if (!this._element) { - this.render(); - } - - return this._element; - } - - private render(): void { - this._element = $('.huge-view'); - - dom.append(this._element, $('p')).textContent = nls.localize('huge', "Your repository appears to have many active changes.\nThis can cause Code to become very slow."); - - const settingP = dom.append(this._element, $('p')); - dom.append(settingP, document.createTextNode(nls.localize('setting', "You can permanently disable this warning with the following setting:"))); - dom.append(settingP, document.createTextNode(' ')); - const pre = dom.append(settingP, $('pre')); - pre.style.display = 'inline'; - pre.textContent = 'git.allowLargeRepositories'; - - const button = new Button(this._element); - attachButtonStyler(button, this.themeService); - button.label = nls.localize('allo', "Allow large repositories"); - button.addListener('click', (e) => { - dom.EventHelper.stop(e); - this.gitService.allowHugeRepositories = true; - this.gitService.status().done(null, onUnexpectedError); - }); - } - - focus(): void { - return; - } - - layout(dimension: builder.Dimension): void { - return; - } - - setVisible(visible: boolean): winjs.TPromise { - return winjs.TPromise.as(null); - } - - getControl(): ee.IEventEmitter { - return null; - } - - getActions(): actions.IAction[] { - return []; - } - - getSecondaryActions(): actions.IAction[] { - return []; - } -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/views/notroot/notrootView.css b/src/vs/workbench/parts/git/browser/views/notroot/notrootView.css deleted file mode 100644 index 85665d2e3460d..0000000000000 --- a/src/vs/workbench/parts/git/browser/views/notroot/notrootView.css +++ /dev/null @@ -1,23 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -.git-viewlet > .notroot-view { - padding: 0 20px 0 20px; -} - -.git-viewlet > .notroot-view > p { - line-height: 1.5em; -} - -.git-viewlet > .notroot-view .code { - display: inline; -} - -.git-viewlet > .notroot-view a -{ - color: inherit; - font-weight: bold; - text-decoration: underline; -} diff --git a/src/vs/workbench/parts/git/browser/views/notroot/notrootView.ts b/src/vs/workbench/parts/git/browser/views/notroot/notrootView.ts deleted file mode 100644 index 2e9263bcb8d5f..0000000000000 --- a/src/vs/workbench/parts/git/browser/views/notroot/notrootView.ts +++ /dev/null @@ -1,63 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import 'vs/css!./notrootView'; -import nls = require('vs/nls'); -import winjs = require('vs/base/common/winjs.base'); -import ee = require('vs/base/common/eventEmitter'); -import view = require('vs/workbench/parts/git/browser/views/view'); -import builder = require('vs/base/browser/builder'); -import actions = require('vs/base/common/actions'); -const $ = builder.$; - -export class NotRootView - extends ee.EventEmitter - implements view.IView { - public ID = 'notroot'; - private _element: HTMLElement; - - public get element(): HTMLElement { - if (!this._element) { - this.render(); - } - - return this._element; - } - - private render(): void { - this._element = $([ - '
', - '

', nls.localize('wrongRoot', "This directory seems to be contained in a git repository."), '

', - '

', nls.localize('pleaseRestart', "Open the repository's root directory in order to access Git features."), '

', - '
' - ].join('')).getHTMLElement(); - } - - public focus(): void { - return; - } - - public layout(dimension: builder.Dimension): void { - return; - } - - public setVisible(visible: boolean): winjs.TPromise { - return winjs.TPromise.as(null); - } - - public getControl(): ee.IEventEmitter { - return null; - } - - public getActions(): actions.IAction[] { - return []; - } - - public getSecondaryActions(): actions.IAction[] { - return []; - } -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/views/noworkspace/noworkspaceView.css b/src/vs/workbench/parts/git/browser/views/noworkspace/noworkspaceView.css deleted file mode 100644 index c9e3e1780c0d6..0000000000000 --- a/src/vs/workbench/parts/git/browser/views/noworkspace/noworkspaceView.css +++ /dev/null @@ -1,12 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -.git-viewlet > .noworkspace-view { - padding: 0 20px 0 20px; -} - -.git-viewlet > .noworkspace-view > p { - line-height: 1.5em; -} diff --git a/src/vs/workbench/parts/git/browser/views/noworkspace/noworkspaceView.ts b/src/vs/workbench/parts/git/browser/views/noworkspace/noworkspaceView.ts deleted file mode 100644 index a75f8f249c699..0000000000000 --- a/src/vs/workbench/parts/git/browser/views/noworkspace/noworkspaceView.ts +++ /dev/null @@ -1,95 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import 'vs/css!./noworkspaceView'; -import nls = require('vs/nls'); -import * as errors from 'vs/base/common/errors'; -import winjs = require('vs/base/common/winjs.base'); -import ee = require('vs/base/common/eventEmitter'); -import env = require('vs/base/common/platform'); -import view = require('vs/workbench/parts/git/browser/views/view'); -import builder = require('vs/base/browser/builder'); -import { Button } from 'vs/base/browser/ui/button/button'; -import { IActionRunner, IAction } from 'vs/base/common/actions'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { OpenFolderAction, OpenFileFolderAction } from 'vs/workbench/browser/actions/fileActions'; -import { attachButtonStyler } from 'vs/platform/theme/common/styler'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; -const $ = builder.$; - -export class NoWorkspaceView - extends ee.EventEmitter - implements view.IView { - public ID = 'noworkspace'; - private _element: HTMLElement; - private _openFolderButton: Button; - - constructor( - private actionRunner: IActionRunner, - @IInstantiationService private instantiationService: IInstantiationService, - @IThemeService private themeService: IThemeService - ) { - super(); - } - - public get element(): HTMLElement { - if (!this._element) { - this.render(); - } - - return this._element; - } - - private render(): void { - this._element = $([ - '
', - '

', nls.localize('noWorkspaceHelp', "You have not yet opened a folder."), '

', - '

', nls.localize('pleaseRestart', "Open a folder with a Git repository in order to access Git features."), '

', - '
' - ].join('')).getHTMLElement(); - - this._openFolderButton = new Button(this._element); - attachButtonStyler(this._openFolderButton, this.themeService); - this._openFolderButton.label = nls.localize('openFolder', "Open Folder"); - this._openFolderButton.addListener('click', () => { - const actionClass = env.isMacintosh ? OpenFileFolderAction : OpenFolderAction; - const action = this.instantiationService.createInstance(actionClass, actionClass.ID, actionClass.LABEL); - this.actionRunner.run(action).done(() => { - action.dispose(); - }, err => { - action.dispose(); - errors.onUnexpectedError(err); - }); - }); - } - - public focus(): void { - if (this._openFolderButton) { - this._openFolderButton.getElement().focus(); - } - } - - public layout(dimension: builder.Dimension): void { - return; - } - - public setVisible(visible: boolean): winjs.TPromise { - return winjs.TPromise.as(null); - } - - public getControl(): ee.IEventEmitter { - return null; - } - - public getActions(): IAction[] { - return []; - } - - public getSecondaryActions(): IAction[] { - return []; - } -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/browser/views/view.ts b/src/vs/workbench/parts/git/browser/views/view.ts deleted file mode 100644 index fc0c209607a0c..0000000000000 --- a/src/vs/workbench/parts/git/browser/views/view.ts +++ /dev/null @@ -1,24 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -import Lifecycle = require('vs/base/common/lifecycle'); -import WinJS = require('vs/base/common/winjs.base'); -import EventEmitter = require('vs/base/common/eventEmitter'); -import Builder = require('vs/base/browser/builder'); -import Actions = require('vs/base/common/actions'); - -export interface IView extends Lifecycle.IDisposable { - ID: string; - element: HTMLElement; - focus(): void; - layout(dimension: Builder.Dimension): void; - setVisible(visible: boolean): WinJS.Promise; - getControl(): EventEmitter.IEventEmitter; - getActions(): Actions.IAction[]; - getSecondaryActions(): Actions.IAction[]; -} - -export interface IController { - setView(id: string): WinJS.Promise; -} diff --git a/src/vs/workbench/parts/git/common/git.ts b/src/vs/workbench/parts/git/common/git.ts deleted file mode 100644 index 1c5ddfd487595..0000000000000 --- a/src/vs/workbench/parts/git/common/git.ts +++ /dev/null @@ -1,342 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import { EditorInput } from 'vs/workbench/common/editor'; -import { IEventEmitter } from 'vs/base/common/eventEmitter'; -import { IDisposable } from 'vs/base/common/lifecycle'; -import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; -import Event from 'vs/base/common/event'; - -// Model raw interfaces - -export interface IRawFileStatus { - x: string; - y: string; - path: string; - mimetype: string; - rename?: string; -} - -export interface IRemote { - name: string; - url: string; -} - -export enum RefType { - Head, - RemoteHead, - Tag -} - -export interface IRef { - name: string; - commit: string; - type: RefType; - remote?: string; -} - -export interface IBranch extends IRef { - upstream?: string; - ahead?: number; - behind?: number; -} - -export interface IRawStatus { - repositoryRoot: string; - state?: ServiceState; - status: IRawFileStatus[]; - HEAD: IBranch; - refs: IRef[]; - remotes: IRemote[]; -} - -export interface ICommit { - hash: string; - message: string; -} - -// Model enums - -export enum StatusType { - INDEX, - WORKING_TREE, - MERGE -} - -export enum Status { - INDEX_MODIFIED, - INDEX_ADDED, - INDEX_DELETED, - INDEX_RENAMED, - INDEX_COPIED, - - MODIFIED, - DELETED, - UNTRACKED, - IGNORED, - - ADDED_BY_US, - ADDED_BY_THEM, - DELETED_BY_US, - DELETED_BY_THEM, - BOTH_ADDED, - BOTH_DELETED, - BOTH_MODIFIED -} - -// Model events - -export const ModelEvents = { - MODEL_UPDATED: 'ModelUpdated', - STATUS_MODEL_UPDATED: 'StatusModelUpdated', - HEAD_UPDATED: 'HEADUpdated', - REFS_UPDATED: 'RefsUpdated', - REMOTES_UPDATED: 'RemotesUpdated' -}; - -// Model interfaces - -export interface IFileStatus { - getId(): string; - getType(): StatusType; - getPath(): string; - getPathComponents(): string[]; - getMimetype(): string; - getStatus(): Status; - getRename(): string; - clone(): IFileStatus; - update(other: IFileStatus): void; -} - -export interface IStatusGroup extends IEventEmitter { - getType(): StatusType; - update(statusList: IFileStatus[]): void; - all(): IFileStatus[]; - find(path: string): IFileStatus; -} - -export interface IStatusSummary { - hasWorkingTreeChanges: boolean; - hasIndexChanges: boolean; - hasMergeChanges: boolean; -} - -export interface IStatusModel extends IEventEmitter { - getSummary(): IStatusSummary; - update(status: IRawFileStatus[]): void; - getIndexStatus(): IStatusGroup; - getWorkingTreeStatus(): IStatusGroup; - getMergeStatus(): IStatusGroup; - getGroups(): IStatusGroup[]; - find(path: string, type: StatusType): IFileStatus; -} - -export interface IModel extends IEventEmitter { - getRepositoryRoot(): string; - getStatus(): IStatusModel; - getHEAD(): IBranch; - getRefs(): IRef[]; - getRemotes(): IRemote[]; - update(status: IRawStatus): void; - getPS1(): string; -} - -// Service operations - -export interface IGitOperation extends IDisposable { - id: string; - run(): TPromise; -} - -// Service enums - -export enum ServiceState { - NotInitialized, - NotARepo, - NotAtRepoRoot, - OK, - Huge, - NoGit, - Disabled, - NotAWorkspace -} - -export enum RawServiceState { - OK, - GitNotFound, - Disabled -} - -export const GitErrorCodes = { - BadConfigFile: 'BadConfigFile', - AuthenticationFailed: 'AuthenticationFailed', - NoUserNameConfigured: 'NoUserNameConfigured', - NoUserEmailConfigured: 'NoUserEmailConfigured', - NoRemoteRepositorySpecified: 'NoRemoteRepositorySpecified', - NotAGitRepository: 'NotAGitRepository', - NotAtRepositoryRoot: 'NotAtRepositoryRoot', - Conflict: 'Conflict', - UnmergedChanges: 'UnmergedChanges', - PushRejected: 'PushRejected', - RemoteConnectionError: 'RemoteConnectionError', - DirtyWorkTree: 'DirtyWorkTree', - CantOpenResource: 'CantOpenResource', - GitNotFound: 'GitNotFound', - CantCreatePipe: 'CantCreatePipe', - CantAccessRemote: 'CantAccessRemote', - RepositoryNotFound: 'RepositoryNotFound' -}; - -export enum AutoFetcherState { - Disabled, - Inactive, - Active, - Fetching -} - -// Service events - -export const ServiceEvents = { - STATE_CHANGED: 'stateChanged', - REPO_CHANGED: 'repoChanged', - OPERATION_START: 'operationStart', - OPERATION_END: 'operationEnd', - OPERATION: 'operation', - ERROR: 'error', - DISPOSE: 'dispose' -}; - -// Service operations - -export const ServiceOperations = { - STATUS: 'status', - INIT: 'init', - ADD: 'add', - STAGE: 'stage', - BRANCH: 'branch', - CHECKOUT: 'checkout', - CLEAN: 'clean', - UNDO: 'undo', - RESET: 'reset', - REVERT: 'revert', - COMMIT: 'commit', - COMMAND: 'command', - BACKGROUND_FETCH: 'backgroundfetch', - PULL: 'pull', - PUSH: 'push', - SYNC: 'sync' -}; - -// Service config - -export interface IGitConfiguration { - enabled: boolean; - path: string; - autorefresh: boolean; - autofetch: boolean; - enableLongCommitWarning: boolean; - allowLargeRepositories: boolean; - confirmSync: boolean; - countBadge: string; - checkoutType: string; -} - -// Service interfaces - -export interface IAutoFetcher { - state: AutoFetcherState; - activate(): void; - deactivate(): void; -} - -export interface IGitCredentialScope { - protocol: string; - host: string; - path: string; -} - -export interface ICredentials { - username: string; - password: string; -} - -export interface IGitServiceError extends Error { - gitErrorCode: string; -} - -export interface IPushOptions { - setUpstream?: boolean; -} - -export interface IRawGitService { - onOutput: Event; - getVersion(): TPromise; - serviceState(): TPromise; - statusCount(): TPromise; - status(): TPromise; - init(): TPromise; - add(filesPaths?: string[]): TPromise; - stage(filePath: string, content: string): TPromise; - branch(name: string, checkout?: boolean): TPromise; - checkout(treeish?: string, filePaths?: string[]): TPromise; - clean(filePaths: string[]): TPromise; - undo(): TPromise; - reset(treeish: string, hard?: boolean): TPromise; - revertFiles(treeish: string, filePaths?: string[]): TPromise; - fetch(): TPromise; - pull(rebase?: boolean): TPromise; - push(remote?: string, name?: string, options?: IPushOptions): TPromise; - sync(): TPromise; - commit(message: string, amend?: boolean, stage?: boolean, signoff?: boolean): TPromise; - detectMimetypes(path: string, treeish?: string): TPromise; - show(path: string, treeish?: string): TPromise; - clone(url: string, parentPath: string): TPromise; - getCommitTemplate(): TPromise; - getCommit(ref: string): TPromise; -} - -export const GIT_SERVICE_ID = 'gitService'; - -export const IGitService = createDecorator(GIT_SERVICE_ID); - -export interface IGitService extends IEventEmitter { - _serviceBrand: any; - allowHugeRepositories: boolean; - onOutput: Event; - status(): TPromise; - init(): TPromise; - add(files?: IFileStatus[]): TPromise; - stage(filePath: string, content: string): TPromise; - branch(name: string, checkout?: boolean): TPromise; - checkout(treeish?: string, files?: IFileStatus[]): TPromise; - clean(files: IFileStatus[]): TPromise; - undo(): TPromise; - reset(treeish: string, hard?: boolean): TPromise; - revertFiles(treeish: string, files?: IFileStatus[]): TPromise; - fetch(): TPromise; - pull(rebase?: boolean): TPromise; - push(remote?: string, name?: string, options?: IPushOptions): TPromise; - sync(): TPromise; - commit(message: string, amend?: boolean, stage?: boolean, signoff?: boolean): TPromise; - detectMimetypes(path: string, treeish?: string): TPromise; - buffer(path: string, treeish?: string): TPromise; - clone(url: string, parentPath: string): TPromise; - - getState(): ServiceState; - getModel(): IModel; - getInput(status: IFileStatus): TPromise; - isInitialized(): boolean; - isIdle(): boolean; - getRunningOperations(): IGitOperation[]; - getAutoFetcher(): IAutoFetcher; - getCommitTemplate(): TPromise; - getCommit(ref: string): TPromise; -} - -export interface IAskpassService { - askpass(id: string, host: string, command: string): TPromise; -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/common/gitIpc.ts b/src/vs/workbench/parts/git/common/gitIpc.ts deleted file mode 100644 index 6f52b28e5dd72..0000000000000 --- a/src/vs/workbench/parts/git/common/gitIpc.ts +++ /dev/null @@ -1,267 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import { IChannel, eventToCall, eventFromCall } from 'vs/base/parts/ipc/common/ipc'; -import Event from 'vs/base/common/event'; -import { - IRawGitService, RawServiceState, IRawStatus, IPushOptions, IAskpassService, ICredentials, - ServiceState, IRawFileStatus, IBranch, RefType, IRef, IRemote, ICommit -} from './git'; - -type ISerializer = { to(a: A): B; from(b: B): A; }; - -export type IPCRawFileStatus = [string, string, string, string, string]; -const RawFileStatusSerializer: ISerializer = { - to: a => [a.x, a.y, a.path, a.mimetype, a.rename], - from: b => ({ x: b[0], y: b[1], path: b[2], mimetype: b[3], rename: b[4] }) -}; - -export type IPCBranch = [string, string, RefType, string, string, number, number]; -const BranchSerializer: ISerializer = { - to: a => [a.name, a.commit, a.type, a.remote, a.upstream, a.ahead, a.behind], - from: b => ({ name: b[0], commit: b[1], type: b[2], remote: b[3], upstream: b[4], ahead: b[5], behind: b[6] }) -}; - -export type IPCRef = [string, string, RefType, string]; -const RefSerializer: ISerializer = { - to: a => [a.name, a.commit, a.type, a.remote], - from: b => ({ name: b[0], commit: b[1], type: b[2], remote: b[3] }) -}; - -export type IPCRemote = [string, string]; -const RemoteSerializer: ISerializer = { - to: a => [a.name, a.url], - from: b => ({ name: b[0], url: b[1] }) -}; - -export type IPCRawStatus = [ - string, - ServiceState, - IPCRawFileStatus[], - IPCBranch, - IPCRef[], - IPCRemote[] -]; - -const RawStatusSerializer: ISerializer = { - to: a => !a ? null : [ - a.repositoryRoot, - a.state, - a.status.map(RawFileStatusSerializer.to), - BranchSerializer.to(a.HEAD), - a.refs.map(RefSerializer.to), - a.remotes.map(RemoteSerializer.to) - ], - from: b => !b ? null : { - repositoryRoot: b[0], - state: b[1], - status: b[2].map(RawFileStatusSerializer.from), - HEAD: BranchSerializer.from(b[3]), - refs: b[4].map(RefSerializer.from), - remotes: b[5].map(RemoteSerializer.from) - } -}; - -export interface IGitChannel extends IChannel { - call(command: 'getVersion'): TPromise; - call(command: 'serviceState'): TPromise; - call(command: 'statusCount'): TPromise; - call(command: 'status'): TPromise; - call(command: 'init'): TPromise; - call(command: 'add', filesPaths?: string[]): TPromise; - call(command: 'stage', args: [string, string]): TPromise; - call(command: 'branch', args: [string, boolean]): TPromise; - call(command: 'checkout', args: [string, string[]]): TPromise; - call(command: 'clean', filePaths: string[]): TPromise; - call(command: 'undo'): TPromise; - call(command: 'reset', args: [string, boolean]): TPromise; - call(command: 'revertFiles', args: [string, string[]]): TPromise; - call(command: 'fetch'): TPromise; - call(command: 'pull', rebase?: boolean): TPromise; - call(command: 'push', args: [string, string, IPushOptions]): TPromise; - call(command: 'sync'): TPromise; - call(command: 'commit', args: [string, boolean, boolean, boolean]): TPromise; - call(command: 'detectMimetypes', args: [string, string]): TPromise; - call(command: 'show', args: [string, string]): TPromise; - call(command: 'clone', args: [string, string]): TPromise; - call(command: 'onOutput'): TPromise; - call(command: 'getCommitTemplate'): TPromise; - call(command: 'getCommit', ref: string): TPromise; - call(command: string, args?: any): TPromise; -} - -export class GitChannel implements IGitChannel { - - constructor(private service: TPromise) { } - - call(command: string, args?: any): TPromise { - switch (command) { - case 'getVersion': return this.service.then(s => s.getVersion()); - case 'serviceState': return this.service.then(s => s.serviceState()); - case 'statusCount': return this.service.then(s => s.statusCount()); - case 'status': return this.service.then(s => s.status()).then(RawStatusSerializer.to); - case 'init': return this.service.then(s => s.init()).then(RawStatusSerializer.to); - case 'add': return this.service.then(s => s.add(args)).then(RawStatusSerializer.to); - case 'stage': return this.service.then(s => s.stage(args[0], args[1])).then(RawStatusSerializer.to); - case 'branch': return this.service.then(s => s.branch(args[0], args[1])).then(RawStatusSerializer.to); - case 'checkout': return this.service.then(s => s.checkout(args[0], args[1])).then(RawStatusSerializer.to); - case 'clean': return this.service.then(s => s.clean(args)).then(RawStatusSerializer.to); - case 'undo': return this.service.then(s => s.undo()).then(RawStatusSerializer.to); - case 'reset': return this.service.then(s => s.reset(args[0], args[1])).then(RawStatusSerializer.to); - case 'revertFiles': return this.service.then(s => s.revertFiles(args[0], args[1])).then(RawStatusSerializer.to); - case 'fetch': return this.service.then(s => s.fetch()).then(RawStatusSerializer.to); - case 'pull': return this.service.then(s => s.pull(args)).then(RawStatusSerializer.to); - case 'push': return this.service.then(s => s.push(args[0], args[1], args[2])).then(RawStatusSerializer.to); - case 'sync': return this.service.then(s => s.sync()).then(RawStatusSerializer.to); - case 'commit': return this.service.then(s => s.commit(args[0], args[1], args[2], args[3])).then(RawStatusSerializer.to); - case 'detectMimetypes': return this.service.then(s => s.detectMimetypes(args[0], args[1])); - case 'show': return this.service.then(s => s.show(args[0], args[1])); - case 'clone': return this.service.then(s => s.clone(args[0], args[1])); - case 'onOutput': return this.service.then(s => eventToCall(s.onOutput)); - case 'getCommitTemplate': return this.service.then(s => s.getCommitTemplate()); - case 'getCommit': return this.service.then(s => s.getCommit(args)); - } - return undefined; - } -} - -export class UnavailableGitChannel implements IGitChannel { - - call(command: string): TPromise { - switch (command) { - case 'serviceState': return TPromise.as(RawServiceState.GitNotFound); - default: return TPromise.as(null); - } - } -} - -export class GitChannelClient implements IRawGitService { - - constructor(private channel: IGitChannel) { } - - private _onOutput = eventFromCall(this.channel, 'onOutput'); - get onOutput(): Event { return this._onOutput; } - - getVersion(): TPromise { - return this.channel.call('getVersion'); - } - - serviceState(): TPromise { - return this.channel.call('serviceState'); - } - - statusCount(): TPromise { - return this.channel.call('statusCount'); - } - - status(): TPromise { - return this.channel.call('status').then(RawStatusSerializer.from); - } - - init(): TPromise { - return this.channel.call('init').then(RawStatusSerializer.from); - } - - add(filesPaths?: string[]): TPromise { - return this.channel.call('add', filesPaths).then(RawStatusSerializer.from); - } - - stage(filePath: string, content: string): TPromise { - return this.channel.call('stage', [filePath, content]).then(RawStatusSerializer.from); - } - - branch(name: string, checkout?: boolean): TPromise { - return this.channel.call('branch', [name, checkout]).then(RawStatusSerializer.from); - } - - checkout(treeish?: string, filePaths?: string[]): TPromise { - return this.channel.call('checkout', [treeish, filePaths]).then(RawStatusSerializer.from); - } - - clean(filePaths: string[]): TPromise { - return this.channel.call('clean', filePaths).then(RawStatusSerializer.from); - } - - undo(): TPromise { - return this.channel.call('undo').then(RawStatusSerializer.from); - } - - reset(treeish: string, hard?: boolean): TPromise { - return this.channel.call('reset', [treeish, hard]).then(RawStatusSerializer.from); - } - - revertFiles(treeish: string, filePaths?: string[]): TPromise { - return this.channel.call('revertFiles', [treeish, filePaths]).then(RawStatusSerializer.from); - } - - fetch(): TPromise { - return this.channel.call('fetch').then(RawStatusSerializer.from); - } - - pull(rebase?: boolean): TPromise { - return this.channel.call('pull', rebase).then(RawStatusSerializer.from); - } - - push(remote?: string, name?: string, options?: IPushOptions): TPromise { - return this.channel.call('push', [remote, name, options]).then(RawStatusSerializer.from); - } - - sync(): TPromise { - return this.channel.call('sync').then(RawStatusSerializer.from); - } - - commit(message: string, amend?: boolean, stage?: boolean, signoff?: boolean): TPromise { - return this.channel.call('commit', [message, amend, stage, signoff]).then(RawStatusSerializer.from); - } - - detectMimetypes(path: string, treeish?: string): TPromise { - return this.channel.call('detectMimetypes', [path, treeish]); - } - - show(path: string, treeish?: string): TPromise { - return this.channel.call('show', [path, treeish]); - } - - clone(url: string, parentPath: string): TPromise { - return this.channel.call('clone', [url, parentPath]); - } - - getCommitTemplate(): TPromise { - return this.channel.call('getCommitTemplate'); - } - - getCommit(ref: string): TPromise { - return this.channel.call('getCommit', ref); - } -} - -export interface IAskpassChannel extends IChannel { - call(command: 'askpass', args: [string, string, string]): TPromise; - call(command: string, args: any[]): TPromise; -} - -export class AskpassChannel implements IAskpassChannel { - - constructor(private service: IAskpassService) { } - - call(command: string, args: [string, string, string]): TPromise { - switch (command) { - case 'askpass': return this.service.askpass(args[0], args[1], args[2]); - } - return undefined; - } -} - -export class AskpassChannelClient implements IAskpassService { - - constructor(private channel: IAskpassChannel) { } - - askpass(id: string, host: string, command: string): TPromise { - return this.channel.call('askpass', [id, host, command]); - } -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/common/gitModel.ts b/src/vs/workbench/parts/git/common/gitModel.ts deleted file mode 100644 index 30baf2cf6d242..0000000000000 --- a/src/vs/workbench/parts/git/common/gitModel.ts +++ /dev/null @@ -1,412 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { format } from 'vs/base/common/strings'; -import { EventEmitter } from 'vs/base/common/eventEmitter'; -import { - IStatusModel, IStatusSummary, IRawFileStatus, ModelEvents, - IFileStatus, IStatusGroup, Status, StatusType, - IBranch, IRef, IRemote, IModel, IRawStatus, RefType -} from 'vs/workbench/parts/git/common/git'; - -export class FileStatus implements IFileStatus { - - private id: string; - private pathComponents: string[]; - - constructor( - private path: string, - private mimetype: string, - private status: Status, - private rename?: string, - isModifiedInIndex?: boolean - ) { - this.id = FileStatus.typeOf(status) + ':' + path + (rename ? ':' + rename : '') + (isModifiedInIndex ? '$' : ''); - this.pathComponents = path.split('/'); - } - - getPath(): string { - return this.path; - } - - getPathComponents(): string[] { - return this.pathComponents.slice(0); - } - - getMimetype(): string { - return this.mimetype; - } - - getStatus(): Status { - return this.status; - } - - getRename(): string { - return this.rename; - } - - getId(): string { - return this.id; - } - - getType(): StatusType { - switch (FileStatus.typeOf(this.status)) { - case 'index': return StatusType.INDEX; - case 'workingTree': return StatusType.WORKING_TREE; - default: return StatusType.MERGE; - } - } - - clone(): IFileStatus { - return new FileStatus(this.path, this.mimetype, this.status, this.rename); - } - - update(other: FileStatus): void { - this.status = other.getStatus(); - this.rename = other.getRename(); - } - - static typeOf(s: Status): string { - switch (s) { - case Status.INDEX_MODIFIED: - case Status.INDEX_ADDED: - case Status.INDEX_DELETED: - case Status.INDEX_RENAMED: - case Status.INDEX_COPIED: - return 'index'; - - case Status.MODIFIED: - case Status.DELETED: - case Status.UNTRACKED: - case Status.IGNORED: - return 'workingTree'; - - default: - return 'merge'; - } - } -} - -interface IStatusSet { - [path: string]: IFileStatus; -} - -export class StatusGroup extends EventEmitter implements IStatusGroup { - - private type: StatusType; - private statusSet: IStatusSet; - private statusList: IFileStatus[]; - private statusByName: IStatusSet; - private statusByRename: IStatusSet; - - constructor(type: StatusType) { - super(); - - this.type = type; - this.statusSet = Object.create(null); - this.statusList = []; - this.statusByName = Object.create(null); - this.statusByRename = Object.create(null); - } - - getType(): StatusType { - return this.type; - } - - update(statusList: FileStatus[]): void { - const toDelete: IStatusSet = Object.create(null); - - let id: string, path: string, rename: string; - let status: IFileStatus; - - for (id in this.statusSet) { - toDelete[id] = this.statusSet[id]; - } - - for (let i = 0; i < statusList.length; i++) { - status = statusList[i]; - id = status.getId(); - path = status.getPath(); - rename = status.getRename(); - - if (toDelete[id]) { - this.statusSet[id].update(status); - toDelete[id] = null; - - } else { - this.statusSet[id] = status; - } - } - - for (id in toDelete) { - if (status = toDelete[id]) { - this.emit('fileStatus:dispose', status); - delete this.statusSet[id]; - } - } - - this.statusList = []; - this.statusByName = Object.create(null); - this.statusByRename = Object.create(null); - - for (id in this.statusSet) { - status = this.statusSet[id]; - this.statusList.push(status); - - if (status.getRename()) { - this.statusByRename[status.getPath()] = status; - } else { - this.statusByName[status.getPath()] = status; - } - } - } - - all(): IFileStatus[] { - return this.statusList; - } - - find(path: string): IFileStatus { - return this.statusByName[path] || this.statusByRename[path] || null; - } - - dispose(): void { - this.type = null; - this.statusSet = null; - this.statusList = null; - this.statusByName = null; - this.statusByRename = null; - - super.dispose(); - } -} - -export class StatusModel extends EventEmitter implements IStatusModel { - - private indexStatus: StatusGroup; - private workingTreeStatus: StatusGroup; - private mergeStatus: StatusGroup; - private toDispose: IDisposable[]; - - constructor() { - super(); - - this.indexStatus = new StatusGroup(StatusType.INDEX); - this.workingTreeStatus = new StatusGroup(StatusType.WORKING_TREE); - this.mergeStatus = new StatusGroup(StatusType.MERGE); - - this.toDispose = [ - this.addEmitter(this.indexStatus), - this.addEmitter(this.workingTreeStatus), - this.addEmitter(this.mergeStatus) - ]; - } - - getSummary(): IStatusSummary { - return { - hasWorkingTreeChanges: this.getWorkingTreeStatus().all().length > 0, - hasIndexChanges: this.getIndexStatus().all().length > 0, - hasMergeChanges: this.getMergeStatus().all().length > 0 - }; - } - - update(status: IRawFileStatus[]): void { - const index: FileStatus[] = []; - const workingTree: FileStatus[] = []; - const merge: FileStatus[] = []; - - status.forEach(raw => { - switch (raw.x + raw.y) { - case '??': return workingTree.push(new FileStatus(raw.path, raw.mimetype, Status.UNTRACKED)); - case '!!': return workingTree.push(new FileStatus(raw.path, raw.mimetype, Status.IGNORED)); - case 'DD': return merge.push(new FileStatus(raw.path, raw.mimetype, Status.BOTH_DELETED)); - case 'AU': return merge.push(new FileStatus(raw.path, raw.mimetype, Status.ADDED_BY_US)); - case 'UD': return merge.push(new FileStatus(raw.path, raw.mimetype, Status.DELETED_BY_THEM)); - case 'UA': return merge.push(new FileStatus(raw.path, raw.mimetype, Status.ADDED_BY_THEM)); - case 'DU': return merge.push(new FileStatus(raw.path, raw.mimetype, Status.DELETED_BY_US)); - case 'AA': return merge.push(new FileStatus(raw.path, raw.mimetype, Status.BOTH_ADDED)); - case 'UU': return merge.push(new FileStatus(raw.path, raw.mimetype, Status.BOTH_MODIFIED)); - } - - let isModifiedInIndex = false; - - switch (raw.x) { - case 'M': index.push(new FileStatus(raw.path, raw.mimetype, Status.INDEX_MODIFIED)); isModifiedInIndex = true; break; - case 'A': index.push(new FileStatus(raw.path, raw.mimetype, Status.INDEX_ADDED)); break; - case 'D': index.push(new FileStatus(raw.path, raw.mimetype, Status.INDEX_DELETED)); break; - case 'R': index.push(new FileStatus(raw.path, raw.mimetype, Status.INDEX_RENAMED, raw.rename)); break; - case 'C': index.push(new FileStatus(raw.path, raw.mimetype, Status.INDEX_COPIED)); break; - } - - switch (raw.y) { - case 'M': workingTree.push(new FileStatus(raw.path, raw.mimetype, Status.MODIFIED, raw.rename, isModifiedInIndex)); break; - case 'D': workingTree.push(new FileStatus(raw.path, raw.mimetype, Status.DELETED, raw.rename)); break; - } - - return undefined; - }); - - this.indexStatus.update(index); - this.workingTreeStatus.update(workingTree); - this.mergeStatus.update(merge); - - this.emit(ModelEvents.STATUS_MODEL_UPDATED); - } - - getIndexStatus(): IStatusGroup { - return this.indexStatus; - } - - getWorkingTreeStatus(): IStatusGroup { - return this.workingTreeStatus; - } - - getMergeStatus(): IStatusGroup { - return this.mergeStatus; - } - - getGroups(): IStatusGroup[] { - return [this.mergeStatus, this.indexStatus, this.workingTreeStatus]; - } - - find(path: string, type: StatusType): IFileStatus { - switch (type) { - case StatusType.INDEX: - return this.indexStatus.find(path); - case StatusType.WORKING_TREE: - return this.workingTreeStatus.find(path); - case StatusType.MERGE: - return this.mergeStatus.find(path); - default: - return null; - } - } - - dispose(): void { - this.toDispose = dispose(this.toDispose); - - if (this.indexStatus) { - this.indexStatus.dispose(); - this.indexStatus = null; - } - - if (this.workingTreeStatus) { - this.workingTreeStatus.dispose(); - this.workingTreeStatus = null; - } - - if (this.mergeStatus) { - this.mergeStatus.dispose(); - this.mergeStatus = null; - } - - super.dispose(); - } -} - -export class Model extends EventEmitter implements IModel { - - private repositoryRoot: string; - private status: IStatusModel; - private HEAD: IBranch; - private refs: IRef[]; - private remotes: IRemote[]; - private toDispose: IDisposable[]; - - constructor() { - super(); - - this.toDispose = []; - - this.repositoryRoot = null; - this.status = new StatusModel(); - this.toDispose.push(this.addEmitter(this.status)); - - this.HEAD = null; - this.refs = []; - this.remotes = []; - } - - getRepositoryRoot(): string { - return this.repositoryRoot; - } - - getStatus(): IStatusModel { - return this.status; - } - - getHEAD(): IBranch { - return this.HEAD; - } - - getRefs(): IRef[] { - return this.refs; - } - - getRemotes(): IRemote[] { - return this.remotes; - } - - update(status: IRawStatus): void { - if (!status) { - status = { - repositoryRoot: null, - status: [], - HEAD: null, - refs: [], - remotes: [] - }; - } - - this.repositoryRoot = status.repositoryRoot; - this.status.update(status.status); - - this.HEAD = status.HEAD; - this.emit(ModelEvents.HEAD_UPDATED); - - this.refs = status.refs; - this.emit(ModelEvents.REFS_UPDATED); - - this.remotes = status.remotes; - this.emit(ModelEvents.REMOTES_UPDATED); - - this.emit(ModelEvents.MODEL_UPDATED); - } - - getStatusSummary(): IStatusSummary { - const status = this.getStatus(); - - return { - hasWorkingTreeChanges: status.getWorkingTreeStatus().all().length > 0, - hasIndexChanges: status.getIndexStatus().all().length > 0, - hasMergeChanges: status.getMergeStatus().all().length > 0 - }; - } - - getPS1(): string { - if (!this.HEAD) { - return ''; - } - - const tag = this.getRefs().filter(iref => iref.type === RefType.Tag && iref.commit === this.HEAD.commit)[0]; - const tagName = tag && tag.name; - const head = this.HEAD.name || tagName || this.HEAD.commit.substr(0, 8); - - const statusSummary = this.getStatus().getSummary(); - - return format('{0}{1}{2}{3}', - head, - statusSummary.hasWorkingTreeChanges ? '*' : '', - statusSummary.hasIndexChanges ? '+' : '', - statusSummary.hasMergeChanges ? '!' : '' - ); - } - - dispose(): void { - this.toDispose = dispose(this.toDispose); - super.dispose(); - } -} diff --git a/src/vs/workbench/parts/git/common/stageRanges.ts b/src/vs/workbench/parts/git/common/stageRanges.ts deleted file mode 100644 index e4a30f88be3a6..0000000000000 --- a/src/vs/workbench/parts/git/common/stageRanges.ts +++ /dev/null @@ -1,238 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { IChange, IModel, IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; -import { Range } from 'vs/editor/common/core/range'; -import { Position } from 'vs/editor/common/core/position'; -import { Selection } from 'vs/editor/common/core/selection'; -import { EditOperation } from 'vs/editor/common/core/editOperation'; - -/** - * Represents the selected portion of an IChange, and includes the start/end line numbers of the full change - */ -export class SelectedChange implements IChange { - readonly originalStartLineNumber: number; - readonly originalEndLineNumber: number; - readonly modifiedStartLineNumber: number; - readonly modifiedEndLineNumber: number; - - readonly fullModifiedStartLineNumber: number; - readonly fullModifiedEndLineNumber: number; - - constructor(selected: IChange, full: IChange) { - this.originalStartLineNumber = selected.originalStartLineNumber; - this.originalEndLineNumber = selected.originalEndLineNumber; - this.modifiedStartLineNumber = selected.modifiedStartLineNumber; - this.modifiedEndLineNumber = selected.modifiedEndLineNumber; - - this.fullModifiedStartLineNumber = full.modifiedStartLineNumber; - this.fullModifiedEndLineNumber = full.modifiedEndLineNumber; - } - - /** - * True when the change is entirely selected - */ - get isCompletelySelected(): boolean { - return this.modifiedStartLineNumber === this.fullModifiedStartLineNumber && - this.modifiedEndLineNumber === this.fullModifiedEndLineNumber; - } -} - -function sortChanges(changes: IChange[]): void { - changes.sort((left, right) => { - if (left.originalStartLineNumber < right.originalStartLineNumber) { - return -1; - } else if (left.originalStartLineNumber > right.originalStartLineNumber) { - return 1; - } else if (left.modifiedStartLineNumber < right.modifiedStartLineNumber) { - return -1; - } - return 1; - }); -} - -function sortSelections(selections: Selection[]): void { - selections.sort((left, right) => { - if (left.getStartPosition().lineNumber < right.getStartPosition().lineNumber) { - return -1; - } - return 1; - }); -} - -function isInsertion(change: IChange): boolean { - return change.originalEndLineNumber <= 0; -} - -function isDeletion(change: IChange): boolean { - return change.modifiedEndLineNumber <= 0; -} - - -/** - * Returns an intersection between a change and a selection. - * Returns null if intersection does not exist. - */ -export function intersectChangeAndSelection(change: IChange, selection: Selection) { - var result = { - modifiedStartLineNumber: Math.max(change.modifiedStartLineNumber, selection.startLineNumber), - modifiedEndLineNumber: Math.min(change.modifiedEndLineNumber, selection.endLineNumber), - originalStartLineNumber: change.originalStartLineNumber, - originalEndLineNumber: change.originalEndLineNumber - }; - // Deletions have modifiedEndLineNumber = 0. In that case we can not use the simple check if there is an intersection. - var isDeletionSelected = isDeletion(result) && - (change.modifiedStartLineNumber >= selection.startLineNumber) && (change.modifiedStartLineNumber <= selection.endLineNumber); - - if ((result.modifiedStartLineNumber <= result.modifiedEndLineNumber) || isDeletionSelected) { - return result; - } - return null; -} - -/** - * Returns all selected changes (there can be multiple selections due to multiple cursors). - * If a change is partially selected, the selected part of the change will be returned. - */ -export function getSelectedChanges(changes: IChange[], selections: Selection[]): SelectedChange[] { - sortChanges(changes); - sortSelections(selections); - var result: SelectedChange[] = []; - var currentSelection = 0; - var lastLineAdded = -1; - - for (var i = 0; i < changes.length; ++i) { - // We have to check the previous selection. Since it can contain two changes. - currentSelection = Math.max(0, currentSelection - 1); - // Find all selections that are not after the current change. - while (currentSelection < selections.length && - (selections[currentSelection].startLineNumber <= changes[i].modifiedEndLineNumber || isDeletion(changes[i]))) { - var intersectedChange = intersectChangeAndSelection(changes[i], selections[currentSelection]); - if (intersectedChange !== null) { - // Each change needs to be disjoint so we check if we already added this line. - if (lastLineAdded !== intersectedChange.modifiedStartLineNumber) { - result.push(new SelectedChange(intersectedChange, changes[i])); - lastLineAdded = intersectedChange.modifiedEndLineNumber; - } else { - // Update change such that we do not add same line twice. - intersectedChange.modifiedStartLineNumber++; - if (intersectedChange.modifiedStartLineNumber <= intersectedChange.modifiedEndLineNumber) { - result.push(new SelectedChange(intersectedChange, changes[i])); - lastLineAdded = intersectedChange.modifiedEndLineNumber; - } - } - } - currentSelection++; - } - } - return result; -} - -function appendValueFromRange(base: string, model: IModel, range: Range): string { - var result = base; - if (result !== '') { - result += model.getEOL(); - } - return result + model.getValueInRange(range); -} - -/** - * Applies a list of changes to the original model and returns the new IModel. - * First sorts changes by line number. - */ -export function applyChangesToModel(original: IModel, modified: IModel, changes: IChange[]): string { - sortChanges(changes); - var result = ''; - var positionInOriginal = 1; - - for (var i = 0; i < changes.length; ++i) { - // We have to update orginalStartLineNumber for insertions, their start line is always one line behind. - var originalStartLineUpdated = isInsertion(changes[i]) ? changes[i].originalStartLineNumber + 1 : changes[i].originalStartLineNumber; - if (positionInOriginal < originalStartLineUpdated) { - result = appendValueFromRange(result, original, - new Range(positionInOriginal, 1, originalStartLineUpdated - 1, original.getLineMaxColumn(originalStartLineUpdated - 1))); - positionInOriginal = originalStartLineUpdated; - } - - if (!isDeletion(changes[i])) { - result = appendValueFromRange(result, modified, - new Range(changes[i].modifiedStartLineNumber, 1, changes[i].modifiedEndLineNumber, modified.getLineMaxColumn(changes[i].modifiedEndLineNumber))); - } - // Update position in the original file where we continue to concatanate. - // Only update position if it was not an insertion. - if (!isInsertion(changes[i])) { - positionInOriginal = changes[i].originalEndLineNumber + 1; - } - } - - // Append the last chunk after all the changes. - if (positionInOriginal <= original.getLineCount()) { - result = appendValueFromRange(result, original, - new Range(positionInOriginal, 1, original.getLineCount(), original.getLineMaxColumn(original.getLineCount()))); - } - - return result; -} - -export function getChangeRevertEdits(original: IModel, modified: IModel, changes: SelectedChange[]): IIdentifiedSingleEditOperation[] { - sortChanges(changes); - - const getDeleteOperation = (change: IChange) => { - const fullRange = getLinesRangeWithOneSurroundingNewline(modified, change.modifiedStartLineNumber, change.modifiedEndLineNumber); - return EditOperation.delete(fullRange); - }; - - return changes.map((change, i) => { - if (isInsertion(change)) { - // Delete inserted range - return getDeleteOperation(change); - } else if (isDeletion(change)) { - // Get the original lines and insert at the deleted position - const value = original.getValueInRange(getLinesRangeWithOneSurroundingNewline(original, change.originalStartLineNumber, change.originalEndLineNumber)); - return EditOperation.insert(new Position(change.modifiedStartLineNumber + 1, 1), value); - } else if (change.isCompletelySelected) { - // If the entire change is selected, then revert the whole thing. - const value = original.getValueInRange(new Range(change.originalStartLineNumber, 1, change.originalEndLineNumber + 1, 1)); - return EditOperation.replace(new Range(change.modifiedStartLineNumber, 1, change.modifiedEndLineNumber + 1, 1), value); - } else { - // If only a portion is selected, replace with the matching lines - e.g. if lines 2-4 are selected, replace with lines 2-4 from the original model (if they exist) - const copyOffset = change.modifiedStartLineNumber - change.fullModifiedStartLineNumber; - const numLinesToCopy = change.modifiedEndLineNumber - change.modifiedStartLineNumber; - const copyStartLine = change.originalStartLineNumber + copyOffset; - const copyEndLine = Math.min(copyStartLine + numLinesToCopy, original.getLineCount()); - if (copyStartLine > copyEndLine) { - return getDeleteOperation(change); - } - - // Compute the range to copy, and intersect with the full original range to validate - const originalRange = new Range(change.originalStartLineNumber, 1, change.originalEndLineNumber, original.getLineMaxColumn(change.originalEndLineNumber)); - const rangeToCopy = originalRange.intersectRanges( - new Range(copyStartLine, 1, copyEndLine, original.getLineMaxColumn(copyEndLine))); - - // No intersection, so delete the added text - if (!rangeToCopy) { - return getDeleteOperation(change); - } - - const value = original.getValueInRange(rangeToCopy); - return EditOperation.replace(new Range(change.modifiedStartLineNumber, 1, change.modifiedEndLineNumber, modified.getLineMaxColumn(change.modifiedEndLineNumber)), value); - } - }); -} - -function getLinesRangeWithOneSurroundingNewline(model: IModel, startLine: number, endLine: number): Range { - let startColumn = 1; - let endColumn = model.getLineMaxColumn(endLine); - if (endLine < model.getLineCount()) { - endLine++; - endColumn = 1; - } else if (startLine > 1) { - startLine--; - startColumn = model.getLineMaxColumn(startLine); - } - - return new Range(startLine, startColumn, endLine, endColumn); -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/electron-browser/electronGitService.ts b/src/vs/workbench/parts/git/electron-browser/electronGitService.ts deleted file mode 100644 index 3f6390c51ca03..0000000000000 --- a/src/vs/workbench/parts/git/electron-browser/electronGitService.ts +++ /dev/null @@ -1,235 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { TPromise } from 'vs/base/common/winjs.base'; -import { IRawGitService, RawServiceState, IGitConfiguration } from 'vs/workbench/parts/git/common/git'; -import { UnscopedGitService } from 'vs/workbench/parts/git/node/unscopedGitService'; -import { GitService } from 'vs/workbench/parts/git/browser/gitServices'; -import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; -import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; -import { IOutputService } from 'vs/workbench/parts/output/common/output'; -import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IMessageService } from 'vs/platform/message/common/message'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { getDelayedChannel, getNextTickChannel } from 'vs/base/parts/ipc/common/ipc'; -import { Client } from 'vs/base/parts/ipc/node/ipc.cp'; -import { GitChannelClient, UnavailableGitChannel } from 'vs/workbench/parts/git/common/gitIpc'; -import { RawGitService, DelayedRawGitService } from 'vs/workbench/parts/git/node/rawGitService'; -import URI from 'vs/base/common/uri'; -import { spawn, exec } from 'child_process'; -import { join } from 'path'; -import { IStorageService } from 'vs/platform/storage/common/storage'; -import { readdir } from 'vs/base/node/pfs'; -import { IFileService } from 'vs/platform/files/common/files'; - -interface IGit { - path: string; - version: string; -} - -function parseVersion(raw: string): string { - return raw.replace(/^git version /, ''); -} - -function findSpecificGit(path: string): TPromise { - return new TPromise((c, e) => { - const buffers: Buffer[] = []; - const child = spawn(path, ['--version']); - child.stdout.on('data', b => buffers.push(b as Buffer)); - child.on('error', e); - child.on('exit', code => code ? e(new Error('Not found')) : c({ path, version: parseVersion(Buffer.concat(buffers).toString('utf8').trim()) })); - }); -} - -function findGitDarwin(): TPromise { - return new TPromise((c, e) => { - exec('which git', (err, gitPathBuffer) => { - if (err) { - return e('git not found'); - } - - const path = gitPathBuffer.toString().replace(/^\s+|\s+$/g, ''); - - function getVersion(path: string) { - // make sure git executes - exec('git --version', (err, stdout: Buffer) => { - if (err) { - return e('git not found'); - } - - return c({ path, version: parseVersion(stdout.toString('utf8').trim()) }); - }); - } - - if (path !== '/usr/bin/git') { - return getVersion(path); - } - - // must check if XCode is installed - exec('xcode-select -p', (err: any) => { - if (err && err.code === 2) { - // git is not installed, and launching /usr/bin/git - // will prompt the user to install it - - return e('git not found'); - } - - getVersion(path); - }); - }); - }); -} - -function findSystemGitWin32(base: string): TPromise { - if (!base) { - return TPromise.wrapError('Not found'); - } - - return findSpecificGit(join(base, 'Git', 'cmd', 'git.exe')); -} - -function findGitHubGitWin32(): TPromise { - const github = join(process.env['LOCALAPPDATA'], 'GitHub'); - - return readdir(github).then(children => { - const git = children.filter(child => /^PortableGit/.test(child))[0]; - - if (!git) { - return TPromise.wrapError('Not found'); - } - - return findSpecificGit(join(github, git, 'cmd', 'git.exe')); - }); -} - -function findGitWin32(): TPromise { - return findSystemGitWin32(process.env['ProgramW6432']) - .then(null, () => findSystemGitWin32(process.env['ProgramFiles(x86)'])) - .then(null, () => findSystemGitWin32(process.env['ProgramFiles'])) - .then(null, () => findSpecificGit('git')) - .then(null, () => findGitHubGitWin32()); -} - -function findGit(hint: string): TPromise { - var first = hint ? findSpecificGit(hint) : TPromise.wrapError(null); - - return first.then(null, () => { - switch (process.platform) { - case 'darwin': return findGitDarwin(); - case 'win32': return findGitWin32(); - default: return findSpecificGit('git'); - } - }); -} - -class DisabledRawGitService extends RawGitService { - constructor() { - super(null); - } - - serviceState(): TPromise { - return TPromise.as(RawServiceState.Disabled); - } -} - -function createRemoteRawGitService(gitPath: string, execPath: string, workspaceRoot: string, encoding: string, verbose: boolean): IRawGitService { - const promise = TPromise.timeout(0) // free event loop cos finding git costs - .then(() => findGit(gitPath)) - .then(({ path, version }) => { - const client = new Client( - URI.parse(require.toUrl('bootstrap')).fsPath, - { - serverName: 'Git', - timeout: 1000 * 60, - args: [path, workspaceRoot, encoding, execPath, version], - env: { - ELECTRON_RUN_AS_NODE: 1, - PIPE_LOGGING: 'true', - AMD_ENTRYPOINT: 'vs/workbench/parts/git/node/gitApp', - VERBOSE_LOGGING: String(verbose) - } - } - ); - - return client.getChannel('git'); - }) - .then(null, () => new UnavailableGitChannel()); - - const channel = getNextTickChannel(getDelayedChannel(promise)); - return new GitChannelClient(channel); -} - -interface IRawGitServiceBootstrap { - createRawGitService(gitPath: string, workspaceRoot: string, defaultEncoding: string, exePath: string, version: string): TPromise; -} - -function createRawGitService(gitPath: string, execPath: string, workspaceRoot: string, encoding: string, verbose: boolean): IRawGitService { - const requirePromise = new TPromise((c, e) => { - return require(['vs/workbench/parts/git/node/rawGitServiceBootstrap'], c, e); - }); - - const servicePromise = requirePromise.then(({ createRawGitService }) => { - return findGit(gitPath) - .then(({ path, version }) => createRawGitService(path, workspaceRoot, encoding, execPath, version)) - .then(null, () => new RawGitService(null)); - }); - - return new DelayedRawGitService(servicePromise); -} - -function createUnscopedRawGitService(gitPath: string, execPath: string, encoding: string): IRawGitService { - const promise = findGit(gitPath) - .then(({ path, version }) => new UnscopedGitService(path, version, encoding, execPath)) - .then(null, () => new RawGitService(null)); - - return new DelayedRawGitService(promise); -} - -export class ElectronGitService extends GitService { - - private static USE_REMOTE_PROCESS_SERVICE = true; - - constructor( - @IInstantiationService instantiationService: IInstantiationService, - @IFileService fileService: IFileService, - @IMessageService messageService: IMessageService, - @IWorkbenchEditorService editorService: IWorkbenchEditorService, - @IOutputService outputService: IOutputService, - @ITextFileService textFileService: ITextFileService, - @IWorkspaceContextService contextService: IWorkspaceContextService, - @ILifecycleService lifecycleService: ILifecycleService, - @IStorageService storageService: IStorageService, - @IEnvironmentService environmentService: IEnvironmentService, - @IConfigurationService configurationService: IConfigurationService - ) { - const conf = configurationService.getConfiguration('git'); - const filesConf = configurationService.getConfiguration('files'); - const workspace = contextService.getWorkspace(); - const gitPath = conf.path || null; - const encoding = (filesConf && filesConf.encoding) || 'utf8'; - const verbose = !environmentService.isBuilt || environmentService.verbose; - - let raw: IRawGitService; - - if (!conf.enabled) { - raw = new DisabledRawGitService(); - } else if (!workspace) { - raw = createUnscopedRawGitService(gitPath, environmentService.execPath, encoding); - } else { - const workspaceRoot = workspace.resource.fsPath; - - if (ElectronGitService.USE_REMOTE_PROCESS_SERVICE) { - raw = createRemoteRawGitService(gitPath, environmentService.execPath, workspaceRoot, encoding, verbose); - } else { - raw = createRawGitService(gitPath, environmentService.execPath, workspaceRoot, encoding, verbose); - } - } - - super(raw, instantiationService, fileService, messageService, editorService, outputService, textFileService, contextService, lifecycleService, storageService, configurationService); - } -} diff --git a/src/vs/workbench/parts/git/electron-browser/git.contribution.ts b/src/vs/workbench/parts/git/electron-browser/git.contribution.ts deleted file mode 100644 index 93c3bdb17f32c..0000000000000 --- a/src/vs/workbench/parts/git/electron-browser/git.contribution.ts +++ /dev/null @@ -1,44 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { localize } from 'vs/nls'; -import { registerContributions } from 'vs/workbench/parts/git/browser/gitWorkbenchContributions'; -import { ElectronGitService } from 'vs/workbench/parts/git/electron-browser/electronGitService'; -import { IGitService } from 'vs/workbench/parts/git/common/git'; -import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; -import { Registry } from 'vs/platform/platform'; -import { CloneAction } from './gitActions'; -import { IWorkbenchActionRegistry, Extensions as WorkbenchActionExtensions } from 'vs/workbench/common/actionRegistry'; -import SCMPreview from 'vs/workbench/parts/scm/browser/scmPreview'; -import { ToggleViewletAction } from 'vs/workbench/browser/viewlet'; -import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; -import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; - -// TODO@joao: remove -class OpenScmViewletAction extends ToggleViewletAction { - - static ID = 'workbench.view.git'; // fake redirect - static LABEL = localize('toggleSCMViewlet', "Show SCM"); - - constructor(id: string, label: string, @IViewletService viewletService: IViewletService, @IWorkbenchEditorService editorService: IWorkbenchEditorService) { - super(id, label, 'workbench.view.scm', viewletService, editorService); - } -} - -if (SCMPreview.enabled) { - Registry.as(WorkbenchActionExtensions.WorkbenchActions) - .registerWorkbenchAction(new SyncActionDescriptor(OpenScmViewletAction, OpenScmViewletAction.ID, OpenScmViewletAction.LABEL), 'View: Show SCM', 'View'); -} else { - registerContributions(); - - // Register Service - registerSingleton(IGitService, ElectronGitService); - - const category = localize('git', "Git"); - - Registry.as(WorkbenchActionExtensions.WorkbenchActions) - .registerWorkbenchAction(new SyncActionDescriptor(CloneAction, CloneAction.ID, CloneAction.LABEL), 'Git: Clone', category); -} diff --git a/src/vs/workbench/parts/git/electron-browser/gitActions.ts b/src/vs/workbench/parts/git/electron-browser/gitActions.ts deleted file mode 100644 index b168acb47bd3f..0000000000000 --- a/src/vs/workbench/parts/git/electron-browser/gitActions.ts +++ /dev/null @@ -1,92 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { localize } from 'vs/nls'; -import { TPromise } from 'vs/base/common/winjs.base'; -import { always } from 'vs/base/common/async'; -import { Action } from 'vs/base/common/actions'; -import { IMessageService } from 'vs/platform/message/common/message'; -import { IWindowsService } from 'vs/platform/windows/common/windows'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import Severity from 'vs/base/common/severity'; -import { IGitService } from 'vs/workbench/parts/git/common/git'; -import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; -import * as url from 'url'; -import { remote } from 'electron'; -import { ITelemetryService, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; -import { isPromiseCanceledError } from 'vs/base/common/errors'; - -const dialog = remote.dialog; - -export class CloneAction extends Action { - - static ID = 'workbench.action.git.clone'; - static LABEL = 'Clone'; - - constructor(id: string, label: string, - @IGitService private gitService: IGitService, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IMessageService private messageService: IMessageService, - @IWindowsService private windowsService: IWindowsService, - @ITelemetryService private telemetryService: ITelemetryService, - @IWorkspaceContextService private workspaceService: IWorkspaceContextService - ) { - super(id, label); - } - - run(event?: any, data?: ITelemetryData): TPromise { - return this.quickOpenService.input({ - prompt: localize('valid', "Provide a valid git repository URL"), - placeHolder: localize('url', "Repository URL"), - validateInput: input => { - const parsedUrl = url.parse(input); - - if (!parsedUrl.protocol || !parsedUrl.host) { - return TPromise.as(localize('valid', "Provide a valid git repository URL")); - } - - return TPromise.as(''); - } - }) - .then(url => { - if (!url) { - this.telemetryService.publicLog('gitClone', { ...data, outcome: 'no_URL' }); - return TPromise.as(null); - } - - const result = dialog.showOpenDialog(remote.getCurrentWindow(), { - title: localize('directory', "Destination clone directory"), - properties: ['openDirectory', 'createDirectory'] - }); - - if (!result || result.length === 0) { - this.telemetryService.publicLog('gitClone', { ...data, outcome: 'no_directory' }); - return TPromise.as(null); - } - - const promise = TPromise.timeout(200) - .then(() => this.messageService.show(Severity.Info, localize('cloning', "Cloning repository '{0}'...", url))) - .then(close => new TPromise(() => null, close)); - - const clone = always(this.gitService.clone(url, result[0]), () => promise.cancel()); - - return clone.then(path => { - this.telemetryService.publicLog('gitClone', { ...data, outcome: 'success' }); - const forceNewWindow = this.workspaceService.hasWorkspace(); - return this.windowsService.openWindow([path], { forceNewWindow, forceReuseWindow: !forceNewWindow }); - - }).then(null, e => { - if (/already exists and is not an empty directory/.test(e.stderr || '')) { - this.telemetryService.publicLog('gitClone', { ...data, outcome: 'directory_not_empty' }); - return TPromise.wrapError(localize('already exists', "Destination repository already exists, please pick another directory to clone to.")); - } - - this.telemetryService.publicLog('gitClone', { ...data, outcome: isPromiseCanceledError(e) ? 'canceled' : 'error' }); - return TPromise.wrapError(e); - }); - }); - } -} diff --git a/src/vs/workbench/parts/git/electron-main/askpassService.ts b/src/vs/workbench/parts/git/electron-main/askpassService.ts deleted file mode 100644 index dbe43c01379f8..0000000000000 --- a/src/vs/workbench/parts/git/electron-main/askpassService.ts +++ /dev/null @@ -1,75 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as nls from 'vs/nls'; -import { ipcMain as ipc, BrowserWindow } from 'electron'; -import platform = require('vs/base/common/platform'); -import { TPromise } from 'vs/base/common/winjs.base'; -import { IAskpassService } from 'vs/workbench/parts/git/common/git'; - -export interface ICredentials { - username: string; - password: string; -} - -interface ICredentialsResult { - id: number; - credentials: ICredentials; -} - -interface IContext { - credentials: ICredentials; - window: Electron.BrowserWindow; -} - -export class GitAskpassService implements IAskpassService { - - private askpassCache: { [id: string]: IContext } = Object.create(null); - - constructor() { - ipc.on('git:askpass', (event, result: ICredentialsResult) => { - this.askpassCache[result.id].credentials = result.credentials; - }); - } - - public askpass(id: string, host: string, command: string): TPromise { - return new TPromise((c, e) => { - let cachedResult = this.askpassCache[id]; - - if (typeof cachedResult !== 'undefined') { - return c(cachedResult.credentials); - } - - if (command === 'fetch') { - return c({ username: '', password: '' }); - } - - let win = new BrowserWindow({ - alwaysOnTop: true, - skipTaskbar: true, - resizable: false, - width: 450, - height: platform.isWindows ? 280 : 260, - show: true, - title: nls.localize('git', "Git") - }); - - win.setMenuBarVisibility(false); - - this.askpassCache[id] = { - window: win, - credentials: null - }; - - win.loadURL(require.toUrl('vs/workbench/parts/git/electron-main/index.html')); - win.webContents.executeJavaScript('init(' + JSON.stringify({ id, host, command }) + ')'); - - win.once('closed', () => { - c(this.askpassCache[id].credentials); - setTimeout(() => delete this.askpassCache[id], 1000 * 10); - }); - }); - } -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/electron-main/git.svg b/src/vs/workbench/parts/git/electron-main/git.svg deleted file mode 100644 index dfd62bc16c675..0000000000000 --- a/src/vs/workbench/parts/git/electron-main/git.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/vs/workbench/parts/git/electron-main/index.html b/src/vs/workbench/parts/git/electron-main/index.html deleted file mode 100644 index 3ae54ce146c66..0000000000000 --- a/src/vs/workbench/parts/git/electron-main/index.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - -

Authentication Required

-
-

- -

-

-

- - -

- -
- -
- - diff --git a/src/vs/workbench/parts/git/node/askpass.sh b/src/vs/workbench/parts/git/node/askpass.sh deleted file mode 100755 index 2f30f91ef9af0..0000000000000 --- a/src/vs/workbench/parts/git/node/askpass.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -VSCODE_GIT_ASKPASS_PIPE=`mktemp` -AMD_ENTRYPOINT="$VSCODE_GIT_ASKPASS_MODULE_ID" VSCODE_GIT_ASKPASS_PIPE="$VSCODE_GIT_ASKPASS_PIPE" "$VSCODE_GIT_ASKPASS_NODE" "$VSCODE_GIT_ASKPASS_BOOTSTRAP" $* -cat $VSCODE_GIT_ASKPASS_PIPE -rm $VSCODE_GIT_ASKPASS_PIPE \ No newline at end of file diff --git a/src/vs/workbench/parts/git/node/askpass.ts b/src/vs/workbench/parts/git/node/askpass.ts deleted file mode 100644 index f2b45f8f1b6d1..0000000000000 --- a/src/vs/workbench/parts/git/node/askpass.ts +++ /dev/null @@ -1,58 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { connect } from 'vs/base/parts/ipc/node/ipc.net'; -import { IAskpassChannel, AskpassChannelClient } from 'vs/workbench/parts/git/common/gitIpc'; -import * as fs from 'fs'; - -function fatal(err: any): void { - console.error(err); - process.exit(1); -} - -function main(argv: string[]): void { - if (argv.length !== 5) { - return fatal('Wrong number of arguments'); - } - - if (!process.env['VSCODE_IPC_HOOK']) { - return fatal('Missing ipc hook'); - } - - if (!process.env['VSCODE_GIT_REQUEST_ID']) { - return fatal('Missing git id'); - } - - if (!process.env['VSCODE_GIT_ASKPASS_PIPE']) { - return fatal('Missing pipe'); - } - - var id = process.env['VSCODE_GIT_REQUEST_ID']; - var output = process.env['VSCODE_GIT_ASKPASS_PIPE']; - var request = argv[2]; - var host = argv[4].substring(1, argv[4].length - 2); - - connect(process.env['VSCODE_IPC_HOOK'], 'askpass') - .then(client => { - const channel = client.getChannel('askpass'); - const service = new AskpassChannelClient(channel); - - return service.askpass(id, host, process.env['MONACO_GIT_COMMAND']).then(result => { - if (result) { - fs.writeFileSync(output, (/^Username$/i.test(request) ? result.username : result.password) + '\n'); - } - - return client; - }); - }) - .done(c => { - c.dispose(); - setTimeout(() => process.exit(0), 0); - }); -} - -main(process.argv); diff --git a/src/vs/workbench/parts/git/node/git.lib.ts b/src/vs/workbench/parts/git/node/git.lib.ts deleted file mode 100644 index 98fdbd0c5d426..0000000000000 --- a/src/vs/workbench/parts/git/node/git.lib.ts +++ /dev/null @@ -1,735 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import * as os from 'os'; -import * as path from 'path'; -import { Promise, TPromise } from 'vs/base/common/winjs.base'; -import * as pfs from 'vs/base/node/pfs'; -import { guessMimeTypes, isBinaryMime } from 'vs/base/common/mime'; -import { IDisposable, toDisposable, dispose } from 'vs/base/common/lifecycle'; -import { assign } from 'vs/base/common/objects'; -import { sequence } from 'vs/base/common/async'; -import { v4 as UUIDv4 } from 'vs/base/common/uuid'; -import { localize } from 'vs/nls'; -import { uniqueFilter, index } from 'vs/base/common/arrays'; -import { IRawFileStatus, RefType, IRef, IBranch, IRemote, GitErrorCodes, IPushOptions } from 'vs/workbench/parts/git/common/git'; -import { detectMimesFromStream } from 'vs/base/node/mime'; -import { IFileOperationResult, FileOperationResult } from 'vs/platform/files/common/files'; -import { spawn, ChildProcess } from 'child_process'; -import { decode, encodingExists } from 'vs/base/node/encoding'; - -export interface IExecutionResult { - exitCode: number; - stdout: string; - stderr: string; -} - -function exec(child: ChildProcess, encoding = 'utf8'): TPromise { - const disposables: IDisposable[] = []; - - const once = (ee: NodeJS.EventEmitter, name: string, fn: Function) => { - ee.once(name, fn); - disposables.push(toDisposable(() => ee.removeListener(name, fn))); - }; - - const on = (ee: NodeJS.EventEmitter, name: string, fn: Function) => { - ee.on(name, fn); - disposables.push(toDisposable(() => ee.removeListener(name, fn))); - }; - - return TPromise.join([ - new TPromise((c, e) => { - once(child, 'error', e); - once(child, 'exit', c); - }), - new TPromise(c => { - let buffers: Buffer[] = []; - on(child.stdout, 'data', b => buffers.push(b)); - once(child.stdout, 'close', () => c(decode(Buffer.concat(buffers), encoding))); - }), - new TPromise(c => { - let buffers: Buffer[] = []; - on(child.stderr, 'data', b => buffers.push(b)); - once(child.stderr, 'close', () => c(decode(Buffer.concat(buffers), encoding))); - }) - ]).then(values => { - dispose(disposables); - - return { - exitCode: values[0], - stdout: values[1], - stderr: values[2] - }; - }); -} - -export interface IGitErrorData { - error?: Error; - message?: string; - stdout?: string; - stderr?: string; - exitCode?: number; - gitErrorCode?: string; - gitCommand?: string; -} - -export class GitError { - - error: Error; - message: string; - stdout: string; - stderr: string; - exitCode: number; - gitErrorCode: string; - gitCommand: string; - - constructor(data: IGitErrorData) { - if (data.error) { - this.error = data.error; - this.message = data.error.message; - } else { - this.error = null; - } - - this.message = this.message || data.message || 'Git error'; - this.stdout = data.stdout || null; - this.stderr = data.stderr || null; - this.exitCode = data.exitCode || null; - this.gitErrorCode = data.gitErrorCode || null; - this.gitCommand = data.gitCommand || null; - } - - toString(): string { - let result = this.message + ' ' + JSON.stringify({ - exitCode: this.exitCode, - gitErrorCode: this.gitErrorCode, - gitCommand: this.gitCommand, - stdout: this.stdout, - stderr: this.stderr - }, null, 2); - - if (this.error) { - result += (this.error).stack; - } - - return result; - } -} - -export interface IGitOptions { - gitPath: string; - version: string; - defaultEncoding?: string; - env?: any; -} - -export class Git { - - private gitPath: string; - private _version: string; - private env: any; - private defaultEncoding: string; - private outputListeners: { (output: string): void; }[]; - - constructor(options: IGitOptions) { - this.gitPath = options.gitPath; - this._version = options.version; - - const encoding = options.defaultEncoding || 'utf8'; - this.defaultEncoding = encodingExists(encoding) ? encoding : 'utf8'; - - this.env = options.env || {}; - this.outputListeners = []; - } - - get version(): string { - return this._version; - } - - run(cwd: string, args: string[], options: any = {}): TPromise { - options = assign({ cwd: cwd }, options || {}); - return this.exec(args, options); - } - - stream(cwd: string, args: string[], options: any = {}): ChildProcess { - options = assign({ cwd: cwd }, options || {}); - return this.spawn(args, options); - } - - open(repository: string, env: any = {}): Repository { - return new Repository(this, repository, this.defaultEncoding, env); - } - - clone(url: string, parentPath: string): TPromise { - const folderName = url.replace(/^.*\//, '').replace(/\.git$/, '') || 'repository'; - const folderPath = path.join(parentPath, folderName); - - return this.exec(['clone', url, folderPath]) - .then(() => folderPath); - } - - config(name: string, value: string): Promise { - return this.exec(['config', '--global', name, value]); - } - - private exec(args: string[], options: any = {}): TPromise { - const child = this.spawn(args, options); - - if (options.input) { - child.stdin.end(options.input, 'utf8'); - } - - return exec(child).then(result => { - if (result.exitCode) { - let gitErrorCode: string = null; - - if (/Authentication failed/.test(result.stderr)) { - gitErrorCode = GitErrorCodes.AuthenticationFailed; - } else if (/Not a git repository/.test(result.stderr)) { - gitErrorCode = GitErrorCodes.NotAGitRepository; - } else if (/bad config file/.test(result.stderr)) { - gitErrorCode = GitErrorCodes.BadConfigFile; - } else if (/cannot make pipe for command substitution|cannot create standard input pipe/.test(result.stderr)) { - gitErrorCode = GitErrorCodes.CantCreatePipe; - } else if (/Repository not found/.test(result.stderr)) { - gitErrorCode = GitErrorCodes.RepositoryNotFound; - } else if (/unable to access/.test(result.stderr)) { - gitErrorCode = GitErrorCodes.CantAccessRemote; - } - - if (options.log !== false) { - this.log(result.stderr); - } - - return TPromise.wrapError(new GitError({ - message: 'Failed to execute git', - stdout: result.stdout, - stderr: result.stderr, - exitCode: result.exitCode, - gitErrorCode, - gitCommand: args[0] - })); - } - - return result; - }); - } - - spawn(args: string[], options: any = {}): ChildProcess { - if (!this.gitPath) { - throw new Error('git could not be found in the system.'); - } - - if (!options) { - options = {}; - } - - if (!options.stdio && !options.input) { - options.stdio = ['ignore', null, null]; // Unless provided, ignore stdin and leave default streams for stdout and stderr - } - - options.env = assign({}, options.env || {}, this.env, { - LANG: 'en_US.UTF-8', - VSCODE_GIT_REQUEST_ID: UUIDv4().asHex(), - MONACO_GIT_COMMAND: args[0] - }); - - if (options.log !== false) { - this.log(`git ${args.join(' ')}\n`); - } - - return spawn(this.gitPath, args, options); - } - - onOutput(listener: (output: string) => void): () => void { - this.outputListeners.push(listener); - return () => this.outputListeners.splice(this.outputListeners.indexOf(listener), 1); - } - - private log(output: string): void { - this.outputListeners.forEach(l => l(output)); - } -} - -export interface ICommit { - hash: string; - message: string; -} - -export class Repository { - - constructor( - private _git: Git, - private repository: string, - private defaultEncoding: string, - private env: any = {} - ) { } - - get git(): Git { - return this._git; - } - - get path(): string { - return this.repository; - } - - run(args: string[], options: any = {}): TPromise { - options.env = assign({}, options.env || {}); - options.env = assign(options.env, this.env); - - return this.git.run(this.repository, args, options); - } - - stream(args: string[], options: any = {}): ChildProcess { - options.env = assign({}, options.env || {}); - options.env = assign(options.env, this.env); - - return this.git.stream(this.repository, args, options); - } - - spawn(args: string[], options: any = {}): ChildProcess { - options.env = assign({}, options.env || {}); - options.env = assign(options.env, this.env); - - return this.git.spawn(args, options); - } - - init(): Promise { - return this.run(['init']); - } - - config(scope: string, key: string, value: any, options: any): TPromise { - const args = ['config']; - - if (scope) { - args.push('--' + scope); - } - - args.push(key); - - if (value) { - args.push(value); - } - - return this.run(args, options).then((result) => result.stdout); - } - - show(object: string): ChildProcess { - return this.stream(['show', object]); - } - - buffer(object: string): TPromise { - const child = this.show(object); - - if (!child.stdout) { - return TPromise.wrapError(localize('errorBuffer', "Can't open file from git")); - } - - return detectMimesFromStream(child.stdout, null).then(result => { - return isBinaryMime(result.mimes) ? - TPromise.wrapError({ - message: localize('fileBinaryError', "File seems to be binary and cannot be opened as text"), - fileOperationResult: FileOperationResult.FILE_IS_BINARY - }) : - this.doBuffer(object); - }); - } - - private doBuffer(object: string): TPromise { - const child = this.show(object); - - return exec(child, this.defaultEncoding).then(({ exitCode, stdout }) => { - if (exitCode) { - return TPromise.wrapError(new GitError({ - message: 'Could not buffer object.', - exitCode - })); - } - - return TPromise.as(stdout); - }); - } - - add(paths: string[]): Promise { - const args = ['add', '-A', '--']; - - if (paths && paths.length) { - args.push.apply(args, paths); - } else { - args.push('.'); - } - - return this.run(args); - } - - stage(path: string, data: string): Promise { - const child = this.stream(['hash-object', '--stdin', '-w'], { stdio: [null, null, null] }); - child.stdin.end(data, 'utf8'); - - return exec(child).then(({ exitCode, stdout }) => { - if (exitCode) { - return TPromise.wrapError(new GitError({ - message: 'Could not hash object.', - exitCode: exitCode - })); - } - - return this.run(['update-index', '--cacheinfo', '100644', stdout, path]); - }); - } - - checkout(treeish: string, paths: string[]): Promise { - const args = ['checkout', '-q']; - - if (treeish) { - args.push(treeish); - } - - if (paths && paths.length) { - args.push('--'); - args.push.apply(args, paths); - } - - return this.run(args).then(null, (err: GitError) => { - if (/Please, commit your changes or stash them/.test(err.stderr)) { - err.gitErrorCode = GitErrorCodes.DirtyWorkTree; - } - - return Promise.wrapError(err); - }); - } - - commit(message: string, all: boolean, amend: boolean, signoff: boolean): Promise { - const args = ['commit', '--quiet', '--allow-empty-message', '--file', '-']; - - if (all) { - args.push('--all'); - } - - if (amend) { - args.push('--amend'); - } - - if (signoff) { - args.push('--signoff'); - } - - return this.run(args, { input: message || '' }).then(null, (commitErr: GitError) => { - if (/not possible because you have unmerged files/.test(commitErr.stderr)) { - commitErr.gitErrorCode = GitErrorCodes.UnmergedChanges; - return Promise.wrapError(commitErr); - } - - return this.run(['config', '--get-all', 'user.name']).then(null, (err: GitError) => { - err.gitErrorCode = GitErrorCodes.NoUserNameConfigured; - return Promise.wrapError(err); - }).then(() => { - return this.run(['config', '--get-all', 'user.email']).then(null, (err: GitError) => { - err.gitErrorCode = GitErrorCodes.NoUserEmailConfigured; - return Promise.wrapError(err); - }).then(() => { - return Promise.wrapError(commitErr); - }); - }); - }); - } - - branch(name: string, checkout: boolean): Promise { - const args = checkout ? ['checkout', '-q', '-b', name] : ['branch', '-q', name]; - return this.run(args); - } - - clean(paths: string[]): Promise { - const byDirname = index(paths, p => path.dirname(p), (p, r) => (r || []).concat([p])); - const groups = Object.keys(byDirname).map(key => byDirname[key]); - const tasks = groups.map(group => () => this.run(['clean', '-f', '-q', '--'].concat(group))); - - return sequence(tasks); - } - - undo(): Promise { - return this.run(['clean', '-fd']).then(() => { - return this.run(['checkout', '--', '.']).then(null, (err: GitError) => { - if (/did not match any file\(s\) known to git\./.test(err.stderr)) { - return TPromise.as(null); - } - - return Promise.wrapError(err); - }); - }); - } - - reset(treeish: string, hard: boolean = false): Promise { - const args = ['reset']; - - if (hard) { - args.push('--hard'); - } - - args.push(treeish); - - return this.run(args); - } - - revertFiles(treeish: string, paths: string[]): Promise { - return this.run(['branch']).then((result) => { - let args: string[]; - - // In case there are no branches, we must use rm --cached - if (!result.stdout) { - args = ['rm', '--cached', '-r', '--']; - } else { - args = ['reset', '-q', treeish, '--']; - } - - if (paths && paths.length) { - args.push.apply(args, paths); - } else { - args.push('.'); - } - - return this.run(args).then(null, (err: GitError) => { - // In case there are merge conflicts to be resolved, git reset will output - // some "needs merge" data. We try to get around that. - if (/([^:]+: needs merge\n)+/m.test(err.stdout)) { - return TPromise.as(null); - } - - return Promise.wrapError(err); - }); - }); - } - - fetch(): Promise { - return this.run(['fetch']).then(null, (err: GitError) => { - if (/No remote repository specified\./.test(err.stderr)) { - err.gitErrorCode = GitErrorCodes.NoRemoteRepositorySpecified; - } else if (/Could not read from remote repository/.test(err.stderr)) { - err.gitErrorCode = GitErrorCodes.RemoteConnectionError; - } - - return Promise.wrapError(err); - }); - } - - pull(rebase?: boolean): Promise { - const args = ['pull']; - if (rebase) { args.push('-r'); } - - return this.run(args).then(null, (err: GitError) => { - if (/^CONFLICT \([^)]+\): \b/m.test(err.stdout)) { - err.gitErrorCode = GitErrorCodes.Conflict; - } else if (/Please tell me who you are\./.test(err.stderr)) { - err.gitErrorCode = GitErrorCodes.NoUserNameConfigured; - } else if (/Could not read from remote repository/.test(err.stderr)) { - err.gitErrorCode = GitErrorCodes.RemoteConnectionError; - } else if (/Pull is not possible because you have unmerged files|Cannot pull with rebase: You have unstaged changes|Your local changes to the following files would be overwritten|Please, commit your changes before you can merge/.test(err.stderr)) { - err.gitErrorCode = GitErrorCodes.DirtyWorkTree; - } - - return Promise.wrapError(err); - }); - } - - push(remote?: string, name?: string, options?: IPushOptions): Promise { - const args = ['push']; - if (options && options.setUpstream) { args.push('-u'); } - if (remote) { args.push(remote); } - if (name) { args.push(name); } - - return this.run(args).then(null, (err: GitError) => { - if (/^error: failed to push some refs to\b/m.test(err.stderr)) { - err.gitErrorCode = GitErrorCodes.PushRejected; - } else if (/Could not read from remote repository/.test(err.stderr)) { - err.gitErrorCode = GitErrorCodes.RemoteConnectionError; - } - - return Promise.wrapError(err); - }); - } - - sync(): Promise { - return this.pull().then(() => this.push()); - } - - getRoot(): TPromise { - return this.run(['rev-parse', '--show-toplevel'], { log: false }).then(result => result.stdout.trim()); - } - - getStatus(): TPromise { - return this.run(['status', '-z', '-u'], { log: false }).then((executionResult) => { - const status = executionResult.stdout; - const result: IRawFileStatus[] = []; - let current: IRawFileStatus; - let i = 0; - - function readName(): string { - const start = i; - let c: string; - while ((c = status.charAt(i)) !== '\u0000') { i++; } - return status.substring(start, i++); - } - - while (i < status.length) { - current = { - x: status.charAt(i++), - y: status.charAt(i++), - path: null, - mimetype: null - }; - - i++; - - if (current.x === 'R') { - current.rename = readName(); - } - - current.path = readName(); - current.mimetype = guessMimeTypes(current.path)[0]; - - // If path ends with slash, it must be a nested git repo - if (current.path[current.path.length - 1] === '/') { - continue; - } - - result.push(current); - } - - return TPromise.as(result); - }); - } - - getHEAD(): TPromise { - return this.run(['symbolic-ref', '--short', 'HEAD'], { log: false }).then((result) => { - if (!result.stdout) { - return TPromise.wrapError(new Error('Not in a branch')); - } - - return TPromise.as({ name: result.stdout.trim(), commit: void 0, type: RefType.Head }); - }, (err) => { - return this.run(['rev-parse', 'HEAD'], { log: false }).then((result) => { - if (!result.stdout) { - return TPromise.wrapError(new Error('Error parsing HEAD')); - } - - return TPromise.as({ name: void 0, commit: result.stdout.trim(), type: RefType.Head }); - }); - }); - } - - getRefs(): TPromise { - return this.run(['for-each-ref', '--format', '%(refname) %(objectname)'], { log: false }).then(result => { - return result.stdout.trim().split('\n') - .filter(line => !!line) - .map(line => { - let match: RegExpExecArray; - - if (match = /^refs\/heads\/([^ ]+) ([0-9a-f]{40})$/.exec(line)) { - return { name: match[1], commit: match[2], type: RefType.Head }; - } else if (match = /^refs\/remotes\/([^/]+)\/([^ ]+) ([0-9a-f]{40})$/.exec(line)) { - return { name: `${match[1]}/${match[2]}`, commit: match[3], type: RefType.RemoteHead, remote: match[1] }; - } else if (match = /^refs\/tags\/([^ ]+) ([0-9a-f]{40})$/.exec(line)) { - return { name: match[1], commit: match[2], type: RefType.Tag }; - } - - return null; - }) - .filter(ref => !!ref); - }); - } - - getRemotes(): TPromise { - const regex = /^([^\s]+)\s+([^\s]+)\s/; - - return this.run(['remote', '--verbose'], { log: false }) - .then(result => result.stdout - .trim() - .split('\n') - .filter(b => !!b) - .map(line => regex.exec(line)) - .filter(g => !!g) - .map(groups => ({ name: groups[1], url: groups[2] })) - .filter(uniqueFilter<{ name: string; }>(g => g.name)) - ); - } - - getBranch(branch: string): TPromise { - if (branch === 'HEAD') { - return this.getHEAD(); - } - - return this.run(['rev-parse', branch], { log: false }).then((result) => { - if (!result.stdout) { - return TPromise.wrapError(new Error('No such branch')); - } - - const commit = result.stdout.trim(); - - return this.run(['rev-parse', '--symbolic-full-name', '--abbrev-ref', branch + '@{u}'], { log: false }).then((result: IExecutionResult) => { - const upstream = result.stdout.trim(); - - return this.run(['rev-list', '--left-right', branch + '...' + upstream], { log: false }).then((result) => { - let ahead = 0, behind = 0; - let i = 0; - - while (i < result.stdout.length) { - switch (result.stdout.charAt(i)) { - case '<': ahead++; break; - case '>': behind++; break; - default: i++; break; - } - - while (result.stdout.charAt(i++) !== '\n') { /* no-op */ } - } - - return { - name: branch, - commit: commit, - upstream: upstream, - ahead: ahead, - behind: behind - }; - }); - }, () => { - return { name: branch, commit: commit }; - }); - }); - } - - getCommitTemplate(): TPromise { - return this.run(['config', '--get', 'commit.template']).then(result => { - if (!result.stdout) { - return ''; - } - - // https://github.com/git/git/blob/3a0f269e7c82aa3a87323cb7ae04ac5f129f036b/path.c#L612 - const homedir = os.homedir(); - let templatePath = result.stdout.trim() - .replace(/^~([^\/]*)\//, (_, user) => `${user ? path.join(path.dirname(homedir), user) : homedir}/`); - - if (!path.isAbsolute(templatePath)) { - templatePath = path.join(this.repository, templatePath); - } - - return pfs.readFile(templatePath, 'utf8').then(raw => raw.replace(/^\s*#.*$\n?/gm, '').trim()); - }, () => ''); - } - - getCommit(ref: string): TPromise { - return this.run(['show', '-s', '--format=%H\n%B', ref]).then(result => { - const match = /^([0-9a-f]{40})\n([^]*)$/m.exec(result.stdout.trim()); - - if (!match) { - return TPromise.wrapError('bad commit format'); - } - - return { hash: match[1], message: match[2] }; - }); - } - - onOutput(listener: (output: string) => void): () => void { - return this.git.onOutput(listener); - } -} diff --git a/src/vs/workbench/parts/git/node/gitApp.ts b/src/vs/workbench/parts/git/node/gitApp.ts deleted file mode 100644 index 141fa65f2e342..0000000000000 --- a/src/vs/workbench/parts/git/node/gitApp.ts +++ /dev/null @@ -1,15 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { Server } from 'vs/base/parts/ipc/node/ipc.cp'; -import { createRawGitService } from './rawGitServiceBootstrap'; -import { GitChannel } from 'vs/workbench/parts/git/common/gitIpc'; - -const server = new Server(); -const service = createRawGitService(process.argv[2], process.argv[3], process.argv[4], process.argv[5], process.argv[6]); -const channel = new GitChannel(service); -server.registerChannel('git', channel); diff --git a/src/vs/workbench/parts/git/node/rawGitService.ts b/src/vs/workbench/parts/git/node/rawGitService.ts deleted file mode 100644 index 1127fc6daefe5..0000000000000 --- a/src/vs/workbench/parts/git/node/rawGitService.ts +++ /dev/null @@ -1,237 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { join, isAbsolute, relative } from 'path'; -import { TPromise, Promise } from 'vs/base/common/winjs.base'; -import { detectMimesFromFile, detectMimesFromStream } from 'vs/base/node/mime'; -import { realpath, exists } from 'vs/base/node/pfs'; -import { Repository, GitError } from 'vs/workbench/parts/git/node/git.lib'; -import { IRawGitService, RawServiceState, IRawStatus, IRef, GitErrorCodes, IPushOptions, ICommit } from 'vs/workbench/parts/git/common/git'; -import Event, { Emitter, delayed } from 'vs/base/common/event'; - -export class RawGitService implements IRawGitService { - - private repo: Repository; - private _repositoryRoot: TPromise; - private _onOutput: Emitter; - get onOutput(): Event { return this._onOutput.event; } - - constructor(repo: Repository) { - this.repo = repo; - - let listener: () => void; - - this._onOutput = new Emitter({ - onFirstListenerAdd: () => { - listener = this.repo.onOutput(output => this._onOutput.fire(output)); - }, - onLastListenerRemove: () => { - listener(); - listener = null; - } - }); - } - - getVersion(): TPromise { - if (!this.repo) { - return TPromise.as(null); - } - - return TPromise.as(this.repo.git.version); - } - - private getRepositoryRoot(): TPromise { - return this._repositoryRoot || (this._repositoryRoot = realpath(this.repo.path)); - } - - serviceState(): TPromise { - return TPromise.as(this.repo - ? RawServiceState.OK - : RawServiceState.GitNotFound - ); - } - - statusCount(): TPromise { - if (!this.repo) { - return TPromise.as(0); - } - - return this.status().then(r => r ? r.status.length : 0); - } - - status(): TPromise { - return this.repo.getStatus() - .then(status => this.repo.getHEAD() - .then(HEAD => { - if (HEAD.name) { - return this.repo.getBranch(HEAD.name).then(null, () => HEAD); - } else { - return HEAD; - } - }, (): IRef => null) - .then(HEAD => Promise.join([this.getRepositoryRoot(), this.repo.getRefs(), this.repo.getRemotes()]).then(r => { - return { - repositoryRoot: r[0], - status: status, - HEAD: HEAD, - refs: r[1], - remotes: r[2] - }; - }))) - .then(null, (err) => { - if (err.gitErrorCode === GitErrorCodes.BadConfigFile) { - return Promise.wrapError(err); - } else if (err.gitErrorCode === GitErrorCodes.NotAtRepositoryRoot) { - return Promise.wrapError(err); - } - - return null; - }); - } - - init(): TPromise { - return this.repo.init().then(() => this.status()); - } - - add(filePaths?: string[]): TPromise { - return this.repo.add(filePaths).then(() => this.status()); - } - - stage(filePath: string, content: string): TPromise { - return this.repo.stage(filePath, content).then(() => this.status()); - } - - branch(name: string, checkout?: boolean): TPromise { - return this.repo.branch(name, checkout).then(() => this.status()); - } - - checkout(treeish?: string, filePaths?: string[]): TPromise { - return this.repo.checkout(treeish, filePaths).then(() => this.status()); - } - - clean(filePaths: string[]): TPromise { - return this.repo.clean(filePaths).then(() => this.status()); - } - - undo(): TPromise { - return this.repo.undo().then(() => this.status()); - } - - reset(treeish: string, hard?: boolean): TPromise { - return this.repo.reset(treeish, hard).then(() => this.status()); - } - - revertFiles(treeish: string, filePaths?: string[]): TPromise { - return this.repo.revertFiles(treeish, filePaths).then(() => this.status()); - } - - fetch(): TPromise { - return this.repo.fetch().then(null, (err) => { - if (err.gitErrorCode === GitErrorCodes.NoRemoteRepositorySpecified) { - return TPromise.as(null); - } - - return Promise.wrapError(err); - }).then(() => this.status()); - } - - pull(rebase?: boolean): TPromise { - return this.repo.pull(rebase).then(() => this.status()); - } - - push(remote?: string, name?: string, options?: IPushOptions): TPromise { - return this.repo.push(remote, name, options).then(() => this.status()); - } - - sync(): TPromise { - return this.repo.sync().then(() => this.status()); - } - - commit(message: string, amend?: boolean, stage?: boolean, signoff?: boolean): TPromise { - let promise: Promise = TPromise.as(null); - - if (stage) { - promise = this.repo.add(null); - } - - return promise - .then(() => this.repo.commit(message, stage, amend, signoff)) - .then(() => this.status()); - } - - detectMimetypes(filePath: string, treeish?: string): TPromise { - return exists(join(this.repo.path, filePath)).then((exists) => { - if (exists) { - return detectMimesFromFile(join(this.repo.path, filePath)) - .then(result => result.mimes); - } - - const child = this.repo.show(treeish + ':' + filePath); - - return new TPromise((c, e) => - detectMimesFromStream(child.stdout, filePath) - .then(result => result.mimes) - ); - }); - } - - // careful, this buffers the whole object into memory - show(filePath: string, treeish?: string): TPromise { - treeish = (!treeish || treeish === '~') ? '' : treeish; - - if (isAbsolute(filePath)) { - filePath = relative(this.repo.path, filePath).replace(/\\/g, '/'); - } - - return this.repo.buffer(treeish + ':' + filePath).then(null, e => { - if (e instanceof GitError) { - return ''; // mostly untracked files end up in a git error - } - - return TPromise.wrapError(e); - }); - } - - clone(url: string, parentPath: string): TPromise { - return this.repo.git.clone(url, parentPath); - } - - getCommitTemplate(): TPromise { - return this.repo.getCommitTemplate(); - } - - getCommit(ref: string): TPromise { - return this.repo.getCommit(ref); - } -} - -export class DelayedRawGitService implements IRawGitService { - constructor(private raw: TPromise) { } - onOutput: Event = delayed(this.raw.then(r => r.onOutput)); - getVersion(): TPromise { return this.raw.then(r => r.getVersion()); } - serviceState(): TPromise { return this.raw.then(r => r.serviceState()); } - statusCount(): TPromise { return this.raw.then(r => r.statusCount()); } - status(): TPromise { return this.raw.then(r => r.status()); } - init(): TPromise { return this.raw.then(r => r.init()); } - add(filesPaths?: string[]): TPromise { return this.raw.then(r => r.add(filesPaths)); } - stage(filePath: string, content: string): TPromise { return this.raw.then(r => r.stage(filePath, content)); } - branch(name: string, checkout?: boolean): TPromise { return this.raw.then(r => r.branch(name, checkout)); } - checkout(treeish?: string, filePaths?: string[]): TPromise { return this.raw.then(r => r.checkout(treeish, filePaths)); } - clean(filePaths: string[]): TPromise { return this.raw.then(r => r.clean(filePaths)); } - undo(): TPromise { return this.raw.then(r => r.undo()); } - reset(treeish: string, hard?: boolean): TPromise { return this.raw.then(r => r.reset(treeish, hard)); } - revertFiles(treeish: string, filePaths?: string[]): TPromise { return this.raw.then(r => r.revertFiles(treeish, filePaths)); } - fetch(): TPromise { return this.raw.then(r => r.fetch()); } - pull(rebase?: boolean): TPromise { return this.raw.then(r => r.pull(rebase)); } - push(remote?: string, name?: string, options?: IPushOptions): TPromise { return this.raw.then(r => r.push(remote, name, options)); } - sync(): TPromise { return this.raw.then(r => r.sync()); } - commit(message: string, amend?: boolean, stage?: boolean, signoff?: boolean): TPromise { return this.raw.then(r => r.commit(message, amend, stage, signoff)); } - detectMimetypes(path: string, treeish?: string): TPromise { return this.raw.then(r => r.detectMimetypes(path, treeish)); } - show(path: string, treeish?: string): TPromise { return this.raw.then(r => r.show(path, treeish)); } - clone(url: string, parentPath: string): TPromise { return this.raw.then(r => r.clone(url, parentPath)); } - getCommitTemplate(): TPromise { return this.raw.then(r => r.getCommitTemplate()); } - getCommit(ref: string): TPromise { return this.raw.then(r => r.getCommit(ref)); } -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/node/rawGitServiceBootstrap.ts b/src/vs/workbench/parts/git/node/rawGitServiceBootstrap.ts deleted file mode 100644 index 666250e9fd993..0000000000000 --- a/src/vs/workbench/parts/git/node/rawGitServiceBootstrap.ts +++ /dev/null @@ -1,52 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import objects = require('vs/base/common/objects'); -import uri from 'vs/base/common/uri'; -import { GitErrorCodes, IRawGitService } from 'vs/workbench/parts/git/common/git'; -import gitlib = require('vs/workbench/parts/git/node/git.lib'); -import { RawGitService } from 'vs/workbench/parts/git/node/rawGitService'; -import { join, normalize } from 'path'; -import { realpath } from 'vs/base/node/pfs'; - -export function createRawGitService(gitPath: string, workspaceRoot: string, defaultEncoding: string, exePath: string, version: string): TPromise { - if (!gitPath) { - return TPromise.as(new RawGitService(null)); - } - - const gitRootPath = uri.parse(require.toUrl('vs/workbench/parts/git/node')).fsPath; - const bootstrapPath = `${uri.parse(require.toUrl('bootstrap')).fsPath}.js`; - workspaceRoot = normalize(workspaceRoot); - - const env = objects.assign({}, process.env, { - GIT_ASKPASS: join(gitRootPath, 'askpass.sh'), - VSCODE_GIT_ASKPASS_BOOTSTRAP: bootstrapPath, - VSCODE_GIT_ASKPASS_NODE: exePath, - VSCODE_GIT_ASKPASS_MODULE_ID: 'vs/workbench/parts/git/node/askpass' - }); - - const git = new gitlib.Git({ - gitPath, version, - defaultEncoding: defaultEncoding, - env: env - }); - - const repo = git.open(workspaceRoot); - - return repo.getRoot() - .then(null, (err: gitlib.GitError) => { - if (err instanceof gitlib.GitError && err.gitErrorCode === GitErrorCodes.NotAGitRepository) { - return workspaceRoot; - } - - return TPromise.wrapError(err); - }) - .then(root => realpath(root)) - .then(root => git.open(root)) - .then(repo => new RawGitService(repo)); -} diff --git a/src/vs/workbench/parts/git/node/unscopedGitService.ts b/src/vs/workbench/parts/git/node/unscopedGitService.ts deleted file mode 100644 index 158604c7e00c4..0000000000000 --- a/src/vs/workbench/parts/git/node/unscopedGitService.ts +++ /dev/null @@ -1,135 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import * as path from 'path'; -import { IRawGitService, IRawStatus, ServiceState, RawServiceState, ICommit } from 'vs/workbench/parts/git/common/git'; -import { TPromise } from 'vs/base/common/winjs.base'; -import { assign } from 'vs/base/common/objects'; -import Event, { Emitter } from 'vs/base/common/event'; -import uri from 'vs/base/common/uri'; -import { Git } from './git.lib'; - -export class UnscopedGitService implements IRawGitService { - - private git: Git; - - private _onOutput = new Emitter(); - get onOutput(): Event { return this._onOutput.event; } - - private static STATUS: IRawStatus = { - repositoryRoot: null, - state: ServiceState.NotAWorkspace, - status: [], - HEAD: null, - refs: [], - remotes: [] - }; - - constructor(gitPath: string, version: string, defaultEncoding: string, exePath: string) { - const gitRootPath = uri.parse(require.toUrl('vs/workbench/parts/git/node')).fsPath; - const bootstrapPath = `${uri.parse(require.toUrl('bootstrap')).fsPath}.js`; - const env = assign({}, process.env, { - GIT_ASKPASS: path.join(gitRootPath, 'askpass.sh'), - VSCODE_GIT_ASKPASS_BOOTSTRAP: bootstrapPath, - VSCODE_GIT_ASKPASS_NODE: exePath, - VSCODE_GIT_ASKPASS_MODULE_ID: 'vs/workbench/parts/git/node/askpass' - }); - - this.git = new Git({ gitPath, version, defaultEncoding, env }); - } - - getVersion(): TPromise { - return TPromise.as(null); - } - - serviceState(): TPromise { - return TPromise.as(RawServiceState.OK); - } - - statusCount(): TPromise { - return TPromise.as(0); - } - - status(): TPromise { - return TPromise.as(UnscopedGitService.STATUS); - } - - init(): TPromise { - return TPromise.as(UnscopedGitService.STATUS); - } - - add(filesPaths?: string[]): TPromise { - return TPromise.as(UnscopedGitService.STATUS); - } - - stage(filePath: string, content: string): TPromise { - return TPromise.as(UnscopedGitService.STATUS); - } - - branch(name: string, checkout?: boolean): TPromise { - return TPromise.as(UnscopedGitService.STATUS); - } - - checkout(treeish?: string, filePaths?: string[]): TPromise { - return TPromise.as(UnscopedGitService.STATUS); - } - - clean(filePaths: string[]): TPromise { - return TPromise.as(UnscopedGitService.STATUS); - } - - undo(): TPromise { - return TPromise.as(UnscopedGitService.STATUS); - } - - reset(treeish: string, hard?: boolean): TPromise { - return TPromise.as(UnscopedGitService.STATUS); - } - - revertFiles(treeish: string, filePaths?: string[]): TPromise { - return TPromise.as(UnscopedGitService.STATUS); - } - - fetch(): TPromise { - return TPromise.as(UnscopedGitService.STATUS); - } - - pull(rebase?: boolean): TPromise { - return TPromise.as(UnscopedGitService.STATUS); - } - - push(): TPromise { - return TPromise.as(UnscopedGitService.STATUS); - } - - sync(): TPromise { - return TPromise.as(UnscopedGitService.STATUS); - } - - commit(message: string, amend?: boolean, stage?: boolean, signoff?: boolean): TPromise { - return TPromise.as(UnscopedGitService.STATUS); - } - - detectMimetypes(path: string, treeish?: string): TPromise { - return TPromise.as([]); - } - - show(path: string, treeish?: string): TPromise { - return TPromise.as(null); - } - - clone(url: string, parentPath: string): TPromise { - return this.git.clone(url, parentPath); - } - - getCommitTemplate(): TPromise { - return TPromise.as(null); - } - - getCommit(ref: string): TPromise { - return TPromise.as(null); - } -} \ No newline at end of file diff --git a/src/vs/workbench/parts/git/test/common/gitModel.test.ts b/src/vs/workbench/parts/git/test/common/gitModel.test.ts deleted file mode 100644 index 8b35789d6e9e9..0000000000000 --- a/src/vs/workbench/parts/git/test/common/gitModel.test.ts +++ /dev/null @@ -1,188 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - - -import assert = require('assert'); -import Git = require('vs/workbench/parts/git/common/git'); -import Model = require('vs/workbench/parts/git/common/gitModel'); - -suite('Git - StatusModel', () => { - var model: Git.IStatusModel; - - setup(() => { - model = new Model.StatusModel(); - }); - - teardown(() => { - model = null; - }); - - test('simple update', () => { - model.update([ - { path: 'hello', x: '?', y: '?', mimetype: 'application/octet-stream' } - ]); - - var index = model.getIndexStatus().all(); - var workingTree = model.getWorkingTreeStatus().all(); - var merge = model.getMergeStatus().all(); - - assert.equal(index.length, 0); - assert.equal(workingTree.length, 1); - assert.equal(merge.length, 0); - }); - - test('simple update same file twice', () => { - model.update([ - { path: 'hello', x: '?', y: '?', mimetype: 'application/octet-stream' } - ]); - - var index = model.getIndexStatus().all(); - var workingTree = model.getWorkingTreeStatus().all(); - var merge = model.getMergeStatus().all(); - - assert.equal(index.length, 0); - assert.equal(workingTree.length, 1); - assert.equal(merge.length, 0); - - model.update([ - { path: 'hello', x: '?', y: '?', mimetype: 'application/octet-stream' } - ]); - - index = model.getIndexStatus().all(); - workingTree = model.getWorkingTreeStatus().all(); - merge = model.getMergeStatus().all(); - - assert.equal(index.length, 0); - assert.equal(workingTree.length, 1); - assert.equal(merge.length, 0); - }); - - test('simple update same file twice, first untracked, then ignored', () => { - model.update([ - { path: 'hello', x: '?', y: '?', mimetype: 'application/octet-stream' } - ]); - - var index = model.getIndexStatus().all(); - var workingTree = model.getWorkingTreeStatus().all(); - var merge = model.getMergeStatus().all(); - - assert.equal(index.length, 0); - assert.equal(workingTree.length, 1); - assert.equal(merge.length, 0); - - model.update([ - { path: 'hello', x: '!', y: '!', mimetype: 'application/octet-stream' } - ]); - - index = model.getIndexStatus().all(); - workingTree = model.getWorkingTreeStatus().all(); - merge = model.getMergeStatus().all(); - - assert.equal(index.length, 0); - assert.equal(workingTree.length, 1); - assert.equal(merge.length, 0); - }); - - test('same file, both modified in index, deleted in working tree', () => { - model.update([ - { path: 'hello', x: 'M', y: 'D', mimetype: 'application/octet-stream' } - ]); - - var index = model.getIndexStatus().all(); - var workingTree = model.getWorkingTreeStatus().all(); - var merge = model.getMergeStatus().all(); - - assert.equal(index.length, 1); - assert.equal(workingTree.length, 1); - assert.equal(merge.length, 0); - - assert.equal(index[0].getPath(), 'hello'); - assert.equal(index[0].getStatus(), Git.Status.INDEX_MODIFIED); - - assert.equal(workingTree[0].getPath(), 'hello'); - assert.equal(workingTree[0].getStatus(), Git.Status.DELETED); - }); - - test('index and working tree matches', () => { - model.update([ - { path: 'f1', x: 'M', y: ' ', mimetype: 'application/octet-stream' }, - { path: 'f2', x: 'A', y: ' ', mimetype: 'application/octet-stream' }, - { path: 'f3', x: 'R', y: ' ', mimetype: 'application/octet-stream' }, - { path: 'f4', x: 'C', y: ' ', mimetype: 'application/octet-stream' } - ]); - - var index = model.getIndexStatus().all(); - var workingTree = model.getWorkingTreeStatus().all(); - var merge = model.getMergeStatus().all(); - - assert.equal(index.length, 4); - assert.equal(workingTree.length, 0); - assert.equal(merge.length, 0); - - assert.equal(index[0].getStatus(), Git.Status.INDEX_MODIFIED); - assert.equal(index[1].getStatus(), Git.Status.INDEX_ADDED); - assert.equal(index[2].getStatus(), Git.Status.INDEX_RENAMED); - assert.equal(index[3].getStatus(), Git.Status.INDEX_COPIED); - }); - - test('work tree changed since index', () => { - model.update([ - { path: 'f1', x: ' ', y: 'M', mimetype: 'application/octet-stream' }, - { path: 'f2', x: 'M', y: 'M', mimetype: 'application/octet-stream' }, - { path: 'f3', x: 'A', y: 'M', mimetype: 'application/octet-stream' }, - { path: 'f4', x: 'R', y: 'M', mimetype: 'application/octet-stream' }, - { path: 'f5', x: 'C', y: 'M', mimetype: 'application/octet-stream' } - ]); - - var index = model.getIndexStatus().all(); - var workingTree = model.getWorkingTreeStatus().all(); - var merge = model.getMergeStatus().all(); - - assert.equal(index.length, 4); - assert.equal(workingTree.length, 5); - assert.equal(merge.length, 0); - - assert.equal(index[0].getStatus(), Git.Status.INDEX_MODIFIED); - assert.equal(index[1].getStatus(), Git.Status.INDEX_ADDED); - assert.equal(index[2].getStatus(), Git.Status.INDEX_RENAMED); - assert.equal(index[3].getStatus(), Git.Status.INDEX_COPIED); - - assert.equal(workingTree[0].getStatus(), Git.Status.MODIFIED); - assert.equal(workingTree[1].getStatus(), Git.Status.MODIFIED); - assert.equal(workingTree[2].getStatus(), Git.Status.MODIFIED); - assert.equal(workingTree[3].getStatus(), Git.Status.MODIFIED); - assert.equal(workingTree[3].getStatus(), Git.Status.MODIFIED); - }); - - test('deleted in work tree', () => { - model.update([ - { path: 'f1', x: ' ', y: 'D', mimetype: 'application/octet-stream' }, - { path: 'f2', x: 'M', y: 'D', mimetype: 'application/octet-stream' }, - { path: 'f3', x: 'A', y: 'D', mimetype: 'application/octet-stream' }, - { path: 'f4', x: 'R', y: 'D', mimetype: 'application/octet-stream' }, - { path: 'f5', x: 'C', y: 'D', mimetype: 'application/octet-stream' } - ]); - - var index = model.getIndexStatus().all(); - var workingTree = model.getWorkingTreeStatus().all(); - var merge = model.getMergeStatus().all(); - - assert.equal(index.length, 4); - assert.equal(workingTree.length, 5); - assert.equal(merge.length, 0); - - assert.equal(index[0].getStatus(), Git.Status.INDEX_MODIFIED); - assert.equal(index[1].getStatus(), Git.Status.INDEX_ADDED); - assert.equal(index[2].getStatus(), Git.Status.INDEX_RENAMED); - assert.equal(index[3].getStatus(), Git.Status.INDEX_COPIED); - - assert.equal(workingTree[0].getStatus(), Git.Status.DELETED); - assert.equal(workingTree[1].getStatus(), Git.Status.DELETED); - assert.equal(workingTree[2].getStatus(), Git.Status.DELETED); - assert.equal(workingTree[3].getStatus(), Git.Status.DELETED); - assert.equal(workingTree[3].getStatus(), Git.Status.DELETED); - }); -}); diff --git a/src/vs/workbench/parts/git/test/common/stageRanges.test.ts b/src/vs/workbench/parts/git/test/common/stageRanges.test.ts deleted file mode 100644 index cd8b50cd1c19d..0000000000000 --- a/src/vs/workbench/parts/git/test/common/stageRanges.test.ts +++ /dev/null @@ -1,475 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - - -import * as assert from 'assert'; -import { SelectedChange, getSelectedChanges, applyChangesToModel, getChangeRevertEdits } from 'vs/workbench/parts/git/common/stageRanges'; -import { Model } from 'vs/editor/common/model/model'; -import { IChange } from 'vs/editor/common/editorCommon'; -import { Selection } from 'vs/editor/common/core/selection'; - -function changesEqual(actual: IChange[], expected: IChange[]) { - assert.equal(actual.length, expected.length); - if (actual.length === expected.length) { - for (var i = 0; i < actual.length; ++i) { - assert.equal(actual[i].modifiedStartLineNumber, expected[i].modifiedStartLineNumber); - assert.equal(actual[i].modifiedEndLineNumber, expected[i].modifiedEndLineNumber); - assert.equal(actual[i].originalStartLineNumber, expected[i].originalStartLineNumber); - assert.equal(actual[i].originalEndLineNumber, expected[i].originalEndLineNumber); - } - } -} - -function createChange(modifiedStart: number, modifiedEnd: number, originalStart: number, originalEnd: number): IChange { - return { - modifiedStartLineNumber: modifiedStart, - modifiedEndLineNumber: modifiedEnd, - originalStartLineNumber: originalStart, - originalEndLineNumber: originalEnd - }; -} - -function createSelectedChange(modifiedStart: number, modifiedEnd: number, originalStart: number, originalEnd: number, fullModifiedStart = modifiedStart, fullModifiedEnd = modifiedEnd): SelectedChange { - return new SelectedChange( - createChange(modifiedStart, modifiedEnd, originalStart, originalEnd), - createChange(fullModifiedStart, fullModifiedEnd, originalStart, originalEnd)); -} - -suite('Git - Stage ranges', () => { - - test('Get selected changes test - no change selected (selection before changes)', () => { - var selections: Selection[] = []; - selections.push(new Selection(1, 1, 1, 1)); - var changes: IChange[] = []; - changes.push(createChange(2, 3, 1, 1)); - var result = getSelectedChanges(changes, selections); - assert.equal(result.length, 0); - }); - - test('Get selected changes test - no change selected (selection after changes)', () => { - var selections: Selection[] = []; - selections.push(new Selection(5, 3, 7, 8)); - var changes: IChange[] = []; - changes.push(createChange(2, 3, 1, 1)); - var result = getSelectedChanges(changes, selections); - assert.equal(result.length, 0); - }); - - test('Get selected changes test - one change fully selected', () => { - var selections: Selection[] = []; - selections.push(new Selection(5, 3, 7, 8)); - var changes: IChange[] = []; - changes.push(createChange(2, 3, 1, 1), createChange(5, 7, 2, 6)); - var result = getSelectedChanges(changes, selections); - var expected: IChange[] = []; - expected.push(createChange(5, 7, 2, 6)); - changesEqual(result, expected); - }); - - test('Get selected changes test - one change fully selected(deletion)', () => { - var selections: Selection[] = []; - selections.push(new Selection(5, 3, 7, 8)); - var changes: IChange[] = []; - changes.push(createChange(2, 3, 1, 1), createChange(5, 0, 5, 6)); - var result = getSelectedChanges(changes, selections); - var expected: IChange[] = []; - expected.push(createChange(5, 0, 5, 6)); - changesEqual(result, expected); - }); - - test('Get selected changes test - one change (insertion) partially selected', () => { - var selections: Selection[] = []; - selections.push(new Selection(5, 3, 6, 1)); - var changes: IChange[] = []; - changes.push(createChange(2, 3, 1, 0), createChange(5, 7, 2, 0)); - var result = getSelectedChanges(changes, selections); - var expected: IChange[] = []; - expected.push(createChange(5, 6, 2, 0)); - changesEqual(result, expected); - }); - - test('Get selected changes test - multiple changes selected with one selection', () => { - var selections: Selection[] = []; - selections.push(new Selection(2, 7, 7, 1)); - var changes: IChange[] = []; - changes.push(createChange(2, 3, 1, 1), createChange(5, 7, 2, 6)); - var result = getSelectedChanges(changes, selections); - var expected = changes; - changesEqual(result, expected); - }); - - test('Get selected changes test - one change partially seleceted with multiple selections', () => { - var selections: Selection[] = []; - selections.push(new Selection(2, 2, 5, 5), new Selection(7, 2, 9, 1)); - var changes: IChange[] = []; - changes.push(createChange(1, 15, 1, 10), createChange(120, 127, 122, 126)); - var result = getSelectedChanges(changes, selections); - var expected: IChange[] = []; - expected.push(createChange(2, 5, 1, 10), createChange(7, 9, 1, 10)); - changesEqual(result, expected); - }); - - test('Get selected changes test - one change partially seleceted with overlapping selections', () => { - var selections: Selection[] = []; - selections.push(new Selection(2, 2, 5, 5), new Selection(5, 2, 9, 1)); - var changes: IChange[] = []; - changes.push(createChange(1, 15, 1, 10), createChange(120, 127, 122, 126)); - var result = getSelectedChanges(changes, selections); - var expected: IChange[] = []; - expected.push(createChange(2, 5, 1, 10), createChange(6, 9, 1, 10)); - changesEqual(result, expected); - }); - - test('Get selected changes test - multiple changes partially selected with multiple selections', () => { - var selections: Selection[] = []; - selections.push(new Selection(3, 1, 9, 5), new Selection(115, 2, 129, 1)); - var changes: IChange[] = []; - changes.push(createChange(1, 15, 1, 10), createChange(116, 135, 122, 126)); - var result = getSelectedChanges(changes, selections); - var expected: IChange[] = []; - expected.push(createChange(3, 9, 1, 10), createChange(116, 129, 122, 126)); - changesEqual(result, expected); - }); - - test('Get selected changes test - multiple changes selected with multiple selections. Multiple changes not selected', () => { - var selections: Selection[] = []; - selections.push(new Selection(33, 11, 79, 15), new Selection(155, 21, 189, 11)); - var changes: IChange[] = []; - changes.push(createChange(1, 45, 1, 0), createChange(80, 89, 72, 79), createChange(154, 190, 152, 186), createChange(216, 235, 222, 226)); - var result = getSelectedChanges(changes, selections); - var expected: IChange[] = []; - expected.push(createChange(33, 45, 1, 0), createChange(155, 189, 152, 186)); - changesEqual(result, expected); - }); - - function createModel(text: string): Model { - return Model.createFromString(text); - } - - test('Apply changes to model - no changes', () => { - var original = createModel('One line that is equal. '); - var modified = createModel('One line that is equal. \n Second line is new.'); - var changes: IChange[] = []; - var result = applyChangesToModel(original, modified, changes); - var expected = original; - assert.equal(result, expected.getValue()); - original.dispose(); - modified.dispose(); - }); - - test('Apply changes to model - one line change at the end', () => { - var original = createModel('One line that is equal. '); - var modified = createModel('One line that is equal. \n Second line is new.'); - var changes: IChange[] = []; - changes.push(createChange(2, 2, 2, 2)); - var result = applyChangesToModel(original, modified, changes); - var expected = modified; - assert.equal(result, expected.getValue()); - original.dispose(); - modified.dispose(); - }); - - test('Apply changes to model - one line insertion in the middle', () => { - var original = createModel('One line that is equal. \n Last line same. '); - var modified = createModel('One line that is equal. \n Second line is new. \n Last line same. '); - var changes: IChange[] = []; - changes.push(createChange(2, 2, 1, 0)); - var result = applyChangesToModel(original, modified, changes); - var expected = modified; - assert.equal(result, expected.getValue()); - original.dispose(); - modified.dispose(); - }); - - test('Apply changes to model - three empty lines insertion in the middle', () => { - var original = createModel('hello\n there\n isidor\n'); - var modified = createModel('hello\n there\n \n \n \n isidor\n'); - var changes: IChange[] = []; - changes.push(createChange(3, 5, 2, 0)); - var result = applyChangesToModel(original, modified, changes); - var expected = modified; - assert.equal(result, expected.getValue()); - original.dispose(); - modified.dispose(); - }); - - test('Apply changes to model - one line deletion', () => { - var original = createModel('One line that is equal. \n Second line is old. \n Third line same. \n Forth line not important'); - var modified = createModel('One line that is equal. \n Third line same. '); - var changes: IChange[] = []; - changes.push(createChange(2, 0, 2, 2)); - var result = applyChangesToModel(original, modified, changes); - var expected = createModel('One line that is equal. \n Third line same. \n Forth line not important'); - assert.equal(result, expected.getValue()); - original.dispose(); - modified.dispose(); - expected.dispose(); - }); - - test('Apply changes to model - one multi line change', () => { - var original = createModel('One line that is equal. \n Second line is different. \n Third line also different. \n Forth line is same. \n Fifth line is different.'); - var modified = createModel('One line that is equal. \n 2nd line is different. \n 3rd line also different. \n Forth line is same. \n 5th line is different.'); - var changes: IChange[] = []; - changes.push(createChange(2, 3, 2, 3)); - var result = applyChangesToModel(original, modified, changes); - var expected = createModel('One line that is equal. \n 2nd line is different. \n 3rd line also different. \n Forth line is same. \n Fifth line is different.'); - assert.equal(result, expected.getValue()); - original.dispose(); - modified.dispose(); - expected.dispose(); - }); - - test('Apply changes to model - two overlapping changes', () => { - var original = createModel(' One \n Two \n Three \n Four \n Five \n'); - var modified = createModel(' One \n 2 \n 3 \n 4 \n NotSelected \n'); - var changes: IChange[] = []; - changes.push(createChange(2, 3, 2, 4), createChange(4, 4, 2, 4)); - var result = applyChangesToModel(original, modified, changes); - var expected = createModel(' One \n 2 \n 3 \n 4 \n Five \n'); - assert.equal(result, expected.getValue()); - original.dispose(); - modified.dispose(); - expected.dispose(); - }); - - test('Apply changes to model - multiple small changes', () => { - var original = createModel(' One \n Two \n Three \n Four \n Five \n Six \n Seven \n Eight \n'); - var modified = createModel(' One \n 2 \n Three \n 4 \n 5 \n Six \n 7 \n 8 \n'); - var changes: IChange[] = []; - changes.push(createChange(1, 2, 1, 2), createChange(5, 5, 5, 5), createChange(7, 8, 7, 8)); - var result = applyChangesToModel(original, modified, changes); - var expected = createModel(' One \n 2 \n Three \n Four \n 5 \n Six \n 7 \n 8 \n'); - assert.equal(result, expected.getValue()); - original.dispose(); - modified.dispose(); - expected.dispose(); - }); - - test('Apply changes to model - multiple changes - insertion, deletion and modification', () => { - var original = createModel(' One \n Two \n Three \n Four \n Five \n Six \n Seven \n Eight \n Nine \n Ten'); - var modified = createModel(' 1 \n Three \n 4 \n 5 \n Six \n 7 \n NEWLINE \n Eight '); - var changes: IChange[] = []; - changes.push(createChange(1, 1, 1, 1), createChange(2, 0, 2, 2), createChange(3, 3, 4, 4), createChange(7, 7, 7, 0), createChange(7, 0, 9, 10)); - var result = applyChangesToModel(original, modified, changes); - var expected = createModel(' 1 \n Three \n 4 \n Five \n Six \n Seven \n NEWLINE \n Eight '); - assert.equal(result, expected.getValue()); - original.dispose(); - modified.dispose(); - expected.dispose(); - }); - - test('Revert changes on model - no changes', () => { - var original = createModel('One line that is equal. '); - var modified = createModel('One line that is equal. \n Second line is new.'); - var changes: SelectedChange[] = []; - const edits = getChangeRevertEdits(original, modified, changes); - - assert.equal(edits.length, 0); - original.dispose(); - modified.dispose(); - }); - - test('Revert changes on model - one line insertion at the beginning', () => { - const selections = [new Selection(1, 1, 1, 1)]; - const original = createModel(' One line that is equal. '); - const modified = createModel('Inserted line is new. \n One line that is equal. '); - const changes: SelectedChange[] = []; - changes.push(createSelectedChange(1, 1, 0, 0)); - const edits = getChangeRevertEdits(original, modified, changes); - - modified.pushEditOperations(selections, edits, () => selections); - const expected = original; - assert.equal(modified.getValue(), expected.getValue()); - original.dispose(); - modified.dispose(); - }); - - test('Revert changes on model - one line insertion in the middle', () => { - const selections = [new Selection(1, 1, 1, 1)]; - const original = createModel('One line that is equal. \n Last line same. '); - const modified = createModel('One line that is equal. \n Second line is new. \n Last line same. '); - const changes: SelectedChange[] = []; - changes.push(createSelectedChange(2, 2, 1, 0)); - const edits = getChangeRevertEdits(original, modified, changes); - - modified.pushEditOperations(selections, edits, () => selections); - const expected = original; - assert.equal(modified.getValue(), expected.getValue()); - original.dispose(); - modified.dispose(); - }); - - test('Revert changes on model - one line insertion at the end', () => { - const selections = [new Selection(1, 1, 1, 1)]; - const original = createModel('One line that is equal. '); - const modified = createModel('One line that is equal. \n Second line is new.'); - const changes: SelectedChange[] = []; - changes.push(createSelectedChange(2, 2, 1, 0)); - const edits = getChangeRevertEdits(original, modified, changes); - - modified.pushEditOperations(selections, edits, () => selections); - const expected = original; - assert.equal(modified.getValue(), expected.getValue()); - original.dispose(); - modified.dispose(); - }); - - test('Revert changes on model - one line deletion at the beginning', () => { - const selections = [new Selection(1, 1, 1, 1)]; - const original = createModel('First line is deleted. \n One line that is equal. '); - const modified = createModel(' One line that is equal. '); - const changes: SelectedChange[] = []; - changes.push(createSelectedChange(0, 0, 1, 1)); - const edits = getChangeRevertEdits(original, modified, changes); - - modified.pushEditOperations(selections, edits, () => selections); - const expected = original; - assert.equal(modified.getValue(), expected.getValue()); - original.dispose(); - modified.dispose(); - }); - - test('Revert changes on model - one line deletion in the middle', () => { - const selections = [new Selection(1, 1, 1, 1)]; - const original = createModel('One line that is equal. \n Second line is deleted. \n Last line same. '); - const modified = createModel('One line that is equal. \n Last line same. '); - const changes: SelectedChange[] = []; - changes.push(createSelectedChange(1, 0, 2, 2)); - const edits = getChangeRevertEdits(original, modified, changes); - - modified.pushEditOperations(selections, edits, () => selections); - const expected = original; - assert.equal(modified.getValue(), expected.getValue()); - original.dispose(); - modified.dispose(); - }); - - test('Revert changes on model - one line deletion at the end', () => { - const selections = [new Selection(1, 1, 1, 1)]; - const original = createModel('One line that is equal. \n Second line is deleted.'); - const modified = createModel('One line that is equal. '); - const changes: SelectedChange[] = []; - changes.push(createSelectedChange(2, 0, 2, 2)); - const edits = getChangeRevertEdits(original, modified, changes); - - modified.pushEditOperations(selections, edits, () => selections); - const expected = original; - assert.equal(modified.getValue(), expected.getValue()); - original.dispose(); - modified.dispose(); - }); - - test('Revert changes on model - three empty lines insertion in the middle', () => { - const selections = [new Selection(1, 1, 1, 1)]; - const original = createModel('hello\n there\n isidor\n'); - const modified = createModel('hello\n there\n \n \n \n isidor\n'); - const changes: SelectedChange[] = []; - changes.push(createSelectedChange(3, 5, 2, 0)); - const edits = getChangeRevertEdits(original, modified, changes); - - modified.pushEditOperations(selections, edits, () => selections); - const expected = original; - assert.equal(modified.getValue(), expected.getValue()); - original.dispose(); - modified.dispose(); - }); - - test('Revert changes on model - one line deletion', () => { - const selections = [new Selection(1, 1, 1, 1)]; - const original = createModel('One line that is equal. \n Second line is old. \n Third line same. \n Forth line not important'); - const modified = createModel('One line that is equal. \n Third line same. '); - const changes: SelectedChange[] = []; - changes.push(createSelectedChange(1, 0, 2, 2)); - const edits = getChangeRevertEdits(original, modified, changes); - - modified.pushEditOperations(selections, edits, () => selections); - const expected = createModel('One line that is equal. \n Second line is old. \n Third line same. '); - assert.equal(modified.getValue(), expected.getValue()); - original.dispose(); - modified.dispose(); - expected.dispose(); - }); - - test('Revert changes on model - one multi line change', () => { - const selections = [new Selection(1, 1, 1, 1)]; - const original = createModel('One line that is equal. \n Second line is different. \n Third line also different. \n Forth line is same. \n Fifth line is different.'); - const modified = createModel('One line that is equal. \n 2nd line is different. \n 3rd line also different. \n Forth line is same. \n 5th line is different.'); - const changes: SelectedChange[] = []; - changes.push(createSelectedChange(2, 3, 2, 3)); - const edits = getChangeRevertEdits(original, modified, changes); - - modified.pushEditOperations(selections, edits, () => selections); - const expected = createModel('One line that is equal. \n Second line is different. \n Third line also different. \n Forth line is same. \n 5th line is different.'); - assert.equal(modified.getValue(), expected.getValue()); - original.dispose(); - modified.dispose(); - expected.dispose(); - }); - - test('Revert changes on model - one multi line change - partial revert', () => { - const selections = [new Selection(1, 1, 1, 1)]; - const original = createModel('One line that is equal. \n Second line is different. \n Third line also different. \n Forth line is same. \n Fifth line is different.'); - const modified = createModel('One line that is equal. \n 2nd line is different. \n 3rd line also different. \n Forth line is same. \n 5th line is different.'); - const changes: SelectedChange[] = []; - changes.push(createSelectedChange(3, 3, 2, 3, 2, 3)); - const edits = getChangeRevertEdits(original, modified, changes); - - modified.pushEditOperations(selections, edits, () => selections); - const expected = createModel('One line that is equal. \n 2nd line is different. \n Third line also different. \n Forth line is same. \n 5th line is different.'); - assert.equal(modified.getValue(), expected.getValue()); - original.dispose(); - modified.dispose(); - expected.dispose(); - }); - - test('Revert changes on model - multiple small changes', () => { - const selections = [new Selection(1, 1, 1, 1)]; - const original = createModel(' One \n Two \n Three \n Four \n Five \n Six \n Seven \n Eight \n'); - const modified = createModel(' One \n 2 \n Three \n 4 \n 5 \n Six \n 7 \n 8 \n'); - const changes: SelectedChange[] = []; - changes.push(createSelectedChange(1, 2, 1, 2), createSelectedChange(4, 5, 4, 5), createSelectedChange(7, 8, 7, 8)); - const edits = getChangeRevertEdits(original, modified, changes); - - modified.pushEditOperations(selections, edits, () => selections); - const expected = original; - assert.equal(modified.getValue(), expected.getValue()); - original.dispose(); - modified.dispose(); - expected.dispose(); - }); - - test('Revert changes on model - multiple changes - insertion, deletion and modification', () => { - const selections = [new Selection(1, 1, 1, 1)]; - const original = createModel(' One \n Two \n Three \n Four \n Five \n Six \n Seven \n Eight \n Nine \n Ten'); - const modified = createModel(' 1 \n Three \n 4 \n 5 \n Six \n 7 \n NEWLINE \n Eight '); - const changes: SelectedChange[] = []; - changes.push(createSelectedChange(1, 1, 1, 1), createSelectedChange(1, 0, 2, 2), createSelectedChange(3, 4, 4, 5), createSelectedChange(6, 7, 7, 7), createSelectedChange(8, 0, 9, 10)); - const edits = getChangeRevertEdits(original, modified, changes); - - modified.pushEditOperations(selections, edits, () => selections); - const expected = original; - assert.equal(modified.getValue(), expected.getValue()); - original.dispose(); - modified.dispose(); - expected.dispose(); - }); - - test('Revert changes on model - multiple changes - partial revert', () => { - const selections = [new Selection(1, 1, 1, 1)]; - const original = createModel(' One \n Two \n Three \n Four \n Five \n Six \n Seven \n Eight \n Nine \n Ten'); - const modified = createModel(' 1 \n Three \n 4 \n 5 \n Six \n 7 \n NEWLINE \n Eight '); - const changes: SelectedChange[] = []; - changes.push(createSelectedChange(1, 1, 1, 1), createSelectedChange(1, 0, 2, 2), createSelectedChange(3, 4, 4, 5), createSelectedChange(6, 7, 7, 7), createSelectedChange(8, 0, 9, 10)); - const edits = getChangeRevertEdits(original, modified, changes); - - modified.pushEditOperations(selections, edits, () => selections); - const expected = original; - assert.equal(modified.getValue(), expected.getValue()); - original.dispose(); - modified.dispose(); - expected.dispose(); - }); -}); diff --git a/src/vs/workbench/parts/scm/browser/scmPreview.ts b/src/vs/workbench/parts/scm/browser/scmPreview.ts deleted file mode 100644 index 0f2db3ad70a8d..0000000000000 --- a/src/vs/workbench/parts/scm/browser/scmPreview.ts +++ /dev/null @@ -1,96 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { Action } from 'vs/base/common/actions'; -import { TPromise } from 'vs/base/common/winjs.base'; -import { IWindowService } from 'vs/platform/windows/common/windows'; -import { IMessageService } from 'vs/platform/message/common/message'; - -// tslint:disable -import pkg from 'vs/platform/node/package'; -// tslint:enable - -// Enable this by default -function getDefaultValue(): boolean { - const minorVersion = pkg.version.replace(/^(\d+\.\d+).*$/, '$1'); - const forcedVersion = window.localStorage.getItem('forcedPreviewSCMVersion'); - - if (forcedVersion !== minorVersion) { - window.localStorage.setItem('forcedPreviewSCMVersion', minorVersion); - window.localStorage.setItem('enablePreviewSCM', 'true'); - } - - const value = window.localStorage.getItem('enablePreviewSCM'); - return value !== 'false'; -} - -export default class SCMPreview { - - private static readonly _enabled = getDefaultValue(); - - static get enabled(): boolean { - return this._enabled; - } - - static set enabled(enabled: boolean) { - window.localStorage.setItem('enablePreviewSCM', enabled ? 'true' : 'false'); - } -} - -export class EnableSCMPreviewAction extends Action { - - static ID = 'enablescmpreview'; - static LABEL = 'Disable Legacy Git'; - - constructor( - id = EnableSCMPreviewAction.ID, - label = EnableSCMPreviewAction.LABEL, - @IWindowService private windowService: IWindowService, - @IMessageService private messageService: IMessageService, - ) { - super(EnableSCMPreviewAction.ID, EnableSCMPreviewAction.LABEL, '', true); - } - - run(): TPromise { - const message = 'This will reload this window, do you want to continue?'; - const result = this.messageService.confirm({ message }); - - if (!result) { - return undefined; - } - - SCMPreview.enabled = true; - return this.windowService.reloadWindow(); - } -} - -export class DisableSCMPreviewAction extends Action { - - static ID = 'disablescmpreview'; - static LABEL = 'Enable Legacy Git'; - - constructor( - id = DisableSCMPreviewAction.ID, - label = DisableSCMPreviewAction.LABEL, - @IWindowService private windowService: IWindowService, - @IMessageService private messageService: IMessageService, - ) { - super(DisableSCMPreviewAction.ID, DisableSCMPreviewAction.LABEL, '', true); - } - - run(): TPromise { - const message = 'This will reload this window, do you want to continue?'; - const result = this.messageService.confirm({ message }); - - if (!result) { - return undefined; - } - - SCMPreview.enabled = false; - return this.windowService.reloadWindow(); - } -} \ No newline at end of file diff --git a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts index b372695a4bdb8..2646a7185f3ab 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts @@ -21,7 +21,6 @@ import { ISCMService } from 'vs/workbench/services/scm/common/scm'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { StatusUpdater } from './scmActivity'; -import SCMPreview, { DisableSCMPreviewAction, EnableSCMPreviewAction } from '../browser/scmPreview'; class OpenSCMViewletAction extends ToggleViewletAction { @@ -60,40 +59,32 @@ export class SwitchProvider extends Action { Registry.as(WorkbenchExtensions.Workbench) .registerWorkbenchContribution(DirtyDiffDecorator); -if (SCMPreview.enabled) { - const viewletDescriptor = new ViewletDescriptor( - 'vs/workbench/parts/scm/electron-browser/scmViewlet', - 'SCMViewlet', - VIEWLET_ID, - localize('source control', "Source Control"), - 'scm', - 36 - ); - - Registry.as(ViewletExtensions.Viewlets) - .registerViewlet(viewletDescriptor); - - Registry.as(WorkbenchExtensions.Workbench) - .registerWorkbenchContribution(StatusUpdater); - - // Register Action to Open Viewlet - Registry.as(WorkbenchActionExtensions.WorkbenchActions).registerWorkbenchAction( - new SyncActionDescriptor(OpenSCMViewletAction, VIEWLET_ID, localize('toggleSCMViewlet', "Show SCM"), { - primary: null, - win: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G }, - linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G }, - mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_G } - }), - 'View: Show SCM', - localize('view', "View") - ); - - Registry.as(WorkbenchActionExtensions.WorkbenchActions) - .registerWorkbenchAction(new SyncActionDescriptor(SwitchProvider, SwitchProvider.ID, SwitchProvider.LABEL), 'SCM: Switch Provider', 'SCM'); - - Registry.as(WorkbenchActionExtensions.WorkbenchActions) - .registerWorkbenchAction(new SyncActionDescriptor(DisableSCMPreviewAction, DisableSCMPreviewAction.ID, DisableSCMPreviewAction.LABEL), 'SCM: Disable Preview SCM', 'SCM'); -} else { - Registry.as(WorkbenchActionExtensions.WorkbenchActions) - .registerWorkbenchAction(new SyncActionDescriptor(EnableSCMPreviewAction, EnableSCMPreviewAction.ID, EnableSCMPreviewAction.LABEL), 'SCM: Enable Preview SCM', 'SCM'); -} +const viewletDescriptor = new ViewletDescriptor( + 'vs/workbench/parts/scm/electron-browser/scmViewlet', + 'SCMViewlet', + VIEWLET_ID, + localize('source control', "Source Control"), + 'scm', + 36 +); + +Registry.as(ViewletExtensions.Viewlets) + .registerViewlet(viewletDescriptor); + +Registry.as(WorkbenchExtensions.Workbench) + .registerWorkbenchContribution(StatusUpdater); + +// Register Action to Open Viewlet +Registry.as(WorkbenchActionExtensions.WorkbenchActions).registerWorkbenchAction( + new SyncActionDescriptor(OpenSCMViewletAction, VIEWLET_ID, localize('toggleSCMViewlet', "Show SCM"), { + primary: null, + win: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G }, + linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G }, + mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_G } + }), + 'View: Show SCM', + localize('view', "View") +); + +Registry.as(WorkbenchActionExtensions.WorkbenchActions) + .registerWorkbenchAction(new SyncActionDescriptor(SwitchProvider, SwitchProvider.ID, SwitchProvider.LABEL), 'SCM: Switch Provider', 'SCM'); diff --git a/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts b/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts index 33a812a71de2d..8a3bb16246ae8 100644 --- a/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts +++ b/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts @@ -17,7 +17,6 @@ import { localize } from 'vs/nls'; import { Action } from 'vs/base/common/actions'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; -import SCMPreview from 'vs/workbench/parts/scm/browser/scmPreview'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; @@ -50,7 +49,7 @@ const keys: Key[] = [ id: 'git', arrow: '←', label: localize('welcomeOverlay.git', "Source code management"), - command: SCMPreview.enabled ? 'workbench.view.scm' : 'workbench.view.git' + command: 'workbench.view.scm' }, { id: 'debug', diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 1acc0111dd9af..7da8192ba260a 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -33,7 +33,6 @@ import { Scope } from 'vs/workbench/common/memento'; import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { once } from 'vs/base/common/event'; -import SCMPreview from 'vs/workbench/parts/scm/browser/scmPreview'; import { isObject } from 'vs/base/common/types'; import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; @@ -430,7 +429,9 @@ export class WalkThroughPart extends BaseEditor { private updateMarkerClasses() { const innerContent = this.content.firstElementChild; - if (SCMPreview.enabled && innerContent) { + + // TODO@christof + if (true && innerContent) { innerContent.classList.add('scmEnabled'); } } From 4962cfee0c37f076808909c670b80f1abdfb4243 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Fri, 5 May 2017 16:01:22 +0200 Subject: [PATCH 0219/2747] Added clarification to the regex and public method. --- .../workbench/parts/debug/browser/linkDetector.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/linkDetector.ts b/src/vs/workbench/parts/debug/browser/linkDetector.ts index a94baa7b26c2c..55657a248279d 100644 --- a/src/vs/workbench/parts/debug/browser/linkDetector.ts +++ b/src/vs/workbench/parts/debug/browser/linkDetector.ts @@ -14,11 +14,11 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace export class LinkDetector { private static FILE_LOCATION_PATTERNS: RegExp[] = [ - // group 0: the full thing :) - // group 1: absolute path + // group 0: full path with line and column + // group 1: full path without line and column, matched by `*.*` in the end to work only on paths with extensions in the end (s.t. http://test.com:8000 would not match) // group 2: drive letter on windows with trailing backslash or leading slash on mac/linux - // group 3: line number - // group 4: column number + // group 3: line number, matched by (:(\d+)) + // group 4: column number, matched by ((?::(\d+))?) // eg: at Context. (c:\Users\someone\Desktop\mocha-runner\test\test.js:26:11) /(?![\(])(?:file:\/\/)?((?:([a-zA-Z]+:)|[^\(\)<>\'\"\[\]:\s]+)(?:[\\/][^\(\)<>\'\"\[\]:]*)?\.[a-zA-Z]+[0-9]*):(\d+)(?::(\d+))?/g ]; @@ -30,6 +30,12 @@ export class LinkDetector { // noop } + /** + * Matches and handles relative and absolute file links in the string provided. + * Returns element that wraps the processed string, where matched links are replaced by and unmatched parts are surrounded by elements. + * 'onclick' event is attached to all anchored links that opens them in the editor. + * If no links were detected, returns the original string. + */ public handleLinks(text: string): HTMLElement | string { let linkContainer: HTMLElement; From 17ea7e5143b6fb229ec0cc9998b04e4d302bbb8d Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 5 May 2017 16:03:46 +0200 Subject: [PATCH 0220/2747] more getLeadingWhitespace-tricks --- src/vs/base/common/strings.ts | 8 ++++---- src/vs/base/test/common/strings.test.ts | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/vs/base/common/strings.ts b/src/vs/base/common/strings.ts index 1886577902bfe..d79fcdfe5a184 100644 --- a/src/vs/base/common/strings.ts +++ b/src/vs/base/common/strings.ts @@ -293,14 +293,14 @@ export function firstNonWhitespaceIndex(str: string): number { * Returns the leading whitespace of the string. * If the string contains only whitespaces, returns entire string */ -export function getLeadingWhitespace(str: string, from: number = 0): string { - for (let i = from, len = str.length; i < len; i++) { +export function getLeadingWhitespace(str: string, start: number = 0, end: number = str.length): string { + for (let i = start; i < end; i++) { let chCode = str.charCodeAt(i); if (chCode !== CharCode.Space && chCode !== CharCode.Tab) { - return str.substring(from, i); + return str.substring(start, i); } } - return str.substr(from); + return str.substring(start, end); } /** diff --git a/src/vs/base/test/common/strings.test.ts b/src/vs/base/test/common/strings.test.ts index 7681a2e702c6e..7b4efab9479d2 100644 --- a/src/vs/base/test/common/strings.test.ts +++ b/src/vs/base/test/common/strings.test.ts @@ -310,7 +310,13 @@ suite('Strings', () => { test('getLeadingWhitespace', () => { assert.equal(strings.getLeadingWhitespace(' foo'), ' '); assert.equal(strings.getLeadingWhitespace(' foo', 2), ''); + assert.equal(strings.getLeadingWhitespace(' foo', 1, 1), ''); + assert.equal(strings.getLeadingWhitespace(' foo', 0, 1), ' '); assert.equal(strings.getLeadingWhitespace(' '), ' '); assert.equal(strings.getLeadingWhitespace(' ', 1), ' '); + assert.equal(strings.getLeadingWhitespace(' ', 0, 1), ' '); + assert.equal(strings.getLeadingWhitespace('\t\tfunction foo(){', 0, 1), '\t'); + assert.equal(strings.getLeadingWhitespace('\t\tfunction foo(){', 0, 2), '\t\t'); + }); }); From 9901d2b7fbcd4c40fc828404fd4354f16fe06fc9 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Fri, 5 May 2017 16:16:35 +0200 Subject: [PATCH 0221/2747] Removed redundant instantiations of LinkDetetector for each ANSI output. Corrected regex description. --- src/vs/workbench/parts/debug/browser/linkDetector.ts | 2 +- .../parts/debug/electron-browser/replViewer.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/linkDetector.ts b/src/vs/workbench/parts/debug/browser/linkDetector.ts index 55657a248279d..e75ea50966428 100644 --- a/src/vs/workbench/parts/debug/browser/linkDetector.ts +++ b/src/vs/workbench/parts/debug/browser/linkDetector.ts @@ -15,7 +15,7 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace export class LinkDetector { private static FILE_LOCATION_PATTERNS: RegExp[] = [ // group 0: full path with line and column - // group 1: full path without line and column, matched by `*.*` in the end to work only on paths with extensions in the end (s.t. http://test.com:8000 would not match) + // group 1: full path without line and column, matched by `*.*` in the end to work only on paths with extensions in the end (s.t. node:10352 would not match) // group 2: drive letter on windows with trailing backslash or leading slash on mac/linux // group 3: line number, matched by (:(\d+)) // group 4: column number, matched by ((?::(\d+))?) diff --git a/src/vs/workbench/parts/debug/electron-browser/replViewer.ts b/src/vs/workbench/parts/debug/electron-browser/replViewer.ts index f9fa4c9fbdd30..3442772f59c3d 100644 --- a/src/vs/workbench/parts/debug/electron-browser/replViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/replViewer.ts @@ -86,11 +86,13 @@ export class ReplExpressionsRenderer implements IRenderer { private width: number; private characterWidth: number; + private linkDetector: LinkDetector; + constructor( @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IInstantiationService private instantiationService: IInstantiationService ) { - // noop + this.linkDetector = this.instantiationService.createInstance(LinkDetector); } public getHeight(tree: ITree, element: any): number { @@ -319,8 +321,7 @@ export class ReplExpressionsRenderer implements IRenderer { // flush text buffer if we have any if (buffer) { - const linkDetector = this.instantiationService.createInstance(LinkDetector); - this.insert(linkDetector.handleLinks(buffer), currentToken || tokensContainer); + this.insert(this.linkDetector.handleLinks(buffer), currentToken || tokensContainer); buffer = ''; } @@ -340,8 +341,7 @@ export class ReplExpressionsRenderer implements IRenderer { // flush remaining text buffer if we have any if (buffer) { - const linkDetector = this.instantiationService.createInstance(LinkDetector); - let res = linkDetector.handleLinks(buffer); + let res = this.linkDetector.handleLinks(buffer); if (typeof res !== 'string' || currentToken) { if (!tokensContainer) { tokensContainer = document.createElement('span'); From 27647f07a760edb984aeb6978da3ba6f9e067236 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 5 May 2017 16:21:00 +0200 Subject: [PATCH 0222/2747] wip --- .../contrib/snippet/browser/editorSnippets.ts | 38 +++++++++++++++++ .../contrib/snippet/common/snippetParser.ts | 14 +++---- .../test/browser/editorSnippets.test.ts | 41 +++++++++++++++++++ .../snippet/test/common/snippetParser.test.ts | 32 ++++----------- 4 files changed, 93 insertions(+), 32 deletions(-) create mode 100644 src/vs/editor/contrib/snippet/browser/editorSnippets.ts create mode 100644 src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts new file mode 100644 index 0000000000000..d1501376c3316 --- /dev/null +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { getLeadingWhitespace } from 'vs/base/common/strings'; +import { ICommonCodeEditor, IModel } from 'vs/editor/common/editorCommon'; +import { TextmateSnippet } from '../common/snippetParser'; + + +export class SnippetSession { + + private readonly _editor: ICommonCodeEditor; + private readonly _model: IModel; + private readonly _snippets: TextmateSnippet[] = []; + + constructor(editor: ICommonCodeEditor, snippet: TextmateSnippet) { + this._editor = editor; + this._model = editor.getModel(); + + for (const selection of editor.getSelections()) { + // for each selection get the leading 'reference' whitespace and + // adjust the snippet accordingly. this makes one snippet per selection/cursor + const line = this._model.getLineContent(selection.startLineNumber); + const leadingWhitespace = getLeadingWhitespace(line, 0, selection.startColumn - 1); + const newSnippet = snippet.withIndentation(whitespace => this._model.normalizeIndentation(leadingWhitespace + whitespace)); + this._snippets.push(newSnippet); + + // const offset = this._model.getOffsetAt(selection.getStartPosition()); + // for (const placeholder of snippet.getPlaceholders()) { + // const pos = this._model.getPositionAt(offset + snippet.offset(placeholder)); + // this._model.deltaDecorations + // } + } + } +} diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index dd7fdfc42d79f..2fbe4c9e5f1e5 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -231,20 +231,16 @@ export class TextmateSnippet { return pos; } - placeholders(): Map { - const map = new Map(); + + getPlaceholders(): Placeholder[] { + const ret: Placeholder[] = []; walk(this.marker, candidate => { if (candidate instanceof Placeholder) { - let array = map.get(candidate.name); - if (!array) { - map.set(candidate.name, [candidate]); - } else { - array.push(candidate); - } + ret.push(candidate); } return true; }); - return map; + return ret; } get value() { diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts new file mode 100644 index 0000000000000..3a02a611d5020 --- /dev/null +++ b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import { Selection } from 'vs/editor/common/core/selection'; +import { SnippetSession } from 'vs/editor/contrib/snippet/browser/editorSnippets'; +import { SnippetParser } from 'vs/editor/contrib/snippet/common/snippetParser'; +import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; +import { mockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; + + +suite('Editor Contrib - Snippets', () => { + + let editor: ICommonCodeEditor; + + setup(() => { + editor = mockCodeEditor([ + 'function foo() {', + '\tconsole.log(a)', + '}' + ], {}); + }); + + teardown(() => { + editor.dispose(); + }); + + test('snippets', () => { + + editor.setSelections([ + new Selection(1, 1, 1, 1), + new Selection(2, 2, 2, 2), + ]); + + new SnippetSession(editor, SnippetParser.parse('foo\n${1:bar}\nfoo')); + assert.ok(true); + }); +}); diff --git a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts index e5acd64f7ec76..0bbf14eec0db8 100644 --- a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts +++ b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts @@ -332,35 +332,21 @@ suite('SnippetParser', () => { test('TextmateSnippet#placeholder', () => { let snippet = SnippetParser.parse('te$1xt'); - let placeholders = snippet.placeholders(); - assert.equal(placeholders.size, 1); - let array = placeholders.get('1'); - assert.equal(array.length, 1); + let placeholders = snippet.getPlaceholders(); + assert.equal(placeholders.length, 1); snippet = SnippetParser.parse('te$1xt$1'); - placeholders = snippet.placeholders(); - assert.equal(placeholders.size, 1); - array = placeholders.get('1'); - assert.equal(array.length, 2); + placeholders = snippet.getPlaceholders(); + assert.equal(placeholders.length, 2); + snippet = SnippetParser.parse('te$1xt$2'); - placeholders = snippet.placeholders(); - assert.equal(placeholders.size, 2); - array = placeholders.get('1'); - assert.equal(array.length, 1); - array = placeholders.get('2'); - assert.equal(array.length, 1); + placeholders = snippet.getPlaceholders(); + assert.equal(placeholders.length, 2); snippet = SnippetParser.parse('${1:bar${2:foo}bar}'); - placeholders = snippet.placeholders(); - assert.equal(placeholders.size, 2); - array = placeholders.get('1'); - assert.equal(array.length, 1); - assert.equal(snippet.offset(array[0]), 0); - - array = placeholders.get('2'); - assert.equal(array.length, 1); - assert.equal(snippet.offset(array[0]), 3); + placeholders = snippet.getPlaceholders(); + assert.equal(placeholders.length, 2); }); test('TextmateSnippet#withIndentation', () => { From 717f328ab7febbd47a5b0b17b5ffcd8058a69af3 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 5 May 2017 16:32:19 +0200 Subject: [PATCH 0223/2747] Snippets with tab (and other control sequences) insert [object Object]. Fixes #25938 --- extensions/json/server/npm-shrinkwrap.json | 10 +++++----- extensions/json/server/package.json | 4 ++-- src/vs/base/common/json.ts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/extensions/json/server/npm-shrinkwrap.json b/extensions/json/server/npm-shrinkwrap.json index 4571e4d6bcc65..b986bef9080e6 100644 --- a/extensions/json/server/npm-shrinkwrap.json +++ b/extensions/json/server/npm-shrinkwrap.json @@ -28,9 +28,9 @@ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-0.3.6.tgz" }, "jsonc-parser": { - "version": "0.4.1", - "from": "jsonc-parser@0.4.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-0.4.1.tgz" + "version": "0.4.2", + "from": "jsonc-parser@0.4.2", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-0.4.2.tgz" }, "ms": { "version": "0.7.2", @@ -43,9 +43,9 @@ "resolved": "https://registry.npmjs.org/request-light/-/request-light-0.2.0.tgz" }, "vscode-json-languageservice": { - "version": "2.0.8", + "version": "2.0.9", "from": "vscode-json-languageservice@next", - "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-2.0.8.tgz" + "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-2.0.9.tgz" }, "vscode-jsonrpc": { "version": "3.1.0-alpha.1", diff --git a/extensions/json/server/package.json b/extensions/json/server/package.json index 4b0a98a80a2a5..33d3cd9c8a0dd 100644 --- a/extensions/json/server/package.json +++ b/extensions/json/server/package.json @@ -8,9 +8,9 @@ "node": "*" }, "dependencies": { - "jsonc-parser": "^0.4.1", + "jsonc-parser": "^0.4.2", "request-light": "^0.2.0", - "vscode-json-languageservice": "^2.0.8", + "vscode-json-languageservice": "^2.0.9", "vscode-languageserver": "^3.1.0-alpha.1", "vscode-nls": "^2.0.2" }, diff --git a/src/vs/base/common/json.ts b/src/vs/base/common/json.ts index 03f8216334d93..f6391913084cf 100644 --- a/src/vs/base/common/json.ts +++ b/src/vs/base/common/json.ts @@ -232,7 +232,7 @@ export function createScanner(text: string, ignoreTrivia: boolean = false): JSON break; } else { scanError = ScanError.InvalidCharacter; - break; + // mark as error but continue with string } } pos++; From b14cce8b5d8a81c76a87c18fcf598b0b5cbf9636 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 5 May 2017 16:51:58 +0200 Subject: [PATCH 0224/2747] Fixes #4271: Try to detect the OSX emoji picker case --- src/vs/base/common/strings.ts | 9 +++ src/vs/base/test/common/strings.test.ts | 18 +++++ .../browser/controller/textAreaInput.ts | 11 +-- .../browser/controller/textAreaState.ts | 46 +++++++++++- .../browser/controller/textAreaState.test.ts | 71 ++++++++++++++++++- 5 files changed, 146 insertions(+), 9 deletions(-) diff --git a/src/vs/base/common/strings.ts b/src/vs/base/common/strings.ts index 1886577902bfe..034b349767e3a 100644 --- a/src/vs/base/common/strings.ts +++ b/src/vs/base/common/strings.ts @@ -503,6 +503,15 @@ export function containsRTL(str: string): boolean { return CONTAINS_RTL.test(str); } +/** + * Generated using https://github.com/alexandrudima/unicode-utils/blob/master/generate-emoji-test.js + */ +const CONTAINS_EMOJI = /(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEF8]|\uD83E[\uDD00-\uDDE6])/; + +export function containsEmoji(str: string): boolean { + return CONTAINS_EMOJI.test(str); +} + const IS_BASIC_ASCII = /^[\t\n\r\x20-\x7E]*$/; /** * Returns true if `str` contains only basic ASCII characters in the range 32 - 126 (including 32 and 126) or \n, \r, \t diff --git a/src/vs/base/test/common/strings.test.ts b/src/vs/base/test/common/strings.test.ts index 7681a2e702c6e..1364b35f8d5c1 100644 --- a/src/vs/base/test/common/strings.test.ts +++ b/src/vs/base/test/common/strings.test.ts @@ -231,6 +231,24 @@ suite('Strings', () => { assert.equal(strings.containsRTL('זוהי עובדה מבוססת שדעתו'), true); }); + test('containsEmoji', () => { + assert.equal(strings.containsEmoji('a'), false); + assert.equal(strings.containsEmoji(''), false); + assert.equal(strings.containsEmoji(strings.UTF8_BOM_CHARACTER + 'a'), false); + assert.equal(strings.containsEmoji('hello world!'), false); + assert.equal(strings.containsEmoji('هناك حقيقة مثبتة منذ زمن طويل'), false); + assert.equal(strings.containsEmoji('זוהי עובדה מבוססת שדעתו'), false); + + assert.equal(strings.containsEmoji('a📚📚b'), true); + assert.equal(strings.containsEmoji('1F600 # 😀 grinning face'), true); + assert.equal(strings.containsEmoji('1F47E # 👾 alien monster'), true); + assert.equal(strings.containsEmoji('1F467 1F3FD # 👧🏽 girl: medium skin tone'), true); + assert.equal(strings.containsEmoji('26EA # ⛪ church'), true); + assert.equal(strings.containsEmoji('231B # ⌛ hourglass'), true); + assert.equal(strings.containsEmoji('2702 # ✂ scissors'), true); + assert.equal(strings.containsEmoji('1F1F7 1F1F4 # 🇷🇴 Romania'), true); + }); + // test('containsRTL speed', () => { // var SIZE = 1000000; // var REPEAT = 10; diff --git a/src/vs/editor/browser/controller/textAreaInput.ts b/src/vs/editor/browser/controller/textAreaInput.ts index 08f91649c4183..757bbf1dd4149 100644 --- a/src/vs/editor/browser/controller/textAreaInput.ts +++ b/src/vs/editor/browser/controller/textAreaInput.ts @@ -11,6 +11,7 @@ import { KeyCode } from 'vs/base/common/keyCodes'; import { Disposable } from 'vs/base/common/lifecycle'; import { ITypeData, TextAreaState, ITextAreaWrapper } from 'vs/editor/browser/controller/textAreaState'; import * as browser from 'vs/base/browser/browser'; +import * as platform from 'vs/base/common/platform'; import * as dom from 'vs/base/browser/dom'; import { IKeyboardEvent } from "vs/base/browser/keyboardEvent"; import { FastDomNode } from "vs/base/browser/fastDomNode"; @@ -138,10 +139,10 @@ export class TextAreaInput extends Disposable { /** * Deduce the typed input from a text area's value and the last observed state. */ - const deduceInputFromTextAreaValue = (): [TextAreaState, ITypeData] => { + const deduceInputFromTextAreaValue = (couldBeEmojiInput: boolean): [TextAreaState, ITypeData] => { const oldState = this._textAreaState; const newState = this._textAreaState.readFromTextArea(this._textArea); - return [newState, TextAreaState.deduceInput(oldState, newState)]; + return [newState, TextAreaState.deduceInput(oldState, newState, couldBeEmojiInput)]; }; /** @@ -172,7 +173,7 @@ export class TextAreaInput extends Disposable { // Multi-part Japanese compositions reset cursor in Edge/IE, Chinese and Korean IME don't have this issue. // The reason that we can't use this path for all CJK IME is IE and Edge behave differently when handling Korean IME, // which breaks this path of code. - const [newState, typeInput] = deduceInputFromTextAreaValue(); + const [newState, typeInput] = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/false); this._textAreaState = newState; this._onType.fire(typeInput); this._onCompositionUpdate.fire(e); @@ -188,7 +189,7 @@ export class TextAreaInput extends Disposable { this._register(dom.addDisposableListener(textArea.domNode, 'compositionend', (e: CompositionEvent) => { if (browser.isEdgeOrIE && e.locale === 'ja') { // https://github.com/Microsoft/monaco-editor/issues/339 - const [newState, typeInput] = deduceInputFromTextAreaValue(); + const [newState, typeInput] = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/false); this._textAreaState = newState; this._onType.fire(typeInput); } @@ -228,7 +229,7 @@ export class TextAreaInput extends Disposable { return; } - const [newState, typeInput] = deduceInputFromTextAreaValue(); + const [newState, typeInput] = deduceInputFromTextAreaValue(/*couldBeEmojiInput*/platform.isMacintosh); if (typeInput.replaceCharCnt === 0 && typeInput.text.length === 1 && strings.isHighSurrogate(typeInput.text.charCodeAt(0))) { // Ignore invalid input but keep it around for next time return; diff --git a/src/vs/editor/browser/controller/textAreaState.ts b/src/vs/editor/browser/controller/textAreaState.ts index c9218a06db073..2e3bf4009a45b 100644 --- a/src/vs/editor/browser/controller/textAreaState.ts +++ b/src/vs/editor/browser/controller/textAreaState.ts @@ -81,7 +81,7 @@ export class TextAreaState { return new TextAreaState(text, 0, text.length, 0); } - public static deduceInput(previousState: TextAreaState, currentState: TextAreaState): ITypeData { + public static deduceInput(previousState: TextAreaState, currentState: TextAreaState, couldBeEmojiInput: boolean): ITypeData { if (!previousState) { // This is the EMPTY state return { @@ -91,8 +91,8 @@ export class TextAreaState { } // console.log('------------------------deduceInput'); - // console.log('CURRENT STATE: ' + currentState.toString()); // console.log('PREVIOUS STATE: ' + previousState.toString()); + // console.log('CURRENT STATE: ' + currentState.toString()); let previousValue = previousState.value; let previousSelectionStart = previousState.selectionStart; @@ -118,8 +118,48 @@ export class TextAreaState { currentSelectionEnd -= prefixLength; previousSelectionEnd -= prefixLength; - // console.log('AFTER DIFFING CURRENT STATE: <' + currentValue + '>, selectionStart: ' + currentSelectionStart + ', selectionEnd: ' + currentSelectionEnd); // console.log('AFTER DIFFING PREVIOUS STATE: <' + previousValue + '>, selectionStart: ' + previousSelectionStart + ', selectionEnd: ' + previousSelectionEnd); + // console.log('AFTER DIFFING CURRENT STATE: <' + currentValue + '>, selectionStart: ' + currentSelectionStart + ', selectionEnd: ' + currentSelectionEnd); + + if (couldBeEmojiInput && currentSelectionStart === currentSelectionEnd && previousValue.length > 0) { + // on OSX, emojis from the emoji picker are inserted at random locations + // the only hints we can use is that the selection is immediately after the inserted emoji + // and that none of the old text has been deleted + + let potentialEmojiInput: string = null; + + if (currentSelectionStart === currentValue.length) { + // emoji potentially inserted "somewhere" after the previous selection => it should appear at the end of `currentValue` + if (strings.startsWith(currentValue, previousValue)) { + // only if all of the old text is accounted for + potentialEmojiInput = currentValue.substring(previousValue.length); + } + } else { + // emoji potentially inserted "somewhere" before the previous selection => it should appear at the start of `currentValue` + if (strings.endsWith(currentValue, previousValue)) { + // only if all of the old text is accounted for + potentialEmojiInput = currentValue.substring(0, currentValue.length - previousValue.length); + } + } + + if (potentialEmojiInput !== null && potentialEmojiInput.length > 0) { + // now we check that this is indeed an emoji + // emojis can grow quite long, so a length check is of no help + // e.g. 1F3F4 E0067 E0062 E0065 E006E E0067 E007F ; fully-qualified # 🏴󠁧󠁢󠁥󠁮󠁧󠁿 England + + // Oftentimes, emojis use Variation Selector-16 (U+FE0F), so that is a good hint + // http://emojipedia.org/variation-selector-16/ + // > An invisible codepoint which specifies that the preceding character + // > should be displayed with emoji presentation. Only required if the + // > preceding character defaults to text presentation. + if (/\uFE0F/.test(potentialEmojiInput) || strings.containsEmoji(potentialEmojiInput)) { + return { + text: potentialEmojiInput, + replaceCharCnt: 0 + }; + } + } + } if (currentSelectionStart === currentSelectionEnd) { // composition accept case (noticed in FF + Japanese) diff --git a/src/vs/editor/test/browser/controller/textAreaState.test.ts b/src/vs/editor/test/browser/controller/textAreaState.test.ts index ca8cad271a0cd..a385e6904f73c 100644 --- a/src/vs/editor/test/browser/controller/textAreaState.test.ts +++ b/src/vs/editor/test/browser/controller/textAreaState.test.ts @@ -122,7 +122,7 @@ suite('TextAreaState', () => { textArea._selectionEnd = selectionEnd; let newState = prevState.readFromTextArea(textArea); - let actual = TextAreaState.deduceInput(prevState, newState); + let actual = TextAreaState.deduceInput(prevState, newState, true); assert.equal(actual.text, expected); assert.equal(actual.replaceCharCnt, expectedCharReplaceCnt); @@ -420,6 +420,75 @@ suite('TextAreaState', () => { ); }); + test('issue #4271 (example 1) - When inserting an emoji on OSX, it is placed two spaces left of the cursor', () => { + // The OSX emoji inserter inserts emojis at random positions in the text, unrelated to where the cursor is. + testDeduceInput( + new TextAreaState( + [ + 'some1 text', + 'some2 text', + 'some3 text', + 'some4 text', // cursor is here in the middle of the two spaces + 'some5 text', + 'some6 text', + 'some7 text' + ].join('\n'), + 42, 42, 0 + ), + [ + 'so📅me1 text', + 'some2 text', + 'some3 text', + 'some4 text', + 'some5 text', + 'some6 text', + 'some7 text' + ].join('\n'), + 4, 4, + '📅', 0 + ); + }); + + test('issue #4271 (example 2) - When inserting an emoji on OSX, it is placed two spaces left of the cursor', () => { + // The OSX emoji inserter inserts emojis at random positions in the text, unrelated to where the cursor is. + testDeduceInput( + new TextAreaState( + 'some1 text', + 6, 6, 0 + ), + 'some💊1 text', + 6, 6, + '💊', 0 + ); + }); + + test('issue #4271 (example 3) - When inserting an emoji on OSX, it is placed two spaces left of the cursor', () => { + // The OSX emoji inserter inserts emojis at random positions in the text, unrelated to where the cursor is. + testDeduceInput( + new TextAreaState( + 'qwertyu\nasdfghj\nzxcvbnm', + 12, 12, 0 + ), + 'qwertyu\nasdfghj\nzxcvbnm🎈', + 25, 25, + '🎈', 0 + ); + }); + + // an example of an emoji missed by the regex but which has the FE0F variant 16 hint + test('issue #4271 (example 4) - When inserting an emoji on OSX, it is placed two spaces left of the cursor', () => { + // The OSX emoji inserter inserts emojis at random positions in the text, unrelated to where the cursor is. + testDeduceInput( + new TextAreaState( + 'some1 text', + 6, 6, 0 + ), + 'some⌨️1 text', + 6, 6, + '⌨️', 0 + ); + }); + function testFromEditorSelectionAndPreviousState(eol: string, lines: string[], range: Range, prevSelectionToken: number): TextAreaState { let model = new SimpleModel(lines, eol); let previousState = new TextAreaState('', 0, 0, prevSelectionToken); From 29d0a488d00876a0f0a97d956dc0d0e4aafea4b0 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 5 May 2017 08:29:09 -0700 Subject: [PATCH 0225/2747] Monokai: Don't use transparency in terminal colors Part of #26050 --- .../theme-monokai/themes/monokai-color-theme.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index 7f54f825424d2..d8138d5cd91df 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -71,12 +71,12 @@ "peekViewResult.matchHighlightBackground": "#75715E", "peekViewEditor.matchHighlightBackground": "#75715E", "terminal.ansiBlack": "#333333", - "terminal.ansiRed": "#f92672BF", - "terminal.ansiGreen": "#A6E22EBF", - "terminal.ansiYellow": "#e2e22eBF", - "terminal.ansiBlue": "#819affBF", - "terminal.ansiMagenta": "#AE81FFBF", - "terminal.ansiCyan": "#66D9EFBF", + "terminal.ansiRed": "#C4265E", // the bright color with ~75% transparent on the background + "terminal.ansiGreen": "#86B42B", + "terminal.ansiYellow": "#B3B42B", + "terminal.ansiBlue": "#6A7EC8", + "terminal.ansiMagenta": "#8C6BC8", + "terminal.ansiCyan": "#56ADBC", "terminal.ansiWhite": "#e3e3dd", "terminal.ansiBrightBlack": "#666666", "terminal.ansiBrightRed": "#f92672", From f36141ac5e0e1ce08112358c41e4e707a25e1693 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 5 May 2017 08:30:46 -0700 Subject: [PATCH 0226/2747] Remove no longer existing theme key from Red --- extensions/theme-red/themes/Red-color-theme.json | 1 - 1 file changed, 1 deletion(-) diff --git a/extensions/theme-red/themes/Red-color-theme.json b/extensions/theme-red/themes/Red-color-theme.json index 9db55816d8089..22e587a81f9ea 100644 --- a/extensions/theme-red/themes/Red-color-theme.json +++ b/extensions/theme-red/themes/Red-color-theme.json @@ -46,7 +46,6 @@ "list.activeSelectionBackground": "#880000", "list.inactiveSelectionBackground": "#770000", "list.dropBackground": "#662222", - "list.focusAndSelectionBackground": "#882222", "list.focusBackground": "#660000", "list.highlightForeground": "#ff4444", "notification.background": "#662222", From b26e1454accd59efa031117c17e65d2b9442d00d Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 5 May 2017 08:43:35 -0700 Subject: [PATCH 0227/2747] Support terminal bg and fg color keys Fixes #24735 --- .../parts/terminal/electron-browser/media/xterm.css | 1 - .../electron-browser/terminalColorRegistry.ts | 4 ++++ .../parts/terminal/electron-browser/terminalPanel.ts | 11 ++++++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css b/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css index b5b9a339f2292..e8a7ad1348d1b 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ .monaco-workbench .panel.integrated-terminal .xterm { - background-color: transparent!important; position: relative; height: 100%; } diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts index b0e8fc2ab439e..727078be3bcd9 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts @@ -13,6 +13,9 @@ import { registerColor, ColorIdentifier } from 'vs/platform/theme/common/colorRe */ export const ansiColorIdentifiers: ColorIdentifier[] = []; +export const TERMINAL_BACKGROUND_COLOR = registerColor('terminal.background', null, nls.localize('terminal.background', 'The background color of the terminal, this allows coloring the terminal differently to the panel.')); +export const TERMINAL_FOREGROUND_COLOR = registerColor('terminal.foreground', null, nls.localize('terminal.foreground', 'The foreground color of the terminal.')); + const ansiColorMap = { 'terminal.ansiBlack': { index: 0, @@ -150,4 +153,5 @@ export function registerColors(): void { let colorName = id.substring(13); ansiColorIdentifiers[entry.index] = registerColor(id, entry.defaults, nls.localize('terminal.ansiColor', '\'{0}\' ansi color in the terminal.', colorName)); } + } diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 46dee45dc7fb9..b879da8392daa 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -16,7 +16,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ITerminalService, ITerminalFont, TERMINAL_PANEL_ID } from 'vs/workbench/parts/terminal/common/terminal'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; -import { ansiColorIdentifiers } from './terminalColorRegistry'; +import { ansiColorIdentifiers, TERMINAL_BACKGROUND_COLOR, TERMINAL_FOREGROUND_COLOR } from './terminalColorRegistry'; import { ColorIdentifier } from 'vs/platform/theme/common/colorRegistry'; import { KillTerminalAction, CreateNewTerminalAction, SwitchTerminalInstanceAction, SwitchTerminalInstanceActionItem, CopyTerminalSelectionAction, TerminalPasteAction, ClearTerminalAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; import { Panel } from 'vs/workbench/browser/panel'; @@ -226,6 +226,15 @@ export class TerminalPanel extends Panel { `.monaco-workbench .panel.integrated-terminal .xterm .xterm-bg-color-${index}::selection { color: ${color}; }`; } }); + const bgColor = theme.getColor(TERMINAL_BACKGROUND_COLOR); + if (bgColor) { + console.log('set bgColor to: ' + bgColor); + css += `.monaco-workbench .panel.integrated-terminal .terminal-outer-container { background-color: ${bgColor}; }`; + } + const fgColor = theme.getColor(TERMINAL_FOREGROUND_COLOR); + if (bgColor) { + css += `.monaco-workbench .panel.integrated-terminal .xterm { color: ${fgColor}; }`; + } this._themeStyleElement.innerHTML = css; } From 63bbadab07360662832c7233210f8ac5a46e627b Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 5 May 2017 17:56:29 +0200 Subject: [PATCH 0228/2747] remove unused code now that git classic is deleted (fixes #22275) --- .../browser/parts/editor/baseEditor.ts | 265 +----------------- .../parts/editor/editor.contribution.ts | 2 - .../browser/parts/editor/textDiffEditor.ts | 3 +- .../browser/parts/editor/titleControl.ts | 32 +-- .../common/editor/stringEditorInput.ts | 131 --------- .../common/editor/stringEditorModel.ts | 67 ----- .../editor/test/browser/editorService.test.ts | 19 +- .../browser/parts/editor/baseEditor.test.ts | 91 +----- .../common/editor/editorDiffModel.test.ts | 86 ++++++ .../test/common/editor/editorModel.test.ts | 29 -- .../common/editor/stringEditorInput.test.ts | 115 -------- .../common/editor/stringEditorModel.test.ts | 75 ----- 12 files changed, 102 insertions(+), 813 deletions(-) delete mode 100644 src/vs/workbench/common/editor/stringEditorInput.ts delete mode 100644 src/vs/workbench/common/editor/stringEditorModel.ts create mode 100644 src/vs/workbench/test/common/editor/editorDiffModel.test.ts delete mode 100644 src/vs/workbench/test/common/editor/stringEditorInput.test.ts delete mode 100644 src/vs/workbench/test/common/editor/stringEditorModel.test.ts diff --git a/src/vs/workbench/browser/parts/editor/baseEditor.ts b/src/vs/workbench/browser/parts/editor/baseEditor.ts index 1aff5f9a4930c..c113ae2837f13 100644 --- a/src/vs/workbench/browser/parts/editor/baseEditor.ts +++ b/src/vs/workbench/browser/parts/editor/baseEditor.ts @@ -5,14 +5,12 @@ 'use strict'; import { TPromise } from 'vs/base/common/winjs.base'; -import { Action, IAction } from 'vs/base/common/actions'; -import { ActionBarContributor } from 'vs/workbench/browser/actionBarRegistry'; import types = require('vs/base/common/types'); import { Builder } from 'vs/base/browser/builder'; import { Registry } from 'vs/platform/platform'; import { Panel } from 'vs/workbench/browser/panel'; import { EditorInput, EditorOptions, IEditorDescriptor, IEditorInputFactory, IEditorRegistry, Extensions, IFileInputFactory } from 'vs/workbench/common/editor'; -import { IEditor, Position, POSITIONS } from 'vs/platform/editor/common/editor'; +import { IEditor, Position } from 'vs/platform/editor/common/editor'; import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation'; import { SyncDescriptor, AsyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; @@ -304,263 +302,4 @@ class EditorRegistry implements IEditorRegistry { } } -Registry.add(Extensions.Editors, new EditorRegistry()); - -/** - * The context that will be passed in to the EditorInputActionContributor. - */ -export interface IEditorInputActionContext { - editor: BaseEditor; - input: EditorInput; - position: Position; -} - -/** - * A variant of the action bar contributor to register actions to specific editor inputs of the editor. This allows to have more - * fine grained control over actions compared to contributing an action to a specific editor. - */ -export class EditorInputActionContributor extends ActionBarContributor { - - // The following data structures are partitioned into arrays of Position (one, two, three) - private mapEditorInputActionContextToPrimaryActions: { [id: string]: IEditorInputAction[] }[]; - private mapEditorInputActionContextToSecondaryActions: { [id: string]: IEditorInputAction[] }[]; - - constructor() { - super(); - - this.mapEditorInputActionContextToPrimaryActions = this.createPositionArray(); - this.mapEditorInputActionContextToSecondaryActions = this.createPositionArray(); - } - - private createPositionArray(): any[] { - const array: any[] = []; - - for (let i = 0; i < POSITIONS.length; i++) { - array[i] = {}; - } - - return array; - } - - /* Subclasses can override to provide a custom cache implementation */ - protected toId(context: IEditorInputActionContext): string { - return context.editor.getId() + context.input.getTypeId(); - } - - private clearInputsFromCache(position: Position, isPrimary: boolean): void { - if (isPrimary) { - this.doClearInputsFromCache(this.mapEditorInputActionContextToPrimaryActions[position]); - } else { - this.doClearInputsFromCache(this.mapEditorInputActionContextToSecondaryActions[position]); - } - } - - private doClearInputsFromCache(cache: { [id: string]: IEditorInputAction[] }): void { - for (let key in cache) { - if (cache.hasOwnProperty(key)) { - const cachedActions = cache[key]; - cachedActions.forEach((action) => { - action.input = null; - action.position = null; - }); - } - } - } - - /** - * Returns true if this contributor has actions for the given editor input. Subclasses must not - * override this method but instead hasActionsForEditorInput(); - */ - public hasActions(context: IEditorInputActionContext): boolean { - if (!this.checkEditorContext(context)) { - return false; - } - - // Ask Cache - if (this.mapEditorInputActionContextToPrimaryActions[context.position][this.toId(context)]) { - return true; - } - - // Ask Client - return this.hasActionsForEditorInput(context); - } - - /** - * Returns an array of actions for the given editor input. Subclasses must not override this - * method but instead getActionsForEditorInput(); - */ - public getActions(context: IEditorInputActionContext): IAction[] { - if (!this.checkEditorContext(context)) { - return []; - } - - // This will cause any cached action to be set with null for the current editor input to prevent - // leaking actions that still think the current editor input is what was set before. - this.clearInputsFromCache(context.position, true /* primary actions */); - - // First consult cache - const editorInput = context.input; - const editorPosition = context.position; - const cachedActions = this.mapEditorInputActionContextToPrimaryActions[context.position][this.toId(context)]; - if (cachedActions) { - - // Update the input field and position in all actions to indicate this change and return - cachedActions.forEach((action) => { - action.input = editorInput; - action.position = editorPosition; - }); - - return cachedActions; - } - - // Otherwise collect and keep in cache - const actions = this.getActionsForEditorInput(context); - actions.forEach((action) => { - action.input = editorInput; - action.position = editorPosition; - }); - - this.mapEditorInputActionContextToPrimaryActions[context.position][this.toId(context)] = actions; - - return actions; - } - - /** - * Returns true if this contributor has actions for the given editor input. Subclasses must not - * override this method but instead hasSecondaryActionsForEditorInput(); - */ - public hasSecondaryActions(context: IEditorInputActionContext): boolean { - if (!this.checkEditorContext(context)) { - return false; - } - - // Ask Cache - if (this.mapEditorInputActionContextToSecondaryActions[context.position][this.toId(context)]) { - return true; - } - - // Ask Client - return this.hasSecondaryActionsForEditorInput(context); - } - - /** - * Returns an array of actions for the given editor input. Subclasses must not override this - * method but instead getSecondaryActionsForEditorInput(); - */ - public getSecondaryActions(context: IEditorInputActionContext): IAction[] { - if (!this.checkEditorContext(context)) { - return []; - } - - // This will cause any cached action to be set with null for the current editor input to prevent - // leaking actions that still think the current editor input is what was set before. - this.clearInputsFromCache(context.position, false /* secondary actions */); - - // First consult cache - const editorInput = context.input; - const editorPosition = context.position; - const cachedActions = this.mapEditorInputActionContextToSecondaryActions[context.position][this.toId(context)]; - if (cachedActions) { - - // Update the input field and position in all actions to indicate this change and return - cachedActions.forEach((action) => { - action.input = editorInput; - action.position = editorPosition; - }); - - return cachedActions; - } - - // Otherwise collect and keep in cache - const actions = this.getSecondaryActionsForEditorInput(context); - actions.forEach((action) => { - action.input = editorInput; - action.position = editorPosition; - }); - - this.mapEditorInputActionContextToSecondaryActions[context.position][this.toId(context)] = actions; - - return actions; - } - - private checkEditorContext(context: IEditorInputActionContext): boolean { - return context && context.input instanceof EditorInput && context.editor instanceof BaseEditor && !types.isUndefinedOrNull(context.position); - } - - /** - * Returns true if this contributor has primary actions for the given editor input. - */ - public hasActionsForEditorInput(context: IEditorInputActionContext): boolean { - return false; - } - - /** - * Returns an array of primary actions for the given editor input. - */ - public getActionsForEditorInput(context: IEditorInputActionContext): IEditorInputAction[] { - return []; - } - - /** - * Returns true if this contributor has secondary actions for the given editor input. - */ - public hasSecondaryActionsForEditorInput(context: IEditorInputActionContext): boolean { - return false; - } - - /** - * Returns an array of secondary actions for the given editor input. - */ - public getSecondaryActionsForEditorInput(context: IEditorInputActionContext): IEditorInputAction[] { - return []; - } -} - -/** - * An editorinput action is contributed to an editor based on the editor input of the editor that is currently - * active. When the editor input changes, the action will be get the new editor input set so that the enablement - * state can be updated. In addition the position of the editor for the given input is applied. - */ -export interface IEditorInputAction extends IAction { - - /** - * The input of the editor for which this action is running. - */ - input: EditorInput; - - /** - * The position of the editor for which this action is running. - */ - position: Position; - - /** - * Implementors to define if the action is enabled or not. - */ - isEnabled(): boolean; -} - -export class EditorInputAction extends Action implements IEditorInputAction { - private _input: EditorInput; - private _position: Position; - - public get input(): EditorInput { - return this._input; - } - - public set input(input: EditorInput) { - this._input = input; - this.enabled = this.isEnabled(); - } - - public get position(): Position { - return this._position; - } - - public set position(position: Position) { - this._position = position; - } - - public isEnabled(): boolean { - return !!this._input; - } -} \ No newline at end of file +Registry.add(Extensions.Editors, new EditorRegistry()); \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts index 51cbe1aef5da0..e8a5d028fd331 100644 --- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts +++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts @@ -12,7 +12,6 @@ import { IEditorQuickOpenEntry, IQuickOpenRegistry, Extensions as QuickOpenExten import { StatusbarItemDescriptor, StatusbarAlignment, IStatusbarRegistry, Extensions as StatusExtensions } from 'vs/workbench/browser/parts/statusbar/statusbar'; import { EditorDescriptor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { EditorInput, IEditorRegistry, Extensions as EditorExtensions, IEditorInputFactory, SideBySideEditorInput } from 'vs/workbench/common/editor'; -import { StringEditorInput } from 'vs/workbench/common/editor/stringEditorInput'; import { TextResourceEditor } from 'vs/workbench/browser/parts/editor/textResourceEditor'; import { SideBySideEditor } from 'vs/workbench/browser/parts/editor/sideBySideEditor'; import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; @@ -47,7 +46,6 @@ Registry.as(EditorExtensions.Editors).registerEditor( 'TextResourceEditor' ), [ - new SyncDescriptor(StringEditorInput), new SyncDescriptor(UntitledEditorInput), new SyncDescriptor(ResourceEditorInput) ] diff --git a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts index 3cc0c4b20a836..cf310d07ac448 100644 --- a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts @@ -17,7 +17,6 @@ import { IDiffEditor } from 'vs/editor/browser/editorBrowser'; import { IDiffEditorOptions, IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { BaseTextEditor, IEditorConfiguration } from 'vs/workbench/browser/parts/editor/textEditor'; import { TextEditorOptions, TextDiffEditorOptions, EditorInput, EditorOptions, TEXT_DIFF_EDITOR_ID, IFileEditorInput } from 'vs/workbench/common/editor'; -import { StringEditorInput } from 'vs/workbench/common/editor/stringEditorInput'; import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; import { DiffNavigator } from 'vs/editor/contrib/diffNavigator/common/diffNavigator'; @@ -249,7 +248,7 @@ export class TextDiffEditor extends BaseTextEditor { if (input instanceof DiffEditorInput) { const modifiedInput = input.modifiedInput; - return modifiedInput instanceof StringEditorInput || modifiedInput instanceof ResourceEditorInput; + return modifiedInput instanceof ResourceEditorInput; } return false; diff --git a/src/vs/workbench/browser/parts/editor/titleControl.ts b/src/vs/workbench/browser/parts/editor/titleControl.ts index 9777863076a4a..acb5d5e3e26ab 100644 --- a/src/vs/workbench/browser/parts/editor/titleControl.ts +++ b/src/vs/workbench/browser/parts/editor/titleControl.ts @@ -13,7 +13,7 @@ import { IAction, Action } from 'vs/base/common/actions'; import errors = require('vs/base/common/errors'); import DOM = require('vs/base/browser/dom'); import { TPromise } from 'vs/base/common/winjs.base'; -import { BaseEditor, IEditorInputActionContext } from 'vs/workbench/browser/parts/editor/baseEditor'; +import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { RunOnceScheduler } from 'vs/base/common/async'; import { isCommonCodeEditor, isCommonDiffEditor } from 'vs/editor/common/editorCommon'; import arrays = require('vs/base/common/arrays'); @@ -303,17 +303,12 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl // Editor Control Actions let editorActions = this.mapActionsToEditors[control.getId()]; if (!editorActions) { - editorActions = this.getEditorActionsForContext(control); + editorActions = { primary: control.getActions(), secondary: control.getSecondaryActions() }; this.mapActionsToEditors[control.getId()] = editorActions; } primary.push(...editorActions.primary); secondary.push(...editorActions.secondary); - // Editor Input Actions - const editorInputActions = this.getEditorActionsForContext({ input: control.input, editor: control, position: control.position }); - primary.push(...editorInputActions.primary); - secondary.push(...editorInputActions.secondary); - // MenuItems // TODO This isn't very proper but needed as we have failed to // use the correct context key service per editor only once. Don't @@ -331,29 +326,6 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl return { primary, secondary }; } - private getEditorActionsForContext(context: BaseEditor | IEditorInputActionContext): IToolbarActions { - const primaryActions: IAction[] = []; - const secondaryActions: IAction[] = []; - - // From Editor - if (context instanceof BaseEditor) { - primaryActions.push(...(context).getActions()); - secondaryActions.push(...(context).getSecondaryActions()); - } - - // From Contributions - else { - const actionBarRegistry = Registry.as(Extensions.Actionbar); - primaryActions.push(...actionBarRegistry.getActionBarActionsForContext(Scope.EDITOR, context)); - secondaryActions.push(...actionBarRegistry.getSecondaryActionBarActionsForContext(Scope.EDITOR, context)); - } - - return { - primary: primaryActions, - secondary: secondaryActions - }; - } - protected updateEditorActionsToolbar(): void { const group = this.context; if (!group) { diff --git a/src/vs/workbench/common/editor/stringEditorInput.ts b/src/vs/workbench/common/editor/stringEditorInput.ts deleted file mode 100644 index bf5b0489b871c..0000000000000 --- a/src/vs/workbench/common/editor/stringEditorInput.ts +++ /dev/null @@ -1,131 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import { PLAINTEXT_MODE_ID } from 'vs/editor/common/modes/modesRegistry'; -import { EditorModel, EditorInput } from 'vs/workbench/common/editor'; -import { StringEditorModel } from 'vs/workbench/common/editor/stringEditorModel'; -import URI from 'vs/base/common/uri'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; - -/** - * A read-only text editor input whos contents are made of the provided value and mode ID. - */ -export class StringEditorInput extends EditorInput { - - public static ID = 'workbench.editors.stringEditorInput'; - - protected cachedModel: StringEditorModel; - - protected value: string; - - private name: string; - private description: string; - private modeId: string; - private singleton: boolean; - - constructor( - name: string, - description: string, - value: string, - modeId: string, - singleton: boolean, - @IInstantiationService private instantiationService: IInstantiationService - ) { - super(); - - this.name = name; - this.description = description; - this.value = value; - this.modeId = modeId || PLAINTEXT_MODE_ID; - this.singleton = singleton; - } - - protected getResource(): URI { - return null; // Subclasses can implement to associate a resource with the input - } - - public getTypeId(): string { - return StringEditorInput.ID; - } - - public getName(): string { - return this.name; - } - - public getDescription(): string { - return this.description; - } - - public getValue(): string { - return this.value; - } - - /** - * Sets the textual value of this input and will also update the underlying model if this input is resolved. - */ - public setValue(value: string): void { - this.value = value; - if (this.cachedModel) { - this.cachedModel.setValue(value); - } - } - - public resolve(refresh?: boolean): TPromise { - - // Use Cached Model - if (this.cachedModel) { - return TPromise.as(this.cachedModel); - } - - //Otherwise Create Model and Load - let model = this.instantiationService.createInstance(StringEditorModel, this.value, this.modeId, this.getResource()); - return model.load().then((resolvedModel: StringEditorModel) => { - this.cachedModel = resolvedModel; - - return this.cachedModel; - }); - } - - public matches(otherInput: any): boolean { - if (super.matches(otherInput) === true) { - return true; - } - - if (otherInput instanceof StringEditorInput) { - let otherStringEditorInput = otherInput; - - // If both inputs are singletons, check on the modeId for equalness - if (otherStringEditorInput.singleton && this.singleton && otherStringEditorInput.modeId === this.modeId) { - return true; - } - - // If we have resource URIs, use those to compare - const resource = this.getResource(); - const otherResource = otherStringEditorInput.getResource(); - if (resource && otherResource) { - return resource.toString() === otherResource.toString(); - } - - // Otherwise compare by properties - return otherStringEditorInput.value === this.value && - otherStringEditorInput.modeId === this.modeId && - otherStringEditorInput.description === this.description && - otherStringEditorInput.name === this.name; - } - - return false; - } - - public dispose(): void { - if (this.cachedModel) { - this.cachedModel.dispose(); - this.cachedModel = null; - } - - super.dispose(); - } -} \ No newline at end of file diff --git a/src/vs/workbench/common/editor/stringEditorModel.ts b/src/vs/workbench/common/editor/stringEditorModel.ts deleted file mode 100644 index bee71a6bb7bf4..0000000000000 --- a/src/vs/workbench/common/editor/stringEditorModel.ts +++ /dev/null @@ -1,67 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import { BaseTextEditorModel } from 'vs/workbench/common/editor/textEditorModel'; -import { EditorModel } from 'vs/workbench/common/editor'; -import URI from 'vs/base/common/uri'; -import { IModeService } from 'vs/editor/common/services/modeService'; -import { IModelService } from 'vs/editor/common/services/modelService'; - -/** - * An editor model whith an in-memory, readonly content that is not backed by any particular resource. - */ -export class StringEditorModel extends BaseTextEditorModel { - protected value: string; - protected modeId: string; - protected resource: URI; - - constructor( - value: string, - modeId: string, - resource: URI, - @IModeService modeService: IModeService, - @IModelService modelService: IModelService - ) { - super(modelService, modeService); - - this.value = value; - this.modeId = modeId; - this.resource = resource; - } - - /** - * The value of this string editor model. - */ - public getValue(): string { - return this.value; - } - - /** - * Sets the value of this string editor model. - */ - public setValue(value: string): void { - this.value = value; - if (this.textEditorModel) { - this.textEditorModel.setValue(value); - } - } - - public load(): TPromise { - - // Create text editor model if not yet done - if (!this.textEditorModel) { - return this.createTextEditorModel(this.value, this.resource, this.modeId); - } - - // Otherwise update - else { - this.updateTextEditorModel(this.value); - } - - return TPromise.as(this); - } -} \ No newline at end of file diff --git a/src/vs/workbench/services/editor/test/browser/editorService.test.ts b/src/vs/workbench/services/editor/test/browser/editorService.test.ts index edf16d9ec26df..e1f4057853ffc 100644 --- a/src/vs/workbench/services/editor/test/browser/editorService.test.ts +++ b/src/vs/workbench/services/editor/test/browser/editorService.test.ts @@ -12,12 +12,11 @@ import { Position, Direction, IEditor } from 'vs/platform/editor/common/editor'; import URI from 'vs/base/common/uri'; import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { EditorInput, EditorOptions, TextEditorOptions } from 'vs/workbench/common/editor'; -import { StringEditorInput } from 'vs/workbench/common/editor/stringEditorInput'; -import { StringEditorModel } from 'vs/workbench/common/editor/stringEditorModel'; import { FileEditorInput } from 'vs/workbench/parts/files/common/editors/fileEditorInput'; import { workbenchInstantiationService, TestThemeService } from 'vs/workbench/test/workbenchTestServices'; import { DelegatingWorkbenchEditorService, WorkbenchEditorService, IEditorPart } from 'vs/workbench/services/editor/browser/editorService'; import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput'; +import { ResourceEditorInput } from "vs/workbench/common/editor/resourceEditorInput"; let activeEditor: BaseEditor = { getSelection: function () { @@ -176,20 +175,6 @@ suite('WorkbenchEditorService', () => { const untitledInput = openedEditorInput as UntitledEditorInput; assert.ok(untitledInput.hasAssociatedFilePath); }); - - // Resolve Editor Model (Typed EditorInput) - let input = instantiationService.createInstance(StringEditorInput, 'name', 'description', 'hello world', 'text/plain', false); - input.resolve(true).then((model: StringEditorModel) => { - assert(model instanceof StringEditorModel); - - assert(model.isResolved()); - - input.resolve().then((otherModel) => { - assert(model === otherModel); - - input.dispose(); - }); - }); }); test('caching', function () { @@ -274,7 +259,7 @@ suite('WorkbenchEditorService', () => { } let ed = instantiationService.createInstance(MyEditor, 'my.editor'); - let inp = instantiationService.createInstance(StringEditorInput, 'name', 'description', 'hello world', 'text/plain', false); + let inp = instantiationService.createInstance(ResourceEditorInput, 'name', 'description', URI.from('my://resource')); let delegate = instantiationService.createInstance(DelegatingWorkbenchEditorService); delegate.setEditorOpenHandler((input, options?) => { assert.strictEqual(input, inp); diff --git a/src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts b/src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts index 8571b4a3f0cdd..cbdc513946239 100644 --- a/src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts +++ b/src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts @@ -6,17 +6,17 @@ 'use strict'; import * as assert from 'assert'; -import { BaseEditor, EditorInputAction, EditorInputActionContributor, EditorDescriptor } from 'vs/workbench/browser/parts/editor/baseEditor'; +import { BaseEditor, EditorDescriptor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { EditorInput, EditorOptions, Extensions, IEditorRegistry, IEditorInputFactory } from 'vs/workbench/common/editor'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import * as Platform from 'vs/platform/platform'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; -import { StringEditorInput } from 'vs/workbench/common/editor/stringEditorInput'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils'; import { PLAINTEXT_MODE_ID } from 'vs/editor/common/modes/modesRegistry'; import { workbenchInstantiationService, TestThemeService } from 'vs/workbench/test/workbenchTestServices'; +import { ResourceEditorInput } from "vs/workbench/common/editor/resourceEditorInput"; const NullThemeService = new TestThemeService(); @@ -94,36 +94,7 @@ class MyOtherInput extends EditorInput { return null; } } -class MyStringInput extends StringEditorInput { } - -class MyAction extends EditorInputAction { - - public didCallIsEnabled = false; - - isEnabled() { - this.didCallIsEnabled = true; - return true; - } -} - -class MyAction2 extends EditorInputAction { - isEnabled() { - return true; - } -} - -class MyEditorInputActionContributor extends EditorInputActionContributor { - hasActionsForEditorInput(context) { - return context.input instanceof StringEditorInput; - } - - getActionsForEditorInput(context) { - return [ - new MyAction2('id1', 'label1'), - new MyAction2('id2', 'label2') - ]; - } -} +class MyResourceInput extends ResourceEditorInput { } suite('Workbench BaseEditor', () => { @@ -188,15 +159,15 @@ suite('Workbench BaseEditor', () => { let oldEditors = EditorRegistry.getEditors(); (EditorRegistry).setEditors([]); - EditorRegistry.registerEditor(d2, new SyncDescriptor(StringEditorInput)); - EditorRegistry.registerEditor(d1, new SyncDescriptor(MyStringInput)); + EditorRegistry.registerEditor(d2, new SyncDescriptor(ResourceEditorInput)); + EditorRegistry.registerEditor(d1, new SyncDescriptor(MyResourceInput)); let inst = new TestInstantiationService(); - inst.createInstance(EditorRegistry.getEditor(inst.createInstance(MyStringInput, 'fake', '', '', PLAINTEXT_MODE_ID, false)), 'id').then(editor => { + inst.createInstance(EditorRegistry.getEditor(inst.createInstance(MyResourceInput, 'fake', '', '', PLAINTEXT_MODE_ID, false)), 'id').then(editor => { assert.strictEqual(editor.getId(), 'myEditor'); - return inst.createInstance(EditorRegistry.getEditor(inst.createInstance(StringEditorInput, 'fake', '', '', PLAINTEXT_MODE_ID, false)), 'id').then(editor => { + return inst.createInstance(EditorRegistry.getEditor(inst.createInstance(ResourceEditorInput, 'fake', '', '', PLAINTEXT_MODE_ID, false)), 'id').then(editor => { assert.strictEqual(editor.getId(), 'myOtherEditor'); (EditorRegistry).setEditors(oldEditors); @@ -210,61 +181,17 @@ suite('Workbench BaseEditor', () => { let oldEditors = EditorRegistry.getEditors(); (EditorRegistry).setEditors([]); - EditorRegistry.registerEditor(d1, new SyncDescriptor(StringEditorInput)); + EditorRegistry.registerEditor(d1, new SyncDescriptor(ResourceEditorInput)); let inst = new TestInstantiationService(); - inst.createInstance(EditorRegistry.getEditor(inst.createInstance(MyStringInput, 'fake', '', '', PLAINTEXT_MODE_ID, false)), 'id').then(editor => { + inst.createInstance(EditorRegistry.getEditor(inst.createInstance(MyResourceInput, 'fake', '', '', PLAINTEXT_MODE_ID, false)), 'id').then(editor => { assert.strictEqual('myOtherEditor', editor.getId()); (EditorRegistry).setEditors(oldEditors); }).done(() => done()); }); - test('Editor Input Action - triggers isEnabled properly', function () { - let inst = new TestInstantiationService(); - - let action = new MyAction('id', 'label'); - action.input = inst.createInstance(StringEditorInput, 'input', '', '', PLAINTEXT_MODE_ID, false); - assert.equal(action.didCallIsEnabled, true); - }); - - test('Editor Input Action Contributor', function () { - let inst = new TestInstantiationService(); - - let contributor = new MyEditorInputActionContributor(); - - assert(!contributor.hasActions(null)); - assert(contributor.hasActions({ editor: new MyEditor('id', NullTelemetryService), input: inst.createInstance(StringEditorInput, 'fake', '', '', PLAINTEXT_MODE_ID, false), position: 0 })); - - let actionsFirst = contributor.getActions({ editor: new MyEditor('id', NullTelemetryService), input: inst.createInstance(StringEditorInput, 'fake', '', '', PLAINTEXT_MODE_ID, false), position: 0 }); - assert.strictEqual(actionsFirst.length, 2); - - let input = inst.createInstance(StringEditorInput, 'fake', '', '', PLAINTEXT_MODE_ID, false); - let actions = contributor.getActions({ editor: new MyEditor('id', NullTelemetryService), input: input, position: 0 }); - assert(actions[0] === actionsFirst[0]); - assert(actions[1] === actionsFirst[1]); - assert((actions[0]).input === input); - assert((actions[1]).input === input); - - // other editor causes new actions to be created - actions = contributor.getActions({ editor: new MyOtherEditor('id2', NullTelemetryService), input: input, position: 0 }); - assert(actions[0] !== actionsFirst[0]); - assert(actions[1] !== actionsFirst[1]); - assert((actions[0]).input === input); - assert((actions[1]).input === input); - - // other input causes actions to loose input context - let myInput = new MyInput(); - myInput.getTypeId = function () { - return 'foo.id'; - }; - - actions = contributor.getActions({ editor: new MyEditor('id3', NullTelemetryService), input: myInput, position: 0 }); - assert(!(actionsFirst[0]).input); - assert(!(actionsFirst[1]).input); - }); - test('Editor Input Factory', function () { EditorRegistry.setInstantiationService(workbenchInstantiationService()); EditorRegistry.registerEditorInputFactory('myInputId', MyInputFactory); diff --git a/src/vs/workbench/test/common/editor/editorDiffModel.test.ts b/src/vs/workbench/test/common/editor/editorDiffModel.test.ts new file mode 100644 index 0000000000000..2f5901c6e880f --- /dev/null +++ b/src/vs/workbench/test/common/editor/editorDiffModel.test.ts @@ -0,0 +1,86 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as assert from 'assert'; +import { EditorModel } from 'vs/workbench/common/editor'; +import { BaseTextEditorModel } from 'vs/workbench/common/editor/textEditorModel'; +import { TextDiffEditorModel } from 'vs/workbench/common/editor/textDiffEditorModel'; +import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; +import { IModelService } from 'vs/editor/common/services/modelService'; +import { IModeService } from 'vs/editor/common/services/modeService'; +import { ResourceEditorInput } from "vs/workbench/common/editor/resourceEditorInput"; +import URI from "vs/base/common/uri"; +import { ITextModelResolverService } from "vs/editor/common/services/resolverService"; +import { ITextFileService } from "vs/workbench/services/textfile/common/textfiles"; +import { IUntitledEditorService } from "vs/workbench/services/untitled/common/untitledEditorService"; +import { TestTextFileService, workbenchInstantiationService } from "vs/workbench/test/workbenchTestServices"; +import { TPromise } from "vs/base/common/winjs.base"; +import { IModel } from "vs/editor/common/editorCommon"; +import { IInstantiationService } from "vs/platform/instantiation/common/instantiation"; + +class MyEditorModel extends EditorModel { } +class MyTextEditorModel extends BaseTextEditorModel { } + +class ServiceAccessor { + constructor( + @ITextModelResolverService public textModelResolverService: ITextModelResolverService, + @IModelService public modelService: IModelService, + @IModeService public modeService: IModeService, + @ITextFileService public textFileService: TestTextFileService, + @IUntitledEditorService public untitledEditorService: IUntitledEditorService + ) { + } +} + +suite('Workbench - EditorModel', () => { + let instantiationService: IInstantiationService; + let accessor: ServiceAccessor; + + setup(() => { + instantiationService = workbenchInstantiationService(); + accessor = instantiationService.createInstance(ServiceAccessor); + }); + + test('TextDiffEditorModel', function (done) { + const dispose = accessor.textModelResolverService.registerTextModelContentProvider('test', { + provideTextContent: function (resource: URI): TPromise { + if (resource.scheme === 'test') { + let modelContent = 'Hello Test'; + let mode = accessor.modeService.getOrCreateMode('json'); + return TPromise.as(accessor.modelService.createModel(modelContent, mode, resource)); + } + + return TPromise.as(null); + } + }); + + let input = instantiationService.createInstance(ResourceEditorInput, 'name', 'description', URI.from({ scheme: 'test', authority: null, path: 'thePath' })); + let otherInput = instantiationService.createInstance(ResourceEditorInput, 'name2', 'description', URI.from({ scheme: 'test', authority: null, path: 'thePath' })); + let diffInput = new DiffEditorInput('name', 'description', input, otherInput); + + diffInput.resolve(true).then((model: any) => { + assert(model); + assert(model instanceof TextDiffEditorModel); + + let diffEditorModel = model.textDiffEditorModel; + assert(diffEditorModel.original); + assert(diffEditorModel.modified); + + return diffInput.resolve(true).then((model: any) => { + assert(model.isResolved()); + + assert(diffEditorModel !== model.textDiffEditorModel); + diffInput.dispose(); + assert(!model.textDiffEditorModel); + + dispose.dispose(); + }); + }).done(() => { + done(); + }); + }); +}); \ No newline at end of file diff --git a/src/vs/workbench/test/common/editor/editorModel.test.ts b/src/vs/workbench/test/common/editor/editorModel.test.ts index 61f24c0e934f6..b0c237b73bb0b 100644 --- a/src/vs/workbench/test/common/editor/editorModel.test.ts +++ b/src/vs/workbench/test/common/editor/editorModel.test.ts @@ -9,9 +9,6 @@ import * as assert from 'assert'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; import { EditorModel } from 'vs/workbench/common/editor'; import { BaseTextEditorModel } from 'vs/workbench/common/editor/textEditorModel'; -import { TextDiffEditorModel } from 'vs/workbench/common/editor/textDiffEditorModel'; -import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; -import { StringEditorInput } from 'vs/workbench/common/editor/stringEditorInput'; import { IModelService } from 'vs/editor/common/services/modelService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl'; @@ -65,32 +62,6 @@ suite('Workbench - EditorModel', () => { }); }); - test('TextDiffEditorModel', function (done) { - instantiationService.stub(IModelService, stubModelService(instantiationService)); - let input = instantiationService.createInstance(StringEditorInput, 'name', 'description', 'value', 'text/plain', false); - let otherInput = instantiationService.createInstance(StringEditorInput, 'name2', 'description', 'value2', 'text/plain', false); - let diffInput = new DiffEditorInput('name', 'description', input, otherInput); - - diffInput.resolve(true).then((model: any) => { - assert(model); - assert(model instanceof TextDiffEditorModel); - - let diffEditorModel = model.textDiffEditorModel; - assert(diffEditorModel.original); - assert(diffEditorModel.modified); - - return diffInput.resolve(true).then((model: any) => { - assert(model.isResolved()); - - assert(diffEditorModel !== model.textDiffEditorModel); - diffInput.dispose(); - assert(!model.textDiffEditorModel); - }); - }).done(() => { - done(); - }); - }); - function stubModelService(instantiationService: TestInstantiationService): IModelService { instantiationService.stub(IConfigurationService, new TestConfigurationService()); return instantiationService.createInstance(ModelServiceImpl); diff --git a/src/vs/workbench/test/common/editor/stringEditorInput.test.ts b/src/vs/workbench/test/common/editor/stringEditorInput.test.ts deleted file mode 100644 index e2b1611c9f11d..0000000000000 --- a/src/vs/workbench/test/common/editor/stringEditorInput.test.ts +++ /dev/null @@ -1,115 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import * as assert from 'assert'; -import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; -import URI from 'vs/base/common/uri'; -import { StringEditorInput } from 'vs/workbench/common/editor/stringEditorInput'; -import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; -import { TestEditorService } from 'vs/workbench/test/workbenchTestServices'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; -import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl'; -import { IModelService } from 'vs/editor/common/services/modelService'; -import { IModeService } from 'vs/editor/common/services/modeService'; -import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl'; -import WorkbenchEditorService = require('vs/workbench/services/editor/common/editorService'); - -suite('Workbench - StringEditorInput', () => { - let instantiationService: TestInstantiationService; - let editorService: WorkbenchEditorService.IWorkbenchEditorService; - let modelService: IModelService; - let modeService: IModeService; - - setup(() => { - instantiationService = new TestInstantiationService(); - editorService = instantiationService.stub(WorkbenchEditorService.IWorkbenchEditorService, new TestEditorService()); - modeService = instantiationService.stub(IModeService, ModeServiceImpl); - modelService = instantiationService.stub(IModelService, stubModelService(instantiationService)); - }); - - test('StringEditorInput', function (done) { - let input: StringEditorInput = instantiationService.createInstance(StringEditorInput, 'name', 'description', 'value', 'mode', false); - const otherInput: StringEditorInput = instantiationService.createInstance(StringEditorInput, 'name', 'description', 'othervalue', 'mode', false); - const otherInputSame: StringEditorInput = instantiationService.createInstance(StringEditorInput, 'name', 'description', 'value', 'mode', false); - - const inputSingleton: StringEditorInput = instantiationService.createInstance(StringEditorInput, 'name', 'description', 'value', 'mode', true); - const otherInputSingleton: StringEditorInput = instantiationService.createInstance(StringEditorInput, 'name', 'description', 'othervalue', 'mode', true); - assert(inputSingleton.matches(otherInputSingleton)); - (otherInputSingleton).singleton = false; - assert(!inputSingleton.matches(otherInputSingleton)); - - assert(input.matches(input)); - assert(input.matches(otherInputSame)); - assert(!input.matches(otherInput)); - assert(!input.matches(null)); - assert(input.getName()); - - input = instantiationService.createInstance(StringEditorInput, 'name', 'description', 'value', 'mode', false); - - input = instantiationService.createInstance(StringEditorInput, 'name', 'description', 'value', 'mode', false); - input.resolve(true).then(resolved => { - const resolvedModelA = resolved; - return input.resolve(true).then(resolved => { - assert(resolvedModelA === resolved); // assert: Resolved Model cached per instance - - const otherInput: StringEditorInput = instantiationService.createInstance(StringEditorInput, 'name', 'description', 'value', 'mode', false); - return otherInput.resolve(true).then(resolved => { - assert(resolvedModelA !== resolved); // NOT assert: Different instance, different model - - input.dispose(); - - return input.resolve(true).then(resolved => { - assert(resolvedModelA !== resolved); // Different instance, because input got disposed - - const model = (resolved).textEditorModel; - return input.resolve(true).then(againResolved => { - assert(model === (againResolved).textEditorModel); // Models should not differ because string input is constant - - input.dispose(); - }); - }); - }); - }); - }).done(() => done()); - }); - - test('StringEditorInput - setValue, clearValue, append', function () { - const input: StringEditorInput = instantiationService.createInstance(StringEditorInput, 'name', 'description', 'value', 'mode', false); - - assert.strictEqual(input.getValue(), 'value'); - input.setValue('foo'); - assert.strictEqual(input.getValue(), 'foo'); - input.setValue(''); - assert(!input.getValue()); - }); - - test('Input.matches() - StringEditorInput', function () { - const inst = new TestInstantiationService(); - - const stringEditorInput: StringEditorInput = inst.createInstance(StringEditorInput, 'name', 'description', 'value', 'mode', false); - const promiseEditorInput: StringEditorInput = inst.createInstance(ResourceEditorInput, 'name', 'description', URI.from({ scheme: 'inMemory', authority: null, path: 'thePath' })); - - const stringEditorInput2: StringEditorInput = inst.createInstance(StringEditorInput, 'name', 'description', 'value', 'mode', false); - const promiseEditorInput2: StringEditorInput = inst.createInstance(ResourceEditorInput, 'name', 'description', URI.from({ scheme: 'inMemory', authority: null, path: 'thePath' })); - - assert.strictEqual(stringEditorInput.matches(null), false); - assert.strictEqual(promiseEditorInput.matches(null), false); - - assert.strictEqual(promiseEditorInput.matches(promiseEditorInput), true); - assert.strictEqual(stringEditorInput.matches(stringEditorInput), true); - - assert.strictEqual(promiseEditorInput.matches(promiseEditorInput2), true); - assert.strictEqual(stringEditorInput.matches(stringEditorInput2), true); - }); - - function stubModelService(instantiationService: TestInstantiationService): IModelService { - instantiationService.stub(IConfigurationService, new TestConfigurationService()); - - return instantiationService.createInstance(ModelServiceImpl); - } -}); \ No newline at end of file diff --git a/src/vs/workbench/test/common/editor/stringEditorModel.test.ts b/src/vs/workbench/test/common/editor/stringEditorModel.test.ts deleted file mode 100644 index 8258b2c28b226..0000000000000 --- a/src/vs/workbench/test/common/editor/stringEditorModel.test.ts +++ /dev/null @@ -1,75 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import * as assert from 'assert'; -import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; -import { StringEditorModel } from 'vs/workbench/common/editor/stringEditorModel'; -import { IModelService } from 'vs/editor/common/services/modelService'; -import { IModeService } from 'vs/editor/common/services/modeService'; -import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; -import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl'; - -suite('Workbench - StringEditorModel', () => { - let instantiationService: TestInstantiationService; - - setup(() => { - instantiationService = new TestInstantiationService(); - instantiationService.stub(IModeService, ModeServiceImpl); - }); - - test('StringEditorModel', function (done) { - instantiationService.stub(IModelService, stubModelService(instantiationService)); - const m: StringEditorModel = instantiationService.createInstance(StringEditorModel, 'value', 'mode', null); - m.load().then(model => { - assert(model === m); - - const textEditorModel = m.textEditorModel; - assert.strictEqual(textEditorModel.getValue(), 'value'); - - assert.strictEqual(m.isResolved(), true); - - (m).value = 'something'; - return m.load().then(model => { - assert(textEditorModel === m.textEditorModel); - assert.strictEqual(m.getValue(), 'something'); - }); - }).done(() => { - m.dispose(); - done(); - }); - }); - - test('StringEditorModel - setValue', function (done) { - instantiationService.stub(IModelService, stubModelService(instantiationService)); - const m: StringEditorModel = instantiationService.createInstance(StringEditorModel, 'value', 'mode', null); - m.load().then(model => { - assert(model === m); - - const textEditorModel = m.textEditorModel; - assert.strictEqual(textEditorModel.getValue(), 'value'); - - m.setValue('foobar'); - assert.strictEqual(m.getValue(), 'foobar'); - assert.strictEqual(textEditorModel.getValue(), 'foobar'); - - m.setValue(''); - assert(!m.getValue()); - assert(!textEditorModel.getValue()); - }).done(() => { - m.dispose(); - done(); - }); - }); - - function stubModelService(instantiationService: TestInstantiationService): IModelService { - instantiationService.stub(IConfigurationService, new TestConfigurationService()); - - return instantiationService.createInstance(ModelServiceImpl); - } -}); \ No newline at end of file From 0ee4e833cba33f1e9a888afe377a79f2d5b37325 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 5 May 2017 09:09:28 -0700 Subject: [PATCH 0229/2747] Remove log --- .../workbench/parts/terminal/electron-browser/terminalPanel.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index b879da8392daa..2843926ae24c3 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -228,7 +228,6 @@ export class TerminalPanel extends Panel { }); const bgColor = theme.getColor(TERMINAL_BACKGROUND_COLOR); if (bgColor) { - console.log('set bgColor to: ' + bgColor); css += `.monaco-workbench .panel.integrated-terminal .terminal-outer-container { background-color: ${bgColor}; }`; } const fgColor = theme.getColor(TERMINAL_FOREGROUND_COLOR); From 69aaa885e2533e0c7c0f71a4a741532bc1c58cdb Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 5 May 2017 18:30:16 +0200 Subject: [PATCH 0230/2747] fix build? --- build/gulpfile.vscode.js | 1 - build/lib/i18n.ts | 1 - src/vs/workbench/buildfile.js | 3 --- 3 files changed, 5 deletions(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index a2a2ca2df0beb..3214a86b15d4c 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -65,7 +65,6 @@ const vscodeResources = [ 'out-build/vs/workbench/electron-browser/bootstrap/**', 'out-build/vs/workbench/parts/debug/**/*.json', 'out-build/vs/workbench/parts/execution/**/*.scpt', - 'out-build/vs/workbench/parts/git/**/*.sh', 'out-build/vs/workbench/parts/html/browser/webview-pre.js', 'out-build/vs/**/markdown.css', 'out-build/vs/workbench/parts/tasks/**/*.json', diff --git a/build/lib/i18n.ts b/build/lib/i18n.ts index 434d3301752df..cdf8e56e4ac0c 100644 --- a/build/lib/i18n.ts +++ b/build/lib/i18n.ts @@ -606,7 +606,6 @@ const workbenchResources: Resource[] = [ { name: 'vs/workbench/parts/extensions', project: workbenchProject }, { name: 'vs/workbench/parts/feedback', project: workbenchProject }, { name: 'vs/workbench/parts/files', project: workbenchProject }, - { name: 'vs/workbench/parts/git', project: workbenchProject }, { name: 'vs/workbench/parts/html', project: workbenchProject }, { name: 'vs/workbench/parts/markers', project: workbenchProject }, { name: 'vs/workbench/parts/nps', project: workbenchProject }, diff --git a/src/vs/workbench/buildfile.js b/src/vs/workbench/buildfile.js index 4f4a708604073..dfb1ee2b60017 100644 --- a/src/vs/workbench/buildfile.js +++ b/src/vs/workbench/buildfile.js @@ -17,9 +17,6 @@ function createModuleDescription(name, exclude) { exports.collectModules = function (excludes) { var modules = [ - createModuleDescription('vs/workbench/parts/git/node/gitApp', []), - createModuleDescription('vs/workbench/parts/git/node/askpass', []), - createModuleDescription('vs/workbench/parts/output/common/outputLinkComputer', ['vs/base/common/worker/simpleWorker', 'vs/editor/common/services/editorSimpleWorker']), createModuleDescription('vs/workbench/parts/debug/node/telemetryApp', []), From cf03392bf338f228459dcfbd64c72a0a3f1f0a1f Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 5 May 2017 10:11:39 -0700 Subject: [PATCH 0231/2747] Fix terminal.integrated.rightClickCopyPaste on macOS Fixes #25844 --- .../parts/terminal/electron-browser/terminalInstance.ts | 2 +- .../parts/terminal/electron-browser/terminalPanel.ts | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 4c75ff544614d..807ae0a089b80 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -320,7 +320,7 @@ export class TerminalInstance implements ITerminalInstance { } public clearSelection(): void { - document.getSelection().empty(); + window.getSelection().empty(); } public dispose(): void { diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 2843926ae24c3..38fb99f450c64 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -172,6 +172,15 @@ export class TerminalPanel extends Panel { } else { terminal.paste(); } + // Clear selection after all click event bubbling is finished on Mac to prevent + // right-click selecting a word which is seemed cannot be disabled. There is a + // flicker when pasting but this appears to give the best experience if the + // setting is enabled. + if (platform.isMacintosh) { + setTimeout(() => { + terminal.clearSelection(); + }, 0); + } this._cancelContextMenu = true; } } From 9d5987e8f6569fc3f35f8fe291f8b51815ffc9aa Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 5 May 2017 10:23:29 -0700 Subject: [PATCH 0232/2747] Add terminal colors for solarized themes Fixes #26065 --- .../themes/solarized-dark-color-theme.json | 35 ++++++++++--------- .../themes/solarized-light-color-theme.json | 35 ++++++++++--------- 2 files changed, 36 insertions(+), 34 deletions(-) diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index 75862dc7088e6..918d9ac9b4523 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -447,24 +447,25 @@ // Workbench: Quick Open "pickerGroup.foreground": "#2AA19899", - "pickerGroup.border": "#2AA19899" + "pickerGroup.border": "#2AA19899", // Workbench: Terminal - // "terminal.ansiBlack": "", - // "terminal.ansiBlue": "", - // "terminal.ansiBrightBlack": "", - // "terminal.ansiBrightBlue": "", - // "terminal.ansiBrightCyan": "", - // "terminal.ansiBrightGreen": "", - // "terminal.ansiBrightMagenta": "", - // "terminal.ansiBrightRed": "", - // "terminal.ansiBrightWhite": "", - // "terminal.ansiBrightYellow": "", - // "terminal.ansiCyan": "", - // "terminal.ansiGreen": "", - // "terminal.ansiMagenta": "", - // "terminal.ansiRed": "", - // "terminal.ansiWhite": "", - // "terminal.ansiYellow": "" + // Colors sourced from the official palette http://ethanschoonover.com/solarized + "terminal.ansiBlack": "#262626", + "terminal.ansiBlue": "#0087ff", + "terminal.ansiBrightBlack": "#1c1c1c", + "terminal.ansiBrightBlue": "#808080", + "terminal.ansiBrightCyan": "#808080", + "terminal.ansiBrightGreen": "#585858", + "terminal.ansiBrightMagenta": "#5f5faf", + "terminal.ansiBrightRed": "#d75f00", + "terminal.ansiBrightWhite": "#808080", + "terminal.ansiBrightYellow": "#626262", + "terminal.ansiCyan": "#00afaf", + "terminal.ansiGreen": "#5f8700", + "terminal.ansiMagenta": "#af005f", + "terminal.ansiRed": "#d70000", + "terminal.ansiWhite": "#808080", + "terminal.ansiYellow": "#af8700" } } \ No newline at end of file diff --git a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json index de82f12028307..7deda4d22e4b9 100644 --- a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -448,24 +448,25 @@ // Workbench: Quick Open "pickerGroup.border": "#2AA19899", - "pickerGroup.foreground": "#2AA19899" + "pickerGroup.foreground": "#2AA19899", // Workbench: Terminal - // "terminal.ansiBlack": "#111111", - // "terminal.ansiRed": "#ff9da4", - // "terminal.ansiGreen": "#d1f1a9", - // "terminal.ansiYellow": "#ffeead", - // "terminal.ansiBlue": "#bbdaff", - // "terminal.ansiMagenta": "#ebbbff", - // "terminal.ansiCyan": "#99ffff", - // "terminal.ansiWhite": "#cccccc", - // "terminal.ansiBrightBlack": "#333333", - // "terminal.ansiBrightRed": "#ff7882", - // "terminal.ansiBrightGreen": "#b8f171", - // "terminal.ansiBrightYellow": "#ffe580", - // "terminal.ansiBrightBlue": "#80baff", - // "terminal.ansiBrightMagenta": "#d778ff", - // "terminal.ansiBrightCyan": "#78ffff", - // "terminal.ansiBrightWhite": "#ffffff" + // Colors sourced from the official palette http://ethanschoonover.com/solarized + "terminal.ansiBlack": "#262626", + "terminal.ansiBlue": "#0087ff", + "terminal.ansiBrightBlack": "#1c1c1c", + "terminal.ansiBrightBlue": "#808080", + "terminal.ansiBrightCyan": "#808080", + "terminal.ansiBrightGreen": "#585858", + "terminal.ansiBrightMagenta": "#5f5faf", + "terminal.ansiBrightRed": "#d75f00", + "terminal.ansiBrightWhite": "#808080", + "terminal.ansiBrightYellow": "#626262", + "terminal.ansiCyan": "#00afaf", + "terminal.ansiGreen": "#5f8700", + "terminal.ansiMagenta": "#af005f", + "terminal.ansiRed": "#d70000", + "terminal.ansiWhite": "#808080", + "terminal.ansiYellow": "#af8700" } } \ No newline at end of file From 7d2dea4e454e1ffebc9d5504bf789dbe60b3da08 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 5 May 2017 11:37:59 -0700 Subject: [PATCH 0233/2747] Add "Include" to extension TSConfig Files (#25860) **Bug** Most VSCode extensions currently specify `"exclude"` in their `tsconfig.json` but not `"include"`. This may result in extra files being included in each project **Fix** Add `"include": ["src/**/*"]` to all extension tsconfig files --- extensions/configuration-editing/tsconfig.json | 4 ++-- extensions/css/client/tsconfig.json | 4 ++-- extensions/css/server/tsconfig.json | 4 ++-- extensions/extension-editing/tsconfig.json | 4 ++-- extensions/git/tsconfig.json | 4 ++-- extensions/grunt/tsconfig.json | 5 ++--- extensions/gulp/tsconfig.json | 5 ++--- extensions/javascript/tsconfig.json | 4 ++-- extensions/json/server/tsconfig.json | 4 ++-- extensions/markdown/tsconfig.json | 4 ++-- extensions/php/tsconfig.json | 4 ++-- extensions/python/tsconfig.json | 4 ++-- extensions/ruby/tsconfig.json | 4 ++-- extensions/typescript/tsconfig.json | 7 ++----- extensions/vscode-api-tests/tsconfig.json | 4 ++-- extensions/vscode-colorize-tests/tsconfig.json | 4 ++-- 16 files changed, 32 insertions(+), 37 deletions(-) diff --git a/extensions/configuration-editing/tsconfig.json b/extensions/configuration-editing/tsconfig.json index 3fd4b7cd11756..6971f531b1105 100644 --- a/extensions/configuration-editing/tsconfig.json +++ b/extensions/configuration-editing/tsconfig.json @@ -8,7 +8,7 @@ ], "strictNullChecks": true }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } diff --git a/extensions/css/client/tsconfig.json b/extensions/css/client/tsconfig.json index 2f1dccc29ca6d..e87d1a805a184 100644 --- a/extensions/css/client/tsconfig.json +++ b/extensions/css/client/tsconfig.json @@ -7,7 +7,7 @@ "es5", "es2015.promise" ] }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/css/server/tsconfig.json b/extensions/css/server/tsconfig.json index 7651bc8687e91..8e862f0264610 100644 --- a/extensions/css/server/tsconfig.json +++ b/extensions/css/server/tsconfig.json @@ -7,7 +7,7 @@ "es5" ] }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/extension-editing/tsconfig.json b/extensions/extension-editing/tsconfig.json index 90ac01c2d39f0..a2b5bcdfddf61 100644 --- a/extensions/extension-editing/tsconfig.json +++ b/extensions/extension-editing/tsconfig.json @@ -7,7 +7,7 @@ "module": "commonjs", "outDir": "./out" }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/git/tsconfig.json b/extensions/git/tsconfig.json index bed30f8826c7f..254c9e6745984 100644 --- a/extensions/git/tsconfig.json +++ b/extensions/git/tsconfig.json @@ -9,7 +9,7 @@ "strictNullChecks": true, "experimentalDecorators": true }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/grunt/tsconfig.json b/extensions/grunt/tsconfig.json index d815a565579a2..e804fa3acd7a6 100644 --- a/extensions/grunt/tsconfig.json +++ b/extensions/grunt/tsconfig.json @@ -12,8 +12,7 @@ "noUnusedLocals": true, "noUnusedParameters": true }, - "exclude": [ - "node_modules", - "out" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/gulp/tsconfig.json b/extensions/gulp/tsconfig.json index d815a565579a2..e804fa3acd7a6 100644 --- a/extensions/gulp/tsconfig.json +++ b/extensions/gulp/tsconfig.json @@ -12,8 +12,7 @@ "noUnusedLocals": true, "noUnusedParameters": true }, - "exclude": [ - "node_modules", - "out" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/javascript/tsconfig.json b/extensions/javascript/tsconfig.json index 551261ed46daf..4445bb27fd755 100644 --- a/extensions/javascript/tsconfig.json +++ b/extensions/javascript/tsconfig.json @@ -7,7 +7,7 @@ "es2015" ] }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/json/server/tsconfig.json b/extensions/json/server/tsconfig.json index c2a86a0af350a..deecf69b8b4f1 100644 --- a/extensions/json/server/tsconfig.json +++ b/extensions/json/server/tsconfig.json @@ -9,7 +9,7 @@ "es5", "es2015.promise" ] }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/markdown/tsconfig.json b/extensions/markdown/tsconfig.json index e877d8142f07d..ec272338af52f 100644 --- a/extensions/markdown/tsconfig.json +++ b/extensions/markdown/tsconfig.json @@ -14,7 +14,7 @@ "noUnusedLocals": true, "noUnusedParameters": true }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/php/tsconfig.json b/extensions/php/tsconfig.json index 90ac01c2d39f0..a2b5bcdfddf61 100644 --- a/extensions/php/tsconfig.json +++ b/extensions/php/tsconfig.json @@ -7,7 +7,7 @@ "module": "commonjs", "outDir": "./out" }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/python/tsconfig.json b/extensions/python/tsconfig.json index 90ac01c2d39f0..a2b5bcdfddf61 100644 --- a/extensions/python/tsconfig.json +++ b/extensions/python/tsconfig.json @@ -7,7 +7,7 @@ "module": "commonjs", "outDir": "./out" }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/ruby/tsconfig.json b/extensions/ruby/tsconfig.json index a016490a376e0..efe5568f2b51d 100644 --- a/extensions/ruby/tsconfig.json +++ b/extensions/ruby/tsconfig.json @@ -8,7 +8,7 @@ ], "sourceMap": true }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/typescript/tsconfig.json b/extensions/typescript/tsconfig.json index 2e44abefad495..3112725c10315 100644 --- a/extensions/typescript/tsconfig.json +++ b/extensions/typescript/tsconfig.json @@ -13,10 +13,7 @@ "noUnusedLocals": true, "noUnusedParameters": true }, - "exclude": [ - "node_modules", - "server", - "out", - "test/colorize-fixtures" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/vscode-api-tests/tsconfig.json b/extensions/vscode-api-tests/tsconfig.json index 620857bb06ffb..26c357e374bab 100644 --- a/extensions/vscode-api-tests/tsconfig.json +++ b/extensions/vscode-api-tests/tsconfig.json @@ -9,7 +9,7 @@ "sourceMap": true, "strictNullChecks": true }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file diff --git a/extensions/vscode-colorize-tests/tsconfig.json b/extensions/vscode-colorize-tests/tsconfig.json index 099a940aa2e35..366e25ea09c7c 100644 --- a/extensions/vscode-colorize-tests/tsconfig.json +++ b/extensions/vscode-colorize-tests/tsconfig.json @@ -8,7 +8,7 @@ ], "sourceMap": true }, - "exclude": [ - "node_modules" + "include": [ + "src/**/*" ] } \ No newline at end of file From e8b01da790613d20feaeed845974cf69106fca37 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 5 May 2017 12:53:05 -0700 Subject: [PATCH 0234/2747] Clean Up JSDoc Completion Provider Implementation (#25981) * Fix JSDoc Completion Provider **Bug** 89da6ab81fcc552760a1a8972f5e2f3d6a820ecf fixed #11944 by changing how enter works in completion providers. Now if the completion exactly matches the current text, pressing `enter` is not captured by the the suggestion widget. Instead it inserts a new line into the editor. This broke the jsdoc completion provider which uses `''` as a placeholder insertion before calculating the actual insertion upon being accepted. This weird behavior is because of a of the current tsserver api **Fix** Change the insert text to a single space instead. This seems to fix this issue in my testing. * Slightly more elegant fix --- .../src/features/jsDocCompletionProvider.ts | 68 +++++++------------ 1 file changed, 25 insertions(+), 43 deletions(-) diff --git a/extensions/typescript/src/features/jsDocCompletionProvider.ts b/extensions/typescript/src/features/jsDocCompletionProvider.ts index 7f9aaf8c029cc..fc8e88d5df254 100644 --- a/extensions/typescript/src/features/jsDocCompletionProvider.ts +++ b/extensions/typescript/src/features/jsDocCompletionProvider.ts @@ -26,7 +26,7 @@ namespace Configuration { class JsDocCompletionItem extends CompletionItem { constructor( - file: Uri, + document: TextDocument, position: Position, shouldGetJSDocFromTSServer: boolean, ) { @@ -34,10 +34,19 @@ class JsDocCompletionItem extends CompletionItem { this.detail = localize('typescript.jsDocCompletionItem.documentation', 'JSDoc comment'); this.insertText = ''; this.sortText = '\0'; + + const line = document.lineAt(position.line).text; + const prefix = line.slice(0, position.character).match(/\/\**\s*$/); + const suffix = line.slice(position.character).match(/^\s*\**\//); + const start = position.translate(0, prefix ? -prefix[0].length : 0); + this.range = new Range( + start, + position.translate(0, suffix ? suffix[0].length : 0)); + this.command = { title: 'Try Complete JSDoc', command: TryCompleteJsDocCommand.COMMAND_NAME, - arguments: [file, position, shouldGetJSDocFromTSServer] + arguments: [document.uri, start, shouldGetJSDocFromTSServer] }; } } @@ -67,7 +76,7 @@ export class JsDocCompletionProvider implements CompletionItemProvider { const line = document.lineAt(position.line).text; const prefix = line.slice(0, position.character); if (prefix.match(/^\s*$|\/\*\*\s*$|^\s*\/\*\*+\s*$/)) { - return [new JsDocCompletionItem(document.uri, position, this.config.enabled)]; + return [new JsDocCompletionItem(document, position, this.config.enabled)]; } return []; } @@ -80,15 +89,15 @@ export class JsDocCompletionProvider implements CompletionItemProvider { export class TryCompleteJsDocCommand { static COMMAND_NAME = '_typeScript.tryCompleteJsDoc'; - constructor(private client: ITypescriptServiceClient) { - - } + constructor( + private client: ITypescriptServiceClient + ) { } /** * Try to insert a jsdoc comment, using a template provide by typescript * if possible, otherwise falling back to a default comment format. */ - public tryCompleteJsDoc(resource: Uri, position: Position, shouldGetJSDocFromTSServer: boolean): Thenable { + public tryCompleteJsDoc(resource: Uri, start: Position, shouldGetJSDocFromTSServer: boolean): Thenable { const file = this.client.normalizePath(resource); if (!file) { return Promise.resolve(false); @@ -99,44 +108,17 @@ export class TryCompleteJsDocCommand { return Promise.resolve(false); } - return this.prepForDocCompletion(editor, position) - .then((start: Position) => { - if (!shouldGetJSDocFromTSServer) { - return this.tryInsertDefaultDoc(editor, start); - } - - return this.tryInsertJsDocFromTemplate(editor, file, start) - .then((didInsertFromTemplate: boolean) => { - if (didInsertFromTemplate) { - return true; - } - return this.tryInsertDefaultDoc(editor, start); - }); - }); - } - - /** - * Prepare the area around the position for insertion of the jsdoc. - * - * Removes any the prefix and suffix of a possible jsdoc - */ - private prepForDocCompletion(editor: TextEditor, position: Position): Thenable { - const line = editor.document.lineAt(position.line).text; - const prefix = line.slice(0, position.character).match(/\/\**\s*$/); - const suffix = line.slice(position.character).match(/^\s*\**\//); - if (!prefix && !suffix) { - // Nothing to remove - return Promise.resolve(position); + if (!shouldGetJSDocFromTSServer) { + return this.tryInsertDefaultDoc(editor, start); } - const start = position.translate(0, prefix ? -prefix[0].length : 0); - return editor.edit( - edits => { - edits.delete(new Range(start, position.translate(0, suffix ? suffix[0].length : 0))); - }, { - undoStopBefore: true, - undoStopAfter: false - }).then(() => start); + return this.tryInsertJsDocFromTemplate(editor, file, start) + .then((didInsertFromTemplate: boolean) => { + if (didInsertFromTemplate) { + return true; + } + return this.tryInsertDefaultDoc(editor, start); + }); } private tryInsertJsDocFromTemplate(editor: TextEditor, file: string, position: Position): Promise { From 721f880cfde7a28d61a102d39dc92f5406882ec5 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 5 May 2017 13:41:39 -0700 Subject: [PATCH 0235/2747] Use Shared TypeScript to Compile VSCode Colorizer Tests (#25858) **Bug** Colorizer-tests currently installs an old version of typescript **Fix** Switch to using the standard typescript that all other extensions use. Also switch over to using the shared `vscode.d.ts` file --- extensions/vscode-colorize-tests/package.json | 2 -- extensions/vscode-colorize-tests/src/colorizer.test.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/extensions/vscode-colorize-tests/package.json b/extensions/vscode-colorize-tests/package.json index a91ebb2a4d72f..2e886b6718905 100644 --- a/extensions/vscode-colorize-tests/package.json +++ b/extensions/vscode-colorize-tests/package.json @@ -8,14 +8,12 @@ "vscode": "*" }, "scripts": { - "compile": "node ./node_modules/vscode/bin/compile -watch -p ./", "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-colorize-tests ./tsconfig.json", "postinstall": "node ./node_modules/vscode/bin/install" }, "devDependencies": { "@types/mocha": "^2.2.38", "@types/node": "^7.0.4", - "typescript": "^1.6.2", "vscode": "1.0.1" } } \ No newline at end of file diff --git a/extensions/vscode-colorize-tests/src/colorizer.test.ts b/extensions/vscode-colorize-tests/src/colorizer.test.ts index d709300a8394e..3c91e57ef3ff0 100644 --- a/extensions/vscode-colorize-tests/src/colorizer.test.ts +++ b/extensions/vscode-colorize-tests/src/colorizer.test.ts @@ -38,7 +38,7 @@ function assertUnchangedTokens(testFixurePath: string, done) { }, done); } -suite("colorization", () => { +suite('colorization', () => { let extensionsFolder = normalize(join(__dirname, '../../')); let extensions = fs.readdirSync(extensionsFolder); extensions.forEach(extension => { From a68dc0d9e67b21e69f1d79ca5f47a95ead0b7a7d Mon Sep 17 00:00:00 2001 From: rebornix Date: Fri, 28 Apr 2017 10:46:38 -0700 Subject: [PATCH 0236/2747] Fix #24887. Keybinding to toggle Find in selection. --- .../contrib/find/common/findController.ts | 30 ++++++++++++++++++- .../editor/contrib/find/common/findModel.ts | 4 +++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/find/common/findController.ts b/src/vs/editor/contrib/find/common/findController.ts index e3a133ee56089..c788dafd5f26b 100644 --- a/src/vs/editor/contrib/find/common/findController.ts +++ b/src/vs/editor/contrib/find/common/findController.ts @@ -14,7 +14,7 @@ import { Selection } from 'vs/editor/common/core/selection'; import * as strings from 'vs/base/common/strings'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { editorAction, commonEditorContribution, ServicesAccessor, EditorAction, EditorCommand, CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; -import { FIND_IDS, FindModelBoundToEditorModel, ToggleCaseSensitiveKeybinding, ToggleRegexKeybinding, ToggleWholeWordKeybinding, ShowPreviousFindTermKeybinding, ShowNextFindTermKeybinding } from 'vs/editor/contrib/find/common/findModel'; +import { FIND_IDS, FindModelBoundToEditorModel, ToggleCaseSensitiveKeybinding, ToggleRegexKeybinding, ToggleWholeWordKeybinding, ToggleSearchScopeKeybinding, ShowPreviousFindTermKeybinding, ShowNextFindTermKeybinding } from 'vs/editor/contrib/find/common/findModel'; import { FindReplaceState, FindReplaceStateChangedEvent, INewFindReplaceState } from 'vs/editor/contrib/find/common/findState'; import { DocumentHighlightProviderRegistry } from 'vs/editor/common/modes'; import { RunOnceScheduler, Delayer } from 'vs/base/common/async'; @@ -153,6 +153,20 @@ export class CommonFindController extends Disposable implements editorCommon.IEd this._state.change({ isRegex: !this._state.isRegex }, false); } + public toggleSearchScope(): void { + if (this._state.searchScope) { + this._state.change({ searchScope: null }, true); + } else { + let selection = this._editor.getSelection(); + if (selection.endColumn === 1 && selection.endLineNumber > selection.startLineNumber) { + selection = selection.setEndPosition(selection.endLineNumber - 1, 1); + } + if (!selection.isEmpty()) { + this._state.change({ searchScope: selection }, true); + } + } + } + public setSearchString(searchString: string): void { this._state.change({ searchString: searchString }, false); } @@ -1064,6 +1078,20 @@ CommonEditorRegistry.registerEditorCommand(new FindCommand({ } })); +CommonEditorRegistry.registerEditorCommand(new FindCommand({ + id: FIND_IDS.ToggleSearchScopeCommand, + precondition: null, + handler: x => x.toggleSearchScope(), + kbOpts: { + weight: CommonEditorRegistry.commandWeight(5), + kbExpr: EditorContextKeys.focus, + primary: ToggleSearchScopeKeybinding.primary, + mac: ToggleSearchScopeKeybinding.mac, + win: ToggleSearchScopeKeybinding.win, + linux: ToggleSearchScopeKeybinding.linux + } +})); + CommonEditorRegistry.registerEditorCommand(new FindCommand({ id: FIND_IDS.ReplaceOneAction, precondition: CONTEXT_FIND_WIDGET_VISIBLE, diff --git a/src/vs/editor/contrib/find/common/findModel.ts b/src/vs/editor/contrib/find/common/findModel.ts index a21568981d2b8..9667c467e1fbb 100644 --- a/src/vs/editor/contrib/find/common/findModel.ts +++ b/src/vs/editor/contrib/find/common/findModel.ts @@ -33,6 +33,9 @@ export const ToggleRegexKeybinding: IKeybindings = { primary: KeyMod.Alt | KeyCode.KEY_R, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_R } }; +export const ToggleSearchScopeKeybinding: IKeybindings = { + primary: KeyMod.Alt | KeyCode.KEY_S +}; export const ShowPreviousFindTermKeybinding: IKeybindings = { primary: KeyMod.Alt | KeyCode.UpArrow }; @@ -55,6 +58,7 @@ export const FIND_IDS = { ToggleCaseSensitiveCommand: 'toggleFindCaseSensitive', ToggleWholeWordCommand: 'toggleFindWholeWord', ToggleRegexCommand: 'toggleFindRegex', + ToggleSearchScopeCommand: 'toggleSearchScope', ReplaceOneAction: 'editor.action.replaceOne', ReplaceAllAction: 'editor.action.replaceAll', SelectAllMatchesAction: 'editor.action.selectAllMatches', From bb5722729bd5a282c96196bf920787d9d9fc0d17 Mon Sep 17 00:00:00 2001 From: rebornix Date: Fri, 28 Apr 2017 12:44:48 -0700 Subject: [PATCH 0237/2747] Fix #15959. Align Esc and Close button --- src/vs/editor/contrib/find/browser/findWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index f04848aa1a447..bbd0bee81fafc 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -557,7 +557,7 @@ export class FindWidget extends Widget implements IOverlayWidget { label: NLS_CLOSE_BTN_LABEL + this._keybindingLabelFor(FIND_IDS.CloseFindWidgetCommand), className: 'close-fw', onTrigger: () => { - this._state.change({ isRevealed: false }, false); + this._state.change({ isRevealed: false, searchScope: null }, false); }, onKeyDown: (e) => { if (e.equals(KeyCode.Tab)) { From 389efb47e1a7326ed86c9458e5e25a59cbf19c10 Mon Sep 17 00:00:00 2001 From: rebornix Date: Fri, 5 May 2017 15:03:15 -0700 Subject: [PATCH 0238/2747] L is a good key as it is not often used --- src/vs/editor/contrib/find/common/findModel.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/find/common/findModel.ts b/src/vs/editor/contrib/find/common/findModel.ts index 9667c467e1fbb..ceac616aafa60 100644 --- a/src/vs/editor/contrib/find/common/findModel.ts +++ b/src/vs/editor/contrib/find/common/findModel.ts @@ -34,7 +34,8 @@ export const ToggleRegexKeybinding: IKeybindings = { mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_R } }; export const ToggleSearchScopeKeybinding: IKeybindings = { - primary: KeyMod.Alt | KeyCode.KEY_S + primary: KeyMod.Alt | KeyCode.KEY_L, + mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_L } }; export const ShowPreviousFindTermKeybinding: IKeybindings = { primary: KeyMod.Alt | KeyCode.UpArrow From 4adfa92a0cabb998e2630ef79935d58e7051bf3a Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 5 May 2017 14:15:20 -0700 Subject: [PATCH 0239/2747] Enable ts-check for webview-pre.js --- .../parts/html/browser/webview-pre.js | 311 +++++++++--------- 1 file changed, 160 insertions(+), 151 deletions(-) diff --git a/src/vs/workbench/parts/html/browser/webview-pre.js b/src/vs/workbench/parts/html/browser/webview-pre.js index da702ba48a09b..8c8a30e742f8e 100644 --- a/src/vs/workbench/parts/html/browser/webview-pre.js +++ b/src/vs/workbench/parts/html/browser/webview-pre.js @@ -2,187 +2,196 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; +// @ts-check +(function () { + 'use strict'; -const ipcRenderer = require('electron').ipcRenderer; + const ipcRenderer = require('electron').ipcRenderer; -var initData = {}; + const initData = {}; -function styleBody(body) { - if (!body) { - return + function styleBody(body) { + if (!body) { + return + } + body.classList.remove('vscode-light', 'vscode-dark', 'vscode-high-contrast'); + body.classList.add(initData.activeTheme); } - body.classList.remove('vscode-light', 'vscode-dark', 'vscode-high-contrast'); - body.classList.add(initData.activeTheme); -} - -function getTarget() { - return document.getElementById('_target'); -} -function handleInnerClick(event) { - if (!event || !event.view || !event.view.document) { - return; + /** + * @return {HTMLIFrameElement} + */ + function getTarget() { + return document.getElementById('_target'); } - var node = event.target; - while (node) { - if (node.tagName === "A" && node.href) { - var baseElement = event.view.document.getElementsByTagName("base")[0]; - if (node.getAttribute("href") === "#") { - event.view.scrollTo(0, 0); - } else if (node.hash && (node.getAttribute("href") === node.hash || (baseElement && node.href.indexOf(baseElement.href) >= 0))) { - var scrollTarget = event.view.document.getElementById(node.hash.substr(1, node.hash.length - 1)); - if (scrollTarget) { - scrollTarget.scrollIntoView(); + + function handleInnerClick(event) { + if (!event || !event.view || !event.view.document) { + return; + } + var node = event.target; + while (node) { + if (node.tagName === "A" && node.href) { + var baseElement = event.view.document.getElementsByTagName("base")[0]; + if (node.getAttribute("href") === "#") { + event.view.scrollTo(0, 0); + } else if (node.hash && (node.getAttribute("href") === node.hash || (baseElement && node.href.indexOf(baseElement.href) >= 0))) { + var scrollTarget = event.view.document.getElementById(node.hash.substr(1, node.hash.length - 1)); + if (scrollTarget) { + scrollTarget.scrollIntoView(); + } + } else { + ipcRenderer.sendToHost("did-click-link", node.href); } - } else { - ipcRenderer.sendToHost("did-click-link", node.href); + event.preventDefault(); + break; } - event.preventDefault(); - break; + node = node.parentNode; } - node = node.parentNode; } -} -document.addEventListener("DOMContentLoaded", function (event) { - ipcRenderer.on('baseUrl', function (event, value) { - initData.baseUrl = value; - }); - - ipcRenderer.on('styles', function (event, value, activeTheme) { - initData.styles = value; - initData.activeTheme = activeTheme; - - // webview - var target = getTarget() - if (!target) { - return; - } - var body = target.contentDocument.getElementsByTagName('body'); - styleBody(body[0]); - - // iframe - var defaultStyles = target.contentDocument.getElementById('_defaultStyles'); - if (defaultStyles) { - defaultStyles.innerHTML = initData.styles; - } - }); + document.addEventListener("DOMContentLoaded", function (event) { + ipcRenderer.on('baseUrl', function (event, value) { + initData.baseUrl = value; + }); - // propagate focus - ipcRenderer.on('focus', function () { - const target = getTarget(); - if (target) { - target.contentWindow.focus(); - } - }); + ipcRenderer.on('styles', function (event, value, activeTheme) { + initData.styles = value; + initData.activeTheme = activeTheme; - // update iframe-contents - ipcRenderer.on('content', function (_event, value) { - const text = value.join('\n'); - const newDocument = new DOMParser().parseFromString(text, 'text/html'); - - // know what happens here - const stats = { - scriptTags: newDocument.documentElement.querySelectorAll('script').length, - inputTags: newDocument.documentElement.querySelectorAll('input').length, - styleTags: newDocument.documentElement.querySelectorAll('style').length, - linkStyleSheetTags: newDocument.documentElement.querySelectorAll('link[rel=stylesheet]').length, - stringLen: text.length - }; + // webview + var target = getTarget() + if (!target) { + return; + } + var body = target.contentDocument.getElementsByTagName('body'); + styleBody(body[0]); - // set base-url if applicable - if (initData.baseUrl && newDocument.head.getElementsByTagName('base').length === 0) { - const baseElement = newDocument.createElement('base'); - baseElement.href = initData.baseUrl; - newDocument.head.appendChild(baseElement); - } + // iframe + var defaultStyles = target.contentDocument.getElementById('_defaultStyles'); + if (defaultStyles) { + defaultStyles.innerHTML = initData.styles; + } + }); - // apply default styles - const defaultStyles = newDocument.createElement('style'); - defaultStyles.id = '_defaultStyles'; - defaultStyles.innerHTML = initData.styles; - if (newDocument.head.hasChildNodes()) { - newDocument.head.insertBefore(defaultStyles, newDocument.head.firstChild); - } else { - newDocument.head.appendChild(defaultStyles); - } + // propagate focus + ipcRenderer.on('focus', function () { + const target = getTarget(); + if (target) { + target.contentWindow.focus(); + } + }); - styleBody(newDocument.body); + // update iframe-contents + ipcRenderer.on('content', function (_event, value) { + const text = value.join('\n'); + const newDocument = new DOMParser().parseFromString(text, 'text/html'); + + // know what happens here + const stats = { + scriptTags: newDocument.documentElement.querySelectorAll('script').length, + inputTags: newDocument.documentElement.querySelectorAll('input').length, + styleTags: newDocument.documentElement.querySelectorAll('style').length, + linkStyleSheetTags: newDocument.documentElement.querySelectorAll('link[rel=stylesheet]').length, + stringLen: text.length + }; + + // set base-url if applicable + if (initData.baseUrl && newDocument.head.getElementsByTagName('base').length === 0) { + const baseElement = newDocument.createElement('base'); + baseElement.href = initData.baseUrl; + newDocument.head.appendChild(baseElement); + } - const frame = getTarget(); - if (frame) { - frame.setAttribute('id', '_oldTarget'); - } + // apply default styles + const defaultStyles = newDocument.createElement('style'); + defaultStyles.id = '_defaultStyles'; + defaultStyles.innerHTML = initData.styles; + if (newDocument.head.hasChildNodes()) { + newDocument.head.insertBefore(defaultStyles, newDocument.head.firstChild); + } else { + newDocument.head.appendChild(defaultStyles); + } - // keep current scrollTop around and use later - const scrollTop = frame && frame.contentDocument && frame.contentDocument.body ? frame.contentDocument.body.scrollTop : 0; - - const newFrame = document.createElement('iframe'); - newFrame.setAttribute('id', '_target'); - newFrame.setAttribute('frameborder', '0'); - newFrame.setAttribute('sandbox', 'allow-scripts allow-forms allow-same-origin'); - newFrame.style.cssText = "margin: 0; overflow: hidden; position: absolute; width: 100%; height: 100%; display: none"; - document.body.appendChild(newFrame); - - // write new content onto iframe - newFrame.contentDocument.open('text/html', 'replace'); - newFrame.contentWindow.onbeforeunload = function (e) { - console.log('prevented webview navigation'); - return false; - }; + styleBody(newDocument.body); - newFrame.contentWindow.addEventListener('DOMContentLoaded', function (e) { - const contentDocument = e.target; - if (contentDocument.body) { + const frame = getTarget(); + if (frame) { + frame.setAttribute('id', '_oldTarget'); + } - // Workaround for https://github.com/Microsoft/vscode/issues/12865 - // check new scrollTop and reset if neccessary - if (scrollTop !== contentDocument.body.scrollTop) { - contentDocument.body.scrollTop = scrollTop; + // keep current scrollTop around and use later + const scrollTop = frame && frame.contentDocument && frame.contentDocument.body ? frame.contentDocument.body.scrollTop : 0; + + const newFrame = document.createElement('iframe'); + newFrame.setAttribute('id', '_target'); + newFrame.setAttribute('frameborder', '0'); + newFrame.setAttribute('sandbox', 'allow-scripts allow-forms allow-same-origin'); + newFrame.style.cssText = "margin: 0; overflow: hidden; position: absolute; width: 100%; height: 100%; display: none"; + document.body.appendChild(newFrame); + + // write new content onto iframe + newFrame.contentDocument.open('text/html', 'replace'); + newFrame.contentWindow.onbeforeunload = function (e) { + console.log('prevented webview navigation'); + return false; + }; + + newFrame.contentWindow.addEventListener('DOMContentLoaded', function (e) { + /** + * @type {any} + */ + const contentDocument = e.target; + if (contentDocument.body) { + + // Workaround for https://github.com/Microsoft/vscode/issues/12865 + // check new scrollTop and reset if neccessary + if (scrollTop !== contentDocument.body.scrollTop) { + contentDocument.body.scrollTop = scrollTop; + } + + // Bubble out link clicks + contentDocument.body.addEventListener('click', handleInnerClick); } - // Bubble out link clicks - contentDocument.body.addEventListener('click', handleInnerClick); - } + // Clean up old frames + [].forEach.call(document.body.getElementsByTagName('iframe'), function (frame) { + if (frame.id !== '_target') { + document.body.removeChild(frame); + } + }); - // Clean up old frames - [].forEach.call(document.body.getElementsByTagName('iframe'), function (frame) { - if (frame.id !== '_target') { - document.body.removeChild(frame); + const newFrame = getTarget(); + if (newFrame.contentDocument === contentDocument) { + newFrame.style.display = 'block'; } }); - const newFrame = document.getElementById('_target'); - if (newFrame.contentDocument === contentDocument) { - newFrame.style.display = 'block'; - } + // set DOCTYPE for newDocument explicitly as DOMParser.parseFromString strips it off + // and DOCTYPE is needed in the iframe to ensure that the user agent stylesheet is correctly overridden + newFrame.contentDocument.write(''); + newFrame.contentDocument.write(newDocument.documentElement.innerHTML); + newFrame.contentDocument.close(); + + ipcRenderer.sendToHost('did-set-content', stats); }); - // set DOCTYPE for newDocument explicitly as DOMParser.parseFromString strips it off - // and DOCTYPE is needed in the iframe to ensure that the user agent stylesheet is correctly overridden - newFrame.contentDocument.write(''); - newFrame.contentDocument.write(newDocument.documentElement.innerHTML); - newFrame.contentDocument.close(); + // Forward message to the embedded iframe + ipcRenderer.on('message', function (event, data) { + const target = getTarget(); + if (target) { + target.contentWindow.postMessage(data, document.location.origin); + } + }); - ipcRenderer.sendToHost('did-set-content', stats); - }); + // forward messages from the embedded iframe + window.onmessage = function (message) { + ipcRenderer.sendToHost(message.data.command, message.data.data); + }; - // Forward message to the embedded iframe - ipcRenderer.on('message', function (event, data) { - const target = getTarget(); - if (target) { - target.contentWindow.postMessage(data, document.location.origin); - } + // signal ready + ipcRenderer.sendToHost('webview-ready', process.pid); }); - - // forward messages from the embedded iframe - window.onmessage = function (message) { - ipcRenderer.sendToHost(message.data.command, message.data.data); - }; - - // signal ready - ipcRenderer.sendToHost('webview-ready', process.pid); -}); +}()); \ No newline at end of file From feb3c217a495aac395388f16a9f9a982714a1c60 Mon Sep 17 00:00:00 2001 From: rebornix Date: Fri, 5 May 2017 15:21:04 -0700 Subject: [PATCH 0240/2747] Fix #26084. Show Toggle Regex button when Find widget is invisible. --- .../contrib/find/browser/findOptionsWidget.ts | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/find/browser/findOptionsWidget.ts b/src/vs/editor/contrib/find/browser/findOptionsWidget.ts index f84b6f2fae0d8..05a5d1c9ffea9 100644 --- a/src/vs/editor/contrib/find/browser/findOptionsWidget.ts +++ b/src/vs/editor/contrib/find/browser/findOptionsWidget.ts @@ -11,7 +11,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference } from 'vs/editor/browser/editorBrowser'; import { FIND_IDS } from 'vs/editor/contrib/find/common/findModel'; import { FindReplaceState } from 'vs/editor/contrib/find/common/findState'; -import { CaseSensitiveCheckbox, WholeWordsCheckbox } from 'vs/base/browser/ui/findinput/findInputCheckboxes'; +import { CaseSensitiveCheckbox, WholeWordsCheckbox, RegexCheckbox } from 'vs/base/browser/ui/findinput/findInputCheckboxes'; import { RunOnceScheduler } from 'vs/base/common/async'; import { IThemeService, ITheme, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { inputActiveOptionBorder, editorWidgetBackground, contrastBorder, widgetShadow } from 'vs/platform/theme/common/colorRegistry'; @@ -25,6 +25,7 @@ export class FindOptionsWidget extends Widget implements IOverlayWidget { private _keybindingService: IKeybindingService; private _domNode: HTMLElement; + private regex: RegexCheckbox; private wholeWords: WholeWordsCheckbox; private caseSensitive: CaseSensitiveCheckbox; @@ -73,10 +74,26 @@ export class FindOptionsWidget extends Widget implements IOverlayWidget { })); this._domNode.appendChild(this.wholeWords.domNode); + this.regex = this._register(new RegexCheckbox({ + appendTitle: this._keybindingLabelFor(FIND_IDS.ToggleRegexCommand), + isChecked: this._state.isRegex, + onChange: (viaKeyboard) => { + this._state.change({ + isRegex: this.regex.checked + }, false); + }, + inputActiveOptionBorder: inputActiveOptionBorderColor + })); + this._domNode.appendChild(this.regex.domNode); + this._editor.addOverlayWidget(this); this._register(this._state.addChangeListener((e) => { let somethingChanged = false; + if (e.isRegex) { + this.regex.checked = this._state.isRegex; + somethingChanged = true; + } if (e.wholeWord) { this.wholeWords.checked = this._state.wholeWord; somethingChanged = true; @@ -167,6 +184,7 @@ export class FindOptionsWidget extends Widget implements IOverlayWidget { let inputStyles = { inputActiveOptionBorder: theme.getColor(inputActiveOptionBorder) }; this.caseSensitive.style(inputStyles); this.wholeWords.style(inputStyles); + this.regex.style(inputStyles); } } From f468a9921b405e24fb47537f2ff99110c0581785 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 5 May 2017 16:37:13 -0700 Subject: [PATCH 0241/2747] Fix terminal selection color for invalid links Fixes #26092 --- .../parts/terminal/electron-browser/terminalPanel.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 38fb99f450c64..ee895a95919a4 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -230,9 +230,11 @@ export class TerminalPanel extends Panel { let color = theme.getColor(colorId); let rgba = color.transparent(0.996); css += `.monaco-workbench .panel.integrated-terminal .xterm .xterm-color-${index} { color: ${color}; }` + - `.monaco-workbench .panel.integrated-terminal .xterm .xterm-color-${index}::selection { background-color: ${rgba}; }` + + `.monaco-workbench .panel.integrated-terminal .xterm .xterm-color-${index}::selection,` + + `.monaco-workbench .panel.integrated-terminal .xterm .xterm-color-${index} *::selection { background-color: ${rgba}; }` + `.monaco-workbench .panel.integrated-terminal .xterm .xterm-bg-color-${index} { background-color: ${color}; }` + - `.monaco-workbench .panel.integrated-terminal .xterm .xterm-bg-color-${index}::selection { color: ${color}; }`; + `.monaco-workbench .panel.integrated-terminal .xterm .xterm-bg-color-${index}::selection,` + + `.monaco-workbench .panel.integrated-terminal .xterm .xterm-bg-color-${index} *::selection { color: ${color}; }`; } }); const bgColor = theme.getColor(TERMINAL_BACKGROUND_COLOR); From 64cb10da169666566ae99e46d89afe6d1330df16 Mon Sep 17 00:00:00 2001 From: rebornix Date: Fri, 5 May 2017 18:03:23 -0700 Subject: [PATCH 0242/2747] Fix #5861. Take minimap into account --- src/vs/editor/contrib/find/browser/findWidget.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index bbd0bee81fafc..09d722afa8f0f 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -109,6 +109,7 @@ export class FindWidget extends Widget implements IOverlayWidget { let checkEditorWidth = () => { let editorWidth = this._codeEditor.getConfiguration().layoutInfo.width; + let minimapWidth = this._codeEditor.getConfiguration().layoutInfo.minimapWidth; let collapsedFindWidget = false; let reducedFindWidget = false; let narrowFindWidget = false; @@ -118,7 +119,7 @@ export class FindWidget extends Widget implements IOverlayWidget { if (WIDGET_FIXED_WIDTH + 28 >= editorWidth) { narrowFindWidget = true; } - if (WIDGET_FIXED_WIDTH + MAX_MATCHES_COUNT_WIDTH + 28 >= editorWidth) { + if (WIDGET_FIXED_WIDTH + MAX_MATCHES_COUNT_WIDTH + 28 + minimapWidth >= editorWidth) { reducedFindWidget = true; } dom.toggleClass(this._domNode, 'collapsed-find-widget', collapsedFindWidget); From 56b341c2e067340a6720fdda048bda801081c5f0 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Sat, 6 May 2017 09:29:04 +0200 Subject: [PATCH 0243/2747] Windows in fullscreen mode does not restore to correct monitor (fixes #25400) --- src/vs/code/electron-main/window.ts | 32 ++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 610420ef66886..1421465ce4c80 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -30,6 +30,7 @@ export interface IWindowState { x?: number; y?: number; mode?: WindowMode; + display?: number; } export interface IWindowCreationOptions { @@ -599,9 +600,15 @@ export class VSCodeWindow { } public serializeWindowState(): IWindowState { + + // fullscreen gets special treatment if (this.win.isFullScreen()) { + const display = screen.getDisplayMatching(this.getBounds()); + return { mode: WindowMode.Fullscreen, + display: display ? display.id : void 0, + // still carry over window dimensions from previous sessions! width: this.windowState.width, height: this.windowState.height, @@ -631,13 +638,12 @@ export class VSCodeWindow { // only consider non-minimized window states if (mode === WindowMode.Normal || mode === WindowMode.Maximized) { - const pos = this.win.getPosition(); - const size = this.win.getSize(); + const bounds = this.getBounds(); - state.x = pos[0]; - state.y = pos[1]; - state.width = size[0]; - state.height = size[1]; + state.x = bounds.x; + state.y = bounds.y; + state.width = bounds.width; + state.height = bounds.height; } return state; @@ -713,7 +719,19 @@ export class VSCodeWindow { return state; } - // Multi Monitor: be less strict because metrics can be crazy + // Multi Montior (fullscreen): try to find the previously used display + if (state.display && state.mode === WindowMode.Fullscreen) { + const display = displays.filter(d => d.id === state.display)[0]; + if (display && display.bounds && typeof display.bounds.x === 'number' && typeof display.bounds.y === 'number') { + const defaults = defaultWindowState(WindowMode.Fullscreen); // make sure we have good values when the user restores the window + defaults.x = display.bounds.x; // carefull to use displays x/y position so that the window ends up on the correct monitor + defaults.y = display.bounds.y; + + return defaults; + } + } + + // Multi Monitor (non-fullscreen): be less strict because metrics can be crazy const bounds = { x: state.x, y: state.y, width: state.width, height: state.height }; const display = screen.getDisplayMatching(bounds); if (display && display.bounds.x + display.bounds.width > bounds.x && display.bounds.y + display.bounds.height > bounds.y) { From c4ccce9229b6f42644bcfd9fa8b7de5362ffd412 Mon Sep 17 00:00:00 2001 From: Maik Riechert Date: Sat, 6 May 2017 16:23:50 +0100 Subject: [PATCH 0244/2747] handle git branch delete error ("not fully merged") --- extensions/git/src/commands.ts | 59 +++++++++++++++++++++------------- extensions/git/src/git.ts | 9 ++++-- extensions/git/src/model.ts | 4 +-- 3 files changed, 45 insertions(+), 27 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 15532bfc28b71..e8c155102a3d9 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -62,21 +62,18 @@ class CheckoutRemoteHeadItem extends CheckoutItem { class BranchDeleteItem implements QuickPickItem { - protected get shortCommit(): string { return (this.ref.commit || '').substr(0, 8); } - protected get treeish(): string | undefined { return this.ref.name; } - get label(): string { return this.ref.name || this.shortCommit; } + private get shortCommit(): string { return (this.ref.commit || '').substr(0, 8); } + get branchName(): string | undefined { return this.ref.name; } + get label(): string { return this.branchName || ''; } get description(): string { return this.shortCommit; } - constructor(protected ref: Ref) { } - - async run(model: Model): Promise { - const ref = this.treeish; + constructor(private ref: Ref) { } - if (!ref) { + async run(model: Model, force?: boolean): Promise { + if (!this.branchName) { return; } - - await model.deleteBranch(ref); + await model.deleteBranch(this.branchName, force); } } @@ -720,22 +717,40 @@ export class CommandCenter { } @command('git.deleteBranch') - async deleteBranch(branchName: string): Promise { - if (typeof branchName === 'string') { - return await this.model.deleteBranch(branchName); - } - const currentHead = this.model.HEAD && this.model.HEAD.name; - const heads = this.model.refs.filter(ref => ref.type === RefType.Head && ref.name !== currentHead) - .map(ref => new BranchDeleteItem(ref)); + async deleteBranch(name: string, force?: boolean): Promise { + let run: (force?: boolean) => Promise; + if (typeof name === 'string') { + run = force => this.model.deleteBranch(name, force); + } else { + const currentHead = this.model.HEAD && this.model.HEAD.name; + const heads = this.model.refs.filter(ref => ref.type === RefType.Head && ref.name !== currentHead) + .map(ref => new BranchDeleteItem(ref)); - const placeHolder = 'Select a branch to delete'; - const choice = await window.showQuickPick(heads, { placeHolder }); + const placeHolder = 'Select a branch to delete'; + const choice = await window.showQuickPick(heads, { placeHolder }); - if (!choice) { - return; + if (!choice) { + return; + } + name = choice.branchName || ''; + run = force => choice.run(this.model, force); } - await choice.run(this.model); + try { + await run(force); + } catch (err) { + if (err.gitErrorCode !== GitErrorCodes.BranchNotFullyMerged) { + throw err; + } + + const message = localize('confirm force delete branch', "The branch '{0}' is not fully merged. Delete anyway?", name); + const yes = localize('delete branch', "Delete Branch"); + const pick = await window.showWarningMessage(message, yes); + + if (pick === yes) { + await run(true); + } + } } @command('git.pull') diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index a242d03465420..faad58452b6cf 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -273,7 +273,8 @@ export const GitErrorCodes = { CantCreatePipe: 'CantCreatePipe', CantAccessRemote: 'CantAccessRemote', RepositoryNotFound: 'RepositoryNotFound', - RepositoryIsLocked: 'RepositoryIsLocked' + RepositoryIsLocked: 'RepositoryIsLocked', + BranchNotFullyMerged: 'BranchNotFullyMerged' }; function getGitErrorCode(stderr: string): string | undefined { @@ -291,6 +292,8 @@ function getGitErrorCode(stderr: string): string | undefined { return GitErrorCodes.RepositoryNotFound; } else if (/unable to access/.test(stderr)) { return GitErrorCodes.CantAccessRemote; + } else if (/branch '.+' is not fully merged/.test(stderr)) { + return GitErrorCodes.BranchNotFullyMerged; } return void 0; @@ -650,8 +653,8 @@ export class Repository { await this.run(args); } - async deleteBranch(name: string): Promise { - const args = ['branch', '-d', name]; + async deleteBranch(name: string, force?: boolean): Promise { + const args = ['branch', force ? '-D' : '-d', name]; await this.run(args); } diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index 0446a3c5e093f..6dccfd19984ad 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -455,8 +455,8 @@ export class Model implements Disposable { await this.run(Operation.Branch, () => this.repository.branch(name, true)); } - async deleteBranch(name: string): Promise { - await this.run(Operation.DeleteBranch, () => this.repository.deleteBranch(name)); + async deleteBranch(name: string, force?: boolean): Promise { + await this.run(Operation.DeleteBranch, () => this.repository.deleteBranch(name, force)); } async checkout(treeish: string): Promise { From 1c7f33e4758ff280127087272805b61c80948579 Mon Sep 17 00:00:00 2001 From: Maik Riechert Date: Sat, 6 May 2017 16:55:38 +0100 Subject: [PATCH 0245/2747] localize --- extensions/git/src/commands.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index e8c155102a3d9..3ede435fff31c 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -726,13 +726,13 @@ export class CommandCenter { const heads = this.model.refs.filter(ref => ref.type === RefType.Head && ref.name !== currentHead) .map(ref => new BranchDeleteItem(ref)); - const placeHolder = 'Select a branch to delete'; + const placeHolder = localize('select branch to delete', 'Select a branch to delete'); const choice = await window.showQuickPick(heads, { placeHolder }); - if (!choice) { + if (!choice || !choice.branchName) { return; } - name = choice.branchName || ''; + name = choice.branchName; run = force => choice.run(this.model, force); } From 31885fd3742b76f65a181400bba40212f69faef9 Mon Sep 17 00:00:00 2001 From: Josh Lockhart Date: Sun, 7 May 2017 10:05:34 -0400 Subject: [PATCH 0246/2747] Let shellExecutable respect current platform --- .../php/src/features/validationProvider.ts | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/extensions/php/src/features/validationProvider.ts b/extensions/php/src/features/validationProvider.ts index ea534001c6c44..61f792734c286 100644 --- a/extensions/php/src/features/validationProvider.ts +++ b/extensions/php/src/features/validationProvider.ts @@ -12,6 +12,7 @@ import * as vscode from 'vscode'; import { ThrottledDelayer } from './utils/async'; import * as nls from 'vscode-nls'; + let localize = nls.loadMessageBundle(); export class LineDecoder { @@ -97,8 +98,9 @@ export default class PHPValidationProvider { private diagnosticCollection: vscode.DiagnosticCollection; private delayers: { [key: string]: ThrottledDelayer }; + private platform: string; private runInShell: boolean = false; - private shellExecutable: string = 'C:\\Windows\\sysnative\\bash.exe'; + private shellExecutable: string; private shellArgs: string[] = ['-c']; constructor(private workspaceStore: vscode.Memento) { @@ -106,6 +108,7 @@ export default class PHPValidationProvider { this.validationEnabled = true; this.trigger = RunTrigger.onSave; this.pauseValidation = false; + this.platform = process.platform; } public activate(subscriptions: vscode.Disposable[]) { @@ -147,6 +150,11 @@ export default class PHPValidationProvider { let shellSettings = section.get('validate.runInShell'); if (typeof(shellSettings) === 'boolean') { this.runInShell = shellSettings; + if (this.platform.toLowerCase() === 'win32') { + this.shellExecutable = 'C:\\Windows\\sysnative\\bash.exe'; + } else { + this.shellExecutable = process.env.SHELL || '/bin/bash'; + } } else if (typeof(shellSettings) === 'object') { this.runInShell = true; if (shellSettings.shellExecutable && typeof(shellSettings.shellExecutable) === 'string') { @@ -277,10 +285,12 @@ export default class PHPValidationProvider { // Shell args let executableArgs = args.slice(0); - // Transform Windows file path to Linux file path - let windowsPath = executableArgs.pop(); - let linuxPath = windowsPath.trim().replace(/^([a-zA-Z]):\\/, '/mnt/$1/').replace(/\\/g, '/'); - executableArgs.push(linuxPath); + // If win32 and bash.exe, transform Windows file path to Linux file path + if (this.platform === 'win32' && executable.indexOf('bash.exe') !== -1) { + let windowsPath = executableArgs.pop(); + let linuxPath = windowsPath.trim().replace(/^([a-zA-Z]):\\/, '/mnt/$1/').replace(/\\/g, '/'); + executableArgs.push(linuxPath); + } // Finalize executable args args = this.shellArgs.concat(['"', executableInShell, executableArgs.join(' '), '"']); From 2c03aedfa9491b926feeae4e6205712f7c8fe317 Mon Sep 17 00:00:00 2001 From: Josh Lockhart Date: Sun, 7 May 2017 10:12:26 -0400 Subject: [PATCH 0247/2747] Update PHP validator NLS labels --- extensions/php/package.json | 10 +++++----- extensions/php/package.nls.json | 7 +++++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/extensions/php/package.json b/extensions/php/package.json index 616e0ef5504e2..0a4575b30e840 100644 --- a/extensions/php/package.json +++ b/extensions/php/package.json @@ -93,17 +93,17 @@ "object" ], "default": false, - "description": "Do you want to validate your code with a shell?", + "description": "%configuration.validate.runInShell%", "properties": { "shellArgs": { "type": "array", - "default": ["-c"], - "description": "Arguments to pass to the shell" + "default": [], + "description": "%configuration.validate.shellArgs%" }, "shellExecutable": { "type": "string", - "default": "C:\\Windows\\sysnative\\bash.exe", - "description": "The shell executable path" + "default": "", + "description": "%configuration.validate.shellExecutable%" } } } diff --git a/extensions/php/package.nls.json b/extensions/php/package.nls.json index 85edb25a9bb95..e4b0f39366390 100644 --- a/extensions/php/package.nls.json +++ b/extensions/php/package.nls.json @@ -5,5 +5,8 @@ "configuration.validate.run": "Whether the linter is run on save or on type.", "configuration.title": "PHP", "commands.categroy.php": "PHP", - "command.untrustValidationExecutable": "Disallow PHP validation executable (defined as workspace setting)" -} \ No newline at end of file + "command.untrustValidationExecutable": "Disallow PHP validation executable (defined as workspace setting)", + "configuration.validate.runInShell": "Run validation in a shell", + "configuration.validate.shellArgs": "Default shell arguments", + "configuration.validate.shellExecutable": "Shell executable path" +} From 0fb71c07942f993bbd570f6c55abc66a912e5427 Mon Sep 17 00:00:00 2001 From: Sebastian Zaha Date: Mon, 8 May 2017 07:54:37 +0200 Subject: [PATCH 0248/2747] Added an option to disable the mnemonics in the main menu (#22669) * fixes #17962 * :lipstick: --- src/vs/code/electron-main/menus.ts | 121 ++++++++++-------- src/vs/platform/windows/common/windows.ts | 1 + .../electron-browser/main.contribution.ts | 5 + 3 files changed, 73 insertions(+), 54 deletions(-) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 52428d389ee51..67092963e6c4b 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -37,6 +37,9 @@ interface IExtensionViewlet { } interface IConfiguration extends IFilesConfiguration { + window: { + enableMenuBarMnemonics: boolean; + }; workbench: { sideBar: { location: 'left' | 'right'; @@ -153,6 +156,7 @@ export class VSCodeMenu { private currentSidebarLocation: 'left' | 'right'; private currentStatusbarVisible: boolean; private currentActivityBarVisible: boolean; + private currentEnableMenuBarMnemonics: boolean; private isQuitting: boolean; private appMenuInstalled: boolean; @@ -252,6 +256,15 @@ export class VSCodeMenu { updateMenu = true; } + let newEnableMenuBarMnemonics = config && config.window && config.window.enableMenuBarMnemonics; + if (typeof newEnableMenuBarMnemonics !== 'boolean') { + newEnableMenuBarMnemonics = true; + } + if (newEnableMenuBarMnemonics !== this.currentEnableMenuBarMnemonics) { + this.currentEnableMenuBarMnemonics = newEnableMenuBarMnemonics; + updateMenu = true; + } + if (handleMenu && updateMenu) { this.updateMenu(); } @@ -298,32 +311,32 @@ export class VSCodeMenu { // File const fileMenu = new Menu(); - const fileMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mFile', comment: ['&& denotes a mnemonic'] }, "&&File")), submenu: fileMenu }); + const fileMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mFile', comment: ['&& denotes a mnemonic'] }, "&&File")), submenu: fileMenu }); this.setFileMenu(fileMenu); // Edit const editMenu = new Menu(); - const editMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mEdit', comment: ['&& denotes a mnemonic'] }, "&&Edit")), submenu: editMenu }); + const editMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mEdit', comment: ['&& denotes a mnemonic'] }, "&&Edit")), submenu: editMenu }); this.setEditMenu(editMenu); // Selection const selectionMenu = new Menu(); - const selectionMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mSelection', comment: ['&& denotes a mnemonic'] }, "&&Selection")), submenu: selectionMenu }); + const selectionMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mSelection', comment: ['&& denotes a mnemonic'] }, "&&Selection")), submenu: selectionMenu }); this.setSelectionMenu(selectionMenu); // View const viewMenu = new Menu(); - const viewMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mView', comment: ['&& denotes a mnemonic'] }, "&&View")), submenu: viewMenu }); + const viewMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mView', comment: ['&& denotes a mnemonic'] }, "&&View")), submenu: viewMenu }); this.setViewMenu(viewMenu); // Goto const gotoMenu = new Menu(); - const gotoMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mGoto', comment: ['&& denotes a mnemonic'] }, "&&Go")), submenu: gotoMenu }); + const gotoMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mGoto', comment: ['&& denotes a mnemonic'] }, "&&Go")), submenu: gotoMenu }); this.setGotoMenu(gotoMenu); // Debug const debugMenu = new Menu(); - const debugMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mDebug', comment: ['&& denotes a mnemonic'] }, "&&Debug")), submenu: debugMenu }); + const debugMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mDebug', comment: ['&& denotes a mnemonic'] }, "&&Debug")), submenu: debugMenu }); this.setDebugMenu(debugMenu); @@ -331,13 +344,13 @@ export class VSCodeMenu { let macWindowMenuItem: Electron.MenuItem; if (isMacintosh) { const windowMenu = new Menu(); - macWindowMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize('mWindow', "Window")), submenu: windowMenu, role: 'window' }); + macWindowMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize('mWindow', "Window")), submenu: windowMenu, role: 'window' }); this.setMacWindowMenu(windowMenu); } // Help const helpMenu = new Menu(); - const helpMenuItem = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'mHelp', comment: ['&& denotes a mnemonic'] }, "&&Help")), submenu: helpMenu, role: 'help' }); + const helpMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mHelp', comment: ['&& denotes a mnemonic'] }, "&&Help")), submenu: helpMenu, role: 'help' }); this.setHelpMenu(helpMenu); // Menu Structure @@ -365,7 +378,7 @@ export class VSCodeMenu { this.appMenuInstalled = true; const dockMenu = new Menu(); - dockMenu.append(new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miNewWindow', comment: ['&& denotes a mnemonic'] }, "New &&Window")), click: () => this.windowsService.openNewWindow(OpenContext.DOCK) })); + dockMenu.append(new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miNewWindow', comment: ['&& denotes a mnemonic'] }, "New &&Window")), click: () => this.windowsService.openNewWindow(OpenContext.DOCK) })); app.dock.setMenu(dockMenu); } @@ -401,42 +414,42 @@ export class VSCodeMenu { let newFile: Electron.MenuItem; if (hasNoWindows) { - newFile = new MenuItem(this.likeAction('workbench.action.files.newUntitledFile', { label: mnemonicLabel(nls.localize({ key: 'miNewFile', comment: ['&& denotes a mnemonic'] }, "&&New File")), click: () => this.windowsService.openNewWindow(OpenContext.MENU) })); + newFile = new MenuItem(this.likeAction('workbench.action.files.newUntitledFile', { label: this.mnemonicLabel(nls.localize({ key: 'miNewFile', comment: ['&& denotes a mnemonic'] }, "&&New File")), click: () => this.windowsService.openNewWindow(OpenContext.MENU) })); } else { newFile = this.createMenuItem(nls.localize({ key: 'miNewFile', comment: ['&& denotes a mnemonic'] }, "&&New File"), 'workbench.action.files.newUntitledFile'); } - const open = new MenuItem(this.likeAction('workbench.action.files.openFileFolder', { label: mnemonicLabel(nls.localize({ key: 'miOpen', comment: ['&& denotes a mnemonic'] }, "&&Open...")), click: (menuItem, win, event) => this.windowsService.openFileFolderPicker(this.isOptionClick(event), { from: telemetryFrom }) })); - const openFolder = new MenuItem(this.likeAction('workbench.action.files.openFolder', { label: mnemonicLabel(nls.localize({ key: 'miOpenFolder', comment: ['&& denotes a mnemonic'] }, "Open &&Folder...")), click: (menuItem, win, event) => this.windowsService.openFolderPicker(this.isOptionClick(event), undefined, { from: telemetryFrom }) })); + const open = new MenuItem(this.likeAction('workbench.action.files.openFileFolder', { label: this.mnemonicLabel(nls.localize({ key: 'miOpen', comment: ['&& denotes a mnemonic'] }, "&&Open...")), click: (menuItem, win, event) => this.windowsService.openFileFolderPicker(this.isOptionClick(event), { from: telemetryFrom }) })); + const openFolder = new MenuItem(this.likeAction('workbench.action.files.openFolder', { label: this.mnemonicLabel(nls.localize({ key: 'miOpenFolder', comment: ['&& denotes a mnemonic'] }, "Open &&Folder...")), click: (menuItem, win, event) => this.windowsService.openFolderPicker(this.isOptionClick(event), undefined, { from: telemetryFrom }) })); let openFile: Electron.MenuItem; if (hasNoWindows) { - openFile = new MenuItem(this.likeAction('workbench.action.files.openFile', { label: mnemonicLabel(nls.localize({ key: 'miOpenFile', comment: ['&& denotes a mnemonic'] }, "&&Open File...")), click: (menuItem, win, event) => this.windowsService.openFilePicker(this.isOptionClick(event), undefined, undefined, { from: telemetryFrom }) })); + openFile = new MenuItem(this.likeAction('workbench.action.files.openFile', { label: this.mnemonicLabel(nls.localize({ key: 'miOpenFile', comment: ['&& denotes a mnemonic'] }, "&&Open File...")), click: (menuItem, win, event) => this.windowsService.openFilePicker(this.isOptionClick(event), undefined, undefined, { from: telemetryFrom }) })); } else { openFile = this.createMenuItem(nls.localize({ key: 'miOpenFile', comment: ['&& denotes a mnemonic'] }, "&&Open File..."), ['workbench.action.files.openFile', 'workbench.action.files.openFileInNewWindow']); } const openRecentMenu = new Menu(); this.setOpenRecentMenu(openRecentMenu); - const openRecent = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miOpenRecent', comment: ['&& denotes a mnemonic'] }, "Open &&Recent")), submenu: openRecentMenu, enabled: openRecentMenu.items.length > 0 }); + const openRecent = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miOpenRecent', comment: ['&& denotes a mnemonic'] }, "Open &&Recent")), submenu: openRecentMenu, enabled: openRecentMenu.items.length > 0 }); const saveFile = this.createMenuItem(nls.localize({ key: 'miSave', comment: ['&& denotes a mnemonic'] }, "&&Save"), 'workbench.action.files.save', this.windowsService.getWindowCount() > 0); const saveFileAs = this.createMenuItem(nls.localize({ key: 'miSaveAs', comment: ['&& denotes a mnemonic'] }, "Save &&As..."), 'workbench.action.files.saveAs', this.windowsService.getWindowCount() > 0); const saveAllFiles = this.createMenuItem(nls.localize({ key: 'miSaveAll', comment: ['&& denotes a mnemonic'] }, "Save A&&ll"), 'workbench.action.files.saveAll', this.windowsService.getWindowCount() > 0); const autoSaveEnabled = [AutoSaveConfiguration.AFTER_DELAY, AutoSaveConfiguration.ON_FOCUS_CHANGE, AutoSaveConfiguration.ON_WINDOW_CHANGE].some(s => this.currentAutoSaveSetting === s); - const autoSave = new MenuItem(this.likeAction('vscode.toggleAutoSave', { label: mnemonicLabel(nls.localize('miAutoSave', "Auto Save")), type: 'checkbox', checked: autoSaveEnabled, enabled: this.windowsService.getWindowCount() > 0, click: () => this.windowsService.sendToFocused('vscode.toggleAutoSave') }, false)); + const autoSave = new MenuItem(this.likeAction('vscode.toggleAutoSave', { label: this.mnemonicLabel(nls.localize('miAutoSave', "Auto Save")), type: 'checkbox', checked: autoSaveEnabled, enabled: this.windowsService.getWindowCount() > 0, click: () => this.windowsService.sendToFocused('vscode.toggleAutoSave') }, false)); const preferences = this.getPreferencesMenu(); - const newWindow = new MenuItem(this.likeAction('workbench.action.newWindow', { label: mnemonicLabel(nls.localize({ key: 'miNewWindow', comment: ['&& denotes a mnemonic'] }, "New &&Window")), click: () => this.windowsService.openNewWindow(OpenContext.MENU) })); + const newWindow = new MenuItem(this.likeAction('workbench.action.newWindow', { label: this.mnemonicLabel(nls.localize({ key: 'miNewWindow', comment: ['&& denotes a mnemonic'] }, "New &&Window")), click: () => this.windowsService.openNewWindow(OpenContext.MENU) })); const revertFile = this.createMenuItem(nls.localize({ key: 'miRevert', comment: ['&& denotes a mnemonic'] }, "Re&&vert File"), 'workbench.action.files.revert', this.windowsService.getWindowCount() > 0); - const closeWindow = new MenuItem(this.likeAction('workbench.action.closeWindow', { label: mnemonicLabel(nls.localize({ key: 'miCloseWindow', comment: ['&& denotes a mnemonic'] }, "Clos&&e Window")), click: () => this.windowsService.getLastActiveWindow().win.close(), enabled: this.windowsService.getWindowCount() > 0 })); + const closeWindow = new MenuItem(this.likeAction('workbench.action.closeWindow', { label: this.mnemonicLabel(nls.localize({ key: 'miCloseWindow', comment: ['&& denotes a mnemonic'] }, "Clos&&e Window")), click: () => this.windowsService.getLastActiveWindow().win.close(), enabled: this.windowsService.getWindowCount() > 0 })); const closeFolder = this.createMenuItem(nls.localize({ key: 'miCloseFolder', comment: ['&& denotes a mnemonic'] }, "Close &&Folder"), 'workbench.action.closeFolder'); const closeEditor = this.createMenuItem(nls.localize({ key: 'miCloseEditor', comment: ['&& denotes a mnemonic'] }, "&&Close Editor"), 'workbench.action.closeActiveEditor'); - const exit = new MenuItem(this.likeAction('workbench.action.quit', { label: mnemonicLabel(nls.localize({ key: 'miExit', comment: ['&& denotes a mnemonic'] }, "E&&xit")), click: () => this.windowsService.quit() })); + const exit = new MenuItem(this.likeAction('workbench.action.quit', { label: this.mnemonicLabel(nls.localize({ key: 'miExit', comment: ['&& denotes a mnemonic'] }, "E&&xit")), click: () => this.windowsService.quit() })); arrays.coalesce([ newFile, @@ -483,7 +496,7 @@ export class VSCodeMenu { preferencesMenu.append(colorThemeSelection); preferencesMenu.append(iconThemeSelection); - return new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miPreferences', comment: ['&& denotes a mnemonic'] }, "&&Preferences")), submenu: preferencesMenu }); + return new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miPreferences', comment: ['&& denotes a mnemonic'] }, "&&Preferences")), submenu: preferencesMenu }); } private setOpenRecentMenu(openRecentMenu: Electron.Menu): void { @@ -522,7 +535,7 @@ export class VSCodeMenu { } return new MenuItem(this.likeAction(commandId, { - label: unMnemonicLabel(label), click: (menuItem, win, event) => { + label: this.unmnemonicLabel(label), click: (menuItem, win, event) => { const openInNewWindow = this.isOptionClick(event); const success = !!this.windowsService.open({ context: OpenContext.MENU, cli: this.environmentService.args, pathsToOpen: [path], forceNewWindow: openInNewWindow }); if (!success) { @@ -538,7 +551,7 @@ export class VSCodeMenu { private createRoleMenuItem(label: string, commandId: string, role: Electron.MenuItemRole): Electron.MenuItem { const options: Electron.MenuItemOptions = { - label: mnemonicLabel(label), + label: this.mnemonicLabel(label), role, enabled: true }; @@ -659,12 +672,12 @@ export class VSCodeMenu { additionalViewletsMenu.append(this.createMenuItem(viewlet.label, viewlet.id)); }); - additionalViewlets = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miAdditionalViews', comment: ['&& denotes a mnemonic'] }, "Additional &&Views")), submenu: additionalViewletsMenu, enabled: true }); + additionalViewlets = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miAdditionalViews', comment: ['&& denotes a mnemonic'] }, "Additional &&Views")), submenu: additionalViewletsMenu, enabled: true }); } const commands = this.createMenuItem(nls.localize({ key: 'miCommandPalette', comment: ['&& denotes a mnemonic'] }, "&&Command Palette..."), 'workbench.action.showCommands'); - const fullscreen = new MenuItem(this.withKeybinding('workbench.action.toggleFullScreen', { label: mnemonicLabel(nls.localize({ key: 'miToggleFullScreen', comment: ['&& denotes a mnemonic'] }, "Toggle &&Full Screen")), click: () => this.windowsService.getLastActiveWindow().toggleFullScreen(), enabled: this.windowsService.getWindowCount() > 0 })); + const fullscreen = new MenuItem(this.withKeybinding('workbench.action.toggleFullScreen', { label: this.mnemonicLabel(nls.localize({ key: 'miToggleFullScreen', comment: ['&& denotes a mnemonic'] }, "Toggle &&Full Screen")), click: () => this.windowsService.getLastActiveWindow().toggleFullScreen(), enabled: this.windowsService.getWindowCount() > 0 })); const toggleZenMode = this.createMenuItem(nls.localize('miToggleZenMode', "Toggle Zen Mode"), 'workbench.action.toggleZenMode', this.windowsService.getWindowCount() > 0); const toggleMenuBar = this.createMenuItem(nls.localize({ key: 'miToggleMenuBar', comment: ['&& denotes a mnemonic'] }, "Toggle Menu &&Bar"), 'workbench.action.toggleMenuBar'); const splitEditor = this.createMenuItem(nls.localize({ key: 'miSplitEditor', comment: ['&& denotes a mnemonic'] }, "Split &&Editor"), 'workbench.action.splitEditor'); @@ -763,7 +776,7 @@ export class VSCodeMenu { previousEditorInGroup ].forEach(item => switchEditorMenu.append(item)); - const switchEditor = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miSwitchEditor', comment: ['&& denotes a mnemonic'] }, "Switch &&Editor")), submenu: switchEditorMenu, enabled: true }); + const switchEditor = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miSwitchEditor', comment: ['&& denotes a mnemonic'] }, "Switch &&Editor")), submenu: switchEditorMenu, enabled: true }); const switchGroupMenu = new Menu(); @@ -782,7 +795,7 @@ export class VSCodeMenu { previousGroup ].forEach(item => switchGroupMenu.append(item)); - const switchGroup = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miSwitchGroup', comment: ['&& denotes a mnemonic'] }, "Switch &&Group")), submenu: switchGroupMenu, enabled: true }); + const switchGroup = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miSwitchGroup', comment: ['&& denotes a mnemonic'] }, "Switch &&Group")), submenu: switchGroupMenu, enabled: true }); const gotoFile = this.createMenuItem(nls.localize({ key: 'miGotoFile', comment: ['&& denotes a mnemonic'] }, "Go to &&File..."), 'workbench.action.quickOpen'); const gotoSymbolInFile = this.createMenuItem(nls.localize({ key: 'miGotoSymbolInFile', comment: ['&& denotes a mnemonic'] }, "Go to &&Symbol in File..."), 'workbench.action.gotoSymbol'); @@ -824,7 +837,7 @@ export class VSCodeMenu { breakpointsMenu.append(this.createMenuItem(nls.localize({ key: 'miConditionalBreakpoint', comment: ['&& denotes a mnemonic'] }, "&&Conditional Breakpoint..."), 'editor.debug.action.conditionalBreakpoint')); breakpointsMenu.append(this.createMenuItem(nls.localize({ key: 'miColumnBreakpoint', comment: ['&& denotes a mnemonic'] }, "C&&olumn Breakpoint"), 'editor.debug.action.toggleColumnBreakpoint')); breakpointsMenu.append(this.createMenuItem(nls.localize({ key: 'miFunctionBreakpoint', comment: ['&& denotes a mnemonic'] }, "&&Function Breakpoint..."), 'workbench.debug.viewlet.action.addFunctionBreakpointAction')); - const newBreakpoints = new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miNewBreakpoint', comment: ['&& denotes a mnemonic'] }, "&&New Breakpoint")), submenu: breakpointsMenu }); + const newBreakpoints = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miNewBreakpoint', comment: ['&& denotes a mnemonic'] }, "&&New Breakpoint")), submenu: breakpointsMenu }); const disableAllBreakpoints = this.createMenuItem(nls.localize({ key: 'miDisableAllBreakpoints', comment: ['&& denotes a mnemonic'] }, "Disable A&&ll Breakpoints"), 'workbench.debug.viewlet.action.disableAllBreakpoints'); const removeAllBreakpoints = this.createMenuItem(nls.localize({ key: 'miRemoveAllBreakpoints', comment: ['&& denotes a mnemonic'] }, "Remove &&All Breakpoints"), 'workbench.debug.viewlet.action.removeAllBreakpoints'); @@ -880,13 +893,13 @@ export class VSCodeMenu { private setHelpMenu(helpMenu: Electron.Menu): void { const toggleDevToolsItem = new MenuItem(this.likeAction('workbench.action.toggleDevTools', { - label: mnemonicLabel(nls.localize({ key: 'miToggleDevTools', comment: ['&& denotes a mnemonic'] }, "&&Toggle Developer Tools")), + label: this.mnemonicLabel(nls.localize({ key: 'miToggleDevTools', comment: ['&& denotes a mnemonic'] }, "&&Toggle Developer Tools")), click: () => this.toggleDevTools(), enabled: (this.windowsService.getWindowCount() > 0) })); const showAccessibilityOptions = new MenuItem(this.likeAction('accessibilityOptions', { - label: mnemonicLabel(nls.localize({ key: 'miAccessibilityOptions', comment: ['&& denotes a mnemonic'] }, "Accessibility &&Options")), + label: this.mnemonicLabel(nls.localize({ key: 'miAccessibilityOptions', comment: ['&& denotes a mnemonic'] }, "Accessibility &&Options")), accelerator: null, click: () => { this.windowsService.openAccessibilityOptions(); @@ -900,25 +913,25 @@ export class VSCodeMenu { if (this.windowsService.getWindowCount() > 0) { reportIssuesItem = this.createMenuItem(label, 'workbench.action.reportIssues'); } else { - reportIssuesItem = new MenuItem({ label: mnemonicLabel(label), click: () => this.openUrl(product.reportIssueUrl, 'openReportIssues') }); + reportIssuesItem = new MenuItem({ label: this.mnemonicLabel(label), click: () => this.openUrl(product.reportIssueUrl, 'openReportIssues') }); } } const keyboardShortcutsUrl = isLinux ? product.keyboardShortcutsUrlLinux : isMacintosh ? product.keyboardShortcutsUrlMac : product.keyboardShortcutsUrlWin; arrays.coalesce([ - new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miWelcome', comment: ['&& denotes a mnemonic'] }, "&&Welcome")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.showWelcomePage') }), - product.documentationUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miDocumentation', comment: ['&& denotes a mnemonic'] }, "&&Documentation")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.openDocumentationUrl') }) : null, - product.releaseNotesUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miReleaseNotes', comment: ['&& denotes a mnemonic'] }, "&&Release Notes")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'update.showCurrentReleaseNotes') }) : null, + new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miWelcome', comment: ['&& denotes a mnemonic'] }, "&&Welcome")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.showWelcomePage') }), + product.documentationUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miDocumentation', comment: ['&& denotes a mnemonic'] }, "&&Documentation")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.openDocumentationUrl') }) : null, + product.releaseNotesUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miReleaseNotes', comment: ['&& denotes a mnemonic'] }, "&&Release Notes")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'update.showCurrentReleaseNotes') }) : null, __separator__(), - keyboardShortcutsUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miKeyboardShortcuts', comment: ['&& denotes a mnemonic'] }, "&&Keyboard Shortcuts Reference")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.keybindingsReference') }) : null, - product.introductoryVideosUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miIntroductoryVideos', comment: ['&& denotes a mnemonic'] }, "Introductory &&Videos")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.openIntroductoryVideosUrl') }) : null, + keyboardShortcutsUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miKeyboardShortcuts', comment: ['&& denotes a mnemonic'] }, "&&Keyboard Shortcuts Reference")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.keybindingsReference') }) : null, + product.introductoryVideosUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miIntroductoryVideos', comment: ['&& denotes a mnemonic'] }, "Introductory &&Videos")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.openIntroductoryVideosUrl') }) : null, (product.introductoryVideosUrl || keyboardShortcutsUrl) ? __separator__() : null, - product.twitterUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miTwitter', comment: ['&& denotes a mnemonic'] }, "&&Join us on Twitter")), click: () => this.openUrl(product.twitterUrl, 'openTwitterUrl') }) : null, - product.requestFeatureUrl ? new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miUserVoice', comment: ['&& denotes a mnemonic'] }, "&&Search Feature Requests")), click: () => this.openUrl(product.requestFeatureUrl, 'openUserVoiceUrl') }) : null, + product.twitterUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miTwitter', comment: ['&& denotes a mnemonic'] }, "&&Join us on Twitter")), click: () => this.openUrl(product.twitterUrl, 'openTwitterUrl') }) : null, + product.requestFeatureUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miUserVoice', comment: ['&& denotes a mnemonic'] }, "&&Search Feature Requests")), click: () => this.openUrl(product.requestFeatureUrl, 'openUserVoiceUrl') }) : null, reportIssuesItem, (product.twitterUrl || product.requestFeatureUrl || product.reportIssueUrl) ? __separator__() : null, product.licenseUrl ? new MenuItem({ - label: mnemonicLabel(nls.localize({ key: 'miLicense', comment: ['&& denotes a mnemonic'] }, "View &&License")), click: () => { + label: this.mnemonicLabel(nls.localize({ key: 'miLicense', comment: ['&& denotes a mnemonic'] }, "View &&License")), click: () => { if (language) { const queryArgChar = product.licenseUrl.indexOf('?') > 0 ? '&' : '?'; this.openUrl(`${product.licenseUrl}${queryArgChar}lang=${language}`, 'openLicenseUrl'); @@ -928,7 +941,7 @@ export class VSCodeMenu { } }) : null, product.privacyStatementUrl ? new MenuItem({ - label: mnemonicLabel(nls.localize({ key: 'miPrivacyStatement', comment: ['&& denotes a mnemonic'] }, "&&Privacy Statement")), click: () => { + label: this.mnemonicLabel(nls.localize({ key: 'miPrivacyStatement', comment: ['&& denotes a mnemonic'] }, "&&Privacy Statement")), click: () => { if (language) { const queryArgChar = product.licenseUrl.indexOf('?') > 0 ? '&' : '?'; this.openUrl(`${product.privacyStatementUrl}${queryArgChar}lang=${language}`, 'openPrivacyStatement'); @@ -950,7 +963,7 @@ export class VSCodeMenu { } helpMenu.append(__separator__()); - helpMenu.append(new MenuItem({ label: mnemonicLabel(nls.localize({ key: 'miAbout', comment: ['&& denotes a mnemonic'] }, "&&About")), click: () => this.openAboutDialog() })); + helpMenu.append(new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miAbout', comment: ['&& denotes a mnemonic'] }, "&&About")), click: () => this.openAboutDialog() })); } } @@ -1000,7 +1013,7 @@ export class VSCodeMenu { private createMenuItem(label: string, commandId: string | string[], enabled?: boolean, checked?: boolean): Electron.MenuItem; private createMenuItem(label: string, click: () => void, enabled?: boolean, checked?: boolean): Electron.MenuItem; private createMenuItem(arg1: string, arg2: any, arg3?: boolean, arg4?: boolean): Electron.MenuItem { - const label = mnemonicLabel(arg1); + const label = this.mnemonicLabel(arg1); const click: () => void = (typeof arg2 === 'function') ? arg2 : (menuItem, win, event) => { let commandId = arg2; if (Array.isArray(arg2)) { @@ -1033,7 +1046,7 @@ export class VSCodeMenu { private createDevToolsAwareMenuItem(label: string, commandId: string, devToolsFocusedFn: (contents: Electron.WebContents) => void): Electron.MenuItem { return new MenuItem(this.withKeybinding(commandId, { - label: mnemonicLabel(label), + label: this.mnemonicLabel(label), enabled: this.windowsService.getWindowCount() > 0, click: () => { const windowInFocus = this.windowsService.getFocusedWindow(); @@ -1128,24 +1141,24 @@ export class VSCodeMenu { private reportMenuActionTelemetry(id: string): void { this.telemetryService.publicLog('workbenchActionExecuted', { id, from: telemetryFrom }); } -} -function __separator__(): Electron.MenuItem { - return new MenuItem({ type: 'separator' }); -} + private mnemonicLabel(label: string): string { + if (isMacintosh || !this.currentEnableMenuBarMnemonics) { + return label.replace(/\(&&\w\)|&&/g, ''); // no mnemonic support on mac + } -function mnemonicLabel(label: string): string { - if (isMacintosh) { - return label.replace(/\(&&\w\)|&&/g, ''); // no mnemonic support on mac + return label.replace(/&&/g, '&'); } - return label.replace(/&&/g, '&'); -} + private unmnemonicLabel(label: string): string { + if (isMacintosh || !this.currentEnableMenuBarMnemonics) { + return label; // no mnemonic support on mac + } -function unMnemonicLabel(label: string): string { - if (isMacintosh) { - return label; // no mnemonic support on mac + return label.replace(/&/g, '&&'); } +} - return label.replace(/&/g, '&&'); +function __separator__(): Electron.MenuItem { + return new MenuItem({ type: 'separator' }); } diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index 296f757f9c6fa..d24aafc9bfbf4 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -104,4 +104,5 @@ export interface IWindowSettings { menuBarVisibility: MenuBarVisibility; newWindowDimensions: 'default' | 'inherit' | 'maximized' | 'fullscreen'; nativeTabs: boolean; + enableMenuBarMnemonics: boolean; } diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts index c62f3bbb4a394..f20818fcf5cae 100644 --- a/src/vs/workbench/electron-browser/main.contribution.ts +++ b/src/vs/workbench/electron-browser/main.contribution.ts @@ -266,6 +266,11 @@ if (isWindows || isLinux) { 'default': 'default', 'description': nls.localize('menuBarVisibility', "Control the visibility of the menu bar. A setting of 'toggle' means that the menu bar is hidden and a single press of the Alt key will show it. By default, the menu bar will be visible, unless the window is full screen.") }; + properties['window.enableMenuBarMnemonics'] = { + 'type': 'boolean', + 'default': true, + 'description': nls.localize('enableMenuBarMnemonics', "If enabled, the main menus can be opened via Alt-key shortcuts. Disabling mnemonics allows to bind these Alt-key shortcuts to editor commands instead.") + }; } if (isWindows) { From 34ec2059a41273913cb6fa74331186b4420367e5 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 8 May 2017 07:57:10 +0200 Subject: [PATCH 0249/2747] Default dark theme too low contrast on inactive tabs in inactive editor (fixes #26132) --- src/vs/workbench/browser/parts/editor/tabsTitleControl.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index 91f679da71199..f893b2505ca61 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -313,11 +313,11 @@ export class TabsTitleControl extends TitleControl { tabLabel.element.style.color = this.getColor(TAB_INACTIVE_FOREGROUND, (color, theme) => { if (!isGroupActive) { if (theme.type === 'dark') { - return color.transparent(0.5).transparent(0.5); + return color.transparent(0.5); } if (theme.type === 'light') { - return color.transparent(0.7).transparent(0.5); + return color.transparent(0.5); } } From 7b7132c9a2c8e7b4762d16f223a75d37722665c2 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 8 May 2017 07:58:18 +0200 Subject: [PATCH 0250/2747] UI Sizing: Contrast Border Lines (fixes #26113) --- src/vs/platform/theme/common/colorRegistry.ts | 6 +++--- src/vs/platform/theme/common/styler.ts | 6 +++--- src/vs/workbench/parts/debug/browser/debugViewlet.ts | 4 ++-- .../parts/explorers/browser/treeExplorerViewlet.ts | 2 +- src/vs/workbench/parts/files/browser/explorerViewlet.ts | 6 ++++-- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 12f490e7c7613..b5e4ff639aec6 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -142,11 +142,11 @@ export const inputForeground = registerColor('input.foreground', { dark: foregro export const inputBorder = registerColor('input.border', { dark: null, light: null, hc: contrastBorder }, nls.localize('inputBoxBorder', "Input box border.")); export const inputActiveOptionBorder = registerColor('inputOption.activeBorder', { dark: '#007ACC', light: '#007ACC', hc: activeContrastBorder }, nls.localize('inputBoxActiveOptionBorder', "Border color of activated options in input fields.")); export const inputValidationInfoBackground = registerColor('inputValidation.infoBackground', { dark: '#063B49', light: '#D6ECF2', hc: Color.black }, nls.localize('inputValidationInfoBackground', "Input validation background color for information severity.")); -export const inputValidationInfoBorder = registerColor('inputValidation.infoBorder', { dark: '#55AAFF', light: '#009CCC', hc: '#6FC3DF' }, nls.localize('inputValidationInfoBorder', "Input validation border color for information severity.")); +export const inputValidationInfoBorder = registerColor('inputValidation.infoBorder', { dark: '#55AAFF', light: '#55AAFF', hc: '#6FC3DF' }, nls.localize('inputValidationInfoBorder', "Input validation border color for information severity.")); export const inputValidationWarningBackground = registerColor('inputValidation.warningBackground', { dark: '#352A05', light: '#F6F5D2', hc: Color.black }, nls.localize('inputValidationWarningBackground', "Input validation background color for information warning.")); -export const inputValidationWarningBorder = registerColor('inputValidation.warningBorder', { dark: '#B89500', light: '#F2CB1D', hc: '#B89500' }, nls.localize('inputValidationWarningBorder', "Input validation border color for warning severity.")); +export const inputValidationWarningBorder = registerColor('inputValidation.warningBorder', { dark: '#B89500', light: '#B89500', hc: '#B89500' }, nls.localize('inputValidationWarningBorder', "Input validation border color for warning severity.")); export const inputValidationErrorBackground = registerColor('inputValidation.errorBackground', { dark: '#5A1D1D', light: '#F2DEDE', hc: Color.black }, nls.localize('inputValidationErrorBackground', "Input validation background color for error severity.")); -export const inputValidationErrorBorder = registerColor('inputValidation.errorBorder', { dark: '#BE1100', light: '#E51400', hc: '#BE1100' }, nls.localize('inputValidationErrorBorder', "Input validation border color for error severity.")); +export const inputValidationErrorBorder = registerColor('inputValidation.errorBorder', { dark: '#BE1100', light: '#BE1100', hc: '#BE1100' }, nls.localize('inputValidationErrorBorder', "Input validation border color for error severity.")); export const selectBackground = registerColor('dropdown.background', { dark: '#3C3C3C', light: Color.white, hc: Color.black }, nls.localize('dropdownBackground', "Dropdown background.")); export const selectForeground = registerColor('dropdown.foreground', { dark: '#F0F0F0', light: null, hc: Color.white }, nls.localize('dropdownForeground', "Dropdown foreground.")); diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index 796b99a6131b2..017fca395edc9 100644 --- a/src/vs/platform/theme/common/styler.ts +++ b/src/vs/platform/theme/common/styler.ts @@ -190,10 +190,10 @@ export function attachListStyler(widget: IThemable, themeService: IThemeService, }); } -export function attachHeaderViewStyler(widget: IThemable, themeService: IThemeService, style?: { headerBackground?: ColorIdentifier, contrastBorder?: ColorIdentifier }): IDisposable { +export function attachHeaderViewStyler(widget: IThemable, themeService: IThemeService, options?: { noContrastBorder?: boolean }): IDisposable { return attachStyler(themeService, widget, { - headerBackground: (style && style.headerBackground) || SIDE_BAR_SECTION_HEADER_BACKGROUND, - headerHighContrastBorder: (style && style.contrastBorder) || contrastBorder + headerBackground: SIDE_BAR_SECTION_HEADER_BACKGROUND, + headerHighContrastBorder: (options && options.noContrastBorder) ? null : contrastBorder }); } diff --git a/src/vs/workbench/parts/debug/browser/debugViewlet.ts b/src/vs/workbench/parts/debug/browser/debugViewlet.ts index 5b3b171fc668d..a36d31280224b 100644 --- a/src/vs/workbench/parts/debug/browser/debugViewlet.ts +++ b/src/vs/workbench/parts/debug/browser/debugViewlet.ts @@ -75,9 +75,9 @@ export class DebugViewlet extends Viewlet { this.viewletSettings) ); - this.views.forEach(view => { + this.views.forEach((view, index) => { if (view instanceof HeaderView) { - attachHeaderViewStyler(view, this.themeService); + attachHeaderViewStyler(view, this.themeService, { noContrastBorder: index === 0 }); } }); diff --git a/src/vs/workbench/parts/explorers/browser/treeExplorerViewlet.ts b/src/vs/workbench/parts/explorers/browser/treeExplorerViewlet.ts index 856261d317240..51a384bf51c22 100644 --- a/src/vs/workbench/parts/explorers/browser/treeExplorerViewlet.ts +++ b/src/vs/workbench/parts/explorers/browser/treeExplorerViewlet.ts @@ -71,7 +71,7 @@ export class TreeExplorerViewlet extends Viewlet { const headerSize = 0; // Hide header (root node) by default this.view = this.instantiationService.createInstance(TreeExplorerView, this.viewletState, this.treeNodeProviderId, this.getActionRunner(), headerSize); - attachHeaderViewStyler(this.view, this.themeService); + attachHeaderViewStyler(this.view, this.themeService, { noContrastBorder: true }); this.view.render(this.viewletContainer.getHTMLElement(), Orientation.VERTICAL); } diff --git a/src/vs/workbench/parts/files/browser/explorerViewlet.ts b/src/vs/workbench/parts/files/browser/explorerViewlet.ts index 5aa2a30f53513..2bc49cf9a1108 100644 --- a/src/vs/workbench/parts/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/browser/explorerViewlet.ts @@ -107,6 +107,7 @@ export class ExplorerViewlet extends Viewlet { this.viewletContainer.clearChildren(); this.splitView = new SplitView(this.viewletContainer.getHTMLElement()); + // Track focus this.focusListener = this.splitView.onFocus((view: IViewletView) => { this.lastFocusedView = view; @@ -129,8 +130,9 @@ export class ExplorerViewlet extends Viewlet { this.views.push(view.instantiate(this.getActionRunner(), this.viewletSettings, this.instantiationService)); } - for (const view of this.views) { - attachHeaderViewStyler(view, this.themeService); + for (let i = 0; i < this.views.length; i++) { + const view = this.views[i]; + attachHeaderViewStyler(view, this.themeService, { noContrastBorder: i === 0 }); this.splitView.addView(view); } From 674200fd49ad8c1557f884903fd09647975270f8 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 8 May 2017 07:58:51 +0200 Subject: [PATCH 0251/2747] Issue: Select element border radius and color (fixes #26045) --- src/vs/workbench/electron-browser/media/shell.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/electron-browser/media/shell.css b/src/vs/workbench/electron-browser/media/shell.css index 2b5ece9a68db5..f734da27292c9 100644 --- a/src/vs/workbench/electron-browser/media/shell.css +++ b/src/vs/workbench/electron-browser/media/shell.css @@ -98,6 +98,10 @@ opacity: 1 !important; } +.monaco-shell .mac select:focus { + border: none; /* outline is a square, but border has a radius, so we avoid this glitch when focussed (https://github.com/Microsoft/vscode/issues/26045) */ +} + .monaco-shell.hc-black [tabindex="0"]:focus, .monaco-shell.hc-black .synthetic-focus, .monaco-shell.hc-black select:focus, From 971798b1fbf16c8d5766f834f8f96f16fbc5e4b5 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 7 May 2017 23:06:15 -0700 Subject: [PATCH 0252/2747] Add theme key for selection (#26093) * Add theme key for selection Fixes #25966 * :lipstick: --- src/vs/platform/theme/common/colorRegistry.ts | 2 ++ src/vs/workbench/electron-browser/shell.ts | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index b5e4ff639aec6..21ead0e0272cf 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -134,6 +134,8 @@ export const focusBorder = registerColor('focusBorder', { dark: Color.fromHex('# export const contrastBorder = registerColor('contrastBorder', { light: null, dark: null, hc: '#6FC3DF' }, nls.localize('contrastBorder', "An extra border around elements to separate them from others for greater contrast.")); export const activeContrastBorder = registerColor('contrastActiveBorder', { light: null, dark: null, hc: focusBorder }, nls.localize('activeContrastBorder', "An extra border around active elements to separate them from others for greater contrast.")); +export const selectionBackground = registerColor('selection.background', { light: null, dark: null, hc: null }, nls.localize('selectionBackground', "The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor and the terminal.")); + // ----- widgets export const widgetShadow = registerColor('widget.shadow', { dark: '#000000', light: '#A8A8A8', hc: null }, nls.localize('widgetShadow', 'Shadow color of widgets such as find/replace inside the editor.')); diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 33d9257064c2c..9e003eda0d762 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -103,7 +103,7 @@ import 'vs/platform/opener/browser/opener.contribution'; import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { WorkbenchThemeService } from 'vs/workbench/services/themes/electron-browser/workbenchThemeService'; import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; -import { foreground, focusBorder, scrollbarShadow, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground, listHighlightForeground } from 'vs/platform/theme/common/colorRegistry'; +import { foreground, selectionBackground, focusBorder, scrollbarShadow, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground, listHighlightForeground } from 'vs/platform/theme/common/colorRegistry'; /** * Services that we require for the Shell @@ -529,6 +529,12 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { collector.addRule(`.monaco-shell { color: ${windowForeground}; }`); } + // Selection + const windowSelectionBackground = theme.getColor(selectionBackground); + if (windowSelectionBackground) { + collector.addRule(`.monaco-shell ::selection { background-color: ${windowSelectionBackground}; }`); + } + // List highlight const listHighlightForegroundColor = theme.getColor(listHighlightForeground); if (listHighlightForegroundColor) { From 4e180de1073f472f8617b0627182413aae2e7368 Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Sun, 7 May 2017 23:24:47 -0700 Subject: [PATCH 0253/2747] Expand docs on the side in the suggest widget (#25812) * Expand docs to the side in suggest widget * Attempt to figure out when to swap list and docs * Fixes #25881 * Fixes #25882 Adjust suggest widget width & position * refactoring * Show docs below instead of hiding when not enough space --- .../contrib/suggest/browser/media/suggest.css | 124 ++-------- .../suggest/browser/suggestController.ts | 4 +- .../contrib/suggest/browser/suggestWidget.ts | 222 ++++++++++-------- 3 files changed, 143 insertions(+), 207 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index 3714be6e58fad..4b8e1fca7e642 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -6,7 +6,7 @@ /* Suggest */ .monaco-editor .suggest-widget { z-index: 40; - width: 438px; + width: 660px; } .monaco-editor .suggest-widget.visible { @@ -23,7 +23,17 @@ .monaco-editor .suggest-widget > .tree { height: 100%; - width: 100%; + width: 220px; + float: left; + box-sizing: border-box; +} + +.monaco-editor .suggest-widget.list-right > .tree { + float: right +} + +.monaco-editor .suggest-widget.docs-below > .tree { + float: none; } .monaco-editor .suggest-widget .monaco-list .monaco-list-row { @@ -49,71 +59,10 @@ text-overflow: ellipsis; } -.monaco-editor .suggest-widget .monaco-list .monaco-list-row .docs { - display: none; - overflow: hidden; -} - -.monaco-editor .suggest-widget .monaco-list .monaco-list-row .docs > .docs-text { - flex: 2; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - opacity: 0.85; -} - -.monaco-editor .suggest-widget .monaco-list .monaco-list-row .docs > .docs-text.no-docs { - opacity: 0.5; - font-style: italic; -} - -.monaco-editor .suggest-widget .monaco-list .monaco-list-row .docs > .docs-details { - opacity: 0.6; - background-image: url('./info.svg'); - background-position: center center; - background-repeat: no-repeat; - background-size: 70%; -} - -.monaco-editor .suggest-widget .details > .header > .go-back, -.monaco-editor .suggest-widget .monaco-list .monaco-list-row .docs > .docs-details { - color: #0035DD; -} - -.monaco-editor .suggest-widget .monaco-list .monaco-list-row .docs > .docs-details:hover { - opacity: 1; -} - .monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight { font-weight: bold; } -.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label { - display: none; - margin-left: 0.8em; - flex: 1; - text-align: right; - overflow: hidden; - text-overflow: ellipsis; - opacity: 0.7; -} - -.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label > .monaco-tokenized-source { - display: inline; -} - -.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .type-label { - display: inline; -} - -.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .type-label { - display: inline; -} - -.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .docs { - display: flex; -} - .monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon { display: block; height: 16px; @@ -160,37 +109,16 @@ } .monaco-editor .suggest-widget .details { - height: 100%; - box-sizing: border-box; + max-height: 216px; display: flex; flex-direction: column; cursor: default; -} - -.monaco-editor .suggest-widget .details > .header { - padding: 4px 5px; - display: flex; box-sizing: border-box; - border-bottom: 1px solid rgba(204, 204, 204, 0.5); + width: 440px; } -.monaco-editor .suggest-widget .details > .header > .title { - flex: 2; - overflow: hidden; - text-overflow: ellipsis; -} - -.monaco-editor .suggest-widget .details > .header > .go-back { - cursor: pointer; - opacity: 0.6; - background-image: url('./back.svg'); - background-size: 70%; - background-position: center center; - background-repeat: no-repeat; -} - -.monaco-editor .suggest-widget .details > .header > .go-back:hover { - opacity: 1; +.monaco-editor .suggest-widget .details.no-docs { + display: none; } .monaco-editor .suggest-widget .details > .monaco-scrollable-element { @@ -218,30 +146,12 @@ display: none; } -/* Dark theme */ - -.monaco-editor.vs-dark .suggest-widget .details > .header { - border-color: rgba(85,85,85,0.5); -} - -.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .docs > .docs-details, -.monaco-editor.vs-dark .suggest-widget .details > .header > .go-back { - color: #4E94CE; -} - - /* High Contrast Theming */ -.monaco-editor.hc-black .suggest-widget .details > .monaco-scrollable-element > .body > .docs, -.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .docs { +.monaco-editor.hc-black .suggest-widget .details > .monaco-scrollable-element > .body > .docs { color: #C07A7A; } -.monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .docs > .docs-details, -.monaco-editor.hc-black .suggest-widget .details > .header > .go-back { - color: #4E94CE; -} - .monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon, .monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon { background-image: url('Misc_inverse_16x.svg'); } diff --git a/src/vs/editor/contrib/suggest/browser/suggestController.ts b/src/vs/editor/contrib/suggest/browser/suggestController.ts index 09720eae57b20..e19aad6d8ea93 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestController.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestController.ts @@ -222,7 +222,7 @@ export class SuggestController implements IEditorContribution { cancelSuggestWidget(): void { if (this._widget) { this._model.cancel(); - this._widget.hideDetailsOrHideWidget(); + this._widget.hideWidget(); } } @@ -264,7 +264,7 @@ export class SuggestController implements IEditorContribution { toggleSuggestionDetails(): void { if (this._widget) { - this._widget.toggleDetails(); + this._widget.toggleDetailsFocus(); } } } diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 27a980495d802..09ac145137cac 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -30,6 +30,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IThemeService, ITheme, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { registerColor, editorWidgetBackground, contrastBorder, listFocusBackground, activeContrastBorder, listHighlightForeground, editorForeground } from 'vs/platform/theme/common/colorRegistry'; +import { Position } from 'vs/editor/common/core/position'; const sticky = false; // for development purposes @@ -38,9 +39,6 @@ interface ISuggestionTemplateData { icon: HTMLElement; colorspan: HTMLElement; highlightedLabel: HighlightedLabel; - typeLabel: HTMLElement; - documentationDetails: HTMLElement; - documentation: HTMLElement; disposables: IDisposable[]; } @@ -64,7 +62,7 @@ function canExpandCompletionItem(item: ICompletionItem) { if (suggestion.documentation) { return true; } - return (suggestion.detail || '').indexOf('\n') >= 0; + return (suggestion.detail && suggestion.detail !== suggestion.label); } class Renderer implements IRenderer { @@ -96,13 +94,6 @@ class Renderer implements IRenderer { const main = append(text, $('.main')); data.highlightedLabel = new HighlightedLabel(main); data.disposables.push(data.highlightedLabel); - data.typeLabel = append(main, $('span.type-label')); - - const docs = append(text, $('.docs')); - data.documentation = append(docs, $('span.docs-text')); - data.documentationDetails = append(docs, $('span.docs-details')); - data.documentationDetails.title = nls.localize('readMore', "Read More...{0}", this.triggerKeybindingLabel); - const configureFont = () => { const configuration = this.editor.getConfiguration(); const fontFamily = configuration.fontInfo.fontFamily; @@ -116,8 +107,6 @@ class Renderer implements IRenderer { main.style.lineHeight = lineHeightPx; data.icon.style.height = lineHeightPx; data.icon.style.width = lineHeightPx; - data.documentationDetails.style.height = lineHeightPx; - data.documentationDetails.style.width = lineHeightPx; }; configureFont(); @@ -151,26 +140,8 @@ class Renderer implements IRenderer { } data.highlightedLabel.set(suggestion.label, createMatches(element.matches)); - data.typeLabel.textContent = (suggestion.detail || '').replace(/\n.*$/m, ''); - data.documentation.textContent = suggestion.documentation || ''; - if (canExpandCompletionItem(element)) { - show(data.documentationDetails); - data.documentationDetails.onmousedown = e => { - e.stopPropagation(); - e.preventDefault(); - }; - data.documentationDetails.onclick = e => { - e.stopPropagation(); - e.preventDefault(); - this.widget.toggleDetails(); - }; - } else { - hide(data.documentationDetails); - data.documentationDetails.onmousedown = null; - data.documentationDetails.onclick = null; - } } disposeTemplate(templateData: ISuggestionTemplateData): void { @@ -191,9 +162,6 @@ const enum State { class SuggestionDetails { private el: HTMLElement; - private title: HTMLElement; - private titleLabel: HighlightedLabel; - private back: HTMLElement; private scrollbar: DomScrollableElement; private body: HTMLElement; private type: HTMLElement; @@ -211,13 +179,6 @@ class SuggestionDetails { this.el = append(container, $('.details')); this.disposables.push(toDisposable(() => container.removeChild(this.el))); - const header = append(this.el, $('.header')); - this.title = append(header, $('span.title')); - this.titleLabel = new HighlightedLabel(this.title); - this.disposables.push(this.titleLabel); - - this.back = append(header, $('span.go-back')); - this.back.title = nls.localize('goback', "Go back"); this.body = $('.body'); this.scrollbar = new DomScrollableElement(this.body, { canUseTranslate3d: false }); @@ -240,26 +201,18 @@ class SuggestionDetails { } render(item: ICompletionItem): void { - if (!item) { - this.titleLabel.set(''); + if (!item || !canExpandCompletionItem(item)) { this.type.textContent = ''; this.docs.textContent = ''; + addClass(this.el, 'no-docs'); this.ariaLabel = null; return; } - - this.titleLabel.set(item.suggestion.label, createMatches(item.matches)); + removeClass(this.el, 'no-docs'); this.type.innerText = item.suggestion.detail || ''; this.docs.textContent = item.suggestion.documentation; - this.back.onmousedown = e => { - e.preventDefault(); - e.stopPropagation(); - }; - this.back.onclick = e => { - e.preventDefault(); - e.stopPropagation(); - this.widget.toggleDetails(); - }; + + this.el.style.height = this.type.clientHeight + this.docs.clientHeight + 'px'; this.body.scrollTop = 0; this.scrollbar.scanDomNode(); @@ -299,15 +252,10 @@ class SuggestionDetails { const configuration = this.editor.getConfiguration(); const fontFamily = configuration.fontInfo.fontFamily; const fontSize = configuration.contribInfo.suggestFontSize || configuration.fontInfo.fontSize; - const lineHeight = configuration.contribInfo.suggestLineHeight || configuration.fontInfo.lineHeight; const fontSizePx = `${fontSize}px`; - const lineHeightPx = `${lineHeight}px`; this.el.style.fontSize = fontSizePx; - this.title.style.fontFamily = fontFamily; this.type.style.fontFamily = fontFamily; - this.back.style.height = lineHeightPx; - this.back.style.width = lineHeightPx; } dispose(): void { @@ -359,6 +307,14 @@ export class SuggestWidget implements IContentWidget, IDelegate readonly onDidHide: Event = this.onDidHideEmitter.event; readonly onDidShow: Event = this.onDidShowEmitter.event; + private preferredPosition: Position; + private readonly minWidgetWidth = 440; + private readonly maxWidgetWidth = 660; + private readonly listWidth = 220; + private readonly minDocsWidth = 220; + private readonly maxDocsWidth = 440; + private readonly widgetWidthInSmallestEditor = 300; + constructor( private editor: ICodeEditor, @ITelemetryService private telemetryService: ITelemetryService, @@ -477,12 +433,14 @@ export class SuggestWidget implements IContentWidget, IDelegate private onThemeChange(theme: ITheme) { let backgroundColor = theme.getColor(editorSuggestWidgetBackground); if (backgroundColor) { - this.element.style.backgroundColor = backgroundColor.toString(); + this.listElement.style.backgroundColor = backgroundColor.toString(); + this.details.element.style.backgroundColor = backgroundColor.toString(); } let borderColor = theme.getColor(editorSuggestWidgetBorder); if (borderColor) { let borderWidth = theme.type === 'hc' ? 2 : 1; - this.element.style.border = `${borderWidth}px solid ${borderColor}`; + this.listElement.style.border = `${borderWidth}px solid ${borderColor}`; + this.details.element.style.border = `${borderWidth}px solid ${borderColor}`; } } @@ -550,7 +508,7 @@ export class SuggestWidget implements IContentWidget, IDelegate this.list.setFocus([index]); this.updateWidgetHeight(); this.list.reveal(index); - + this.showDetails(); this._ariaAlert(this._getSuggestionAriaAlertLabel(item)); }) .then(null, err => !isPromiseCanceledError(err) && onUnexpectedError(err)) @@ -592,8 +550,8 @@ export class SuggestWidget implements IContentWidget, IDelegate this.show(); break; case State.Open: - hide(this.messageElement, this.details.element); - show(this.listElement); + hide(this.messageElement); + show(this.listElement, this.details.element); this.show(); break; case State.Frozen: @@ -602,8 +560,8 @@ export class SuggestWidget implements IContentWidget, IDelegate this.show(); break; case State.Details: - hide(this.messageElement, this.listElement); - show(this.details.element); + hide(this.messageElement); + show(this.details.element, this.listElement); this.show(); this._ariaAlert(this.details.getAriaLabel()); break; @@ -777,26 +735,21 @@ export class SuggestWidget implements IContentWidget, IDelegate return undefined; } - toggleDetails(): void { + toggleDetailsFocus(): void { if (this.state === State.Details) { this.setState(State.Open); - this.editor.focus(); - return; + } else if (this.state === State.Open) { + this.setState(State.Details); } + } - if (this.state !== State.Open) { - return; - } - - const item = this.list.getFocusedElements()[0]; - - if (!item || !canExpandCompletionItem(item)) { + showDetails(): void { + if (this.state !== State.Open && this.state !== State.Details) { return; } - this.setState(State.Details); + this.show(); this.editor.focus(); - this.telemetryService.publicLog('suggestWidget:toggleDetails', this.editor.getTelemetryData()); } private show(): void { @@ -821,21 +774,13 @@ export class SuggestWidget implements IContentWidget, IDelegate this.onDidHideEmitter.fire(this); } - hideDetailsOrHideWidget(): void { - if (this.state === State.Details) { - this.toggleDetails(); - } else { - this.hideWidget(); - } - } - getPosition(): IContentWidgetPosition { if (this.state === State.Hidden) { return null; } return { - position: this.editor.getPosition(), + position: this.preferredPosition ? this.preferredPosition : this.editor.getPosition(), preference: [ContentWidgetPositionPreference.BELOW, ContentWidgetPositionPreference.ABOVE] }; } @@ -850,33 +795,118 @@ export class SuggestWidget implements IContentWidget, IDelegate private updateWidgetHeight(): number { let height = 0; + let maxSuggestionsToShow = this.editor.getLayoutInfo().contentWidth > this.minWidgetWidth ? 11 : 5; if (this.state === State.Empty || this.state === State.Loading) { height = this.unfocusedHeight; - } else if (this.state === State.Details) { - height = 12 * this.unfocusedHeight; } else { const focus = this.list.getFocusedElements()[0]; const focusHeight = focus ? this.getHeight(focus) : this.unfocusedHeight; height = focusHeight; const suggestionCount = (this.list.contentHeight - focusHeight) / this.unfocusedHeight; - height += Math.min(suggestionCount, 11) * this.unfocusedHeight; + height += Math.min(suggestionCount, maxSuggestionsToShow) * this.unfocusedHeight; } this.element.style.lineHeight = `${this.unfocusedHeight}px`; - this.element.style.height = `${height}px`; + this.listElement.style.height = `${height}px`; this.list.layout(height); + + this.adjustWidgetWidth(); this.editor.layoutContentWidget(this); return height; } + private adjustWidgetWidth() { + const perColumnWidth = this.editor.getLayoutInfo().contentWidth / this.editor.getLayoutInfo().viewportColumn; + const spaceOntheLeft = Math.floor(this.editor.getPosition().column * perColumnWidth) - this.editor.getScrollLeft(); + const spaceOntheRight = this.editor.getLayoutInfo().contentWidth - spaceOntheLeft; + const scrolledColumns = Math.floor(this.editor.getScrollLeft() / perColumnWidth); + + // Reset + this.preferredPosition = this.editor.getPosition(); + this.details.element.style.width = `${this.maxDocsWidth}px`; + this.element.style.width = `${this.maxWidgetWidth}px`; + this.listElement.style.width = `${this.listWidth}px`; + removeClass(this.element, 'list-right'); + removeClass(this.element, 'docs-below'); + + if (spaceOntheRight > this.maxWidgetWidth) { + // There is enough space on the right, so nothing to do here. + return; + } + + + if (spaceOntheRight > this.minWidgetWidth) { + // There is enough space on the right for list and resized docs + this.adjustDocs(false, spaceOntheRight - this.listWidth, this.editor.getPosition().column); + return; + } + + if (spaceOntheRight > this.listWidth && spaceOntheLeft > this.maxDocsWidth) { + // Docs on the left and list on the right of the cursor + let columnsOccupiedByDocs = Math.floor(this.maxDocsWidth / perColumnWidth); + this.adjustDocs(true, null, this.editor.getPosition().column - columnsOccupiedByDocs); + return; + } + + if (spaceOntheRight > this.listWidth && spaceOntheLeft > this.minDocsWidth) { + // Resized docs on the left and list on the right of the cursor + let columnsOccupiedByDocs = Math.floor(spaceOntheLeft / perColumnWidth); + this.adjustDocs(true, spaceOntheLeft, this.editor.getPosition().column - columnsOccupiedByDocs); + return; + } + + if (this.editor.getLayoutInfo().contentWidth > this.maxWidgetWidth) { + // Use as much space on the right, and for the rest go left + let columnsOccupiedByWidget = Math.floor(this.maxWidgetWidth / perColumnWidth); + let preferredColumn = this.editor.getLayoutInfo().viewportColumn - columnsOccupiedByWidget + scrolledColumns; + this.adjustDocs(true, null, preferredColumn); + return; + } + + if (this.editor.getLayoutInfo().contentWidth > this.minWidgetWidth) { + // Resize docs. Swap only of there is enough space on the right for the list + let newDocsWidth = this.editor.getLayoutInfo().contentWidth - this.listWidth; + this.adjustDocs(spaceOntheRight < this.listWidth, newDocsWidth, scrolledColumns); + return; + } + + // Not enough space to show side by side + // So show docs below the list + addClass(this.element, 'docs-below'); + this.listElement.style.width = `${this.widgetWidthInSmallestEditor}px`; + this.element.style.width = `${this.widgetWidthInSmallestEditor}px`; + this.details.element.style.width = `${this.widgetWidthInSmallestEditor}px`; + } + + /** + * Adjust the width of the docs widget, swaps docs/list and moves suggest widget if needed + * + * @swap boolean If true, then the docs and list are swapped + * @resizedDocWidth number If not null, this number will be used to set the width of the docs + * @preferredColumn Preferred column in the current line for the suggest widget + */ + private adjustDocs(swap: boolean, resizedDocWidth: number, preferredColumn: number) { + + if (swap) { + addClass(this.element, 'list-right'); + } + + if (resizedDocWidth !== null) { + this.details.element.style.width = `${resizedDocWidth}px`; + this.element.style.width = `${resizedDocWidth + this.listWidth}px`; + } + + this.preferredPosition = new Position(this.editor.getPosition().lineNumber, preferredColumn); + } + private renderDetails(): void { - if (this.state !== State.Details) { - this.details.render(null); - } else { + if (this.state === State.Details || this.state === State.Open) { this.details.render(this.list.getFocusedElements()[0]); + } else { + this.details.render(null); } } @@ -894,10 +924,6 @@ export class SuggestWidget implements IContentWidget, IDelegate // IDelegate getHeight(element: ICompletionItem): number { - if (canExpandCompletionItem(element) && element === this.focusedItem) { - return this.focusHeight; - } - return this.unfocusedHeight; } From fb722316dd2379b5040d9323a01f0080c4d937a2 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 8 May 2017 10:38:39 +0200 Subject: [PATCH 0254/2747] Fix #26186 --- src/vs/workbench/parts/files/browser/explorerViewlet.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/files/browser/explorerViewlet.ts b/src/vs/workbench/parts/files/browser/explorerViewlet.ts index 2bc49cf9a1108..80e70692d7899 100644 --- a/src/vs/workbench/parts/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/browser/explorerViewlet.ts @@ -122,8 +122,8 @@ export class ExplorerViewlet extends Viewlet { } // Explorer view - this.createExplorerView(this.views.length || customViews.length ? undefined : 0); - this.views.push(this.explorerView); + const view = this.createExplorerOrEmptyView(this.views.length || customViews.length ? undefined : 0); + this.views.push(view); // custom views for (const view of customViews) { @@ -157,7 +157,7 @@ export class ExplorerViewlet extends Viewlet { } } - private createExplorerView(headerSize: number): void { + private createExplorerOrEmptyView(headerSize: number): IViewletView { let explorerOrEmptyView: ExplorerView | EmptyView; // With a Workspace @@ -201,6 +201,8 @@ export class ExplorerViewlet extends Viewlet { else { this.emptyView = explorerOrEmptyView = this.instantiationService.createInstance(EmptyView, this.getActionRunner()); } + + return explorerOrEmptyView; } public getExplorerView(): ExplorerView { From 6839bdf79672dc9a634a86afcfb5df7ca525be4c Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 5 May 2017 16:03:46 +0200 Subject: [PATCH 0255/2747] more getLeadingWhitespace-tricks --- src/vs/base/common/strings.ts | 8 ++++---- src/vs/base/test/common/strings.test.ts | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/vs/base/common/strings.ts b/src/vs/base/common/strings.ts index 034b349767e3a..dd078b1f44975 100644 --- a/src/vs/base/common/strings.ts +++ b/src/vs/base/common/strings.ts @@ -293,14 +293,14 @@ export function firstNonWhitespaceIndex(str: string): number { * Returns the leading whitespace of the string. * If the string contains only whitespaces, returns entire string */ -export function getLeadingWhitespace(str: string, from: number = 0): string { - for (let i = from, len = str.length; i < len; i++) { +export function getLeadingWhitespace(str: string, start: number = 0, end: number = str.length): string { + for (let i = start; i < end; i++) { let chCode = str.charCodeAt(i); if (chCode !== CharCode.Space && chCode !== CharCode.Tab) { - return str.substring(from, i); + return str.substring(start, i); } } - return str.substr(from); + return str.substring(start, end); } /** diff --git a/src/vs/base/test/common/strings.test.ts b/src/vs/base/test/common/strings.test.ts index 1364b35f8d5c1..07d750b0ecda7 100644 --- a/src/vs/base/test/common/strings.test.ts +++ b/src/vs/base/test/common/strings.test.ts @@ -328,7 +328,13 @@ suite('Strings', () => { test('getLeadingWhitespace', () => { assert.equal(strings.getLeadingWhitespace(' foo'), ' '); assert.equal(strings.getLeadingWhitespace(' foo', 2), ''); + assert.equal(strings.getLeadingWhitespace(' foo', 1, 1), ''); + assert.equal(strings.getLeadingWhitespace(' foo', 0, 1), ' '); assert.equal(strings.getLeadingWhitespace(' '), ' '); assert.equal(strings.getLeadingWhitespace(' ', 1), ' '); + assert.equal(strings.getLeadingWhitespace(' ', 0, 1), ' '); + assert.equal(strings.getLeadingWhitespace('\t\tfunction foo(){', 0, 1), '\t'); + assert.equal(strings.getLeadingWhitespace('\t\tfunction foo(){', 0, 2), '\t\t'); + }); }); From 7113718ce3de5648d9d20e5f3f19bd50496b2b70 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 8 May 2017 12:39:56 +0200 Subject: [PATCH 0256/2747] make text edit, set selections --- .../contrib/snippet/browser/editorSnippets.ts | 119 +++++++++++++++--- .../contrib/snippet/common/snippetParser.ts | 8 ++ .../test/browser/editorSnippets.test.ts | 19 ++- 3 files changed, 124 insertions(+), 22 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index d1501376c3316..1f6729cc56268 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -5,34 +5,115 @@ 'use strict'; -import { getLeadingWhitespace } from 'vs/base/common/strings'; -import { ICommonCodeEditor, IModel } from 'vs/editor/common/editorCommon'; -import { TextmateSnippet } from '../common/snippetParser'; +import { getLeadingWhitespace, compare } from 'vs/base/common/strings'; +import { ICommonCodeEditor, TrackedRangeStickiness } from 'vs/editor/common/editorCommon'; +import { EditOperation } from 'vs/editor/common/core/editOperation'; +import { TextmateSnippet, Placeholder } from '../common/snippetParser'; +import { Selection } from 'vs/editor/common/core/selection'; +import { Range } from 'vs/editor/common/core/range'; +class OneSnippet { + + private readonly _editor: ICommonCodeEditor; + private readonly _placeholderDecoration = new Map(); + private readonly _placeholderGroups: Placeholder[][]; + + private _placeholderGroupsIdx: number; + + constructor(editor: ICommonCodeEditor, selection: Selection, snippet: TextmateSnippet) { + + this._editor = editor; + + // for each selection get the leading 'reference'-whitespace and adjust the snippet accordingly. + const model = editor.getModel(); + const line = model.getLineContent(selection.startLineNumber); + const leadingWhitespace = getLeadingWhitespace(line, 0, selection.startColumn - 1); + snippet = snippet.withIndentation(whitespace => model.normalizeIndentation(leadingWhitespace + whitespace)); + + const offset = model.getOffsetAt(selection.getStartPosition()); + + this._editor.executeEdits('onesnieppt', [EditOperation.replaceMove(selection, snippet.value)]); + + // create a decoration (tracked range) for each placeholder + this._editor.changeDecorations(accessor => { + + let lastRange: Range; + + for (const placeholder of snippet.getPlaceholders()) { + const placeholderOffset = snippet.offset(placeholder); + const placeholderLen = snippet.len(placeholder); + const start = model.getPositionAt(offset + placeholderOffset); + const end = model.getPositionAt(offset + placeholderOffset + placeholderLen); + const range = new Range(start.lineNumber, start.column, end.lineNumber, end.column); + + let stickiness: TrackedRangeStickiness; + if (lastRange && lastRange.getEndPosition().equals(range.getStartPosition())) { + stickiness = TrackedRangeStickiness.GrowsOnlyWhenTypingAfter; + } else { + stickiness = TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges; + } + + const handle = accessor.addDecoration(range, { stickiness }); + this._placeholderDecoration.set(placeholder, handle); + + lastRange = range; + } + }); + + this._placeholderGroupsIdx = -1; + this._placeholderGroups = []; + let lastBucket: Placeholder[]; + snippet.getPlaceholders().sort((a, b) => compare(a.name, b.name)).reverse().forEach(a => { + if (!lastBucket || lastBucket[0].name !== a.name) { + lastBucket = [a]; + this._placeholderGroups.push(lastBucket); + } else { + lastBucket.push(a); + } + }); + } + + dispose(): void { + this._editor.changeDecorations(accessor => this._placeholderDecoration.forEach(handle => accessor.removeDecoration(handle))); + } + + next(): Selection[] { + this._placeholderGroupsIdx += 1; + if (this._placeholderGroupsIdx >= this._placeholderGroups.length) { + return undefined; + } + const ranges: Selection[] = []; + for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) { + const handle = this._placeholderDecoration.get(placeholder); + const range = this._editor.getModel().getDecorationRange(handle); + ranges.push(new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)); + } + return ranges; + } +} export class SnippetSession { private readonly _editor: ICommonCodeEditor; - private readonly _model: IModel; - private readonly _snippets: TextmateSnippet[] = []; + private readonly _snippets: OneSnippet[] = []; constructor(editor: ICommonCodeEditor, snippet: TextmateSnippet) { this._editor = editor; - this._model = editor.getModel(); - + this._editor.pushUndoStop(); for (const selection of editor.getSelections()) { - // for each selection get the leading 'reference' whitespace and - // adjust the snippet accordingly. this makes one snippet per selection/cursor - const line = this._model.getLineContent(selection.startLineNumber); - const leadingWhitespace = getLeadingWhitespace(line, 0, selection.startColumn - 1); - const newSnippet = snippet.withIndentation(whitespace => this._model.normalizeIndentation(leadingWhitespace + whitespace)); - this._snippets.push(newSnippet); - - // const offset = this._model.getOffsetAt(selection.getStartPosition()); - // for (const placeholder of snippet.getPlaceholders()) { - // const pos = this._model.getPositionAt(offset + snippet.offset(placeholder)); - // this._model.deltaDecorations - // } + const oneSnippet = new OneSnippet(editor, selection, snippet); + this._snippets.push(oneSnippet); + } + this._editor.pushUndoStop(); + this.next(); + } + + next(): void { + const selections: Selection[] = []; + for (const snippet of this._snippets) { + const sel = snippet.next(); + selections.push(...sel); } + this._editor.setSelections(selections); } } diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index 2fbe4c9e5f1e5..2b5c66816ce9c 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -231,6 +231,14 @@ export class TextmateSnippet { return pos; } + len(marker: Marker): number { + let ret = 0; + walk([marker], marker => { + ret += marker.len(); + return true; + }); + return ret; + } getPlaceholders(): Placeholder[] { const ret: Placeholder[] = []; diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts index 3a02a611d5020..e1c48b7ae75d4 100644 --- a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts @@ -28,14 +28,27 @@ suite('Editor Contrib - Snippets', () => { editor.dispose(); }); - test('snippets', () => { + test('snippets, selections', () => { editor.setSelections([ new Selection(1, 1, 1, 1), new Selection(2, 2, 2, 2), ]); - new SnippetSession(editor, SnippetParser.parse('foo\n${1:bar}\nfoo')); - assert.ok(true); + const snippet = SnippetParser.parse('foo${1:bar}foo$0'); + const session = new SnippetSession(editor, snippet); + + assert.equal(editor.getModel().getLineContent(1), 'foobarfoofunction foo() {'); + assert.equal(editor.getModel().getLineContent(2), '\tfoobarfooconsole.log(a)'); + + assert.equal(editor.getSelections().length, 2); + assert.ok(editor.getSelections()[0].equalsSelection(new Selection(1, 4, 1, 7))); + assert.ok(editor.getSelections()[1].equalsSelection(new Selection(2, 5, 2, 8))); + + session.next(); + assert.equal(editor.getSelections().length, 2); + assert.ok(editor.getSelections()[0].equalsSelection(new Selection(1, 10, 1, 10))); + assert.ok(editor.getSelections()[1].equalsSelection(new Selection(2, 11, 2, 11))); + }); }); From 4a1c576f48bc8dd471059b368c4d77437926e158 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 8 May 2017 12:52:13 +0200 Subject: [PATCH 0257/2747] Script element with type="text/html" not recognised as html. Fixes #25920 --- extensions/html/syntaxes/html.json | 40 +- .../html/test/colorize-fixtures/25920.html | 13 + .../test/colorize-results/25920_html.json | 1014 +++++++++++++++++ 3 files changed, 1066 insertions(+), 1 deletion(-) create mode 100644 extensions/html/test/colorize-fixtures/25920.html create mode 100644 extensions/html/test/colorize-results/25920_html.json diff --git a/extensions/html/syntaxes/html.json b/extensions/html/syntaxes/html.json index 66eacb26486d9..be1113e583ace 100644 --- a/extensions/html/syntaxes/html.json +++ b/extensions/html/syntaxes/html.json @@ -339,7 +339,7 @@ }, { "begin": "\\G", - "end": "(?i:(?=/?>|type\\s*=\\s*('|\"|)(?!text/(javascript|ecmascript)|application/((x-)?javascript|ecmascript))\\b))", + "end": "(?i:(?=/?>|type\\s*=\\s*('|\"|)(?!text/(javascript|ecmascript)|application/((x-)?javascript|ecmascript)|module)\\b))", "name": "meta.tag.metadata.script.html", "patterns": [ { @@ -347,6 +347,44 @@ } ] }, + { + "begin": "(?=(?i:type\\s*=\\s*('|\"|)(?=text/(x-handlebars|(x-(handlebars-)?|ng-)?template|html))\\b))", + "end": "(<)(?=/(?i:script))", + "endCaptures": { + "0": { + "name": "meta.tag.metadata.script.html" + }, + "1": { + "name": "punctuation.definition.tag.begin.html" + } + }, + "patterns": [ + { + "begin": "\\G", + "end": "(>)|(?=/>)", + "endCaptures": { + "1": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.metadata.script.html", + "patterns": [ + { + "include": "#tag-stuff" + } + ] + }, + { + "begin": "(?!\\G)", + "end": "(?= + + + + + + \ No newline at end of file diff --git a/extensions/html/test/colorize-results/25920_html.json b/extensions/html/test/colorize-results/25920_html.json new file mode 100644 index 0000000000000..94298771d7ed5 --- /dev/null +++ b/extensions/html/test/colorize-results/25920_html.json @@ -0,0 +1,1014 @@ +[ + { + "c": "<", + "t": "text.html.basic meta.tag.structure.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "html", + "t": "text.html.basic meta.tag.structure.any.html entity.name.tag.structure.any.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": ">", + "t": "text.html.basic meta.tag.structure.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.begin.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "script", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": " ", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "type", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html entity.other.attribute-name.html", + "r": { + "dark_plus": "entity.other.attribute-name: #9CDCFE", + "light_plus": "entity.other.attribute-name: #FF0000", + "dark_vs": "entity.other.attribute-name: #9CDCFE", + "light_vs": "entity.other.attribute-name: #FF0000", + "hc_black": "entity.other.attribute-name: #9CDCFE" + } + }, + { + "c": "=", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html punctuation.definition.string.begin.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "text/html", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html punctuation.definition.string.end.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.end.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "\t", + "t": "text.html.basic meta.embedded.block.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "div", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": " ", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "class", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html entity.other.attribute-name.html", + "r": { + "dark_plus": "entity.other.attribute-name: #9CDCFE", + "light_plus": "entity.other.attribute-name: #FF0000", + "dark_vs": "entity.other.attribute-name: #9CDCFE", + "light_vs": "entity.other.attribute-name: #FF0000", + "hc_black": "entity.other.attribute-name: #9CDCFE" + } + }, + { + "c": "=", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html string.quoted.single.html punctuation.definition.string.begin.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "foo", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html string.quoted.single.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html string.quoted.single.html punctuation.definition.string.end.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html meta.scope.between-tag-pair.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "/", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "div", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.end.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.begin.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "script", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": " ", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "type", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html entity.other.attribute-name.html", + "r": { + "dark_plus": "entity.other.attribute-name: #9CDCFE", + "light_plus": "entity.other.attribute-name: #FF0000", + "dark_vs": "entity.other.attribute-name: #9CDCFE", + "light_vs": "entity.other.attribute-name: #FF0000", + "hc_black": "entity.other.attribute-name: #9CDCFE" + } + }, + { + "c": "=", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html punctuation.definition.string.begin.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "module", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html punctuation.definition.string.end.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.end.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "\t", + "t": "text.html.basic meta.embedded.block.html source.js", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "var", + "t": "text.html.basic meta.embedded.block.html source.js meta.var.expr.js storage.type.js", + "r": { + "dark_plus": "storage.type: #569CD6", + "light_plus": "storage.type: #0000FF", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type: #569CD6" + } + }, + { + "c": " ", + "t": "text.html.basic meta.embedded.block.html source.js meta.var.expr.js", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "x", + "t": "text.html.basic meta.embedded.block.html source.js meta.var.expr.js meta.var-single-variable.expr.js meta.definition.variable.js variable.other.readwrite.js", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "text.html.basic meta.embedded.block.html source.js meta.var.expr.js meta.var-single-variable.expr.js", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "=", + "t": "text.html.basic meta.embedded.block.html source.js meta.var.expr.js keyword.operator.assignment.js", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " ", + "t": "text.html.basic meta.embedded.block.html source.js meta.var.expr.js", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "9", + "t": "text.html.basic meta.embedded.block.html source.js meta.var.expr.js constant.numeric.decimal.js", + "r": { + "dark_plus": "constant.numeric: #B5CEA8", + "light_plus": "constant.numeric: #09885A", + "dark_vs": "constant.numeric: #B5CEA8", + "light_vs": "constant.numeric: #09885A", + "hc_black": "constant.numeric: #B5CEA8" + } + }, + { + "c": ";", + "t": "text.html.basic meta.embedded.block.html source.js punctuation.terminator.statement.js", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.begin.html source.js", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "/", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.begin.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "script", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.end.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.begin.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "script", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": " ", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "type", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html entity.other.attribute-name.html", + "r": { + "dark_plus": "entity.other.attribute-name: #9CDCFE", + "light_plus": "entity.other.attribute-name: #FF0000", + "dark_vs": "entity.other.attribute-name: #9CDCFE", + "light_vs": "entity.other.attribute-name: #FF0000", + "hc_black": "entity.other.attribute-name: #9CDCFE" + } + }, + { + "c": "=", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html punctuation.definition.string.begin.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "text/ng-template", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html string.quoted.single.html punctuation.definition.string.end.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.end.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "\t", + "t": "text.html.basic meta.embedded.block.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "div", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": " ", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "class", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html entity.other.attribute-name.html", + "r": { + "dark_plus": "entity.other.attribute-name: #9CDCFE", + "light_plus": "entity.other.attribute-name: #FF0000", + "dark_vs": "entity.other.attribute-name: #9CDCFE", + "light_vs": "entity.other.attribute-name: #FF0000", + "hc_black": "entity.other.attribute-name: #9CDCFE" + } + }, + { + "c": "=", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html string.quoted.single.html punctuation.definition.string.begin.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "foo", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html string.quoted.single.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "'", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html string.quoted.single.html punctuation.definition.string.end.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "<", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html meta.scope.between-tag-pair.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "/", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "div", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html entity.name.tag.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": ">", + "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "", + "t": "text.html.basic meta.embedded.block.html meta.tag.metadata.script.html punctuation.definition.tag.end.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "<", + "t": "text.html.basic meta.tag.structure.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "body", + "t": "text.html.basic meta.tag.structure.any.html entity.name.tag.structure.any.html", + "r": { + "dark_plus": "entity.name.tag: #569CD6", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag: #569CD6", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag: #569CD6" + } + }, + { + "c": " ", + "t": "text.html.basic meta.tag.structure.any.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "class", + "t": "text.html.basic meta.tag.structure.any.html entity.other.attribute-name.html", + "r": { + "dark_plus": "entity.other.attribute-name: #9CDCFE", + "light_plus": "entity.other.attribute-name: #FF0000", + "dark_vs": "entity.other.attribute-name: #9CDCFE", + "light_vs": "entity.other.attribute-name: #FF0000", + "hc_black": "entity.other.attribute-name: #9CDCFE" + } + }, + { + "c": "=", + "t": "text.html.basic meta.tag.structure.any.html", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "'", + "t": "text.html.basic meta.tag.structure.any.html string.quoted.single.html punctuation.definition.string.begin.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "bar", + "t": "text.html.basic meta.tag.structure.any.html string.quoted.single.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": "'", + "t": "text.html.basic meta.tag.structure.any.html string.quoted.single.html punctuation.definition.string.end.html", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string.quoted.single.html: #0000FF", + "dark_vs": "string: #CE9178", + "light_vs": "string.quoted.single.html: #0000FF", + "hc_black": "string: #CE9178" + } + }, + { + "c": ">", + "t": "text.html.basic meta.tag.structure.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "", + "t": "text.html.basic meta.tag.structure.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + }, + { + "c": "", + "t": "text.html.basic meta.tag.structure.any.html punctuation.definition.tag.html", + "r": { + "dark_plus": "punctuation.definition.tag: #808080", + "light_plus": "punctuation.definition.tag: #800000", + "dark_vs": "punctuation.definition.tag: #808080", + "light_vs": "punctuation.definition.tag: #800000", + "hc_black": "punctuation.definition.tag: #808080" + } + } +] \ No newline at end of file From e2721f46cf49a0872d9c463f9be3daff85d65d6e Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 8 May 2017 15:22:23 +0200 Subject: [PATCH 0258/2747] make inline the default snippet sort, fixes #26182 --- src/vs/editor/common/config/defaultConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/common/config/defaultConfig.ts b/src/vs/editor/common/config/defaultConfig.ts index b7224baf580c2..0662f2bf9e1e0 100644 --- a/src/vs/editor/common/config/defaultConfig.ts +++ b/src/vs/editor/common/config/defaultConfig.ts @@ -96,7 +96,7 @@ class ConfigClass implements IConfiguration { suggestOnTriggerCharacters: true, acceptSuggestionOnEnter: true, acceptSuggestionOnCommitCharacter: true, - snippetSuggestions: 'bottom', + snippetSuggestions: 'inline', emptySelectionClipboard: true, wordBasedSuggestions: true, suggestFontSize: 0, From ae5c28306b8db90d0b9d7c4af976c2fa76237bb5 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 8 May 2017 08:12:33 -0700 Subject: [PATCH 0259/2747] Pick up updated js/ts grammar (#26094) --- .../syntaxes/JavaScript.tmLanguage.json | 27 ++++++++++++++----- .../test/colorize-results/test_jsx.json | 6 ++--- .../syntaxes/TypeScriptReact.tmLanguage.json | 27 ++++++++++++++----- 3 files changed, 45 insertions(+), 15 deletions(-) diff --git a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json index 7d5f08c0d4948..ec077b65656fe 100644 --- a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json +++ b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json @@ -4008,8 +4008,8 @@ }, "jsx-tag-without-attributes": { "name": "meta.tag.without-attributes.js", - "begin": "(<)\\s*([_$a-zA-Z][-$\\w.]*(?)", - "end": "()", + "begin": "(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?)", + "end": "()", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.js" @@ -4018,6 +4018,9 @@ "name": "entity.name.tag.js" }, "3": { + "name": "support.class.component.js" + }, + "4": { "name": "punctuation.definition.tag.end.js" } }, @@ -4029,6 +4032,9 @@ "name": "entity.name.tag.js" }, "3": { + "name": "support.class.component.js" + }, + "4": { "name": "punctuation.definition.tag.end.js" } }, @@ -4041,7 +4047,7 @@ }, "jsx-tag-in-expression": { "begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?!(<)\\s*([_$a-zA-Z][-$\\w.]*(?)) #look ahead is not start of tag without attributes\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?))", - "end": "(/>)|(?:())", + "end": "(/>)|(?:())", "endCaptures": { "0": { "name": "meta.tag.js" @@ -4056,6 +4062,9 @@ "name": "entity.name.tag.js" }, "4": { + "name": "support.class.component.js" + }, + "5": { "name": "punctuation.definition.tag.end.js" } }, @@ -4067,7 +4076,7 @@ }, "jsx-child-tag": { "begin": "(?x)\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?))", - "end": "(/>)|(?:())", + "end": "(/>)|(?:())", "endCaptures": { "0": { "name": "meta.tag.js" @@ -4082,6 +4091,9 @@ "name": "entity.name.tag.js" }, "4": { + "name": "support.class.component.js" + }, + "5": { "name": "punctuation.definition.tag.end.js" } }, @@ -4097,13 +4109,16 @@ "end": "(?=(/>)|(?:()))", "patterns": [ { - "begin": "(?x)\n (<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?)", + "begin": "(?x)\n (<)\\s*\n ((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.js" }, "2": { "name": "entity.name.tag.js" + }, + "3": { + "name": "support.class.component.js" } }, "end": "(?=[/]?>)", @@ -4173,5 +4188,5 @@ ] } }, - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/9f6676aa2ddb75cb5a9dbe1f59024069e839d986" + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/cb1af7953db224204607cbe22d3a45aa0f77a4c1" } \ No newline at end of file diff --git a/extensions/javascript/test/colorize-results/test_jsx.json b/extensions/javascript/test/colorize-results/test_jsx.json index eaf452df0d2f5..65e9462cc4056 100644 --- a/extensions/javascript/test/colorize-results/test_jsx.json +++ b/extensions/javascript/test/colorize-results/test_jsx.json @@ -2157,10 +2157,10 @@ }, { "c": "ToggleText", - "t": "source.js meta.tag.js entity.name.tag.js", + "t": "source.js meta.tag.js entity.name.tag.js support.class.component.js", "r": { - "dark_plus": "entity.name.tag: #569CD6", - "light_plus": "entity.name.tag: #800000", + "dark_plus": "support.class: #4EC9B0", + "light_plus": "support.class: #267F99", "dark_vs": "entity.name.tag: #569CD6", "light_vs": "entity.name.tag: #800000", "hc_black": "entity.name.tag: #569CD6" diff --git a/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json b/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json index 3781e7bc5dcfe..c20889881a13e 100644 --- a/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json +++ b/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json @@ -4005,8 +4005,8 @@ }, "jsx-tag-without-attributes": { "name": "meta.tag.without-attributes.tsx", - "begin": "(<)\\s*([_$a-zA-Z][-$\\w.]*(?)", - "end": "()", + "begin": "(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?)", + "end": "()", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.tsx" @@ -4015,6 +4015,9 @@ "name": "entity.name.tag.tsx" }, "3": { + "name": "support.class.component.tsx" + }, + "4": { "name": "punctuation.definition.tag.end.tsx" } }, @@ -4026,6 +4029,9 @@ "name": "entity.name.tag.tsx" }, "3": { + "name": "support.class.component.tsx" + }, + "4": { "name": "punctuation.definition.tag.end.tsx" } }, @@ -4038,7 +4044,7 @@ }, "jsx-tag-in-expression": { "begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?!(<)\\s*([_$a-zA-Z][-$\\w.]*(?)) #look ahead is not start of tag without attributes\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?))", - "end": "(/>)|(?:())", + "end": "(/>)|(?:())", "endCaptures": { "0": { "name": "meta.tag.tsx" @@ -4053,6 +4059,9 @@ "name": "entity.name.tag.tsx" }, "4": { + "name": "support.class.component.tsx" + }, + "5": { "name": "punctuation.definition.tag.end.tsx" } }, @@ -4064,7 +4073,7 @@ }, "jsx-child-tag": { "begin": "(?x)\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?))", - "end": "(/>)|(?:())", + "end": "(/>)|(?:())", "endCaptures": { "0": { "name": "meta.tag.tsx" @@ -4079,6 +4088,9 @@ "name": "entity.name.tag.tsx" }, "4": { + "name": "support.class.component.tsx" + }, + "5": { "name": "punctuation.definition.tag.end.tsx" } }, @@ -4094,13 +4106,16 @@ "end": "(?=(/>)|(?:()))", "patterns": [ { - "begin": "(?x)\n (<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?)", + "begin": "(?x)\n (<)\\s*\n ((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.tsx" }, "2": { "name": "entity.name.tag.tsx" + }, + "3": { + "name": "support.class.component.tsx" } }, "end": "(?=[/]?>)", @@ -4170,5 +4185,5 @@ ] } }, - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/9f6676aa2ddb75cb5a9dbe1f59024069e839d986" + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/cb1af7953db224204607cbe22d3a45aa0f77a4c1" } \ No newline at end of file From 6605a9ec3fc6059f5c817ecd3be50d3e6c5e47be Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 8 May 2017 17:36:47 +0200 Subject: [PATCH 0260/2747] theming - introduce input.placeholderForeground for placeholder foreground --- src/vs/platform/theme/common/colorRegistry.ts | 2 ++ src/vs/workbench/electron-browser/shell.ts | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 21ead0e0272cf..21c786197cbbf 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -143,6 +143,8 @@ export const inputBackground = registerColor('input.background', { dark: '#3C3C3 export const inputForeground = registerColor('input.foreground', { dark: foreground, light: foreground, hc: foreground }, nls.localize('inputBoxForeground', "Input box foreground.")); export const inputBorder = registerColor('input.border', { dark: null, light: null, hc: contrastBorder }, nls.localize('inputBoxBorder', "Input box border.")); export const inputActiveOptionBorder = registerColor('inputOption.activeBorder', { dark: '#007ACC', light: '#007ACC', hc: activeContrastBorder }, nls.localize('inputBoxActiveOptionBorder', "Border color of activated options in input fields.")); +export const inputPlaceholderForeground = registerColor('input.placeholderForeground', { dark: null, light: null, hc: null }, nls.localize('inputPlaceholderForeground', "Input box foreground color for placeholder text.")); + export const inputValidationInfoBackground = registerColor('inputValidation.infoBackground', { dark: '#063B49', light: '#D6ECF2', hc: Color.black }, nls.localize('inputValidationInfoBackground', "Input validation background color for information severity.")); export const inputValidationInfoBorder = registerColor('inputValidation.infoBorder', { dark: '#55AAFF', light: '#55AAFF', hc: '#6FC3DF' }, nls.localize('inputValidationInfoBorder', "Input validation border color for information severity.")); export const inputValidationWarningBackground = registerColor('inputValidation.warningBackground', { dark: '#352A05', light: '#F6F5D2', hc: Color.black }, nls.localize('inputValidationWarningBackground', "Input validation background color for information warning.")); diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 9e003eda0d762..728af5751c199 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -103,7 +103,7 @@ import 'vs/platform/opener/browser/opener.contribution'; import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { WorkbenchThemeService } from 'vs/workbench/services/themes/electron-browser/workbenchThemeService'; import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; -import { foreground, selectionBackground, focusBorder, scrollbarShadow, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground, listHighlightForeground } from 'vs/platform/theme/common/colorRegistry'; +import { foreground, selectionBackground, focusBorder, scrollbarShadow, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground, listHighlightForeground, inputPlaceholderForeground } from 'vs/platform/theme/common/colorRegistry'; /** * Services that we require for the Shell @@ -535,6 +535,13 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { collector.addRule(`.monaco-shell ::selection { background-color: ${windowSelectionBackground}; }`); } + // Input placeholder + const placeholderForeground = theme.getColor(inputPlaceholderForeground); + if (placeholderForeground) { + collector.addRule(`.monaco-shell input::-webkit-input-placeholder { color: ${placeholderForeground}; }`); + collector.addRule(`.monaco-shell textarea::-webkit-input-placeholder { color: ${placeholderForeground}; }`); + } + // List highlight const listHighlightForegroundColor = theme.getColor(listHighlightForeground); if (listHighlightForegroundColor) { From 8425399f03ff5b3968659791c0692adf11353edd Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 8 May 2017 17:48:34 +0200 Subject: [PATCH 0261/2747] Support for list.inactiveSelectionForeground (fixes #25774) --- src/vs/base/browser/ui/list/listWidget.ts | 5 +++++ src/vs/base/parts/tree/browser/tree.ts | 1 + src/vs/base/parts/tree/browser/treeView.ts | 2 +- src/vs/platform/theme/common/colorRegistry.ts | 1 + src/vs/platform/theme/common/styler.ts | 6 +++++- 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts index 5750f6df6e03a..6aac291fb23ee 100644 --- a/src/vs/base/browser/ui/list/listWidget.ts +++ b/src/vs/base/browser/ui/list/listWidget.ts @@ -410,6 +410,7 @@ export interface IListStyles { listFocusAndSelectionBackground?: Color; listFocusAndSelectionForeground?: Color; listInactiveSelectionBackground?: Color; + listInactiveSelectionForeground?: Color; listInactiveFocusBackground?: Color; listHoverBackground?: Color; listDropBackground?: Color; @@ -844,6 +845,10 @@ export class List implements ISpliceable, IDisposable { content.push(`.monaco-list.${this.idPrefix} .monaco-list-row.selected:hover { background-color: ${styles.listInactiveSelectionBackground}; }`); // overwrite :hover style in this case! } + if (styles.listInactiveSelectionForeground) { + content.push(`.monaco-list.${this.idPrefix} .monaco-list-row.selected { color: ${styles.listInactiveSelectionForeground}; }`); + } + if (styles.listHoverBackground) { content.push(`.monaco-list.${this.idPrefix} .monaco-list-row:hover { background-color: ${styles.listHoverBackground}; }`); } diff --git a/src/vs/base/parts/tree/browser/tree.ts b/src/vs/base/parts/tree/browser/tree.ts index 59ecc80ad6673..0d253f2b08302 100644 --- a/src/vs/base/parts/tree/browser/tree.ts +++ b/src/vs/base/parts/tree/browser/tree.ts @@ -670,6 +670,7 @@ export interface ITreeStyles { listFocusAndSelectionBackground?: Color; listFocusAndSelectionForeground?: Color; listInactiveSelectionBackground?: Color; + listInactiveSelectionForeground?: Color; listHoverBackground?: Color; listDropBackground?: Color; listFocusOutline?: Color; diff --git a/src/vs/base/parts/tree/browser/treeView.ts b/src/vs/base/parts/tree/browser/treeView.ts index 549608374c158..5fd3c01a37311 100644 --- a/src/vs/base/parts/tree/browser/treeView.ts +++ b/src/vs/base/parts/tree/browser/treeView.ts @@ -562,7 +562,7 @@ export class TreeView extends HeightMap { .monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: ${styles.listFocusBackground}; } .monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${styles.listActiveSelectionBackground}; color: ${styles.listActiveSelectionForeground}; } .monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: ${styles.listFocusAndSelectionBackground}; color: ${styles.listFocusAndSelectionForeground}; } - .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${styles.listInactiveSelectionBackground}; } + .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${styles.listInactiveSelectionBackground}; color: ${styles.listInactiveSelectionForeground}; } .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: ${styles.listHoverBackground}; } .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-wrapper.drop-target, .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: ${styles.listDropBackground} !important; } diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 21c786197cbbf..03dc2d24ddaa6 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -160,6 +160,7 @@ export const listFocusBackground = registerColor('list.focusBackground', { dark: export const listActiveSelectionBackground = registerColor('list.activeSelectionBackground', { dark: '#094771', light: '#3399FF', hc: null }, nls.localize('listActiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); export const listInactiveSelectionBackground = registerColor('list.inactiveSelectionBackground', { dark: '#3F3F46', light: '#CCCEDB', hc: null }, nls.localize('listInactiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); export const listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('listActiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); +export const listInactiveSelectionForeground = registerColor('list.inactiveSelectionForeground', { dark: null, light: null, hc: null }, nls.localize('listInactiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); export const listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, nls.localize('listHoverBackground', "List/Tree background when hovering over items using the mouse.")); export const listDropBackground = registerColor('list.dropBackground', { dark: listFocusBackground, light: listFocusBackground, hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse.")); export const listHighlightForeground = registerColor('list.highlightForeground', { dark: '#0097fb', light: '#007acc', hc: focusBorder }, nls.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.')); diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index 017fca395edc9..46b5f1bd0fa70 100644 --- a/src/vs/platform/theme/common/styler.ts +++ b/src/vs/platform/theme/common/styler.ts @@ -6,7 +6,7 @@ 'use strict'; import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; -import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, lighten } from 'vs/platform/theme/common/colorRegistry'; +import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, lighten } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable } from 'vs/base/common/lifecycle'; import { SIDE_BAR_SECTION_HEADER_BACKGROUND } from 'vs/workbench/common/theme'; @@ -122,6 +122,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer listFocusAndSelectionBackground?: ColorIdentifier, listFocusAndSelectionForeground?: ColorIdentifier, listInactiveSelectionBackground?: ColorIdentifier, + listInactiveSelectionForeground?: ColorIdentifier, listHoverBackground?: ColorIdentifier, listDropBackground?: ColorIdentifier, listFocusOutline?: ColorIdentifier, @@ -150,6 +151,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer listFocusAndSelectionBackground: style && style.listFocusAndSelectionBackground || listActiveSelectionBackground, listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listActiveSelectionForeground, listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground, + listInactiveSelectionForeground: (style && style.listInactiveSelectionForeground) || listInactiveSelectionForeground, listHoverBackground: (style && style.listHoverBackground) || listHoverBackground, listDropBackground: (style && style.listDropBackground) || listDropBackground, listFocusOutline: (style && style.listFocusOutline) || activeContrastBorder, @@ -166,6 +168,7 @@ export function attachListStyler(widget: IThemable, themeService: IThemeService, listFocusAndSelectionForeground?: ColorIdentifier, listInactiveFocusBackground?: ColorIdentifier, listInactiveSelectionBackground?: ColorIdentifier, + listInactiveSelectionForeground?: ColorIdentifier, listHoverBackground?: ColorIdentifier, listDropBackground?: ColorIdentifier, listFocusOutline?: ColorIdentifier, @@ -181,6 +184,7 @@ export function attachListStyler(widget: IThemable, themeService: IThemeService, listFocusAndSelectionForeground: (style && style.listFocusAndSelectionForeground) || listActiveSelectionForeground, listInactiveFocusBackground: (style && style.listInactiveFocusBackground), listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground, + listInactiveSelectionForeground: (style && style.listInactiveSelectionForeground) || listInactiveSelectionForeground, listHoverBackground: (style && style.listHoverBackground) || listHoverBackground, listDropBackground: (style && style.listDropBackground) || listDropBackground, listFocusOutline: (style && style.listFocusOutline) || activeContrastBorder, From 7432cfa1eee9b6ca293e31e6b1f469fb7d93d49b Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 8 May 2017 17:52:45 +0200 Subject: [PATCH 0262/2747] panel.border isn't being applied when contrast color is specified (fixes #26074) --- src/vs/workbench/browser/parts/panel/panelPart.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index 3d7c435ff9c2a..799e4ecc9c46f 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -104,7 +104,7 @@ export class PanelPart extends CompositePart implements IPanelService { container.style('background-color', this.getColor(PANEL_BACKGROUND)); const title = this.getTitleArea(); - title.style('border-top-color', this.getColor(contrastBorder) || this.getColor(PANEL_BORDER_COLOR)); + title.style('border-top-color', this.getColor(PANEL_BORDER_COLOR) || this.getColor(contrastBorder)); } public openPanel(id: string, focus?: boolean): TPromise { From 228ac262b861c4606f89e546098dceccc2a183fa Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 8 May 2017 18:40:34 +0200 Subject: [PATCH 0263/2747] themes - let more specific border colors win over contrastBorder color --- .../parts/activitybar/activitybarActions.ts | 8 ++--- .../parts/activitybar/activitybarPart.ts | 16 ++++----- .../parts/editor/editorGroupsControl.ts | 34 +++++++++---------- .../browser/parts/editor/tabsTitleControl.ts | 16 ++++----- .../browser/parts/sidebar/sidebarPart.ts | 14 ++++---- .../browser/parts/statusbar/statusbarPart.ts | 8 ++--- src/vs/workbench/electron-browser/window.ts | 10 +++--- .../parts/debug/browser/debugActionsWidget.ts | 8 ++--- .../electron-browser/extensionsViewlet.ts | 8 ++--- 9 files changed, 61 insertions(+), 61 deletions(-) diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts index a6cbc397306ec..be928651ff28a 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts @@ -176,14 +176,14 @@ export class ActivityActionItem extends ThemableActivityActionItem { if (this.$badgeContent) { const badgeForeground = theme.getColor(ACTIVITY_BAR_BADGE_FOREGROUND); const badgeBackground = theme.getColor(ACTIVITY_BAR_BADGE_BACKGROUND); - const hcBorder = theme.getColor(contrastBorder); + const contrastBorderColor = theme.getColor(contrastBorder); this.$badgeContent.style('color', badgeForeground ? badgeForeground.toString() : null); this.$badgeContent.style('background-color', badgeBackground ? badgeBackground.toString() : null); - this.$badgeContent.style('border-style', hcBorder ? 'solid' : null); - this.$badgeContent.style('border-width', hcBorder ? '1px' : null); - this.$badgeContent.style('border-color', hcBorder ? hcBorder.toString() : null); + this.$badgeContent.style('border-style', contrastBorderColor ? 'solid' : null); + this.$badgeContent.style('border-width', contrastBorderColor ? '1px' : null); + this.$badgeContent.style('border-color', contrastBorderColor ? contrastBorderColor.toString() : null); } } diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index ccb1b35f22398..a40dd7dd62153 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -216,15 +216,15 @@ export class ActivitybarPart extends Part implements IActivityBarService { const background = this.getColor(ACTIVITY_BAR_BACKGROUND); container.style('background-color', background); - const hcBorder = this.getColor(contrastBorder); + const contrastBorderColor = this.getColor(contrastBorder); const isPositionLeft = this.partService.getSideBarPosition() === SideBarPosition.LEFT; - container.style('box-sizing', hcBorder && isPositionLeft ? 'border-box' : null); - container.style('border-right-width', hcBorder && isPositionLeft ? '1px' : null); - container.style('border-right-style', hcBorder && isPositionLeft ? 'solid' : null); - container.style('border-right-color', isPositionLeft ? hcBorder : null); - container.style('border-left-width', hcBorder && !isPositionLeft ? '1px' : null); - container.style('border-left-style', hcBorder && !isPositionLeft ? 'solid' : null); - container.style('border-left-color', !isPositionLeft ? hcBorder : null); + container.style('box-sizing', contrastBorderColor && isPositionLeft ? 'border-box' : null); + container.style('border-right-width', contrastBorderColor && isPositionLeft ? '1px' : null); + container.style('border-right-style', contrastBorderColor && isPositionLeft ? 'solid' : null); + container.style('border-right-color', isPositionLeft ? contrastBorderColor : null); + container.style('border-left-width', contrastBorderColor && !isPositionLeft ? '1px' : null); + container.style('border-left-style', contrastBorderColor && !isPositionLeft ? 'solid' : null); + container.style('border-left-color', !isPositionLeft ? contrastBorderColor : null); } private showContextMenu(e: MouseEvent): void { diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index d19a3395f438f..898e5b288e858 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -1009,19 +1009,19 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro silo.style('background-color', this.getColor(editorBackground)); // Border - silo.style('border-left-color', index > Position.ONE ? (this.getColor(contrastBorder) || this.getColor(EDITOR_GROUP_BORDER_COLOR)) : null); - silo.style('border-top-color', index > Position.ONE ? (this.getColor(contrastBorder) || this.getColor(EDITOR_GROUP_BORDER_COLOR)) : null); + silo.style('border-left-color', index > Position.ONE ? (this.getColor(EDITOR_GROUP_BORDER_COLOR) || this.getColor(contrastBorder)) : null); + silo.style('border-top-color', index > Position.ONE ? (this.getColor(EDITOR_GROUP_BORDER_COLOR) || this.getColor(contrastBorder)) : null); }); // Title control POSITIONS.forEach(position => { const container = this.getTitleAreaControl(position).getContainer(); - const hcBorder = this.getColor(contrastBorder); + const contrastBorderColor = this.getColor(contrastBorder); container.style.backgroundColor = this.getColor(this.tabOptions.showTabs ? TABS_CONTAINER_BACKGROUND : EDITOR_GROUP_HEADER_BACKGROUND); - container.style.borderBottomWidth = (hcBorder && this.tabOptions.showTabs) ? '1px' : null; - container.style.borderBottomStyle = (hcBorder && this.tabOptions.showTabs) ? 'solid' : null; - container.style.borderBottomColor = this.tabOptions.showTabs ? hcBorder : null; + container.style.borderBottomWidth = (contrastBorderColor && this.tabOptions.showTabs) ? '1px' : null; + container.style.borderBottomStyle = (contrastBorderColor && this.tabOptions.showTabs) ? 'solid' : null; + container.style.borderBottomColor = this.tabOptions.showTabs ? contrastBorderColor : null; }); } @@ -1226,15 +1226,15 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro const containers = $this.visibleEditors.filter(e => !!e).map(e => e.getContainer()); containers.forEach((container, index) => { if (container && DOM.isAncestor(target, container.getHTMLElement())) { - const hcOutline = $this.getColor(activeContrastBorder); + const activeContrastBorderColor = $this.getColor(activeContrastBorder); overlay = $('div').style({ top: $this.tabOptions.showTabs ? `${EditorGroupsControl.EDITOR_TITLE_HEIGHT}px` : 0, height: $this.tabOptions.showTabs ? `calc(100% - ${EditorGroupsControl.EDITOR_TITLE_HEIGHT}px` : '100%', backgroundColor: $this.getColor(EDITOR_DRAG_AND_DROP_BACKGROUND), - outlineColor: hcOutline, - outlineOffset: hcOutline ? '-2px' : null, - outlineStyle: hcOutline ? 'dashed' : null, - outlineWidth: hcOutline ? '2px' : null + outlineColor: activeContrastBorderColor, + outlineOffset: activeContrastBorderColor ? '-2px' : null, + outlineStyle: activeContrastBorderColor ? 'dashed' : null, + outlineWidth: activeContrastBorderColor ? '2px' : null }).id(overlayId); overlay.appendTo(container); @@ -1555,7 +1555,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro if (isDragging) { this.parent.addClass('dragging'); silo.addClass('dragging'); - borderColor = (this.getColor(contrastBorder) || this.getColor(EDITOR_GROUP_BORDER_COLOR)); + borderColor = this.getColor(EDITOR_GROUP_BORDER_COLOR) || this.getColor(contrastBorder); } else { this.parent.removeClass('dragging'); silo.removeClass('dragging'); @@ -1575,11 +1575,11 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro const background = this.getColor(isDropping ? EDITOR_DRAG_AND_DROP_BACKGROUND : groupCount > 0 ? EDITOR_GROUP_BACKGROUND : null); element.style.backgroundColor = background; - const hcOutline = this.getColor(activeContrastBorder); - element.style.outlineColor = isDropping ? hcOutline : null; - element.style.outlineStyle = isDropping && hcOutline ? 'dashed' : null; - element.style.outlineWidth = isDropping && hcOutline ? '2px' : null; - element.style.outlineOffset = isDropping && hcOutline ? '-2px' : null; + const activeContrastBorderColor = this.getColor(activeContrastBorder); + element.style.outlineColor = isDropping ? activeContrastBorderColor : null; + element.style.outlineStyle = isDropping && activeContrastBorderColor ? 'dashed' : null; + element.style.outlineWidth = isDropping && activeContrastBorderColor ? '2px' : null; + element.style.outlineOffset = isDropping && activeContrastBorderColor ? '-2px' : null; } private posSilo(pos: number, leftTop: string | number, rightBottom?: string | number, borderLeftTopWidth?: string | number): void { diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index f893b2505ca61..3999342995253 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -219,16 +219,16 @@ export class TabsTitleControl extends TitleControl { element.style.backgroundColor = isDND ? this.getColor(EDITOR_DRAG_AND_DROP_BACKGROUND) : noDNDBackgroundColor; // Outline - const hcOutline = this.getColor(activeContrastBorder); - if (hcOutline && isDND) { + const activeContrastBorderColor = this.getColor(activeContrastBorder); + if (activeContrastBorderColor && isDND) { element.style.outlineWidth = '2px'; element.style.outlineStyle = 'dashed'; - element.style.outlineColor = hcOutline; + element.style.outlineColor = activeContrastBorderColor; element.style.outlineOffset = isTab ? '-5px' : '-3px'; } else { element.style.outlineWidth = null; element.style.outlineStyle = null; - element.style.outlineColor = hcOutline; + element.style.outlineColor = activeContrastBorderColor; element.style.outlineOffset = null; } } @@ -272,8 +272,8 @@ export class TabsTitleControl extends TitleControl { // Container tabContainer.setAttribute('aria-label', `${name}, tab`); tabContainer.title = title; - tabContainer.style.borderLeftColor = (index !== 0) ? (this.getColor(contrastBorder) || this.getColor(TAB_BORDER)) : null; - tabContainer.style.borderRightColor = (index === editorsOfGroup.length - 1) ? (this.getColor(contrastBorder) || this.getColor(TAB_BORDER)) : null; + tabContainer.style.borderLeftColor = (index !== 0) ? (this.getColor(TAB_BORDER) || this.getColor(contrastBorder)) : null;; + tabContainer.style.borderRightColor = (index === editorsOfGroup.length - 1) ? (this.getColor(TAB_BORDER) || this.getColor(contrastBorder)) : null;; tabContainer.style.outlineColor = this.getColor(activeContrastBorder); const tabOptions = this.editorGroupService.getTabOptions(); @@ -763,8 +763,8 @@ class TabActionRunner extends ActionRunner { registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { // Styling with Outline color (e.g. high contrast theme) - const outline = theme.getColor(activeContrastBorder); - if (outline) { + const activeContrastBorderColor = theme.getColor(activeContrastBorder); + if (activeContrastBorderColor) { collector.addRule(` .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.active, .monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.active:hover { diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index bf46d02791d1b..7c0e4827a2d29 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -83,14 +83,14 @@ export class SidebarPart extends CompositePart { container.style('background-color', this.getColor(SIDE_BAR_BACKGROUND)); - const hcBorder = this.getColor(contrastBorder); + const contrastBorderColor = this.getColor(contrastBorder); const isPositionLeft = this.partService.getSideBarPosition() === SideBarPosition.LEFT; - container.style('border-right-width', hcBorder && isPositionLeft ? '1px' : null); - container.style('border-right-style', hcBorder && isPositionLeft ? 'solid' : null); - container.style('border-right-color', isPositionLeft ? hcBorder : null); - container.style('border-left-width', hcBorder && !isPositionLeft ? '1px' : null); - container.style('border-left-style', hcBorder && !isPositionLeft ? 'solid' : null); - container.style('border-left-color', !isPositionLeft ? hcBorder : null); + container.style('border-right-width', contrastBorderColor && isPositionLeft ? '1px' : null); + container.style('border-right-style', contrastBorderColor && isPositionLeft ? 'solid' : null); + container.style('border-right-color', isPositionLeft ? contrastBorderColor : null); + container.style('border-left-width', contrastBorderColor && !isPositionLeft ? '1px' : null); + container.style('border-left-style', contrastBorderColor && !isPositionLeft ? 'solid' : null); + container.style('border-left-color', !isPositionLeft ? contrastBorderColor : null); } public openViewlet(id: string, focus?: boolean): TPromise { diff --git a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts index 4fa06dbfe4fcf..464a368ab25a8 100644 --- a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts +++ b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts @@ -139,10 +139,10 @@ export class StatusbarPart extends Part implements IStatusbarService { container.style('color', this.getColor(STATUS_BAR_FOREGROUND)); container.style('background-color', this.getColor(this.contextService.hasWorkspace() ? STATUS_BAR_BACKGROUND : STATUS_BAR_NO_FOLDER_BACKGROUND)); - const hcBorder = this.getColor(contrastBorder); - container.style('border-top-width', hcBorder ? '1px' : null); - container.style('border-top-style', hcBorder ? 'solid' : null); - container.style('border-top-color', hcBorder); + const contrastBorderColor = this.getColor(contrastBorder); + container.style('border-top-width', contrastBorderColor ? '1px' : null); + container.style('border-top-style', contrastBorderColor ? 'solid' : null); + container.style('border-top-color', contrastBorderColor); } private doCreateStatusItem(alignment: StatusbarAlignment, priority: number = 0): HTMLElement { diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index f779df1a85890..3873284472dd7 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -134,17 +134,17 @@ export class ElectronWindow extends Themable { // Find out if folders are dragged and show the appropiate feedback then this.includesFolder(draggedExternalResources).done(includesFolder => { if (includesFolder) { - const hcOutline = this.getColor(activeContrastBorder); + const activeContrastBorderColor = this.getColor(activeContrastBorder); dropOverlay = $(window.document.getElementById(this.partService.getWorkbenchElementId())) .div({ id: 'monaco-workbench-drop-overlay' }) .style({ backgroundColor: this.getColor(EDITOR_DRAG_AND_DROP_BACKGROUND), - outlineColor: hcOutline, - outlineOffset: hcOutline ? '-2px' : null, - outlineStyle: hcOutline ? 'dashed' : null, - outlineWidth: hcOutline ? '2px' : null + outlineColor: activeContrastBorderColor, + outlineOffset: activeContrastBorderColor ? '-2px' : null, + outlineStyle: activeContrastBorderColor ? 'dashed' : null, + outlineWidth: activeContrastBorderColor ? '2px' : null }) .on(DOM.EventType.DROP, (e: DragEvent) => { DOM.EventHelper.stop(e, true); diff --git a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts index 2287c14feb293..549480112b913 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts @@ -149,10 +149,10 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi const widgetShadowColor = this.getColor(widgetShadow); this.$el.style('box-shadow', widgetShadowColor ? `0 5px 8px ${widgetShadowColor}` : null); - const hcBorder = this.getColor(contrastBorder); - this.$el.style('border-style', hcBorder ? 'solid' : null); - this.$el.style('border-width', hcBorder ? '1px' : null); - this.$el.style('border-color', hcBorder); + const contrastBorderColor = this.getColor(contrastBorder); + this.$el.style('border-style', contrastBorderColor ? 'solid' : null); + this.$el.style('border-width', contrastBorderColor ? '1px' : null); + this.$el.style('border-color', contrastBorderColor); } } diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts index 73345e9c66be7..eddc26ea8850b 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts @@ -146,14 +146,14 @@ export class ExtensionsViewlet extends Viewlet implements IExtensionsViewlet { public updateStyles(): void { super.updateStyles(); - const hcBorder = this.getColor(contrastBorder); + const contrastBorderColor = this.getColor(contrastBorder); this.searchBox.style.backgroundColor = this.getColor(inputBackground); this.searchBox.style.color = this.getColor(inputForeground); - this.searchBox.style.borderWidth = hcBorder ? '1px' : null; - this.searchBox.style.borderStyle = hcBorder ? 'solid' : null; - this.searchBox.style.borderColor = hcBorder; + this.searchBox.style.borderWidth = contrastBorderColor ? '1px' : null; + this.searchBox.style.borderStyle = contrastBorderColor ? 'solid' : null; + this.searchBox.style.borderColor = contrastBorderColor; } setVisible(visible: boolean): TPromise { From a7c753cf40169c2361aca65d7a8492794915e5f4 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 8 May 2017 19:02:52 +0200 Subject: [PATCH 0264/2747] `list.activeSelectionBackground` seems to have no effect for custom themes (fixes #25788) --- src/vs/base/browser/ui/list/listWidget.ts | 2 +- src/vs/base/parts/tree/browser/treeView.ts | 60 ++++++++++++++----- src/vs/platform/theme/common/colorRegistry.ts | 2 +- 3 files changed, 46 insertions(+), 18 deletions(-) diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts index 6aac291fb23ee..29795a31b9897 100644 --- a/src/vs/base/browser/ui/list/listWidget.ts +++ b/src/vs/base/browser/ui/list/listWidget.ts @@ -812,7 +812,7 @@ export class List implements ISpliceable, IDisposable { } style(styles: IListStyles): void { - let content: string[] = []; + const content: string[] = []; if (styles.listFocusBackground) { content.push(`.monaco-list.${this.idPrefix}:focus .monaco-list-row.focused { background-color: ${styles.listFocusBackground}; }`); diff --git a/src/vs/base/parts/tree/browser/treeView.ts b/src/vs/base/parts/tree/browser/treeView.ts index 5fd3c01a37311..5d40c9cd3d6fc 100644 --- a/src/vs/base/parts/tree/browser/treeView.ts +++ b/src/vs/base/parts/tree/browser/treeView.ts @@ -555,32 +555,60 @@ export class TreeView extends HeightMap { } public applyStyles(styles: _.ITreeStyles): void { + const content: string[] = []; - // Indicate selection/focus via background color - if (!styles.listFocusOutline) { - this.styleElement.innerHTML = ` - .monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: ${styles.listFocusBackground}; } - .monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${styles.listActiveSelectionBackground}; color: ${styles.listActiveSelectionForeground}; } - .monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: ${styles.listFocusAndSelectionBackground}; color: ${styles.listFocusAndSelectionForeground}; } - .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${styles.listInactiveSelectionBackground}; color: ${styles.listInactiveSelectionForeground}; } - .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: ${styles.listHoverBackground}; } + if (styles.listFocusBackground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: ${styles.listFocusBackground}; }`); + } + + if (styles.listActiveSelectionBackground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${styles.listActiveSelectionBackground}; }`); + } + + if (styles.listActiveSelectionForeground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: ${styles.listActiveSelectionForeground}; }`); + } + + if (styles.listFocusAndSelectionBackground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { background-color: ${styles.listFocusAndSelectionBackground}; }`); + } + + if (styles.listFocusAndSelectionForeground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.focused.selected:not(.highlighted) { color: ${styles.listFocusAndSelectionForeground}; }`); + } + + if (styles.listInactiveSelectionBackground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${styles.listInactiveSelectionBackground}; }`); + } + + if (styles.listInactiveSelectionForeground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: ${styles.listInactiveSelectionForeground}; }`); + } + + if (styles.listHoverBackground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: ${styles.listHoverBackground}; }`); + } + + if (styles.listDropBackground) { + content.push(` .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-wrapper.drop-target, - .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: ${styles.listDropBackground} !important; } - `; + .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: ${styles.listDropBackground} !important; } + `); } - // Indicate selection/focus via outline - else { - this.styleElement.innerHTML = ` - .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row { background: none !important; border: 1px solid transparent; } + if (styles.listFocusOutline) { + content.push(` + .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row { border: 1px solid transparent; } .monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { border: 1px dotted ${styles.listFocusOutline}; } .monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { border: 1px solid ${styles.listFocusOutline}; } .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { border: 1px solid ${styles.listFocusOutline}; } .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { border: 1px dashed ${styles.listFocusOutline}; } .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-wrapper.drop-target, - .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.drop-target { background: none !important; border: 1px dashed ${styles.listFocusOutline}; } - `; + .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.drop-target { border: 1px dashed ${styles.listFocusOutline}; } + `); } + + this.styleElement.innerHTML = content.join('\n'); } protected createViewItem(item: Model.Item): IViewItem { diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 03dc2d24ddaa6..326e185379777 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -159,7 +159,7 @@ export const selectBorder = registerColor('dropdown.border', { dark: selectBackg export const listFocusBackground = registerColor('list.focusBackground', { dark: '#073655', light: '#DCEBFC', hc: null }, nls.localize('listFocusBackground', "List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); export const listActiveSelectionBackground = registerColor('list.activeSelectionBackground', { dark: '#094771', light: '#3399FF', hc: null }, nls.localize('listActiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); export const listInactiveSelectionBackground = registerColor('list.inactiveSelectionBackground', { dark: '#3F3F46', light: '#CCCEDB', hc: null }, nls.localize('listInactiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); -export const listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('listActiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); +export const listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: Color.white, light: Color.white, hc: null }, nls.localize('listActiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); export const listInactiveSelectionForeground = registerColor('list.inactiveSelectionForeground', { dark: null, light: null, hc: null }, nls.localize('listInactiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); export const listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, nls.localize('listHoverBackground', "List/Tree background when hovering over items using the mouse.")); export const listDropBackground = registerColor('list.dropBackground', { dark: listFocusBackground, light: listFocusBackground, hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse.")); From 46ae36f9eb67dcf9d38c124f66a1e75448ac3512 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 8 May 2017 19:13:36 +0200 Subject: [PATCH 0265/2747] more correct snippet session --- .../contrib/snippet/browser/editorSnippets.ts | 152 +++++++++++++----- .../test/browser/editorSnippets.test.ts | 113 ++++++++++--- 2 files changed, 199 insertions(+), 66 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index 1f6729cc56268..5cfe6f303e5c6 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -6,44 +6,56 @@ 'use strict'; import { getLeadingWhitespace, compare } from 'vs/base/common/strings'; -import { ICommonCodeEditor, TrackedRangeStickiness } from 'vs/editor/common/editorCommon'; +import { ICommonCodeEditor, IModel, TrackedRangeStickiness, IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; import { EditOperation } from 'vs/editor/common/core/editOperation'; -import { TextmateSnippet, Placeholder } from '../common/snippetParser'; +import { TextmateSnippet, Placeholder, SnippetParser } from '../common/snippetParser'; import { Selection } from 'vs/editor/common/core/selection'; import { Range } from 'vs/editor/common/core/range'; +import { IPosition } from 'vs/editor/common/core/position'; +import { dispose } from 'vs/base/common/lifecycle'; class OneSnippet { private readonly _editor: ICommonCodeEditor; - private readonly _placeholderDecoration = new Map(); - private readonly _placeholderGroups: Placeholder[][]; + private readonly _snippet: TextmateSnippet; + private readonly _offset: number; + private _placeholderDecorations: Map; + private _placeholderGroups: Placeholder[][]; private _placeholderGroupsIdx: number; - constructor(editor: ICommonCodeEditor, selection: Selection, snippet: TextmateSnippet) { - + constructor(editor: ICommonCodeEditor, snippet: TextmateSnippet, offset: number) { this._editor = editor; + this._snippet = snippet; + this._offset = offset; + } - // for each selection get the leading 'reference'-whitespace and adjust the snippet accordingly. - const model = editor.getModel(); - const line = model.getLineContent(selection.startLineNumber); - const leadingWhitespace = getLeadingWhitespace(line, 0, selection.startColumn - 1); - snippet = snippet.withIndentation(whitespace => model.normalizeIndentation(leadingWhitespace + whitespace)); + dispose(): void { + if (this._placeholderDecorations) { + this._editor.changeDecorations(accessor => this._placeholderDecorations.forEach(handle => accessor.removeDecoration(handle))); + } + } - const offset = model.getOffsetAt(selection.getStartPosition()); + private _init(): void { - this._editor.executeEdits('onesnieppt', [EditOperation.replaceMove(selection, snippet.value)]); + if (this._placeholderDecorations) { + // already initialized + return; + } + + this._placeholderDecorations = new Map(); + const model = this._editor.getModel(); // create a decoration (tracked range) for each placeholder this._editor.changeDecorations(accessor => { let lastRange: Range; - for (const placeholder of snippet.getPlaceholders()) { - const placeholderOffset = snippet.offset(placeholder); - const placeholderLen = snippet.len(placeholder); - const start = model.getPositionAt(offset + placeholderOffset); - const end = model.getPositionAt(offset + placeholderOffset + placeholderLen); + for (const placeholder of this._snippet.getPlaceholders()) { + const placeholderOffset = this._snippet.offset(placeholder); + const placeholderLen = this._snippet.len(placeholder); + const start = model.getPositionAt(this._offset + placeholderOffset); + const end = model.getPositionAt(this._offset + placeholderOffset + placeholderLen); const range = new Range(start.lineNumber, start.column, end.lineNumber, end.column); let stickiness: TrackedRangeStickiness; @@ -54,7 +66,7 @@ class OneSnippet { } const handle = accessor.addDecoration(range, { stickiness }); - this._placeholderDecoration.set(placeholder, handle); + this._placeholderDecorations.set(placeholder, handle); lastRange = range; } @@ -63,7 +75,7 @@ class OneSnippet { this._placeholderGroupsIdx = -1; this._placeholderGroups = []; let lastBucket: Placeholder[]; - snippet.getPlaceholders().sort((a, b) => compare(a.name, b.name)).reverse().forEach(a => { + this._snippet.getPlaceholders().sort((a, b) => compare(a.name, b.name)).reverse().forEach(a => { if (!lastBucket || lastBucket[0].name !== a.name) { lastBucket = [a]; this._placeholderGroups.push(lastBucket); @@ -73,47 +85,107 @@ class OneSnippet { }); } - dispose(): void { - this._editor.changeDecorations(accessor => this._placeholderDecoration.forEach(handle => accessor.removeDecoration(handle))); - } + move(fwd: boolean): Selection[] { - next(): Selection[] { - this._placeholderGroupsIdx += 1; - if (this._placeholderGroupsIdx >= this._placeholderGroups.length) { + this._init(); + + if (fwd && this._placeholderGroupsIdx < this._placeholderGroups.length - 1) { + this._placeholderGroupsIdx += 1; + return this._getCurrentPlaceholderSelections(); + + } else if (!fwd && this._placeholderGroupsIdx > 0) { + this._placeholderGroupsIdx -= 1; + return this._getCurrentPlaceholderSelections(); + + } else { return undefined; } - const ranges: Selection[] = []; + } + + + private _getCurrentPlaceholderSelections(): Selection[] { + const selections: Selection[] = []; for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) { - const handle = this._placeholderDecoration.get(placeholder); + const handle = this._placeholderDecorations.get(placeholder); const range = this._editor.getModel().getDecorationRange(handle); - ranges.push(new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)); + selections.push(new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)); } - return ranges; + return selections; } } export class SnippetSession { + static normalizeWhitespace(model: IModel, position: IPosition, template: string): string { + + const line = model.getLineContent(position.lineNumber); + const lineLeadingWhitespace = getLeadingWhitespace(line, 0, position.column - 1); + const templateLines = template.split(/\r\n|\r|\n/); + + for (let i = 0; i < templateLines.length; i++) { + let templateLeadingWhitespace = getLeadingWhitespace(templateLines[i]); + if (templateLeadingWhitespace.length > 0) { + templateLines[i] = model.normalizeIndentation(lineLeadingWhitespace + templateLeadingWhitespace) + templateLines[i].substr(templateLeadingWhitespace.length); + } + } + return templateLines.join(model.getEOL()); + } + private readonly _editor: ICommonCodeEditor; - private readonly _snippets: OneSnippet[] = []; + private readonly _snippets: OneSnippet[]; - constructor(editor: ICommonCodeEditor, snippet: TextmateSnippet) { + constructor(editor: ICommonCodeEditor, template: string) { this._editor = editor; - this._editor.pushUndoStop(); + this._snippets = []; + + let delta = 0; + let edits: IIdentifiedSingleEditOperation[] = []; + let model = editor.getModel(); + for (const selection of editor.getSelections()) { - const oneSnippet = new OneSnippet(editor, selection, snippet); - this._snippets.push(oneSnippet); + const start = selection.getStartPosition(); + const adjustedTemplate = SnippetSession.normalizeWhitespace(model, start, template); + + const snippet = SnippetParser.parse(adjustedTemplate); + const offset = model.getOffsetAt(start) + delta; + + edits.push(EditOperation.replaceMove(selection, snippet.value)); + this._snippets.push(new OneSnippet(editor, snippet, offset)); + + delta += snippet.value.length - model.getValueLengthInRange(selection); } - this._editor.pushUndoStop(); - this.next(); + + // make insert edit and start with first selections + const newSelections = model.pushEditOperations(editor.getSelections(), edits, () => this._move(true)); + this._editor.setSelections(newSelections); } next(): void { + const newSelections = this._move(true); + this._editor.setSelections(newSelections); + } + + prev(): void { + const newSelections = this._move(false); + this._editor.setSelections(newSelections); + } + + private _move(fwd: boolean): Selection[] { const selections: Selection[] = []; for (const snippet of this._snippets) { - const sel = snippet.next(); - selections.push(...sel); + const oneSelection = snippet.move(fwd); + if (!oneSelection) { + if (fwd) { + this.stop(); + } + return this._editor.getSelections(); + } + selections.push(...oneSelection); } - this._editor.setSelections(selections); + return selections; + } + + stop(): void { + dispose(this._snippets); } } diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts index e1c48b7ae75d4..12db051617f51 100644 --- a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts @@ -6,49 +6,110 @@ import * as assert from 'assert'; import { Selection } from 'vs/editor/common/core/selection'; +import { IPosition, Position } from 'vs/editor/common/core/position'; import { SnippetSession } from 'vs/editor/contrib/snippet/browser/editorSnippets'; -import { SnippetParser } from 'vs/editor/contrib/snippet/common/snippetParser'; import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { mockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; +import { Model } from "vs/editor/common/model/model"; - -suite('Editor Contrib - Snippets', () => { +suite('SnippetInsertion', function () { let editor: ICommonCodeEditor; + let model: Model; + + function assertSelections(editor: ICommonCodeEditor, ...s: Selection[]) { + for (const selection of editor.getSelections()) { + const actual = s.shift(); + assert.ok(selection.equalsSelection(actual), `actual=${selection.toString()} <> expected=${actual.toString()}`); + } + assert.equal(s.length, 0); + } - setup(() => { - editor = mockCodeEditor([ - 'function foo() {', - '\tconsole.log(a)', - '}' - ], {}); + setup(function () { + model = Model.createFromString('function foo() {\n console.log(a);\n}'); + editor = mockCodeEditor([], { model }); + editor.setSelections([new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)]); + assert.equal(model.getEOL(), '\n'); }); - teardown(() => { - editor.dispose(); + teardown(function () { + model.dispose(); }); - test('snippets, selections', () => { + test('normalize whitespace', function () { - editor.setSelections([ - new Selection(1, 1, 1, 1), - new Selection(2, 2, 2, 2), - ]); + function assertNormalized(position: IPosition, input: string, expected: string): void { + const actual = SnippetSession.normalizeWhitespace(model, position, input); + assert.equal(actual, expected); + } + + assertNormalized(new Position(1, 1), 'foo', 'foo'); + assertNormalized(new Position(1, 1), 'foo\rbar', 'foo\nbar'); + assertNormalized(new Position(1, 1), 'foo\rbar', 'foo\nbar'); + assertNormalized(new Position(2, 5), 'foo\r\tbar', 'foo\n bar'); + assertNormalized(new Position(2, 3), 'foo\r\tbar', 'foo\n bar'); + }); - const snippet = SnippetParser.parse('foo${1:bar}foo$0'); - const session = new SnippetSession(editor, snippet); + test('text edits & selection', function () { + const session = new SnippetSession(editor, 'foo${1:bar}foo$0'); + assert.equal(editor.getModel().getValue(), 'foobarfoofunction foo() {\n foobarfooconsole.log(a);\n}'); + + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + session.next(); + assertSelections(editor, new Selection(1, 10, 1, 10), new Selection(2, 14, 2, 14)); + }); - assert.equal(editor.getModel().getLineContent(1), 'foobarfoofunction foo() {'); - assert.equal(editor.getModel().getLineContent(2), '\tfoobarfooconsole.log(a)'); + test('snippets, selections and new text with newlines', () => { - assert.equal(editor.getSelections().length, 2); - assert.ok(editor.getSelections()[0].equalsSelection(new Selection(1, 4, 1, 7))); - assert.ok(editor.getSelections()[1].equalsSelection(new Selection(2, 5, 2, 8))); + const session = new SnippetSession(editor, 'foo\n\t${1:bar}\n$0'); + + assert.equal(editor.getModel().getValue(), 'foo\n bar\nfunction foo() {\n foo\n bar\nconsole.log(a);\n}'); + + assertSelections(editor, new Selection(2, 5, 2, 8), new Selection(5, 9, 5, 12)); session.next(); - assert.equal(editor.getSelections().length, 2); - assert.ok(editor.getSelections()[0].equalsSelection(new Selection(1, 10, 1, 10))); - assert.ok(editor.getSelections()[1].equalsSelection(new Selection(2, 11, 2, 11))); + assertSelections(editor, new Selection(3, 1, 3, 1), new Selection(6, 1, 6, 1)); + }); + test('snippets, selections -> next/prev', () => { + + const session = new SnippetSession(editor, 'f$2oo${1:bar}foo$0'); + + // @ $2 + assertSelections(editor, new Selection(1, 2, 1, 2), new Selection(2, 6, 2, 6)); + // @ $1 + session.next(); + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + // @ $2 + session.prev(); + assertSelections(editor, new Selection(1, 2, 1, 2), new Selection(2, 6, 2, 6)); + // @ $1 + session.next(); + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + // @ $0 + session.next(); + assertSelections(editor, new Selection(1, 10, 1, 10), new Selection(2, 14, 2, 14)); + }); + + test('snippest, selections & typing', function () { + const session = new SnippetSession(editor, 'f${2:oo}_$1_$0'); + + editor.trigger('test', 'type', { text: 'X' }); + session.next(); + editor.trigger('test', 'type', { text: 'bar' }); + + // go back to ${2:oo} which is now just 'X' + session.prev(); + assertSelections(editor, new Selection(1, 2, 1, 3), new Selection(2, 6, 2, 7)); + + // go forward to $1 which is now 'bar' + session.next(); + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + + // go to final tabstop + session.next(); + assert.equal(model.getValue(), 'fX_bar_function foo() {\n fX_bar_console.log(a);\n}'); + assertSelections(editor, new Selection(1, 8, 1, 8), new Selection(2, 12, 2, 12)); }); }); + From 408ede050d518ccf2d2755ca604e000d4164c9d0 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 8 May 2017 19:44:35 +0200 Subject: [PATCH 0266/2747] theming - keybindings button and widget --- src/vs/platform/theme/common/styler.ts | 48 +++++++++++-------- .../preferences/browser/keybindingWidgets.ts | 20 ++++++-- .../preferences/browser/media/keybindings.css | 12 ----- .../preferences/browser/media/preferences.css | 2 - .../preferences/browser/preferencesWidgets.ts | 17 +++++-- 5 files changed, 60 insertions(+), 39 deletions(-) diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index 46b5f1bd0fa70..ca14730cfd09e 100644 --- a/src/vs/platform/theme/common/styler.ts +++ b/src/vs/platform/theme/common/styler.ts @@ -10,11 +10,13 @@ import { inputBackground, inputForeground, ColorIdentifier, selectForeground, se import { IDisposable } from 'vs/base/common/lifecycle'; import { SIDE_BAR_SECTION_HEADER_BACKGROUND } from 'vs/workbench/common/theme'; +export type styleFn = (colors: { [name: string]: ColorIdentifier }) => void; + export interface IThemable { - style(colors: { [name: string]: ColorIdentifier }): void; + style: styleFn; } -export function attachStyler(themeService: IThemeService, widget: IThemable, optionsMapping: { [optionsKey: string]: ColorIdentifier | ColorFunction }): IDisposable { +function doAttachStyler(themeService: IThemeService, optionsMapping: { [optionsKey: string]: ColorIdentifier | ColorFunction }, widgetOrCallback: IThemable | styleFn): IDisposable { function applyStyles(theme: ITheme): void { const styles = Object.create(null); for (let key in optionsMapping) { @@ -26,7 +28,11 @@ export function attachStyler(themeService: IThemeService, widget: IThemable, opt } } - widget.style(styles); + if (typeof widgetOrCallback === 'function') { + widgetOrCallback(styles); + } else { + widgetOrCallback.style(styles); + } } applyStyles(themeService.getTheme()); @@ -35,9 +41,9 @@ export function attachStyler(themeService: IThemeService, widget: IThemable, opt } export function attachCheckboxStyler(widget: IThemable, themeService: IThemeService, style?: { inputActiveOptionBorderColor?: ColorIdentifier }): IDisposable { - return attachStyler(themeService, widget, { + return doAttachStyler(themeService, { inputActiveOptionBorder: (style && style.inputActiveOptionBorderColor) || inputActiveOptionBorder - }); + }, widget); } export function attachInputBoxStyler(widget: IThemable, themeService: IThemeService, style?: @@ -52,7 +58,7 @@ export function attachInputBoxStyler(widget: IThemable, themeService: IThemeServ inputValidationErrorBorder?: ColorIdentifier, inputValidationErrorBackground?: ColorIdentifier }): IDisposable { - return attachStyler(themeService, widget, { + return doAttachStyler(themeService, { inputBackground: (style && style.inputBackground) || inputBackground, inputForeground: (style && style.inputForeground) || inputForeground, inputBorder: (style && style.inputBorder) || inputBorder, @@ -62,15 +68,15 @@ export function attachInputBoxStyler(widget: IThemable, themeService: IThemeServ inputValidationWarningBackground: (style && style.inputValidationWarningBackground) || inputValidationWarningBackground, inputValidationErrorBorder: (style && style.inputValidationErrorBorder) || inputValidationErrorBorder, inputValidationErrorBackground: (style && style.inputValidationErrorBackground) || inputValidationErrorBackground - }); + }, widget); } export function attachSelectBoxStyler(widget: IThemable, themeService: IThemeService, style?: { selectBackground?: ColorIdentifier, selectForeground?: ColorIdentifier, selectBorder?: ColorIdentifier }): IDisposable { - return attachStyler(themeService, widget, { + return doAttachStyler(themeService, { selectBackground: (style && style.selectBackground) || selectBackground, selectForeground: (style && style.selectForeground) || selectForeground, selectBorder: (style && style.selectBorder) || selectBorder - }); + }, widget); } export function attachFindInputBoxStyler(widget: IThemable, themeService: IThemeService, style?: @@ -86,7 +92,7 @@ export function attachFindInputBoxStyler(widget: IThemable, themeService: ITheme inputValidationErrorBorder?: ColorIdentifier, inputValidationErrorBackground?: ColorIdentifier }): IDisposable { - return attachStyler(themeService, widget, { + return doAttachStyler(themeService, { inputBackground: (style && style.inputBackground) || inputBackground, inputForeground: (style && style.inputForeground) || inputForeground, inputBorder: (style && style.inputBorder) || inputBorder, @@ -97,7 +103,7 @@ export function attachFindInputBoxStyler(widget: IThemable, themeService: ITheme inputValidationWarningBackground: (style && style.inputValidationWarningBackground) || inputValidationWarningBackground, inputValidationErrorBorder: (style && style.inputValidationErrorBorder) || inputValidationErrorBorder, inputValidationErrorBackground: (style && style.inputValidationErrorBackground) || inputValidationErrorBackground - }); + }, widget); } export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeService, style?: { @@ -129,7 +135,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer listSelectionOutline?: ColorIdentifier, listHoverOutline?: ColorIdentifier }): IDisposable { - return attachStyler(themeService, widget, { + return doAttachStyler(themeService, { foreground: (style && style.foreground) || foreground, background: (style && style.background) || editorBackground, borderColor: style && style.borderColor || contrastBorder, @@ -157,7 +163,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer listFocusOutline: (style && style.listFocusOutline) || activeContrastBorder, listSelectionOutline: (style && style.listSelectionOutline) || activeContrastBorder, listHoverOutline: (style && style.listHoverOutline) || activeContrastBorder - }); + }, widget); } export function attachListStyler(widget: IThemable, themeService: IThemeService, style?: { @@ -176,7 +182,7 @@ export function attachListStyler(widget: IThemable, themeService: IThemeService, listSelectionOutline?: ColorIdentifier, listHoverOutline?: ColorIdentifier, }): IDisposable { - return attachStyler(themeService, widget, { + return doAttachStyler(themeService, { listFocusBackground: (style && style.listFocusBackground) || listFocusBackground, listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || lighten(listActiveSelectionBackground, 0.1), listActiveSelectionForeground: (style && style.listActiveSelectionForeground) || listActiveSelectionForeground, @@ -191,20 +197,24 @@ export function attachListStyler(widget: IThemable, themeService: IThemeService, listSelectionOutline: (style && style.listSelectionOutline) || activeContrastBorder, listHoverOutline: (style && style.listHoverOutline) || activeContrastBorder, listInactiveFocusOutline: style && style.listInactiveFocusOutline // not defined by default, only opt-in - }); + }, widget); } export function attachHeaderViewStyler(widget: IThemable, themeService: IThemeService, options?: { noContrastBorder?: boolean }): IDisposable { - return attachStyler(themeService, widget, { + return doAttachStyler(themeService, { headerBackground: SIDE_BAR_SECTION_HEADER_BACKGROUND, headerHighContrastBorder: (options && options.noContrastBorder) ? null : contrastBorder - }); + }, widget); } export function attachButtonStyler(widget: IThemable, themeService: IThemeService, style?: { buttonForeground?: ColorIdentifier, buttonBackground?: ColorIdentifier, buttonHoverBackground?: ColorIdentifier }): IDisposable { - return attachStyler(themeService, widget, { + return doAttachStyler(themeService, { buttonForeground: (style && style.buttonForeground) || buttonForeground, buttonBackground: (style && style.buttonBackground) || buttonBackground, buttonHoverBackground: (style && style.buttonHoverBackground) || buttonHoverBackground - }); + }, widget); +} + +export function attachStylerCallback(themeService: IThemeService, colors: { [name: string]: ColorIdentifier }, callback: styleFn): IDisposable { + return doAttachStyler(themeService, colors, callback); } \ No newline at end of file diff --git a/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts b/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts index ff98e9f5bc59d..11a3ea7753a3e 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts @@ -21,8 +21,9 @@ import { Dimension } from 'vs/base/browser/builder'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition } from 'vs/editor/browser/editorBrowser'; -import { attachInputBoxStyler } from 'vs/platform/theme/common/styler'; +import { attachInputBoxStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { editorWidgetBackground, widgetShadow } from "vs/platform/theme/common/colorRegistry"; class KeybindingInputWidget extends Widget { @@ -128,8 +129,11 @@ export class DefineKeybindingWidget extends Widget { private _onHide = this._register(new Emitter()); - constructor(parent: HTMLElement, @IKeybindingService private keybindingService: IKeybindingService, - @IInstantiationService private instantiationService: IInstantiationService + constructor( + parent: HTMLElement, + @IKeybindingService private keybindingService: IKeybindingService, + @IInstantiationService private instantiationService: IInstantiationService, + @IThemeService private themeService: IThemeService ) { super(); this.create(); @@ -186,6 +190,16 @@ export class DefineKeybindingWidget extends Widget { this._domNode.setHeight(DefineKeybindingWidget.HEIGHT); dom.append(this._domNode.domNode, dom.$('.message', null, nls.localize('defineKeybinding.initial', "Press desired key combination and ENTER. ESCAPE to cancel."))); + this._register(attachStylerCallback(this.themeService, { editorWidgetBackground, widgetShadow }, colors => { + this._domNode.domNode.style.backgroundColor = colors.editorWidgetBackground; + + if (colors.widgetShadow) { + this._domNode.domNode.style.boxShadow = `0 2px 8px ${colors.widgetShadow}`; + } else { + this._domNode.domNode.style.boxShadow = null; + } + })); + this._keybindingInputWidget = this._register(this.instantiationService.createInstance(KeybindingInputWidget, this._domNode.domNode, {})); this._register(this._keybindingInputWidget.onKeybinding(keybinding => this.printKeybinding(keybinding))); this._register(this._keybindingInputWidget.onEnter(() => this.hide())); diff --git a/src/vs/workbench/parts/preferences/browser/media/keybindings.css b/src/vs/workbench/parts/preferences/browser/media/keybindings.css index d7dbc15225f1e..f8f89e185e632 100644 --- a/src/vs/workbench/parts/preferences/browser/media/keybindings.css +++ b/src/vs/workbench/parts/preferences/browser/media/keybindings.css @@ -34,18 +34,6 @@ margin: 0px 4px; } -/* Theming */ -.defineKeybindingWidget { - background-color: #EFEFF2; - box-shadow: 0 2px 8px #A8A8A8; -} - -.hc-black .defineKeybindingWidget, -.vs-dark .defineKeybindingWidget { - background-color: #2D2D30; - box-shadow: 0 2px 8px #000; -} - /* Editor decorations */ .monaco-editor .inlineKeybindingInfo:before { margin: 0.2em 0.1em 0 0.1em; diff --git a/src/vs/workbench/parts/preferences/browser/media/preferences.css b/src/vs/workbench/parts/preferences/browser/media/preferences.css index 1bc95c360d3ce..d0f783fbcaa39 100644 --- a/src/vs/workbench/parts/preferences/browser/media/preferences.css +++ b/src/vs/workbench/parts/preferences/browser/media/preferences.css @@ -238,8 +238,6 @@ } .monaco-editor .floating-click-widget { - background: #007ACC; - color: white; padding: 10px; border-radius: 5px; cursor: pointer; diff --git a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts index 26e55c992faba..5d7cfc196957a 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts @@ -23,10 +23,11 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace import { ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { ActionsOrientation, ActionBar } from 'vs/base/browser/ui/actionbar/actionbar'; import { Action } from 'vs/base/common/actions'; -import { attachInputBoxStyler } from 'vs/platform/theme/common/styler'; +import { attachInputBoxStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Position } from 'vs/editor/common/core/position'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; +import { buttonBackground, buttonForeground } from "vs/platform/theme/common/colorRegistry"; export class SettingsGroupTitleWidget extends Widget implements IViewZone { @@ -360,10 +361,15 @@ export class FloatingClickWidget extends Widget implements IOverlayWidget { private _onClick: Emitter = this._register(new Emitter()); public onClick: Event = this._onClick.event; - constructor(private editor: ICodeEditor, private label: string, private keyBindingAction: string, - @IKeybindingService keybindingService: IKeybindingService + constructor( + private editor: ICodeEditor, + private label: string, + private keyBindingAction: string, + @IKeybindingService keybindingService: IKeybindingService, + @IThemeService private themeService: IThemeService ) { super(); + if (keyBindingAction) { let keybinding = keybindingService.lookupKeybinding(keyBindingAction); if (keybinding) { @@ -374,6 +380,11 @@ export class FloatingClickWidget extends Widget implements IOverlayWidget { public render() { this._domNode = DOM.$('.floating-click-widget'); + this._register(attachStylerCallback(this.themeService, { buttonBackground, buttonForeground }, colors => { + this._domNode.style.backgroundColor = colors.buttonBackground; + this._domNode.style.color = colors.buttonForeground; + })); + DOM.append(this._domNode, DOM.$('')).textContent = this.label; this.onclick(this._domNode, e => this._onClick.fire()); this.editor.addOverlayWidget(this); From 841d9ae060e81234c97dcccf4d0d24ca2397d7cc Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 8 May 2017 19:59:14 +0200 Subject: [PATCH 0267/2747] :lipstick: --- .../theme-solarized-dark/themes/solarized-dark-color-theme.json | 1 + .../themes/solarized-light-color-theme.json | 1 + 2 files changed, 2 insertions(+) diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index 918d9ac9b4523..81a5609cfebb2 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -303,6 +303,7 @@ "input.background": "#003847", "input.foreground": "#93A1A1", + "input.placeholderForeground": "#93A1A1AA", // "input.border": "", "inputOption.activeBorder": "#2AA19899", diff --git a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json index 7deda4d22e4b9..4c5ea2d9070ad 100644 --- a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -304,6 +304,7 @@ "input.background": "#DDD6C1", // "input.border": "", "input.foreground": "#586E75", + "input.placeholderForeground": "#586E75AA", "inputOption.activeBorder": "#D3AF86", // "inputValidation.infoBorder": "", // "inputValidation.infoBackground": "", From d679ee8d4b8e5ca7433bea0391b8f7a240d0cd20 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Mon, 8 May 2017 11:23:23 -0700 Subject: [PATCH 0268/2747] Fixes #26224 --- .../contrib/suggest/browser/suggestWidget.ts | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 09ac145137cac..249559e2d84bd 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -435,12 +435,14 @@ export class SuggestWidget implements IContentWidget, IDelegate if (backgroundColor) { this.listElement.style.backgroundColor = backgroundColor.toString(); this.details.element.style.backgroundColor = backgroundColor.toString(); + this.messageElement.style.backgroundColor = backgroundColor.toString(); } let borderColor = theme.getColor(editorSuggestWidgetBorder); if (borderColor) { let borderWidth = theme.type === 'hc' ? 2 : 1; this.listElement.style.border = `${borderWidth}px solid ${borderColor}`; this.details.element.style.border = `${borderWidth}px solid ${borderColor}`; + this.messageElement.style.border = `${borderWidth}px solid ${borderColor}`; } } @@ -819,18 +821,28 @@ export class SuggestWidget implements IContentWidget, IDelegate } private adjustWidgetWidth() { + // Reset + removeClass(this.element, 'list-right'); + removeClass(this.element, 'docs-below'); + this.preferredPosition = this.editor.getPosition(); + + // Message element is shown, list and docs are not + if (this.messageElement.style.display !== 'none' + && this.details.element.style.display === 'none' + && this.listElement.style.display === 'none') { + this.element.style.width = `${this.widgetWidthInSmallestEditor}px`; + return; + } + const perColumnWidth = this.editor.getLayoutInfo().contentWidth / this.editor.getLayoutInfo().viewportColumn; const spaceOntheLeft = Math.floor(this.editor.getPosition().column * perColumnWidth) - this.editor.getScrollLeft(); const spaceOntheRight = this.editor.getLayoutInfo().contentWidth - spaceOntheLeft; const scrolledColumns = Math.floor(this.editor.getScrollLeft() / perColumnWidth); - // Reset - this.preferredPosition = this.editor.getPosition(); + // Reset width this.details.element.style.width = `${this.maxDocsWidth}px`; this.element.style.width = `${this.maxWidgetWidth}px`; this.listElement.style.width = `${this.listWidth}px`; - removeClass(this.element, 'list-right'); - removeClass(this.element, 'docs-below'); if (spaceOntheRight > this.maxWidgetWidth) { // There is enough space on the right, so nothing to do here. From 8cc8c3f18ab352a1eef9fc6f7e4dd1a2f44876dd Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 8 May 2017 21:12:24 +0200 Subject: [PATCH 0269/2747] tests for final tab stop --- .../contrib/snippet/browser/editorSnippets.ts | 5 +-- .../contrib/snippet/common/snippetParser.ts | 3 ++ .../test/browser/editorSnippets.test.ts | 32 ++++++++++++++++++- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index 5cfe6f303e5c6..88e3c0616d1d9 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -59,7 +59,9 @@ class OneSnippet { const range = new Range(start.lineNumber, start.column, end.lineNumber, end.column); let stickiness: TrackedRangeStickiness; - if (lastRange && lastRange.getEndPosition().equals(range.getStartPosition())) { + if (placeholder.isFinalTabstop) { + stickiness = TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges; + } else if (lastRange && lastRange.getEndPosition().equals(range.getStartPosition())) { stickiness = TrackedRangeStickiness.GrowsOnlyWhenTypingAfter; } else { stickiness = TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges; @@ -102,7 +104,6 @@ class OneSnippet { } } - private _getCurrentPlaceholderSelections(): Selection[] { const selections: Selection[] = []; for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) { diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index 2b5c66816ce9c..11e0b3a809c40 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -164,6 +164,9 @@ export class Placeholder extends Marker { constructor(public name: string = '', public defaultValue: Marker[]) { super(); } + get isFinalTabstop() { + return this.name === '0'; + } toString() { return Marker.toString(this.defaultValue); } diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts index 12db051617f51..1491c44293c95 100644 --- a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts @@ -91,7 +91,7 @@ suite('SnippetInsertion', function () { assertSelections(editor, new Selection(1, 10, 1, 10), new Selection(2, 14, 2, 14)); }); - test('snippest, selections & typing', function () { + test('snippets, selections & typing', function () { const session = new SnippetSession(editor, 'f${2:oo}_$1_$0'); editor.trigger('test', 'type', { text: 'X' }); @@ -111,5 +111,35 @@ suite('SnippetInsertion', function () { assert.equal(model.getValue(), 'fX_bar_function foo() {\n fX_bar_console.log(a);\n}'); assertSelections(editor, new Selection(1, 8, 1, 8), new Selection(2, 12, 2, 12)); }); + + test('snippets, insert into non-empty selection', function () { + model.setValue('foo_bar_foo'); + editor.setSelections([new Selection(1, 1, 1, 4), new Selection(1, 9, 1, 12)]); + + new SnippetSession(editor, 'x$0'); + assert.equal(model.getValue(), 'x_bar_x'); + assertSelections(editor, new Selection(1, 2, 1, 2), new Selection(1, 8, 1, 8)); + }); + + test('snippets, don\'t grow final tabstop', function () { + model.setValue('foo_zzz_foo'); + editor.setSelection(new Selection(1, 5, 1, 8)); + const session = new SnippetSession(editor, '$1bar$0'); + + assertSelections(editor, new Selection(1, 5, 1, 5)); + editor.trigger('test', 'type', { text: 'foo-' }); + + session.next(); + assert.equal(model.getValue(), 'foo_foo-bar_foo'); + assertSelections(editor, new Selection(1, 12, 1, 12)); + + editor.trigger('test', 'type', { text: 'XXX' }); + assert.equal(model.getValue(), 'foo_foo-barXXX_foo'); + session.prev(); + assertSelections(editor, new Selection(1, 5, 1, 9)); + session.next(); + assertSelections(editor, new Selection(1, 15, 1, 15)); + }); + }); From 96fc37f8d84cf8b3ba009da7b6e5df35c5d5530a Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 8 May 2017 21:15:47 +0200 Subject: [PATCH 0270/2747] Theming: Codelense color. Fixes #26105 --- src/vs/editor/common/view/editorColorRegistry.ts | 2 ++ .../editor/contrib/codelens/browser/codelens.css | 6 ------ src/vs/editor/contrib/codelens/browser/codelens.ts | 14 ++++++++++++++ src/vs/platform/theme/common/colorRegistry.ts | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/vs/editor/common/view/editorColorRegistry.ts b/src/vs/editor/common/view/editorColorRegistry.ts index 05e930fbb6824..6fbc931f441ac 100644 --- a/src/vs/editor/common/view/editorColorRegistry.ts +++ b/src/vs/editor/common/view/editorColorRegistry.ts @@ -19,6 +19,8 @@ export const editorWhitespaces = registerColor('editorWhitespace.foreground', { export const editorIndentGuides = registerColor('editorIndentGuide.background', { dark: editorWhitespaces, light: editorWhitespaces, hc: editorWhitespaces }, nls.localize('editorIndentGuides', 'Color of the editor indentation guides.')); export const editorLineNumbers = registerColor('editorLineNumber.foreground', { dark: '#5A5A5A', light: '#2B91AF', hc: Color.white }, nls.localize('editorLineNumbers', 'Color of editor line numbers.')); +export const editorCodeLenseForeground = registerColor('editorCodeLense.foreground', { dark: '#999999', light: '#999999', hc: '#999999' }, nls.localize('editorCodeLenseForeground', 'Foreground color of editor code lenses')); + // contains all color rules that used to defined in editor/browser/widget/editor.css registerThemingParticipant((theme, collector) => { diff --git a/src/vs/editor/contrib/codelens/browser/codelens.css b/src/vs/editor/contrib/codelens/browser/codelens.css index 8cd27141065ff..d1563adc1998e 100644 --- a/src/vs/editor/contrib/codelens/browser/codelens.css +++ b/src/vs/editor/contrib/codelens/browser/codelens.css @@ -8,7 +8,6 @@ display: inline-block; text-overflow: ellipsis; font-size: 90%; - color: #999999; } .monaco-editor .codelens-decoration > span, @@ -28,11 +27,6 @@ .monaco-editor .codelens-decoration > a:hover { text-decoration: underline; cursor: pointer; - color: blue !important; -} - -.monaco-editor.vs-dark .codelens-decoration > a:hover { - color: #4E94CE !important; } .monaco-editor .codelens-decoration.invisible-cl { diff --git a/src/vs/editor/contrib/codelens/browser/codelens.ts b/src/vs/editor/contrib/codelens/browser/codelens.ts index db424a9ea232b..2f1ff9fc521a3 100644 --- a/src/vs/editor/contrib/codelens/browser/codelens.ts +++ b/src/vs/editor/contrib/codelens/browser/codelens.ts @@ -22,6 +22,9 @@ import * as editorBrowser from 'vs/editor/browser/editorBrowser'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { ICodeLensData, getCodeLensData } from '../common/codelens'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; +import { editorCodeLenseForeground } from "vs/editor/common/view/editorColorRegistry"; +import { registerThemingParticipant } from "vs/platform/theme/common/themeService"; +import { editorActiveLinkForeground } from "vs/platform/theme/common/colorRegistry"; class CodeLensViewZone implements editorBrowser.IViewZone { @@ -623,3 +626,14 @@ export class CodeLensContribution implements editorCommon.IEditorContribution { }); } } + +registerThemingParticipant((theme, collector) => { + let codeLenseForeground = theme.getColor(editorCodeLenseForeground); + if (codeLenseForeground) { + collector.addRule(`.monaco-editor .codelens-decoration { color: ${codeLenseForeground}; }`); + } + let activeLinkForeground = theme.getColor(editorActiveLinkForeground); + if (activeLinkForeground) { + collector.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${activeLinkForeground} !important; }`); + } +}); diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 326e185379777..110d70f162a15 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -206,7 +206,7 @@ export const editorFindRangeHighlight = registerColor('editor.findRangeHighlight /** * Editor link colors */ -export const editorActiveLinkForeground = registerColor('editorLink.activeForeground', { dark: '#4E94CE', light: Color.black, hc: Color.cyan }, nls.localize('activeLinkForeground', 'Color of active links.')); +export const editorActiveLinkForeground = registerColor('editorLink.activeForeground', { dark: '#4E94CE', light: Color.blue, hc: Color.cyan }, nls.localize('activeLinkForeground', 'Color of active links.')); /** * Find widget From 7e4dc21175d8f123e68ff2b896e4b19a213e56e7 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 8 May 2017 21:22:54 +0200 Subject: [PATCH 0271/2747] [theme] code lens color name fix --- src/vs/editor/common/view/editorColorRegistry.ts | 3 +-- src/vs/editor/contrib/codelens/browser/codelens.ts | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/common/view/editorColorRegistry.ts b/src/vs/editor/common/view/editorColorRegistry.ts index 6fbc931f441ac..ef72179a5daf5 100644 --- a/src/vs/editor/common/view/editorColorRegistry.ts +++ b/src/vs/editor/common/view/editorColorRegistry.ts @@ -19,8 +19,7 @@ export const editorWhitespaces = registerColor('editorWhitespace.foreground', { export const editorIndentGuides = registerColor('editorIndentGuide.background', { dark: editorWhitespaces, light: editorWhitespaces, hc: editorWhitespaces }, nls.localize('editorIndentGuides', 'Color of the editor indentation guides.')); export const editorLineNumbers = registerColor('editorLineNumber.foreground', { dark: '#5A5A5A', light: '#2B91AF', hc: Color.white }, nls.localize('editorLineNumbers', 'Color of editor line numbers.')); -export const editorCodeLenseForeground = registerColor('editorCodeLense.foreground', { dark: '#999999', light: '#999999', hc: '#999999' }, nls.localize('editorCodeLenseForeground', 'Foreground color of editor code lenses')); - +export const editorCodeLensForeground = registerColor('editorCodeLens.foreground', { dark: '#999999', light: '#999999', hc: '#999999' }, nls.localize('editorCodeLensForeground', 'Foreground color of editor code lenses')); // contains all color rules that used to defined in editor/browser/widget/editor.css registerThemingParticipant((theme, collector) => { diff --git a/src/vs/editor/contrib/codelens/browser/codelens.ts b/src/vs/editor/contrib/codelens/browser/codelens.ts index 2f1ff9fc521a3..533f5056835a8 100644 --- a/src/vs/editor/contrib/codelens/browser/codelens.ts +++ b/src/vs/editor/contrib/codelens/browser/codelens.ts @@ -22,7 +22,7 @@ import * as editorBrowser from 'vs/editor/browser/editorBrowser'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { ICodeLensData, getCodeLensData } from '../common/codelens'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; -import { editorCodeLenseForeground } from "vs/editor/common/view/editorColorRegistry"; +import { editorCodeLensForeground } from "vs/editor/common/view/editorColorRegistry"; import { registerThemingParticipant } from "vs/platform/theme/common/themeService"; import { editorActiveLinkForeground } from "vs/platform/theme/common/colorRegistry"; @@ -628,9 +628,9 @@ export class CodeLensContribution implements editorCommon.IEditorContribution { } registerThemingParticipant((theme, collector) => { - let codeLenseForeground = theme.getColor(editorCodeLenseForeground); - if (codeLenseForeground) { - collector.addRule(`.monaco-editor .codelens-decoration { color: ${codeLenseForeground}; }`); + let codeLensForeground = theme.getColor(editorCodeLensForeground); + if (codeLensForeground) { + collector.addRule(`.monaco-editor .codelens-decoration { color: ${codeLensForeground}; }`); } let activeLinkForeground = theme.getColor(editorActiveLinkForeground); if (activeLinkForeground) { From a86bfc7e3c51f4e1127607c0521fc788e1849515 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 8 May 2017 21:40:25 +0200 Subject: [PATCH 0272/2747] proper placeholder sorting --- .../contrib/snippet/browser/editorSnippets.ts | 4 ++-- .../contrib/snippet/common/snippetParser.ts | 23 ++++++++++++++++--- .../test/browser/editorSnippets.test.ts | 4 ++-- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index 88e3c0616d1d9..f0c26cfa1b2ff 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -5,7 +5,7 @@ 'use strict'; -import { getLeadingWhitespace, compare } from 'vs/base/common/strings'; +import { getLeadingWhitespace } from 'vs/base/common/strings'; import { ICommonCodeEditor, IModel, TrackedRangeStickiness, IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { TextmateSnippet, Placeholder, SnippetParser } from '../common/snippetParser'; @@ -77,7 +77,7 @@ class OneSnippet { this._placeholderGroupsIdx = -1; this._placeholderGroups = []; let lastBucket: Placeholder[]; - this._snippet.getPlaceholders().sort((a, b) => compare(a.name, b.name)).reverse().forEach(a => { + this._snippet.getPlaceholders().sort(Placeholder.compare).forEach(a => { if (!lastBucket || lastBucket[0].name !== a.name) { lastBucket = [a]; this._placeholderGroups.push(lastBucket); diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index 11e0b3a809c40..c073588b085c8 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -161,18 +161,35 @@ export class Text extends Marker { } export class Placeholder extends Marker { + + static compare(a: Placeholder, b: Placeholder): number { + if (a.name === b.name) { + return 0; + } else if (a.isFinalTabstop) { + return 1; + } else if (b.isFinalTabstop) { + return -1; + } else if (a.name < b.name) { + return -1; + } else if (a.name > b.name) { + return 1; + } else { + return 0; + } + } + constructor(public name: string = '', public defaultValue: Marker[]) { super(); } get isFinalTabstop() { return this.name === '0'; } - toString() { - return Marker.toString(this.defaultValue); - } with(defaultValue: Marker[]): Placeholder { return new Placeholder(this.name, defaultValue); } + toString() { + return Marker.toString(this.defaultValue); + } } export class Variable extends Marker { diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts index 1491c44293c95..9d49e4e13d366 100644 --- a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts @@ -73,7 +73,7 @@ suite('SnippetInsertion', function () { test('snippets, selections -> next/prev', () => { - const session = new SnippetSession(editor, 'f$2oo${1:bar}foo$0'); + const session = new SnippetSession(editor, 'f$1oo${2:bar}foo$0'); // @ $2 assertSelections(editor, new Selection(1, 2, 1, 2), new Selection(2, 6, 2, 6)); @@ -92,7 +92,7 @@ suite('SnippetInsertion', function () { }); test('snippets, selections & typing', function () { - const session = new SnippetSession(editor, 'f${2:oo}_$1_$0'); + const session = new SnippetSession(editor, 'f${1:oo}_$2_$0'); editor.trigger('test', 'type', { text: 'X' }); session.next(); From de0303353f03a3e0502b90616d58c12a5a8177e7 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 8 May 2017 22:01:15 +0200 Subject: [PATCH 0273/2747] Theming: Bracket matching colors. Fixes #26104 --- src/vs/editor/common/view/editorColorRegistry.ts | 3 +++ .../bracketMatching/browser/bracketMatching.css | 4 ---- .../bracketMatching/common/bracketMatching.ts | 13 +++++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/common/view/editorColorRegistry.ts b/src/vs/editor/common/view/editorColorRegistry.ts index ef72179a5daf5..386852f64f30b 100644 --- a/src/vs/editor/common/view/editorColorRegistry.ts +++ b/src/vs/editor/common/view/editorColorRegistry.ts @@ -21,6 +21,9 @@ export const editorLineNumbers = registerColor('editorLineNumber.foreground', { export const editorCodeLensForeground = registerColor('editorCodeLens.foreground', { dark: '#999999', light: '#999999', hc: '#999999' }, nls.localize('editorCodeLensForeground', 'Foreground color of editor code lenses')); +export const editorBracketMatchBackground = registerColor('editorBracketMatch.background', { dark: '#0064001a', light: '#0064001a', hc: '#0064001a' }, nls.localize('editorBracketMatchBackground', 'Background color behind matching brackets')); +export const editorBracketMatchBorder = registerColor('editorBracketMatch.border', { dark: '#888', light: '#B9B9B9', hc: '#fff' }, nls.localize('editorBracketMatchBorder', 'Color for matching brackets boxes')); + // contains all color rules that used to defined in editor/browser/widget/editor.css registerThemingParticipant((theme, collector) => { diff --git a/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.css b/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.css index 161b88a13d912..d0acbab2da480 100644 --- a/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.css +++ b/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.css @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ .monaco-editor .bracket-match { - box-sizing: border-box; background-color: rgba(0, 100, 0, 0.1); } -.monaco-editor.vs .bracket-match { border: 1px solid #B9B9B9; } -.monaco-editor.vs-dark .bracket-match { border: 1px solid #888; } -.monaco-editor.hc-black .bracket-match { border: 1px solid #fff; } diff --git a/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts b/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts index a439d5067f5cc..909547185f21f 100644 --- a/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts +++ b/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts @@ -15,6 +15,8 @@ import * as editorCommon from 'vs/editor/common/editorCommon'; import { editorAction, commonEditorContribution, ServicesAccessor, EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; +import { registerThemingParticipant } from "vs/platform/theme/common/themeService"; +import { editorBracketMatchBackground, editorBracketMatchBorder } from "vs/editor/common/view/editorColorRegistry"; @editorAction class SelectBracketAction extends EditorAction { @@ -204,3 +206,14 @@ export class BracketMatchingController extends Disposable implements editorCommo this._lastVersionId = versionId; } } + +registerThemingParticipant((theme, collector) => { + let bracketMatchBackground = theme.getColor(editorBracketMatchBackground); + if (bracketMatchBackground) { + collector.addRule(`.monaco-editor .bracket-match { background-color: ${bracketMatchBackground}; }`); + } + let bracketMatchBorder = theme.getColor(editorBracketMatchBorder); + if (bracketMatchBorder) { + collector.addRule(`.monaco-editor .bracket-match { border: 1px solid ${bracketMatchBorder}; }`); + } +}); \ No newline at end of file From c70f9222011b23752a54938221364808fd18216e Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 8 May 2017 13:23:46 -0700 Subject: [PATCH 0274/2747] Add Suggestion Provider For TS Directives (#25806) * Add Suggestion Provider For TS Directives Adds a new completion provider to suggest typescript comment directives, such as `@ts-check` or `@ts-ignore` Fixes #25413 * Add descriptions to snippets --- .../directiveCommentCompletionProvider.ts | 71 +++++++++++++++++++ extensions/typescript/src/typescriptMain.ts | 7 +- 2 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 extensions/typescript/src/features/directiveCommentCompletionProvider.ts diff --git a/extensions/typescript/src/features/directiveCommentCompletionProvider.ts b/extensions/typescript/src/features/directiveCommentCompletionProvider.ts new file mode 100644 index 0000000000000..a334e8c2f7b78 --- /dev/null +++ b/extensions/typescript/src/features/directiveCommentCompletionProvider.ts @@ -0,0 +1,71 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { Position, CompletionItemProvider, CompletionItemKind, TextDocument, CancellationToken, CompletionItem, ProviderResult, Range } from 'vscode'; + +import { ITypescriptServiceClient } from '../typescriptService'; + +import * as nls from 'vscode-nls'; +const localize = nls.loadMessageBundle(); + +interface Directive { + value: string; + description: string; +} + +const directives: Directive[] = [ + { + value: '@ts-check', + description: localize( + 'ts-check', + 'Enables semantic checking in a JavaScript file. Must be at the top of a file.') + }, { + value: '@ts-nocheck', + description: localize( + 'ts-nocheck', + 'Disables semantic checking in a JavaScript file. Must be at the top of a file.') + }, { + value: '@ts-ignore', + description: localize( + 'ts-ignore', + 'Suppresses @ts-check errors on the next line of a file.') + } +]; + +export class DirectiveCommentCompletionProvider implements CompletionItemProvider { + constructor( + private client: ITypescriptServiceClient, + ) { } + + public provideCompletionItems(document: TextDocument, position: Position, _token: CancellationToken): ProviderResult { + if (!this.client.apiVersion.has230Features()) { + return []; + } + + const file = this.client.normalizePath(document.uri); + if (!file) { + return []; + } + + const line = document.lineAt(position.line).text; + const prefix = line.slice(0, position.character); + const match = prefix.match(/^\s*\/\/+\s?(@[a-zA-Z\-]*)?$/); + if (match) { + return directives.map(directive => { + const item = new CompletionItem(directive.value, CompletionItemKind.Snippet); + item.detail = directive.description; + item.range = new Range(position.line, Math.max(0, position.character - match[1].length), position.line, position.character); + return item; + }); + } + return []; + } + + public resolveCompletionItem(item: CompletionItem, _token: CancellationToken) { + return item; + } +} \ No newline at end of file diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 2b3536bb290b6..a6e3f4b891257 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -41,6 +41,8 @@ import WorkspaceSymbolProvider from './features/workspaceSymbolProvider'; import CodeActionProvider from './features/codeActionProvider'; import ReferenceCodeLensProvider from './features/referencesCodeLensProvider'; import { JsDocCompletionProvider, TryCompleteJsDocCommand } from './features/jsDocCompletionProvider'; +import { DirectiveCommentCompletionProvider } from './features/directiveCommentCompletionProvider'; + import ImplementationCodeLensProvider from './features/implementationsCodeLensProvider'; import * as BuildStatus from './utils/buildStatus'; @@ -215,6 +217,8 @@ class LanguageProvider { this.completionItemProvider.updateConfiguration(); this.disposables.push(languages.registerCompletionItemProvider(selector, this.completionItemProvider, '.')); + this.disposables.push(languages.registerCompletionItemProvider(selector, new DirectiveCommentCompletionProvider(client), '@')); + this.formattingProvider = new FormattingProvider(client); this.formattingProvider.updateConfiguration(config); this.disposables.push(languages.registerOnTypeFormattingEditProvider(selector, this.formattingProvider, ';', '}', '\n')); @@ -416,7 +420,7 @@ class LanguageProvider { class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { private client: TypeScriptServiceClient; - private languages: LanguageProvider[]; + private languages: LanguageProvider[] = []; private languagePerId: ObjectMap; private readonly disposables: Disposable[] = []; @@ -442,7 +446,6 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { configFileWatcher.onDidChange(handleProjectChange, this, this.disposables); this.client = new TypeScriptServiceClient(this, storagePath, globalState, workspaceState, this.disposables); - this.languages = []; this.languagePerId = Object.create(null); for (const description of descriptions) { const manager = new LanguageProvider(this.client, description); From 3725e909ca2e16fa75ec6d3e20661be50bc0d7c8 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 8 May 2017 22:30:03 +0200 Subject: [PATCH 0275/2747] Theming: Minimap slider. Fixes #26103 --- .../browser/viewParts/minimap/minimap.css | 34 ------------------- .../browser/viewParts/minimap/minimap.ts | 21 ++++++++++++ 2 files changed, 21 insertions(+), 34 deletions(-) diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.css b/src/vs/editor/browser/viewParts/minimap/minimap.css index 636eee6a6c6d3..692577e87bdfb 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.css +++ b/src/vs/editor/browser/viewParts/minimap/minimap.css @@ -13,35 +13,6 @@ .monaco-editor .minimap-slider.active { opacity: 1; } - -.monaco-editor.vs .minimap-slider { - background: rgba(100, 100, 100, .4); -} -.monaco-editor.vs-dark .minimap-slider { - background: rgba(121, 121, 121, .4); -} -.monaco-editor.hc-black .minimap-slider { - background: rgba(111, 195, 223, .6); -} - -.monaco-editor.vs .minimap-slider:hover, -.monaco-editor.vs-dark .minimap-slider:hover { - background: rgba(100, 100, 100, .7); -} -.monaco-editor.hc-black .minimap-slider:hover { - background: rgba(111, 195, 223, .8); -} - -.monaco-editor.vs .minimap-slider.active { - background: rgba(0, 0, 0, .6); -} -.monaco-editor.vs-dark .minimap-slider.active { - background: rgba(191, 191, 191, .4); -} -.monaco-editor.hc-black .minimap-slider.active { - background: rgba(111, 195, 223, 1); -} - .monaco-editor .minimap-shadow-hidden { position: absolute; width: 0; @@ -50,9 +21,4 @@ position: absolute; left: -6px; width: 6px; - box-shadow: #DDD -6px 0 6px -6px inset; -} - -.monaco-editor.vs-dark .minimap-shadow-visible { - box-shadow: #000 -6px 0 6px -6px inset; } diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index a3c3dbae71daa..5acccca0454e8 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -27,6 +27,8 @@ import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { GlobalMouseMoveMonitor, IStandardMouseMoveEventData, standardMouseMoveMerger } from 'vs/base/browser/globalMouseMoveMonitor'; import * as platform from 'vs/base/common/platform'; import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; +import { registerThemingParticipant } from "vs/platform/theme/common/themeService"; +import { scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground, scrollbarShadow } from "vs/platform/theme/common/colorRegistry"; const enum RenderMinimap { None = 0, @@ -854,3 +856,22 @@ export class Minimap extends ViewPart { } } } + +registerThemingParticipant((theme, collector) => { + let sliderBackground = theme.getColor(scrollbarSliderBackground); + if (sliderBackground) { + collector.addRule(`.monaco-editor .minimap-slider { background: ${sliderBackground}; }`); + } + let sliderHoverBackground = theme.getColor(scrollbarSliderHoverBackground); + if (sliderHoverBackground) { + collector.addRule(`.monaco-editor .minimap-slider:hover { background: ${sliderHoverBackground}; }`); + } + let sliderActiveBackground = theme.getColor(scrollbarSliderActiveBackground); + if (sliderActiveBackground) { + collector.addRule(`.monaco-editor .minimap-slider.active { background: ${sliderActiveBackground}; }`); + } + let shadow = theme.getColor(scrollbarShadow); + if (shadow) { + collector.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${shadow} -6px 0 6px -6px inset; }`); + } +}); \ No newline at end of file From 9bc4e760757c50bde525e2ec8bec2b9ab2a710e9 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 8 May 2017 22:37:51 +0200 Subject: [PATCH 0276/2747] Capfile isn't displayed as Ruby. Fixes #25939 --- extensions/ruby/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/ruby/package.json b/extensions/ruby/package.json index 18fe222daafd1..d5933231e77a0 100644 --- a/extensions/ruby/package.json +++ b/extensions/ruby/package.json @@ -9,7 +9,7 @@ "languages": [{ "id": "ruby", "extensions": [ ".rb", ".rbx", ".rjs", ".gemspec", ".rake", ".ru", ".erb" ], - "filenames": [ "rakefile", "gemfile", "guardfile", "podfile" ], + "filenames": [ "rakefile", "gemfile", "guardfile", "podfile", "capfile" ], "aliases": [ "Ruby", "rb" ], "firstLine": "^#!/.*\\bruby\\b", "configuration": "./language-configuration.json" From 4aa5aa4e84baa7d07fc1d798428eac35f0b06601 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 8 May 2017 12:00:23 +0200 Subject: [PATCH 0277/2747] Move editor options related code to editorOptions.ts --- src/vs/editor/common/commonCodeEditor.ts | 2 +- .../common/config/commonEditorConfig.ts | 426 +----------- src/vs/editor/common/config/editorOptions.ts | 654 ++++++++++++++++-- .../common/viewLayout/editorLayoutProvider.ts | 154 ----- .../services/decorationRenderOptions.test.ts | 2 +- .../viewLayout/editorLayoutProvider.test.ts | 3 +- 6 files changed, 607 insertions(+), 634 deletions(-) delete mode 100644 src/vs/editor/common/viewLayout/editorLayoutProvider.ts diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index c21b629a895ce..d7a01189a10b1 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -191,7 +191,7 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo } public getConfiguration(): editorOptions.InternalEditorOptions { - return this._configuration.editorClone; + return this._configuration.editor; } public getRawConfiguration(): editorOptions.IEditorOptions { diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index fb554283298f6..dd2c9b9ddb41c 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -13,10 +13,7 @@ import { Extensions, IConfigurationRegistry, IConfigurationNode } from 'vs/platf import { Registry } from 'vs/platform/platform'; import { DefaultConfig, DEFAULT_INDENTATION, DEFAULT_TRIM_AUTO_WHITESPACE } from 'vs/editor/common/config/defaultConfig'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { EditorLayoutProvider } from 'vs/editor/common/viewLayout/editorLayoutProvider'; -import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import { FontInfo, BareFontInfo } from 'vs/editor/common/config/fontInfo'; -import { Constants } from 'vs/editor/common/core/uint'; import { EditorZoom } from 'vs/editor/common/config/editorZoom'; import * as editorOptions from 'vs/editor/common/config/editorOptions'; @@ -76,396 +73,10 @@ export class ConfigurationWithDefaults { } } -class InternalEditorOptionsHelper { - - constructor() { - } - - public static createInternalEditorOptions( - outerWidth: number, - outerHeight: number, - opts: editorOptions.IEditorOptions, - fontInfo: FontInfo, - editorClassName: string, - isDominatedByLongLines: boolean, - lineNumbersDigitCount: number, - canUseTranslate3d: boolean, - pixelRatio: number - ): editorOptions.InternalEditorOptions { - - let stopRenderingLineAfter: number; - if (typeof opts.stopRenderingLineAfter !== 'undefined') { - stopRenderingLineAfter = toInteger(opts.stopRenderingLineAfter, -1); - } else { - stopRenderingLineAfter = 10000; - } - - let scrollbar = this._sanitizeScrollbarOpts(opts.scrollbar, toFloat(opts.mouseWheelScrollSensitivity, 1)); - let minimap = this._sanitizeMinimapOpts(opts.minimap); - - let glyphMargin = toBoolean(opts.glyphMargin); - let lineNumbersMinChars = toInteger(opts.lineNumbersMinChars, 1); - - let lineDecorationsWidth: number; - if (typeof opts.lineDecorationsWidth === 'string' && /^\d+(\.\d+)?ch$/.test(opts.lineDecorationsWidth)) { - let multiple = parseFloat(opts.lineDecorationsWidth.substr(0, opts.lineDecorationsWidth.length - 2)); - lineDecorationsWidth = multiple * fontInfo.typicalHalfwidthCharacterWidth; - } else { - lineDecorationsWidth = toInteger(opts.lineDecorationsWidth, 0); - } - if (opts.folding) { - lineDecorationsWidth += 16; - } - - let renderLineNumbers: boolean; - let renderCustomLineNumbers: (lineNumber: number) => string; - let renderRelativeLineNumbers: boolean; - { - let lineNumbers = opts.lineNumbers; - // Compatibility with old true or false values - if (lineNumbers === true) { - lineNumbers = 'on'; - } else if (lineNumbers === false) { - lineNumbers = 'off'; - } - - if (typeof lineNumbers === 'function') { - renderLineNumbers = true; - renderCustomLineNumbers = lineNumbers; - renderRelativeLineNumbers = false; - } else if (lineNumbers === 'relative') { - renderLineNumbers = true; - renderCustomLineNumbers = null; - renderRelativeLineNumbers = true; - } else if (lineNumbers === 'on') { - renderLineNumbers = true; - renderCustomLineNumbers = null; - renderRelativeLineNumbers = false; - } else { - renderLineNumbers = false; - renderCustomLineNumbers = null; - renderRelativeLineNumbers = false; - } - } - - let layoutInfo = EditorLayoutProvider.compute({ - outerWidth: outerWidth, - outerHeight: outerHeight, - showGlyphMargin: glyphMargin, - lineHeight: fontInfo.lineHeight, - showLineNumbers: renderLineNumbers, - lineNumbersMinChars: lineNumbersMinChars, - lineNumbersDigitCount: lineNumbersDigitCount, - lineDecorationsWidth: lineDecorationsWidth, - typicalHalfwidthCharacterWidth: fontInfo.typicalHalfwidthCharacterWidth, - maxDigitWidth: fontInfo.maxDigitWidth, - verticalScrollbarWidth: scrollbar.verticalScrollbarSize, - horizontalScrollbarHeight: scrollbar.horizontalScrollbarSize, - scrollbarArrowSize: scrollbar.arrowSize, - verticalScrollbarHasArrows: scrollbar.verticalHasArrows, - minimap: minimap.enabled, - minimapRenderCharacters: minimap.renderCharacters, - minimapMaxColumn: minimap.maxColumn, - pixelRatio: pixelRatio - }); - - let bareWrappingInfo: { isWordWrapMinified: boolean; isViewportWrapping: boolean; wrappingColumn: number; } = null; - { - let wordWrap = opts.wordWrap; - let wordWrapColumn = toInteger(opts.wordWrapColumn, 1); - let wordWrapMinified = toBoolean(opts.wordWrapMinified); - - // Compatibility with old true or false values - if (wordWrap === true) { - wordWrap = 'on'; - } else if (wordWrap === false) { - wordWrap = 'off'; - } - - if (wordWrapMinified && isDominatedByLongLines) { - // Force viewport width wrapping if model is dominated by long lines - bareWrappingInfo = { - isWordWrapMinified: true, - isViewportWrapping: true, - wrappingColumn: Math.max(1, layoutInfo.viewportColumn) - }; - } else if (wordWrap === 'on') { - bareWrappingInfo = { - isWordWrapMinified: false, - isViewportWrapping: true, - wrappingColumn: Math.max(1, layoutInfo.viewportColumn) - }; - } else if (wordWrap === 'bounded') { - bareWrappingInfo = { - isWordWrapMinified: false, - isViewportWrapping: true, - wrappingColumn: Math.min(Math.max(1, layoutInfo.viewportColumn), wordWrapColumn) - }; - } else if (wordWrap === 'wordWrapColumn') { - bareWrappingInfo = { - isWordWrapMinified: false, - isViewportWrapping: false, - wrappingColumn: wordWrapColumn - }; - } else { - bareWrappingInfo = { - isWordWrapMinified: false, - isViewportWrapping: false, - wrappingColumn: -1 - }; - } - } - - let wrappingInfo = new editorOptions.EditorWrappingInfo({ - inDiffEditor: Boolean(opts.inDiffEditor), - isDominatedByLongLines: isDominatedByLongLines, - isWordWrapMinified: bareWrappingInfo.isWordWrapMinified, - isViewportWrapping: bareWrappingInfo.isViewportWrapping, - wrappingColumn: bareWrappingInfo.wrappingColumn, - wrappingIndent: wrappingIndentFromString(opts.wrappingIndent), - wordWrapBreakBeforeCharacters: String(opts.wordWrapBreakBeforeCharacters), - wordWrapBreakAfterCharacters: String(opts.wordWrapBreakAfterCharacters), - wordWrapBreakObtrusiveCharacters: String(opts.wordWrapBreakObtrusiveCharacters), - }); - - let readOnly = toBoolean(opts.readOnly); - - let tabFocusMode = TabFocus.getTabFocusMode(); - if (readOnly) { - tabFocusMode = true; - } - - - let renderWhitespace = opts.renderWhitespace; - // Compatibility with old true or false values - if (renderWhitespace === true) { - renderWhitespace = 'boundary'; - } else if (renderWhitespace === false) { - renderWhitespace = 'none'; - } - - let renderLineHighlight = opts.renderLineHighlight; - // Compatibility with old true or false values - if (renderLineHighlight === true) { - renderLineHighlight = 'line'; - } else if (renderLineHighlight === false) { - renderLineHighlight = 'none'; - } - - let viewInfo = new editorOptions.InternalEditorViewOptions({ - theme: opts.theme, - canUseTranslate3d: canUseTranslate3d, - disableMonospaceOptimizations: (toBoolean(opts.disableMonospaceOptimizations) || toBoolean(opts.fontLigatures)), - experimentalScreenReader: toBoolean(opts.experimentalScreenReader), - rulers: toSortedIntegerArray(opts.rulers), - ariaLabel: String(opts.ariaLabel), - renderLineNumbers: renderLineNumbers, - renderCustomLineNumbers: renderCustomLineNumbers, - renderRelativeLineNumbers: renderRelativeLineNumbers, - selectOnLineNumbers: toBoolean(opts.selectOnLineNumbers), - glyphMargin: glyphMargin, - revealHorizontalRightPadding: toInteger(opts.revealHorizontalRightPadding, 0), - roundedSelection: toBoolean(opts.roundedSelection), - overviewRulerLanes: toInteger(opts.overviewRulerLanes, 0, 3), - overviewRulerBorder: toBoolean(opts.overviewRulerBorder), - cursorBlinking: cursorBlinkingStyleFromString(opts.cursorBlinking), - mouseWheelZoom: toBoolean(opts.mouseWheelZoom), - cursorStyle: cursorStyleFromString(opts.cursorStyle), - hideCursorInOverviewRuler: toBoolean(opts.hideCursorInOverviewRuler), - scrollBeyondLastLine: toBoolean(opts.scrollBeyondLastLine), - editorClassName: editorClassName, - stopRenderingLineAfter: stopRenderingLineAfter, - renderWhitespace: renderWhitespace, - renderControlCharacters: toBoolean(opts.renderControlCharacters), - fontLigatures: toBoolean(opts.fontLigatures), - renderIndentGuides: toBoolean(opts.renderIndentGuides), - renderLineHighlight: renderLineHighlight, - scrollbar: scrollbar, - minimap: minimap, - fixedOverflowWidgets: toBoolean(opts.fixedOverflowWidgets) - }); - - let contribInfo = new editorOptions.EditorContribOptions({ - selectionClipboard: toBoolean(opts.selectionClipboard), - hover: toBoolean(opts.hover), - contextmenu: toBoolean(opts.contextmenu), - quickSuggestions: typeof opts.quickSuggestions === 'object' ? { other: true, ...opts.quickSuggestions } : toBoolean(opts.quickSuggestions), - quickSuggestionsDelay: toInteger(opts.quickSuggestionsDelay), - parameterHints: toBoolean(opts.parameterHints), - iconsInSuggestions: toBoolean(opts.iconsInSuggestions), - formatOnType: toBoolean(opts.formatOnType), - formatOnPaste: toBoolean(opts.formatOnPaste), - suggestOnTriggerCharacters: toBoolean(opts.suggestOnTriggerCharacters), - acceptSuggestionOnEnter: toBoolean(opts.acceptSuggestionOnEnter), - acceptSuggestionOnCommitCharacter: toBoolean(opts.acceptSuggestionOnCommitCharacter), - snippetSuggestions: opts.snippetSuggestions, - emptySelectionClipboard: opts.emptySelectionClipboard, - wordBasedSuggestions: opts.wordBasedSuggestions, - suggestFontSize: opts.suggestFontSize, - suggestLineHeight: opts.suggestLineHeight, - selectionHighlight: toBoolean(opts.selectionHighlight), - occurrencesHighlight: toBoolean(opts.occurrencesHighlight), - codeLens: opts.referenceInfos && opts.codeLens, - folding: toBoolean(opts.folding), - hideFoldIcons: toBoolean(opts.hideFoldIcons), - matchBrackets: toBoolean(opts.matchBrackets), - }); - - return new editorOptions.InternalEditorOptions({ - lineHeight: fontInfo.lineHeight, // todo -> duplicated in styling - readOnly: readOnly, - wordSeparators: String(opts.wordSeparators), - autoClosingBrackets: toBoolean(opts.autoClosingBrackets), - useTabStops: toBoolean(opts.useTabStops), - tabFocusMode: tabFocusMode, - dragAndDrop: toBoolean(opts.dragAndDrop), - layoutInfo: layoutInfo, - fontInfo: fontInfo, - viewInfo: viewInfo, - wrappingInfo: wrappingInfo, - contribInfo: contribInfo, - }); - } - - private static _sanitizeScrollbarOpts(raw: editorOptions.IEditorScrollbarOptions, mouseWheelScrollSensitivity: number): editorOptions.InternalEditorScrollbarOptions { - - let visibilityFromString = (visibility: string) => { - switch (visibility) { - case 'hidden': - return ScrollbarVisibility.Hidden; - case 'visible': - return ScrollbarVisibility.Visible; - default: - return ScrollbarVisibility.Auto; - } - }; - - let horizontalScrollbarSize = toIntegerWithDefault(raw.horizontalScrollbarSize, 10); - let verticalScrollbarSize = toIntegerWithDefault(raw.verticalScrollbarSize, 14); - return new editorOptions.InternalEditorScrollbarOptions({ - vertical: visibilityFromString(raw.vertical), - horizontal: visibilityFromString(raw.horizontal), - - arrowSize: toIntegerWithDefault(raw.arrowSize, 11), - useShadows: toBooleanWithDefault(raw.useShadows, true), - - verticalHasArrows: toBooleanWithDefault(raw.verticalHasArrows, false), - horizontalHasArrows: toBooleanWithDefault(raw.horizontalHasArrows, false), - - horizontalScrollbarSize: horizontalScrollbarSize, - horizontalSliderSize: toIntegerWithDefault(raw.horizontalSliderSize, horizontalScrollbarSize), - - verticalScrollbarSize: verticalScrollbarSize, - verticalSliderSize: toIntegerWithDefault(raw.verticalSliderSize, verticalScrollbarSize), - - handleMouseWheel: toBooleanWithDefault(raw.handleMouseWheel, true), - mouseWheelScrollSensitivity: mouseWheelScrollSensitivity - }); - } - - private static _sanitizeMinimapOpts(raw: editorOptions.IEditorMinimapOptions): editorOptions.InternalEditorMinimapOptions { - let maxColumn = toIntegerWithDefault(raw.maxColumn, DefaultConfig.editor.minimap.maxColumn); - if (maxColumn < 1) { - maxColumn = 1; - } - return new editorOptions.InternalEditorMinimapOptions({ - enabled: toBooleanWithDefault(raw.enabled, DefaultConfig.editor.minimap.enabled), - renderCharacters: toBooleanWithDefault(raw.renderCharacters, DefaultConfig.editor.minimap.renderCharacters), - maxColumn: maxColumn, - }); - } -} - function toBoolean(value: any): boolean { return value === 'false' ? false : Boolean(value); } -function toBooleanWithDefault(value: any, defaultValue: boolean): boolean { - if (typeof value === 'undefined') { - return defaultValue; - } - return toBoolean(value); -} - -function toFloat(source: any, defaultValue: number): number { - let r = parseFloat(source); - if (isNaN(r)) { - r = defaultValue; - } - return r; -} - -function toInteger(source: any, minimum: number = Constants.MIN_SAFE_SMALL_INTEGER, maximum: number = Constants.MAX_SAFE_SMALL_INTEGER): number { - let r = parseInt(source, 10); - if (isNaN(r)) { - r = 0; - } - r = Math.max(minimum, r); - r = Math.min(maximum, r); - return r | 0; -} - -function toSortedIntegerArray(source: any): number[] { - if (!Array.isArray(source)) { - return []; - } - let arrSource = source; - let r = arrSource.map(el => toInteger(el)); - r.sort(); - return r; -} - -function wrappingIndentFromString(wrappingIndent: string): editorOptions.WrappingIndent { - if (wrappingIndent === 'indent') { - return editorOptions.WrappingIndent.Indent; - } else if (wrappingIndent === 'same') { - return editorOptions.WrappingIndent.Same; - } else { - return editorOptions.WrappingIndent.None; - } -} - -function cursorStyleFromString(cursorStyle: string): editorOptions.TextEditorCursorStyle { - if (cursorStyle === 'line') { - return editorOptions.TextEditorCursorStyle.Line; - } else if (cursorStyle === 'block') { - return editorOptions.TextEditorCursorStyle.Block; - } else if (cursorStyle === 'underline') { - return editorOptions.TextEditorCursorStyle.Underline; - } else if (cursorStyle === 'line-thin') { - return editorOptions.TextEditorCursorStyle.LineThin; - } else if (cursorStyle === 'block-outline') { - return editorOptions.TextEditorCursorStyle.BlockOutline; - } else if (cursorStyle === 'underline-thin') { - return editorOptions.TextEditorCursorStyle.UnderlineThin; - } - return editorOptions.TextEditorCursorStyle.Line; -} - -function cursorBlinkingStyleFromString(cursorBlinkingStyle: string): editorOptions.TextEditorCursorBlinkingStyle { - switch (cursorBlinkingStyle) { - case 'blink': - return editorOptions.TextEditorCursorBlinkingStyle.Blink; - case 'smooth': - return editorOptions.TextEditorCursorBlinkingStyle.Smooth; - case 'phase': - return editorOptions.TextEditorCursorBlinkingStyle.Phase; - case 'expand': - return editorOptions.TextEditorCursorBlinkingStyle.Expand; - case 'visible': // maintain compatibility - case 'solid': - return editorOptions.TextEditorCursorBlinkingStyle.Solid; - } - return editorOptions.TextEditorCursorBlinkingStyle.Blink; -} - -function toIntegerWithDefault(source: any, defaultValue: number): number { - if (typeof source === 'undefined') { - return defaultValue; - } - return toInteger(source); -} - export interface IElementSizeObserver { startObserving(): void; observe(dimension?: editorCommon.IDimension): void; @@ -477,7 +88,6 @@ export interface IElementSizeObserver { export abstract class CommonEditorConfiguration extends Disposable implements editorCommon.IConfiguration { public editor: editorOptions.InternalEditorOptions; - public editorClone: editorOptions.InternalEditorOptions; protected _configWithDefaults: ConfigurationWithDefaults; protected _elementSizeObserver: IElementSizeObserver; @@ -494,7 +104,6 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed this._isDominatedByLongLines = false; this._lineNumbersDigitCount = 1; this.editor = this._computeInternalOptions(); - this.editorClone = this.editor.clone(); this._register(EditorZoom.onDidChangeZoomLevel(_ => this._recomputeOptions())); this._register(TabFocus.onDidChangeTabFocus(_ => this._recomputeOptions())); } @@ -514,7 +123,6 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed let changeEvent = this.editor.createChangeEvent(newOptions); this.editor = newOptions; - this.editorClone = this.editor.clone(); this._onDidChange.fire(changeEvent); } @@ -527,25 +135,21 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed let editorClassName = this._getEditorClassName(opts.theme, toBoolean(opts.fontLigatures), opts.mouseStyle); - let disableTranslate3d = toBoolean(opts.disableTranslate3d); - let canUseTranslate3d = this._getCanUseTranslate3d(); - if (disableTranslate3d) { - canUseTranslate3d = false; - } - let bareFontInfo = BareFontInfo.createFromRawSettings(opts, this.getZoomLevel()); - return InternalEditorOptionsHelper.createInternalEditorOptions( - this.getOuterWidth(), - this.getOuterHeight(), - opts, - this.readConfiguration(bareFontInfo), - editorClassName, - this._isDominatedByLongLines, - this._lineNumbersDigitCount, - canUseTranslate3d, - this._getPixelRatio() - ); + const env = new editorOptions.EnvironmentalOptions({ + outerWidth: this.getOuterWidth(), + outerHeight: this.getOuterHeight(), + fontInfo: this.readConfiguration(bareFontInfo), + editorClassName: editorClassName, + isDominatedByLongLines: this._isDominatedByLongLines, + lineNumbersDigitCount: this._lineNumbersDigitCount, + canUseTranslate3d: this._getCanUseTranslate3d(), + pixelRatio: this._getPixelRatio(), + tabFocusMode: TabFocus.getTabFocusMode() + }); + + return editorOptions.InternalEditorOptionsFactory.createInternalEditorOptions(env, opts); } public updateOptions(newOptions: editorOptions.IEditorOptions): void { @@ -559,7 +163,7 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed } public setMaxLineNumber(maxLineNumber: number): void { - let digitCount = CommonEditorConfiguration.digitCount(maxLineNumber); + let digitCount = CommonEditorConfiguration._digitCount(maxLineNumber); if (this._lineNumbersDigitCount === digitCount) { return; } @@ -567,7 +171,7 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed this._recomputeOptions(); } - private static digitCount(n: number): number { + private static _digitCount(n: number): number { var r = 0; while (n) { n = Math.floor(n / 10); diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index cb25845017ae8..384fe75372232 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -6,7 +6,8 @@ import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import { FontInfo } from 'vs/editor/common/config/fontInfo'; -import * as objects from 'vs/base/common/objects'; +import { Constants } from 'vs/editor/common/core/uint'; +import { DefaultConfig } from "vs/editor/common/config/defaultConfig"; /** * Configuration options for editor scrollbars @@ -676,13 +677,6 @@ export class InternalEditorScrollbarOptions { && this.mouseWheelScrollSensitivity === other.mouseWheelScrollSensitivity ); } - - /** - * @internal - */ - public clone(): InternalEditorScrollbarOptions { - return new InternalEditorScrollbarOptions(this); - } } export class InternalEditorMinimapOptions { @@ -715,13 +709,6 @@ export class InternalEditorMinimapOptions { && this.maxColumn === other.maxColumn ); } - - /** - * @internal - */ - public clone(): InternalEditorMinimapOptions { - return new InternalEditorMinimapOptions(this); - } } export class EditorWrappingInfo { @@ -778,13 +765,6 @@ export class EditorWrappingInfo { && this.wordWrapBreakObtrusiveCharacters === other.wordWrapBreakObtrusiveCharacters ); } - - /** - * @internal - */ - public clone(): EditorWrappingInfo { - return new EditorWrappingInfo(this); - } } export class InternalEditorViewOptions { @@ -883,8 +863,8 @@ export class InternalEditorViewOptions { this.fontLigatures = Boolean(source.fontLigatures); this.renderIndentGuides = Boolean(source.renderIndentGuides); this.renderLineHighlight = source.renderLineHighlight; - this.scrollbar = source.scrollbar.clone(); - this.minimap = source.minimap.clone(); + this.scrollbar = source.scrollbar; + this.minimap = source.minimap; this.fixedOverflowWidgets = Boolean(source.fixedOverflowWidgets); } @@ -991,13 +971,6 @@ export class InternalEditorViewOptions { fixedOverflowWidgets: this.fixedOverflowWidgets !== newOpts.fixedOverflowWidgets }; } - - /** - * @internal - */ - public clone(): InternalEditorViewOptions { - return new InternalEditorViewOptions(this); - } } export class EditorContribOptions { @@ -1086,7 +1059,7 @@ export class EditorContribOptions { this.selectionClipboard === other.selectionClipboard && this.hover === other.hover && this.contextmenu === other.contextmenu - && objects.equals(this.quickSuggestions, other.quickSuggestions) + && EditorContribOptions._quickSuggestionsEquals(this.quickSuggestions, other.quickSuggestions) && this.quickSuggestionsDelay === other.quickSuggestionsDelay && this.parameterHints === other.parameterHints && this.iconsInSuggestions === other.iconsInSuggestions @@ -1097,7 +1070,7 @@ export class EditorContribOptions { && this.acceptSuggestionOnCommitCharacter === other.acceptSuggestionOnCommitCharacter && this.snippetSuggestions === other.snippetSuggestions && this.emptySelectionClipboard === other.emptySelectionClipboard - && objects.equals(this.wordBasedSuggestions, other.wordBasedSuggestions) + && this.wordBasedSuggestions === other.wordBasedSuggestions && this.suggestFontSize === other.suggestFontSize && this.suggestLineHeight === other.suggestLineHeight && this.selectionHighlight === other.selectionHighlight @@ -1109,11 +1082,21 @@ export class EditorContribOptions { ); } - /** - * @internal - */ - public clone(): EditorContribOptions { - return new EditorContribOptions(this); + private static _quickSuggestionsEquals(a: boolean | { other: boolean, comments: boolean, strings: boolean }, b: boolean | { other: boolean, comments: boolean, strings: boolean }): boolean { + if (typeof a === 'boolean') { + if (typeof b !== 'boolean') { + return false; + } + return a === b; + } + if (typeof b === 'boolean') { + return false; + } + return ( + a.comments === b.comments + && a.other === b.other + && a.strings === b.strings + ); } } @@ -1163,11 +1146,11 @@ export class InternalEditorOptions { this.useTabStops = Boolean(source.useTabStops); this.tabFocusMode = Boolean(source.tabFocusMode); this.dragAndDrop = Boolean(source.dragAndDrop); - this.layoutInfo = source.layoutInfo.clone(); - this.fontInfo = source.fontInfo.clone(); - this.viewInfo = source.viewInfo.clone(); - this.wrappingInfo = source.wrappingInfo.clone(); - this.contribInfo = source.contribInfo.clone(); + this.layoutInfo = source.layoutInfo; + this.fontInfo = source.fontInfo; + this.viewInfo = source.viewInfo; + this.wrappingInfo = source.wrappingInfo; + this.contribInfo = source.contribInfo; } /** @@ -1209,13 +1192,6 @@ export class InternalEditorOptions { contribInfo: (!this.contribInfo.equals(newOpts.contribInfo)), }; } - - /** - * @internal - */ - public clone(): InternalEditorOptions { - return new InternalEditorOptions(this); - } } /** @@ -1267,13 +1243,6 @@ export class OverviewRulerPosition { && this.right === other.right ); } - - /** - * @internal - */ - public clone(): OverviewRulerPosition { - return new OverviewRulerPosition(this); - } } /** @@ -1416,7 +1385,7 @@ export class EditorLayoutInfo { this.viewportColumn = source.viewportColumn | 0; this.verticalScrollbarWidth = source.verticalScrollbarWidth | 0; this.horizontalScrollbarHeight = source.horizontalScrollbarHeight | 0; - this.overviewRuler = source.overviewRuler.clone(); + this.overviewRuler = source.overviewRuler; } /** @@ -1446,13 +1415,6 @@ export class EditorLayoutInfo { && this.overviewRuler.equals(other.overviewRuler) ); } - - /** - * @internal - */ - public clone(): EditorLayoutInfo { - return new EditorLayoutInfo(this); - } } export interface IViewConfigurationChangedEvent { @@ -1505,3 +1467,565 @@ export interface IConfigurationChangedEvent { readonly wrappingInfo: boolean; readonly contribInfo: boolean; } + +/** + * @internal + */ +export class EnvironmentalOptions { + + public readonly outerWidth: number; + public readonly outerHeight: number; + public readonly fontInfo: FontInfo; + public readonly editorClassName: string; + public readonly isDominatedByLongLines: boolean; + public readonly lineNumbersDigitCount: number; + public readonly canUseTranslate3d: boolean; + public readonly pixelRatio: number; + public readonly tabFocusMode: boolean; + + constructor(opts: { + outerWidth: number; + outerHeight: number; + fontInfo: FontInfo; + editorClassName: string; + isDominatedByLongLines: boolean; + lineNumbersDigitCount: number; + canUseTranslate3d: boolean; + pixelRatio: number; + tabFocusMode: boolean; + }) { + this.outerWidth = opts.outerWidth; + this.outerHeight = opts.outerHeight; + this.fontInfo = opts.fontInfo; + this.editorClassName = opts.editorClassName; + this.isDominatedByLongLines = opts.isDominatedByLongLines; + this.lineNumbersDigitCount = opts.lineNumbersDigitCount; + this.canUseTranslate3d = opts.canUseTranslate3d; + this.pixelRatio = opts.pixelRatio; + this.tabFocusMode = opts.tabFocusMode; + } +} + +/** + * @internal + */ +export class InternalEditorOptionsFactory { + + public static createInternalEditorOptions(env: EnvironmentalOptions, opts: IEditorOptions) { + + let stopRenderingLineAfter: number; + if (typeof opts.stopRenderingLineAfter !== 'undefined') { + stopRenderingLineAfter = this._toInteger(opts.stopRenderingLineAfter, -1); + } else { + stopRenderingLineAfter = 10000; + } + + const scrollbar = this._sanitizeScrollbarOpts(opts.scrollbar, this._toFloat(opts.mouseWheelScrollSensitivity, 1)); + const minimap = this._sanitizeMinimapOpts(opts.minimap); + + const glyphMargin = this._toBoolean(opts.glyphMargin); + const lineNumbersMinChars = this._toInteger(opts.lineNumbersMinChars, 1); + + let lineDecorationsWidth: number; + if (typeof opts.lineDecorationsWidth === 'string' && /^\d+(\.\d+)?ch$/.test(opts.lineDecorationsWidth)) { + const multiple = parseFloat(opts.lineDecorationsWidth.substr(0, opts.lineDecorationsWidth.length - 2)); + lineDecorationsWidth = multiple * env.fontInfo.typicalHalfwidthCharacterWidth; + } else { + lineDecorationsWidth = this._toInteger(opts.lineDecorationsWidth, 0); + } + if (opts.folding) { + lineDecorationsWidth += 16; + } + + let renderLineNumbers: boolean; + let renderCustomLineNumbers: (lineNumber: number) => string; + let renderRelativeLineNumbers: boolean; + { + let lineNumbers = opts.lineNumbers; + // Compatibility with old true or false values + if (lineNumbers === true) { + lineNumbers = 'on'; + } else if (lineNumbers === false) { + lineNumbers = 'off'; + } + + if (typeof lineNumbers === 'function') { + renderLineNumbers = true; + renderCustomLineNumbers = lineNumbers; + renderRelativeLineNumbers = false; + } else if (lineNumbers === 'relative') { + renderLineNumbers = true; + renderCustomLineNumbers = null; + renderRelativeLineNumbers = true; + } else if (lineNumbers === 'on') { + renderLineNumbers = true; + renderCustomLineNumbers = null; + renderRelativeLineNumbers = false; + } else { + renderLineNumbers = false; + renderCustomLineNumbers = null; + renderRelativeLineNumbers = false; + } + } + + const layoutInfo = EditorLayoutProvider.compute({ + outerWidth: env.outerWidth, + outerHeight: env.outerHeight, + showGlyphMargin: glyphMargin, + lineHeight: env.fontInfo.lineHeight, + showLineNumbers: renderLineNumbers, + lineNumbersMinChars: lineNumbersMinChars, + lineNumbersDigitCount: env.lineNumbersDigitCount, + lineDecorationsWidth: lineDecorationsWidth, + typicalHalfwidthCharacterWidth: env.fontInfo.typicalHalfwidthCharacterWidth, + maxDigitWidth: env.fontInfo.maxDigitWidth, + verticalScrollbarWidth: scrollbar.verticalScrollbarSize, + horizontalScrollbarHeight: scrollbar.horizontalScrollbarSize, + scrollbarArrowSize: scrollbar.arrowSize, + verticalScrollbarHasArrows: scrollbar.verticalHasArrows, + minimap: minimap.enabled, + minimapRenderCharacters: minimap.renderCharacters, + minimapMaxColumn: minimap.maxColumn, + pixelRatio: env.pixelRatio + }); + + let bareWrappingInfo: { isWordWrapMinified: boolean; isViewportWrapping: boolean; wrappingColumn: number; } = null; + { + let wordWrap = opts.wordWrap; + const wordWrapColumn = this._toInteger(opts.wordWrapColumn, 1); + const wordWrapMinified = this._toBoolean(opts.wordWrapMinified); + + // Compatibility with old true or false values + if (wordWrap === true) { + wordWrap = 'on'; + } else if (wordWrap === false) { + wordWrap = 'off'; + } + + if (wordWrapMinified && env.isDominatedByLongLines) { + // Force viewport width wrapping if model is dominated by long lines + bareWrappingInfo = { + isWordWrapMinified: true, + isViewportWrapping: true, + wrappingColumn: Math.max(1, layoutInfo.viewportColumn) + }; + } else if (wordWrap === 'on') { + bareWrappingInfo = { + isWordWrapMinified: false, + isViewportWrapping: true, + wrappingColumn: Math.max(1, layoutInfo.viewportColumn) + }; + } else if (wordWrap === 'bounded') { + bareWrappingInfo = { + isWordWrapMinified: false, + isViewportWrapping: true, + wrappingColumn: Math.min(Math.max(1, layoutInfo.viewportColumn), wordWrapColumn) + }; + } else if (wordWrap === 'wordWrapColumn') { + bareWrappingInfo = { + isWordWrapMinified: false, + isViewportWrapping: false, + wrappingColumn: wordWrapColumn + }; + } else { + bareWrappingInfo = { + isWordWrapMinified: false, + isViewportWrapping: false, + wrappingColumn: -1 + }; + } + } + + const wrappingInfo = new EditorWrappingInfo({ + inDiffEditor: Boolean(opts.inDiffEditor), + isDominatedByLongLines: env.isDominatedByLongLines, + isWordWrapMinified: bareWrappingInfo.isWordWrapMinified, + isViewportWrapping: bareWrappingInfo.isViewportWrapping, + wrappingColumn: bareWrappingInfo.wrappingColumn, + wrappingIndent: this._wrappingIndentFromString(opts.wrappingIndent), + wordWrapBreakBeforeCharacters: String(opts.wordWrapBreakBeforeCharacters), + wordWrapBreakAfterCharacters: String(opts.wordWrapBreakAfterCharacters), + wordWrapBreakObtrusiveCharacters: String(opts.wordWrapBreakObtrusiveCharacters), + }); + + const readOnly = this._toBoolean(opts.readOnly); + + let renderWhitespace = opts.renderWhitespace; + // Compatibility with old true or false values + if (renderWhitespace === true) { + renderWhitespace = 'boundary'; + } else if (renderWhitespace === false) { + renderWhitespace = 'none'; + } + + let renderLineHighlight = opts.renderLineHighlight; + // Compatibility with old true or false values + if (renderLineHighlight === true) { + renderLineHighlight = 'line'; + } else if (renderLineHighlight === false) { + renderLineHighlight = 'none'; + } + + const viewInfo = new InternalEditorViewOptions({ + theme: opts.theme, + canUseTranslate3d: this._toBoolean(opts.disableTranslate3d) ? false : env.canUseTranslate3d, + disableMonospaceOptimizations: (this._toBoolean(opts.disableMonospaceOptimizations) || this._toBoolean(opts.fontLigatures)), + experimentalScreenReader: this._toBoolean(opts.experimentalScreenReader), + rulers: this._toSortedIntegerArray(opts.rulers), + ariaLabel: String(opts.ariaLabel), + renderLineNumbers: renderLineNumbers, + renderCustomLineNumbers: renderCustomLineNumbers, + renderRelativeLineNumbers: renderRelativeLineNumbers, + selectOnLineNumbers: this._toBoolean(opts.selectOnLineNumbers), + glyphMargin: glyphMargin, + revealHorizontalRightPadding: this._toInteger(opts.revealHorizontalRightPadding, 0), + roundedSelection: this._toBoolean(opts.roundedSelection), + overviewRulerLanes: this._toInteger(opts.overviewRulerLanes, 0, 3), + overviewRulerBorder: this._toBoolean(opts.overviewRulerBorder), + cursorBlinking: this._cursorBlinkingStyleFromString(opts.cursorBlinking), + mouseWheelZoom: this._toBoolean(opts.mouseWheelZoom), + cursorStyle: this._cursorStyleFromString(opts.cursorStyle), + hideCursorInOverviewRuler: this._toBoolean(opts.hideCursorInOverviewRuler), + scrollBeyondLastLine: this._toBoolean(opts.scrollBeyondLastLine), + editorClassName: env.editorClassName, + stopRenderingLineAfter: stopRenderingLineAfter, + renderWhitespace: renderWhitespace, + renderControlCharacters: this._toBoolean(opts.renderControlCharacters), + fontLigatures: this._toBoolean(opts.fontLigatures), + renderIndentGuides: this._toBoolean(opts.renderIndentGuides), + renderLineHighlight: renderLineHighlight, + scrollbar: scrollbar, + minimap: minimap, + fixedOverflowWidgets: this._toBoolean(opts.fixedOverflowWidgets) + }); + + const contribInfo = new EditorContribOptions({ + selectionClipboard: this._toBoolean(opts.selectionClipboard), + hover: this._toBoolean(opts.hover), + contextmenu: this._toBoolean(opts.contextmenu), + quickSuggestions: typeof opts.quickSuggestions === 'object' ? { other: true, ...opts.quickSuggestions } : this._toBoolean(opts.quickSuggestions), + quickSuggestionsDelay: this._toInteger(opts.quickSuggestionsDelay), + parameterHints: this._toBoolean(opts.parameterHints), + iconsInSuggestions: this._toBoolean(opts.iconsInSuggestions), + formatOnType: this._toBoolean(opts.formatOnType), + formatOnPaste: this._toBoolean(opts.formatOnPaste), + suggestOnTriggerCharacters: this._toBoolean(opts.suggestOnTriggerCharacters), + acceptSuggestionOnEnter: this._toBoolean(opts.acceptSuggestionOnEnter), + acceptSuggestionOnCommitCharacter: this._toBoolean(opts.acceptSuggestionOnCommitCharacter), + snippetSuggestions: opts.snippetSuggestions, + emptySelectionClipboard: opts.emptySelectionClipboard, + wordBasedSuggestions: opts.wordBasedSuggestions, + suggestFontSize: opts.suggestFontSize, + suggestLineHeight: opts.suggestLineHeight, + selectionHighlight: this._toBoolean(opts.selectionHighlight), + occurrencesHighlight: this._toBoolean(opts.occurrencesHighlight), + codeLens: opts.referenceInfos && opts.codeLens, + folding: this._toBoolean(opts.folding), + hideFoldIcons: this._toBoolean(opts.hideFoldIcons), + matchBrackets: this._toBoolean(opts.matchBrackets), + }); + + return new InternalEditorOptions({ + lineHeight: env.fontInfo.lineHeight, // todo -> duplicated in styling + readOnly: readOnly, + wordSeparators: String(opts.wordSeparators), + autoClosingBrackets: this._toBoolean(opts.autoClosingBrackets), + useTabStops: this._toBoolean(opts.useTabStops), + tabFocusMode: readOnly ? true : env.tabFocusMode, + dragAndDrop: this._toBoolean(opts.dragAndDrop), + layoutInfo: layoutInfo, + fontInfo: env.fontInfo, + viewInfo: viewInfo, + wrappingInfo: wrappingInfo, + contribInfo: contribInfo, + }); + } + + private static _scrollbarVisibilityFromString(visibility: string): ScrollbarVisibility { + switch (visibility) { + case 'hidden': + return ScrollbarVisibility.Hidden; + case 'visible': + return ScrollbarVisibility.Visible; + default: + return ScrollbarVisibility.Auto; + } + } + + private static _sanitizeScrollbarOpts(raw: IEditorScrollbarOptions, mouseWheelScrollSensitivity: number): InternalEditorScrollbarOptions { + const horizontalScrollbarSize = this._toIntegerWithDefault(raw.horizontalScrollbarSize, 10); + const verticalScrollbarSize = this._toIntegerWithDefault(raw.verticalScrollbarSize, 14); + return new InternalEditorScrollbarOptions({ + vertical: this._scrollbarVisibilityFromString(raw.vertical), + horizontal: this._scrollbarVisibilityFromString(raw.horizontal), + + arrowSize: this._toIntegerWithDefault(raw.arrowSize, 11), + useShadows: this._toBooleanWithDefault(raw.useShadows, true), + + verticalHasArrows: this._toBooleanWithDefault(raw.verticalHasArrows, false), + horizontalHasArrows: this._toBooleanWithDefault(raw.horizontalHasArrows, false), + + horizontalScrollbarSize: horizontalScrollbarSize, + horizontalSliderSize: this._toIntegerWithDefault(raw.horizontalSliderSize, horizontalScrollbarSize), + + verticalScrollbarSize: verticalScrollbarSize, + verticalSliderSize: this._toIntegerWithDefault(raw.verticalSliderSize, verticalScrollbarSize), + + handleMouseWheel: this._toBooleanWithDefault(raw.handleMouseWheel, true), + mouseWheelScrollSensitivity: mouseWheelScrollSensitivity + }); + } + + private static _sanitizeMinimapOpts(raw: IEditorMinimapOptions): InternalEditorMinimapOptions { + let maxColumn = this._toIntegerWithDefault(raw.maxColumn, DefaultConfig.editor.minimap.maxColumn); + if (maxColumn < 1) { + maxColumn = 1; + } + return new InternalEditorMinimapOptions({ + enabled: this._toBooleanWithDefault(raw.enabled, DefaultConfig.editor.minimap.enabled), + renderCharacters: this._toBooleanWithDefault(raw.renderCharacters, DefaultConfig.editor.minimap.renderCharacters), + maxColumn: maxColumn, + }); + } + + private static _wrappingIndentFromString(wrappingIndent: string): WrappingIndent { + if (wrappingIndent === 'indent') { + return WrappingIndent.Indent; + } else if (wrappingIndent === 'same') { + return WrappingIndent.Same; + } else { + return WrappingIndent.None; + } + } + + private static _cursorStyleFromString(cursorStyle: string): TextEditorCursorStyle { + if (cursorStyle === 'line') { + return TextEditorCursorStyle.Line; + } else if (cursorStyle === 'block') { + return TextEditorCursorStyle.Block; + } else if (cursorStyle === 'underline') { + return TextEditorCursorStyle.Underline; + } else if (cursorStyle === 'line-thin') { + return TextEditorCursorStyle.LineThin; + } else if (cursorStyle === 'block-outline') { + return TextEditorCursorStyle.BlockOutline; + } else if (cursorStyle === 'underline-thin') { + return TextEditorCursorStyle.UnderlineThin; + } + return TextEditorCursorStyle.Line; + } + + private static _cursorBlinkingStyleFromString(cursorBlinkingStyle: string): TextEditorCursorBlinkingStyle { + switch (cursorBlinkingStyle) { + case 'blink': + return TextEditorCursorBlinkingStyle.Blink; + case 'smooth': + return TextEditorCursorBlinkingStyle.Smooth; + case 'phase': + return TextEditorCursorBlinkingStyle.Phase; + case 'expand': + return TextEditorCursorBlinkingStyle.Expand; + case 'visible': // maintain compatibility + case 'solid': + return TextEditorCursorBlinkingStyle.Solid; + } + return TextEditorCursorBlinkingStyle.Blink; + } + + private static _toBoolean(value: any): boolean { + return value === 'false' ? false : Boolean(value); + } + + private static _toBooleanWithDefault(value: any, defaultValue: boolean): boolean { + if (typeof value === 'undefined') { + return defaultValue; + } + return this._toBoolean(value); + } + + private static _toInteger(source: any, minimum: number = Constants.MIN_SAFE_SMALL_INTEGER, maximum: number = Constants.MAX_SAFE_SMALL_INTEGER): number { + let r = parseInt(source, 10); + if (isNaN(r)) { + r = 0; + } + r = Math.max(minimum, r); + r = Math.min(maximum, r); + return r | 0; + } + + private static _toIntegerWithDefault(source: any, defaultValue: number): number { + if (typeof source === 'undefined') { + return defaultValue; + } + return this._toInteger(source); + } + + private static _toSortedIntegerArray(source: any): number[] { + if (!Array.isArray(source)) { + return []; + } + const arrSource = source; + const r = arrSource.map(el => this._toInteger(el)); + r.sort(); + return r; + } + + private static _toFloat(source: any, defaultValue: number): number { + let r = parseFloat(source); + if (isNaN(r)) { + r = defaultValue; + } + return r; + } +} + +/** + * @internal + */ +export interface IEditorLayoutProviderOpts { + outerWidth: number; + outerHeight: number; + + showGlyphMargin: boolean; + lineHeight: number; + + showLineNumbers: boolean; + lineNumbersMinChars: number; + lineNumbersDigitCount: number; + + lineDecorationsWidth: number; + + typicalHalfwidthCharacterWidth: number; + maxDigitWidth: number; + + verticalScrollbarWidth: number; + verticalScrollbarHasArrows: boolean; + scrollbarArrowSize: number; + horizontalScrollbarHeight: number; + + minimap: boolean; + minimapRenderCharacters: boolean; + minimapMaxColumn: number; + pixelRatio: number; +} + +/** + * @internal + */ +export class EditorLayoutProvider { + public static compute(_opts: IEditorLayoutProviderOpts): EditorLayoutInfo { + const outerWidth = _opts.outerWidth | 0; + const outerHeight = _opts.outerHeight | 0; + const showGlyphMargin = Boolean(_opts.showGlyphMargin); + const lineHeight = _opts.lineHeight | 0; + const showLineNumbers = Boolean(_opts.showLineNumbers); + const lineNumbersMinChars = _opts.lineNumbersMinChars | 0; + const lineNumbersDigitCount = _opts.lineNumbersDigitCount | 0; + const lineDecorationsWidth = _opts.lineDecorationsWidth | 0; + const typicalHalfwidthCharacterWidth = Number(_opts.typicalHalfwidthCharacterWidth); + const maxDigitWidth = Number(_opts.maxDigitWidth); + const verticalScrollbarWidth = _opts.verticalScrollbarWidth | 0; + const verticalScrollbarHasArrows = Boolean(_opts.verticalScrollbarHasArrows); + const scrollbarArrowSize = _opts.scrollbarArrowSize | 0; + const horizontalScrollbarHeight = _opts.horizontalScrollbarHeight | 0; + const minimap = Boolean(_opts.minimap); + const minimapRenderCharacters = Boolean(_opts.minimapRenderCharacters); + const minimapMaxColumn = _opts.minimapMaxColumn | 0; + const pixelRatio = Number(_opts.pixelRatio); + + let lineNumbersWidth = 0; + if (showLineNumbers) { + const digitCount = Math.max(lineNumbersDigitCount, lineNumbersMinChars); + lineNumbersWidth = Math.round(digitCount * maxDigitWidth); + } + + let glyphMarginWidth = 0; + if (showGlyphMargin) { + glyphMarginWidth = lineHeight; + } + + const glyphMarginLeft = 0; + const lineNumbersLeft = glyphMarginLeft + glyphMarginWidth; + const decorationsLeft = lineNumbersLeft + lineNumbersWidth; + const contentLeft = decorationsLeft + lineDecorationsWidth; + + const remainingWidth = outerWidth - glyphMarginWidth - lineNumbersWidth - lineDecorationsWidth; + + let renderMinimap: RenderMinimap; + let minimapWidth: number; + let contentWidth: number; + if (!minimap) { + minimapWidth = 0; + renderMinimap = RenderMinimap.None; + contentWidth = remainingWidth; + } else { + let minimapCharWidth: number; + if (pixelRatio >= 2) { + renderMinimap = minimapRenderCharacters ? RenderMinimap.Large : RenderMinimap.LargeBlocks; + minimapCharWidth = 2 / pixelRatio; + } else { + renderMinimap = minimapRenderCharacters ? RenderMinimap.Small : RenderMinimap.SmallBlocks; + minimapCharWidth = 1 / pixelRatio; + } + + // Given: + // viewportColumn = (contentWidth - verticalScrollbarWidth) / typicalHalfwidthCharacterWidth + // minimapWidth = viewportColumn * minimapCharWidth + // contentWidth = remainingWidth - minimapWidth + // What are good values for contentWidth and minimapWidth ? + + // minimapWidth = ((contentWidth - verticalScrollbarWidth) / typicalHalfwidthCharacterWidth) * minimapCharWidth + // typicalHalfwidthCharacterWidth * minimapWidth = (contentWidth - verticalScrollbarWidth) * minimapCharWidth + // typicalHalfwidthCharacterWidth * minimapWidth = (remainingWidth - minimapWidth - verticalScrollbarWidth) * minimapCharWidth + // (typicalHalfwidthCharacterWidth + minimapCharWidth) * minimapWidth = (remainingWidth - verticalScrollbarWidth) * minimapCharWidth + // minimapWidth = ((remainingWidth - verticalScrollbarWidth) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth) + + minimapWidth = Math.max(0, Math.floor(((remainingWidth - verticalScrollbarWidth) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth))); + let minimapColumns = minimapWidth / minimapCharWidth; + if (minimapColumns > minimapMaxColumn) { + minimapWidth = Math.floor(minimapMaxColumn * minimapCharWidth); + } + contentWidth = remainingWidth - minimapWidth; + } + + const viewportColumn = Math.max(1, Math.floor((contentWidth - verticalScrollbarWidth) / typicalHalfwidthCharacterWidth)); + + const verticalArrowSize = (verticalScrollbarHasArrows ? scrollbarArrowSize : 0); + + return new EditorLayoutInfo({ + width: outerWidth, + height: outerHeight, + + glyphMarginLeft: glyphMarginLeft, + glyphMarginWidth: glyphMarginWidth, + glyphMarginHeight: outerHeight, + + lineNumbersLeft: lineNumbersLeft, + lineNumbersWidth: lineNumbersWidth, + lineNumbersHeight: outerHeight, + + decorationsLeft: decorationsLeft, + decorationsWidth: lineDecorationsWidth, + decorationsHeight: outerHeight, + + contentLeft: contentLeft, + contentWidth: contentWidth, + contentHeight: outerHeight, + + renderMinimap: renderMinimap, + minimapWidth: minimapWidth, + + viewportColumn: viewportColumn, + + verticalScrollbarWidth: verticalScrollbarWidth, + horizontalScrollbarHeight: horizontalScrollbarHeight, + + overviewRuler: new OverviewRulerPosition({ + top: verticalArrowSize, + width: verticalScrollbarWidth, + height: (outerHeight - 2 * verticalArrowSize), + right: 0 + }) + }); + } +} diff --git a/src/vs/editor/common/viewLayout/editorLayoutProvider.ts b/src/vs/editor/common/viewLayout/editorLayoutProvider.ts deleted file mode 100644 index daf1522ab9230..0000000000000 --- a/src/vs/editor/common/viewLayout/editorLayoutProvider.ts +++ /dev/null @@ -1,154 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { RenderMinimap, EditorLayoutInfo, OverviewRulerPosition } from 'vs/editor/common/config/editorOptions'; - -export interface IEditorLayoutProviderOpts { - outerWidth: number; - outerHeight: number; - - showGlyphMargin: boolean; - lineHeight: number; - - showLineNumbers: boolean; - lineNumbersMinChars: number; - lineNumbersDigitCount: number; - - lineDecorationsWidth: number; - - typicalHalfwidthCharacterWidth: number; - maxDigitWidth: number; - - verticalScrollbarWidth: number; - verticalScrollbarHasArrows: boolean; - scrollbarArrowSize: number; - horizontalScrollbarHeight: number; - - minimap: boolean; - minimapRenderCharacters: boolean; - minimapMaxColumn: number; - pixelRatio: number; -} - -export class EditorLayoutProvider { - public static compute(_opts: IEditorLayoutProviderOpts): EditorLayoutInfo { - const outerWidth = _opts.outerWidth | 0; - const outerHeight = _opts.outerHeight | 0; - const showGlyphMargin = Boolean(_opts.showGlyphMargin); - const lineHeight = _opts.lineHeight | 0; - const showLineNumbers = Boolean(_opts.showLineNumbers); - const lineNumbersMinChars = _opts.lineNumbersMinChars | 0; - const lineNumbersDigitCount = _opts.lineNumbersDigitCount | 0; - const lineDecorationsWidth = _opts.lineDecorationsWidth | 0; - const typicalHalfwidthCharacterWidth = Number(_opts.typicalHalfwidthCharacterWidth); - const maxDigitWidth = Number(_opts.maxDigitWidth); - const verticalScrollbarWidth = _opts.verticalScrollbarWidth | 0; - const verticalScrollbarHasArrows = Boolean(_opts.verticalScrollbarHasArrows); - const scrollbarArrowSize = _opts.scrollbarArrowSize | 0; - const horizontalScrollbarHeight = _opts.horizontalScrollbarHeight | 0; - const minimap = Boolean(_opts.minimap); - const minimapRenderCharacters = Boolean(_opts.minimapRenderCharacters); - const minimapMaxColumn = _opts.minimapMaxColumn | 0; - const pixelRatio = Number(_opts.pixelRatio); - - let lineNumbersWidth = 0; - if (showLineNumbers) { - let digitCount = Math.max(lineNumbersDigitCount, lineNumbersMinChars); - lineNumbersWidth = Math.round(digitCount * maxDigitWidth); - } - - let glyphMarginWidth = 0; - if (showGlyphMargin) { - glyphMarginWidth = lineHeight; - } - - let glyphMarginLeft = 0; - let lineNumbersLeft = glyphMarginLeft + glyphMarginWidth; - let decorationsLeft = lineNumbersLeft + lineNumbersWidth; - let contentLeft = decorationsLeft + lineDecorationsWidth; - - let remainingWidth = outerWidth - glyphMarginWidth - lineNumbersWidth - lineDecorationsWidth; - - let renderMinimap: RenderMinimap; - let minimapWidth: number; - let contentWidth: number; - if (!minimap) { - minimapWidth = 0; - renderMinimap = RenderMinimap.None; - contentWidth = remainingWidth; - } else { - let minimapCharWidth: number; - if (pixelRatio >= 2) { - renderMinimap = minimapRenderCharacters ? RenderMinimap.Large : RenderMinimap.LargeBlocks; - minimapCharWidth = 2 / pixelRatio; - } else { - renderMinimap = minimapRenderCharacters ? RenderMinimap.Small : RenderMinimap.SmallBlocks; - minimapCharWidth = 1 / pixelRatio; - } - - // Given: - // viewportColumn = (contentWidth - verticalScrollbarWidth) / typicalHalfwidthCharacterWidth - // minimapWidth = viewportColumn * minimapCharWidth - // contentWidth = remainingWidth - minimapWidth - // What are good values for contentWidth and minimapWidth ? - - // minimapWidth = ((contentWidth - verticalScrollbarWidth) / typicalHalfwidthCharacterWidth) * minimapCharWidth - // typicalHalfwidthCharacterWidth * minimapWidth = (contentWidth - verticalScrollbarWidth) * minimapCharWidth - // typicalHalfwidthCharacterWidth * minimapWidth = (remainingWidth - minimapWidth - verticalScrollbarWidth) * minimapCharWidth - // (typicalHalfwidthCharacterWidth + minimapCharWidth) * minimapWidth = (remainingWidth - verticalScrollbarWidth) * minimapCharWidth - // minimapWidth = ((remainingWidth - verticalScrollbarWidth) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth) - - minimapWidth = Math.max(0, Math.floor(((remainingWidth - verticalScrollbarWidth) * minimapCharWidth) / (typicalHalfwidthCharacterWidth + minimapCharWidth))); - let minimapColumns = minimapWidth / minimapCharWidth; - if (minimapColumns > minimapMaxColumn) { - minimapWidth = Math.floor(minimapMaxColumn * minimapCharWidth); - } - contentWidth = remainingWidth - minimapWidth; - } - - let viewportColumn = Math.max(1, Math.floor((contentWidth - verticalScrollbarWidth) / typicalHalfwidthCharacterWidth)); - - let verticalArrowSize = (verticalScrollbarHasArrows ? scrollbarArrowSize : 0); - - return new EditorLayoutInfo({ - width: outerWidth, - height: outerHeight, - - glyphMarginLeft: glyphMarginLeft, - glyphMarginWidth: glyphMarginWidth, - glyphMarginHeight: outerHeight, - - lineNumbersLeft: lineNumbersLeft, - lineNumbersWidth: lineNumbersWidth, - lineNumbersHeight: outerHeight, - - decorationsLeft: decorationsLeft, - decorationsWidth: lineDecorationsWidth, - decorationsHeight: outerHeight, - - contentLeft: contentLeft, - contentWidth: contentWidth, - contentHeight: outerHeight, - - renderMinimap: renderMinimap, - minimapWidth: minimapWidth, - - viewportColumn: viewportColumn, - - verticalScrollbarWidth: verticalScrollbarWidth, - horizontalScrollbarHeight: horizontalScrollbarHeight, - - overviewRuler: new OverviewRulerPosition({ - top: verticalArrowSize, - width: verticalScrollbarWidth, - height: (outerHeight - 2 * verticalArrowSize), - right: 0 - }) - }); - } - - -} diff --git a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts index 2b904a5dd3f67..a5cf90e7e1a90 100644 --- a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts +++ b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts @@ -10,7 +10,7 @@ import * as dom from 'vs/base/browser/dom'; import { CodeEditorServiceImpl } from 'vs/editor/browser/services/codeEditorServiceImpl'; import { IDecorationRenderOptions } from 'vs/editor/common/editorCommon'; -suite('Browser Services - EditorLayoutProvider', () => { +suite('Decoration Render Options', () => { var options: IDecorationRenderOptions = { gutterIconPath: URI.parse('https://github.com/Microsoft/vscode/blob/master/resources/linux/code.png'), gutterIconSize: 'contain', diff --git a/src/vs/editor/test/common/viewLayout/editorLayoutProvider.test.ts b/src/vs/editor/test/common/viewLayout/editorLayoutProvider.test.ts index 28cd57513c8b4..b60d9b7cb6437 100644 --- a/src/vs/editor/test/common/viewLayout/editorLayoutProvider.test.ts +++ b/src/vs/editor/test/common/viewLayout/editorLayoutProvider.test.ts @@ -5,8 +5,7 @@ 'use strict'; import * as assert from 'assert'; -import { RenderMinimap, EditorLayoutInfo, OverviewRulerPosition } from 'vs/editor/common/config/editorOptions'; -import { EditorLayoutProvider, IEditorLayoutProviderOpts } from 'vs/editor/common/viewLayout/editorLayoutProvider'; +import { RenderMinimap, EditorLayoutInfo, OverviewRulerPosition, EditorLayoutProvider, IEditorLayoutProviderOpts } from 'vs/editor/common/config/editorOptions'; suite('Editor ViewLayout - EditorLayoutProvider', () => { From b2091c58c7d7bd989237968122c4ab8ea08a9d29 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 8 May 2017 16:22:14 +0200 Subject: [PATCH 0278/2747] First validate editor options, and then compute the result based on env --- src/vs/editor/browser/config/configuration.ts | 2 +- .../standalone/standaloneCodeEditor.ts | 8 +- .../common/config/commonEditorConfig.ts | 53 +- src/vs/editor/common/config/editorOptions.ts | 850 ++++++++++++------ src/vs/editor/common/config/fontInfo.ts | 11 +- src/vs/editor/common/editorCommon.ts | 2 +- .../browser/preferencesRenderers.ts | 4 +- 7 files changed, 625 insertions(+), 305 deletions(-) diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts index 23a4a86c292d9..330903d01af45 100644 --- a/src/vs/editor/browser/config/configuration.ts +++ b/src/vs/editor/browser/config/configuration.ts @@ -314,7 +314,7 @@ export class Configuration extends CommonEditorConfiguration { this._register(CSSBasedConfiguration.INSTANCE.onDidChange(() => this._onCSSBasedConfigurationChanged())); - if (this._configWithDefaults.getEditorOptions().automaticLayout) { + if (this._validatedOptions.automaticLayout) { this._elementSizeObserver.startObserving(); } diff --git a/src/vs/editor/browser/standalone/standaloneCodeEditor.ts b/src/vs/editor/browser/standalone/standaloneCodeEditor.ts index 4f7c626bc77df..3cc70066d90b3 100644 --- a/src/vs/editor/browser/standalone/standaloneCodeEditor.ts +++ b/src/vs/editor/browser/standalone/standaloneCodeEditor.ts @@ -211,20 +211,18 @@ export class StandaloneEditor extends StandaloneCodeEditor implements IStandalon if (typeof options.theme === 'string') { options.theme = standaloneThemeService.setTheme(options.theme); } - + let model: IModel = options.model; + delete options.model; super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService); this._contextViewService = contextViewService; this._standaloneThemeService = standaloneThemeService; this._register(toDispose); - let model: IModel = null; - if (typeof options.model === 'undefined') { + if (typeof model === 'undefined') { model = (self).monaco.editor.createModel(options.value || '', options.language || 'text/plain'); this._ownsModel = true; } else { - model = options.model; - delete options.model; this._ownsModel = false; } diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index dd2c9b9ddb41c..066c5ae79f3d8 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -49,34 +49,6 @@ export const TabFocus: ITabFocus = new class { } }; -export class ConfigurationWithDefaults { - - private _editor: editorOptions.IEditorOptions; - - constructor(options: editorOptions.IEditorOptions) { - this._editor = objects.clone(DefaultConfig.editor); - - this._mergeOptionsIn(options); - } - - public getEditorOptions(): editorOptions.IEditorOptions { - return this._editor; - } - - private _mergeOptionsIn(newOptions: editorOptions.IEditorOptions): void { - this._editor = objects.mixin(this._editor, newOptions || {}); - } - - public updateOptions(newOptions: editorOptions.IEditorOptions): void { - // Apply new options - this._mergeOptionsIn(newOptions); - } -} - -function toBoolean(value: any): boolean { - return value === 'false' ? false : Boolean(value); -} - export interface IElementSizeObserver { startObserving(): void; observe(dimension?: editorCommon.IDimension): void; @@ -87,9 +59,11 @@ export interface IElementSizeObserver { export abstract class CommonEditorConfiguration extends Disposable implements editorCommon.IConfiguration { + protected _rawOptions: editorOptions.IEditorOptions; + protected _validatedOptions: editorOptions.IValidatedEditorOptions; + public editor: editorOptions.InternalEditorOptions; - protected _configWithDefaults: ConfigurationWithDefaults; protected _elementSizeObserver: IElementSizeObserver; private _isDominatedByLongLines: boolean; private _lineNumbersDigitCount: number; @@ -99,7 +73,10 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed constructor(options: editorOptions.IEditorOptions, elementSizeObserver: IElementSizeObserver = null) { super(); - this._configWithDefaults = new ConfigurationWithDefaults(options); + + this._rawOptions = options; + this._validatedOptions = editorOptions.EditorOptionsValidator.validate(this._rawOptions, editorOptions.DEFAULTS); + this._elementSizeObserver = elementSizeObserver; this._isDominatedByLongLines = false; this._lineNumbersDigitCount = 1; @@ -127,33 +104,29 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed } public getRawOptions(): editorOptions.IEditorOptions { - return this._configWithDefaults.getEditorOptions(); + return this._rawOptions; } private _computeInternalOptions(): editorOptions.InternalEditorOptions { - let opts = this._configWithDefaults.getEditorOptions(); - - let editorClassName = this._getEditorClassName(opts.theme, toBoolean(opts.fontLigatures), opts.mouseStyle); - - let bareFontInfo = BareFontInfo.createFromRawSettings(opts, this.getZoomLevel()); - + const opts = this._validatedOptions; + const bareFontInfo = BareFontInfo.createFromRawSettings(this._rawOptions, this.getZoomLevel()); const env = new editorOptions.EnvironmentalOptions({ outerWidth: this.getOuterWidth(), outerHeight: this.getOuterHeight(), fontInfo: this.readConfiguration(bareFontInfo), - editorClassName: editorClassName, + editorClassName: this._getEditorClassName(opts.theme, opts.fontLigatures, opts.mouseStyle), isDominatedByLongLines: this._isDominatedByLongLines, lineNumbersDigitCount: this._lineNumbersDigitCount, canUseTranslate3d: this._getCanUseTranslate3d(), pixelRatio: this._getPixelRatio(), tabFocusMode: TabFocus.getTabFocusMode() }); - return editorOptions.InternalEditorOptionsFactory.createInternalEditorOptions(env, opts); } public updateOptions(newOptions: editorOptions.IEditorOptions): void { - this._configWithDefaults.updateOptions(newOptions); + this._rawOptions = objects.mixin(this._rawOptions, newOptions || {}); + this._validatedOptions = editorOptions.EditorOptionsValidator.validate(this._rawOptions, editorOptions.DEFAULTS); this._recomputeOptions(); } diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 384fe75372232..4c3c216e88f60 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -1507,41 +1507,348 @@ export class EnvironmentalOptions { } /** + * Validated scrollbar options for the editor. * @internal */ -export class InternalEditorOptionsFactory { +export interface IValidatedEditorScrollbarOptions { + vertical: ScrollbarVisibility; + horizontal: ScrollbarVisibility; + arrowSize: number; + useShadows: boolean; + verticalHasArrows: boolean; + horizontalHasArrows: boolean; + horizontalScrollbarSize: number; + horizontalSliderSize: number; + verticalScrollbarSize: number; + verticalSliderSize: number; + handleMouseWheel: boolean; +} - public static createInternalEditorOptions(env: EnvironmentalOptions, opts: IEditorOptions) { +/** + * Validated minimap options for the editor. + * @internal + */ +export interface IValidatedEditorMinimapOptions { + enabled: boolean; + renderCharacters: boolean; + maxColumn: number; +} - let stopRenderingLineAfter: number; - if (typeof opts.stopRenderingLineAfter !== 'undefined') { - stopRenderingLineAfter = this._toInteger(opts.stopRenderingLineAfter, -1); - } else { - stopRenderingLineAfter = 10000; - } +/** + * Validated configuration options for the editor. + * @internal + */ +export interface IValidatedEditorOptions { + inDiffEditor: boolean; + experimentalScreenReader: boolean; + ariaLabel: string; + rulers: number[]; + wordSeparators: string; + selectionClipboard: boolean; + renderLineNumbers: boolean; + renderCustomLineNumbers: (lineNumber: number) => string; + renderRelativeLineNumbers: boolean; + selectOnLineNumbers: boolean; + lineNumbersMinChars: number; + glyphMargin: boolean; + lineDecorationsWidth: number | string; + revealHorizontalRightPadding: number; + roundedSelection: boolean; + theme: string; + readOnly: boolean; + scrollbar: IValidatedEditorScrollbarOptions; + minimap: IValidatedEditorMinimapOptions; + fixedOverflowWidgets: boolean; + overviewRulerLanes: number; + overviewRulerBorder: boolean; + cursorBlinking: TextEditorCursorBlinkingStyle; + mouseWheelZoom: boolean; + mouseStyle: 'text' | 'default' | 'copy'; + cursorStyle: TextEditorCursorStyle; + fontLigatures: boolean; + disableTranslate3d: boolean; + disableMonospaceOptimizations: boolean; + hideCursorInOverviewRuler: boolean; + scrollBeyondLastLine: boolean; + automaticLayout: boolean; + wordWrap: 'off' | 'on' | 'wordWrapColumn' | 'bounded'; + wordWrapColumn: number; + wordWrapMinified: boolean; + wrappingIndent: WrappingIndent; + wordWrapBreakBeforeCharacters: string; + wordWrapBreakAfterCharacters: string; + wordWrapBreakObtrusiveCharacters: string; + stopRenderingLineAfter: number; + hover: boolean; + contextmenu: boolean; + mouseWheelScrollSensitivity: number; + quickSuggestions: boolean | { other: boolean, comments: boolean, strings: boolean }; + quickSuggestionsDelay: number; + parameterHints: boolean; + iconsInSuggestions: boolean; + autoClosingBrackets: boolean; + formatOnType: boolean; + formatOnPaste: boolean; + dragAndDrop: boolean; + suggestOnTriggerCharacters: boolean; + acceptSuggestionOnEnter: boolean; + acceptSuggestionOnCommitCharacter: boolean; + snippetSuggestions: 'top' | 'bottom' | 'inline' | 'none'; + emptySelectionClipboard: boolean; + wordBasedSuggestions: boolean; + suggestFontSize: number; + suggestLineHeight: number; + selectionHighlight: boolean; + occurrencesHighlight: boolean; + codeLens: boolean; + referenceInfos: boolean; + folding: boolean; + hideFoldIcons: boolean; + matchBrackets: boolean; + renderWhitespace: 'none' | 'boundary' | 'all'; + renderControlCharacters: boolean; + renderIndentGuides: boolean; + renderLineHighlight: 'none' | 'gutter' | 'line' | 'all'; + useTabStops: boolean; +} - const scrollbar = this._sanitizeScrollbarOpts(opts.scrollbar, this._toFloat(opts.mouseWheelScrollSensitivity, 1)); - const minimap = this._sanitizeMinimapOpts(opts.minimap); +function _boolean(value: any, defaultValue: T): boolean | T { + if (typeof value === 'undefined') { + return defaultValue; + } + if (value === 'false') { + // treat the string 'false' as false + return false; + } + return Boolean(value); +} - const glyphMargin = this._toBoolean(opts.glyphMargin); - const lineNumbersMinChars = this._toInteger(opts.lineNumbersMinChars, 1); +function _string(value: any, defaultValue: string): string { + if (typeof value !== 'string') { + return defaultValue; + } + return value; +} - let lineDecorationsWidth: number; - if (typeof opts.lineDecorationsWidth === 'string' && /^\d+(\.\d+)?ch$/.test(opts.lineDecorationsWidth)) { - const multiple = parseFloat(opts.lineDecorationsWidth.substr(0, opts.lineDecorationsWidth.length - 2)); - lineDecorationsWidth = multiple * env.fontInfo.typicalHalfwidthCharacterWidth; - } else { - lineDecorationsWidth = this._toInteger(opts.lineDecorationsWidth, 0); +function _stringSet(value: any, defaultValue: T, allowedValues: string[]): T { + if (typeof value !== 'string') { + return defaultValue; + } + if (allowedValues.indexOf(value) === -1) { + return defaultValue; + } + return value; +} + +function _clampedInt(value: any, defaultValue: number, minimum: number, maximum: number): number { + let r: number; + if (typeof value === 'undefined') { + r = defaultValue; + } else { + r = parseInt(value, 10); + if (isNaN(r)) { + r = defaultValue; } - if (opts.folding) { - lineDecorationsWidth += 16; + } + r = Math.max(minimum, r); + r = Math.min(maximum, r); + return r | 0; +} + +function _float(value: any, defaultValue: number): number { + let r = parseFloat(value); + if (isNaN(r)) { + r = defaultValue; + } + return r; +} + +function _wrappingIndentFromString(wrappingIndent: string, defaultValue: WrappingIndent): WrappingIndent { + if (typeof wrappingIndent !== 'string') { + return defaultValue; + } + if (wrappingIndent === 'indent') { + return WrappingIndent.Indent; + } else if (wrappingIndent === 'same') { + return WrappingIndent.Same; + } else { + return WrappingIndent.None; + } +} + +function _cursorStyleFromString(cursorStyle: string, defaultValue: TextEditorCursorStyle): TextEditorCursorStyle { + if (typeof cursorStyle !== 'string') { + return defaultValue; + } + if (cursorStyle === 'line') { + return TextEditorCursorStyle.Line; + } else if (cursorStyle === 'block') { + return TextEditorCursorStyle.Block; + } else if (cursorStyle === 'underline') { + return TextEditorCursorStyle.Underline; + } else if (cursorStyle === 'line-thin') { + return TextEditorCursorStyle.LineThin; + } else if (cursorStyle === 'block-outline') { + return TextEditorCursorStyle.BlockOutline; + } else if (cursorStyle === 'underline-thin') { + return TextEditorCursorStyle.UnderlineThin; + } + return TextEditorCursorStyle.Line; +} + +function _cursorBlinkingStyleFromString(cursorBlinkingStyle: string, defaultValue: TextEditorCursorBlinkingStyle): TextEditorCursorBlinkingStyle { + if (typeof cursorBlinkingStyle !== 'string') { + return defaultValue; + } + switch (cursorBlinkingStyle) { + case 'blink': + return TextEditorCursorBlinkingStyle.Blink; + case 'smooth': + return TextEditorCursorBlinkingStyle.Smooth; + case 'phase': + return TextEditorCursorBlinkingStyle.Phase; + case 'expand': + return TextEditorCursorBlinkingStyle.Expand; + case 'visible': // maintain compatibility + case 'solid': + return TextEditorCursorBlinkingStyle.Solid; + } + return TextEditorCursorBlinkingStyle.Blink; +} + +function _scrollbarVisibilityFromString(visibility: string, defaultValue: ScrollbarVisibility): ScrollbarVisibility { + if (typeof visibility !== 'string') { + return defaultValue; + } + switch (visibility) { + case 'hidden': + return ScrollbarVisibility.Hidden; + case 'visible': + return ScrollbarVisibility.Visible; + default: + return ScrollbarVisibility.Auto; + } +} + +/** + * @internal + */ +export const DEFAULTS: IValidatedEditorOptions = { + inDiffEditor: false, + experimentalScreenReader: DefaultConfig.editor.experimentalScreenReader, + ariaLabel: DefaultConfig.editor.ariaLabel, + rulers: DefaultConfig.editor.rulers, + wordSeparators: DefaultConfig.editor.wordSeparators, + selectionClipboard: DefaultConfig.editor.selectionClipboard, + renderLineNumbers: true, + renderCustomLineNumbers: null, + renderRelativeLineNumbers: false, + selectOnLineNumbers: DefaultConfig.editor.selectOnLineNumbers, + lineNumbersMinChars: DefaultConfig.editor.lineNumbersMinChars, + glyphMargin: DefaultConfig.editor.glyphMargin, + lineDecorationsWidth: DefaultConfig.editor.lineDecorationsWidth, + revealHorizontalRightPadding: DefaultConfig.editor.revealHorizontalRightPadding, + roundedSelection: DefaultConfig.editor.roundedSelection, + theme: DefaultConfig.editor.theme, + readOnly: DefaultConfig.editor.readOnly, + scrollbar: { + vertical: ScrollbarVisibility.Auto, + horizontal: ScrollbarVisibility.Auto, + arrowSize: 11, + useShadows: true, + verticalHasArrows: false, + horizontalHasArrows: false, + horizontalScrollbarSize: 10, + horizontalSliderSize: 10, + verticalScrollbarSize: 14, + verticalSliderSize: 14, + handleMouseWheel: true + }, + minimap: { + enabled: false, + renderCharacters: true, + maxColumn: 120 + }, + fixedOverflowWidgets: DefaultConfig.editor.fixedOverflowWidgets, + overviewRulerLanes: DefaultConfig.editor.overviewRulerLanes, + overviewRulerBorder: DefaultConfig.editor.overviewRulerBorder, + cursorBlinking: TextEditorCursorBlinkingStyle.Blink, + mouseWheelZoom: DefaultConfig.editor.mouseWheelZoom, + mouseStyle: DefaultConfig.editor.mouseStyle, + cursorStyle: TextEditorCursorStyle.Line, + fontLigatures: DefaultConfig.editor.fontLigatures, + disableTranslate3d: DefaultConfig.editor.disableTranslate3d, + disableMonospaceOptimizations: DefaultConfig.editor.disableMonospaceOptimizations, + hideCursorInOverviewRuler: DefaultConfig.editor.hideCursorInOverviewRuler, + scrollBeyondLastLine: DefaultConfig.editor.scrollBeyondLastLine, + automaticLayout: DefaultConfig.editor.automaticLayout, + wordWrap: DefaultConfig.editor.wordWrap, + wordWrapColumn: DefaultConfig.editor.wordWrapColumn, + wordWrapMinified: DefaultConfig.editor.wordWrapMinified, + wrappingIndent: WrappingIndent.Same, + wordWrapBreakBeforeCharacters: DefaultConfig.editor.wordWrapBreakBeforeCharacters, + wordWrapBreakAfterCharacters: DefaultConfig.editor.wordWrapBreakAfterCharacters, + wordWrapBreakObtrusiveCharacters: DefaultConfig.editor.wordWrapBreakObtrusiveCharacters, + stopRenderingLineAfter: 10000, + hover: DefaultConfig.editor.hover, + contextmenu: DefaultConfig.editor.contextmenu, + mouseWheelScrollSensitivity: DefaultConfig.editor.mouseWheelScrollSensitivity, + quickSuggestions: DefaultConfig.editor.quickSuggestions, + quickSuggestionsDelay: DefaultConfig.editor.quickSuggestionsDelay, + parameterHints: DefaultConfig.editor.parameterHints, + iconsInSuggestions: DefaultConfig.editor.iconsInSuggestions, + autoClosingBrackets: DefaultConfig.editor.autoClosingBrackets, + formatOnType: DefaultConfig.editor.formatOnType, + formatOnPaste: DefaultConfig.editor.formatOnPaste, + dragAndDrop: DefaultConfig.editor.dragAndDrop, + suggestOnTriggerCharacters: DefaultConfig.editor.suggestOnTriggerCharacters, + acceptSuggestionOnEnter: DefaultConfig.editor.acceptSuggestionOnEnter, + acceptSuggestionOnCommitCharacter: DefaultConfig.editor.acceptSuggestionOnCommitCharacter, + snippetSuggestions: DefaultConfig.editor.snippetSuggestions, + emptySelectionClipboard: DefaultConfig.editor.emptySelectionClipboard, + wordBasedSuggestions: DefaultConfig.editor.wordBasedSuggestions, + suggestFontSize: DefaultConfig.editor.suggestFontSize, + suggestLineHeight: DefaultConfig.editor.suggestLineHeight, + selectionHighlight: DefaultConfig.editor.selectionHighlight, + occurrencesHighlight: DefaultConfig.editor.occurrencesHighlight, + codeLens: DefaultConfig.editor.codeLens, + referenceInfos: DefaultConfig.editor.referenceInfos, + folding: DefaultConfig.editor.folding, + hideFoldIcons: DefaultConfig.editor.hideFoldIcons, + matchBrackets: DefaultConfig.editor.matchBrackets, + renderWhitespace: DefaultConfig.editor.renderWhitespace, + renderControlCharacters: DefaultConfig.editor.renderControlCharacters, + renderIndentGuides: DefaultConfig.editor.renderIndentGuides, + renderLineHighlight: DefaultConfig.editor.renderLineHighlight, + useTabStops: DefaultConfig.editor.useTabStops, +}; + +/** + * @internal + */ +export class EditorOptionsValidator { + + /** + * Validate raw editor options. + * i.e. since they can be defined by the user, they might be invalid. + */ + public static validate(opts: IEditorOptions, defaults: IValidatedEditorOptions): IValidatedEditorOptions { + + let rulers: number[] = []; + if (Array.isArray(opts.rulers)) { + for (let i = 0, len = opts.rulers.length; i < len; i++) { + rulers.push(_clampedInt(opts.rulers[i], 0, 0, 10000)); + } + rulers.sort(); } - let renderLineNumbers: boolean; - let renderCustomLineNumbers: (lineNumber: number) => string; - let renderRelativeLineNumbers: boolean; - { + let renderLineNumbers: boolean = defaults.renderLineNumbers; + let renderCustomLineNumbers: (lineNumber: number) => string = defaults.renderCustomLineNumbers; + let renderRelativeLineNumbers: boolean = defaults.renderRelativeLineNumbers; + + if (typeof opts.lineNumbers !== 'undefined') { let lineNumbers = opts.lineNumbers; + // Compatibility with old true or false values if (lineNumbers === true) { lineNumbers = 'on'; @@ -1568,39 +1875,207 @@ export class InternalEditorOptionsFactory { } } + let wordWrap = opts.wordWrap; + { + // Compatibility with old true or false values + if (wordWrap === true) { + wordWrap = 'on'; + } else if (wordWrap === false) { + wordWrap = 'off'; + } + + wordWrap = _stringSet<'off' | 'on' | 'wordWrapColumn' | 'bounded'>(wordWrap, defaults.wordWrap, ['off', 'on', 'wordWrapColumn', 'bounded']); + } + + let renderWhitespace = opts.renderWhitespace; + { + // Compatibility with old true or false values + if (renderWhitespace === true) { + renderWhitespace = 'boundary'; + } else if (renderWhitespace === false) { + renderWhitespace = 'none'; + } + renderWhitespace = _stringSet<'none' | 'boundary' | 'all'>(opts.renderWhitespace, defaults.renderWhitespace, ['none', 'boundary', 'all']); + } + + let renderLineHighlight = opts.renderLineHighlight; + { + // Compatibility with old true or false values + if (renderLineHighlight === true) { + renderLineHighlight = 'line'; + } else if (renderLineHighlight === false) { + renderLineHighlight = 'none'; + } + renderLineHighlight = _stringSet<'none' | 'gutter' | 'line' | 'all'>(opts.renderLineHighlight, defaults.renderLineHighlight, ['none', 'gutter', 'line', 'all']); + } + + const scrollbar = this._sanitizeScrollbarOpts(opts.scrollbar, defaults.scrollbar); + const minimap = this._sanitizeMinimapOpts(opts.minimap, defaults.minimap); + + let quickSuggestions: boolean | { other: boolean, comments: boolean, strings: boolean }; + if (typeof opts.quickSuggestions === 'object') { + quickSuggestions = { other: true, ...opts.quickSuggestions }; + } else { + quickSuggestions = _boolean(opts.quickSuggestions, defaults.quickSuggestions); + } + + return { + inDiffEditor: _boolean(opts.inDiffEditor, defaults.inDiffEditor), + experimentalScreenReader: _boolean(opts.experimentalScreenReader, defaults.experimentalScreenReader), + ariaLabel: _string(opts.ariaLabel, defaults.ariaLabel), + rulers: rulers, + wordSeparators: _string(opts.wordSeparators, defaults.wordSeparators), + selectionClipboard: _boolean(opts.selectionClipboard, defaults.selectionClipboard), + renderLineNumbers: renderLineNumbers, + renderCustomLineNumbers: renderCustomLineNumbers, + renderRelativeLineNumbers: renderRelativeLineNumbers, + selectOnLineNumbers: _boolean(opts.selectOnLineNumbers, defaults.selectOnLineNumbers), + lineNumbersMinChars: _clampedInt(opts.lineNumbersMinChars, defaults.lineNumbersMinChars, 1, 10), + glyphMargin: _boolean(opts.glyphMargin, defaults.glyphMargin), + lineDecorationsWidth: (typeof opts.lineDecorationsWidth === 'undefined' ? defaults.lineDecorationsWidth : opts.lineDecorationsWidth), + revealHorizontalRightPadding: _clampedInt(opts.revealHorizontalRightPadding, defaults.revealHorizontalRightPadding, 0, 1000), + roundedSelection: _boolean(opts.roundedSelection, defaults.roundedSelection), + theme: _string(opts.theme, defaults.theme), + readOnly: _boolean(opts.readOnly, defaults.readOnly), + scrollbar: scrollbar, + minimap: minimap, + fixedOverflowWidgets: _boolean(opts.fixedOverflowWidgets, defaults.fixedOverflowWidgets), + overviewRulerLanes: _clampedInt(opts.overviewRulerLanes, defaults.overviewRulerLanes, 0, 3), + overviewRulerBorder: _boolean(opts.overviewRulerBorder, defaults.overviewRulerBorder), + cursorBlinking: _cursorBlinkingStyleFromString(opts.cursorBlinking, defaults.cursorBlinking), + mouseWheelZoom: _boolean(opts.mouseWheelZoom, defaults.mouseWheelZoom), + mouseStyle: _stringSet<'text' | 'default' | 'copy'>(opts.mouseStyle, defaults.mouseStyle, ['text', 'default', 'copy']), + cursorStyle: _cursorStyleFromString(opts.cursorStyle, defaults.cursorStyle), + fontLigatures: _boolean(opts.fontLigatures, defaults.fontLigatures), + disableTranslate3d: _boolean(opts.disableTranslate3d, defaults.disableTranslate3d), + disableMonospaceOptimizations: _boolean(opts.disableMonospaceOptimizations, defaults.disableMonospaceOptimizations), + hideCursorInOverviewRuler: _boolean(opts.hideCursorInOverviewRuler, defaults.hideCursorInOverviewRuler), + scrollBeyondLastLine: _boolean(opts.scrollBeyondLastLine, defaults.scrollBeyondLastLine), + automaticLayout: _boolean(opts.automaticLayout, defaults.automaticLayout), + wordWrap: wordWrap, + wordWrapColumn: _clampedInt(opts.wordWrapColumn, defaults.wordWrapColumn, 1, Constants.MAX_SAFE_SMALL_INTEGER), + wordWrapMinified: _boolean(opts.wordWrapMinified, defaults.wordWrapMinified), + wrappingIndent: _wrappingIndentFromString(opts.wrappingIndent, defaults.wrappingIndent), + wordWrapBreakBeforeCharacters: _string(opts.wordWrapBreakBeforeCharacters, defaults.wordWrapBreakBeforeCharacters), + wordWrapBreakAfterCharacters: _string(opts.wordWrapBreakAfterCharacters, defaults.wordWrapBreakAfterCharacters), + wordWrapBreakObtrusiveCharacters: _string(opts.wordWrapBreakObtrusiveCharacters, defaults.wordWrapBreakObtrusiveCharacters), + stopRenderingLineAfter: _clampedInt(opts.stopRenderingLineAfter, defaults.stopRenderingLineAfter, -1, Constants.MAX_SAFE_SMALL_INTEGER), + hover: _boolean(opts.hover, defaults.hover), + contextmenu: _boolean(opts.contextmenu, defaults.contextmenu), + mouseWheelScrollSensitivity: _float(opts.mouseWheelScrollSensitivity, defaults.mouseWheelScrollSensitivity), + quickSuggestions: quickSuggestions, + quickSuggestionsDelay: _clampedInt(opts.quickSuggestionsDelay, defaults.quickSuggestionsDelay, Constants.MIN_SAFE_SMALL_INTEGER, Constants.MAX_SAFE_SMALL_INTEGER), + parameterHints: _boolean(opts.parameterHints, defaults.parameterHints), + iconsInSuggestions: _boolean(opts.iconsInSuggestions, defaults.iconsInSuggestions), + autoClosingBrackets: _boolean(opts.autoClosingBrackets, defaults.autoClosingBrackets), + formatOnType: _boolean(opts.formatOnType, defaults.formatOnType), + formatOnPaste: _boolean(opts.formatOnPaste, defaults.formatOnPaste), + dragAndDrop: _boolean(opts.dragAndDrop, defaults.dragAndDrop), + suggestOnTriggerCharacters: _boolean(opts.suggestOnTriggerCharacters, defaults.suggestOnTriggerCharacters), + acceptSuggestionOnEnter: _boolean(opts.acceptSuggestionOnEnter, defaults.acceptSuggestionOnEnter), + acceptSuggestionOnCommitCharacter: _boolean(opts.acceptSuggestionOnCommitCharacter, defaults.acceptSuggestionOnCommitCharacter), + snippetSuggestions: _stringSet<'top' | 'bottom' | 'inline' | 'none'>(opts.snippetSuggestions, defaults.snippetSuggestions, ['top', 'bottom', 'inline', 'none']), + emptySelectionClipboard: _boolean(opts.emptySelectionClipboard, defaults.emptySelectionClipboard), + wordBasedSuggestions: _boolean(opts.wordBasedSuggestions, defaults.wordBasedSuggestions), + suggestFontSize: _clampedInt(opts.suggestFontSize, defaults.suggestFontSize, 0, 1000), + suggestLineHeight: _clampedInt(opts.suggestLineHeight, defaults.suggestLineHeight, 0, 1000), + selectionHighlight: _boolean(opts.selectionHighlight, defaults.selectionHighlight), + occurrencesHighlight: _boolean(opts.occurrencesHighlight, defaults.occurrencesHighlight), + codeLens: _boolean(opts.codeLens, defaults.codeLens), + referenceInfos: _boolean(opts.referenceInfos, defaults.referenceInfos), + folding: _boolean(opts.folding, defaults.folding), + hideFoldIcons: _boolean(opts.hideFoldIcons, defaults.hideFoldIcons), + matchBrackets: _boolean(opts.matchBrackets, defaults.matchBrackets), + renderWhitespace: renderWhitespace, + renderControlCharacters: _boolean(opts.renderControlCharacters, defaults.renderControlCharacters), + renderIndentGuides: _boolean(opts.renderIndentGuides, defaults.renderIndentGuides), + renderLineHighlight: renderLineHighlight, + useTabStops: _boolean(opts.useTabStops, defaults.useTabStops), + }; + } + + private static _sanitizeScrollbarOpts(opts: IEditorScrollbarOptions, defaults: IValidatedEditorScrollbarOptions): IValidatedEditorScrollbarOptions { + if (typeof opts !== 'object') { + return defaults; + } + const horizontalScrollbarSize = _clampedInt(opts.horizontalScrollbarSize, defaults.horizontalScrollbarSize, 0, 1000); + const verticalScrollbarSize = _clampedInt(opts.verticalScrollbarSize, defaults.verticalScrollbarSize, 0, 1000); + return { + vertical: _scrollbarVisibilityFromString(opts.vertical, defaults.vertical), + horizontal: _scrollbarVisibilityFromString(opts.horizontal, defaults.horizontal), + + arrowSize: _clampedInt(opts.arrowSize, defaults.arrowSize, 0, 1000), + useShadows: _boolean(opts.useShadows, defaults.useShadows), + + verticalHasArrows: _boolean(opts.verticalHasArrows, defaults.verticalHasArrows), + horizontalHasArrows: _boolean(opts.horizontalHasArrows, defaults.horizontalHasArrows), + + horizontalScrollbarSize: horizontalScrollbarSize, + horizontalSliderSize: _clampedInt(opts.horizontalSliderSize, horizontalScrollbarSize, 0, 1000), + + verticalScrollbarSize: verticalScrollbarSize, + verticalSliderSize: _clampedInt(opts.verticalSliderSize, verticalScrollbarSize, 0, 1000), + + handleMouseWheel: _boolean(opts.handleMouseWheel, defaults.handleMouseWheel) + }; + } + + private static _sanitizeMinimapOpts(opts: IEditorMinimapOptions, defaults: IValidatedEditorMinimapOptions): IValidatedEditorMinimapOptions { + if (typeof opts !== 'object') { + return defaults; + } + return { + enabled: _boolean(opts.enabled, defaults.enabled), + renderCharacters: _boolean(opts.renderCharacters, defaults.renderCharacters), + maxColumn: _clampedInt(opts.maxColumn, defaults.maxColumn, 1, 10000), + }; + } +} + +/** + * @internal + */ +export class InternalEditorOptionsFactory { + + public static createInternalEditorOptions(env: EnvironmentalOptions, opts: IValidatedEditorOptions) { + + let lineDecorationsWidth: number; + if (typeof opts.lineDecorationsWidth === 'string' && /^\d+(\.\d+)?ch$/.test(opts.lineDecorationsWidth)) { + const multiple = parseFloat(opts.lineDecorationsWidth.substr(0, opts.lineDecorationsWidth.length - 2)); + lineDecorationsWidth = multiple * env.fontInfo.typicalHalfwidthCharacterWidth; + } else { + lineDecorationsWidth = _clampedInt(opts.lineDecorationsWidth, 0, 0, 1000); + } + if (opts.folding) { + lineDecorationsWidth += 16; + } + const layoutInfo = EditorLayoutProvider.compute({ outerWidth: env.outerWidth, outerHeight: env.outerHeight, - showGlyphMargin: glyphMargin, + showGlyphMargin: opts.glyphMargin, lineHeight: env.fontInfo.lineHeight, - showLineNumbers: renderLineNumbers, - lineNumbersMinChars: lineNumbersMinChars, + showLineNumbers: opts.renderLineNumbers, + lineNumbersMinChars: opts.lineNumbersMinChars, lineNumbersDigitCount: env.lineNumbersDigitCount, lineDecorationsWidth: lineDecorationsWidth, typicalHalfwidthCharacterWidth: env.fontInfo.typicalHalfwidthCharacterWidth, maxDigitWidth: env.fontInfo.maxDigitWidth, - verticalScrollbarWidth: scrollbar.verticalScrollbarSize, - horizontalScrollbarHeight: scrollbar.horizontalScrollbarSize, - scrollbarArrowSize: scrollbar.arrowSize, - verticalScrollbarHasArrows: scrollbar.verticalHasArrows, - minimap: minimap.enabled, - minimapRenderCharacters: minimap.renderCharacters, - minimapMaxColumn: minimap.maxColumn, + verticalScrollbarWidth: opts.scrollbar.verticalScrollbarSize, + horizontalScrollbarHeight: opts.scrollbar.horizontalScrollbarSize, + scrollbarArrowSize: opts.scrollbar.arrowSize, + verticalScrollbarHasArrows: opts.scrollbar.verticalHasArrows, + minimap: opts.minimap.enabled, + minimapRenderCharacters: opts.minimap.renderCharacters, + minimapMaxColumn: opts.minimap.maxColumn, pixelRatio: env.pixelRatio }); let bareWrappingInfo: { isWordWrapMinified: boolean; isViewportWrapping: boolean; wrappingColumn: number; } = null; { let wordWrap = opts.wordWrap; - const wordWrapColumn = this._toInteger(opts.wordWrapColumn, 1); - const wordWrapMinified = this._toBoolean(opts.wordWrapMinified); - - // Compatibility with old true or false values - if (wordWrap === true) { - wordWrap = 'on'; - } else if (wordWrap === false) { - wordWrap = 'off'; - } + const wordWrapColumn = opts.wordWrapColumn; + const wordWrapMinified = opts.wordWrapMinified; if (wordWrapMinified && env.isDominatedByLongLines) { // Force viewport width wrapping if model is dominated by long lines @@ -1637,102 +2112,106 @@ export class InternalEditorOptionsFactory { } const wrappingInfo = new EditorWrappingInfo({ - inDiffEditor: Boolean(opts.inDiffEditor), + inDiffEditor: opts.inDiffEditor, isDominatedByLongLines: env.isDominatedByLongLines, isWordWrapMinified: bareWrappingInfo.isWordWrapMinified, isViewportWrapping: bareWrappingInfo.isViewportWrapping, wrappingColumn: bareWrappingInfo.wrappingColumn, - wrappingIndent: this._wrappingIndentFromString(opts.wrappingIndent), - wordWrapBreakBeforeCharacters: String(opts.wordWrapBreakBeforeCharacters), - wordWrapBreakAfterCharacters: String(opts.wordWrapBreakAfterCharacters), - wordWrapBreakObtrusiveCharacters: String(opts.wordWrapBreakObtrusiveCharacters), + wrappingIndent: opts.wrappingIndent, + wordWrapBreakBeforeCharacters: opts.wordWrapBreakBeforeCharacters, + wordWrapBreakAfterCharacters: opts.wordWrapBreakAfterCharacters, + wordWrapBreakObtrusiveCharacters: opts.wordWrapBreakObtrusiveCharacters, }); - const readOnly = this._toBoolean(opts.readOnly); - - let renderWhitespace = opts.renderWhitespace; - // Compatibility with old true or false values - if (renderWhitespace === true) { - renderWhitespace = 'boundary'; - } else if (renderWhitespace === false) { - renderWhitespace = 'none'; - } - - let renderLineHighlight = opts.renderLineHighlight; - // Compatibility with old true or false values - if (renderLineHighlight === true) { - renderLineHighlight = 'line'; - } else if (renderLineHighlight === false) { - renderLineHighlight = 'none'; - } - const viewInfo = new InternalEditorViewOptions({ theme: opts.theme, - canUseTranslate3d: this._toBoolean(opts.disableTranslate3d) ? false : env.canUseTranslate3d, - disableMonospaceOptimizations: (this._toBoolean(opts.disableMonospaceOptimizations) || this._toBoolean(opts.fontLigatures)), - experimentalScreenReader: this._toBoolean(opts.experimentalScreenReader), - rulers: this._toSortedIntegerArray(opts.rulers), - ariaLabel: String(opts.ariaLabel), - renderLineNumbers: renderLineNumbers, - renderCustomLineNumbers: renderCustomLineNumbers, - renderRelativeLineNumbers: renderRelativeLineNumbers, - selectOnLineNumbers: this._toBoolean(opts.selectOnLineNumbers), - glyphMargin: glyphMargin, - revealHorizontalRightPadding: this._toInteger(opts.revealHorizontalRightPadding, 0), - roundedSelection: this._toBoolean(opts.roundedSelection), - overviewRulerLanes: this._toInteger(opts.overviewRulerLanes, 0, 3), - overviewRulerBorder: this._toBoolean(opts.overviewRulerBorder), - cursorBlinking: this._cursorBlinkingStyleFromString(opts.cursorBlinking), - mouseWheelZoom: this._toBoolean(opts.mouseWheelZoom), - cursorStyle: this._cursorStyleFromString(opts.cursorStyle), - hideCursorInOverviewRuler: this._toBoolean(opts.hideCursorInOverviewRuler), - scrollBeyondLastLine: this._toBoolean(opts.scrollBeyondLastLine), + canUseTranslate3d: opts.disableTranslate3d ? false : env.canUseTranslate3d, + disableMonospaceOptimizations: (opts.disableMonospaceOptimizations || opts.fontLigatures), + experimentalScreenReader: opts.experimentalScreenReader, + rulers: opts.rulers, + ariaLabel: opts.ariaLabel, + renderLineNumbers: opts.renderLineNumbers, + renderCustomLineNumbers: opts.renderCustomLineNumbers, + renderRelativeLineNumbers: opts.renderRelativeLineNumbers, + selectOnLineNumbers: opts.selectOnLineNumbers, + glyphMargin: opts.glyphMargin, + revealHorizontalRightPadding: opts.revealHorizontalRightPadding, + roundedSelection: opts.roundedSelection, + overviewRulerLanes: opts.overviewRulerLanes, + overviewRulerBorder: opts.overviewRulerBorder, + cursorBlinking: opts.cursorBlinking, + mouseWheelZoom: opts.mouseWheelZoom, + cursorStyle: opts.cursorStyle, + hideCursorInOverviewRuler: opts.hideCursorInOverviewRuler, + scrollBeyondLastLine: opts.scrollBeyondLastLine, editorClassName: env.editorClassName, - stopRenderingLineAfter: stopRenderingLineAfter, - renderWhitespace: renderWhitespace, - renderControlCharacters: this._toBoolean(opts.renderControlCharacters), - fontLigatures: this._toBoolean(opts.fontLigatures), - renderIndentGuides: this._toBoolean(opts.renderIndentGuides), - renderLineHighlight: renderLineHighlight, - scrollbar: scrollbar, - minimap: minimap, - fixedOverflowWidgets: this._toBoolean(opts.fixedOverflowWidgets) + stopRenderingLineAfter: opts.stopRenderingLineAfter, + renderWhitespace: opts.renderWhitespace, + renderControlCharacters: opts.renderControlCharacters, + fontLigatures: opts.fontLigatures, + renderIndentGuides: opts.renderIndentGuides, + renderLineHighlight: opts.renderLineHighlight, + scrollbar: new InternalEditorScrollbarOptions({ + vertical: opts.scrollbar.vertical, + horizontal: opts.scrollbar.horizontal, + + arrowSize: opts.scrollbar.arrowSize, + useShadows: opts.scrollbar.useShadows, + + verticalHasArrows: opts.scrollbar.verticalHasArrows, + horizontalHasArrows: opts.scrollbar.horizontalHasArrows, + + horizontalScrollbarSize: opts.scrollbar.horizontalScrollbarSize, + horizontalSliderSize: opts.scrollbar.horizontalSliderSize, + + verticalScrollbarSize: opts.scrollbar.verticalScrollbarSize, + verticalSliderSize: opts.scrollbar.verticalSliderSize, + + handleMouseWheel: opts.scrollbar.handleMouseWheel, + mouseWheelScrollSensitivity: opts.mouseWheelScrollSensitivity + }), + minimap: new InternalEditorMinimapOptions({ + enabled: opts.minimap.enabled, + renderCharacters: opts.minimap.renderCharacters, + maxColumn: opts.minimap.maxColumn, + }), + fixedOverflowWidgets: opts.fixedOverflowWidgets }); const contribInfo = new EditorContribOptions({ - selectionClipboard: this._toBoolean(opts.selectionClipboard), - hover: this._toBoolean(opts.hover), - contextmenu: this._toBoolean(opts.contextmenu), - quickSuggestions: typeof opts.quickSuggestions === 'object' ? { other: true, ...opts.quickSuggestions } : this._toBoolean(opts.quickSuggestions), - quickSuggestionsDelay: this._toInteger(opts.quickSuggestionsDelay), - parameterHints: this._toBoolean(opts.parameterHints), - iconsInSuggestions: this._toBoolean(opts.iconsInSuggestions), - formatOnType: this._toBoolean(opts.formatOnType), - formatOnPaste: this._toBoolean(opts.formatOnPaste), - suggestOnTriggerCharacters: this._toBoolean(opts.suggestOnTriggerCharacters), - acceptSuggestionOnEnter: this._toBoolean(opts.acceptSuggestionOnEnter), - acceptSuggestionOnCommitCharacter: this._toBoolean(opts.acceptSuggestionOnCommitCharacter), + selectionClipboard: opts.selectionClipboard, + hover: opts.hover, + contextmenu: opts.contextmenu, + quickSuggestions: opts.quickSuggestions, + quickSuggestionsDelay: opts.quickSuggestionsDelay, + parameterHints: opts.parameterHints, + iconsInSuggestions: opts.iconsInSuggestions, + formatOnType: opts.formatOnType, + formatOnPaste: opts.formatOnPaste, + suggestOnTriggerCharacters: opts.suggestOnTriggerCharacters, + acceptSuggestionOnEnter: opts.acceptSuggestionOnEnter, + acceptSuggestionOnCommitCharacter: opts.acceptSuggestionOnCommitCharacter, snippetSuggestions: opts.snippetSuggestions, emptySelectionClipboard: opts.emptySelectionClipboard, wordBasedSuggestions: opts.wordBasedSuggestions, suggestFontSize: opts.suggestFontSize, suggestLineHeight: opts.suggestLineHeight, - selectionHighlight: this._toBoolean(opts.selectionHighlight), - occurrencesHighlight: this._toBoolean(opts.occurrencesHighlight), + selectionHighlight: opts.selectionHighlight, + occurrencesHighlight: opts.occurrencesHighlight, codeLens: opts.referenceInfos && opts.codeLens, - folding: this._toBoolean(opts.folding), - hideFoldIcons: this._toBoolean(opts.hideFoldIcons), - matchBrackets: this._toBoolean(opts.matchBrackets), + folding: opts.folding, + hideFoldIcons: opts.hideFoldIcons, + matchBrackets: opts.matchBrackets, }); return new InternalEditorOptions({ lineHeight: env.fontInfo.lineHeight, // todo -> duplicated in styling - readOnly: readOnly, - wordSeparators: String(opts.wordSeparators), - autoClosingBrackets: this._toBoolean(opts.autoClosingBrackets), - useTabStops: this._toBoolean(opts.useTabStops), - tabFocusMode: readOnly ? true : env.tabFocusMode, - dragAndDrop: this._toBoolean(opts.dragAndDrop), + readOnly: opts.readOnly, + wordSeparators: opts.wordSeparators, + autoClosingBrackets: opts.autoClosingBrackets, + useTabStops: opts.useTabStops, + tabFocusMode: opts.readOnly ? true : env.tabFocusMode, + dragAndDrop: opts.dragAndDrop, layoutInfo: layoutInfo, fontInfo: env.fontInfo, viewInfo: viewInfo, @@ -1740,143 +2219,6 @@ export class InternalEditorOptionsFactory { contribInfo: contribInfo, }); } - - private static _scrollbarVisibilityFromString(visibility: string): ScrollbarVisibility { - switch (visibility) { - case 'hidden': - return ScrollbarVisibility.Hidden; - case 'visible': - return ScrollbarVisibility.Visible; - default: - return ScrollbarVisibility.Auto; - } - } - - private static _sanitizeScrollbarOpts(raw: IEditorScrollbarOptions, mouseWheelScrollSensitivity: number): InternalEditorScrollbarOptions { - const horizontalScrollbarSize = this._toIntegerWithDefault(raw.horizontalScrollbarSize, 10); - const verticalScrollbarSize = this._toIntegerWithDefault(raw.verticalScrollbarSize, 14); - return new InternalEditorScrollbarOptions({ - vertical: this._scrollbarVisibilityFromString(raw.vertical), - horizontal: this._scrollbarVisibilityFromString(raw.horizontal), - - arrowSize: this._toIntegerWithDefault(raw.arrowSize, 11), - useShadows: this._toBooleanWithDefault(raw.useShadows, true), - - verticalHasArrows: this._toBooleanWithDefault(raw.verticalHasArrows, false), - horizontalHasArrows: this._toBooleanWithDefault(raw.horizontalHasArrows, false), - - horizontalScrollbarSize: horizontalScrollbarSize, - horizontalSliderSize: this._toIntegerWithDefault(raw.horizontalSliderSize, horizontalScrollbarSize), - - verticalScrollbarSize: verticalScrollbarSize, - verticalSliderSize: this._toIntegerWithDefault(raw.verticalSliderSize, verticalScrollbarSize), - - handleMouseWheel: this._toBooleanWithDefault(raw.handleMouseWheel, true), - mouseWheelScrollSensitivity: mouseWheelScrollSensitivity - }); - } - - private static _sanitizeMinimapOpts(raw: IEditorMinimapOptions): InternalEditorMinimapOptions { - let maxColumn = this._toIntegerWithDefault(raw.maxColumn, DefaultConfig.editor.minimap.maxColumn); - if (maxColumn < 1) { - maxColumn = 1; - } - return new InternalEditorMinimapOptions({ - enabled: this._toBooleanWithDefault(raw.enabled, DefaultConfig.editor.minimap.enabled), - renderCharacters: this._toBooleanWithDefault(raw.renderCharacters, DefaultConfig.editor.minimap.renderCharacters), - maxColumn: maxColumn, - }); - } - - private static _wrappingIndentFromString(wrappingIndent: string): WrappingIndent { - if (wrappingIndent === 'indent') { - return WrappingIndent.Indent; - } else if (wrappingIndent === 'same') { - return WrappingIndent.Same; - } else { - return WrappingIndent.None; - } - } - - private static _cursorStyleFromString(cursorStyle: string): TextEditorCursorStyle { - if (cursorStyle === 'line') { - return TextEditorCursorStyle.Line; - } else if (cursorStyle === 'block') { - return TextEditorCursorStyle.Block; - } else if (cursorStyle === 'underline') { - return TextEditorCursorStyle.Underline; - } else if (cursorStyle === 'line-thin') { - return TextEditorCursorStyle.LineThin; - } else if (cursorStyle === 'block-outline') { - return TextEditorCursorStyle.BlockOutline; - } else if (cursorStyle === 'underline-thin') { - return TextEditorCursorStyle.UnderlineThin; - } - return TextEditorCursorStyle.Line; - } - - private static _cursorBlinkingStyleFromString(cursorBlinkingStyle: string): TextEditorCursorBlinkingStyle { - switch (cursorBlinkingStyle) { - case 'blink': - return TextEditorCursorBlinkingStyle.Blink; - case 'smooth': - return TextEditorCursorBlinkingStyle.Smooth; - case 'phase': - return TextEditorCursorBlinkingStyle.Phase; - case 'expand': - return TextEditorCursorBlinkingStyle.Expand; - case 'visible': // maintain compatibility - case 'solid': - return TextEditorCursorBlinkingStyle.Solid; - } - return TextEditorCursorBlinkingStyle.Blink; - } - - private static _toBoolean(value: any): boolean { - return value === 'false' ? false : Boolean(value); - } - - private static _toBooleanWithDefault(value: any, defaultValue: boolean): boolean { - if (typeof value === 'undefined') { - return defaultValue; - } - return this._toBoolean(value); - } - - private static _toInteger(source: any, minimum: number = Constants.MIN_SAFE_SMALL_INTEGER, maximum: number = Constants.MAX_SAFE_SMALL_INTEGER): number { - let r = parseInt(source, 10); - if (isNaN(r)) { - r = 0; - } - r = Math.max(minimum, r); - r = Math.min(maximum, r); - return r | 0; - } - - private static _toIntegerWithDefault(source: any, defaultValue: number): number { - if (typeof source === 'undefined') { - return defaultValue; - } - return this._toInteger(source); - } - - private static _toSortedIntegerArray(source: any): number[] { - if (!Array.isArray(source)) { - return []; - } - const arrSource = source; - const r = arrSource.map(el => this._toInteger(el)); - r.sort(); - return r; - } - - private static _toFloat(source: any, defaultValue: number): number { - let r = parseFloat(source); - if (isNaN(r)) { - r = defaultValue; - } - return r; - } } /** diff --git a/src/vs/editor/common/config/fontInfo.ts b/src/vs/editor/common/config/fontInfo.ts index 1c291d02cf6c3..a7d1b36d47fca 100644 --- a/src/vs/editor/common/config/fontInfo.ts +++ b/src/vs/editor/common/config/fontInfo.ts @@ -39,6 +39,13 @@ function clamp(n: number, min: number, max: number): number { return n; } +function _string(value: any, defaultValue: string): string { + if (typeof value !== 'string') { + return defaultValue; + } + return value; +} + export class BareFontInfo { readonly _bareFontInfoBrand: void; @@ -52,8 +59,8 @@ export class BareFontInfo { lineHeight?: number | string; }, zoomLevel: number): BareFontInfo { - let fontFamily = String(opts.fontFamily) || DefaultConfig.editor.fontFamily; - let fontWeight = String(opts.fontWeight) || DefaultConfig.editor.fontWeight; + let fontFamily = _string(opts.fontFamily, DefaultConfig.editor.fontFamily); + let fontWeight = _string(opts.fontWeight, DefaultConfig.editor.fontWeight); let fontSize = safeParseFloat(opts.fontSize, DefaultConfig.editor.fontSize); fontSize = clamp(fontSize, 0, 100); diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index 4010e1e617582..9581fa63cfbe6 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -1816,7 +1816,7 @@ export interface ICommonCodeEditor extends IEditor { getConfiguration(): editorOptions.InternalEditorOptions; /** - * Returns the 'raw' editor's configuration, as it was applied over the defaults, but without any computed members. + * Returns the 'raw' editor's configuration (without any validation or defaults). * @internal */ getRawConfiguration(): editorOptions.IEditorOptions; diff --git a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts index ef2c5cbe38846..e16b24e47d0fd 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts @@ -670,7 +670,7 @@ class EditSettingRenderer extends Disposable { } private onConfigurationChanged(): void { - if (!this.editor.getRawConfiguration().glyphMargin) { + if (!this.editor.getConfiguration().viewInfo.glyphMargin) { this.editPreferenceWidgetForCusorPosition.hide(); this.editPreferenceWidgetForMouseMove.hide(); } @@ -720,7 +720,7 @@ class EditSettingRenderer extends Disposable { private showEditPreferencesWidget(editPreferencesWidget: EditPreferenceWidget, settings: ISetting[]) { const line = settings[0].valueRange.startLineNumber; - if (this.editor.getRawConfiguration().glyphMargin && this.marginFreeFromOtherDecorations(line)) { + if (this.editor.getConfiguration().viewInfo.glyphMargin && this.marginFreeFromOtherDecorations(line)) { editPreferencesWidget.show(line, nls.localize('editTtile', "Edit"), settings); const editPreferenceWidgetToHide = editPreferencesWidget === this.editPreferenceWidgetForCusorPosition ? this.editPreferenceWidgetForMouseMove : this.editPreferenceWidgetForCusorPosition; editPreferenceWidgetToHide.hide(); From ed52cdd5c316f086e1768ab2b092ddbb16c3a8d1 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 8 May 2017 17:32:18 +0200 Subject: [PATCH 0279/2747] Move default option values to editorOptions.ts --- .../editor/browser/widget/diffEditorWidget.ts | 5 +- src/vs/editor/common/commonCodeEditor.ts | 4 - .../common/config/commonEditorConfig.ts | 114 ++++----- src/vs/editor/common/config/defaultConfig.ts | 130 ----------- src/vs/editor/common/config/editorOptions.ts | 218 ++++++++++-------- src/vs/editor/common/config/fontInfo.ts | 17 +- src/vs/editor/common/model/textModel.ts | 8 +- .../common/services/modelServiceImpl.ts | 10 +- .../browser/referencesWidget.ts | 9 +- .../editor/contrib/suggest/browser/suggest.ts | 4 +- src/vs/editor/editor.main.ts | 8 +- .../electron-browser/toggleWordWrap.ts | 5 +- .../electron-browser/terminal.contribution.ts | 4 +- .../electron-browser/terminalConfigHelper.ts | 8 +- .../terminalConfigHelper.test.ts | 6 +- .../electron-browser/walkThroughPart.ts | 9 +- 16 files changed, 238 insertions(+), 321 deletions(-) delete mode 100644 src/vs/editor/common/config/defaultConfig.ts diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index d6fd59992d424..9958edfbde8ea 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -16,7 +16,6 @@ import { ISashEvent, IVerticalSashLayoutProvider, Sash } from 'vs/base/browser/u import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; -import { DefaultConfig } from 'vs/editor/common/config/defaultConfig'; import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; @@ -214,7 +213,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._domElement = domElement; options = options || {}; - this._theme = options.theme || DefaultConfig.editor.theme; + this._theme = options.theme || editorOptions.EDITOR_DEFAULTS.theme; // renderSideBySide this._renderSideBySide = true; if (typeof options.renderSideBySide !== 'undefined') { @@ -899,7 +898,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE private _adjustOptionsForRightHandSide(options: editorOptions.IDiffEditorOptions): editorOptions.IEditorOptions { let result = this._adjustOptionsForSubEditor(options); - result.revealHorizontalRightPadding = DefaultConfig.editor.revealHorizontalRightPadding + DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH; + result.revealHorizontalRightPadding = editorOptions.EDITOR_DEFAULTS.revealHorizontalRightPadding + DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH; result.scrollbar.verticalHasArrows = false; result.theme = this._theme + ' modified-in-monaco-diff-editor'; return result; diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index d7a01189a10b1..63609ca09a274 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -12,7 +12,6 @@ import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiati import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IContextKey, IContextKeyServiceTarget, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { CommonEditorConfiguration } from 'vs/editor/common/config/commonEditorConfig'; -import { DefaultConfig } from 'vs/editor/common/config/defaultConfig'; import { Cursor } from 'vs/editor/common/controller/cursor'; import { CursorColumns, IViewModelHelper, ICursors } from 'vs/editor/common/controller/cursorCommon'; import { Position, IPosition } from 'vs/editor/common/core/position'; @@ -126,9 +125,6 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo this._decorationTypeSubtypes = {}; options = options || {}; - if (typeof options.ariaLabel === 'undefined') { - options.ariaLabel = DefaultConfig.editor.ariaLabel; - } this._configuration = this._register(this._createConfiguration(options)); this._register(this._configuration.onDidChange((e) => { this._onDidChangeConfiguration.fire(e); diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 066c5ae79f3d8..9a1a5aa404c65 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -11,11 +11,13 @@ import * as objects from 'vs/base/common/objects'; import * as platform from 'vs/base/common/platform'; import { Extensions, IConfigurationRegistry, IConfigurationNode } from 'vs/platform/configuration/common/configurationRegistry'; import { Registry } from 'vs/platform/platform'; -import { DefaultConfig, DEFAULT_INDENTATION, DEFAULT_TRIM_AUTO_WHITESPACE } from 'vs/editor/common/config/defaultConfig'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { FontInfo, BareFontInfo } from 'vs/editor/common/config/fontInfo'; import { EditorZoom } from 'vs/editor/common/config/editorZoom'; import * as editorOptions from 'vs/editor/common/config/editorOptions'; +import EDITOR_DEFAULTS = editorOptions.EDITOR_DEFAULTS; +import EDITOR_FONT_DEFAULTS = editorOptions.EDITOR_FONT_DEFAULTS; +import EDITOR_MODEL_DEFAULTS = editorOptions.EDITOR_MODEL_DEFAULTS; /** * Control what pressing Tab does. @@ -74,8 +76,8 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed constructor(options: editorOptions.IEditorOptions, elementSizeObserver: IElementSizeObserver = null) { super(); - this._rawOptions = options; - this._validatedOptions = editorOptions.EditorOptionsValidator.validate(this._rawOptions, editorOptions.DEFAULTS); + this._rawOptions = options || {}; + this._validatedOptions = editorOptions.EditorOptionsValidator.validate(this._rawOptions, EDITOR_DEFAULTS); this._elementSizeObserver = elementSizeObserver; this._isDominatedByLongLines = false; @@ -126,7 +128,7 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed public updateOptions(newOptions: editorOptions.IEditorOptions): void { this._rawOptions = objects.mixin(this._rawOptions, newOptions || {}); - this._validatedOptions = editorOptions.EditorOptionsValidator.validate(this._rawOptions, editorOptions.DEFAULTS); + this._validatedOptions = editorOptions.EditorOptionsValidator.validate(this._rawOptions, EDITOR_DEFAULTS); this._recomputeOptions(); } @@ -178,29 +180,29 @@ const editorConfiguration: IConfigurationNode = { 'properties': { 'editor.fontFamily': { 'type': 'string', - 'default': DefaultConfig.editor.fontFamily, + 'default': EDITOR_FONT_DEFAULTS.fontFamily, 'description': nls.localize('fontFamily', "Controls the font family.") }, 'editor.fontWeight': { 'type': 'string', 'enum': ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'], - 'default': DefaultConfig.editor.fontWeight, + 'default': EDITOR_FONT_DEFAULTS.fontWeight, 'description': nls.localize('fontWeight', "Controls the font weight.") }, 'editor.fontSize': { 'type': 'number', - 'default': DefaultConfig.editor.fontSize, + 'default': EDITOR_FONT_DEFAULTS.fontSize, 'description': nls.localize('fontSize', "Controls the font size in pixels.") }, 'editor.lineHeight': { 'type': 'number', - 'default': DefaultConfig.editor.lineHeight, + 'default': EDITOR_FONT_DEFAULTS.lineHeight, 'description': nls.localize('lineHeight', "Controls the line height. Use 0 to compute the lineHeight from the fontSize.") }, 'editor.lineNumbers': { 'type': 'string', 'enum': ['off', 'on', 'relative'], - 'default': DefaultConfig.editor.lineNumbers, + 'default': 'on', 'description': nls.localize('lineNumbers', "Controls the display of line numbers. Possible values are 'on', 'off', and 'relative'. 'relative' shows the line count from the current cursor position.") }, 'editor.rulers': { @@ -208,55 +210,55 @@ const editorConfiguration: IConfigurationNode = { 'items': { 'type': 'number' }, - 'default': DefaultConfig.editor.rulers, + 'default': EDITOR_DEFAULTS.rulers, 'description': nls.localize('rulers', "Columns at which to show vertical rulers") }, 'editor.wordSeparators': { 'type': 'string', - 'default': DefaultConfig.editor.wordSeparators, + 'default': EDITOR_DEFAULTS.wordSeparators, 'description': nls.localize('wordSeparators', "Characters that will be used as word separators when doing word related navigations or operations") }, 'editor.tabSize': { 'type': 'number', - 'default': DEFAULT_INDENTATION.tabSize, + 'default': EDITOR_MODEL_DEFAULTS.tabSize, 'minimum': 1, 'description': nls.localize('tabSize', "The number of spaces a tab is equal to. This setting is overriden based on the file contents when `editor.detectIndentation` is on."), 'errorMessage': nls.localize('tabSize.errorMessage', "Expected 'number'. Note that the value \"auto\" has been replaced by the `editor.detectIndentation` setting.") }, 'editor.insertSpaces': { 'type': 'boolean', - 'default': DEFAULT_INDENTATION.insertSpaces, + 'default': EDITOR_MODEL_DEFAULTS.insertSpaces, 'description': nls.localize('insertSpaces', "Insert spaces when pressing Tab. This setting is overriden based on the file contents when `editor.detectIndentation` is on."), 'errorMessage': nls.localize('insertSpaces.errorMessage', "Expected 'boolean'. Note that the value \"auto\" has been replaced by the `editor.detectIndentation` setting.") }, 'editor.detectIndentation': { 'type': 'boolean', - 'default': DEFAULT_INDENTATION.detectIndentation, + 'default': EDITOR_MODEL_DEFAULTS.detectIndentation, 'description': nls.localize('detectIndentation', "When opening a file, `editor.tabSize` and `editor.insertSpaces` will be detected based on the file contents.") }, 'editor.roundedSelection': { 'type': 'boolean', - 'default': DefaultConfig.editor.roundedSelection, + 'default': EDITOR_DEFAULTS.roundedSelection, 'description': nls.localize('roundedSelection', "Controls if selections have rounded corners") }, 'editor.scrollBeyondLastLine': { 'type': 'boolean', - 'default': DefaultConfig.editor.scrollBeyondLastLine, + 'default': EDITOR_DEFAULTS.scrollBeyondLastLine, 'description': nls.localize('scrollBeyondLastLine', "Controls if the editor will scroll beyond the last line") }, 'editor.minimap.enabled': { 'type': 'boolean', - 'default': DefaultConfig.editor.minimap.enabled, + 'default': EDITOR_DEFAULTS.minimap.enabled, 'description': nls.localize('minimap.enabled', "Controls if the minimap is shown") }, 'editor.minimap.renderCharacters': { 'type': 'boolean', - 'default': DefaultConfig.editor.minimap.renderCharacters, + 'default': EDITOR_DEFAULTS.minimap.renderCharacters, 'description': nls.localize('minimap.renderCharacters', "Render the actual characters on a line (as opposed to color blocks)") }, 'editor.minimap.maxColumn': { 'type': 'number', - 'default': DefaultConfig.editor.minimap.maxColumn, + 'default': EDITOR_DEFAULTS.minimap.maxColumn, 'description': nls.localize('minimap.maxColumn', "Limit the width of the minimap to render at most a certain number of columns") }, 'editor.wordWrap': { @@ -279,7 +281,7 @@ const editorConfiguration: IConfigurationNode = { ] }, "Lines will wrap at the minimum of viewport and `editor.wordWrapColumn`."), ], - 'default': DefaultConfig.editor.wordWrap, + 'default': EDITOR_DEFAULTS.wordWrap, 'description': nls.localize({ key: 'wordWrap', comment: [ @@ -290,7 +292,7 @@ const editorConfiguration: IConfigurationNode = { }, 'editor.wordWrapColumn': { 'type': 'integer', - 'default': DefaultConfig.editor.wordWrapColumn, + 'default': EDITOR_DEFAULTS.wordWrapColumn, 'minimum': 1, 'description': nls.localize({ key: 'wordWrapColumn', @@ -303,12 +305,12 @@ const editorConfiguration: IConfigurationNode = { 'editor.wrappingIndent': { 'type': 'string', 'enum': ['none', 'same', 'indent'], - 'default': DefaultConfig.editor.wrappingIndent, + 'default': 'same', 'description': nls.localize('wrappingIndent', "Controls the indentation of wrapped lines. Can be one of 'none', 'same' or 'indent'.") }, 'editor.mouseWheelScrollSensitivity': { 'type': 'number', - 'default': DefaultConfig.editor.mouseWheelScrollSensitivity, + 'default': EDITOR_DEFAULTS.mouseWheelScrollSensitivity, 'description': nls.localize('mouseWheelScrollSensitivity', "A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events") }, 'editor.quickSuggestions': { @@ -337,64 +339,64 @@ const editorConfiguration: IConfigurationNode = { } } ], - 'default': DefaultConfig.editor.quickSuggestions, + 'default': EDITOR_DEFAULTS.quickSuggestions, 'description': nls.localize('quickSuggestions', "Controls if suggestions should automatically show up while typing") }, 'editor.quickSuggestionsDelay': { 'type': 'integer', - 'default': DefaultConfig.editor.quickSuggestionsDelay, + 'default': EDITOR_DEFAULTS.quickSuggestionsDelay, 'minimum': 0, 'description': nls.localize('quickSuggestionsDelay', "Controls the delay in ms after which quick suggestions will show up") }, 'editor.parameterHints': { 'type': 'boolean', - 'default': DefaultConfig.editor.parameterHints, + 'default': EDITOR_DEFAULTS.parameterHints, 'description': nls.localize('parameterHints', "Enables parameter hints") }, 'editor.autoClosingBrackets': { 'type': 'boolean', - 'default': DefaultConfig.editor.autoClosingBrackets, + 'default': EDITOR_DEFAULTS.autoClosingBrackets, 'description': nls.localize('autoClosingBrackets', "Controls if the editor should automatically close brackets after opening them") }, 'editor.formatOnType': { 'type': 'boolean', - 'default': DefaultConfig.editor.formatOnType, + 'default': EDITOR_DEFAULTS.formatOnType, 'description': nls.localize('formatOnType', "Controls if the editor should automatically format the line after typing") }, 'editor.formatOnPaste': { 'type': 'boolean', - 'default': DefaultConfig.editor.formatOnPaste, + 'default': EDITOR_DEFAULTS.formatOnPaste, 'description': nls.localize('formatOnPaste', "Controls if the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.") }, 'editor.suggestOnTriggerCharacters': { 'type': 'boolean', - 'default': DefaultConfig.editor.suggestOnTriggerCharacters, + 'default': EDITOR_DEFAULTS.suggestOnTriggerCharacters, 'description': nls.localize('suggestOnTriggerCharacters', "Controls if suggestions should automatically show up when typing trigger characters") }, 'editor.acceptSuggestionOnEnter': { 'type': 'boolean', - 'default': DefaultConfig.editor.acceptSuggestionOnEnter, + 'default': EDITOR_DEFAULTS.acceptSuggestionOnEnter, 'description': nls.localize('acceptSuggestionOnEnter', "Controls if suggestions should be accepted on 'Enter' - in addition to 'Tab'. Helps to avoid ambiguity between inserting new lines or accepting suggestions.") }, 'editor.acceptSuggestionOnCommitCharacter': { 'type': 'boolean', - 'default': DefaultConfig.editor.acceptSuggestionOnCommitCharacter, + 'default': EDITOR_DEFAULTS.acceptSuggestionOnCommitCharacter, 'description': nls.localize('acceptSuggestionOnCommitCharacter', "Controls if suggestions should be accepted on commit characters. For instance in JavaScript the semi-colon (';') can be a commit character that accepts a suggestion and types that character.") }, 'editor.snippetSuggestions': { 'type': 'string', 'enum': ['top', 'bottom', 'inline', 'none'], - 'default': DefaultConfig.editor.snippetSuggestions, + 'default': EDITOR_DEFAULTS.snippetSuggestions, 'description': nls.localize('snippetSuggestions', "Controls whether snippets are shown with other suggestions and how they are sorted.") }, 'editor.emptySelectionClipboard': { 'type': 'boolean', - 'default': DefaultConfig.editor.emptySelectionClipboard, + 'default': EDITOR_DEFAULTS.emptySelectionClipboard, 'description': nls.localize('emptySelectionClipboard', "Controls whether copying without a selection copies the current line.") }, 'editor.wordBasedSuggestions': { 'type': 'boolean', - 'default': DefaultConfig.editor.wordBasedSuggestions, + 'default': EDITOR_DEFAULTS.wordBasedSuggestions, 'description': nls.localize('wordBasedSuggestions', "Controls whether completions should be computed based on words in the document.") }, 'editor.suggestFontSize': { @@ -411,12 +413,12 @@ const editorConfiguration: IConfigurationNode = { }, 'editor.selectionHighlight': { 'type': 'boolean', - 'default': DefaultConfig.editor.selectionHighlight, + 'default': EDITOR_DEFAULTS.selectionHighlight, 'description': nls.localize('selectionHighlight', "Controls whether the editor should highlight similar matches to the selection") }, 'editor.occurrencesHighlight': { 'type': 'boolean', - 'default': DefaultConfig.editor.occurrencesHighlight, + 'default': EDITOR_DEFAULTS.occurrencesHighlight, 'description': nls.localize('occurrencesHighlight', "Controls whether the editor should highlight semantic symbol occurrences") }, 'editor.overviewRulerLanes': { @@ -426,91 +428,91 @@ const editorConfiguration: IConfigurationNode = { }, 'editor.overviewRulerBorder': { 'type': 'boolean', - 'default': DefaultConfig.editor.overviewRulerBorder, + 'default': EDITOR_DEFAULTS.overviewRulerBorder, 'description': nls.localize('overviewRulerBorder', "Controls if a border should be drawn around the overview ruler.") }, 'editor.cursorBlinking': { 'type': 'string', 'enum': ['blink', 'smooth', 'phase', 'expand', 'solid'], - 'default': DefaultConfig.editor.cursorBlinking, + 'default': EDITOR_DEFAULTS.cursorBlinking, 'description': nls.localize('cursorBlinking', "Control the cursor animation style, possible values are 'blink', 'smooth', 'phase', 'expand' and 'solid'") }, 'editor.mouseWheelZoom': { 'type': 'boolean', - 'default': DefaultConfig.editor.mouseWheelZoom, + 'default': EDITOR_DEFAULTS.mouseWheelZoom, 'description': nls.localize('mouseWheelZoom', "Zoom the font of the editor when using mouse wheel and holding Ctrl") }, 'editor.cursorStyle': { 'type': 'string', 'enum': ['block', 'block-outline', 'line', 'line-thin', 'underline', 'underline-thin'], - 'default': DefaultConfig.editor.cursorStyle, + 'default': EDITOR_DEFAULTS.cursorStyle, 'description': nls.localize('cursorStyle', "Controls the cursor style, accepted values are 'block', 'block-outline', 'line', 'line-thin', 'underline' and 'underline-thin'") }, 'editor.fontLigatures': { 'type': 'boolean', - 'default': DefaultConfig.editor.fontLigatures, + 'default': EDITOR_DEFAULTS.fontLigatures, 'description': nls.localize('fontLigatures', "Enables font ligatures") }, 'editor.hideCursorInOverviewRuler': { 'type': 'boolean', - 'default': DefaultConfig.editor.hideCursorInOverviewRuler, + 'default': EDITOR_DEFAULTS.hideCursorInOverviewRuler, 'description': nls.localize('hideCursorInOverviewRuler', "Controls if the cursor should be hidden in the overview ruler.") }, 'editor.renderWhitespace': { 'type': 'string', 'enum': ['none', 'boundary', 'all'], - default: DefaultConfig.editor.renderWhitespace, + default: EDITOR_DEFAULTS.renderWhitespace, description: nls.localize('renderWhitespace', "Controls how the editor should render whitespace characters, possibilities are 'none', 'boundary', and 'all'. The 'boundary' option does not render single spaces between words.") }, 'editor.renderControlCharacters': { 'type': 'boolean', - default: DefaultConfig.editor.renderControlCharacters, + default: EDITOR_DEFAULTS.renderControlCharacters, description: nls.localize('renderControlCharacters', "Controls whether the editor should render control characters") }, 'editor.renderIndentGuides': { 'type': 'boolean', - default: DefaultConfig.editor.renderIndentGuides, + default: EDITOR_DEFAULTS.renderIndentGuides, description: nls.localize('renderIndentGuides', "Controls whether the editor should render indent guides") }, 'editor.renderLineHighlight': { 'type': 'string', 'enum': ['none', 'gutter', 'line', 'all'], - default: DefaultConfig.editor.renderLineHighlight, + default: EDITOR_DEFAULTS.renderLineHighlight, description: nls.localize('renderLineHighlight', "Controls how the editor should render the current line highlight, possibilities are 'none', 'gutter', 'line', and 'all'.") }, 'editor.codeLens': { 'type': 'boolean', - 'default': DefaultConfig.editor.codeLens, + 'default': EDITOR_DEFAULTS.codeLens, 'description': nls.localize('codeLens', "Controls if the editor shows code lenses") }, 'editor.folding': { 'type': 'boolean', - 'default': DefaultConfig.editor.folding, + 'default': EDITOR_DEFAULTS.folding, 'description': nls.localize('folding', "Controls whether the editor has code folding enabled") }, 'editor.hideFoldIcons': { 'type': 'boolean', - 'default': DefaultConfig.editor.hideFoldIcons, + 'default': EDITOR_DEFAULTS.hideFoldIcons, 'description': nls.localize('hideFoldIcons', "Controls whether the fold icons on the gutter are automatically hidden.") }, 'editor.matchBrackets': { 'type': 'boolean', - 'default': DefaultConfig.editor.matchBrackets, + 'default': EDITOR_DEFAULTS.matchBrackets, 'description': nls.localize('matchBrackets', "Highlight matching brackets when one of them is selected.") }, 'editor.glyphMargin': { 'type': 'boolean', - 'default': DefaultConfig.editor.glyphMargin, + 'default': EDITOR_DEFAULTS.glyphMargin, 'description': nls.localize('glyphMargin', "Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.") }, 'editor.useTabStops': { 'type': 'boolean', - 'default': DefaultConfig.editor.useTabStops, + 'default': EDITOR_DEFAULTS.useTabStops, 'description': nls.localize('useTabStops', "Inserting and deleting whitespace follows tab stops") }, 'editor.trimAutoWhitespace': { 'type': 'boolean', - 'default': DEFAULT_TRIM_AUTO_WHITESPACE, + 'default': EDITOR_MODEL_DEFAULTS.trimAutoWhitespace, 'description': nls.localize('trimAutoWhitespace', "Remove trailing auto inserted whitespace") }, 'editor.stablePeek': { @@ -520,7 +522,7 @@ const editorConfiguration: IConfigurationNode = { }, 'editor.dragAndDrop': { 'type': 'boolean', - 'default': DefaultConfig.editor.dragAndDrop, + 'default': EDITOR_DEFAULTS.dragAndDrop, 'description': nls.localize('dragAndDrop', "Controls if the editor should allow to move selections via drag and drop.") }, 'diffEditor.renderSideBySide': { @@ -544,7 +546,7 @@ const editorConfiguration: IConfigurationNode = { if (platform.isLinux) { editorConfiguration['properties']['editor.selectionClipboard'] = { 'type': 'boolean', - 'default': DefaultConfig.editor.selectionClipboard, + 'default': EDITOR_DEFAULTS.selectionClipboard, 'description': nls.localize('selectionClipboard', "Controls if the Linux primary clipboard should be supported.") }; } diff --git a/src/vs/editor/common/config/defaultConfig.ts b/src/vs/editor/common/config/defaultConfig.ts deleted file mode 100644 index 0662f2bf9e1e0..0000000000000 --- a/src/vs/editor/common/config/defaultConfig.ts +++ /dev/null @@ -1,130 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import * as nls from 'vs/nls'; -import * as platform from 'vs/base/common/platform'; -import { USUAL_WORD_SEPARATORS } from 'vs/editor/common/model/wordHelper'; -import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; - -export interface IConfiguration { - editor: IEditorOptions; -} - -export const DEFAULT_INDENTATION = { - tabSize: 4, - insertSpaces: true, - detectIndentation: true -}; -export const DEFAULT_TRIM_AUTO_WHITESPACE = true; - -const DEFAULT_WINDOWS_FONT_FAMILY = 'Consolas, \'Courier New\', monospace'; -const DEFAULT_MAC_FONT_FAMILY = 'Menlo, Monaco, \'Courier New\', monospace'; -const DEFAULT_LINUX_FONT_FAMILY = '\'Droid Sans Mono\', \'Courier New\', monospace, \'Droid Sans Fallback\''; - -/** - * Determined from empirical observations. - */ -export const GOLDEN_LINE_HEIGHT_RATIO = platform.isMacintosh ? 1.5 : 1.35; - -class ConfigClass implements IConfiguration { - - public editor: IEditorOptions; - - constructor() { - this.editor = { - experimentalScreenReader: true, - rulers: [], - wordSeparators: USUAL_WORD_SEPARATORS, - selectionClipboard: true, - ariaLabel: nls.localize('editorViewAccessibleLabel', "Editor content"), - lineNumbers: 'on', - selectOnLineNumbers: true, - lineNumbersMinChars: 5, - glyphMargin: true, - lineDecorationsWidth: 10, - revealHorizontalRightPadding: 30, - roundedSelection: true, - theme: 'vs', - readOnly: false, - scrollbar: { - verticalScrollbarSize: 14, - horizontal: 'auto', - useShadows: true, - verticalHasArrows: false, - horizontalHasArrows: false - }, - minimap: { - enabled: false, - renderCharacters: true, - maxColumn: 120 - }, - fixedOverflowWidgets: false, - overviewRulerLanes: 2, - overviewRulerBorder: true, - cursorBlinking: 'blink', - mouseWheelZoom: false, - cursorStyle: 'line', - mouseStyle: 'text', - fontLigatures: false, - disableTranslate3d: false, - disableMonospaceOptimizations: false, - hideCursorInOverviewRuler: false, - scrollBeyondLastLine: true, - automaticLayout: false, - wordWrap: 'off', - wordWrapColumn: 80, - wordWrapMinified: true, - wrappingIndent: 'same', - wordWrapBreakBeforeCharacters: '([{‘“〈《「『【〔([{「£¥$£¥++', - wordWrapBreakAfterCharacters: ' \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー’”〉》」』】〕)]}」', - wordWrapBreakObtrusiveCharacters: '.', - - // Features - hover: true, - contextmenu: true, - mouseWheelScrollSensitivity: 1, - quickSuggestions: { other: true, comments: false, strings: false }, - quickSuggestionsDelay: 10, - parameterHints: true, - iconsInSuggestions: true, - autoClosingBrackets: true, - formatOnType: false, - formatOnPaste: false, - suggestOnTriggerCharacters: true, - acceptSuggestionOnEnter: true, - acceptSuggestionOnCommitCharacter: true, - snippetSuggestions: 'inline', - emptySelectionClipboard: true, - wordBasedSuggestions: true, - suggestFontSize: 0, - suggestLineHeight: 0, - selectionHighlight: true, - occurrencesHighlight: true, - codeLens: true, - referenceInfos: true, - folding: true, - hideFoldIcons: true, - renderWhitespace: 'none', - renderControlCharacters: false, - renderIndentGuides: false, - renderLineHighlight: 'line', - useTabStops: true, - matchBrackets: true, - dragAndDrop: false, - - fontFamily: ( - platform.isMacintosh ? DEFAULT_MAC_FONT_FAMILY : (platform.isLinux ? DEFAULT_LINUX_FONT_FAMILY : DEFAULT_WINDOWS_FONT_FAMILY) - ), - fontWeight: 'normal', - fontSize: ( - platform.isMacintosh ? 12 : 14 - ), - lineHeight: 0 - }; - } -} - -export const DefaultConfig: IConfiguration = new ConfigClass(); diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 4c3c216e88f60..cd983f9dcf4e0 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -4,10 +4,12 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import * as nls from 'vs/nls'; +import * as platform from 'vs/base/common/platform'; import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import { FontInfo } from 'vs/editor/common/config/fontInfo'; import { Constants } from 'vs/editor/common/core/uint'; -import { DefaultConfig } from "vs/editor/common/config/defaultConfig"; +import { USUAL_WORD_SEPARATORS } from 'vs/editor/common/model/wordHelper'; /** * Configuration options for editor scrollbars @@ -1730,99 +1732,6 @@ function _scrollbarVisibilityFromString(visibility: string, defaultValue: Scroll } } -/** - * @internal - */ -export const DEFAULTS: IValidatedEditorOptions = { - inDiffEditor: false, - experimentalScreenReader: DefaultConfig.editor.experimentalScreenReader, - ariaLabel: DefaultConfig.editor.ariaLabel, - rulers: DefaultConfig.editor.rulers, - wordSeparators: DefaultConfig.editor.wordSeparators, - selectionClipboard: DefaultConfig.editor.selectionClipboard, - renderLineNumbers: true, - renderCustomLineNumbers: null, - renderRelativeLineNumbers: false, - selectOnLineNumbers: DefaultConfig.editor.selectOnLineNumbers, - lineNumbersMinChars: DefaultConfig.editor.lineNumbersMinChars, - glyphMargin: DefaultConfig.editor.glyphMargin, - lineDecorationsWidth: DefaultConfig.editor.lineDecorationsWidth, - revealHorizontalRightPadding: DefaultConfig.editor.revealHorizontalRightPadding, - roundedSelection: DefaultConfig.editor.roundedSelection, - theme: DefaultConfig.editor.theme, - readOnly: DefaultConfig.editor.readOnly, - scrollbar: { - vertical: ScrollbarVisibility.Auto, - horizontal: ScrollbarVisibility.Auto, - arrowSize: 11, - useShadows: true, - verticalHasArrows: false, - horizontalHasArrows: false, - horizontalScrollbarSize: 10, - horizontalSliderSize: 10, - verticalScrollbarSize: 14, - verticalSliderSize: 14, - handleMouseWheel: true - }, - minimap: { - enabled: false, - renderCharacters: true, - maxColumn: 120 - }, - fixedOverflowWidgets: DefaultConfig.editor.fixedOverflowWidgets, - overviewRulerLanes: DefaultConfig.editor.overviewRulerLanes, - overviewRulerBorder: DefaultConfig.editor.overviewRulerBorder, - cursorBlinking: TextEditorCursorBlinkingStyle.Blink, - mouseWheelZoom: DefaultConfig.editor.mouseWheelZoom, - mouseStyle: DefaultConfig.editor.mouseStyle, - cursorStyle: TextEditorCursorStyle.Line, - fontLigatures: DefaultConfig.editor.fontLigatures, - disableTranslate3d: DefaultConfig.editor.disableTranslate3d, - disableMonospaceOptimizations: DefaultConfig.editor.disableMonospaceOptimizations, - hideCursorInOverviewRuler: DefaultConfig.editor.hideCursorInOverviewRuler, - scrollBeyondLastLine: DefaultConfig.editor.scrollBeyondLastLine, - automaticLayout: DefaultConfig.editor.automaticLayout, - wordWrap: DefaultConfig.editor.wordWrap, - wordWrapColumn: DefaultConfig.editor.wordWrapColumn, - wordWrapMinified: DefaultConfig.editor.wordWrapMinified, - wrappingIndent: WrappingIndent.Same, - wordWrapBreakBeforeCharacters: DefaultConfig.editor.wordWrapBreakBeforeCharacters, - wordWrapBreakAfterCharacters: DefaultConfig.editor.wordWrapBreakAfterCharacters, - wordWrapBreakObtrusiveCharacters: DefaultConfig.editor.wordWrapBreakObtrusiveCharacters, - stopRenderingLineAfter: 10000, - hover: DefaultConfig.editor.hover, - contextmenu: DefaultConfig.editor.contextmenu, - mouseWheelScrollSensitivity: DefaultConfig.editor.mouseWheelScrollSensitivity, - quickSuggestions: DefaultConfig.editor.quickSuggestions, - quickSuggestionsDelay: DefaultConfig.editor.quickSuggestionsDelay, - parameterHints: DefaultConfig.editor.parameterHints, - iconsInSuggestions: DefaultConfig.editor.iconsInSuggestions, - autoClosingBrackets: DefaultConfig.editor.autoClosingBrackets, - formatOnType: DefaultConfig.editor.formatOnType, - formatOnPaste: DefaultConfig.editor.formatOnPaste, - dragAndDrop: DefaultConfig.editor.dragAndDrop, - suggestOnTriggerCharacters: DefaultConfig.editor.suggestOnTriggerCharacters, - acceptSuggestionOnEnter: DefaultConfig.editor.acceptSuggestionOnEnter, - acceptSuggestionOnCommitCharacter: DefaultConfig.editor.acceptSuggestionOnCommitCharacter, - snippetSuggestions: DefaultConfig.editor.snippetSuggestions, - emptySelectionClipboard: DefaultConfig.editor.emptySelectionClipboard, - wordBasedSuggestions: DefaultConfig.editor.wordBasedSuggestions, - suggestFontSize: DefaultConfig.editor.suggestFontSize, - suggestLineHeight: DefaultConfig.editor.suggestLineHeight, - selectionHighlight: DefaultConfig.editor.selectionHighlight, - occurrencesHighlight: DefaultConfig.editor.occurrencesHighlight, - codeLens: DefaultConfig.editor.codeLens, - referenceInfos: DefaultConfig.editor.referenceInfos, - folding: DefaultConfig.editor.folding, - hideFoldIcons: DefaultConfig.editor.hideFoldIcons, - matchBrackets: DefaultConfig.editor.matchBrackets, - renderWhitespace: DefaultConfig.editor.renderWhitespace, - renderControlCharacters: DefaultConfig.editor.renderControlCharacters, - renderIndentGuides: DefaultConfig.editor.renderIndentGuides, - renderLineHighlight: DefaultConfig.editor.renderLineHighlight, - useTabStops: DefaultConfig.editor.useTabStops, -}; - /** * @internal */ @@ -2371,3 +2280,124 @@ export class EditorLayoutProvider { }); } } + +const DEFAULT_WINDOWS_FONT_FAMILY = 'Consolas, \'Courier New\', monospace'; +const DEFAULT_MAC_FONT_FAMILY = 'Menlo, Monaco, \'Courier New\', monospace'; +const DEFAULT_LINUX_FONT_FAMILY = '\'Droid Sans Mono\', \'Courier New\', monospace, \'Droid Sans Fallback\''; + +/** + * @internal + */ +export const EDITOR_FONT_DEFAULTS = { + fontFamily: ( + platform.isMacintosh ? DEFAULT_MAC_FONT_FAMILY : (platform.isLinux ? DEFAULT_LINUX_FONT_FAMILY : DEFAULT_WINDOWS_FONT_FAMILY) + ), + fontWeight: 'normal', + fontSize: ( + platform.isMacintosh ? 12 : 14 + ), + lineHeight: 0, +}; + +/** + * @internal + */ +export const EDITOR_MODEL_DEFAULTS = { + tabSize: 4, + insertSpaces: true, + detectIndentation: true, + trimAutoWhitespace: true +}; + +/** + * @internal + */ +export const EDITOR_DEFAULTS: IValidatedEditorOptions = { + inDiffEditor: false, + experimentalScreenReader: true, + ariaLabel: nls.localize('editorViewAccessibleLabel', "Editor content"), + rulers: [], + wordSeparators: USUAL_WORD_SEPARATORS, + selectionClipboard: true, + renderLineNumbers: true, + renderCustomLineNumbers: null, + renderRelativeLineNumbers: false, + selectOnLineNumbers: true, + lineNumbersMinChars: 5, + glyphMargin: true, + lineDecorationsWidth: 10, + revealHorizontalRightPadding: 30, + roundedSelection: true, + theme: 'vs', + readOnly: false, + scrollbar: { + vertical: ScrollbarVisibility.Auto, + horizontal: ScrollbarVisibility.Auto, + arrowSize: 11, + useShadows: true, + verticalHasArrows: false, + horizontalHasArrows: false, + horizontalScrollbarSize: 10, + horizontalSliderSize: 10, + verticalScrollbarSize: 14, + verticalSliderSize: 14, + handleMouseWheel: true + }, + minimap: { + enabled: false, + renderCharacters: true, + maxColumn: 120 + }, + fixedOverflowWidgets: false, + overviewRulerLanes: 2, + overviewRulerBorder: true, + cursorBlinking: TextEditorCursorBlinkingStyle.Blink, + mouseWheelZoom: false, + mouseStyle: 'text', + cursorStyle: TextEditorCursorStyle.Line, + fontLigatures: false, + disableTranslate3d: false, + disableMonospaceOptimizations: false, + hideCursorInOverviewRuler: false, + scrollBeyondLastLine: true, + automaticLayout: false, + wordWrap: 'off', + wordWrapColumn: 80, + wordWrapMinified: true, + wrappingIndent: WrappingIndent.Same, + wordWrapBreakBeforeCharacters: '([{‘“〈《「『【〔([{「£¥$£¥++', + wordWrapBreakAfterCharacters: ' \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー’”〉》」』】〕)]}」', + wordWrapBreakObtrusiveCharacters: '.', + stopRenderingLineAfter: 10000, + hover: true, + contextmenu: true, + mouseWheelScrollSensitivity: 1, + quickSuggestions: { other: true, comments: false, strings: false }, + quickSuggestionsDelay: 10, + parameterHints: true, + iconsInSuggestions: true, + autoClosingBrackets: true, + formatOnType: false, + formatOnPaste: false, + dragAndDrop: false, + suggestOnTriggerCharacters: true, + acceptSuggestionOnEnter: true, + acceptSuggestionOnCommitCharacter: true, + snippetSuggestions: 'inline', + emptySelectionClipboard: true, + wordBasedSuggestions: true, + suggestFontSize: 0, + suggestLineHeight: 0, + selectionHighlight: true, + occurrencesHighlight: true, + codeLens: true, + referenceInfos: true, + folding: true, + hideFoldIcons: true, + matchBrackets: true, + renderWhitespace: 'none', + renderControlCharacters: false, + renderIndentGuides: false, + renderLineHighlight: 'line', + useTabStops: true, +}; diff --git a/src/vs/editor/common/config/fontInfo.ts b/src/vs/editor/common/config/fontInfo.ts index a7d1b36d47fca..947c51bf1b996 100644 --- a/src/vs/editor/common/config/fontInfo.ts +++ b/src/vs/editor/common/config/fontInfo.ts @@ -4,8 +4,15 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { DefaultConfig, GOLDEN_LINE_HEIGHT_RATIO } from 'vs/editor/common/config/defaultConfig'; +import * as platform from 'vs/base/common/platform'; import { EditorZoom } from 'vs/editor/common/config/editorZoom'; +import { EDITOR_FONT_DEFAULTS } from "vs/editor/common/config/editorOptions"; + +/** + * Determined from empirical observations. + * @internal + */ +const GOLDEN_LINE_HEIGHT_RATIO = platform.isMacintosh ? 1.5 : 1.35; function safeParseFloat(n: number | string, defaultValue: number): number { if (typeof n === 'number') { @@ -59,13 +66,13 @@ export class BareFontInfo { lineHeight?: number | string; }, zoomLevel: number): BareFontInfo { - let fontFamily = _string(opts.fontFamily, DefaultConfig.editor.fontFamily); - let fontWeight = _string(opts.fontWeight, DefaultConfig.editor.fontWeight); + let fontFamily = _string(opts.fontFamily, EDITOR_FONT_DEFAULTS.fontFamily); + let fontWeight = _string(opts.fontWeight, EDITOR_FONT_DEFAULTS.fontWeight); - let fontSize = safeParseFloat(opts.fontSize, DefaultConfig.editor.fontSize); + let fontSize = safeParseFloat(opts.fontSize, EDITOR_FONT_DEFAULTS.fontSize); fontSize = clamp(fontSize, 0, 100); if (fontSize === 0) { - fontSize = DefaultConfig.editor.fontSize; + fontSize = EDITOR_FONT_DEFAULTS.fontSize; } let lineHeight = safeParseInt(opts.lineHeight, 0); diff --git a/src/vs/editor/common/model/textModel.ts b/src/vs/editor/common/model/textModel.ts index 3bc7ddc2490cb..a84d56ad65b17 100644 --- a/src/vs/editor/common/model/textModel.ts +++ b/src/vs/editor/common/model/textModel.ts @@ -11,7 +11,7 @@ import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { ModelLine } from 'vs/editor/common/model/modelLine'; import { guessIndentation } from 'vs/editor/common/model/indentationGuesser'; -import { DEFAULT_INDENTATION, DEFAULT_TRIM_AUTO_WHITESPACE } from 'vs/editor/common/config/defaultConfig'; +import { EDITOR_MODEL_DEFAULTS } from "vs/editor/common/config/editorOptions"; import { PrefixSumComputer } from 'vs/editor/common/viewModel/prefixSumComputer'; import { IndentRange, computeRanges } from 'vs/editor/common/model/indentRanges'; import { TextModelSearch, SearchParams } from 'vs/editor/common/model/textModelSearch'; @@ -32,11 +32,11 @@ export class TextModel implements editorCommon.ITextModel { private static MODEL_TOKENIZATION_LIMIT = 20 * 1024 * 1024; // 20 MB public static DEFAULT_CREATION_OPTIONS: editorCommon.ITextModelCreationOptions = { - tabSize: DEFAULT_INDENTATION.tabSize, - insertSpaces: DEFAULT_INDENTATION.insertSpaces, + tabSize: EDITOR_MODEL_DEFAULTS.tabSize, + insertSpaces: EDITOR_MODEL_DEFAULTS.insertSpaces, detectIndentation: false, defaultEOL: editorCommon.DefaultEndOfLine.LF, - trimAutoWhitespace: DEFAULT_TRIM_AUTO_WHITESPACE, + trimAutoWhitespace: EDITOR_MODEL_DEFAULTS.trimAutoWhitespace, }; public static createFromString(text: string, options: editorCommon.ITextModelCreationOptions = TextModel.DEFAULT_CREATION_OPTIONS): TextModel { diff --git a/src/vs/editor/common/services/modelServiceImpl.ts b/src/vs/editor/common/services/modelServiceImpl.ts index 9bbb35747dc5b..ad1b9ba8fc6f5 100644 --- a/src/vs/editor/common/services/modelServiceImpl.ts +++ b/src/vs/editor/common/services/modelServiceImpl.ts @@ -21,7 +21,7 @@ import { IMode, LanguageIdentifier } from 'vs/editor/common/modes'; import { IModelService } from 'vs/editor/common/services/modelService'; import * as platform from 'vs/base/common/platform'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { DEFAULT_INDENTATION, DEFAULT_TRIM_AUTO_WHITESPACE } from 'vs/editor/common/config/defaultConfig'; +import { EDITOR_MODEL_DEFAULTS } from "vs/editor/common/config/editorOptions"; import { PLAINTEXT_LANGUAGE_IDENTIFIER } from 'vs/editor/common/modes/modesRegistry'; import { IRawTextSource, TextSource, RawTextSource } from 'vs/editor/common/model/textSource'; import * as textModelEvents from 'vs/editor/common/model/textModelEvents'; @@ -223,7 +223,7 @@ export class ModelServiceImpl implements IModelService { } private static _readModelOptions(config: IRawConfig): editorCommon.ITextModelCreationOptions { - let tabSize = DEFAULT_INDENTATION.tabSize; + let tabSize = EDITOR_MODEL_DEFAULTS.tabSize; if (config.editor && typeof config.editor.tabSize !== 'undefined') { let parsedTabSize = parseInt(config.editor.tabSize, 10); if (!isNaN(parsedTabSize)) { @@ -231,7 +231,7 @@ export class ModelServiceImpl implements IModelService { } } - let insertSpaces = DEFAULT_INDENTATION.insertSpaces; + let insertSpaces = EDITOR_MODEL_DEFAULTS.insertSpaces; if (config.editor && typeof config.editor.insertSpaces !== 'undefined') { insertSpaces = (config.editor.insertSpaces === 'false' ? false : Boolean(config.editor.insertSpaces)); } @@ -244,12 +244,12 @@ export class ModelServiceImpl implements IModelService { newDefaultEOL = editorCommon.DefaultEndOfLine.LF; } - let trimAutoWhitespace = DEFAULT_TRIM_AUTO_WHITESPACE; + let trimAutoWhitespace = EDITOR_MODEL_DEFAULTS.trimAutoWhitespace; if (config.editor && typeof config.editor.trimAutoWhitespace !== 'undefined') { trimAutoWhitespace = (config.editor.trimAutoWhitespace === 'false' ? false : Boolean(config.editor.trimAutoWhitespace)); } - let detectIndentation = DEFAULT_INDENTATION.detectIndentation; + let detectIndentation = EDITOR_MODEL_DEFAULTS.detectIndentation; if (config.editor && typeof config.editor.detectIndentation !== 'undefined') { detectIndentation = (config.editor.detectIndentation === 'false' ? false : Boolean(config.editor.detectIndentation)); } diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index 35a4b56d09691..19d31c7d4053d 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -30,7 +30,6 @@ import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { DefaultConfig } from 'vs/editor/common/config/defaultConfig'; import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { Model } from 'vs/editor/common/model/model'; @@ -591,7 +590,13 @@ export class ReferenceWidget extends PeekViewWidget { var options: IEditorOptions = { scrollBeyondLastLine: false, - scrollbar: DefaultConfig.editor.scrollbar, + scrollbar: { + verticalScrollbarSize: 14, + horizontal: 'auto', + useShadows: true, + verticalHasArrows: false, + horizontalHasArrows: false + }, overviewRulerLanes: 2, fixedOverflowWidgets: true, minimap: { diff --git a/src/vs/editor/contrib/suggest/browser/suggest.ts b/src/vs/editor/contrib/suggest/browser/suggest.ts index 6ca956304cf31..1e79d2e180b03 100644 --- a/src/vs/editor/contrib/suggest/browser/suggest.ts +++ b/src/vs/editor/contrib/suggest/browser/suggest.ts @@ -15,14 +15,14 @@ import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; import { ISuggestResult, ISuggestSupport, ISuggestion, SuggestRegistry } from 'vs/editor/common/modes'; import { Position, IPosition } from 'vs/editor/common/core/position'; import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; -import { DefaultConfig } from 'vs/editor/common/config/defaultConfig'; +import { EDITOR_DEFAULTS } from "vs/editor/common/config/editorOptions"; export const Context = { Visible: new RawContextKey('suggestWidgetVisible', false), MultipleSuggestions: new RawContextKey('suggestWidgetMultipleSuggestions', false), MakesTextEdit: new RawContextKey('suggestionMakesTextEdit', true), AcceptOnKey: new RawContextKey('suggestionSupportsAcceptOnKey', true), - AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', DefaultConfig.editor.acceptSuggestionOnEnter) + AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', EDITOR_DEFAULTS.acceptSuggestionOnEnter) }; export interface ISuggestionItem { diff --git a/src/vs/editor/editor.main.ts b/src/vs/editor/editor.main.ts index a0cf669373aa3..a06d77657e258 100644 --- a/src/vs/editor/editor.main.ts +++ b/src/vs/editor/editor.main.ts @@ -14,12 +14,12 @@ import 'vs/editor/contrib/inspectTokens/browser/inspectTokens'; import { createMonacoBaseAPI } from 'vs/editor/common/standalone/standaloneBase'; import { createMonacoEditorAPI } from 'vs/editor/browser/standalone/standaloneEditor'; import { createMonacoLanguagesAPI } from 'vs/editor/browser/standalone/standaloneLanguages'; -import { DefaultConfig } from 'vs/editor/common/config/defaultConfig'; +import { EDITOR_DEFAULTS, WrappingIndent } from "vs/editor/common/config/editorOptions"; // Set defaults for standalone editor -DefaultConfig.editor.wrappingIndent = 'none'; -DefaultConfig.editor.folding = false; -DefaultConfig.editor.glyphMargin = false; +EDITOR_DEFAULTS.wrappingIndent = WrappingIndent.None; +EDITOR_DEFAULTS.folding = false; +EDITOR_DEFAULTS.glyphMargin = false; var global: any = self; global.monaco = createMonacoBaseAPI(); diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.ts b/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.ts index 9773fc9163ea1..e0bf3b5262935 100644 --- a/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.ts +++ b/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.ts @@ -11,14 +11,13 @@ import { ICommonCodeEditor, IEditorContribution, IModel } from 'vs/editor/common import { editorAction, ServicesAccessor, EditorAction, commonEditorContribution } from 'vs/editor/common/editorCommonExtensions'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { DefaultConfig } from 'vs/editor/common/config/defaultConfig'; import { MenuRegistry, MenuId } from 'vs/platform/actions/common/actions'; import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { Disposable } from 'vs/base/common/lifecycle'; import { IMessageService } from 'vs/platform/message/common/message'; import Severity from 'vs/base/common/severity'; import URI from 'vs/base/common/uri'; -import { InternalEditorOptions } from 'vs/editor/common/config/editorOptions'; +import { InternalEditorOptions, EDITOR_DEFAULTS } from 'vs/editor/common/config/editorOptions'; const transientWordWrapState = 'transientWordWrapState'; const isWordWrapMinifiedKey = 'isWordWrapMinified'; @@ -67,7 +66,7 @@ function readWordWrapState(model: IModel, configurationService: IConfigurationSe const _transientState = readTransientState(model, codeEditorService); return { configuredWordWrap: _configuredWordWrap, - configuredWordWrapMinified: (typeof _configuredWordWrapMinified.value === 'undefined' ? DefaultConfig.editor.wordWrapMinified : _configuredWordWrapMinified.value), + configuredWordWrapMinified: (typeof _configuredWordWrapMinified.value === 'undefined' ? EDITOR_DEFAULTS.wordWrapMinified : _configuredWordWrapMinified.value), transientState: _transientState }; } diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index 88e1f59a9fd30..1e5cae2592b05 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -27,7 +27,7 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import debugActions = require('vs/workbench/parts/debug/browser/debugActions'); import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { OpenNextRecentlyUsedEditorInGroupAction, OpenPreviousRecentlyUsedEditorInGroupAction, FocusActiveGroupAction, FocusFirstGroupAction, FocusSecondGroupAction, FocusThirdGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; -import { DefaultConfig } from 'vs/editor/common/config/defaultConfig'; +import { EDITOR_FONT_DEFAULTS } from "vs/editor/common/config/editorOptions"; import { registerColors } from './terminalColorRegistry'; let configurationRegistry = Registry.as(Extensions.Configuration); @@ -96,7 +96,7 @@ configurationRegistry.registerConfiguration({ 'terminal.integrated.fontSize': { 'description': nls.localize('terminal.integrated.fontSize', "Controls the font size in pixels of the terminal."), 'type': 'number', - 'default': DefaultConfig.editor.fontSize + 'default': EDITOR_FONT_DEFAULTS.fontSize }, 'terminal.integrated.lineHeight': { 'description': nls.localize('terminal.integrated.lineHeight', "Controls the line height of the terminal, this number is multipled by the terminal font size to get the actual line-height in pixels."), diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts index b356edb05eb44..fd87efa9993b0 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts @@ -5,7 +5,7 @@ import * as nls from 'vs/nls'; import * as platform from 'vs/base/common/platform'; -import { IConfiguration as IEditorConfiguration, DefaultConfig } from 'vs/editor/common/config/defaultConfig'; +import { EDITOR_FONT_DEFAULTS, IEditorOptions } from "vs/editor/common/config/editorOptions"; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; import { IChoiceService } from 'vs/platform/message/common/message'; @@ -14,6 +14,10 @@ import { ITerminalConfiguration, ITerminalConfigHelper, ITerminalFont, IShellLau import { Severity } from 'vs/editor/common/standalone/standaloneBase'; import { TPromise } from 'vs/base/common/winjs.base'; +interface IEditorConfiguration { + editor: IEditorOptions; +} + interface IFullTerminalConfiguration { terminal: { integrated: ITerminalConfiguration; @@ -86,7 +90,7 @@ export class TerminalConfigHelper implements ITerminalConfigHelper { const fontFamily = terminalConfig.fontFamily || editorConfig.fontFamily; let fontSize = this._toInteger(terminalConfig.fontSize, 0); if (fontSize <= 0) { - fontSize = DefaultConfig.editor.fontSize; + fontSize = EDITOR_FONT_DEFAULTS.fontSize; } let lineHeight = terminalConfig.lineHeight <= 0 ? DEFAULT_LINE_HEIGHT : terminalConfig.lineHeight; if (!lineHeight) { diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts index 0943c00e0fd0d..285bc9025adb6 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts @@ -10,7 +10,7 @@ import { IConfigurationService, getConfigurationValue } from 'vs/platform/config import { Platform } from 'vs/base/common/platform'; import { TPromise } from 'vs/base/common/winjs.base'; import { TerminalConfigHelper } from 'vs/workbench/parts/terminal/electron-browser/terminalConfigHelper'; -import { DefaultConfig } from 'vs/editor/common/config/defaultConfig'; +import { EDITOR_FONT_DEFAULTS } from "vs/editor/common/config/editorOptions"; class MockConfigurationService implements IConfigurationService { @@ -97,7 +97,7 @@ suite('Workbench - TerminalConfigHelper', () => { }); configHelper = new TerminalConfigHelper(Platform.Linux, configurationService, null, null, null); configHelper.panelContainer = fixture; - assert.equal(configHelper.getFont().fontSize, `${DefaultConfig.editor.fontSize}px`, 'The default editor font size should be used when editor.fontSize is 0 and terminal.integrated.fontSize not set'); + assert.equal(configHelper.getFont().fontSize, `${EDITOR_FONT_DEFAULTS.fontSize}px`, 'The default editor font size should be used when editor.fontSize is 0 and terminal.integrated.fontSize not set'); configurationService = new MockConfigurationService({ editor: { @@ -113,7 +113,7 @@ suite('Workbench - TerminalConfigHelper', () => { }); configHelper = new TerminalConfigHelper(Platform.Linux, configurationService, null, null, null); configHelper.panelContainer = fixture; - assert.equal(configHelper.getFont().fontSize, `${DefaultConfig.editor.fontSize}px`, 'The default editor font size should be used when editor.fontSize is < 0 and terminal.integrated.fontSize not set'); + assert.equal(configHelper.getFont().fontSize, `${EDITOR_FONT_DEFAULTS.fontSize}px`, 'The default editor font size should be used when editor.fontSize is < 0 and terminal.integrated.fontSize not set'); }); test('TerminalConfigHelper - getFont lineHeight', function () { diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 7da8192ba260a..640439add9a22 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -11,7 +11,6 @@ import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import * as strings from 'vs/base/common/strings'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; -import { DefaultConfig } from 'vs/editor/common/config/defaultConfig'; import { $, Dimension, Builder } from 'vs/base/browser/builder'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { EditorOptions } from 'vs/workbench/common/editor'; @@ -418,7 +417,13 @@ export class WalkThroughPart extends BaseEditor { return { ...isObject(config) ? config : Object.create(null), scrollBeyondLastLine: false, - scrollbar: DefaultConfig.editor.scrollbar, + scrollbar: { + verticalScrollbarSize: 14, + horizontal: 'auto', + useShadows: true, + verticalHasArrows: false, + horizontalHasArrows: false + }, overviewRulerLanes: 3, fixedOverflowWidgets: true, lineNumbersMinChars: 1, From 76b16244653800d5f961b646265ea8baca1c6cc8 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 8 May 2017 18:30:44 +0200 Subject: [PATCH 0280/2747] Simplify IConfigurationChangedEvent --- .../browser/controller/textAreaHandler.ts | 6 +- src/vs/editor/browser/view/viewImpl.ts | 2 +- .../currentLineHighlight.ts | 2 +- .../currentLineMarginHighlight.ts | 2 +- .../editorScrollbar/editorScrollbar.ts | 2 +- .../viewParts/glyphMargin/glyphMargin.ts | 2 +- .../viewParts/indentGuides/indentGuides.ts | 2 +- .../viewParts/lineNumbers/lineNumbers.ts | 4 +- .../browser/viewParts/lines/viewLines.ts | 4 +- .../editor/browser/viewParts/margin/margin.ts | 2 +- .../overviewRuler/decorationsOverviewRuler.ts | 35 +-- .../viewParts/overviewRuler/overviewRuler.ts | 6 +- .../editor/browser/viewParts/rulers/rulers.ts | 2 +- .../scrollDecoration/scrollDecoration.ts | 2 +- .../viewParts/selections/selections.ts | 2 +- .../viewParts/viewCursors/viewCursor.ts | 2 +- .../viewParts/viewCursors/viewCursors.ts | 6 +- src/vs/editor/common/config/editorOptions.ts | 226 ++++++------------ src/vs/editor/common/view/viewEvents.ts | 4 +- src/vs/monaco.d.ts | 40 +--- 20 files changed, 105 insertions(+), 248 deletions(-) diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index b438d95510a92..f7b6e2e4415b2 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -266,18 +266,16 @@ export class TextAreaHandler extends ViewPart { if (e.fontInfo) { this._fontInfo = this._context.configuration.editor.fontInfo; } - if (e.viewInfo.experimentalScreenReader) { + if (e.viewInfo) { this._experimentalScreenReader = this._context.configuration.editor.viewInfo.experimentalScreenReader; this._textAreaInput.writeScreenReaderContent('strategy changed'); + this.textArea.setAttribute('aria-label', this._context.configuration.editor.viewInfo.ariaLabel); } if (e.layoutInfo) { this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; this._contentHeight = this._context.configuration.editor.layoutInfo.contentHeight; } - if (e.viewInfo.ariaLabel) { - this.textArea.setAttribute('aria-label', this._context.configuration.editor.viewInfo.ariaLabel); - } if (e.lineHeight) { this._lineHeight = this._context.configuration.editor.lineHeight; } diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index a9a2d8f5491b2..80c203d0b562c 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -340,7 +340,7 @@ export class View extends ViewEventHandler { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - if (e.viewInfo.editorClassName) { + if (e.viewInfo) { this.domNode.setClassName(this._context.configuration.editor.viewInfo.editorClassName); } if (e.layoutInfo) { diff --git a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts index 2aac9fc555736..a8b35d09f2561 100644 --- a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts +++ b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts @@ -55,7 +55,7 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay { if (e.readOnly) { this._readOnly = this._context.configuration.editor.readOnly; } - if (e.viewInfo.renderLineHighlight) { + if (e.viewInfo) { this._renderLineHighlight = this._context.configuration.editor.viewInfo.renderLineHighlight; } if (e.layoutInfo) { diff --git a/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts b/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts index 1ceb0914cc8ef..5fdec71c20768 100644 --- a/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts +++ b/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts @@ -46,7 +46,7 @@ export class CurrentLineMarginHighlightOverlay extends DynamicViewOverlay { if (e.lineHeight) { this._lineHeight = this._context.configuration.editor.lineHeight; } - if (e.viewInfo.renderLineHighlight) { + if (e.viewInfo) { this._renderLineHighlight = this._context.configuration.editor.viewInfo.renderLineHighlight; } if (e.layoutInfo) { diff --git a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts index dce83c0f62ef6..b76d950d393d5 100644 --- a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts +++ b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts @@ -129,7 +129,7 @@ export class EditorScrollbar extends ViewPart { const viewInfo = this._context.configuration.editor.viewInfo; this.scrollbar.updateClassName('editor-scrollable' + ' ' + viewInfo.theme); - if (e.viewInfo.scrollbar || e.viewInfo.canUseTranslate3d) { + if (e.viewInfo) { let newOpts: ScrollableElementChangeOptions = { canUseTranslate3d: viewInfo.canUseTranslate3d, handleMouseWheel: viewInfo.scrollbar.handleMouseWheel, diff --git a/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts b/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts index 0e37f17d7a7f9..b92c9d0e559e5 100644 --- a/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts +++ b/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts @@ -110,7 +110,7 @@ export class GlyphMarginOverlay extends DedupOverlay { if (e.lineHeight) { this._lineHeight = this._context.configuration.editor.lineHeight; } - if (e.viewInfo.glyphMargin) { + if (e.viewInfo) { this._glyphMargin = this._context.configuration.editor.viewInfo.glyphMargin; } if (e.layoutInfo) { diff --git a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts index 1a68db3646131..7c9aa363e3817 100644 --- a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts +++ b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts @@ -48,7 +48,7 @@ export class IndentGuidesOverlay extends DynamicViewOverlay { if (e.fontInfo) { this._spaceWidth = this._context.configuration.editor.fontInfo.spaceWidth; } - if (e.viewInfo.renderIndentGuides) { + if (e.viewInfo) { this._enabled = this._context.configuration.editor.viewInfo.renderIndentGuides; } return true; diff --git a/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts b/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts index 673bdb0c4216d..c1a0c97a1da92 100644 --- a/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts +++ b/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts @@ -51,10 +51,8 @@ export class LineNumbersOverlay extends DynamicViewOverlay { if (e.lineHeight) { this._lineHeight = this._context.configuration.editor.lineHeight; } - if (e.viewInfo.renderLineNumbers) { + if (e.viewInfo) { this._renderLineNumbers = this._context.configuration.editor.viewInfo.renderLineNumbers; - } - if (e.viewInfo.renderRelativeLineNumbers) { this._renderRelativeLineNumbers = this._context.configuration.editor.viewInfo.renderRelativeLineNumbers; } if (e.layoutInfo) { diff --git a/src/vs/editor/browser/viewParts/lines/viewLines.ts b/src/vs/editor/browser/viewParts/lines/viewLines.ts index a5fdd8b254a83..8be984ff5bf73 100644 --- a/src/vs/editor/browser/viewParts/lines/viewLines.ts +++ b/src/vs/editor/browser/viewParts/lines/viewLines.ts @@ -127,10 +127,8 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, if (e.wrappingInfo) { this._isViewportWrapping = this._context.configuration.editor.wrappingInfo.isViewportWrapping; } - if (e.viewInfo.revealHorizontalRightPadding) { + if (e.viewInfo) { this._revealHorizontalRightPadding = this._context.configuration.editor.viewInfo.revealHorizontalRightPadding; - } - if (e.viewInfo.canUseTranslate3d) { this._canUseTranslate3d = this._context.configuration.editor.viewInfo.canUseTranslate3d; } if (e.fontInfo) { diff --git a/src/vs/editor/browser/viewParts/margin/margin.ts b/src/vs/editor/browser/viewParts/margin/margin.ts index fb3de087cbfa2..8cd64bbb32098 100644 --- a/src/vs/editor/browser/viewParts/margin/margin.ts +++ b/src/vs/editor/browser/viewParts/margin/margin.ts @@ -57,7 +57,7 @@ export class Margin extends ViewPart { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - if (e.viewInfo.canUseTranslate3d) { + if (e.viewInfo) { this._canUseTranslate3d = this._context.configuration.editor.viewInfo.canUseTranslate3d; } diff --git a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts index 37eaae0f2b74a..e73de14db1cfe 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts @@ -104,51 +104,28 @@ export class DecorationsOverviewRuler extends ViewPart { let prevLanesCount = this._overviewRuler.getLanesCount(); let newLanesCount = this._context.configuration.editor.viewInfo.overviewRulerLanes; - let shouldRender = false; + if (prevLanesCount !== newLanesCount) { + this._overviewRuler.setLanesCount(newLanesCount, false); + } if (e.lineHeight) { this._overviewRuler.setLineHeight(this._context.configuration.editor.lineHeight, false); - shouldRender = true; } - if (e.viewInfo.canUseTranslate3d) { + if (e.viewInfo) { this._overviewRuler.setCanUseTranslate3d(this._context.configuration.editor.viewInfo.canUseTranslate3d, false); - shouldRender = true; - } - - if (prevLanesCount !== newLanesCount) { - this._overviewRuler.setLanesCount(newLanesCount, false); - shouldRender = true; - } - - if (e.viewInfo.overviewRulerBorder) { this._renderBorder = this._context.configuration.editor.viewInfo.overviewRulerBorder; - shouldRender = true; - } - - if (e.viewInfo.hideCursorInOverviewRuler) { this._hideCursor = this._context.configuration.editor.viewInfo.hideCursorInOverviewRuler; this._shouldUpdateCursorPosition = true; - shouldRender = true; - } - - if (e.viewInfo.theme) { - let theme = this._context.configuration.editor.viewInfo.theme; - this._overviewRuler.setThemeType(getThemeType(theme), false); - shouldRender = true; - } - - if (e.viewInfo.minimap) { + this._overviewRuler.setThemeType(getThemeType(this._context.configuration.editor.viewInfo.theme), false); this._updateBackground(false); - shouldRender = true; } if (e.layoutInfo) { this._overviewRuler.setLayout(this._context.configuration.editor.layoutInfo.overviewRuler, false); - shouldRender = true; } - return shouldRender; + return true; } public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts index b3d8613c2d3e9..18d7c1f49b64e 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts @@ -37,15 +37,13 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { if (e.lineHeight) { this._overviewRuler.setLineHeight(this._context.configuration.editor.lineHeight, true); - return true; } - if (e.viewInfo.canUseTranslate3d) { + if (e.viewInfo) { this._overviewRuler.setCanUseTranslate3d(this._context.configuration.editor.viewInfo.canUseTranslate3d, true); - return true; } - return false; + return true; } public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { diff --git a/src/vs/editor/browser/viewParts/rulers/rulers.ts b/src/vs/editor/browser/viewParts/rulers/rulers.ts index 9479cc74bdbc4..0c4837e7c8437 100644 --- a/src/vs/editor/browser/viewParts/rulers/rulers.ts +++ b/src/vs/editor/browser/viewParts/rulers/rulers.ts @@ -37,7 +37,7 @@ export class Rulers extends ViewPart { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - if (e.viewInfo.rulers || e.layoutInfo || e.fontInfo) { + if (e.viewInfo || e.layoutInfo || e.fontInfo) { this._rulers = this._context.configuration.editor.viewInfo.rulers; this._height = this._context.configuration.editor.layoutInfo.contentHeight; this._typicalHalfwidthCharacterWidth = this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth; diff --git a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts index b0dd4ccee28fc..3c015c2fabb75 100644 --- a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts +++ b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts @@ -62,7 +62,7 @@ export class ScrollDecorationViewPart extends ViewPart { public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { let shouldRender = false; - if (e.viewInfo.scrollbar) { + if (e.viewInfo) { this._useShadows = this._context.configuration.editor.viewInfo.scrollbar.useShadows; } if (e.layoutInfo) { diff --git a/src/vs/editor/browser/viewParts/selections/selections.ts b/src/vs/editor/browser/viewParts/selections/selections.ts index fc8ac41ed927c..c517172658d43 100644 --- a/src/vs/editor/browser/viewParts/selections/selections.ts +++ b/src/vs/editor/browser/viewParts/selections/selections.ts @@ -105,7 +105,7 @@ export class SelectionsOverlay extends DynamicViewOverlay { if (e.lineHeight) { this._lineHeight = this._context.configuration.editor.lineHeight; } - if (e.viewInfo.roundedSelection) { + if (e.viewInfo) { this._roundedSelection = this._context.configuration.editor.viewInfo.roundedSelection; } return true; diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts index b89689b8a8afd..5efeefa3c28ac 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts @@ -114,7 +114,7 @@ export class ViewCursor { if (e.lineHeight) { this._lineHeight = this._context.configuration.editor.lineHeight; } - if (e.viewInfo.cursorStyle) { + if (e.viewInfo) { this._cursorStyle = this._context.configuration.editor.viewInfo.cursorStyle; } if (e.fontInfo) { diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts index 7d8185da71cba..8220415f4f737 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts @@ -84,16 +84,14 @@ export class ViewCursors extends ViewPart { if (e.readOnly) { this._readOnly = this._context.configuration.editor.readOnly; } - if (e.viewInfo.cursorBlinking) { + if (e.viewInfo) { this._cursorBlinking = this._context.configuration.editor.viewInfo.cursorBlinking; - } - if (e.viewInfo.cursorStyle) { this._cursorStyle = this._context.configuration.editor.viewInfo.cursorStyle; } this._primaryCursor.onConfigurationChanged(e); this._updateBlinking(); - if (e.viewInfo.cursorStyle || e.viewInfo.cursorBlinking) { + if (e.viewInfo) { this._updateDomClassName(); } for (let i = 0, len = this._secondaryCursors.length; i < len; i++) { diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index cd983f9dcf4e0..474696dfffb58 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -95,8 +95,6 @@ export interface IEditorMinimapOptions { maxColumn?: number; } -export type LineNumbersOption = 'on' | 'off' | 'relative' | ((lineNumber: number) => string); - /** * Configuration options for the editor. */ @@ -137,7 +135,7 @@ export interface IEditorOptions { * Otherwise, line numbers will not be rendered. * Defaults to true. */ - lineNumbers?: LineNumbersOption; + lineNumbers?: 'on' | 'off' | 'relative' | ((lineNumber: number) => string); /** * Should the corresponding line be selected when clicking on the line number? * Defaults to true. @@ -613,6 +611,26 @@ export function cursorStyleToString(cursorStyle: TextEditorCursorStyle): string } } +function _cursorStyleFromString(cursorStyle: string, defaultValue: TextEditorCursorStyle): TextEditorCursorStyle { + if (typeof cursorStyle !== 'string') { + return defaultValue; + } + if (cursorStyle === 'line') { + return TextEditorCursorStyle.Line; + } else if (cursorStyle === 'block') { + return TextEditorCursorStyle.Block; + } else if (cursorStyle === 'underline') { + return TextEditorCursorStyle.Underline; + } else if (cursorStyle === 'line-thin') { + return TextEditorCursorStyle.LineThin; + } else if (cursorStyle === 'block-outline') { + return TextEditorCursorStyle.BlockOutline; + } else if (cursorStyle === 'underline-thin') { + return TextEditorCursorStyle.UnderlineThin; + } + return TextEditorCursorStyle.Line; +} + export class InternalEditorScrollbarOptions { readonly _internalEditorScrollbarOptionsBrand: void; @@ -770,7 +788,6 @@ export class EditorWrappingInfo { } export class InternalEditorViewOptions { - readonly _internalEditorViewOptionsBrand: void; readonly theme: string; readonly canUseTranslate3d: boolean; @@ -901,78 +918,40 @@ export class InternalEditorViewOptions { /** * @internal */ - public equals(other: InternalEditorViewOptions): boolean { + public static equals(a: InternalEditorViewOptions, b: InternalEditorViewOptions): boolean { return ( - this.theme === other.theme - && this.canUseTranslate3d === other.canUseTranslate3d - && this.disableMonospaceOptimizations === other.disableMonospaceOptimizations - && this.experimentalScreenReader === other.experimentalScreenReader - && InternalEditorViewOptions._numberArraysEqual(this.rulers, other.rulers) - && this.ariaLabel === other.ariaLabel - && this.renderLineNumbers === other.renderLineNumbers - && this.renderCustomLineNumbers === other.renderCustomLineNumbers - && this.renderRelativeLineNumbers === other.renderRelativeLineNumbers - && this.selectOnLineNumbers === other.selectOnLineNumbers - && this.glyphMargin === other.glyphMargin - && this.revealHorizontalRightPadding === other.revealHorizontalRightPadding - && this.roundedSelection === other.roundedSelection - && this.overviewRulerLanes === other.overviewRulerLanes - && this.overviewRulerBorder === other.overviewRulerBorder - && this.cursorBlinking === other.cursorBlinking - && this.mouseWheelZoom === other.mouseWheelZoom - && this.cursorStyle === other.cursorStyle - && this.hideCursorInOverviewRuler === other.hideCursorInOverviewRuler - && this.scrollBeyondLastLine === other.scrollBeyondLastLine - && this.editorClassName === other.editorClassName - && this.stopRenderingLineAfter === other.stopRenderingLineAfter - && this.renderWhitespace === other.renderWhitespace - && this.renderControlCharacters === other.renderControlCharacters - && this.fontLigatures === other.fontLigatures - && this.renderIndentGuides === other.renderIndentGuides - && this.renderLineHighlight === other.renderLineHighlight - && this.scrollbar.equals(other.scrollbar) - && this.minimap.equals(other.minimap) - && this.fixedOverflowWidgets === other.fixedOverflowWidgets + a.theme === b.theme + && a.canUseTranslate3d === b.canUseTranslate3d + && a.disableMonospaceOptimizations === b.disableMonospaceOptimizations + && a.experimentalScreenReader === b.experimentalScreenReader + && InternalEditorViewOptions._numberArraysEqual(a.rulers, b.rulers) + && a.ariaLabel === b.ariaLabel + && a.renderLineNumbers === b.renderLineNumbers + && a.renderCustomLineNumbers === b.renderCustomLineNumbers + && a.renderRelativeLineNumbers === b.renderRelativeLineNumbers + && a.selectOnLineNumbers === b.selectOnLineNumbers + && a.glyphMargin === b.glyphMargin + && a.revealHorizontalRightPadding === b.revealHorizontalRightPadding + && a.roundedSelection === b.roundedSelection + && a.overviewRulerLanes === b.overviewRulerLanes + && a.overviewRulerBorder === b.overviewRulerBorder + && a.cursorBlinking === b.cursorBlinking + && a.mouseWheelZoom === b.mouseWheelZoom + && a.cursorStyle === b.cursorStyle + && a.hideCursorInOverviewRuler === b.hideCursorInOverviewRuler + && a.scrollBeyondLastLine === b.scrollBeyondLastLine + && a.editorClassName === b.editorClassName + && a.stopRenderingLineAfter === b.stopRenderingLineAfter + && a.renderWhitespace === b.renderWhitespace + && a.renderControlCharacters === b.renderControlCharacters + && a.fontLigatures === b.fontLigatures + && a.renderIndentGuides === b.renderIndentGuides + && a.renderLineHighlight === b.renderLineHighlight + && a.scrollbar.equals(b.scrollbar) + && a.minimap.equals(b.minimap) + && a.fixedOverflowWidgets === b.fixedOverflowWidgets ); } - - /** - * @internal - */ - public createChangeEvent(newOpts: InternalEditorViewOptions): IViewConfigurationChangedEvent { - return { - theme: this.theme !== newOpts.theme, - canUseTranslate3d: this.canUseTranslate3d !== newOpts.canUseTranslate3d, - disableMonospaceOptimizations: this.disableMonospaceOptimizations !== newOpts.disableMonospaceOptimizations, - experimentalScreenReader: this.experimentalScreenReader !== newOpts.experimentalScreenReader, - rulers: (!InternalEditorViewOptions._numberArraysEqual(this.rulers, newOpts.rulers)), - ariaLabel: this.ariaLabel !== newOpts.ariaLabel, - renderLineNumbers: this.renderLineNumbers !== newOpts.renderLineNumbers, - renderCustomLineNumbers: this.renderCustomLineNumbers !== newOpts.renderCustomLineNumbers, - renderRelativeLineNumbers: this.renderRelativeLineNumbers !== newOpts.renderRelativeLineNumbers, - selectOnLineNumbers: this.selectOnLineNumbers !== newOpts.selectOnLineNumbers, - glyphMargin: this.glyphMargin !== newOpts.glyphMargin, - revealHorizontalRightPadding: this.revealHorizontalRightPadding !== newOpts.revealHorizontalRightPadding, - roundedSelection: this.roundedSelection !== newOpts.roundedSelection, - overviewRulerLanes: this.overviewRulerLanes !== newOpts.overviewRulerLanes, - overviewRulerBorder: this.overviewRulerBorder !== newOpts.overviewRulerBorder, - cursorBlinking: this.cursorBlinking !== newOpts.cursorBlinking, - mouseWheelZoom: this.mouseWheelZoom !== newOpts.mouseWheelZoom, - cursorStyle: this.cursorStyle !== newOpts.cursorStyle, - hideCursorInOverviewRuler: this.hideCursorInOverviewRuler !== newOpts.hideCursorInOverviewRuler, - scrollBeyondLastLine: this.scrollBeyondLastLine !== newOpts.scrollBeyondLastLine, - editorClassName: this.editorClassName !== newOpts.editorClassName, - stopRenderingLineAfter: this.stopRenderingLineAfter !== newOpts.stopRenderingLineAfter, - renderWhitespace: this.renderWhitespace !== newOpts.renderWhitespace, - renderControlCharacters: this.renderControlCharacters !== newOpts.renderControlCharacters, - fontLigatures: this.fontLigatures !== newOpts.fontLigatures, - renderIndentGuides: this.renderIndentGuides !== newOpts.renderIndentGuides, - renderLineHighlight: this.renderLineHighlight !== newOpts.renderLineHighlight, - scrollbar: (!this.scrollbar.equals(newOpts.scrollbar)), - minimap: (!this.minimap.equals(newOpts.minimap)), - fixedOverflowWidgets: this.fixedOverflowWidgets !== newOpts.fixedOverflowWidgets - }; - } } export class EditorContribOptions { @@ -1108,7 +1087,7 @@ export class EditorContribOptions { export class InternalEditorOptions { readonly _internalEditorOptionsBrand: void; - readonly lineHeight: number; // todo: move to fontInfo + readonly lineHeight: number; readonly readOnly: boolean; // ---- cursor options @@ -1169,7 +1148,7 @@ export class InternalEditorOptions { && this.dragAndDrop === other.dragAndDrop && this.layoutInfo.equals(other.layoutInfo) && this.fontInfo.equals(other.fontInfo) - && this.viewInfo.equals(other.viewInfo) + && InternalEditorViewOptions.equals(this.viewInfo, other.viewInfo) && this.wrappingInfo.equals(other.wrappingInfo) && this.contribInfo.equals(other.contribInfo) ); @@ -1189,7 +1168,7 @@ export class InternalEditorOptions { dragAndDrop: (this.dragAndDrop !== newOpts.dragAndDrop), layoutInfo: (!this.layoutInfo.equals(newOpts.layoutInfo)), fontInfo: (!this.fontInfo.equals(newOpts.fontInfo)), - viewInfo: this.viewInfo.createChangeEvent(newOpts.viewInfo), + viewInfo: (!InternalEditorViewOptions.equals(this.viewInfo, newOpts.viewInfo)), wrappingInfo: (!this.wrappingInfo.equals(newOpts.wrappingInfo)), contribInfo: (!this.contribInfo.equals(newOpts.contribInfo)), }; @@ -1419,39 +1398,6 @@ export class EditorLayoutInfo { } } -export interface IViewConfigurationChangedEvent { - readonly theme: boolean; - readonly canUseTranslate3d: boolean; - readonly disableMonospaceOptimizations: boolean; - readonly experimentalScreenReader: boolean; - readonly rulers: boolean; - readonly ariaLabel: boolean; - readonly renderLineNumbers: boolean; - readonly renderCustomLineNumbers: boolean; - readonly renderRelativeLineNumbers: boolean; - readonly selectOnLineNumbers: boolean; - readonly glyphMargin: boolean; - readonly revealHorizontalRightPadding: boolean; - readonly roundedSelection: boolean; - readonly overviewRulerLanes: boolean; - readonly overviewRulerBorder: boolean; - readonly cursorBlinking: boolean; - readonly mouseWheelZoom: boolean; - readonly cursorStyle: boolean; - readonly hideCursorInOverviewRuler: boolean; - readonly scrollBeyondLastLine: boolean; - readonly editorClassName: boolean; - readonly stopRenderingLineAfter: boolean; - readonly renderWhitespace: boolean; - readonly renderControlCharacters: boolean; - readonly fontLigatures: boolean; - readonly renderIndentGuides: boolean; - readonly renderLineHighlight: boolean; - readonly scrollbar: boolean; - readonly minimap: boolean; - readonly fixedOverflowWidgets: boolean; -} - /** * An event describing that the configuration of the editor has changed. */ @@ -1465,7 +1411,7 @@ export interface IConfigurationChangedEvent { readonly dragAndDrop: boolean; readonly layoutInfo: boolean; readonly fontInfo: boolean; - readonly viewInfo: IViewConfigurationChangedEvent; + readonly viewInfo: boolean; readonly wrappingInfo: boolean; readonly contribInfo: boolean; } @@ -1603,7 +1549,6 @@ export interface IValidatedEditorOptions { selectionHighlight: boolean; occurrencesHighlight: boolean; codeLens: boolean; - referenceInfos: boolean; folding: boolean; hideFoldIcons: boolean; matchBrackets: boolean; @@ -1678,26 +1623,6 @@ function _wrappingIndentFromString(wrappingIndent: string, defaultValue: Wrappin } } -function _cursorStyleFromString(cursorStyle: string, defaultValue: TextEditorCursorStyle): TextEditorCursorStyle { - if (typeof cursorStyle !== 'string') { - return defaultValue; - } - if (cursorStyle === 'line') { - return TextEditorCursorStyle.Line; - } else if (cursorStyle === 'block') { - return TextEditorCursorStyle.Block; - } else if (cursorStyle === 'underline') { - return TextEditorCursorStyle.Underline; - } else if (cursorStyle === 'line-thin') { - return TextEditorCursorStyle.LineThin; - } else if (cursorStyle === 'block-outline') { - return TextEditorCursorStyle.BlockOutline; - } else if (cursorStyle === 'underline-thin') { - return TextEditorCursorStyle.UnderlineThin; - } - return TextEditorCursorStyle.Line; -} - function _cursorBlinkingStyleFromString(cursorBlinkingStyle: string, defaultValue: TextEditorCursorBlinkingStyle): TextEditorCursorBlinkingStyle { if (typeof cursorBlinkingStyle !== 'string') { return defaultValue; @@ -1828,6 +1753,9 @@ export class EditorOptionsValidator { quickSuggestions = _boolean(opts.quickSuggestions, defaults.quickSuggestions); } + const fontLigatures = _boolean(opts.fontLigatures, defaults.fontLigatures); + const disableTranslate3d = _boolean(opts.disableTranslate3d, defaults.disableTranslate3d) || fontLigatures; + return { inDiffEditor: _boolean(opts.inDiffEditor, defaults.inDiffEditor), experimentalScreenReader: _boolean(opts.experimentalScreenReader, defaults.experimentalScreenReader), @@ -1855,8 +1783,8 @@ export class EditorOptionsValidator { mouseWheelZoom: _boolean(opts.mouseWheelZoom, defaults.mouseWheelZoom), mouseStyle: _stringSet<'text' | 'default' | 'copy'>(opts.mouseStyle, defaults.mouseStyle, ['text', 'default', 'copy']), cursorStyle: _cursorStyleFromString(opts.cursorStyle, defaults.cursorStyle), - fontLigatures: _boolean(opts.fontLigatures, defaults.fontLigatures), - disableTranslate3d: _boolean(opts.disableTranslate3d, defaults.disableTranslate3d), + fontLigatures: fontLigatures, + disableTranslate3d: disableTranslate3d, disableMonospaceOptimizations: _boolean(opts.disableMonospaceOptimizations, defaults.disableMonospaceOptimizations), hideCursorInOverviewRuler: _boolean(opts.hideCursorInOverviewRuler, defaults.hideCursorInOverviewRuler), scrollBeyondLastLine: _boolean(opts.scrollBeyondLastLine, defaults.scrollBeyondLastLine), @@ -1890,8 +1818,7 @@ export class EditorOptionsValidator { suggestLineHeight: _clampedInt(opts.suggestLineHeight, defaults.suggestLineHeight, 0, 1000), selectionHighlight: _boolean(opts.selectionHighlight, defaults.selectionHighlight), occurrencesHighlight: _boolean(opts.occurrencesHighlight, defaults.occurrencesHighlight), - codeLens: _boolean(opts.codeLens, defaults.codeLens), - referenceInfos: _boolean(opts.referenceInfos, defaults.referenceInfos), + codeLens: _boolean(opts.codeLens, defaults.codeLens) && _boolean(opts.referenceInfos, true), folding: _boolean(opts.folding, defaults.folding), hideFoldIcons: _boolean(opts.hideFoldIcons, defaults.hideFoldIcons), matchBrackets: _boolean(opts.matchBrackets, defaults.matchBrackets), @@ -2034,8 +1961,8 @@ export class InternalEditorOptionsFactory { const viewInfo = new InternalEditorViewOptions({ theme: opts.theme, - canUseTranslate3d: opts.disableTranslate3d ? false : env.canUseTranslate3d, - disableMonospaceOptimizations: (opts.disableMonospaceOptimizations || opts.fontLigatures), + canUseTranslate3d: opts.disableTranslate3d ? false : env.canUseTranslate3d, // todo + disableMonospaceOptimizations: opts.disableMonospaceOptimizations, experimentalScreenReader: opts.experimentalScreenReader, rulers: opts.rulers, ariaLabel: opts.ariaLabel, @@ -2060,7 +1987,7 @@ export class InternalEditorOptionsFactory { fontLigatures: opts.fontLigatures, renderIndentGuides: opts.renderIndentGuides, renderLineHighlight: opts.renderLineHighlight, - scrollbar: new InternalEditorScrollbarOptions({ + scrollbar: new InternalEditorScrollbarOptions({ // todo vertical: opts.scrollbar.vertical, horizontal: opts.scrollbar.horizontal, @@ -2079,7 +2006,7 @@ export class InternalEditorOptionsFactory { handleMouseWheel: opts.scrollbar.handleMouseWheel, mouseWheelScrollSensitivity: opts.mouseWheelScrollSensitivity }), - minimap: new InternalEditorMinimapOptions({ + minimap: new InternalEditorMinimapOptions({ // todo enabled: opts.minimap.enabled, renderCharacters: opts.minimap.renderCharacters, maxColumn: opts.minimap.maxColumn, @@ -2107,14 +2034,14 @@ export class InternalEditorOptionsFactory { suggestLineHeight: opts.suggestLineHeight, selectionHighlight: opts.selectionHighlight, occurrencesHighlight: opts.occurrencesHighlight, - codeLens: opts.referenceInfos && opts.codeLens, + codeLens: opts.codeLens, folding: opts.folding, hideFoldIcons: opts.hideFoldIcons, matchBrackets: opts.matchBrackets, }); return new InternalEditorOptions({ - lineHeight: env.fontInfo.lineHeight, // todo -> duplicated in styling + lineHeight: env.fontInfo.lineHeight, readOnly: opts.readOnly, wordSeparators: opts.wordSeparators, autoClosingBrackets: opts.autoClosingBrackets, @@ -2167,22 +2094,22 @@ export class EditorLayoutProvider { public static compute(_opts: IEditorLayoutProviderOpts): EditorLayoutInfo { const outerWidth = _opts.outerWidth | 0; const outerHeight = _opts.outerHeight | 0; - const showGlyphMargin = Boolean(_opts.showGlyphMargin); + const showGlyphMargin = _opts.showGlyphMargin; const lineHeight = _opts.lineHeight | 0; - const showLineNumbers = Boolean(_opts.showLineNumbers); + const showLineNumbers = _opts.showLineNumbers; const lineNumbersMinChars = _opts.lineNumbersMinChars | 0; const lineNumbersDigitCount = _opts.lineNumbersDigitCount | 0; const lineDecorationsWidth = _opts.lineDecorationsWidth | 0; - const typicalHalfwidthCharacterWidth = Number(_opts.typicalHalfwidthCharacterWidth); - const maxDigitWidth = Number(_opts.maxDigitWidth); + const typicalHalfwidthCharacterWidth = _opts.typicalHalfwidthCharacterWidth; + const maxDigitWidth = _opts.maxDigitWidth; const verticalScrollbarWidth = _opts.verticalScrollbarWidth | 0; - const verticalScrollbarHasArrows = Boolean(_opts.verticalScrollbarHasArrows); + const verticalScrollbarHasArrows = _opts.verticalScrollbarHasArrows; const scrollbarArrowSize = _opts.scrollbarArrowSize | 0; const horizontalScrollbarHeight = _opts.horizontalScrollbarHeight | 0; - const minimap = Boolean(_opts.minimap); - const minimapRenderCharacters = Boolean(_opts.minimapRenderCharacters); + const minimap = _opts.minimap; + const minimapRenderCharacters = _opts.minimapRenderCharacters; const minimapMaxColumn = _opts.minimapMaxColumn | 0; - const pixelRatio = Number(_opts.pixelRatio); + const pixelRatio = _opts.pixelRatio; let lineNumbersWidth = 0; if (showLineNumbers) { @@ -2391,7 +2318,6 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { selectionHighlight: true, occurrencesHighlight: true, codeLens: true, - referenceInfos: true, folding: true, hideFoldIcons: true, matchBrackets: true, diff --git a/src/vs/editor/common/view/viewEvents.ts b/src/vs/editor/common/view/viewEvents.ts index 3bb4059a38e16..1500d49c191cb 100644 --- a/src/vs/editor/common/view/viewEvents.ts +++ b/src/vs/editor/common/view/viewEvents.ts @@ -8,7 +8,7 @@ import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { ScrollEvent } from 'vs/base/common/scrollable'; -import { IViewConfigurationChangedEvent, IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; +import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; export const enum ViewEventType { @@ -38,7 +38,7 @@ export class ViewConfigurationChangedEvent { public readonly readOnly: boolean; public readonly layoutInfo: boolean; public readonly fontInfo: boolean; - public readonly viewInfo: IViewConfigurationChangedEvent; + public readonly viewInfo: boolean; public readonly wrappingInfo: boolean; constructor(source: IConfigurationChangedEvent) { diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index e26814d708c9c..69604f4fa6030 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2640,8 +2640,6 @@ declare module monaco.editor { maxColumn?: number; } - export type LineNumbersOption = 'on' | 'off' | 'relative' | ((lineNumber: number) => string); - /** * Configuration options for the editor. */ @@ -2677,7 +2675,7 @@ declare module monaco.editor { * Otherwise, line numbers will not be rendered. * Defaults to true. */ - lineNumbers?: LineNumbersOption; + lineNumbers?: 'on' | 'off' | 'relative' | ((lineNumber: number) => string); /** * Should the corresponding line be selected when clicking on the line number? * Defaults to true. @@ -3161,7 +3159,6 @@ declare module monaco.editor { } export class InternalEditorViewOptions { - readonly _internalEditorViewOptionsBrand: void; readonly theme: string; readonly canUseTranslate3d: boolean; readonly disableMonospaceOptimizations: boolean; @@ -3353,39 +3350,6 @@ declare module monaco.editor { readonly overviewRuler: OverviewRulerPosition; } - export interface IViewConfigurationChangedEvent { - readonly theme: boolean; - readonly canUseTranslate3d: boolean; - readonly disableMonospaceOptimizations: boolean; - readonly experimentalScreenReader: boolean; - readonly rulers: boolean; - readonly ariaLabel: boolean; - readonly renderLineNumbers: boolean; - readonly renderCustomLineNumbers: boolean; - readonly renderRelativeLineNumbers: boolean; - readonly selectOnLineNumbers: boolean; - readonly glyphMargin: boolean; - readonly revealHorizontalRightPadding: boolean; - readonly roundedSelection: boolean; - readonly overviewRulerLanes: boolean; - readonly overviewRulerBorder: boolean; - readonly cursorBlinking: boolean; - readonly mouseWheelZoom: boolean; - readonly cursorStyle: boolean; - readonly hideCursorInOverviewRuler: boolean; - readonly scrollBeyondLastLine: boolean; - readonly editorClassName: boolean; - readonly stopRenderingLineAfter: boolean; - readonly renderWhitespace: boolean; - readonly renderControlCharacters: boolean; - readonly fontLigatures: boolean; - readonly renderIndentGuides: boolean; - readonly renderLineHighlight: boolean; - readonly scrollbar: boolean; - readonly minimap: boolean; - readonly fixedOverflowWidgets: boolean; - } - /** * An event describing that the configuration of the editor has changed. */ @@ -3399,7 +3363,7 @@ declare module monaco.editor { readonly dragAndDrop: boolean; readonly layoutInfo: boolean; readonly fontInfo: boolean; - readonly viewInfo: IViewConfigurationChangedEvent; + readonly viewInfo: boolean; readonly wrappingInfo: boolean; readonly contribInfo: boolean; } From e31a5085dc0f7936fdb79dbc7139de2cad2e8195 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 8 May 2017 21:28:16 +0200 Subject: [PATCH 0281/2747] Simplify editor options handling --- .../browser/standalone/standaloneEditor.ts | 7 - src/vs/editor/browser/view/viewImpl.ts | 6 +- .../editorScrollbar/editorScrollbar.ts | 20 +- .../browser/viewParts/lines/viewLines.ts | 6 +- .../editor/browser/viewParts/margin/margin.ts | 6 +- .../overviewRuler/decorationsOverviewRuler.ts | 7 +- .../viewParts/overviewRuler/overviewRuler.ts | 6 +- .../editor/browser/widget/diffEditorWidget.ts | 12 +- .../common/config/commonEditorConfig.ts | 78 +- src/vs/editor/common/config/editorOptions.ts | 1280 ++++++----------- src/vs/editor/common/view/viewEvents.ts | 4 + .../editor/contrib/suggest/browser/suggest.ts | 2 +- src/vs/editor/editor.main.ts | 4 +- .../viewLayout/editorLayoutProvider.test.ts | 704 ++++----- src/vs/monaco.d.ts | 25 +- 15 files changed, 870 insertions(+), 1297 deletions(-) diff --git a/src/vs/editor/browser/standalone/standaloneEditor.ts b/src/vs/editor/browser/standalone/standaloneEditor.ts index fc453d6e545a2..5e5fb63939e7c 100644 --- a/src/vs/editor/browser/standalone/standaloneEditor.ts +++ b/src/vs/editor/browser/standalone/standaloneEditor.ts @@ -354,14 +354,7 @@ export function createMonacoEditorAPI(): typeof monaco.editor { RenderMinimap: editorOptions.RenderMinimap, // classes - InternalEditorScrollbarOptions: editorOptions.InternalEditorScrollbarOptions, - InternalEditorMinimapOptions: editorOptions.InternalEditorMinimapOptions, - EditorWrappingInfo: editorOptions.EditorWrappingInfo, - InternalEditorViewOptions: editorOptions.InternalEditorViewOptions, - EditorContribOptions: editorOptions.EditorContribOptions, InternalEditorOptions: editorOptions.InternalEditorOptions, - OverviewRulerPosition: editorOptions.OverviewRulerPosition, - EditorLayoutInfo: editorOptions.EditorLayoutInfo, BareFontInfo: BareFontInfo, FontInfo: FontInfo, TextModelResolvedOptions: editorCommon.TextModelResolvedOptions, diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index 80c203d0b562c..edd209d5c4ff7 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -147,7 +147,7 @@ export class View extends ViewEventHandler { this.linesContent.setPosition('absolute'); this.domNode = createFastDomNode(document.createElement('div')); - this.domNode.setClassName(this._context.configuration.editor.viewInfo.editorClassName); + this.domNode.setClassName(this._context.configuration.editor.editorClassName); this.overflowGuardContainer = createFastDomNode(document.createElement('div')); PartFingerprints.write(this.overflowGuardContainer, PartFingerprint.OverflowGuard); @@ -340,8 +340,8 @@ export class View extends ViewEventHandler { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - if (e.viewInfo) { - this.domNode.setClassName(this._context.configuration.editor.viewInfo.editorClassName); + if (e.editorClassName) { + this.domNode.setClassName(this._context.configuration.editor.editorClassName); } if (e.layoutInfo) { this._setLayout(); diff --git a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts index b76d950d393d5..0fc8acf9612c9 100644 --- a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts +++ b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts @@ -32,13 +32,13 @@ export class EditorScrollbar extends ViewPart { this.scrollable = scrollable; - const viewInfo = this._context.configuration.editor.viewInfo; - const configScrollbarOpts = viewInfo.scrollbar; + const editor = this._context.configuration.editor; + const configScrollbarOpts = editor.viewInfo.scrollbar; let scrollbarOptions: ScrollableElementCreationOptions = { - canUseTranslate3d: viewInfo.canUseTranslate3d, + canUseTranslate3d: editor.canUseTranslate3d, listenOnDomNode: viewDomNode.domNode, - className: 'editor-scrollable' + ' ' + viewInfo.theme, + className: 'editor-scrollable' + ' ' + editor.viewInfo.theme, useShadows: false, lazyRender: true, @@ -126,14 +126,14 @@ export class EditorScrollbar extends ViewPart { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - const viewInfo = this._context.configuration.editor.viewInfo; + const editor = this._context.configuration.editor; - this.scrollbar.updateClassName('editor-scrollable' + ' ' + viewInfo.theme); - if (e.viewInfo) { + this.scrollbar.updateClassName('editor-scrollable' + ' ' + editor.viewInfo.theme); + if (e.viewInfo || e.canUseTranslate3d) { let newOpts: ScrollableElementChangeOptions = { - canUseTranslate3d: viewInfo.canUseTranslate3d, - handleMouseWheel: viewInfo.scrollbar.handleMouseWheel, - mouseWheelScrollSensitivity: viewInfo.scrollbar.mouseWheelScrollSensitivity + canUseTranslate3d: editor.canUseTranslate3d, + handleMouseWheel: editor.viewInfo.scrollbar.handleMouseWheel, + mouseWheelScrollSensitivity: editor.viewInfo.scrollbar.mouseWheelScrollSensitivity }; this.scrollbar.updateOptions(newOpts); } diff --git a/src/vs/editor/browser/viewParts/lines/viewLines.ts b/src/vs/editor/browser/viewParts/lines/viewLines.ts index 8be984ff5bf73..4d4ee4c983418 100644 --- a/src/vs/editor/browser/viewParts/lines/viewLines.ts +++ b/src/vs/editor/browser/viewParts/lines/viewLines.ts @@ -78,7 +78,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, this._lineHeight = this._context.configuration.editor.lineHeight; this._isViewportWrapping = this._context.configuration.editor.wrappingInfo.isViewportWrapping; this._revealHorizontalRightPadding = this._context.configuration.editor.viewInfo.revealHorizontalRightPadding; - this._canUseTranslate3d = this._context.configuration.editor.viewInfo.canUseTranslate3d; + this._canUseTranslate3d = this._context.configuration.editor.canUseTranslate3d; this._viewLineOptions = new ViewLineOptions(this._context.configuration); PartFingerprints.write(this.domNode, PartFingerprint.ViewLines); @@ -129,7 +129,9 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, } if (e.viewInfo) { this._revealHorizontalRightPadding = this._context.configuration.editor.viewInfo.revealHorizontalRightPadding; - this._canUseTranslate3d = this._context.configuration.editor.viewInfo.canUseTranslate3d; + } + if (e.canUseTranslate3d) { + this._canUseTranslate3d = this._context.configuration.editor.canUseTranslate3d; } if (e.fontInfo) { Configuration.applyFontInfo(this.domNode, this._context.configuration.editor.fontInfo); diff --git a/src/vs/editor/browser/viewParts/margin/margin.ts b/src/vs/editor/browser/viewParts/margin/margin.ts index 8cd64bbb32098..162ef220f3297 100644 --- a/src/vs/editor/browser/viewParts/margin/margin.ts +++ b/src/vs/editor/browser/viewParts/margin/margin.ts @@ -24,7 +24,7 @@ export class Margin extends ViewPart { constructor(context: ViewContext) { super(context); - this._canUseTranslate3d = this._context.configuration.editor.viewInfo.canUseTranslate3d; + this._canUseTranslate3d = this._context.configuration.editor.canUseTranslate3d; this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; this._glyphMarginLeft = this._context.configuration.editor.layoutInfo.glyphMarginLeft; this._glyphMarginWidth = this._context.configuration.editor.layoutInfo.glyphMarginWidth; @@ -57,8 +57,8 @@ export class Margin extends ViewPart { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - if (e.viewInfo) { - this._canUseTranslate3d = this._context.configuration.editor.viewInfo.canUseTranslate3d; + if (e.canUseTranslate3d) { + this._canUseTranslate3d = this._context.configuration.editor.canUseTranslate3d; } if (e.layoutInfo) { diff --git a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts index e73de14db1cfe..6ffaa520096c6 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts @@ -58,7 +58,7 @@ export class DecorationsOverviewRuler extends ViewPart { 'decorationsOverviewRuler', scrollHeight, this._context.configuration.editor.lineHeight, - this._context.configuration.editor.viewInfo.canUseTranslate3d, + this._context.configuration.editor.canUseTranslate3d, DecorationsOverviewRuler.MIN_DECORATION_HEIGHT, DecorationsOverviewRuler.MAX_DECORATION_HEIGHT, getVerticalOffsetForLine @@ -112,8 +112,11 @@ export class DecorationsOverviewRuler extends ViewPart { this._overviewRuler.setLineHeight(this._context.configuration.editor.lineHeight, false); } + if (e.canUseTranslate3d) { + this._overviewRuler.setCanUseTranslate3d(this._context.configuration.editor.canUseTranslate3d, false); + } + if (e.viewInfo) { - this._overviewRuler.setCanUseTranslate3d(this._context.configuration.editor.viewInfo.canUseTranslate3d, false); this._renderBorder = this._context.configuration.editor.viewInfo.overviewRulerBorder; this._hideCursor = this._context.configuration.editor.viewInfo.hideCursorInOverviewRuler; this._shouldUpdateCursorPosition = true; diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts index 18d7c1f49b64e..4ec5b262fbd2f 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts @@ -21,7 +21,7 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { super(); this._context = context; this._overviewRuler = new OverviewRulerImpl(0, cssClassName, scrollHeight, this._context.configuration.editor.lineHeight, - this._context.configuration.editor.viewInfo.canUseTranslate3d, minimumHeight, maximumHeight, getVerticalOffsetForLine); + this._context.configuration.editor.canUseTranslate3d, minimumHeight, maximumHeight, getVerticalOffsetForLine); this._context.addEventHandler(this); } @@ -39,8 +39,8 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { this._overviewRuler.setLineHeight(this._context.configuration.editor.lineHeight, true); } - if (e.viewInfo) { - this._overviewRuler.setCanUseTranslate3d(this._context.configuration.editor.viewInfo.canUseTranslate3d, true); + if (e.canUseTranslate3d) { + this._overviewRuler.setCanUseTranslate3d(this._context.configuration.editor.canUseTranslate3d, true); } return true; diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index 9958edfbde8ea..113637bf6fff7 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -213,7 +213,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._domElement = domElement; options = options || {}; - this._theme = options.theme || editorOptions.EDITOR_DEFAULTS.theme; + this._theme = options.theme || editorOptions.EDITOR_DEFAULTS.viewInfo.theme; // renderSideBySide this._renderSideBySide = true; if (typeof options.renderSideBySide !== 'undefined') { @@ -777,18 +777,18 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE let freeSpace = DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH - 2 * DiffEditorWidget.ONE_OVERVIEW_WIDTH; let layoutInfo = this.modifiedEditor.getLayoutInfo(); if (layoutInfo) { - this._originalOverviewRuler.setLayout(new editorOptions.OverviewRulerPosition({ + this._originalOverviewRuler.setLayout({ top: 0, width: DiffEditorWidget.ONE_OVERVIEW_WIDTH, right: freeSpace + DiffEditorWidget.ONE_OVERVIEW_WIDTH, height: this._height - })); - this._modifiedOverviewRuler.setLayout(new editorOptions.OverviewRulerPosition({ + }); + this._modifiedOverviewRuler.setLayout({ top: 0, right: 0, width: DiffEditorWidget.ONE_OVERVIEW_WIDTH, height: this._height - })); + }); } } @@ -898,7 +898,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE private _adjustOptionsForRightHandSide(options: editorOptions.IDiffEditorOptions): editorOptions.IEditorOptions { let result = this._adjustOptionsForSubEditor(options); - result.revealHorizontalRightPadding = editorOptions.EDITOR_DEFAULTS.revealHorizontalRightPadding + DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH; + result.revealHorizontalRightPadding = editorOptions.EDITOR_DEFAULTS.viewInfo.revealHorizontalRightPadding + DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH; result.scrollbar.verticalHasArrows = false; result.theme = this._theme + ' modified-in-monaco-diff-editor'; return result; diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 9a1a5aa404c65..62ca9dfe17313 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -112,17 +112,17 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed private _computeInternalOptions(): editorOptions.InternalEditorOptions { const opts = this._validatedOptions; const bareFontInfo = BareFontInfo.createFromRawSettings(this._rawOptions, this.getZoomLevel()); - const env = new editorOptions.EnvironmentalOptions({ + const env: editorOptions.IEnvironmentalOptions = { outerWidth: this.getOuterWidth(), outerHeight: this.getOuterHeight(), fontInfo: this.readConfiguration(bareFontInfo), - editorClassName: this._getEditorClassName(opts.theme, opts.fontLigatures, opts.mouseStyle), + editorClassName: this._getEditorClassName(opts.viewInfo.theme, opts.viewInfo.fontLigatures, opts.mouseStyle), isDominatedByLongLines: this._isDominatedByLongLines, lineNumbersDigitCount: this._lineNumbersDigitCount, canUseTranslate3d: this._getCanUseTranslate3d(), pixelRatio: this._getPixelRatio(), tabFocusMode: TabFocus.getTabFocusMode() - }); + }; return editorOptions.InternalEditorOptionsFactory.createInternalEditorOptions(env, opts); } @@ -210,7 +210,7 @@ const editorConfiguration: IConfigurationNode = { 'items': { 'type': 'number' }, - 'default': EDITOR_DEFAULTS.rulers, + 'default': EDITOR_DEFAULTS.viewInfo.rulers, 'description': nls.localize('rulers', "Columns at which to show vertical rulers") }, 'editor.wordSeparators': { @@ -238,27 +238,27 @@ const editorConfiguration: IConfigurationNode = { }, 'editor.roundedSelection': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.roundedSelection, + 'default': EDITOR_DEFAULTS.viewInfo.roundedSelection, 'description': nls.localize('roundedSelection', "Controls if selections have rounded corners") }, 'editor.scrollBeyondLastLine': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.scrollBeyondLastLine, + 'default': EDITOR_DEFAULTS.viewInfo.scrollBeyondLastLine, 'description': nls.localize('scrollBeyondLastLine', "Controls if the editor will scroll beyond the last line") }, 'editor.minimap.enabled': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.minimap.enabled, + 'default': EDITOR_DEFAULTS.viewInfo.minimap.enabled, 'description': nls.localize('minimap.enabled', "Controls if the minimap is shown") }, 'editor.minimap.renderCharacters': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.minimap.renderCharacters, + 'default': EDITOR_DEFAULTS.viewInfo.minimap.renderCharacters, 'description': nls.localize('minimap.renderCharacters', "Render the actual characters on a line (as opposed to color blocks)") }, 'editor.minimap.maxColumn': { 'type': 'number', - 'default': EDITOR_DEFAULTS.minimap.maxColumn, + 'default': EDITOR_DEFAULTS.viewInfo.minimap.maxColumn, 'description': nls.localize('minimap.maxColumn', "Limit the width of the minimap to render at most a certain number of columns") }, 'editor.wordWrap': { @@ -310,7 +310,7 @@ const editorConfiguration: IConfigurationNode = { }, 'editor.mouseWheelScrollSensitivity': { 'type': 'number', - 'default': EDITOR_DEFAULTS.mouseWheelScrollSensitivity, + 'default': EDITOR_DEFAULTS.viewInfo.scrollbar.mouseWheelScrollSensitivity, 'description': nls.localize('mouseWheelScrollSensitivity', "A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events") }, 'editor.quickSuggestions': { @@ -339,18 +339,18 @@ const editorConfiguration: IConfigurationNode = { } } ], - 'default': EDITOR_DEFAULTS.quickSuggestions, + 'default': EDITOR_DEFAULTS.contribInfo.quickSuggestions, 'description': nls.localize('quickSuggestions', "Controls if suggestions should automatically show up while typing") }, 'editor.quickSuggestionsDelay': { 'type': 'integer', - 'default': EDITOR_DEFAULTS.quickSuggestionsDelay, + 'default': EDITOR_DEFAULTS.contribInfo.quickSuggestionsDelay, 'minimum': 0, 'description': nls.localize('quickSuggestionsDelay', "Controls the delay in ms after which quick suggestions will show up") }, 'editor.parameterHints': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.parameterHints, + 'default': EDITOR_DEFAULTS.contribInfo.parameterHints, 'description': nls.localize('parameterHints', "Enables parameter hints") }, 'editor.autoClosingBrackets': { @@ -360,43 +360,43 @@ const editorConfiguration: IConfigurationNode = { }, 'editor.formatOnType': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.formatOnType, + 'default': EDITOR_DEFAULTS.contribInfo.formatOnType, 'description': nls.localize('formatOnType', "Controls if the editor should automatically format the line after typing") }, 'editor.formatOnPaste': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.formatOnPaste, + 'default': EDITOR_DEFAULTS.contribInfo.formatOnPaste, 'description': nls.localize('formatOnPaste', "Controls if the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.") }, 'editor.suggestOnTriggerCharacters': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.suggestOnTriggerCharacters, + 'default': EDITOR_DEFAULTS.contribInfo.suggestOnTriggerCharacters, 'description': nls.localize('suggestOnTriggerCharacters', "Controls if suggestions should automatically show up when typing trigger characters") }, 'editor.acceptSuggestionOnEnter': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.acceptSuggestionOnEnter, + 'default': EDITOR_DEFAULTS.contribInfo.acceptSuggestionOnEnter, 'description': nls.localize('acceptSuggestionOnEnter', "Controls if suggestions should be accepted on 'Enter' - in addition to 'Tab'. Helps to avoid ambiguity between inserting new lines or accepting suggestions.") }, 'editor.acceptSuggestionOnCommitCharacter': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.acceptSuggestionOnCommitCharacter, + 'default': EDITOR_DEFAULTS.contribInfo.acceptSuggestionOnCommitCharacter, 'description': nls.localize('acceptSuggestionOnCommitCharacter', "Controls if suggestions should be accepted on commit characters. For instance in JavaScript the semi-colon (';') can be a commit character that accepts a suggestion and types that character.") }, 'editor.snippetSuggestions': { 'type': 'string', 'enum': ['top', 'bottom', 'inline', 'none'], - 'default': EDITOR_DEFAULTS.snippetSuggestions, + 'default': EDITOR_DEFAULTS.contribInfo.snippetSuggestions, 'description': nls.localize('snippetSuggestions', "Controls whether snippets are shown with other suggestions and how they are sorted.") }, 'editor.emptySelectionClipboard': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.emptySelectionClipboard, + 'default': EDITOR_DEFAULTS.contribInfo.emptySelectionClipboard, 'description': nls.localize('emptySelectionClipboard', "Controls whether copying without a selection copies the current line.") }, 'editor.wordBasedSuggestions': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.wordBasedSuggestions, + 'default': EDITOR_DEFAULTS.contribInfo.wordBasedSuggestions, 'description': nls.localize('wordBasedSuggestions', "Controls whether completions should be computed based on words in the document.") }, 'editor.suggestFontSize': { @@ -413,12 +413,12 @@ const editorConfiguration: IConfigurationNode = { }, 'editor.selectionHighlight': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.selectionHighlight, + 'default': EDITOR_DEFAULTS.contribInfo.selectionHighlight, 'description': nls.localize('selectionHighlight', "Controls whether the editor should highlight similar matches to the selection") }, 'editor.occurrencesHighlight': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.occurrencesHighlight, + 'default': EDITOR_DEFAULTS.contribInfo.occurrencesHighlight, 'description': nls.localize('occurrencesHighlight', "Controls whether the editor should highlight semantic symbol occurrences") }, 'editor.overviewRulerLanes': { @@ -428,81 +428,81 @@ const editorConfiguration: IConfigurationNode = { }, 'editor.overviewRulerBorder': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.overviewRulerBorder, + 'default': EDITOR_DEFAULTS.viewInfo.overviewRulerBorder, 'description': nls.localize('overviewRulerBorder', "Controls if a border should be drawn around the overview ruler.") }, 'editor.cursorBlinking': { 'type': 'string', 'enum': ['blink', 'smooth', 'phase', 'expand', 'solid'], - 'default': EDITOR_DEFAULTS.cursorBlinking, + 'default': EDITOR_DEFAULTS.viewInfo.cursorBlinking, 'description': nls.localize('cursorBlinking', "Control the cursor animation style, possible values are 'blink', 'smooth', 'phase', 'expand' and 'solid'") }, 'editor.mouseWheelZoom': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.mouseWheelZoom, + 'default': EDITOR_DEFAULTS.viewInfo.mouseWheelZoom, 'description': nls.localize('mouseWheelZoom', "Zoom the font of the editor when using mouse wheel and holding Ctrl") }, 'editor.cursorStyle': { 'type': 'string', 'enum': ['block', 'block-outline', 'line', 'line-thin', 'underline', 'underline-thin'], - 'default': EDITOR_DEFAULTS.cursorStyle, + 'default': EDITOR_DEFAULTS.viewInfo.cursorStyle, 'description': nls.localize('cursorStyle', "Controls the cursor style, accepted values are 'block', 'block-outline', 'line', 'line-thin', 'underline' and 'underline-thin'") }, 'editor.fontLigatures': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.fontLigatures, + 'default': EDITOR_DEFAULTS.viewInfo.fontLigatures, 'description': nls.localize('fontLigatures', "Enables font ligatures") }, 'editor.hideCursorInOverviewRuler': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.hideCursorInOverviewRuler, + 'default': EDITOR_DEFAULTS.viewInfo.hideCursorInOverviewRuler, 'description': nls.localize('hideCursorInOverviewRuler', "Controls if the cursor should be hidden in the overview ruler.") }, 'editor.renderWhitespace': { 'type': 'string', 'enum': ['none', 'boundary', 'all'], - default: EDITOR_DEFAULTS.renderWhitespace, + default: EDITOR_DEFAULTS.viewInfo.renderWhitespace, description: nls.localize('renderWhitespace', "Controls how the editor should render whitespace characters, possibilities are 'none', 'boundary', and 'all'. The 'boundary' option does not render single spaces between words.") }, 'editor.renderControlCharacters': { 'type': 'boolean', - default: EDITOR_DEFAULTS.renderControlCharacters, + default: EDITOR_DEFAULTS.viewInfo.renderControlCharacters, description: nls.localize('renderControlCharacters', "Controls whether the editor should render control characters") }, 'editor.renderIndentGuides': { 'type': 'boolean', - default: EDITOR_DEFAULTS.renderIndentGuides, + default: EDITOR_DEFAULTS.viewInfo.renderIndentGuides, description: nls.localize('renderIndentGuides', "Controls whether the editor should render indent guides") }, 'editor.renderLineHighlight': { 'type': 'string', 'enum': ['none', 'gutter', 'line', 'all'], - default: EDITOR_DEFAULTS.renderLineHighlight, + default: EDITOR_DEFAULTS.viewInfo.renderLineHighlight, description: nls.localize('renderLineHighlight', "Controls how the editor should render the current line highlight, possibilities are 'none', 'gutter', 'line', and 'all'.") }, 'editor.codeLens': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.codeLens, + 'default': EDITOR_DEFAULTS.contribInfo.codeLens, 'description': nls.localize('codeLens', "Controls if the editor shows code lenses") }, 'editor.folding': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.folding, + 'default': EDITOR_DEFAULTS.contribInfo.folding, 'description': nls.localize('folding', "Controls whether the editor has code folding enabled") }, 'editor.hideFoldIcons': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.hideFoldIcons, + 'default': EDITOR_DEFAULTS.contribInfo.hideFoldIcons, 'description': nls.localize('hideFoldIcons', "Controls whether the fold icons on the gutter are automatically hidden.") }, 'editor.matchBrackets': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.matchBrackets, + 'default': EDITOR_DEFAULTS.contribInfo.matchBrackets, 'description': nls.localize('matchBrackets', "Highlight matching brackets when one of them is selected.") }, 'editor.glyphMargin': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.glyphMargin, + 'default': EDITOR_DEFAULTS.viewInfo.glyphMargin, 'description': nls.localize('glyphMargin', "Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.") }, 'editor.useTabStops': { @@ -546,7 +546,7 @@ const editorConfiguration: IConfigurationNode = { if (platform.isLinux) { editorConfiguration['properties']['editor.selectionClipboard'] = { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.selectionClipboard, + 'default': EDITOR_DEFAULTS.contribInfo.selectionClipboard, 'description': nls.localize('selectionClipboard', "Controls if the Linux primary clipboard should be supported.") }; } diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 474696dfffb58..2382447705c1b 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -631,9 +631,7 @@ function _cursorStyleFromString(cursorStyle: string, defaultValue: TextEditorCur return TextEditorCursorStyle.Line; } -export class InternalEditorScrollbarOptions { - readonly _internalEditorScrollbarOptionsBrand: void; - +export interface InternalEditorScrollbarOptions { readonly arrowSize: number; readonly vertical: ScrollbarVisibility; readonly horizontal: ScrollbarVisibility; @@ -646,94 +644,15 @@ export class InternalEditorScrollbarOptions { readonly verticalScrollbarSize: number; readonly verticalSliderSize: number; readonly mouseWheelScrollSensitivity: number; - - /** - * @internal - */ - constructor(source: { - arrowSize: number; - vertical: ScrollbarVisibility; - horizontal: ScrollbarVisibility; - useShadows: boolean; - verticalHasArrows: boolean; - horizontalHasArrows: boolean; - handleMouseWheel: boolean; - horizontalScrollbarSize: number; - horizontalSliderSize: number; - verticalScrollbarSize: number; - verticalSliderSize: number; - mouseWheelScrollSensitivity: number; - }) { - this.arrowSize = source.arrowSize | 0; - this.vertical = source.vertical | 0; - this.horizontal = source.horizontal | 0; - this.useShadows = Boolean(source.useShadows); - this.verticalHasArrows = Boolean(source.verticalHasArrows); - this.horizontalHasArrows = Boolean(source.horizontalHasArrows); - this.handleMouseWheel = Boolean(source.handleMouseWheel); - this.horizontalScrollbarSize = source.horizontalScrollbarSize | 0; - this.horizontalSliderSize = source.horizontalSliderSize | 0; - this.verticalScrollbarSize = source.verticalScrollbarSize | 0; - this.verticalSliderSize = source.verticalSliderSize | 0; - this.mouseWheelScrollSensitivity = Number(source.mouseWheelScrollSensitivity); - } - - /** - * @internal - */ - public equals(other: InternalEditorScrollbarOptions): boolean { - return ( - this.arrowSize === other.arrowSize - && this.vertical === other.vertical - && this.horizontal === other.horizontal - && this.useShadows === other.useShadows - && this.verticalHasArrows === other.verticalHasArrows - && this.horizontalHasArrows === other.horizontalHasArrows - && this.handleMouseWheel === other.handleMouseWheel - && this.horizontalScrollbarSize === other.horizontalScrollbarSize - && this.horizontalSliderSize === other.horizontalSliderSize - && this.verticalScrollbarSize === other.verticalScrollbarSize - && this.verticalSliderSize === other.verticalSliderSize - && this.mouseWheelScrollSensitivity === other.mouseWheelScrollSensitivity - ); - } } -export class InternalEditorMinimapOptions { - readonly _internalEditorMinimapOptionsBrand: void; - +export interface InternalEditorMinimapOptions { readonly enabled: boolean; readonly renderCharacters: boolean; readonly maxColumn: number; - - /** - * @internal - */ - constructor(source: { - enabled: boolean; - renderCharacters: boolean; - maxColumn: number; - }) { - this.enabled = Boolean(source.enabled); - this.renderCharacters = Boolean(source.renderCharacters); - this.maxColumn = source.maxColumn | 0; - } - - /** - * @internal - */ - public equals(other: InternalEditorMinimapOptions): boolean { - return ( - this.enabled === other.enabled - && this.renderCharacters === other.renderCharacters - && this.maxColumn === other.maxColumn - ); - } } -export class EditorWrappingInfo { - readonly _editorWrappingInfoBrand: void; - +export interface EditorWrappingInfo { readonly inDiffEditor: boolean; readonly isDominatedByLongLines: boolean; readonly isWordWrapMinified: boolean; @@ -743,54 +662,10 @@ export class EditorWrappingInfo { readonly wordWrapBreakBeforeCharacters: string; readonly wordWrapBreakAfterCharacters: string; readonly wordWrapBreakObtrusiveCharacters: string; - - /** - * @internal - */ - constructor(source: { - inDiffEditor: boolean; - isDominatedByLongLines: boolean; - isWordWrapMinified: boolean; - isViewportWrapping: boolean; - wrappingColumn: number; - wrappingIndent: WrappingIndent; - wordWrapBreakBeforeCharacters: string; - wordWrapBreakAfterCharacters: string; - wordWrapBreakObtrusiveCharacters: string; - }) { - this.inDiffEditor = Boolean(source.inDiffEditor); - this.isDominatedByLongLines = Boolean(source.isDominatedByLongLines); - this.isWordWrapMinified = Boolean(source.isWordWrapMinified); - this.isViewportWrapping = Boolean(source.isViewportWrapping); - this.wrappingColumn = source.wrappingColumn | 0; - this.wrappingIndent = source.wrappingIndent | 0; - this.wordWrapBreakBeforeCharacters = String(source.wordWrapBreakBeforeCharacters); - this.wordWrapBreakAfterCharacters = String(source.wordWrapBreakAfterCharacters); - this.wordWrapBreakObtrusiveCharacters = String(source.wordWrapBreakObtrusiveCharacters); - } - - /** - * @internal - */ - public equals(other: EditorWrappingInfo): boolean { - return ( - this.inDiffEditor === other.inDiffEditor - && this.isDominatedByLongLines === other.isDominatedByLongLines - && this.isWordWrapMinified === other.isWordWrapMinified - && this.isViewportWrapping === other.isViewportWrapping - && this.wrappingColumn === other.wrappingColumn - && this.wrappingIndent === other.wrappingIndent - && this.wordWrapBreakBeforeCharacters === other.wordWrapBreakBeforeCharacters - && this.wordWrapBreakAfterCharacters === other.wordWrapBreakAfterCharacters - && this.wordWrapBreakObtrusiveCharacters === other.wordWrapBreakObtrusiveCharacters - ); - } } -export class InternalEditorViewOptions { - +export interface InternalEditorViewOptions { readonly theme: string; - readonly canUseTranslate3d: boolean; readonly disableMonospaceOptimizations: boolean; readonly experimentalScreenReader: boolean; readonly rulers: number[]; @@ -809,7 +684,6 @@ export class InternalEditorViewOptions { readonly cursorStyle: TextEditorCursorStyle; readonly hideCursorInOverviewRuler: boolean; readonly scrollBeyondLastLine: boolean; - readonly editorClassName: string; readonly stopRenderingLineAfter: number; readonly renderWhitespace: 'none' | 'boundary' | 'all'; readonly renderControlCharacters: boolean; @@ -819,142 +693,9 @@ export class InternalEditorViewOptions { readonly scrollbar: InternalEditorScrollbarOptions; readonly minimap: InternalEditorMinimapOptions; readonly fixedOverflowWidgets: boolean; - - /** - * @internal - */ - constructor(source: { - theme: string; - canUseTranslate3d: boolean; - disableMonospaceOptimizations: boolean; - experimentalScreenReader: boolean; - rulers: number[]; - ariaLabel: string; - renderLineNumbers: boolean; - renderCustomLineNumbers: (lineNumber: number) => string; - renderRelativeLineNumbers: boolean; - selectOnLineNumbers: boolean; - glyphMargin: boolean; - revealHorizontalRightPadding: number; - roundedSelection: boolean; - overviewRulerLanes: number; - overviewRulerBorder: boolean; - cursorBlinking: TextEditorCursorBlinkingStyle; - mouseWheelZoom: boolean; - cursorStyle: TextEditorCursorStyle; - hideCursorInOverviewRuler: boolean; - scrollBeyondLastLine: boolean; - editorClassName: string; - stopRenderingLineAfter: number; - renderWhitespace: 'none' | 'boundary' | 'all'; - renderControlCharacters: boolean; - fontLigatures: boolean; - renderIndentGuides: boolean; - renderLineHighlight: 'none' | 'gutter' | 'line' | 'all'; - scrollbar: InternalEditorScrollbarOptions; - minimap: InternalEditorMinimapOptions; - fixedOverflowWidgets: boolean; - }) { - this.theme = String(source.theme); - this.canUseTranslate3d = Boolean(source.canUseTranslate3d); - this.disableMonospaceOptimizations = Boolean(source.disableMonospaceOptimizations); - this.experimentalScreenReader = Boolean(source.experimentalScreenReader); - this.rulers = InternalEditorViewOptions._toSortedIntegerArray(source.rulers); - this.ariaLabel = String(source.ariaLabel); - this.renderLineNumbers = Boolean(source.renderLineNumbers); - this.renderCustomLineNumbers = source.renderCustomLineNumbers; - this.renderRelativeLineNumbers = Boolean(source.renderRelativeLineNumbers); - this.selectOnLineNumbers = Boolean(source.selectOnLineNumbers); - this.glyphMargin = Boolean(source.glyphMargin); - this.revealHorizontalRightPadding = source.revealHorizontalRightPadding | 0; - this.roundedSelection = Boolean(source.roundedSelection); - this.overviewRulerLanes = source.overviewRulerLanes | 0; - this.overviewRulerBorder = Boolean(source.overviewRulerBorder); - this.cursorBlinking = source.cursorBlinking | 0; - this.mouseWheelZoom = Boolean(source.mouseWheelZoom); - this.cursorStyle = source.cursorStyle | 0; - this.hideCursorInOverviewRuler = Boolean(source.hideCursorInOverviewRuler); - this.scrollBeyondLastLine = Boolean(source.scrollBeyondLastLine); - this.editorClassName = String(source.editorClassName); - this.stopRenderingLineAfter = source.stopRenderingLineAfter | 0; - this.renderWhitespace = source.renderWhitespace; - this.renderControlCharacters = Boolean(source.renderControlCharacters); - this.fontLigatures = Boolean(source.fontLigatures); - this.renderIndentGuides = Boolean(source.renderIndentGuides); - this.renderLineHighlight = source.renderLineHighlight; - this.scrollbar = source.scrollbar; - this.minimap = source.minimap; - this.fixedOverflowWidgets = Boolean(source.fixedOverflowWidgets); - } - - private static _toSortedIntegerArray(source: any): number[] { - if (!Array.isArray(source)) { - return []; - } - let arrSource = source; - let result = arrSource.map(el => { - let r = parseInt(el, 10); - if (isNaN(r)) { - return 0; - } - return r; - }); - result.sort(); - return result; - } - - private static _numberArraysEqual(a: number[], b: number[]): boolean { - if (a.length !== b.length) { - return false; - } - for (let i = 0; i < a.length; i++) { - if (a[i] !== b[i]) { - return false; - } - } - return true; - } - - /** - * @internal - */ - public static equals(a: InternalEditorViewOptions, b: InternalEditorViewOptions): boolean { - return ( - a.theme === b.theme - && a.canUseTranslate3d === b.canUseTranslate3d - && a.disableMonospaceOptimizations === b.disableMonospaceOptimizations - && a.experimentalScreenReader === b.experimentalScreenReader - && InternalEditorViewOptions._numberArraysEqual(a.rulers, b.rulers) - && a.ariaLabel === b.ariaLabel - && a.renderLineNumbers === b.renderLineNumbers - && a.renderCustomLineNumbers === b.renderCustomLineNumbers - && a.renderRelativeLineNumbers === b.renderRelativeLineNumbers - && a.selectOnLineNumbers === b.selectOnLineNumbers - && a.glyphMargin === b.glyphMargin - && a.revealHorizontalRightPadding === b.revealHorizontalRightPadding - && a.roundedSelection === b.roundedSelection - && a.overviewRulerLanes === b.overviewRulerLanes - && a.overviewRulerBorder === b.overviewRulerBorder - && a.cursorBlinking === b.cursorBlinking - && a.mouseWheelZoom === b.mouseWheelZoom - && a.cursorStyle === b.cursorStyle - && a.hideCursorInOverviewRuler === b.hideCursorInOverviewRuler - && a.scrollBeyondLastLine === b.scrollBeyondLastLine - && a.editorClassName === b.editorClassName - && a.stopRenderingLineAfter === b.stopRenderingLineAfter - && a.renderWhitespace === b.renderWhitespace - && a.renderControlCharacters === b.renderControlCharacters - && a.fontLigatures === b.fontLigatures - && a.renderIndentGuides === b.renderIndentGuides - && a.renderLineHighlight === b.renderLineHighlight - && a.scrollbar.equals(b.scrollbar) - && a.minimap.equals(b.minimap) - && a.fixedOverflowWidgets === b.fixedOverflowWidgets - ); - } } -export class EditorContribOptions { +export interface EditorContribOptions { readonly selectionClipboard: boolean; readonly hover: boolean; readonly contextmenu: boolean; @@ -978,107 +719,6 @@ export class EditorContribOptions { readonly folding: boolean; readonly hideFoldIcons: boolean; readonly matchBrackets: boolean; - - /** - * @internal - */ - constructor(source: { - selectionClipboard: boolean; - hover: boolean; - contextmenu: boolean; - quickSuggestions: boolean | { other: boolean, comments: boolean, strings: boolean }; - quickSuggestionsDelay: number; - parameterHints: boolean; - iconsInSuggestions: boolean; - formatOnType: boolean; - formatOnPaste: boolean; - suggestOnTriggerCharacters: boolean; - acceptSuggestionOnEnter: boolean; - acceptSuggestionOnCommitCharacter: boolean; - snippetSuggestions: 'top' | 'bottom' | 'inline' | 'none'; - emptySelectionClipboard: boolean; - wordBasedSuggestions: boolean; - suggestFontSize: number; - suggestLineHeight: number; - selectionHighlight: boolean; - occurrencesHighlight: boolean; - codeLens: boolean; - folding: boolean; - hideFoldIcons: boolean; - matchBrackets: boolean; - }) { - this.selectionClipboard = Boolean(source.selectionClipboard); - this.hover = Boolean(source.hover); - this.contextmenu = Boolean(source.contextmenu); - this.quickSuggestions = source.quickSuggestions; - this.quickSuggestionsDelay = source.quickSuggestionsDelay || 0; - this.parameterHints = Boolean(source.parameterHints); - this.iconsInSuggestions = Boolean(source.iconsInSuggestions); - this.formatOnType = Boolean(source.formatOnType); - this.formatOnPaste = Boolean(source.formatOnPaste); - this.suggestOnTriggerCharacters = Boolean(source.suggestOnTriggerCharacters); - this.acceptSuggestionOnEnter = Boolean(source.acceptSuggestionOnEnter); - this.acceptSuggestionOnCommitCharacter = Boolean(source.acceptSuggestionOnCommitCharacter); - this.snippetSuggestions = source.snippetSuggestions; - this.emptySelectionClipboard = source.emptySelectionClipboard; - this.wordBasedSuggestions = source.wordBasedSuggestions; - this.suggestFontSize = source.suggestFontSize; - this.suggestLineHeight = source.suggestLineHeight; - this.selectionHighlight = Boolean(source.selectionHighlight); - this.occurrencesHighlight = Boolean(source.occurrencesHighlight); - this.codeLens = Boolean(source.codeLens); - this.folding = Boolean(source.folding); - this.hideFoldIcons = Boolean(source.hideFoldIcons); - this.matchBrackets = Boolean(source.matchBrackets); - } - - /** - * @internal - */ - public equals(other: EditorContribOptions): boolean { - return ( - this.selectionClipboard === other.selectionClipboard - && this.hover === other.hover - && this.contextmenu === other.contextmenu - && EditorContribOptions._quickSuggestionsEquals(this.quickSuggestions, other.quickSuggestions) - && this.quickSuggestionsDelay === other.quickSuggestionsDelay - && this.parameterHints === other.parameterHints - && this.iconsInSuggestions === other.iconsInSuggestions - && this.formatOnType === other.formatOnType - && this.formatOnPaste === other.formatOnPaste - && this.suggestOnTriggerCharacters === other.suggestOnTriggerCharacters - && this.acceptSuggestionOnEnter === other.acceptSuggestionOnEnter - && this.acceptSuggestionOnCommitCharacter === other.acceptSuggestionOnCommitCharacter - && this.snippetSuggestions === other.snippetSuggestions - && this.emptySelectionClipboard === other.emptySelectionClipboard - && this.wordBasedSuggestions === other.wordBasedSuggestions - && this.suggestFontSize === other.suggestFontSize - && this.suggestLineHeight === other.suggestLineHeight - && this.selectionHighlight === other.selectionHighlight - && this.occurrencesHighlight === other.occurrencesHighlight - && this.codeLens === other.codeLens - && this.folding === other.folding - && this.hideFoldIcons === other.hideFoldIcons - && this.matchBrackets === other.matchBrackets - ); - } - - private static _quickSuggestionsEquals(a: boolean | { other: boolean, comments: boolean, strings: boolean }, b: boolean | { other: boolean, comments: boolean, strings: boolean }): boolean { - if (typeof a === 'boolean') { - if (typeof b !== 'boolean') { - return false; - } - return a === b; - } - if (typeof b === 'boolean') { - return false; - } - return ( - a.comments === b.comments - && a.other === b.other - && a.strings === b.strings - ); - } } /** @@ -1087,15 +727,18 @@ export class EditorContribOptions { export class InternalEditorOptions { readonly _internalEditorOptionsBrand: void; + readonly canUseTranslate3d: boolean; + readonly editorClassName: string; readonly lineHeight: number; - readonly readOnly: boolean; + // ---- cursor options readonly wordSeparators: string; readonly autoClosingBrackets: boolean; readonly useTabStops: boolean; readonly tabFocusMode: boolean; readonly dragAndDrop: boolean; + // ---- grouped options readonly layoutInfo: EditorLayoutInfo; readonly fontInfo: FontInfo; @@ -1107,6 +750,8 @@ export class InternalEditorOptions { * @internal */ constructor(source: { + canUseTranslate3d: boolean; + editorClassName: string; lineHeight: number; readOnly: boolean; wordSeparators: string; @@ -1120,6 +765,8 @@ export class InternalEditorOptions { wrappingInfo: EditorWrappingInfo; contribInfo: EditorContribOptions; }) { + this.canUseTranslate3d = Boolean(source.canUseTranslate3d); + this.editorClassName = String(source.editorClassName); this.lineHeight = source.lineHeight | 0; this.readOnly = Boolean(source.readOnly); this.wordSeparators = String(source.wordSeparators); @@ -1139,18 +786,20 @@ export class InternalEditorOptions { */ public equals(other: InternalEditorOptions): boolean { return ( - this.lineHeight === other.lineHeight + this.canUseTranslate3d === other.canUseTranslate3d + && this.editorClassName === other.editorClassName + && this.lineHeight === other.lineHeight && this.readOnly === other.readOnly && this.wordSeparators === other.wordSeparators && this.autoClosingBrackets === other.autoClosingBrackets && this.useTabStops === other.useTabStops && this.tabFocusMode === other.tabFocusMode && this.dragAndDrop === other.dragAndDrop - && this.layoutInfo.equals(other.layoutInfo) + && InternalEditorOptions._equalsLayoutInfo(this.layoutInfo, other.layoutInfo) && this.fontInfo.equals(other.fontInfo) - && InternalEditorViewOptions.equals(this.viewInfo, other.viewInfo) - && this.wrappingInfo.equals(other.wrappingInfo) - && this.contribInfo.equals(other.contribInfo) + && InternalEditorOptions._equalsViewOptions(this.viewInfo, other.viewInfo) + && InternalEditorOptions._equalsWrappingInfo(this.wrappingInfo, other.wrappingInfo) + && InternalEditorOptions._equalsContribOptions(this.contribInfo, other.contribInfo) ); } @@ -1159,6 +808,8 @@ export class InternalEditorOptions { */ public createChangeEvent(newOpts: InternalEditorOptions): IConfigurationChangedEvent { return { + canUseTranslate3d: (this.canUseTranslate3d !== newOpts.canUseTranslate3d), + editorClassName: (this.editorClassName !== newOpts.editorClassName), lineHeight: (this.lineHeight !== newOpts.lineHeight), readOnly: (this.readOnly !== newOpts.readOnly), wordSeparators: (this.wordSeparators !== newOpts.wordSeparators), @@ -1166,71 +817,225 @@ export class InternalEditorOptions { useTabStops: (this.useTabStops !== newOpts.useTabStops), tabFocusMode: (this.tabFocusMode !== newOpts.tabFocusMode), dragAndDrop: (this.dragAndDrop !== newOpts.dragAndDrop), - layoutInfo: (!this.layoutInfo.equals(newOpts.layoutInfo)), + layoutInfo: (!InternalEditorOptions._equalsLayoutInfo(this.layoutInfo, newOpts.layoutInfo)), fontInfo: (!this.fontInfo.equals(newOpts.fontInfo)), - viewInfo: (!InternalEditorViewOptions.equals(this.viewInfo, newOpts.viewInfo)), - wrappingInfo: (!this.wrappingInfo.equals(newOpts.wrappingInfo)), - contribInfo: (!this.contribInfo.equals(newOpts.contribInfo)), + viewInfo: (!InternalEditorOptions._equalsViewOptions(this.viewInfo, newOpts.viewInfo)), + wrappingInfo: (!InternalEditorOptions._equalsWrappingInfo(this.wrappingInfo, newOpts.wrappingInfo)), + contribInfo: (!InternalEditorOptions._equalsContribOptions(this.contribInfo, newOpts.contribInfo)), }; } -} -/** - * A description for the overview ruler position. - */ -export class OverviewRulerPosition { - readonly _overviewRulerPositionBrand: void; + /** + * @internal + */ + private static _equalsLayoutInfo(a: EditorLayoutInfo, b: EditorLayoutInfo): boolean { + return ( + a.width === b.width + && a.height === b.height + && a.glyphMarginLeft === b.glyphMarginLeft + && a.glyphMarginWidth === b.glyphMarginWidth + && a.glyphMarginHeight === b.glyphMarginHeight + && a.lineNumbersLeft === b.lineNumbersLeft + && a.lineNumbersWidth === b.lineNumbersWidth + && a.lineNumbersHeight === b.lineNumbersHeight + && a.decorationsLeft === b.decorationsLeft + && a.decorationsWidth === b.decorationsWidth + && a.decorationsHeight === b.decorationsHeight + && a.contentLeft === b.contentLeft + && a.contentWidth === b.contentWidth + && a.contentHeight === b.contentHeight + && a.renderMinimap === b.renderMinimap + && a.minimapWidth === b.minimapWidth + && a.viewportColumn === b.viewportColumn + && a.verticalScrollbarWidth === b.verticalScrollbarWidth + && a.horizontalScrollbarHeight === b.horizontalScrollbarHeight + && this._equalsOverviewRuler(a.overviewRuler, b.overviewRuler) + ); + } /** - * Width of the overview ruler + * @internal */ - readonly width: number; + private static _equalsOverviewRuler(a: OverviewRulerPosition, b: OverviewRulerPosition): boolean { + return ( + a.width === b.width + && a.height === b.height + && a.top === b.top + && a.right === b.right + ); + } + /** - * Height of the overview ruler + * @internal */ - readonly height: number; + private static _equalsViewOptions(a: InternalEditorViewOptions, b: InternalEditorViewOptions): boolean { + return ( + a.theme === b.theme + && a.disableMonospaceOptimizations === b.disableMonospaceOptimizations + && a.experimentalScreenReader === b.experimentalScreenReader + && this._equalsNumberArrays(a.rulers, b.rulers) + && a.ariaLabel === b.ariaLabel + && a.renderLineNumbers === b.renderLineNumbers + && a.renderCustomLineNumbers === b.renderCustomLineNumbers + && a.renderRelativeLineNumbers === b.renderRelativeLineNumbers + && a.selectOnLineNumbers === b.selectOnLineNumbers + && a.glyphMargin === b.glyphMargin + && a.revealHorizontalRightPadding === b.revealHorizontalRightPadding + && a.roundedSelection === b.roundedSelection + && a.overviewRulerLanes === b.overviewRulerLanes + && a.overviewRulerBorder === b.overviewRulerBorder + && a.cursorBlinking === b.cursorBlinking + && a.mouseWheelZoom === b.mouseWheelZoom + && a.cursorStyle === b.cursorStyle + && a.hideCursorInOverviewRuler === b.hideCursorInOverviewRuler + && a.scrollBeyondLastLine === b.scrollBeyondLastLine + && a.stopRenderingLineAfter === b.stopRenderingLineAfter + && a.renderWhitespace === b.renderWhitespace + && a.renderControlCharacters === b.renderControlCharacters + && a.fontLigatures === b.fontLigatures + && a.renderIndentGuides === b.renderIndentGuides + && a.renderLineHighlight === b.renderLineHighlight + && this._equalsScrollbarOptions(a.scrollbar, b.scrollbar) + && this._equalsMinimapOptions(a.minimap, b.minimap) + && a.fixedOverflowWidgets === b.fixedOverflowWidgets + ); + } + /** - * Top position for the overview ruler + * @internal */ - readonly top: number; + private static _equalsScrollbarOptions(a: InternalEditorScrollbarOptions, b: InternalEditorScrollbarOptions): boolean { + return ( + a.arrowSize === b.arrowSize + && a.vertical === b.vertical + && a.horizontal === b.horizontal + && a.useShadows === b.useShadows + && a.verticalHasArrows === b.verticalHasArrows + && a.horizontalHasArrows === b.horizontalHasArrows + && a.handleMouseWheel === b.handleMouseWheel + && a.horizontalScrollbarSize === b.horizontalScrollbarSize + && a.horizontalSliderSize === b.horizontalSliderSize + && a.verticalScrollbarSize === b.verticalScrollbarSize + && a.verticalSliderSize === b.verticalSliderSize + && a.mouseWheelScrollSensitivity === b.mouseWheelScrollSensitivity + ); + } + /** - * Right position for the overview ruler + * @internal */ - readonly right: number; + private static _equalsMinimapOptions(a: InternalEditorMinimapOptions, b: InternalEditorMinimapOptions): boolean { + return ( + a.enabled === b.enabled + && a.renderCharacters === b.renderCharacters + && a.maxColumn === b.maxColumn + ); + } + + private static _equalsNumberArrays(a: number[], b: number[]): boolean { + if (a.length !== b.length) { + return false; + } + for (let i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { + return false; + } + } + return true; + } /** * @internal */ - constructor(source: { - width: number; - height: number; - top: number; - right: number; - }) { - this.width = source.width | 0; - this.height = source.height | 0; - this.top = source.top | 0; - this.right = source.right | 0; + private static _equalsWrappingInfo(a: EditorWrappingInfo, b: EditorWrappingInfo): boolean { + return ( + a.inDiffEditor === b.inDiffEditor + && a.isDominatedByLongLines === b.isDominatedByLongLines + && a.isWordWrapMinified === b.isWordWrapMinified + && a.isViewportWrapping === b.isViewportWrapping + && a.wrappingColumn === b.wrappingColumn + && a.wrappingIndent === b.wrappingIndent + && a.wordWrapBreakBeforeCharacters === b.wordWrapBreakBeforeCharacters + && a.wordWrapBreakAfterCharacters === b.wordWrapBreakAfterCharacters + && a.wordWrapBreakObtrusiveCharacters === b.wordWrapBreakObtrusiveCharacters + ); } /** * @internal */ - public equals(other: OverviewRulerPosition): boolean { + private static _equalsContribOptions(a: EditorContribOptions, b: EditorContribOptions): boolean { + return ( + a.selectionClipboard === b.selectionClipboard + && a.hover === b.hover + && a.contextmenu === b.contextmenu + && InternalEditorOptions._equalsQuickSuggestions(a.quickSuggestions, b.quickSuggestions) + && a.quickSuggestionsDelay === b.quickSuggestionsDelay + && a.parameterHints === b.parameterHints + && a.iconsInSuggestions === b.iconsInSuggestions + && a.formatOnType === b.formatOnType + && a.formatOnPaste === b.formatOnPaste + && a.suggestOnTriggerCharacters === b.suggestOnTriggerCharacters + && a.acceptSuggestionOnEnter === b.acceptSuggestionOnEnter + && a.acceptSuggestionOnCommitCharacter === b.acceptSuggestionOnCommitCharacter + && a.snippetSuggestions === b.snippetSuggestions + && a.emptySelectionClipboard === b.emptySelectionClipboard + && a.wordBasedSuggestions === b.wordBasedSuggestions + && a.suggestFontSize === b.suggestFontSize + && a.suggestLineHeight === b.suggestLineHeight + && a.selectionHighlight === b.selectionHighlight + && a.occurrencesHighlight === b.occurrencesHighlight + && a.codeLens === b.codeLens + && a.folding === b.folding + && a.hideFoldIcons === b.hideFoldIcons + && a.matchBrackets === b.matchBrackets + ); + } + + private static _equalsQuickSuggestions(a: boolean | { other: boolean, comments: boolean, strings: boolean }, b: boolean | { other: boolean, comments: boolean, strings: boolean }): boolean { + if (typeof a === 'boolean') { + if (typeof b !== 'boolean') { + return false; + } + return a === b; + } + if (typeof b === 'boolean') { + return false; + } return ( - this.width === other.width - && this.height === other.height - && this.top === other.top - && this.right === other.right + a.comments === b.comments + && a.other === b.other + && a.strings === b.strings ); } } +/** + * A description for the overview ruler position. + */ +export interface OverviewRulerPosition { + /** + * Width of the overview ruler + */ + readonly width: number; + /** + * Height of the overview ruler + */ + readonly height: number; + /** + * Top position for the overview ruler + */ + readonly top: number; + /** + * Right position for the overview ruler + */ + readonly right: number; +} + /** * The internal layout details of the editor. */ -export class EditorLayoutInfo { - readonly _editorLayoutInfoBrand: void; +export interface EditorLayoutInfo { /** * Full editor width. @@ -1321,87 +1126,14 @@ export class EditorLayoutInfo { * The position of the overview ruler. */ readonly overviewRuler: OverviewRulerPosition; - - /** - * @internal - */ - constructor(source: { - width: number; - height: number; - glyphMarginLeft: number; - glyphMarginWidth: number; - glyphMarginHeight: number; - lineNumbersLeft: number; - lineNumbersWidth: number; - lineNumbersHeight: number; - decorationsLeft: number; - decorationsWidth: number; - decorationsHeight: number; - contentLeft: number; - contentWidth: number; - contentHeight: number; - renderMinimap: RenderMinimap; - minimapWidth: number; - viewportColumn: number; - verticalScrollbarWidth: number; - horizontalScrollbarHeight: number; - overviewRuler: OverviewRulerPosition; - }) { - this.width = source.width | 0; - this.height = source.height | 0; - this.glyphMarginLeft = source.glyphMarginLeft | 0; - this.glyphMarginWidth = source.glyphMarginWidth | 0; - this.glyphMarginHeight = source.glyphMarginHeight | 0; - this.lineNumbersLeft = source.lineNumbersLeft | 0; - this.lineNumbersWidth = source.lineNumbersWidth | 0; - this.lineNumbersHeight = source.lineNumbersHeight | 0; - this.decorationsLeft = source.decorationsLeft | 0; - this.decorationsWidth = source.decorationsWidth | 0; - this.decorationsHeight = source.decorationsHeight | 0; - this.contentLeft = source.contentLeft | 0; - this.contentWidth = source.contentWidth | 0; - this.contentHeight = source.contentHeight | 0; - this.renderMinimap = source.renderMinimap | 0; - this.minimapWidth = source.minimapWidth | 0; - this.viewportColumn = source.viewportColumn | 0; - this.verticalScrollbarWidth = source.verticalScrollbarWidth | 0; - this.horizontalScrollbarHeight = source.horizontalScrollbarHeight | 0; - this.overviewRuler = source.overviewRuler; - } - - /** - * @internal - */ - public equals(other: EditorLayoutInfo): boolean { - return ( - this.width === other.width - && this.height === other.height - && this.glyphMarginLeft === other.glyphMarginLeft - && this.glyphMarginWidth === other.glyphMarginWidth - && this.glyphMarginHeight === other.glyphMarginHeight - && this.lineNumbersLeft === other.lineNumbersLeft - && this.lineNumbersWidth === other.lineNumbersWidth - && this.lineNumbersHeight === other.lineNumbersHeight - && this.decorationsLeft === other.decorationsLeft - && this.decorationsWidth === other.decorationsWidth - && this.decorationsHeight === other.decorationsHeight - && this.contentLeft === other.contentLeft - && this.contentWidth === other.contentWidth - && this.contentHeight === other.contentHeight - && this.renderMinimap === other.renderMinimap - && this.minimapWidth === other.minimapWidth - && this.viewportColumn === other.viewportColumn - && this.verticalScrollbarWidth === other.verticalScrollbarWidth - && this.horizontalScrollbarHeight === other.horizontalScrollbarHeight - && this.overviewRuler.equals(other.overviewRuler) - ); - } } /** * An event describing that the configuration of the editor has changed. */ export interface IConfigurationChangedEvent { + readonly canUseTranslate3d: boolean; + readonly editorClassName: boolean; readonly lineHeight: boolean; readonly readOnly: boolean; readonly wordSeparators: boolean; @@ -1419,67 +1151,16 @@ export interface IConfigurationChangedEvent { /** * @internal */ -export class EnvironmentalOptions { - - public readonly outerWidth: number; - public readonly outerHeight: number; - public readonly fontInfo: FontInfo; - public readonly editorClassName: string; - public readonly isDominatedByLongLines: boolean; - public readonly lineNumbersDigitCount: number; - public readonly canUseTranslate3d: boolean; - public readonly pixelRatio: number; - public readonly tabFocusMode: boolean; - - constructor(opts: { - outerWidth: number; - outerHeight: number; - fontInfo: FontInfo; - editorClassName: string; - isDominatedByLongLines: boolean; - lineNumbersDigitCount: number; - canUseTranslate3d: boolean; - pixelRatio: number; - tabFocusMode: boolean; - }) { - this.outerWidth = opts.outerWidth; - this.outerHeight = opts.outerHeight; - this.fontInfo = opts.fontInfo; - this.editorClassName = opts.editorClassName; - this.isDominatedByLongLines = opts.isDominatedByLongLines; - this.lineNumbersDigitCount = opts.lineNumbersDigitCount; - this.canUseTranslate3d = opts.canUseTranslate3d; - this.pixelRatio = opts.pixelRatio; - this.tabFocusMode = opts.tabFocusMode; - } -} - -/** - * Validated scrollbar options for the editor. - * @internal - */ -export interface IValidatedEditorScrollbarOptions { - vertical: ScrollbarVisibility; - horizontal: ScrollbarVisibility; - arrowSize: number; - useShadows: boolean; - verticalHasArrows: boolean; - horizontalHasArrows: boolean; - horizontalScrollbarSize: number; - horizontalSliderSize: number; - verticalScrollbarSize: number; - verticalSliderSize: number; - handleMouseWheel: boolean; -} - -/** - * Validated minimap options for the editor. - * @internal - */ -export interface IValidatedEditorMinimapOptions { - enabled: boolean; - renderCharacters: boolean; - maxColumn: number; +export interface IEnvironmentalOptions { + readonly outerWidth: number; + readonly outerHeight: number; + readonly fontInfo: FontInfo; + readonly editorClassName: string; + readonly isDominatedByLongLines: boolean; + readonly lineNumbersDigitCount: number; + readonly canUseTranslate3d: boolean; + readonly pixelRatio: number; + readonly tabFocusMode: boolean; } /** @@ -1488,36 +1169,12 @@ export interface IValidatedEditorMinimapOptions { */ export interface IValidatedEditorOptions { inDiffEditor: boolean; - experimentalScreenReader: boolean; - ariaLabel: string; - rulers: number[]; wordSeparators: string; - selectionClipboard: boolean; - renderLineNumbers: boolean; - renderCustomLineNumbers: (lineNumber: number) => string; - renderRelativeLineNumbers: boolean; - selectOnLineNumbers: boolean; lineNumbersMinChars: number; - glyphMargin: boolean; lineDecorationsWidth: number | string; - revealHorizontalRightPadding: number; - roundedSelection: boolean; - theme: string; readOnly: boolean; - scrollbar: IValidatedEditorScrollbarOptions; - minimap: IValidatedEditorMinimapOptions; - fixedOverflowWidgets: boolean; - overviewRulerLanes: number; - overviewRulerBorder: boolean; - cursorBlinking: TextEditorCursorBlinkingStyle; - mouseWheelZoom: boolean; mouseStyle: 'text' | 'default' | 'copy'; - cursorStyle: TextEditorCursorStyle; - fontLigatures: boolean; disableTranslate3d: boolean; - disableMonospaceOptimizations: boolean; - hideCursorInOverviewRuler: boolean; - scrollBeyondLastLine: boolean; automaticLayout: boolean; wordWrap: 'off' | 'on' | 'wordWrapColumn' | 'bounded'; wordWrapColumn: number; @@ -1526,37 +1183,12 @@ export interface IValidatedEditorOptions { wordWrapBreakBeforeCharacters: string; wordWrapBreakAfterCharacters: string; wordWrapBreakObtrusiveCharacters: string; - stopRenderingLineAfter: number; - hover: boolean; - contextmenu: boolean; - mouseWheelScrollSensitivity: number; - quickSuggestions: boolean | { other: boolean, comments: boolean, strings: boolean }; - quickSuggestionsDelay: number; - parameterHints: boolean; - iconsInSuggestions: boolean; autoClosingBrackets: boolean; - formatOnType: boolean; - formatOnPaste: boolean; dragAndDrop: boolean; - suggestOnTriggerCharacters: boolean; - acceptSuggestionOnEnter: boolean; - acceptSuggestionOnCommitCharacter: boolean; - snippetSuggestions: 'top' | 'bottom' | 'inline' | 'none'; - emptySelectionClipboard: boolean; - wordBasedSuggestions: boolean; - suggestFontSize: number; - suggestLineHeight: number; - selectionHighlight: boolean; - occurrencesHighlight: boolean; - codeLens: boolean; - folding: boolean; - hideFoldIcons: boolean; - matchBrackets: boolean; - renderWhitespace: 'none' | 'boundary' | 'all'; - renderControlCharacters: boolean; - renderIndentGuides: boolean; - renderLineHighlight: 'none' | 'gutter' | 'line' | 'all'; useTabStops: boolean; + + viewInfo: InternalEditorViewOptions; + contribInfo: EditorContribOptions; } function _boolean(value: any, defaultValue: T): boolean | T { @@ -1667,6 +1299,84 @@ export class EditorOptionsValidator { * i.e. since they can be defined by the user, they might be invalid. */ public static validate(opts: IEditorOptions, defaults: IValidatedEditorOptions): IValidatedEditorOptions { + let wordWrap = opts.wordWrap; + { + // Compatibility with old true or false values + if (wordWrap === true) { + wordWrap = 'on'; + } else if (wordWrap === false) { + wordWrap = 'off'; + } + + wordWrap = _stringSet<'off' | 'on' | 'wordWrapColumn' | 'bounded'>(wordWrap, defaults.wordWrap, ['off', 'on', 'wordWrapColumn', 'bounded']); + } + + const viewInfo = this._sanitizeViewInfo(opts, defaults.viewInfo); + const contribInfo = this._sanitizeContribInfo(opts, defaults.contribInfo); + + return { + inDiffEditor: _boolean(opts.inDiffEditor, defaults.inDiffEditor), + wordSeparators: _string(opts.wordSeparators, defaults.wordSeparators), + lineNumbersMinChars: _clampedInt(opts.lineNumbersMinChars, defaults.lineNumbersMinChars, 1, 10), + lineDecorationsWidth: (typeof opts.lineDecorationsWidth === 'undefined' ? defaults.lineDecorationsWidth : opts.lineDecorationsWidth), + readOnly: _boolean(opts.readOnly, defaults.readOnly), + mouseStyle: _stringSet<'text' | 'default' | 'copy'>(opts.mouseStyle, defaults.mouseStyle, ['text', 'default', 'copy']), + disableTranslate3d: _boolean(opts.disableTranslate3d, defaults.disableTranslate3d), + automaticLayout: _boolean(opts.automaticLayout, defaults.automaticLayout), + wordWrap: wordWrap, + wordWrapColumn: _clampedInt(opts.wordWrapColumn, defaults.wordWrapColumn, 1, Constants.MAX_SAFE_SMALL_INTEGER), + wordWrapMinified: _boolean(opts.wordWrapMinified, defaults.wordWrapMinified), + wrappingIndent: _wrappingIndentFromString(opts.wrappingIndent, defaults.wrappingIndent), + wordWrapBreakBeforeCharacters: _string(opts.wordWrapBreakBeforeCharacters, defaults.wordWrapBreakBeforeCharacters), + wordWrapBreakAfterCharacters: _string(opts.wordWrapBreakAfterCharacters, defaults.wordWrapBreakAfterCharacters), + wordWrapBreakObtrusiveCharacters: _string(opts.wordWrapBreakObtrusiveCharacters, defaults.wordWrapBreakObtrusiveCharacters), + autoClosingBrackets: _boolean(opts.autoClosingBrackets, defaults.autoClosingBrackets), + dragAndDrop: _boolean(opts.dragAndDrop, defaults.dragAndDrop), + useTabStops: _boolean(opts.useTabStops, defaults.useTabStops), + viewInfo: viewInfo, + contribInfo: contribInfo, + }; + } + + private static _sanitizeScrollbarOpts(opts: IEditorScrollbarOptions, defaults: InternalEditorScrollbarOptions, mouseWheelScrollSensitivity: number): InternalEditorScrollbarOptions { + if (typeof opts !== 'object') { + return defaults; + } + const horizontalScrollbarSize = _clampedInt(opts.horizontalScrollbarSize, defaults.horizontalScrollbarSize, 0, 1000); + const verticalScrollbarSize = _clampedInt(opts.verticalScrollbarSize, defaults.verticalScrollbarSize, 0, 1000); + return { + vertical: _scrollbarVisibilityFromString(opts.vertical, defaults.vertical), + horizontal: _scrollbarVisibilityFromString(opts.horizontal, defaults.horizontal), + + arrowSize: _clampedInt(opts.arrowSize, defaults.arrowSize, 0, 1000), + useShadows: _boolean(opts.useShadows, defaults.useShadows), + + verticalHasArrows: _boolean(opts.verticalHasArrows, defaults.verticalHasArrows), + horizontalHasArrows: _boolean(opts.horizontalHasArrows, defaults.horizontalHasArrows), + + horizontalScrollbarSize: horizontalScrollbarSize, + horizontalSliderSize: _clampedInt(opts.horizontalSliderSize, horizontalScrollbarSize, 0, 1000), + + verticalScrollbarSize: verticalScrollbarSize, + verticalSliderSize: _clampedInt(opts.verticalSliderSize, verticalScrollbarSize, 0, 1000), + + handleMouseWheel: _boolean(opts.handleMouseWheel, defaults.handleMouseWheel), + mouseWheelScrollSensitivity: mouseWheelScrollSensitivity + }; + } + + private static _sanitizeMinimapOpts(opts: IEditorMinimapOptions, defaults: InternalEditorMinimapOptions): InternalEditorMinimapOptions { + if (typeof opts !== 'object') { + return defaults; + } + return { + enabled: _boolean(opts.enabled, defaults.enabled), + renderCharacters: _boolean(opts.renderCharacters, defaults.renderCharacters), + maxColumn: _clampedInt(opts.maxColumn, defaults.maxColumn, 1, 10000), + }; + } + + private static _sanitizeViewInfo(opts: IEditorOptions, defaults: InternalEditorViewOptions): InternalEditorViewOptions { let rulers: number[] = []; if (Array.isArray(opts.rulers)) { @@ -1709,17 +1419,8 @@ export class EditorOptionsValidator { } } - let wordWrap = opts.wordWrap; - { - // Compatibility with old true or false values - if (wordWrap === true) { - wordWrap = 'on'; - } else if (wordWrap === false) { - wordWrap = 'off'; - } - - wordWrap = _stringSet<'off' | 'on' | 'wordWrapColumn' | 'bounded'>(wordWrap, defaults.wordWrap, ['off', 'on', 'wordWrapColumn', 'bounded']); - } + const fontLigatures = _boolean(opts.fontLigatures, defaults.fontLigatures); + const disableMonospaceOptimizations = _boolean(opts.disableMonospaceOptimizations, defaults.disableMonospaceOptimizations) || fontLigatures; let renderWhitespace = opts.renderWhitespace; { @@ -1743,71 +1444,59 @@ export class EditorOptionsValidator { renderLineHighlight = _stringSet<'none' | 'gutter' | 'line' | 'all'>(opts.renderLineHighlight, defaults.renderLineHighlight, ['none', 'gutter', 'line', 'all']); } - const scrollbar = this._sanitizeScrollbarOpts(opts.scrollbar, defaults.scrollbar); + const mouseWheelScrollSensitivity = _float(opts.mouseWheelScrollSensitivity, defaults.scrollbar.mouseWheelScrollSensitivity); + const scrollbar = this._sanitizeScrollbarOpts(opts.scrollbar, defaults.scrollbar, mouseWheelScrollSensitivity); const minimap = this._sanitizeMinimapOpts(opts.minimap, defaults.minimap); - let quickSuggestions: boolean | { other: boolean, comments: boolean, strings: boolean }; - if (typeof opts.quickSuggestions === 'object') { - quickSuggestions = { other: true, ...opts.quickSuggestions }; - } else { - quickSuggestions = _boolean(opts.quickSuggestions, defaults.quickSuggestions); - } - - const fontLigatures = _boolean(opts.fontLigatures, defaults.fontLigatures); - const disableTranslate3d = _boolean(opts.disableTranslate3d, defaults.disableTranslate3d) || fontLigatures; - return { - inDiffEditor: _boolean(opts.inDiffEditor, defaults.inDiffEditor), + theme: _string(opts.theme, defaults.theme), + disableMonospaceOptimizations: disableMonospaceOptimizations, experimentalScreenReader: _boolean(opts.experimentalScreenReader, defaults.experimentalScreenReader), - ariaLabel: _string(opts.ariaLabel, defaults.ariaLabel), rulers: rulers, - wordSeparators: _string(opts.wordSeparators, defaults.wordSeparators), - selectionClipboard: _boolean(opts.selectionClipboard, defaults.selectionClipboard), + ariaLabel: _string(opts.ariaLabel, defaults.ariaLabel), renderLineNumbers: renderLineNumbers, renderCustomLineNumbers: renderCustomLineNumbers, renderRelativeLineNumbers: renderRelativeLineNumbers, selectOnLineNumbers: _boolean(opts.selectOnLineNumbers, defaults.selectOnLineNumbers), - lineNumbersMinChars: _clampedInt(opts.lineNumbersMinChars, defaults.lineNumbersMinChars, 1, 10), glyphMargin: _boolean(opts.glyphMargin, defaults.glyphMargin), - lineDecorationsWidth: (typeof opts.lineDecorationsWidth === 'undefined' ? defaults.lineDecorationsWidth : opts.lineDecorationsWidth), revealHorizontalRightPadding: _clampedInt(opts.revealHorizontalRightPadding, defaults.revealHorizontalRightPadding, 0, 1000), roundedSelection: _boolean(opts.roundedSelection, defaults.roundedSelection), - theme: _string(opts.theme, defaults.theme), - readOnly: _boolean(opts.readOnly, defaults.readOnly), - scrollbar: scrollbar, - minimap: minimap, - fixedOverflowWidgets: _boolean(opts.fixedOverflowWidgets, defaults.fixedOverflowWidgets), overviewRulerLanes: _clampedInt(opts.overviewRulerLanes, defaults.overviewRulerLanes, 0, 3), overviewRulerBorder: _boolean(opts.overviewRulerBorder, defaults.overviewRulerBorder), cursorBlinking: _cursorBlinkingStyleFromString(opts.cursorBlinking, defaults.cursorBlinking), mouseWheelZoom: _boolean(opts.mouseWheelZoom, defaults.mouseWheelZoom), - mouseStyle: _stringSet<'text' | 'default' | 'copy'>(opts.mouseStyle, defaults.mouseStyle, ['text', 'default', 'copy']), cursorStyle: _cursorStyleFromString(opts.cursorStyle, defaults.cursorStyle), - fontLigatures: fontLigatures, - disableTranslate3d: disableTranslate3d, - disableMonospaceOptimizations: _boolean(opts.disableMonospaceOptimizations, defaults.disableMonospaceOptimizations), hideCursorInOverviewRuler: _boolean(opts.hideCursorInOverviewRuler, defaults.hideCursorInOverviewRuler), scrollBeyondLastLine: _boolean(opts.scrollBeyondLastLine, defaults.scrollBeyondLastLine), - automaticLayout: _boolean(opts.automaticLayout, defaults.automaticLayout), - wordWrap: wordWrap, - wordWrapColumn: _clampedInt(opts.wordWrapColumn, defaults.wordWrapColumn, 1, Constants.MAX_SAFE_SMALL_INTEGER), - wordWrapMinified: _boolean(opts.wordWrapMinified, defaults.wordWrapMinified), - wrappingIndent: _wrappingIndentFromString(opts.wrappingIndent, defaults.wrappingIndent), - wordWrapBreakBeforeCharacters: _string(opts.wordWrapBreakBeforeCharacters, defaults.wordWrapBreakBeforeCharacters), - wordWrapBreakAfterCharacters: _string(opts.wordWrapBreakAfterCharacters, defaults.wordWrapBreakAfterCharacters), - wordWrapBreakObtrusiveCharacters: _string(opts.wordWrapBreakObtrusiveCharacters, defaults.wordWrapBreakObtrusiveCharacters), stopRenderingLineAfter: _clampedInt(opts.stopRenderingLineAfter, defaults.stopRenderingLineAfter, -1, Constants.MAX_SAFE_SMALL_INTEGER), + renderWhitespace: renderWhitespace, + renderControlCharacters: _boolean(opts.renderControlCharacters, defaults.renderControlCharacters), + fontLigatures: fontLigatures, + renderIndentGuides: _boolean(opts.renderIndentGuides, defaults.renderIndentGuides), + renderLineHighlight: renderLineHighlight, + scrollbar: scrollbar, + minimap: minimap, + fixedOverflowWidgets: _boolean(opts.fixedOverflowWidgets, defaults.fixedOverflowWidgets), + }; + } + + private static _sanitizeContribInfo(opts: IEditorOptions, defaults: EditorContribOptions): EditorContribOptions { + let quickSuggestions: boolean | { other: boolean, comments: boolean, strings: boolean }; + if (typeof opts.quickSuggestions === 'object') { + quickSuggestions = { other: true, ...opts.quickSuggestions }; + } else { + quickSuggestions = _boolean(opts.quickSuggestions, defaults.quickSuggestions); + } + return { + selectionClipboard: _boolean(opts.selectionClipboard, defaults.selectionClipboard), hover: _boolean(opts.hover, defaults.hover), contextmenu: _boolean(opts.contextmenu, defaults.contextmenu), - mouseWheelScrollSensitivity: _float(opts.mouseWheelScrollSensitivity, defaults.mouseWheelScrollSensitivity), quickSuggestions: quickSuggestions, quickSuggestionsDelay: _clampedInt(opts.quickSuggestionsDelay, defaults.quickSuggestionsDelay, Constants.MIN_SAFE_SMALL_INTEGER, Constants.MAX_SAFE_SMALL_INTEGER), parameterHints: _boolean(opts.parameterHints, defaults.parameterHints), iconsInSuggestions: _boolean(opts.iconsInSuggestions, defaults.iconsInSuggestions), - autoClosingBrackets: _boolean(opts.autoClosingBrackets, defaults.autoClosingBrackets), formatOnType: _boolean(opts.formatOnType, defaults.formatOnType), formatOnPaste: _boolean(opts.formatOnPaste, defaults.formatOnPaste), - dragAndDrop: _boolean(opts.dragAndDrop, defaults.dragAndDrop), suggestOnTriggerCharacters: _boolean(opts.suggestOnTriggerCharacters, defaults.suggestOnTriggerCharacters), acceptSuggestionOnEnter: _boolean(opts.acceptSuggestionOnEnter, defaults.acceptSuggestionOnEnter), acceptSuggestionOnCommitCharacter: _boolean(opts.acceptSuggestionOnCommitCharacter, defaults.acceptSuggestionOnCommitCharacter), @@ -1822,48 +1511,6 @@ export class EditorOptionsValidator { folding: _boolean(opts.folding, defaults.folding), hideFoldIcons: _boolean(opts.hideFoldIcons, defaults.hideFoldIcons), matchBrackets: _boolean(opts.matchBrackets, defaults.matchBrackets), - renderWhitespace: renderWhitespace, - renderControlCharacters: _boolean(opts.renderControlCharacters, defaults.renderControlCharacters), - renderIndentGuides: _boolean(opts.renderIndentGuides, defaults.renderIndentGuides), - renderLineHighlight: renderLineHighlight, - useTabStops: _boolean(opts.useTabStops, defaults.useTabStops), - }; - } - - private static _sanitizeScrollbarOpts(opts: IEditorScrollbarOptions, defaults: IValidatedEditorScrollbarOptions): IValidatedEditorScrollbarOptions { - if (typeof opts !== 'object') { - return defaults; - } - const horizontalScrollbarSize = _clampedInt(opts.horizontalScrollbarSize, defaults.horizontalScrollbarSize, 0, 1000); - const verticalScrollbarSize = _clampedInt(opts.verticalScrollbarSize, defaults.verticalScrollbarSize, 0, 1000); - return { - vertical: _scrollbarVisibilityFromString(opts.vertical, defaults.vertical), - horizontal: _scrollbarVisibilityFromString(opts.horizontal, defaults.horizontal), - - arrowSize: _clampedInt(opts.arrowSize, defaults.arrowSize, 0, 1000), - useShadows: _boolean(opts.useShadows, defaults.useShadows), - - verticalHasArrows: _boolean(opts.verticalHasArrows, defaults.verticalHasArrows), - horizontalHasArrows: _boolean(opts.horizontalHasArrows, defaults.horizontalHasArrows), - - horizontalScrollbarSize: horizontalScrollbarSize, - horizontalSliderSize: _clampedInt(opts.horizontalSliderSize, horizontalScrollbarSize, 0, 1000), - - verticalScrollbarSize: verticalScrollbarSize, - verticalSliderSize: _clampedInt(opts.verticalSliderSize, verticalScrollbarSize, 0, 1000), - - handleMouseWheel: _boolean(opts.handleMouseWheel, defaults.handleMouseWheel) - }; - } - - private static _sanitizeMinimapOpts(opts: IEditorMinimapOptions, defaults: IValidatedEditorMinimapOptions): IValidatedEditorMinimapOptions { - if (typeof opts !== 'object') { - return defaults; - } - return { - enabled: _boolean(opts.enabled, defaults.enabled), - renderCharacters: _boolean(opts.renderCharacters, defaults.renderCharacters), - maxColumn: _clampedInt(opts.maxColumn, defaults.maxColumn, 1, 10000), }; } } @@ -1873,7 +1520,7 @@ export class EditorOptionsValidator { */ export class InternalEditorOptionsFactory { - public static createInternalEditorOptions(env: EnvironmentalOptions, opts: IValidatedEditorOptions) { + public static createInternalEditorOptions(env: IEnvironmentalOptions, opts: IValidatedEditorOptions) { let lineDecorationsWidth: number; if (typeof opts.lineDecorationsWidth === 'string' && /^\d+(\.\d+)?ch$/.test(opts.lineDecorationsWidth)) { @@ -1882,34 +1529,34 @@ export class InternalEditorOptionsFactory { } else { lineDecorationsWidth = _clampedInt(opts.lineDecorationsWidth, 0, 0, 1000); } - if (opts.folding) { + if (opts.contribInfo.folding) { lineDecorationsWidth += 16; } const layoutInfo = EditorLayoutProvider.compute({ outerWidth: env.outerWidth, outerHeight: env.outerHeight, - showGlyphMargin: opts.glyphMargin, + showGlyphMargin: opts.viewInfo.glyphMargin, lineHeight: env.fontInfo.lineHeight, - showLineNumbers: opts.renderLineNumbers, + showLineNumbers: opts.viewInfo.renderLineNumbers, lineNumbersMinChars: opts.lineNumbersMinChars, lineNumbersDigitCount: env.lineNumbersDigitCount, lineDecorationsWidth: lineDecorationsWidth, typicalHalfwidthCharacterWidth: env.fontInfo.typicalHalfwidthCharacterWidth, maxDigitWidth: env.fontInfo.maxDigitWidth, - verticalScrollbarWidth: opts.scrollbar.verticalScrollbarSize, - horizontalScrollbarHeight: opts.scrollbar.horizontalScrollbarSize, - scrollbarArrowSize: opts.scrollbar.arrowSize, - verticalScrollbarHasArrows: opts.scrollbar.verticalHasArrows, - minimap: opts.minimap.enabled, - minimapRenderCharacters: opts.minimap.renderCharacters, - minimapMaxColumn: opts.minimap.maxColumn, + verticalScrollbarWidth: opts.viewInfo.scrollbar.verticalScrollbarSize, + horizontalScrollbarHeight: opts.viewInfo.scrollbar.horizontalScrollbarSize, + scrollbarArrowSize: opts.viewInfo.scrollbar.arrowSize, + verticalScrollbarHasArrows: opts.viewInfo.scrollbar.verticalHasArrows, + minimap: opts.viewInfo.minimap.enabled, + minimapRenderCharacters: opts.viewInfo.minimap.renderCharacters, + minimapMaxColumn: opts.viewInfo.minimap.maxColumn, pixelRatio: env.pixelRatio }); let bareWrappingInfo: { isWordWrapMinified: boolean; isViewportWrapping: boolean; wrappingColumn: number; } = null; { - let wordWrap = opts.wordWrap; + const wordWrap = opts.wordWrap; const wordWrapColumn = opts.wordWrapColumn; const wordWrapMinified = opts.wordWrapMinified; @@ -1947,7 +1594,7 @@ export class InternalEditorOptionsFactory { } } - const wrappingInfo = new EditorWrappingInfo({ + const wrappingInfo: EditorWrappingInfo = { inDiffEditor: opts.inDiffEditor, isDominatedByLongLines: env.isDominatedByLongLines, isWordWrapMinified: bareWrappingInfo.isWordWrapMinified, @@ -1957,90 +1604,11 @@ export class InternalEditorOptionsFactory { wordWrapBreakBeforeCharacters: opts.wordWrapBreakBeforeCharacters, wordWrapBreakAfterCharacters: opts.wordWrapBreakAfterCharacters, wordWrapBreakObtrusiveCharacters: opts.wordWrapBreakObtrusiveCharacters, - }); - - const viewInfo = new InternalEditorViewOptions({ - theme: opts.theme, - canUseTranslate3d: opts.disableTranslate3d ? false : env.canUseTranslate3d, // todo - disableMonospaceOptimizations: opts.disableMonospaceOptimizations, - experimentalScreenReader: opts.experimentalScreenReader, - rulers: opts.rulers, - ariaLabel: opts.ariaLabel, - renderLineNumbers: opts.renderLineNumbers, - renderCustomLineNumbers: opts.renderCustomLineNumbers, - renderRelativeLineNumbers: opts.renderRelativeLineNumbers, - selectOnLineNumbers: opts.selectOnLineNumbers, - glyphMargin: opts.glyphMargin, - revealHorizontalRightPadding: opts.revealHorizontalRightPadding, - roundedSelection: opts.roundedSelection, - overviewRulerLanes: opts.overviewRulerLanes, - overviewRulerBorder: opts.overviewRulerBorder, - cursorBlinking: opts.cursorBlinking, - mouseWheelZoom: opts.mouseWheelZoom, - cursorStyle: opts.cursorStyle, - hideCursorInOverviewRuler: opts.hideCursorInOverviewRuler, - scrollBeyondLastLine: opts.scrollBeyondLastLine, - editorClassName: env.editorClassName, - stopRenderingLineAfter: opts.stopRenderingLineAfter, - renderWhitespace: opts.renderWhitespace, - renderControlCharacters: opts.renderControlCharacters, - fontLigatures: opts.fontLigatures, - renderIndentGuides: opts.renderIndentGuides, - renderLineHighlight: opts.renderLineHighlight, - scrollbar: new InternalEditorScrollbarOptions({ // todo - vertical: opts.scrollbar.vertical, - horizontal: opts.scrollbar.horizontal, - - arrowSize: opts.scrollbar.arrowSize, - useShadows: opts.scrollbar.useShadows, - - verticalHasArrows: opts.scrollbar.verticalHasArrows, - horizontalHasArrows: opts.scrollbar.horizontalHasArrows, - - horizontalScrollbarSize: opts.scrollbar.horizontalScrollbarSize, - horizontalSliderSize: opts.scrollbar.horizontalSliderSize, - - verticalScrollbarSize: opts.scrollbar.verticalScrollbarSize, - verticalSliderSize: opts.scrollbar.verticalSliderSize, - - handleMouseWheel: opts.scrollbar.handleMouseWheel, - mouseWheelScrollSensitivity: opts.mouseWheelScrollSensitivity - }), - minimap: new InternalEditorMinimapOptions({ // todo - enabled: opts.minimap.enabled, - renderCharacters: opts.minimap.renderCharacters, - maxColumn: opts.minimap.maxColumn, - }), - fixedOverflowWidgets: opts.fixedOverflowWidgets - }); - - const contribInfo = new EditorContribOptions({ - selectionClipboard: opts.selectionClipboard, - hover: opts.hover, - contextmenu: opts.contextmenu, - quickSuggestions: opts.quickSuggestions, - quickSuggestionsDelay: opts.quickSuggestionsDelay, - parameterHints: opts.parameterHints, - iconsInSuggestions: opts.iconsInSuggestions, - formatOnType: opts.formatOnType, - formatOnPaste: opts.formatOnPaste, - suggestOnTriggerCharacters: opts.suggestOnTriggerCharacters, - acceptSuggestionOnEnter: opts.acceptSuggestionOnEnter, - acceptSuggestionOnCommitCharacter: opts.acceptSuggestionOnCommitCharacter, - snippetSuggestions: opts.snippetSuggestions, - emptySelectionClipboard: opts.emptySelectionClipboard, - wordBasedSuggestions: opts.wordBasedSuggestions, - suggestFontSize: opts.suggestFontSize, - suggestLineHeight: opts.suggestLineHeight, - selectionHighlight: opts.selectionHighlight, - occurrencesHighlight: opts.occurrencesHighlight, - codeLens: opts.codeLens, - folding: opts.folding, - hideFoldIcons: opts.hideFoldIcons, - matchBrackets: opts.matchBrackets, - }); + }; return new InternalEditorOptions({ + canUseTranslate3d: opts.disableTranslate3d ? false : env.canUseTranslate3d, + editorClassName: env.editorClassName, lineHeight: env.fontInfo.lineHeight, readOnly: opts.readOnly, wordSeparators: opts.wordSeparators, @@ -2050,9 +1618,9 @@ export class InternalEditorOptionsFactory { dragAndDrop: opts.dragAndDrop, layoutInfo: layoutInfo, fontInfo: env.fontInfo, - viewInfo: viewInfo, + viewInfo: opts.viewInfo, wrappingInfo: wrappingInfo, - contribInfo: contribInfo, + contribInfo: opts.contribInfo, }); } } @@ -2170,7 +1738,7 @@ export class EditorLayoutProvider { const verticalArrowSize = (verticalScrollbarHasArrows ? scrollbarArrowSize : 0); - return new EditorLayoutInfo({ + return { width: outerWidth, height: outerHeight, @@ -2198,13 +1766,13 @@ export class EditorLayoutProvider { verticalScrollbarWidth: verticalScrollbarWidth, horizontalScrollbarHeight: horizontalScrollbarHeight, - overviewRuler: new OverviewRulerPosition({ + overviewRuler: { top: verticalArrowSize, width: verticalScrollbarWidth, height: (outerHeight - 2 * verticalArrowSize), right: 0 - }) - }); + } + }; } } @@ -2241,52 +1809,12 @@ export const EDITOR_MODEL_DEFAULTS = { */ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { inDiffEditor: false, - experimentalScreenReader: true, - ariaLabel: nls.localize('editorViewAccessibleLabel', "Editor content"), - rulers: [], wordSeparators: USUAL_WORD_SEPARATORS, - selectionClipboard: true, - renderLineNumbers: true, - renderCustomLineNumbers: null, - renderRelativeLineNumbers: false, - selectOnLineNumbers: true, lineNumbersMinChars: 5, - glyphMargin: true, lineDecorationsWidth: 10, - revealHorizontalRightPadding: 30, - roundedSelection: true, - theme: 'vs', readOnly: false, - scrollbar: { - vertical: ScrollbarVisibility.Auto, - horizontal: ScrollbarVisibility.Auto, - arrowSize: 11, - useShadows: true, - verticalHasArrows: false, - horizontalHasArrows: false, - horizontalScrollbarSize: 10, - horizontalSliderSize: 10, - verticalScrollbarSize: 14, - verticalSliderSize: 14, - handleMouseWheel: true - }, - minimap: { - enabled: false, - renderCharacters: true, - maxColumn: 120 - }, - fixedOverflowWidgets: false, - overviewRulerLanes: 2, - overviewRulerBorder: true, - cursorBlinking: TextEditorCursorBlinkingStyle.Blink, - mouseWheelZoom: false, mouseStyle: 'text', - cursorStyle: TextEditorCursorStyle.Line, - fontLigatures: false, disableTranslate3d: false, - disableMonospaceOptimizations: false, - hideCursorInOverviewRuler: false, - scrollBeyondLastLine: true, automaticLayout: false, wordWrap: 'off', wordWrapColumn: 80, @@ -2295,35 +1823,81 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { wordWrapBreakBeforeCharacters: '([{‘“〈《「『【〔([{「£¥$£¥++', wordWrapBreakAfterCharacters: ' \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー’”〉》」』】〕)]}」', wordWrapBreakObtrusiveCharacters: '.', - stopRenderingLineAfter: 10000, - hover: true, - contextmenu: true, - mouseWheelScrollSensitivity: 1, - quickSuggestions: { other: true, comments: false, strings: false }, - quickSuggestionsDelay: 10, - parameterHints: true, - iconsInSuggestions: true, autoClosingBrackets: true, - formatOnType: false, - formatOnPaste: false, dragAndDrop: false, - suggestOnTriggerCharacters: true, - acceptSuggestionOnEnter: true, - acceptSuggestionOnCommitCharacter: true, - snippetSuggestions: 'inline', - emptySelectionClipboard: true, - wordBasedSuggestions: true, - suggestFontSize: 0, - suggestLineHeight: 0, - selectionHighlight: true, - occurrencesHighlight: true, - codeLens: true, - folding: true, - hideFoldIcons: true, - matchBrackets: true, - renderWhitespace: 'none', - renderControlCharacters: false, - renderIndentGuides: false, - renderLineHighlight: 'line', useTabStops: true, + + viewInfo: { + theme: 'vs', + disableMonospaceOptimizations: false, + experimentalScreenReader: true, + rulers: [], + ariaLabel: nls.localize('editorViewAccessibleLabel', "Editor content"), + renderLineNumbers: true, + renderCustomLineNumbers: null, + renderRelativeLineNumbers: false, + selectOnLineNumbers: true, + glyphMargin: true, + revealHorizontalRightPadding: 30, + roundedSelection: true, + overviewRulerLanes: 2, + overviewRulerBorder: true, + cursorBlinking: TextEditorCursorBlinkingStyle.Blink, + mouseWheelZoom: false, + cursorStyle: TextEditorCursorStyle.Line, + hideCursorInOverviewRuler: false, + scrollBeyondLastLine: true, + stopRenderingLineAfter: 10000, + renderWhitespace: 'none', + renderControlCharacters: false, + fontLigatures: false, + renderIndentGuides: false, + renderLineHighlight: 'line', + scrollbar: { + vertical: ScrollbarVisibility.Auto, + horizontal: ScrollbarVisibility.Auto, + arrowSize: 11, + useShadows: true, + verticalHasArrows: false, + horizontalHasArrows: false, + horizontalScrollbarSize: 10, + horizontalSliderSize: 10, + verticalScrollbarSize: 14, + verticalSliderSize: 14, + handleMouseWheel: true, + mouseWheelScrollSensitivity: 1, + }, + minimap: { + enabled: false, + renderCharacters: true, + maxColumn: 120 + }, + fixedOverflowWidgets: false, + }, + + contribInfo: { + selectionClipboard: true, + hover: true, + contextmenu: true, + quickSuggestions: { other: true, comments: false, strings: false }, + quickSuggestionsDelay: 10, + parameterHints: true, + iconsInSuggestions: true, + formatOnType: false, + formatOnPaste: false, + suggestOnTriggerCharacters: true, + acceptSuggestionOnEnter: true, + acceptSuggestionOnCommitCharacter: true, + snippetSuggestions: 'inline', + emptySelectionClipboard: true, + wordBasedSuggestions: true, + suggestFontSize: 0, + suggestLineHeight: 0, + selectionHighlight: true, + occurrencesHighlight: true, + codeLens: true, + folding: true, + hideFoldIcons: true, + matchBrackets: true, + }, }; diff --git a/src/vs/editor/common/view/viewEvents.ts b/src/vs/editor/common/view/viewEvents.ts index 1500d49c191cb..9b29111f999b7 100644 --- a/src/vs/editor/common/view/viewEvents.ts +++ b/src/vs/editor/common/view/viewEvents.ts @@ -34,6 +34,8 @@ export class ViewConfigurationChangedEvent { public readonly type = ViewEventType.ViewConfigurationChanged; + public readonly canUseTranslate3d: boolean; + public readonly editorClassName: boolean; public readonly lineHeight: boolean; public readonly readOnly: boolean; public readonly layoutInfo: boolean; @@ -42,6 +44,8 @@ export class ViewConfigurationChangedEvent { public readonly wrappingInfo: boolean; constructor(source: IConfigurationChangedEvent) { + this.canUseTranslate3d = source.canUseTranslate3d; + this.editorClassName = source.editorClassName; this.lineHeight = source.lineHeight; this.readOnly = source.readOnly; this.layoutInfo = source.layoutInfo; diff --git a/src/vs/editor/contrib/suggest/browser/suggest.ts b/src/vs/editor/contrib/suggest/browser/suggest.ts index 1e79d2e180b03..6f6a5dbff7539 100644 --- a/src/vs/editor/contrib/suggest/browser/suggest.ts +++ b/src/vs/editor/contrib/suggest/browser/suggest.ts @@ -22,7 +22,7 @@ export const Context = { MultipleSuggestions: new RawContextKey('suggestWidgetMultipleSuggestions', false), MakesTextEdit: new RawContextKey('suggestionMakesTextEdit', true), AcceptOnKey: new RawContextKey('suggestionSupportsAcceptOnKey', true), - AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', EDITOR_DEFAULTS.acceptSuggestionOnEnter) + AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', EDITOR_DEFAULTS.contribInfo.acceptSuggestionOnEnter) }; export interface ISuggestionItem { diff --git a/src/vs/editor/editor.main.ts b/src/vs/editor/editor.main.ts index a06d77657e258..7820913b7de8f 100644 --- a/src/vs/editor/editor.main.ts +++ b/src/vs/editor/editor.main.ts @@ -18,8 +18,8 @@ import { EDITOR_DEFAULTS, WrappingIndent } from "vs/editor/common/config/editorO // Set defaults for standalone editor EDITOR_DEFAULTS.wrappingIndent = WrappingIndent.None; -EDITOR_DEFAULTS.folding = false; -EDITOR_DEFAULTS.glyphMargin = false; +(EDITOR_DEFAULTS.contribInfo).folding = false; +(EDITOR_DEFAULTS.viewInfo).glyphMargin = false; var global: any = self; global.monaco = createMonacoBaseAPI(); diff --git a/src/vs/editor/test/common/viewLayout/editorLayoutProvider.test.ts b/src/vs/editor/test/common/viewLayout/editorLayoutProvider.test.ts index b60d9b7cb6437..53ac8d481a61b 100644 --- a/src/vs/editor/test/common/viewLayout/editorLayoutProvider.test.ts +++ b/src/vs/editor/test/common/viewLayout/editorLayoutProvider.test.ts @@ -5,7 +5,7 @@ 'use strict'; import * as assert from 'assert'; -import { RenderMinimap, EditorLayoutInfo, OverviewRulerPosition, EditorLayoutProvider, IEditorLayoutProviderOpts } from 'vs/editor/common/config/editorOptions'; +import { RenderMinimap, EditorLayoutInfo, EditorLayoutProvider, IEditorLayoutProviderOpts } from 'vs/editor/common/config/editorOptions'; suite('Editor ViewLayout - EditorLayoutProvider', () => { @@ -34,40 +34,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 1000, - height: 800, + }, { + width: 1000, + height: 800, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 800, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 800, - lineNumbersLeft: 0, - lineNumbersWidth: 0, - lineNumbersHeight: 800, + lineNumbersLeft: 0, + lineNumbersWidth: 0, + lineNumbersHeight: 800, - decorationsLeft: 0, - decorationsWidth: 10, - decorationsHeight: 800, + decorationsLeft: 0, + decorationsWidth: 10, + decorationsHeight: 800, - contentLeft: 10, - contentWidth: 990, - contentHeight: 800, + contentLeft: 10, + contentWidth: 990, + contentHeight: 800, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 99, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 99, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 800, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 800, + right: 0 + } + }); }); test('EditorLayoutProvider 1.1', () => { @@ -90,40 +90,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 1000, - height: 800, + }, { + width: 1000, + height: 800, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 800, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 800, - lineNumbersLeft: 0, - lineNumbersWidth: 0, - lineNumbersHeight: 800, + lineNumbersLeft: 0, + lineNumbersWidth: 0, + lineNumbersHeight: 800, - decorationsLeft: 0, - decorationsWidth: 10, - decorationsHeight: 800, + decorationsLeft: 0, + decorationsWidth: 10, + decorationsHeight: 800, - contentLeft: 10, - contentWidth: 990, - contentHeight: 800, + contentLeft: 10, + contentWidth: 990, + contentHeight: 800, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 97, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 97, - verticalScrollbarWidth: 11, - horizontalScrollbarHeight: 12, + verticalScrollbarWidth: 11, + horizontalScrollbarHeight: 12, - overviewRuler: new OverviewRulerPosition({ - top: 13, - width: 11, - height: (800 - 2 * 13), - right: 0 - }) - })); + overviewRuler: { + top: 13, + width: 11, + height: (800 - 2 * 13), + right: 0 + } + }); }); test('EditorLayoutProvider 2', () => { @@ -146,40 +146,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 900, - height: 800, + }, { + width: 900, + height: 800, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 800, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 800, - lineNumbersLeft: 0, - lineNumbersWidth: 0, - lineNumbersHeight: 800, + lineNumbersLeft: 0, + lineNumbersWidth: 0, + lineNumbersHeight: 800, - decorationsLeft: 0, - decorationsWidth: 10, - decorationsHeight: 800, + decorationsLeft: 0, + decorationsWidth: 10, + decorationsHeight: 800, - contentLeft: 10, - contentWidth: 890, - contentHeight: 800, + contentLeft: 10, + contentWidth: 890, + contentHeight: 800, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 89, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 89, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 800, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 800, + right: 0 + } + }); }); test('EditorLayoutProvider 3', () => { @@ -202,40 +202,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 900, - height: 900, + }, { + width: 900, + height: 900, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 900, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 900, - lineNumbersLeft: 0, - lineNumbersWidth: 0, - lineNumbersHeight: 900, + lineNumbersLeft: 0, + lineNumbersWidth: 0, + lineNumbersHeight: 900, - decorationsLeft: 0, - decorationsWidth: 10, - decorationsHeight: 900, + decorationsLeft: 0, + decorationsWidth: 10, + decorationsHeight: 900, - contentLeft: 10, - contentWidth: 890, - contentHeight: 900, + contentLeft: 10, + contentWidth: 890, + contentHeight: 900, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 89, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 89, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 900, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 900, + right: 0 + } + }); }); test('EditorLayoutProvider 4', () => { @@ -258,40 +258,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 900, - height: 900, + }, { + width: 900, + height: 900, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 900, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 900, - lineNumbersLeft: 0, - lineNumbersWidth: 0, - lineNumbersHeight: 900, + lineNumbersLeft: 0, + lineNumbersWidth: 0, + lineNumbersHeight: 900, - decorationsLeft: 0, - decorationsWidth: 10, - decorationsHeight: 900, + decorationsLeft: 0, + decorationsWidth: 10, + decorationsHeight: 900, - contentLeft: 10, - contentWidth: 890, - contentHeight: 900, + contentLeft: 10, + contentWidth: 890, + contentHeight: 900, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 89, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 89, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 900, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 900, + right: 0 + } + }); }); test('EditorLayoutProvider 5', () => { @@ -314,40 +314,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 900, - height: 900, + }, { + width: 900, + height: 900, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 900, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 900, - lineNumbersLeft: 0, - lineNumbersWidth: 50, - lineNumbersHeight: 900, + lineNumbersLeft: 0, + lineNumbersWidth: 50, + lineNumbersHeight: 900, - decorationsLeft: 50, - decorationsWidth: 10, - decorationsHeight: 900, + decorationsLeft: 50, + decorationsWidth: 10, + decorationsHeight: 900, - contentLeft: 60, - contentWidth: 840, - contentHeight: 900, + contentLeft: 60, + contentWidth: 840, + contentHeight: 900, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 84, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 84, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 900, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 900, + right: 0 + } + }); }); test('EditorLayoutProvider 6', () => { @@ -370,40 +370,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 900, - height: 900, + }, { + width: 900, + height: 900, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 900, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 900, - lineNumbersLeft: 0, - lineNumbersWidth: 50, - lineNumbersHeight: 900, + lineNumbersLeft: 0, + lineNumbersWidth: 50, + lineNumbersHeight: 900, - decorationsLeft: 50, - decorationsWidth: 10, - decorationsHeight: 900, + decorationsLeft: 50, + decorationsWidth: 10, + decorationsHeight: 900, - contentLeft: 60, - contentWidth: 840, - contentHeight: 900, + contentLeft: 60, + contentWidth: 840, + contentHeight: 900, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 84, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 84, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 900, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 900, + right: 0 + } + }); }); test('EditorLayoutProvider 7', () => { @@ -426,40 +426,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 900, - height: 900, + }, { + width: 900, + height: 900, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 900, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 900, - lineNumbersLeft: 0, - lineNumbersWidth: 60, - lineNumbersHeight: 900, + lineNumbersLeft: 0, + lineNumbersWidth: 60, + lineNumbersHeight: 900, - decorationsLeft: 60, - decorationsWidth: 10, - decorationsHeight: 900, + decorationsLeft: 60, + decorationsWidth: 10, + decorationsHeight: 900, - contentLeft: 70, - contentWidth: 830, - contentHeight: 900, + contentLeft: 70, + contentWidth: 830, + contentHeight: 900, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 83, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 83, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 900, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 900, + right: 0 + } + }); }); test('EditorLayoutProvider 8', () => { @@ -482,40 +482,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 900, - height: 900, + }, { + width: 900, + height: 900, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 900, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 900, - lineNumbersLeft: 0, - lineNumbersWidth: 30, - lineNumbersHeight: 900, + lineNumbersLeft: 0, + lineNumbersWidth: 30, + lineNumbersHeight: 900, - decorationsLeft: 30, - decorationsWidth: 10, - decorationsHeight: 900, + decorationsLeft: 30, + decorationsWidth: 10, + decorationsHeight: 900, - contentLeft: 40, - contentWidth: 860, - contentHeight: 900, + contentLeft: 40, + contentWidth: 860, + contentHeight: 900, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 172, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 172, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 900, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 900, + right: 0 + } + }); }); test('EditorLayoutProvider 8 - rounds floats', () => { @@ -538,40 +538,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 900, - height: 900, + }, { + width: 900, + height: 900, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 900, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 900, - lineNumbersLeft: 0, - lineNumbersWidth: 30, - lineNumbersHeight: 900, + lineNumbersLeft: 0, + lineNumbersWidth: 30, + lineNumbersHeight: 900, - decorationsLeft: 30, - decorationsWidth: 10, - decorationsHeight: 900, + decorationsLeft: 30, + decorationsWidth: 10, + decorationsHeight: 900, - contentLeft: 40, - contentWidth: 860, - contentHeight: 900, + contentLeft: 40, + contentWidth: 860, + contentHeight: 900, - renderMinimap: RenderMinimap.None, - minimapWidth: 0, - viewportColumn: 170, + renderMinimap: RenderMinimap.None, + minimapWidth: 0, + viewportColumn: 170, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 900, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 900, + right: 0 + } + }); }); test('EditorLayoutProvider 9 - render minimap', () => { @@ -594,40 +594,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 1, - }, new EditorLayoutInfo({ - width: 1000, - height: 800, + }, { + width: 1000, + height: 800, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 800, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 800, - lineNumbersLeft: 0, - lineNumbersWidth: 0, - lineNumbersHeight: 800, + lineNumbersLeft: 0, + lineNumbersWidth: 0, + lineNumbersHeight: 800, - decorationsLeft: 0, - decorationsWidth: 10, - decorationsHeight: 800, + decorationsLeft: 0, + decorationsWidth: 10, + decorationsHeight: 800, - contentLeft: 10, - contentWidth: 900, - contentHeight: 800, + contentLeft: 10, + contentWidth: 900, + contentHeight: 800, - renderMinimap: RenderMinimap.Small, - minimapWidth: 90, - viewportColumn: 90, + renderMinimap: RenderMinimap.Small, + minimapWidth: 90, + viewportColumn: 90, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 800, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 800, + right: 0 + } + }); }); test('EditorLayoutProvider 9 - render minimap with pixelRatio = 2', () => { @@ -650,40 +650,40 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 2, - }, new EditorLayoutInfo({ - width: 1000, - height: 800, + }, { + width: 1000, + height: 800, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 800, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 800, - lineNumbersLeft: 0, - lineNumbersWidth: 0, - lineNumbersHeight: 800, + lineNumbersLeft: 0, + lineNumbersWidth: 0, + lineNumbersHeight: 800, - decorationsLeft: 0, - decorationsWidth: 10, - decorationsHeight: 800, + decorationsLeft: 0, + decorationsWidth: 10, + decorationsHeight: 800, - contentLeft: 10, - contentWidth: 900, - contentHeight: 800, + contentLeft: 10, + contentWidth: 900, + contentHeight: 800, - renderMinimap: RenderMinimap.Large, - minimapWidth: 90, - viewportColumn: 90, + renderMinimap: RenderMinimap.Large, + minimapWidth: 90, + viewportColumn: 90, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 800, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 800, + right: 0 + } + }); }); test('EditorLayoutProvider 9 - render minimap with pixelRatio = 4', () => { @@ -706,39 +706,39 @@ suite('Editor ViewLayout - EditorLayoutProvider', () => { minimapRenderCharacters: true, minimapMaxColumn: 150, pixelRatio: 4, - }, new EditorLayoutInfo({ - width: 1000, - height: 800, + }, { + width: 1000, + height: 800, - glyphMarginLeft: 0, - glyphMarginWidth: 0, - glyphMarginHeight: 800, + glyphMarginLeft: 0, + glyphMarginWidth: 0, + glyphMarginHeight: 800, - lineNumbersLeft: 0, - lineNumbersWidth: 0, - lineNumbersHeight: 800, + lineNumbersLeft: 0, + lineNumbersWidth: 0, + lineNumbersHeight: 800, - decorationsLeft: 0, - decorationsWidth: 10, - decorationsHeight: 800, + decorationsLeft: 0, + decorationsWidth: 10, + decorationsHeight: 800, - contentLeft: 10, - contentWidth: 943, - contentHeight: 800, + contentLeft: 10, + contentWidth: 943, + contentHeight: 800, - renderMinimap: RenderMinimap.Large, - minimapWidth: 47, - viewportColumn: 94, + renderMinimap: RenderMinimap.Large, + minimapWidth: 47, + viewportColumn: 94, - verticalScrollbarWidth: 0, - horizontalScrollbarHeight: 0, + verticalScrollbarWidth: 0, + horizontalScrollbarHeight: 0, - overviewRuler: new OverviewRulerPosition({ - top: 0, - width: 0, - height: 800, - right: 0 - }) - })); + overviewRuler: { + top: 0, + width: 0, + height: 800, + right: 0 + } + }); }); }); diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 69604f4fa6030..943378589521c 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -3122,8 +3122,7 @@ declare module monaco.editor { UnderlineThin = 6, } - export class InternalEditorScrollbarOptions { - readonly _internalEditorScrollbarOptionsBrand: void; + export interface InternalEditorScrollbarOptions { readonly arrowSize: number; readonly vertical: ScrollbarVisibility; readonly horizontal: ScrollbarVisibility; @@ -3138,15 +3137,13 @@ declare module monaco.editor { readonly mouseWheelScrollSensitivity: number; } - export class InternalEditorMinimapOptions { - readonly _internalEditorMinimapOptionsBrand: void; + export interface InternalEditorMinimapOptions { readonly enabled: boolean; readonly renderCharacters: boolean; readonly maxColumn: number; } - export class EditorWrappingInfo { - readonly _editorWrappingInfoBrand: void; + export interface EditorWrappingInfo { readonly inDiffEditor: boolean; readonly isDominatedByLongLines: boolean; readonly isWordWrapMinified: boolean; @@ -3158,9 +3155,8 @@ declare module monaco.editor { readonly wordWrapBreakObtrusiveCharacters: string; } - export class InternalEditorViewOptions { + export interface InternalEditorViewOptions { readonly theme: string; - readonly canUseTranslate3d: boolean; readonly disableMonospaceOptimizations: boolean; readonly experimentalScreenReader: boolean; readonly rulers: number[]; @@ -3179,7 +3175,6 @@ declare module monaco.editor { readonly cursorStyle: TextEditorCursorStyle; readonly hideCursorInOverviewRuler: boolean; readonly scrollBeyondLastLine: boolean; - readonly editorClassName: string; readonly stopRenderingLineAfter: number; readonly renderWhitespace: 'none' | 'boundary' | 'all'; readonly renderControlCharacters: boolean; @@ -3191,7 +3186,7 @@ declare module monaco.editor { readonly fixedOverflowWidgets: boolean; } - export class EditorContribOptions { + export interface EditorContribOptions { readonly selectionClipboard: boolean; readonly hover: boolean; readonly contextmenu: boolean; @@ -3226,6 +3221,8 @@ declare module monaco.editor { */ export class InternalEditorOptions { readonly _internalEditorOptionsBrand: void; + readonly canUseTranslate3d: boolean; + readonly editorClassName: string; readonly lineHeight: number; readonly readOnly: boolean; readonly wordSeparators: string; @@ -3243,8 +3240,7 @@ declare module monaco.editor { /** * A description for the overview ruler position. */ - export class OverviewRulerPosition { - readonly _overviewRulerPositionBrand: void; + export interface OverviewRulerPosition { /** * Width of the overview ruler */ @@ -3266,8 +3262,7 @@ declare module monaco.editor { /** * The internal layout details of the editor. */ - export class EditorLayoutInfo { - readonly _editorLayoutInfoBrand: void; + export interface EditorLayoutInfo { /** * Full editor width. */ @@ -3354,6 +3349,8 @@ declare module monaco.editor { * An event describing that the configuration of the editor has changed. */ export interface IConfigurationChangedEvent { + readonly canUseTranslate3d: boolean; + readonly editorClassName: boolean; readonly lineHeight: boolean; readonly readOnly: boolean; readonly wordSeparators: boolean; From 3b8f8a3bd9ea487cf99334190a840adb334da872 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 8 May 2017 22:44:13 +0200 Subject: [PATCH 0282/2747] Simplify editor configuration --- src/vs/editor/browser/config/configuration.ts | 50 +++++-------- .../browser/config/elementSizeObserver.ts | 3 +- .../common/config/commonEditorConfig.ts | 72 ++++++++++--------- .../common/config/commonEditorConfig.test.ts | 12 +++- .../test/common/mocks/testConfiguration.ts | 34 +++------ 5 files changed, 79 insertions(+), 92 deletions(-) diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts index 330903d01af45..80191982f21f7 100644 --- a/src/vs/editor/browser/config/configuration.ts +++ b/src/vs/editor/browser/config/configuration.ts @@ -8,7 +8,7 @@ import Event, { Emitter } from 'vs/base/common/event'; import { Disposable } from 'vs/base/common/lifecycle'; import * as platform from 'vs/base/common/platform'; import * as browser from 'vs/base/browser/browser'; -import { CommonEditorConfiguration } from 'vs/editor/common/config/commonEditorConfig'; +import { CommonEditorConfiguration, IEnvConfiguration } from 'vs/editor/common/config/commonEditorConfig'; import { IDimension } from 'vs/editor/common/editorCommon'; import { FontInfo, BareFontInfo } from 'vs/editor/common/config/fontInfo'; import { ElementSizeObserver } from 'vs/editor/browser/config/elementSizeObserver'; @@ -309,8 +309,12 @@ export class Configuration extends CommonEditorConfiguration { domNode.setLineHeight(fontInfo.lineHeight); } + private readonly _elementSizeObserver: ElementSizeObserver; + constructor(options: IEditorOptions, referenceDomElement: HTMLElement = null) { - super(options, new ElementSizeObserver(referenceDomElement, () => this._onReferenceDomElementSizeChanged())); + super(options); + + this._elementSizeObserver = this._register(new ElementSizeObserver(referenceDomElement, () => this._onReferenceDomElementSizeChanged())); this._register(CSSBasedConfiguration.INSTANCE.onDidChange(() => this._onCSSBasedConfigurationChanged())); @@ -319,6 +323,8 @@ export class Configuration extends CommonEditorConfiguration { } this._register(browser.onDidChangeZoomLevel(_ => this._recomputeOptions())); + + this._recomputeOptions(); } private _onReferenceDomElementSizeChanged(): void { @@ -334,11 +340,10 @@ export class Configuration extends CommonEditorConfiguration { } public dispose(): void { - this._elementSizeObserver.dispose(); super.dispose(); } - protected _getEditorClassName(theme: string, fontLigatures: boolean, mouseStyle: 'text' | 'default' | 'copy'): string { + private _getExtraEditorClassName(): string { let extra = ''; if (browser.isIE) { extra += 'ie '; @@ -350,38 +355,21 @@ export class Configuration extends CommonEditorConfiguration { if (platform.isMacintosh) { extra += 'mac '; } - if (fontLigatures) { - extra += 'enable-ligatures '; - } - if (mouseStyle === 'default') { - extra += 'mouse-default '; - } else if (mouseStyle === 'copy') { - extra += 'mouse-copy '; - } - return 'monaco-editor ' + extra + theme; - } - - protected getOuterWidth(): number { - return this._elementSizeObserver.getWidth(); - } - - protected getOuterHeight(): number { - return this._elementSizeObserver.getHeight(); + return extra; } - protected _getCanUseTranslate3d(): boolean { - return browser.canUseTranslate3d(); - } - - protected _getPixelRatio(): number { - return browser.getPixelRatio(); + protected _getEnvConfiguration(): IEnvConfiguration { + return { + extraEditorClassName: this._getExtraEditorClassName(), + outerWidth: this._elementSizeObserver.getWidth(), + outerHeight: this._elementSizeObserver.getHeight(), + canUseTranslate3d: browser.canUseTranslate3d(), + pixelRatio: browser.getPixelRatio(), + zoomLevel: browser.getZoomLevel() + }; } protected readConfiguration(bareFontInfo: BareFontInfo): FontInfo { return CSSBasedConfiguration.INSTANCE.readConfiguration(bareFontInfo); } - - protected getZoomLevel(): number { - return browser.getZoomLevel(); - } } diff --git a/src/vs/editor/browser/config/elementSizeObserver.ts b/src/vs/editor/browser/config/elementSizeObserver.ts index ee21f6c21bda6..bd8814cace914 100644 --- a/src/vs/editor/browser/config/elementSizeObserver.ts +++ b/src/vs/editor/browser/config/elementSizeObserver.ts @@ -6,9 +6,8 @@ import { Disposable } from 'vs/base/common/lifecycle'; import { IDimension } from 'vs/editor/common/editorCommon'; -import { IElementSizeObserver } from 'vs/editor/common/config/commonEditorConfig'; -export class ElementSizeObserver extends Disposable implements IElementSizeObserver { +export class ElementSizeObserver extends Disposable { private referenceDomElement: HTMLElement; private measureReferenceDomElementToken: number; diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 62ca9dfe17313..172b427f1b3e2 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -51,38 +51,35 @@ export const TabFocus: ITabFocus = new class { } }; -export interface IElementSizeObserver { - startObserving(): void; - observe(dimension?: editorCommon.IDimension): void; - dispose(): void; - getWidth(): number; - getHeight(): number; +export interface IEnvConfiguration { + extraEditorClassName: string; + outerWidth: number; + outerHeight: number; + canUseTranslate3d: boolean; + pixelRatio: number; + zoomLevel: number; } export abstract class CommonEditorConfiguration extends Disposable implements editorCommon.IConfiguration { protected _rawOptions: editorOptions.IEditorOptions; protected _validatedOptions: editorOptions.IValidatedEditorOptions; - public editor: editorOptions.InternalEditorOptions; - - protected _elementSizeObserver: IElementSizeObserver; private _isDominatedByLongLines: boolean; private _lineNumbersDigitCount: number; private _onDidChange = this._register(new Emitter()); public onDidChange: Event = this._onDidChange.event; - constructor(options: editorOptions.IEditorOptions, elementSizeObserver: IElementSizeObserver = null) { + constructor(options: editorOptions.IEditorOptions) { super(); this._rawOptions = options || {}; this._validatedOptions = editorOptions.EditorOptionsValidator.validate(this._rawOptions, EDITOR_DEFAULTS); - - this._elementSizeObserver = elementSizeObserver; + this.editor = null; this._isDominatedByLongLines = false; this._lineNumbersDigitCount = 1; - this.editor = this._computeInternalOptions(); + this._register(EditorZoom.onDidChangeZoomLevel(_ => this._recomputeOptions())); this._register(TabFocus.onDidChangeTabFocus(_ => this._recomputeOptions())); } @@ -92,17 +89,18 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed } protected _recomputeOptions(): void { - this._setOptions(this._computeInternalOptions()); - } + const oldOptions = this.editor; + const newOptions = this._computeInternalOptions(); - private _setOptions(newOptions: editorOptions.InternalEditorOptions): void { - if (this.editor && this.editor.equals(newOptions)) { + if (oldOptions && oldOptions.equals(newOptions)) { return; } - let changeEvent = this.editor.createChangeEvent(newOptions); this.editor = newOptions; - this._onDidChange.fire(changeEvent); + + if (oldOptions) { + this._onDidChange.fire(oldOptions.createChangeEvent(newOptions)); + } } public getRawOptions(): editorOptions.IEditorOptions { @@ -111,16 +109,18 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed private _computeInternalOptions(): editorOptions.InternalEditorOptions { const opts = this._validatedOptions; - const bareFontInfo = BareFontInfo.createFromRawSettings(this._rawOptions, this.getZoomLevel()); + const partialEnv = this._getEnvConfiguration(); + const bareFontInfo = BareFontInfo.createFromRawSettings(this._rawOptions, partialEnv.zoomLevel); + const editorClassName = this._getEditorClassName(opts.viewInfo.theme, opts.viewInfo.fontLigatures, opts.mouseStyle); const env: editorOptions.IEnvironmentalOptions = { - outerWidth: this.getOuterWidth(), - outerHeight: this.getOuterHeight(), + outerWidth: partialEnv.outerWidth, + outerHeight: partialEnv.outerHeight, fontInfo: this.readConfiguration(bareFontInfo), - editorClassName: this._getEditorClassName(opts.viewInfo.theme, opts.viewInfo.fontLigatures, opts.mouseStyle), + editorClassName: editorClassName + ' ' + partialEnv.extraEditorClassName, isDominatedByLongLines: this._isDominatedByLongLines, lineNumbersDigitCount: this._lineNumbersDigitCount, - canUseTranslate3d: this._getCanUseTranslate3d(), - pixelRatio: this._getPixelRatio(), + canUseTranslate3d: partialEnv.canUseTranslate3d, + pixelRatio: partialEnv.pixelRatio, tabFocusMode: TabFocus.getTabFocusMode() }; return editorOptions.InternalEditorOptionsFactory.createInternalEditorOptions(env, opts); @@ -155,19 +155,23 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed return r ? r : 1; } - protected abstract _getEditorClassName(theme: string, fontLigatures: boolean, mouseDrag: 'text' | 'default' | 'copy'): string; - - protected abstract getOuterWidth(): number; - - protected abstract getOuterHeight(): number; - - protected abstract _getCanUseTranslate3d(): boolean; + private _getEditorClassName(theme: string, fontLigatures: boolean, mouseStyle: 'text' | 'default' | 'copy'): string { + let extra = ''; + if (fontLigatures) { + extra += 'enable-ligatures '; + } + if (mouseStyle === 'default') { + extra += 'mouse-default '; + } else if (mouseStyle === 'copy') { + extra += 'mouse-copy '; + } + return 'monaco-editor ' + extra + theme; + } - protected abstract _getPixelRatio(): number; + protected abstract _getEnvConfiguration(): IEnvConfiguration; protected abstract readConfiguration(styling: BareFontInfo): FontInfo; - protected abstract getZoomLevel(): number; } const configurationRegistry = Registry.as(Extensions.Configuration); diff --git a/src/vs/editor/test/common/config/commonEditorConfig.test.ts b/src/vs/editor/test/common/config/commonEditorConfig.test.ts index bda2f542ccb6b..e98f7cc203c9a 100644 --- a/src/vs/editor/test/common/config/commonEditorConfig.test.ts +++ b/src/vs/editor/test/common/config/commonEditorConfig.test.ts @@ -7,6 +7,7 @@ import * as assert from 'assert'; import { EditorZoom } from 'vs/editor/common/config/editorZoom'; import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; +import { IEnvConfiguration } from "vs/editor/common/config/commonEditorConfig"; suite('Common Editor Config', () => { test('Zoom Level', () => { @@ -52,8 +53,15 @@ suite('Common Editor Config', () => { }); class TestWrappingConfiguration extends TestConfiguration { - protected getOuterWidth(): number { - return 1000; + protected _getEnvConfiguration(): IEnvConfiguration { + return { + extraEditorClassName: '', + outerWidth: 1000, + outerHeight: 100, + canUseTranslate3d: true, + pixelRatio: 1, + zoomLevel: 0 + }; } } diff --git a/src/vs/editor/test/common/mocks/testConfiguration.ts b/src/vs/editor/test/common/mocks/testConfiguration.ts index d8cede0b45b09..41917c57f23a8 100644 --- a/src/vs/editor/test/common/mocks/testConfiguration.ts +++ b/src/vs/editor/test/common/mocks/testConfiguration.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { CommonEditorConfiguration } from 'vs/editor/common/config/commonEditorConfig'; +import { CommonEditorConfiguration, IEnvConfiguration } from 'vs/editor/common/config/commonEditorConfig'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { FontInfo, BareFontInfo } from 'vs/editor/common/config/fontInfo'; @@ -12,26 +12,18 @@ export class TestConfiguration extends CommonEditorConfiguration { constructor(opts: IEditorOptions) { super(opts); + this._recomputeOptions(); } - protected _getEditorClassName(theme: string, fontLigatures: boolean): string { - return ''; - } - - protected getOuterWidth(): number { - return 100; - } - - protected getOuterHeight(): number { - return 100; - } - - protected _getCanUseTranslate3d(): boolean { - return true; - } - - protected _getPixelRatio(): number { - return 1; + protected _getEnvConfiguration(): IEnvConfiguration { + return { + extraEditorClassName: '', + outerWidth: 100, + outerHeight: 100, + canUseTranslate3d: true, + pixelRatio: 1, + zoomLevel: 0 + }; } protected readConfiguration(styling: BareFontInfo): FontInfo { @@ -48,8 +40,4 @@ export class TestConfiguration extends CommonEditorConfiguration { maxDigitWidth: 10, }, true); } - - protected getZoomLevel(): number { - return 0; - } } From 96d9bd667136326898a65533ce1d037953b6d406 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 8 May 2017 23:03:25 +0200 Subject: [PATCH 0283/2747] Fixes #22433: Enforce a minimum for editor.lineHeight --- src/vs/editor/common/config/fontInfo.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/editor/common/config/fontInfo.ts b/src/vs/editor/common/config/fontInfo.ts index 947c51bf1b996..ae3ff7bfe9baa 100644 --- a/src/vs/editor/common/config/fontInfo.ts +++ b/src/vs/editor/common/config/fontInfo.ts @@ -73,12 +73,16 @@ export class BareFontInfo { fontSize = clamp(fontSize, 0, 100); if (fontSize === 0) { fontSize = EDITOR_FONT_DEFAULTS.fontSize; + } else if (fontSize < 8) { + fontSize = 8; } let lineHeight = safeParseInt(opts.lineHeight, 0); lineHeight = clamp(lineHeight, 0, 150); if (lineHeight === 0) { lineHeight = Math.round(GOLDEN_LINE_HEIGHT_RATIO * fontSize); + } else if (lineHeight < 8) { + lineHeight = 8; } let editorZoomLevelMultiplier = 1 + (EditorZoom.getZoomLevel() * 0.1); From 91b79959041b247eb45399867bf75061bae9c94f Mon Sep 17 00:00:00 2001 From: chrisdias Date: Mon, 8 May 2017 14:25:17 -0700 Subject: [PATCH 0284/2747] support FROM...AS in dockerfile --- extensions/docker/syntaxes/docker.tmLanguage.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extensions/docker/syntaxes/docker.tmLanguage.json b/extensions/docker/syntaxes/docker.tmLanguage.json index 6ca5dc67b08fd..ccd56618a9048 100644 --- a/extensions/docker/syntaxes/docker.tmLanguage.json +++ b/extensions/docker/syntaxes/docker.tmLanguage.json @@ -4,6 +4,14 @@ ], "name": "Dockerfile", "patterns": [ + { + "captures": { + "1": { + "name": "keyword.other.dockerfile" + } + }, + "match": "\\s*(?:(FROM|AS))\\s" + }, { "captures": { "1": { From 9ebaef7fe4f7d859afaa428175782560b2917bf1 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 8 May 2017 15:41:38 -0700 Subject: [PATCH 0285/2747] Fix node_modules being included in our ts projects Part of #24698 **bug** A node_modules folder under build/lib/watch is being included in our project system. This slows down TS quite a lot **fix** Remove this and remove the root jsconfig.json in the project --- build/tsconfig.json | 6 +++++- jsconfig.json | 27 --------------------------- 2 files changed, 5 insertions(+), 28 deletions(-) delete mode 100644 jsconfig.json diff --git a/build/tsconfig.json b/build/tsconfig.json index 59a73844e1456..6dacf4250424f 100644 --- a/build/tsconfig.json +++ b/build/tsconfig.json @@ -9,5 +9,9 @@ "experimentalDecorators": true, "noLib": true, "newLine": "LF" - } + }, + "exclude": [ + "node_modules", + "./lib/watch/node_modules/**/*" + ] } \ No newline at end of file diff --git a/jsconfig.json b/jsconfig.json deleted file mode 100644 index cc732031011de..0000000000000 --- a/jsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - // See https://go.microsoft.com/fwlink/?LinkId=759670 - // for the documentation about the jsconfig.json format - "compilerOptions": { - "target": "es6", - "module": "commonjs", - "allowSyntheticDefaultImports": true - }, - "exclude": [ - "src", - "extensions", - "test", - "i18n", - "out", - "out-build", - "out-vscode", - "out-vscode-min", - "out-editor", - "out-editor-min", - "out-monaco-editor-core", - "resources", - "scripts", - ".build", - "node_modules", - "build/monaco/node_modules" - ] -} From 312cb04e19e8f61381fc79de8e79d3ab09f96faf Mon Sep 17 00:00:00 2001 From: chrisdias Date: Mon, 8 May 2017 15:50:46 -0700 Subject: [PATCH 0286/2747] fix keyword type to fix tests --- extensions/docker/syntaxes/docker.tmLanguage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/docker/syntaxes/docker.tmLanguage.json b/extensions/docker/syntaxes/docker.tmLanguage.json index ccd56618a9048..caab35092b006 100644 --- a/extensions/docker/syntaxes/docker.tmLanguage.json +++ b/extensions/docker/syntaxes/docker.tmLanguage.json @@ -7,7 +7,7 @@ { "captures": { "1": { - "name": "keyword.other.dockerfile" + "name": "keyword.other.special-method.dockerfile" } }, "match": "\\s*(?:(FROM|AS))\\s" From 6e0d024ad55d9fcd31e0858575e961e8464a637b Mon Sep 17 00:00:00 2001 From: rebornix Date: Mon, 8 May 2017 14:48:05 -0700 Subject: [PATCH 0287/2747] Fix #6158. Persist isRegex, macthCase, wholeWord search settings for workspace --- src/vs/editor/contrib/find/browser/find.ts | 6 ++-- .../editor/contrib/find/browser/findWidget.ts | 3 ++ .../contrib/find/common/findController.ts | 33 +++++++++++++++++-- .../find/test/common/findController.test.ts | 5 +-- 4 files changed, 41 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/contrib/find/browser/find.ts b/src/vs/editor/contrib/find/browser/find.ts index cc32e668da504..3b5e1d0bb1d93 100644 --- a/src/vs/editor/contrib/find/browser/find.ts +++ b/src/vs/editor/contrib/find/browser/find.ts @@ -13,6 +13,7 @@ import { FindWidget, IFindController } from 'vs/editor/contrib/find/browser/find import { FindOptionsWidget } from 'vs/editor/contrib/find/browser/findOptionsWidget'; import { CommonFindController, FindStartFocusAction, IFindStartOptions } from 'vs/editor/contrib/find/common/findController'; import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { IStorageService } from 'vs/platform/storage/common/storage'; @editorContribution export class FindController extends CommonFindController implements IFindController { @@ -25,9 +26,10 @@ export class FindController extends CommonFindController implements IFindControl @IContextViewService contextViewService: IContextViewService, @IContextKeyService contextKeyService: IContextKeyService, @IKeybindingService keybindingService: IKeybindingService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @IStorageService storageService: IStorageService ) { - super(editor, contextKeyService); + super(editor, contextKeyService, storageService); this._widget = this._register(new FindWidget(editor, this, this._state, contextViewService, keybindingService, contextKeyService, themeService)); this._findOptionsWidget = this._register(new FindOptionsWidget(editor, this._state, keybindingService, themeService)); diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index 09d722afa8f0f..559c6635abcf9 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -483,6 +483,9 @@ export class FindWidget extends Widget implements IOverlayWidget { } } })); + this._findInput.setRegex(!!this._state.isRegex); + this._findInput.setCaseSensitive(!!this._state.matchCase); + this._findInput.setWholeWords(!!this._state.wholeWord); this._register(this._findInput.onKeyDown((e) => this._onFindInputKeyDown(e))); this._register(this._findInput.onInput(() => { this._state.change({ searchString: this._findInput.getValue() }, true); diff --git a/src/vs/editor/contrib/find/common/findController.ts b/src/vs/editor/contrib/find/common/findController.ts index c788dafd5f26b..a8f06599b3f46 100644 --- a/src/vs/editor/contrib/find/common/findController.ts +++ b/src/vs/editor/contrib/find/common/findController.ts @@ -20,6 +20,7 @@ import { DocumentHighlightProviderRegistry } from 'vs/editor/common/modes'; import { RunOnceScheduler, Delayer } from 'vs/base/common/async'; import { CursorChangeReason, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; +import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; export const enum FindStartFocusAction { NoFocusChange, @@ -48,19 +49,22 @@ export class CommonFindController extends Disposable implements editorCommon.IEd private _currentHistoryNavigator: HistoryNavigator; protected _updateHistoryDelayer: Delayer; private _model: FindModelBoundToEditorModel; + private _storageService: IStorageService; public static get(editor: editorCommon.ICommonCodeEditor): CommonFindController { return editor.getContribution(CommonFindController.ID); } - constructor(editor: editorCommon.ICommonCodeEditor, @IContextKeyService contextKeyService: IContextKeyService) { + constructor(editor: editorCommon.ICommonCodeEditor, @IContextKeyService contextKeyService: IContextKeyService, @IStorageService storageService: IStorageService) { super(); this._editor = editor; this._findWidgetVisible = CONTEXT_FIND_WIDGET_VISIBLE.bindTo(contextKeyService); + this._storageService = storageService; this._updateHistoryDelayer = new Delayer(500); this._currentHistoryNavigator = new HistoryNavigator(); this._state = this._register(new FindReplaceState()); + this.loadQueryState(); this._register(this._state.addChangeListener((e) => this._onStateChanged(e))); this._model = null; @@ -71,7 +75,10 @@ export class CommonFindController extends Disposable implements editorCommon.IEd this.disposeModel(); this._state.change({ - searchScope: null + searchScope: null, + matchCase: this._storageService.getBoolean('editor.matchCase', StorageScope.WORKSPACE, false), + wholeWord: this._storageService.getBoolean('editor.wholeWord', StorageScope.WORKSPACE, false), + isRegex: this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, false) }, false); if (shouldRestartFind) { @@ -102,6 +109,8 @@ export class CommonFindController extends Disposable implements editorCommon.IEd } private _onStateChanged(e: FindReplaceStateChangedEvent): void { + this.saveQueryState(e); + if (e.updateHistory && e.searchString) { this._delayedUpdateHistory(); } @@ -115,6 +124,26 @@ export class CommonFindController extends Disposable implements editorCommon.IEd } } + private saveQueryState(e: FindReplaceStateChangedEvent) { + if (e.isRegex && typeof this._state.isRegex !== 'undefined') { + this._storageService.store('editor.isRegex', this._state.isRegex, StorageScope.WORKSPACE); + } + if (e.wholeWord && typeof this._state.wholeWord !== 'undefined') { + this._storageService.store('editor.wholeWord', this._state.wholeWord, StorageScope.WORKSPACE); + } + if (e.matchCase && typeof this._state.matchCase !== 'undefined') { + this._storageService.store('editor.matchCase', this._state.matchCase, StorageScope.WORKSPACE); + } + } + + private loadQueryState() { + this._state.change({ + matchCase: this._storageService.getBoolean('editor.matchCase', StorageScope.WORKSPACE, this._state.matchCase), + wholeWord: this._storageService.getBoolean('editor.wholeWord', StorageScope.WORKSPACE, this._state.wholeWord), + isRegex: this._storageService.getBoolean('editor.isRegex', StorageScope.WORKSPACE, this._state.isRegex) + }, false); + } + protected _delayedUpdateHistory() { this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)); } diff --git a/src/vs/editor/contrib/find/test/common/findController.test.ts b/src/vs/editor/contrib/find/test/common/findController.test.ts index 949fbc5632e32..311a6c1837382 100644 --- a/src/vs/editor/contrib/find/test/common/findController.test.ts +++ b/src/vs/editor/contrib/find/test/common/findController.test.ts @@ -20,6 +20,7 @@ import { import { MockCodeEditor, withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; import { HistoryNavigator } from 'vs/base/common/history'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { IStorageService } from 'vs/platform/storage/common/storage'; import { Delayer } from 'vs/base/common/async'; class TestFindController extends CommonFindController { @@ -30,8 +31,8 @@ class TestFindController extends CommonFindController { private _delayedUpdateHistoryEvent: Emitter = new Emitter(); - constructor(editor: ICommonCodeEditor, @IContextKeyService contextKeyService: IContextKeyService) { - super(editor, contextKeyService); + constructor(editor: ICommonCodeEditor, @IContextKeyService contextKeyService: IContextKeyService, @IStorageService storageService: IStorageService) { + super(editor, contextKeyService, storageService); this._updateHistoryDelayer = new Delayer(50); } From bf3ab10ecae8930b18e7747df3a207bfed13dae4 Mon Sep 17 00:00:00 2001 From: rebornix Date: Mon, 8 May 2017 15:31:52 -0700 Subject: [PATCH 0288/2747] Fix test failure as IStorageService is not initalized in test --- .../find/test/common/findController.test.ts | 40 +++++++++++-------- .../test/common/mocks/mockCodeEditor.ts | 3 +- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/vs/editor/contrib/find/test/common/findController.test.ts b/src/vs/editor/contrib/find/test/common/findController.test.ts index 311a6c1837382..d8670a93fc94e 100644 --- a/src/vs/editor/contrib/find/test/common/findController.test.ts +++ b/src/vs/editor/contrib/find/test/common/findController.test.ts @@ -17,10 +17,12 @@ import { NextMatchFindAction, StartFindAction, SelectHighlightsAction, AddSelectionToNextFindMatchAction } from 'vs/editor/contrib/find/common/findController'; +import { FindReplaceState } from 'vs/editor/contrib/find/common/findState'; import { MockCodeEditor, withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; import { HistoryNavigator } from 'vs/base/common/history'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IStorageService } from 'vs/platform/storage/common/storage'; +import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { Delayer } from 'vs/base/common/async'; class TestFindController extends CommonFindController { @@ -68,7 +70,13 @@ class TestFindController extends CommonFindController { } suite('FindController', () => { - + let queryState = new FindReplaceState(); + let serviceCollection = new ServiceCollection(); + serviceCollection.set(IStorageService, { + get: (key) => queryState[key], + getBoolean: (key) => !!queryState[key], + store: (key: string, value: any) => { queryState[key] = value; } + }); function fromRange(rng: Range): number[] { return [rng.startLineNumber, rng.startColumn, rng.endLineNumber, rng.endColumn]; } @@ -79,7 +87,7 @@ suite('FindController', () => { 'ABC', 'XYZ', 'ABC' - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { // The cursor is at the very top, of the file, at the first ABC let findController = editor.registerAndInstantiateContribution(TestFindController); @@ -134,7 +142,7 @@ suite('FindController', () => { test('issue #3090: F3 does not loop with two matches on a single line', () => { withMockCodeEditor([ 'import nls = require(\'vs/nls\');' - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); let nextMatchFindAction = new NextMatchFindAction(); @@ -159,7 +167,7 @@ suite('FindController', () => { 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); let startFindAction = new StartFindAction(); @@ -185,7 +193,7 @@ suite('FindController', () => { 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); let selectHighlightsAction = new SelectHighlightsAction(); @@ -212,7 +220,7 @@ suite('FindController', () => { 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); findController.start({ @@ -240,7 +248,7 @@ suite('FindController', () => { 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); findController.getState().change({ searchString: '1' }, false); @@ -256,7 +264,7 @@ suite('FindController', () => { 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); findController.delayUpdateHistory = true; @@ -276,7 +284,7 @@ suite('FindController', () => { 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); findController.getState().change({ searchString: '1' }, false); @@ -293,7 +301,7 @@ suite('FindController', () => { 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); findController.getState().change({ searchString: '1' }, false); @@ -310,7 +318,7 @@ suite('FindController', () => { 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); findController.getState().change({ searchString: '1' }, false); @@ -330,7 +338,7 @@ suite('FindController', () => { 'var x = (3 * 5)', 'var y = (3 * 5)', 'var z = (3 * 5)', - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); findController.getState().change({ searchString: '1' }, false); @@ -356,7 +364,7 @@ suite('FindController', () => { 'rty', 'qwe', 'rty' - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); let addSelectionToNextFindMatch = new AddSelectionToNextFindMatchAction(); @@ -388,7 +396,7 @@ suite('FindController', () => { 'rty', 'qwe', 'rty' - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { editor.getModel().setEOL(EndOfLineSequence.CRLF); @@ -414,7 +422,7 @@ suite('FindController', () => { test('issue #18111: Regex replace with single space replaces with no space', () => { withMockCodeEditor([ 'HRESULT OnAmbientPropertyChange(DISPID dispid);' - ], {}, (editor, cursor) => { + ], { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); @@ -448,7 +456,7 @@ suite('FindController', () => { } function testAddSelectionToNextFindMatchAction(text: string[], callback: (editor: MockCodeEditor, action: AddSelectionToNextFindMatchAction, findController: TestFindController) => void): void { - withMockCodeEditor(text, {}, (editor, cursor) => { + withMockCodeEditor(text, { serviceCollection: serviceCollection }, (editor, cursor) => { let findController = editor.registerAndInstantiateContribution(TestFindController); diff --git a/src/vs/editor/test/common/mocks/mockCodeEditor.ts b/src/vs/editor/test/common/mocks/mockCodeEditor.ts index 3a70f211dbc0f..92e4e0f444e5e 100644 --- a/src/vs/editor/test/common/mocks/mockCodeEditor.ts +++ b/src/vs/editor/test/common/mocks/mockCodeEditor.ts @@ -85,6 +85,7 @@ export interface MockCodeEditorCreationOptions extends editorOptions.IEditorOpti * The initial model associated with this code editor. */ model?: editorCommon.IModel; + serviceCollection?: ServiceCollection; } export function withMockCodeEditor(text: string[], options: MockCodeEditorCreationOptions, callback: (editor: MockCodeEditor, cursor: Cursor) => void): void { @@ -97,7 +98,7 @@ export function mockCodeEditor(text: string[], options: MockCodeEditorCreationOp let contextKeyService = new MockContextKeyService(); - let services = new ServiceCollection(); + let services = options.serviceCollection || new ServiceCollection(); services.set(IContextKeyService, contextKeyService); let instantiationService = new InstantiationService(services); From 05c3876f4541991cbf0d6c3a926566188fd5eba5 Mon Sep 17 00:00:00 2001 From: rebornix Date: Mon, 8 May 2017 16:13:56 -0700 Subject: [PATCH 0289/2747] add tests for query option persistence --- .../find/test/common/findController.test.ts | 89 +++++++++++++++++-- 1 file changed, 84 insertions(+), 5 deletions(-) diff --git a/src/vs/editor/contrib/find/test/common/findController.test.ts b/src/vs/editor/contrib/find/test/common/findController.test.ts index d8670a93fc94e..13d26d2dde1f2 100644 --- a/src/vs/editor/contrib/find/test/common/findController.test.ts +++ b/src/vs/editor/contrib/find/test/common/findController.test.ts @@ -17,7 +17,6 @@ import { NextMatchFindAction, StartFindAction, SelectHighlightsAction, AddSelectionToNextFindMatchAction } from 'vs/editor/contrib/find/common/findController'; -import { FindReplaceState } from 'vs/editor/contrib/find/common/findState'; import { MockCodeEditor, withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; import { HistoryNavigator } from 'vs/base/common/history'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; @@ -69,17 +68,18 @@ class TestFindController extends CommonFindController { } } +function fromRange(rng: Range): number[] { + return [rng.startLineNumber, rng.startColumn, rng.endLineNumber, rng.endColumn]; +} + suite('FindController', () => { - let queryState = new FindReplaceState(); + let queryState = {}; let serviceCollection = new ServiceCollection(); serviceCollection.set(IStorageService, { get: (key) => queryState[key], getBoolean: (key) => !!queryState[key], store: (key: string, value: any) => { queryState[key] = value; } }); - function fromRange(rng: Range): number[] { - return [rng.startLineNumber, rng.startColumn, rng.endLineNumber, rng.endColumn]; - } test('issue #1857: F3, Find Next, acts like "Find Under Cursor"', () => { withMockCodeEditor([ @@ -686,3 +686,82 @@ suite('FindController', () => { }); }); }); + +suite('FindController query options persistence', () => { + let queryState = { 'editor.isRegex': false, 'editor.matchCase': false, 'editor.wholeWord': false }; + let serviceCollection = new ServiceCollection(); + serviceCollection.set(IStorageService, { + get: (key) => queryState[key], + getBoolean: (key) => !!queryState[key], + store: (key: string, value: any) => { queryState[key] = value; } + }); + + test('matchCase', () => { + withMockCodeEditor([ + 'abc', + 'ABC', + 'XYZ', + 'ABC' + ], { serviceCollection: serviceCollection }, (editor, cursor) => { + queryState = { 'editor.isRegex': false, 'editor.matchCase': true, 'editor.wholeWord': false }; + // The cursor is at the very top, of the file, at the first ABC + let findController = editor.registerAndInstantiateContribution(TestFindController); + let findState = findController.getState(); + let startFindAction = new StartFindAction(); + + // I hit Ctrl+F to show the Find dialog + startFindAction.run(null, editor); + + // I type ABC. + findState.change({ searchString: 'ABC' }, true); + // The second ABC is highlighted as matchCase is true. + assert.deepEqual(fromRange(editor.getSelection()), [2, 1, 2, 4]); + + findController.dispose(); + }); + }); + + queryState = { 'editor.isRegex': false, 'editor.matchCase': false, 'editor.wholeWord': true }; + + test('wholeWord', () => { + withMockCodeEditor([ + 'ABC', + 'AB', + 'XYZ', + 'ABC' + ], { serviceCollection: serviceCollection }, (editor, cursor) => { + queryState = { 'editor.isRegex': false, 'editor.matchCase': false, 'editor.wholeWord': true }; + // The cursor is at the very top, of the file, at the first ABC + let findController = editor.registerAndInstantiateContribution(TestFindController); + let findState = findController.getState(); + let startFindAction = new StartFindAction(); + + // I hit Ctrl+F to show the Find dialog + startFindAction.run(null, editor); + + // I type AB. + findState.change({ searchString: 'AB' }, true); + // The second AB is highlighted as wholeWord is true. + assert.deepEqual(fromRange(editor.getSelection()), [2, 1, 2, 3]); + + findController.dispose(); + }); + }); + + test('toggling options is saved', () => { + withMockCodeEditor([ + 'ABC', + 'AB', + 'XYZ', + 'ABC' + ], { serviceCollection: serviceCollection }, (editor, cursor) => { + queryState = { 'editor.isRegex': false, 'editor.matchCase': false, 'editor.wholeWord': true }; + // The cursor is at the very top, of the file, at the first ABC + let findController = editor.registerAndInstantiateContribution(TestFindController); + findController.toggleRegex(); + assert.equal(queryState['editor.isRegex'], true); + + findController.dispose(); + }); + }); +}); \ No newline at end of file From bf53bb089c37cdea99051811ac2b7bdc16a79554 Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Mon, 8 May 2017 17:57:16 -0700 Subject: [PATCH 0290/2747] Use EditorGroupinfo to decide if to swap/reposition suggest widget (#26250) --- .../contrib/suggest/browser/media/suggest.css | 2 - .../contrib/suggest/browser/suggestWidget.ts | 98 +++++++------------ 2 files changed, 34 insertions(+), 66 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index 4b8e1fca7e642..166f7ff94b67c 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -23,7 +23,6 @@ .monaco-editor .suggest-widget > .tree { height: 100%; - width: 220px; float: left; box-sizing: border-box; } @@ -114,7 +113,6 @@ flex-direction: column; cursor: default; box-sizing: border-box; - width: 440px; } .monaco-editor .suggest-widget .details.no-docs { diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 249559e2d84bd..e28be9bc62e67 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -31,6 +31,7 @@ import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IThemeService, ITheme, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { registerColor, editorWidgetBackground, contrastBorder, listFocusBackground, activeContrastBorder, listHighlightForeground, editorForeground } from 'vs/platform/theme/common/colorRegistry'; import { Position } from 'vs/editor/common/core/position'; +import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; const sticky = false; // for development purposes @@ -308,19 +309,18 @@ export class SuggestWidget implements IContentWidget, IDelegate readonly onDidShow: Event = this.onDidShowEmitter.event; private preferredPosition: Position; - private readonly minWidgetWidth = 440; private readonly maxWidgetWidth = 660; - private readonly listWidth = 220; - private readonly minDocsWidth = 220; - private readonly maxDocsWidth = 440; - private readonly widgetWidthInSmallestEditor = 300; + private readonly listWidth = 330; + private readonly docsWidth = 330; + private readonly minWidgetWidth = 400; constructor( private editor: ICodeEditor, @ITelemetryService private telemetryService: ITelemetryService, @IContextKeyService contextKeyService: IContextKeyService, @IInstantiationService instantiationService: IInstantiationService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @IEditorGroupService private editorGroupService: IEditorGroupService ) { this.isAuto = false; this.focusedItem = null; @@ -830,89 +830,59 @@ export class SuggestWidget implements IContentWidget, IDelegate if (this.messageElement.style.display !== 'none' && this.details.element.style.display === 'none' && this.listElement.style.display === 'none') { - this.element.style.width = `${this.widgetWidthInSmallestEditor}px`; + this.element.style.width = `${this.minWidgetWidth}px`; return; } const perColumnWidth = this.editor.getLayoutInfo().contentWidth / this.editor.getLayoutInfo().viewportColumn; const spaceOntheLeft = Math.floor(this.editor.getPosition().column * perColumnWidth) - this.editor.getScrollLeft(); const spaceOntheRight = this.editor.getLayoutInfo().contentWidth - spaceOntheLeft; - const scrolledColumns = Math.floor(this.editor.getScrollLeft() / perColumnWidth); + const columnsOccupiedByDocs = Math.floor(this.docsWidth / perColumnWidth); // Reset width - this.details.element.style.width = `${this.maxDocsWidth}px`; + this.details.element.style.width = `${this.docsWidth}px`; this.element.style.width = `${this.maxWidgetWidth}px`; this.listElement.style.width = `${this.listWidth}px`; - if (spaceOntheRight > this.maxWidgetWidth) { - // There is enough space on the right, so nothing to do here. - return; - } + let editorStacksModel = this.editorGroupService.getStacksModel(); + let totalEditors = editorStacksModel.groups.length; + let currentEditorPosition = editorStacksModel.positionOfGroup(editorStacksModel.activeGroup); - - if (spaceOntheRight > this.minWidgetWidth) { - // There is enough space on the right for list and resized docs - this.adjustDocs(false, spaceOntheRight - this.listWidth, this.editor.getPosition().column); + if (spaceOntheRight > this.maxWidgetWidth || + (this.editorGroupService.getGroupOrientation() === 'vertical' && currentEditorPosition < totalEditors - 1)) { + // There is enough space on the right, so nothing to do here. return; } - if (spaceOntheRight > this.listWidth && spaceOntheLeft > this.maxDocsWidth) { - // Docs on the left and list on the right of the cursor - let columnsOccupiedByDocs = Math.floor(this.maxDocsWidth / perColumnWidth); - this.adjustDocs(true, null, this.editor.getPosition().column - columnsOccupiedByDocs); + if (this.editorGroupService.getGroupOrientation() === 'horizontal' || totalEditors === 1) { + if (this.editor.getLayoutInfo().contentWidth > this.maxWidgetWidth) { + if (spaceOntheRight < this.docsWidth) { + addClass(this.element, 'list-right'); + this.preferredPosition = new Position(this.editor.getPosition().lineNumber, this.editor.getPosition().column - columnsOccupiedByDocs); + } + return; + } + this.showDocsBelow(); return; } - if (spaceOntheRight > this.listWidth && spaceOntheLeft > this.minDocsWidth) { - // Resized docs on the left and list on the right of the cursor - let columnsOccupiedByDocs = Math.floor(spaceOntheLeft / perColumnWidth); - this.adjustDocs(true, spaceOntheLeft, this.editor.getPosition().column - columnsOccupiedByDocs); - return; - } + // Its vertical, multiple editors, active editor is the last one and not enough space on the right for widget + // TODO: Check if window width < this.maxDocsWidth, in which case we may have to drop the docs below. + addClass(this.element, 'list-right'); + this.preferredPosition = new Position(this.editor.getPosition().lineNumber, this.editor.getPosition().column - columnsOccupiedByDocs); - if (this.editor.getLayoutInfo().contentWidth > this.maxWidgetWidth) { - // Use as much space on the right, and for the rest go left - let columnsOccupiedByWidget = Math.floor(this.maxWidgetWidth / perColumnWidth); - let preferredColumn = this.editor.getLayoutInfo().viewportColumn - columnsOccupiedByWidget + scrolledColumns; - this.adjustDocs(true, null, preferredColumn); - return; - } - - if (this.editor.getLayoutInfo().contentWidth > this.minWidgetWidth) { - // Resize docs. Swap only of there is enough space on the right for the list - let newDocsWidth = this.editor.getLayoutInfo().contentWidth - this.listWidth; - this.adjustDocs(spaceOntheRight < this.listWidth, newDocsWidth, scrolledColumns); - return; - } + return; + } + private showDocsBelow() { // Not enough space to show side by side // So show docs below the list addClass(this.element, 'docs-below'); - this.listElement.style.width = `${this.widgetWidthInSmallestEditor}px`; - this.element.style.width = `${this.widgetWidthInSmallestEditor}px`; - this.details.element.style.width = `${this.widgetWidthInSmallestEditor}px`; + this.listElement.style.width = `${this.minWidgetWidth}px`; + this.element.style.width = `${this.minWidgetWidth}px`; + this.details.element.style.width = `${this.minWidgetWidth}px`; } - /** - * Adjust the width of the docs widget, swaps docs/list and moves suggest widget if needed - * - * @swap boolean If true, then the docs and list are swapped - * @resizedDocWidth number If not null, this number will be used to set the width of the docs - * @preferredColumn Preferred column in the current line for the suggest widget - */ - private adjustDocs(swap: boolean, resizedDocWidth: number, preferredColumn: number) { - - if (swap) { - addClass(this.element, 'list-right'); - } - - if (resizedDocWidth !== null) { - this.details.element.style.width = `${resizedDocWidth}px`; - this.element.style.width = `${resizedDocWidth + this.listWidth}px`; - } - - this.preferredPosition = new Position(this.editor.getPosition().lineNumber, preferredColumn); - } private renderDetails(): void { if (this.state === State.Details || this.state === State.Open) { From 72e7b8eabbc47a1930712b57922a72103cf6f834 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 9 May 2017 07:30:28 +0200 Subject: [PATCH 0291/2747] theming - initial "send a smile" work --- .../feedback/electron-browser/feedback.ts | 26 ++++++++++- .../electron-browser/media/feedback.css | 43 +------------------ 2 files changed, 27 insertions(+), 42 deletions(-) diff --git a/src/vs/workbench/parts/feedback/electron-browser/feedback.ts b/src/vs/workbench/parts/feedback/electron-browser/feedback.ts index 10f65422a6e2c..9f85724b4e996 100644 --- a/src/vs/workbench/parts/feedback/electron-browser/feedback.ts +++ b/src/vs/workbench/parts/feedback/electron-browser/feedback.ts @@ -17,6 +17,9 @@ import * as dom from 'vs/base/browser/dom'; import { ICommandService } from 'vs/platform/commands/common/commands'; import * as errors from 'vs/base/common/errors'; import { IIntegrityService } from 'vs/platform/integrity/common/integrity'; +import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from "vs/platform/theme/common/themeService"; +import { attachStylerCallback } from "vs/platform/theme/common/styler"; +import { editorWidgetBackground, widgetShadow, inputBorder, inputForeground, inputBackground, inputActiveOptionBorder, editorBackground } from "vs/platform/theme/common/colorRegistry"; export interface IFeedback { feedback: string; @@ -67,7 +70,8 @@ export class FeedbackDropdown extends Dropdown { options: IFeedbackDropdownOptions, @ITelemetryService protected telemetryService: ITelemetryService, @ICommandService private commandService: ICommandService, - @IIntegrityService protected integrityService: IIntegrityService + @IIntegrityService protected integrityService: IIntegrityService, + @IThemeService private themeService: IThemeService ) { super(container, { contextViewProvider: options.contextViewProvider, @@ -200,6 +204,17 @@ export class FeedbackDropdown extends Dropdown { this.onSubmit(); }); + this.toDispose.push(attachStylerCallback(this.themeService, { widgetShadow, editorWidgetBackground, inputBackground, inputForeground, inputBorder, editorBackground }, colors => { + $form.style('background-color', colors.editorWidgetBackground); + $form.style('box-shadow', colors.widgetShadow ? `0 2px 8px ${colors.widgetShadow}` : null); + + this.feedbackDescriptionInput.style.backgroundColor = colors.inputBackground; + this.feedbackDescriptionInput.style.color = colors.inputForeground; + this.feedbackDescriptionInput.style.border = `1px solid ${colors.inputBorder || 'transparent'}`; + + $contactUs.style('background-color', colors.editorBackground); + })); + return { dispose: () => { this.feedbackForm = null; @@ -329,3 +344,12 @@ export class FeedbackDropdown extends Dropdown { this.aliasEnabled = false; } } + +registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { + + // Sentiment Buttons + const inputActiveOptionBorderColor = theme.getColor(inputActiveOptionBorder); + if (inputActiveOptionBorderColor) { + collector.addRule(`.monaco-shell .feedback-form .sentiment.checked { border: 1px solid ${inputActiveOptionBorderColor}; }`); + } +}); \ No newline at end of file diff --git a/src/vs/workbench/parts/feedback/electron-browser/media/feedback.css b/src/vs/workbench/parts/feedback/electron-browser/media/feedback.css index c957d301d0c85..3fc516150d67b 100644 --- a/src/vs/workbench/parts/feedback/electron-browser/media/feedback.css +++ b/src/vs/workbench/parts/feedback/electron-browser/media/feedback.css @@ -36,17 +36,9 @@ .monaco-shell .feedback-form .content .contactus { padding: 10px; - border: solid 1px #B4BABF; - background-color: #EBF2F9; float: right; } -.monaco-shell.vs-dark .feedback-form .content .contactus { - border: solid 1px #44444C; - background-color: #333337; -} - - .monaco-shell .feedback-form .content .channels { margin-top: 5px; font-size: 0.9em; @@ -148,10 +140,6 @@ background-color: #eaeaea; } -.monaco-shell .feedback-form .sentiment.checked { - border: 1px solid #39F; -} - /* Statusbar */ .monaco-shell .statusbar-item > .dropdown.send-feedback { display: inline-block; @@ -163,11 +151,6 @@ } /* Theming */ -.monaco-shell.vs .feedback-form { - color: black; - background: #F6F6F6; -} - .monaco-shell .feedback-form h2 { color: #007ACC; } @@ -224,11 +207,6 @@ background-color: #E51400; } -.monaco-shell.vs-dark .feedback-form { - background: #252526; - box-shadow: 0 2px 8px #000; -} - .monaco-shell.vs-dark .feedback-form h2 { color: #75BEFF; } @@ -239,18 +217,11 @@ } .monaco-shell.vs-dark .feedback-form .sentiment:hover { - background-color: #1e1e1e; -} - -.monaco-shell.vs-dark .feedback-form .sentiment.checked { - border-color: #75BEFF; + background-color: rgba(30,30,30,0.8); } .monaco-shell.vs-dark .feedback-form .feedback-alias, .monaco-shell.vs-dark .feedback-form .feedback-description { font-family: inherit; - border: 1px solid transparent; - background-color: #333337; - color: #D4D4D4; } .monaco-shell.vs-dark .feedback-form .cancel, @@ -259,7 +230,7 @@ } .monaco-shell.vs-dark .feedback-form .cancel:hover { - background-color: #1e1e1e; + background-color: rgba(30,30,30,0.8); } .monaco-shell .feedback-form .sentiment.smile { @@ -312,9 +283,6 @@ .monaco-shell.hc-black .feedback-form .feedback-alias, .monaco-shell.hc-black .feedback-form .feedback-description { font-family: inherit; - border: 1px solid #6FC3DF; - background-color: #000; - color: #D4D4D4; } .monaco-shell.hc-black .feedback-form .content .contactus { @@ -343,13 +311,6 @@ background-color: #0C141F; } -.monaco-shell.hc-black .feedback-form .sentiment { - border: 1px solid transparent; -} - -.monaco-shell.hc-black .feedback-form .sentiment.checked { - border: 1px solid #f38518; -} .monaco-shell .feedback-form .infotip { background: none; From c615b43be67170e166779c9020a249442c4f36fc Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 9 May 2017 07:58:17 +0200 Subject: [PATCH 0292/2747] theming - badge colors (fixes #25493) --- .../theme-abyss/themes/abyss-color-theme.json | 2 + .../themes/kimbie-dark-color-theme.json | 3 +- .../themes/monokai-color-theme.json | 2 + .../themes/quietlight-color-theme.json | 3 +- .../theme-red/themes/Red-color-theme.json | 3 +- .../themes/solarized-dark-color-theme.json | 2 + .../themes/solarized-light-color-theme.json | 2 + .../themes/tomorrow-night-blue-theme.json | 2 + .../base/browser/ui/countBadge/countBadge.css | 14 ----- .../base/browser/ui/countBadge/countBadge.ts | 62 ++++++++++++++++++- .../browser/referencesWidget.ts | 21 +++++-- src/vs/platform/theme/common/colorRegistry.ts | 4 ++ src/vs/platform/theme/common/styler.ts | 15 ++++- .../files/browser/media/explorerviewlet.css | 10 --- .../files/browser/views/openEditorsView.ts | 17 ++++- .../markers/browser/markersTreeViewer.ts | 11 +++- .../preferences/browser/media/preferences.css | 10 +-- .../preferences/browser/preferencesWidgets.ts | 14 ++++- .../parts/scm/electron-browser/scmViewlet.ts | 18 ++++-- .../parts/search/browser/searchResultsView.ts | 13 +++- 20 files changed, 173 insertions(+), 55 deletions(-) diff --git a/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json index aec2495fd14c4..d742e6ec1cc47 100644 --- a/extensions/theme-abyss/themes/abyss-color-theme.json +++ b/extensions/theme-abyss/themes/abyss-color-theme.json @@ -270,6 +270,8 @@ "inputValidation.errorBackground": "#A22D44", "inputValidation.errorBorder": "#AB395B", + "badge.background": "#0063a5", + "dropdown.background": "#181f2f", // "dropdown.foreground": "", // "dropdown.border": "", diff --git a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json index f98364ce67d12..94ddfd4583668 100644 --- a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json +++ b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json @@ -43,7 +43,8 @@ "inputValidation.warningBackground": "#51412c", // "inputValidation.warningBorder": "#5B7E7A", "inputValidation.errorBackground": "#5f0d0d", - "inputValidation.errorBorder": "#9d2f23" + "inputValidation.errorBorder": "#9d2f23", + "badge.background": "#7f5d38" }, "tokenColors": [ { diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index d8138d5cd91df..2ae56ae72393b 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -28,6 +28,8 @@ "tab.border": "#1e1f1c", "tab.inactiveForeground": "#ccccc7", // needs to be bright so it's readable when another editor group is focused "widget.shadow": "#1e1f1c", + "badge.background": "#75715E", + "badge.foreground": "#f8f8f2", "editorLineNumber.foreground": "#90908a", "panelTitle.activeForeground": "#f8f8f2", "panelTitle.activeBorder": "#75715E", diff --git a/extensions/theme-quietlight/themes/quietlight-color-theme.json b/extensions/theme-quietlight/themes/quietlight-color-theme.json index 9e065fef1d672..4edbd8c1871e3 100644 --- a/extensions/theme-quietlight/themes/quietlight-color-theme.json +++ b/extensions/theme-quietlight/themes/quietlight-color-theme.json @@ -495,6 +495,7 @@ "inputValidation.warningBackground": "#fffee2", "inputValidation.warningBorder": "#ffe055", "inputValidation.errorBackground": "#ffeaea", - "inputValidation.errorBorder": "#f1897f" + "inputValidation.errorBorder": "#f1897f", + "badge.background": "#705697AA" } } \ No newline at end of file diff --git a/extensions/theme-red/themes/Red-color-theme.json b/extensions/theme-red/themes/Red-color-theme.json index 22e587a81f9ea..ec9b4dbf20abb 100644 --- a/extensions/theme-red/themes/Red-color-theme.json +++ b/extensions/theme-red/themes/Red-color-theme.json @@ -50,7 +50,8 @@ "list.highlightForeground": "#ff4444", "notification.background": "#662222", "pickerGroup.foreground": "#cc9999", - "pickerGroup.border": "#ff000033" + "pickerGroup.border": "#ff000033", + "badge.background": "#cc3333" }, "name": "Red" } \ No newline at end of file diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index 81a5609cfebb2..118127b4e92b5 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -314,6 +314,8 @@ "inputValidation.errorBackground": "#571b26", "inputValidation.errorBorder": "#a92049", + "badge.background": "#047aa6", + "dropdown.background": "#00212B", "dropdown.border": "#2AA19899", // "dropdown.foreground": "", diff --git a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json index 4c5ea2d9070ad..71b344458d1b1 100644 --- a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -313,6 +313,8 @@ // "inputValidation.errorBackground": "", // "inputValidation.errorBorder": "", + "badge.background": "#B58900AA", + "dropdown.background": "#EEE8D5", // "dropdown.foreground": "", "dropdown.border": "#D3AF86", diff --git a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json index 1e1ba355fb2d2..f9af23e39ebdd 100644 --- a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json +++ b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json @@ -33,6 +33,8 @@ "activityBar.background": "#001733", "activityBarBadge.background": "#bbdaff", "activityBarBadge.foreground": "#001733", + "badge.background": "#bbdaffcc", + "badge.foreground": "#001733", "sideBar.background": "#001c40", "terminal.ansiBlack": "#111111", "terminal.ansiRed": "#ff9da4", diff --git a/src/vs/base/browser/ui/countBadge/countBadge.css b/src/vs/base/browser/ui/countBadge/countBadge.css index aef2810df4cd1..e6f36db1adc67 100644 --- a/src/vs/base/browser/ui/countBadge/countBadge.css +++ b/src/vs/base/browser/ui/countBadge/countBadge.css @@ -9,19 +9,5 @@ font-size: 85%; font-weight: normal; text-align: center; - background: #BEBEBE; - color: #FFF; display: inline; -} - -.vs-dark .monaco-count-badge { - color: #FFF; - background: #4D4D4D; -} - -/* High Contrast Theming */ -.hc-black .monaco-count-badge { - background: #000; - border: 1px solid #6FC3DF; - margin-top: 2px; } \ No newline at end of file diff --git a/src/vs/base/browser/ui/countBadge/countBadge.ts b/src/vs/base/browser/ui/countBadge/countBadge.ts index 36031fb9a1e79..a7fa56efce851 100644 --- a/src/vs/base/browser/ui/countBadge/countBadge.ts +++ b/src/vs/base/browser/ui/countBadge/countBadge.ts @@ -8,6 +8,24 @@ import 'vs/css!./countBadge'; import { $, append } from 'vs/base/browser/dom'; import { format } from 'vs/base/common/strings'; +import { Color } from "vs/base/common/color"; +import { mixin } from "vs/base/common/objects"; + +export interface ICountBadgeOptions extends ICountBadgetyles { + count?: number; + titleFormat?: string; +} + +export interface ICountBadgetyles { + badgeBackground?: Color; + badgeForeground?: Color; + badgeBorder?: Color; +} + +const defaultOpts = { + badgeBackground: Color.fromHex('#4D4D4D'), + badgeForeground: Color.fromHex('#FFFFFF') +}; export class CountBadge { @@ -15,10 +33,23 @@ export class CountBadge { private count: number; private titleFormat: string; - constructor(container: HTMLElement, count?: number, titleFormat?: string) { + private badgeBackground: Color; + private badgeForeground: Color; + private badgeBorder: Color; + + private options: ICountBadgeOptions; + + constructor(container: HTMLElement, options?: ICountBadgeOptions) { + this.options = options || Object.create(null); + mixin(this.options, defaultOpts, false); + + this.badgeBackground = this.options.badgeBackground; + this.badgeForeground = this.options.badgeForeground; + this.badgeBorder = this.options.badgeBorder; + this.element = append(container, $('.monaco-count-badge')); - this.titleFormat = titleFormat || ''; - this.setCount(count || 0); + this.titleFormat = this.options.titleFormat || ''; + this.setCount(this.options.count || 0); } setCount(count: number) { @@ -34,5 +65,30 @@ export class CountBadge { private render() { this.element.textContent = '' + this.count; this.element.title = format(this.titleFormat, this.count); + + this.applyStyles(); + } + + style(styles: ICountBadgetyles): void { + this.badgeBackground = styles.badgeBackground; + this.badgeForeground = styles.badgeForeground; + this.badgeBorder = styles.badgeBorder; + + this.applyStyles(); + } + + private applyStyles(): void { + if (this.element) { + const background = this.badgeBackground ? this.badgeBackground.toString() : null; + const foreground = this.badgeForeground ? this.badgeForeground.toString() : null; + const border = this.badgeBorder ? this.badgeBorder.toString() : null; + + this.element.style.backgroundColor = background; + this.element.style.color = foreground; + + this.element.style.borderWidth = border ? '1px' : null; + this.element.style.borderStyle = border ? 'solid' : null; + this.element.style.borderColor = border; + } } } diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index 19d31c7d4053d..f5bbe18e907b8 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -40,7 +40,7 @@ import { FileReferences, OneReference, ReferencesModel } from './referencesModel import { ITextModelResolverService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { registerColor, activeContrastBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { registerThemingParticipant, ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; -import { attachListStyler } from 'vs/platform/theme/common/styler'; +import { attachListStyler, attachBadgeStyler } from 'vs/platform/theme/common/styler'; import { IModelDecorationsChangedEvent } from 'vs/editor/common/model/textModelEvents'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; @@ -344,10 +344,16 @@ class Controller extends DefaultController { class Renderer extends LegacyRenderer { private _contextService: IWorkspaceContextService; + private _themeService: IThemeService; - constructor( @IWorkspaceContextService contextService: IWorkspaceContextService) { + constructor( + @IWorkspaceContextService contextService: IWorkspaceContextService, + @IThemeService themeService: IThemeService + ) { super(); + this._contextService = contextService; + this._themeService = themeService; } public getHeight(tree: tree.ITree, element: any): number { @@ -356,6 +362,7 @@ class Renderer extends LegacyRenderer { protected render(tree: tree.ITree, element: FileReferences | OneReference, container: HTMLElement): tree.IElementCallback { + const toDispose: IDisposable[] = []; dom.clearNode(container); if (element instanceof FileReferences) { @@ -364,13 +371,15 @@ class Renderer extends LegacyRenderer { /* tslint:disable:no-unused-expression */ new LeftRightWidget(fileReferencesContainer, (left: HTMLElement) => { - new FileLabel(left, element.uri, this._contextService); + const label = new FileLabel(left, element.uri, this._contextService); + toDispose.push(label); return null; }, (right: HTMLElement) => { const len = element.children.length; - const badge = new CountBadge(right, len); + const badge = new CountBadge(right, { count: len }); + toDispose.push(attachBadgeStyler(badge, this._themeService)); if (element.failure) { badge.setTitleFormat(nls.localize('referencesFailre', "Failed to resolve file.")); @@ -402,7 +411,9 @@ class Renderer extends LegacyRenderer { strings.escape(preview.after))).appendTo(container); } - return null; + return () => { + dispose(toDispose); + }; } } diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 110d70f162a15..7d5d29074b542 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -172,6 +172,10 @@ export const buttonForeground = registerColor('button.foreground', { dark: Color export const buttonBackground = registerColor('button.background', { dark: '#0E639C', light: '#007ACC', hc: null }, nls.localize('buttonBackground', "Button background color.")); export const buttonHoverBackground = registerColor('button.hoverBackground', { dark: lighten(buttonBackground, 0.2), light: darken(buttonBackground, 0.2), hc: null }, nls.localize('buttonHoverBackground', "Button background color when hovering.")); +export const badgeBackground = registerColor('badge.background', { dark: '#4D4D4D', light: '#BEBEBE', hc: Color.black }, nls.localize('badgeBackground', "Badge background color. Badges are small information labels, e.g. for search results count.")); +export const badgeForeground = registerColor('badge.foreground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('badgeForeground', "Badge foreground color. Badges are small information labels, e.g. for search results count.")); +export const badgeBorder = registerColor('badge.border', { dark: null, light: null, hc: contrastBorder }, nls.localize('badgeBorder', "Badge border color. Badges are small information labels, e.g. for search results count.")); + export const scrollbarShadow = registerColor('scrollbar.shadow', { dark: '#000000', light: '#DDDDDD', hc: null }, nls.localize('scrollbarShadow', "Scrollbar shadow to indicate that the view is scrolled.")); export const scrollbarSliderBackground = registerColor('scrollbarSlider.background', { dark: Color.fromHex('#797979').transparent(0.4), light: Color.fromHex('#646464').transparent(0.4), hc: transparent(contrastBorder, 0.6) }, nls.localize('scrollbarSliderBackground', "Slider background color.")); export const scrollbarSliderHoverBackground = registerColor('scrollbarSlider.hoverBackground', { dark: Color.fromHex('#646464').transparent(0.7), light: Color.fromHex('#646464').transparent(0.7), hc: transparent(contrastBorder, 0.8) }, nls.localize('scrollbarSliderHoverBackground', "Slider background color when hovering.")); diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index ca14730cfd09e..e5d088e794a82 100644 --- a/src/vs/platform/theme/common/styler.ts +++ b/src/vs/platform/theme/common/styler.ts @@ -6,7 +6,7 @@ 'use strict'; import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; -import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, lighten } from 'vs/platform/theme/common/colorRegistry'; +import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, lighten, badgeBackground, badgeForeground, badgeBorder } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable } from 'vs/base/common/lifecycle'; import { SIDE_BAR_SECTION_HEADER_BACKGROUND } from 'vs/workbench/common/theme'; @@ -46,6 +46,19 @@ export function attachCheckboxStyler(widget: IThemable, themeService: IThemeServ }, widget); } +export function attachBadgeStyler(widget: IThemable, themeService: IThemeService, style?: + { + badgeBackground?: ColorIdentifier, + badgeForeground?: ColorIdentifier, + badgeBorder?: ColorIdentifier + }): IDisposable { + return doAttachStyler(themeService, { + badgeBackground: (style && style.badgeBackground) || badgeBackground, + badgeForeground: (style && style.badgeForeground) || badgeForeground, + badgeBorder: (style && style.badgeBorder) || badgeBorder + }, widget); +} + export function attachInputBoxStyler(widget: IThemable, themeService: IThemeService, style?: { inputBackground?: ColorIdentifier, diff --git a/src/vs/workbench/parts/files/browser/media/explorerviewlet.css b/src/vs/workbench/parts/files/browser/media/explorerviewlet.css index b8a40903a7414..c0718789375fe 100644 --- a/src/vs/workbench/parts/files/browser/media/explorerviewlet.css +++ b/src/vs/workbench/parts/files/browser/media/explorerviewlet.css @@ -182,14 +182,4 @@ .hc-black .monaco-workbench .explorer-viewlet .open-editor, .hc-black .monaco-workbench .explorer-viewlet .editor-group { line-height: 20px; -} - -/* TODO@Theme */ - -.vs .monaco-workbench .explorer-viewlet .header .monaco-count-badge { - background-color: rgba(190, 190, 190, 0.7); -} - -.vs-dark .monaco-workbench .explorer-viewlet .header .monaco-count-badge { - background-color: rgba(100, 100, 100, 0.5); } \ No newline at end of file diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts index b6f1e2db772ab..07b9ac2cbd9b8 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts @@ -31,8 +31,9 @@ import { ToggleEditorLayoutAction } from 'vs/workbench/browser/actions/toggleEdi import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IListService } from 'vs/platform/list/browser/listService'; import { EditorGroup } from 'vs/workbench/common/editor/editorStacksModel'; -import { attachListStyler } from 'vs/platform/theme/common/styler'; +import { attachListStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { badgeBackground, badgeForeground, badgeBorder } from "vs/platform/theme/common/colorRegistry"; const $ = dom.$; @@ -87,6 +88,20 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView { titleSpan.textContent = nls.localize({ key: 'openEditors', comment: ['Open is an adjective'] }, "Open Editors"); this.dirtyCountElement = dom.append(titleDiv, $('.monaco-count-badge')); + + this.toDispose.push((attachStylerCallback(this.themeService, { badgeBackground, badgeForeground, badgeBorder }, colors => { + const background = colors.badgeBackground ? colors.badgeBackground.toString() : null; + const foreground = colors.badgeForeground ? colors.badgeForeground.toString() : null; + const border = colors.badgeBorder ? colors.badgeBorder.toString() : null; + + this.dirtyCountElement.style.backgroundColor = background; + this.dirtyCountElement.style.color = foreground; + + this.dirtyCountElement.style.borderWidth = border ? '1px' : null; + this.dirtyCountElement.style.borderStyle = border ? 'solid' : null; + this.dirtyCountElement.style.borderColor = border; + }))); + this.updateDirtyIndicator(); super.renderHeader(container); diff --git a/src/vs/workbench/parts/markers/browser/markersTreeViewer.ts b/src/vs/workbench/parts/markers/browser/markersTreeViewer.ts index 4367e3c85de64..b0f736e5e5182 100644 --- a/src/vs/workbench/parts/markers/browser/markersTreeViewer.ts +++ b/src/vs/workbench/parts/markers/browser/markersTreeViewer.ts @@ -18,9 +18,13 @@ import { IMarker } from 'vs/platform/markers/common/markers'; import { MarkersModel, Resource, Marker } from 'vs/workbench/parts/markers/common/markersModel'; import Messages from 'vs/workbench/parts/markers/common/messages'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { attachBadgeStyler } from "vs/platform/theme/common/styler"; +import { IThemeService } from "vs/platform/theme/common/themeService"; +import { IDisposable } from "vs/base/common/lifecycle"; interface IAnyResourceTemplateData { count: CountBadge; + styler: IDisposable; } interface IResourceTemplateData extends IAnyResourceTemplateData { @@ -80,7 +84,8 @@ export class Renderer implements IRenderer { constructor(private actionRunner: IActionRunner, private actionProvider: IActionProvider, @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private instantiationService: IInstantiationService, + @IThemeService private themeService: IThemeService ) { } @@ -121,6 +126,7 @@ export class Renderer implements IRenderer { const badgeWrapper = dom.append(container, dom.$('.count-badge-wrapper')); data.count = new CountBadge(badgeWrapper); + data.styler = attachBadgeStyler(data.count, this.themeService); return data; } @@ -132,6 +138,7 @@ export class Renderer implements IRenderer { const badgeWrapper = dom.append(container, dom.$('.count-badge-wrapper')); data.count = new CountBadge(badgeWrapper); + data.styler = attachBadgeStyler(data.count, this.themeService); return data; } @@ -193,9 +200,11 @@ export class Renderer implements IRenderer { public disposeTemplate(tree: ITree, templateId: string, templateData: any): void { if (templateId === Renderer.FILE_RESOURCE_TEMPLATE_ID) { (templateData).fileLabel.dispose(); + (templateData).styler.dispose(); } if (templateId === Renderer.RESOURCE_TEMPLATE_ID) { (templateData).resourceLabel.dispose(); + (templateData).styler.dispose(); } } } diff --git a/src/vs/workbench/parts/preferences/browser/media/preferences.css b/src/vs/workbench/parts/preferences/browser/media/preferences.css index d0f783fbcaa39..a8eccaa8c2d50 100644 --- a/src/vs/workbench/parts/preferences/browser/media/preferences.css +++ b/src/vs/workbench/parts/preferences/browser/media/preferences.css @@ -108,25 +108,19 @@ position: absolute; right: 10px; border-radius: 2px; - background-color: #EFEFF2; } .settings-header-widget > .settings-count-widget.hide { display: none; } -.hc-black .settings-header-widget > .settings-count-widget, -.vs-dark .settings-header-widget > .settings-count-widget { - background-color: #2D2D30; -} - .settings-header-widget > .settings-count-widget.no-results { - color: #A1260D; + color: #A1260D !important; } .hc-black .settings-header-widget > .settings-count-widget.no-results, .vs-dark .settings-header-widget > .settings-count-widget.no-results { - color: #F48771 + color: #F48771 !important; } .settings-header-widget > .settings-search-container { diff --git a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts index 5d7cfc196957a..ff38198dbbaf0 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts @@ -27,7 +27,7 @@ import { attachInputBoxStyler, attachStylerCallback } from 'vs/platform/theme/co import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Position } from 'vs/editor/common/core/position'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { buttonBackground, buttonForeground } from "vs/platform/theme/common/colorRegistry"; +import { buttonBackground, buttonForeground, badgeBorder, badgeForeground, badgeBackground } from "vs/platform/theme/common/colorRegistry"; export class SettingsGroupTitleWidget extends Widget implements IViewZone { @@ -263,6 +263,18 @@ export class SearchWidget extends Widget { this.domNode = DOM.append(parent, DOM.$('div.settings-header-widget')); this.createSearchContainer(DOM.append(this.domNode, DOM.$('div.settings-search-container'))); this.countElement = DOM.append(this.domNode, DOM.$('.settings-count-widget')); + this._register(attachStylerCallback(this.themeService, { badgeBackground, badgeForeground, badgeBorder }, colors => { + const background = colors.badgeBackground ? colors.badgeBackground.toString() : null; + const foreground = colors.badgeForeground ? colors.badgeForeground.toString() : null; + const border = colors.badgeBorder ? colors.badgeBorder.toString() : null; + + this.countElement.style.backgroundColor = background; + this.countElement.style.color = foreground; + + this.countElement.style.borderWidth = border ? '1px' : null; + this.countElement.style.borderStyle = border ? 'solid' : null; + this.countElement.style.borderColor = border; + })); this.inputBox.inputElement.setAttribute('aria-live', 'assertive'); } diff --git a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts index 4bf09bf4e1126..f395ebd5eed22 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts @@ -42,7 +42,7 @@ import { InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; import { IModelService } from 'vs/editor/common/services/modelService'; import { comparePaths } from 'vs/base/common/comparers'; import { isSCMResource } from './scmUtil'; -import { attachInputBoxStyler, attachListStyler } from 'vs/platform/theme/common/styler'; +import { attachInputBoxStyler, attachListStyler, attachBadgeStyler } from 'vs/platform/theme/common/styler'; import Severity from 'vs/base/common/severity'; // TODO@Joao @@ -80,6 +80,7 @@ interface ResourceGroupTemplate { name: HTMLElement; count: CountBadge; actionBar: ActionBar; + dispose: () => void; } class ResourceGroupRenderer implements IRenderer { @@ -89,7 +90,8 @@ class ResourceGroupRenderer implements IRenderer { + actionBar.dispose(); + styler.dispose(); + } + }; } renderElement(group: ISCMResourceGroup, index: number, template: ResourceGroupTemplate): void { @@ -112,7 +120,7 @@ class ResourceGroupRenderer implements IRenderer this.getActionItem(action); const renderers = [ - new ResourceGroupRenderer(this.menus, actionItemProvider), + new ResourceGroupRenderer(this.menus, actionItemProvider, this.themeService), this.instantiationService.createInstance(ResourceRenderer, this.menus, actionItemProvider, () => this.getSelectedResources()), ]; diff --git a/src/vs/workbench/parts/search/browser/searchResultsView.ts b/src/vs/workbench/parts/search/browser/searchResultsView.ts index 5039bded06412..2ea9e84cafa13 100644 --- a/src/vs/workbench/parts/search/browser/searchResultsView.ts +++ b/src/vs/workbench/parts/search/browser/searchResultsView.ts @@ -19,6 +19,8 @@ import { Range } from 'vs/editor/common/core/range'; import { SearchViewlet } from 'vs/workbench/parts/search/browser/searchViewlet'; import { RemoveAction, ReplaceAllAction, ReplaceAction } from 'vs/workbench/parts/search/browser/searchActions'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { attachBadgeStyler } from "vs/platform/theme/common/styler"; +import { IThemeService } from "vs/platform/theme/common/themeService"; export class SearchDataSource implements IDataSource { @@ -107,8 +109,13 @@ export class SearchRenderer extends Disposable implements IRenderer { private static FILE_MATCH_TEMPLATE_ID = 'fileMatch'; private static MATCH_TEMPLATE_ID = 'match'; - constructor(actionRunner: IActionRunner, private viewlet: SearchViewlet, @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IInstantiationService private instantiationService: IInstantiationService) { + constructor( + actionRunner: IActionRunner, + private viewlet: SearchViewlet, + @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IInstantiationService private instantiationService: IInstantiationService, + @IThemeService private themeService: IThemeService + ) { super(); } @@ -145,11 +152,11 @@ export class SearchRenderer extends Disposable implements IRenderer { } } - private renderFileMatchTemplate(tree: ITree, templateId: string, container: HTMLElement): IFileMatchTemplate { let fileMatchElement = DOM.append(container, DOM.$('.filematch')); const label = this.instantiationService.createInstance(FileLabel, fileMatchElement, void 0); const badge = new CountBadge(DOM.append(fileMatchElement, DOM.$('.badge'))); + this._register(attachBadgeStyler(badge, this.themeService)); const actions = new ActionBar(fileMatchElement, { animated: false }); return { label, badge, actions }; } From 7a47589cac1f6e230c1104c8d117aeb7edb15a11 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 9 May 2017 09:52:27 +0200 Subject: [PATCH 0293/2747] remove git menu fixes #19638 --- src/vs/code/electron-main/menus.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 67092963e6c4b..9dc190d135f06 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -655,8 +655,7 @@ export class VSCodeMenu { private setViewMenu(viewMenu: Electron.Menu): void { const explorer = this.createMenuItem(nls.localize({ key: 'miViewExplorer', comment: ['&& denotes a mnemonic'] }, "&&Explorer"), 'workbench.view.explorer'); const search = this.createMenuItem(nls.localize({ key: 'miViewSearch', comment: ['&& denotes a mnemonic'] }, "&&Search"), 'workbench.view.search'); - const git = this.createMenuItem(nls.localize({ key: 'miViewGit', comment: ['&& denotes a mnemonic'] }, "&&Git"), 'workbench.view.git'); - // const scm = this.createMenuItem(nls.localize({ key: 'miViewSCM', comment: ['&& denotes a mnemonic'] }, "S&&CM"), 'workbench.view.scm'); + const scm = this.createMenuItem(nls.localize({ key: 'miViewSCM', comment: ['&& denotes a mnemonic'] }, "S&&CM"), 'workbench.view.scm'); const debug = this.createMenuItem(nls.localize({ key: 'miViewDebug', comment: ['&& denotes a mnemonic'] }, "&&Debug"), 'workbench.view.debug'); const extensions = this.createMenuItem(nls.localize({ key: 'miViewExtensions', comment: ['&& denotes a mnemonic'] }, "E&&xtensions"), 'workbench.view.extensions'); const output = this.createMenuItem(nls.localize({ key: 'miToggleOutput', comment: ['&& denotes a mnemonic'] }, "&&Output"), 'workbench.action.output.toggleOutput'); @@ -724,8 +723,7 @@ export class VSCodeMenu { __separator__(), explorer, search, - git, - // scm, + scm, debug, extensions, additionalViewlets, From f97acb341c9850edb1b52702b84346b3367f98aa Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 9 May 2017 10:14:19 +0200 Subject: [PATCH 0294/2747] theming - inherit badge colors in activity bar --- .../theme-abyss/themes/abyss-color-theme.json | 2 +- .../theme-defaults/themes/dark_defaults.json | 3 ++- .../theme-defaults/themes/light_defaults.json | 3 ++- .../themes/kimbie-dark-color-theme.json | 1 - .../theme-monokai/themes/monokai-color-theme.json | 2 -- extensions/theme-red/themes/Red-color-theme.json | 1 - .../themes/solarized-dark-color-theme.json | 2 +- .../themes/tomorrow-night-blue-theme.json | 2 -- src/vs/workbench/common/theme.ts | 14 +++++++------- 9 files changed, 13 insertions(+), 17 deletions(-) diff --git a/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json index d742e6ec1cc47..d45846b0d169d 100644 --- a/extensions/theme-abyss/themes/abyss-color-theme.json +++ b/extensions/theme-abyss/themes/abyss-color-theme.json @@ -369,7 +369,7 @@ // Workbench: Activity Bar "activityBar.background": "#051336", // "activityBar.foreground": "", - "activityBarBadge.background": "#0063a5", + // "activityBarBadge.background": "", // "activityBarBadge.foreground": "", // "activityBar.dropBackground": "", diff --git a/extensions/theme-defaults/themes/dark_defaults.json b/extensions/theme-defaults/themes/dark_defaults.json index 690098711f959..bb319ce567533 100644 --- a/extensions/theme-defaults/themes/dark_defaults.json +++ b/extensions/theme-defaults/themes/dark_defaults.json @@ -7,6 +7,7 @@ "editor.inactiveSelectionBackground": "#3A3D41", "editorIndentGuide.background": "#404040", "editor.selectionHighlightBackground": "#add6ff26", - "list.dropBackground": "#383B3D" + "list.dropBackground": "#383B3D", + "activityBarBadge.background": "#007ACC" } } \ No newline at end of file diff --git a/extensions/theme-defaults/themes/light_defaults.json b/extensions/theme-defaults/themes/light_defaults.json index 091fb560b5efb..fb7571ba81a0a 100644 --- a/extensions/theme-defaults/themes/light_defaults.json +++ b/extensions/theme-defaults/themes/light_defaults.json @@ -7,6 +7,7 @@ "editor.inactiveSelectionBackground": "#E5EBF1", "editorIndentGuide.background": "#d3d3d3", "editor.selectionHighlightBackground": "#add6ff4d", - "editorSuggestWidget.background": "#F3F3F3" + "editorSuggestWidget.background": "#F3F3F3", + "activityBarBadge.background": "#007ACC" } } \ No newline at end of file diff --git a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json index 94ddfd4583668..2a9958948d899 100644 --- a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json +++ b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json @@ -26,7 +26,6 @@ "statusBar.noFolderBackground": "#423523", "activityBar.background": "#221a0f", "activityBar.foreground": "#d3af86", - "activityBarBadge.background": "#7f5d38", "sideBar.background": "#362712", "editor.lineHighlightBackground": "#5e452b", "editorCursor.foreground": "#d3af86", diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index 2ae56ae72393b..b2ec0a432b1be 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -40,8 +40,6 @@ "statusBar.noFolderBackground": "#414339", "statusBar.debuggingBackground": "#75715E", "activityBar.background": "#272822", - "activityBarBadge.foreground": "#f8f8f2", - "activityBarBadge.background": "#75715E", "activityBar.foreground": "#f8f8f2", "activityBar.dropBackground": "#414339", "sideBar.background": "#1e1f1c", diff --git a/extensions/theme-red/themes/Red-color-theme.json b/extensions/theme-red/themes/Red-color-theme.json index ec9b4dbf20abb..19e66f7bea333 100644 --- a/extensions/theme-red/themes/Red-color-theme.json +++ b/extensions/theme-red/themes/Red-color-theme.json @@ -2,7 +2,6 @@ "tokenColors": "./red.tmTheme", "colors": { // window - "activityBarBadge.background": "#cc3333", "activityBar.background": "#580000", "tab.inactiveBackground": "#300a0a", "tab.activeBackground": "#490000", diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index 118127b4e92b5..b1e0133a628db 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -412,7 +412,7 @@ // Workbench: Activity Bar "activityBar.background": "#003847", - "activityBarBadge.background": "#047aa6", + // "activityBarBadge.background": "", // "activityBar.dropBackground": "", // "activityBar.foreground": "", // "activityBarBadge.foreground": "", diff --git a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json index f9af23e39ebdd..4ba744d26babc 100644 --- a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json +++ b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json @@ -31,8 +31,6 @@ "statusBar.noFolderBackground": "#001126", "statusBar.debuggingBackground": "#001126", "activityBar.background": "#001733", - "activityBarBadge.background": "#bbdaff", - "activityBarBadge.foreground": "#001733", "badge.background": "#bbdaffcc", "badge.foreground": "#001733", "sideBar.background": "#001c40", diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 44c3a6c51e1c9..cf64a63b7771d 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import nls = require('vs/nls'); -import { registerColor, editorBackground, contrastBorder, transparent } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, editorBackground, contrastBorder, transparent, badgeForeground, badgeBackground } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable, Disposable, dispose } from 'vs/base/common/lifecycle'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; import { Color } from 'vs/base/common/color'; @@ -177,15 +177,15 @@ export const ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND = registerColor('activityBar. }, nls.localize('activityBarDragAndDropBackground', "Drag and drop feedback color for the activity bar items. The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); export const ACTIVITY_BAR_BADGE_BACKGROUND = registerColor('activityBarBadge.background', { - dark: '#007ACC', - light: '#007ACC', - hc: '#000000' + dark: badgeBackground, + light: badgeBackground, + hc: badgeBackground }, nls.localize('activityBarBadgeBackground', "Activity notification badge background color. The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); export const ACTIVITY_BAR_BADGE_FOREGROUND = registerColor('activityBarBadge.foreground', { - dark: Color.white, - light: Color.white, - hc: Color.white + dark: badgeForeground, + light: badgeForeground, + hc: badgeForeground }, nls.localize('activityBarBadgeForeground', "Activity notification badge foreground color. The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); From 5830a4af1c6ecf85c0a87e83b38c42d6ef8523e8 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 9 May 2017 10:18:30 +0200 Subject: [PATCH 0295/2747] theming - do not expose badge.border --- src/vs/platform/theme/common/colorRegistry.ts | 1 - src/vs/platform/theme/common/styler.ts | 7 +++---- .../workbench/parts/files/browser/views/openEditorsView.ts | 6 +++--- .../parts/preferences/browser/preferencesWidgets.ts | 6 +++--- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 7d5d29074b542..f75fc922c72e2 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -174,7 +174,6 @@ export const buttonHoverBackground = registerColor('button.hoverBackground', { d export const badgeBackground = registerColor('badge.background', { dark: '#4D4D4D', light: '#BEBEBE', hc: Color.black }, nls.localize('badgeBackground', "Badge background color. Badges are small information labels, e.g. for search results count.")); export const badgeForeground = registerColor('badge.foreground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('badgeForeground', "Badge foreground color. Badges are small information labels, e.g. for search results count.")); -export const badgeBorder = registerColor('badge.border', { dark: null, light: null, hc: contrastBorder }, nls.localize('badgeBorder', "Badge border color. Badges are small information labels, e.g. for search results count.")); export const scrollbarShadow = registerColor('scrollbar.shadow', { dark: '#000000', light: '#DDDDDD', hc: null }, nls.localize('scrollbarShadow', "Scrollbar shadow to indicate that the view is scrolled.")); export const scrollbarSliderBackground = registerColor('scrollbarSlider.background', { dark: Color.fromHex('#797979').transparent(0.4), light: Color.fromHex('#646464').transparent(0.4), hc: transparent(contrastBorder, 0.6) }, nls.localize('scrollbarSliderBackground', "Slider background color.")); diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index e5d088e794a82..51504eaf7a5c2 100644 --- a/src/vs/platform/theme/common/styler.ts +++ b/src/vs/platform/theme/common/styler.ts @@ -6,7 +6,7 @@ 'use strict'; import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; -import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, lighten, badgeBackground, badgeForeground, badgeBorder } from 'vs/platform/theme/common/colorRegistry'; +import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, lighten, badgeBackground, badgeForeground } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable } from 'vs/base/common/lifecycle'; import { SIDE_BAR_SECTION_HEADER_BACKGROUND } from 'vs/workbench/common/theme'; @@ -49,13 +49,12 @@ export function attachCheckboxStyler(widget: IThemable, themeService: IThemeServ export function attachBadgeStyler(widget: IThemable, themeService: IThemeService, style?: { badgeBackground?: ColorIdentifier, - badgeForeground?: ColorIdentifier, - badgeBorder?: ColorIdentifier + badgeForeground?: ColorIdentifier }): IDisposable { return doAttachStyler(themeService, { badgeBackground: (style && style.badgeBackground) || badgeBackground, badgeForeground: (style && style.badgeForeground) || badgeForeground, - badgeBorder: (style && style.badgeBorder) || badgeBorder + badgeBorder: contrastBorder }, widget); } diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts index 07b9ac2cbd9b8..01b6ce74cfd7e 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts @@ -33,7 +33,7 @@ import { IListService } from 'vs/platform/list/browser/listService'; import { EditorGroup } from 'vs/workbench/common/editor/editorStacksModel'; import { attachListStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { badgeBackground, badgeForeground, badgeBorder } from "vs/platform/theme/common/colorRegistry"; +import { badgeBackground, badgeForeground, contrastBorder } from "vs/platform/theme/common/colorRegistry"; const $ = dom.$; @@ -89,10 +89,10 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView { this.dirtyCountElement = dom.append(titleDiv, $('.monaco-count-badge')); - this.toDispose.push((attachStylerCallback(this.themeService, { badgeBackground, badgeForeground, badgeBorder }, colors => { + this.toDispose.push((attachStylerCallback(this.themeService, { badgeBackground, badgeForeground, contrastBorder }, colors => { const background = colors.badgeBackground ? colors.badgeBackground.toString() : null; const foreground = colors.badgeForeground ? colors.badgeForeground.toString() : null; - const border = colors.badgeBorder ? colors.badgeBorder.toString() : null; + const border = colors.contrastBorder ? colors.contrastBorder.toString() : null; this.dirtyCountElement.style.backgroundColor = background; this.dirtyCountElement.style.color = foreground; diff --git a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts index ff38198dbbaf0..a07b8a57be6d9 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts @@ -27,7 +27,7 @@ import { attachInputBoxStyler, attachStylerCallback } from 'vs/platform/theme/co import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Position } from 'vs/editor/common/core/position'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { buttonBackground, buttonForeground, badgeBorder, badgeForeground, badgeBackground } from "vs/platform/theme/common/colorRegistry"; +import { buttonBackground, buttonForeground, badgeForeground, badgeBackground, contrastBorder } from "vs/platform/theme/common/colorRegistry"; export class SettingsGroupTitleWidget extends Widget implements IViewZone { @@ -263,10 +263,10 @@ export class SearchWidget extends Widget { this.domNode = DOM.append(parent, DOM.$('div.settings-header-widget')); this.createSearchContainer(DOM.append(this.domNode, DOM.$('div.settings-search-container'))); this.countElement = DOM.append(this.domNode, DOM.$('.settings-count-widget')); - this._register(attachStylerCallback(this.themeService, { badgeBackground, badgeForeground, badgeBorder }, colors => { + this._register(attachStylerCallback(this.themeService, { badgeBackground, badgeForeground, contrastBorder }, colors => { const background = colors.badgeBackground ? colors.badgeBackground.toString() : null; const foreground = colors.badgeForeground ? colors.badgeForeground.toString() : null; - const border = colors.badgeBorder ? colors.badgeBorder.toString() : null; + const border = colors.contrastBorder ? colors.contrastBorder.toString() : null; this.countElement.style.backgroundColor = background; this.countElement.style.color = foreground; From fd7958b5c86ccd2dbc1c496a520fdd7fe5682d49 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 9 May 2017 10:53:27 +0200 Subject: [PATCH 0296/2747] debug: do not use special arrow character on windows fixes #25330 --- .../workbench/parts/debug/browser/media/repl.css | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/media/repl.css b/src/vs/workbench/parts/debug/browser/media/repl.css index c25e4150f66f5..9c59952e8e141 100644 --- a/src/vs/workbench/parts/debug/browser/media/repl.css +++ b/src/vs/workbench/parts/debug/browser/media/repl.css @@ -76,6 +76,7 @@ .monaco-workbench .repl .repl-tree .monaco-tree .monaco-tree-row.has-children > .content.input-output-pair:before { top: 8px; + cursor: pointer; } .monaco-workbench .repl .repl-tree .monaco-tree .monaco-tree-row.has-children > .content.input-output-pair:after { @@ -114,21 +115,13 @@ position: absolute; } -.monaco-workbench.windows .repl .repl-input-wrapper:before { - content: '\203A'; /* character does not exist on windows */ - font-size: 30px; - line-height: 12px; -} - -.monaco-workbench.linux .repl .repl-input-wrapper:before { +.monaco-workbench .repl .repl-input-wrapper:before { content: '\276f'; - font-size: 9px; line-height: 18px; } -.monaco-workbench.mac .repl .repl-input-wrapper:before { - content: '\276f'; - line-height: 18px; +.monaco-workbench.linux .repl .repl-input-wrapper:before { + font-size: 9px; } /* Actions */ From c0362f72e519b96b31dc6f8e8ea0eb9c2c4fc2f3 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 9 May 2017 11:08:12 +0200 Subject: [PATCH 0297/2747] Fixes #26252: compute widget max width in the same way in all cases --- .../viewParts/contentWidgets/contentWidgets.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts b/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts index 8d57aa5bce03f..bce7eb16e383f 100644 --- a/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts +++ b/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts @@ -111,12 +111,7 @@ export class ViewContentWidgets extends ViewPart { let keys = Object.keys(this._widgets); for (let i = 0, len = keys.length; i < len; i++) { const widgetId = keys[i]; - const widgetData = this._widgets[widgetId]; - const maxWidth = widgetData.allowEditorOverflow - ? window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth - : this._contentWidth; - - widgetData.domNode.setMaxWidth(maxWidth); + this._setWidgetMaxWidth(this._widgets[widgetId]); } } } @@ -147,6 +142,14 @@ export class ViewContentWidgets extends ViewPart { // ---- end view event handlers + private _setWidgetMaxWidth(widgetData: IWidgetData): void { + const maxWidth = widgetData.allowEditorOverflow + ? window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth + : this._contentWidth; + + widgetData.domNode.setMaxWidth(maxWidth); + } + public addWidget(widget: IContentWidget): void { const domNode = createFastDomNode(widget.getDomNode()); @@ -161,7 +164,7 @@ export class ViewContentWidgets extends ViewPart { this._widgets[widget.getId()] = widgetData; domNode.setPosition((this._context.configuration.editor.viewInfo.fixedOverflowWidgets && widget.allowEditorOverflow) ? 'fixed' : 'absolute'); - domNode.setMaxWidth(this._contentWidth); + this._setWidgetMaxWidth(widgetData); domNode.setVisibility('hidden'); domNode.setAttribute('widgetId', widget.getId()); From 6819433c055b1116f4191397697b099c0af0fdda Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 9 May 2017 11:15:21 +0200 Subject: [PATCH 0298/2747] better decoration management, more tests, finish at final tab stop --- .../contrib/snippet/browser/editorSnippets.ts | 81 +++++++++++------- .../test/browser/editorSnippets.test.ts | 84 +++++++++++++++++++ 2 files changed, 134 insertions(+), 31 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index f0c26cfa1b2ff..e77d8defd5469 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -6,7 +6,7 @@ 'use strict'; import { getLeadingWhitespace } from 'vs/base/common/strings'; -import { ICommonCodeEditor, IModel, TrackedRangeStickiness, IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; +import { ICommonCodeEditor, IModel, IModelDecorationOptions, TrackedRangeStickiness, IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { TextmateSnippet, Placeholder, SnippetParser } from '../common/snippetParser'; import { Selection } from 'vs/editor/common/core/selection'; @@ -24,6 +24,9 @@ class OneSnippet { private _placeholderGroups: Placeholder[][]; private _placeholderGroupsIdx: number; + private static readonly _growingDecoration: IModelDecorationOptions = { stickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges }; + private static readonly _fixedDecoration: IModelDecorationOptions = { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges }; + constructor(editor: ICommonCodeEditor, snippet: TextmateSnippet, offset: number) { this._editor = editor; this._snippet = snippet; @@ -58,16 +61,7 @@ class OneSnippet { const end = model.getPositionAt(this._offset + placeholderOffset + placeholderLen); const range = new Range(start.lineNumber, start.column, end.lineNumber, end.column); - let stickiness: TrackedRangeStickiness; - if (placeholder.isFinalTabstop) { - stickiness = TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges; - } else if (lastRange && lastRange.getEndPosition().equals(range.getStartPosition())) { - stickiness = TrackedRangeStickiness.GrowsOnlyWhenTypingAfter; - } else { - stickiness = TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges; - } - - const handle = accessor.addDecoration(range, { stickiness }); + const handle = accessor.addDecoration(range, OneSnippet._fixedDecoration); this._placeholderDecorations.set(placeholder, handle); lastRange = range; @@ -91,27 +85,50 @@ class OneSnippet { this._init(); + const prevGroupsIdx = this._placeholderGroupsIdx; + if (fwd && this._placeholderGroupsIdx < this._placeholderGroups.length - 1) { this._placeholderGroupsIdx += 1; - return this._getCurrentPlaceholderSelections(); } else if (!fwd && this._placeholderGroupsIdx > 0) { this._placeholderGroupsIdx -= 1; - return this._getCurrentPlaceholderSelections(); } else { - return undefined; + return []; } + + return this._editor.getModel().changeDecorations(accessor => { + + // change stickness to never grow when typing at its edges + // so that in-active tabstops never grow + if (prevGroupsIdx !== -1) { + for (const placeholder of this._placeholderGroups[prevGroupsIdx]) { + const id = this._placeholderDecorations.get(placeholder); + accessor.changeDecorationOptions(id, OneSnippet._fixedDecoration); + } + } + + // change stickiness to always grow when typing at its edges + // because these decorations represent the currently active + // tabstop. Special case: reaching the final tab stop + const selections: Selection[] = []; + for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) { + const id = this._placeholderDecorations.get(placeholder); + const range = this._editor.getModel().getDecorationRange(id); + selections.push(new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)); + + accessor.changeDecorationOptions(id, placeholder.isFinalTabstop ? OneSnippet._fixedDecoration : OneSnippet._growingDecoration); + } + return selections; + }); } - private _getCurrentPlaceholderSelections(): Selection[] { - const selections: Selection[] = []; - for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) { - const handle = this._placeholderDecorations.get(placeholder); - const range = this._editor.getModel().getDecorationRange(handle); - selections.push(new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)); + get isAtFinalPlaceholder() { + if (this._placeholderGroupsIdx < 0) { + return false; + } else { + return this._placeholderGroups[this._placeholderGroupsIdx][0].isFinalTabstop; } - return selections; } } @@ -161,32 +178,34 @@ export class SnippetSession { this._editor.setSelections(newSelections); } + dispose(): void { + dispose(this._snippets); + } + next(): void { const newSelections = this._move(true); - this._editor.setSelections(newSelections); + if (newSelections.length > 0) { + this._editor.setSelections(newSelections); + } } prev(): void { const newSelections = this._move(false); - this._editor.setSelections(newSelections); + if (newSelections.length > 0) { + this._editor.setSelections(newSelections); + } } private _move(fwd: boolean): Selection[] { const selections: Selection[] = []; for (const snippet of this._snippets) { const oneSelection = snippet.move(fwd); - if (!oneSelection) { - if (fwd) { - this.stop(); - } - return this._editor.getSelections(); - } selections.push(...oneSelection); } return selections; } - stop(): void { - dispose(this._snippets); + get isAtFinalPlaceholder() { + return this._snippets[0].isAtFinalPlaceholder; } } diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts index 9d49e4e13d366..ed0c472107aca 100644 --- a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts @@ -59,6 +59,19 @@ suite('SnippetInsertion', function () { assertSelections(editor, new Selection(1, 10, 1, 10), new Selection(2, 14, 2, 14)); }); + test('snippets, repeated tabstops', function () { + const session = new SnippetSession(editor, '${1:abc}foo${1:abc}$0'); + assertSelections(editor, + new Selection(1, 1, 1, 4), new Selection(1, 7, 1, 10), + new Selection(2, 5, 2, 8), new Selection(2, 11, 2, 14), + ); + session.next(); + assertSelections(editor, + new Selection(1, 10, 1, 10), + new Selection(2, 14, 2, 14), + ); + }); + test('snippets, selections and new text with newlines', () => { const session = new SnippetSession(editor, 'foo\n\t${1:bar}\n$0'); @@ -141,5 +154,76 @@ suite('SnippetInsertion', function () { assertSelections(editor, new Selection(1, 15, 1, 15)); }); + test('snippets, don\'t merge touching tabstops 1/2', function () { + + const session = new SnippetSession(editor, '$1$2$3$0'); + assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); + + session.next(); + assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); + + session.next(); + assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); + + session.next(); + assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); + + session.prev(); + session.prev(); + session.prev(); + assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); + editor.trigger('test', 'type', { text: '111' }); + + session.next(); + editor.trigger('test', 'type', { text: '222' }); + + session.next(); + editor.trigger('test', 'type', { text: '333' }); + + session.next(); + assert.equal(model.getValue(), '111222333function foo() {\n 111222333console.log(a);\n}'); + assertSelections(editor, new Selection(1, 10, 1, 10), new Selection(2, 14, 2, 14)); + + session.prev(); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + session.prev(); + assertSelections(editor, new Selection(1, 4, 1, 4), new Selection(2, 8, 2, 8)); + session.prev(); + assertSelections(editor, new Selection(1, 1, 1, 4), new Selection(2, 5, 2, 8)); + }); + test('snippets, don\'t merge touching tabstops 2/2', function () { + + const session = new SnippetSession(editor, '$1$2$3$0'); + assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); + + editor.trigger('test', 'type', { text: '111' }); + + session.next(); + assertSelections(editor, new Selection(1, 4, 1, 4), new Selection(2, 8, 2, 8)); + editor.trigger('test', 'type', { text: '222' }); + + session.next(); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + editor.trigger('test', 'type', { text: '333' }); + + session.next(); + assert.equal(session.isAtFinalPlaceholder, true); + }); + + test('snippets, gracefully move over final tabstop', function () { + const session = new SnippetSession(editor, '${1}bar$0'); + + assert.equal(session.isAtFinalPlaceholder, false); + assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); + + session.next(); + assert.equal(session.isAtFinalPlaceholder, true); + assertSelections(editor, new Selection(1, 4, 1, 4), new Selection(2, 8, 2, 8)); + + session.next(); + assert.equal(session.isAtFinalPlaceholder, true); + assertSelections(editor, new Selection(1, 4, 1, 4), new Selection(2, 8, 2, 8)); + }); + }); From 68237f29b3cbc5784e0d327e232fbe6d40caec91 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 9 May 2017 11:18:15 +0200 Subject: [PATCH 0299/2747] Debug Hover Widget Not Themed (fixes #25905) --- src/vs/editor/contrib/hover/browser/hover.ts | 7 +------ src/vs/platform/theme/common/colorRegistry.ts | 7 +++++++ .../parts/debug/browser/media/debugHover.css | 14 -------------- .../parts/debug/electron-browser/debugHover.ts | 11 ++++++++++- 4 files changed, 18 insertions(+), 21 deletions(-) diff --git a/src/vs/editor/contrib/hover/browser/hover.ts b/src/vs/editor/contrib/hover/browser/hover.ts index 6e424a667d65d..4ad6fba3fb3ce 100644 --- a/src/vs/editor/contrib/hover/browser/hover.ts +++ b/src/vs/editor/contrib/hover/browser/hover.ts @@ -21,7 +21,7 @@ import { ModesContentHoverWidget } from './modesContentHover'; import { ModesGlyphHoverWidget } from './modesGlyphHover'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { registerColor } from 'vs/platform/theme/common/colorRegistry'; +import { editorHoverHighlight, editorHoverBackground, editorHoverBorder } from 'vs/platform/theme/common/colorRegistry'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; @editorContribution @@ -173,11 +173,6 @@ class ShowHoverAction extends EditorAction { } // theming - -export const editorHoverHighlight = registerColor('editor.hoverHighlightBackground', { light: '#ADD6FF26', dark: '#264f7840', hc: '#ADD6FF26' }, nls.localize('hoverHighlight', 'Highlight below the word for which a hover is shown.')); -export const editorHoverBackground = registerColor('editorHoverWidget.background', { light: '#F3F3F3', dark: '#2D2D30', hc: '#0C141F' }, nls.localize('hoverBackground', 'Background color of the editor hover.')); -export const editorHoverBorder = registerColor('editorHoverWidget.border', { light: '#CCCCCC', dark: '#555555', hc: '#CCCCCC' }, nls.localize('hoverBorder', 'Border color of the editor hover.')); - registerThemingParticipant((theme, collector) => { let editorHoverHighlightColor = theme.getColor(editorHoverHighlight); if (editorHoverHighlightColor) { diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index f75fc922c72e2..981f08f63c9c9 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -206,6 +206,13 @@ export const editorFindMatch = registerColor('editor.findMatchBackground', { lig export const editorFindMatchHighlight = registerColor('editor.findMatchHighlightBackground', { light: '#EA5C0055', dark: '#EA5C0055', hc: null }, nls.localize('findMatchHighlight', "Color of the other search matches.")); export const editorFindRangeHighlight = registerColor('editor.findRangeHighlightBackground', { dark: '#3a3d4166', light: '#b4b4b44d', hc: null }, nls.localize('findRangeHighlight', "Color the range limiting the search.")); +/** + * Editor hover + */ +export const editorHoverHighlight = registerColor('editor.hoverHighlightBackground', { light: '#ADD6FF26', dark: '#264f7840', hc: '#ADD6FF26' }, nls.localize('hoverHighlight', 'Highlight below the word for which a hover is shown.')); +export const editorHoverBackground = registerColor('editorHoverWidget.background', { light: '#F3F3F3', dark: '#2D2D30', hc: '#0C141F' }, nls.localize('hoverBackground', 'Background color of the editor hover.')); +export const editorHoverBorder = registerColor('editorHoverWidget.border', { light: '#CCCCCC', dark: '#555555', hc: '#CCCCCC' }, nls.localize('hoverBorder', 'Border color of the editor hover.')); + /** * Editor link colors */ diff --git a/src/vs/workbench/parts/debug/browser/media/debugHover.css b/src/vs/workbench/parts/debug/browser/media/debugHover.css index 29707f09e1101..a734651beab4d 100644 --- a/src/vs/workbench/parts/debug/browser/media/debugHover.css +++ b/src/vs/workbench/parts/debug/browser/media/debugHover.css @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ .monaco-editor .debug-hover-widget { - border: 1px solid #CCC; position: absolute; margin-top: -1px; cursor: default; @@ -13,8 +12,6 @@ animation-name: fadeIn; -webkit-user-select: text; word-break: break-all; - background-color: #F3F3F3; - border: 1px solid #CCC; padding: 4px 5px; } @@ -87,12 +84,6 @@ /* Dark theme */ -.monaco-editor.vs-dark .debug-hover-widget, -.monaco-editor.hc-black .debug-hover-widget { - background-color: #2D2D30; - border-color: #555; -} - .monaco-editor.vs-dark .debug-hover-widget .value, .monaco-editor.hc-black .debug-hover-widget .value { color: rgba(204, 204, 204, 0.6); @@ -118,11 +109,6 @@ color: #CE9178; } -.monaco-editor.vs-dark .debug-hover-widget, -.monaco-editor.hc-black .debug-hover-widget { - border-color: #555; -} - .monaco-editor.vs-dark .debugHoverHighlight, .monaco-editor.hc-theme .debugHoverHighlight { background-color: rgba(38, 79, 120, 0.25); diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index c4f703de4e9c2..4e5b9be2e79f5 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -21,8 +21,9 @@ import { IDebugService, IExpression, IExpressionContainer } from 'vs/workbench/p import { Expression } from 'vs/workbench/parts/debug/common/debugModel'; import { VariablesRenderer, renderExpressionValue, VariablesDataSource } from 'vs/workbench/parts/debug/electron-browser/debugViewer'; import { IListService } from 'vs/platform/list/browser/listService'; -import { attachListStyler } from 'vs/platform/theme/common/styler'; +import { attachListStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { editorHoverBackground, editorHoverBorder } from "vs/platform/theme/common/colorRegistry"; const $ = dom.$; const MAX_ELEMENTS_SHOWN = 18; @@ -88,6 +89,14 @@ export class DebugHoverWidget implements IContentWidget { this.toDispose.push(attachListStyler(this.tree, this.themeService)); this.toDispose.push(this.listService.register(this.tree)); + this.toDispose.push(attachStylerCallback(this.themeService, { editorHoverBackground, editorHoverBorder }, colors => { + this.domNode.style.backgroundColor = colors.editorHoverBackground; + if (colors.editorHoverBorder) { + this.domNode.style.border = `1px solid ${colors.editorHoverBorder}`; + } else { + this.domNode.style.border = null; + } + })); } private registerListeners(): void { From 0d1db8a0a307759fdd3fb8ddd5713ee99d26a082 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 9 May 2017 11:24:38 +0200 Subject: [PATCH 0300/2747] yet another test --- .../snippet/test/browser/editorSnippets.test.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts index ed0c472107aca..280e4ddab448d 100644 --- a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts @@ -125,7 +125,7 @@ suite('SnippetInsertion', function () { assertSelections(editor, new Selection(1, 8, 1, 8), new Selection(2, 12, 2, 12)); }); - test('snippets, insert into non-empty selection', function () { + test('snippets, insert shorter snippet into non-empty selection', function () { model.setValue('foo_bar_foo'); editor.setSelections([new Selection(1, 1, 1, 4), new Selection(1, 9, 1, 12)]); @@ -134,6 +134,15 @@ suite('SnippetInsertion', function () { assertSelections(editor, new Selection(1, 2, 1, 2), new Selection(1, 8, 1, 8)); }); + test('snippets, insert longer snippet into non-empty selection', function () { + model.setValue('foo_bar_foo'); + editor.setSelections([new Selection(1, 1, 1, 4), new Selection(1, 9, 1, 12)]); + + new SnippetSession(editor, 'LONGER$0'); + assert.equal(model.getValue(), 'LONGER_bar_LONGER'); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(1, 18, 1, 18)); + }); + test('snippets, don\'t grow final tabstop', function () { model.setValue('foo_zzz_foo'); editor.setSelection(new Selection(1, 5, 1, 8)); From 8d4d6e615a1e53cc02cb54917b09257484b5df70 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 9 May 2017 11:26:02 +0200 Subject: [PATCH 0301/2747] debug: auto remove duplicate breakpoints fixes #25389 --- src/vs/workbench/parts/debug/common/debugModel.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index 4326c55e2d840..d27bf7f88235a 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -809,6 +809,7 @@ export class Model implements IModel { this.breakpoints = this.breakpoints.concat(rawData.map(rawBp => new Breakpoint(uri, rawBp.lineNumber, rawBp.column, rawBp.enabled, rawBp.condition, rawBp.hitCondition, true))); this.breakpointsActivated = true; + this.breakpoints = distinct(this.breakpoints, bp => `${bp.uri.toString()}:${bp.lineNumber}:${bp.column}`); this._onDidChangeBreakpoints.fire(); } @@ -828,6 +829,7 @@ export class Model implements IModel { bp.message = bpData.message; } }); + this.breakpoints = distinct(this.breakpoints, bp => `${bp.uri.toString()}:${bp.lineNumber}:${bp.column}`); this._onDidChangeBreakpoints.fire(); } From ff8b85ffa3be60ce312e89150e61979e1e540b41 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 9 May 2017 11:27:25 +0200 Subject: [PATCH 0302/2747] properly spelled out decoration options --- .../contrib/snippet/browser/editorSnippets.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index e77d8defd5469..8b0e86d2569f0 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -24,8 +24,11 @@ class OneSnippet { private _placeholderGroups: Placeholder[][]; private _placeholderGroupsIdx: number; - private static readonly _growingDecoration: IModelDecorationOptions = { stickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges }; - private static readonly _fixedDecoration: IModelDecorationOptions = { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges }; + private static readonly _decorations = { + active: { stickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges }, + activeFinal: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges }, + inActive: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges }, + }; constructor(editor: ICommonCodeEditor, snippet: TextmateSnippet, offset: number) { this._editor = editor; @@ -61,7 +64,7 @@ class OneSnippet { const end = model.getPositionAt(this._offset + placeholderOffset + placeholderLen); const range = new Range(start.lineNumber, start.column, end.lineNumber, end.column); - const handle = accessor.addDecoration(range, OneSnippet._fixedDecoration); + const handle = accessor.addDecoration(range, OneSnippet._decorations.inActive); this._placeholderDecorations.set(placeholder, handle); lastRange = range; @@ -104,7 +107,7 @@ class OneSnippet { if (prevGroupsIdx !== -1) { for (const placeholder of this._placeholderGroups[prevGroupsIdx]) { const id = this._placeholderDecorations.get(placeholder); - accessor.changeDecorationOptions(id, OneSnippet._fixedDecoration); + accessor.changeDecorationOptions(id, OneSnippet._decorations.inActive); } } @@ -117,7 +120,7 @@ class OneSnippet { const range = this._editor.getModel().getDecorationRange(id); selections.push(new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)); - accessor.changeDecorationOptions(id, placeholder.isFinalTabstop ? OneSnippet._fixedDecoration : OneSnippet._growingDecoration); + accessor.changeDecorationOptions(id, placeholder.isFinalTabstop ? OneSnippet._decorations.activeFinal : OneSnippet._decorations.active); } return selections; }); From 08ff828cfd4c7f3cdddd1824f0d24bffc9e53f11 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 9 May 2017 11:32:32 +0200 Subject: [PATCH 0303/2747] theme - send a smile --- .../feedback/electron-browser/feedback.ts | 11 ++++- .../electron-browser/media/feedback.css | 41 ------------------- 2 files changed, 9 insertions(+), 43 deletions(-) diff --git a/src/vs/workbench/parts/feedback/electron-browser/feedback.ts b/src/vs/workbench/parts/feedback/electron-browser/feedback.ts index 9f85724b4e996..db945b16e017a 100644 --- a/src/vs/workbench/parts/feedback/electron-browser/feedback.ts +++ b/src/vs/workbench/parts/feedback/electron-browser/feedback.ts @@ -19,7 +19,7 @@ import * as errors from 'vs/base/common/errors'; import { IIntegrityService } from 'vs/platform/integrity/common/integrity'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from "vs/platform/theme/common/themeService"; import { attachStylerCallback } from "vs/platform/theme/common/styler"; -import { editorWidgetBackground, widgetShadow, inputBorder, inputForeground, inputBackground, inputActiveOptionBorder, editorBackground } from "vs/platform/theme/common/colorRegistry"; +import { editorWidgetBackground, widgetShadow, inputBorder, inputForeground, inputBackground, inputActiveOptionBorder, editorBackground, buttonBackground, contrastBorder } from "vs/platform/theme/common/colorRegistry"; export interface IFeedback { feedback: string; @@ -204,7 +204,7 @@ export class FeedbackDropdown extends Dropdown { this.onSubmit(); }); - this.toDispose.push(attachStylerCallback(this.themeService, { widgetShadow, editorWidgetBackground, inputBackground, inputForeground, inputBorder, editorBackground }, colors => { + this.toDispose.push(attachStylerCallback(this.themeService, { widgetShadow, editorWidgetBackground, inputBackground, inputForeground, inputBorder, editorBackground, contrastBorder }, colors => { $form.style('background-color', colors.editorWidgetBackground); $form.style('box-shadow', colors.widgetShadow ? `0 2px 8px ${colors.widgetShadow}` : null); @@ -213,6 +213,7 @@ export class FeedbackDropdown extends Dropdown { this.feedbackDescriptionInput.style.border = `1px solid ${colors.inputBorder || 'transparent'}`; $contactUs.style('background-color', colors.editorBackground); + $contactUs.style('border', `1px solid ${colors.contrastBorder || 'transparent'}`); })); return { @@ -352,4 +353,10 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { if (inputActiveOptionBorderColor) { collector.addRule(`.monaco-shell .feedback-form .sentiment.checked { border: 1px solid ${inputActiveOptionBorderColor}; }`); } + + // Links + const linkColor = theme.getColor(buttonBackground) || theme.getColor(contrastBorder); + if (linkColor) { + collector.addRule(`.monaco-shell .feedback-form .content .channels a { color: ${linkColor}; }`); + } }); \ No newline at end of file diff --git a/src/vs/workbench/parts/feedback/electron-browser/media/feedback.css b/src/vs/workbench/parts/feedback/electron-browser/media/feedback.css index 3fc516150d67b..a6d66aee3c42e 100644 --- a/src/vs/workbench/parts/feedback/electron-browser/media/feedback.css +++ b/src/vs/workbench/parts/feedback/electron-browser/media/feedback.css @@ -50,14 +50,9 @@ /* TODO @C5 review link color */ .monaco-shell .feedback-form .content .channels a { - color: #007ACC; padding: 2px 0; } -.monaco-shell.vs-dark .feedback-form .content .channels a { - color: #75BEFF; -} - .monaco-shell .feedback-form .content .channels a:hover { text-decoration: underline; } @@ -151,15 +146,6 @@ } /* Theming */ -.monaco-shell .feedback-form h2 { - color: #007ACC; -} - -.monaco-shell.vs .feedback-form h3 { - color: #646465; -} - - .monaco-shell.vs .feedback-form .feedback-alias, .monaco-shell.vs .feedback-form .feedback-description { font-family: inherit; border: 1px solid transparent; @@ -207,10 +193,6 @@ background-color: #E51400; } -.monaco-shell.vs-dark .feedback-form h2 { - color: #75BEFF; -} - .monaco-shell.vs-dark .feedback-form h3 { font-weight: normal; font-size: 1.2em; @@ -258,37 +240,18 @@ margin-left: 5px; } -.monaco-shell .feedback-form .privacyLink { - float: left; - color: #007ACC !Important; -} -.monaco-shell.vs-dark .feedback-form .privacyLink { - color: #75BEFF !Important; -} - -.monaco-shell .feedback-form .privacyLink:hover { - text-decoration: underline; -} - /* High Contrast Theming */ .monaco-shell.hc-black .feedback-form { - background-color: #000; outline: 2px solid #6fc3df; outline-offset: -2px; } -.monaco-shell.hc-black .feedback-form h2 { - color: white; -} - .monaco-shell.hc-black .feedback-form .feedback-alias, .monaco-shell.hc-black .feedback-form .feedback-description { font-family: inherit; } .monaco-shell.hc-black .feedback-form .content .contactus { padding: 10px; - border: solid 1px #6FC3DF; - background-color: #0C141F; float: right; } .monaco-shell.hc-black .feedback-form .cancel { @@ -321,8 +284,4 @@ height: 16px; width: 16px; display: inline-block; -} - -.monaco-shell.hc-black .feedback-form .privacyLink { - color: white !Important; } \ No newline at end of file From 484a2db0668b1028844d8c685e22e58fa2324e70 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 9 May 2017 11:33:40 +0200 Subject: [PATCH 0304/2747] drop support for substituing "command.", "env.", "config." --- .../node/configurationResolverService.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/services/configurationResolver/node/configurationResolverService.ts b/src/vs/workbench/services/configurationResolver/node/configurationResolverService.ts index e74e57c412ab2..3caa6312379fd 100644 --- a/src/vs/workbench/services/configurationResolver/node/configurationResolverService.ts +++ b/src/vs/workbench/services/configurationResolver/node/configurationResolverService.ts @@ -17,7 +17,6 @@ import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { toResource } from 'vs/workbench/common/editor'; -// TODO@Isidor remove support for env, config. and command. in march export class ConfigurationResolverService implements IConfigurationResolverService { _serviceBrand: any; private _workspaceRoot: string; @@ -34,7 +33,6 @@ export class ConfigurationResolverService implements IConfigurationResolverServi this._workspaceRoot = paths.normalize(workspaceRoot ? workspaceRoot.fsPath : '', true); this._execPath = environmentService.execPath; Object.keys(envVariables).forEach(key => { - this[`env.${key}`] = envVariables[key]; this[`env:${key}`] = envVariables[key]; }); } @@ -141,7 +139,7 @@ export class ConfigurationResolverService implements IConfigurationResolverServi if (types.isString(newValue)) { return newValue; } else { - return match && (match.indexOf('env.') > 0 || match.indexOf('env:') > 0) ? '' : match; + return match && match.indexOf('env:') > 0 ? '' : match; } }); @@ -176,7 +174,7 @@ export class ConfigurationResolverService implements IConfigurationResolverServi } }; - return value.replace(/\$\{config\.(.+?)\}/g, replacer).replace(/\$\{config:(.+?)\}/g, replacer); + return value.replace(/\$\{config:(.+?)\}/g, replacer); } private resolveLiteral(values: IStringDictionary | string[]>): IStringDictionary | string[]> { @@ -223,7 +221,7 @@ export class ConfigurationResolverService implements IConfigurationResolverServi if (object[key] && typeof object[key] === 'object') { findInteractiveVariables(object[key]); } else if (typeof object[key] === 'string') { - const matches = /\${command[:\.](.+)}/.exec(object[key]); + const matches = /\${command:(.+)}/.exec(object[key]); if (matches && matches.length === 2) { const interactiveVariable = matches[1]; if (!interactiveVariablesToSubstitutes[interactiveVariable]) { @@ -251,8 +249,6 @@ export class ConfigurationResolverService implements IConfigurationResolverServi interactiveVariablesToSubstitutes[interactiveVariable].forEach(substitute => { if (substitute.object[substitute.key].indexOf(`\${command:${interactiveVariable}}`) >= 0) { substitute.object[substitute.key] = substitute.object[substitute.key].replace(`\${command:${interactiveVariable}}`, result); - } else if (substitute.object[substitute.key].indexOf(`\${command.${interactiveVariable}}`) >= 0) { - substitute.object[substitute.key] = substitute.object[substitute.key].replace(`\${command.${interactiveVariable}}`, result); } }); } else { From 650b75a94a6314c589b8edd7119e72ea363fdd1d Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 9 May 2017 11:35:22 +0200 Subject: [PATCH 0305/2747] win32 tfs builds --- build/gulpfile.hygiene.js | 1 + build/tfs/win32/compile-win32.ps1 | 5 +++++ build/tfs/win32/lib.ps1 | 10 ++++++++++ build/tfs/win32/test-win32.ps1 | 5 +++++ package.json | 3 ++- 5 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 build/tfs/win32/compile-win32.ps1 create mode 100644 build/tfs/win32/lib.ps1 create mode 100644 build/tfs/win32/test-win32.ps1 diff --git a/build/gulpfile.hygiene.js b/build/gulpfile.hygiene.js index 480077c58cfcd..ee2d58643020f 100644 --- a/build/gulpfile.hygiene.js +++ b/build/gulpfile.hygiene.js @@ -47,6 +47,7 @@ const indentationFilter = [ '**', '!ThirdPartyNotices.txt', '!**/*.md', + '!**/*.ps1', '!**/*.template', '!**/*.yml', '!**/lib/**', diff --git a/build/tfs/win32/compile-win32.ps1 b/build/tfs/win32/compile-win32.ps1 new file mode 100644 index 0000000000000..be8431986d161 --- /dev/null +++ b/build/tfs/win32/compile-win32.ps1 @@ -0,0 +1,5 @@ +. .\lib.ps1 + +exec { & .\scripts\npm.bat install } +exec { & npm run gulp -- mixin } +exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-min } \ No newline at end of file diff --git a/build/tfs/win32/lib.ps1 b/build/tfs/win32/lib.ps1 new file mode 100644 index 0000000000000..4ecb58e62a33a --- /dev/null +++ b/build/tfs/win32/lib.ps1 @@ -0,0 +1,10 @@ +# stop when there's an error +$ErrorActionPreference = 'Stop' + +# throw when a process exits with something other than 0 +function exec([scriptblock]$cmd, [string]$errorMessage = "Error executing command: " + $cmd) { + & $cmd + if ($LastExitCode -ne 0) { + throw $errorMessage + } +} diff --git a/build/tfs/win32/test-win32.ps1 b/build/tfs/win32/test-win32.ps1 new file mode 100644 index 0000000000000..f9a58fff29812 --- /dev/null +++ b/build/tfs/win32/test-win32.ps1 @@ -0,0 +1,5 @@ +. .\lib.ps1 + +exec { & npm run gulp -- electron } +exec { & .\scripts\test.bat --build --reporter dot } +# exec { & .\scripts\test-integration.bat } \ No newline at end of file diff --git a/package.json b/package.json index ffb1d379bcb45..0b85f60159862 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "watch": "gulp watch --max_old_space_size=4096", "monaco-editor-setup": "node scripts/monaco-editor-setup.js", "monaco-editor-test": "mocha --only-monaco-editor", - "precommit": "node build/gulpfile.hygiene.js" + "precommit": "node build/gulpfile.hygiene.js", + "gulp": "gulp" }, "dependencies": { "applicationinsights": "0.17.1", From 4455df6f0b87e257143a77858d4f35f918e2d4ee Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 9 May 2017 11:39:35 +0200 Subject: [PATCH 0306/2747] remove breakpoint.respectColumn, no longer needed --- src/vs/workbench/parts/debug/common/debugModel.ts | 3 +-- src/vs/workbench/parts/debug/electron-browser/debugService.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index d27bf7f88235a..2055357d2744e 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -646,7 +646,6 @@ export class Breakpoint implements IBreakpoint { public enabled: boolean, public condition: string, public hitCondition: string, - public respectColumn: boolean // TODO@Isidor remove this in March ) { if (enabled === undefined) { this.enabled = true; @@ -807,7 +806,7 @@ export class Model implements IModel { public addBreakpoints(uri: uri, rawData: IRawBreakpoint[]): void { this.breakpoints = this.breakpoints.concat(rawData.map(rawBp => - new Breakpoint(uri, rawBp.lineNumber, rawBp.column, rawBp.enabled, rawBp.condition, rawBp.hitCondition, true))); + new Breakpoint(uri, rawBp.lineNumber, rawBp.column, rawBp.enabled, rawBp.condition, rawBp.hitCondition))); this.breakpointsActivated = true; this.breakpoints = distinct(this.breakpoints, bp => `${bp.uri.toString()}:${bp.lineNumber}:${bp.column}`); this._onDidChangeBreakpoints.fire(); diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 0a3a30779566d..b959668dfc6f4 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -407,7 +407,7 @@ export class DebugService implements debug.IDebugService { let result: Breakpoint[]; try { result = JSON.parse(this.storageService.get(DEBUG_BREAKPOINTS_KEY, StorageScope.WORKSPACE, '[]')).map((breakpoint: any) => { - return new Breakpoint(uri.parse(breakpoint.uri.external || breakpoint.source.uri.external), breakpoint.lineNumber, breakpoint.respectColumn ? breakpoint.column : undefined, breakpoint.enabled, breakpoint.condition, breakpoint.hitCondition, breakpoint.respectColumn); + return new Breakpoint(uri.parse(breakpoint.uri.external || breakpoint.source.uri.external), breakpoint.lineNumber, breakpoint.column, breakpoint.enabled, breakpoint.condition, breakpoint.hitCondition); }); } catch (e) { } From 16e1d237b3579489cbff67c25abb0831e5d9987d Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 9 May 2017 11:41:14 +0200 Subject: [PATCH 0307/2747] theming bugfixes --- src/vs/base/browser/ui/button/button.ts | 9 +++++++++ src/vs/platform/theme/common/colorRegistry.ts | 6 +++--- src/vs/platform/theme/common/styler.ts | 3 ++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/vs/base/browser/ui/button/button.ts b/src/vs/base/browser/ui/button/button.ts index 21db87b36cbcd..356692bf76601 100644 --- a/src/vs/base/browser/ui/button/button.ts +++ b/src/vs/base/browser/ui/button/button.ts @@ -21,6 +21,7 @@ export interface IButtonStyles { buttonBackground?: Color; buttonHoverBackground?: Color; buttonForeground?: Color; + buttonBorder?: Color; } const defaultOptions: IButtonStyles = { @@ -37,6 +38,7 @@ export class Button extends EventEmitter { private buttonBackground: Color; private buttonHoverBackground: Color; private buttonForeground: Color; + private buttonBorder: Color; constructor(container: Builder, options?: IButtonOptions); constructor(container: HTMLElement, options?: IButtonOptions); @@ -49,6 +51,7 @@ export class Button extends EventEmitter { this.buttonBackground = this.options.buttonBackground; this.buttonHoverBackground = this.options.buttonHoverBackground; this.buttonForeground = this.options.buttonForeground; + this.buttonBorder = this.options.buttonBorder; this.$el = $('a.monaco-button').attr({ 'tabIndex': '0', @@ -100,6 +103,7 @@ export class Button extends EventEmitter { this.buttonForeground = styles.buttonForeground; this.buttonBackground = styles.buttonBackground; this.buttonHoverBackground = styles.buttonHoverBackground; + this.buttonBorder = styles.buttonBorder; this.applyStyles(); } @@ -108,9 +112,14 @@ export class Button extends EventEmitter { if (this.$el) { const background = this.buttonBackground ? this.buttonBackground.toString() : null; const foreground = this.buttonForeground ? this.buttonForeground.toString() : null; + const border = this.buttonBorder ? this.buttonBorder.toString() : null; this.$el.style('color', foreground); this.$el.style('background-color', background); + + this.$el.style('border-width', border ? '1px' : null); + this.$el.style('border-style', border ? 'solid' : null); + this.$el.style('border-color', border); } } diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 981f08f63c9c9..d3ebe11a1de41 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -146,11 +146,11 @@ export const inputActiveOptionBorder = registerColor('inputOption.activeBorder', export const inputPlaceholderForeground = registerColor('input.placeholderForeground', { dark: null, light: null, hc: null }, nls.localize('inputPlaceholderForeground', "Input box foreground color for placeholder text.")); export const inputValidationInfoBackground = registerColor('inputValidation.infoBackground', { dark: '#063B49', light: '#D6ECF2', hc: Color.black }, nls.localize('inputValidationInfoBackground', "Input validation background color for information severity.")); -export const inputValidationInfoBorder = registerColor('inputValidation.infoBorder', { dark: '#55AAFF', light: '#55AAFF', hc: '#6FC3DF' }, nls.localize('inputValidationInfoBorder', "Input validation border color for information severity.")); +export const inputValidationInfoBorder = registerColor('inputValidation.infoBorder', { dark: '#55AAFF', light: '#55AAFF', hc: contrastBorder }, nls.localize('inputValidationInfoBorder', "Input validation border color for information severity.")); export const inputValidationWarningBackground = registerColor('inputValidation.warningBackground', { dark: '#352A05', light: '#F6F5D2', hc: Color.black }, nls.localize('inputValidationWarningBackground', "Input validation background color for information warning.")); -export const inputValidationWarningBorder = registerColor('inputValidation.warningBorder', { dark: '#B89500', light: '#B89500', hc: '#B89500' }, nls.localize('inputValidationWarningBorder', "Input validation border color for warning severity.")); +export const inputValidationWarningBorder = registerColor('inputValidation.warningBorder', { dark: '#B89500', light: '#B89500', hc: contrastBorder }, nls.localize('inputValidationWarningBorder', "Input validation border color for warning severity.")); export const inputValidationErrorBackground = registerColor('inputValidation.errorBackground', { dark: '#5A1D1D', light: '#F2DEDE', hc: Color.black }, nls.localize('inputValidationErrorBackground', "Input validation background color for error severity.")); -export const inputValidationErrorBorder = registerColor('inputValidation.errorBorder', { dark: '#BE1100', light: '#BE1100', hc: '#BE1100' }, nls.localize('inputValidationErrorBorder', "Input validation border color for error severity.")); +export const inputValidationErrorBorder = registerColor('inputValidation.errorBorder', { dark: '#BE1100', light: '#BE1100', hc: contrastBorder }, nls.localize('inputValidationErrorBorder', "Input validation border color for error severity.")); export const selectBackground = registerColor('dropdown.background', { dark: '#3C3C3C', light: Color.white, hc: Color.black }, nls.localize('dropdownBackground', "Dropdown background.")); export const selectForeground = registerColor('dropdown.foreground', { dark: '#F0F0F0', light: null, hc: Color.white }, nls.localize('dropdownForeground', "Dropdown foreground.")); diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index 51504eaf7a5c2..ec9ad4240ddaa 100644 --- a/src/vs/platform/theme/common/styler.ts +++ b/src/vs/platform/theme/common/styler.ts @@ -223,7 +223,8 @@ export function attachButtonStyler(widget: IThemable, themeService: IThemeServic return doAttachStyler(themeService, { buttonForeground: (style && style.buttonForeground) || buttonForeground, buttonBackground: (style && style.buttonBackground) || buttonBackground, - buttonHoverBackground: (style && style.buttonHoverBackground) || buttonHoverBackground + buttonHoverBackground: (style && style.buttonHoverBackground) || buttonHoverBackground, + buttonBorder: contrastBorder }, widget); } From 6a49503b4332468995d118ce5bd178e7a72bee43 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 9 May 2017 10:22:41 +0200 Subject: [PATCH 0308/2747] Theme: "No results" in find widget is using hardcoded color. Fixes #26267 --- .../contrib/find/browser/findWidget.css | 9 --------- .../editor/contrib/find/browser/findWidget.ts | 19 ++++++++++++------- src/vs/platform/theme/common/colorRegistry.ts | 3 +++ 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/vs/editor/contrib/find/browser/findWidget.css b/src/vs/editor/contrib/find/browser/findWidget.css index 6d3ffb0ab285c..74d52635a45a8 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.css +++ b/src/vs/editor/contrib/find/browser/findWidget.css @@ -99,15 +99,6 @@ vertical-align: middle; } -.monaco-editor .find-widget.no-results .matchesCount { - color: #A1260D; -} - -.monaco-editor.vs-dark .find-widget.no-results .matchesCount, -.monaco-editor.hc-black .find-widget.no-results .matchesCount { - color: #F48771 -} - .monaco-editor .find-widget .matchesCount { display: inline-block; margin: 0 1px 0 3px; diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index 559c6635abcf9..ea8efb1bb45da 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -26,7 +26,7 @@ import { CONTEXT_FIND_INPUT_FOCUSSED } from 'vs/editor/contrib/find/common/findC import { ITheme, registerThemingParticipant, IThemeService } from 'vs/platform/theme/common/themeService'; import { Color } from 'vs/base/common/color'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; -import { editorFindRangeHighlight, editorFindMatch, editorFindMatchHighlight, activeContrastBorder, contrastBorder, inputBackground, editorWidgetBackground, inputActiveOptionBorder, widgetShadow, inputForeground, inputBorder, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationErrorBackground, inputValidationErrorBorder } from 'vs/platform/theme/common/colorRegistry'; +import { editorFindRangeHighlight, editorFindMatch, editorFindMatchHighlight, activeContrastBorder, contrastBorder, inputBackground, editorWidgetBackground, inputActiveOptionBorder, widgetShadow, inputForeground, inputBorder, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationErrorBackground, inputValidationErrorBorder, errorForeground } from 'vs/platform/theme/common/colorRegistry'; export interface IFindController { replace(): void; @@ -807,7 +807,7 @@ class SimpleButton extends Widget { registerThemingParticipant((theme, collector) => { function addBackgroundColorRule(selector: string, color: Color): void { if (color) { - collector.addRule(`.monaco-editor.${theme.selector} ${selector} { background-color: ${color}; }`); + collector.addRule(`.monaco-editor ${selector} { background-color: ${color}; }`); } } @@ -820,18 +820,23 @@ registerThemingParticipant((theme, collector) => { let widgetShadowColor = theme.getColor(widgetShadow); if (widgetShadowColor) { - collector.addRule(`.monaco-editor.${theme.selector} .find-widget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); + collector.addRule(`.monaco-editor .find-widget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); } let hcOutline = theme.getColor(activeContrastBorder); if (hcOutline) { - collector.addRule(`.monaco-editor.${theme.selector} .findScope { border: 1px dashed ${hcOutline.transparent(0.4)}; }`); - collector.addRule(`.monaco-editor.${theme.selector} .currentFindMatch { border: 2px solid ${hcOutline}; padding: 1px; -moz-box-sizing: border-box; box-sizing: border-box; }`); - collector.addRule(`.monaco-editor.${theme.selector} .findMatch { border: 1px dotted ${hcOutline}; -moz-box-sizing: border-box; box-sizing: border-box; }`); + collector.addRule(`.monaco-editor .findScope { border: 1px dashed ${hcOutline.transparent(0.4)}; }`); + collector.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${hcOutline}; padding: 1px; -moz-box-sizing: border-box; box-sizing: border-box; }`); + collector.addRule(`.monaco-editor .findMatch { border: 1px dotted ${hcOutline}; -moz-box-sizing: border-box; box-sizing: border-box; }`); } let hcBorder = theme.getColor(contrastBorder); if (hcBorder) { - collector.addRule(`.monaco-editor.${theme.selector} .find-widget { border: 2px solid ${hcBorder}; }`); + collector.addRule(`.monaco-editor .find-widget { border: 2px solid ${hcBorder}; }`); + } + + let error = theme.getColor(errorForeground); + if (error) { + collector.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${error}; }`); } }); diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index d3ebe11a1de41..ec2a2d0f03648 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -129,11 +129,14 @@ export function registerColor(id: string, defaults: ColorDefaults, description: // ----- base colors export const foreground = registerColor('foreground', { dark: '#CCCCCC', light: '#6C6C6C', hc: '#FFFFFF' }, nls.localize('foreground', "Overall foreground color. This color is only used if not overridden by a component.")); +export const errorForeground = registerColor('errorForeground', { dark: '#F48771', light: '#A1260D', hc: '#F48771' }, nls.localize('errorForeground', "Overall foreground color for error messages. This color is only used if not overridden by a component.")); + export const focusBorder = registerColor('focusBorder', { dark: Color.fromHex('#0E639C').transparent(0.6), light: Color.fromHex('#007ACC').transparent(0.4), hc: '#F38518' }, nls.localize('focusBorder', "Overall border color for focused elements. This color is only used if not overridden by a component.")); export const contrastBorder = registerColor('contrastBorder', { light: null, dark: null, hc: '#6FC3DF' }, nls.localize('contrastBorder', "An extra border around elements to separate them from others for greater contrast.")); export const activeContrastBorder = registerColor('contrastActiveBorder', { light: null, dark: null, hc: focusBorder }, nls.localize('activeContrastBorder', "An extra border around active elements to separate them from others for greater contrast.")); + export const selectionBackground = registerColor('selection.background', { light: null, dark: null, hc: null }, nls.localize('selectionBackground', "The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor and the terminal.")); // ----- widgets From cc0cad82e061997f785726b4e7567684cc18b021 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 9 May 2017 11:39:27 +0200 Subject: [PATCH 0309/2747] Use errorForeground in preferences editor (for #26267) --- .../preferences/browser/media/preferences.css | 9 --------- .../preferences/browser/preferencesWidgets.ts | 15 +++++++++++---- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/vs/workbench/parts/preferences/browser/media/preferences.css b/src/vs/workbench/parts/preferences/browser/media/preferences.css index a8eccaa8c2d50..58079f256d1ca 100644 --- a/src/vs/workbench/parts/preferences/browser/media/preferences.css +++ b/src/vs/workbench/parts/preferences/browser/media/preferences.css @@ -114,15 +114,6 @@ display: none; } -.settings-header-widget > .settings-count-widget.no-results { - color: #A1260D !important; -} - -.hc-black .settings-header-widget > .settings-count-widget.no-results, -.vs-dark .settings-header-widget > .settings-count-widget.no-results { - color: #F48771 !important; -} - .settings-header-widget > .settings-search-container { flex: 1; } diff --git a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts index a07b8a57be6d9..1f802861a3167 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts @@ -27,7 +27,7 @@ import { attachInputBoxStyler, attachStylerCallback } from 'vs/platform/theme/co import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Position } from 'vs/editor/common/core/position'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { buttonBackground, buttonForeground, badgeForeground, badgeBackground, contrastBorder } from "vs/platform/theme/common/colorRegistry"; +import { buttonBackground, buttonForeground, badgeForeground, badgeBackground, contrastBorder, errorForeground } from "vs/platform/theme/common/colorRegistry"; export class SettingsGroupTitleWidget extends Widget implements IViewZone { @@ -263,17 +263,17 @@ export class SearchWidget extends Widget { this.domNode = DOM.append(parent, DOM.$('div.settings-header-widget')); this.createSearchContainer(DOM.append(this.domNode, DOM.$('div.settings-search-container'))); this.countElement = DOM.append(this.domNode, DOM.$('.settings-count-widget')); - this._register(attachStylerCallback(this.themeService, { badgeBackground, badgeForeground, contrastBorder }, colors => { + this._register(attachStylerCallback(this.themeService, { badgeBackground, contrastBorder }, colors => { const background = colors.badgeBackground ? colors.badgeBackground.toString() : null; - const foreground = colors.badgeForeground ? colors.badgeForeground.toString() : null; const border = colors.contrastBorder ? colors.contrastBorder.toString() : null; this.countElement.style.backgroundColor = background; - this.countElement.style.color = foreground; this.countElement.style.borderWidth = border ? '1px' : null; this.countElement.style.borderStyle = border ? 'solid' : null; this.countElement.style.borderColor = border; + + this.styleCountElementForeground(); })); this.inputBox.inputElement.setAttribute('aria-live', 'assertive'); } @@ -298,6 +298,13 @@ export class SearchWidget extends Widget { this.inputBox.inputElement.setAttribute('aria-label', message); DOM.toggleClass(this.countElement, 'no-results', count === 0); this.inputBox.inputElement.style.paddingRight = DOM.getTotalWidth(this.countElement) + 20 + 'px'; + this.styleCountElementForeground(); + } + + private styleCountElementForeground() { + const colorId = DOM.hasClass(this.countElement, 'no-results') ? errorForeground : badgeForeground; + const color = this.themeService.getTheme().getColor(colorId); + this.countElement.style.color = color ? color.toString() : null; } public layout(dimension: Dimension) { From 8b4a75ffd09899afb65833613182896ea24d3ae6 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 9 May 2017 11:42:31 +0200 Subject: [PATCH 0310/2747] streamline win32 build --- build/tfs/win32/{compile-win32.ps1 => compile.ps1} | 0 build/tfs/win32/{test-win32.ps1 => test.ps1} | 0 package.json | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename build/tfs/win32/{compile-win32.ps1 => compile.ps1} (100%) rename build/tfs/win32/{test-win32.ps1 => test.ps1} (100%) diff --git a/build/tfs/win32/compile-win32.ps1 b/build/tfs/win32/compile.ps1 similarity index 100% rename from build/tfs/win32/compile-win32.ps1 rename to build/tfs/win32/compile.ps1 diff --git a/build/tfs/win32/test-win32.ps1 b/build/tfs/win32/test.ps1 similarity index 100% rename from build/tfs/win32/test-win32.ps1 rename to build/tfs/win32/test.ps1 diff --git a/package.json b/package.json index 0b85f60159862..a5c50981cc2ff 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev", "version": "1.13.0", "electronVersion": "1.6.6", - "distro": "bb676c1d1f91a0c6d3050d8ca8a49ba7743108c5", + "distro": "19f52f7ed3528101860a011fa740c4167dfc2d21", "author": { "name": "Microsoft Corporation" }, From 1b005bae403eb6f0ddc0e4d5bed1f4442d451dd0 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 9 May 2017 11:44:35 +0200 Subject: [PATCH 0311/2747] fix --- .../services/themes/electron-browser/themeCompatibility.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts b/src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts index 0f840bfd95f5d..519c2797b97ad 100644 --- a/src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts +++ b/src/vs/workbench/services/themes/electron-browser/themeCompatibility.ts @@ -10,7 +10,6 @@ import * as colorRegistry from 'vs/platform/theme/common/colorRegistry'; import * as editorColorRegistry from 'vs/editor/common/view/editorColorRegistry'; import * as wordHighlighter from 'vs/editor/contrib/wordHighlighter/common/wordHighlighter'; import { ansiColorIdentifiers } from 'vs/workbench/parts/terminal/electron-browser/terminalColorRegistry'; -import { editorHoverHighlight } from 'vs/editor/contrib/hover/browser/hover'; import { peekViewEditorMatchHighlight, peekViewResultsMatchHighlight } from 'vs/editor/contrib/referenceSearch/browser/referencesWidget'; const settingToColorIdMapping: { [settingId: string]: string[] } = {}; @@ -56,7 +55,7 @@ addSettingMapping('inactiveSelection', colorRegistry.editorInactiveSelection); addSettingMapping('selectionHighlightColor', colorRegistry.editorSelectionHighlight); addSettingMapping('findMatchHighlight', colorRegistry.editorFindMatchHighlight); addSettingMapping('currentFindMatchHighlight', colorRegistry.editorFindMatch); -addSettingMapping('hoverHighlight', editorHoverHighlight); +addSettingMapping('hoverHighlight', colorRegistry.editorHoverHighlight); addSettingMapping('wordHighlight', wordHighlighter.editorWordHighlight); addSettingMapping('wordHighlightStrong', wordHighlighter.editorWordHighlightStrong); addSettingMapping('findRangeHighlight', colorRegistry.editorFindRangeHighlight); From e4c6a965eac234385767e5a2359f7850ee69db09 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 9 May 2017 11:49:28 +0200 Subject: [PATCH 0312/2747] Simplify content widgets --- .../contentWidgets/contentWidgets.ts | 311 +++++++++--------- 1 file changed, 150 insertions(+), 161 deletions(-) diff --git a/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts b/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts index bce7eb16e383f..66e04e6cbf605 100644 --- a/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts +++ b/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts @@ -14,36 +14,6 @@ import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/v import { Position, IPosition } from 'vs/editor/common/core/position'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -interface IWidgetData { - allowEditorOverflow: boolean; - widget: IContentWidget; - position: IPosition; - preference: ContentWidgetPositionPreference[]; - isVisible: boolean; - domNode: FastDomNode; -} - -interface IWidgetMap { - [key: string]: IWidgetData; -} - -interface IBoxLayoutResult { - aboveTop: number; - fitsAbove: boolean; - belowTop: number; - fitsBelow: boolean; - left: number; -} - -interface IMyWidgetRenderData { - top: number; - left: number; -} - -interface IMyRenderData { - [id: string]: IMyWidgetRenderData; -} - class Coordinate { _coordinateBrand: void; @@ -58,25 +28,16 @@ class Coordinate { export class ViewContentWidgets extends ViewPart { - private _widgets: IWidgetMap; - private _contentWidth: number; - private _contentLeft: number; - private _lineHeight: number; - private _renderData: IMyRenderData; + private _viewDomNode: FastDomNode; + private _widgets: { [key: string]: Widget; }; public domNode: FastDomNode; public overflowingContentWidgetsDomNode: FastDomNode; - private _viewDomNode: FastDomNode; constructor(context: ViewContext, viewDomNode: FastDomNode) { super(context); this._viewDomNode = viewDomNode; - this._widgets = {}; - this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; - this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; - this._lineHeight = this._context.configuration.editor.lineHeight; - this._renderData = {}; this.domNode = createFastDomNode(document.createElement('div')); PartFingerprints.write(this.domNode, PartFingerprint.ContentWidgets); @@ -98,22 +59,10 @@ export class ViewContentWidgets extends ViewPart { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - if (e.lineHeight) { - this._lineHeight = this._context.configuration.editor.lineHeight; - } - if (e.layoutInfo) { - this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; - - if (this._contentWidth !== this._context.configuration.editor.layoutInfo.contentWidth) { - this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; - // update the maxWidth on widgets nodes, such that `prepareRender` - // below can read out the adjusted width/height of widgets - let keys = Object.keys(this._widgets); - for (let i = 0, len = keys.length; i < len; i++) { - const widgetId = keys[i]; - this._setWidgetMaxWidth(this._widgets[widgetId]); - } - } + let keys = Object.keys(this._widgets); + for (let i = 0, len = keys.length; i < len; i++) { + const widgetId = keys[i]; + this._widgets[widgetId].onConfigurationChanged(e); } return true; } @@ -142,57 +91,33 @@ export class ViewContentWidgets extends ViewPart { // ---- end view event handlers - private _setWidgetMaxWidth(widgetData: IWidgetData): void { - const maxWidth = widgetData.allowEditorOverflow - ? window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth - : this._contentWidth; - - widgetData.domNode.setMaxWidth(maxWidth); - } - - public addWidget(widget: IContentWidget): void { - const domNode = createFastDomNode(widget.getDomNode()); - - const widgetData: IWidgetData = { - allowEditorOverflow: widget.allowEditorOverflow || false, - widget: widget, - position: null, - preference: null, - isVisible: false, - domNode: domNode - }; - this._widgets[widget.getId()] = widgetData; + public addWidget(_widget: IContentWidget): void { + const myWidget = new Widget(this._context, this._viewDomNode, _widget); + this._widgets[myWidget.id] = myWidget; - domNode.setPosition((this._context.configuration.editor.viewInfo.fixedOverflowWidgets && widget.allowEditorOverflow) ? 'fixed' : 'absolute'); - this._setWidgetMaxWidth(widgetData); - domNode.setVisibility('hidden'); - domNode.setAttribute('widgetId', widget.getId()); - - if (widgetData.allowEditorOverflow) { - this.overflowingContentWidgetsDomNode.appendChild(domNode); + if (myWidget.allowEditorOverflow) { + this.overflowingContentWidgetsDomNode.appendChild(myWidget.domNode); } else { - this.domNode.appendChild(domNode); + this.domNode.appendChild(myWidget.domNode); } this.setShouldRender(); } public setWidgetPosition(widget: IContentWidget, position: IPosition, preference: ContentWidgetPositionPreference[]): void { - let widgetData = this._widgets[widget.getId()]; - - widgetData.position = position; - widgetData.preference = preference; + const myWidget = this._widgets[widget.getId()]; + myWidget.setPosition(position, preference); this.setShouldRender(); } public removeWidget(widget: IContentWidget): void { - let widgetId = widget.getId(); + const widgetId = widget.getId(); if (this._widgets.hasOwnProperty(widgetId)) { - let widgetData = this._widgets[widgetId]; + const myWidget = this._widgets[widgetId]; delete this._widgets[widgetId]; - const domNode = widgetData.domNode.domNode; + const domNode = myWidget.domNode.domNode; domNode.parentNode.removeChild(domNode); domNode.removeAttribute('monaco-visible-content-widget'); @@ -202,12 +127,107 @@ export class ViewContentWidgets extends ViewPart { public shouldSuppressMouseDownOnWidget(widgetId: string): boolean { if (this._widgets.hasOwnProperty(widgetId)) { - let widgetData = this._widgets[widgetId]; - return widgetData.widget.suppressMouseDown; + return this._widgets[widgetId].suppressMouseDown; } return false; } + public prepareRender(ctx: RenderingContext): void { + let keys = Object.keys(this._widgets); + for (let i = 0, len = keys.length; i < len; i++) { + const widgetId = keys[i]; + this._widgets[widgetId].prepareRender(ctx); + } + } + + public render(ctx: RestrictedRenderingContext): void { + let keys = Object.keys(this._widgets); + for (let i = 0, len = keys.length; i < len; i++) { + const widgetId = keys[i]; + this._widgets[widgetId].render(ctx); + } + } +} + +interface IBoxLayoutResult { + aboveTop: number; + fitsAbove: boolean; + belowTop: number; + fitsBelow: boolean; + left: number; +} + +class Widget { + private readonly _context: ViewContext; + private readonly _viewDomNode: FastDomNode; + private readonly _actual: IContentWidget; + + public readonly domNode: FastDomNode; + public readonly id: string; + public readonly allowEditorOverflow: boolean; + public readonly suppressMouseDown: boolean; + + private _fixedOverflowWidgets: boolean; + private _contentWidth: number; + private _contentLeft: number; + private _lineHeight: number; + + private _position: IPosition; + private _preference: ContentWidgetPositionPreference[]; + private _isVisible: boolean; + private _renderData: Coordinate; + + constructor(context: ViewContext, viewDomNode: FastDomNode, actual: IContentWidget) { + this._context = context; + this._viewDomNode = viewDomNode; + this._actual = actual; + this.domNode = createFastDomNode(this._actual.getDomNode()); + + this.id = this._actual.getId(); + this.allowEditorOverflow = this._actual.allowEditorOverflow || false; + this.suppressMouseDown = this._actual.suppressMouseDown || false; + + this._fixedOverflowWidgets = this._context.configuration.editor.viewInfo.fixedOverflowWidgets; + this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; + this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; + this._lineHeight = this._context.configuration.editor.lineHeight; + + this._position = null; + this._preference = null; + this._isVisible = false; + this._renderData = null; + + this.domNode.setPosition((this._fixedOverflowWidgets && this.allowEditorOverflow) ? 'fixed' : 'absolute'); + this._updateMaxWidth(); + this.domNode.setVisibility('hidden'); + this.domNode.setAttribute('widgetId', this.id); + } + + public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): void { + if (e.lineHeight) { + this._lineHeight = this._context.configuration.editor.lineHeight; + } + if (e.layoutInfo) { + this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; + this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; + + this._updateMaxWidth(); + } + } + + private _updateMaxWidth(): void { + const maxWidth = this.allowEditorOverflow + ? window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth + : this._contentWidth; + + this.domNode.setMaxWidth(maxWidth); + } + + public setPosition(position: IPosition, preference: ContentWidgetPositionPreference[]): void { + this._position = position; + this._preference = preference; + } + private _layoutBoxInViewport(topLeft: Coordinate, width: number, height: number, ctx: RenderingContext): IBoxLayoutResult { // Our visible box is split horizontally by the current line => 2 boxes @@ -279,7 +299,7 @@ export class ViewContentWidgets extends ViewPart { left -= delta; } - if (this._context.configuration.editor.viewInfo.fixedOverflowWidgets) { + if (this._fixedOverflowWidgets) { aboveTop = absoluteAboveTop; belowTop = absoluteBelowTop; left = absoluteLeft; @@ -288,17 +308,8 @@ export class ViewContentWidgets extends ViewPart { return { aboveTop, fitsAbove, belowTop, fitsBelow, left }; } - private _prepareRenderWidgetAtExactPosition(topLeft: Coordinate): IMyWidgetRenderData { - return { - top: topLeft.top, - left: topLeft.left - }; - } - - private _prepareRenderWidgetAtExactPositionOverflowing(topLeft: Coordinate): IMyWidgetRenderData { - let r = this._prepareRenderWidgetAtExactPosition(topLeft); - r.left += this._contentLeft; - return r; + private _prepareRenderWidgetAtExactPositionOverflowing(topLeft: Coordinate): Coordinate { + return new Coordinate(topLeft.top, topLeft.left + this._contentLeft); } private _getTopLeft(ctx: RenderingContext, position: Position): Coordinate { @@ -311,13 +322,13 @@ export class ViewContentWidgets extends ViewPart { return new Coordinate(top, visibleRange.left); } - private _prepareRenderWidget(widgetData: IWidgetData, ctx: RenderingContext): IMyWidgetRenderData { - if (!widgetData.position || !widgetData.preference) { + private _prepareRenderWidget(ctx: RenderingContext): Coordinate { + if (!this._position || !this._preference) { return null; } // Do not trust that widgets have a valid position - let validModelPosition = this._context.model.validateModelPosition(widgetData.position); + let validModelPosition = this._context.model.validateModelPosition(this._position); if (!this._context.model.coordinatesConverter.modelPositionIsVisible(validModelPosition)) { // this position is hidden by the view model @@ -337,11 +348,11 @@ export class ViewContentWidgets extends ViewPart { return null; } - const domNode = widgetData.domNode.domNode; + const domNode = this.domNode.domNode; const width = domNode.clientWidth; const height = domNode.clientHeight; - if (widgetData.allowEditorOverflow) { + if (this.allowEditorOverflow) { placement = this._layoutBoxInPage(topLeft, width, height, ctx); } else { placement = this._layoutBoxInViewport(topLeft, width, height, ctx); @@ -350,8 +361,8 @@ export class ViewContentWidgets extends ViewPart { // Do two passes, first for perfect fit, second picks first option for (let pass = 1; pass <= 2; pass++) { - for (let i = 0; i < widgetData.preference.length; i++) { - let pref = widgetData.preference[i]; + for (let i = 0; i < this._preference.length; i++) { + let pref = this._preference[i]; if (pref === ContentWidgetPositionPreference.ABOVE) { fetchPlacement(); if (!placement) { @@ -359,10 +370,7 @@ export class ViewContentWidgets extends ViewPart { return null; } if (pass === 2 || placement.fitsAbove) { - return { - top: placement.aboveTop, - left: placement.left - }; + return new Coordinate(placement.aboveTop, placement.left); } } else if (pref === ContentWidgetPositionPreference.BELOW) { fetchPlacement(); @@ -371,10 +379,7 @@ export class ViewContentWidgets extends ViewPart { return null; } if (pass === 2 || placement.fitsBelow) { - return { - top: placement.belowTop, - left: placement.left - }; + return new Coordinate(placement.belowTop, placement.left); } } else { const topLeft = this._getTopLeft(ctx, position); @@ -382,10 +387,10 @@ export class ViewContentWidgets extends ViewPart { // Widget outside of viewport return null; } - if (widgetData.allowEditorOverflow) { + if (this.allowEditorOverflow) { return this._prepareRenderWidgetAtExactPositionOverflowing(topLeft); } else { - return this._prepareRenderWidgetAtExactPosition(topLeft); + return topLeft; } } } @@ -394,49 +399,33 @@ export class ViewContentWidgets extends ViewPart { } public prepareRender(ctx: RenderingContext): void { - let data: IMyRenderData = {}; - - let keys = Object.keys(this._widgets); - for (let i = 0, len = keys.length; i < len; i++) { - let widgetId = keys[i]; - let renderData = this._prepareRenderWidget(this._widgets[widgetId], ctx); - if (renderData) { - data[widgetId] = renderData; - } - } - - this._renderData = data; + this._renderData = this._prepareRenderWidget(ctx); } public render(ctx: RestrictedRenderingContext): void { - let data = this._renderData; + if (!this._renderData) { + // This widget should be invisible + if (this._isVisible) { + this.domNode.removeAttribute('monaco-visible-content-widget'); + this._isVisible = false; + this.domNode.setVisibility('hidden'); + } + return; + } - let keys = Object.keys(this._widgets); - for (let i = 0, len = keys.length; i < len; i++) { - const widgetId = keys[i]; - const widget = this._widgets[widgetId]; - const domNode = widget.domNode; + // This widget should be visible + if (this.allowEditorOverflow) { + this.domNode.setTop(this._renderData.top); + this.domNode.setLeft(this._renderData.left); + } else { + this.domNode.setTop(this._renderData.top + ctx.scrollTop - ctx.bigNumbersDelta); + this.domNode.setLeft(this._renderData.left); + } - if (data.hasOwnProperty(widgetId)) { - if (widget.allowEditorOverflow) { - domNode.setTop(data[widgetId].top); - domNode.setLeft(data[widgetId].left); - } else { - domNode.setTop(data[widgetId].top + ctx.scrollTop - ctx.bigNumbersDelta); - domNode.setLeft(data[widgetId].left); - } - if (!widget.isVisible) { - domNode.setVisibility('inherit'); - domNode.setAttribute('monaco-visible-content-widget', 'true'); - widget.isVisible = true; - } - } else { - if (widget.isVisible) { - domNode.removeAttribute('monaco-visible-content-widget'); - widget.isVisible = false; - domNode.setVisibility('hidden'); - } - } + if (!this._isVisible) { + this.domNode.setVisibility('inherit'); + this.domNode.setAttribute('monaco-visible-content-widget', 'true'); + this._isVisible = true; } } } From f3ca4f6e09832eea66e325e86d340b4c3575356d Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Tue, 9 May 2017 12:06:05 +0200 Subject: [PATCH 0313/2747] Added handling for multiple '--user-data-dir' to enable Spectron smoke testing in #25291. --- src/main.js | 9 ++++++++- src/vs/platform/environment/node/argv.ts | 9 ++++++++- .../environment/test/node/environmentService.test.ts | 7 +++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index 43a92f8069a62..bf1c9542f1bad 100644 --- a/src/main.js +++ b/src/main.js @@ -170,8 +170,15 @@ function mkdir(dir) { }); } +// Because Spectron doesn't allow us to pass a custom user-data-dir, +// Code receives two of them. Let's just take the first one. +var userDataDir = args['user-data-dir']; +if (userDataDir) { + userDataDir = typeof userDataDir === 'string' ? userDataDir : userDataDir[0]; +} + // Set userData path before app 'ready' event and call to process.chdir -var userData = path.resolve(args['user-data-dir'] || paths.getDefaultUserDataPath(process.platform)); +var userData = path.resolve(userDataDir || paths.getDefaultUserDataPath(process.platform)); app.setPath('userData', userData); // Update cwd based on environment and platform diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts index b5bd5de241710..757875134f89f 100644 --- a/src/vs/platform/environment/node/argv.ts +++ b/src/vs/platform/environment/node/argv.ts @@ -105,7 +105,14 @@ export function parseCLIProcessArgv(processArgv: string[]): ParsedArgs { * Use this to parse code arguments such as `--verbose --wait` */ export function parseArgs(args: string[]): ParsedArgs { - return minimist(args, options) as ParsedArgs; + const result = minimist(args, options) as ParsedArgs; + + // Because Spectron doesn't allow us to pass a custom user-data-dir, + // Code receives two of them. Let's just take the first one. + const userDataDir: string | string[] = result['user-data-dir']; + result['user-data-dir'] = typeof userDataDir === 'string' ? userDataDir : userDataDir[0]; + + return result; } export const optionsHelp: { [name: string]: string; } = { diff --git a/src/vs/platform/environment/test/node/environmentService.test.ts b/src/vs/platform/environment/test/node/environmentService.test.ts index 1f3b16ab9443d..44617be5a87a3 100644 --- a/src/vs/platform/environment/test/node/environmentService.test.ts +++ b/src/vs/platform/environment/test/node/environmentService.test.ts @@ -41,4 +41,11 @@ suite('EnvironmentService', () => { assert.equal(parse(['--user-data-dir', './dir'], { cwd: () => '/foo', env: { 'VSCODE_CWD': '/bar' } }), path.resolve('/bar/dir'), 'should use VSCODE_CWD as the cwd when --user-data-dir is specified'); }); + + test('userDataPath should always take the first one', () => { + const parse = (a, b: { cwd: () => string, env: { [key: string]: string } }) => parseUserDataDir(parseArgs(a), b); + + assert.equal(parse(['--user-data-dir', './dir1', '--user-data-dir', './dir2'], { cwd: () => '/foo', env: {} }), path.resolve('/foo/dir1'), + 'should pick first --user-data-dir (dir1)'); + }); }); \ No newline at end of file From 4cc83a75e499d44adcb69b7412e793f514f35676 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 9 May 2017 12:18:32 +0200 Subject: [PATCH 0314/2747] Fix NPE where events were handled while the view model was disposing --- src/vs/editor/common/viewModel/viewModelImpl.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index 3f75c1f17ce80..7d5ff82c7f0f1 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -98,6 +98,8 @@ export class ViewModel extends Disposable implements IViewModel { private readonly decorations: ViewModelDecorations; private readonly cursors: ViewModelCursors; + private _isDisposing: boolean; + private _renderCustomLineNumbers: (lineNumber: number) => string; private _renderRelativeLineNumbers: boolean; private _lastCursorPosition: Position; @@ -128,6 +130,8 @@ export class ViewModel extends Disposable implements IViewModel { this.cursors = new ViewModelCursors(this.configuration, this.coordinatesConverter); + this._isDisposing = false; + this._register(this.model.addBulkListener((events: EmitterEvent[]) => this.onEvents(events))); this._register(this.configuration.onDidChange((e) => { this.onEvents([new EmitterEvent(ConfigurationChanged, e)]); @@ -155,6 +159,7 @@ export class ViewModel extends Disposable implements IViewModel { } public dispose(): void { + this._isDisposing = true; this.decorations.dispose(); this.lines.dispose(); this._listeners = []; @@ -230,6 +235,11 @@ export class ViewModel extends Disposable implements IViewModel { } private onEvents(events: EmitterEvent[]): void { + if (this._isDisposing) { + // Disposing the lines might end up sending model decoration changed events + // We no longer care about them... + return; + } let eventsCollector = new ViewEventsCollector(); this._onEvents(eventsCollector, events); this._emit(eventsCollector.finalize()); From 625c330e49e3e3081a2b012946db47d928f8eacc Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 9 May 2017 12:24:13 +0200 Subject: [PATCH 0315/2747] fix startup --- src/vs/platform/environment/node/argv.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts index 757875134f89f..fa8e0558faa8d 100644 --- a/src/vs/platform/environment/node/argv.ts +++ b/src/vs/platform/environment/node/argv.ts @@ -110,7 +110,9 @@ export function parseArgs(args: string[]): ParsedArgs { // Because Spectron doesn't allow us to pass a custom user-data-dir, // Code receives two of them. Let's just take the first one. const userDataDir: string | string[] = result['user-data-dir']; - result['user-data-dir'] = typeof userDataDir === 'string' ? userDataDir : userDataDir[0]; + if (userDataDir) { + result['user-data-dir'] = typeof userDataDir === 'string' ? userDataDir : userDataDir[0]; + } return result; } From 50b588a5a1d6ef1cc957e452553724a873afac1a Mon Sep 17 00:00:00 2001 From: Jeremy Loy Date: Tue, 9 May 2017 06:25:55 -0400 Subject: [PATCH 0316/2747] Added Services Submenu for MacOS (#26248) --- src/vs/code/electron-main/menus.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 9dc190d135f06..90b2eda68ec7f 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -388,6 +388,8 @@ export class VSCodeMenu { const about = new MenuItem({ label: nls.localize('mAbout', "About {0}", product.nameLong), role: 'about' }); const checkForUpdates = this.getUpdateMenuItems(); const preferences = this.getPreferencesMenu(); + const servicesMenu = new Menu(); + const services = new MenuItem({ label: nls.localize('mServices', "Services"), role: 'services', submenu: servicesMenu }); const hide = new MenuItem({ label: nls.localize('mHide', "Hide {0}", product.nameLong), role: 'hide', accelerator: 'Command+H' }); const hideOthers = new MenuItem({ label: nls.localize('mHideOthers', "Hide Others"), role: 'hideothers', accelerator: 'Command+Alt+H' }); const showAll = new MenuItem({ label: nls.localize('mShowAll', "Show All"), role: 'unhide' }); @@ -399,6 +401,8 @@ export class VSCodeMenu { __separator__(), preferences, __separator__(), + services, + __separator__(), hide, hideOthers, showAll, From 9c3880c539c22b130b3626df03ef2d7b46ab549b Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 9 May 2017 12:35:45 +0200 Subject: [PATCH 0317/2747] validate editor selections --- src/vs/editor/common/core/range.ts | 4 ++ .../contrib/snippet/browser/editorSnippets.ts | 67 ++++++++++++++----- .../contrib/snippet/common/snippetParser.ts | 2 +- .../test/browser/editorSnippets.test.ts | 49 +++++++++++++- .../snippet/test/common/snippetParser.test.ts | 26 +++---- src/vs/monaco.d.ts | 1 + 6 files changed, 119 insertions(+), 30 deletions(-) diff --git a/src/vs/editor/common/core/range.ts b/src/vs/editor/common/core/range.ts index e04ac3ef677d5..06255c480ec09 100644 --- a/src/vs/editor/common/core/range.ts +++ b/src/vs/editor/common/core/range.ts @@ -290,6 +290,10 @@ export class Range { // --- + public static fromPositions(start: IPosition, end: IPosition = start): Range { + return new Range(start.lineNumber, start.column, end.lineNumber, end.column); + } + /** * Create a `Range` from an `IRange`. */ diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index 8b0e86d2569f0..0a237f10af4d5 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -20,14 +20,16 @@ class OneSnippet { private readonly _snippet: TextmateSnippet; private readonly _offset: number; + private _snippetDecoration: string; private _placeholderDecorations: Map; private _placeholderGroups: Placeholder[][]; private _placeholderGroupsIdx: number; - private static readonly _decorations = { + private static readonly _decor = { active: { stickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges }, activeFinal: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges }, - inActive: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges }, + inactive: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges }, + snippet: { stickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges }, }; constructor(editor: ICommonCodeEditor, snippet: TextmateSnippet, offset: number) { @@ -52,22 +54,25 @@ class OneSnippet { this._placeholderDecorations = new Map(); const model = this._editor.getModel(); - // create a decoration (tracked range) for each placeholder this._editor.changeDecorations(accessor => { - let lastRange: Range; + // create one decoration for the whole snippets + const range = Range.fromPositions( + model.getPositionAt(this._offset), + model.getPositionAt(this._offset + this._snippet.text.length) + ); + this._snippetDecoration = accessor.addDecoration(range, OneSnippet._decor.snippet); + // create a decoration for each placeholder for (const placeholder of this._snippet.getPlaceholders()) { const placeholderOffset = this._snippet.offset(placeholder); const placeholderLen = this._snippet.len(placeholder); - const start = model.getPositionAt(this._offset + placeholderOffset); - const end = model.getPositionAt(this._offset + placeholderOffset + placeholderLen); - const range = new Range(start.lineNumber, start.column, end.lineNumber, end.column); - - const handle = accessor.addDecoration(range, OneSnippet._decorations.inActive); + const range = Range.fromPositions( + model.getPositionAt(this._offset + placeholderOffset), + model.getPositionAt(this._offset + placeholderOffset + placeholderLen) + ); + const handle = accessor.addDecoration(range, OneSnippet._decor.inactive); this._placeholderDecorations.set(placeholder, handle); - - lastRange = range; } }); @@ -107,7 +112,7 @@ class OneSnippet { if (prevGroupsIdx !== -1) { for (const placeholder of this._placeholderGroups[prevGroupsIdx]) { const id = this._placeholderDecorations.get(placeholder); - accessor.changeDecorationOptions(id, OneSnippet._decorations.inActive); + accessor.changeDecorationOptions(id, OneSnippet._decor.inactive); } } @@ -120,7 +125,7 @@ class OneSnippet { const range = this._editor.getModel().getDecorationRange(id); selections.push(new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)); - accessor.changeDecorationOptions(id, placeholder.isFinalTabstop ? OneSnippet._decorations.activeFinal : OneSnippet._decorations.active); + accessor.changeDecorationOptions(id, placeholder.isFinalTabstop ? OneSnippet._decor.activeFinal : OneSnippet._decor.active); } return selections; }); @@ -133,6 +138,10 @@ class OneSnippet { return this._placeholderGroups[this._placeholderGroupsIdx][0].isFinalTabstop; } } + + get range() { + return this._snippetDecoration !== undefined && this._editor.getModel().getDecorationRange(this._snippetDecoration); + } } export class SnippetSession { @@ -170,10 +179,10 @@ export class SnippetSession { const snippet = SnippetParser.parse(adjustedTemplate); const offset = model.getOffsetAt(start) + delta; - edits.push(EditOperation.replaceMove(selection, snippet.value)); + edits.push(EditOperation.replaceMove(selection, snippet.text)); this._snippets.push(new OneSnippet(editor, snippet, offset)); - delta += snippet.value.length - model.getValueLengthInRange(selection); + delta += snippet.text.length - model.getValueLengthInRange(selection); } // make insert edit and start with first selections @@ -211,4 +220,32 @@ export class SnippetSession { get isAtFinalPlaceholder() { return this._snippets[0].isAtFinalPlaceholder; } + + validateSelections(): boolean { + const selections = this._editor.getSelections(); + if (selections.length < this._snippets.length) { + return false; + } + + for (const selection of selections) { + let found = false; + for (const { range } of this._snippets) { + + if (!range) { + // too early, not yet initialized + return true; + } + + if (range.containsRange(selection)) { + found = true; + break; + } + } + if (!found) { + return false; + } + } + + return true; + } } diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index c073588b085c8..c17415c3de68b 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -271,7 +271,7 @@ export class TextmateSnippet { return ret; } - get value() { + get text() { return Marker.toString(this.marker); } diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts index 280e4ddab448d..04af3d8bcd602 100644 --- a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts @@ -12,7 +12,7 @@ import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { mockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; import { Model } from "vs/editor/common/model/model"; -suite('SnippetInsertion', function () { +suite('SnippetSession', function () { let editor: ICommonCodeEditor; let model: Model; @@ -234,5 +234,52 @@ suite('SnippetInsertion', function () { assertSelections(editor, new Selection(1, 4, 1, 4), new Selection(2, 8, 2, 8)); }); + test('snippets, overwriting nested placeholder', function () { + const session = new SnippetSession(editor, 'log(${1:"$2"});$0'); + assertSelections(editor, new Selection(1, 5, 1, 7), new Selection(2, 9, 2, 11)); + + editor.trigger('test', 'type', { text: 'XXX' }); + assert.equal(model.getValue(), 'log(XXX);function foo() {\n log(XXX);console.log(a);\n}'); + + session.next(); + assert.equal(session.isAtFinalPlaceholder, false); + // assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + + session.next(); + assert.equal(session.isAtFinalPlaceholder, true); + assertSelections(editor, new Selection(1, 10, 1, 10), new Selection(2, 14, 2, 14)); + }); + + test('snippets, selections and snippet ranges', function () { + const session = new SnippetSession(editor, '${1:foo}farboo${2:bar}$0'); + assert.equal(model.getValue(), 'foofarboobarfunction foo() {\n foofarboobarconsole.log(a);\n}'); + assertSelections(editor, new Selection(1, 1, 1, 4), new Selection(2, 5, 2, 8)); + + assert.equal(session.validateSelections(), true); + + editor.setSelections([new Selection(1, 1, 1, 1)]); + assert.equal(session.validateSelections(), false); + + editor.setSelections([new Selection(1, 6, 1, 6), new Selection(2, 10, 2, 10)]); + assert.equal(session.validateSelections(), true); + + editor.setSelections([new Selection(1, 6, 1, 6), new Selection(2, 10, 2, 10), new Selection(1, 1, 1, 1)]); + assert.equal(session.validateSelections(), true); + + editor.setSelections([new Selection(1, 6, 1, 6), new Selection(2, 10, 2, 10), new Selection(2, 20, 2, 21)]); + assert.equal(session.validateSelections(), false); + + // reset selection to placeholder + session.next(); + assert.equal(session.validateSelections(), true); + assertSelections(editor, new Selection(1, 10, 1, 13), new Selection(2, 14, 2, 17)); + + // reset selection to placeholder + session.next(); + assert.equal(session.validateSelections(), true); + assert.equal(session.isAtFinalPlaceholder, true); + assertSelections(editor, new Selection(1, 13, 1, 13), new Selection(2, 17, 2, 17)); + }); + }); diff --git a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts index 0bbf14eec0db8..0bfbcec0e5cf2 100644 --- a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts +++ b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts @@ -351,30 +351,30 @@ suite('SnippetParser', () => { test('TextmateSnippet#withIndentation', () => { let snippet = SnippetParser.parse('foo\n bar'); - assert.equal(snippet.value, 'foo\n bar'); + assert.equal(snippet.text, 'foo\n bar'); let snippet1 = snippet.withIndentation(s => s.replace(/ /, '\t')); let snippet2 = snippet.withIndentation(s => s.replace(/ /, ' ')); - assert.equal(snippet.value, 'foo\n bar'); - assert.equal(snippet1.value, 'foo\n\tbar'); - assert.equal(snippet2.value, 'foo\n bar'); + assert.equal(snippet.text, 'foo\n bar'); + assert.equal(snippet1.text, 'foo\n\tbar'); + assert.equal(snippet2.text, 'foo\n bar'); snippet = SnippetParser.parse('foo\n bar'); - assert.equal(snippet.value, 'foo\n bar'); + assert.equal(snippet.text, 'foo\n bar'); let newSnippet = snippet.withIndentation(s => s.replace(/ /, '\t')); - assert.equal(snippet.value, 'foo\n bar'); - assert.equal(newSnippet.value, 'foo\n\tbar'); + assert.equal(snippet.text, 'foo\n bar'); + assert.equal(newSnippet.text, 'foo\n\tbar'); snippet = SnippetParser.parse('foo\r\n bar\r\n far'); - assert.equal(snippet.value, 'foo\r\n bar\r\n far'); + assert.equal(snippet.text, 'foo\r\n bar\r\n far'); newSnippet = snippet.withIndentation(s => s.replace(/ /, '\t')); - assert.equal(snippet.value, 'foo\r\n bar\r\n far'); - assert.equal(newSnippet.value, 'foo\r\n\tbar\r\n\tfar'); + assert.equal(snippet.text, 'foo\r\n bar\r\n far'); + assert.equal(newSnippet.text, 'foo\r\n\tbar\r\n\tfar'); snippet = SnippetParser.parse('foo${1:bar\r far\r boo}'); - assert.equal(snippet.value, 'foobar\r far\r boo'); + assert.equal(snippet.text, 'foobar\r far\r boo'); newSnippet = snippet.withIndentation(s => s.replace(/ /, '\t')); - assert.equal(snippet.value, 'foobar\r far\r boo'); - assert.equal(newSnippet.value, 'foobar\r\tfar\r\tboo'); + assert.equal(snippet.text, 'foobar\r far\r boo'); + assert.equal(newSnippet.text, 'foobar\r\tfar\r\tboo'); }); }); diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index e26814d708c9c..7ebc6a1eeba9c 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -624,6 +624,7 @@ declare module monaco { * Create a new empty range using this range's start position. */ static collapseToStart(range: IRange): Range; + static fromPositions(start: IPosition, end?: IPosition): Range; /** * Create a `Range` from an `IRange`. */ From 854954758ae23ab6a7b9cc36e1de75d3c267cbf5 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 9 May 2017 12:51:07 +0200 Subject: [PATCH 0318/2747] simple test for nested snippet sessions --- .../test/browser/editorSnippets.test.ts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts index 04af3d8bcd602..4de2f4c638730 100644 --- a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts @@ -281,5 +281,28 @@ suite('SnippetSession', function () { assertSelections(editor, new Selection(1, 13, 1, 13), new Selection(2, 17, 2, 17)); }); + test('snippets, nested sessions', function () { + + model.setValue(''); + editor.setSelection(new Selection(1, 1, 1, 1)); + + const first = new SnippetSession(editor, 'foo${2:bar}foo$0'); + assert.equal(model.getValue(), 'foobarfoo'); + assertSelections(editor, new Selection(1, 4, 1, 7)); + + const second = new SnippetSession(editor, 'ba${1:zzzz}$0'); + assert.equal(model.getValue(), 'foobazzzzfoo'); + assertSelections(editor, new Selection(1, 6, 1, 10)); + + second.next(); + assert.equal(second.isAtFinalPlaceholder, true); + assertSelections(editor, new Selection(1, 10, 1, 10)); + + first.next(); + assert.equal(first.isAtFinalPlaceholder, true); + assertSelections(editor, new Selection(1, 13, 1, 13)); + + }); + }); From b8a2488a8fe4f7d5835e320270ea044e5d872776 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 9 May 2017 12:51:13 +0200 Subject: [PATCH 0319/2747] Reduce view model responsibilities --- .../viewParts/lineNumbers/lineNumbers.ts | 62 ++++++++---- src/vs/editor/common/viewModel/viewModel.ts | 1 - .../editor/common/viewModel/viewModelImpl.ts | 94 ++++++++----------- 3 files changed, 83 insertions(+), 74 deletions(-) diff --git a/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts b/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts index c1a0c97a1da92..38205f5a9978a 100644 --- a/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts +++ b/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts @@ -13,31 +13,45 @@ import { DynamicViewOverlay } from 'vs/editor/browser/view/dynamicViewOverlay'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import { Position } from 'vs/editor/common/core/position'; export class LineNumbersOverlay extends DynamicViewOverlay { public static CLASS_NAME = 'line-numbers'; private _context: ViewContext; + private _lineHeight: number; private _renderLineNumbers: boolean; + private _renderCustomLineNumbers: (lineNumber: number) => string; private _renderRelativeLineNumbers: boolean; private _lineNumbersLeft: number; private _lineNumbersWidth: number; + + private _lastCursorModelPosition: Position; private _renderResult: string[]; constructor(context: ViewContext) { super(); this._context = context; - this._lineHeight = this._context.configuration.editor.lineHeight; - this._renderLineNumbers = this._context.configuration.editor.viewInfo.renderLineNumbers; - this._renderRelativeLineNumbers = this._context.configuration.editor.viewInfo.renderRelativeLineNumbers; - this._lineNumbersLeft = this._context.configuration.editor.layoutInfo.lineNumbersLeft; - this._lineNumbersWidth = this._context.configuration.editor.layoutInfo.lineNumbersWidth; + + this._readConfig(); + + this._lastCursorModelPosition = new Position(1, 1); this._renderResult = null; this._context.addEventHandler(this); } + private _readConfig(): void { + const config = this._context.configuration.editor; + this._lineHeight = config.lineHeight; + this._renderLineNumbers = config.viewInfo.renderLineNumbers; + this._renderCustomLineNumbers = config.viewInfo.renderCustomLineNumbers; + this._renderRelativeLineNumbers = config.viewInfo.renderRelativeLineNumbers; + this._lineNumbersLeft = config.layoutInfo.lineNumbersLeft; + this._lineNumbersWidth = config.layoutInfo.lineNumbersWidth; + } + public dispose(): void { this._context.removeEventHandler(this); this._context = null; @@ -48,20 +62,12 @@ export class LineNumbersOverlay extends DynamicViewOverlay { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - if (e.lineHeight) { - this._lineHeight = this._context.configuration.editor.lineHeight; - } - if (e.viewInfo) { - this._renderLineNumbers = this._context.configuration.editor.viewInfo.renderLineNumbers; - this._renderRelativeLineNumbers = this._context.configuration.editor.viewInfo.renderRelativeLineNumbers; - } - if (e.layoutInfo) { - this._lineNumbersLeft = this._context.configuration.editor.layoutInfo.lineNumbersLeft; - this._lineNumbersWidth = this._context.configuration.editor.layoutInfo.lineNumbersWidth; - } + this._readConfig(); return true; } public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { + this._lastCursorModelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(e.position); + if (this._renderRelativeLineNumbers) { return true; } @@ -88,6 +94,28 @@ export class LineNumbersOverlay extends DynamicViewOverlay { // --- end event handlers + private _getLineRenderLineNumber(viewLineNumber: number): string { + const modelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Position(viewLineNumber, 1)); + if (modelPosition.column !== 1) { + return ''; + } + let modelLineNumber = modelPosition.lineNumber; + + if (this._renderCustomLineNumbers) { + return this._renderCustomLineNumbers(modelLineNumber); + } + + if (this._renderRelativeLineNumbers) { + let diff = Math.abs(this._lastCursorModelPosition.lineNumber - modelLineNumber); + if (diff === 0) { + return '' + modelLineNumber + ''; + } + return String(diff); + } + + return String(modelLineNumber); + } + public prepareRender(ctx: RenderingContext): void { if (!this._renderLineNumbers) { this._renderResult = null; @@ -103,7 +131,7 @@ export class LineNumbersOverlay extends DynamicViewOverlay { for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) { let lineIndex = lineNumber - visibleStartLineNumber; - let renderLineNumber = this._context.model.getLineRenderLineNumber(lineNumber); + let renderLineNumber = this._getLineRenderLineNumber(lineNumber); if (renderLineNumber) { output[lineIndex] = ( common diff --git a/src/vs/editor/common/viewModel/viewModel.ts b/src/vs/editor/common/viewModel/viewModel.ts index 19a4b265f789e..ab2b17027acff 100644 --- a/src/vs/editor/common/viewModel/viewModel.ts +++ b/src/vs/editor/common/viewModel/viewModel.ts @@ -110,7 +110,6 @@ export interface IViewModel { getLineIndentGuide(lineNumber: number): number; getLineMinColumn(lineNumber: number): number; getLineMaxColumn(lineNumber: number): number; - getLineRenderLineNumber(lineNumber: number): string; getAllOverviewRulerDecorations(): ViewModelDecoration[]; getValueInRange(range: Range, eol: EndOfLinePreference): string; diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index 7d5ff82c7f0f1..77521cdacc27a 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -100,10 +100,6 @@ export class ViewModel extends Disposable implements IViewModel { private _isDisposing: boolean; - private _renderCustomLineNumbers: (lineNumber: number) => string; - private _renderRelativeLineNumbers: boolean; - private _lastCursorPosition: Position; - private _centeredViewLine: number; private _listeners: IViewModelListener[]; @@ -119,10 +115,6 @@ export class ViewModel extends Disposable implements IViewModel { this.coordinatesConverter = new CoordinatesConverter(this.lines); - this._lastCursorPosition = new Position(1, 1); - this._renderCustomLineNumbers = this.configuration.editor.viewInfo.renderCustomLineNumbers; - this._renderRelativeLineNumbers = this.configuration.editor.viewInfo.renderRelativeLineNumbers; - this._centeredViewLine = -1; this.decorations = new ViewModelDecorations(this.editorId, this.model, this.configuration, this.coordinatesConverter); @@ -230,8 +222,44 @@ export class ViewModel extends Disposable implements IViewModel { return lineMappingChanged; } - public addEventSource(eventSource: Cursor): void { - this._register(eventSource.addBulkListener((events: EmitterEvent[]) => this.onEvents(events))); + public addEventSource(cursor: Cursor): void { + this._register(cursor.addBulkListener((events: EmitterEvent[]) => { + const eventsCollector = new ViewEventsCollector(); + + for (let i = 0, len = events.length; i < len; i++) { + const _e = events[i]; + const type = _e.type; + const data = _e.data; + + switch (type) { + case CursorEventType.CursorPositionChanged: { + const e = data; + this.cursors.onCursorPositionChanged(eventsCollector, e); + break; + } + case CursorEventType.CursorSelectionChanged: { + const e = data; + this.cursors.onCursorSelectionChanged(eventsCollector, e); + break; + } + case CursorEventType.CursorRevealRange: { + const e = data; + this.cursors.onCursorRevealRange(eventsCollector, e); + break; + } + case CursorEventType.CursorScrollRequest: { + const e = data; + this.cursors.onCursorScrollRequest(eventsCollector, e); + break; + } + default: + console.info('View received unknown event: '); + console.info(type, data); + } + } + + this._emit(eventsCollector.finalize()); + })); } private onEvents(events: EmitterEvent[]): void { @@ -389,35 +417,11 @@ export class ViewModel extends Disposable implements IViewModel { // Ignore, since the editor will take care of this and destroy the view shortly break; } - case CursorEventType.CursorPositionChanged: { - const e = data; - this.cursors.onCursorPositionChanged(eventsCollector, e); - this._lastCursorPosition = e.position; - break; - } - case CursorEventType.CursorSelectionChanged: { - const e = data; - this.cursors.onCursorSelectionChanged(eventsCollector, e); - break; - } - case CursorEventType.CursorRevealRange: { - const e = data; - this.cursors.onCursorRevealRange(eventsCollector, e); - break; - } - case CursorEventType.CursorScrollRequest: { - const e = data; - this.cursors.onCursorScrollRequest(eventsCollector, e); - break; - } case ConfigurationChanged: { const e = data; revealPreviousCenteredModelRange = this._onWrappingIndentChange(eventsCollector, this.configuration.editor.wrappingInfo.wrappingIndent) || revealPreviousCenteredModelRange; revealPreviousCenteredModelRange = this._onWrappingColumnChange(eventsCollector, this.configuration.editor.wrappingInfo.wrappingColumn, this.configuration.editor.fontInfo.typicalFullwidthCharacterWidth / this.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth) || revealPreviousCenteredModelRange; - this._renderCustomLineNumbers = this.configuration.editor.viewInfo.renderCustomLineNumbers; - this._renderRelativeLineNumbers = this.configuration.editor.viewInfo.renderRelativeLineNumbers; - if (e.readOnly) { // Must read again all decorations due to readOnly filtering this.decorations.reset(); @@ -491,28 +495,6 @@ export class ViewModel extends Disposable implements IViewModel { return result + 2; } - public getLineRenderLineNumber(viewLineNumber: number): string { - let modelPosition = this.coordinatesConverter.convertViewPositionToModelPosition(new Position(viewLineNumber, 1)); - if (modelPosition.column !== 1) { - return ''; - } - let modelLineNumber = modelPosition.lineNumber; - - if (this._renderCustomLineNumbers) { - return this._renderCustomLineNumbers(modelLineNumber); - } - - if (this._renderRelativeLineNumbers) { - let diff = Math.abs(this._lastCursorPosition.lineNumber - modelLineNumber); - if (diff === 0) { - return '' + modelLineNumber + ''; - } - return String(diff); - } - - return String(modelLineNumber); - } - public getDecorationsInViewport(visibleRange: Range): ViewModelDecoration[] { return this.decorations.getDecorationsViewportData(visibleRange).decorations; } From cdf3c0c660087ab699b46c23ce4a17e38b19476f Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 9 May 2017 12:59:19 +0200 Subject: [PATCH 0320/2747] remove unused code, rename Placeholder#name to Placeholder#index --- .../contrib/snippet/browser/editorSnippets.ts | 4 +- .../editor/contrib/snippet/common/snippet.ts | 14 ++-- .../contrib/snippet/common/snippetParser.ts | 64 +++---------------- .../snippet/test/common/snippetParser.test.ts | 43 ++----------- 4 files changed, 26 insertions(+), 99 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index 0a237f10af4d5..508e9be0afd03 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -79,8 +79,8 @@ class OneSnippet { this._placeholderGroupsIdx = -1; this._placeholderGroups = []; let lastBucket: Placeholder[]; - this._snippet.getPlaceholders().sort(Placeholder.compare).forEach(a => { - if (!lastBucket || lastBucket[0].name !== a.name) { + this._snippet.getPlaceholders().sort(Placeholder.compareByIndex).forEach(a => { + if (!lastBucket || lastBucket[0].index !== a.index) { lastBucket = [a]; this._placeholderGroups.push(lastBucket); } else { diff --git a/src/vs/editor/contrib/snippet/common/snippet.ts b/src/vs/editor/contrib/snippet/common/snippet.ts index ea0b628e953a0..b9049993493d9 100644 --- a/src/vs/editor/contrib/snippet/common/snippet.ts +++ b/src/vs/editor/contrib/snippet/common/snippet.ts @@ -65,8 +65,8 @@ export class CodeSnippet implements ICodeSnippet { let getMaxTabStop = (markers: Marker[]): number => { let currentMaxTabStop = -1; markers.forEach(marker => { - if (marker instanceof Placeholder && /^\d+$/.test(marker['name'])) { - let currentTabStop = Number(marker['name']); + if (marker instanceof Placeholder && /^\d+$/.test(marker['index'])) { + let currentTabStop = Number(marker['index']); let nestedMaxTabStop = getMaxTabStop(marker['defaultValue'] || []); currentMaxTabStop = Math.max(currentMaxTabStop, currentTabStop, nestedMaxTabStop); } @@ -79,8 +79,8 @@ export class CodeSnippet implements ICodeSnippet { let setNextTabStop = (markers: Marker[]) => { markers.forEach(marker => { if (marker instanceof Placeholder) { - if (marker['name'] === '0') { - marker['name'] = ++maxTabStop + ''; + if (marker['index'] === '0') { + marker['index'] = ++maxTabStop + ''; } setNextTabStop(marker['defaultValue'] || []); } @@ -262,10 +262,10 @@ function _fillCodeSnippetFromMarker(snippet: CodeSnippet, marker: Marker[]) { } else if (marker instanceof Placeholder) { - let placeHolder = placeHolders[marker.name]; + let placeHolder = placeHolders[marker.index]; if (!placeHolder) { - placeHolders[marker.name] = placeHolder = { - id: marker.name, + placeHolders[marker.index] = placeHolder = { + id: marker.index, value: Marker.toString(marker.defaultValue), occurences: [] }; diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index c17415c3de68b..a69ca03386e43 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -6,7 +6,6 @@ 'use strict'; import { CharCode } from 'vs/base/common/charCode'; -import { getLeadingWhitespace } from 'vs/base/common/strings'; export enum TokenType { Dollar, @@ -162,30 +161,30 @@ export class Text extends Marker { export class Placeholder extends Marker { - static compare(a: Placeholder, b: Placeholder): number { - if (a.name === b.name) { + static compareByIndex(a: Placeholder, b: Placeholder): number { + if (a.index === b.index) { return 0; } else if (a.isFinalTabstop) { return 1; } else if (b.isFinalTabstop) { return -1; - } else if (a.name < b.name) { + } else if (a.index < b.index) { return -1; - } else if (a.name > b.name) { + } else if (a.index > b.index) { return 1; } else { return 0; } } - constructor(public name: string = '', public defaultValue: Marker[]) { + constructor(public index: string = '', public defaultValue: Marker[]) { super(); } get isFinalTabstop() { - return this.name === '0'; + return this.index === '0'; } with(defaultValue: Marker[]): Placeholder { - return new Placeholder(this.name, defaultValue); + return new Placeholder(this.index, defaultValue); } toString() { return Marker.toString(this.defaultValue); @@ -205,11 +204,6 @@ export class Variable extends Marker { toString() { return this.isDefined ? this.resolvedValue : Marker.toString(this.defaultValue); } - with(defaultValue: Marker[]): Variable { - let ret = new Variable(this.name, defaultValue); - ret.resolvedValue = this.resolvedValue; - return ret; - } } export function walk(marker: Marker[], visitor: (marker: Marker) => boolean): void { const stack = [...marker]; @@ -274,44 +268,6 @@ export class TextmateSnippet { get text() { return Marker.toString(this.marker); } - - withIndentation(normalizer: (whitespace: string) => string): TextmateSnippet { - // create a new snippet because this can be - // different for each and every cursor - const newMarker = [...this.marker]; - TextmateSnippet._adjustIndentation(newMarker, normalizer); - return new TextmateSnippet(newMarker); - } - - private static _adjustIndentation(marker: Marker[], normalizer: (whitespace: string) => string): void { - for (let i = 0; i < marker.length; i++) { - const candidate = marker[i]; - if (candidate instanceof Text) { - //check for newline characters and adjust indent - let regex = /\r\n|\r|\n/g; - let match: RegExpMatchArray; - let value = candidate.string; - while (match = regex.exec(value)) { - let pos = regex.lastIndex; - let whitespace = getLeadingWhitespace(value, pos); - let normalized = normalizer(whitespace); - if (whitespace !== normalized) { - value = value.substr(0, pos) - + normalized - + value.substr(pos + whitespace.length); - - marker[i] = candidate.with(value); - } - } - } else if (candidate instanceof Placeholder || candidate instanceof Variable) { - // recurse with a copied array - let children = [...candidate.defaultValue]; - TextmateSnippet._adjustIndentation(children, normalizer); - marker[i] = candidate.with(children); - } - } - } - } export class SnippetParser { @@ -353,10 +309,10 @@ export class SnippetParser { const thisMarker = marker[i]; if (thisMarker instanceof Placeholder) { - if (placeholders[thisMarker.name] === undefined) { - placeholders[thisMarker.name] = thisMarker.defaultValue; + if (placeholders[thisMarker.index] === undefined) { + placeholders[thisMarker.index] = thisMarker.defaultValue; } else if (thisMarker.defaultValue.length === 0) { - thisMarker.defaultValue = placeholders[thisMarker.name].slice(0); + thisMarker.defaultValue = placeholders[thisMarker.index].slice(0); } if (thisMarker.defaultValue.length > 0) { diff --git a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts index 0bfbcec0e5cf2..1b02a3676c336 100644 --- a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts +++ b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts @@ -144,7 +144,7 @@ suite('SnippetParser', () => { let [, placeholder] = new SnippetParser(true, false).parse('foo${1:bar\\}${2:foo}}'); let { defaultValue } = (placeholder); - assert.equal((placeholder).name, '1'); + assert.equal((placeholder).index, '1'); assert.ok(defaultValue[0] instanceof Text); assert.equal(defaultValue[0].toString(), 'bar}'); assert.ok(defaultValue[1] instanceof Placeholder); @@ -213,7 +213,7 @@ suite('SnippetParser', () => { const placeholder = marker[1]; assert.equal(placeholder, false); - assert.equal(placeholder.name, '1'); + assert.equal(placeholder.index, '1'); assert.equal(placeholder.defaultValue.length, 3); assert.ok(placeholder.defaultValue[0] instanceof Text); assert.ok(placeholder.defaultValue[1] instanceof Variable); @@ -256,13 +256,13 @@ suite('SnippetParser', () => { ); const [p1, , p2, , p3] = new SnippetParser().parse('{{first}}-{{2:}}-{{second}}-{{1:}}'); - assert.equal((p1).name, 'first'); + assert.equal((p1).index, 'first'); assert.equal(Marker.toString((p1).defaultValue), 'first'); - assert.equal((p2).name, '2'); + assert.equal((p2).index, '2'); assert.equal(Marker.toString((p2).defaultValue), ''); - assert.equal((p3).name, 'second'); + assert.equal((p3).index, 'second'); assert.equal(Marker.toString((p3).defaultValue), 'second'); }); @@ -272,11 +272,11 @@ suite('SnippetParser', () => { const [, p1, , p2] = new SnippetParser().parse('errorContext: `${1:err}`, error:$1'); - assert.equal((p1).name, '1'); + assert.equal((p1).index, '1'); assert.equal((p1).defaultValue.length, '1'); assert.equal(((p1).defaultValue[0]), 'err'); - assert.equal((p2).name, '1'); + assert.equal((p2).index, '1'); assert.equal((p2).defaultValue.length, '1'); assert.equal(((p2).defaultValue[0]), 'err'); @@ -348,33 +348,4 @@ suite('SnippetParser', () => { placeholders = snippet.getPlaceholders(); assert.equal(placeholders.length, 2); }); - - test('TextmateSnippet#withIndentation', () => { - let snippet = SnippetParser.parse('foo\n bar'); - assert.equal(snippet.text, 'foo\n bar'); - let snippet1 = snippet.withIndentation(s => s.replace(/ /, '\t')); - let snippet2 = snippet.withIndentation(s => s.replace(/ /, ' ')); - assert.equal(snippet.text, 'foo\n bar'); - assert.equal(snippet1.text, 'foo\n\tbar'); - assert.equal(snippet2.text, 'foo\n bar'); - - snippet = SnippetParser.parse('foo\n bar'); - assert.equal(snippet.text, 'foo\n bar'); - let newSnippet = snippet.withIndentation(s => s.replace(/ /, '\t')); - assert.equal(snippet.text, 'foo\n bar'); - assert.equal(newSnippet.text, 'foo\n\tbar'); - - snippet = SnippetParser.parse('foo\r\n bar\r\n far'); - assert.equal(snippet.text, 'foo\r\n bar\r\n far'); - newSnippet = snippet.withIndentation(s => s.replace(/ /, '\t')); - assert.equal(snippet.text, 'foo\r\n bar\r\n far'); - assert.equal(newSnippet.text, 'foo\r\n\tbar\r\n\tfar'); - - snippet = SnippetParser.parse('foo${1:bar\r far\r boo}'); - assert.equal(snippet.text, 'foobar\r far\r boo'); - newSnippet = snippet.withIndentation(s => s.replace(/ /, '\t')); - assert.equal(snippet.text, 'foobar\r far\r boo'); - assert.equal(newSnippet.text, 'foobar\r\tfar\r\tboo'); - - }); }); From c9f10706eff2d9ceb73ba0f7e5f18cb4f8a63d80 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 9 May 2017 15:50:18 +0200 Subject: [PATCH 0321/2747] [theme] add text colors. Fixes #26298 --- src/vs/platform/theme/common/colorRegistry.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index ec2a2d0f03648..37746aef6bb24 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -130,6 +130,7 @@ export function registerColor(id: string, defaults: ColorDefaults, description: export const foreground = registerColor('foreground', { dark: '#CCCCCC', light: '#6C6C6C', hc: '#FFFFFF' }, nls.localize('foreground', "Overall foreground color. This color is only used if not overridden by a component.")); export const errorForeground = registerColor('errorForeground', { dark: '#F48771', light: '#A1260D', hc: '#F48771' }, nls.localize('errorForeground', "Overall foreground color for error messages. This color is only used if not overridden by a component.")); +export const descriptionForeground = registerColor('descriptionForeground', { light: transparent(foreground, 0.7), dark: transparent(foreground, 0.7), hc: transparent(foreground, 0.7) }, nls.localize('descriptionForeground', "Foreground color for description text providing additional information, for example for a label.")); export const focusBorder = registerColor('focusBorder', { dark: Color.fromHex('#0E639C').transparent(0.6), light: Color.fromHex('#007ACC').transparent(0.4), hc: '#F38518' }, nls.localize('focusBorder', "Overall border color for focused elements. This color is only used if not overridden by a component.")); @@ -139,6 +140,16 @@ export const activeContrastBorder = registerColor('contrastActiveBorder', { ligh export const selectionBackground = registerColor('selection.background', { light: null, dark: null, hc: null }, nls.localize('selectionBackground', "The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor and the terminal.")); +// ------ text colors + +export const textSeparatorForeground = registerColor('textSeparator.foreground', { light: '#0000002e', dark: '#ffffff2e', hc: Color.black }, nls.localize('textSeparatorForeground', "Color for text separators.")); +export const textLinkForeground = registerColor('textLink.foreground', { light: '#4080D0', dark: '#4080D0', hc: '#4080D0' }, nls.localize('textLinkForeground', "Foreground color for links in text.")); +export const textLinkActiveForeground = registerColor('textLink.activeForeground', { light: '#4080D0', dark: '#4080D0', hc: '#4080D0' }, nls.localize('textLinkActiveForeground', "Foreground color for active links in text.")); +export const textPreformatForeground = registerColor('textPreformat.foreground', { light: '#A31515', dark: '#D7BA7D', hc: '#D7BA7D' }, nls.localize('textPreformatForeground', "Foreground color for preformatted text segments.")); +export const textBlockQuoteBackground = registerColor('textBlockQuote.background', { light: '#7f7f7f1a', dark: '#7f7f7f1a', hc: null }, nls.localize('textBlockQuoteBackground', "Background color for block quotes in text.")); +export const textBlockQuoteBorder = registerColor('textBlockQuote.border', { light: '#007acc80', dark: '#007acc80', hc: Color.white }, nls.localize('textBlockQuoteBorder', "Border color for block quotes in text.")); +export const textCodeBlockBackground = registerColor('textCodeBlock.background', { light: '#dcdcdc66', dark: '#0a0a0a66', hc: Color.black }, nls.localize('textCodeBlockBackground', "Background color for code blocks in text.")); + // ----- widgets export const widgetShadow = registerColor('widget.shadow', { dark: '#000000', light: '#A8A8A8', hc: null }, nls.localize('widgetShadow', 'Shadow color of widgets such as find/replace inside the editor.')); @@ -297,7 +308,7 @@ function resolveColorValue(colorValue: ColorValue, theme: ITheme): Color { return null; } -//setTimeout(_ => console.log(colorRegistry.toString()), 5000); +setTimeout(_ => console.log(colorRegistry.toString()), 5000); From d43d4ab9392e9a8e762d4f20d10751027dae88f4 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Tue, 9 May 2017 15:59:57 +0200 Subject: [PATCH 0322/2747] DAP: extend type of TerminateEvent.restart --- src/vs/workbench/parts/debug/common/debugProtocol.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debugProtocol.d.ts b/src/vs/workbench/parts/debug/common/debugProtocol.d.ts index 5f1345593d942..17f87f5501608 100644 --- a/src/vs/workbench/parts/debug/common/debugProtocol.d.ts +++ b/src/vs/workbench/parts/debug/common/debugProtocol.d.ts @@ -121,8 +121,10 @@ declare module DebugProtocol { export interface TerminatedEvent extends Event { // event: 'terminated'; body?: { - /** A debug adapter may set 'restart' to true to request that the front end restarts the session. */ - restart?: boolean; + /** A debug adapter may set 'restart' to true (or to an arbitrary object) to request that the front end restarts the session. + The value is not interpreted by the client and passed unmodified as an attribute '__restart' to the launchRequest. + */ + restart?: boolean | object; }; } @@ -1345,4 +1347,3 @@ declare module DebugProtocol { innerException?: ExceptionDetails[]; } } - From 90dcda507ac342cb88f6d8b5fd91706919edf822 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 9 May 2017 16:02:10 +0200 Subject: [PATCH 0323/2747] add workaround for #24820 --- src/main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index bf1c9542f1bad..67d76f57004cf 100644 --- a/src/main.js +++ b/src/main.js @@ -16,7 +16,12 @@ if (process.argv.indexOf('--prof-startup') >= 0) { // in certain locales (e.g. PL), image metrics are wrongly computed. We explicitly set the // LC_NUMERIC to prevent this from happening (selects the numeric formatting category of the // C locale, http://en.cppreference.com/w/cpp/locale/LC_categories). TODO@Ben temporary. -process.env.LC_NUMERIC = 'C'; +if (process.env.LC_ALL) { + process.env.LC_ALL = 'C'; +} +if (process.env.LC_NUMERIC) { + process.env.LC_NUMERIC = 'C'; +} // Perf measurements global.perfStartTime = Date.now(); From 0a2d89c1abc535faff1a2bfe8d87beac7dd5632a Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 9 May 2017 16:00:56 +0200 Subject: [PATCH 0324/2747] fix new windows build --- build/tfs/win32/compile.ps1 | 2 +- build/tfs/win32/test.ps1 | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/tfs/win32/compile.ps1 b/build/tfs/win32/compile.ps1 index be8431986d161..d75432a563915 100644 --- a/build/tfs/win32/compile.ps1 +++ b/build/tfs/win32/compile.ps1 @@ -1,4 +1,4 @@ -. .\lib.ps1 +. .\build\tfs\win32\lib.ps1 exec { & .\scripts\npm.bat install } exec { & npm run gulp -- mixin } diff --git a/build/tfs/win32/test.ps1 b/build/tfs/win32/test.ps1 index f9a58fff29812..c9589b5d52d49 100644 --- a/build/tfs/win32/test.ps1 +++ b/build/tfs/win32/test.ps1 @@ -1,4 +1,4 @@ -. .\lib.ps1 +. .\build\tfs\win32\lib.ps1 exec { & npm run gulp -- electron } exec { & .\scripts\test.bat --build --reporter dot } diff --git a/package.json b/package.json index a5c50981cc2ff..3d3707bc48ef3 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev", "version": "1.13.0", "electronVersion": "1.6.6", - "distro": "19f52f7ed3528101860a011fa740c4167dfc2d21", + "distro": "1337efdc669776e277c7e556d33b1dd7915fcefa", "author": { "name": "Microsoft Corporation" }, From c5fcfbc1130dc539f84e367720d7dd4b07f4a32d Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 9 May 2017 16:11:30 +0200 Subject: [PATCH 0325/2747] windows build --- build/tfs/win32/compile.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build/tfs/win32/compile.ps1 b/build/tfs/win32/compile.ps1 index d75432a563915..7a962435818b6 100644 --- a/build/tfs/win32/compile.ps1 +++ b/build/tfs/win32/compile.ps1 @@ -1,5 +1,15 @@ . .\build\tfs\win32\lib.ps1 +# set agent specific npm cache +if (Test-Path env:AGENT_WORKFOLDER) { + $env:npm_config_cache = "${env:AGENT_WORKFOLDER}\npm-cache" +} + +# npm install exec { & .\scripts\npm.bat install } + +# mixin exec { & npm run gulp -- mixin } + +# compile exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-min } \ No newline at end of file From a2f424a823983af3dfdff0658e38c85f8042333f Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 9 May 2017 16:22:56 +0200 Subject: [PATCH 0326/2747] Support arbitrary data to be looped from one debug session to a restarted session fixes #26315 --- src/vs/workbench/parts/debug/common/debug.ts | 2 +- .../parts/debug/electron-browser/debugService.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debug.ts b/src/vs/workbench/parts/debug/common/debug.ts index ccee37d19f4ca..7f8c638a6864e 100644 --- a/src/vs/workbench/parts/debug/common/debug.ts +++ b/src/vs/workbench/parts/debug/common/debug.ts @@ -315,7 +315,7 @@ export interface IEnvConfig { request: string; internalConsoleOptions?: string; preLaunchTask?: string; - __restart?: boolean; + __restart?: any; debugServer?: number; noDebug?: boolean; port?: number; diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index b959668dfc6f4..19e67a5c86eec 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -318,8 +318,8 @@ export class DebugService implements debug.IDebugService { this.toDisposeOnSessionEnd.get(session.getId()).push(session.onDidTerminateDebugee(event => { aria.status(nls.localize('debuggingStopped', "Debugging stopped.")); if (session && session.getId() === event.body.sessionId) { - if (event.body && typeof event.body.restart === 'boolean' && event.body.restart && process) { - this.restartProcess(process, true).done(null, err => this.messageService.show(severity.Error, err.message)); + if (event.body && event.body.restart && process) { + this.restartProcess(process, event.body.restart).done(null, err => this.messageService.show(severity.Error, err.message)); } else { session.disconnect().done(null, errors.onUnexpectedError); } @@ -874,7 +874,7 @@ export class DebugService implements debug.IDebugService { this.model.deemphasizeSource(uri); } - public restartProcess(process: debug.IProcess, internalRestart?: boolean): TPromise { + public restartProcess(process: debug.IProcess, restartData?: any): TPromise { if (process.session.capabilities.supportsRestartRequest) { return process.session.custom('restart', null); } @@ -890,7 +890,7 @@ export class DebugService implements debug.IDebugService { // Take the type from the process since the debug extension might overwrite it #21316 config.type = process.configuration.type; config.noDebug = process.configuration.noDebug; - config.__restart = internalRestart; + config.__restart = restartData; } this.createProcess(config || process.configuration).then(() => c(null), err => e(err)); }, 300); From e20c90f3473c12e99c5a28b43e22dda1af991e33 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 9 May 2017 16:37:38 +0200 Subject: [PATCH 0327/2747] comment in spammy console.log --- src/vs/platform/theme/common/colorRegistry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 37746aef6bb24..314e9a861a2b4 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -308,7 +308,7 @@ function resolveColorValue(colorValue: ColorValue, theme: ITheme): Color { return null; } -setTimeout(_ => console.log(colorRegistry.toString()), 5000); +// setTimeout(_ => console.log(colorRegistry.toString()), 5000); From 3b32ecfc3218258958546431a27641851b0b42d1 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Tue, 9 May 2017 16:52:25 +0200 Subject: [PATCH 0328/2747] DAP: properly extend type of TerminateEvent.restart --- src/vs/workbench/parts/debug/common/debugProtocol.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/common/debugProtocol.d.ts b/src/vs/workbench/parts/debug/common/debugProtocol.d.ts index 17f87f5501608..b6b16f7ad5bff 100644 --- a/src/vs/workbench/parts/debug/common/debugProtocol.d.ts +++ b/src/vs/workbench/parts/debug/common/debugProtocol.d.ts @@ -124,7 +124,7 @@ declare module DebugProtocol { /** A debug adapter may set 'restart' to true (or to an arbitrary object) to request that the front end restarts the session. The value is not interpreted by the client and passed unmodified as an attribute '__restart' to the launchRequest. */ - restart?: boolean | object; + restart?: any; }; } @@ -1347,3 +1347,4 @@ declare module DebugProtocol { innerException?: ExceptionDetails[]; } } + From e3524b78623aba6f695f861e75e7ebe770dcb7a4 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 9 May 2017 17:03:52 +0200 Subject: [PATCH 0329/2747] first sketches of new snippet controller --- .../contrib/snippet/browser/editorSnippets.ts | 24 ++- .../snippet/browser/snippetController2.ts | 111 +++++++++++++ .../test/browser/editorSnippets.test.ts | 1 + .../test/browser/snippetController2.test.ts | 148 ++++++++++++++++++ .../test/common/mockKeybindingService.ts | 15 +- 5 files changed, 291 insertions(+), 8 deletions(-) create mode 100644 src/vs/editor/contrib/snippet/browser/snippetController2.ts create mode 100644 src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index 508e9be0afd03..5bdf6042d6984 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -39,9 +39,11 @@ class OneSnippet { } dispose(): void { - if (this._placeholderDecorations) { - this._editor.changeDecorations(accessor => this._placeholderDecorations.forEach(handle => accessor.removeDecoration(handle))); + if (!this._placeholderDecorations) { + return; } + this._editor.changeDecorations(accessor => this._placeholderDecorations.forEach(handle => accessor.removeDecoration(handle))); + this._placeholderGroups.length = 0; } private _init(): void { @@ -131,6 +133,10 @@ class OneSnippet { }); } + get isAtFirstPlaceholder() { + return this._placeholderGroupsIdx === 0; + } + get isAtFinalPlaceholder() { if (this._placeholderGroupsIdx < 0) { return false; @@ -194,17 +200,23 @@ export class SnippetSession { dispose(this._snippets); } - next(): void { + next(): boolean { const newSelections = this._move(true); if (newSelections.length > 0) { this._editor.setSelections(newSelections); + return true; + } else { + return false; } } - prev(): void { + prev(): boolean { const newSelections = this._move(false); if (newSelections.length > 0) { this._editor.setSelections(newSelections); + return true; + } else { + return false; } } @@ -217,6 +229,10 @@ export class SnippetSession { return selections; } + get isAtFirstPlaceholder() { + return this._snippets[0].isAtFirstPlaceholder; + } + get isAtFinalPlaceholder() { return this._snippets[0].isAtFinalPlaceholder; } diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts new file mode 100644 index 0000000000000..a55e4eea20aa7 --- /dev/null +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -0,0 +1,111 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; +import { commonEditorContribution } from 'vs/editor/common/editorCommonExtensions'; +import { dispose, IDisposable } from 'vs/base/common/lifecycle'; +import { SnippetSession } from './editorSnippets'; + + +@commonEditorContribution +export class SnippetController2 { + + static InSnippetMode = new RawContextKey('inSnippet', false); + static HasNextTabstop = new RawContextKey('hasNextTabstop', false); + static HasPrevTabstop = new RawContextKey('hasPrevTabstop', false); + + private readonly _inSnippet: IContextKey; + private readonly _hasNextTabstop: IContextKey; + private readonly _hasPrevTabstop: IContextKey; + + private _snippetStack: SnippetSession[] = []; + private _snippetListener: IDisposable[] = []; + + constructor( + private readonly _editor: ICommonCodeEditor, + @IContextKeyService contextKeyService: IContextKeyService + ) { + this._inSnippet = SnippetController2.InSnippetMode.bindTo(contextKeyService); + this._hasNextTabstop = SnippetController2.HasNextTabstop.bindTo(contextKeyService); + this._hasPrevTabstop = SnippetController2.HasPrevTabstop.bindTo(contextKeyService); + } + + dispose(): void { + this._inSnippet.reset(); + dispose(this._snippetStack); + } + + getId(): string { + return 'snippetController2'; + } + + insert(template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): void { + const newLen = this._snippetStack.unshift(new SnippetSession(this._editor, template)); + if (newLen === 1) { + this._inSnippet.set(true); + this._snippetListener = [this._editor.onDidChangeCursorSelection(() => this._updateState())]; + } + this._updateState(); + } + + private _updateState(): void { + if (!this._snippetStack[0].validateSelections()) { + return this.abort(); + } + + let prev = false; + let next = false; + for (let i = 0; i < this._snippetStack.length && !(prev && next); i++) { + if (!this._snippetStack[i].isAtFirstPlaceholder) { + prev = true; + } + if (!this._snippetStack[i].isAtFinalPlaceholder) { + next = true; + } + } + this._hasNextTabstop.set(next); + this._hasPrevTabstop.set(prev); + } + + abort(): void { + + // remove current, check for next + const element = this._snippetStack.shift(); + dispose(element); + + // clean up if last snippet is gone + // or validate the new active snippet + if (this._snippetStack.length === 0) { + this._inSnippet.set(false); + this._hasNextTabstop.set(false); + this._hasPrevTabstop.set(false); + this._snippetListener = dispose(this._snippetListener); + + } else { + // + this._updateState(); + } + } + + prev(): void { + for (let i = 0; i < this._snippetStack.length; i++) { + if (this._snippetStack[i].prev()) { + return; + } + } + } + + next(): void { + for (let i = 0; i < this._snippetStack.length; i++) { + if (this._snippetStack[i].next()) { + return; + } + } + } + +} diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts index 4de2f4c638730..04391cdc5a73c 100644 --- a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts @@ -34,6 +34,7 @@ suite('SnippetSession', function () { teardown(function () { model.dispose(); + editor.dispose(); }); test('normalize whitespace', function () { diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts new file mode 100644 index 0000000000000..c43ab3283b386 --- /dev/null +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts @@ -0,0 +1,148 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import { Selection } from 'vs/editor/common/core/selection'; +import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; +import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; +import { mockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; +import { Model } from "vs/editor/common/model/model"; +import { MockContextKeyService } from 'vs/platform/keybinding/test/common/mockKeybindingService'; + +suite('SnippetController2', function () { + + function assertSelections(editor: ICommonCodeEditor, ...s: Selection[]) { + for (const selection of editor.getSelections()) { + const actual = s.shift(); + assert.ok(selection.equalsSelection(actual), `actual=${selection.toString()} <> expected=${actual.toString()}`); + } + assert.equal(s.length, 0); + } + + let editor: ICommonCodeEditor; + let model: Model; + let contextKeys: MockContextKeyService; + + setup(function () { + contextKeys = new MockContextKeyService(); + model = Model.createFromString('if\n $state\nfi'); + editor = mockCodeEditor([], { model }); + editor.setSelections([new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)]); + assert.equal(model.getEOL(), '\n'); + }); + + teardown(function () { + model.dispose(); + }); + + test('creation', function () { + const ctrl = new SnippetController2(editor, contextKeys); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), false); + ctrl.dispose(); + }); + + test('insert, insert -> abort', function () { + const ctrl = new SnippetController2(editor, contextKeys); + + ctrl.insert('foo${1:bar}foo$0'); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + + ctrl.abort(); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), false); + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + }); + + test('insert, insert -> tab, tab, done', function () { + const ctrl = new SnippetController2(editor, contextKeys); + + ctrl.insert('${1:one}${2:two}$0'); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + assert.equal(SnippetController2.HasNextTabstop.getValue(contextKeys), true); + assert.equal(SnippetController2.HasPrevTabstop.getValue(contextKeys), false); + + ctrl.next(); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + assert.equal(SnippetController2.HasNextTabstop.getValue(contextKeys), true); + assert.equal(SnippetController2.HasPrevTabstop.getValue(contextKeys), true); + + ctrl.next(); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + assert.equal(SnippetController2.HasNextTabstop.getValue(contextKeys), false); + assert.equal(SnippetController2.HasPrevTabstop.getValue(contextKeys), true); + + // editor.trigger('test', 'type', { text: '\t' }); + // assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), false); + // assert.equal(SnippetController2.HasNextTabstop.getValue(contextKeys), false); + // assert.equal(SnippetController2.HasPrevTabstop.getValue(contextKeys), false); + }); + + test('insert, insert -> cursor moves out', function () { + const ctrl = new SnippetController2(editor, contextKeys); + + ctrl.insert('foo${1:bar}foo$0'); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + + // bad selection change + editor.setSelections([new Selection(1, 12, 1, 12), new Selection(2, 16, 2, 16)]); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), false); + }); + + test('insert, nested -> cursor moves out 1/2', function () { + + const ctrl = new SnippetController2(editor, contextKeys); + + ctrl.insert('foo${1:bar}foo$0'); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + + ctrl.insert('ff$1bb$0'); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + assertSelections(editor, new Selection(1, 6, 1, 6), new Selection(2, 10, 2, 10)); + + // bad selection + editor.setSelections([new Selection(3, 1, 3, 1), new Selection(1, 6, 1, 6)]); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), false); + }); + + test('insert, nested -> cursor moves out 2/2', function () { + + const ctrl = new SnippetController2(editor, contextKeys); + + ctrl.insert('foo${1:bar}foo$0'); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); + + ctrl.insert('ff$1bb$0'); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + assertSelections(editor, new Selection(1, 6, 1, 6), new Selection(2, 10, 2, 10)); + + // select outer snippet + editor.setSelections([new Selection(1, 3, 1, 3), new Selection(2, 6, 2, 6)]); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + + ctrl.next(); + assert.equal(model.getValue(), 'fooffbbfooif\n fooffbbfoo$state\nfi'); + assertSelections(editor, new Selection(1, 11, 1, 11), new Selection(2, 15, 2, 15)); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + }); + + test('insert, nested -> tab across all', function () { + const ctrl = new SnippetController2(editor, contextKeys); + + ctrl.insert('outer$1outer$0'); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + assert.equal(SnippetController2.HasNextTabstop.getValue(contextKeys), true); + assert.equal(SnippetController2.HasPrevTabstop.getValue(contextKeys), false); + + ctrl.insert('inner$1inner$0'); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + assert.equal(SnippetController2.HasNextTabstop.getValue(contextKeys), true); + // assert.equal(SnippetController2.HasPrevTabstop.getValue(contextKeys), true); + + }); +}); diff --git a/src/vs/platform/keybinding/test/common/mockKeybindingService.ts b/src/vs/platform/keybinding/test/common/mockKeybindingService.ts index 4c4e03c566ca4..a050b92656c95 100644 --- a/src/vs/platform/keybinding/test/common/mockKeybindingService.ts +++ b/src/vs/platform/keybinding/test/common/mockKeybindingService.ts @@ -38,12 +38,17 @@ class MockKeybindingContextKey implements IContextKey { } export class MockContextKeyService implements IContextKeyService { - public _serviceBrand: any; - public dispose(): void { } + public _serviceBrand: any; + private _keys = new Map>(); + public dispose(): void { + // + } public createKey(key: string, defaultValue: T): IContextKey { - return new MockKeybindingContextKey(key, defaultValue); + let ret = new MockKeybindingContextKey(key, defaultValue); + this._keys.set(key, ret); + return ret; } public contextMatchesRules(rules: ContextKeyExpr): boolean { return false; @@ -52,7 +57,9 @@ export class MockContextKeyService implements IContextKeyService { return Event.None; } public getContextKeyValue(key: string) { - return; + if (this._keys.has(key)) { + return this._keys.get(key).get(); + } } public getContext(domNode: HTMLElement): any { return null; From 2312a0a5aeb93502c5e3a7f6288bbfdcfaab54c6 Mon Sep 17 00:00:00 2001 From: Isidor Nikolic Date: Tue, 9 May 2017 17:06:10 +0200 Subject: [PATCH 0330/2747] also store and restore view state for ResourceEditorInputs (#26317) --- src/vs/workbench/browser/parts/editor/textResourceEditor.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/textResourceEditor.ts b/src/vs/workbench/browser/parts/editor/textResourceEditor.ts index 96b76b504186d..c54d7aef429ab 100644 --- a/src/vs/workbench/browser/parts/editor/textResourceEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textResourceEditor.ts @@ -10,6 +10,7 @@ import types = require('vs/base/common/types'); import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { TextEditorOptions, EditorModel, EditorInput, EditorOptions } from 'vs/workbench/common/editor'; +import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; import { BaseTextEditorModel } from 'vs/workbench/common/editor/textEditorModel'; import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput'; import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor'; @@ -118,7 +119,7 @@ export class TextResourceEditor extends BaseTextEditor { } protected restoreViewState(input: EditorInput) { - if (input instanceof UntitledEditorInput) { + if (input instanceof UntitledEditorInput || input instanceof ResourceEditorInput) { const viewState = this.loadTextEditorViewState(input.getResource().toString()); if (viewState) { this.getControl().restoreViewState(viewState); @@ -190,7 +191,7 @@ export class TextResourceEditor extends BaseTextEditor { return super.saveTextEditorViewState(arg1); } - if (arg1 instanceof UntitledEditorInput && !arg1.isDisposed()) { + if ((arg1 instanceof UntitledEditorInput || arg1 instanceof ResourceEditorInput) && !arg1.isDisposed()) { return super.saveTextEditorViewState(arg1.getResource().toString()); } } From a986ea476e11fc8a24c80cb1d9e7f1e6631da2d9 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Tue, 9 May 2017 17:08:52 +0200 Subject: [PATCH 0331/2747] Respect the arrow height when layouting exception widget. Fixes #25443. --- src/vs/workbench/parts/debug/browser/exceptionWidget.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts index 217c44353709d..7e5f967637468 100644 --- a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts +++ b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts @@ -93,7 +93,10 @@ export class ExceptionWidget extends ZoneWidget { // Reload the height with respect to the exception text content and relayout it to match the line count. this.container.style.height = 'initial'; - const computedLinesNumber = Math.ceil(this.container.offsetHeight / this.editor.getConfiguration().fontInfo.lineHeight); + const lineHeight = this.editor.getConfiguration().lineHeight; + const arrowHeight = Math.round(lineHeight / 3); + const computedLinesNumber = Math.ceil((this.container.offsetHeight + arrowHeight) / lineHeight); + this._relayout(computedLinesNumber); } } From 9ee052bf836ff653a689cff36204811cf6435433 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 9 May 2017 17:18:26 +0200 Subject: [PATCH 0332/2747] improve typing at edges --- .../contrib/snippet/browser/editorSnippets.ts | 37 +++++-------------- .../test/browser/editorSnippets.test.ts | 26 +++++++++++++ 2 files changed, 36 insertions(+), 27 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index 5bdf6042d6984..890f76942788d 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -29,7 +29,7 @@ class OneSnippet { active: { stickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges }, activeFinal: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges }, inactive: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges }, - snippet: { stickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges }, + snippet: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges }, }; constructor(editor: ICommonCodeEditor, snippet: TextmateSnippet, offset: number) { @@ -95,16 +95,15 @@ class OneSnippet { this._init(); - const prevGroupsIdx = this._placeholderGroupsIdx; + let prevGroupsIdx = -1; if (fwd && this._placeholderGroupsIdx < this._placeholderGroups.length - 1) { + prevGroupsIdx = this._placeholderGroupsIdx; this._placeholderGroupsIdx += 1; } else if (!fwd && this._placeholderGroupsIdx > 0) { + prevGroupsIdx = this._placeholderGroupsIdx; this._placeholderGroupsIdx -= 1; - - } else { - return []; } return this._editor.getModel().changeDecorations(accessor => { @@ -200,24 +199,14 @@ export class SnippetSession { dispose(this._snippets); } - next(): boolean { + next(): void { const newSelections = this._move(true); - if (newSelections.length > 0) { - this._editor.setSelections(newSelections); - return true; - } else { - return false; - } + this._editor.setSelections(newSelections); } - prev(): boolean { + prev(): void { const newSelections = this._move(false); - if (newSelections.length > 0) { - this._editor.setSelections(newSelections); - return true; - } else { - return false; - } + this._editor.setSelections(newSelections); } private _move(fwd: boolean): Selection[] { @@ -245,14 +234,8 @@ export class SnippetSession { for (const selection of selections) { let found = false; - for (const { range } of this._snippets) { - - if (!range) { - // too early, not yet initialized - return true; - } - - if (range.containsRange(selection)) { + for (const snippet of this._snippets) { + if (snippet.range.containsRange(selection)) { found = true; break; } diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts index 04391cdc5a73c..5da6689a73079 100644 --- a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts @@ -302,7 +302,33 @@ suite('SnippetSession', function () { first.next(); assert.equal(first.isAtFinalPlaceholder, true); assertSelections(editor, new Selection(1, 13, 1, 13)); + }); + + test('snippets, typing at final tabstop', function () { + + const session = new SnippetSession(editor, 'farboo$0'); + assert.equal(session.isAtFinalPlaceholder, true); + assert.equal(session.validateSelections(), true); + + editor.trigger('test', 'type', { text: 'XXX' }); + assert.equal(session.validateSelections(), false); + }); + test('snippets, typing at beginning', function () { + + editor.setSelection(new Selection(1, 2, 1, 2)); + const session = new SnippetSession(editor, 'farboo$0'); + + editor.setSelection(new Selection(1, 2, 1, 2)); + assert.equal(session.validateSelections(), true); + assert.equal(session.isAtFinalPlaceholder, true); + + editor.trigger('test', 'type', { text: 'XXX' }); + assert.equal(model.getLineContent(1), 'fXXXfarboounction foo() {'); + assert.equal(session.validateSelections(), true); + + session.next(); + assertSelections(editor, new Selection(1, 11, 1, 11)); }); }); From b7499af70443e4f616a278dd33990d41fc5f375e Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 9 May 2017 17:39:22 +0200 Subject: [PATCH 0333/2747] explit SnippetSession#insert --- .../contrib/snippet/browser/editorSnippets.ts | 22 +++++++++++-------- .../snippet/browser/snippetController2.ts | 5 +++-- .../test/browser/editorSnippets.test.ts | 19 ++++++++++++++-- 3 files changed, 33 insertions(+), 13 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index 890f76942788d..e126e1fea75ec 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -167,38 +167,42 @@ export class SnippetSession { } private readonly _editor: ICommonCodeEditor; + private readonly _template: string; private readonly _snippets: OneSnippet[]; constructor(editor: ICommonCodeEditor, template: string) { this._editor = editor; + this._template = template; this._snippets = []; + } + + dispose(): void { + dispose(this._snippets); + } + insert(): void { let delta = 0; let edits: IIdentifiedSingleEditOperation[] = []; - let model = editor.getModel(); + let model = this._editor.getModel(); - for (const selection of editor.getSelections()) { + for (const selection of this._editor.getSelections()) { const start = selection.getStartPosition(); - const adjustedTemplate = SnippetSession.normalizeWhitespace(model, start, template); + const adjustedTemplate = SnippetSession.normalizeWhitespace(model, start, this._template); const snippet = SnippetParser.parse(adjustedTemplate); const offset = model.getOffsetAt(start) + delta; edits.push(EditOperation.replaceMove(selection, snippet.text)); - this._snippets.push(new OneSnippet(editor, snippet, offset)); + this._snippets.push(new OneSnippet(this._editor, snippet, offset)); delta += snippet.text.length - model.getValueLengthInRange(selection); } // make insert edit and start with first selections - const newSelections = model.pushEditOperations(editor.getSelections(), edits, () => this._move(true)); + const newSelections = model.pushEditOperations(this._editor.getSelections(), edits, () => this._move(true)); this._editor.setSelections(newSelections); } - dispose(): void { - dispose(this._snippets); - } - next(): void { const newSelections = this._move(true); this._editor.setSelections(newSelections); diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index a55e4eea20aa7..7e9eaae9e10f8 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -45,12 +45,13 @@ export class SnippetController2 { } insert(template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): void { - const newLen = this._snippetStack.unshift(new SnippetSession(this._editor, template)); + const session = new SnippetSession(this._editor, template); + const newLen = this._snippetStack.unshift(session); if (newLen === 1) { this._inSnippet.set(true); this._snippetListener = [this._editor.onDidChangeCursorSelection(() => this._updateState())]; } - this._updateState(); + session.insert(); } private _updateState(): void { diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts index 5da6689a73079..9e6ea7b1b23fa 100644 --- a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts @@ -53,6 +53,7 @@ suite('SnippetSession', function () { test('text edits & selection', function () { const session = new SnippetSession(editor, 'foo${1:bar}foo$0'); + session.insert(); assert.equal(editor.getModel().getValue(), 'foobarfoofunction foo() {\n foobarfooconsole.log(a);\n}'); assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); @@ -62,6 +63,7 @@ suite('SnippetSession', function () { test('snippets, repeated tabstops', function () { const session = new SnippetSession(editor, '${1:abc}foo${1:abc}$0'); + session.insert(); assertSelections(editor, new Selection(1, 1, 1, 4), new Selection(1, 7, 1, 10), new Selection(2, 5, 2, 8), new Selection(2, 11, 2, 14), @@ -76,6 +78,7 @@ suite('SnippetSession', function () { test('snippets, selections and new text with newlines', () => { const session = new SnippetSession(editor, 'foo\n\t${1:bar}\n$0'); + session.insert(); assert.equal(editor.getModel().getValue(), 'foo\n bar\nfunction foo() {\n foo\n bar\nconsole.log(a);\n}'); @@ -88,6 +91,7 @@ suite('SnippetSession', function () { test('snippets, selections -> next/prev', () => { const session = new SnippetSession(editor, 'f$1oo${2:bar}foo$0'); + session.insert(); // @ $2 assertSelections(editor, new Selection(1, 2, 1, 2), new Selection(2, 6, 2, 6)); @@ -107,6 +111,7 @@ suite('SnippetSession', function () { test('snippets, selections & typing', function () { const session = new SnippetSession(editor, 'f${1:oo}_$2_$0'); + session.insert(); editor.trigger('test', 'type', { text: 'X' }); session.next(); @@ -130,7 +135,7 @@ suite('SnippetSession', function () { model.setValue('foo_bar_foo'); editor.setSelections([new Selection(1, 1, 1, 4), new Selection(1, 9, 1, 12)]); - new SnippetSession(editor, 'x$0'); + new SnippetSession(editor, 'x$0').insert(); assert.equal(model.getValue(), 'x_bar_x'); assertSelections(editor, new Selection(1, 2, 1, 2), new Selection(1, 8, 1, 8)); }); @@ -139,7 +144,7 @@ suite('SnippetSession', function () { model.setValue('foo_bar_foo'); editor.setSelections([new Selection(1, 1, 1, 4), new Selection(1, 9, 1, 12)]); - new SnippetSession(editor, 'LONGER$0'); + new SnippetSession(editor, 'LONGER$0').insert(); assert.equal(model.getValue(), 'LONGER_bar_LONGER'); assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(1, 18, 1, 18)); }); @@ -148,6 +153,7 @@ suite('SnippetSession', function () { model.setValue('foo_zzz_foo'); editor.setSelection(new Selection(1, 5, 1, 8)); const session = new SnippetSession(editor, '$1bar$0'); + session.insert(); assertSelections(editor, new Selection(1, 5, 1, 5)); editor.trigger('test', 'type', { text: 'foo-' }); @@ -167,6 +173,7 @@ suite('SnippetSession', function () { test('snippets, don\'t merge touching tabstops 1/2', function () { const session = new SnippetSession(editor, '$1$2$3$0'); + session.insert(); assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); session.next(); @@ -204,6 +211,7 @@ suite('SnippetSession', function () { test('snippets, don\'t merge touching tabstops 2/2', function () { const session = new SnippetSession(editor, '$1$2$3$0'); + session.insert(); assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); editor.trigger('test', 'type', { text: '111' }); @@ -222,6 +230,7 @@ suite('SnippetSession', function () { test('snippets, gracefully move over final tabstop', function () { const session = new SnippetSession(editor, '${1}bar$0'); + session.insert(); assert.equal(session.isAtFinalPlaceholder, false); assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); @@ -237,6 +246,7 @@ suite('SnippetSession', function () { test('snippets, overwriting nested placeholder', function () { const session = new SnippetSession(editor, 'log(${1:"$2"});$0'); + session.insert(); assertSelections(editor, new Selection(1, 5, 1, 7), new Selection(2, 9, 2, 11)); editor.trigger('test', 'type', { text: 'XXX' }); @@ -253,6 +263,7 @@ suite('SnippetSession', function () { test('snippets, selections and snippet ranges', function () { const session = new SnippetSession(editor, '${1:foo}farboo${2:bar}$0'); + session.insert(); assert.equal(model.getValue(), 'foofarboobarfunction foo() {\n foofarboobarconsole.log(a);\n}'); assertSelections(editor, new Selection(1, 1, 1, 4), new Selection(2, 5, 2, 8)); @@ -288,10 +299,12 @@ suite('SnippetSession', function () { editor.setSelection(new Selection(1, 1, 1, 1)); const first = new SnippetSession(editor, 'foo${2:bar}foo$0'); + first.insert(); assert.equal(model.getValue(), 'foobarfoo'); assertSelections(editor, new Selection(1, 4, 1, 7)); const second = new SnippetSession(editor, 'ba${1:zzzz}$0'); + second.insert(); assert.equal(model.getValue(), 'foobazzzzfoo'); assertSelections(editor, new Selection(1, 6, 1, 10)); @@ -307,6 +320,7 @@ suite('SnippetSession', function () { test('snippets, typing at final tabstop', function () { const session = new SnippetSession(editor, 'farboo$0'); + session.insert(); assert.equal(session.isAtFinalPlaceholder, true); assert.equal(session.validateSelections(), true); @@ -318,6 +332,7 @@ suite('SnippetSession', function () { editor.setSelection(new Selection(1, 2, 1, 2)); const session = new SnippetSession(editor, 'farboo$0'); + session.insert(); editor.setSelection(new Selection(1, 2, 1, 2)); assert.equal(session.validateSelections(), true); From 28f70d51164fbb6468c40eda536e70c660956665 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 9 May 2017 17:42:26 +0200 Subject: [PATCH 0334/2747] Simplify view model event handling --- src/vs/editor/common/commonCodeEditor.ts | 24 +- .../common/viewModel/splitLinesCollection.ts | 1179 ++++++++--------- .../common/viewModel/viewModelDecorations.ts | 1 - .../editor/common/viewModel/viewModelImpl.ts | 338 ++--- .../test/common/viewModel/testViewModel.ts | 24 +- 5 files changed, 734 insertions(+), 832 deletions(-) diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index 63609ca09a274..b3d0d0f0ce0e5 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -18,8 +18,6 @@ import { Position, IPosition } from 'vs/editor/common/core/position'; import { Range, IRange } from 'vs/editor/common/core/range'; import { Selection, ISelection } from 'vs/editor/common/core/selection'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { CharacterHardWrappingLineMapperFactory } from 'vs/editor/common/viewModel/characterHardWrappingLineMapper'; -import { SplitLinesCollection } from 'vs/editor/common/viewModel/splitLinesCollection'; import { ViewModel } from 'vs/editor/common/viewModel/viewModelImpl'; import { hash } from 'vs/base/common/hash'; import { EditorModeContext } from 'vs/editor/common/modes/editorModeContext'; @@ -752,27 +750,7 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo this.model.onBeforeAttached(); - let hardWrappingLineMapperFactory = new CharacterHardWrappingLineMapperFactory( - this._configuration.editor.wrappingInfo.wordWrapBreakBeforeCharacters, - this._configuration.editor.wrappingInfo.wordWrapBreakAfterCharacters, - this._configuration.editor.wrappingInfo.wordWrapBreakObtrusiveCharacters - ); - - let linesCollection = new SplitLinesCollection( - this.model, - hardWrappingLineMapperFactory, - this.model.getOptions().tabSize, - this._configuration.editor.wrappingInfo.wrappingColumn, - this._configuration.editor.fontInfo.typicalFullwidthCharacterWidth / this._configuration.editor.fontInfo.typicalHalfwidthCharacterWidth, - this._configuration.editor.wrappingInfo.wrappingIndent - ); - - this.viewModel = new ViewModel( - linesCollection, - this.id, - this._configuration, - this.model - ); + this.viewModel = new ViewModel(this.id, this._configuration, this.model); let viewModelHelper: IViewModelHelper = { viewModel: this.viewModel, diff --git a/src/vs/editor/common/viewModel/splitLinesCollection.ts b/src/vs/editor/common/viewModel/splitLinesCollection.ts index 6ac00757566e4..322cc3aa6c745 100644 --- a/src/vs/editor/common/viewModel/splitLinesCollection.ts +++ b/src/vs/editor/common/viewModel/splitLinesCollection.ts @@ -57,803 +57,794 @@ export interface ISplitLine { getViewPositionOfModelPosition(deltaLineNumber: number, inputColumn: number): Position; } -class VisibleIdentitySplitLine implements ISplitLine { - - public static INSTANCE = new VisibleIdentitySplitLine(); +export class SplitLinesCollection { - private constructor() { } + private model: editorCommon.IModel; + private _validModelVersionId: number; - public isVisible(): boolean { - return true; - } + private wrappingColumn: number; + private columnsForFullWidthChar: number; + private wrappingIndent: WrappingIndent; + private tabSize: number; + private lines: ISplitLine[]; - public setVisible(isVisible: boolean): ISplitLine { - if (isVisible) { - return this; - } - return InvisibleIdentitySplitLine.INSTANCE; - } + private prefixSumComputer: PrefixSumComputerWithCache; - public getViewLineCount(): number { - return 1; - } + private linePositionMapperFactory: ILineMapperFactory; - public getViewLineContent(model: IModel, modelLineNumber: number, outputLineIndex: number): string { - return model.getLineContent(modelLineNumber); - } + private hiddenAreasIds: string[]; - public getViewLineMinColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { - return model.getLineMinColumn(modelLineNumber); - } + constructor(model: editorCommon.IModel, linePositionMapperFactory: ILineMapperFactory, tabSize: number, wrappingColumn: number, columnsForFullWidthChar: number, wrappingIndent: WrappingIndent) { + this.model = model; + this._validModelVersionId = -1; + this.tabSize = tabSize; + this.wrappingColumn = wrappingColumn; + this.columnsForFullWidthChar = columnsForFullWidthChar; + this.wrappingIndent = wrappingIndent; + this.linePositionMapperFactory = linePositionMapperFactory; - public getViewLineMaxColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { - return model.getLineMaxColumn(modelLineNumber); + this._constructLines(true); } - public getViewLineData(model: IModel, modelLineNumber: number, outputLineIndex: number): ViewLineData { - let lineTokens = model.getLineTokens(modelLineNumber); - let lineContent = lineTokens.getLineContent(); - return new ViewLineData( - lineContent, - 1, - lineContent.length + 1, - lineTokens.inflate() - ); + public dispose(): void { + this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, []); } - public getViewLinesData(model: IModel, modelLineNumber: number, fromOuputLineIndex: number, toOutputLineIndex: number, globalStartIndex: number, needed: boolean[], result: ViewLineData[]): void { - if (!needed[globalStartIndex]) { - result[globalStartIndex] = null; - return; + private _ensureValidState(): void { + let modelVersion = this.model.getVersionId(); + if (modelVersion !== this._validModelVersionId) { + throw new Error('SplitLinesCollection: attempt to access a \'newer\' model'); } - result[globalStartIndex] = this.getViewLineData(model, modelLineNumber, 0); } - public getModelColumnOfViewPosition(outputLineIndex: number, outputColumn: number): number { - return outputColumn; - } + private _constructLines(resetHiddenAreas: boolean): void { + this.lines = []; - public getViewPositionOfModelPosition(deltaLineNumber: number, inputColumn: number): Position { - return new Position(deltaLineNumber, inputColumn); - } -} + if (resetHiddenAreas) { + this.hiddenAreasIds = []; + } -class InvisibleIdentitySplitLine implements ISplitLine { + let linesContent = this.model.getLinesContent(); + let lineCount = linesContent.length; + let values = new Uint32Array(lineCount); - public static INSTANCE = new InvisibleIdentitySplitLine(); + let hiddenAreas = this.hiddenAreasIds.map((areaId) => this.model.getDecorationRange(areaId)).sort(Range.compareRangesUsingStarts); + let hiddenAreaStart = 1, hiddenAreaEnd = 0; + let hiddenAreaIdx = -1; + let nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : lineCount + 2; - private constructor() { } + for (let i = 0; i < lineCount; i++) { + let lineNumber = i + 1; - public isVisible(): boolean { - return false; - } + if (lineNumber === nextLineNumberToUpdateHiddenArea) { + hiddenAreaIdx++; + hiddenAreaStart = hiddenAreas[hiddenAreaIdx].startLineNumber; + hiddenAreaEnd = hiddenAreas[hiddenAreaIdx].endLineNumber; + nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : lineCount + 2; + } - public setVisible(isVisible: boolean): ISplitLine { - if (!isVisible) { - return this; + let isInHiddenArea = (lineNumber >= hiddenAreaStart && lineNumber <= hiddenAreaEnd); + let line = createSplitLine(this.linePositionMapperFactory, linesContent[i], this.tabSize, this.wrappingColumn, this.columnsForFullWidthChar, this.wrappingIndent, !isInHiddenArea); + values[i] = line.getViewLineCount(); + this.lines[i] = line; } - return VisibleIdentitySplitLine.INSTANCE; - } - public getViewLineCount(): number { - return 0; - } + this._validModelVersionId = this.model.getVersionId(); - public getViewLineContent(model: IModel, modelLineNumber: number, outputLineIndex: number): string { - throw new Error('Not supported'); + this.prefixSumComputer = new PrefixSumComputerWithCache(values); } - public getViewLineMinColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { - throw new Error('Not supported'); + private getHiddenAreas(): Range[] { + return this.hiddenAreasIds.map((decId) => { + return this.model.getDecorationRange(decId); + }).sort(Range.compareRangesUsingStarts); } - public getViewLineMaxColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { - throw new Error('Not supported'); - } + private _reduceRanges(_ranges: Range[]): Range[] { + if (_ranges.length === 0) { + return []; + } + let ranges = _ranges.map(r => this.model.validateRange(r)).sort(Range.compareRangesUsingStarts); - public getViewLineData(model: IModel, modelLineNumber: number, outputLineIndex: number): ViewLineData { - throw new Error('Not supported'); - } + let result: Range[] = []; + let currentRangeStart = ranges[0].startLineNumber; + let currentRangeEnd = ranges[0].endLineNumber; - public getViewLinesData(model: IModel, modelLineNumber: number, fromOuputLineIndex: number, toOutputLineIndex: number, globalStartIndex: number, needed: boolean[], result: ViewLineData[]): void { - throw new Error('Not supported'); - } + for (let i = 1, len = ranges.length; i < len; i++) { + let range = ranges[i]; - public getModelColumnOfViewPosition(outputLineIndex: number, outputColumn: number): number { - throw new Error('Not supported'); + if (range.startLineNumber > currentRangeEnd + 1) { + result.push(new Range(currentRangeStart, 1, currentRangeEnd, 1)); + currentRangeStart = range.startLineNumber; + currentRangeEnd = range.endLineNumber; + } else if (range.endLineNumber > currentRangeEnd) { + currentRangeEnd = range.endLineNumber; + } + } + result.push(new Range(currentRangeStart, 1, currentRangeEnd, 1)); + return result; } - public getViewPositionOfModelPosition(deltaLineNumber: number, inputColumn: number): Position { - throw new Error('Not supported'); - } -} + public setHiddenAreas(eventsCollector: ViewEventsCollector, _ranges: Range[]): boolean { -export class SplitLine implements ISplitLine { + let newRanges = this._reduceRanges(_ranges); - private positionMapper: ILineMapping; - private outputLineCount: number; + // BEGIN TODO@Martin: Please stop calling this method on each model change! + let oldRanges = this.hiddenAreasIds.map((areaId) => this.model.getDecorationRange(areaId)).sort(Range.compareRangesUsingStarts); - private wrappedIndent: string; - private wrappedIndentLength: number; - private _isVisible: boolean; + if (newRanges.length === oldRanges.length) { + let hasDifference = false; + for (let i = 0; i < newRanges.length; i++) { + if (!newRanges[i].equalsRange(oldRanges[i])) { + hasDifference = true; + break; + } + } + if (!hasDifference) { + return false; + } + } + // END TODO@Martin: Please stop calling this method on each model change! - constructor(positionMapper: ILineMapping, isVisible: boolean) { - this.positionMapper = positionMapper; - this.wrappedIndent = this.positionMapper.getWrappedLinesIndent(); - this.wrappedIndentLength = this.wrappedIndent.length; - this.outputLineCount = this.positionMapper.getOutputLineCount(); - this._isVisible = isVisible; - } + let newDecorations: editorCommon.IModelDeltaDecoration[] = []; + for (let i = 0; i < newRanges.length; i++) { + newDecorations.push({ + range: newRanges[i], + options: { + } + }); + } - public isVisible(): boolean { - return this._isVisible; - } + this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, newDecorations); - public setVisible(isVisible: boolean): ISplitLine { - this._isVisible = isVisible; - return this; - } + let hiddenAreas = newRanges; + let hiddenAreaStart = 1, hiddenAreaEnd = 0; + let hiddenAreaIdx = -1; + let nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : this.lines.length + 2; - public getViewLineCount(): number { - if (!this._isVisible) { - return 0; + for (let i = 0; i < this.lines.length; i++) { + let lineNumber = i + 1; + + if (lineNumber === nextLineNumberToUpdateHiddenArea) { + hiddenAreaIdx++; + hiddenAreaStart = hiddenAreas[hiddenAreaIdx].startLineNumber; + hiddenAreaEnd = hiddenAreas[hiddenAreaIdx].endLineNumber; + nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : this.lines.length + 2; + } + + let lineChanged = false; + if (lineNumber >= hiddenAreaStart && lineNumber <= hiddenAreaEnd) { + // Line should be hidden + if (this.lines[i].isVisible()) { + this.lines[i] = this.lines[i].setVisible(false); + lineChanged = true; + } + } else { + // Line should be visible + if (!this.lines[i].isVisible()) { + this.lines[i] = this.lines[i].setVisible(true); + lineChanged = true; + } + } + if (lineChanged) { + let newOutputLineCount = this.lines[i].getViewLineCount(); + this.prefixSumComputer.changeValue(i, newOutputLineCount); + } } - return this.outputLineCount; - } - private getInputStartOffsetOfOutputLineIndex(outputLineIndex: number): number { - return this.positionMapper.getInputOffsetOfOutputPosition(outputLineIndex, 0); + eventsCollector.emit(new viewEvents.ViewFlushedEvent()); + return true; } - private getInputEndOffsetOfOutputLineIndex(model: IModel, modelLineNumber: number, outputLineIndex: number): number { - if (outputLineIndex + 1 === this.outputLineCount) { - return model.getLineMaxColumn(modelLineNumber) - 1; + public modelPositionIsVisible(modelLineNumber: number, modelColumn: number): boolean { + if (modelLineNumber < 1 || modelLineNumber > this.lines.length) { + // invalid arguments + return false; } - return this.positionMapper.getInputOffsetOfOutputPosition(outputLineIndex + 1, 0); + return this.lines[modelLineNumber - 1].isVisible(); } - public getViewLineContent(model: IModel, modelLineNumber: number, outputLineIndex: number): string { - if (!this._isVisible) { - throw new Error('Not supported'); + public setTabSize(eventsCollector: ViewEventsCollector, newTabSize: number): boolean { + if (this.tabSize === newTabSize) { + return false; } - let startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex); - let endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex); - let r = model.getLineContent(modelLineNumber).substring(startOffset, endOffset); + this.tabSize = newTabSize; - if (outputLineIndex > 0) { - r = this.wrappedIndent + r; - } + this._constructLines(false); + eventsCollector.emit(new viewEvents.ViewFlushedEvent()); - return r; + return true; } - public getViewLineMinColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { - if (!this._isVisible) { - throw new Error('Not supported'); - } - if (outputLineIndex > 0) { - return this.wrappedIndentLength + 1; + public setWrappingSettings(eventsCollector: ViewEventsCollector, wrappingIndent: WrappingIndent, wrappingColumn: number, columnsForFullWidthChar: number): boolean { + if (this.wrappingIndent === wrappingIndent && this.wrappingColumn === wrappingColumn && this.columnsForFullWidthChar === columnsForFullWidthChar) { + return false; } - return 1; - } - public getViewLineMaxColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { - if (!this._isVisible) { - throw new Error('Not supported'); - } - return this.getViewLineContent(model, modelLineNumber, outputLineIndex).length + 1; - } + this.wrappingIndent = wrappingIndent; + this.wrappingColumn = wrappingColumn; + this.columnsForFullWidthChar = columnsForFullWidthChar; - public getViewLineData(model: IModel, modelLineNumber: number, outputLineIndex: number): ViewLineData { - if (!this._isVisible) { - throw new Error('Not supported'); - } + this._constructLines(false); + eventsCollector.emit(new viewEvents.ViewFlushedEvent()); - let startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex); - let endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex); + return true; + } - let lineContent = model.getLineContent(modelLineNumber).substring(startOffset, endOffset); - if (outputLineIndex > 0) { - lineContent = this.wrappedIndent + lineContent; + public onModelFlushed(eventsCollector: ViewEventsCollector): void { + this._constructLines(true); + eventsCollector.emit(new viewEvents.ViewFlushedEvent()); + } + + public onModelLinesDeleted(eventsCollector: ViewEventsCollector, versionId: number, fromLineNumber: number, toLineNumber: number): void { + if (versionId <= this._validModelVersionId) { + // Here we check for versionId in case the lines were reconstructed in the meantime. + // We don't want to apply stale change events on top of a newer read model state. + return; } - let minColumn = (outputLineIndex > 0 ? this.wrappedIndentLength + 1 : 1); - let maxColumn = lineContent.length + 1; + let outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1); + let outputToLineNumber = this.prefixSumComputer.getAccumulatedValue(toLineNumber - 1); - let deltaStartIndex = 0; - if (outputLineIndex > 0) { - deltaStartIndex = this.wrappedIndentLength; - } - let lineTokens = model.getLineTokens(modelLineNumber); + this.lines.splice(fromLineNumber - 1, toLineNumber - fromLineNumber + 1); + this.prefixSumComputer.removeValues(fromLineNumber - 1, toLineNumber - fromLineNumber + 1); - return new ViewLineData( - lineContent, - minColumn, - maxColumn, - lineTokens.sliceAndInflate(startOffset, endOffset, deltaStartIndex) - ); + eventsCollector.emit(new viewEvents.ViewLinesDeletedEvent(outputFromLineNumber, outputToLineNumber)); } - public getViewLinesData(model: IModel, modelLineNumber: number, fromOuputLineIndex: number, toOutputLineIndex: number, globalStartIndex: number, needed: boolean[], result: ViewLineData[]): void { - if (!this._isVisible) { - throw new Error('Not supported'); + public onModelLinesInserted(eventsCollector: ViewEventsCollector, versionId: number, fromLineNumber: number, toLineNumber: number, text: string[]): void { + if (versionId <= this._validModelVersionId) { + // Here we check for versionId in case the lines were reconstructed in the meantime. + // We don't want to apply stale change events on top of a newer read model state. + return; } - for (let outputLineIndex = fromOuputLineIndex; outputLineIndex < toOutputLineIndex; outputLineIndex++) { - let globalIndex = globalStartIndex + outputLineIndex - fromOuputLineIndex; - if (!needed[globalIndex]) { - result[globalIndex] = null; - continue; + let hiddenAreas = this.getHiddenAreas(); + let isInHiddenArea = false; + let testPosition = new Position(fromLineNumber, 1); + for (let i = 0; i < hiddenAreas.length; i++) { + if (hiddenAreas[i].containsPosition(testPosition)) { + isInHiddenArea = true; + break; } - result[globalIndex] = this.getViewLineData(model, modelLineNumber, outputLineIndex); } - } - public getModelColumnOfViewPosition(outputLineIndex: number, outputColumn: number): number { - if (!this._isVisible) { - throw new Error('Not supported'); - } - let adjustedColumn = outputColumn - 1; - if (outputLineIndex > 0) { - if (adjustedColumn < this.wrappedIndentLength) { - adjustedColumn = 0; - } else { - adjustedColumn -= this.wrappedIndentLength; - } - } - return this.positionMapper.getInputOffsetOfOutputPosition(outputLineIndex, adjustedColumn) + 1; - } + let outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1); - public getViewPositionOfModelPosition(deltaLineNumber: number, inputColumn: number): Position { - if (!this._isVisible) { - throw new Error('Not supported'); - } - let r = this.positionMapper.getOutputPositionOfInputOffset(inputColumn - 1); - let outputLineIndex = r.outputLineIndex; - let outputColumn = r.outputOffset + 1; + let totalOutputLineCount = 0; + let insertLines: ISplitLine[] = []; + let insertPrefixSumValues = new Uint32Array(text.length); - if (outputLineIndex > 0) { - outputColumn += this.wrappedIndentLength; + for (let i = 0, len = text.length; i < len; i++) { + let line = createSplitLine(this.linePositionMapperFactory, text[i], this.tabSize, this.wrappingColumn, this.columnsForFullWidthChar, this.wrappingIndent, !isInHiddenArea); + insertLines.push(line); + + let outputLineCount = line.getViewLineCount(); + totalOutputLineCount += outputLineCount; + insertPrefixSumValues[i] = outputLineCount; } - // console.log('in -> out ' + deltaLineNumber + ',' + inputColumn + ' ===> ' + (deltaLineNumber+outputLineIndex) + ',' + outputColumn); - return new Position(deltaLineNumber + outputLineIndex, outputColumn); + this.lines = this.lines.slice(0, fromLineNumber - 1).concat(insertLines).concat(this.lines.slice(fromLineNumber - 1)); + + this.prefixSumComputer.insertValues(fromLineNumber - 1, insertPrefixSumValues); + + eventsCollector.emit(new viewEvents.ViewLinesInsertedEvent(outputFromLineNumber, outputFromLineNumber + totalOutputLineCount - 1)); } -} -function createSplitLine(linePositionMapperFactory: ILineMapperFactory, text: string, tabSize: number, wrappingColumn: number, columnsForFullWidthChar: number, wrappingIndent: WrappingIndent, isVisible: boolean): ISplitLine { - let positionMapper = linePositionMapperFactory.createLineMapping(text, tabSize, wrappingColumn, columnsForFullWidthChar, wrappingIndent); - if (positionMapper === null) { - // No mapping needed - if (isVisible) { - return VisibleIdentitySplitLine.INSTANCE; + public onModelLineChanged(eventsCollector: ViewEventsCollector, versionId: number, lineNumber: number, newText: string): boolean { + if (versionId <= this._validModelVersionId) { + // Here we check for versionId in case the lines were reconstructed in the meantime. + // We don't want to apply stale change events on top of a newer read model state. + return false; } - return InvisibleIdentitySplitLine.INSTANCE; - } else { - return new SplitLine(positionMapper, isVisible); - } -} -export class SplitLinesCollection { + let lineIndex = lineNumber - 1; - private model: editorCommon.IModel; - private _validModelVersionId: number; + let oldOutputLineCount = this.lines[lineIndex].getViewLineCount(); + let isVisible = this.lines[lineIndex].isVisible(); + let line = createSplitLine(this.linePositionMapperFactory, newText, this.tabSize, this.wrappingColumn, this.columnsForFullWidthChar, this.wrappingIndent, isVisible); + this.lines[lineIndex] = line; + let newOutputLineCount = this.lines[lineIndex].getViewLineCount(); - private wrappingColumn: number; - private columnsForFullWidthChar: number; - private wrappingIndent: WrappingIndent; - private tabSize: number; - private lines: ISplitLine[]; + let lineMappingChanged = false; + let changeFrom = 0; + let changeTo = -1; + let insertFrom = 0; + let insertTo = -1; + let deleteFrom = 0; + let deleteTo = -1; - private prefixSumComputer: PrefixSumComputerWithCache; + if (oldOutputLineCount > newOutputLineCount) { + changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1); + changeTo = changeFrom + newOutputLineCount - 1; + deleteFrom = changeTo + 1; + deleteTo = deleteFrom + (oldOutputLineCount - newOutputLineCount) - 1; + lineMappingChanged = true; + } else if (oldOutputLineCount < newOutputLineCount) { + changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1); + changeTo = changeFrom + oldOutputLineCount - 1; + insertFrom = changeTo + 1; + insertTo = insertFrom + (newOutputLineCount - oldOutputLineCount) - 1; + lineMappingChanged = true; + } else { + changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1); + changeTo = changeFrom + newOutputLineCount - 1; + } - private linePositionMapperFactory: ILineMapperFactory; + this.prefixSumComputer.changeValue(lineIndex, newOutputLineCount); - private hiddenAreasIds: string[]; + if (changeFrom <= changeTo) { + eventsCollector.emit(new viewEvents.ViewLinesChangedEvent(changeFrom, changeTo)); + } + if (insertFrom <= insertTo) { + eventsCollector.emit(new viewEvents.ViewLinesInsertedEvent(insertFrom, insertTo)); + } + if (deleteFrom <= deleteTo) { + eventsCollector.emit(new viewEvents.ViewLinesDeletedEvent(deleteFrom, deleteTo)); + } - constructor(model: editorCommon.IModel, linePositionMapperFactory: ILineMapperFactory, tabSize: number, wrappingColumn: number, columnsForFullWidthChar: number, wrappingIndent: WrappingIndent) { - this.model = model; - this._validModelVersionId = -1; - this.tabSize = tabSize; - this.wrappingColumn = wrappingColumn; - this.columnsForFullWidthChar = columnsForFullWidthChar; - this.wrappingIndent = wrappingIndent; - this.linePositionMapperFactory = linePositionMapperFactory; + return lineMappingChanged; + } - this._constructLines(true); + public acceptVersionId(versionId: number): void { + this._validModelVersionId = versionId; } - public dispose(): void { - this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, []); + public getViewLineCount(): number { + this._ensureValidState(); + return this.prefixSumComputer.getTotalValue(); } - private _ensureValidState(): void { - let modelVersion = this.model.getVersionId(); - if (modelVersion !== this._validModelVersionId) { - throw new Error('SplitLinesCollection: attempt to access a \'newer\' model'); + private _toValidViewLineNumber(viewLineNumber: number): number { + if (viewLineNumber < 1) { + return 1; + } + let viewLineCount = this.getViewLineCount(); + if (viewLineNumber > viewLineCount) { + return viewLineCount; } + return viewLineNumber; } - private _constructLines(resetHiddenAreas: boolean): void { - this.lines = []; + /** + * Gives a hint that a lot of requests are about to come in for these line numbers. + */ + public warmUpLookupCache(viewStartLineNumber: number, viewEndLineNumber: number): void { + this.prefixSumComputer.warmUpCache(viewStartLineNumber - 1, viewEndLineNumber - 1); + } - if (resetHiddenAreas) { - this.hiddenAreasIds = []; - } + public getViewLineIndentGuide(viewLineNumber: number): number { + this._ensureValidState(); + viewLineNumber = this._toValidViewLineNumber(viewLineNumber); + let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); + return this.model.getLineIndentGuide(r.index + 1); + } - let linesContent = this.model.getLinesContent(); - let lineCount = linesContent.length; - let values = new Uint32Array(lineCount); + public getViewLineContent(viewLineNumber: number): string { + this._ensureValidState(); + viewLineNumber = this._toValidViewLineNumber(viewLineNumber); + let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); + let lineIndex = r.index; + let remainder = r.remainder; - let hiddenAreas = this.hiddenAreasIds.map((areaId) => this.model.getDecorationRange(areaId)).sort(Range.compareRangesUsingStarts); - let hiddenAreaStart = 1, hiddenAreaEnd = 0; - let hiddenAreaIdx = -1; - let nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : lineCount + 2; - - for (let i = 0; i < lineCount; i++) { - let lineNumber = i + 1; + return this.lines[lineIndex].getViewLineContent(this.model, lineIndex + 1, remainder); + } - if (lineNumber === nextLineNumberToUpdateHiddenArea) { - hiddenAreaIdx++; - hiddenAreaStart = hiddenAreas[hiddenAreaIdx].startLineNumber; - hiddenAreaEnd = hiddenAreas[hiddenAreaIdx].endLineNumber; - nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : lineCount + 2; - } + public getViewLineMinColumn(viewLineNumber: number): number { + this._ensureValidState(); + viewLineNumber = this._toValidViewLineNumber(viewLineNumber); + let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); + let lineIndex = r.index; + let remainder = r.remainder; - let isInHiddenArea = (lineNumber >= hiddenAreaStart && lineNumber <= hiddenAreaEnd); - let line = createSplitLine(this.linePositionMapperFactory, linesContent[i], this.tabSize, this.wrappingColumn, this.columnsForFullWidthChar, this.wrappingIndent, !isInHiddenArea); - values[i] = line.getViewLineCount(); - this.lines[i] = line; - } + return this.lines[lineIndex].getViewLineMinColumn(this.model, lineIndex + 1, remainder); + } - this._validModelVersionId = this.model.getVersionId(); + public getViewLineMaxColumn(viewLineNumber: number): number { + this._ensureValidState(); + viewLineNumber = this._toValidViewLineNumber(viewLineNumber); + let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); + let lineIndex = r.index; + let remainder = r.remainder; - this.prefixSumComputer = new PrefixSumComputerWithCache(values); + return this.lines[lineIndex].getViewLineMaxColumn(this.model, lineIndex + 1, remainder); } - private getHiddenAreas(): Range[] { - return this.hiddenAreasIds.map((decId) => { - return this.model.getDecorationRange(decId); - }).sort(Range.compareRangesUsingStarts); + public getViewLineData(viewLineNumber: number): ViewLineData { + this._ensureValidState(); + viewLineNumber = this._toValidViewLineNumber(viewLineNumber); + let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); + let lineIndex = r.index; + let remainder = r.remainder; + + return this.lines[lineIndex].getViewLineData(this.model, lineIndex + 1, remainder); } - private _reduceRanges(_ranges: Range[]): Range[] { - if (_ranges.length === 0) { - return []; - } - let ranges = _ranges.map(r => this.model.validateRange(r)).sort(Range.compareRangesUsingStarts); + public getViewLinesData(viewStartLineNumber: number, viewEndLineNumber: number, needed: boolean[]): ViewLineData[] { + this._ensureValidState(); - let result: Range[] = []; - let currentRangeStart = ranges[0].startLineNumber; - let currentRangeEnd = ranges[0].endLineNumber; + viewStartLineNumber = this._toValidViewLineNumber(viewStartLineNumber); + viewEndLineNumber = this._toValidViewLineNumber(viewEndLineNumber); - for (let i = 1, len = ranges.length; i < len; i++) { - let range = ranges[i]; + let start = this.prefixSumComputer.getIndexOf(viewStartLineNumber - 1); + let viewLineNumber = viewStartLineNumber; + let startModelLineIndex = start.index; + let startRemainder = start.remainder; - if (range.startLineNumber > currentRangeEnd + 1) { - result.push(new Range(currentRangeStart, 1, currentRangeEnd, 1)); - currentRangeStart = range.startLineNumber; - currentRangeEnd = range.endLineNumber; - } else if (range.endLineNumber > currentRangeEnd) { - currentRangeEnd = range.endLineNumber; + let result: ViewLineData[] = []; + for (let modelLineIndex = startModelLineIndex, len = this.model.getLineCount(); modelLineIndex < len; modelLineIndex++) { + let line = this.lines[modelLineIndex]; + if (!line.isVisible()) { + continue; } - } - result.push(new Range(currentRangeStart, 1, currentRangeEnd, 1)); - return result; - } + let fromViewLineIndex = (modelLineIndex === startModelLineIndex ? startRemainder : 0); + let remainingViewLineCount = line.getViewLineCount() - fromViewLineIndex; - public setHiddenAreas(eventsCollector: ViewEventsCollector, _ranges: Range[]): boolean { + let lastLine = false; + if (viewLineNumber + remainingViewLineCount > viewEndLineNumber) { + lastLine = true; + remainingViewLineCount = viewEndLineNumber - viewLineNumber + 1; + } + let toViewLineIndex = fromViewLineIndex + remainingViewLineCount; - let newRanges = this._reduceRanges(_ranges); + line.getViewLinesData(this.model, modelLineIndex + 1, fromViewLineIndex, toViewLineIndex, viewLineNumber - viewStartLineNumber, needed, result); - // BEGIN TODO@Martin: Please stop calling this method on each model change! - let oldRanges = this.hiddenAreasIds.map((areaId) => this.model.getDecorationRange(areaId)).sort(Range.compareRangesUsingStarts); + viewLineNumber += remainingViewLineCount; - if (newRanges.length === oldRanges.length) { - let hasDifference = false; - for (let i = 0; i < newRanges.length; i++) { - if (!newRanges[i].equalsRange(oldRanges[i])) { - hasDifference = true; - break; - } - } - if (!hasDifference) { - return false; + if (lastLine) { + break; } } - // END TODO@Martin: Please stop calling this method on each model change! - let newDecorations: editorCommon.IModelDeltaDecoration[] = []; - for (let i = 0; i < newRanges.length; i++) { - newDecorations.push({ - range: newRanges[i], - options: { - } - }); - } + return result; + } - this.hiddenAreasIds = this.model.deltaDecorations(this.hiddenAreasIds, newDecorations); + public validateViewPosition(viewLineNumber: number, viewColumn: number, expectedModelPosition: Position): Position { + this._ensureValidState(); + viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let hiddenAreas = newRanges; - let hiddenAreaStart = 1, hiddenAreaEnd = 0; - let hiddenAreaIdx = -1; - let nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : this.lines.length + 2; + let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); + let lineIndex = r.index; + let remainder = r.remainder; - for (let i = 0; i < this.lines.length; i++) { - let lineNumber = i + 1; + let line = this.lines[lineIndex]; - if (lineNumber === nextLineNumberToUpdateHiddenArea) { - hiddenAreaIdx++; - hiddenAreaStart = hiddenAreas[hiddenAreaIdx].startLineNumber; - hiddenAreaEnd = hiddenAreas[hiddenAreaIdx].endLineNumber; - nextLineNumberToUpdateHiddenArea = (hiddenAreaIdx + 1 < hiddenAreas.length) ? hiddenAreaEnd + 1 : this.lines.length + 2; - } + let minColumn = line.getViewLineMinColumn(this.model, lineIndex + 1, remainder); + let maxColumn = line.getViewLineMaxColumn(this.model, lineIndex + 1, remainder); + if (viewColumn < minColumn) { + viewColumn = minColumn; + } + if (viewColumn > maxColumn) { + viewColumn = maxColumn; + } - let lineChanged = false; - if (lineNumber >= hiddenAreaStart && lineNumber <= hiddenAreaEnd) { - // Line should be hidden - if (this.lines[i].isVisible()) { - this.lines[i] = this.lines[i].setVisible(false); - lineChanged = true; - } - } else { - // Line should be visible - if (!this.lines[i].isVisible()) { - this.lines[i] = this.lines[i].setVisible(true); - lineChanged = true; - } - } - if (lineChanged) { - let newOutputLineCount = this.lines[i].getViewLineCount(); - this.prefixSumComputer.changeValue(i, newOutputLineCount); - } + let computedModelColumn = line.getModelColumnOfViewPosition(remainder, viewColumn); + let computedModelPosition = this.model.validatePosition(new Position(lineIndex + 1, computedModelColumn)); + + if (computedModelPosition.equals(expectedModelPosition)) { + return new Position(viewLineNumber, viewColumn); } - eventsCollector.emit(new viewEvents.ViewFlushedEvent()); - return true; + return this.convertModelPositionToViewPosition(expectedModelPosition.lineNumber, expectedModelPosition.column); } - public modelPositionIsVisible(modelLineNumber: number, modelColumn: number): boolean { - if (modelLineNumber < 1 || modelLineNumber > this.lines.length) { - // invalid arguments - return false; - } - return this.lines[modelLineNumber - 1].isVisible(); + public convertViewPositionToModelPosition(viewLineNumber: number, viewColumn: number): Position { + this._ensureValidState(); + viewLineNumber = this._toValidViewLineNumber(viewLineNumber); + + let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); + let lineIndex = r.index; + let remainder = r.remainder; + + let inputColumn = this.lines[lineIndex].getModelColumnOfViewPosition(remainder, viewColumn); + // console.log('out -> in ' + viewLineNumber + ',' + viewColumn + ' ===> ' + (lineIndex+1) + ',' + inputColumn); + return this.model.validatePosition(new Position(lineIndex + 1, inputColumn)); } - public setTabSize(eventsCollector: ViewEventsCollector, newTabSize: number): boolean { - if (this.tabSize === newTabSize) { - return false; + public convertModelPositionToViewPosition(_modelLineNumber: number, _modelColumn: number): Position { + this._ensureValidState(); + + let validPosition = this.model.validatePosition(new Position(_modelLineNumber, _modelColumn)); + let inputLineNumber = validPosition.lineNumber; + let inputColumn = validPosition.column; + + let lineIndex = inputLineNumber - 1, lineIndexChanged = false; + while (lineIndex > 0 && !this.lines[lineIndex].isVisible()) { + lineIndex--; + lineIndexChanged = true; } - this.tabSize = newTabSize; + if (lineIndex === 0 && !this.lines[lineIndex].isVisible()) { + // Could not reach a real line + // console.log('in -> out ' + inputLineNumber + ',' + inputColumn + ' ===> ' + 1 + ',' + 1); + return new Position(1, 1); + } + let deltaLineNumber = 1 + (lineIndex === 0 ? 0 : this.prefixSumComputer.getAccumulatedValue(lineIndex - 1)); - this._constructLines(false); - eventsCollector.emit(new viewEvents.ViewFlushedEvent()); + let r: Position; + if (lineIndexChanged) { + r = this.lines[lineIndex].getViewPositionOfModelPosition(deltaLineNumber, this.model.getLineMaxColumn(lineIndex + 1)); + } else { + r = this.lines[inputLineNumber - 1].getViewPositionOfModelPosition(deltaLineNumber, inputColumn); + } - return true; + // console.log('in -> out ' + inputLineNumber + ',' + inputColumn + ' ===> ' + r.lineNumber + ',' + r); + return r; } +} - public setWrappingIndent(eventsCollector: ViewEventsCollector, newWrappingIndent: WrappingIndent): boolean { - if (this.wrappingIndent === newWrappingIndent) { - return false; - } - this.wrappingIndent = newWrappingIndent; +class VisibleIdentitySplitLine implements ISplitLine { - this._constructLines(false); - eventsCollector.emit(new viewEvents.ViewFlushedEvent()); + public static INSTANCE = new VisibleIdentitySplitLine(); + + private constructor() { } + public isVisible(): boolean { return true; } - public setWrappingColumn(eventsCollector: ViewEventsCollector, newWrappingColumn: number, columnsForFullWidthChar: number): boolean { - if (this.wrappingColumn === newWrappingColumn && this.columnsForFullWidthChar === columnsForFullWidthChar) { - return false; + public setVisible(isVisible: boolean): ISplitLine { + if (isVisible) { + return this; } - this.wrappingColumn = newWrappingColumn; - this.columnsForFullWidthChar = columnsForFullWidthChar; - this._constructLines(false); - eventsCollector.emit(new viewEvents.ViewFlushedEvent()); - - return true; + return InvisibleIdentitySplitLine.INSTANCE; } - public onModelFlushed(eventsCollector: ViewEventsCollector): void { - this._constructLines(true); - eventsCollector.emit(new viewEvents.ViewFlushedEvent()); + public getViewLineCount(): number { + return 1; } - public onModelLinesDeleted(eventsCollector: ViewEventsCollector, versionId: number, fromLineNumber: number, toLineNumber: number): void { - if (versionId <= this._validModelVersionId) { - // Here we check for versionId in case the lines were reconstructed in the meantime. - // We don't want to apply stale change events on top of a newer read model state. - return; - } + public getViewLineContent(model: IModel, modelLineNumber: number, outputLineIndex: number): string { + return model.getLineContent(modelLineNumber); + } - let outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1); - let outputToLineNumber = this.prefixSumComputer.getAccumulatedValue(toLineNumber - 1); + public getViewLineMinColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { + return model.getLineMinColumn(modelLineNumber); + } - this.lines.splice(fromLineNumber - 1, toLineNumber - fromLineNumber + 1); - this.prefixSumComputer.removeValues(fromLineNumber - 1, toLineNumber - fromLineNumber + 1); + public getViewLineMaxColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { + return model.getLineMaxColumn(modelLineNumber); + } - eventsCollector.emit(new viewEvents.ViewLinesDeletedEvent(outputFromLineNumber, outputToLineNumber)); + public getViewLineData(model: IModel, modelLineNumber: number, outputLineIndex: number): ViewLineData { + let lineTokens = model.getLineTokens(modelLineNumber); + let lineContent = lineTokens.getLineContent(); + return new ViewLineData( + lineContent, + 1, + lineContent.length + 1, + lineTokens.inflate() + ); } - public onModelLinesInserted(eventsCollector: ViewEventsCollector, versionId: number, fromLineNumber: number, toLineNumber: number, text: string[]): void { - if (versionId <= this._validModelVersionId) { - // Here we check for versionId in case the lines were reconstructed in the meantime. - // We don't want to apply stale change events on top of a newer read model state. + public getViewLinesData(model: IModel, modelLineNumber: number, fromOuputLineIndex: number, toOutputLineIndex: number, globalStartIndex: number, needed: boolean[], result: ViewLineData[]): void { + if (!needed[globalStartIndex]) { + result[globalStartIndex] = null; return; } - - let hiddenAreas = this.getHiddenAreas(); - let isInHiddenArea = false; - let testPosition = new Position(fromLineNumber, 1); - for (let i = 0; i < hiddenAreas.length; i++) { - if (hiddenAreas[i].containsPosition(testPosition)) { - isInHiddenArea = true; - break; - } - } - - let outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1); - - let totalOutputLineCount = 0; - let insertLines: ISplitLine[] = []; - let insertPrefixSumValues = new Uint32Array(text.length); - - for (let i = 0, len = text.length; i < len; i++) { - let line = createSplitLine(this.linePositionMapperFactory, text[i], this.tabSize, this.wrappingColumn, this.columnsForFullWidthChar, this.wrappingIndent, !isInHiddenArea); - insertLines.push(line); - - let outputLineCount = line.getViewLineCount(); - totalOutputLineCount += outputLineCount; - insertPrefixSumValues[i] = outputLineCount; - } - - this.lines = this.lines.slice(0, fromLineNumber - 1).concat(insertLines).concat(this.lines.slice(fromLineNumber - 1)); - - this.prefixSumComputer.insertValues(fromLineNumber - 1, insertPrefixSumValues); - - eventsCollector.emit(new viewEvents.ViewLinesInsertedEvent(outputFromLineNumber, outputFromLineNumber + totalOutputLineCount - 1)); + result[globalStartIndex] = this.getViewLineData(model, modelLineNumber, 0); } - public onModelLineChanged(eventsCollector: ViewEventsCollector, versionId: number, lineNumber: number, newText: string): boolean { - if (versionId <= this._validModelVersionId) { - // Here we check for versionId in case the lines were reconstructed in the meantime. - // We don't want to apply stale change events on top of a newer read model state. - return false; - } + public getModelColumnOfViewPosition(outputLineIndex: number, outputColumn: number): number { + return outputColumn; + } - let lineIndex = lineNumber - 1; + public getViewPositionOfModelPosition(deltaLineNumber: number, inputColumn: number): Position { + return new Position(deltaLineNumber, inputColumn); + } +} - let oldOutputLineCount = this.lines[lineIndex].getViewLineCount(); - let isVisible = this.lines[lineIndex].isVisible(); - let line = createSplitLine(this.linePositionMapperFactory, newText, this.tabSize, this.wrappingColumn, this.columnsForFullWidthChar, this.wrappingIndent, isVisible); - this.lines[lineIndex] = line; - let newOutputLineCount = this.lines[lineIndex].getViewLineCount(); +class InvisibleIdentitySplitLine implements ISplitLine { - let lineMappingChanged = false; - let changeFrom = 0; - let changeTo = -1; - let insertFrom = 0; - let insertTo = -1; - let deleteFrom = 0; - let deleteTo = -1; + public static INSTANCE = new InvisibleIdentitySplitLine(); - if (oldOutputLineCount > newOutputLineCount) { - changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1); - changeTo = changeFrom + newOutputLineCount - 1; - deleteFrom = changeTo + 1; - deleteTo = deleteFrom + (oldOutputLineCount - newOutputLineCount) - 1; - lineMappingChanged = true; - } else if (oldOutputLineCount < newOutputLineCount) { - changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1); - changeTo = changeFrom + oldOutputLineCount - 1; - insertFrom = changeTo + 1; - insertTo = insertFrom + (newOutputLineCount - oldOutputLineCount) - 1; - lineMappingChanged = true; - } else { - changeFrom = (lineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(lineNumber - 2) + 1); - changeTo = changeFrom + newOutputLineCount - 1; - } + private constructor() { } - this.prefixSumComputer.changeValue(lineIndex, newOutputLineCount); + public isVisible(): boolean { + return false; + } - if (changeFrom <= changeTo) { - eventsCollector.emit(new viewEvents.ViewLinesChangedEvent(changeFrom, changeTo)); - } - if (insertFrom <= insertTo) { - eventsCollector.emit(new viewEvents.ViewLinesInsertedEvent(insertFrom, insertTo)); - } - if (deleteFrom <= deleteTo) { - eventsCollector.emit(new viewEvents.ViewLinesDeletedEvent(deleteFrom, deleteTo)); + public setVisible(isVisible: boolean): ISplitLine { + if (!isVisible) { + return this; } + return VisibleIdentitySplitLine.INSTANCE; + } - return lineMappingChanged; + public getViewLineCount(): number { + return 0; } - public acceptVersionId(versionId: number): void { - this._validModelVersionId = versionId; + public getViewLineContent(model: IModel, modelLineNumber: number, outputLineIndex: number): string { + throw new Error('Not supported'); } - public getViewLineCount(): number { - this._ensureValidState(); - return this.prefixSumComputer.getTotalValue(); + public getViewLineMinColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { + throw new Error('Not supported'); } - private _toValidViewLineNumber(viewLineNumber: number): number { - if (viewLineNumber < 1) { - return 1; - } - let viewLineCount = this.getViewLineCount(); - if (viewLineNumber > viewLineCount) { - return viewLineCount; - } - return viewLineNumber; + public getViewLineMaxColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { + throw new Error('Not supported'); } - /** - * Gives a hint that a lot of requests are about to come in for these line numbers. - */ - public warmUpLookupCache(viewStartLineNumber: number, viewEndLineNumber: number): void { - this.prefixSumComputer.warmUpCache(viewStartLineNumber - 1, viewEndLineNumber - 1); + public getViewLineData(model: IModel, modelLineNumber: number, outputLineIndex: number): ViewLineData { + throw new Error('Not supported'); } - public getViewLineIndentGuide(viewLineNumber: number): number { - this._ensureValidState(); - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - return this.model.getLineIndentGuide(r.index + 1); + public getViewLinesData(model: IModel, modelLineNumber: number, fromOuputLineIndex: number, toOutputLineIndex: number, globalStartIndex: number, needed: boolean[], result: ViewLineData[]): void { + throw new Error('Not supported'); } - public getViewLineContent(viewLineNumber: number): string { - this._ensureValidState(); - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; + public getModelColumnOfViewPosition(outputLineIndex: number, outputColumn: number): number { + throw new Error('Not supported'); + } - return this.lines[lineIndex].getViewLineContent(this.model, lineIndex + 1, remainder); + public getViewPositionOfModelPosition(deltaLineNumber: number, inputColumn: number): Position { + throw new Error('Not supported'); } +} - public getViewLineMinColumn(viewLineNumber: number): number { - this._ensureValidState(); - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; +export class SplitLine implements ISplitLine { - return this.lines[lineIndex].getViewLineMinColumn(this.model, lineIndex + 1, remainder); - } + private positionMapper: ILineMapping; + private outputLineCount: number; - public getViewLineMaxColumn(viewLineNumber: number): number { - this._ensureValidState(); - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; + private wrappedIndent: string; + private wrappedIndentLength: number; + private _isVisible: boolean; - return this.lines[lineIndex].getViewLineMaxColumn(this.model, lineIndex + 1, remainder); + constructor(positionMapper: ILineMapping, isVisible: boolean) { + this.positionMapper = positionMapper; + this.wrappedIndent = this.positionMapper.getWrappedLinesIndent(); + this.wrappedIndentLength = this.wrappedIndent.length; + this.outputLineCount = this.positionMapper.getOutputLineCount(); + this._isVisible = isVisible; } - public getViewLineData(viewLineNumber: number): ViewLineData { - this._ensureValidState(); - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; - - return this.lines[lineIndex].getViewLineData(this.model, lineIndex + 1, remainder); + public isVisible(): boolean { + return this._isVisible; } - public getViewLinesData(viewStartLineNumber: number, viewEndLineNumber: number, needed: boolean[]): ViewLineData[] { - this._ensureValidState(); + public setVisible(isVisible: boolean): ISplitLine { + this._isVisible = isVisible; + return this; + } - viewStartLineNumber = this._toValidViewLineNumber(viewStartLineNumber); - viewEndLineNumber = this._toValidViewLineNumber(viewEndLineNumber); + public getViewLineCount(): number { + if (!this._isVisible) { + return 0; + } + return this.outputLineCount; + } - let start = this.prefixSumComputer.getIndexOf(viewStartLineNumber - 1); - let viewLineNumber = viewStartLineNumber; - let startModelLineIndex = start.index; - let startRemainder = start.remainder; + private getInputStartOffsetOfOutputLineIndex(outputLineIndex: number): number { + return this.positionMapper.getInputOffsetOfOutputPosition(outputLineIndex, 0); + } - let result: ViewLineData[] = []; - for (let modelLineIndex = startModelLineIndex, len = this.model.getLineCount(); modelLineIndex < len; modelLineIndex++) { - let line = this.lines[modelLineIndex]; - if (!line.isVisible()) { - continue; - } - let fromViewLineIndex = (modelLineIndex === startModelLineIndex ? startRemainder : 0); - let remainingViewLineCount = line.getViewLineCount() - fromViewLineIndex; + private getInputEndOffsetOfOutputLineIndex(model: IModel, modelLineNumber: number, outputLineIndex: number): number { + if (outputLineIndex + 1 === this.outputLineCount) { + return model.getLineMaxColumn(modelLineNumber) - 1; + } + return this.positionMapper.getInputOffsetOfOutputPosition(outputLineIndex + 1, 0); + } - let lastLine = false; - if (viewLineNumber + remainingViewLineCount > viewEndLineNumber) { - lastLine = true; - remainingViewLineCount = viewEndLineNumber - viewLineNumber + 1; - } - let toViewLineIndex = fromViewLineIndex + remainingViewLineCount; + public getViewLineContent(model: IModel, modelLineNumber: number, outputLineIndex: number): string { + if (!this._isVisible) { + throw new Error('Not supported'); + } + let startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex); + let endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex); + let r = model.getLineContent(modelLineNumber).substring(startOffset, endOffset); - line.getViewLinesData(this.model, modelLineIndex + 1, fromViewLineIndex, toViewLineIndex, viewLineNumber - viewStartLineNumber, needed, result); + if (outputLineIndex > 0) { + r = this.wrappedIndent + r; + } - viewLineNumber += remainingViewLineCount; + return r; + } - if (lastLine) { - break; - } + public getViewLineMinColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { + if (!this._isVisible) { + throw new Error('Not supported'); } - - return result; + if (outputLineIndex > 0) { + return this.wrappedIndentLength + 1; + } + return 1; } - public validateViewPosition(viewLineNumber: number, viewColumn: number, expectedModelPosition: Position): Position { - this._ensureValidState(); - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); + public getViewLineMaxColumn(model: IModel, modelLineNumber: number, outputLineIndex: number): number { + if (!this._isVisible) { + throw new Error('Not supported'); + } + return this.getViewLineContent(model, modelLineNumber, outputLineIndex).length + 1; + } - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; + public getViewLineData(model: IModel, modelLineNumber: number, outputLineIndex: number): ViewLineData { + if (!this._isVisible) { + throw new Error('Not supported'); + } - let line = this.lines[lineIndex]; + let startOffset = this.getInputStartOffsetOfOutputLineIndex(outputLineIndex); + let endOffset = this.getInputEndOffsetOfOutputLineIndex(model, modelLineNumber, outputLineIndex); - let minColumn = line.getViewLineMinColumn(this.model, lineIndex + 1, remainder); - let maxColumn = line.getViewLineMaxColumn(this.model, lineIndex + 1, remainder); - if (viewColumn < minColumn) { - viewColumn = minColumn; - } - if (viewColumn > maxColumn) { - viewColumn = maxColumn; + let lineContent = model.getLineContent(modelLineNumber).substring(startOffset, endOffset); + if (outputLineIndex > 0) { + lineContent = this.wrappedIndent + lineContent; } - let computedModelColumn = line.getModelColumnOfViewPosition(remainder, viewColumn); - let computedModelPosition = this.model.validatePosition(new Position(lineIndex + 1, computedModelColumn)); + let minColumn = (outputLineIndex > 0 ? this.wrappedIndentLength + 1 : 1); + let maxColumn = lineContent.length + 1; - if (computedModelPosition.equals(expectedModelPosition)) { - return new Position(viewLineNumber, viewColumn); + let deltaStartIndex = 0; + if (outputLineIndex > 0) { + deltaStartIndex = this.wrappedIndentLength; } + let lineTokens = model.getLineTokens(modelLineNumber); - return this.convertModelPositionToViewPosition(expectedModelPosition.lineNumber, expectedModelPosition.column); + return new ViewLineData( + lineContent, + minColumn, + maxColumn, + lineTokens.sliceAndInflate(startOffset, endOffset, deltaStartIndex) + ); } - public convertViewPositionToModelPosition(viewLineNumber: number, viewColumn: number): Position { - this._ensureValidState(); - viewLineNumber = this._toValidViewLineNumber(viewLineNumber); - - let r = this.prefixSumComputer.getIndexOf(viewLineNumber - 1); - let lineIndex = r.index; - let remainder = r.remainder; + public getViewLinesData(model: IModel, modelLineNumber: number, fromOuputLineIndex: number, toOutputLineIndex: number, globalStartIndex: number, needed: boolean[], result: ViewLineData[]): void { + if (!this._isVisible) { + throw new Error('Not supported'); + } - let inputColumn = this.lines[lineIndex].getModelColumnOfViewPosition(remainder, viewColumn); - // console.log('out -> in ' + viewLineNumber + ',' + viewColumn + ' ===> ' + (lineIndex+1) + ',' + inputColumn); - return this.model.validatePosition(new Position(lineIndex + 1, inputColumn)); + for (let outputLineIndex = fromOuputLineIndex; outputLineIndex < toOutputLineIndex; outputLineIndex++) { + let globalIndex = globalStartIndex + outputLineIndex - fromOuputLineIndex; + if (!needed[globalIndex]) { + result[globalIndex] = null; + continue; + } + result[globalIndex] = this.getViewLineData(model, modelLineNumber, outputLineIndex); + } } - public convertModelPositionToViewPosition(_modelLineNumber: number, _modelColumn: number): Position { - this._ensureValidState(); - - let validPosition = this.model.validatePosition(new Position(_modelLineNumber, _modelColumn)); - let inputLineNumber = validPosition.lineNumber; - let inputColumn = validPosition.column; - - let lineIndex = inputLineNumber - 1, lineIndexChanged = false; - while (lineIndex > 0 && !this.lines[lineIndex].isVisible()) { - lineIndex--; - lineIndexChanged = true; + public getModelColumnOfViewPosition(outputLineIndex: number, outputColumn: number): number { + if (!this._isVisible) { + throw new Error('Not supported'); } - if (lineIndex === 0 && !this.lines[lineIndex].isVisible()) { - // Could not reach a real line - // console.log('in -> out ' + inputLineNumber + ',' + inputColumn + ' ===> ' + 1 + ',' + 1); - return new Position(1, 1); + let adjustedColumn = outputColumn - 1; + if (outputLineIndex > 0) { + if (adjustedColumn < this.wrappedIndentLength) { + adjustedColumn = 0; + } else { + adjustedColumn -= this.wrappedIndentLength; + } } - let deltaLineNumber = 1 + (lineIndex === 0 ? 0 : this.prefixSumComputer.getAccumulatedValue(lineIndex - 1)); + return this.positionMapper.getInputOffsetOfOutputPosition(outputLineIndex, adjustedColumn) + 1; + } - let r: Position; - if (lineIndexChanged) { - r = this.lines[lineIndex].getViewPositionOfModelPosition(deltaLineNumber, this.model.getLineMaxColumn(lineIndex + 1)); - } else { - r = this.lines[inputLineNumber - 1].getViewPositionOfModelPosition(deltaLineNumber, inputColumn); + public getViewPositionOfModelPosition(deltaLineNumber: number, inputColumn: number): Position { + if (!this._isVisible) { + throw new Error('Not supported'); } + let r = this.positionMapper.getOutputPositionOfInputOffset(inputColumn - 1); + let outputLineIndex = r.outputLineIndex; + let outputColumn = r.outputOffset + 1; - // console.log('in -> out ' + inputLineNumber + ',' + inputColumn + ' ===> ' + r.lineNumber + ',' + r); - return r; + if (outputLineIndex > 0) { + outputColumn += this.wrappedIndentLength; + } + + // console.log('in -> out ' + deltaLineNumber + ',' + inputColumn + ' ===> ' + (deltaLineNumber+outputLineIndex) + ',' + outputColumn); + return new Position(deltaLineNumber + outputLineIndex, outputColumn); + } +} + +function createSplitLine(linePositionMapperFactory: ILineMapperFactory, text: string, tabSize: number, wrappingColumn: number, columnsForFullWidthChar: number, wrappingIndent: WrappingIndent, isVisible: boolean): ISplitLine { + let positionMapper = linePositionMapperFactory.createLineMapping(text, tabSize, wrappingColumn, columnsForFullWidthChar, wrappingIndent); + if (positionMapper === null) { + // No mapping needed + if (isVisible) { + return VisibleIdentitySplitLine.INSTANCE; + } + return InvisibleIdentitySplitLine.INSTANCE; + } else { + return new SplitLine(positionMapper, isVisible); } } diff --git a/src/vs/editor/common/viewModel/viewModelDecorations.ts b/src/vs/editor/common/viewModel/viewModelDecorations.ts index d129ee7661251..2a5bbea8d827d 100644 --- a/src/vs/editor/common/viewModel/viewModelDecorations.ts +++ b/src/vs/editor/common/viewModel/viewModelDecorations.ts @@ -41,7 +41,6 @@ export class ViewModelDecorations implements IDisposable { this.configuration = configuration; this._coordinatesConverter = coordinatesConverter; this._decorationsCache = Object.create(null); - this._clearCachedModelDecorationsResolver(); } diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index 77521cdacc27a..21f45c369e2f0 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -21,11 +21,10 @@ import * as viewEvents from 'vs/editor/common/view/viewEvents'; import * as errors from 'vs/base/common/errors'; import { MinimapTokensColorTracker } from 'vs/editor/common/view/minimapCharRenderer'; import * as textModelEvents from 'vs/editor/common/model/textModelEvents'; -import { WrappingIndent, IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; +import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; import { CursorEventType, ICursorPositionChangedEvent, VerticalRevealType, ICursorSelectionChangedEvent, ICursorRevealRangeEvent, CursorScrollRequest } from 'vs/editor/common/controller/cursorEvents'; import { Cursor } from 'vs/editor/common/controller/cursor'; - -const ConfigurationChanged = 'configurationChanged'; +import { CharacterHardWrappingLineMapperFactory } from "vs/editor/common/viewModel/characterHardWrappingLineMapper"; export class CoordinatesConverter implements ICoordinatesConverter { @@ -89,65 +88,75 @@ export class CoordinatesConverter implements ICoordinatesConverter { export class ViewModel extends Disposable implements IViewModel { - private readonly lines: SplitLinesCollection; private readonly editorId: number; private readonly configuration: editorCommon.IConfiguration; private readonly model: editorCommon.IModel; + private readonly lines: SplitLinesCollection; public readonly coordinatesConverter: ICoordinatesConverter; private readonly decorations: ViewModelDecorations; private readonly cursors: ViewModelCursors; private _isDisposing: boolean; - private _centeredViewLine: number; - private _listeners: IViewModelListener[]; - constructor(lines: SplitLinesCollection, editorId: number, configuration: editorCommon.IConfiguration, model: editorCommon.IModel) { + constructor(editorId: number, configuration: editorCommon.IConfiguration, model: editorCommon.IModel) { super(); - this.lines = lines; this.editorId = editorId; this.configuration = configuration; this.model = model; + + const conf = this.configuration.editor; + + let hardWrappingLineMapperFactory = new CharacterHardWrappingLineMapperFactory( + conf.wrappingInfo.wordWrapBreakBeforeCharacters, + conf.wrappingInfo.wordWrapBreakAfterCharacters, + conf.wrappingInfo.wordWrapBreakObtrusiveCharacters + ); + + this.lines = new SplitLinesCollection( + this.model, + hardWrappingLineMapperFactory, + this.model.getOptions().tabSize, + conf.wrappingInfo.wrappingColumn, + conf.fontInfo.typicalFullwidthCharacterWidth / conf.fontInfo.typicalHalfwidthCharacterWidth, + conf.wrappingInfo.wrappingIndent + ); + this.configuration.setMaxLineNumber(this.model.getLineCount()); this.coordinatesConverter = new CoordinatesConverter(this.lines); + this._isDisposing = false; this._centeredViewLine = -1; + this._listeners = []; this.decorations = new ViewModelDecorations(this.editorId, this.model, this.configuration, this.coordinatesConverter); - this.decorations.reset(); this.cursors = new ViewModelCursors(this.configuration, this.coordinatesConverter); - this._isDisposing = false; + this._register(this.model.addBulkListener((events: EmitterEvent[]) => { + if (this._isDisposing) { + // Disposing the lines might end up sending model decoration changed events + // ...we no longer care about them... + return; + } + let eventsCollector = new ViewEventsCollector(); + this._onModelEvents(eventsCollector, events); + this._emit(eventsCollector.finalize()); + })); - this._register(this.model.addBulkListener((events: EmitterEvent[]) => this.onEvents(events))); this._register(this.configuration.onDidChange((e) => { - this.onEvents([new EmitterEvent(ConfigurationChanged, e)]); + const eventsCollector = new ViewEventsCollector(); + this._onConfigurationChanged(eventsCollector, e); + this._emit(eventsCollector.finalize()); })); + this._register(MinimapTokensColorTracker.getInstance().onDidChange(() => { this._emit([new viewEvents.ViewTokensColorsChangedEvent()]); })); - - this._listeners = []; - } - - public setHiddenAreas(ranges: Range[]): void { - let eventsCollector = new ViewEventsCollector(); - this._setHiddenAreas(eventsCollector, ranges); - this._emit(eventsCollector.finalize()); - } - - private _setHiddenAreas(eventsCollector: ViewEventsCollector, ranges: Range[]): void { - let lineMappingChanged = this.lines.setHiddenAreas(eventsCollector, ranges); - if (lineMappingChanged) { - eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); - this.decorations.onLineMappingChanged(eventsCollector); - this.cursors.onLineMappingChanged(eventsCollector); - } } public dispose(): void { @@ -158,179 +167,108 @@ export class ViewModel extends Disposable implements IViewModel { super.dispose(); } - public addEventListener(listener: (events: viewEvents.ViewEvent[]) => void): IDisposable { - this._listeners.push(listener); - return { - dispose: () => { - let listeners = this._listeners; - for (let i = 0, len = listeners.length; i < len; i++) { - if (listeners[i] === listener) { - listeners.splice(i, 1); - break; - } - } - } - }; - } - private _emit(events: viewEvents.ViewEvent[]): void { - let listeners = this._listeners.slice(0); + const listeners = this._listeners.slice(0); for (let i = 0, len = listeners.length; i < len; i++) { safeInvokeListener(listeners[i], events); } } - private _onTabSizeChange(eventsCollector: ViewEventsCollector, newTabSize: number): boolean { - var lineMappingChanged = this.lines.setTabSize(eventsCollector, newTabSize); - if (lineMappingChanged) { - eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); - this.decorations.onLineMappingChanged(eventsCollector); - this.cursors.onLineMappingChanged(eventsCollector); - } - return lineMappingChanged; + public addEventSource(cursor: Cursor): void { + this._register(cursor.addBulkListener((events: EmitterEvent[]) => { + const eventsCollector = new ViewEventsCollector(); + this._onCursorEvents(eventsCollector, events); + this._emit(eventsCollector.finalize()); + })); } - private _onWrappingIndentChange(eventsCollector: ViewEventsCollector, newWrappingIndent: WrappingIndent): boolean { - var lineMappingChanged = this.lines.setWrappingIndent(eventsCollector, newWrappingIndent); - if (lineMappingChanged) { - eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); - this.decorations.onLineMappingChanged(eventsCollector); - this.cursors.onLineMappingChanged(eventsCollector); + private _onCursorEvents(eventsCollector: ViewEventsCollector, events: EmitterEvent[]): void { + for (let i = 0, len = events.length; i < len; i++) { + const _e = events[i]; + const type = _e.type; + const data = _e.data; + + switch (type) { + case CursorEventType.CursorPositionChanged: { + const e = data; + this.cursors.onCursorPositionChanged(eventsCollector, e); + break; + } + case CursorEventType.CursorSelectionChanged: { + const e = data; + this.cursors.onCursorSelectionChanged(eventsCollector, e); + break; + } + case CursorEventType.CursorRevealRange: { + const e = data; + this.cursors.onCursorRevealRange(eventsCollector, e); + break; + } + case CursorEventType.CursorScrollRequest: { + const e = data; + this.cursors.onCursorScrollRequest(eventsCollector, e); + break; + } + default: + console.info('View received unknown event: '); + console.info(type, data); + } } - return lineMappingChanged; } - private _restoreCenteredModelRange(eventsCollector: ViewEventsCollector, range: Range): void { - // modelLine -> viewLine - var newCenteredViewRange = this.coordinatesConverter.convertModelRangeToViewRange(range); + private _onConfigurationChanged(eventsCollector: ViewEventsCollector, e: IConfigurationChangedEvent): void { - // Send a reveal event to restore the centered content - eventsCollector.emit(new viewEvents.ViewRevealRangeRequestEvent( - newCenteredViewRange, - VerticalRevealType.Center, - false - )); - } + // We might need to restore the current centered view range, so save it (if available) + const previousCenteredModelRange = this.getCenteredRangeInViewport(); + let revealPreviousCenteredModelRange = false; - private _onWrappingColumnChange(eventsCollector: ViewEventsCollector, newWrappingColumn: number, columnsForFullWidthChar: number): boolean { - let lineMappingChanged = this.lines.setWrappingColumn(eventsCollector, newWrappingColumn, columnsForFullWidthChar); - if (lineMappingChanged) { + const conf = this.configuration.editor; + + if (this.lines.setWrappingSettings(eventsCollector, conf.wrappingInfo.wrappingIndent, conf.wrappingInfo.wrappingColumn, conf.fontInfo.typicalFullwidthCharacterWidth / conf.fontInfo.typicalHalfwidthCharacterWidth)) { eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); this.decorations.onLineMappingChanged(eventsCollector); this.cursors.onLineMappingChanged(eventsCollector); + revealPreviousCenteredModelRange = true; } - return lineMappingChanged; - } - - public addEventSource(cursor: Cursor): void { - this._register(cursor.addBulkListener((events: EmitterEvent[]) => { - const eventsCollector = new ViewEventsCollector(); - for (let i = 0, len = events.length; i < len; i++) { - const _e = events[i]; - const type = _e.type; - const data = _e.data; - - switch (type) { - case CursorEventType.CursorPositionChanged: { - const e = data; - this.cursors.onCursorPositionChanged(eventsCollector, e); - break; - } - case CursorEventType.CursorSelectionChanged: { - const e = data; - this.cursors.onCursorSelectionChanged(eventsCollector, e); - break; - } - case CursorEventType.CursorRevealRange: { - const e = data; - this.cursors.onCursorRevealRange(eventsCollector, e); - break; - } - case CursorEventType.CursorScrollRequest: { - const e = data; - this.cursors.onCursorScrollRequest(eventsCollector, e); - break; - } - default: - console.info('View received unknown event: '); - console.info(type, data); - } - } + if (e.readOnly) { + // Must read again all decorations due to readOnly filtering + this.decorations.reset(); + eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); + } - this._emit(eventsCollector.finalize()); - })); - } + eventsCollector.emit(new viewEvents.ViewConfigurationChangedEvent(e)); - private onEvents(events: EmitterEvent[]): void { - if (this._isDisposing) { - // Disposing the lines might end up sending model decoration changed events - // We no longer care about them... - return; + if (revealPreviousCenteredModelRange && previousCenteredModelRange) { + // modelLine -> viewLine + const newCenteredViewRange = this.coordinatesConverter.convertModelRangeToViewRange(previousCenteredModelRange); + + // Send a reveal event to restore the centered content + eventsCollector.emit(new viewEvents.ViewRevealRangeRequestEvent( + newCenteredViewRange, + VerticalRevealType.Center, + false + )); } - let eventsCollector = new ViewEventsCollector(); - this._onEvents(eventsCollector, events); - this._emit(eventsCollector.finalize()); } - private static _containsModelContentChangeEvent(events: EmitterEvent[]): boolean { + private _onModelEvents(eventsCollector: ViewEventsCollector, events: EmitterEvent[]): void { + + // A quick check if there are model content change events incoming + // in order to update the configuration and reset the centered view line for (let i = 0, len = events.length; i < len; i++) { - let eventType = events[i].type; + const eventType = events[i].type; if (eventType === textModelEvents.TextModelEventType.ModelRawContentChanged2) { - return true; - } - } - return false; - } + // There is a content change event + this._centeredViewLine = -1; + this.configuration.setMaxLineNumber(this.model.getLineCount()); - private static _containsWrappingRelatedEvents(events: EmitterEvent[]): boolean { - for (let i = 0, len = events.length; i < len; i++) { - let eventType = events[i].type; - if (eventType === textModelEvents.TextModelEventType.ModelOptionsChanged) { - return true; - } - if (eventType === ConfigurationChanged) { - return true; + break; } } - return false; - } - - public getCenteredRangeInViewport(): Range { - if (this._centeredViewLine === -1) { - // Never got rendered or not rendered since last content change event - return null; - } - let viewLineNumber = this._centeredViewLine; - let currentCenteredViewRange = new Range(viewLineNumber, this.getLineMinColumn(viewLineNumber), viewLineNumber, this.getLineMaxColumn(viewLineNumber)); - return this.coordinatesConverter.convertViewRangeToModelRange(currentCenteredViewRange); - } - - private _onEvents(eventsCollector: ViewEventsCollector, events: EmitterEvent[]): void { - - const containsModelContentChangeEvent = ViewModel._containsModelContentChangeEvent(events); - if (containsModelContentChangeEvent) { - this._centeredViewLine = -1; - this.configuration.setMaxLineNumber(this.model.getLineCount()); - } - - // We might need to restore the current centered view range in the following circumstances: - // All of these changes might lead to a new line mapping: - // (a) model tabSize changed - // (b) wrappingIndent changed - // (c) wrappingColumn changed - // (d) fontInfo changed - // However, we cannot restore the current centered line if the model has changed its content - // because we cannot convert the view range to a model range. - - let previousCenteredModelRange: Range = null; - if (!containsModelContentChangeEvent && ViewModel._containsWrappingRelatedEvents(events)) { - previousCenteredModelRange = this.getCenteredRangeInViewport(); - } let hadOtherModelChange = false; let hadModelLineChangeThatChangedLineMapping = false; - let revealPreviousCenteredModelRange = false; for (let i = 0, len = events.length; i < len; i++) { const _e = events[i]; @@ -399,11 +337,10 @@ export class ViewModel extends Disposable implements IViewModel { } case textModelEvents.TextModelEventType.ModelOptionsChanged: { // A tab size change causes a line mapping changed event => all view parts will repaint OK, no further event needed here - let prevLineCount = this.lines.getViewLineCount(); - let tabSizeChanged = this._onTabSizeChange(eventsCollector, this.model.getOptions().tabSize); - let newLineCount = this.lines.getViewLineCount(); - if (tabSizeChanged && prevLineCount !== newLineCount) { - revealPreviousCenteredModelRange = true; + if (this.lines.setTabSize(eventsCollector, this.model.getOptions().tabSize)) { + eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); + this.decorations.onLineMappingChanged(eventsCollector); + this.cursors.onLineMappingChanged(eventsCollector); } break; @@ -417,19 +354,6 @@ export class ViewModel extends Disposable implements IViewModel { // Ignore, since the editor will take care of this and destroy the view shortly break; } - case ConfigurationChanged: { - const e = data; - revealPreviousCenteredModelRange = this._onWrappingIndentChange(eventsCollector, this.configuration.editor.wrappingInfo.wrappingIndent) || revealPreviousCenteredModelRange; - revealPreviousCenteredModelRange = this._onWrappingColumnChange(eventsCollector, this.configuration.editor.wrappingInfo.wrappingColumn, this.configuration.editor.fontInfo.typicalFullwidthCharacterWidth / this.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth) || revealPreviousCenteredModelRange; - - if (e.readOnly) { - // Must read again all decorations due to readOnly filtering - this.decorations.reset(); - eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); - } - eventsCollector.emit(new viewEvents.ViewConfigurationChangedEvent(e)); - break; - } default: console.info('View received unknown event: '); console.info(type, data); @@ -441,10 +365,42 @@ export class ViewModel extends Disposable implements IViewModel { this.decorations.onLineMappingChanged(eventsCollector); this.cursors.onLineMappingChanged(eventsCollector); } + } - if (revealPreviousCenteredModelRange && previousCenteredModelRange) { - this._restoreCenteredModelRange(eventsCollector, previousCenteredModelRange); + public setHiddenAreas(ranges: Range[]): void { + let eventsCollector = new ViewEventsCollector(); + let lineMappingChanged = this.lines.setHiddenAreas(eventsCollector, ranges); + if (lineMappingChanged) { + eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); + this.decorations.onLineMappingChanged(eventsCollector); + this.cursors.onLineMappingChanged(eventsCollector); + } + this._emit(eventsCollector.finalize()); + } + + public addEventListener(listener: (events: viewEvents.ViewEvent[]) => void): IDisposable { + this._listeners.push(listener); + return { + dispose: () => { + let listeners = this._listeners; + for (let i = 0, len = listeners.length; i < len; i++) { + if (listeners[i] === listener) { + listeners.splice(i, 1); + break; + } + } + } + }; + } + + public getCenteredRangeInViewport(): Range { + if (this._centeredViewLine === -1) { + // Never got rendered or not rendered since last content change event + return null; } + let viewLineNumber = this._centeredViewLine; + let currentCenteredViewRange = new Range(viewLineNumber, this.getLineMinColumn(viewLineNumber), viewLineNumber, this.getLineMaxColumn(viewLineNumber)); + return this.coordinatesConverter.convertViewRangeToModelRange(currentCenteredViewRange); } public getTabSize(): number { diff --git a/src/vs/editor/test/common/viewModel/testViewModel.ts b/src/vs/editor/test/common/viewModel/testViewModel.ts index 7c1e6ed9a77db..a041d80037a54 100644 --- a/src/vs/editor/test/common/viewModel/testViewModel.ts +++ b/src/vs/editor/test/common/viewModel/testViewModel.ts @@ -5,9 +5,7 @@ 'use strict'; import { Model } from 'vs/editor/common/model/model'; -import { CharacterHardWrappingLineMapperFactory } from 'vs/editor/common/viewModel/characterHardWrappingLineMapper'; import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; -import { SplitLinesCollection } from 'vs/editor/common/viewModel/splitLinesCollection'; import { ViewModel } from 'vs/editor/common/viewModel/viewModelImpl'; import { MockCodeEditorCreationOptions } from 'vs/editor/test/common/mocks/mockCodeEditor'; @@ -18,27 +16,7 @@ export function testViewModel(text: string[], options: MockCodeEditorCreationOpt let model = Model.createFromString(text.join('\n')); - let factory = new CharacterHardWrappingLineMapperFactory( - configuration.editor.wrappingInfo.wordWrapBreakBeforeCharacters, - configuration.editor.wrappingInfo.wordWrapBreakAfterCharacters, - configuration.editor.wrappingInfo.wordWrapBreakObtrusiveCharacters - ); - - let linesCollection = new SplitLinesCollection( - model, - factory, - model.getOptions().tabSize, - configuration.editor.wrappingInfo.wrappingColumn, - configuration.editor.fontInfo.typicalFullwidthCharacterWidth / configuration.editor.fontInfo.typicalHalfwidthCharacterWidth, - configuration.editor.wrappingInfo.wrappingIndent - ); - - let viewModel = new ViewModel( - linesCollection, - EDITOR_ID, - configuration, - model - ); + let viewModel = new ViewModel(EDITOR_ID, configuration, model); callback(viewModel, model); From b81f7485aaded55c1d05212aeeb63b1a13c115b5 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 9 May 2017 17:56:23 +0200 Subject: [PATCH 0335/2747] add overwrite[Before|After] to SnippetSession --- .../contrib/snippet/browser/editorSnippets.ts | 30 ++++++++++++++++--- .../snippet/browser/snippetController2.ts | 2 +- .../test/browser/editorSnippets.test.ts | 14 +++++++++ 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index e126e1fea75ec..efaba9a24c525 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -166,13 +166,34 @@ export class SnippetSession { return templateLines.join(model.getEOL()); } + static adjustRange(model: IModel, range: Range, overwriteBefore: number, overwriteAfter: number): Range { + if (overwriteBefore !== 0 || overwriteAfter !== 0) { + let { startLineNumber, startColumn, endLineNumber, endColumn } = range; + startColumn -= overwriteBefore; + endColumn += overwriteAfter; + + range = Range.plusRange(range, { + startLineNumber, + startColumn, + endLineNumber, + endColumn, + }); + range = model.validateRange(range); + } + return range; + } + private readonly _editor: ICommonCodeEditor; private readonly _template: string; + private readonly _overwriteBefore: number; + private readonly _overwriteAfter: number; private readonly _snippets: OneSnippet[]; - constructor(editor: ICommonCodeEditor, template: string) { + constructor(editor: ICommonCodeEditor, template: string, overwriteBefore: number = 0, overwriteAfter: number = 0) { this._editor = editor; this._template = template; + this._overwriteBefore = overwriteBefore; + this._overwriteAfter = overwriteAfter; this._snippets = []; } @@ -186,16 +207,17 @@ export class SnippetSession { let model = this._editor.getModel(); for (const selection of this._editor.getSelections()) { - const start = selection.getStartPosition(); + const range = SnippetSession.adjustRange(model, selection, this._overwriteBefore, this._overwriteAfter); + const start = range.getStartPosition(); const adjustedTemplate = SnippetSession.normalizeWhitespace(model, start, this._template); const snippet = SnippetParser.parse(adjustedTemplate); const offset = model.getOffsetAt(start) + delta; - edits.push(EditOperation.replaceMove(selection, snippet.text)); + edits.push(EditOperation.replaceMove(range, snippet.text)); this._snippets.push(new OneSnippet(this._editor, snippet, offset)); - delta += snippet.text.length - model.getValueLengthInRange(selection); + delta += snippet.text.length - model.getValueLengthInRange(range); } // make insert edit and start with first selections diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 7e9eaae9e10f8..84ce4e1e6378a 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -45,7 +45,7 @@ export class SnippetController2 { } insert(template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): void { - const session = new SnippetSession(this._editor, template); + const session = new SnippetSession(this._editor, template, overwriteBefore, overwriteAfter); const newLen = this._snippetStack.unshift(session); if (newLen === 1) { this._inSnippet.set(true); diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts index 9e6ea7b1b23fa..0da0cbbf46749 100644 --- a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts @@ -6,6 +6,7 @@ import * as assert from 'assert'; import { Selection } from 'vs/editor/common/core/selection'; +import { Range } from 'vs/editor/common/core/range'; import { IPosition, Position } from 'vs/editor/common/core/position'; import { SnippetSession } from 'vs/editor/contrib/snippet/browser/editorSnippets'; import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; @@ -51,6 +52,19 @@ suite('SnippetSession', function () { assertNormalized(new Position(2, 3), 'foo\r\tbar', 'foo\n bar'); }); + test('adjust selection (overwrite[Before|After]', function () { + + let range = SnippetSession.adjustRange(model, new Range(1, 2, 1, 2), 1, 0); + assert.ok(range.equalsRange(new Range(1, 1, 1, 2))); + range = SnippetSession.adjustRange(model, new Range(1, 2, 1, 2), 1111, 0); + assert.ok(range.equalsRange(new Range(1, 1, 1, 2))); + range = SnippetSession.adjustRange(model, new Range(1, 2, 1, 2), 0, 10); + assert.ok(range.equalsRange(new Range(1, 2, 1, 12))); + range = SnippetSession.adjustRange(model, new Range(1, 2, 1, 2), 0, 10111); + assert.ok(range.equalsRange(new Range(1, 2, 1, 17))); + + }); + test('text edits & selection', function () { const session = new SnippetSession(editor, 'foo${1:bar}foo$0'); session.insert(); From 0dc762612fdd774195c51ad89609c241480cb6e6 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Tue, 9 May 2017 18:05:53 +0200 Subject: [PATCH 0336/2747] node-debug@1.13.2 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 3214a86b15d4c..c4227104532e7 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -41,7 +41,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.13.1' }, + { name: 'ms-vscode.node-debug', version: '1.13.2' }, { name: 'ms-vscode.node-debug2', version: '1.12.4' } ]; From 4e3702fe9adb7c3dea0930961bf1a590a79b288e Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 9 May 2017 09:08:52 -0700 Subject: [PATCH 0337/2747] Don't allow terminal to overflow to the right of the panel Fixes #26238 --- .../parts/terminal/electron-browser/media/terminal.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css b/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css index 67fe62305c89a..bbd66f6978d2b 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css @@ -18,8 +18,9 @@ .monaco-workbench .panel.integrated-terminal .terminal-outer-container { height: 100%; - padding: 0 20px; + padding-left: 20px; /*Don't use right padding in case xterm.js misbehaves*/ width: 100%; + box-sizing: border-box; } .monaco-workbench .panel.integrated-terminal .terminal-wrapper { From 0f102b9577dd1b8b9c1442d40c4cb4bd5903ce15 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 9 May 2017 18:21:11 +0200 Subject: [PATCH 0338/2747] Code Folding won't be remembered after latest update. (fixes #26157) (#26319) --- .../browser/parts/editor/textEditor.ts | 2 +- src/vs/workbench/common/editor.ts | 2 + .../common/editor/editorStacksModel.ts | 9 ++++- .../files/browser/editors/textFileEditor.ts | 29 +++++++++----- .../test/browser/editorStacksModel.test.ts | 38 ++++++++++++++++++- 5 files changed, 66 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/textEditor.ts b/src/vs/workbench/browser/parts/editor/textEditor.ts index d0f89123f6a41..18033e72569cd 100644 --- a/src/vs/workbench/browser/parts/editor/textEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textEditor.ts @@ -61,7 +61,7 @@ export abstract class BaseTextEditor extends BaseEditor { @IWorkbenchThemeService protected themeService: IWorkbenchThemeService, @IModeService private modeService: IModeService, @ITextFileService private textFileService: ITextFileService, - @IEditorGroupService private editorGroupService: IEditorGroupService + @IEditorGroupService protected editorGroupService: IEditorGroupService ) { super(id, telemetryService, themeService); diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index c89cfe4455b96..c4013c04cad7c 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -844,6 +844,8 @@ export interface IStacksModelChangeEvent { export interface IEditorStacksModel { onModelChanged: Event; + + onWillCloseEditor: Event; onEditorClosed: Event; groups: IEditorGroup[]; diff --git a/src/vs/workbench/common/editor/editorStacksModel.ts b/src/vs/workbench/common/editor/editorStacksModel.ts index 00e7d3722c29c..a81bd7a2fb1b7 100644 --- a/src/vs/workbench/common/editor/editorStacksModel.ts +++ b/src/vs/workbench/common/editor/editorStacksModel.ts @@ -703,6 +703,7 @@ export class EditorStacksModel implements IEditorStacksModel { private _onEditorDirty: Emitter; private _onEditorLabelChange: Emitter; private _onEditorOpened: Emitter; + private _onWillCloseEditor: Emitter; private _onEditorClosed: Emitter; private _onModelChanged: Emitter; @@ -728,9 +729,10 @@ export class EditorStacksModel implements IEditorStacksModel { this._onEditorDirty = new Emitter(); this._onEditorLabelChange = new Emitter(); this._onEditorOpened = new Emitter(); + this._onWillCloseEditor = new Emitter(); this._onEditorClosed = new Emitter(); - this.toDispose.push(this._onGroupOpened, this._onGroupClosed, this._onGroupActivated, this._onGroupDeactivated, this._onGroupMoved, this._onGroupRenamed, this._onModelChanged, this._onEditorDisposed, this._onEditorDirty, this._onEditorLabelChange, this._onEditorClosed); + this.toDispose.push(this._onGroupOpened, this._onGroupClosed, this._onGroupActivated, this._onGroupDeactivated, this._onGroupMoved, this._onGroupRenamed, this._onModelChanged, this._onEditorDisposed, this._onEditorDirty, this._onEditorLabelChange, this._onEditorClosed, this._onWillCloseEditor); this.registerListeners(); } @@ -783,6 +785,10 @@ export class EditorStacksModel implements IEditorStacksModel { return this._onEditorOpened.event; } + public get onWillCloseEditor(): Event { + return this._onWillCloseEditor.event; + } + public get onEditorClosed(): Event { return this._onEditorClosed.event; } @@ -1155,6 +1161,7 @@ export class EditorStacksModel implements IEditorStacksModel { unbind.push(group.onEditorStateChanged(editor => this._onModelChanged.fire({ group, editor }))); unbind.push(group.onEditorOpened(editor => this._onEditorOpened.fire({ editor, group }))); unbind.push(group.onEditorClosed(event => { + this._onWillCloseEditor.fire({ editor: event.editor, group }); this.handleOnEditorClosed(event); this._onEditorClosed.fire(event); })); diff --git a/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts b/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts index ec7f682e99c50..c624ee237af74 100644 --- a/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts +++ b/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts @@ -14,7 +14,7 @@ import { Action } from 'vs/base/common/actions'; import { VIEWLET_ID, TEXT_FILE_EDITOR_ID } from 'vs/workbench/parts/files/common/files'; import { ITextFileEditorModel, ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor'; -import { EditorOptions, TextEditorOptions } from 'vs/workbench/common/editor'; +import { EditorOptions, TextEditorOptions, IEditorIdentifier } from 'vs/workbench/common/editor'; import { BinaryEditorModel } from 'vs/workbench/common/editor/binaryEditorModel'; import { FileEditorInput } from 'vs/workbench/parts/files/common/editors/fileEditorInput'; import { ExplorerViewlet } from 'vs/workbench/parts/files/browser/explorerViewlet'; @@ -58,6 +58,9 @@ export class TextFileEditor extends BaseTextEditor { // Clear view state for deleted files this.toUnbind.push(this.fileService.onFileChanges(e => this.onFilesChanged(e))); + + // React to editors closing to preserve view state + this.toUnbind.push(editorGroupService.getStacksModel().onWillCloseEditor(e => this.onWillCloseEditor(e))); } private onFilesChanged(e: FileChangesEvent): void { @@ -67,6 +70,12 @@ export class TextFileEditor extends BaseTextEditor { } } + private onWillCloseEditor(e: IEditorIdentifier): void { + if (e.editor === this.input && this.position === this.editorGroupService.getStacksModel().positionOfGroup(e.group)) { + this.doSaveTextEditorViewState(this.input); + } + } + public getTitle(): string { return this.input ? this.input.getName() : nls.localize('textFileEditor', "Text File Editor"); } @@ -104,9 +113,7 @@ export class TextFileEditor extends BaseTextEditor { } // Remember view settings if input changes - if (oldInput) { - this.saveTextEditorViewState(oldInput.getResource().toString()); - } + this.doSaveTextEditorViewState(oldInput); // Different Input (Reload) return input.resolve(true).then(resolvedModel => { @@ -224,9 +231,7 @@ export class TextFileEditor extends BaseTextEditor { public clearInput(): void { // Keep editor view state in settings to restore when coming back - if (this.input) { - this.saveTextEditorViewState(this.input.getResource().toString()); - } + this.doSaveTextEditorViewState(this.input); // Clear Model this.getControl().setModel(null); @@ -238,11 +243,15 @@ export class TextFileEditor extends BaseTextEditor { public shutdown(): void { // Save View State - if (this.input) { - this.saveTextEditorViewState(this.input.getResource().toString()); - } + this.doSaveTextEditorViewState(this.input); // Call Super super.shutdown(); } + + private doSaveTextEditorViewState(input: FileEditorInput): void { + if (input && !input.isDisposed()) { + this.saveTextEditorViewState(input.getResource().toString()); + } + } } \ No newline at end of file diff --git a/src/vs/workbench/test/browser/editorStacksModel.test.ts b/src/vs/workbench/test/browser/editorStacksModel.test.ts index 9cc08d0d96303..0593fc06d5410 100644 --- a/src/vs/workbench/test/browser/editorStacksModel.test.ts +++ b/src/vs/workbench/test/browser/editorStacksModel.test.ts @@ -7,7 +7,7 @@ import * as assert from 'assert'; import { EditorStacksModel, EditorGroup, GroupEvent } from 'vs/workbench/common/editor/editorStacksModel'; -import { EditorInput, IFileEditorInput, IEditorIdentifier, IEditorGroup, IStacksModelChangeEvent, IEditorRegistry, Extensions as EditorExtensions, IEditorInputFactory } from 'vs/workbench/common/editor'; +import { EditorInput, IFileEditorInput, IEditorIdentifier, IEditorGroup, IStacksModelChangeEvent, IEditorRegistry, Extensions as EditorExtensions, IEditorInputFactory, IGroupEvent } from 'vs/workbench/common/editor'; import URI from 'vs/base/common/uri'; import { TestStorageService, TestLifecycleService, TestContextService } from 'vs/workbench/test/workbenchTestServices'; import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; @@ -47,6 +47,8 @@ interface ModelEvents { renamed: IEditorGroup[]; disposed: IEditorIdentifier[]; changed: IStacksModelChangeEvent[]; + editorClosed: IGroupEvent[]; + editorWillClose: IEditorIdentifier[]; } interface GroupEvents { @@ -66,7 +68,9 @@ function modelListener(model: EditorStacksModel): ModelEvents { moved: [], renamed: [], disposed: [], - changed: [] + changed: [], + editorClosed: [], + editorWillClose: [] }; model.onGroupOpened(g => modelEvents.opened.push(g)); @@ -76,6 +80,8 @@ function modelListener(model: EditorStacksModel): ModelEvents { model.onGroupRenamed(g => modelEvents.renamed.push(g)); model.onEditorDisposed(e => modelEvents.disposed.push(e)); model.onModelChanged(e => modelEvents.changed.push(e)); + model.onWillCloseEditor(e => modelEvents.editorWillClose.push(e)); + model.onEditorClosed(e => modelEvents.editorClosed.push(e)); return modelEvents; } @@ -1671,6 +1677,7 @@ suite('Editor Stacks Model', () => { test('Stack - Multiple Editors - Editor Disposed on Close', function () { const model = create(); + const events = modelListener(model); const group1 = model.openGroup('group1'); const group2 = model.openGroup('group2'); @@ -1687,6 +1694,13 @@ suite('Editor Stacks Model', () => { group1.closeEditor(input3); + assert.equal(events.editorClosed.length, 1); + assert.equal(events.editorClosed[0].editor, input3); + + assert.equal(events.editorWillClose.length, 1); + assert.equal(events.editorWillClose[0].editor, input3); + assert.equal(events.editorWillClose[0].group, group1); + assert.equal(input3.isDisposed(), true); group2.openEditor(input2, { pinned: true, active: true }); @@ -1695,18 +1709,38 @@ suite('Editor Stacks Model', () => { group1.closeEditor(input2); + assert.equal(events.editorClosed.length, 2); + assert.equal(events.editorClosed[1].editor, input2); + + assert.equal(events.editorWillClose.length, 2); + assert.equal(events.editorWillClose[1].editor, input2); + assert.equal(events.editorWillClose[1].group, group1); + assert.equal(input2.isDisposed(), false); group2.closeEditor(input2); + assert.equal(events.editorClosed.length, 3); + assert.equal(events.editorClosed[2].editor, input2); + + assert.equal(events.editorWillClose.length, 3); + assert.equal(events.editorWillClose[2].editor, input2); + assert.equal(events.editorWillClose[2].group, group2); + assert.equal(input2.isDisposed(), true); group1.closeAllEditors(); + assert.equal(events.editorClosed.length, 5); + assert.equal(events.editorWillClose.length, 5); + assert.equal(input4.isDisposed(), false); model.closeGroups(); + assert.equal(events.editorClosed.length, 7); + assert.equal(events.editorWillClose.length, 7); + assert.equal(input4.isDisposed(), true); }); From c94789c509a8d85400d3d94bc70c8456af1b0a09 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 9 May 2017 11:17:16 -0700 Subject: [PATCH 0339/2747] Add Filename to JS/TS Workspace Symbol Search Fixes #22357 Adds file name to the workspace symbol results for JS and TS --- .../src/features/workspaceSymbolProvider.ts | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/extensions/typescript/src/features/workspaceSymbolProvider.ts b/extensions/typescript/src/features/workspaceSymbolProvider.ts index 625c2d1c4ba9e..ccc115752af99 100644 --- a/extensions/typescript/src/features/workspaceSymbolProvider.ts +++ b/extensions/typescript/src/features/workspaceSymbolProvider.ts @@ -7,6 +7,8 @@ import { workspace, window, Uri, WorkspaceSymbolProvider, SymbolInformation, SymbolKind, Range, Location, CancellationToken } from 'vscode'; +import * as path from 'path'; + import * as Proto from '../protocol'; import { ITypescriptServiceClient } from '../typescriptService'; @@ -28,7 +30,7 @@ export default class TypeScriptWorkspaceSymbolProvider implements WorkspaceSymbo // general questions so we check the active editor. If this // doesn't match we take the first TS document. let uri: Uri | undefined = undefined; - let editor = window.activeTextEditor; + const editor = window.activeTextEditor; if (editor) { let document = editor.document; if (document && document.languageId === this.modeId) { @@ -53,34 +55,39 @@ export default class TypeScriptWorkspaceSymbolProvider implements WorkspaceSymbo if (!filepath) { return Promise.resolve([]); } - let args: Proto.NavtoRequestArgs = { + const args: Proto.NavtoRequestArgs = { file: filepath, searchValue: search }; - if (!args.file) { - return Promise.resolve([]); - } return this.client.execute('navto', args, token).then((response): SymbolInformation[] => { let data = response.body; if (data) { - let result: SymbolInformation[] = []; + const result: SymbolInformation[] = []; for (let item of data) { if (!item.containerName && item.kind === 'alias') { continue; } - let range = new Range(item.start.line - 1, item.start.offset - 1, item.end.line - 1, item.end.offset - 1); + const range = new Range(item.start.line - 1, item.start.offset - 1, item.end.line - 1, item.end.offset - 1); let label = item.name; if (item.kind === 'method' || item.kind === 'function') { label += '()'; } - result.push(new SymbolInformation(label, _kindMapping[item.kind], item.containerName ? item.containerName : '', - new Location(this.client.asUrl(item.file), range))); + const containerNameParts: string[] = []; + if (item.containerName) { + containerNameParts.push(item.containerName); + } + const fileUri = this.client.asUrl(item.file); + const fileName = path.basename(fileUri.fsPath); + if (fileName) { + containerNameParts.push(fileName); + } + result.push(new SymbolInformation(label, _kindMapping[item.kind], containerNameParts.join(' — '), + new Location(fileUri, range))); } return result; } else { return []; } - }, (err) => { this.client.error(`'navto' request failed with error.`, err); return []; From e2d6ff6181a37c32c39df2c596f32d91a6b273d9 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 9 May 2017 11:43:21 -0700 Subject: [PATCH 0340/2747] =?UTF-8?q?=F0=9F=92=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/features/workspaceSymbolProvider.ts | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/extensions/typescript/src/features/workspaceSymbolProvider.ts b/extensions/typescript/src/features/workspaceSymbolProvider.ts index ccc115752af99..c8a192726e7e5 100644 --- a/extensions/typescript/src/features/workspaceSymbolProvider.ts +++ b/extensions/typescript/src/features/workspaceSymbolProvider.ts @@ -12,13 +12,17 @@ import * as path from 'path'; import * as Proto from '../protocol'; import { ITypescriptServiceClient } from '../typescriptService'; -const _kindMapping: { [kind: string]: SymbolKind } = Object.create(null); -_kindMapping['method'] = SymbolKind.Method; -_kindMapping['enum'] = SymbolKind.Enum; -_kindMapping['function'] = SymbolKind.Function; -_kindMapping['class'] = SymbolKind.Class; -_kindMapping['interface'] = SymbolKind.Interface; -_kindMapping['var'] = SymbolKind.Variable; +function getSymbolKind(item: Proto.NavtoItem): SymbolKind { + switch (item.kind) { + case 'method': return SymbolKind.Method; + case 'enum': return SymbolKind.Enum; + case 'function': return SymbolKind.Function; + case 'class': return SymbolKind.Class; + case 'interface': return SymbolKind.Interface; + case 'var': return SymbolKind.Variable; + default: return SymbolKind.Variable; + } +} export default class TypeScriptWorkspaceSymbolProvider implements WorkspaceSymbolProvider { public constructor( @@ -32,14 +36,14 @@ export default class TypeScriptWorkspaceSymbolProvider implements WorkspaceSymbo let uri: Uri | undefined = undefined; const editor = window.activeTextEditor; if (editor) { - let document = editor.document; + const document = editor.document; if (document && document.languageId === this.modeId) { uri = document.uri; } } if (!uri) { - let documents = workspace.textDocuments; - for (let document of documents) { + const documents = workspace.textDocuments; + for (const document of documents) { if (document.languageId === this.modeId) { uri = document.uri; break; @@ -60,9 +64,9 @@ export default class TypeScriptWorkspaceSymbolProvider implements WorkspaceSymbo searchValue: search }; return this.client.execute('navto', args, token).then((response): SymbolInformation[] => { + const result: SymbolInformation[] = []; let data = response.body; if (data) { - const result: SymbolInformation[] = []; for (let item of data) { if (!item.containerName && item.kind === 'alias') { continue; @@ -81,13 +85,11 @@ export default class TypeScriptWorkspaceSymbolProvider implements WorkspaceSymbo if (fileName) { containerNameParts.push(fileName); } - result.push(new SymbolInformation(label, _kindMapping[item.kind], containerNameParts.join(' — '), + result.push(new SymbolInformation(label, getSymbolKind(item), containerNameParts.join(' — '), new Location(fileUri, range))); } - return result; - } else { - return []; } + return result; }, (err) => { this.client.error(`'navto' request failed with error.`, err); return []; From d529e3e07be26346fd62c9706f1c4581b2b48de3 Mon Sep 17 00:00:00 2001 From: rebornix Date: Tue, 9 May 2017 11:49:06 -0700 Subject: [PATCH 0341/2747] Fix #26274. Guard Editor command args --- src/vs/editor/common/editorCommonExtensions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/common/editorCommonExtensions.ts b/src/vs/editor/common/editorCommonExtensions.ts index f9f6e49c9703e..cc2cac81cef88 100644 --- a/src/vs/editor/common/editorCommonExtensions.ts +++ b/src/vs/editor/common/editorCommonExtensions.ts @@ -64,7 +64,7 @@ export abstract class EditorAction extends ConfigEditorCommand { public runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void | TPromise { this.reportTelemetry(accessor, editor); - return this.run(accessor, editor, args); + return this.run(accessor, editor, args || {}); } protected reportTelemetry(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor) { From 8984ed3036fd125548639b65fe3ac95ea479b26c Mon Sep 17 00:00:00 2001 From: rebornix Date: Tue, 9 May 2017 14:42:35 -0700 Subject: [PATCH 0342/2747] Fix #26336. Convert Enum numbers to String --- .../editor/common/config/commonEditorConfig.ts | 4 ++-- src/vs/editor/common/config/editorOptions.ts | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 172b427f1b3e2..6256a8ac91904 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -438,7 +438,7 @@ const editorConfiguration: IConfigurationNode = { 'editor.cursorBlinking': { 'type': 'string', 'enum': ['blink', 'smooth', 'phase', 'expand', 'solid'], - 'default': EDITOR_DEFAULTS.viewInfo.cursorBlinking, + 'default': editorOptions.blinkingStyleToString(EDITOR_DEFAULTS.viewInfo.cursorBlinking), 'description': nls.localize('cursorBlinking', "Control the cursor animation style, possible values are 'blink', 'smooth', 'phase', 'expand' and 'solid'") }, 'editor.mouseWheelZoom': { @@ -449,7 +449,7 @@ const editorConfiguration: IConfigurationNode = { 'editor.cursorStyle': { 'type': 'string', 'enum': ['block', 'block-outline', 'line', 'line-thin', 'underline', 'underline-thin'], - 'default': EDITOR_DEFAULTS.viewInfo.cursorStyle, + 'default': editorOptions.cursorStyleToString(EDITOR_DEFAULTS.viewInfo.cursorStyle), 'description': nls.localize('cursorStyle', "Controls the cursor style, accepted values are 'block', 'block-outline', 'line', 'line-thin', 'underline' and 'underline-thin'") }, 'editor.fontLigatures': { diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 2382447705c1b..de990d726b40a 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -559,6 +559,24 @@ export enum TextEditorCursorBlinkingStyle { */ Solid = 5 } +/** + * @internal + */ +export function blinkingStyleToString(blinkingStyle: TextEditorCursorBlinkingStyle): string { + if (blinkingStyle === TextEditorCursorBlinkingStyle.Blink) { + return 'blink'; + } else if (blinkingStyle === TextEditorCursorBlinkingStyle.Expand) { + return 'expand'; + } else if (blinkingStyle === TextEditorCursorBlinkingStyle.Phase) { + return 'phase'; + } else if (blinkingStyle === TextEditorCursorBlinkingStyle.Smooth) { + return 'smooth'; + } else if (blinkingStyle === TextEditorCursorBlinkingStyle.Solid) { + return 'solid'; + } else { + throw new Error('blinkingStyleToString: Unknown blinkingStyle'); + } +} /** * The style in which the editor's cursor should be rendered. From 946e7ebb2fe61ac36baaf6c346c767adfb438c77 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 9 May 2017 14:41:39 -0700 Subject: [PATCH 0343/2747] Reveal TS Server log file in os instead of opening log in explorer. Fixes #25908 --- extensions/typescript/package.nls.json | 2 +- .../typescript/src/typescriptServiceClient.ts | 21 ++++++------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/extensions/typescript/package.nls.json b/extensions/typescript/package.nls.json index 78103b9093938..2217759f722c1 100644 --- a/extensions/typescript/package.nls.json +++ b/extensions/typescript/package.nls.json @@ -30,7 +30,7 @@ "javascript.goToProjectConfig.title": "Go to Project Configuration", "typescript.referencesCodeLens.enabled": "Enable/disable references CodeLens. Requires TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Enable/disable implementations CodeLens. Requires TypeScript >= 2.2.0.", - "typescript.openTsServerLog.title": "Open TS Server log file", + "typescript.openTsServerLog.title": "Open TS Server log", "typescript.selectTypeScriptVersion.title": "Select TypeScript Version", "jsDocCompletion.enabled": "Enable/disable auto JSDoc comments", "javascript.implicitProjectConfig.checkJs": "Enable/disable semantic checking of JavaScript files. Existing jsconfig.json or tsconfig.json files override this setting. Requires TypeScript >=2.3.1.", diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 71e7e2adf160e..f6292a584ca2f 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -741,21 +741,12 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient 'TS Server has not started logging.')).then(() => false); } - return workspace.openTextDocument(this.tsServerLogFile) - .then(doc => { - if (!doc) { - return false; - } - return window.showTextDocument(doc, window.activeTextEditor ? window.activeTextEditor.viewColumn : undefined) - .then(editor => !!editor); - }, () => false) - .then(didOpen => { - if (!didOpen) { - window.showWarningMessage(localize( - 'openTsServerLog.openFileFailedFailed', - 'Could not open TS Server log file')); - } - return didOpen; + return commands.executeCommand('_workbench.action.files.revealInOS', Uri.parse(this.tsServerLogFile)) + .then(() => true, () => { + window.showWarningMessage(localize( + 'openTsServerLog.openFileFailedFailed', + 'Could not open TS Server log file')); + return false; }); } From 1d6e311998b83dfa6fd05fe5d2f2a2cd130442a4 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 9 May 2017 23:32:24 +0200 Subject: [PATCH 0344/2747] Move viewLayout management into viewModel --- .../editor/browser/controller/mouseHandler.ts | 26 ++--- .../editor/browser/controller/mouseTarget.ts | 18 ++-- .../browser/controller/pointerHandler.ts | 21 ++-- .../browser/controller/textAreaHandler.ts | 16 ++- src/vs/editor/browser/view/viewImpl.ts | 99 +++++-------------- .../editorScrollbar/editorScrollbar.ts | 3 +- .../browser/viewParts/lines/viewLines.ts | 30 +++--- .../browser/viewParts/minimap/minimap.ts | 14 ++- .../browser/viewParts/viewZones/viewZones.ts | 17 ++-- src/vs/editor/common/view/viewContext.ts | 4 +- src/vs/editor/common/viewLayout/viewLayout.ts | 53 +++++----- .../common/viewModel/splitLinesCollection.ts | 44 ++++----- src/vs/editor/common/viewModel/viewModel.ts | 25 ++++- .../common/viewModel/viewModelCursors.ts | 6 +- .../editor/common/viewModel/viewModelImpl.ts | 71 ++++++++++--- .../viewModel/splitLinesCollection.test.ts | 8 +- 16 files changed, 216 insertions(+), 239 deletions(-) diff --git a/src/vs/editor/browser/controller/mouseHandler.ts b/src/vs/editor/browser/controller/mouseHandler.ts index aaa0a3203e8d7..674dbf1c09049 100644 --- a/src/vs/editor/browser/controller/mouseHandler.ts +++ b/src/vs/editor/browser/controller/mouseHandler.ts @@ -10,7 +10,6 @@ import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; import { Position } from 'vs/editor/common/core/position'; import { Selection } from 'vs/editor/common/core/selection'; -import * as editorCommon from 'vs/editor/common/editorCommon'; import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler'; import { MouseTarget, MouseTargetFactory, IViewZoneData } from 'vs/editor/browser/controller/mouseTarget'; import * as editorBrowser from 'vs/editor/browser/editorBrowser'; @@ -22,7 +21,6 @@ import { StandardMouseWheelEvent } from 'vs/base/browser/mouseEvent'; import { EditorZoom } from 'vs/editor/common/config/editorZoom'; import { IViewCursorRenderData } from 'vs/editor/browser/viewParts/viewCursors/viewCursor'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { IViewWhitespaceViewportData } from 'vs/editor/common/viewModel/viewModel'; import { ViewController } from 'vs/editor/browser/view/viewController'; /** @@ -47,16 +45,6 @@ export interface IPointerHandlerHelper { focusTextArea(): void; - getScrollLeft(): number; - getScrollTop(): number; - - setScrollPosition(position: editorCommon.INewScrollPosition): void; - - isAfterLines(verticalOffset: number): boolean; - getLineNumberAtVerticalOffset(verticalOffset: number): number; - getVerticalOffsetForLineNumber(lineNumber: number): number; - getWhitespaceAtVerticalOffset(verticalOffset: number): IViewWhitespaceViewportData; - /** * Get the last rendered information of the cursors. */ @@ -433,27 +421,29 @@ class MouseDownOperation extends Disposable { private _getPositionOutsideEditor(e: EditorMouseEvent): MouseTarget { const editorContent = e.editorPos; + const model = this._context.model; + const viewLayout = this._context.viewLayout; - let mouseColumn = this._getMouseColumn(e); + const mouseColumn = this._getMouseColumn(e); if (e.posy < editorContent.y) { - let aboveLineNumber = this._viewHelper.getLineNumberAtVerticalOffset(Math.max(this._viewHelper.getScrollTop() - (editorContent.y - e.posy), 0)); + let aboveLineNumber = viewLayout.getLineNumberAtVerticalOffset(Math.max(viewLayout.getScrollTop() - (editorContent.y - e.posy), 0)); return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, new Position(aboveLineNumber, 1)); } if (e.posy > editorContent.y + editorContent.height) { - let belowLineNumber = this._viewHelper.getLineNumberAtVerticalOffset(this._viewHelper.getScrollTop() + (e.posy - editorContent.y)); - return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, new Position(belowLineNumber, this._context.model.getLineMaxColumn(belowLineNumber))); + let belowLineNumber = viewLayout.getLineNumberAtVerticalOffset(viewLayout.getScrollTop() + (e.posy - editorContent.y)); + return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, new Position(belowLineNumber, model.getLineMaxColumn(belowLineNumber))); } - let possibleLineNumber = this._viewHelper.getLineNumberAtVerticalOffset(this._viewHelper.getScrollTop() + (e.posy - editorContent.y)); + let possibleLineNumber = viewLayout.getLineNumberAtVerticalOffset(viewLayout.getScrollTop() + (e.posy - editorContent.y)); if (e.posx < editorContent.x) { return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, new Position(possibleLineNumber, 1)); } if (e.posx > editorContent.x + editorContent.width) { - return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, new Position(possibleLineNumber, this._context.model.getLineMaxColumn(possibleLineNumber))); + return new MouseTarget(null, editorBrowser.MouseTargetType.OUTSIDE_EDITOR, mouseColumn, new Position(possibleLineNumber, model.getLineMaxColumn(possibleLineNumber))); } return null; diff --git a/src/vs/editor/browser/controller/mouseTarget.ts b/src/vs/editor/browser/controller/mouseTarget.ts index 253c5bc8421af..b91b491be6bcd 100644 --- a/src/vs/editor/browser/controller/mouseTarget.ts +++ b/src/vs/editor/browser/controller/mouseTarget.ts @@ -228,7 +228,7 @@ class HitTestContext { public getZoneAtCoord(mouseVerticalOffset: number): IViewZoneData { // The target is either a view zone or the empty space after the last view-line - let viewZoneWhitespace = this._viewHelper.getWhitespaceAtVerticalOffset(mouseVerticalOffset); + let viewZoneWhitespace = this._context.viewLayout.getWhitespaceAtVerticalOffset(mouseVerticalOffset); if (viewZoneWhitespace) { let viewZoneMiddle = viewZoneWhitespace.verticalOffset + viewZoneWhitespace.height / 2, @@ -268,7 +268,7 @@ class HitTestContext { } public getFullLineRangeAtCoord(mouseVerticalOffset: number): { range: EditorRange; isAfterLines: boolean; } { - if (this._viewHelper.isAfterLines(mouseVerticalOffset)) { + if (this._context.viewLayout.isAfterLines(mouseVerticalOffset)) { // Below the last line let lineNumber = this._context.model.getLineCount(); let maxLineColumn = this._context.model.getLineMaxColumn(lineNumber); @@ -278,7 +278,7 @@ class HitTestContext { }; } - let lineNumber = this._viewHelper.getLineNumberAtVerticalOffset(mouseVerticalOffset); + let lineNumber = this._context.viewLayout.getLineNumberAtVerticalOffset(mouseVerticalOffset); let maxLineColumn = this._context.model.getLineMaxColumn(lineNumber); return { range: new EditorRange(lineNumber, 1, lineNumber, maxLineColumn), @@ -287,15 +287,15 @@ class HitTestContext { } public getLineNumberAtVerticalOffset(mouseVerticalOffset: number): number { - return this._viewHelper.getLineNumberAtVerticalOffset(mouseVerticalOffset); + return this._context.viewLayout.getLineNumberAtVerticalOffset(mouseVerticalOffset); } public isAfterLines(mouseVerticalOffset: number): boolean { - return this._viewHelper.isAfterLines(mouseVerticalOffset); + return this._context.viewLayout.isAfterLines(mouseVerticalOffset); } public getVerticalOffsetForLineNumber(lineNumber: number): number { - return this._viewHelper.getVerticalOffsetForLineNumber(lineNumber); + return this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber); } public findAttribute(element: Element, attr: string): string { @@ -328,11 +328,11 @@ class HitTestContext { } public getScrollTop(): number { - return this._viewHelper.getScrollTop(); + return this._context.viewLayout.getScrollTop(); } public getScrollLeft(): number { - return this._viewHelper.getScrollLeft(); + return this._context.viewLayout.getScrollLeft(); } } @@ -649,7 +649,7 @@ export class MouseTargetFactory { public getMouseColumn(editorPos: EditorPagePosition, pos: PageCoordinates): number { let layoutInfo = this._context.configuration.editor.layoutInfo; - let mouseContentHorizontalOffset = this._viewHelper.getScrollLeft() + pos.x - editorPos.x - layoutInfo.contentLeft; + let mouseContentHorizontalOffset = this._context.viewLayout.getScrollLeft() + pos.x - editorPos.x - layoutInfo.contentLeft; return MouseTargetFactory._getMouseColumn(mouseContentHorizontalOffset, this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth); } diff --git a/src/vs/editor/browser/controller/pointerHandler.ts b/src/vs/editor/browser/controller/pointerHandler.ts index 96f6c01434370..fdd809a2e1a8f 100644 --- a/src/vs/editor/browser/controller/pointerHandler.ts +++ b/src/vs/editor/browser/controller/pointerHandler.ts @@ -99,9 +99,10 @@ class MsPointerHandler extends MouseHandler implements IDisposable { } private _onGestureChange(e: IThrottledGestureEvent): void { - this.viewHelper.setScrollPosition({ - scrollLeft: this.viewHelper.getScrollLeft() - e.translationX, - scrollTop: this.viewHelper.getScrollTop() - e.translationY, + const viewLayout = this._context.viewLayout; + viewLayout.setScrollPosition({ + scrollLeft: viewLayout.getScrollLeft() - e.translationX, + scrollTop: viewLayout.getScrollTop() - e.translationY, }); } @@ -180,9 +181,10 @@ class StandardPointerHandler extends MouseHandler implements IDisposable { } private _onGestureChange(e: IThrottledGestureEvent): void { - this.viewHelper.setScrollPosition({ - scrollLeft: this.viewHelper.getScrollLeft() - e.translationX, - scrollTop: this.viewHelper.getScrollTop() - e.translationY, + const viewLayout = this._context.viewLayout; + viewLayout.setScrollPosition({ + scrollLeft: viewLayout.getScrollLeft() - e.translationX, + scrollTop: viewLayout.getScrollTop() - e.translationY, }); } @@ -225,9 +227,10 @@ class TouchHandler extends MouseHandler { } private onChange(e: GestureEvent): void { - this.viewHelper.setScrollPosition({ - scrollLeft: this.viewHelper.getScrollLeft() - e.translationX, - scrollTop: this.viewHelper.getScrollTop() - e.translationY, + const viewLayout = this._context.viewLayout; + viewLayout.setScrollPosition({ + scrollLeft: viewLayout.getScrollLeft() - e.translationX, + scrollTop: viewLayout.getScrollTop() - e.translationY, }); } } diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index f7b6e2e4415b2..420e4bfafbce3 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -27,10 +27,9 @@ import { BareFontInfo } from "vs/editor/common/config/fontInfo"; export interface ITextAreaHandlerHelper { visibleRangeForPositionRelativeToEditor(lineNumber: number, column: number): HorizontalRange; - getVerticalOffsetForLineNumber(lineNumber: number): number; } -class VisibleTextArea { +class VisibleTextAreaData { _visibleTextAreaBrand: void; public readonly top: number; @@ -43,8 +42,8 @@ class VisibleTextArea { this.width = width; } - public setWidth(width: number): VisibleTextArea { - return new VisibleTextArea(this.top, this.left, width); + public setWidth(width: number): VisibleTextAreaData { + return new VisibleTextAreaData(this.top, this.left, width); } } @@ -67,7 +66,7 @@ export class TextAreaHandler extends ViewPart { /** * Defined only when the text area is visible (composition case). */ - private _visibleTextArea: VisibleTextArea; + private _visibleTextArea: VisibleTextAreaData; private _selections: Selection[]; private _lastCopiedValue: string; private _lastCopiedValueIsFromEmptySelection: boolean; @@ -79,7 +78,6 @@ export class TextAreaHandler extends ViewPart { constructor(context: ViewContext, viewController: ViewController, viewHelper: ITextAreaHandlerHelper) { super(context); - this._context = context; this._viewController = viewController; this._viewHelper = viewHelper; @@ -211,8 +209,8 @@ export class TextAreaHandler extends ViewPart { const visibleRange = this._viewHelper.visibleRangeForPositionRelativeToEditor(lineNumber, column); if (visibleRange) { - this._visibleTextArea = new VisibleTextArea( - this._viewHelper.getVerticalOffsetForLineNumber(lineNumber), + this._visibleTextArea = new VisibleTextAreaData( + this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber), visibleRange.left, canUseZeroSizeTextarea ? 0 : 1 ); @@ -379,7 +377,7 @@ export class TextAreaHandler extends ViewPart { return; } - const top = this._viewHelper.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber) - this._scrollTop; + const top = this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber) - this._scrollTop; if (top < 0 || top > this._contentHeight) { // cursor is outside the viewport this._renderAtTopLeft(); diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index edd209d5c4ff7..6882b9ee36b4f 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -20,7 +20,6 @@ import * as editorBrowser from 'vs/editor/browser/editorBrowser'; import { ViewController, ExecCoreEditorCommandFunc } from 'vs/editor/browser/view/viewController'; import { ViewEventDispatcher } from 'vs/editor/common/view/viewEventDispatcher'; import { ContentViewOverlays, MarginViewOverlays } from 'vs/editor/browser/view/viewOverlays'; -import { ViewLayout } from 'vs/editor/common/viewLayout/viewLayout'; import { ViewContentWidgets } from 'vs/editor/browser/viewParts/contentWidgets/contentWidgets'; import { CurrentLineHighlightOverlay } from 'vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight'; import { CurrentLineMarginHighlightOverlay } from 'vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight'; @@ -66,7 +65,6 @@ export class View extends ViewEventHandler { private eventDispatcher: ViewEventDispatcher; - private layoutProvider: ViewLayout; private _scrollbar: EditorScrollbar; private _context: ViewContext; @@ -114,12 +112,6 @@ export class View extends ViewEventHandler { // Ensure the view is the first event handler in order to update the layout this.eventDispatcher.addEventHandler(this); - // The layout provider has such responsibilities as: - // - scrolling (i.e. viewport / full size) & co. - // - whitespaces (a.k.a. view zones) management & co. - // - line heights updating & co. - this.layoutProvider = new ViewLayout(configuration, model.getLineCount(), this.eventDispatcher); - // The view context is passed on to most classes (basically to reduce param. counts in ctors) this._context = new ViewContext(configuration, model, this.eventDispatcher); @@ -153,20 +145,20 @@ export class View extends ViewEventHandler { PartFingerprints.write(this.overflowGuardContainer, PartFingerprint.OverflowGuard); this.overflowGuardContainer.setClassName('overflow-guard'); - this._scrollbar = new EditorScrollbar(this._context, this.layoutProvider.getScrollable(), this.linesContent, this.domNode, this.overflowGuardContainer); + this._scrollbar = new EditorScrollbar(this._context, this.linesContent, this.domNode, this.overflowGuardContainer); this.viewParts.push(this._scrollbar); // View Lines - this.viewLines = new ViewLines(this._context, this.linesContent, this.layoutProvider); + this.viewLines = new ViewLines(this._context, this.linesContent); // View Zones - this.viewZones = new ViewZones(this._context, this.layoutProvider); + this.viewZones = new ViewZones(this._context); this.viewParts.push(this.viewZones); // Decorations overview ruler let decorationsOverviewRuler = new DecorationsOverviewRuler( - this._context, this.layoutProvider.getScrollHeight(), - (lineNumber: number) => this.layoutProvider.getVerticalOffsetForLineNumber(lineNumber) + this._context, this._context.viewLayout.getScrollHeight(), + (lineNumber: number) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber) ); this.viewParts.push(decorationsOverviewRuler); @@ -208,7 +200,7 @@ export class View extends ViewEventHandler { let rulers = new Rulers(this._context); this.viewParts.push(rulers); - let minimap = new Minimap(this._context, this.layoutProvider, this._scrollbar); + let minimap = new Minimap(this._context, this._scrollbar); this.viewParts.push(minimap); // -------------- Wire dom nodes up @@ -248,29 +240,6 @@ export class View extends ViewEventHandler { this.focus(); }, - getScrollLeft: () => { - return this.layoutProvider.getScrollLeft(); - }, - getScrollTop: () => { - return this.layoutProvider.getScrollTop(); - }, - - setScrollPosition: (position: editorCommon.INewScrollPosition) => { - this.layoutProvider.setScrollPosition(position); - }, - - isAfterLines: (verticalOffset: number) => { - return this.layoutProvider.isAfterLines(verticalOffset); - }, - getLineNumberAtVerticalOffset: (verticalOffset: number) => { - return this.layoutProvider.getLineNumberAtVerticalOffset(verticalOffset); - }, - getVerticalOffsetForLineNumber: (lineNumber: number) => { - return this.layoutProvider.getVerticalOffsetForLineNumber(lineNumber); - }, - getWhitespaceAtVerticalOffset: (verticalOffset: number) => { - return this.layoutProvider.getWhitespaceAtVerticalOffset(verticalOffset); - }, getLastViewCursorsRenderData: () => { return this.viewCursors.getLastRenderData() || []; }, @@ -310,9 +279,6 @@ export class View extends ViewEventHandler { return null; } return visibleRanges[0]; - }, - getVerticalOffsetForLineNumber: (lineNumber: number) => { - return this.layoutProvider.getVerticalOffsetForLineNumber(lineNumber); } }; } @@ -346,11 +312,6 @@ export class View extends ViewEventHandler { if (e.layoutInfo) { this._setLayout(); } - this.layoutProvider.onConfigurationChanged(e); - return false; - } - public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { - this.layoutProvider.onFlushed(this._context.model.getLineCount()); return false; } public onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean { @@ -362,24 +323,10 @@ export class View extends ViewEventHandler { } return false; } - public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { - this.layoutProvider.onLinesDeleted(e); - return false; - } - public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): boolean { - this.layoutProvider.onLinesInserted(e); - return false; - } public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { this.outgoingEvents.emitScrollChanged(e); return false; } - public onScrollRequest(e: viewEvents.ViewScrollRequestEvent): boolean { - this.layoutProvider.setScrollPosition({ - scrollTop: e.desiredScrollTop - }); - return false; - } // --- end event handlers @@ -403,8 +350,6 @@ export class View extends ViewEventHandler { } this.viewParts = []; - this.layoutProvider.dispose(); - super.dispose(); } @@ -453,7 +398,7 @@ export class View extends ViewEventHandler { return; } - let partialViewportData = this.layoutProvider.getLinesViewportData(); + const partialViewportData = this._context.viewLayout.getLinesViewportData(); this._context.model.setViewport(partialViewportData.startLineNumber, partialViewportData.endLineNumber, partialViewportData.centeredLineNumber); let viewportData = new ViewportData(partialViewportData, this._context.model); @@ -470,7 +415,7 @@ export class View extends ViewEventHandler { this._textAreaHandler.writeToTextArea(); } - let renderingContext = new RenderingContext(this.layoutProvider, viewportData, this.viewLines); + let renderingContext = new RenderingContext(this._context.viewLayout, viewportData, this.viewLines); // Render the rest of the parts for (let i = 0, len = viewPartsToRender.length; i < len; i++) { @@ -488,27 +433,27 @@ export class View extends ViewEventHandler { // --- BEGIN CodeEditor helpers public getScrollWidth(): number { - return this.layoutProvider.getScrollWidth(); + return this._context.viewLayout.getScrollWidth(); } public getScrollLeft(): number { - return this.layoutProvider.getScrollLeft(); + return this._context.viewLayout.getScrollLeft(); } public getScrollHeight(): number { - return this.layoutProvider.getScrollHeight(); + return this._context.viewLayout.getScrollHeight(); } public getScrollTop(): number { - return this.layoutProvider.getScrollTop(); + return this._context.viewLayout.getScrollTop(); } public setScrollPosition(scrollPosition: editorCommon.INewScrollPosition): void { - this.layoutProvider.setScrollPosition(scrollPosition); + this._context.viewLayout.setScrollPosition(scrollPosition); } public getVerticalOffsetForViewLineNumber(viewLineNumber: number): number { - return this.layoutProvider.getVerticalOffsetForLineNumber(viewLineNumber); + return this._context.viewLayout.getVerticalOffsetForLineNumber(viewLineNumber); } public delegateVerticalScrollbarMouseDown(browserEvent: MouseEvent): void { @@ -534,7 +479,7 @@ export class View extends ViewEventHandler { } public getCompletelyVisibleViewRange(): Range { - const partialData = this.layoutProvider.getLinesViewportData(); + const partialData = this._context.viewLayout.getLinesViewportData(); const startViewLineNumber = partialData.completelyVisibleStartLineNumber; const endViewLineNumber = partialData.completelyVisibleEndLineNumber; @@ -545,7 +490,7 @@ export class View extends ViewEventHandler { } public getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range { - const partialData = this.layoutProvider.getLinesViewportDataAtScrollTop(scrollTop); + const partialData = this._context.viewLayout.getLinesViewportDataAtScrollTop(scrollTop); const startViewLineNumber = partialData.completelyVisibleStartLineNumber; const endViewLineNumber = partialData.completelyVisibleEndLineNumber; @@ -561,8 +506,8 @@ export class View extends ViewEventHandler { public createOverviewRuler(cssClassName: string, minimumHeight: number, maximumHeight: number): OverviewRuler { return new OverviewRuler( - this._context, cssClassName, this.layoutProvider.getScrollHeight(), minimumHeight, maximumHeight, - (lineNumber: number) => this.layoutProvider.getVerticalOffsetForLineNumber(lineNumber) + this._context, cssClassName, this._context.viewLayout.getScrollHeight(), minimumHeight, maximumHeight, + (lineNumber: number) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber) ); } @@ -596,7 +541,7 @@ export class View extends ViewEventHandler { changeAccessor.removeZone = null; if (zonesHaveChanged) { - this.layoutProvider.onHeightMaybeChanged(); + this._context.viewLayout.onHeightMaybeChanged(); this._context.privateViewEventBus.emit(new viewEvents.ViewZonesChangedEvent()); } }); @@ -604,7 +549,7 @@ export class View extends ViewEventHandler { } public getWhitespaces(): IEditorWhitespace[] { - return this.layoutProvider.getWhitespaces(); + return this._context.viewLayout.getWhitespaces(); } public render(now: boolean, everything: boolean): void { @@ -628,11 +573,11 @@ export class View extends ViewEventHandler { } public saveState(): editorCommon.IViewState { - return this.layoutProvider.saveState(); + return this._context.viewLayout.saveState(); } public restoreState(state: editorCommon.IViewState): void { - return this.layoutProvider.restoreState(state); + return this._context.viewLayout.restoreState(state); } public focus(): void { diff --git a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts index 0fc8acf9612c9..a5d6bab5cdf46 100644 --- a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts +++ b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts @@ -23,14 +23,13 @@ export class EditorScrollbar extends ViewPart { constructor( context: ViewContext, - scrollable: Scrollable, linesContent: FastDomNode, viewDomNode: FastDomNode, overflowGuardDomNode: FastDomNode ) { super(context); - this.scrollable = scrollable; + this.scrollable = this._context.viewLayout.scrollable; const editor = this._context.configuration.editor; const configScrollbarOpts = editor.viewInfo.scrollbar; diff --git a/src/vs/editor/browser/viewParts/lines/viewLines.ts b/src/vs/editor/browser/viewParts/lines/viewLines.ts index 4d4ee4c983418..fce372b0b8daf 100644 --- a/src/vs/editor/browser/viewParts/lines/viewLines.ts +++ b/src/vs/editor/browser/viewParts/lines/viewLines.ts @@ -15,7 +15,7 @@ import { Configuration } from 'vs/editor/browser/config/configuration'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { ViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData'; import { IViewLines, HorizontalRange, LineVisibleRanges } from 'vs/editor/common/view/renderingContext'; -import { IViewLayout, Viewport } from 'vs/editor/common/viewModel/viewModel'; +import { Viewport } from 'vs/editor/common/viewModel/viewModel'; import { ViewPart, PartFingerprint, PartFingerprints } from 'vs/editor/browser/view/viewPart'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; @@ -48,7 +48,6 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, private static HORIZONTAL_EXTRA_PX = 30; private readonly _linesContent: FastDomNode; - private readonly _viewLayout: IViewLayout; private readonly _textRangeRestingSpot: HTMLElement; private readonly _visibleLines: VisibleLinesCollection; private readonly domNode: FastDomNode; @@ -67,10 +66,9 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, private _lastCursorRevealRangeHorizontallyEvent: viewEvents.ViewRevealRangeRequestEvent; private _lastRenderedData: LastRenderedData; - constructor(context: ViewContext, linesContent: FastDomNode, viewLayout: IViewLayout) { + constructor(context: ViewContext, linesContent: FastDomNode) { super(context); this._linesContent = linesContent; - this._viewLayout = viewLayout; this._textRangeRestingSpot = document.createElement('div'); this._visibleLines = new VisibleLinesCollection(this); this.domNode = this._visibleLines.domNode; @@ -180,13 +178,13 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, return this._visibleLines.onLinesInserted(e); } public onRevealRangeRequest(e: viewEvents.ViewRevealRangeRequestEvent): boolean { - let newScrollTop = this._computeScrollTopToRevealRange(this._viewLayout.getCurrentViewport(), e.range, e.verticalType); + let newScrollTop = this._computeScrollTopToRevealRange(this._context.viewLayout.getCurrentViewport(), e.range, e.verticalType); if (e.revealHorizontal) { this._lastCursorRevealRangeHorizontallyEvent = e; } - this._viewLayout.setScrollPosition({ + this._context.viewLayout.setScrollPosition({ scrollTop: newScrollTop }); @@ -412,8 +410,8 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, // (1) render lines - ensures lines are in the DOM this._visibleLines.renderLines(viewportData); this._lastRenderedData.setCurrentVisibleRange(viewportData.visibleRange); - this.domNode.setWidth(this._viewLayout.getScrollWidth()); - this.domNode.setHeight(Math.min(this._viewLayout.getScrollHeight(), 1000000)); + this.domNode.setWidth(this._context.viewLayout.getScrollWidth()); + this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(), 1000000)); // (2) execute DOM writing that forces sync layout (e.g. textArea manipulation) onAfterLinesRendered(); @@ -438,22 +436,22 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, } // set `scrollLeft` - this._viewLayout.setScrollPosition({ + this._context.viewLayout.setScrollPosition({ scrollLeft: newScrollLeft.scrollLeft }); } // (4) handle scrolling - const adjustedScrollTop = this._viewLayout.getScrollTop() - viewportData.bigNumbersDelta; + const adjustedScrollTop = this._context.viewLayout.getScrollTop() - viewportData.bigNumbersDelta; if (this._canUseTranslate3d) { - let transform = 'translate3d(' + -this._viewLayout.getScrollLeft() + 'px, ' + -adjustedScrollTop + 'px, 0px)'; + let transform = 'translate3d(' + -this._context.viewLayout.getScrollLeft() + 'px, ' + -adjustedScrollTop + 'px, 0px)'; this._linesContent.setTransform(transform); this._linesContent.setTop(0); this._linesContent.setLeft(0); } else { this._linesContent.setTransform(''); this._linesContent.setTop(-adjustedScrollTop); - this._linesContent.setLeft(-this._viewLayout.getScrollLeft()); + this._linesContent.setLeft(-this._context.viewLayout.getScrollLeft()); } // Update max line width (not so important, it is just so the horizontal scrollbar doesn't get too small) @@ -466,7 +464,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, let iLineWidth = Math.ceil(lineWidth); if (this._maxLineWidth < iLineWidth) { this._maxLineWidth = iLineWidth; - this._viewLayout.onMaxLineWidthChanged(this._maxLineWidth); + this._context.viewLayout.onMaxLineWidthChanged(this._maxLineWidth); } } @@ -478,8 +476,8 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, let boxEndY: number; // Have a box that includes one extra line height (for the horizontal scrollbar) - boxStartY = this._viewLayout.getVerticalOffsetForLineNumber(range.startLineNumber); - boxEndY = this._viewLayout.getVerticalOffsetForLineNumber(range.endLineNumber) + this._lineHeight; + boxStartY = this._context.viewLayout.getVerticalOffsetForLineNumber(range.startLineNumber); + boxEndY = this._context.viewLayout.getVerticalOffsetForLineNumber(range.endLineNumber) + this._lineHeight; if (verticalType === VerticalRevealType.Simple || verticalType === VerticalRevealType.Bottom) { // Reveal one line more when the last line would be covered by the scrollbar - arrow down case or revealing a line explicitly at bottom boxEndY += this._lineHeight; @@ -515,7 +513,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, }; } - let viewport = this._viewLayout.getCurrentViewport(); + let viewport = this._context.viewLayout.getCurrentViewport(); let viewportStartX = viewport.left; let viewportEndX = viewportStartX + viewport.width; diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index 5acccca0454e8..43dd916168235 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -15,7 +15,7 @@ import * as dom from 'vs/base/browser/dom'; import { MinimapCharRenderer, MinimapTokensColorTracker, Constants } from 'vs/editor/common/view/minimapCharRenderer'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { CharCode } from 'vs/base/common/charCode'; -import { IViewLayout, ViewLineData } from 'vs/editor/common/viewModel/viewModel'; +import { ViewLineData } from 'vs/editor/common/viewModel/viewModel'; import { ColorId } from 'vs/editor/common/modes'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; import { IDisposable } from 'vs/base/common/lifecycle'; @@ -415,7 +415,6 @@ class MinimapBuffers { export class Minimap extends ViewPart { - private readonly _viewLayout: IViewLayout; private readonly _editorScrollbar: EditorScrollbar; private readonly _domNode: FastDomNode; @@ -433,9 +432,8 @@ export class Minimap extends ViewPart { private _lastRenderData: RenderData; private _buffers: MinimapBuffers; - constructor(context: ViewContext, viewLayout: IViewLayout, editorScrollbar: EditorScrollbar) { + constructor(context: ViewContext, editorScrollbar: EditorScrollbar) { super(context); - this._viewLayout = viewLayout; this._editorScrollbar = editorScrollbar; this._options = new MinimapOptions(this._context.configuration); @@ -499,7 +497,7 @@ export class Minimap extends ViewPart { if (e.leftButton) { const initialMouseOrthogonalPosition = e.posx; - const initialScrollTop = this._viewLayout.getScrollTop(); + const initialScrollTop = this._context.viewLayout.getScrollTop(); const initialSliderCenter = (this._slider.getTop() + this._slider.getHeight() / 2); const draggingDeltaCenter = e.posy - initialSliderCenter; this._slider.toggleClassName('active', true); @@ -511,7 +509,7 @@ export class Minimap extends ViewPart { const mouseOrthogonalDelta = Math.abs(mouseOrthogonalPosition - initialMouseOrthogonalPosition); if (platform.isWindows && mouseOrthogonalDelta > MOUSE_DRAG_RESET_DISTANCE) { // The mouse has wondered away from the slider => reset dragging - this._viewLayout.setScrollPosition({ + this._context.viewLayout.setScrollPosition({ scrollTop: initialScrollTop }); } else { @@ -525,13 +523,13 @@ export class Minimap extends ViewPart { if (this._context.configuration.editor.viewInfo.scrollBeyondLastLine) { discountScrollHeight = this._canvas.getHeight() - this._context.configuration.editor.lineHeight; } - const scrollHeight = this._viewLayout.getScrollHeight() - discountScrollHeight; + const scrollHeight = this._context.viewLayout.getScrollHeight() - discountScrollHeight; const desiredSliderCenter = mouseMoveData.posy - draggingDeltaCenter; const desiredScrollCenter = desiredSliderCenter * (scrollHeight / representableHeight); const desiredScrollTop = desiredScrollCenter - this._canvas.getHeight() / 2; - this._viewLayout.setScrollPosition({ + this._context.viewLayout.setScrollPosition({ scrollTop: desiredScrollTop }); } diff --git a/src/vs/editor/browser/viewParts/viewZones/viewZones.ts b/src/vs/editor/browser/viewParts/viewZones/viewZones.ts index a56f4457cf4fb..d91430803b3d7 100644 --- a/src/vs/editor/browser/viewParts/viewZones/viewZones.ts +++ b/src/vs/editor/browser/viewParts/viewZones/viewZones.ts @@ -11,7 +11,7 @@ import { ViewPart } from 'vs/editor/browser/view/viewPart'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { Position } from 'vs/editor/common/core/position'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; -import { IViewLayout, IViewWhitespaceViewportData } from 'vs/editor/common/viewModel/viewModel'; +import { IViewWhitespaceViewportData } from 'vs/editor/common/viewModel/viewModel'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; export interface IMyViewZone { @@ -33,7 +33,6 @@ interface IComputedViewZoneProps { export class ViewZones extends ViewPart { - private _viewLayout: IViewLayout; private _zones: { [id: string]: IMyViewZone; }; private _lineHeight: number; private _contentWidth: number; @@ -43,12 +42,11 @@ export class ViewZones extends ViewPart { public marginDomNode: FastDomNode; - constructor(context: ViewContext, viewLayout: IViewLayout) { + constructor(context: ViewContext) { super(context); this._lineHeight = this._context.configuration.editor.lineHeight; this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; - this._viewLayout = viewLayout; this.domNode = createFastDomNode(document.createElement('div')); this.domNode.setClassName('view-zones'); @@ -67,7 +65,6 @@ export class ViewZones extends ViewPart { public dispose(): void { super.dispose(); - this._viewLayout = null; this._zones = {}; } @@ -81,7 +78,7 @@ export class ViewZones extends ViewPart { let id = keys[i]; let zone = this._zones[id]; let props = this._computeWhitespaceProps(zone.delegate); - if (this._viewLayout.changeWhitespace(parseInt(id, 10), props.afterViewLineNumber, props.heightInPx)) { + if (this._context.viewLayout.changeWhitespace(parseInt(id, 10), props.afterViewLineNumber, props.heightInPx)) { this._safeCallOnComputedHeight(zone.delegate, props.heightInPx); hadAChange = true; } @@ -186,7 +183,7 @@ export class ViewZones extends ViewPart { public addZone(zone: IViewZone): number { let props = this._computeWhitespaceProps(zone); - let whitespaceId = this._viewLayout.addWhitespace(props.afterViewLineNumber, this._getZoneOrdinal(zone), props.heightInPx); + let whitespaceId = this._context.viewLayout.addWhitespace(props.afterViewLineNumber, this._getZoneOrdinal(zone), props.heightInPx); let myZone: IMyViewZone = { whitespaceId: whitespaceId, @@ -224,7 +221,7 @@ export class ViewZones extends ViewPart { if (this._zones.hasOwnProperty(id.toString())) { let zone = this._zones[id.toString()]; delete this._zones[id.toString()]; - this._viewLayout.removeWhitespace(zone.whitespaceId); + this._context.viewLayout.removeWhitespace(zone.whitespaceId); zone.domNode.removeAttribute('monaco-visible-view-zone'); zone.domNode.removeAttribute('monaco-view-zone'); @@ -249,7 +246,7 @@ export class ViewZones extends ViewPart { let zone = this._zones[id.toString()]; let props = this._computeWhitespaceProps(zone.delegate); // let newOrdinal = this._getZoneOrdinal(zone.delegate); - changed = this._viewLayout.changeWhitespace(zone.whitespaceId, props.afterViewLineNumber, props.heightInPx) || changed; + changed = this._context.viewLayout.changeWhitespace(zone.whitespaceId, props.afterViewLineNumber, props.heightInPx) || changed; // TODO@Alex: change `newOrdinal` too if (changed) { @@ -303,7 +300,7 @@ export class ViewZones extends ViewPart { } public render(ctx: RestrictedRenderingContext): void { - let visibleWhitespaces = this._viewLayout.getWhitespaceViewportData(); + let visibleWhitespaces = this._context.viewLayout.getWhitespaceViewportData(); let visibleZones: { [id: string]: IViewWhitespaceViewportData; } = {}; let hasVisibleZone = false; diff --git a/src/vs/editor/common/view/viewContext.ts b/src/vs/editor/common/view/viewContext.ts index c37c88756d9f5..ebb5cc199a3df 100644 --- a/src/vs/editor/common/view/viewContext.ts +++ b/src/vs/editor/common/view/viewContext.ts @@ -5,7 +5,7 @@ 'use strict'; import { IConfiguration } from 'vs/editor/common/editorCommon'; -import { IViewModel } from 'vs/editor/common/viewModel/viewModel'; +import { IViewModel, IViewLayout } from 'vs/editor/common/viewModel/viewModel'; import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler'; import { ViewEventDispatcher } from 'vs/editor/common/view/viewEventDispatcher'; @@ -13,6 +13,7 @@ export class ViewContext { public readonly configuration: IConfiguration; public readonly model: IViewModel; + public readonly viewLayout: IViewLayout; public readonly privateViewEventBus: ViewEventDispatcher; constructor( @@ -22,6 +23,7 @@ export class ViewContext { ) { this.configuration = configuration; this.model = model; + this.viewLayout = model.viewLayout; this.privateViewEventBus = privateViewEventBus; } diff --git a/src/vs/editor/common/viewLayout/viewLayout.ts b/src/vs/editor/common/viewLayout/viewLayout.ts index f7bf44a4bdc7e..9f437e73140f8 100644 --- a/src/vs/editor/common/viewLayout/viewLayout.ts +++ b/src/vs/editor/common/viewLayout/viewLayout.ts @@ -10,34 +10,33 @@ import * as editorCommon from 'vs/editor/common/editorCommon'; import { LinesLayout } from 'vs/editor/common/viewLayout/linesLayout'; import { IViewLayout, IViewWhitespaceViewportData, Viewport } from 'vs/editor/common/viewModel/viewModel'; import { IPartialViewLinesViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData'; -import { ViewEventDispatcher } from 'vs/editor/common/view/viewEventDispatcher'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; +import Event from 'vs/base/common/event'; +import { IConfigurationChangedEvent } from "vs/editor/common/config/editorOptions"; export class ViewLayout extends Disposable implements IViewLayout { static LINES_HORIZONTAL_EXTRA_PX = 30; - private _configuration: editorCommon.IConfiguration; - private _privateViewEventBus: ViewEventDispatcher; - private _linesLayout: LinesLayout; - private _scrollable: Scrollable; + private readonly _configuration: editorCommon.IConfiguration; + private readonly _linesLayout: LinesLayout; - constructor(configuration: editorCommon.IConfiguration, lineCount: number, privateViewEventBus: ViewEventDispatcher) { + public readonly scrollable: Scrollable; + public readonly onDidScroll: Event; + + constructor(configuration: editorCommon.IConfiguration, lineCount: number) { super(); this._configuration = configuration; - this._privateViewEventBus = privateViewEventBus; this._linesLayout = new LinesLayout(lineCount, this._configuration.editor.lineHeight); - this._scrollable = this._register(new Scrollable()); - this._scrollable.updateState({ + this.scrollable = this._register(new Scrollable()); + this.scrollable.updateState({ width: configuration.editor.layoutInfo.contentWidth, height: configuration.editor.layoutInfo.contentHeight }); - this._register(this._scrollable.onScroll((e: ScrollEvent) => { - this._privateViewEventBus.emit(new viewEvents.ViewScrollChangedEvent(e)); - })); + this.onDidScroll = this.scrollable.onScroll; this._updateHeight(); } @@ -47,7 +46,7 @@ export class ViewLayout extends Disposable implements IViewLayout { } public getScrollable(): Scrollable { - return this._scrollable; + return this.scrollable; } public onHeightMaybeChanged(): void { @@ -56,12 +55,12 @@ export class ViewLayout extends Disposable implements IViewLayout { // ---- begin view event handlers - public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): void { + public onConfigurationChanged(e: IConfigurationChangedEvent): void { if (e.lineHeight) { this._linesLayout.setLineHeight(this._configuration.editor.lineHeight); } if (e.layoutInfo) { - this._scrollable.updateState({ + this.scrollable.updateState({ width: this._configuration.editor.layoutInfo.contentWidth, height: this._configuration.editor.layoutInfo.contentHeight }); @@ -96,7 +95,7 @@ export class ViewLayout extends Disposable implements IViewLayout { } private _getTotalHeight(): number { - const scrollState = this._scrollable.getState(); + const scrollState = this.scrollable.getState(); let result = this._linesLayout.getLinesTotalHeight(); if (this._configuration.editor.viewInfo.scrollBeyondLastLine) { @@ -109,7 +108,7 @@ export class ViewLayout extends Disposable implements IViewLayout { } private _updateHeight(): void { - this._scrollable.updateState({ + this.scrollable.updateState({ scrollHeight: this._getTotalHeight() }); } @@ -117,7 +116,7 @@ export class ViewLayout extends Disposable implements IViewLayout { // ---- Layouting logic public getCurrentViewport(): Viewport { - const scrollState = this._scrollable.getState(); + const scrollState = this.scrollable.getState(); return new Viewport( scrollState.scrollTop, scrollState.scrollLeft, @@ -136,7 +135,7 @@ export class ViewLayout extends Disposable implements IViewLayout { public onMaxLineWidthChanged(maxLineWidth: number): void { let newScrollWidth = this._computeScrollWidth(maxLineWidth, this.getCurrentViewport().width); - this._scrollable.updateState({ + this.scrollable.updateState({ scrollWidth: newScrollWidth }); @@ -147,7 +146,7 @@ export class ViewLayout extends Disposable implements IViewLayout { // ---- view state public saveState(): editorCommon.IViewState { - const scrollState = this._scrollable.getState(); + const scrollState = this.scrollable.getState(); let scrollTop = scrollState.scrollTop; let firstLineNumberInViewport = this._linesLayout.getLineNumberAtOrAfterVerticalOffset(scrollTop); let whitespaceAboveFirstLine = this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(firstLineNumberInViewport); @@ -163,7 +162,7 @@ export class ViewLayout extends Disposable implements IViewLayout { if (typeof state.scrollTopWithoutViewZones === 'number' && !this._linesLayout.hasWhitespace()) { restoreScrollTop = state.scrollTopWithoutViewZones; } - this._scrollable.updateState({ + this.scrollable.updateState({ scrollLeft: state.scrollLeft, scrollTop: restoreScrollTop }); @@ -199,7 +198,7 @@ export class ViewLayout extends Disposable implements IViewLayout { } public getLinesViewportDataAtScrollTop(scrollTop: number): IPartialViewLinesViewportData { // do some minimal validations on scrollTop - const scrollState = this._scrollable.getState(); + const scrollState = this.scrollable.getState(); if (scrollTop + scrollState.height > scrollState.scrollHeight) { scrollTop = scrollState.scrollHeight - scrollState.height; } @@ -220,23 +219,23 @@ export class ViewLayout extends Disposable implements IViewLayout { public getScrollWidth(): number { - const scrollState = this._scrollable.getState(); + const scrollState = this.scrollable.getState(); return scrollState.scrollWidth; } public getScrollLeft(): number { - const scrollState = this._scrollable.getState(); + const scrollState = this.scrollable.getState(); return scrollState.scrollLeft; } public getScrollHeight(): number { - const scrollState = this._scrollable.getState(); + const scrollState = this.scrollable.getState(); return scrollState.scrollHeight; } public getScrollTop(): number { - const scrollState = this._scrollable.getState(); + const scrollState = this.scrollable.getState(); return scrollState.scrollTop; } public setScrollPosition(position: editorCommon.INewScrollPosition): void { - this._scrollable.updateState(position); + this.scrollable.updateState(position); } } diff --git a/src/vs/editor/common/viewModel/splitLinesCollection.ts b/src/vs/editor/common/viewModel/splitLinesCollection.ts index 322cc3aa6c745..726df79208ec0 100644 --- a/src/vs/editor/common/viewModel/splitLinesCollection.ts +++ b/src/vs/editor/common/viewModel/splitLinesCollection.ts @@ -9,7 +9,7 @@ import { Range } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { LineTokens } from 'vs/editor/common/core/lineTokens'; import { PrefixSumComputerWithCache } from 'vs/editor/common/viewModel/prefixSumComputer'; -import { ViewLineData, ViewEventsCollector } from 'vs/editor/common/viewModel/viewModel'; +import { ViewLineData } from 'vs/editor/common/viewModel/viewModel'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { WrappingIndent } from 'vs/editor/common/config/editorOptions'; @@ -165,7 +165,7 @@ export class SplitLinesCollection { return result; } - public setHiddenAreas(eventsCollector: ViewEventsCollector, _ranges: Range[]): boolean { + public setHiddenAreas(_ranges: Range[]): boolean { let newRanges = this._reduceRanges(_ranges); @@ -232,7 +232,6 @@ export class SplitLinesCollection { } } - eventsCollector.emit(new viewEvents.ViewFlushedEvent()); return true; } @@ -244,19 +243,18 @@ export class SplitLinesCollection { return this.lines[modelLineNumber - 1].isVisible(); } - public setTabSize(eventsCollector: ViewEventsCollector, newTabSize: number): boolean { + public setTabSize(newTabSize: number): boolean { if (this.tabSize === newTabSize) { return false; } this.tabSize = newTabSize; this._constructLines(false); - eventsCollector.emit(new viewEvents.ViewFlushedEvent()); return true; } - public setWrappingSettings(eventsCollector: ViewEventsCollector, wrappingIndent: WrappingIndent, wrappingColumn: number, columnsForFullWidthChar: number): boolean { + public setWrappingSettings(wrappingIndent: WrappingIndent, wrappingColumn: number, columnsForFullWidthChar: number): boolean { if (this.wrappingIndent === wrappingIndent && this.wrappingColumn === wrappingColumn && this.columnsForFullWidthChar === columnsForFullWidthChar) { return false; } @@ -266,21 +264,19 @@ export class SplitLinesCollection { this.columnsForFullWidthChar = columnsForFullWidthChar; this._constructLines(false); - eventsCollector.emit(new viewEvents.ViewFlushedEvent()); return true; } - public onModelFlushed(eventsCollector: ViewEventsCollector): void { + public onModelFlushed(): void { this._constructLines(true); - eventsCollector.emit(new viewEvents.ViewFlushedEvent()); } - public onModelLinesDeleted(eventsCollector: ViewEventsCollector, versionId: number, fromLineNumber: number, toLineNumber: number): void { + public onModelLinesDeleted(versionId: number, fromLineNumber: number, toLineNumber: number): viewEvents.ViewLinesDeletedEvent { if (versionId <= this._validModelVersionId) { // Here we check for versionId in case the lines were reconstructed in the meantime. // We don't want to apply stale change events on top of a newer read model state. - return; + return null; } let outputFromLineNumber = (fromLineNumber === 1 ? 1 : this.prefixSumComputer.getAccumulatedValue(fromLineNumber - 2) + 1); @@ -289,14 +285,14 @@ export class SplitLinesCollection { this.lines.splice(fromLineNumber - 1, toLineNumber - fromLineNumber + 1); this.prefixSumComputer.removeValues(fromLineNumber - 1, toLineNumber - fromLineNumber + 1); - eventsCollector.emit(new viewEvents.ViewLinesDeletedEvent(outputFromLineNumber, outputToLineNumber)); + return new viewEvents.ViewLinesDeletedEvent(outputFromLineNumber, outputToLineNumber); } - public onModelLinesInserted(eventsCollector: ViewEventsCollector, versionId: number, fromLineNumber: number, toLineNumber: number, text: string[]): void { + public onModelLinesInserted(versionId: number, fromLineNumber: number, toLineNumber: number, text: string[]): viewEvents.ViewLinesInsertedEvent { if (versionId <= this._validModelVersionId) { // Here we check for versionId in case the lines were reconstructed in the meantime. // We don't want to apply stale change events on top of a newer read model state. - return; + return null; } let hiddenAreas = this.getHiddenAreas(); @@ -328,14 +324,14 @@ export class SplitLinesCollection { this.prefixSumComputer.insertValues(fromLineNumber - 1, insertPrefixSumValues); - eventsCollector.emit(new viewEvents.ViewLinesInsertedEvent(outputFromLineNumber, outputFromLineNumber + totalOutputLineCount - 1)); + return new viewEvents.ViewLinesInsertedEvent(outputFromLineNumber, outputFromLineNumber + totalOutputLineCount - 1); } - public onModelLineChanged(eventsCollector: ViewEventsCollector, versionId: number, lineNumber: number, newText: string): boolean { + public onModelLineChanged(versionId: number, lineNumber: number, newText: string): [boolean, viewEvents.ViewLinesChangedEvent, viewEvents.ViewLinesInsertedEvent, viewEvents.ViewLinesDeletedEvent] { if (versionId <= this._validModelVersionId) { // Here we check for versionId in case the lines were reconstructed in the meantime. // We don't want to apply stale change events on top of a newer read model state. - return false; + return [false, null, null, null]; } let lineIndex = lineNumber - 1; @@ -373,17 +369,11 @@ export class SplitLinesCollection { this.prefixSumComputer.changeValue(lineIndex, newOutputLineCount); - if (changeFrom <= changeTo) { - eventsCollector.emit(new viewEvents.ViewLinesChangedEvent(changeFrom, changeTo)); - } - if (insertFrom <= insertTo) { - eventsCollector.emit(new viewEvents.ViewLinesInsertedEvent(insertFrom, insertTo)); - } - if (deleteFrom <= deleteTo) { - eventsCollector.emit(new viewEvents.ViewLinesDeletedEvent(deleteFrom, deleteTo)); - } + const viewLinesChangedEvent = (changeFrom <= changeTo ? new viewEvents.ViewLinesChangedEvent(changeFrom, changeTo) : null); + const viewLinesInsertedEvent = (insertFrom <= insertTo ? new viewEvents.ViewLinesInsertedEvent(insertFrom, insertTo) : null); + const viewLinesDeletedEvent = (deleteFrom <= deleteTo ? new viewEvents.ViewLinesDeletedEvent(deleteFrom, deleteTo) : null); - return lineMappingChanged; + return [lineMappingChanged, viewLinesChangedEvent, viewLinesInsertedEvent, viewLinesDeletedEvent]; } public acceptVersionId(versionId: number): void { diff --git a/src/vs/editor/common/viewModel/viewModel.ts b/src/vs/editor/common/viewModel/viewModel.ts index ab2b17027acff..2abd774314ca9 100644 --- a/src/vs/editor/common/viewModel/viewModel.ts +++ b/src/vs/editor/common/viewModel/viewModel.ts @@ -4,13 +4,16 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { INewScrollPosition, IModelDecoration, EndOfLinePreference } from 'vs/editor/common/editorCommon'; +import { INewScrollPosition, IModelDecoration, EndOfLinePreference, IViewState } from 'vs/editor/common/editorCommon'; import { ViewLineToken } from 'vs/editor/common/core/viewLineToken'; import { Position, IPosition } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { ViewEvent } from 'vs/editor/common/view/viewEvents'; import { IDisposable } from 'vs/base/common/lifecycle'; +import { Scrollable } from "vs/base/common/scrollable"; +import { IPartialViewLinesViewportData } from "vs/editor/common/viewLayout/viewLinesViewportData"; +import { IEditorWhitespace } from "vs/editor/common/viewLayout/whitespaceComputer"; export interface IViewWhitespaceViewportData { readonly id: number; @@ -37,6 +40,8 @@ export class Viewport { export interface IViewLayout { + readonly scrollable: Scrollable; + onMaxLineWidthChanged(width: number): void; getScrollLeft(): number; @@ -44,9 +49,20 @@ export interface IViewLayout { getScrollHeight(): number; getScrollTop(): number; getCurrentViewport(): Viewport; - getVerticalOffsetForLineNumber(lineNumber: number): number; setScrollPosition(position: INewScrollPosition): void; + getLinesViewportData(): IPartialViewLinesViewportData; + getLinesViewportDataAtScrollTop(scrollTop: number): IPartialViewLinesViewportData; + getWhitespaces(): IEditorWhitespace[]; + + saveState(): IViewState; + restoreState(state: IViewState): void; + + isAfterLines(verticalOffset: number): boolean; + getLineNumberAtVerticalOffset(verticalOffset: number): number; + getVerticalOffsetForLineNumber(lineNumber: number): number; + getWhitespaceAtVerticalOffset(verticalOffset: number): IViewWhitespaceViewportData; + // --------------- Begin vertical whitespace management /** @@ -67,6 +83,9 @@ export interface IViewLayout { */ getWhitespaceViewportData(): IViewWhitespaceViewportData[]; + // TODO@Alex + onHeightMaybeChanged(); + // --------------- End vertical whitespace management } @@ -95,6 +114,8 @@ export interface IViewModel { readonly coordinatesConverter: ICoordinatesConverter; + readonly viewLayout: IViewLayout; + /** * Gives a hint that a lot of requests are about to come in for these line numbers. */ diff --git a/src/vs/editor/common/viewModel/viewModelCursors.ts b/src/vs/editor/common/viewModel/viewModelCursors.ts index fbfae793c1579..90ec0e37eb22a 100644 --- a/src/vs/editor/common/viewModel/viewModelCursors.ts +++ b/src/vs/editor/common/viewModel/viewModelCursors.ts @@ -9,7 +9,7 @@ import { Position } from 'vs/editor/common/core/position'; import { ICoordinatesConverter, ViewEventsCollector } from 'vs/editor/common/viewModel/viewModel'; import { Selection } from 'vs/editor/common/core/selection'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { ICursorRevealRangeEvent, CursorScrollRequest } from 'vs/editor/common/controller/cursorEvents'; +import { ICursorRevealRangeEvent } from 'vs/editor/common/controller/cursorEvents'; export interface ICursorPositionChangedEvent { readonly position: Position; @@ -110,8 +110,4 @@ export class ViewModelCursors { this.onCursorSelectionChanged(eventsCollector, e); } } - - public onCursorScrollRequest(eventsCollector: ViewEventsCollector, e: CursorScrollRequest): void { - eventsCollector.emit(new viewEvents.ViewScrollRequestEvent(e.desiredScrollTop)); - } } diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index 21f45c369e2f0..94cf029a9ce0d 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -25,6 +25,7 @@ import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOption import { CursorEventType, ICursorPositionChangedEvent, VerticalRevealType, ICursorSelectionChangedEvent, ICursorRevealRangeEvent, CursorScrollRequest } from 'vs/editor/common/controller/cursorEvents'; import { Cursor } from 'vs/editor/common/controller/cursor'; import { CharacterHardWrappingLineMapperFactory } from "vs/editor/common/viewModel/characterHardWrappingLineMapper"; +import { ViewLayout } from 'vs/editor/common/viewLayout/viewLayout'; export class CoordinatesConverter implements ICoordinatesConverter { @@ -93,6 +94,7 @@ export class ViewModel extends Disposable implements IViewModel { private readonly model: editorCommon.IModel; private readonly lines: SplitLinesCollection; public readonly coordinatesConverter: ICoordinatesConverter; + public readonly viewLayout: ViewLayout; private readonly decorations: ViewModelDecorations; private readonly cursors: ViewModelCursors; @@ -129,6 +131,12 @@ export class ViewModel extends Disposable implements IViewModel { this.coordinatesConverter = new CoordinatesConverter(this.lines); + this.viewLayout = this._register(new ViewLayout(this.configuration, this.getLineCount())); + + this._register(this.viewLayout.onDidScroll((e) => { + this._emit([new viewEvents.ViewScrollChangedEvent(e)]); + })); + this._isDisposing = false; this._centeredViewLine = -1; this._listeners = []; @@ -206,7 +214,10 @@ export class ViewModel extends Disposable implements IViewModel { } case CursorEventType.CursorScrollRequest: { const e = data; - this.cursors.onCursorScrollRequest(eventsCollector, e); + this.viewLayout.setScrollPosition({ + scrollTop: e.desiredScrollTop + }); + eventsCollector.emit(new viewEvents.ViewScrollRequestEvent(e.desiredScrollTop)); // TODO@Alex: delete this ev type break; } default: @@ -224,10 +235,12 @@ export class ViewModel extends Disposable implements IViewModel { const conf = this.configuration.editor; - if (this.lines.setWrappingSettings(eventsCollector, conf.wrappingInfo.wrappingIndent, conf.wrappingInfo.wrappingColumn, conf.fontInfo.typicalFullwidthCharacterWidth / conf.fontInfo.typicalHalfwidthCharacterWidth)) { + if (this.lines.setWrappingSettings(conf.wrappingInfo.wrappingIndent, conf.wrappingInfo.wrappingColumn, conf.fontInfo.typicalFullwidthCharacterWidth / conf.fontInfo.typicalHalfwidthCharacterWidth)) { + eventsCollector.emit(new viewEvents.ViewFlushedEvent()); eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); this.decorations.onLineMappingChanged(eventsCollector); this.cursors.onLineMappingChanged(eventsCollector); + this.viewLayout.onFlushed(this.getLineCount()); revealPreviousCenteredModelRange = true; } @@ -238,6 +251,7 @@ export class ViewModel extends Disposable implements IViewModel { } eventsCollector.emit(new viewEvents.ViewConfigurationChangedEvent(e)); + this.viewLayout.onConfigurationChanged(e); if (revealPreviousCenteredModelRange && previousCenteredModelRange) { // modelLine -> viewLine @@ -286,25 +300,48 @@ export class ViewModel extends Disposable implements IViewModel { const change = changes[j]; switch (change.changeType) { - case textModelEvents.RawContentChangedType.Flush: - this.lines.onModelFlushed(eventsCollector); + case textModelEvents.RawContentChangedType.Flush: { + this.lines.onModelFlushed(); + eventsCollector.emit(new viewEvents.ViewFlushedEvent()); this.decorations.reset(); + this.viewLayout.onFlushed(this.getLineCount()); hadOtherModelChange = true; break; - - case textModelEvents.RawContentChangedType.LinesDeleted: - this.lines.onModelLinesDeleted(eventsCollector, versionId, change.fromLineNumber, change.toLineNumber); + } + case textModelEvents.RawContentChangedType.LinesDeleted: { + const linesDeletedEvent = this.lines.onModelLinesDeleted(versionId, change.fromLineNumber, change.toLineNumber); + if (linesDeletedEvent !== null) { + eventsCollector.emit(linesDeletedEvent); + this.viewLayout.onLinesDeleted(linesDeletedEvent); + } hadOtherModelChange = true; break; - - case textModelEvents.RawContentChangedType.LinesInserted: - this.lines.onModelLinesInserted(eventsCollector, versionId, change.fromLineNumber, change.toLineNumber, change.detail.split('\n')); + } + case textModelEvents.RawContentChangedType.LinesInserted: { + const linesInsertedEvent = this.lines.onModelLinesInserted(versionId, change.fromLineNumber, change.toLineNumber, change.detail.split('\n')); + if (linesInsertedEvent !== null) { + eventsCollector.emit(linesInsertedEvent); + this.viewLayout.onLinesInserted(linesInsertedEvent); + } hadOtherModelChange = true; break; - - case textModelEvents.RawContentChangedType.LineChanged: - hadModelLineChangeThatChangedLineMapping = this.lines.onModelLineChanged(eventsCollector, versionId, change.lineNumber, change.detail); + } + case textModelEvents.RawContentChangedType.LineChanged: { + const [lineMappingChanged, viewLinesChangedEvent, viewLinesInsertedEvent, viewLinesDeletedEvent] = this.lines.onModelLineChanged(versionId, change.lineNumber, change.detail); + hadModelLineChangeThatChangedLineMapping = lineMappingChanged; + if (viewLinesChangedEvent) { + eventsCollector.emit(viewLinesChangedEvent); + } + if (viewLinesInsertedEvent) { + eventsCollector.emit(viewLinesInsertedEvent); + this.viewLayout.onLinesInserted(viewLinesInsertedEvent); + } + if (viewLinesDeletedEvent) { + eventsCollector.emit(viewLinesDeletedEvent); + this.viewLayout.onLinesDeleted(viewLinesDeletedEvent); + } break; + } } } this.lines.acceptVersionId(versionId); @@ -337,10 +374,12 @@ export class ViewModel extends Disposable implements IViewModel { } case textModelEvents.TextModelEventType.ModelOptionsChanged: { // A tab size change causes a line mapping changed event => all view parts will repaint OK, no further event needed here - if (this.lines.setTabSize(eventsCollector, this.model.getOptions().tabSize)) { + if (this.lines.setTabSize(this.model.getOptions().tabSize)) { + eventsCollector.emit(new viewEvents.ViewFlushedEvent()); eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); this.decorations.onLineMappingChanged(eventsCollector); this.cursors.onLineMappingChanged(eventsCollector); + this.viewLayout.onFlushed(this.getLineCount()); } break; @@ -369,11 +408,13 @@ export class ViewModel extends Disposable implements IViewModel { public setHiddenAreas(ranges: Range[]): void { let eventsCollector = new ViewEventsCollector(); - let lineMappingChanged = this.lines.setHiddenAreas(eventsCollector, ranges); + let lineMappingChanged = this.lines.setHiddenAreas(ranges); if (lineMappingChanged) { + eventsCollector.emit(new viewEvents.ViewFlushedEvent()); eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); this.decorations.onLineMappingChanged(eventsCollector); this.cursors.onLineMappingChanged(eventsCollector); + this.viewLayout.onFlushed(this.getLineCount()); } this._emit(eventsCollector.finalize()); } diff --git a/src/vs/editor/test/common/viewModel/splitLinesCollection.test.ts b/src/vs/editor/test/common/viewModel/splitLinesCollection.test.ts index 714e0b2c43700..cca084b09183e 100644 --- a/src/vs/editor/test/common/viewModel/splitLinesCollection.test.ts +++ b/src/vs/editor/test/common/viewModel/splitLinesCollection.test.ts @@ -17,7 +17,7 @@ import { NULL_STATE } from 'vs/editor/common/modes/nullMode'; import { TokenizationResult2 } from 'vs/editor/common/core/token'; import { IDisposable } from 'vs/base/common/lifecycle'; import { ViewLineToken } from 'vs/editor/common/core/viewLineToken'; -import { ViewLineData, ViewEventsCollector } from 'vs/editor/common/viewModel/viewModel'; +import { ViewLineData } from 'vs/editor/common/viewModel/viewModel'; import { Range } from 'vs/editor/common/core/range'; suite('Editor ViewModel - SplitLinesCollection', () => { @@ -205,7 +205,7 @@ suite('Editor ViewModel - SplitLinesCollection', () => { ].join('\n'); withSplitLinesCollection(text, (model, linesCollection) => { - linesCollection.setHiddenAreas(new ViewEventsCollector(), [ + linesCollection.setHiddenAreas([ new Range(1, 1, 3, 1), new Range(5, 1, 6, 1) ]); @@ -530,7 +530,7 @@ suite('SplitLinesCollection', () => { _expected[7], ]); - splitLinesCollection.setHiddenAreas(new ViewEventsCollector(), [new Range(2, 1, 4, 1)]); + splitLinesCollection.setHiddenAreas([new Range(2, 1, 4, 1)]); assert.equal(splitLinesCollection.getViewLineCount(), 5); assert.equal(splitLinesCollection.modelPositionIsVisible(1, 1), true); assert.equal(splitLinesCollection.modelPositionIsVisible(2, 1), false); @@ -700,7 +700,7 @@ suite('SplitLinesCollection', () => { _expected[11], ]); - splitLinesCollection.setHiddenAreas(new ViewEventsCollector(), [new Range(2, 1, 4, 1)]); + splitLinesCollection.setHiddenAreas([new Range(2, 1, 4, 1)]); assert.equal(splitLinesCollection.getViewLineCount(), 8); assert.equal(splitLinesCollection.modelPositionIsVisible(1, 1), true); assert.equal(splitLinesCollection.modelPositionIsVisible(2, 1), false); From 8485cb6e4dc9ca3446914129997fdb8032a1635a Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 10 May 2017 00:24:40 +0200 Subject: [PATCH 0345/2747] Simplifications post moving viewLayout into viewModel --- src/vs/editor/browser/view/viewImpl.ts | 70 +------- .../editorScrollbar/editorScrollbar.ts | 13 +- .../browser/viewParts/lines/viewLines.ts | 2 +- .../overviewRuler/decorationsOverviewRuler.ts | 6 +- .../viewParts/overviewRuler/overviewRuler.ts | 14 +- .../editor/browser/widget/codeEditorWidget.ts | 142 +---------------- src/vs/editor/common/commonCodeEditor.ts | 150 ++++++++++++++++-- src/vs/editor/common/view/viewEvents.ts | 19 +-- src/vs/editor/common/viewLayout/viewLayout.ts | 9 +- .../common/viewModel/viewEventHandler.ts | 9 -- src/vs/editor/common/viewModel/viewModel.ts | 2 +- .../editor/common/viewModel/viewModelImpl.ts | 23 ++- .../test/common/mocks/mockCodeEditor.ts | 18 --- 13 files changed, 180 insertions(+), 297 deletions(-) diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index 6882b9ee36b4f..49a8d522741f8 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -11,7 +11,6 @@ import * as dom from 'vs/base/browser/dom'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { Range } from 'vs/editor/common/core/range'; -import * as editorCommon from 'vs/editor/common/editorCommon'; import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler'; import { Configuration } from 'vs/editor/browser/config/configuration'; import { TextAreaHandler, ITextAreaHandlerHelper } from 'vs/editor/browser/controller/textAreaHandler'; @@ -49,7 +48,6 @@ import { ViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData' import { EditorScrollbar } from 'vs/editor/browser/viewParts/editorScrollbar/editorScrollbar'; import { Minimap } from 'vs/editor/browser/viewParts/minimap/minimap'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; export interface IContentWidgetData { widget: editorBrowser.IContentWidget; @@ -156,10 +154,7 @@ export class View extends ViewEventHandler { this.viewParts.push(this.viewZones); // Decorations overview ruler - let decorationsOverviewRuler = new DecorationsOverviewRuler( - this._context, this._context.viewLayout.getScrollHeight(), - (lineNumber: number) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber) - ); + let decorationsOverviewRuler = new DecorationsOverviewRuler(this._context); this.viewParts.push(decorationsOverviewRuler); @@ -432,30 +427,6 @@ export class View extends ViewEventHandler { // --- BEGIN CodeEditor helpers - public getScrollWidth(): number { - return this._context.viewLayout.getScrollWidth(); - } - - public getScrollLeft(): number { - return this._context.viewLayout.getScrollLeft(); - } - - public getScrollHeight(): number { - return this._context.viewLayout.getScrollHeight(); - } - - public getScrollTop(): number { - return this._context.viewLayout.getScrollTop(); - } - - public setScrollPosition(scrollPosition: editorCommon.INewScrollPosition): void { - this._context.viewLayout.setScrollPosition(scrollPosition); - } - - public getVerticalOffsetForViewLineNumber(viewLineNumber: number): number { - return this._context.viewLayout.getVerticalOffsetForLineNumber(viewLineNumber); - } - public delegateVerticalScrollbarMouseDown(browserEvent: MouseEvent): void { this._scrollbar.delegateVerticalScrollbarMouseDown(browserEvent); } @@ -478,37 +449,12 @@ export class View extends ViewEventHandler { return this.pointerHandler.getTargetAtClientPoint(clientX, clientY); } - public getCompletelyVisibleViewRange(): Range { - const partialData = this._context.viewLayout.getLinesViewportData(); - const startViewLineNumber = partialData.completelyVisibleStartLineNumber; - const endViewLineNumber = partialData.completelyVisibleEndLineNumber; - - return new Range( - startViewLineNumber, this._context.model.getLineMinColumn(startViewLineNumber), - endViewLineNumber, this._context.model.getLineMaxColumn(endViewLineNumber) - ); - } - - public getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range { - const partialData = this._context.viewLayout.getLinesViewportDataAtScrollTop(scrollTop); - const startViewLineNumber = partialData.completelyVisibleStartLineNumber; - const endViewLineNumber = partialData.completelyVisibleEndLineNumber; - - return new Range( - startViewLineNumber, this._context.model.getLineMinColumn(startViewLineNumber), - endViewLineNumber, this._context.model.getLineMaxColumn(endViewLineNumber) - ); - } - public getInternalEventBus(): ViewOutgoingEvents { return this.outgoingEvents; } public createOverviewRuler(cssClassName: string, minimumHeight: number, maximumHeight: number): OverviewRuler { - return new OverviewRuler( - this._context, cssClassName, this._context.viewLayout.getScrollHeight(), minimumHeight, maximumHeight, - (lineNumber: number) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber) - ); + return new OverviewRuler(this._context, cssClassName, minimumHeight, maximumHeight); } public change(callback: (changeAccessor: editorBrowser.IViewZoneChangeAccessor) => any): boolean { @@ -548,10 +494,6 @@ export class View extends ViewEventHandler { return zonesHaveChanged; } - public getWhitespaces(): IEditorWhitespace[] { - return this._context.viewLayout.getWhitespaces(); - } - public render(now: boolean, everything: boolean): void { if (everything) { // Force everything to render... @@ -572,14 +514,6 @@ export class View extends ViewEventHandler { this._textAreaHandler.setAriaActiveDescendant(id); } - public saveState(): editorCommon.IViewState { - return this._context.viewLayout.saveState(); - } - - public restoreState(state: editorCommon.IViewState): void { - return this._context.viewLayout.restoreState(state); - } - public focus(): void { this._textAreaHandler.focusTextArea(); } diff --git a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts index a5d6bab5cdf46..aff8334b64c93 100644 --- a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts +++ b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts @@ -9,7 +9,6 @@ import { ScrollableElementCreationOptions, ScrollableElementChangeOptions } from import { IOverviewRulerLayoutInfo, ScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; import { INewScrollPosition } from 'vs/editor/common/editorCommon'; import { ViewPart, PartFingerprint, PartFingerprints } from 'vs/editor/browser/view/viewPart'; -import { Scrollable } from 'vs/base/common/scrollable'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; @@ -17,7 +16,6 @@ import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; export class EditorScrollbar extends ViewPart { - private scrollable: Scrollable; private scrollbar: ScrollableElement; private scrollbarDomNode: FastDomNode; @@ -29,8 +27,6 @@ export class EditorScrollbar extends ViewPart { ) { super(context); - this.scrollable = this._context.viewLayout.scrollable; - const editor = this._context.configuration.editor; const configScrollbarOpts = editor.viewInfo.scrollbar; @@ -54,7 +50,7 @@ export class EditorScrollbar extends ViewPart { mouseWheelScrollSensitivity: configScrollbarOpts.mouseWheelScrollSensitivity, }; - this.scrollbar = this._register(new ScrollableElement(linesContent.domNode, scrollbarOptions, this.scrollable)); + this.scrollbar = this._register(new ScrollableElement(linesContent.domNode, scrollbarOptions, this._context.viewLayout.scrollable)); PartFingerprints.write(this.scrollbar.getDomNode(), PartFingerprint.ScrollableElement); this.scrollbarDomNode = createFastDomNode(this.scrollbar.getDomNode()); @@ -66,13 +62,12 @@ export class EditorScrollbar extends ViewPart { // changing the .scrollTop of this.linesContent let onBrowserDesperateReveal = (domNode: HTMLElement, lookAtScrollTop: boolean, lookAtScrollLeft: boolean) => { - const scrollState = this.scrollable.getState(); let newScrollPosition: INewScrollPosition = {}; if (lookAtScrollTop) { let deltaTop = domNode.scrollTop; if (deltaTop) { - newScrollPosition.scrollTop = scrollState.scrollTop + deltaTop; + newScrollPosition.scrollTop = this._context.viewLayout.getScrollTop() + deltaTop; domNode.scrollTop = 0; } } @@ -80,12 +75,12 @@ export class EditorScrollbar extends ViewPart { if (lookAtScrollLeft) { let deltaLeft = domNode.scrollLeft; if (deltaLeft) { - newScrollPosition.scrollLeft = scrollState.scrollLeft + deltaLeft; + newScrollPosition.scrollLeft = this._context.viewLayout.getScrollLeft() + deltaLeft; domNode.scrollLeft = 0; } } - this.scrollable.updateState(newScrollPosition); + this._context.viewLayout.setScrollPosition(newScrollPosition); }; // I've seen this happen both on the view dom node & on the lines content dom node. diff --git a/src/vs/editor/browser/viewParts/lines/viewLines.ts b/src/vs/editor/browser/viewParts/lines/viewLines.ts index fce372b0b8daf..730e42ad4171a 100644 --- a/src/vs/editor/browser/viewParts/lines/viewLines.ts +++ b/src/vs/editor/browser/viewParts/lines/viewLines.ts @@ -184,7 +184,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, this._lastCursorRevealRangeHorizontallyEvent = e; } - this._context.viewLayout.setScrollPosition({ + this._context.viewLayout.setScrollPosition({ // TODO@Alex: scrolling vertically can be moved to the view model scrollTop: newScrollTop }); diff --git a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts index 6ffaa520096c6..5ee8d66826e02 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts @@ -51,17 +51,17 @@ export class DecorationsOverviewRuler extends ViewPart { private _zonesFromDecorations: OverviewRulerZone[]; private _zonesFromCursors: OverviewRulerZone[]; - constructor(context: ViewContext, scrollHeight: number, getVerticalOffsetForLine: (lineNumber: number) => number) { + constructor(context: ViewContext) { super(context); this._overviewRuler = new OverviewRulerImpl( 1, 'decorationsOverviewRuler', - scrollHeight, + this._context.viewLayout.getScrollHeight(), this._context.configuration.editor.lineHeight, this._context.configuration.editor.canUseTranslate3d, DecorationsOverviewRuler.MIN_DECORATION_HEIGHT, DecorationsOverviewRuler.MAX_DECORATION_HEIGHT, - getVerticalOffsetForLine + (lineNumber: number) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber) ); this._overviewRuler.setLanesCount(this._context.configuration.editor.viewInfo.overviewRulerLanes, false); let theme = this._context.configuration.editor.viewInfo.theme; diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts index 4ec5b262fbd2f..8efec195d9a28 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts @@ -17,11 +17,19 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { private _context: ViewContext; private _overviewRuler: OverviewRulerImpl; - constructor(context: ViewContext, cssClassName: string, scrollHeight: number, minimumHeight: number, maximumHeight: number, getVerticalOffsetForLine: (lineNumber: number) => number) { + constructor(context: ViewContext, cssClassName: string, minimumHeight: number, maximumHeight: number) { super(); this._context = context; - this._overviewRuler = new OverviewRulerImpl(0, cssClassName, scrollHeight, this._context.configuration.editor.lineHeight, - this._context.configuration.editor.canUseTranslate3d, minimumHeight, maximumHeight, getVerticalOffsetForLine); + this._overviewRuler = new OverviewRulerImpl( + 0, + cssClassName, + this._context.viewLayout.getScrollHeight(), + this._context.configuration.editor.lineHeight, + this._context.configuration.editor.canUseTranslate3d, + minimumHeight, + maximumHeight, + (lineNumber: number) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber) + ); this._context.addEventHandler(this); } diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index f1bb44263e472..19579878aa2db 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -187,94 +187,11 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito return this._view.domNode.domNode; } - public getCenteredRangeInViewport(): Range { - if (!this.hasView) { - return null; - } - return this.viewModel.getCenteredRangeInViewport(); - } - - protected _getCompletelyVisibleViewRange(): Range { - if (!this.hasView) { - return null; - } - return this._view.getCompletelyVisibleViewRange(); - } - - protected _getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range { - if (!this.hasView) { - return null; - } - return this._view.getCompletelyVisibleViewRangeAtScrollTop(scrollTop); - } - - protected _getVerticalOffsetForViewLineNumber(viewLineNumber: number): number { - if (!this.hasView) { - return 0; - } - return this._view.getVerticalOffsetForViewLineNumber(viewLineNumber); - } - public getCompletelyVisibleLinesRangeInViewport(): Range { const viewRange = this._getCompletelyVisibleViewRange(); return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange); } - public getScrollWidth(): number { - if (!this.hasView) { - return -1; - } - return this._view.getScrollWidth(); - } - public getScrollLeft(): number { - if (!this.hasView) { - return -1; - } - return this._view.getScrollLeft(); - } - - public getScrollHeight(): number { - if (!this.hasView) { - return -1; - } - return this._view.getScrollHeight(); - } - public getScrollTop(): number { - if (!this.hasView) { - return -1; - } - return this._view.getScrollTop(); - } - - public setScrollLeft(newScrollLeft: number): void { - if (!this.hasView) { - return; - } - if (typeof newScrollLeft !== 'number') { - throw new Error('Invalid arguments'); - } - this._view.setScrollPosition({ - scrollLeft: newScrollLeft - }); - } - public setScrollTop(newScrollTop: number): void { - if (!this.hasView) { - return; - } - if (typeof newScrollTop !== 'number') { - throw new Error('Invalid arguments'); - } - this._view.setScrollPosition({ - scrollTop: newScrollTop - }); - } - public setScrollPosition(position: editorCommon.INewScrollPosition): void { - if (!this.hasView) { - return; - } - this._view.setScrollPosition(position); - } - public delegateVerticalScrollbarMouseDown(browserEvent: MouseEvent): void { if (!this.hasView) { return; @@ -282,57 +199,6 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito this._view.delegateVerticalScrollbarMouseDown(browserEvent); } - public saveViewState(): editorCommon.ICodeEditorViewState { - if (!this.cursor || !this.hasView) { - return null; - } - let contributionsState: { [key: string]: any } = {}; - - let keys = Object.keys(this._contributions); - for (let i = 0, len = keys.length; i < len; i++) { - let id = keys[i]; - let contribution = this._contributions[id]; - if (typeof contribution.saveViewState === 'function') { - contributionsState[id] = contribution.saveViewState(); - } - } - - let cursorState = this.cursor.saveState(); - let viewState = this._view.saveState(); - return { - cursorState: cursorState, - viewState: viewState, - contributionsState: contributionsState - }; - } - - public restoreViewState(s: editorCommon.ICodeEditorViewState): void { - if (!this.cursor || !this.hasView) { - return; - } - if (s && s.cursorState && s.viewState) { - let codeEditorState = s; - let cursorState = codeEditorState.cursorState; - if (Array.isArray(cursorState)) { - this.cursor.restoreState(cursorState); - } else { - // Backwards compatibility - this.cursor.restoreState([cursorState]); - } - this._view.restoreState(codeEditorState.viewState); - - let contributionsState = s.contributionsState || {}; - let keys = Object.keys(this._contributions); - for (let i = 0, len = keys.length; i < len; i++) { - let id = keys[i]; - let contribution = this._contributions[id]; - if (typeof contribution.restoreViewState === 'function') { - contribution.restoreViewState(contributionsState[id]); - } - } - } - } - public layout(dimension?: editorCommon.IDimension): void { this._configuration.observeReferenceElement(dimension); this.render(); @@ -445,7 +311,7 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito if (!this.hasView) { return []; } - return this._view.getWhitespaces(); + return this.viewModel.viewLayout.getWhitespaces(); } private _getVerticalOffsetForPosition(modelLineNumber: number, modelColumn: number): number { @@ -454,7 +320,7 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito column: modelColumn }); let viewPosition = this.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition); - return this._view.getVerticalOffsetForViewLineNumber(viewPosition.lineNumber); + return this.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewPosition.lineNumber); } public getTopForLineNumber(lineNumber: number): number { @@ -486,8 +352,8 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito let position = this.model.validatePosition(rawPosition); let layoutInfo = this._configuration.editor.layoutInfo; - let top = this._getVerticalOffsetForPosition(position.lineNumber, position.column) - this._view.getScrollTop(); - let left = this._view.getOffsetForColumn(position.lineNumber, position.column) + layoutInfo.glyphMarginWidth + layoutInfo.lineNumbersWidth + layoutInfo.decorationsWidth - this._view.getScrollLeft(); + let top = this._getVerticalOffsetForPosition(position.lineNumber, position.column) - this.getScrollTop(); + let left = this._view.getOffsetForColumn(position.lineNumber, position.column) + layoutInfo.glyphMarginWidth + layoutInfo.lineNumbersWidth + layoutInfo.decorationsWidth - this.getScrollLeft(); return { top: top, diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index b3d0d0f0ce0e5..104436dd806c5 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -234,11 +234,40 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo this._postDetachModelCleanup(detachedModel); } - public abstract getCenteredRangeInViewport(): Range; + public getCenteredRangeInViewport(): Range { + if (!this.hasView) { + return null; + } + return this.viewModel.getCenteredRangeInViewport(); + } + + protected _getCompletelyVisibleViewRange(): Range { + if (!this.hasView) { + return null; + } + const partialData = this.viewModel.viewLayout.getLinesViewportData(); + const startViewLineNumber = partialData.completelyVisibleStartLineNumber; + const endViewLineNumber = partialData.completelyVisibleEndLineNumber; + + return new Range( + startViewLineNumber, this.viewModel.getLineMinColumn(startViewLineNumber), + endViewLineNumber, this.viewModel.getLineMaxColumn(endViewLineNumber) + ); + } - protected abstract _getCompletelyVisibleViewRange(): Range; - protected abstract _getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range; - protected abstract _getVerticalOffsetForViewLineNumber(viewLineNumber: number): number; + protected _getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range { + if (!this.hasView) { + return null; + } + const partialData = this.viewModel.viewLayout.getLinesViewportDataAtScrollTop(scrollTop); + const startViewLineNumber = partialData.completelyVisibleStartLineNumber; + const endViewLineNumber = partialData.completelyVisibleEndLineNumber; + + return new Range( + startViewLineNumber, this.viewModel.getLineMinColumn(startViewLineNumber), + endViewLineNumber, this.viewModel.getLineMaxColumn(endViewLineNumber) + ); + } public getVisibleColumnFromPosition(rawPosition: IPosition): number { if (!this.model) { @@ -499,18 +528,111 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo this.cursor.setSelections('api', ranges); } - public abstract getScrollWidth(): number; - public abstract getScrollLeft(): number; + public getScrollWidth(): number { + if (!this.hasView) { + return -1; + } + return this.viewModel.viewLayout.getScrollWidth(); + } + public getScrollLeft(): number { + if (!this.hasView) { + return -1; + } + return this.viewModel.viewLayout.getScrollLeft(); + } + + public getScrollHeight(): number { + if (!this.hasView) { + return -1; + } + return this.viewModel.viewLayout.getScrollHeight(); + } + public getScrollTop(): number { + if (!this.hasView) { + return -1; + } + return this.viewModel.viewLayout.getScrollTop(); + } + + public setScrollLeft(newScrollLeft: number): void { + if (!this.hasView) { + return; + } + if (typeof newScrollLeft !== 'number') { + throw new Error('Invalid arguments'); + } + this.viewModel.viewLayout.setScrollPosition({ + scrollLeft: newScrollLeft + }); + } + public setScrollTop(newScrollTop: number): void { + if (!this.hasView) { + return; + } + if (typeof newScrollTop !== 'number') { + throw new Error('Invalid arguments'); + } + this.viewModel.viewLayout.setScrollPosition({ + scrollTop: newScrollTop + }); + } + public setScrollPosition(position: editorCommon.INewScrollPosition): void { + if (!this.hasView) { + return; + } + this.viewModel.viewLayout.setScrollPosition(position); + } + + public saveViewState(): editorCommon.ICodeEditorViewState { + if (!this.cursor || !this.hasView) { + return null; + } + let contributionsState: { [key: string]: any } = {}; - public abstract getScrollHeight(): number; - public abstract getScrollTop(): number; + let keys = Object.keys(this._contributions); + for (let i = 0, len = keys.length; i < len; i++) { + let id = keys[i]; + let contribution = this._contributions[id]; + if (typeof contribution.saveViewState === 'function') { + contributionsState[id] = contribution.saveViewState(); + } + } - public abstract setScrollLeft(newScrollLeft: number): void; - public abstract setScrollTop(newScrollTop: number): void; - public abstract setScrollPosition(position: editorCommon.INewScrollPosition): void; + let cursorState = this.cursor.saveState(); + let viewState = this.viewModel.viewLayout.saveState(); + return { + cursorState: cursorState, + viewState: viewState, + contributionsState: contributionsState + }; + } - public abstract saveViewState(): editorCommon.ICodeEditorViewState; - public abstract restoreViewState(state: editorCommon.IEditorViewState): void; + public restoreViewState(s: editorCommon.ICodeEditorViewState): void { + if (!this.cursor || !this.hasView) { + return; + } + if (s && s.cursorState && s.viewState) { + let codeEditorState = s; + let cursorState = codeEditorState.cursorState; + if (Array.isArray(cursorState)) { + this.cursor.restoreState(cursorState); + } else { + // Backwards compatibility + this.cursor.restoreState([cursorState]); + } + this.viewModel.viewLayout.restoreState(codeEditorState.viewState); + + let contributionsState = s.contributionsState || {}; + let keys = Object.keys(this._contributions); + for (let i = 0, len = keys.length; i < len; i++) { + let id = keys[i]; + let contribution = this._contributions[id]; + if (typeof contribution.restoreViewState === 'function') { + contribution.restoreViewState(contributionsState[id]); + } + } + } + } public onVisible(): void { } @@ -765,7 +887,7 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo return this._getCompletelyVisibleViewRangeAtScrollTop(scrollTop); }, getVerticalOffsetForViewLineNumber: (viewLineNumber: number): number => { - return this._getVerticalOffsetForViewLineNumber(viewLineNumber); + return this.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewLineNumber); } }; diff --git a/src/vs/editor/common/view/viewEvents.ts b/src/vs/editor/common/view/viewEvents.ts index 9b29111f999b7..7decc3f523168 100644 --- a/src/vs/editor/common/view/viewEvents.ts +++ b/src/vs/editor/common/view/viewEvents.ts @@ -24,10 +24,9 @@ export const enum ViewEventType { ViewLinesInserted = 10, ViewRevealRangeRequest = 11, ViewScrollChanged = 12, - ViewScrollRequest = 13, - ViewTokensChanged = 14, - ViewTokensColorsChanged = 15, - ViewZonesChanged = 16, + ViewTokensChanged = 13, + ViewTokensColorsChanged = 14, + ViewZonesChanged = 15, } export class ViewConfigurationChangedEvent { @@ -243,17 +242,6 @@ export class ViewScrollChangedEvent { } } -export class ViewScrollRequestEvent { - - public readonly type = ViewEventType.ViewScrollRequest; - - public readonly desiredScrollTop: number; - - constructor(desiredScrollTop: number) { - this.desiredScrollTop = desiredScrollTop; - } -} - export class ViewTokensChangedEvent { public readonly type = ViewEventType.ViewTokensChanged; @@ -305,7 +293,6 @@ export type ViewEvent = ( | ViewLinesInsertedEvent | ViewRevealRangeRequestEvent | ViewScrollChangedEvent - | ViewScrollRequestEvent | ViewTokensChangedEvent | ViewTokensColorsChangedEvent | ViewZonesChangedEvent diff --git a/src/vs/editor/common/viewLayout/viewLayout.ts b/src/vs/editor/common/viewLayout/viewLayout.ts index 9f437e73140f8..e6a9d763d2985 100644 --- a/src/vs/editor/common/viewLayout/viewLayout.ts +++ b/src/vs/editor/common/viewLayout/viewLayout.ts @@ -10,7 +10,6 @@ import * as editorCommon from 'vs/editor/common/editorCommon'; import { LinesLayout } from 'vs/editor/common/viewLayout/linesLayout'; import { IViewLayout, IViewWhitespaceViewportData, Viewport } from 'vs/editor/common/viewModel/viewModel'; import { IPartialViewLinesViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData'; -import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; import Event from 'vs/base/common/event'; import { IConfigurationChangedEvent } from "vs/editor/common/config/editorOptions"; @@ -71,12 +70,12 @@ export class ViewLayout extends Disposable implements IViewLayout { this._linesLayout.onFlushed(lineCount); this._updateHeight(); } - public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): void { - this._linesLayout.onLinesDeleted(e.fromLineNumber, e.toLineNumber); + public onLinesDeleted(fromLineNumber: number, toLineNumber: number): void { + this._linesLayout.onLinesDeleted(fromLineNumber, toLineNumber); this._updateHeight(); } - public onLinesInserted(e: viewEvents.ViewLinesInsertedEvent): void { - this._linesLayout.onLinesInserted(e.fromLineNumber, e.toLineNumber); + public onLinesInserted(fromLineNumber: number, toLineNumber: number): void { + this._linesLayout.onLinesInserted(fromLineNumber, toLineNumber); this._updateHeight(); } diff --git a/src/vs/editor/common/viewModel/viewEventHandler.ts b/src/vs/editor/common/viewModel/viewEventHandler.ts index 4a76918e20bc8..3ef6a84a4e435 100644 --- a/src/vs/editor/common/viewModel/viewEventHandler.ts +++ b/src/vs/editor/common/viewModel/viewEventHandler.ts @@ -70,9 +70,6 @@ export class ViewEventHandler extends Disposable { public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return false; } - public onScrollRequest(e: viewEvents.ViewScrollRequestEvent): boolean { - return false; - } public onTokensChanged(e: viewEvents.ViewTokensChangedEvent): boolean { return false; } @@ -166,12 +163,6 @@ export class ViewEventHandler extends Disposable { } break; - case viewEvents.ViewEventType.ViewScrollRequest: - if (this.onScrollRequest(e)) { - shouldRender = true; - } - break; - case viewEvents.ViewEventType.ViewTokensChanged: if (this.onTokensChanged(e)) { shouldRender = true; diff --git a/src/vs/editor/common/viewModel/viewModel.ts b/src/vs/editor/common/viewModel/viewModel.ts index 2abd774314ca9..7ee4226bfc99e 100644 --- a/src/vs/editor/common/viewModel/viewModel.ts +++ b/src/vs/editor/common/viewModel/viewModel.ts @@ -83,7 +83,7 @@ export interface IViewLayout { */ getWhitespaceViewportData(): IViewWhitespaceViewportData[]; - // TODO@Alex + // TODO@Alex whitespace management should work via a change accessor sort of thing onHeightMaybeChanged(); // --------------- End vertical whitespace management diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index 94cf029a9ce0d..432debeaa8152 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -217,7 +217,6 @@ export class ViewModel extends Disposable implements IViewModel { this.viewLayout.setScrollPosition({ scrollTop: e.desiredScrollTop }); - eventsCollector.emit(new viewEvents.ViewScrollRequestEvent(e.desiredScrollTop)); // TODO@Alex: delete this ev type break; } default: @@ -312,7 +311,7 @@ export class ViewModel extends Disposable implements IViewModel { const linesDeletedEvent = this.lines.onModelLinesDeleted(versionId, change.fromLineNumber, change.toLineNumber); if (linesDeletedEvent !== null) { eventsCollector.emit(linesDeletedEvent); - this.viewLayout.onLinesDeleted(linesDeletedEvent); + this.viewLayout.onLinesDeleted(linesDeletedEvent.fromLineNumber, linesDeletedEvent.toLineNumber); } hadOtherModelChange = true; break; @@ -321,24 +320,24 @@ export class ViewModel extends Disposable implements IViewModel { const linesInsertedEvent = this.lines.onModelLinesInserted(versionId, change.fromLineNumber, change.toLineNumber, change.detail.split('\n')); if (linesInsertedEvent !== null) { eventsCollector.emit(linesInsertedEvent); - this.viewLayout.onLinesInserted(linesInsertedEvent); + this.viewLayout.onLinesInserted(linesInsertedEvent.fromLineNumber, linesInsertedEvent.toLineNumber); } hadOtherModelChange = true; break; } case textModelEvents.RawContentChangedType.LineChanged: { - const [lineMappingChanged, viewLinesChangedEvent, viewLinesInsertedEvent, viewLinesDeletedEvent] = this.lines.onModelLineChanged(versionId, change.lineNumber, change.detail); + const [lineMappingChanged, linesChangedEvent, linesInsertedEvent, linesDeletedEvent] = this.lines.onModelLineChanged(versionId, change.lineNumber, change.detail); hadModelLineChangeThatChangedLineMapping = lineMappingChanged; - if (viewLinesChangedEvent) { - eventsCollector.emit(viewLinesChangedEvent); + if (linesChangedEvent) { + eventsCollector.emit(linesChangedEvent); } - if (viewLinesInsertedEvent) { - eventsCollector.emit(viewLinesInsertedEvent); - this.viewLayout.onLinesInserted(viewLinesInsertedEvent); + if (linesInsertedEvent) { + eventsCollector.emit(linesInsertedEvent); + this.viewLayout.onLinesInserted(linesInsertedEvent.fromLineNumber, linesInsertedEvent.toLineNumber); } - if (viewLinesDeletedEvent) { - eventsCollector.emit(viewLinesDeletedEvent); - this.viewLayout.onLinesDeleted(viewLinesDeletedEvent); + if (linesDeletedEvent) { + eventsCollector.emit(linesDeletedEvent); + this.viewLayout.onLinesDeleted(linesDeletedEvent.fromLineNumber, linesDeletedEvent.toLineNumber); } break; } diff --git a/src/vs/editor/test/common/mocks/mockCodeEditor.ts b/src/vs/editor/test/common/mocks/mockCodeEditor.ts index 92e4e0f444e5e..f927151d734fa 100644 --- a/src/vs/editor/test/common/mocks/mockCodeEditor.ts +++ b/src/vs/editor/test/common/mocks/mockCodeEditor.ts @@ -14,30 +14,12 @@ import { Cursor } from 'vs/editor/common/controller/cursor'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { Model } from 'vs/editor/common/model/model'; import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; -import { Range } from 'vs/editor/common/core/range'; import * as editorOptions from 'vs/editor/common/config/editorOptions'; export class MockCodeEditor extends CommonCodeEditor { protected _createConfiguration(options: editorOptions.IEditorOptions): CommonEditorConfiguration { return new TestConfiguration(options); } - public getCenteredRangeInViewport(): Range { return null; } - protected _getCompletelyVisibleViewRange(): Range { return null; } - protected _getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range { return null; } - protected _getVerticalOffsetForViewLineNumber(viewLineNumber: number): number { return 0; } - - public getScrollWidth(): number { return 0; } - public getScrollLeft(): number { return 0; } - - public getScrollHeight(): number { return 0; } - public getScrollTop(): number { return 0; } - - public setScrollLeft(newScrollLeft: number): void { } - public setScrollTop(newScrollTop: number): void { } - public setScrollPosition(position: editorCommon.INewScrollPosition): void { } - - public saveViewState(): editorCommon.ICodeEditorViewState { return null; } - public restoreViewState(state: editorCommon.IEditorViewState): void { } public layout(dimension?: editorCommon.IDimension): void { } From 3c5918c200d6b1139fa7a7951dfb1d9c44fd12e4 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 10 May 2017 00:35:41 +0200 Subject: [PATCH 0346/2747] Fixes #26313: Do not assume ownership of passed in options object --- src/vs/editor/common/config/commonEditorConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 6256a8ac91904..afdc566eac9ea 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -74,7 +74,7 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed constructor(options: editorOptions.IEditorOptions) { super(); - this._rawOptions = options || {}; + this._rawOptions = objects.mixin({}, options || {}); this._validatedOptions = editorOptions.EditorOptionsValidator.validate(this._rawOptions, EDITOR_DEFAULTS); this.editor = null; this._isDominatedByLongLines = false; From 173fc4472380aa0707195f96f4bfd465851c05ed Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 9 May 2017 20:55:09 -0700 Subject: [PATCH 0347/2747] Support Tags in TS/JS Hover Provider Fixes #26290 Adds support for displaying documentation tags from jsdoc comments (such as `@private`) in hovers --- extensions/typescript/src/features/hoverProvider.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/extensions/typescript/src/features/hoverProvider.ts b/extensions/typescript/src/features/hoverProvider.ts index 960d4964c42fc..9e6a8af4dc821 100644 --- a/extensions/typescript/src/features/hoverProvider.ts +++ b/extensions/typescript/src/features/hoverProvider.ts @@ -29,7 +29,7 @@ export default class TypeScriptHoverProvider implements HoverProvider { if (response && response.body) { const data = response.body; return new Hover( - [{ language: 'typescript', value: data.displayString }, data.documentation], + TypeScriptHoverProvider.getContents(data), new Range(data.start.line - 1, data.start.offset - 1, data.end.line - 1, data.end.offset - 1)); } return undefined; @@ -38,4 +38,15 @@ export default class TypeScriptHoverProvider implements HoverProvider { return null; }); } + + private static getContents(data: Proto.QuickInfoResponseBody) { + const tags: string[] = []; + for (const tag of data.tags || []) { + tags.push(`*@${tag.name}*` + (tag.text ? ` — ${tag.text}` : '')); + } + return [ + { language: 'typescript', value: data.displayString }, + data.documentation + (tags.length ? '\n\n' + tags.join(' \n') : '') + ]; + } } \ No newline at end of file From f7306841f6b3abf59bcbe739672f54f05008c7b9 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 9 May 2017 21:27:55 -0700 Subject: [PATCH 0348/2747] show jsdoc tags in sig help and for completion items Fixes #26290 Exposes jsdoc tags such as `@priver` in the signature help and in completion items --- .../src/features/completionItemProvider.ts | 4 +++- extensions/typescript/src/features/hoverProvider.ts | 8 +++----- extensions/typescript/src/features/previewer.ts | 12 ++++++++++++ .../typescript/src/features/signatureHelpProvider.ts | 5 ++++- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/extensions/typescript/src/features/completionItemProvider.ts b/extensions/typescript/src/features/completionItemProvider.ts index 9a4ad7c1f7d7d..3eeba2e395f48 100644 --- a/extensions/typescript/src/features/completionItemProvider.ts +++ b/extensions/typescript/src/features/completionItemProvider.ts @@ -242,9 +242,11 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP return item; } const detail = details[0]; - item.documentation = Previewer.plain(detail.documentation); item.detail = Previewer.plain(detail.displayParts); + const tags = Previewer.tagsPlainPreview(detail.tags); + item.documentation = Previewer.plain(detail.documentation) + (tags ? '\n\n' + tags : ''); + if (detail && this.config.useCodeSnippetsOnMethodSuggest && (item.kind === CompletionItemKind.Function || item.kind === CompletionItemKind.Method)) { return this.isValidFunctionCompletionContext(filepath, item.position).then(shouldCompleteFunction => { if (shouldCompleteFunction) { diff --git a/extensions/typescript/src/features/hoverProvider.ts b/extensions/typescript/src/features/hoverProvider.ts index 9e6a8af4dc821..75d36131bafde 100644 --- a/extensions/typescript/src/features/hoverProvider.ts +++ b/extensions/typescript/src/features/hoverProvider.ts @@ -9,6 +9,7 @@ import { HoverProvider, Hover, TextDocument, Position, Range, CancellationToken import * as Proto from '../protocol'; import { ITypescriptServiceClient } from '../typescriptService'; +import { tagsMarkdownPreview } from "./previewer"; export default class TypeScriptHoverProvider implements HoverProvider { @@ -40,13 +41,10 @@ export default class TypeScriptHoverProvider implements HoverProvider { } private static getContents(data: Proto.QuickInfoResponseBody) { - const tags: string[] = []; - for (const tag of data.tags || []) { - tags.push(`*@${tag.name}*` + (tag.text ? ` — ${tag.text}` : '')); - } + const tags = tagsMarkdownPreview(data.tags); return [ { language: 'typescript', value: data.displayString }, - data.documentation + (tags.length ? '\n\n' + tags.join(' \n') : '') + data.documentation + (tags ? '\n\n' + tags : '') ]; } } \ No newline at end of file diff --git a/extensions/typescript/src/features/previewer.ts b/extensions/typescript/src/features/previewer.ts index 0f57473fa5890..e5a8ef7f7e3a1 100644 --- a/extensions/typescript/src/features/previewer.ts +++ b/extensions/typescript/src/features/previewer.ts @@ -12,4 +12,16 @@ export function plain(parts: Proto.SymbolDisplayPart[]): string { return ''; } return parts.map(part => part.text).join(''); +} + +export function tagsMarkdownPreview(tags: Proto.JSDocTagInfo[]): string { + return (tags || []) + .map(tag => `*@${tag.name}*` + (tag.text ? ` — ${tag.text}` : '')) + .join(' \n'); +} + +export function tagsPlainPreview(tags: Proto.JSDocTagInfo[]): string { + return (tags || []) + .map(tag => `@${tag.name}` + (tag.text ? ` — ${tag.text}` : '')) + .join('\n'); } \ No newline at end of file diff --git a/extensions/typescript/src/features/signatureHelpProvider.ts b/extensions/typescript/src/features/signatureHelpProvider.ts index 7d6f8942bfef9..dc7214da7f630 100644 --- a/extensions/typescript/src/features/signatureHelpProvider.ts +++ b/extensions/typescript/src/features/signatureHelpProvider.ts @@ -61,7 +61,10 @@ export default class TypeScriptSignatureHelpProvider implements SignatureHelpPro } }); signature.label += Previewer.plain(item.suffixDisplayParts); - signature.documentation = Previewer.plain(item.documentation); + + const tags = Previewer.tagsPlainPreview(item.tags); + signature.documentation = Previewer.plain(item.documentation) + (tags ? '\n\n' + tags : ''); + result.signatures.push(signature); }); From f2b9e43a0e065ea33939a5d3b53eaff3ba7d522d Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 9 May 2017 21:30:24 -0700 Subject: [PATCH 0349/2747] Preserve newlines in signature help display Fixes #26346 **Bug** Signature help currently handles newlines differently than completion item providers. This results in inconsistent looking documentation **fix** Use `pre-wrap` for the signature help documentation the same way we do for completion items --- src/vs/editor/contrib/parameterHints/browser/parameterHints.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/editor/contrib/parameterHints/browser/parameterHints.css b/src/vs/editor/contrib/parameterHints/browser/parameterHints.css index dd628db6a5ecc..d6a1ffafeb749 100644 --- a/src/vs/editor/contrib/parameterHints/browser/parameterHints.css +++ b/src/vs/editor/contrib/parameterHints/browser/parameterHints.css @@ -55,6 +55,7 @@ .monaco-editor .parameter-hints-widget .docs { padding: 0 10px 0 5px; + white-space: pre-wrap; } .monaco-editor .parameter-hints-widget .buttons { From 93e42a5e46cfe9490404de8b3ebed5165f991329 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 9 May 2017 21:50:56 -0700 Subject: [PATCH 0350/2747] Use for of loop --- .../typescript/src/features/completionItemProvider.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/extensions/typescript/src/features/completionItemProvider.ts b/extensions/typescript/src/features/completionItemProvider.ts index 3eeba2e395f48..d5f4bd4477c65 100644 --- a/extensions/typescript/src/features/completionItemProvider.ts +++ b/extensions/typescript/src/features/completionItemProvider.ts @@ -202,13 +202,12 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP // Prevents incorrectly completing while typing spread operators. if (position.character > 0) { const preText = document.getText(new Range( - new Position(position.line, 0), - new Position(position.line, position.character - 1))); + position.line, 0, + position.line, position.character - 1)); enableDotCompletions = preText.match(/[a-z_$\)\]\}]\s*$/ig) !== null; } - for (let i = 0; i < body.length; i++) { - const element = body[i]; + for (const element of body) { const item = new MyCompletionItem(position, document, element, enableDotCompletions, !this.config.useCodeSnippetsOnMethodSuggest); completionItems.push(item); } From 44495cb309882753e853c5741203d3da6c6351fb Mon Sep 17 00:00:00 2001 From: Wagner Riffel Date: Wed, 10 May 2017 02:23:38 -0300 Subject: [PATCH 0351/2747] add missing lua goto keyword --- extensions/lua/syntaxes/lua.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/lua/syntaxes/lua.json b/extensions/lua/syntaxes/lua.json index 617dac5dfa638..0bde9524ea490 100644 --- a/extensions/lua/syntaxes/lua.json +++ b/extensions/lua/syntaxes/lua.json @@ -150,7 +150,7 @@ ] }, { - "match": "\\b(break|do|else|for|if|elseif|return|then|repeat|while|until|end|function|local|in)\\b", + "match": "\\b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|function|local|in)\\b", "name": "keyword.control.lua" }, { @@ -189,4 +189,4 @@ "scopeName": "source.lua", "uuid": "93E017CC-6F27-11D9-90EB-000D93589AF7", "version": "https://github.com/textmate/lua.tmbundle/commit/609fe340f40b31f4189dabbb38f885b58cf0dd26" -} \ No newline at end of file +} From 6254814d850e43303c85702120a523a5030483ce Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 10 May 2017 07:51:35 +0200 Subject: [PATCH 0352/2747] theming - progress bar --- .../theme-abyss/themes/abyss-color-theme.json | 1 + .../themes/kimbie-dark-color-theme.json | 3 +- .../themes/monokai-color-theme.json | 1 + .../themes/quietlight-color-theme.json | 3 +- .../theme-red/themes/Red-color-theme.json | 3 +- .../themes/solarized-dark-color-theme.json | 1 + .../themes/solarized-light-color-theme.json | 1 + .../themes/tomorrow-night-blue-theme.json | 1 + .../ui/keybindingLabel/keybindingLabel.css | 14 +++---- .../browser/ui/progressbar/progressbar.css | 3 +- .../browser/ui/progressbar/progressbar.ts | 39 ++++++++++++++++++- .../quickopen/browser/quickOpenWidget.ts | 12 +++++- src/vs/platform/theme/common/colorRegistry.ts | 2 + src/vs/platform/theme/common/styler.ts | 10 ++++- .../workbench/browser/parts/compositePart.ts | 2 + .../parts/editor/editorGroupsControl.ts | 2 + 16 files changed, 81 insertions(+), 17 deletions(-) diff --git a/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json index d45846b0d169d..b244eb1cd6aba 100644 --- a/extensions/theme-abyss/themes/abyss-color-theme.json +++ b/extensions/theme-abyss/themes/abyss-color-theme.json @@ -271,6 +271,7 @@ "inputValidation.errorBorder": "#AB395B", "badge.background": "#0063a5", + "progressBar.background": "#0063a5", "dropdown.background": "#181f2f", // "dropdown.foreground": "", diff --git a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json index 2a9958948d899..2d5e0fadb3194 100644 --- a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json +++ b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json @@ -43,7 +43,8 @@ // "inputValidation.warningBorder": "#5B7E7A", "inputValidation.errorBackground": "#5f0d0d", "inputValidation.errorBorder": "#9d2f23", - "badge.background": "#7f5d38" + "badge.background": "#7f5d38", + "progressBar.background": "#7f5d38" }, "tokenColors": [ { diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index b2ec0a432b1be..439bf32d607eb 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -28,6 +28,7 @@ "tab.border": "#1e1f1c", "tab.inactiveForeground": "#ccccc7", // needs to be bright so it's readable when another editor group is focused "widget.shadow": "#1e1f1c", + "progressBar.background": "#75715E", "badge.background": "#75715E", "badge.foreground": "#f8f8f2", "editorLineNumber.foreground": "#90908a", diff --git a/extensions/theme-quietlight/themes/quietlight-color-theme.json b/extensions/theme-quietlight/themes/quietlight-color-theme.json index 4edbd8c1871e3..db8f30e0db208 100644 --- a/extensions/theme-quietlight/themes/quietlight-color-theme.json +++ b/extensions/theme-quietlight/themes/quietlight-color-theme.json @@ -496,6 +496,7 @@ "inputValidation.warningBorder": "#ffe055", "inputValidation.errorBackground": "#ffeaea", "inputValidation.errorBorder": "#f1897f", - "badge.background": "#705697AA" + "badge.background": "#705697AA", + "progressBar.background": "#705697" } } \ No newline at end of file diff --git a/extensions/theme-red/themes/Red-color-theme.json b/extensions/theme-red/themes/Red-color-theme.json index 19e66f7bea333..a35bfe0938b6d 100644 --- a/extensions/theme-red/themes/Red-color-theme.json +++ b/extensions/theme-red/themes/Red-color-theme.json @@ -50,7 +50,8 @@ "notification.background": "#662222", "pickerGroup.foreground": "#cc9999", "pickerGroup.border": "#ff000033", - "badge.background": "#cc3333" + "badge.background": "#cc3333", + "progressBar.background": "#cc3333" }, "name": "Red" } \ No newline at end of file diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index b1e0133a628db..c89667099de44 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -315,6 +315,7 @@ "inputValidation.errorBorder": "#a92049", "badge.background": "#047aa6", + "progressBar.background": "#047aa6", "dropdown.background": "#00212B", "dropdown.border": "#2AA19899", diff --git a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json index 71b344458d1b1..0c3123614c0c7 100644 --- a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -314,6 +314,7 @@ // "inputValidation.errorBorder": "", "badge.background": "#B58900AA", + "progressBar.background": "#B58900", "dropdown.background": "#EEE8D5", // "dropdown.foreground": "", diff --git a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json index 4ba744d26babc..319f8be0a61cf 100644 --- a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json +++ b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json @@ -31,6 +31,7 @@ "statusBar.noFolderBackground": "#001126", "statusBar.debuggingBackground": "#001126", "activityBar.background": "#001733", + "progressBar.background": "#bbdaffcc", "badge.background": "#bbdaffcc", "badge.foreground": "#001733", "sideBar.background": "#001c40", diff --git a/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.css b/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.css index 6c7d094804aa4..bb681b3a86392 100644 --- a/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.css +++ b/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.css @@ -9,11 +9,11 @@ .monaco-kbkey { display: inline-block; - border: solid 1px #ccc; - border-bottom-color: #bbb; + border: solid 1px rgba(204, 204, 204, 0.4); + border-bottom-color: rgba(187, 187, 187, 0.4); border-radius: 3px; - box-shadow: inset 0 -1px 0 #bbb; - background-color: #ddd; + box-shadow: inset 0 -1px 0 rgba(187, 187, 187, 0.4); + background-color: rgba(221, 221, 221, 0.4); vertical-align: middle; color: #555; line-height: 10px; @@ -25,7 +25,7 @@ .vs-dark .monaco-kbkey { background-color: rgba(128, 128, 128, 0.17); color: #ccc; - border: solid 1px #333; - border-bottom-color: #444; - box-shadow: inset 0 -1px 0 #444; + border: solid 1px rgba(51, 51, 51, 0.6); + border-bottom-color: rgba(68, 68, 68, 0.6); + box-shadow: inset 0 -1px 0 rgba(68, 68, 68, 0.6); } \ No newline at end of file diff --git a/src/vs/base/browser/ui/progressbar/progressbar.css b/src/vs/base/browser/ui/progressbar/progressbar.css index b067d6edefb36..511f186b2244f 100644 --- a/src/vs/base/browser/ui/progressbar/progressbar.css +++ b/src/vs/base/browser/ui/progressbar/progressbar.css @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ .progress-container { width: 100%; - height: 5px; + height: 5px; } .progress-container .progress-bit { @@ -13,7 +13,6 @@ position: absolute; left: 0; display: none; - background-color: #0E70C0; } .progress-container.active .progress-bit { diff --git a/src/vs/base/browser/ui/progressbar/progressbar.ts b/src/vs/base/browser/ui/progressbar/progressbar.ts index 70fb8421bc65b..cbd7de00da0d7 100644 --- a/src/vs/base/browser/ui/progressbar/progressbar.ts +++ b/src/vs/base/browser/ui/progressbar/progressbar.ts @@ -11,6 +11,8 @@ import assert = require('vs/base/common/assert'); import { Builder, $ } from 'vs/base/browser/builder'; import DOM = require('vs/base/browser/dom'); import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { Color } from "vs/base/common/color"; +import { mixin } from "vs/base/common/objects"; const css_done = 'done'; const css_active = 'active'; @@ -19,11 +21,22 @@ const css_discrete = 'discrete'; const css_progress_container = 'progress-container'; const css_progress_bit = 'progress-bit'; +export interface IProgressBarOptions extends IProgressBarStyles { +} + +export interface IProgressBarStyles { + progressBarBackground?: Color; +} + +const defaultOpts = { + progressBarBackground: Color.fromHex('#0E70C0') +}; + /** * A progress bar with support for infinite or discrete progress. */ export class ProgressBar { - + private options: IProgressBarOptions; private toUnbind: IDisposable[]; private workedVal: number; private element: Builder; @@ -31,11 +44,17 @@ export class ProgressBar { private bit: HTMLElement; private totalWork: number; private animationStopToken: ValueCallback; + private progressBarBackground: Color; + + constructor(builder: Builder, options?: IProgressBarOptions) { + this.options = options || Object.create(null); + mixin(this.options, defaultOpts, false); - constructor(builder: Builder) { this.toUnbind = []; this.workedVal = 0; + this.progressBarBackground = this.options.progressBarBackground; + this.create(builder); } @@ -61,6 +80,8 @@ export class ProgressBar { this.bit = builder.getHTMLElement(); }); + + this.applyStyles(); } private off(): void { @@ -189,6 +210,20 @@ export class ProgressBar { return $(this.element); } + public style(styles: IProgressBarStyles): void { + this.progressBarBackground = styles.progressBarBackground; + + this.applyStyles(); + } + + protected applyStyles(): void { + if (this.element) { + const background = this.progressBarBackground ? this.progressBarBackground.toString() : null; + + this.element.style('background-color', background); + } + } + public dispose(): void { this.toUnbind = dispose(this.toUnbind); } diff --git a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts index d83ef8e83802e..035dbca0d27b2 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts @@ -53,6 +53,7 @@ export interface IQuickOpenStyles extends IInputBoxStyles, ITreeStyles { pickerGroupForeground?: Color; pickerGroupBorder?: Color; widgetShadow?: Color; + progressBarBackground?: Color; } export interface IShowOptions { @@ -86,7 +87,8 @@ const defaultStyles = { foreground: Color.fromHex('#CCCCCC'), pickerGroupForeground: Color.fromHex('#0097FB'), pickerGroupBorder: Color.fromHex('#3F3F46'), - widgetShadow: Color.fromHex('#000000') + widgetShadow: Color.fromHex('#000000'), + progressBarBackground: Color.fromHex('#0E70C0') }; const DEFAULT_INPUT_ARIA_LABEL = nls.localize('quickOpenAriaLabel', "Quick picker. Type to narrow down results."); @@ -159,7 +161,7 @@ export class QuickOpenWidget implements IModelProvider { .on(DOM.EventType.BLUR, (e: Event) => this.loosingFocus(e), null, true); // Progress Bar - this.progressBar = new ProgressBar(div.clone()); + this.progressBar = new ProgressBar(div.clone(), { progressBarBackground: this.styles.progressBarBackground }); this.progressBar.getContainer().hide(); // Input Field @@ -352,6 +354,12 @@ export class QuickOpenWidget implements IModelProvider { this.builder.style('box-shadow', widgetShadow ? `0 5px 8px ${widgetShadow}` : null); } + if (this.progressBar) { + this.progressBar.style({ + progressBarBackground: this.styles.progressBarBackground + }); + } + if (this.inputBox) { this.inputBox.style({ inputBackground: this.styles.inputBackground, diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 314e9a861a2b4..4a597b87fd19d 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -194,6 +194,8 @@ export const scrollbarSliderBackground = registerColor('scrollbarSlider.backgrou export const scrollbarSliderHoverBackground = registerColor('scrollbarSlider.hoverBackground', { dark: Color.fromHex('#646464').transparent(0.7), light: Color.fromHex('#646464').transparent(0.7), hc: transparent(contrastBorder, 0.8) }, nls.localize('scrollbarSliderHoverBackground', "Slider background color when hovering.")); export const scrollbarSliderActiveBackground = registerColor('scrollbarSlider.activeBackground', { dark: Color.fromHex('#BFBFBF').transparent(0.4), light: Color.fromHex('#000000').transparent(0.6), hc: contrastBorder }, nls.localize('scrollbarSliderActiveBackground', "Slider background color when active.")); +export const progressBarBackground = registerColor('progressBar.background', { dark: Color.fromHex('#0E70C0'), light: Color.fromHex('#0E70C0'), hc: contrastBorder }, nls.localize('progressBarBackground', "Background color of the progress bar that can show for long running operations.")); + /** * Editor background color. * Because of bug https://monacotools.visualstudio.com/DefaultCollection/Monaco/_workitems/edit/13254 diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index ec9ad4240ddaa..3d56035667677 100644 --- a/src/vs/platform/theme/common/styler.ts +++ b/src/vs/platform/theme/common/styler.ts @@ -6,7 +6,7 @@ 'use strict'; import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; -import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, lighten, badgeBackground, badgeForeground } from 'vs/platform/theme/common/colorRegistry'; +import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, lighten, badgeBackground, badgeForeground, progressBarBackground } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable } from 'vs/base/common/lifecycle'; import { SIDE_BAR_SECTION_HEADER_BACKGROUND } from 'vs/workbench/common/theme'; @@ -123,6 +123,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer background?: ColorIdentifier, borderColor?: ColorIdentifier, widgetShadow?: ColorIdentifier, + progressBarBackground?: ColorIdentifier, inputBackground?: ColorIdentifier, inputForeground?: ColorIdentifier, inputBorder?: ColorIdentifier, @@ -152,6 +153,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer background: (style && style.background) || editorBackground, borderColor: style && style.borderColor || contrastBorder, widgetShadow: style && style.widgetShadow || widgetShadow, + progressBarBackground: style && style.progressBarBackground || progressBarBackground, pickerGroupForeground: style && style.pickerGroupForeground || pickerGroupForeground, pickerGroupBorder: style && style.pickerGroupBorder || pickerGroupBorder, inputBackground: (style && style.inputBackground) || inputBackground, @@ -228,6 +230,12 @@ export function attachButtonStyler(widget: IThemable, themeService: IThemeServic }, widget); } +export function attachProgressBarStyler(widget: IThemable, themeService: IThemeService, style?: { progressBarBackground?: ColorIdentifier }): IDisposable { + return doAttachStyler(themeService, { + progressBarBackground: (style && style.progressBarBackground) || progressBarBackground + }, widget); +} + export function attachStylerCallback(themeService: IThemeService, colors: { [name: string]: ColorIdentifier }, callback: styleFn): IDisposable { return doAttachStyler(themeService, colors, callback); } \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/compositePart.ts b/src/vs/workbench/browser/parts/compositePart.ts index 6579242059af0..bb92039a1f00c 100644 --- a/src/vs/workbench/browser/parts/compositePart.ts +++ b/src/vs/workbench/browser/parts/compositePart.ts @@ -36,6 +36,7 @@ import { IProgressService } from 'vs/platform/progress/common/progress'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { attachProgressBarStyler } from "vs/platform/theme/common/styler"; export interface ICompositeTitleLabel { @@ -487,6 +488,7 @@ export abstract class CompositePart extends Part { 'class': 'content' }, (div: Builder) => { this.progressBar = new ProgressBar(div); + this.toUnbind.push(attachProgressBarStyler(this.progressBar, this.themeService)); this.progressBar.getContainer().hide(); }); } diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index 898e5b288e858..0a9a2dd62d42f 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -36,6 +36,7 @@ import { getCodeEditor } from 'vs/editor/common/services/codeEditorService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { editorBackground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { Themable, TABS_CONTAINER_BACKGROUND, EDITOR_GROUP_HEADER_BACKGROUND, EDITOR_GROUP_BORDER_COLOR, EDITOR_DRAG_AND_DROP_BACKGROUND, EDITOR_GROUP_BACKGROUND } from 'vs/workbench/common/theme'; +import { attachProgressBarStyler } from "vs/platform/theme/common/styler"; export enum Rochade { NONE, @@ -991,6 +992,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro // Progress Bar const progressBar = new ProgressBar($(container)); + this.toUnbind.push(attachProgressBarStyler(progressBar, this.themeService)); progressBar.getContainer().hide(); container.setProperty(EditorGroupsControl.PROGRESS_BAR_CONTROL_KEY, progressBar); // associate with container }); From a890ca1c73aab6f8837b3b53f7f33be9ac16d280 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 10 May 2017 08:00:04 +0200 Subject: [PATCH 0353/2747] :lipstick: --- .../workbench/browser/parts/editor/textEditor.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/textEditor.ts b/src/vs/workbench/browser/parts/editor/textEditor.ts index 18033e72569cd..e485441f65f2b 100644 --- a/src/vs/workbench/browser/parts/editor/textEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textEditor.ts @@ -250,14 +250,14 @@ export abstract class BaseTextEditor extends BaseEditor { const editorViewState = this.getControl().saveViewState(); - let fileViewState: ITextEditorViewState = textEditorViewStateMemento[key]; - if (!fileViewState) { - fileViewState = Object.create(null); - textEditorViewStateMemento[key] = fileViewState; + let lastKnownViewState: ITextEditorViewState = textEditorViewStateMemento[key]; + if (!lastKnownViewState) { + lastKnownViewState = Object.create(null); + textEditorViewStateMemento[key] = lastKnownViewState; } if (typeof this.position === 'number') { - fileViewState[this.position] = editorViewState; + lastKnownViewState[this.position] = editorViewState; } } @@ -279,9 +279,9 @@ export abstract class BaseTextEditor extends BaseEditor { const memento = this.getMemento(this.storageService, Scope.WORKSPACE); const textEditorViewStateMemento = memento[TEXT_EDITOR_VIEW_STATE_PREFERENCE_KEY]; if (textEditorViewStateMemento) { - const fileViewState: ITextEditorViewState = textEditorViewStateMemento[key]; - if (fileViewState) { - return fileViewState[this.position]; + const viewState: ITextEditorViewState = textEditorViewStateMemento[key]; + if (viewState) { + return viewState[this.position]; } } From b2d5ca8c1faf4dbb79a79d67c7884a82a665248e Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 10 May 2017 08:16:09 +0200 Subject: [PATCH 0354/2747] clarify settings description --- src/vs/workbench/electron-browser/main.contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts index f20818fcf5cae..520d6c4c313a9 100644 --- a/src/vs/workbench/electron-browser/main.contribution.ts +++ b/src/vs/workbench/electron-browser/main.contribution.ts @@ -249,7 +249,7 @@ Note that there can still be cases where this setting is ignored (e.g. when usin nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.newWindowDimensions.fullscreen' }, "Open new windows in full screen mode.") ], 'default': 'default', - 'description': nls.localize('newWindowDimensions', "Controls the dimensions of opening a new window. By default, a new window will open in the center of the screen with small dimensions. When set to 'inherit', the window will get the same dimensions as the last active one. When set to 'maximized', the window will open maximized and fullscreen if configured to 'fullscreen'.") + 'description': nls.localize('newWindowDimensions', "Controls the dimensions of opening a new window when at least one window is already opened. By default, a new window will open in the center of the screen with small dimensions. When set to 'inherit', the window will get the same dimensions as the last window that was active. When set to 'maximized', the window will open maximized and fullscreen if configured to 'fullscreen'. Note that this setting does not have an impact on the first window that is opened. The first window will always restore the size and location as you left it before closing.") }, }; From 4f4a663a601ab30eed9a3da7e1d2ab04b3397b18 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 9 May 2017 23:22:44 -0700 Subject: [PATCH 0355/2747] update highlight js version --- extensions/markdown/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/markdown/package.json b/extensions/markdown/package.json index c0917c8bcba54..972deeb93ddc8 100644 --- a/extensions/markdown/package.json +++ b/extensions/markdown/package.json @@ -204,7 +204,7 @@ "update-grammar": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ./syntaxes/gulpfile.js" }, "dependencies": { - "highlight.js": "^9.3.0", + "highlight.js": "^9.11.0", "markdown-it": "^8.3.1", "markdown-it-named-headers": "0.0.4", "vscode-extension-telemetry": "^0.0.7", From 2c7516672ea9f6ff057a83720d75b05bcfd5577c Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 9 May 2017 23:23:51 -0700 Subject: [PATCH 0356/2747] Cleanup some TS files --- .../typescript/src/features/baseCodeLensProvider.ts | 11 +++++++---- .../src/features/implementationsCodeLensProvider.ts | 6 +++--- .../src/features/referencesCodeLensProvider.ts | 6 +++--- extensions/typescript/src/typescriptServiceClient.ts | 7 ++++--- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/extensions/typescript/src/features/baseCodeLensProvider.ts b/extensions/typescript/src/features/baseCodeLensProvider.ts index 986cb09b8d08c..dbfd54eb391c3 100644 --- a/extensions/typescript/src/features/baseCodeLensProvider.ts +++ b/extensions/typescript/src/features/baseCodeLensProvider.ts @@ -5,7 +5,7 @@ 'use strict'; -import { CodeLensProvider, CodeLens, CancellationToken, TextDocument, Range, Uri, Position, Event, EventEmitter, workspace, } from 'vscode'; +import { CodeLensProvider, CodeLens, CancellationToken, TextDocument, Range, Uri, Position, Event, EventEmitter, workspace, ProviderResult, } from 'vscode'; import * as Proto from '../protocol'; import { ITypescriptServiceClient } from '../typescriptService'; @@ -42,14 +42,14 @@ export abstract class TypeScriptBaseCodeLensProvider implements CodeLensProvider } } - provideCodeLenses(document: TextDocument, token: CancellationToken): Promise { + provideCodeLenses(document: TextDocument, token: CancellationToken): ProviderResult { if (!this.enabled) { - return Promise.resolve([]); + return []; } const filepath = this.client.normalizePath(document.uri); if (!filepath) { - return Promise.resolve([]); + return []; } return this.client.execute('navtree', { file: filepath }, token).then(response => { if (!response) { @@ -61,6 +61,9 @@ export abstract class TypeScriptBaseCodeLensProvider implements CodeLensProvider tree.childItems.forEach(item => this.walkNavTree(document, item, null, referenceableSpans)); } return referenceableSpans.map(span => new ReferencesCodeLens(document.uri, filepath, span)); + }, (err: any) => { + this.client.error(`'navtree' request failed with error.`, err); + return []; }); } diff --git a/extensions/typescript/src/features/implementationsCodeLensProvider.ts b/extensions/typescript/src/features/implementationsCodeLensProvider.ts index ad083c2cbe417..11f9e99da7cec 100644 --- a/extensions/typescript/src/features/implementationsCodeLensProvider.ts +++ b/extensions/typescript/src/features/implementationsCodeLensProvider.ts @@ -5,7 +5,7 @@ 'use strict'; -import { CodeLens, CancellationToken, TextDocument, Range, Location } from 'vscode'; +import { CodeLens, CancellationToken, TextDocument, Range, Location, ProviderResult } from 'vscode'; import * as Proto from '../protocol'; import * as PConst from '../protocol.const'; @@ -22,9 +22,9 @@ export default class TypeScriptImplementationsCodeLensProvider extends TypeScrip super(client, 'implementationsCodeLens.enabled'); } - provideCodeLenses(document: TextDocument, token: CancellationToken): Promise { + provideCodeLenses(document: TextDocument, token: CancellationToken): ProviderResult { if (!this.client.apiVersion.has220Features()) { - return Promise.resolve([]); + return []; } return super.provideCodeLenses(document, token); } diff --git a/extensions/typescript/src/features/referencesCodeLensProvider.ts b/extensions/typescript/src/features/referencesCodeLensProvider.ts index b5d249d6d45ca..ffd29559e1c28 100644 --- a/extensions/typescript/src/features/referencesCodeLensProvider.ts +++ b/extensions/typescript/src/features/referencesCodeLensProvider.ts @@ -5,7 +5,7 @@ 'use strict'; -import { CodeLens, CancellationToken, TextDocument, Range, Location } from 'vscode'; +import { CodeLens, CancellationToken, TextDocument, Range, Location, ProviderResult } from 'vscode'; import * as Proto from '../protocol'; import * as PConst from '../protocol.const'; @@ -22,9 +22,9 @@ export default class TypeScriptReferencesCodeLensProvider extends TypeScriptBase super(client, 'referencesCodeLens.enabled'); } - provideCodeLenses(document: TextDocument, token: CancellationToken): Promise { + provideCodeLenses(document: TextDocument, token: CancellationToken): ProviderResult { if (!this.client.apiVersion.has206Features()) { - return Promise.resolve([]); + return []; } return super.provideCodeLenses(document, token); } diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index f6292a584ca2f..68320e0638433 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -917,7 +917,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient return Uri.file(filepath); } - public execute(command: string, args: any, expectsResultOrToken?: boolean | CancellationToken, token?: CancellationToken): Promise { + public execute(command: string, args: any, expectsResultOrToken?: boolean | CancellationToken): Promise { + let token: CancellationToken | undefined = undefined; let expectsResult = true; if (typeof expectsResultOrToken === 'boolean') { expectsResult = expectsResultOrToken; @@ -925,13 +926,13 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient token = expectsResultOrToken; } - let request: Proto.Request = { + const request: Proto.Request = { seq: this.sequenceNumber++, type: 'request', command: command, arguments: args }; - let requestInfo: RequestItem = { + const requestInfo: RequestItem = { request: request, promise: null, callbacks: null From f70dc43026ac0f3f950f85db286a4260f87c220e Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 10 May 2017 09:38:59 +0200 Subject: [PATCH 0357/2747] single snippet controller to begin with --- .../snippet/browser/snippetController2.ts | 74 ++++++-------- .../test/browser/snippetController2.test.ts | 98 +++++++++---------- 2 files changed, 75 insertions(+), 97 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 84ce4e1e6378a..77c957ec02a49 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -23,7 +23,7 @@ export class SnippetController2 { private readonly _hasNextTabstop: IContextKey; private readonly _hasPrevTabstop: IContextKey; - private _snippetStack: SnippetSession[] = []; + private _snippet: SnippetSession; private _snippetListener: IDisposable[] = []; constructor( @@ -37,7 +37,7 @@ export class SnippetController2 { dispose(): void { this._inSnippet.reset(); - dispose(this._snippetStack); + dispose(this._snippet); } getId(): string { @@ -45,67 +45,51 @@ export class SnippetController2 { } insert(template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): void { - const session = new SnippetSession(this._editor, template, overwriteBefore, overwriteAfter); - const newLen = this._snippetStack.unshift(session); - if (newLen === 1) { - this._inSnippet.set(true); - this._snippetListener = [this._editor.onDidChangeCursorSelection(() => this._updateState())]; + + if (this._snippet) { + this.abort(); } - session.insert(); + + this._snippet = new SnippetSession(this._editor, template, overwriteBefore, overwriteAfter); + this._snippetListener = [this._editor.onDidChangeCursorSelection(() => this._updateState())]; + this._snippet.insert(); } private _updateState(): void { - if (!this._snippetStack[0].validateSelections()) { + if (!this._snippet) { + return; + } + if (this._snippet.isAtFinalPlaceholder || !this._snippet.validateSelections()) { return this.abort(); } - let prev = false; - let next = false; - for (let i = 0; i < this._snippetStack.length && !(prev && next); i++) { - if (!this._snippetStack[i].isAtFirstPlaceholder) { - prev = true; - } - if (!this._snippetStack[i].isAtFinalPlaceholder) { - next = true; - } - } - this._hasNextTabstop.set(next); - this._hasPrevTabstop.set(prev); + this._hasPrevTabstop.set(!this._snippet.isAtFirstPlaceholder); + this._hasNextTabstop.set(!this._snippet.isAtFinalPlaceholder); + this._inSnippet.set(true); } abort(): void { - - // remove current, check for next - const element = this._snippetStack.shift(); - dispose(element); - - // clean up if last snippet is gone - // or validate the new active snippet - if (this._snippetStack.length === 0) { - this._inSnippet.set(false); - this._hasNextTabstop.set(false); - this._hasPrevTabstop.set(false); - this._snippetListener = dispose(this._snippetListener); - - } else { - // - this._updateState(); + if (this._snippet) { + this._hasPrevTabstop.reset(); + this._hasNextTabstop.reset(); + this._inSnippet.reset(); + dispose(this._snippetListener); + dispose(this._snippet); + this._snippet = undefined; } } prev(): void { - for (let i = 0; i < this._snippetStack.length; i++) { - if (this._snippetStack[i].prev()) { - return; - } + if (this._snippet) { + this._snippet.prev(); + this._updateState(); } } next(): void { - for (let i = 0; i < this._snippetStack.length; i++) { - if (this._snippetStack[i].next()) { - return; - } + if (this._snippet) { + this._snippet.next(); + this._updateState(); } } diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts index c43ab3283b386..c26f1be9c32f0 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts @@ -22,6 +22,12 @@ suite('SnippetController2', function () { assert.equal(s.length, 0); } + function assertContextKeys(service: MockContextKeyService, inSnippet: boolean, hasPrev: boolean, hasNext: boolean): void { + assert.equal(SnippetController2.InSnippetMode.getValue(service), inSnippet, `inSnippetMode`); + assert.equal(SnippetController2.HasPrevTabstop.getValue(service), hasPrev, `HasPrevTabstop`); + assert.equal(SnippetController2.HasNextTabstop.getValue(service), hasNext, `HasNextTabstop`); + } + let editor: ICommonCodeEditor; let model: Model; let contextKeys: MockContextKeyService; @@ -40,7 +46,7 @@ suite('SnippetController2', function () { test('creation', function () { const ctrl = new SnippetController2(editor, contextKeys); - assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), false); + assertContextKeys(contextKeys, false, false, false); ctrl.dispose(); }); @@ -48,11 +54,11 @@ suite('SnippetController2', function () { const ctrl = new SnippetController2(editor, contextKeys); ctrl.insert('foo${1:bar}foo$0'); - assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + assertContextKeys(contextKeys, true, false, true); assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); ctrl.abort(); - assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), false); + assertContextKeys(contextKeys, false, false, false); assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); }); @@ -60,89 +66,77 @@ suite('SnippetController2', function () { const ctrl = new SnippetController2(editor, contextKeys); ctrl.insert('${1:one}${2:two}$0'); - assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); - assert.equal(SnippetController2.HasNextTabstop.getValue(contextKeys), true); - assert.equal(SnippetController2.HasPrevTabstop.getValue(contextKeys), false); + assertContextKeys(contextKeys, true, false, true); ctrl.next(); - assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); - assert.equal(SnippetController2.HasNextTabstop.getValue(contextKeys), true); - assert.equal(SnippetController2.HasPrevTabstop.getValue(contextKeys), true); + assertContextKeys(contextKeys, true, true, true); ctrl.next(); - assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); - assert.equal(SnippetController2.HasNextTabstop.getValue(contextKeys), false); - assert.equal(SnippetController2.HasPrevTabstop.getValue(contextKeys), true); + assertContextKeys(contextKeys, false, false, false); - // editor.trigger('test', 'type', { text: '\t' }); - // assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), false); - // assert.equal(SnippetController2.HasNextTabstop.getValue(contextKeys), false); - // assert.equal(SnippetController2.HasPrevTabstop.getValue(contextKeys), false); + editor.trigger('test', 'type', { text: '\t' }); + assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), false); + assert.equal(SnippetController2.HasNextTabstop.getValue(contextKeys), false); + assert.equal(SnippetController2.HasPrevTabstop.getValue(contextKeys), false); }); - test('insert, insert -> cursor moves out', function () { + test('insert, insert -> cursor moves out (left/right)', function () { const ctrl = new SnippetController2(editor, contextKeys); ctrl.insert('foo${1:bar}foo$0'); - assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + assertContextKeys(contextKeys, true, false, true); assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); // bad selection change editor.setSelections([new Selection(1, 12, 1, 12), new Selection(2, 16, 2, 16)]); - assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), false); + assertContextKeys(contextKeys, false, false, false); }); - test('insert, nested -> cursor moves out 1/2', function () { - + test('insert, insert -> cursor moves out (up/down)', function () { const ctrl = new SnippetController2(editor, contextKeys); ctrl.insert('foo${1:bar}foo$0'); - assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + assertContextKeys(contextKeys, true, false, true); assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); - ctrl.insert('ff$1bb$0'); - assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); - assertSelections(editor, new Selection(1, 6, 1, 6), new Selection(2, 10, 2, 10)); - - // bad selection - editor.setSelections([new Selection(3, 1, 3, 1), new Selection(1, 6, 1, 6)]); - assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), false); + // bad selection change + editor.setSelections([new Selection(2, 4, 2, 7), new Selection(3, 8, 3, 11)]); + assertContextKeys(contextKeys, false, false, false); }); - test('insert, nested -> cursor moves out 2/2', function () { - + test('insert, insert -> cursors collapse', function () { const ctrl = new SnippetController2(editor, contextKeys); ctrl.insert('foo${1:bar}foo$0'); assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); - ctrl.insert('ff$1bb$0'); - assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); - assertSelections(editor, new Selection(1, 6, 1, 6), new Selection(2, 10, 2, 10)); - - // select outer snippet - editor.setSelections([new Selection(1, 3, 1, 3), new Selection(2, 6, 2, 6)]); - assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); - - ctrl.next(); - assert.equal(model.getValue(), 'fooffbbfooif\n fooffbbfoo$state\nfi'); - assertSelections(editor, new Selection(1, 11, 1, 11), new Selection(2, 15, 2, 15)); - assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); + // bad selection change + editor.setSelections([new Selection(1, 4, 1, 7)]); + assertContextKeys(contextKeys, false, false, false); }); - test('insert, nested -> tab across all', function () { + test('insert, delete snippet text', function () { const ctrl = new SnippetController2(editor, contextKeys); - ctrl.insert('outer$1outer$0'); - assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); - assert.equal(SnippetController2.HasNextTabstop.getValue(contextKeys), true); - assert.equal(SnippetController2.HasPrevTabstop.getValue(contextKeys), false); + ctrl.insert('${1:foobar}$0'); + assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 1, 1, 7), new Selection(2, 5, 2, 11)); - ctrl.insert('inner$1inner$0'); - assert.equal(SnippetController2.InSnippetMode.getValue(contextKeys), true); - assert.equal(SnippetController2.HasNextTabstop.getValue(contextKeys), true); - // assert.equal(SnippetController2.HasPrevTabstop.getValue(contextKeys), true); + editor.trigger('test', 'deleteLeft', {}); + assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); + + editor.trigger('test', 'type', { text: 'abc' }); + assertContextKeys(contextKeys, true, false, true); + + ctrl.next(); + assertContextKeys(contextKeys, false, false, false); + + editor.trigger('test', 'tab', {}); + assertContextKeys(contextKeys, false, false, false); + // editor.trigger('test', 'type', { text: 'abc' }); + // assertContextKeys(contextKeys, false, false, false); }); }); From 9a0918eb81c63a1c0daf8a0acd5ee570bebde4e5 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 10 May 2017 08:49:58 +0200 Subject: [PATCH 0358/2747] Keep JSON nls free (for Microsoft/node-jsonc-parser#2) --- src/vs/base/common/json.ts | 18 ----------------- src/vs/base/common/jsonErrorMessages.ts | 27 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 18 deletions(-) create mode 100644 src/vs/base/common/jsonErrorMessages.ts diff --git a/src/vs/base/common/json.ts b/src/vs/base/common/json.ts index f6391913084cf..c54e96c9e9dfa 100644 --- a/src/vs/base/common/json.ts +++ b/src/vs/base/common/json.ts @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { localize } from 'vs/nls'; - export enum ScanError { None, UnexpectedEndOfComment, @@ -637,22 +635,6 @@ export enum ParseErrorCode { EndOfFileExpected } -export function getParseErrorMessage(errorCode: ParseErrorCode): string { - switch (errorCode) { - case ParseErrorCode.InvalidSymbol: return localize('error.invalidSymbol', 'Invalid symbol'); - case ParseErrorCode.InvalidNumberFormat: return localize('error.invalidNumberFormat', 'Invalid number format'); - case ParseErrorCode.PropertyNameExpected: return localize('error.propertyNameExpected', 'Property name expected'); - case ParseErrorCode.ValueExpected: return localize('error.valueExpected', 'Value expected'); - case ParseErrorCode.ColonExpected: return localize('error.colonExpected', 'Colon expected'); - case ParseErrorCode.CommaExpected: return localize('error.commaExpected', 'Comma expected'); - case ParseErrorCode.CloseBraceExpected: return localize('error.closeBraceExpected', 'Closing brace expected'); - case ParseErrorCode.CloseBracketExpected: return localize('error.closeBracketExpected', 'Closing bracket expected'); - case ParseErrorCode.EndOfFileExpected: return localize('error.endOfFileExpected', 'End of file expected'); - default: - return ''; - } -} - export type NodeType = 'object' | 'array' | 'property' | 'string' | 'number' | 'boolean' | 'null'; function getLiteralNodeType(value: any): NodeType { diff --git a/src/vs/base/common/jsonErrorMessages.ts b/src/vs/base/common/jsonErrorMessages.ts new file mode 100644 index 0000000000000..96edf8e35a45b --- /dev/null +++ b/src/vs/base/common/jsonErrorMessages.ts @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +/** + * Extracted from json.ts to keep json nls free. + */ +import { localize } from 'vs/nls'; +import { ParseErrorCode } from './json'; + +export function getParseErrorMessage(errorCode: ParseErrorCode): string { + switch (errorCode) { + case ParseErrorCode.InvalidSymbol: return localize('error.invalidSymbol', 'Invalid symbol'); + case ParseErrorCode.InvalidNumberFormat: return localize('error.invalidNumberFormat', 'Invalid number format'); + case ParseErrorCode.PropertyNameExpected: return localize('error.propertyNameExpected', 'Property name expected'); + case ParseErrorCode.ValueExpected: return localize('error.valueExpected', 'Value expected'); + case ParseErrorCode.ColonExpected: return localize('error.colonExpected', 'Colon expected'); + case ParseErrorCode.CommaExpected: return localize('error.commaExpected', 'Comma expected'); + case ParseErrorCode.CloseBraceExpected: return localize('error.closeBraceExpected', 'Closing brace expected'); + case ParseErrorCode.CloseBracketExpected: return localize('error.closeBracketExpected', 'Closing bracket expected'); + case ParseErrorCode.EndOfFileExpected: return localize('error.endOfFileExpected', 'End of file expected'); + default: + return ''; + } +} \ No newline at end of file From 6915d0ffc1193e7d38a59a9d239601a84e8f9031 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 10 May 2017 10:09:54 +0200 Subject: [PATCH 0359/2747] Move getParseErrorMessage --- src/vs/base/test/common/json.test.ts | 4 ++-- src/vs/workbench/node/extensionPoints.ts | 5 +++-- .../themes/electron-browser/workbenchThemeService.ts | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/vs/base/test/common/json.test.ts b/src/vs/base/test/common/json.test.ts index 5ad413c6f36c8..42a0804c113ae 100644 --- a/src/vs/base/test/common/json.test.ts +++ b/src/vs/base/test/common/json.test.ts @@ -6,9 +6,9 @@ import * as assert from 'assert'; import { - SyntaxKind, createScanner, parse, getLocation, Node, ParseError, parseTree, ParseErrorCode, - getParseErrorMessage, ParseOptions, Segment, findNodeAtLocation, getNodeValue, ScanError + SyntaxKind, createScanner, parse, getLocation, Node, ParseError, parseTree, ParseErrorCode, ParseOptions, Segment, findNodeAtLocation, getNodeValue, ScanError } from 'vs/base/common/json'; +import { getParseErrorMessage } from "vs/base/common/jsonErrorMessages"; function assertKinds(text: string, ...kinds: SyntaxKind[]): void { var scanner = createScanner(text); diff --git a/src/vs/workbench/node/extensionPoints.ts b/src/vs/workbench/node/extensionPoints.ts index 1eb54c3f49e6b..0e485dd896974 100644 --- a/src/vs/workbench/node/extensionPoints.ts +++ b/src/vs/workbench/node/extensionPoints.ts @@ -18,6 +18,7 @@ import Types = require('vs/base/common/types'); import { isValidExtensionDescription } from 'vs/platform/extensions/node/extensionValidator'; import * as semver from 'semver'; import { getIdAndVersionFromLocalExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; +import { getParseErrorMessage } from "vs/base/common/jsonErrorMessages"; const MANIFEST_FILE = 'package.json'; @@ -88,7 +89,7 @@ class ExtensionManifestParser extends ExtensionManifestHandler { try { return JSON.parse(manifestContents.toString()); } catch (e) { - this._collector.error(this._absoluteFolderPath, nls.localize('jsonParseFail', "Failed to parse {0}: {1}.", this._absoluteManifestPath, json.getParseErrorMessage(e.message))); + this._collector.error(this._absoluteFolderPath, nls.localize('jsonParseFail', "Failed to parse {0}: {1}.", this._absoluteManifestPath, getParseErrorMessage(e.message))); } return null; }, (err) => { @@ -123,7 +124,7 @@ class ExtensionManifestNLSReplacer extends ExtensionManifestHandler { return ExtensionManifestNLSReplacer.resolveOriginalMessageBundle(messageBundle.original, errors).then(originalMessages => { if (errors.length > 0) { errors.forEach((error) => { - this._collector.error(this._absoluteFolderPath, nls.localize('jsonsParseFail', "Failed to parse {0} or {1}: {2}.", messageBundle.localized, messageBundle.original, json.getParseErrorMessage(error.error))); + this._collector.error(this._absoluteFolderPath, nls.localize('jsonsParseFail', "Failed to parse {0} or {1}: {2}.", messageBundle.localized, messageBundle.original, getParseErrorMessage(error.error))); }); return extensionDescription; } diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index 2b5a118ce740c..a72c48e41d86f 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -39,6 +39,7 @@ import pfs = require('vs/base/node/pfs'); import colorThemeSchema = require('vs/workbench/services/themes/common/colorThemeSchema'); import fileIconThemeSchema = require('vs/workbench/services/themes/common/fileIconThemeSchema'); import { IDisposable } from 'vs/base/common/lifecycle'; +import { getParseErrorMessage } from "vs/base/common/jsonErrorMessages"; // implementation @@ -753,7 +754,7 @@ function _loadIconThemeDocument(fileSetPath: string): TPromise 0) { - return TPromise.wrapError(new Error(nls.localize('error.cannotparseicontheme', "Problems parsing file icons file: {0}", errors.map(e => Json.getParseErrorMessage(e.error)).join(', ')))); + return TPromise.wrapError(new Error(nls.localize('error.cannotparseicontheme', "Problems parsing file icons file: {0}", errors.map(e => getParseErrorMessage(e.error)).join(', ')))); } return TPromise.as(contentValue); }); From 2fa0340e39277c42d8f1c6acaa47db0f8c90c09a Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 10 May 2017 10:17:17 +0200 Subject: [PATCH 0360/2747] Move getParseErrorMessage --- .../services/themes/electron-browser/colorThemeData.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts index b545524e4c193..be88816168181 100644 --- a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts +++ b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts @@ -20,6 +20,7 @@ import { Extensions, IColorRegistry, ColorIdentifier, editorBackground, editorFo import { ThemeType } from 'vs/platform/theme/common/themeService'; import { Registry } from 'vs/platform/platform'; import { WorkbenchThemeService, IColorCustomizations } from "vs/workbench/services/themes/electron-browser/workbenchThemeService"; +import { getParseErrorMessage } from "vs/base/common/jsonErrorMessages"; let colorRegistry = Registry.as(Extensions.ColorContribution); @@ -181,7 +182,7 @@ function _loadColorThemeFromFile(themePath: string, resultRules: ITokenColorizat let errors: Json.ParseError[] = []; let contentValue = Json.parse(content.toString(), errors); if (errors.length > 0) { - return TPromise.wrapError(new Error(nls.localize('error.cannotparsejson', "Problems parsing JSON theme file: {0}", errors.map(e => Json.getParseErrorMessage(e.error)).join(', ')))); + return TPromise.wrapError(new Error(nls.localize('error.cannotparsejson', "Problems parsing JSON theme file: {0}", errors.map(e => getParseErrorMessage(e.error)).join(', ')))); } let includeCompletes = TPromise.as(null); if (contentValue.include) { From 4272facde798539df42cac22798540f176067ae5 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 10 May 2017 10:37:03 +0200 Subject: [PATCH 0361/2747] fix #26368 --- src/vs/editor/contrib/suggest/browser/suggestController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestController.ts b/src/vs/editor/contrib/suggest/browser/suggestController.ts index e19aad6d8ea93..c7577e2fc68a6 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestController.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestController.ts @@ -315,11 +315,11 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({ id: 'acceptSelectedSuggestionOnEnter', - precondition: ContextKeyExpr.and(SuggestContext.Visible, SuggestContext.MakesTextEdit), + precondition: SuggestContext.Visible, handler: x => x.acceptSelectedSuggestion(), kbOpts: { weight: weight, - kbExpr: ContextKeyExpr.and(EditorContextKeys.textFocus, SuggestContext.AcceptSuggestionsOnEnter), + kbExpr: ContextKeyExpr.and(EditorContextKeys.textFocus, SuggestContext.AcceptSuggestionsOnEnter, SuggestContext.MakesTextEdit), primary: KeyCode.Enter } })); From be127659e49981129d0f310a6c2de5392ff3a7a0 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 10 May 2017 10:41:22 +0200 Subject: [PATCH 0362/2747] debug state null guard --- src/vs/workbench/parts/debug/electron-browser/debugService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 19e67a5c86eec..4ea09c9bbe339 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -453,7 +453,7 @@ export class DebugService implements debug.IDebugService { return debug.State.Stopped; } const focusedProcess = this.viewModel.focusedProcess; - if (focusedProcess) { + if (focusedProcess && this.sessionStates.has(focusedProcess.getId())) { return this.sessionStates.get(focusedProcess.getId()); } if (this.sessionStates.size > 0) { From e707642a3cc91b543b9ee5626e8a2282176e26af Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 10 May 2017 10:56:50 +0200 Subject: [PATCH 0363/2747] git: don't use fs.watch fixes #25175 --- extensions/git/src/model.ts | 9 ++------- extensions/git/src/watch.ts | 23 ----------------------- 2 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 extensions/git/src/watch.ts diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index 1d74a87d3a3a0..3e8377e93eb2c 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -7,9 +7,8 @@ import { Uri, Command, EventEmitter, Event, SourceControlResourceState, SourceControlResourceDecorations, Disposable, ProgressLocation, window, workspace } from 'vscode'; import { Git, Repository, Ref, Branch, Remote, PushOptions, Commit, GitErrorCodes } from './git'; -import { anyEvent, eventToPromise, filterEvent, mapEvent, EmptyDisposable, combinedDisposable, dispose } from './util'; +import { anyEvent, eventToPromise, filterEvent, EmptyDisposable, combinedDisposable, dispose } from './util'; import { memoize, throttle, debounce } from './decorators'; -import { watch } from './watch'; import * as path from 'path'; import * as nls from 'vscode-nls'; @@ -582,11 +581,7 @@ export class Model implements Disposable { const repositoryRoot = await this._git.getRepositoryRoot(this.workspaceRoot.fsPath); this.repository = this._git.open(repositoryRoot); - const dotGitPath = path.join(repositoryRoot, '.git'); - const { event: onRawGitChange, disposable: watcher } = watch(dotGitPath); - disposables.push(watcher); - - const onGitChange = mapEvent(onRawGitChange, ({ filename }) => Uri.file(path.join(dotGitPath, filename))); + const onGitChange = filterEvent(this.onWorkspaceChange, uri => /\/\.git\//.test(uri.fsPath)); const onRelevantGitChange = filterEvent(onGitChange, uri => !/\/\.git\/index\.lock$/.test(uri.fsPath)); onRelevantGitChange(this.onFSChange, this, disposables); onRelevantGitChange(this._onDidChangeRepository.fire, this._onDidChangeRepository, disposables); diff --git a/extensions/git/src/watch.ts b/extensions/git/src/watch.ts deleted file mode 100644 index a3a51a8aea7e2..0000000000000 --- a/extensions/git/src/watch.ts +++ /dev/null @@ -1,23 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { EventEmitter, Event, Disposable } from 'vscode'; -import * as fs from 'fs'; - -export interface FSEvent { - eventType: string; - filename: string; -} - -export function watch(path: string): { event: Event; disposable: Disposable; } { - const emitter = new EventEmitter(); - const event = emitter.event; - const watcher = fs.watch(path, (eventType, filename) => emitter.fire({ eventType, filename })); - const disposable = new Disposable(() => watcher.close()); - - return { event, disposable }; -} From 39677057ce2ad6e29c3d1e971dfd44ceeb5fd2e4 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 10 May 2017 11:20:54 +0200 Subject: [PATCH 0364/2747] debug: if no scope is found containg the range try to search across all scopes fixes #24277 --- src/vs/workbench/parts/debug/common/debugModel.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index 2055357d2744e..d84b9287e2955 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -341,8 +341,9 @@ export class StackFrame implements IStackFrame { return scopes; } - return [scopes.filter(scope => scope.range && Range.containsRange(scope.range, range)) - .sort((first, second) => (first.range.endLineNumber - first.range.startLineNumber) - (second.range.endLineNumber - second.range.startLineNumber)).shift()]; + const scopesContainingRange = scopes.filter(scope => scope.range && Range.containsRange(scope.range, range)) + .sort((first, second) => (first.range.endLineNumber - first.range.startLineNumber) - (second.range.endLineNumber - second.range.startLineNumber)); + return scopesContainingRange.length > 0 ? scopesContainingRange.slice(0, 1) : scopes; }); } From 7d1c2cc305e9368e76d53514ea38be17e431687e Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 10 May 2017 11:55:55 +0200 Subject: [PATCH 0365/2747] Viewlet progress bar is broken (fixes #26365) --- src/vs/base/browser/ui/progressbar/progressbar.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/base/browser/ui/progressbar/progressbar.ts b/src/vs/base/browser/ui/progressbar/progressbar.ts index cbd7de00da0d7..1287112824b2e 100644 --- a/src/vs/base/browser/ui/progressbar/progressbar.ts +++ b/src/vs/base/browser/ui/progressbar/progressbar.ts @@ -217,10 +217,10 @@ export class ProgressBar { } protected applyStyles(): void { - if (this.element) { + if (this.bit) { const background = this.progressBarBackground ? this.progressBarBackground.toString() : null; - this.element.style('background-color', background); + this.bit.style.backgroundColor = background; } } From 8e9ddf611264ab1f8dc6a293904ccc0ad8e471e1 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 10 May 2017 12:05:02 +0200 Subject: [PATCH 0366/2747] debug: when there are duplicate configurations with the same name always take first to align with native select box behavior fixes #20927 --- .../parts/debug/electron-browser/debugConfigurationManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts index 16926ebfc58d0..0d259effe700d 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts @@ -311,7 +311,7 @@ export class ConfigurationManager implements debug.IConfigurationManager { return null; } - return config.configurations.filter(config => config && config.name === name).pop(); + return config.configurations.filter(config => config && config.name === name).shift(); } public resloveConfiguration(config: debug.IConfig): TPromise { From 063396d1cc677f4b3e593637788521b44791d038 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 10 May 2017 11:11:21 +0200 Subject: [PATCH 0367/2747] improve win32 tfs scripts --- build/tfs/win32/{compile.ps1 => build.ps1} | 13 +++++++------ build/tfs/win32/lib.ps1 | 5 +++++ build/tfs/win32/test.ps1 | 5 ----- scripts/test.bat | 12 +++++++++++- 4 files changed, 23 insertions(+), 12 deletions(-) rename build/tfs/win32/{compile.ps1 => build.ps1} (58%) delete mode 100644 build/tfs/win32/test.ps1 diff --git a/build/tfs/win32/compile.ps1 b/build/tfs/win32/build.ps1 similarity index 58% rename from build/tfs/win32/compile.ps1 rename to build/tfs/win32/build.ps1 index 7a962435818b6..c11b72ae864c8 100644 --- a/build/tfs/win32/compile.ps1 +++ b/build/tfs/win32/build.ps1 @@ -1,10 +1,5 @@ . .\build\tfs\win32\lib.ps1 -# set agent specific npm cache -if (Test-Path env:AGENT_WORKFOLDER) { - $env:npm_config_cache = "${env:AGENT_WORKFOLDER}\npm-cache" -} - # npm install exec { & .\scripts\npm.bat install } @@ -12,4 +7,10 @@ exec { & .\scripts\npm.bat install } exec { & npm run gulp -- mixin } # compile -exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-min } \ No newline at end of file +exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-min } + +# run tests +exec { & .\scripts\test.bat --build --reporter dot } + +# run integration tests +# exec { & .\scripts\test-integration.bat } \ No newline at end of file diff --git a/build/tfs/win32/lib.ps1 b/build/tfs/win32/lib.ps1 index 4ecb58e62a33a..9df1a69157b3f 100644 --- a/build/tfs/win32/lib.ps1 +++ b/build/tfs/win32/lib.ps1 @@ -1,6 +1,11 @@ # stop when there's an error $ErrorActionPreference = 'Stop' +# set agent specific npm cache +if (Test-Path env:AGENT_WORKFOLDER) { + $env:npm_config_cache = "${env:AGENT_WORKFOLDER}\npm-cache" +} + # throw when a process exits with something other than 0 function exec([scriptblock]$cmd, [string]$errorMessage = "Error executing command: " + $cmd) { & $cmd diff --git a/build/tfs/win32/test.ps1 b/build/tfs/win32/test.ps1 deleted file mode 100644 index c9589b5d52d49..0000000000000 --- a/build/tfs/win32/test.ps1 +++ /dev/null @@ -1,5 +0,0 @@ -. .\build\tfs\win32\lib.ps1 - -exec { & npm run gulp -- electron } -exec { & .\scripts\test.bat --build --reporter dot } -# exec { & .\scripts\test-integration.bat } \ No newline at end of file diff --git a/scripts/test.bat b/scripts/test.bat index 0f7ce8e9a853e..6ac41fcc36e6a 100644 --- a/scripts/test.bat +++ b/scripts/test.bat @@ -5,12 +5,22 @@ set ELECTRON_RUN_AS_NODE= pushd %~dp0\.. +:: Get Code.exe location for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"nameShort\":.*" product.json') do set NAMESHORT=%%~a set NAMESHORT=%NAMESHORT: "=% set NAMESHORT=%NAMESHORT:"=%.exe set CODE=".build\electron\%NAMESHORT%" -rem Run tests in electron +:: Download Electron if needed +for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"electronVersion\":.*" package.json') do set DESIREDVERSION=%%~a +set DESIREDVERSION=%DESIREDVERSION: "=% +set DESIREDVERSION=v%DESIREDVERSION:"=% +if exist .\.build\electron\version (set /p INSTALLEDVERSION=<.\.build\electron\version) else (set INSTALLEDVERSION="") + +if not exist %CODE% node .\node_modules\gulp\bin\gulp.js electron +if not "%INSTALLEDVERSION%" == "%DESIREDVERSION%" node .\node_modules\gulp\bin\gulp.js electron + +:: Run tests %CODE% .\test\electron\index.js %* popd From 21d210da229c906be495787d32a5849d81b6e380 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 10 May 2017 12:42:01 +0200 Subject: [PATCH 0368/2747] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3d3707bc48ef3..eeb69e17492fa 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev", "version": "1.13.0", "electronVersion": "1.6.6", - "distro": "1337efdc669776e277c7e556d33b1dd7915fcefa", + "distro": "866fd532378acbb246f02ed97397e3f0f4dbc345", "author": { "name": "Microsoft Corporation" }, From 2cf65481652a844b9f55e66d8c8e196ca170a07f Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 10 May 2017 12:56:18 +0200 Subject: [PATCH 0369/2747] streamline windows build --- build/gulpfile.vscode.win32.js | 17 +++++++++++++++-- build/package.json | 4 ++-- build/tfs/win32/{build.ps1 => 1_build.ps1} | 0 build/tfs/win32/2_package.ps1 | 4 ++++ build/tfs/win32/3_upload.ps1 | 20 ++++++++++++++++++++ package.json | 4 +++- 6 files changed, 44 insertions(+), 5 deletions(-) rename build/tfs/win32/{build.ps1 => 1_build.ps1} (100%) create mode 100644 build/tfs/win32/2_package.ps1 create mode 100644 build/tfs/win32/3_upload.ps1 diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js index 427e4e525384e..a398076db3d5f 100644 --- a/build/gulpfile.vscode.win32.js +++ b/build/gulpfile.vscode.win32.js @@ -9,12 +9,14 @@ const gulp = require('gulp'); const path = require('path'); const assert = require('assert'); const cp = require('child_process'); +const _7z = require('7zip')['7z']; const util = require('./lib/util'); const pkg = require('../package.json'); const product = require('../product.json'); const repoPath = path.dirname(__dirname); const buildPath = path.join(path.dirname(repoPath), 'VSCode-win32'); +const zipPath = path.join(repoPath, '.build', 'win32', 'archive', 'VSCode-win32.zip'); const issPath = path.join(__dirname, 'win32', 'code.iss'); const innoSetupPath = path.join(path.dirname(path.dirname(require.resolve('innosetup-compiler'))), 'bin', 'ISCC.exe'); @@ -24,9 +26,9 @@ function packageInnoSetup(iss, options, cb) { const definitions = options.definitions || {}; const keys = Object.keys(definitions); - keys.forEach(key => assert(typeof definitions[key] === 'string', `Missing value for '${ key }' in Inno Setup package step`)); + keys.forEach(key => assert(typeof definitions[key] === 'string', `Missing value for '${key}' in Inno Setup package step`)); - const defs = keys.map(key => `/d${ key }=${ definitions[key] }`); + const defs = keys.map(key => `/d${key}=${definitions[key]}`); const args = [iss].concat(defs); cp.spawn(innoSetupPath, args, { stdio: 'inherit' }) @@ -57,3 +59,14 @@ function buildWin32Setup(cb) { gulp.task('clean-vscode-win32-setup', util.rimraf('.build/win32/setup')); gulp.task('vscode-win32-setup', ['clean-vscode-win32-setup'], buildWin32Setup); + +function archiveWin32Setup(cb) { + const args = ['a', '-tzip', zipPath, buildPath, '-r']; + + cp.spawn(_7z, args, { stdio: 'inherit' }) + .on('error', cb) + .on('exit', () => cb(null)); +} + +gulp.task('clean-vscode-win32-archive', util.rimraf('.build/win32/archive')); +gulp.task('vscode-win32-archive', ['clean-vscode-win32-archive'], archiveWin32Setup); diff --git a/build/package.json b/build/package.json index 2be49f6f8cde7..99f1261431bb4 100644 --- a/build/package.json +++ b/build/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev-build", "version": "1.0.0", "devDependencies": { - "@types/xml2js": "^0.0.33", - "xml2js": "^0.4.17" + "@types/xml2js": "^0.0.33", + "xml2js": "^0.4.17" } } \ No newline at end of file diff --git a/build/tfs/win32/build.ps1 b/build/tfs/win32/1_build.ps1 similarity index 100% rename from build/tfs/win32/build.ps1 rename to build/tfs/win32/1_build.ps1 diff --git a/build/tfs/win32/2_package.ps1 b/build/tfs/win32/2_package.ps1 new file mode 100644 index 0000000000000..5be478fb5a11e --- /dev/null +++ b/build/tfs/win32/2_package.ps1 @@ -0,0 +1,4 @@ +. .\build\tfs\win32\lib.ps1 + +# archive +exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-archive vscode-win32-setup } \ No newline at end of file diff --git a/build/tfs/win32/3_upload.ps1 b/build/tfs/win32/3_upload.ps1 new file mode 100644 index 0000000000000..5e17893e6eb2e --- /dev/null +++ b/build/tfs/win32/3_upload.ps1 @@ -0,0 +1,20 @@ +. .\build\tfs\win32\lib.ps1 + +$Repo = "$(pwd)" +$Root = "$Repo\.." +$Exe = "$Repo\.build\win32\setup\VSCodeSetup.exe" +$Zip = "$Repo\.build\win32\archive\VSCode-win32.zip" +$Build = "$Root\VSCode-win32" + +# get version +$PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json +$Version = $PackageJson.version +$Quality = "$env:VSCODE_QUALITY" + +# npm install publish tools +pushd "$Repo\build\tfs" +exec { & npm i } +popd + +exec { & node build/tfs/out/publish.js $Quality win32 setup "VSCodeSetup-$Version.exe" $Version true $Exe } +exec { & node build/tfs/out/publish.js $Quality win32-archive archive "VSCode-win32-$Version.zip" $Version true $Zip } diff --git a/package.json b/package.json index eeb69e17492fa..88ff5afaed343 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "monaco-editor-setup": "node scripts/monaco-editor-setup.js", "monaco-editor-test": "mocha --only-monaco-editor", "precommit": "node build/gulpfile.hygiene.js", - "gulp": "gulp" + "gulp": "gulp", + "7z": "7z" }, "dependencies": { "applicationinsights": "0.17.1", @@ -44,6 +45,7 @@ "yauzl": "2.3.1" }, "devDependencies": { + "7zip": "0.0.6", "@types/minimist": "^1.2.0", "@types/mocha": "^2.2.39", "@types/semver": "^5.3.30", From 45d93e93255f9cdaa37955fdb79b4e460252b45b Mon Sep 17 00:00:00 2001 From: Jan Niklas Hasse Date: Tue, 2 May 2017 14:16:15 +0200 Subject: [PATCH 0370/2747] Use Chromium's new system-ui font alias https://bugs.chromium.org/p/chromium/issues/detail?id=654679 Fixes #10144. --- extensions/markdown/package.json | 2 +- src/vs/editor/browser/standalone/media/standalone-tokens.css | 2 +- src/vs/workbench/electron-browser/media/shell.css | 2 +- .../parts/terminal/electron-browser/media/widgets.css | 3 +-- .../parts/welcome/page/electron-browser/welcomePage.css | 1 - 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/extensions/markdown/package.json b/extensions/markdown/package.json index c0917c8bcba54..eeda39bae67bc 100644 --- a/extensions/markdown/package.json +++ b/extensions/markdown/package.json @@ -143,7 +143,7 @@ }, "markdown.preview.fontFamily": { "type": "string", - "default": "-apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', 'HelveticaNeue-Light', 'Ubuntu', 'Droid Sans', sans-serif", + "default": "system-ui", "description": "%markdown.preview.fontFamily.desc%" }, "markdown.preview.fontSize": { diff --git a/src/vs/editor/browser/standalone/media/standalone-tokens.css b/src/vs/editor/browser/standalone/media/standalone-tokens.css index 89184ea1f6670..8c3ae996849a3 100644 --- a/src/vs/editor/browser/standalone/media/standalone-tokens.css +++ b/src/vs/editor/browser/standalone/media/standalone-tokens.css @@ -6,7 +6,7 @@ /* Default standalone editor font */ .monaco-editor { - font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; + font-family: system-ui, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; } .monaco-menu .monaco-action-bar.vertical .action-item [tabindex="0"]:focus { diff --git a/src/vs/workbench/electron-browser/media/shell.css b/src/vs/workbench/electron-browser/media/shell.css index 2b5ece9a68db5..a5e6c0481ee06 100644 --- a/src/vs/workbench/electron-browser/media/shell.css +++ b/src/vs/workbench/electron-browser/media/shell.css @@ -15,7 +15,7 @@ /* Font Families (with CJK support) */ -.monaco-shell { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; } +.monaco-shell { font-family: system-ui; } .monaco-shell:lang(zh-Hans) { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Noto Sans", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; } .monaco-shell:lang(zh-Hant) { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Noto Sans", "Microsoft Jhenghei", "PingFang TC", "Source Han Sans TC", "Source Han Sans", "Source Han Sans TW", sans-serif; } .monaco-shell:lang(ja) { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Noto Sans", "Meiryo", "Hiragino Kaku Gothic Pro", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", "Sazanami Gothic", "IPA Gothic", sans-serif; } diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/widgets.css b/src/vs/workbench/parts/terminal/electron-browser/media/widgets.css index 1db9e3f40abd6..49b5376ff570e 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/widgets.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/widgets.css @@ -12,8 +12,7 @@ } .monaco-workbench .terminal-message-widget { - /* This font list is sourced from a .monaco-shell style */ - font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; + font-family: system-ui; font-size: 14px; line-height: 19px; padding: 4px 5px; diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css index 58d11029b89c4..578ee17ab9216 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css @@ -70,7 +70,6 @@ padding: 0; margin: 0; border: none; - /*font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI Light", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif;*/ font-weight: normal; color: rgba(0,0,0,.8); font-size: 3.6em; From cf9a174b20be47d44c6da40130e209e2f1fe1e4e Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 10 May 2017 14:15:53 +0200 Subject: [PATCH 0371/2747] start adding command and wireup with insert snippet --- .../contrib/snippet/browser/editorSnippets.ts | 10 ++-- .../snippet/browser/snippetController2.ts | 59 +++++++++++++++---- .../test/browser/snippetController2.test.ts | 2 +- .../electron-browser/insertSnippet.ts | 4 +- 4 files changed, 58 insertions(+), 17 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index efaba9a24c525..41409340b0478 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -26,9 +26,10 @@ class OneSnippet { private _placeholderGroupsIdx: number; private static readonly _decor = { - active: { stickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges }, - activeFinal: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges }, - inactive: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges }, + active: { stickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges, className: 'snippet-placeholder' }, + inactive: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'snippet-placeholder' }, + activeFinal: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'finish-snippet-placeholder' }, + inactiveFinal: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'finish-snippet-placeholder' }, snippet: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges }, }; @@ -73,7 +74,8 @@ class OneSnippet { model.getPositionAt(this._offset + placeholderOffset), model.getPositionAt(this._offset + placeholderOffset + placeholderLen) ); - const handle = accessor.addDecoration(range, OneSnippet._decor.inactive); + const options = placeholder.isFinalTabstop ? OneSnippet._decor.inactiveFinal : OneSnippet._decor.inactive; + const handle = accessor.addDecoration(range, options); this._placeholderDecorations.set(placeholder, handle); } }); diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 77c957ec02a49..1c3666dc093b1 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -5,17 +5,23 @@ 'use strict'; -import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { RawContextKey, IContextKey, IContextKeyService, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; -import { commonEditorContribution } from 'vs/editor/common/editorCommonExtensions'; +import { commonEditorContribution, CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { SnippetSession } from './editorSnippets'; - +import { EditorCommand } from "vs/editor/common/config/config"; +import { EditorContextKeys } from "vs/editor/common/editorContextKeys"; +import { KeyCode, KeyMod } from "vs/base/common/keyCodes"; @commonEditorContribution export class SnippetController2 { - static InSnippetMode = new RawContextKey('inSnippet', false); + static get(editor: ICommonCodeEditor): SnippetController2 { + return editor.getContribution('snippetController2'); + } + + static InSnippetMode = new RawContextKey('isInSnippet', false); static HasNextTabstop = new RawContextKey('hasNextTabstop', false); static HasPrevTabstop = new RawContextKey('hasPrevTabstop', false); @@ -45,11 +51,9 @@ export class SnippetController2 { } insert(template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): void { - if (this._snippet) { - this.abort(); + this.cancel(); } - this._snippet = new SnippetSession(this._editor, template, overwriteBefore, overwriteAfter); this._snippetListener = [this._editor.onDidChangeCursorSelection(() => this._updateState())]; this._snippet.insert(); @@ -60,15 +64,15 @@ export class SnippetController2 { return; } if (this._snippet.isAtFinalPlaceholder || !this._snippet.validateSelections()) { - return this.abort(); + return this.cancel(); } + this._inSnippet.set(true); this._hasPrevTabstop.set(!this._snippet.isAtFirstPlaceholder); this._hasNextTabstop.set(!this._snippet.isAtFinalPlaceholder); - this._inSnippet.set(true); } - abort(): void { + cancel(): void { if (this._snippet) { this._hasPrevTabstop.reset(); this._hasNextTabstop.reset(); @@ -94,3 +98,38 @@ export class SnippetController2 { } } + + +const CommandCtor = EditorCommand.bindToContribution(SnippetController2.get); + +CommonEditorRegistry.registerEditorCommand(new CommandCtor({ + id: 'snippet.next', + precondition: ContextKeyExpr.and(SnippetController2.InSnippetMode, SnippetController2.HasNextTabstop), + handler: ctrl => ctrl.next(), + kbOpts: { + weight: CommonEditorRegistry.commandWeight(30), + kbExpr: EditorContextKeys.textFocus, + primary: KeyCode.Tab + } +})); +CommonEditorRegistry.registerEditorCommand(new CommandCtor({ + id: 'snippet.prev', + precondition: ContextKeyExpr.and(SnippetController2.InSnippetMode, SnippetController2.HasPrevTabstop), + handler: ctrl => ctrl.prev(), + kbOpts: { + weight: CommonEditorRegistry.commandWeight(30), + kbExpr: EditorContextKeys.textFocus, + primary: KeyMod.Shift | KeyCode.Tab + } +})); +CommonEditorRegistry.registerEditorCommand(new CommandCtor({ + id: 'snippet.cancel', + precondition: SnippetController2.InSnippetMode, + handler: ctrl => ctrl.cancel(), + kbOpts: { + weight: CommonEditorRegistry.commandWeight(30), + kbExpr: EditorContextKeys.textFocus, + primary: KeyCode.Escape, + secondary: [KeyMod.Shift | KeyCode.Escape] + } +})); diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts index c26f1be9c32f0..2b1b271662f94 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts @@ -57,7 +57,7 @@ suite('SnippetController2', function () { assertContextKeys(contextKeys, true, false, true); assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); - ctrl.abort(); + ctrl.cancel(); assertContextKeys(contextKeys, false, false, false); assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); }); diff --git a/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.ts b/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.ts index 1a20a85cf5e28..3490f5c276620 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.ts @@ -8,12 +8,12 @@ import * as nls from 'vs/nls'; import { TPromise } from 'vs/base/common/winjs.base'; import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { editorAction, ServicesAccessor, EditorAction } from 'vs/editor/common/editorCommonExtensions'; -import { SnippetController } from 'vs/editor/contrib/snippet/common/snippetController'; import { IQuickOpenService, IPickOpenEntry } from 'vs/platform/quickOpen/common/quickOpen'; import { IModeService } from 'vs/editor/common/services/modeService'; import { LanguageId } from 'vs/editor/common/modes'; import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands'; import { ISnippetsService, ISnippet } from 'vs/workbench/parts/snippets/electron-browser/snippetsService'; +import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; interface ISnippetPick extends IPickOpenEntry { @@ -128,7 +128,7 @@ class InsertSnippetAction extends EditorAction { } }).then(snippet => { if (snippet) { - SnippetController.get(editor).insertSnippet(snippet.codeSnippet, 0, 0); + SnippetController2.get(editor).insert(snippet.codeSnippet, 0, 0); } }); } From 51f49f121fedc206d06228f4f79b666c4bf4be60 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 10 May 2017 14:35:11 +0200 Subject: [PATCH 0372/2747] properly handle reversed selections --- .../contrib/snippet/browser/editorSnippets.ts | 14 +++++++++++--- .../snippet/test/browser/editorSnippets.test.ts | 10 ++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index 41409340b0478..998daf72e850e 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -208,7 +208,15 @@ export class SnippetSession { let edits: IIdentifiedSingleEditOperation[] = []; let model = this._editor.getModel(); - for (const selection of this._editor.getSelections()) { + // sort selections by their start position but remeber + // the original index. that allows you to create correct + // offset-based selection logic without changing the + // primary selection + const indexedSelection = this._editor.getSelections() + .map((selection, idx) => ({ selection, idx })) + .sort((a, b) => Range.compareRangesUsingStarts(a.selection, b.selection)); + + for (const { selection, idx } of indexedSelection) { const range = SnippetSession.adjustRange(model, selection, this._overwriteBefore, this._overwriteAfter); const start = range.getStartPosition(); const adjustedTemplate = SnippetSession.normalizeWhitespace(model, start, this._template); @@ -216,8 +224,8 @@ export class SnippetSession { const snippet = SnippetParser.parse(adjustedTemplate); const offset = model.getOffsetAt(start) + delta; - edits.push(EditOperation.replaceMove(range, snippet.text)); - this._snippets.push(new OneSnippet(this._editor, snippet, offset)); + edits[idx] = EditOperation.replaceMove(range, snippet.text); + this._snippets[idx] = new OneSnippet(this._editor, snippet, offset); delta += snippet.text.length - model.getValueLengthInRange(range); } diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts index 0da0cbbf46749..989b113ea2277 100644 --- a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts @@ -75,6 +75,16 @@ suite('SnippetSession', function () { assertSelections(editor, new Selection(1, 10, 1, 10), new Selection(2, 14, 2, 14)); }); + test('text edit with reversed selection', function () { + + const session = new SnippetSession(editor, '${1:bar}$0'); + editor.setSelections([new Selection(2, 5, 2, 5), new Selection(1, 1, 1, 1)]); + + session.insert(); + assert.equal(model.getValue(), 'barfunction foo() {\n barconsole.log(a);\n}'); + assertSelections(editor, new Selection(2, 5, 2, 8), new Selection(1, 1, 1, 4)); + }); + test('snippets, repeated tabstops', function () { const session = new SnippetSession(editor, '${1:abc}foo${1:abc}$0'); session.insert(); From 751b61ee127d8ae82c998b6cb088ca17a22ad09e Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 10 May 2017 14:47:11 +0200 Subject: [PATCH 0373/2747] add SnippetParser#escape for those that don't want snippet magic --- .../contrib/snippet/common/snippetParser.ts | 6 +- .../snippet/test/common/snippetParser.test.ts | 127 ++++++++++-------- 2 files changed, 74 insertions(+), 59 deletions(-) diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index a69ca03386e43..5eb0978e8ce71 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -272,6 +272,10 @@ export class TextmateSnippet { export class SnippetParser { + static escape(value: string): string { + return value.replace(/\$|}|\\/g, '\\$&'); + } + static parse(template: string): TextmateSnippet { const marker = new SnippetParser(true, false).parse(template); return new TextmateSnippet(marker); @@ -288,7 +292,7 @@ export class SnippetParser { this._enableInternal = enableInternal; } - escape(value: string): string { + text(value: string): string { return Marker.toString(this.parse(value)); } diff --git a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts index 1b02a3676c336..3ff63929bce06 100644 --- a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts +++ b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts @@ -78,14 +78,12 @@ suite('SnippetParser', () => { assert.equal(scanner.next().type, TokenType.CurlyClose); }); - function assertEscape(value: string, expected: string) { + function assertText(value: string, expected: string) { const p = new SnippetParser(); - const actual = p.escape(value); + const actual = p.text(value); assert.equal(actual, expected); } - function assertMarker(marker: Marker[], ...ctors: Function[]); - function assertMarker(value: string, ...ctors: Function[]); function assertMarker(valueOrMarker: Marker[] | string, ...ctors: Function[]) { let marker: Marker[]; if (typeof valueOrMarker === 'string') { @@ -103,43 +101,56 @@ suite('SnippetParser', () => { assert.equal(marker.length, 0); } - function assertEscapeAndMarker(value: string, escaped: string, ...ctors: Function[]) { - assertEscape(value, escaped); + function assertTextAndMarker(value: string, escaped: string, ...ctors: Function[]) { + assertText(value, escaped); assertMarker(value, ...ctors); } - test('Parser, escaping', () => { - assertEscape('$', '$'); - assertEscape('\\\\$', '\\$'); - assertEscape('{', '{'); - assertEscape('\\}', '}'); - assertEscape('\\abc', '\\abc'); - assertEscape('foo${f:\\}}bar', 'foo}bar'); - assertEscape('\\{', '{'); - assertEscape('I need \\\\\\$', 'I need \\$'); - assertEscape('\\', '\\'); - assertEscape('\\{{', '{{'); - assertEscape('{{', '{{'); - assertEscape('{{dd', '{{dd'); - assertEscape('}}', '}}'); - assertEscape('ff}}', 'ff}}'); - - assertEscape('farboo', 'farboo'); - assertEscape('far{{}}boo', 'farboo'); - assertEscape('far{{123}}boo', 'far123boo'); - assertEscape('far\\{{123}}boo', 'far{{123}}boo'); - assertEscape('far{{id:bern}}boo', 'farbernboo'); - assertEscape('far{{id:bern {{basel}}}}boo', 'farbern baselboo'); - assertEscape('far{{id:bern {{id:basel}}}}boo', 'farbern baselboo'); - assertEscape('far{{id:bern {{id2:basel}}}}boo', 'farbern baselboo'); + function assertEscaped(value: string, expected: string) { + const actual = SnippetParser.escape(value); + assert.equal(actual, expected); + } + test('Parser, escaped', function () { + assertEscaped('foo$0', 'foo\\$0'); + assertEscaped('foo\\$0', 'foo\\\\\\$0'); + assertEscaped('f$1oo$0', 'f\\$1oo\\$0'); + assertEscaped('${1:foo}$0', '\\${1:foo\\}\\$0'); + assertEscaped('$', '\\$'); }); - test('Parser, TM escaping', () => { - assertEscapeAndMarker('foo${1:bar}}', 'foobar}', Text, Placeholder, Text); - assertEscapeAndMarker('foo${1:bar}${2:foo}}', 'foobarfoo}', Text, Placeholder, Placeholder, Text); + test('Parser, text', () => { + assertText('$', '$'); + assertText('\\\\$', '\\$'); + assertText('{', '{'); + assertText('\\}', '}'); + assertText('\\abc', '\\abc'); + assertText('foo${f:\\}}bar', 'foo}bar'); + assertText('\\{', '{'); + assertText('I need \\\\\\$', 'I need \\$'); + assertText('\\', '\\'); + assertText('\\{{', '{{'); + assertText('{{', '{{'); + assertText('{{dd', '{{dd'); + assertText('}}', '}}'); + assertText('ff}}', 'ff}}'); + + assertText('farboo', 'farboo'); + assertText('far{{}}boo', 'farboo'); + assertText('far{{123}}boo', 'far123boo'); + assertText('far\\{{123}}boo', 'far{{123}}boo'); + assertText('far{{id:bern}}boo', 'farbernboo'); + assertText('far{{id:bern {{basel}}}}boo', 'farbern baselboo'); + assertText('far{{id:bern {{id:basel}}}}boo', 'farbern baselboo'); + assertText('far{{id:bern {{id2:basel}}}}boo', 'farbern baselboo'); + }); + + + test('Parser, TM text', () => { + assertTextAndMarker('foo${1:bar}}', 'foobar}', Text, Placeholder, Text); + assertTextAndMarker('foo${1:bar}${2:foo}}', 'foobarfoo}', Text, Placeholder, Placeholder, Text); - assertEscapeAndMarker('foo${1:bar\\}${2:foo}}', 'foobar}foo', Text, Placeholder); + assertTextAndMarker('foo${1:bar\\}${2:foo}}', 'foobar}foo', Text, Placeholder); let [, placeholder] = new SnippetParser(true, false).parse('foo${1:bar\\}${2:foo}}'); let { defaultValue } = (placeholder); @@ -152,34 +163,34 @@ suite('SnippetParser', () => { }); test('Parser, placeholder', () => { - assertEscapeAndMarker('farboo', 'farboo', Text); - assertEscapeAndMarker('far{{}}boo', 'farboo', Text, Placeholder, Text); - assertEscapeAndMarker('far{{123}}boo', 'far123boo', Text, Placeholder, Text); - assertEscapeAndMarker('far\\{{123}}boo', 'far{{123}}boo', Text); + assertTextAndMarker('farboo', 'farboo', Text); + assertTextAndMarker('far{{}}boo', 'farboo', Text, Placeholder, Text); + assertTextAndMarker('far{{123}}boo', 'far123boo', Text, Placeholder, Text); + assertTextAndMarker('far\\{{123}}boo', 'far{{123}}boo', Text); }); test('Parser, literal code', () => { - assertEscapeAndMarker('far`123`boo', 'far`123`boo', Text); - assertEscapeAndMarker('far\\`123\\`boo', 'far\\`123\\`boo', Text); + assertTextAndMarker('far`123`boo', 'far`123`boo', Text); + assertTextAndMarker('far\\`123\\`boo', 'far\\`123\\`boo', Text); }); test('Parser, variables/tabstop', () => { - assertEscapeAndMarker('$far-boo', '-boo', Variable, Text); - assertEscapeAndMarker('\\$far-boo', '$far-boo', Text); - assertEscapeAndMarker('far$farboo', 'far', Text, Variable); - assertEscapeAndMarker('far${farboo}', 'far', Text, Variable); - assertEscapeAndMarker('$123', '', Placeholder); - assertEscapeAndMarker('$farboo', '', Variable); - assertEscapeAndMarker('$far12boo', '', Variable); + assertTextAndMarker('$far-boo', '-boo', Variable, Text); + assertTextAndMarker('\\$far-boo', '$far-boo', Text); + assertTextAndMarker('far$farboo', 'far', Text, Variable); + assertTextAndMarker('far${farboo}', 'far', Text, Variable); + assertTextAndMarker('$123', '', Placeholder); + assertTextAndMarker('$farboo', '', Variable); + assertTextAndMarker('$far12boo', '', Variable); }); test('Parser, variables/placeholder with defaults', () => { - assertEscapeAndMarker('${name:value}', 'value', Variable); - assertEscapeAndMarker('${1:value}', 'value', Placeholder); - assertEscapeAndMarker('${1:bar${2:foo}bar}', 'barfoobar', Placeholder); + assertTextAndMarker('${name:value}', 'value', Variable); + assertTextAndMarker('${1:value}', 'value', Placeholder); + assertTextAndMarker('${1:bar${2:foo}bar}', 'barfoobar', Placeholder); - assertEscapeAndMarker('${name:value', '${name:value', Text); - assertEscapeAndMarker('${1:bar${2:foobar}', '${1:barfoobar', Text, Placeholder); + assertTextAndMarker('${name:value', '${name:value', Text); + assertTextAndMarker('${1:bar${2:foobar}', '${1:barfoobar', Text, Placeholder); }); test('Parser, only textmate', () => { @@ -233,14 +244,14 @@ suite('SnippetParser', () => { test('Parser, real world, mixed', () => { - assertEscapeAndMarker( + assertTextAndMarker( 'finished:{{}}, second:{{2:name}}, first:{{1:}}, third:{{3:}}', 'finished:, second:name, first:, third:', Text, Placeholder, Text, Placeholder, Text, Placeholder, Text, Placeholder ); - assertEscapeAndMarker( + assertTextAndMarker( 'begin\\{{{1:enumerate}}\\}\n\t{{}}\nend\\{{{1:}}\\}', 'begin{enumerate}\n\t\nend{enumerate}', Text, Placeholder, Text, Placeholder, Text, Placeholder, Text @@ -249,7 +260,7 @@ suite('SnippetParser', () => { }); test('Parser, default name/value', () => { - assertEscapeAndMarker( + assertTextAndMarker( '{{first}}-{{2:}}-{{second}}-{{1:}}', 'first--second-', Placeholder, Text, Placeholder, Text, Placeholder, Text, Placeholder @@ -283,15 +294,15 @@ suite('SnippetParser', () => { }); test('backspace esapce in TM only, #16212', () => { - const actual = new SnippetParser(true, false).escape('Foo \\\\${abc}bar'); + const actual = new SnippetParser(true, false).text('Foo \\\\${abc}bar'); assert.equal(actual, 'Foo \\bar'); }); test('colon as variable/placeholder value, #16717', () => { - let actual = new SnippetParser(true, false).escape('${TM_SELECTED_TEXT:foo:bar}'); + let actual = new SnippetParser(true, false).text('${TM_SELECTED_TEXT:foo:bar}'); assert.equal(actual, 'foo:bar'); - actual = new SnippetParser(true, false).escape('${1:foo:bar}'); + actual = new SnippetParser(true, false).text('${1:foo:bar}'); assert.equal(actual, 'foo:bar'); }); From 6c2f83dfcdfc82e99fa9fee2abc595c896c227e6 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 10 May 2017 13:01:05 +0200 Subject: [PATCH 0374/2747] [theme] add theme to the view context --- src/vs/editor/browser/codeEditor.ts | 6 ++++-- .../editor/browser/standalone/standaloneCodeEditor.ts | 7 ++++--- src/vs/editor/browser/view/viewImpl.ts | 8 +++++++- src/vs/editor/browser/widget/codeEditorWidget.ts | 7 ++++++- .../editor/browser/widget/embeddedCodeEditorWidget.ts | 6 ++++-- src/vs/editor/common/view/viewContext.ts | 4 ++++ src/vs/editor/common/view/viewEvents.ts | 10 ++++++++++ src/vs/editor/common/viewModel/viewEventHandler.ts | 10 ++++++++++ .../parts/debug/electron-browser/replEditor.ts | 6 ++++-- .../walkThrough/electron-browser/walkThroughPart.ts | 6 ++++-- 10 files changed, 57 insertions(+), 13 deletions(-) diff --git a/src/vs/editor/browser/codeEditor.ts b/src/vs/editor/browser/codeEditor.ts index 721d90d9bdd45..77271726ba2bc 100644 --- a/src/vs/editor/browser/codeEditor.ts +++ b/src/vs/editor/browser/codeEditor.ts @@ -13,6 +13,7 @@ import { CodeEditorWidget } from 'vs/editor/browser/widget/codeEditorWidget'; import { EditorAction, CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; import { EditorBrowserRegistry } from 'vs/editor/browser/editorBrowserExtensions'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; export class CodeEditor extends CodeEditorWidget { @@ -22,9 +23,10 @@ export class CodeEditor extends CodeEditorWidget { @IInstantiationService instantiationService: IInstantiationService, @ICodeEditorService codeEditorService: ICodeEditorService, @ICommandService commandService: ICommandService, - @IContextKeyService contextKeyService: IContextKeyService + @IContextKeyService contextKeyService: IContextKeyService, + @IThemeService themeService: IThemeService ) { - super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService); + super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, themeService); } protected _getContributions(): IEditorContributionCtor[] { diff --git a/src/vs/editor/browser/standalone/standaloneCodeEditor.ts b/src/vs/editor/browser/standalone/standaloneCodeEditor.ts index 3cc70066d90b3..7644c520febb3 100644 --- a/src/vs/editor/browser/standalone/standaloneCodeEditor.ts +++ b/src/vs/editor/browser/standalone/standaloneCodeEditor.ts @@ -83,9 +83,10 @@ export class StandaloneCodeEditor extends CodeEditor implements IStandaloneCodeE @ICodeEditorService codeEditorService: ICodeEditorService, @ICommandService commandService: ICommandService, @IContextKeyService contextKeyService: IContextKeyService, - @IKeybindingService keybindingService: IKeybindingService + @IKeybindingService keybindingService: IKeybindingService, + @IThemeService themeService: IThemeService ) { - super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService); + super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, themeService); if (keybindingService instanceof StandaloneKeybindingService) { this._standaloneKeybindingService = keybindingService; @@ -213,7 +214,7 @@ export class StandaloneEditor extends StandaloneCodeEditor implements IStandalon } let model: IModel = options.model; delete options.model; - super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService); + super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService, standaloneThemeService); this._contextViewService = contextViewService; this._standaloneThemeService = standaloneThemeService; diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index 49a8d522741f8..c1cfa7f90375a 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -48,6 +48,7 @@ import { ViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData' import { EditorScrollbar } from 'vs/editor/browser/viewParts/editorScrollbar/editorScrollbar'; import { Minimap } from 'vs/editor/browser/viewParts/minimap/minimap'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; export interface IContentWidgetData { widget: editorBrowser.IContentWidget; @@ -94,6 +95,7 @@ export class View extends ViewEventHandler { constructor( commandService: ICommandService, configuration: Configuration, + themeService: IThemeService, model: IViewModel, execCoreEditorCommandFunc: ExecCoreEditorCommandFunc ) { @@ -111,7 +113,11 @@ export class View extends ViewEventHandler { this.eventDispatcher.addEventHandler(this); // The view context is passed on to most classes (basically to reduce param. counts in ctors) - this._context = new ViewContext(configuration, model, this.eventDispatcher); + this._context = new ViewContext(configuration, themeService.getTheme(), model, this.eventDispatcher); + + this._register(themeService.onThemeChange(theme => { + this.eventDispatcher.emit(new viewEvents.ViewThemeChangedEvent()); + })); this.viewParts = []; diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index 19579878aa2db..ff008292f72b6 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -32,6 +32,7 @@ import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IPosition } from 'vs/editor/common/core/position'; import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; import { CoreEditorCommand } from 'vs/editor/common/controller/coreCommands'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; export abstract class CodeEditorWidget extends CommonCodeEditor implements editorBrowser.ICodeEditor { @@ -70,6 +71,7 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito private _codeEditorService: ICodeEditorService; private _commandService: ICommandService; + private _themeService: IThemeService; protected domElement: HTMLElement; private _focusTracker: CodeEditorWidgetFocusTracker; @@ -87,11 +89,13 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito @IInstantiationService instantiationService: IInstantiationService, @ICodeEditorService codeEditorService: ICodeEditorService, @ICommandService commandService: ICommandService, - @IContextKeyService contextKeyService: IContextKeyService + @IContextKeyService contextKeyService: IContextKeyService, + @IThemeService themeService: IThemeService ) { super(domElement, options, instantiationService, contextKeyService); this._codeEditorService = codeEditorService; this._commandService = commandService; + this._themeService = themeService; this._focusTracker = new CodeEditorWidgetFocusTracker(domElement); this._focusTracker.onChage(() => { @@ -426,6 +430,7 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito this._view = new View( this._commandService, this._configuration, + this._themeService, this.viewModel, (editorCommand: CoreEditorCommand, args: any) => { if (!this.cursor) { diff --git a/src/vs/editor/browser/widget/embeddedCodeEditorWidget.ts b/src/vs/editor/browser/widget/embeddedCodeEditorWidget.ts index 0956a3e7d811a..185f3537c5186 100644 --- a/src/vs/editor/browser/widget/embeddedCodeEditorWidget.ts +++ b/src/vs/editor/browser/widget/embeddedCodeEditorWidget.ts @@ -12,6 +12,7 @@ import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService' import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { CodeEditor } from 'vs/editor/browser/codeEditor'; import { IConfigurationChangedEvent, IEditorOptions } from 'vs/editor/common/config/editorOptions'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; export class EmbeddedCodeEditorWidget extends CodeEditor { @@ -25,9 +26,10 @@ export class EmbeddedCodeEditorWidget extends CodeEditor { @IInstantiationService instantiationService: IInstantiationService, @ICodeEditorService codeEditorService: ICodeEditorService, @ICommandService commandService: ICommandService, - @IContextKeyService contextKeyService: IContextKeyService + @IContextKeyService contextKeyService: IContextKeyService, + @IThemeService themeService: IThemeService ) { - super(domElement, parentEditor.getRawConfiguration(), instantiationService, codeEditorService, commandService, contextKeyService); + super(domElement, parentEditor.getRawConfiguration(), instantiationService, codeEditorService, commandService, contextKeyService, themeService); this._parentEditor = parentEditor; this._overwriteOptions = options; diff --git a/src/vs/editor/common/view/viewContext.ts b/src/vs/editor/common/view/viewContext.ts index ebb5cc199a3df..91b722b0afb0d 100644 --- a/src/vs/editor/common/view/viewContext.ts +++ b/src/vs/editor/common/view/viewContext.ts @@ -8,20 +8,24 @@ import { IConfiguration } from 'vs/editor/common/editorCommon'; import { IViewModel, IViewLayout } from 'vs/editor/common/viewModel/viewModel'; import { ViewEventHandler } from 'vs/editor/common/viewModel/viewEventHandler'; import { ViewEventDispatcher } from 'vs/editor/common/view/viewEventDispatcher'; +import { ITheme } from 'vs/platform/theme/common/themeService'; export class ViewContext { public readonly configuration: IConfiguration; + public readonly theme: ITheme; public readonly model: IViewModel; public readonly viewLayout: IViewLayout; public readonly privateViewEventBus: ViewEventDispatcher; constructor( configuration: IConfiguration, + theme: ITheme, model: IViewModel, privateViewEventBus: ViewEventDispatcher ) { this.configuration = configuration; + this.theme = theme; this.model = model; this.viewLayout = model.viewLayout; this.privateViewEventBus = privateViewEventBus; diff --git a/src/vs/editor/common/view/viewEvents.ts b/src/vs/editor/common/view/viewEvents.ts index 7decc3f523168..a0788dda03030 100644 --- a/src/vs/editor/common/view/viewEvents.ts +++ b/src/vs/editor/common/view/viewEvents.ts @@ -27,6 +27,7 @@ export const enum ViewEventType { ViewTokensChanged = 13, ViewTokensColorsChanged = 14, ViewZonesChanged = 15, + ViewThemeChanged = 16 } export class ViewConfigurationChangedEvent { @@ -262,6 +263,14 @@ export class ViewTokensChangedEvent { } } +export class ViewThemeChangedEvent { + + public readonly type = ViewEventType.ViewThemeChanged; + + constructor() { + } +} + export class ViewTokensColorsChangedEvent { public readonly type = ViewEventType.ViewTokensColorsChanged; @@ -296,4 +305,5 @@ export type ViewEvent = ( | ViewTokensChangedEvent | ViewTokensColorsChangedEvent | ViewZonesChangedEvent + | ViewThemeChangedEvent ); diff --git a/src/vs/editor/common/viewModel/viewEventHandler.ts b/src/vs/editor/common/viewModel/viewEventHandler.ts index 3ef6a84a4e435..6696cf63894ae 100644 --- a/src/vs/editor/common/viewModel/viewEventHandler.ts +++ b/src/vs/editor/common/viewModel/viewEventHandler.ts @@ -79,6 +79,9 @@ export class ViewEventHandler extends Disposable { public onZonesChanged(e: viewEvents.ViewZonesChangedEvent): boolean { return false; } + public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { + return false; + } // --- end event handlers @@ -181,6 +184,13 @@ export class ViewEventHandler extends Disposable { } break; + + case viewEvents.ViewEventType.ViewThemeChanged: + if (this.onThemeChanged(e)) { + shouldRender = true; + } + break; + default: console.info('View received unknown event: '); console.info(e); diff --git a/src/vs/workbench/parts/debug/electron-browser/replEditor.ts b/src/vs/workbench/parts/debug/electron-browser/replEditor.ts index 3e607802ab32e..d1e6177361634 100644 --- a/src/vs/workbench/parts/debug/electron-browser/replEditor.ts +++ b/src/vs/workbench/parts/debug/electron-browser/replEditor.ts @@ -19,6 +19,7 @@ import { ContextMenuController } from 'vs/editor/contrib/contextmenu/browser/con import { SuggestController } from 'vs/editor/contrib/suggest/browser/suggestController'; import { SnippetController } from 'vs/editor/contrib/snippet/common/snippetController'; import { TabCompletionController } from 'vs/workbench/parts/snippets/electron-browser/tabCompletion'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; export class ReplInputEditor extends CodeEditorWidget { constructor( @@ -27,9 +28,10 @@ export class ReplInputEditor extends CodeEditorWidget { @IInstantiationService instantiationService: IInstantiationService, @ICodeEditorService codeEditorService: ICodeEditorService, @ICommandService commandService: ICommandService, - @IContextKeyService contextKeyService: IContextKeyService + @IContextKeyService contextKeyService: IContextKeyService, + @IThemeService themeService: IThemeService ) { - super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService); + super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, themeService); } protected _getContributions(): IEditorContributionCtor[] { diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 640439add9a22..ae8cd2085ed1a 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -38,6 +38,7 @@ import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService' import { Parts, IPartService } from 'vs/workbench/services/part/common/partService'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; export const WALK_THROUGH_FOCUS = new RawContextKey('interactivePlaygroundFocus', false); @@ -68,9 +69,10 @@ class WalkThroughCodeEditor extends CodeEditor { @IInstantiationService instantiationService: IInstantiationService, @ICodeEditorService codeEditorService: ICodeEditorService, @ICommandService commandService: ICommandService, - @IContextKeyService contextKeyService: IContextKeyService + @IContextKeyService contextKeyService: IContextKeyService, + @IThemeService themeService: IThemeService ) { - super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService); + super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, themeService); } getTelemetryData() { From ead17dead86c1ca4d3cc5eeee163acfa0465ecfd Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 10 May 2017 15:21:28 +0200 Subject: [PATCH 0375/2747] prepare for final tabstop insertion (conflicts with old world today) --- .../contrib/snippet/common/snippetParser.ts | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index 5eb0978e8ce71..d808697728175 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -307,24 +307,26 @@ export class SnippetParser { // * fill in default for empty placeHolders // * compact sibling Text markers - function compact(marker: Marker[], placeholders: { [name: string]: Marker[] }) { + function walk(marker: Marker[], placeholderDefaultValues: Map) { for (let i = 0; i < marker.length; i++) { const thisMarker = marker[i]; if (thisMarker instanceof Placeholder) { - if (placeholders[thisMarker.index] === undefined) { - placeholders[thisMarker.index] = thisMarker.defaultValue; + // fill in default values for repeated placeholders + // like `${1:foo}and$1` becomes ${1:foo}and${1:foo} + if (!placeholderDefaultValues.has(thisMarker.index)) { + placeholderDefaultValues.set(thisMarker.index, thisMarker.defaultValue); } else if (thisMarker.defaultValue.length === 0) { - thisMarker.defaultValue = placeholders[thisMarker.index].slice(0); + thisMarker.defaultValue = placeholderDefaultValues.get(thisMarker.index).slice(0); } if (thisMarker.defaultValue.length > 0) { - compact(thisMarker.defaultValue, placeholders); + walk(thisMarker.defaultValue, placeholderDefaultValues); } } else if (thisMarker instanceof Variable) { - compact(thisMarker.defaultValue, placeholders); + walk(thisMarker.defaultValue, placeholderDefaultValues); } else if (i > 0 && thisMarker instanceof Text && marker[i - 1] instanceof Text) { (marker[i - 1]).string += (marker[i]).string; @@ -334,7 +336,13 @@ export class SnippetParser { } } - compact(marker, Object.create(null)); + const placeholderDefaultValues = new Map(); + walk(marker, placeholderDefaultValues); + + // if (placeholderDefaultValues.size > 0 && !placeholderDefaultValues.has('0')) { + // // snippet uses tabstops but has no final tabstop + // marker.push(new Placeholder('0', [])); + // } return marker; } From 580230bbf3b3b0149804ac2163b95a0e9bfbe63a Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 10 May 2017 15:29:26 +0200 Subject: [PATCH 0376/2747] Added --noGettingStarted flag to disable 'Getting Started' page from opening when such provided. Implements #26386. --- src/vs/platform/environment/common/environment.ts | 3 +++ src/vs/platform/environment/node/argv.ts | 3 ++- src/vs/platform/environment/node/environmentService.ts | 2 ++ .../welcome/gettingStarted/electron-browser/gettingStarted.ts | 3 ++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/vs/platform/environment/common/environment.ts b/src/vs/platform/environment/common/environment.ts index 8e8fbb81a23e2..6c8b7d20576cc 100644 --- a/src/vs/platform/environment/common/environment.ts +++ b/src/vs/platform/environment/common/environment.ts @@ -38,6 +38,7 @@ export interface ParsedArgs { 'enable-proposed-api'?: string | string[]; 'open-url'?: string | string[]; 'prof-startup-timers': string; + noGettingStarted?: boolean; } export const IEnvironmentService = createDecorator('environmentService'); @@ -78,6 +79,8 @@ export interface IEnvironmentService { performance: boolean; profileStartup: { prefix: string, dir: string } | undefined; + noGettingStarted: boolean | undefined; + mainIPCHandle: string; sharedIPCHandle: string; diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts index fa8e0558faa8d..0a4ea0f9c495e 100644 --- a/src/vs/platform/environment/node/argv.ts +++ b/src/vs/platform/environment/node/argv.ts @@ -41,7 +41,8 @@ const options: minimist.Opts = { 'disable-extensions', 'list-extensions', 'show-versions', - 'nolazy' + 'nolazy', + 'noGettingStarted' ], alias: { help: 'h', diff --git a/src/vs/platform/environment/node/environmentService.ts b/src/vs/platform/environment/node/environmentService.ts index 15b2f19951a04..d088d9c9c3b58 100644 --- a/src/vs/platform/environment/node/environmentService.ts +++ b/src/vs/platform/environment/node/environmentService.ts @@ -100,6 +100,8 @@ export class EnvironmentService implements IEnvironmentService { get disableExtensions(): boolean { return this._args['disable-extensions']; } + get noGettingStarted(): boolean { return this._args.noGettingStarted; } + @memoize get debugExtensionHost(): { port: number; break: boolean; } { return parseExtensionHostPort(this._args, this.isBuilt); } diff --git a/src/vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarted.ts b/src/vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarted.ts index f57754ba1f92a..76215dd8be9e9 100644 --- a/src/vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarted.ts +++ b/src/vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarted.ts @@ -69,7 +69,8 @@ export class GettingStarted implements IWorkbenchContribution { ) { this.appName = product.nameLong; - if (product.welcomePage && !environmentService.isExtensionDevelopment /* do not open a browser when we run an extension */) { + /* do not open a browser when we run an extension or --noGettingStarted is provided */ + if (product.welcomePage && !environmentService.isExtensionDevelopment && !environmentService.noGettingStarted) { this.welcomePageURL = product.welcomePage; this.handleWelcome(); } From 67daf73cc162c5d42e9e412ec00c97e96a46715c Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 10 May 2017 15:42:57 +0200 Subject: [PATCH 0377/2747] Fixes #26151: Do not trust DOM readings immediately after calling webFrame.setZoomLevel() --- src/vs/base/browser/browser.ts | 32 +++---- src/vs/editor/browser/config/configuration.ts | 94 ++++++++----------- .../browser/viewParts/minimap/minimap.ts | 3 +- .../overviewRuler/decorationsOverviewRuler.ts | 5 + .../viewParts/overviewRuler/overviewRuler.ts | 5 + .../overviewRuler/overviewRulerImpl.ts | 28 +++--- src/vs/editor/common/config/editorOptions.ts | 23 +++-- src/vs/editor/common/config/fontInfo.ts | 9 +- src/vs/editor/common/view/viewEvents.ts | 2 + src/vs/monaco.d.ts | 2 + src/vs/workbench/electron-browser/actions.ts | 5 +- src/vs/workbench/electron-browser/main.ts | 5 +- src/vs/workbench/electron-browser/window.ts | 5 +- 13 files changed, 114 insertions(+), 104 deletions(-) diff --git a/src/vs/base/browser/browser.ts b/src/vs/base/browser/browser.ts index 29d7a261edd82..ed183b57cb9d0 100644 --- a/src/vs/base/browser/browser.ts +++ b/src/vs/base/browser/browser.ts @@ -15,10 +15,9 @@ class WindowManager { private _fullscreen: boolean; private _zoomLevel: number = 0; - private _zoomFactor: number = 0; + private _lastZoomLevelChangeTime: number = 0; - private _pixelRatioCache: number = 0; - private _pixelRatioComputed: boolean = false; + private _zoomFactor: number = 0; private _onDidChangeZoomLevel: Emitter = new Emitter(); public onDidChangeZoomLevel: Event = this._onDidChangeZoomLevel.event; @@ -30,13 +29,18 @@ class WindowManager { return this._zoomLevel; } - public setZoomLevel(zoomLevel: number): void { + public getTimeSinceLastZoomLevelChanged(): number { + return Date.now() - this._lastZoomLevelChangeTime; + } + + public setZoomLevel(zoomLevel: number, isTrusted: boolean): void { if (this._zoomLevel === zoomLevel) { return; } this._zoomLevel = zoomLevel; - this._pixelRatioComputed = false; + // See https://github.com/Microsoft/vscode/issues/26151 + this._lastZoomLevelChangeTime = isTrusted ? 0 : Date.now(); this._onDidChangeZoomLevel.fire(this._zoomLevel); } @@ -49,14 +53,6 @@ class WindowManager { } public getPixelRatio(): number { - if (!this._pixelRatioComputed) { - this._pixelRatioCache = this._computePixelRatio(); - this._pixelRatioComputed = true; - } - return this._pixelRatioCache; - } - - private _computePixelRatio(): number { let ctx = document.createElement('canvas').getContext('2d'); let dpr = window.devicePixelRatio || 1; let bsr = (ctx).webkitBackingStorePixelRatio || @@ -82,9 +78,16 @@ class WindowManager { } /** A zoom index, e.g. 1, 2, 3 */ +export function setZoomLevel(zoomLevel: number, isTrusted: boolean): void { + WindowManager.INSTANCE.setZoomLevel(zoomLevel, isTrusted); +} export function getZoomLevel(): number { return WindowManager.INSTANCE.getZoomLevel(); } +/** Returns the time (in ms) since the zoom level was changed */ +export function getTimeSinceLastZoomLevelChanged(): number { + return WindowManager.INSTANCE.getTimeSinceLastZoomLevelChanged(); +} /** The zoom scale for an index, e.g. 1, 1.2, 1.4 */ export function getZoomFactor(): number { return WindowManager.INSTANCE.getZoomFactor(); @@ -92,9 +95,6 @@ export function getZoomFactor(): number { export function getPixelRatio(): number { return WindowManager.INSTANCE.getPixelRatio(); } -export function setZoomLevel(zoomLevel: number): void { - WindowManager.INSTANCE.setZoomLevel(zoomLevel); -} export function setZoomFactor(zoomFactor: number): void { WindowManager.INSTANCE.setZoomFactor(zoomFactor); } diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts index 80191982f21f7..b28726c1b955a 100644 --- a/src/vs/editor/browser/config/configuration.ts +++ b/src/vs/editor/browser/config/configuration.ts @@ -102,7 +102,7 @@ class CSSBasedConfiguration extends Disposable { public static INSTANCE = new CSSBasedConfiguration(); private _cache: CSSBasedConfigurationCache; - private _changeMonitorTimeout: number = -1; + private _evictUntrustedReadingsTimeout: number; private _onDidChange = this._register(new Emitter()); public onDidChange: Event = this._onDidChange.event; @@ -111,16 +111,44 @@ class CSSBasedConfiguration extends Disposable { super(); this._cache = new CSSBasedConfigurationCache(); + this._evictUntrustedReadingsTimeout = -1; } public dispose(): void { - if (this._changeMonitorTimeout !== -1) { - clearTimeout(this._changeMonitorTimeout); - this._changeMonitorTimeout = -1; + if (this._evictUntrustedReadingsTimeout !== -1) { + clearTimeout(this._evictUntrustedReadingsTimeout); + this._evictUntrustedReadingsTimeout = -1; } super.dispose(); } + private _writeToCache(item: BareFontInfo, value: FontInfo): void { + this._cache.put(item, value); + + if (!value.isTrusted && this._evictUntrustedReadingsTimeout === -1) { + // Try reading again after some time + this._evictUntrustedReadingsTimeout = setTimeout(() => { + this._evictUntrustedReadingsTimeout = -1; + this._evictUntrustedReadings(); + }, 5000); + } + } + + private _evictUntrustedReadings(): void { + let values = this._cache.getValues(); + let somethingRemoved = false; + for (let i = 0, len = values.length; i < len; i++) { + let item = values[i]; + if (!item.isTrusted) { + somethingRemoved = true; + this._cache.remove(item); + } + } + if (somethingRemoved) { + this._onDidChange.fire(); + } + } + public saveFontInfo(): ISerializedFontInfo[] { // Only save trusted font info (that has been measured in this running instance) return this._cache.getValues().filter(item => item.isTrusted); @@ -131,25 +159,8 @@ class CSSBasedConfiguration extends Disposable { // The reason for this is that a font might have been installed on the OS in the meantime. for (let i = 0, len = savedFontInfo.length; i < len; i++) { let fontInfo = new FontInfo(savedFontInfo[i], false); - this._cache.put(fontInfo, fontInfo); + this._writeToCache(fontInfo, fontInfo); } - - // Remove saved font info that does not have the trusted flag. - // (this forces it to be re-read). - setTimeout(() => { - let values = this._cache.getValues(); - let somethingRemoved = false; - for (let i = 0, len = values.length; i < len; i++) { - let item = values[i]; - if (!item.isTrusted) { - somethingRemoved = true; - this._cache.remove(item); - } - } - if (somethingRemoved) { - this._onDidChange.fire(); - } - }, 5000); } public readConfiguration(bareFontInfo: BareFontInfo): FontInfo { @@ -169,45 +180,14 @@ class CSSBasedConfiguration extends Disposable { typicalFullwidthCharacterWidth: Math.max(readConfig.typicalFullwidthCharacterWidth, 5), spaceWidth: Math.max(readConfig.spaceWidth, 5), maxDigitWidth: Math.max(readConfig.maxDigitWidth, 5), - }, true); - this._installChangeMonitor(); + }, false); } - this._cache.put(bareFontInfo, readConfig); + this._writeToCache(bareFontInfo, readConfig); } return this._cache.get(bareFontInfo); } - private _installChangeMonitor(): void { - if (this._changeMonitorTimeout === -1) { - this._changeMonitorTimeout = setTimeout(() => { - this._changeMonitorTimeout = -1; - this._monitorForChanges(); - }, 500); - } - } - - private _monitorForChanges(): void { - let shouldInstallChangeMonitor = false; - let keys = this._cache.getKeys(); - for (let i = 0; i < keys.length; i++) { - let styling = keys[i]; - - let newValue = CSSBasedConfiguration._actualReadConfiguration(styling); - - if (newValue.typicalHalfwidthCharacterWidth <= 2 || newValue.typicalFullwidthCharacterWidth <= 2 || newValue.maxDigitWidth <= 2) { - // We still couldn't read the CSS config - shouldInstallChangeMonitor = true; - } else { - this._cache.put(styling, newValue); - this._onDidChange.fire(); - } - } - if (shouldInstallChangeMonitor) { - this._installChangeMonitor(); - } - } - private static createRequest(chr: string, type: CharWidthRequestType, all: CharWidthRequest[], monospace: CharWidthRequest[]): CharWidthRequest { let result = new CharWidthRequest(chr, type); all.push(result); @@ -278,6 +258,8 @@ class CSSBasedConfiguration extends Disposable { } } + // let's trust the zoom level only 2s after it was changed. + const canTrustBrowserZoomLevel = (browser.getTimeSinceLastZoomLevelChanged() > 2000); return new FontInfo({ zoomLevel: browser.getZoomLevel(), fontFamily: bareFontInfo.fontFamily, @@ -289,7 +271,7 @@ class CSSBasedConfiguration extends Disposable { typicalFullwidthCharacterWidth: typicalFullwidthCharacter.width, spaceWidth: space.width, maxDigitWidth: maxDigitWidth - }, true); + }, canTrustBrowserZoomLevel); } } diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index 43dd916168235..b24dba31f8725 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -10,7 +10,6 @@ import { ViewPart, PartFingerprint, PartFingerprints } from 'vs/editor/browser/v import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; import { getOrCreateMinimapCharRenderer } from 'vs/editor/common/view/runtimeMinimapCharRenderer'; -import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; import { MinimapCharRenderer, MinimapTokensColorTracker, Constants } from 'vs/editor/common/view/minimapCharRenderer'; import * as editorCommon from 'vs/editor/common/editorCommon'; @@ -107,7 +106,7 @@ class MinimapOptions { public readonly canvasOuterHeight: number; constructor(configuration: editorCommon.IConfiguration) { - const pixelRatio = browser.getPixelRatio(); + const pixelRatio = configuration.editor.pixelRatio; const layoutInfo = configuration.editor.layoutInfo; this.renderMinimap = layoutInfo.renderMinimap | 0; diff --git a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts index 5ee8d66826e02..69fdbe52a17f0 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts @@ -59,6 +59,7 @@ export class DecorationsOverviewRuler extends ViewPart { this._context.viewLayout.getScrollHeight(), this._context.configuration.editor.lineHeight, this._context.configuration.editor.canUseTranslate3d, + this._context.configuration.editor.pixelRatio, DecorationsOverviewRuler.MIN_DECORATION_HEIGHT, DecorationsOverviewRuler.MAX_DECORATION_HEIGHT, (lineNumber: number) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber) @@ -116,6 +117,10 @@ export class DecorationsOverviewRuler extends ViewPart { this._overviewRuler.setCanUseTranslate3d(this._context.configuration.editor.canUseTranslate3d, false); } + if (e.pixelRatio) { + this._overviewRuler.setPixelRatio(this._context.configuration.editor.pixelRatio, false); + } + if (e.viewInfo) { this._renderBorder = this._context.configuration.editor.viewInfo.overviewRulerBorder; this._hideCursor = this._context.configuration.editor.viewInfo.hideCursorInOverviewRuler; diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts index 8efec195d9a28..65c793de87657 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts @@ -26,6 +26,7 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { this._context.viewLayout.getScrollHeight(), this._context.configuration.editor.lineHeight, this._context.configuration.editor.canUseTranslate3d, + this._context.configuration.editor.pixelRatio, minimumHeight, maximumHeight, (lineNumber: number) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber) @@ -51,6 +52,10 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { this._overviewRuler.setCanUseTranslate3d(this._context.configuration.editor.canUseTranslate3d, true); } + if (e.pixelRatio) { + this._overviewRuler.setPixelRatio(this._context.configuration.editor.pixelRatio, true); + } + return true; } diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts index 3cce58aa44c1a..03105fa944c77 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts @@ -7,7 +7,6 @@ import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; import { OverviewRulerLane, ThemeType } from 'vs/editor/common/editorCommon'; import { IDisposable } from 'vs/base/common/lifecycle'; -import * as browser from 'vs/base/browser/browser'; import { OverviewZoneManager, ColorZone, OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; import { Color } from 'vs/base/common/color'; import { OverviewRulerPosition } from 'vs/editor/common/config/editorOptions'; @@ -23,7 +22,11 @@ export class OverviewRulerImpl { private _zoomListener: IDisposable; - constructor(canvasLeftOffset: number, cssClassName: string, scrollHeight: number, lineHeight: number, canUseTranslate3d: boolean, minimumHeight: number, maximumHeight: number, getVerticalOffsetForLine: (lineNumber: number) => number) { + constructor( + canvasLeftOffset: number, cssClassName: string, scrollHeight: number, lineHeight: number, + canUseTranslate3d: boolean, pixelRatio: number, minimumHeight: number, maximumHeight: number, + getVerticalOffsetForLine: (lineNumber: number) => number + ) { this._canvasLeftOffset = canvasLeftOffset; this._domNode = createFastDomNode(document.createElement('canvas')); @@ -45,15 +48,7 @@ export class OverviewRulerImpl { this._zoneManager.setOuterHeight(scrollHeight); this._zoneManager.setLineHeight(lineHeight); - this._zoomListener = browser.onDidChangeZoomLevel(() => { - this._zoneManager.setPixelRatio(browser.getPixelRatio()); - this._domNode.setWidth(this._zoneManager.getDOMWidth()); - this._domNode.setHeight(this._zoneManager.getDOMHeight()); - this._domNode.domNode.width = this._zoneManager.getCanvasWidth(); - this._domNode.domNode.height = this._zoneManager.getCanvasHeight(); - this.render(true); - }); - this._zoneManager.setPixelRatio(browser.getPixelRatio()); + this._zoneManager.setPixelRatio(pixelRatio); } public dispose(): void { @@ -142,6 +137,17 @@ export class OverviewRulerImpl { } } + public setPixelRatio(pixelRatio: number, render: boolean): void { + this._zoneManager.setPixelRatio(pixelRatio); + this._domNode.setWidth(this._zoneManager.getDOMWidth()); + this._domNode.setHeight(this._zoneManager.getDOMHeight()); + this._domNode.domNode.width = this._zoneManager.getCanvasWidth(); + this._domNode.domNode.height = this._zoneManager.getCanvasHeight(); + if (render) { + this.render(true); + } + } + public setZones(zones: OverviewRulerZone[], render: boolean): void { this._zoneManager.setZones(zones); if (render) { diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index de990d726b40a..1ea498ab56b54 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -746,6 +746,7 @@ export class InternalEditorOptions { readonly _internalEditorOptionsBrand: void; readonly canUseTranslate3d: boolean; + readonly pixelRatio: number; readonly editorClassName: string; readonly lineHeight: number; readonly readOnly: boolean; @@ -769,6 +770,7 @@ export class InternalEditorOptions { */ constructor(source: { canUseTranslate3d: boolean; + pixelRatio: number; editorClassName: string; lineHeight: number; readOnly: boolean; @@ -783,15 +785,16 @@ export class InternalEditorOptions { wrappingInfo: EditorWrappingInfo; contribInfo: EditorContribOptions; }) { - this.canUseTranslate3d = Boolean(source.canUseTranslate3d); - this.editorClassName = String(source.editorClassName); + this.canUseTranslate3d = source.canUseTranslate3d; + this.pixelRatio = source.pixelRatio; + this.editorClassName = source.editorClassName; this.lineHeight = source.lineHeight | 0; - this.readOnly = Boolean(source.readOnly); - this.wordSeparators = String(source.wordSeparators); - this.autoClosingBrackets = Boolean(source.autoClosingBrackets); - this.useTabStops = Boolean(source.useTabStops); - this.tabFocusMode = Boolean(source.tabFocusMode); - this.dragAndDrop = Boolean(source.dragAndDrop); + this.readOnly = source.readOnly; + this.wordSeparators = source.wordSeparators; + this.autoClosingBrackets = source.autoClosingBrackets; + this.useTabStops = source.useTabStops; + this.tabFocusMode = source.tabFocusMode; + this.dragAndDrop = source.dragAndDrop; this.layoutInfo = source.layoutInfo; this.fontInfo = source.fontInfo; this.viewInfo = source.viewInfo; @@ -805,6 +808,7 @@ export class InternalEditorOptions { public equals(other: InternalEditorOptions): boolean { return ( this.canUseTranslate3d === other.canUseTranslate3d + && this.pixelRatio === other.pixelRatio && this.editorClassName === other.editorClassName && this.lineHeight === other.lineHeight && this.readOnly === other.readOnly @@ -827,6 +831,7 @@ export class InternalEditorOptions { public createChangeEvent(newOpts: InternalEditorOptions): IConfigurationChangedEvent { return { canUseTranslate3d: (this.canUseTranslate3d !== newOpts.canUseTranslate3d), + pixelRatio: (this.pixelRatio !== newOpts.pixelRatio), editorClassName: (this.editorClassName !== newOpts.editorClassName), lineHeight: (this.lineHeight !== newOpts.lineHeight), readOnly: (this.readOnly !== newOpts.readOnly), @@ -1151,6 +1156,7 @@ export interface EditorLayoutInfo { */ export interface IConfigurationChangedEvent { readonly canUseTranslate3d: boolean; + readonly pixelRatio: boolean; readonly editorClassName: boolean; readonly lineHeight: boolean; readonly readOnly: boolean; @@ -1626,6 +1632,7 @@ export class InternalEditorOptionsFactory { return new InternalEditorOptions({ canUseTranslate3d: opts.disableTranslate3d ? false : env.canUseTranslate3d, + pixelRatio: env.pixelRatio, editorClassName: env.editorClassName, lineHeight: env.fontInfo.lineHeight, readOnly: opts.readOnly, diff --git a/src/vs/editor/common/config/fontInfo.ts b/src/vs/editor/common/config/fontInfo.ts index ae3ff7bfe9baa..f6d4cffd42ac5 100644 --- a/src/vs/editor/common/config/fontInfo.ts +++ b/src/vs/editor/common/config/fontInfo.ts @@ -178,11 +178,4 @@ export class FontInfo extends BareFontInfo { && this.maxDigitWidth === other.maxDigitWidth ); } - - /** - * @internal - */ - public clone(): FontInfo { - return new FontInfo(this, this.isTrusted); - } -} \ No newline at end of file +} diff --git a/src/vs/editor/common/view/viewEvents.ts b/src/vs/editor/common/view/viewEvents.ts index a0788dda03030..0f5ee787b72b7 100644 --- a/src/vs/editor/common/view/viewEvents.ts +++ b/src/vs/editor/common/view/viewEvents.ts @@ -35,6 +35,7 @@ export class ViewConfigurationChangedEvent { public readonly type = ViewEventType.ViewConfigurationChanged; public readonly canUseTranslate3d: boolean; + public readonly pixelRatio: boolean; public readonly editorClassName: boolean; public readonly lineHeight: boolean; public readonly readOnly: boolean; @@ -45,6 +46,7 @@ export class ViewConfigurationChangedEvent { constructor(source: IConfigurationChangedEvent) { this.canUseTranslate3d = source.canUseTranslate3d; + this.pixelRatio = source.pixelRatio; this.editorClassName = source.editorClassName; this.lineHeight = source.lineHeight; this.readOnly = source.readOnly; diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 943378589521c..d846cf7556be4 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -3222,6 +3222,7 @@ declare module monaco.editor { export class InternalEditorOptions { readonly _internalEditorOptionsBrand: void; readonly canUseTranslate3d: boolean; + readonly pixelRatio: number; readonly editorClassName: string; readonly lineHeight: number; readonly readOnly: boolean; @@ -3350,6 +3351,7 @@ declare module monaco.editor { */ export interface IConfigurationChangedEvent { readonly canUseTranslate3d: boolean; + readonly pixelRatio: boolean; readonly editorClassName: boolean; readonly lineHeight: boolean; readonly readOnly: boolean; diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index 1c9f9e8c1b22d..68a3993f30c04 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -242,7 +242,10 @@ export abstract class BaseZoomAction extends Action { const applyZoom = () => { webFrame.setZoomLevel(level); browser.setZoomFactor(webFrame.getZoomFactor()); - browser.setZoomLevel(level); // Ensure others can listen to zoom level changes + // See https://github.com/Microsoft/vscode/issues/26151 + // Cannot be trusted because the webFrame might take some time + // until it really applies the new zoom level + browser.setZoomLevel(webFrame.getZoomLevel(), /*isTrusted*/false); }; this.configurationEditingService.writeConfiguration(target, { key: BaseZoomAction.SETTING_KEY, value: level }).done(() => applyZoom(), error => applyZoom()); diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index 77bc5addf9bd5..0349ffdf810ad 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -57,7 +57,10 @@ export function startup(configuration: IWindowConfiguration): TPromise { // Ensure others can listen to zoom level changes browser.setZoomFactor(webFrame.getZoomFactor()); - browser.setZoomLevel(webFrame.getZoomLevel()); + // See https://github.com/Microsoft/vscode/issues/26151 + // Can be trusted because we are not setting it ourselves. + browser.setZoomLevel(webFrame.getZoomLevel(), /*isTrusted*/true); + browser.setFullscreen(!!configuration.fullscreen); KeyboardMapperFactory.INSTANCE._onKeyboardLayoutChanged(configuration.isISOKeyboard); diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index 3873284472dd7..e9e4c2ce9df73 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -321,7 +321,10 @@ export class ElectronWindow extends Themable { if (webFrame.getZoomLevel() !== newZoomLevel) { webFrame.setZoomLevel(newZoomLevel); browser.setZoomFactor(webFrame.getZoomFactor()); - browser.setZoomLevel(webFrame.getZoomLevel()); // Ensure others can listen to zoom level changes + // See https://github.com/Microsoft/vscode/issues/26151 + // Cannot be trusted because the webFrame might take some time + // until it really applies the new zoom level + browser.setZoomLevel(webFrame.getZoomLevel(), /*isTrusted*/false); } }); From f147243149c883ac3914550645695d1aef5a54af Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 10 May 2017 15:47:53 +0200 Subject: [PATCH 0378/2747] win32: get keys --- build/tfs/win32/1_build.ps1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index c11b72ae864c8..4b076080ab3b1 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -1,3 +1,15 @@ +Param( + [string]$AZURE_STORAGE_ACCESS_KEY_2, + [string]$MOONCAKE_STORAGE_ACCESS_KEY, + [string]$AZURE_DOCUMENTDB_MASTERKEY +) + +echo keys: +echo $AZURE_STORAGE_ACCESS_KEY_2 +echo $MOONCAKE_STORAGE_ACCESS_KEY +echo $AZURE_DOCUMENTDB_MASTERKEY +echo done! + . .\build\tfs\win32\lib.ps1 # npm install From 4fbe878844cebae80754d656b10e3b922b221ccb Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 10 May 2017 15:54:11 +0200 Subject: [PATCH 0379/2747] win32: read keys --- build/tfs/win32/1_build.ps1 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index 4b076080ab3b1..a8c8be74d197a 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -1,13 +1,13 @@ Param( - [string]$AZURE_STORAGE_ACCESS_KEY_2, - [string]$MOONCAKE_STORAGE_ACCESS_KEY, - [string]$AZURE_DOCUMENTDB_MASTERKEY + [string]$storageKey, + [string]$mooncakeStorageKey, + [string]$documentDbKey ) echo keys: -echo $AZURE_STORAGE_ACCESS_KEY_2 -echo $MOONCAKE_STORAGE_ACCESS_KEY -echo $AZURE_DOCUMENTDB_MASTERKEY +echo key: $storageKey +echo key: $mooncakeStorageKey +echo key: $documentDbKey echo done! . .\build\tfs\win32\lib.ps1 From e4f9b9dae7a45b8a2d4249b41213e61618606233 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 10 May 2017 15:56:32 +0200 Subject: [PATCH 0380/2747] Ability to theme ruler colour. Fixes #26377 --- src/vs/editor/browser/viewParts/rulers/rulers.css | 4 ---- src/vs/editor/browser/viewParts/rulers/rulers.ts | 9 +++++++++ src/vs/editor/common/view/editorColorRegistry.ts | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/browser/viewParts/rulers/rulers.css b/src/vs/editor/browser/viewParts/rulers/rulers.css index c2e819de64971..3012d205f67d2 100644 --- a/src/vs/editor/browser/viewParts/rulers/rulers.css +++ b/src/vs/editor/browser/viewParts/rulers/rulers.css @@ -7,8 +7,4 @@ position: absolute; width: 1px; top: 0; - background: lightgrey; -} -.monaco-editor.vs-dark .view-ruler { - background: #5A5A5A; } \ No newline at end of file diff --git a/src/vs/editor/browser/viewParts/rulers/rulers.ts b/src/vs/editor/browser/viewParts/rulers/rulers.ts index 0c4837e7c8437..56aa748b01972 100644 --- a/src/vs/editor/browser/viewParts/rulers/rulers.ts +++ b/src/vs/editor/browser/viewParts/rulers/rulers.ts @@ -11,6 +11,8 @@ import { ViewPart } from 'vs/editor/browser/view/viewPart'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorRuler } from 'vs/editor/common/view/editorColorRegistry'; export class Rulers extends ViewPart { @@ -97,3 +99,10 @@ export class Rulers extends ViewPart { } } } + +registerThemingParticipant((theme, collector) => { + let rulerColor = theme.getColor(editorRuler); + if (rulerColor) { + collector.addRule(`.monaco-editor .view-ruler { background-color: ${rulerColor}; }`); + } +}); diff --git a/src/vs/editor/common/view/editorColorRegistry.ts b/src/vs/editor/common/view/editorColorRegistry.ts index 386852f64f30b..93223cdec7144 100644 --- a/src/vs/editor/common/view/editorColorRegistry.ts +++ b/src/vs/editor/common/view/editorColorRegistry.ts @@ -18,6 +18,7 @@ export const editorCursor = registerColor('editorCursor.foreground', { dark: '#A export const editorWhitespaces = registerColor('editorWhitespace.foreground', { dark: '#e3e4e229', light: '#33333333', hc: '#e3e4e229' }, nls.localize('editorWhitespaces', 'Color of whitespace characters in the editor.')); export const editorIndentGuides = registerColor('editorIndentGuide.background', { dark: editorWhitespaces, light: editorWhitespaces, hc: editorWhitespaces }, nls.localize('editorIndentGuides', 'Color of the editor indentation guides.')); export const editorLineNumbers = registerColor('editorLineNumber.foreground', { dark: '#5A5A5A', light: '#2B91AF', hc: Color.white }, nls.localize('editorLineNumbers', 'Color of editor line numbers.')); +export const editorRuler = registerColor('editorRuler.foreground', { dark: '#5A5A5A', light: Color.lightgrey, hc: Color.white }, nls.localize('editorRuler', 'Color of the editor rulers.')); export const editorCodeLensForeground = registerColor('editorCodeLens.foreground', { dark: '#999999', light: '#999999', hc: '#999999' }, nls.localize('editorCodeLensForeground', 'Foreground color of editor code lenses')); From fb0477e61a8132bc8b923327518568372ee5015a Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 10 May 2017 15:57:00 +0200 Subject: [PATCH 0381/2747] win32: handle secrets --- build/tfs/win32/1_build.ps1 | 12 ------------ build/tfs/win32/3_upload.ps1 | 10 ++++++++++ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index a8c8be74d197a..c11b72ae864c8 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -1,15 +1,3 @@ -Param( - [string]$storageKey, - [string]$mooncakeStorageKey, - [string]$documentDbKey -) - -echo keys: -echo key: $storageKey -echo key: $mooncakeStorageKey -echo key: $documentDbKey -echo done! - . .\build\tfs\win32\lib.ps1 # npm install diff --git a/build/tfs/win32/3_upload.ps1 b/build/tfs/win32/3_upload.ps1 index 5e17893e6eb2e..55e1a5bb54b65 100644 --- a/build/tfs/win32/3_upload.ps1 +++ b/build/tfs/win32/3_upload.ps1 @@ -1,3 +1,9 @@ +Param( + [string]$storageKey, + [string]$mooncakeStorageKey, + [string]$documentDbKey +) + . .\build\tfs\win32\lib.ps1 $Repo = "$(pwd)" @@ -16,5 +22,9 @@ pushd "$Repo\build\tfs" exec { & npm i } popd +$env:AZURE_STORAGE_ACCESS_KEY_2 = $storageKey +$env:MOONCAKE_STORAGE_ACCESS_KEY = $mooncakeStorageKey +$env:AZURE_DOCUMENTDB_MASTERKEY = $documentDbKey + exec { & node build/tfs/out/publish.js $Quality win32 setup "VSCodeSetup-$Version.exe" $Version true $Exe } exec { & node build/tfs/out/publish.js $Quality win32-archive archive "VSCode-win32-$Version.zip" $Version true $Zip } From e57801bc9bd0202eb3b11891c84650df2a227a05 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 10 May 2017 16:09:06 +0200 Subject: [PATCH 0382/2747] Restore window to size and location when starting app (fixes #26353) --- src/vs/code/electron-main/windows.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index a43d3844bb46e..a243879c113f6 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -268,7 +268,7 @@ export class WindowsManager implements IWindowsMainService { const currentWindowsState: IWindowsState = { openedFolders: [], lastPluginDevelopmentHostWindow: this.windowsState.lastPluginDevelopmentHostWindow, - lastActiveWindow: this.lastClosedWindowState //will be set on Win/Linux if last window was closed, resulting in an exit + lastActiveWindow: this.lastClosedWindowState }; // 1.) Find a last active window (pick any other first window otherwise) @@ -330,7 +330,9 @@ export class WindowsManager implements IWindowsMainService { // On Windows and Linux closing the last window will trigger quit. Since we are storing all UI state // before quitting, we need to remember the UI state of this window to be able to persist it. - if (!platform.isMacintosh && this.getWindowCount() === 1) { + // On macOS we keep the last closed window state ready in case the user wants to quit right after or + // wants to open another window, in which case we use this state over the persisted one. + if (this.getWindowCount() === 1) { this.lastClosedWindowState = state; } } @@ -921,8 +923,9 @@ export class WindowsManager implements IWindowsMainService { // First Window const lastActive = this.getLastActiveWindow(); - if (!lastActive && this.windowsState.lastActiveWindow) { - return this.windowsState.lastActiveWindow.uiState; + const lastActiveState = this.lastClosedWindowState || this.windowsState.lastActiveWindow; + if (!lastActive && lastActiveState) { + return lastActiveState.uiState; } // From 6bbff65c67c119752ee7520e7a1bdfdbbe585145 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 10 May 2017 16:12:33 +0200 Subject: [PATCH 0383/2747] support insert none snippet text --- src/vs/editor/common/core/selection.ts | 10 +++++++++- .../contrib/snippet/browser/editorSnippets.ts | 17 ++++++++++++++++- .../snippet/browser/snippetController2.ts | 10 +++++++++- .../snippet/test/browser/editorSnippets.test.ts | 7 +++++++ .../test/browser/snippetController2.test.ts | 9 +++++++++ src/vs/monaco.d.ts | 4 ++++ 6 files changed, 54 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/common/core/selection.ts b/src/vs/editor/common/core/selection.ts index e0aa9ecb31497..21f2066d982ed 100644 --- a/src/vs/editor/common/core/selection.ts +++ b/src/vs/editor/common/core/selection.ts @@ -5,6 +5,7 @@ 'use strict'; import { Range } from 'vs/editor/common/core/range'; +import { IPosition } from 'vs/editor/common/core/position'; /** * A selection in the editor. @@ -140,6 +141,13 @@ export class Selection extends Range { // ---- + /** + * Create a `Selection` from one or two positions + */ + public static fromPositions(start: IPosition, end: IPosition = start): Selection { + return new Selection(start.lineNumber, start.column, end.lineNumber, end.column); + } + /** * Create a `Selection` from an `ISelection`. */ @@ -192,4 +200,4 @@ export class Selection extends Range { return new Selection(endLineNumber, endColumn, startLineNumber, startColumn); } -} \ No newline at end of file +} diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index 998daf72e850e..f79504c2bcd28 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -146,6 +146,10 @@ class OneSnippet { } } + get hasPlaceholder() { + return this._snippet.getPlaceholders().length > 0; + } + get range() { return this._snippetDecoration !== undefined && this._editor.getModel().getDecorationRange(this._snippetDecoration); } @@ -204,6 +208,7 @@ export class SnippetSession { } insert(): void { + let delta = 0; let edits: IIdentifiedSingleEditOperation[] = []; let model = this._editor.getModel(); @@ -231,7 +236,13 @@ export class SnippetSession { } // make insert edit and start with first selections - const newSelections = model.pushEditOperations(this._editor.getSelections(), edits, () => this._move(true)); + const newSelections = model.pushEditOperations(this._editor.getSelections(), edits, undoEdits => { + if (this._snippets[0].hasPlaceholder) { + return this._move(true); + } else { + return undoEdits.map(edit => Selection.fromPositions(edit.range.getEndPosition())); + } + }); this._editor.setSelections(newSelections); } @@ -262,6 +273,10 @@ export class SnippetSession { return this._snippets[0].isAtFinalPlaceholder; } + get hasPlaceholder() { + return this._snippets[0].hasPlaceholder; + } + validateSelections(): boolean { const selections = this._editor.getSelections(); if (selections.length < this._snippets.length) { diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 1c3666dc093b1..71096b7d1c324 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -61,8 +61,16 @@ export class SnippetController2 { private _updateState(): void { if (!this._snippet) { + // canceled in the meanwhile return; } + + if (!this._snippet.hasPlaceholder) { + // don't listen for selection changes and don't + // update context keys when the snippet is plain text + return; + } + if (this._snippet.isAtFinalPlaceholder || !this._snippet.validateSelections()) { return this.cancel(); } @@ -74,9 +82,9 @@ export class SnippetController2 { cancel(): void { if (this._snippet) { + this._inSnippet.reset(); this._hasPrevTabstop.reset(); this._hasNextTabstop.reset(); - this._inSnippet.reset(); dispose(this._snippetListener); dispose(this._snippet); this._snippet = undefined; diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts index 989b113ea2277..14f92a8510029 100644 --- a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts @@ -99,6 +99,13 @@ suite('SnippetSession', function () { ); }); + test('snippets, just text', function () { + const session = new SnippetSession(editor, 'foobar'); + session.insert(); + assert.equal(model.getValue(), 'foobarfunction foo() {\n foobarconsole.log(a);\n}'); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + }); + test('snippets, selections and new text with newlines', () => { const session = new SnippetSession(editor, 'foo\n\t${1:bar}\n$0'); diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts index 2b1b271662f94..7c9657a1ef657 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts @@ -116,6 +116,15 @@ suite('SnippetController2', function () { assertContextKeys(contextKeys, false, false, false); }); + test('insert, insert plain text -> no snippet mode', function () { + const ctrl = new SnippetController2(editor, contextKeys); + + ctrl.insert('foobar'); + assertContextKeys(contextKeys, false, false, false); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + }); + + test('insert, delete snippet text', function () { const ctrl = new SnippetController2(editor, contextKeys); diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 41c5b124ffd29..48c721acf4d12 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -726,6 +726,10 @@ declare module monaco { * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`. */ setStartPosition(startLineNumber: number, startColumn: number): Selection; + /** + * Create a `Selection` from one or two positions + */ + static fromPositions(start: IPosition, end?: IPosition): Selection; /** * Create a `Selection` from an `ISelection`. */ From 841a95bc49da1a4b06c772a9218e6f344d2fd215 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 10 May 2017 16:22:05 +0200 Subject: [PATCH 0384/2747] Do not auto-close quotes after a word character (#25658) --- .../common/controller/cursorTypeOperations.ts | 19 ++++- .../test/common/controller/cursor.test.ts | 74 +++++++++++++++++-- 2 files changed, 81 insertions(+), 12 deletions(-) diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index c564895b614aa..cc4c9327bc97a 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -16,6 +16,7 @@ import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageCo import { IndentAction } from 'vs/editor/common/modes/languageConfiguration'; import { SurroundSelectionCommand } from 'vs/editor/common/commands/surroundSelectionCommand'; import { IElectricAction } from 'vs/editor/common/modes/supports/electricCharacter'; +import { getMapForWordSeparators, WordCharacterClass } from "vs/editor/common/controller/cursorWordOperations"; export class TypeOperations { @@ -364,10 +365,20 @@ export class TypeOperations { const position = cursor.position; const lineText = model.getLineContent(position.lineNumber); - const afterCharacter = lineText.charAt(position.column - 1); + + // Do not auto-close ' or " after a word character + if ((ch === '\'' || ch === '"') && position.column > 1) { + const wordSeparators = getMapForWordSeparators(config.wordSeparators); + const characterBeforeCode = lineText.charCodeAt(position.column - 2); + const characterBeforeType = wordSeparators.get(characterBeforeCode); + if (characterBeforeType === WordCharacterClass.Regular) { + return false; + } + } // Only consider auto closing the pair if a space follows or if another autoclosed pair follows - if (afterCharacter) { + const characterAfter = lineText.charAt(position.column - 1); + if (characterAfter) { const thisBraceIsSymmetric = (config.autoClosingPairsOpen[ch] === ch); let isBeforeCloseBrace = false; @@ -376,12 +387,12 @@ export class TypeOperations { if (!thisBraceIsSymmetric && otherBraceIsSymmetric) { continue; } - if (afterCharacter === otherCloseBrace) { + if (characterAfter === otherCloseBrace) { isBeforeCloseBrace = true; break; } } - if (!isBeforeCloseBrace && !/\s/.test(afterCharacter)) { + if (!isBeforeCloseBrace && !/\s/.test(characterAfter)) { return false; } } diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index a543e5dac9aa7..eb7e5df87c720 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -3098,14 +3098,14 @@ suite('autoClosingPairs', () => { }, (model, cursor) => { let autoClosePositions = [ - 'var| a| =| [|];|', - 'var| b| =| |`asd|`;|', - 'var| c| =| !\'asd!\';|', - 'var| d| =| |"asd|";|', - 'var| e| =| /*3*/| 3;|', - 'var| f| =| /**| 3| */3;|', - 'var| g| =| (3+5|);|', - 'var| h| =| {| a:| !\'value!\'| |};|', + 'var a =| [|];|', + 'var b =| |`asd`;|', + 'var c =| !\'asd!\';|', + 'var d =| |"asd";|', + 'var e =| /*3*/| 3;|', + 'var f =| /**| 3 */3;|', + 'var g =| (3+5);|', + 'var h =| {| a:| !\'value!\'| |};|', ]; for (let i = 0, len = autoClosePositions.length; i < len; i++) { const lineNumber = i + 1; @@ -3125,6 +3125,64 @@ suite('autoClosingPairs', () => { mode.dispose(); }); + test('issue #25658 - Do not auto-close single/double quotes after word characters', () => { + let mode = new AutoClosingMode(); + usingCursor({ + text: [ + '', + ], + languageIdentifier: mode.getLanguageIdentifier() + }, (model, cursor) => { + + function typeCharacters(cursor: Cursor, chars: string): void { + for (let i = 0, len = chars.length; i < len; i++) { + cursorCommand(cursor, H.Type, { text: chars[i] }, 'keyboard'); + } + } + + // First gif + typeCharacters(cursor, 'teste1 = teste\' ok'); + assert.equal(model.getLineContent(1), 'teste1 = teste\' ok'); + + cursor.setSelections('test', [new Selection(1, 1000, 1, 1000)]); + typeCharacters(cursor, '\n'); + typeCharacters(cursor, 'teste2 = teste \'ok'); + assert.equal(model.getLineContent(2), 'teste2 = teste \'ok\''); + + cursor.setSelections('test', [new Selection(2, 1000, 2, 1000)]); + typeCharacters(cursor, '\n'); + typeCharacters(cursor, 'teste3 = teste" ok'); + assert.equal(model.getLineContent(3), 'teste3 = teste" ok'); + + cursor.setSelections('test', [new Selection(3, 1000, 3, 1000)]); + typeCharacters(cursor, '\n'); + typeCharacters(cursor, 'teste4 = teste "ok'); + assert.equal(model.getLineContent(4), 'teste4 = teste "ok"'); + + // Second gif + cursor.setSelections('test', [new Selection(4, 1000, 4, 1000)]); + typeCharacters(cursor, '\n'); + typeCharacters(cursor, 'teste \''); + assert.equal(model.getLineContent(5), 'teste \'\''); + + cursor.setSelections('test', [new Selection(5, 1000, 5, 1000)]); + typeCharacters(cursor, '\n'); + typeCharacters(cursor, 'teste "'); + assert.equal(model.getLineContent(6), 'teste ""'); + + cursor.setSelections('test', [new Selection(6, 1000, 6, 1000)]); + typeCharacters(cursor, '\n'); + typeCharacters(cursor, 'teste\''); + assert.equal(model.getLineContent(7), 'teste\''); + + cursor.setSelections('test', [new Selection(7, 1000, 7, 1000)]); + typeCharacters(cursor, '\n'); + typeCharacters(cursor, 'teste"'); + assert.equal(model.getLineContent(8), 'teste"'); + }); + mode.dispose(); + }); + test('issue #15825: accents on mac US intl keyboard', () => { let mode = new AutoClosingMode(); usingCursor({ From dc7edcc887e2de883638db8c8ea75862c99e8b86 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 10 May 2017 16:31:07 +0200 Subject: [PATCH 0385/2747] Fix NPE in OverviewRuler --- .../browser/viewParts/overviewRuler/overviewRulerImpl.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts index 03105fa944c77..e1472ac77729f 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts @@ -6,7 +6,6 @@ import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; import { OverviewRulerLane, ThemeType } from 'vs/editor/common/editorCommon'; -import { IDisposable } from 'vs/base/common/lifecycle'; import { OverviewZoneManager, ColorZone, OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; import { Color } from 'vs/base/common/color'; import { OverviewRulerPosition } from 'vs/editor/common/config/editorOptions'; @@ -20,8 +19,6 @@ export class OverviewRulerImpl { private _canUseTranslate3d: boolean; private _background: Color; - private _zoomListener: IDisposable; - constructor( canvasLeftOffset: number, cssClassName: string, scrollHeight: number, lineHeight: number, canUseTranslate3d: boolean, pixelRatio: number, minimumHeight: number, maximumHeight: number, @@ -52,7 +49,6 @@ export class OverviewRulerImpl { } public dispose(): void { - this._zoomListener.dispose(); this._zoneManager = null; } From e90f4d5c253d5e614a5e78375247c467fe1e8900 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 10 May 2017 16:32:58 +0200 Subject: [PATCH 0386/2747] cache & freeze snippet placeholders --- .../contrib/snippet/browser/editorSnippets.ts | 6 ++--- .../contrib/snippet/common/snippetParser.ts | 24 ++++++++++--------- .../snippet/test/common/snippetParser.test.ts | 8 +++---- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index f79504c2bcd28..98ac8849de146 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -67,7 +67,7 @@ class OneSnippet { this._snippetDecoration = accessor.addDecoration(range, OneSnippet._decor.snippet); // create a decoration for each placeholder - for (const placeholder of this._snippet.getPlaceholders()) { + for (const placeholder of this._snippet.placeholders) { const placeholderOffset = this._snippet.offset(placeholder); const placeholderLen = this._snippet.len(placeholder); const range = Range.fromPositions( @@ -83,7 +83,7 @@ class OneSnippet { this._placeholderGroupsIdx = -1; this._placeholderGroups = []; let lastBucket: Placeholder[]; - this._snippet.getPlaceholders().sort(Placeholder.compareByIndex).forEach(a => { + this._snippet.placeholders.slice(0).sort(Placeholder.compareByIndex).forEach(a => { if (!lastBucket || lastBucket[0].index !== a.index) { lastBucket = [a]; this._placeholderGroups.push(lastBucket); @@ -147,7 +147,7 @@ class OneSnippet { } get hasPlaceholder() { - return this._snippet.getPlaceholders().length > 0; + return this._snippet.placeholders.length > 0; } get range() { diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index d808697728175..1c6a60b2c68a8 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -222,9 +222,22 @@ export function walk(marker: Marker[], visitor: (marker: Marker) => boolean): vo export class TextmateSnippet { readonly marker: Marker[]; + readonly placeholders: Placeholder[]; constructor(marker: Marker[]) { this.marker = marker; + this.placeholders = []; + + // fill in placeholders + walk(marker, candidate => { + if (candidate instanceof Placeholder) { + this.placeholders.push(candidate); + } + return true; + }); + + Object.freeze(this.marker); + Object.freeze(this.placeholders); } offset(marker: Marker): number { @@ -254,17 +267,6 @@ export class TextmateSnippet { return ret; } - getPlaceholders(): Placeholder[] { - const ret: Placeholder[] = []; - walk(this.marker, candidate => { - if (candidate instanceof Placeholder) { - ret.push(candidate); - } - return true; - }); - return ret; - } - get text() { return Marker.toString(this.marker); } diff --git a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts index 3ff63929bce06..9665f7e14f7f9 100644 --- a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts +++ b/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts @@ -343,20 +343,20 @@ suite('SnippetParser', () => { test('TextmateSnippet#placeholder', () => { let snippet = SnippetParser.parse('te$1xt'); - let placeholders = snippet.getPlaceholders(); + let placeholders = snippet.placeholders; assert.equal(placeholders.length, 1); snippet = SnippetParser.parse('te$1xt$1'); - placeholders = snippet.getPlaceholders(); + placeholders = snippet.placeholders; assert.equal(placeholders.length, 2); snippet = SnippetParser.parse('te$1xt$2'); - placeholders = snippet.getPlaceholders(); + placeholders = snippet.placeholders; assert.equal(placeholders.length, 2); snippet = SnippetParser.parse('${1:bar${2:foo}bar}'); - placeholders = snippet.getPlaceholders(); + placeholders = snippet.placeholders; assert.equal(placeholders.length, 2); }); }); From f4cc58b47ba2d185137246f8771fab8f92429745 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 10 May 2017 12:52:11 +0200 Subject: [PATCH 0387/2747] debug: add StackFrame.range to model #8851 --- .../parts/debug/browser/debugEditorModelManager.ts | 6 +++--- src/vs/workbench/parts/debug/common/debug.ts | 3 +-- src/vs/workbench/parts/debug/common/debugModel.ts | 14 +++++++++----- .../electron-browser/debugEditorContribution.ts | 8 ++++---- .../parts/debug/electron-browser/debugService.ts | 2 +- .../parts/debug/electron-browser/debugViewer.ts | 10 +++++----- .../parts/debug/test/common/debugViewModel.test.ts | 2 +- .../parts/debug/test/node/debugModel.test.ts | 4 ++-- 8 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts b/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts index 883f40a1cab3c..c404debd95df2 100644 --- a/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts +++ b/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts @@ -122,8 +122,8 @@ export class DebugEditorModelManager implements IWorkbenchContribution { } // only show decorations for the currently focussed thread. - const columnUntilEOLRange = new Range(stackFrame.lineNumber, stackFrame.column, stackFrame.lineNumber, Constants.MAX_SAFE_SMALL_INTEGER); - const range = new Range(stackFrame.lineNumber, stackFrame.column, stackFrame.lineNumber, stackFrame.column + 1); + const columnUntilEOLRange = new Range(stackFrame.range.startLineNumber, stackFrame.range.startColumn, stackFrame.range.startLineNumber, Constants.MAX_SAFE_SMALL_INTEGER); + const range = new Range(stackFrame.range.startLineNumber, stackFrame.range.startColumn, stackFrame.range.startLineNumber, stackFrame.range.startColumn + 1); // compute how to decorate the editor. Different decorations are used if this is a top stack frame, focussed stack frame, // an exception or a stack frame that did not change the line number (we only decorate the columns, not the whole line). @@ -147,7 +147,7 @@ export class DebugEditorModelManager implements IWorkbenchContribution { if (this.modelDataMap.has(modelUriStr)) { const modelData = this.modelDataMap.get(modelUriStr); - if (modelData.topStackFrameRange && modelData.topStackFrameRange.startLineNumber === stackFrame.lineNumber && modelData.topStackFrameRange.startColumn !== stackFrame.column) { + if (modelData.topStackFrameRange && modelData.topStackFrameRange.startLineNumber === stackFrame.range.startLineNumber && modelData.topStackFrameRange.startColumn !== stackFrame.range.startColumn) { result.push({ options: DebugEditorModelManager.TOP_STACK_FRAME_INLINE_DECORATION, range: columnUntilEOLRange diff --git a/src/vs/workbench/parts/debug/common/debug.ts b/src/vs/workbench/parts/debug/common/debug.ts index 7f8c638a6864e..e62a4cda48dd4 100644 --- a/src/vs/workbench/parts/debug/common/debug.ts +++ b/src/vs/workbench/parts/debug/common/debug.ts @@ -180,9 +180,8 @@ export interface IScope extends IExpressionContainer { export interface IStackFrame extends ITreeElement { thread: IThread; name: string; - lineNumber: number; - column: number; frameId: number; + range: IRange; source: Source; getScopes(): TPromise; getMostSpecificScopes(range: IRange): TPromise; diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index d84b9287e2955..c3fde48413894 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -311,8 +311,7 @@ export class StackFrame implements IStackFrame { public frameId: number, public source: Source, public name: string, - public lineNumber: number, - public column: number + public range: IRange ) { this.scopes = null; } @@ -352,7 +351,7 @@ export class StackFrame implements IStackFrame { } public toString(): string { - return `${this.name} (${this.source.inMemory ? this.source.name : this.source.uri.fsPath}:${this.lineNumber})`; + return `${this.name} (${this.source.inMemory ? this.source.name : this.source.uri.fsPath}:${this.range.startLineNumber})`; } public openInEditor(editorService: IWorkbenchEditorService, preserveFocus?: boolean, sideBySide?: boolean): TPromise { @@ -362,7 +361,7 @@ export class StackFrame implements IStackFrame { description: this.source.origin, options: { preserveFocus, - selection: { startLineNumber: this.lineNumber, startColumn: 1 }, + selection: { startLineNumber: this.range.startLineNumber, startColumn: 1 }, revealIfVisible: true, revealInCenterIfOutsideViewport: true, pinned: !preserveFocus @@ -444,7 +443,12 @@ export class Thread implements IThread { this.process.sources.set(source.uri.toString(), source); } - return new StackFrame(this, rsf.id, source, rsf.name, rsf.line, rsf.column); + return new StackFrame(this, rsf.id, source, rsf.name, new Range( + rsf.line, + rsf.column, + rsf.endLine === undefined ? rsf.line : rsf.endLine, + rsf.endColumn === undefined ? rsf.column : rsf.endColumn + )); }); }, (err: Error) => { if (this.stoppedDetails) { diff --git a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts index 71db8f6911869..2b29b662fecc9 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts @@ -368,8 +368,8 @@ export class DebugEditorContribution implements IDebugEditorContribution { this.closeExceptionWidget(); } else if (sameUri) { focusedSf.thread.exceptionInfo.then(exceptionInfo => { - if (exceptionInfo && exceptionSf.lineNumber && exceptionSf.column) { - this.showExceptionWidget(exceptionInfo, exceptionSf.lineNumber, exceptionSf.column); + if (exceptionInfo && exceptionSf.range.startLineNumber && exceptionSf.range.startColumn) { + this.showExceptionWidget(exceptionInfo, exceptionSf.range.startLineNumber, exceptionSf.range.startColumn); } }); } @@ -467,11 +467,11 @@ export class DebugEditorContribution implements IDebugEditorContribution { this.removeInlineValuesScheduler.cancel(); - stackFrame.getMostSpecificScopes(new Range(stackFrame.lineNumber, stackFrame.column, stackFrame.lineNumber, stackFrame.column)) + stackFrame.getMostSpecificScopes(stackFrame.range) // Get all top level children in the scope chain .then(scopes => TPromise.join(scopes.map(scope => scope.getChildren() .then(children => { - let range = new Range(0, 0, stackFrame.lineNumber, stackFrame.column); + let range = new Range(0, 0, stackFrame.range.startLineNumber, stackFrame.range.startColumn); if (scope.range) { range = range.setStartPosition(scope.range.startLineNumber, scope.range.startColumn); } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 4ea09c9bbe339..d9856b2456da2 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -297,7 +297,7 @@ export class DebugService implements debug.IDebugService { const stackFrameToFocus = first(callStack, sf => sf.source && sf.source.available, callStack[0]); this.focusStackFrameAndEvaluate(stackFrameToFocus).done(null, errors.onUnexpectedError); this.windowService.getWindow().focus(); - aria.alert(nls.localize('debuggingPaused', "Debugging paused, reason {0}, {1} {2}", event.body.reason, stackFrameToFocus.source ? stackFrameToFocus.source.name : '', stackFrameToFocus.lineNumber)); + aria.alert(nls.localize('debuggingPaused', "Debugging paused, reason {0}, {1} {2}", event.body.reason, stackFrameToFocus.source ? stackFrameToFocus.source.name : '', stackFrameToFocus.range.startLineNumber)); return stackFrameToFocus.openInEditor(this.editorService); } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index 7bde56e351149..240a79e951742 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -538,10 +538,10 @@ export class CallStackRenderer implements IRenderer { data.label.textContent = stackFrame.name; data.label.title = stackFrame.name; data.fileName.textContent = getSourceName(stackFrame.source, this.contextService); - if (stackFrame.lineNumber !== undefined) { - data.lineNumber.textContent = `${stackFrame.lineNumber}`; - if (stackFrame.column) { - data.lineNumber.textContent += `:${stackFrame.column}`; + if (stackFrame.range.startLineNumber !== undefined) { + data.lineNumber.textContent = `${stackFrame.range.startLineNumber}`; + if (stackFrame.range.startColumn) { + data.lineNumber.textContent += `:${stackFrame.range.startColumn}`; } dom.removeClass(data.lineNumber, 'unavailable'); } else { @@ -565,7 +565,7 @@ export class CallstackAccessibilityProvider implements IAccessibilityProvider { return nls.localize('threadAriaLabel', "Thread {0}, callstack, debug", (element).name); } if (element instanceof StackFrame) { - return nls.localize('stackFrameAriaLabel', "Stack Frame {0} line {1} {2}, callstack, debug", (element).name, (element).lineNumber, getSourceName((element).source, this.contextService)); + return nls.localize('stackFrameAriaLabel', "Stack Frame {0} line {1} {2}, callstack, debug", (element).name, (element).range.startLineNumber, getSourceName((element).source, this.contextService)); } return null; diff --git a/src/vs/workbench/parts/debug/test/common/debugViewModel.test.ts b/src/vs/workbench/parts/debug/test/common/debugViewModel.test.ts index 31dd5f1f8d8f2..872818bd72757 100644 --- a/src/vs/workbench/parts/debug/test/common/debugViewModel.test.ts +++ b/src/vs/workbench/parts/debug/test/common/debugViewModel.test.ts @@ -25,7 +25,7 @@ suite('Debug - View Model', () => { const mockSession = new MockSession(); const process = new Process({ name: 'mockProcess', type: 'node', request: 'launch' }, mockSession); const thread = new Thread(process, 'myThread', 1); - const frame = new StackFrame(thread, 1, null, 'app.js', 1, 1); + const frame = new StackFrame(thread, 1, null, 'app.js', { startColumn: 1, startLineNumber: 1, endColumn: undefined, endLineNumber: undefined }); model.setFocusedStackFrame(frame, process); assert.equal(model.focusedStackFrame.getId(), frame.getId()); diff --git a/src/vs/workbench/parts/debug/test/node/debugModel.test.ts b/src/vs/workbench/parts/debug/test/node/debugModel.test.ts index 1705f9d25e53c..6e117d36fd8de 100644 --- a/src/vs/workbench/parts/debug/test/node/debugModel.test.ts +++ b/src/vs/workbench/parts/debug/test/node/debugModel.test.ts @@ -310,7 +310,7 @@ suite('Debug - Model', () => { assert.equal(model.getWatchExpressions().length, 0); const process = new Process({ name: 'mockProcess', type: 'node', request: 'launch' }, rawSession); const thread = new Thread(process, 'mockthread', 1); - const stackFrame = new StackFrame(thread, 1, null, 'app.js', 1, 1); + const stackFrame = new StackFrame(thread, 1, null, 'app.js', { startLineNumber: 1, startColumn: 1, endLineNumber: undefined, endColumn: undefined }); model.addWatchExpression(process, stackFrame, 'console').done(); model.addWatchExpression(process, stackFrame, 'console').done(); let watchExpressions = model.getWatchExpressions(); @@ -338,7 +338,7 @@ suite('Debug - Model', () => { assert.equal(model.getReplElements().length, 0); const process = new Process({ name: 'mockProcess', type: 'node', request: 'launch' }, rawSession); const thread = new Thread(process, 'mockthread', 1); - const stackFrame = new StackFrame(thread, 1, null, 'app.js', 1, 1); + const stackFrame = new StackFrame(thread, 1, null, 'app.js', { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 10 }); model.addReplExpression(process, stackFrame, 'myVariable').done(); model.addReplExpression(process, stackFrame, 'myVariable').done(); model.addReplExpression(process, stackFrame, 'myVariable').done(); From 6cba79f72700812614563cd5e8ab04986926641e Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 10 May 2017 16:33:23 +0200 Subject: [PATCH 0388/2747] debug: introduce breakpoint endLine and endColumn to the model. On bp click select the renage in editor #8851 --- src/vs/workbench/parts/debug/common/debug.ts | 2 ++ src/vs/workbench/parts/debug/common/debugModel.ts | 4 ++++ .../parts/debug/electron-browser/debugService.ts | 6 +++--- .../parts/debug/electron-browser/debugViewer.ts | 12 +++++++++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debug.ts b/src/vs/workbench/parts/debug/common/debug.ts index e62a4cda48dd4..26454a01bfc02 100644 --- a/src/vs/workbench/parts/debug/common/debug.ts +++ b/src/vs/workbench/parts/debug/common/debug.ts @@ -205,7 +205,9 @@ export interface IRawBreakpoint { export interface IBreakpoint extends IEnablement { uri: uri; lineNumber: number; + endLineNumber?: number; column: number; + endColumn?: number; condition: string; hitCondition: string; verified: boolean; diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index c3fde48413894..9b4fc2979e91a 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -642,6 +642,8 @@ export class Breakpoint implements IBreakpoint { public verified: boolean; public idFromAdapter: number; public message: string; + public endLineNumber: number; + public endColumn: number; private id: string; constructor( @@ -827,7 +829,9 @@ export class Model implements IModel { const bpData = data[bp.getId()]; if (bpData) { bp.lineNumber = bpData.line ? bpData.line : bp.lineNumber; + bp.endLineNumber = bpData.endLine; bp.column = bpData.column; + bp.endColumn = bpData.endColumn; bp.verified = bpData.verified; bp.idFromAdapter = bpData.id; bp.message = bpData.message; diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index d9856b2456da2..157009cdbd469 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -943,9 +943,9 @@ export class DebugService implements debug.IDebugService { if (this.model.getProcesses().length === 0) { // set breakpoints back to unverified since the session ended. - const data: { [id: string]: { line: number, verified: boolean, column: number } } = {}; + const data: { [id: string]: { line: number, verified: boolean, column: number, endLine: number, endColumn: number } } = {}; this.model.getBreakpoints().forEach(bp => { - data[bp.getId()] = { line: bp.lineNumber, verified: false, column: bp.column }; + data[bp.getId()] = { line: bp.lineNumber, verified: false, column: bp.column, endLine: bp.endLineNumber, endColumn: bp.endColumn }; }); this.model.updateBreakpoints(data); @@ -1006,7 +1006,7 @@ export class DebugService implements debug.IDebugService { return; } - const data: { [id: string]: { line?: number, column?: number, verified: boolean } } = {}; + const data: { [id: string]: DebugProtocol.Breakpoint } = {}; for (let i = 0; i < breakpointsToSend.length; i++) { data[breakpointsToSend[i].getId()] = response.body.breakpoints[i]; if (!breakpointsToSend[i].column) { diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index 240a79e951742..b29c2e156486b 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -1253,11 +1253,21 @@ export class BreakpointsController extends BaseDebugController { public openBreakpointSource(breakpoint: Breakpoint, event: IKeyboardEvent | IMouseEvent, preserveFocus: boolean): void { const sideBySide = (event && (event.ctrlKey || event.metaKey)); + const selection = breakpoint.endLineNumber ? { + startLineNumber: breakpoint.lineNumber, + endLineNumber: breakpoint.endLineNumber, + startColumn: breakpoint.column, + endColumn: breakpoint.endColumn + } : { + startLineNumber: breakpoint.lineNumber, + startColumn: 1 + }; + this.editorService.openEditor({ resource: breakpoint.uri, options: { preserveFocus, - selection: { startLineNumber: breakpoint.lineNumber, startColumn: 1 }, + selection, revealIfVisible: true, revealInCenterIfOutsideViewport: true, pinned: !preserveFocus From 47c0398dbd79254fff20f65ecba8b8d13c19ad16 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 10 May 2017 16:55:40 +0200 Subject: [PATCH 0389/2747] add TextmateSnippet#resolveVariable --- .../contrib/snippet/common/snippetParser.ts | 13 ++++++++++ .../{common => browser}/snippetParser.test.ts | 0 .../snippetVariables.test.ts | 25 +++++++++++++++++++ 3 files changed, 38 insertions(+) rename src/vs/editor/contrib/snippet/test/{common => browser}/snippetParser.test.ts (100%) rename src/vs/editor/contrib/snippet/test/{common => browser}/snippetVariables.test.ts (81%) diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index 1c6a60b2c68a8..77e829910bbcb 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -270,6 +270,19 @@ export class TextmateSnippet { get text() { return Marker.toString(this.marker); } + + resolveVariables(resolver: { resolve(name: string): string }): void { + walk(this.marker, candidate => { + if (candidate instanceof Variable) { + candidate.resolvedValue = resolver.resolve(candidate.name); + if (candidate.isDefined) { + // remove default value from resolved variable + candidate.defaultValue.length = 0; + } + } + return true; + }); + } } export class SnippetParser { diff --git a/src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts similarity index 100% rename from src/vs/editor/contrib/snippet/test/common/snippetParser.test.ts rename to src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts diff --git a/src/vs/editor/contrib/snippet/test/common/snippetVariables.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts similarity index 81% rename from src/vs/editor/contrib/snippet/test/common/snippetVariables.test.ts rename to src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts index 0c72e96b318c5..ec9a2523890a6 100644 --- a/src/vs/editor/contrib/snippet/test/common/snippetVariables.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts @@ -9,6 +9,7 @@ import { isWindows } from 'vs/base/common/platform'; import URI from 'vs/base/common/uri'; import { Selection } from 'vs/editor/common/core/selection'; import { SnippetVariablesResolver } from 'vs/editor/contrib/snippet/common/snippetVariables'; +import { SnippetParser } from 'vs/editor/contrib/snippet/common/snippetParser'; import { MockCodeEditor, withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; import { Model } from 'vs/editor/common/model/model'; @@ -91,4 +92,28 @@ suite('Snippet Variables Resolver', function () { }); }); + test('TextmateSnippet, resolve variable', function () { + + const snippet = SnippetParser.parse('"$TM_SELECTED_TEXT"'); + + variablesTest((editor, resolver) => { + assert.equal(snippet.text, '""'); + editor.setSelection(new Selection(1, 1, 1, 5)); + snippet.resolveVariables(resolver); + assert.equal(snippet.text, '"this"'); + }); + }); + + test('TextmateSnippet, resolve variable with default', function () { + + const snippet = SnippetParser.parse('"${TM_SELECTED_TEXT:foo}"'); + + variablesTest((editor, resolver) => { + assert.equal(snippet.text, '"foo"'); + editor.setSelection(new Selection(1, 1, 1, 5)); + snippet.resolveVariables(resolver); + assert.equal(snippet.text, '"this"'); + }); + }); + }); From 41f5fc78a732eac7f63834eeac5a8667756fcfff Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 10 May 2017 07:57:54 -0700 Subject: [PATCH 0390/2747] Fixes #26371 Swap only if there isnt enough space on the right --- .../contrib/suggest/browser/suggestWidget.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index e28be9bc62e67..a84c8f577cb67 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -837,7 +837,6 @@ export class SuggestWidget implements IContentWidget, IDelegate const perColumnWidth = this.editor.getLayoutInfo().contentWidth / this.editor.getLayoutInfo().viewportColumn; const spaceOntheLeft = Math.floor(this.editor.getPosition().column * perColumnWidth) - this.editor.getScrollLeft(); const spaceOntheRight = this.editor.getLayoutInfo().contentWidth - spaceOntheLeft; - const columnsOccupiedByDocs = Math.floor(this.docsWidth / perColumnWidth); // Reset width this.details.element.style.width = `${this.docsWidth}px`; @@ -857,8 +856,7 @@ export class SuggestWidget implements IContentWidget, IDelegate if (this.editorGroupService.getGroupOrientation() === 'horizontal' || totalEditors === 1) { if (this.editor.getLayoutInfo().contentWidth > this.maxWidgetWidth) { if (spaceOntheRight < this.docsWidth) { - addClass(this.element, 'list-right'); - this.preferredPosition = new Position(this.editor.getPosition().lineNumber, this.editor.getPosition().column - columnsOccupiedByDocs); + this.swapDocs(); } return; } @@ -868,10 +866,17 @@ export class SuggestWidget implements IContentWidget, IDelegate // Its vertical, multiple editors, active editor is the last one and not enough space on the right for widget // TODO: Check if window width < this.maxDocsWidth, in which case we may have to drop the docs below. + if (spaceOntheRight < this.docsWidth) { + this.swapDocs(); + } + + } + + private swapDocs() { + const perColumnWidth = this.editor.getLayoutInfo().contentWidth / this.editor.getLayoutInfo().viewportColumn; + const columnsOccupiedByDocs = Math.floor(this.docsWidth / perColumnWidth); addClass(this.element, 'list-right'); this.preferredPosition = new Position(this.editor.getPosition().lineNumber, this.editor.getPosition().column - columnsOccupiedByDocs); - - return; } private showDocsBelow() { From 3dde4393dbdbba648e24673cf9ae5381d7662335 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 10 May 2017 17:18:56 +0200 Subject: [PATCH 0391/2747] Theming: Decorations overview color. Fixes #26102 --- src/vs/editor/browser/view/viewImpl.ts | 1 + .../overviewRuler/decorationsOverviewRuler.ts | 18 ++++++++++++++---- .../editor/common/view/editorColorRegistry.ts | 3 +++ src/vs/editor/common/view/viewContext.ts | 3 ++- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index c1cfa7f90375a..9e11311758066 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -116,6 +116,7 @@ export class View extends ViewEventHandler { this._context = new ViewContext(configuration, themeService.getTheme(), model, this.eventDispatcher); this._register(themeService.onThemeChange(theme => { + this._context.theme = theme; this.eventDispatcher.emit(new viewEvents.ViewThemeChangedEvent()); })); diff --git a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts index 69fdbe52a17f0..b55e1c8b65143 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts @@ -15,6 +15,7 @@ import { TokenizationRegistry } from 'vs/editor/common/modes'; import { IDisposable } from 'vs/base/common/lifecycle'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; +import { editorOverviewRulerBorder } from 'vs/editor/common/view/editorColorRegistry'; function getThemeType(themeId: string): editorCommon.ThemeType { if (themes.isHighContrastTheme(themeId)) { @@ -34,13 +35,12 @@ export class DecorationsOverviewRuler extends ViewPart { private static _CURSOR_COLOR = 'rgba(0, 0, 102, 0.8)'; private static _CURSOR_COLOR_DARK = 'rgba(152, 152, 152, 0.8)'; - private static _BORDER_COLOR = 'rgba(127,127,127,0.3)'; - private readonly _tokensColorTrackerListener: IDisposable; private _overviewRuler: OverviewRulerImpl; private _renderBorder: boolean; + private _borderColor: string; private _shouldUpdateDecorations: boolean; private _shouldUpdateCursorPosition: boolean; @@ -71,6 +71,10 @@ export class DecorationsOverviewRuler extends ViewPart { this._renderBorder = this._context.configuration.editor.viewInfo.overviewRulerBorder; + let borderColor = this._context.theme.getColor(editorOverviewRulerBorder); + this._borderColor = borderColor ? borderColor.toString() : null; + + this._updateBackground(false); this._tokensColorTrackerListener = TokenizationRegistry.onDidChange((e) => { if (e.changedColorMap) { @@ -163,6 +167,12 @@ export class DecorationsOverviewRuler extends ViewPart { return true; } + public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { + let borderColor = this._context.theme.getColor(editorOverviewRulerBorder); + this._borderColor = borderColor ? borderColor.toString() : null; + return true; + } + // ---- end view event handlers public getDomNode(): HTMLElement { @@ -240,11 +250,11 @@ export class DecorationsOverviewRuler extends ViewPart { let hasRendered = this._overviewRuler.render(false); - if (hasRendered && this._renderBorder && this._overviewRuler.getLanesCount() > 0 && (this._zonesFromDecorations.length > 0 || this._zonesFromCursors.length > 0)) { + if (hasRendered && this._renderBorder && this._borderColor && this._overviewRuler.getLanesCount() > 0 && (this._zonesFromDecorations.length > 0 || this._zonesFromCursors.length > 0)) { let ctx2 = this._overviewRuler.getDomNode().getContext('2d'); ctx2.beginPath(); ctx2.lineWidth = 1; - ctx2.strokeStyle = DecorationsOverviewRuler._BORDER_COLOR; + ctx2.strokeStyle = this._borderColor; ctx2.moveTo(0, 0); ctx2.lineTo(0, this._overviewRuler.getPixelHeight()); ctx2.stroke(); diff --git a/src/vs/editor/common/view/editorColorRegistry.ts b/src/vs/editor/common/view/editorColorRegistry.ts index 93223cdec7144..32befce5e40ff 100644 --- a/src/vs/editor/common/view/editorColorRegistry.ts +++ b/src/vs/editor/common/view/editorColorRegistry.ts @@ -25,6 +25,9 @@ export const editorCodeLensForeground = registerColor('editorCodeLens.foreground export const editorBracketMatchBackground = registerColor('editorBracketMatch.background', { dark: '#0064001a', light: '#0064001a', hc: '#0064001a' }, nls.localize('editorBracketMatchBackground', 'Background color behind matching brackets')); export const editorBracketMatchBorder = registerColor('editorBracketMatch.border', { dark: '#888', light: '#B9B9B9', hc: '#fff' }, nls.localize('editorBracketMatchBorder', 'Color for matching brackets boxes')); +export const editorOverviewRulerBorder = registerColor('editorOverviewRuler.border', { dark: '#7f7f7f4d', light: '#7f7f7f4d', hc: '#7f7f7f4d' }, nls.localize('editorOverviewRulerBorder', 'Color of the overview ruler border.')); + + // contains all color rules that used to defined in editor/browser/widget/editor.css registerThemingParticipant((theme, collector) => { diff --git a/src/vs/editor/common/view/viewContext.ts b/src/vs/editor/common/view/viewContext.ts index 91b722b0afb0d..7aae15aebabf8 100644 --- a/src/vs/editor/common/view/viewContext.ts +++ b/src/vs/editor/common/view/viewContext.ts @@ -13,11 +13,12 @@ import { ITheme } from 'vs/platform/theme/common/themeService'; export class ViewContext { public readonly configuration: IConfiguration; - public readonly theme: ITheme; public readonly model: IViewModel; public readonly viewLayout: IViewLayout; public readonly privateViewEventBus: ViewEventDispatcher; + public theme: ITheme; // will be updated + constructor( configuration: IConfiguration, theme: ITheme, From 8a0aca3fd82896d5d632768d74b9cafe3e1c1595 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 10 May 2017 17:36:00 +0200 Subject: [PATCH 0392/2747] Fixes #26279: ensure textarea has a line height of >= 1 screen pixel to get input events --- .../browser/controller/textAreaHandler.ts | 42 ++++++++++++------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index 420e4bfafbce3..c1b3df004c606 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -54,6 +54,7 @@ export class TextAreaHandler extends ViewPart { private readonly _viewController: ViewController; private readonly _viewHelper: ITextAreaHandlerHelper; + private _pixelRatio: number; private _contentLeft: number; private _contentWidth: number; private _contentHeight: number; @@ -81,14 +82,17 @@ export class TextAreaHandler extends ViewPart { this._viewController = viewController; this._viewHelper = viewHelper; - this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; - this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; - this._contentHeight = this._context.configuration.editor.layoutInfo.contentHeight; + const conf = this._context.configuration.editor; + + this._pixelRatio = conf.pixelRatio; + this._contentLeft = conf.layoutInfo.contentLeft; + this._contentWidth = conf.layoutInfo.contentWidth; + this._contentHeight = conf.layoutInfo.contentHeight; this._scrollLeft = 0; this._scrollTop = 0; - this._experimentalScreenReader = this._context.configuration.editor.viewInfo.experimentalScreenReader; - this._fontInfo = this._context.configuration.editor.fontInfo; - this._lineHeight = this._context.configuration.editor.lineHeight; + this._experimentalScreenReader = conf.viewInfo.experimentalScreenReader; + this._fontInfo = conf.fontInfo; + this._lineHeight = conf.lineHeight; this._visibleTextArea = null; this._selections = [new Selection(1, 1, 1, 1)]; @@ -103,7 +107,7 @@ export class TextAreaHandler extends ViewPart { this.textArea.setAttribute('autocorrect', 'off'); this.textArea.setAttribute('autocapitalize', 'off'); this.textArea.setAttribute('spellcheck', 'false'); - this.textArea.setAttribute('aria-label', this._context.configuration.editor.viewInfo.ariaLabel); + this.textArea.setAttribute('aria-label', conf.viewInfo.ariaLabel); this.textArea.setAttribute('role', 'textbox'); this.textArea.setAttribute('aria-multiline', 'true'); this.textArea.setAttribute('aria-haspopup', 'false'); @@ -260,23 +264,28 @@ export class TextAreaHandler extends ViewPart { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - // Give textarea same font size & line height as editor, for the IME case (when the textarea is visible) + const conf = this._context.configuration.editor; + if (e.fontInfo) { - this._fontInfo = this._context.configuration.editor.fontInfo; + this._fontInfo = conf.fontInfo; } if (e.viewInfo) { - this._experimentalScreenReader = this._context.configuration.editor.viewInfo.experimentalScreenReader; + this._experimentalScreenReader = conf.viewInfo.experimentalScreenReader; this._textAreaInput.writeScreenReaderContent('strategy changed'); - this.textArea.setAttribute('aria-label', this._context.configuration.editor.viewInfo.ariaLabel); + this.textArea.setAttribute('aria-label', conf.viewInfo.ariaLabel); } if (e.layoutInfo) { - this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; - this._contentWidth = this._context.configuration.editor.layoutInfo.contentWidth; - this._contentHeight = this._context.configuration.editor.layoutInfo.contentHeight; + this._contentLeft = conf.layoutInfo.contentLeft; + this._contentWidth = conf.layoutInfo.contentWidth; + this._contentHeight = conf.layoutInfo.contentHeight; } if (e.lineHeight) { - this._lineHeight = this._context.configuration.editor.lineHeight; + this._lineHeight = conf.lineHeight; } + if (e.pixelRatio) { + this._pixelRatio = conf.pixelRatio; + } + return true; } public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { @@ -400,7 +409,7 @@ export class TextAreaHandler extends ViewPart { Configuration.applyFontInfo(ta, this._fontInfo); } else { ta.setFontSize(1); - ta.setLineHeight(1); + ta.setLineHeight(Math.ceil(1 / this._pixelRatio)); } ta.setTop(top); @@ -418,6 +427,7 @@ export class TextAreaHandler extends ViewPart { const ta = this.textArea; const tac = this.textAreaCover; + Configuration.applyFontInfo(ta, this._fontInfo); ta.setTop(0); ta.setLeft(0); tac.setTop(0); From 99daa037f19ddae8f6b8af5ece62778d1a97bd96 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 10 May 2017 17:45:55 +0200 Subject: [PATCH 0393/2747] Document funny line height value (#26279) --- src/vs/editor/browser/controller/textAreaHandler.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index c1b3df004c606..2a52c37838f16 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -409,6 +409,8 @@ export class TextAreaHandler extends ViewPart { Configuration.applyFontInfo(ta, this._fontInfo); } else { ta.setFontSize(1); + // Chrome does not generate input events in empty textareas that end + // up having a line height smaller than 1 screen pixel. ta.setLineHeight(Math.ceil(1 / this._pixelRatio)); } From b7ae720dfd761c76fea20ca7cfb519132774b437 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 10 May 2017 17:47:19 +0200 Subject: [PATCH 0394/2747] wire up variable resolver, resolve variables per selection --- .../contrib/snippet/browser/editorSnippets.ts | 22 +-- .../contrib/snippet/common/snippetParser.ts | 13 +- .../snippet/common/snippetVariables.ts | 53 ++++++- .../test/browser/editorSnippets.test.ts | 18 ++- .../test/browser/snippetVariables.test.ts | 133 ++++++++---------- 5 files changed, 145 insertions(+), 94 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index 98ac8849de146..650b5018d1488 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -13,6 +13,7 @@ import { Selection } from 'vs/editor/common/core/selection'; import { Range } from 'vs/editor/common/core/range'; import { IPosition } from 'vs/editor/common/core/position'; import { dispose } from 'vs/base/common/lifecycle'; +import { EditorSnippetVariableResolver } from "vs/editor/contrib/snippet/common/snippetVariables"; class OneSnippet { @@ -172,21 +173,26 @@ export class SnippetSession { return templateLines.join(model.getEOL()); } - static adjustRange(model: IModel, range: Range, overwriteBefore: number, overwriteAfter: number): Range { + static adjustSelection(model: IModel, selection: Selection, overwriteBefore: number, overwriteAfter: number): Selection { if (overwriteBefore !== 0 || overwriteAfter !== 0) { - let { startLineNumber, startColumn, endLineNumber, endColumn } = range; + let { startLineNumber, startColumn, endLineNumber, endColumn } = selection; startColumn -= overwriteBefore; endColumn += overwriteAfter; - range = Range.plusRange(range, { + const range = model.validateRange(Range.plusRange(selection, { startLineNumber, startColumn, endLineNumber, endColumn, - }); - range = model.validateRange(range); + })); + + selection = Selection.createWithDirection( + range.startLineNumber, range.startColumn, + range.endLineNumber, range.endColumn, + selection.getDirection() + ); } - return range; + return selection; } private readonly _editor: ICommonCodeEditor; @@ -222,11 +228,11 @@ export class SnippetSession { .sort((a, b) => Range.compareRangesUsingStarts(a.selection, b.selection)); for (const { selection, idx } of indexedSelection) { - const range = SnippetSession.adjustRange(model, selection, this._overwriteBefore, this._overwriteAfter); + const range = SnippetSession.adjustSelection(model, selection, this._overwriteBefore, this._overwriteAfter); const start = range.getStartPosition(); const adjustedTemplate = SnippetSession.normalizeWhitespace(model, start, this._template); - const snippet = SnippetParser.parse(adjustedTemplate); + const snippet = SnippetParser.parse(adjustedTemplate).resolveVariables(new EditorSnippetVariableResolver(model, range)); const offset = model.getOffsetAt(start) + delta; edits[idx] = EditOperation.replaceMove(range, snippet.text); diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index 77e829910bbcb..a54b2b7821f92 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -183,9 +183,6 @@ export class Placeholder extends Marker { get isFinalTabstop() { return this.index === '0'; } - with(defaultValue: Marker[]): Placeholder { - return new Placeholder(this.index, defaultValue); - } toString() { return Marker.toString(this.defaultValue); } @@ -201,6 +198,13 @@ export class Variable extends Marker { get isDefined(): boolean { return this.resolvedValue !== undefined; } + len(): number { + if (this.isDefined) { + return this.resolvedValue.length; + } else { + return super.len(); + } + } toString() { return this.isDefined ? this.resolvedValue : Marker.toString(this.defaultValue); } @@ -271,7 +275,7 @@ export class TextmateSnippet { return Marker.toString(this.marker); } - resolveVariables(resolver: { resolve(name: string): string }): void { + resolveVariables(resolver: { resolve(name: string): string }): this { walk(this.marker, candidate => { if (candidate instanceof Variable) { candidate.resolvedValue = resolver.resolve(candidate.name); @@ -282,6 +286,7 @@ export class TextmateSnippet { } return true; }); + return this; } } diff --git a/src/vs/editor/contrib/snippet/common/snippetVariables.ts b/src/vs/editor/contrib/snippet/common/snippetVariables.ts index 1a8e0a39604a0..6f2fde17793b1 100644 --- a/src/vs/editor/contrib/snippet/common/snippetVariables.ts +++ b/src/vs/editor/contrib/snippet/common/snippetVariables.ts @@ -6,14 +6,61 @@ 'use strict'; import { basename, dirname, normalize } from 'vs/base/common/paths'; -import * as editorCommon from 'vs/editor/common/editorCommon'; +import { ICommonCodeEditor, IModel } from 'vs/editor/common/editorCommon'; +import { Selection } from 'vs/editor/common/core/selection'; import { ISnippetVariableResolver } from './snippet'; + +export class EditorSnippetVariableResolver { + + constructor( + private readonly _model: IModel, + private readonly _selection: Selection + ) { + // + } + + resolve(name: string): string { + if (name === 'SELECTION' || name === 'TM_SELECTED_TEXT') { + return this._model.getValueInRange(this._selection); + + } else if (name === 'TM_CURRENT_LINE') { + return this._model.getLineContent(this._selection.positionLineNumber); + + } else if (name === 'TM_CURRENT_WORD') { + const info = this._model.getWordAtPosition({ + lineNumber: this._selection.positionLineNumber, + column: this._selection.positionColumn + }); + return info ? info.word : ''; + + } else if (name === 'TM_LINE_INDEX') { + return String(this._selection.positionLineNumber - 1); + + } else if (name === 'TM_LINE_NUMBER') { + return String(this._selection.positionLineNumber); + + } else if (name === 'TM_FILENAME') { + return basename(this._model.uri.fsPath); + + } else if (name === 'TM_DIRECTORY') { + const dir = dirname(this._model.uri.fsPath); + return dir !== '.' ? dir : ''; + + } else if (name === 'TM_FILEPATH') { + return this._model.uri.fsPath; + + } else { + return undefined; + } + } +} + export class SnippetVariablesResolver implements ISnippetVariableResolver { - private _editor: editorCommon.ICommonCodeEditor; + private readonly _editor: ICommonCodeEditor; - constructor(editor: editorCommon.ICommonCodeEditor) { + constructor(editor: ICommonCodeEditor) { this._editor = editor; } diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts index 14f92a8510029..5902f33ec3f3c 100644 --- a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts @@ -52,15 +52,15 @@ suite('SnippetSession', function () { assertNormalized(new Position(2, 3), 'foo\r\tbar', 'foo\n bar'); }); - test('adjust selection (overwrite[Before|After]', function () { + test('adjust selection (overwrite[Before|After])', function () { - let range = SnippetSession.adjustRange(model, new Range(1, 2, 1, 2), 1, 0); + let range = SnippetSession.adjustSelection(model, new Selection(1, 2, 1, 2), 1, 0); assert.ok(range.equalsRange(new Range(1, 1, 1, 2))); - range = SnippetSession.adjustRange(model, new Range(1, 2, 1, 2), 1111, 0); + range = SnippetSession.adjustSelection(model, new Selection(1, 2, 1, 2), 1111, 0); assert.ok(range.equalsRange(new Range(1, 1, 1, 2))); - range = SnippetSession.adjustRange(model, new Range(1, 2, 1, 2), 0, 10); + range = SnippetSession.adjustSelection(model, new Selection(1, 2, 1, 2), 0, 10); assert.ok(range.equalsRange(new Range(1, 2, 1, 12))); - range = SnippetSession.adjustRange(model, new Range(1, 2, 1, 2), 0, 10111); + range = SnippetSession.adjustSelection(model, new Selection(1, 2, 1, 2), 0, 10111); assert.ok(range.equalsRange(new Range(1, 2, 1, 17))); }); @@ -377,5 +377,13 @@ suite('SnippetSession', function () { assertSelections(editor, new Selection(1, 11, 1, 11)); }); + test('snippets, snippet with variables', function () { + const session = new SnippetSession(editor, '@line=$TM_LINE_NUMBER$0'); + session.insert(); + + assert.equal(model.getValue(), '@line=1function foo() {\n @line=2console.log(a);\n}'); + assertSelections(editor, new Selection(1, 8, 1, 8), new Selection(2, 12, 2, 12)); + }); + }); diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts index ec9a2523890a6..071119f91047f 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts @@ -8,112 +8,97 @@ import * as assert from 'assert'; import { isWindows } from 'vs/base/common/platform'; import URI from 'vs/base/common/uri'; import { Selection } from 'vs/editor/common/core/selection'; -import { SnippetVariablesResolver } from 'vs/editor/contrib/snippet/common/snippetVariables'; +import { EditorSnippetVariableResolver } from 'vs/editor/contrib/snippet/common/snippetVariables'; import { SnippetParser } from 'vs/editor/contrib/snippet/common/snippetParser'; -import { MockCodeEditor, withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; import { Model } from 'vs/editor/common/model/model'; suite('Snippet Variables Resolver', function () { - const model = Model.createFromString('', undefined, undefined, URI.parse('file:///foo/files/text.txt')); + let model: Model; + let resolver: EditorSnippetVariableResolver; - function variablesTest(callback: (editor: MockCodeEditor, resolver: SnippetVariablesResolver) => any) { - - - const lines: string[] = [ + setup(function () { + model = Model.createFromString([ 'this is line one', 'this is line two', ' this is line three' - ]; + ].join('\n'), undefined, undefined, URI.parse('file:///foo/files/text.txt')); - model.setValue(lines.join('\n')); + resolver = new EditorSnippetVariableResolver(model, new Selection(1, 1, 1, 1)); + }); - withMockCodeEditor(lines, { model }, editor => { - callback(editor, new SnippetVariablesResolver(editor)); - }); - } + teardown(function () { + model.dispose(); + }); test('editor variables, basics', function () { - - variablesTest((editor, resolver) => { - assert.equal(resolver.resolve('TM_FILENAME'), 'text.txt'); - assert.equal(resolver.resolve('something'), undefined); - - editor.setModel(null); - assert.throws(() => resolver.resolve('TM_FILENAME')); - }); + assert.equal(resolver.resolve('TM_FILENAME'), 'text.txt'); + assert.equal(resolver.resolve('something'), undefined); }); test('editor variables, file/dir', function () { - variablesTest((editor, resolver) => { - assert.equal(resolver.resolve('TM_FILENAME'), 'text.txt'); - if (!isWindows) { - assert.equal(resolver.resolve('TM_DIRECTORY'), '/foo/files'); - assert.equal(resolver.resolve('TM_FILEPATH'), '/foo/files/text.txt'); - } - - editor.setModel(Model.createFromString('', undefined, undefined, URI.parse('http://www.pb.o/abc/def/ghi'))); - assert.equal(resolver.resolve('TM_FILENAME'), 'ghi'); - if (!isWindows) { - assert.equal(resolver.resolve('TM_DIRECTORY'), '/abc/def'); - assert.equal(resolver.resolve('TM_FILEPATH'), '/abc/def/ghi'); - } - - editor.setModel(Model.createFromString('', undefined, undefined, URI.parse('mem:fff.ts'))); - assert.equal(resolver.resolve('TM_DIRECTORY'), ''); - assert.equal(resolver.resolve('TM_FILEPATH'), 'fff.ts'); - }); + assert.equal(resolver.resolve('TM_FILENAME'), 'text.txt'); + if (!isWindows) { + assert.equal(resolver.resolve('TM_DIRECTORY'), '/foo/files'); + assert.equal(resolver.resolve('TM_FILEPATH'), '/foo/files/text.txt'); + } + + resolver = new EditorSnippetVariableResolver( + Model.createFromString('', undefined, undefined, URI.parse('http://www.pb.o/abc/def/ghi')), + new Selection(1, 1, 1, 1) + ); + assert.equal(resolver.resolve('TM_FILENAME'), 'ghi'); + if (!isWindows) { + assert.equal(resolver.resolve('TM_DIRECTORY'), '/abc/def'); + assert.equal(resolver.resolve('TM_FILEPATH'), '/abc/def/ghi'); + } + + resolver = new EditorSnippetVariableResolver( + Model.createFromString('', undefined, undefined, URI.parse('mem:fff.ts')), + new Selection(1, 1, 1, 1) + ); + assert.equal(resolver.resolve('TM_DIRECTORY'), ''); + assert.equal(resolver.resolve('TM_FILEPATH'), 'fff.ts'); + }); test('editor variables, selection', function () { - variablesTest((editor, resolver) => { + resolver = new EditorSnippetVariableResolver(model, new Selection(1, 2, 2, 3)); + assert.equal(resolver.resolve('TM_SELECTED_TEXT'), 'his is line one\nth'); + assert.equal(resolver.resolve('TM_CURRENT_LINE'), 'this is line two'); + assert.equal(resolver.resolve('TM_LINE_INDEX'), '1'); + assert.equal(resolver.resolve('TM_LINE_NUMBER'), '2'); - editor.setSelection(new Selection(1, 2, 2, 3)); - assert.equal(resolver.resolve('TM_SELECTED_TEXT'), 'his is line one\nth'); - assert.equal(resolver.resolve('TM_CURRENT_LINE'), 'this is line two'); - assert.equal(resolver.resolve('TM_LINE_INDEX'), '1'); - assert.equal(resolver.resolve('TM_LINE_NUMBER'), '2'); + resolver = new EditorSnippetVariableResolver(model, new Selection(2, 3, 1, 2)); + assert.equal(resolver.resolve('TM_SELECTED_TEXT'), 'his is line one\nth'); + assert.equal(resolver.resolve('TM_CURRENT_LINE'), 'this is line one'); + assert.equal(resolver.resolve('TM_LINE_INDEX'), '0'); + assert.equal(resolver.resolve('TM_LINE_NUMBER'), '1'); - editor.setSelection(new Selection(2, 3, 1, 2)); - assert.equal(resolver.resolve('TM_SELECTED_TEXT'), 'his is line one\nth'); - assert.equal(resolver.resolve('TM_CURRENT_LINE'), 'this is line one'); - assert.equal(resolver.resolve('TM_LINE_INDEX'), '0'); - assert.equal(resolver.resolve('TM_LINE_NUMBER'), '1'); + resolver = new EditorSnippetVariableResolver(model, new Selection(1, 2, 1, 2)); + assert.equal(resolver.resolve('TM_SELECTED_TEXT'), ''); - editor.setSelection(new Selection(1, 2, 1, 2)); - assert.equal(resolver.resolve('TM_SELECTED_TEXT'), ''); + assert.equal(resolver.resolve('TM_CURRENT_WORD'), 'this'); - assert.equal(resolver.resolve('TM_CURRENT_WORD'), 'this'); + resolver = new EditorSnippetVariableResolver(model, new Selection(3, 1, 3, 1)); + assert.equal(resolver.resolve('TM_CURRENT_WORD'), ''); - editor.setSelection(new Selection(3, 1, 3, 1)); - assert.equal(resolver.resolve('TM_CURRENT_WORD'), ''); - }); }); test('TextmateSnippet, resolve variable', function () { + const snippet = SnippetParser.parse('"$TM_CURRENT_WORD"'); + assert.equal(snippet.text, '""'); + snippet.resolveVariables(resolver); + assert.equal(snippet.text, '"this"'); - const snippet = SnippetParser.parse('"$TM_SELECTED_TEXT"'); - - variablesTest((editor, resolver) => { - assert.equal(snippet.text, '""'); - editor.setSelection(new Selection(1, 1, 1, 5)); - snippet.resolveVariables(resolver); - assert.equal(snippet.text, '"this"'); - }); }); test('TextmateSnippet, resolve variable with default', function () { - - const snippet = SnippetParser.parse('"${TM_SELECTED_TEXT:foo}"'); - - variablesTest((editor, resolver) => { - assert.equal(snippet.text, '"foo"'); - editor.setSelection(new Selection(1, 1, 1, 5)); - snippet.resolveVariables(resolver); - assert.equal(snippet.text, '"this"'); - }); + const snippet = SnippetParser.parse('"${TM_CURRENT_WORD:foo}"'); + assert.equal(snippet.text, '"foo"'); + snippet.resolveVariables(resolver); + assert.equal(snippet.text, '"this"'); }); - }); From e2b69681d1f5c4d110a6a46c1afa42cfc9a339ad Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 10 May 2017 17:49:48 +0200 Subject: [PATCH 0395/2747] Try to disguise inputarea by using a transparent color for it --- src/vs/editor/browser/controller/textAreaHandler.css | 1 + src/vs/editor/common/view/editorColorRegistry.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/browser/controller/textAreaHandler.css b/src/vs/editor/browser/controller/textAreaHandler.css index e80b2bf6b32ab..69fe6c8497a70 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.css +++ b/src/vs/editor/browser/controller/textAreaHandler.css @@ -13,6 +13,7 @@ resize: none; border: none; overflow: hidden; + color: transparent; background-color: transparent; } /*.monaco-editor .inputarea { diff --git a/src/vs/editor/common/view/editorColorRegistry.ts b/src/vs/editor/common/view/editorColorRegistry.ts index 32befce5e40ff..6be8ca4e54b30 100644 --- a/src/vs/editor/common/view/editorColorRegistry.ts +++ b/src/vs/editor/common/view/editorColorRegistry.ts @@ -37,7 +37,7 @@ registerThemingParticipant((theme, collector) => { } let foreground = theme.getColor(editorForeground); if (foreground) { - collector.addRule(`.monaco-editor.${theme.selector}, .monaco-editor.${theme.selector} .inputarea { color: ${foreground}; }`); + collector.addRule(`.monaco-editor.${theme.selector}, .monaco-editor.${theme.selector} .inputarea.ime-input { color: ${foreground}; }`); } let rangeHighlight = theme.getColor(editorRangeHighlight); From eb9ed47e3d642e95b51d9da3ba110c03b1659d48 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 10 May 2017 18:01:55 +0200 Subject: [PATCH 0396/2747] :lipstick: --- .../parts/editor/editorGroupsControl.ts | 4 ++-- src/vs/workbench/common/theme.ts | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index 0a9a2dd62d42f..ea8e7c92f961a 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -35,7 +35,7 @@ import { IWindowService } from 'vs/platform/windows/common/windows'; import { getCodeEditor } from 'vs/editor/common/services/codeEditorService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { editorBackground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; -import { Themable, TABS_CONTAINER_BACKGROUND, EDITOR_GROUP_HEADER_BACKGROUND, EDITOR_GROUP_BORDER_COLOR, EDITOR_DRAG_AND_DROP_BACKGROUND, EDITOR_GROUP_BACKGROUND } from 'vs/workbench/common/theme'; +import { Themable, EDITOR_GROUP_HEADER_TABS_BACKGROUND, EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND, EDITOR_GROUP_BORDER_COLOR, EDITOR_DRAG_AND_DROP_BACKGROUND, EDITOR_GROUP_BACKGROUND } from 'vs/workbench/common/theme'; import { attachProgressBarStyler } from "vs/platform/theme/common/styler"; export enum Rochade { @@ -1020,7 +1020,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro const container = this.getTitleAreaControl(position).getContainer(); const contrastBorderColor = this.getColor(contrastBorder); - container.style.backgroundColor = this.getColor(this.tabOptions.showTabs ? TABS_CONTAINER_BACKGROUND : EDITOR_GROUP_HEADER_BACKGROUND); + container.style.backgroundColor = this.getColor(this.tabOptions.showTabs ? EDITOR_GROUP_HEADER_TABS_BACKGROUND : EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND); container.style.borderBottomWidth = (contrastBorderColor && this.tabOptions.showTabs) ? '1px' : null; container.style.borderBottomStyle = (contrastBorderColor && this.tabOptions.showTabs) ? 'solid' : null; container.style.borderBottomColor = this.tabOptions.showTabs ? contrastBorderColor : null; diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index cf64a63b7771d..9a4426de311bd 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -11,12 +11,6 @@ import { Color } from 'vs/base/common/color'; // < --- Tabs --- > -export const TABS_CONTAINER_BACKGROUND = registerColor('editorGroupHeader.tabsBackground', { - dark: '#252526', - light: '#F3F3F3', - hc: null -}, nls.localize('tabsContainerBackground', "Background color of the tabs container. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); - export const TAB_ACTIVE_BACKGROUND = registerColor('tab.activeBackground', { dark: editorBackground, light: editorBackground, @@ -56,7 +50,13 @@ export const EDITOR_GROUP_BACKGROUND = registerColor('editorGroup.background', { hc: null }, nls.localize('editorGroupBackground', "Background color of an editor group. Editor groups are the containers of editors. The background color shows up when dragging editor groups around.")); -export const EDITOR_GROUP_HEADER_BACKGROUND = registerColor('editorGroupHeader.noTabsBackground', { +export const EDITOR_GROUP_HEADER_TABS_BACKGROUND = registerColor('editorGroupHeader.tabsBackground', { + dark: '#252526', + light: '#F3F3F3', + hc: null +}, nls.localize('tabsContainerBackground', "Background color of the editor group title header when tabs are enabled. Editor groups are the containers of editors.")); + +export const EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND = registerColor('editorGroupHeader.noTabsBackground', { dark: editorBackground, light: editorBackground, hc: editorBackground @@ -72,7 +72,7 @@ export const EDITOR_DRAG_AND_DROP_BACKGROUND = registerColor('editorGroup.dropBa dark: Color.fromHex('#53595D').transparent(0.5), light: Color.fromHex('#3399FF').transparent(0.18), hc: null -}, nls.localize('editorDragAndDropBackground', "Background color when dragging editors around.")); +}, nls.localize('editorDragAndDropBackground', "Background color when dragging editors around. The color should have transparency so that the editor contents can still shine through.")); @@ -174,7 +174,7 @@ export const ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND = registerColor('activityBar. dark: Color.white.transparent(0.12), light: Color.white.transparent(0.12), hc: Color.white.transparent(0.12), -}, nls.localize('activityBarDragAndDropBackground', "Drag and drop feedback color for the activity bar items. The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); +}, nls.localize('activityBarDragAndDropBackground', "Drag and drop feedback color for the activity bar items. The color should have transparency so that the activity bar entries can still shine through. The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); export const ACTIVITY_BAR_BADGE_BACKGROUND = registerColor('activityBarBadge.background', { dark: badgeBackground, From 51c98a8ea674801ee6dc9d47344da8bdc7bc90db Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 10 May 2017 18:20:03 +0200 Subject: [PATCH 0397/2747] :lipstick: --- .../browser/parts/editor/editorPart.ts | 4 +-- src/vs/workbench/common/editor.ts | 7 ++-- .../common/editor/editorStacksModel.ts | 33 ++++++++++--------- .../files/browser/editors/textFileEditor.ts | 4 +-- .../services/history/browser/history.ts | 4 +-- .../test/browser/editorStacksModel.test.ts | 10 +++--- 6 files changed, 32 insertions(+), 30 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index 95bee54792410..bcddcea6c578e 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -35,7 +35,7 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle import { IMessageService, IMessageWithAction, Severity } from 'vs/platform/message/common/message'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IProgressService } from 'vs/platform/progress/common/progress'; -import { EditorStacksModel, EditorGroup, EditorIdentifier, GroupEvent } from 'vs/workbench/common/editor/editorStacksModel'; +import { EditorStacksModel, EditorGroup, EditorIdentifier, EditorCloseEvent } from 'vs/workbench/common/editor/editorStacksModel'; import Event, { Emitter } from 'vs/base/common/event'; import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IThemeService } from 'vs/platform/theme/common/themeService'; @@ -234,7 +234,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService this.telemetryService.publicLog('editorOpened', identifier.editor.getTelemetryDescriptor()); } - private onEditorClosed(event: GroupEvent): void { + private onEditorClosed(event: EditorCloseEvent): void { this.telemetryService.publicLog('editorClosed', event.editor.getTelemetryDescriptor()); } diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index c4013c04cad7c..8636bc66ef0b2 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -845,8 +845,8 @@ export interface IEditorStacksModel { onModelChanged: Event; - onWillCloseEditor: Event; - onEditorClosed: Event; + onWillCloseEditor: Event; + onEditorClosed: Event; groups: IEditorGroup[]; activeGroup: IEditorGroup; @@ -895,8 +895,7 @@ export interface IEditorContext extends IEditorIdentifier { event?: any; } -export interface IGroupEvent { - editor: IEditorInput; +export interface IEditorCloseEvent extends IEditorIdentifier { pinned: boolean; index: number; } diff --git a/src/vs/workbench/common/editor/editorStacksModel.ts b/src/vs/workbench/common/editor/editorStacksModel.ts index a81bd7a2fb1b7..c61412c99f808 100644 --- a/src/vs/workbench/common/editor/editorStacksModel.ts +++ b/src/vs/workbench/common/editor/editorStacksModel.ts @@ -6,7 +6,7 @@ 'use strict'; import Event, { Emitter, once } from 'vs/base/common/event'; -import { IEditorRegistry, Extensions, EditorInput, toResource, IEditorStacksModel, IEditorGroup, IEditorIdentifier, IGroupEvent, GroupIdentifier, IStacksModelChangeEvent, IWorkbenchEditorConfiguration, EditorOpenPositioning, SideBySideEditorInput } from 'vs/workbench/common/editor'; +import { IEditorRegistry, Extensions, EditorInput, toResource, IEditorStacksModel, IEditorGroup, IEditorIdentifier, IEditorCloseEvent, GroupIdentifier, IStacksModelChangeEvent, IWorkbenchEditorConfiguration, EditorOpenPositioning, SideBySideEditorInput } from 'vs/workbench/common/editor'; import URI from 'vs/base/common/uri'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; @@ -17,7 +17,7 @@ import { Registry } from 'vs/platform/platform'; import { Position, Direction } from 'vs/platform/editor/common/editor'; import { ResourceMap } from 'vs/base/common/map'; -export interface GroupEvent extends IGroupEvent { +export interface EditorCloseEvent extends IEditorCloseEvent { editor: EditorInput; } @@ -63,7 +63,7 @@ export class EditorGroup implements IEditorGroup { private _onEditorActivated: Emitter; private _onEditorOpened: Emitter; - private _onEditorClosed: Emitter; + private _onEditorClosed: Emitter; private _onEditorDisposed: Emitter; private _onEditorDirty: Emitter; private _onEditorLabelChange: Emitter; @@ -88,7 +88,7 @@ export class EditorGroup implements IEditorGroup { this._onEditorActivated = new Emitter(); this._onEditorOpened = new Emitter(); - this._onEditorClosed = new Emitter(); + this._onEditorClosed = new Emitter(); this._onEditorDisposed = new Emitter(); this._onEditorDirty = new Emitter(); this._onEditorLabelChange = new Emitter(); @@ -143,7 +143,7 @@ export class EditorGroup implements IEditorGroup { return this._onEditorOpened.event; } - public get onEditorClosed(): Event { + public get onEditorClosed(): Event { return this._onEditorClosed.event; } @@ -376,7 +376,7 @@ export class EditorGroup implements IEditorGroup { this.splice(index, true); // Event - this.fireEvent(this._onEditorClosed, { editor, pinned, index }, true); + this.fireEvent(this._onEditorClosed, { editor, pinned, index, group: this }, true); } public closeEditors(except: EditorInput, direction?: Direction): void { @@ -507,7 +507,7 @@ export class EditorGroup implements IEditorGroup { return !this.matches(this.preview, editor); } - private fireEvent(emitter: Emitter, arg2: EditorInput | GroupEvent, isStructuralChange: boolean): void { + private fireEvent(emitter: Emitter, arg2: EditorInput | EditorCloseEvent, isStructuralChange: boolean): void { emitter.fire(arg2); if (isStructuralChange) { @@ -699,12 +699,15 @@ export class EditorStacksModel implements IEditorStacksModel { private _onGroupActivated: Emitter; private _onGroupDeactivated: Emitter; private _onGroupRenamed: Emitter; + private _onEditorDisposed: Emitter; private _onEditorDirty: Emitter; private _onEditorLabelChange: Emitter; private _onEditorOpened: Emitter; - private _onWillCloseEditor: Emitter; - private _onEditorClosed: Emitter; + + private _onWillCloseEditor: Emitter; + private _onEditorClosed: Emitter; + private _onModelChanged: Emitter; constructor( @@ -729,8 +732,8 @@ export class EditorStacksModel implements IEditorStacksModel { this._onEditorDirty = new Emitter(); this._onEditorLabelChange = new Emitter(); this._onEditorOpened = new Emitter(); - this._onWillCloseEditor = new Emitter(); - this._onEditorClosed = new Emitter(); + this._onWillCloseEditor = new Emitter(); + this._onEditorClosed = new Emitter(); this.toDispose.push(this._onGroupOpened, this._onGroupClosed, this._onGroupActivated, this._onGroupDeactivated, this._onGroupMoved, this._onGroupRenamed, this._onModelChanged, this._onEditorDisposed, this._onEditorDirty, this._onEditorLabelChange, this._onEditorClosed, this._onWillCloseEditor); @@ -785,11 +788,11 @@ export class EditorStacksModel implements IEditorStacksModel { return this._onEditorOpened.event; } - public get onWillCloseEditor(): Event { + public get onWillCloseEditor(): Event { return this._onWillCloseEditor.event; } - public get onEditorClosed(): Event { + public get onEditorClosed(): Event { return this._onEditorClosed.event; } @@ -1161,7 +1164,7 @@ export class EditorStacksModel implements IEditorStacksModel { unbind.push(group.onEditorStateChanged(editor => this._onModelChanged.fire({ group, editor }))); unbind.push(group.onEditorOpened(editor => this._onEditorOpened.fire({ editor, group }))); unbind.push(group.onEditorClosed(event => { - this._onWillCloseEditor.fire({ editor: event.editor, group }); + this._onWillCloseEditor.fire(event); this.handleOnEditorClosed(event); this._onEditorClosed.fire(event); })); @@ -1177,7 +1180,7 @@ export class EditorStacksModel implements IEditorStacksModel { return group; } - private handleOnEditorClosed(event: GroupEvent): void { + private handleOnEditorClosed(event: EditorCloseEvent): void { const editor = event.editor; const editorsToClose = [editor]; diff --git a/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts b/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts index c624ee237af74..1dc4be93f8379 100644 --- a/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts +++ b/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts @@ -14,7 +14,7 @@ import { Action } from 'vs/base/common/actions'; import { VIEWLET_ID, TEXT_FILE_EDITOR_ID } from 'vs/workbench/parts/files/common/files'; import { ITextFileEditorModel, ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor'; -import { EditorOptions, TextEditorOptions, IEditorIdentifier } from 'vs/workbench/common/editor'; +import { EditorOptions, TextEditorOptions, IEditorCloseEvent } from 'vs/workbench/common/editor'; import { BinaryEditorModel } from 'vs/workbench/common/editor/binaryEditorModel'; import { FileEditorInput } from 'vs/workbench/parts/files/common/editors/fileEditorInput'; import { ExplorerViewlet } from 'vs/workbench/parts/files/browser/explorerViewlet'; @@ -70,7 +70,7 @@ export class TextFileEditor extends BaseTextEditor { } } - private onWillCloseEditor(e: IEditorIdentifier): void { + private onWillCloseEditor(e: IEditorCloseEvent): void { if (e.editor === this.input && this.position === this.editorGroupService.getStacksModel().positionOfGroup(e.group)) { this.doSaveTextEditorViewState(this.input); } diff --git a/src/vs/workbench/services/history/browser/history.ts b/src/vs/workbench/services/history/browser/history.ts index e745057fb92f3..c70df9fbe3391 100644 --- a/src/vs/workbench/services/history/browser/history.ts +++ b/src/vs/workbench/services/history/browser/history.ts @@ -11,7 +11,7 @@ import objects = require('vs/base/common/objects'); import URI from 'vs/base/common/uri'; import { IEditor } from 'vs/editor/common/editorCommon'; import { IEditor as IBaseEditor, IEditorInput, ITextEditorOptions, IResourceInput } from 'vs/platform/editor/common/editor'; -import { EditorInput, IGroupEvent, IEditorRegistry, Extensions, toResource, IEditorGroup } from 'vs/workbench/common/editor'; +import { EditorInput, IEditorCloseEvent, IEditorRegistry, Extensions, toResource, IEditorGroup } from 'vs/workbench/common/editor'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { FileChangesEvent, IFileService, FileChangeType } from 'vs/platform/files/common/files'; @@ -214,7 +214,7 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic } } - private onEditorClosed(event: IGroupEvent): void { + private onEditorClosed(event: IEditorCloseEvent): void { // Track closing of pinned editor to support to reopen closed editors if (event.pinned) { diff --git a/src/vs/workbench/test/browser/editorStacksModel.test.ts b/src/vs/workbench/test/browser/editorStacksModel.test.ts index 0593fc06d5410..8d96c2e5c807e 100644 --- a/src/vs/workbench/test/browser/editorStacksModel.test.ts +++ b/src/vs/workbench/test/browser/editorStacksModel.test.ts @@ -6,8 +6,8 @@ 'use strict'; import * as assert from 'assert'; -import { EditorStacksModel, EditorGroup, GroupEvent } from 'vs/workbench/common/editor/editorStacksModel'; -import { EditorInput, IFileEditorInput, IEditorIdentifier, IEditorGroup, IStacksModelChangeEvent, IEditorRegistry, Extensions as EditorExtensions, IEditorInputFactory, IGroupEvent } from 'vs/workbench/common/editor'; +import { EditorStacksModel, EditorGroup, EditorCloseEvent } from 'vs/workbench/common/editor/editorStacksModel'; +import { EditorInput, IFileEditorInput, IEditorIdentifier, IEditorGroup, IStacksModelChangeEvent, IEditorRegistry, Extensions as EditorExtensions, IEditorInputFactory, IEditorCloseEvent } from 'vs/workbench/common/editor'; import URI from 'vs/base/common/uri'; import { TestStorageService, TestLifecycleService, TestContextService } from 'vs/workbench/test/workbenchTestServices'; import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; @@ -47,14 +47,14 @@ interface ModelEvents { renamed: IEditorGroup[]; disposed: IEditorIdentifier[]; changed: IStacksModelChangeEvent[]; - editorClosed: IGroupEvent[]; - editorWillClose: IEditorIdentifier[]; + editorClosed: IEditorCloseEvent[]; + editorWillClose: IEditorCloseEvent[]; } interface GroupEvents { opened: EditorInput[]; activated: EditorInput[]; - closed: GroupEvent[]; + closed: EditorCloseEvent[]; pinned: EditorInput[]; unpinned: EditorInput[]; moved: EditorInput[]; From 3a89761e8c69a28ba050c578e3165074aa549370 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 10 May 2017 19:38:14 +0200 Subject: [PATCH 0398/2747] Fixes #24714: Regular expression with ^ in search & replace --- .../editor/contrib/find/common/findModel.ts | 10 +++---- .../find/test/common/findController.test.ts | 27 +++++++++++++++++++ 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/src/vs/editor/contrib/find/common/findModel.ts b/src/vs/editor/contrib/find/common/findModel.ts index ceac616aafa60..526a2ea3cec2c 100644 --- a/src/vs/editor/contrib/find/common/findModel.ts +++ b/src/vs/editor/contrib/find/common/findModel.ts @@ -277,13 +277,13 @@ export class FindModelBoundToEditorModel { } private _moveToNextMatch(after: Position): void { - let nextMatch = this._getNextMatch(after, false); + let nextMatch = this._getNextMatch(after, false, true); if (nextMatch) { this._setCurrentFindMatch(nextMatch.range); } } - private _getNextMatch(after: Position, captureMatches: boolean, isRecursed: boolean = false): editorCommon.FindMatch { + private _getNextMatch(after: Position, captureMatches: boolean, forceMove: boolean, isRecursed: boolean = false): editorCommon.FindMatch { if (this._cannotFind()) { return null; } @@ -308,7 +308,7 @@ export class FindModelBoundToEditorModel { let nextMatch = model.findNextMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord, captureMatches); - if (nextMatch && nextMatch.range.isEmpty() && nextMatch.range.getStartPosition().equals(position)) { + if (forceMove && nextMatch && nextMatch.range.isEmpty() && nextMatch.range.getStartPosition().equals(position)) { // Looks like we're stuck at this position, unacceptable! let isUsingLineStops = this._state.isRegex && ( @@ -337,7 +337,7 @@ export class FindModelBoundToEditorModel { } if (!isRecursed && !searchRange.containsRange(nextMatch.range)) { - return this._getNextMatch(nextMatch.range.getEndPosition(), captureMatches, true); + return this._getNextMatch(nextMatch.range.getEndPosition(), captureMatches, forceMove, true); } return nextMatch; @@ -361,7 +361,7 @@ export class FindModelBoundToEditorModel { let replacePattern = this._getReplacePattern(); let selection = this._editor.getSelection(); - let nextMatch = this._getNextMatch(selection.getStartPosition(), replacePattern.hasReplacementPatterns); + let nextMatch = this._getNextMatch(selection.getStartPosition(), replacePattern.hasReplacementPatterns, false); if (nextMatch) { if (selection.equalsRange(nextMatch.range)) { // selection sits on a find match => replace it! diff --git a/src/vs/editor/contrib/find/test/common/findController.test.ts b/src/vs/editor/contrib/find/test/common/findController.test.ts index 13d26d2dde1f2..93825e61b9680 100644 --- a/src/vs/editor/contrib/find/test/common/findController.test.ts +++ b/src/vs/editor/contrib/find/test/common/findController.test.ts @@ -444,6 +444,33 @@ suite('FindController', () => { }); }); + test('issue #24714: Regular expression with ^ in search & replace', () => { + withMockCodeEditor([ + '', + 'line2', + 'line3' + ], { serviceCollection: serviceCollection }, (editor, cursor) => { + + let findController = editor.registerAndInstantiateContribution(TestFindController); + + let startFindAction = new StartFindAction(); + startFindAction.run(null, editor); + + findController.getState().change({ searchString: '^', replaceString: 'x', isRegex: true }, false); + findController.moveToNextMatch(); + + assert.deepEqual(editor.getSelections().map(fromRange), [ + [2, 1, 2, 1] + ]); + + findController.replace(); + + assert.deepEqual(editor.getValue(), '\nxline2\nline3'); + + findController.dispose(); + }); + }); + function toArray(historyNavigator: HistoryNavigator): string[] { let result = []; historyNavigator.first(); From 79e83a096cfd397b12e22caf461e18a25767006e Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 10 May 2017 11:03:55 -0700 Subject: [PATCH 0399/2747] correct afterEnterText of selection --- src/vs/editor/common/modes/languageConfigurationRegistry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/common/modes/languageConfigurationRegistry.ts b/src/vs/editor/common/modes/languageConfigurationRegistry.ts index c4c5ee6a9e1c6..dcac212847625 100644 --- a/src/vs/editor/common/modes/languageConfigurationRegistry.ts +++ b/src/vs/editor/common/modes/languageConfigurationRegistry.ts @@ -289,7 +289,7 @@ export class LanguageConfigurationRegistryImpl { afterEnterText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset); } else { let endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber); - afterEnterText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - endScopedLineTokens.firstCharOffset); + afterEnterText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1); } let lineNumber = range.startLineNumber; From 186a9a5e17aea730dfcb9a2fa93d98ed834fa51b Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 10 May 2017 21:35:41 +0200 Subject: [PATCH 0400/2747] Fixes #6478: Cancel drag-select or drag-and-drop if a non modifier key is pressed --- .../editor/browser/controller/mouseHandler.ts | 26 ++++++++----------- src/vs/editor/browser/editorDom.ts | 20 +++++++++++++- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/src/vs/editor/browser/controller/mouseHandler.ts b/src/vs/editor/browser/controller/mouseHandler.ts index 674dbf1c09049..c88d807bc5320 100644 --- a/src/vs/editor/browser/controller/mouseHandler.ts +++ b/src/vs/editor/browser/controller/mouseHandler.ts @@ -265,20 +265,18 @@ export class MouseHandler extends ViewEventHandler { class MouseDownOperation extends Disposable { - private _context: ViewContext; - private _viewController: ViewController; - private _viewHelper: IPointerHandlerHelper; - private _createMouseTarget: (e: EditorMouseEvent, testEventTarget: boolean) => editorBrowser.IMouseTarget; - private _getMouseColumn: (e: EditorMouseEvent) => number; + private readonly _context: ViewContext; + private readonly _viewController: ViewController; + private readonly _viewHelper: IPointerHandlerHelper; + private readonly _createMouseTarget: (e: EditorMouseEvent, testEventTarget: boolean) => editorBrowser.IMouseTarget; + private readonly _getMouseColumn: (e: EditorMouseEvent) => number; - private _mouseMoveMonitor: GlobalEditorMouseMoveMonitor; + private readonly _mouseMoveMonitor: GlobalEditorMouseMoveMonitor; + private readonly _onScrollTimeout: TimeoutTimer; + private readonly _mouseState: MouseDownState; private _currentSelection: Selection; - private _mouseState: MouseDownState; - - private _onScrollTimeout: TimeoutTimer; private _isActive: boolean; - private _lastMouseEvent: EditorMouseEvent; constructor( @@ -295,15 +293,13 @@ class MouseDownOperation extends Disposable { this._createMouseTarget = createMouseTarget; this._getMouseColumn = getMouseColumn; - this._currentSelection = new Selection(1, 1, 1, 1); + this._mouseMoveMonitor = this._register(new GlobalEditorMouseMoveMonitor(this._viewHelper.viewDomNode)); + this._onScrollTimeout = this._register(new TimeoutTimer()); this._mouseState = new MouseDownState(); - this._onScrollTimeout = this._register(new TimeoutTimer()); + this._currentSelection = new Selection(1, 1, 1, 1); this._isActive = false; - this._lastMouseEvent = null; - - this._mouseMoveMonitor = this._register(new GlobalEditorMouseMoveMonitor(this._viewHelper.viewDomNode)); } public dispose(): void { diff --git a/src/vs/editor/browser/editorDom.ts b/src/vs/editor/browser/editorDom.ts index 78427527605bc..504c830dda130 100644 --- a/src/vs/editor/browser/editorDom.ts +++ b/src/vs/editor/browser/editorDom.ts @@ -146,17 +146,35 @@ export class GlobalEditorMouseMoveMonitor extends Disposable { private _editorViewDomNode: HTMLElement; private _globalMouseMoveMonitor: GlobalMouseMoveMonitor; + private _keydownListener: IDisposable; constructor(editorViewDomNode: HTMLElement) { super(); this._editorViewDomNode = editorViewDomNode; this._globalMouseMoveMonitor = this._register(new GlobalMouseMoveMonitor()); + this._keydownListener = null; } public startMonitoring(merger: EditorMouseEventMerger, mouseMoveCallback: (e: EditorMouseEvent) => void, onStopCallback: () => void): void { + + // Add a <> keydown event listener that will cancel the monitoring + // if something other than a modifier key is pressed + this._keydownListener = dom.addStandardDisposableListener(document, 'keydown', (e) => { + const kb = e.toKeybinding(); + if (kb.isModifierKey()) { + // Allow modifier keys + return; + } + this._globalMouseMoveMonitor.stopMonitoring(true); + }, true); + let myMerger: dom.IEventMerger = (lastEvent: EditorMouseEvent, currentEvent: MouseEvent): EditorMouseEvent => { return merger(lastEvent, new EditorMouseEvent(currentEvent, this._editorViewDomNode)); }; - this._globalMouseMoveMonitor.startMonitoring(myMerger, mouseMoveCallback, onStopCallback); + + this._globalMouseMoveMonitor.startMonitoring(myMerger, mouseMoveCallback, () => { + this._keydownListener.dispose(); + onStopCallback(); + }); } } From f182e9c2fbe131723d8287335d005be7108282bf Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 10 May 2017 12:51:17 -0700 Subject: [PATCH 0401/2747] Ensure correct language mode is used for onEnter (#26358) Fixes #26351 **bug** For the code ```js const x = |; ``` with the cursor at the `|`, on enter rules should change the code to: ```js const x = | ; ``` However we currently do not handle this case. The cause is the extra semicolon at the end of the line. This causes `getEnterAction` to think we are in a javascript context for the onenter rules instead of in a js-tags context **fix** Pass in the column of the cursor when getting the language id to use for the on enter rules instead of using the end of the line. This ensures we are in the `jsx-tags` language in the above case --- .../editor/common/modes/languageConfigurationRegistry.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/common/modes/languageConfigurationRegistry.ts b/src/vs/editor/common/modes/languageConfigurationRegistry.ts index dcac212847625..ae25a6533d4d7 100644 --- a/src/vs/editor/common/modes/languageConfigurationRegistry.ts +++ b/src/vs/editor/common/modes/languageConfigurationRegistry.ts @@ -270,7 +270,7 @@ export class LanguageConfigurationRegistryImpl { let indentation = this.getIndentationAtPosition(model, range.startLineNumber, range.startColumn); let ignoreCurrentLine = false; - let scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber); + let scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber, range.startColumn); let onEnterSupport = this._getOnEnterSupport(scopedLineTokens.languageId); if (!onEnterSupport) { return { @@ -398,11 +398,11 @@ export class LanguageConfigurationRegistryImpl { return lineText; } - private getScopedLineTokens(model: ITokenizedModel, lineNumber: number) { + private getScopedLineTokens(model: ITokenizedModel, lineNumber: number, columnNumber?: number) { model.forceTokenization(lineNumber); let lineTokens = model.getLineTokens(lineNumber); - let column = model.getLineMaxColumn(lineNumber); - let scopedLineTokens = createScopedLineTokens(lineTokens, column - 1); + let column = isNaN(columnNumber) ? model.getLineMaxColumn(lineNumber) - 1 : columnNumber; + let scopedLineTokens = createScopedLineTokens(lineTokens, column); return scopedLineTokens; } From 55961326477e89d0b0efa6bc876eefd046465ff9 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 10 May 2017 22:16:19 +0200 Subject: [PATCH 0402/2747] [theme] update overview ruler cursor and decorations colors on theme change --- .../overviewRuler/decorationsOverviewRuler.ts | 45 ++++++++----------- .../overviewRuler/overviewRulerImpl.ts | 5 ++- src/vs/editor/common/editorCommon.ts | 9 ---- .../editor/common/view/overviewZoneManager.ts | 9 ++-- .../common/view/overviewZoneManager.test.ts | 9 ++-- src/vs/platform/theme/common/themes.ts | 17 ------- 6 files changed, 32 insertions(+), 62 deletions(-) delete mode 100644 src/vs/platform/theme/common/themes.ts diff --git a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts index b55e1c8b65143..c64a856ba72e3 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import * as themes from 'vs/platform/theme/common/themes'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { ViewPart } from 'vs/editor/browser/view/viewPart'; import { OverviewRulerImpl } from 'vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl'; @@ -15,32 +14,20 @@ import { TokenizationRegistry } from 'vs/editor/common/modes'; import { IDisposable } from 'vs/base/common/lifecycle'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; -import { editorOverviewRulerBorder } from 'vs/editor/common/view/editorColorRegistry'; - -function getThemeType(themeId: string): editorCommon.ThemeType { - if (themes.isHighContrastTheme(themeId)) { - return editorCommon.ThemeType.HighContrast; - } - if (themes.isLightTheme(themeId)) { - return editorCommon.ThemeType.Light; - } - return editorCommon.ThemeType.Dark; -} +import { editorOverviewRulerBorder, editorCursor } from 'vs/editor/common/view/editorColorRegistry'; export class DecorationsOverviewRuler extends ViewPart { static MIN_DECORATION_HEIGHT = 6; static MAX_DECORATION_HEIGHT = 60; - private static _CURSOR_COLOR = 'rgba(0, 0, 102, 0.8)'; - private static _CURSOR_COLOR_DARK = 'rgba(152, 152, 152, 0.8)'; - private readonly _tokensColorTrackerListener: IDisposable; private _overviewRuler: OverviewRulerImpl; private _renderBorder: boolean; private _borderColor: string; + private _cursorColor: string; private _shouldUpdateDecorations: boolean; private _shouldUpdateCursorPosition: boolean; @@ -65,15 +52,11 @@ export class DecorationsOverviewRuler extends ViewPart { (lineNumber: number) => this._context.viewLayout.getVerticalOffsetForLineNumber(lineNumber) ); this._overviewRuler.setLanesCount(this._context.configuration.editor.viewInfo.overviewRulerLanes, false); - let theme = this._context.configuration.editor.viewInfo.theme; - this._overviewRuler.setThemeType(getThemeType(theme), false); this._overviewRuler.setLayout(this._context.configuration.editor.layoutInfo.overviewRuler, false); this._renderBorder = this._context.configuration.editor.viewInfo.overviewRulerBorder; - let borderColor = this._context.theme.getColor(editorOverviewRulerBorder); - this._borderColor = borderColor ? borderColor.toString() : null; - + this._updateColors(); this._updateBackground(false); this._tokensColorTrackerListener = TokenizationRegistry.onDidChange((e) => { @@ -129,7 +112,6 @@ export class DecorationsOverviewRuler extends ViewPart { this._renderBorder = this._context.configuration.editor.viewInfo.overviewRulerBorder; this._hideCursor = this._context.configuration.editor.viewInfo.hideCursorInOverviewRuler; this._shouldUpdateCursorPosition = true; - this._overviewRuler.setThemeType(getThemeType(this._context.configuration.editor.viewInfo.theme), false); this._updateBackground(false); } @@ -168,8 +150,9 @@ export class DecorationsOverviewRuler extends ViewPart { } public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { - let borderColor = this._context.theme.getColor(editorOverviewRulerBorder); - this._borderColor = borderColor ? borderColor.toString() : null; + this._updateColors(); + this._shouldUpdateDecorations = true; + this._shouldUpdateCursorPosition = true; return true; } @@ -179,6 +162,16 @@ export class DecorationsOverviewRuler extends ViewPart { return this._overviewRuler.getDomNode(); } + private _updateColors() { + let borderColor = this._context.theme.getColor(editorOverviewRulerBorder); + this._borderColor = borderColor ? borderColor.toString() : null; + + let cursorColor = this._context.theme.getColor(editorCursor); + this._cursorColor = cursorColor ? cursorColor.transparent(0.7).toString() : null; + + this._overviewRuler.setThemeType(this._context.theme.type, false); + } + private _createZonesFromDecorations(): OverviewRulerZone[] { let decorations = this._context.model.getAllOverviewRulerDecorations(); let zones: OverviewRulerZone[] = []; @@ -211,9 +204,9 @@ export class DecorationsOverviewRuler extends ViewPart { cursor.lineNumber, editorCommon.OverviewRulerLane.Full, 2, - DecorationsOverviewRuler._CURSOR_COLOR, - DecorationsOverviewRuler._CURSOR_COLOR_DARK, - DecorationsOverviewRuler._CURSOR_COLOR_DARK + this._cursorColor, + this._cursorColor, + this._cursorColor )); } diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts index e1472ac77729f..617a850a1d711 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts @@ -5,10 +5,11 @@ 'use strict'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; -import { OverviewRulerLane, ThemeType } from 'vs/editor/common/editorCommon'; +import { OverviewRulerLane } from 'vs/editor/common/editorCommon'; import { OverviewZoneManager, ColorZone, OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; import { Color } from 'vs/base/common/color'; import { OverviewRulerPosition } from 'vs/editor/common/config/editorOptions'; +import { ThemeType, LIGHT } from 'vs/platform/theme/common/themeService'; export class OverviewRulerImpl { @@ -39,7 +40,7 @@ export class OverviewRulerImpl { this._zoneManager = new OverviewZoneManager(getVerticalOffsetForLine); this._zoneManager.setMinimumHeight(minimumHeight); this._zoneManager.setMaximumHeight(maximumHeight); - this._zoneManager.setThemeType(ThemeType.Light); + this._zoneManager.setThemeType(LIGHT); this._zoneManager.setDOMWidth(0); this._zoneManager.setDOMHeight(0); this._zoneManager.setOuterHeight(scrollHeight); diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index 9581fa63cfbe6..2852bb8dbea9e 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -2067,12 +2067,3 @@ export var Handler = { LineInsertAfter: 'lineInsertAfter', LineBreakInsert: 'lineBreakInsert', }; - -/** - * @internal - */ -export const enum ThemeType { - Light = 1, - Dark = 2, - HighContrast = 3 -} diff --git a/src/vs/editor/common/view/overviewZoneManager.ts b/src/vs/editor/common/view/overviewZoneManager.ts index 1db950495ccc2..a9d9ec99a1e74 100644 --- a/src/vs/editor/common/view/overviewZoneManager.ts +++ b/src/vs/editor/common/view/overviewZoneManager.ts @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { OverviewRulerLane, ThemeType } from 'vs/editor/common/editorCommon'; +import { OverviewRulerLane } from 'vs/editor/common/editorCommon'; +import { ThemeType, DARK, HIGH_CONTRAST, LIGHT } from 'vs/platform/theme/common/themeService'; export class ColorZone { _colorZoneBrand: void; @@ -57,9 +58,9 @@ export class OverviewRulerZone { public getColor(themeType: ThemeType): string { switch (themeType) { - case ThemeType.HighContrast: + case HIGH_CONTRAST: return this._hcColor; - case ThemeType.Dark: + case DARK: return this._darkColor; } return this._color; @@ -139,7 +140,7 @@ export class OverviewZoneManager { this._outerHeight = 0; this._maximumHeight = 0; this._minimumHeight = 0; - this._themeType = ThemeType.Light; + this._themeType = LIGHT; this._pixelRatio = 1; this._lastAssignedId = 0; diff --git a/src/vs/editor/test/common/view/overviewZoneManager.test.ts b/src/vs/editor/test/common/view/overviewZoneManager.test.ts index 2ebe4035af1ef..1cfc1a4a2b123 100644 --- a/src/vs/editor/test/common/view/overviewZoneManager.test.ts +++ b/src/vs/editor/test/common/view/overviewZoneManager.test.ts @@ -5,8 +5,9 @@ 'use strict'; import * as assert from 'assert'; -import { OverviewRulerLane, ThemeType } from 'vs/editor/common/editorCommon'; +import { OverviewRulerLane } from 'vs/editor/common/editorCommon'; import { OverviewZoneManager, ColorZone, OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; +import { LIGHT } from 'vs/platform/theme/common/themeService'; suite('Editor View - OverviewZoneManager', () => { @@ -16,7 +17,7 @@ suite('Editor View - OverviewZoneManager', () => { let manager = new OverviewZoneManager((lineNumber) => LINE_HEIGHT * lineNumber); manager.setMinimumHeight(6); manager.setMaximumHeight(6); - manager.setThemeType(ThemeType.Light); + manager.setThemeType(LIGHT); manager.setDOMWidth(30); manager.setDOMHeight(600); manager.setOuterHeight(LINE_COUNT * LINE_HEIGHT); @@ -46,7 +47,7 @@ suite('Editor View - OverviewZoneManager', () => { let manager = new OverviewZoneManager((lineNumber) => LINE_HEIGHT * lineNumber); manager.setMinimumHeight(6); manager.setMaximumHeight(6); - manager.setThemeType(ThemeType.Light); + manager.setThemeType(LIGHT); manager.setDOMWidth(30); manager.setDOMHeight(300); manager.setOuterHeight(LINE_COUNT * LINE_HEIGHT); @@ -75,7 +76,7 @@ suite('Editor View - OverviewZoneManager', () => { let manager = new OverviewZoneManager((lineNumber) => LINE_HEIGHT * lineNumber); manager.setMinimumHeight(6); manager.setMaximumHeight(6); - manager.setThemeType(ThemeType.Light); + manager.setThemeType(LIGHT); manager.setDOMWidth(30); manager.setDOMHeight(300); manager.setOuterHeight(LINE_COUNT * LINE_HEIGHT); diff --git a/src/vs/platform/theme/common/themes.ts b/src/vs/platform/theme/common/themes.ts deleted file mode 100644 index 072779016a366..0000000000000 --- a/src/vs/platform/theme/common/themes.ts +++ /dev/null @@ -1,17 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -export function isLightTheme(themeId: string) { - return /vs($| )/.test(themeId); -} - -export function isDarkTheme(themeId: string) { - return /vs-dark($| )/.test(themeId); -} - -export function isHighContrastTheme(themeId: string) { - return /hc-black($| )/.test(themeId); -} \ No newline at end of file From 0b7f4425ef0fee913f9bfeafd29fee43a446075c Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Wed, 10 May 2017 13:37:52 -0700 Subject: [PATCH 0403/2747] Correct LC_ALL. Resolves #26227 --- extensions/git/src/git.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 4adc617a3ebb0..751fbccc15eaa 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -386,7 +386,7 @@ export class Git { options.env = assign({}, process.env, this.env, options.env || {}, { VSCODE_GIT_COMMAND: args[0], - LC_ALL: 'en_US', + LC_ALL: 'en_US.UTF-8', LANG: 'en_US.UTF-8' }); @@ -954,4 +954,4 @@ export class Repository { return { hash: match[1], message: match[2] }; } -} \ No newline at end of file +} From 1ab29cdbcf45ddda95b9b2bbeeaaa39b6a447d94 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 10 May 2017 22:49:40 +0200 Subject: [PATCH 0404/2747] Fixes #24047: Use the first select line as the source for the comment line token --- .../comment/common/lineCommentCommand.ts | 35 +++--- .../test/common/lineCommentCommand.test.ts | 110 ++++++++++++++++++ 2 files changed, 123 insertions(+), 22 deletions(-) diff --git a/src/vs/editor/contrib/comment/common/lineCommentCommand.ts b/src/vs/editor/contrib/comment/common/lineCommentCommand.ts index 9cf5de8659a56..3311aa6ffae5d 100644 --- a/src/vs/editor/contrib/comment/common/lineCommentCommand.ts +++ b/src/vs/editor/contrib/comment/common/lineCommentCommand.ts @@ -63,34 +63,25 @@ export class LineCommentCommand implements editorCommon.ICommand { * Returns null if any of the lines doesn't support a line comment string. */ public static _gatherPreflightCommentStrings(model: editorCommon.ITokenizedModel, startLineNumber: number, endLineNumber: number): ILinePreflightData[] { - let commentStrForLanguage: string[] = []; - let lines: ILinePreflightData[] = []; - for (let i = 0, lineCount = endLineNumber - startLineNumber + 1; i < lineCount; i++) { - let lineNumber = startLineNumber + i; - model.forceTokenization(lineNumber); - let languageId = model.getLanguageIdAtPosition(lineNumber, 1); - - // Find the commentStr for this line, if none is found then bail out: we cannot do line comments - let commentStr: string; - if (commentStrForLanguage[languageId]) { - commentStr = commentStrForLanguage[languageId]; - } else { - let config = LanguageConfigurationRegistry.getComments(languageId); - commentStr = (config ? config.lineCommentToken : null); - if (!commentStr) { - // Mode does not support line comments - return null; - } - commentStrForLanguage[languageId] = commentStr; - } + model.forceTokenization(startLineNumber); + const languageId = model.getLanguageIdAtPosition(startLineNumber, 1); - lines.push({ + const config = LanguageConfigurationRegistry.getComments(languageId); + const commentStr = (config ? config.lineCommentToken : null); + if (!commentStr) { + // Mode does not support line comments + return null; + } + + let lines: ILinePreflightData[] = []; + for (let i = 0, lineCount = endLineNumber - startLineNumber + 1; i < lineCount; i++) { + lines[i] = { ignore: false, commentStr: commentStr, commentStrOffset: 0, commentStrLength: commentStr.length - }); + }; } return lines; diff --git a/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts b/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts index 802efd52419fd..1326d8bda3392 100644 --- a/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts +++ b/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts @@ -9,6 +9,12 @@ 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 { CommentMode } from 'vs/editor/test/common/commentMode'; +import * as modes from 'vs/editor/common/modes'; +import { NULL_STATE } from 'vs/editor/common/modes/nullMode'; +import { TokenizationResult2 } from 'vs/editor/common/core/token'; +import { MockMode } from "vs/editor/test/common/mocks/mockMode"; +import { CommentRule } from "vs/editor/common/modes/languageConfiguration"; +import { LanguageConfigurationRegistry } from "vs/editor/common/modes/languageConfigurationRegistry"; suite('Editor Contrib - Line Comment Command', () => { @@ -827,4 +833,108 @@ suite('Editor Contrib - Line Comment As Block Comment 2', () => { }); }); +suite('Editor Contrib - Line Comment in mixed modes', () => { + + const OUTER_LANGUAGE_ID = new modes.LanguageIdentifier('outerMode', 3); + const INNER_LANGUAGE_ID = new modes.LanguageIdentifier('innerMode', 4); + + class OuterMode extends MockMode { + constructor(commentsConfig: CommentRule) { + super(OUTER_LANGUAGE_ID); + this._register(LanguageConfigurationRegistry.register(this.getLanguageIdentifier(), { + comments: commentsConfig + })); + + this._register(modes.TokenizationRegistry.register(this.getLanguageIdentifier().language, { + getInitialState: (): modes.IState => NULL_STATE, + tokenize: undefined, + tokenize2: (line: string, state: modes.IState): TokenizationResult2 => { + let languageId = (/^ /.test(line) ? INNER_LANGUAGE_ID : OUTER_LANGUAGE_ID); + + let tokens = new Uint32Array(1 << 1); + tokens[(0 << 1)] = 0; + tokens[(0 << 1) + 1] = ( + (modes.ColorId.DefaultForeground << modes.MetadataConsts.FOREGROUND_OFFSET) + | (languageId.id << modes.MetadataConsts.LANGUAGEID_OFFSET) + ); + return new TokenizationResult2(tokens, state); + } + })); + } + } + + class InnerMode extends MockMode { + constructor(commentsConfig: CommentRule) { + super(INNER_LANGUAGE_ID); + this._register(LanguageConfigurationRegistry.register(this.getLanguageIdentifier(), { + comments: commentsConfig + })); + } + } + + function testLineCommentCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void { + let outerMode = new OuterMode({ lineComment: '//', blockComment: ['/*', '*/'] }); + let innerMode = new InnerMode({ lineComment: null, blockComment: ['{/*', '*/}'] }); + testCommand( + lines, + outerMode.getLanguageIdentifier(), + selection, + (sel) => new LineCommentCommand(sel, 4, Type.Toggle), + expectedLines, + expectedSelection + ); + innerMode.dispose(); + outerMode.dispose(); + } + test('issue #24047 (part 1): Commenting code in JSX files', () => { + testLineCommentCommand( + [ + 'import React from \'react\';', + 'const Loader = () => (', + '
', + ' Loading...', + '
', + ');', + 'export default Loader;' + ], + new Selection(1, 1, 7, 22), + [ + '// import React from \'react\';', + '// const Loader = () => (', + '//
', + '// Loading...', + '//
', + '// );', + '// export default Loader;' + ], + new Selection(1, 4, 7, 25), + ); + }); + + test('issue #24047 (part 2): Commenting code in JSX files', () => { + testLineCommentCommand( + [ + 'import React from \'react\';', + 'const Loader = () => (', + '
', + ' Loading...', + '
', + ');', + 'export default Loader;' + ], + new Selection(3, 4, 3, 4), + [ + 'import React from \'react\';', + 'const Loader = () => (', + ' {/*
*/}', + ' Loading...', + '
', + ');', + 'export default Loader;' + ], + new Selection(3, 7, 3, 7), + ); + }); + +}); From ce0c28a6d0ff25a3fe86130ec20783cadda0c2a7 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 10 May 2017 13:53:21 -0700 Subject: [PATCH 0405/2747] Fix onEnter Rules Language Mode When There is a Selection (#26410) Fixes #26406 **Bug** If there is an active selection, the on Enter rules may use the wrong language mode which results in the incorrect `afterEnterText`. See #26406 for an example of this case **Fix** Use language mode from the selection and correctly compute offset when grabbing `afterEnterText` --- src/vs/editor/common/modes/languageConfigurationRegistry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/common/modes/languageConfigurationRegistry.ts b/src/vs/editor/common/modes/languageConfigurationRegistry.ts index ae25a6533d4d7..1563ebc48de75 100644 --- a/src/vs/editor/common/modes/languageConfigurationRegistry.ts +++ b/src/vs/editor/common/modes/languageConfigurationRegistry.ts @@ -288,8 +288,8 @@ export class LanguageConfigurationRegistryImpl { if (range.isEmpty()) { afterEnterText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset); } else { - let endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber); - afterEnterText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1); + const endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn); + afterEnterText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset); } let lineNumber = range.startLineNumber; From 2aa11ada5e9c69963868e71640be8ace8ac28273 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 10 May 2017 15:52:10 -0700 Subject: [PATCH 0406/2747] Address VSCode component of #26415 --- extensions/typescript/src/features/previewer.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/extensions/typescript/src/features/previewer.ts b/extensions/typescript/src/features/previewer.ts index e5a8ef7f7e3a1..6fd8eb7e600d3 100644 --- a/extensions/typescript/src/features/previewer.ts +++ b/extensions/typescript/src/features/previewer.ts @@ -16,12 +16,24 @@ export function plain(parts: Proto.SymbolDisplayPart[]): string { export function tagsMarkdownPreview(tags: Proto.JSDocTagInfo[]): string { return (tags || []) - .map(tag => `*@${tag.name}*` + (tag.text ? ` — ${tag.text}` : '')) + .map(tag => { + const label = `*@${tag.name}*`; + if (!tag.text) { + return label; + } + return label + (tag.text.match(/\r\n|\n/g) ? '\n' + tag.text : ` — ${tag.text}`); + }) .join(' \n'); } export function tagsPlainPreview(tags: Proto.JSDocTagInfo[]): string { return (tags || []) - .map(tag => `@${tag.name}` + (tag.text ? ` — ${tag.text}` : '')) + .map(tag => { + const label = `@${tag.name}`; + if (!tag.text) { + return label; + } + return label + (tag.text.match(/\r\n|\n/g) ? '\n' + tag.text : ` — ${tag.text}`); + }) .join('\n'); } \ No newline at end of file From c047734f64e3420e949e5650ca7d59615da1f4a6 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Thu, 11 May 2017 00:54:42 +0200 Subject: [PATCH 0407/2747] node-debug@1.13.3 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index c4227104532e7..7bc920e9bbadf 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -41,7 +41,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.13.2' }, + { name: 'ms-vscode.node-debug', version: '1.13.3' }, { name: 'ms-vscode.node-debug2', version: '1.12.4' } ]; From 9587f8f379c6203c992aab37d36053111ebc384e Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 10 May 2017 16:32:09 -0700 Subject: [PATCH 0408/2747] Further tweaks to jsdoc tag rendering --- extensions/typescript/src/features/previewer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/typescript/src/features/previewer.ts b/extensions/typescript/src/features/previewer.ts index 6fd8eb7e600d3..80ca1c92617d0 100644 --- a/extensions/typescript/src/features/previewer.ts +++ b/extensions/typescript/src/features/previewer.ts @@ -21,9 +21,9 @@ export function tagsMarkdownPreview(tags: Proto.JSDocTagInfo[]): string { if (!tag.text) { return label; } - return label + (tag.text.match(/\r\n|\n/g) ? '\n' + tag.text : ` — ${tag.text}`); + return label + (tag.text.match(/\r\n|\n/g) ? ' \n' + tag.text : ` — ${tag.text}`); }) - .join(' \n'); + .join(' \n\n'); } export function tagsPlainPreview(tags: Proto.JSDocTagInfo[]): string { From 9cce34d94989482419cf2d339b7c77f4883481ea Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 10 May 2017 16:39:10 -0700 Subject: [PATCH 0409/2747] Improve plain text display of jsdocs tags --- .../typescript/src/features/completionItemProvider.ts | 3 +-- extensions/typescript/src/features/previewer.ts | 9 +++++++-- .../typescript/src/features/signatureHelpProvider.ts | 5 +---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/extensions/typescript/src/features/completionItemProvider.ts b/extensions/typescript/src/features/completionItemProvider.ts index d5f4bd4477c65..f65d27f5009e3 100644 --- a/extensions/typescript/src/features/completionItemProvider.ts +++ b/extensions/typescript/src/features/completionItemProvider.ts @@ -243,8 +243,7 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP const detail = details[0]; item.detail = Previewer.plain(detail.displayParts); - const tags = Previewer.tagsPlainPreview(detail.tags); - item.documentation = Previewer.plain(detail.documentation) + (tags ? '\n\n' + tags : ''); + item.documentation = Previewer.plainDocumentation(detail.documentation, detail.tags); if (detail && this.config.useCodeSnippetsOnMethodSuggest && (item.kind === CompletionItemKind.Function || item.kind === CompletionItemKind.Method)) { return this.isValidFunctionCompletionContext(filepath, item.position).then(shouldCompleteFunction => { diff --git a/extensions/typescript/src/features/previewer.ts b/extensions/typescript/src/features/previewer.ts index 80ca1c92617d0..d02ab69550bb4 100644 --- a/extensions/typescript/src/features/previewer.ts +++ b/extensions/typescript/src/features/previewer.ts @@ -26,7 +26,7 @@ export function tagsMarkdownPreview(tags: Proto.JSDocTagInfo[]): string { .join(' \n\n'); } -export function tagsPlainPreview(tags: Proto.JSDocTagInfo[]): string { +function tagsPlainPreview(tags: Proto.JSDocTagInfo[]): string { return (tags || []) .map(tag => { const label = `@${tag.name}`; @@ -35,5 +35,10 @@ export function tagsPlainPreview(tags: Proto.JSDocTagInfo[]): string { } return label + (tag.text.match(/\r\n|\n/g) ? '\n' + tag.text : ` — ${tag.text}`); }) - .join('\n'); + .join('\n\ngit'); +} + +export function plainDocumentation(documentation: Proto.SymbolDisplayPart[], tags: Proto.JSDocTagInfo[]): string { + const parts = [plain(documentation), tagsPlainPreview(tags)]; + return parts.filter(x => x).join('\n\n'); } \ No newline at end of file diff --git a/extensions/typescript/src/features/signatureHelpProvider.ts b/extensions/typescript/src/features/signatureHelpProvider.ts index dc7214da7f630..b8247e03154ad 100644 --- a/extensions/typescript/src/features/signatureHelpProvider.ts +++ b/extensions/typescript/src/features/signatureHelpProvider.ts @@ -61,10 +61,7 @@ export default class TypeScriptSignatureHelpProvider implements SignatureHelpPro } }); signature.label += Previewer.plain(item.suffixDisplayParts); - - const tags = Previewer.tagsPlainPreview(item.tags); - signature.documentation = Previewer.plain(item.documentation) + (tags ? '\n\n' + tags : ''); - + signature.documentation = Previewer.plainDocumentation(item.documentation, item.tags); result.signatures.push(signature); }); From 5057c95e6b5a43ddecee0d6f663764b7c80f6c95 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 11 May 2017 07:54:36 +0200 Subject: [PATCH 0410/2747] some electron deprecation fixes --- build/npm/preinstall.js | 2 +- scripts/npm.bat | 2 +- scripts/npm.sh | 2 +- src/typings/electron.d.ts | 4 ++-- src/vs/workbench/electron-browser/bootstrap/index.js | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/npm/preinstall.js b/build/npm/preinstall.js index 6a65998d3f6ba..8bd27204e3504 100644 --- a/build/npm/preinstall.js +++ b/build/npm/preinstall.js @@ -6,7 +6,7 @@ const path = require('path'); const cp = require('child_process'); -if (process.env['npm_config_disturl'] !== 'https://atom.io/download/atom-shell') { +if (process.env['npm_config_disturl'] !== 'https://atom.io/download/electron') { console.error("You can't use plain npm to install Code's dependencies."); console.error( /^win/.test(process.platform) diff --git a/scripts/npm.bat b/scripts/npm.bat index 943404a1078b9..aeb8e93c90c9f 100644 --- a/scripts/npm.bat +++ b/scripts/npm.bat @@ -1,7 +1,7 @@ @echo off setlocal -set npm_config_disturl="https://atom.io/download/atom-shell" +set npm_config_disturl="https://atom.io/download/electron" for /f "tokens=2 delims=:, " %%a in ('findstr /R /C:"\"electronVersion\":.*" "%~dp0..\package.json"') do set npm_config_target=%%~a set npm_config_arch="ia32" set npm_config_runtime="electron" diff --git a/scripts/npm.sh b/scripts/npm.sh index b56ec27c7fd3d..69c6d0c48aec6 100755 --- a/scripts/npm.sh +++ b/scripts/npm.sh @@ -22,7 +22,7 @@ ELECTRON_VERSION=$( ELECTRON_GYP_HOME=~/.electron-gyp mkdir -p $ELECTRON_GYP_HOME -npm_config_disturl=https://atom.io/download/atom-shell \ +npm_config_disturl=https://atom.io/download/electron \ npm_config_target=$ELECTRON_VERSION \ npm_config_runtime=electron \ HOME=$ELECTRON_GYP_HOME \ diff --git a/src/typings/electron.d.ts b/src/typings/electron.d.ts index e85bb7d346fdf..5a1f5ea3430c0 100644 --- a/src/typings/electron.d.ts +++ b/src/typings/electron.d.ts @@ -4466,7 +4466,7 @@ declare namespace Electron { /** * Sets the maximum and minimum zoom level. */ - setZoomLevelLimits(minimumLevel: number, maximumLevel: number): void; + setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): void; /** * Executes the editing command undo in web page. */ @@ -5161,7 +5161,7 @@ declare namespace Electron { /** * Sets the maximum and minimum zoom level. */ - setZoomLevelLimits(minimumLevel: number, maximumLevel: number): void; + setVisualZoomLevelLimits(minimumLevel: number, maximumLevel: number): void; /** * Sets a provider for spell checking in input fields and text areas. */ diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index f320447cd9a00..e886c4a346942 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -148,7 +148,7 @@ function main() { // disable pinch zoom & apply zoom level early to avoid glitches const zoomLevel = configuration.zoomLevel; - webFrame.setZoomLevelLimits(1, 1); + webFrame.setVisualZoomLevelLimits(1, 1); if (typeof zoomLevel === 'number' && zoomLevel !== 0) { webFrame.setZoomLevel(zoomLevel); } From d64758f9b2c9748c5b9de4db205b377f89eac369 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 11 May 2017 09:14:55 +0200 Subject: [PATCH 0411/2747] win32 build --- build/tfs/win32/1_build.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index c11b72ae864c8..f3da6228d0d2b 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -1,9 +1,14 @@ +Param( + [string]$mixinPassword +) + . .\build\tfs\win32\lib.ps1 # npm install exec { & .\scripts\npm.bat install } # mixin +$env:VSCODE_MIXIN_PASSWORD = $mixinPassword exec { & npm run gulp -- mixin } # compile From f4023b382fa7491b9e986c0814ba1a2d79448c8c Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 11 May 2017 09:25:30 +0200 Subject: [PATCH 0412/2747] wire up tab completions with new controller --- .../parts/snippets/electron-browser/tabCompletion.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.ts b/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.ts index 47a8ea19198c3..c4a714a0210de 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.ts @@ -15,7 +15,7 @@ import { endsWith } from 'vs/base/common/strings'; import { IDisposable } from 'vs/base/common/lifecycle'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { CommonEditorRegistry, commonEditorContribution, EditorCommand } from 'vs/editor/common/editorCommonExtensions'; -import { SnippetController, CONTEXT_SNIPPET_MODE } from 'vs/editor/contrib/snippet/common/snippetController'; +import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { IConfigurationRegistry, Extensions as ConfigExt } from 'vs/platform/configuration/common/configurationRegistry'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; @@ -29,7 +29,7 @@ export class TabCompletionController implements editorCommon.IEditorContribution return editor.getContribution(TabCompletionController.ID); } - private _snippetController: SnippetController; + private _snippetController: SnippetController2; private _cursorChangeSubscription: IDisposable; private _currentSnippets: ISnippet[] = []; @@ -38,7 +38,7 @@ export class TabCompletionController implements editorCommon.IEditorContribution @IContextKeyService contextKeyService: IContextKeyService, @ISnippetsService snippetService: ISnippetsService ) { - this._snippetController = SnippetController.get(editor); + this._snippetController = SnippetController2.get(editor); const hasSnippets = TabCompletionController.ContextKey.bindTo(contextKeyService); this._cursorChangeSubscription = editor.onDidChangeCursorSelection(e => { @@ -76,7 +76,7 @@ export class TabCompletionController implements editorCommon.IEditorContribution performSnippetCompletions(): void { if (this._currentSnippets.length === 1) { const snippet = this._currentSnippets[0]; - this._snippetController.insertSnippet(snippet.codeSnippet, snippet.prefix.length, 0); + this._snippetController.insert(snippet.codeSnippet, snippet.prefix.length, 0); // } else { // todo@joh - show suggest widget with proposals } @@ -98,7 +98,7 @@ CommonEditorRegistry.registerEditorCommand(new TabCompletionCommand({ kbExpr: ContextKeyExpr.and( EditorContextKeys.textFocus, EditorContextKeys.tabDoesNotMoveFocus, - CONTEXT_SNIPPET_MODE.toNegated(), + SnippetController2.InSnippetMode.toNegated(), ContextKeyExpr.has('config.editor.tabCompletion') ), primary: KeyCode.Tab From bc0538294867b2f60b4d9841f87f3be49e58b6ca Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 11 May 2017 10:44:36 +0200 Subject: [PATCH 0413/2747] wire up most of the old snippet controller tests --- .../contrib/snippet/browser/editorSnippets.ts | 52 +- .../snippet/browser/snippetController2.ts | 7 +- .../test/browser/editorSnippets.test.ts | 5 +- .../browser/snippetController2.old.test.ts | 588 ++++++++++++++++++ 4 files changed, 637 insertions(+), 15 deletions(-) create mode 100644 src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts index 650b5018d1488..9d1fb8f41a125 100644 --- a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts +++ b/src/vs/editor/contrib/snippet/browser/editorSnippets.ts @@ -164,11 +164,9 @@ export class SnippetSession { const lineLeadingWhitespace = getLeadingWhitespace(line, 0, position.column - 1); const templateLines = template.split(/\r\n|\r|\n/); - for (let i = 0; i < templateLines.length; i++) { + for (let i = 1; i < templateLines.length; i++) { let templateLeadingWhitespace = getLeadingWhitespace(templateLines[i]); - if (templateLeadingWhitespace.length > 0) { - templateLines[i] = model.normalizeIndentation(lineLeadingWhitespace + templateLeadingWhitespace) + templateLines[i].substr(templateLeadingWhitespace.length); - } + templateLines[i] = model.normalizeIndentation(lineLeadingWhitespace + templateLeadingWhitespace) + templateLines[i].substr(templateLeadingWhitespace.length); } return templateLines.join(model.getEOL()); } @@ -219,6 +217,12 @@ export class SnippetSession { let edits: IIdentifiedSingleEditOperation[] = []; let model = this._editor.getModel(); + // know what text the overwrite[Before|After] extensions + // of the primary curser have selected because only when + // secondary selections extend to the same text we can grow them + let firstBeforeText = model.getValueInRange(SnippetSession.adjustSelection(model, this._editor.getSelection(), this._overwriteBefore, 0)); + let firstAfterText = model.getValueInRange(SnippetSession.adjustSelection(model, this._editor.getSelection(), 0, this._overwriteAfter)); + // sort selections by their start position but remeber // the original index. that allows you to create correct // offset-based selection logic without changing the @@ -228,17 +232,37 @@ export class SnippetSession { .sort((a, b) => Range.compareRangesUsingStarts(a.selection, b.selection)); for (const { selection, idx } of indexedSelection) { - const range = SnippetSession.adjustSelection(model, selection, this._overwriteBefore, this._overwriteAfter); - const start = range.getStartPosition(); + + // extend selection with the `overwriteBefore` and `overwriteAfter` and then + // compare if this matches the extensions of the primary selection + let extensionBefore = SnippetSession.adjustSelection(model, selection, this._overwriteBefore, 0); + let extensionAfter = SnippetSession.adjustSelection(model, selection, 0, this._overwriteAfter); + if (firstBeforeText !== model.getValueInRange(extensionBefore)) { + extensionBefore = selection; + } + if (firstAfterText !== model.getValueInRange(extensionAfter)) { + extensionAfter = selection; + } + + // merge the before and after selection into one + const snippetSelection = selection + .setStartPosition(extensionBefore.startLineNumber, extensionBefore.startColumn) + .setEndPosition(extensionAfter.endLineNumber, extensionAfter.endColumn); + + // adjust the template string to match the indentation and + // whitespace rules of this insert location (can be different for each cursor) + const start = snippetSelection.getStartPosition(); const adjustedTemplate = SnippetSession.normalizeWhitespace(model, start, this._template); - const snippet = SnippetParser.parse(adjustedTemplate).resolveVariables(new EditorSnippetVariableResolver(model, range)); + const snippet = SnippetParser.parse(adjustedTemplate).resolveVariables(new EditorSnippetVariableResolver(model, snippetSelection)); const offset = model.getOffsetAt(start) + delta; + delta += snippet.text.length - model.getValueLengthInRange(snippetSelection); - edits[idx] = EditOperation.replaceMove(range, snippet.text); + // store snippets with the index of their originating selection. + // that ensures the primiary cursor stays primary despite not being + // the one with lowest start position + edits[idx] = EditOperation.replaceMove(snippetSelection, snippet.text); this._snippets[idx] = new OneSnippet(this._editor, snippet, offset); - - delta += snippet.text.length - model.getValueLengthInRange(range); } // make insert edit and start with first selections @@ -291,8 +315,12 @@ export class SnippetSession { for (const selection of selections) { let found = false; - for (const snippet of this._snippets) { - if (snippet.range.containsRange(selection)) { + for (const { range } of this._snippets) { + if (!range) { + // all deleted + return false; + } + if (range.containsRange(selection)) { found = true; break; } diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 71096b7d1c324..2229757bbb09f 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -43,6 +43,8 @@ export class SnippetController2 { dispose(): void { this._inSnippet.reset(); + this._hasPrevTabstop.reset(); + this._hasNextTabstop.reset(); dispose(this._snippet); } @@ -55,7 +57,10 @@ export class SnippetController2 { this.cancel(); } this._snippet = new SnippetSession(this._editor, template, overwriteBefore, overwriteAfter); - this._snippetListener = [this._editor.onDidChangeCursorSelection(() => this._updateState())]; + this._snippetListener = [ + this._editor.onDidChangeModel(() => this.cancel()), + this._editor.onDidChangeCursorSelection(() => this._updateState()) + ]; this._snippet.insert(); } diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts index 5902f33ec3f3c..ecd3ede31c39d 100644 --- a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts @@ -50,6 +50,7 @@ suite('SnippetSession', function () { assertNormalized(new Position(1, 1), 'foo\rbar', 'foo\nbar'); assertNormalized(new Position(2, 5), 'foo\r\tbar', 'foo\n bar'); assertNormalized(new Position(2, 3), 'foo\r\tbar', 'foo\n bar'); + assertNormalized(new Position(2, 5), 'foo\r\tbar\nfoo', 'foo\n bar\n foo'); }); test('adjust selection (overwrite[Before|After])', function () { @@ -111,12 +112,12 @@ suite('SnippetSession', function () { const session = new SnippetSession(editor, 'foo\n\t${1:bar}\n$0'); session.insert(); - assert.equal(editor.getModel().getValue(), 'foo\n bar\nfunction foo() {\n foo\n bar\nconsole.log(a);\n}'); + assert.equal(editor.getModel().getValue(), 'foo\n bar\nfunction foo() {\n foo\n bar\n console.log(a);\n}'); assertSelections(editor, new Selection(2, 5, 2, 8), new Selection(5, 9, 5, 12)); session.next(); - assertSelections(editor, new Selection(3, 1, 3, 1), new Selection(6, 1, 6, 1)); + assertSelections(editor, new Selection(3, 1, 3, 1), new Selection(6, 5, 6, 5)); }); test('snippets, selections -> next/prev', () => { diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts new file mode 100644 index 0000000000000..9e15e0bed55ef --- /dev/null +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts @@ -0,0 +1,588 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import { Position } from 'vs/editor/common/core/position'; +import { Selection } from 'vs/editor/common/core/selection'; +import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; +import { MockCodeEditor, withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; +import { Cursor } from 'vs/editor/common/controller/cursor'; +import { IContextKeyService } from "vs/platform/contextkey/common/contextkey"; +import { ICommonCodeEditor } from "vs/editor/common/editorCommon"; + +class TestSnippetController extends SnippetController2 { + + constructor( + editor: ICommonCodeEditor, + @IContextKeyService private _contextKeyService: IContextKeyService + ) { + super(editor, _contextKeyService); + } + + isInSnippetMode(): boolean { + return SnippetController2.InSnippetMode.getValue(this._contextKeyService); + } + +} + +suite('SnippetController', () => { + + function snippetTest(cb: (editor: MockCodeEditor, cursor: Cursor, template: string, snippetController: TestSnippetController) => void, lines?: string[]): void { + + if (!lines) { + lines = [ + 'function test() {', + '\tvar x = 3;', + '\tvar arr = [];', + '\t', + '}' + ]; + }; + + withMockCodeEditor(lines, {}, (editor, cursor) => { + editor.getModel().updateOptions({ + insertSpaces: false + }); + let snippetController = editor.registerAndInstantiateContribution(TestSnippetController); + let template = [ + 'for (var ${1:index}; $1 < ${2:array}.length; $1++) {', + '\tvar element = $2[$1];', + '\t$0', + '}' + ].join('\n'); + + cb(editor, cursor, template, snippetController); + snippetController.dispose(); + }); + } + + test('Simple accepted', () => { + snippetTest((editor, cursor, template, snippetController) => { + editor.setPosition({ lineNumber: 4, column: 2 }); + + snippetController.insert(template, 0, 0); + assert.equal(editor.getModel().getLineContent(4), '\tfor (var index; index < array.length; index++) {'); + assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = array[index];'); + assert.equal(editor.getModel().getLineContent(6), '\t\t'); + assert.equal(editor.getModel().getLineContent(7), '\t}'); + + editor.trigger('test', 'type', { text: 'i' }); + assert.equal(editor.getModel().getLineContent(4), '\tfor (var i; i < array.length; i++) {'); + assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = array[i];'); + assert.equal(editor.getModel().getLineContent(6), '\t\t'); + assert.equal(editor.getModel().getLineContent(7), '\t}'); + + snippetController.next(); + editor.trigger('test', 'type', { text: 'arr' }); + assert.equal(editor.getModel().getLineContent(4), '\tfor (var i; i < arr.length; i++) {'); + assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = arr[i];'); + assert.equal(editor.getModel().getLineContent(6), '\t\t'); + assert.equal(editor.getModel().getLineContent(7), '\t}'); + + snippetController.prev(); + editor.trigger('test', 'type', { text: 'j' }); + assert.equal(editor.getModel().getLineContent(4), '\tfor (var j; j < arr.length; j++) {'); + assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = arr[j];'); + assert.equal(editor.getModel().getLineContent(6), '\t\t'); + assert.equal(editor.getModel().getLineContent(7), '\t}'); + + snippetController.next(); + snippetController.next(); + assert.deepEqual(editor.getPosition(), new Position(6, 3)); + }); + }); + + test('Simple canceled', () => { + snippetTest((editor, cursor, template, snippetController) => { + editor.setPosition({ lineNumber: 4, column: 2 }); + + snippetController.insert(template, 0, 0); + assert.equal(editor.getModel().getLineContent(4), '\tfor (var index; index < array.length; index++) {'); + assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = array[index];'); + assert.equal(editor.getModel().getLineContent(6), '\t\t'); + assert.equal(editor.getModel().getLineContent(7), '\t}'); + + snippetController.cancel(); + assert.deepEqual(editor.getPosition(), new Position(4, 16)); + }); + }); + + // test('Stops when deleting lines above', () => { + // snippetTest((editor, cursor, codeSnippet, snippetController) => { + // editor.setPosition({ lineNumber: 4, column: 2 }); + // snippetController.insert(codeSnippet, 0, 0); + + // editor.getModel().applyEdits([{ + // forceMoveMarkers: false, + // identifier: null, + // isAutoWhitespaceEdit: false, + // range: new Range(1, 1, 3, 1), + // text: null + // }]); + + // assert.equal(snippetController.isInSnippetMode(), false); + // }); + // }); + + // test('Stops when deleting lines below', () => { + // snippetTest((editor, cursor, codeSnippet, snippetController) => { + // editor.setPosition({ lineNumber: 4, column: 2 }); + // snippetController.run(codeSnippet, 0, 0); + + // editor.getModel().applyEdits([{ + // forceMoveMarkers: false, + // identifier: null, + // isAutoWhitespaceEdit: false, + // range: new Range(8, 1, 8, 100), + // text: null + // }]); + + // assert.equal(snippetController.isInSnippetMode(), false); + // }); + // }); + + // test('Stops when inserting lines above', () => { + // snippetTest((editor, cursor, codeSnippet, snippetController) => { + // editor.setPosition({ lineNumber: 4, column: 2 }); + // snippetController.run(codeSnippet, 0, 0); + + // editor.getModel().applyEdits([{ + // forceMoveMarkers: false, + // identifier: null, + // isAutoWhitespaceEdit: false, + // range: new Range(1, 100, 1, 100), + // text: '\nHello' + // }]); + + // assert.equal(snippetController.isInSnippetMode(), false); + // }); + // }); + + // test('Stops when inserting lines below', () => { + // snippetTest((editor, cursor, codeSnippet, snippetController) => { + // editor.setPosition({ lineNumber: 4, column: 2 }); + // snippetController.run(codeSnippet, 0, 0); + + // editor.getModel().applyEdits([{ + // forceMoveMarkers: false, + // identifier: null, + // isAutoWhitespaceEdit: false, + // range: new Range(8, 100, 8, 100), + // text: '\nHello' + // }]); + + // assert.equal(snippetController.isInSnippetMode(), false); + // }); + // }); + + test('Stops when calling model.setValue()', () => { + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setPosition({ lineNumber: 4, column: 2 }); + snippetController.insert(codeSnippet, 0, 0); + + editor.getModel().setValue('goodbye'); + + assert.equal(snippetController.isInSnippetMode(), false); + }); + }); + + // test('Stops when undoing', () => { + // snippetTest((editor, cursor, codeSnippet, snippetController) => { + // editor.setPosition({ lineNumber: 4, column: 2 }); + // snippetController.run(codeSnippet, 0, 0); + + // editor.getModel().undo(); + + // assert.equal(snippetController.isInSnippetMode(), false); + // }); + // }); + + test('Stops when moving cursor outside', () => { + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setPosition({ lineNumber: 4, column: 2 }); + snippetController.insert(codeSnippet, 0, 0); + + editor.setPosition({ lineNumber: 1, column: 1 }); + + assert.equal(snippetController.isInSnippetMode(), false); + }); + }); + + test('Stops when disconnecting editor model', () => { + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setPosition({ lineNumber: 4, column: 2 }); + snippetController.insert(codeSnippet, 0, 0); + + editor.setModel(null); + + assert.equal(snippetController.isInSnippetMode(), false); + }); + }); + + test('Stops when disposing editor', () => { + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setPosition({ lineNumber: 4, column: 2 }); + snippetController.insert(codeSnippet, 0, 0); + + snippetController.dispose(); + + assert.equal(snippetController.isInSnippetMode(), false); + }); + }); + + test('Final tabstop with multiple selections', () => { + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setSelections([ + new Selection(1, 1, 1, 1), + new Selection(2, 1, 2, 1), + ]); + + codeSnippet = 'foo$0'; + snippetController.insert(codeSnippet, 0, 0); + + assert.equal(editor.getSelections().length, 2); + const [first, second] = editor.getSelections(); + assert.ok(first.equalsRange({ startLineNumber: 1, startColumn: 4, endLineNumber: 1, endColumn: 4 }), first.toString()); + assert.ok(second.equalsRange({ startLineNumber: 2, startColumn: 4, endLineNumber: 2, endColumn: 4 }), second.toString()); + }); + + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setSelections([ + new Selection(1, 1, 1, 1), + new Selection(2, 1, 2, 1), + ]); + + codeSnippet = 'foo$0bar'; + snippetController.insert(codeSnippet, 0, 0); + + assert.equal(editor.getSelections().length, 2); + const [first, second] = editor.getSelections(); + assert.ok(first.equalsRange({ startLineNumber: 1, startColumn: 4, endLineNumber: 1, endColumn: 4 }), first.toString()); + assert.ok(second.equalsRange({ startLineNumber: 2, startColumn: 4, endLineNumber: 2, endColumn: 4 }), second.toString()); + }); + + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setSelections([ + new Selection(1, 1, 1, 1), + new Selection(1, 5, 1, 5), + ]); + + codeSnippet = 'foo$0bar'; + snippetController.insert(codeSnippet, 0, 0); + + assert.equal(editor.getSelections().length, 2); + const [first, second] = editor.getSelections(); + assert.ok(first.equalsRange({ startLineNumber: 1, startColumn: 4, endLineNumber: 1, endColumn: 4 }), first.toString()); + assert.ok(second.equalsRange({ startLineNumber: 1, startColumn: 14, endLineNumber: 1, endColumn: 14 }), second.toString()); + }); + + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setSelections([ + new Selection(1, 1, 1, 1), + new Selection(1, 5, 1, 5), + ]); + + codeSnippet = 'foo\n$0\nbar'; + snippetController.insert(codeSnippet, 0, 0); + + assert.equal(editor.getSelections().length, 2); + const [first, second] = editor.getSelections(); + assert.ok(first.equalsRange({ startLineNumber: 2, startColumn: 1, endLineNumber: 2, endColumn: 1 }), first.toString()); + assert.ok(second.equalsRange({ startLineNumber: 4, startColumn: 1, endLineNumber: 4, endColumn: 1 }), second.toString()); + }); + + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setSelections([ + new Selection(1, 1, 1, 1), + new Selection(1, 5, 1, 5), + ]); + + codeSnippet = 'foo\n$0\nbar'; + snippetController.insert(codeSnippet, 0, 0); + + assert.equal(editor.getSelections().length, 2); + const [first, second] = editor.getSelections(); + assert.ok(first.equalsRange({ startLineNumber: 2, startColumn: 1, endLineNumber: 2, endColumn: 1 }), first.toString()); + assert.ok(second.equalsRange({ startLineNumber: 4, startColumn: 1, endLineNumber: 4, endColumn: 1 }), second.toString()); + }); + + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setSelections([ + new Selection(2, 7, 2, 7), + ]); + + codeSnippet = 'xo$0r'; + snippetController.insert(codeSnippet, 1, 0); + + assert.equal(editor.getSelections().length, 1); + assert.ok(editor.getSelection().equalsRange({ startLineNumber: 2, startColumn: 8, endColumn: 8, endLineNumber: 2 })); + }); + }); + + test('Final tabstop, #11742 simple', () => { + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelection(new Selection(1, 19, 1, 19)); + + codeSnippet = '{{% url_**$1** %}}'; + controller.insert(codeSnippet, 2, 0); + + assert.equal(editor.getSelections().length, 1); + assert.ok(editor.getSelection().equalsRange({ startLineNumber: 1, startColumn: 27, endLineNumber: 1, endColumn: 27 })); + assert.equal(editor.getModel().getValue(), 'example example {{% url_**** %}}'); + + }, ['example example sc']); + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelection(new Selection(1, 3, 1, 3)); + + codeSnippet = [ + 'afterEach((done) => {', + '\t${1}test', + '});' + ].join('\n'); + + controller.insert(codeSnippet, 2, 0); + + assert.equal(editor.getSelections().length, 1); + assert.ok(editor.getSelection().equalsRange({ startLineNumber: 2, startColumn: 2, endLineNumber: 2, endColumn: 2 }), editor.getSelection().toString()); + assert.equal(editor.getModel().getValue(), 'afterEach((done) => {\n\ttest\n});'); + + }, ['af']); + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelection(new Selection(1, 3, 1, 3)); + + codeSnippet = [ + 'afterEach((done) => {', + '${1}\ttest', + '});' + ].join('\n'); + + controller.insert(codeSnippet, 2, 0); + + assert.equal(editor.getSelections().length, 1); + assert.ok(editor.getSelection().equalsRange({ startLineNumber: 2, startColumn: 1, endLineNumber: 2, endColumn: 1 }), editor.getSelection().toString()); + assert.equal(editor.getModel().getValue(), 'afterEach((done) => {\n\ttest\n});'); + + }, ['af']); + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelection(new Selection(1, 9, 1, 9)); + + codeSnippet = [ + 'aft${1}er' + ].join('\n'); + + controller.insert(codeSnippet, 8, 0); + + assert.equal(editor.getModel().getValue(), 'after'); + assert.equal(editor.getSelections().length, 1); + assert.ok(editor.getSelection().equalsRange({ startLineNumber: 1, startColumn: 4, endLineNumber: 1, endColumn: 4 }), editor.getSelection().toString()); + + }, ['afterone']); + }); + + test('Final tabstop, #11742 different indents', () => { + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(2, 4, 2, 4), + new Selection(1, 3, 1, 3) + ]); + + codeSnippet = [ + 'afterEach((done) => {', + '\t${0}test', + '});' + ].join('\n'); + + controller.insert(codeSnippet, 2, 0); + + assert.equal(editor.getSelections().length, 2); + const [first, second] = editor.getSelections(); + + assert.ok(first.equalsRange({ startLineNumber: 5, startColumn: 3, endLineNumber: 5, endColumn: 3 }), first.toString()); + assert.ok(second.equalsRange({ startLineNumber: 2, startColumn: 2, endLineNumber: 2, endColumn: 2 }), second.toString()); + + }, ['af', '\taf']); + }); + + test('Final tabstop, #11890 stay at the beginning', () => { + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(1, 5, 1, 5) + ]); + + codeSnippet = [ + 'afterEach((done) => {', + '${1}\ttest', + '});' + ].join('\n'); + + controller.insert(codeSnippet, 2, 0); + + assert.equal(editor.getSelections().length, 1); + const [first] = editor.getSelections(); + + assert.ok(first.equalsRange({ startLineNumber: 2, startColumn: 3, endLineNumber: 2, endColumn: 3 }), first.toString()); + + }, [' af']); + }); + + test('Final tabstop, no tabstop', () => { + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(1, 3, 1, 3) + ]); + + codeSnippet = 'afterEach'; + + controller.insert(codeSnippet, 2, 0); + + assert.ok(editor.getSelection().equalsRange({ startLineNumber: 1, startColumn: 10, endLineNumber: 1, endColumn: 10 })); + + }, ['af', '\taf']); + }); + + test('Multiple cursor and overwriteBefore/After, issue #11060', () => { + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(1, 7, 1, 7), + new Selection(2, 4, 2, 4) + ]); + + codeSnippet = '_foo'; + controller.insert(codeSnippet, 1, 0); + assert.equal(editor.getModel().getValue(), 'this._foo\nabc_foo'); + + }, ['this._', 'abc']); + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(1, 7, 1, 7), + new Selection(2, 4, 2, 4) + ]); + + codeSnippet = 'XX'; + controller.insert(codeSnippet, 1, 0); + assert.equal(editor.getModel().getValue(), 'this.XX\nabcXX'); + + }, ['this._', 'abc']); + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(1, 7, 1, 7), + new Selection(2, 4, 2, 4), + new Selection(3, 5, 3, 5) + ]); + + codeSnippet = '_foo'; + controller.insert(codeSnippet, 1, 0); + assert.equal(editor.getModel().getValue(), 'this._foo\nabc_foo\ndef_foo'); + + }, ['this._', 'abc', 'def_']); + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(1, 7, 1, 7), // primary at `this._` + new Selection(2, 4, 2, 4), + new Selection(3, 6, 3, 6) + ]); + + codeSnippet = '._foo'; + controller.insert(codeSnippet, 2, 0); + assert.equal(editor.getModel().getValue(), 'this._foo\nabc._foo\ndef._foo'); + + }, ['this._', 'abc', 'def._']); + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(3, 6, 3, 6), // primary at `def._` + new Selection(1, 7, 1, 7), + new Selection(2, 4, 2, 4), + ]); + + codeSnippet = '._foo'; + controller.insert(codeSnippet, 2, 0); + assert.equal(editor.getModel().getValue(), 'this._foo\nabc._foo\ndef._foo'); + + }, ['this._', 'abc', 'def._']); + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(2, 4, 2, 4), // primary at `abc` + new Selection(3, 6, 3, 6), + new Selection(1, 7, 1, 7), + ]); + + codeSnippet = '._foo'; + controller.insert(codeSnippet, 2, 0); + assert.equal(editor.getModel().getValue(), 'this._._foo\na._foo\ndef._._foo'); + + }, ['this._', 'abc', 'def._']); + + }); + + test('Multiple cursor and overwriteBefore/After, #16277', () => { + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(1, 5, 1, 5), + new Selection(2, 5, 2, 5), + ]); + + codeSnippet = 'document'; + controller.insert(codeSnippet, 3, 0); + assert.equal(editor.getModel().getValue(), '{document}\n{document && true}'); + + }, ['{foo}', '{foo && true}']); + }); + + test('Insert snippet twice, #19449', () => { + + snippetTest((editor, cursor, codeSnippet, controller) => { + + editor.setSelections([ + new Selection(1, 1, 1, 1) + ]); + + codeSnippet = 'for (var ${1:i}=0; ${1:i} { + + editor.setSelections([ + new Selection(1, 1, 1, 1) + ]); + + codeSnippet = 'for (let ${1:i}=0; ${1:i} Date: Thu, 11 May 2017 11:05:43 +0200 Subject: [PATCH 0414/2747] Renamed --noGettingStarted to --skip-getting-started argument #26386. --- src/vs/platform/environment/common/environment.ts | 4 ++-- src/vs/platform/environment/node/argv.ts | 2 +- src/vs/platform/environment/node/environmentService.ts | 2 +- .../welcome/gettingStarted/electron-browser/gettingStarted.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/platform/environment/common/environment.ts b/src/vs/platform/environment/common/environment.ts index 6c8b7d20576cc..a1c53201b34c3 100644 --- a/src/vs/platform/environment/common/environment.ts +++ b/src/vs/platform/environment/common/environment.ts @@ -38,7 +38,7 @@ export interface ParsedArgs { 'enable-proposed-api'?: string | string[]; 'open-url'?: string | string[]; 'prof-startup-timers': string; - noGettingStarted?: boolean; + 'skip-getting-started'?: boolean; } export const IEnvironmentService = createDecorator('environmentService'); @@ -79,7 +79,7 @@ export interface IEnvironmentService { performance: boolean; profileStartup: { prefix: string, dir: string } | undefined; - noGettingStarted: boolean | undefined; + skipGettingStarted: boolean | undefined; mainIPCHandle: string; sharedIPCHandle: string; diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts index 0a4ea0f9c495e..9b90b9161bde0 100644 --- a/src/vs/platform/environment/node/argv.ts +++ b/src/vs/platform/environment/node/argv.ts @@ -42,7 +42,7 @@ const options: minimist.Opts = { 'list-extensions', 'show-versions', 'nolazy', - 'noGettingStarted' + 'skip-getting-started' ], alias: { help: 'h', diff --git a/src/vs/platform/environment/node/environmentService.ts b/src/vs/platform/environment/node/environmentService.ts index d088d9c9c3b58..34a82d9d57185 100644 --- a/src/vs/platform/environment/node/environmentService.ts +++ b/src/vs/platform/environment/node/environmentService.ts @@ -100,7 +100,7 @@ export class EnvironmentService implements IEnvironmentService { get disableExtensions(): boolean { return this._args['disable-extensions']; } - get noGettingStarted(): boolean { return this._args.noGettingStarted; } + get skipGettingStarted(): boolean { return this._args['skip-getting-started']; } @memoize get debugExtensionHost(): { port: number; break: boolean; } { return parseExtensionHostPort(this._args, this.isBuilt); } diff --git a/src/vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarted.ts b/src/vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarted.ts index 76215dd8be9e9..cdb9eb088b033 100644 --- a/src/vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarted.ts +++ b/src/vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarted.ts @@ -69,8 +69,8 @@ export class GettingStarted implements IWorkbenchContribution { ) { this.appName = product.nameLong; - /* do not open a browser when we run an extension or --noGettingStarted is provided */ - if (product.welcomePage && !environmentService.isExtensionDevelopment && !environmentService.noGettingStarted) { + /* do not open a browser when we run an extension or --skip-getting-started is provided */ + if (product.welcomePage && !environmentService.isExtensionDevelopment && !environmentService.skipGettingStarted) { this.welcomePageURL = product.welcomePage; this.handleWelcome(); } From 7ebf725c672e9470cc590be20c0e35f99d3beedd Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 11 May 2017 11:08:28 +0200 Subject: [PATCH 0415/2747] fix bad imports --- src/vs/editor/contrib/snippet/browser/snippetController2.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 2229757bbb09f..39fbe4094454d 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -10,9 +10,9 @@ import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { commonEditorContribution, CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { SnippetSession } from './editorSnippets'; -import { EditorCommand } from "vs/editor/common/config/config"; -import { EditorContextKeys } from "vs/editor/common/editorContextKeys"; -import { KeyCode, KeyMod } from "vs/base/common/keyCodes"; +import { EditorCommand } from 'vs/editor/common/config/config'; +import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; +import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; @commonEditorContribution export class SnippetController2 { From 4c94c83eb01e799565f0e924f11ef8f76471224c Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 11 May 2017 09:36:11 +0200 Subject: [PATCH 0416/2747] Update to native-keymap@1.2.4 (#23685) --- npm-shrinkwrap.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index cc268be6f5445..84aa4bbba2816 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -293,9 +293,9 @@ "resolved": "https://registry.npmjs.org/nan/-/nan-2.4.0.tgz" }, "native-keymap": { - "version": "1.2.3", - "from": "native-keymap@1.2.3", - "resolved": "https://registry.npmjs.org/native-keymap/-/native-keymap-1.2.3.tgz" + "version": "1.2.4", + "from": "native-keymap@1.2.4", + "resolved": "https://registry.npmjs.org/native-keymap/-/native-keymap-1.2.4.tgz" }, "normalize-path": { "version": "2.0.1", diff --git a/package.json b/package.json index 88ff5afaed343..a9b3c8288f848 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "iconv-lite": "0.4.15", "jschardet": "^1.4.2", "minimist": "1.2.0", - "native-keymap": "1.2.3", + "native-keymap": "1.2.4", "node-pty": "0.6.4", "semver": "4.3.6", "v8-profiler": "jrieken/v8-profiler#vscode", From e968d3cebb6336619dc3c9cbe1c629df33fe6199 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 11 May 2017 11:22:46 +0200 Subject: [PATCH 0417/2747] Fixes #23685: Add support for ABNT_C1 and ABNT_C2 key codes --- src/vs/base/browser/keyboardEvent.ts | 2 + src/vs/base/common/keyCodes.ts | 7 + .../common/standalone/standaloneBase.ts | 5 + .../common/standalone/standaloneBase.test.ts | 2 + src/vs/monaco.d.ts | 4 +- .../keybinding/common/keybindingsRegistry.ts | 2 + .../common/windowsKeyboardMapper.ts | 18 +- .../keybinding/test/keybindingIO.test.ts | 4 + .../services/keybinding/test/win_por_ptb.js | 1093 +++++++++++++++++ .../services/keybinding/test/win_por_ptb.txt | 284 +++++ .../test/windowsKeyboardMapper.test.ts | 63 + 11 files changed, 1480 insertions(+), 4 deletions(-) create mode 100644 src/vs/workbench/services/keybinding/test/win_por_ptb.js create mode 100644 src/vs/workbench/services/keybinding/test/win_por_ptb.txt diff --git a/src/vs/base/browser/keyboardEvent.ts b/src/vs/base/browser/keyboardEvent.ts index ca3450b61b495..6f90f1b1b0751 100644 --- a/src/vs/base/browser/keyboardEvent.ts +++ b/src/vs/base/browser/keyboardEvent.ts @@ -120,6 +120,8 @@ let KEY_CODE_MAP: { [keyCode: number]: KeyCode } = {}; KEY_CODE_MAP[190] = KeyCode.US_DOT; KEY_CODE_MAP[191] = KeyCode.US_SLASH; KEY_CODE_MAP[192] = KeyCode.US_BACKTICK; + KEY_CODE_MAP[193] = KeyCode.ABNT_C1; + KEY_CODE_MAP[194] = KeyCode.ABNT_C2; KEY_CODE_MAP[219] = KeyCode.US_OPEN_SQUARE_BRACKET; KEY_CODE_MAP[220] = KeyCode.US_BACKSLASH; KEY_CODE_MAP[221] = KeyCode.US_CLOSE_SQUARE_BRACKET; diff --git a/src/vs/base/common/keyCodes.ts b/src/vs/base/common/keyCodes.ts index ff89f086e5783..c2b5c9d519aaf 100644 --- a/src/vs/base/common/keyCodes.ts +++ b/src/vs/base/common/keyCodes.ts @@ -190,6 +190,9 @@ export const enum KeyCode { */ KEY_IN_COMPOSITION = 109, + ABNT_C1 = 110, // Brazilian (ABNT) Keyboard + ABNT_C2 = 111, // Brazilian (ABNT) Keyboard + /** * Placed last to cover the length of the enum. * Please do not depend on this value! @@ -344,6 +347,8 @@ let STRING = createMapping((TO_STRING_MAP) => { TO_STRING_MAP[KeyCode.US_DOT] = '.'; TO_STRING_MAP[KeyCode.US_SLASH] = '/'; TO_STRING_MAP[KeyCode.US_BACKTICK] = '`'; + TO_STRING_MAP[KeyCode.ABNT_C1] = 'ABNT_C1'; + TO_STRING_MAP[KeyCode.ABNT_C2] = 'ABNT_C2'; TO_STRING_MAP[KeyCode.US_OPEN_SQUARE_BRACKET] = '['; TO_STRING_MAP[KeyCode.US_BACKSLASH] = '\\'; TO_STRING_MAP[KeyCode.US_CLOSE_SQUARE_BRACKET] = ']'; @@ -395,6 +400,8 @@ export let USER_SETTINGS = createMapping((TO_USER_SETTINGS_MAP) => { FROM_USER_SETTINGS_MAP['OEM_PERIOD'] = KeyCode.US_DOT; FROM_USER_SETTINGS_MAP['OEM_2'] = KeyCode.US_SLASH; FROM_USER_SETTINGS_MAP['OEM_3'] = KeyCode.US_BACKTICK; + FROM_USER_SETTINGS_MAP['ABNT_C1'] = KeyCode.ABNT_C1; + FROM_USER_SETTINGS_MAP['ABNT_C2'] = KeyCode.ABNT_C2; FROM_USER_SETTINGS_MAP['OEM_4'] = KeyCode.US_OPEN_SQUARE_BRACKET; FROM_USER_SETTINGS_MAP['OEM_5'] = KeyCode.US_BACKSLASH; FROM_USER_SETTINGS_MAP['OEM_6'] = KeyCode.US_CLOSE_SQUARE_BRACKET; diff --git a/src/vs/editor/common/standalone/standaloneBase.ts b/src/vs/editor/common/standalone/standaloneBase.ts index fcab19ff6e82d..695aa77b9bfdb 100644 --- a/src/vs/editor/common/standalone/standaloneBase.ts +++ b/src/vs/editor/common/standalone/standaloneBase.ts @@ -16,6 +16,7 @@ import URI from 'vs/base/common/uri'; // -------------------------------------------- // This is repeated here so it can be exported +// because TS inlines const enums // -------------------------------------------- export enum Severity { Ignore = 0, @@ -26,6 +27,7 @@ export enum Severity { // -------------------------------------------- // This is repeated here so it can be exported +// because TS inlines const enums // -------------------------------------------- export class KeyMod { public static readonly CtrlCmd: number = ConstKeyMod.CtrlCmd; @@ -40,6 +42,7 @@ export class KeyMod { // -------------------------------------------- // This is repeated here so it can be exported +// because TS inlines const enums // -------------------------------------------- /** * Virtual Key Codes, the value does not hold any inherent meaning. @@ -213,6 +216,8 @@ export enum KeyCode { * Cover all key codes when IME is processing input. */ KEY_IN_COMPOSITION = 109, + ABNT_C1 = 110, + ABNT_C2 = 111, /** * Placed last to cover the length of the enum. * Please do not depend on this value! diff --git a/src/vs/editor/test/common/standalone/standaloneBase.test.ts b/src/vs/editor/test/common/standalone/standaloneBase.test.ts index c26df8b28e662..64849eb80cb62 100644 --- a/src/vs/editor/test/common/standalone/standaloneBase.test.ts +++ b/src/vs/editor/test/common/standalone/standaloneBase.test.ts @@ -135,6 +135,8 @@ suite('KeyCode', () => { assertKeyCode(StandaloneKeyCode.NUMPAD_DECIMAL, RuntimeKeyCode.NUMPAD_DECIMAL); assertKeyCode(StandaloneKeyCode.NUMPAD_DIVIDE, RuntimeKeyCode.NUMPAD_DIVIDE); assertKeyCode(StandaloneKeyCode.KEY_IN_COMPOSITION, RuntimeKeyCode.KEY_IN_COMPOSITION); + assertKeyCode(StandaloneKeyCode.ABNT_C1, RuntimeKeyCode.ABNT_C1); + assertKeyCode(StandaloneKeyCode.ABNT_C2, RuntimeKeyCode.ABNT_C2); assertKeyCode(StandaloneKeyCode.MAX_VALUE, RuntimeKeyCode.MAX_VALUE); }); }); diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index d846cf7556be4..4b12abd41b63c 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -357,11 +357,13 @@ declare module monaco { * Cover all key codes when IME is processing input. */ KEY_IN_COMPOSITION = 109, + ABNT_C1 = 110, + ABNT_C2 = 111, /** * Placed last to cover the length of the enum. * Please do not depend on this value! */ - MAX_VALUE = 110, + MAX_VALUE = 112, } export class KeyMod { diff --git a/src/vs/platform/keybinding/common/keybindingsRegistry.ts b/src/vs/platform/keybinding/common/keybindingsRegistry.ts index 91440e9307f7b..46bdac8acc98b 100644 --- a/src/vs/platform/keybinding/common/keybindingsRegistry.ts +++ b/src/vs/platform/keybinding/common/keybindingsRegistry.ts @@ -180,6 +180,8 @@ class KeybindingsRegistryImpl implements IKeybindingsRegistry { || keyCode === KeyCode.US_DOT || keyCode === KeyCode.US_SLASH || keyCode === KeyCode.US_BACKTICK + || keyCode === KeyCode.ABNT_C1 + || keyCode === KeyCode.ABNT_C2 || keyCode === KeyCode.US_OPEN_SQUARE_BRACKET || keyCode === KeyCode.US_BACKSLASH || keyCode === KeyCode.US_CLOSE_SQUARE_BRACKET diff --git a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts index a6e058cb850d8..8007414043993 100644 --- a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts @@ -301,11 +301,21 @@ export class WindowsKeyboardMapper implements IKeyboardMapper { log(`Unknown scanCode ${strCode} in mapping.`); continue; } - if (IMMUTABLE_CODE_TO_KEY_CODE[scanCode] !== -1) { - continue; + const rawMapping = rawMappings[strCode]; + + const immutableKeyCode = IMMUTABLE_CODE_TO_KEY_CODE[scanCode]; + if (immutableKeyCode !== -1) { + const keyCode = NATIVE_KEY_CODE_TO_KEY_CODE[rawMapping.vkey] || KeyCode.Unknown; + if (keyCode === KeyCode.Unknown || immutableKeyCode === keyCode) { + continue; + } + if (scanCode !== ScanCode.NumpadComma) { + // Looks like ScanCode.NumpadComma doesn't always map to KeyCode.NUMPAD_SEPARATOR + // e.g. on POR - PTB + continue; + } } - const rawMapping = rawMappings[strCode]; const value = rawMapping.value; const withShift = rawMapping.withShift; const withAltGr = rawMapping.withAltGr; @@ -625,6 +635,8 @@ function _getNativeMap() { VK_OEM_PERIOD: KeyCode.US_DOT, VK_OEM_2: KeyCode.US_SLASH, VK_OEM_3: KeyCode.US_BACKTICK, + VK_ABNT_C1: KeyCode.ABNT_C1, + VK_ABNT_C2: KeyCode.ABNT_C2, VK_OEM_4: KeyCode.US_OPEN_SQUARE_BRACKET, VK_OEM_5: KeyCode.US_BACKSLASH, VK_OEM_6: KeyCode.US_CLOSE_SQUARE_BRACKET, diff --git a/src/vs/workbench/services/keybinding/test/keybindingIO.test.ts b/src/vs/workbench/services/keybinding/test/keybindingIO.test.ts index 2a9f0cb3f9c6a..c3fd1c5d78d24 100644 --- a/src/vs/workbench/services/keybinding/test/keybindingIO.test.ts +++ b/src/vs/workbench/services/keybinding/test/keybindingIO.test.ts @@ -84,6 +84,8 @@ suite('keybindingIO', () => { testRoundtrip(KeyCode.US_DOT, '.', '.', '.'); testRoundtrip(KeyCode.US_SLASH, '/', '/', '/'); testRoundtrip(KeyCode.US_BACKTICK, '`', '`', '`'); + testRoundtrip(KeyCode.ABNT_C1, 'abnt_c1', 'abnt_c1', 'abnt_c1'); + testRoundtrip(KeyCode.ABNT_C2, 'abnt_c2', 'abnt_c2', 'abnt_c2'); testRoundtrip(KeyCode.US_OPEN_SQUARE_BRACKET, '[', '[', '['); testRoundtrip(KeyCode.US_BACKSLASH, '\\', '\\', '\\'); testRoundtrip(KeyCode.US_CLOSE_SQUARE_BRACKET, ']', ']', ']'); @@ -99,6 +101,8 @@ suite('keybindingIO', () => { testDeserialization('OEM_PERIOD', 'OEM_PERIOD', 'OEM_PERIOD', KeyCode.US_DOT); testDeserialization('OEM_2', 'OEM_2', 'OEM_2', KeyCode.US_SLASH); testDeserialization('OEM_3', 'OEM_3', 'OEM_3', KeyCode.US_BACKTICK); + testDeserialization('ABNT_C1', 'ABNT_C1', 'ABNT_C1', KeyCode.ABNT_C1); + testDeserialization('ABNT_C2', 'ABNT_C2', 'ABNT_C2', KeyCode.ABNT_C2); testDeserialization('OEM_4', 'OEM_4', 'OEM_4', KeyCode.US_OPEN_SQUARE_BRACKET); testDeserialization('OEM_5', 'OEM_5', 'OEM_5', KeyCode.US_BACKSLASH); testDeserialization('OEM_6', 'OEM_6', 'OEM_6', KeyCode.US_CLOSE_SQUARE_BRACKET); diff --git a/src/vs/workbench/services/keybinding/test/win_por_ptb.js b/src/vs/workbench/services/keybinding/test/win_por_ptb.js new file mode 100644 index 0000000000000..683b2e241134f --- /dev/null +++ b/src/vs/workbench/services/keybinding/test/win_por_ptb.js @@ -0,0 +1,1093 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +define({ + Sleep: { + vkey: 'VK_SLEEP', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + WakeUp: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + KeyA: { + vkey: 'VK_A', + value: 'a', + withShift: 'A', + withAltGr: '', + withShiftAltGr: '' + }, + KeyB: { + vkey: 'VK_B', + value: 'b', + withShift: 'B', + withAltGr: '', + withShiftAltGr: '' + }, + KeyC: { + vkey: 'VK_C', + value: 'c', + withShift: 'C', + withAltGr: '₢', + withShiftAltGr: '' + }, + KeyD: { + vkey: 'VK_D', + value: 'd', + withShift: 'D', + withAltGr: '', + withShiftAltGr: '' + }, + KeyE: { + vkey: 'VK_E', + value: 'e', + withShift: 'E', + withAltGr: '°', + withShiftAltGr: '' + }, + KeyF: { + vkey: 'VK_F', + value: 'f', + withShift: 'F', + withAltGr: '', + withShiftAltGr: '' + }, + KeyG: { + vkey: 'VK_G', + value: 'g', + withShift: 'G', + withAltGr: '', + withShiftAltGr: '' + }, + KeyH: { + vkey: 'VK_H', + value: 'h', + withShift: 'H', + withAltGr: '', + withShiftAltGr: '' + }, + KeyI: { + vkey: 'VK_I', + value: 'i', + withShift: 'I', + withAltGr: '', + withShiftAltGr: '' + }, + KeyJ: { + vkey: 'VK_J', + value: 'j', + withShift: 'J', + withAltGr: '', + withShiftAltGr: '' + }, + KeyK: { + vkey: 'VK_K', + value: 'k', + withShift: 'K', + withAltGr: '', + withShiftAltGr: '' + }, + KeyL: { + vkey: 'VK_L', + value: 'l', + withShift: 'L', + withAltGr: '', + withShiftAltGr: '' + }, + KeyM: { + vkey: 'VK_M', + value: 'm', + withShift: 'M', + withAltGr: '', + withShiftAltGr: '' + }, + KeyN: { + vkey: 'VK_N', + value: 'n', + withShift: 'N', + withAltGr: '', + withShiftAltGr: '' + }, + KeyO: { + vkey: 'VK_O', + value: 'o', + withShift: 'O', + withAltGr: '', + withShiftAltGr: '' + }, + KeyP: { + vkey: 'VK_P', + value: 'p', + withShift: 'P', + withAltGr: '', + withShiftAltGr: '' + }, + KeyQ: { + vkey: 'VK_Q', + value: 'q', + withShift: 'Q', + withAltGr: '/', + withShiftAltGr: '' + }, + KeyR: { + vkey: 'VK_R', + value: 'r', + withShift: 'R', + withAltGr: '', + withShiftAltGr: '' + }, + KeyS: { + vkey: 'VK_S', + value: 's', + withShift: 'S', + withAltGr: '', + withShiftAltGr: '' + }, + KeyT: { + vkey: 'VK_T', + value: 't', + withShift: 'T', + withAltGr: '', + withShiftAltGr: '' + }, + KeyU: { + vkey: 'VK_U', + value: 'u', + withShift: 'U', + withAltGr: '', + withShiftAltGr: '' + }, + KeyV: { + vkey: 'VK_V', + value: 'v', + withShift: 'V', + withAltGr: '', + withShiftAltGr: '' + }, + KeyW: { + vkey: 'VK_W', + value: 'w', + withShift: 'W', + withAltGr: '?', + withShiftAltGr: '' + }, + KeyX: { + vkey: 'VK_X', + value: 'x', + withShift: 'X', + withAltGr: '', + withShiftAltGr: '' + }, + KeyY: { + vkey: 'VK_Y', + value: 'y', + withShift: 'Y', + withAltGr: '', + withShiftAltGr: '' + }, + KeyZ: { + vkey: 'VK_Z', + value: 'z', + withShift: 'Z', + withAltGr: '', + withShiftAltGr: '' + }, + Digit1: { + vkey: 'VK_1', + value: '1', + withShift: '!', + withAltGr: '¹', + withShiftAltGr: '' + }, + Digit2: { + vkey: 'VK_2', + value: '2', + withShift: '@', + withAltGr: '²', + withShiftAltGr: '' + }, + Digit3: { + vkey: 'VK_3', + value: '3', + withShift: '#', + withAltGr: '³', + withShiftAltGr: '' + }, + Digit4: { + vkey: 'VK_4', + value: '4', + withShift: '$', + withAltGr: '£', + withShiftAltGr: '' + }, + Digit5: { + vkey: 'VK_5', + value: '5', + withShift: '%', + withAltGr: '¢', + withShiftAltGr: '' + }, + Digit6: { + vkey: 'VK_6', + value: '6', + withShift: '¨', + withAltGr: '¬', + withShiftAltGr: '' + }, + Digit7: { + vkey: 'VK_7', + value: '7', + withShift: '&', + withAltGr: '', + withShiftAltGr: '' + }, + Digit8: { + vkey: 'VK_8', + value: '8', + withShift: '*', + withAltGr: '', + withShiftAltGr: '' + }, + Digit9: { + vkey: 'VK_9', + value: '9', + withShift: '(', + withAltGr: '', + withShiftAltGr: '' + }, + Digit0: { + vkey: 'VK_0', + value: '0', + withShift: ')', + withAltGr: '', + withShiftAltGr: '' + }, + Enter: { + vkey: 'VK_RETURN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Escape: { + vkey: 'VK_ESCAPE', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Backspace: { + vkey: 'VK_BACK', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Tab: { + vkey: 'VK_TAB', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Space: { + vkey: 'VK_SPACE', + value: ' ', + withShift: ' ', + withAltGr: '', + withShiftAltGr: '' + }, + Minus: { + vkey: 'VK_OEM_MINUS', + value: '-', + withShift: '_', + withAltGr: '', + withShiftAltGr: '' + }, + Equal: { + vkey: 'VK_OEM_PLUS', + value: '=', + withShift: '+', + withAltGr: '§', + withShiftAltGr: '' + }, + BracketLeft: { + vkey: 'VK_OEM_4', + value: '´', + withShift: '`', + withAltGr: '', + withShiftAltGr: '' + }, + BracketRight: { + vkey: 'VK_OEM_6', + value: '[', + withShift: '{', + withAltGr: 'ª', + withShiftAltGr: '' + }, + Backslash: { + vkey: 'VK_OEM_5', + value: ']', + withShift: '}', + withAltGr: 'º', + withShiftAltGr: '' + }, + Semicolon: { + vkey: 'VK_OEM_1', + value: 'ç', + withShift: 'Ç', + withAltGr: '', + withShiftAltGr: '' + }, + Quote: { + vkey: 'VK_OEM_7', + value: '~', + withShift: '^', + withAltGr: '', + withShiftAltGr: '' + }, + Backquote: { + vkey: 'VK_OEM_3', + value: '\'', + withShift: '"', + withAltGr: '', + withShiftAltGr: '' + }, + Comma: { + vkey: 'VK_OEM_COMMA', + value: ',', + withShift: '<', + withAltGr: '', + withShiftAltGr: '' + }, + Period: { + vkey: 'VK_OEM_PERIOD', + value: '.', + withShift: '>', + withAltGr: '', + withShiftAltGr: '' + }, + Slash: { + vkey: 'VK_OEM_2', + value: ';', + withShift: ':', + withAltGr: '', + withShiftAltGr: '' + }, + CapsLock: { + vkey: 'VK_CAPITAL', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F1: { + vkey: 'VK_F1', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F2: { + vkey: 'VK_F2', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F3: { + vkey: 'VK_F3', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F4: { + vkey: 'VK_F4', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F5: { + vkey: 'VK_F5', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F6: { + vkey: 'VK_F6', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F7: { + vkey: 'VK_F7', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F8: { + vkey: 'VK_F8', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F9: { + vkey: 'VK_F9', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F10: { + vkey: 'VK_F10', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F11: { + vkey: 'VK_F11', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F12: { + vkey: 'VK_F12', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + PrintScreen: { + vkey: 'VK_SNAPSHOT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ScrollLock: { + vkey: 'VK_SCROLL', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Pause: { + vkey: 'VK_NUMLOCK', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Insert: { + vkey: 'VK_INSERT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Home: { + vkey: 'VK_HOME', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + PageUp: { + vkey: 'VK_PRIOR', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Delete: { + vkey: 'VK_DELETE', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + End: { + vkey: 'VK_END', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + PageDown: { + vkey: 'VK_NEXT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ArrowRight: { + vkey: 'VK_RIGHT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ArrowLeft: { + vkey: 'VK_LEFT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ArrowDown: { + vkey: 'VK_DOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ArrowUp: { + vkey: 'VK_UP', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + NumLock: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + NumpadDivide: { + vkey: 'VK_DIVIDE', + value: '/', + withShift: '/', + withAltGr: '', + withShiftAltGr: '' + }, + NumpadMultiply: { + vkey: 'VK_MULTIPLY', + value: '*', + withShift: '*', + withAltGr: '', + withShiftAltGr: '' + }, + NumpadSubtract: { + vkey: 'VK_SUBTRACT', + value: '-', + withShift: '-', + withAltGr: '', + withShiftAltGr: '' + }, + NumpadAdd: { + vkey: 'VK_ADD', + value: '+', + withShift: '+', + withAltGr: '', + withShiftAltGr: '' + }, + NumpadEnter: { + vkey: 'VK_RETURN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad1: { + vkey: 'VK_END', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad2: { + vkey: 'VK_DOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad3: { + vkey: 'VK_NEXT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad4: { + vkey: 'VK_LEFT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad5: { + vkey: 'VK_CLEAR', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad6: { + vkey: 'VK_RIGHT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad7: { + vkey: 'VK_HOME', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad8: { + vkey: 'VK_UP', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad9: { + vkey: 'VK_PRIOR', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad0: { + vkey: 'VK_INSERT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + NumpadDecimal: { + vkey: 'VK_DELETE', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + IntlBackslash: { + vkey: 'VK_OEM_102', + value: '\\', + withShift: '|', + withAltGr: '', + withShiftAltGr: '' + }, + ContextMenu: { + vkey: 'VK_APPS', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Power: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + NumpadEqual: { + vkey: 'VK_CLEAR', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F13: { + vkey: 'VK_F13', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F14: { + vkey: 'VK_F14', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F15: { + vkey: 'VK_F15', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F16: { + vkey: 'VK_F16', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F17: { + vkey: 'VK_F17', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F18: { + vkey: 'VK_F18', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F19: { + vkey: 'VK_F19', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F20: { + vkey: 'VK_F20', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F21: { + vkey: 'VK_F21', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F22: { + vkey: 'VK_F22', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F23: { + vkey: 'VK_F23', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F24: { + vkey: 'VK_F24', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Help: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Undo: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Cut: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Copy: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Paste: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + AudioVolumeMute: { + vkey: 'VK_VOLUME_MUTE', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + AudioVolumeUp: { + vkey: 'VK_VOLUME_UP', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + AudioVolumeDown: { + vkey: 'VK_VOLUME_DOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + NumpadComma: { + vkey: 'VK_ABNT_C2', + value: '.', + withShift: '.', + withAltGr: '', + withShiftAltGr: '' + }, + IntlRo: { + vkey: 'VK_ABNT_C1', + value: '/', + withShift: '?', + withAltGr: '°', + withShiftAltGr: '' + }, + KanaMode: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + IntlYen: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Convert: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + NonConvert: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Lang1: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Lang2: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Lang3: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Lang4: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ControlLeft: { + vkey: 'VK_CONTROL', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ShiftLeft: { + vkey: 'VK_SHIFT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + AltLeft: { + vkey: 'VK_MENU', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + MetaLeft: { + vkey: 'VK_LWIN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ControlRight: { + vkey: 'VK_CONTROL', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ShiftRight: { + vkey: 'VK_SHIFT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + AltRight: { + vkey: 'VK_MENU', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + MetaRight: { + vkey: 'VK_RWIN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + MediaTrackNext: { + vkey: 'VK_MEDIA_NEXT_TRACK', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + MediaTrackPrevious: { + vkey: 'VK_MEDIA_PREV_TRACK', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + MediaStop: { + vkey: 'VK_MEDIA_STOP', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Eject: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + MediaPlayPause: { + vkey: 'VK_MEDIA_PLAY_PAUSE', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + MediaSelect: { + vkey: 'VK_LAUNCH_MEDIA_SELECT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + LaunchMail: { + vkey: 'VK_LAUNCH_MAIL', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + LaunchApp2: { + vkey: 'VK_LAUNCH_APP2', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + LaunchApp1: { + vkey: 'VK_LAUNCH_APP1', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + BrowserSearch: { + vkey: 'VK_BROWSER_SEARCH', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + BrowserHome: { + vkey: 'VK_BROWSER_HOME', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + BrowserBack: { + vkey: 'VK_BROWSER_BACK', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + BrowserForward: { + vkey: 'VK_BROWSER_FORWARD', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + BrowserStop: { + vkey: 'VK_BROWSER_STOP', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + BrowserRefresh: { + vkey: 'VK_BROWSER_REFRESH', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + BrowserFavorites: { + vkey: 'VK_BROWSER_FAVORITES', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + } +}); \ No newline at end of file diff --git a/src/vs/workbench/services/keybinding/test/win_por_ptb.txt b/src/vs/workbench/services/keybinding/test/win_por_ptb.txt new file mode 100644 index 0000000000000..1a6f16fcbdc52 --- /dev/null +++ b/src/vs/workbench/services/keybinding/test/win_por_ptb.txt @@ -0,0 +1,284 @@ +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| KeyA | a | A | A | | +| Shift+KeyA | A | Shift+A | Shift+A | | +| Ctrl+Alt+KeyA | --- | Ctrl+Alt+A | Ctrl+Alt+A | | +| Ctrl+Shift+Alt+KeyA | --- | Ctrl+Shift+Alt+A | Ctrl+Shift+Alt+A | | +------------------------------------------------------------------------------------------------------------ +| KeyB | b | B | B | | +| Shift+KeyB | B | Shift+B | Shift+B | | +| Ctrl+Alt+KeyB | --- | Ctrl+Alt+B | Ctrl+Alt+B | | +| Ctrl+Shift+Alt+KeyB | --- | Ctrl+Shift+Alt+B | Ctrl+Shift+Alt+B | | +------------------------------------------------------------------------------------------------------------ +| KeyC | c | C | C | | +| Shift+KeyC | C | Shift+C | Shift+C | | +| Ctrl+Alt+KeyC | ₢ | Ctrl+Alt+C | Ctrl+Alt+C | | +| Ctrl+Shift+Alt+KeyC | --- | Ctrl+Shift+Alt+C | Ctrl+Shift+Alt+C | | +------------------------------------------------------------------------------------------------------------ +| KeyD | d | D | D | | +| Shift+KeyD | D | Shift+D | Shift+D | | +| Ctrl+Alt+KeyD | --- | Ctrl+Alt+D | Ctrl+Alt+D | | +| Ctrl+Shift+Alt+KeyD | --- | Ctrl+Shift+Alt+D | Ctrl+Shift+Alt+D | | +------------------------------------------------------------------------------------------------------------ +| KeyE | e | E | E | | +| Shift+KeyE | E | Shift+E | Shift+E | | +| Ctrl+Alt+KeyE | ° | Ctrl+Alt+E | Ctrl+Alt+E | | +| Ctrl+Shift+Alt+KeyE | --- | Ctrl+Shift+Alt+E | Ctrl+Shift+Alt+E | | +------------------------------------------------------------------------------------------------------------ +| KeyF | f | F | F | | +| Shift+KeyF | F | Shift+F | Shift+F | | +| Ctrl+Alt+KeyF | --- | Ctrl+Alt+F | Ctrl+Alt+F | | +| Ctrl+Shift+Alt+KeyF | --- | Ctrl+Shift+Alt+F | Ctrl+Shift+Alt+F | | +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| KeyG | g | G | G | | +| Shift+KeyG | G | Shift+G | Shift+G | | +| Ctrl+Alt+KeyG | --- | Ctrl+Alt+G | Ctrl+Alt+G | | +| Ctrl+Shift+Alt+KeyG | --- | Ctrl+Shift+Alt+G | Ctrl+Shift+Alt+G | | +------------------------------------------------------------------------------------------------------------ +| KeyH | h | H | H | | +| Shift+KeyH | H | Shift+H | Shift+H | | +| Ctrl+Alt+KeyH | --- | Ctrl+Alt+H | Ctrl+Alt+H | | +| Ctrl+Shift+Alt+KeyH | --- | Ctrl+Shift+Alt+H | Ctrl+Shift+Alt+H | | +------------------------------------------------------------------------------------------------------------ +| KeyI | i | I | I | | +| Shift+KeyI | I | Shift+I | Shift+I | | +| Ctrl+Alt+KeyI | --- | Ctrl+Alt+I | Ctrl+Alt+I | | +| Ctrl+Shift+Alt+KeyI | --- | Ctrl+Shift+Alt+I | Ctrl+Shift+Alt+I | | +------------------------------------------------------------------------------------------------------------ +| KeyJ | j | J | J | | +| Shift+KeyJ | J | Shift+J | Shift+J | | +| Ctrl+Alt+KeyJ | --- | Ctrl+Alt+J | Ctrl+Alt+J | | +| Ctrl+Shift+Alt+KeyJ | --- | Ctrl+Shift+Alt+J | Ctrl+Shift+Alt+J | | +------------------------------------------------------------------------------------------------------------ +| KeyK | k | K | K | | +| Shift+KeyK | K | Shift+K | Shift+K | | +| Ctrl+Alt+KeyK | --- | Ctrl+Alt+K | Ctrl+Alt+K | | +| Ctrl+Shift+Alt+KeyK | --- | Ctrl+Shift+Alt+K | Ctrl+Shift+Alt+K | | +------------------------------------------------------------------------------------------------------------ +| KeyL | l | L | L | | +| Shift+KeyL | L | Shift+L | Shift+L | | +| Ctrl+Alt+KeyL | --- | Ctrl+Alt+L | Ctrl+Alt+L | | +| Ctrl+Shift+Alt+KeyL | --- | Ctrl+Shift+Alt+L | Ctrl+Shift+Alt+L | | +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| KeyM | m | M | M | | +| Shift+KeyM | M | Shift+M | Shift+M | | +| Ctrl+Alt+KeyM | --- | Ctrl+Alt+M | Ctrl+Alt+M | | +| Ctrl+Shift+Alt+KeyM | --- | Ctrl+Shift+Alt+M | Ctrl+Shift+Alt+M | | +------------------------------------------------------------------------------------------------------------ +| KeyN | n | N | N | | +| Shift+KeyN | N | Shift+N | Shift+N | | +| Ctrl+Alt+KeyN | --- | Ctrl+Alt+N | Ctrl+Alt+N | | +| Ctrl+Shift+Alt+KeyN | --- | Ctrl+Shift+Alt+N | Ctrl+Shift+Alt+N | | +------------------------------------------------------------------------------------------------------------ +| KeyO | o | O | O | | +| Shift+KeyO | O | Shift+O | Shift+O | | +| Ctrl+Alt+KeyO | --- | Ctrl+Alt+O | Ctrl+Alt+O | | +| Ctrl+Shift+Alt+KeyO | --- | Ctrl+Shift+Alt+O | Ctrl+Shift+Alt+O | | +------------------------------------------------------------------------------------------------------------ +| KeyP | p | P | P | | +| Shift+KeyP | P | Shift+P | Shift+P | | +| Ctrl+Alt+KeyP | --- | Ctrl+Alt+P | Ctrl+Alt+P | | +| Ctrl+Shift+Alt+KeyP | --- | Ctrl+Shift+Alt+P | Ctrl+Shift+Alt+P | | +------------------------------------------------------------------------------------------------------------ +| KeyQ | q | Q | Q | | +| Shift+KeyQ | Q | Shift+Q | Shift+Q | | +| Ctrl+Alt+KeyQ | / | Ctrl+Alt+Q | Ctrl+Alt+Q | | +| Ctrl+Shift+Alt+KeyQ | --- | Ctrl+Shift+Alt+Q | Ctrl+Shift+Alt+Q | | +------------------------------------------------------------------------------------------------------------ +| KeyR | r | R | R | | +| Shift+KeyR | R | Shift+R | Shift+R | | +| Ctrl+Alt+KeyR | --- | Ctrl+Alt+R | Ctrl+Alt+R | | +| Ctrl+Shift+Alt+KeyR | --- | Ctrl+Shift+Alt+R | Ctrl+Shift+Alt+R | | +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| KeyS | s | S | S | | +| Shift+KeyS | S | Shift+S | Shift+S | | +| Ctrl+Alt+KeyS | --- | Ctrl+Alt+S | Ctrl+Alt+S | | +| Ctrl+Shift+Alt+KeyS | --- | Ctrl+Shift+Alt+S | Ctrl+Shift+Alt+S | | +------------------------------------------------------------------------------------------------------------ +| KeyT | t | T | T | | +| Shift+KeyT | T | Shift+T | Shift+T | | +| Ctrl+Alt+KeyT | --- | Ctrl+Alt+T | Ctrl+Alt+T | | +| Ctrl+Shift+Alt+KeyT | --- | Ctrl+Shift+Alt+T | Ctrl+Shift+Alt+T | | +------------------------------------------------------------------------------------------------------------ +| KeyU | u | U | U | | +| Shift+KeyU | U | Shift+U | Shift+U | | +| Ctrl+Alt+KeyU | --- | Ctrl+Alt+U | Ctrl+Alt+U | | +| Ctrl+Shift+Alt+KeyU | --- | Ctrl+Shift+Alt+U | Ctrl+Shift+Alt+U | | +------------------------------------------------------------------------------------------------------------ +| KeyV | v | V | V | | +| Shift+KeyV | V | Shift+V | Shift+V | | +| Ctrl+Alt+KeyV | --- | Ctrl+Alt+V | Ctrl+Alt+V | | +| Ctrl+Shift+Alt+KeyV | --- | Ctrl+Shift+Alt+V | Ctrl+Shift+Alt+V | | +------------------------------------------------------------------------------------------------------------ +| KeyW | w | W | W | | +| Shift+KeyW | W | Shift+W | Shift+W | | +| Ctrl+Alt+KeyW | ? | Ctrl+Alt+W | Ctrl+Alt+W | | +| Ctrl+Shift+Alt+KeyW | --- | Ctrl+Shift+Alt+W | Ctrl+Shift+Alt+W | | +------------------------------------------------------------------------------------------------------------ +| KeyX | x | X | X | | +| Shift+KeyX | X | Shift+X | Shift+X | | +| Ctrl+Alt+KeyX | --- | Ctrl+Alt+X | Ctrl+Alt+X | | +| Ctrl+Shift+Alt+KeyX | --- | Ctrl+Shift+Alt+X | Ctrl+Shift+Alt+X | | +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| KeyY | y | Y | Y | | +| Shift+KeyY | Y | Shift+Y | Shift+Y | | +| Ctrl+Alt+KeyY | --- | Ctrl+Alt+Y | Ctrl+Alt+Y | | +| Ctrl+Shift+Alt+KeyY | --- | Ctrl+Shift+Alt+Y | Ctrl+Shift+Alt+Y | | +------------------------------------------------------------------------------------------------------------ +| KeyZ | z | Z | Z | | +| Shift+KeyZ | Z | Shift+Z | Shift+Z | | +| Ctrl+Alt+KeyZ | --- | Ctrl+Alt+Z | Ctrl+Alt+Z | | +| Ctrl+Shift+Alt+KeyZ | --- | Ctrl+Shift+Alt+Z | Ctrl+Shift+Alt+Z | | +------------------------------------------------------------------------------------------------------------ +| Digit1 | 1 | 1 | 1 | | +| Shift+Digit1 | ! | Shift+1 | Shift+1 | | +| Ctrl+Alt+Digit1 | ¹ | Ctrl+Alt+1 | Ctrl+Alt+1 | | +| Ctrl+Shift+Alt+Digit1 | --- | Ctrl+Shift+Alt+1 | Ctrl+Shift+Alt+1 | | +------------------------------------------------------------------------------------------------------------ +| Digit2 | 2 | 2 | 2 | | +| Shift+Digit2 | @ | Shift+2 | Shift+2 | | +| Ctrl+Alt+Digit2 | ² | Ctrl+Alt+2 | Ctrl+Alt+2 | | +| Ctrl+Shift+Alt+Digit2 | --- | Ctrl+Shift+Alt+2 | Ctrl+Shift+Alt+2 | | +------------------------------------------------------------------------------------------------------------ +| Digit3 | 3 | 3 | 3 | | +| Shift+Digit3 | # | Shift+3 | Shift+3 | | +| Ctrl+Alt+Digit3 | ³ | Ctrl+Alt+3 | Ctrl+Alt+3 | | +| Ctrl+Shift+Alt+Digit3 | --- | Ctrl+Shift+Alt+3 | Ctrl+Shift+Alt+3 | | +------------------------------------------------------------------------------------------------------------ +| Digit4 | 4 | 4 | 4 | | +| Shift+Digit4 | $ | Shift+4 | Shift+4 | | +| Ctrl+Alt+Digit4 | £ | Ctrl+Alt+4 | Ctrl+Alt+4 | | +| Ctrl+Shift+Alt+Digit4 | --- | Ctrl+Shift+Alt+4 | Ctrl+Shift+Alt+4 | | +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| Digit5 | 5 | 5 | 5 | | +| Shift+Digit5 | % | Shift+5 | Shift+5 | | +| Ctrl+Alt+Digit5 | ¢ | Ctrl+Alt+5 | Ctrl+Alt+5 | | +| Ctrl+Shift+Alt+Digit5 | --- | Ctrl+Shift+Alt+5 | Ctrl+Shift+Alt+5 | | +------------------------------------------------------------------------------------------------------------ +| Digit6 | 6 | 6 | 6 | | +| Shift+Digit6 | ¨ | Shift+6 | Shift+6 | | +| Ctrl+Alt+Digit6 | ¬ | Ctrl+Alt+6 | Ctrl+Alt+6 | | +| Ctrl+Shift+Alt+Digit6 | --- | Ctrl+Shift+Alt+6 | Ctrl+Shift+Alt+6 | | +------------------------------------------------------------------------------------------------------------ +| Digit7 | 7 | 7 | 7 | | +| Shift+Digit7 | & | Shift+7 | Shift+7 | | +| Ctrl+Alt+Digit7 | --- | Ctrl+Alt+7 | Ctrl+Alt+7 | | +| Ctrl+Shift+Alt+Digit7 | --- | Ctrl+Shift+Alt+7 | Ctrl+Shift+Alt+7 | | +------------------------------------------------------------------------------------------------------------ +| Digit8 | 8 | 8 | 8 | | +| Shift+Digit8 | * | Shift+8 | Shift+8 | | +| Ctrl+Alt+Digit8 | --- | Ctrl+Alt+8 | Ctrl+Alt+8 | | +| Ctrl+Shift+Alt+Digit8 | --- | Ctrl+Shift+Alt+8 | Ctrl+Shift+Alt+8 | | +------------------------------------------------------------------------------------------------------------ +| Digit9 | 9 | 9 | 9 | | +| Shift+Digit9 | ( | Shift+9 | Shift+9 | | +| Ctrl+Alt+Digit9 | --- | Ctrl+Alt+9 | Ctrl+Alt+9 | | +| Ctrl+Shift+Alt+Digit9 | --- | Ctrl+Shift+Alt+9 | Ctrl+Shift+Alt+9 | | +------------------------------------------------------------------------------------------------------------ +| Digit0 | 0 | 0 | 0 | | +| Shift+Digit0 | ) | Shift+0 | Shift+0 | | +| Ctrl+Alt+Digit0 | --- | Ctrl+Alt+0 | Ctrl+Alt+0 | | +| Ctrl+Shift+Alt+Digit0 | --- | Ctrl+Shift+Alt+0 | Ctrl+Shift+Alt+0 | | +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| Minus | - | - | - | | +| Shift+Minus | _ | Shift+- | Shift+- | | +| Ctrl+Alt+Minus | --- | Ctrl+Alt+- | Ctrl+Alt+- | | +| Ctrl+Shift+Alt+Minus | --- | Ctrl+Shift+Alt+- | Ctrl+Shift+Alt+- | | +------------------------------------------------------------------------------------------------------------ +| Equal | = | = | = | | +| Shift+Equal | + | Shift+= | Shift+= | | +| Ctrl+Alt+Equal | § | Ctrl+Alt+= | Ctrl+Alt+= | | +| Ctrl+Shift+Alt+Equal | --- | Ctrl+Shift+Alt+= | Ctrl+Shift+Alt+= | | +------------------------------------------------------------------------------------------------------------ +| BracketLeft | ´ | [ | ´ | NO | +| Shift+BracketLeft | ` | Shift+[ | Shift+´ | NO | +| Ctrl+Alt+BracketLeft | --- | Ctrl+Alt+[ | Ctrl+Alt+´ | NO | +| Ctrl+Shift+Alt+BracketLeft | --- | Ctrl+Shift+Alt+[ | Ctrl+Shift+Alt+´ | NO | +------------------------------------------------------------------------------------------------------------ +| BracketRight | [ | ] | [ | NO | +| Shift+BracketRight | { | Shift+] | Shift+[ | NO | +| Ctrl+Alt+BracketRight | ª | Ctrl+Alt+] | Ctrl+Alt+[ | NO | +| Ctrl+Shift+Alt+BracketRight | --- | Ctrl+Shift+Alt+] | Ctrl+Shift+Alt+[ | NO | +------------------------------------------------------------------------------------------------------------ +| Backslash | ] | \ | ] | NO | +| Shift+Backslash | } | Shift+\ | Shift+] | NO | +| Ctrl+Alt+Backslash | º | Ctrl+Alt+\ | Ctrl+Alt+] | NO | +| Ctrl+Shift+Alt+Backslash | --- | Ctrl+Shift+Alt+\ | Ctrl+Shift+Alt+] | NO | +------------------------------------------------------------------------------------------------------------ +| IntlHash | --- | null | null | NO | +| Shift+IntlHash | --- | null | null | NO | +| Ctrl+Alt+IntlHash | --- | null | null | NO | +| Ctrl+Shift+Alt+IntlHash | --- | null | null | NO | +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| Semicolon | ç | ; | ç | NO | +| Shift+Semicolon | Ç | Shift+; | Shift+ç | NO | +| Ctrl+Alt+Semicolon | --- | Ctrl+Alt+; | Ctrl+Alt+ç | NO | +| Ctrl+Shift+Alt+Semicolon | --- | Ctrl+Shift+Alt+; | Ctrl+Shift+Alt+ç | NO | +------------------------------------------------------------------------------------------------------------ +| Quote | ~ | ' | ~ | NO | +| Shift+Quote | ^ | Shift+' | Shift+~ | NO | +| Ctrl+Alt+Quote | --- | Ctrl+Alt+' | Ctrl+Alt+~ | NO | +| Ctrl+Shift+Alt+Quote | --- | Ctrl+Shift+Alt+' | Ctrl+Shift+Alt+~ | NO | +------------------------------------------------------------------------------------------------------------ +| Backquote | ' | ` | ' | NO | +| Shift+Backquote | " | Shift+` | Shift+' | NO | +| Ctrl+Alt+Backquote | --- | Ctrl+Alt+` | Ctrl+Alt+' | NO | +| Ctrl+Shift+Alt+Backquote | --- | Ctrl+Shift+Alt+` | Ctrl+Shift+Alt+' | NO | +------------------------------------------------------------------------------------------------------------ +| Comma | , | , | , | | +| Shift+Comma | < | Shift+, | Shift+, | | +| Ctrl+Alt+Comma | --- | Ctrl+Alt+, | Ctrl+Alt+, | | +| Ctrl+Shift+Alt+Comma | --- | Ctrl+Shift+Alt+, | Ctrl+Shift+Alt+, | | +------------------------------------------------------------------------------------------------------------ +| Period | . | . | . | | +| Shift+Period | > | Shift+. | Shift+. | | +| Ctrl+Alt+Period | --- | Ctrl+Alt+. | Ctrl+Alt+. | | +| Ctrl+Shift+Alt+Period | --- | Ctrl+Shift+Alt+. | Ctrl+Shift+Alt+. | | +------------------------------------------------------------------------------------------------------------ +| Slash | ; | / | ; | NO | +| Shift+Slash | : | Shift+/ | Shift+; | NO | +| Ctrl+Alt+Slash | --- | Ctrl+Alt+/ | Ctrl+Alt+; | NO | +| Ctrl+Shift+Alt+Slash | --- | Ctrl+Shift+Alt+/ | Ctrl+Shift+Alt+; | NO | +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| ArrowUp | --- | UpArrow | UpArrow | | +| Shift+ArrowUp | --- | Shift+UpArrow | Shift+UpArrow | | +| Ctrl+Alt+ArrowUp | --- | Ctrl+Alt+UpArrow | Ctrl+Alt+UpArrow | | +| Ctrl+Shift+Alt+ArrowUp | --- | Ctrl+Shift+Alt+UpArrow | Ctrl+Shift+Alt+UpArrow | | +------------------------------------------------------------------------------------------------------------ +| Numpad0 | --- | NumPad0 | NumPad0 | | +| Shift+Numpad0 | --- | Shift+NumPad0 | Shift+NumPad0 | | +| Ctrl+Alt+Numpad0 | --- | Ctrl+Alt+NumPad0 | Ctrl+Alt+NumPad0 | | +| Ctrl+Shift+Alt+Numpad0 | --- | Ctrl+Shift+Alt+NumPad0 | Ctrl+Shift+Alt+NumPad0 | | +------------------------------------------------------------------------------------------------------------ +| IntlBackslash | \ | OEM_102 | \ | NO | +| Shift+IntlBackslash | | | Shift+OEM_102 | Shift+\ | NO | +| Ctrl+Alt+IntlBackslash | --- | Ctrl+Alt+OEM_102 | Ctrl+Alt+\ | NO | +| Ctrl+Shift+Alt+IntlBackslash | --- | Ctrl+Shift+Alt+OEM_102 | Ctrl+Shift+Alt+\ | NO | +------------------------------------------------------------------------------------------------------------ +| IntlRo | / | ABNT_C1 | / | NO | +| Shift+IntlRo | ? | Shift+ABNT_C1 | Shift+/ | NO | +| Ctrl+Alt+IntlRo | ° | Ctrl+Alt+ABNT_C1 | Ctrl+Alt+/ | NO | +| Ctrl+Shift+Alt+IntlRo | --- | Ctrl+Shift+Alt+ABNT_C1 | Ctrl+Shift+Alt+/ | NO | +------------------------------------------------------------------------------------------------------------ +| IntlYen | --- | null | null | NO | +| Shift+IntlYen | --- | null | null | NO | +| Ctrl+Alt+IntlYen | --- | null | null | NO | +| Ctrl+Shift+Alt+IntlYen | --- | null | null | NO | +------------------------------------------------------------------------------------------------------------ \ No newline at end of file diff --git a/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts b/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts index a2ff068f70ba2..431bfd0a20b51 100644 --- a/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts +++ b/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts @@ -406,6 +406,69 @@ suite('keyboardMapper - WINDOWS en_us', () => { }); }); + +suite('keyboardMapper - WINDOWS por_ptb', () => { + + let mapper: WindowsKeyboardMapper; + + suiteSetup((done) => { + createKeyboardMapper('win_por_ptb').then((_mapper) => { + mapper = _mapper; + done(); + }, done); + }); + + test('mapping', (done) => { + assertMapping(WRITE_FILE_IF_DIFFERENT, mapper, 'win_por_ptb.txt', done); + }); + + test('resolveKeyboardEvent Ctrl+[IntlRo]', () => { + assertResolveKeyboardEvent( + mapper, + { + ctrlKey: true, + shiftKey: false, + altKey: false, + metaKey: false, + keyCode: KeyCode.ABNT_C1, + code: null + }, + { + label: 'Ctrl+/', + ariaLabel: 'Control+/', + electronAccelerator: 'Ctrl+ABNT_C1', + userSettingsLabel: 'ctrl+abnt_c1', + isWYSIWYG: false, + isChord: false, + dispatchParts: ['ctrl+ABNT_C1', null], + } + ); + }); + + test('resolveKeyboardEvent Ctrl+[NumpadComma]', () => { + assertResolveKeyboardEvent( + mapper, + { + ctrlKey: true, + shiftKey: false, + altKey: false, + metaKey: false, + keyCode: KeyCode.ABNT_C2, + code: null + }, + { + label: 'Ctrl+.', + ariaLabel: 'Control+.', + electronAccelerator: 'Ctrl+ABNT_C2', + userSettingsLabel: 'ctrl+abnt_c2', + isWYSIWYG: false, + isChord: false, + dispatchParts: ['ctrl+ABNT_C2', null], + } + ); + }); +}); + suite('misc', () => { test('issue #23513: Toggle Sidebar Visibility and Go to Line display same key mapping in Arabic keyboard', () => { const mapper = new WindowsKeyboardMapper({ From b9988fedd62373037585a558336efce70f6055cd Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 11 May 2017 11:28:12 +0200 Subject: [PATCH 0418/2747] Revert "fix #24435" This reverts commit f3ffc2ed9b0318f236201aa2c0447eec242f4738. --- src/vs/workbench/electron-browser/bootstrap/index.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index e886c4a346942..bedcde4bd9dc0 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -20,12 +20,7 @@ const remote = electron.remote; const ipc = electron.ipcRenderer; process.lazyEnv = new Promise(function (resolve) { - const handle = setTimeout(function () { - resolve(); - console.warn('renderer did not receive lazyEnv in time') - }, 2000); ipc.once('vscode:acceptShellEnv', function (event, shellEnv) { - clearTimeout(handle); assign(process.env, shellEnv); resolve(process.env); }); From a5b701b99e8889ac5308ed2a58bb486c2915101b Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 11 May 2017 11:28:32 +0200 Subject: [PATCH 0419/2747] debug: decorate stackFrame ranges if provided fixes #8851 --- .../debug/browser/debugEditorModelManager.ts | 12 ++++++++++++ .../debug/browser/media/debug.contribution.css | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts b/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts index c404debd95df2..58912bfea85f2 100644 --- a/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts +++ b/src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts @@ -144,6 +144,12 @@ export class DebugEditorModelManager implements IWorkbenchContribution { options: DebugEditorModelManager.TOP_STACK_FRAME_DECORATION, range: columnUntilEOLRange }); + if (stackFrame.range.endLineNumber && stackFrame.range.endColumn) { + result.push({ + options: { className: 'debug-top-stack-frame-range' }, + range: stackFrame.range + }); + } if (this.modelDataMap.has(modelUriStr)) { const modelData = this.modelDataMap.get(modelUriStr); @@ -161,6 +167,12 @@ export class DebugEditorModelManager implements IWorkbenchContribution { options: DebugEditorModelManager.FOCUSED_STACK_FRAME_MARGIN, range }); + if (stackFrame.range.endLineNumber && stackFrame.range.endColumn) { + result.push({ + options: { className: 'debug-focused-stack-frame-range' }, + range: stackFrame.range + }); + } result.push({ options: DebugEditorModelManager.FOCUSED_STACK_FRAME_DECORATION, diff --git a/src/vs/workbench/parts/debug/browser/media/debug.contribution.css b/src/vs/workbench/parts/debug/browser/media/debug.contribution.css index f66a4e2a48c82..7c67f7d14b8a2 100644 --- a/src/vs/workbench/parts/debug/browser/media/debug.contribution.css +++ b/src/vs/workbench/parts/debug/browser/media/debug.contribution.css @@ -13,6 +13,10 @@ background: rgba(255, 255, 102, 0.45); } +.monaco-editor .debug-top-stack-frame-range { + background: #ffeca0; +} + .monaco-editor .debug-top-stack-frame-column::before { background: url('current-arrow.svg') center center no-repeat; } @@ -21,6 +25,10 @@ background: rgba(206, 231, 206, 0.45); } +.monaco-editor .debug-focused-stack-frame-range { + background: rgba(206, 231, 206, 1); +} + .monaco-editor .debug-breakpoint-hint-glyph { background: url('breakpoint-hint.svg') center center no-repeat; } @@ -177,11 +185,19 @@ background: rgba(122, 189, 122, 0.3); } +.monaco-editor.vs-dark .debug-focused-stack-frame-range { + background: rgba(122, 189, 122, 0.5); +} + .monaco-editor.vs-dark .debug-top-stack-frame-line, .monaco-editor.vs-dark .debug-top-stack-frame-exception-line { background-color: rgba(255, 255, 0, 0.2) } +.monaco-editor.vs-dark .debug-top-stack-frame-range { + background-color: rgba(255, 255, 0, 0.3) +} + .monaco-editor.vs-dark .debug-breakpoint-glyph, .monaco-editor.vs-dark .debug-breakpoint-column.debug-breakpoint-glyph-column::before { background: url('breakpoint-dark.svg') center center no-repeat; From 583b14b9afdf14216e42311d2888120925270b24 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 11 May 2017 12:10:15 +0200 Subject: [PATCH 0420/2747] [loc][query] what is "ellapsed" (fixes #26439) --- src/vs/workbench/electron-browser/shell.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 728af5751c199..dae76fa0ddd5c 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -280,7 +280,7 @@ export class WorkbenchShell { private handleNegativePerformanceNumbers(i: IInstantiationService, time: number): void { this.messageService.show(Severity.Warning, { - message: nls.localize('handleNegativePerformanceNumbers', "Something went wrong measuring startup performance numbers (ellapsed: {0}ms). We would like to learn more about this issue.", time), + message: `Something went wrong measuring startup performance numbers (ellapsed: ${time}ms). We would like to learn more about this issue.`, actions: [ i.createInstance(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL), CloseAction From cdac53445d378bb5f116dbaef9026b103caef7f7 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 11 May 2017 12:10:45 +0200 Subject: [PATCH 0421/2747] Fixes #26446: Artificially expand the width of collapsed decorations --- .../browser/viewParts/decorations/decorations.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/browser/viewParts/decorations/decorations.ts b/src/vs/editor/browser/viewParts/decorations/decorations.ts index 19122062c67ec..30434c51b69eb 100644 --- a/src/vs/editor/browser/viewParts/decorations/decorations.ts +++ b/src/vs/editor/browser/viewParts/decorations/decorations.ts @@ -9,7 +9,7 @@ import 'vs/css!./decorations'; import { DynamicViewOverlay } from 'vs/editor/browser/view/dynamicViewOverlay'; import { Range } from 'vs/editor/common/core/range'; import { ViewContext } from 'vs/editor/common/view/viewContext'; -import { RenderingContext } from 'vs/editor/common/view/renderingContext'; +import { RenderingContext, HorizontalRange } from 'vs/editor/common/view/renderingContext'; import { ViewModelDecoration } from 'vs/editor/common/viewModel/viewModel'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; @@ -17,12 +17,14 @@ export class DecorationsOverlay extends DynamicViewOverlay { private _context: ViewContext; private _lineHeight: number; + private _typicalHalfwidthCharacterWidth: number; private _renderResult: string[]; constructor(context: ViewContext) { super(); this._context = context; this._lineHeight = this._context.configuration.editor.lineHeight; + this._typicalHalfwidthCharacterWidth = this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth; this._renderResult = null; this._context.addEventHandler(this); @@ -41,6 +43,9 @@ export class DecorationsOverlay extends DynamicViewOverlay { if (e.lineHeight) { this._lineHeight = this._context.configuration.editor.lineHeight; } + if (e.fontInfo) { + this._typicalHalfwidthCharacterWidth = this._context.configuration.editor.fontInfo.typicalHalfwidthCharacterWidth; + } return true; } public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { @@ -154,6 +159,14 @@ export class DecorationsOverlay extends DynamicViewOverlay { continue; } + if (linesVisibleRanges.length === 1 && linesVisibleRanges[0].ranges.length === 1) { + const singleVisibleRange = linesVisibleRanges[0].ranges[0]; + if (singleVisibleRange.width === 0) { + // collapsed range case => make the decoration visible by faking its width + linesVisibleRanges[0].ranges[0] = new HorizontalRange(singleVisibleRange.left, this._typicalHalfwidthCharacterWidth); + } + } + for (let j = 0, lenJ = linesVisibleRanges.length; j < lenJ; j++) { let lineVisibleRanges = linesVisibleRanges[j]; let lineIndex = lineVisibleRanges.lineNumber - visibleStartLineNumber; From 635ace77e97d830f9cd2ad5b238ed6c3be18e151 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 11 May 2017 12:20:04 +0200 Subject: [PATCH 0422/2747] Add 'Command Palette...' action to the Editor Context Menu (fixes #26442) --- .../quickopen/browser/commandsHandler.ts | 31 +++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts index babd5ed62e214..e127165fe586e 100644 --- a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts @@ -20,14 +20,15 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; import { Registry } from 'vs/platform/platform'; import { QuickOpenHandler, QuickOpenAction } from 'vs/workbench/browser/quickopen'; -import { IEditorAction, IEditor, isCommonCodeEditor } from 'vs/editor/common/editorCommon'; +import { IEditorAction, IEditor, isCommonCodeEditor, ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { matchesWords, matchesPrefix, matchesContiguousSubString, or } from 'vs/base/common/filters'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IMessageService, Severity, IMessageWithAction } from 'vs/platform/message/common/message'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; +import { editorAction, EditorAction } from "vs/editor/common/editorCommonExtensions"; export const ALL_COMMANDS_PREFIX = '>'; export const EDITOR_COMMANDS_PREFIX = '$'; @@ -44,6 +45,30 @@ export class ShowAllCommandsAction extends QuickOpenAction { } } +@editorAction +class CommandPaletteEditorAction extends EditorAction { + + constructor() { + super({ + id: 'workbench.action.showCommands', + label: nls.localize('showCommands.label', "Command Palette..."), + alias: 'Command Palette', + precondition: null, + menuOpts: { + } + }); + } + + public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): TPromise { + const quickOpenService = accessor.get(IQuickOpenService); + + // Show with prefix + quickOpenService.show(ALL_COMMANDS_PREFIX); + + return TPromise.as(null); + } +} + class BaseCommandEntry extends QuickOpenEntryGroup { private keyLabel: string; private keyAriaLabel: string; @@ -405,4 +430,4 @@ export class EditorCommandsHandler extends CommandsHandler { protected includeWorkbenchCommands(): boolean { return false; } -} +} \ No newline at end of file From 46730f7463dd101ff6dbf7b9b14e1edf6ee202aa Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 11 May 2017 14:54:51 +0200 Subject: [PATCH 0423/2747] wire up new controller to keybindings contribution --- .../preferences/browser/keybindingsEditorContribution.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts index e95d1a48d82ec..7f73595d8945b 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts @@ -18,8 +18,7 @@ import * as editorCommon from 'vs/editor/common/editorCommon'; import { ServicesAccessor, registerEditorCommand } from 'vs/editor/common/editorCommonExtensions'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; -import { CodeSnippet } from 'vs/editor/contrib/snippet/common/snippet'; -import { SnippetController } from 'vs/editor/contrib/snippet/common/snippetController'; +import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { SmartSnippetInserter } from 'vs/workbench/parts/preferences/common/smartSnippetInserter'; import { DefineKeybindingOverlayWidget } from 'vs/workbench/parts/preferences/browser/keybindingWidgets'; import { FloatingClickWidget } from 'vs/workbench/parts/preferences/browser/preferencesWidgets'; @@ -131,7 +130,7 @@ export class KeybindingEditorRenderer extends Disposable { snippetText = smartInsertInfo.prepend + snippetText + smartInsertInfo.append; this._editor.setPosition(smartInsertInfo.position); - SnippetController.get(this._editor).run(CodeSnippet.fromTextmate(snippetText), 0, 0); + SnippetController2.get(this._editor).insert(snippetText, 0, 0); } } } @@ -339,4 +338,4 @@ function isInterestingEditorModel(editor: editorCommon.ICommonCodeEditor): boole return INTERESTING_FILE.test(url); } -registerEditorCommand(new DefineKeybindingCommand()); \ No newline at end of file +registerEditorCommand(new DefineKeybindingCommand()); From 36f3b136c28f927f86c63c1b919cece4601c58da Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 11 May 2017 15:36:19 +0200 Subject: [PATCH 0424/2747] rename -> editorSnippets -> snippetSession --- src/vs/editor/contrib/snippet/browser/snippetController2.ts | 2 +- .../snippet/browser/{editorSnippets.ts => snippetSession.ts} | 0 .../browser/{editorSnippets.test.ts => snippetSession.test.ts} | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename src/vs/editor/contrib/snippet/browser/{editorSnippets.ts => snippetSession.ts} (100%) rename src/vs/editor/contrib/snippet/test/browser/{editorSnippets.test.ts => snippetSession.test.ts} (99%) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 39fbe4094454d..99cb214ba6295 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -9,7 +9,7 @@ import { RawContextKey, IContextKey, IContextKeyService, ContextKeyExpr } from ' import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { commonEditorContribution, CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; -import { SnippetSession } from './editorSnippets'; +import { SnippetSession } from './snippetSession'; import { EditorCommand } from 'vs/editor/common/config/config'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; diff --git a/src/vs/editor/contrib/snippet/browser/editorSnippets.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts similarity index 100% rename from src/vs/editor/contrib/snippet/browser/editorSnippets.ts rename to src/vs/editor/contrib/snippet/browser/snippetSession.ts diff --git a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts similarity index 99% rename from src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts rename to src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts index ecd3ede31c39d..3d852975c68ca 100644 --- a/src/vs/editor/contrib/snippet/test/browser/editorSnippets.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts @@ -8,7 +8,7 @@ import * as assert from 'assert'; import { Selection } from 'vs/editor/common/core/selection'; import { Range } from 'vs/editor/common/core/range'; import { IPosition, Position } from 'vs/editor/common/core/position'; -import { SnippetSession } from 'vs/editor/contrib/snippet/browser/editorSnippets'; +import { SnippetSession } from 'vs/editor/contrib/snippet/browser/snippetSession'; import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { mockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; import { Model } from "vs/editor/common/model/model"; From 0db44440a15aa3384212d4bf8dfa9127972d5396 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 11 May 2017 15:57:59 +0200 Subject: [PATCH 0425/2747] update gulp atom electron --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a9b3c8288f848..53e66f176ecea 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "flatpak-bundler": "^0.1.1", "glob": "^5.0.13", "gulp": "^3.8.9", - "gulp-atom-electron": "^1.9.0", + "gulp-atom-electron": "^1.11.0", "gulp-azure-storage": "^0.7.0", "gulp-bom": "^1.0.0", "gulp-buffer": "0.0.2", From 403d7841cce68560c50ce22ca202c96557857a98 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 11 May 2017 16:42:52 +0200 Subject: [PATCH 0426/2747] be a little stricter and leave snippet mode when cursor move out of placeholders --- .../snippet/browser/snippetController2.ts | 5 +- .../contrib/snippet/browser/snippetSession.ts | 59 +++++++++++-------- .../test/browser/snippetSession.test.ts | 22 +++---- 3 files changed, 49 insertions(+), 37 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 99cb214ba6295..57b2b0af6ecd9 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -57,11 +57,12 @@ export class SnippetController2 { this.cancel(); } this._snippet = new SnippetSession(this._editor, template, overwriteBefore, overwriteAfter); + this._snippet.insert(); this._snippetListener = [ this._editor.onDidChangeModel(() => this.cancel()), this._editor.onDidChangeCursorSelection(() => this._updateState()) ]; - this._snippet.insert(); + this._updateState(); } private _updateState(): void { @@ -76,7 +77,7 @@ export class SnippetController2 { return; } - if (this._snippet.isAtFinalPlaceholder || !this._snippet.validateSelections()) { + if (this._snippet.isAtFinalPlaceholder || !this._snippet.isSelectionWithPlaceholders()) { return this.cancel(); } diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index 9d1fb8f41a125..474879194b13b 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -21,7 +21,6 @@ class OneSnippet { private readonly _snippet: TextmateSnippet; private readonly _offset: number; - private _snippetDecoration: string; private _placeholderDecorations: Map; private _placeholderGroups: Placeholder[][]; private _placeholderGroupsIdx: number; @@ -31,7 +30,6 @@ class OneSnippet { inactive: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'snippet-placeholder' }, activeFinal: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'finish-snippet-placeholder' }, inactiveFinal: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'finish-snippet-placeholder' }, - snippet: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges }, }; constructor(editor: ICommonCodeEditor, snippet: TextmateSnippet, offset: number) { @@ -60,13 +58,6 @@ class OneSnippet { this._editor.changeDecorations(accessor => { - // create one decoration for the whole snippets - const range = Range.fromPositions( - model.getPositionAt(this._offset), - model.getPositionAt(this._offset + this._snippet.text.length) - ); - this._snippetDecoration = accessor.addDecoration(range, OneSnippet._decor.snippet); - // create a decoration for each placeholder for (const placeholder of this._snippet.placeholders) { const placeholderOffset = this._snippet.offset(placeholder); @@ -151,8 +142,17 @@ class OneSnippet { return this._snippet.placeholders.length > 0; } - get range() { - return this._snippetDecoration !== undefined && this._editor.getModel().getDecorationRange(this._snippetDecoration); + get placeholderRanges() { + const ret: Range[] = []; + this._placeholderDecorations.forEach((id, placeholder) => { + if (!placeholder.isFinalTabstop) { + const range = this._editor.getModel().getDecorationRange(id); + if (range) { + ret.push(range); + } + } + }); + return ret; } } @@ -307,27 +307,38 @@ export class SnippetSession { return this._snippets[0].hasPlaceholder; } - validateSelections(): boolean { + isSelectionWithPlaceholders(): boolean { const selections = this._editor.getSelections(); if (selections.length < this._snippets.length) { + // this means we started snippet mode with N + // selections and have M (N > M) selections. + // So one snippet is without selection -> cancel return false; } - for (const selection of selections) { - let found = false; - for (const { range } of this._snippets) { - if (!range) { - // all deleted - return false; - } + const ranges: Range[] = []; + for (const snippet of this._snippets) { + ranges.push(...snippet.placeholderRanges); + } + + if (selections.length > ranges.length) { + return false; + } + + // sort selections and ranges by their start position + // and then make sure each selection is contained by + // a placeholder range + selections.sort(Range.compareRangesUsingStarts); + ranges.sort(Range.compareRangesUsingStarts); + + outer: for (const selection of selections) { + let range: Range; + while (range = ranges.shift()) { if (range.containsRange(selection)) { - found = true; - break; + continue outer; } } - if (!found) { - return false; - } + return false; } return true; diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts index 3d852975c68ca..c7a132ff26f8f 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts @@ -299,28 +299,28 @@ suite('SnippetSession', function () { assert.equal(model.getValue(), 'foofarboobarfunction foo() {\n foofarboobarconsole.log(a);\n}'); assertSelections(editor, new Selection(1, 1, 1, 4), new Selection(2, 5, 2, 8)); - assert.equal(session.validateSelections(), true); + assert.equal(session.isSelectionWithPlaceholders(), true); editor.setSelections([new Selection(1, 1, 1, 1)]); - assert.equal(session.validateSelections(), false); + assert.equal(session.isSelectionWithPlaceholders(), false); editor.setSelections([new Selection(1, 6, 1, 6), new Selection(2, 10, 2, 10)]); - assert.equal(session.validateSelections(), true); + assert.equal(session.isSelectionWithPlaceholders(), false); // in snippet, outside placeholder editor.setSelections([new Selection(1, 6, 1, 6), new Selection(2, 10, 2, 10), new Selection(1, 1, 1, 1)]); - assert.equal(session.validateSelections(), true); + assert.equal(session.isSelectionWithPlaceholders(), false); // in snippet, outside placeholder editor.setSelections([new Selection(1, 6, 1, 6), new Selection(2, 10, 2, 10), new Selection(2, 20, 2, 21)]); - assert.equal(session.validateSelections(), false); + assert.equal(session.isSelectionWithPlaceholders(), false); // reset selection to placeholder session.next(); - assert.equal(session.validateSelections(), true); + assert.equal(session.isSelectionWithPlaceholders(), true); assertSelections(editor, new Selection(1, 10, 1, 13), new Selection(2, 14, 2, 17)); // reset selection to placeholder session.next(); - assert.equal(session.validateSelections(), true); + assert.equal(session.isSelectionWithPlaceholders(), true); assert.equal(session.isAtFinalPlaceholder, true); assertSelections(editor, new Selection(1, 13, 1, 13), new Selection(2, 17, 2, 17)); }); @@ -354,10 +354,10 @@ suite('SnippetSession', function () { const session = new SnippetSession(editor, 'farboo$0'); session.insert(); assert.equal(session.isAtFinalPlaceholder, true); - assert.equal(session.validateSelections(), true); + assert.equal(session.isSelectionWithPlaceholders(), false); editor.trigger('test', 'type', { text: 'XXX' }); - assert.equal(session.validateSelections(), false); + assert.equal(session.isSelectionWithPlaceholders(), false); }); test('snippets, typing at beginning', function () { @@ -367,12 +367,12 @@ suite('SnippetSession', function () { session.insert(); editor.setSelection(new Selection(1, 2, 1, 2)); - assert.equal(session.validateSelections(), true); + assert.equal(session.isSelectionWithPlaceholders(), false); assert.equal(session.isAtFinalPlaceholder, true); editor.trigger('test', 'type', { text: 'XXX' }); assert.equal(model.getLineContent(1), 'fXXXfarboounction foo() {'); - assert.equal(session.validateSelections(), true); + assert.equal(session.isSelectionWithPlaceholders(), false); session.next(); assertSelections(editor, new Selection(1, 11, 1, 11)); From 6a8988162e1ddf46eb4624ddbdac6fd02761406d Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 11 May 2017 16:46:04 +0200 Subject: [PATCH 0427/2747] Revert "Revert "fix #24435"" This reverts commit b9988fedd62373037585a558336efce70f6055cd. --- src/vs/workbench/electron-browser/bootstrap/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index bedcde4bd9dc0..e886c4a346942 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -20,7 +20,12 @@ const remote = electron.remote; const ipc = electron.ipcRenderer; process.lazyEnv = new Promise(function (resolve) { + const handle = setTimeout(function () { + resolve(); + console.warn('renderer did not receive lazyEnv in time') + }, 2000); ipc.once('vscode:acceptShellEnv', function (event, shellEnv) { + clearTimeout(handle); assign(process.env, shellEnv); resolve(process.env); }); From e5e1098fbfc38dbd8c5e0d5f204307fadb121d61 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 11 May 2017 16:46:49 +0200 Subject: [PATCH 0428/2747] increase lazyenv timeout --- src/vs/workbench/electron-browser/bootstrap/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index e886c4a346942..99a2c63164dcd 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -23,7 +23,7 @@ process.lazyEnv = new Promise(function (resolve) { const handle = setTimeout(function () { resolve(); console.warn('renderer did not receive lazyEnv in time') - }, 2000); + }, 10000); ipc.once('vscode:acceptShellEnv', function (event, shellEnv) { clearTimeout(handle); assign(process.env, shellEnv); From 8303715913a0b0e0a1745b0baf9484e9778a5588 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 11 May 2017 16:59:23 +0200 Subject: [PATCH 0429/2747] tfs: darwin build --- build/tfs/darwin/build.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 build/tfs/darwin/build.sh diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh new file mode 100755 index 0000000000000..72e0015e938b4 --- /dev/null +++ b/build/tfs/darwin/build.sh @@ -0,0 +1,37 @@ +#!/bin/sh +set -e + +# npm install +./scripts/npm.sh install + +# mixin +npm run gulp -- mixin + +# compile & upload source maps +npm run gulp -- --max_old_space_size=4096 vscode-darwin-min upload-vscode-sourcemaps + +# run tests +./scripts/test.sh --build --reporter dot + +# run integration tests +./scripts/test-integration.sh + +# npm install publish tools +(cd $BUILD_SOURCESDIRECTORY/build/tfs && npm i) + +# set up variables +REPO=`pwd` +ZIP=$REPO/../VSCode-darwin-selfsigned.zip +UNSIGNEDZIP=$REPO/../VSCode-darwin-unsigned.zip +BUILD=$REPO/../VSCode-darwin +PACKAGEJSON=`ls $BUILD/*.app/Contents/Resources/app/package.json` +VERSION=`node -p "require(\"$PACKAGEJSON\").version"` + +# archive unsigned build +( rm -rf $UNSIGNEDZIP ; cd $BUILD && zip -r -X -y $UNSIGNEDZIP * ) + +# publish unsigned build +node build/tfs/out/publish.js $VSCODE_QUALITY darwin archive-unsigned VSCode-darwin-$VSCODE_QUALITY-unsigned.zip $VERSION false $UNSIGNEDZIP + +# create signing request +node build/tfs/out/enqueue.js $VSCODE_QUALITY \ No newline at end of file From 6bc59c14130700f40490dd78385d320c4c6ccd1a Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 11 May 2017 17:11:13 +0200 Subject: [PATCH 0430/2747] wire up controller with suggestions --- .../suggest/browser/suggestController.ts | 25 +++++++++---------- .../debug/electron-browser/replEditor.ts | 4 +-- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestController.ts b/src/vs/editor/contrib/suggest/browser/suggestController.ts index c7577e2fc68a6..04252c5d78cfe 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestController.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestController.ts @@ -21,8 +21,8 @@ import { alert } from 'vs/base/browser/ui/aria/aria'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Range } from 'vs/editor/common/core/range'; -import { CodeSnippet } from 'vs/editor/contrib/snippet/common/snippet'; -import { SnippetController } from 'vs/editor/contrib/snippet/common/snippetController'; +import { SnippetParser } from 'vs/editor/contrib/snippet/common/snippetParser'; +import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { Context as SuggestContext } from './suggest'; import { SuggestModel, State } from './suggestModel'; import { ICompletionItem } from './completionModel'; @@ -177,19 +177,18 @@ export class SuggestController implements IEditorContribution { this._editor.pushUndoStop(); } - if (suggestion.snippetType === 'textmate') { - SnippetController.get(this._editor).insertSnippet( - suggestion.insertText, - suggestion.overwriteBefore + columnDelta, - suggestion.overwriteAfter); - } else { - SnippetController.get(this._editor).run( - CodeSnippet.fromInternal(suggestion.insertText), - suggestion.overwriteBefore + columnDelta, - suggestion.overwriteAfter - ); + let { insertText } = suggestion; + if (suggestion.snippetType !== 'textmate') { + insertText = SnippetParser.escape(insertText); } + SnippetController2.get(this._editor).insert( + insertText, + suggestion.overwriteBefore + columnDelta, + suggestion.overwriteAfter + ); + + if (suggestion.command) { this._commandService.executeCommand(suggestion.command.id, ...suggestion.command.arguments).done(undefined, onUnexpectedError); } diff --git a/src/vs/workbench/parts/debug/electron-browser/replEditor.ts b/src/vs/workbench/parts/debug/electron-browser/replEditor.ts index d1e6177361634..dfa70d783bd4f 100644 --- a/src/vs/workbench/parts/debug/electron-browser/replEditor.ts +++ b/src/vs/workbench/parts/debug/electron-browser/replEditor.ts @@ -17,7 +17,7 @@ import { MenuPreventer } from 'vs/editor/contrib/multicursor/browser/menuPrevent import { SelectionClipboard } from 'vs/editor/contrib/selectionClipboard/electron-browser/selectionClipboard'; import { ContextMenuController } from 'vs/editor/contrib/contextmenu/browser/contextmenu'; import { SuggestController } from 'vs/editor/contrib/suggest/browser/suggestController'; -import { SnippetController } from 'vs/editor/contrib/snippet/common/snippetController'; +import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { TabCompletionController } from 'vs/workbench/parts/snippets/electron-browser/tabCompletion'; import { IThemeService } from 'vs/platform/theme/common/themeService'; @@ -40,7 +40,7 @@ export class ReplInputEditor extends CodeEditorWidget { SelectionClipboard, ContextMenuController, SuggestController, - SnippetController, + SnippetController2, TabCompletionController, ]; } From e1e1edcd21921cf05bd504f2ca16b4b4f14471c3 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 11 May 2017 17:25:13 +0200 Subject: [PATCH 0431/2747] implicit final tabstop for 'modern' snippets --- .../contrib/snippet/common/snippetParser.ts | 17 +++++++---- .../test/browser/snippetParser.test.ts | 28 +++++++++---------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index a54b2b7821f92..4378668eda46f 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -297,7 +297,7 @@ export class SnippetParser { } static parse(template: string): TextmateSnippet { - const marker = new SnippetParser(true, false).parse(template); + const marker = new SnippetParser(true, false).parse(template, true); return new TextmateSnippet(marker); } @@ -316,7 +316,7 @@ export class SnippetParser { return Marker.toString(this.parse(value)); } - parse(value: string): Marker[] { + parse(value: string, insertFinalTabstop?: boolean): Marker[] { const marker: Marker[] = []; this._scanner.text(value); @@ -359,10 +359,15 @@ export class SnippetParser { const placeholderDefaultValues = new Map(); walk(marker, placeholderDefaultValues); - // if (placeholderDefaultValues.size > 0 && !placeholderDefaultValues.has('0')) { - // // snippet uses tabstops but has no final tabstop - // marker.push(new Placeholder('0', [])); - // } + if ( + insertFinalTabstop + && placeholderDefaultValues.size > 0 + && !placeholderDefaultValues.has('0') + ) { + // the snippet uses placeholders but has no + // final tabstop defined -> insert at the end + marker.push(new Placeholder('0', [])); + } return marker; } diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts index 9665f7e14f7f9..faa1f5cdcfc1b 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts @@ -318,13 +318,13 @@ suite('SnippetParser', () => { assert.equal(lengths.length, 0); } - assertLen('text', 4); - assertLen('$1text', 0, 4); - assertLen('te$1xt', 2, 0, 2); + assertLen('text$0', 4, 0); + assertLen('$1text$0', 0, 4, 0); + assertLen('te$1xt$0', 2, 0, 2, 0); assertLen('errorContext: `${1:err}`, error: $0', 15, 0, 3, 10, 0); - assertLen('errorContext: `${1:err}`, error: $1', 15, 0, 3, 10, 0, 3); - assertLen('$TM_SELECTED_TEXT', 0); - assertLen('${TM_SELECTED_TEXT:def}', 0, 3); + assertLen('errorContext: `${1:err}`, error: $1$0', 15, 0, 3, 10, 0, 3, 0); + assertLen('$TM_SELECTED_TEXT$0', 0, 0); + assertLen('${TM_SELECTED_TEXT:def}$0', 0, 3, 0); }); test('TextmateSnippet#offset', () => { @@ -342,21 +342,21 @@ suite('SnippetParser', () => { }); test('TextmateSnippet#placeholder', () => { - let snippet = SnippetParser.parse('te$1xt'); + let snippet = SnippetParser.parse('te$1xt$0'); let placeholders = snippet.placeholders; - assert.equal(placeholders.length, 1); + assert.equal(placeholders.length, 2); - snippet = SnippetParser.parse('te$1xt$1'); + snippet = SnippetParser.parse('te$1xt$1$0'); placeholders = snippet.placeholders; - assert.equal(placeholders.length, 2); + assert.equal(placeholders.length, 3); - snippet = SnippetParser.parse('te$1xt$2'); + snippet = SnippetParser.parse('te$1xt$2$0'); placeholders = snippet.placeholders; - assert.equal(placeholders.length, 2); + assert.equal(placeholders.length, 3); - snippet = SnippetParser.parse('${1:bar${2:foo}bar}'); + snippet = SnippetParser.parse('${1:bar${2:foo}bar}$0'); placeholders = snippet.placeholders; - assert.equal(placeholders.length, 2); + assert.equal(placeholders.length, 3); }); }); From cd6685c06b96171194100867c8a570c5a612291b Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 11 May 2017 17:28:31 +0200 Subject: [PATCH 0432/2747] debug: respect stack frame endLine and endColumn coming from adapter --- src/vs/workbench/parts/debug/common/debugModel.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index 9b4fc2979e91a..a26b1bc46615c 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -446,8 +446,8 @@ export class Thread implements IThread { return new StackFrame(this, rsf.id, source, rsf.name, new Range( rsf.line, rsf.column, - rsf.endLine === undefined ? rsf.line : rsf.endLine, - rsf.endColumn === undefined ? rsf.column : rsf.endColumn + rsf.endLine, + rsf.endColumn )); }); }, (err: Error) => { From ec449b5e19d6394f0bfa231a0926969807c24a5e Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 11 May 2017 17:55:43 +0200 Subject: [PATCH 0433/2747] test for later --- .../test/browser/snippetSession.test.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts index c7a132ff26f8f..c5544130cc648 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts @@ -378,6 +378,24 @@ suite('SnippetSession', function () { assertSelections(editor, new Selection(1, 11, 1, 11)); }); + // test('snippets, typing with nested placeholder', function () { + + // editor.setSelection(new Selection(1, 1, 1, 1)); + // const session = new SnippetSession(editor, 'This ${1:is ${2:nested}}.$0'); + // session.insert(); + // assertSelections(editor, new Selection(1, 6, 1, 15)); + + // session.next(); + // assertSelections(editor, new Selection(1, 9, 1, 15)); + + // editor.trigger('test', 'deleteLeft', {}); + // assertSelections(editor, new Selection(1, 9, 1, 9)); + + // editor.trigger('test', 'type', { text: 'XXX' }); + // session.prev(); + // assertSelections(editor, new Selection(1, 6, 1, 12)); + // }); + test('snippets, snippet with variables', function () { const session = new SnippetSession(editor, '@line=$TM_LINE_NUMBER$0'); session.insert(); From 625ce8fe2867f6ea091817877d22dca1cf853856 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 11 May 2017 17:57:54 +0200 Subject: [PATCH 0434/2747] Implement select command for tree views --- src/vs/workbench/api/node/mainThreadExplorerView.ts | 8 +++++--- src/vs/workbench/parts/explorers/browser/explorerView.ts | 7 ++++++- src/vs/workbench/parts/explorers/common/explorer.ts | 1 + 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/api/node/mainThreadExplorerView.ts b/src/vs/workbench/api/node/mainThreadExplorerView.ts index 4ffaa3977c200..8028c7069ec4a 100644 --- a/src/vs/workbench/api/node/mainThreadExplorerView.ts +++ b/src/vs/workbench/api/node/mainThreadExplorerView.ts @@ -73,9 +73,11 @@ class TreeExplorerNodeProvider implements IExplorerViewDataProvider { return node.contextKey; } - executeCommand(node: ITreeNode): TPromise { - return this._proxy.$getInternalCommand(this.id, node).then(command => { - return this.commandService.executeCommand(command.id, ...command.arguments); + select(node: ITreeNode): void { + this._proxy.$getInternalCommand(this.id, node).then(command => { + if (command) { + this.commandService.executeCommand(command.id, ...command.arguments); + } }); } } diff --git a/src/vs/workbench/parts/explorers/browser/explorerView.ts b/src/vs/workbench/parts/explorers/browser/explorerView.ts index 7e11e5fca636e..7b7d6f375d2d3 100644 --- a/src/vs/workbench/parts/explorers/browser/explorerView.ts +++ b/src/vs/workbench/parts/explorers/browser/explorerView.ts @@ -135,7 +135,12 @@ class TreeExplorerView extends CollapsibleViewletView { this.toDispose.push(attachListStyler(tree, this.themeService)); this.toDispose.push(this.listService.register(tree, [this.viewFocusContext])); - + tree.addListener('selection', (event: any) => { + const selection = tree.getSelection()[0]; + if (selection) { + this.dataProvider.select(selection); + } + }); return tree; } diff --git a/src/vs/workbench/parts/explorers/common/explorer.ts b/src/vs/workbench/parts/explorers/common/explorer.ts index b6a1731fb9b06..338b63463de5a 100644 --- a/src/vs/workbench/parts/explorers/common/explorer.ts +++ b/src/vs/workbench/parts/explorers/common/explorer.ts @@ -33,4 +33,5 @@ export interface IExplorerViewDataProvider { getLabel(element: T): string; getContextKey(element: T): string; hasChildren(element: T): boolean; + select(element: T): void; } From 705847ee6b469f5d5058af1598407149d0ce7a64 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 11 May 2017 18:11:45 +0200 Subject: [PATCH 0435/2747] tfs: darwin wait for signed build --- build/tfs/darwin/build.sh | 5 ++++- package.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index 72e0015e938b4..8ea3d08826330 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -34,4 +34,7 @@ VERSION=`node -p "require(\"$PACKAGEJSON\").version"` node build/tfs/out/publish.js $VSCODE_QUALITY darwin archive-unsigned VSCode-darwin-$VSCODE_QUALITY-unsigned.zip $VERSION false $UNSIGNEDZIP # create signing request -node build/tfs/out/enqueue.js $VSCODE_QUALITY \ No newline at end of file +node build/tfs/out/enqueue.js $VSCODE_QUALITY + +# wait for signed build +node build/tfs/out/waitForSignedBuild.js $VSCODE_QUALITY $VERSION \ No newline at end of file diff --git a/package.json b/package.json index 53e66f176ecea..ebe68177df380 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev", "version": "1.13.0", "electronVersion": "1.6.6", - "distro": "866fd532378acbb246f02ed97397e3f0f4dbc345", + "distro": "ca3585925fd1e7743ee4cba31a57c09960152346", "author": { "name": "Microsoft Corporation" }, From 97f1fc61f392c079cfa42b7a7556719431f5fa6e Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 11 May 2017 19:37:52 +0200 Subject: [PATCH 0436/2747] tfs: darwin build --- build/tfs/darwin/build.sh | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index 8ea3d08826330..f1faaca849dbe 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -37,4 +37,4 @@ node build/tfs/out/publish.js $VSCODE_QUALITY darwin archive-unsigned VSCode-dar node build/tfs/out/enqueue.js $VSCODE_QUALITY # wait for signed build -node build/tfs/out/waitForSignedBuild.js $VSCODE_QUALITY $VERSION \ No newline at end of file +node build/tfs/out/waitForSignedBuild.js $VSCODE_QUALITY \ No newline at end of file diff --git a/package.json b/package.json index ebe68177df380..4f20135e41c7d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev", "version": "1.13.0", "electronVersion": "1.6.6", - "distro": "ca3585925fd1e7743ee4cba31a57c09960152346", + "distro": "a19a3b432030a478afa61b438c9a0dfd8f84f893", "author": { "name": "Microsoft Corporation" }, From 0d5c9f418b2c68dd87bffb8c481ebbb0022e9a41 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 11 May 2017 10:48:48 -0700 Subject: [PATCH 0437/2747] Remove Need for File Extensions in TypeScript Language Definitions (#26413) Part of #25740 To support TS Server plugins for languages like angular, we will allow extensions to register new langauges for TypeScript to watch. The angular language for example would want ng-html files to also be uploaded to TypeScript for checking The current language definitions all define both a set of language modes they support and a set of file extensions. The file extension part is unnessiary and may be incorrect depending on how a user sets up their `file.associations` in the workspace. This change removes the extensions part so that we always make use of the language mode --- .../src/features/bufferSyncSupport.ts | 4 +- extensions/typescript/src/typescriptMain.ts | 141 +++++++++--------- 2 files changed, 73 insertions(+), 72 deletions(-) diff --git a/extensions/typescript/src/features/bufferSyncSupport.ts b/extensions/typescript/src/features/bufferSyncSupport.ts index 9e9858902e486..83d5b98b77519 100644 --- a/extensions/typescript/src/features/bufferSyncSupport.ts +++ b/extensions/typescript/src/features/bufferSyncSupport.ts @@ -107,7 +107,6 @@ export default class BufferSyncSupport { private _validate: boolean; private modeIds: ObjectMap; - private extensions: ObjectMap; private diagnostics: Diagnostics; private disposables: Disposable[] = []; private syncedBuffers: ObjectMap; @@ -119,12 +118,11 @@ export default class BufferSyncSupport { private emitQueue: LinkedMap; private checkGlobalTSCVersion: boolean; - constructor(client: ITypescriptServiceClient, modeIds: string[], diagnostics: Diagnostics, extensions: ObjectMap, validate: boolean = true) { + constructor(client: ITypescriptServiceClient, modeIds: string[], diagnostics: Diagnostics, validate: boolean = true) { this.client = client; this.modeIds = Object.create(null); modeIds.forEach(modeId => this.modeIds[modeId] = true); this.diagnostics = diagnostics; - this.extensions = extensions; this._validate = validate; this.projectValidationRequested = false; diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index a6e3f4b891257..99e107b9ce681 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -9,7 +9,7 @@ * ------------------------------------------------------------------------------------------ */ 'use strict'; -import { env, languages, commands, workspace, window, ExtensionContext, Memento, IndentAction, Diagnostic, DiagnosticCollection, Range, Disposable, Uri, MessageItem, TextEditor, DiagnosticSeverity } from 'vscode'; +import { env, languages, commands, workspace, window, ExtensionContext, Memento, IndentAction, Diagnostic, DiagnosticCollection, Range, Disposable, Uri, MessageItem, TextEditor, DiagnosticSeverity, TextDocument } from 'vscode'; // This must be the first statement otherwise modules might got loaded with // the wrong locale. @@ -54,7 +54,6 @@ interface LanguageDescription { id: string; diagnosticSource: string; modeIds: string[]; - extensions: string[]; configFile: string; } @@ -79,14 +78,12 @@ export function activate(context: ExtensionContext): void { id: 'typescript', diagnosticSource: 'ts', modeIds: [MODE_ID_TS, MODE_ID_TSX], - extensions: ['.ts', '.tsx'], configFile: 'tsconfig.json' }, { id: 'javascript', diagnosticSource: 'js', modeIds: [MODE_ID_JS, MODE_ID_JSX], - extensions: ['.js', '.jsx', '.es6', '.mjs'], configFile: 'jsconfig.json' } ], context.storagePath, context.globalState, context.workspaceState); @@ -136,8 +133,6 @@ export function activate(context: ExtensionContext): void { const validateSetting = 'validate.enable'; class LanguageProvider { - - private readonly extensions: ObjectMap; private syntaxDiagnostics: ObjectMap; private readonly currentDiagnostics: DiagnosticCollection; private readonly bufferSyncSupport: BufferSyncSupport; @@ -160,14 +155,11 @@ class LanguageProvider { private readonly client: TypeScriptServiceClient, private readonly description: LanguageDescription ) { - this.extensions = Object.create(null); - description.extensions.forEach(extension => this.extensions[extension] = true); - this.bufferSyncSupport = new BufferSyncSupport(client, description.modeIds, { delete: (file: string) => { this.currentDiagnostics.delete(client.asUrl(file)); } - }, this.extensions); + }); this.syntaxDiagnostics = Object.create(null); this.currentDiagnostics = languages.createDiagnosticCollection(description.id); @@ -334,13 +326,20 @@ class LanguageProvider { } } - public handles(file: string): boolean { - const extension = path.extname(file); - if ((extension && this.extensions[extension]) || this.bufferSyncSupport.handles(file)) { + public handles(file: string, doc: TextDocument): boolean { + if (doc && this.description.modeIds.indexOf(doc.languageId) >= 0) { return true; } + + if (this.bufferSyncSupport.handles(file)) { + return true; + } + const basename = path.basename(file); - return !!basename && basename === this.description.configFile; + if (!!basename && basename === this.description.configFile) { + return true; + } + return false; } public get id(): string { @@ -558,14 +557,15 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { }); } - private findLanguage(file: string): LanguageProvider | null { - for (let i = 0; i < this.languages.length; i++) { - let language = this.languages[i]; - if (language.handles(file)) { - return language; + private findLanguage(file: string): Thenable { + return workspace.openTextDocument(file).then((doc: TextDocument) => { + for (const language of this.languages) { + if (language.handles(file, doc)) { + return language; + } } - } - return null; + return null; + }, () => null); } private triggerAllDiagnostics() { @@ -580,22 +580,24 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { } /* internal */ syntaxDiagnosticsReceived(event: Proto.DiagnosticEvent): void { - let body = event.body; + const body = event.body; if (body && body.diagnostics) { - let language = this.findLanguage(body.file); - if (language) { - language.syntaxDiagnosticsReceived(body.file, this.createMarkerDatas(body.diagnostics, language.diagnosticSource)); - } + this.findLanguage(body.file).then(language => { + if (language) { + language.syntaxDiagnosticsReceived(body.file, this.createMarkerDatas(body.diagnostics, language.diagnosticSource)); + } + }); } } /* internal */ semanticDiagnosticsReceived(event: Proto.DiagnosticEvent): void { - let body = event.body; + const body = event.body; if (body && body.diagnostics) { - let language = this.findLanguage(body.file); - if (language) { - language.semanticDiagnosticsReceived(body.file, this.createMarkerDatas(body.diagnostics, language.diagnosticSource)); - } + this.findLanguage(body.file).then(language => { + if (language) { + language.semanticDiagnosticsReceived(body.file, this.createMarkerDatas(body.diagnostics, language.diagnosticSource)); + } + }); } /* if (Is.defined(body.queueLength)) { @@ -611,47 +613,48 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { return; } - const language = body.triggerFile ? this.findLanguage(body.triggerFile) : this.findLanguage(body.configFile); - if (!language) { - return; - } - if (body.diagnostics.length === 0) { - language.configFileDiagnosticsReceived(body.configFile, []); - } else if (body.diagnostics.length >= 1) { - workspace.openTextDocument(Uri.file(body.configFile)).then((document) => { - let curly: [number, number, number] | undefined = undefined; - let nonCurly: [number, number, number] | undefined = undefined; - let diagnostic: Diagnostic; - for (let index = 0; index < document.lineCount; index++) { - const line = document.lineAt(index); - const text = line.text; - const firstNonWhitespaceCharacterIndex = line.firstNonWhitespaceCharacterIndex; - if (firstNonWhitespaceCharacterIndex < text.length) { - if (text.charAt(firstNonWhitespaceCharacterIndex) === '{') { - curly = [index, firstNonWhitespaceCharacterIndex, firstNonWhitespaceCharacterIndex + 1]; - break; - } else { - const matches = /\s*([^\s]*)(?:\s*|$)/.exec(text.substr(firstNonWhitespaceCharacterIndex)); - if (matches && matches.length >= 1) { - nonCurly = [index, firstNonWhitespaceCharacterIndex, firstNonWhitespaceCharacterIndex + matches[1].length]; + (body.triggerFile ? this.findLanguage(body.triggerFile) : this.findLanguage(body.configFile)).then(language => { + if (!language) { + return; + } + if (body.diagnostics.length === 0) { + language.configFileDiagnosticsReceived(body.configFile, []); + } else if (body.diagnostics.length >= 1) { + workspace.openTextDocument(Uri.file(body.configFile)).then((document) => { + let curly: [number, number, number] | undefined = undefined; + let nonCurly: [number, number, number] | undefined = undefined; + let diagnostic: Diagnostic; + for (let index = 0; index < document.lineCount; index++) { + const line = document.lineAt(index); + const text = line.text; + const firstNonWhitespaceCharacterIndex = line.firstNonWhitespaceCharacterIndex; + if (firstNonWhitespaceCharacterIndex < text.length) { + if (text.charAt(firstNonWhitespaceCharacterIndex) === '{') { + curly = [index, firstNonWhitespaceCharacterIndex, firstNonWhitespaceCharacterIndex + 1]; + break; + } else { + const matches = /\s*([^\s]*)(?:\s*|$)/.exec(text.substr(firstNonWhitespaceCharacterIndex)); + if (matches && matches.length >= 1) { + nonCurly = [index, firstNonWhitespaceCharacterIndex, firstNonWhitespaceCharacterIndex + matches[1].length]; + } } } } - } - const match = curly || nonCurly; - if (match) { - diagnostic = new Diagnostic(new Range(match[0], match[1], match[0], match[2]), body.diagnostics[0].text); - } else { - diagnostic = new Diagnostic(new Range(0, 0, 0, 0), body.diagnostics[0].text); - } - if (diagnostic) { - diagnostic.source = language.diagnosticSource; - language.configFileDiagnosticsReceived(body.configFile, [diagnostic]); - } - }, _error => { - language.configFileDiagnosticsReceived(body.configFile, [new Diagnostic(new Range(0, 0, 0, 0), body.diagnostics[0].text)]); - }); - } + const match = curly || nonCurly; + if (match) { + diagnostic = new Diagnostic(new Range(match[0], match[1], match[0], match[2]), body.diagnostics[0].text); + } else { + diagnostic = new Diagnostic(new Range(0, 0, 0, 0), body.diagnostics[0].text); + } + if (diagnostic) { + diagnostic.source = language.diagnosticSource; + language.configFileDiagnosticsReceived(body.configFile, [diagnostic]); + } + }, _error => { + language.configFileDiagnosticsReceived(body.configFile, [new Diagnostic(new Range(0, 0, 0, 0), body.diagnostics[0].text)]); + }); + } + }); } private createMarkerDatas(diagnostics: Proto.Diagnostic[], source: string): Diagnostic[] { From 3b3c23c9cbdf3a3ba4c41f860b469a02645e8b66 Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 11 May 2017 11:31:05 -0700 Subject: [PATCH 0438/2747] Fix #26409 --- src/vs/editor/contrib/find/browser/findWidget.ts | 2 +- src/vs/editor/contrib/find/common/findModel.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index ea8efb1bb45da..e909b466c0007 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -540,7 +540,7 @@ export class FindWidget extends Widget implements IOverlayWidget { // Toggle selection button this._toggleSelectionFind = this._register(new SimpleCheckbox({ parent: findPart, - title: NLS_TOGGLE_SELECTION_FIND_TITLE, + title: NLS_TOGGLE_SELECTION_FIND_TITLE + this._keybindingLabelFor(FIND_IDS.ToggleSearchScopeCommand), onChange: () => { if (this._toggleSelectionFind.checked) { let selection = this._codeEditor.getSelection(); diff --git a/src/vs/editor/contrib/find/common/findModel.ts b/src/vs/editor/contrib/find/common/findModel.ts index 526a2ea3cec2c..faa2f4ff92419 100644 --- a/src/vs/editor/contrib/find/common/findModel.ts +++ b/src/vs/editor/contrib/find/common/findModel.ts @@ -59,7 +59,7 @@ export const FIND_IDS = { ToggleCaseSensitiveCommand: 'toggleFindCaseSensitive', ToggleWholeWordCommand: 'toggleFindWholeWord', ToggleRegexCommand: 'toggleFindRegex', - ToggleSearchScopeCommand: 'toggleSearchScope', + ToggleSearchScopeCommand: 'toggleFindInSelection', ReplaceOneAction: 'editor.action.replaceOne', ReplaceAllAction: 'editor.action.replaceAll', SelectAllMatchesAction: 'editor.action.selectAllMatches', From 6b7fe1e471d9698708642e7c9f649938e07bbf02 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Thu, 11 May 2017 23:42:05 +0200 Subject: [PATCH 0439/2747] node-debug@1.13.4 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 7bc920e9bbadf..f6709c3e98d87 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -41,7 +41,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.13.3' }, + { name: 'ms-vscode.node-debug', version: '1.13.4' }, { name: 'ms-vscode.node-debug2', version: '1.12.4' } ]; From 2ef1ba7934a0815f00ef36f64ad87468473ec180 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 11 May 2017 16:56:46 -0700 Subject: [PATCH 0440/2747] Track terminal link underline on the link itself, not the panel Fixes #23621 --- .../terminal/electron-browser/media/terminal.css | 5 +++++ .../parts/terminal/electron-browser/media/xterm.css | 12 +----------- .../terminal/electron-browser/terminalLinkHandler.ts | 11 ++++++++++- .../parts/terminal/electron-browser/terminalPanel.ts | 7 ------- 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css b/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css index bbd66f6978d2b..f35dde259bf6f 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css @@ -63,6 +63,11 @@ font-weight: normal !important; } +.monaco-workbench .panel.integrated-terminal .xterm a.active { + cursor: pointer; + text-decoration: underline; +} + /* Terminal actions */ /* Light theme */ diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css b/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css index e8a7ad1348d1b..e3c2b46479515 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css @@ -51,17 +51,7 @@ .monaco-workbench .panel.integrated-terminal .xterm a { color: inherit; - cursor: text; - text-decoration: none; -} - -.monaco-workbench .panel.integrated-terminal.ctrlcmd-held .xterm a:hover { - cursor: pointer; - text-decoration: underline; -} - -.monaco-workbench .panel.integrated-terminal.ctrlcmd-held .xterm a.xterm-invalid-link:hover { - cursor: text; + cursor: inherit; text-decoration: none; } diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts index 426d16167bae9..7eb83c449540f 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts @@ -56,6 +56,7 @@ export type XtermLinkMatcherValidationCallback = (uri: string, element: HTMLElem export class TerminalLinkHandler { private _tooltipDisposables: IDisposable[] = []; + private _tooltipMouseMoveDisposable: IDisposable; private _widgetManager: TerminalWidgetManager; private _localLinkPattern: RegExp; @@ -165,7 +166,11 @@ export class TerminalLinkHandler { private _addTooltipEventListeners(element: HTMLElement): void { let timeout = null; let isMessageShowing = false; - this._tooltipDisposables.push(dom.addDisposableListener(element, dom.EventType.MOUSE_OVER, () => { + this._tooltipDisposables.push(dom.addDisposableListener(element, dom.EventType.MOUSE_OVER, e => { + element.classList.toggle('active', platform.isMacintosh ? e.metaKey : e.ctrlKey); + this._tooltipMouseMoveDisposable = dom.addDisposableListener(element, dom.EventType.MOUSE_MOVE, e => { + element.classList.toggle('active', platform.isMacintosh ? e.metaKey : e.ctrlKey); + }); timeout = setTimeout(() => { let message: string; if (platform.isMacintosh) { @@ -178,6 +183,10 @@ export class TerminalLinkHandler { }, 500); })); this._tooltipDisposables.push(dom.addDisposableListener(element, dom.EventType.MOUSE_OUT, () => { + element.classList.remove('active'); + if (this._tooltipMouseMoveDisposable) { + this._tooltipMouseMoveDisposable.dispose(); + } clearTimeout(timeout); this._widgetManager.closeMessage(); isMessageShowing = false; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index ee895a95919a4..89dcbae71dab6 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -151,9 +151,6 @@ export class TerminalPanel extends Panel { } private _attachEventListeners(): void { - this._register(DOM.addDisposableListener(window, DOM.EventType.KEY_DOWN, (e: KeyboardEvent) => this._refreshCtrlHeld(e))); - this._register(DOM.addDisposableListener(window, DOM.EventType.KEY_UP, (e: KeyboardEvent) => this._refreshCtrlHeld(e))); - this._register(DOM.addDisposableListener(window, DOM.EventType.FOCUS, (e: KeyboardEvent) => this._refreshCtrlHeld(e))); this._register(DOM.addDisposableListener(this._parentDomElement, 'mousedown', (event: MouseEvent) => { if (this._terminalService.terminalInstances.length === 0) { return; @@ -215,10 +212,6 @@ export class TerminalPanel extends Panel { })); } - private _refreshCtrlHeld(e: KeyboardEvent): void { - this._parentDomElement.classList.toggle('ctrlcmd-held', platform.isMacintosh ? e.metaKey : e.ctrlKey); - } - private _updateTheme(theme?: ITheme): void { if (!theme) { theme = this.themeService.getTheme(); From 4ffd4a0147bb6475133e6936da77f71a6627d4ae Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 11 May 2017 17:22:17 -0700 Subject: [PATCH 0441/2747] Don't dispose terminal link hover handlers too early Fixes #23484 --- .../electron-browser/terminalInstance.ts | 6 +++--- .../electron-browser/terminalLinkHandler.ts | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 807ae0a089b80..7dcd6d7eef29c 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -324,6 +324,9 @@ export class TerminalInstance implements ITerminalInstance { } public dispose(): void { + if (this._linkHandler) { + this._linkHandler.dispose(); + } if (this._xterm && this._xterm.element) { this._hadFocusOnExit = DOM.hasClass(this._xterm.element, 'focus'); } @@ -492,9 +495,6 @@ export class TerminalInstance implements ITerminalInstance { if (this._widgetManager) { this._widgetManager.closeMessage(); } - if (this._linkHandler) { - this._linkHandler.disposeTooltipListeners(); - } if (this._xterm) { this._xterm.write(message.content); } diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts index 7eb83c449540f..49df15b331ac1 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts @@ -55,8 +55,8 @@ export type XtermLinkMatcherHandler = (event: MouseEvent, uri: string) => boolea export type XtermLinkMatcherValidationCallback = (uri: string, element: HTMLElement, callback: (isValid: boolean) => void) => void; export class TerminalLinkHandler { - private _tooltipDisposables: IDisposable[] = []; - private _tooltipMouseMoveDisposable: IDisposable; + private _hoverDisposables: IDisposable[] = []; + private _mouseMoveDisposable: IDisposable; private _widgetManager: TerminalWidgetManager; private _localLinkPattern: RegExp; @@ -110,8 +110,9 @@ export class TerminalLinkHandler { }); } - public disposeTooltipListeners(): void { - this._tooltipDisposables = dispose(this._tooltipDisposables); + public dispose(): void { + this._hoverDisposables = dispose(this._hoverDisposables); + this._mouseMoveDisposable = dispose(this._mouseMoveDisposable); } private _wrapLinkHandler(handler: (uri: string) => boolean | void): XtermLinkMatcherHandler { @@ -166,9 +167,9 @@ export class TerminalLinkHandler { private _addTooltipEventListeners(element: HTMLElement): void { let timeout = null; let isMessageShowing = false; - this._tooltipDisposables.push(dom.addDisposableListener(element, dom.EventType.MOUSE_OVER, e => { + this._hoverDisposables.push(dom.addDisposableListener(element, dom.EventType.MOUSE_OVER, e => { element.classList.toggle('active', platform.isMacintosh ? e.metaKey : e.ctrlKey); - this._tooltipMouseMoveDisposable = dom.addDisposableListener(element, dom.EventType.MOUSE_MOVE, e => { + this._mouseMoveDisposable = dom.addDisposableListener(element, dom.EventType.MOUSE_MOVE, e => { element.classList.toggle('active', platform.isMacintosh ? e.metaKey : e.ctrlKey); }); timeout = setTimeout(() => { @@ -182,10 +183,10 @@ export class TerminalLinkHandler { isMessageShowing = true; }, 500); })); - this._tooltipDisposables.push(dom.addDisposableListener(element, dom.EventType.MOUSE_OUT, () => { + this._hoverDisposables.push(dom.addDisposableListener(element, dom.EventType.MOUSE_OUT, () => { element.classList.remove('active'); - if (this._tooltipMouseMoveDisposable) { - this._tooltipMouseMoveDisposable.dispose(); + if (this._mouseMoveDisposable) { + this._mouseMoveDisposable.dispose(); } clearTimeout(timeout); this._widgetManager.closeMessage(); From 590c5f1fc27e7dcf52d946341214759c2f42e2c3 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 11 May 2017 21:24:25 -0700 Subject: [PATCH 0442/2747] Remove go to implementaiton from context menu Fixes #25913 --- .../editor/contrib/goToDeclaration/browser/goToDeclaration.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts index e2e84d0d951f3..9790e837d9108 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts @@ -276,10 +276,6 @@ export class GoToImplementationAction extends ImplementationAction { kbOpts: { kbExpr: EditorContextKeys.textFocus, primary: KeyMod.CtrlCmd | KeyCode.F12 - }, - menuOpts: { - group: 'navigation', - order: 1.3 } }); } From e36e70707d5e2386be848aef5d81a3b8fad88019 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 11 May 2017 21:33:20 -0700 Subject: [PATCH 0443/2747] Added go to implementaiton and go to definition to go menu. Fixes #26461 --- src/vs/code/electron-main/menus.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 90b2eda68ec7f..d6dc264d311d1 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -803,6 +803,8 @@ export class VSCodeMenu { const gotoSymbolInFile = this.createMenuItem(nls.localize({ key: 'miGotoSymbolInFile', comment: ['&& denotes a mnemonic'] }, "Go to &&Symbol in File..."), 'workbench.action.gotoSymbol'); const gotoSymbolInWorkspace = this.createMenuItem(nls.localize({ key: 'miGotoSymbolInWorkspace', comment: ['&& denotes a mnemonic'] }, "Go to Symbol in &&Workspace..."), 'workbench.action.showAllSymbols'); const gotoDefinition = this.createMenuItem(nls.localize({ key: 'miGotoDefinition', comment: ['&& denotes a mnemonic'] }, "Go to &&Definition"), 'editor.action.goToDeclaration'); + const gotoTypeDefinition = this.createMenuItem(nls.localize({ key: 'miGotoTypeDefinition', comment: ['&& denotes a mnemonic'] }, "Go to &&Type Definition"), 'editor.action.goToTypeDefinition'); + const goToImplementation = this.createMenuItem(nls.localize({ key: 'miGotoImplementation', comment: ['&& denotes a mnemonic'] }, "Go to &&Implementation"), 'editor.action.goToImplementation'); const gotoLine = this.createMenuItem(nls.localize({ key: 'miGotoLine', comment: ['&& denotes a mnemonic'] }, "Go to &&Line..."), 'workbench.action.gotoLine'); [ @@ -816,6 +818,8 @@ export class VSCodeMenu { gotoSymbolInFile, gotoSymbolInWorkspace, gotoDefinition, + gotoTypeDefinition, + goToImplementation, gotoLine ].forEach(item => gotoMenu.append(item)); } From f6ab171ab619a988b84fd1b91bb76e65847115a2 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 12 May 2017 07:59:00 +0200 Subject: [PATCH 0444/2747] :lipstick: --- .../quickopen/browser/commandsHandler.ts | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts index e127165fe586e..dbe683fb45b10 100644 --- a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts @@ -70,12 +70,14 @@ class CommandPaletteEditorAction extends EditorAction { } class BaseCommandEntry extends QuickOpenEntryGroup { + private commandId: string; private keyLabel: string; private keyAriaLabel: string; private label: string; private alias: string; constructor( + commandId: string, keyLabel: string, keyAriaLabel: string, label: string, @@ -87,6 +89,7 @@ class BaseCommandEntry extends QuickOpenEntryGroup { ) { super(); + this.commandId = commandId; this.keyLabel = keyLabel; this.keyAriaLabel = keyAriaLabel; this.label = label; @@ -100,6 +103,10 @@ class BaseCommandEntry extends QuickOpenEntryGroup { this.setHighlights(labelHighlights, null, aliasHighlights); } + public getCommandId(): string { + return this.commandId; + } + public getLabel(): string { return this.label; } @@ -155,6 +162,7 @@ class CommandEntry extends BaseCommandEntry { private actionDescriptor: SyncActionDescriptor; constructor( + commandId: string, keyLabel: string, keyAriaLabel: string, label: string, @@ -166,7 +174,7 @@ class CommandEntry extends BaseCommandEntry { @IMessageService messageService: IMessageService, @ITelemetryService telemetryService: ITelemetryService ) { - super(keyLabel, keyAriaLabel, label, meta, labelHighlights, aliasHighlights, messageService, telemetryService); + super(commandId, keyLabel, keyAriaLabel, label, meta, labelHighlights, aliasHighlights, messageService, telemetryService); this.actionDescriptor = actionDescriptor; } @@ -187,6 +195,7 @@ class EditorActionCommandEntry extends BaseCommandEntry { private action: IEditorAction; constructor( + commandId: string, keyLabel: string, keyAriaLabel: string, label: string, @@ -197,7 +206,7 @@ class EditorActionCommandEntry extends BaseCommandEntry { @IMessageService messageService: IMessageService, @ITelemetryService telemetryService: ITelemetryService ) { - super(keyLabel, keyAriaLabel, label, meta, labelHighlights, aliasHighlights, messageService, telemetryService); + super(commandId, keyLabel, keyAriaLabel, label, meta, labelHighlights, aliasHighlights, messageService, telemetryService); this.action = action; } @@ -230,6 +239,7 @@ class ActionCommandEntry extends BaseCommandEntry { private action: IAction; constructor( + commandId: string, keyLabel: string, keyAriaLabel: string, label: string, @@ -240,7 +250,7 @@ class ActionCommandEntry extends BaseCommandEntry { @IMessageService messageService: IMessageService, @ITelemetryService telemetryService: ITelemetryService ) { - super(keyLabel, keyAriaLabel, label, alias, labelHighlights, aliasHighlights, messageService, telemetryService); + super(commandId, keyLabel, keyAriaLabel, label, alias, labelHighlights, aliasHighlights, messageService, telemetryService); this.action = action; } @@ -308,7 +318,7 @@ export class CommandsHandler extends QuickOpenHandler { let entries = [...workbenchEntries, ...editorEntries, ...commandEntries]; // Remove duplicates - entries = arrays.distinct(entries, (entry) => entry.getLabel() + entry.getGroupLabel()); + entries = arrays.distinct(entries, entry => entry.getCommandId()); // Sort by name entries = entries.sort((elementA, elementB) => elementA.getLabel().toLowerCase().localeCompare(elementB.getLabel().toLowerCase())); @@ -340,7 +350,7 @@ export class CommandsHandler extends QuickOpenHandler { const labelHighlights = wordFilter(searchValue, label); const aliasHighlights = alias ? wordFilter(searchValue, alias) : null; if (labelHighlights || aliasHighlights) { - entries.push(this.instantiationService.createInstance(CommandEntry, keyLabel, keyAriaLabel, label, alias, labelHighlights, aliasHighlights, actionDescriptor)); + entries.push(this.instantiationService.createInstance(CommandEntry, actionDescriptor.id, keyLabel, keyAriaLabel, label, alias, labelHighlights, aliasHighlights, actionDescriptor)); } } } @@ -353,6 +363,9 @@ export class CommandsHandler extends QuickOpenHandler { for (let i = 0; i < actions.length; i++) { const action = actions[i]; + if (action.id === ShowAllCommandsAction.ID) { + continue; // avoid duplicates + } const keybinding = this.keybindingService.lookupKeybinding(action.id); const keyLabel = keybinding ? keybinding.getLabel() : ''; @@ -366,7 +379,7 @@ export class CommandsHandler extends QuickOpenHandler { const labelHighlights = wordFilter(searchValue, label); const aliasHighlights = alias ? wordFilter(searchValue, alias) : null; if (labelHighlights || aliasHighlights) { - entries.push(this.instantiationService.createInstance(EditorActionCommandEntry, keyLabel, keyAriaLabel, label, alias, labelHighlights, aliasHighlights, action)); + entries.push(this.instantiationService.createInstance(EditorActionCommandEntry, action.id, keyLabel, keyAriaLabel, label, alias, labelHighlights, aliasHighlights, action)); } } } @@ -401,7 +414,7 @@ export class CommandsHandler extends QuickOpenHandler { } const aliasHighlights = alias ? wordFilter(searchValue, alias) : null; if (labelHighlights || aliasHighlights) { - entries.push(this.instantiationService.createInstance(ActionCommandEntry, keyLabel, keyAriaLabel, label, alias, labelHighlights, aliasHighlights, action)); + entries.push(this.instantiationService.createInstance(ActionCommandEntry, action.id, keyLabel, keyAriaLabel, label, alias, labelHighlights, aliasHighlights, action)); } } } From b3961defce008aedacab7c5153907c9eb7f5cb82 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 11 May 2017 23:17:50 -0700 Subject: [PATCH 0445/2747] Fix crash in webview while updating zoom when webcontent is potentially destroyed. Fixes #26509 --- src/vs/workbench/parts/html/browser/webview.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/parts/html/browser/webview.ts b/src/vs/workbench/parts/html/browser/webview.ts index 799ca78bef045..7b81825984dfa 100644 --- a/src/vs/workbench/parts/html/browser/webview.ts +++ b/src/vs/workbench/parts/html/browser/webview.ts @@ -253,6 +253,10 @@ export default class Webview { return; } window.webContents.getZoomFactor(factor => { + if (contents.isDestroyed()) { + return; + } + contents.setZoomFactor(factor); const width = this.parent.clientWidth; From d8df161717157e82f536181e956914e92e169731 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 12 May 2017 09:34:45 +0200 Subject: [PATCH 0446/2747] remove linux build todo --- build/gulpfile.vscode.linux.js | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/build/gulpfile.vscode.linux.js b/build/gulpfile.vscode.linux.js index cc8f75a0c9c80..54c73a538c207 100644 --- a/build/gulpfile.vscode.linux.js +++ b/build/gulpfile.vscode.linux.js @@ -259,20 +259,16 @@ gulp.task('clean-vscode-linux-ia32-rpm', util.rimraf('.build/linux/rpm/i386')); gulp.task('clean-vscode-linux-x64-rpm', util.rimraf('.build/linux/rpm/x86_64')); gulp.task('clean-vscode-linux-arm-rpm', util.rimraf('.build/linux/rpm/armhf')); -// TODO@joao TODO@daniel -// commented out the dependencies to the actual building of VS Code -// we gotta make sure those targets run before these run, in our TFS builds - -gulp.task('vscode-linux-ia32-prepare-deb', ['clean-vscode-linux-ia32-deb'/*, 'vscode-linux-ia32-min'*/], prepareDebPackage('ia32')); -gulp.task('vscode-linux-x64-prepare-deb', ['clean-vscode-linux-x64-deb'/*, 'vscode-linux-x64-min'*/], prepareDebPackage('x64')); -gulp.task('vscode-linux-arm-prepare-deb', ['clean-vscode-linux-arm-deb'/*, 'vscode-linux-arm-min'*/], prepareDebPackage('arm')); +gulp.task('vscode-linux-ia32-prepare-deb', ['clean-vscode-linux-ia32-deb'], prepareDebPackage('ia32')); +gulp.task('vscode-linux-x64-prepare-deb', ['clean-vscode-linux-x64-deb'], prepareDebPackage('x64')); +gulp.task('vscode-linux-arm-prepare-deb', ['clean-vscode-linux-arm-deb'], prepareDebPackage('arm')); gulp.task('vscode-linux-ia32-build-deb', ['vscode-linux-ia32-prepare-deb'], buildDebPackage('ia32')); gulp.task('vscode-linux-x64-build-deb', ['vscode-linux-x64-prepare-deb'], buildDebPackage('x64')); gulp.task('vscode-linux-arm-build-deb', ['vscode-linux-arm-prepare-deb'], buildDebPackage('arm')); -gulp.task('vscode-linux-ia32-prepare-rpm', ['clean-vscode-linux-ia32-rpm'/*, 'vscode-linux-ia32-min'*/], prepareRpmPackage('ia32')); -gulp.task('vscode-linux-x64-prepare-rpm', ['clean-vscode-linux-x64-rpm'/*, 'vscode-linux-x64-min'*/], prepareRpmPackage('x64')); -gulp.task('vscode-linux-arm-prepare-rpm', ['clean-vscode-linux-arm-rpm'/*, 'vscode-linux-arm-min'*/], prepareRpmPackage('arm')); +gulp.task('vscode-linux-ia32-prepare-rpm', ['clean-vscode-linux-ia32-rpm'], prepareRpmPackage('ia32')); +gulp.task('vscode-linux-x64-prepare-rpm', ['clean-vscode-linux-x64-rpm'], prepareRpmPackage('x64')); +gulp.task('vscode-linux-arm-prepare-rpm', ['clean-vscode-linux-arm-rpm'], prepareRpmPackage('arm')); gulp.task('vscode-linux-ia32-build-rpm', ['vscode-linux-ia32-prepare-rpm'], buildRpmPackage('ia32')); gulp.task('vscode-linux-x64-build-rpm', ['vscode-linux-x64-prepare-rpm'], buildRpmPackage('x64')); gulp.task('vscode-linux-arm-build-rpm', ['vscode-linux-arm-prepare-rpm'], buildRpmPackage('arm')); @@ -281,9 +277,9 @@ gulp.task('clean-vscode-linux-ia32-flatpak', util.rimraf('.build/linux/flatpak/i gulp.task('clean-vscode-linux-x64-flatpak', util.rimraf('.build/linux/flatpak/x86_64')); gulp.task('clean-vscode-linux-arm-flatpak', util.rimraf('.build/linux/flatpak/arm')); -gulp.task('vscode-linux-ia32-prepare-flatpak', ['clean-vscode-linux-ia32-flatpak'/*, 'vscode-linux-ia32-min'*/], prepareFlatpak('ia32')); -gulp.task('vscode-linux-x64-prepare-flatpak', ['clean-vscode-linux-x64-flatpak'/*, 'vscode-linux-x64-min'*/], prepareFlatpak('x64')); -gulp.task('vscode-linux-arm-prepare-flatpak', ['clean-vscode-linux-arm-flatpak'/*, 'vscode-linux-arm-min'*/], prepareFlatpak('arm')); +gulp.task('vscode-linux-ia32-prepare-flatpak', ['clean-vscode-linux-ia32-flatpak'], prepareFlatpak('ia32')); +gulp.task('vscode-linux-x64-prepare-flatpak', ['clean-vscode-linux-x64-flatpak'], prepareFlatpak('x64')); +gulp.task('vscode-linux-arm-prepare-flatpak', ['clean-vscode-linux-arm-flatpak'], prepareFlatpak('arm')); gulp.task('vscode-linux-ia32-flatpak', ['vscode-linux-ia32-prepare-flatpak'], buildFlatpak('ia32')); gulp.task('vscode-linux-x64-flatpak', ['vscode-linux-x64-prepare-flatpak'], buildFlatpak('x64')); From 9a0567a63868ef5a0dcfe0059645e849aca44dba Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 12 May 2017 09:57:34 +0200 Subject: [PATCH 0447/2747] allow for undo stops before/after --- .../contrib/snippet/browser/snippetController2.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 57b2b0af6ecd9..238a2632c1000 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -52,12 +52,21 @@ export class SnippetController2 { return 'snippetController2'; } - insert(template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): void { + insert(template: string, + overwriteBefore: number = 0, overwriteAfter: number = 0, + undoStopBefore: boolean = true, undoStopAfter: boolean = true + ): void { if (this._snippet) { this.cancel(); } this._snippet = new SnippetSession(this._editor, template, overwriteBefore, overwriteAfter); + if (undoStopBefore) { + this._editor.getModel().pushStackElement(); + } this._snippet.insert(); + if (undoStopAfter) { + this._editor.getModel().pushStackElement(); + } this._snippetListener = [ this._editor.onDidChangeModel(() => this.cancel()), this._editor.onDidChangeCursorSelection(() => this._updateState()) From 8d8390bc9b4b16862ff0924b213344248ec3acbf Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 12 May 2017 10:07:10 +0200 Subject: [PATCH 0448/2747] Fixes #26446: Artificially inflate the width of collapsed multiline decorations --- .../browser/viewParts/decorations/decorations.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vs/editor/browser/viewParts/decorations/decorations.ts b/src/vs/editor/browser/viewParts/decorations/decorations.ts index 30434c51b69eb..e129ecb614343 100644 --- a/src/vs/editor/browser/viewParts/decorations/decorations.ts +++ b/src/vs/editor/browser/viewParts/decorations/decorations.ts @@ -159,18 +159,18 @@ export class DecorationsOverlay extends DynamicViewOverlay { continue; } - if (linesVisibleRanges.length === 1 && linesVisibleRanges[0].ranges.length === 1) { - const singleVisibleRange = linesVisibleRanges[0].ranges[0]; - if (singleVisibleRange.width === 0) { - // collapsed range case => make the decoration visible by faking its width - linesVisibleRanges[0].ranges[0] = new HorizontalRange(singleVisibleRange.left, this._typicalHalfwidthCharacterWidth); - } - } - for (let j = 0, lenJ = linesVisibleRanges.length; j < lenJ; j++) { let lineVisibleRanges = linesVisibleRanges[j]; let lineIndex = lineVisibleRanges.lineNumber - visibleStartLineNumber; + if (lineVisibleRanges.ranges.length === 1) { + const singleVisibleRange = lineVisibleRanges.ranges[0]; + if (singleVisibleRange.width === 0) { + // collapsed range case => make the decoration visible by faking its width + lineVisibleRanges.ranges[0] = new HorizontalRange(singleVisibleRange.left, this._typicalHalfwidthCharacterWidth); + } + } + for (let k = 0, lenK = lineVisibleRanges.ranges.length; k < lenK; k++) { let visibleRange = lineVisibleRanges.ranges[k]; let decorationOutput = ( From 9240c59686cc42802c07f975e6fea7a8129df017 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 12 May 2017 10:09:11 +0200 Subject: [PATCH 0449/2747] Fix #26357 --- src/vs/workbench/parts/preferences/browser/preferencesEditor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts index 9d2702ff6bcb9..652e97a9e234c 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts @@ -159,7 +159,7 @@ export class PreferencesEditor extends BaseEditor { } public focus(): void { - this.sideBySidePreferencesWidget.focus(); + this.searchWidget.focus(); } public focusSearch(): void { From 47fbe1943dd1862f35036f2befc69977ed289546 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 12 May 2017 10:16:59 +0200 Subject: [PATCH 0450/2747] commands: handle label clashes better --- .../quickopen/browser/commandsHandler.ts | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts index dbe683fb45b10..5435cc3a6988f 100644 --- a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts @@ -50,7 +50,7 @@ class CommandPaletteEditorAction extends EditorAction { constructor() { super({ - id: 'workbench.action.showCommands', + id: ShowAllCommandsAction.ID, label: nls.localize('showCommands.label', "Command Palette..."), alias: 'Command Palette', precondition: null, @@ -74,6 +74,7 @@ class BaseCommandEntry extends QuickOpenEntryGroup { private keyLabel: string; private keyAriaLabel: string; private label: string; + private description: string; private alias: string; constructor( @@ -111,6 +112,14 @@ class BaseCommandEntry extends QuickOpenEntryGroup { return this.label; } + public getDescription(): string { + return this.description; + } + + public setDescription(description: string): void { + this.description = description; + } + public getDetail(): string { return this.alias; } @@ -147,14 +156,14 @@ class BaseCommandEntry extends QuickOpenEntryGroup { this.telemetryService.publicLog('workbenchActionExecuted', { id: action.id, from: 'quick open' }); (action.run() || TPromise.as(null)).done(() => { action.dispose(); - }, (err) => this.onError(err)); + }, err => this.onError(err)); } catch (error) { this.onError(error); } } else { this.messageService.show(Severity.Info, nls.localize('actionNotEnabled', "Command '{0}' is not enabled in the current context.", this.getLabel())); } - }, (err) => this.onError(err)); + }, err => this.onError(err)); } } @@ -218,14 +227,14 @@ class EditorActionCommandEntry extends BaseCommandEntry { if (this.action) { try { this.telemetryService.publicLog('workbenchActionExecuted', { id: this.action.id, from: 'quick open' }); - (this.action.run() || TPromise.as(null)).done(null, (err) => this.onError(err)); + (this.action.run() || TPromise.as(null)).done(null, err => this.onError(err)); } catch (error) { this.onError(error); } } else { this.messageService.show(Severity.Info, nls.localize('actionNotEnabled', "Command '{0}' is not enabled in the current context.", this.getLabel())); } - }, (err) => this.onError(err)); + }, err => this.onError(err)); return true; } @@ -318,7 +327,18 @@ export class CommandsHandler extends QuickOpenHandler { let entries = [...workbenchEntries, ...editorEntries, ...commandEntries]; // Remove duplicates - entries = arrays.distinct(entries, entry => entry.getCommandId()); + entries = arrays.distinct(entries, entry => `${entry.getLabel()}${entry.getGroupLabel()}${entry.getCommandId()}`); + + // Handle label clashes + const commandLabels = new Set(); + entries.forEach(entry => { + const commandLabel = `${entry.getLabel()}${entry.getGroupLabel()}`; + if (commandLabels.has(commandLabel)) { + entry.setDescription(entry.getCommandId()); + } else { + commandLabels.add(commandLabel); + } + }); // Sort by name entries = entries.sort((elementA, elementB) => elementA.getLabel().toLowerCase().localeCompare(elementB.getLabel().toLowerCase())); From a5927ad2e63871467bce175e962a1f3c85eb0dcc Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 12 May 2017 10:16:01 +0200 Subject: [PATCH 0451/2747] debug: viewer get cached callStack --- .../debug/electron-browser/debugViewer.ts | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index b29c2e156486b..88619fbcc71f0 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -351,7 +351,7 @@ export class CallStackDataSource implements IDataSource { public getChildren(tree: ITree, element: any): TPromise { if (element instanceof Thread) { - return this.getThreadChildren(element); + return TPromise.as(this.getThreadChildren(element)); } if (element instanceof Model) { return TPromise.as(element.getProcesses()); @@ -361,17 +361,16 @@ export class CallStackDataSource implements IDataSource { return TPromise.as(process.getAllThreads()); } - private getThreadChildren(thread: Thread): TPromise { - return thread.fetchCallStack().then((callStack: any[]) => { - if (thread.stoppedDetails && thread.stoppedDetails.framesErrorMessage) { - return callStack.concat([thread.stoppedDetails.framesErrorMessage]); - } - if (thread.stoppedDetails && thread.stoppedDetails.totalFrames > callStack.length) { - return callStack.concat([new ThreadAndProcessIds(thread.process.getId(), thread.threadId)]); - } + private getThreadChildren(thread: Thread): any[] { + const callStack: any[] = thread.getCallStack(); + if (thread.stoppedDetails && thread.stoppedDetails.framesErrorMessage) { + return callStack.concat([thread.stoppedDetails.framesErrorMessage]); + } + if (thread.stoppedDetails && thread.stoppedDetails.totalFrames > callStack.length) { + return callStack.concat([new ThreadAndProcessIds(thread.process.getId(), thread.threadId)]); + } - return callStack; - }); + return callStack; } public getParent(tree: ITree, element: any): TPromise { From 64db7ea7224e5b4cd971763a0bf856b5e3906d24 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 12 May 2017 10:26:43 +0200 Subject: [PATCH 0452/2747] improve build logging --- build/tfs/darwin/build.sh | 29 ++++++++++++++++++----------- build/tfs/win32/1_build.ps1 | 10 +++++----- build/tfs/win32/2_package.ps1 | 2 +- build/tfs/win32/3_upload.ps1 | 7 +++++-- build/tfs/win32/lib.ps1 | 16 ++++++++++++---- 5 files changed, 41 insertions(+), 23 deletions(-) diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index f1faaca849dbe..71f5007ad4c34 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -1,25 +1,32 @@ #!/bin/sh set -e -# npm install +# log build step +STEP() { + echo "********************************************************************************" + echo "*** $*" + echo "********************************************************************************" + echo "" +} + +STEP "npm install" ./scripts/npm.sh install -# mixin +STEP "mixin repository from vscode-distro" npm run gulp -- mixin -# compile & upload source maps +STEP "build minified win32, upload source maps" npm run gulp -- --max_old_space_size=4096 vscode-darwin-min upload-vscode-sourcemaps -# run tests +STEP "run unit tests" ./scripts/test.sh --build --reporter dot -# run integration tests +STEP "run integration tests" ./scripts/test-integration.sh -# npm install publish tools +STEP "npm install build dependencies" (cd $BUILD_SOURCESDIRECTORY/build/tfs && npm i) -# set up variables REPO=`pwd` ZIP=$REPO/../VSCode-darwin-selfsigned.zip UNSIGNEDZIP=$REPO/../VSCode-darwin-unsigned.zip @@ -27,14 +34,14 @@ BUILD=$REPO/../VSCode-darwin PACKAGEJSON=`ls $BUILD/*.app/Contents/Resources/app/package.json` VERSION=`node -p "require(\"$PACKAGEJSON\").version"` -# archive unsigned build +STEP "create unsigned archive" ( rm -rf $UNSIGNEDZIP ; cd $BUILD && zip -r -X -y $UNSIGNEDZIP * ) -# publish unsigned build +STEP "publish unsigned archive" node build/tfs/out/publish.js $VSCODE_QUALITY darwin archive-unsigned VSCode-darwin-$VSCODE_QUALITY-unsigned.zip $VERSION false $UNSIGNEDZIP -# create signing request +STEP "create signing request" node build/tfs/out/enqueue.js $VSCODE_QUALITY -# wait for signed build +STEP "wait for signed build" node build/tfs/out/waitForSignedBuild.js $VSCODE_QUALITY \ No newline at end of file diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index f3da6228d0d2b..b361f593c9429 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -4,18 +4,18 @@ Param( . .\build\tfs\win32\lib.ps1 -# npm install +STEP "npm install" exec { & .\scripts\npm.bat install } -# mixin +STEP "mixin repository from vscode-distro" $env:VSCODE_MIXIN_PASSWORD = $mixinPassword exec { & npm run gulp -- mixin } -# compile +STEP "build minified win32" exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-min } -# run tests +STEP "run unit tests" exec { & .\scripts\test.bat --build --reporter dot } -# run integration tests +# STEP "run integration tests" # exec { & .\scripts\test-integration.bat } \ No newline at end of file diff --git a/build/tfs/win32/2_package.ps1 b/build/tfs/win32/2_package.ps1 index 5be478fb5a11e..adae19187451c 100644 --- a/build/tfs/win32/2_package.ps1 +++ b/build/tfs/win32/2_package.ps1 @@ -1,4 +1,4 @@ . .\build\tfs\win32\lib.ps1 -# archive +STEP "create win32 archive and setup package" exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-archive vscode-win32-setup } \ No newline at end of file diff --git a/build/tfs/win32/3_upload.ps1 b/build/tfs/win32/3_upload.ps1 index 55e1a5bb54b65..6a1fd7f132add 100644 --- a/build/tfs/win32/3_upload.ps1 +++ b/build/tfs/win32/3_upload.ps1 @@ -17,7 +17,7 @@ $PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | Conv $Version = $PackageJson.version $Quality = "$env:VSCODE_QUALITY" -# npm install publish tools +STEP "npm install build dependencies" pushd "$Repo\build\tfs" exec { & npm i } popd @@ -26,5 +26,8 @@ $env:AZURE_STORAGE_ACCESS_KEY_2 = $storageKey $env:MOONCAKE_STORAGE_ACCESS_KEY = $mooncakeStorageKey $env:AZURE_DOCUMENTDB_MASTERKEY = $documentDbKey -exec { & node build/tfs/out/publish.js $Quality win32 setup "VSCodeSetup-$Version.exe" $Version true $Exe } +STEP "publish win32 archive" exec { & node build/tfs/out/publish.js $Quality win32-archive archive "VSCode-win32-$Version.zip" $Version true $Zip } + +STEP "publish win32 setup" +exec { & node build/tfs/out/publish.js $Quality win32 setup "VSCodeSetup-$Version.exe" $Version true $Exe } diff --git a/build/tfs/win32/lib.ps1 b/build/tfs/win32/lib.ps1 index 9df1a69157b3f..e4c3244ac2042 100644 --- a/build/tfs/win32/lib.ps1 +++ b/build/tfs/win32/lib.ps1 @@ -8,8 +8,16 @@ if (Test-Path env:AGENT_WORKFOLDER) { # throw when a process exits with something other than 0 function exec([scriptblock]$cmd, [string]$errorMessage = "Error executing command: " + $cmd) { - & $cmd - if ($LastExitCode -ne 0) { - throw $errorMessage - } + & $cmd + if ($LastExitCode -ne 0) { + throw $errorMessage + } +} + +# log build step +function STEP() { + Write-Host "********************************************************************************" + Write-Host "*** $args" + Write-Host "********************************************************************************" + Write-Host "" } From 3703614f56d69154ca200c1581cfbad93403621c Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 12 May 2017 10:41:17 +0200 Subject: [PATCH 0453/2747] better support for nested placeholders --- .../contrib/snippet/browser/snippetSession.ts | 37 ++++++++++++------- .../contrib/snippet/common/snippetParser.ts | 20 ++++++++++ .../test/browser/snippetParser.test.ts | 27 ++++++++++++++ .../test/browser/snippetSession.test.ts | 26 ++++++------- 4 files changed, 84 insertions(+), 26 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index 474879194b13b..2f104a3008b9a 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -89,31 +89,26 @@ class OneSnippet { this._init(); - let prevGroupsIdx = -1; - if (fwd && this._placeholderGroupsIdx < this._placeholderGroups.length - 1) { - prevGroupsIdx = this._placeholderGroupsIdx; this._placeholderGroupsIdx += 1; } else if (!fwd && this._placeholderGroupsIdx > 0) { - prevGroupsIdx = this._placeholderGroupsIdx; this._placeholderGroupsIdx -= 1; + + } else { + // the selection of the current placeholder might + // not acurate any more -> simply restore it } return this._editor.getModel().changeDecorations(accessor => { - // change stickness to never grow when typing at its edges - // so that in-active tabstops never grow - if (prevGroupsIdx !== -1) { - for (const placeholder of this._placeholderGroups[prevGroupsIdx]) { - const id = this._placeholderDecorations.get(placeholder); - accessor.changeDecorationOptions(id, OneSnippet._decor.inactive); - } - } + const activePlaceholders = new Set(); // change stickiness to always grow when typing at its edges // because these decorations represent the currently active - // tabstop. Special case: reaching the final tab stop + // tabstop. + // Special case #1: reaching the final tabstop + // Special case #2: placeholders enclosing active placeholders const selections: Selection[] = []; for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) { const id = this._placeholderDecorations.get(placeholder); @@ -121,7 +116,23 @@ class OneSnippet { selections.push(new Selection(range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn)); accessor.changeDecorationOptions(id, placeholder.isFinalTabstop ? OneSnippet._decor.activeFinal : OneSnippet._decor.active); + activePlaceholders.add(placeholder); + + for (const enclosingPlaceholder of this._snippet.enclosingPlaceholders(placeholder)) { + const id = this._placeholderDecorations.get(enclosingPlaceholder); + accessor.changeDecorationOptions(id, enclosingPlaceholder.isFinalTabstop ? OneSnippet._decor.activeFinal : OneSnippet._decor.active); + activePlaceholders.add(enclosingPlaceholder); + } } + + // change stickness to never grow when typing at its edges + // so that in-active tabstops never grow + this._placeholderDecorations.forEach((id, placeholder) => { + if (!activePlaceholders.has(placeholder)) { + accessor.changeDecorationOptions(id, OneSnippet._decor.inactive); + } + }); + return selections; }); } diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index 4378668eda46f..ac384b0106e1c 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -132,6 +132,12 @@ export abstract class Marker { return result; } + parent: Marker; + + protected _adopt(child: Marker): void { + child.parent = this; + } + toString() { return ''; } @@ -179,6 +185,7 @@ export class Placeholder extends Marker { constructor(public index: string = '', public defaultValue: Marker[]) { super(); + defaultValue.forEach(this._adopt, this); } get isFinalTabstop() { return this.index === '0'; @@ -194,6 +201,7 @@ export class Variable extends Marker { constructor(public name: string = '', public defaultValue: Marker[]) { super(); + defaultValue.forEach(this._adopt, this); } get isDefined(): boolean { return this.resolvedValue !== undefined; @@ -271,6 +279,18 @@ export class TextmateSnippet { return ret; } + enclosingPlaceholders(placeholder: Placeholder): Placeholder[] { + let ret: Placeholder[] = []; + let { parent } = placeholder; + while (parent) { + if (parent instanceof Placeholder) { + ret.push(parent); + } + parent = parent.parent; + } + return ret; + } + get text() { return Marker.toString(this.marker); } diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts index faa1f5cdcfc1b..f960afe2ffa4d 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts @@ -327,6 +327,33 @@ suite('SnippetParser', () => { assertLen('${TM_SELECTED_TEXT:def}$0', 0, 3, 0); }); + test('parser, parent node', function () { + let snippet = SnippetParser.parse('This ${1:is ${2:nested}}$0'); + + assert.equal(snippet.placeholders.length, 3); + let [first, second] = snippet.placeholders; + assert.equal(first.index, '1'); + assert.equal(second.index, '2'); + assert.ok(second.parent === first); + assert.ok(first.parent === undefined); + + snippet = SnippetParser.parse('${VAR:default${1:value}}$0'); + assert.equal(snippet.placeholders.length, 2); + [first] = snippet.placeholders; + assert.equal(first.index, '1'); + + assert.ok(snippet.marker[0] instanceof Variable); + assert.ok(first.parent === snippet.marker[0]); + }); + + test('TextmateSnippet#enclosingPlaceholders', function () { + let snippet = SnippetParser.parse('This ${1:is ${2:nested}}$0'); + let [first, second] = snippet.placeholders; + + assert.deepEqual(snippet.enclosingPlaceholders(first), []); + assert.deepEqual(snippet.enclosingPlaceholders(second), [first]); + }); + test('TextmateSnippet#offset', () => { let snippet = SnippetParser.parse('te$1xt'); assert.equal(snippet.offset(snippet.marker[0]), 0); diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts index c5544130cc648..8be9c9efdf198 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts @@ -378,23 +378,23 @@ suite('SnippetSession', function () { assertSelections(editor, new Selection(1, 11, 1, 11)); }); - // test('snippets, typing with nested placeholder', function () { + test('snippets, typing with nested placeholder', function () { - // editor.setSelection(new Selection(1, 1, 1, 1)); - // const session = new SnippetSession(editor, 'This ${1:is ${2:nested}}.$0'); - // session.insert(); - // assertSelections(editor, new Selection(1, 6, 1, 15)); + editor.setSelection(new Selection(1, 1, 1, 1)); + const session = new SnippetSession(editor, 'This ${1:is ${2:nested}}.$0'); + session.insert(); + assertSelections(editor, new Selection(1, 6, 1, 15)); - // session.next(); - // assertSelections(editor, new Selection(1, 9, 1, 15)); + session.next(); + assertSelections(editor, new Selection(1, 9, 1, 15)); - // editor.trigger('test', 'deleteLeft', {}); - // assertSelections(editor, new Selection(1, 9, 1, 9)); + editor.trigger('test', 'deleteLeft', {}); + assertSelections(editor, new Selection(1, 9, 1, 9)); - // editor.trigger('test', 'type', { text: 'XXX' }); - // session.prev(); - // assertSelections(editor, new Selection(1, 6, 1, 12)); - // }); + editor.trigger('test', 'type', { text: 'XXX' }); + session.prev(); + assertSelections(editor, new Selection(1, 6, 1, 12)); + }); test('snippets, snippet with variables', function () { const session = new SnippetSession(editor, '@line=$TM_LINE_NUMBER$0'); From 939398631cfadce1ec29c1f5d58dc45460d7d554 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 12 May 2017 10:51:55 +0200 Subject: [PATCH 0454/2747] show final tabstop --- src/vs/editor/contrib/snippet/browser/snippetSession.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index 2f104a3008b9a..2c2c8ae4aa6e1 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -129,7 +129,7 @@ class OneSnippet { // so that in-active tabstops never grow this._placeholderDecorations.forEach((id, placeholder) => { if (!activePlaceholders.has(placeholder)) { - accessor.changeDecorationOptions(id, OneSnippet._decor.inactive); + accessor.changeDecorationOptions(id, placeholder.isFinalTabstop ? OneSnippet._decor.inactiveFinal : OneSnippet._decor.inactive); } }); From facba24c2dfeaa40360b1f42fae9674b76d196de Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 12 May 2017 11:03:02 +0200 Subject: [PATCH 0455/2747] bring tfs scripts to repo --- build/tfs/common/.gitignore | 2 + build/tfs/common/enqueue.ts | 86 ++++++++++++ build/tfs/common/package.json | 27 ++++ build/tfs/common/publish.ts | 241 +++++++++++++++++++++++++++++++++ build/tfs/common/tsconfig.json | 11 ++ build/tfs/common/tslint.json | 13 ++ build/tfs/common/util.ts | 69 ++++++++++ build/tfs/darwin/build.sh | 28 ++-- build/tfs/win32/1_build.ps1 | 10 +- build/tfs/win32/2_package.ps1 | 2 +- build/tfs/win32/3_upload.ps1 | 12 +- build/tfs/win32/lib.ps1 | 1 + 12 files changed, 475 insertions(+), 27 deletions(-) create mode 100644 build/tfs/common/.gitignore create mode 100644 build/tfs/common/enqueue.ts create mode 100644 build/tfs/common/package.json create mode 100644 build/tfs/common/publish.ts create mode 100644 build/tfs/common/tsconfig.json create mode 100644 build/tfs/common/tslint.json create mode 100644 build/tfs/common/util.ts diff --git a/build/tfs/common/.gitignore b/build/tfs/common/.gitignore new file mode 100644 index 0000000000000..e94ecda764e2d --- /dev/null +++ b/build/tfs/common/.gitignore @@ -0,0 +1,2 @@ +node_modules/ +*.js \ No newline at end of file diff --git a/build/tfs/common/enqueue.ts b/build/tfs/common/enqueue.ts new file mode 100644 index 0000000000000..613805647b1bf --- /dev/null +++ b/build/tfs/common/enqueue.ts @@ -0,0 +1,86 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { DocumentClient } from 'documentdb'; +import * as azure from 'azure-storage'; +import * as path from 'path'; +import { getVersion } from './util'; + +interface Asset { + platform: string; + type: string; + url: string; + mooncakeUrl: string; + hash: string; +} + +function queueSigningRequest(quality: string, commit: string): Promise { + const retryOperations = new azure.ExponentialRetryPolicyFilter(); + const queueSvc = azure + .createQueueService(process.env['AZURE_STORAGE_ACCOUNT_2'], process.env['AZURE_STORAGE_ACCESS_KEY_2']) + .withFilter(retryOperations); + + queueSvc.messageEncoder = new azure.QueueMessageEncoder.TextBase64QueueMessageEncoder(); + + const message = `${quality}/${commit}`; + + return new Promise((c, e) => queueSvc.createMessage('sign-darwin', message, err => err ? e(err) : c())); +} + +function isBuildSigned(quality: string, commit: string): Promise { + const client = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT'], { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] }); + const collection = 'dbs/builds/colls/' + quality; + const updateQuery = { + query: 'SELECT TOP 1 * FROM c WHERE c.id = @id', + parameters: [{ name: '@id', value: commit }] + }; + + return new Promise((c, e) => { + client.queryDocuments(collection, updateQuery).toArray((err, results) => { + if (err) { return e(err); } + if (results.length !== 1) { return e(new Error('No such build')); } + + const [release] = results; + const assets: Asset[] = release.assets; + const isSigned = assets.some(a => a.platform === 'darwin' && a.type === 'archive'); + + c(isSigned); + }); + }); +} + +async function waitForSignedBuild(quality: string, commit: string): Promise { + let retries = 0; + + while (retries < 180) { + if (await isBuildSigned(quality, commit)) { + return; + } + + await new Promise(c => setTimeout(c, 10000)); + retries++; + } + + throw new Error('Timed out waiting for signed build'); +} + +async function main(quality: string): Promise { + const commit = getVersion(path.dirname(path.dirname(path.dirname(__dirname)))); + + console.log(`Queueing signing request for '${quality}/${commit}'...`); + await queueSigningRequest(quality, commit); + + console.log('Waiting on signed build...'); + await waitForSignedBuild(quality, commit); + + console.log('Found signed build!'); +} + +main(process.argv[2]).catch(err => { + console.error(err); + process.exit(1); +}); \ No newline at end of file diff --git a/build/tfs/common/package.json b/build/tfs/common/package.json new file mode 100644 index 0000000000000..241757803a94c --- /dev/null +++ b/build/tfs/common/package.json @@ -0,0 +1,27 @@ +{ + "name": "vscode-distro", + "version": "1.0.0", + "description": "VS Code Distro", + "repository": { + "url": "https://github.com/Microsoft/vscode-distro" + }, + "main": "enqueue.js", + "scripts": { + "compile": "tsc", + "watch": "tsc --watch", + "postinstall": "npm run compile" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "@types/azure": "^0.9.18", + "@types/documentdb": "^1.10.1", + "@types/es6-promise": "0.0.32", + "@types/mime": "0.0.29", + "@types/node": "^7.0.13", + "azure-storage": "^2.1.0", + "documentdb": "^1.11.0", + "mime": "^1.3.4", + "typescript": "^2.2.2" + } +} \ No newline at end of file diff --git a/build/tfs/common/publish.ts b/build/tfs/common/publish.ts new file mode 100644 index 0000000000000..03d0a3276d742 --- /dev/null +++ b/build/tfs/common/publish.ts @@ -0,0 +1,241 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as fs from 'fs'; +import * as path from 'path'; +import * as crypto from 'crypto'; +import * as azure from 'azure-storage'; +import * as mime from 'mime'; +import { DocumentClient, NewDocument } from 'documentdb'; +import { getVersion } from './util'; + +if (process.argv.length < 6) { + console.error('Usage: node publish.js '); + process.exit(-1); +} + +function log(...args: any[]) { + console.log(new Date().toISOString(), ...args); +} + +function sha1hash(file: string): Promise { + return new Promise((c, e) => { + const shasum = crypto.createHash('sha1'); + const stream = fs.createReadStream(file); + + stream + .on('data', shasum.update.bind(shasum)) + .on('error', e) + .on('close', () => c(shasum.digest('hex'))); + }); +} + +interface Config { + id: string; + frozen: boolean; +} + +function createDefaultConfig(quality: string): Config { + return { + id: quality, + frozen: false + }; +} + +function getConfig(quality: string): Promise { + const client = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT'], { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] }); + const collection = 'dbs/builds/colls/config'; + const query = { + query: `SELECT TOP 1 * FROM c WHERE c.id = @quality`, + parameters: [ + { name: '@quality', value: quality } + ] + }; + + return new Promise((c, e) => { + client.queryDocuments(collection, query).toArray((err, results) => { + if (err && err.code !== 409) { return e(err); } + + c(!results || results.length === 0 ? createDefaultConfig(quality) : results[0] as any as Config); + }); + }); +} + +interface Asset { + platform: string; + type: string; + url: string; + mooncakeUrl: string; + hash: string; +} + +function createOrUpdate(commit: string, quality: string, platform: string, type: string, release: NewDocument, asset: Asset, isUpdate: boolean): Promise { + const client = new DocumentClient(process.env['AZURE_DOCUMENTDB_ENDPOINT'], { masterKey: process.env['AZURE_DOCUMENTDB_MASTERKEY'] }); + const collection = 'dbs/builds/colls/' + quality; + const updateQuery = { + query: 'SELECT TOP 1 * FROM c WHERE c.id = @id', + parameters: [{ name: '@id', value: commit }] + }; + + let updateTries = 0; + + function update(): Promise { + updateTries++; + + return new Promise((c, e) => { + client.queryDocuments(collection, updateQuery).toArray((err, results) => { + if (err) { return e(err); } + if (results.length !== 1) { return e(new Error('No documents')); } + + const release = results[0]; + + release.assets = [ + ...release.assets.filter((a: any) => !(a.platform === platform && a.type === type)), + asset + ]; + + if (isUpdate) { + release.updates[platform] = type; + } + + client.replaceDocument(release._self, release, err => { + if (err && err.code === 409 && updateTries < 5) { return c(update()); } + if (err) { return e(err); } + + log('Build successfully updated.'); + c(); + }); + }); + }); + } + + return new Promise((c, e) => { + client.createDocument(collection, release, err => { + if (err && err.code === 409) { return c(update()); } + if (err) { return e(err); } + + log('Build successfully published.'); + c(); + }); + }); +} + +async function assertContainer(blobService: azure.BlobService, quality: string): Promise { + await new Promise((c, e) => blobService.createContainerIfNotExists(quality, { publicAccessLevel: 'blob' }, err => err ? e(err) : c())); +} + +async function doesAssetExist(blobService: azure.BlobService, quality: string, blobName: string): Promise { + const existsResult = await new Promise((c, e) => blobService.doesBlobExist(quality, blobName, (err, r) => err ? e(err) : c(r))); + return existsResult.exists; +} + +async function uploadBlob(blobService: azure.BlobService, quality: string, blobName: string, file: string): Promise { + const blobOptions = { + contentType: mime.lookup(file), + cacheControl: 'max-age=31536000, public' + }; + + await new Promise((c, e) => blobService.createBlockBlobFromLocalFile(quality, blobName, file, blobOptions, err => err ? e(err) : c())); +} + +async function publish(quality: string, platform: string, type: string, name: string, version: string, _isUpdate: string, file: string): Promise { + const isUpdate = _isUpdate === 'true'; + + const queuedBy = process.env['BUILD_QUEUEDBY']; + const sourceBranch = process.env['BUILD_SOURCEBRANCH']; + const commit = getVersion(path.dirname(path.dirname(path.dirname(__dirname)))); + const isReleased = quality === 'insider' + && /^master$|^refs\/heads\/master$/.test(sourceBranch) + && /Project Collection Service Accounts|Microsoft.VisualStudio.Services.TFS/.test(queuedBy); + + log('Publishing...'); + log('Quality:', quality); + log('Platforn:', platform); + log('Type:', type); + log('Name:', name); + log('Version:', version); + log('Commit:', commit); + log('Is Update:', isUpdate); + log('Is Released:', isReleased); + log('File:', file); + + const hash = await sha1hash(file); + log('Hash:', hash); + + const blobName = commit + '/' + name; + const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']; + + const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']) + .withFilter(new azure.ExponentialRetryPolicyFilter()); + + const mooncakeBlobService = azure.createBlobService(storageAccount, process.env['MOONCAKE_STORAGE_ACCESS_KEY'], `${storageAccount}.blob.core.chinacloudapi.cn`) + .withFilter(new azure.ExponentialRetryPolicyFilter()); + + await Promise.all([ + assertContainer(blobService, quality), + assertContainer(mooncakeBlobService, quality) + ]); + + const [blobExists, moooncakeBlobExists] = await Promise.all([ + doesAssetExist(blobService, quality, blobName), + doesAssetExist(mooncakeBlobService, quality, blobName) + ]); + + if (blobExists || moooncakeBlobExists) { + log(`Blob ${quality}, ${blobName} already exists, not publishing again.`); + return; + } + + log('Uploading blobs to Azure storage...'); + + await Promise.all([ + uploadBlob(blobService, quality, blobName, file), + uploadBlob(mooncakeBlobService, quality, blobName, file) + ]); + + log('Blobs successfully uploaded.'); + + const config = await getConfig(quality); + + log('Quality config:', config); + + const asset: Asset = { + platform: platform, + type: type, + url: `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`, + mooncakeUrl: `${process.env['MOONCAKE_CDN_URL']}/${quality}/${blobName}`, + hash: hash + }; + + const release = { + id: commit, + timestamp: (new Date()).getTime(), + version, + isReleased: config.frozen ? false : isReleased, + sourceBranch, + queuedBy, + assets: [asset], + updates: {} as any + }; + + if (isUpdate) { + release.updates[platform] = type; + } + + await createOrUpdate(commit, quality, platform, type, release, asset, isUpdate); +} + +function main(): void { + const [, , quality, platform, type, name, version, _isUpdate, file] = process.argv; + + publish(quality, platform, type, name, version, _isUpdate, file).catch(err => { + console.error(err); + process.exit(1); + }); +} + +main(); diff --git a/build/tfs/common/tsconfig.json b/build/tfs/common/tsconfig.json new file mode 100644 index 0000000000000..8d56e59d09f68 --- /dev/null +++ b/build/tfs/common/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "noImplicitAny": true, + "noUnusedLocals": true, + "noImplicitThis": true, + "noImplicitReturns": true, + "noImplicitUseStrict": true + } +} \ No newline at end of file diff --git a/build/tfs/common/tslint.json b/build/tfs/common/tslint.json new file mode 100644 index 0000000000000..e269a87c0e65f --- /dev/null +++ b/build/tfs/common/tslint.json @@ -0,0 +1,13 @@ +{ + "rules": { + "no-unused-expression": true, + "no-duplicate-variable": true, + "no-unused-variable": true, + "curly": true, + "class-name": true, + "semicolon": [ + "always" + ], + "triple-equals": true + } +} \ No newline at end of file diff --git a/build/tfs/common/util.ts b/build/tfs/common/util.ts new file mode 100644 index 0000000000000..b0b3cb6c4fd37 --- /dev/null +++ b/build/tfs/common/util.ts @@ -0,0 +1,69 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as path from 'path'; +import * as fs from 'fs'; + +function getGitVersion(repo: string): string { + const git = path.join(repo, '.git'); + const headPath = path.join(git, 'HEAD'); + let head: string; + + try { + head = fs.readFileSync(headPath, 'utf8').trim(); + } catch (e) { + return void 0; + } + + if (/^[0-9a-f]{40}$/i.test(head)) { + return head; + } + + const refMatch = /^ref: (.*)$/.exec(head); + + if (!refMatch) { + return void 0; + } + + const ref = refMatch[1]; + const refPath = path.join(git, ref); + + try { + return fs.readFileSync(refPath, 'utf8').trim(); + } catch (e) { + // noop + } + + const packedRefsPath = path.join(git, 'packed-refs'); + let refsRaw: string; + + try { + refsRaw = fs.readFileSync(packedRefsPath, 'utf8').trim(); + } catch (e) { + return void 0; + } + + const refsRegex = /^([0-9a-f]{40})\s+(.+)$/gm; + let refsMatch: RegExpExecArray; + let refs: { [ref: string]: string } = {}; + + while (refsMatch = refsRegex.exec(refsRaw)) { + refs[refsMatch[2]] = refsMatch[1]; + } + + return refs[ref]; +} + +export function getVersion(root: string): string { + let version = process.env['BUILD_SOURCEVERSION']; + + if (!version || !/^[0-9a-f]{40}$/i.test(version)) { + version = getGitVersion(root); + } + + return version; +} \ No newline at end of file diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index 71f5007ad4c34..15c5d29e255b1 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -3,29 +3,30 @@ set -e # log build step STEP() { + echo "" echo "********************************************************************************" echo "*** $*" echo "********************************************************************************" echo "" } -STEP "npm install" +STEP "Install dependencies" ./scripts/npm.sh install -STEP "mixin repository from vscode-distro" +STEP "Mix in repository from vscode-distro" npm run gulp -- mixin -STEP "build minified win32, upload source maps" +STEP "Build minified & upload source maps" npm run gulp -- --max_old_space_size=4096 vscode-darwin-min upload-vscode-sourcemaps -STEP "run unit tests" +STEP "Run unit tests" ./scripts/test.sh --build --reporter dot -STEP "run integration tests" +STEP "Run integration tests" ./scripts/test-integration.sh -STEP "npm install build dependencies" -(cd $BUILD_SOURCESDIRECTORY/build/tfs && npm i) +STEP "Install build dependencies" +(cd $BUILD_SOURCESDIRECTORY/build/tfs/common && npm i) REPO=`pwd` ZIP=$REPO/../VSCode-darwin-selfsigned.zip @@ -34,14 +35,11 @@ BUILD=$REPO/../VSCode-darwin PACKAGEJSON=`ls $BUILD/*.app/Contents/Resources/app/package.json` VERSION=`node -p "require(\"$PACKAGEJSON\").version"` -STEP "create unsigned archive" +STEP "Create unsigned archive" ( rm -rf $UNSIGNEDZIP ; cd $BUILD && zip -r -X -y $UNSIGNEDZIP * ) -STEP "publish unsigned archive" -node build/tfs/out/publish.js $VSCODE_QUALITY darwin archive-unsigned VSCode-darwin-$VSCODE_QUALITY-unsigned.zip $VERSION false $UNSIGNEDZIP - -STEP "create signing request" -node build/tfs/out/enqueue.js $VSCODE_QUALITY +STEP "Publish unsigned archive" +node build/tfs/common/publish.js $VSCODE_QUALITY darwin archive-unsigned VSCode-darwin-$VSCODE_QUALITY-unsigned.zip $VERSION false $UNSIGNEDZIP -STEP "wait for signed build" -node build/tfs/out/waitForSignedBuild.js $VSCODE_QUALITY \ No newline at end of file +STEP "Sign build" +node build/tfs/common/enqueue.js $VSCODE_QUALITY \ No newline at end of file diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index b361f593c9429..5a4f5dcba4b18 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -4,18 +4,18 @@ Param( . .\build\tfs\win32\lib.ps1 -STEP "npm install" +STEP "Install dependencies" exec { & .\scripts\npm.bat install } -STEP "mixin repository from vscode-distro" +STEP "Mix in repository from vscode-distro" $env:VSCODE_MIXIN_PASSWORD = $mixinPassword exec { & npm run gulp -- mixin } -STEP "build minified win32" +STEP "Build minified" exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-min } -STEP "run unit tests" +STEP "Run unit tests" exec { & .\scripts\test.bat --build --reporter dot } -# STEP "run integration tests" +# STEP "Run integration tests" # exec { & .\scripts\test-integration.bat } \ No newline at end of file diff --git a/build/tfs/win32/2_package.ps1 b/build/tfs/win32/2_package.ps1 index adae19187451c..689eccc5e3067 100644 --- a/build/tfs/win32/2_package.ps1 +++ b/build/tfs/win32/2_package.ps1 @@ -1,4 +1,4 @@ . .\build\tfs\win32\lib.ps1 -STEP "create win32 archive and setup package" +STEP "Create archive and setup package" exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-archive vscode-win32-setup } \ No newline at end of file diff --git a/build/tfs/win32/3_upload.ps1 b/build/tfs/win32/3_upload.ps1 index 6a1fd7f132add..c11efbaff47c3 100644 --- a/build/tfs/win32/3_upload.ps1 +++ b/build/tfs/win32/3_upload.ps1 @@ -17,8 +17,8 @@ $PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | Conv $Version = $PackageJson.version $Quality = "$env:VSCODE_QUALITY" -STEP "npm install build dependencies" -pushd "$Repo\build\tfs" +STEP "Install build dependencies" +pushd "$Repo\build\tfs\common" exec { & npm i } popd @@ -26,8 +26,8 @@ $env:AZURE_STORAGE_ACCESS_KEY_2 = $storageKey $env:MOONCAKE_STORAGE_ACCESS_KEY = $mooncakeStorageKey $env:AZURE_DOCUMENTDB_MASTERKEY = $documentDbKey -STEP "publish win32 archive" -exec { & node build/tfs/out/publish.js $Quality win32-archive archive "VSCode-win32-$Version.zip" $Version true $Zip } +STEP "Publish archive" +exec { & node build/tfs/common/publish.js $Quality win32-archive archive "VSCode-win32-$Version.zip" $Version true $Zip } -STEP "publish win32 setup" -exec { & node build/tfs/out/publish.js $Quality win32 setup "VSCodeSetup-$Version.exe" $Version true $Exe } +STEP "Publish setup package" +exec { & node build/tfs/common/publish.js $Quality win32 setup "VSCodeSetup-$Version.exe" $Version true $Exe } diff --git a/build/tfs/win32/lib.ps1 b/build/tfs/win32/lib.ps1 index e4c3244ac2042..c78d3fdf9ef31 100644 --- a/build/tfs/win32/lib.ps1 +++ b/build/tfs/win32/lib.ps1 @@ -16,6 +16,7 @@ function exec([scriptblock]$cmd, [string]$errorMessage = "Error executing comman # log build step function STEP() { + Write-Host "" Write-Host "********************************************************************************" Write-Host "*** $args" Write-Host "********************************************************************************" From b548d2128d978cd2d37827464cdb5a7615a935b1 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 12 May 2017 11:24:10 +0200 Subject: [PATCH 0456/2747] split things up into api/node and api/electron-browser --- .../extensionHost.contribution.ts} | 2 +- .../mainThreadCommands.ts | 2 +- .../mainThreadConfiguration.ts | 2 +- .../mainThreadDiagnostics.ts | 2 +- .../mainThreadDocuments.ts | 2 +- .../mainThreadDocumentsAndEditors.ts | 4 +- .../mainThreadEditor.ts | 35 +-------------- .../mainThreadEditors.ts | 6 ++- .../mainThreadErrors.ts | 2 +- .../mainThreadExplorerView.ts | 2 +- .../mainThreadExtensionService.ts | 2 +- .../mainThreadFileSystemEventService.ts | 2 +- .../mainThreadHeapService.ts | 2 +- .../mainThreadLanguageFeatures.ts | 2 +- .../mainThreadLanguages.ts | 2 +- .../mainThreadMessageService.ts | 2 +- .../mainThreadOutputService.ts | 2 +- .../mainThreadProgress.ts | 2 +- .../mainThreadQuickOpen.ts | 2 +- .../mainThreadSCM.ts | 2 +- .../mainThreadSaveParticipant.ts | 2 +- .../mainThreadStatusBar.ts | 2 +- .../mainThreadStorage.ts | 4 +- .../mainThreadTask.ts | 4 +- .../mainThreadTelemetry.ts | 2 +- .../mainThreadTerminalService.ts | 2 +- .../mainThreadWorkspace.ts | 2 +- src/vs/workbench/api/node/extHost.protocol.ts | 44 ++++++++++++++++++- .../workbench/api/node/extHostTextEditor.ts | 3 +- .../workbench/api/node/extHostTextEditors.ts | 3 +- .../electron-browser/extensionHost.ts | 2 +- src/vs/workbench/electron-browser/shell.ts | 2 +- .../electron-browser/workbench.main.ts | 2 +- .../api/extHostApiCommands.test.ts | 6 +-- .../api/extHostLanguageFeatures.test.ts | 6 +-- .../api/extHostMessagerService.test.ts | 2 +- .../api/extHostTextEditor.test.ts | 3 +- .../api/mainThreadCommands.test.ts | 4 +- .../api/mainThreadDocuments.test.ts | 2 +- .../api/mainThreadDocumentsAndEditors.test.ts | 2 +- .../api/mainThreadSaveParticipant.test.ts | 4 +- 41 files changed, 94 insertions(+), 88 deletions(-) rename src/vs/workbench/api/{node/extHost.contribution.ts => electron-browser/extensionHost.contribution.ts} (98%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadCommands.ts (98%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadConfiguration.ts (95%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadDiagnostics.ts (94%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadDocuments.ts (99%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadDocumentsAndEditors.ts (99%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadEditor.ts (94%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadEditors.ts (97%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadErrors.ts (89%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadExplorerView.ts (98%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadExtensionService.ts (99%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadFileSystemEventService.ts (96%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadHeapService.ts (97%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadLanguageFeatures.ts (99%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadLanguages.ts (92%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadMessageService.ts (97%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadOutputService.ts (97%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadProgress.ts (95%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadQuickOpen.ts (97%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadSCM.ts (99%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadSaveParticipant.ts (99%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadStatusBar.ts (95%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadStorage.ts (95%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadTask.ts (97%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadTelemetry.ts (94%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadTerminalService.ts (98%) rename src/vs/workbench/api/{node => electron-browser}/mainThreadWorkspace.ts (98%) diff --git a/src/vs/workbench/api/node/extHost.contribution.ts b/src/vs/workbench/api/electron-browser/extensionHost.contribution.ts similarity index 98% rename from src/vs/workbench/api/node/extHost.contribution.ts rename to src/vs/workbench/api/electron-browser/extensionHost.contribution.ts index 648e50ea3c122..5c84c61db3549 100644 --- a/src/vs/workbench/api/node/extHost.contribution.ts +++ b/src/vs/workbench/api/electron-browser/extensionHost.contribution.ts @@ -9,7 +9,7 @@ import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions as import { Registry } from 'vs/platform/platform'; import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { MainContext, InstanceCollection } from './extHost.protocol'; +import { MainContext, InstanceCollection } from '../node/extHost.protocol'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; // --- addressable diff --git a/src/vs/workbench/api/node/mainThreadCommands.ts b/src/vs/workbench/api/electron-browser/mainThreadCommands.ts similarity index 98% rename from src/vs/workbench/api/node/mainThreadCommands.ts rename to src/vs/workbench/api/electron-browser/mainThreadCommands.ts index 88a77f1300950..bea731ce49753 100644 --- a/src/vs/workbench/api/node/mainThreadCommands.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadCommands.ts @@ -8,7 +8,7 @@ import { IThreadService } from 'vs/workbench/services/thread/common/threadServic import { ICommandService, CommandsRegistry, ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; import { IDisposable } from 'vs/base/common/lifecycle'; import { TPromise } from 'vs/base/common/winjs.base'; -import { ExtHostContext, MainThreadCommandsShape, ExtHostCommandsShape } from './extHost.protocol'; +import { ExtHostContext, MainThreadCommandsShape, ExtHostCommandsShape } from '../node/extHost.protocol'; export class MainThreadCommands extends MainThreadCommandsShape { diff --git a/src/vs/workbench/api/node/mainThreadConfiguration.ts b/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts similarity index 95% rename from src/vs/workbench/api/node/mainThreadConfiguration.ts rename to src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts index c77a7b026f471..75b6594d1fdb5 100644 --- a/src/vs/workbench/api/node/mainThreadConfiguration.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts @@ -9,7 +9,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; -import { MainThreadConfigurationShape, ExtHostContext } from './extHost.protocol'; +import { MainThreadConfigurationShape, ExtHostContext } from '../node/extHost.protocol'; export class MainThreadConfiguration extends MainThreadConfigurationShape { diff --git a/src/vs/workbench/api/node/mainThreadDiagnostics.ts b/src/vs/workbench/api/electron-browser/mainThreadDiagnostics.ts similarity index 94% rename from src/vs/workbench/api/node/mainThreadDiagnostics.ts rename to src/vs/workbench/api/electron-browser/mainThreadDiagnostics.ts index 6602a4284e391..f0abcbb648684 100644 --- a/src/vs/workbench/api/node/mainThreadDiagnostics.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDiagnostics.ts @@ -7,7 +7,7 @@ import { IMarkerService, IMarkerData } from 'vs/platform/markers/common/markers'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; -import { MainThreadDiagnosticsShape } from './extHost.protocol'; +import { MainThreadDiagnosticsShape } from '../node/extHost.protocol'; export class MainThreadDiagnostics extends MainThreadDiagnosticsShape { diff --git a/src/vs/workbench/api/node/mainThreadDocuments.ts b/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts similarity index 99% rename from src/vs/workbench/api/node/mainThreadDocuments.ts rename to src/vs/workbench/api/electron-browser/mainThreadDocuments.ts index 153ddc8232f29..120beef086f76 100644 --- a/src/vs/workbench/api/node/mainThreadDocuments.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts @@ -15,7 +15,7 @@ import { IFileService } from 'vs/platform/files/common/files'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; -import { ExtHostContext, MainThreadDocumentsShape, ExtHostDocumentsShape } from './extHost.protocol'; +import { ExtHostContext, MainThreadDocumentsShape, ExtHostDocumentsShape } from '../node/extHost.protocol'; import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { ITextSource } from 'vs/editor/common/model/textSource'; diff --git a/src/vs/workbench/api/node/mainThreadDocumentsAndEditors.ts b/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts similarity index 99% rename from src/vs/workbench/api/node/mainThreadDocumentsAndEditors.ts rename to src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts index 8d710b5eceb36..974d8a45c7091 100644 --- a/src/vs/workbench/api/node/mainThreadDocumentsAndEditors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts @@ -11,8 +11,8 @@ import { delta } from 'vs/base/common/arrays'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import Event, { Emitter, any } from 'vs/base/common/event'; -import { ExtHostContext, ExtHostDocumentsAndEditorsShape, IModelAddedData, ITextEditorAddData, IDocumentsAndEditorsDelta } from './extHost.protocol'; -import { MainThreadTextEditor } from 'vs/workbench/api/node/mainThreadEditor'; +import { ExtHostContext, ExtHostDocumentsAndEditorsShape, IModelAddedData, ITextEditorAddData, IDocumentsAndEditorsDelta } from '../node/extHost.protocol'; +import { MainThreadTextEditor } from './mainThreadEditor'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; diff --git a/src/vs/workbench/api/node/mainThreadEditor.ts b/src/vs/workbench/api/electron-browser/mainThreadEditor.ts similarity index 94% rename from src/vs/workbench/api/node/mainThreadEditor.ts rename to src/vs/workbench/api/electron-browser/mainThreadEditor.ts index b3ba44a0361a6..601e99fa376fb 100644 --- a/src/vs/workbench/api/node/mainThreadEditor.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadEditor.ts @@ -15,19 +15,7 @@ import { SnippetController } from 'vs/editor/contrib/snippet/common/snippetContr import { EndOfLine, TextEditorLineNumbersStyle } from 'vs/workbench/api/node/extHostTypes'; import { TextEditorCursorStyle, cursorStyleToString } from 'vs/editor/common/config/editorOptions'; import { ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; - -export interface ITextEditorConfigurationUpdate { - tabSize?: number | 'auto'; - insertSpaces?: boolean | 'auto'; - cursorStyle?: TextEditorCursorStyle; - lineNumbers?: TextEditorLineNumbersStyle; -} -export interface IResolvedTextEditorConfiguration { - tabSize: number; - insertSpaces: boolean; - cursorStyle: TextEditorCursorStyle; - lineNumbers: TextEditorLineNumbersStyle; -} +import { IResolvedTextEditorConfiguration, ISelectionChangeEvent, ITextEditorConfigurationUpdate, TextEditorRevealType, IApplyEditsOptions, IUndoStopOptions } from 'vs/workbench/api/node/extHost.protocol'; function configurationsEqual(a: IResolvedTextEditorConfiguration, b: IResolvedTextEditorConfiguration) { if (a && !b || !a && b) { @@ -42,32 +30,11 @@ function configurationsEqual(a: IResolvedTextEditorConfiguration, b: IResolvedTe ); } -export interface ISelectionChangeEvent { - selections: Selection[]; - source?: string; -} - export interface IFocusTracker { onGainedFocus(): void; onLostFocus(): void; } -export enum TextEditorRevealType { - Default = 0, - InCenter = 1, - InCenterIfOutsideViewport = 2, - AtTop = 3 -} - -export interface IUndoStopOptions { - undoStopBefore: boolean; - undoStopAfter: boolean; -} - -export interface IApplyEditsOptions extends IUndoStopOptions { - setEndOfLine: EndOfLine; -} - /** * Text Editor that is permanently bound to the same model. * It can be bound or not to a CodeEditor. diff --git a/src/vs/workbench/api/node/mainThreadEditors.ts b/src/vs/workbench/api/electron-browser/mainThreadEditors.ts similarity index 97% rename from src/vs/workbench/api/node/mainThreadEditors.ts rename to src/vs/workbench/api/electron-browser/mainThreadEditors.ts index 1163612c0f0ac..3de296c7519fe 100644 --- a/src/vs/workbench/api/node/mainThreadEditors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadEditors.ts @@ -13,11 +13,13 @@ import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService' import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IEditorOptions, Position as EditorPosition } from 'vs/platform/editor/common/editor'; -import { TextEditorRevealType, MainThreadTextEditor, IApplyEditsOptions, IUndoStopOptions, ITextEditorConfigurationUpdate } from 'vs/workbench/api/node/mainThreadEditor'; +import { MainThreadTextEditor } from './mainThreadEditor'; +import { ITextEditorConfigurationUpdate, TextEditorRevealType, IApplyEditsOptions, IUndoStopOptions } from 'vs/workbench/api/node/extHost.protocol'; + import { MainThreadDocumentsAndEditors } from './mainThreadDocumentsAndEditors'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { equals as objectEquals } from 'vs/base/common/objects'; -import { ExtHostContext, MainThreadEditorsShape, ExtHostEditorsShape, ITextDocumentShowOptions, ITextEditorPositionData } from './extHost.protocol'; +import { ExtHostContext, MainThreadEditorsShape, ExtHostEditorsShape, ITextDocumentShowOptions, ITextEditorPositionData } from '../node/extHost.protocol'; import { IRange } from 'vs/editor/common/core/range'; import { ISelection } from 'vs/editor/common/core/selection'; diff --git a/src/vs/workbench/api/node/mainThreadErrors.ts b/src/vs/workbench/api/electron-browser/mainThreadErrors.ts similarity index 89% rename from src/vs/workbench/api/node/mainThreadErrors.ts rename to src/vs/workbench/api/electron-browser/mainThreadErrors.ts index 03ba71b8e3b5d..ca8962bc1f42b 100644 --- a/src/vs/workbench/api/node/mainThreadErrors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadErrors.ts @@ -5,7 +5,7 @@ 'use strict'; import * as errors from 'vs/base/common/errors'; -import { MainThreadErrorsShape } from './extHost.protocol'; +import { MainThreadErrorsShape } from '../node/extHost.protocol'; export class MainThreadErrors extends MainThreadErrorsShape { diff --git a/src/vs/workbench/api/node/mainThreadExplorerView.ts b/src/vs/workbench/api/electron-browser/mainThreadExplorerView.ts similarity index 98% rename from src/vs/workbench/api/node/mainThreadExplorerView.ts rename to src/vs/workbench/api/electron-browser/mainThreadExplorerView.ts index 8028c7069ec4a..19013b27409b5 100644 --- a/src/vs/workbench/api/node/mainThreadExplorerView.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadExplorerView.ts @@ -7,7 +7,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import Event, { Emitter } from 'vs/base/common/event'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { ExtHostContext, MainThreadExplorerViewShape, ExtHostExplorerViewShape, ITreeNode } from './extHost.protocol'; +import { ExtHostContext, MainThreadExplorerViewShape, ExtHostExplorerViewShape, ITreeNode } from '../node/extHost.protocol'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IExplorerViewsService, IExplorerViewDataProvider, IExplorerView } from 'vs/workbench/parts/explorers/common/explorer'; diff --git a/src/vs/workbench/api/node/mainThreadExtensionService.ts b/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts similarity index 99% rename from src/vs/workbench/api/node/mainThreadExtensionService.ts rename to src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts index 05ca99e2f244c..f5ba6b3cf3aeb 100644 --- a/src/vs/workbench/api/node/mainThreadExtensionService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts @@ -18,7 +18,7 @@ import { ExtensionsRegistry, ExtensionPoint, IExtensionPointUser, ExtensionMessa import { ExtensionScanner, MessagesCollector } from 'vs/workbench/node/extensionPoints'; import { IMessageService } from 'vs/platform/message/common/message'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { ExtHostContext, ExtHostExtensionServiceShape } from './extHost.protocol'; +import { ExtHostContext, ExtHostExtensionServiceShape } from '../node/extHost.protocol'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; const SystemExtensionsRoot = path.normalize(path.join(URI.parse(require.toUrl('')).fsPath, '..', 'extensions')); diff --git a/src/vs/workbench/api/node/mainThreadFileSystemEventService.ts b/src/vs/workbench/api/electron-browser/mainThreadFileSystemEventService.ts similarity index 96% rename from src/vs/workbench/api/node/mainThreadFileSystemEventService.ts rename to src/vs/workbench/api/electron-browser/mainThreadFileSystemEventService.ts index 9e4dfebe5a6cf..49022aacc7c62 100644 --- a/src/vs/workbench/api/node/mainThreadFileSystemEventService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadFileSystemEventService.ts @@ -6,7 +6,7 @@ import { FileChangeType, IFileService } from 'vs/platform/files/common/files'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { ExtHostContext, ExtHostFileSystemEventServiceShape, FileSystemEvents } from './extHost.protocol'; +import { ExtHostContext, ExtHostFileSystemEventServiceShape, FileSystemEvents } from '../node/extHost.protocol'; export class MainThreadFileSystemEventService { diff --git a/src/vs/workbench/api/node/mainThreadHeapService.ts b/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts similarity index 97% rename from src/vs/workbench/api/node/mainThreadHeapService.ts rename to src/vs/workbench/api/electron-browser/mainThreadHeapService.ts index 235556d3be300..aae6771afb56b 100644 --- a/src/vs/workbench/api/node/mainThreadHeapService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadHeapService.ts @@ -7,7 +7,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { ExtHostContext, ObjectIdentifier } from './extHost.protocol'; +import { ExtHostContext, ObjectIdentifier } from '../node/extHost.protocol'; import { consumeSignals, GCSignal } from 'gc-signals'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; diff --git a/src/vs/workbench/api/node/mainThreadLanguageFeatures.ts b/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts similarity index 99% rename from src/vs/workbench/api/node/mainThreadLanguageFeatures.ts rename to src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts index 925f5b2d01996..03934ca9335e5 100644 --- a/src/vs/workbench/api/node/mainThreadLanguageFeatures.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadLanguageFeatures.ts @@ -16,7 +16,7 @@ import { wireCancellationToken } from 'vs/base/common/async'; import { CancellationToken } from 'vs/base/common/cancellation'; import { Position as EditorPosition } from 'vs/editor/common/core/position'; import { Range as EditorRange } from 'vs/editor/common/core/range'; -import { ExtHostContext, MainThreadLanguageFeaturesShape, ExtHostLanguageFeaturesShape } from './extHost.protocol'; +import { ExtHostContext, MainThreadLanguageFeaturesShape, ExtHostLanguageFeaturesShape } from '../node/extHost.protocol'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { LanguageConfiguration } from 'vs/editor/common/modes/languageConfiguration'; import { IHeapService } from './mainThreadHeapService'; diff --git a/src/vs/workbench/api/node/mainThreadLanguages.ts b/src/vs/workbench/api/electron-browser/mainThreadLanguages.ts similarity index 92% rename from src/vs/workbench/api/node/mainThreadLanguages.ts rename to src/vs/workbench/api/electron-browser/mainThreadLanguages.ts index c828bc0ad5f5d..a80c17c54f9f5 100644 --- a/src/vs/workbench/api/node/mainThreadLanguages.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadLanguages.ts @@ -6,7 +6,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IModeService } from 'vs/editor/common/services/modeService'; -import { MainThreadLanguagesShape } from './extHost.protocol'; +import { MainThreadLanguagesShape } from '../node/extHost.protocol'; export class MainThreadLanguages extends MainThreadLanguagesShape { diff --git a/src/vs/workbench/api/node/mainThreadMessageService.ts b/src/vs/workbench/api/electron-browser/mainThreadMessageService.ts similarity index 97% rename from src/vs/workbench/api/node/mainThreadMessageService.ts rename to src/vs/workbench/api/electron-browser/mainThreadMessageService.ts index 840111c180e4d..b821c9eda45b1 100644 --- a/src/vs/workbench/api/node/mainThreadMessageService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadMessageService.ts @@ -9,7 +9,7 @@ import { IMessageService, IChoiceService } from 'vs/platform/message/common/mess import Severity from 'vs/base/common/severity'; import { Action } from 'vs/base/common/actions'; import { TPromise as Promise } from 'vs/base/common/winjs.base'; -import { MainThreadMessageServiceShape } from './extHost.protocol'; +import { MainThreadMessageServiceShape } from '../node/extHost.protocol'; import * as vscode from 'vscode'; export class MainThreadMessageService extends MainThreadMessageServiceShape { diff --git a/src/vs/workbench/api/node/mainThreadOutputService.ts b/src/vs/workbench/api/electron-browser/mainThreadOutputService.ts similarity index 97% rename from src/vs/workbench/api/node/mainThreadOutputService.ts rename to src/vs/workbench/api/electron-browser/mainThreadOutputService.ts index 6694cc7cd8f5d..262344171f9e7 100644 --- a/src/vs/workbench/api/node/mainThreadOutputService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadOutputService.ts @@ -9,7 +9,7 @@ import { Registry } from 'vs/platform/platform'; import { IOutputService, IOutputChannel, OUTPUT_PANEL_ID, Extensions, IOutputChannelRegistry } from 'vs/workbench/parts/output/common/output'; import { IPartService } from 'vs/workbench/services/part/common/partService'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; -import { MainThreadOutputServiceShape } from './extHost.protocol'; +import { MainThreadOutputServiceShape } from '../node/extHost.protocol'; export class MainThreadOutputService extends MainThreadOutputServiceShape { diff --git a/src/vs/workbench/api/node/mainThreadProgress.ts b/src/vs/workbench/api/electron-browser/mainThreadProgress.ts similarity index 95% rename from src/vs/workbench/api/node/mainThreadProgress.ts rename to src/vs/workbench/api/electron-browser/mainThreadProgress.ts index e7031b47d4465..eb3242904e000 100644 --- a/src/vs/workbench/api/node/mainThreadProgress.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadProgress.ts @@ -6,7 +6,7 @@ import { IProgressService2, IProgress, IProgressOptions, IProgressStep } from 'vs/platform/progress/common/progress'; import { TPromise } from 'vs/base/common/winjs.base'; -import { MainThreadProgressShape } from './extHost.protocol'; +import { MainThreadProgressShape } from '../node/extHost.protocol'; export class MainThreadProgress extends MainThreadProgressShape { diff --git a/src/vs/workbench/api/node/mainThreadQuickOpen.ts b/src/vs/workbench/api/electron-browser/mainThreadQuickOpen.ts similarity index 97% rename from src/vs/workbench/api/node/mainThreadQuickOpen.ts rename to src/vs/workbench/api/electron-browser/mainThreadQuickOpen.ts index 8e5664fcb0dba..8751ff6663895 100644 --- a/src/vs/workbench/api/node/mainThreadQuickOpen.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadQuickOpen.ts @@ -9,7 +9,7 @@ import { asWinJsPromise } from 'vs/base/common/async'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { IQuickOpenService, IPickOptions, IInputOptions } from 'vs/platform/quickOpen/common/quickOpen'; import { InputBoxOptions } from 'vscode'; -import { ExtHostContext, MainThreadQuickOpenShape, ExtHostQuickOpenShape, MyQuickPickItems } from './extHost.protocol'; +import { ExtHostContext, MainThreadQuickOpenShape, ExtHostQuickOpenShape, MyQuickPickItems } from '../node/extHost.protocol'; export class MainThreadQuickOpen extends MainThreadQuickOpenShape { diff --git a/src/vs/workbench/api/node/mainThreadSCM.ts b/src/vs/workbench/api/electron-browser/mainThreadSCM.ts similarity index 99% rename from src/vs/workbench/api/node/mainThreadSCM.ts rename to src/vs/workbench/api/electron-browser/mainThreadSCM.ts index 6223b3e3bc9d7..fb8d1f155a554 100644 --- a/src/vs/workbench/api/node/mainThreadSCM.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSCM.ts @@ -14,7 +14,7 @@ import { IThreadService } from 'vs/workbench/services/thread/common/threadServic import { ISCMService, ISCMProvider, ISCMResource, ISCMResourceGroup, ISCMResourceDecorations } from 'vs/workbench/services/scm/common/scm'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ICommandService } from 'vs/platform/commands/common/commands'; -import { ExtHostContext, MainThreadSCMShape, ExtHostSCMShape, SCMProviderFeatures, SCMRawResource, SCMGroupFeatures } from './extHost.protocol'; +import { ExtHostContext, MainThreadSCMShape, ExtHostSCMShape, SCMProviderFeatures, SCMRawResource, SCMGroupFeatures } from '../node/extHost.protocol'; import { Command } from 'vs/editor/common/modes'; class MainThreadSCMResourceGroup implements ISCMResourceGroup { diff --git a/src/vs/workbench/api/node/mainThreadSaveParticipant.ts b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts similarity index 99% rename from src/vs/workbench/api/node/mainThreadSaveParticipant.ts rename to src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts index cfc30fcb15d04..d90c6409a6811 100644 --- a/src/vs/workbench/api/node/mainThreadSaveParticipant.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadSaveParticipant.ts @@ -22,7 +22,7 @@ import { getDocumentFormattingEdits } from 'vs/editor/contrib/format/common/form import { EditOperationsCommand } from 'vs/editor/contrib/format/common/formatCommand'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { TextFileEditorModel } from 'vs/workbench/services/textfile/common/textFileEditorModel'; -import { ExtHostContext, ExtHostDocumentSaveParticipantShape } from './extHost.protocol'; +import { ExtHostContext, ExtHostDocumentSaveParticipantShape } from '../node/extHost.protocol'; import { EditOperation } from 'vs/editor/common/core/editOperation'; export interface INamedSaveParticpant extends ISaveParticipant { diff --git a/src/vs/workbench/api/node/mainThreadStatusBar.ts b/src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts similarity index 95% rename from src/vs/workbench/api/node/mainThreadStatusBar.ts rename to src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts index ed435c97485c4..d64d9d3ac2b7e 100644 --- a/src/vs/workbench/api/node/mainThreadStatusBar.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts @@ -6,7 +6,7 @@ import { IStatusbarService, StatusbarAlignment as MainThreadStatusBarAlignment } from 'vs/platform/statusbar/common/statusbar'; import { IDisposable } from 'vs/base/common/lifecycle'; -import { MainThreadStatusBarShape } from './extHost.protocol'; +import { MainThreadStatusBarShape } from '../node/extHost.protocol'; export class MainThreadStatusBar extends MainThreadStatusBarShape { private mapIdToDisposable: { [id: number]: IDisposable }; diff --git a/src/vs/workbench/api/node/mainThreadStorage.ts b/src/vs/workbench/api/electron-browser/mainThreadStorage.ts similarity index 95% rename from src/vs/workbench/api/node/mainThreadStorage.ts rename to src/vs/workbench/api/electron-browser/mainThreadStorage.ts index 2e8aba86eb9ac..5f109ae9c3d0b 100644 --- a/src/vs/workbench/api/node/mainThreadStorage.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadStorage.ts @@ -6,7 +6,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; -import { MainThreadStorageShape } from './extHost.protocol'; +import { MainThreadStorageShape } from '../node/extHost.protocol'; export class MainThreadStorage extends MainThreadStorageShape { @@ -41,4 +41,4 @@ export class MainThreadStorage extends MainThreadStorageShape { } return undefined; } -} \ No newline at end of file +} diff --git a/src/vs/workbench/api/node/mainThreadTask.ts b/src/vs/workbench/api/electron-browser/mainThreadTask.ts similarity index 97% rename from src/vs/workbench/api/node/mainThreadTask.ts rename to src/vs/workbench/api/electron-browser/mainThreadTask.ts index f27cdfa54afe4..bbd8040c9c56f 100644 --- a/src/vs/workbench/api/node/mainThreadTask.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTask.ts @@ -9,7 +9,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { ITaskService } from 'vs/workbench/parts/tasks/common/taskService'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { ExtHostContext, MainThreadTaskShape, ExtHostTaskShape } from './extHost.protocol'; +import { ExtHostContext, MainThreadTaskShape, ExtHostTaskShape } from '../node/extHost.protocol'; export class MainThreadTask extends MainThreadTaskShape { @@ -33,4 +33,4 @@ export class MainThreadTask extends MainThreadTaskShape { this._taskService.unregisterTaskProvider(handle); return TPromise.as(undefined); } -} \ No newline at end of file +} diff --git a/src/vs/workbench/api/node/mainThreadTelemetry.ts b/src/vs/workbench/api/electron-browser/mainThreadTelemetry.ts similarity index 94% rename from src/vs/workbench/api/node/mainThreadTelemetry.ts rename to src/vs/workbench/api/electron-browser/mainThreadTelemetry.ts index 425123d08c641..42a15120c4069 100644 --- a/src/vs/workbench/api/node/mainThreadTelemetry.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTelemetry.ts @@ -6,7 +6,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { ITelemetryService, ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry'; -import { MainThreadTelemetryShape } from './extHost.protocol'; +import { MainThreadTelemetryShape } from '../node/extHost.protocol'; /** * Helper always instantiated in the main process to receive telemetry events from remote telemetry services diff --git a/src/vs/workbench/api/node/mainThreadTerminalService.ts b/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts similarity index 98% rename from src/vs/workbench/api/node/mainThreadTerminalService.ts rename to src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts index 7df3be34e0b00..c59fbbe55155a 100644 --- a/src/vs/workbench/api/node/mainThreadTerminalService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts @@ -8,7 +8,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ITerminalService, ITerminalInstance, IShellLaunchConfig } from 'vs/workbench/parts/terminal/common/terminal'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { TPromise } from 'vs/base/common/winjs.base'; -import { ExtHostContext, ExtHostTerminalServiceShape, MainThreadTerminalServiceShape } from './extHost.protocol'; +import { ExtHostContext, ExtHostTerminalServiceShape, MainThreadTerminalServiceShape } from '../node/extHost.protocol'; export class MainThreadTerminalService extends MainThreadTerminalServiceShape { diff --git a/src/vs/workbench/api/node/mainThreadWorkspace.ts b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts similarity index 98% rename from src/vs/workbench/api/node/mainThreadWorkspace.ts rename to src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts index e8566c751ce68..707349e5a9379 100644 --- a/src/vs/workbench/api/node/mainThreadWorkspace.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts @@ -14,7 +14,7 @@ import { ICommonCodeEditor, isCommonCodeEditor } from 'vs/editor/common/editorCo import { bulkEdit, IResourceEdit } from 'vs/editor/common/services/bulkEdit'; import { TPromise } from 'vs/base/common/winjs.base'; import { Uri } from 'vscode'; -import { MainThreadWorkspaceShape } from './extHost.protocol'; +import { MainThreadWorkspaceShape } from '../node/extHost.protocol'; import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; import { IFileService } from 'vs/platform/files/common/files'; diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index ec54f95a4376c..1f602e9ac5f6c 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -35,13 +35,15 @@ import { IWorkspaceConfigurationValues } from 'vs/workbench/services/configurati import { IPickOpenEntry, IPickOptions } from 'vs/platform/quickOpen/common/quickOpen'; import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; -import { IApplyEditsOptions, IUndoStopOptions, TextEditorRevealType, ITextEditorConfigurationUpdate, IResolvedTextEditorConfiguration, ISelectionChangeEvent } from './mainThreadEditor'; +import { TextEditorCursorStyle } from 'vs/editor/common/config/editorOptions'; +import { EndOfLine, TextEditorLineNumbersStyle } from 'vs/workbench/api/node/extHostTypes'; + import { TaskSet } from 'vs/workbench/parts/tasks/common/tasks'; import { IModelChangedEvent } from 'vs/editor/common/model/mirrorModel'; import { IPosition } from 'vs/editor/common/core/position'; import { IRange } from 'vs/editor/common/core/range'; -import { ISelection } from 'vs/editor/common/core/selection'; +import { ISelection, Selection } from 'vs/editor/common/core/selection'; export interface IEnvironment { enableProposedApiForAll: boolean; @@ -133,6 +135,44 @@ export abstract class MainThreadDocumentsShape { $trySaveDocument(uri: URI): TPromise { throw ni(); } } + +export interface ISelectionChangeEvent { + selections: Selection[]; + source?: string; +} + +export interface ITextEditorConfigurationUpdate { + tabSize?: number | 'auto'; + insertSpaces?: boolean | 'auto'; + cursorStyle?: TextEditorCursorStyle; + lineNumbers?: TextEditorLineNumbersStyle; +} + +export interface IResolvedTextEditorConfiguration { + tabSize: number; + insertSpaces: boolean; + cursorStyle: TextEditorCursorStyle; + lineNumbers: TextEditorLineNumbersStyle; +} + +export enum TextEditorRevealType { + Default = 0, + InCenter = 1, + InCenterIfOutsideViewport = 2, + AtTop = 3 +} + +export interface IUndoStopOptions { + undoStopBefore: boolean; + undoStopAfter: boolean; +} + +export interface IApplyEditsOptions extends IUndoStopOptions { + setEndOfLine: EndOfLine; +} + + + export interface ITextDocumentShowOptions { position?: EditorPosition; preserveFocus?: boolean; diff --git a/src/vs/workbench/api/node/extHostTextEditor.ts b/src/vs/workbench/api/node/extHostTextEditor.ts index ab5572a0d62cf..b566c23aa34f7 100644 --- a/src/vs/workbench/api/node/extHostTextEditor.ts +++ b/src/vs/workbench/api/node/extHostTextEditor.ts @@ -12,9 +12,8 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { ExtHostDocumentData } from 'vs/workbench/api/node/extHostDocumentData'; import { Selection, Range, Position, EndOfLine, TextEditorRevealType, TextEditorLineNumbersStyle, SnippetString } from './extHostTypes'; import { ISingleEditOperation } from 'vs/editor/common/editorCommon'; -import { IResolvedTextEditorConfiguration, ITextEditorConfigurationUpdate } from 'vs/workbench/api/node/mainThreadEditor'; import * as TypeConverters from './extHostTypeConverters'; -import { MainThreadEditorsShape } from './extHost.protocol'; +import { MainThreadEditorsShape, IResolvedTextEditorConfiguration, ITextEditorConfigurationUpdate } from './extHost.protocol'; import * as vscode from 'vscode'; import { TextEditorCursorStyle } from 'vs/editor/common/config/editorOptions'; import { IRange } from 'vs/editor/common/core/range'; diff --git a/src/vs/workbench/api/node/extHostTextEditors.ts b/src/vs/workbench/api/node/extHostTextEditors.ts index e95c96c3bba90..0f4bfdf398a7e 100644 --- a/src/vs/workbench/api/node/extHostTextEditors.ts +++ b/src/vs/workbench/api/node/extHostTextEditors.ts @@ -10,12 +10,11 @@ import { toThenable } from 'vs/base/common/async'; import { TPromise } from 'vs/base/common/winjs.base'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { TextEditorSelectionChangeKind } from './extHostTypes'; -import { IResolvedTextEditorConfiguration, ISelectionChangeEvent } from 'vs/workbench/api/node/mainThreadEditor'; import * as TypeConverters from './extHostTypeConverters'; import { TextEditorDecorationType, ExtHostTextEditor } from './extHostTextEditor'; import { ExtHostDocumentsAndEditors } from './extHostDocumentsAndEditors'; import { Position as EditorPosition } from 'vs/platform/editor/common/editor'; -import { MainContext, MainThreadEditorsShape, ExtHostEditorsShape, ITextDocumentShowOptions, ITextEditorPositionData } from './extHost.protocol'; +import { MainContext, MainThreadEditorsShape, ExtHostEditorsShape, ITextDocumentShowOptions, ITextEditorPositionData, IResolvedTextEditorConfiguration, ISelectionChangeEvent } from './extHost.protocol'; import * as vscode from 'vscode'; export class ExtHostEditors extends ExtHostEditorsShape { diff --git a/src/vs/workbench/electron-browser/extensionHost.ts b/src/vs/workbench/electron-browser/extensionHost.ts index e084eb83a99f2..e8f82622b43d8 100644 --- a/src/vs/workbench/electron-browser/extensionHost.ts +++ b/src/vs/workbench/electron-browser/extensionHost.ts @@ -30,7 +30,7 @@ import { generateRandomPipeName, Protocol } from 'vs/base/parts/ipc/node/ipc.net import { createServer, Server } from 'net'; import Event, { Emitter } from 'vs/base/common/event'; import { IInitData } from 'vs/workbench/api/node/extHost.protocol'; -import { MainProcessExtensionService } from 'vs/workbench/api/node/mainThreadExtensionService'; +import { MainProcessExtensionService } from 'vs/workbench/api/electron-browser/mainThreadExtensionService'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; export const EXTENSION_LOG_BROADCAST_CHANNEL = 'vscode:extensionLog'; diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index dae76fa0ddd5c..f5e39ca7bd489 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -53,7 +53,7 @@ import { IntegrityServiceImpl } from 'vs/platform/integrity/node/integrityServic import { IIntegrityService } from 'vs/platform/integrity/common/integrity'; import { EditorWorkerServiceImpl } from 'vs/editor/common/services/editorWorkerServiceImpl'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; -import { MainProcessExtensionService } from 'vs/workbench/api/node/mainThreadExtensionService'; +import { MainProcessExtensionService } from 'vs/workbench/api/electron-browser/mainThreadExtensionService'; import { IOptions } from 'vs/workbench/common/options'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; diff --git a/src/vs/workbench/electron-browser/workbench.main.ts b/src/vs/workbench/electron-browser/workbench.main.ts index f71d678b112d9..59d932b5644b8 100644 --- a/src/vs/workbench/electron-browser/workbench.main.ts +++ b/src/vs/workbench/electron-browser/workbench.main.ts @@ -105,7 +105,7 @@ import 'vs/workbench/parts/performance/electron-browser/performance.contribution import 'vs/workbench/parts/cli/electron-browser/cli.contribution'; -import 'vs/workbench/api/node/extHost.contribution'; +import 'vs/workbench/api/electron-browser/extensionHost.contribution'; import 'vs/workbench/electron-browser/main.contribution'; import 'vs/workbench/electron-browser/main'; diff --git a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts index f1e0c75db19e0..93bf0a5b895ad 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts @@ -20,12 +20,12 @@ import { IThreadService } from 'vs/workbench/services/thread/common/threadServic import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands'; import { IModelService } from 'vs/editor/common/services/modelService'; import { ExtHostLanguageFeatures } from 'vs/workbench/api/node/extHostLanguageFeatures'; -import { MainThreadLanguageFeatures } from 'vs/workbench/api/node/mainThreadLanguageFeatures'; -import { IHeapService } from 'vs/workbench/api/node/mainThreadHeapService'; +import { MainThreadLanguageFeatures } from 'vs/workbench/api/electron-browser/mainThreadLanguageFeatures'; +import { IHeapService } from 'vs/workbench/api/electron-browser/mainThreadHeapService'; import { ExtHostApiCommands } from 'vs/workbench/api/node/extHostApiCommands'; import { ExtHostCommands } from 'vs/workbench/api/node/extHostCommands'; import { ExtHostHeapService } from 'vs/workbench/api/node/extHostHeapService'; -import { MainThreadCommands } from 'vs/workbench/api/node/mainThreadCommands'; +import { MainThreadCommands } from 'vs/workbench/api/electron-browser/mainThreadCommands'; import { ExtHostDocuments } from 'vs/workbench/api/node/extHostDocuments'; import { ExtHostDocumentsAndEditors } from 'vs/workbench/api/node/extHostDocumentsAndEditors'; import { MainContext, ExtHostContext } from 'vs/workbench/api/node/extHost.protocol'; diff --git a/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts b/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts index 7f21fd42f1900..f982995d27f05 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts @@ -19,10 +19,10 @@ import { IMarkerService } from 'vs/platform/markers/common/markers'; import { MarkerService } from 'vs/platform/markers/common/markerService'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { ExtHostLanguageFeatures } from 'vs/workbench/api/node/extHostLanguageFeatures'; -import { MainThreadLanguageFeatures } from 'vs/workbench/api/node/mainThreadLanguageFeatures'; +import { MainThreadLanguageFeatures } from 'vs/workbench/api/electron-browser/mainThreadLanguageFeatures'; import { ExtHostCommands } from 'vs/workbench/api/node/extHostCommands'; -import { MainThreadCommands } from 'vs/workbench/api/node/mainThreadCommands'; -import { IHeapService } from 'vs/workbench/api/node/mainThreadHeapService'; +import { MainThreadCommands } from 'vs/workbench/api/electron-browser/mainThreadCommands'; +import { IHeapService } from 'vs/workbench/api/electron-browser/mainThreadHeapService'; import { ExtHostDocuments } from 'vs/workbench/api/node/extHostDocuments'; import { ExtHostDocumentsAndEditors } from 'vs/workbench/api/node/extHostDocumentsAndEditors'; import { getDocumentSymbols } from 'vs/editor/contrib/quickOpen/common/quickOpen'; diff --git a/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts b/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts index 9559d13a26e1c..6b136cb47df35 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostMessagerService.test.ts @@ -7,7 +7,7 @@ import * as assert from 'assert'; import { Action } from 'vs/base/common/actions'; -import { MainThreadMessageService } from 'vs/workbench/api/node/mainThreadMessageService'; +import { MainThreadMessageService } from 'vs/workbench/api/electron-browser/mainThreadMessageService'; import { TPromise as Promise } from 'vs/base/common/winjs.base'; suite('ExtHostMessageService', function () { diff --git a/src/vs/workbench/test/electron-browser/api/extHostTextEditor.test.ts b/src/vs/workbench/test/electron-browser/api/extHostTextEditor.test.ts index 7fc02336299c8..c8834439d4021 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostTextEditor.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostTextEditor.test.ts @@ -8,8 +8,7 @@ import * as assert from 'assert'; import { TPromise } from 'vs/base/common/winjs.base'; import { TextEditorLineNumbersStyle } from 'vs/workbench/api/node/extHostTypes'; import { TextEditorCursorStyle } from 'vs/editor/common/config/editorOptions'; -import { IResolvedTextEditorConfiguration, ITextEditorConfigurationUpdate } from 'vs/workbench/api/node/mainThreadEditor'; -import { MainThreadEditorsShape } from 'vs/workbench/api/node/extHost.protocol'; +import { MainThreadEditorsShape, IResolvedTextEditorConfiguration, ITextEditorConfigurationUpdate } from 'vs/workbench/api/node/extHost.protocol'; import { ExtHostTextEditorOptions, ExtHostTextEditor } from 'vs/workbench/api/node/extHostTextEditor'; import { ExtHostDocumentData } from 'vs/workbench/api/node/extHostDocumentData'; import URI from 'vs/base/common/uri'; diff --git a/src/vs/workbench/test/electron-browser/api/mainThreadCommands.test.ts b/src/vs/workbench/test/electron-browser/api/mainThreadCommands.test.ts index 259d55117ad3a..616043909a04d 100644 --- a/src/vs/workbench/test/electron-browser/api/mainThreadCommands.test.ts +++ b/src/vs/workbench/test/electron-browser/api/mainThreadCommands.test.ts @@ -6,7 +6,7 @@ 'use strict'; import * as assert from 'assert'; -import { MainThreadCommands } from 'vs/workbench/api/node/mainThreadCommands'; +import { MainThreadCommands } from 'vs/workbench/api/electron-browser/mainThreadCommands'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { OneGetThreadService } from './testThreadService'; @@ -25,4 +25,4 @@ suite('MainThreadCommands', function () { commands.$unregisterCommand('foo'); assert.equal(CommandsRegistry.getCommand('foo'), undefined); }); -}); \ No newline at end of file +}); diff --git a/src/vs/workbench/test/electron-browser/api/mainThreadDocuments.test.ts b/src/vs/workbench/test/electron-browser/api/mainThreadDocuments.test.ts index 334b12318bb92..b938c450d50ff 100644 --- a/src/vs/workbench/test/electron-browser/api/mainThreadDocuments.test.ts +++ b/src/vs/workbench/test/electron-browser/api/mainThreadDocuments.test.ts @@ -6,7 +6,7 @@ 'use strict'; import * as assert from 'assert'; -import { BoundModelReferenceCollection } from 'vs/workbench/api/node/mainThreadDocuments'; +import { BoundModelReferenceCollection } from 'vs/workbench/api/electron-browser/mainThreadDocuments'; import { Model } from 'vs/editor/common/model/model'; import { TPromise } from 'vs/base/common/winjs.base'; diff --git a/src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts b/src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts index 7800874df6aa0..3e809f5a8e821 100644 --- a/src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts +++ b/src/vs/workbench/test/electron-browser/api/mainThreadDocumentsAndEditors.test.ts @@ -6,7 +6,7 @@ 'use strict'; import * as assert from 'assert'; -import { MainThreadDocumentsAndEditors } from 'vs/workbench/api/node/mainThreadDocumentsAndEditors'; +import { MainThreadDocumentsAndEditors } from 'vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors'; import { OneGetThreadService } from './testThreadService'; import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl'; diff --git a/src/vs/workbench/test/electron-browser/api/mainThreadSaveParticipant.test.ts b/src/vs/workbench/test/electron-browser/api/mainThreadSaveParticipant.test.ts index cb595b9a1b885..35fc82deda86b 100644 --- a/src/vs/workbench/test/electron-browser/api/mainThreadSaveParticipant.test.ts +++ b/src/vs/workbench/test/electron-browser/api/mainThreadSaveParticipant.test.ts @@ -7,7 +7,7 @@ import * as assert from 'assert'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { FinalNewLineParticipant } from 'vs/workbench/api/node/mainThreadSaveParticipant'; +import { FinalNewLineParticipant } from 'vs/workbench/api/electron-browser/mainThreadSaveParticipant'; import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; import { workbenchInstantiationService, TestTextFileService } from 'vs/workbench/test/workbenchTestServices'; import { toResource } from 'vs/base/test/common/utils'; @@ -72,4 +72,4 @@ suite('MainThreadSaveParticipant', function () { done(); }); }); -}); \ No newline at end of file +}); From 8b86237a81252f15cb7c87286c0faf20403d85ba Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 12 May 2017 11:33:36 +0200 Subject: [PATCH 0457/2747] wire up new controller and main thread editor --- .../api/electron-browser/mainThreadEditor.ts | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadEditor.ts b/src/vs/workbench/api/electron-browser/mainThreadEditor.ts index 601e99fa376fb..cd44f6778a1dc 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadEditor.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadEditor.ts @@ -11,7 +11,7 @@ import { IModelService } from 'vs/editor/common/services/modelService'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { Range, IRange } from 'vs/editor/common/core/range'; import { Selection, ISelection } from 'vs/editor/common/core/selection'; -import { SnippetController } from 'vs/editor/contrib/snippet/common/snippetController'; +import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { EndOfLine, TextEditorLineNumbersStyle } from 'vs/workbench/api/node/extHostTypes'; import { TextEditorCursorStyle, cursorStyleToString } from 'vs/editor/common/config/editorOptions'; import { ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; @@ -361,10 +361,10 @@ export class MainThreadTextEditor { return false; } - const snippetController = SnippetController.get(this._codeEditor); + const snippetController = SnippetController2.get(this._codeEditor); - // cancel previous snippet mode - snippetController.leaveSnippet(); + // // cancel previous snippet mode + // snippetController.leaveSnippet(); // set selection, focus editor const selections = ranges.map(r => new Selection(r.startLineNumber, r.startColumn, r.endLineNumber, r.endColumn)); @@ -372,13 +372,7 @@ export class MainThreadTextEditor { this._codeEditor.focus(); // make modifications - if (opts.undoStopBefore) { - this._codeEditor.pushUndoStop(); - } - snippetController.insertSnippet(template, 0, 0); - if (opts.undoStopAfter) { - this._codeEditor.pushUndoStop(); - } + snippetController.insert(template, 0, 0, opts.undoStopBefore, opts.undoStopAfter); return true; } From 41f50f9b79dc883124567d915d28a4e766615620 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 12 May 2017 11:35:23 +0200 Subject: [PATCH 0458/2747] tfs: darwin use agent specific npm cache --- build/tfs/darwin/build.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index 15c5d29e255b1..bcd3f788f9c94 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -1,6 +1,12 @@ #!/bin/sh set -e +# set agent specific npm cache +if [ -z "$AGENT_WORKFOLDER" ] +then + export npm_config_cache="$AGENT_WORKFOLDER/npm-cache" +fi + # log build step STEP() { echo "" From 2b9052dd26d8923c574a87f728dc7ec596325a9d Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 12 May 2017 11:39:41 +0200 Subject: [PATCH 0459/2747] tfs: darwin get secrets --- build/tfs/darwin/build.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index bcd3f788f9c94..3d1bef7f00e90 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -1,6 +1,11 @@ #!/bin/sh set -e +export $VSCODE_MIXIN_PASSWORD = "$1" +export $AZURE_STORAGE_ACCESS_KEY_2 = "$2" +export $MOONCAKE_STORAGE_ACCESS_KEY = "$3" +export $AZURE_DOCUMENTDB_MASTERKEY = "$4" + # set agent specific npm cache if [ -z "$AGENT_WORKFOLDER" ] then From c90c3111eafde31a1733032c31bad43fa810dcbe Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 12 May 2017 11:40:28 +0200 Subject: [PATCH 0460/2747] tfs: fix darwin build --- build/tfs/darwin/build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index 3d1bef7f00e90..b589cc0368b33 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -1,10 +1,10 @@ #!/bin/sh set -e -export $VSCODE_MIXIN_PASSWORD = "$1" -export $AZURE_STORAGE_ACCESS_KEY_2 = "$2" -export $MOONCAKE_STORAGE_ACCESS_KEY = "$3" -export $AZURE_DOCUMENTDB_MASTERKEY = "$4" +export VSCODE_MIXIN_PASSWORD = "$1" +export AZURE_STORAGE_ACCESS_KEY_2 = "$2" +export MOONCAKE_STORAGE_ACCESS_KEY = "$3" +export AZURE_DOCUMENTDB_MASTERKEY = "$4" # set agent specific npm cache if [ -z "$AGENT_WORKFOLDER" ] From 42741c1995daa42dc56c3dd2ffa09e9ece36e532 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 12 May 2017 11:41:36 +0200 Subject: [PATCH 0461/2747] tfs: fix darwin build --- build/tfs/darwin/build.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index b589cc0368b33..e9157afe477ce 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -1,10 +1,10 @@ #!/bin/sh set -e -export VSCODE_MIXIN_PASSWORD = "$1" -export AZURE_STORAGE_ACCESS_KEY_2 = "$2" -export MOONCAKE_STORAGE_ACCESS_KEY = "$3" -export AZURE_DOCUMENTDB_MASTERKEY = "$4" +export VSCODE_MIXIN_PASSWORD="$1" +export AZURE_STORAGE_ACCESS_KEY_2="$2" +export MOONCAKE_STORAGE_ACCESS_KEY="$3" +export AZURE_DOCUMENTDB_MASTERKEY="$4" # set agent specific npm cache if [ -z "$AGENT_WORKFOLDER" ] From 24f5525a5ba10df07d7396095d28f98363cb959c Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 12 May 2017 11:45:08 +0200 Subject: [PATCH 0462/2747] tfs: use scoped npm cache --- build/tfs/darwin/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index e9157afe477ce..4ae211bfece6a 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -7,9 +7,10 @@ export MOONCAKE_STORAGE_ACCESS_KEY="$3" export AZURE_DOCUMENTDB_MASTERKEY="$4" # set agent specific npm cache -if [ -z "$AGENT_WORKFOLDER" ] +if [ -n "$AGENT_WORKFOLDER" ] then export npm_config_cache="$AGENT_WORKFOLDER/npm-cache" + echo "Using npm cache: $npm_config_cache" fi # log build step From 47996c00f590ab193192af4fcfe3cc7125c7d33d Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 12 May 2017 11:51:26 +0200 Subject: [PATCH 0463/2747] tfs: accept source maps access key --- build/tfs/darwin/build.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index 4ae211bfece6a..c71342fd42c29 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -2,9 +2,10 @@ set -e export VSCODE_MIXIN_PASSWORD="$1" -export AZURE_STORAGE_ACCESS_KEY_2="$2" -export MOONCAKE_STORAGE_ACCESS_KEY="$3" -export AZURE_DOCUMENTDB_MASTERKEY="$4" +export AZURE_STORAGE_ACCESS_KEY="$2" +export AZURE_STORAGE_ACCESS_KEY_2="$3" +export MOONCAKE_STORAGE_ACCESS_KEY="$4" +export AZURE_DOCUMENTDB_MASTERKEY="$5" # set agent specific npm cache if [ -n "$AGENT_WORKFOLDER" ] From 077ea79ac29260f929f3605de46ad1830dce3893 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 12 May 2017 12:05:21 +0200 Subject: [PATCH 0464/2747] add accept command, not (yet?) bound to enter tho --- .../snippet/browser/snippetController2.ts | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 238a2632c1000..948bb9a9876ec 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -52,7 +52,8 @@ export class SnippetController2 { return 'snippetController2'; } - insert(template: string, + insert( + template: string, overwriteBefore: number = 0, overwriteAfter: number = 0, undoStopBefore: boolean = true, undoStopAfter: boolean = true ): void { @@ -95,6 +96,12 @@ export class SnippetController2 { this._hasNextTabstop.set(!this._snippet.isAtFinalPlaceholder); } + finish(): void { + while (this._inSnippet.get()) { + this.next(); + } + } + cancel(): void { if (this._snippet) { this._inSnippet.reset(); @@ -119,7 +126,6 @@ export class SnippetController2 { this._updateState(); } } - } @@ -156,3 +162,14 @@ CommonEditorRegistry.registerEditorCommand(new CommandCtor({ secondary: [KeyMod.Shift | KeyCode.Escape] } })); + +CommonEditorRegistry.registerEditorCommand(new CommandCtor({ + id: 'snippet.accept', + precondition: SnippetController2.InSnippetMode, + handler: ctrl => ctrl.finish(), + // kbOpts: { + // weight: CommonEditorRegistry.commandWeight(30), + // kbExpr: EditorContextKeys.textFocus, + // primary: KeyCode.Enter, + // } +})); From 4006b8e629f05b6a468e23074242da4aacdcbca3 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 12 May 2017 12:16:25 +0200 Subject: [PATCH 0465/2747] Cannot read property 'push' of undefined (fixes #26513) --- .../workbench/browser/parts/activitybar/activitybarPart.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index a40dd7dd62153..8951ed6b9008a 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -89,9 +89,6 @@ export class ActivitybarPart extends Part implements IActivityBarService { this.pinnedViewlets = this.viewletService.getViewlets().map(v => v.id); } - // Update viewlet switcher when external viewlets become ready - this.extensionService.onReady().then(() => this.updateViewletSwitcher()); - this.registerListeners(); } @@ -250,6 +247,9 @@ export class ActivitybarPart extends Part implements IActivityBarService { }); this.updateViewletSwitcher(); + + // Update viewlet switcher when external viewlets become ready + this.extensionService.onReady().then(() => this.updateViewletSwitcher()); } private updateViewletSwitcher() { From e1386feaa2f16fd7d2936908b9e9114585438a78 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 12 May 2017 12:17:33 +0200 Subject: [PATCH 0466/2747] Uncaught TypeError: Cannot read property 'style' of undefined (fixes #26514) --- src/vs/workbench/browser/parts/titlebar/titlebarPart.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts index 8873d4ed56f65..eb4fa87e224dd 100644 --- a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts +++ b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts @@ -234,8 +234,10 @@ export class TitlebarPart extends Part implements ITitleService { // Part container const container = this.getContainer(); - container.style('color', this.getColor(this.isInactive ? TITLE_BAR_INACTIVE_FOREGROUND : TITLE_BAR_ACTIVE_FOREGROUND)); - container.style('background-color', this.getColor(this.isInactive ? TITLE_BAR_INACTIVE_BACKGROUND : TITLE_BAR_ACTIVE_BACKGROUND)); + if (container) { + container.style('color', this.getColor(this.isInactive ? TITLE_BAR_INACTIVE_FOREGROUND : TITLE_BAR_ACTIVE_FOREGROUND)); + container.style('background-color', this.getColor(this.isInactive ? TITLE_BAR_INACTIVE_BACKGROUND : TITLE_BAR_ACTIVE_BACKGROUND)); + } } private onTitleDoubleclick(): void { From f4c2b4d1cc8d9b30c371ab2aee43b9135bdfe300 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 12 May 2017 12:21:39 +0200 Subject: [PATCH 0467/2747] debug: fetch first call stack to improve perf #25605 --- .../parts/debug/common/debugModel.ts | 52 ++++++++++--------- .../debug/electron-browser/debugService.ts | 10 +++- .../debug/electron-browser/debugViewer.ts | 6 ++- 3 files changed, 42 insertions(+), 26 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index a26b1bc46615c..d5bb323a1b0eb 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -371,15 +371,15 @@ export class StackFrame implements IStackFrame { } export class Thread implements IThread { - private promisedCallStack: TPromise; - private cachedCallStack: IStackFrame[]; + private fetchPromise: TPromise; + private callStack: IStackFrame[]; public stoppedDetails: IRawStoppedDetails; public stopped: boolean; constructor(public process: IProcess, public name: string, public threadId: number) { - this.promisedCallStack = null; + this.fetchPromise = null; this.stoppedDetails = null; - this.cachedCallStack = null; + this.callStack = null; this.stopped = false; } @@ -388,43 +388,41 @@ export class Thread implements IThread { } public clearCallStack(): void { - this.promisedCallStack = null; - this.cachedCallStack = null; + this.fetchPromise = null; + this.callStack = null; } public getCallStack(): IStackFrame[] { - return this.cachedCallStack; + return this.callStack; } /** - * Queries the debug adapter for the callstack and returns a promise with - * the stack frames of the callstack. + * Queries the debug adapter for the callstack and returns a promise + * which completes once the call stack has been retrieved. * If the thread is not stopped, it returns a promise to an empty array. - * Only gets the first 20 stack frames. Calling this method consecutive times - * with getAdditionalStackFrames = true gets the remainder of the call stack. + * Only fetches the first stack frame for performance reasons. Calling this method consecutive times + * gets the remainder of the call stack. */ - public fetchCallStack(getAdditionalStackFrames = false): TPromise { + public fetchCallStack(): TPromise { if (!this.stopped) { - return TPromise.as([]); + return TPromise.as(null); } - if (!this.promisedCallStack) { - this.promisedCallStack = this.getCallStackImpl(0).then(callStack => { - this.cachedCallStack = callStack; - return callStack; + if (!this.fetchPromise) { + this.fetchPromise = this.getCallStackImpl(0, 1).then(callStack => { + this.callStack = callStack || []; }); - } else if (getAdditionalStackFrames) { - this.promisedCallStack = this.promisedCallStack.then(callStackFirstPart => this.getCallStackImpl(callStackFirstPart.length).then(callStackSecondPart => { - this.cachedCallStack = callStackFirstPart.concat(callStackSecondPart); - return this.cachedCallStack; + } else { + this.fetchPromise = this.fetchPromise.then(() => this.getCallStackImpl(this.callStack.length, 20).then(callStackSecondPart => { + this.callStack = this.callStack.concat(callStackSecondPart); })); } - return this.promisedCallStack; + return this.fetchPromise; } - private getCallStackImpl(startFrame: number): TPromise { - return this.process.session.stackTrace({ threadId: this.threadId, startFrame, levels: 20 }).then(response => { + private getCallStackImpl(startFrame: number, levels: number): TPromise { + return this.process.session.stackTrace({ threadId: this.threadId, startFrame, levels }).then(response => { if (!response || !response.body) { return []; } @@ -781,6 +779,12 @@ export class Model implements IModel { } } + public fetchCallStack(thread: Thread): TPromise { + return thread.fetchCallStack().then(() => { + this._onDidChangeCallStack.fire(); + }); + } + public getBreakpoints(): Breakpoint[] { return this.breakpoints; } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 157009cdbd469..2d2d483948d89 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -291,7 +291,15 @@ export class DebugService implements debug.IDebugService { const thread = process && process.getThread(threadId); if (thread) { - thread.fetchCallStack().then(callStack => { + // Call fetch call stack twice, the first only return the top stack frame. + // Second retrieves the rest of the call stack. For performance reasons #25605 + this.model.fetchCallStack(thread).then(() => { + const callStack = thread.getCallStack(); + // Some adapters might not respect the number levels in StackTraceRequest and might + // return more stackFrames than requested. For those do not send an additional stackTrace request. + if (callStack.length <= 1) { + this.model.fetchCallStack(thread).done(undefined, errors.onUnexpectedError); + } if (callStack.length > 0 && !this.viewModel.focusedStackFrame) { // focus first stack frame from top that has source location if no other stack frame is focussed const stackFrameToFocus = first(callStack, sf => sf.source && sf.source.available, callStack[0]); diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index 88619fbcc71f0..f5d1519568c9e 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -271,7 +271,7 @@ export class CallStackController extends BaseDebugController { const process = this.debugService.getModel().getProcesses().filter(p => p.getId() === threadAndProcessIds.processId).pop(); const thread = process && process.getThread(threadAndProcessIds.threadId); if (thread) { - (thread).fetchCallStack(true) + (thread).fetchCallStack() .done(() => tree.refresh(), errors.onUnexpectedError); } @@ -363,6 +363,10 @@ export class CallStackDataSource implements IDataSource { private getThreadChildren(thread: Thread): any[] { const callStack: any[] = thread.getCallStack(); + if (!callStack) { + return []; + } + if (thread.stoppedDetails && thread.stoppedDetails.framesErrorMessage) { return callStack.concat([thread.stoppedDetails.framesErrorMessage]); } From 98b5631bdb24b23efd4dca8f0d85e940a587ac17 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 12 May 2017 12:22:51 +0200 Subject: [PATCH 0468/2747] debug: refresh the variables tree lazily fixes #25605 --- .../parts/debug/electron-browser/debugViews.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts index 73a2367db0533..3d4d2f1838b68 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts @@ -80,7 +80,7 @@ export class VariablesView extends CollapsibleViewletView { } return undefined; }).done(null, errors.onUnexpectedError); - }, 700); + }, 400); } public renderHeader(container: HTMLElement): void { @@ -116,11 +116,11 @@ export class VariablesView extends CollapsibleViewletView { this.toolBar.setActions(prepareActions([collapseAction]))(); this.toDispose.push(viewModel.onDidFocusStackFrame(sf => { - // Only delay if the stack frames got cleared and there is no active stack frame - // Otherwise just update immediately - if (sf) { + // Refresh the tree immediatly if it is not visible. + // Otherwise postpone the refresh until user stops stepping. + if (!this.tree.getContentHeight()) { this.onFocusStackFrameScheduler.schedule(0); - } else if (!this.onFocusStackFrameScheduler.isScheduled()) { + } else { this.onFocusStackFrameScheduler.schedule(); } })); From cc3b14e3d97473d264b5fe80b42e49b79c97f360 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 12 May 2017 12:27:24 +0200 Subject: [PATCH 0469/2747] debug: tmp setting variablesDelay --- src/vs/workbench/parts/debug/common/debug.ts | 1 + .../parts/debug/electron-browser/debug.contribution.ts | 4 ++++ .../workbench/parts/debug/electron-browser/debugViews.ts | 8 +++++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debug.ts b/src/vs/workbench/parts/debug/common/debug.ts index 26454a01bfc02..d512ff12ece4c 100644 --- a/src/vs/workbench/parts/debug/common/debug.ts +++ b/src/vs/workbench/parts/debug/common/debug.ts @@ -302,6 +302,7 @@ export interface IDebugConfiguration { inlineValues: boolean; hideActionBar: boolean; internalConsoleOptions: string; + variablesDelay: number; } export interface IGlobalConfig { diff --git a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts index 22c7191e5170c..b8faa49a1a163 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts @@ -173,6 +173,10 @@ configurationRegistry.registerConfiguration({ default: false }, 'debug.internalConsoleOptions': INTERNAL_CONSOLE_OPTIONS_SCHEMA, + 'debug.variablesDelay': { + type: 'number', + default: 400 + }, 'launch': { type: 'object', description: nls.localize({ comment: ['This is the description for a setting'], key: 'launch' }, "Global debug launch configuration. Should be used as an alternative to 'launch.json' that is shared across workspaces"), diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts index 3d4d2f1838b68..63d48fe56945c 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts @@ -17,7 +17,7 @@ import { IHighlightEvent, ITree } from 'vs/base/parts/tree/browser/tree'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { CollapsibleState } from 'vs/base/browser/ui/splitview/splitview'; import { CollapsibleViewletView, AdaptiveCollapsibleViewletView, CollapseAction } from 'vs/workbench/browser/viewlet'; -import { IDebugService, State, IBreakpoint, IExpression, CONTEXT_BREAKPOINTS_FOCUSED, CONTEXT_WATCH_EXPRESSIONS_FOCUSED, CONTEXT_VARIABLES_FOCUSED } from 'vs/workbench/parts/debug/common/debug'; +import { IDebugService, State, IDebugConfiguration, IBreakpoint, IExpression, CONTEXT_BREAKPOINTS_FOCUSED, CONTEXT_WATCH_EXPRESSIONS_FOCUSED, CONTEXT_VARIABLES_FOCUSED } from 'vs/workbench/parts/debug/common/debug'; import { Expression, Variable, ExceptionBreakpoint, FunctionBreakpoint, Thread, StackFrame, Breakpoint, ThreadAndProcessIds } from 'vs/workbench/parts/debug/common/debugModel'; import * as viewer from 'vs/workbench/parts/debug/electron-browser/debugViewer'; import { AddWatchExpressionAction, RemoveAllWatchExpressionsAction, AddFunctionBreakpointAction, ToggleBreakpointsActivatedAction, RemoveAllBreakpointsAction } from 'vs/workbench/parts/debug/browser/debugActions'; @@ -26,6 +26,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { MenuId } from 'vs/platform/actions/common/actions'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IMessageService } from 'vs/platform/message/common/message'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IListService } from 'vs/platform/list/browser/listService'; @@ -59,7 +60,8 @@ export class VariablesView extends CollapsibleViewletView { @IInstantiationService private instantiationService: IInstantiationService, @IContextKeyService contextKeyService: IContextKeyService, @IListService private listService: IListService, - @IThemeService private themeService: IThemeService + @IThemeService private themeService: IThemeService, + @IConfigurationService private configurationService: IConfigurationService ) { super(actionRunner, !!settings[VariablesView.MEMENTO], nls.localize('variablesSection', "Variables Section"), messageService, keybindingService, contextMenuService); @@ -80,7 +82,7 @@ export class VariablesView extends CollapsibleViewletView { } return undefined; }).done(null, errors.onUnexpectedError); - }, 400); + }, this.configurationService.getConfiguration('debug').variablesDelay); } public renderHeader(container: HTMLElement): void { From 54811a0062b043b366cb139118c94a38e51782f9 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 12 May 2017 12:28:23 +0200 Subject: [PATCH 0470/2747] :lipstick: --- src/vs/code/electron-main/window.ts | 48 ++++++++++++++--------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 1421465ce4c80..bf81a6c55bfde 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -244,14 +244,14 @@ export class VSCodeWindow { } if (isFullscreenOrMaximized) { - this.win.maximize(); + this._win.maximize(); if (this.currentWindowMode === WindowMode.Fullscreen) { - this.win.setFullScreen(true); + this._win.setFullScreen(true); } - if (!this.win.isVisible()) { - this.win.show(); // to reduce flicker from the default window size to maximize, we only show after maximize + if (!this._win.isVisible()) { + this._win.show(); // to reduce flicker from the default window size to maximize, we only show after maximize } } @@ -386,13 +386,13 @@ export class VSCodeWindow { } // To prevent flashing, we set the window visible after the page has finished to load but before VSCode is loaded - if (!this.win.isVisible()) { + if (!this._win.isVisible()) { if (this.currentWindowMode === WindowMode.Maximized) { - this.win.maximize(); + this._win.maximize(); } - if (!this.win.isVisible()) { // maximize also makes visible - this.win.show(); + if (!this._win.isVisible()) { // maximize also makes visible + this._win.show(); } } }); @@ -602,7 +602,7 @@ export class VSCodeWindow { public serializeWindowState(): IWindowState { // fullscreen gets special treatment - if (this.win.isFullScreen()) { + if (this._win.isFullScreen()) { const display = screen.getDisplayMatching(this.getBounds()); return { @@ -621,9 +621,9 @@ export class VSCodeWindow { let mode: WindowMode; // get window mode - if (!platform.isMacintosh && this.win.isMaximized()) { + if (!platform.isMacintosh && this._win.isMaximized()) { mode = WindowMode.Maximized; - } else if (this.win.isMinimized()) { + } else if (this._win.isMinimized()) { mode = WindowMode.Minimized; } else { mode = WindowMode.Normal; @@ -750,17 +750,17 @@ export class VSCodeWindow { } public getBounds(): Electron.Rectangle { - const pos = this.win.getPosition(); - const dimension = this.win.getSize(); + const pos = this._win.getPosition(); + const dimension = this._win.getSize(); return { x: pos[0], y: pos[1], width: dimension[0], height: dimension[1] }; } public toggleFullScreen(): void { - const willBeFullScreen = !this.win.isFullScreen(); + const willBeFullScreen = !this._win.isFullScreen(); // set fullscreen flag on window - this.win.setFullScreen(willBeFullScreen); + this._win.setFullScreen(willBeFullScreen); // respect configured menu bar visibility or default to toggle if not set this.setMenuBarVisibility(this.currentMenuBarVisibility, false); @@ -785,22 +785,22 @@ export class VSCodeWindow { return; // ignore for macOS platform } - const isFullscreen = this.win.isFullScreen(); + const isFullscreen = this._win.isFullScreen(); switch (visibility) { case ('default'): - this.win.setMenuBarVisibility(!isFullscreen); - this.win.setAutoHideMenuBar(isFullscreen); + this._win.setMenuBarVisibility(!isFullscreen); + this._win.setAutoHideMenuBar(isFullscreen); break; case ('visible'): - this.win.setMenuBarVisibility(true); - this.win.setAutoHideMenuBar(false); + this._win.setMenuBarVisibility(true); + this._win.setAutoHideMenuBar(false); break; case ('toggle'): - this.win.setMenuBarVisibility(false); - this.win.setAutoHideMenuBar(true); + this._win.setMenuBarVisibility(false); + this._win.setAutoHideMenuBar(true); if (notify) { this.send('vscode:showInfoMessage', nls.localize('hiddenMenuBar', "You can still access the menu bar by pressing the **Alt** key.")); @@ -814,8 +814,8 @@ export class VSCodeWindow { // fact that we want to hide the menu without being able to bring it back via Alt key makes Electron // still show the menu. Unable to reproduce from a simple Hello World application though... setTimeout(() => { - this.win.setMenuBarVisibility(false); - this.win.setAutoHideMenuBar(false); + this._win.setMenuBarVisibility(false); + this._win.setAutoHideMenuBar(false); }); break; }; From 32af260b0d9ebf9e7d22b9a3ecbcc24c3f223968 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 12 May 2017 12:29:22 +0200 Subject: [PATCH 0471/2747] fix #26465 --- .../browser/goToDeclaration.ts | 58 +++++++++++-------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts index 9790e837d9108..3f06e80bc69e0 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts @@ -69,10 +69,11 @@ export class DefinitionAction extends EditorAction { let model = editor.getModel(); let pos = editor.getPosition(); - return this.getDeclarationsAtPosition(model, pos).then(references => { + return this._getDeclarationsAtPosition(model, pos).then(references => { // * remove falsy references - // * remove reference at the current pos + // * find reference at the current pos + let idxOfCurrent = -1; let result: Location[] = []; for (let i = 0; i < references.length; i++) { let reference = references[i]; @@ -80,24 +81,33 @@ export class DefinitionAction extends EditorAction { continue; } let { uri, range } = reference; - if (!this._configuration.filterCurrent - || uri.toString() !== model.uri.toString() - || !Range.containsPosition(range, pos)) { - - result.push({ - uri, - range - }); + let newLen = result.push({ + uri, + range + }); + if (this._configuration.filterCurrent + && uri.toString() === model.uri.toString() + && Range.containsPosition(range, pos) + && idxOfCurrent === -1 + ) { + idxOfCurrent = newLen - 1; } } if (result.length === 0) { + // no result -> show message const info = model.getWordAtPosition(pos); - MessageController.get(editor).showMessage(this.getNoResultFoundMessage(info), pos); - return; - } + MessageController.get(editor).showMessage(this._getNoResultFoundMessage(info), pos); + + } else if (result.length === 1 && idxOfCurrent !== -1) { + // only the position at which we are -> adjust selection + let [current] = result; + this._openReference(editorService, current, false); - return this._onResult(editorService, editor, new ReferencesModel(result)); + } else { + // handle multile results + this._onResult(editorService, editor, new ReferencesModel(result)); + } }, (err) => { // report an error @@ -106,17 +116,17 @@ export class DefinitionAction extends EditorAction { }); } - protected getDeclarationsAtPosition(model: editorCommon.IModel, position: corePosition.Position): TPromise { + protected _getDeclarationsAtPosition(model: editorCommon.IModel, position: corePosition.Position): TPromise { return getDefinitionsAtPosition(model, position); } - protected getNoResultFoundMessage(info?: editorCommon.IWordAtPosition): string { + protected _getNoResultFoundMessage(info?: editorCommon.IWordAtPosition): string { return info && info.word ? nls.localize('noResultWord', "No definition found for '{0}'", info.word) : nls.localize('generic.noResults', "No definition found"); } - protected getMetaTitle(model: ReferencesModel): string { + protected _getMetaTitle(model: ReferencesModel): string { return model.references.length > 1 && nls.localize('meta.title', " – {0} definitions", model.references.length); } @@ -157,7 +167,7 @@ export class DefinitionAction extends EditorAction { if (controller) { controller.toggleWidget(target.getSelection(), TPromise.as(model), { getMetaTitle: (model) => { - return this.getMetaTitle(model); + return this._getMetaTitle(model); }, onGoto: (reference) => { controller.closeWidget(); @@ -245,17 +255,17 @@ export class PeekDefinitionAction extends DefinitionAction { } export class ImplementationAction extends DefinitionAction { - protected getDeclarationsAtPosition(model: editorCommon.IModel, position: corePosition.Position): TPromise { + protected _getDeclarationsAtPosition(model: editorCommon.IModel, position: corePosition.Position): TPromise { return getImplementationsAtPosition(model, position); } - protected getNoResultFoundMessage(info?: editorCommon.IWordAtPosition): string { + protected _getNoResultFoundMessage(info?: editorCommon.IWordAtPosition): string { return info && info.word ? nls.localize('goToImplementation.noResultWord', "No implementation found for '{0}'", info.word) : nls.localize('goToImplementation.generic.noResults', "No implementation found"); } - protected getMetaTitle(model: ReferencesModel): string { + protected _getMetaTitle(model: ReferencesModel): string { return model.references.length > 1 && nls.localize('meta.implementations.title', " – {0} implementations", model.references.length); } } @@ -303,17 +313,17 @@ export class PeekImplementationAction extends ImplementationAction { } export class TypeDefinitionAction extends DefinitionAction { - protected getDeclarationsAtPosition(model: editorCommon.IModel, position: corePosition.Position): TPromise { + protected _getDeclarationsAtPosition(model: editorCommon.IModel, position: corePosition.Position): TPromise { return getTypeDefinitionsAtPosition(model, position); } - protected getNoResultFoundMessage(info?: editorCommon.IWordAtPosition): string { + protected _getNoResultFoundMessage(info?: editorCommon.IWordAtPosition): string { return info && info.word ? nls.localize('goToTypeDefinition.noResultWord', "No type definition found for '{0}'", info.word) : nls.localize('goToTypeDefinition.generic.noResults', "No type definition found"); } - protected getMetaTitle(model: ReferencesModel): string { + protected _getMetaTitle(model: ReferencesModel): string { return model.references.length > 1 && nls.localize('meta.typeDefinitions.title', " – {0} type definitions", model.references.length); } } From f8ee7599fb46ea0e53b2a969af1b97bd0d9b4107 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 12 May 2017 12:30:02 +0200 Subject: [PATCH 0472/2747] Cannot read property 'isFullScreen' of null (fixes #26520) --- src/vs/code/electron-main/window.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index bf81a6c55bfde..b7a33c5be26c4 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -600,6 +600,9 @@ export class VSCodeWindow { } public serializeWindowState(): IWindowState { + if (!this._win) { + return null; // avoid NPE when calling this method after the window has been disposed + } // fullscreen gets special treatment if (this._win.isFullScreen()) { From a85519060d89ee84f2d81f37aef00e3bc64bd987 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 12 May 2017 12:31:26 +0200 Subject: [PATCH 0473/2747] fix #26508 --- .../contrib/goToDeclaration/browser/goToDeclaration.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts index 3f06e80bc69e0..eb4fcb4e7fe9e 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts @@ -66,11 +66,16 @@ export class DefinitionAction extends EditorAction { const messageService = accessor.get(IMessageService); const editorService = accessor.get(IEditorService); - let model = editor.getModel(); - let pos = editor.getPosition(); + const model = editor.getModel(); + const pos = editor.getPosition(); return this._getDeclarationsAtPosition(model, pos).then(references => { + if (model.isDisposed() || editor.getModel() !== model) { + // new model, no more model + return; + } + // * remove falsy references // * find reference at the current pos let idxOfCurrent = -1; From 839e9af25748631b625bb182772265707fc5b062 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 12 May 2017 12:31:57 +0200 Subject: [PATCH 0474/2747] Fix #17255 --- .../parts/search/browser/searchResultsView.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/parts/search/browser/searchResultsView.ts b/src/vs/workbench/parts/search/browser/searchResultsView.ts index 2ea9e84cafa13..92de358f92b77 100644 --- a/src/vs/workbench/parts/search/browser/searchResultsView.ts +++ b/src/vs/workbench/parts/search/browser/searchResultsView.ts @@ -236,13 +236,15 @@ export class SearchAccessibilityProvider implements IAccessibilityProvider { } if (element instanceof Match) { - let match = element; - let input = tree.getInput(); - if (input.searchModel.isReplaceActive()) { - let preview = match.preview(); - return nls.localize('replacePreviewResultAria', "Replace preview result, {0}", preview.before + match.replaceString + preview.after); + const match = element; + const searchModel: SearchModel = (tree.getInput()).searchModel; + const replace = searchModel.isReplaceActive() && !!searchModel.replaceString; + const preview = match.preview(); + const range = match.range(); + if (replace) { + return nls.localize('replacePreviewResultAria', "Replace term {0} with {1} at column position {2} in line with text {3}", preview.inside, match.replaceString, range.startColumn + 1, match.text()); } - return nls.localize('searchResultAria', "{0}, Search result", match.text()); + return nls.localize('searchResultAria', "Found term {0} at column position {1} in line with text {2}", preview.inside, range.startColumn + 1, match.text()); } return undefined; } From fc28aa10062abd67f363ac6af4cb992667d11fb2 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 12 May 2017 12:35:55 +0200 Subject: [PATCH 0475/2747] Fix #17534 --- src/vs/workbench/parts/search/browser/searchResultsView.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/workbench/parts/search/browser/searchResultsView.ts b/src/vs/workbench/parts/search/browser/searchResultsView.ts index 92de358f92b77..48452fee61fda 100644 --- a/src/vs/workbench/parts/search/browser/searchResultsView.ts +++ b/src/vs/workbench/parts/search/browser/searchResultsView.ts @@ -213,6 +213,8 @@ export class SearchRenderer extends Disposable implements IRenderer { templateData.actions.clear(); if (searchModel.isReplaceActive()) { templateData.actions.push([this.instantiationService.createInstance(ReplaceAction, tree, match, this.viewlet), new RemoveAction(tree, match)], { icon: true, label: false }); + } else { + templateData.actions.push([new RemoveAction(tree, match)], { icon: true, label: false }); } } From 89a9b9b398e379f5ba23c5ada2436eb1cc9a9f13 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 12 May 2017 12:37:29 +0200 Subject: [PATCH 0476/2747] fix #26510 --- src/vs/editor/contrib/rename/browser/renameInputField.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/contrib/rename/browser/renameInputField.ts b/src/vs/editor/contrib/rename/browser/renameInputField.ts index 241d5f6c51d36..020bfe6666538 100644 --- a/src/vs/editor/contrib/rename/browser/renameInputField.ts +++ b/src/vs/editor/contrib/rename/browser/renameInputField.ts @@ -151,7 +151,7 @@ export default class RenameInputField implements IContentWidget, IDisposable { this._currentAcceptInput = () => { if (this._inputField.value.trim().length === 0 || this._inputField.value === value) { // empty or whitespace only or not changed - this._currentCancelInput(); + this.cancelInput(); return; } @@ -162,12 +162,12 @@ export default class RenameInputField implements IContentWidget, IDisposable { let onCursorChanged = () => { if (!Range.containsPosition(where, this._editor.getPosition())) { - this._currentCancelInput(); + this.cancelInput(); } }; disposeOnDone.push(this._editor.onDidChangeCursorSelection(onCursorChanged)); - disposeOnDone.push(this._editor.onDidBlurEditor(this._currentCancelInput)); + disposeOnDone.push(this._editor.onDidBlurEditor(() => this.cancelInput())); this._show(); From 217c7424831ffc17ac0126838c461e9418fc9331 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 12 May 2017 12:39:30 +0200 Subject: [PATCH 0477/2747] Cannot read property 'className' of null (fixes #26525) --- src/vs/workbench/parts/files/browser/views/explorerView.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index a993068741151..d1a190d8da2fa 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -134,7 +134,7 @@ export class ExplorerView extends CollapsibleViewletView { DOM.toggleClass(this.treeContainer, 'align-icons-and-twisties', fileIconTheme.hasFileIcons && !fileIconTheme.hasFolderIcons); }; - this.themeService.onDidFileIconThemeChange(onFileIconThemeChange); + this.toDispose.push(this.themeService.onDidFileIconThemeChange(onFileIconThemeChange)); onFileIconThemeChange(this.themeService.getFileIconTheme()); } From aa8f889b8a127dcafe6d63a5e7ea97f9380a9def Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 12 May 2017 12:42:34 +0200 Subject: [PATCH 0478/2747] fix #26512 --- src/vs/code/electron-main/app.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 03609bc577273..f15971a75de79 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -113,11 +113,15 @@ export class VSCodeApplication { }); ipc.on('vscode:fetchShellEnv', (event, windowId) => { - const win = BrowserWindow.fromId(windowId); + const { webContents } = BrowserWindow.fromId(windowId); getShellEnvironment().then(shellEnv => { - win.webContents.send('vscode:acceptShellEnv', shellEnv); + if (!webContents.isDestroyed()) { + webContents.send('vscode:acceptShellEnv', shellEnv); + } }, err => { - win.webContents.send('vscode:acceptShellEnv', {}); + if (!webContents.isDestroyed()) { + webContents.send('vscode:acceptShellEnv', {}); + } console.error('Error fetching shell env', err); }); }); @@ -265,4 +269,4 @@ export class VSCodeApplication { private dispose(): void { this.toDispose = dispose(this.toDispose); } -} \ No newline at end of file +} From 1f12bc3d4fb138508150b460ce3418c3f3135910 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 12 May 2017 12:57:49 +0200 Subject: [PATCH 0479/2747] debug: fetch the rest of the callstack lazily fixes #25605 --- .../parts/debug/common/debugModel.ts | 8 ++++---- .../debug/electron-browser/debugService.ts | 19 ++++++++++++++----- .../debug/electron-browser/debugViewer.ts | 2 +- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index d5bb323a1b0eb..2ec0be9c6af66 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -379,7 +379,7 @@ export class Thread implements IThread { constructor(public process: IProcess, public name: string, public threadId: number) { this.fetchPromise = null; this.stoppedDetails = null; - this.callStack = null; + this.callStack = []; this.stopped = false; } @@ -389,7 +389,7 @@ export class Thread implements IThread { public clearCallStack(): void { this.fetchPromise = null; - this.callStack = null; + this.callStack = []; } public getCallStack(): IStackFrame[] { @@ -779,8 +779,8 @@ export class Model implements IModel { } } - public fetchCallStack(thread: Thread): TPromise { - return thread.fetchCallStack().then(() => { + public fetchCallStack(thread: IThread): TPromise { + return (thread).fetchCallStack().then(() => { this._onDidChangeCallStack.fire(); }); } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 2d2d483948d89..c54ba326fb556 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -7,6 +7,7 @@ import * as nls from 'vs/nls'; import * as lifecycle from 'vs/base/common/lifecycle'; import Event, { Emitter } from 'vs/base/common/event'; import * as paths from 'vs/base/common/paths'; +import { RunOnceScheduler } from 'vs/base/common/async'; import * as strings from 'vs/base/common/strings'; import { generateUuid } from 'vs/base/common/uuid'; import uri from 'vs/base/common/uri'; @@ -79,6 +80,7 @@ export class DebugService implements debug.IDebugService { private debugType: IContextKey; private debugState: IContextKey; private breakpointsToSendOnResourceSaved: Set; + private callStackScheduler: RunOnceScheduler; constructor( @IStorageService private storageService: IStorageService, @@ -117,6 +119,17 @@ export class DebugService implements debug.IDebugService { this.loadExceptionBreakpoints(), this.loadWatchExpressions()); this.toDispose.push(this.model); this.viewModel = new ViewModel(this.storageService.get(DEBUG_SELECTED_CONFIG_NAME_KEY, StorageScope.WORKSPACE, null)); + this.callStackScheduler = new RunOnceScheduler(() => { + const focusedThread = this.viewModel.focusedThread; + if (focusedThread) { + const callStack = focusedThread.getCallStack(); + // Some adapters might not respect the number levels in StackTraceRequest and might + // return more stackFrames than requested. For those do not send an additional stackTrace request. + if (callStack.length <= 1) { + this.model.fetchCallStack(focusedThread).done(undefined, errors.onUnexpectedError); + } + } + }, 420); this.registerListeners(lifecycleService); } @@ -295,11 +308,7 @@ export class DebugService implements debug.IDebugService { // Second retrieves the rest of the call stack. For performance reasons #25605 this.model.fetchCallStack(thread).then(() => { const callStack = thread.getCallStack(); - // Some adapters might not respect the number levels in StackTraceRequest and might - // return more stackFrames than requested. For those do not send an additional stackTrace request. - if (callStack.length <= 1) { - this.model.fetchCallStack(thread).done(undefined, errors.onUnexpectedError); - } + this.callStackScheduler.schedule(); if (callStack.length > 0 && !this.viewModel.focusedStackFrame) { // focus first stack frame from top that has source location if no other stack frame is focussed const stackFrameToFocus = first(callStack, sf => sf.source && sf.source.available, callStack[0]); diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index f5d1519568c9e..5450d5d5099a6 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -370,7 +370,7 @@ export class CallStackDataSource implements IDataSource { if (thread.stoppedDetails && thread.stoppedDetails.framesErrorMessage) { return callStack.concat([thread.stoppedDetails.framesErrorMessage]); } - if (thread.stoppedDetails && thread.stoppedDetails.totalFrames > callStack.length) { + if (thread.stoppedDetails && thread.stoppedDetails.totalFrames > callStack.length && callStack.length > 1) { return callStack.concat([new ThreadAndProcessIds(thread.process.getId(), thread.threadId)]); } From 123c1f65216f4f0df8cf368c9aa0d0e06d17df5b Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 12 May 2017 12:56:51 +0200 Subject: [PATCH 0480/2747] fix #26168 --- .../contrib/codelens/browser/codelens.ts | 27 +++++-------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/src/vs/editor/contrib/codelens/browser/codelens.ts b/src/vs/editor/contrib/codelens/browser/codelens.ts index 533f5056835a8..b5e6fe2433589 100644 --- a/src/vs/editor/contrib/codelens/browser/codelens.ts +++ b/src/vs/editor/contrib/codelens/browser/codelens.ts @@ -8,7 +8,7 @@ import 'vs/css!./codelens'; import { RunOnceScheduler, asWinJsPromise } from 'vs/base/common/async'; import { onUnexpectedError } from 'vs/base/common/errors'; -import { Disposables, IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import Severity from 'vs/base/common/severity'; import { format, escape } from 'vs/base/common/strings'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -17,7 +17,7 @@ import { ICommandService } from 'vs/platform/commands/common/commands'; import { IMessageService } from 'vs/platform/message/common/message'; import { Range } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { CodeLensProviderRegistry, CodeLensProvider, ICodeLensSymbol, Command } from 'vs/editor/common/modes'; +import { CodeLensProviderRegistry, ICodeLensSymbol, Command } from 'vs/editor/common/modes'; import * as editorBrowser from 'vs/editor/browser/editorBrowser'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { ICodeLensData, getCodeLensData } from '../common/codelens'; @@ -406,24 +406,12 @@ export class CodeLensContribution implements editorCommon.IEditorContribution { return; } - const providerSubscriptions = new Disposables(); - this._localToDispose.push(providerSubscriptions); - - const onEvent = () => { - providerSubscriptions.dispose(); - scheduler.schedule(); - }; - - const subscribeToProviders = (result: ICodeLensData[]) => { - const seen = new Set(); - - for (const { provider } of result) { - if (provider.onDidChange && !seen.has(provider)) { - providerSubscriptions.add(provider.onDidChange(onEvent)); - seen.add(provider); - } + for (const provider of CodeLensProviderRegistry.all(model)) { + if (typeof provider.onDidChange === 'function') { + let registration = provider.onDidChange(() => scheduler.schedule()); + this._localToDispose.push(registration); } - }; + } this._detectVisibleLenses = new RunOnceScheduler(() => { this._onViewportChanged(model.getLanguageIdentifier().language); @@ -440,7 +428,6 @@ export class CodeLensContribution implements editorCommon.IEditorContribution { this._currentFindCodeLensSymbolsPromise.then((result) => { if (counterValue === this._modelChangeCounter) { // only the last one wins this.renderCodeLensSymbols(result); - subscribeToProviders(result); this._detectVisibleLenses.schedule(); } }, (error) => { From b0d401938b1bb9dca0be7772ab00d51f95d3adc9 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 12 May 2017 13:55:05 +0200 Subject: [PATCH 0481/2747] [Theme] allow to set editor gutter background. Fixes #22410 --- .../viewParts/glyphMargin/glyphMargin.ts | 12 +------ .../editor/browser/viewParts/margin/margin.ts | 2 +- .../editor/common/view/editorColorRegistry.ts | 15 ++++++--- .../contrib/find/browser/findOptionsWidget.ts | 8 ++--- .../browser/referencesWidget.ts | 32 +++++++++++-------- 5 files changed, 36 insertions(+), 33 deletions(-) diff --git a/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts b/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts index b92c9d0e559e5..455a49cb3fbd7 100644 --- a/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts +++ b/src/vs/editor/browser/viewParts/glyphMargin/glyphMargin.ts @@ -11,9 +11,6 @@ import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { editorBackground } from 'vs/platform/theme/common/colorRegistry'; -import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; - export class DecorationToRender { _decorationToRenderBrand: void; @@ -200,11 +197,4 @@ export class GlyphMarginOverlay extends DedupOverlay { } return this._renderResult[lineIndex]; } -} - -registerThemingParticipant((theme, collector) => { - let editorBackgroundColor = theme.getColor(editorBackground); - if (editorBackgroundColor) { - collector.addRule(`.monaco-editor.${theme.selector} .glyph-margin { background-color: ${editorBackgroundColor}; }`); - } -}); \ No newline at end of file +} \ No newline at end of file diff --git a/src/vs/editor/browser/viewParts/margin/margin.ts b/src/vs/editor/browser/viewParts/margin/margin.ts index 162ef220f3297..35fcf1563b937 100644 --- a/src/vs/editor/browser/viewParts/margin/margin.ts +++ b/src/vs/editor/browser/viewParts/margin/margin.ts @@ -42,7 +42,7 @@ export class Margin extends ViewPart { private _createDomNode(): FastDomNode { let domNode = createFastDomNode(document.createElement('div')); - domNode.setClassName('margin' + ' monaco-editor-background'); + domNode.setClassName('margin'); domNode.setPosition('absolute'); domNode.setAttribute('role', 'presentation'); domNode.setAttribute('aria-hidden', 'true'); diff --git a/src/vs/editor/common/view/editorColorRegistry.ts b/src/vs/editor/common/view/editorColorRegistry.ts index 6be8ca4e54b30..71d5b37551dcf 100644 --- a/src/vs/editor/common/view/editorColorRegistry.ts +++ b/src/vs/editor/common/view/editorColorRegistry.ts @@ -27,26 +27,33 @@ export const editorBracketMatchBorder = registerColor('editorBracketMatch.border export const editorOverviewRulerBorder = registerColor('editorOverviewRuler.border', { dark: '#7f7f7f4d', light: '#7f7f7f4d', hc: '#7f7f7f4d' }, nls.localize('editorOverviewRulerBorder', 'Color of the overview ruler border.')); +export const editorGutter = registerColor('editorGutter.background', { dark: editorBackground, light: editorBackground, hc: editorBackground }, nls.localize('editorGutter', 'Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.')); + // contains all color rules that used to defined in editor/browser/widget/editor.css registerThemingParticipant((theme, collector) => { let background = theme.getColor(editorBackground); if (background) { - collector.addRule(`.monaco-editor.${theme.selector} .monaco-editor-background, .monaco-editor.${theme.selector} .inputarea.ime-input { background-color: ${background}; }`); + collector.addRule(`.monaco-editor .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${background}; }`); } let foreground = theme.getColor(editorForeground); if (foreground) { - collector.addRule(`.monaco-editor.${theme.selector}, .monaco-editor.${theme.selector} .inputarea.ime-input { color: ${foreground}; }`); + collector.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${foreground}; }`); + } + + let gutter = theme.getColor(editorGutter); + if (gutter) { + collector.addRule(`.monaco-editor .margin { background-color: ${gutter}; }`); } let rangeHighlight = theme.getColor(editorRangeHighlight); if (rangeHighlight) { - collector.addRule(`.monaco-editor.${theme.selector} .rangeHighlight { background-color: ${rangeHighlight}; }`); + collector.addRule(`.monaco-editor .rangeHighlight { background-color: ${rangeHighlight}; }`); } let outline = theme.getColor(activeContrastBorder); if (outline) { - collector.addRule(`.monaco-editor.${theme.selector} .rangeHighlight { border: 1px dotted ${outline}; }; }`); + collector.addRule(`.monaco-editor .rangeHighlight { border: 1px dotted ${outline}; }; }`); } let invisibles = theme.getColor(editorWhitespaces); diff --git a/src/vs/editor/contrib/find/browser/findOptionsWidget.ts b/src/vs/editor/contrib/find/browser/findOptionsWidget.ts index 05a5d1c9ffea9..7634aa1ca30b6 100644 --- a/src/vs/editor/contrib/find/browser/findOptionsWidget.ts +++ b/src/vs/editor/contrib/find/browser/findOptionsWidget.ts @@ -42,7 +42,7 @@ export class FindOptionsWidget extends Widget implements IOverlayWidget { this._keybindingService = keybindingService; this._domNode = document.createElement('div'); - this._domNode.className = 'monaco-editor-background findOptionsWidget'; + this._domNode.className = 'findOptionsWidget'; this._domNode.style.display = 'none'; this._domNode.style.top = '10px'; this._domNode.setAttribute('role', 'presentation'); @@ -192,16 +192,16 @@ export class FindOptionsWidget extends Widget implements IOverlayWidget { registerThemingParticipant((theme, collector) => { let widgetBackground = theme.getColor(editorWidgetBackground); if (widgetBackground) { - collector.addRule(`.monaco-editor.${theme.selector} .findOptionsWidget { background-color: ${widgetBackground}; }`); + collector.addRule(`.monaco-editor .findOptionsWidget { background-color: ${widgetBackground}; }`); } let widgetShadowColor = theme.getColor(widgetShadow); if (widgetShadowColor) { - collector.addRule(`.monaco-editor.${theme.selector} .findOptionsWidget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); + collector.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); } let hcBorder = theme.getColor(contrastBorder); if (hcBorder) { - collector.addRule(`.monaco-editor.${theme.selector} .findOptionsWidget { border: 2px solid ${hcBorder}; }`); + collector.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${hcBorder}; }`); } }); \ No newline at end of file diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index f5bbe18e907b8..cc8ae4a72ec38 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -824,6 +824,7 @@ export const peekViewResultsFileForeground = registerColor('peekViewResult.fileF export const peekViewResultsSelectionBackground = registerColor('peekViewResult.selectionBackground', { dark: '#3399ff33', light: '#3399ff33', hc: null }, nls.localize('peekViewResultsSelectionBackground', 'Background color of the selected entry in the peek view result list.')); export const peekViewResultsSelectionForeground = registerColor('peekViewResult.selectionForeground', { dark: Color.white, light: '#6C6C6C', hc: Color.white }, nls.localize('peekViewResultsSelectionForeground', 'Foreground color of the selected entry in the peek view result list.')); export const peekViewEditorBackground = registerColor('peekViewEditor.background', { dark: '#001F33', light: '#F2F8FC', hc: Color.black }, nls.localize('peekViewEditorBackground', 'Background color of the peek view editor.')); +export const peekViewEditorGutterBackground = registerColor('peekViewEditorGutter.background', { dark: peekViewEditorBackground, light: peekViewEditorBackground, hc: peekViewEditorBackground }, nls.localize('peekViewEditorGutterBackground', 'Background color of the gutter in the peek view editor.')); export const peekViewResultsMatchHighlight = registerColor('peekViewResult.matchHighlightBackground', { dark: '#ea5c004d', light: '#ea5c004d', hc: null }, nls.localize('peekViewResultsMatchHighlight', 'Match highlight color in the peek view result list.')); export const peekViewEditorMatchHighlight = registerColor('peekViewEditor.matchHighlightBackground', { dark: '#ff8f0099', light: '#f5d802de', hc: null }, nls.localize('peekViewEditorMatchHighlight', 'Match highlight color in the peek view editor.')); @@ -832,45 +833,50 @@ export const peekViewEditorMatchHighlight = registerColor('peekViewEditor.matchH registerThemingParticipant((theme, collector) => { let findMatchHighlightColor = theme.getColor(peekViewResultsMatchHighlight); if (findMatchHighlightColor) { - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .ref-tree .referenceMatch { background-color: ${findMatchHighlightColor}; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch { background-color: ${findMatchHighlightColor}; }`); } let referenceHighlightColor = theme.getColor(peekViewEditorMatchHighlight); if (referenceHighlightColor) { - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .preview .reference-decoration { background-color: ${referenceHighlightColor}; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${referenceHighlightColor}; }`); } let hcOutline = theme.getColor(activeContrastBorder); if (hcOutline) { - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .ref-tree .referenceMatch { border: 1px dotted ${hcOutline}; box-sizing: border-box; }`); - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .preview .reference-decoration { border: 2px solid ${hcOutline}; box-sizing: border-box; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch { border: 1px dotted ${hcOutline}; box-sizing: border-box; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${hcOutline}; box-sizing: border-box; }`); } let resultsBackground = theme.getColor(peekViewResultsBackground); if (resultsBackground) { - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .ref-tree { background-color: ${resultsBackground}; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree { background-color: ${resultsBackground}; }`); } let resultsMatchForeground = theme.getColor(peekViewResultsMatchForeground); if (resultsMatchForeground) { - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .ref-tree { color: ${resultsMatchForeground}; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree { color: ${resultsMatchForeground}; }`); } let resultsFileForeground = theme.getColor(peekViewResultsFileForeground); if (resultsFileForeground) { - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .ref-tree .reference-file { color: ${resultsFileForeground}; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${resultsFileForeground}; }`); } let resultsSelectedBackground = theme.getColor(peekViewResultsSelectionBackground); if (resultsSelectedBackground) { - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${resultsSelectedBackground}; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${resultsSelectedBackground}; }`); } let resultsSelectedForeground = theme.getColor(peekViewResultsSelectionForeground); if (resultsSelectedForeground) { - collector.addRule(`.monaco-editor.${theme.selector} .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: ${resultsSelectedForeground} !important; }`); + collector.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-tree.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { color: ${resultsSelectedForeground} !important; }`); } let editorBackground = theme.getColor(peekViewEditorBackground); if (editorBackground) { collector.addRule( - `.monaco-editor.${theme.selector} .reference-zone-widget .preview .monaco-editor,` + - `.monaco-editor.${theme.selector} .reference-zone-widget .preview .glyph-margin,` + - `.monaco-editor.${theme.selector} .reference-zone-widget .preview .monaco-editor-background,` + - `.monaco-editor.${theme.selector} .reference-zone-widget .preview .monaco-editor .margin .view-line {` + + `.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,` + + `.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {` + ` background-color: ${editorBackground};` + `}`); } + let editorGutterBackground = theme.getColor(peekViewEditorGutterBackground); + if (editorGutterBackground) { + collector.addRule( + `.monaco-editor .reference-zone-widget .preview .monaco-editor .margin {` + + ` background-color: ${editorGutterBackground};` + + `}`); + } }); From b4a7da9219c0d08f3d9b851e54357844a01e85d2 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 12 May 2017 14:52:21 +0200 Subject: [PATCH 0482/2747] fix #26544 --- src/vs/vscode.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 95fd5de30fd1b..3faf70275df3d 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -1379,7 +1379,7 @@ declare module 'vscode' { * Provide textual content for a given uri. * * The editor will use the returned string-content to create a readonly - * [document](TextDocument). Resources allocated should be released when + * [document](#TextDocument). Resources allocated should be released when * the corresponding document has been [closed](#workspace.onDidCloseTextDocument). * * @param uri An uri which scheme matches the scheme this provider was [registered](#workspace.registerTextDocumentContentProvider) for. From 85df4550bec9667cd36c39051b42592da2e683ab Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 12 May 2017 15:25:08 +0200 Subject: [PATCH 0483/2747] debug: reduce callstack flashing by showing a stale remainder of the callstack #25605 --- src/vs/workbench/parts/debug/common/debugModel.ts | 9 +++++++++ .../parts/debug/electron-browser/debugViewer.ts | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index 2ec0be9c6af66..1f3e082dc635d 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -373,6 +373,7 @@ export class StackFrame implements IStackFrame { export class Thread implements IThread { private fetchPromise: TPromise; private callStack: IStackFrame[]; + private staleCallStack: IStackFrame[]; public stoppedDetails: IRawStoppedDetails; public stopped: boolean; @@ -380,6 +381,7 @@ export class Thread implements IThread { this.fetchPromise = null; this.stoppedDetails = null; this.callStack = []; + this.staleCallStack = []; this.stopped = false; } @@ -389,6 +391,9 @@ export class Thread implements IThread { public clearCallStack(): void { this.fetchPromise = null; + if (this.callStack.length) { + this.staleCallStack = this.callStack; + } this.callStack = []; } @@ -396,6 +401,10 @@ export class Thread implements IThread { return this.callStack; } + public getStaleCallStack(): IStackFrame[] { + return this.staleCallStack; + } + /** * Queries the debug adapter for the callstack and returns a promise * which completes once the call stack has been retrieved. diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index 5450d5d5099a6..2c8391b709fbe 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -366,6 +366,11 @@ export class CallStackDataSource implements IDataSource { if (!callStack) { return []; } + if (callStack.length === 1) { + // To reduce flashing of the call stack view simply append the stale call stack + // once we have the correct data the tree will refresh and we will no longer display it. + return callStack.concat(thread.getStaleCallStack().slice(1)); + } if (thread.stoppedDetails && thread.stoppedDetails.framesErrorMessage) { return callStack.concat([thread.stoppedDetails.framesErrorMessage]); From b8146bc3a7d6f39c9f79b991d27ac8e639ce57bb Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 12 May 2017 15:29:08 +0200 Subject: [PATCH 0484/2747] Fix #26354 --- .../electron-browser/extensionTipsService.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts index 78bf2b91c7135..59ee7282c26d2 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts @@ -40,6 +40,7 @@ export class ExtensionTipsService implements IExtensionTipsService { private _availableRecommendations: { [pattern: string]: string[] } = Object.create(null); private importantRecommendations: { [id: string]: { name: string; pattern: string; } }; private importantRecommendationsIgnoreList: string[]; + private _allRecommendations: string[]; private _disposables: IDisposable[] = []; constructor( @@ -80,13 +81,25 @@ export class ExtensionTipsService implements IExtensionTipsService { } getRecommendations(): string[] { - return Object.keys(this._recommendations); + const allRecomendations = this._getAllRecommendationsInProduct(); + return Object.keys(this._recommendations) + .filter(recommendation => allRecomendations.indexOf(recommendation) !== -1); } getKeymapRecommendations(): string[] { return product.keymapExtensionTips || []; } + private _getAllRecommendationsInProduct(): string[] { + if (!this._allRecommendations) { + this._allRecommendations = [...Object.keys(this.importantRecommendations)]; + forEach(this._availableRecommendations, ({ value: ids }) => { + this._allRecommendations.push(...ids); + }); + } + return this._allRecommendations; + } + private _suggestTips() { const extensionTips = product.extensionTips; if (!extensionTips) { From 5005b5bbb37f706b222aa6eaa675f50ec9c11b14 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 12 May 2017 15:32:11 +0200 Subject: [PATCH 0485/2747] sync font size and line height with editor, #25506 --- .../contrib/codelens/browser/codelens.css | 3 +- .../contrib/codelens/browser/codelens.ts | 42 ++++++++++++------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/src/vs/editor/contrib/codelens/browser/codelens.css b/src/vs/editor/contrib/codelens/browser/codelens.css index d1563adc1998e..113a5a1fbb440 100644 --- a/src/vs/editor/contrib/codelens/browser/codelens.css +++ b/src/vs/editor/contrib/codelens/browser/codelens.css @@ -7,7 +7,6 @@ overflow: hidden; display: inline-block; text-overflow: ellipsis; - font-size: 90%; } .monaco-editor .codelens-decoration > span, @@ -43,4 +42,4 @@ -moz-animation: fadein 0.5s linear; -o-animation: fadein 0.5s linear; animation: fadein 0.5s linear; -} \ No newline at end of file +} diff --git a/src/vs/editor/contrib/codelens/browser/codelens.ts b/src/vs/editor/contrib/codelens/browser/codelens.ts index b5e6fe2433589..ef3829e40ee8a 100644 --- a/src/vs/editor/contrib/codelens/browser/codelens.ts +++ b/src/vs/editor/contrib/codelens/browser/codelens.ts @@ -65,37 +65,43 @@ class CodeLensContentWidget implements editorBrowser.IContentWidget { private static ID: number = 0; // Editor.IContentWidget.allowEditorOverflow - readonly allowEditorOverflow = false; - - public suppressMouseDown: boolean; + readonly allowEditorOverflow: boolean = false; + readonly suppressMouseDown: boolean = true; private _id: string; private _domNode: HTMLElement; - private _subscription: IDisposable; + private _disposables: IDisposable[] = []; private _symbolRange: Range; private _widgetPosition: editorBrowser.IContentWidgetPosition; private _editor: editorBrowser.ICodeEditor; private _commands: { [id: string]: Command } = Object.create(null); - public constructor(editor: editorBrowser.ICodeEditor, symbolRange: Range, - commandService: ICommandService, messageService: IMessageService) { + public constructor( + editor: editorBrowser.ICodeEditor, + symbolRange: Range, + commandService: ICommandService, + messageService: IMessageService + ) { this._id = 'codeLensWidget' + (++CodeLensContentWidget.ID); this._editor = editor; - this.suppressMouseDown = true; - this.setSymbolRange(symbolRange); this._domNode = document.createElement('span'); - const lineHeight = editor.getConfiguration().lineHeight; - this._domNode.style.height = `${lineHeight}px`; - this._domNode.style.lineHeight = `${lineHeight}px`; this._domNode.innerHTML = ' '; dom.addClass(this._domNode, 'codelens-decoration'); dom.addClass(this._domNode, 'invisible-cl'); - this._subscription = dom.addDisposableListener(this._domNode, 'click', e => { + this._updateHeight(); + + this._disposables.push(this._editor.onDidChangeConfiguration(e => { + if (e.fontInfo) { + this._updateHeight(); + } + })); + + this._disposables.push(dom.addDisposableListener(this._domNode, 'click', e => { let element = e.target; if (element.tagName === 'A' && element.id) { let command = this._commands[element.id]; @@ -106,16 +112,24 @@ class CodeLensContentWidget implements editorBrowser.IContentWidget { }); } } - }); + })); this.updateVisibility(); } public dispose(): void { - this._subscription.dispose(); + dispose(this._disposables); this._symbolRange = null; } + private _updateHeight(): void { + const { fontInfo, lineHeight } = this._editor.getConfiguration(); + this._domNode.style.height = `${lineHeight}px`; + this._domNode.style.lineHeight = `${lineHeight}px`; + this._domNode.style.fontSize = `${Math.round(fontInfo.fontSize * .9)}px`; + this._domNode.innerHTML = ' '; + } + public updateVisibility(): void { if (this.isVisible()) { dom.removeClass(this._domNode, 'invisible-cl'); From b54b1a984da075e0075c721aeb54d925fb6fba62 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 12 May 2017 16:02:10 +0200 Subject: [PATCH 0486/2747] fix tests --- .../parts/debug/test/common/mockDebug.ts | 7 +++- .../parts/debug/test/node/debugModel.test.ts | 38 ++++++++----------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/src/vs/workbench/parts/debug/test/common/mockDebug.ts b/src/vs/workbench/parts/debug/test/common/mockDebug.ts index 4f401f3968736..c2f725b82c152 100644 --- a/src/vs/workbench/parts/debug/test/common/mockDebug.ts +++ b/src/vs/workbench/parts/debug/test/common/mockDebug.ts @@ -115,7 +115,12 @@ export class MockSession implements debug.ISession { public stackTrace(args: DebugProtocol.StackTraceArguments): TPromise { return TPromise.as({ body: { - stackFrames: [] + stackFrames: [{ + id: 1, + name: 'mock', + line: 5, + column: 6 + }] } }); } diff --git a/src/vs/workbench/parts/debug/test/node/debugModel.test.ts b/src/vs/workbench/parts/debug/test/node/debugModel.test.ts index 6e117d36fd8de..da310a4f6225f 100644 --- a/src/vs/workbench/parts/debug/test/node/debugModel.test.ts +++ b/src/vs/workbench/parts/debug/test/node/debugModel.test.ts @@ -163,24 +163,24 @@ suite('Debug - Model', () => { assert.equal(process.getAllThreads().length, 2); assert.equal(thread1.name, threadName1); assert.equal(thread1.stopped, true); - assert.equal(thread1.getCallStack(), undefined); + assert.equal(thread1.getCallStack().length, 0); assert.equal(thread1.stoppedDetails.reason, stoppedReason); assert.equal(thread2.name, threadName2); assert.equal(thread2.stopped, true); - assert.equal(thread2.getCallStack(), undefined); + assert.equal(thread2.getCallStack().length, 0); assert.equal(thread2.stoppedDetails.reason, stoppedReason); // after calling getCallStack, the callstack becomes available // and results in a request for the callstack in the debug adapter thread1.fetchCallStack().then(() => { - assert.notEqual(thread1.getCallStack(), undefined); - assert.equal(thread2.getCallStack(), undefined); + assert.notEqual(thread1.getCallStack().length, 0); + assert.equal(thread2.getCallStack().length, 0); assert.equal(sessionStub.callCount, 1); }); thread2.fetchCallStack().then(() => { - assert.notEqual(thread1.getCallStack(), undefined); - assert.notEqual(thread2.getCallStack(), undefined); + assert.notEqual(thread1.getCallStack().length, 0); + assert.notEqual(thread2.getCallStack().length, 0); assert.equal(sessionStub.callCount, 2); }); @@ -189,17 +189,17 @@ suite('Debug - Model', () => { thread1.fetchCallStack().then(() => { return thread2.fetchCallStack(); }).then(() => { - assert.equal(sessionStub.callCount, 2); + assert.equal(sessionStub.callCount, 4); }); // clearing the callstack results in the callstack not being available thread1.clearCallStack(); assert.equal(thread1.stopped, true); - assert.equal(thread1.getCallStack(), undefined); + assert.equal(thread1.getCallStack().length, 0); thread2.clearCallStack(); assert.equal(thread2.stopped, true); - assert.equal(thread2.getCallStack(), undefined); + assert.equal(thread2.getCallStack().length, 0); model.clearThreads(process.getId(), true); assert.equal(process.getThread(threadId1), null); @@ -255,39 +255,33 @@ suite('Debug - Model', () => { assert.equal(stoppedThread.name, stoppedThreadName); assert.equal(stoppedThread.stopped, true); assert.equal(process.getAllThreads().length, 2); - assert.equal(stoppedThread.getCallStack(), undefined); + assert.equal(stoppedThread.getCallStack().length, 0); assert.equal(stoppedThread.stoppedDetails.reason, stoppedReason); assert.equal(runningThread.name, runningThreadName); assert.equal(runningThread.stopped, false); - assert.equal(runningThread.getCallStack(), undefined); + assert.equal(runningThread.getCallStack().length, 0); assert.equal(runningThread.stoppedDetails, undefined); // after calling getCallStack, the callstack becomes available // and results in a request for the callstack in the debug adapter stoppedThread.fetchCallStack().then(() => { - assert.notEqual(stoppedThread.getCallStack(), undefined); - assert.equal(runningThread.getCallStack(), undefined); + assert.notEqual(stoppedThread.getCallStack().length, 0); + assert.equal(runningThread.getCallStack().length, 0); assert.equal(sessionStub.callCount, 1); }); // calling getCallStack on the running thread returns empty array // and does not return in a request for the callstack in the debug // adapter - runningThread.fetchCallStack().then(callStack => { - assert.deepEqual(callStack, []); - assert.equal(sessionStub.callCount, 1); - }); - - // calling multiple times getCallStack doesn't result in multiple calls - // to the debug adapter - stoppedThread.fetchCallStack().then(() => { + runningThread.fetchCallStack().then(() => { + assert.equal(runningThread.getCallStack().length, 0); assert.equal(sessionStub.callCount, 1); }); // clearing the callstack results in the callstack not being available stoppedThread.clearCallStack(); assert.equal(stoppedThread.stopped, true); - assert.equal(stoppedThread.getCallStack(), undefined); + assert.equal(stoppedThread.getCallStack().length, 0); model.clearThreads(process.getId(), true); assert.equal(process.getThread(stoppedThreadId), null); From fa6a481f122efc3e6ed8736914725f165e591032 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 12 May 2017 15:49:39 +0200 Subject: [PATCH 0487/2747] goto-definition-link-hover no longer used --- .../goToDeclaration/browser/goToDeclaration.css | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.css b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.css index 57e88bae1fae9..3361b10442911 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.css +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.css @@ -6,15 +6,4 @@ .monaco-editor .goto-definition-link { text-decoration: underline; cursor: pointer; -} - -.monaco-editor .goto-definition-link-hover { - margin: 0.5em; - padding: 0; - padding-left: 0.5em; - border-left: 4px solid rgba(0, 0, 0, 0.14); -} - -.monaco-editor.vs-dark .goto-definition-link-hover { - border-left: 4px solid rgba(255, 255, 255, 0.25); } \ No newline at end of file From 6f7fb600ee543ba0c5b8b1958391d96df4c576c1 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 12 May 2017 16:05:10 +0200 Subject: [PATCH 0488/2747] [theme] remove back/foregrund colors from editor.css --- src/vs/editor/browser/widget/media/editor.css | 23 ------------------- .../editor/common/view/editorColorRegistry.ts | 2 +- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/src/vs/editor/browser/widget/media/editor.css b/src/vs/editor/browser/widget/media/editor.css index e47af5c00c7fc..9f2a59b392a03 100644 --- a/src/vs/editor/browser/widget/media/editor.css +++ b/src/vs/editor/browser/widget/media/editor.css @@ -30,29 +30,6 @@ font-feature-settings: "liga" on, "calt" on; } -.monaco-editor { - color: #333; - /* - * WORKAROUND: - * Because of bug https://monacotools.visualstudio.com/DefaultCollection/Monaco/_workitems/edit/13254 - * we are *not* using the color white (or #ffffff, rgba(255,255,255)) but something very close to white. - */ - background: #fffffe; -} - -.monaco-editor.vs-dark, -.monaco-editor.vs-dark .zone-widget .monaco-editor { - color: #BBB; - background: #1E1E1E; -} - -.monaco-editor.hc-black, -.monaco-editor.hc-black .zone-widget .monaco-editor { - color: #fff; - background: #000; -} - - /* -------------------- Misc -------------------- */ .monaco-editor .overflow-guard { diff --git a/src/vs/editor/common/view/editorColorRegistry.ts b/src/vs/editor/common/view/editorColorRegistry.ts index 71d5b37551dcf..223e503e53a6c 100644 --- a/src/vs/editor/common/view/editorColorRegistry.ts +++ b/src/vs/editor/common/view/editorColorRegistry.ts @@ -35,7 +35,7 @@ registerThemingParticipant((theme, collector) => { let background = theme.getColor(editorBackground); if (background) { - collector.addRule(`.monaco-editor .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${background}; }`); + collector.addRule(`.monaco-editor, .monaco-editor .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${background}; }`); } let foreground = theme.getColor(editorForeground); if (foreground) { From fa05586f8b918303745803cb69160bb257dad828 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 12 May 2017 16:23:05 +0200 Subject: [PATCH 0489/2747] [theme] remove ITheme.selector --- .../browser/services/standaloneThemeServiceImpl.ts | 3 --- .../currentLineHighlight/currentLineHighlight.ts | 6 +++--- .../currentLineMarginHighlight.ts | 6 +++--- .../browser/viewParts/indentGuides/indentGuides.ts | 2 +- .../browser/viewParts/lineNumbers/lineNumbers.ts | 2 +- .../browser/viewParts/selections/selections.ts | 4 ++-- .../browser/viewParts/viewCursors/viewCursors.ts | 4 ++-- .../contrib/accessibility/browser/accessibility.ts | 6 +++--- .../goToDeclaration/browser/goToDeclaration.ts | 2 +- src/vs/editor/contrib/hover/browser/hover.ts | 8 ++++---- src/vs/editor/contrib/links/browser/links.ts | 2 +- .../contrib/suggest/browser/suggestWidget.ts | 4 ++-- .../wordHighlighter/common/wordHighlighter.ts | 14 +++++++------- src/vs/platform/theme/common/themeService.ts | 1 - .../themes/electron-browser/colorThemeData.ts | 4 +--- .../electron-browser/workbenchThemeService.ts | 1 - src/vs/workbench/test/workbenchTestServices.ts | 5 ++--- 17 files changed, 33 insertions(+), 41 deletions(-) diff --git a/src/vs/editor/browser/services/standaloneThemeServiceImpl.ts b/src/vs/editor/browser/services/standaloneThemeServiceImpl.ts index 35132a10cba52..dd29c95ffc460 100644 --- a/src/vs/editor/browser/services/standaloneThemeServiceImpl.ts +++ b/src/vs/editor/browser/services/standaloneThemeServiceImpl.ts @@ -24,7 +24,6 @@ const themingRegistry = Registry.as(ThemingExtensions.ThemingC class StandaloneTheme implements IStandaloneTheme { id: string; - selector: string; private rules: ITokenThemeRule[]; base: string; private colors: { [colorId: string]: Color }; @@ -34,10 +33,8 @@ class StandaloneTheme implements IStandaloneTheme { constructor(base: string, name: string, colors: IColors, rules: ITokenThemeRule[]) { if (name.length > 0) { this.id = base + ' ' + name; - this.selector = base + '.' + name; } else { this.id = base; - this.selector = base; } this.base = base; this.rules = rules; diff --git a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts index a8b35d09f2561..ad2fcdec70464 100644 --- a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts +++ b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts @@ -134,14 +134,14 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay { registerThemingParticipant((theme, collector) => { let lineHighlight = theme.getColor(editorLineHighlight); if (lineHighlight) { - collector.addRule(`.monaco-editor.${theme.selector} .view-overlays .current-line { background-color: ${lineHighlight}; }`); + collector.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${lineHighlight}; }`); } if (!lineHighlight || lineHighlight.isTransparent() || theme.defines(editorLineHighlightBorder)) { let lineHighlightBorder = theme.getColor(editorLineHighlightBorder); if (lineHighlightBorder) { - collector.addRule(`.monaco-editor.${theme.selector} .view-overlays .current-line { border: 2px solid ${lineHighlightBorder}; }`); + collector.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${lineHighlightBorder}; }`); if (theme.type === 'hc') { - collector.addRule(`.monaco-editor.${theme.selector} .view-overlays .current-line { border-width: 1px; }`); + collector.addRule(`.monaco-editor .view-overlays .current-line { border-width: 1px; }`); } } } diff --git a/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts b/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts index 5fdec71c20768..4cbdf06a32e78 100644 --- a/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts +++ b/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts @@ -110,14 +110,14 @@ export class CurrentLineMarginHighlightOverlay extends DynamicViewOverlay { registerThemingParticipant((theme, collector) => { let lineHighlight = theme.getColor(editorLineHighlight); if (lineHighlight) { - collector.addRule(`.monaco-editor.${theme.selector} .margin-view-overlays .current-line-margin { background-color: ${lineHighlight}; border: none; }`); + collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${lineHighlight}; border: none; }`); } else { let lineHighlightBorder = theme.getColor(editorLineHighlightBorder); if (lineHighlightBorder) { - collector.addRule(`.monaco-editor.${theme.selector} .margin-view-overlays .current-line-margin { border: 2px solid ${lineHighlightBorder}; }`); + collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${lineHighlightBorder}; }`); } if (theme.type === 'hc') { - collector.addRule(`.monaco-editor.${theme.selector} .margin-view-overlays .current-line-margin { border-width: 1px; }`); + collector.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }`); } } }); diff --git a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts index 7c9aa363e3817..5b3a301abc036 100644 --- a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts +++ b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts @@ -118,6 +118,6 @@ export class IndentGuidesOverlay extends DynamicViewOverlay { registerThemingParticipant((theme, collector) => { let editorGuideColor = theme.getColor(editorIndentGuides); if (editorGuideColor) { - collector.addRule(`.monaco-editor.${theme.selector} .lines-content .cigr { background-color: ${editorGuideColor}; }`); + collector.addRule(`.monaco-editor .lines-content .cigr { background-color: ${editorGuideColor}; }`); } }); diff --git a/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts b/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts index 38205f5a9978a..10db29cb72620 100644 --- a/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts +++ b/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts @@ -163,6 +163,6 @@ export class LineNumbersOverlay extends DynamicViewOverlay { registerThemingParticipant((theme, collector) => { let lineNumbers = theme.getColor(editorLineNumbers); if (lineNumbers) { - collector.addRule(`.monaco-editor.${theme.selector} .line-numbers { color: ${lineNumbers}; }`); + collector.addRule(`.monaco-editor .line-numbers { color: ${lineNumbers}; }`); } }); \ No newline at end of file diff --git a/src/vs/editor/browser/viewParts/selections/selections.ts b/src/vs/editor/browser/viewParts/selections/selections.ts index c517172658d43..a7939523df313 100644 --- a/src/vs/editor/browser/viewParts/selections/selections.ts +++ b/src/vs/editor/browser/viewParts/selections/selections.ts @@ -397,11 +397,11 @@ export class SelectionsOverlay extends DynamicViewOverlay { registerThemingParticipant((theme, collector) => { let editorSelectionColor = theme.getColor(editorSelection); if (editorSelectionColor) { - collector.addRule(`.monaco-editor.${theme.selector} .focused .selected-text { background-color: ${editorSelectionColor}; }`); + collector.addRule(`.monaco-editor .focused .selected-text { background-color: ${editorSelectionColor}; }`); } let editorInactiveSelectionColor = theme.getColor(editorInactiveSelection); if (editorInactiveSelectionColor) { - collector.addRule(`.monaco-editor.${theme.selector} .selected-text { background-color: ${editorInactiveSelectionColor}; }`); + collector.addRule(`.monaco-editor .selected-text { background-color: ${editorInactiveSelectionColor}; }`); } // IE/Edge specific rules let outline = theme.getColor(activeContrastBorder); diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts index 8220415f4f737..aba0ada5df62a 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts @@ -345,9 +345,9 @@ registerThemingParticipant((theme, collector) => { let caret = theme.getColor(editorCursor); if (caret) { let oppositeCaret = caret.opposite(); - collector.addRule(`.monaco-editor.${theme.selector} .cursor { background-color: ${caret}; border-color: ${caret}; color: ${oppositeCaret}; }`); + collector.addRule(`.monaco-editor .cursor { background-color: ${caret}; border-color: ${caret}; color: ${oppositeCaret}; }`); if (theme.type === 'hc') { - collector.addRule(`.monaco-editor.${theme.selector} .cursors-layer.has-selection .cursor { border-left: 1px solid ${oppositeCaret}; border-right: 1px solid ${oppositeCaret}; }`); + collector.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${oppositeCaret}; border-right: 1px solid ${oppositeCaret}; }`); } } diff --git a/src/vs/editor/contrib/accessibility/browser/accessibility.ts b/src/vs/editor/contrib/accessibility/browser/accessibility.ts index dc68a6a47152c..1294dc7b3065f 100644 --- a/src/vs/editor/contrib/accessibility/browser/accessibility.ts +++ b/src/vs/editor/contrib/accessibility/browser/accessibility.ts @@ -234,16 +234,16 @@ CommonEditorRegistry.registerEditorCommand(new AccessibilityHelpCommand({ registerThemingParticipant((theme, collector) => { let widgetBackground = theme.getColor(editorWidgetBackground); if (widgetBackground) { - collector.addRule(`.monaco-editor.${theme.selector} .accessibilityHelpWidget { background-color: ${widgetBackground}; }`); + collector.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${widgetBackground}; }`); } let widgetShadowColor = theme.getColor(widgetShadow); if (widgetShadowColor) { - collector.addRule(`.monaco-editor.${theme.selector} .accessibilityHelpWidget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); + collector.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); } let hcBorder = theme.getColor(contrastBorder); if (hcBorder) { - collector.addRule(`.monaco-editor.${theme.selector} .accessibilityHelpWidget { border: 2px solid ${hcBorder}; }`); + collector.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${hcBorder}; }`); } }); diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts index eb4fcb4e7fe9e..82183b88ce184 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts @@ -633,6 +633,6 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC registerThemingParticipant((theme, collector) => { let activeLinkForeground = theme.getColor(editorActiveLinkForeground); if (activeLinkForeground) { - collector.addRule(`.monaco-editor.${theme.selector} .goto-definition-link { color: ${activeLinkForeground} !important; }`); + collector.addRule(`.monaco-editor .goto-definition-link { color: ${activeLinkForeground} !important; }`); } }); diff --git a/src/vs/editor/contrib/hover/browser/hover.ts b/src/vs/editor/contrib/hover/browser/hover.ts index 4ad6fba3fb3ce..97456adcbf4fb 100644 --- a/src/vs/editor/contrib/hover/browser/hover.ts +++ b/src/vs/editor/contrib/hover/browser/hover.ts @@ -176,15 +176,15 @@ class ShowHoverAction extends EditorAction { registerThemingParticipant((theme, collector) => { let editorHoverHighlightColor = theme.getColor(editorHoverHighlight); if (editorHoverHighlightColor) { - collector.addRule(`.monaco-editor.${theme.selector} .hoverHighlight { background-color: ${editorHoverHighlightColor}; }`); + collector.addRule(`.monaco-editor .hoverHighlight { background-color: ${editorHoverHighlightColor}; }`); } let hoverBackground = theme.getColor(editorHoverBackground); if (hoverBackground) { - collector.addRule(`.monaco-editor.${theme.selector} .monaco-editor-hover { background-color: ${hoverBackground}; }`); + collector.addRule(`.monaco-editor .monaco-editor-hover { background-color: ${hoverBackground}; }`); } let hoverBorder = theme.getColor(editorHoverBorder); if (hoverBorder) { - collector.addRule(`.monaco-editor.${theme.selector} .monaco-editor-hover { border: 1px solid ${hoverBorder}; }`); - collector.addRule(`.monaco-editor.${theme.selector} .monaco-editor-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`); + collector.addRule(`.monaco-editor .monaco-editor-hover { border: 1px solid ${hoverBorder}; }`); + collector.addRule(`.monaco-editor .monaco-editor-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${hoverBorder.transparent(0.5)}; }`); } }); diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index cb507783d8132..3be7d77a575c3 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -348,6 +348,6 @@ class OpenLinkAction extends EditorAction { registerThemingParticipant((theme, collector) => { let activeLinkForeground = theme.getColor(editorActiveLinkForeground); if (activeLinkForeground) { - collector.addRule(`.monaco-editor.${theme.selector} .detected-link-active { color: ${activeLinkForeground} !important; }`); + collector.addRule(`.monaco-editor .detected-link-active { color: ${activeLinkForeground} !important; }`); } }); \ No newline at end of file diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index a84c8f577cb67..f157853bbdf76 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -951,10 +951,10 @@ export class SuggestWidget implements IContentWidget, IDelegate registerThemingParticipant((theme, collector) => { let matchHighlight = theme.getColor(editorSuggestWidgetHighlightForeground); if (matchHighlight) { - collector.addRule(`.monaco-editor.${theme.selector} .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight { color: ${matchHighlight}; }`); + collector.addRule(`.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight { color: ${matchHighlight}; }`); } let foreground = theme.getColor(editorSuggestWidgetForeground); if (foreground) { - collector.addRule(`.monaco-editor.${theme.selector} .suggest-widget { color: ${foreground}; }`); + collector.addRule(`.monaco-editor .suggest-widget { color: ${foreground}; }`); } }); diff --git a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts index 720a2871a70a7..927263b989a3f 100644 --- a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts +++ b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts @@ -319,22 +319,22 @@ class WordHighlighterContribution implements editorCommon.IEditorContribution { registerThemingParticipant((theme, collector) => { let selectionHighlight = theme.getColor(editorSelectionHighlight); if (selectionHighlight) { - collector.addRule(`.monaco-editor.${theme.selector} .focused .selectionHighlight { background-color: ${selectionHighlight}; }`); - collector.addRule(`.monaco-editor.${theme.selector} .selectionHighlight { background-color: ${selectionHighlight.transparent(0.5)}; }`); + collector.addRule(`.monaco-editor. .focused .selectionHighlight { background-color: ${selectionHighlight}; }`); + collector.addRule(`.monaco-editor. .selectionHighlight { background-color: ${selectionHighlight.transparent(0.5)}; }`); } let wordHighlight = theme.getColor(editorWordHighlight); if (wordHighlight) { - collector.addRule(`.monaco-editor.${theme.selector} .wordHighlight { background-color: ${wordHighlight}; }`); + collector.addRule(`.monaco-editor. .wordHighlight { background-color: ${wordHighlight}; }`); } let wordHighlightStrong = theme.getColor(editorWordHighlightStrong); if (wordHighlightStrong) { - collector.addRule(`.monaco-editor.${theme.selector} .wordHighlightStrong { background-color: ${wordHighlightStrong}; }`); + collector.addRule(`.monaco-editor. .wordHighlightStrong { background-color: ${wordHighlightStrong}; }`); } let hcOutline = theme.getColor(activeContrastBorder); if (hcOutline) { - collector.addRule(`.monaco-editor.${theme.selector} .selectionHighlight { border: 1px dotted ${hcOutline}; box-sizing: border-box; }`); - collector.addRule(`.monaco-editor.${theme.selector} .wordHighlight { border: 1px dashed ${hcOutline}; box-sizing: border-box; }`); - collector.addRule(`.monaco-editor.${theme.selector} .wordHighlightStrong { border: 1px dashed ${hcOutline}; box-sizing: border-box; }`); + collector.addRule(`.monaco-editor. .selectionHighlight { border: 1px dotted ${hcOutline}; box-sizing: border-box; }`); + collector.addRule(`.monaco-editor. .wordHighlight { border: 1px dashed ${hcOutline}; box-sizing: border-box; }`); + collector.addRule(`.monaco-editor. .wordHighlightStrong { border: 1px dashed ${hcOutline}; box-sizing: border-box; }`); } }); \ No newline at end of file diff --git a/src/vs/platform/theme/common/themeService.ts b/src/vs/platform/theme/common/themeService.ts index d6d7c4a0639cf..37f6eb59b7c0a 100644 --- a/src/vs/platform/theme/common/themeService.ts +++ b/src/vs/platform/theme/common/themeService.ts @@ -20,7 +20,6 @@ export const HIGH_CONTRAST = 'hc'; export type ThemeType = 'light' | 'dark' | 'hc'; export interface ITheme { - readonly selector: string; readonly type: ThemeType; /** diff --git a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts index be88816168181..aa101644f89b6 100644 --- a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts +++ b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts @@ -33,7 +33,6 @@ export class ColorThemeData implements IColorTheme { label: string; settingsId: string; description?: string; - selector: string; tokenColors?: ITokenColorizationRule[]; isLoaded: boolean; path?: string; @@ -111,7 +110,7 @@ export class ColorThemeData implements IColorTheme { id: this.id, label: this.label, settingsId: this.settingsId, - selector: this.selector, + selector: this.id.split(' ').join('.'), // to not break old clients tokenColors: this.tokenColors, extensionData: this.extensionData, colorMap: colorMapData @@ -160,7 +159,6 @@ export function fromExtensionTheme(theme: IThemeExtensionPoint, normalizedAbsolu themeData.id = `${baseTheme} ${themeSelector}`; themeData.label = theme.label || Paths.basename(theme.path); themeData.settingsId = theme.id || themeData.label; - themeData.selector = `${baseTheme}.${themeSelector}`; themeData.description = theme.description; themeData.path = normalizedAbsolutePath; themeData.extensionData = extensionData; diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index a72c48e41d86f..799975ed9d438 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -246,7 +246,6 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { let initialTheme = new ColorThemeData(); initialTheme.id = isLightTheme ? VS_LIGHT_THEME : VS_DARK_THEME; initialTheme.label = ''; - initialTheme.selector = isLightTheme ? VS_LIGHT_THEME : VS_DARK_THEME; initialTheme.settingsId = null; initialTheme.isLoaded = false; initialTheme.tokenColors = [{ settings: {} }]; diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 37cc7b6cb355d..bc6068ce24eeb 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -50,7 +50,7 @@ import { IWindowsService, IWindowService } from 'vs/platform/windows/common/wind import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; import { RawTextSource, IRawTextSource } from 'vs/editor/common/model/textSource'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { IThemeService, ITheme, IThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { IThemeService, ITheme, IThemingParticipant, ThemeType } from 'vs/platform/theme/common/themeService'; import { IDisposable } from 'vs/base/common/lifecycle'; import { Color } from 'vs/base/common/color'; import { isLinux } from 'vs/base/common/platform'; @@ -999,8 +999,7 @@ export class TestWindowsService implements IWindowsService { } export class TestTheme implements ITheme { - selector: string; - type: 'light' | 'dark' | 'hc'; + type: ThemeType; getColor(color: string, useDefault?: boolean): Color { throw new Error('Method not implemented.'); From 996623e0ae100eaa471cd7e46f728ca870d94668 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 12 May 2017 16:30:07 +0200 Subject: [PATCH 0490/2747] debug: use false as the default value for allThreadsContinued fixes #18195 --- .../workbench/parts/debug/electron-browser/rawDebugSession.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts b/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts index f0d9a852f0287..0df197051a3cd 100644 --- a/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts +++ b/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts @@ -79,7 +79,7 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession { super(id); this.emittedStopped = false; this.readyForBreakpoints = false; - this.allThreadsContinued = false; + this.allThreadsContinued = true; this.sentPromises = []; this._onDidInitialize = new Emitter(); From a5f82bdcc6f2414a1158a9240ed7c9ba79e33da8 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 12 May 2017 16:31:16 +0200 Subject: [PATCH 0491/2747] Fix #16580 --- .../actions/toggleActivityBarVisibility.ts | 6 +--- .../browser/actions/toggleSidebarPosition.ts | 6 +--- .../actions/toggleStatusbarVisibility.ts | 6 +--- .../browser/parts/editor/editorStatus.ts | 4 +-- src/vs/workbench/electron-browser/actions.ts | 4 +-- src/vs/workbench/electron-browser/window.ts | 2 +- .../toggleRenderControlCharacter.ts | 6 +--- .../toggleRenderWhitespace.ts | 6 +--- .../electron-browser/extensionTipsService.ts | 4 +-- .../browser/preferencesRenderers.ts | 2 +- .../page/electron-browser/welcomePage.ts | 3 +- .../node/configurationEditingService.ts | 29 ++++++++++++++----- 12 files changed, 33 insertions(+), 45 deletions(-) diff --git a/src/vs/workbench/browser/actions/toggleActivityBarVisibility.ts b/src/vs/workbench/browser/actions/toggleActivityBarVisibility.ts index 3718e0927b9ee..0c191dd5a55e6 100644 --- a/src/vs/workbench/browser/actions/toggleActivityBarVisibility.ts +++ b/src/vs/workbench/browser/actions/toggleActivityBarVisibility.ts @@ -10,7 +10,6 @@ import { Registry } from 'vs/platform/platform'; import { Action } from 'vs/base/common/actions'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; -import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { IPartService, Parts } from 'vs/workbench/services/part/common/partService'; @@ -25,7 +24,6 @@ export class ToggleActivityBarVisibilityAction extends Action { id: string, label: string, @IPartService private partService: IPartService, - @IMessageService private messageService: IMessageService, @IConfigurationEditingService private configurationEditingService: IConfigurationEditingService ) { super(id, label); @@ -37,9 +35,7 @@ export class ToggleActivityBarVisibilityAction extends Action { const visibility = this.partService.isVisible(Parts.ACTIVITYBAR_PART); const newVisibilityValue = !visibility; - this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ToggleActivityBarVisibilityAction.activityBarVisibleKey, value: newVisibilityValue }).then(null, error => { - this.messageService.show(Severity.Error, error); - }); + this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ToggleActivityBarVisibilityAction.activityBarVisibleKey, value: newVisibilityValue }); return TPromise.as(null); } diff --git a/src/vs/workbench/browser/actions/toggleSidebarPosition.ts b/src/vs/workbench/browser/actions/toggleSidebarPosition.ts index 1fc53c621d628..57364bd91882d 100644 --- a/src/vs/workbench/browser/actions/toggleSidebarPosition.ts +++ b/src/vs/workbench/browser/actions/toggleSidebarPosition.ts @@ -9,7 +9,6 @@ import nls = require('vs/nls'); import { Registry } from 'vs/platform/platform'; import { Action } from 'vs/base/common/actions'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; -import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { IPartService, Position } from 'vs/workbench/services/part/common/partService'; @@ -25,7 +24,6 @@ export class ToggleSidebarPositionAction extends Action { id: string, label: string, @IPartService private partService: IPartService, - @IMessageService private messageService: IMessageService, @IConfigurationEditingService private configurationEditingService: IConfigurationEditingService ) { super(id, label); @@ -37,9 +35,7 @@ export class ToggleSidebarPositionAction extends Action { const position = this.partService.getSideBarPosition(); const newPositionValue = (position === Position.LEFT) ? 'right' : 'left'; - this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ToggleSidebarPositionAction.sidebarPositionConfigurationKey, value: newPositionValue }).then(null, error => { - this.messageService.show(Severity.Error, error); - }); + this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ToggleSidebarPositionAction.sidebarPositionConfigurationKey, value: newPositionValue }); return TPromise.as(null); } diff --git a/src/vs/workbench/browser/actions/toggleStatusbarVisibility.ts b/src/vs/workbench/browser/actions/toggleStatusbarVisibility.ts index d06dafc4db031..ae231cc643c20 100644 --- a/src/vs/workbench/browser/actions/toggleStatusbarVisibility.ts +++ b/src/vs/workbench/browser/actions/toggleStatusbarVisibility.ts @@ -10,7 +10,6 @@ import { Registry } from 'vs/platform/platform'; import { Action } from 'vs/base/common/actions'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; -import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { IPartService, Parts } from 'vs/workbench/services/part/common/partService'; @@ -25,7 +24,6 @@ export class ToggleStatusbarVisibilityAction extends Action { id: string, label: string, @IPartService private partService: IPartService, - @IMessageService private messageService: IMessageService, @IConfigurationEditingService private configurationEditingService: IConfigurationEditingService ) { super(id, label); @@ -37,9 +35,7 @@ export class ToggleStatusbarVisibilityAction extends Action { const visibility = this.partService.isVisible(Parts.STATUSBAR_PART); const newVisibilityValue = !visibility; - this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ToggleStatusbarVisibilityAction.statusbarVisibleKey, value: newVisibilityValue }).then(null, error => { - this.messageService.show(Severity.Error, error); - }); + this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ToggleStatusbarVisibilityAction.statusbarVisibleKey, value: newVisibilityValue }); return TPromise.as(null); } diff --git a/src/vs/workbench/browser/parts/editor/editorStatus.ts b/src/vs/workbench/browser/parts/editor/editorStatus.ts index b7fcf752dbabf..94c97b90690cf 100644 --- a/src/vs/workbench/browser/parts/editor/editorStatus.ts +++ b/src/vs/workbench/browser/parts/editor/editorStatus.ts @@ -21,7 +21,6 @@ import { IMode } from 'vs/editor/common/modes'; import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput'; import { IFileEditorInput, EncodingMode, IEncodingSupport, toResource, SideBySideEditorInput } from 'vs/workbench/common/editor'; import { IDisposable, combinedDisposable, dispose } from 'vs/base/common/lifecycle'; -import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { IEditorAction, ICommonCodeEditor, EndOfLineSequence, IModel } from 'vs/editor/common/editorCommon'; @@ -706,7 +705,6 @@ export class ChangeModeAction extends Action { @IModelService private modelService: IModelService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IConfigurationEditingService private configurationEditingService: IConfigurationEditingService, - @IMessageService private messageService: IMessageService, @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService, @IQuickOpenService private quickOpenService: IQuickOpenService, @IPreferencesService private preferencesService: IPreferencesService, @@ -886,7 +884,7 @@ export class ChangeModeAction extends Action { currentAssociations[associationKey] = language.id; // Write config - this.configurationEditingService.writeConfiguration(target, { key: ChangeModeAction.FILE_ASSOCIATION_KEY, value: currentAssociations }).done(null, (error) => this.messageService.show(Severity.Error, error.toString())); + this.configurationEditingService.writeConfiguration(target, { key: ChangeModeAction.FILE_ASSOCIATION_KEY, value: currentAssociations }); } }); }); diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index 68a3993f30c04..c21c6700f2952 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -197,9 +197,7 @@ export class ToggleMenuBarAction extends Action { newVisibilityValue = 'default'; } - this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ToggleMenuBarAction.menuBarVisibilityKey, value: newVisibilityValue }).then(null, error => { - this.messageService.show(Severity.Error, error); - }); + this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ToggleMenuBarAction.menuBarVisibilityKey, value: newVisibilityValue }); return TPromise.as(null); } diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index e9e4c2ce9df73..c0230d6cc12b0 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -464,7 +464,7 @@ export class ElectronWindow extends Themable { newAutoSaveValue = AutoSaveConfiguration.AFTER_DELAY; } - this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ElectronWindow.AUTO_SAVE_SETTING, value: newAutoSaveValue }).done(null, error => this.messageService.show(Severity.Error, error)); + this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ElectronWindow.AUTO_SAVE_SETTING, value: newAutoSaveValue }); } private includesFolder(resources: URI[]): TPromise { diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.ts b/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.ts index 6e8205b0cdd1b..584821e2d3ada 100644 --- a/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.ts +++ b/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.ts @@ -8,7 +8,6 @@ import * as nls from 'vs/nls'; import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { editorAction, ServicesAccessor, EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; -import { IMessageService, Severity } from 'vs/platform/message/common/message'; @editorAction export class ToggleRenderControlCharacterAction extends EditorAction { @@ -24,12 +23,9 @@ export class ToggleRenderControlCharacterAction extends EditorAction { public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void { const configurationEditingService = accessor.get(IConfigurationEditingService); - const messageService = accessor.get(IMessageService); let newRenderControlCharacters = !editor.getConfiguration().viewInfo.renderControlCharacters; - configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: 'editor.renderControlCharacters', value: newRenderControlCharacters }).then(null, error => { - messageService.show(Severity.Error, error); - }); + configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: 'editor.renderControlCharacters', value: newRenderControlCharacters }); } } diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.ts b/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.ts index 7697db1cbcf9c..f8e373a96f07c 100644 --- a/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.ts +++ b/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.ts @@ -8,7 +8,6 @@ import * as nls from 'vs/nls'; import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { editorAction, ServicesAccessor, EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; -import { IMessageService, Severity } from 'vs/platform/message/common/message'; @editorAction export class ToggleRenderWhitespaceAction extends EditorAction { @@ -24,7 +23,6 @@ export class ToggleRenderWhitespaceAction extends EditorAction { public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void { const configurationEditingService = accessor.get(IConfigurationEditingService); - const messageService = accessor.get(IMessageService); let renderWhitespace = editor.getConfiguration().viewInfo.renderWhitespace; let newRenderWhitespace: string; @@ -34,8 +32,6 @@ export class ToggleRenderWhitespaceAction extends EditorAction { newRenderWhitespace = 'none'; } - configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: 'editor.renderWhitespace', value: newRenderWhitespace }).then(null, error => { - messageService.show(Severity.Error, error); - }); + configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: 'editor.renderWhitespace', value: newRenderWhitespace }); } } diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts index 59ee7282c26d2..c5f9866b41eb7 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts @@ -279,9 +279,7 @@ export class ExtensionTipsService implements IExtensionTipsService { private setIgnoreRecommendationsConfig(configVal: boolean) { let target = ConfigurationTarget.USER; const configKey = 'extensions.ignoreRecommendations'; - this.configurationEditingService.writeConfiguration(target, { key: configKey, value: configVal }).then(null, error => { - this.messageService.show(Severity.Error, error); - }); + this.configurationEditingService.writeConfiguration(target, { key: configKey, value: configVal }); if (configVal) { const ignoreWorkspaceRecommendationsStorageKey = 'extensionsAssistant/workspaceRecommendationsIgnore'; this.storageService.store(ignoreWorkspaceRecommendationsStorageKey, true, StorageScope.WORKSPACE); diff --git a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts index e16b24e47d0fd..16f4f0ed57c2e 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts @@ -101,7 +101,7 @@ export class UserSettingsRenderer extends Disposable implements IPreferencesRend this.telemetryService.publicLog('defaultSettingsActions.copySetting', { userConfigurationKeys: [key] }); const overrideIdentifier = source.overrideOf ? overrideIdentifierFromKey(source.overrideOf.key) : null; this.configurationEditingService.writeConfiguration(this.preferencesModel.configurationTarget, { key, value, overrideIdentifier }, !this.textFileService.isDirty(this.preferencesModel.uri)) - .then(() => this.onSettingUpdated(source), error => this.messageService.show(Severity.Error, error)); + .then(() => this.onSettingUpdated(source)); } private onModelChanged(): void { diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 7231ee075f853..d60458ba1d9aa 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -168,8 +168,7 @@ class WelcomePage { showOnStartup.setAttribute('checked', 'checked'); } showOnStartup.addEventListener('click', e => { - this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: enabledKey, value: showOnStartup.checked }) - .then(null, error => this.messageService.show(Severity.Error, error)); + this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: enabledKey, value: showOnStartup.checked }); }); recentlyOpened.then(({ folders }) => { diff --git a/src/vs/workbench/services/configuration/node/configurationEditingService.ts b/src/vs/workbench/services/configuration/node/configurationEditingService.ts index 758951c5535e5..022f5fb02262f 100644 --- a/src/vs/workbench/services/configuration/node/configurationEditingService.ts +++ b/src/vs/workbench/services/configuration/node/configurationEditingService.ts @@ -29,6 +29,8 @@ import { IFileService } from 'vs/platform/files/common/files'; import { IConfigurationEditingService, ConfigurationEditingErrorCode, IConfigurationEditingError, ConfigurationTarget, IConfigurationValue } from 'vs/workbench/services/configuration/common/configurationEditing'; import { ITextModelResolverService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { OVERRIDE_PROPERTY_PATTERN } from 'vs/platform/configuration/common/configurationRegistry'; +import { IChoiceService, Severity } from 'vs/platform/message/common/message'; +import { ICommandService } from 'vs/platform/commands/common/commands'; interface IConfigurationEditOperation extends IConfigurationValue { resource: URI; @@ -52,13 +54,15 @@ export class ConfigurationEditingService implements IConfigurationEditingService @IEnvironmentService private environmentService: IEnvironmentService, @IFileService private fileService: IFileService, @ITextModelResolverService private textModelResolverService: ITextModelResolverService, - @ITextFileService private textFileService: ITextFileService + @ITextFileService private textFileService: ITextFileService, + @IChoiceService private choiceService: IChoiceService, + @ICommandService private commandService: ICommandService ) { this.queue = new Queue(); } writeConfiguration(target: ConfigurationTarget, value: IConfigurationValue, save: boolean = true): TPromise { - return this.queue.queue(() => this.doWriteConfiguration(target, value, save)); // queue up writes to prevent race conditions + return this.queue.queue(() => this.doWriteConfiguration(target, value, save).then(() => null, error => this.onError(error, target))); // queue up writes to prevent race conditions } private doWriteConfiguration(target: ConfigurationTarget, value: IConfigurationValue, save: boolean): TPromise { @@ -92,6 +96,17 @@ export class ConfigurationEditingService implements IConfigurationEditingService return false; } + private onError(error: IConfigurationEditingError, target: ConfigurationTarget): TPromise { + this.choiceService.choose(Severity.Error, error.message, [nls.localize('open', "Open Settings"), nls.localize('close', "Close")], 1) + .then(value => { + switch (value) { + case 0: + this.commandService.executeCommand(ConfigurationTarget.USER === target ? 'workbench.action.openGlobalSettings' : 'workbench.action.openWorkspaceSettings'); + } + }); + return TPromise.wrapError(error); + } + private wrapError(code: ConfigurationEditingErrorCode, target: ConfigurationTarget): TPromise { const message = this.toErrorMessage(code, target); @@ -110,20 +125,20 @@ export class ConfigurationEditingService implements IConfigurationEditingService case ConfigurationEditingErrorCode.ERROR_INVALID_TARGET: return nls.localize('errorInvalidTarget', "Unable to write to the configuration file (Invalid Target)"); // User issues - case ConfigurationEditingErrorCode.ERROR_NO_WORKSPACE_OPENED: return nls.localize('errorNoWorkspaceOpened', "Unable to write settings because no folder is opened. Please open a folder first and try again."); + case ConfigurationEditingErrorCode.ERROR_NO_WORKSPACE_OPENED: return nls.localize('errorNoWorkspaceOpened', "Unable to write into settings because no folder is opened. Please open a folder first and try again."); case ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION: { if (target === ConfigurationTarget.USER) { - return nls.localize('errorInvalidConfiguration', "Unable to write settings. Please open **User Settings** to correct errors/warnings in the file and try again."); + return nls.localize('errorInvalidConfiguration', "Unable to write into settings. Please open **User Settings** to correct errors/warnings in the file and try again."); } - return nls.localize('errorInvalidConfigurationWorkspace', "Unable to write settings. Please open **Workspace Settings** to correct errors/warnings in the file and try again."); + return nls.localize('errorInvalidConfigurationWorkspace', "Unable to write into settings. Please open **Workspace Settings** to correct errors/warnings in the file and try again."); }; case ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_DIRTY: { if (target === ConfigurationTarget.USER) { - return nls.localize('errorConfigurationFileDirty', "Unable to write settings because the file is dirty. Please save the **User Settings** file and try again."); + return nls.localize('errorConfigurationFileDirty', "Unable to write into settings because the file is dirty. Please save the **User Settings** file and try again."); } - return nls.localize('errorConfigurationFileDirtyWorkspace', "Unable to write settings because the file is dirty. Please save the **Workspace Settings** file and try again."); + return nls.localize('errorConfigurationFileDirtyWorkspace', "Unable to write into settings because the file is dirty. Please save the **Workspace Settings** file and try again."); }; } } From 6519bee914f379f50bb3ba767377cdf4a28c2844 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 12 May 2017 16:31:48 +0200 Subject: [PATCH 0492/2747] [theme] css fix, dots left over --- .../wordHighlighter/common/wordHighlighter.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts index 927263b989a3f..e0eca99d8f359 100644 --- a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts +++ b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts @@ -319,22 +319,22 @@ class WordHighlighterContribution implements editorCommon.IEditorContribution { registerThemingParticipant((theme, collector) => { let selectionHighlight = theme.getColor(editorSelectionHighlight); if (selectionHighlight) { - collector.addRule(`.monaco-editor. .focused .selectionHighlight { background-color: ${selectionHighlight}; }`); - collector.addRule(`.monaco-editor. .selectionHighlight { background-color: ${selectionHighlight.transparent(0.5)}; }`); + collector.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${selectionHighlight}; }`); + collector.addRule(`.monaco-editor .selectionHighlight { background-color: ${selectionHighlight.transparent(0.5)}; }`); } let wordHighlight = theme.getColor(editorWordHighlight); if (wordHighlight) { - collector.addRule(`.monaco-editor. .wordHighlight { background-color: ${wordHighlight}; }`); + collector.addRule(`.monaco-editor .wordHighlight { background-color: ${wordHighlight}; }`); } let wordHighlightStrong = theme.getColor(editorWordHighlightStrong); if (wordHighlightStrong) { - collector.addRule(`.monaco-editor. .wordHighlightStrong { background-color: ${wordHighlightStrong}; }`); + collector.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${wordHighlightStrong}; }`); } let hcOutline = theme.getColor(activeContrastBorder); if (hcOutline) { - collector.addRule(`.monaco-editor. .selectionHighlight { border: 1px dotted ${hcOutline}; box-sizing: border-box; }`); - collector.addRule(`.monaco-editor. .wordHighlight { border: 1px dashed ${hcOutline}; box-sizing: border-box; }`); - collector.addRule(`.monaco-editor. .wordHighlightStrong { border: 1px dashed ${hcOutline}; box-sizing: border-box; }`); + collector.addRule(`.monaco-editor .selectionHighlight { border: 1px dotted ${hcOutline}; box-sizing: border-box; }`); + collector.addRule(`.monaco-editor .wordHighlight { border: 1px dashed ${hcOutline}; box-sizing: border-box; }`); + collector.addRule(`.monaco-editor .wordHighlightStrong { border: 1px dashed ${hcOutline}; box-sizing: border-box; }`); } }); \ No newline at end of file From ab483f64895520b02e925561bcfe478e86729b0d Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 12 May 2017 15:31:19 +0200 Subject: [PATCH 0493/2747] clean publish scripts --- build/tfs/common/enqueue.ts | 4 +-- build/tfs/common/publish.ts | 47 +++++++++++-------------- build/tfs/common/util.ts | 69 ------------------------------------- 3 files changed, 23 insertions(+), 97 deletions(-) delete mode 100644 build/tfs/common/util.ts diff --git a/build/tfs/common/enqueue.ts b/build/tfs/common/enqueue.ts index 613805647b1bf..e055ed4a938c9 100644 --- a/build/tfs/common/enqueue.ts +++ b/build/tfs/common/enqueue.ts @@ -5,10 +5,10 @@ 'use strict'; +import { execSync } from 'child_process'; import { DocumentClient } from 'documentdb'; import * as azure from 'azure-storage'; import * as path from 'path'; -import { getVersion } from './util'; interface Asset { platform: string; @@ -69,7 +69,7 @@ async function waitForSignedBuild(quality: string, commit: string): Promise { - const commit = getVersion(path.dirname(path.dirname(path.dirname(__dirname)))); + const commit = execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim(); console.log(`Queueing signing request for '${quality}/${commit}'...`); await queueSigningRequest(quality, commit); diff --git a/build/tfs/common/publish.ts b/build/tfs/common/publish.ts index 03d0a3276d742..025689cea7db4 100644 --- a/build/tfs/common/publish.ts +++ b/build/tfs/common/publish.ts @@ -6,22 +6,17 @@ 'use strict'; import * as fs from 'fs'; -import * as path from 'path'; +import { execSync } from 'child_process'; import * as crypto from 'crypto'; import * as azure from 'azure-storage'; import * as mime from 'mime'; import { DocumentClient, NewDocument } from 'documentdb'; -import { getVersion } from './util'; if (process.argv.length < 6) { console.error('Usage: node publish.js '); process.exit(-1); } -function log(...args: any[]) { - console.log(new Date().toISOString(), ...args); -} - function sha1hash(file: string): Promise { return new Promise((c, e) => { const shasum = crypto.createHash('sha1'); @@ -106,7 +101,7 @@ function createOrUpdate(commit: string, quality: string, platform: string, type: if (err && err.code === 409 && updateTries < 5) { return c(update()); } if (err) { return e(err); } - log('Build successfully updated.'); + console.log('Build successfully updated.'); c(); }); }); @@ -118,7 +113,7 @@ function createOrUpdate(commit: string, quality: string, platform: string, type: if (err && err.code === 409) { return c(update()); } if (err) { return e(err); } - log('Build successfully published.'); + console.log('Build successfully published.'); c(); }); }); @@ -142,29 +137,28 @@ async function uploadBlob(blobService: azure.BlobService, quality: string, blobN await new Promise((c, e) => blobService.createBlockBlobFromLocalFile(quality, blobName, file, blobOptions, err => err ? e(err) : c())); } -async function publish(quality: string, platform: string, type: string, name: string, version: string, _isUpdate: string, file: string): Promise { +async function publish(commit: string, quality: string, platform: string, type: string, name: string, version: string, _isUpdate: string, file: string): Promise { const isUpdate = _isUpdate === 'true'; const queuedBy = process.env['BUILD_QUEUEDBY']; const sourceBranch = process.env['BUILD_SOURCEBRANCH']; - const commit = getVersion(path.dirname(path.dirname(path.dirname(__dirname)))); const isReleased = quality === 'insider' && /^master$|^refs\/heads\/master$/.test(sourceBranch) && /Project Collection Service Accounts|Microsoft.VisualStudio.Services.TFS/.test(queuedBy); - log('Publishing...'); - log('Quality:', quality); - log('Platforn:', platform); - log('Type:', type); - log('Name:', name); - log('Version:', version); - log('Commit:', commit); - log('Is Update:', isUpdate); - log('Is Released:', isReleased); - log('File:', file); + console.log('Publishing...'); + console.log('Quality:', quality); + console.log('Platforn:', platform); + console.log('Type:', type); + console.log('Name:', name); + console.log('Version:', version); + console.log('Commit:', commit); + console.log('Is Update:', isUpdate); + console.log('Is Released:', isReleased); + console.log('File:', file); const hash = await sha1hash(file); - log('Hash:', hash); + console.log('Hash:', hash); const blobName = commit + '/' + name; const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']; @@ -186,22 +180,22 @@ async function publish(quality: string, platform: string, type: string, name: st ]); if (blobExists || moooncakeBlobExists) { - log(`Blob ${quality}, ${blobName} already exists, not publishing again.`); + console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`); return; } - log('Uploading blobs to Azure storage...'); + console.log('Uploading blobs to Azure storage...'); await Promise.all([ uploadBlob(blobService, quality, blobName, file), uploadBlob(mooncakeBlobService, quality, blobName, file) ]); - log('Blobs successfully uploaded.'); + console.log('Blobs successfully uploaded.'); const config = await getConfig(quality); - log('Quality config:', config); + console.log('Quality config:', config); const asset: Asset = { platform: platform, @@ -231,8 +225,9 @@ async function publish(quality: string, platform: string, type: string, name: st function main(): void { const [, , quality, platform, type, name, version, _isUpdate, file] = process.argv; + const commit = execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim(); - publish(quality, platform, type, name, version, _isUpdate, file).catch(err => { + publish(commit, quality, platform, type, name, version, _isUpdate, file).catch(err => { console.error(err); process.exit(1); }); diff --git a/build/tfs/common/util.ts b/build/tfs/common/util.ts deleted file mode 100644 index b0b3cb6c4fd37..0000000000000 --- a/build/tfs/common/util.ts +++ /dev/null @@ -1,69 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import * as path from 'path'; -import * as fs from 'fs'; - -function getGitVersion(repo: string): string { - const git = path.join(repo, '.git'); - const headPath = path.join(git, 'HEAD'); - let head: string; - - try { - head = fs.readFileSync(headPath, 'utf8').trim(); - } catch (e) { - return void 0; - } - - if (/^[0-9a-f]{40}$/i.test(head)) { - return head; - } - - const refMatch = /^ref: (.*)$/.exec(head); - - if (!refMatch) { - return void 0; - } - - const ref = refMatch[1]; - const refPath = path.join(git, ref); - - try { - return fs.readFileSync(refPath, 'utf8').trim(); - } catch (e) { - // noop - } - - const packedRefsPath = path.join(git, 'packed-refs'); - let refsRaw: string; - - try { - refsRaw = fs.readFileSync(packedRefsPath, 'utf8').trim(); - } catch (e) { - return void 0; - } - - const refsRegex = /^([0-9a-f]{40})\s+(.+)$/gm; - let refsMatch: RegExpExecArray; - let refs: { [ref: string]: string } = {}; - - while (refsMatch = refsRegex.exec(refsRaw)) { - refs[refsMatch[2]] = refsMatch[1]; - } - - return refs[ref]; -} - -export function getVersion(root: string): string { - let version = process.env['BUILD_SOURCEVERSION']; - - if (!version || !/^[0-9a-f]{40}$/i.test(version)) { - version = getGitVersion(root); - } - - return version; -} \ No newline at end of file From d92829f2a53d5aa582e65b4541410aebd53f716a Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 12 May 2017 16:38:39 +0200 Subject: [PATCH 0494/2747] tfs: linux build first steps --- build/gulpfile.hygiene.js | 3 +- build/tfs/linux/build-x64.sh | 4 + build/tfs/linux/build.sh | 117 +++++++++++++ build/tfs/linux/repoapi_client.sh | 262 ++++++++++++++++++++++++++++++ 4 files changed, 385 insertions(+), 1 deletion(-) create mode 100644 build/tfs/linux/build-x64.sh create mode 100644 build/tfs/linux/build.sh create mode 100755 build/tfs/linux/repoapi_client.sh diff --git a/build/gulpfile.hygiene.js b/build/gulpfile.hygiene.js index ee2d58643020f..594774e2c160b 100644 --- a/build/gulpfile.hygiene.js +++ b/build/gulpfile.hygiene.js @@ -40,7 +40,8 @@ const eolFilter = [ '!**/*.{svg,exe,png,bmp,scpt,bat,cmd,cur,ttf,woff,eot}', '!build/{lib,tslintRules}/**/*.js', '!build/monaco/**', - '!build/win32/**' + '!build/win32/**', + '!build/**/*.sh' ]; const indentationFilter = [ diff --git a/build/tfs/linux/build-x64.sh b/build/tfs/linux/build-x64.sh new file mode 100644 index 0000000000000..43eb1ad7be4b6 --- /dev/null +++ b/build/tfs/linux/build-x64.sh @@ -0,0 +1,4 @@ +#!/bin/bash +set -e +DIRNAME=$(dirname $(readlink -f $0)) +$DIRNAME/build.sh x64 "$@" \ No newline at end of file diff --git a/build/tfs/linux/build.sh b/build/tfs/linux/build.sh new file mode 100644 index 0000000000000..ed2ac6d37582b --- /dev/null +++ b/build/tfs/linux/build.sh @@ -0,0 +1,117 @@ +#!/bin/sh +set -e + +export ARCH="$ARCH" +export VSCODE_MIXIN_PASSWORD="$2" +export AZURE_STORAGE_ACCESS_KEY="$3" +export AZURE_STORAGE_ACCESS_KEY_2="$4" +export MOONCAKE_STORAGE_ACCESS_KEY="$5" +export AZURE_DOCUMENTDB_MASTERKEY="$6" +export LINUX_REPO_PASSWORD="$7" + +# set agent specific npm cache +if [ -n "$AGENT_WORKFOLDER" ] +then + export npm_config_cache="$AGENT_WORKFOLDER/npm-cache" + echo "Using npm cache: $npm_config_cache" +fi + +# log build step +STEP() { + echo "" + echo "********************************************************************************" + echo "*** $*" + echo "********************************************************************************" + echo "" +} + +STEP "Install dependencies" +./scripts/npm.sh install --arch=x64 --unsafe-perm + +STEP "Mix in repository from vscode-distro" +npm run gulp -- mixin + +STEP "Build minified" +npm run gulp -- --max_old_space_size=4096 vscode-linux-x64-min + +STEP "Build Debian package" +npm run gulp -- --max_old_space_size=4096 vscode-linux-x64-build-deb + +STEP "Build RPM package" +npm run gulp -- --max_old_space_size=4096 vscode-linux-x64-build-rpm + +STEP "Run unit tests" +./scripts/test.sh --xvfb --build --reporter dot + +STEP "Install build dependencies" +(cd $BUILD_SOURCESDIRECTORY/build/tfs/common && npm install --unsafe-perm) + +# Variables +PLATFORM_LINUX="linux-$ARCH" +PLATFORM_DEB="linux-deb-$ARCH" +PLATFORM_RPM="linux-rpm-$ARCH" +[[ "$ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64" +[[ "$ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64" +REPO="`pwd`" +ROOT="$REPO/.." +BUILDNAME="VSCode-$PLATFORM_LINUX" +BUILD="$ROOT/$BUILDNAME" +BUILD_VERSION="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/code-[a-z]*_//g' -e 's/\.deb$//g')" +[ -z "$VSCODE_QUALITY" ] && TARBALL_FILENAME="code-$BUILD_VERSION.tar.gz" || TARBALL_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.tar.gz" +TARBALL_PATH="$ROOT/$TARBALL_FILENAME" +PACKAGEJSON="$BUILD/resources/app/package.json" +VERSION=$(node -p "require(\"$PACKAGEJSON\").version") + +STEP "Create tar.gz archive" +rm -rf $ROOT/code-*.tar.* +pushd $ROOT +tar -czvf $TARBALL_PATH $BUILDNAME +popd + +STEP "Publish tar.gz archive" +node build/tfs/out/publish.js $VSCODE_QUALITY $PLATFORM_LINUX archive-unsigned $TARBALL_FILENAME $VERSION true $TARBALL_PATH + +STEP "Publish Debian package" +DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)" +DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME" +node build/tfs/out/publish.js $VSCODE_QUALITY $PLATFORM_DEB package $DEB_FILENAME $VERSION true $DEB_PATH + +STEP "Publish RPM package" +RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)" +RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME" +node build/tfs/out/publish.js $VSCODE_QUALITY $PLATFORM_RPM package $RPM_FILENAME $VERSION true $RPM_PATH + +STEP "Publish to repositories" +if [ -z "$VSCODE_QUALITY" ]; then + echo "VSCODE_QUALITY is not set, skipping repo package publish" +else + if [ "$BUILD_SOURCEBRANCH" = "master" ] || [ "$BUILD_SOURCEBRANCH" = "refs/heads/master" ]; then + if [[ $BUILD_QUEUEDBY = *"Project Collection Service Accounts"* || $BUILD_QUEUEDBY = *"Microsoft.VisualStudio.Services.TFS"* ]]; then + # Get necessary information + pushd $REPO && COMMIT_HASH=$(git rev-parse HEAD) && popd + PACKAGE_NAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/_.*//g')" + DEB_URL="https://az764295.vo.msecnd.net/$VSCODE_QUALITY/$COMMIT_HASH/$DEB_FILENAME" + RPM_URL="https://az764295.vo.msecnd.net/$VSCODE_QUALITY/$COMMIT_HASH/$RPM_FILENAME" + PACKAGE_VERSION="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/code-[a-z]*_//g' -e 's/\_.*$//g')" + # Write config files needed by API, use eval to force environment variable expansion + DIRNAME=$(dirname $(readlink -f $0)) + pushd $DIRNAME + # Submit to apt repo + if [ "$DEB_ARCH" = "amd64" ]; then + eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"username\": \"$LINUX_REPO_USERNAME\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > apt-config.json + eval echo '{ \"name\": \"$PACKAGE_NAME\", \"version\": \"$PACKAGE_VERSION\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"sourceUrl\": \"$DEB_URL\" }' > apt-addpkg.json + echo "Submitting apt-addpkg.json:" + cat apt-addpkg.json + ./repoapi_client.sh -config apt-config.json -addpkg apt-addpkg.json + fi + # Submit to yum repo (disabled as it's manual until signing is automated) + # eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"username\": \"$LINUX_REPO_USERNAME\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > yum-config.json + # eval echo '{ \"name\": \"$PACKAGE_NAME\", \"version\": \"$PACKAGE_VERSION\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"sourceUrl\": \"$RPM_URL\" }' > yum-addpkg.json + # echo "Submitting yum-addpkg.json:" + # cat yum-addpkg.json + # ./repoapi_client.sh -config yum-config.json -addpkg yum-addpkg.json + popd + echo "To check repo publish status run ./repoapi_client.sh -config config.json -check " + fi + fi +fi diff --git a/build/tfs/linux/repoapi_client.sh b/build/tfs/linux/repoapi_client.sh new file mode 100755 index 0000000000000..b214ef10726a6 --- /dev/null +++ b/build/tfs/linux/repoapi_client.sh @@ -0,0 +1,262 @@ +#!/bin/bash -e +# This is a VERY basic script for Create/Delete operations on repos and packages +# +cmd=$1 +urls=urls.txt +defaultPackageFile=new_package.json +defaultRepoFile=new_repo.json + +function Bail +{ + echo "ERROR: $@" + exit 1 +} + +function BailIfFileMissing { + file="$1" + if [ ! -f "$file" ]; then + Bail "File $file does not exist" + fi +} + +function Usage { + echo "USAGE: Manage repos and packages in an apt repository" + echo "$0 -config FILENAME -listrepos | -listpkgs | -addrepo FILENAME | -addpkg FILENAME |" + echo "-addpkgs FILENAME | -check ID | -delrepo REPOID | -delpkg PKGID" + echo -e "\t-config FILENAME : JSON file containing API server name and creds" + echo -e "\t-listrepos : List repositories" + echo -e "\t-listpkgs [REGEX] : List packages, optionally filter by REGEX" + echo -e "\t-addrepo FILENAME : Create a new repo using the specified JSON file" + echo -e "\t-addpkg FILENAME : Add package to repo using the specified JSON file" + echo -e "\t-addpkgs FILENAME : Add packages to repo using urls contained in FILENAME" + echo -e "\t-check ID : Check upload operation by ID" + echo -e "\t-delrepo REPOID : Delete the specified repo by ID" + echo -e "\t-delpkg PKGID : Delete the specified package by ID" + exit 1 +} + +function ParseFromJson { + if [ -z "$secretContents" ]; then + Bail "Unable to parse value because no JSON contents were specified" + elif [ -z "$1" ]; then + Bail "Unable to parse value from JSON because no key was specified" + fi + # Write value directly to stdout to be used by caller + echo $secretContents | jq "$1" | tr -d '"' +} + +function ParseConfigFile { + configFile="$1" + if [ -z "$configFile" ]; then + echo "Must specify -config option" + Usage + fi + BailIfFileMissing "$configFile" + secretContents=$(cat "$configFile") + + server=$(ParseFromJson .server) + protocol=$(ParseFromJson .protocol) + port=$(ParseFromJson .port) + repositoryId=$(ParseFromJson .repositoryId) + user=$(ParseFromJson .username) + pass=$(ParseFromJson .password) + baseurl="$protocol://$user:$pass@$server:$port" +} + +# List Repositories +function ListRepositories +{ + echo "Fetching repo list from $server..." + curl -k "$baseurl/v1/repositories" | sed 's/,/,\n/g' | sed 's/^"/\t"/g' + echo "" +} + +# List packages, using $1 as a regex to filter results +function ListPackages +{ + echo "Fetching package list from $server" + curl -k "$baseurl/v1/packages" | sed 's/{/\n{/g' | egrep "$1" | sed 's/,/,\n/g' | sed 's/^"/\t"/g' + echo "" +} + +# Create a new Repo using the specified JSON file +function AddRepo +{ + repoFile=$1 + if [ -z $repoFile ]; then + Bail "Error: Must specify a JSON-formatted file. Reference $defaultRepoFile.template" + fi + if [ ! -f $repoFile ]; then + Bail "Error: Cannot create repo - $repoFile does not exist" + fi + packageUrl=$(grep "url" $repoFile | head -n 1 | awk '{print $2}' | tr -d ',') + echo "Creating new repo on $server [$packageUrl]" + curl -i -k "$baseurl/v1/repositories" --data @./$repoFile -H "Content-Type: application/json" + echo "" +} + +# Upload a single package using the specified JSON file +function AddPackage +{ + packageFile=$1 + if [ -z $packageFile ]; then + Bail "Error: Must specify a JSON-formatted file. Reference $defaultPackageFile.template" + fi + if [ ! -f $packageFile ]; then + Bail "Error: Cannot add package - $packageFile does not exist" + fi + packageUrl=$(grep "sourceUrl" $packageFile | head -n 1 | awk '{print $2}') + echo "Adding package to $server [$packageUrl]" + curl -i -k "$baseurl/v1/packages" --data @./$packageFile -H "Content-Type: application/json" + echo "" +} + +# Upload a single package by dynamically creating a JSON file using a provided URL +function AddPackageByUrl +{ + url=$(echo "$1") + if [ -z "$url" ]; then + Bail "Unable to publish package because no URL was specified" + fi + tmpFile=$(mktemp) + tmpOut=$(mktemp) + if ! wget -q "$url" -O $tmpFile; then + rm -f $tmpFile $tmpFile + Bail "Unable to download URL $url" + elif dpkg -I $tmpFile > $tmpOut 2> /dev/null; then + echo "File is deb format" + pkgName=$(grep "^\s*Package:" $tmpOut | awk '{print $2}') + pkgVer=$(grep "^\s*Version:" $tmpOut | awk '{print $2}') + elif rpm -qpi $tmpFile > $tmpOut 2> /dev/null; then + echo "File is rpm format" + pkgName=$(egrep "^Name" $tmpOut | tr -d ':' | awk '{print $2}') + pkgVer=$(egrep "^Version" $tmpOut | tr -d ':' | awk '{print $2}') + else + rm -f $tmpFile $tmpOut + Bail "File is not a valid deb/rpm package $url" + fi + + rm -f $tmpFile $tmpOut + if [ -z "$pkgName" ]; then + Bail "Unable to parse package name for $url" + elif [ -z "$pkgVer" ]; then + Bail "Unable to parse package version number for $url" + fi + + # Create Package .json file + escapedUrl=$(echo "$url" | sed 's/\//\\\//g' | sed 's/\&/\\\&/g') + cp $defaultPackageFile.template $defaultPackageFile + sed -i "s/PACKAGENAME/$pkgName/g" $defaultPackageFile + sed -i "s/PACKAGEVERSION/$pkgVer/g" $defaultPackageFile + sed -i "s/PACKAGEURL/$escapedUrl/g" $defaultPackageFile + sed -i "s/REPOSITORYID/$repositoryId/g" $defaultPackageFile + # Perform Upload + AddPackage $defaultPackageFile + # Cleanup + rm -f $defaultPackageFile +} + +# Upload multiple packages by reading urls line-by-line from the specified file +function AddPackages +{ + urlFile=$1 + if [ -z $urlFile ]; then + Bail "Must specify a flat text file containing one or more URLs" + fi + if [ ! -f $urlFile ]; then + Bail "Cannot add packages. File $urlFile does not exist" + fi + for url in $(cat $urlFile); do + if [ -n "$url" ]; then + AddPackageByUrl "$url" + fi + sleep 5 + done +} + +# Check upload by ID +function CheckUpload { + id=$1 + if [ -z "$id" ]; then + Bail "Must specify an ID" + fi + curl -k $baseurl/v1/packages/queue/$id + echo "" +} + +# Delete the specified repo +function DeleteRepo +{ + repoId=$1 + if [ -z $repoId ]; then + Bail "Please specify repository ID. Run -listrepos for a list of IDs" + fi + curl -I -k -X DELETE "$baseurl/v1/repositories/$repoId" +} + +# Delete the specified package +function DeletePackage +{ + packageId=$1 + if [ -z $packageId ]; then + Bail "Please specify package ID. Run -listpkgs for a list of IDs" + fi + echo Removing pkgId $packageId from repo $repositoryId + curl -I -k -X DELETE "$baseurl/v1/packages/$packageId" +} + +# Parse params +# Not using getopts because this uses multi-char flags +operation= +while (( "$#" )); do + if [[ "$1" == "-config" ]]; then + shift + configFile="$1" + elif [[ "$1" == "-listrepos" ]]; then + operation=ListRepositories + elif [[ "$1" == "-listpkgs" ]]; then + operation=ListPackages + if [ -n "$2" ]; then + shift + operand="$1" + fi + elif [[ "$1" == "-addrepo" ]]; then + operation=AddRepo + shift + operand="$1" + elif [[ "$1" == "-addpkg" ]]; then + operation=AddPackage + shift + operand="$1" + elif [[ "$1" == "-addpkgs" ]]; then + operation=AddPackages + shift + operand="$1" + elif [[ "$1" == "-check" ]]; then + operation=CheckUpload + shift + operand="$1" + elif [[ "$1" == "-delrepo" ]]; then + operation=DeleteRepo + shift + operand="$1" + elif [[ "$1" == "-delpkg" ]]; then + operation=DeletePackage + shift + operand="$1" + else + Usage + fi + shift +done + +echo "Performing $operation $operand" +# Parse config file +ParseConfigFile "$configFile" + +# Exit if no operation was specified +if [ -z "operation" ]; then + Usage +fi + +$operation "$operand" From 6e3427b1bada44f88c8d85aff6f62c233d9aaea0 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 12 May 2017 16:43:18 +0200 Subject: [PATCH 0495/2747] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4f20135e41c7d..9ed66ec3a04a2 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev", "version": "1.13.0", "electronVersion": "1.6.6", - "distro": "a19a3b432030a478afa61b438c9a0dfd8f84f893", + "distro": "e040c79dac021045cd488b8192515113014d67d4", "author": { "name": "Microsoft Corporation" }, From 73d7b085e73cacc02e19c49d186f9e3fe5ce3dc6 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 12 May 2017 16:43:09 +0200 Subject: [PATCH 0496/2747] don't search for nothing, fixes #26423 --- src/vs/base/common/filters.ts | 10 ++++++++++ src/vs/base/test/common/filters.test.ts | 15 +++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index dc376f9150b17..360da9f2384d5 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -478,6 +478,9 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { return undefined; } + // keep track of the maximum score + let maxScore = -1; + for (i = 1; i <= patternLen; i++) { let lastLowWordChar = ''; @@ -509,6 +512,9 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { } _scores[i][j] = score; + if (score > maxScore) { + maxScore = score; + } let diag = _table[i - 1][j - 1] + (score > 1 ? 1 : score); let top = _table[i - 1][j] + -1; @@ -544,6 +550,10 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { } } + if (maxScore <= 1) { + return undefined; + } + if (_debug) { console.log(printTable(_table, pattern, patternLen, word, wordLen)); console.log(printTable(_arrows, pattern, patternLen, word, wordLen)); diff --git a/src/vs/base/test/common/filters.test.ts b/src/vs/base/test/common/filters.test.ts index 3e9c41b735c75..1e9a6a1e713ce 100644 --- a/src/vs/base/test/common/filters.test.ts +++ b/src/vs/base/test/common/filters.test.ts @@ -305,6 +305,21 @@ suite('Filters', () => { ); }); + test('fuzzyScore, issue #26423', function () { + assertMatches( + 'fsfsfs', + 'dsafdsafdsafdsafdsafdsafdsafasdfdsa', + undefined, + fuzzyScore + ); + assertMatches( + 'fsfsfsfsfsfsfsf', + 'dsafdsafdsafdsafdsafdsafdsafasdfdsafdsafdsafdsafdsfdsafdsfdfdfasdnfdsajfndsjnafjndsajlknfdsa', + undefined, + fuzzyScore + ); + }); + function assertTopScore(filter: typeof fuzzyScore, pattern: string, expected: number, ...words: string[]) { let topScore = -(100 * 10); let topIdx = 0; From 0977de9948e99e5949030e9de40fb4fd68bb4924 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 12 May 2017 16:48:00 +0200 Subject: [PATCH 0497/2747] [php] update php grammar --- extensions/php/syntaxes/php.tmLanguage.json | 851 ++++++++++++------ .../php/test/colorize-results/test_php.json | 30 +- extensions/theme-defaults/themes/dark_vs.json | 4 +- .../theme-defaults/themes/light_vs.json | 4 +- 4 files changed, 618 insertions(+), 271 deletions(-) diff --git a/extensions/php/syntaxes/php.tmLanguage.json b/extensions/php/syntaxes/php.tmLanguage.json index 9586638c4d2f7..36af0819d4067 100644 --- a/extensions/php/syntaxes/php.tmLanguage.json +++ b/extensions/php/syntaxes/php.tmLanguage.json @@ -40,14 +40,14 @@ "begin": "<\\?(?i:php|=)?", "beginCaptures": { "0": { - "name": "punctuation.section.embedded.begin.metatag.php" + "name": "punctuation.section.embedded.begin.php" } }, "contentName": "source.php", "end": "(\\?)>", "endCaptures": { "0": { - "name": "punctuation.section.embedded.end.metatag.php" + "name": "punctuation.section.embedded.end.php" }, "1": { "name": "source.php" @@ -66,14 +66,14 @@ "begin": "<\\?(?i:php|=)?(?![^?]*\\?>)", "beginCaptures": { "0": { - "name": "punctuation.section.embedded.begin.metatag.php" + "name": "punctuation.section.embedded.begin.php" } }, "contentName": "source.php", "end": "(\\?)>", "endCaptures": { "0": { - "name": "punctuation.section.embedded.end.metatag.php" + "name": "punctuation.section.embedded.end.php" }, "1": { "name": "source.php" @@ -90,13 +90,13 @@ "begin": "<\\?(?i:php|=)?", "beginCaptures": { "0": { - "name": "punctuation.section.embedded.begin.metatag.php" + "name": "punctuation.section.embedded.begin.php" } }, "end": ">", "endCaptures": { "0": { - "name": "punctuation.section.embedded.end.metatag.php" + "name": "punctuation.section.embedded.end.php" } }, "name": "meta.embedded.line.php", @@ -107,7 +107,7 @@ "name": "source.php" }, "2": { - "name": "punctuation.section.embedded.end.metatag.php" + "name": "punctuation.section.embedded.end.php" }, "3": { "name": "source.php" @@ -122,7 +122,7 @@ "end": "(\\?)(?=>)", "endCaptures": { "0": { - "name": "punctuation.section.embedded.end.metatag.php" + "name": "punctuation.section.embedded.end.php" }, "1": { "name": "source.php" @@ -196,14 +196,18 @@ "comments": { "patterns": [ { - "begin": "/\\*\\*(?:#@\\+)?\\s*$", - "captures": { + "begin": "/\\*\\*(?=\\s)", + "beginCaptures": { "0": { "name": "punctuation.definition.comment.php" } }, - "comment": "This now only highlights a docblock if the first line contains only /**\n\t\t\t\t\t\t\t\t- this is to stop highlighting everything as invalid when people do comment banners with /******** ...\n\t\t\t\t\t\t\t\t- Now matches /**#@+ too - used for docblock templates: http://manual.phpdoc.org/HTMLframesConverter/default/phpDocumentor/tutorial_phpDocumentor.howto.pkg.html#basics.docblocktemplate", "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.php" + } + }, "name": "comment.block.documentation.phpdoc.php", "patterns": [ { @@ -222,7 +226,7 @@ "name": "comment.block.php" }, { - "begin": "(^[ \\t]+)?(?=//)", + "begin": "(^\\s+)?(?=//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.php" @@ -243,7 +247,7 @@ ] }, { - "begin": "(^[ \\t]+)?(?=#)", + "begin": "(^\\s+)?(?=#)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.php" @@ -559,15 +563,6 @@ { "begin": "(?=<<<\\s*(\"?)([a-zA-Z_]+[a-zA-Z0-9_]*)(\\1)\\s*$)", "end": "(?!\\G)", - "injections": { - "*": { - "patterns": [ - { - "include": "#interpolation" - } - ] - } - }, "name": "string.unquoted.heredoc.php", "patterns": [ { @@ -576,298 +571,650 @@ ] }, { - "begin": "(?=<<<\\s*('?)([a-zA-Z_]+[a-zA-Z0-9_]*)(\\1)\\s*$)", + "begin": "(?=<<<\\s*'([a-zA-Z_]+[a-zA-Z0-9_]*)'\\s*$)", "end": "(?!\\G)", - "name": "string.unquoted.heredoc.nowdoc.php", + "name": "string.unquoted.nowdoc.php", "patterns": [ { - "include": "#heredoc_interior" + "include": "#nowdoc_interior" } ] } - ], - "repository": { - "heredoc_interior": { + ] + }, + "heredoc_interior": { + "patterns": [ + { + "begin": "(<<<)\\s*(\"?)(HTML)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.html", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.html", "patterns": [ { - "begin": "(<<<)\\s*(['\"]?)(HTML)(\\2)\\s*$\\n?", - "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.php" - }, - "1": { - "name": "punctuation.definition.string.php" - }, - "3": { - "name": "keyword.operator.heredoc.php" - } - }, - "contentName": "text.html", - "end": "^(\\3)\\b", - "endCaptures": { - "0": { - "name": "punctuation.section.embedded.end.php" - }, - "1": { - "name": "keyword.operator.heredoc.php" - } - }, - "name": "meta.embedded.html", - "patterns": [ - { - "include": "text.html.basic" - } - ] + "include": "#interpolation" }, { - "begin": "(<<<)\\s*(['\"]?)(XML)(\\2)\\s*$\\n?", - "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.php" - }, - "1": { - "name": "punctuation.definition.string.php" - }, - "3": { - "name": "keyword.operator.heredoc.php" - } - }, - "contentName": "text.xml", - "end": "^(\\3)\\b", - "endCaptures": { - "0": { - "name": "punctuation.section.embedded.end.php" - }, - "1": { - "name": "keyword.operator.heredoc.php" - } - }, - "name": "meta.embedded.xml", - "patterns": [ - { - "include": "text.xml" - } - ] + "include": "text.html.basic" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(XML)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.xml", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.xml", + "patterns": [ + { + "include": "#interpolation" }, { - "begin": "(<<<)\\s*(['\"]?)(SQL)(\\2)\\s*$\\n?", - "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.php" - }, + "include": "text.xml" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(SQL)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.sql", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.sql", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "source.sql" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(JAVASCRIPT|JS)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.js", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.js", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "source.js" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(JSON)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.json", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.json", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "source.json" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(CSS)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.css", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "name": "meta.embedded.css", + "patterns": [ + { + "include": "#interpolation" + }, + { + "include": "source.css" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)(REGEXP?)(\\2)(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" + }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "string.regexp.heredoc.php", + "end": "^(\\3)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "patterns": [ + { + "include": "#interpolation" + }, + { + "comment": "Escaped from the regexp – there can also be 2 backslashes (since 1 will escape the first)", + "match": "(\\\\){1,2}[.$^\\[\\]{}]", + "name": "constant.character.escape.regex.php" + }, + { + "captures": { "1": { - "name": "punctuation.definition.string.php" + "name": "punctuation.definition.arbitrary-repitition.php" }, "3": { - "name": "keyword.operator.heredoc.php" + "name": "punctuation.definition.arbitrary-repitition.php" } }, - "contentName": "source.sql", - "end": "^(\\3)\\b", - "endCaptures": { + "match": "(\\{)\\d+(,\\d+)?(\\})", + "name": "string.regexp.arbitrary-repitition.php" + }, + { + "begin": "\\[(?:\\^?\\])?", + "captures": { "0": { - "name": "punctuation.section.embedded.end.php" - }, - "1": { - "name": "keyword.operator.heredoc.php" + "name": "punctuation.definition.character-class.php" } }, - "name": "meta.embedded.sql", + "end": "\\]", + "name": "string.regexp.character-class.php", "patterns": [ { - "include": "source.sql" + "match": "\\\\[\\\\'\\[\\]]", + "name": "constant.character.escape.php" } ] }, { - "begin": "(<<<)\\s*(['\"]?)(JAVASCRIPT)(\\2)\\s*$\\n?", + "match": "[$^+*]", + "name": "keyword.operator.regexp.php" + }, + { + "begin": "(?<=^|\\s)(#)\\s(?=[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$)", "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.php" - }, "1": { - "name": "punctuation.definition.string.php" - }, - "3": { - "name": "keyword.operator.heredoc.php" + "name": "punctuation.definition.comment.php" } }, - "contentName": "source.js", - "end": "^(\\3)\\b", + "comment": "We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.", + "end": "$\\n?", "endCaptures": { "0": { - "name": "punctuation.section.embedded.end.php" - }, - "1": { - "name": "keyword.operator.heredoc.php" + "name": "punctuation.definition.comment.php" } }, - "name": "meta.embedded.js", - "patterns": [ - { - "include": "source.js" - } - ] + "name": "comment.line.number-sign.php" + } + ] + }, + { + "begin": "(<<<)\\s*(\"?)([a-zA-Z_]+[a-zA-Z0-9_]*)(\\2)(\\s*)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.php" + }, + "3": { + "name": "keyword.operator.heredoc.php" }, + "5": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "end": "^(\\3)\\b", + "endCaptures": { + "1": { + "name": "keyword.operator.heredoc.php" + } + }, + "patterns": [ { - "begin": "(<<<)\\s*(['\"]?)(JSON)(\\2)\\s*$\\n?", - "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.php" - }, - "1": { - "name": "punctuation.definition.string.php" - }, - "3": { - "name": "keyword.operator.heredoc.php" - } - }, - "contentName": "source.json", - "end": "^(\\3)\\b", - "endCaptures": { - "0": { - "name": "punctuation.section.embedded.end.php" - }, - "1": { - "name": "keyword.operator.heredoc.php" - } - }, - "name": "meta.embedded.json", - "patterns": [ - { - "include": "source.json" - } - ] + "include": "#interpolation" + } + ] + } + ] + }, + "nowdoc_interior": { + "patterns": [ + { + "begin": "(<<<)\\s*'(HTML)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.html", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.html", + "patterns": [ { - "begin": "(<<<)\\s*(['\"]?)(CSS)(\\2)\\s*$\\n?", - "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.php" - }, - "1": { - "name": "punctuation.definition.string.php" - }, - "3": { - "name": "keyword.operator.heredoc.php" - } - }, - "contentName": "source.css", - "end": "^(\\3)\\b", - "endCaptures": { - "0": { - "name": "punctuation.section.embedded.end.php" - }, - "1": { - "name": "keyword.operator.heredoc.php" - } - }, - "name": "meta.embedded.css", - "patterns": [ - { - "include": "source.css" - } - ] + "include": "text.html.basic" + } + ] + }, + { + "begin": "(<<<)\\s*'(XML)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "text.xml", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.xml", + "patterns": [ { - "begin": "(<<<)\\s*(['\"]?)(REGEX)(\\2)\\s*$\\n?", - "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.php" - }, + "include": "text.xml" + } + ] + }, + { + "begin": "(<<<)\\s*'(SQL)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.sql", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.sql", + "patterns": [ + { + "include": "source.sql" + } + ] + }, + { + "begin": "(<<<)\\s*'(JAVASCRIPT|JS)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.js", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.js", + "patterns": [ + { + "include": "source.js" + } + ] + }, + { + "begin": "(<<<)\\s*'(JSON)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.json", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.json", + "patterns": [ + { + "include": "source.json" + } + ] + }, + { + "begin": "(<<<)\\s*'(CSS)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "source.css", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "name": "meta.embedded.css", + "patterns": [ + { + "include": "source.css" + } + ] + }, + { + "begin": "(<<<)\\s*'(REGEXP?)'(\\s*)$", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.php" + }, + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "contentName": "string.regexp.nowdoc.php", + "end": "^(\\2)\\b", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.php" + }, + "1": { + "name": "keyword.operator.nowdoc.php" + } + }, + "patterns": [ + { + "comment": "Escaped from the regexp – there can also be 2 backslashes (since 1 will escape the first)", + "match": "(\\\\){1,2}[.$^\\[\\]{}]", + "name": "constant.character.escape.regex.php" + }, + { + "captures": { "1": { - "name": "punctuation.definition.string.php" + "name": "punctuation.definition.arbitrary-repitition.php" }, "3": { - "name": "keyword.operator.heredoc.php" + "name": "punctuation.definition.arbitrary-repitition.php" } }, - "contentName": "string.regexp.heredoc.php", - "end": "^(\\3)\\b", - "endCaptures": { + "match": "(\\{)\\d+(,\\d+)?(\\})", + "name": "string.regexp.arbitrary-repitition.php" + }, + { + "begin": "\\[(?:\\^?\\])?", + "captures": { "0": { - "name": "punctuation.section.embedded.end.php" - }, - "1": { - "name": "keyword.operator.heredoc.php" + "name": "punctuation.definition.character-class.php" } }, + "end": "\\]", + "name": "string.regexp.character-class.php", "patterns": [ { - "comment": "Escaped from the regexp – there can also be 2 backslashes (since 1 will escape the first)", - "match": "(\\\\){1,2}[.$^\\[\\]{}]", - "name": "constant.character.escape.regex.php" - }, - { - "captures": { - "1": { - "name": "punctuation.definition.arbitrary-repitition.php" - }, - "3": { - "name": "punctuation.definition.arbitrary-repitition.php" - } - }, - "match": "(\\{)\\d+(,\\d+)?(\\})", - "name": "string.regexp.arbitrary-repitition.php" - }, - { - "begin": "\\[(?:\\^?\\])?", - "captures": { - "0": { - "name": "punctuation.definition.character-class.php" - } - }, - "end": "\\]", - "name": "string.regexp.character-class.php", - "patterns": [ - { - "match": "\\\\[\\\\'\\[\\]]", - "name": "constant.character.escape.php" - } - ] - }, - { - "match": "[$^+*]", - "name": "keyword.operator.regexp.php" - }, - { - "begin": "(?<=^|\\s)(#)\\s(?=[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.comment.php" - } - }, - "comment": "We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.", - "end": "$\\n?", - "endCaptures": { - "0": { - "name": "punctuation.definition.comment.php" - } - }, - "name": "comment.line.number-sign.php" + "match": "\\\\[\\\\'\\[\\]]", + "name": "constant.character.escape.php" } ] }, { - "begin": "(<<<)\\s*(['\"]?)([a-zA-Z_]+[a-zA-Z0-9_]*)(\\2)", + "match": "[$^+*]", + "name": "keyword.operator.regexp.php" + }, + { + "begin": "(?<=^|\\s)(#)\\s(?=[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$)", "beginCaptures": { "1": { - "name": "punctuation.definition.string.php" - }, - "3": { - "name": "keyword.operator.heredoc.php" + "name": "punctuation.definition.comment.php" } }, - "end": "^(\\3)\\b", + "comment": "We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.", + "end": "$\\n?", "endCaptures": { - "1": { - "name": "keyword.operator.heredoc.php" + "0": { + "name": "punctuation.definition.comment.php" } - } + }, + "name": "comment.line.number-sign.php" } ] + }, + { + "begin": "(<<<)\\s*'([a-zA-Z_]+[a-zA-Z0-9_]*)'(\\s*)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.string.php" + }, + "2": { + "name": "keyword.operator.nowdoc.php" + }, + "3": { + "name": "invalid.illegal.trailing-whitespace.php" + } + }, + "end": "^(\\2)\\b", + "endCaptures": { + "1": { + "name": "keyword.operator.nowdoc.php" + } + } } - } + ] }, "instantiation": { "begin": "(?i)(new)\\s+", @@ -2628,5 +2975,5 @@ ] } }, - "version": "https://github.com/atom/language-php/commit/6c48772bfdf5ed057501952f8454900b91ff140a" + "version": "https://github.com/atom/language-php/commit/fca6a6763bd5e07b2cc0a82fda502dbf3bce5dea" } \ No newline at end of file diff --git a/extensions/php/test/colorize-results/test_php.json b/extensions/php/test/colorize-results/test_php.json index 72e7f6a86a40a..ee3715fefceb3 100644 --- a/extensions/php/test/colorize-results/test_php.json +++ b/extensions/php/test/colorize-results/test_php.json @@ -221,12 +221,12 @@ }, { "c": "", - "t": "text.html.php meta.embedded.block.php punctuation.section.embedded.end.metatag.php", + "t": "text.html.php meta.embedded.block.php punctuation.section.embedded.end.php", "r": { - "dark_plus": "punctuation.section.embedded.end.metatag.php: #569CD6", - "light_plus": "punctuation.section.embedded.end.metatag.php: #800000", - "dark_vs": "punctuation.section.embedded.end.metatag.php: #569CD6", - "light_vs": "punctuation.section.embedded.end.metatag.php: #800000", + "dark_plus": "punctuation.section.embedded.end.php: #569CD6", + "light_plus": "punctuation.section.embedded.end.php: #800000", + "dark_vs": "punctuation.section.embedded.end.php: #569CD6", + "light_vs": "punctuation.section.embedded.end.php: #800000", "hc_black": "default: #FFFFFF" } }, diff --git a/extensions/theme-defaults/themes/dark_vs.json b/extensions/theme-defaults/themes/dark_vs.json index 08b4ecfee9b61..40bcc308f280b 100644 --- a/extensions/theme-defaults/themes/dark_vs.json +++ b/extensions/theme-defaults/themes/dark_vs.json @@ -302,8 +302,8 @@ }, { "scope": [ - "punctuation.section.embedded.begin.metatag.php", - "punctuation.section.embedded.end.metatag.php" + "punctuation.section.embedded.begin.php", + "punctuation.section.embedded.end.php" ], "settings": { "foreground": "#569cd6" diff --git a/extensions/theme-defaults/themes/light_vs.json b/extensions/theme-defaults/themes/light_vs.json index b97b25eecd879..8d5fabb13a3c3 100644 --- a/extensions/theme-defaults/themes/light_vs.json +++ b/extensions/theme-defaults/themes/light_vs.json @@ -318,8 +318,8 @@ }, { "scope": [ - "punctuation.section.embedded.begin.metatag.php", - "punctuation.section.embedded.end.metatag.php" + "punctuation.section.embedded.begin.php", + "punctuation.section.embedded.end.php" ], "settings": { "foreground": "#800000" From 2787e333385a2798082bbe0256c06bd8f7e622f3 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 12 May 2017 17:03:25 +0200 Subject: [PATCH 0498/2747] #16580 Show open settings only for appropriate errors - File dirty - Errors in file --- .../electron-browser/themes.contribution.ts | 1 - .../node/configurationEditingService.ts | 32 +++++++++++++------ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts b/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts index 8ae5925e78b3c..9724e10c4aedd 100644 --- a/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts +++ b/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts @@ -65,7 +65,6 @@ export class SelectColorThemeAction extends Action { this.themeService.setColorTheme(theme.id, target).done(null, err => { - this.messageService.show(Severity.Info, localize('problemChangingTheme', "Problem setting theme: {0}", err)); this.themeService.setColorTheme(currentTheme.id, null); } ); diff --git a/src/vs/workbench/services/configuration/node/configurationEditingService.ts b/src/vs/workbench/services/configuration/node/configurationEditingService.ts index 022f5fb02262f..cbafdb6f2fce1 100644 --- a/src/vs/workbench/services/configuration/node/configurationEditingService.ts +++ b/src/vs/workbench/services/configuration/node/configurationEditingService.ts @@ -29,7 +29,7 @@ import { IFileService } from 'vs/platform/files/common/files'; import { IConfigurationEditingService, ConfigurationEditingErrorCode, IConfigurationEditingError, ConfigurationTarget, IConfigurationValue } from 'vs/workbench/services/configuration/common/configurationEditing'; import { ITextModelResolverService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { OVERRIDE_PROPERTY_PATTERN } from 'vs/platform/configuration/common/configurationRegistry'; -import { IChoiceService, Severity } from 'vs/platform/message/common/message'; +import { IChoiceService, IMessageService, Severity } from 'vs/platform/message/common/message'; import { ICommandService } from 'vs/platform/commands/common/commands'; interface IConfigurationEditOperation extends IConfigurationValue { @@ -56,6 +56,7 @@ export class ConfigurationEditingService implements IConfigurationEditingService @ITextModelResolverService private textModelResolverService: ITextModelResolverService, @ITextFileService private textFileService: ITextFileService, @IChoiceService private choiceService: IChoiceService, + @IMessageService private messageService: IMessageService, @ICommandService private commandService: ICommandService ) { this.queue = new Queue(); @@ -97,16 +98,27 @@ export class ConfigurationEditingService implements IConfigurationEditingService } private onError(error: IConfigurationEditingError, target: ConfigurationTarget): TPromise { - this.choiceService.choose(Severity.Error, error.message, [nls.localize('open', "Open Settings"), nls.localize('close', "Close")], 1) - .then(value => { - switch (value) { - case 0: - this.commandService.executeCommand(ConfigurationTarget.USER === target ? 'workbench.action.openGlobalSettings' : 'workbench.action.openWorkspaceSettings'); - } - }); + switch (error.code) { + case ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION: + case ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_DIRTY: + this.choiceService.choose(Severity.Error, error.message, [nls.localize('open', "Open Settings"), nls.localize('close', "Close")], 1) + .then(option => { + switch (option) { + case 0: + this.openSettings(target); + } + }); + break; + default: + this.messageService.show(Severity.Error, error.message); + } return TPromise.wrapError(error); } + private openSettings(target: ConfigurationTarget): void { + this.commandService.executeCommand(ConfigurationTarget.USER === target ? 'workbench.action.openGlobalSettings' : 'workbench.action.openWorkspaceSettings'); + } + private wrapError(code: ConfigurationEditingErrorCode, target: ConfigurationTarget): TPromise { const message = this.toErrorMessage(code, target); @@ -180,7 +192,7 @@ export class ConfigurationEditingService implements IConfigurationEditingService return parseErrors.length > 0; } - private resolveAndValidate(target: ConfigurationTarget, operation: IConfigurationEditOperation, save: boolean): TPromise> { + private resolveAndValidate(target: ConfigurationTarget, operation: IConfigurationEditOperation, checkDirty: boolean): TPromise> { // Any key must be a known setting from the registry (unless this is a standalone config) if (!operation.isWorkspaceStandalone) { @@ -202,7 +214,7 @@ export class ConfigurationEditingService implements IConfigurationEditingService // Target cannot be dirty if not writing into buffer const resource = operation.resource; - if (save && this.textFileService.isDirty(resource)) { + if (checkDirty && this.textFileService.isDirty(resource)) { return this.wrapError(ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_DIRTY, target); } From 8c7a5a4564ff5209bb3a7886664e62eff9038c56 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 12 May 2017 17:13:15 +0200 Subject: [PATCH 0499/2747] #16580 fix tests --- .../test/node/configurationEditingService.test.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts index 8e0131f17a45a..3a53e2a1de27f 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts @@ -42,7 +42,7 @@ import { IModeService } from 'vs/editor/common/services/modeService'; import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl'; import { IModelService } from 'vs/editor/common/services/modelService'; import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl'; - +import { IChoiceService, IMessageService } from 'vs/platform/message/common/message'; class SettingsTestEnvironmentService extends EnvironmentService { @@ -126,6 +126,14 @@ suite('ConfigurationEditingService', () => { instantiationService.stub(ITextFileService, instantiationService.createInstance(TestTextFileService)); instantiationService.stub(ITextModelResolverService, instantiationService.createInstance(TextModelResolverService)); instantiationService.stub(IBackupFileService, new TestBackupFileService()); + instantiationService.stub(IChoiceService, { + choose: (severity, message, options, cancelId): TPromise => { + return TPromise.as(cancelId); + } + }); + instantiationService.stub(IMessageService, { + show: (severity, message, options, cancelId): void => { } + }); testObject = instantiationService.createInstance(ConfigurationEditingService); return configurationService.initialize(); From 2d6f1fd24b425be83c87f62dddf2efbe73ee84f1 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 12 May 2017 17:17:30 +0200 Subject: [PATCH 0500/2747] tfs: linux build exec bit --- build/tfs/linux/build-x64.sh | 0 build/tfs/linux/build.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 build/tfs/linux/build-x64.sh mode change 100644 => 100755 build/tfs/linux/build.sh diff --git a/build/tfs/linux/build-x64.sh b/build/tfs/linux/build-x64.sh old mode 100644 new mode 100755 diff --git a/build/tfs/linux/build.sh b/build/tfs/linux/build.sh old mode 100644 new mode 100755 From 414a28c19c005e4666cec3f92313e27a350a095d Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 12 May 2017 17:43:35 +0200 Subject: [PATCH 0501/2747] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9ed66ec3a04a2..e2494bd6b0d0b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev", "version": "1.13.0", "electronVersion": "1.6.6", - "distro": "e040c79dac021045cd488b8192515113014d67d4", + "distro": "299457aa71fc00d449a7d85f18289203a14065ef", "author": { "name": "Microsoft Corporation" }, From 5f7b56d27cf3c93361d258cc04582f49a6cbed24 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 12 May 2017 18:03:53 +0200 Subject: [PATCH 0502/2747] move emmet to electron-browser, make it use new controller --- .../editor/contrib/snippet/common/snippet.ts | 62 ++++++++++++++++++- .../contrib/snippet/common/snippetParser.ts | 7 --- .../electron-browser/workbench.main.ts | 2 +- .../actions/balance.ts | 2 +- .../actions/base64.ts | 2 +- .../actions/editPoints.ts | 2 +- .../actions/evaluateMath.ts | 2 +- .../actions/expandAbbreviation.ts | 2 +- .../actions/incrementDecrement.ts | 2 +- .../actions/matchingPair.ts | 2 +- .../actions/mergeLines.ts | 2 +- .../actions/reflectCssValue.ts | 2 +- .../actions/removeTag.ts | 2 +- .../actions/selectItem.ts | 2 +- .../actions/splitJoinTag.ts | 2 +- .../actions/toggleComment.ts | 2 +- .../actions/updateImageSize.ts | 2 +- .../actions/updateTag.ts | 2 +- .../actions/wrapWithAbbreviation.ts | 2 +- .../editorAccessor.ts | 13 +++- .../emmet.contribution.ts | 0 .../{node => electron-browser}/emmet.d.ts | 0 .../emmetActions.ts | 2 +- .../editorAccessor.test.ts | 2 +- 24 files changed, 90 insertions(+), 30 deletions(-) rename src/vs/workbench/parts/emmet/{node => electron-browser}/actions/balance.ts (96%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/actions/base64.ts (98%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/actions/editPoints.ts (97%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/actions/evaluateMath.ts (96%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/actions/expandAbbreviation.ts (98%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/actions/incrementDecrement.ts (98%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/actions/matchingPair.ts (96%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/actions/mergeLines.ts (95%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/actions/reflectCssValue.ts (96%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/actions/removeTag.ts (95%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/actions/selectItem.ts (97%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/actions/splitJoinTag.ts (95%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/actions/toggleComment.ts (96%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/actions/updateImageSize.ts (96%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/actions/updateTag.ts (97%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/actions/wrapWithAbbreviation.ts (97%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/editorAccessor.ts (95%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/emmet.contribution.ts (100%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/emmet.d.ts (100%) rename src/vs/workbench/parts/emmet/{node => electron-browser}/emmetActions.ts (99%) rename src/vs/workbench/parts/emmet/test/{node => electron-browser}/editorAccessor.test.ts (98%) diff --git a/src/vs/editor/contrib/snippet/common/snippet.ts b/src/vs/editor/contrib/snippet/common/snippet.ts index b9049993493d9..84c1b1490ef4a 100644 --- a/src/vs/editor/contrib/snippet/common/snippet.ts +++ b/src/vs/editor/contrib/snippet/common/snippet.ts @@ -7,7 +7,7 @@ import * as strings from 'vs/base/common/strings'; import { Range } from 'vs/editor/common/core/range'; -import { Marker, Variable, Placeholder, Text, SnippetParser } from 'vs/editor/contrib/snippet/common/snippetParser'; +import { Marker, Variable, Placeholder, Text, SnippetParser, walk } from 'vs/editor/contrib/snippet/common/snippetParser'; export interface IIndentationNormalizer { normalizeIndentation(str: string): string; @@ -52,7 +52,67 @@ export class CodeSnippet implements ICodeSnippet { return snippet; } + static fixEmmetFinalTabstop(template: string): string { + + let matchFinalStops = template.match(/\$\{0\}|\$0/g); + if (!matchFinalStops || matchFinalStops.length === 1) { + return template; + } + + // string to string conversion that tries to fix the + // snippet in-place + + let marker = new SnippetParser(true, false).parse(template); + let maxIndex = -Number.MIN_VALUE; + + // find highest placeholder index + walk(marker, candidate => { + if (candidate instanceof Placeholder) { + let index = Number(candidate.index); + if (index > maxIndex) { + maxIndex = index; + } + } + return true; + }); + + // rewrite final tabstops + walk(marker, candidate => { + if (candidate instanceof Placeholder) { + if (candidate.isFinalTabstop) { + candidate.index = String(++maxIndex); + } + } + return true; + }); + + // write back as string + function toSnippetString(marker: Marker): string { + if (marker instanceof Text) { + return marker.string; + } else if (marker instanceof Placeholder) { + if (marker.defaultValue.length > 0) { + return `\${${marker.index}:${marker.defaultValue.map(toSnippetString).join('')}}`; + } else { + return `\$${marker.index}`; + } + } else if (marker instanceof Variable) { + if (marker.defaultValue.length > 0) { + return `\${${marker.name}:${marker.defaultValue.map(toSnippetString).join('')}}`; + } else { + return `\$${marker.name}`; + } + } else { + throw new Error('unexpected marker: ' + marker); + } + } + return marker.map(toSnippetString).join(''); + } + static fromEmmet(template: string): CodeSnippet { + + CodeSnippet.fixEmmetFinalTabstop(template); + let matchFinalStops = template.match(/\$\{0\}|\$0/g); if (!matchFinalStops || matchFinalStops.length === 1) { return CodeSnippet.fromTextmate(template); diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/common/snippetParser.ts index ac384b0106e1c..0506b2b187b57 100644 --- a/src/vs/editor/contrib/snippet/common/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/common/snippetParser.ts @@ -156,13 +156,6 @@ export class Text extends Marker { len(): number { return this.string.length; } - with(string: string): Text { - if (this.string !== string) { - return new Text(string); - } else { - return this; - } - } } export class Placeholder extends Marker { diff --git a/src/vs/workbench/electron-browser/workbench.main.ts b/src/vs/workbench/electron-browser/workbench.main.ts index 59d932b5644b8..d0d2f6888e956 100644 --- a/src/vs/workbench/electron-browser/workbench.main.ts +++ b/src/vs/workbench/electron-browser/workbench.main.ts @@ -81,7 +81,7 @@ import 'vs/workbench/parts/relauncher/electron-browser/relauncher.contribution'; import 'vs/workbench/parts/tasks/electron-browser/task.contribution'; import 'vs/workbench/parts/emmet/browser/emmet.browser.contribution'; -import 'vs/workbench/parts/emmet/node/emmet.contribution'; +import 'vs/workbench/parts/emmet/electron-browser/emmet.contribution'; // Code Editor enhacements import 'vs/workbench/parts/codeEditor/codeEditor.contribution'; diff --git a/src/vs/workbench/parts/emmet/node/actions/balance.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/balance.ts similarity index 96% rename from src/vs/workbench/parts/emmet/node/actions/balance.ts rename to src/vs/workbench/parts/emmet/electron-browser/actions/balance.ts index 73e410694a34f..10f58a6a5c229 100644 --- a/src/vs/workbench/parts/emmet/node/actions/balance.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/balance.ts @@ -6,7 +6,7 @@ 'use strict'; import nls = require('vs/nls'); -import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/node/emmetActions'; +import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/electron-browser/emmetActions'; import { editorAction } from 'vs/editor/common/editorCommonExtensions'; diff --git a/src/vs/workbench/parts/emmet/node/actions/base64.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/base64.ts similarity index 98% rename from src/vs/workbench/parts/emmet/node/actions/base64.ts rename to src/vs/workbench/parts/emmet/electron-browser/actions/base64.ts index 5aef2083c34b1..2cf45dbd7f7d6 100644 --- a/src/vs/workbench/parts/emmet/node/actions/base64.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/base64.ts @@ -11,7 +11,7 @@ import { fileExists } from 'vs/base/node/pfs'; import fs = require('fs'); import { dirname, join, normalize, isValidBasename } from 'vs/base/common/paths'; -import { EmmetEditorAction, EmmetActionContext } from 'vs/workbench/parts/emmet/node/emmetActions'; +import { EmmetEditorAction, EmmetActionContext } from 'vs/workbench/parts/emmet/electron-browser/emmetActions'; import { Action } from 'vs/base/common/actions'; import { ServicesAccessor, editorAction } from 'vs/editor/common/editorCommonExtensions'; diff --git a/src/vs/workbench/parts/emmet/node/actions/editPoints.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.ts similarity index 97% rename from src/vs/workbench/parts/emmet/node/actions/editPoints.ts rename to src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.ts index aa89a2d9d7a8a..d74d9e327718d 100644 --- a/src/vs/workbench/parts/emmet/node/actions/editPoints.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.ts @@ -6,7 +6,7 @@ 'use strict'; import nls = require('vs/nls'); -import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/node/emmetActions'; +import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/electron-browser/emmetActions'; import { editorAction } from 'vs/editor/common/editorCommonExtensions'; diff --git a/src/vs/workbench/parts/emmet/node/actions/evaluateMath.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.ts similarity index 96% rename from src/vs/workbench/parts/emmet/node/actions/evaluateMath.ts rename to src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.ts index df8a9de1bc322..5eb52a5b5c18a 100644 --- a/src/vs/workbench/parts/emmet/node/actions/evaluateMath.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.ts @@ -6,7 +6,7 @@ 'use strict'; import nls = require('vs/nls'); -import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/node/emmetActions'; +import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/electron-browser/emmetActions'; import { editorAction } from 'vs/editor/common/editorCommonExtensions'; diff --git a/src/vs/workbench/parts/emmet/node/actions/expandAbbreviation.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts similarity index 98% rename from src/vs/workbench/parts/emmet/node/actions/expandAbbreviation.ts rename to src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts index 75f7ae270f3ae..85f464b2865b6 100644 --- a/src/vs/workbench/parts/emmet/node/actions/expandAbbreviation.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts @@ -6,7 +6,7 @@ 'use strict'; import nls = require('vs/nls'); -import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/node/emmetActions'; +import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/electron-browser/emmetActions'; import { editorAction } from 'vs/editor/common/editorCommonExtensions'; import { Handler, ICommonCodeEditor } from 'vs/editor/common/editorCommon'; diff --git a/src/vs/workbench/parts/emmet/node/actions/incrementDecrement.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.ts similarity index 98% rename from src/vs/workbench/parts/emmet/node/actions/incrementDecrement.ts rename to src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.ts index 44db17292f1be..527820f3126e0 100644 --- a/src/vs/workbench/parts/emmet/node/actions/incrementDecrement.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.ts @@ -6,7 +6,7 @@ 'use strict'; import nls = require('vs/nls'); -import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/node/emmetActions'; +import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/electron-browser/emmetActions'; import { editorAction } from 'vs/editor/common/editorCommonExtensions'; diff --git a/src/vs/workbench/parts/emmet/node/actions/matchingPair.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.ts similarity index 96% rename from src/vs/workbench/parts/emmet/node/actions/matchingPair.ts rename to src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.ts index 707709b439a33..4dea6318bd2f5 100644 --- a/src/vs/workbench/parts/emmet/node/actions/matchingPair.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.ts @@ -6,7 +6,7 @@ 'use strict'; import nls = require('vs/nls'); -import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/node/emmetActions'; +import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/electron-browser/emmetActions'; import { editorAction } from 'vs/editor/common/editorCommonExtensions'; diff --git a/src/vs/workbench/parts/emmet/node/actions/mergeLines.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.ts similarity index 95% rename from src/vs/workbench/parts/emmet/node/actions/mergeLines.ts rename to src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.ts index e90f53a5bb825..9333f8b8053e0 100644 --- a/src/vs/workbench/parts/emmet/node/actions/mergeLines.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.ts @@ -6,7 +6,7 @@ 'use strict'; import nls = require('vs/nls'); -import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/node/emmetActions'; +import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/electron-browser/emmetActions'; import { editorAction } from 'vs/editor/common/editorCommonExtensions'; diff --git a/src/vs/workbench/parts/emmet/node/actions/reflectCssValue.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.ts similarity index 96% rename from src/vs/workbench/parts/emmet/node/actions/reflectCssValue.ts rename to src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.ts index 8683775c625c2..405a3585fd855 100644 --- a/src/vs/workbench/parts/emmet/node/actions/reflectCssValue.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.ts @@ -6,7 +6,7 @@ 'use strict'; import nls = require('vs/nls'); -import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/node/emmetActions'; +import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/electron-browser/emmetActions'; import { editorAction } from 'vs/editor/common/editorCommonExtensions'; diff --git a/src/vs/workbench/parts/emmet/node/actions/removeTag.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.ts similarity index 95% rename from src/vs/workbench/parts/emmet/node/actions/removeTag.ts rename to src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.ts index b24c78755bd1e..076be1ef8df24 100644 --- a/src/vs/workbench/parts/emmet/node/actions/removeTag.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.ts @@ -6,7 +6,7 @@ 'use strict'; import nls = require('vs/nls'); -import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/node/emmetActions'; +import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/electron-browser/emmetActions'; import { editorAction } from 'vs/editor/common/editorCommonExtensions'; diff --git a/src/vs/workbench/parts/emmet/node/actions/selectItem.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.ts similarity index 97% rename from src/vs/workbench/parts/emmet/node/actions/selectItem.ts rename to src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.ts index b22d4f4765ce6..f301c1a6e3a27 100644 --- a/src/vs/workbench/parts/emmet/node/actions/selectItem.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.ts @@ -6,7 +6,7 @@ 'use strict'; import nls = require('vs/nls'); -import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/node/emmetActions'; +import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/electron-browser/emmetActions'; import { editorAction } from 'vs/editor/common/editorCommonExtensions'; diff --git a/src/vs/workbench/parts/emmet/node/actions/splitJoinTag.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.ts similarity index 95% rename from src/vs/workbench/parts/emmet/node/actions/splitJoinTag.ts rename to src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.ts index eb0a7115473ca..b26d13b1c0380 100644 --- a/src/vs/workbench/parts/emmet/node/actions/splitJoinTag.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.ts @@ -6,7 +6,7 @@ 'use strict'; import nls = require('vs/nls'); -import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/node/emmetActions'; +import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/electron-browser/emmetActions'; import { editorAction } from 'vs/editor/common/editorCommonExtensions'; diff --git a/src/vs/workbench/parts/emmet/node/actions/toggleComment.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.ts similarity index 96% rename from src/vs/workbench/parts/emmet/node/actions/toggleComment.ts rename to src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.ts index 4d7f164cecbcd..4eb599b30ff4e 100644 --- a/src/vs/workbench/parts/emmet/node/actions/toggleComment.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.ts @@ -6,7 +6,7 @@ 'use strict'; import nls = require('vs/nls'); -import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/node/emmetActions'; +import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/electron-browser/emmetActions'; import { editorAction } from 'vs/editor/common/editorCommonExtensions'; diff --git a/src/vs/workbench/parts/emmet/node/actions/updateImageSize.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.ts similarity index 96% rename from src/vs/workbench/parts/emmet/node/actions/updateImageSize.ts rename to src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.ts index 1583dae99a38a..c165ff518ab8c 100644 --- a/src/vs/workbench/parts/emmet/node/actions/updateImageSize.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.ts @@ -6,7 +6,7 @@ 'use strict'; import nls = require('vs/nls'); -import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/node/emmetActions'; +import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/electron-browser/emmetActions'; import { editorAction } from 'vs/editor/common/editorCommonExtensions'; diff --git a/src/vs/workbench/parts/emmet/node/actions/updateTag.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.ts similarity index 97% rename from src/vs/workbench/parts/emmet/node/actions/updateTag.ts rename to src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.ts index 463d711f4f050..914f3bd64e236 100644 --- a/src/vs/workbench/parts/emmet/node/actions/updateTag.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.ts @@ -6,7 +6,7 @@ 'use strict'; import nls = require('vs/nls'); -import { EmmetEditorAction, EmmetActionContext } from 'vs/workbench/parts/emmet/node/emmetActions'; +import { EmmetEditorAction, EmmetActionContext } from 'vs/workbench/parts/emmet/electron-browser/emmetActions'; import { ServicesAccessor, editorAction } from 'vs/editor/common/editorCommonExtensions'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; diff --git a/src/vs/workbench/parts/emmet/node/actions/wrapWithAbbreviation.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.ts similarity index 97% rename from src/vs/workbench/parts/emmet/node/actions/wrapWithAbbreviation.ts rename to src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.ts index 16e571f45ed96..ab7d540a33147 100644 --- a/src/vs/workbench/parts/emmet/node/actions/wrapWithAbbreviation.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.ts @@ -6,7 +6,7 @@ 'use strict'; import nls = require('vs/nls'); -import { EmmetEditorAction, EmmetActionContext } from 'vs/workbench/parts/emmet/node/emmetActions'; +import { EmmetEditorAction, EmmetActionContext } from 'vs/workbench/parts/emmet/electron-browser/emmetActions'; import { ServicesAccessor, editorAction } from 'vs/editor/common/editorCommonExtensions'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; diff --git a/src/vs/workbench/parts/emmet/node/editorAccessor.ts b/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts similarity index 95% rename from src/vs/workbench/parts/emmet/node/editorAccessor.ts rename to src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts index 480bf4e8f64ac..15079c88a2c11 100644 --- a/src/vs/workbench/parts/emmet/node/editorAccessor.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts @@ -9,7 +9,7 @@ import { ICommonCodeEditor, Handler } from 'vs/editor/common/editorCommon'; import strings = require('vs/base/common/strings'); import snippets = require('vs/editor/contrib/snippet/common/snippet'); import { Range } from 'vs/editor/common/core/range'; -import { SnippetController } from 'vs/editor/contrib/snippet/common/snippetController'; +import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { LanguageId, LanguageIdentifier } from 'vs/editor/common/modes'; import { Position } from 'vs/editor/common/core/position'; @@ -92,8 +92,15 @@ export class EditorAccessor implements emmet.Editor { if (!range) { return; } - let codeSnippet = snippets.CodeSnippet.fromEmmet(value); - SnippetController.get(this._editor).runWithReplaceRange(codeSnippet, range); + + const tweakedValue = snippets.CodeSnippet.fixEmmetFinalTabstop(value); + + // let selection define the typing range + this._editor.setSelection(range); + SnippetController2.get(this._editor).insert(tweakedValue); + + // let codeSnippet = snippets.CodeSnippet.fromEmmet(value); + // SnippetController.get(this._editor).runWithReplaceRange(codeSnippet, range); } public getRangeToReplace(value: string, start: number, end: number): Range { diff --git a/src/vs/workbench/parts/emmet/node/emmet.contribution.ts b/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.ts similarity index 100% rename from src/vs/workbench/parts/emmet/node/emmet.contribution.ts rename to src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.ts diff --git a/src/vs/workbench/parts/emmet/node/emmet.d.ts b/src/vs/workbench/parts/emmet/electron-browser/emmet.d.ts similarity index 100% rename from src/vs/workbench/parts/emmet/node/emmet.d.ts rename to src/vs/workbench/parts/emmet/electron-browser/emmet.d.ts diff --git a/src/vs/workbench/parts/emmet/node/emmetActions.ts b/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts similarity index 99% rename from src/vs/workbench/parts/emmet/node/emmetActions.ts rename to src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts index 9f5b8e089b7ae..d73bc72532713 100644 --- a/src/vs/workbench/parts/emmet/node/emmetActions.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts @@ -13,7 +13,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { grammarsExtPoint, ITMSyntaxExtensionPoint } from 'vs/editor/node/textMate/TMGrammars'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { EditorAccessor, IGrammarContributions } from 'vs/workbench/parts/emmet/node/editorAccessor'; +import { EditorAccessor, IGrammarContributions } from 'vs/workbench/parts/emmet/electron-browser/editorAccessor'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IExtensionService, ExtensionPointContribution } from 'vs/platform/extensions/common/extensions'; import { IMessageService } from 'vs/platform/message/common/message'; diff --git a/src/vs/workbench/parts/emmet/test/node/editorAccessor.test.ts b/src/vs/workbench/parts/emmet/test/electron-browser/editorAccessor.test.ts similarity index 98% rename from src/vs/workbench/parts/emmet/test/node/editorAccessor.test.ts rename to src/vs/workbench/parts/emmet/test/electron-browser/editorAccessor.test.ts index 7374c917f28f8..f395f89249959 100644 --- a/src/vs/workbench/parts/emmet/test/node/editorAccessor.test.ts +++ b/src/vs/workbench/parts/emmet/test/electron-browser/editorAccessor.test.ts @@ -5,7 +5,7 @@ 'use strict'; -import { EditorAccessor, ILanguageIdentifierResolver, IGrammarContributions } from 'vs/workbench/parts/emmet/node/editorAccessor'; +import { EditorAccessor, ILanguageIdentifierResolver, IGrammarContributions } from 'vs/workbench/parts/emmet/electron-browser/editorAccessor'; import { withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; import assert = require('assert'); import { LanguageId, LanguageIdentifier } from 'vs/editor/common/modes'; From 0756b0d146639f8f8e1269745fc7742e8e36ae8b Mon Sep 17 00:00:00 2001 From: Fernando Tolentino Date: Fri, 12 May 2017 13:51:33 -0300 Subject: [PATCH 0503/2747] Intelli-sense in extensions file --- .../configuration-editing/src/extension.ts | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/extensions/configuration-editing/src/extension.ts b/extensions/configuration-editing/src/extension.ts index 30a1da21e5592..f41e74fc7356d 100644 --- a/extensions/configuration-editing/src/extension.ts +++ b/extensions/configuration-editing/src/extension.ts @@ -24,6 +24,9 @@ export function activate(context): void { //settings.json suggestions context.subscriptions.push(registerSettingsCompletions()); + //extensions.json suggestions + context.subscriptions.push(registerExtensionsCompletions()); + // launch.json decorations context.subscriptions.push(vscode.window.onDidChangeActiveTextEditor(editor => updateLaunchJsonDecorations(editor), null, context.subscriptions)); context.subscriptions.push(vscode.workspace.onDidChangeTextDocument(event => { @@ -61,11 +64,25 @@ function registerSettingsCompletions(): vscode.Disposable { }); } -function newSimpleCompletionItem(text: string, range: vscode.Range, description?: string): vscode.CompletionItem { +function registerExtensionsCompletions(): vscode.Disposable { + return vscode.languages.registerCompletionItemProvider({ pattern: '**/extensions.json' }, { + provideCompletionItems(document, position, token) { + const location = getLocation(document.getText(), document.offsetAt(position)); + const range = document.getWordRangeAtPosition(position) || new vscode.Range(position, position); + if (location.path[0] === 'recommendations') { + return vscode.extensions.all + .filter(e => !e.id.startsWith('vscode.')) + .map(e => newSimpleCompletionItem(e.id, range, undefined, '"' + e.id + '"')); + } + } + }); +} + +function newSimpleCompletionItem(text: string, range: vscode.Range, description?: string, insertText?: string): vscode.CompletionItem { const item = new vscode.CompletionItem(text); item.kind = vscode.CompletionItemKind.Value; item.detail = description; - item.insertText = text; + item.insertText = insertText || text; item.range = range; return item; From 6560c871e30438a55bd522be802a7d989db4a63e Mon Sep 17 00:00:00 2001 From: Daniel Ye Date: Fri, 12 May 2017 15:20:06 -0700 Subject: [PATCH 0504/2747] 2017-05-12. Merged in translations. --- .../chs/extensions/git/out/commands.i18n.json | 2 ++ ...rectiveCommentCompletionProvider.i18n.json | 10 ++++++++++ .../extensions/typescript/package.i18n.json | 2 +- .../base/common/jsonErrorMessages.i18n.json | 6 ++++++ .../src/vs/code/electron-main/menus.i18n.json | 1 - .../common/config/editorOptions.i18n.json | 8 ++++++++ .../common/view/editorColorRegistry.i18n.json | 4 +++- .../contrib/hover/browser/hover.i18n.json | 5 +---- .../browser/referencesWidget.i18n.json | 2 -- .../suggest/browser/suggestWidget.i18n.json | 2 -- .../menusExtensionPoint.i18n.json | 1 + .../theme/common/colorRegistry.i18n.json | 6 +++--- .../mainThreadExtensionService.i18n.json | 6 ++++++ .../mainThreadMessageService.i18n.json | 6 ++++++ .../api/node/extHostExplorerView.i18n.json | 9 +++++++++ .../browser/actions/configureLocale.i18n.json | 2 +- .../src/vs/workbench/common/theme.i18n.json | 6 ------ .../main.contribution.i18n.json | 2 +- .../debug/browser/debugActions.i18n.json | 1 + .../debug/browser/linkDetector.i18n.json | 9 +++++++++ .../parts/debug/common/debug.i18n.json | 8 ++++++++ .../electron-browser/debugCommands.i18n.json | 8 ++++++++ .../electron-browser/replViewer.i18n.json | 2 -- .../parts/debug/node/debugAdapter.i18n.json | 3 +-- .../extensionTipsService.i18n.json | 5 ++++- .../extensions.contribution.i18n.json | 3 ++- .../browser/files.contribution.i18n.json | 4 ++-- .../browser/searchResultsView.i18n.json | 4 +--- .../task.contribution.i18n.json | 2 +- .../terminalColorRegistry.i18n.json | 2 ++ .../themes.contribution.i18n.json | 1 - .../configurationEditingService.i18n.json | 7 +------ .../keybindingService.i18n.json | 3 --- .../cht/extensions/git/out/commands.i18n.json | 2 ++ ...rectiveCommentCompletionProvider.i18n.json | 6 ++++++ .../extensions/typescript/package.i18n.json | 1 - .../base/common/jsonErrorMessages.i18n.json | 6 ++++++ .../src/vs/code/electron-main/menus.i18n.json | 1 - .../config/commonEditorConfig.i18n.json | 1 + .../common/config/editorOptions.i18n.json | 8 ++++++++ .../contrib/hover/browser/hover.i18n.json | 5 +---- .../browser/referencesWidget.i18n.json | 2 -- .../suggest/browser/suggestWidget.i18n.json | 2 -- .../menusExtensionPoint.i18n.json | 1 - .../theme/common/colorRegistry.i18n.json | 7 ++++--- .../mainThreadExtensionService.i18n.json | 6 ++++++ .../mainThreadMessageService.i18n.json | 6 ++++++ .../api/node/extHostExplorerView.i18n.json | 9 +++++++++ .../browser/actions/configureLocale.i18n.json | 1 - .../src/vs/workbench/common/theme.i18n.json | 6 ------ .../main.contribution.i18n.json | 1 - .../debug/browser/linkDetector.i18n.json | 9 +++++++++ .../parts/debug/common/debug.i18n.json | 8 ++++++++ .../electron-browser/debugCommands.i18n.json | 6 ++++++ .../electron-browser/replViewer.i18n.json | 2 -- .../parts/debug/node/debugAdapter.i18n.json | 2 -- .../extensionTipsService.i18n.json | 4 +++- .../browser/files.contribution.i18n.json | 2 -- .../browser/searchResultsView.i18n.json | 4 +--- .../task.contribution.i18n.json | 1 - .../themes.contribution.i18n.json | 1 - .../configurationEditingService.i18n.json | 7 +------ .../keybindingService.i18n.json | 3 --- .../deu/extensions/git/out/commands.i18n.json | 2 ++ i18n/deu/extensions/git/package.i18n.json | 4 ++-- ...rectiveCommentCompletionProvider.i18n.json | 6 ++++++ .../extensions/typescript/package.i18n.json | 1 - .../base/common/jsonErrorMessages.i18n.json | 6 ++++++ .../src/vs/code/electron-main/menus.i18n.json | 1 - .../config/commonEditorConfig.i18n.json | 1 + .../common/config/editorOptions.i18n.json | 8 ++++++++ .../contrib/hover/browser/hover.i18n.json | 5 +---- .../browser/referencesWidget.i18n.json | 2 -- .../suggest/browser/suggestWidget.i18n.json | 2 -- .../theme/common/colorRegistry.i18n.json | 6 +++--- .../mainThreadExtensionService.i18n.json | 6 ++++++ .../mainThreadMessageService.i18n.json | 6 ++++++ .../api/node/extHostExplorerView.i18n.json | 9 +++++++++ .../browser/actions/configureLocale.i18n.json | 1 - .../src/vs/workbench/common/theme.i18n.json | 6 ------ .../main.contribution.i18n.json | 1 - .../debug/browser/linkDetector.i18n.json | 9 +++++++++ .../parts/debug/common/debug.i18n.json | 8 ++++++++ .../electron-browser/debugCommands.i18n.json | 6 ++++++ .../electron-browser/replViewer.i18n.json | 2 -- .../parts/debug/node/debugAdapter.i18n.json | 2 -- .../extensionTipsService.i18n.json | 4 +++- .../browser/files.contribution.i18n.json | 2 -- .../browser/searchResultsView.i18n.json | 4 +--- .../task.contribution.i18n.json | 1 - .../themes.contribution.i18n.json | 1 - .../configurationEditingService.i18n.json | 7 +------ .../keybindingService.i18n.json | 3 --- .../esn/extensions/git/out/commands.i18n.json | 2 ++ ...rectiveCommentCompletionProvider.i18n.json | 6 ++++++ .../extensions/typescript/package.i18n.json | 1 - .../base/common/jsonErrorMessages.i18n.json | 6 ++++++ .../src/vs/code/electron-main/menus.i18n.json | 2 +- .../common/config/editorOptions.i18n.json | 8 ++++++++ .../common/view/editorColorRegistry.i18n.json | 4 +++- .../contrib/hover/browser/hover.i18n.json | 5 +---- .../browser/referencesWidget.i18n.json | 2 -- .../suggest/browser/suggestWidget.i18n.json | 2 -- .../theme/common/colorRegistry.i18n.json | 6 +++--- .../mainThreadExtensionService.i18n.json | 6 ++++++ .../mainThreadMessageService.i18n.json | 6 ++++++ .../api/node/extHostExplorerView.i18n.json | 9 +++++++++ .../browser/actions/configureLocale.i18n.json | 2 +- .../src/vs/workbench/common/theme.i18n.json | 6 ------ .../main.contribution.i18n.json | 2 +- .../debug/browser/linkDetector.i18n.json | 9 +++++++++ .../parts/debug/common/debug.i18n.json | 8 ++++++++ .../electron-browser/debugCommands.i18n.json | 6 ++++++ .../electron-browser/replViewer.i18n.json | 2 -- .../parts/debug/node/debugAdapter.i18n.json | 3 +-- .../extensionTipsService.i18n.json | 6 +++++- .../extensions.contribution.i18n.json | 3 ++- .../browser/files.contribution.i18n.json | 4 ++-- .../browser/searchResultsView.i18n.json | 4 +--- .../terminalColorRegistry.i18n.json | 2 ++ .../themes.contribution.i18n.json | 1 - .../configurationEditingService.i18n.json | 7 +------ .../keybindingService.i18n.json | 3 --- .../fra/extensions/git/out/commands.i18n.json | 2 ++ ...rectiveCommentCompletionProvider.i18n.json | 6 ++++++ .../extensions/typescript/package.i18n.json | 1 - .../base/common/jsonErrorMessages.i18n.json | 6 ++++++ .../src/vs/code/electron-main/menus.i18n.json | 1 - .../common/config/editorOptions.i18n.json | 8 ++++++++ .../contrib/hover/browser/hover.i18n.json | 5 +---- .../browser/referencesWidget.i18n.json | 2 -- .../suggest/browser/suggestWidget.i18n.json | 2 -- .../theme/common/colorRegistry.i18n.json | 6 +++--- .../mainThreadExtensionService.i18n.json | 6 ++++++ .../mainThreadMessageService.i18n.json | 6 ++++++ .../api/node/extHostExplorerView.i18n.json | 9 +++++++++ .../browser/actions/configureLocale.i18n.json | 1 - .../src/vs/workbench/common/theme.i18n.json | 6 ------ .../main.contribution.i18n.json | 1 - .../debug/browser/linkDetector.i18n.json | 9 +++++++++ .../parts/debug/common/debug.i18n.json | 8 ++++++++ .../electron-browser/debugCommands.i18n.json | 6 ++++++ .../electron-browser/replViewer.i18n.json | 2 -- .../parts/debug/node/debugAdapter.i18n.json | 2 -- .../extensionTipsService.i18n.json | 4 +++- .../browser/files.contribution.i18n.json | 2 -- .../browser/searchResultsView.i18n.json | 4 +--- .../task.contribution.i18n.json | 1 - .../themes.contribution.i18n.json | 1 - .../configurationEditingService.i18n.json | 7 +------ .../keybindingService.i18n.json | 3 --- .../ita/extensions/git/out/commands.i18n.json | 2 ++ ...rectiveCommentCompletionProvider.i18n.json | 6 ++++++ .../extensions/typescript/package.i18n.json | 1 - .../base/common/jsonErrorMessages.i18n.json | 6 ++++++ .../src/vs/code/electron-main/menus.i18n.json | 1 - .../common/config/editorOptions.i18n.json | 8 ++++++++ .../contrib/hover/browser/hover.i18n.json | 5 +---- .../browser/referencesWidget.i18n.json | 2 -- .../suggest/browser/suggestWidget.i18n.json | 2 -- .../theme/common/colorRegistry.i18n.json | 6 +++--- .../mainThreadExtensionService.i18n.json | 6 ++++++ .../mainThreadMessageService.i18n.json | 6 ++++++ .../api/node/extHostExplorerView.i18n.json | 9 +++++++++ .../browser/actions/configureLocale.i18n.json | 1 - .../src/vs/workbench/common/theme.i18n.json | 6 ------ .../main.contribution.i18n.json | 1 - .../debug/browser/linkDetector.i18n.json | 9 +++++++++ .../parts/debug/common/debug.i18n.json | 8 ++++++++ .../electron-browser/debugCommands.i18n.json | 6 ++++++ .../electron-browser/replViewer.i18n.json | 2 -- .../parts/debug/node/debugAdapter.i18n.json | 2 -- .../extensionTipsService.i18n.json | 4 +++- .../browser/files.contribution.i18n.json | 2 -- .../browser/searchResultsView.i18n.json | 4 +--- .../task.contribution.i18n.json | 1 - .../themes.contribution.i18n.json | 1 - .../configurationEditingService.i18n.json | 7 +------ .../keybindingService.i18n.json | 3 --- .../jpn/extensions/git/out/commands.i18n.json | 3 +++ i18n/jpn/extensions/git/package.i18n.json | 4 +++- ...rectiveCommentCompletionProvider.i18n.json | 10 ++++++++++ .../extensions/typescript/package.i18n.json | 2 +- .../base/common/jsonErrorMessages.i18n.json | 6 ++++++ .../src/vs/code/electron-main/menus.i18n.json | 3 ++- .../config/commonEditorConfig.i18n.json | 3 ++- .../common/config/editorOptions.i18n.json | 8 ++++++++ .../common/view/editorColorRegistry.i18n.json | 5 ++++- .../contrib/hover/browser/hover.i18n.json | 5 +---- .../browser/referencesWidget.i18n.json | 4 ++-- .../suggest/browser/suggestWidget.i18n.json | 2 -- .../theme/common/colorRegistry.i18n.json | 20 ++++++++++++++++--- .../mainThreadExtensionService.i18n.json | 6 ++++++ .../mainThreadMessageService.i18n.json | 6 ++++++ .../api/node/extHostExplorerView.i18n.json | 9 +++++++++ .../browser/actions/configureLocale.i18n.json | 2 +- .../src/vs/workbench/common/theme.i18n.json | 6 ------ .../main.contribution.i18n.json | 2 +- .../debug/browser/linkDetector.i18n.json | 9 +++++++++ .../parts/debug/common/debug.i18n.json | 8 ++++++++ .../electron-browser/debugCommands.i18n.json | 6 ++++++ .../electron-browser/replViewer.i18n.json | 2 -- .../parts/debug/node/debugAdapter.i18n.json | 3 +-- .../browser/extensionsActions.i18n.json | 2 +- .../extensionTipsService.i18n.json | 6 +++++- .../extensions.contribution.i18n.json | 3 ++- .../browser/files.contribution.i18n.json | 2 -- .../browser/viewPickerHandler.i18n.json | 2 +- .../browser/searchResultsView.i18n.json | 4 +--- .../task.contribution.i18n.json | 2 +- .../terminal.contribution.i18n.json | 20 +++++++++---------- .../terminalActions.i18n.json | 10 +++++----- .../terminalColorRegistry.i18n.json | 2 ++ .../terminalInstance.i18n.json | 4 ++-- .../themes.contribution.i18n.json | 1 - .../electron-browser/watermark.i18n.json | 2 +- .../configurationEditingService.i18n.json | 7 +------ .../keybindingService.i18n.json | 3 --- .../kor/extensions/git/out/commands.i18n.json | 2 ++ ...rectiveCommentCompletionProvider.i18n.json | 6 ++++++ .../extensions/typescript/package.i18n.json | 1 - .../base/common/jsonErrorMessages.i18n.json | 6 ++++++ .../src/vs/code/electron-main/menus.i18n.json | 1 - .../common/config/editorOptions.i18n.json | 8 ++++++++ .../contrib/hover/browser/hover.i18n.json | 5 +---- .../browser/referencesWidget.i18n.json | 2 -- .../suggest/browser/suggestWidget.i18n.json | 2 -- .../theme/common/colorRegistry.i18n.json | 6 +++--- .../mainThreadExtensionService.i18n.json | 6 ++++++ .../mainThreadMessageService.i18n.json | 6 ++++++ .../api/node/extHostExplorerView.i18n.json | 9 +++++++++ .../browser/actions/configureLocale.i18n.json | 1 - .../src/vs/workbench/common/theme.i18n.json | 6 ------ .../main.contribution.i18n.json | 1 - .../debug/browser/linkDetector.i18n.json | 9 +++++++++ .../parts/debug/common/debug.i18n.json | 8 ++++++++ .../electron-browser/debugCommands.i18n.json | 6 ++++++ .../electron-browser/replViewer.i18n.json | 2 -- .../parts/debug/node/debugAdapter.i18n.json | 2 -- .../extensionTipsService.i18n.json | 4 +++- .../browser/files.contribution.i18n.json | 2 -- .../browser/searchResultsView.i18n.json | 4 +--- .../task.contribution.i18n.json | 1 - .../themes.contribution.i18n.json | 1 - .../configurationEditingService.i18n.json | 7 +------ .../keybindingService.i18n.json | 3 --- .../rus/extensions/git/out/commands.i18n.json | 2 ++ ...rectiveCommentCompletionProvider.i18n.json | 6 ++++++ .../extensions/typescript/package.i18n.json | 1 - .../base/common/jsonErrorMessages.i18n.json | 6 ++++++ .../src/vs/code/electron-main/menus.i18n.json | 7 +++---- .../common/config/editorOptions.i18n.json | 8 ++++++++ .../contrib/hover/browser/hover.i18n.json | 5 +---- .../browser/referencesWidget.i18n.json | 2 -- .../suggest/browser/suggestWidget.i18n.json | 2 -- .../theme/common/colorRegistry.i18n.json | 8 +++++--- .../mainThreadExtensionService.i18n.json | 6 ++++++ .../mainThreadMessageService.i18n.json | 6 ++++++ .../api/node/extHostExplorerView.i18n.json | 9 +++++++++ .../browser/actions/configureLocale.i18n.json | 1 - .../src/vs/workbench/common/theme.i18n.json | 6 ------ .../main.contribution.i18n.json | 1 - .../debug/browser/linkDetector.i18n.json | 9 +++++++++ .../parts/debug/common/debug.i18n.json | 8 ++++++++ .../electron-browser/debugCommands.i18n.json | 6 ++++++ .../electron-browser/replViewer.i18n.json | 2 -- .../parts/debug/node/debugAdapter.i18n.json | 2 -- .../extensionTipsService.i18n.json | 4 +++- .../browser/files.contribution.i18n.json | 2 -- .../browser/searchResultsView.i18n.json | 4 +--- .../task.contribution.i18n.json | 1 - .../themes.contribution.i18n.json | 1 - .../configurationEditingService.i18n.json | 7 +------ .../keybindingService.i18n.json | 3 --- 274 files changed, 786 insertions(+), 411 deletions(-) create mode 100644 i18n/chs/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json create mode 100644 i18n/chs/src/vs/base/common/jsonErrorMessages.i18n.json create mode 100644 i18n/chs/src/vs/editor/common/config/editorOptions.i18n.json create mode 100644 i18n/chs/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json create mode 100644 i18n/chs/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json create mode 100644 i18n/chs/src/vs/workbench/api/node/extHostExplorerView.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/debug/common/debug.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json create mode 100644 i18n/cht/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json create mode 100644 i18n/cht/src/vs/base/common/jsonErrorMessages.i18n.json create mode 100644 i18n/cht/src/vs/editor/common/config/editorOptions.i18n.json create mode 100644 i18n/cht/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json create mode 100644 i18n/cht/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json create mode 100644 i18n/cht/src/vs/workbench/api/node/extHostExplorerView.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/debug/common/debug.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json create mode 100644 i18n/deu/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json create mode 100644 i18n/deu/src/vs/base/common/jsonErrorMessages.i18n.json create mode 100644 i18n/deu/src/vs/editor/common/config/editorOptions.i18n.json create mode 100644 i18n/deu/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json create mode 100644 i18n/deu/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json create mode 100644 i18n/deu/src/vs/workbench/api/node/extHostExplorerView.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/debug/common/debug.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json create mode 100644 i18n/esn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json create mode 100644 i18n/esn/src/vs/base/common/jsonErrorMessages.i18n.json create mode 100644 i18n/esn/src/vs/editor/common/config/editorOptions.i18n.json create mode 100644 i18n/esn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json create mode 100644 i18n/esn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json create mode 100644 i18n/esn/src/vs/workbench/api/node/extHostExplorerView.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/debug/common/debug.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json create mode 100644 i18n/fra/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json create mode 100644 i18n/fra/src/vs/base/common/jsonErrorMessages.i18n.json create mode 100644 i18n/fra/src/vs/editor/common/config/editorOptions.i18n.json create mode 100644 i18n/fra/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json create mode 100644 i18n/fra/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json create mode 100644 i18n/fra/src/vs/workbench/api/node/extHostExplorerView.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/debug/common/debug.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json create mode 100644 i18n/ita/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json create mode 100644 i18n/ita/src/vs/base/common/jsonErrorMessages.i18n.json create mode 100644 i18n/ita/src/vs/editor/common/config/editorOptions.i18n.json create mode 100644 i18n/ita/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json create mode 100644 i18n/ita/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json create mode 100644 i18n/ita/src/vs/workbench/api/node/extHostExplorerView.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/debug/common/debug.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json create mode 100644 i18n/jpn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json create mode 100644 i18n/jpn/src/vs/base/common/jsonErrorMessages.i18n.json create mode 100644 i18n/jpn/src/vs/editor/common/config/editorOptions.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/api/node/extHostExplorerView.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/debug/common/debug.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json create mode 100644 i18n/kor/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json create mode 100644 i18n/kor/src/vs/base/common/jsonErrorMessages.i18n.json create mode 100644 i18n/kor/src/vs/editor/common/config/editorOptions.i18n.json create mode 100644 i18n/kor/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json create mode 100644 i18n/kor/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json create mode 100644 i18n/kor/src/vs/workbench/api/node/extHostExplorerView.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/debug/common/debug.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json create mode 100644 i18n/rus/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json create mode 100644 i18n/rus/src/vs/base/common/jsonErrorMessages.i18n.json create mode 100644 i18n/rus/src/vs/editor/common/config/editorOptions.i18n.json create mode 100644 i18n/rus/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json create mode 100644 i18n/rus/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json create mode 100644 i18n/rus/src/vs/workbench/api/node/extHostExplorerView.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/debug/common/debug.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json diff --git a/i18n/chs/extensions/git/out/commands.i18n.json b/i18n/chs/extensions/git/out/commands.i18n.json index 2bf666865ec0f..d6b0baf091977 100644 --- a/i18n/chs/extensions/git/out/commands.i18n.json +++ b/i18n/chs/extensions/git/out/commands.i18n.json @@ -18,6 +18,8 @@ "discard": "放弃更改", "confirm discard all": "确定要放弃所有更改吗?此操作不可撤销!", "discardAll": "放弃所有更改", + "yes": "是", + "always": "始终", "no changes": "没有要提交的更改。", "commit message": "提交消息", "provide commit message": "请提供提交消息", diff --git a/i18n/chs/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/chs/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..de76bf9b5f59c --- /dev/null +++ b/i18n/chs/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "在 JavaScript 文件中启用语义检查。必须在文件顶部。", + "ts-nocheck": "在 JavaScript 文件中禁用语义检查。必须在文件顶部。", + "ts-ignore": "取消文件下一行的 @ts-check 错误提示。" +} \ No newline at end of file diff --git a/i18n/chs/extensions/typescript/package.i18n.json b/i18n/chs/extensions/typescript/package.i18n.json index 1e24a1e8d406c..8f2d24aa7ea05 100644 --- a/i18n/chs/extensions/typescript/package.i18n.json +++ b/i18n/chs/extensions/typescript/package.i18n.json @@ -35,7 +35,7 @@ "javascript.goToProjectConfig.title": "转到项目配置", "typescript.referencesCodeLens.enabled": "启用/禁用引用 CodeLens。要求 TypeScript >= 2.0.6。", "typescript.implementationsCodeLens.enabled": "启用/禁用实现 CodeLens。要求 TypeScript >= 2.2.0。", - "typescript.openTsServerLog.title": "打开 TS 服务器日志文件", + "typescript.openTsServerLog.title": "打开 TS 服务器日志", "typescript.selectTypeScriptVersion.title": "选择 TypeScript 版本", "jsDocCompletion.enabled": "启用/禁用自动 JSDoc 注释", "javascript.implicitProjectConfig.checkJs": "启用/禁用 JavaScript 文件的语义检查。现有的 jsconfig.json 或\n tsconfig.json 文件会覆盖此设置。要求 TypeScript >=2.3.1。", diff --git a/i18n/chs/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/chs/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/code/electron-main/menus.i18n.json b/i18n/chs/src/vs/code/electron-main/menus.i18n.json index f049e294f3bc1..e5052dcc94fa7 100644 --- a/i18n/chs/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/chs/src/vs/code/electron-main/menus.i18n.json @@ -69,7 +69,6 @@ "miSmartSelectShrink": "缩小选定范围(&&S)", "miViewExplorer": "资源管理器(&&E)", "miViewSearch": "搜索(&&S)", - "miViewGit": "GIT(&&G)", "miViewDebug": "调试(&&D)", "miViewExtensions": "扩展(&&X)", "miToggleOutput": "输出(&&O)", diff --git a/i18n/chs/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/chs/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..9d5691d3e42a4 --- /dev/null +++ b/i18n/chs/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorViewAccessibleLabel": "编辑器内容" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json index d517535edcae2..77510fb7e497a 100644 --- a/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -10,5 +10,7 @@ "caret": "编辑器光标颜色。", "editorWhitespaces": "编辑器中空白字符颜色。", "editorIndentGuides": "编辑器缩进参考线颜色。", - "editorLineNumbers": "编辑器行号颜色。" + "editorLineNumbers": "编辑器行号颜色。", + "editorCodeLensForeground": "编辑器 CodeLens 的前景色", + "editorBracketMatchBackground": "匹配括号的背景色" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/chs/src/vs/editor/contrib/hover/browser/hover.i18n.json index 2d214d20aca7b..6591084448163 100644 --- a/i18n/chs/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "显示悬停", - "hoverHighlight": "在显示软键盘的字下方突出显示。", - "hoverBackground": "编辑器悬停的背景颜色。", - "hoverBorder": "编辑器软键盘边框颜色。" + "showHover": "显示悬停" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index e200e46e37675..ae160d592358b 100644 --- a/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -16,8 +16,6 @@ "peekViewTitleInfoForeground": "速览视图标题信息颜色。", "peekViewBorder": "速览视图边框和箭头颜色。", "peekViewResultsBackground": "速览视图结果列表背景颜色。", - "peekViewResultsMatchForeground": "在速览视图结果列表中匹配条目前景色。", - "peekViewResultsFileForeground": "速览视图结果列表中的文件条目前景色。", "peekViewResultsSelectionBackground": "速览视图结果列表中所选条目的背景颜色。", "peekViewResultsSelectionForeground": "速览视图结果列表中所选条目的前景色。", "peekViewEditorBackground": "速览视图编辑器背景颜色。", diff --git a/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 12737ed6d9bdb..215e790d4d502 100644 --- a/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,10 +9,8 @@ "editorSuggestWidgetForeground": "建议小组件的前景颜色。", "editorSuggestWidgetSelectedBackground": "建议小组件中被选择条目的背景颜色。", "editorSuggestWidgetHighlightForeground": "建议小组件中匹配内容的高亮颜色。", - "readMore": "阅读更多...{0}", "suggestionWithDetailsAriaLabel": "{0}(建议)具有详细信息", "suggestionAriaLabel": "{0},建议", - "goback": "返回", "suggestWidget.loading": "正在加载...", "suggestWidget.noSuggestions": "无建议。", "suggestionAriaAccepted": "{0},已接受", diff --git a/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 9065a3c4a530b..806db0f074865 100644 --- a/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -19,6 +19,7 @@ "menus.editorTabContext": "编辑器选项卡上下文菜单", "menus.debugCallstackContext": "调试调用堆栈上下文菜单", "menus.scmTitle": "源代码管理标题菜单", + "menus.resourceGroupContext": "源代码管理资源组上下文菜单", "menus.resourceStateContext": "源代码管理资源状态上下文菜单", "nonempty": "应为非空值。", "opticon": "可以省略属性“图标”或者它必须是一个字符串或类似“{dark, light}”的文本", diff --git a/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json index 5f7643de9e4b5..fe64e285097d6 100644 --- a/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -28,8 +28,6 @@ "listActiveSelectionBackground": "已选项在列表或树活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。", "listInactiveSelectionBackground": "已选项在列表或树非活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。", "listActiveSelectionForeground": "已选项在列表或树活动时的前景颜色。活动的列表或树具有键盘焦点,非活动的没有。", - "listFocusAndSelectionBackground": "被选中且聚焦的项目在列表或树活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。此颜色比单独的选择和焦点颜色的优先级高。", - "listFocusAndSelectionForeground": "被选中且聚焦的项目在列表或树活动时的前景颜色。活动的列表或树具有键盘焦点,非活动的没有。此颜色比单独的选择和焦点颜色的优先级高。", "listHoverBackground": "使用鼠标移动项目时,列表或树的背景颜色。", "listDropBackground": "使用鼠标移动项目时,列表或树进行拖放的背景颜色。", "highlight": "在列表或树中搜索时,其中匹配内容的高亮颜色。", @@ -50,7 +48,9 @@ "editorFindMatch": "当前搜索匹配项的颜色。", "findMatchHighlight": "其他搜索匹配项的颜色。", "findRangeHighlight": "限制搜索的范围的颜色。", + "hoverHighlight": "在显示软键盘的字下方突出显示。", + "hoverBackground": "编辑器软键盘背景色。", + "hoverBorder": "编辑器软键盘边框颜色。", "activeLinkForeground": "活动链接颜色。", - "linkForeground": "链接颜色。", "editorWidgetBackground": "编辑器组件(如查找/替换)背景颜色。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/chs/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..dc7534a706017 --- /dev/null +++ b/i18n/chs/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "没有注册 ID 为“{0}”的 TreeExplorerNodeProvider。", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider“{0}”无法提供根节点。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/chs/src/vs/workbench/browser/actions/configureLocale.i18n.json index 37269b60c8f66..c8f8f1edc8f30 100644 --- a/i18n/chs/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,7 +7,7 @@ "configureLocale": "配置语言", "displayLanguage": "定义 VSCode 的显示语言。", "doc": "请参阅 {0},了解支持的语言列表。", - "restart": "要更改值需要重启 VSCode。", + "restart": "更改此值需要重启 VSCode。", "fail.createSettings": "无法创建“{0}”({1})。", "JsonSchema.locale": "要使用的 UI 语言。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/common/theme.i18n.json b/i18n/chs/src/vs/workbench/common/theme.i18n.json index 82541213ad4dc..d268b3ff22406 100644 --- a/i18n/chs/src/vs/workbench/common/theme.i18n.json +++ b/i18n/chs/src/vs/workbench/common/theme.i18n.json @@ -4,19 +4,14 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "选项卡容器的边框颜色。选项卡是编辑器区域中编辑器的容器。可在一个编辑器组中打开多个选项卡。可以存在多个编辑器组。", "tabActiveBackground": "活动选项卡的背景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", "tabInactiveBackground": "非活动选项卡的背景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", "tabBorder": "用于将选项卡彼此分隔开的边框。选项卡是编辑器区域中编辑器的容器。可在一个编辑器组中打开多个选项卡。可以存在多个编辑器组。", "tabActiveEditorGroupActiveForeground": "活动组中活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", - "tabActiveEditorGroupInactiveForeground": "非活动组中活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", "tabInactiveEditorGroupActiveForeground": "活动组中非活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", - "tabInactiveEditorGroupInactiveForeground": "非活动组中非活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", "editorGroupBackground": "编辑器组的背景颜色。编辑器组是编辑器的容器。此颜色在拖动编辑器组时显示。", "editorGroupHeaderBackground": "禁用选项卡时编辑器组标题的背景颜色。编辑器组是编辑器的容器。", "editorGroupBorder": "将多个编辑器组彼此分隔开的颜色。编辑器组是编辑器的容器。", - "editorDragAndDropBackground": "随意拖动编辑器时的背景色。", - "editorMasterDetailsBorder": "并排编辑器中将主视图与细节视图分隔开的边框颜色。", "panelBackground": "面板的背景色。面板显示在编辑器区域下方,可包含输出和集成终端等视图。", "panelBorder": "分隔到编辑器的顶部面板边框色。面板显示在编辑器区域下方,可包含输出和集成终端等视图。", "panelActiveTitleForeground": "活动面板的标题颜色。面板显示在编辑器区域下方,并包含输出和集成终端等视图。", @@ -31,7 +26,6 @@ "statusBarProminentItemHoverBackground": "状态栏突出显示项在悬停时的背景颜色。突出显示项比状态栏中的其他条目更显眼,表明其重要性更高。状态栏显示在窗口底部。", "activityBarBackground": "活动栏背景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "activityBarForeground": "活动栏前景色(例如用于图标)。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", - "activityBarDragAndDropBackground": "活动栏项的拖放反馈颜色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "activityBarBadgeBackground": "活动通知徽章背景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "activityBarBadgeForeground": "活动通知徽章前景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "sideBarBackground": "侧边栏背景色。侧边栏是资源管理器和搜索等视图的容器。", diff --git a/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json index ee33fc5f24367..a2d7a1d364c20 100644 --- a/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -41,12 +41,12 @@ "window.newWindowDimensions.inherit": "以与上一个活动窗口相同的尺寸打开新窗口。", "window.newWindowDimensions.maximized": "打开最大化的新窗口。", "window.newWindowDimensions.fullscreen": "在全屏模式下打开新窗口。", - "newWindowDimensions": "控制打开新窗口的尺寸。默认情况下,新窗口将以小尺寸在屏幕的中央打开。当设置为 \"inherit\" 时,窗口将获取与上一活动窗口相同的尺寸。当设置为 \"maximized\" 时,窗口将以最大化形式打开,如果配置为 \"fullscreen\",窗口将以全屏形式打开。", "window.menuBarVisibility.default": "菜单仅在全屏模式下隐藏。", "window.menuBarVisibility.visible": "菜单始终可见,即使处于全屏模式下。", "window.menuBarVisibility.toggle": "菜单隐藏,但可以通过 Alt 键显示。", "window.menuBarVisibility.hidden": "菜单始终隐藏。", "menuBarVisibility": "控制菜单栏的可见性。“切换”设置表示隐藏菜单栏,按一次 Alt 键则将显示此菜单栏。默认情况下,除非窗口为全屏,否则菜单栏可见。", + "enableMenuBarMnemonics": "如果启用,则可使用 Alt 快捷键打开主菜单。禁用助记键允许将这些 Alt 快捷键绑定到编辑器命令。", "autoDetectHighContrast": "如果已启用,将自动更改为高对比度主题;如果 Windows 正在使用高对比度主题,则当离开 Windows 高对比度主题时会更改为深色主题。", "titleBarStyle": "调整窗口标题栏的外观。更改需要在完全重启后才能应用。", "window.nativeTabs": "\n启用macOS Sierra窗口选项卡。请注意,更改需要完全重新启动程序才能生效。如果配置此选项,本机选项卡将禁用自定义标题栏样式。", diff --git a/i18n/chs/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index 2ed88fc75455e..258e88045a6cf 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "打开 {0}", "launchJsonNeedsConfigurtion": "配置或修复 \"launch.json\"", + "noFolderDebugConfig": "请先打开一个文件夹以进行高级调试配置。", "startDebug": "开始调试", "startWithoutDebugging": "开始执行(不调试)", "selectAndStartDebugging": "选择并开始调试", diff --git a/i18n/chs/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..e0672f811fd25 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "点击以跟进(Cmd + 点击打开到侧边)", + "fileLink": "点击以跟进(Ctrl + 点击打开到侧边))" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..8f7407863de08 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "内部调试控制台的控制行为。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..b984c5a3f689d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noFolderDebugConfig": "请先打开一个文件夹以进行高级调试配置。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index f8362fa633f0f..16828d670d2bb 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "stateCapture": "对象状态捕获自第一个评估", - "fileLinkMac": "点击以跟进(Cmd + 点击打开到侧边)", - "fileLink": "点击以跟进(Ctrl + 点击打开到侧边))", "replVariableAriaLabel": "变量 {0} 具有值 {1}、读取 Eval 打印循环,调试", "replExpressionAriaLabel": "表达式 {0} 具有值 {1},读取 Eval 打印循环,调试", "replValueOutputAriaLabel": "{0},读取 Eval 打印循环,调试", diff --git a/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 59d49516599d1..54243f83ce323 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,13 +7,12 @@ "debugAdapterBinNotFound": "调试适配器可执行的“{0}”不存在。", "debugAdapterCannotDetermineExecutable": "无法确定调试适配器“{0}”的可执行文件。", "debugType": "配置类型。", - "debugTypeNotRecognised": "无法识别此调试类型。请安装相应的调试扩展。", + "debugTypeNotRecognised": "无法识别此调试类型。确保已经安装并启用相应的调试扩展。", "node2NotSupported": "不再支持 \"node2\",改用 \"node\",并将 \"protocol\" 属性设为 \"inspector\"。", "debugName": "配置名称;在启动配置下拉菜单中显示。", "debugRequest": "请求配置类型。可以是“启动”或“附加”。", "debugServer": "仅用于调试扩展开发: 如果已指定端口,VS 代码会尝试连接到在服务器模式中运行的调试适配器", "debugPrelaunchTask": "调试会话开始前要运行的任务。", - "internalConsoleOptions": "内部调试控制台的控制行为。", "debugWindowsConfiguration": "特定于 Windows 的启动配置属性。", "debugOSXConfiguration": "特定于 OS X 的启动配置属性。", "debugLinuxConfiguration": "特定于 Linux 的启动配置属性。", diff --git a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 8bcde2a904f1d..1a78dfcd7283c 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -8,5 +8,8 @@ "showRecommendations": "显示建议", "neverShowAgain": "不再显示", "close": "关闭", - "workspaceRecommended": "此工作区具有扩展建议。" + "workspaceRecommended": "此工作区具有扩展建议。", + "ignoreAll": "是,忽略全部", + "no": "否", + "cancel": "取消" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index e65debf45a67d..1320378fc4d3d 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -10,5 +10,6 @@ "extensions": "扩展", "view": "查看", "extensionsConfigurationTitle": "扩展", - "extensionsAutoUpdate": "自动更新扩展" + "extensionsAutoUpdate": "自动更新扩展", + "extensionsIgnoreRecommendations": "忽略推荐的扩展" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index b519747f41a3e..7ceecf29ccc98 100644 --- a/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -27,8 +27,8 @@ "autoSaveDelay": "控制延迟(以秒为单位),在该延迟后将自动保存更新后的文件。仅在 \"files.autoSave'\" 设置为“{0}”时适用。", "watcherExclude": "配置文件路径的 glob 模式以从文件监视排除。更改此设置要求重启。如果在启动时遇到 Code 消耗大量 CPU 时间,则可以排除大型文件夹以减少初始加载。", "hotExit.off": "禁用热退出。", - "hotExit.onExit": "应用程序关闭时 - 即当 Windows/Linux 上的最后一个窗口关闭或触发 workbench.action.quit 命令时(命令托盘、键绑定、菜单)- 将触发热退出。下次启动时将还原所有已备份的窗口。", - "hotExit.onExitAndWindowClose": "应用程序关闭时 - 即当 Windows/Linux 上的最后一个窗口关闭或触发 workbench.action.quit 命令时(命令托盘、键绑定、菜单)- 将触发热退出。下次启动时将还原所有未打开文件夹的所有窗口。若要将文件夹窗口还原成关闭前的模式,请将 \"window.reopenFolders\" 设置为“所有”。", + "hotExit.onExit": "应用程序关闭时将触发热退出。在 Windows/Linux 上关闭最后一个窗口或触发 workbench.action.quit 命令(命令托盘、键绑定、菜单)会引起应用程序关闭。下次启动时将还原所有已备份的窗口。", + "hotExit.onExitAndWindowClose": "应用程序关闭时将触发热退出。在 Windows/Linux 上关闭最后一个窗口、触发 workbench.action.quit 命令(命令托盘、键绑定、菜单)会引起应用程序关闭。对于任何有文件夹打开的窗口,则不论该窗口是否是最后一个窗口。下次启动时将还原所有未打开文件夹的窗口。若要还原打开有文件夹的窗口,请将“window.reopenFolders”设置为“all”。", "hotExit": "控制是否在会话间记住未保存的文件,以允许在退出编辑器时跳过保存提示。", "defaultLanguage": "分配给新文件的默认语言模式。", "editorConfigurationTitle": "编辑器", diff --git a/i18n/chs/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/chs/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index cfb58fab2ae1d..66f5e523f6b1f 100644 --- a/i18n/chs/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,7 +6,5 @@ { "searchMatches": "已找到 {0} 个匹配项", "searchMatch": "已找到 {0} 个匹配项", - "fileMatchAriaLabel": "文件夹 {2} 的文件 {1} 中有 {0} 个匹配项,搜索结果", - "replacePreviewResultAria": "替换预览结果, {0}", - "searchResultAria": "{0},搜索结果" + "fileMatchAriaLabel": "文件夹 {2} 的文件 {1} 中有 {0} 个匹配项,搜索结果" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index a1a07ebb7f946..e8ff5a94c0b10 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -18,7 +18,7 @@ "problems": "问题", "manyMarkers": "99+", "tasks": "任务", - "TaskSystem.noHotSwap": "更改任务执行引擎需要重启 VS 代码。已忽略更改。", + "TaskSystem.noHotSwap": "更改任务执行引擎需要重启 VS Code。已忽略更改。", "TaskService.noBuildTask": "未定义任何生成任务。使用 \"isBuildCommand\" 在 tasks.json 文件中标记任务。", "TaskService.noTestTask": "未定义任何测试任务。使用 \"isTestCommand\" 在 tasks.json 文件中标记任务。", "TaskServer.noTask": "未找到要执行的请求任务 {0}。", diff --git a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index bc85c5bd23bd0..396e41e5c5227 100644 --- a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "终端的背景颜色,允许终端的颜色与面板不同。", + "terminal.foreground": "终端的前景颜色。", "terminal.ansiColor": "终端中的 ANSI 颜色“{0}”。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 1e8d0fdd5a84f..6e5483236d897 100644 --- a/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,7 +6,6 @@ { "selectTheme.label": "颜色主题", "installColorThemes": "安装其他颜色主题...", - "problemChangingTheme": "设置主题时出现问题: {0}", "themes.selectTheme": "选择颜色主题", "selectIconTheme.label": "文件图标主题", "installIconThemes": "安装其他文件图标主题...", diff --git a/i18n/chs/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/chs/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 78d407bf40b4d..067feb41358fd 100644 --- a/i18n/chs/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -5,10 +5,5 @@ // Do not edit this file. It is machine generated. { "errorUnknownKey": "无法写入配置文件(未知密钥)", - "errorInvalidTarget": "无法写入到配置文件(无效的目标)", - "errorNoWorkspaceOpened": "无法写入设置,因为没有打开任何文件夹。请先打开一个文件夹,然后重试。", - "errorInvalidConfiguration": "无法写入设置。请打开 **用户设置** 更正文件中的错误/警告,然后重试。", - "errorInvalidConfigurationWorkspace": "无法写入设置。请打开 **工作区设置** 更正文件中的错误/警告,然后重试。", - "errorConfigurationFileDirty": "无法写入设置,因为该文件已更新。请保存 **用户设置** 文件,然后重试。", - "errorConfigurationFileDirtyWorkspace": "无法写入设置,因为该文件已更新。请保存 **工作区设置** 文件,然后重试。" + "errorInvalidTarget": "无法写入到配置文件(无效的目标)" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/chs/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index bafde878dc4b7..162baf8c31f90 100644 --- a/i18n/chs/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -14,9 +14,6 @@ "vscode.extension.contributes.keybindings.win": "Windows 特定的键或键序列。", "vscode.extension.contributes.keybindings.when": "键处于活动状态时的条件。", "vscode.extension.contributes.keybindings": "用于键绑定。", - "openDocumentation": "了解详细信息", - "keybindingMigration.ok": "确定", - "keybindingMigration.prompt": "已为你的键盘布局更改某些键盘快捷键。", "invalid.keybindings": "无效的“contributes.{0}”: {1}", "unboundCommands": "以下是其他可用命令:", "keybindings.json.title": "键绑定配置", diff --git a/i18n/cht/extensions/git/out/commands.i18n.json b/i18n/cht/extensions/git/out/commands.i18n.json index 446fe9ba0491a..2c6e65039516d 100644 --- a/i18n/cht/extensions/git/out/commands.i18n.json +++ b/i18n/cht/extensions/git/out/commands.i18n.json @@ -18,6 +18,8 @@ "discard": "捨棄變更", "confirm discard all": "確定要捨棄所有變更嗎? 此動作無法復原!", "discardAll": "捨棄所有變更", + "yes": "是", + "always": "永遠", "no changes": "沒有任何變更要認可。", "commit message": "認可訊息", "provide commit message": "請提供認可訊息", diff --git a/i18n/cht/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/cht/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/extensions/typescript/package.i18n.json b/i18n/cht/extensions/typescript/package.i18n.json index c5b2c54edf83f..c0d7714450158 100644 --- a/i18n/cht/extensions/typescript/package.i18n.json +++ b/i18n/cht/extensions/typescript/package.i18n.json @@ -35,7 +35,6 @@ "javascript.goToProjectConfig.title": "移至專案組態", "typescript.referencesCodeLens.enabled": "啟用/停用參考 CodeLens。需要 TypeScript >= 2.0.6。", "typescript.implementationsCodeLens.enabled": "啟用/停用實作 CodeLens。需要 TypeScript >= 2.2.0。", - "typescript.openTsServerLog.title": "開啟 TS 伺服器記錄檔", "typescript.selectTypeScriptVersion.title": "選取 TypeScript 版本", "jsDocCompletion.enabled": "啟用/停用自動 JSDoc 註解", "javascript.implicitProjectConfig.checkJs": "啟用/停用 JavaScript 檔案的語意檢查。現有的 jsconfig.json 或 tsconfig.json 檔案會覆寫此設定。需要 TypeScript >=2.3.1。", diff --git a/i18n/cht/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/cht/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/code/electron-main/menus.i18n.json b/i18n/cht/src/vs/code/electron-main/menus.i18n.json index 20490cb499d10..a1fa3f356ddeb 100644 --- a/i18n/cht/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/cht/src/vs/code/electron-main/menus.i18n.json @@ -69,7 +69,6 @@ "miSmartSelectShrink": "壓縮選取範圍(&&S)", "miViewExplorer": "檔案總管(&&E)", "miViewSearch": "搜尋(&&S)", - "miViewGit": "Git(&&G)", "miViewDebug": "偵錯 (&&D)", "miViewExtensions": "擴充功能(&&X)", "miToggleOutput": "輸出(&&O)", diff --git a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json index ec8f05fe3403e..23eb66546681d 100644 --- a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -62,6 +62,7 @@ "renderLineHighlight": "控制編輯器應如何轉譯目前反白的行,可能的值有 'none'、'gutter'、'line' 和 'all'。", "codeLens": "控制編輯器是否顯示程式碼濾鏡", "folding": "控制編輯器是否已啟用程式碼摺疊功能", + "hideFoldIcons": "自動隱藏摺疊圖示", "matchBrackets": "當選取某側的括號時,強調顯示另一側的配對括號。", "glyphMargin": "控制編輯器是否應轉譯垂直字符邊界。字符邊界最常用來進行偵錯。", "useTabStops": "插入和刪除接在定位停駐點後的空白字元", diff --git a/i18n/cht/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/cht/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..f48289922ad71 --- /dev/null +++ b/i18n/cht/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorViewAccessibleLabel": "編輯器內容" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/cht/src/vs/editor/contrib/hover/browser/hover.i18n.json index 43422adfd161e..7895cc33c1f48 100644 --- a/i18n/cht/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "動態顯示", - "hoverHighlight": "在顯示了動態顯示的單字下方醒目提示。", - "hoverBackground": "編輯器動態顯示的背景色彩。", - "hoverBorder": "編輯器動態顯示的框線色彩。" + "showHover": "動態顯示" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index 3386dfa6e2192..65c92c7740484 100644 --- a/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -16,8 +16,6 @@ "peekViewTitleInfoForeground": "預覽檢視標題資訊的色彩。", "peekViewBorder": "預覽檢視之框線與箭頭的色彩。", "peekViewResultsBackground": "預覽檢視中結果清單的背景色彩。", - "peekViewResultsMatchForeground": "在預覽檢視之結果清單中比對輸入時的前景。", - "peekViewResultsFileForeground": "在預覽檢視之結果清單中輸入檔案時的前景。", "peekViewResultsSelectionBackground": "在預覽檢視之結果清單中選取項目時的背景色彩。", "peekViewResultsSelectionForeground": "在預覽檢視之結果清單中選取項目時的前景色彩。", "peekViewEditorBackground": "預覽檢視編輯器的背景色彩。", diff --git a/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 64120957b4fb4..e7251477a6ce0 100644 --- a/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,10 +9,8 @@ "editorSuggestWidgetForeground": "建議小工具的前景色彩。", "editorSuggestWidgetSelectedBackground": "建議小工具中所選項目的背景色彩。", "editorSuggestWidgetHighlightForeground": "建議小工具中相符醒目提示的色彩。", - "readMore": "進一步了解...{0}", "suggestionWithDetailsAriaLabel": "{0},建議,有詳細資料", "suggestionAriaLabel": "{0},建議", - "goback": "返回", "suggestWidget.loading": "正在載入...", "suggestWidget.noSuggestions": "無建議。", "suggestionAriaAccepted": "{0},接受", diff --git a/i18n/cht/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/cht/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 993d9fa74a6a0..9414bc08e6a1c 100644 --- a/i18n/cht/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/cht/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -5,7 +5,6 @@ // Do not edit this file. It is machine generated. { "requirearray": "功能表項目必須為陣列", - "requirestring": "屬性 '{0}' 為強制項目且必須屬於 `string` 類型", "optstring": "屬性 `{0}` 可以省略或必須屬於 `string` 類型", "vscode.extension.contributes.menuItem.command": "所要執行命令的識別碼。命令必須在 'commands' 區段中宣告", "vscode.extension.contributes.menuItem.alt": "所要執行替代命令的識別碼。命令必須在 'commands' 區段中宣告", diff --git a/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json index 7ab7c658bae38..2064ef5c17873 100644 --- a/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -7,6 +7,7 @@ "invalid.color": "色彩格式無效。請使用 #RGB、#RGBA、#RRGGBB 或 #RRGGBBAA", "schema.colors": "工作台中使用的色彩。", "foreground": "整體的前景色彩。僅當未被任何元件覆疊時,才會使用此色彩。", + "errorForeground": "整體錯誤訊息的前景色彩。僅當未被任何元件覆蓋時,才會使用此色彩。", "focusBorder": "焦點項目的整體邊界色彩。只在沒有任何元件覆寫此色彩時,才會加以使用。", "contrastBorder": "項目周圍的額外邊界,可將項目從其他項目中區隔出來以提高對比。", "activeContrastBorder": "使用中項目周圍的額外邊界,可將項目從其他項目中區隔出來以提高對比。", @@ -28,8 +29,6 @@ "listActiveSelectionBackground": "當清單/樹狀為使用中狀態時,所選項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", "listInactiveSelectionBackground": "當清單/樹狀為非使用中狀態時,所選項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", "listActiveSelectionForeground": "當清單/樹狀為使用中狀態時,所選項目的清單/樹狀前景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", - "listFocusAndSelectionBackground": "當清單/樹狀為使用中狀態時,焦點和所選項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。此色彩優先於個別選取項目及焦點色彩。", - "listFocusAndSelectionForeground": "當清單/樹狀為使用中狀態時,焦點和所選項目的清單/樹狀前景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。此色彩優先於個別選取項目及焦點色彩。", "listHoverBackground": "使用滑鼠暫留在項目時的清單/樹狀背景。", "listDropBackground": "使用滑鼠四處移動項目時的清單/樹狀拖放背景。", "highlight": "在清單/樹狀內搜尋時,相符醒目提示的清單/樹狀前景色彩。", @@ -50,7 +49,9 @@ "editorFindMatch": "符合目前搜尋的色彩。", "findMatchHighlight": "符合其他搜尋的色彩。", "findRangeHighlight": "限制搜尋之範圍的色彩。", + "hoverHighlight": "在顯示了動態顯示的單字下方醒目提示。", + "hoverBackground": "編輯器動態顯示的背景色彩。", + "hoverBorder": "編輯器動態顯示的框線色彩。", "activeLinkForeground": "使用中之連結的色彩。", - "linkForeground": "連結的色彩。", "editorWidgetBackground": "編輯器小工具的背景色彩,例如尋找/取代。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/cht/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..24e5da7900523 --- /dev/null +++ b/i18n/cht/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "未註冊識別碼為 '{0}' 的 TreeExplorerNodeProvider。", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider '{0}' 無法提供根節點。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/cht/src/vs/workbench/browser/actions/configureLocale.i18n.json index 3e4cd2547c535..f0c2e15a1002f 100644 --- a/i18n/cht/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,7 +7,6 @@ "configureLocale": "設定語言", "displayLanguage": "定義 VSCode 的顯示語言。", "doc": "如需支援的語言清單,請參閱 {0}。", - "restart": "變更值必須重新啟動 VSCode。", "fail.createSettings": "無法建立 '{0}' ({1})。", "JsonSchema.locale": "要使用的 UI 語言。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/common/theme.i18n.json b/i18n/cht/src/vs/workbench/common/theme.i18n.json index ad80aac308959..2d8bce1a6366a 100644 --- a/i18n/cht/src/vs/workbench/common/theme.i18n.json +++ b/i18n/cht/src/vs/workbench/common/theme.i18n.json @@ -4,19 +4,14 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "索引標籤容器的背景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", "tabActiveBackground": "使用中之索引標籤的背景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", "tabInactiveBackground": "非使用中之索引標籤的背景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", "tabBorder": "用以分隔索引標籤彼此的框線。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", "tabActiveEditorGroupActiveForeground": "使用中的群組內,使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "tabActiveEditorGroupInactiveForeground": "非使用中的群組內,使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", "tabInactiveEditorGroupActiveForeground": "使用中的群組內,非使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "tabInactiveEditorGroupInactiveForeground": "非使用中的群組內,非使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", "editorGroupBackground": "編輯器群組的背景色彩。編輯器群組是編輯器的容器。當拖曳編輯器群組時會顯示背景色彩。", "editorGroupHeaderBackground": "當索引標籤禁用的時候編輯器群組標題的背景顏色。編輯器群組是編輯器的容器。", "editorGroupBorder": "用以分隔多個編輯器群組彼此的色彩。編輯器群組是編輯器的容器。", - "editorDragAndDropBackground": "拖曳編輯器時的背景色彩。", - "editorMasterDetailsBorder": "並排編輯器中將主視窗和詳細視窗分隔開的框線色彩。\n範例包括diff編輯器和設定編輯器。", "panelBackground": "面板的前景色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "panelBorder": "面板頂端用以分隔編輯器的邊框色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "panelActiveTitleForeground": "使用中之面板標題的標題色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", @@ -31,7 +26,6 @@ "statusBarProminentItemHoverBackground": "狀態列突出項目暫留時的背景顏色。突出項目比狀態列的其他項目更顯眼,用於表示重要性更高。狀態列會顯示在視窗的底部。", "activityBarBackground": "活動列背景的色彩。活動列會顯示在最左側或最右側,並可切換不同的提要欄位檢視。", "activityBarForeground": "活動列的前背景色彩(例如用於圖示)。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", - "activityBarDragAndDropBackground": "拖放活動列項目之意見回應時的色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", "activityBarBadgeBackground": "活動通知徽章的背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", "activityBarBadgeForeground": "活動通知徽章的前背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", "sideBarBackground": "提要欄位的背景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", diff --git a/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json index f23a60a5640b8..c1874024aee5c 100644 --- a/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -41,7 +41,6 @@ "window.newWindowDimensions.inherit": "以相同於上一個使用中之視窗的維度開啟新視窗。", "window.newWindowDimensions.maximized": "開啟並最大化新視窗。", "window.newWindowDimensions.fullscreen": "在全螢幕模式下開啟新視窗。", - "newWindowDimensions": "控制開啟新視窗的維度。根據預設,新視窗會以小型維度在畫面中央開啟。設為 'inherit' 時,視窗的維度會和上一個使用中視窗相同。設為 'maximized' 時,視窗會開到最大,若設為 'fullscreen' 則全螢幕開啟。", "window.menuBarVisibility.default": "只在全螢幕模式時隱藏功能表。", "window.menuBarVisibility.visible": "一律顯示功能表,即使在全螢幕模式時亦然。", "window.menuBarVisibility.toggle": "隱藏功能表,但可經由 Alt 鍵加以顯示。", diff --git a/i18n/cht/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..e2098f79ad8ea --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "按一下以追蹤 (Cmd + 按一下滑鼠左鍵開至側邊)", + "fileLink": "按一下以追蹤 (Ctrl + 按一下滑鼠左鍵開至側邊)" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..63a60fc01a22c --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "內部偵錯主控台的控制項行為。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index 1c7a91ba5c951..e7982d93dfd16 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "stateCapture": "第一次評估會擷取物件狀態", - "fileLinkMac": "按一下以追蹤 (Cmd + 按一下滑鼠左鍵開至側邊)", - "fileLink": "按一下以追蹤 (Ctrl + 按一下滑鼠左鍵開至側邊)", "replVariableAriaLabel": "變數 {0} 具有值 {1},「讀取、求值、輸出」迴圈,偵錯", "replExpressionAriaLabel": "運算式 {0} 具有值 {1},「讀取、求值、輸出」迴圈,偵錯", "replValueOutputAriaLabel": "{0},「讀取、求值、輸出」迴圈,偵錯", diff --git a/i18n/cht/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index d2d63b8b78c2e..fbd7d7b23df6e 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,13 +7,11 @@ "debugAdapterBinNotFound": "偵錯配接器可執行檔 '{0}' 不存在。", "debugAdapterCannotDetermineExecutable": "無法判斷偵錯配接器 '{0}' 的可執行檔。", "debugType": "組態的類型。", - "debugTypeNotRecognised": "無法辨識此偵錯類型。請安裝對應的偵錯延伸模組。", "node2NotSupported": "\"node2\" 已不再支援,請改用 \"node\",並將 \"protocol\" 屬性設為 \"inspector\"。", "debugName": "組態的名稱; 出現在啟動組態下拉式功能表中。", "debugRequest": "要求組態的類型。可以是 [啟動] 或 [附加]。", "debugServer": "僅限偵錯延伸模組開發: 如果指定了連接埠,VS Code 會嘗試連線至以伺服器模式執行的偵錯配接器", "debugPrelaunchTask": "偵錯工作階段啟動前要執行的工作。", - "internalConsoleOptions": "內部偵錯主控台的控制項行為。", "debugWindowsConfiguration": "Windows 特定的啟動設定屬性。", "debugOSXConfiguration": "OS X 特定的啟動設定屬性。", "debugLinuxConfiguration": "Linux 特定的啟動設定屬性。", diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 785e1cb774aca..7855f3a13f51b 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -8,5 +8,7 @@ "showRecommendations": "顯示建議", "neverShowAgain": "不要再顯示", "close": "關閉", - "workspaceRecommended": "此工作區具有擴充功能建議。" + "workspaceRecommended": "此工作區具有擴充功能建議。", + "no": "否", + "cancel": "取消" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index d18aa96ecafbc..07e8bfd596319 100644 --- a/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -27,8 +27,6 @@ "autoSaveDelay": "控制要自動儲存已變更之檔案前必須經過的延遲時間 (毫秒)。僅當 'files.autoSave' 設為 \"{0}\" 時才適用。", "watcherExclude": "將檔案路徑的 Glob 模式設定為從檔案監控排除。需要重新啟動才能變更此設定。當您發現 Code 在啟動時使用大量 CPU 時間時,可以排除較大的資料夾以降低初始負載。", "hotExit.off": "停用 Hot Exit。", - "hotExit.onExit": "Hot Exit 將會在關閉應用程式時觸發,也就是在 Windows/Linux 上關閉上一個視窗,或是觸發 workbench.action.quit 命令 (命令選擇區、按鍵繫結關係、功能表) 時觸發。具有備份的所有視窗都會在下次啟動時還原。", - "hotExit.onExitAndWindowClose": "Hot Exit 將會在關閉應用程式時觸發,也就是在 Windows/Linux 上關閉上一個視窗,或是觸發 workbench.action.quit 命令 (命令選擇區、按鍵繫結關係、功能表) 時觸發,也會針對已開啟資料夾的任何視窗觸發,而不論其是否為上一個視窗。具有備份的所有視窗都會在下次啟動時還原。若要將資料夾視窗還原成關機前的狀態,請將 \"window.reopenFolders\" 設定為 \"all\"。", "hotExit": "控制是否讓不同工作階段記住未儲存的檔案,並允許在結束編輯器時跳過儲存提示。", "defaultLanguage": "指派給新檔案的預設語言模式。", "editorConfigurationTitle": "編輯器", diff --git a/i18n/cht/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/cht/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index e2c76d595ed39..0dacece483983 100644 --- a/i18n/cht/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,7 +6,5 @@ { "searchMatches": "找到 {0} 個相符", "searchMatch": "找到 {0} 個相符", - "fileMatchAriaLabel": "資料夾 {2} 的檔案 {1} 中有 {0} 個相符,搜尋結果", - "replacePreviewResultAria": "取代預覽結果,{0}", - "searchResultAria": "{0},搜尋結果" + "fileMatchAriaLabel": "資料夾 {2} 的檔案 {1} 中有 {0} 個相符,搜尋結果" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index c0537ee4cdfbc..f73c9b1e8a6dd 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -18,7 +18,6 @@ "problems": "問題", "manyMarkers": "99+", "tasks": "工作", - "TaskSystem.noHotSwap": "變更工作執行引擎需要重新啟動 VS Code。已略過變更。", "TaskService.noBuildTask": "未定義任何建置工作。請使用 'isBuildCommand' 標記 tasks.json 檔案中的工作。", "TaskService.noTestTask": "未定義任何建置工作。請使用 'isTestCommand' 標記 tasks.json 檔案中的工作。", "TaskServer.noTask": "找不到所要求要執行的工作 {0}。", diff --git a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index d5c740838a659..891c5bae600c1 100644 --- a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,7 +6,6 @@ { "selectTheme.label": "色彩佈景主題", "installColorThemes": "安裝其他的色彩佈景主題...", - "problemChangingTheme": "設定佈景主題時發生問題: {0}", "themes.selectTheme": "選取色彩佈景主題", "selectIconTheme.label": "檔案圖示佈景主題", "installIconThemes": "安裝其他的檔案圖示主題...", diff --git a/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 377d6da8f30b3..95764540d13c9 100644 --- a/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -5,10 +5,5 @@ // Do not edit this file. It is machine generated. { "errorUnknownKey": "無法寫入組態檔 (不明的按鍵)", - "errorInvalidTarget": "無法寫入組態檔 (目標無效)", - "errorNoWorkspaceOpened": "因為未開啟任何資料夾,所以無法寫入設定。請開啟資料夾後再試一次。", - "errorInvalidConfiguration": "無法寫入設定。請開啟 **使用者設定** 以修正檔案中的錯誤/警告後再試一次。", - "errorInvalidConfigurationWorkspace": "無法寫入設定。請開啟 **工作區設定** 以修正檔案中的錯誤/警告後再試一次。", - "errorConfigurationFileDirty": "因為檔案已變更,所以無法寫入設定。請儲存 **使用者設定** 檔案後再試一次。", - "errorConfigurationFileDirtyWorkspace": "因為檔案已變更,所以無法寫入設定。請儲存 **工作區設定** 檔案後再試一次。" + "errorInvalidTarget": "無法寫入組態檔 (目標無效)" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/cht/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 02d0580da7628..783e49215581b 100644 --- a/i18n/cht/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -14,9 +14,6 @@ "vscode.extension.contributes.keybindings.win": "Windows 特定按鍵或按鍵順序。", "vscode.extension.contributes.keybindings.when": "按鍵為使用中時的條件。", "vscode.extension.contributes.keybindings": "提供按鍵繫結關係。", - "openDocumentation": "深入了解", - "keybindingMigration.ok": "確定", - "keybindingMigration.prompt": "您的鍵盤配置已有一些鍵盤快速鍵變更了。", "invalid.keybindings": "`contributes.{0}` 無效: {1}", "unboundCommands": "其他可用命令如下: ", "keybindings.json.title": "按鍵繫結關係組態", diff --git a/i18n/deu/extensions/git/out/commands.i18n.json b/i18n/deu/extensions/git/out/commands.i18n.json index ee0bf8628561a..d0fbcdb0a28f6 100644 --- a/i18n/deu/extensions/git/out/commands.i18n.json +++ b/i18n/deu/extensions/git/out/commands.i18n.json @@ -18,6 +18,8 @@ "discard": "Änderungen verwerfen", "confirm discard all": "Möchten Sie wirklich ALLE Änderungen verwerfen? Dieser Vorgang kann nicht rückgängig gemacht werden!", "discardAll": "ALLE Änderungen verwerfen", + "yes": "Ja", + "always": "Immer", "no changes": "Keine Änderungen zum Speichern vorhanden.", "commit message": "Commit-Nachricht", "provide commit message": "Geben Sie eine Commit-Nachrichte ein.", diff --git a/i18n/deu/extensions/git/package.i18n.json b/i18n/deu/extensions/git/package.i18n.json index 91f8db11a7f28..379f38b08feb3 100644 --- a/i18n/deu/extensions/git/package.i18n.json +++ b/i18n/deu/extensions/git/package.i18n.json @@ -11,7 +11,7 @@ "command.openFile": "Datei öffnen", "command.stage": "Änderungen bereitstellen", "command.stageAll": "Alle Änderungen bereitstellen", - "command.stageSelectedRanges": "Gewählte Bereiche staffeln", + "command.stageSelectedRanges": "Gewählte Bereiche bereitstellen", "command.revertSelectedRanges": "Ausgewählte Bereiche zurücksetzen", "command.unstage": "Bereitstellung der Änderungen aufheben", "command.unstageAll": "Bereitstellung aller Änderungen aufheben", @@ -20,7 +20,7 @@ "command.cleanAll": "Alle Änderungen verwerfen", "command.commit": "Commit", "command.commitStaged": "Commit bereitgestellt", - "command.commitStagedSigned": "Gestaffelt committen (abgemeldet)", + "command.commitStagedSigned": "Bereitgestelltes committen (unterzeichnet)", "command.commitAll": "Commit für alle ausführen", "command.commitAllSigned": "Alle committen (abgemeldet)", "command.undoCommit": "Letzten Commit rückgängig machen", diff --git a/i18n/deu/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/deu/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/extensions/typescript/package.i18n.json b/i18n/deu/extensions/typescript/package.i18n.json index 61d500f2b8473..d749c1d297fec 100644 --- a/i18n/deu/extensions/typescript/package.i18n.json +++ b/i18n/deu/extensions/typescript/package.i18n.json @@ -35,7 +35,6 @@ "javascript.goToProjectConfig.title": "Zur Projektkonfiguration wechseln", "typescript.referencesCodeLens.enabled": "Aktiviert oder deaktiviert CodeLens-Verweise. Erfordert TypeScript 2.0.6 oder höher.", "typescript.implementationsCodeLens.enabled": "Aktiviert oder deaktiviert CodeLens-Implementierungen. Erfordert TypeScript 2.2.0 oder höher.", - "typescript.openTsServerLog.title": "TS Server-Protokolldatei öffnen", "typescript.selectTypeScriptVersion.title": "TypeScript-Version wählen", "jsDocCompletion.enabled": "Automatische JSDoc-Kommentare aktivieren/deaktivieren", "javascript.implicitProjectConfig.checkJs": "Aktiviert/deaktiviert die Semantikprüfung bei JavaScript-Dateien. Diese Einstellung wird von vorhandenen \"jsconfig.json\"- oder \"tsconfig.json\"-Dateien außer Kraft gesetzt. Erfordert TypeScript 2.3.1 oder höher.", diff --git a/i18n/deu/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/deu/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/code/electron-main/menus.i18n.json b/i18n/deu/src/vs/code/electron-main/menus.i18n.json index 55751eba86739..9b4d51238e421 100644 --- a/i18n/deu/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/deu/src/vs/code/electron-main/menus.i18n.json @@ -69,7 +69,6 @@ "miSmartSelectShrink": "Au&&swahl verkleinern", "miViewExplorer": "&&Explorer", "miViewSearch": "&&Suchen", - "miViewGit": "&&Git", "miViewDebug": "&&Debuggen", "miViewExtensions": "E&&xtensions", "miToggleOutput": "&&Ausgabe", diff --git a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json index 2fe70e62eed2e..c3e22e8d6713c 100644 --- a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -62,6 +62,7 @@ "renderLineHighlight": "Steuert, wie der Editor die aktuelle Zeilenhervorhebung rendern soll. Mögliche Werte sind \"none\", \"gutter\", \"line\" und \"all\".", "codeLens": "Steuert, ob der Editor CodeLenses anzeigt.", "folding": "Steuert, ob für den Editor Codefaltung aktiviert ist.", + "hideFoldIcons": "Steuert, ob die Falt-Symbole an der Leiste automatisch ausgeblendet werden.", "matchBrackets": "Übereinstimmende Klammern hervorheben, wenn eine davon ausgewählt wird.", "glyphMargin": "Steuert, ob der Editor den vertikalen Glyphenrand rendert. Der Glyphenrand wird hauptsächlich zum Debuggen verwendet.", "useTabStops": "Das Einfügen und Löschen von Leerzeichen folgt auf Tabstopps.", diff --git a/i18n/deu/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/deu/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..2e06d6b808ae3 --- /dev/null +++ b/i18n/deu/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorViewAccessibleLabel": "Editor-Inhalt" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/deu/src/vs/editor/contrib/hover/browser/hover.i18n.json index d1a57ea327423..44bcefc08052b 100644 --- a/i18n/deu/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "Hovern anzeigen", - "hoverHighlight": "Hervorhebung eines Worts, unter dem ein Mauszeiger angezeigt wird.", - "hoverBackground": "Background color of the editor hover.", - "hoverBorder": "Rahmenfarbe des Editor-Mauszeigers." + "showHover": "Hovern anzeigen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index 5423f336ae329..d115a4e214a9e 100644 --- a/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -16,8 +16,6 @@ "peekViewTitleInfoForeground": "Farbe der Titelinformationen in der Peek-Ansicht.", "peekViewBorder": "Farbe der Peek-Ansichtsränder und des Pfeils.", "peekViewResultsBackground": "Hintergrundfarbe der Ergebnisliste in der Peek-Ansicht.", - "peekViewResultsMatchForeground": "Vordergrund für Übereinstimmungseinträge in der Ergebnisliste der Peek-Ansicht.", - "peekViewResultsFileForeground": "Vordergrund für Dateieinträge in der Ergebnisliste der Peek-Ansicht.", "peekViewResultsSelectionBackground": "Hintergrundfarbe des ausgewählten Eintrags in der Ergebnisliste der Peek-Ansicht.", "peekViewResultsSelectionForeground": "Vordergrundfarbe des ausgewählten Eintrags in der Ergebnisliste der Peek-Ansicht.", "peekViewEditorBackground": "Hintergrundfarbe des Peek-Editors.", diff --git a/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 7e17060c7d1be..b63b3d4189850 100644 --- a/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,10 +9,8 @@ "editorSuggestWidgetForeground": "Vordergrundfarbe des Vorschlagswidgets.", "editorSuggestWidgetSelectedBackground": "Hintergrundfarbe des ausgewählten Eintrags im Vorschlagswidget.", "editorSuggestWidgetHighlightForeground": "Farbe der Trefferhervorhebung im Vorschlagswidget.", - "readMore": "Mehr anzeigen...{0}", "suggestionWithDetailsAriaLabel": "{0}, Vorschlag, hat Details", "suggestionAriaLabel": "{0}, Vorschlag", - "goback": "Zurück", "suggestWidget.loading": "Wird geladen...", "suggestWidget.noSuggestions": "Keine Vorschläge.", "suggestionAriaAccepted": "{0}, angenommen", diff --git a/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json index cbffdc177519f..f29acd7968206 100644 --- a/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -28,8 +28,6 @@ "listActiveSelectionBackground": "Hintergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", "listInactiveSelectionBackground": "Hintergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur inaktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", "listActiveSelectionForeground": "Vordergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", - "listFocusAndSelectionBackground": "Hintergrundfarbe der Liste/Struktur für das fokussierte und ausgewählte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht. Diese Farbe hat Vorrang vor der individuellen Auswahl und den Fokusfarben.", - "listFocusAndSelectionForeground": "Vordergrundfarbe der Liste/Struktur für das fokussierte und ausgewählte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht. Diese Farbe hat Vorrang vor der individuellen Auswahl und den Fokusfarben.", "listHoverBackground": "Hintergrund der Liste/Struktur, wenn mit der Maus auf Elemente gezeigt wird.", "listDropBackground": "Drag & Drop-Hintergrund der Liste/Struktur, wenn Elemente mithilfe der Maus verschoben werden.", "highlight": "Vordergrundfarbe der Liste/Struktur zur Trefferhervorhebung beim Suchen innerhalb der Liste/Struktur.", @@ -50,7 +48,9 @@ "editorFindMatch": "Farbe des aktuellen Suchergebnisses.", "findMatchHighlight": "Farbe der anderen Suchtreffer.", "findRangeHighlight": "Farbe des Bereichs zur Einschränkung der Suche.", + "hoverHighlight": "Hervorhebung eines Worts, unter dem ein Mauszeiger angezeigt wird.", + "hoverBackground": "Background color of the editor hover.", + "hoverBorder": "Rahmenfarbe des Editor-Mauszeigers.", "activeLinkForeground": "Farbe der aktiven Links.", - "linkForeground": "Farbe der Links.", "editorWidgetBackground": "Hintergrundfarbe von Editor-Widgets wie zum Beispiel Suchen/Ersetzen." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/deu/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..c6eed83d99907 --- /dev/null +++ b/i18n/deu/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "Es ist kein TreeExplorerNodeProvider mit ID \"{0}\" registriert.", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider \"{0}\" hat keinen Stammknoten bereitgestellt." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/deu/src/vs/workbench/browser/actions/configureLocale.i18n.json index 32abf05f8cb70..a6835e15a6da5 100644 --- a/i18n/deu/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,7 +7,6 @@ "configureLocale": "Sprache konfigurieren", "displayLanguage": "Definiert die Anzeigesprache von VSCode.", "doc": "Unter {0} finden Sie eine Liste der unterstützten Sprachen.", - "restart": "Das Ändern des Werts erfordert einen Neustart von VSCode.", "fail.createSettings": "{0} ({1}) kann nicht erstellt werden.", "JsonSchema.locale": "Die zu verwendende Sprache der Benutzeroberfläche." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/common/theme.i18n.json b/i18n/deu/src/vs/workbench/common/theme.i18n.json index 3fab9e56ce5bd..825c4c4c37769 100644 --- a/i18n/deu/src/vs/workbench/common/theme.i18n.json +++ b/i18n/deu/src/vs/workbench/common/theme.i18n.json @@ -4,19 +4,14 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "Hintergrundfarbe der aktiven Registerkarte. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", "tabActiveBackground": "Hintergrundfarbe der aktiven Registerkarte. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", "tabInactiveBackground": "Hintergrundfarbe der inaktiven Registerkarte. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", "tabBorder": "Rahmen zum Trennen von Registerkarten. Registerkarten sind die Container für Editoren im Editor-Bereich. In einer Editor-Gruppe können mehrere Registerkarten geöffnet werden. Mehrere Editor-Gruppen sind möglich.", "tabActiveEditorGroupActiveForeground": "Vordergrundfarbe der aktiven Registerkarte in einer aktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", - "tabActiveEditorGroupInactiveForeground": "Vordergrundfarbe der aktiven Registerkarte in einer inaktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", "tabInactiveEditorGroupActiveForeground": "Vordergrundfarbe der inaktiven Registerkarte in einer aktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", - "tabInactiveEditorGroupInactiveForeground": "Vordergrundfarbe der inaktiven Registerkarte in einer inaktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", "editorGroupBackground": "Hintergrundfarbe einer Editor-Gruppe. Editor-Gruppen sind die Container der Editoren. Die Hintergrundfarbe wird beim Ziehen von Editoren angezeigt.", "editorGroupHeaderBackground": "Hintergrundfarbe der Titelüberschrift des Editors, wenn die Registerkarten deaktiviert sind. Editor-Gruppen sind die Container der Editoren.", "editorGroupBorder": "Farbe zum Trennen mehrerer Editor-Gruppen. Editor-Gruppen sind die Container der Editoren.", - "editorDragAndDropBackground": "Hintergrundfarbe beim Ziehen von Editoren.", - "editorMasterDetailsBorder": "Rahmenfarbe zum Trennen der Details der Masterseite für Editoren mit der Ansicht \"Nebeneinander\". Beispiele sind etwa Diff-Editoren und der Einstellungseditor.", "panelBackground": "Hintergrundfarbe des Panels. Panels werden unter dem Editorbereich angezeigt und enthalten Ansichten wie die Ausgabe und das integrierte Terminal.", "panelBorder": "Farbe des oberen Panelrahmens, der das Panel vom Editor abtrennt. Panels werden unter dem Editorbereich angezeigt und enthalten Ansichten wie die Ausgabe und das integrierten Terminal.", "panelActiveTitleForeground": "Titelfarbe für den aktiven Bereich. Bereiche werden unter dem Editorbereich angezeigt und enthalten Ansichten wie Ausgabe und integriertes Terminal.", @@ -31,7 +26,6 @@ "statusBarProminentItemHoverBackground": "Hintergrundfarbe für markante Elemente der Statusleiste, wenn auf diese gezeigt wird. Markante Elemente sind im Vergleich zu anderen Statusleisteneinträgen hervorgehoben, um auf ihre Bedeutung hinzuweisen. Die Statusleiste wird unten im Fenster angezeigt.", "activityBarBackground": "Hintergrundfarbe der Aktivitätsleiste. Die Aktivitätsleiste wird ganz links oder rechts angezeigt und ermöglicht das Wechseln zwischen verschiedenen Ansichten der Seitenleiste.", "activityBarForeground": "Vordergrundfarbe der Aktivitätsleiste (z. B. für Symbole). Die Aktivitätsleiste wird ganz links oder rechts angezeigt und ermöglicht das Wechseln zwischen verschiedenen Ansichten der Seitenleiste.", - "activityBarDragAndDropBackground": "Drag Drop-Feedbackfarbe für Elemente der Aktivitätsleiste. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", "activityBarBadgeBackground": "Hintergrundfarbe für Aktivitätsinfobadge. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", "activityBarBadgeForeground": "Vordergrundfarbe für Aktivitätsinfobadge. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", "sideBarBackground": "Hintergrundfarbe der Seitenleiste. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", diff --git a/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json index 9f73db52ca6bb..e519ed643e29c 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -41,7 +41,6 @@ "window.newWindowDimensions.inherit": "Öffnet neue Fenster mit den gleichen Abmessungen wie das letzte aktive Fenster.", "window.newWindowDimensions.maximized": "Öffnet neue Fenster maximiert.", "window.newWindowDimensions.fullscreen": "Öffnet neue Fenster im Vollbildmodus.", - "newWindowDimensions": "Steuert die Abmessungen beim Öffnen eines neuen Fensters. Standardmäßig wird in der Mitte des Bildschirms ein neues Fenster mit kleinen Abmessungen geöffnet. Bei der Einstellung \"inherit\" erhält das Fenster die gleichen Abmessungen wie das letzte aktive Fenster. Bei der Einstellung \"maximized\" wird das Fenster maximiert geöffnet, und bei \"fullscreen\" wird es im Vollbildmodus geöffnet.", "window.menuBarVisibility.default": "Das Menü ist nur im Vollbildmodus ausgeblendet.", "window.menuBarVisibility.visible": "Das Menu wird immer angezeigt, auch im Vollbildmodus.", "window.menuBarVisibility.toggle": "Das Menu ist ausgeblendet, kann aber mit der Alt-Taste angezeigt werden.", diff --git a/i18n/deu/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..0506a861bbff7 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "Zum Öffnen klicken (CMD+KLICKEN für seitliche Anzeige)", + "fileLink": "Zum Öffnen klicken (STRG+KLICKEN für seitliche Anzeige)" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..a4c31f57de44c --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "Steuert das Verhalten der internen Debugging-Konsole." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index a145fe55185c4..dded802b64caa 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "stateCapture": "Der Objektstatus wird aus der ersten Auswertung erfasst.", - "fileLinkMac": "Zum Öffnen klicken (CMD+KLICKEN für seitliche Anzeige)", - "fileLink": "Zum Öffnen klicken (STRG+KLICKEN für seitliche Anzeige)", "replVariableAriaLabel": "Variable {0} besitzt den Wert {1}, Read Eval Print-Loop, Debuggen", "replExpressionAriaLabel": "Ausdruck {0} besitzt den Wert {1}, Read Eval Print-Loop, Debuggen", "replValueOutputAriaLabel": "{0}, Read Eval Print-Loop, Debuggen", diff --git a/i18n/deu/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 7f72591cc14a9..094d1188c24e2 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,13 +7,11 @@ "debugAdapterBinNotFound": "Die ausführbare Datei \"{0}\" des Debugadapters ist nicht vorhanden.", "debugAdapterCannotDetermineExecutable": "Die ausführbare Datei \"{0}\" des Debugadapters kann nicht bestimmt werden.", "debugType": "Der Typ der Konfiguration.", - "debugTypeNotRecognised": "Dieser Debugging-Typ wurde nicht erkannt. Bitte installiere die dazugehörige Debugging-Erweiterung.", "node2NotSupported": "\"node2\" wird nicht mehr unterstützt, verwenden Sie stattdessen \"node\", und legen Sie das Attribut \"protocol\" auf \"inspector\" fest.", "debugName": "Der Name der Konfiguration. Er wird im Dropdownmenü der Startkonfiguration angezeigt.", "debugRequest": "Der Anforderungstyp der Konfiguration. Der Wert kann \"launch\" oder \"attach\" sein.", "debugServer": "Nur für die Entwicklung von Debugerweiterungen: Wenn ein Port angegeben ist, versucht der VS-Code, eine Verbindung mit einem Debugadapter herzustellen, der im Servermodus ausgeführt wird.", "debugPrelaunchTask": "Ein Task, der ausgeführt werden soll, bevor die Debugsitzung beginnt.", - "internalConsoleOptions": "Steuert das Verhalten der internen Debugging-Konsole.", "debugWindowsConfiguration": "Windows-spezifische Startkonfigurationsattribute.", "debugOSXConfiguration": "OS X-spezifische Startkonfigurationsattribute.", "debugLinuxConfiguration": "Linux-spezifische Startkonfigurationsattribute.", diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index e734318d0be7c..ab33ef36c7a61 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -8,5 +8,7 @@ "showRecommendations": "Empfehlungen anzeigen", "neverShowAgain": "Nicht mehr anzeigen", "close": "Schließen", - "workspaceRecommended": "Für diesen Arbeitsbereich sind Extensionempfehlungen verfügbar." + "workspaceRecommended": "Für diesen Arbeitsbereich sind Extensionempfehlungen verfügbar.", + "no": "Nein", + "cancel": "Abbrechen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 6613fe557a2cd..8880b15033b99 100644 --- a/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -27,8 +27,6 @@ "autoSaveDelay": "Steuert die Verzögerung in Millisekunden, nach der eine geänderte Datei automatisch gespeichert wird. Nur gültig, wenn \"files.autoSave\" auf \"{0}\" festgelegt ist.", "watcherExclude": "Konfigurieren Sie Globmuster von Dateipfaden, die aus der Dateiüberwachung ausgeschlossen werden sollen. Das Ändern dieser Einstellung erfordert einen Neustart. Wenn Ihr Code beim Starten viel CPU-Zeit benötigt, können Sie große Ordner ausschließen, um die Anfangslast zu verringern.", "hotExit.off": "Hot Exit deaktivieren.", - "hotExit.onExit": "Hot Exit wird beim Schließen der Anwendung ausgelöst, d. h. wenn unter Windows/Linux das letzte Fenster geschlossen wird oder wenn der Befehl \"workbench.action.quit\" ausgelöst wird (Befehlspalette, Tastenzuordnung, Menü). Alle Fenster mit Sicherungen werden beim nächsten Start wiederhergestellt.", - "hotExit.onExitAndWindowClose": "Hot Exit wird beim Schließen der Anwendung ausgelöst, d. h. wenn unter Windows/Linux das letzte Fenster geschlossen wird oder wenn der Befehl \"workbench.action.quit\" ausgelöst wird (Befehlspalette, Tastenzuordnung, Menü) sowie für jedes Fenster mit einem geöffneten Ordner, unabhängig davon, ob dies das letzte Fenster ist. Alle Fenster ohne geöffnete Ordner werden beim nächsten Start wiederhergestellt. Legen Sie \"window.reopenFolders\" auf \"all\" fest, damit die Ordnerfenster wie vor dem Heruntergefahren wiederhergestellt werden.", "hotExit": "Steuert, ob nicht gespeicherten Dateien zwischen den Sitzungen beibehlten werden, die Aufforderung zum Speichern wird beim Beenden des Editors übersprungen.", "defaultLanguage": "Der Standardsprachmodus, der neuen Dateien zugewiesen wird.", "editorConfigurationTitle": "Editor", diff --git a/i18n/deu/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/deu/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index c15dc7a27b912..e7724dc5035c5 100644 --- a/i18n/deu/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,7 +6,5 @@ { "searchMatches": "{0} Übereinstimmungen gefunden", "searchMatch": "{0} Übereinstimmung gefunden", - "fileMatchAriaLabel": "{0} Übereinstimmungen in der Datei \"{1}\" des Ordners \"{2}\", Suchergebnis", - "replacePreviewResultAria": "Vorschauergebnis ersetzen, {0}", - "searchResultAria": "{0}, Suchergebnis" + "fileMatchAriaLabel": "{0} Übereinstimmungen in der Datei \"{1}\" des Ordners \"{2}\", Suchergebnis" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 49ebe70befe15..aedbe077c16f7 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -18,7 +18,6 @@ "problems": "Probleme", "manyMarkers": "mehr als 99", "tasks": "Aufgaben", - "TaskSystem.noHotSwap": "Zum Ändern des Aufgabenausführungsmoduls muss VS Code neu gestartet werden. Die Änderung wird ignoriert.", "TaskService.noBuildTask": "Keine Buildaufgabe definiert. Markieren Sie eine Aufgabe mit 'isBuildCommand' in der tasks.json-Datei.", "TaskService.noTestTask": "Keine Testaufgabe definiert. Markieren Sie eine Aufgabe mit 'isTestCommand' in der tasks.json-Datei.", "TaskServer.noTask": "Die angeforderte auszuführende Aufgabe {0} wurde nicht gefunden.", diff --git a/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 30cc79ff848c0..82b8c37894002 100644 --- a/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,7 +6,6 @@ { "selectTheme.label": "Farbdesign", "installColorThemes": "Zusätzliche Farbschemas installieren...", - "problemChangingTheme": "Problem beim Festlegen des Designs: {0}", "themes.selectTheme": "Farbdesign auswählen", "selectIconTheme.label": "Dateisymboldesign", "installIconThemes": "Zusätzliche Dateisymbolschemas installieren...", diff --git a/i18n/deu/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/deu/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 58ed1dbea5cba..c0942a6e2156d 100644 --- a/i18n/deu/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -5,10 +5,5 @@ // Do not edit this file. It is machine generated. { "errorUnknownKey": "Die Konfigurationsdatei kann nicht geschrieben werden (unbekannter Schlüssel).", - "errorInvalidTarget": "In die Konfigurationsdatei kann nicht geschrieben werden (ungültiges Ziel).", - "errorNoWorkspaceOpened": "Einstellungen können nicht geschrieben werden, weil kein Ordner geöffnet ist. Öffnen Sie zuerst einen Ordner, und versuchen Sie es erneut.", - "errorInvalidConfiguration": "Einstellungen können nicht geschrieben werden. Öffnen Sie **Benutzereinstellungen**, um Fehler/Warnungen in der Datei zu korrigieren, und versuchen Sie es erneut.", - "errorInvalidConfigurationWorkspace": "Einstellungen können nicht geschrieben werden. Öffnen Sie **Arbeitsbereichseinstellungen**, um Fehler/Warnungen in der Datei zu korrigieren, und versuchen Sie es erneut.", - "errorConfigurationFileDirty": "Einstellungen können nicht geschrieben werden, weil die Datei geändert wurde. Speichern Sie die Datei **Benutzereinstellungen\", und versuchen Sie es erneut.", - "errorConfigurationFileDirtyWorkspace": "Einstellungen können nicht geschrieben werden, weil die Datei geändert wurde. Speichern Sie die Datei **Arbeitsbereichseinstellungen\", und versuchen Sie es erneut." + "errorInvalidTarget": "In die Konfigurationsdatei kann nicht geschrieben werden (ungültiges Ziel)." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/deu/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 96626f238f8af..2bf19b5b05036 100644 --- a/i18n/deu/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -14,9 +14,6 @@ "vscode.extension.contributes.keybindings.win": "Der Windows-spezifische Schlüssel oder die Schlüsselsequenz.", "vscode.extension.contributes.keybindings.when": "Die Bedingung, wann der Schlüssel aktiv ist.", "vscode.extension.contributes.keybindings": "Trägt Tastenbindungen bei.", - "openDocumentation": "Weitere Informationen", - "keybindingMigration.ok": "OK", - "keybindingMigration.prompt": "Für Ihr Tastaturlayout haben sich einige Tastenkombinationen geändert.", "invalid.keybindings": "Ungültige Angabe \"contributes.{0}\": {1}", "unboundCommands": "Die folgenden weiteren Befehle sind verfügbar: ", "keybindings.json.title": "Tastenbindungskonfiguration", diff --git a/i18n/esn/extensions/git/out/commands.i18n.json b/i18n/esn/extensions/git/out/commands.i18n.json index 9dab0b5e8a8b5..db106e2f05c6c 100644 --- a/i18n/esn/extensions/git/out/commands.i18n.json +++ b/i18n/esn/extensions/git/out/commands.i18n.json @@ -18,6 +18,8 @@ "discard": "Descartar cambios", "confirm discard all": "¿Está seguro de que quiere descartar TODOS los cambios? Esta acción es irreversible.", "discardAll": "Descartar cambios", + "yes": "Sí", + "always": "Siempre", "no changes": "No hay cambios para confirmar.", "commit message": "Mensaje de confirmación", "provide commit message": "Proporcione un mensaje de confirmación", diff --git a/i18n/esn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/esn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/extensions/typescript/package.i18n.json b/i18n/esn/extensions/typescript/package.i18n.json index 28c86fc60602c..70f4c257c8f34 100644 --- a/i18n/esn/extensions/typescript/package.i18n.json +++ b/i18n/esn/extensions/typescript/package.i18n.json @@ -35,7 +35,6 @@ "javascript.goToProjectConfig.title": "Ir a configuración del proyecto", "typescript.referencesCodeLens.enabled": "Habilita o deshabilita referencias de CodeLens. Requiere TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Habilita o deshabilita implementaciones de CodeLens. Requiere TypeScript >= 2.2.0.", - "typescript.openTsServerLog.title": "Abrir archivo de registro del servidor de TS", "typescript.selectTypeScriptVersion.title": "Seleccionar versión de TypeScript", "jsDocCompletion.enabled": "Habilita o deshabilita comentarios automaticos de JSDoc", "javascript.implicitProjectConfig.checkJs": "Habilita/deshabilita la comprobación semántica de los archivos JavaScript. Los archivos jsconfig.json o tsconfig.json reemplazan esta configuración. Se requiere TypeScript >=2.3.1.", diff --git a/i18n/esn/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/esn/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/code/electron-main/menus.i18n.json b/i18n/esn/src/vs/code/electron-main/menus.i18n.json index 5e16ab703c732..156ec87d0034b 100644 --- a/i18n/esn/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/esn/src/vs/code/electron-main/menus.i18n.json @@ -14,6 +14,7 @@ "mHelp": "Ayuda", "miNewWindow": "&&Nueva ventana", "mAbout": "Acerca de {0}", + "mServices": "Servicios", "mHide": "Ocultar {0}", "mHideOthers": "Ocultar otros", "mShowAll": "Mostrar todo", @@ -69,7 +70,6 @@ "miSmartSelectShrink": "&&Reducir selección", "miViewExplorer": "&&Explorador", "miViewSearch": "&&Buscar", - "miViewGit": "&&Git", "miViewDebug": "&&Depurar", "miViewExtensions": "E&&xtensiones", "miToggleOutput": "&&Salida", diff --git a/i18n/esn/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/esn/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..b1da401aa984a --- /dev/null +++ b/i18n/esn/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorViewAccessibleLabel": "Contenido del editor" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/esn/src/vs/editor/common/view/editorColorRegistry.i18n.json index 6c525e9a52824..a34fb8f6c8094 100644 --- a/i18n/esn/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/esn/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -10,5 +10,7 @@ "caret": "Color del cursor del editor.", "editorWhitespaces": "Color de los caracteres de espacio en blanco del editor.", "editorIndentGuides": "Color de las guías de sangría del editor.", - "editorLineNumbers": "Color de números de línea del editor." + "editorLineNumbers": "Color de números de línea del editor.", + "editorCodeLensForeground": "Color principal de lentes de código en el editor", + "editorBracketMatchBackground": "Color de fondo tras corchetes coincidentes" } \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/esn/src/vs/editor/contrib/hover/browser/hover.i18n.json index 0ed29121caedb..c190af1321dad 100644 --- a/i18n/esn/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "Mostrar al mantener el puntero", - "hoverHighlight": "Resaltado debajo de la palabra para la que se muestra un recuadro al mantener el puntero.", - "hoverBackground": "Color de fondo al mantener el puntero en el editor.", - "hoverBorder": "Color del borde al mantener el puntero en el editor." + "showHover": "Mostrar al mantener el puntero" } \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index 21b8d8ce3d62f..d5f1fe00dd289 100644 --- a/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -16,8 +16,6 @@ "peekViewTitleInfoForeground": "Color de la información del título de la vista de inspección.", "peekViewBorder": "Color de los bordes y la flecha de la vista de inspección.", "peekViewResultsBackground": "Color de fondo de la lista de resultados de vista de inspección.", - "peekViewResultsMatchForeground": "Buscar coincidencia con el primer plano de entrada de la lista de resultados de vista de inspección.", - "peekViewResultsFileForeground": "Primer plano de la entrada de archivo en la lista de resultados de vista de inspección.", "peekViewResultsSelectionBackground": "Color de fondo de la entrada seleccionada en la lista de resultados de vista de inspección.", "peekViewResultsSelectionForeground": "Color de primer plano de la entrada seleccionada en la lista de resultados de vista de inspección.", "peekViewEditorBackground": "Color de fondo del editor de vista de inspección.", diff --git a/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index c39e54e06e856..6f314db4b76b9 100644 --- a/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,10 +9,8 @@ "editorSuggestWidgetForeground": "Color de primer plano del widget sugerido.", "editorSuggestWidgetSelectedBackground": "Color de fondo de la entrada seleccionada del widget sugerido.", "editorSuggestWidgetHighlightForeground": "Color del resaltado coincidido en el widget sugerido.", - "readMore": "Leer más...{0}", "suggestionWithDetailsAriaLabel": "{0}, sugerencia, con detalles", "suggestionAriaLabel": "{0}, sugerencia", - "goback": "Volver", "suggestWidget.loading": "Cargando...", "suggestWidget.noSuggestions": "No hay sugerencias.", "suggestionAriaAccepted": "{0}, aceptada", diff --git a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json index 9d9422600d4db..891fb1b41ee9a 100644 --- a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -28,8 +28,6 @@ "listActiveSelectionBackground": "Color de fondo de la lista o el árbol del elemento seleccionado cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", "listInactiveSelectionBackground": "Color de fondo de la lista o el árbol del elemento seleccionado cuando la lista o el árbol están inactivos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", "listActiveSelectionForeground": "Color de primer plano de la lista o el árbol del elemento con el foco cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", - "listFocusAndSelectionBackground": "Color de fondo de la lista o el árbol del elemento con foco y seleccionado cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no. Este color tiene preferencia sobre los colores de selección y foco individuales.", - "listFocusAndSelectionForeground": "Color de primer plano de la lista o el árbol del elemento con foco y seleccionado cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no. Este color tiene preferencia sobre los colores de selección y foco individuales.", "listHoverBackground": "Fondo de la lista o el árbol al mantener el mouse sobre los elementos.", "listDropBackground": "Fondo de arrastrar y colocar la lista o el árbol al mover los elementos con el mouse.", "highlight": "Color de primer plano de la lista o el árbol de las coincidencias resaltadas al buscar dentro de la lista o el ábol.", @@ -50,7 +48,9 @@ "editorFindMatch": "Color de la coincidencia de búsqueda actual.", "findMatchHighlight": "Color de las demás coincidencias de búsqueda.", "findRangeHighlight": "Color del intervalo que limita la búsqueda.", + "hoverHighlight": "Resaltado debajo de la palabra para la que se muestra un recuadro al mantener el puntero.", + "hoverBackground": "Color de fondo al mantener el puntero en el editor.", + "hoverBorder": "Color del borde al mantener el puntero en el editor.", "activeLinkForeground": "Color de los vínculos activos.", - "linkForeground": "Color de los vínculos.", "editorWidgetBackground": "Color de fondo del editor de widgets como buscar/reemplazar" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/esn/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..7d556561528df --- /dev/null +++ b/i18n/esn/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "No hay registrado ningún TreeExplorerNodeProvider con el identificador \"{0}\".", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider \"{0}\" no pudo proporcionar el nodo raíz." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/esn/src/vs/workbench/browser/actions/configureLocale.i18n.json index 21745b9eaa003..949ae20646f9a 100644 --- a/i18n/esn/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,7 +7,7 @@ "configureLocale": "Configurar idioma", "displayLanguage": "Define el lenguaje para mostrar de VSCode.", "doc": "Consulte {0} para obtener una lista de idiomas compatibles.", - "restart": "Al cambiar el valor, es necesario reiniciar VSCode.", + "restart": "Al cambiar el valor se requiere reiniciar VSCode.", "fail.createSettings": "No se puede crear '{0}' ({1}).", "JsonSchema.locale": "Idioma de la interfaz de usuario que debe usarse." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/common/theme.i18n.json b/i18n/esn/src/vs/workbench/common/theme.i18n.json index c6ab3bc258a0a..d75793eedac7e 100644 --- a/i18n/esn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/esn/src/vs/workbench/common/theme.i18n.json @@ -4,19 +4,14 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "Color de fondo del contenedor de las pestañas. Las pestañas son contenedores de editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores y puede haber varios grupos de editores.", "tabActiveBackground": "Color de fondo de la pestaña activa. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "tabInactiveBackground": "Color de fondo de la pestaña inactiva. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "tabBorder": "Borde para separar las pestañas entre sí. Las pestañas son contenedores de editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "tabActiveEditorGroupActiveForeground": "Color de primer plano de la pestaña activa en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", - "tabActiveEditorGroupInactiveForeground": "Color de primer plano de la pestaña activa en un grupo inactivo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "tabInactiveEditorGroupActiveForeground": "Color de primer plano de la pestaña inactiva en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", - "tabInactiveEditorGroupInactiveForeground": "Color de primer plano de la pestaña inactiva en un grupo inactivo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "editorGroupBackground": "Color de fondo de un grupo de editores. Los grupos de editores son los contenedores de los editores. El color de fondo se ve cuando se mueven arrastrando los grupos de editores.", "editorGroupHeaderBackground": "Color de fondo del encabezado del título del grupo de editores cuando las fichas están deshabilitadas. Los grupos de editores son contenedores de editores.", "editorGroupBorder": "Color para separar varios grupos de editores entre sí. Los grupos de editores son los contenedores de los editores.", - "editorDragAndDropBackground": "Color de fondo cuando se arrastran editores.", - "editorMasterDetailsBorder": "Color del borde para separar los detalles del lado maestro de editores en paralelo, por ejemplo el editor de diff y el de configuración.", "panelBackground": "Color de fondo del panel. Los paneles se muestran debajo del área de editores y contienen vistas, como Salida y Terminal integrado.", "panelBorder": "Color del borde superior del panel que lo separa del editor. Los paneles se muestran debajo del área de editores y contienen vistas, como Salida y Terminal integrado.", "panelActiveTitleForeground": "Color del título del panel activo. Los paneles se muestran debajo del área del editor y contienen vistas como Salida y Terminal integrado.", @@ -31,7 +26,6 @@ "statusBarProminentItemHoverBackground": "Color de fondo de los elementos destacados en la barra de estado cuando se mantiene el mouse sobre estos elementos. Estos elementos sobresalen para indicar importancia. La barra de estado está ubicada en la parte inferior de la ventana.", "activityBarBackground": "Color de fondo de la barra de actividad, que se muestra en el lado izquierdo o derecho y que permite cambiar entre diferentes vistas de la barra lateral.", "activityBarForeground": "Color de fondo de la barra de actividad (por ejemplo utilizado por los iconos). La barra de actividad muestra en el lado izquierdo o derecho y permite cambiar entre diferentes vistas de la barra lateral.", - "activityBarDragAndDropBackground": "Color de arrastrar y colocar comentarios de la barra de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", "activityBarBadgeBackground": "Color de fondo de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", "activityBarBadgeForeground": "Color de primer plano de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", "sideBarBackground": "Color de fondo de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", diff --git a/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json index 4ebbc371d0d4c..62df1ce4df923 100644 --- a/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -41,12 +41,12 @@ "window.newWindowDimensions.inherit": "Abrir las nuevas ventanas con la misma dimensión que la última activa.", "window.newWindowDimensions.maximized": "Abrir las nuevas ventanas maximizadas.", "window.newWindowDimensions.fullscreen": "Abrir las nuevas ventanas en modo de pantalla completa.", - "newWindowDimensions": "Controla las dimensiones de la apertura de una nueva ventana. De manera predeterminada, una nueva ventana se abrirá en el centro de la pantalla con dimensiones reducidas. Si se establece en \"inherit\", la ventana tendrá las mismas dimensiones que la última activa. Si se establece en \"maximized\", la ventana se abrirá en su valor máximo y a pantalla completa si se establece en \"fullscreen\".", "window.menuBarVisibility.default": "El menú solo está oculto en modo de pantalla completa.", "window.menuBarVisibility.visible": "El menú está siempre visible incluso en modo de pantalla completa.", "window.menuBarVisibility.toggle": "El menú está oculto pero se puede mostrar mediante la tecla Alt.", "window.menuBarVisibility.hidden": "El menú está siempre oculto.", "menuBarVisibility": "Controla la visibilidad de la barra de menús. El valor \"alternar\" significa que la barra de menús está oculta y que se mostrará al presionar una sola vez la tecla Alt. La barra de menús estará visible de forma predeterminada, a menos que se use el modo de pantalla completa para la ventana.", + "enableMenuBarMnemonics": "Si se activa, los menús principales se pueden abrir por mediación de los métodos abreviados Alt-tecla. Desactivar los mnemónicos permite vincular estos métodos Alt-tecla a comandos del editor.", "autoDetectHighContrast": "Si está habilitado, se cambiará automáticamente al tema de contraste alto si Windows utiliza un tema de contraste alto, y al tema oscuro si cambia desde un tema de contraste alto de Windows.", "titleBarStyle": "Ajuste la apariencia de la barra de título de la ventana. Se debe realizar un reinicio completo para aplicar los cambios.", "window.nativeTabs": "Habilita las fichas de ventana en macOS Sierra. Note que los cambios requieren que reinicie el equipo y las fichas nativas deshabilitan cualquier estilo personalizado que haya configurado.", diff --git a/i18n/esn/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..7b43ce773f7bd --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "Clic para seguir (Cmd + clic se abre en el lateral)", + "fileLink": "Clic para seguir (Ctrl + clic se abre en el lateral)" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..ba49f6334da9d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "Controla el comportamiento de la consola de depuración interna." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index e430f864249bb..c71edc9f51f89 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "stateCapture": "El estado del objeto se captura desde la primera evaluación", - "fileLinkMac": "Clic para seguir (Cmd + clic se abre en el lateral)", - "fileLink": "Clic para seguir (Ctrl + clic se abre en el lateral)", "replVariableAriaLabel": "La variable {0} tiene el valor {1}, read–eval–print loop, depuración", "replExpressionAriaLabel": "La expresión {0} tiene el valor {1}, read–eval–print loop, depuración", "replValueOutputAriaLabel": "{0}, read–eval–print loop, depuración", diff --git a/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 7a35ad366fb07..00a55728fff7c 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,13 +7,12 @@ "debugAdapterBinNotFound": "El ejecutable del adaptador de depuración \"{0}\" no existe.", "debugAdapterCannotDetermineExecutable": "No se puede determinar el ejecutable para el adaptador de depuración \"{0}\".", "debugType": "Tipo de configuración.", - "debugTypeNotRecognised": "Este tipo de depuración no se reconoce. Instale la correspondiente extensión de depuración.", + "debugTypeNotRecognised": "Este tipo de depuración no se reconoce. Compruebe que tiene instalada la correspondiente extensión de depuración y que está habilitada.", "node2NotSupported": "\"node2\" ya no se admite; use \"node\" en su lugar y establezca el atributo \"protocol\" en \"inspector\".", "debugName": "Nombre de la configuración. Aparece en el menú desplegable de la configuración de inicio.", "debugRequest": "Tipo de solicitud de la configuración. Puede ser \"launch\" o \"attach\".", "debugServer": "Solo para el desarrollo de extensiones de depuración: si se especifica un puerto, VS Code intenta conectarse a un adaptador de depuración que se ejecuta en modo servidor", "debugPrelaunchTask": "Tarea que se va a ejecutar antes de iniciarse la sesión de depuración.", - "internalConsoleOptions": "Controla el comportamiento de la consola de depuración interna.", "debugWindowsConfiguration": "Atributos de configuración de inicio específicos de Windows.", "debugOSXConfiguration": "Atributos de configuración de inicio específicos de OS X.", "debugLinuxConfiguration": "Atributos de configuración de inicio específicos de Linux.", diff --git a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index e9448e4adfd8e..845e8de1c17f9 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -8,5 +8,9 @@ "showRecommendations": "Mostrar recomendaciones", "neverShowAgain": "No volver a mostrar", "close": "Cerrar", - "workspaceRecommended": "Esta área de trabajo tiene recomendaciones de extensión." + "workspaceRecommended": "Esta área de trabajo tiene recomendaciones de extensión.", + "ignoreExtensionRecommendations": "¿Desea despreciar todas las recomendaciones de extensión?", + "ignoreAll": "Sí, despreciar todas.", + "no": "No", + "cancel": "Cancelar" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index c7bb64b9c26ec..cfbe38f24db78 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -10,5 +10,6 @@ "extensions": "Extensiones", "view": "Ver", "extensionsConfigurationTitle": "Extensiones", - "extensionsAutoUpdate": "Actualizar extensiones automáticamente" + "extensionsAutoUpdate": "Actualizar extensiones automáticamente", + "extensionsIgnoreRecommendations": "No tener en cuenta las recomendaciones de extensión." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index d7457f5305a42..9b8bcb5fdf134 100644 --- a/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -27,8 +27,8 @@ "autoSaveDelay": "Controla el retraso en MS tras el cual un archivo con modificaciones se guarda automáticamente. Solo se aplica si \"files.autoSave\" está establecido en \"{0}\"", "watcherExclude": "Configure patrones globales de las rutas de acceso de archivo que se van a excluir de la inspección de archivos. Al cambiar esta configuración, es necesario reiniciar. Si observa que Code consume mucho tiempo de CPU al iniciarse, puede excluir las carpetas grandes para reducir la carga inicial.", "hotExit.off": "Deshabilita la salida rápida.", - "hotExit.onExit": "La salida rápida se desencadena al cerrar la aplicación, es decir, al cerrarse la última ventana en Windows o Linux, o cuando se desencadena el comando workbench.action.quit (paleta de comandos, enlace de teclado, menú). Todas las ventanas con copias de seguridad se restaurarán en el próximo inicio.", - "hotExit.onExitAndWindowClose": "hotExit se desencadena al cerrar la aplicación, es decir, al cerrarse la última ventana en Windows/Linux o cuando se desencadena el comando workbench.action.quit (paleta de comandos, enlace de teclado, menú). También para cualquier ventana que tenga una carpeta abierta, independientemente de que sea o no la última ventana. Todas las ventanas sin carpetas abiertas se restaurarán la próxima vez que se inicie. Para restaurar las ventanas con carpetas tal cual estaban antes de cerrarse, establezca \"window.reopenFolders\" en \"all\".", + "hotExit.onExit": "hotExit se desencadena al cerrar la aplicación, es decir, al cerrarse la última ventana en Windows/Linux o cuando se desencadena el comando workbench.action.quit (paleta de comandos, enlace de teclado, menú). Todas las ventanas con copias de seguridad se restaurarán la próxima vez que se inicie.", + "hotExit.onExitAndWindowClose": "HotExit se desencadena al cerrar la aplicación, es decir, al cerrarse la última ventana en Windows/Linux o cuando se desencadena el comando workbench.action.quit (paleta de comandos, enlace de teclado, menú). También para cualquier ventana que tenga una carpeta abierta, independientemente de que sea o no la última ventana. Todas las ventanas sin carpetas abiertas se restaurarán la próxima vez que se inicie. Para restaurar las ventanas con carpetas tal cual estaban antes de cerrarse, establezca \"window.reopenFolders\" en \"all\".", "hotExit": "Controla si los archivos no guardados se recuerdan entre las sesiones, lo que permite omitir el mensaje para guardar al salir del editor.", "defaultLanguage": "El modo de lenguaje predeterminado que se asigna a nuevos archivos.", "editorConfigurationTitle": "Editor", diff --git a/i18n/esn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/esn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index c7aea1a3bf640..af465625f5df2 100644 --- a/i18n/esn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,7 +6,5 @@ { "searchMatches": "{0} coincidencias encontradas", "searchMatch": "{0} coincidencia encontrada", - "fileMatchAriaLabel": "{0} coincidencias en el archivo {1} de la carpeta {2}, resultados de la búsqueda", - "replacePreviewResultAria": "Reemplazar resultado de vista previa, {0}", - "searchResultAria": "{0}, resultado de la búsqueda" + "fileMatchAriaLabel": "{0} coincidencias en el archivo {1} de la carpeta {2}, resultados de la búsqueda" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index eb668d70a13a0..d371b1e3d8c96 100644 --- a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "El color de fondo del terminal, esto permite colorear el terminal de forma diferente al panel.", + "terminal.foreground": "El color de primer plano del terminal.", "terminal.ansiColor": "Color ANSI \"{0}\" en el terminal." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index a2ca73e3dc141..2193bcd8383bf 100644 --- a/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,7 +6,6 @@ { "selectTheme.label": "Tema de color", "installColorThemes": "Instalar temas de color adicionales...", - "problemChangingTheme": "Problema al configurar el tema: {0}", "themes.selectTheme": "Seleccionar tema de color", "selectIconTheme.label": "Tema de icono de archivo", "installIconThemes": "Instalar temas de icono de archivo adicionles...", diff --git a/i18n/esn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/esn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index e1dbe78e59e6f..0a6a55d48a259 100644 --- a/i18n/esn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/esn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -5,10 +5,5 @@ // Do not edit this file. It is machine generated. { "errorUnknownKey": "No se puede escribir en el archivo de configuración (clave desconocida)", - "errorInvalidTarget": "No se puede escribir en el archivo de configuración (destino no válido).", - "errorNoWorkspaceOpened": "No se puede escribir la configuración porque no hay ninguna carpeta abierta. Abra una carpeta primero y vuelva a intentarlo.", - "errorInvalidConfiguration": "No se puede escribir la configuración. Abra el archivo **Configuración de usuario** para corregir los errores o advertencias del archivo y vuelva a intentarlo.", - "errorInvalidConfigurationWorkspace": "No se puede escribir la configuración. Abra **Configuración de área de trabajo** para corregir los errores o advertencias del archivo y vuelva a intentarlo.", - "errorConfigurationFileDirty": "No se puede escribir la configuración porque el archivo se ha modificado. Guarde el archivo **Configuración de usuario** y vuelva a intentarlo.", - "errorConfigurationFileDirtyWorkspace": "No se puede escribir la configuración porque el archivo se ha modificado. Guarde el archivo **Configuración de área de trabajo** y vuelva a intentarlo." + "errorInvalidTarget": "No se puede escribir en el archivo de configuración (destino no válido)." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/esn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 0ae924e19329a..587fdef746105 100644 --- a/i18n/esn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/esn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -14,9 +14,6 @@ "vscode.extension.contributes.keybindings.win": "Tecla o secuencia de teclas específica de Windows.", "vscode.extension.contributes.keybindings.when": "Condición cuando la tecla está activa.", "vscode.extension.contributes.keybindings": "Aporta enlaces de teclado.", - "openDocumentation": "Más información", - "keybindingMigration.ok": "Aceptar", - "keybindingMigration.prompt": "Algunos métodos abreviados de teclado han cambiado para su distribución de teclado.", "invalid.keybindings": "Valor de \"contributes.{0}\" no válido: {1}", "unboundCommands": "Aquí hay otros comandos disponibles: ", "keybindings.json.title": "Configuración de enlaces de teclado", diff --git a/i18n/fra/extensions/git/out/commands.i18n.json b/i18n/fra/extensions/git/out/commands.i18n.json index 2f26d293f1e6c..3601e044f8b25 100644 --- a/i18n/fra/extensions/git/out/commands.i18n.json +++ b/i18n/fra/extensions/git/out/commands.i18n.json @@ -18,6 +18,8 @@ "discard": "Ignorer les modifications", "confirm discard all": "Voulez-vous vraiment ignorer TOUTES les modifications ? Cette action est IRRÉVERSIBLE.", "discardAll": "Ignorer TOUTES les modifications", + "yes": "Oui", + "always": "Toujours", "no changes": "Il n'existe aucun changement à valider.", "commit message": "Message de validation", "provide commit message": "Indiquez un message de validation", diff --git a/i18n/fra/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/fra/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/extensions/typescript/package.i18n.json b/i18n/fra/extensions/typescript/package.i18n.json index 5fc1a277d9368..043054ffa7fe4 100644 --- a/i18n/fra/extensions/typescript/package.i18n.json +++ b/i18n/fra/extensions/typescript/package.i18n.json @@ -35,7 +35,6 @@ "javascript.goToProjectConfig.title": "Accéder à la configuration du projet", "typescript.referencesCodeLens.enabled": "Activer/désactiver CodeLens dans les références. Nécessite TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Activer/désactiver CodeLens dans les implémentations. Nécessite TypeScript >= 2.2.0.", - "typescript.openTsServerLog.title": "Ouvrir le fichier journal du serveur TS", "typescript.selectTypeScriptVersion.title": "Sélectionner la version de TypeScript", "jsDocCompletion.enabled": "Activer/désactiver les commentaires JSDoc automatiques", "javascript.implicitProjectConfig.checkJs": "Activer/désactiver la vérification sémantique des fichiers JavaScript. Les fichiers jsconfig.json ou tsconfig.json existants remplacent ce paramètre. Nécessite TypeScript >=2.3.1.", diff --git a/i18n/fra/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/fra/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/code/electron-main/menus.i18n.json b/i18n/fra/src/vs/code/electron-main/menus.i18n.json index 6f57138a058b4..767d8088cca7d 100644 --- a/i18n/fra/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/fra/src/vs/code/electron-main/menus.i18n.json @@ -69,7 +69,6 @@ "miSmartSelectShrink": "&&Réduire la sélection", "miViewExplorer": "&&Explorateur", "miViewSearch": "&&Rechercher", - "miViewGit": "&&Git", "miViewDebug": "&&Déboguer", "miViewExtensions": "E&&xtensions", "miToggleOutput": "&&Sortie", diff --git a/i18n/fra/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/fra/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..bf45d0601aaa9 --- /dev/null +++ b/i18n/fra/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorViewAccessibleLabel": "Contenu d'éditeur" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/fra/src/vs/editor/contrib/hover/browser/hover.i18n.json index c2d6b7a05c852..f2c7ed175601d 100644 --- a/i18n/fra/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "Afficher par pointage", - "hoverHighlight": "Mettez en surbrillance ci-dessous le mot pour lequel un pointage s'affiche.", - "hoverBackground": "Couleur d'arrière-plan du pointage de l'éditeur.", - "hoverBorder": "Couleur de bordure du pointage de l'éditeur." + "showHover": "Afficher par pointage" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index bb2792bf3e44e..b2ba0b9ad35f0 100644 --- a/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -16,8 +16,6 @@ "peekViewTitleInfoForeground": "Couleur des informations sur le titre de l'affichage d'aperçu.", "peekViewBorder": "Couleur des bordures et de la flèche de l'affichage d'aperçu.", "peekViewResultsBackground": "Couleur d'arrière-plan de la liste des résultats de l'affichage d'aperçu.", - "peekViewResultsMatchForeground": "Premier plan de l'entrée correspondante dans la liste des résultats de l'affichage d'aperçu.", - "peekViewResultsFileForeground": "Premier plan de l'entrée de fichier dans la liste des résultats de l'affichage d'aperçu.", "peekViewResultsSelectionBackground": "Couleur d'arrière-plan de l'entrée sélectionnée dans la liste des résultats de l'affichage d'aperçu.", "peekViewResultsSelectionForeground": "Couleur de premier plan de l'entrée sélectionnée dans la liste des résultats de l'affichage d'aperçu.", "peekViewEditorBackground": "Couleur d'arrière-plan de l'éditeur d'affichage d'aperçu.", diff --git a/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 3e58c829119ca..0632013723d86 100644 --- a/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,10 +9,8 @@ "editorSuggestWidgetForeground": "Couleur de premier plan du widget de suggestion.", "editorSuggestWidgetSelectedBackground": "Couleur d'arrière-plan de l'entrée sélectionnée dans le widget de suggestion.", "editorSuggestWidgetHighlightForeground": "Couleur de la surbrillance des correspondances dans le widget de suggestion.", - "readMore": "En savoir plus...{0}", "suggestionWithDetailsAriaLabel": "{0}, suggestion, avec détails", "suggestionAriaLabel": "{0}, suggestion", - "goback": "Précédent", "suggestWidget.loading": "Chargement...", "suggestWidget.noSuggestions": "Pas de suggestions.", "suggestionAriaAccepted": "{0}, accepté", diff --git a/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json index 45d1776b2ba4a..d4fb6e415de79 100644 --- a/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -28,8 +28,6 @@ "listActiveSelectionBackground": "Couleur d'arrière-plan de la liste/l'arborescence de l'élément sélectionné quand la liste/l'arborescence est active. Une liste/arborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", "listInactiveSelectionBackground": "Couleur d'arrière-plan de la liste/l'arborescence pour l'élément sélectionné quand la liste/l'arborescence est inactive. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", "listActiveSelectionForeground": "Couleur de premier plan de la liste/l'arborescence pour l'élément sélectionné quand la liste/l'arborescence est active. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", - "listFocusAndSelectionBackground": "Couleur d'arrière-plan de la liste/l'arborescence pour l'élément ayant le focus et sélectionné quand la liste/l'arborescence est active. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive. Cette couleur l'emporte sur les couleurs individuelles de la sélection et du focus.", - "listFocusAndSelectionForeground": "Couleur de premier plan de la liste/l'arborescence pour l'élément ayant le focus et sélectionné quand la liste/l'arborescence est active. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive. Cette couleur l'emporte sur les couleurs individuelles de la sélection et du focus.", "listHoverBackground": "Arrière-plan de la liste/l'arborescence pendant le pointage sur des éléments avec la souris.", "listDropBackground": "Arrière-plan de l'opération de glisser-déplacer dans une liste/arborescence pendant le déplacement d'éléments avec la souris.", "highlight": "Couleur de premier plan dans la liste/l'arborescence pour la surbrillance des correspondances pendant la recherche dans une liste/arborescence.", @@ -50,7 +48,9 @@ "editorFindMatch": "Couleur du résultat de recherche actif.", "findMatchHighlight": "Couleur des autres résultats de recherche.", "findRangeHighlight": "Couleur de la plage limitant la recherche.", + "hoverHighlight": "Mettez en surbrillance ci-dessous le mot pour lequel un pointage s'affiche.", + "hoverBackground": "Couleur d'arrière-plan du pointage de l'éditeur.", + "hoverBorder": "Couleur de bordure du pointage de l'éditeur.", "activeLinkForeground": "Couleur des liens actifs.", - "linkForeground": "Couleur des liens.", "editorWidgetBackground": "Couleur d'arrière-plan des gadgets de l'éditeur tels que rechercher/remplacer." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/fra/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..ff14373fbdcb2 --- /dev/null +++ b/i18n/fra/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "Aucun TreeExplorerNodeProvider ayant l'ID '{0}' n'est inscrit.", + "treeExplorer.failedToProvideRootNode": "Le TreeExplorerNodeProvider '{0}' n'a pas pu fournir le nœud racine." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/fra/src/vs/workbench/browser/actions/configureLocale.i18n.json index 97d34c7a9e910..ef4f2686d9e8d 100644 --- a/i18n/fra/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,7 +7,6 @@ "configureLocale": "Configurer la langue", "displayLanguage": "Définit le langage affiché par VSCode.", "doc": "Consultez {0} pour connaître la liste des langues prises en charge.", - "restart": "Si la valeur change, VSCode doit redémarrer.", "fail.createSettings": "Impossible de créer '{0}' ({1}).", "JsonSchema.locale": "Langue d'interface utilisateur (IU) à utiliser." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/common/theme.i18n.json b/i18n/fra/src/vs/workbench/common/theme.i18n.json index e958fad7ce594..8363fa14b9a09 100644 --- a/i18n/fra/src/vs/workbench/common/theme.i18n.json +++ b/i18n/fra/src/vs/workbench/common/theme.i18n.json @@ -4,19 +4,14 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "Couleur d'arrière-plan du conteneur d'onglets. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", "tabActiveBackground": "Couleur d'arrière-plan de l'onglet actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", "tabInactiveBackground": "Couleur d'arrière-plan de l'onglet inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", "tabBorder": "Bordure séparant les onglets les uns des autres. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", "tabActiveEditorGroupActiveForeground": "Couleur de premier plan de l'onglet actif dans un groupe actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "tabActiveEditorGroupInactiveForeground": "Couleur de premier plan de l'onglet actif dans un groupe inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", "tabInactiveEditorGroupActiveForeground": "Couleur de premier plan de l'onglet inactif dans un groupe actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "tabInactiveEditorGroupInactiveForeground": "Couleur de premier plan de l'onglet inactif dans un groupe inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", "editorGroupBackground": "Couleur d'arrière-plan d'un groupe d'éditeurs. Les groupes d'éditeurs sont les conteneurs des éditeurs. La couleur d'arrière-plan s'affiche pendant le glissement de groupes d'éditeurs.", "editorGroupHeaderBackground": "Couleur d'arrière-plan de l'en-tête du titre du groupe d'éditeurs quand les onglets sont désactivés. Les groupes d'éditeurs sont les conteneurs des éditeurs.", "editorGroupBorder": "Couleur séparant plusieurs groupes d'éditeurs les uns des autres. Les groupes d'éditeurs sont les conteneurs des éditeurs.", - "editorDragAndDropBackground": "Couleur d'arrière-plan durant le déplacement des éditeurs.", - "editorMasterDetailsBorder": "Couleur de bordure séparant les détails côté maître des éditeurs côte à côte. Par exemple, les éditeurs de différences et l'éditeur de paramètres.", "panelBackground": "Couleur d'arrière-plan du panneau. Les panneaux s'affichent sous la zone d'éditeurs et contiennent des affichages tels que la sortie et le terminal intégré.", "panelBorder": "Couleur de bordure de panneau dans la partie supérieure de séparation de l'éditeur. Les panneaux s'affichent sous la zone d'éditeurs et contiennent des affichages tels que la sortie et le terminal intégré.", "panelActiveTitleForeground": "Couleur du titre du panneau actif. Les panneaux se situent sous la zone de l'éditeur et contiennent des affichages comme la sortie et le terminal intégré.", @@ -31,7 +26,6 @@ "statusBarProminentItemHoverBackground": "Couleur d'arrière-plan des éléments importants de la barre d'état pendant le pointage. Les éléments importants se différencient des autres entrées de la barre d'état pour indiquer l'importance. La barre d'état est affichée en bas de la fenêtre.", "activityBarBackground": "Couleur d'arrière-plan de la barre d'activités. La barre d'activités s'affiche complètement à gauche ou à droite, et permet de naviguer entre les affichages de la barre latérale.", "activityBarForeground": "Couleur de premier plan de la barre d'activités (par ex., utilisée pour les icônes). La barre d'activités s'affiche complètement à gauche ou à droite, et permet de parcourir les vues de la barre latérale.", - "activityBarDragAndDropBackground": "Couleur des commentaires sur une opération de glisser-déplacer pour les éléments de la barre d'activités. La barre d'activités, située à l'extrême gauche ou droite, permet de basculer entre les affichages de la barre latérale.", "activityBarBadgeBackground": "Couleur d'arrière-plan du badge de notification d'activité. La barre d'activités, située à l'extrême gauche ou droite, permet de basculer entre les affichages de la barre latérale.", "activityBarBadgeForeground": "Couleur de premier plan du badge de notification d'activité. La barre d'activités, située à l'extrême gauche ou droite, permet de basculer entre les affichages de la barre latérale.", "sideBarBackground": "Couleur d'arrière-plan de la barre latérale. La barre latérale est le conteneur des affichages tels que ceux de l'exploration et la recherche.", diff --git a/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json index e03298e00441f..7d14c23b2b5f3 100644 --- a/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -41,7 +41,6 @@ "window.newWindowDimensions.inherit": "Permet d'ouvrir les nouvelles fenêtres avec la même dimension que la dernière fenêtre active.", "window.newWindowDimensions.maximized": "Permet d'ouvrir les nouvelles fenêtres de manière agrandie.", "window.newWindowDimensions.fullscreen": "Permet d'ouvrir les nouvelles fenêtres en mode plein écran.", - "newWindowDimensions": "Contrôle les dimensions d'ouverture d'une nouvelle fenêtre. Par défaut, une nouvelle fenêtre s'ouvre au centre de l'écran avec des dimensions réduites. Quand le paramètre a la valeur 'inherit', la fenêtre a les mêmes dimensions que la dernière fenêtre active. Quand le paramètre a la valeur 'maximized', la fenêtre s'ouvre en mode plein écran et dans sa taille maximale, si elle est configurée avec la valeur 'fullscreen'.", "window.menuBarVisibility.default": "Le menu n'est masqué qu'en mode plein écran.", "window.menuBarVisibility.visible": "Le menu est toujours visible même en mode plein écran.", "window.menuBarVisibility.toggle": "Le menu est masqué mais il peut être affiché via la touche Alt.", diff --git a/i18n/fra/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..7b029bfc1e7dd --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "Cliquez pour suivre (Commande + clic permet d'ouvrir sur le côté)", + "fileLink": "Cliquez pour suivre (Ctrl + clic permet d'ouvrir sur le côté)" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..23ae9b5eef67e --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "Contrôle le comportement de la console de débogage interne." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index 837c20b08ffaa..9fa5e84fe4ae3 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "stateCapture": "L'état de l'objet est capturé à partir de la première évaluation", - "fileLinkMac": "Cliquez pour suivre (Commande + clic permet d'ouvrir sur le côté)", - "fileLink": "Cliquez pour suivre (Ctrl + clic permet d'ouvrir sur le côté)", "replVariableAriaLabel": "La variable {0} a la valeur {1}, boucle REPL (Read Eval Print Loop), débogage", "replExpressionAriaLabel": "L'expression {0} a la valeur {1}, boucle REPL (Read Eval Print Loop), débogage", "replValueOutputAriaLabel": "{0}, boucle REPL (Read Eval Print Loop), débogage", diff --git a/i18n/fra/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index bcdf182d5223d..b52cacf9ab292 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,13 +7,11 @@ "debugAdapterBinNotFound": "L'exécutable d'adaptateur de débogage '{0}' n'existe pas.", "debugAdapterCannotDetermineExecutable": "Impossible de déterminer l'exécutable pour l'adaptateur de débogage '{0}'.", "debugType": "Type de configuration.", - "debugTypeNotRecognised": "Ce type de débogage n'est pas reconnu. Installez l'extension de débogage correspondante.", "node2NotSupported": "\"node2\" n'est plus pris en charge. Utilisez \"node\" à la place, et affectez la valeur \"inspector\" à l'attribut \"protocol\".", "debugName": "Le nom de la configuration s'affiche dans le menu déroulant de la configuration de lancement.", "debugRequest": "Type de requête de configuration. Il peut s'agir de \"launch\" ou \"attach\".", "debugServer": "Pour le développement d'une extension de débogage uniquement : si un port est spécifié, VS Code tente de se connecter à un adaptateur de débogage s'exécutant en mode serveur", "debugPrelaunchTask": "Tâche à exécuter avant le démarrage de la session de débogage.", - "internalConsoleOptions": "Contrôle le comportement de la console de débogage interne.", "debugWindowsConfiguration": "Attributs de configuration de lancement spécifiques à Windows.", "debugOSXConfiguration": "Attributs de configuration de lancement spécifiques à OS X.", "debugLinuxConfiguration": "Attributs de configuration de lancement spécifiques à Linux.", diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 46cfb8cb55bcb..c4a2f4bc59dbe 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -8,5 +8,7 @@ "showRecommendations": "Afficher les recommandations", "neverShowAgain": "Ne plus afficher", "close": "Fermer", - "workspaceRecommended": "Cet espace de travail a des recommandations d'extension." + "workspaceRecommended": "Cet espace de travail a des recommandations d'extension.", + "no": "Non", + "cancel": "Annuler" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 13f0487e367c2..8d72ad3193549 100644 --- a/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -27,8 +27,6 @@ "autoSaveDelay": "Contrôle le délai en ms au bout duquel un fichier à l'intégrité compromise est enregistré automatiquement. S'applique uniquement quand 'files.autoSave' a la valeur '{0}'", "watcherExclude": "Configurez les modèles Glob des chemins de fichiers à exclure de la surveillance des fichiers. La modification de ce paramètre nécessite un redémarrage. Si vous constatez que le code consomme beaucoup de temps processeur au démarrage, excluez les dossiers volumineux pour réduire la charge initiale.", "hotExit.off": "Désactivez la sortie à chaud.", - "hotExit.onExit": "La sortie à chaud se déclenche à la fermeture de l'application, c'est-à-dire quand la dernière fenêtre est fermée dans Windows/Linux, ou quand la commande workbench.action.quit se déclenche (palette de commandes, combinaison de touches, menu). Toutes les fenêtres avec des sauvegardes sont restaurées au prochain lancement.", - "hotExit.onExitAndWindowClose": "La sortie à chaud se déclenche à la fermeture de l'application, c'est-à-dire quand la dernière fenêtre est fermée dans Windows/Linux, ou quand la commande workbench.action.quit se déclenche (palette de commandes, combinaison de touches, menu), ainsi que toute fenêtre comportant un dossier ouvert, qu'il s'agisse ou non de la dernière fenêtre. Toutes les fenêtres qui n'ont pas de dossiers ouverts sont restaurées au prochain lancement. Pour restaurer les fenêtres de dossiers telles qu'elles étaient avant l'arrêt, affectez à \"window.reopenFolders\" la valeur \"all\".", "hotExit": "Contrôle si les fichiers non enregistrés sont mémorisés entre les sessions, ce qui permet d'ignorer la demande d'enregistrement à la sortie de l'éditeur.", "defaultLanguage": "Mode de langage par défaut affecté aux nouveaux fichiers.", "editorConfigurationTitle": "Éditeur", diff --git a/i18n/fra/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/fra/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index ea443e85fbe92..b89dba6f17f9e 100644 --- a/i18n/fra/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,7 +6,5 @@ { "searchMatches": "{0} correspondances trouvées", "searchMatch": "{0} correspondance trouvée", - "fileMatchAriaLabel": "{0} correspondances dans le fichier {1} du dossier {2}, Résultat de la recherche", - "replacePreviewResultAria": "Résultat de l'aperçu du remplacement, {0}", - "searchResultAria": "{0}, Résultat de la recherche" + "fileMatchAriaLabel": "{0} correspondances dans le fichier {1} du dossier {2}, Résultat de la recherche" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index e0173fcde81cf..e59f5fcb09a77 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -18,7 +18,6 @@ "problems": "Problèmes", "manyMarkers": "99", "tasks": "Tâches", - "TaskSystem.noHotSwap": "Le changement du moteur d'exécution de tâches nécessite le redémarrage de VS Code. Changement ignoré.", "TaskService.noBuildTask": "Aucune tâche de build définie. Marquez une tâche avec 'isBuildCommand' dans le fichier tasks.json.", "TaskService.noTestTask": "Aucune tâche de test définie. Marquez une tâche avec 'isTestCommand' dans le fichier tasks.json.", "TaskServer.noTask": "La tâche {0} à exécuter est introuvable.", diff --git a/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 17bcf71d09f23..f816cae6ee336 100644 --- a/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,7 +6,6 @@ { "selectTheme.label": "Thème de couleur", "installColorThemes": "Installer des thèmes de couleurs supplémentaires...", - "problemChangingTheme": "Problème de définition du thème : {0}", "themes.selectTheme": "Sélectionner le thème de couleur", "selectIconTheme.label": "Thème d'icône de fichier", "installIconThemes": "Installer des thèmes d'icônes de fichiers supplémentaires...", diff --git a/i18n/fra/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/fra/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index df367cb95ef5e..ba4ae258d25f0 100644 --- a/i18n/fra/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/fra/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -5,10 +5,5 @@ // Do not edit this file. It is machine generated. { "errorUnknownKey": "Impossible d'écrire dans le fichier de configuration (clé inconnue)", - "errorInvalidTarget": "Impossible d'écrire dans le fichier config (cible non valide)", - "errorNoWorkspaceOpened": "Impossible d'écrire les paramètres, car aucun dossier n'est ouvert. Ouvrez d'abord un dossier, puis réessayez.", - "errorInvalidConfiguration": "Impossible d'écrire les paramètres. Ouvrez les **Paramètres utilisateur** pour corriger les erreurs/avertissements présents dans le fichier, puis réessayez.", - "errorInvalidConfigurationWorkspace": "Impossible d'écrire les paramètres. Ouvrez les **Paramètres d'espace de travail** pour corriger les erreurs/avertissements présents dans le fichier, puis réessayez.", - "errorConfigurationFileDirty": "Impossible d'écrire les paramètres, car l'intégrité du fichier est compromise. Enregistrez le fichier des **Paramètres utilisateur**, puis réessayez.", - "errorConfigurationFileDirtyWorkspace": "Impossible d'écrire les paramètres, car l'intégrité du fichier est compromise. Enregistrez le fichier des **Paramètres d'espace de travail**, puis réessayez." + "errorInvalidTarget": "Impossible d'écrire dans le fichier config (cible non valide)" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/fra/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index e70e749cfa810..60ec894aa9ed1 100644 --- a/i18n/fra/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/fra/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -14,9 +14,6 @@ "vscode.extension.contributes.keybindings.win": "Touche ou séquence de touches spécifique à Windows.", "vscode.extension.contributes.keybindings.when": "Condition quand la touche est active.", "vscode.extension.contributes.keybindings": "Ajoute des combinaisons de touches.", - "openDocumentation": "En savoir plus", - "keybindingMigration.ok": "OK", - "keybindingMigration.prompt": "Certains raccourcis clavier ont changé pour votre disposition de clavier.", "invalid.keybindings": "'contributes.{0}' non valide : {1}", "unboundCommands": "Voici d'autres commandes disponibles : ", "keybindings.json.title": "Configuration des combinaisons de touches", diff --git a/i18n/ita/extensions/git/out/commands.i18n.json b/i18n/ita/extensions/git/out/commands.i18n.json index 8e28758d2344f..a95a76b686a72 100644 --- a/i18n/ita/extensions/git/out/commands.i18n.json +++ b/i18n/ita/extensions/git/out/commands.i18n.json @@ -18,6 +18,8 @@ "discard": "Rimuovi modifiche", "confirm discard all": "Sei sicuro di voler annullare TUTTE le modifiche? Quest'azione è IRREVERSIBILE!", "discardAll": "Rimuovi TUTTE le modifiche", + "yes": "Sì", + "always": "Sempre", "no changes": "Non ci sono modifiche di cui eseguire il commit.", "commit message": "Messaggio di commit", "provide commit message": "Specificare un messaggio di commit", diff --git a/i18n/ita/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/ita/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/extensions/typescript/package.i18n.json b/i18n/ita/extensions/typescript/package.i18n.json index 00ac1f3529e47..001fdcf548438 100644 --- a/i18n/ita/extensions/typescript/package.i18n.json +++ b/i18n/ita/extensions/typescript/package.i18n.json @@ -35,7 +35,6 @@ "javascript.goToProjectConfig.title": "Passa a Configurazione progetto", "typescript.referencesCodeLens.enabled": "Abilita/Disabilita le finestre CodeLens per i riferimenti. Richiede una versione di TypeScript uguale o successiva alla 2.0.6.", "typescript.implementationsCodeLens.enabled": "Abilita/Disabilita le finestre CodeLens per le implementazioni. Richiede una versione di TypeScript uguale o successiva alla 2.2.0.", - "typescript.openTsServerLog.title": "Apri file di log del server TypeScript", "typescript.selectTypeScriptVersion.title": "Seleziona la versione di TypeScript", "jsDocCompletion.enabled": "Abilita/Disabilita commenti automatici JSDoc", "javascript.implicitProjectConfig.checkJs": "Abilita/disabilita il controllo semantico di file JavaScript. File jsconfig.json o tsconfig.json esistenti sovrascrivono su questa impostazione. Richiede TypeScript >= 2.3.1.", diff --git a/i18n/ita/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/ita/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/code/electron-main/menus.i18n.json b/i18n/ita/src/vs/code/electron-main/menus.i18n.json index 0647c24f4082c..86c52fb5640b5 100644 --- a/i18n/ita/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/ita/src/vs/code/electron-main/menus.i18n.json @@ -69,7 +69,6 @@ "miSmartSelectShrink": "&&Riduci selezione", "miViewExplorer": "&&Esplora risorse", "miViewSearch": "Cerca", - "miViewGit": "&&Git", "miViewDebug": "&&Debug", "miViewExtensions": "E&&stensioni", "miToggleOutput": "&&Output", diff --git a/i18n/ita/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/ita/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..9c443a0f33d33 --- /dev/null +++ b/i18n/ita/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorViewAccessibleLabel": "Contenuto editor" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/ita/src/vs/editor/contrib/hover/browser/hover.i18n.json index b5b21cc37d7d4..385b42e529051 100644 --- a/i18n/ita/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "Visualizza passaggio del mouse", - "hoverHighlight": "Evidenzia sotto la parola di cui viene mostrata un'area sensibile al passaggio", - "hoverBackground": "Colore di sfondo dell'area sensibile al passaggio del mouse dell'editor", - "hoverBorder": "Colore di sfondo dell'area sensibile al passaggio del mouse dell'editor" + "showHover": "Visualizza passaggio del mouse" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index b86cbe1b98206..60ce91d8df1c6 100644 --- a/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -16,8 +16,6 @@ "peekViewTitleInfoForeground": "Colore delle informazioni del titolo della visualizzazione rapida.", "peekViewBorder": "Colore dei bordi e della freccia della visualizzazione rapida.", "peekViewResultsBackground": "Colore di sfondo dell'elenco risultati della visualizzazione rapida.", - "peekViewResultsMatchForeground": "Primo piano per l'immissione di corrispondenze nell'elenco risultati della visualizzazione rapida.", - "peekViewResultsFileForeground": "Primo piano per l'immissione di file nell'elenco risultati della visualizzazione rapida.", "peekViewResultsSelectionBackground": "Colore di sfondo della voce selezionata nell'elenco risultati della visualizzazione rapida.", "peekViewResultsSelectionForeground": "Colore primo piano della voce selezionata nell'elenco risultati della visualizzazione rapida.", "peekViewEditorBackground": "Colore di sfondo dell'editor di visualizzazioni rapide.", diff --git a/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 6d495a04fda11..bbb46151abd3d 100644 --- a/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,10 +9,8 @@ "editorSuggestWidgetForeground": "Colore primo piano del widget dei suggerimenti.", "editorSuggestWidgetSelectedBackground": "Colore di sfondo della voce selezionata del widget dei suggerimenti.", "editorSuggestWidgetHighlightForeground": "Colore delle evidenziazioni corrispondenze nel widget dei suggerimenti.", - "readMore": "Altre informazioni...{0}", "suggestionWithDetailsAriaLabel": "{0}, suggerimento, con dettagli", "suggestionAriaLabel": "{0}, suggerimento", - "goback": "Indietro", "suggestWidget.loading": "Caricamento...", "suggestWidget.noSuggestions": "Non ci sono suggerimenti.", "suggestionAriaAccepted": "{0}, accettato", diff --git a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json index 8b28f9f169f77..8cde4edb29b11 100644 --- a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -28,8 +28,6 @@ "listActiveSelectionBackground": "Colore sfondo Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", "listInactiveSelectionBackground": "Colore sfondo Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è inattivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", "listActiveSelectionForeground": "Colore primo piano Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", - "listFocusAndSelectionBackground": "Colore sfondo Elenco/Struttura ad albero per l'elemento evidenziato e selezionato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no. Questo colore ha la precedenza su colori specificati singolarmente per selezione e focus.", - "listFocusAndSelectionForeground": "Colore primo piano Elenco/Struttura ad albero per l'elemento evidenziato e selezionato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no. Questo colore ha la precedenza su colori specificati singolarmente per selezione e focus.", "listHoverBackground": "Sfondo Elenco/Struttura ad albero al passaggio del mouse sugli elementi.", "listDropBackground": "Sfondo Elenco/Struttura ad albero durante il trascinamento degli elementi selezionati.", "highlight": "Colore primo piano Elenco/Struttura ad albero delle occorrenze trovate durante la ricerca nell'Elenco/Struttura ad albero.", @@ -50,7 +48,9 @@ "editorFindMatch": "Colore della corrispondenza di ricerca corrente.", "findMatchHighlight": "Colore delle altre corrispondenze di ricerca.", "findRangeHighlight": "Colore dell'intervallo di ricerca.", + "hoverHighlight": "Evidenziazione sotto la parola per cui è visualizzata un'area sensibile al passaggio del mouse.", + "hoverBackground": "Colore di sfondo dell'area sensibile al passaggio del mouse dell'editor.", + "hoverBorder": "Colore del bordo dell'area sensibile al passaggio del mouse dell'editor.", "activeLinkForeground": "Colore dei collegamenti attivi.", - "linkForeground": "Colore dei collegamenti.", "editorWidgetBackground": "Colore di sfondo dei widget dell'editor, ad esempio Trova/Sostituisci." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/ita/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..8905123ff84d9 --- /dev/null +++ b/i18n/ita/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "Non è stato registrato alcun elemento TreeExplorerNodeProvider con ID '{0}'.", + "treeExplorer.failedToProvideRootNode": "Con l'elemento TreeExplorerNodeProvider '{0}' non è stato possibile fornire il nodo radice." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/ita/src/vs/workbench/browser/actions/configureLocale.i18n.json index a124f7f6f312e..c9c8c1ec3e54c 100644 --- a/i18n/ita/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,7 +7,6 @@ "configureLocale": "Configura lingua", "displayLanguage": "Definisce la lingua visualizzata di VSCode.", "doc": "Per un elenco delle lingue supportate, vedere {0}.", - "restart": "Se si modifica il valore, è necessario riavviare VSCode.", "fail.createSettings": "Non è possibile creare '{0}' ({1}).", "JsonSchema.locale": "Linguaggio dell'interfaccia utente da usare." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/common/theme.i18n.json b/i18n/ita/src/vs/workbench/common/theme.i18n.json index ea57126fbcd24..05253aee2c400 100644 --- a/i18n/ita/src/vs/workbench/common/theme.i18n.json +++ b/i18n/ita/src/vs/workbench/common/theme.i18n.json @@ -4,19 +4,14 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "Colore di sfondo del contenitore delle schede. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "tabActiveBackground": "Colore di sfondo delle schede attive. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "tabInactiveBackground": "Colore di sfondo delle schede inattive. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "tabBorder": "Bordo per separare le schede l'una dall'altra. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "tabActiveEditorGroupActiveForeground": "Colore di primo piano delle schede attive in un gruppo attivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "tabActiveEditorGroupInactiveForeground": "Colore di primo piano delle schede attive in un gruppo inattivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "tabInactiveEditorGroupActiveForeground": "Colore di primo piano delle schede inattive in un gruppo attivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "tabInactiveEditorGroupInactiveForeground": "Colore di primo piano delle schede inattiva in un gruppo inattivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "editorGroupBackground": "Colore di sfondo di un gruppo di editor. I gruppi di editor sono contenitori di editor. Il colore di sfondo viene visualizzato quando si trascinano i gruppi di editor in un'altra posizione.", "editorGroupHeaderBackground": "Colore di sfondo dell'intestazione del titolo dell'editor quando le schede sono disabilitate. I gruppi di editor sono contenitori di editor.", "editorGroupBorder": "Colore per separare più gruppi di editor l'uno dall'altro. I gruppi di editor sono i contenitori degli editor.", - "editorDragAndDropBackground": "Colore di sfondo durante lo spostamento degli editor.", - "editorMasterDetailsBorder": "Colore del bordo per separare i dettagli dal lato master per gli editor affiancati. Gli esempi includono editor diff e l'editor impostazioni.", "panelBackground": "Colore di sfondo dei pannelli. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e del terminale integrato.", "panelBorder": "Colore del bordo dei pannelli nella parte superiore di separazione dall'editor. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e del terminale integrato.", "panelActiveTitleForeground": "Colore del titolo del pannello attivo. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e quella del terminale integrato.", @@ -31,7 +26,6 @@ "statusBarProminentItemHoverBackground": "Colore di sfondo degli elementi rilevanti della barra di stato al passaggio del mouse. Gli elementi rilevanti spiccano rispetto ad altre voci della barra di stato. La barra di stato è visualizzata nella parte inferiore della finestra.", "activityBarBackground": "Colore di sfondo della barra attività. La barra attività viene visualizzata nella parte inferiore sinistra/destra e consente il passaggio tra diverse visualizzazioni della barra laterale", "activityBarForeground": "Colore primo piano della barra attività (ad es. quello utilizzato per le icone). La barra attività viene mostrata all'estrema sinistra o destra e permette di alternare le visualizzazioni della barra laterale.", - "activityBarDragAndDropBackground": "Colore feedback drag and drop degli elementi della barra attività. La barra attività viene visualizzata nella parte inferiore sinistra/destra e consente il passaggio tra diverse visualizzazioni della barra laterale", "activityBarBadgeBackground": "Colore di sfondo della notifica utente dell'attività. La barra attività viene visualizzata all'estrema sinistra o all'estrema destra e consente di spostarsi tra le visualizzazioni della barra laterale.", "activityBarBadgeForeground": "Colore primo piano della notifica utente dell'attività. La barra attività viene visualizzata all'estrema sinistra o all'estrema destra e consente di spostarsi tra le visualizzazioni della barra laterale.", "sideBarBackground": "Colore di sfondo della barra laterale. La barra laterale è il contenitore per visualizzazioni come Explorer e ricerca.", diff --git a/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json index caac04b4d8e65..c034a8cc727bf 100644 --- a/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -41,7 +41,6 @@ "window.newWindowDimensions.inherit": "Apre nuove finestre le cui dimensioni sono uguali a quelle dell'ultima finestra attiva.", "window.newWindowDimensions.maximized": "Apre nuove finestre ingrandite a schermo intero.", "window.newWindowDimensions.fullscreen": "Apre nuove finestre nella modalità a schermo intero.", - "newWindowDimensions": "Controlla le dimensioni relative all'apertura di una nuova finestra. Per impostazione predefinita, una nuova finestra di dimensioni ridotte viene aperta al centro della schermata. Se è impostata su 'inherit', la finestra assumerà le stesse dimensioni dell'ultima finestra attiva. Se è impostata su 'maximized', la finestra aperta risulterà ingrandita, mentre con 'fullscreen' verrà visualizzata a schermo intero.", "window.menuBarVisibility.default": "Il menu è nascosto solo nella modalità a schermo intero.", "window.menuBarVisibility.visible": "Il menu è sempre visibile, anche nella modalità a schermo intero.", "window.menuBarVisibility.toggle": "Il menu è nascosto ma può essere visualizzato premendo ALT.", diff --git a/i18n/ita/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..91b52a6addb63 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "Fare clic per aprire (CMD+clic apre lateralmente)", + "fileLink": "Fare clic per aprire (CTRL+clic apre lateralmente)" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..17c61dfb9bd71 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "Controlla il comportamento della console di debug interna." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index 0ba55e0fb51cf..fff7cbcba9e23 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "stateCapture": "Lo stato dell'oggetto viene acquisito dalla prima valutazione", - "fileLinkMac": "Fare clic per aprire (CMD+clic apre lateralmente)", - "fileLink": "Fare clic per aprire (CTRL+clic apre lateralmente)", "replVariableAriaLabel": "Il valore della variabile {0} è {1}, ciclo Read Eval Print, debug", "replExpressionAriaLabel": "Il valore dell'espressione {0} è {1}, ciclo Read Eval Print, debug", "replValueOutputAriaLabel": "{0}, ciclo Read Eval Print, debug", diff --git a/i18n/ita/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 1c2127860d591..53d3bcdd1ee9e 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,13 +7,11 @@ "debugAdapterBinNotFound": "Il file eseguibile '{0}' dell'adattatore di debug non esiste.", "debugAdapterCannotDetermineExecutable": "Non è possibile determinare il file eseguibile per l'adattatore di debug '{0}'.", "debugType": "Tipo di configurazione.", - "debugTypeNotRecognised": "Questo tipo di debug non è riconosciuto. Installare l'estensione di debug corrispondente.", "node2NotSupported": "\"node2\" non è più supportato. In alternativa, usare \"node\" e impostare l'attributo \"protocol\" su \"inspector\".", "debugName": "Nome della configurazione. Viene visualizzato nel menu a discesa della configurazione di avvio.", "debugRequest": "Tipo della richiesta di configurazione. Può essere \"launch\" o \"attach\".", "debugServer": "Solo per lo sviluppo dell'estensione di debug: se si specifica una porta, Visual Studio Code prova a connettersi a un adattatore di debug in esecuzione in modalità server", "debugPrelaunchTask": "Attività da eseguire prima dell'avvio della sessione di debug.", - "internalConsoleOptions": "Controlla il comportamento della console di debug interna.", "debugWindowsConfiguration": "Attributi della configurazione di avvio specifici di Windows.", "debugOSXConfiguration": "Attributi della configurazione di avvio specifici di OS X.", "debugLinuxConfiguration": "Attributi della configurazione di avvio specifici di Linux.", diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 56e75fc5770da..f84b219fb4e85 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -8,5 +8,7 @@ "showRecommendations": "Mostra gli elementi consigliati", "neverShowAgain": "Non visualizzare più questo messaggio", "close": "Chiudi", - "workspaceRecommended": "Per questa area di lavoro sono disponibili estensioni consigliate." + "workspaceRecommended": "Per questa area di lavoro sono disponibili estensioni consigliate.", + "no": "No", + "cancel": "Annulla" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index cec14eebc7123..5f1557087a04f 100644 --- a/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -27,8 +27,6 @@ "autoSaveDelay": "Controlla il ritardo in ms dopo il quale un file dirty viene salvato automaticamente. Si applica solo quando 'files.autoSave' è impostato su '{0}'", "watcherExclude": "Consente di configurare i criteri GLOB dei percorsi file da escludere dal controllo dei file. Se si modifica questa impostazione, è necessario riavviare. Quando si nota che Code consuma troppo tempo della CPU all'avvio, è possibile escludere le cartelle di grandi dimensioni per ridurre il carico iniziale.", "hotExit.off": "Disabilita Hot Exit.", - "hotExit.onExit": "La funzionalità Hot Exit verrà attivata alla chiusura dell'applicazione, ovvero quando si chiude l'ultima finestra in Windows/Linux o quando si attiva il comando workbench.action.quit (riquadro comandi, tasto di scelta rapida, menu). Tutte le finestre con backup verranno ripristinate al successivo avvio.", - "hotExit.onExitAndWindowClose": "La funzionalità Hot Exit verrà attivata alla chiusura dell'applicazione, ovvero quando si chiude l'ultima finestra in Windows/Linux o quando si attiva il comando workbench.action.quit (riquadro comandi, tasto di scelta rapida, menu), nonché per qualsiasi finestra con una cartella aperta indipendentemente dal fatto che sia l'ultima. Tutte le finestre senza cartelle aperte verranno ripristinate al successivo avvio. Per riportare le finestre di cartelle allo stato in cui si trovavano prima dell'arresto, impostare \"window.reopenFolders\" su \"all\".", "hotExit": "Controlla se i file non salvati verranno memorizzati tra una sessione e l'altra, consentendo di ignorare il prompt di salvataggio alla chiusura dell'editor.", "defaultLanguage": "Modalità linguaggio predefinita assegnata ai nuovi file.", "editorConfigurationTitle": "Editor", diff --git a/i18n/ita/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/ita/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index 774cffef37d90..ef09ca3283a06 100644 --- a/i18n/ita/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,7 +6,5 @@ { "searchMatches": "{0} corrispondenze trovate", "searchMatch": "{0} corrispondenza trovata", - "fileMatchAriaLabel": "{0} corrispondenze nel file {1} della cartella {2}, risultato della ricerca", - "replacePreviewResultAria": "Risultato dell'anteprima sostituzione, {0}", - "searchResultAria": "{0}, risultato della ricerca" + "fileMatchAriaLabel": "{0} corrispondenze nel file {1} della cartella {2}, risultato della ricerca" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 9ff412434bcf0..7be3f013ead8b 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -18,7 +18,6 @@ "problems": "Problemi", "manyMarkers": "Più di 99", "tasks": "Attività", - "TaskSystem.noHotSwap": "Per modificare il motore di esecuzione delle attività, è necessario riavviare VS Code. La modifica verrà ignorata.", "TaskService.noBuildTask": "Non è stata definita alcuna attività di Build. Contrassegnare un'attività con 'isBuildCommand' nel file tasks.json .", "TaskService.noTestTask": "Non è stata definita alcuna attività di test. Contrassegnare un'attività con 'isTestCommand' nel file tasks.json .", "TaskServer.noTask": "Attività {0} richiesta per l'esecuzione non trovata", diff --git a/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 823156a484285..ce44a7ad0a2ad 100644 --- a/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,7 +6,6 @@ { "selectTheme.label": "Tema colori", "installColorThemes": "Installa temi colori aggiuntivi...", - "problemChangingTheme": "Problema durante l'impostazione del tema: {0}", "themes.selectTheme": "Seleziona tema colori", "selectIconTheme.label": "Tema icona file", "installIconThemes": "Installa temi dell'icona file aggiuntivi...", diff --git a/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 3072dac1446f2..22b05065173cd 100644 --- a/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -5,10 +5,5 @@ // Do not edit this file. It is machine generated. { "errorUnknownKey": "Non è possibile scrivere nel file di configurazione. La chiave è sconosciuta", - "errorInvalidTarget": "Non è possibile scrivere nel file di configurazione (destinazione non valida)", - "errorNoWorkspaceOpened": "Non è possibile scrivere le impostazioni perché non è stata aperta alcuna cartella. Aprire prima una cartella e riprovare.", - "errorInvalidConfiguration": "Non è possibile scrivere le impostazioni. Aprire **Impostazioni utente** per correggere errori/avvisi nel file e riprovare.", - "errorInvalidConfigurationWorkspace": "Non è possibile scrivere le impostazioni. Aprire **Impostazioni area di lavoro** per correggere errori/avvisi nel file e riprovare.", - "errorConfigurationFileDirty": "Non è possibile scrivere le impostazioni perché il file è stato modificato ma non salvato. Salvare il file delle **Impostazioni utente** e riprovare.", - "errorConfigurationFileDirtyWorkspace": "Non è possibile scrivere le impostazioni perché il file stato modificato ma non salvato. Salvare il file delle **Impostazioni area di lavoro** e riprovare." + "errorInvalidTarget": "Non è possibile scrivere nel file di configurazione (destinazione non valida)" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/ita/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index d9dd939d22d36..95f4dd73cd4c5 100644 --- a/i18n/ita/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -14,9 +14,6 @@ "vscode.extension.contributes.keybindings.win": "Tasto o sequenza di tasti specifica di Windows.", "vscode.extension.contributes.keybindings.when": "Condizione quando il tasto è attivo.", "vscode.extension.contributes.keybindings": "Tasti di scelta rapida per contributes.", - "openDocumentation": "Altre informazioni", - "keybindingMigration.ok": "OK", - "keybindingMigration.prompt": "Alcune scelte rapide da tastiera sono state modificate per il layout di tastiera corrente.", "invalid.keybindings": "Il valore di `contributes.{0}` non è valido: {1}", "unboundCommands": "Altri comandi disponibili: ", "keybindings.json.title": "Configurazione dei tasti di scelta rapida", diff --git a/i18n/jpn/extensions/git/out/commands.i18n.json b/i18n/jpn/extensions/git/out/commands.i18n.json index e84147ee8b404..cacb74d2a0020 100644 --- a/i18n/jpn/extensions/git/out/commands.i18n.json +++ b/i18n/jpn/extensions/git/out/commands.i18n.json @@ -18,6 +18,9 @@ "discard": "変更を破棄", "confirm discard all": "すべての変更を破棄しますか? 変更は戻りません!", "discardAll": "すべての変更を破棄", + "no staged changes": "コミットするステージされた変更がありません。\\n\\nすべての変更を自動的にステージして、直接コミットしますか?", + "yes": "はい", + "always": "常に行う", "no changes": "コミットする必要のある変更はありません。", "commit message": "コミット メッセージ", "provide commit message": "コミット メッセージを入力してください", diff --git a/i18n/jpn/extensions/git/package.i18n.json b/i18n/jpn/extensions/git/package.i18n.json index c13c203332af5..66c511eaf69b2 100644 --- a/i18n/jpn/extensions/git/package.i18n.json +++ b/i18n/jpn/extensions/git/package.i18n.json @@ -42,5 +42,7 @@ "config.countBadge": "Git バッジ カウンターを制御します。`all` はすべての変更をカウントします。 `tracked` は追跡している変更のみカウントします。 `off` はカウントをオフします。", "config.checkoutType": "`Checkout to...` を実行するときに表示されるブランチの種類を制御します。`all` はすべての参照を表示します。`local` はローカル ブランチのみ、`tags` はタグのみ、`remote` はリモート ブランチのみを表示します。 ", "config.ignoreLegacyWarning": "旧 Git の警告を無視します", - "config.ignoreLimitWarning": "リポジトリ内に変更が多い場合は警告を無視します" + "config.ignoreLimitWarning": "リポジトリ内に変更が多い場合は警告を無視します", + "config.defaultCloneDirectory": "Git リポジトリをクローンする既定の場所", + "config.enableSmartCommit": "ステージされた変更がない場合はすべての変更をコミットします。" } \ No newline at end of file diff --git a/i18n/jpn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/jpn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..d6577333f0d09 --- /dev/null +++ b/i18n/jpn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "JavaScript ファイルのセマンティック チェックを有効にします。 ファイルの先頭にある必要があります。", + "ts-nocheck": "JavaScript ファイルのセマンティック チェックを無効にします。 ファイルの先頭にある必要があります。", + "ts-ignore": "ファイルの次の行で @ts-check エラーを抑制します。" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/typescript/package.i18n.json b/i18n/jpn/extensions/typescript/package.i18n.json index ebe67b59e7572..18396cdce3aff 100644 --- a/i18n/jpn/extensions/typescript/package.i18n.json +++ b/i18n/jpn/extensions/typescript/package.i18n.json @@ -35,7 +35,7 @@ "javascript.goToProjectConfig.title": "プロジェクト構成に移動", "typescript.referencesCodeLens.enabled": "CodeLens の参照を有効/無効にします。TypeScript 2.0.6 以上が必要です。", "typescript.implementationsCodeLens.enabled": "CodeLens の実装を有効/無効にします。TypeScript 2.2.0 以上が必要です。", - "typescript.openTsServerLog.title": "TS サーバーのログ ファイルを開く", + "typescript.openTsServerLog.title": "TS サーバーのログを開く", "typescript.selectTypeScriptVersion.title": "TypeScript のバージョンの選択", "jsDocCompletion.enabled": " 自動 JSDoc コメントを有効/無効にします", "javascript.implicitProjectConfig.checkJs": "JavaScript ファイルのセマンティック チェックを有効/無効にします。既存の jsconfi.json や tsconfi.json ファイルの設定はこれより優先されます。TypeScript は 2.3.1 以上である必要があります。", diff --git a/i18n/jpn/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/jpn/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/code/electron-main/menus.i18n.json b/i18n/jpn/src/vs/code/electron-main/menus.i18n.json index a1b610411e1bc..7ded317439b4b 100644 --- a/i18n/jpn/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/jpn/src/vs/code/electron-main/menus.i18n.json @@ -14,6 +14,7 @@ "mHelp": "ヘルプ(&&H)", "miNewWindow": "新しいウィンドウ(&&W)", "mAbout": "{0} のバージョン情報", + "mServices": "サービス", "mHide": "{0} を非表示にする", "mHideOthers": "その他を非表示にする", "mShowAll": "すべて表示", @@ -69,7 +70,7 @@ "miSmartSelectShrink": "選択範囲の縮小(&&S)", "miViewExplorer": "エクスプローラー(&&E)", "miViewSearch": "検索(&&S)", - "miViewGit": "Git(&&G)", + "miViewSCM": "SCM(&&S)", "miViewDebug": "デバッグ(&&D)", "miViewExtensions": "拡張機能(&&X)", "miToggleOutput": "出力(&&O)", diff --git a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json index 3086fa1d3673b..a202eb9576518 100644 --- a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -60,8 +60,9 @@ "renderControlCharacters": "エディターで制御文字を表示する必要があるかどうかを制御します", "renderIndentGuides": "エディターでインデントのガイドを表示する必要があるかどうかを制御します", "renderLineHighlight": "エディターが現在の行をどのように強調表示するかを制御します。考えられる値は 'none'、'gutter'、'line'、'all' です。", - "codeLens": "エディターでコード レンズを表示するかをどうかを制御する", + "codeLens": "エディターで CodeLens を表示するかどうかを制御する", "folding": "エディターでコードの折りたたみを有効にするかどうかを制御します", + "hideFoldIcons": "余白上の展開アイコンを自動的に非表示にするかどうかを制御します 。", "matchBrackets": "かっこを選択すると、対応するかっこを強調表示します。", "glyphMargin": "エディターで縦のグリフ余白が表示されるかどうかを制御します。ほとんどの場合、グリフ余白はデバッグに使用されます。", "useTabStops": "空白の挿入や削除はタブ位置に従って行われます", diff --git a/i18n/jpn/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/jpn/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..3fdfb4e461b96 --- /dev/null +++ b/i18n/jpn/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorViewAccessibleLabel": "エディターのコンテンツ" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/jpn/src/vs/editor/common/view/editorColorRegistry.i18n.json index 005a4a5743eac..10aa21d3488a9 100644 --- a/i18n/jpn/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/jpn/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -10,5 +10,8 @@ "caret": "エディターのカーソルの色。", "editorWhitespaces": "エディターのスペース文字の色。", "editorIndentGuides": "エディター インデント ガイドの色。", - "editorLineNumbers": "エディターの行番号の色。" + "editorLineNumbers": "エディターの行番号の色。", + "editorCodeLensForeground": "CodeLens エディターの前景色。", + "editorBracketMatchBackground": "一致するかっこの背景色", + "editorBracketMatchBorder": "一致するかっこ内のボックスの色" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/jpn/src/vs/editor/contrib/hover/browser/hover.i18n.json index 59dfc6718b618..13ad716271957 100644 --- a/i18n/jpn/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "ホバーの表示", - "hoverHighlight": "ホバーが表示されているワードの下を強調表示します。", - "hoverBackground": "エディター ホバーの背景色。", - "hoverBorder": "エディター ホバーの境界線の色。" + "showHover": "ホバーの表示" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index f96e5015ff15e..d66571a0e2317 100644 --- a/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -16,8 +16,8 @@ "peekViewTitleInfoForeground": "ピーク ビューのタイトル情報の色。", "peekViewBorder": "ピーク ビューの境界と矢印の色。", "peekViewResultsBackground": "ピーク ビュー結果リストの背景色。", - "peekViewResultsMatchForeground": "ピーク ビュー結果リストの一致したエントリの前景色。", - "peekViewResultsFileForeground": "ピーク ビュー結果リストのファイル エントリの前景色。", + "peekViewResultsMatchForeground": "ピーク ビュー結果リストのライン ノードの前景色。", + "peekViewResultsFileForeground": "ピーク ビュー結果リストのファイル ノードの前景色。", "peekViewResultsSelectionBackground": "ピーク ビュー結果リストの選択済みエントリの背景色。", "peekViewResultsSelectionForeground": "ピーク ビュー結果リストの選択済みエントリの前景色。", "peekViewEditorBackground": "ピーク ビュー エディターの背景色。", diff --git a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 225b4c1b85d41..c57f70f47ef52 100644 --- a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,10 +9,8 @@ "editorSuggestWidgetForeground": "候補ウィジェットの前景色。", "editorSuggestWidgetSelectedBackground": "候補ウィジェット内で選択済みエントリの背景色。", "editorSuggestWidgetHighlightForeground": "候補のウィジェット内で一致したハイライトの色。", - "readMore": "詳細を表示...{0}", "suggestionWithDetailsAriaLabel": "{0}、候補、詳細あり", "suggestionAriaLabel": "{0}、候補", - "goback": "戻る", "suggestWidget.loading": "読み込んでいます...", "suggestWidget.noSuggestions": "候補はありません。", "suggestionAriaAccepted": "{0}、受け入れ済み", diff --git a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json index cae6a6693a278..40f629313c255 100644 --- a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -7,14 +7,25 @@ "invalid.color": "無効な色形式です。 #RGB、#RGBA、#RRGGBB、#RRGGBBAA のいずれかを使用してください", "schema.colors": "ワークベンチで使用する色。", "foreground": "全体の前景色。この色は、コンポーネントによってオーバーライドされていない場合にのみ使用されます。", + "errorForeground": "エラー メッセージ全体の前景色。この色は、コンポーネントによって上書きされていない場合にのみ使用されます。", + "descriptionForeground": "追加情報を提供する説明文の前景色、例:ラベル。", "focusBorder": "フォーカスされた要素の境界線全体の色。この色はコンポーネントによって上書きされていない場合にのみ使用されます。", "contrastBorder": "コントラストを強めるために、他の要素と隔てる追加の境界線。", "activeContrastBorder": "コントラストを強めるために、アクティブな他要素と隔てる追加の境界線。", + "selectionBackground": "ワークベンチ内のテキスト選択の背景色 (例: 入力フィールドやテキストエリア)。エディター内やターミナル内の選択には適用されないことに注意してください。", + "textSeparatorForeground": "テキストの区切り文字の色。", + "textLinkForeground": "テキスト内のリンクの前景色。", + "textLinkActiveForeground": "テキスト内のアクティブなリンクの前景色。", + "textPreformatForeground": "フォーマット済みテキスト セグメントの前景色。", + "textBlockQuoteBackground": "テキスト内のブロック引用の背景色。", + "textBlockQuoteBorder": "テキスト内のブロック引用の境界線色。", + "textCodeBlockBackground": "テキスト内のコード ブロックの背景色。", "widgetShadow": "エディター内の検索/置換窓など、エディター ウィジェットの影の色。", "inputBoxBackground": "入力ボックスの背景。", "inputBoxForeground": "入力ボックスの前景。", "inputBoxBorder": "入力ボックスの境界線。", "inputBoxActiveOptionBorder": "入力フィールドのアクティブ オプションの境界線の色。", + "inputPlaceholderForeground": "入力ボックスのプレースホルダー テキストの前景色。", "inputValidationInfoBackground": "情報の重大度を示す入力検証の背景色。", "inputValidationInfoBorder": "情報の重大度を示す入力検証の境界線色。", "inputValidationWarningBackground": "警告の重大度を示す入力検証の背景色。", @@ -28,8 +39,7 @@ "listActiveSelectionBackground": "ツリーリストがアクティブのとき、選択された項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", "listInactiveSelectionBackground": "ツリーリストが非アクティブのとき、フォーカスされた項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", "listActiveSelectionForeground": "ツリーリストがアクティブのとき、選択された項目のツリーリスト前景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", - "listFocusAndSelectionBackground": "ツリーリストがアクティブのとき、フォーカスと選択された項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。この色は、各選択とフォーカスの色設定より優先します。", - "listFocusAndSelectionForeground": "ツリーリストがアクティブのとき、フォーカスと選択された項目のツリーリスト前景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。この色は、各選択とフォーカスの色設定より優先します。", + "listInactiveSelectionForeground": "ツリーリストが非アクティブのとき、選択された項目のツリーリスト前景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", "listHoverBackground": "マウス操作で項目をホバーするときのツリーリスト背景。", "listDropBackground": "マウス操作で項目を移動するときのツリーリスト ドラッグ アンド ドロップの背景。", "highlight": "ツリーリスト内を検索しているとき、一致した強調のツリーリスト前景色。", @@ -38,6 +48,8 @@ "buttonForeground": "ボタンの前景色。", "buttonBackground": "ボタンの背景色。", "buttonHoverBackground": "ホバー時のボタン背景色。", + "badgeBackground": "バッジの背景色。バッジとは小さな情報ラベルのことです。例:検索結果の数", + "badgeForeground": "バッジの前景色。バッジとは小さな情報ラベルのことです。例:検索結果の数", "scrollbarShadow": "ビューがスクロールされたことを示すスクロール バーの影。", "scrollbarSliderBackground": "スライダーの背景色。", "scrollbarSliderHoverBackground": "ホバー時のスライダー背景色。", @@ -50,7 +62,9 @@ "editorFindMatch": "現在の検索一致項目の色。", "findMatchHighlight": "他の検索一致項目の色。", "findRangeHighlight": "検索を制限する範囲の色。", + "hoverHighlight": "ホバーが表示されているワードの下を強調表示します。", + "hoverBackground": "エディター ホバーの背景色。", + "hoverBorder": "エディター ホバーの境界線の色。", "activeLinkForeground": "アクティブなリンクの色。", - "linkForeground": "リンクの色。", "editorWidgetBackground": "検索/置換窓など、エディター ウィジェットの背景色。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/jpn/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..6447043d7ee61 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "ID '{0}' の TreeExplorerNodeProvider は登録されていません。", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider '{0}' がルート ノードの指定に失敗しました。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/jpn/src/vs/workbench/browser/actions/configureLocale.i18n.json index ccad0f32648b7..21107d326abd0 100644 --- a/i18n/jpn/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,7 +7,7 @@ "configureLocale": "言語を構成する", "displayLanguage": "VSCode の表示言語を定義します。", "doc": "サポートされている言語の一覧については、{0} をご覧ください。", - "restart": "VSCode の再起動に必要な値を変更します。", + "restart": "値を変更するには VS Code の再起動が必要です。", "fail.createSettings": "'{0}' ({1}) を作成できません。", "JsonSchema.locale": "使用する UI 言語。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/common/theme.i18n.json b/i18n/jpn/src/vs/workbench/common/theme.i18n.json index f1767a2955659..5b74eef0a2f53 100644 --- a/i18n/jpn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/jpn/src/vs/workbench/common/theme.i18n.json @@ -4,19 +4,14 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "タブ コンテナーの背景色。タブはエディター領域内にあるエディターのコンテナーです。複数のタブを 1 つのエディター グループで開くことができます。複数のエディター グループがある可能性があります。", "tabActiveBackground": "アクティブ タブの背景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", "tabInactiveBackground": "非アクティブ タブの背景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", "tabBorder": "タブ同士を分けるための境界線。タブはエディター領域内にあるエディターのコンテナーです。複数のタブを 1 つのエディター グループで開くことができます。複数のエディター グループがある可能性があります。", "tabActiveEditorGroupActiveForeground": "アクティブ グループ内のアクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", - "tabActiveEditorGroupInactiveForeground": "非アクティブ グループ内のアクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", "tabInactiveEditorGroupActiveForeground": "アクティブ グループ内の非アクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", - "tabInactiveEditorGroupInactiveForeground": "非アクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", "editorGroupBackground": "エディター グループの背景色。エディター グループはエディターのコンテナーです。背景色はエディター グループをドラッグすると表示されます。", "editorGroupHeaderBackground": "タブが無効な場合の エディター グループ タイトル ヘッダーの背景色。エディター グループはエディターのコンテナーです。", "editorGroupBorder": "複数のエディター グループを互いに分離するための色。エディター グループはエディターのコンテナーです。", - "editorDragAndDropBackground": "エディターのドラッグ時の背景色。", - "editorMasterDetailsBorder": "エディターを横並びに表示している場合に、詳細をマスター側から分けて表示するための境界線色。たとえば、差分エディターや設定エディターです。", "panelBackground": "パネルの背景色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelBorder": "エディターとの区切りを示すパネル上部の罫線の色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelActiveTitleForeground": "アクティブ パネルのタイトルの色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", @@ -31,7 +26,6 @@ "statusBarProminentItemHoverBackground": "ホバーしたときのステータス バーの重要な項目の背景色。重要な項目は、重要性を示すために他のステータスバーの項目から際立っています。 ステータス バーはウィンドウの下部に表示されます。", "activityBarBackground": "アクティビティ バーの背景色。アクティビティ バーは左端または右端に表示され、サイド バーのビューを切り替えることができます。", "activityBarForeground": "アクティビティ バーの前景色 (例: アイコンの色)。アクティビティ バーは左端または右端に表示され、サイド バーのビューを切り替えることができます。", - "activityBarDragAndDropBackground": "アクティビティ バーの項目のドラッグ アンド ドロップ フィードバックの色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", "activityBarBadgeBackground": "アクティビティ通知バッジの背景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", "activityBarBadgeForeground": "アクティビティ通知バッジの前景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", "sideBarBackground": "サイド バーの背景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", diff --git a/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json index 5912f182d8294..3ced82ae8cb74 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -41,12 +41,12 @@ "window.newWindowDimensions.inherit": "新しいウィンドウを、最後にアクティブだったウィンドウと同じサイズで開きます。", "window.newWindowDimensions.maximized": "新しいウィンドウを最大化した状態で開きます。", "window.newWindowDimensions.fullscreen": "新しいウィンドウを全画面表示モードで開きます。", - "newWindowDimensions": "新しいウィンドウを開くときのサイズを制御します。既定では、新しいウィンドウは画面の中央に小さいサイズで開きます。'inherit' に設定すると、最後のアクティブ ウィンドウと同じサイズで開きます。'maximized' に設定するとウィンドウは最大サイズで開き、'fullscreen' に設定すると全画面になります。", "window.menuBarVisibility.default": "メニューは全画面表示モードの場合にのみ非表示です。", "window.menuBarVisibility.visible": "全画面表示モードの場合も含めて、常にメニューが表示されます。", "window.menuBarVisibility.toggle": "メニューは非表示ですが、Alt キーを押すと表示できます。", "window.menuBarVisibility.hidden": "メニューは常に非表示です。", "menuBarVisibility": "メニュー バーの表示/非表示を制御します。'切り替え' 設定は Alt キーを 1 回押すとメニュー バーの表示/非表示が切り替わることを意味します。既定では、ウィンドウが全画面表示の場合を除き、メニュー バーは表示されます。", + "enableMenuBarMnemonics": "有効にすると、Alt キー ショートカットを使用してメイン メニューを開くことができます。ニーモニックを無効にすると、これらの Alt キー ショートカットをエディター コマンドの代わりにバインドできます。", "autoDetectHighContrast": "有効にすると、Windows でハイ コントラスト テーマが使用されている場合にはハイ コントラスト テーマに自動的に変更され、Windows のハイ コントラスト テーマから切り替えられている場合にはダーク テーマに自動的に変更されます。", "titleBarStyle": "ウィンドウのタイトル バーの外観を調整します。変更を適用するには、完全に再起動する必要があります。", "window.nativeTabs": "macOS Sierra ウィンドウ タブを有効にします。この変更を適用するには完全な再起動が必要であり、ネイティブ タブでカスタムのタイトル バー スタイルが構成されていた場合はそれが無効になることに注意してください。", diff --git a/i18n/jpn/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..88f436125ff52 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "クリックして従う (Cmd を押しながらクリックすると横に開きます)", + "fileLink": "クリックして従う (Ctrl を押しながらクリックすると横に開きます)" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..5f4689ab40415 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "内部デバッグ コンソールの動作を制御します。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index 0aaca371445f1..38c8479072717 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "stateCapture": "最初の評価からオブジェクトの状態がキャプチャされます", - "fileLinkMac": "クリックして従う (Cmd を押しながらクリックすると横に開きます)", - "fileLink": "クリックして従う (Ctrl を押しながらクリックすると横に開きます)", "replVariableAriaLabel": "変数 {0} に値 {1} があります、Read Eval Print Loop、デバッグ", "replExpressionAriaLabel": "式 {0} に値 {1} があります、Read Eval Print Loop、デバッグ", "replValueOutputAriaLabel": "{0}、Read Eval Print Loop、デバッグ", diff --git a/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index efdfa523258ce..d63fe387f50b0 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,13 +7,12 @@ "debugAdapterBinNotFound": "デバッグ アダプターの実行可能ファイル '{0}' がありません。", "debugAdapterCannotDetermineExecutable": "デバッグ アダプター '{0}' の実行可能ファイルを判別できません。", "debugType": "構成の種類。", - "debugTypeNotRecognised": "デバッグの種類は認識されませんでした。対応するデバッグの拡張機能をインストールしてください。", + "debugTypeNotRecognised": "デバッグの種類は認識されませんでした。対応するデバッグの拡張機能がインストールされており、有効になっていることを確認してください。", "node2NotSupported": "\"node2\" はサポートされていません。代わりに \"node\" を使用し、\"protocol\" 属性を \"inspector\" に設定してください。", "debugName": "構成の名前。起動構成のドロップダウン メニューに表示されます。", "debugRequest": "構成の要求の種類。\"launch\" または \"attach\" です。", "debugServer": "デバッグ拡張機能の開発のみ。ポートが指定の VS Code の場合、サーバー モードで実行中のデバッグ アダプターへの接続が試行されます。", "debugPrelaunchTask": "デバッグ セッションの開始前に実行するタスク。", - "internalConsoleOptions": "内部デバッグ コンソールの動作を制御します。", "debugWindowsConfiguration": "Windows 固有の起動構成の属性。", "debugOSXConfiguration": "OS X 固有の起動構成の属性。", "debugLinuxConfiguration": "Linux 固有の起動構成の属性。", diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 644c72bc9958d..b12d5ba07d845 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -23,7 +23,7 @@ "disableAction": "無効にする", "checkForUpdates": "更新の確認", "updateAll": "すべての拡張機能を更新します", - "reloadAction": "再読み込む", + "reloadAction": "再読み込み", "postUpdateTooltip": "再度読み込んで更新する", "postUpdateMessage": "このウィンドウを再度読み込んで、更新済みの拡張機能 '{0}' をアクティブ化しますか?", "postEnableTooltip": "再度読み込んでアクティブにする", diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 41b230f31e5df..f7a0d5005fcdc 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -8,5 +8,9 @@ "showRecommendations": "推奨事項を表示", "neverShowAgain": "今後は表示しない", "close": "閉じる", - "workspaceRecommended": "このワークスペースには拡張機能の推奨事項があります。" + "workspaceRecommended": "このワークスペースには拡張機能の推奨事項があります。", + "ignoreExtensionRecommendations": "すべての拡張機能の推奨事項を無視しますか?", + "ignoreAll": "はい、すべて無視します", + "no": "いいえ", + "cancel": "キャンセル" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 1beba30be548a..e9f31ea4af641 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -10,5 +10,6 @@ "extensions": "拡張機能", "view": "表示", "extensionsConfigurationTitle": "拡張機能", - "extensionsAutoUpdate": "拡張機能を自動的に更新します" + "extensionsAutoUpdate": "拡張機能を自動的に更新します", + "extensionsIgnoreRecommendations": "拡張機能の推奨事項を無視する" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index c77cc35a0f30d..15c3aee15db3c 100644 --- a/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -27,8 +27,6 @@ "autoSaveDelay": "ダーティ ファイルの自動保存の遅延をミリ秒単位で制御します。'files.autoSave' が '{0}' に設定されている場合のみ適用されます", "watcherExclude": "ファイル モニタリングから除外するファイル パスの glob パターンを構成します。この設定を変更すると、再起動が必要になります。始動時に Code が消費する CPU 時間が多い場合は、大規模なフォルダーを除外して初期ロードを減らせます。", "hotExit.off": "Hot Exit を無効にします。", - "hotExit.onExit": "アプリケーションが閉じると (Windows/Linux で最後のウィンドウが閉じるとき、または workbench.action.quit コマンドがトリガーされるとき (コマンド パレット、キー バインド、メニュー))、Hot Exit がトリガーされます。バックアップされているすべてのウィンドウは、次の起動時に復元されます。", - "hotExit.onExitAndWindowClose": "アプリケーションが閉じると (Windows/Linux で最後のウィンドウが閉じるとき、または workbench.action.quit コマンドがトリガーするとき (コマンド パレット、キー バインド、メニュー))、Hot Exit がトリガーされます。また、フォルダーが開かれているウィンドウについても、それが最後のウィンドウかどうかに関係なく、Hot Exit がトリガーされます。フォルダーが開かれていないウィンドウはすべて、次回の起動時に復元されます。フォルダーのウィンドウをシャットダウン前と同じ状態に復元するには、\"window.reopenFolders\" を \"all\" に設定します。", "hotExit": "エディターを終了するときに保存を確認するダイアログを省略し、保存されていないファイルをセッション後も保持するかどうかを制御します。", "defaultLanguage": "新しいファイルに割り当てられる既定の言語モード。", "editorConfigurationTitle": "エディター", diff --git a/i18n/jpn/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json b/i18n/jpn/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json index 10e002dad4b4b..51d21107be084 100644 --- a/i18n/jpn/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json @@ -7,7 +7,7 @@ "entryAriaLabel": "{0}、ビューの選択", "views": "ビュー", "panels": "パネル", - "terminals": "端末", + "terminals": "ターミナル", "terminalTitle": "{0}: {1}", "channels": "出力", "openView": "ビューを開く", diff --git a/i18n/jpn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/jpn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index e7c97d566fc1d..241116f3364fa 100644 --- a/i18n/jpn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,7 +6,5 @@ { "searchMatches": "一致する項目が {0} 件見つかりました", "searchMatch": "一致する項目が {0} 件見つかりました", - "fileMatchAriaLabel": "フォルダー {2} のファイル {1} 内で {0} 件の一致、検索結果", - "replacePreviewResultAria": "プレビュー結果の置換、{0}", - "searchResultAria": "{0}、検索結果" + "fileMatchAriaLabel": "フォルダー {2} のファイル {1} 内で {0} 件の一致、検索結果" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 8329808fc1e04..81375f18706a6 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -14,7 +14,7 @@ "ConfigureTaskRunnerAction.label": "タスク ランナーの構成", "ConfigureBuildTaskAction.label": "ビルド タスクを構成します", "CloseMessageAction.label": "閉じる", - "ShowTerminalAction.label": "端末の表示", + "ShowTerminalAction.label": "ターミナルの表示", "problems": "問題", "manyMarkers": "99+", "tasks": "タスク", diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index 0465847b15085..11afc0e1f7233 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -5,22 +5,22 @@ // Do not edit this file. It is machine generated. { "terminalIntegratedConfigurationTitle": "統合端末", - "terminal.integrated.shell.linux": "端末が Linux で使用するシェルのパス。", - "terminal.integrated.shellArgs.linux": "Linux 端末で使用するコマンド ライン引数。", - "terminal.integrated.shell.osx": "端末が OS X で使用するシェルのパス。", + "terminal.integrated.shell.linux": "ターミナルが Linux で使用するシェルのパス。", + "terminal.integrated.shellArgs.linux": "Linux のターミナルで使用するコマンド ライン引数。", + "terminal.integrated.shell.osx": "ターミナルが OS X で使用するシェルのパス。", "terminal.integrated.shellArgs.osx": "OS X 端末で使用するコマンド ライン引数。", - "terminal.integrated.shell.windows": "端末が Windows で使用するシェルのパス。Windows に付属のシェル (cmd、PowerShell、または Bash on Ubuntu) を使用する場合、64 ビット バージョンを使用するには、C:\\Windows\\System32 ではなく、C:\\Windows\\sysnative を選びます。", + "terminal.integrated.shell.windows": "ターミナルが Windows で使用するシェルのパス。Windows に付属のシェル (cmd、PowerShell、または Bash on Ubuntu) を使用する場合、64 ビット バージョンを使用するには、C:\\Windows\\System32 ではなく、C:\\Windows\\sysnative を選びます。", "terminal.integrated.shellArgs.windows": "Windows ターミナル上の場合に使用されるコマンド ライン引数。", - "terminal.integrated.rightClickCopyPaste": "設定している場合、端末内で右クリックしたときにコンテキスト メニューを表示させず、選択範囲がある場合はコピー、選択範囲がない場合は貼り付けの操作を行います。", + "terminal.integrated.rightClickCopyPaste": "設定している場合、ターミナル内で右クリックしたときにコンテキスト メニューを表示させず、選択範囲がある場合はコピー、選択範囲がない場合は貼り付けの操作を行います。", "terminal.integrated.fontFamily": "端末のフォント ファミリを制御します。既定値は editor.fontFamily になります。", - "terminal.integrated.fontLigatures": "端末でフォントの合字が有効かどうかを制御します。", - "terminal.integrated.fontSize": "端末のフォント サイズをピクセル単位で制御します。", - "terminal.integrated.lineHeight": "端末の行の高さを制御します。この数値に端末のフォント サイズを乗算すると、実際の行の高さ (ピクセル単位) になります。", + "terminal.integrated.fontLigatures": "ターミナルでフォントの合字が有効かどうかを制御します。", + "terminal.integrated.fontSize": "ターミナルのフォント サイズをピクセル単位で制御します。", + "terminal.integrated.lineHeight": "ターミナルの行の高さを制御します。この数値にターミナルのフォント サイズを乗算すると、実際の行の高さ (ピクセル単位) になります。", "terminal.integrated.enableBold": "ターミナル内で太字を有効にするかどうか。これにはターミナルシェルからのサポートがひつようです。", - "terminal.integrated.cursorBlinking": "端末のカーソルを点滅させるかどうかを制御します。", + "terminal.integrated.cursorBlinking": "ターミナルのカーソルを点滅させるかどうかを制御します。", "terminal.integrated.cursorStyle": "端末のカーソルのスタイルを制御します。", "terminal.integrated.scrollback": "端末がそのバッファーに保持できる最大行数を制御します。", - "terminal.integrated.setLocaleVariables": "端末の開始時にロケール変数を設定するかどうかを制御します。OS X では既定で true になり、その他のプラットフォームでは false です。", + "terminal.integrated.setLocaleVariables": "ターミナルの開始時にロケール変数を設定するかどうかを制御します。OS X では既定で true になり、その他のプラットフォームでは false です。", "terminal.integrated.cwd": "端末を起動する明示的な開始パスです。これはシェル プロセスの現在の作業ディレクトリ (cwd) として使用されます。特にルート ディレクトリが cwd に適していない場合に、ワークスペースの設定で役立ちます。", "terminal.integrated.confirmOnExit": "アクティブなターミナル セッションがある場合に終了の確認をするかどうか。", "terminal.integrated.commandsToSkipShell": "キーバインドがシェルに送信されず、代わりに常に Code で処理されるコマンド ID のセット。これにより、ターミナルがフォーカスされていない場合と同じ動作をするシェルによって通常使用されるキーバインドを使用できるようになります。例: Ctrl+p で Quick Open を起動します。", diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 1ed0e37207236..799b12a797bdc 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -4,19 +4,19 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbench.action.terminal.toggleTerminal": "統合端末の切り替え", + "workbench.action.terminal.toggleTerminal": "統合ターミナルの切り替え", "workbench.action.terminal.kill": "アクティブな端末インスタンスを強制終了", "workbench.action.terminal.kill.short": "端末の強制終了", "workbench.action.terminal.copySelection": "選択内容のコピー", "workbench.action.terminal.new": "新しい統合端末の作成", - "workbench.action.terminal.new.short": "新しい端末", + "workbench.action.terminal.new.short": "新しいターミナル", "workbench.action.terminal.focus": "端末にフォーカス", "workbench.action.terminal.focusNext": "次の端末にフォーカス", "workbench.action.terminal.focusAtIndex": "ターミナル {0} にフォーカス", - "workbench.action.terminal.focusPrevious": "前の端末にフォーカス", - "workbench.action.terminal.paste": "アクティブな端末に貼り付け", + "workbench.action.terminal.focusPrevious": "前のターミナルにフォーカス", + "workbench.action.terminal.paste": "アクティブなターミナルに貼り付け", "workbench.action.terminal.DefaultShell": "既定のシェルの選択", - "workbench.action.terminal.runSelectedText": "アクティブな端末で選択したテキストを実行", + "workbench.action.terminal.runSelectedText": "アクティブなターミナルで選択したテキストを実行", "workbench.action.terminal.runActiveFile": "アクティブなファイルをアクティブなターミナルで実行", "workbench.action.terminal.runActiveFile.noFile": "ターミナルで実行できるのは、ディスク上のファイルのみです", "workbench.action.terminal.switchTerminalInstance": "端末インスタンスをスイッチ", diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index 7880bacd288bd..50f3054a32680 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "ターミナルの背景色。パネルごとに異なる色を指定できます。", + "terminal.foreground": "ターミナルの前景色。", "terminal.ansiColor": "ターミナルの '{0}' ANSI カラー。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index ab5a0deee5d23..a898f37da7b14 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "terminal.integrated.copySelection.noSelection": "ターミナルにフォーカスがない場合は、ターミナルの選択をコピーできません", - "terminal.integrated.exitedWithCode": "端末処理が終了しました (終了コード: {0})", + "terminal.integrated.exitedWithCode": "ターミナルの処理が終了しました (終了コード: {0})", "terminal.integrated.waitOnExit": "任意のキーを押して端末を終了します", - "terminal.integrated.launchFailed": "端末プロセス コマンド `{0}{1}` を起動できませんでした (終了コード: {2})" + "terminal.integrated.launchFailed": "ターミナル プロセス コマンド `{0}{1}` を起動できませんでした (終了コード: {2})" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index c22c825281d78..9ede3f8b975a3 100644 --- a/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,7 +6,6 @@ { "selectTheme.label": "配色テーマ", "installColorThemes": "その他の色のテーマをインストール...", - "problemChangingTheme": "テーマの設定で問題が発生しました: {0}", "themes.selectTheme": "配色テーマの選択", "selectIconTheme.label": "ファイル アイコンのテーマ", "installIconThemes": "その他のファイル アイコンのテーマをインストール...", diff --git a/i18n/jpn/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/jpn/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json index e2eae85639cad..33d502728a1d6 100644 --- a/i18n/jpn/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -11,7 +11,7 @@ "watermark.openFileFolder": "ファイルまたはフォルダーを開く", "watermark.openRecent": "最近開いた項目", "watermark.newUntitledFile": "無題の新規ファイル", - "watermark.toggleTerminal": "端末の切り替え", + "watermark.toggleTerminal": "ターミナルの切り替え", "watermark.findInFiles": "フォルダーを指定して検索", "watermark.startDebugging": "デバッグの開始", "watermark.selectTheme": "テーマの変更", diff --git a/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 05b5cdcae7bc8..817519ffbe545 100644 --- a/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -5,10 +5,5 @@ // Do not edit this file. It is machine generated. { "errorUnknownKey": "構成ファイルに書き込めません (不明なキー)", - "errorInvalidTarget": "構成ファイルに書き込めません (無効なターゲット)", - "errorNoWorkspaceOpened": "開いているフォルダーがないため、設定を書き込めません。最初にフォルダーを開いてから、もう一度お試しください。", - "errorInvalidConfiguration": "設定を書き込めません。**User Settings** を開いて、ファイル内のエラー/警告を修正してからもう一度お試しください。", - "errorInvalidConfigurationWorkspace": "設定を書き込めません。**Workspace Settings** を開いて、ファイル内のエラー/警告を修正してからもう一度お試しください。", - "errorConfigurationFileDirty": "ファイルが変更されているため、設定を書き込めません。**User Settings** ファイルを保存してから、もう一度お試しください。", - "errorConfigurationFileDirtyWorkspace": "ファイルが変更されているため、設定を書き込めません。**Workspace Settings** ファイルを保存してから、もう一度お試しください。" + "errorInvalidTarget": "構成ファイルに書き込めません (無効なターゲット)" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/jpn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 590d8c39681c8..3920f3ceeb5a4 100644 --- a/i18n/jpn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -14,9 +14,6 @@ "vscode.extension.contributes.keybindings.win": "Windows 固有のキーまたはキー シーケンス。", "vscode.extension.contributes.keybindings.when": "キーがアクティブの場合の条件。", "vscode.extension.contributes.keybindings": "キー バインドを提供します。", - "openDocumentation": "詳細情報", - "keybindingMigration.ok": "OK", - "keybindingMigration.prompt": "使用中のキーボード レイアウトに合わせて一部のキーボード ショートカットが変更されました。", "invalid.keybindings": "正しくない `contributes.{0}`: {1}", "unboundCommands": "他に使用できるコマンドは次のとおりです: ", "keybindings.json.title": "キー バインドの構成", diff --git a/i18n/kor/extensions/git/out/commands.i18n.json b/i18n/kor/extensions/git/out/commands.i18n.json index 99d98e59a53e6..9798aa482fa61 100644 --- a/i18n/kor/extensions/git/out/commands.i18n.json +++ b/i18n/kor/extensions/git/out/commands.i18n.json @@ -18,6 +18,8 @@ "discard": "변경 내용 취소", "confirm discard all": "모든 변경 내용을 취소하시겠습니까? 이 작업은 되돌릴 수 없습니다.", "discardAll": "모든 변경 내용 취소", + "yes": "예", + "always": "항상", "no changes": "커밋할 변경 내용이 없습니다.", "commit message": "커밋 메시지", "provide commit message": "커밋 메시지를 제공하세요.", diff --git a/i18n/kor/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/kor/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/extensions/typescript/package.i18n.json b/i18n/kor/extensions/typescript/package.i18n.json index 032e92f8c4d0d..a2f98f7c04ba1 100644 --- a/i18n/kor/extensions/typescript/package.i18n.json +++ b/i18n/kor/extensions/typescript/package.i18n.json @@ -35,7 +35,6 @@ "javascript.goToProjectConfig.title": "프로젝트 구성으로 이동", "typescript.referencesCodeLens.enabled": "참조 CodeLens 사용하거나 사용하지 않도록 설정합니다. TypeScript >= 2.0.6이 필요합니다.", "typescript.implementationsCodeLens.enabled": "구현 CodeLens를 사용하거나 사용하지 않도록 설정합니다. TypeScript >= 2.2.0이 필요합니다.", - "typescript.openTsServerLog.title": "TS 서버 로그 파일 열기", "typescript.selectTypeScriptVersion.title": "TypeScript 버전 선택", "jsDocCompletion.enabled": "자동 JSDoc 주석 사용/사용 안 함", "javascript.implicitProjectConfig.checkJs": "JavaScript 파일의 의미 체계 검사를 사용/사용하지 않습니다. 기존 jsconfig.json 또는 tsconfig.json 파일은 이 설정을 재정의합니다. TypeScript >=2.3.1이 필요합니다. ", diff --git a/i18n/kor/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/kor/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/code/electron-main/menus.i18n.json b/i18n/kor/src/vs/code/electron-main/menus.i18n.json index 76675a5647123..a8faf00b85863 100644 --- a/i18n/kor/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/kor/src/vs/code/electron-main/menus.i18n.json @@ -69,7 +69,6 @@ "miSmartSelectShrink": "선택 영역 축소(&&S)", "miViewExplorer": "탐색기(&&E)", "miViewSearch": "검색(&&S)", - "miViewGit": "Git(&&G)", "miViewDebug": "디버그(&&D)", "miViewExtensions": "확장(&&X)", "miToggleOutput": "출력(&&O)", diff --git a/i18n/kor/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/kor/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..4118aae2aa724 --- /dev/null +++ b/i18n/kor/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorViewAccessibleLabel": "편집기 콘텐츠" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/kor/src/vs/editor/contrib/hover/browser/hover.i18n.json index f2f8c2fde8204..af972da445ac9 100644 --- a/i18n/kor/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "가리키기 표시", - "hoverHighlight": "호버가 표시된 단어 아래를 강조 표시합니다.", - "hoverBackground": "편집기 호버의 배경색.", - "hoverBorder": "편집기 호버의 테두리 색입니다." + "showHover": "가리키기 표시" } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index 502c4b44ac962..d5cc24a60e7ce 100644 --- a/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -16,8 +16,6 @@ "peekViewTitleInfoForeground": "Peek 뷰 제목 정보 색입니다.", "peekViewBorder": "Peek 뷰 테두리 및 화살표 색입니다.", "peekViewResultsBackground": "Peek 뷰 결과 목록의 배경색입니다.", - "peekViewResultsMatchForeground": "Peek 뷰 결과 목록의 일치 항목 전경입니다.", - "peekViewResultsFileForeground": "Peek 뷰 결과 목록의 파일 항목 전경입니다.", "peekViewResultsSelectionBackground": "Peek 뷰 결과 목록에서 선택된 항목의 배경색입니다.", "peekViewResultsSelectionForeground": "Peek 뷰 결과 목록에서 선택된 항목의 전경색입니다.", "peekViewEditorBackground": "Peek 뷰 편집기의 배경색입니다.", diff --git a/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 5903be2fd573b..35c92b65eeacd 100644 --- a/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,10 +9,8 @@ "editorSuggestWidgetForeground": "제안 위젯의 전경색입니다.", "editorSuggestWidgetSelectedBackground": "제한 위젯에서 선택된 항목의 배경색입니다.", "editorSuggestWidgetHighlightForeground": "제안 위젯의 일치 항목 강조 표시 색입니다.", - "readMore": "자세히 알아보기...{0}", "suggestionWithDetailsAriaLabel": "{0}, 제안, 세부 정보 있음", "suggestionAriaLabel": "{0}, 제안", - "goback": "뒤로 이동", "suggestWidget.loading": "로드 중...", "suggestWidget.noSuggestions": "제안 항목이 없습니다.", "suggestionAriaAccepted": "{0}, 수락됨", diff --git a/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json index 411e1a2c08a6b..2a49f2851c083 100644 --- a/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -28,8 +28,6 @@ "listActiveSelectionBackground": "목록/트리가 활성 상태인 경우 선택한 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", "listInactiveSelectionBackground": "목록/트리가 비활성 상태인 경우 선택한 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", "listActiveSelectionForeground": "목록/트리가 활성 상태인 경우 선택한 항목의 목록/트리 전경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", - "listFocusAndSelectionBackground": "목록/트리가 활성 상태인 경우 포커스가 있는 선택한 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다. 이 색은 개별 선택 및 포커스 색보다 우선합니다.", - "listFocusAndSelectionForeground": "목록/트리가 활성 상태인 경우 포커스가 있는 선택한 항목의 목록/트리 전경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다. 이 색은 개별 선택 및 포커스 색보다 우선합니다.", "listHoverBackground": "마우스로 항목을 가리킬 때 목록/트리 배경입니다.", "listDropBackground": "마우스로 항목을 이동할 때 목록/트리 끌어서 놓기 배경입니다.", "highlight": "목록/트리 내에서 검색할 때 일치 항목 강조 표시의 목록/트리 전경색입니다.", @@ -50,7 +48,9 @@ "editorFindMatch": "현재 검색 일치 항목의 색입니다.", "findMatchHighlight": "기타 검색 일치 항목의 색입니다.", "findRangeHighlight": "검색을 제한하는 영역의 색을 지정합니다.", + "hoverHighlight": "호버가 표시된 단어 아래를 강조 표시합니다.", + "hoverBackground": "편집기 호버의 배경색.", + "hoverBorder": "편집기 호버의 테두리 색입니다.", "activeLinkForeground": "활성 링크의 색입니다.", - "linkForeground": "링크 색입니다.", "editorWidgetBackground": "찾기/바꾸기 같은 편집기 위젯의 배경색입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/kor/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..b5a9320355950 --- /dev/null +++ b/i18n/kor/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "ID가 '{0}'인 등록된 TreeExplorerNodeProvider가 없습니다.", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider '{0}'에서 루트 노드를 제공하지 못했습니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/kor/src/vs/workbench/browser/actions/configureLocale.i18n.json index 4623005568330..7244381347332 100644 --- a/i18n/kor/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,7 +7,6 @@ "configureLocale": "언어 구성", "displayLanguage": "VSCode의 표시 언어를 정의합니다.", "doc": "지원되는 언어 목록은 {0} 을(를) 참조하세요.", - "restart": "값을 변경하려면 VSCode를 다시 시작해야 합니다.", "fail.createSettings": "'{0}'({1})을(를) 만들 수 없습니다.", "JsonSchema.locale": "사용할 UI 언어입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/common/theme.i18n.json b/i18n/kor/src/vs/workbench/common/theme.i18n.json index 1cd988db67ead..ca6f547f854be 100644 --- a/i18n/kor/src/vs/workbench/common/theme.i18n.json +++ b/i18n/kor/src/vs/workbench/common/theme.i18n.json @@ -4,19 +4,14 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "탭 컨테이너의 배경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", "tabActiveBackground": "활성 탭 배경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", "tabInactiveBackground": "비활성 탭 배경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", "tabBorder": "탭을 서로 구분하기 위한 테두리입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", "tabActiveEditorGroupActiveForeground": "활성 그룹의 활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "tabActiveEditorGroupInactiveForeground": "비활성 그룹의 활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", "tabInactiveEditorGroupActiveForeground": "활성 그룹의 비활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "tabInactiveEditorGroupInactiveForeground": "비활성 그룹의 비활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", "editorGroupBackground": "편집기 그룹의 배경색입니다. 편집기 그룹은 편집기의 컨테이너입니다. 배경색은 편집기 그룹을 끌 때 표시됩니다.", "editorGroupHeaderBackground": "탭을 사용하지 않도록 설정한 경우 편집기 그룹 제목 머리글의 배경색입니다. 편집기 그룹은 편집기의 컨테이너입니다.", "editorGroupBorder": "여러 편집기 그룹을 서로 구분하기 위한 색입니다. 편집기 그룹은 편집기의 컨테이너입니다.", - "editorDragAndDropBackground": "편집기를 끌어올 때의 배경색입니다.", - "editorMasterDetailsBorder": "병렬 편집기에서 마스터 쪽의 세부 정보를 구분하기 위한 테두리 색입니다. Diff 편집기, 설정 편집기 등을 예로 들 수 있습니다.", "panelBackground": "패널 배경색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "panelBorder": "편집기와 구분되는 맨 위의 패널 테두리 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "panelActiveTitleForeground": "활성 패널의 제목 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", @@ -31,7 +26,6 @@ "statusBarProminentItemHoverBackground": "마우스로 가리킬 때의 상태 표시줄 주요 항목 배경색입니다. 주요 항목은 중요도를를 나타내는 다른 상태 표시줄 항목보다 눈에 잘 띕니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "activityBarBackground": "작업 막대 배경색입니다. 작업 막대는 맨 왼쪽이나 오른쪽에 표시되며 사이드바의 뷰 간을 전환하는 데 사용할 수 있습니다.", "activityBarForeground": "작업 막대 전경 색(예: 아이콘에 사용됨)입니다. 작업 막대는 오른쪽이나 왼쪽 끝에 표시되며 사이드바의 보기 간을 전환할 수 있습니다.", - "activityBarDragAndDropBackground": "작업 막대 항목의 끌어서 놓기 피드백 색입니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", "activityBarBadgeBackground": "활동 알림 배지 배경색입니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", "activityBarBadgeForeground": "활동 알림 배지 전경색입니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", "sideBarBackground": "사이드바 배경색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", diff --git a/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json index ca403839f4237..603999dbae9f4 100644 --- a/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -41,7 +41,6 @@ "window.newWindowDimensions.inherit": "마지막 활성 창과 동일한 크기로 새 창을 엽니다.", "window.newWindowDimensions.maximized": "최대화된 새 창을 엽니다.", "window.newWindowDimensions.fullscreen": "전체 화면 모드에서 새 창을 엽니다.", - "newWindowDimensions": "새 창을 열 때 크기를 제어합니다. 기본적으로 새 창은 화면 가운데에 작은 크기로 열립니다. 'inherit'으로 설정할 경우 마지막 활성 창과 동일한 크기로 창이 열립니다. 'maximized'로 설정할 경우 창이 최대화되어 열리고 'fullscreen'으로 구성할 경우 전체 화면으로 열립니다.", "window.menuBarVisibility.default": "메뉴가 전체 화면 모드에서만 숨겨집니다.", "window.menuBarVisibility.visible": "메뉴가 전체 화면 모드에서도 항상 표시됩니다.", "window.menuBarVisibility.toggle": "메뉴가 숨겨져 있지만 키를 통해 메뉴를 표시할 수 있습니다.", diff --git a/i18n/kor/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..f69056da38c92 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "클릭하여 이동(측면에서 열려면 Cmd 키를 누르고 클릭)", + "fileLink": "클릭하여 이동(측면에서 열려면 Ctrl 키를 누르고 클릭)" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..1fd1591aa39e7 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "내부 디버그 콘솔의 동작을 제어합니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index 8145efa9749b7..9c417b8c7dd35 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "stateCapture": "개체 상태는 첫 번재 평가에서 캡처됩니다.", - "fileLinkMac": "클릭하여 이동(측면에서 열려면 Cmd 키를 누르고 클릭)", - "fileLink": "클릭하여 이동(측면에서 열려면 Ctrl 키를 누르고 클릭)", "replVariableAriaLabel": "{0} 변수에 {1} 값이 있습니다. 읽기 평가 인쇄 루프, 디버그", "replExpressionAriaLabel": "{0} 식에 {1} 값이 있습니다. 읽기 평가 인쇄 루프, 디버그", "replValueOutputAriaLabel": "{0}, 읽기 평가 인쇄 루프, 디버그", diff --git a/i18n/kor/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index bac1b32e92a96..fb59d091ab99e 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,13 +7,11 @@ "debugAdapterBinNotFound": "디버그 어댑터 실행 파일 '{0}'이(가) 없습니다.", "debugAdapterCannotDetermineExecutable": "디버그 어댑터 '{0}'에 대한 실행 파일을 확인할 수 없습니다.", "debugType": "구성의 형식입니다.", - "debugTypeNotRecognised": "이 디버그 형식은 인식되지 않습니다. 해당하는 디버그 확장을 설치하세요.", "node2NotSupported": "\"node2\"는 더 이상 지원되지 않습니다. 대신 \"node\"를 사용하고 \"protocol\" 특성을 \"inspector\"로 설정하세요.", "debugName": "구성 이름이며, 구성 시작 드롭다운 메뉴에 표시됩니다.", "debugRequest": "구성 형식을 요청합니다. \"시작\" 또는 \"연결\"일 수 있습니다.", "debugServer": "디버그 확장 배포 전용입니다. 포트가 지정된 경우 VS Code에서는 서버 모드로 실행하는 디버그 어댑터에 연결을 시도합니다.", "debugPrelaunchTask": "디버그 세션이 시작되기 이전에 실행할 작업입니다.", - "internalConsoleOptions": "내부 디버그 콘솔의 동작을 제어합니다.", "debugWindowsConfiguration": "Windows 특정 시작 구성 특성입니다.", "debugOSXConfiguration": "OS X 특정 시작 구성 특성입니다.", "debugLinuxConfiguration": "Linux 특정 시작 구성 특성입니다.", diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 76bb8574a7e13..84dc72bd8eb1c 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -8,5 +8,7 @@ "showRecommendations": "권장 사항 표시", "neverShowAgain": "다시 표시 안 함", "close": "닫기", - "workspaceRecommended": "이 작업 영역에 확장 권장 사항이 있습니다." + "workspaceRecommended": "이 작업 영역에 확장 권장 사항이 있습니다.", + "no": "아니요", + "cancel": "취소" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index aafef40ec7e69..f9b799b1655ec 100644 --- a/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -27,8 +27,6 @@ "autoSaveDelay": "더티 파일을 자동으로 저장할 때까지의 지연(밀리초)을 제어합니다. 'files.autoSave'를 '{0}'(으)로 설정한 경우에만 적용됩니다.", "watcherExclude": "파일 감시에서 제외할 파일 경로의 GLOB 패턴을 구성하세요. 이 설정을 변경하려면 다시 시작해야 합니다. 시작 시 Code에서 CPU 시간을 많이 차지하면 대용량 폴더를 제외하여 초기 로드를 줄일 수 있습니다.", "hotExit.off": "핫 종료를 사용하지 않습니다.", - "hotExit.onExit": "핫 종료는 응용 프로그램을 닫을 때 트리거됩니다. 즉 Windows/Linux에서 마지막 창을 닫을 때나 workbench.action.quit 명령이 트리거될 때(명령 팔레트, 키 바인딩, 메뉴)입니다. 다음 실행 시 백업을 포함한 모든 창이 복원됩니다.", - "hotExit.onExitAndWindowClose": "핫 종료는 응용 프로그램을 닫을 때 트리거됩니다. 즉 Windows/Linux에서 마지막 창을 닫을 때나 workbench.action.quit 명령이 트리거될 때(명령 팔레트, 키 바인딩, 메뉴), 또한 마지막 창인지 여부에 상관없이 폴더가 열린 모든 창의 경우입니다. 열린 폴더가 없는 모든 창은 다음 실행 시 복원됩니다. 종료되기 전에 폴더 창을 복원하려면 \"window.reopenFolders\"를 \"all\"로 설정합니다.", "hotExit": "저장하지 않은 파일을 세션 간에 기억하여, 편집기를 종료할 때 저장할지 묻는 메시지를 건너뛸지 여부를 제어합니다.", "defaultLanguage": "새 파일에 할당되는 기본 언어 모드입니다.", "editorConfigurationTitle": "편집기", diff --git a/i18n/kor/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/kor/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index 50e19120bf9fd..5346ff5c5cf9c 100644 --- a/i18n/kor/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,7 +6,5 @@ { "searchMatches": "일치하는 {0}개 항목을 찾음", "searchMatch": "일치하는 {0}개 항목을 찾음", - "fileMatchAriaLabel": "{2} 폴더의 {1} 파일에 {0}개의 일치 항목이 있음, 검색 결과", - "replacePreviewResultAria": "미리 보기 바꾸기 결과, {0}", - "searchResultAria": "{0}, 검색 결과" + "fileMatchAriaLabel": "{2} 폴더의 {1} 파일에 {0}개의 일치 항목이 있음, 검색 결과" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index c5708dad5de0d..4e1c891e83fbf 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -18,7 +18,6 @@ "problems": "문제", "manyMarkers": "99+", "tasks": "작업", - "TaskSystem.noHotSwap": "작업 실행 엔진을 변경하면 VS Code를 다시 시작해야 합니다. 변경이 무시됩니다.", "TaskService.noBuildTask": "정의된 빌드 작업이 없습니다. tasks.json 파일에서 작업을 'isBuildCommand'로 표시하세요.", "TaskService.noTestTask": "정의된 테스트 작업이 없습니다. tasks.json 파일에서 작업을 'isTestCommand'로 표시하세요.", "TaskServer.noTask": "실행하도록 요청한 작업 {0}을(를) 찾을 수 없습니다.", diff --git a/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 90ad2a84f5953..96dd1b9aebb72 100644 --- a/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,7 +6,6 @@ { "selectTheme.label": "색 테마", "installColorThemes": "추가 색 테마 설치...", - "problemChangingTheme": "테마를 설정하는 동안 문제 발생: {0}", "themes.selectTheme": "색 테마 선택", "selectIconTheme.label": "파일 아이콘 테마", "installIconThemes": "추가 파일 아이콘 테마 설치...", diff --git a/i18n/kor/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/kor/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index a897bbf9abed7..58630d59484c7 100644 --- a/i18n/kor/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -5,10 +5,5 @@ // Do not edit this file. It is machine generated. { "errorUnknownKey": "구성 파일에 쓸 수 없습니다(알 수 없는 키).", - "errorInvalidTarget": "구성 파일에 쓸 수 없습니다(잘못된 대상).", - "errorNoWorkspaceOpened": "폴더가 열려 있지 않으므로 설정을 쓸 수 없습니다. 먼저 폴더를 열고 다시 시도하세요.", - "errorInvalidConfiguration": "설정을 쓸 수 없습니다. **사용자 설정**을 열어 파일에서 오류/경고를 해결하고 다시 시도하세요.", - "errorInvalidConfigurationWorkspace": "설정을 쓸 수 없습니다. **작업 영역 설정**을 열어 파일에서 오류/경고를 해결하고 다시 시도하세요.", - "errorConfigurationFileDirty": "파일이 변경되어 설정을 쓸 수 없습니다. **사용자 설정** 파일을 저장하고 다시 시도하세요.", - "errorConfigurationFileDirtyWorkspace": "파일이 변경되어 설정을 쓸 수 없습니다. **작업 영역 설정** 파일을 저장하고 다시 시도하세요." + "errorInvalidTarget": "구성 파일에 쓸 수 없습니다(잘못된 대상)." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/kor/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 86a6dfd7761e9..1d3e36aa30f36 100644 --- a/i18n/kor/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -14,9 +14,6 @@ "vscode.extension.contributes.keybindings.win": "Windows 특정 키 또는 키 시퀀스", "vscode.extension.contributes.keybindings.when": "키가 활성화되는 조건입니다.", "vscode.extension.contributes.keybindings": "키 바인딩을 적용합니다.", - "openDocumentation": "자세한 정보", - "keybindingMigration.ok": "확인", - "keybindingMigration.prompt": "키보드 레이아웃에 대해 일부 바로 가기 키가 변경되었습니다.", "invalid.keybindings": "잘못된 `contributes.{0}`입니다. {1}", "unboundCommands": "사용 가능한 다른 명령:", "keybindings.json.title": "키 바인딩 구성", diff --git a/i18n/rus/extensions/git/out/commands.i18n.json b/i18n/rus/extensions/git/out/commands.i18n.json index a55cd67aaa0a7..0e28cfd0b9a11 100644 --- a/i18n/rus/extensions/git/out/commands.i18n.json +++ b/i18n/rus/extensions/git/out/commands.i18n.json @@ -18,6 +18,8 @@ "discard": "Отменить изменения", "confirm discard all": "Вы действительно хотите отменить все изменения? Отменить это действие нельзя!", "discardAll": "Отменить все изменения", + "yes": "Да", + "always": "Всегда", "no changes": "Нет изменений для фиксации.", "commit message": "Сообщение о фиксации", "provide commit message": "Введите сообщение фиксации.", diff --git a/i18n/rus/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/rus/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/extensions/typescript/package.i18n.json b/i18n/rus/extensions/typescript/package.i18n.json index 683ce96350f98..c7a879594d3cc 100644 --- a/i18n/rus/extensions/typescript/package.i18n.json +++ b/i18n/rus/extensions/typescript/package.i18n.json @@ -35,7 +35,6 @@ "javascript.goToProjectConfig.title": "Перейти к конфигурации проекта", "typescript.referencesCodeLens.enabled": "Включить или отключить CodeLens для ссылок. Требуется TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Включить или отключить CodeLens для реализаций. Требуется TypeScript >= 2.2.0.", - "typescript.openTsServerLog.title": "Открытие файла журнала сервера TS", "typescript.selectTypeScriptVersion.title": "Выберите версию TypeScript.", "jsDocCompletion.enabled": "Включить или отключить JSDoc коментарии", "javascript.implicitProjectConfig.checkJs": "Включает/отключает семантическую проверку файлов JavaScript. Этот параметр может переопределяться в файле jsconfig.json или tsconfig.json. Требуется TypeScript 2.3.1 или более поздней версии.", diff --git a/i18n/rus/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/rus/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/code/electron-main/menus.i18n.json b/i18n/rus/src/vs/code/electron-main/menus.i18n.json index d970ca1ef1c6b..2caee2db03b5b 100644 --- a/i18n/rus/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/rus/src/vs/code/electron-main/menus.i18n.json @@ -5,9 +5,9 @@ // Do not edit this file. It is machine generated. { "mFile": "&&Файл", - "mEdit": "&&Изменить", - "mSelection": "&&Выделений", - "mView": "&&Просмотреть", + "mEdit": "&&Правка", + "mSelection": "&&Выделение", + "mView": "&&Вид", "mGoto": "&&Перейти", "mDebug": "&&Отладка", "mWindow": "Окно", @@ -69,7 +69,6 @@ "miSmartSelectShrink": "&&Сжать выделение", "miViewExplorer": "Проводник", "miViewSearch": "Поиск", - "miViewGit": "&&Git", "miViewDebug": "Отладка", "miViewExtensions": "Р&&асширения", "miToggleOutput": "Вывод", diff --git a/i18n/rus/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/rus/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..90b3992a47d14 --- /dev/null +++ b/i18n/rus/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorViewAccessibleLabel": "Содержимое редактора" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/rus/src/vs/editor/contrib/hover/browser/hover.i18n.json index 1140ec28ea068..61fdcdb90de91 100644 --- a/i18n/rus/src/vs/editor/contrib/hover/browser/hover.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -4,8 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "showHover": "Показать при наведении", - "hoverHighlight": "Выделение под словом, для которого показано наведение.", - "hoverBackground": "Цвет фона при наведении указателя на редактор.", - "hoverBorder": "Цвет границ при наведении указателя на редактор." + "showHover": "Показать при наведении" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index e5f25fad6949e..222d24b828811 100644 --- a/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -16,8 +16,6 @@ "peekViewTitleInfoForeground": "Цвет сведений о заголовке быстрого редактора.", "peekViewBorder": "Цвет границ быстрого редактора и массива.", "peekViewResultsBackground": "Цвет фона в списке результатов представления быстрого редактора.", - "peekViewResultsMatchForeground": "Передний план совпадений в списке результатов быстрого редактора.", - "peekViewResultsFileForeground": "Передний план записи файла в списке результатов быстрого редактора.", "peekViewResultsSelectionBackground": "Цвет фона выбранной записи в списке результатов быстрого редактора.", "peekViewResultsSelectionForeground": "Цвет переднего плана выбранной записи в списке результатов быстрого редактора.", "peekViewEditorBackground": "Цвет фона быстрого редактора.", diff --git a/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 1b508516908e2..9f09465ad47ce 100644 --- a/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,10 +9,8 @@ "editorSuggestWidgetForeground": "Цвет переднего плана мини-приложения предложений.", "editorSuggestWidgetSelectedBackground": "Фоновый цвет выбранной записи в мини-приложении предложений.", "editorSuggestWidgetHighlightForeground": "Цвет выделения соответствия в мини-приложении предложений.", - "readMore": "Подробнее...{0}", "suggestionWithDetailsAriaLabel": "{0}, предложение, содержит данные", "suggestionAriaLabel": "{0}, предложение", - "goback": "Вернуться", "suggestWidget.loading": "Идет загрузка...", "suggestWidget.noSuggestions": "Предложения отсутствуют.", "suggestionAriaAccepted": "{0}, принято", diff --git a/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json index fa30062c9dbac..9b7785d5ac633 100644 --- a/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -7,9 +7,11 @@ "invalid.color": "Недопустимый формат цвета. Используйте #RGB, #RGBA, #RRGGBB или #RRGGBBAA", "schema.colors": "Цвета, используемые на рабочем месте.", "foreground": "Общий цвет переднего плана. Этот цвет используется, только если его не переопределит компонент.", + "errorForeground": "Общий цвет переднего плана для сообщений об ошибках. Этот цвет используется только если его не переопределяет компонент.", "focusBorder": "Общий цвет границ для элементов с фокусом. Этот цвет используется только в том случае, если не переопределен в компоненте.", "contrastBorder": "Дополнительная граница вокруг элементов, которая отделяет их от других элементов для улучшения контраста.", "activeContrastBorder": "Дополнительная граница вокруг активных элементов, которая отделяет их от других элементов для улучшения контраста.", + "textSeparatorForeground": "Цвет для разделителей текста.", "widgetShadow": "Цвет тени мини-приложений редактора, таких как \"Найти/заменить\".", "inputBoxBackground": "Фон поля ввода.", "inputBoxForeground": "Передний план поля ввода.", @@ -28,8 +30,6 @@ "listActiveSelectionBackground": "Фоновый цвет выбранного элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", "listInactiveSelectionBackground": "Фоновый цвет выбранного элемента List/Tree, когда элемент List/Tree неактивен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", "listActiveSelectionForeground": "Цвет переднего плана выбранного элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", - "listFocusAndSelectionBackground": "Фоновый цвет находящегося в фокусе и выбранного элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет. Этот цвет имеет приоритет над индивидуальными цветами выделения и фокуса.", - "listFocusAndSelectionForeground": "Цвет переднего плана находящегося в фокусе и выбранного элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет. Этот цвет имеет приоритет над индивидуальными цветами выделения и фокуса.", "listHoverBackground": "Фоновый цвет элементов List/Tree при наведении курсора мыши.", "listDropBackground": "Фоновый цвет элементов List/Tree при перемещении с помощью мыши.", "highlight": "Цвет переднего плана для выделения соответствия при поиске по элементу List/Tree.", @@ -50,7 +50,9 @@ "editorFindMatch": "Цвет текущего поиска совпадений.", "findMatchHighlight": "Цвет других совпадений поиска.", "findRangeHighlight": "Цвет диапазона, ограничивающего поиск.", + "hoverHighlight": "Выделение под словом, для которого показано наведение.", + "hoverBackground": "Цвет фона при наведении указателя на редактор.", + "hoverBorder": "Цвет границ при наведении указателя на редактор.", "activeLinkForeground": "Цвет активных ссылок.", - "linkForeground": "Цвет ссылок.", "editorWidgetBackground": "Цвет фона виджетов редактора, таких как найти/заменить." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/node/extHostExplorerView.i18n.json b/i18n/rus/src/vs/workbench/api/node/extHostExplorerView.i18n.json new file mode 100644 index 0000000000000..69ab93e32faf9 --- /dev/null +++ b/i18n/rus/src/vs/workbench/api/node/extHostExplorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.notRegistered": "TreeExplorerNodeProvider с идентификатором \"{0}\" не зарегистрирован.", + "treeExplorer.failedToProvideRootNode": "TreeExplorerNodeProvider \"{0}\" не удалось предоставить корневой узел." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/rus/src/vs/workbench/browser/actions/configureLocale.i18n.json index b6db31f0ebdec..4b803b9827d23 100644 --- a/i18n/rus/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,7 +7,6 @@ "configureLocale": "Настроить язык", "displayLanguage": "Определяет язык интерфейса VSCode.", "doc": "Список поддерживаемых языков см. в {0}.", - "restart": "Для изменения значения требуется перезапуск VSCode.", "fail.createSettings": "Невозможно создать \"{0}\" ({1}).", "JsonSchema.locale": "Язык пользовательского интерфейса." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/common/theme.i18n.json b/i18n/rus/src/vs/workbench/common/theme.i18n.json index f3d59ca959ea9..76b8cda3228df 100644 --- a/i18n/rus/src/vs/workbench/common/theme.i18n.json +++ b/i18n/rus/src/vs/workbench/common/theme.i18n.json @@ -4,19 +4,14 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "tabsContainerBackground": "Цвет фона контейнера вкладок. Вкладки — это контейнеры для редакторов в области редакторов. В одной группе редакторов можно открыть несколько вкладок. Может быть несколько групп редакторов.", "tabActiveBackground": "Цвет фона активной вкладки. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "tabInactiveBackground": "Цвет фона неактивной вкладки. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "tabBorder": "Граница для разделения вкладок. Вкладки — это контейнеры для редакторов в области редакторов. В одной группе редакторов можно открыть несколько вкладок. Может быть несколько групп редакторов.", "tabActiveEditorGroupActiveForeground": "Цвет переднего плана активной вкладки в активной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", - "tabActiveEditorGroupInactiveForeground": "Цвет переднего плана активной вкладки в неактивной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "tabInactiveEditorGroupActiveForeground": "Цвет переднего плана неактивной вкладки в активной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", - "tabInactiveEditorGroupInactiveForeground": "Цвет переднего плана неактивной вкладки в неактивной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "editorGroupBackground": "Цвет фона группы редакторов. Группы редакторов представляют собой контейнеры редакторов. Цвет фона отображается при перетаскивании групп редакторов.", "editorGroupHeaderBackground": "Цвет фона для заголовка группы редакторов, когда вкладки отключены. Группы редакторов представляют собой контейнеры редакторов.", "editorGroupBorder": "Цвет для разделения нескольких групп редакторов. Группы редакторов — это контейнеры редакторов.", - "editorDragAndDropBackground": "Цвет фона при перетаскивании редакторов.", - "editorMasterDetailsBorder": "Цвет контура для отделения сведений от главной панели для параллельных редакторов. К примерам таких редакторов относятся редакторы несовпадений и редактор параметров.", "panelBackground": "Цвет фона панели. Панели показаны под областью редактора и содержат такие представления, как выходные данные и встроенный терминал.", "panelBorder": "Цвет верхней границы панели, отделяющей ее от редактора. Панели показаны под областью редактора и содержат такие представления, как выходные данные и встроенный терминал.", "panelActiveTitleForeground": "Цвет заголовка для активной панели. Панели отображаются под областью редактора и содержат такие представления, как окно вывода и встроенный терминал.", @@ -31,7 +26,6 @@ "statusBarProminentItemHoverBackground": "Цвет фона приоритетных элементов панели состояния при наведении. Приоритетные элементы выделяются на фоне других элементов панели состояния, чтобы подчеркнуть их значение. Панель состояния отображается в нижней части окна.", "activityBarBackground": "Цвет фона панели действий. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", "activityBarForeground": "Цвет переднего плана панели действий (например, цвет, используемый для значков). Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", - "activityBarDragAndDropBackground": "Цвет обратной связи при перетаскивании для элементов панели действий. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", "activityBarBadgeBackground": "Цвет фона значка уведомлений о действиях. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", "activityBarBadgeForeground": "Цвет переднего плана значка уведомлений о действиях. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", "sideBarBackground": "Цвет фона боковой панели. Боковая панель — это контейнер таких представлений, как проводник и поиск.", diff --git a/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json index f2bf936917329..ff2b65c8faba0 100644 --- a/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -41,7 +41,6 @@ "window.newWindowDimensions.inherit": "Открывать новые окна того же размера, что и последнее активное окно.", "window.newWindowDimensions.maximized": "Открывать новые окна в развернутом состоянии.", "window.newWindowDimensions.fullscreen": "Открывать новые окна в полноэкранном режиме.", - "newWindowDimensions": "Определяет размеры открывающегося нового окна. По умолчанию новое окно небольшого размера будет открываться по центру экрана. Если задано значение inherit, окно будет открываться с теми же размерами, что и последнее активное окно. Если задано значение maximized, окно будет открываться в максимальном размере, и в полноэкранном режиме, если задано значение fullscreen.", "window.menuBarVisibility.default": "Меню скрыто только в полноэкранном режиме.", "window.menuBarVisibility.visible": "Меню всегда видимо, даже в полноэкранном режиме.", "window.menuBarVisibility.toggle": "Меню скрыто, но его можно вывести с помощью клавиши ALT.", diff --git a/i18n/rus/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..fab9558d4c225 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "Щелкните, чтобы отслеживать (чтобы открыть сбоку экрана, щелкните, удерживая клавишу CMD)", + "fileLink": "Щелкните, чтобы отслеживать (чтобы открыть сбоку экрана, щелкните, удерживая клавишу CTRL)" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..7f2fb6520d00d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "Управляет поведением внутренней консоли отладки." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json index 188f271b73e43..4c742d270df2d 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "stateCapture": "Состояние объекта записывается после первого вычисления", - "fileLinkMac": "Щелкните, чтобы отслеживать (чтобы открыть сбоку экрана, щелкните, удерживая клавишу CMD)", - "fileLink": "Щелкните, чтобы отслеживать (чтобы открыть сбоку экрана, щелкните, удерживая клавишу CTRL)", "replVariableAriaLabel": "Переменная \"{0}\" имеет значение \"{1}\", read–eval–print loop, отладка", "replExpressionAriaLabel": "Выражение \"{0}\" имеет значение \"{1}\", read–eval–print loop, отладка", "replValueOutputAriaLabel": "{0}, read–eval–print loop, отладка", diff --git a/i18n/rus/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 8ea4b501a1ea6..90a5d4e861ea8 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,13 +7,11 @@ "debugAdapterBinNotFound": "Исполняемый файл адаптера отладки \"{0}\" не существует.", "debugAdapterCannotDetermineExecutable": "Невозможно определить исполняемый файл для адаптера отладки \"{0}\".", "debugType": "Тип конфигурации.", - "debugTypeNotRecognised": "Не удается распознать тип отладки. Установите соответствующее расширение отладки.", "node2NotSupported": "Значение \"node2\" больше не поддерживается; используйте \"node\" и задайте для атрибута \"protocol\" значение \"inspector\".", "debugName": "Имя конфигурации; отображается в раскрывающемся меню конфигурации запуска.", "debugRequest": "Запросите тип конфигурации. Возможные типы: \"запуск\" и \"подключение\".", "debugServer": "Только для разработки расширений отладки: если указан порт, VS Code пытается подключиться к адаптеру отладки, запущенному в режиме сервера.", "debugPrelaunchTask": "Задача, выполняемая перед началом сеанса отладки.", - "internalConsoleOptions": "Управляет поведением внутренней консоли отладки.", "debugWindowsConfiguration": "Атрибуты конфигурации запуска для Windows.", "debugOSXConfiguration": "Атрибуты конфигурации запуска для OS X.", "debugLinuxConfiguration": "Атрибуты конфигурации запуска для Linux.", diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 6380e0caa1e07..e3fabddede95c 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -8,5 +8,7 @@ "showRecommendations": "Показать рекомендации", "neverShowAgain": "Больше не показывать", "close": "Закрыть", - "workspaceRecommended": "Эта рабочая область включает рекомендации по расширениям." + "workspaceRecommended": "Эта рабочая область включает рекомендации по расширениям.", + "no": "Нет", + "cancel": "Отмена" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index a548f83b670c7..952d7106938fb 100644 --- a/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -27,8 +27,6 @@ "autoSaveDelay": "Определяет задержку в мс, после которой измененный файл сохраняется автоматически. Действует, только если параметр \"files.autoSave\" имеет значение \"{0}\".", "watcherExclude": "Настройте стандартные маски путей файлов, чтобы исключить их из списка отслеживаемых файлов. После изменения этого параметра потребуется перезагрузка. При отображении сообщения \"Код потребляет большое количество процессорного времени при запуске\" вы можете исключить большие папки, чтобы уменьшить первоначальную загрузку.", "hotExit.off": "Отключите \"горячий\" выход.", - "hotExit.onExit": "\"Горячий\" выход будет активирован при закрытии приложения, то есть когда закрывается последнее окно в Windows или Linux или при активации команды workbench.action.quit (палитра команд, настраиваемое сочетание клавиш, меню). Все окна с резервными копиями будут восстановлены при следующем запуске.", - "hotExit.onExitAndWindowClose": "\"Горячий\" выход будет активирован при закрытии приложения, то есть когда закрывается последнее окно в Windows или Linux или при активации команды workbench.action.quit (палитра команд, настраиваемое сочетание клавиш, меню) и в любых окнах, где открыта папка, даже если это не последнее окно. Окна без открытых папок будут восстановлены при следующем запуске. Чтобы восстановить окна с папками, перед завершением работы задайте для \"window.reopenFolders\" значение \"all\".", "hotExit": "Определяет, запоминаются ли несохраненные файлы между сеансами. В этом случае приглашение на их сохранение при выходе из редактора не появляется.", "defaultLanguage": "Режим языка по умолчанию, который назначается новым файлам.", "editorConfigurationTitle": "Редактор", diff --git a/i18n/rus/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/rus/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index e7f3725b95324..845c4f038e9c3 100644 --- a/i18n/rus/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,7 +6,5 @@ { "searchMatches": "Найдено соответствий: {0}", "searchMatch": "Найдено соответствие: {0}", - "fileMatchAriaLabel": "Совпадений в файле {1} папки {2}: {0}, результат поиска", - "replacePreviewResultAria": "Результаты предварительного просмотра замены, {0}", - "searchResultAria": "{0}, результат поиска" + "fileMatchAriaLabel": "Совпадений в файле {1} папки {2}: {0}, результат поиска" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index da2bdae0add1c..031f694786cb4 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -18,7 +18,6 @@ "problems": "Проблемы", "manyMarkers": "99+", "tasks": "Задачи", - "TaskSystem.noHotSwap": "Чтобы изменить подсистему выполнения задач, нужно перезапустить VS Code. Изменение игнорируется.", "TaskService.noBuildTask": "Задача сборки не определена. Отметьте задачу с помощью \"isBuildCommand\" в файле tasks.json.", "TaskService.noTestTask": "Задача теста не определена. Отметьте задачу с помощью \"isTestCommand\" в файле tasks.json.", "TaskServer.noTask": "Запрошенная задача {0} для выполнения не найдена.", diff --git a/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 7cd864203eac5..21f6cd4a2cb95 100644 --- a/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,7 +6,6 @@ { "selectTheme.label": "Цветовая тема", "installColorThemes": "Установить дополнительные цветовые темы...", - "problemChangingTheme": "Проблема при задании темы: {0}", "themes.selectTheme": "Выберите цветовую тему", "selectIconTheme.label": "Тема значков файлов", "installIconThemes": "Установить дополнительные темы значков файлов...", diff --git a/i18n/rus/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/rus/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 819e2b3d58b67..0e4643e39d808 100644 --- a/i18n/rus/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -5,10 +5,5 @@ // Do not edit this file. It is machine generated. { "errorUnknownKey": "Не удается выполнить запись в файл конфигурации (неизвестный ключ)", - "errorInvalidTarget": "Не удается выполнить запись в файл конфигурации (недопустимый целевой объект).", - "errorNoWorkspaceOpened": "Не удается записать параметры, так как нет открытых папок. Откройте папку и повторите попытку.", - "errorInvalidConfiguration": "Не удается выполнить запись параметров. Откройте файл **User Settings**, чтобы разрешить ошибки и предупреждения в файле, и повторите попытку.", - "errorInvalidConfigurationWorkspace": "Не удается выполнить запись параметров. Откройте файл **Workspace Settings**, чтобы разрешить ошибки и предупреждения в файле, и повторите попытку.", - "errorConfigurationFileDirty": "Не удается выполнить запись параметров, так как файл изменен. Сохраните файл **User Settings** и повторите попытку.", - "errorConfigurationFileDirtyWorkspace": "Не удается выполнить запись параметров, так как файл изменен. Сохраните файл **Workspace Settings** и повторите попытку." + "errorInvalidTarget": "Не удается выполнить запись в файл конфигурации (недопустимый целевой объект)." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/rus/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index e710354892646..1a285aa0137bc 100644 --- a/i18n/rus/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -14,9 +14,6 @@ "vscode.extension.contributes.keybindings.win": "Клавиша или последовательность клавиш для Windows.", "vscode.extension.contributes.keybindings.when": "Условие, когда клавиша нажата.", "vscode.extension.contributes.keybindings": "Добавляет настраиваемые сочетания клавиш.", - "openDocumentation": "Дополнительные сведения", - "keybindingMigration.ok": "ОК", - "keybindingMigration.prompt": "Некоторые сочетания клавиш для вашей раскладки клавиатуры изменились.", "invalid.keybindings": "Недопустимое значение \"contributes.{0}\": {1}", "unboundCommands": "Доступные команды: ", "keybindings.json.title": "Настройка настраиваемых сочетаний клавиш", From 2b9679b5fb61ba62e61db89b7fcc067738710d7f Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 12 May 2017 18:21:33 -0700 Subject: [PATCH 0505/2747] Pick up TS 2.3.3-insiders --- extensions/npm-shrinkwrap.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/npm-shrinkwrap.json b/extensions/npm-shrinkwrap.json index 34796990f9d12..344c2b4d7907a 100644 --- a/extensions/npm-shrinkwrap.json +++ b/extensions/npm-shrinkwrap.json @@ -3,9 +3,9 @@ "version": "0.0.1", "dependencies": { "typescript": { - "version": "2.3.2", - "from": "typescript@typescript@2.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.3.2.tgz" + "version": "2.3.3-insiders.20170512,", + "from": "typescript@typescript@2.3.3-insiders.20170512", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.3.3-insiders.20170512.tgz" } } } diff --git a/package.json b/package.json index e2494bd6b0d0b..17b69cfc392f7 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "sinon": "^1.17.2", "source-map": "^0.4.4", "tslint": "^4.3.1", - "typescript": "2.3.2", + "typescript": "2.3.3-insiders.20170512", "typescript-formatter": "4.0.1", "uglify-js": "2.4.8", "underscore": "^1.8.2", From 513b3b406d5754ef4d80c21172e80ca410784a73 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 12 May 2017 18:52:26 -0700 Subject: [PATCH 0506/2747] Fix name for ts 2.3.3 --- extensions/extension-editing/src/extension.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/extension-editing/src/extension.ts b/extensions/extension-editing/src/extension.ts index cda1ed07ce997..647385b059b03 100644 --- a/extensions/extension-editing/src/extension.ts +++ b/extensions/extension-editing/src/extension.ts @@ -74,7 +74,7 @@ namespace ast { const spans: number[] = []; ts.forEachChild(sourceFile, function visit(node: ts.Node) { - const declIdent = (node).name; + const declIdent = (node).name; if (declIdent && declIdent.kind === ts.SyntaxKind.Identifier) { identifiers.push((declIdent).text); spans.push(node.pos, node.end); From 092ea70b9aa21d263d8ddbd7052b50fdc594169e Mon Sep 17 00:00:00 2001 From: mappu Date: Sat, 13 May 2017 14:38:35 +1200 Subject: [PATCH 0507/2747] extension/php: detect language via shebang (#26581) Fixes #26580 --- extensions/php/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/php/package.json b/extensions/php/package.json index 7f1aa55047898..a72bd56f64d0d 100644 --- a/extensions/php/package.json +++ b/extensions/php/package.json @@ -27,6 +27,7 @@ "PHP", "php" ], + "firstLine": "^#!/.*\\bphp\\b", "mimetypes": [ "application/x-php" ], @@ -119,4 +120,4 @@ "devDependencies": { "@types/node": "^7.0.4" } -} \ No newline at end of file +} From f856147a01af2f1417bcff1b65f2693a14f43603 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 12 May 2017 20:24:40 -0700 Subject: [PATCH 0508/2747] Split js and ts setting for references code lens Fixes #26418 Allows enabling or disabling the references code lenses in either javascript or typescript. Previously, the setting enabled it in both language automatically. Enable the code lenses in ts files by default --- extensions/typescript/package.json | 7 ++- extensions/typescript/package.nls.json | 3 +- .../src/features/baseCodeLensProvider.ts | 15 +++--- .../implementationsCodeLensProvider.ts | 12 +++-- .../features/referencesCodeLensProvider.ts | 12 +++-- extensions/typescript/src/typescriptMain.ts | 52 ++++++++----------- 6 files changed, 55 insertions(+), 46 deletions(-) diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index 1d239313b43fa..9526dddcdbd99 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -107,9 +107,14 @@ "default": true, "description": "%typescript.check.npmIsInstalled%" }, - "typescript.referencesCodeLens.enabled": { + "javascript.referencesCodeLens.enabled": { "type": "boolean", "default": false, + "description": "%javascript.referencesCodeLens.enabled%" + }, + "typescript.referencesCodeLens.enabled": { + "type": "boolean", + "default": true, "description": "%typescript.referencesCodeLens.enabled%" }, "typescript.implementationsCodeLens.enabled": { diff --git a/extensions/typescript/package.nls.json b/extensions/typescript/package.nls.json index 2217759f722c1..f14b731bdad62 100644 --- a/extensions/typescript/package.nls.json +++ b/extensions/typescript/package.nls.json @@ -28,7 +28,8 @@ "javascript.validate.enable": "Enable/disable JavaScript validation.", "typescript.goToProjectConfig.title": "Go to Project Configuration", "javascript.goToProjectConfig.title": "Go to Project Configuration", - "typescript.referencesCodeLens.enabled": "Enable/disable references CodeLens. Requires TypeScript >= 2.0.6.", + "javascript.referencesCodeLens.enabled": "Enable/disable references CodeLens in JavaScript files.", + "typescript.referencesCodeLens.enabled": "Enable/disable references CodeLens in TypeScript files. Requires TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Enable/disable implementations CodeLens. Requires TypeScript >= 2.2.0.", "typescript.openTsServerLog.title": "Open TS Server log", "typescript.selectTypeScriptVersion.title": "Select TypeScript Version", diff --git a/extensions/typescript/src/features/baseCodeLensProvider.ts b/extensions/typescript/src/features/baseCodeLensProvider.ts index dbfd54eb391c3..9d2c4bfb768f5 100644 --- a/extensions/typescript/src/features/baseCodeLensProvider.ts +++ b/extensions/typescript/src/features/baseCodeLensProvider.ts @@ -5,7 +5,7 @@ 'use strict'; -import { CodeLensProvider, CodeLens, CancellationToken, TextDocument, Range, Uri, Position, Event, EventEmitter, workspace, ProviderResult, } from 'vscode'; +import { CodeLensProvider, CodeLens, CancellationToken, TextDocument, Range, Uri, Position, Event, EventEmitter, ProviderResult, } from 'vscode'; import * as Proto from '../protocol'; import { ITypescriptServiceClient } from '../typescriptService'; @@ -21,23 +21,20 @@ export class ReferencesCodeLens extends CodeLens { } export abstract class TypeScriptBaseCodeLensProvider implements CodeLensProvider { - private enabled: boolean = false; + private enabled: boolean = true; private onDidChangeCodeLensesEmitter = new EventEmitter(); public constructor( - protected client: ITypescriptServiceClient, - private toggleSettingName: string + protected client: ITypescriptServiceClient ) { } public get onDidChangeCodeLenses(): Event { return this.onDidChangeCodeLensesEmitter.event; } - public updateConfiguration(): void { - const typeScriptConfig = workspace.getConfiguration('typescript'); - const wasEnabled = this.enabled; - this.enabled = typeScriptConfig.get(this.toggleSettingName, false); - if (wasEnabled !== this.enabled) { + protected setEnabled(enabled: false): void { + if (this.enabled !== enabled) { + this.enabled = enabled; this.onDidChangeCodeLensesEmitter.fire(); } } diff --git a/extensions/typescript/src/features/implementationsCodeLensProvider.ts b/extensions/typescript/src/features/implementationsCodeLensProvider.ts index 11f9e99da7cec..793176bb4f625 100644 --- a/extensions/typescript/src/features/implementationsCodeLensProvider.ts +++ b/extensions/typescript/src/features/implementationsCodeLensProvider.ts @@ -5,7 +5,7 @@ 'use strict'; -import { CodeLens, CancellationToken, TextDocument, Range, Location, ProviderResult } from 'vscode'; +import { CodeLens, CancellationToken, TextDocument, Range, Location, ProviderResult, workspace } from 'vscode'; import * as Proto from '../protocol'; import * as PConst from '../protocol.const'; @@ -17,9 +17,15 @@ const localize = nls.loadMessageBundle(); export default class TypeScriptImplementationsCodeLensProvider extends TypeScriptBaseCodeLensProvider { public constructor( - client: ITypescriptServiceClient + client: ITypescriptServiceClient, + private readonly language: string ) { - super(client, 'implementationsCodeLens.enabled'); + super(client); + } + + public updateConfiguration(): void { + const config = workspace.getConfiguration(this.language); + this.setEnabled(config.get('implementationsCodeLens.enabled', false)); } provideCodeLenses(document: TextDocument, token: CancellationToken): ProviderResult { diff --git a/extensions/typescript/src/features/referencesCodeLensProvider.ts b/extensions/typescript/src/features/referencesCodeLensProvider.ts index ffd29559e1c28..46ecf347e7292 100644 --- a/extensions/typescript/src/features/referencesCodeLensProvider.ts +++ b/extensions/typescript/src/features/referencesCodeLensProvider.ts @@ -5,7 +5,7 @@ 'use strict'; -import { CodeLens, CancellationToken, TextDocument, Range, Location, ProviderResult } from 'vscode'; +import { CodeLens, CancellationToken, TextDocument, Range, Location, ProviderResult, workspace } from 'vscode'; import * as Proto from '../protocol'; import * as PConst from '../protocol.const'; @@ -17,9 +17,15 @@ const localize = nls.loadMessageBundle(); export default class TypeScriptReferencesCodeLensProvider extends TypeScriptBaseCodeLensProvider { public constructor( - client: ITypescriptServiceClient + client: ITypescriptServiceClient, + private readonly language: string ) { - super(client, 'referencesCodeLens.enabled'); + super(client); + } + + public updateConfiguration(): void { + const config = workspace.getConfiguration(this.language); + this.setEnabled(config.get('referencesCodeLens.enabled', false)); } provideCodeLenses(document: TextDocument, token: CancellationToken): ProviderResult { diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 99e107b9ce681..276b931a661d8 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -137,13 +137,10 @@ class LanguageProvider { private readonly currentDiagnostics: DiagnosticCollection; private readonly bufferSyncSupport: BufferSyncSupport; - private completionItemProvider: CompletionItemProvider; private formattingProvider: FormattingProvider; private formattingProviderRegistration: Disposable | null; private typingsStatus: TypingsStatus; - private referenceCodeLensProvider: ReferenceCodeLensProvider; - private implementationCodeLensProvider: ImplementationCodeLensProvider; - private JsDocCompletionProvider: JsDocCompletionProvider; + private toUpdateOnConfigurationChanged: ({ updateConfiguration: () => void })[] = []; private _validate: boolean = true; @@ -205,9 +202,10 @@ class LanguageProvider { const selector = this.description.modeIds; const config = workspace.getConfiguration(this.id); - this.completionItemProvider = new CompletionItemProvider(client, this.typingsStatus); - this.completionItemProvider.updateConfiguration(); - this.disposables.push(languages.registerCompletionItemProvider(selector, this.completionItemProvider, '.')); + const completionItemProvider = new CompletionItemProvider(client, this.typingsStatus); + completionItemProvider.updateConfiguration(); + this.toUpdateOnConfigurationChanged.push(completionItemProvider); + this.disposables.push(languages.registerCompletionItemProvider(selector, completionItemProvider, '.')); this.disposables.push(languages.registerCompletionItemProvider(selector, new DirectiveCommentCompletionProvider(client), '@')); @@ -218,9 +216,9 @@ class LanguageProvider { this.formattingProviderRegistration = languages.registerDocumentRangeFormattingEditProvider(selector, this.formattingProvider); } - this.JsDocCompletionProvider = new JsDocCompletionProvider(client); - this.JsDocCompletionProvider.updateConfiguration(); - this.disposables.push(languages.registerCompletionItemProvider(selector, this.JsDocCompletionProvider, '*')); + const jsDocCompletionProvider = new JsDocCompletionProvider(client); + jsDocCompletionProvider.updateConfiguration(); + this.disposables.push(languages.registerCompletionItemProvider(selector, jsDocCompletionProvider, '*')); this.disposables.push(languages.registerHoverProvider(selector, new HoverProvider(client))); this.disposables.push(languages.registerDefinitionProvider(selector, new DefinitionProvider(client))); @@ -230,14 +228,6 @@ class LanguageProvider { this.disposables.push(languages.registerSignatureHelpProvider(selector, new SignatureHelpProvider(client), '(', ',')); this.disposables.push(languages.registerRenameProvider(selector, new RenameProvider(client))); - this.referenceCodeLensProvider = new ReferenceCodeLensProvider(client); - this.referenceCodeLensProvider.updateConfiguration(); - this.disposables.push(languages.registerCodeLensProvider(selector, this.referenceCodeLensProvider)); - - this.implementationCodeLensProvider = new ImplementationCodeLensProvider(client); - this.implementationCodeLensProvider.updateConfiguration(); - this.disposables.push(languages.registerCodeLensProvider(selector, this.implementationCodeLensProvider)); - this.disposables.push(languages.registerCodeActionsProvider(selector, new CodeActionProvider(client, this.description.id))); this.registerVersionDependentProviders(); @@ -245,6 +235,17 @@ class LanguageProvider { this.description.modeIds.forEach(modeId => { this.disposables.push(languages.registerWorkspaceSymbolProvider(new WorkspaceSymbolProvider(client, modeId))); + const referenceCodeLensProvider = new ReferenceCodeLensProvider(client, modeId); + referenceCodeLensProvider.updateConfiguration(); + this.toUpdateOnConfigurationChanged.push(referenceCodeLensProvider); + this.disposables.push(languages.registerCodeLensProvider(selector, referenceCodeLensProvider)); + + const implementationCodeLensProvider = new ImplementationCodeLensProvider(client, modeId); + implementationCodeLensProvider.updateConfiguration(); + this.toUpdateOnConfigurationChanged.push(implementationCodeLensProvider); + this.disposables.push(languages.registerCodeLensProvider(selector, implementationCodeLensProvider)); + + this.disposables.push(languages.setLanguageConfiguration(modeId, { indentationRules: { // ^(.*\*/)?\s*\}.*$ @@ -302,15 +303,7 @@ class LanguageProvider { private configurationChanged(): void { const config = workspace.getConfiguration(this.id); this.updateValidate(config.get(validateSetting, true)); - if (this.completionItemProvider) { - this.completionItemProvider.updateConfiguration(); - } - if (this.referenceCodeLensProvider) { - this.referenceCodeLensProvider.updateConfiguration(); - } - if (this.implementationCodeLensProvider) { - this.implementationCodeLensProvider.updateConfiguration(); - } + if (this.formattingProvider) { this.formattingProvider.updateConfiguration(config); if (!this.formattingProvider.isEnabled() && this.formattingProviderRegistration) { @@ -321,8 +314,9 @@ class LanguageProvider { this.formattingProviderRegistration = languages.registerDocumentRangeFormattingEditProvider(this.description.modeIds, this.formattingProvider); } } - if (this.JsDocCompletionProvider) { - this.JsDocCompletionProvider.updateConfiguration(); + + for (const toUpdate of this.toUpdateOnConfigurationChanged) { + toUpdate.updateConfiguration(); } } From 78676ce503e17bd5a0bde93211de499e45c1c36f Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 12 May 2017 20:50:36 -0700 Subject: [PATCH 0509/2747] Ensure the default js/tsconfig has content when first created. Fixes #21209 --- extensions/typescript/src/typescriptMain.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 276b931a661d8..69901efcc651d 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -9,7 +9,7 @@ * ------------------------------------------------------------------------------------------ */ 'use strict'; -import { env, languages, commands, workspace, window, ExtensionContext, Memento, IndentAction, Diagnostic, DiagnosticCollection, Range, Disposable, Uri, MessageItem, TextEditor, DiagnosticSeverity, TextDocument } from 'vscode'; +import { env, languages, commands, workspace, window, ExtensionContext, Memento, IndentAction, Diagnostic, DiagnosticCollection, Range, Disposable, Uri, MessageItem, TextEditor, DiagnosticSeverity, TextDocument, SnippetString } from 'vscode'; // This must be the first statement otherwise modules might got loaded with // the wrong locale. @@ -531,10 +531,15 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { switch (selected && selected.id) { case ProjectConfigAction.CreateConfig: const configFile = Uri.file(path.join(rootPath, isTypeScriptProject ? 'tsconfig.json' : 'jsconfig.json')); + const col = window.activeTextEditor ? window.activeTextEditor.viewColumn : undefined; return workspace.openTextDocument(configFile) - .then(undefined, _ => workspace.openTextDocument(configFile.with({ scheme: 'untitled' }))) - .then(doc => - window.showTextDocument(doc, window.activeTextEditor ? window.activeTextEditor.viewColumn : undefined)); + .then(doc => { + return window.showTextDocument(doc, col); + }, _ => { + return workspace.openTextDocument(configFile.with({ scheme: 'untitled' })) + .then(doc => window.showTextDocument(doc, col)) + .then(editor => editor.insertSnippet(new SnippetString('{\n\t$0\n}'))); + }); case ProjectConfigAction.LearnMore: if (isTypeScriptProject) { From 81fc317dd8bb2dd5be03387dd9765bc24259c9d6 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Sun, 14 May 2017 10:10:56 -0700 Subject: [PATCH 0510/2747] Don't show extra empty lines in the Search output channel when searching with ripgrep disabled --- src/vs/workbench/parts/search/browser/searchViewlet.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index 4d12455d04f95..e0c38df0a0f1f 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -988,7 +988,10 @@ export class SearchViewlet extends Viewlet { let isDone = false; const outputChannel = this.outputService.getChannel('search'); let onComplete = (completed?: ISearchComplete) => { - outputChannel.append('\n'); + if (query.useRipgrep) { + outputChannel.append('\n'); + } + isDone = true; // Complete up to 100% as needed @@ -1102,7 +1105,10 @@ export class SearchViewlet extends Viewlet { }; let onError = (e: any) => { - outputChannel.append('\n'); + if (query.useRipgrep) { + outputChannel.append('\n'); + } + if (errors.isPromiseCanceledError(e)) { onComplete(null); } else { From 5f5df7cb97980275a9b9f45cedf4c27cdbd877df Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 14 May 2017 12:07:01 -0700 Subject: [PATCH 0511/2747] Add commands to control workspace shell settings Fixes #23362 --- .../parts/terminal/common/terminal.ts | 3 ++ .../parts/terminal/common/terminalService.ts | 4 ++ .../electron-browser/terminal.contribution.ts | 4 +- .../electron-browser/terminalActions.ts | 38 ++++++++++++++++++- .../electron-browser/terminalConfigHelper.ts | 4 ++ 5 files changed, 51 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/terminal/common/terminal.ts b/src/vs/workbench/parts/terminal/common/terminal.ts index 836381fcd12f5..bd7df535e4e94 100644 --- a/src/vs/workbench/parts/terminal/common/terminal.ts +++ b/src/vs/workbench/parts/terminal/common/terminal.ts @@ -71,6 +71,8 @@ export interface ITerminalConfigHelper { * Merges the default shell path and args into the provided launch configuration */ mergeDefaultShellPathAndArgs(shell: IShellLaunchConfig): void; + /** Sets whether a workspace shell configuration is allowed or not */ + setWorkspaceShellAllowed(isAllowed: boolean): void; } export interface ITerminalFont { @@ -146,6 +148,7 @@ export interface ITerminalService { setContainers(panelContainer: HTMLElement, terminalContainer: HTMLElement): void; updateConfig(): void; selectDefaultWindowsShell(): TPromise; + setWorkspaceShellAllowed(isAllowed: boolean): void; } export interface ITerminalInstance { diff --git a/src/vs/workbench/parts/terminal/common/terminalService.ts b/src/vs/workbench/parts/terminal/common/terminalService.ts index dafe6cead2a25..a3e2adecfc97f 100644 --- a/src/vs/workbench/parts/terminal/common/terminalService.ts +++ b/src/vs/workbench/parts/terminal/common/terminalService.ts @@ -210,4 +210,8 @@ export abstract class TerminalService implements ITerminalService { public updateConfig(): void { this.terminalInstances.forEach(instance => instance.updateConfig()); } + + public setWorkspaceShellAllowed(isAllowed: boolean): void { + this.configHelper.setWorkspaceShellAllowed(isAllowed); + } } diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index 1e5cae2592b05..6becf5badb013 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -17,7 +17,7 @@ import { TERMINAL_DEFAULT_SHELL_LINUX, TERMINAL_DEFAULT_SHELL_OSX, TERMINAL_DEFA import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; -import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, FocusTerminalAtIndexAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; +import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, FocusTerminalAtIndexAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction, AllowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; import { Registry } from 'vs/platform/platform'; import { ShowAllCommandsAction } from 'vs/workbench/parts/quickopen/browser/commandsHandler'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; @@ -266,5 +266,7 @@ actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ClearTerminalAct if (platform.isWindows) { actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(SelectDefaultShellWindowsTerminalAction, SelectDefaultShellWindowsTerminalAction.ID, SelectDefaultShellWindowsTerminalAction.LABEL), 'Terminal: Select Default Shell', category); } +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(AllowWorkspaceShellTerminalCommand, AllowWorkspaceShellTerminalCommand.ID, AllowWorkspaceShellTerminalCommand.LABEL), 'Terminal: Allow Workspace Shell Configuration', category); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DisallowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand.ID, DisallowWorkspaceShellTerminalCommand.LABEL), 'Terminal: Disallow Workspace Shell Configuration', category); registerColors(); diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts index d790e30fd1c1e..58cd361fd3420 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts @@ -496,4 +496,40 @@ export class ClearTerminalAction extends Action { } return TPromise.as(void 0); } -} \ No newline at end of file +} + +export class AllowWorkspaceShellTerminalCommand extends Action { + + public static ID = 'workbench.action.terminal.allowWorkspaceShell'; + public static LABEL = nls.localize('workbench.action.terminal.allowWorkspaceShell', "Allow Workspace Shell Configuration"); + + constructor( + id: string, label: string, + @ITerminalService private terminalService: ITerminalService + ) { + super(id, label); + } + + public run(event?: any): TPromise { + this.terminalService.setWorkspaceShellAllowed(true); + return TPromise.as(void 0); + } +} + +export class DisallowWorkspaceShellTerminalCommand extends Action { + + public static ID = 'workbench.action.terminal.disallowWorkspaceShell'; + public static LABEL = nls.localize('workbench.action.terminal.disallowWorkspaceShell', "Disallow Workspace Shell Configuration"); + + constructor( + id: string, label: string, + @ITerminalService private terminalService: ITerminalService + ) { + super(id, label); + } + + public run(event?: any): TPromise { + this.terminalService.setWorkspaceShellAllowed(false); + return TPromise.as(void 0); + } +} diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts index fd87efa9993b0..5f4e739354ecf 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts @@ -100,6 +100,10 @@ export class TerminalConfigHelper implements ITerminalConfigHelper { return this._measureFont(fontFamily, fontSize, lineHeight); } + public setWorkspaceShellAllowed(isAllowed: boolean): void { + this._storageService.store(IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY, isAllowed, StorageScope.WORKSPACE); + } + public mergeDefaultShellPathAndArgs(shell: IShellLaunchConfig): void { // Check whether there is a workspace setting const platformKey = platform.isWindows ? 'windows' : platform.isMacintosh ? 'osx' : 'linux'; From 3ce087b99e75c6640649abab2bd1178d622c03ae Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Sun, 14 May 2017 22:17:42 +0200 Subject: [PATCH 0512/2747] #16580 Provide option to not to notify error by default. This is needed for extension API --- .../electron-browser/mainThreadConfiguration.ts | 4 ++-- .../preferences/browser/preferencesRenderers.ts | 17 ++++++++++++++--- .../preferences/browser/preferencesService.ts | 2 +- .../common/configurationEditing.ts | 13 ++++++++++++- .../node/configurationEditingService.ts | 16 ++++++++++------ 5 files changed, 39 insertions(+), 13 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts b/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts index 75b6594d1fdb5..f3d1533b7dbc4 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts @@ -35,10 +35,10 @@ export class MainThreadConfiguration extends MainThreadConfigurationShape { } $updateConfigurationOption(target: ConfigurationTarget, key: string, value: any): TPromise { - return this._configurationEditingService.writeConfiguration(target, { key, value }); + return this._configurationEditingService.writeConfiguration(target, { key, value }, { donotNotifyError: true }); } $removeConfigurationOption(target: ConfigurationTarget, key: string): TPromise { - return this._configurationEditingService.writeConfiguration(target, { key, value: undefined }); + return this._configurationEditingService.writeConfiguration(target, { key, value: undefined }, { donotNotifyError: true }); } } diff --git a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts index 16f4f0ed57c2e..adcb8af04f221 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts @@ -24,7 +24,7 @@ import { IContextMenuService, ContextSubMenu } from 'vs/platform/contextview/bro import { SettingsGroupTitleWidget, EditPreferenceWidget } from 'vs/workbench/parts/preferences/browser/preferencesWidgets'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { RangeHighlightDecorations } from 'vs/workbench/common/editor/rangeDecorations'; -import { IConfigurationEditingService } from 'vs/workbench/services/configuration/common/configurationEditing'; +import { IConfigurationEditingService, IConfigurationEditingError, ConfigurationEditingErrorCode, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { overrideIdentifierFromKey } from 'vs/platform/configuration/common/model'; import { IMarkerService, IMarkerData } from 'vs/platform/markers/common/markers'; @@ -100,8 +100,19 @@ export class UserSettingsRenderer extends Disposable implements IPreferencesRend public updatePreference(key: string, value: any, source: ISetting): void { this.telemetryService.publicLog('defaultSettingsActions.copySetting', { userConfigurationKeys: [key] }); const overrideIdentifier = source.overrideOf ? overrideIdentifierFromKey(source.overrideOf.key) : null; - this.configurationEditingService.writeConfiguration(this.preferencesModel.configurationTarget, { key, value, overrideIdentifier }, !this.textFileService.isDirty(this.preferencesModel.uri)) - .then(() => this.onSettingUpdated(source)); + this.configurationEditingService.writeConfiguration(this.preferencesModel.configurationTarget, { key, value, overrideIdentifier }, { donotSave: this.textFileService.isDirty(this.preferencesModel.uri), donotNotifyError: true }) + .then(() => this.onSettingUpdated(source), error => { + this.messageService.show(Severity.Error, this.toErrorMessage(error, this.preferencesModel.configurationTarget)); + }); + } + + private toErrorMessage(error: IConfigurationEditingError, target: ConfigurationTarget): string { + switch (error.code) { + case ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION: { + return nls.localize('errorInvalidConfiguration', "Unable to write into settings. Correct errors/warnings in the file and try again."); + }; + } + return error.message; } private onModelChanged(): void { diff --git a/src/vs/workbench/parts/preferences/browser/preferencesService.ts b/src/vs/workbench/parts/preferences/browser/preferencesService.ts index 03b8646a1bcaf..436d010bd463f 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesService.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesService.ts @@ -325,7 +325,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic } return { lineNumber: setting.valueRange.startLineNumber, column: setting.valueRange.startColumn + 1 }; } - return this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: languageKey, value: {} }, false) + return this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: languageKey, value: {} }, { donotSave: true }) .then(() => { setting = settingsModel.getPreference(languageKey); let content = eol + this.spaces(2, configuration) + eol + this.spaces(1, configuration); diff --git a/src/vs/workbench/services/configuration/common/configurationEditing.ts b/src/vs/workbench/services/configuration/common/configurationEditing.ts index 0ba753cef2171..d687ee387a382 100644 --- a/src/vs/workbench/services/configuration/common/configurationEditing.ts +++ b/src/vs/workbench/services/configuration/common/configurationEditing.ts @@ -61,6 +61,17 @@ export interface IConfigurationValue { overrideIdentifier?: string; } +export interface IConfigurationEditingOptions { + /** + * If `true`, do not saves the configuration. Default is `false`. + */ + donotSave?: boolean; + /** + * If `true`, do not notifies the error to user by showing the message box. Default is `false`. + */ + donotNotifyError?: boolean; +} + export interface IConfigurationEditingService { _serviceBrand: ServiceIdentifier; @@ -69,5 +80,5 @@ export interface IConfigurationEditingService { * Allows to write the configuration value to either the user or workspace configuration file and save it if asked to save. * The returned promise will be in error state in any of the error cases from [ConfigurationEditingErrorCode](#ConfigurationEditingErrorCode) */ - writeConfiguration(target: ConfigurationTarget, value: IConfigurationValue, save?: boolean): TPromise; + writeConfiguration(target: ConfigurationTarget, value: IConfigurationValue, options?: IConfigurationEditingOptions): TPromise; } \ No newline at end of file diff --git a/src/vs/workbench/services/configuration/node/configurationEditingService.ts b/src/vs/workbench/services/configuration/node/configurationEditingService.ts index cbafdb6f2fce1..70d1426b1f5a4 100644 --- a/src/vs/workbench/services/configuration/node/configurationEditingService.ts +++ b/src/vs/workbench/services/configuration/node/configurationEditingService.ts @@ -26,7 +26,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { keyFromOverrideIdentifier } from 'vs/platform/configuration/common/model'; import { WORKSPACE_CONFIG_DEFAULT_PATH, WORKSPACE_STANDALONE_CONFIGURATIONS } from 'vs/workbench/services/configuration/common/configuration'; import { IFileService } from 'vs/platform/files/common/files'; -import { IConfigurationEditingService, ConfigurationEditingErrorCode, IConfigurationEditingError, ConfigurationTarget, IConfigurationValue } from 'vs/workbench/services/configuration/common/configurationEditing'; +import { IConfigurationEditingService, ConfigurationEditingErrorCode, IConfigurationEditingError, ConfigurationTarget, IConfigurationValue, IConfigurationEditingOptions } from 'vs/workbench/services/configuration/common/configurationEditing'; import { ITextModelResolverService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { OVERRIDE_PROPERTY_PATTERN } from 'vs/platform/configuration/common/configurationRegistry'; import { IChoiceService, IMessageService, Severity } from 'vs/platform/message/common/message'; @@ -62,15 +62,19 @@ export class ConfigurationEditingService implements IConfigurationEditingService this.queue = new Queue(); } - writeConfiguration(target: ConfigurationTarget, value: IConfigurationValue, save: boolean = true): TPromise { - return this.queue.queue(() => this.doWriteConfiguration(target, value, save).then(() => null, error => this.onError(error, target))); // queue up writes to prevent race conditions + writeConfiguration(target: ConfigurationTarget, value: IConfigurationValue, options: IConfigurationEditingOptions = {}): TPromise { + return this.queue.queue(() => this.doWriteConfiguration(target, value, options) // queue up writes to prevent race conditions + .then(() => null, + error => { + return options.donotNotifyError ? TPromise.wrapError(error) : this.onError(error, target); + })); } - private doWriteConfiguration(target: ConfigurationTarget, value: IConfigurationValue, save: boolean): TPromise { + private doWriteConfiguration(target: ConfigurationTarget, value: IConfigurationValue, options: IConfigurationEditingOptions): TPromise { const operation = this.getConfigurationEditOperation(target, value); - return this.resolveAndValidate(target, operation, save) - .then(reference => this.writeToBuffer(reference.object.textEditorModel, operation, save) + return this.resolveAndValidate(target, operation, !options.donotSave) + .then(reference => this.writeToBuffer(reference.object.textEditorModel, operation, !options.donotSave) .then(() => reference.dispose())); } From bed4aad1e055eda2f5d864bbba6968ea77262b1c Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Sun, 14 May 2017 17:48:39 -0700 Subject: [PATCH 0513/2747] Attempt to fix #26373 --- src/vs/editor/contrib/suggest/browser/media/suggest.css | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index 166f7ff94b67c..aa846a258fb08 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -133,6 +133,7 @@ .monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .type { opacity: 0.7; + word-break: break-all; } .monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > p { From 54da9357badb6d0e62254cbc788a52ef76579276 Mon Sep 17 00:00:00 2001 From: Duroktar Date: Sun, 14 May 2017 22:03:38 -0300 Subject: [PATCH 0514/2747] add "open old file" git command this implements #23011 --- extensions/git/package.json | 19 +++++++++++++++++++ extensions/git/package.nls.json | 1 + extensions/git/src/commands.ts | 30 +++++++++++++++++++++++++++++- 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index 2a47e2dc209b0..91edc51233f0b 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -59,6 +59,11 @@ "dark": "resources/icons/dark/open-file.svg" } }, + { + "command": "git.openOldFile", + "title": "%command.openOldFile%", + "category": "Git" + }, { "command": "git.stage", "title": "%command.stage%", @@ -226,6 +231,10 @@ "command": "git.openFile", "when": "config.git.enabled && scmProvider == git && gitState == idle" }, + { + "command": "git.openOldFile", + "when": "config.git.enabled && scmProvider == git && gitState == idle" + }, { "command": "git.openChange", "when": "config.git.enabled && scmProvider == git && gitState == idle" @@ -477,6 +486,11 @@ "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == index", "group": "navigation" }, + { + "command": "git.openOldFile", + "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == index", + "group": "navigation" + }, { "command": "git.unstage", "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == index", @@ -492,6 +506,11 @@ "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", "group": "navigation" }, + { + "command": "git.openOldFile", + "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", + "group": "navigation" + }, { "command": "git.openFile", "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index efdde34dd7afa..63216feb65fc4 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -4,6 +4,7 @@ "command.refresh": "Refresh", "command.openChange": "Open Changes", "command.openFile": "Open File", + "command.openOldFile": "Open Old File", "command.stage": "Stage Changes", "command.stageAll": "Stage All Changes", "command.stageSelectedRanges": "Stage Selected Ranges", diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 24f9c35129a84..215ecc78a786e 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -275,6 +275,35 @@ export class CommandCenter { return await commands.executeCommand('vscode.open', uri); } + @command('git.openOldFile') + async openOldFile(arg?: Resource | Uri): Promise { + let resource: Resource | undefined = undefined; + + if (arg instanceof Resource) { + resource = arg; + + } else if (arg instanceof Uri) { + resource = this.getSCMResource(arg); + } else { + resource = this.getSCMResource(); + } + + if (!resource) { + return; + } + return await this._openOldResource(resource); + } + + private async _openOldResource(resource: Resource): Promise { + const old = this.getLeftResource(resource); + const current = this.getRightResource(resource); + + if (!old) { + return await commands.executeCommand('vscode.open', current); + } + return await commands.executeCommand('vscode.open', old); + } + @command('git.openChange') async openChange(arg?: Resource | Uri): Promise { let resource: Resource | undefined = undefined; @@ -290,7 +319,6 @@ export class CommandCenter { if (!resource) { return; } - return await this._openResource(resource); } From 959f22920b035f75d2b33f82c1e1139bff1f65f5 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 15 May 2017 09:55:08 +0200 Subject: [PATCH 0515/2747] remove unused import --- build/tfs/common/enqueue.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/build/tfs/common/enqueue.ts b/build/tfs/common/enqueue.ts index e055ed4a938c9..875227bdd39f2 100644 --- a/build/tfs/common/enqueue.ts +++ b/build/tfs/common/enqueue.ts @@ -8,7 +8,6 @@ import { execSync } from 'child_process'; import { DocumentClient } from 'documentdb'; import * as azure from 'azure-storage'; -import * as path from 'path'; interface Asset { platform: string; From 14b3bb9f8a1b17eb89a8e7705fa728f2192fb481 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 15 May 2017 10:15:14 +0200 Subject: [PATCH 0516/2747] a little more height, #25506 --- src/vs/editor/contrib/codelens/browser/codelens.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/codelens/browser/codelens.ts b/src/vs/editor/contrib/codelens/browser/codelens.ts index ef3829e40ee8a..428fa8ba7aedc 100644 --- a/src/vs/editor/contrib/codelens/browser/codelens.ts +++ b/src/vs/editor/contrib/codelens/browser/codelens.ts @@ -124,7 +124,7 @@ class CodeLensContentWidget implements editorBrowser.IContentWidget { private _updateHeight(): void { const { fontInfo, lineHeight } = this._editor.getConfiguration(); - this._domNode.style.height = `${lineHeight}px`; + this._domNode.style.height = `${Math.round(lineHeight * 1.1)}px`; this._domNode.style.lineHeight = `${lineHeight}px`; this._domNode.style.fontSize = `${Math.round(fontInfo.fontSize * .9)}px`; this._domNode.innerHTML = ' '; From 4d0b7c79d3b66737208cb5165f3831eb21b5fd6f Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 15 May 2017 10:36:22 +0200 Subject: [PATCH 0517/2747] build: wire in mixin password as GH token --- build/gulpfile.vscode.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index f6709c3e98d87..e65f51d5c6a45 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -130,7 +130,8 @@ const config = { darwinCredits: darwinCreditsTemplate ? new Buffer(darwinCreditsTemplate({ commit: commit, date: new Date().toISOString() })) : void 0, linuxExecutableName: product.applicationName, winIcon: 'resources/win32/code.ico', - token: process.env['GITHUB_TOKEN'] || void 0 + token: process.env['VSCODE_MIXIN_PASSWORD'] || process.env['GITHUB_TOKEN'] || void 0, + repo: product.electronRepository || void 0 }; gulp.task('clean-electron', util.rimraf('.build/electron')); From 73cfad0c02a3e96d5878113d3cfca59524fea625 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 15 May 2017 10:52:42 +0200 Subject: [PATCH 0518/2747] debug: filter out variables with no name specified fixes #26589 --- src/vs/workbench/parts/debug/common/debugModel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index 1f3e082dc635d..b01aaafac977c 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -180,7 +180,7 @@ export class ExpressionContainer implements IExpressionContainer { count, filter }).then(response => { - return response && response.body && response.body.variables ? distinct(response.body.variables.filter(v => !!v), v => v.name).map( + return response && response.body && response.body.variables ? distinct(response.body.variables.filter(v => !!v && v.name), v => v.name).map( v => new Variable(this.process, this, v.variablesReference, v.name, v.evaluateName, v.value, v.namedVariables, v.indexedVariables, v.type) ) : []; }, (e: Error) => [new Variable(this.process, this, 0, null, e.message, '', 0, 0, null, false)]); From d5ce11b978c03f0f3f4408851ac63b1945549010 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 15 May 2017 12:10:32 +0200 Subject: [PATCH 0519/2747] swap commands id and context keys --- .../contrib/snippet/browser/snippetController2.ts | 10 +++++----- .../editor/contrib/snippet/common/snippetController.ts | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 948bb9a9876ec..329caa67f7b91 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -21,7 +21,7 @@ export class SnippetController2 { return editor.getContribution('snippetController2'); } - static InSnippetMode = new RawContextKey('isInSnippet', false); + static InSnippetMode = new RawContextKey('inSnippetMode', false); static HasNextTabstop = new RawContextKey('hasNextTabstop', false); static HasPrevTabstop = new RawContextKey('hasPrevTabstop', false); @@ -132,7 +132,7 @@ export class SnippetController2 { const CommandCtor = EditorCommand.bindToContribution(SnippetController2.get); CommonEditorRegistry.registerEditorCommand(new CommandCtor({ - id: 'snippet.next', + id: 'jumpToNextSnippetPlaceholder', precondition: ContextKeyExpr.and(SnippetController2.InSnippetMode, SnippetController2.HasNextTabstop), handler: ctrl => ctrl.next(), kbOpts: { @@ -142,7 +142,7 @@ CommonEditorRegistry.registerEditorCommand(new CommandCtor({ } })); CommonEditorRegistry.registerEditorCommand(new CommandCtor({ - id: 'snippet.prev', + id: 'jumpToPrevSnippetPlaceholder', precondition: ContextKeyExpr.and(SnippetController2.InSnippetMode, SnippetController2.HasPrevTabstop), handler: ctrl => ctrl.prev(), kbOpts: { @@ -152,7 +152,7 @@ CommonEditorRegistry.registerEditorCommand(new CommandCtor({ } })); CommonEditorRegistry.registerEditorCommand(new CommandCtor({ - id: 'snippet.cancel', + id: 'leaveSnippet', precondition: SnippetController2.InSnippetMode, handler: ctrl => ctrl.cancel(), kbOpts: { @@ -164,7 +164,7 @@ CommonEditorRegistry.registerEditorCommand(new CommandCtor({ })); CommonEditorRegistry.registerEditorCommand(new CommandCtor({ - id: 'snippet.accept', + id: 'acceptSnippet', precondition: SnippetController2.InSnippetMode, handler: ctrl => ctrl.finish(), // kbOpts: { diff --git a/src/vs/editor/contrib/snippet/common/snippetController.ts b/src/vs/editor/contrib/snippet/common/snippetController.ts index e5cdde2bb38fb..3a6dc9730f1ce 100644 --- a/src/vs/editor/contrib/snippet/common/snippetController.ts +++ b/src/vs/editor/contrib/snippet/common/snippetController.ts @@ -715,12 +715,12 @@ export class SnippetController { } } -export var CONTEXT_SNIPPET_MODE = new RawContextKey('inSnippetMode', false); +export var CONTEXT_SNIPPET_MODE = new RawContextKey('old.inSnippetMode', false); const SnippetCommand = EditorCommand.bindToContribution(SnippetController.get); CommonEditorRegistry.registerEditorCommand(new SnippetCommand({ - id: 'jumpToNextSnippetPlaceholder', + id: 'old.jumpToNextSnippetPlaceholder', precondition: CONTEXT_SNIPPET_MODE, handler: x => x.jumpToNextPlaceholder(), kbOpts: { @@ -730,7 +730,7 @@ CommonEditorRegistry.registerEditorCommand(new SnippetCommand({ } })); CommonEditorRegistry.registerEditorCommand(new SnippetCommand({ - id: 'jumpToPrevSnippetPlaceholder', + id: 'old.jumpToPrevSnippetPlaceholder', precondition: CONTEXT_SNIPPET_MODE, handler: x => x.jumpToPrevPlaceholder(), kbOpts: { @@ -740,7 +740,7 @@ CommonEditorRegistry.registerEditorCommand(new SnippetCommand({ } })); CommonEditorRegistry.registerEditorCommand(new SnippetCommand({ - id: 'acceptSnippet', + id: 'old.acceptSnippet', precondition: CONTEXT_SNIPPET_MODE, handler: x => x.acceptSnippet(), kbOpts: { @@ -750,7 +750,7 @@ CommonEditorRegistry.registerEditorCommand(new SnippetCommand({ } })); CommonEditorRegistry.registerEditorCommand(new SnippetCommand({ - id: 'leaveSnippet', + id: 'old.leaveSnippet', precondition: CONTEXT_SNIPPET_MODE, handler: x => x.leaveSnippet(), kbOpts: { From 1361982ebaa4c4cc6b454cf091f722b699c30f13 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 15 May 2017 12:21:14 +0200 Subject: [PATCH 0520/2747] tfs: add linux docker file --- build/gulpfile.hygiene.js | 3 ++- build/tfs/linux/Dockerfile | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 build/tfs/linux/Dockerfile diff --git a/build/gulpfile.hygiene.js b/build/gulpfile.hygiene.js index 594774e2c160b..b2566cdac1b30 100644 --- a/build/gulpfile.hygiene.js +++ b/build/gulpfile.hygiene.js @@ -41,7 +41,8 @@ const eolFilter = [ '!build/{lib,tslintRules}/**/*.js', '!build/monaco/**', '!build/win32/**', - '!build/**/*.sh' + '!build/**/*.sh', + '!**/Dockerfile' ]; const indentationFilter = [ diff --git a/build/tfs/linux/Dockerfile b/build/tfs/linux/Dockerfile new file mode 100644 index 0000000000000..df3629d4ff935 --- /dev/null +++ b/build/tfs/linux/Dockerfile @@ -0,0 +1,34 @@ +FROM microsoft/vsts-agent:ubuntu-16.04-standard +MAINTAINER Joao Moreno + +RUN dpkg --add-architecture i386 +RUN apt-get update +RUN apt-get install -y build-essential +RUN apt-get install -y gcc-4.9-multilib +RUN apt-get install -y g++-4.9-multilib +RUN apt-get install -y zip +RUN apt-get install -y rpm +RUN apt-get install -y createrepo +RUN apt-get install -y libgtk2.0-0 +RUN apt-get install -y libgconf-2-4 +RUN apt-get install -y libnss3 +RUN apt-get install -y libasound2 +RUN apt-get install -y libxtst6 +RUN apt-get install -y libfuse2 +RUN apt-get install -y libgtk2.0-0:i386 +RUN apt-get install -y libnotify-bin +RUN apt-get install -y libnotify4:i386 +RUN apt-get install -y libgconf-2-4:i386 +RUN apt-get install -y libnss3:i386 +RUN apt-get install -y libx11-dev:i386 +RUN apt-get install -y libxkbfile-dev:i386 +RUN apt-get install -y libxtst6:i386 +RUN apt-get install -y libxss1:i386 +RUN apt-get install -y libxss1 +RUN apt-get install -y python-gtk2 +RUN apt-get install -y jq +RUN apt-get install -y libx11-xcb-dev:i386 +RUN apt-get install -y libx11-xcb-dev +RUN apt-get install -y xvfb +RUN apt-get install -y libx11-dev +RUN apt-get install -y libxkbfile-dev From 4b4783dfb382a50b1d07aca4530e0b96e589ddf6 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 15 May 2017 12:28:25 +0200 Subject: [PATCH 0521/2747] empty commit From 4e194f0e590ae66930239c91ddff737b4d226d8e Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 15 May 2017 14:21:29 +0200 Subject: [PATCH 0522/2747] tfs: add fakeroot to linux Dockerfile --- build/tfs/linux/Dockerfile | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/build/tfs/linux/Dockerfile b/build/tfs/linux/Dockerfile index df3629d4ff935..811a15ddedd9a 100644 --- a/build/tfs/linux/Dockerfile +++ b/build/tfs/linux/Dockerfile @@ -9,26 +9,20 @@ RUN apt-get install -y g++-4.9-multilib RUN apt-get install -y zip RUN apt-get install -y rpm RUN apt-get install -y createrepo -RUN apt-get install -y libgtk2.0-0 -RUN apt-get install -y libgconf-2-4 -RUN apt-get install -y libnss3 +RUN apt-get install -y python-gtk2 +RUN apt-get install -y jq +RUN apt-get install -y xvfb +RUN apt-get install -y fakeroot +RUN apt-get install -y libgtk2.0-0 libgtk2.0-0:i386 +RUN apt-get install -y libgconf-2-4 libgconf-2-4:i386 +RUN apt-get install -y libnss3 libnss3:i386 RUN apt-get install -y libasound2 -RUN apt-get install -y libxtst6 +RUN apt-get install -y libxtst6 libxtst6:i386 RUN apt-get install -y libfuse2 -RUN apt-get install -y libgtk2.0-0:i386 RUN apt-get install -y libnotify-bin RUN apt-get install -y libnotify4:i386 -RUN apt-get install -y libgconf-2-4:i386 -RUN apt-get install -y libnss3:i386 -RUN apt-get install -y libx11-dev:i386 +RUN apt-get install -y libx11-dev libx11-dev:i386 RUN apt-get install -y libxkbfile-dev:i386 -RUN apt-get install -y libxtst6:i386 -RUN apt-get install -y libxss1:i386 -RUN apt-get install -y libxss1 -RUN apt-get install -y python-gtk2 -RUN apt-get install -y jq -RUN apt-get install -y libx11-xcb-dev:i386 -RUN apt-get install -y libx11-xcb-dev -RUN apt-get install -y xvfb -RUN apt-get install -y libx11-dev +RUN apt-get install -y libxss1 libxss1:i386 +RUN apt-get install -y libx11-xcb-dev libx11-xcb-dev:i386 RUN apt-get install -y libxkbfile-dev From fb5e9f1171c38d288b77a7904e719693138cdf88 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 15 May 2017 14:52:13 +0200 Subject: [PATCH 0523/2747] tfs: use bash --- build/tfs/linux/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tfs/linux/build.sh b/build/tfs/linux/build.sh index ed2ac6d37582b..7be220227ad76 100755 --- a/build/tfs/linux/build.sh +++ b/build/tfs/linux/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e export ARCH="$ARCH" From c754761cef6c484ba352a1c09094a603e05ee2ed Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 15 May 2017 15:20:30 +0200 Subject: [PATCH 0524/2747] tfs: fix linux build --- build/tfs/linux/build.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build/tfs/linux/build.sh b/build/tfs/linux/build.sh index 7be220227ad76..28a34d6227b6c 100755 --- a/build/tfs/linux/build.sh +++ b/build/tfs/linux/build.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -export ARCH="$ARCH" +export ARCH="$1" export VSCODE_MIXIN_PASSWORD="$2" export AZURE_STORAGE_ACCESS_KEY="$3" export AZURE_STORAGE_ACCESS_KEY_2="$4" @@ -26,19 +26,19 @@ STEP() { } STEP "Install dependencies" -./scripts/npm.sh install --arch=x64 --unsafe-perm +./scripts/npm.sh install --arch=$ARCH --unsafe-perm STEP "Mix in repository from vscode-distro" npm run gulp -- mixin STEP "Build minified" -npm run gulp -- --max_old_space_size=4096 vscode-linux-x64-min +npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-min" STEP "Build Debian package" -npm run gulp -- --max_old_space_size=4096 vscode-linux-x64-build-deb +npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-deb" STEP "Build RPM package" -npm run gulp -- --max_old_space_size=4096 vscode-linux-x64-build-rpm +npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-rpm" STEP "Run unit tests" ./scripts/test.sh --xvfb --build --reporter dot From d6e800520fef59901f091cf671836f5ec0534ef3 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 12 May 2017 17:42:45 +0200 Subject: [PATCH 0525/2747] editorScrollbar: move off editor.viewInfo.theme --- .../viewParts/editorScrollbar/editorScrollbar.ts | 11 +++++++---- src/vs/platform/theme/common/themeService.ts | 8 ++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts index aff8334b64c93..11d5326512873 100644 --- a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts +++ b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts @@ -13,6 +13,7 @@ import { ViewContext } from 'vs/editor/common/view/viewContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; +import { getThemeTypeSelector } from "vs/platform/theme/common/themeService"; export class EditorScrollbar extends ViewPart { @@ -33,7 +34,7 @@ export class EditorScrollbar extends ViewPart { let scrollbarOptions: ScrollableElementCreationOptions = { canUseTranslate3d: editor.canUseTranslate3d, listenOnDomNode: viewDomNode.domNode, - className: 'editor-scrollable' + ' ' + editor.viewInfo.theme, + className: 'editor-scrollable' + ' ' + getThemeTypeSelector(context.theme.type), useShadows: false, lazyRender: true, @@ -120,10 +121,8 @@ export class EditorScrollbar extends ViewPart { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - const editor = this._context.configuration.editor; - - this.scrollbar.updateClassName('editor-scrollable' + ' ' + editor.viewInfo.theme); if (e.viewInfo || e.canUseTranslate3d) { + const editor = this._context.configuration.editor; let newOpts: ScrollableElementChangeOptions = { canUseTranslate3d: editor.canUseTranslate3d, handleMouseWheel: editor.viewInfo.scrollbar.handleMouseWheel, @@ -139,6 +138,10 @@ export class EditorScrollbar extends ViewPart { public onScrollChanged(e: viewEvents.ViewScrollChangedEvent): boolean { return true; } + public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { + this.scrollbar.updateClassName('editor-scrollable' + ' ' + getThemeTypeSelector(this._context.theme.type)); + return true; + } // --- end event handlers diff --git a/src/vs/platform/theme/common/themeService.ts b/src/vs/platform/theme/common/themeService.ts index 37f6eb59b7c0a..64e028e6215df 100644 --- a/src/vs/platform/theme/common/themeService.ts +++ b/src/vs/platform/theme/common/themeService.ts @@ -19,6 +19,14 @@ export const LIGHT = 'light'; export const HIGH_CONTRAST = 'hc'; export type ThemeType = 'light' | 'dark' | 'hc'; +export function getThemeTypeSelector(type: ThemeType): string { + switch (type) { + case DARK: return 'vs-dark'; + case HIGH_CONTRAST: return 'hc-black'; + default: return 'vs'; + } +} + export interface ITheme { readonly type: ThemeType; From 4529dd40e9dde141add509456566e165f3e1a79c Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 15 May 2017 15:47:34 +0200 Subject: [PATCH 0526/2747] File icons were not updated (fixes #26526) --- src/vs/workbench/browser/labels.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/labels.ts b/src/vs/workbench/browser/labels.ts index 3d6f853fc0fcc..7f698036e98aa 100644 --- a/src/vs/workbench/browser/labels.ts +++ b/src/vs/workbench/browser/labels.ts @@ -60,7 +60,7 @@ export class ResourceLabel extends IconLabel { } public setLabel(label: IEditorLabel, options?: IResourceLabelOptions): void { - const hasResourceChanged = this.hasResourceChanged(label); + const hasResourceChanged = this.hasResourceChanged(label, options); this.label = label; this.options = options; @@ -68,10 +68,17 @@ export class ResourceLabel extends IconLabel { this.render(hasResourceChanged); } - private hasResourceChanged(label: IEditorLabel): boolean { + private hasResourceChanged(label: IEditorLabel, options: IResourceLabelOptions): boolean { const newResource = label ? label.resource : void 0; const oldResource = this.label ? this.label.resource : void 0; + const newIsFolder = options ? options.isFolder : false; + const oldIsFolder = this.options ? this.options.isFolder : false; + + if (newIsFolder !== oldIsFolder) { + return true; // same resource but different kind (file, folder) + } + if (newResource && oldResource) { return newResource.toString() !== oldResource.toString(); } From 72c32b23f1e9a52eb2bdb2f82b9ca9f126cf0cf6 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 15 May 2017 15:49:30 +0200 Subject: [PATCH 0527/2747] Cannot read property 'loadURL' of null (fixes #26588) --- src/vs/code/electron-main/window.ts | 3 --- src/vs/code/electron-main/windows.ts | 8 ++++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index b7a33c5be26c4..bf81a6c55bfde 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -600,9 +600,6 @@ export class VSCodeWindow { } public serializeWindowState(): IWindowState { - if (!this._win) { - return null; // avoid NPE when calling this method after the window has been disposed - } // fullscreen gets special treatment if (this._win.isFullScreen()) { diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index a243879c113f6..d271878e3b183 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -1204,6 +1204,10 @@ export class WindowsManager implements IWindowsMainService { detail: nls.localize('appStalledDetail', "You can reopen or close the window or keep waiting."), noLink: true }, result => { + if (!vscodeWindow.win) { + return; // Return early if the window has been going down already + } + if (result === 0) { vscodeWindow.reload(); } else if (result === 2) { @@ -1223,6 +1227,10 @@ export class WindowsManager implements IWindowsMainService { detail: nls.localize('appCrashedDetail', "We are sorry for the inconvenience! You can reopen the window to continue where you left off."), noLink: true }, result => { + if (!vscodeWindow.win) { + return; // Return early if the window has been going down already + } + if (result === 0) { vscodeWindow.reload(); } else if (result === 1) { From aae145d4787213d2cabffab60c3557187a318ec4 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 15 May 2017 15:50:36 +0200 Subject: [PATCH 0528/2747] window.newWindowDimensions: inherit not working with minimized window (fixes #26586) --- src/vs/code/electron-main/window.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index bf81a6c55bfde..6108321a55152 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -42,7 +42,7 @@ export interface IWindowCreationOptions { export enum WindowMode { Maximized, Normal, - Minimized, + Minimized, // not used anymore, but also cannot remove due to existing stored UI state (needs migration) Fullscreen } @@ -623,8 +623,6 @@ export class VSCodeWindow { // get window mode if (!platform.isMacintosh && this._win.isMaximized()) { mode = WindowMode.Maximized; - } else if (this._win.isMinimized()) { - mode = WindowMode.Minimized; } else { mode = WindowMode.Normal; } @@ -632,7 +630,7 @@ export class VSCodeWindow { // we don't want to save minimized state, only maximized or normal if (mode === WindowMode.Maximized) { state.mode = WindowMode.Maximized; - } else if (mode !== WindowMode.Minimized) { + } else { state.mode = WindowMode.Normal; } From d7be7a4b934b306b32386a13771dfb77c0f1a685 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 15 May 2017 15:52:46 +0200 Subject: [PATCH 0529/2747] Allow to theme editor scroll shadow (fixes #25528) --- .../scrollDecoration/scrollDecoration.css | 9 --------- .../viewParts/scrollDecoration/scrollDecoration.ts | 9 +++++++++ src/vs/editor/browser/widget/diffEditorWidget.ts | 1 - .../preferences/browser/media/preferences.css | 8 -------- .../parts/preferences/browser/preferencesEditor.ts | 14 +++++++++++++- 5 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css index 1950c6abc4da0..1eabd692f83d0 100644 --- a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css +++ b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.css @@ -8,13 +8,4 @@ top: 0; left: 0; height: 6px; - box-shadow: #DDD 0 6px 6px -6px inset; -} - -.monaco-editor.vs-dark .scroll-decoration { - box-shadow: #000 0 6px 6px -6px inset; -} - -.monaco-editor.hc-black .scroll-decoration { - box-shadow: none; } \ No newline at end of file diff --git a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts index 3c015c2fabb75..3b4252ea03592 100644 --- a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts +++ b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts @@ -11,6 +11,8 @@ import { ViewPart } from 'vs/editor/browser/view/viewPart'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import { registerThemingParticipant } from "vs/platform/theme/common/themeService"; +import { scrollbarShadow } from "vs/platform/theme/common/colorRegistry"; export class ScrollDecorationViewPart extends ViewPart { @@ -86,3 +88,10 @@ export class ScrollDecorationViewPart extends ViewPart { this._domNode.setClassName(this._shouldShow ? 'scroll-decoration' : ''); } } + +registerThemingParticipant((theme, collector) => { + let shadow = theme.getColor(scrollbarShadow); + if (shadow) { + collector.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${shadow} 0 6px 6px -6px inset; }`); + } +}); \ No newline at end of file diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index 113637bf6fff7..af15fcfd15c32 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -1958,7 +1958,6 @@ export const diffRemoved = registerColor('diffEditor.removedTextBackground', { d export const diffInsertedOutline = registerColor('diffEditor.insertedTextBorder', { dark: null, light: null, hc: '#33ff2eff' }, nls.localize('diffEditorInsertedOutline', 'Outline color for the text that got inserted.')); export const diffRemovedOutline = registerColor('diffEditor.removedTextBorder', { dark: null, light: null, hc: '#FF008F' }, nls.localize('diffEditorRemovedOutline', 'Outline color for text that got removed.')); - registerThemingParticipant((theme, collector) => { let added = theme.getColor(diffInserted); if (added) { diff --git a/src/vs/workbench/parts/preferences/browser/media/preferences.css b/src/vs/workbench/parts/preferences/browser/media/preferences.css index 58079f256d1ca..5913b98e6a81f 100644 --- a/src/vs/workbench/parts/preferences/browser/media/preferences.css +++ b/src/vs/workbench/parts/preferences/browser/media/preferences.css @@ -135,14 +135,6 @@ padding-left:10px; } -.vs-dark .preferences-editor .side-by-side-preferences-editor > .editable-preferences-editor-container { - box-shadow: -6px 0 5px -5px black; -} - -.preferences-editor .side-by-side-preferences-editor > .editable-preferences-editor-container { - box-shadow: -6px 0 5px -5px #DDD; -} - .monaco-editor .settings-group-title-widget { z-index: 1; } diff --git a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts index 652e97a9e234c..b6491b244848e 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts @@ -53,6 +53,9 @@ import { FindController } from 'vs/editor/contrib/find/browser/find'; import { SelectionHighlighter } from 'vs/editor/contrib/find/common/findController'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; +import { IThemeService } from "vs/platform/theme/common/themeService"; +import { attachStylerCallback } from "vs/platform/theme/common/styler"; +import { scrollbarShadow } from "vs/platform/theme/common/colorRegistry"; export class PreferencesEditorInput extends SideBySideEditorInput { public static ID: string = 'workbench.editorinputs.preferencesEditorInput'; @@ -329,7 +332,7 @@ class SideBySidePreferencesWidget extends Widget { private sash: VSash; - constructor(parent: HTMLElement, @IInstantiationService private instantiationService: IInstantiationService) { + constructor(parent: HTMLElement, @IInstantiationService private instantiationService: IInstantiationService, @IThemeService private themeService: IThemeService) { super(); this.create(parent); } @@ -346,6 +349,15 @@ class SideBySidePreferencesWidget extends Widget { this.editablePreferencesEditorContainer = DOM.append(parentElement, DOM.$('.editable-preferences-editor-container')); this.editablePreferencesEditorContainer.style.position = 'absolute'; + this._register(attachStylerCallback(this.themeService, { scrollbarShadow }, colors => { + const shadow = colors.scrollbarShadow ? colors.scrollbarShadow.toString() : null; + + if (shadow) { + this.editablePreferencesEditorContainer.style.boxShadow = `-6px 0 5px -5px ${shadow}`; + } else { + this.editablePreferencesEditorContainer.style.boxShadow = null; + } + })); } public setInput(defaultPreferencesEditorInput: DefaultPreferencesEditorInput, editablePreferencesEditorInput: EditorInput, options?: EditorOptions): TPromise<{ defaultPreferencesRenderer: IPreferencesRenderer, editablePreferencesRenderer: IPreferencesRenderer }> { From dc390816852b81cf8fc3ff0626d5f14d5c4f7344 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 15 May 2017 15:54:35 +0200 Subject: [PATCH 0530/2747] Add "list.hoverForeground" and "list.focusForeground" (fixes #26277) --- src/vs/base/browser/ui/list/listWidget.ts | 10 ++++++++++ src/vs/base/parts/tree/browser/tree.ts | 2 ++ src/vs/base/parts/tree/browser/treeView.ts | 8 ++++++++ src/vs/platform/theme/common/colorRegistry.ts | 4 +++- src/vs/platform/theme/common/styler.ts | 10 +++++++++- 5 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts index 29795a31b9897..5643cc768a96d 100644 --- a/src/vs/base/browser/ui/list/listWidget.ts +++ b/src/vs/base/browser/ui/list/listWidget.ts @@ -405,6 +405,7 @@ export interface IListOptions extends IListViewOptions, IMouseControllerOptio export interface IListStyles { listFocusBackground?: Color; + listFocusForeground?: Color; listActiveSelectionBackground?: Color; listActiveSelectionForeground?: Color; listFocusAndSelectionBackground?: Color; @@ -413,6 +414,7 @@ export interface IListStyles { listInactiveSelectionForeground?: Color; listInactiveFocusBackground?: Color; listHoverBackground?: Color; + listHoverForeground?: Color; listDropBackground?: Color; listFocusOutline?: Color; listInactiveFocusOutline?: Color; @@ -818,6 +820,10 @@ export class List implements ISpliceable, IDisposable { content.push(`.monaco-list.${this.idPrefix}:focus .monaco-list-row.focused { background-color: ${styles.listFocusBackground}; }`); } + if (styles.listFocusForeground) { + content.push(`.monaco-list.${this.idPrefix}:focus .monaco-list-row.focused { color: ${styles.listFocusForeground}; }`); + } + if (styles.listActiveSelectionBackground) { content.push(`.monaco-list.${this.idPrefix}:focus .monaco-list-row.selected { background-color: ${styles.listActiveSelectionBackground}; }`); content.push(`.monaco-list.${this.idPrefix}:focus .monaco-list-row.selected:hover { background-color: ${styles.listActiveSelectionBackground}; }`); // overwrite :hover style in this case! @@ -853,6 +859,10 @@ export class List implements ISpliceable, IDisposable { content.push(`.monaco-list.${this.idPrefix} .monaco-list-row:hover { background-color: ${styles.listHoverBackground}; }`); } + if (styles.listHoverForeground) { + content.push(`.monaco-list.${this.idPrefix} .monaco-list-row:hover { color: ${styles.listHoverForeground}; }`); + } + if (styles.listSelectionOutline) { content.push(`.monaco-list.${this.idPrefix} .monaco-list-row.selected { outline: 1px dotted ${styles.listSelectionOutline}; }`); } diff --git a/src/vs/base/parts/tree/browser/tree.ts b/src/vs/base/parts/tree/browser/tree.ts index 0d253f2b08302..07943806dc2e7 100644 --- a/src/vs/base/parts/tree/browser/tree.ts +++ b/src/vs/base/parts/tree/browser/tree.ts @@ -665,6 +665,7 @@ export interface ITreeOptions extends ITreeStyles { export interface ITreeStyles { listFocusBackground?: Color; + listFocusForeground?: Color; listActiveSelectionBackground?: Color; listActiveSelectionForeground?: Color; listFocusAndSelectionBackground?: Color; @@ -672,6 +673,7 @@ export interface ITreeStyles { listInactiveSelectionBackground?: Color; listInactiveSelectionForeground?: Color; listHoverBackground?: Color; + listHoverForeground?: Color; listDropBackground?: Color; listFocusOutline?: Color; } diff --git a/src/vs/base/parts/tree/browser/treeView.ts b/src/vs/base/parts/tree/browser/treeView.ts index 5d40c9cd3d6fc..0836cf0bbecbb 100644 --- a/src/vs/base/parts/tree/browser/treeView.ts +++ b/src/vs/base/parts/tree/browser/treeView.ts @@ -561,6 +561,10 @@ export class TreeView extends HeightMap { content.push(`.monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { background-color: ${styles.listFocusBackground}; }`); } + if (styles.listFocusForeground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.focused:not(.highlighted) { color: ${styles.listFocusForeground}; }`); + } + if (styles.listActiveSelectionBackground) { content.push(`.monaco-tree.monaco-tree-instance-${this.instance}.focused .monaco-tree-rows > .monaco-tree-row.selected:not(.highlighted) { background-color: ${styles.listActiveSelectionBackground}; }`); } @@ -589,6 +593,10 @@ export class TreeView extends HeightMap { content.push(`.monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { background-color: ${styles.listHoverBackground}; }`); } + if (styles.listHoverForeground) { + content.push(`.monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row:hover:not(.highlighted):not(.selected):not(.focused) { color: ${styles.listHoverForeground}; }`); + } + if (styles.listDropBackground) { content.push(` .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-wrapper.drop-target, diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 4a597b87fd19d..5c2a75960e229 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -171,11 +171,13 @@ export const selectForeground = registerColor('dropdown.foreground', { dark: '#F export const selectBorder = registerColor('dropdown.border', { dark: selectBackground, light: '#CECECE', hc: contrastBorder }, nls.localize('dropdownBorder', "Dropdown border.")); export const listFocusBackground = registerColor('list.focusBackground', { dark: '#073655', light: '#DCEBFC', hc: null }, nls.localize('listFocusBackground', "List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); +export const listFocusForeground = registerColor('list.focusForeground', { dark: null, light: null, hc: null }, nls.localize('listFocusForeground', "List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); export const listActiveSelectionBackground = registerColor('list.activeSelectionBackground', { dark: '#094771', light: '#3399FF', hc: null }, nls.localize('listActiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); -export const listInactiveSelectionBackground = registerColor('list.inactiveSelectionBackground', { dark: '#3F3F46', light: '#CCCEDB', hc: null }, nls.localize('listInactiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); export const listActiveSelectionForeground = registerColor('list.activeSelectionForeground', { dark: Color.white, light: Color.white, hc: null }, nls.localize('listActiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")); +export const listInactiveSelectionBackground = registerColor('list.inactiveSelectionBackground', { dark: '#3F3F46', light: '#CCCEDB', hc: null }, nls.localize('listInactiveSelectionBackground', "List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); export const listInactiveSelectionForeground = registerColor('list.inactiveSelectionForeground', { dark: null, light: null, hc: null }, nls.localize('listInactiveSelectionForeground', "List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); export const listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, nls.localize('listHoverBackground', "List/Tree background when hovering over items using the mouse.")); +export const listHoverForeground = registerColor('list.hoverForeground', { dark: null, light: null, hc: null }, nls.localize('listHoverForeground', "List/Tree foreground when hovering over items using the mouse.")); export const listDropBackground = registerColor('list.dropBackground', { dark: listFocusBackground, light: listFocusBackground, hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse.")); export const listHighlightForeground = registerColor('list.highlightForeground', { dark: '#0097fb', light: '#007acc', hc: focusBorder }, nls.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.')); diff --git a/src/vs/platform/theme/common/styler.ts b/src/vs/platform/theme/common/styler.ts index 3d56035667677..979bec60a2ca1 100644 --- a/src/vs/platform/theme/common/styler.ts +++ b/src/vs/platform/theme/common/styler.ts @@ -6,7 +6,7 @@ 'use strict'; import { ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; -import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, lighten, badgeBackground, badgeForeground, progressBarBackground } from 'vs/platform/theme/common/colorRegistry'; +import { inputBackground, inputForeground, ColorIdentifier, selectForeground, selectBackground, selectBorder, inputBorder, foreground, editorBackground, contrastBorder, inputActiveOptionBorder, listFocusBackground, listFocusForeground, listActiveSelectionBackground, listActiveSelectionForeground, listInactiveSelectionForeground, listInactiveSelectionBackground, listHoverBackground, listHoverForeground, listDropBackground, pickerGroupBorder, pickerGroupForeground, widgetShadow, inputValidationInfoBorder, inputValidationInfoBackground, inputValidationWarningBorder, inputValidationWarningBackground, inputValidationErrorBorder, inputValidationErrorBackground, activeContrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, ColorFunction, lighten, badgeBackground, badgeForeground, progressBarBackground } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable } from 'vs/base/common/lifecycle'; import { SIDE_BAR_SECTION_HEADER_BACKGROUND } from 'vs/workbench/common/theme'; @@ -136,6 +136,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer pickerGroupForeground?: ColorIdentifier, pickerGroupBorder?: ColorIdentifier, listFocusBackground?: ColorIdentifier, + listFocusForeground?: ColorIdentifier, listActiveSelectionBackground?: ColorIdentifier, listActiveSelectionForeground?: ColorIdentifier, listFocusAndSelectionBackground?: ColorIdentifier, @@ -143,6 +144,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer listInactiveSelectionBackground?: ColorIdentifier, listInactiveSelectionForeground?: ColorIdentifier, listHoverBackground?: ColorIdentifier, + listHoverForeground?: ColorIdentifier, listDropBackground?: ColorIdentifier, listFocusOutline?: ColorIdentifier, listSelectionOutline?: ColorIdentifier, @@ -166,6 +168,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer inputValidationErrorBorder: (style && style.inputValidationErrorBorder) || inputValidationErrorBorder, inputValidationErrorBackground: (style && style.inputValidationErrorBackground) || inputValidationErrorBackground, listFocusBackground: (style && style.listFocusBackground) || listFocusBackground, + listFocusForeground: (style && style.listFocusForeground) || listFocusForeground, listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || lighten(listActiveSelectionBackground, 0.1), listActiveSelectionForeground: (style && style.listActiveSelectionForeground) || listActiveSelectionForeground, listFocusAndSelectionBackground: style && style.listFocusAndSelectionBackground || listActiveSelectionBackground, @@ -173,6 +176,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground, listInactiveSelectionForeground: (style && style.listInactiveSelectionForeground) || listInactiveSelectionForeground, listHoverBackground: (style && style.listHoverBackground) || listHoverBackground, + listHoverForeground: (style && style.listHoverForeground) || listHoverForeground, listDropBackground: (style && style.listDropBackground) || listDropBackground, listFocusOutline: (style && style.listFocusOutline) || activeContrastBorder, listSelectionOutline: (style && style.listSelectionOutline) || activeContrastBorder, @@ -182,6 +186,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer export function attachListStyler(widget: IThemable, themeService: IThemeService, style?: { listFocusBackground?: ColorIdentifier, + listFocusForeground?: ColorIdentifier, listActiveSelectionBackground?: ColorIdentifier, listActiveSelectionForeground?: ColorIdentifier, listFocusAndSelectionBackground?: ColorIdentifier, @@ -190,6 +195,7 @@ export function attachListStyler(widget: IThemable, themeService: IThemeService, listInactiveSelectionBackground?: ColorIdentifier, listInactiveSelectionForeground?: ColorIdentifier, listHoverBackground?: ColorIdentifier, + listHoverForeground?: ColorIdentifier, listDropBackground?: ColorIdentifier, listFocusOutline?: ColorIdentifier, listInactiveFocusOutline?: ColorIdentifier, @@ -198,6 +204,7 @@ export function attachListStyler(widget: IThemable, themeService: IThemeService, }): IDisposable { return doAttachStyler(themeService, { listFocusBackground: (style && style.listFocusBackground) || listFocusBackground, + listFocusForeground: (style && style.listFocusForeground) || listFocusForeground, listActiveSelectionBackground: (style && style.listActiveSelectionBackground) || lighten(listActiveSelectionBackground, 0.1), listActiveSelectionForeground: (style && style.listActiveSelectionForeground) || listActiveSelectionForeground, listFocusAndSelectionBackground: style && style.listFocusAndSelectionBackground || listActiveSelectionBackground, @@ -206,6 +213,7 @@ export function attachListStyler(widget: IThemable, themeService: IThemeService, listInactiveSelectionBackground: (style && style.listInactiveSelectionBackground) || listInactiveSelectionBackground, listInactiveSelectionForeground: (style && style.listInactiveSelectionForeground) || listInactiveSelectionForeground, listHoverBackground: (style && style.listHoverBackground) || listHoverBackground, + listHoverForeground: (style && style.listHoverForeground) || listHoverForeground, listDropBackground: (style && style.listDropBackground) || listDropBackground, listFocusOutline: (style && style.listFocusOutline) || activeContrastBorder, listSelectionOutline: (style && style.listSelectionOutline) || activeContrastBorder, From 696cfa8513892caea5455e661b29424ce00e4a17 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 15 May 2017 15:55:49 +0200 Subject: [PATCH 0531/2747] Sidebar is not clickable after changing Date & Time (fixes #25830) --- .../workbench/browser/parts/activitybar/activitybarActions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts index be928651ff28a..e1133c4e5ce2f 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts @@ -84,7 +84,7 @@ export class ViewletActivityAction extends ActivityAction { // prevent accident trigger on a doubleclick (to help nervous people) const now = Date.now(); - if (now - this.lastRun < ViewletActivityAction.preventDoubleClickDelay) { + if (now > this.lastRun /* https://github.com/Microsoft/vscode/issues/25830 */ && now - this.lastRun < ViewletActivityAction.preventDoubleClickDelay) { return TPromise.as(true); } this.lastRun = now; From 515a6e0d3d0e7262ed4c482a3ebbb78d626b8e96 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 15 May 2017 15:56:05 +0200 Subject: [PATCH 0532/2747] extract edit making logic, #24855 --- .../contrib/snippet/browser/snippetSession.ts | 70 +++++++++++-------- 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index 2c2c8ae4aa6e1..726ceadb12efe 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -15,7 +15,7 @@ import { IPosition } from 'vs/editor/common/core/position'; import { dispose } from 'vs/base/common/lifecycle'; import { EditorSnippetVariableResolver } from "vs/editor/contrib/snippet/common/snippetVariables"; -class OneSnippet { +export class OneSnippet { private readonly _editor: ICommonCodeEditor; private readonly _snippet: TextmateSnippet; @@ -204,41 +204,24 @@ export class SnippetSession { return selection; } - private readonly _editor: ICommonCodeEditor; - private readonly _template: string; - private readonly _overwriteBefore: number; - private readonly _overwriteAfter: number; - private readonly _snippets: OneSnippet[]; - - constructor(editor: ICommonCodeEditor, template: string, overwriteBefore: number = 0, overwriteAfter: number = 0) { - this._editor = editor; - this._template = template; - this._overwriteBefore = overwriteBefore; - this._overwriteAfter = overwriteAfter; - this._snippets = []; - } - - dispose(): void { - dispose(this._snippets); - } - - insert(): void { + static makeInsertEditsAndSnippets(editor: ICommonCodeEditor, template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): { edits: IIdentifiedSingleEditOperation[], snippets: OneSnippet[] } { let delta = 0; let edits: IIdentifiedSingleEditOperation[] = []; - let model = this._editor.getModel(); + let snippets: OneSnippet[] = []; + let model = editor.getModel(); // know what text the overwrite[Before|After] extensions // of the primary curser have selected because only when // secondary selections extend to the same text we can grow them - let firstBeforeText = model.getValueInRange(SnippetSession.adjustSelection(model, this._editor.getSelection(), this._overwriteBefore, 0)); - let firstAfterText = model.getValueInRange(SnippetSession.adjustSelection(model, this._editor.getSelection(), 0, this._overwriteAfter)); + let firstBeforeText = model.getValueInRange(SnippetSession.adjustSelection(model, editor.getSelection(), overwriteBefore, 0)); + let firstAfterText = model.getValueInRange(SnippetSession.adjustSelection(model, editor.getSelection(), 0, overwriteAfter)); // sort selections by their start position but remeber // the original index. that allows you to create correct // offset-based selection logic without changing the // primary selection - const indexedSelection = this._editor.getSelections() + const indexedSelection = editor.getSelections() .map((selection, idx) => ({ selection, idx })) .sort((a, b) => Range.compareRangesUsingStarts(a.selection, b.selection)); @@ -246,8 +229,8 @@ export class SnippetSession { // extend selection with the `overwriteBefore` and `overwriteAfter` and then // compare if this matches the extensions of the primary selection - let extensionBefore = SnippetSession.adjustSelection(model, selection, this._overwriteBefore, 0); - let extensionAfter = SnippetSession.adjustSelection(model, selection, 0, this._overwriteAfter); + let extensionBefore = SnippetSession.adjustSelection(model, selection, overwriteBefore, 0); + let extensionAfter = SnippetSession.adjustSelection(model, selection, 0, overwriteAfter); if (firstBeforeText !== model.getValueInRange(extensionBefore)) { extensionBefore = selection; } @@ -263,7 +246,7 @@ export class SnippetSession { // adjust the template string to match the indentation and // whitespace rules of this insert location (can be different for each cursor) const start = snippetSelection.getStartPosition(); - const adjustedTemplate = SnippetSession.normalizeWhitespace(model, start, this._template); + const adjustedTemplate = SnippetSession.normalizeWhitespace(model, start, template); const snippet = SnippetParser.parse(adjustedTemplate).resolveVariables(new EditorSnippetVariableResolver(model, snippetSelection)); const offset = model.getOffsetAt(start) + delta; @@ -273,9 +256,40 @@ export class SnippetSession { // that ensures the primiary cursor stays primary despite not being // the one with lowest start position edits[idx] = EditOperation.replaceMove(snippetSelection, snippet.text); - this._snippets[idx] = new OneSnippet(this._editor, snippet, offset); + snippets[idx] = new OneSnippet(editor, snippet, offset); } + return { edits, snippets }; + } + + private readonly _editor: ICommonCodeEditor; + private readonly _template: string; + private readonly _overwriteBefore: number; + private readonly _overwriteAfter: number; + private _snippets: OneSnippet[]; + + constructor(editor: ICommonCodeEditor, template: string, overwriteBefore: number = 0, overwriteAfter: number = 0) { + this._editor = editor; + this._template = template; + this._overwriteBefore = overwriteBefore; + this._overwriteAfter = overwriteAfter; + this._snippets = []; + } + + dispose(): void { + dispose(this._snippets); + } + + insert(): void { + + const model = this._editor.getModel(); + const { edits, snippets } = SnippetSession.makeInsertEditsAndSnippets( + this._editor, this._template, this._overwriteBefore, this._overwriteAfter + ); + + // keep snippets around + this._snippets = snippets; + // make insert edit and start with first selections const newSelections = model.pushEditOperations(this._editor.getSelections(), edits, undoEdits => { if (this._snippets[0].hasPlaceholder) { From 9acf72b252650eac43f2423a5ed35884272d347a Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 15 May 2017 16:03:40 +0200 Subject: [PATCH 0533/2747] [theme] remove editorOptions.theme --- .../standalone/standaloneCodeEditor.ts | 43 ++++++++----------- .../browser/standalone/standaloneEditor.ts | 9 +++- src/vs/editor/browser/view/viewImpl.ts | 15 +++++-- .../editor/browser/widget/codeEditorWidget.ts | 10 ----- .../editor/browser/widget/diffEditorWidget.ts | 26 +++++------ .../common/config/commonEditorConfig.ts | 17 +------- src/vs/editor/common/config/editorOptions.ts | 34 ++++++++++----- src/vs/monaco.d.ts | 27 +++++++++--- .../browser/parts/editor/textDiffEditor.ts | 4 +- .../browser/parts/editor/textEditor.ts | 6 +-- .../parts/editor/textResourceEditor.ts | 4 +- .../parts/debug/electron-browser/repl.ts | 6 +-- .../files/browser/editors/textFileEditor.ts | 4 +- .../parts/output/browser/outputPanel.ts | 4 +- .../preferences/browser/preferencesEditor.ts | 6 +-- .../electron-browser/walkThroughPart.ts | 13 +++--- 16 files changed, 117 insertions(+), 111 deletions(-) diff --git a/src/vs/editor/browser/standalone/standaloneCodeEditor.ts b/src/vs/editor/browser/standalone/standaloneCodeEditor.ts index 7644c520febb3..2a3a9789ed453 100644 --- a/src/vs/editor/browser/standalone/standaloneCodeEditor.ts +++ b/src/vs/editor/browser/standalone/standaloneCodeEditor.ts @@ -44,12 +44,26 @@ export interface IEditorConstructionOptions extends IEditorOptions { * To not create automatically a model, use `model: null`. */ language?: string; + /** + * Initial theme to be used for rendering. + * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'. + * You can create custom themes via `monaco.editor.defineTheme`. + * To switch a theme, use `monaco.editor.setTheme` + */ + theme?: string; } /** * The options to create a diff editor. */ export interface IDiffEditorConstructionOptions extends IDiffEditorOptions { + /** + * Initial theme to be used for rendering. + * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'. + * You can create custom themes via `monaco.editor.defineTheme`. + * To switch a theme, use `monaco.editor.setTheme` + */ + theme?: string; } export interface IStandaloneCodeEditor extends ICodeEditor { @@ -193,7 +207,6 @@ export class StandaloneCodeEditor extends CodeEditor implements IStandaloneCodeE export class StandaloneEditor extends StandaloneCodeEditor implements IStandaloneCodeEditor { private _contextViewService: IEditorContextViewService; - private _standaloneThemeService: IStandaloneThemeService; private _ownsModel: boolean; constructor( @@ -206,18 +219,17 @@ export class StandaloneEditor extends StandaloneCodeEditor implements IStandalon @IContextKeyService contextKeyService: IContextKeyService, @IKeybindingService keybindingService: IKeybindingService, @IContextViewService contextViewService: IContextViewService, - @IStandaloneThemeService standaloneThemeService: IStandaloneThemeService + @IStandaloneThemeService themeService: IStandaloneThemeService ) { options = options || {}; if (typeof options.theme === 'string') { - options.theme = standaloneThemeService.setTheme(options.theme); + themeService.setTheme(options.theme); } let model: IModel = options.model; delete options.model; - super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService, standaloneThemeService); + super(domElement, options, instantiationService, codeEditorService, commandService, contextKeyService, keybindingService, themeService); this._contextViewService = contextViewService; - this._standaloneThemeService = standaloneThemeService; this._register(toDispose); if (typeof model === 'undefined') { @@ -245,13 +257,6 @@ export class StandaloneEditor extends StandaloneCodeEditor implements IStandalon this.dispose(); } - public updateOptions(newOptions: IEditorOptions): void { - if (typeof newOptions.theme === 'string') { - newOptions.theme = this._standaloneThemeService.setTheme(newOptions.theme); - } - super.updateOptions(newOptions); - } - _attachModel(model: IModel): void { super._attachModel(model); if (this._view) { @@ -271,7 +276,6 @@ export class StandaloneEditor extends StandaloneCodeEditor implements IStandalon export class StandaloneDiffEditor extends DiffEditorWidget implements IStandaloneDiffEditor { private _contextViewService: IEditorContextViewService; - private _standaloneThemeService: IStandaloneThemeService; private _standaloneKeybindingService: StandaloneKeybindingService; constructor( @@ -282,14 +286,13 @@ export class StandaloneDiffEditor extends DiffEditorWidget implements IStandalon @IContextKeyService contextKeyService: IContextKeyService, @IKeybindingService keybindingService: IKeybindingService, @IContextViewService contextViewService: IContextViewService, - @IStandaloneThemeService standaloneColorService: IStandaloneThemeService, @IEditorWorkerService editorWorkerService: IEditorWorkerService, @ICodeEditorService codeEditorService: ICodeEditorService, - @IThemeService themeService: IThemeService + @IStandaloneThemeService themeService: IStandaloneThemeService ) { options = options || {}; if (typeof options.theme === 'string') { - options.theme = standaloneColorService.setTheme(options.theme); + options.theme = themeService.setTheme(options.theme); } super(domElement, options, editorWorkerService, contextKeyService, instantiationService, codeEditorService, themeService); @@ -299,7 +302,6 @@ export class StandaloneDiffEditor extends DiffEditorWidget implements IStandalon } this._contextViewService = contextViewService; - this._standaloneThemeService = standaloneColorService; this._register(toDispose); @@ -314,13 +316,6 @@ export class StandaloneDiffEditor extends DiffEditorWidget implements IStandalon this.dispose(); } - public updateOptions(newOptions: IEditorOptions): void { - if (typeof newOptions.theme === 'string') { - newOptions.theme = this._standaloneThemeService.setTheme(newOptions.theme); - } - super.updateOptions(newOptions); - } - protected _createInnerEditor(instantiationService: IInstantiationService, container: HTMLElement, options: IEditorOptions): CodeEditor { return instantiationService.createInstance(StandaloneCodeEditor, container, options); } diff --git a/src/vs/editor/browser/standalone/standaloneEditor.ts b/src/vs/editor/browser/standalone/standaloneEditor.ts index 5e5fb63939e7c..776016912c41f 100644 --- a/src/vs/editor/browser/standalone/standaloneEditor.ts +++ b/src/vs/editor/browser/standalone/standaloneEditor.ts @@ -125,7 +125,6 @@ export function createDiffEditor(domElement: HTMLElement, options?: IDiffEditorC services.get(IContextKeyService), services.get(IKeybindingService), services.get(IContextViewService), - services.get(IStandaloneThemeService), services.get(IEditorWorkerService), services.get(ICodeEditorService), services.get(IStandaloneThemeService) @@ -309,6 +308,13 @@ export function defineTheme(themeName: string, themeData: IStandaloneThemeData): StaticServices.standaloneThemeService.get().defineTheme(themeName, themeData); } +/** + * Switches to a theme. + */ +export function setTheme(themeName: string): void { + StaticServices.standaloneThemeService.get().setTheme(themeName); +} + /** * @internal */ @@ -336,6 +342,7 @@ export function createMonacoEditorAPI(): typeof monaco.editor { colorizeModelLine: colorizeModelLine, tokenize: tokenize, defineTheme: defineTheme, + setTheme: setTheme, // enums ScrollbarVisibility: ScrollbarVisibility, diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index 9e11311758066..9a2390c4a36e7 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -48,7 +48,7 @@ import { ViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData' import { EditorScrollbar } from 'vs/editor/browser/viewParts/editorScrollbar/editorScrollbar'; import { Minimap } from 'vs/editor/browser/viewParts/minimap/minimap'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { IThemeService, getThemeTypeSelector } from 'vs/platform/theme/common/themeService'; export interface IContentWidgetData { widget: editorBrowser.IContentWidget; @@ -118,6 +118,7 @@ export class View extends ViewEventHandler { this._register(themeService.onThemeChange(theme => { this._context.theme = theme; this.eventDispatcher.emit(new viewEvents.ViewThemeChangedEvent()); + this.render(true, false); })); this.viewParts = []; @@ -144,7 +145,7 @@ export class View extends ViewEventHandler { this.linesContent.setPosition('absolute'); this.domNode = createFastDomNode(document.createElement('div')); - this.domNode.setClassName(this._context.configuration.editor.editorClassName); + this.domNode.setClassName(this.getEditorClassName()); this.overflowGuardContainer = createFastDomNode(document.createElement('div')); PartFingerprints.write(this.overflowGuardContainer, PartFingerprint.OverflowGuard); @@ -305,11 +306,15 @@ export class View extends ViewEventHandler { } + private getEditorClassName() { + return this._context.configuration.editor.editorClassName + ' ' + getThemeTypeSelector(this._context.theme.type); + } + // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { if (e.editorClassName) { - this.domNode.setClassName(this._context.configuration.editor.editorClassName); + this.domNode.setClassName(this.getEditorClassName()); } if (e.layoutInfo) { this._setLayout(); @@ -329,6 +334,10 @@ export class View extends ViewEventHandler { this.outgoingEvents.emitScrollChanged(e); return false; } + public onThemeChanged(e: viewEvents.ViewThemeChangedEvent): boolean { + this.domNode.setClassName(this.getEditorClassName()); + return false; + } // --- end event handlers diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index ff008292f72b6..b149d37a1113d 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -158,16 +158,6 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito super.dispose(); } - public updateOptions(newOptions: IEditorOptions): void { - let oldTheme = this._configuration.editor.viewInfo.theme; - super.updateOptions(newOptions); - let newTheme = this._configuration.editor.viewInfo.theme; - - if (oldTheme !== newTheme) { - this.render(); - } - } - public colorizeModelLine(lineNumber: number, model: editorCommon.IModel = this.model): string { if (!model) { return ''; diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index 113637bf6fff7..f9f95be97e054 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -32,7 +32,7 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle import { ColorId, MetadataConsts, FontStyle } from 'vs/editor/common/modes'; import Event, { Emitter } from 'vs/base/common/event'; import * as editorOptions from 'vs/editor/common/config/editorOptions'; -import { registerThemingParticipant, IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; +import { registerThemingParticipant, IThemeService, ITheme, getThemeTypeSelector } from 'vs/platform/theme/common/themeService'; import { registerColor, scrollbarShadow } from 'vs/platform/theme/common/colorRegistry'; import { Color, RGBA } from 'vs/base/common/color'; import { OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; @@ -148,7 +148,6 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE private readonly id: number; - private _theme: string; private _domElement: HTMLElement; protected readonly _containerDomElement: HTMLElement; private readonly _overviewDomElement: HTMLElement; @@ -213,7 +212,6 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._domElement = domElement; options = options || {}; - this._theme = options.theme || editorOptions.EDITOR_DEFAULTS.viewInfo.theme; // renderSideBySide this._renderSideBySide = true; if (typeof options.renderSideBySide !== 'undefined') { @@ -240,7 +238,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._updateDecorationsRunner = this._register(new RunOnceScheduler(() => this._updateDecorations(), 0)); this._containerDomElement = document.createElement('div'); - this._containerDomElement.className = DiffEditorWidget._getClassName(this._theme, this._renderSideBySide); + this._containerDomElement.className = DiffEditorWidget._getClassName(this._themeService.getTheme(), this._renderSideBySide); this._containerDomElement.style.position = 'relative'; this._containerDomElement.style.height = '100%'; this._domElement.appendChild(this._containerDomElement); @@ -305,11 +303,12 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._codeEditorService.addDiffEditor(this); - themeService.onThemeChange(t => { + this._register(themeService.onThemeChange(t => { if (this._strategy && this._strategy.applyColors(t)) { this._updateDecorationsRunner.schedule(); } - }); + this._containerDomElement.className = DiffEditorWidget._getClassName(this._themeService.getTheme(), this._renderSideBySide); + })); } public get ignoreTrimWhitespace(): boolean { @@ -324,12 +323,12 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE return this._renderIndicators; } - private static _getClassName(theme: string, renderSideBySide: boolean): string { + private static _getClassName(theme: ITheme, renderSideBySide: boolean): string { let result = 'monaco-diff-editor monaco-editor-background '; if (renderSideBySide) { result += 'side-by-side '; } - result += theme; + result += getThemeTypeSelector(theme.type); return result; } @@ -486,8 +485,6 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE } public updateOptions(newOptions: editorOptions.IDiffEditorOptions): void { - // Handle new theme - this._theme = newOptions && newOptions.theme ? newOptions.theme : this._theme; // Handle side by side let renderSideBySideChanged = false; @@ -523,9 +520,6 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._originalIsEditable = Boolean(newOptions.originalEditable); } - // Update class name - this._containerDomElement.className = DiffEditorWidget._getClassName(this._theme, this._renderSideBySide); - this.modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(newOptions)); this.originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(newOptions, this._originalIsEditable)); @@ -542,6 +536,8 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE } else { this._setStrategy(new DiffEdtorWidgetInline(this._createDataSource(), this._enableSplitViewResizing)); } + // Update class name + this._containerDomElement.className = DiffEditorWidget._getClassName(this._themeService.getTheme(), this._renderSideBySide); } } @@ -892,7 +888,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE let result = this._adjustOptionsForSubEditor(options); result.readOnly = !isEditable; result.overviewRulerLanes = 1; - result.theme = this._theme + ' original-in-monaco-diff-editor'; + result.extraEditorClassName = 'original-in-monaco-diff-editor'; return result; } @@ -900,7 +896,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE let result = this._adjustOptionsForSubEditor(options); result.revealHorizontalRightPadding = editorOptions.EDITOR_DEFAULTS.viewInfo.revealHorizontalRightPadding + DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH; result.scrollbar.verticalHasArrows = false; - result.theme = this._theme + ' modified-in-monaco-diff-editor'; + result.extraEditorClassName = 'modified-in-monaco-diff-editor'; return result; } diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index afdc566eac9ea..a7751d58adc66 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -111,12 +111,11 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed const opts = this._validatedOptions; const partialEnv = this._getEnvConfiguration(); const bareFontInfo = BareFontInfo.createFromRawSettings(this._rawOptions, partialEnv.zoomLevel); - const editorClassName = this._getEditorClassName(opts.viewInfo.theme, opts.viewInfo.fontLigatures, opts.mouseStyle); const env: editorOptions.IEnvironmentalOptions = { outerWidth: partialEnv.outerWidth, outerHeight: partialEnv.outerHeight, fontInfo: this.readConfiguration(bareFontInfo), - editorClassName: editorClassName + ' ' + partialEnv.extraEditorClassName, + extraEditorClassName: partialEnv.extraEditorClassName, isDominatedByLongLines: this._isDominatedByLongLines, lineNumbersDigitCount: this._lineNumbersDigitCount, canUseTranslate3d: partialEnv.canUseTranslate3d, @@ -154,20 +153,6 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed } return r ? r : 1; } - - private _getEditorClassName(theme: string, fontLigatures: boolean, mouseStyle: 'text' | 'default' | 'copy'): string { - let extra = ''; - if (fontLigatures) { - extra += 'enable-ligatures '; - } - if (mouseStyle === 'default') { - extra += 'mouse-default '; - } else if (mouseStyle === 'copy') { - extra += 'mouse-copy '; - } - return 'monaco-editor ' + extra + theme; - } - protected abstract _getEnvConfiguration(): IEnvConfiguration; protected abstract readConfiguration(styling: BareFontInfo): FontInfo; diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 1ea498ab56b54..6d41b717618c4 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -170,11 +170,9 @@ export interface IEditorOptions { */ roundedSelection?: boolean; /** - * Theme to be used for rendering. - * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'. - * You can create custom themes via `monaco.editor.defineTheme`. + * Class name to be added to the editor. */ - theme?: string; + extraEditorClassName?: string; /** * Should the editor be read only. * Defaults to false. @@ -683,7 +681,7 @@ export interface EditorWrappingInfo { } export interface InternalEditorViewOptions { - readonly theme: string; + readonly extraEditorClassName: string; readonly disableMonospaceOptimizations: boolean; readonly experimentalScreenReader: boolean; readonly rulers: number[]; @@ -893,7 +891,7 @@ export class InternalEditorOptions { */ private static _equalsViewOptions(a: InternalEditorViewOptions, b: InternalEditorViewOptions): boolean { return ( - a.theme === b.theme + a.extraEditorClassName === b.extraEditorClassName && a.disableMonospaceOptimizations === b.disableMonospaceOptimizations && a.experimentalScreenReader === b.experimentalScreenReader && this._equalsNumberArrays(a.rulers, b.rulers) @@ -1179,7 +1177,7 @@ export interface IEnvironmentalOptions { readonly outerWidth: number; readonly outerHeight: number; readonly fontInfo: FontInfo; - readonly editorClassName: string; + readonly extraEditorClassName: string; readonly isDominatedByLongLines: boolean; readonly lineNumbersDigitCount: number; readonly canUseTranslate3d: boolean; @@ -1473,7 +1471,7 @@ export class EditorOptionsValidator { const minimap = this._sanitizeMinimapOpts(opts.minimap, defaults.minimap); return { - theme: _string(opts.theme, defaults.theme), + extraEditorClassName: _string(opts.extraEditorClassName, defaults.extraEditorClassName), disableMonospaceOptimizations: disableMonospaceOptimizations, experimentalScreenReader: _boolean(opts.experimentalScreenReader, defaults.experimentalScreenReader), rulers: rulers, @@ -1630,10 +1628,26 @@ export class InternalEditorOptionsFactory { wordWrapBreakObtrusiveCharacters: opts.wordWrapBreakObtrusiveCharacters, }; + let className = 'monaco-editor'; + if (opts.viewInfo.extraEditorClassName) { + className += ' ' + opts.viewInfo.extraEditorClassName; + } + if (env.extraEditorClassName) { + className += ' ' + env.extraEditorClassName; + } + if (opts.viewInfo.fontLigatures) { + className += ' enable-ligatures'; + } + if (opts.mouseStyle === 'default') { + className += ' mouse-default'; + } else if (opts.mouseStyle === 'copy') { + className += ' mouse-copy'; + } + return new InternalEditorOptions({ canUseTranslate3d: opts.disableTranslate3d ? false : env.canUseTranslate3d, pixelRatio: env.pixelRatio, - editorClassName: env.editorClassName, + editorClassName: className, lineHeight: env.fontInfo.lineHeight, readOnly: opts.readOnly, wordSeparators: opts.wordSeparators, @@ -1853,7 +1867,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { useTabStops: true, viewInfo: { - theme: 'vs', + extraEditorClassName: '', disableMonospaceOptimizations: false, experimentalScreenReader: true, rulers: [], diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 8571c7ae3d989..ec0a1873919d7 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -892,6 +892,11 @@ declare module monaco.editor { */ export function defineTheme(themeName: string, themeData: IStandaloneThemeData): void; + /** + * Switches to a theme. + */ + export function setTheme(themeName: string): void; + export type BuiltinTheme = 'vs' | 'vs-dark' | 'hc-black'; export interface IStandaloneThemeData { @@ -965,12 +970,26 @@ declare module monaco.editor { * To not create automatically a model, use `model: null`. */ language?: string; + /** + * Initial theme to be used for rendering. + * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'. + * You can create custom themes via `monaco.editor.defineTheme`. + * To switch a theme, use `monaco.editor.setTheme` + */ + theme?: string; } /** * The options to create a diff editor. */ export interface IDiffEditorConstructionOptions extends IDiffEditorOptions { + /** + * Initial theme to be used for rendering. + * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'. + * You can create custom themes via `monaco.editor.defineTheme`. + * To switch a theme, use `monaco.editor.setTheme` + */ + theme?: string; } export interface IStandaloneCodeEditor extends ICodeEditor { @@ -2717,11 +2736,9 @@ declare module monaco.editor { */ roundedSelection?: boolean; /** - * Theme to be used for rendering. - * The current out-of-the-box available themes are: 'vs' (default), 'vs-dark', 'hc-black'. - * You can create custom themes via `monaco.editor.defineTheme`. + * Class name to be added to the editor. */ - theme?: string; + extraEditorClassName?: string; /** * Should the editor be read only. * Defaults to false. @@ -3163,7 +3180,7 @@ declare module monaco.editor { } export interface InternalEditorViewOptions { - readonly theme: string; + readonly extraEditorClassName: string; readonly disableMonospaceOptimizations: boolean; readonly experimentalScreenReader: boolean; readonly rulers: number[]; diff --git a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts index cf310d07ac448..e22ac2936abd6 100644 --- a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts @@ -30,7 +30,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; @@ -53,7 +53,7 @@ export class TextDiffEditor extends BaseTextEditor { @IStorageService storageService: IStorageService, @IConfigurationService configurationService: IConfigurationService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IWorkbenchThemeService themeService: IWorkbenchThemeService, + @IThemeService themeService: IThemeService, @IEditorGroupService editorGroupService: IEditorGroupService, @IModeService modeService: IModeService, @ITextFileService textFileService: ITextFileService diff --git a/src/vs/workbench/browser/parts/editor/textEditor.ts b/src/vs/workbench/browser/parts/editor/textEditor.ts index e485441f65f2b..d9cb5e09200d6 100644 --- a/src/vs/workbench/browser/parts/editor/textEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textEditor.ts @@ -21,7 +21,7 @@ import { IStorageService } from 'vs/platform/storage/common/storage'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Scope } from 'vs/workbench/common/memento'; import { getCodeEditor } from 'vs/editor/common/services/codeEditorService'; import { IModeService } from 'vs/editor/common/services/modeService'; @@ -58,7 +58,7 @@ export abstract class BaseTextEditor extends BaseEditor { @IInstantiationService private _instantiationService: IInstantiationService, @IStorageService private storageService: IStorageService, @IConfigurationService private _configurationService: IConfigurationService, - @IWorkbenchThemeService protected themeService: IWorkbenchThemeService, + @IThemeService protected themeService: IThemeService, @IModeService private modeService: IModeService, @ITextFileService private textFileService: ITextFileService, @IEditorGroupService protected editorGroupService: IEditorGroupService @@ -66,7 +66,6 @@ export abstract class BaseTextEditor extends BaseEditor { super(id, telemetryService, themeService); this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.handleConfigurationChangeEvent(e.config))); - this.toUnbind.push(themeService.onDidColorThemeChange(e => this.handleConfigurationChangeEvent())); // TODO@theme this should be done from the editor itself and not from the outside } protected get instantiationService(): IInstantiationService { @@ -125,7 +124,6 @@ export abstract class BaseTextEditor extends BaseEditor { objects.assign(overrides, { overviewRulerLanes: 3, lineNumbersMinChars: 3, - theme: this.themeService.getColorTheme().id, fixedOverflowWidgets: true }); diff --git a/src/vs/workbench/browser/parts/editor/textResourceEditor.ts b/src/vs/workbench/browser/parts/editor/textResourceEditor.ts index c54d7aef429ab..dda89f7447b1d 100644 --- a/src/vs/workbench/browser/parts/editor/textResourceEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textResourceEditor.ts @@ -19,7 +19,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IModeService } from 'vs/editor/common/services/modeService'; @@ -38,7 +38,7 @@ export class TextResourceEditor extends BaseTextEditor { @IInstantiationService instantiationService: IInstantiationService, @IStorageService storageService: IStorageService, @IConfigurationService configurationService: IConfigurationService, - @IWorkbenchThemeService themeService: IWorkbenchThemeService, + @IThemeService themeService: IThemeService, @IUntitledEditorService private untitledEditorService: IUntitledEditorService, @IEditorGroupService editorGroupService: IEditorGroupService, @IModeService modeService: IModeService, diff --git a/src/vs/workbench/parts/debug/electron-browser/repl.ts b/src/vs/workbench/parts/debug/electron-browser/repl.ts index f473819c5403e..b2eafe0152165 100644 --- a/src/vs/workbench/parts/debug/electron-browser/repl.ts +++ b/src/vs/workbench/parts/debug/electron-browser/repl.ts @@ -38,11 +38,11 @@ import * as debug from 'vs/workbench/parts/debug/common/debug'; import { ClearReplAction } from 'vs/workbench/parts/debug/browser/debugActions'; import { ReplHistory } from 'vs/workbench/parts/debug/common/replHistory'; import { Panel } from 'vs/workbench/browser/panel'; -import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IListService } from 'vs/platform/list/browser/listService'; import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; const $ = dom.$; @@ -89,7 +89,7 @@ export class Repl extends Panel implements IPrivateReplService { @IInstantiationService private instantiationService: IInstantiationService, @IStorageService private storageService: IStorageService, @IPanelService private panelService: IPanelService, - @IWorkbenchThemeService protected themeService: IWorkbenchThemeService, + @IThemeService protected themeService: IThemeService, @IModelService private modelService: IModelService, @IContextKeyService private contextKeyService: IContextKeyService, @IListService private listService: IListService @@ -105,7 +105,6 @@ export class Repl extends Panel implements IPrivateReplService { this.toDispose.push(this.debugService.getModel().onDidChangeReplElements(() => { this.refreshReplElements(this.debugService.getModel().getReplElements().length === 0); })); - this.toDispose.push(this.themeService.onDidColorThemeChange(e => this.replInput.updateOptions(this.getReplInputOptions()))); // TODO@theme this should be done from the editor itself and not from the outside this.toDispose.push(this.panelService.onDidPanelOpen(panel => this.refreshReplElements(true))); } @@ -280,7 +279,6 @@ export class Repl extends Panel implements IPrivateReplService { }, lineDecorationsWidth: 0, scrollBeyondLastLine: false, - theme: this.themeService.getColorTheme().id, renderLineHighlight: 'none', fixedOverflowWidgets: true }; diff --git a/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts b/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts index 1dc4be93f8379..3929604de103b 100644 --- a/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts +++ b/src/vs/workbench/parts/files/browser/editors/textFileEditor.ts @@ -28,7 +28,7 @@ import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { CancelAction } from 'vs/platform/message/common/message'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IModeService } from 'vs/editor/common/services/modeService'; @@ -49,7 +49,7 @@ export class TextFileEditor extends BaseTextEditor { @IHistoryService private historyService: IHistoryService, @IConfigurationService configurationService: IConfigurationService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IWorkbenchThemeService themeService: IWorkbenchThemeService, + @IThemeService themeService: IThemeService, @IEditorGroupService editorGroupService: IEditorGroupService, @IModeService modeService: IModeService, @ITextFileService textFileService: ITextFileService, diff --git a/src/vs/workbench/parts/output/browser/outputPanel.ts b/src/vs/workbench/parts/output/browser/outputPanel.ts index da6f5e9ff4ca1..217bb1972c6cc 100644 --- a/src/vs/workbench/parts/output/browser/outputPanel.ts +++ b/src/vs/workbench/parts/output/browser/outputPanel.ts @@ -21,7 +21,7 @@ import { EditorInput, EditorOptions } from 'vs/workbench/common/editor'; import { TextResourceEditor } from 'vs/workbench/browser/parts/editor/textResourceEditor'; import { OutputEditors, OUTPUT_PANEL_ID, IOutputService, CONTEXT_IN_OUTPUT } from 'vs/workbench/parts/output/common/output'; import { SwitchOutputAction, SwitchOutputActionItem, ClearOutputAction, ToggleOutputScrollLockAction } from 'vs/workbench/parts/output/browser/outputActions'; -import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IModeService } from 'vs/editor/common/services/modeService'; @@ -37,7 +37,7 @@ export class OutputPanel extends TextResourceEditor { @IInstantiationService instantiationService: IInstantiationService, @IStorageService storageService: IStorageService, @IConfigurationService configurationService: IConfigurationService, - @IWorkbenchThemeService themeService: IWorkbenchThemeService, + @IThemeService themeService: IThemeService, @IOutputService private outputService: IOutputService, @IUntitledEditorService untitledEditorService: IUntitledEditorService, @IContextKeyService private contextKeyService: IContextKeyService, diff --git a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts index 652e97a9e234c..5b5610e1d0ede 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts @@ -32,7 +32,7 @@ import { SearchWidget, SettingsTabsWidget } from 'vs/workbench/parts/preferences import { ContextKeyExpr, IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { Command } from 'vs/editor/common/editorCommonExtensions'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IModelService } from 'vs/editor/common/services/modelService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IStorageService } from 'vs/platform/storage/common/storage'; @@ -111,7 +111,7 @@ export class PreferencesEditor extends BaseEditor { @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IContextKeyService private contextKeyService: IContextKeyService, @IInstantiationService private instantiationService: IInstantiationService, - @IWorkbenchThemeService themeService: IWorkbenchThemeService + @IThemeService themeService: IThemeService ) { super(PreferencesEditor.ID, telemetryService, themeService); this.defaultSettingsEditorContextKey = CONTEXT_SETTINGS_EDITOR.bindTo(this.contextKeyService); @@ -461,7 +461,7 @@ export class DefaultPreferencesEditor extends BaseTextEditor { @IInstantiationService instantiationService: IInstantiationService, @IStorageService storageService: IStorageService, @IConfigurationService configurationService: IConfigurationService, - @IWorkbenchThemeService themeService: IWorkbenchThemeService, + @IThemeService themeService: IThemeService, @IPreferencesService private preferencesService: IPreferencesService, @IModelService private modelService: IModelService, @IModeService modeService: IModeService, diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index ae8cd2085ed1a..d0c04742e177e 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -17,7 +17,6 @@ import { EditorOptions } from 'vs/workbench/common/editor'; import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { WalkThroughInput } from 'vs/workbench/parts/welcome/walkThrough/node/walkThroughInput'; -import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { IOpenerService } from 'vs/platform/opener/common/opener'; import { marked } from 'vs/base/common/marked/marked'; import { IModeService } from 'vs/editor/common/services/modeService'; @@ -38,7 +37,7 @@ import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService' import { Parts, IPartService } from 'vs/workbench/services/part/common/partService'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; export const WALK_THROUGH_FOCUS = new RawContextKey('interactivePlaygroundFocus', false); @@ -94,7 +93,7 @@ export class WalkThroughPart extends BaseEditor { constructor( @ITelemetryService telemetryService: ITelemetryService, @IInstantiationService private instantiationService: IInstantiationService, - @IWorkbenchThemeService protected themeService: IWorkbenchThemeService, + @IThemeService protected themeService: IThemeService, @IOpenerService private openerService: IOpenerService, @IFileService private fileService: IFileService, @IModelService protected modelService: IModelService, @@ -328,8 +327,8 @@ export class WalkThroughPart extends BaseEditor { innerContent.classList.add('walkThroughContent'); // only for markdown files const markdown = this.expandMacros(content); innerContent.innerHTML = marked(markdown, { renderer }); - this.style(innerContent); - this.contentDisposables.push(this.themeService.onDidColorThemeChange(() => this.style(innerContent))); + this.style(this.themeService.getTheme(), innerContent); + this.contentDisposables.push(this.themeService.onThemeChange(theme => this.style(theme, innerContent))); this.content.appendChild(innerContent); model.snippets.forEach((snippet, i) => { @@ -378,7 +377,6 @@ export class WalkThroughPart extends BaseEditor { } })); - this.contentDisposables.push(this.themeService.onDidColorThemeChange(theme => editor.updateOptions({ theme: theme.id }))); // TODO@theme this should be done from the editor itself and not from the outside this.contentDisposables.push(this.configurationService.onDidUpdateConfiguration(() => editor.updateOptions(this.getEditorOptions(snippet.textEditorModel.getModeId())))); this.contentDisposables.push(once(editor.onMouseDown)(() => { @@ -429,7 +427,6 @@ export class WalkThroughPart extends BaseEditor { overviewRulerLanes: 3, fixedOverflowWidgets: true, lineNumbersMinChars: 1, - theme: this.themeService.getColorTheme().id, minimap: false, }; } @@ -443,7 +440,7 @@ export class WalkThroughPart extends BaseEditor { } } - private style(div: HTMLElement) { + private style(theme: ITheme, div: HTMLElement) { const styleElement = this.partService.getContainer(Parts.EDITOR_PART); // TODO@theme styles should come in via theme registry const { color, backgroundColor, fontFamily, fontWeight, fontSize } = window.getComputedStyle(styleElement); div.style.color = color; From fc9a929dd0f5ab5029c8c9a01e0e221892364a74 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 15 May 2017 16:19:31 +0200 Subject: [PATCH 0534/2747] Fix #19161 --- src/vs/workbench/electron-browser/actions.ts | 2 +- .../node/configurationEditingService.ts | 63 +++++++++++++------ .../node/configurationEditingService.test.ts | 24 ++++++- 3 files changed, 67 insertions(+), 22 deletions(-) diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index c21c6700f2952..b5b380afb6a06 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -246,7 +246,7 @@ export abstract class BaseZoomAction extends Action { browser.setZoomLevel(webFrame.getZoomLevel(), /*isTrusted*/false); }; - this.configurationEditingService.writeConfiguration(target, { key: BaseZoomAction.SETTING_KEY, value: level }).done(() => applyZoom(), error => applyZoom()); + this.configurationEditingService.writeConfiguration(target, { key: BaseZoomAction.SETTING_KEY, value: level }, { donotNotifyError: true }).done(() => applyZoom(), error => applyZoom()); } } diff --git a/src/vs/workbench/services/configuration/node/configurationEditingService.ts b/src/vs/workbench/services/configuration/node/configurationEditingService.ts index 70d1426b1f5a4..a2ace0b1b2cf6 100644 --- a/src/vs/workbench/services/configuration/node/configurationEditingService.ts +++ b/src/vs/workbench/services/configuration/node/configurationEditingService.ts @@ -42,6 +42,10 @@ interface IValidationResult { exists?: boolean; } +interface ConfigurationEditingOptions extends IConfigurationEditingOptions { + force?: boolean; +} + export class ConfigurationEditingService implements IConfigurationEditingService { public _serviceBrand: any; @@ -66,16 +70,17 @@ export class ConfigurationEditingService implements IConfigurationEditingService return this.queue.queue(() => this.doWriteConfiguration(target, value, options) // queue up writes to prevent race conditions .then(() => null, error => { - return options.donotNotifyError ? TPromise.wrapError(error) : this.onError(error, target); + return options.donotNotifyError ? TPromise.wrapError(error) : this.onError(error, target, value); })); } - private doWriteConfiguration(target: ConfigurationTarget, value: IConfigurationValue, options: IConfigurationEditingOptions): TPromise { + private doWriteConfiguration(target: ConfigurationTarget, value: IConfigurationValue, options: ConfigurationEditingOptions): TPromise { const operation = this.getConfigurationEditOperation(target, value); - return this.resolveAndValidate(target, operation, !options.donotSave) - .then(reference => this.writeToBuffer(reference.object.textEditorModel, operation, !options.donotSave) - .then(() => reference.dispose())); + const checkDirtyConfiguration = !(options.force || options.donotSave); + const saveConfiguration = options.force || !options.donotSave; + return this.resolveAndValidate(target, operation, checkDirtyConfiguration) + .then(reference => this.writeToBuffer(reference.object.textEditorModel, operation, saveConfiguration)); } private writeToBuffer(model: editorCommon.IModel, operation: IConfigurationEditOperation, save: boolean): TPromise { @@ -101,17 +106,13 @@ export class ConfigurationEditingService implements IConfigurationEditingService return false; } - private onError(error: IConfigurationEditingError, target: ConfigurationTarget): TPromise { + private onError(error: IConfigurationEditingError, target: ConfigurationTarget, value: IConfigurationValue): TPromise { switch (error.code) { case ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION: + this.onInvalidConfigurationError(error, target); + break; case ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_DIRTY: - this.choiceService.choose(Severity.Error, error.message, [nls.localize('open', "Open Settings"), nls.localize('close', "Close")], 1) - .then(option => { - switch (option) { - case 0: - this.openSettings(target); - } - }); + this.onConfigurationFileDirtyError(error, target, value); break; default: this.messageService.show(Severity.Error, error.message); @@ -119,6 +120,30 @@ export class ConfigurationEditingService implements IConfigurationEditingService return TPromise.wrapError(error); } + private onInvalidConfigurationError(error: IConfigurationEditingError, target: ConfigurationTarget): void { + this.choiceService.choose(Severity.Error, error.message, [nls.localize('open', "Open Settings"), nls.localize('close', "Close")], 1) + .then(option => { + switch (option) { + case 0: + this.openSettings(target); + } + }); + } + + private onConfigurationFileDirtyError(error: IConfigurationEditingError, target: ConfigurationTarget, value: IConfigurationValue): void { + this.choiceService.choose(Severity.Error, error.message, [nls.localize('saveAndRetry', "Save Settings and Retry"), nls.localize('open', "Open Settings"), nls.localize('close', "Close")], 2) + .then(option => { + switch (option) { + case 0: + this.writeConfiguration(target, value, { force: true }); + break; + case 1: + this.openSettings(target); + break; + } + }); + } + private openSettings(target: ConfigurationTarget): void { this.commandService.executeCommand(ConfigurationTarget.USER === target ? 'workbench.action.openGlobalSettings' : 'workbench.action.openWorkspaceSettings'); } @@ -216,18 +241,18 @@ export class ConfigurationEditingService implements IConfigurationEditingService return this.wrapError(ConfigurationEditingErrorCode.ERROR_NO_WORKSPACE_OPENED, target); } - // Target cannot be dirty if not writing into buffer - const resource = operation.resource; - if (checkDirty && this.textFileService.isDirty(resource)) { - return this.wrapError(ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_DIRTY, target); - } - return this.resolveModelReference(operation.resource) .then(reference => { const model = reference.object.textEditorModel; + if (this.hasParseErrors(model, operation)) { return this.wrapError(ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION, target); } + + // Target cannot be dirty if not writing into buffer + if (checkDirty && this.textFileService.isDirty(operation.resource)) { + return this.wrapError(ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_DIRTY, target); + } return reference; }); } diff --git a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts index 3a53e2a1de27f..a444ccfb9cfca 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts @@ -5,6 +5,7 @@ 'use strict'; +import * as sinon from 'sinon'; import assert = require('assert'); import os = require('os'); import path = require('path'); @@ -55,12 +56,13 @@ class SettingsTestEnvironmentService extends EnvironmentService { suite('ConfigurationEditingService', () => { - let instantiationService; + let instantiationService: TestInstantiationService; let testObject: ConfigurationEditingService; let parentDir; let workspaceDir; let globalSettingsFile; let workspaceSettingsDir; + let choiceService; suiteSetup(() => { const configurationRegistry = Registry.as(ConfigurationExtensions.Configuration); @@ -126,7 +128,7 @@ suite('ConfigurationEditingService', () => { instantiationService.stub(ITextFileService, instantiationService.createInstance(TestTextFileService)); instantiationService.stub(ITextModelResolverService, instantiationService.createInstance(TextModelResolverService)); instantiationService.stub(IBackupFileService, new TestBackupFileService()); - instantiationService.stub(IChoiceService, { + choiceService = instantiationService.stub(IChoiceService, { choose: (severity, message, options, cancelId): TPromise => { return TPromise.as(cancelId); } @@ -197,6 +199,24 @@ suite('ConfigurationEditingService', () => { (error: IConfigurationEditingError) => assert.equal(error.code, ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_DIRTY)); }); + test('dirty error is not thrown if not asked to save', () => { + instantiationService.stub(ITextFileService, 'isDirty', true); + return testObject.writeConfiguration(ConfigurationTarget.USER, { key: 'configurationEditing.service.testSetting', value: 'value' }, { donotSave: true }) + .then(() => null, error => assert.fail('Should not fail.')); + }); + + test('do not notify error', () => { + instantiationService.stub(ITextFileService, 'isDirty', true); + const target = sinon.stub(); + instantiationService.stubPromise(IChoiceService, 'choose', target); + return testObject.writeConfiguration(ConfigurationTarget.USER, { key: 'configurationEditing.service.testSetting', value: 'value' }, { donotNotifyError: true }) + .then(() => assert.fail('Should fail with ERROR_CONFIGURATION_FILE_DIRTY error.'), + (error: IConfigurationEditingError) => { + assert.equal(false, target.calledOnce); + assert.equal(error.code, ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_DIRTY); + }); + }); + test('write one setting - empty file', () => { return testObject.writeConfiguration(ConfigurationTarget.USER, { key: 'configurationEditing.service.testSetting', value: 'value' }) .then(() => { From 31d232e9bb68c47b0f36bfa2211d09e6e68d7a49 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 15 May 2017 16:33:06 +0200 Subject: [PATCH 0535/2747] Fix #26576 --- .../workbench/parts/preferences/browser/media/preferences.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/parts/preferences/browser/media/preferences.css b/src/vs/workbench/parts/preferences/browser/media/preferences.css index 5913b98e6a81f..d590de6d74f5d 100644 --- a/src/vs/workbench/parts/preferences/browser/media/preferences.css +++ b/src/vs/workbench/parts/preferences/browser/media/preferences.css @@ -23,6 +23,10 @@ border-bottom: 1px solid #2d2d2d; } +.preferences-editor > .preferences-editors-container.side-by-side-preferences-editor { + position: relative; +} + .settings-tabs-widget { display: flex; flex-wrap: wrap; From 136f6a9630fec93111e3c7e75d3c6b76bd1f085c Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 15 May 2017 16:50:27 +0200 Subject: [PATCH 0536/2747] tfs: fix linux build --- build/tfs/linux/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/tfs/linux/build.sh b/build/tfs/linux/build.sh index 28a34d6227b6c..92d12beeb34e4 100755 --- a/build/tfs/linux/build.sh +++ b/build/tfs/linux/build.sh @@ -69,17 +69,17 @@ tar -czvf $TARBALL_PATH $BUILDNAME popd STEP "Publish tar.gz archive" -node build/tfs/out/publish.js $VSCODE_QUALITY $PLATFORM_LINUX archive-unsigned $TARBALL_FILENAME $VERSION true $TARBALL_PATH +node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_LINUX archive-unsigned $TARBALL_FILENAME $VERSION true $TARBALL_PATH STEP "Publish Debian package" DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)" DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME" -node build/tfs/out/publish.js $VSCODE_QUALITY $PLATFORM_DEB package $DEB_FILENAME $VERSION true $DEB_PATH +node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_DEB package $DEB_FILENAME $VERSION true $DEB_PATH STEP "Publish RPM package" RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)" RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME" -node build/tfs/out/publish.js $VSCODE_QUALITY $PLATFORM_RPM package $RPM_FILENAME $VERSION true $RPM_PATH +node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_RPM package $RPM_FILENAME $VERSION true $RPM_PATH STEP "Publish to repositories" if [ -z "$VSCODE_QUALITY" ]; then From 38446892b25a601fa2403fb8fae7e9eed8b4e0db Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 15 May 2017 17:20:01 +0200 Subject: [PATCH 0537/2747] tfs: add linux ia32 --- build/tfs/linux/build-ia32.sh | 3 +++ build/tfs/linux/build-x64.sh | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100755 build/tfs/linux/build-ia32.sh diff --git a/build/tfs/linux/build-ia32.sh b/build/tfs/linux/build-ia32.sh new file mode 100755 index 0000000000000..0b0f1c2a45800 --- /dev/null +++ b/build/tfs/linux/build-ia32.sh @@ -0,0 +1,3 @@ +#!/bin/bash +set -e +./build/tfs/linux/build.sh ia32 "$@" \ No newline at end of file diff --git a/build/tfs/linux/build-x64.sh b/build/tfs/linux/build-x64.sh index 43eb1ad7be4b6..fb5b38e02b3b6 100755 --- a/build/tfs/linux/build-x64.sh +++ b/build/tfs/linux/build-x64.sh @@ -1,4 +1,3 @@ #!/bin/bash set -e -DIRNAME=$(dirname $(readlink -f $0)) -$DIRNAME/build.sh x64 "$@" \ No newline at end of file +./build/tfs/linux/build.sh x64 "$@" \ No newline at end of file From ec819e0b914e7d919f908d719be53a4fa97c62e1 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 15 May 2017 17:37:44 +0200 Subject: [PATCH 0538/2747] fix linux build --- build/tfs/linux/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build/tfs/linux/Dockerfile b/build/tfs/linux/Dockerfile index 811a15ddedd9a..a19afcc5fc815 100644 --- a/build/tfs/linux/Dockerfile +++ b/build/tfs/linux/Dockerfile @@ -4,8 +4,7 @@ MAINTAINER Joao Moreno RUN dpkg --add-architecture i386 RUN apt-get update RUN apt-get install -y build-essential -RUN apt-get install -y gcc-4.9-multilib -RUN apt-get install -y g++-4.9-multilib +RUN apt-get install -y gcc-multilib g++-multilib RUN apt-get install -y zip RUN apt-get install -y rpm RUN apt-get install -y createrepo From ccb75cd5084a1112b7ece9167a689602a68a6d31 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 15 May 2017 17:16:32 +0200 Subject: [PATCH 0539/2747] :lipstick: --- src/vs/base/common/arrays.ts | 14 ++++++++++ .../contrib/snippet/browser/snippetSession.ts | 26 ++++++------------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/vs/base/common/arrays.ts b/src/vs/base/common/arrays.ts index e23dde3c9ac92..d2a168900c90f 100644 --- a/src/vs/base/common/arrays.ts +++ b/src/vs/base/common/arrays.ts @@ -66,6 +66,20 @@ export function findFirst(array: T[], p: (x: T) => boolean): number { return low; } +export function groupBy(data: T[], compare: (a: T, b: T) => number): T[][] { + const result: T[][] = []; + let currentGroup: T[]; + for (const element of data.slice(0).sort(compare)) { + if (!currentGroup || compare(currentGroup[0], element) !== 0) { + currentGroup = [element]; + result.push(currentGroup); + } else { + currentGroup.push(element); + } + } + return result; +} + /** * Takes two *sorted* arrays and computes their delta (removed, added elements). * Finishes in `Math.min(before.length, after.length)` steps. diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index 726ceadb12efe..0a7859a4bcc71 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -12,6 +12,7 @@ import { TextmateSnippet, Placeholder, SnippetParser } from '../common/snippetPa import { Selection } from 'vs/editor/common/core/selection'; import { Range } from 'vs/editor/common/core/range'; import { IPosition } from 'vs/editor/common/core/position'; +import { groupBy } from 'vs/base/common/arrays'; import { dispose } from 'vs/base/common/lifecycle'; import { EditorSnippetVariableResolver } from "vs/editor/contrib/snippet/common/snippetVariables"; @@ -36,17 +37,19 @@ export class OneSnippet { this._editor = editor; this._snippet = snippet; this._offset = offset; + + this._placeholderGroups = groupBy(snippet.placeholders, Placeholder.compareByIndex); + this._placeholderGroupsIdx = -1; } dispose(): void { - if (!this._placeholderDecorations) { - return; + if (this._placeholderDecorations) { + this._editor.changeDecorations(accessor => this._placeholderDecorations.forEach(handle => accessor.removeDecoration(handle))); } - this._editor.changeDecorations(accessor => this._placeholderDecorations.forEach(handle => accessor.removeDecoration(handle))); this._placeholderGroups.length = 0; } - private _init(): void { + private _initDecorations(): void { if (this._placeholderDecorations) { // already initialized @@ -57,7 +60,6 @@ export class OneSnippet { const model = this._editor.getModel(); this._editor.changeDecorations(accessor => { - // create a decoration for each placeholder for (const placeholder of this._snippet.placeholders) { const placeholderOffset = this._snippet.offset(placeholder); @@ -71,23 +73,11 @@ export class OneSnippet { this._placeholderDecorations.set(placeholder, handle); } }); - - this._placeholderGroupsIdx = -1; - this._placeholderGroups = []; - let lastBucket: Placeholder[]; - this._snippet.placeholders.slice(0).sort(Placeholder.compareByIndex).forEach(a => { - if (!lastBucket || lastBucket[0].index !== a.index) { - lastBucket = [a]; - this._placeholderGroups.push(lastBucket); - } else { - lastBucket.push(a); - } - }); } move(fwd: boolean): Selection[] { - this._init(); + this._initDecorations(); if (fwd && this._placeholderGroupsIdx < this._placeholderGroups.length - 1) { this._placeholderGroupsIdx += 1; From ba9df688788f7d111dd7a3e6119298be5bf39d0a Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 15 May 2017 21:44:18 +0200 Subject: [PATCH 0540/2747] Allow theming of parameter hints #26671 --- .../parameterHints/browser/parameterHints.css | 31 +------------------ .../browser/parameterHintsWidget.ts | 19 +++++++++++- .../contrib/suggest/browser/suggestWidget.ts | 4 +-- src/vs/platform/theme/common/colorRegistry.ts | 17 +++++----- 4 files changed, 30 insertions(+), 41 deletions(-) diff --git a/src/vs/editor/contrib/parameterHints/browser/parameterHints.css b/src/vs/editor/contrib/parameterHints/browser/parameterHints.css index d6a1ffafeb749..abb195c2d0b16 100644 --- a/src/vs/editor/contrib/parameterHints/browser/parameterHints.css +++ b/src/vs/editor/contrib/parameterHints/browser/parameterHints.css @@ -5,8 +5,6 @@ .monaco-editor .parameter-hints-widget { z-index: 10; - background-color: #F3F3F3; - border: 1px solid rgb(200, 200, 200); display: flex; flex-direction: column; line-height: 1.5em; @@ -41,18 +39,10 @@ flex-direction: column; } -.monaco-editor .parameter-hints-widget.multiple .body { - border-left: 1px solid rgba(204, 204, 204, 0.5); -} - .monaco-editor .parameter-hints-widget .signature { padding: 4px 5px; } -.monaco-editor .parameter-hints-widget .signature.has-docs { - border-bottom: 1px solid rgba(204, 204, 204, 0.5); -} - .monaco-editor .parameter-hints-widget .docs { padding: 0 10px 0 5px; white-space: pre-wrap; @@ -118,19 +108,7 @@ margin-right: 0.5em; } -/*** VS Dark */ - -.monaco-editor.vs-dark .parameter-hints-widget { - background-color: #2D2D30; - border-color: rgba(85,85,85,0.5); -} - -.monaco-editor.hc-black .parameter-hints-widget .body, -.monaco-editor.vs-dark .parameter-hints-widget .body, -.monaco-editor.hc-black .parameter-hints-widget .signature, -.monaco-editor.vs-dark .parameter-hints-widget .signature { - border-color: rgba(85,85,85,0.5); -} +/*** VS Dark & High Contrast*/ .monaco-editor.hc-black .parameter-hints-widget .button.previous, .monaco-editor.vs-dark .parameter-hints-widget .button.previous { @@ -140,11 +118,4 @@ .monaco-editor.hc-black .parameter-hints-widget .button.next, .monaco-editor.vs-dark .parameter-hints-widget .button.next { background-image: url('arrow-down-dark.svg'); -} - -/*** High Contrast */ - -.monaco-editor.hc-black .parameter-hints-widget { - background-color: #0C141F; - border: 2px solid #6FC3DF; } \ No newline at end of file diff --git a/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts b/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts index fd8a795287065..a9fec25edf6c1 100644 --- a/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts +++ b/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts @@ -24,6 +24,8 @@ import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableEle import { CharacterSet } from 'vs/editor/common/core/characterClassifier'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; import { ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; +import { registerThemingParticipant, HIGH_CONTRAST } from 'vs/platform/theme/common/themeService'; +import { editorHoverBackground, editorHoverBorder } from 'vs/platform/theme/common/colorRegistry'; const $ = dom.$; @@ -471,4 +473,19 @@ export class ParameterHintsWidget implements IContentWidget, IDisposable { this.disposables = dispose(this.disposables); this.model = null; } -} \ No newline at end of file +} + +registerThemingParticipant((theme, collector) => { + let border = theme.getColor(editorHoverBorder); + if (border) { + let borderWidth = theme.type === HIGH_CONTRAST ? 2 : 1; + collector.addRule(`.monaco-editor .parameter-hints-widget { border: ${borderWidth}px solid ${border}; }`); + collector.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${border.transparent(0.5)}; }`); + collector.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${border.transparent(0.5)}; }`); + + } + let background = theme.getColor(editorHoverBackground); + if (background) { + collector.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${background}; }`); + } +}); \ No newline at end of file diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index f157853bbdf76..c472a24e5c6e9 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -29,7 +29,7 @@ import { alert } from 'vs/base/browser/ui/aria/aria'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IThemeService, ITheme, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { registerColor, editorWidgetBackground, contrastBorder, listFocusBackground, activeContrastBorder, listHighlightForeground, editorForeground } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, editorWidgetBackground, listFocusBackground, activeContrastBorder, listHighlightForeground, editorForeground, editorWidgetBorder } from 'vs/platform/theme/common/colorRegistry'; import { Position } from 'vs/editor/common/core/position'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; @@ -47,7 +47,7 @@ interface ISuggestionTemplateData { * Suggest widget colors */ export const editorSuggestWidgetBackground = registerColor('editorSuggestWidget.background', { dark: editorWidgetBackground, light: editorWidgetBackground, hc: editorWidgetBackground }, nls.localize('editorSuggestWidgetBackground', 'Background color of the suggest widget.')); -export const editorSuggestWidgetBorder = registerColor('editorSuggestWidget.border', { dark: '#454545', light: '#C8C8C8', hc: contrastBorder }, nls.localize('editorSuggestWidgetBorder', 'Border color of the suggest widget.')); +export const editorSuggestWidgetBorder = registerColor('editorSuggestWidget.border', { dark: editorWidgetBorder, light: editorWidgetBorder, hc: editorWidgetBorder }, nls.localize('editorSuggestWidgetBorder', 'Border color of the suggest widget.')); export const editorSuggestWidgetForeground = registerColor('editorSuggestWidget.foreground', { dark: editorForeground, light: editorForeground, hc: editorForeground }, nls.localize('editorSuggestWidgetForeground', 'Foreground color of the suggest widget.')); export const editorSuggestWidgetSelectedBackground = registerColor('editorSuggestWidget.selectedBackground', { dark: listFocusBackground, light: listFocusBackground, hc: listFocusBackground }, nls.localize('editorSuggestWidgetSelectedBackground', 'Background color of the selected entry in the suggest widget.')); export const editorSuggestWidgetHighlightForeground = registerColor('editorSuggestWidget.highlightForeground', { dark: listHighlightForeground, light: listHighlightForeground, hc: listHighlightForeground }, nls.localize('editorSuggestWidgetHighlightForeground', 'Color of the match highlights in the suggest widget.')); diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 5c2a75960e229..23f915d5a7eaf 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -210,6 +210,13 @@ export const editorBackground = registerColor('editor.background', { light: '#ff */ export const editorForeground = registerColor('editor.foreground', { light: '#333333', dark: '#BBBBBB', hc: Color.white }, nls.localize('editorForeground', "Editor default foreground color.")); +/** + * Editor widgets + */ +export const editorWidgetBackground = registerColor('editorWidget.background', { dark: '#2D2D30', light: '#EFEFF2', hc: '#0C141F' }, nls.localize('editorWidgetBackground', 'Background color of editor widgets, such as find/replace.')); +export const editorWidgetBorder = registerColor('editorWidget.border', { dark: '#454545', light: '#C8C8C8', hc: contrastBorder }, nls.localize('editorWidgetBorder', 'Border color of the editor widget.')); + + /** * Editor selection colors. */ @@ -228,20 +235,14 @@ export const editorFindRangeHighlight = registerColor('editor.findRangeHighlight * Editor hover */ export const editorHoverHighlight = registerColor('editor.hoverHighlightBackground', { light: '#ADD6FF26', dark: '#264f7840', hc: '#ADD6FF26' }, nls.localize('hoverHighlight', 'Highlight below the word for which a hover is shown.')); -export const editorHoverBackground = registerColor('editorHoverWidget.background', { light: '#F3F3F3', dark: '#2D2D30', hc: '#0C141F' }, nls.localize('hoverBackground', 'Background color of the editor hover.')); -export const editorHoverBorder = registerColor('editorHoverWidget.border', { light: '#CCCCCC', dark: '#555555', hc: '#CCCCCC' }, nls.localize('hoverBorder', 'Border color of the editor hover.')); +export const editorHoverBackground = registerColor('editorHoverWidget.background', { light: editorWidgetBackground, dark: editorWidgetBackground, hc: editorWidgetBackground }, nls.localize('hoverBackground', 'Background color of the editor hover.')); +export const editorHoverBorder = registerColor('editorHoverWidget.border', { light: editorWidgetBorder, dark: editorWidgetBorder, hc: editorWidgetBorder }, nls.localize('hoverBorder', 'Border color of the editor hover.')); /** * Editor link colors */ export const editorActiveLinkForeground = registerColor('editorLink.activeForeground', { dark: '#4E94CE', light: Color.blue, hc: Color.cyan }, nls.localize('activeLinkForeground', 'Color of active links.')); -/** - * Find widget - */ -export const editorWidgetBackground = registerColor('editorWidget.background', { dark: '#2D2D30', light: '#EFEFF2', hc: '#0C141F' }, nls.localize('editorWidgetBackground', 'Background color of editor widgets, such as find/replace.')); - - // ----- color functions export function darken(colorValue: ColorValue, factor: number): ColorFunction { From dd41aedbc3230dd6de2d265102eccaed4c5bcb3d Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 15 May 2017 21:48:50 +0200 Subject: [PATCH 0541/2747] Fix duplicated import in preferenceEditor --- src/vs/workbench/parts/preferences/browser/preferencesEditor.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts index da757c92cf5e5..0aae0f5f0ff48 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts @@ -53,7 +53,6 @@ import { FindController } from 'vs/editor/contrib/find/browser/find'; import { SelectionHighlighter } from 'vs/editor/contrib/find/common/findController'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; -import { IThemeService } from "vs/platform/theme/common/themeService"; import { attachStylerCallback } from "vs/platform/theme/common/styler"; import { scrollbarShadow } from "vs/platform/theme/common/colorRegistry"; From 4ceb904f3301378271790ac982161b879f8551ba Mon Sep 17 00:00:00 2001 From: Fernando Tolentino Date: Mon, 15 May 2017 16:54:29 -0300 Subject: [PATCH 0542/2747] exclude vscode-markdown and already entered extensions --- extensions/configuration-editing/src/extension.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/extensions/configuration-editing/src/extension.ts b/extensions/configuration-editing/src/extension.ts index f41e74fc7356d..78b855feb8161 100644 --- a/extensions/configuration-editing/src/extension.ts +++ b/extensions/configuration-editing/src/extension.ts @@ -70,10 +70,17 @@ function registerExtensionsCompletions(): vscode.Disposable { const location = getLocation(document.getText(), document.offsetAt(position)); const range = document.getWordRangeAtPosition(position) || new vscode.Range(position, position); if (location.path[0] === 'recommendations') { + const config = vscode.workspace && vscode.workspace.getConfiguration('extensions.json'); + const alreadyEnteredExtensions = config.get('recommendations') || []; return vscode.extensions.all - .filter(e => !e.id.startsWith('vscode.')) + .filter(e => !( + e.id.startsWith('vscode.') + || e.id === 'Microsoft.vscode-markdown' + || alreadyEnteredExtensions.indexOf(e.id) > -1 + )) .map(e => newSimpleCompletionItem(e.id, range, undefined, '"' + e.id + '"')); } + return []; } }); } From 752ff222909d7bbba472e5f915c85403d622283b Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 15 May 2017 22:06:12 +0200 Subject: [PATCH 0543/2747] [theme] style 'inspect tm scopes' (for #23506) --- .../electron-browser/inspectTMScopes.css | 11 +++++----- .../electron-browser/inspectTMScopes.ts | 21 ++++++++++++++++--- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.css b/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.css index 6f02755f59745..0c4905290d27e 100644 --- a/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.css +++ b/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.css @@ -4,8 +4,6 @@ *--------------------------------------------------------------------------------------------*/ .tm-inspect-widget { - background-color: #F3F3F3; - border: 1px solid #CCC; z-index: 50; -webkit-user-select: text; -ms-user-select: text; @@ -16,14 +14,15 @@ padding: 10px; } -.monaco-editor.vs-dark .tm-inspect-widget { background-color: #2D2D30; border-color: #555; } - -.monaco-editor.hc-black .tm-inspect-widget { background-color: #0C141F; } - .tm-token { font-family: monospace; } +.tm-metadata-separator { + height: 1px; + border: 0; +} + .tm-token-length { font-weight: normal; font-size: 60%; diff --git a/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts b/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts index f8bfa8c6447f8..b0792b493ef56 100644 --- a/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts +++ b/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts @@ -26,6 +26,8 @@ import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/work import { Color } from 'vs/base/common/color'; import { IMessageService } from 'vs/platform/message/common/message'; import Severity from 'vs/base/common/severity'; +import { registerThemingParticipant, HIGH_CONTRAST } from 'vs/platform/theme/common/themeService'; +import { editorHoverBackground, editorHoverBorder } from 'vs/platform/theme/common/colorRegistry'; @editorContribution class InspectTMScopesController extends Disposable implements IEditorContribution { @@ -251,7 +253,7 @@ class InspectTMScopesWidget extends Disposable implements IContentWidget { let tokenText = this._model.getLineContent(position.lineNumber).substring(tokenStartIndex, tokenEndIndex); result += `

${renderTokenText(tokenText)}(${tokenText.length} ${tokenText.length === 1 ? 'char' : 'chars'})

`; - result += `
`; + result += ``; let metadata = this._decodeMetadata(data.tokens2[(token2Index << 1) + 1]); result += ``; @@ -263,7 +265,7 @@ class InspectTMScopesWidget extends Disposable implements IContentWidget { result += ``; let theme = this._themeService.getColorTheme(); - result += `
`; + result += ``; let matchingRule = findMatchingThemeRule(theme, data.tokens1[token1Index].scopes); if (matchingRule) { result += `${matchingRule.rawSelector}\n${JSON.stringify(matchingRule.settings, null, '\t')}`; @@ -271,7 +273,7 @@ class InspectTMScopesWidget extends Disposable implements IContentWidget { result += `No theme selector.`; } - result += `
`; + result += ``; result += `
diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css index d9606cb815d8a..4c76f3ef4c2e7 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css @@ -301,16 +301,3 @@ .monaco-workbench.linux > .part.editor > .content .welcomePage li.linux-only { display: list-item; } - -.monaco-workbench > .part.editor > .content .welcomePageContainer .scm-only { - display: none; -} -.monaco-workbench > .part.editor > .content .welcomePageContainer.scmEnabled .scm-only { - display: initial; -} -.monaco-workbench > .part.editor > .content .welcomePageContainer.scmEnabled li.scm-only { - display: list-item; -} -.monaco-workbench > .part.editor > .content .welcomePageContainer.scmEnabled .git-only { - display: none; -} \ No newline at end of file diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/vs_code_editor_walkthrough.md b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/vs_code_editor_walkthrough.md index b311703b479e9..6dedb7d9978b7 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/vs_code_editor_walkthrough.md +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/vs_code_editor_walkthrough.md @@ -157,7 +157,7 @@ ul>li.item$*5 ## Thanks! Well if you have got this far then you will have touched on some of the editing features in Visual Studio Code. But don't stop now :) We have lots of additional [documentation](https://code.visualstudio.com/docs) and [introductory videos](https://code.visualstudio.com/docs/getstarted/introvideos) for the product that will help you learn how to use it. And while you are here, here are a few additional things you can try: - Open the Integrated Terminal by pressing kb(workbench.action.terminal.toggleTerminal) then see what's possible by [reviewing the terminal documentation](https://code.visualstudio.com/docs/editor/integrated-terminal) -- Work with version control by pressing kb(workbench.view.git)kb(workbench.view.scm) understand how to stage, commit, change branches, and view diffs and more by reviewing the [version control documentation](https://code.visualstudio.com/docs/editor/versioncontrol) +- Work with version control by pressing kb(workbench.view.scm) understand how to stage, commit, change branches, and view diffs and more by reviewing the [version control documentation](https://code.visualstudio.com/docs/editor/versioncontrol) - Browse thousands of extensions in our integrated gallery by pressing with kb(workbench.view.extensions) the [documentation](https://code.visualstudio.com/docs/editor/extension-gallery) will show you how to see the most popular extensions, disable installed ones and more. OK that's all for now, diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.css b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.css index 176d0ae0e05ce..a10262088f162 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.css +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.css @@ -161,16 +161,6 @@ display: initial; } -.monaco-workbench > .part.editor > .content .walkThroughContent .scm-only { - display: none; -} -.monaco-workbench > .part.editor > .content .walkThroughContent.scmEnabled .scm-only { - display: initial; -} -.monaco-workbench > .part.editor > .content .walkThroughContent.scmEnabled .git-only { - display: none; -} - .vs .monaco-workbench > .part.editor > .content .walkThroughContent .monaco-editor-background, .vs .monaco-workbench > .part.editor > .content .walkThroughContent .glyph-margin { background:rgba(0,0,0,.08); diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 14de89be99c86..1c94c56a9ec91 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -329,7 +329,6 @@ export class WalkThroughPart extends BaseEditor { if (!strings.endsWith(input.getResource().path, '.md')) { this.content.innerHTML = content; this.updateSizeClasses(); - this.updateMarkerClasses(); this.addThemeListener(); this.decorateContent(); if (input.onReady) { @@ -430,7 +429,6 @@ export class WalkThroughPart extends BaseEditor { })); }); this.updateSizeClasses(); - this.updateMarkerClasses(); this.addThemeListener(); if (input.onReady) { input.onReady(innerContent); @@ -460,15 +458,6 @@ export class WalkThroughPart extends BaseEditor { }; } - private updateMarkerClasses() { - const innerContent = this.content.firstElementChild; - - // TODO@christof - if (true && innerContent) { - innerContent.classList.add('scmEnabled'); - } - } - private addThemeListener() { const innerContent = this.content.firstElementChild as HTMLElement; this.contentDisposables.push(new WalkThroughTheming(this.themeService, innerContent)); From 8ac7e555d1790267bf58e1922fc2f737a4d1c1ab Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 16 May 2017 17:46:53 +0200 Subject: [PATCH 0577/2747] use stableSort in code-lens --- src/vs/base/common/arrays.ts | 27 +++++++++++++++++++ src/vs/base/test/common/arrays.test.ts | 13 +++++++++ .../contrib/codelens/common/codelens.ts | 4 ++- 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/src/vs/base/common/arrays.ts b/src/vs/base/common/arrays.ts index d2a168900c90f..ce2d4100429eb 100644 --- a/src/vs/base/common/arrays.ts +++ b/src/vs/base/common/arrays.ts @@ -66,6 +66,33 @@ export function findFirst(array: T[], p: (x: T) => boolean): number { return low; } +/** + * Like `Array#sort` but always stable. Comes at a cost: iterates 2n-times, + * creates n-objects in addition to sorting (log(n)) + */ +export function stableSort(data: T[], compare: (a: T, b: T) => number): T[] { + + let data2: { idx: number; e: T }[] = data; + + for (let idx = 0; idx < data2.length; idx++) { + data2[idx] = { idx, e: data[idx] }; + } + + data2.sort((a, b) => { + let ret = compare(a.e, b.e); + if (ret === 0) { + ret = a.idx - b.idx; + } + return ret; + }); + + for (let idx = 0; idx < data2.length; idx++) { + data[idx] = data2[idx].e; + } + + return data; +} + export function groupBy(data: T[], compare: (a: T, b: T) => number): T[][] { const result: T[][] = []; let currentGroup: T[]; diff --git a/src/vs/base/test/common/arrays.test.ts b/src/vs/base/test/common/arrays.test.ts index 95b7108f98842..5037261bc73b3 100644 --- a/src/vs/base/test/common/arrays.test.ts +++ b/src/vs/base/test/common/arrays.test.ts @@ -33,6 +33,19 @@ suite('Arrays', () => { assert.equal(array[idx], 1); }); + test('stableSort', function () { + let counter = 0; + let data = arrays.fill(10000, () => ({ n: 1, m: counter++ })); + + arrays.stableSort(data, (a, b) => a.n - b.n); + + let lastM = -1; + for (const element of data) { + assert.ok(lastM < element.m); + lastM = element.m; + } + }); + test('delta', function () { function compare(a: number, b: number): number { return a - b; diff --git a/src/vs/editor/contrib/codelens/common/codelens.ts b/src/vs/editor/contrib/codelens/common/codelens.ts index 864b3f2a25eb2..28424195ae2b7 100644 --- a/src/vs/editor/contrib/codelens/common/codelens.ts +++ b/src/vs/editor/contrib/codelens/common/codelens.ts @@ -6,6 +6,7 @@ 'use strict'; import { illegalArgument, onUnexpectedExternalError } from 'vs/base/common/errors'; +import { stableSort } from 'vs/base/common/arrays'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; import { IModel } from 'vs/editor/common/editorCommon'; @@ -33,7 +34,8 @@ export function getCodeLensData(model: IModel): TPromise { }, onUnexpectedExternalError)); return TPromise.join(promises).then(() => { - return symbols.sort((a, b) => { + + return stableSort(symbols, (a, b) => { // sort by lineNumber, provider-rank, and column if (a.symbol.range.startLineNumber < b.symbol.range.startLineNumber) { return -1; From 6bddd906b09a329fb42e5e7397a676d3dc422c2b Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 16 May 2017 17:47:05 +0200 Subject: [PATCH 0578/2747] adopt stableSort for ext host diagnostics --- .../workbench/api/node/extHostDiagnostics.ts | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/vs/workbench/api/node/extHostDiagnostics.ts b/src/vs/workbench/api/node/extHostDiagnostics.ts index f7d240175d30b..7b720e5eec143 100644 --- a/src/vs/workbench/api/node/extHostDiagnostics.ts +++ b/src/vs/workbench/api/node/extHostDiagnostics.ts @@ -12,6 +12,7 @@ import Severity from 'vs/base/common/severity'; import * as vscode from 'vscode'; import { MainContext, MainThreadDiagnosticsShape, ExtHostDiagnosticsShape } from './extHost.protocol'; import { DiagnosticSeverity } from './extHostTypes'; +import { stableSort } from 'vs/base/common/arrays'; export class DiagnosticCollection implements vscode.DiagnosticCollection { @@ -74,13 +75,10 @@ export class DiagnosticCollection implements vscode.DiagnosticCollection { toSync = []; let lastUri: vscode.Uri; - // ensure stable-sort: keep the original - // index for otherwise equal items - const sortedTuples = first - .map((tuple, idx) => ({ tuple, idx })) - .sort(DiagnosticCollection._compareIndexedTuplesByUri); + // ensure stable-sort + stableSort(first, DiagnosticCollection._compareIndexedTuplesByUri); - for (const { tuple } of sortedTuples) { + for (const tuple of first) { const [uri, diagnostics] = tuple; if (!lastUri || uri.toString() !== lastUri.toString()) { if (lastUri && this._data.get(lastUri.toString()).length === 0) { @@ -208,14 +206,10 @@ export class DiagnosticCollection implements vscode.DiagnosticCollection { } } - private static _compareIndexedTuplesByUri(a: { tuple: [vscode.Uri, vscode.Diagnostic[]]; idx: number }, b: { tuple: [vscode.Uri, vscode.Diagnostic[]]; idx: number }): number { - if (a.tuple[0].toString() < b.tuple[0].toString()) { + private static _compareIndexedTuplesByUri(a: [vscode.Uri, vscode.Diagnostic[]], b: [vscode.Uri, vscode.Diagnostic[]]): number { + if (a[0].toString() < b[0].toString()) { return -1; - } else if (a.tuple[0].toString() > b.tuple[0].toString()) { - return 1; - } else if (a.idx < b.idx) { - return -1; - } else if (a.idx > b.idx) { + } else if (a[0].toString() > b[0].toString()) { return 1; } else { return 0; From c71091755c7cd4ba557dacd1e6dd42c55dc41642 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 16 May 2017 18:12:27 +0200 Subject: [PATCH 0579/2747] dynamically fetch product dependencies --- build/gulpfile.vscode.js | 12 +++++++----- build/tfs/common/installDistro.ts | 25 +++++++++++++++++++++++++ build/tfs/darwin/build.sh | 10 ++++++++++ build/tfs/linux/build.sh | 10 ++++++++++ build/tfs/win32/1_build.ps1 | 15 ++++++++++++++- package.json | 5 +++-- src/vs/platform/node/product.ts | 1 - 7 files changed, 69 insertions(+), 9 deletions(-) create mode 100644 build/tfs/common/installDistro.ts diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index e65f51d5c6a45..b000df8c87afe 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -31,8 +31,9 @@ const shrinkwrap = require('../npm-shrinkwrap.json'); const crypto = require('crypto'); const i18n = require('./lib/i18n'); +const productDependencies = Object.keys(product.dependencies || {}); const dependencies = Object.keys(shrinkwrap.dependencies) - .concat(Array.isArray(product.extraNodeModules) ? product.extraNodeModules : []); // additional dependencies from our product configuration + .concat(productDependencies); // additional dependencies from our product configuration const baseModules = Object.keys(process.binding('natives')).filter(n => !/^_|\//.test(n)); const nodeModules = ['electron', 'original-fs'] .concat(dependencies) @@ -273,7 +274,8 @@ function packageTask(platform, arch, opts) { .pipe(util.cleanNodeModule('windows-foreground-love', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node'])) .pipe(util.cleanNodeModule('gc-signals', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/index.js'])) .pipe(util.cleanNodeModule('v8-profiler', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/index.js'])) - .pipe(util.cleanNodeModule('node-pty', ['binding.gyp', 'build/**', 'src/**', 'tools/**'], ['build/Release/**'])); + .pipe(util.cleanNodeModule('node-pty', ['binding.gyp', 'build/**', 'src/**', 'tools/**'], ['build/Release/**'])) + .pipe(util.cleanNodeModule('vsda', ['**'], ['package.json', 'index.js', '**/*.node'])); let all = es.merge( packageJsonStream, @@ -363,7 +365,7 @@ const apiHostname = process.env.TRANSIFEX_API_URL; const apiName = process.env.TRANSIFEX_API_NAME; const apiToken = process.env.TRANSIFEX_API_TOKEN; -gulp.task('vscode-translations-push', ['optimize-vscode'], function() { +gulp.task('vscode-translations-push', ['optimize-vscode'], function () { const pathToMetadata = './out-vscode/nls.metadata.json'; const pathToExtensions = './extensions/**/*.nls.json'; const pathToSetup = 'build/win32/**/{Default.isl,messages.en.isl}'; @@ -375,7 +377,7 @@ gulp.task('vscode-translations-push', ['optimize-vscode'], function() { ).pipe(i18n.pushXlfFiles(apiHostname, apiName, apiToken)); }); -gulp.task('vscode-translations-pull', function() { +gulp.task('vscode-translations-pull', function () { return es.merge( i18n.pullXlfFiles('vscode-editor', apiHostname, apiName, apiToken, vscodeLanguages), i18n.pullXlfFiles('vscode-workbench', apiHostname, apiName, apiToken, vscodeLanguages), @@ -384,7 +386,7 @@ gulp.task('vscode-translations-pull', function() { ).pipe(vfs.dest('../vscode-localization')); }); -gulp.task('vscode-translations-import', function() { +gulp.task('vscode-translations-import', function () { return gulp.src('../vscode-localization/**/*.xlf').pipe(i18n.prepareJsonFiles()).pipe(vfs.dest('./i18n')); }); diff --git a/build/tfs/common/installDistro.ts b/build/tfs/common/installDistro.ts new file mode 100644 index 0000000000000..fddc7b88a0929 --- /dev/null +++ b/build/tfs/common/installDistro.ts @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +const cp = require('child_process'); +const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; + +function npmInstall(package: string): void { + const result = cp.spawnSync(npm, ['install', package], { + stdio: 'inherit' + }); + + if (result.error || result.status !== 0) { + process.exit(1); + } +} + +const product = require('../../../product.json'); +const dependencies = product.dependencies || {} as { [name: string]: string; }; + +Object.keys(dependencies).forEach(name => { + const url = dependencies[name]; + npmInstall(url); +}); \ No newline at end of file diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index c71342fd42c29..7236231655d26 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -6,6 +6,13 @@ export AZURE_STORAGE_ACCESS_KEY="$2" export AZURE_STORAGE_ACCESS_KEY_2="$3" export MOONCAKE_STORAGE_ACCESS_KEY="$4" export AZURE_DOCUMENTDB_MASTERKEY="$5" +VSO_PAT="$6" + +# Create a .netrc file to download distro dependencies +cat > ~/.netrc < ~/.netrc < Date: Tue, 16 May 2017 18:18:26 +0200 Subject: [PATCH 0580/2747] tfs: fix windows build --- build/tfs/win32/1_build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index d78e1e7131bc0..1f120965a1746 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -12,7 +12,7 @@ $env:HOME=$env:USERPROFILE @" machine monacotools.visualstudio.com password ${vsoPAT} -"@ | Out-File ~/_netrc -Encoding ASCII +"@ | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII STEP "Install dependencies" exec { & .\scripts\npm.bat install } From 46d7ea756c1706e5d1056799063df937276c4be9 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 16 May 2017 18:24:38 +0200 Subject: [PATCH 0581/2747] Fix a couple of issues --- src/vs/base/browser/fastDomNode.ts | 2 +- src/vs/editor/browser/config/configuration.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/base/browser/fastDomNode.ts b/src/vs/base/browser/fastDomNode.ts index ce9561984d4ee..ee1dd6cd58f40 100644 --- a/src/vs/base/browser/fastDomNode.ts +++ b/src/vs/base/browser/fastDomNode.ts @@ -40,7 +40,7 @@ export abstract class FastDomNode { this._fontWeight = ''; this._fontSize = -1; this._lineHeight = -1; - this._letterSpacing = -1; + this._letterSpacing = -100; this._className = ''; this._display = ''; this._position = ''; diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts index c5d2edb1a93e3..73a05a745c1ec 100644 --- a/src/vs/editor/browser/config/configuration.ts +++ b/src/vs/editor/browser/config/configuration.ts @@ -285,6 +285,7 @@ export class Configuration extends CommonEditorConfiguration { domNode.style.fontWeight = fontInfo.fontWeight; domNode.style.fontSize = fontInfo.fontSize + 'px'; domNode.style.lineHeight = fontInfo.lineHeight + 'px'; + domNode.style.letterSpacing = fontInfo.letterSpacing + 'px'; } public static applyFontInfo(domNode: FastDomNode, fontInfo: BareFontInfo): void { From b59478b06dbca256699bcd8d6a41e7cd76b75c4a Mon Sep 17 00:00:00 2001 From: Amy Qiu Date: Tue, 16 May 2017 09:56:41 -0700 Subject: [PATCH 0582/2747] Address comments --- src/vs/workbench/parts/search/browser/searchViewlet.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index 560a3d127a05c..fcc011c2b7328 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -175,7 +175,7 @@ export class SearchViewlet extends Viewlet { const exclusionsUsePattern = this.viewletSettings['query.exclusionsUsePattern']; const includesUsePattern = this.viewletSettings['query.includesUsePattern']; const patternIncludes = this.viewletSettings['query.folderIncludes'] || ''; - const userExtended = this.viewletSettings['query.userExtended'] || ''; + const queryDetailsExpanded = this.viewletSettings['query.queryDetailsExpanded'] || ''; const useIgnoreFiles = typeof this.viewletSettings['query.useIgnoreFiles'] === 'boolean' ? this.viewletSettings['query.useIgnoreFiles'] : this.configurationService.getConfiguration().search.useIgnoreFilesByDefault; @@ -269,7 +269,7 @@ export class SearchViewlet extends Viewlet { this.actionRegistry[action.id] = action; }); - if (filePatterns !== '' || patternExclusions !== '' || patternIncludes !== '' || userExtended !== '') { + if (filePatterns !== '' || patternExclusions !== '' || patternIncludes !== '' || queryDetailsExpanded !== '') { this.toggleQueryDetails(true, true, true); } @@ -850,7 +850,7 @@ export class SearchViewlet extends Viewlet { let cls = 'more'; show = typeof show === 'undefined' ? !dom.hasClass(this.queryDetails, cls) : Boolean(show); - this.viewletSettings['query.userExtended'] = show; + this.viewletSettings['query.queryDetailsExpanded'] = show; skipLayout = Boolean(skipLayout); if (show) { From 6885b84099e60f8a8c5ce2ff1bf5f80ac29c43a2 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 16 May 2017 18:57:51 +0200 Subject: [PATCH 0583/2747] tfs: fix dependencies --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index b000df8c87afe..fa65e2a782a5d 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -275,7 +275,7 @@ function packageTask(platform, arch, opts) { .pipe(util.cleanNodeModule('gc-signals', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/index.js'])) .pipe(util.cleanNodeModule('v8-profiler', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/index.js'])) .pipe(util.cleanNodeModule('node-pty', ['binding.gyp', 'build/**', 'src/**', 'tools/**'], ['build/Release/**'])) - .pipe(util.cleanNodeModule('vsda', ['**'], ['package.json', 'index.js', '**/*.node'])); + .pipe(util.cleanNodeModule('vsda', ['binding.gyp', 'build/**', '*.bat', '*.sh', '*.cpp', '*.h'], ['**/*.node'])); let all = es.merge( packageJsonStream, From 784770efea5948693d651652f06f9dab6e0e5cb7 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Tue, 16 May 2017 10:24:05 -0700 Subject: [PATCH 0584/2747] Quick link and embedded editor background color (fixes #25798) --- .../page/electron-browser/welcomePage.css | 18 -------- .../page/electron-browser/welcomePage.ts | 20 +++++++- .../electron-browser/walkThroughPart.css | 15 ------ .../electron-browser/walkThroughPart.ts | 46 ++++++------------- .../walkThrough/node/walkThroughUtils.ts | 25 ++++++++++ 5 files changed, 59 insertions(+), 65 deletions(-) create mode 100644 src/vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils.ts diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css index 4c76f3ef4c2e7..49de2c1751ec7 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css @@ -209,12 +209,8 @@ .monaco-workbench > .part.editor > .content .welcomePage .commands li button { color: #6c6c6c; - background:rgba(0,0,0,.04); border: none; } -.monaco-workbench > .part.editor > .content .welcomePage .commands li button:hover { - background:rgba(0,0,0,.10); -} .vs-dark .monaco-workbench > .part.editor > .content .welcomePage .commands li button > h3 { color: #ccc; @@ -226,19 +222,6 @@ .vs-dark .monaco-workbench > .part.editor > .content .welcomePage .commands li button { color: #828282; - background: rgba(0, 0, 0, .2); -} - -.vs-dark .monaco-workbench > .part.editor > .content .welcomePage .commands li button:hover { - background: rgba(200, 235, 255, .072); -} - -.vs-dark .monaco-workbench > .part.editor > .content .welcomePageContainer.extra-dark .commands li button { - background: rgba(200, 235, 255, .042); -} - -.vs-dark .monaco-workbench > .part.editor > .content .welcomePageContainer.extra-dark .commands li button:hover { - background: rgba(200, 235, 255, .072); } .monaco-workbench > .part.editor > .content .welcomePage .commands li button:focus { @@ -248,7 +231,6 @@ .hc-black .monaco-workbench > .part.editor > .content .welcomePage .commands li button { color: white; - background: black; border-color: #f38518; border-width: 1px; border-style: solid; diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 8c760ab35029e..bc6be38608d58 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -33,8 +33,10 @@ import { used } from 'vs/workbench/parts/welcome/page/electron-browser/vs_code_w import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { tildify } from 'vs/base/common/labels'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; import { isLinux } from 'vs/base/common/platform'; +import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { registerColor } from 'vs/platform/theme/common/colorRegistry'; +import { getExtraColor } from 'vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils'; used(); @@ -361,3 +363,19 @@ class WelcomePage { this.disposables = dispose(this.disposables); } } + +// theming + +const quickLinkBackground = registerColor('welcomePage.quickLinkBackground', { dark: null, light: null, hc: null }, localize('welcomePage.quickLinkBackground', 'Background color for the quick links on the Welcome page.')); +const quickLinkHoverBackground = registerColor('welcomePage.quickLinkHoverBackground', { dark: null, light: null, hc: null }, localize('welcomePage.quickLinkHoverBackground', 'Hover background color for the quick links on the Welcome page.')); + +registerThemingParticipant((theme, collector) => { + const color = getExtraColor(theme, quickLinkBackground, { dark: 'rgba(0, 0, 0, .2)', extra_dark: 'rgba(200, 235, 255, .042)', light: 'rgba(0,0,0,.04)', hc: 'black' }); + if (color) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .commands li button { background: ${color}; }`); + } + const hover = getExtraColor(theme, quickLinkHoverBackground, { dark: 'rgba(200, 235, 255, .072)', extra_dark: 'rgba(200, 235, 255, .072)', light: 'rgba(0,0,0,.10)', hc: null }); + if (hover) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .commands li button:hover { background: ${hover}; }`); + } +}); diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.css b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.css index a10262088f162..baaf1f3ceed36 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.css +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.css @@ -161,21 +161,6 @@ display: initial; } -.vs .monaco-workbench > .part.editor > .content .walkThroughContent .monaco-editor-background, -.vs .monaco-workbench > .part.editor > .content .walkThroughContent .glyph-margin { - background:rgba(0,0,0,.08); -} - -.vs-dark .monaco-workbench > .part.editor > .content .walkThroughContent .monaco-editor-background, -.vs-dark .monaco-workbench > .part.editor > .content .walkThroughContent .glyph-margin { - background: rgba(0, 0, 0, .4); -} - -.vs-dark .monaco-workbench > .part.editor > .content .walkThroughContent.extra-dark .monaco-editor-background, -.vs-dark .monaco-workbench > .part.editor > .content .walkThroughContent.extra-dark .glyph-margin { - background: rgba(200, 235, 255, .064); -} - .hc-black .monaco-workbench > .part.editor > .content .walkThroughContent .monaco-editor { border: 1px white solid } diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 1c94c56a9ec91..1db49ecead17c 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -37,9 +37,9 @@ import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService' import { Parts, IPartService } from 'vs/workbench/services/part/common/partService'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; -import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; -import { editorBackground } from 'vs/platform/theme/common/colorRegistry'; -import { Themable } from 'vs/workbench/common/theme'; +import { IThemeService, ITheme, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { registerColor } from 'vs/platform/theme/common/colorRegistry'; +import { getExtraColor } from 'vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils'; export const WALK_THROUGH_FOCUS = new RawContextKey('interactivePlaygroundFocus', false); @@ -81,27 +81,6 @@ class WalkThroughCodeEditor extends CodeEditor { } } -class WalkThroughTheming extends Themable { - - constructor( - themeService: IThemeService, - private container: HTMLElement - ) { - super(themeService); - this.update(themeService.getTheme()); - } - - protected onThemeChange(theme: ITheme): void { - super.onThemeChange(theme); - this.update(theme); - } - - private update(theme: ITheme): void { - const background = theme.getColor(editorBackground); - this.container.classList.toggle('extra-dark', background.getLuminosity() < 0.004); - } -} - export class WalkThroughPart extends BaseEditor { static ID: string = 'workbench.editor.walkThroughPart'; @@ -329,7 +308,6 @@ export class WalkThroughPart extends BaseEditor { if (!strings.endsWith(input.getResource().path, '.md')) { this.content.innerHTML = content; this.updateSizeClasses(); - this.addThemeListener(); this.decorateContent(); if (input.onReady) { input.onReady(this.content.firstElementChild as HTMLElement); @@ -429,7 +407,6 @@ export class WalkThroughPart extends BaseEditor { })); }); this.updateSizeClasses(); - this.addThemeListener(); if (input.onReady) { input.onReady(innerContent); } @@ -458,11 +435,6 @@ export class WalkThroughPart extends BaseEditor { }; } - private addThemeListener() { - const innerContent = this.content.firstElementChild as HTMLElement; - this.contentDisposables.push(new WalkThroughTheming(this.themeService, innerContent)); - } - private style(theme: ITheme, div: HTMLElement) { const styleElement = this.partService.getContainer(Parts.EDITOR_PART); // TODO@theme styles should come in via theme registry const { color, backgroundColor, fontFamily, fontWeight, fontSize } = window.getComputedStyle(styleElement); @@ -552,3 +524,15 @@ export class WalkThroughPart extends BaseEditor { super.dispose(); } } + +// theming + +const embeddedEditorBackground = registerColor('walkThrough.embeddedEditorBackground', { dark: null, light: null, hc: null }, localize('walkThrough.embeddedEditorBackground', 'Background color for the embedded editors on the Interactive Playground.')); + +registerThemingParticipant((theme, collector) => { + const color = getExtraColor(theme, embeddedEditorBackground, { dark: 'rgba(0, 0, 0, .4)', extra_dark: 'rgba(200, 235, 255, .064)', light: 'rgba(0,0,0,.08)', hc: null }); + if (color) { + collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent .monaco-editor-background, + .monaco-workbench > .part.editor > .content .walkThroughContent .margin-view-overlays { background: ${color}; }`); + } +}); \ No newline at end of file diff --git a/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils.ts b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils.ts new file mode 100644 index 0000000000000..00d03ceace017 --- /dev/null +++ b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils.ts @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { ITheme } from 'vs/platform/theme/common/themeService'; +import { editorBackground, ColorDefaults, ColorValue } from 'vs/platform/theme/common/colorRegistry'; + +export function getExtraColor(theme: ITheme, colorId: string, defaults: ColorDefaults & { extra_dark: string }): ColorValue { + const color = theme.getColor(colorId); + if (color) { + return color; + } + + if (theme.type === 'dark') { + const background = theme.getColor(editorBackground); + if (background && background.getLuminosity() < 0.004) { + return defaults.extra_dark; + } + } + + return defaults[theme.type]; +} \ No newline at end of file From c30b023538bd2afb12ccee7c613453614e30e48b Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 16 May 2017 10:31:29 -0700 Subject: [PATCH 0585/2747] Add support for terminal scrollbar active theme color --- .../parts/terminal/electron-browser/terminalInstance.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 2aec4c85834cf..b7e6f6a378f88 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -30,7 +30,7 @@ import { TerminalConfigHelper } from 'vs/workbench/parts/terminal/electron-brows import { TerminalLinkHandler } from 'vs/workbench/parts/terminal/electron-browser/terminalLinkHandler'; import { TerminalWidgetManager } from 'vs/workbench/parts/terminal/browser/terminalWidgetManager'; import { registerThemingParticipant, ITheme, ICssStyleCollector } from "vs/platform/theme/common/themeService"; -import { scrollbarSliderBackground, scrollbarSliderHoverBackground } from "vs/platform/theme/common/colorRegistry"; +import { scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground } from "vs/platform/theme/common/colorRegistry"; /** The amount of time to consider terminal errors to be related to the launch */ const LAUNCHING_DURATION = 500; @@ -765,4 +765,9 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { if (scrollbarSliderHoverBackgroundColor) { collector.addRule(`.monaco-workbench .panel.integrated-terminal .xterm .xterm-viewport::-webkit-scrollbar-thumb:hover { background-color: ${scrollbarSliderHoverBackgroundColor}; }`); } + + const scrollbarSliderActiveBackgroundColor = theme.getColor(scrollbarSliderActiveBackground); + if (scrollbarSliderActiveBackgroundColor) { + collector.addRule(`.monaco-workbench .panel.integrated-terminal .xterm .xterm-viewport::-webkit-scrollbar-thumb:active { background-color: ${scrollbarSliderActiveBackgroundColor}; }`); + } }); \ No newline at end of file From 9009c7e5d4c455e70f82529675b5276f55df5918 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Tue, 16 May 2017 10:31:55 -0700 Subject: [PATCH 0586/2747] Clean up --- .../electron-browser/walkThroughPart.ts | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 1db49ecead17c..fc6f2c7663076 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -34,10 +34,10 @@ import { once } from 'vs/base/common/event'; import { isObject } from 'vs/base/common/types'; import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/commands'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; -import { Parts, IPartService } from 'vs/workbench/services/part/common/partService'; +import { IPartService } from 'vs/workbench/services/part/common/partService'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; -import { IThemeService, ITheme, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { registerColor } from 'vs/platform/theme/common/colorRegistry'; import { getExtraColor } from 'vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils'; @@ -328,8 +328,6 @@ export class WalkThroughPart extends BaseEditor { innerContent.classList.add('walkThroughContent'); // only for markdown files const markdown = this.expandMacros(content); innerContent.innerHTML = marked(markdown, { renderer }); - this.style(this.themeService.getTheme(), innerContent); - this.contentDisposables.push(this.themeService.onThemeChange(theme => this.style(theme, innerContent))); this.content.appendChild(innerContent); model.snippets.forEach((snippet, i) => { @@ -435,16 +433,6 @@ export class WalkThroughPart extends BaseEditor { }; } - private style(theme: ITheme, div: HTMLElement) { - const styleElement = this.partService.getContainer(Parts.EDITOR_PART); // TODO@theme styles should come in via theme registry - const { color, backgroundColor, fontFamily, fontWeight, fontSize } = window.getComputedStyle(styleElement); - div.style.color = color; - div.style.backgroundColor = backgroundColor; - div.style.fontFamily = fontFamily; - div.style.fontWeight = fontWeight; - div.style.fontSize = fontSize; - } - private expandMacros(input: string) { return input.replace(/kb\(([a-z.\d\-]+)\)/gi, (match: string, kb: string) => { const keybinding = this.keybindingService.lookupKeybinding(kb); From ebb5c05734e180d6ba75e78c26ba1e1ca474a2f4 Mon Sep 17 00:00:00 2001 From: Fernando Tolentino Date: Tue, 16 May 2017 15:32:12 -0300 Subject: [PATCH 0587/2747] using json-parser to get existing recommendations --- .../configuration-editing/src/extension.ts | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/extensions/configuration-editing/src/extension.ts b/extensions/configuration-editing/src/extension.ts index 78b855feb8161..92a3075f8b3b1 100644 --- a/extensions/configuration-editing/src/extension.ts +++ b/extensions/configuration-editing/src/extension.ts @@ -6,7 +6,7 @@ 'use strict'; import * as vscode from 'vscode'; -import { getLocation, visit } from 'jsonc-parser'; +import { getLocation, visit, parse } from 'jsonc-parser'; import * as path from 'path'; import { SettingsDocument } from './settingsDocumentHelper'; @@ -70,15 +70,17 @@ function registerExtensionsCompletions(): vscode.Disposable { const location = getLocation(document.getText(), document.offsetAt(position)); const range = document.getWordRangeAtPosition(position) || new vscode.Range(position, position); if (location.path[0] === 'recommendations') { - const config = vscode.workspace && vscode.workspace.getConfiguration('extensions.json'); - const alreadyEnteredExtensions = config.get('recommendations') || []; - return vscode.extensions.all - .filter(e => !( - e.id.startsWith('vscode.') - || e.id === 'Microsoft.vscode-markdown' - || alreadyEnteredExtensions.indexOf(e.id) > -1 - )) - .map(e => newSimpleCompletionItem(e.id, range, undefined, '"' + e.id + '"')); + const config = parse(document.getText()); + const alreadyEnteredExtensions = config && config.recommendations || []; + if (Array.isArray(alreadyEnteredExtensions)) { + return vscode.extensions.all + .filter(e => !( + e.id.startsWith('vscode.') + || e.id === 'Microsoft.vscode-markdown' + || alreadyEnteredExtensions.indexOf(e.id) > -1 + )) + .map(e => newSimpleCompletionItem(e.id, range, undefined, '"' + e.id + '"')); + } } return []; } From 794ac6074f34dbc3405c611135e6510e0689b241 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 16 May 2017 21:49:32 +0200 Subject: [PATCH 0588/2747] tfs: clean vsda --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index fa65e2a782a5d..e51fa9c2ec27f 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -275,7 +275,7 @@ function packageTask(platform, arch, opts) { .pipe(util.cleanNodeModule('gc-signals', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/index.js'])) .pipe(util.cleanNodeModule('v8-profiler', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node', 'src/index.js'])) .pipe(util.cleanNodeModule('node-pty', ['binding.gyp', 'build/**', 'src/**', 'tools/**'], ['build/Release/**'])) - .pipe(util.cleanNodeModule('vsda', ['binding.gyp', 'build/**', '*.bat', '*.sh', '*.cpp', '*.h'], ['**/*.node'])); + .pipe(util.cleanNodeModule('vsda', ['binding.gyp', 'README.md', 'build/**', '*.bat', '*.sh', '*.cpp', '*.h'], ['build/Release/vsda.node'])); let all = es.merge( packageJsonStream, From bb44d4386b631444191a961d7b41d5326bcb9bdf Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 May 2017 11:33:06 -0700 Subject: [PATCH 0589/2747] Remove linkedmap --- .../src/features/bufferSyncSupport.ts | 54 ++---- .../typescript/src/features/linkedMap.ts | 168 ------------------ 2 files changed, 15 insertions(+), 207 deletions(-) delete mode 100644 extensions/typescript/src/features/linkedMap.ts diff --git a/extensions/typescript/src/features/bufferSyncSupport.ts b/extensions/typescript/src/features/bufferSyncSupport.ts index 83d5b98b77519..2c1b414723d1e 100644 --- a/extensions/typescript/src/features/bufferSyncSupport.ts +++ b/extensions/typescript/src/features/bufferSyncSupport.ts @@ -7,11 +7,10 @@ import * as cp from 'child_process'; import * as fs from 'fs'; -import { workspace, window, TextDocument, TextDocumentChangeEvent, TextDocumentContentChangeEvent, Disposable, MessageItem } from 'vscode'; +import { workspace, window, TextDocument, TextDocumentChangeEvent, TextDocumentContentChangeEvent, Disposable, MessageItem, Uri, commands } from 'vscode'; import * as Proto from '../protocol'; import { ITypescriptServiceClient } from '../typescriptService'; import { Delayer } from '../utils/async'; -import LinkedMap from './linkedMap'; import * as nls from 'vscode-nls'; let localize = nls.loadMessageBundle(); @@ -29,17 +28,12 @@ const Mode2ScriptKind: ObjectMap<'TS' | 'JS' | 'TSX' | 'JSX'> = { class SyncedBuffer { - private document: TextDocument; - private filepath: string; - private diagnosticRequestor: IDiagnosticRequestor; - private client: ITypescriptServiceClient; - - constructor(document: TextDocument, filepath: string, diagnosticRequestor: IDiagnosticRequestor, client: ITypescriptServiceClient) { - this.document = document; - this.filepath = filepath; - this.diagnosticRequestor = diagnosticRequestor; - this.client = client; - } + constructor( + private readonly document: TextDocument, + private readonly filepath: string, + private readonly diagnosticRequestor: IDiagnosticRequestor, + private readonly client: ITypescriptServiceClient + ) { } public open(): void { const args: Proto.OpenRequestArgs = { @@ -66,23 +60,22 @@ class SyncedBuffer { } public close(): void { - let args: Proto.FileRequestArgs = { + const args: Proto.FileRequestArgs = { file: this.filepath }; this.client.execute('close', args, false); } - onContentChanged(events: TextDocumentContentChangeEvent[]): void { - let filePath = this.client.normalizePath(this.document.uri); + public onContentChanged(events: TextDocumentContentChangeEvent[]): void { + const filePath = this.client.normalizePath(this.document.uri); if (!filePath) { return; } - for (let i = 0; i < events.length; i++) { - let event = events[i]; - let range = event.range; - let text = event.text; - let args: Proto.ChangeRequestArgs = { + for (const event of events) { + const range = event.range; + const text = event.text; + const args: Proto.ChangeRequestArgs = { file: filePath, line: range.start.line + 1, offset: range.start.character + 1, @@ -115,7 +108,6 @@ export default class BufferSyncSupport { private pendingDiagnostics: { [key: string]: number; }; private diagnosticDelayer: Delayer; - private emitQueue: LinkedMap; private checkGlobalTSCVersion: boolean; constructor(client: ITypescriptServiceClient, modeIds: string[], diagnostics: Diagnostics, validate: boolean = true) { @@ -131,7 +123,6 @@ export default class BufferSyncSupport { this.diagnosticDelayer = new Delayer(300); this.syncedBuffers = Object.create(null); - this.emitQueue = new LinkedMap(); const tsConfig = workspace.getConfiguration('typescript'); this.checkGlobalTSCVersion = client.checkGlobalTSCVersion && this.modeIds['typescript'] === true && tsConfig.get(checkTscVersionSettingKey, true); @@ -297,21 +288,6 @@ export default class BufferSyncSupport { id: number; } - function openUrl(url: string) { - let cmd: string; - switch (process.platform) { - case 'darwin': - cmd = 'open'; - break; - case 'win32': - cmd = 'start'; - break; - default: - cmd = 'xdg-open'; - } - return cp.exec(cmd + ' ' + url); - } - let tscVersion: string | undefined = undefined; try { let out = cp.execSync('tsc --version', { encoding: 'utf8' }); @@ -345,7 +321,7 @@ export default class BufferSyncSupport { } switch (selected.id) { case 1: - openUrl('http://go.microsoft.com/fwlink/?LinkId=826239'); + commands.executeCommand('vscode.open', Uri.parse('http://go.microsoft.com/fwlink/?LinkId=826239')); break; case 2: const tsConfig = workspace.getConfiguration('typescript'); diff --git a/extensions/typescript/src/features/linkedMap.ts b/extensions/typescript/src/features/linkedMap.ts deleted file mode 100644 index 9f0a41a02bb13..0000000000000 --- a/extensions/typescript/src/features/linkedMap.ts +++ /dev/null @@ -1,168 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -interface Item { - previous: Item | undefined; - next: Item | undefined; - key: string; - value: T; -} - -export default class LinkedMap { - - private map: ObjectMap>; - private head: Item | undefined; - private tail: Item | undefined; - private _length: number; - - constructor() { - this.map = Object.create(null); - this.head = undefined; - this.tail = undefined; - this._length = 0; - } - - public isEmpty(): boolean { - return !this.head && !this.tail; - } - - public length(): number { - return this._length; - } - - public get(key: string): T | undefined { - const item = this.map[key]; - if (!item) { - return undefined; - } - return item.value; - } - - public add(key: string, value: T, touch = false): void { - let item = this.map[key]; - if (item) { - item.value = value; - if (touch) { - this.touch(item); - } - } - else { - item = { key, value, next: undefined, previous: undefined }; - if (touch) { - this.addItemFirst(item); - } - else { - this.addItemLast(item); - } - this.map[key] = item; - this._length++; - } - } - - public remove(key: string): T | undefined { - const item = this.map[key]; - if (!item) { - return undefined; - } - delete this.map[key]; - this.removeItem(item); - this._length--; - return item.value; - } - - public shift(): T | undefined { - if (!this.head && !this.tail) { - return undefined; - } - if (!this.head || !this.tail) { - throw new Error('Invalid list'); - } - const item = this.head; - delete this.map[item.key]; - this.removeItem(item); - this._length--; - return item.value; - } - - private addItemFirst(item: Item): void { - // First time Insert - if (!this.head && !this.tail) { - this.tail = item; - } else if (!this.head) { - throw new Error('Invalid list'); - } else { - item.next = this.head; - this.head.previous = item; - } - this.head = item; - } - - private addItemLast(item: Item): void { - // First time Insert - if (!this.head && !this.tail) { - this.head = item; - } else if (!this.tail) { - throw new Error('Invalid list'); - } else { - item.previous = this.tail; - this.tail.next = item; - } - this.tail = item; - } - - private removeItem(item: Item): void { - if (item === this.head && item === this.tail) { - this.head = undefined; - this.tail = undefined; - } - else if (item === this.head) { - this.head = item.next; - } - else if (item === this.tail) { - this.tail = item.previous; - } - else { - const next = item.next; - const previous = item.previous; - if (!next || !previous) { - throw new Error('Invalid list'); - } - next.previous = previous; - previous.next = next; - } - } - - private touch(item: Item): void { - if (item === this.head) { - return; - } - - const next = item.next; - const previous = item.previous; - - // Unlink the item - if (item === this.tail) { - this.tail = previous; - } - else { - // Both next and previous are not null since item was neither head nor tail. - if (next) { - next.previous = previous; - } - if (previous) { - previous.next = next; - } - } - - // Insert the node at head - item.previous = undefined; - item.next = this.head; - if (!this.head) { - throw new Error('Invalid list'); - } - this.head.previous = item; - this.head = item; - } -} From 8786a903f0ab92a4dc6640ff511ab28fc53f6a03 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 May 2017 11:58:42 -0700 Subject: [PATCH 0590/2747] use Switch instead of map for looking up modes --- .../src/features/bufferSyncSupport.ts | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/extensions/typescript/src/features/bufferSyncSupport.ts b/extensions/typescript/src/features/bufferSyncSupport.ts index 2c1b414723d1e..f0928f2c12793 100644 --- a/extensions/typescript/src/features/bufferSyncSupport.ts +++ b/extensions/typescript/src/features/bufferSyncSupport.ts @@ -19,12 +19,15 @@ interface IDiagnosticRequestor { requestDiagnostic(filepath: string): void; } -const Mode2ScriptKind: ObjectMap<'TS' | 'JS' | 'TSX' | 'JSX'> = { - 'typescript': 'TS', - 'typescriptreact': 'TSX', - 'javascript': 'JS', - 'javascriptreact': 'JSX' -}; +function mode2ScriptKind(mode: string): 'TS' | 'TSX' | 'JS' | 'JSX' | undefined { + switch (mode) { + case 'typescript': return 'TS'; + case 'typescriptreact': return 'TSX'; + case 'javascript': return 'JS'; + case 'javascriptreact': return 'JSX'; + } + return undefined; +} class SyncedBuffer { @@ -42,7 +45,7 @@ class SyncedBuffer { }; if (this.client.apiVersion.has203Features()) { - const scriptKind = Mode2ScriptKind[this.document.languageId]; + const scriptKind = mode2ScriptKind(this.document.languageId); if (scriptKind) { args.scriptKindName = scriptKind; } @@ -104,8 +107,6 @@ export default class BufferSyncSupport { private disposables: Disposable[] = []; private syncedBuffers: ObjectMap; - private projectValidationRequested: boolean; - private pendingDiagnostics: { [key: string]: number; }; private diagnosticDelayer: Delayer; private checkGlobalTSCVersion: boolean; @@ -117,8 +118,6 @@ export default class BufferSyncSupport { this.diagnostics = diagnostics; this._validate = validate; - this.projectValidationRequested = false; - this.pendingDiagnostics = Object.create(null); this.diagnosticDelayer = new Delayer(300); From 53b18c79e792d8f10d4245162c728986b3f2b76b Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 May 2017 12:48:11 -0700 Subject: [PATCH 0591/2747] Mark some buffersync members readonly --- .../src/features/bufferSyncSupport.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/extensions/typescript/src/features/bufferSyncSupport.ts b/extensions/typescript/src/features/bufferSyncSupport.ts index f0928f2c12793..9372c7e40748b 100644 --- a/extensions/typescript/src/features/bufferSyncSupport.ts +++ b/extensions/typescript/src/features/bufferSyncSupport.ts @@ -99,22 +99,21 @@ export interface Diagnostics { const checkTscVersionSettingKey = 'check.tscVersion'; export default class BufferSyncSupport { - private client: ITypescriptServiceClient; + private readonly client: ITypescriptServiceClient; private _validate: boolean; - private modeIds: ObjectMap; + private readonly modeIds: Set; private diagnostics: Diagnostics; - private disposables: Disposable[] = []; - private syncedBuffers: ObjectMap; + private readonly disposables: Disposable[] = []; + private readonly syncedBuffers: ObjectMap; private pendingDiagnostics: { [key: string]: number; }; - private diagnosticDelayer: Delayer; + private readonly diagnosticDelayer: Delayer; private checkGlobalTSCVersion: boolean; constructor(client: ITypescriptServiceClient, modeIds: string[], diagnostics: Diagnostics, validate: boolean = true) { this.client = client; - this.modeIds = Object.create(null); - modeIds.forEach(modeId => this.modeIds[modeId] = true); + this.modeIds = new Set(modeIds); this.diagnostics = diagnostics; this._validate = validate; @@ -124,7 +123,7 @@ export default class BufferSyncSupport { this.syncedBuffers = Object.create(null); const tsConfig = workspace.getConfiguration('typescript'); - this.checkGlobalTSCVersion = client.checkGlobalTSCVersion && this.modeIds['typescript'] === true && tsConfig.get(checkTscVersionSettingKey, true); + this.checkGlobalTSCVersion = client.checkGlobalTSCVersion && this.modeIds.has('typescript') === true && tsConfig.get(checkTscVersionSettingKey, true); } public listen(): void { @@ -163,7 +162,7 @@ export default class BufferSyncSupport { } private onDidOpenTextDocument(document: TextDocument): void { - if (!this.modeIds[document.languageId]) { + if (!this.modeIds.has(document.languageId)) { return; } let resource = document.uri; From 604248eebdb33d291edf4f2abc1f083f7d639d23 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 May 2017 13:54:01 -0700 Subject: [PATCH 0592/2747] Remove unused Writer type --- .../src/features/bufferSyncSupport.ts | 4 ++-- .../typescript/src/utils/wireProtocol.ts | 21 ------------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/extensions/typescript/src/features/bufferSyncSupport.ts b/extensions/typescript/src/features/bufferSyncSupport.ts index 9372c7e40748b..dfb32d759da02 100644 --- a/extensions/typescript/src/features/bufferSyncSupport.ts +++ b/extensions/typescript/src/features/bufferSyncSupport.ts @@ -103,7 +103,7 @@ export default class BufferSyncSupport { private _validate: boolean; private readonly modeIds: Set; - private diagnostics: Diagnostics; + private readonly diagnostics: Diagnostics; private readonly disposables: Disposable[] = []; private readonly syncedBuffers: ObjectMap; @@ -123,7 +123,7 @@ export default class BufferSyncSupport { this.syncedBuffers = Object.create(null); const tsConfig = workspace.getConfiguration('typescript'); - this.checkGlobalTSCVersion = client.checkGlobalTSCVersion && this.modeIds.has('typescript') === true && tsConfig.get(checkTscVersionSettingKey, true); + this.checkGlobalTSCVersion = client.checkGlobalTSCVersion && this.modeIds.has('typescript') && tsConfig.get(checkTscVersionSettingKey, true); } public listen(): void { diff --git a/extensions/typescript/src/utils/wireProtocol.ts b/extensions/typescript/src/utils/wireProtocol.ts index 0227b3be7e6b1..b1a4d8a0d89e9 100644 --- a/extensions/typescript/src/utils/wireProtocol.ts +++ b/extensions/typescript/src/utils/wireProtocol.ts @@ -172,24 +172,3 @@ export class Reader { } } } - -export class Writer { - - private writable: stream.Writable; - - public constructor(writable: stream.Writable) { - this.writable = writable; - } - - public write(msg: T): void { - let json = JSON.stringify(msg); - let buffer: string[] = [ - ContentLength, - Buffer.byteLength(json, 'utf8').toString(), - '\r\n\r\n', - json, - '\r\n' - ]; - this.writable.write(buffer.join(''), 'utf8'); - } -} \ No newline at end of file From 614eaacd5355b77cc2ce2220a9b927e754ecf5cf Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 16 May 2017 22:56:52 +0200 Subject: [PATCH 0593/2747] tfs: fix darwin build --- build/tfs/darwin/build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index 7236231655d26..ecbcaec27b71d 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -33,12 +33,12 @@ STEP() { STEP "Install dependencies" ./scripts/npm.sh install -STEP "Install distro dependencies" -npm run install-distro - STEP "Mix in repository from vscode-distro" npm run gulp -- mixin +STEP "Install distro dependencies" +npm run install-distro + STEP "Build minified & upload source maps" npm run gulp -- --max_old_space_size=4096 vscode-darwin-min upload-vscode-sourcemaps From 087a2d2f2480993f219bcb2a0465dcfd2231e227 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 May 2017 14:05:10 -0700 Subject: [PATCH 0594/2747] Default to not updating scroll position if no valid editor is found. Part of #25910 --- extensions/markdown/src/previewContentProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/markdown/src/previewContentProvider.ts b/extensions/markdown/src/previewContentProvider.ts index e1ce84caba328..ef210649e209f 100644 --- a/extensions/markdown/src/previewContentProvider.ts +++ b/extensions/markdown/src/previewContentProvider.ts @@ -206,7 +206,7 @@ export class MDDocumentContentProvider implements vscode.TextDocumentContentProv return vscode.workspace.openTextDocument(sourceUri).then(document => { this.config = MarkdownPreviewConfig.getCurrentConfig(); - let initialLine = 0; + let initialLine: number | undefined = undefined; const editor = vscode.window.activeTextEditor; if (editor && editor.document.uri.fsPath === sourceUri.fsPath) { initialLine = editor.selection.active.line; From 418f91d044ab3eda3cff4bda74f70d7313dab762 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 16 May 2017 23:35:28 +0200 Subject: [PATCH 0595/2747] tfs: better build perf measurements --- build/tfs/common/common.sh | 34 +++++++++++++++++++++ build/tfs/darwin/build.sh | 62 +++++++++++++++----------------------- 2 files changed, 59 insertions(+), 37 deletions(-) create mode 100755 build/tfs/common/common.sh diff --git a/build/tfs/common/common.sh b/build/tfs/common/common.sh new file mode 100755 index 0000000000000..d85788664e927 --- /dev/null +++ b/build/tfs/common/common.sh @@ -0,0 +1,34 @@ +#!/bin/bash +set -e + +# set agent specific npm cache +if [ -n "$AGENT_WORKFOLDER" ] +then + export npm_config_cache="$AGENT_WORKFOLDER/npm-cache" + echo "Using npm cache: $npm_config_cache" +fi + +SUMMARY="" +step() { + START=$SECONDS + TASK=$1; shift + echo "" + echo "*****************************************************************************" + echo "Start: $TASK" + echo "*****************************************************************************" + "$@" + DURATION=$(echo "$SECONDS - $START" | bc) + echo "*****************************************************************************" + echo "End: $TASK, $DURATION seconds" + echo "*****************************************************************************" + SUMMARY="$SUMMARY$TASK;$DURATION seconds"$'\n' +} + +done_steps() { + echo "" + echo "Task Summary" + echo "============" + echo "${SUMMARY}" | column -t -s';' +} + +trap done_steps EXIT \ No newline at end of file diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index ecbcaec27b71d..5cafa89f53680 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -1,5 +1,6 @@ #!/bin/sh -set -e + +. build/tfs/common/common.sh export VSCODE_MIXIN_PASSWORD="$1" export AZURE_STORAGE_ACCESS_KEY="$2" @@ -14,42 +15,27 @@ machine monacotools.visualstudio.com password $VSO_PAT END -# set agent specific npm cache -if [ -n "$AGENT_WORKFOLDER" ] -then - export npm_config_cache="$AGENT_WORKFOLDER/npm-cache" - echo "Using npm cache: $npm_config_cache" -fi - -# log build step -STEP() { - echo "" - echo "********************************************************************************" - echo "*** $*" - echo "********************************************************************************" - echo "" -} - -STEP "Install dependencies" -./scripts/npm.sh install +step "Install dependencies" \ + ./scripts/npm.sh install -STEP "Mix in repository from vscode-distro" -npm run gulp -- mixin +step "Mix in repository from vscode-distro" \ + npm run gulp -- mixin -STEP "Install distro dependencies" -npm run install-distro +step "Install distro dependencies" \ + npm run install-distro -STEP "Build minified & upload source maps" -npm run gulp -- --max_old_space_size=4096 vscode-darwin-min upload-vscode-sourcemaps +step "Build minified & upload source maps" \ + npm run gulp -- --max_old_space_size=4096 vscode-darwin-min upload-vscode-sourcemaps -STEP "Run unit tests" -./scripts/test.sh --build --reporter dot +step "Run unit tests" \ + ./scripts/test.sh --build --reporter dot -STEP "Run integration tests" -./scripts/test-integration.sh +step "Run integration tests" \ + ./scripts/test-integration.sh -STEP "Install build dependencies" -(cd $BUILD_SOURCESDIRECTORY/build/tfs/common && npm i) +(cd $BUILD_SOURCESDIRECTORY/build/tfs/common && \ + step "Install build dependencies" \ + npm i) REPO=`pwd` ZIP=$REPO/../VSCode-darwin-selfsigned.zip @@ -58,11 +44,13 @@ BUILD=$REPO/../VSCode-darwin PACKAGEJSON=`ls $BUILD/*.app/Contents/Resources/app/package.json` VERSION=`node -p "require(\"$PACKAGEJSON\").version"` -STEP "Create unsigned archive" -( rm -rf $UNSIGNEDZIP ; cd $BUILD && zip -r -X -y $UNSIGNEDZIP * ) +rm -rf $UNSIGNEDZIP +(cd $BUILD && \ + step "Create unsigned archive" \ + zip -r -X -y $UNSIGNEDZIP *) -STEP "Publish unsigned archive" -node build/tfs/common/publish.js $VSCODE_QUALITY darwin archive-unsigned VSCode-darwin-$VSCODE_QUALITY-unsigned.zip $VERSION false $UNSIGNEDZIP +step "Publish unsigned archive" \ + node build/tfs/common/publish.js $VSCODE_QUALITY darwin archive-unsigned VSCode-darwin-$VSCODE_QUALITY-unsigned.zip $VERSION false $UNSIGNEDZIP -STEP "Sign build" -node build/tfs/common/enqueue.js $VSCODE_QUALITY \ No newline at end of file +step "Sign build" \ + node build/tfs/common/enqueue.js $VSCODE_QUALITY \ No newline at end of file From 50ed5aa111e344bd60b168ec271eaf59c9fb7075 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Tue, 16 May 2017 14:59:24 -0700 Subject: [PATCH 0596/2747] Split Quick Links section (fixes #22097) --- src/vs/platform/telemetry/common/telemetry.ts | 2 +- .../telemetry/common/telemetryUtils.ts | 10 +++--- .../electron-browser/vs_code_welcome_page.ts | 35 +++++++++++++------ .../page/electron-browser/welcomePage.ts | 13 +++++-- 4 files changed, 41 insertions(+), 19 deletions(-) diff --git a/src/vs/platform/telemetry/common/telemetry.ts b/src/vs/platform/telemetry/common/telemetry.ts index c3f6d2f3650f1..983743b9205d0 100644 --- a/src/vs/platform/telemetry/common/telemetry.ts +++ b/src/vs/platform/telemetry/common/telemetry.ts @@ -25,7 +25,7 @@ export interface ITelemetryExperiments { showNewUserWatermark: boolean; openUntitledFile: boolean; enableWelcomePage: boolean; - reorderQuickLinks: boolean; + mergeQuickLinks: boolean; } export interface ITelemetryService { diff --git a/src/vs/platform/telemetry/common/telemetryUtils.ts b/src/vs/platform/telemetry/common/telemetryUtils.ts index 32dca3259a404..e3370d3d8655a 100644 --- a/src/vs/platform/telemetry/common/telemetryUtils.ts +++ b/src/vs/platform/telemetry/common/telemetryUtils.ts @@ -23,7 +23,7 @@ export const defaultExperiments: ITelemetryExperiments = { showNewUserWatermark: false, openUntitledFile: true, enableWelcomePage: true, - reorderQuickLinks: false, + mergeQuickLinks: false, }; export const NullTelemetryService = { @@ -57,7 +57,7 @@ export function loadExperiments(accessor: ServicesAccessor): ITelemetryExperimen showNewUserWatermark, openUntitledFile, enableWelcomePage, - reorderQuickLinks, + mergeQuickLinks, } = splitExperimentsRandomness(); const newUserDuration = 24 * 60 * 60 * 1000; @@ -72,7 +72,7 @@ export function loadExperiments(accessor: ServicesAccessor): ITelemetryExperimen showNewUserWatermark, openUntitledFile, enableWelcomePage, - reorderQuickLinks, + mergeQuickLinks, }); } @@ -95,13 +95,13 @@ function splitExperimentsRandomness(): ITelemetryExperiments { const random1 = getExperimentsRandomness(); const [random2, showNewUserWatermark] = splitRandom(random1); const [random3, openUntitledFile] = splitRandom(random2); - const [random4, reorderQuickLinks] = splitRandom(random3); + const [random4, mergeQuickLinks] = splitRandom(random3); const [, enableWelcomePage] = splitRandom(random4); return { showNewUserWatermark, openUntitledFile, enableWelcomePage, - reorderQuickLinks, + mergeQuickLinks, }; } diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts index eb50f1972a10f..90c5975cded38 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts @@ -40,6 +40,7 @@ export default () => ` @@ -47,21 +48,33 @@ export default () => `

-

${escape(localize('welcomePage.quickLinks', "Quick links"))}

-
    -
  • -
  • -
  • -
  • -
  • -
  • -
  • -
+ +
  • +
  • + +
    +
    +

    ${escape(localize('welcomePage.learn', "Learn"))}

    +
      +
    • +
    • +
    • +
    +
    + diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index bc6be38608d58..9501600cec0d0 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -195,13 +195,22 @@ class WelcomePage { }); }).then(null, onUnexpectedError); - if (this.telemetryService.getExperiments().reorderQuickLinks) { + const customize = container.querySelector('.commands .section.customize'); + const learn = container.querySelector('.commands .section.learn'); + const quickLinks = container.querySelector('.commands .section.quickLinks'); + if (this.telemetryService.getExperiments().mergeQuickLinks) { + const ul = quickLinks.querySelector('ul'); reorderedQuickLinks.forEach(clazz => { const link = container.querySelector(`.commands .${clazz}`); if (link) { - link.parentElement.appendChild(link); + ul.appendChild(link); } }); + customize.remove(); + learn.remove(); + container.querySelector('.keybindingsReferenceLink').remove(); + } else { + quickLinks.remove(); } container.addEventListener('click', event => { From 405271c17d818ff543a0310acea5636fa26246d5 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 May 2017 15:42:01 -0700 Subject: [PATCH 0597/2747] Move getting active line out of inner openTextDocument --- extensions/markdown/src/previewContentProvider.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/markdown/src/previewContentProvider.ts b/extensions/markdown/src/previewContentProvider.ts index ef210649e209f..e4265cf9eb05d 100644 --- a/extensions/markdown/src/previewContentProvider.ts +++ b/extensions/markdown/src/previewContentProvider.ts @@ -203,15 +203,15 @@ export class MDDocumentContentProvider implements vscode.TextDocumentContentProv public provideTextDocumentContent(uri: vscode.Uri): Thenable { const sourceUri = vscode.Uri.parse(uri.query); + let initialLine: number | undefined = undefined; + const editor = vscode.window.activeTextEditor; + if (editor && editor.document.uri.fsPath === sourceUri.fsPath) { + initialLine = editor.selection.active.line; + } + return vscode.workspace.openTextDocument(sourceUri).then(document => { this.config = MarkdownPreviewConfig.getCurrentConfig(); - let initialLine: number | undefined = undefined; - const editor = vscode.window.activeTextEditor; - if (editor && editor.document.uri.fsPath === sourceUri.fsPath) { - initialLine = editor.selection.active.line; - } - const initialData = { previewUri: uri.toString(), source: sourceUri.toString(), From 17004573e3e4a5cf17a701fcdcf11a028807e471 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 May 2017 17:00:43 -0700 Subject: [PATCH 0598/2747] Always Show File Names in Symbol Search Results (#26518) * Fixes #26370 Updates the symbol search results to always display the filename. This feature was previously added to the TS extension specifically, so this change removes that work in favor of a change to the core symbol search experience * Use dash with filename --- .../src/features/workspaceSymbolProvider.ts | 15 ++------------- src/vs/workbench/browser/quickopen.ts | 2 +- .../parts/search/browser/openSymbolHandler.ts | 13 +++++++++---- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/extensions/typescript/src/features/workspaceSymbolProvider.ts b/extensions/typescript/src/features/workspaceSymbolProvider.ts index c8a192726e7e5..8593c4a895520 100644 --- a/extensions/typescript/src/features/workspaceSymbolProvider.ts +++ b/extensions/typescript/src/features/workspaceSymbolProvider.ts @@ -7,8 +7,6 @@ import { workspace, window, Uri, WorkspaceSymbolProvider, SymbolInformation, SymbolKind, Range, Location, CancellationToken } from 'vscode'; -import * as path from 'path'; - import * as Proto from '../protocol'; import { ITypescriptServiceClient } from '../typescriptService'; @@ -76,17 +74,8 @@ export default class TypeScriptWorkspaceSymbolProvider implements WorkspaceSymbo if (item.kind === 'method' || item.kind === 'function') { label += '()'; } - const containerNameParts: string[] = []; - if (item.containerName) { - containerNameParts.push(item.containerName); - } - const fileUri = this.client.asUrl(item.file); - const fileName = path.basename(fileUri.fsPath); - if (fileName) { - containerNameParts.push(fileName); - } - result.push(new SymbolInformation(label, getSymbolKind(item), containerNameParts.join(' — '), - new Location(fileUri, range))); + result.push(new SymbolInformation(label, getSymbolKind(item), item.containerName || '', + new Location(this.client.asUrl(item.file), range))); } } return result; diff --git a/src/vs/workbench/browser/quickopen.ts b/src/vs/workbench/browser/quickopen.ts index 1281c2e600b36..ebb31e7a83392 100644 --- a/src/vs/workbench/browser/quickopen.ts +++ b/src/vs/workbench/browser/quickopen.ts @@ -288,7 +288,7 @@ export class EditorQuickOpenEntry extends QuickOpenEntry implements IEditorQuick */ export class EditorQuickOpenEntryGroup extends QuickOpenEntryGroup implements IEditorQuickOpenEntry { - public getInput(): IEditorInput { + public getInput(): IEditorInput | IResourceInput { return null; } diff --git a/src/vs/workbench/parts/search/browser/openSymbolHandler.ts b/src/vs/workbench/parts/search/browser/openSymbolHandler.ts index 842c9461c0547..9ac3c54aa8624 100644 --- a/src/vs/workbench/parts/search/browser/openSymbolHandler.ts +++ b/src/vs/workbench/parts/search/browser/openSymbolHandler.ts @@ -25,6 +25,7 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IWorkspaceSymbolProvider, getWorkspaceSymbols } from 'vs/workbench/parts/search/common/search'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { basename } from 'vs/base/common/paths'; class SymbolEntry extends EditorQuickOpenEntry { @@ -50,11 +51,15 @@ class SymbolEntry extends EditorQuickOpenEntry { } public getDescription(): string { - let result = this._bearing.containerName; - if (!result && this._bearing.location.uri) { - result = labels.getPathLabel(this._bearing.location.uri, this._contextService, this._environmentService); + const containerName = this._bearing.containerName; + if (this._bearing.location.uri) { + if (containerName) { + return `${containerName} — ${basename(this._bearing.location.uri.fsPath)}`; + } else { + return labels.getPathLabel(this._bearing.location.uri, this._contextService, this._environmentService); + } } - return result; + return containerName; } public getIcon(): string { From 4514ddd1807ac3b90e65b98da981ab1a8f59f3a0 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 May 2017 18:33:22 -0700 Subject: [PATCH 0599/2747] Add option to exclude unique names from suggestion lists in JS files Fixes #26595 **Problem** TS includes all unique names in a file in the completion list for JavaScript files. This is often desirable, but may result in unexpected completions **Fix** Add a new option `javascript.nameSuggestions` to filter these suggestions out. --- extensions/typescript/package.json | 7 ++++++- extensions/typescript/package.nls.json | 3 ++- .../src/features/completionItemProvider.ts | 15 +++++++++++++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index 9526dddcdbd99..cb4fa518bf083 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -307,6 +307,11 @@ "type": "boolean", "default": false, "description": "%javascript.implicitProjectConfig.checkJs%" + }, + "javascript.nameSuggestions": { + "type": "boolean", + "default": true, + "description": "%javascript.nameSuggestions%" } } }, @@ -461,4 +466,4 @@ } ] } -} +} \ No newline at end of file diff --git a/extensions/typescript/package.nls.json b/extensions/typescript/package.nls.json index f14b731bdad62..faa59a26d7f3a 100644 --- a/extensions/typescript/package.nls.json +++ b/extensions/typescript/package.nls.json @@ -35,5 +35,6 @@ "typescript.selectTypeScriptVersion.title": "Select TypeScript Version", "jsDocCompletion.enabled": "Enable/disable auto JSDoc comments", "javascript.implicitProjectConfig.checkJs": "Enable/disable semantic checking of JavaScript files. Existing jsconfig.json or tsconfig.json files override this setting. Requires TypeScript >=2.3.1.", - "typescript.check.npmIsInstalled": "Check if NPM is installed for automatic typings acquisition" + "typescript.check.npmIsInstalled": "Check if NPM is installed for automatic typings acquisition", + "javascript.nameSuggestions": "Enable/disable including unique names from the file in JavaScript suggestion lists." } diff --git a/extensions/typescript/src/features/completionItemProvider.ts b/extensions/typescript/src/features/completionItemProvider.ts index f65d27f5009e3..618c84174bc7f 100644 --- a/extensions/typescript/src/features/completionItemProvider.ts +++ b/extensions/typescript/src/features/completionItemProvider.ts @@ -128,11 +128,13 @@ class MyCompletionItem extends CompletionItem { } interface Configuration { - useCodeSnippetsOnMethodSuggest?: boolean; + useCodeSnippetsOnMethodSuggest: boolean; + nameSuggestions: boolean; } namespace Configuration { export const useCodeSnippetsOnMethodSuggest = 'useCodeSnippetsOnMethodSuggest'; + export const nameSuggestions = 'nameSuggestions'; } export default class TypeScriptCompletionItemProvider implements CompletionItemProvider { @@ -143,13 +145,19 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP private client: ITypescriptServiceClient, private typingsStatus: TypingsStatus ) { - this.config = { useCodeSnippetsOnMethodSuggest: false }; + this.config = { + useCodeSnippetsOnMethodSuggest: false, + nameSuggestions: true + }; } public updateConfiguration(): void { // Use shared setting for js and ts const typeScriptConfig = workspace.getConfiguration('typescript'); this.config.useCodeSnippetsOnMethodSuggest = typeScriptConfig.get(Configuration.useCodeSnippetsOnMethodSuggest, false); + + const jsConfig = workspace.getConfiguration('javascript'); + this.config.nameSuggestions = jsConfig.get(Configuration.nameSuggestions, true); } public provideCompletionItems(document: TextDocument, position: Position, token: CancellationToken): Promise { @@ -208,6 +216,9 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP } for (const element of body) { + if (element.kind === PConst.Kind.warning && !this.config.nameSuggestions) { + continue; + } const item = new MyCompletionItem(position, document, element, enableDotCompletions, !this.config.useCodeSnippetsOnMethodSuggest); completionItems.push(item); } From 46b81d14de09a5e98ec7d44e5b1d3c3c0bd53d77 Mon Sep 17 00:00:00 2001 From: Yu-Hsin Hung Date: Wed, 17 May 2017 11:43:36 +0800 Subject: [PATCH 0600/2747] Fix for terminal.foreground not working when terminal.background is not set --- .../workbench/parts/terminal/electron-browser/terminalPanel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 89dcbae71dab6..7c905e2903da2 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -235,7 +235,7 @@ export class TerminalPanel extends Panel { css += `.monaco-workbench .panel.integrated-terminal .terminal-outer-container { background-color: ${bgColor}; }`; } const fgColor = theme.getColor(TERMINAL_FOREGROUND_COLOR); - if (bgColor) { + if (fgColor) { css += `.monaco-workbench .panel.integrated-terminal .xterm { color: ${fgColor}; }`; } From 9843623452cbb9eea0c57e2ccc371b4d2c3c2d37 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 16 May 2017 22:20:12 -0700 Subject: [PATCH 0601/2747] Make TextEditorOptions.fromEditor static (#26779) Refactors TextEditorOptions.fromEditor to a static method instead of an instance method. This method is only called after creation of the options object and currently requires using a weird cast in a few places --- .../browser/parts/editor/editorActions.ts | 7 ++----- .../browser/parts/editor/editorGroupsControl.ts | 3 +-- .../workbench/browser/parts/editor/editorPart.ts | 3 +-- src/vs/workbench/common/editor.ts | 16 +++++++++------- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index 4419e71028327..f7f5e2e9b8382 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -60,8 +60,7 @@ export class SplitEditorAction extends Action { let options: EditorOptions; const codeEditor = getCodeEditor(editorToSplit); if (codeEditor) { - options = new TextEditorOptions(); - (options).fromEditor(codeEditor); + options = TextEditorOptions.fromEditor(codeEditor); } else { options = new EditorOptions(); } @@ -317,9 +316,7 @@ export abstract class BaseFocusSideGroupAction extends Action { let options: EditorOptions; const codeEditor = getCodeEditor(referenceEditor); if (codeEditor) { - options = new TextEditorOptions(); - options.pinned = true; - (options).fromEditor(codeEditor); + options = TextEditorOptions.fromEditor(codeEditor, { pinned: true }); } else { options = EditorOptions.create({ pinned: true }); } diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index ea8e7c92f961a..dea7059b171f2 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -1054,8 +1054,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro const activeEditor = $this.editorService.getActiveEditor(); const editor = getCodeEditor(activeEditor); if (editor && activeEditor.position === stacks.positionOfGroup(identifier.group) && identifier.editor.matches(activeEditor.input)) { - options = TextEditorOptions.create({ pinned: true }); - (options).fromEditor(editor); + options = TextEditorOptions.fromEditor(editor, { pinned: true }); } return options; diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index bcddcea6c578e..be76d1a4ff6db 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -878,8 +878,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService const activeEditor = this.getActiveEditor(); const codeEditor = getCodeEditor(activeEditor); if (codeEditor && activeEditor.position === this.stacks.positionOfGroup(fromGroup) && input.matches(activeEditor.input)) { - options = TextEditorOptions.create({ pinned: true, index, inactive, preserveFocus }); - (options).fromEditor(codeEditor); + options = TextEditorOptions.fromEditor(codeEditor, { pinned: true, index, inactive, preserveFocus }); } // A move to another group is an open first... diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index 8636bc66ef0b2..12cf8f3ea7470 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -685,24 +685,26 @@ export class TextEditorOptions extends EditorOptions { } /** - * Sets the view state to be used when the editor is opening. + * Create a TextEditorOptions inline to be used when the editor is opening. */ - public fromEditor(editor: IEditor): void { + public static fromEditor(editor: IEditor, settings?: IEditorOptions): TextEditorOptions { + const options = TextEditorOptions.create(settings); // View state - this.editorViewState = editor.saveViewState(); + options.editorViewState = editor.saveViewState(); // Selected editor options const codeEditor = editor; if (typeof codeEditor.getConfiguration === 'function') { const config = codeEditor.getConfiguration(); if (config && config.viewInfo && config.wrappingInfo) { - this.editorOptions = Object.create(null); - this.editorOptions.renderWhitespace = config.viewInfo.renderWhitespace; - this.editorOptions.renderControlCharacters = config.viewInfo.renderControlCharacters; - this.editorOptions.wordWrap = config.wrappingInfo.isViewportWrapping ? 'on' : 'off'; + options.editorOptions = Object.create(null); + options.editorOptions.renderWhitespace = config.viewInfo.renderWhitespace; + options.editorOptions.renderControlCharacters = config.viewInfo.renderControlCharacters; + options.editorOptions.wordWrap = config.wrappingInfo.isViewportWrapping ? 'on' : 'off'; } } + return options; } /** From 3999d8112b494d120944432af8ed2338d78e7329 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 17 May 2017 07:51:53 +0200 Subject: [PATCH 0602/2747] tfs: linux build stats --- build/tfs/darwin/build.sh | 6 +-- build/tfs/linux/build.sh | 84 ++++++++++++++++----------------------- 2 files changed, 35 insertions(+), 55 deletions(-) diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index 5cafa89f53680..fb71e9885e1d0 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -9,11 +9,7 @@ export MOONCAKE_STORAGE_ACCESS_KEY="$4" export AZURE_DOCUMENTDB_MASTERKEY="$5" VSO_PAT="$6" -# Create a .netrc file to download distro dependencies -cat > ~/.netrc < ~/.netrc step "Install dependencies" \ ./scripts/npm.sh install diff --git a/build/tfs/linux/build.sh b/build/tfs/linux/build.sh index cdf4add310760..1c5afd88aa9c3 100755 --- a/build/tfs/linux/build.sh +++ b/build/tfs/linux/build.sh @@ -1,5 +1,6 @@ #!/bin/bash -set -e + +. build/tfs/common/common.sh export ARCH="$1" export VSCODE_MIXIN_PASSWORD="$2" @@ -10,51 +11,32 @@ export AZURE_DOCUMENTDB_MASTERKEY="$6" export LINUX_REPO_PASSWORD="$7" VSO_PAT="$8" -# Create a .netrc file to download distro dependencies -cat > ~/.netrc < ~/.netrc -STEP "Install dependencies" -./scripts/npm.sh install --arch=$ARCH --unsafe-perm +step "Install dependencies" \ + ./scripts/npm.sh install --arch=$ARCH --unsafe-perm -STEP "Mix in repository from vscode-distro" -npm run gulp -- mixin +step "Mix in repository from vscode-distro" \ + npm run gulp -- mixin -STEP "Install distro dependencies" -npm run install-distro +step "Install distro dependencies" \ + npm run install-distro -STEP "Build minified" -npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-min" +step "Build minified" \ + npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-min" -STEP "Build Debian package" -npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-deb" +step "Build Debian package" \ + npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-deb" -STEP "Build RPM package" -npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-rpm" +step "Build RPM package" \ + npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-rpm" -STEP "Run unit tests" -#[[ "$ARCH" == "x64" ]] && ./scripts/test.sh --xvfb --build --reporter dot +#step "Run unit tests" \ + #[[ "$ARCH" == "x64" ]] && ./scripts/test.sh --xvfb --build --reporter dot -STEP "Install build dependencies" -(cd $BUILD_SOURCESDIRECTORY/build/tfs/common && npm install --unsafe-perm) +(cd $BUILD_SOURCESDIRECTORY/build/tfs/common && \ + step "Install build dependencies" \ + npm install --unsafe-perm) # Variables PLATFORM_LINUX="linux-$ARCH" @@ -72,26 +54,26 @@ TARBALL_PATH="$ROOT/$TARBALL_FILENAME" PACKAGEJSON="$BUILD/resources/app/package.json" VERSION=$(node -p "require(\"$PACKAGEJSON\").version") -STEP "Create tar.gz archive" rm -rf $ROOT/code-*.tar.* -pushd $ROOT -tar -czvf $TARBALL_PATH $BUILDNAME -popd +(cd $ROOT && \ + step "Create tar.gz archive" \ + tar -czvf $TARBALL_PATH $BUILDNAME) -STEP "Publish tar.gz archive" -node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_LINUX archive-unsigned $TARBALL_FILENAME $VERSION true $TARBALL_PATH +step "Publish tar.gz archive" \ + node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_LINUX archive-unsigned $TARBALL_FILENAME $VERSION true $TARBALL_PATH -STEP "Publish Debian package" DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)" DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME" -node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_DEB package $DEB_FILENAME $VERSION true $DEB_PATH -STEP "Publish RPM package" +step "Publish Debian package" \ + node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_DEB package $DEB_FILENAME $VERSION true $DEB_PATH + RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)" RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME" -node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_RPM package $RPM_FILENAME $VERSION true $RPM_PATH -STEP "Publish to repositories" +step "Publish RPM package" \ + node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_RPM package $RPM_FILENAME $VERSION true $RPM_PATH + if [ -z "$VSCODE_QUALITY" ]; then echo "VSCODE_QUALITY is not set, skipping repo package publish" else @@ -112,7 +94,9 @@ else eval echo '{ \"name\": \"$PACKAGE_NAME\", \"version\": \"$PACKAGE_VERSION\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"sourceUrl\": \"$DEB_URL\" }' > apt-addpkg.json echo "Submitting apt-addpkg.json:" cat apt-addpkg.json - ./repoapi_client.sh -config apt-config.json -addpkg apt-addpkg.json + + step "Publish to repositories" \ + ./repoapi_client.sh -config apt-config.json -addpkg apt-addpkg.json fi # Submit to yum repo (disabled as it's manual until signing is automated) # eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"username\": \"$LINUX_REPO_USERNAME\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > yum-config.json From d2d9c02ea6f74d3775405851f4db667780fb06bb Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 17 May 2017 08:02:53 +0200 Subject: [PATCH 0603/2747] tfs: update dockerfile --- build/tfs/linux/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/build/tfs/linux/Dockerfile b/build/tfs/linux/Dockerfile index 771d132e6623f..70142abfa7773 100644 --- a/build/tfs/linux/Dockerfile +++ b/build/tfs/linux/Dockerfile @@ -25,3 +25,4 @@ RUN apt-get install -y libxkbfile-dev:i386 RUN apt-get install -y libxss1 libxss1:i386 RUN apt-get install -y libx11-xcb-dev libx11-xcb-dev:i386 RUN apt-get install -y libxkbfile-dev +RUN apt-get install -y bc bsdmainutils From 28bcf9d05ba9d5b169a49f5b14b44a9ef9caa3ce Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 17 May 2017 08:21:55 +0200 Subject: [PATCH 0604/2747] theming - search viewlet --- .../editor/browser/widget/diffEditorWidget.ts | 13 +--- src/vs/platform/theme/common/colorRegistry.ts | 14 +++- .../search/browser/media/searchviewlet.css | 64 +------------------ .../parts/search/browser/searchViewlet.ts | 34 ++++++++-- 4 files changed, 46 insertions(+), 79 deletions(-) diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index 00a9e0f42e154..8ab50398262fc 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -6,7 +6,6 @@ 'use strict'; import 'vs/css!./media/diffEditor'; -import * as nls from 'vs/nls'; import { RunOnceScheduler } from 'vs/base/common/async'; import { Disposable } from 'vs/base/common/lifecycle'; import * as objects from 'vs/base/common/objects'; @@ -33,8 +32,8 @@ import { ColorId, MetadataConsts, FontStyle } from 'vs/editor/common/modes'; import Event, { Emitter } from 'vs/base/common/event'; import * as editorOptions from 'vs/editor/common/config/editorOptions'; import { registerThemingParticipant, IThemeService, ITheme, getThemeTypeSelector } from 'vs/platform/theme/common/themeService'; -import { registerColor, scrollbarShadow } from 'vs/platform/theme/common/colorRegistry'; -import { Color, RGBA } from 'vs/base/common/color'; +import { scrollbarShadow, diffInserted, diffRemoved, defaultInsertColor, defaultRemoveColor, diffInsertedOutline, diffRemovedOutline } from 'vs/platform/theme/common/colorRegistry'; +import { Color } from 'vs/base/common/color'; import { OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; @@ -1946,14 +1945,6 @@ function createFakeLinesDiv(): HTMLElement { return r; } -const defaultInsertColor = Color.fromRGBA(new RGBA(155, 185, 85, 255 * 0.2)); -const defaultRemoveColor = Color.fromRGBA(new RGBA(255, 0, 0, 255 * 0.2)); - -export const diffInserted = registerColor('diffEditor.insertedTextBackground', { dark: defaultInsertColor, light: defaultInsertColor, hc: null }, nls.localize('diffEditorInserted', 'Background color for text that got inserted.')); -export const diffRemoved = registerColor('diffEditor.removedTextBackground', { dark: defaultRemoveColor, light: defaultRemoveColor, hc: null }, nls.localize('diffEditorRemoved', 'Background color for text that got removed.')); -export const diffInsertedOutline = registerColor('diffEditor.insertedTextBorder', { dark: null, light: null, hc: '#33ff2eff' }, nls.localize('diffEditorInsertedOutline', 'Outline color for the text that got inserted.')); -export const diffRemovedOutline = registerColor('diffEditor.removedTextBorder', { dark: null, light: null, hc: '#FF008F' }, nls.localize('diffEditorRemovedOutline', 'Outline color for text that got removed.')); - registerThemingParticipant((theme, collector) => { let added = theme.getColor(diffInserted); if (added) { diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 23f915d5a7eaf..d8aa35889d837 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -6,7 +6,7 @@ import platform = require('vs/platform/platform'); import { IJSONSchema } from 'vs/base/common/jsonSchema'; -import { Color } from 'vs/base/common/color'; +import { Color, RGBA } from 'vs/base/common/color'; import { ITheme } from 'vs/platform/theme/common/themeService'; import nls = require('vs/nls'); @@ -243,6 +243,18 @@ export const editorHoverBorder = registerColor('editorHoverWidget.border', { lig */ export const editorActiveLinkForeground = registerColor('editorLink.activeForeground', { dark: '#4E94CE', light: Color.blue, hc: Color.cyan }, nls.localize('activeLinkForeground', 'Color of active links.')); +/** + * Diff Editor Colors + */ +export const defaultInsertColor = Color.fromRGBA(new RGBA(155, 185, 85, 255 * 0.2)); +export const defaultRemoveColor = Color.fromRGBA(new RGBA(255, 0, 0, 255 * 0.2)); + +export const diffInserted = registerColor('diffEditor.insertedTextBackground', { dark: defaultInsertColor, light: defaultInsertColor, hc: null }, nls.localize('diffEditorInserted', 'Background color for text that got inserted.')); +export const diffRemoved = registerColor('diffEditor.removedTextBackground', { dark: defaultRemoveColor, light: defaultRemoveColor, hc: null }, nls.localize('diffEditorRemoved', 'Background color for text that got removed.')); + +export const diffInsertedOutline = registerColor('diffEditor.insertedTextBorder', { dark: null, light: null, hc: '#33ff2eff' }, nls.localize('diffEditorInsertedOutline', 'Outline color for the text that got inserted.')); +export const diffRemovedOutline = registerColor('diffEditor.removedTextBorder', { dark: null, light: null, hc: '#FF008F' }, nls.localize('diffEditorRemovedOutline', 'Outline color for text that got removed.')); + // ----- color functions export function darken(colorValue: ColorValue, factor: number): ColorFunction { diff --git a/src/vs/workbench/parts/search/browser/media/searchviewlet.css b/src/vs/workbench/parts/search/browser/media/searchviewlet.css index c223b283c8582..946b5b2edfa8d 100644 --- a/src/vs/workbench/parts/search/browser/media/searchviewlet.css +++ b/src/vs/workbench/parts/search/browser/media/searchviewlet.css @@ -203,28 +203,6 @@ font-style: italic; } -.search-viewlet .checkbox { - display: inline-block; - visibility: hidden; - border: 1px solid rgba(128, 128, 128, 0.5); - width: 0; - height: 12px; - margin-right: 0; - position: relative; - top: 2px; - transition: width 150ms, margin-right 150ms ease-in; -} - -.search-viewlet .linematch .checkbox.checked { - background-position: -66px -150px; -} - -.search-viewlet .select .linematch .checkbox { - visibility: visible; - width: 12px; - margin-right: 4px; -} - .search-viewlet .query-clear { background: url("action-query-clear.svg") center center no-repeat; } @@ -354,16 +332,8 @@ background: url('excludeSettings-dark.svg') center center no-repeat; } -.search-viewlet .findInFileMatch, -.monaco-editor .findInFileMatch { - background-color: rgba(234, 92, 0, 0.3); - animation-duration: 0; - animation-name: inherit !important; -} - .search-viewlet .replace.findInFileMatch { text-decoration: line-through; - background-color: rgba(255, 0, 0, 0.2); } .search-viewlet .findInFileMatch, @@ -371,45 +341,18 @@ white-space: pre; } -.search-viewlet .replaceMatch { - background-color: rgba(155, 185, 85, 0.5); -} - .hc-black .monaco-workbench .search-viewlet .replaceMatch, -.hc-black .monaco-workbench .search-viewlet .findInFileMatch, -.monaco-editor.hc-black .findInFileMatch { +.hc-black .monaco-workbench .search-viewlet .findInFileMatch { background: none !important; - border: 1px dotted #f38518; box-sizing: border-box; } -.hc-black .monaco-workbench .search-viewlet .replace.findInFileMatch { - border: 1px dashed #FF008F; -} - -.hc-black .monaco-workbench .search-viewlet .replaceMatch { - border: 1px dashed rgb(51, 255, 46); -} - .monaco-workbench .search-viewlet a.prominent { text-decoration: underline; } /* Theming */ -.search-viewlet .highlight { - color: black; - background-color: rgba(234, 92, 0, 0.3); -} - -.vs .search-viewlet .filematch .name { - color: #1E1E1E; -} - -.vs .search-viewlet .monaco-tree.focused .monaco-tree-row.selected .filematch .name { - color: #FFF; -} - .vs .search-viewlet .search-widget .toggle-replace-button:hover { background-color: rgba(0, 0, 0, 0.1) !important; } @@ -426,10 +369,6 @@ background-image: url('expando-expanded.svg'); } -.vs-dark .search-viewlet .monaco-tree .filematch .name { - color: #FFF; -} - .vs-dark .search-viewlet .query-clear { background: url("action-query-clear-dark.svg") center center no-repeat; } @@ -440,7 +379,6 @@ } .vs-dark .search-viewlet .message { - color: #FFF; opacity: .5; } diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index fcc011c2b7328..ebb3c5d321707 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -57,7 +57,7 @@ import { OpenFolderAction, OpenFileFolderAction } from 'vs/workbench/browser/act import * as Constants from 'vs/workbench/parts/search/common/constants'; import { IListService } from 'vs/platform/list/browser/listService'; import { IThemeService, ITheme, ICssStyleCollector, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { editorFindMatchHighlight } from 'vs/platform/theme/common/colorRegistry'; +import { editorFindMatchHighlight, diffInserted, diffRemoved, diffInsertedOutline, diffRemovedOutline, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import FileResultsNavigation from 'vs/workbench/browser/fileResultsNavigation'; import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IOutputService } from 'vs/workbench/parts/output/common/output'; @@ -1369,9 +1369,35 @@ export class SearchViewlet extends Viewlet { } registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { - let matchHighlightColor = theme.getColor(editorFindMatchHighlight); + const matchHighlightColor = theme.getColor(editorFindMatchHighlight); if (matchHighlightColor) { - collector.addRule(`.search-viewlet .findInFileMatch { background-color: ${matchHighlightColor}; }`); - collector.addRule(`.search-viewlet .highlight { background-color: ${matchHighlightColor}; }`); + collector.addRule(`.monaco-workbench .search-viewlet .findInFileMatch { background-color: ${matchHighlightColor}; }`); + } + + const diffInsertedColor = theme.getColor(diffInserted); + if (diffInsertedColor) { + collector.addRule(`.monaco-workbench .search-viewlet .replaceMatch { background-color: ${diffInsertedColor}; }`); + } + + const diffRemovedColor = theme.getColor(diffRemoved); + if (diffRemovedColor) { + collector.addRule(`.monaco-workbench .search-viewlet .replace.findInFileMatch { background-color: ${diffRemovedColor}; }`); + } + + const diffInsertedOutlineColor = theme.getColor(diffInsertedOutline); + if (diffInsertedOutlineColor) { + collector.addRule(`.monaco-workbench .search-viewlet .replaceMatch:not(:empty) { border: 1px dashed ${diffInsertedOutlineColor}; }`); + } + + const diffRemovedOutlineColor = theme.getColor(diffRemovedOutline); + if (diffRemovedOutlineColor) { + collector.addRule(`.monaco-workbench .search-viewlet .replace.findInFileMatch { border: 1px dashed ${diffRemovedOutlineColor}; }`); + } + + const activeContrastBorderColor = theme.getColor(activeContrastBorder); + if (activeContrastBorderColor) { + collector.addRule(` + .monaco-workbench .search-viewlet .findInFileMatch { border: 1px dashed ${activeContrastBorderColor}; } + `); } }); \ No newline at end of file From c123897472817cf25f059bb6e2372a5120f737f3 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 17 May 2017 09:27:21 +0200 Subject: [PATCH 0605/2747] tfs: update bash step function --- build/tfs/common/common.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/build/tfs/common/common.sh b/build/tfs/common/common.sh index d85788664e927..52f5353794345 100755 --- a/build/tfs/common/common.sh +++ b/build/tfs/common/common.sh @@ -8,7 +8,7 @@ then echo "Using npm cache: $npm_config_cache" fi -SUMMARY="" +SUMMARY="Task;Duration"$'\n' step() { START=$SECONDS TASK=$1; shift @@ -17,17 +17,23 @@ step() { echo "Start: $TASK" echo "*****************************************************************************" "$@" - DURATION=$(echo "$SECONDS - $START" | bc) + + # Calculate total duration + TOTAL=$(echo "$SECONDS - $START" | bc) + M=$(echo "$TOTAL / 60" | bc) + S=$(echo "$TOTAL % 60" | bc) + DURATION="$(printf "%02d" $M):$(printf "%02d" $S)" + echo "*****************************************************************************" - echo "End: $TASK, $DURATION seconds" + echo "End: $TASK, Total: $DURATION" echo "*****************************************************************************" - SUMMARY="$SUMMARY$TASK;$DURATION seconds"$'\n' + SUMMARY="$SUMMARY$TASK;$DURATION"$'\n' } done_steps() { echo "" - echo "Task Summary" - echo "============" + echo "Build Summary" + echo "=============" echo "${SUMMARY}" | column -t -s';' } From 0a93ace1c79bd6515366f37ddaea620b51e2cf59 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 17 May 2017 09:43:42 +0200 Subject: [PATCH 0606/2747] fix build --- build/gulpfile.hygiene.js | 1 + 1 file changed, 1 insertion(+) diff --git a/build/gulpfile.hygiene.js b/build/gulpfile.hygiene.js index b2566cdac1b30..1c716b56f99c6 100644 --- a/build/gulpfile.hygiene.js +++ b/build/gulpfile.hygiene.js @@ -42,6 +42,7 @@ const eolFilter = [ '!build/monaco/**', '!build/win32/**', '!build/**/*.sh', + '!build/tfs/**/*.js', '!**/Dockerfile' ]; From 2fbc979be2bd0fec6dc2af713367b2930f818121 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 17 May 2017 10:03:11 +0200 Subject: [PATCH 0607/2747] Split editor command (Cmd+|) throws exception (fixes #26801) --- src/vs/workbench/common/editor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index 12cf8f3ea7470..95235bc57e5b3 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -645,7 +645,7 @@ export class TextEditorOptions extends EditorOptions { /** * Helper to create TextEditorOptions inline. */ - public static create(settings: ITextEditorOptions): TextEditorOptions { + public static create(settings: ITextEditorOptions = Object.create(null)): TextEditorOptions { const options = new TextEditorOptions(); options.preserveFocus = settings.preserveFocus; options.forceOpen = settings.forceOpen; From 506ec62591a949c2d0f3686817b6a5f40c207fc2 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 17 May 2017 10:29:50 +0200 Subject: [PATCH 0608/2747] tfs: improve win32 step --- build/tfs/win32/1_build.ps1 | 37 ++++++++++++++++++++--------------- build/tfs/win32/2_package.ps1 | 7 +++++-- build/tfs/win32/3_upload.ps1 | 21 ++++++++++++-------- build/tfs/win32/lib.ps1 | 32 +++++++++++++++++++++++------- 4 files changed, 64 insertions(+), 33 deletions(-) diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index 1f120965a1746..940cf92a7a39d 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -9,26 +9,31 @@ Param( $env:HOME=$env:USERPROFILE # Create a _netrc file to download distro dependencies -@" -machine monacotools.visualstudio.com -password ${vsoPAT} -"@ | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII +"machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII -STEP "Install dependencies" -exec { & .\scripts\npm.bat install } +step "Install dependencies" { + exec { & .\scripts\npm.bat install } +} -STEP "Mix in repository from vscode-distro" $env:VSCODE_MIXIN_PASSWORD = $mixinPassword -exec { & npm run gulp -- mixin } +step "Mix in repository from vscode-distro" { + exec { & npm run gulp -- mixin } +} -STEP "Install distro dependencies" -exec { & npm run install-distro } +step "Install distro dependencies" { + exec { & npm run install-distro } +} -STEP "Build minified" -exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-min } +step "Build minified" { + exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-min } +} -STEP "Run unit tests" -exec { & .\scripts\test.bat --build --reporter dot } +step "Run unit tests" { + exec { & .\scripts\test.bat --build --reporter dot } +} -# STEP "Run integration tests" -# exec { & .\scripts\test-integration.bat } \ No newline at end of file +# step "Run integration tests" { +# exec { & .\scripts\test-integration.bat } +# } + +done \ No newline at end of file diff --git a/build/tfs/win32/2_package.ps1 b/build/tfs/win32/2_package.ps1 index 689eccc5e3067..7d29cca6c3a7e 100644 --- a/build/tfs/win32/2_package.ps1 +++ b/build/tfs/win32/2_package.ps1 @@ -1,4 +1,7 @@ . .\build\tfs\win32\lib.ps1 -STEP "Create archive and setup package" -exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-archive vscode-win32-setup } \ No newline at end of file +step "Create archive and setup package" { + exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-archive vscode-win32-setup } +} + +done \ No newline at end of file diff --git a/build/tfs/win32/3_upload.ps1 b/build/tfs/win32/3_upload.ps1 index c11efbaff47c3..9c0a7ca2bf17f 100644 --- a/build/tfs/win32/3_upload.ps1 +++ b/build/tfs/win32/3_upload.ps1 @@ -17,17 +17,22 @@ $PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | Conv $Version = $PackageJson.version $Quality = "$env:VSCODE_QUALITY" -STEP "Install build dependencies" -pushd "$Repo\build\tfs\common" -exec { & npm i } -popd +step "Install build dependencies" { + pushd "$Repo\build\tfs\common" + exec { & npm i } + popd +} $env:AZURE_STORAGE_ACCESS_KEY_2 = $storageKey $env:MOONCAKE_STORAGE_ACCESS_KEY = $mooncakeStorageKey $env:AZURE_DOCUMENTDB_MASTERKEY = $documentDbKey -STEP "Publish archive" -exec { & node build/tfs/common/publish.js $Quality win32-archive archive "VSCode-win32-$Version.zip" $Version true $Zip } +step "Publish archive" { + exec { & node build/tfs/common/publish.js $Quality win32-archive archive "VSCode-win32-$Version.zip" $Version true $Zip } +} -STEP "Publish setup package" -exec { & node build/tfs/common/publish.js $Quality win32 setup "VSCodeSetup-$Version.exe" $Version true $Exe } +step "Publish setup package" { + exec { & node build/tfs/common/publish.js $Quality win32 setup "VSCodeSetup-$Version.exe" $Version true $Exe } +} + +done \ No newline at end of file diff --git a/build/tfs/win32/lib.ps1 b/build/tfs/win32/lib.ps1 index c78d3fdf9ef31..610b4d7fcdfed 100644 --- a/build/tfs/win32/lib.ps1 +++ b/build/tfs/win32/lib.ps1 @@ -14,11 +14,29 @@ function exec([scriptblock]$cmd, [string]$errorMessage = "Error executing comman } } -# log build step -function STEP() { - Write-Host "" - Write-Host "********************************************************************************" - Write-Host "*** $args" - Write-Host "********************************************************************************" - Write-Host "" +$Summary = @() +function step($Task, $Step) { + echo "" + echo "*****************************************************************************" + echo "Start: $Task" + echo "*****************************************************************************" + echo "" + + $Stopwatch = [Diagnostics.Stopwatch]::StartNew() + Invoke-Command $Step + $Stopwatch.Stop() + $Formatted = "{0:g}" -f $Stopwatch.Elapsed + + echo "*****************************************************************************" + echo "End: $Task, Total: $Formatted" + echo "*****************************************************************************" + + $global:Summary += @{ "$Task" = $Formatted } } + +function done() { + echo "" + echo "Build Summary" + echo "=============" + $global:Summary | Format-Table @{L="Task";E={$_.Name}}, @{L="Duration";E={$_.Value}} +} \ No newline at end of file From 3df725b2c9dc3538fdaaee592a183900e3eb9196 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 17 May 2017 10:45:25 +0200 Subject: [PATCH 0609/2747] Bracket matching box too large (regression from #26104) --- .../editor/contrib/bracketMatching/browser/bracketMatching.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.css b/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.css index d0acbab2da480..3acf3fd25bf6a 100644 --- a/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.css +++ b/src/vs/editor/contrib/bracketMatching/browser/bracketMatching.css @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ .monaco-editor .bracket-match { - background-color: rgba(0, 100, 0, 0.1); + box-sizing: border-box; } From 70912d13f81220398554fb3a2250f0c98611acff Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 17 May 2017 11:13:45 +0200 Subject: [PATCH 0610/2747] tfs: remove windows build step --- build/tfs/win32/3_upload.ps1 | 7 ------- 1 file changed, 7 deletions(-) diff --git a/build/tfs/win32/3_upload.ps1 b/build/tfs/win32/3_upload.ps1 index 9c0a7ca2bf17f..5b7e4a0f482c6 100644 --- a/build/tfs/win32/3_upload.ps1 +++ b/build/tfs/win32/3_upload.ps1 @@ -16,13 +16,6 @@ $Build = "$Root\VSCode-win32" $PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json $Version = $PackageJson.version $Quality = "$env:VSCODE_QUALITY" - -step "Install build dependencies" { - pushd "$Repo\build\tfs\common" - exec { & npm i } - popd -} - $env:AZURE_STORAGE_ACCESS_KEY_2 = $storageKey $env:MOONCAKE_STORAGE_ACCESS_KEY = $mooncakeStorageKey $env:AZURE_DOCUMENTDB_MASTERKEY = $documentDbKey From 2fb3b186bc7c67616a00147e1d9e74eb3665e2a1 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 17 May 2017 11:44:32 +0200 Subject: [PATCH 0611/2747] debug toolbar: default position all the way to the right and introduce telemetry #2513 --- .../parts/debug/browser/debugActionsWidget.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts index 549480112b913..dc9a9d0d19dcd 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts @@ -114,7 +114,9 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi const mouseClickEvent = new StandardMouseEvent(event); if (mouseClickEvent.detail === 2) { // double click on debug bar centers it again #8250 - this.setXCoordinate(0.5 * window.innerWidth); + const widgetWidth = this.$el.getHTMLElement().clientWidth; + this.setXCoordinate(window.innerWidth - widgetWidth); + this.storePosition(); } }); @@ -129,8 +131,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi // Reduce x by width of drag handle to reduce jarring #16604 this.setXCoordinate(mouseMoveEvent.posx - 14); }).once('mouseup', (e: MouseEvent) => { - const mouseMoveEvent = new StandardMouseEvent(e); - this.storageService.store(DEBUG_ACTIONS_WIDGET_POSITION_KEY, mouseMoveEvent.posx / window.innerWidth, StorageScope.WORKSPACE); + this.storePosition(); this.dragArea.removeClass('dragged'); $window.off('mousemove'); }); @@ -140,6 +141,12 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi this.toDispose.push(browser.onDidChangeZoomLevel(() => this.positionDebugWidget())); } + private storePosition(): void { + const position = parseFloat(this.$el.getComputedStyle().left) / window.innerWidth; + this.storageService.store(DEBUG_ACTIONS_WIDGET_POSITION_KEY, position, StorageScope.WORKSPACE); + this.telemetryService.publicLog(DEBUG_ACTIONS_WIDGET_POSITION_KEY, { position }); + } + protected updateStyles(): void { super.updateStyles(); @@ -167,7 +174,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi return; } if (x === undefined) { - x = parseFloat(this.storageService.get(DEBUG_ACTIONS_WIDGET_POSITION_KEY, StorageScope.WORKSPACE, '0.5')) * window.innerWidth; + x = parseFloat(this.storageService.get(DEBUG_ACTIONS_WIDGET_POSITION_KEY, StorageScope.WORKSPACE, '1')) * window.innerWidth; } const widgetWidth = this.$el.getHTMLElement().clientWidth; From 1fb2d844ede7a3d0f1554cf66f0f79999017fe85 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 17 May 2017 11:48:46 +0200 Subject: [PATCH 0612/2747] remove build from test script --- build/tfs/linux/build.sh | 6 +++--- scripts/test.sh | 7 ------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/build/tfs/linux/build.sh b/build/tfs/linux/build.sh index 1c5afd88aa9c3..f86e9f7182746 100755 --- a/build/tfs/linux/build.sh +++ b/build/tfs/linux/build.sh @@ -25,15 +25,15 @@ step "Install distro dependencies" \ step "Build minified" \ npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-min" +# step "Run unit tests" \ +# [[ "$ARCH" == "x64" ]] && ./scripts/test.sh --xvfb --build --reporter dot + step "Build Debian package" \ npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-deb" step "Build RPM package" \ npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-rpm" -#step "Run unit tests" \ - #[[ "$ARCH" == "x64" ]] && ./scripts/test.sh --xvfb --build --reporter dot - (cd $BUILD_SOURCESDIRECTORY/build/tfs/common && \ step "Install build dependencies" \ npm install --unsafe-perm) diff --git a/scripts/test.sh b/scripts/test.sh index ebe3977419312..19b79bf58438d 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -26,17 +26,10 @@ test -d node_modules || ./scripts/npm.sh install # Get electron (test -f "$CODE" && [ $INTENDED_VERSION == $INSTALLED_VERSION ]) || ./node_modules/.bin/gulp electron -# Build -test -d out || ./node_modules/.bin/gulp compile -echo "code $CODE" - # Unit Tests -export VSCODE_DEV=1 - if [[ "$1" == "--xvfb" ]]; then cd $ROOT ; \ xvfb-run "$CODE" test/electron/index.js "$@" - elif [[ "$OSTYPE" == "darwin"* ]]; then cd $ROOT ; ulimit -n 4096 ; \ "$CODE" \ From db42b305980f53f86eaa50fac6f24e988858bcd1 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 17 May 2017 13:41:42 +0200 Subject: [PATCH 0613/2747] add startupTimer, use it some places --- build/gulpfile.vscode.js | 1 + src/vs/base/common/startupTimers.d.ts | 32 +++++++ src/vs/base/common/startupTimers.js | 88 +++++++++++++++++++ .../electron-browser/bootstrap/index.js | 5 ++ .../workbench/electron-browser/workbench.ts | 4 +- 5 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 src/vs/base/common/startupTimers.d.ts create mode 100644 src/vs/base/common/startupTimers.js diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index e51fa9c2ec27f..a7a811dac2222 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -60,6 +60,7 @@ const vscodeResources = [ 'out-build/bootstrap-amd.js', 'out-build/paths.js', 'out-build/vs/**/*.{svg,png,cur,html}', + 'out-build/vs/base/common/startupTimers.js', 'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh}', 'out-build/vs/base/browser/ui/octiconLabel/octicons/**', 'out-build/vs/workbench/browser/media/*-theme.css', diff --git a/src/vs/base/common/startupTimers.d.ts b/src/vs/base/common/startupTimers.d.ts new file mode 100644 index 0000000000000..fa9b536387749 --- /dev/null +++ b/src/vs/base/common/startupTimers.d.ts @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +declare interface TickStart { + name: string; + started: number; +} + +export declare class Tick { + + readonly duration: number; + readonly name: string; + readonly started: number; + readonly stopped: number; + + static compareByStart(a: Tick, b: Tick): number; +} + +declare interface TickController { + while>(t: T): T; + stop(stopped?: number): void; +} + +export function startTimer(name: string, started?: number): TickController; + +export function stopTimer(name: string, stopped?: number); + +export function ticks(): ReadonlyArray; + +export function disable(): void; diff --git a/src/vs/base/common/startupTimers.js b/src/vs/base/common/startupTimers.js new file mode 100644 index 0000000000000..cbaeab198af39 --- /dev/null +++ b/src/vs/base/common/startupTimers.js @@ -0,0 +1,88 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +if (typeof define !== "function" && typeof module === "object" && typeof module.exports === "object") { + + global.define = function (dep, callback) { + module.exports = callback(); + global.define = undefined; + } +} +define([], function () { + + function Tick(name, started, stopped) { + this.name = name + this.started = started + this.stopped = stopped + this.duration = stopped - started; + } + Tick.compareByStart = function (a, b) { + if (a.started < b.started) { + return -1; + } else if (a.started > b.started) { + return 1; + } else { + return 0; + } + }; + + // This module can be loaded in an amd and commonjs-context. + // Because we want both instances to use the same tick-data + // we store them globally + global._perfStarts = global._perfStarts || new Map(); + global._perfTicks = global._perfTicks || []; + + const _starts = global._perfStarts; + const _ticks = global._perfTicks; + + function startTimer(name, started = Date.now()) { + if (_starts.has(name)) { + throw new Error(`${name} already exists`); + } + _starts.set(name, { name, started }); + const stop = stopTimer.bind(undefined, name); + return { + stop, + while(thenable) { + thenable.then(_ => stop(), _ => stop()); + return thenable; + } + }; + } + + function stopTimer(name, stopped = Date.now()) { + const start = _starts.get(name); + const tick = new Tick(start.name, start.started, stopped); + _ticks.push(tick); + _starts.delete(name); + } + + function ticks() { + return _ticks; + } + + const exports = { + Tick: Tick, + startTimer: startTimer, + stopTimer: stopTimer, + ticks: ticks, + disable: disable + }; + + function disable() { + const emptyController = Object.freeze({ while(t) { return t }, stop() { } }); + const emptyTicks = Object.create([]); + exports.startTimer = function () { return emptyController; } + exports.stopTimer = function () { }; + exports.ticks = function () { return emptyTicks; } + + delete global._perfStarts; + delete global._perfTicks; + } + + return exports; +}); diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index 4ba9e05b9a636..5cbd46ad920b8 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -14,6 +14,7 @@ if (window.location.search.indexOf('prof-startup') >= 0) { /*global window,document,define*/ +const { startTimer } = require('../../../base/common/startupTimers') const path = require('path'); const electron = require('electron'); const remote = electron.remote; @@ -158,8 +159,10 @@ function main() { // In the bundled version the nls plugin is packaged with the loader so the NLS Plugins // loads as soon as the loader loads. To be able to have pseudo translation + const loaderTimer = startTimer('require:loader.js') createScript(rootUrl + '/vs/loader.js', function () { define('fs', ['original-fs'], function (originalFS) { return originalFS; }); // replace the patched electron fs with the original node fs for all AMD code + loaderTimer.stop(); window.MonacoEnvironment = {}; @@ -189,11 +192,13 @@ function main() { beforeLoadWorkbenchMain: Date.now() }; + const workbenchMainTimer = startTimer('require:workbench.main') require([ 'vs/workbench/electron-browser/workbench.main', 'vs/nls!vs/workbench/electron-browser/workbench.main', 'vs/css!vs/workbench/electron-browser/workbench.main' ], function () { + workbenchMainTimer.stop(); timers.afterLoadWorkbenchMain = Date.now(); process.lazyEnv.then(function () { diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 4621ddd167c91..ec1d8a831af6e 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -16,6 +16,7 @@ import { Delayer } from 'vs/base/common/async'; import * as browser from 'vs/base/browser/browser'; import assert = require('vs/base/common/assert'); import { StopWatch } from 'vs/base/common/stopwatch'; +import { startTimer } from 'vs/base/common/startupTimers'; import errors = require('vs/base/common/errors'); import { BackupFileService } from 'vs/workbench/services/backup/node/backupFileService'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; @@ -297,7 +298,8 @@ export class Workbench implements IPartService { } viewletRestoreStopWatch = StopWatch.create(); - compositeAndEditorPromises.push(this.viewletService.openViewlet(viewletIdToRestore).then(() => { + const tick = startTimer(`restoreViewlet:${viewletIdToRestore}`); + compositeAndEditorPromises.push(tick.while(this.viewletService.openViewlet(viewletIdToRestore)).then(() => { viewletRestoreStopWatch.stop(); })); } From 8ba5b8cd7b566aebbb26e38cb6f0558199b27599 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 17 May 2017 14:05:46 +0200 Subject: [PATCH 0614/2747] Support crashReporterHockeyAppSubmitURL (#26814) --- build/gulpfile.mixin.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/build/gulpfile.mixin.js b/build/gulpfile.mixin.js index 5c62226deda01..71c45d4bcf9da 100644 --- a/build/gulpfile.mixin.js +++ b/build/gulpfile.mixin.js @@ -68,7 +68,26 @@ gulp.task('mixin', function () { .pipe(buffer()) .pipe(json(function (patch) { const original = require('../product.json'); - return assign(original, patch); + const result = assign(original, patch); + + // HockeyApp Support + if (patch.crashReporterHockeyAppSubmitURL && result.crashReporter) { + + // Receive submitURL for the platform we are building for + result.crashReporter.submitURL = (function () { + if (process.platform === 'win32') { return patch.crashReporterHockeyAppSubmitURL.win32; } + if (process.platform === 'darwin') { return patch.crashReporterHockeyAppSubmitURL.darwin; } + if (process.platform === 'linux' && arch === 'x64') { return patch.crashReporterHockeyAppSubmitURL.linux64; } + if (process.platform === 'linux' && arch !== 'x64') { return patch.crashReporterHockeyAppSubmitURL.linux32; } + + return void 0; + })(); + + // No longer need crashReporterHockeyAppSubmitURL after this + result.crashReporterHockeyAppSubmitURL = void 0; + } + + return result; })) .pipe(productJsonFilter.restore); From 2587b41b95e2fa52ddaa06d604a8872aef59af79 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 17 May 2017 14:18:11 +0200 Subject: [PATCH 0615/2747] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b22df3cc3ee4f..850dc7a4a01d0 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev", "version": "1.13.0", "electronVersion": "1.6.6", - "distro": "a08520285a5d8cb174da73cbec07cc7aff0cee3b", + "distro": "75907509ec4038a8ebcce47fa85eab15bfe33aac", "author": { "name": "Microsoft Corporation" }, From 777d2e55583821e09c4ea9e48f42d9388a08a282 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 17 May 2017 14:35:53 +0200 Subject: [PATCH 0616/2747] use ES5 --- src/vs/base/common/startupTimers.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/vs/base/common/startupTimers.js b/src/vs/base/common/startupTimers.js index cbaeab198af39..086e8e38cfe49 100644 --- a/src/vs/base/common/startupTimers.js +++ b/src/vs/base/common/startupTimers.js @@ -39,7 +39,10 @@ define([], function () { const _starts = global._perfStarts; const _ticks = global._perfTicks; - function startTimer(name, started = Date.now()) { + function startTimer(name, started) { + if (typeof started !== 'number') { + started = Date.now(); + } if (_starts.has(name)) { throw new Error(`${name} already exists`); } @@ -48,13 +51,16 @@ define([], function () { return { stop, while(thenable) { - thenable.then(_ => stop(), _ => stop()); + thenable.then(function() { stop() }, function() { stop() }); return thenable; } }; } - function stopTimer(name, stopped = Date.now()) { + function stopTimer(name, stopped) { + if (typeof stopped !== 'number') { + stopped = Date.now(); + } const start = _starts.get(name); const tick = new Tick(start.name, start.started, stopped); _ticks.push(tick); From 08a377742cfda820369aa7a0d3127982a0c28a1f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 17 May 2017 14:44:24 +0200 Subject: [PATCH 0617/2747] more ES5 --- src/vs/base/common/startupTimers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/common/startupTimers.js b/src/vs/base/common/startupTimers.js index 086e8e38cfe49..a08a196de037e 100644 --- a/src/vs/base/common/startupTimers.js +++ b/src/vs/base/common/startupTimers.js @@ -44,7 +44,7 @@ define([], function () { started = Date.now(); } if (_starts.has(name)) { - throw new Error(`${name} already exists`); + throw new Error("${name}" + " already exists"); } _starts.set(name, { name, started }); const stop = stopTimer.bind(undefined, name); From 71fbd74e174825de7d146ec972e218bd68a892fe Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 17 May 2017 14:56:44 +0200 Subject: [PATCH 0618/2747] less ES5 --- src/vs/base/common/startupTimers.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/vs/base/common/startupTimers.js b/src/vs/base/common/startupTimers.js index a08a196de037e..6bf8cefeeed14 100644 --- a/src/vs/base/common/startupTimers.js +++ b/src/vs/base/common/startupTimers.js @@ -46,12 +46,12 @@ define([], function () { if (_starts.has(name)) { throw new Error("${name}" + " already exists"); } - _starts.set(name, { name, started }); + _starts.set(name, { name: name, started: started }); const stop = stopTimer.bind(undefined, name); return { - stop, - while(thenable) { - thenable.then(function() { stop() }, function() { stop() }); + stop: stop, + while: function (thenable) { + thenable.then(function () { stop(); }, function () { stop(); }); return thenable; } }; @@ -80,11 +80,11 @@ define([], function () { }; function disable() { - const emptyController = Object.freeze({ while(t) { return t }, stop() { } }); + const emptyController = Object.freeze({ while: function (t) { return t; }, stop: function () { } }); const emptyTicks = Object.create([]); - exports.startTimer = function () { return emptyController; } + exports.startTimer = function () { return emptyController; }; exports.stopTimer = function () { }; - exports.ticks = function () { return emptyTicks; } + exports.ticks = function () { return emptyTicks; }; delete global._perfStarts; delete global._perfTicks; From 669b83d5fc538051a34a12150f0f1f375470a1e9 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 17 May 2017 15:09:57 +0200 Subject: [PATCH 0619/2747] less ES6 in JS files --- src/vs/base/common/startupTimers.js | 6 +++--- src/vs/workbench/electron-browser/bootstrap/index.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/base/common/startupTimers.js b/src/vs/base/common/startupTimers.js index 6bf8cefeeed14..7284305ecf83d 100644 --- a/src/vs/base/common/startupTimers.js +++ b/src/vs/base/common/startupTimers.js @@ -15,9 +15,9 @@ if (typeof define !== "function" && typeof module === "object" && typeof module. define([], function () { function Tick(name, started, stopped) { - this.name = name - this.started = started - this.stopped = stopped + this.name = name; + this.started = started; + this.stopped = stopped; this.duration = stopped - started; } Tick.compareByStart = function (a, b) { diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index 5cbd46ad920b8..c86ae1ddbbffa 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -14,7 +14,7 @@ if (window.location.search.indexOf('prof-startup') >= 0) { /*global window,document,define*/ -const { startTimer } = require('../../../base/common/startupTimers') +const startTimer = require('../../../base/common/startupTimers').startTimer; const path = require('path'); const electron = require('electron'); const remote = electron.remote; From f4a351fc08f04f853d15072ad30d28792799d07f Mon Sep 17 00:00:00 2001 From: Erich Gamma Date: Wed, 17 May 2017 16:13:23 +0200 Subject: [PATCH 0620/2747] Move tslint settings to tslint.json --- .vscode/settings.json | 2 -- tslint.json | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index ee2a86a54f53f..19cb4832e9933 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -16,8 +16,6 @@ "i18n/**": true, "extensions/**/out/**": true }, - "tslint.enable": true, - "tslint.rulesDirectory": "build/lib/tslint", "lcov.path": [ "./.build/coverage/lcov.info", "./.build/coverage-single/lcov.info" diff --git a/tslint.json b/tslint.json index aae82a05a27aa..9c0f132b77e5f 100644 --- a/tslint.json +++ b/tslint.json @@ -1,4 +1,7 @@ { + "rulesDirectory": [ + "build/lib/tslint" + ], "rules": { "no-unused-expression": true, "no-duplicate-variable": true, From 84d4fc595c11b8c0c6d7107f9173f6361173cd92 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 17 May 2017 15:59:13 +0200 Subject: [PATCH 0621/2747] support to profile a tick, move to /node --- build/gulpfile.vscode.js | 2 +- src/vs/base/node/profiler.ts | 6 +-- .../base/{common => node}/startupTimers.d.ts | 5 +++ src/vs/base/{common => node}/startupTimers.js | 38 +++++++++++++++---- .../workbench/electron-browser/workbench.ts | 2 +- 5 files changed, 41 insertions(+), 12 deletions(-) rename src/vs/base/{common => node}/startupTimers.d.ts (88%) rename src/vs/base/{common => node}/startupTimers.js (71%) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index a7a811dac2222..042e45d4cd44c 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -60,7 +60,7 @@ const vscodeResources = [ 'out-build/bootstrap-amd.js', 'out-build/paths.js', 'out-build/vs/**/*.{svg,png,cur,html}', - 'out-build/vs/base/common/startupTimers.js', + 'out-build/vs/base/node/startupTimers.js', 'out-build/vs/base/node/{stdForkStart.js,terminateProcess.sh}', 'out-build/vs/base/browser/ui/octiconLabel/octicons/**', 'out-build/vs/workbench/browser/media/*-theme.css', diff --git a/src/vs/base/node/profiler.ts b/src/vs/base/node/profiler.ts index febca07118e76..c19ba021b695b 100644 --- a/src/vs/base/node/profiler.ts +++ b/src/vs/base/node/profiler.ts @@ -45,7 +45,7 @@ export function stopProfiling(dir: string, prefix: string): TPromise { }); } -function removePiiPaths(profile: Profile) { +export function removePiiPaths(profile: Profile) { const stack = [profile.head]; while (stack.length > 0) { const element = stack.pop(); @@ -66,14 +66,14 @@ declare interface Profiler { stopProfiling(): Profile; } -declare interface Profile { +export declare interface Profile { title: string; export(callback: (err, data) => void); delete(); head: ProfileSample; } -declare interface ProfileSample { +export declare interface ProfileSample { // bailoutReason:"" // callUID:2333 // children:Array[39] diff --git a/src/vs/base/common/startupTimers.d.ts b/src/vs/base/node/startupTimers.d.ts similarity index 88% rename from src/vs/base/common/startupTimers.d.ts rename to src/vs/base/node/startupTimers.d.ts index fa9b536387749..bcc276e506de6 100644 --- a/src/vs/base/common/startupTimers.d.ts +++ b/src/vs/base/node/startupTimers.d.ts @@ -3,6 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { Profile } from './profiler' + declare interface TickStart { name: string; started: number; @@ -14,6 +16,7 @@ export declare class Tick { readonly name: string; readonly started: number; readonly stopped: number; + readonly profile: Profile; static compareByStart(a: Tick, b: Tick): number; } @@ -29,4 +32,6 @@ export function stopTimer(name: string, stopped?: number); export function ticks(): ReadonlyArray; +export function setProfileList(names: string[]): void; + export function disable(): void; diff --git a/src/vs/base/common/startupTimers.js b/src/vs/base/node/startupTimers.js similarity index 71% rename from src/vs/base/common/startupTimers.js rename to src/vs/base/node/startupTimers.js index 7284305ecf83d..e34c97b8f7070 100644 --- a/src/vs/base/common/startupTimers.js +++ b/src/vs/base/node/startupTimers.js @@ -5,20 +5,32 @@ 'use strict'; -if (typeof define !== "function" && typeof module === "object" && typeof module.exports === "object") { +var requireProfiler; +if (typeof define !== "function" && typeof module === "object" && typeof module.exports === "object") { + // this is commonjs, fake amd global.define = function (dep, callback) { module.exports = callback(); global.define = undefined; } + requireProfiler = function () { + return require('v8-profiler'); + } +} else { + // this is amd + requireProfiler = function () { + return require.__$__nodeRequire('v8-profiler'); + } } + define([], function () { - function Tick(name, started, stopped) { - this.name = name; - this.started = started; - this.stopped = stopped; + function Tick(name, started, stopped, profile) { + this.name = name + this.started = started + this.stopped = stopped this.duration = stopped - started; + this.profile = profile; } Tick.compareByStart = function (a, b) { if (a.started < b.started) { @@ -35,9 +47,11 @@ define([], function () { // we store them globally global._perfStarts = global._perfStarts || new Map(); global._perfTicks = global._perfTicks || []; + global._perfToBeProfiled = global._perfToBeProfiled || new Set(); const _starts = global._perfStarts; const _ticks = global._perfTicks; + const _toBeProfiled = global._perfToBeProfiled function startTimer(name, started) { if (typeof started !== 'number') { @@ -46,6 +60,9 @@ define([], function () { if (_starts.has(name)) { throw new Error("${name}" + " already exists"); } + if (_toBeProfiled.has(name)) { + requireProfiler().startProfiling(name, true); + } _starts.set(name, { name: name, started: started }); const stop = stopTimer.bind(undefined, name); return { @@ -61,8 +78,9 @@ define([], function () { if (typeof stopped !== 'number') { stopped = Date.now(); } + const profile = _toBeProfiled.has(name) ? requireProfiler().stopProfiling(name) : undefined; const start = _starts.get(name); - const tick = new Tick(start.name, start.started, stopped); + const tick = new Tick(start.name, start.started, stopped, profile); _ticks.push(tick); _starts.delete(name); } @@ -71,12 +89,18 @@ define([], function () { return _ticks; } + function setProfileList(names) { + _toBeProfiled.clear(); + names.forEach(function (name) { _toBeProfiled.add(name) }); + } + const exports = { Tick: Tick, startTimer: startTimer, stopTimer: stopTimer, ticks: ticks, - disable: disable + setProfileList: setProfileList, + disable: disable, }; function disable() { diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index ec1d8a831af6e..4a47295048ff1 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -16,7 +16,7 @@ import { Delayer } from 'vs/base/common/async'; import * as browser from 'vs/base/browser/browser'; import assert = require('vs/base/common/assert'); import { StopWatch } from 'vs/base/common/stopwatch'; -import { startTimer } from 'vs/base/common/startupTimers'; +import { startTimer } from 'vs/base/node/startupTimers'; import errors = require('vs/base/common/errors'); import { BackupFileService } from 'vs/workbench/services/backup/node/backupFileService'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; From c0fd0eba1b727081485a6661c62408e59d85fd4f Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 17 May 2017 16:37:26 +0200 Subject: [PATCH 0622/2747] tfs: fix npm distro install --- build/tfs/darwin/build.sh | 5 +++-- build/tfs/linux/build.sh | 5 +++-- scripts/env.sh | 6 ++++++ 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100755 scripts/env.sh diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index fb71e9885e1d0..88e4e11648ca1 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -1,6 +1,7 @@ #!/bin/sh -. build/tfs/common/common.sh +. ./scripts/env.sh +. ./build/tfs/common/common.sh export VSCODE_MIXIN_PASSWORD="$1" export AZURE_STORAGE_ACCESS_KEY="$2" @@ -12,7 +13,7 @@ VSO_PAT="$6" echo "machine monacotools.visualstudio.com password $VSO_PAT" > ~/.netrc step "Install dependencies" \ - ./scripts/npm.sh install + npm install step "Mix in repository from vscode-distro" \ npm run gulp -- mixin diff --git a/build/tfs/linux/build.sh b/build/tfs/linux/build.sh index f86e9f7182746..ec5485416e532 100755 --- a/build/tfs/linux/build.sh +++ b/build/tfs/linux/build.sh @@ -1,6 +1,7 @@ #!/bin/bash -. build/tfs/common/common.sh +. ./scripts/env.sh +. ./build/tfs/common/common.sh export ARCH="$1" export VSCODE_MIXIN_PASSWORD="$2" @@ -14,7 +15,7 @@ VSO_PAT="$8" echo "machine monacotools.visualstudio.com password $VSO_PAT" > ~/.netrc step "Install dependencies" \ - ./scripts/npm.sh install --arch=$ARCH --unsafe-perm + npm install --arch=$ARCH --unsafe-perm step "Mix in repository from vscode-distro" \ npm run gulp -- mixin diff --git a/scripts/env.sh b/scripts/env.sh new file mode 100755 index 0000000000000..66860f099fec9 --- /dev/null +++ b/scripts/env.sh @@ -0,0 +1,6 @@ +#!/bin/bash +export npm_config_disturl=https://atom.io/download/electron +export npm_config_target=$(node -p "require('./package.json').version") +export npm_config_runtime=electron +export npm_config_cache="$HOME/.npm-electron" +mkdir -p "$npm_config_cache" \ No newline at end of file From 15a6f0b4e9bbfe82b7c84b7eede7affb7057fc31 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 17 May 2017 16:44:14 +0200 Subject: [PATCH 0623/2747] fix --- scripts/env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/env.sh b/scripts/env.sh index 66860f099fec9..35d09f66bb2c4 100755 --- a/scripts/env.sh +++ b/scripts/env.sh @@ -1,6 +1,6 @@ #!/bin/bash export npm_config_disturl=https://atom.io/download/electron -export npm_config_target=$(node -p "require('./package.json').version") +export npm_config_target=$(node -p "require('./package.json').electronVersion") export npm_config_runtime=electron export npm_config_cache="$HOME/.npm-electron" mkdir -p "$npm_config_cache" \ No newline at end of file From 65d736eea88ce3e62214bd75ece6df7513aceff1 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 17 May 2017 16:46:08 +0200 Subject: [PATCH 0624/2747] fix windows build --- build/tfs/win32/1_build.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index 940cf92a7a39d..bd13cb3c821cb 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -8,11 +8,17 @@ Param( # In order to get _netrc to work, we need a HOME variable setup $env:HOME=$env:USERPROFILE +$env:npm_config_disturl="https://atom.io/download/electron" +$env:npm_config_target="1.6.6" +$env:npm_config_runtime="electron" +$env:npm_config_cache="$HOME/.npm-electron" +mkdir -p "$env:npm_config_cache" + # Create a _netrc file to download distro dependencies "machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII step "Install dependencies" { - exec { & .\scripts\npm.bat install } + exec { & npm install } } $env:VSCODE_MIXIN_PASSWORD = $mixinPassword From d4f3981b74900af494770b6c21e297d95760a155 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 17 May 2017 16:49:07 +0200 Subject: [PATCH 0625/2747] tfs win build --- build/tfs/win32/1_build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index bd13cb3c821cb..80523ea3e0952 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -12,7 +12,7 @@ $env:npm_config_disturl="https://atom.io/download/electron" $env:npm_config_target="1.6.6" $env:npm_config_runtime="electron" $env:npm_config_cache="$HOME/.npm-electron" -mkdir -p "$env:npm_config_cache" +# mkdir -p "$env:npm_config_cache" # Create a _netrc file to download distro dependencies "machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII From d7d749b65a3e71b8dfdeebcbd25981a2752cf311 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 17 May 2017 08:35:06 -0700 Subject: [PATCH 0626/2747] Add 'more' to the Recent section (fixes #25583) --- .../page/electron-browser/vs_code_welcome_page.ts | 1 + .../welcome/page/electron-browser/welcomePage.css | 4 ++++ .../welcome/page/electron-browser/welcomePage.ts | 3 ++- .../walkThrough/electron-browser/walkThroughPart.ts | 11 +++++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts index 90c5975cded38..dbc50a757c379 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts @@ -32,6 +32,7 @@ export default () => `

    ${escape(localize('welcomePage.recent', "Recent"))}

    ${escape(localize('welcomePage.noRecentFolders', "No recent folders"))}

    diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css index 49de2c1751ec7..78cee53838d22 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css @@ -138,6 +138,10 @@ display: initial; } +.monaco-workbench > .part.editor > .content .welcomePage .splash .recent li.moreRecent { + margin-top: 5px; +} + .monaco-workbench > .part.editor > .content .welcomePage .splash .recent li { min-width: 0; white-space: nowrap; diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 9501600cec0d0..cb7607b164822 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -160,6 +160,7 @@ class WelcomePage { return; } const ul = container.querySelector('.recent ul'); + const before = ul.firstElementChild; folders.slice(0, 5).forEach(folder => { const li = document.createElement('li'); @@ -191,7 +192,7 @@ class WelcomePage { span.title = folder; li.appendChild(span); - ul.appendChild(li); + ul.insertBefore(li, before); }); }).then(null, onUnexpectedError); diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index fc6f2c7663076..2fcbace413f7e 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -309,6 +309,7 @@ export class WalkThroughPart extends BaseEditor { this.content.innerHTML = content; this.updateSizeClasses(); this.decorateContent(); + this.contentDisposables.push(this.keybindingService.onDidUpdateKeybindings(() => this.decorateContent())); if (input.onReady) { input.onReady(this.content.firstElementChild as HTMLElement); } @@ -447,9 +448,19 @@ export class WalkThroughPart extends BaseEditor { const command = key.getAttribute('data-command'); const keybinding = command && this.keybindingService.lookupKeybinding(command); const label = keybinding ? keybinding.getLabel() : UNBOUND_COMMAND; + while (key.firstChild) { + key.removeChild(key.firstChild); + } key.appendChild(document.createTextNode(label)); }); + const ifkeys = this.content.querySelectorAll('.if_shortcut[data-command]'); + Array.prototype.forEach.call(ifkeys, (key: HTMLElement) => { + const command = key.getAttribute('data-command'); + const keybinding = command && this.keybindingService.lookupKeybinding(command); + key.style.display = !keybinding ? 'none' : ''; + }); } + private saveTextEditorViewState(resource: URI): void { const memento = this.getMemento(this.storageService, Scope.WORKSPACE); let editorViewStateMemento = memento[WALK_THROUGH_EDITOR_VIEW_STATE_PREFERENCE_KEY]; From ed6b7a8bfd2969cf9673b5e974eca4e91f6e8727 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 17 May 2017 17:37:44 +0200 Subject: [PATCH 0627/2747] Fixes #25777 --- src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts | 1 + src/vs/workbench/parts/debug/browser/exceptionWidget.ts | 2 +- .../workbench/parts/debug/browser/media/exceptionWidget.css | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts index b4441f6b13ad1..1c987bf7d9f4a 100644 --- a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts +++ b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts @@ -275,6 +275,7 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout // Render the widget as zone (rendering) and widget (lifecycle) const viewZoneDomNode = document.createElement('div'); + viewZoneDomNode.style.overflow = 'hidden'; const lineHeight = this.editor.getConfiguration().lineHeight; // adjust heightInLines to viewport diff --git a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts index 7e5f967637468..a54e0e1ff2093 100644 --- a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts +++ b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts @@ -33,7 +33,7 @@ export class ExceptionWidget extends ZoneWidget { @IThemeService themeService: IThemeService, @IInstantiationService private instantiationService: IInstantiationService ) { - super(editor, { showFrame: true, showArrow: true, frameWidth: 1 }); + super(editor, { showFrame: true, showArrow: true, frameWidth: 1, className: 'exception-widget-container' }); this._backgroundColor = Color.white; diff --git a/src/vs/workbench/parts/debug/browser/media/exceptionWidget.css b/src/vs/workbench/parts/debug/browser/media/exceptionWidget.css index 07cafebe8643c..ba5443e0a2c34 100644 --- a/src/vs/workbench/parts/debug/browser/media/exceptionWidget.css +++ b/src/vs/workbench/parts/debug/browser/media/exceptionWidget.css @@ -3,6 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +.monaco-editor .zone-widget.exception-widget-container { + overflow: hidden; +} + .monaco-editor .zone-widget .zone-widget-container.exception-widget { padding: 6px 10px; white-space: pre-wrap; From b12085b2e769ea7b5a33c8ad89ad4d85ba0b0589 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 17 May 2017 08:46:25 -0700 Subject: [PATCH 0628/2747] Add hint about preview to theme selector (fixes #26057) --- .../parts/themes/electron-browser/themes.contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts b/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts index 9724e10c4aedd..9dfc911fc9928 100644 --- a/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts +++ b/src/vs/workbench/parts/themes/electron-browser/themes.contribution.ts @@ -70,7 +70,7 @@ export class SelectColorThemeAction extends Action { ); }; - const placeHolder = localize('themes.selectTheme', "Select Color Theme"); + const placeHolder = localize('themes.selectTheme', "Select Color Theme (Up/Down Keys to Preview)"); const autoFocusIndex = firstIndex(picks, p => p.id === currentTheme.id); const delayer = new Delayer(100); From cc8771da0b0037e0f11374d132bd4617cab8b765 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 17 May 2017 16:42:31 +0200 Subject: [PATCH 0629/2747] :lipstick: --- src/vs/workbench/electron-browser/bootstrap/index.js | 4 ++-- src/vs/workbench/electron-browser/workbench.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index c86ae1ddbbffa..6e787311d8467 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -159,7 +159,7 @@ function main() { // In the bundled version the nls plugin is packaged with the loader so the NLS Plugins // loads as soon as the loader loads. To be able to have pseudo translation - const loaderTimer = startTimer('require:loader.js') + const loaderTimer = startTimer('load:loader') createScript(rootUrl + '/vs/loader.js', function () { define('fs', ['original-fs'], function (originalFS) { return originalFS; }); // replace the patched electron fs with the original node fs for all AMD code loaderTimer.stop(); @@ -192,7 +192,7 @@ function main() { beforeLoadWorkbenchMain: Date.now() }; - const workbenchMainTimer = startTimer('require:workbench.main') + const workbenchMainTimer = startTimer('load:workbench.main') require([ 'vs/workbench/electron-browser/workbench.main', 'vs/nls!vs/workbench/electron-browser/workbench.main', diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 4a47295048ff1..0899853678e21 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -298,7 +298,7 @@ export class Workbench implements IPartService { } viewletRestoreStopWatch = StopWatch.create(); - const tick = startTimer(`restoreViewlet:${viewletIdToRestore}`); + const tick = startTimer(`restore:${viewletIdToRestore}`); compositeAndEditorPromises.push(tick.while(this.viewletService.openViewlet(viewletIdToRestore)).then(() => { viewletRestoreStopWatch.stop(); })); From 028a86d4c7dc0a6ae01ab0a25c86a4c939ad8a7d Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 17 May 2017 16:46:16 +0200 Subject: [PATCH 0630/2747] fix bad merge --- src/vs/workbench/electron-browser/bootstrap/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index 6e787311d8467..c01da62847a48 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -14,7 +14,7 @@ if (window.location.search.indexOf('prof-startup') >= 0) { /*global window,document,define*/ -const startTimer = require('../../../base/common/startupTimers').startTimer; +const startTimer = require('../../../base/node/startupTimers').startTimer; const path = require('path'); const electron = require('electron'); const remote = electron.remote; From 5573e3a64fd904d6d8ff72cd8c34dcf6f3444e03 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 17 May 2017 10:39:17 -0700 Subject: [PATCH 0631/2747] Add interactive playground to Help menu (fixes #23481) --- src/vs/code/electron-main/menus.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index d6dc264d311d1..91ccab243c9fc 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -926,6 +926,7 @@ export class VSCodeMenu { const keyboardShortcutsUrl = isLinux ? product.keyboardShortcutsUrlLinux : isMacintosh ? product.keyboardShortcutsUrlMac : product.keyboardShortcutsUrlWin; arrays.coalesce([ new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miWelcome', comment: ['&& denotes a mnemonic'] }, "&&Welcome")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.showWelcomePage') }), + new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miInteractivePlayground', comment: ['&& denotes a mnemonic'] }, "&&Interactive Playground")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.showInteractivePlayground') }), product.documentationUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miDocumentation', comment: ['&& denotes a mnemonic'] }, "&&Documentation")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'workbench.action.openDocumentationUrl') }) : null, product.releaseNotesUrl ? new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miReleaseNotes', comment: ['&& denotes a mnemonic'] }, "&&Release Notes")), click: () => this.windowsService.sendToFocused('vscode:runAction', 'update.showCurrentReleaseNotes') }) : null, __separator__(), From ecf1ca70d650505e9c046cf5f6a5d0b0e13e732c Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 17 May 2017 10:50:18 -0700 Subject: [PATCH 0632/2747] node-pty@0.6.5 Fixes #17609 --- npm-shrinkwrap.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 84aa4bbba2816..35505b635ab55 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -338,9 +338,9 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" }, "node-pty": { - "version": "0.6.4", - "from": "node-pty@0.6.4", - "resolved": "https://registry.npmjs.org/node-pty/-/node-pty-0.6.4.tgz", + "version": "0.6.5", + "from": "node-pty@0.6.5", + "resolved": "https://registry.npmjs.org/node-pty/-/node-pty-0.6.5.tgz", "dependencies": { "nan": { "version": "2.5.0", diff --git a/package.json b/package.json index 850dc7a4a01d0..5ea6aaffec268 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "jschardet": "^1.4.2", "minimist": "1.2.0", "native-keymap": "1.2.4", - "node-pty": "0.6.4", + "node-pty": "0.6.5", "semver": "4.3.6", "v8-profiler": "jrieken/v8-profiler#vscode", "vscode-debugprotocol": "1.19.0", From e0969a51364576eab0677c067cb0bff320d72f3e Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Wed, 17 May 2017 11:13:09 -0700 Subject: [PATCH 0633/2747] Toggle expanded docs, add stickyness to expansion (#26783) * Toggle expanded docs, add stickyness to expansion * New command for moving focus to/from details * Store user choice in local storage * Refactoring * Show prev width for suggest list unless docs expand * Add keybinding to Read Less button --- .../contrib/suggest/browser/media/suggest.css | 82 +++++++++++-- .../suggest/browser/suggestController.ts | 18 +++ .../contrib/suggest/browser/suggestWidget.ts | 108 +++++++++++++++--- 3 files changed, 184 insertions(+), 24 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index 2329d006eabb1..ad198d8aa3f31 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -9,15 +9,16 @@ width: 660px; } -.monaco-editor .suggest-widget > .tree, +.monaco-editor .suggest-widget.docs-expanded > .tree, .monaco-editor .suggest-widget > .details { width: 330px; } .monaco-editor .suggest-widget.small, -.monaco-editor .suggest-widget.small > .tree, +.monaco-editor .suggest-widget > .tree, +.monaco-editor .suggest-widget.small.docs-expanded > .tree, .monaco-editor .suggest-widget.small > .details { - width: 400px; + width: 430px; } .monaco-editor .suggest-widget.visible { @@ -72,6 +73,55 @@ font-weight: bold; } +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .go-back, +.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details { + opacity: 0.6; + background-position: center center; + background-repeat: no-repeat; + background-size: 70%; + color: #0035DD; + cursor: pointer; +} + +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .go-back { + background-image: url('./back.svg'); +} + +.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details { + background-image: url('./info.svg'); +} + +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .go-back:hover, +.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details:hover { + opacity: 1; +} + +.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label { + margin-left: 0.8em; + flex: 1; + text-align: right; + overflow: hidden; + text-overflow: ellipsis; + opacity: 0.7; +} + +.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label > .monaco-tokenized-source { + display: inline; +} + +.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details, +.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label, +.monaco-editor .suggest-widget.docs-expanded .monaco-list .monaco-list-row.focused > .contents > .main > .docs-details, +.monaco-editor .suggest-widget.docs-expanded .monaco-list .monaco-list-row.focused > .contents > .main > .type-label { + display: none; +} + +.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .docs-details, +.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .type-label, +.monaco-editor .suggest-widget.docs-expanded.small .monaco-list .monaco-list-row.focused > .contents > .main > .type-label { + display: inline; +} + .monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon { display: block; height: 16px; @@ -141,9 +191,20 @@ white-space: pre-wrap; } -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .type { +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header { + padding: 4px 5px; + display: flex; + box-sizing: border-box; + border-bottom: 1px solid rgba(204, 204, 204, 0.5); +} + +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .type { + flex: 2; + overflow: hidden; + text-overflow: ellipsis; opacity: 0.7; word-break: break-all; + margin: 0; } .monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > p { @@ -155,12 +216,19 @@ display: none; } -/* High Contrast Theming */ +/* Dark theme */ -.monaco-editor.hc-black .suggest-widget .details > .monaco-scrollable-element > .body > .docs { - color: #C07A7A; +.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header { + border-color: rgba(85,85,85,0.5); } +.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header > .go-back, +.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details { + color: #4E94CE; +} + +/* High Contrast Theming */ + .monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon, .monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon { background-image: url('Misc_inverse_16x.svg'); } diff --git a/src/vs/editor/contrib/suggest/browser/suggestController.ts b/src/vs/editor/contrib/suggest/browser/suggestController.ts index 04252c5d78cfe..0468b72476d67 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestController.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestController.ts @@ -262,6 +262,12 @@ export class SuggestController implements IEditorContribution { } toggleSuggestionDetails(): void { + if (this._widget) { + this._widget.toggleDetails(); + } + } + + toggleSuggestionFocus(): void { if (this._widget) { this._widget.toggleDetailsFocus(); } @@ -408,3 +414,15 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({ mac: { primary: KeyMod.WinCtrl | KeyCode.Space } } })); + +CommonEditorRegistry.registerEditorCommand(new SuggestCommand({ + id: 'toggleSuggestionFocus', + precondition: SuggestContext.Visible, + handler: x => x.toggleSuggestionFocus(), + kbOpts: { + weight: weight, + kbExpr: EditorContextKeys.textFocus, + primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Space, + mac: { primary: KeyMod.WinCtrl | KeyMod.Alt | KeyCode.Space } + } +})); diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 2a169a02ec78c..6b52946e15479 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -13,7 +13,7 @@ import Event, { Emitter, chain } from 'vs/base/common/event'; import { TPromise } from 'vs/base/common/winjs.base'; import { isPromiseCanceledError, onUnexpectedError } from 'vs/base/common/errors'; import { IDisposable, dispose, toDisposable } from 'vs/base/common/lifecycle'; -import { addClass, append, $, hide, removeClass, show, toggleClass, getDomNodePagePosition } from 'vs/base/browser/dom'; +import { addClass, append, $, hide, removeClass, show, toggleClass, getDomNodePagePosition, hasClass } from 'vs/base/browser/dom'; import { HighlightedLabel } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel'; import { IDelegate, IListEvent, IRenderer } from 'vs/base/browser/ui/list/list'; import { List } from 'vs/base/browser/ui/list/listWidget'; @@ -30,6 +30,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IThemeService, ITheme, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { registerColor, editorWidgetBackground, listFocusBackground, activeContrastBorder, listHighlightForeground, editorForeground, editorWidgetBorder } from 'vs/platform/theme/common/colorRegistry'; +import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; const sticky = false; // for development purposes @@ -38,6 +39,8 @@ interface ISuggestionTemplateData { icon: HTMLElement; colorspan: HTMLElement; highlightedLabel: HighlightedLabel; + typeLabel: HTMLElement; + documentationDetails: HTMLElement; disposables: IDisposable[]; } @@ -66,15 +69,12 @@ function canExpandCompletionItem(item: ICompletionItem) { class Renderer implements IRenderer { - private triggerKeybindingLabel: string; - constructor( private widget: SuggestWidget, private editor: ICodeEditor, - @IKeybindingService keybindingService: IKeybindingService + private triggerKeybindingLabel: string ) { - const kb = keybindingService.lookupKeybinding('editor.action.triggerSuggest'); - this.triggerKeybindingLabel = !kb ? '' : ` (${kb.getLabel()})`; + } get templateId(): string { @@ -93,6 +93,11 @@ class Renderer implements IRenderer { const main = append(text, $('.main')); data.highlightedLabel = new HighlightedLabel(main); data.disposables.push(data.highlightedLabel); + data.typeLabel = append(main, $('span.type-label')); + + data.documentationDetails = append(main, $('span.docs-details')); + data.documentationDetails.title = nls.localize('readMore', "Read More...{0}", this.triggerKeybindingLabel); + const configureFont = () => { const configuration = this.editor.getConfiguration(); const fontFamily = configuration.fontInfo.fontFamily; @@ -106,6 +111,8 @@ class Renderer implements IRenderer { main.style.lineHeight = lineHeightPx; data.icon.style.height = lineHeightPx; data.icon.style.width = lineHeightPx; + data.documentationDetails.style.height = lineHeightPx; + data.documentationDetails.style.width = lineHeightPx; }; configureFont(); @@ -139,7 +146,24 @@ class Renderer implements IRenderer { } data.highlightedLabel.set(suggestion.label, createMatches(element.matches)); + data.typeLabel.textContent = (suggestion.detail || '').replace(/\n.*$/m, ''); + if (canExpandCompletionItem(element)) { + show(data.documentationDetails); + data.documentationDetails.onmousedown = e => { + e.stopPropagation(); + e.preventDefault(); + }; + data.documentationDetails.onclick = e => { + e.stopPropagation(); + e.preventDefault(); + this.widget.toggleDetails(); + }; + } else { + hide(data.documentationDetails); + data.documentationDetails.onmousedown = null; + data.documentationDetails.onclick = null; + } } @@ -161,6 +185,8 @@ const enum State { class SuggestionDetails { private el: HTMLElement; + private back: HTMLElement; + private header: HTMLElement; private scrollbar: DomScrollableElement; private body: HTMLElement; private type: HTMLElement; @@ -171,7 +197,8 @@ class SuggestionDetails { constructor( container: HTMLElement, private widget: SuggestWidget, - private editor: ICodeEditor + private editor: ICodeEditor, + private triggerKeybindingLabel: string ) { this.disposables = []; @@ -184,7 +211,12 @@ class SuggestionDetails { append(this.el, this.scrollbar.getDomNode()); this.disposables.push(this.scrollbar); - this.type = append(this.body, $('p.type')); + this.header = append(this.body, $('.header')); + this.type = append(this.header, $('p.type')); + + this.back = append(this.header, $('span.go-back')); + this.back.title = nls.localize('goback', "Read less...{0}", triggerKeybindingLabel); + this.docs = append(this.body, $('p.docs')); this.ariaLabel = null; @@ -211,7 +243,17 @@ class SuggestionDetails { this.type.innerText = item.suggestion.detail || ''; this.docs.textContent = item.suggestion.documentation; - this.el.style.height = this.type.clientHeight + this.docs.clientHeight + 'px'; + this.el.style.height = this.type.clientHeight + this.docs.clientHeight + 8 + 'px'; + + this.back.onmousedown = e => { + e.preventDefault(); + e.stopPropagation(); + }; + this.back.onclick = e => { + e.preventDefault(); + e.stopPropagation(); + this.widget.toggleDetails(); + }; this.body.scrollTop = 0; this.scrollbar.scanDomNode(); @@ -251,10 +293,14 @@ class SuggestionDetails { const configuration = this.editor.getConfiguration(); const fontFamily = configuration.fontInfo.fontFamily; const fontSize = configuration.contribInfo.suggestFontSize || configuration.fontInfo.fontSize; + const lineHeight = configuration.contribInfo.suggestLineHeight || configuration.fontInfo.lineHeight; const fontSizePx = `${fontSize}px`; + const lineHeightPx = `${lineHeight}px`; this.el.style.fontSize = fontSizePx; this.type.style.fontFamily = fontFamily; + this.back.style.height = lineHeightPx; + this.back.style.width = lineHeightPx; } dispose(): void { @@ -308,18 +354,24 @@ export class SuggestWidget implements IContentWidget, IDelegate private readonly maxWidgetWidth = 660; private readonly listWidth = 330; - private readonly minWidgetWidth = 400; + private readonly minWidgetWidth = 430; + private storageService: IStorageService; constructor( private editor: ICodeEditor, @ITelemetryService private telemetryService: ITelemetryService, @IContextKeyService contextKeyService: IContextKeyService, @IInstantiationService instantiationService: IInstantiationService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @IStorageService storageService: IStorageService, + @IKeybindingService keybindingService: IKeybindingService ) { + const kb = keybindingService.lookupKeybinding('editor.action.triggerSuggest'); + const triggerKeybindingLabel = !kb ? '' : ` (${kb.getLabel()})`; + this.isAuto = false; this.focusedItem = null; - + this.storageService = storageService; this.element = $('.editor-widget.suggest-widget'); if (!this.editor.getConfiguration().contribInfo.iconsInSuggestions) { @@ -328,9 +380,9 @@ export class SuggestWidget implements IContentWidget, IDelegate this.messageElement = append(this.element, $('.message')); this.listElement = append(this.element, $('.tree')); - this.details = new SuggestionDetails(this.element, this, this.editor); + this.details = new SuggestionDetails(this.element, this, this.editor, triggerKeybindingLabel); - let renderer: IRenderer = instantiationService.createInstance(Renderer, this, this.editor); + let renderer: IRenderer = instantiationService.createInstance(Renderer, this, this.editor, triggerKeybindingLabel); this.list = new List(this.listElement, this, [renderer], { useShadows: false, @@ -547,8 +599,11 @@ export class SuggestWidget implements IContentWidget, IDelegate this.show(); break; case State.Open: - hide(this.messageElement); - show(this.listElement, this.details.element); + hide(this.messageElement, this.details.element); + show(this.listElement); + if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false)) { + show(this.details.element); + } this.show(); break; case State.Frozen: @@ -740,10 +795,26 @@ export class SuggestWidget implements IContentWidget, IDelegate } } + toggleDetails(): void { + let expandDocs = this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false); + if (expandDocs) { + hide(this.details.element); + removeClass(this.element, 'docs-expanded'); + } else { + show(this.details.element); + addClass(this.element, 'docs-expanded'); + this.show(); + } + this.storageService.store('expandSuggestionDocs', !expandDocs, StorageScope.GLOBAL); + } + showDetails(): void { if (this.state !== State.Open && this.state !== State.Details) { return; } + if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false)) { + addClass(this.element, 'docs-expanded'); + } this.show(); this.editor.focus(); @@ -792,7 +863,10 @@ export class SuggestWidget implements IContentWidget, IDelegate private updateWidgetHeight(): number { let height = 0; - let maxSuggestionsToShow = this.editor.getLayoutInfo().contentWidth > this.minWidgetWidth ? 11 : 5; + let maxSuggestionsToShow = 11; + if (hasClass(this.element, 'small')) { + maxSuggestionsToShow = 5; + } if (this.state === State.Empty || this.state === State.Loading) { height = this.unfocusedHeight; From b8521876bb14a4ce5720da31baa3904bf2505a00 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 17 May 2017 22:16:40 +0200 Subject: [PATCH 0634/2747] fix windows build --- build/tfs/win32/1_build.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index 80523ea3e0952..88b39fea4f954 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -12,6 +12,7 @@ $env:npm_config_disturl="https://atom.io/download/electron" $env:npm_config_target="1.6.6" $env:npm_config_runtime="electron" $env:npm_config_cache="$HOME/.npm-electron" +$env:npm_config_arch="ia32" # mkdir -p "$env:npm_config_cache" # Create a _netrc file to download distro dependencies From dea44c8f0b4022f6c138ddae2e6b8874bdedad1e Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 17 May 2017 14:17:31 -0700 Subject: [PATCH 0635/2747] Preserve Webview Scroll Position (#26426) * Preserve Webview Scroll Position Fixes #22995 **Bug** If you switch away from an editor that users a webview, the scroll position is currently not preserved. This effects our release notes and the markdown preview. The root cause is that the webview is disposed of when the view is hidden. **Fix** Add some presisted state to track scrollProgress through the webview. Use this state in the standard html editor and in the release notes. * Use view state * Continue prototype memento based approach * Preserve Webview Scroll Position Fixes #22995 **Bug** If you switch away from an editor that users a webview, the scroll position is currently not preserved. This effects our release notes and the markdown preview. The root cause is that the webview is disposed of when the view is hidden. **Fix** Add some presisted state to track scrollProgress through the webview. Use this state in the standard html editor and in the release notes. * Revert changes to ReleaseNotesInput --- .../browser/parts/editor/webviewEditor.ts | 70 +++++++++++++++++++ .../parts/html/browser/htmlPreviewPart.ts | 48 +++++++++++-- .../parts/html/browser/webview-pre.js | 61 +++++++++++++--- .../workbench/parts/html/browser/webview.ts | 17 +++++ .../workbench/parts/html/common/htmlInput.ts | 2 +- .../electron-browser/releaseNotesEditor.ts | 45 ++++++++++-- .../electron-browser/releaseNotesInput.ts | 1 + 7 files changed, 223 insertions(+), 21 deletions(-) create mode 100644 src/vs/workbench/browser/parts/editor/webviewEditor.ts diff --git a/src/vs/workbench/browser/parts/editor/webviewEditor.ts b/src/vs/workbench/browser/parts/editor/webviewEditor.ts new file mode 100644 index 0000000000000..cf852a3d1a5b2 --- /dev/null +++ b/src/vs/workbench/browser/parts/editor/webviewEditor.ts @@ -0,0 +1,70 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; +import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { BaseEditor } from "vs/workbench/browser/parts/editor/baseEditor"; +import URI from "vs/base/common/uri"; +import { IStorageService } from "vs/platform/storage/common/storage"; +import { Scope } from "vs/workbench/common/memento"; + +export interface HtmlPreviewEditorViewState { + scrollYPercentage: number; +} + +interface HtmlPreviewEditorViewStates { + 0?: HtmlPreviewEditorViewState; + 1?: HtmlPreviewEditorViewState; + 2?: HtmlPreviewEditorViewState; +} + +/** + * This class is only intended to be subclassed and not instantiated. + */ +export abstract class WebviewEditor extends BaseEditor { + constructor( + id: string, + telemetryService: ITelemetryService, + themeService: IThemeService, + private storageService: IStorageService + ) { + super(id, telemetryService, themeService); + } + + private get viewStateStorageKey(): string { + return this.getId() + '.editorViewState'; + } + + protected saveViewState(resource: URI | string, editorViewState: HtmlPreviewEditorViewState): void { + const memento = this.getMemento(this.storageService, Scope.WORKSPACE); + let editorViewStateMemento = memento[this.viewStateStorageKey]; + if (!editorViewStateMemento) { + editorViewStateMemento = Object.create(null); + memento[this.viewStateStorageKey] = editorViewStateMemento; + } + + let fileViewState: HtmlPreviewEditorViewStates = editorViewStateMemento[resource.toString()]; + if (!fileViewState) { + fileViewState = Object.create(null); + editorViewStateMemento[resource.toString()] = fileViewState; + } + + if (typeof this.position === 'number') { + fileViewState[this.position] = editorViewState; + } + } + + protected loadViewState(resource: URI | string): HtmlPreviewEditorViewState | null { + const memento = this.getMemento(this.storageService, Scope.WORKSPACE); + const editorViewStateMemento = memento[this.viewStateStorageKey]; + if (editorViewStateMemento) { + const fileViewState: HtmlPreviewEditorViewStates = editorViewStateMemento[resource.toString()]; + if (fileViewState) { + return fileViewState[this.position]; + } + } + return null; + } +} \ No newline at end of file diff --git a/src/vs/workbench/parts/html/browser/htmlPreviewPart.ts b/src/vs/workbench/parts/html/browser/htmlPreviewPart.ts index f310cdcb4d147..b6999b4c70d55 100644 --- a/src/vs/workbench/parts/html/browser/htmlPreviewPart.ts +++ b/src/vs/workbench/parts/html/browser/htmlPreviewPart.ts @@ -12,7 +12,6 @@ import { IModel } from 'vs/editor/common/editorCommon'; import { Dimension, Builder } from 'vs/base/browser/builder'; import { empty as EmptyDisposable, IDisposable, dispose, IReference } from 'vs/base/common/lifecycle'; import { EditorOptions, EditorInput } from 'vs/workbench/common/editor'; -import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { Position } from 'vs/platform/editor/common/editor'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; @@ -24,12 +23,13 @@ import { ITextModelResolverService, ITextEditorModel } from 'vs/editor/common/se import { Parts, IPartService } from 'vs/workbench/services/part/common/partService'; import Webview from './webview'; - +import { IStorageService } from 'vs/platform/storage/common/storage'; +import { WebviewEditor } from 'vs/workbench/browser/parts/editor/webviewEditor'; /** * An implementation of editor for showing HTML content in an IFrame by leveraging the HTML input. */ -export class HtmlPreviewPart extends BaseEditor { +export class HtmlPreviewPart extends WebviewEditor { static ID: string = 'workbench.editor.htmlPreviewPart'; @@ -46,15 +46,18 @@ export class HtmlPreviewPart extends BaseEditor { private _modelChangeSubscription = EmptyDisposable; private _themeChangeSubscription = EmptyDisposable; + private scrollYPercentage: number = 0; + constructor( @ITelemetryService telemetryService: ITelemetryService, @ITextModelResolverService textModelResolverService: ITextModelResolverService, @IThemeService protected themeService: IThemeService, @IOpenerService openerService: IOpenerService, @IWorkspaceContextService contextService: IWorkspaceContextService, - @IPartService private partService: IPartService + @IPartService private partService: IPartService, + @IStorageService storageService: IStorageService ) { - super(HtmlPreviewPart.ID, telemetryService, themeService); + super(HtmlPreviewPart.ID, telemetryService, themeService, storageService); this._textModelResolverService = textModelResolverService; this._openerService = openerService; @@ -84,11 +87,19 @@ export class HtmlPreviewPart extends BaseEditor { if (!this._webview) { this._webview = new Webview(this._container, this.partService.getContainer(Parts.EDITOR_PART)); this._webview.baseUrl = this._baseUrl && this._baseUrl.toString(true); + if (this.input && this.input instanceof HtmlInput) { + const state = this.loadViewState(this.input.getResource()); + this.scrollYPercentage = state ? state.scrollYPercentage : 0; + this.webview.initialScrollProgress = this.scrollYPercentage; + } this._webviewDisposables = [ this._webview, this._webview.onDidClickLink(uri => this._openerService.open(uri)), - this._webview.onDidLoadContent(data => this.telemetryService.publicLog('previewHtml', data.stats)) + this._webview.onDidLoadContent(data => this.telemetryService.publicLog('previewHtml', data.stats)), + this._webview.onDidScroll(data => { + this.scrollYPercentage = data.scrollYPercentage; + }) ]; } return this._webview; @@ -143,11 +154,25 @@ export class HtmlPreviewPart extends BaseEditor { } public clearInput(): void { + if (this.input instanceof HtmlInput) { + this.saveViewState(this.input.getResource(), { + scrollYPercentage: this.scrollYPercentage + }); + } dispose(this._modelRef); this._modelRef = undefined; super.clearInput(); } + public shutdown(): void { + if (this.input instanceof HtmlInput) { + this.saveViewState(this.input.getResource(), { + scrollYPercentage: this.scrollYPercentage + }); + } + super.shutdown(); + } + public sendMessage(data: any): void { this.webview.sendMessage(data); } @@ -158,6 +183,12 @@ export class HtmlPreviewPart extends BaseEditor { return TPromise.as(undefined); } + if (this.input instanceof HtmlInput) { + this.saveViewState(this.input.getResource(), { + scrollYPercentage: this.scrollYPercentage + }); + } + if (this._modelRef) { this._modelRef.dispose(); } @@ -182,12 +213,15 @@ export class HtmlPreviewPart extends BaseEditor { this._modelChangeSubscription = this.model.onDidChangeContent(() => { if (this.model) { + this.scrollYPercentage = 0; this.webview.contents = this.model.getLinesContent(); } }); + const state = this.loadViewState(resourceUri); + this.scrollYPercentage = state ? state.scrollYPercentage : 0; this.webview.baseUrl = resourceUri.toString(true); this.webview.contents = this.model.getLinesContent(); - + this.webview.initialScrollProgress = this.scrollYPercentage; return undefined; }); }); diff --git a/src/vs/workbench/parts/html/browser/webview-pre.js b/src/vs/workbench/parts/html/browser/webview-pre.js index 8c8a30e742f8e..51c9c25722542 100644 --- a/src/vs/workbench/parts/html/browser/webview-pre.js +++ b/src/vs/workbench/parts/html/browser/webview-pre.js @@ -9,7 +9,9 @@ const ipcRenderer = require('electron').ipcRenderer; - const initData = {}; + const initData = { + initialScrollProgress: undefined + }; function styleBody(body) { if (!body) { @@ -26,10 +28,14 @@ return document.getElementById('_target'); } + /** + * @param {MouseEvent} event + */ function handleInnerClick(event) { if (!event || !event.view || !event.view.document) { return; } + /** @type {any} */ var node = event.target; while (node) { if (node.tagName === "A" && node.href) { @@ -51,6 +57,27 @@ } } + var isHandlingScroll = false; + function handleInnerScroll(event) { + if (isHandlingScroll) { + return; + } + + const progress = event.target.body.scrollTop / event.target.body.clientHeight; + if (isNaN(progress)) { + return; + } + + isHandlingScroll = true; + window.requestAnimationFrame(function () { + try { + ipcRenderer.sendToHost('did-scroll', progress); + } catch (e) { + // noop + } + isHandlingScroll = false; + }); + } document.addEventListener("DOMContentLoaded", function (event) { ipcRenderer.on('baseUrl', function (event, value) { @@ -123,7 +150,23 @@ } // keep current scrollTop around and use later - const scrollTop = frame && frame.contentDocument && frame.contentDocument.body ? frame.contentDocument.body.scrollTop : 0; + let setInitialScrollPosition; + if (frame) { + const scrollY = frame.contentDocument && frame.contentDocument.body ? frame.contentDocument.body.scrollTop : 0; + setInitialScrollPosition = function (body) { + body.scrollTop = scrollY; + } + } else { + // First load + setInitialScrollPosition = function (body, window) { + body.scrollTop = 0; + if (!isNaN(initData.initialScrollProgress)) { + window.addEventListener('load', function() { + body.scrollTop = body.clientHeight * initData.initialScrollProgress + }); + } + } + } const newFrame = document.createElement('iframe'); newFrame.setAttribute('id', '_target'); @@ -140,17 +183,12 @@ }; newFrame.contentWindow.addEventListener('DOMContentLoaded', function (e) { - /** - * @type {any} - */ + /** @type {any} */ const contentDocument = e.target; if (contentDocument.body) { - // Workaround for https://github.com/Microsoft/vscode/issues/12865 // check new scrollTop and reset if neccessary - if (scrollTop !== contentDocument.body.scrollTop) { - contentDocument.body.scrollTop = scrollTop; - } + setInitialScrollPosition(contentDocument.body, this); // Bubble out link clicks contentDocument.body.addEventListener('click', handleInnerClick); @@ -166,6 +204,7 @@ const newFrame = getTarget(); if (newFrame.contentDocument === contentDocument) { newFrame.style.display = 'block'; + this.addEventListener('scroll', handleInnerScroll); } }); @@ -186,6 +225,10 @@ } }); + ipcRenderer.on('initial-scroll-position', function (event, progress) { + initData.initialScrollProgress = progress; + }); + // forward messages from the embedded iframe window.onmessage = function (message) { ipcRenderer.sendToHost(message.data.command, message.data.data); diff --git a/src/vs/workbench/parts/html/browser/webview.ts b/src/vs/workbench/parts/html/browser/webview.ts index 7b81825984dfa..b7a13ed8f07c2 100644 --- a/src/vs/workbench/parts/html/browser/webview.ts +++ b/src/vs/workbench/parts/html/browser/webview.ts @@ -52,6 +52,8 @@ export default class Webview { private _onDidClickLink = new Emitter(); private _onDidLoadContent = new Emitter<{ stats: any }>(); + private _onDidScroll = new Emitter<{ scrollYPercentage: number }>(); + constructor( private parent: HTMLElement, private _styleElement: Element @@ -108,6 +110,13 @@ export default class Webview { this.layout(); return; } + + if (event.channel === 'did-scroll') { + if (event.args && typeof event.args[0] === 'number') { + this._onDidScroll.fire({ scrollYPercentage: event.args[0] }); + } + return; + } }) ]; @@ -134,12 +143,20 @@ export default class Webview { return this._onDidLoadContent.event; } + get onDidScroll(): Event<{ scrollYPercentage: number }> { + return this._onDidScroll.event; + } + private _send(channel: string, ...args: any[]): void { this._ready .then(() => this._webview.send(channel, ...args)) .done(void 0, console.error); } + set initialScrollProgress(value: number) { + this._send('initial-scroll-position', value); + } + set contents(value: string[]) { this._send('content', value); } diff --git a/src/vs/workbench/parts/html/common/htmlInput.ts b/src/vs/workbench/parts/html/common/htmlInput.ts index 87b699c7853c7..e66c1e1f3504c 100644 --- a/src/vs/workbench/parts/html/common/htmlInput.ts +++ b/src/vs/workbench/parts/html/common/htmlInput.ts @@ -7,5 +7,5 @@ import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; export class HtmlInput extends ResourceEditorInput { - // just a marker class + // marker class } diff --git a/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts b/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts index 89c44b66a9e8c..466aa77c62dd5 100644 --- a/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts +++ b/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts @@ -10,7 +10,6 @@ import { marked } from 'vs/base/common/marked/marked'; import { IDisposable, dispose, toDisposable } from 'vs/base/common/lifecycle'; import { Builder } from 'vs/base/browser/builder'; import { append, $ } from 'vs/base/browser/dom'; -import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { ReleaseNotesInput } from './releaseNotesInput'; @@ -20,6 +19,8 @@ import { IOpenerService } from 'vs/platform/opener/common/opener'; import { IModeService } from 'vs/editor/common/services/modeService'; import { tokenizeToString } from 'vs/editor/common/modes/textToHtmlTokenizer'; import { IPartService, Parts } from 'vs/workbench/services/part/common/partService'; +import { WebviewEditor } from 'vs/workbench/browser/parts/editor/webviewEditor'; +import { IStorageService } from "vs/platform/storage/common/storage"; function renderBody(body: string): string { return ` @@ -33,7 +34,7 @@ function renderBody(body: string): string { `; } -export class ReleaseNotesEditor extends BaseEditor { +export class ReleaseNotesEditor extends WebviewEditor { static ID: string = 'workbench.editor.releaseNotes'; @@ -41,15 +42,17 @@ export class ReleaseNotesEditor extends BaseEditor { private webview: WebView; private contentDisposables: IDisposable[] = []; + private scrollYPercentage: number = 0; constructor( @ITelemetryService telemetryService: ITelemetryService, @IThemeService protected themeService: IThemeService, @IOpenerService private openerService: IOpenerService, @IModeService private modeService: IModeService, - @IPartService private partService: IPartService + @IPartService private partService: IPartService, + @IStorageService storageService: IStorageService ) { - super(ReleaseNotesEditor.ID, telemetryService, themeService); + super(ReleaseNotesEditor.ID, telemetryService, themeService, storageService); } createEditor(parent: Builder): void { @@ -92,10 +95,20 @@ export class ReleaseNotesEditor extends BaseEditor { .then(body => { this.webview = new WebView(this.content, this.partService.getContainer(Parts.EDITOR_PART)); this.webview.baseUrl = `https://code.visualstudio.com/raw/`; + + if (this.input && this.input instanceof ReleaseNotesInput) { + const state = this.loadViewState(this.input.version); + if (state) { + this.webview.initialScrollProgress = state.scrollYPercentage; + } + } this.webview.style(this.themeService.getTheme()); this.webview.contents = [body]; this.webview.onDidClickLink(link => this.openerService.open(link), null, this.contentDisposables); + this.webview.onDidScroll(event => { + this.scrollYPercentage = event.scrollYPercentage; + }, null, this.contentDisposables); this.themeService.onThemeChange(themeId => this.webview.style(themeId), null, this.contentDisposables); this.contentDisposables.push(this.webview); this.contentDisposables.push(toDisposable(() => this.webview = null)); @@ -120,4 +133,28 @@ export class ReleaseNotesEditor extends BaseEditor { this.contentDisposables = dispose(this.contentDisposables); super.dispose(); } + + protected getViewState() { + return { + scrollYPercentage: this.scrollYPercentage + }; + } + + public clearInput(): void { + if (this.input instanceof ReleaseNotesInput) { + this.saveViewState(this.input.version, { + scrollYPercentage: this.scrollYPercentage + }); + } + super.clearInput(); + } + + public shutdown(): void { + if (this.input instanceof ReleaseNotesInput) { + this.saveViewState(this.input.version, { + scrollYPercentage: this.scrollYPercentage + }); + } + super.shutdown(); + } } diff --git a/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts b/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts index 83f6636b8773f..c7e45a55ebd35 100644 --- a/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts +++ b/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.ts @@ -13,6 +13,7 @@ export class ReleaseNotesInput extends EditorInput { static get ID() { return 'workbench.releaseNotes.input'; } + get version(): string { return this._version; } get text(): string { return this._text; } From e18df5b2688b9cd1bbe41a61983cbcd36ab5fd0c Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 17 May 2017 14:32:55 -0700 Subject: [PATCH 0636/2747] Screenreader support for when docs are expanded --- .../contrib/suggest/browser/suggestWidget.ts | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 6b52946e15479..601dd6efc80d3 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -356,6 +356,7 @@ export class SuggestWidget implements IContentWidget, IDelegate private readonly listWidth = 330; private readonly minWidgetWidth = 430; private storageService: IStorageService; + private expandDocs: boolean; constructor( private editor: ICodeEditor, @@ -366,6 +367,7 @@ export class SuggestWidget implements IContentWidget, IDelegate @IStorageService storageService: IStorageService, @IKeybindingService keybindingService: IKeybindingService ) { + this.expandDocs = storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false); const kb = keybindingService.lookupKeybinding('editor.action.triggerSuggest'); const triggerKeybindingLabel = !kb ? '' : ` (${kb.getLabel()})`; @@ -556,9 +558,12 @@ export class SuggestWidget implements IContentWidget, IDelegate this.list.setFocus([index]); this.list.reveal(index); - this.showDetails(); - this.adjustDocsPosition(); - this._ariaAlert(this._getSuggestionAriaAlertLabel(item)); + + if (this.expandDocs) { + this.showDetails(); + this.adjustDocsPosition(); + this._ariaAlert(this.details.getAriaLabel()); + } }) .then(null, err => !isPromiseCanceledError(err) && onUnexpectedError(err)) .then(() => this.currentSuggestionDetails = null); @@ -599,10 +604,12 @@ export class SuggestWidget implements IContentWidget, IDelegate this.show(); break; case State.Open: - hide(this.messageElement, this.details.element); + hide(this.messageElement); show(this.listElement); - if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false)) { + if (this.expandDocs) { show(this.details.element); + } else { + hide(this.details.element); } this.show(); break; @@ -704,10 +711,6 @@ export class SuggestWidget implements IContentWidget, IDelegate switch (this.state) { case State.Hidden: return false; - case State.Details: - this.list.focusNext(1, true); - this.renderDetails(); - return true; case State.Loading: return !this.isAuto; default: @@ -750,10 +753,6 @@ export class SuggestWidget implements IContentWidget, IDelegate switch (this.state) { case State.Hidden: return false; - case State.Details: - this.list.focusPrevious(1, true); - this.renderDetails(); - return true; case State.Loading: return !this.isAuto; default: @@ -796,23 +795,23 @@ export class SuggestWidget implements IContentWidget, IDelegate } toggleDetails(): void { - let expandDocs = this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false); - if (expandDocs) { + this.expandDocs = !this.expandDocs; + this.storageService.store('expandSuggestionDocs', this.expandDocs, StorageScope.GLOBAL); + + if (!this.expandDocs) { hide(this.details.element); removeClass(this.element, 'docs-expanded'); } else { - show(this.details.element); - addClass(this.element, 'docs-expanded'); - this.show(); + this.showDetails(); } - this.storageService.store('expandSuggestionDocs', !expandDocs, StorageScope.GLOBAL); } showDetails(): void { if (this.state !== State.Open && this.state !== State.Details) { return; } - if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false)) { + if (this.expandDocs) { + show(this.details.element); addClass(this.element, 'docs-expanded'); } From 14c752b7c2f28f52a284a67d82e40ed134af8616 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 17 May 2017 14:39:54 -0700 Subject: [PATCH 0637/2747] small cleanups to webview --- .../parts/html/browser/htmlPreviewPart.ts | 14 +++++--------- src/vs/workbench/parts/html/browser/webview.ts | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/parts/html/browser/htmlPreviewPart.ts b/src/vs/workbench/parts/html/browser/htmlPreviewPart.ts index b6999b4c70d55..038c8c4cd991f 100644 --- a/src/vs/workbench/parts/html/browser/htmlPreviewPart.ts +++ b/src/vs/workbench/parts/html/browser/htmlPreviewPart.ts @@ -33,8 +33,6 @@ export class HtmlPreviewPart extends WebviewEditor { static ID: string = 'workbench.editor.htmlPreviewPart'; - private _textModelResolverService: ITextModelResolverService; - private _openerService: IOpenerService; private _webview: Webview; private _webviewDisposables: IDisposable[]; private _container: HTMLDivElement; @@ -50,17 +48,15 @@ export class HtmlPreviewPart extends WebviewEditor { constructor( @ITelemetryService telemetryService: ITelemetryService, - @ITextModelResolverService textModelResolverService: ITextModelResolverService, - @IThemeService protected themeService: IThemeService, - @IOpenerService openerService: IOpenerService, + @ITextModelResolverService private textModelResolverService: ITextModelResolverService, + @IThemeService themeService: IThemeService, + @IOpenerService private openerService: IOpenerService, @IWorkspaceContextService contextService: IWorkspaceContextService, @IPartService private partService: IPartService, @IStorageService storageService: IStorageService ) { super(HtmlPreviewPart.ID, telemetryService, themeService, storageService); - this._textModelResolverService = textModelResolverService; - this._openerService = openerService; this._baseUrl = contextService.toResource('/'); } @@ -95,7 +91,7 @@ export class HtmlPreviewPart extends WebviewEditor { this._webviewDisposables = [ this._webview, - this._webview.onDidClickLink(uri => this._openerService.open(uri)), + this._webview.onDidClickLink(uri => this.openerService.open(uri)), this._webview.onDidLoadContent(data => this.telemetryService.publicLog('previewHtml', data.stats)), this._webview.onDidScroll(data => { this.scrollYPercentage = data.scrollYPercentage; @@ -200,7 +196,7 @@ export class HtmlPreviewPart extends WebviewEditor { return super.setInput(input, options).then(() => { const resourceUri = input.getResource(); - return this._textModelResolverService.createModelReference(resourceUri).then(ref => { + return this.textModelResolverService.createModelReference(resourceUri).then(ref => { const model = ref.object; if (model instanceof BaseTextEditorModel) { diff --git a/src/vs/workbench/parts/html/browser/webview.ts b/src/vs/workbench/parts/html/browser/webview.ts index b7a13ed8f07c2..cfccdeec5b31a 100644 --- a/src/vs/workbench/parts/html/browser/webview.ts +++ b/src/vs/workbench/parts/html/browser/webview.ts @@ -93,7 +93,7 @@ export default class Webview { addDisposableListener(this._webview, 'dom-ready', () => { this.layout(); }), - addDisposableListener(this._webview, 'crashed', function () { + addDisposableListener(this._webview, 'crashed', () => { console.error('embedded page crashed'); }), addDisposableListener(this._webview, 'ipc-message', (event) => { From 78298312caeaf01057df124331ce5eb328ca69c4 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 17 May 2017 15:08:01 -0700 Subject: [PATCH 0638/2747] Add close icon to close expanded suggest docs --- .../contrib/suggest/browser/media/back.svg | 1 - .../suggest/browser/media/close-dark.svg | 1 + .../contrib/suggest/browser/media/close.svg | 1 + .../contrib/suggest/browser/media/suggest.css | 18 ++++++------------ .../contrib/suggest/browser/suggestWidget.ts | 14 +++++++------- 5 files changed, 15 insertions(+), 20 deletions(-) delete mode 100644 src/vs/editor/contrib/suggest/browser/media/back.svg create mode 100644 src/vs/editor/contrib/suggest/browser/media/close-dark.svg create mode 100644 src/vs/editor/contrib/suggest/browser/media/close.svg diff --git a/src/vs/editor/contrib/suggest/browser/media/back.svg b/src/vs/editor/contrib/suggest/browser/media/back.svg deleted file mode 100644 index 487340cd69abe..0000000000000 --- a/src/vs/editor/contrib/suggest/browser/media/back.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/editor/contrib/suggest/browser/media/close-dark.svg b/src/vs/editor/contrib/suggest/browser/media/close-dark.svg new file mode 100644 index 0000000000000..751e89b3b0215 --- /dev/null +++ b/src/vs/editor/contrib/suggest/browser/media/close-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/editor/contrib/suggest/browser/media/close.svg b/src/vs/editor/contrib/suggest/browser/media/close.svg new file mode 100644 index 0000000000000..fde34404d4eb8 --- /dev/null +++ b/src/vs/editor/contrib/suggest/browser/media/close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index ad198d8aa3f31..fd183518cc8d0 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -73,25 +73,24 @@ font-weight: bold; } -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .go-back, +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close, .monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details { opacity: 0.6; background-position: center center; background-repeat: no-repeat; background-size: 70%; - color: #0035DD; cursor: pointer; } -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .go-back { - background-image: url('./back.svg'); +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close { + background-image: url('./close.svg'); } .monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details { background-image: url('./info.svg'); } -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .go-back:hover, +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close:hover, .monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details:hover { opacity: 1; } @@ -218,13 +217,8 @@ /* Dark theme */ -.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header { - border-color: rgba(85,85,85,0.5); -} - -.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header > .go-back, -.monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details { - color: #4E94CE; +.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close{ + background-image: url('./close-dark.svg'); } /* High Contrast Theming */ diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 601dd6efc80d3..3fc14e54264c3 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -185,7 +185,7 @@ const enum State { class SuggestionDetails { private el: HTMLElement; - private back: HTMLElement; + private close: HTMLElement; private header: HTMLElement; private scrollbar: DomScrollableElement; private body: HTMLElement; @@ -214,8 +214,8 @@ class SuggestionDetails { this.header = append(this.body, $('.header')); this.type = append(this.header, $('p.type')); - this.back = append(this.header, $('span.go-back')); - this.back.title = nls.localize('goback', "Read less...{0}", triggerKeybindingLabel); + this.close = append(this.header, $('span.close')); + this.close.title = nls.localize('readLess', "Read less...{0}", triggerKeybindingLabel); this.docs = append(this.body, $('p.docs')); this.ariaLabel = null; @@ -245,11 +245,11 @@ class SuggestionDetails { this.el.style.height = this.type.clientHeight + this.docs.clientHeight + 8 + 'px'; - this.back.onmousedown = e => { + this.close.onmousedown = e => { e.preventDefault(); e.stopPropagation(); }; - this.back.onclick = e => { + this.close.onclick = e => { e.preventDefault(); e.stopPropagation(); this.widget.toggleDetails(); @@ -299,8 +299,8 @@ class SuggestionDetails { this.el.style.fontSize = fontSizePx; this.type.style.fontFamily = fontFamily; - this.back.style.height = lineHeightPx; - this.back.style.width = lineHeightPx; + this.close.style.height = lineHeightPx; + this.close.style.width = lineHeightPx; } dispose(): void { From d8ce0d822e4e808b713902f09c4e2ff919146ef7 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 17 May 2017 16:07:35 -0700 Subject: [PATCH 0639/2747] Remove scrollbar from small suggestion docs --- .../contrib/suggest/browser/media/suggest.css | 30 +++++++++++++++++-- .../contrib/suggest/browser/suggestWidget.ts | 9 +++--- 2 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index fd183518cc8d0..b17aac149b5b6 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -9,11 +9,23 @@ width: 660px; } -.monaco-editor .suggest-widget.docs-expanded > .tree, -.monaco-editor .suggest-widget > .details { +.monaco-editor .suggest-widget.docs-expanded > .tree { width: 330px; } +.monaco-editor .suggest-widget > .details { + /* .details does not use border-box, so subtract the border height here (2px). This is the case + because the height of .details is set prorammatically based on .header and .docs, we don't want + our JS to care about the size of the border (which changes based on theme type). */ + width: 328px; +} + +.monaco-editor .suggest-widget > .details, +.monaco-editor .suggest-widget > .tree { + border-style: solid; + border-width: 1px; +} + .monaco-editor .suggest-widget.small, .monaco-editor .suggest-widget > .tree, .monaco-editor .suggest-widget.small.docs-expanded > .tree, @@ -30,6 +42,8 @@ .monaco-editor .suggest-widget > .message { padding-left: 22px; + border-style: solid; + border-width: 1px; } .monaco-editor .suggest-widget > .tree { @@ -171,7 +185,6 @@ display: flex; flex-direction: column; cursor: default; - box-sizing: border-box; } .monaco-editor .suggest-widget .details.no-docs { @@ -223,6 +236,17 @@ /* High Contrast Theming */ + +.monaco-editor.hc-black .suggest-widget > .tree, +.monaco-editor.hc-black .suggest-widget > .message { + border-width: 2px; +} + +.monaco-editor.hc-black .suggest-widget > .details { + border-width: 2px; + width: 326px; +} + .monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon, .monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon { background-image: url('Misc_inverse_16x.svg'); } diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 3fc14e54264c3..13e3ecb3b547c 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -243,7 +243,7 @@ class SuggestionDetails { this.type.innerText = item.suggestion.detail || ''; this.docs.textContent = item.suggestion.documentation; - this.el.style.height = this.type.clientHeight + this.docs.clientHeight + 8 + 'px'; + this.el.style.height = this.header.offsetHeight + this.docs.offsetHeight + 'px'; this.close.onmousedown = e => { e.preventDefault(); @@ -488,10 +488,9 @@ export class SuggestWidget implements IContentWidget, IDelegate } let borderColor = theme.getColor(editorSuggestWidgetBorder); if (borderColor) { - let borderWidth = theme.type === 'hc' ? 2 : 1; - this.listElement.style.border = `${borderWidth}px solid ${borderColor}`; - this.details.element.style.border = `${borderWidth}px solid ${borderColor}`; - this.messageElement.style.border = `${borderWidth}px solid ${borderColor}`; + this.listElement.style.borderColor = borderColor.toString(); + this.details.element.style.borderColor = borderColor.toString(); + this.messageElement.style.borderColor = borderColor.toString(); } } From 6ec7c698553a43115b7885b3ec5188462320f06c Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 17 May 2017 16:13:26 -0700 Subject: [PATCH 0640/2747] Use focusBorderColor when details is in focus --- .../contrib/suggest/browser/media/suggest.css | 9 ++++----- .../contrib/suggest/browser/suggestWidget.ts | 14 +++++++++++++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index b17aac149b5b6..4febb443944f4 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -228,15 +228,14 @@ display: none; } -/* Dark theme */ -.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close{ +/* High Contrast and Dark Theming */ + +.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close, +.monaco-editor.hc-black .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close { background-image: url('./close-dark.svg'); } -/* High Contrast Theming */ - - .monaco-editor.hc-black .suggest-widget > .tree, .monaco-editor.hc-black .suggest-widget > .message { border-width: 2px; diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 13e3ecb3b547c..36ba2953a93a0 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -29,7 +29,7 @@ import { alert } from 'vs/base/browser/ui/aria/aria'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IThemeService, ITheme, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { registerColor, editorWidgetBackground, listFocusBackground, activeContrastBorder, listHighlightForeground, editorForeground, editorWidgetBorder } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, editorWidgetBackground, listFocusBackground, activeContrastBorder, listHighlightForeground, editorForeground, editorWidgetBorder, focusBorder } from 'vs/platform/theme/common/colorRegistry'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; const sticky = false; // for development purposes @@ -357,6 +357,8 @@ export class SuggestWidget implements IContentWidget, IDelegate private readonly minWidgetWidth = 430; private storageService: IStorageService; private expandDocs: boolean; + private detailsFocusBorderColor: string; + private detailsBorderColor: string; constructor( private editor: ICodeEditor, @@ -492,6 +494,10 @@ export class SuggestWidget implements IContentWidget, IDelegate this.details.element.style.borderColor = borderColor.toString(); this.messageElement.style.borderColor = borderColor.toString(); } + let focusBorderColor = theme.getColor(focusBorder); + if (focusBorderColor) { + this.detailsFocusBorderColor = focusBorderColor.toString(); + } } private onListFocus(e: IListEvent): void { @@ -788,8 +794,14 @@ export class SuggestWidget implements IContentWidget, IDelegate toggleDetailsFocus(): void { if (this.state === State.Details) { this.setState(State.Open); + if (this.detailsBorderColor) { + this.details.element.style.borderColor = this.detailsBorderColor; + } } else if (this.state === State.Open) { this.setState(State.Details); + if (this.detailsFocusBorderColor) { + this.details.element.style.borderColor = this.detailsFocusBorderColor; + } } } From 95f392458a7308d15c0b2ab71e9ba62887a12844 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 17 May 2017 16:41:29 -0700 Subject: [PATCH 0641/2747] Move close icon to fix case when there is docs but no details --- .../contrib/suggest/browser/media/suggest.css | 20 +++++++------------ .../contrib/suggest/browser/suggestWidget.ts | 10 ++++------ 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index 4febb443944f4..5e2b764763e1f 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -87,7 +87,7 @@ font-weight: bold; } -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close, +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .close, .monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details { opacity: 0.6; background-position: center center; @@ -96,15 +96,16 @@ cursor: pointer; } -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close { +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .close { background-image: url('./close.svg'); + float: right; } .monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details { background-image: url('./info.svg'); } -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close:hover, +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .close:hover, .monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details:hover { opacity: 1; } @@ -203,14 +204,7 @@ white-space: pre-wrap; } -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header { - padding: 4px 5px; - display: flex; - box-sizing: border-box; - border-bottom: 1px solid rgba(204, 204, 204, 0.5); -} - -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .type { +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .type { flex: 2; overflow: hidden; text-overflow: ellipsis; @@ -231,8 +225,8 @@ /* High Contrast and Dark Theming */ -.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close, -.monaco-editor.hc-black .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close { +.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .close, +.monaco-editor.hc-black .suggest-widget .details > .monaco-scrollable-element > .body > .close { background-image: url('./close-dark.svg'); } diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 36ba2953a93a0..7c7fc8c186914 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -186,7 +186,6 @@ class SuggestionDetails { private el: HTMLElement; private close: HTMLElement; - private header: HTMLElement; private scrollbar: DomScrollableElement; private body: HTMLElement; private type: HTMLElement; @@ -211,11 +210,10 @@ class SuggestionDetails { append(this.el, this.scrollbar.getDomNode()); this.disposables.push(this.scrollbar); - this.header = append(this.body, $('.header')); - this.type = append(this.header, $('p.type')); - - this.close = append(this.header, $('span.close')); + this.close = append(this.body, $('span.close')); this.close.title = nls.localize('readLess', "Read less...{0}", triggerKeybindingLabel); + this.type = append(this.body, $('p.type')); + this.docs = append(this.body, $('p.docs')); this.ariaLabel = null; @@ -243,7 +241,7 @@ class SuggestionDetails { this.type.innerText = item.suggestion.detail || ''; this.docs.textContent = item.suggestion.documentation; - this.el.style.height = this.header.offsetHeight + this.docs.offsetHeight + 'px'; + this.el.style.height = this.type.offsetHeight + this.docs.offsetHeight + 'px'; this.close.onmousedown = e => { e.preventDefault(); From 1a653e1a2d7c71b5add8cac670b9136b3bf90a0e Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 17 May 2017 16:49:56 -0700 Subject: [PATCH 0642/2747] Use full width only when docs are expanded --- src/vs/editor/contrib/suggest/browser/media/suggest.css | 5 ++++- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index 5e2b764763e1f..ac6e53ec7a06b 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -6,6 +6,9 @@ /* Suggest */ .monaco-editor .suggest-widget { z-index: 40; +} + +.monaco-editor .suggest-widget.docs-expanded { width: 660px; } @@ -26,7 +29,7 @@ border-width: 1px; } -.monaco-editor .suggest-widget.small, +.monaco-editor .suggest-widget, .monaco-editor .suggest-widget > .tree, .monaco-editor .suggest-widget.small.docs-expanded > .tree, .monaco-editor .suggest-widget.small > .details { diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 7c7fc8c186914..e18d24a58efcc 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -810,6 +810,7 @@ export class SuggestWidget implements IContentWidget, IDelegate if (!this.expandDocs) { hide(this.details.element); removeClass(this.element, 'docs-expanded'); + this.editor.layoutContentWidget(this); } else { this.showDetails(); } From 67e76b818c7638456502ae7f1364febdece0a0c7 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 17 May 2017 15:55:07 -0700 Subject: [PATCH 0643/2747] Fix webview scroll positon sometimes being reset Fixes #25125 **Bug** Sometimes the scroll position of webviews is reset. The root cause seems to be rapid edits to the markdown preview resulting in the creation of multiple old content iframes **Fix** Only maintain two iframes at most. Ensure that these are properly used when updating --- .../parts/html/browser/webview-pre.js | 47 +++++++++++-------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/src/vs/workbench/parts/html/browser/webview-pre.js b/src/vs/workbench/parts/html/browser/webview-pre.js index 51c9c25722542..08b6318591d64 100644 --- a/src/vs/workbench/parts/html/browser/webview-pre.js +++ b/src/vs/workbench/parts/html/browser/webview-pre.js @@ -24,8 +24,15 @@ /** * @return {HTMLIFrameElement} */ - function getTarget() { - return document.getElementById('_target'); + function getActiveFrame() { + return document.getElementById('active-frame'); + } + + /** + * @return {HTMLIFrameElement} + */ + function getPendingFrame() { + return document.getElementById('pending-frame'); } /** @@ -89,7 +96,7 @@ initData.activeTheme = activeTheme; // webview - var target = getTarget() + var target = getActiveFrame() if (!target) { return; } @@ -105,7 +112,7 @@ // propagate focus ipcRenderer.on('focus', function () { - const target = getTarget(); + const target = getActiveFrame(); if (target) { target.contentWindow.focus(); } @@ -144,10 +151,7 @@ styleBody(newDocument.body); - const frame = getTarget(); - if (frame) { - frame.setAttribute('id', '_oldTarget'); - } + const frame = getActiveFrame(); // keep current scrollTop around and use later let setInitialScrollPosition; @@ -161,15 +165,22 @@ setInitialScrollPosition = function (body, window) { body.scrollTop = 0; if (!isNaN(initData.initialScrollProgress)) { - window.addEventListener('load', function() { + window.addEventListener('load', function () { body.scrollTop = body.clientHeight * initData.initialScrollProgress }); } } } + // Clean up old pending frames and set current one as new one + const previousPendingFrame = getPendingFrame(); + if (previousPendingFrame) { + previousPendingFrame.setAttribute('id', ''); + document.body.removeChild(previousPendingFrame); + } + const newFrame = document.createElement('iframe'); - newFrame.setAttribute('id', '_target'); + newFrame.setAttribute('id', 'pending-frame'); newFrame.setAttribute('frameborder', '0'); newFrame.setAttribute('sandbox', 'allow-scripts allow-forms allow-same-origin'); newFrame.style.cssText = "margin: 0; overflow: hidden; position: absolute; width: 100%; height: 100%; display: none"; @@ -194,15 +205,13 @@ contentDocument.body.addEventListener('click', handleInnerClick); } - // Clean up old frames - [].forEach.call(document.body.getElementsByTagName('iframe'), function (frame) { - if (frame.id !== '_target') { - document.body.removeChild(frame); - } - }); - - const newFrame = getTarget(); + const newFrame = getPendingFrame(); if (newFrame.contentDocument === contentDocument) { + const oldActiveFrame = getActiveFrame(); + if (oldActiveFrame) { + document.body.removeChild(oldActiveFrame); + } + newFrame.setAttribute('id', 'active-frame'); newFrame.style.display = 'block'; this.addEventListener('scroll', handleInnerScroll); } @@ -219,7 +228,7 @@ // Forward message to the embedded iframe ipcRenderer.on('message', function (event, data) { - const target = getTarget(); + const target = getActiveFrame(); if (target) { target.contentWindow.postMessage(data, document.location.origin); } From a67048c2feb654e3441098f3b7e2479ffab83e8a Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 17 May 2017 17:14:55 -0700 Subject: [PATCH 0644/2747] Fix a potential null reference --- src/vs/workbench/parts/html/browser/webview-pre.js | 2 +- src/vs/workbench/parts/html/browser/webview.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/html/browser/webview-pre.js b/src/vs/workbench/parts/html/browser/webview-pre.js index 08b6318591d64..48ee0e03b649d 100644 --- a/src/vs/workbench/parts/html/browser/webview-pre.js +++ b/src/vs/workbench/parts/html/browser/webview-pre.js @@ -206,7 +206,7 @@ } const newFrame = getPendingFrame(); - if (newFrame.contentDocument === contentDocument) { + if (newFrame && newFrame.contentDocument === contentDocument) { const oldActiveFrame = getActiveFrame(); if (oldActiveFrame) { document.body.removeChild(oldActiveFrame); diff --git a/src/vs/workbench/parts/html/browser/webview.ts b/src/vs/workbench/parts/html/browser/webview.ts index cfccdeec5b31a..b8d6922a84476 100644 --- a/src/vs/workbench/parts/html/browser/webview.ts +++ b/src/vs/workbench/parts/html/browser/webview.ts @@ -266,7 +266,7 @@ export default class Webview { return; } const window = contents.getOwnerBrowserWindow(); - if (!window || !window.webContents) { + if (!window || !window.webContents || window.webContents.isDestroyed()) { return; } window.webContents.getZoomFactor(factor => { From 799fa528dbe3da6c116637a7c5adf03bf5a762d0 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 17 May 2017 17:39:00 -0700 Subject: [PATCH 0645/2747] Load script async in markdown preview --- extensions/markdown/media/main.js | 11 +++++++++-- extensions/markdown/src/previewContentProvider.ts | 2 +- src/vs/workbench/parts/html/browser/webview-pre.js | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/extensions/markdown/media/main.js b/extensions/markdown/media/main.js index 1718be3f453af..1b7ac343e0943 100644 --- a/extensions/markdown/media/main.js +++ b/extensions/markdown/media/main.js @@ -145,7 +145,7 @@ var marker = new ActiveLineMarker(); const settings = JSON.parse(document.getElementById('vscode-markdown-preview-data').getAttribute('data-settings')); - window.addEventListener('load', () => { + function onLoad() { if (settings.scrollPreviewWithEditorSelection) { const initialLine = +settings.line; if (!isNaN(initialLine)) { @@ -155,7 +155,14 @@ }, 0); } } - }); + } + + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', onLoad); + } else { + onLoad(); + } + window.addEventListener('resize', () => { scrollDisabled = true; diff --git a/extensions/markdown/src/previewContentProvider.ts b/extensions/markdown/src/previewContentProvider.ts index e4265cf9eb05d..789fe49547f3c 100644 --- a/extensions/markdown/src/previewContentProvider.ts +++ b/extensions/markdown/src/previewContentProvider.ts @@ -196,7 +196,7 @@ export class MDDocumentContentProvider implements vscode.TextDocumentContentProv private getScripts(nonce: string): string { const scripts = [this.getMediaPath('main.js')].concat(this.extraScripts.map(resource => resource.toString())); return scripts - .map(source => ``) + .map(source => ``) .join('\n'); } diff --git a/src/vs/workbench/parts/html/browser/webview-pre.js b/src/vs/workbench/parts/html/browser/webview-pre.js index 48ee0e03b649d..0a63595c8c864 100644 --- a/src/vs/workbench/parts/html/browser/webview-pre.js +++ b/src/vs/workbench/parts/html/browser/webview-pre.js @@ -86,7 +86,7 @@ }); } - document.addEventListener("DOMContentLoaded", function (event) { + document.addEventListener('DOMContentLoaded', function (event) { ipcRenderer.on('baseUrl', function (event, value) { initData.baseUrl = value; }); From 0b48b8c193453c02ad085dd71f53c2712d566c7b Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 17 May 2017 17:38:47 -0700 Subject: [PATCH 0646/2747] Fix bug when change to expandDocs in one editor doesnt show up in another --- .../contrib/suggest/browser/suggestWidget.ts | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index e18d24a58efcc..9836f77584550 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -354,7 +354,6 @@ export class SuggestWidget implements IContentWidget, IDelegate private readonly listWidth = 330; private readonly minWidgetWidth = 430; private storageService: IStorageService; - private expandDocs: boolean; private detailsFocusBorderColor: string; private detailsBorderColor: string; @@ -367,7 +366,6 @@ export class SuggestWidget implements IContentWidget, IDelegate @IStorageService storageService: IStorageService, @IKeybindingService keybindingService: IKeybindingService ) { - this.expandDocs = storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false); const kb = keybindingService.lookupKeybinding('editor.action.triggerSuggest'); const triggerKeybindingLabel = !kb ? '' : ` (${kb.getLabel()})`; @@ -562,10 +560,12 @@ export class SuggestWidget implements IContentWidget, IDelegate this.list.setFocus([index]); this.list.reveal(index); - if (this.expandDocs) { + if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false)) { this.showDetails(); this.adjustDocsPosition(); this._ariaAlert(this.details.getAriaLabel()); + } else { + removeClass(this.element, 'docs-expanded'); } }) .then(null, err => !isPromiseCanceledError(err) && onUnexpectedError(err)) @@ -609,7 +609,7 @@ export class SuggestWidget implements IContentWidget, IDelegate case State.Open: hide(this.messageElement); show(this.listElement); - if (this.expandDocs) { + if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false)) { show(this.details.element); } else { hide(this.details.element); @@ -804,14 +804,14 @@ export class SuggestWidget implements IContentWidget, IDelegate } toggleDetails(): void { - this.expandDocs = !this.expandDocs; - this.storageService.store('expandSuggestionDocs', this.expandDocs, StorageScope.GLOBAL); - if (!this.expandDocs) { + if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false)) { + this.storageService.store('expandSuggestionDocs', false, StorageScope.GLOBAL); hide(this.details.element); removeClass(this.element, 'docs-expanded'); this.editor.layoutContentWidget(this); } else { + this.storageService.store('expandSuggestionDocs', true, StorageScope.GLOBAL); this.showDetails(); } } @@ -820,10 +820,9 @@ export class SuggestWidget implements IContentWidget, IDelegate if (this.state !== State.Open && this.state !== State.Details) { return; } - if (this.expandDocs) { - show(this.details.element); - addClass(this.element, 'docs-expanded'); - } + + show(this.details.element); + addClass(this.element, 'docs-expanded'); this.show(); this.editor.focus(); From e0a8ca570dbe19290dc4d6f3b5499fdcd52d6f26 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 17 May 2017 17:40:08 -0700 Subject: [PATCH 0647/2747] Re-ordering css for better readability --- .../contrib/suggest/browser/media/suggest.css | 68 +++++++++++-------- .../contrib/suggest/browser/suggestWidget.ts | 22 +++--- 2 files changed, 49 insertions(+), 41 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index ac6e53ec7a06b..d5e20221956e6 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -6,36 +6,13 @@ /* Suggest */ .monaco-editor .suggest-widget { z-index: 40; + width: 430px; } .monaco-editor .suggest-widget.docs-expanded { width: 660px; } -.monaco-editor .suggest-widget.docs-expanded > .tree { - width: 330px; -} - -.monaco-editor .suggest-widget > .details { - /* .details does not use border-box, so subtract the border height here (2px). This is the case - because the height of .details is set prorammatically based on .header and .docs, we don't want - our JS to care about the size of the border (which changes based on theme type). */ - width: 328px; -} - -.monaco-editor .suggest-widget > .details, -.monaco-editor .suggest-widget > .tree { - border-style: solid; - border-width: 1px; -} - -.monaco-editor .suggest-widget, -.monaco-editor .suggest-widget > .tree, -.monaco-editor .suggest-widget.small.docs-expanded > .tree, -.monaco-editor .suggest-widget.small > .details { - width: 430px; -} - .monaco-editor .suggest-widget.visible { -webkit-transition: left .05s ease-in-out; -moz-transition: left .05s ease-in-out; @@ -49,10 +26,14 @@ border-width: 1px; } +/** Styles for the list element **/ .monaco-editor .suggest-widget > .tree { height: 100%; + width: 430px; float: left; box-sizing: border-box; + border-style: solid; + border-width: 1px; } .monaco-editor .suggest-widget.list-right > .tree { @@ -63,6 +44,16 @@ float: none; } +.monaco-editor .suggest-widget.docs-expanded > .tree { + width: 330px; +} + +.monaco-editor .suggest-widget.small.docs-expanded > .tree { + width: 430px; +} + +/** Styles for each row in the list element **/ + .monaco-editor .suggest-widget .monaco-list .monaco-list-row { display: flex; -mox-box-sizing: border-box; @@ -90,8 +81,10 @@ font-weight: bold; } +/** Icon styles **/ + .monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .close, -.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details { +.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore { opacity: 0.6; background-position: center center; background-repeat: no-repeat; @@ -104,15 +97,17 @@ float: right; } -.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details { +.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore { background-image: url('./info.svg'); } .monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .close:hover, -.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details:hover { +.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore:hover { opacity: 1; } +/** Type Info and icon next to the label in the focused completion item **/ + .monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label { margin-left: 0.8em; flex: 1; @@ -126,19 +121,21 @@ display: inline; } -.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .docs-details, +.monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore, .monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label, -.monaco-editor .suggest-widget.docs-expanded .monaco-list .monaco-list-row.focused > .contents > .main > .docs-details, +.monaco-editor .suggest-widget.docs-expanded .monaco-list .monaco-list-row.focused > .contents > .main > .readMore, .monaco-editor .suggest-widget.docs-expanded .monaco-list .monaco-list-row.focused > .contents > .main > .type-label { display: none; } -.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .docs-details, +.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .readMore, .monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .type-label, .monaco-editor .suggest-widget.docs-expanded.small .monaco-list .monaco-list-row.focused > .contents > .main > .type-label { display: inline; } +/** Styles for each row in the list **/ + .monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon { display: block; height: 16px; @@ -184,11 +181,22 @@ display: inline-block; } +/** Styles for the docs of the completion item in focus **/ .monaco-editor .suggest-widget .details { max-height: 216px; display: flex; flex-direction: column; cursor: default; + /* .details does not use border-box, so subtract the border height here (2px). This is the case + because the height of .details is set prorammatically based on .header and .docs, we don't want + our JS to care about the size of the border (which changes based on theme type). */ + width: 328px; + border-style: solid; + border-width: 1px; +} + +.monaco-editor .suggest-widget.small > .details { + width: 430px; } .monaco-editor .suggest-widget .details.no-docs { diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 9836f77584550..2c11eb765de0c 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -40,7 +40,7 @@ interface ISuggestionTemplateData { colorspan: HTMLElement; highlightedLabel: HighlightedLabel; typeLabel: HTMLElement; - documentationDetails: HTMLElement; + readMore: HTMLElement; disposables: IDisposable[]; } @@ -95,8 +95,8 @@ class Renderer implements IRenderer { data.disposables.push(data.highlightedLabel); data.typeLabel = append(main, $('span.type-label')); - data.documentationDetails = append(main, $('span.docs-details')); - data.documentationDetails.title = nls.localize('readMore', "Read More...{0}", this.triggerKeybindingLabel); + data.readMore = append(main, $('span.readMore')); + data.readMore.title = nls.localize('readMore', "Read More...{0}", this.triggerKeybindingLabel); const configureFont = () => { const configuration = this.editor.getConfiguration(); @@ -111,8 +111,8 @@ class Renderer implements IRenderer { main.style.lineHeight = lineHeightPx; data.icon.style.height = lineHeightPx; data.icon.style.width = lineHeightPx; - data.documentationDetails.style.height = lineHeightPx; - data.documentationDetails.style.width = lineHeightPx; + data.readMore.style.height = lineHeightPx; + data.readMore.style.width = lineHeightPx; }; configureFont(); @@ -149,20 +149,20 @@ class Renderer implements IRenderer { data.typeLabel.textContent = (suggestion.detail || '').replace(/\n.*$/m, ''); if (canExpandCompletionItem(element)) { - show(data.documentationDetails); - data.documentationDetails.onmousedown = e => { + show(data.readMore); + data.readMore.onmousedown = e => { e.stopPropagation(); e.preventDefault(); }; - data.documentationDetails.onclick = e => { + data.readMore.onclick = e => { e.stopPropagation(); e.preventDefault(); this.widget.toggleDetails(); }; } else { - hide(data.documentationDetails); - data.documentationDetails.onmousedown = null; - data.documentationDetails.onclick = null; + hide(data.readMore); + data.readMore.onmousedown = null; + data.readMore.onclick = null; } } From 966a6e10c73988cf013f40f2de10b71380aa5a54 Mon Sep 17 00:00:00 2001 From: Daniel Ye Date: Wed, 17 May 2017 18:00:26 -0700 Subject: [PATCH 0648/2747] 2017-05-17. Merged in translations. --- .../chs/extensions/git/out/commands.i18n.json | 1 + i18n/chs/extensions/git/package.i18n.json | 4 ++- .../out/typescriptServiceClient.i18n.json | 1 - .../typescript/out/utils/logger.i18n.json | 6 ++++ .../extensions/typescript/package.i18n.json | 1 - .../resourceviewer/resourceViewer.i18n.json | 2 +- .../base/common/jsonErrorMessages.i18n.json | 12 +++++++- .../src/vs/code/electron-main/menus.i18n.json | 12 +++++--- .../config/commonEditorConfig.i18n.json | 2 +- .../common/view/editorColorRegistry.i18n.json | 6 +++- .../theme/common/colorRegistry.i18n.json | 17 +++++++++-- .../mainThreadExtensionService.i18n.json | 5 +++- .../mainThreadMessageService.i18n.json | 6 +++- .../main.contribution.i18n.json | 1 + .../actions/balance.i18n.json | 6 ++++ .../actions/editPoints.i18n.json | 6 ++++ .../actions/evaluateMath.i18n.json | 6 ++++ .../actions/expandAbbreviation.i18n.json | 6 ++++ .../actions/incrementDecrement.i18n.json | 6 ++++ .../actions/matchingPair.i18n.json | 6 ++++ .../actions/mergeLines.i18n.json | 6 ++++ .../actions/reflectCssValue.i18n.json | 6 ++++ .../actions/removeTag.i18n.json | 6 ++++ .../actions/selectItem.i18n.json | 6 ++++ .../actions/splitJoinTag.i18n.json | 6 ++++ .../actions/toggleComment.i18n.json | 6 ++++ .../actions/updateImageSize.i18n.json | 6 ++++ .../actions/updateTag.i18n.json | 6 ++++ .../actions/wrapWithAbbreviation.i18n.json | 6 ++++ .../emmet.contribution.i18n.json | 6 ++++ .../extensionTipsService.i18n.json | 1 + .../browser/commandsHandler.i18n.json | 1 + .../themes.contribution.i18n.json | 1 - .../vs_code_welcome_page.i18n.json | 28 ++++++++--------- .../configurationEditingService.i18n.json | 7 ++++- .../out/typescriptServiceClient.i18n.json | 1 - .../typescript/out/utils/logger.i18n.json | 6 ++++ .../extensions/typescript/package.i18n.json | 1 - .../resourceviewer/resourceViewer.i18n.json | 3 -- .../common/view/editorColorRegistry.i18n.json | 5 +++- .../browser/referencesWidget.i18n.json | 2 ++ .../menusExtensionPoint.i18n.json | 1 + .../theme/common/colorRegistry.i18n.json | 16 ++++++++-- .../mainThreadExtensionService.i18n.json | 5 +++- .../mainThreadMessageService.i18n.json | 6 +++- .../actions/balance.i18n.json | 6 ++++ .../actions/editPoints.i18n.json | 6 ++++ .../actions/evaluateMath.i18n.json | 6 ++++ .../actions/expandAbbreviation.i18n.json | 6 ++++ .../actions/incrementDecrement.i18n.json | 6 ++++ .../actions/matchingPair.i18n.json | 6 ++++ .../actions/mergeLines.i18n.json | 6 ++++ .../actions/reflectCssValue.i18n.json | 6 ++++ .../actions/removeTag.i18n.json | 6 ++++ .../actions/selectItem.i18n.json | 6 ++++ .../actions/splitJoinTag.i18n.json | 6 ++++ .../actions/toggleComment.i18n.json | 6 ++++ .../actions/updateImageSize.i18n.json | 6 ++++ .../actions/updateTag.i18n.json | 6 ++++ .../actions/wrapWithAbbreviation.i18n.json | 6 ++++ .../emmet.contribution.i18n.json | 6 ++++ .../themes.contribution.i18n.json | 1 - .../vs_code_welcome_page.i18n.json | 28 ++++++++--------- .../configurationEditingService.i18n.json | 2 ++ i18n/deu/extensions/git/package.i18n.json | 4 +-- .../out/typescriptServiceClient.i18n.json | 1 - .../typescript/out/utils/logger.i18n.json | 6 ++++ .../extensions/typescript/package.i18n.json | 1 - .../base/common/jsonErrorMessages.i18n.json | 12 +++++++- .../src/vs/code/electron-main/menus.i18n.json | 4 +-- .../theme/common/colorRegistry.i18n.json | 6 ++-- .../mainThreadExtensionService.i18n.json | 5 +++- .../mainThreadMessageService.i18n.json | 6 +++- .../actions/balance.i18n.json | 6 ++++ .../actions/editPoints.i18n.json | 6 ++++ .../actions/evaluateMath.i18n.json | 6 ++++ .../actions/expandAbbreviation.i18n.json | 6 ++++ .../actions/incrementDecrement.i18n.json | 6 ++++ .../actions/matchingPair.i18n.json | 6 ++++ .../actions/mergeLines.i18n.json | 6 ++++ .../actions/reflectCssValue.i18n.json | 6 ++++ .../actions/removeTag.i18n.json | 6 ++++ .../actions/selectItem.i18n.json | 6 ++++ .../actions/splitJoinTag.i18n.json | 6 ++++ .../actions/toggleComment.i18n.json | 6 ++++ .../actions/updateImageSize.i18n.json | 6 ++++ .../actions/updateTag.i18n.json | 6 ++++ .../actions/wrapWithAbbreviation.i18n.json | 6 ++++ .../emmet.contribution.i18n.json | 6 ++++ .../browser/extensionEditor.i18n.json | 2 +- .../browser/extensionsActions.i18n.json | 16 +++++----- .../browser/extensionsQuickOpen.i18n.json | 4 +-- .../common/extensionsInput.i18n.json | 2 +- .../extensionTipsService.i18n.json | 4 ++- .../extensions.contribution.i18n.json | 9 +++--- .../extensionsActions.i18n.json | 2 +- .../extensionsViewlet.i18n.json | 4 +-- .../themes.contribution.i18n.json | 1 - .../vs_code_welcome_page.i18n.json | 30 +++++++++---------- .../configurationEditingService.i18n.json | 2 ++ .../esn/extensions/git/out/commands.i18n.json | 1 + i18n/esn/extensions/git/package.i18n.json | 4 ++- ...rectiveCommentCompletionProvider.i18n.json | 6 +++- .../out/typescriptServiceClient.i18n.json | 1 - .../typescript/out/utils/logger.i18n.json | 6 ++++ .../extensions/typescript/package.i18n.json | 2 +- .../base/common/jsonErrorMessages.i18n.json | 12 +++++++- .../src/vs/code/electron-main/menus.i18n.json | 3 ++ .../config/commonEditorConfig.i18n.json | 1 + .../common/view/editorColorRegistry.i18n.json | 6 +++- .../browser/referencesWidget.i18n.json | 3 ++ .../theme/common/colorRegistry.i18n.json | 21 +++++++++++-- .../mainThreadExtensionService.i18n.json | 5 +++- .../mainThreadMessageService.i18n.json | 6 +++- .../src/vs/workbench/common/theme.i18n.json | 3 ++ .../main.contribution.i18n.json | 1 + .../debug/browser/debugActions.i18n.json | 1 + .../electron-browser/debugCommands.i18n.json | 4 ++- .../actions/balance.i18n.json | 6 ++++ .../actions/editPoints.i18n.json | 6 ++++ .../actions/evaluateMath.i18n.json | 6 ++++ .../actions/expandAbbreviation.i18n.json | 6 ++++ .../actions/incrementDecrement.i18n.json | 6 ++++ .../actions/matchingPair.i18n.json | 6 ++++ .../actions/mergeLines.i18n.json | 6 ++++ .../actions/reflectCssValue.i18n.json | 6 ++++ .../actions/removeTag.i18n.json | 6 ++++ .../actions/selectItem.i18n.json | 6 ++++ .../actions/splitJoinTag.i18n.json | 6 ++++ .../actions/toggleComment.i18n.json | 6 ++++ .../actions/updateImageSize.i18n.json | 6 ++++ .../actions/updateTag.i18n.json | 6 ++++ .../actions/wrapWithAbbreviation.i18n.json | 6 ++++ .../emmet.contribution.i18n.json | 6 ++++ .../browser/commandsHandler.i18n.json | 1 + .../browser/searchResultsView.i18n.json | 4 ++- .../themes.contribution.i18n.json | 1 - .../vs_code_welcome_page.i18n.json | 28 ++++++++--------- .../configurationEditingService.i18n.json | 9 +++++- .../out/typescriptServiceClient.i18n.json | 1 - .../typescript/out/utils/logger.i18n.json | 6 ++++ .../extensions/typescript/package.i18n.json | 1 - .../base/common/jsonErrorMessages.i18n.json | 12 +++++++- .../theme/common/colorRegistry.i18n.json | 6 ++-- .../mainThreadExtensionService.i18n.json | 5 +++- .../mainThreadMessageService.i18n.json | 6 +++- .../actions/balance.i18n.json | 6 ++++ .../actions/editPoints.i18n.json | 6 ++++ .../actions/evaluateMath.i18n.json | 6 ++++ .../actions/expandAbbreviation.i18n.json | 6 ++++ .../actions/incrementDecrement.i18n.json | 6 ++++ .../actions/matchingPair.i18n.json | 6 ++++ .../actions/mergeLines.i18n.json | 6 ++++ .../actions/reflectCssValue.i18n.json | 6 ++++ .../actions/removeTag.i18n.json | 6 ++++ .../actions/selectItem.i18n.json | 6 ++++ .../actions/splitJoinTag.i18n.json | 6 ++++ .../actions/toggleComment.i18n.json | 6 ++++ .../actions/updateImageSize.i18n.json | 6 ++++ .../actions/updateTag.i18n.json | 6 ++++ .../actions/wrapWithAbbreviation.i18n.json | 6 ++++ .../emmet.contribution.i18n.json | 6 ++++ .../themes.contribution.i18n.json | 1 - .../vs_code_welcome_page.i18n.json | 28 ++++++++--------- .../configurationEditingService.i18n.json | 2 ++ .../out/typescriptServiceClient.i18n.json | 1 - .../typescript/out/utils/logger.i18n.json | 6 ++++ .../extensions/typescript/package.i18n.json | 1 - .../base/common/jsonErrorMessages.i18n.json | 12 +++++++- .../theme/common/colorRegistry.i18n.json | 6 ++-- .../mainThreadExtensionService.i18n.json | 5 +++- .../mainThreadMessageService.i18n.json | 6 +++- .../actions/balance.i18n.json | 6 ++++ .../actions/editPoints.i18n.json | 6 ++++ .../actions/evaluateMath.i18n.json | 6 ++++ .../actions/expandAbbreviation.i18n.json | 6 ++++ .../actions/incrementDecrement.i18n.json | 6 ++++ .../actions/matchingPair.i18n.json | 6 ++++ .../actions/mergeLines.i18n.json | 6 ++++ .../actions/reflectCssValue.i18n.json | 6 ++++ .../actions/removeTag.i18n.json | 6 ++++ .../actions/selectItem.i18n.json | 6 ++++ .../actions/splitJoinTag.i18n.json | 6 ++++ .../actions/toggleComment.i18n.json | 6 ++++ .../actions/updateImageSize.i18n.json | 6 ++++ .../actions/updateTag.i18n.json | 6 ++++ .../actions/wrapWithAbbreviation.i18n.json | 6 ++++ .../emmet.contribution.i18n.json | 6 ++++ .../themes.contribution.i18n.json | 1 - .../vs_code_welcome_page.i18n.json | 28 ++++++++--------- .../configurationEditingService.i18n.json | 2 ++ .../jpn/extensions/git/out/commands.i18n.json | 2 +- .../extensions/git/out/scmProvider.i18n.json | 2 +- .../out/typescriptServiceClient.i18n.json | 1 - .../typescript/out/utils/logger.i18n.json | 6 ++++ .../extensions/typescript/package.i18n.json | 1 - .../base/common/jsonErrorMessages.i18n.json | 12 +++++++- .../src/vs/code/electron-main/menus.i18n.json | 4 ++- .../common/view/editorColorRegistry.i18n.json | 5 +++- .../browser/referencesWidget.i18n.json | 1 + .../theme/common/colorRegistry.i18n.json | 7 +++-- .../mainThreadExtensionService.i18n.json | 5 +++- .../mainThreadMessageService.i18n.json | 6 +++- .../src/vs/workbench/common/theme.i18n.json | 3 ++ .../main.contribution.i18n.json | 1 + .../debug/browser/debugActions.i18n.json | 1 + .../electron-browser/debugCommands.i18n.json | 4 ++- .../actions/balance.i18n.json | 6 ++++ .../actions/editPoints.i18n.json | 6 ++++ .../actions/evaluateMath.i18n.json | 6 ++++ .../actions/expandAbbreviation.i18n.json | 6 ++++ .../actions/incrementDecrement.i18n.json | 6 ++++ .../actions/matchingPair.i18n.json | 6 ++++ .../actions/mergeLines.i18n.json | 6 ++++ .../actions/reflectCssValue.i18n.json | 6 ++++ .../actions/removeTag.i18n.json | 6 ++++ .../actions/selectItem.i18n.json | 6 ++++ .../actions/splitJoinTag.i18n.json | 6 ++++ .../actions/toggleComment.i18n.json | 6 ++++ .../actions/updateImageSize.i18n.json | 6 ++++ .../actions/updateTag.i18n.json | 6 ++++ .../actions/wrapWithAbbreviation.i18n.json | 6 ++++ .../emmet.contribution.i18n.json | 6 ++++ .../browser/commandsHandler.i18n.json | 1 + .../browser/searchResultsView.i18n.json | 4 ++- .../tasks/browser/restartQuickOpen.i18n.json | 2 +- .../themes.contribution.i18n.json | 3 +- .../vs_code_welcome_page.i18n.json | 28 ++++++++--------- .../configurationEditingService.i18n.json | 9 +++++- .../out/typescriptServiceClient.i18n.json | 1 - .../typescript/out/utils/logger.i18n.json | 6 ++++ .../extensions/typescript/package.i18n.json | 1 - .../base/common/jsonErrorMessages.i18n.json | 12 +++++++- .../theme/common/colorRegistry.i18n.json | 6 ++-- .../mainThreadExtensionService.i18n.json | 5 +++- .../mainThreadMessageService.i18n.json | 6 +++- .../actions/balance.i18n.json | 6 ++++ .../actions/editPoints.i18n.json | 6 ++++ .../actions/evaluateMath.i18n.json | 6 ++++ .../actions/expandAbbreviation.i18n.json | 6 ++++ .../actions/incrementDecrement.i18n.json | 6 ++++ .../actions/matchingPair.i18n.json | 6 ++++ .../actions/mergeLines.i18n.json | 6 ++++ .../actions/reflectCssValue.i18n.json | 6 ++++ .../actions/removeTag.i18n.json | 6 ++++ .../actions/selectItem.i18n.json | 6 ++++ .../actions/splitJoinTag.i18n.json | 6 ++++ .../actions/toggleComment.i18n.json | 6 ++++ .../actions/updateImageSize.i18n.json | 6 ++++ .../actions/updateTag.i18n.json | 6 ++++ .../actions/wrapWithAbbreviation.i18n.json | 6 ++++ .../emmet.contribution.i18n.json | 6 ++++ .../themes.contribution.i18n.json | 1 - .../vs_code_welcome_page.i18n.json | 28 ++++++++--------- .../configurationEditingService.i18n.json | 2 ++ .../out/typescriptServiceClient.i18n.json | 1 - .../typescript/out/utils/logger.i18n.json | 6 ++++ .../extensions/typescript/package.i18n.json | 1 - .../base/common/jsonErrorMessages.i18n.json | 12 +++++++- .../theme/common/colorRegistry.i18n.json | 6 ++-- .../mainThreadExtensionService.i18n.json | 5 +++- .../mainThreadMessageService.i18n.json | 6 +++- .../actions/balance.i18n.json | 6 ++++ .../actions/editPoints.i18n.json | 6 ++++ .../actions/evaluateMath.i18n.json | 6 ++++ .../actions/expandAbbreviation.i18n.json | 6 ++++ .../actions/incrementDecrement.i18n.json | 6 ++++ .../actions/matchingPair.i18n.json | 6 ++++ .../actions/mergeLines.i18n.json | 6 ++++ .../actions/reflectCssValue.i18n.json | 6 ++++ .../actions/removeTag.i18n.json | 6 ++++ .../actions/selectItem.i18n.json | 6 ++++ .../actions/splitJoinTag.i18n.json | 6 ++++ .../actions/toggleComment.i18n.json | 6 ++++ .../actions/updateImageSize.i18n.json | 6 ++++ .../actions/updateTag.i18n.json | 6 ++++ .../actions/wrapWithAbbreviation.i18n.json | 6 ++++ .../emmet.contribution.i18n.json | 6 ++++ .../themes.contribution.i18n.json | 1 - .../vs_code_welcome_page.i18n.json | 28 ++++++++--------- .../configurationEditingService.i18n.json | 2 ++ 281 files changed, 1426 insertions(+), 259 deletions(-) create mode 100644 i18n/chs/extensions/typescript/out/utils/logger.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json create mode 100644 i18n/cht/extensions/typescript/out/utils/logger.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json create mode 100644 i18n/deu/extensions/typescript/out/utils/logger.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json create mode 100644 i18n/esn/extensions/typescript/out/utils/logger.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json create mode 100644 i18n/fra/extensions/typescript/out/utils/logger.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json create mode 100644 i18n/ita/extensions/typescript/out/utils/logger.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json create mode 100644 i18n/jpn/extensions/typescript/out/utils/logger.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json create mode 100644 i18n/kor/extensions/typescript/out/utils/logger.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json create mode 100644 i18n/rus/extensions/typescript/out/utils/logger.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json diff --git a/i18n/chs/extensions/git/out/commands.i18n.json b/i18n/chs/extensions/git/out/commands.i18n.json index d6b0baf091977..3a000b987738e 100644 --- a/i18n/chs/extensions/git/out/commands.i18n.json +++ b/i18n/chs/extensions/git/out/commands.i18n.json @@ -18,6 +18,7 @@ "discard": "放弃更改", "confirm discard all": "确定要放弃所有更改吗?此操作不可撤销!", "discardAll": "放弃所有更改", + "no staged changes": "现在没有暂存的更改以供提交\n\n是否要直接自动暂存所有更改并提交?", "yes": "是", "always": "始终", "no changes": "没有要提交的更改。", diff --git a/i18n/chs/extensions/git/package.i18n.json b/i18n/chs/extensions/git/package.i18n.json index 06d049a0aeb80..3ae1cbfe222c9 100644 --- a/i18n/chs/extensions/git/package.i18n.json +++ b/i18n/chs/extensions/git/package.i18n.json @@ -42,5 +42,7 @@ "config.countBadge": "控制 Git 徽章计数器。“all”计算所有更改。“tracked”只计算跟踪的更改。“off”关闭此功能。", "config.checkoutType": "控制运行“签出到...”时列出的分支的类型。“all”显示所有 refs,“local”只显示本地分支,“tags”只显示标签,“remote”只显示远程分支。", "config.ignoreLegacyWarning": "忽略旧版 Git 警告", - "config.ignoreLimitWarning": "忽略“存储库中存在大量更改”的警告" + "config.ignoreLimitWarning": "忽略“存储库中存在大量更改”的警告", + "config.defaultCloneDirectory": "克隆 Git 存储库的默认位置", + "config.enableSmartCommit": "在没有暂存的更改时提交所有更改。" } \ No newline at end of file diff --git a/i18n/chs/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/chs/extensions/typescript/out/typescriptServiceClient.i18n.json index 79910794a2266..06c4e0ea585e7 100644 --- a/i18n/chs/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/chs/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "channelName": "TypeScript", "noServerFound": "路径 {0} 未指向有效的 tsserver 安装。请回退到捆绑的 TypeScript 版本。", "noBundledServerFound": "其他应用程序(例如运行异常的病毒检测工具)已删除 VSCode 的 tsserver。请重新安装 VS Code。", "versionNumber.custom": "自定义", diff --git a/i18n/chs/extensions/typescript/out/utils/logger.i18n.json b/i18n/chs/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/extensions/typescript/package.i18n.json b/i18n/chs/extensions/typescript/package.i18n.json index 8f2d24aa7ea05..5e077ba8d0229 100644 --- a/i18n/chs/extensions/typescript/package.i18n.json +++ b/i18n/chs/extensions/typescript/package.i18n.json @@ -33,7 +33,6 @@ "javascript.validate.enable": "启用/禁用 JavaScript 验证。", "typescript.goToProjectConfig.title": "转到项目配置", "javascript.goToProjectConfig.title": "转到项目配置", - "typescript.referencesCodeLens.enabled": "启用/禁用引用 CodeLens。要求 TypeScript >= 2.0.6。", "typescript.implementationsCodeLens.enabled": "启用/禁用实现 CodeLens。要求 TypeScript >= 2.2.0。", "typescript.openTsServerLog.title": "打开 TS 服务器日志", "typescript.selectTypeScriptVersion.title": "选择 TypeScript 版本", diff --git a/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index 8f88774462653..7b395b9c15a79 100644 --- a/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,7 +6,7 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "图像太大,无法在编辑器中显示。 ", - "resourceOpenExternalButton": "打开图像", + "resourceOpenExternalButton": "打开图片", "resourceOpenExternalText": " 是否使用外部程序?", "nativeBinaryError": "文件将不在编辑器中显示,因为它是二进制文件、非常大或使用不支持的文本编码。", "sizeB": "{0} B", diff --git a/i18n/chs/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/chs/src/vs/base/common/jsonErrorMessages.i18n.json index 8b6ad71cd4e6d..a8dcb4d10201f 100644 --- a/i18n/chs/src/vs/base/common/jsonErrorMessages.i18n.json +++ b/i18n/chs/src/vs/base/common/jsonErrorMessages.i18n.json @@ -3,4 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "error.invalidSymbol": "符号无效", + "error.invalidNumberFormat": "数字格式无效", + "error.propertyNameExpected": "需要属性名", + "error.valueExpected": "需要值", + "error.colonExpected": "需要冒号", + "error.commaExpected": "需要逗号", + "error.closeBraceExpected": "需要右大括号", + "error.closeBracketExpected": "需要右括号", + "error.endOfFileExpected": "预期的文件结尾" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/code/electron-main/menus.i18n.json b/i18n/chs/src/vs/code/electron-main/menus.i18n.json index e5052dcc94fa7..d2d3d4ed79668 100644 --- a/i18n/chs/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/chs/src/vs/code/electron-main/menus.i18n.json @@ -14,6 +14,7 @@ "mHelp": "帮助(&&H)", "miNewWindow": "新建窗口(&&W)", "mAbout": "关于 {0}", + "mServices": "服务", "mHide": "隐藏 {0}", "mHideOthers": "隐藏其他", "mShowAll": "全部显示", @@ -54,9 +55,9 @@ "miShowEmmetCommands": "Emmet(&&M)...", "miToggleLineComment": "切换行注释(&&T)", "miToggleBlockComment": "切换块注释(&&B)", - "miInsertCursorAbove": "在上面添加游标(&&A)", - "miInsertCursorBelow": "在下面添加游标(&&D)", - "miInsertCursorAtEndOfEachLineSelected": "在行尾添加游标(&&U)", + "miInsertCursorAbove": "在上面添加光标(&&A)", + "miInsertCursorBelow": "在下面添加光标(&&D)", + "miInsertCursorAtEndOfEachLineSelected": "在行尾添加光标(&&U)", "miAddSelectionToNextFindMatch": "添加下一个匹配项(&&N)", "miAddSelectionToPreviousFindMatch": "添加上一个匹配项(&&R)", "miSelectHighlights": "选择所有匹配项(&&O)", @@ -69,6 +70,7 @@ "miSmartSelectShrink": "缩小选定范围(&&S)", "miViewExplorer": "资源管理器(&&E)", "miViewSearch": "搜索(&&S)", + "miViewSCM": "SCM(&&C)", "miViewDebug": "调试(&&D)", "miViewExtensions": "扩展(&&X)", "miToggleOutput": "输出(&&O)", @@ -113,9 +115,11 @@ "miGotoSymbolInFile": "转到文件中的符号(&&S)...", "miGotoSymbolInWorkspace": "转到工作区中的符号(&&W)...", "miGotoDefinition": "转到定义(&&D)...", + "miGotoTypeDefinition": "转到类型定义(&&T)", + "miGotoImplementation": "转到实现(&&I)", "miGotoLine": "转到行(&&L)...", "miStartDebugging": "启动调试(&&S)", - "miStartWithoutDebugging": "在不调试的情况下启动(&&W)", + "miStartWithoutDebugging": "非调试启动(&&W)", "miStopDebugging": "停止调试(&&S)", "miRestart Debugging": "重启调试(&&R)", "miOpenConfigurations": "打开配置(&&C)", diff --git a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json index 4a8ec7c378a9c..97e41cde2c5c7 100644 --- a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -26,7 +26,6 @@ "wordWrap.on": "将在视区宽度处换行。", "wordWrap.wordWrapColumn": "将在 \"editor.wordWrapColumn\" 处换行。", "wordWrap.bounded": "将在最小视区和 \"editor.wordWrapColumn\" 处换行。", - "wordWrap": "控制换行方式。可以选择:\n - “off” (禁用换行),\n - “on” (视区换行),\n - “wordWrapColumn” (在 \"editor.wordWrapColumn\" 处换行`) 或\n - “bounded” (在视区和 \"editor.wordWrapColumn\" 中的最小值处换行)。", "wordWrapColumn": "在 \"editor.wordWrap\" 为 \"wordWrapColumn\" 或 \"bounded\" 时控制编辑器列的换行。", "wrappingIndent": "控制换行的行的缩进。可以是\\\\\"none\\\\\"、 \\\\\"same\\\\\" 或 \\\\\"indent\\\\\"。", "mouseWheelScrollSensitivity": "要对鼠标滚轮滚动事件的 \"deltaX\" 和 \"deltaY\" 使用的乘数 ", @@ -62,6 +61,7 @@ "renderLineHighlight": "控制编辑器应如何呈现当前行突出显示,可能为“无”、“装订线”、“线”和“全部”。", "codeLens": "控制编辑器是否显示代码滤镜", "folding": "控制编辑器是否启用代码折叠功能", + "hideFoldIcons": "控制是否自动隐藏导航线上的折叠图标。", "matchBrackets": "当选择其中一项时,将突出显示匹配的括号。", "glyphMargin": "控制编辑器是否应呈现垂直字形边距。字形边距最常用于调试。", "useTabStops": "在制表位后插入和删除空格", diff --git a/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json index 77510fb7e497a..dc0edc0650c54 100644 --- a/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -11,6 +11,10 @@ "editorWhitespaces": "编辑器中空白字符颜色。", "editorIndentGuides": "编辑器缩进参考线颜色。", "editorLineNumbers": "编辑器行号颜色。", + "editorRuler": "编辑器标尺的颜色。", "editorCodeLensForeground": "编辑器 CodeLens 的前景色", - "editorBracketMatchBackground": "匹配括号的背景色" + "editorBracketMatchBackground": "匹配括号的背景色", + "editorBracketMatchBorder": "匹配括号外框颜色", + "editorOverviewRulerBorder": "概览标尺边框的颜色。", + "editorGutter": "编辑器导航线的背景色。导航线包括边缘符号和行号。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json index fe64e285097d6..6e56d819256cd 100644 --- a/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -7,14 +7,24 @@ "invalid.color": "颜色格式无效。请使用 #RGB、#RGBA、#RRGGBB 或 #RRGGBBAA", "schema.colors": "工作台中使用的颜色。", "foreground": "整体前景色。此颜色仅在不被组件覆盖时适用。", + "errorForeground": "错误信息的整体前景色。此颜色仅在不被组件覆盖时适用。", + "descriptionForeground": "提供其他信息的说明文本的前景色,例如标签文本。", "focusBorder": "焦点元素的整体边框颜色。此颜色仅在不被其他组件覆盖时适用。", "contrastBorder": "在元素周围额外的一层边框,用来提高对比度从而区别其他元素。", "activeContrastBorder": "在活动元素周围额外的一层边框,用来提高对比度从而区别其他元素。", + "selectionBackground": "工作台所选文本的背景颜色(例如输入字段或文本区域)。注意,本设置不适用于编辑器和终端。", + "textSeparatorForeground": "文字分隔符的颜色。", + "textLinkForeground": "文本中链接的前景色。", + "textLinkActiveForeground": "文本中活动链接的前景色。", + "textBlockQuoteBackground": "文本中块引用的背景颜色。", + "textBlockQuoteBorder": "文本中块引用的边框颜色。", + "textCodeBlockBackground": "文本中代码块的背景颜色。", "widgetShadow": "编辑器内小组件(如查找/替换)的阴影颜色。", "inputBoxBackground": "输入框背景色。", "inputBoxForeground": "输入框前景色。", "inputBoxBorder": "输入框边框。", "inputBoxActiveOptionBorder": "输入字段中已激活选项的边框颜色。", + "inputPlaceholderForeground": "输入框中占位符的前景色。", "inputValidationInfoBackground": "严重性为信息时输入验证的背景颜色。", "inputValidationInfoBorder": "严重性为信息时输入验证的边框颜色。", "inputValidationWarningBackground": "严重性为警告时输入验证的背景颜色。", @@ -26,8 +36,8 @@ "dropdownBorder": "下拉列表边框。", "listFocusBackground": "焦点项在列表或树活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。", "listActiveSelectionBackground": "已选项在列表或树活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。", - "listInactiveSelectionBackground": "已选项在列表或树非活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。", "listActiveSelectionForeground": "已选项在列表或树活动时的前景颜色。活动的列表或树具有键盘焦点,非活动的没有。", + "listInactiveSelectionBackground": "已选项在列表或树非活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。", "listHoverBackground": "使用鼠标移动项目时,列表或树的背景颜色。", "listDropBackground": "使用鼠标移动项目时,列表或树进行拖放的背景颜色。", "highlight": "在列表或树中搜索时,其中匹配内容的高亮颜色。", @@ -40,8 +50,10 @@ "scrollbarSliderBackground": "滑块的背景颜色。", "scrollbarSliderHoverBackground": "滑块在悬停时的背景颜色。", "scrollbarSliderActiveBackground": "滑块在活动的背景颜色。", + "progressBarBackground": "表示长时间操作的进度条的背景色。", "editorBackground": "编辑器背景颜色。", "editorForeground": "编辑器默认前景色。", + "editorWidgetBackground": "编辑器组件(如查找/替换)背景颜色。", "editorSelection": "编辑器所选内容的颜色。", "editorInactiveSelection": "非活动编辑器中所选内容的颜色。", "editorSelectionHighlight": "与所选内容具有相同内容的区域颜色。", @@ -51,6 +63,5 @@ "hoverHighlight": "在显示软键盘的字下方突出显示。", "hoverBackground": "编辑器软键盘背景色。", "hoverBorder": "编辑器软键盘边框颜色。", - "activeLinkForeground": "活动链接颜色。", - "editorWidgetBackground": "编辑器组件(如查找/替换)背景颜色。" + "activeLinkForeground": "活动链接颜色。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json index 8b6ad71cd4e6d..1b83e2539f407 100644 --- a/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json +++ b/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "overwritingExtension": "使用扩展程序 {1} 覆盖扩展程序 {0}。", + "extensionUnderDevelopment": "正在 {0} 处加载开发扩展程序" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json index 8b6ad71cd4e6d..d95075ca825b8 100644 --- a/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json +++ b/i18n/chs/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "close": "关闭", + "cancel": "取消", + "ok": "确定" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json index a2d7a1d364c20..375f183373b09 100644 --- a/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -41,6 +41,7 @@ "window.newWindowDimensions.inherit": "以与上一个活动窗口相同的尺寸打开新窗口。", "window.newWindowDimensions.maximized": "打开最大化的新窗口。", "window.newWindowDimensions.fullscreen": "在全屏模式下打开新窗口。", + "newWindowDimensions": "控制在已有窗口时新打开窗口的尺寸。默认情况下,新窗口将以小尺寸在屏幕的中央打开。当设置为“inherit”时,新窗口将继承上一活动窗口的尺寸,设置为“maximized”时窗口将被最大化,设置为“fullscreen”时则变为全屏。请注意,此设置对第一个打开的窗口无效。第一个窗口总是会恢复关闭前的大小和位置。", "window.menuBarVisibility.default": "菜单仅在全屏模式下隐藏。", "window.menuBarVisibility.visible": "菜单始终可见,即使处于全屏模式下。", "window.menuBarVisibility.toggle": "菜单隐藏,但可以通过 Alt 键显示。", diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 1a78dfcd7283c..2db4a66e7e7d8 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -9,6 +9,7 @@ "neverShowAgain": "不再显示", "close": "关闭", "workspaceRecommended": "此工作区具有扩展建议。", + "ignoreExtensionRecommendations": "你是否要忽略所有推荐的扩展?", "ignoreAll": "是,忽略全部", "no": "否", "cancel": "取消" diff --git a/i18n/chs/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/chs/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index 01fb87d221396..bdf7aa2a3b12b 100644 --- a/i18n/chs/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "显示所有命令", + "showCommands.label": "命令面板...", "entryAriaLabelWithKey": "{0}、{1} ,命令", "entryAriaLabel": "{0},命令", "canNotRun": "无法从此处运行命令“{0}”。", diff --git a/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 6e5483236d897..ea901c652ca61 100644 --- a/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,7 +6,6 @@ { "selectTheme.label": "颜色主题", "installColorThemes": "安装其他颜色主题...", - "themes.selectTheme": "选择颜色主题", "selectIconTheme.label": "文件图标主题", "installIconThemes": "安装其他文件图标主题...", "noIconThemeLabel": "无", diff --git a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index a1751e2466091..d72b1788e1039 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -15,22 +15,10 @@ "welcomePage.help": "帮助", "welcomePage.productDocumentation": "产品文档", "welcomePage.introductoryVideos": "入门视频", + "welcomePage.keybindingsReference": "键盘快捷方式参考", "welcomePage.gitHubRepository": "GitHub 存储库", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "启动时显示欢迎页", - "welcomePage.quickLinks": "快速链接", - "welcomePage.interactivePlayground": "交互式演练场", - "welcomePage.interactivePlaygroundDescription": "在简短演练中试用编辑器的基本功能", - "welcomePage.interfaceOverview": "界面概述", - "welcomePage.interfaceOverviewDescription": "查看突出显示主要 UI 组件的叠加图", - "welcomePage.colorTheme": "颜色主题", - "welcomePage.colorThemeDescription": "使编辑器和代码呈现你喜欢的外观", - "welcomePage.keybindingsReference": "键盘快捷方式参考", - "welcomePage.keybindingsReferenceDescription": "包含常见键盘快捷方式的可打印 PDF 文件", - "welcomePage.showCommands": "查找并运行所有命令", - "welcomePage.showCommandsDescription": "从控制面板快速访问并搜索命令({0})", - "welcomePage.configureSettings": "配置设置", - "welcomePage.configureSettingsDescription": "通过调整设置来解锁 VS Code 的全部功能", "welcomePage.installKeymapDescription": "安装键盘快捷方式", "welcomePage.installKeymap": "安装 {0}、{1}、{2} 和 {3} 的键盘快捷方式", "welcomePage.vim": "Vim", @@ -39,5 +27,17 @@ "welcomePage.sublimeCurrent": "Sublime (当前)", "welcomePage.atom": "Atom", "welcomePage.atomCurrent": "Atom (当前)", - "welcomePage.others": "其他" + "welcomePage.others": "其他", + "welcomePage.colorTheme": "颜色主题", + "welcomePage.colorThemeDescription": "使编辑器和代码呈现你喜欢的外观", + "welcomePage.configureSettings": "配置设置", + "welcomePage.configureSettingsDescription": "通过调整设置来解锁 VS Code 的全部功能", + "welcomePage.showCommands": "查找并运行所有命令", + "welcomePage.showCommandsDescription": "从控制面板快速访问并搜索命令({0})", + "welcomePage.interfaceOverview": "界面概述", + "welcomePage.interfaceOverviewDescription": "查看突出显示主要 UI 组件的叠加图", + "welcomePage.interactivePlayground": "交互式演练场", + "welcomePage.interactivePlaygroundDescription": "在简短演练中试用编辑器的基本功能", + "welcomePage.quickLinks": "快速链接", + "welcomePage.keybindingsReferenceDescription": "包含常见键盘快捷方式的可打印 PDF 文件" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/chs/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 067feb41358fd..a7a1da08c20ce 100644 --- a/i18n/chs/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,6 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "打开设置", + "close": "关闭", "errorUnknownKey": "无法写入配置文件(未知密钥)", - "errorInvalidTarget": "无法写入到配置文件(无效的目标)" + "errorInvalidTarget": "无法写入到配置文件(无效的目标)", + "errorNoWorkspaceOpened": "没有打开任何文件夹,因此无法写入设置。请先打开一个文件夹,然后重试。", + "errorInvalidConfiguration": "无法写入设置。请打开 **用户设置** 更正文件中的错误/警告,然后重试。", + "errorInvalidConfigurationWorkspace": "无法写入设置。请打开 **工作区设置** 更正文件中的错误/警告,然后重试。" } \ No newline at end of file diff --git a/i18n/cht/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/cht/extensions/typescript/out/typescriptServiceClient.i18n.json index cbb3857f33152..0ac728237d9c5 100644 --- a/i18n/cht/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/cht/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "channelName": "TypeScript", "noServerFound": "路徑 {0} 未指向有效的 tsserver 安裝。即將回復為配套的 TypeScript 版本。", "noBundledServerFound": "其他應用程式已刪除了 VSCode 的 tsserver,例如行為不當的病毒偵測工具。請重新安裝 VS Code。", "versionNumber.custom": "自訂", diff --git a/i18n/cht/extensions/typescript/out/utils/logger.i18n.json b/i18n/cht/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/extensions/typescript/package.i18n.json b/i18n/cht/extensions/typescript/package.i18n.json index c0d7714450158..40830ab8a6c8a 100644 --- a/i18n/cht/extensions/typescript/package.i18n.json +++ b/i18n/cht/extensions/typescript/package.i18n.json @@ -33,7 +33,6 @@ "javascript.validate.enable": "啟用/停用 JavaScript 驗證。", "typescript.goToProjectConfig.title": "移至專案組態", "javascript.goToProjectConfig.title": "移至專案組態", - "typescript.referencesCodeLens.enabled": "啟用/停用參考 CodeLens。需要 TypeScript >= 2.0.6。", "typescript.implementationsCodeLens.enabled": "啟用/停用實作 CodeLens。需要 TypeScript >= 2.2.0。", "typescript.selectTypeScriptVersion.title": "選取 TypeScript 版本", "jsDocCompletion.enabled": "啟用/停用自動 JSDoc 註解", diff --git a/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index da6b8c6d2c009..e50c19fed7234 100644 --- a/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -5,9 +5,6 @@ // Do not edit this file. It is machine generated. { "imgMeta": "{0}x{1} {2}", - "largeImageError": "因為影像太大,所以無法在編輯器中顯示。", - "resourceOpenExternalButton": "開啟影像", - "resourceOpenExternalText": " 要使用外部程式嗎?", "nativeBinaryError": "檔案為二進位檔、非常大或使用不支援的文字編碼,因此將不會顯示於編輯器中。", "sizeB": "{0}B", "sizeKB": "{0}KB", diff --git a/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json index 810bd9dd09b77..3597fc58634d1 100644 --- a/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -10,5 +10,8 @@ "caret": "編輯器游標的色彩。", "editorWhitespaces": "編輯器中空白字元的色彩。", "editorIndentGuides": "編輯器縮排輔助線的色彩。", - "editorLineNumbers": "編輯器行號的色彩。" + "editorLineNumbers": "編輯器行號的色彩。", + "editorCodeLensForeground": "編輯器程式碼濾鏡的前景色彩", + "editorBracketMatchBackground": "成對括號背景色彩", + "editorBracketMatchBorder": "成對括號邊框色彩" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index 65c92c7740484..e0be46a962ea3 100644 --- a/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -16,6 +16,8 @@ "peekViewTitleInfoForeground": "預覽檢視標題資訊的色彩。", "peekViewBorder": "預覽檢視之框線與箭頭的色彩。", "peekViewResultsBackground": "預覽檢視中結果清單的背景色彩。", + "peekViewResultsMatchForeground": "預覽檢視結果列表中行節點的前景色彩", + "peekViewResultsFileForeground": "預覽檢視結果列表中檔案節點的前景色彩", "peekViewResultsSelectionBackground": "在預覽檢視之結果清單中選取項目時的背景色彩。", "peekViewResultsSelectionForeground": "在預覽檢視之結果清單中選取項目時的前景色彩。", "peekViewEditorBackground": "預覽檢視編輯器的背景色彩。", diff --git a/i18n/cht/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/cht/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 9414bc08e6a1c..993d9fa74a6a0 100644 --- a/i18n/cht/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/cht/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "requirearray": "功能表項目必須為陣列", + "requirestring": "屬性 '{0}' 為強制項目且必須屬於 `string` 類型", "optstring": "屬性 `{0}` 可以省略或必須屬於 `string` 類型", "vscode.extension.contributes.menuItem.command": "所要執行命令的識別碼。命令必須在 'commands' 區段中宣告", "vscode.extension.contributes.menuItem.alt": "所要執行替代命令的識別碼。命令必須在 'commands' 區段中宣告", diff --git a/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json index 2064ef5c17873..67ff64fbd8057 100644 --- a/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -8,14 +8,21 @@ "schema.colors": "工作台中使用的色彩。", "foreground": "整體的前景色彩。僅當未被任何元件覆疊時,才會使用此色彩。", "errorForeground": "整體錯誤訊息的前景色彩。僅當未被任何元件覆蓋時,才會使用此色彩。", + "descriptionForeground": "提供附加訊息的前景顏色,例如標籤", "focusBorder": "焦點項目的整體邊界色彩。只在沒有任何元件覆寫此色彩時,才會加以使用。", "contrastBorder": "項目周圍的額外邊界,可將項目從其他項目中區隔出來以提高對比。", "activeContrastBorder": "使用中項目周圍的額外邊界,可將項目從其他項目中區隔出來以提高對比。", + "selectionBackground": "作業區域選取的背景顏色(例如輸入或文字區域)。請注意,這不適用於編輯器與終端機中的選取。", + "textSeparatorForeground": "文字分隔符號的顏色。", + "textLinkForeground": "內文連結的前景色彩", + "textLinkActiveForeground": "內文使用連結的前景色彩", + "textCodeBlockBackground": "文字區塊的背景顏色。", "widgetShadow": "小工具的陰影色彩,例如編輯器中的尋找/取代。", "inputBoxBackground": "輸入方塊的背景。", "inputBoxForeground": "輸入方塊的前景。", "inputBoxBorder": "輸入方塊的框線。", "inputBoxActiveOptionBorder": "輸入欄位中可使用之項目的框線色彩。", + "inputPlaceholderForeground": "文字輸入替代字符的前景顏色。", "inputValidationInfoBackground": "資訊嚴重性的輸入驗證背景色彩。", "inputValidationInfoBorder": "資訊嚴重性的輸入驗證邊界色彩。", "inputValidationWarningBackground": "資訊警告的輸入驗證背景色彩。", @@ -27,8 +34,9 @@ "dropdownBorder": "下拉式清單的框線。", "listFocusBackground": "當清單/樹狀為使用中狀態時,焦點項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", "listActiveSelectionBackground": "當清單/樹狀為使用中狀態時,所選項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", - "listInactiveSelectionBackground": "當清單/樹狀為非使用中狀態時,所選項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", "listActiveSelectionForeground": "當清單/樹狀為使用中狀態時,所選項目的清單/樹狀前景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", + "listInactiveSelectionBackground": "當清單/樹狀為非使用中狀態時,所選項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", + "listInactiveSelectionForeground": "當清單/樹狀為使用中狀態時,所選項目的清單/樹狀前景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中則沒有。", "listHoverBackground": "使用滑鼠暫留在項目時的清單/樹狀背景。", "listDropBackground": "使用滑鼠四處移動項目時的清單/樹狀拖放背景。", "highlight": "在清單/樹狀內搜尋時,相符醒目提示的清單/樹狀前景色彩。", @@ -37,12 +45,15 @@ "buttonForeground": "按鈕前景色彩。", "buttonBackground": "按鈕背景色彩。", "buttonHoverBackground": "暫留時的按鈕背景色彩。", + "badgeBackground": "標記的背景顏色。標記為小型的訊息標籤,例如搜尋結果的數量。", + "badgeForeground": "標記的前景顏色。標記為小型的訊息標籤,例如搜尋結果的數量。", "scrollbarShadow": "指出在捲動該檢視的捲軸陰影。", "scrollbarSliderBackground": "滑桿背景色彩。", "scrollbarSliderHoverBackground": "暫留時的滑桿背景色彩。", "scrollbarSliderActiveBackground": "使用中狀態時的滑桿背景色彩。", "editorBackground": "編輯器的背景色彩。", "editorForeground": "編輯器的預設前景色彩。", + "editorWidgetBackground": "編輯器小工具的背景色彩,例如尋找/取代。", "editorSelection": "編輯器選取範圍的色彩。", "editorInactiveSelection": "非使用中之編輯器選取範圍的色彩。", "editorSelectionHighlight": "選取時,內容相同之區域的色彩。", @@ -52,6 +63,5 @@ "hoverHighlight": "在顯示了動態顯示的單字下方醒目提示。", "hoverBackground": "編輯器動態顯示的背景色彩。", "hoverBorder": "編輯器動態顯示的框線色彩。", - "activeLinkForeground": "使用中之連結的色彩。", - "editorWidgetBackground": "編輯器小工具的背景色彩,例如尋找/取代。" + "activeLinkForeground": "使用中之連結的色彩。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json index 8b6ad71cd4e6d..36b2b7b357e35 100644 --- a/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json +++ b/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "overwritingExtension": "正在以 {1} 覆寫延伸模組 {0}。", + "extensionUnderDevelopment": "正在載入位於 {0} 的開發延伸模組" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json index 8b6ad71cd4e6d..4d3f09317ea91 100644 --- a/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json +++ b/i18n/cht/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "close": "關閉", + "cancel": "取消", + "ok": "確定" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 891c5bae600c1..877f81d59fdd3 100644 --- a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,7 +6,6 @@ { "selectTheme.label": "色彩佈景主題", "installColorThemes": "安裝其他的色彩佈景主題...", - "themes.selectTheme": "選取色彩佈景主題", "selectIconTheme.label": "檔案圖示佈景主題", "installIconThemes": "安裝其他的檔案圖示主題...", "noIconThemeLabel": "無", diff --git a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 5e5be1740d830..d9994a0fc55f2 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -15,22 +15,10 @@ "welcomePage.help": "說明", "welcomePage.productDocumentation": "產品文件", "welcomePage.introductoryVideos": "簡介影片", + "welcomePage.keybindingsReference": "鍵盤快速鍵參考", "welcomePage.gitHubRepository": "GitHub 存放庫", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "啟動時顯示歡迎頁面", - "welcomePage.quickLinks": "快速連結", - "welcomePage.interactivePlayground": "Interactive Playground", - "welcomePage.interactivePlaygroundDescription": "嘗試使用逐步解說短片中的一些基本編輯器功能", - "welcomePage.interfaceOverview": "介面概觀", - "welcomePage.interfaceOverviewDescription": "使用視覺覆疊效果強調顯示 UI 的主要元件", - "welcomePage.colorTheme": "彩色佈景主題", - "welcomePage.colorThemeDescription": "將編輯器及您的程式碼設定成您喜愛的外觀", - "welcomePage.keybindingsReference": "鍵盤快速鍵參考", - "welcomePage.keybindingsReferenceDescription": "可列印的 PDF,附有最常用的鍵盤快速鍵", - "welcomePage.showCommands": "尋找及執行所有命令", - "welcomePage.showCommandsDescription": "從控制台快速存取及搜尋命令 ({0})", - "welcomePage.configureSettings": "組態設定", - "welcomePage.configureSettingsDescription": "微調設定就能發揮 VS Code 的所有功能", "welcomePage.installKeymapDescription": "安裝鍵盤快速鍵", "welcomePage.installKeymap": "安裝鍵盤快速鍵 {0}、{1}、{2} 及 {3}", "welcomePage.vim": "活力", @@ -39,5 +27,17 @@ "welcomePage.sublimeCurrent": "壯麗 (目前)", "welcomePage.atom": "Atom", "welcomePage.atomCurrent": "Atom (目前)", - "welcomePage.others": "其他" + "welcomePage.others": "其他", + "welcomePage.colorTheme": "彩色佈景主題", + "welcomePage.colorThemeDescription": "將編輯器及您的程式碼設定成您喜愛的外觀", + "welcomePage.configureSettings": "組態設定", + "welcomePage.configureSettingsDescription": "微調設定就能發揮 VS Code 的所有功能", + "welcomePage.showCommands": "尋找及執行所有命令", + "welcomePage.showCommandsDescription": "從控制台快速存取及搜尋命令 ({0})", + "welcomePage.interfaceOverview": "介面概觀", + "welcomePage.interfaceOverviewDescription": "使用視覺覆疊效果強調顯示 UI 的主要元件", + "welcomePage.interactivePlayground": "Interactive Playground", + "welcomePage.interactivePlaygroundDescription": "嘗試使用逐步解說短片中的一些基本編輯器功能", + "welcomePage.quickLinks": "快速連結", + "welcomePage.keybindingsReferenceDescription": "可列印的 PDF,附有最常用的鍵盤快速鍵" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 95764540d13c9..66d7f136affb3 100644 --- a/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "開啟設定", + "close": "關閉", "errorUnknownKey": "無法寫入組態檔 (不明的按鍵)", "errorInvalidTarget": "無法寫入組態檔 (目標無效)" } \ No newline at end of file diff --git a/i18n/deu/extensions/git/package.i18n.json b/i18n/deu/extensions/git/package.i18n.json index 379f38b08feb3..c11e465ce4559 100644 --- a/i18n/deu/extensions/git/package.i18n.json +++ b/i18n/deu/extensions/git/package.i18n.json @@ -15,7 +15,7 @@ "command.revertSelectedRanges": "Ausgewählte Bereiche zurücksetzen", "command.unstage": "Bereitstellung der Änderungen aufheben", "command.unstageAll": "Bereitstellung aller Änderungen aufheben", - "command.unstageSelectedRanges": "Staffelung gewählter Bereiche aufheben", + "command.unstageSelectedRanges": "Bereitstellung gewählter Bereiche aufheben", "command.clean": "Änderungen verwerfen", "command.cleanAll": "Alle Änderungen verwerfen", "command.commit": "Commit", @@ -25,7 +25,7 @@ "command.commitAllSigned": "Alle committen (abgemeldet)", "command.undoCommit": "Letzten Commit rückgängig machen", "command.checkout": "Auschecken an...", - "command.branch": "Branch wird erstellt...", + "command.branch": "Branch erstellen...", "command.pull": "Pull", "command.pullRebase": "Pull (Rebase)", "command.push": "Push", diff --git a/i18n/deu/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/deu/extensions/typescript/out/typescriptServiceClient.i18n.json index d2333f5052c09..5cda5156ae6a6 100644 --- a/i18n/deu/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/deu/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "channelName": "TypeScript", "noServerFound": "Der Pfad \"{0}\" zeigt nicht auf eine gültige tsserver-Installation. Fallback auf gebündelte TypeScript-Version wird durchgeführt.", "noBundledServerFound": "Der tsserver von VSCode wurde von einer anderen Anwendung wie etwa einem fehlerhaften Tool zur Viruserkennung gelöscht. Führen Sie eine Neuinstallation von VS Code durch.", "versionNumber.custom": "benutzerdefiniert", diff --git a/i18n/deu/extensions/typescript/out/utils/logger.i18n.json b/i18n/deu/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/extensions/typescript/package.i18n.json b/i18n/deu/extensions/typescript/package.i18n.json index d749c1d297fec..d48740fd4d307 100644 --- a/i18n/deu/extensions/typescript/package.i18n.json +++ b/i18n/deu/extensions/typescript/package.i18n.json @@ -33,7 +33,6 @@ "javascript.validate.enable": "JavaScript-Überprüfung aktivieren/deaktivieren.", "typescript.goToProjectConfig.title": "Zur Projektkonfiguration wechseln", "javascript.goToProjectConfig.title": "Zur Projektkonfiguration wechseln", - "typescript.referencesCodeLens.enabled": "Aktiviert oder deaktiviert CodeLens-Verweise. Erfordert TypeScript 2.0.6 oder höher.", "typescript.implementationsCodeLens.enabled": "Aktiviert oder deaktiviert CodeLens-Implementierungen. Erfordert TypeScript 2.2.0 oder höher.", "typescript.selectTypeScriptVersion.title": "TypeScript-Version wählen", "jsDocCompletion.enabled": "Automatische JSDoc-Kommentare aktivieren/deaktivieren", diff --git a/i18n/deu/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/deu/src/vs/base/common/jsonErrorMessages.i18n.json index 8b6ad71cd4e6d..e4b0b451c6c91 100644 --- a/i18n/deu/src/vs/base/common/jsonErrorMessages.i18n.json +++ b/i18n/deu/src/vs/base/common/jsonErrorMessages.i18n.json @@ -3,4 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "error.invalidSymbol": "Ungültiges Symbol", + "error.invalidNumberFormat": "Ungültiges Zahlenformat.", + "error.propertyNameExpected": "Ein Eigenschaftenname wurde erwartet.", + "error.valueExpected": "Ein Wert wurde erwartet.", + "error.colonExpected": "Ein Doppelpunkt wurde erwartet.", + "error.commaExpected": "Ein Komma wurde erwartet.", + "error.closeBraceExpected": "Eine schließende geschweifte Klammer wurde erwartet.", + "error.closeBracketExpected": "Eine schließende Klammer wurde erwartet.", + "error.endOfFileExpected": "Das Dateiende wurde erwartet." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/code/electron-main/menus.i18n.json b/i18n/deu/src/vs/code/electron-main/menus.i18n.json index 9b4d51238e421..2a26af07f79de 100644 --- a/i18n/deu/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/deu/src/vs/code/electron-main/menus.i18n.json @@ -6,7 +6,7 @@ { "mFile": "&&Datei", "mEdit": "&&Bearbeiten", - "mSelection": "&&Aktion auswählen", + "mSelection": "&&Auswahl", "mView": "&&Anzeigen", "mGoto": "Los", "mDebug": "&&Debuggen", @@ -115,7 +115,7 @@ "miGotoDefinition": "Gehe &&zu Definition", "miGotoLine": "Gehe zu &&Zeile...", "miStartDebugging": "&&Debugging starten", - "miStartWithoutDebugging": "&&Ohne Debuggen starten", + "miStartWithoutDebugging": "&&Ohne Debugging starten", "miStopDebugging": "&&Debugging beenden", "miRestart Debugging": "&&Debugging erneut starten", "miOpenConfigurations": "&&Konfigurationen öffnen", diff --git a/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json index f29acd7968206..90e66cbb9c0c2 100644 --- a/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -26,8 +26,8 @@ "dropdownBorder": "Rahmen für Dropdown.", "listFocusBackground": "Hintergrundfarbe der Liste/Struktur für das fokussierte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", "listActiveSelectionBackground": "Hintergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", - "listInactiveSelectionBackground": "Hintergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur inaktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", "listActiveSelectionForeground": "Vordergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", + "listInactiveSelectionBackground": "Hintergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur inaktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", "listHoverBackground": "Hintergrund der Liste/Struktur, wenn mit der Maus auf Elemente gezeigt wird.", "listDropBackground": "Drag & Drop-Hintergrund der Liste/Struktur, wenn Elemente mithilfe der Maus verschoben werden.", "highlight": "Vordergrundfarbe der Liste/Struktur zur Trefferhervorhebung beim Suchen innerhalb der Liste/Struktur.", @@ -42,6 +42,7 @@ "scrollbarSliderActiveBackground": "Hintergrundfarbe des Schiebereglers, wenn dieser aktiv ist.", "editorBackground": "Hintergrundfarbe des Editors.", "editorForeground": "Standardvordergrundfarbe des Editors.", + "editorWidgetBackground": "Hintergrundfarbe von Editor-Widgets wie zum Beispiel Suchen/Ersetzen.", "editorSelection": "Farbe der Editor-Auswahl.", "editorInactiveSelection": "Farbe der Auswahl in einem inaktiven Editor.", "editorSelectionHighlight": "Farbe für Bereiche, deren Inhalt der Auswahl entspricht.", @@ -51,6 +52,5 @@ "hoverHighlight": "Hervorhebung eines Worts, unter dem ein Mauszeiger angezeigt wird.", "hoverBackground": "Background color of the editor hover.", "hoverBorder": "Rahmenfarbe des Editor-Mauszeigers.", - "activeLinkForeground": "Farbe der aktiven Links.", - "editorWidgetBackground": "Hintergrundfarbe von Editor-Widgets wie zum Beispiel Suchen/Ersetzen." + "activeLinkForeground": "Farbe der aktiven Links." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json index 8b6ad71cd4e6d..1d3dbda78ae67 100644 --- a/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json +++ b/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "overwritingExtension": "Die Erweiterung \"{0}\" wird mit \"{1}\" überschrieben.", + "extensionUnderDevelopment": "Die Entwicklungserweiterung unter \"{0}\" wird geladen." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json index 8b6ad71cd4e6d..d76b48e30dbf4 100644 --- a/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json +++ b/i18n/deu/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "close": "Schließen", + "cancel": "Abbrechen", + "ok": "OK" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 66aee761ca9ab..c893534d59cb7 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -15,7 +15,7 @@ "changelog": "ChangeLog", "dependencies": "Abhängigkeiten", "noReadme": "Keine INFODATEI verfügbar.", - "noChangelog": "Es ist kein Änderungsprotokoll verfügbar.", + "noChangelog": "Es ist kein ChangeLog verfügbar.", "noContributions": "Keine Beiträge", "noDependencies": "Keine Abhängigkeiten", "settings": "Einstellungen ({0})", diff --git a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index d87f46daa42ac..3fc196fe64ee6 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,7 +22,7 @@ "disableGloballyAction": "Immer", "disableAction": "Deaktivieren", "checkForUpdates": "Nach Updates suchen", - "updateAll": "Alle Extensions aktualisieren", + "updateAll": "Alle Erweiterungen aktualisieren", "reloadAction": "Neu starten", "postUpdateTooltip": "Zum Aktualisieren erneut laden", "postUpdateMessage": "Dieses Fenster erneut laden, um die aktualisierte Erweiterung \"{0}\" zu aktivieren?", @@ -33,15 +33,15 @@ "postUninstallTooltip": "Zum Deaktivieren erneut laden", "postUninstallMessage": "Dieses Fenster erneut laden, um die deinstallierte Erweiterung \"{0}\" zu deaktivieren?", "reload": "Fenster &&erneut laden", - "toggleExtensionsViewlet": "Extensions anzeigen", - "installExtensions": "Extensions installieren", - "showInstalledExtensions": "Installierte Extensions anzeigen", + "toggleExtensionsViewlet": "Erweiterungen anzeigen", + "installExtensions": "Erweiterungen installieren", + "showInstalledExtensions": "Installierte Erweiterungen anzeigen", "showDisabledExtensions": "Deaktivierte Erweiterungen anzeigen", "clearExtensionsInput": "Extensioneingabe löschen", - "showOutdatedExtensions": "Veraltete Extensions anzeigen", - "showPopularExtensions": "Beliebte Extensions anzeigen", - "showRecommendedExtensions": "Empfohlene Extensions anzeigen", - "showWorkspaceRecommendedExtensions": "Für den Arbeitsbereich empfohlene Extensions anzeigen", + "showOutdatedExtensions": "Veraltete Erweiterungen anzeigen", + "showPopularExtensions": "Beliebte Erweiterungen anzeigen", + "showRecommendedExtensions": "Empfohlene Erweiterungen anzeigen", + "showWorkspaceRecommendedExtensions": "Für den Arbeitsbereich empfohlene Erweiterungen anzeigen", "showRecommendedKeymapExtensions": "Empfohlene Tastenzuordnungen anzeigen", "showRecommendedKeymapExtensionsShort": "Tastenzuordnungen", "configureWorkspaceRecommendedExtensions": "Empfohlene Erweiterungen konfigurieren (Arbeitsbereich)", diff --git a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json index e5f434b98b2f0..6772e6da40560 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "manage": "Drücken Sie die EINGABETASTE, um Ihre Extensions zu verwalten.", + "manage": "Drücken Sie die EINGABETASTE, um Ihre Erweiterungen zu verwalten.", "searchFor": "Drücken Sie die EINGABETASTE, um nach \"{0}\" in Marketplace zu suchen.", - "noExtensionsToInstall": "Geben Sie einen Extensionnamen ein." + "noExtensionsToInstall": "Geben Sie einen Erweiterungsnamen ein." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json index d2cb0550504c7..0e1519f5cd423 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "extensionsInputName": "Extension: {0}" + "extensionsInputName": "Erweiterung: {0}" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index ab33ef36c7a61..b580aff8fbe56 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -8,7 +8,9 @@ "showRecommendations": "Empfehlungen anzeigen", "neverShowAgain": "Nicht mehr anzeigen", "close": "Schließen", - "workspaceRecommended": "Für diesen Arbeitsbereich sind Extensionempfehlungen verfügbar.", + "workspaceRecommended": "Für diesen Arbeitsbereich sind Erweiterungsempfehlungen verfügbar.", + "ignoreExtensionRecommendations": "Möchten Sie alle Erweiterungsempfehlungen ignorieren?", + "ignoreAll": "Ja, alles ignorieren", "no": "Nein", "cancel": "Abbrechen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index b2acacf886cbe..952bcc59803e0 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -4,11 +4,12 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "extensionsCommands": "Extensions verwalten", - "galleryExtensionsCommands": "Katalogextensions installieren", - "extension": "Extension", + "extensionsCommands": "Erweiterungen verwalten", + "galleryExtensionsCommands": "Katalogerweiterungen installieren", + "extension": "Erweiterung", "extensions": "Extensions", "view": "Anzeigen", "extensionsConfigurationTitle": "Extensions", - "extensionsAutoUpdate": "Extensions automatisch aktualisieren" + "extensionsAutoUpdate": "Erweiterungen automatisch aktualisieren", + "extensionsIgnoreRecommendations": "Erweiterungsempfehlungen ignorieren" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json index b323c51e402db..56a4056096228 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openExtensionsFolder": "Extensionordner öffnen", + "openExtensionsFolder": "Erweiterungsordner öffnen", "installVSIX": "Aus VSIX installieren...", "InstallVSIXAction.success": "Die Erweiterung wurde erfolgreich installiert. Führen Sie einen Neustart aus, um sie zu aktivieren.", "InstallVSIXAction.reloadNow": "Jetzt erneut laden" diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json index ae64fcc4f4772..154eb0da6ad85 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -4,12 +4,12 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "searchExtensions": "Nach Extensions in Marketplace suchen", + "searchExtensions": "Nach Erweiterungen im Marketplace suchen", "extensions": "Extensions", "sort by installs": "Sortieren nach: Installationsanzahl", "sort by rating": "Sortieren nach: Bewertung", "sort by name": "Sortieren nach: Name", "no extensions found": "Es wurden keine Erweiterungen gefunden.", "suggestProxyError": "Marketplace hat \"ECONNREFUSED\" zurückgegeben. Überprüfen Sie die Einstellung \"http.proxy\".", - "outdatedExtensions": "{0} veraltete Extensions" + "outdatedExtensions": "{0} veraltete Erweiterungen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 82b8c37894002..cc616e88ee27e 100644 --- a/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,7 +6,6 @@ { "selectTheme.label": "Farbdesign", "installColorThemes": "Zusätzliche Farbschemas installieren...", - "themes.selectTheme": "Farbdesign auswählen", "selectIconTheme.label": "Dateisymboldesign", "installIconThemes": "Zusätzliche Dateisymbolschemas installieren...", "noIconThemeLabel": "Keine", diff --git a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 96b687256c67e..0a1018ac4fa80 100644 --- a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "welcomePage.vscode": "Visual Studio-Code", + "welcomePage.vscode": "Visual Studio Code", "welcomePage.editingEvolved": "Fortschrittliche Bearbeitung", "welcomePage.start": "Starten", "welcomePage.newFile": "Neue Datei", @@ -15,22 +15,10 @@ "welcomePage.help": "Hilfe", "welcomePage.productDocumentation": "Produktdokumentation", "welcomePage.introductoryVideos": "Einführungsvideos", + "welcomePage.keybindingsReference": "Referenz für Tastenkombinationen", "welcomePage.gitHubRepository": "GitHub-Repository", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Willkommensseite beim Start anzeigen", - "welcomePage.quickLinks": "Direktlinks", - "welcomePage.interactivePlayground": "Interaktiver Playground", - "welcomePage.interactivePlaygroundDescription": "Testen Sie die wichtigsten Editorfunktionen in einer kurzen exemplarischen Vorgehensweise.", - "welcomePage.interfaceOverview": "Überblick über die Schnittstelle", - "welcomePage.interfaceOverviewDescription": "Erhalten Sie eine visuelle Überlagerung, die die wichtigsten Komponenten der Benutzeroberfläche hervorhebt.", - "welcomePage.colorTheme": "Farbdesign", - "welcomePage.colorThemeDescription": "Passen Sie das Aussehen des Editors und Ihres Codes an Ihre Wünsche an.", - "welcomePage.keybindingsReference": "Referenz für Tastenkombinationen", - "welcomePage.keybindingsReferenceDescription": "Eine druckbare PDF mit den wichtigsten Tastenkombinationen", - "welcomePage.showCommands": "Alle Befehle suchen und ausführen", - "welcomePage.showCommandsDescription": "Über die Einstellungen ({0}) können Sie Befehle schnell suchen und darauf zugreifen.", - "welcomePage.configureSettings": "Einstellungen konfigurieren", - "welcomePage.configureSettingsDescription": "Optimieren Sie die Einstellungen, um VS Code bestmöglich zu nutzen.", "welcomePage.installKeymapDescription": "Tastenkombinationen installieren", "welcomePage.installKeymap": "Installieren Sie die Tastenkombinationen von {0} {1}, {2} und {3}.", "welcomePage.vim": "Vim", @@ -39,5 +27,17 @@ "welcomePage.sublimeCurrent": "Sublime (aktuell)", "welcomePage.atom": "Atom", "welcomePage.atomCurrent": "Atom (aktuell)", - "welcomePage.others": "Andere" + "welcomePage.others": "Andere", + "welcomePage.colorTheme": "Farbdesign", + "welcomePage.colorThemeDescription": "Passen Sie das Aussehen des Editors und Ihres Codes an Ihre Wünsche an.", + "welcomePage.configureSettings": "Einstellungen konfigurieren", + "welcomePage.configureSettingsDescription": "Optimieren Sie die Einstellungen, um VS Code bestmöglich zu nutzen.", + "welcomePage.showCommands": "Alle Befehle suchen und ausführen", + "welcomePage.showCommandsDescription": "Über die Einstellungen ({0}) können Sie Befehle schnell suchen und darauf zugreifen.", + "welcomePage.interfaceOverview": "Überblick über die Schnittstelle", + "welcomePage.interfaceOverviewDescription": "Erhalten Sie eine visuelle Überlagerung, die die wichtigsten Komponenten der Benutzeroberfläche hervorhebt.", + "welcomePage.interactivePlayground": "Interaktiver Playground", + "welcomePage.interactivePlaygroundDescription": "Testen Sie die wichtigsten Editorfunktionen in einer kurzen exemplarischen Vorgehensweise.", + "welcomePage.quickLinks": "Direktlinks", + "welcomePage.keybindingsReferenceDescription": "Eine druckbare PDF mit den wichtigsten Tastenkombinationen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/deu/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index c0942a6e2156d..0c8e653b4e5f4 100644 --- a/i18n/deu/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "Einstellungen öffnen", + "close": "Schließen", "errorUnknownKey": "Die Konfigurationsdatei kann nicht geschrieben werden (unbekannter Schlüssel).", "errorInvalidTarget": "In die Konfigurationsdatei kann nicht geschrieben werden (ungültiges Ziel)." } \ No newline at end of file diff --git a/i18n/esn/extensions/git/out/commands.i18n.json b/i18n/esn/extensions/git/out/commands.i18n.json index db106e2f05c6c..1897af0ac2629 100644 --- a/i18n/esn/extensions/git/out/commands.i18n.json +++ b/i18n/esn/extensions/git/out/commands.i18n.json @@ -18,6 +18,7 @@ "discard": "Descartar cambios", "confirm discard all": "¿Está seguro de que quiere descartar TODOS los cambios? Esta acción es irreversible.", "discardAll": "Descartar cambios", + "no staged changes": "No hay elementos almacenados provisionalmente.\n\n¿Desea almacenar de forma provisional todos sus cambios y confirmarlos directamente?", "yes": "Sí", "always": "Siempre", "no changes": "No hay cambios para confirmar.", diff --git a/i18n/esn/extensions/git/package.i18n.json b/i18n/esn/extensions/git/package.i18n.json index ee4b5566a5e76..504bfa025696e 100644 --- a/i18n/esn/extensions/git/package.i18n.json +++ b/i18n/esn/extensions/git/package.i18n.json @@ -42,5 +42,7 @@ "config.countBadge": "Controla el contador de insignia de Git. \"Todo\" cuenta todos los cambios. \"Seguimiento\" solamente cuenta los cambios realizados. \"Desactivado\" lo desconecta.", "config.checkoutType": "Controla el tipo de ramas listadas cuando ejecuta \"Desproteger\". \"Todo\" muetra todas las referencias, \"local\" solamente las ramas locales y \"remoto\" las ramas remotas.", "config.ignoreLegacyWarning": "Ignora las advertencias hereradas de Git", - "config.ignoreLimitWarning": "\nIgnora advertencias cuando se encuentran muchos cambios en un repositorio." + "config.ignoreLimitWarning": "\nIgnora advertencias cuando se encuentran muchos cambios en un repositorio.", + "config.defaultCloneDirectory": "La ubicación predeterminada en la que se clona un repositorio git", + "config.enableSmartCommit": "Confirmar todos los cambios cuando no hay elementos almacenados provisionalmente." } \ No newline at end of file diff --git a/i18n/esn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/esn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json index 8b6ad71cd4e6d..e95800399794f 100644 --- a/i18n/esn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json +++ b/i18n/esn/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "ts-check": "Habilita la verificación semántica en un archivo de JavaScript. Debe estar al principio del archivo.", + "ts-nocheck": "Deshabilita la verificación semántica en un archivo de JavaScript. Debe estar al principio del archivo.", + "ts-ignore": "Suprime los errores @ts-check en la siguiente línea de un archivo. " +} \ No newline at end of file diff --git a/i18n/esn/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/esn/extensions/typescript/out/typescriptServiceClient.i18n.json index 404195c7bb379..dd6d27fed4a8a 100644 --- a/i18n/esn/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/esn/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "channelName": "TypeScript", "noServerFound": "La ruta de acceso {0} no apunta a una instalación válida de tsserver. Se usará la versión de TypeScript del paquete.", "noBundledServerFound": "Otra aplicación (por ejemplo, una herramienta de detección de virus con un comportamiento erróneo) eliminó el tsserver de VSCode. Debe reinstalar VS Code.", "versionNumber.custom": "personalizada", diff --git a/i18n/esn/extensions/typescript/out/utils/logger.i18n.json b/i18n/esn/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/extensions/typescript/package.i18n.json b/i18n/esn/extensions/typescript/package.i18n.json index 70f4c257c8f34..80029cd25d6ed 100644 --- a/i18n/esn/extensions/typescript/package.i18n.json +++ b/i18n/esn/extensions/typescript/package.i18n.json @@ -33,8 +33,8 @@ "javascript.validate.enable": "Habilita o deshabilita la validación de JavaScript.", "typescript.goToProjectConfig.title": "Ir a configuración del proyecto", "javascript.goToProjectConfig.title": "Ir a configuración del proyecto", - "typescript.referencesCodeLens.enabled": "Habilita o deshabilita referencias de CodeLens. Requiere TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Habilita o deshabilita implementaciones de CodeLens. Requiere TypeScript >= 2.2.0.", + "typescript.openTsServerLog.title": "Abrir registro del servidor de TS", "typescript.selectTypeScriptVersion.title": "Seleccionar versión de TypeScript", "jsDocCompletion.enabled": "Habilita o deshabilita comentarios automaticos de JSDoc", "javascript.implicitProjectConfig.checkJs": "Habilita/deshabilita la comprobación semántica de los archivos JavaScript. Los archivos jsconfig.json o tsconfig.json reemplazan esta configuración. Se requiere TypeScript >=2.3.1.", diff --git a/i18n/esn/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/esn/src/vs/base/common/jsonErrorMessages.i18n.json index 8b6ad71cd4e6d..a9b302bfa978a 100644 --- a/i18n/esn/src/vs/base/common/jsonErrorMessages.i18n.json +++ b/i18n/esn/src/vs/base/common/jsonErrorMessages.i18n.json @@ -3,4 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "error.invalidSymbol": "Símbolo no válido", + "error.invalidNumberFormat": "Formato de número no válido", + "error.propertyNameExpected": "Se esperaba el nombre de la propiedad", + "error.valueExpected": "Se esperaba un valor", + "error.colonExpected": "Se esperaban dos puntos", + "error.commaExpected": "Se esperaba una coma", + "error.closeBraceExpected": "Se esperaba una llave de cierre", + "error.closeBracketExpected": "Se esperaba un corchete de cierre", + "error.endOfFileExpected": "Se esperaba un fin de archivo" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/code/electron-main/menus.i18n.json b/i18n/esn/src/vs/code/electron-main/menus.i18n.json index 156ec87d0034b..06ce8e40cb3a5 100644 --- a/i18n/esn/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/esn/src/vs/code/electron-main/menus.i18n.json @@ -70,6 +70,7 @@ "miSmartSelectShrink": "&&Reducir selección", "miViewExplorer": "&&Explorador", "miViewSearch": "&&Buscar", + "miViewSCM": "S&&CM", "miViewDebug": "&&Depurar", "miViewExtensions": "E&&xtensiones", "miToggleOutput": "&&Salida", @@ -114,6 +115,8 @@ "miGotoSymbolInFile": "Ir al &&símbolo en el archivo...", "miGotoSymbolInWorkspace": "Ir al símbolo en el área de &&trabajo...", "miGotoDefinition": "Ir a &&definición", + "miGotoTypeDefinition": "Ir a la definición de &&Tipo", + "miGotoImplementation": "Ir a la &&Implementación", "miGotoLine": "Ir a la &&línea...", "miStartDebugging": "I&&niciar depuración", "miStartWithoutDebugging": "Iniciar &&sin depurar", diff --git a/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json index deeb605c6a664..a8373baa8d6bf 100644 --- a/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -62,6 +62,7 @@ "renderLineHighlight": "Controla cómo el editor debe presentar el resaltado de línea. Las posibilidades son \"ninguno\", \"margen\", \"línea\" y \"todo\".", "codeLens": "Controla si el editor muestra lentes de código", "folding": "Controla si el editor tiene habilitado el plegado de código.", + "hideFoldIcons": "Controla cuándo los iconos de plegado del margen son ocultados automáticamente.", "matchBrackets": "Resaltar corchetes coincidentes cuando se seleccione uno de ellos.", "glyphMargin": "Controla si el editor debe representar el margen de glifo vertical. El margen de glifo se usa, principalmente, para depuración.", "useTabStops": "La inserción y eliminación del espacio en blanco sigue a las tabulaciones.", diff --git a/i18n/esn/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/esn/src/vs/editor/common/view/editorColorRegistry.i18n.json index a34fb8f6c8094..fcdba2ee5ad58 100644 --- a/i18n/esn/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/esn/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -11,6 +11,10 @@ "editorWhitespaces": "Color de los caracteres de espacio en blanco del editor.", "editorIndentGuides": "Color de las guías de sangría del editor.", "editorLineNumbers": "Color de números de línea del editor.", + "editorRuler": "Color de las reglas del editor", "editorCodeLensForeground": "Color principal de lentes de código en el editor", - "editorBracketMatchBackground": "Color de fondo tras corchetes coincidentes" + "editorBracketMatchBackground": "Color de fondo tras corchetes coincidentes", + "editorBracketMatchBorder": "Color de bloques con corchetes coincidentes", + "editorOverviewRulerBorder": "Color del borde de la regla de visión general.", + "editorGutter": "Color de fondo del margen del editor. Este espacio contiene los márgenes de glifos y los números de línea." } \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index d5f1fe00dd289..1e3309b1cf63b 100644 --- a/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -16,9 +16,12 @@ "peekViewTitleInfoForeground": "Color de la información del título de la vista de inspección.", "peekViewBorder": "Color de los bordes y la flecha de la vista de inspección.", "peekViewResultsBackground": "Color de fondo de la lista de resultados de vista de inspección.", + "peekViewResultsMatchForeground": "Color de primer plano de los nodos de inspección en la lista de resultados.", + "peekViewResultsFileForeground": "Color de primer plano de los archivos de inspección en la lista de resultados.", "peekViewResultsSelectionBackground": "Color de fondo de la entrada seleccionada en la lista de resultados de vista de inspección.", "peekViewResultsSelectionForeground": "Color de primer plano de la entrada seleccionada en la lista de resultados de vista de inspección.", "peekViewEditorBackground": "Color de fondo del editor de vista de inspección.", + "peekViewEditorGutterBackground": "Color de fondo del margen en el editor de vista de inspección.", "peekViewResultsMatchHighlight": "Buscar coincidencia con el color de resaltado de la lista de resultados de vista de inspección.", "peekViewEditorMatchHighlight": "Buscar coincidencia del color de resultado del editor de vista de inspección." } \ No newline at end of file diff --git a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json index 891fb1b41ee9a..987f41fef7b0c 100644 --- a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -7,14 +7,25 @@ "invalid.color": "Formato de color no válido. Use #TGB, #RBGA, #RRGGBB o #RRGGBBAA", "schema.colors": "Colores usados en el área de trabajo.", "foreground": "Color de primer plano general. Este color solo se usa si un componente no lo invalida.", + "errorForeground": "Color de primer plano general para los mensajes de erroe. Este color solo se usa si un componente no lo invalida.", + "descriptionForeground": "Color de primer plano para el texto descriptivo que proporciona información adicional, por ejemplo para una etiqueta.", "focusBorder": "Color de borde de los elementos con foco. Este color solo se usa si un componente no lo invalida.", "contrastBorder": "Un borde adicional alrededor de los elementos para separarlos unos de otros y así mejorar el contraste.", "activeContrastBorder": "Un borde adicional alrededor de los elementos activos para separarlos unos de otros y así mejorar el contraste.", + "selectionBackground": "El color de fondo del texto seleccionado en la área de trabajo (por ejemplo, campos de entrada o áreas de texto). Esto no se aplica a las selecciones dentro del editor o el terminal.", + "textSeparatorForeground": "Color para los separadores de texto.", + "textLinkForeground": "Color de primer plano para los vínculos en el texto.", + "textLinkActiveForeground": "Color de primer plano para los vínculos activos en el texto.", + "textPreformatForeground": "Color de primer plano para los segmentos de texto con formato previo.", + "textBlockQuoteBackground": "Color de fondo para los bloques en texto.", + "textBlockQuoteBorder": "Color de borde para los bloques en texto.", + "textCodeBlockBackground": "Color de fondo para los bloques de código en el texto.", "widgetShadow": "Color de sombra de los widgets dentro del editor, como buscar/reemplazar", "inputBoxBackground": "Fondo de cuadro de entrada.", "inputBoxForeground": "Primer plano de cuadro de entrada.", "inputBoxBorder": "Borde de cuadro de entrada.", "inputBoxActiveOptionBorder": "Color de borde de opciones activadas en campos de entrada.", + "inputPlaceholderForeground": "Color de primer plano para el marcador de posición de texto", "inputValidationInfoBackground": "Color de fondo de validación de entrada para gravedad de información.", "inputValidationInfoBorder": "Color de borde de validación de entrada para gravedad de información.", "inputValidationWarningBackground": "Color de fondo de validación de entrada para advertencia de información.", @@ -26,8 +37,9 @@ "dropdownBorder": "Borde de lista desplegable.", "listFocusBackground": "Color de fondo de la lista o el árbol del elemento con el foco cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", "listActiveSelectionBackground": "Color de fondo de la lista o el árbol del elemento seleccionado cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", - "listInactiveSelectionBackground": "Color de fondo de la lista o el árbol del elemento seleccionado cuando la lista o el árbol están inactivos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", "listActiveSelectionForeground": "Color de primer plano de la lista o el árbol del elemento con el foco cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", + "listInactiveSelectionBackground": "Color de fondo de la lista o el árbol del elemento seleccionado cuando la lista o el árbol están inactivos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", + "listInactiveSelectionForeground": "Color de primer plano de la lista o el árbol del elemento con el foco cuando la lista o el árbol esta inactiva. Una lista o un árbol tiene el foco del teclado cuando está activo, cuando esta inactiva no.", "listHoverBackground": "Fondo de la lista o el árbol al mantener el mouse sobre los elementos.", "listDropBackground": "Fondo de arrastrar y colocar la lista o el árbol al mover los elementos con el mouse.", "highlight": "Color de primer plano de la lista o el árbol de las coincidencias resaltadas al buscar dentro de la lista o el ábol.", @@ -36,12 +48,16 @@ "buttonForeground": "Color de primer plano del botón.", "buttonBackground": "Color de fondo del botón.", "buttonHoverBackground": "Color de fondo del botón al mantener el puntero.", + "badgeBackground": "Color de fondo de la insignia. Las insignias son pequeñas etiquetas de información, por ejemplo los resultados de un número de resultados.", + "badgeForeground": "Color de fondo de la insignia. Las insignias son pequeñas etiquetas de información, por ejemplo los resultados de un número de resultados.", "scrollbarShadow": "Sombra de la barra de desplazamiento indica que la vista se ha despazado.", "scrollbarSliderBackground": "Color de fondo del control deslizante.", "scrollbarSliderHoverBackground": "Color de fondo del control deslizante al mantener el puntero.", "scrollbarSliderActiveBackground": "Color de fondo del control deslizante cuando está activo.", + "progressBarBackground": "Color de fondo para la barra de progreso que se puede mostrar para las operaciones de larga duración.", "editorBackground": "Color de fondo del editor.", "editorForeground": "Color de primer plano predeterminado del editor.", + "editorWidgetBackground": "Color de fondo del editor de widgets como buscar/reemplazar", "editorSelection": "Color de la selección del editor.", "editorInactiveSelection": "Color de la selección en un editor inactivo.", "editorSelectionHighlight": "Color de las regiones con el mismo contenido que la selección.", @@ -51,6 +67,5 @@ "hoverHighlight": "Resaltado debajo de la palabra para la que se muestra un recuadro al mantener el puntero.", "hoverBackground": "Color de fondo al mantener el puntero en el editor.", "hoverBorder": "Color del borde al mantener el puntero en el editor.", - "activeLinkForeground": "Color de los vínculos activos.", - "editorWidgetBackground": "Color de fondo del editor de widgets como buscar/reemplazar" + "activeLinkForeground": "Color de los vínculos activos." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json index 8b6ad71cd4e6d..c8303dca7e88d 100644 --- a/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json +++ b/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "overwritingExtension": "Sobrescribiendo la extensión {0} con {1}.", + "extensionUnderDevelopment": "Cargando la extensión de desarrollo en {0}" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json index 8b6ad71cd4e6d..68632e8f819ac 100644 --- a/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json +++ b/i18n/esn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "close": "Cerrar", + "cancel": "Cancelar", + "ok": "Aceptar" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/common/theme.i18n.json b/i18n/esn/src/vs/workbench/common/theme.i18n.json index d75793eedac7e..97f9736e66572 100644 --- a/i18n/esn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/esn/src/vs/workbench/common/theme.i18n.json @@ -10,8 +10,10 @@ "tabActiveEditorGroupActiveForeground": "Color de primer plano de la pestaña activa en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "tabInactiveEditorGroupActiveForeground": "Color de primer plano de la pestaña inactiva en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "editorGroupBackground": "Color de fondo de un grupo de editores. Los grupos de editores son los contenedores de los editores. El color de fondo se ve cuando se mueven arrastrando los grupos de editores.", + "tabsContainerBackground": "Color de fondo del encabezado del título del grupo de editores cuando las fichas están habilitadas. Los grupos de editores son contenedores de editores.", "editorGroupHeaderBackground": "Color de fondo del encabezado del título del grupo de editores cuando las fichas están deshabilitadas. Los grupos de editores son contenedores de editores.", "editorGroupBorder": "Color para separar varios grupos de editores entre sí. Los grupos de editores son los contenedores de los editores.", + "editorDragAndDropBackground": "Color de fondo cuando se arrastran los editores. El color debería tener transparencia para que el contenido del editor pueda brillar a su través.", "panelBackground": "Color de fondo del panel. Los paneles se muestran debajo del área de editores y contienen vistas, como Salida y Terminal integrado.", "panelBorder": "Color del borde superior del panel que lo separa del editor. Los paneles se muestran debajo del área de editores y contienen vistas, como Salida y Terminal integrado.", "panelActiveTitleForeground": "Color del título del panel activo. Los paneles se muestran debajo del área del editor y contienen vistas como Salida y Terminal integrado.", @@ -26,6 +28,7 @@ "statusBarProminentItemHoverBackground": "Color de fondo de los elementos destacados en la barra de estado cuando se mantiene el mouse sobre estos elementos. Estos elementos sobresalen para indicar importancia. La barra de estado está ubicada en la parte inferior de la ventana.", "activityBarBackground": "Color de fondo de la barra de actividad, que se muestra en el lado izquierdo o derecho y que permite cambiar entre diferentes vistas de la barra lateral.", "activityBarForeground": "Color de fondo de la barra de actividad (por ejemplo utilizado por los iconos). La barra de actividad muestra en el lado izquierdo o derecho y permite cambiar entre diferentes vistas de la barra lateral.", + "activityBarDragAndDropBackground": "Arrastre y suelte el color de las sugerencias para los elementos de la barra de actividad. El color debería tener transparencias, de forma que los elementos de la barra continúen siendo visibles a través de él. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre distintas vistas de la barra lateral.", "activityBarBadgeBackground": "Color de fondo de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", "activityBarBadgeForeground": "Color de primer plano de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", "sideBarBackground": "Color de fondo de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", diff --git a/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json index 62df1ce4df923..cbf9d0deef3dc 100644 --- a/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -41,6 +41,7 @@ "window.newWindowDimensions.inherit": "Abrir las nuevas ventanas con la misma dimensión que la última activa.", "window.newWindowDimensions.maximized": "Abrir las nuevas ventanas maximizadas.", "window.newWindowDimensions.fullscreen": "Abrir las nuevas ventanas en modo de pantalla completa.", + "newWindowDimensions": "Controla las dimensiones de la nueva ventana cuando ya existe alguna ventana abierta. Por defecto, una nueva ventana se abrirá en el centro de la pantalla con dimensiones pequeñas. Cuando se establece como 'heredar', la ventana tomará las dimensiones de la última ventana activa. Cuando se establece a 'maximizar', la ventana se abrirá maximizada, y a pantalla completa si fue configurada como 'pantalla completa'. Tenga en cuenta que esta configuración no afecta a la primera ventana abierta. La primera ventana siempre restaurará el tamaño y posición en la que quedó antes de ser cerrada.", "window.menuBarVisibility.default": "El menú solo está oculto en modo de pantalla completa.", "window.menuBarVisibility.visible": "El menú está siempre visible incluso en modo de pantalla completa.", "window.menuBarVisibility.toggle": "El menú está oculto pero se puede mostrar mediante la tecla Alt.", diff --git a/i18n/esn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index 820ecf1008f1f..f03e5fb4d1c84 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "Abrir {0}", "launchJsonNeedsConfigurtion": "Configurar o reparar 'launch.json'", + "noFolderDebugConfig": "Abra una carpeta para trabajar con la configuración avanzada de depuración.", "startDebug": "Iniciar depuración", "startWithoutDebugging": "Iniciar sin depurar", "selectAndStartDebugging": "Seleccionar e iniciar la depuración", diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json index 8b6ad71cd4e6d..516affc120439 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "noFolderDebugConfig": "Abra una carpeta para trabajar con la configuración avanzada de depuración." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/esn/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index 787f634d2872c..08fdf2cfd2e93 100644 --- a/i18n/esn/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "Mostrar todos los comandos", + "showCommands.label": "Paleta de comandos...", "entryAriaLabelWithKey": "{0}, {1}, comandos", "entryAriaLabel": "{0}, comandos", "canNotRun": "El comando '{0}' no puede ejecutarse desde aquí.", diff --git a/i18n/esn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/esn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index af465625f5df2..06b841c9cab76 100644 --- a/i18n/esn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,5 +6,7 @@ { "searchMatches": "{0} coincidencias encontradas", "searchMatch": "{0} coincidencia encontrada", - "fileMatchAriaLabel": "{0} coincidencias en el archivo {1} de la carpeta {2}, resultados de la búsqueda" + "fileMatchAriaLabel": "{0} coincidencias en el archivo {1} de la carpeta {2}, resultados de la búsqueda", + "replacePreviewResultAria": "Reemplazar el termino {0} con {1} en la columna con posición {2} en la línea de texto {3}", + "searchResultAria": "Encontró el término {0} en la columna de posición {1} en la línea con el texto {2}." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 2193bcd8383bf..e39c3a6cfd264 100644 --- a/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,7 +6,6 @@ { "selectTheme.label": "Tema de color", "installColorThemes": "Instalar temas de color adicionales...", - "themes.selectTheme": "Seleccionar tema de color", "selectIconTheme.label": "Tema de icono de archivo", "installIconThemes": "Instalar temas de icono de archivo adicionles...", "noIconThemeLabel": "Ninguno", diff --git a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 560b16de17cd8..eebabe22162c8 100644 --- a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -15,22 +15,10 @@ "welcomePage.help": "Ayuda", "welcomePage.productDocumentation": "Documentación del producto", "welcomePage.introductoryVideos": "Vídeos de introducción", + "welcomePage.keybindingsReference": "Referencia de métodos abreviados de teclado", "welcomePage.gitHubRepository": "Repositorio de GitHub", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Mostrar página principal al inicio", - "welcomePage.quickLinks": "Vínculos rápidos", - "welcomePage.interactivePlayground": "Área de juegos interactiva", - "welcomePage.interactivePlaygroundDescription": "Pruebe las características esenciales del editor en un tutorial corto", - "welcomePage.interfaceOverview": "Introducción a la interfaz", - "welcomePage.interfaceOverviewDescription": "Obtenga una superposición que resalta los componentes principales de la interfaz de usuario", - "welcomePage.colorTheme": "Tema de color", - "welcomePage.colorThemeDescription": "Modifique a su gusto la apariencia del editor y el código", - "welcomePage.keybindingsReference": "Referencia de métodos abreviados de teclado", - "welcomePage.keybindingsReferenceDescription": "Un PDF imprimible con los métodos abreviados de teclado más comunes", - "welcomePage.showCommands": "Buscar y ejecutar todos los comandos", - "welcomePage.showCommandsDescription": "Acceda rápidamente y busque comandos desde el panel de control ({0})", - "welcomePage.configureSettings": "Definir la configuración", - "welcomePage.configureSettingsDescription": "Revele el poder total de VS Code cambiando la configuración", "welcomePage.installKeymapDescription": "Instalar los métodos abreviados de teclado", "welcomePage.installKeymap": "Instale los métodos abreviados de teclado de {0}, {1} {2} y {3}", "welcomePage.vim": "Vim", @@ -39,5 +27,17 @@ "welcomePage.sublimeCurrent": "Sublime (actual)", "welcomePage.atom": "Atom", "welcomePage.atomCurrent": "Atom (actual)", - "welcomePage.others": "otros" + "welcomePage.others": "otros", + "welcomePage.colorTheme": "Tema de color", + "welcomePage.colorThemeDescription": "Modifique a su gusto la apariencia del editor y el código", + "welcomePage.configureSettings": "Definir la configuración", + "welcomePage.configureSettingsDescription": "Revele el poder total de VS Code cambiando la configuración", + "welcomePage.showCommands": "Buscar y ejecutar todos los comandos", + "welcomePage.showCommandsDescription": "Acceda rápidamente y busque comandos desde el panel de control ({0})", + "welcomePage.interfaceOverview": "Introducción a la interfaz", + "welcomePage.interfaceOverviewDescription": "Obtenga una superposición que resalta los componentes principales de la interfaz de usuario", + "welcomePage.interactivePlayground": "Área de juegos interactiva", + "welcomePage.interactivePlaygroundDescription": "Pruebe las características esenciales del editor en un tutorial corto", + "welcomePage.quickLinks": "Vínculos rápidos", + "welcomePage.keybindingsReferenceDescription": "Un PDF imprimible con los métodos abreviados de teclado más comunes" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/esn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 0a6a55d48a259..108c1b8582466 100644 --- a/i18n/esn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/esn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,6 +4,13 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "Abrir configuración", + "close": "Cerrar", "errorUnknownKey": "No se puede escribir en el archivo de configuración (clave desconocida)", - "errorInvalidTarget": "No se puede escribir en el archivo de configuración (destino no válido)." + "errorInvalidTarget": "No se puede escribir en el archivo de configuración (destino no válido).", + "errorNoWorkspaceOpened": "No se pudo guardar la configuración porque no tiene una carpeta abierta. Abra una carpeta primero y vuelva a intentarlo.", + "errorInvalidConfiguration": "No se pudo guardar la configuración. Abra el archivo **Configuración de usuario** para corregir los errores o advertencias del archivo y vuelva a intentarlo.", + "errorInvalidConfigurationWorkspace": "No se pudo guardar la configuración. Abra **Configuración de área de trabajo** para corregir los errores o advertencias del archivo y vuelva a intentarlo.", + "errorConfigurationFileDirty": "No se pudo guardar la configuración porque el archivo se ha modificado. Guarde el archivo **Configuración de usuario** y vuelva a intentarlo.", + "errorConfigurationFileDirtyWorkspace": "No se pudo guardar la configuración porque el archivo se ha modificado. Guarde el archivo **Configuración de área de trabajo** y vuelva a intentarlo." } \ No newline at end of file diff --git a/i18n/fra/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/fra/extensions/typescript/out/typescriptServiceClient.i18n.json index 3707e724af722..85899be0806e1 100644 --- a/i18n/fra/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/fra/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "channelName": "TypeScript", "noServerFound": "Le chemin {0} ne pointe pas vers une installation tsserver valide. Utilisation par défaut de la version TypeScript groupée.", "noBundledServerFound": "Le tsserver de VSCode a été supprimé par une autre application, par exemple un outil de détection de virus mal configuré. Réinstallez VS Code.", "versionNumber.custom": "personnalisé", diff --git a/i18n/fra/extensions/typescript/out/utils/logger.i18n.json b/i18n/fra/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/extensions/typescript/package.i18n.json b/i18n/fra/extensions/typescript/package.i18n.json index 043054ffa7fe4..d60399d9b5bde 100644 --- a/i18n/fra/extensions/typescript/package.i18n.json +++ b/i18n/fra/extensions/typescript/package.i18n.json @@ -33,7 +33,6 @@ "javascript.validate.enable": "Activez/désactivez la validation JavaScript.", "typescript.goToProjectConfig.title": "Accéder à la configuration du projet", "javascript.goToProjectConfig.title": "Accéder à la configuration du projet", - "typescript.referencesCodeLens.enabled": "Activer/désactiver CodeLens dans les références. Nécessite TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Activer/désactiver CodeLens dans les implémentations. Nécessite TypeScript >= 2.2.0.", "typescript.selectTypeScriptVersion.title": "Sélectionner la version de TypeScript", "jsDocCompletion.enabled": "Activer/désactiver les commentaires JSDoc automatiques", diff --git a/i18n/fra/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/fra/src/vs/base/common/jsonErrorMessages.i18n.json index 8b6ad71cd4e6d..5c2fcbf92b847 100644 --- a/i18n/fra/src/vs/base/common/jsonErrorMessages.i18n.json +++ b/i18n/fra/src/vs/base/common/jsonErrorMessages.i18n.json @@ -3,4 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "error.invalidSymbol": "Symbole non valide", + "error.invalidNumberFormat": "Format de nombre non valide", + "error.propertyNameExpected": "Nom de propriété attendu", + "error.valueExpected": "Valeur attendue", + "error.colonExpected": "Signe des deux points attendu", + "error.commaExpected": "Virgule attendue", + "error.closeBraceExpected": "Accolade fermante attendue", + "error.closeBracketExpected": "Crochet fermant attendu", + "error.endOfFileExpected": "Fin de fichier attendue" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json index d4fb6e415de79..c626b2d262bee 100644 --- a/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -26,8 +26,8 @@ "dropdownBorder": "Bordure de la liste déroulante.", "listFocusBackground": "Couleur d'arrière-plan de la liste/l'arborescence pour l'élément ayant le focus quand la liste/l'arborescence est active. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", "listActiveSelectionBackground": "Couleur d'arrière-plan de la liste/l'arborescence de l'élément sélectionné quand la liste/l'arborescence est active. Une liste/arborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", - "listInactiveSelectionBackground": "Couleur d'arrière-plan de la liste/l'arborescence pour l'élément sélectionné quand la liste/l'arborescence est inactive. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", "listActiveSelectionForeground": "Couleur de premier plan de la liste/l'arborescence pour l'élément sélectionné quand la liste/l'arborescence est active. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", + "listInactiveSelectionBackground": "Couleur d'arrière-plan de la liste/l'arborescence pour l'élément sélectionné quand la liste/l'arborescence est inactive. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", "listHoverBackground": "Arrière-plan de la liste/l'arborescence pendant le pointage sur des éléments avec la souris.", "listDropBackground": "Arrière-plan de l'opération de glisser-déplacer dans une liste/arborescence pendant le déplacement d'éléments avec la souris.", "highlight": "Couleur de premier plan dans la liste/l'arborescence pour la surbrillance des correspondances pendant la recherche dans une liste/arborescence.", @@ -42,6 +42,7 @@ "scrollbarSliderActiveBackground": "Couleur d'arrière-plan du curseur actif.", "editorBackground": "Couleur d'arrière-plan de l'éditeur.", "editorForeground": "Couleur de premier plan par défaut de l'éditeur.", + "editorWidgetBackground": "Couleur d'arrière-plan des gadgets de l'éditeur tels que rechercher/remplacer.", "editorSelection": "Couleur de la sélection de l'éditeur.", "editorInactiveSelection": "Couleur de la sélection dans un éditeur inactif.", "editorSelectionHighlight": "Couleur des régions dont le contenu est identique à la sélection.", @@ -51,6 +52,5 @@ "hoverHighlight": "Mettez en surbrillance ci-dessous le mot pour lequel un pointage s'affiche.", "hoverBackground": "Couleur d'arrière-plan du pointage de l'éditeur.", "hoverBorder": "Couleur de bordure du pointage de l'éditeur.", - "activeLinkForeground": "Couleur des liens actifs.", - "editorWidgetBackground": "Couleur d'arrière-plan des gadgets de l'éditeur tels que rechercher/remplacer." + "activeLinkForeground": "Couleur des liens actifs." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json index 8b6ad71cd4e6d..7e050bb0177bc 100644 --- a/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json +++ b/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "overwritingExtension": "Remplacement de l'extension {0} par {1}.", + "extensionUnderDevelopment": "Chargement de l'extension de développement sur {0}" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json index 8b6ad71cd4e6d..560eb4d7f2691 100644 --- a/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json +++ b/i18n/fra/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "close": "Fermer", + "cancel": "Annuler", + "ok": "OK" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index f816cae6ee336..515d4f6f9c586 100644 --- a/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,7 +6,6 @@ { "selectTheme.label": "Thème de couleur", "installColorThemes": "Installer des thèmes de couleurs supplémentaires...", - "themes.selectTheme": "Sélectionner le thème de couleur", "selectIconTheme.label": "Thème d'icône de fichier", "installIconThemes": "Installer des thèmes d'icônes de fichiers supplémentaires...", "noIconThemeLabel": "Aucun", diff --git a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 2c738238b0dc4..f533c1e348e41 100644 --- a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -15,22 +15,10 @@ "welcomePage.help": "Aide", "welcomePage.productDocumentation": "Documentation du produit", "welcomePage.introductoryVideos": "Vidéos d'introduction", + "welcomePage.keybindingsReference": "Référence des raccourcis clavier", "welcomePage.gitHubRepository": "Dépôt GitHub", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Afficher la page d'accueil au démarrage", - "welcomePage.quickLinks": "Liens rapides", - "welcomePage.interactivePlayground": "Terrain de jeu interactif", - "welcomePage.interactivePlaygroundDescription": "Essayez les fonctionnalités essentielles de l'éditeur en suivant une brève procédure pas à pas", - "welcomePage.interfaceOverview": "Vue d'ensemble de l'interface", - "welcomePage.interfaceOverviewDescription": "Obtenez une superposition visuelle mettant en évidence les principaux composants de l'IU", - "welcomePage.colorTheme": "Thème de couleur", - "welcomePage.colorThemeDescription": "Personnalisez l'apparence de l'éditeur et de votre code", - "welcomePage.keybindingsReference": "Référence des raccourcis clavier", - "welcomePage.keybindingsReferenceDescription": "Fichier PDF imprimable avec les raccourcis clavier les plus usuels", - "welcomePage.showCommands": "Rechercher et exécuter toutes les commandes", - "welcomePage.showCommandsDescription": "Utilisez et recherchez rapidement des commandes dans le Panneau de configuration ({0})", - "welcomePage.configureSettings": "Configurer les paramètres", - "welcomePage.configureSettingsDescription": "Déverrouillez toute la puissance de VS Code en adaptant les paramètres", "welcomePage.installKeymapDescription": "Installer les raccourcis clavier", "welcomePage.installKeymap": "Installez les raccourcis clavier de {0}, {1}, {2} et {3}", "welcomePage.vim": "Vim", @@ -39,5 +27,17 @@ "welcomePage.sublimeCurrent": "Sublime (actuel)", "welcomePage.atom": "Atom", "welcomePage.atomCurrent": "Atom (actuel)", - "welcomePage.others": "autres" + "welcomePage.others": "autres", + "welcomePage.colorTheme": "Thème de couleur", + "welcomePage.colorThemeDescription": "Personnalisez l'apparence de l'éditeur et de votre code", + "welcomePage.configureSettings": "Configurer les paramètres", + "welcomePage.configureSettingsDescription": "Déverrouillez toute la puissance de VS Code en adaptant les paramètres", + "welcomePage.showCommands": "Rechercher et exécuter toutes les commandes", + "welcomePage.showCommandsDescription": "Utilisez et recherchez rapidement des commandes dans le Panneau de configuration ({0})", + "welcomePage.interfaceOverview": "Vue d'ensemble de l'interface", + "welcomePage.interfaceOverviewDescription": "Obtenez une superposition visuelle mettant en évidence les principaux composants de l'IU", + "welcomePage.interactivePlayground": "Terrain de jeu interactif", + "welcomePage.interactivePlaygroundDescription": "Essayez les fonctionnalités essentielles de l'éditeur en suivant une brève procédure pas à pas", + "welcomePage.quickLinks": "Liens rapides", + "welcomePage.keybindingsReferenceDescription": "Fichier PDF imprimable avec les raccourcis clavier les plus usuels" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/fra/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index ba4ae258d25f0..8c86edbfa4038 100644 --- a/i18n/fra/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/fra/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "Ouvrir les paramètres", + "close": "Fermer", "errorUnknownKey": "Impossible d'écrire dans le fichier de configuration (clé inconnue)", "errorInvalidTarget": "Impossible d'écrire dans le fichier config (cible non valide)" } \ No newline at end of file diff --git a/i18n/ita/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/ita/extensions/typescript/out/typescriptServiceClient.i18n.json index 97e691e49afb6..4261bf8e881fa 100644 --- a/i18n/ita/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/ita/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "channelName": "TypeScript", "noServerFound": "Il percorso {0} non punta a un'installazione valida di tsserver. Verrà eseguito il fallback alla versione in bundle di TypeScript.", "noBundledServerFound": "Il file tsserver di VSCode è stato eliminato da un'altra applicazione, ad esempio uno strumento di rilevamento virus che non funziona correttamente. Reinstallare VSCode.", "versionNumber.custom": "personalizzato", diff --git a/i18n/ita/extensions/typescript/out/utils/logger.i18n.json b/i18n/ita/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/extensions/typescript/package.i18n.json b/i18n/ita/extensions/typescript/package.i18n.json index 001fdcf548438..c6928c133322f 100644 --- a/i18n/ita/extensions/typescript/package.i18n.json +++ b/i18n/ita/extensions/typescript/package.i18n.json @@ -33,7 +33,6 @@ "javascript.validate.enable": "Abilita/Disabilita la convalida JavaScript.", "typescript.goToProjectConfig.title": "Passa a Configurazione progetto", "javascript.goToProjectConfig.title": "Passa a Configurazione progetto", - "typescript.referencesCodeLens.enabled": "Abilita/Disabilita le finestre CodeLens per i riferimenti. Richiede una versione di TypeScript uguale o successiva alla 2.0.6.", "typescript.implementationsCodeLens.enabled": "Abilita/Disabilita le finestre CodeLens per le implementazioni. Richiede una versione di TypeScript uguale o successiva alla 2.2.0.", "typescript.selectTypeScriptVersion.title": "Seleziona la versione di TypeScript", "jsDocCompletion.enabled": "Abilita/Disabilita commenti automatici JSDoc", diff --git a/i18n/ita/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/ita/src/vs/base/common/jsonErrorMessages.i18n.json index 8b6ad71cd4e6d..2ffc2a9d4640d 100644 --- a/i18n/ita/src/vs/base/common/jsonErrorMessages.i18n.json +++ b/i18n/ita/src/vs/base/common/jsonErrorMessages.i18n.json @@ -3,4 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "error.invalidSymbol": "Simbolo non valido", + "error.invalidNumberFormat": "Formato di numero non valido", + "error.propertyNameExpected": "È previsto un nome di proprietà", + "error.valueExpected": "È previsto un valore", + "error.colonExpected": "Sono previsti i due punti", + "error.commaExpected": "È prevista la virgola", + "error.closeBraceExpected": "È prevista la parentesi graffa di chiusura", + "error.closeBracketExpected": "È prevista la parentesi quadra di chiusura", + "error.endOfFileExpected": "È prevista la fine del file" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json index 8cde4edb29b11..927b93f7b8db4 100644 --- a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -26,8 +26,8 @@ "dropdownBorder": "Bordo dell'elenco a discesa.", "listFocusBackground": "Colore sfondo Elenco/Struttura ad albero per l'elemento evidenziato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", "listActiveSelectionBackground": "Colore sfondo Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", - "listInactiveSelectionBackground": "Colore sfondo Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è inattivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", "listActiveSelectionForeground": "Colore primo piano Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", + "listInactiveSelectionBackground": "Colore sfondo Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è inattivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", "listHoverBackground": "Sfondo Elenco/Struttura ad albero al passaggio del mouse sugli elementi.", "listDropBackground": "Sfondo Elenco/Struttura ad albero durante il trascinamento degli elementi selezionati.", "highlight": "Colore primo piano Elenco/Struttura ad albero delle occorrenze trovate durante la ricerca nell'Elenco/Struttura ad albero.", @@ -42,6 +42,7 @@ "scrollbarSliderActiveBackground": "Colore di sfondo dello Slider quando attivo.", "editorBackground": "Colore di sfondo dell'editor.", "editorForeground": "Colore primo piano predefinito dell'editor.", + "editorWidgetBackground": "Colore di sfondo dei widget dell'editor, ad esempio Trova/Sostituisci.", "editorSelection": "Colore della selezione dell'editor.", "editorInactiveSelection": "Colore della selezione in un editor inattivo.", "editorSelectionHighlight": "Colore delle aree con lo stesso contenuto della selezione.", @@ -51,6 +52,5 @@ "hoverHighlight": "Evidenziazione sotto la parola per cui è visualizzata un'area sensibile al passaggio del mouse.", "hoverBackground": "Colore di sfondo dell'area sensibile al passaggio del mouse dell'editor.", "hoverBorder": "Colore del bordo dell'area sensibile al passaggio del mouse dell'editor.", - "activeLinkForeground": "Colore dei collegamenti attivi.", - "editorWidgetBackground": "Colore di sfondo dei widget dell'editor, ad esempio Trova/Sostituisci." + "activeLinkForeground": "Colore dei collegamenti attivi." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json index 8b6ad71cd4e6d..606de953f3a29 100644 --- a/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json +++ b/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "overwritingExtension": "Sovrascrittura dell'estensione {0} con {1}.", + "extensionUnderDevelopment": "Caricamento dell'estensione di sviluppo in {0}" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json index 8b6ad71cd4e6d..e2fbc59847fb8 100644 --- a/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json +++ b/i18n/ita/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "close": "Chiudi", + "cancel": "Annulla", + "ok": "OK" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index ce44a7ad0a2ad..cf402ad380215 100644 --- a/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,7 +6,6 @@ { "selectTheme.label": "Tema colori", "installColorThemes": "Installa temi colori aggiuntivi...", - "themes.selectTheme": "Seleziona tema colori", "selectIconTheme.label": "Tema icona file", "installIconThemes": "Installa temi dell'icona file aggiuntivi...", "noIconThemeLabel": "Nessuno", diff --git a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 3a98deaa2c026..1ea541dafa182 100644 --- a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -15,22 +15,10 @@ "welcomePage.help": "Guida", "welcomePage.productDocumentation": "Documentazione del prodotto", "welcomePage.introductoryVideos": "Video introduttivi", + "welcomePage.keybindingsReference": "Riferimento per tasti di scelta rapida", "welcomePage.gitHubRepository": "Repository GitHub", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Mostra la pagina iniziale all'avvio", - "welcomePage.quickLinks": "Collegamenti rapidi", - "welcomePage.interactivePlayground": "Playground interattivo", - "welcomePage.interactivePlaygroundDescription": "Breve panoramica delle funzionalità essenziali dell'editor", - "welcomePage.interfaceOverview": "Panoramica dell'interfaccia", - "welcomePage.interfaceOverviewDescription": "Immagine in sovrimpressione che evidenzia i principali componenti dell'interfaccia utente", - "welcomePage.colorTheme": "Tema colori", - "welcomePage.colorThemeDescription": "Tutto quel che serve per configurare editor e codice nel modo desiderato", - "welcomePage.keybindingsReference": "Riferimento per tasti di scelta rapida", - "welcomePage.keybindingsReferenceDescription": "PDF stampabile con i tasti di scelta rapida più comuni", - "welcomePage.showCommands": "Trova ed esegui tutti i comandi", - "welcomePage.showCommandsDescription": "Accesso e ricerca rapida di comandi dal pannello di controllo ({0})", - "welcomePage.configureSettings": "Configura le impostazioni", - "welcomePage.configureSettingsDescription": "Perfeziona le impostazioni per sfruttare appieno tutta la potenza di Visual Studio Code", "welcomePage.installKeymapDescription": "Installa i tasti di scelta rapida", "welcomePage.installKeymap": "Installa i tasti di scelta rapida di {0}, {1}, {2} e {3}", "welcomePage.vim": "Vim", @@ -39,5 +27,17 @@ "welcomePage.sublimeCurrent": "Sublime (corrente)", "welcomePage.atom": "Atom", "welcomePage.atomCurrent": "Atom (corrente)", - "welcomePage.others": "altri" + "welcomePage.others": "altri", + "welcomePage.colorTheme": "Tema colori", + "welcomePage.colorThemeDescription": "Tutto quel che serve per configurare editor e codice nel modo desiderato", + "welcomePage.configureSettings": "Configura le impostazioni", + "welcomePage.configureSettingsDescription": "Perfeziona le impostazioni per sfruttare appieno tutta la potenza di Visual Studio Code", + "welcomePage.showCommands": "Trova ed esegui tutti i comandi", + "welcomePage.showCommandsDescription": "Accesso e ricerca rapida di comandi dal pannello di controllo ({0})", + "welcomePage.interfaceOverview": "Panoramica dell'interfaccia", + "welcomePage.interfaceOverviewDescription": "Immagine in sovrimpressione che evidenzia i principali componenti dell'interfaccia utente", + "welcomePage.interactivePlayground": "Playground interattivo", + "welcomePage.interactivePlaygroundDescription": "Breve panoramica delle funzionalità essenziali dell'editor", + "welcomePage.quickLinks": "Collegamenti rapidi", + "welcomePage.keybindingsReferenceDescription": "PDF stampabile con i tasti di scelta rapida più comuni" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 22b05065173cd..52726bd226cdb 100644 --- a/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "Apri impostazioni", + "close": "Chiudi", "errorUnknownKey": "Non è possibile scrivere nel file di configurazione. La chiave è sconosciuta", "errorInvalidTarget": "Non è possibile scrivere nel file di configurazione (destinazione non valida)" } \ No newline at end of file diff --git a/i18n/jpn/extensions/git/out/commands.i18n.json b/i18n/jpn/extensions/git/out/commands.i18n.json index cacb74d2a0020..8ecbb56396551 100644 --- a/i18n/jpn/extensions/git/out/commands.i18n.json +++ b/i18n/jpn/extensions/git/out/commands.i18n.json @@ -32,7 +32,7 @@ "pick remote": "リモートを選んで、ブランチ '{0}' を次に公開します:", "sync is unpredictable": "このアクションはコミットを '{0}' との間でプッシュしたりプルしたりします。", "ok": "OK", - "never again": "了解しました。今後は表示しない", + "never again": "OK、今後は表示しない", "no remotes to publish": "リポジトリには、発行先として構成されているリモートがありません。", "disabled": "このワークスペースでは、Git が無効になっているか、サポートされていません", "clean repo": "チェックアウトの前に、リポジトリの作業ツリーを消去してください。", diff --git a/i18n/jpn/extensions/git/out/scmProvider.i18n.json b/i18n/jpn/extensions/git/out/scmProvider.i18n.json index 7fded37328a95..fe8b64ab93b86 100644 --- a/i18n/jpn/extensions/git/out/scmProvider.i18n.json +++ b/i18n/jpn/extensions/git/out/scmProvider.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "commit": "Commit" + "commit": "コミット" } \ No newline at end of file diff --git a/i18n/jpn/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/jpn/extensions/typescript/out/typescriptServiceClient.i18n.json index fd5967f381b4f..cc6f0e1ea1a73 100644 --- a/i18n/jpn/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/jpn/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "channelName": "TypeScript", "noServerFound": "パス {0} は、有効な tsserver インストールを指していません。バンドルされている TypeScript バージョンにフォールバックしています。", "noBundledServerFound": "適切に動作しないウイルス検出ツールなどの他のアプリケーションにより、VSCode の tsserver は削除されました。VS Code を再インストールしてください。", "versionNumber.custom": "カスタム", diff --git a/i18n/jpn/extensions/typescript/out/utils/logger.i18n.json b/i18n/jpn/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/typescript/package.i18n.json b/i18n/jpn/extensions/typescript/package.i18n.json index 18396cdce3aff..e30965564d08b 100644 --- a/i18n/jpn/extensions/typescript/package.i18n.json +++ b/i18n/jpn/extensions/typescript/package.i18n.json @@ -33,7 +33,6 @@ "javascript.validate.enable": "JavaScript の検証を有効/無効にします。", "typescript.goToProjectConfig.title": "プロジェクト構成に移動", "javascript.goToProjectConfig.title": "プロジェクト構成に移動", - "typescript.referencesCodeLens.enabled": "CodeLens の参照を有効/無効にします。TypeScript 2.0.6 以上が必要です。", "typescript.implementationsCodeLens.enabled": "CodeLens の実装を有効/無効にします。TypeScript 2.2.0 以上が必要です。", "typescript.openTsServerLog.title": "TS サーバーのログを開く", "typescript.selectTypeScriptVersion.title": "TypeScript のバージョンの選択", diff --git a/i18n/jpn/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/jpn/src/vs/base/common/jsonErrorMessages.i18n.json index 8b6ad71cd4e6d..21cbaadbdbc51 100644 --- a/i18n/jpn/src/vs/base/common/jsonErrorMessages.i18n.json +++ b/i18n/jpn/src/vs/base/common/jsonErrorMessages.i18n.json @@ -3,4 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "error.invalidSymbol": "シンボルが無効です", + "error.invalidNumberFormat": "数値表示形式が無効です", + "error.propertyNameExpected": "プロパティ名が必要です", + "error.valueExpected": "値が必要です", + "error.colonExpected": "コロンが必要です", + "error.commaExpected": "コンマが必要です", + "error.closeBraceExpected": "右中かっこが必要です", + "error.closeBracketExpected": "右角かっこが必要です", + "error.endOfFileExpected": "ファイルの終わりが必要です" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/code/electron-main/menus.i18n.json b/i18n/jpn/src/vs/code/electron-main/menus.i18n.json index 7ded317439b4b..1231ec0a27542 100644 --- a/i18n/jpn/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/jpn/src/vs/code/electron-main/menus.i18n.json @@ -58,7 +58,7 @@ "miInsertCursorAbove": "カーソルを上に挿入(&&A)", "miInsertCursorBelow": "カーソルを下に挿入(&&D)", "miInsertCursorAtEndOfEachLineSelected": "カーソルを行末に挿入(&&U)", - "miAddSelectionToNextFindMatch": "次の出現個所を追加(&&N)", + "miAddSelectionToNextFindMatch": "次の出現箇所を追加(&&N)", "miAddSelectionToPreviousFindMatch": "前の出現箇所を追加(&&R)", "miSelectHighlights": "すべての出現箇所を選択(&&O)", "miCopyLinesUp": "行を上へコピー(&&C)", @@ -115,6 +115,8 @@ "miGotoSymbolInFile": "ファイル内のシンボルへ移動(&&S)...", "miGotoSymbolInWorkspace": "ワークスペース内のシンボルへ移動(&&W)...", "miGotoDefinition": "定義に移動(&&D)", + "miGotoTypeDefinition": "型定義に移動(&&T)", + "miGotoImplementation": "実装に移動(&&I)", "miGotoLine": "指定行へ移動(&&L)...", "miStartDebugging": "デバッグの開始(&&S)", "miStartWithoutDebugging": "デバッグなしで開始(&&W)", diff --git a/i18n/jpn/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/jpn/src/vs/editor/common/view/editorColorRegistry.i18n.json index 10aa21d3488a9..f364e5e0d147a 100644 --- a/i18n/jpn/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/jpn/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -11,7 +11,10 @@ "editorWhitespaces": "エディターのスペース文字の色。", "editorIndentGuides": "エディター インデント ガイドの色。", "editorLineNumbers": "エディターの行番号の色。", + "editorRuler": "エディター ルーラーの色。", "editorCodeLensForeground": "CodeLens エディターの前景色。", "editorBracketMatchBackground": "一致するかっこの背景色", - "editorBracketMatchBorder": "一致するかっこ内のボックスの色" + "editorBracketMatchBorder": "一致するかっこ内のボックスの色", + "editorOverviewRulerBorder": "概要ルーラーの境界色。", + "editorGutter": "エディターの余白の背景色。余白にはグリフ マージンと行番号が含まれます。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index d66571a0e2317..8fedf2e46b023 100644 --- a/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -21,6 +21,7 @@ "peekViewResultsSelectionBackground": "ピーク ビュー結果リストの選択済みエントリの背景色。", "peekViewResultsSelectionForeground": "ピーク ビュー結果リストの選択済みエントリの前景色。", "peekViewEditorBackground": "ピーク ビュー エディターの背景色。", + "peekViewEditorGutterBackground": "ピーク ビュー エディターの余白の背景色。", "peekViewResultsMatchHighlight": "ピーク ビュー結果リストの一致した強調表示色。", "peekViewEditorMatchHighlight": "ピーク ビュー エディターの一致した強調表示色。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json index 40f629313c255..750764aa27a8c 100644 --- a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -37,8 +37,8 @@ "dropdownBorder": "ドロップダウンの境界線。", "listFocusBackground": "ツリーリストがアクティブのとき、フォーカスされた項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", "listActiveSelectionBackground": "ツリーリストがアクティブのとき、選択された項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", - "listInactiveSelectionBackground": "ツリーリストが非アクティブのとき、フォーカスされた項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", "listActiveSelectionForeground": "ツリーリストがアクティブのとき、選択された項目のツリーリスト前景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", + "listInactiveSelectionBackground": "ツリーリストが非アクティブのとき、フォーカスされた項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", "listInactiveSelectionForeground": "ツリーリストが非アクティブのとき、選択された項目のツリーリスト前景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", "listHoverBackground": "マウス操作で項目をホバーするときのツリーリスト背景。", "listDropBackground": "マウス操作で項目を移動するときのツリーリスト ドラッグ アンド ドロップの背景。", @@ -54,8 +54,10 @@ "scrollbarSliderBackground": "スライダーの背景色。", "scrollbarSliderHoverBackground": "ホバー時のスライダー背景色。", "scrollbarSliderActiveBackground": "アクティブ時のスライダー背景色。", + "progressBarBackground": "時間のかかる操作で表示するプログレス バーの背景色。", "editorBackground": "エディターの背景色。", "editorForeground": "エディターの既定の前景色。", + "editorWidgetBackground": "検索/置換窓など、エディター ウィジェットの背景色。", "editorSelection": "エディターの選択範囲の色。", "editorInactiveSelection": "非アクティブなエディターの選択範囲の色。", "editorSelectionHighlight": "選択範囲と同じコンテンツの領域の色。", @@ -65,6 +67,5 @@ "hoverHighlight": "ホバーが表示されているワードの下を強調表示します。", "hoverBackground": "エディター ホバーの背景色。", "hoverBorder": "エディター ホバーの境界線の色。", - "activeLinkForeground": "アクティブなリンクの色。", - "editorWidgetBackground": "検索/置換窓など、エディター ウィジェットの背景色。" + "activeLinkForeground": "アクティブなリンクの色。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json index 8b6ad71cd4e6d..df697c332c2e4 100644 --- a/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json +++ b/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "overwritingExtension": "拡張機能 {0} を {1} で上書きしています。", + "extensionUnderDevelopment": "開発の拡張機能を {0} に読み込んでいます" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json index 8b6ad71cd4e6d..c3df3145deb73 100644 --- a/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json +++ b/i18n/jpn/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "close": "閉じる", + "cancel": "キャンセル", + "ok": "OK" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/common/theme.i18n.json b/i18n/jpn/src/vs/workbench/common/theme.i18n.json index 5b74eef0a2f53..b361c556bdcec 100644 --- a/i18n/jpn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/jpn/src/vs/workbench/common/theme.i18n.json @@ -10,8 +10,10 @@ "tabActiveEditorGroupActiveForeground": "アクティブ グループ内のアクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", "tabInactiveEditorGroupActiveForeground": "アクティブ グループ内の非アクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", "editorGroupBackground": "エディター グループの背景色。エディター グループはエディターのコンテナーです。背景色はエディター グループをドラッグすると表示されます。", + "tabsContainerBackground": "タブが有効な場合の エディター グループ タイトル ヘッダーの背景色。エディター グループはエディターのコンテナーです。", "editorGroupHeaderBackground": "タブが無効な場合の エディター グループ タイトル ヘッダーの背景色。エディター グループはエディターのコンテナーです。", "editorGroupBorder": "複数のエディター グループを互いに分離するための色。エディター グループはエディターのコンテナーです。", + "editorDragAndDropBackground": "エディターの周囲をドラッグしているときの背景色。エディターのコンテンツが最後まで輝くために、色は透過である必要があります。", "panelBackground": "パネルの背景色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelBorder": "エディターとの区切りを示すパネル上部の罫線の色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelActiveTitleForeground": "アクティブ パネルのタイトルの色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", @@ -26,6 +28,7 @@ "statusBarProminentItemHoverBackground": "ホバーしたときのステータス バーの重要な項目の背景色。重要な項目は、重要性を示すために他のステータスバーの項目から際立っています。 ステータス バーはウィンドウの下部に表示されます。", "activityBarBackground": "アクティビティ バーの背景色。アクティビティ バーは左端または右端に表示され、サイド バーのビューを切り替えることができます。", "activityBarForeground": "アクティビティ バーの前景色 (例: アイコンの色)。アクティビティ バーは左端または右端に表示され、サイド バーのビューを切り替えることができます。", + "activityBarDragAndDropBackground": "アクティビティ バーの項目のドラッグ アンド ドロップ フィードバックの色。アクティビティ バーが最後まで輝くために、色は透過である必要があります。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", "activityBarBadgeBackground": "アクティビティ通知バッジの背景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", "activityBarBadgeForeground": "アクティビティ通知バッジの前景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", "sideBarBackground": "サイド バーの背景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", diff --git a/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json index 3ced82ae8cb74..e69cb0fb627aa 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -41,6 +41,7 @@ "window.newWindowDimensions.inherit": "新しいウィンドウを、最後にアクティブだったウィンドウと同じサイズで開きます。", "window.newWindowDimensions.maximized": "新しいウィンドウを最大化した状態で開きます。", "window.newWindowDimensions.fullscreen": "新しいウィンドウを全画面表示モードで開きます。", + "newWindowDimensions": "既に 1 つ以上のウィンドウを開いているとき、新しく開くウィンドウのサイズを制御します。既定では、新しいウィンドウを画面中央に小さいサイズで開きます。'inherit' に設定すると、最後のアクティブ ウィンドウと同じサイズで開きます。'maximized' に設定するとウィンドウは最大サイズで開き、'fullscreen' に設定すると全画面になります。この設定は、最初に開いたウィンドウに適用されないことに注意してください。最初のウィンドウは常に、前回閉じたサイズと位置で復元します。", "window.menuBarVisibility.default": "メニューは全画面表示モードの場合にのみ非表示です。", "window.menuBarVisibility.visible": "全画面表示モードの場合も含めて、常にメニューが表示されます。", "window.menuBarVisibility.toggle": "メニューは非表示ですが、Alt キーを押すと表示できます。", diff --git a/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index e41cc2280f6cc..7e7505788b623 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "{0} を開く", "launchJsonNeedsConfigurtion": "'launch.json' を構成または修正してください", + "noFolderDebugConfig": "高度なデバッグ構成を行うには、最初にフォルダーを開いてください。", "startDebug": "デバッグの開始", "startWithoutDebugging": "デバッグなしで開始", "selectAndStartDebugging": "選択してデバッグを開始", diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json index 8b6ad71cd4e6d..3601388ef3a3b 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "noFolderDebugConfig": "高度なデバッグ構成を行うには、最初にフォルダーを開いてください。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/jpn/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index 6caf000135dbc..d6cc11eda2e9a 100644 --- a/i18n/jpn/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "すべてのコマンドの表示", + "showCommands.label": "コマンド パレット...", "entryAriaLabelWithKey": "{0}、{1}、コマンド", "entryAriaLabel": "{0}、コマンド", "canNotRun": "コマンド '{0}' はここからは実行できません。", diff --git a/i18n/jpn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/jpn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index 241116f3364fa..ae61bd9d4c991 100644 --- a/i18n/jpn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,5 +6,7 @@ { "searchMatches": "一致する項目が {0} 件見つかりました", "searchMatch": "一致する項目が {0} 件見つかりました", - "fileMatchAriaLabel": "フォルダー {2} のファイル {1} 内で {0} 件の一致、検索結果" + "fileMatchAriaLabel": "フォルダー {2} のファイル {1} 内で {0} 件の一致、検索結果", + "replacePreviewResultAria": "テキスト {3} の {2} 列目の {0} を {1} に置換します", + "searchResultAria": "テキスト {2} の {1} 列目に {0} が見つかりました" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index 52ca786c8e4f8..eb8ef6b80697c 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks", + "entryAriaLabel": "{0}、タスク", "tasksAriaLabel": "再開するタスクの名前を入力します", "noTasksMatching": "No tasks matching", "noTasksFound": "再開するタスクはありません" diff --git a/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 9ede3f8b975a3..89ac9d8c928e1 100644 --- a/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -5,8 +5,7 @@ // Do not edit this file. It is machine generated. { "selectTheme.label": "配色テーマ", - "installColorThemes": "その他の色のテーマをインストール...", - "themes.selectTheme": "配色テーマの選択", + "installColorThemes": "その他の配色テーマをインストール...", "selectIconTheme.label": "ファイル アイコンのテーマ", "installIconThemes": "その他のファイル アイコンのテーマをインストール...", "noIconThemeLabel": "なし", diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index d4254f6ae3603..997a9ed0f2cff 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -15,22 +15,10 @@ "welcomePage.help": "ヘルプ", "welcomePage.productDocumentation": "製品ドキュメント", "welcomePage.introductoryVideos": "紹介ビデオ", + "welcomePage.keybindingsReference": "キーボード ショートカットの参照資料", "welcomePage.gitHubRepository": "GitHub リポジトリ", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "起動時にウェルカム ページを表示", - "welcomePage.quickLinks": "クイック リンク", - "welcomePage.interactivePlayground": "対話型プレイグラウンド", - "welcomePage.interactivePlaygroundDescription": "エディターの基本機能を簡潔なチュートリアルで体験します", - "welcomePage.interfaceOverview": "インターフェイスの概要", - "welcomePage.interfaceOverviewDescription": "UI の主要コンポーネントを解説した視覚オーバーレイを表示します", - "welcomePage.colorTheme": "配色テーマ", - "welcomePage.colorThemeDescription": "エディターとコードの外観を自由に設定します", - "welcomePage.keybindingsReference": "キーボード ショートカットの参照資料", - "welcomePage.keybindingsReferenceDescription": "最も一般的なキーボード ショートカットを掲載した印刷可能な PDF です", - "welcomePage.showCommands": "すべてのコマンドの検索と実行", - "welcomePage.showCommandsDescription": "コントロール パネルからコマンドを検索してすばやくアクセスします ({0})", - "welcomePage.configureSettings": "設定を構成する", - "welcomePage.configureSettingsDescription": "VS Code の全機能を活用するために設定を微調整します", "welcomePage.installKeymapDescription": "キーボード ショートカットをインストールします", "welcomePage.installKeymap": "{0}、{1}、{2}、{3} のキーボード ショートカットをインストール", "welcomePage.vim": "Vim", @@ -39,5 +27,17 @@ "welcomePage.sublimeCurrent": "Sublime (最新)", "welcomePage.atom": "Atom", "welcomePage.atomCurrent": "Atom (最新)", - "welcomePage.others": "その他" + "welcomePage.others": "その他", + "welcomePage.colorTheme": "配色テーマ", + "welcomePage.colorThemeDescription": "エディターとコードの外観を自由に設定します", + "welcomePage.configureSettings": "設定を構成する", + "welcomePage.configureSettingsDescription": "VS Code の全機能を活用するために設定を微調整します", + "welcomePage.showCommands": "すべてのコマンドの検索と実行", + "welcomePage.showCommandsDescription": "コントロール パネルからコマンドを検索してすばやくアクセスします ({0})", + "welcomePage.interfaceOverview": "インターフェイスの概要", + "welcomePage.interfaceOverviewDescription": "UI の主要コンポーネントを解説した視覚オーバーレイを表示します", + "welcomePage.interactivePlayground": "対話型プレイグラウンド", + "welcomePage.interactivePlaygroundDescription": "エディターの基本機能を簡潔なチュートリアルで体験します", + "welcomePage.quickLinks": "クイック リンク", + "welcomePage.keybindingsReferenceDescription": "最も一般的なキーボード ショートカットを掲載した印刷可能な PDF です" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 817519ffbe545..0c7056bc9fcc8 100644 --- a/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,6 +4,13 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "設定を開く", + "close": "閉じる", "errorUnknownKey": "構成ファイルに書き込めません (不明なキー)", - "errorInvalidTarget": "構成ファイルに書き込めません (無効なターゲット)" + "errorInvalidTarget": "構成ファイルに書き込めません (無効なターゲット)", + "errorNoWorkspaceOpened": "開いているフォルダーがないため、設定を書き込めません。最初にフォルダーを開いてから、もう一度お試しください。", + "errorInvalidConfiguration": "設定を書き込めません。**User Settings** を開いて、ファイル内のエラー/警告を修正してからもう一度お試しください。", + "errorInvalidConfigurationWorkspace": "設定を書き込めません。**Workspace Settings** を開いて、ファイル内のエラー/警告を修正してからもう一度お試しください。", + "errorConfigurationFileDirty": "ファイルが変更されているため、設定を書き込めません。**User Settings** ファイルを保存してから、もう一度お試しください。", + "errorConfigurationFileDirtyWorkspace": "ファイルが変更されているため、設定を書き込めません。**Workspace Settings** ファイルを保存してから、もう一度お試しください。" } \ No newline at end of file diff --git a/i18n/kor/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/kor/extensions/typescript/out/typescriptServiceClient.i18n.json index 5ce4069a9b5de..50cd48bc2e2fb 100644 --- a/i18n/kor/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/kor/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "channelName": "TypeScript", "noServerFound": "경로 {0}이(가) 올바른 tsserver 설치를 가리키지 않습니다. 포함된 TypeScript 버전을 대신 사용합니다.", "noBundledServerFound": "잘못 동작하는 바이러스 감지 도구와 같은 다른 응용 프로그램에서 VSCode의 tsserver가 삭제되었습니다. VS Code를 다시 설치하세요.", "versionNumber.custom": "사용자 지정", diff --git a/i18n/kor/extensions/typescript/out/utils/logger.i18n.json b/i18n/kor/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/extensions/typescript/package.i18n.json b/i18n/kor/extensions/typescript/package.i18n.json index a2f98f7c04ba1..4e1ce76b2130f 100644 --- a/i18n/kor/extensions/typescript/package.i18n.json +++ b/i18n/kor/extensions/typescript/package.i18n.json @@ -33,7 +33,6 @@ "javascript.validate.enable": "JavaScript 유효성 검사를 사용하거나 사용하지 않습니다.", "typescript.goToProjectConfig.title": "프로젝트 구성으로 이동", "javascript.goToProjectConfig.title": "프로젝트 구성으로 이동", - "typescript.referencesCodeLens.enabled": "참조 CodeLens 사용하거나 사용하지 않도록 설정합니다. TypeScript >= 2.0.6이 필요합니다.", "typescript.implementationsCodeLens.enabled": "구현 CodeLens를 사용하거나 사용하지 않도록 설정합니다. TypeScript >= 2.2.0이 필요합니다.", "typescript.selectTypeScriptVersion.title": "TypeScript 버전 선택", "jsDocCompletion.enabled": "자동 JSDoc 주석 사용/사용 안 함", diff --git a/i18n/kor/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/kor/src/vs/base/common/jsonErrorMessages.i18n.json index 8b6ad71cd4e6d..ac05a5533ca43 100644 --- a/i18n/kor/src/vs/base/common/jsonErrorMessages.i18n.json +++ b/i18n/kor/src/vs/base/common/jsonErrorMessages.i18n.json @@ -3,4 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "error.invalidSymbol": "잘못된 기호", + "error.invalidNumberFormat": "잘못된 숫자 형식", + "error.propertyNameExpected": "속성 이름 필요", + "error.valueExpected": "값 필요", + "error.colonExpected": "콜론이 필요합니다.", + "error.commaExpected": "쉼표가 필요합니다.", + "error.closeBraceExpected": "닫는 괄호 필요", + "error.closeBracketExpected": "닫는 대괄호 필요", + "error.endOfFileExpected": "파일 끝 필요" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json index 2a49f2851c083..d5555899eba18 100644 --- a/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -26,8 +26,8 @@ "dropdownBorder": "드롭다운 테두리입니다.", "listFocusBackground": "목록/트리가 활성 상태인 경우 포커스가 있는 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", "listActiveSelectionBackground": "목록/트리가 활성 상태인 경우 선택한 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", - "listInactiveSelectionBackground": "목록/트리가 비활성 상태인 경우 선택한 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", "listActiveSelectionForeground": "목록/트리가 활성 상태인 경우 선택한 항목의 목록/트리 전경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", + "listInactiveSelectionBackground": "목록/트리가 비활성 상태인 경우 선택한 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", "listHoverBackground": "마우스로 항목을 가리킬 때 목록/트리 배경입니다.", "listDropBackground": "마우스로 항목을 이동할 때 목록/트리 끌어서 놓기 배경입니다.", "highlight": "목록/트리 내에서 검색할 때 일치 항목 강조 표시의 목록/트리 전경색입니다.", @@ -42,6 +42,7 @@ "scrollbarSliderActiveBackground": "활성 상태인 경우 슬라이더 배경색입니다.", "editorBackground": "편집기 배경색입니다.", "editorForeground": "편집기 기본 전경색입니다.", + "editorWidgetBackground": "찾기/바꾸기 같은 편집기 위젯의 배경색입니다.", "editorSelection": "편집기 선택 영역의 색입니다.", "editorInactiveSelection": "비활성 편집기 선택 영역의 색입니다.", "editorSelectionHighlight": "선택 영역과 동일한 콘텐츠가 있는 영역의 색입니다.", @@ -51,6 +52,5 @@ "hoverHighlight": "호버가 표시된 단어 아래를 강조 표시합니다.", "hoverBackground": "편집기 호버의 배경색.", "hoverBorder": "편집기 호버의 테두리 색입니다.", - "activeLinkForeground": "활성 링크의 색입니다.", - "editorWidgetBackground": "찾기/바꾸기 같은 편집기 위젯의 배경색입니다." + "activeLinkForeground": "활성 링크의 색입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json index 8b6ad71cd4e6d..a0a766dacfd23 100644 --- a/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json +++ b/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "overwritingExtension": "확장 {0}을(를) {1}(으)로 덮어쓰는 중입니다.", + "extensionUnderDevelopment": "{0}에서 개발 확장 로드 중" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json index 8b6ad71cd4e6d..68f2beaa1e04f 100644 --- a/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json +++ b/i18n/kor/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "close": "닫기", + "cancel": "취소", + "ok": "확인" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 96dd1b9aebb72..25cf1e962031c 100644 --- a/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,7 +6,6 @@ { "selectTheme.label": "색 테마", "installColorThemes": "추가 색 테마 설치...", - "themes.selectTheme": "색 테마 선택", "selectIconTheme.label": "파일 아이콘 테마", "installIconThemes": "추가 파일 아이콘 테마 설치...", "noIconThemeLabel": "없음", diff --git a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index c7b22dc29a41a..8cb064b9a4982 100644 --- a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -15,22 +15,10 @@ "welcomePage.help": "도움말", "welcomePage.productDocumentation": "제품 설명서", "welcomePage.introductoryVideos": "소개 비디오", + "welcomePage.keybindingsReference": "바로 가기 키 참조", "welcomePage.gitHubRepository": "GitHub 리포지토리", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "시작 시 시작 페이지 표시", - "welcomePage.quickLinks": "빠른 링크", - "welcomePage.interactivePlayground": "대화형 실습", - "welcomePage.interactivePlaygroundDescription": "짧은 연습에서 기본 편집기 기능 사용해 보기", - "welcomePage.interfaceOverview": "인터페이스 개요", - "welcomePage.interfaceOverviewDescription": "UI의 주요 구성 요소를 강조 표시하는 시각적 오버레이 가져오기", - "welcomePage.colorTheme": "색 테마", - "welcomePage.colorThemeDescription": "편집기 및 코드가 좋아하는 방식으로 표시되게 만들기", - "welcomePage.keybindingsReference": "바로 가기 키 참조", - "welcomePage.keybindingsReferenceDescription": "가장 일반적인 바로 가기 키가 포함된 인쇄 가능한 PDF", - "welcomePage.showCommands": "모든 명령 찾기 및 실행", - "welcomePage.showCommandsDescription": "제어판에서 명령을 빠르게 검색 및 액세스({0})", - "welcomePage.configureSettings": "설정 구성", - "welcomePage.configureSettingsDescription": "설정을 조정하여 VS Code 의 전체 기능 잠금 해제", "welcomePage.installKeymapDescription": "바로 가기 키 설치", "welcomePage.installKeymap": "{0}, {1}, {2} 및 {3}의 바로 가기 키 설치", "welcomePage.vim": "Vim", @@ -39,5 +27,17 @@ "welcomePage.sublimeCurrent": "Sublime(현재)", "welcomePage.atom": "Atom", "welcomePage.atomCurrent": "Atom(현재)", - "welcomePage.others": "기타" + "welcomePage.others": "기타", + "welcomePage.colorTheme": "색 테마", + "welcomePage.colorThemeDescription": "편집기 및 코드가 좋아하는 방식으로 표시되게 만들기", + "welcomePage.configureSettings": "설정 구성", + "welcomePage.configureSettingsDescription": "설정을 조정하여 VS Code 의 전체 기능 잠금 해제", + "welcomePage.showCommands": "모든 명령 찾기 및 실행", + "welcomePage.showCommandsDescription": "제어판에서 명령을 빠르게 검색 및 액세스({0})", + "welcomePage.interfaceOverview": "인터페이스 개요", + "welcomePage.interfaceOverviewDescription": "UI의 주요 구성 요소를 강조 표시하는 시각적 오버레이 가져오기", + "welcomePage.interactivePlayground": "대화형 실습", + "welcomePage.interactivePlaygroundDescription": "짧은 연습에서 기본 편집기 기능 사용해 보기", + "welcomePage.quickLinks": "빠른 링크", + "welcomePage.keybindingsReferenceDescription": "가장 일반적인 바로 가기 키가 포함된 인쇄 가능한 PDF" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/kor/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 58630d59484c7..131b473a69bd8 100644 --- a/i18n/kor/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "설정 열기", + "close": "닫기", "errorUnknownKey": "구성 파일에 쓸 수 없습니다(알 수 없는 키).", "errorInvalidTarget": "구성 파일에 쓸 수 없습니다(잘못된 대상)." } \ No newline at end of file diff --git a/i18n/rus/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/rus/extensions/typescript/out/typescriptServiceClient.i18n.json index aefaafd937378..bda2060f08735 100644 --- a/i18n/rus/extensions/typescript/out/typescriptServiceClient.i18n.json +++ b/i18n/rus/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "channelName": "TypeScript", "noServerFound": "Путь {0} не указывает на допустимый файл программы установки tsserver. Выполняется откат до пакетной версии TypeScript.", "noBundledServerFound": "Файл tsserver VSCode был удален другим приложением, например, в результате ошибочного срабатывания средства обнаружения вирусов. Переустановите VSCode.", "versionNumber.custom": "пользовательский", diff --git a/i18n/rus/extensions/typescript/out/utils/logger.i18n.json b/i18n/rus/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/extensions/typescript/package.i18n.json b/i18n/rus/extensions/typescript/package.i18n.json index c7a879594d3cc..eefc82f18b2f7 100644 --- a/i18n/rus/extensions/typescript/package.i18n.json +++ b/i18n/rus/extensions/typescript/package.i18n.json @@ -33,7 +33,6 @@ "javascript.validate.enable": "Включение или отключение проверки JavaScript.", "typescript.goToProjectConfig.title": "Перейти к конфигурации проекта", "javascript.goToProjectConfig.title": "Перейти к конфигурации проекта", - "typescript.referencesCodeLens.enabled": "Включить или отключить CodeLens для ссылок. Требуется TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Включить или отключить CodeLens для реализаций. Требуется TypeScript >= 2.2.0.", "typescript.selectTypeScriptVersion.title": "Выберите версию TypeScript.", "jsDocCompletion.enabled": "Включить или отключить JSDoc коментарии", diff --git a/i18n/rus/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/rus/src/vs/base/common/jsonErrorMessages.i18n.json index 8b6ad71cd4e6d..ec94fb830233e 100644 --- a/i18n/rus/src/vs/base/common/jsonErrorMessages.i18n.json +++ b/i18n/rus/src/vs/base/common/jsonErrorMessages.i18n.json @@ -3,4 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "error.invalidSymbol": "Недопустимый символ", + "error.invalidNumberFormat": "Недопустимый числовой формат", + "error.propertyNameExpected": "Требуется имя свойства", + "error.valueExpected": "Требуется значение", + "error.colonExpected": "Требуется двоеточие", + "error.commaExpected": "Требуется запятая", + "error.closeBraceExpected": "Требуется закрывающая фигурная скобка", + "error.closeBracketExpected": "Требуется закрывающая квадратная скобка", + "error.endOfFileExpected": "Ожидается конец файла" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json index 9b7785d5ac633..9ce2d8358364b 100644 --- a/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -28,8 +28,8 @@ "dropdownBorder": "Граница раскрывающегося списка.", "listFocusBackground": "Фоновый цвет находящегося в фокусе элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", "listActiveSelectionBackground": "Фоновый цвет выбранного элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", - "listInactiveSelectionBackground": "Фоновый цвет выбранного элемента List/Tree, когда элемент List/Tree неактивен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", "listActiveSelectionForeground": "Цвет переднего плана выбранного элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", + "listInactiveSelectionBackground": "Фоновый цвет выбранного элемента List/Tree, когда элемент List/Tree неактивен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", "listHoverBackground": "Фоновый цвет элементов List/Tree при наведении курсора мыши.", "listDropBackground": "Фоновый цвет элементов List/Tree при перемещении с помощью мыши.", "highlight": "Цвет переднего плана для выделения соответствия при поиске по элементу List/Tree.", @@ -44,6 +44,7 @@ "scrollbarSliderActiveBackground": "Цвет фона активного ползунка.", "editorBackground": "Цвет фона редактора.", "editorForeground": "Цвет переднего плана редактора по умолчанию.", + "editorWidgetBackground": "Цвет фона виджетов редактора, таких как найти/заменить.", "editorSelection": "Цвет выделения редактора.", "editorInactiveSelection": "Цвет выделения в неактивном редакторе.", "editorSelectionHighlight": "Цвет регионов с тем же содержимым, что и в выделении.", @@ -53,6 +54,5 @@ "hoverHighlight": "Выделение под словом, для которого показано наведение.", "hoverBackground": "Цвет фона при наведении указателя на редактор.", "hoverBorder": "Цвет границ при наведении указателя на редактор.", - "activeLinkForeground": "Цвет активных ссылок.", - "editorWidgetBackground": "Цвет фона виджетов редактора, таких как найти/заменить." + "activeLinkForeground": "Цвет активных ссылок." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json index 8b6ad71cd4e6d..b44407fa3f2d1 100644 --- a/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json +++ b/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "overwritingExtension": "Идет перезапись расширения {0} на {1}.", + "extensionUnderDevelopment": "Идет загрузка расширения разработки в {0}." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json index 8b6ad71cd4e6d..f2dc9ba9a205f 100644 --- a/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json +++ b/i18n/rus/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "close": "Закрыть", + "cancel": "Отмена", + "ok": "ОК" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 21f6cd4a2cb95..60eb5ce7cf9b4 100644 --- a/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,7 +6,6 @@ { "selectTheme.label": "Цветовая тема", "installColorThemes": "Установить дополнительные цветовые темы...", - "themes.selectTheme": "Выберите цветовую тему", "selectIconTheme.label": "Тема значков файлов", "installIconThemes": "Установить дополнительные темы значков файлов...", "noIconThemeLabel": "Нет", diff --git a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 4457de0a2d6e6..19a58cb17287f 100644 --- a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -15,22 +15,10 @@ "welcomePage.help": "Справка", "welcomePage.productDocumentation": "Документация по продукту", "welcomePage.introductoryVideos": "Вступительные видео", + "welcomePage.keybindingsReference": "Справочник по сочетаниям клавиш", "welcomePage.gitHubRepository": "Репозиторий GitHub", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Отображать страницу приветствия при запуске", - "welcomePage.quickLinks": "Быстрые ссылки", - "welcomePage.interactivePlayground": "Интерактивная площадка", - "welcomePage.interactivePlaygroundDescription": "Опробуйте основные функции редактора в ходе краткого пошагового руководства.", - "welcomePage.interfaceOverview": "Общие сведения об интерфейсе", - "welcomePage.interfaceOverviewDescription": "Используйте визуальное наложение с выделением основных компонентов пользовательского интерфейса.", - "welcomePage.colorTheme": "Цветовая тема", - "welcomePage.colorThemeDescription": "Настройте редактор и код удобным образом.", - "welcomePage.keybindingsReference": "Справочник по сочетаниям клавиш", - "welcomePage.keybindingsReferenceDescription": "Подготовленный к печати PDF-файл с самыми частыми сочетаниями клавиш", - "welcomePage.showCommands": "Найти и выполнить все команды.", - "welcomePage.showCommandsDescription": "Быстрый доступ и поиск команд на панели управления ({0})", - "welcomePage.configureSettings": "Настройка параметров", - "welcomePage.configureSettingsDescription": "Используйте все возможности VS Code, подобрав нужные параметры.", "welcomePage.installKeymapDescription": "Установка сочетаний клавиш", "welcomePage.installKeymap": "Установите сочетания клавиш {0}, {1}, {2} и {3}.", "welcomePage.vim": "Vim", @@ -39,5 +27,17 @@ "welcomePage.sublimeCurrent": "Sublime (текущий)", "welcomePage.atom": "Atom", "welcomePage.atomCurrent": "Atom (текущий)", - "welcomePage.others": "Другие" + "welcomePage.others": "Другие", + "welcomePage.colorTheme": "Цветовая тема", + "welcomePage.colorThemeDescription": "Настройте редактор и код удобным образом.", + "welcomePage.configureSettings": "Настройка параметров", + "welcomePage.configureSettingsDescription": "Используйте все возможности VS Code, подобрав нужные параметры.", + "welcomePage.showCommands": "Найти и выполнить все команды.", + "welcomePage.showCommandsDescription": "Быстрый доступ и поиск команд на панели управления ({0})", + "welcomePage.interfaceOverview": "Общие сведения об интерфейсе", + "welcomePage.interfaceOverviewDescription": "Используйте визуальное наложение с выделением основных компонентов пользовательского интерфейса.", + "welcomePage.interactivePlayground": "Интерактивная площадка", + "welcomePage.interactivePlaygroundDescription": "Опробуйте основные функции редактора в ходе краткого пошагового руководства.", + "welcomePage.quickLinks": "Быстрые ссылки", + "welcomePage.keybindingsReferenceDescription": "Подготовленный к печати PDF-файл с самыми частыми сочетаниями клавиш" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/rus/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 0e4643e39d808..e87cb2bac2879 100644 --- a/i18n/rus/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "open": "Открыть параметры", + "close": "Закрыть", "errorUnknownKey": "Не удается выполнить запись в файл конфигурации (неизвестный ключ)", "errorInvalidTarget": "Не удается выполнить запись в файл конфигурации (недопустимый целевой объект)." } \ No newline at end of file From 26bf10d9a4f9b98bc853cdfdb77f65388525e68b Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 18 May 2017 07:26:55 +0200 Subject: [PATCH 0649/2747] Theme: inconsistency for text field inside extensions sidebar (fixes #26798) --- src/vs/base/browser/ui/progressbar/progressbar.css | 8 -------- .../referenceSearch/browser/referencesWidget.css | 10 ---------- .../referenceSearch/browser/referencesWidget.ts | 10 +++++++--- .../editor/contrib/rename/browser/renameInputField.ts | 4 ++-- .../extensions/electron-browser/extensionsViewlet.ts | 11 +++++------ 5 files changed, 14 insertions(+), 29 deletions(-) diff --git a/src/vs/base/browser/ui/progressbar/progressbar.css b/src/vs/base/browser/ui/progressbar/progressbar.css index 511f186b2244f..cd910840fb86f 100644 --- a/src/vs/base/browser/ui/progressbar/progressbar.css +++ b/src/vs/base/browser/ui/progressbar/progressbar.css @@ -51,14 +51,6 @@ -moz-animation-timing-function: linear; } -.progress-container.infinite.done .progress-bit { - transition: opacity 200ms linear; - -webkit-transition: opacity 200ms linear; - -o-transition: opacity 200ms linear; - -moz-transition: opacity 200ms linear; - -ms-transition: opacity 200ms linear; -} - @keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } } @-ms-keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } } @-webkit-keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } } diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.css b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.css index 54a5b82fa70a8..4ef06b9f902d4 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.css +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.css @@ -61,12 +61,6 @@ line-height: 22px; } -.monaco-editor .reference-zone-widget .ref-tree .reference-file .directory { - opacity: 0.7; - margin-left: 0.5em; - font-size: 0.9em; -} - .monaco-editor .reference-zone-widget .monaco-count-badge { margin-right: 12px; } @@ -96,8 +90,4 @@ .monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file { line-height: 20px; font-weight: bold; -} - -.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file .directory { - font-weight: normal; } \ No newline at end of file diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index cc8ae4a72ec38..cd68e92353065 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -27,7 +27,7 @@ import { LeftRightWidget } from 'vs/base/browser/ui/leftRightWidget/leftRightWid import * as tree from 'vs/base/parts/tree/browser/tree'; import { DefaultController, LegacyRenderer } from 'vs/base/parts/tree/browser/treeDefaults'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { IInstantiationService, optional } from 'vs/platform/instantiation/common/instantiation'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { Range, IRange } from 'vs/editor/common/core/range'; @@ -43,6 +43,7 @@ import { registerThemingParticipant, ITheme, IThemeService } from 'vs/platform/t import { attachListStyler, attachBadgeStyler } from 'vs/platform/theme/common/styler'; import { IModelDecorationsChangedEvent } from 'vs/editor/common/model/textModelEvents'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; +import { IEnvironmentService } from "vs/platform/environment/common/environment"; class DecorationsManager implements IDisposable { @@ -345,15 +346,18 @@ class Controller extends DefaultController { class Renderer extends LegacyRenderer { private _contextService: IWorkspaceContextService; private _themeService: IThemeService; + private _environmentService: IEnvironmentService; constructor( @IWorkspaceContextService contextService: IWorkspaceContextService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @optional(IEnvironmentService) environmentService: IEnvironmentService ) { super(); this._contextService = contextService; this._themeService = themeService; + this._environmentService = environmentService; } public getHeight(tree: tree.ITree, element: any): number { @@ -371,7 +375,7 @@ class Renderer extends LegacyRenderer { /* tslint:disable:no-unused-expression */ new LeftRightWidget(fileReferencesContainer, (left: HTMLElement) => { - const label = new FileLabel(left, element.uri, this._contextService); + const label = new FileLabel(left, element.uri, this._contextService, this._environmentService); toDispose.push(label); return null; diff --git a/src/vs/editor/contrib/rename/browser/renameInputField.ts b/src/vs/editor/contrib/rename/browser/renameInputField.ts index 020bfe6666538..11564d8e05a62 100644 --- a/src/vs/editor/contrib/rename/browser/renameInputField.ts +++ b/src/vs/editor/contrib/rename/browser/renameInputField.ts @@ -13,7 +13,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { Range } from 'vs/editor/common/core/range'; import { ContentWidgetPositionPreference, ICodeEditor, IContentWidget, IContentWidgetPosition } from 'vs/editor/browser/editorBrowser'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; -import { inputBackground, inputBorder, inputForeground, widgetShadow, focusBorder } from 'vs/platform/theme/common/colorRegistry'; +import { inputBackground, inputBorder, inputForeground, widgetShadow } from 'vs/platform/theme/common/colorRegistry'; import { Position } from 'vs/editor/common/core/position'; export default class RenameInputField implements IContentWidget, IDisposable { @@ -79,7 +79,7 @@ export default class RenameInputField implements IContentWidget, IDisposable { const background = theme.getColor(inputBackground); const foreground = theme.getColor(inputForeground); const widgetShadowColor = theme.getColor(widgetShadow); - const border = theme.getColor(inputBorder) || theme.getColor(focusBorder); + const border = theme.getColor(inputBorder); this._inputField.style.backgroundColor = background ? background.toString() : null; this._inputField.style.color = foreground ? foreground.toString() : null; diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts index eddc26ea8850b..59764a21fb627 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts @@ -50,7 +50,7 @@ import { IActivityBarService, ProgressBadge, NumberBadge } from 'vs/workbench/se import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { inputForeground, inputBackground, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { inputForeground, inputBackground, inputBorder } from 'vs/platform/theme/common/colorRegistry'; import { attachListStyler } from 'vs/platform/theme/common/styler'; interface SearchInputEvent extends Event { @@ -146,14 +146,13 @@ export class ExtensionsViewlet extends Viewlet implements IExtensionsViewlet { public updateStyles(): void { super.updateStyles(); - const contrastBorderColor = this.getColor(contrastBorder); - this.searchBox.style.backgroundColor = this.getColor(inputBackground); this.searchBox.style.color = this.getColor(inputForeground); - this.searchBox.style.borderWidth = contrastBorderColor ? '1px' : null; - this.searchBox.style.borderStyle = contrastBorderColor ? 'solid' : null; - this.searchBox.style.borderColor = contrastBorderColor; + const inputBorderColor = this.getColor(inputBorder); + this.searchBox.style.borderWidth = inputBorderColor ? '1px' : null; + this.searchBox.style.borderStyle = inputBorderColor ? 'solid' : null; + this.searchBox.style.borderColor = inputBorderColor; } setVisible(visible: boolean): TPromise { From b673a06683fbe46472c2833784885ab582a11117 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 18 May 2017 07:59:11 +0200 Subject: [PATCH 0650/2747] WorkbenchKeybindingService._cachedResolver stale after ElectronWindow.setup (fixes #26823) --- .../electron-browser/main.contribution.ts | 7 +++++- src/vs/workbench/electron-browser/window.ts | 18 -------------- .../workbench/electron-browser/workbench.ts | 24 ++++++++++++++++++- 3 files changed, 29 insertions(+), 20 deletions(-) diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts index 520d6c4c313a9..46b0bce9b765c 100644 --- a/src/vs/workbench/electron-browser/main.contribution.ts +++ b/src/vs/workbench/electron-browser/main.contribution.ts @@ -14,7 +14,7 @@ import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'v import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform'; -import { CloseEditorAction, KeybindingsReferenceAction, OpenDocumentationUrlAction, OpenIntroductoryVideosUrlAction, ReportIssueAction, ReportPerformanceIssueAction, ZoomResetAction, ZoomOutAction, ZoomInAction, ToggleFullScreenAction, ToggleMenuBarAction, CloseFolderAction, CloseWindowAction, SwitchWindow, NewWindowAction, CloseMessagesAction, NavigateUpAction, NavigateDownAction, NavigateLeftAction, NavigateRightAction, IncreaseViewSizeAction, DecreaseViewSizeAction } from 'vs/workbench/electron-browser/actions'; +import { CloseEditorAction, KeybindingsReferenceAction, OpenDocumentationUrlAction, OpenIntroductoryVideosUrlAction, ReportIssueAction, ReportPerformanceIssueAction, ZoomResetAction, ZoomOutAction, ZoomInAction, ToggleFullScreenAction, ToggleMenuBarAction, CloseFolderAction, CloseWindowAction, SwitchWindow, NewWindowAction, CloseMessagesAction, NavigateUpAction, NavigateDownAction, NavigateLeftAction, NavigateRightAction, IncreaseViewSizeAction, DecreaseViewSizeAction, ShowStartupPerformance, ToggleSharedProcessAction } from 'vs/workbench/electron-browser/actions'; import { MessagesVisibleContext } from 'vs/workbench/electron-browser/workbench'; import { IJSONSchema } from 'vs/base/common/jsonSchema'; import { registerCommands } from 'vs/workbench/electron-browser/commands'; @@ -75,6 +75,11 @@ workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(Naviga workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(IncreaseViewSizeAction, IncreaseViewSizeAction.ID, IncreaseViewSizeAction.LABEL, null), 'View: Increase View Size', viewCategory); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(DecreaseViewSizeAction, DecreaseViewSizeAction.ID, DecreaseViewSizeAction.LABEL, null), 'View: Decrease View Size', viewCategory); +// Developer related actions +const developerCategory = nls.localize('developer', "Developer"); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ShowStartupPerformance, ShowStartupPerformance.ID, ShowStartupPerformance.LABEL), 'Developer: Startup Performance', developerCategory); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleSharedProcessAction, ToggleSharedProcessAction.ID, ToggleSharedProcessAction.LABEL), 'Developer: Toggle Shared Process', developerCategory); + // Configuration: Workbench const configurationRegistry = Registry.as(ConfigurationExtensions.Configuration); diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index c0230d6cc12b0..3c144fe291271 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -34,13 +34,8 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IPath, IOpenFileRequest, IWindowConfiguration } from 'vs/workbench/electron-browser/common'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { ITitleService } from 'vs/workbench/services/title/common/titleService'; -import { Registry } from 'vs/platform/platform'; -import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; -import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IWorkbenchThemeService, VS_HC_THEME, VS_DARK_THEME } from 'vs/workbench/services/themes/common/workbenchThemeService'; import * as browser from 'vs/base/browser/browser'; -import { ReloadWindowAction, ToggleDevToolsAction, ShowStartupPerformance, OpenRecentAction, ToggleSharedProcessAction } from 'vs/workbench/electron-browser/actions'; -import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { Position, IResourceInput, IUntitledResourceInput } from 'vs/platform/editor/common/editor'; @@ -344,19 +339,6 @@ export class ElectronWindow extends Themable { } } }); - - // Developer related actions - const developerCategory = nls.localize('developer', "Developer"); - const workbenchActionsRegistry = Registry.as(Extensions.WorkbenchActions); - const isDeveloping = !this.environmentService.isBuilt || this.environmentService.isExtensionDevelopment; - workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReloadWindowAction, ReloadWindowAction.ID, ReloadWindowAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyCode.KEY_R } : void 0), 'Reload Window'); - workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleDevToolsAction, ToggleDevToolsAction.ID, ToggleDevToolsAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_I, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_I } } : void 0), 'Developer: Toggle Developer Tools', developerCategory); - workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ShowStartupPerformance, ShowStartupPerformance.ID, ShowStartupPerformance.LABEL), 'Developer: Startup Performance', developerCategory); - workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleSharedProcessAction, ToggleSharedProcessAction.ID, ToggleSharedProcessAction.LABEL), 'Developer: Toggle Shared Process', developerCategory); - - // Action registered here to prevent a keybinding conflict with reload window - const fileCategory = nls.localize('file', "File"); - workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenRecentAction, OpenRecentAction.ID, OpenRecentAction.LABEL, { primary: isDeveloping ? null : KeyMod.CtrlCmd | KeyCode.KEY_R, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R } }), 'File: Open Recent', fileCategory); } private resolveKeybindings(actionIds: string[]): TPromise<{ id: string; label: string, isNative: boolean; }[]> { diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 0899853678e21..35a31823fd00d 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -85,12 +85,17 @@ import { ILifecycleService, ShutdownReason } from 'vs/platform/lifecycle/common/ import { IWindowService } from 'vs/platform/windows/common/windows'; import { IMessageService } from 'vs/platform/message/common/message'; import { IStatusbarService } from 'vs/platform/statusbar/common/statusbar'; -import { IMenuService } from 'vs/platform/actions/common/actions'; +import { IMenuService, SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { MenuService } from 'vs/platform/actions/common/menuService'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWindowConfiguration } from 'vs/workbench/electron-browser/common'; +import { localize } from "vs/nls"; +import { IWorkbenchActionRegistry, Extensions } from "vs/workbench/common/actionRegistry"; +import { OpenRecentAction, ToggleDevToolsAction, ReloadWindowAction } from "vs/workbench/electron-browser/actions"; +import { KeyMod } from "vs/base/common/keyCodes"; +import { KeyCode } from "vs/editor/common/standalone/standaloneBase"; export const MessagesVisibleContext = new RawContextKey('globalMessageVisible', false); export const EditorsVisibleContext = new RawContextKey('editorIsOpen', false); @@ -258,6 +263,9 @@ export class Workbench implements IPartService { // Create Workbench this.createWorkbench(); + // Install some global actions + this.createGlobalActions(); + // Services this.initServices(); if (this.callbacks && this.callbacks.onServicesCreated) { @@ -362,6 +370,20 @@ export class Workbench implements IPartService { } } + private createGlobalActions(): void { + + // Developer related actions + const developerCategory = localize('developer', "Developer"); + const workbenchActionsRegistry = Registry.as(Extensions.WorkbenchActions); + const isDeveloping = !this.environmentService.isBuilt || this.environmentService.isExtensionDevelopment; + workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReloadWindowAction, ReloadWindowAction.ID, ReloadWindowAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyCode.KEY_R } : void 0), 'Reload Window'); + workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleDevToolsAction, ToggleDevToolsAction.ID, ToggleDevToolsAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_I, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_I } } : void 0), 'Developer: Toggle Developer Tools', developerCategory); + + // Action registered here to prevent a keybinding conflict with reload window + const fileCategory = localize('file', "File"); + workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenRecentAction, OpenRecentAction.ID, OpenRecentAction.LABEL, { primary: isDeveloping ? null : KeyMod.CtrlCmd | KeyCode.KEY_R, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R } }), 'File: Open Recent', fileCategory); + } + private resolveEditorsToOpen(): TPromise { // Files to open, diff or create From 17a6e12e02e817df2888233db4d5e35d55b3e0b9 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 07:59:32 +0200 Subject: [PATCH 0651/2747] tfs: create env.ps1 --- build/tfs/win32/1_build.ps1 | 13 +++---------- scripts/env.ps1 | 5 +++++ 2 files changed, 8 insertions(+), 10 deletions(-) create mode 100644 scripts/env.ps1 diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index 88b39fea4f954..9ee8909ad8b7a 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -3,23 +3,16 @@ Param( [string]$vsoPAT ) +. .\scripts\env.ps1 . .\build\tfs\win32\lib.ps1 +# Create a _netrc file to download distro dependencies # In order to get _netrc to work, we need a HOME variable setup $env:HOME=$env:USERPROFILE - -$env:npm_config_disturl="https://atom.io/download/electron" -$env:npm_config_target="1.6.6" -$env:npm_config_runtime="electron" -$env:npm_config_cache="$HOME/.npm-electron" -$env:npm_config_arch="ia32" -# mkdir -p "$env:npm_config_cache" - -# Create a _netrc file to download distro dependencies "machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII step "Install dependencies" { - exec { & npm install } + exec { & npm install --arch ia32 } } $env:VSCODE_MIXIN_PASSWORD = $mixinPassword diff --git a/scripts/env.ps1 b/scripts/env.ps1 new file mode 100644 index 0000000000000..3d34630f391e7 --- /dev/null +++ b/scripts/env.ps1 @@ -0,0 +1,5 @@ +$env:npm_config_disturl="https://atom.io/download/electron" +$env:npm_config_target=(node -p "require('./package.json').electronVersion") +$env:npm_config_runtime="electron" +$env:npm_config_cache="$HOME/.npm-electron" +New-Item -Path "$env:npm_config_cache" -Type directory -Force | out-null \ No newline at end of file From 3bb9b5314ef50bd8225aba0565cadc6ca19bc821 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 18 May 2017 08:15:00 +0200 Subject: [PATCH 0652/2747] no ES6 in JS --- src/vs/workbench/parts/html/browser/webview-pre.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/html/browser/webview-pre.js b/src/vs/workbench/parts/html/browser/webview-pre.js index 0a63595c8c864..da511a2c866f8 100644 --- a/src/vs/workbench/parts/html/browser/webview-pre.js +++ b/src/vs/workbench/parts/html/browser/webview-pre.js @@ -154,7 +154,7 @@ const frame = getActiveFrame(); // keep current scrollTop around and use later - let setInitialScrollPosition; + var setInitialScrollPosition; if (frame) { const scrollY = frame.contentDocument && frame.contentDocument.body ? frame.contentDocument.body.scrollTop : 0; setInitialScrollPosition = function (body) { From 4c786b00677f5be9f793fcabf7ff13a087c69ceb Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 18 May 2017 08:15:44 +0200 Subject: [PATCH 0653/2747] Fixes #26575: More workarounds for Chromium line height quirks --- src/vs/editor/browser/controller/textAreaHandler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index 2a52c37838f16..f56d75f5b8e9b 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -411,7 +411,7 @@ export class TextAreaHandler extends ViewPart { ta.setFontSize(1); // Chrome does not generate input events in empty textareas that end // up having a line height smaller than 1 screen pixel. - ta.setLineHeight(Math.ceil(1 / this._pixelRatio)); + ta.setLineHeight(Math.ceil(Math.max(this._pixelRatio, 1 / this._pixelRatio))); } ta.setTop(top); From bc0c78790a9d27814e6098068900903cd5c6d878 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 08:17:24 +0200 Subject: [PATCH 0654/2747] tfs: fix windows build --- build/tfs/win32/1_build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index 9ee8909ad8b7a..926aa3ebfedfd 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -12,7 +12,7 @@ $env:HOME=$env:USERPROFILE "machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII step "Install dependencies" { - exec { & npm install --arch ia32 } + exec { & npm install --arch=ia32 } } $env:VSCODE_MIXIN_PASSWORD = $mixinPassword From 8f634171639530d31f03610c25a5202fabb5637a Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 18 May 2017 08:35:51 +0200 Subject: [PATCH 0655/2747] Only show a certain subset of decorations when they are collapsed --- .../browser/viewParts/decorations/decorations.ts | 14 ++++++++------ src/vs/editor/common/editorCommon.ts | 5 +++++ .../common/model/textModelWithDecorations.ts | 3 +++ src/vs/editor/common/services/modelServiceImpl.ts | 1 + .../editor/contrib/find/common/findDecorations.ts | 1 + 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/browser/viewParts/decorations/decorations.ts b/src/vs/editor/browser/viewParts/decorations/decorations.ts index e129ecb614343..165b9fb928188 100644 --- a/src/vs/editor/browser/viewParts/decorations/decorations.ts +++ b/src/vs/editor/browser/viewParts/decorations/decorations.ts @@ -146,24 +146,26 @@ export class DecorationsOverlay extends DynamicViewOverlay { let visibleStartLineNumber = ctx.visibleRange.startLineNumber; for (let i = 0, lenI = decorations.length; i < lenI; i++) { - let d = decorations[i]; + const d = decorations[i]; if (d.source.options.isWholeLine) { continue; } - let className = d.source.options.className; + const className = d.source.options.className; let linesVisibleRanges = ctx.linesVisibleRangesForRange(d.range, /*TODO@Alex*/className === 'findMatch'); if (!linesVisibleRanges) { continue; } + const showIfCollapsed = d.source.options.showIfCollapsed; + for (let j = 0, lenJ = linesVisibleRanges.length; j < lenJ; j++) { let lineVisibleRanges = linesVisibleRanges[j]; - let lineIndex = lineVisibleRanges.lineNumber - visibleStartLineNumber; + const lineIndex = lineVisibleRanges.lineNumber - visibleStartLineNumber; - if (lineVisibleRanges.ranges.length === 1) { + if (showIfCollapsed && lineVisibleRanges.ranges.length === 1) { const singleVisibleRange = lineVisibleRanges.ranges[0]; if (singleVisibleRange.width === 0) { // collapsed range case => make the decoration visible by faking its width @@ -172,8 +174,8 @@ export class DecorationsOverlay extends DynamicViewOverlay { } for (let k = 0, lenK = lineVisibleRanges.ranges.length; k < lenK; k++) { - let visibleRange = lineVisibleRanges.ranges[k]; - let decorationOutput = ( + const visibleRange = lineVisibleRanges.ranges[k]; + const decorationOutput = ( '
    Date: Thu, 18 May 2017 08:56:47 +0200 Subject: [PATCH 0657/2747] add 32bit libasound dependency to dockerfile --- build/tfs/linux/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tfs/linux/Dockerfile b/build/tfs/linux/Dockerfile index 70142abfa7773..59994333b80c2 100644 --- a/build/tfs/linux/Dockerfile +++ b/build/tfs/linux/Dockerfile @@ -15,7 +15,7 @@ RUN apt-get install -y fakeroot RUN apt-get install -y libgtk2.0-0 libgtk2.0-0:i386 RUN apt-get install -y libgconf-2-4 libgconf-2-4:i386 RUN apt-get install -y libnss3 libnss3:i386 -RUN apt-get install -y libasound2 +RUN apt-get install -y libasound2 libasound2:i386 RUN apt-get install -y libxtst6 libxtst6:i386 RUN apt-get install -y libfuse2 RUN apt-get install -y libnotify-bin From d9e7a2e2122f8cad9504102ddfb475259e6d92a4 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 18 May 2017 09:39:07 +0200 Subject: [PATCH 0658/2747] configure .eslintrc to use ecma script 3 for things in src --- src/.eslintrc | 7 ++++-- src/vs/base/node/startupTimers.js | 36 ++++++++++++++++--------------- 2 files changed, 24 insertions(+), 19 deletions(-) diff --git a/src/.eslintrc b/src/.eslintrc index d84b7b2534d67..fc504686e192a 100644 --- a/src/.eslintrc +++ b/src/.eslintrc @@ -1,7 +1,10 @@ { + "parserOptions": { + "ecmaVersion": 3 + }, "env": { "node": true, - "es6": false + "es6": true }, "rules": { "no-console": 0, @@ -11,4 +14,4 @@ "semi": "warn" }, "extends": "eslint:recommended" -} \ No newline at end of file +} diff --git a/src/vs/base/node/startupTimers.js b/src/vs/base/node/startupTimers.js index e34c97b8f7070..8f0494fc0acfc 100644 --- a/src/vs/base/node/startupTimers.js +++ b/src/vs/base/node/startupTimers.js @@ -5,6 +5,8 @@ 'use strict'; +/*global define*/ + var requireProfiler; if (typeof define !== "function" && typeof module === "object" && typeof module.exports === "object") { @@ -12,23 +14,23 @@ if (typeof define !== "function" && typeof module === "object" && typeof module. global.define = function (dep, callback) { module.exports = callback(); global.define = undefined; - } + }; requireProfiler = function () { return require('v8-profiler'); - } + }; } else { // this is amd requireProfiler = function () { return require.__$__nodeRequire('v8-profiler'); - } + }; } define([], function () { function Tick(name, started, stopped, profile) { - this.name = name - this.started = started - this.stopped = stopped + this.name = name; + this.started = started; + this.stopped = stopped; this.duration = stopped - started; this.profile = profile; } @@ -49,9 +51,9 @@ define([], function () { global._perfTicks = global._perfTicks || []; global._perfToBeProfiled = global._perfToBeProfiled || new Set(); - const _starts = global._perfStarts; - const _ticks = global._perfTicks; - const _toBeProfiled = global._perfToBeProfiled + var _starts = global._perfStarts; + var _ticks = global._perfTicks; + var _toBeProfiled = global._perfToBeProfiled; function startTimer(name, started) { if (typeof started !== 'number') { @@ -64,7 +66,7 @@ define([], function () { requireProfiler().startProfiling(name, true); } _starts.set(name, { name: name, started: started }); - const stop = stopTimer.bind(undefined, name); + var stop = stopTimer.bind(undefined, name); return { stop: stop, while: function (thenable) { @@ -78,9 +80,9 @@ define([], function () { if (typeof stopped !== 'number') { stopped = Date.now(); } - const profile = _toBeProfiled.has(name) ? requireProfiler().stopProfiling(name) : undefined; - const start = _starts.get(name); - const tick = new Tick(start.name, start.started, stopped, profile); + var profile = _toBeProfiled.has(name) ? requireProfiler().stopProfiling(name) : undefined; + var start = _starts.get(name); + var tick = new Tick(start.name, start.started, stopped, profile); _ticks.push(tick); _starts.delete(name); } @@ -91,10 +93,10 @@ define([], function () { function setProfileList(names) { _toBeProfiled.clear(); - names.forEach(function (name) { _toBeProfiled.add(name) }); + names.forEach(function (name) { _toBeProfiled.add(name); }); } - const exports = { + var exports = { Tick: Tick, startTimer: startTimer, stopTimer: stopTimer, @@ -104,8 +106,8 @@ define([], function () { }; function disable() { - const emptyController = Object.freeze({ while: function (t) { return t; }, stop: function () { } }); - const emptyTicks = Object.create([]); + var emptyController = Object.freeze({ while: function (t) { return t; }, stop: function () { } }); + var emptyTicks = Object.create([]); exports.startTimer = function () { return emptyController; }; exports.stopTimer = function () { }; exports.ticks = function () { return emptyTicks; }; From beee645a294454573a0f7c3ebce4ce69866dc09b Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 May 2017 10:05:56 +0200 Subject: [PATCH 0659/2747] [css] update grammar --- extensions/css/syntaxes/css.tmLanguage.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/extensions/css/syntaxes/css.tmLanguage.json b/extensions/css/syntaxes/css.tmLanguage.json index 0d5a3c2775e98..072b9cd30515e 100644 --- a/extensions/css/syntaxes/css.tmLanguage.json +++ b/extensions/css/syntaxes/css.tmLanguage.json @@ -182,7 +182,7 @@ }, { "begin": "(?i)(?=@media(\\s|\\(|/\\*|$))", - "end": "(?<=})", + "end": "(?<=})(?!\\G)", "patterns": [ { "begin": "(?i)\\G(@)media", @@ -226,7 +226,7 @@ }, { "begin": "(?i)(?=@counter-style([\\s'\"{;]|/\\*|$))", - "end": "(?<=})", + "end": "(?<=})(?!\\G)", "patterns": [ { "begin": "(?i)\\G(@)counter-style", @@ -292,7 +292,7 @@ }, { "begin": "(?i)(?=@document([\\s'\"{;]|/\\*|$))", - "end": "(?<=})", + "end": "(?<=})(?!\\G)", "patterns": [ { "begin": "(?i)\\G(@)document", @@ -377,11 +377,11 @@ ] }, { - "begin": "(?i)(?=@keyframes([\\s'\"{;]|/\\*|$))", - "end": "(?<=})", + "begin": "(?i)(?=@(?:-(?:webkit|moz|o|ms)-)?keyframes([\\s'\"{;]|/\\*|$))", + "end": "(?<=})(?!\\G)", "patterns": [ { - "begin": "(?i)\\G(@)keyframes", + "begin": "(?i)\\G(@)(?:-(?:webkit|moz|o|ms)-)?keyframes", "beginCaptures": { "0": { "name": "keyword.control.at-rule.keyframes.css" @@ -455,7 +455,7 @@ }, { "begin": "(?i)(?=@supports(\\s|\\(|/\\*|$))", - "end": "(?<=})|(?=;)", + "end": "(?<=})(?!\\G)|(?=;)", "patterns": [ { "begin": "(?i)\\G(@)supports", @@ -1409,7 +1409,7 @@ "name": "invalid.illegal.colon.css" } }, - "match": "(?xi)\n(:)(:*)\n(?: active|any-link|checked|default|disabled|empty|enabled|first\n | (?:first|last|only)-(?:child|of-type)|focus|fullscreen|host|hover\n | in-range|indeterminate|invalid|left|link|optional|out-of-range\n | read-only|read-write|required|right|root|scope|target|unresolved\n | valid|visited\n)(?![\\w-])", + "match": "(?xi)\n(:)(:*)\n(?: active|any-link|checked|default|disabled|empty|enabled|first\n | (?:first|last|only)-(?:child|of-type)|focus|fullscreen|host|hover\n | in-range|indeterminate|invalid|left|link|optional|out-of-range\n | read-only|read-write|required|right|root|scope|target|unresolved\n | valid|visited\n)(?![\\w-]|\\s*[;}])", "name": "entity.other.attribute-name.pseudo-class.css" }, "pseudo-elements": { @@ -1421,7 +1421,7 @@ "name": "punctuation.definition.entity.css" } }, - "match": "(?xi)\n(?:\n (::?) # Elements using both : and :: notation\n (?: after\n | before\n | first-letter\n | first-line\n | (?:-(?:ah|apple|atsc|epub|hp|khtml|moz\n |ms|o|rim|ro|tc|wap|webkit|xv)\n | (?:mso|prince))\n -[a-z-]+\n )\n |\n (::) # Double-colon only\n (?: backdrop\n | content\n | grammar-error\n | marker\n | placeholder\n | selection\n | shadow\n | spelling-error\n )\n)\n(?![\\w-])", + "match": "(?xi)\n(?:\n (::?) # Elements using both : and :: notation\n (?: after\n | before\n | first-letter\n | first-line\n | (?:-(?:ah|apple|atsc|epub|hp|khtml|moz\n |ms|o|rim|ro|tc|wap|webkit|xv)\n | (?:mso|prince))\n -[a-z-]+\n )\n |\n (::) # Double-colon only\n (?: backdrop\n | content\n | grammar-error\n | marker\n | placeholder\n | selection\n | shadow\n | spelling-error\n )\n)\n(?![\\w-]|\\s*[;}])", "name": "entity.other.attribute-name.pseudo-element.css" }, "rule-list": { @@ -1797,5 +1797,5 @@ ] } }, - "version": "https://github.com/atom/language-css/commit/a2c17d3526e6381992b173d6cead428419751e34" + "version": "https://github.com/atom/language-css/commit/df34a7a41fa6acd6d867c6c2214dba12dc0a4c31" } \ No newline at end of file From aae591bd9e99e84b048c3628c7e1d0dce977639e Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 18 May 2017 10:06:00 +0200 Subject: [PATCH 0660/2747] Move ViewModelCursors out of the ViewModel --- src/vs/editor/browser/view/viewImpl.ts | 6 + .../currentLineHighlight.ts | 3 - .../currentLineMarginHighlight.ts | 2 - .../viewParts/viewCursors/viewCursor.ts | 6 - .../viewParts/viewCursors/viewCursors.ts | 5 - .../editor/browser/widget/codeEditorWidget.ts | 1 + src/vs/editor/common/commonCodeEditor.ts | 13 +- .../common/viewModel/viewModelCursors.ts | 90 +++++++++++-- .../editor/common/viewModel/viewModelImpl.ts | 118 ++++++------------ 9 files changed, 138 insertions(+), 106 deletions(-) diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index 9a2390c4a36e7..cc7605339cc2b 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -49,6 +49,7 @@ import { EditorScrollbar } from 'vs/editor/browser/viewParts/editorScrollbar/edi import { Minimap } from 'vs/editor/browser/viewParts/minimap/minimap'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { IThemeService, getThemeTypeSelector } from 'vs/platform/theme/common/themeService'; +import { ViewModelCursors } from "vs/editor/common/viewModel/viewModelCursors"; export interface IContentWidgetData { widget: editorBrowser.IContentWidget; @@ -97,6 +98,7 @@ export class View extends ViewEventHandler { configuration: Configuration, themeService: IThemeService, model: IViewModel, + cursor: ViewModelCursors, execCoreEditorCommandFunc: ExecCoreEditorCommandFunc ) { super(); @@ -136,6 +138,10 @@ export class View extends ViewEventHandler { this._register(model.addEventListener((events: viewEvents.ViewEvent[]) => { this.eventDispatcher.emitMany(events); })); + + this._register(cursor.addEventListener((events: viewEvents.ViewEvent[]) => { + this.eventDispatcher.emitMany(events); + })); } private createViewParts(): void { diff --git a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts index ad2fcdec70464..cdc9c97ff256c 100644 --- a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts +++ b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts @@ -84,9 +84,6 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay { return false; } public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { - this._primaryCursorIsInEditableRange = true; - this._selectionIsEmpty = true; - this._primaryCursorLineNumber = 1; return true; } public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { diff --git a/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts b/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts index 4cbdf06a32e78..2e0f6dbdb1535 100644 --- a/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts +++ b/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts @@ -67,8 +67,6 @@ export class CurrentLineMarginHighlightOverlay extends DynamicViewOverlay { return hasChanged; } public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { - this._primaryCursorIsInEditableRange = true; - this._primaryCursorLineNumber = 1; return true; } public onLinesDeleted(e: viewEvents.ViewLinesDeletedEvent): boolean { diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts index 5efeefa3c28ac..974facb28f278 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts @@ -130,12 +130,6 @@ export class ViewCursor { return true; } - public onFlushed(): boolean { - this.updatePosition(new Position(1, 1)); - this._isInEditableRange = true; - return true; - } - private _prepareRender(ctx: RenderingContext): ViewCursorRenderData { if (this._cursorStyle === TextEditorCursorStyle.Line || this._cursorStyle === TextEditorCursorStyle.LineThin) { const visibleRange = ctx.visibleRangeForPosition(this._position); diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts index aba0ada5df62a..4617e931f3158 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts @@ -139,11 +139,6 @@ export class ViewCursors extends ViewPart { return true; } public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { - this._primaryCursor.onFlushed(); - for (let i = 0, len = this._secondaryCursors.length; i < len; i++) { - this._domNode.removeChild(this._secondaryCursors[i].getDomNode()); - } - this._secondaryCursors = []; return true; } public onFocusChanged(e: viewEvents.ViewFocusChangedEvent): boolean { diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index b149d37a1113d..2d98476d439fe 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -422,6 +422,7 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito this._configuration, this._themeService, this.viewModel, + this.viewCursor, (editorCommand: CoreEditorCommand, args: any) => { if (!this.cursor) { return; diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index 104436dd806c5..64c0a5486f1b5 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -28,6 +28,7 @@ import { import * as editorOptions from 'vs/editor/common/config/editorOptions'; import { CursorEventType, ICursorPositionChangedEvent, VerticalRevealType, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; +import { ViewModelCursors } from "vs/editor/common/viewModel/viewModelCursors"; let EDITOR_ID = 0; @@ -99,6 +100,7 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo protected viewModel: ViewModel; protected cursor: Cursor; + protected viewCursor: ViewModelCursors; protected readonly _instantiationService: IInstantiationService; protected readonly _contextKeyService: IContextKeyService; @@ -932,7 +934,11 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo this._enableEmptySelectionClipboard() ); - this.viewModel.addEventSource(this.cursor); + this.viewCursor = new ViewModelCursors( + this._configuration, + this.viewModel, + this.cursor + ); this._createView(); @@ -994,6 +1000,11 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo this.cursor = null; } + if (this.viewCursor) { + this.viewCursor.dispose(); + this.viewCursor = null; + } + if (this.viewModel) { this.viewModel.dispose(); this.viewModel = null; diff --git a/src/vs/editor/common/viewModel/viewModelCursors.ts b/src/vs/editor/common/viewModel/viewModelCursors.ts index 90ec0e37eb22a..1b37e3ef3d9fc 100644 --- a/src/vs/editor/common/viewModel/viewModelCursors.ts +++ b/src/vs/editor/common/viewModel/viewModelCursors.ts @@ -6,10 +6,13 @@ import * as editorCommon from 'vs/editor/common/editorCommon'; import { Position } from 'vs/editor/common/core/position'; -import { ICoordinatesConverter, ViewEventsCollector } from 'vs/editor/common/viewModel/viewModel'; +import { ICoordinatesConverter, ViewEventsCollector, IViewModel } from 'vs/editor/common/viewModel/viewModel'; import { Selection } from 'vs/editor/common/core/selection'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { ICursorRevealRangeEvent } from 'vs/editor/common/controller/cursorEvents'; +import { ICursorRevealRangeEvent, CursorEventType, CursorScrollRequest } from 'vs/editor/common/controller/cursorEvents'; +import { Cursor } from "vs/editor/common/controller/cursor"; +import { ViewEventEmitter } from "vs/editor/common/viewModel/viewModelImpl"; +import { EmitterEvent } from "vs/base/common/eventEmitter"; export interface ICursorPositionChangedEvent { readonly position: Position; @@ -26,19 +29,88 @@ export interface ICursorSelectionChangedEvent { readonly secondaryViewSelections: Selection[]; } -export class ViewModelCursors { +function containsLineMappingChanged(events: viewEvents.ViewEvent[]): boolean { + for (let i = 0, len = events.length; i < len; i++) { + if (events[i].type === viewEvents.ViewEventType.ViewLineMappingChanged) { + return true; + } + } + return false; +} + +export class ViewModelCursors extends ViewEventEmitter { private readonly configuration: editorCommon.IConfiguration; + private readonly viewModel: IViewModel; + private readonly cursor: Cursor; private readonly coordinatesConverter: ICoordinatesConverter; private lastCursorPositionChangedEvent: ICursorPositionChangedEvent; private lastCursorSelectionChangedEvent: ICursorSelectionChangedEvent; - constructor(configuration: editorCommon.IConfiguration, coordinatesConverter: ICoordinatesConverter) { + constructor(configuration: editorCommon.IConfiguration, viewModel: IViewModel, cursor: Cursor) { + super(); this.configuration = configuration; - this.coordinatesConverter = coordinatesConverter; + this.viewModel = viewModel; + this.cursor = cursor; + this.coordinatesConverter = viewModel.coordinatesConverter; this.lastCursorPositionChangedEvent = null; this.lastCursorSelectionChangedEvent = null; + + this._register(cursor.addBulkListener((events: EmitterEvent[]) => { + const eventsCollector = new ViewEventsCollector(); + this._onCursorEvents(eventsCollector, events); + this._emit(eventsCollector.finalize()); + })); + + this._register(viewModel.addEventListener((events: viewEvents.ViewEvent[]) => { + if (!containsLineMappingChanged(events)) { + return; + } + const eventsCollector = new ViewEventsCollector(); + this.onLineMappingChanged(eventsCollector); + this._emit(eventsCollector.finalize()); + })); + } + + private _onCursorEvents(eventsCollector: ViewEventsCollector, events: EmitterEvent[]): void { + for (let i = 0, len = events.length; i < len; i++) { + const _e = events[i]; + const type = _e.type; + const data = _e.data; + + switch (type) { + case CursorEventType.CursorPositionChanged: { + const e = data; + this.onCursorPositionChanged(eventsCollector, e); + break; + } + case CursorEventType.CursorSelectionChanged: { + const e = data; + this.onCursorSelectionChanged(eventsCollector, e); + break; + } + case CursorEventType.CursorRevealRange: { + const e = data; + this.onCursorRevealRange(eventsCollector, e); + break; + } + case CursorEventType.CursorScrollRequest: { + const e = data; + this.viewModel.viewLayout.setScrollPosition({ + scrollTop: e.desiredScrollTop + }); + break; + } + default: + console.info('View received unknown event: '); + console.info(type, data); + } + } + } + + public dispose(): void { + super.dispose(); } /** @@ -52,7 +124,7 @@ export class ViewModelCursors { return position; } - public onCursorPositionChanged(eventsCollector: ViewEventsCollector, e: ICursorPositionChangedEvent): void { + private onCursorPositionChanged(eventsCollector: ViewEventsCollector, e: ICursorPositionChangedEvent): void { this.lastCursorPositionChangedEvent = e; const stopRenderingLineAfter = this.configuration.editor.viewInfo.stopRenderingLineAfter; @@ -66,13 +138,13 @@ export class ViewModelCursors { eventsCollector.emit(new viewEvents.ViewCursorPositionChangedEvent(position, secondaryPositions, e.isInEditableRange)); } - public onCursorSelectionChanged(eventsCollector: ViewEventsCollector, e: ICursorSelectionChangedEvent): void { + private onCursorSelectionChanged(eventsCollector: ViewEventsCollector, e: ICursorSelectionChangedEvent): void { this.lastCursorSelectionChangedEvent = e; eventsCollector.emit(new viewEvents.ViewCursorSelectionChangedEvent(e.viewSelection, e.secondaryViewSelections)); } - public onCursorRevealRange(eventsCollector: ViewEventsCollector, e: ICursorRevealRangeEvent): void { + private onCursorRevealRange(eventsCollector: ViewEventsCollector, e: ICursorRevealRangeEvent): void { // Ensure event has viewRange const viewRange = ( e.viewRange @@ -86,7 +158,7 @@ export class ViewModelCursors { )); } - public onLineMappingChanged(eventsCollector: ViewEventsCollector): void { + private onLineMappingChanged(eventsCollector: ViewEventsCollector): void { if (this.lastCursorPositionChangedEvent) { const toViewPos = (pos: Position) => this.coordinatesConverter.convertModelPositionToViewPosition(pos); let e: ICursorPositionChangedEvent = { diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index 432debeaa8152..0ffdbddf6af93 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -13,7 +13,6 @@ import { Selection } from 'vs/editor/common/core/selection'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { TokenizationRegistry, ColorId, LanguageId } from 'vs/editor/common/modes'; import { tokenizeLineToHTML } from 'vs/editor/common/modes/textToHtmlTokenizer'; -import { ViewModelCursors } from 'vs/editor/common/viewModel/viewModelCursors'; import { ViewModelDecorations } from 'vs/editor/common/viewModel/viewModelDecorations'; import { MinimapLinesRenderingData, ViewLineRenderingData, ViewModelDecoration, IViewModelListener, IViewModel, ICoordinatesConverter, ViewEventsCollector } from 'vs/editor/common/viewModel/viewModel'; import { SplitLinesCollection } from 'vs/editor/common/viewModel/splitLinesCollection'; @@ -22,8 +21,7 @@ import * as errors from 'vs/base/common/errors'; import { MinimapTokensColorTracker } from 'vs/editor/common/view/minimapCharRenderer'; import * as textModelEvents from 'vs/editor/common/model/textModelEvents'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; -import { CursorEventType, ICursorPositionChangedEvent, VerticalRevealType, ICursorSelectionChangedEvent, ICursorRevealRangeEvent, CursorScrollRequest } from 'vs/editor/common/controller/cursorEvents'; -import { Cursor } from 'vs/editor/common/controller/cursor'; +import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; import { CharacterHardWrappingLineMapperFactory } from "vs/editor/common/viewModel/characterHardWrappingLineMapper"; import { ViewLayout } from 'vs/editor/common/viewLayout/viewLayout'; @@ -87,7 +85,43 @@ export class CoordinatesConverter implements ICoordinatesConverter { } -export class ViewModel extends Disposable implements IViewModel { +export class ViewEventEmitter extends Disposable { + private _listeners: IViewModelListener[]; + + constructor() { + super(); + this._listeners = []; + } + + public dispose(): void { + this._listeners = []; + super.dispose(); + } + + protected _emit(events: viewEvents.ViewEvent[]): void { + const listeners = this._listeners.slice(0); + for (let i = 0, len = listeners.length; i < len; i++) { + safeInvokeListener(listeners[i], events); + } + } + + public addEventListener(listener: (events: viewEvents.ViewEvent[]) => void): IDisposable { + this._listeners.push(listener); + return { + dispose: () => { + let listeners = this._listeners; + for (let i = 0, len = listeners.length; i < len; i++) { + if (listeners[i] === listener) { + listeners.splice(i, 1); + break; + } + } + } + }; + } +} + +export class ViewModel extends ViewEventEmitter implements IViewModel { private readonly editorId: number; private readonly configuration: editorCommon.IConfiguration; @@ -97,11 +131,9 @@ export class ViewModel extends Disposable implements IViewModel { public readonly viewLayout: ViewLayout; private readonly decorations: ViewModelDecorations; - private readonly cursors: ViewModelCursors; private _isDisposing: boolean; private _centeredViewLine: number; - private _listeners: IViewModelListener[]; constructor(editorId: number, configuration: editorCommon.IConfiguration, model: editorCommon.IModel) { super(); @@ -139,12 +171,9 @@ export class ViewModel extends Disposable implements IViewModel { this._isDisposing = false; this._centeredViewLine = -1; - this._listeners = []; this.decorations = new ViewModelDecorations(this.editorId, this.model, this.configuration, this.coordinatesConverter); - this.cursors = new ViewModelCursors(this.configuration, this.coordinatesConverter); - this._register(this.model.addBulkListener((events: EmitterEvent[]) => { if (this._isDisposing) { // Disposing the lines might end up sending model decoration changed events @@ -171,61 +200,9 @@ export class ViewModel extends Disposable implements IViewModel { this._isDisposing = true; this.decorations.dispose(); this.lines.dispose(); - this._listeners = []; super.dispose(); } - private _emit(events: viewEvents.ViewEvent[]): void { - const listeners = this._listeners.slice(0); - for (let i = 0, len = listeners.length; i < len; i++) { - safeInvokeListener(listeners[i], events); - } - } - - public addEventSource(cursor: Cursor): void { - this._register(cursor.addBulkListener((events: EmitterEvent[]) => { - const eventsCollector = new ViewEventsCollector(); - this._onCursorEvents(eventsCollector, events); - this._emit(eventsCollector.finalize()); - })); - } - - private _onCursorEvents(eventsCollector: ViewEventsCollector, events: EmitterEvent[]): void { - for (let i = 0, len = events.length; i < len; i++) { - const _e = events[i]; - const type = _e.type; - const data = _e.data; - - switch (type) { - case CursorEventType.CursorPositionChanged: { - const e = data; - this.cursors.onCursorPositionChanged(eventsCollector, e); - break; - } - case CursorEventType.CursorSelectionChanged: { - const e = data; - this.cursors.onCursorSelectionChanged(eventsCollector, e); - break; - } - case CursorEventType.CursorRevealRange: { - const e = data; - this.cursors.onCursorRevealRange(eventsCollector, e); - break; - } - case CursorEventType.CursorScrollRequest: { - const e = data; - this.viewLayout.setScrollPosition({ - scrollTop: e.desiredScrollTop - }); - break; - } - default: - console.info('View received unknown event: '); - console.info(type, data); - } - } - } - private _onConfigurationChanged(eventsCollector: ViewEventsCollector, e: IConfigurationChangedEvent): void { // We might need to restore the current centered view range, so save it (if available) @@ -238,7 +215,6 @@ export class ViewModel extends Disposable implements IViewModel { eventsCollector.emit(new viewEvents.ViewFlushedEvent()); eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); this.decorations.onLineMappingChanged(eventsCollector); - this.cursors.onLineMappingChanged(eventsCollector); this.viewLayout.onFlushed(this.getLineCount()); revealPreviousCenteredModelRange = true; } @@ -377,7 +353,6 @@ export class ViewModel extends Disposable implements IViewModel { eventsCollector.emit(new viewEvents.ViewFlushedEvent()); eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); this.decorations.onLineMappingChanged(eventsCollector); - this.cursors.onLineMappingChanged(eventsCollector); this.viewLayout.onFlushed(this.getLineCount()); } @@ -401,7 +376,6 @@ export class ViewModel extends Disposable implements IViewModel { if (!hadOtherModelChange && hadModelLineChangeThatChangedLineMapping) { eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); this.decorations.onLineMappingChanged(eventsCollector); - this.cursors.onLineMappingChanged(eventsCollector); } } @@ -412,27 +386,11 @@ export class ViewModel extends Disposable implements IViewModel { eventsCollector.emit(new viewEvents.ViewFlushedEvent()); eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); this.decorations.onLineMappingChanged(eventsCollector); - this.cursors.onLineMappingChanged(eventsCollector); this.viewLayout.onFlushed(this.getLineCount()); } this._emit(eventsCollector.finalize()); } - public addEventListener(listener: (events: viewEvents.ViewEvent[]) => void): IDisposable { - this._listeners.push(listener); - return { - dispose: () => { - let listeners = this._listeners; - for (let i = 0, len = listeners.length; i < len; i++) { - if (listeners[i] === listener) { - listeners.splice(i, 1); - break; - } - } - } - }; - } - public getCenteredRangeInViewport(): Range { if (this._centeredViewLine === -1) { // Never got rendered or not rendered since last content change event From 8a1fab94a26d1fc83551804bc69eb2df94b129ab Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 18 May 2017 10:04:11 +0200 Subject: [PATCH 0661/2747] hc black: use more token colors (same as dark+) fixes #17178 --- .../theme-defaults/themes/hc_black.json | 326 ++++-------------- .../themes/hc_black_defaults.json | 309 ++++++++++++++++- 2 files changed, 368 insertions(+), 267 deletions(-) diff --git a/extensions/theme-defaults/themes/hc_black.json b/extensions/theme-defaults/themes/hc_black.json index 4fb65f26e8b33..401ed6a0ab68e 100644 --- a/extensions/theme-defaults/themes/hc_black.json +++ b/extensions/theme-defaults/themes/hc_black.json @@ -2,310 +2,104 @@ "$schema": "vscode://schemas/color-theme", "name": "Dark High Contrast", "include": "./hc_black_defaults.json", - "settings": [ - { - "settings": { - "foreground": "#FFFFFF", - "background": "#000000" - } - }, - { - "scope": "emphasis", - "settings": { - "fontStyle": "italic" - } - }, - { - "scope": "strong", - "settings": { - "fontStyle": "bold" - } - }, - { - "scope": "meta.diff.header", - "settings": { - "foreground": "#000080" - } - }, - - { - "scope": "comment", - "settings": { - "foreground": "#7ca668" - } - }, - { - "scope": "constant.language", - "settings": { - "foreground": "#569cd6" - } - }, + "tokenColors": [ { + "name": "Function declarations", "scope": [ - "constant.numeric", - "constant.other.color.rgb-value", - "constant.other.rgb-value", - "support.constant.color" + "entity.name.function", + "support.function", + "support.constant.handlebars" ], "settings": { - "foreground": "#b5cea8" - } - }, - { - "scope": "constant.regexp", - "settings": { - "foreground": "#b46695" - } - }, - { - "scope": "entity.name.tag", - "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "entity.name.tag.css", - "settings": { - "foreground": "#d7ba7d" - } - }, - { - "scope": "entity.other.attribute-name", - "settings": { - "foreground": "#9cdcfe" + "foreground": "#DCDCAA" } }, { + "name": "Types declaration and references", "scope": [ - "entity.other.attribute-name.class.css", - "entity.other.attribute-name.class.mixin.css", - "entity.other.attribute-name.id.css", - "entity.other.attribute-name.parent-selector.css", - "entity.other.attribute-name.pseudo-class.css", - "entity.other.attribute-name.pseudo-element.css", - - "source.css.less entity.other.attribute-name.id", - - "entity.other.attribute-name.attribute.scss", - "entity.other.attribute-name.scss" + "meta.return-type", + "support.class", + "support.type", + "entity.name.type", + "entity.name.class", + "storage.type.cs", + "storage.type.generic.cs", + "storage.type.modifier.cs", + "storage.type.variable.cs", + "storage.type.annotation.java", + "storage.type.generic.java", + "storage.type.java", + "storage.type.object.array.java", + "storage.type.primitive.array.java", + "storage.type.primitive.java", + "storage.type.token.java", + "storage.type.groovy", + "storage.type.annotation.groovy", + "storage.type.parameters.groovy", + "storage.type.generic.groovy", + "storage.type.object.array.groovy", + "storage.type.primitive.array.groovy", + "storage.type.primitive.groovy" ], "settings": { - "foreground": "#d7ba7d" - } - }, - { - "scope": "invalid", - "settings": { - "foreground": "#f44747" - } - }, - { - "scope": "markup.underline", - "settings": { - "fontStyle": "underline" - } - }, - { - "scope": "markup.bold", - "settings": { - "fontStyle": "bold" - } - }, - { - "scope": "markup.heading", - "settings": { - "foreground": "#6796e6" - } - }, - { - "scope": "markup.italic", - "settings": { - "fontStyle": "italic" - } - }, - { - "scope": "markup.inserted", - "settings": { - "foreground": "#b5cea8" - } - }, - { - "scope": "markup.deleted", - "settings": { - "foreground": "#ce9178" - } - }, - { - "scope": "markup.changed", - "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "meta.selector", - "settings": { - "foreground": "#d7ba7d" + "foreground": "#4EC9B0" } }, { - "name": "brackets of XML/HTML tags", + "name": "Types declaration and references, TS grammar specific", "scope": [ - "punctuation.definition.tag" + "meta.type.cast.expr", + "meta.type.new.expr", + "support.constant.math", + "support.constant.dom", + "support.constant.json", + "entity.other.inherited-class" ], "settings": { - "foreground": "#808080" - } - }, - { - "scope": "meta.preprocessor", - "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "meta.preprocessor.string", - "settings": { - "foreground": "#ce9178" - } - }, - { - "scope": "meta.preprocessor.numeric", - "settings": { - "foreground": "#b5cea8" - } - }, - { - "scope": "meta.structure.dictionary.key.python", - "settings": { - "foreground": "#9cdcfe" - } - }, - { - "scope": "storage", - "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "storage.type", - "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "storage.modifier", - "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "string", - "settings": { - "foreground": "#ce9178" - } - }, - { - "scope": "string.tag", - "settings": { - "foreground": "#ce9178" - } - }, - { - "scope": "string.value", - "settings": { - "foreground": "#ce9178" + "foreground": "#4EC9B0" } }, { - "scope": "string.regexp", + "name": "Control flow keywords", + "scope": "keyword.control", "settings": { - "foreground": "#d16969" + "foreground": "#C586C0" } }, { - "name": "JavaScript string interpolation ${}", + "name": "Variable and parameter name", "scope": [ - "punctuation.definition.template-expression.begin.js", - "punctuation.definition.template-expression.begin.ts", - "punctuation.definition.template-expression.end.ts", - "punctuation.definition.template-expression.end.js" + "variable", + "meta.definition.variable.name", + "support.variable" ], "settings": { - "foreground": "#569cd6" + "foreground": "#9CDCFE" } }, { + "name": "Object keys, TS grammar specific", "scope": [ - "support.type.vendored.property-name", - "support.type.property-name", - "variable.css", - "variable.scss", - "variable.other.less" + "meta.object-literal.key", + "meta.object-literal.key entity.name.function" ], "settings": { - "foreground": "#d4d4d4" - } - }, - { - "scope": "keyword", - "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "keyword.control", - "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "keyword.operator", - "settings": { - "foreground": "#d4d4d4" + "foreground": "#9CDCFE" } }, { + "name": "CSS property value", "scope": [ - "keyword.operator.new", - "keyword.operator.expression", - "keyword.operator.cast", - "keyword.operator.sizeof", - "keyword.operator.logical.python" + "support.constant.property-value", + "support.constant.font-name", + "support.constant.media-type", + "support.constant.media", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" ], "settings": { - "foreground": "#569cd6" - } - }, - { - "scope": "keyword.other.unit", - "settings": { - "foreground": "#b5cea8" - } - }, - { - "scope": "support.function.git-rebase", - "settings": { - "foreground": "#d4d4d4" - } - }, - { - "scope": "constant.sha.git-rebase", - "settings": { - "foreground": "#b5cea8" - } - }, - { - "name": "coloring of the Java import and package identifiers", - "scope": ["storage.modifier.import.java", "storage.modifier.package.java"], - "settings": { - "foreground": "#d4d4d4" - } - }, - { - "name": "coloring of the TS this", - "scope": "variable.language.this", - "settings": { - "foreground": "#569cd6" + "foreground": "#CE9178" } } ] diff --git a/extensions/theme-defaults/themes/hc_black_defaults.json b/extensions/theme-defaults/themes/hc_black_defaults.json index ceda83b446507..b98e3e17b267d 100644 --- a/extensions/theme-defaults/themes/hc_black_defaults.json +++ b/extensions/theme-defaults/themes/hc_black_defaults.json @@ -5,5 +5,312 @@ "editor.background": "#000000", "editor.foreground": "#FFFFFF", "editorIndentGuide.background": "#FFFFFF" - } + }, + "settings": [ + { + "settings": { + "foreground": "#FFFFFF", + "background": "#000000" + } + }, + { + "scope": "emphasis", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "strong", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "meta.diff.header", + "settings": { + "foreground": "#000080" + } + }, + + { + "scope": "comment", + "settings": { + "foreground": "#7ca668" + } + }, + { + "scope": "constant.language", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": [ + "constant.numeric", + "constant.other.color.rgb-value", + "constant.other.rgb-value", + "support.constant.color" + ], + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "constant.regexp", + "settings": { + "foreground": "#b46695" + } + }, + { + "scope": "entity.name.tag", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "entity.name.tag.css", + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "entity.other.attribute-name", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": [ + "entity.other.attribute-name.class.css", + "entity.other.attribute-name.class.mixin.css", + "entity.other.attribute-name.id.css", + "entity.other.attribute-name.parent-selector.css", + "entity.other.attribute-name.pseudo-class.css", + "entity.other.attribute-name.pseudo-element.css", + + "source.css.less entity.other.attribute-name.id", + + "entity.other.attribute-name.attribute.scss", + "entity.other.attribute-name.scss" + ], + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "scope": "invalid", + "settings": { + "foreground": "#f44747" + } + }, + { + "scope": "markup.underline", + "settings": { + "fontStyle": "underline" + } + }, + { + "scope": "markup.bold", + "settings": { + "fontStyle": "bold" + } + }, + { + "scope": "markup.heading", + "settings": { + "foreground": "#6796e6" + } + }, + { + "scope": "markup.italic", + "settings": { + "fontStyle": "italic" + } + }, + { + "scope": "markup.inserted", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "markup.deleted", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "markup.changed", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "meta.selector", + "settings": { + "foreground": "#d7ba7d" + } + }, + { + "name": "brackets of XML/HTML tags", + "scope": [ + "punctuation.definition.tag" + ], + "settings": { + "foreground": "#808080" + } + }, + { + "scope": "meta.preprocessor", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "meta.preprocessor.string", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "meta.preprocessor.numeric", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "meta.structure.dictionary.key.python", + "settings": { + "foreground": "#9cdcfe" + } + }, + { + "scope": "storage", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "storage.type", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "storage.modifier", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "string", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.tag", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.value", + "settings": { + "foreground": "#ce9178" + } + }, + { + "scope": "string.regexp", + "settings": { + "foreground": "#d16969" + } + }, + { + "name": "JavaScript string interpolation ${}", + "scope": [ + "punctuation.definition.template-expression.begin.js", + "punctuation.definition.template-expression.begin.ts", + "punctuation.definition.template-expression.end.ts", + "punctuation.definition.template-expression.end.js" + ], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": [ + "support.type.vendored.property-name", + "support.type.property-name", + "variable.css", + "variable.scss", + "variable.other.less" + ], + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "scope": "keyword", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.control", + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.operator", + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "scope": [ + "keyword.operator.new", + "keyword.operator.expression", + "keyword.operator.cast", + "keyword.operator.sizeof", + "keyword.operator.logical.python" + ], + "settings": { + "foreground": "#569cd6" + } + }, + { + "scope": "keyword.other.unit", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "scope": "support.function.git-rebase", + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "scope": "constant.sha.git-rebase", + "settings": { + "foreground": "#b5cea8" + } + }, + { + "name": "coloring of the Java import and package identifiers", + "scope": ["storage.modifier.import.java", "storage.modifier.package.java"], + "settings": { + "foreground": "#d4d4d4" + } + }, + { + "name": "coloring of the TS this", + "scope": "variable.language.this", + "settings": { + "foreground": "#569cd6" + } + } + ] } \ No newline at end of file From bd77d243b452afcf909ae37d156bfc7bb60af6c2 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 May 2017 10:17:34 +0200 Subject: [PATCH 0662/2747] [scss] update grammar (fies #26837) --- extensions/scss/syntaxes/scss.json | 469 ++++---- .../test-cssvariables_scss.json | 27 +- .../scss/test/colorize-results/test_scss.json | 1016 ++++++++--------- 3 files changed, 776 insertions(+), 736 deletions(-) diff --git a/extensions/scss/syntaxes/scss.json b/extensions/scss/syntaxes/scss.json index 921c511a494f9..1f09bd75e562d 100644 --- a/extensions/scss/syntaxes/scss.json +++ b/extensions/scss/syntaxes/scss.json @@ -65,9 +65,6 @@ } ], "repository": { - "at_rule__": { - "comment": "Note how all @rules are prefixed." - }, "at_rule_charset": { "begin": "\\s*((@)charset\\b)\\s*", "captures": { @@ -78,7 +75,6 @@ "name": "punctuation.definition.keyword.scss" } }, - "comment": "Charset", "end": "\\s*((?=;|$))", "name": "meta.at-rule.charset.scss", "patterns": [ @@ -255,7 +251,6 @@ "name": "entity.name.function.scss" } }, - "comment": "Function with Attributes", "end": "\\s*(?={)", "name": "meta.at-rule.function.scss", "patterns": [ @@ -276,7 +271,6 @@ "name": "entity.name.function.scss" } }, - "comment": "Simple Function", "match": "\\s*((@)function\\b)\\s*", "name": "meta.at-rule.function.scss" } @@ -509,26 +503,76 @@ "name": "meta.at-rule.media.scss", "patterns": [ { - "match": "\\b(only)\\b", - "name": "keyword.control.operator" + "include": "#comment_block" }, { - "include": "#media_features" + "include": "#comment_line" }, { - "include": "#property_values" + "match": "\\b(only)\\b", + "name": "keyword.control.operator" }, { - "include": "#variable" + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.media-query.begin.bracket.round.scss" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.media-query.end.bracket.round.scss" + } + }, + "name": "meta.property-list.media-query.scss", + "patterns": [ + { + "begin": "(?(['\"])(?:[^\\\\]|\\\\.)*?(\\6)))))?\\s*(])", - "name": "meta.attribute-selector.scss" + } }, "selector_class": { - "begin": "(\\.)(?=[\\w-]|#{)", - "beginCaptures": { + "match": "(?x)\n(\\.) # Valid class-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)", + "name": "entity.other.attribute-name.class.css", + "captures": { "1": { "name": "punctuation.definition.entity.css" + }, + "2": { + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "\\\\([0-9a-fA-F]{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "match": "\\$|}", + "name": "invalid.illegal.scss" + } + ] } - }, - "end": "(?![\\w-]|(#{))", - "name": "entity.other.attribute-name.class.css", - "patterns": [ - { - "include": "#interpolation" - } - ] - }, - "selector_entities": { - "match": "(?x)\n\\b\n(a|abbr|acronym|address|area|article|aside|audio|\nb|base|bdi|bdo|big|blockquote|body|br|button|\ncanvas|caption|circle|cite|code|col|colgroup|\ndata|datalist|dd|del|details|dfn|dialog|div|dl|dt|\nellipse|em|embed|eventsource|\nfieldset|figure|figcaption|footer|form|frame|frameset|\ng|\n(h[1-6])|head|header|hgroup|hr|html|\ni|iframe|img|image|input|ins|\nkbd|keygen|\nlabel|legend|li|line(?!-)|link|\nmain|map|mark|menu|menuitem|meta|meter|\nnav|noframes|noscript|\nobject(?!-)|ol|optgroup|option|output|\np|param|path|picture|polygon|polyline|pre|progress|\nq|\nrb|rect|rp|rt|rtc|ruby|\ns|samp|script|section|select|small|source|span|strike|strong|style|sub|summary|sup|svg|\ntable(?!-)|tbody|td|template|text(?!-)|textarea|textpath|tfoot|th|thead|time|title|tr|track|tspan|tt|\nu|ul|\nvar|video|\nwbr)\n\\b", - "name": "entity.name.tag.scss" + } }, "selector_custom": { - "match": "\\b([a-zA-Z0-9]+(-[a-zA-Z0-9]+)+)(?=\\.|\\s++[^:]|\\s*[,{]|:(link|visited|hover|active|focus|target|lang|disabled|enabled|checked|indeterminate|root|nth-(child|last-child|of-type|last-of-type)|first-child|last-child|first-of-type|last-of-type|only-child|only-of-type|empty|not|valid|invalid)(\\([0-9A-Za-z]*\\))?)", + "match": "\\b([a-zA-Z0-9]+(-[a-zA-Z0-9]+)+)(?=\\.|\\s++[^:]|\\s*[,\\[{]|:(link|visited|hover|active|focus|target|lang|disabled|enabled|checked|indeterminate|root|nth-(child|last-child|of-type|last-of-type)|first-child|last-child|first-of-type|last-of-type|only-child|only-of-type|empty|not|valid|invalid)(\\([0-9A-Za-z]*\\))?)", "name": "entity.name.tag.custom.scss" }, "selector_id": { + "match": "(?x)\n(\\#) # Valid id-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)", + "name": "entity.other.attribute-name.id.css", "captures": { "1": { "name": "punctuation.definition.entity.css" + }, + "2": { + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "\\\\([0-9a-fA-F]{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "match": "\\$|}", + "name": "invalid.illegal.identifier.scss" + } + ] } - }, - "match": "(#)[a-zA-Z][a-zA-Z0-9_-]*", - "name": "entity.other.attribute-name.id.css" + } }, "selector_placeholder": { + "match": "(?x)\n(%) # Valid placeholder-name\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)", + "name": "entity.other.attribute-name.placeholder.css", "captures": { "1": { - "name": "punctuation.definition.entity.scss" + "name": "punctuation.definition.entity.css" + }, + "2": { + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "\\\\([0-9a-fA-F]{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "match": "\\$|}", + "name": "invalid.illegal.identifier.scss" + } + ] } - }, - "match": "(%)[a-zA-Z0-9_-]+", - "name": "entity.other.attribute-name.placeholder.scss" + } }, "parent_selector_suffix": { - "match": "(?<=&)[a-zA-Z0-9_-]+", - "name": "entity.other.attribute-name.parent-selector-suffix.scss" + "match": "(?x)\n(?<=&)\n(\n (?: [-a-zA-Z_0-9]|[^\\x00-\\x7F] # Valid identifier characters\n | \\\\(?:[0-9a-fA-F]{1,6}|.) # Escape sequence\n | \\#\\{ # Interpolation (escaped to avoid Coffeelint errors)\n | \\$ # Possible start of interpolation variable\n | } # Possible end of interpolation\n )+\n) # Followed by either:\n(?= $ # - End of the line\n | [\\s,.\\#)\\[:{>+~|] # - Another selector\n | /\\* # - A block comment\n)", + "name": "entity.other.attribute-name.parent-selector-suffix.css", + "captures": { + "1": { + "name": "punctuation.definition.entity.css" + }, + "2": { + "patterns": [ + { + "include": "#interpolation" + }, + { + "match": "\\\\([0-9a-fA-F]{1,6}|.)", + "name": "constant.character.escape.scss" + }, + { + "match": "\\$|}", + "name": "invalid.illegal.identifier.scss" + } + ] + } + } }, "selector_pseudo_class": { "patterns": [ @@ -1494,6 +1538,9 @@ } }, "patterns": [ + { + "include": "#interpolation" + }, { "match": "\\d+", "name": "constant.numeric.scss" @@ -1509,32 +1556,14 @@ ] }, { - "match": "(?x)\n(:)\\b\n(link|visited|hover|active|focus|target|lang|disabled|enabled|checked|\nindeterminate|root|first-child|last-child|first-of-type|last-of-type|\nonly-child|only-of-type|empty|not|valid|invalid)\\b", - "captures": { - "0": { - "name": "entity.other.attribute-name.pseudo-class.css" - }, - "1": { - "name": "punctuation.definition.entity.css" - } - } + "include": "source.css#pseudo-classes" } ] }, - "selector_pseudo_element": { - "captures": { - "1": { - "name": "punctuation.definition.entity.css" - } - }, - "match": "(:+)((-(moz|webkit|ms)-)?(after|before|first-letter|first-line|selection))\\b", - "name": "entity.other.attribute-name.pseudo-element.css" - }, "selectors": { - "comment": "Stuff for Selectors.", "patterns": [ { - "include": "#selector_entities" + "include": "source.css#tag-names" }, { "include": "#selector_custom" @@ -1555,7 +1584,7 @@ "include": "#tag_parent_reference" }, { - "include": "#selector_pseudo_element" + "include": "source.css#pseudo-elements" }, { "include": "#selector_attribute" @@ -1669,5 +1698,5 @@ "name": "variable.scss" } }, - "version": "https://github.com/atom/language-sass/commit/63b3aa0ed8f25b80a109c110bdfbd9950bd0df27" + "version": "https://github.com/atom/language-sass/commit/f477576a0ff819657495142f7e64e577a837fadb" } \ No newline at end of file diff --git a/extensions/scss/test/colorize-results/test-cssvariables_scss.json b/extensions/scss/test/colorize-results/test-cssvariables_scss.json index 686e91d75e4e2..caf9d121a466b 100644 --- a/extensions/scss/test/colorize-results/test-cssvariables_scss.json +++ b/extensions/scss/test/colorize-results/test-cssvariables_scss.json @@ -166,7 +166,7 @@ }, { "c": "(", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss punctuation.definition.begin.bracket.round.scss", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -264,8 +264,19 @@ } }, { - "c": ");", - "t": "source.css.scss meta.property-list.scss", + "c": ")", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss punctuation.definition.end.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ";", + "t": "source.css.scss meta.property-list.scss punctuation.terminator.rule.scss", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -287,13 +298,13 @@ }, { "c": "body", - "t": "source.css.scss entity.name.tag.scss", + "t": "source.css.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -331,7 +342,7 @@ }, { "c": "padding-left", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", diff --git a/extensions/scss/test/colorize-results/test_scss.json b/extensions/scss/test/colorize-results/test_scss.json index 3310661788d1b..94003b0d8262f 100644 --- a/extensions/scss/test/colorize-results/test_scss.json +++ b/extensions/scss/test/colorize-results/test_scss.json @@ -254,7 +254,7 @@ }, { "c": "width", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -331,13 +331,13 @@ }, { "c": "p", - "t": "source.css.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -353,13 +353,13 @@ }, { "c": "div", - "t": "source.css.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -397,7 +397,7 @@ }, { "c": "font-size", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -474,13 +474,13 @@ }, { "c": "a", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -518,7 +518,7 @@ }, { "c": "font-weight", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -551,7 +551,7 @@ }, { "c": "bold", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", @@ -628,13 +628,13 @@ }, { "c": "pre", - "t": "source.css.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -672,7 +672,7 @@ }, { "c": "font-size", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -859,7 +859,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -892,7 +892,7 @@ }, { "c": "black", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", @@ -925,13 +925,13 @@ }, { "c": "a", - "t": "source.css.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -969,7 +969,7 @@ }, { "c": "font-weight", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -1002,7 +1002,7 @@ }, { "c": "bold", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", @@ -1101,7 +1101,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -1134,7 +1134,7 @@ }, { "c": "red", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", @@ -1299,13 +1299,13 @@ }, { "c": "font", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "entity.name.tag.css: #D7BA7D", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag.css: #D7BA7D", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -1409,7 +1409,7 @@ }, { "c": "family", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -1453,7 +1453,7 @@ }, { "c": "size", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -1530,7 +1530,7 @@ }, { "c": "weight", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -1563,7 +1563,7 @@ }, { "c": "bold", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", @@ -1662,13 +1662,13 @@ }, { "c": "tr", - "t": "source.css.scss entity.name.tag.scss", + "t": "source.css.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -1728,13 +1728,13 @@ }, { "c": "foo", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -1805,13 +1805,13 @@ }, { "c": "foo", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -1904,13 +1904,13 @@ }, { "c": "foo", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -2014,13 +2014,13 @@ }, { "c": "foo", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -2113,13 +2113,13 @@ }, { "c": "foo", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -2212,13 +2212,13 @@ }, { "c": "foo", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -2465,13 +2465,13 @@ }, { "c": "body", - "t": "source.css.scss entity.name.tag.scss", + "t": "source.css.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -2509,7 +2509,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -2542,7 +2542,7 @@ }, { "c": "black", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", @@ -2652,13 +2652,13 @@ }, { "c": "a", - "t": "source.css.scss entity.name.tag.scss", + "t": "source.css.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -2696,7 +2696,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -2729,7 +2729,7 @@ }, { "c": "green", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", @@ -3103,7 +3103,7 @@ }, { "c": "width", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -3323,13 +3323,13 @@ }, { "c": "font", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "entity.name.tag.css: #D7BA7D", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag.css: #D7BA7D", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -3532,13 +3532,13 @@ }, { "c": "border", - "t": "source.css.scss meta.set.variable.scss support.type.property-name.scss", + "t": "source.css.scss meta.set.variable.scss support.constant.property-value.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "support.constant.property-value: #CE9178", + "light_plus": "support.constant.property-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "support.constant.property-value: #0451A5", + "hc_black": "default: #FFFFFF" } }, { @@ -3554,13 +3554,13 @@ }, { "c": "p", - "t": "source.css.scss entity.name.tag.scss", + "t": "source.css.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -3674,7 +3674,7 @@ } }, { - "c": "-", + "c": "-color", "t": "source.css.scss meta.property-list.scss meta.property-name.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -3684,17 +3684,6 @@ "hc_black": "default: #FFFFFF" } }, - { - "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", - "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" - } - }, { "c": ":", "t": "source.css.scss meta.property-list.scss punctuation.separator.key-value.scss", @@ -3719,7 +3708,7 @@ }, { "c": "blue", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", @@ -3873,7 +3862,7 @@ }, { "c": "100", - "t": "source.css.scss meta.set.variable.scss constant.numeric.color.rgb-value.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3906,7 +3895,7 @@ }, { "c": "100", - "t": "source.css.scss meta.set.variable.scss constant.numeric.color.rgb-value.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3939,7 +3928,7 @@ }, { "c": "225", - "t": "source.css.scss meta.set.variable.scss constant.numeric.color.rgb-value.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4060,13 +4049,13 @@ }, { "c": "p", - "t": "source.css.scss entity.name.tag.scss", + "t": "source.css.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -4104,7 +4093,7 @@ }, { "c": "width", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -4137,7 +4126,7 @@ }, { "c": "(", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss punctuation.definition.begin.bracket.round.scss", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -4224,8 +4213,19 @@ } }, { - "c": ") ", - "t": "source.css.scss meta.property-list.scss", + "c": ")", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss punctuation.definition.end.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -4236,18 +4236,40 @@ }, { "c": "*", - "t": "source.css.scss meta.property-list.scss entity.name.tag.wildcard.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.operator.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", - "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", - "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" } }, { - "c": " 3;", - "t": "source.css.scss meta.property-list.scss", + "c": " ", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "3", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "r": { + "dark_plus": "constant.numeric: #B5CEA8", + "light_plus": "constant.numeric: #09885A", + "dark_vs": "constant.numeric: #B5CEA8", + "light_vs": "constant.numeric: #09885A", + "hc_black": "constant.numeric: #B5CEA8" + } + }, + { + "c": ";", + "t": "source.css.scss meta.property-list.scss punctuation.terminator.rule.scss", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -4269,7 +4291,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -4401,7 +4423,7 @@ }, { "c": "font-family", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -4522,7 +4544,7 @@ }, { "c": "margin", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -4643,7 +4665,7 @@ }, { "c": "auto", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", @@ -4676,13 +4698,13 @@ }, { "c": "content", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "entity.name.tag.css: #D7BA7D", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag.css: #D7BA7D", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -4852,7 +4874,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -5039,7 +5061,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -5709,7 +5731,7 @@ } }, { - "c": " (", + "c": " ", "t": "source.css.scss meta.property-list.scss meta.at-rule.return.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -5719,6 +5741,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "(", + "t": "source.css.scss meta.property-list.scss meta.at-rule.return.scss punctuation.definition.begin.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": "$n", "t": "source.css.scss meta.property-list.scss meta.at-rule.return.scss variable.scss", @@ -5775,7 +5808,18 @@ } }, { - "c": ") ", + "c": ")", + "t": "source.css.scss meta.property-list.scss meta.at-rule.return.scss punctuation.definition.end.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "source.css.scss meta.property-list.scss meta.at-rule.return.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -5897,7 +5941,7 @@ }, { "c": "width", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -6645,7 +6689,7 @@ }, { "c": "width", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -6787,7 +6831,7 @@ } }, { - "c": " (", + "c": " ", "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -6797,9 +6841,20 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "(", + "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss meta.property-list.media-query.scss punctuation.definition.media-query.begin.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": "orientation", - "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss support.type.property-name.media.css", + "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss meta.property-list.media-query.scss meta.property-name.media-query.scss support.type.property-name.media.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -6809,8 +6864,19 @@ } }, { - "c": ": ", - "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss", + "c": ":", + "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss meta.property-list.media-query.scss punctuation.separator.key-value.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss meta.property-list.media-query.scss", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -6821,7 +6887,7 @@ }, { "c": "landscape", - "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss meta.property-list.media-query.scss meta.property-value.media-query.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", @@ -6831,7 +6897,18 @@ } }, { - "c": ") ", + "c": ")", + "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss meta.property-list.media-query.scss punctuation.definition.media-query.end.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "source.css.scss meta.property-list.scss meta.at-rule.media.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -6865,7 +6942,7 @@ }, { "c": "width", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -7052,7 +7129,7 @@ }, { "c": "border", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -7162,7 +7239,7 @@ }, { "c": "background-color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -7315,7 +7392,7 @@ } }, { - "c": " ", + "c": " .error", "t": "source.css.scss meta.property-list.scss meta.at-rule.import.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -7325,28 +7402,6 @@ "hc_black": "default: #FFFFFF" } }, - { - "c": ".", - "t": "source.css.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.class.css punctuation.definition.entity.css", - "r": { - "dark_plus": "entity.other.attribute-name.class.css: #D7BA7D", - "light_plus": "entity.other.attribute-name.class.css: #800000", - "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", - "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" - } - }, - { - "c": "error", - "t": "source.css.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.class.css", - "r": { - "dark_plus": "entity.other.attribute-name.class.css: #D7BA7D", - "light_plus": "entity.other.attribute-name.class.css: #800000", - "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", - "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" - } - }, { "c": ";", "t": "source.css.scss meta.property-list.scss", @@ -7371,7 +7426,7 @@ }, { "c": "border-width", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -7469,7 +7524,7 @@ } }, { - "c": " ", + "c": " a", "t": "source.css.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -7479,20 +7534,9 @@ "hc_black": "default: #FFFFFF" } }, - { - "c": "a", - "t": "source.css.scss entity.name.tag.scss", - "r": { - "dark_plus": "entity.name.tag: #569CD6", - "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", - "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" - } - }, { "c": "%", - "t": "source.css.scss entity.other.attribute-name.placeholder.scss punctuation.definition.entity.scss", + "t": "source.css.scss entity.other.attribute-name.placeholder.css punctuation.definition.entity.css", "r": { "dark_plus": "entity.other.attribute-name: #9CDCFE", "light_plus": "entity.other.attribute-name: #FF0000", @@ -7503,7 +7547,7 @@ }, { "c": "extreme", - "t": "source.css.scss entity.other.attribute-name.placeholder.scss", + "t": "source.css.scss entity.other.attribute-name.placeholder.css", "r": { "dark_plus": "entity.other.attribute-name: #9CDCFE", "light_plus": "entity.other.attribute-name: #FF0000", @@ -7547,7 +7591,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -7580,7 +7624,7 @@ }, { "c": "blue", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", @@ -7613,7 +7657,7 @@ }, { "c": "font-weight", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -7646,7 +7690,7 @@ }, { "c": "bold", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", @@ -7679,7 +7723,7 @@ }, { "c": "font-size", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -7844,7 +7888,7 @@ }, { "c": "%", - "t": "source.css.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.placeholder.scss punctuation.definition.entity.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.placeholder.css punctuation.definition.entity.css", "r": { "dark_plus": "entity.other.attribute-name: #9CDCFE", "light_plus": "entity.other.attribute-name: #FF0000", @@ -7855,7 +7899,7 @@ }, { "c": "extreme", - "t": "source.css.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.placeholder.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.placeholder.css", "r": { "dark_plus": "entity.other.attribute-name: #9CDCFE", "light_plus": "entity.other.attribute-name: #FF0000", @@ -8889,7 +8933,7 @@ }, { "c": "position", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -8922,7 +8966,7 @@ }, { "c": "relative", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", @@ -8955,7 +8999,7 @@ }, { "c": "left", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -9021,7 +9065,7 @@ }, { "c": "top", - "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -9153,13 +9197,13 @@ }, { "c": "p", - "t": "source.css.scss entity.name.tag.scss", + "t": "source.css.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -9362,7 +9406,7 @@ }, { "c": "border", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -9428,7 +9472,7 @@ }, { "c": "solid", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", @@ -9604,7 +9648,7 @@ }, { "c": "border", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -9670,7 +9714,7 @@ }, { "c": "dotted", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", @@ -9738,37 +9782,15 @@ "c": "if", "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss keyword.control.if.scss", "r": { - "dark_plus": "keyword.control: #C586C0", - "light_plus": "keyword.control: #AF00DB", - "dark_vs": "keyword.control: #569CD6", - "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" - } - }, - { - "c": " ", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "null", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss support.constant.property-value.scss", - "r": { - "dark_plus": "support.constant.property-value: #CE9178", - "light_plus": "support.constant.property-value: #0451A5", - "dark_vs": "default: #D4D4D4", - "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "dark_plus": "keyword.control: #C586C0", + "light_plus": "keyword.control: #AF00DB", + "dark_vs": "keyword.control: #569CD6", + "light_vs": "keyword.control: #0000FF", + "hc_black": "keyword.control: #569CD6" } }, { - "c": " ", + "c": " null ", "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -9802,7 +9824,7 @@ }, { "c": "border", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -9868,7 +9890,7 @@ }, { "c": "double", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", @@ -10000,13 +10022,13 @@ }, { "c": "p", - "t": "source.css.scss entity.name.tag.scss", + "t": "source.css.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -10143,7 +10165,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -10176,7 +10198,7 @@ }, { "c": "blue", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", @@ -10275,7 +10297,7 @@ }, { "c": "color", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -10308,7 +10330,7 @@ }, { "c": "black", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", @@ -10649,7 +10671,7 @@ }, { "c": "width", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -11034,7 +11056,7 @@ }, { "c": "background-image", - "t": "source.css.scss meta.at-rule.each.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -11507,7 +11529,7 @@ }, { "c": "width", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -12122,7 +12144,7 @@ } }, { - "c": " (", + "c": " ", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -12132,6 +12154,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "(", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss punctuation.definition.begin.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": "unit", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss support.function.misc.scss", @@ -12177,29 +12210,7 @@ } }, { - "c": " ", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "==", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss keyword.operator.comparison.scss", - "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4" - } - }, - { - "c": " ", + "c": " == ", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -12243,7 +12254,18 @@ } }, { - "c": ") ", + "c": ")", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss punctuation.definition.end.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -12265,7 +12287,7 @@ } }, { - "c": " (", + "c": " ", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -12275,6 +12297,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "(", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss punctuation.definition.begin.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": "$i", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss variable.scss", @@ -12287,7 +12320,7 @@ } }, { - "c": " ", + "c": " == ", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -12298,19 +12331,8 @@ } }, { - "c": "==", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss keyword.operator.comparison.scss", - "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4" - } - }, - { - "c": " (", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss", + "c": "(", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss punctuation.definition.begin.bracket.round.scss", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -12375,7 +12397,18 @@ } }, { - "c": ")) ", + "c": "))", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss punctuation.definition.end.bracket.round.scss", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -12794,13 +12827,13 @@ }, { "c": "font", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "entity.name.tag.css: #D7BA7D", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag.css: #D7BA7D", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -12838,7 +12871,7 @@ }, { "c": "family", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -12871,7 +12904,7 @@ }, { "c": "Arial", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.font-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.font-name.css", "r": { "dark_plus": "support.constant.font-name: #CE9178", "light_plus": "support.constant.font-name: #0451A5", @@ -12904,7 +12937,7 @@ }, { "c": "size", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -12981,7 +13014,7 @@ }, { "c": "weight", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -13014,7 +13047,7 @@ }, { "c": "bold", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", @@ -13069,7 +13102,7 @@ }, { "c": "color", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -13267,7 +13300,7 @@ }, { "c": "padding", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -13553,7 +13586,7 @@ }, { "c": "border", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -13597,7 +13630,7 @@ }, { "c": "color", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -13663,7 +13696,7 @@ }, { "c": "width", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -13729,13 +13762,13 @@ }, { "c": "style", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -13762,7 +13795,7 @@ }, { "c": "dashed", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", @@ -13817,13 +13850,13 @@ }, { "c": "p", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss entity.name.tag.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -13916,7 +13949,7 @@ }, { "c": "blue", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", @@ -14114,13 +14147,13 @@ }, { "c": "-moz-box-shadow", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.vendored.property-name.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "support.type.vendored.property-name: #9CDCFE", + "light_plus": "support.type.vendored.property-name: #FF0000", + "dark_vs": "support.type.vendored.property-name: #9CDCFE", + "light_vs": "support.type.vendored.property-name: #FF0000", + "hc_black": "support.type.vendored.property-name: #D4D4D4" } }, { @@ -14180,13 +14213,13 @@ }, { "c": "-webkit-box-shadow", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.vendored.property-name.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "support.type.vendored.property-name: #9CDCFE", + "light_plus": "support.type.vendored.property-name: #FF0000", + "dark_vs": "support.type.vendored.property-name: #9CDCFE", + "light_vs": "support.type.vendored.property-name: #FF0000", + "hc_black": "support.type.vendored.property-name: #D4D4D4" } }, { @@ -14246,7 +14279,7 @@ }, { "c": "box-shadow", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -14895,7 +14928,7 @@ }, { "c": "color", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -14961,7 +14994,7 @@ }, { "c": "background-color", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -15027,7 +15060,7 @@ }, { "c": "border-color", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -15511,13 +15544,13 @@ }, { "c": "html", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -15742,7 +15775,7 @@ }, { "c": "background-image", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -16105,13 +16138,13 @@ }, { "c": "=", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.attribute-selector.scss punctuation.separator.operator.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.attribute-selector.scss keyword.operator.scss", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" } }, { @@ -16127,13 +16160,13 @@ }, { "c": "external", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.attribute-selector.scss string.quoted.double.attribute-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.attribute-selector.scss", "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -16215,13 +16248,13 @@ }, { "c": "content", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "entity.name.tag.css: #D7BA7D", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag.css: #D7BA7D", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -16413,7 +16446,7 @@ }, { "c": "margin-left", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -16490,7 +16523,7 @@ }, { "c": "margin-right", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -16600,13 +16633,13 @@ }, { "c": "tr", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss entity.name.tag.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -16666,13 +16699,13 @@ }, { "c": "foo", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -16820,7 +16853,7 @@ }, { "c": "white", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", @@ -16864,7 +16897,7 @@ }, { "c": "default", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss support.constant.property-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss support.constant.property-value.css", "r": { "dark_plus": "support.constant.property-value: #CE9178", "light_plus": "support.constant.property-value: #0451A5", @@ -16963,7 +16996,7 @@ }, { "c": "black", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss support.constant.color.w3c-standard-color-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss support.constant.color.w3c-standard-color-name.css", "r": { "dark_plus": "support.constant.color: #CE9178", "light_plus": "support.constant.color: #0451A5", @@ -17029,7 +17062,7 @@ }, { "c": "margin-top", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -17073,7 +17106,7 @@ }, { "c": "margin-bottom", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -17128,7 +17161,7 @@ }, { "c": "margin-top", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -17314,7 +17347,7 @@ } }, { - "c": " ", + "c": " false", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.mixin.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -17324,17 +17357,6 @@ "hc_black": "default: #FFFFFF" } }, - { - "c": "false", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.mixin.scss support.constant.property-value.scss", - "r": { - "dark_plus": "support.constant.property-value: #CE9178", - "light_plus": "support.constant.property-value: #0451A5", - "dark_vs": "default: #D4D4D4", - "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" - } - }, { "c": ")", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.mixin.scss punctuation.definition.parameters.end.bracket.round.scss", @@ -17402,7 +17424,7 @@ } }, { - "c": " ", + "c": " .", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.import.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -17412,31 +17434,20 @@ "hc_black": "default: #FFFFFF" } }, - { - "c": ".", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.class.css punctuation.definition.entity.css", - "r": { - "dark_plus": "entity.other.attribute-name.class.css: #D7BA7D", - "light_plus": "entity.other.attribute-name.class.css: #800000", - "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", - "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" - } - }, { "c": "#{", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.class.css variable.interpolation.scss punctuation.definition.interpolation.begin.bracket.curly.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.import.scss variable.interpolation.scss punctuation.definition.interpolation.begin.bracket.curly.scss", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", - "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", - "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { "c": "$a", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.class.css variable.interpolation.scss variable.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.import.scss variable.interpolation.scss variable.scss", "r": { "dark_plus": "variable.scss: #9CDCFE", "light_plus": "variable.scss: #FF0000", @@ -17447,13 +17458,13 @@ }, { "c": "}", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.import.scss entity.other.attribute-name.class.css variable.interpolation.scss punctuation.definition.interpolation.end.bracket.curly.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.import.scss variable.interpolation.scss punctuation.definition.interpolation.end.bracket.curly.scss", "r": { "dark_plus": "variable: #9CDCFE", "light_plus": "variable: #001080", - "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", - "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -17612,13 +17623,13 @@ }, { "c": "a", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -17733,13 +17744,13 @@ }, { "c": "b", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss entity.name.tag.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "entity.name.tag: #569CD6", + "dark_plus": "entity.name.tag.css: #D7BA7D", "light_plus": "entity.name.tag: #800000", - "dark_vs": "entity.name.tag: #569CD6", + "dark_vs": "entity.name.tag.css: #D7BA7D", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { @@ -17810,13 +17821,13 @@ }, { "c": "foo", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -18063,7 +18074,7 @@ }, { "c": "font-family", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -18129,7 +18140,7 @@ }, { "c": "src", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -18425,7 +18436,7 @@ } }, { - "c": "-", + "c": "-style", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss", "r": { "dark_plus": "default: #D4D4D4", @@ -18435,17 +18446,6 @@ "hc_black": "default: #FFFFFF" } }, - { - "c": "style", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", - "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" - } - }, { "c": ":", "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss punctuation.separator.key-value.scss", @@ -18503,13 +18503,13 @@ }, { "c": "foo-", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -18635,13 +18635,13 @@ }, { "c": "-bar-", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -18734,13 +18734,13 @@ }, { "c": "foo-", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -18778,13 +18778,13 @@ }, { "c": "-bar", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { @@ -18976,7 +18976,7 @@ }, { "c": "opacity", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -19108,7 +19108,7 @@ }, { "c": "opacity", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -19295,7 +19295,7 @@ }, { "c": "opacity", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -19427,7 +19427,7 @@ }, { "c": "opacity", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -19526,13 +19526,13 @@ }, { "c": "-o-keyframes", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss invalid.illegal.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-name.scss support.type.vendored.property-name.css", "r": { - "dark_plus": "invalid: #F44747", - "light_plus": "invalid: #CD3131", - "dark_vs": "invalid: #F44747", - "light_vs": "invalid: #CD3131", - "hc_black": "invalid: #F44747" + "dark_plus": "support.type.vendored.property-name: #9CDCFE", + "light_plus": "support.type.vendored.property-name: #FF0000", + "dark_vs": "support.type.vendored.property-name: #9CDCFE", + "light_vs": "support.type.vendored.property-name: #FF0000", + "hc_black": "support.type.vendored.property-name: #D4D4D4" } }, { @@ -19614,7 +19614,7 @@ }, { "c": "opacity", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -19724,7 +19724,7 @@ }, { "c": "opacity", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -19933,7 +19933,7 @@ }, { "c": "opacity", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -20065,7 +20065,7 @@ }, { "c": "opacity", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-name.scss support.type.property-name.css", "r": { "dark_plus": "support.type.property-name: #9CDCFE", "light_plus": "support.type.property-name: #FF0000", @@ -20208,18 +20208,18 @@ }, { "c": "=", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.attribute-selector.scss punctuation.separator.operator.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.attribute-selector.scss keyword.operator.scss", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" } }, { "c": "'", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.attribute-selector.scss string.quoted.double.attribute-value.scss punctuation.definition.string.begin.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.attribute-selector.scss string.quoted.single.attribute-value.scss punctuation.definition.string.begin.scss", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -20230,18 +20230,18 @@ }, { "c": "test-1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.attribute-selector.scss string.quoted.double.attribute-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.attribute-selector.scss", "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { "c": "'", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.attribute-selector.scss string.quoted.double.attribute-value.scss punctuation.definition.string.end.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.attribute-selector.scss string.quoted.single.attribute-value.scss punctuation.definition.string.end.scss", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -20318,13 +20318,13 @@ }, { "c": "content", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-name.scss support.type.property-name.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss entity.name.tag.css", "r": { - "dark_plus": "support.type.property-name: #9CDCFE", - "light_plus": "support.type.property-name: #FF0000", - "dark_vs": "support.type.property-name: #9CDCFE", - "light_vs": "support.type.property-name: #FF0000", - "hc_black": "support.type.property-name: #D4D4D4" + "dark_plus": "entity.name.tag.css: #D7BA7D", + "light_plus": "entity.name.tag: #800000", + "dark_vs": "entity.name.tag.css: #D7BA7D", + "light_vs": "entity.name.tag: #800000", + "hc_black": "entity.name.tag.css: #D7BA7D" } }, { From 8b77c7170fff27f820eb216a79c6313ab7f71052 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 May 2017 10:35:46 +0200 Subject: [PATCH 0663/2747] [less] update grammar --- extensions/less/syntaxes/less.tmLanguage.json | 115 ++++-------------- .../test/colorize-results/14119_less.json | 12 +- .../test-cssvariables_less.json | 86 ++++++++----- .../less/test/colorize-results/test_less.json | 51 +++++--- 4 files changed, 114 insertions(+), 150 deletions(-) diff --git a/extensions/less/syntaxes/less.tmLanguage.json b/extensions/less/syntaxes/less.tmLanguage.json index f9605e2f845e9..902eb4e8d01dc 100644 --- a/extensions/less/syntaxes/less.tmLanguage.json +++ b/extensions/less/syntaxes/less.tmLanguage.json @@ -209,7 +209,7 @@ "include": "#brace_round" }, { - "include": "#commas" + "include": "source.css#commas" }, { "include": "#strings" @@ -241,8 +241,7 @@ "name": "meta.at-rule.media.css" }, { - "match": "\\b(width|scan|resolution|orientation|monochrome|min-width|min-resolution|min-monochrome|min-height|min-device-width|min-device-height|min-device-aspect-ratio|min-color-index|min-color|min-aspect-ratio|max-width|max-resolution|max-monochrome|max-height|max-device-width|max-device-height|max-device-aspect-ratio|max-color-index|max-color|max-aspect-ratio|height|grid|device-width|device-height|device-aspect-ratio|color-index|color|aspect-ratio)\\b", - "name": "support.type.property-name.media-feature.media.css" + "include": "source.css#media-features" }, { "match": "\\b(tv|tty|screen|projection|print|handheld|embossed|braille|aural|all)\\b", @@ -309,19 +308,22 @@ "name": "meta.property-list.css", "patterns": [ { - "include": "#pseudo_elements" + "include": "source.css#pseudo-elements" }, { - "include": "#pseudo_classes" + "include": "source.css#pseudo-classes" }, { - "include": "#variable_interpolation" + "include": "source.css#tag-names" + }, + { + "include": "source.css#commas" }, { - "include": "#property_names" + "include": "#variable_interpolation" }, { - "include": "#property_names_svg" + "include": "source.css#property-names" }, { "include": "#property_values" @@ -344,22 +346,17 @@ "name": "keyword.control.logical.operator.less" }, { - "match": "(?x)\n(? Date: Thu, 18 May 2017 10:50:30 +0200 Subject: [PATCH 0664/2747] test fixes for #17178 --- .../bat/test/colorize-results/test_bat.json | 10 +- .../test/colorize-results/test_clj.json | 40 +- .../colorize-results/test-regex_coffee.json | 8 +- .../test/colorize-results/test_coffee.json | 60 +-- .../cpp/test/colorize-results/test_c.json | 36 +- .../cpp/test/colorize-results/test_cc.json | 38 +- .../cpp/test/colorize-results/test_cpp.json | 26 +- .../csharp/test/colorize-results/test_cs.json | 26 +- .../colorize-results/test-variables_css.json | 10 +- .../css/test/colorize-results/test_css.json | 182 ++++---- .../fsharp/test/colorize-results/test_fs.json | 16 +- .../test/colorize-results/test-13777_go.json | 2 +- .../go/test/colorize-results/test_go.json | 24 +- .../test/colorize-results/test_groovy.json | 216 ++++----- .../colorize-results/test_handlebars.json | 88 ++-- .../test/colorize-results/test_hbs.json | 94 ++-- .../hlsl/test/colorize-results/test_hlsl.json | 8 +- .../test/colorize-results/12750_html.json | 8 +- .../test/colorize-results/25920_html.json | 2 +- .../html/test/colorize-results/test_html.json | 34 +- .../test/colorize-results/basic_java.json | 54 +-- .../test/colorize-results/test6916_js.json | 30 +- .../test/colorize-results/test_js.json | 142 +++--- .../test/colorize-results/test_jsx.json | 74 +-- .../test-cssvariables_less.json | 10 +- .../less/test/colorize-results/test_less.json | 42 +- .../lua/test/colorize-results/test_lua.json | 30 +- .../make/test/colorize-results/makefile.json | 42 +- .../test/colorize-results/test_m.json | 86 ++-- .../perl/test/colorize-results/test2_pl.json | 228 ++++----- .../perl/test/colorize-results/test_pl.json | 128 ++--- .../php/test/colorize-results/test_php.json | 136 +++--- .../test/colorize-results/test_ps1.json | 82 ++-- .../pug/test/colorize-results/test_pug.json | 28 +- .../python/test/colorize-results/test_py.json | 136 +++--- .../r/test/colorize-results/test_r.json | 12 +- .../test/colorize-results/test_cshtml.json | 56 +-- .../ruby/test/colorize-results/test_rb.json | 104 ++--- .../test/colorize-results/test-6611_rs.json | 8 +- .../rust/test/colorize-results/test_rs.json | 18 +- .../test-cssvariables_scss.json | 6 +- .../scss/test/colorize-results/test_scss.json | 416 ++++++++--------- .../test/colorize-results/test_shader.json | 14 +- .../test/colorize-results/test_sh.json | 88 ++-- .../sql/test/colorize-results/test_sql.json | 2 +- .../test/colorize-results/test_swift.json | 8 +- .../colorize-results/test-brackets_tsx.json | 16 +- .../test-function-inv_ts.json | 12 +- .../colorize-results/test-issue11_ts.json | 104 ++--- .../colorize-results/test-issue5431_ts.json | 18 +- .../colorize-results/test-issue5465_ts.json | 6 +- .../colorize-results/test-issue5566_ts.json | 8 +- .../colorize-results/test-keywords_ts.json | 6 +- .../colorize-results/test-members_ts.json | 14 +- .../test-object-literals_ts.json | 16 +- .../colorize-results/test-strings_ts.json | 20 +- .../test/colorize-results/test-this_ts.json | 2 +- .../test/colorize-results/test_ts.json | 438 +++++++++--------- .../vb/test/colorize-results/test_vb.json | 94 ++-- .../yaml/test/colorize-results/test_yaml.json | 16 +- 60 files changed, 1839 insertions(+), 1839 deletions(-) diff --git a/extensions/bat/test/colorize-results/test_bat.json b/extensions/bat/test/colorize-results/test_bat.json index f69d64df672ef..d909fe69bef55 100644 --- a/extensions/bat/test/colorize-results/test_bat.json +++ b/extensions/bat/test/colorize-results/test_bat.json @@ -95,7 +95,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -106,7 +106,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -139,7 +139,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -161,7 +161,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -216,7 +216,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/clojure/test/colorize-results/test_clj.json b/extensions/clojure/test/colorize-results/test_clj.json index 11324fed559de..190c08af9f3c3 100644 --- a/extensions/clojure/test/colorize-results/test_clj.json +++ b/extensions/clojure/test/colorize-results/test_clj.json @@ -40,7 +40,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -161,7 +161,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -700,7 +700,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -942,7 +942,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -975,7 +975,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1063,7 +1063,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1118,7 +1118,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1195,7 +1195,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1646,7 +1646,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1734,7 +1734,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1866,7 +1866,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1987,7 +1987,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2130,7 +2130,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2218,7 +2218,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2427,7 +2427,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2570,7 +2570,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2680,7 +2680,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2768,7 +2768,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2823,7 +2823,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2999,7 +2999,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { diff --git a/extensions/coffeescript/test/colorize-results/test-regex_coffee.json b/extensions/coffeescript/test/colorize-results/test-regex_coffee.json index 298c569afaa23..99cd587f50d97 100644 --- a/extensions/coffeescript/test/colorize-results/test-regex_coffee.json +++ b/extensions/coffeescript/test/colorize-results/test-regex_coffee.json @@ -7,7 +7,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -183,7 +183,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -304,7 +304,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -359,7 +359,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/coffeescript/test/colorize-results/test_coffee.json b/extensions/coffeescript/test/colorize-results/test_coffee.json index ddc88670619dd..0dd197a133720 100644 --- a/extensions/coffeescript/test/colorize-results/test_coffee.json +++ b/extensions/coffeescript/test/colorize-results/test_coffee.json @@ -62,7 +62,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -84,7 +84,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -117,7 +117,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -161,7 +161,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -194,7 +194,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -238,7 +238,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -293,7 +293,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -348,7 +348,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -370,7 +370,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -392,7 +392,7 @@ "light_plus": "entity.other.inherited-class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.other.inherited-class: #4EC9B0" } }, { @@ -414,7 +414,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -447,7 +447,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -491,7 +491,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -546,7 +546,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -579,7 +579,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -645,7 +645,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -700,7 +700,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -722,7 +722,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -766,7 +766,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -788,7 +788,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -865,7 +865,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -887,7 +887,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -909,7 +909,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -997,7 +997,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1041,7 +1041,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1118,7 +1118,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1151,7 +1151,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1173,7 +1173,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1206,7 +1206,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1448,7 +1448,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/cpp/test/colorize-results/test_c.json b/extensions/cpp/test/colorize-results/test_c.json index 746ba3324f700..d3bac881c43d2 100644 --- a/extensions/cpp/test/colorize-results/test_c.json +++ b/extensions/cpp/test/colorize-results/test_c.json @@ -73,7 +73,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -84,7 +84,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -139,7 +139,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -150,7 +150,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -271,7 +271,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -524,7 +524,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -612,7 +612,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -931,7 +931,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1107,7 +1107,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1305,7 +1305,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1437,7 +1437,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1624,7 +1624,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1646,7 +1646,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1910,7 +1910,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2097,7 +2097,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2295,7 +2295,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2438,7 +2438,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2724,7 +2724,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/cpp/test/colorize-results/test_cc.json b/extensions/cpp/test/colorize-results/test_cc.json index ba1667e092d53..3f7be3caeb863 100644 --- a/extensions/cpp/test/colorize-results/test_cc.json +++ b/extensions/cpp/test/colorize-results/test_cc.json @@ -7,7 +7,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -18,7 +18,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -40,7 +40,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "meta.preprocessor: #569CD6", "light_vs": "meta.preprocessor: #0000FF", - "hc_black": "meta.preprocessor: #569CD6" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -62,7 +62,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -194,7 +194,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -359,7 +359,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -524,7 +524,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -623,7 +623,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -634,7 +634,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -678,7 +678,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -755,7 +755,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -843,7 +843,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -975,7 +975,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1206,7 +1206,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1228,7 +1228,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1316,7 +1316,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1492,7 +1492,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1558,7 +1558,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1767,7 +1767,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { diff --git a/extensions/cpp/test/colorize-results/test_cpp.json b/extensions/cpp/test/colorize-results/test_cpp.json index 2e0c66b817ebc..8527e98a4f2b9 100644 --- a/extensions/cpp/test/colorize-results/test_cpp.json +++ b/extensions/cpp/test/colorize-results/test_cpp.json @@ -29,7 +29,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -40,7 +40,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -95,7 +95,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -139,7 +139,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -183,7 +183,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -337,7 +337,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -458,7 +458,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -513,7 +513,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -623,7 +623,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -876,7 +876,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -986,7 +986,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1184,7 +1184,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1239,7 +1239,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/csharp/test/colorize-results/test_cs.json b/extensions/csharp/test/colorize-results/test_cs.json index 89d2fa8ff3b2c..1bb74d46cd0a0 100644 --- a/extensions/csharp/test/colorize-results/test_cs.json +++ b/extensions/csharp/test/colorize-results/test_cs.json @@ -29,7 +29,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -73,7 +73,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -128,7 +128,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -216,7 +216,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -755,7 +755,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -832,7 +832,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -854,7 +854,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -975,7 +975,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1074,7 +1074,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1151,7 +1151,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1173,7 +1173,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1195,7 +1195,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1272,7 +1272,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/css/test/colorize-results/test-variables_css.json b/extensions/css/test/colorize-results/test-variables_css.json index 0c1eb9790257f..218818607d484 100644 --- a/extensions/css/test/colorize-results/test-variables_css.json +++ b/extensions/css/test/colorize-results/test-variables_css.json @@ -205,7 +205,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -227,7 +227,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -359,7 +359,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -425,7 +425,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -447,7 +447,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/css/test/colorize-results/test_css.json b/extensions/css/test/colorize-results/test_css.json index 1afdf71cd0245..6daa830028e74 100644 --- a/extensions/css/test/colorize-results/test_css.json +++ b/extensions/css/test/colorize-results/test_css.json @@ -238,7 +238,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -249,7 +249,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -315,7 +315,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -326,7 +326,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -348,7 +348,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -425,7 +425,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -436,7 +436,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -458,7 +458,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -887,7 +887,7 @@ "light_plus": "support.constant.font-name: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.font-name: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.font-name: #CE9178" } }, { @@ -920,7 +920,7 @@ "light_plus": "support.constant.font-name: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.font-name: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.font-name: #CE9178" } }, { @@ -1052,7 +1052,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -1063,7 +1063,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -1129,7 +1129,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -1140,7 +1140,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -1162,7 +1162,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1184,7 +1184,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1217,7 +1217,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -1239,7 +1239,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -1261,7 +1261,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -1459,7 +1459,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1481,7 +1481,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -1624,7 +1624,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -1657,7 +1657,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -1679,7 +1679,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -1712,7 +1712,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -1734,7 +1734,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -1932,7 +1932,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1954,7 +1954,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -2075,7 +2075,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2119,7 +2119,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -2350,7 +2350,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -2460,7 +2460,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -2482,7 +2482,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -2537,7 +2537,7 @@ "light_plus": "support.constant.font-name: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.font-name: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.font-name: #CE9178" } }, { @@ -2570,7 +2570,7 @@ "light_plus": "support.constant.font-name: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.font-name: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.font-name: #CE9178" } }, { @@ -2779,7 +2779,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -2790,7 +2790,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -2922,7 +2922,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -2988,7 +2988,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -3054,7 +3054,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -3065,7 +3065,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -3197,7 +3197,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -3263,7 +3263,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -3329,7 +3329,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -3340,7 +3340,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -3406,7 +3406,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -3626,7 +3626,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -3692,7 +3692,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -3703,7 +3703,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -3813,7 +3813,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -3967,7 +3967,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -3989,7 +3989,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4022,7 +4022,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -4044,7 +4044,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -4066,7 +4066,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -4352,7 +4352,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -4693,7 +4693,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -4715,7 +4715,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -4737,7 +4737,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4770,7 +4770,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -4792,7 +4792,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -4814,7 +4814,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -4957,7 +4957,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -5177,7 +5177,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -5320,7 +5320,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -5386,7 +5386,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -5705,7 +5705,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -6024,7 +6024,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -6167,7 +6167,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -6244,7 +6244,7 @@ "light_plus": "support.constant.font-name: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.font-name: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.font-name: #CE9178" } }, { @@ -6310,7 +6310,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -6431,7 +6431,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -6926,7 +6926,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -7344,7 +7344,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -7663,7 +7663,7 @@ "light_plus": "support.constant.font-name: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.font-name: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.font-name: #CE9178" } }, { @@ -7696,7 +7696,7 @@ "light_plus": "support.constant.font-name: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.font-name: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.font-name: #CE9178" } }, { @@ -7762,7 +7762,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -7784,7 +7784,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -7806,7 +7806,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7839,7 +7839,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -7861,7 +7861,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -7883,7 +7883,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -8301,7 +8301,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -8312,7 +8312,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -8642,7 +8642,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -8664,7 +8664,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -8686,7 +8686,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8719,7 +8719,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -8741,7 +8741,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -8763,7 +8763,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -8829,7 +8829,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { diff --git a/extensions/fsharp/test/colorize-results/test_fs.json b/extensions/fsharp/test/colorize-results/test_fs.json index 26bad9ce44162..2f161a6fccc8d 100644 --- a/extensions/fsharp/test/colorize-results/test_fs.json +++ b/extensions/fsharp/test/colorize-results/test_fs.json @@ -51,7 +51,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -117,7 +117,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -293,7 +293,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -392,7 +392,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -590,7 +590,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -744,7 +744,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -766,7 +766,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -865,7 +865,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/go/test/colorize-results/test-13777_go.json b/extensions/go/test/colorize-results/test-13777_go.json index 07d3160e91497..b893f1333e372 100644 --- a/extensions/go/test/colorize-results/test-13777_go.json +++ b/extensions/go/test/colorize-results/test-13777_go.json @@ -29,7 +29,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/go/test/colorize-results/test_go.json b/extensions/go/test/colorize-results/test_go.json index 2004ff9a21962..0aa2e9063d901 100644 --- a/extensions/go/test/colorize-results/test_go.json +++ b/extensions/go/test/colorize-results/test_go.json @@ -194,7 +194,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -249,7 +249,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -337,7 +337,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -425,7 +425,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -458,7 +458,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -513,7 +513,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -634,7 +634,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -722,7 +722,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -832,7 +832,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -887,7 +887,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -975,7 +975,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1085,7 +1085,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { diff --git a/extensions/groovy/test/colorize-results/test_groovy.json b/extensions/groovy/test/colorize-results/test_groovy.json index 7e74addd23e69..ee78a65becc17 100644 --- a/extensions/groovy/test/colorize-results/test_groovy.json +++ b/extensions/groovy/test/colorize-results/test_groovy.json @@ -29,7 +29,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -150,7 +150,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -205,7 +205,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -260,7 +260,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -282,7 +282,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -304,7 +304,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -370,7 +370,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -436,7 +436,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -524,7 +524,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -623,7 +623,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -1437,7 +1437,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1481,7 +1481,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1492,7 +1492,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1569,7 +1569,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1602,7 +1602,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1646,7 +1646,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1679,7 +1679,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1701,7 +1701,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1712,7 +1712,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2207,7 +2207,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -2405,7 +2405,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -2482,7 +2482,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2504,7 +2504,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -2658,7 +2658,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -3274,7 +3274,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -3307,7 +3307,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3318,7 +3318,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3340,7 +3340,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3362,7 +3362,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3373,7 +3373,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3395,7 +3395,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3472,7 +3472,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3505,7 +3505,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3549,7 +3549,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -3582,7 +3582,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3604,7 +3604,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3615,7 +3615,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3670,7 +3670,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3791,7 +3791,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -3879,7 +3879,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -3978,7 +3978,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -4000,7 +4000,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -4121,7 +4121,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -4143,7 +4143,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -4187,7 +4187,7 @@ "light_plus": "storage.type.primitive.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.groovy: #4EC9B0" } }, { @@ -4209,7 +4209,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -4231,7 +4231,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -4253,7 +4253,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4297,7 +4297,7 @@ "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4429,7 +4429,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -4528,7 +4528,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -4583,7 +4583,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -4649,7 +4649,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -4715,7 +4715,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -4737,7 +4737,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -4803,7 +4803,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -4869,7 +4869,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -4902,7 +4902,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -5012,7 +5012,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -5089,7 +5089,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -5298,7 +5298,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5771,7 +5771,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -5826,7 +5826,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6057,7 +6057,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6453,7 +6453,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6596,7 +6596,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -6981,7 +6981,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -7124,7 +7124,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -7432,7 +7432,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -7476,7 +7476,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -7564,7 +7564,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -7652,7 +7652,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -7696,7 +7696,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -7784,7 +7784,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -7839,7 +7839,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7872,7 +7872,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7916,7 +7916,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -8048,7 +8048,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -8125,7 +8125,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -8180,7 +8180,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8246,7 +8246,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -8334,7 +8334,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -8378,7 +8378,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -8510,7 +8510,7 @@ "light_plus": "meta.definition.variable.name: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.definition.variable.name: #9CDCFE" } }, { @@ -8554,7 +8554,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8587,7 +8587,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8851,7 +8851,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -8873,7 +8873,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8906,7 +8906,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9005,7 +9005,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -9148,7 +9148,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -9192,7 +9192,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -9214,7 +9214,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -9478,7 +9478,7 @@ "light_plus": "storage.type.annotation.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.annotation.groovy: #4EC9B0" } }, { @@ -9489,7 +9489,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -9511,7 +9511,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -9566,7 +9566,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -9654,7 +9654,7 @@ "light_plus": "storage.type.object.array.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.object.array.groovy: #4EC9B0" } }, { @@ -9830,7 +9830,7 @@ "light_plus": "storage.type.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.groovy: #4EC9B0" } }, { @@ -9918,7 +9918,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10083,7 +10083,7 @@ "light_plus": "storage.type.annotation.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.annotation.groovy: #4EC9B0" } }, { @@ -10094,7 +10094,7 @@ "light_plus": "storage.type.primitive.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.groovy: #4EC9B0" } }, { @@ -10116,7 +10116,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -10138,7 +10138,7 @@ "light_plus": "storage.type.primitive.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.groovy: #4EC9B0" } }, { @@ -10160,7 +10160,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10193,7 +10193,7 @@ "light_plus": "storage.type.primitive.groovy: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.groovy: #4EC9B0" } }, { @@ -10215,7 +10215,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10303,7 +10303,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/handlebars/test/colorize-results/test_handlebars.json b/extensions/handlebars/test/colorize-results/test_handlebars.json index cdf6cca84ccc3..a14353771e5d8 100644 --- a/extensions/handlebars/test/colorize-results/test_handlebars.json +++ b/extensions/handlebars/test/colorize-results/test_handlebars.json @@ -150,7 +150,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -161,7 +161,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -172,7 +172,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -227,7 +227,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -249,7 +249,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -260,7 +260,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -315,7 +315,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -326,7 +326,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -337,7 +337,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -359,7 +359,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -370,7 +370,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -381,7 +381,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -436,7 +436,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -546,7 +546,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -568,7 +568,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -579,7 +579,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -590,7 +590,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -634,7 +634,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -656,7 +656,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -667,7 +667,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -832,7 +832,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -997,7 +997,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1019,7 +1019,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1030,7 +1030,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1085,7 +1085,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1096,7 +1096,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1107,7 +1107,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1162,7 +1162,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1437,7 +1437,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1459,7 +1459,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1470,7 +1470,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1602,7 +1602,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1613,7 +1613,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1624,7 +1624,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1646,7 +1646,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1657,7 +1657,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1668,7 +1668,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1701,7 +1701,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1712,7 +1712,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1723,7 +1723,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1844,7 +1844,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1855,7 +1855,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1866,7 +1866,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1921,7 +1921,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { diff --git a/extensions/handlebars/test/colorize-results/test_hbs.json b/extensions/handlebars/test/colorize-results/test_hbs.json index c359f0eabc5b6..466499b590c87 100644 --- a/extensions/handlebars/test/colorize-results/test_hbs.json +++ b/extensions/handlebars/test/colorize-results/test_hbs.json @@ -194,7 +194,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -216,7 +216,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -227,7 +227,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -359,7 +359,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -370,7 +370,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -381,7 +381,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -403,7 +403,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -414,7 +414,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -425,7 +425,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string.quoted.double.handlebars: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -458,7 +458,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -469,7 +469,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -480,7 +480,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -601,7 +601,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -612,7 +612,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -623,7 +623,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -678,7 +678,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -733,7 +733,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -744,7 +744,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -755,7 +755,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -777,7 +777,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -788,7 +788,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -799,7 +799,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -821,7 +821,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -832,7 +832,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -843,7 +843,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1052,7 +1052,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1074,7 +1074,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1085,7 +1085,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1140,7 +1140,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1151,7 +1151,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1162,7 +1162,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1184,7 +1184,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1195,7 +1195,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1206,7 +1206,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1261,7 +1261,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1415,7 +1415,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1437,7 +1437,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1459,7 +1459,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name: #9CDCFE", "light_vs": "entity.other.attribute-name: #FF0000", - "hc_black": "entity.other.attribute-name: #9CDCFE" + "hc_black": "variable: #9CDCFE" } }, { @@ -1525,7 +1525,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1635,7 +1635,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1657,7 +1657,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1668,7 +1668,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1690,7 +1690,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1712,7 +1712,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1734,7 +1734,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name: #9CDCFE", "light_vs": "entity.other.attribute-name: #FF0000", - "hc_black": "entity.other.attribute-name: #9CDCFE" + "hc_black": "variable: #9CDCFE" } }, { @@ -1800,7 +1800,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { @@ -1822,7 +1822,7 @@ "light_plus": "support.constant.handlebars: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.handlebars: #DCDCAA" } }, { diff --git a/extensions/hlsl/test/colorize-results/test_hlsl.json b/extensions/hlsl/test/colorize-results/test_hlsl.json index 0f245f64b567e..06022858d4aad 100644 --- a/extensions/hlsl/test/colorize-results/test_hlsl.json +++ b/extensions/hlsl/test/colorize-results/test_hlsl.json @@ -73,7 +73,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -117,7 +117,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -183,7 +183,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -249,7 +249,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/html/test/colorize-results/12750_html.json b/extensions/html/test/colorize-results/12750_html.json index 0e544efdcf8b2..88c372b5581f1 100644 --- a/extensions/html/test/colorize-results/12750_html.json +++ b/extensions/html/test/colorize-results/12750_html.json @@ -117,7 +117,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -139,7 +139,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -304,7 +304,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -326,7 +326,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { diff --git a/extensions/html/test/colorize-results/25920_html.json b/extensions/html/test/colorize-results/25920_html.json index 94298771d7ed5..d8cf7ad33df29 100644 --- a/extensions/html/test/colorize-results/25920_html.json +++ b/extensions/html/test/colorize-results/25920_html.json @@ -458,7 +458,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/html/test/colorize-results/test_html.json b/extensions/html/test/colorize-results/test_html.json index b9b6fbc789bd1..987bfae286c87 100644 --- a/extensions/html/test/colorize-results/test_html.json +++ b/extensions/html/test/colorize-results/test_html.json @@ -645,7 +645,7 @@ "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -711,7 +711,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -722,7 +722,7 @@ "light_plus": "constant.other.color.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.color.rgb-value: #0451A5", - "hc_black": "constant.other.color.rgb-value: #B5CEA8" + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -1459,7 +1459,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1481,7 +1481,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1569,7 +1569,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1591,7 +1591,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1635,7 +1635,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1646,7 +1646,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1723,7 +1723,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1734,7 +1734,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1778,7 +1778,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1789,7 +1789,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1921,7 +1921,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1965,7 +1965,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2108,7 +2108,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2130,7 +2130,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { diff --git a/extensions/java/test/colorize-results/basic_java.json b/extensions/java/test/colorize-results/basic_java.json index 11b55c9a6306c..b3353eabc69ef 100644 --- a/extensions/java/test/colorize-results/basic_java.json +++ b/extensions/java/test/colorize-results/basic_java.json @@ -337,7 +337,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -403,7 +403,7 @@ "light_plus": "storage.type.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.java: #4EC9B0" } }, { @@ -656,7 +656,7 @@ "light_plus": "storage.type.primitive.array.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.array.java: #4EC9B0" } }, { @@ -678,7 +678,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -700,7 +700,7 @@ "light_plus": "storage.type.primitive.array.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.array.java: #4EC9B0" } }, { @@ -722,7 +722,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -777,7 +777,7 @@ "light_plus": "storage.type.primitive.array.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.array.java: #4EC9B0" } }, { @@ -854,7 +854,7 @@ "light_plus": "storage.type.primitive.array.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.array.java: #4EC9B0" } }, { @@ -931,7 +931,7 @@ "light_plus": "storage.type.primitive.array.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.array.java: #4EC9B0" } }, { @@ -1085,7 +1085,7 @@ "light_plus": "storage.type.annotation.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.annotation.java: #4EC9B0" } }, { @@ -1228,7 +1228,7 @@ "light_plus": "storage.type.primitive.array.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.array.java: #4EC9B0" } }, { @@ -1250,7 +1250,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1272,7 +1272,7 @@ "light_plus": "storage.type.primitive.array.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.array.java: #4EC9B0" } }, { @@ -1294,7 +1294,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1338,7 +1338,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1360,7 +1360,7 @@ "light_plus": "storage.type.primitive.array.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.array.java: #4EC9B0" } }, { @@ -1536,7 +1536,7 @@ "light_plus": "storage.type.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.java: #4EC9B0" } }, { @@ -1723,7 +1723,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1833,7 +1833,7 @@ "light_plus": "storage.type.annotation.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.annotation.java: #4EC9B0" } }, { @@ -1877,7 +1877,7 @@ "light_plus": "storage.type.primitive.array.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.array.java: #4EC9B0" } }, { @@ -1899,7 +1899,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1954,7 +1954,7 @@ "light_plus": "storage.type.primitive.array.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.primitive.array.java: #4EC9B0" } }, { @@ -2031,7 +2031,7 @@ "light_plus": "storage.type.generic.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.generic.java: #4EC9B0" } }, { @@ -2042,7 +2042,7 @@ "light_plus": "storage.type.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.java: #4EC9B0" } }, { @@ -2053,7 +2053,7 @@ "light_plus": "storage.type.generic.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.generic.java: #4EC9B0" } }, { @@ -2097,7 +2097,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2119,7 +2119,7 @@ "light_plus": "storage.type.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.java: #4EC9B0" } }, { diff --git a/extensions/javascript/test/colorize-results/test6916_js.json b/extensions/javascript/test/colorize-results/test6916_js.json index 92e3ffc82eb74..a3e9cc286fc26 100644 --- a/extensions/javascript/test/colorize-results/test6916_js.json +++ b/extensions/javascript/test/colorize-results/test6916_js.json @@ -7,7 +7,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -51,7 +51,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -95,7 +95,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -139,7 +139,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -183,7 +183,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -227,7 +227,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -249,7 +249,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -271,7 +271,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -293,7 +293,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -337,7 +337,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -359,7 +359,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -381,7 +381,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -425,7 +425,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -447,7 +447,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -469,7 +469,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/javascript/test/colorize-results/test_js.json b/extensions/javascript/test/colorize-results/test_js.json index afcb74133d9c7..4d2acf6739fc0 100644 --- a/extensions/javascript/test/colorize-results/test_js.json +++ b/extensions/javascript/test/colorize-results/test_js.json @@ -95,7 +95,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -139,7 +139,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -238,7 +238,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -282,7 +282,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -381,7 +381,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -425,7 +425,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -524,7 +524,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -568,7 +568,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -667,7 +667,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -711,7 +711,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -810,7 +810,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -854,7 +854,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -876,7 +876,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -898,7 +898,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -942,7 +942,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -953,7 +953,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1030,7 +1030,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1107,7 +1107,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1140,7 +1140,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1162,7 +1162,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1305,7 +1305,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1327,7 +1327,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1349,7 +1349,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1448,7 +1448,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1459,7 +1459,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1569,7 +1569,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1591,7 +1591,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1635,7 +1635,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1657,7 +1657,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1679,7 +1679,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1778,7 +1778,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1800,7 +1800,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1965,7 +1965,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2009,7 +2009,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2031,7 +2031,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2130,7 +2130,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -2141,7 +2141,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -2251,7 +2251,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2273,7 +2273,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2372,7 +2372,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -2383,7 +2383,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -2493,7 +2493,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2515,7 +2515,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2537,7 +2537,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2559,7 +2559,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2592,7 +2592,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2636,7 +2636,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2658,7 +2658,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2680,7 +2680,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2779,7 +2779,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2801,7 +2801,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2977,7 +2977,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2999,7 +2999,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3054,7 +3054,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3076,7 +3076,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3142,7 +3142,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3219,7 +3219,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3274,7 +3274,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3351,7 +3351,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3395,7 +3395,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3417,7 +3417,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -3450,7 +3450,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3494,7 +3494,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3527,7 +3527,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3593,7 +3593,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3615,7 +3615,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3670,7 +3670,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3692,7 +3692,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3714,7 +3714,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3791,7 +3791,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3813,7 +3813,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/javascript/test/colorize-results/test_jsx.json b/extensions/javascript/test/colorize-results/test_jsx.json index 65e9462cc4056..7a9eb1f5ca044 100644 --- a/extensions/javascript/test/colorize-results/test_jsx.json +++ b/extensions/javascript/test/colorize-results/test_jsx.json @@ -29,7 +29,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -73,7 +73,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -95,7 +95,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -139,7 +139,7 @@ "light_plus": "meta.object-literal.key entity.name.function: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key entity.name.function: #9CDCFE" } }, { @@ -150,7 +150,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -249,7 +249,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -293,7 +293,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -304,7 +304,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -403,7 +403,7 @@ "light_plus": "meta.object-literal.key entity.name.function: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key entity.name.function: #9CDCFE" } }, { @@ -414,7 +414,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -469,7 +469,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -557,7 +557,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -579,7 +579,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -711,7 +711,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -755,7 +755,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -766,7 +766,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -821,7 +821,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -843,7 +843,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -931,7 +931,7 @@ "light_plus": "meta.object-literal.key entity.name.function: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key entity.name.function: #9CDCFE" } }, { @@ -942,7 +942,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -1096,7 +1096,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1162,7 +1162,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1184,7 +1184,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1250,7 +1250,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1316,7 +1316,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1338,7 +1338,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1393,7 +1393,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1459,7 +1459,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1481,7 +1481,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -1536,7 +1536,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1679,7 +1679,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1899,7 +1899,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2108,7 +2108,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2130,7 +2130,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2163,7 +2163,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "entity.name.tag: #569CD6", "light_vs": "entity.name.tag: #800000", - "hc_black": "entity.name.tag: #569CD6" + "hc_black": "support.class: #4EC9B0" } }, { @@ -2350,7 +2350,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -2372,7 +2372,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { diff --git a/extensions/less/test/colorize-results/test-cssvariables_less.json b/extensions/less/test/colorize-results/test-cssvariables_less.json index 787a2e7ba6c73..bca9cd3c3a90c 100644 --- a/extensions/less/test/colorize-results/test-cssvariables_less.json +++ b/extensions/less/test/colorize-results/test-cssvariables_less.json @@ -227,7 +227,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -249,7 +249,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -381,7 +381,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -447,7 +447,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -469,7 +469,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/less/test/colorize-results/test_less.json b/extensions/less/test/colorize-results/test_less.json index 11d728f6f9211..4cc4722023879 100644 --- a/extensions/less/test/colorize-results/test_less.json +++ b/extensions/less/test/colorize-results/test_less.json @@ -7,7 +7,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -18,7 +18,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -84,7 +84,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -95,7 +95,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -183,7 +183,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -194,7 +194,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -348,7 +348,7 @@ "light_plus": "constant.other.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.rgb-value: #0451A5", - "hc_black": "constant.other.rgb-value: #B5CEA8" + "hc_black": "constant.other.rgb-value: #CE9178" } }, { @@ -458,7 +458,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -491,7 +491,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -788,7 +788,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -821,7 +821,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -953,7 +953,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1074,7 +1074,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -1217,7 +1217,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1360,7 +1360,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -1921,7 +1921,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -2174,7 +2174,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -2504,7 +2504,7 @@ "light_plus": "constant.other.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.rgb-value: #0451A5", - "hc_black": "constant.other.rgb-value: #B5CEA8" + "hc_black": "constant.other.rgb-value: #CE9178" } }, { @@ -2559,7 +2559,7 @@ "light_plus": "constant.other.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.rgb-value: #0451A5", - "hc_black": "constant.other.rgb-value: #B5CEA8" + "hc_black": "constant.other.rgb-value: #CE9178" } }, { @@ -3109,7 +3109,7 @@ "light_plus": "constant.other.rgb-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "constant.other.rgb-value: #0451A5", - "hc_black": "constant.other.rgb-value: #B5CEA8" + "hc_black": "constant.other.rgb-value: #CE9178" } }, { @@ -3186,7 +3186,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { diff --git a/extensions/lua/test/colorize-results/test_lua.json b/extensions/lua/test/colorize-results/test_lua.json index 534b5717ac258..6b49d5c15e781 100644 --- a/extensions/lua/test/colorize-results/test_lua.json +++ b/extensions/lua/test/colorize-results/test_lua.json @@ -51,7 +51,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -73,7 +73,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -106,7 +106,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -139,7 +139,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -205,7 +205,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -227,7 +227,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -271,7 +271,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -293,7 +293,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -337,7 +337,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -403,7 +403,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -425,7 +425,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -447,7 +447,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -546,7 +546,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -645,7 +645,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -667,7 +667,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { diff --git a/extensions/make/test/colorize-results/makefile.json b/extensions/make/test/colorize-results/makefile.json index efd8b43342357..01cf41a1d5350 100644 --- a/extensions/make/test/colorize-results/makefile.json +++ b/extensions/make/test/colorize-results/makefile.json @@ -7,7 +7,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -40,7 +40,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -84,7 +84,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -128,7 +128,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -172,7 +172,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -216,7 +216,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -249,7 +249,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -271,7 +271,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -304,7 +304,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "support.function: #DCDCAA" } }, { @@ -337,7 +337,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -392,7 +392,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "support.function: #DCDCAA" } }, { @@ -447,7 +447,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -502,7 +502,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -513,7 +513,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -546,7 +546,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "support.function: #DCDCAA" } }, { @@ -601,7 +601,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -612,7 +612,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -645,7 +645,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -678,7 +678,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -711,7 +711,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "support.function: #DCDCAA" } }, { @@ -766,7 +766,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } } ] \ No newline at end of file diff --git a/extensions/objective-c/test/colorize-results/test_m.json b/extensions/objective-c/test/colorize-results/test_m.json index 542815fa19269..ed1bda084e3a5 100644 --- a/extensions/objective-c/test/colorize-results/test_m.json +++ b/extensions/objective-c/test/colorize-results/test_m.json @@ -51,7 +51,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -62,7 +62,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -117,7 +117,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -128,7 +128,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -271,7 +271,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -293,7 +293,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -315,7 +315,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -326,7 +326,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -337,7 +337,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -348,7 +348,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -370,7 +370,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -414,7 +414,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -458,7 +458,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -480,7 +480,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -491,7 +491,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -502,7 +502,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -546,7 +546,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -579,7 +579,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -634,7 +634,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -799,7 +799,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -865,7 +865,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -953,7 +953,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -1250,7 +1250,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1316,7 +1316,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1448,7 +1448,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1503,7 +1503,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1602,7 +1602,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1932,7 +1932,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -1954,7 +1954,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -1965,7 +1965,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -1976,7 +1976,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1987,7 +1987,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2075,7 +2075,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2097,7 +2097,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2108,7 +2108,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2196,7 +2196,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2383,7 +2383,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "meta.selector: #D7BA7D", "light_vs": "meta.selector: #800000", - "hc_black": "meta.selector: #D7BA7D" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2438,7 +2438,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -2515,7 +2515,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -2658,7 +2658,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2713,7 +2713,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2779,7 +2779,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2823,7 +2823,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/perl/test/colorize-results/test2_pl.json b/extensions/perl/test/colorize-results/test2_pl.json index 550b80232e3c5..ef4bcabf439e2 100644 --- a/extensions/perl/test/colorize-results/test2_pl.json +++ b/extensions/perl/test/colorize-results/test2_pl.json @@ -7,7 +7,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -51,7 +51,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -62,7 +62,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -106,7 +106,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -150,7 +150,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -161,7 +161,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -205,7 +205,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -216,7 +216,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -282,7 +282,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -326,7 +326,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -337,7 +337,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -381,7 +381,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -392,7 +392,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -414,7 +414,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -425,7 +425,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -491,7 +491,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -546,7 +546,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -557,7 +557,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -590,7 +590,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -612,7 +612,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -623,7 +623,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -645,7 +645,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -656,7 +656,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -733,7 +733,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -744,7 +744,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -788,7 +788,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -799,7 +799,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -865,7 +865,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -876,7 +876,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -898,7 +898,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -909,7 +909,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -953,7 +953,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -964,7 +964,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1019,7 +1019,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1041,7 +1041,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1063,7 +1063,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1074,7 +1074,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1151,7 +1151,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1162,7 +1162,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1206,7 +1206,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1228,7 +1228,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1250,7 +1250,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1261,7 +1261,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1360,7 +1360,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1437,7 +1437,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1448,7 +1448,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1470,7 +1470,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1481,7 +1481,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1525,7 +1525,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1536,7 +1536,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1624,7 +1624,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1635,7 +1635,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1679,7 +1679,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1701,7 +1701,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1723,7 +1723,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1734,7 +1734,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1800,7 +1800,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1866,7 +1866,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1877,7 +1877,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1921,7 +1921,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1943,7 +1943,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1965,7 +1965,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1976,7 +1976,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1998,7 +1998,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2020,7 +2020,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2031,7 +2031,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2053,7 +2053,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2064,7 +2064,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2086,7 +2086,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2108,7 +2108,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2119,7 +2119,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2185,7 +2185,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2196,7 +2196,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2218,7 +2218,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2240,7 +2240,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2284,7 +2284,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2339,7 +2339,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2350,7 +2350,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2372,7 +2372,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2383,7 +2383,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2405,7 +2405,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2416,7 +2416,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2460,7 +2460,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2471,7 +2471,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2493,7 +2493,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2504,7 +2504,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2603,7 +2603,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2614,7 +2614,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2636,7 +2636,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2647,7 +2647,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2691,7 +2691,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2713,7 +2713,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2735,7 +2735,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2746,7 +2746,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2768,7 +2768,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2779,7 +2779,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2856,7 +2856,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2922,7 +2922,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2933,7 +2933,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2955,7 +2955,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2966,7 +2966,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3010,7 +3010,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3021,7 +3021,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3054,7 +3054,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3065,7 +3065,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3087,7 +3087,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3098,7 +3098,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3120,7 +3120,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3142,7 +3142,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3153,7 +3153,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3175,7 +3175,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3186,7 +3186,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3263,7 +3263,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3274,7 +3274,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/perl/test/colorize-results/test_pl.json b/extensions/perl/test/colorize-results/test_pl.json index b07bdb97e2056..dd6dc702ac1d3 100644 --- a/extensions/perl/test/colorize-results/test_pl.json +++ b/extensions/perl/test/colorize-results/test_pl.json @@ -7,7 +7,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -51,7 +51,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -62,7 +62,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -106,7 +106,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -172,7 +172,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -183,7 +183,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -205,7 +205,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -216,7 +216,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -238,7 +238,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -249,7 +249,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -315,7 +315,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -337,7 +337,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -348,7 +348,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -546,7 +546,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -568,7 +568,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -579,7 +579,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -634,7 +634,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -744,7 +744,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -755,7 +755,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -832,7 +832,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -865,7 +865,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -876,7 +876,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -898,7 +898,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -909,7 +909,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -931,7 +931,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -942,7 +942,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1129,7 +1129,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1195,7 +1195,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1206,7 +1206,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1228,7 +1228,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1239,7 +1239,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1272,7 +1272,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1294,7 +1294,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1316,7 +1316,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1327,7 +1327,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1371,7 +1371,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1415,7 +1415,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1426,7 +1426,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1503,7 +1503,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1580,7 +1580,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1591,7 +1591,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1624,7 +1624,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1646,7 +1646,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1657,7 +1657,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1723,7 +1723,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1745,7 +1745,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1756,7 +1756,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1811,7 +1811,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1822,7 +1822,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1844,7 +1844,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1855,7 +1855,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1910,7 +1910,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1987,7 +1987,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2031,7 +2031,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2042,7 +2042,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2064,7 +2064,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2086,7 +2086,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2097,7 +2097,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2141,7 +2141,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2152,7 +2152,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2185,7 +2185,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2207,7 +2207,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2218,7 +2218,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2240,7 +2240,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { diff --git a/extensions/php/test/colorize-results/test_php.json b/extensions/php/test/colorize-results/test_php.json index ee3715fefceb3..4cf717c50c304 100644 --- a/extensions/php/test/colorize-results/test_php.json +++ b/extensions/php/test/colorize-results/test_php.json @@ -271,7 +271,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -447,7 +447,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -458,7 +458,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -502,7 +502,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -909,7 +909,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -931,7 +931,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -975,7 +975,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -997,7 +997,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1008,7 +1008,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1085,7 +1085,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1096,7 +1096,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1173,7 +1173,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1184,7 +1184,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1239,7 +1239,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1250,7 +1250,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1294,7 +1294,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1316,7 +1316,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1327,7 +1327,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1371,7 +1371,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1382,7 +1382,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1426,7 +1426,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1459,7 +1459,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1470,7 +1470,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1514,7 +1514,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1536,7 +1536,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1547,7 +1547,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1569,7 +1569,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1580,7 +1580,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1690,7 +1690,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1701,7 +1701,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1767,7 +1767,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1811,7 +1811,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1822,7 +1822,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1888,7 +1888,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1899,7 +1899,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1921,7 +1921,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1932,7 +1932,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1976,7 +1976,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1987,7 +1987,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2009,7 +2009,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2020,7 +2020,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2163,7 +2163,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2185,7 +2185,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2229,7 +2229,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2240,7 +2240,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2284,7 +2284,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2361,7 +2361,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2405,7 +2405,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2416,7 +2416,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2515,7 +2515,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2537,7 +2537,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2548,7 +2548,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2625,7 +2625,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2636,7 +2636,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2713,7 +2713,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2724,7 +2724,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2779,7 +2779,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2801,7 +2801,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2812,7 +2812,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2900,7 +2900,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2911,7 +2911,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3010,7 +3010,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -3054,7 +3054,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3065,7 +3065,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3087,7 +3087,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3098,7 +3098,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -3175,7 +3175,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3186,7 +3186,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/powershell/test/colorize-results/test_ps1.json b/extensions/powershell/test/colorize-results/test_ps1.json index 794ed90dcf4aa..bce680fee4026 100644 --- a/extensions/powershell/test/colorize-results/test_ps1.json +++ b/extensions/powershell/test/colorize-results/test_ps1.json @@ -40,7 +40,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -73,7 +73,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -117,7 +117,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -216,7 +216,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -260,7 +260,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -315,7 +315,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -337,7 +337,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -370,7 +370,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -381,7 +381,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -458,7 +458,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -491,7 +491,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -623,7 +623,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -667,7 +667,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -766,7 +766,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name: #9CDCFE", "light_vs": "entity.other.attribute-name: #FF0000", - "hc_black": "entity.other.attribute-name: #9CDCFE" + "hc_black": "variable: #9CDCFE" } }, { @@ -821,7 +821,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -865,7 +865,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -920,7 +920,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -986,7 +986,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1041,7 +1041,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1382,7 +1382,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1459,7 +1459,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1514,7 +1514,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1569,7 +1569,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1690,7 +1690,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -1701,7 +1701,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1745,7 +1745,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1822,7 +1822,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -1833,7 +1833,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1855,7 +1855,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1888,7 +1888,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1954,7 +1954,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -1965,7 +1965,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2031,7 +2031,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2075,7 +2075,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2119,7 +2119,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2174,7 +2174,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2273,7 +2273,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -2284,7 +2284,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2328,7 +2328,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2350,7 +2350,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2405,7 +2405,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/pug/test/colorize-results/test_pug.json b/extensions/pug/test/colorize-results/test_pug.json index 69bd4db3a9c99..ad73e9dbaf597 100644 --- a/extensions/pug/test/colorize-results/test_pug.json +++ b/extensions/pug/test/colorize-results/test_pug.json @@ -315,7 +315,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -337,7 +337,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -612,7 +612,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -634,7 +634,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -678,7 +678,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -744,7 +744,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -755,7 +755,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -854,7 +854,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -964,7 +964,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string.interpolated.jade: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -986,7 +986,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string.interpolated.jade: #0000FF", - "hc_black": "string: #CE9178" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -1602,7 +1602,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1646,7 +1646,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1668,7 +1668,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1778,7 +1778,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { diff --git a/extensions/python/test/colorize-results/test_py.json b/extensions/python/test/colorize-results/test_py.json index 081349fd61be2..5d58f2c7297a4 100644 --- a/extensions/python/test/colorize-results/test_py.json +++ b/extensions/python/test/colorize-results/test_py.json @@ -7,7 +7,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -29,7 +29,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -84,7 +84,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -216,7 +216,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -238,7 +238,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -271,7 +271,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -458,7 +458,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -480,7 +480,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -579,7 +579,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -667,7 +667,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -689,7 +689,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -744,7 +744,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -854,7 +854,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -942,7 +942,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1030,7 +1030,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1162,7 +1162,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1173,7 +1173,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1921,7 +1921,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1976,7 +1976,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1998,7 +1998,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2031,7 +2031,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2075,7 +2075,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2119,7 +2119,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -2185,7 +2185,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2240,7 +2240,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2284,7 +2284,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2306,7 +2306,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3175,7 +3175,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3197,7 +3197,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3285,7 +3285,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3406,7 +3406,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3747,7 +3747,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3890,7 +3890,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3934,7 +3934,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3956,7 +3956,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3989,7 +3989,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4033,7 +4033,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4077,7 +4077,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -4242,7 +4242,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -4341,7 +4341,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -4396,7 +4396,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -4418,7 +4418,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4451,7 +4451,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4495,7 +4495,7 @@ "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4550,7 +4550,7 @@ "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4649,7 +4649,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -4671,7 +4671,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4715,7 +4715,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4759,7 +4759,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -4825,7 +4825,7 @@ "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4869,7 +4869,7 @@ "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4968,7 +4968,7 @@ "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5056,7 +5056,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5078,7 +5078,7 @@ "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5496,7 +5496,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5551,7 +5551,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5606,7 +5606,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5705,7 +5705,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -5760,7 +5760,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5782,7 +5782,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5804,7 +5804,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -5837,7 +5837,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -5903,7 +5903,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5925,7 +5925,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5969,7 +5969,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6585,7 +6585,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6618,7 +6618,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6651,7 +6651,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/r/test/colorize-results/test_r.json b/extensions/r/test/colorize-results/test_r.json index bcd1217fd331e..545fbd4b31fac 100644 --- a/extensions/r/test/colorize-results/test_r.json +++ b/extensions/r/test/colorize-results/test_r.json @@ -205,7 +205,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -249,7 +249,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -271,7 +271,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -293,7 +293,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -337,7 +337,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -381,7 +381,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/razor/test/colorize-results/test_cshtml.json b/extensions/razor/test/colorize-results/test_cshtml.json index 8c8c54c9830e5..b87c41d8f04a8 100644 --- a/extensions/razor/test/colorize-results/test_cshtml.json +++ b/extensions/razor/test/colorize-results/test_cshtml.json @@ -7,7 +7,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -40,7 +40,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -62,7 +62,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -84,7 +84,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -117,7 +117,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -139,7 +139,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -227,7 +227,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -249,7 +249,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -326,7 +326,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -348,7 +348,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -392,7 +392,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -425,7 +425,7 @@ "light_plus": "storage.type.cs: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.cs: #4EC9B0" } }, { @@ -480,7 +480,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -502,7 +502,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -546,7 +546,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -579,7 +579,7 @@ "light_plus": "storage.type.cs: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "hc_black": "storage.type.cs: #4EC9B0" } }, { @@ -667,7 +667,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -711,7 +711,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -799,7 +799,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -887,7 +887,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -909,7 +909,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -931,7 +931,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1041,7 +1041,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1085,7 +1085,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1118,7 +1118,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3164,7 +3164,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3318,7 +3318,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3340,7 +3340,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/ruby/test/colorize-results/test_rb.json b/extensions/ruby/test/colorize-results/test_rb.json index 0a64f6f6aed05..5b3da189b4744 100644 --- a/extensions/ruby/test/colorize-results/test_rb.json +++ b/extensions/ruby/test/colorize-results/test_rb.json @@ -95,7 +95,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -117,7 +117,7 @@ "light_plus": "entity.other.inherited-class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.other.inherited-class: #4EC9B0" } }, { @@ -128,7 +128,7 @@ "light_plus": "entity.other.inherited-class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.other.inherited-class: #4EC9B0" } }, { @@ -139,7 +139,7 @@ "light_plus": "entity.other.inherited-class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.other.inherited-class: #4EC9B0" } }, { @@ -150,7 +150,7 @@ "light_plus": "entity.other.inherited-class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.other.inherited-class: #4EC9B0" } }, { @@ -161,7 +161,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -260,7 +260,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -282,7 +282,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -326,7 +326,7 @@ "light_plus": "entity.other.inherited-class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.other.inherited-class: #4EC9B0" } }, { @@ -370,7 +370,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -392,7 +392,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -414,7 +414,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -436,7 +436,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -480,7 +480,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -766,7 +766,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -788,7 +788,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -810,7 +810,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -832,7 +832,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -898,7 +898,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -975,7 +975,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1052,7 +1052,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1063,7 +1063,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1195,7 +1195,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1272,7 +1272,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1349,7 +1349,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1426,7 +1426,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1481,7 +1481,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -1503,7 +1503,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1536,7 +1536,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1547,7 +1547,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1602,7 +1602,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1613,7 +1613,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1657,7 +1657,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -1701,7 +1701,7 @@ "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1734,7 +1734,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1745,7 +1745,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1789,7 +1789,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -1833,7 +1833,7 @@ "light_plus": "variable.language: #0000FF", "dark_vs": "variable.language: #569CD6", "light_vs": "variable.language: #0000FF", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1866,7 +1866,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1877,7 +1877,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1965,7 +1965,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1976,7 +1976,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2042,7 +2042,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2053,7 +2053,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2119,7 +2119,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2141,7 +2141,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -2273,7 +2273,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -2328,7 +2328,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2416,7 +2416,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2801,7 +2801,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2823,7 +2823,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2834,7 +2834,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } } ] \ No newline at end of file diff --git a/extensions/rust/test/colorize-results/test-6611_rs.json b/extensions/rust/test/colorize-results/test-6611_rs.json index 5136a3a57d5f6..d397562ce5c08 100644 --- a/extensions/rust/test/colorize-results/test-6611_rs.json +++ b/extensions/rust/test/colorize-results/test-6611_rs.json @@ -304,7 +304,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -414,7 +414,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -513,7 +513,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -601,7 +601,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { diff --git a/extensions/rust/test/colorize-results/test_rs.json b/extensions/rust/test/colorize-results/test_rs.json index cc273390c6270..977fe6bd28c2c 100644 --- a/extensions/rust/test/colorize-results/test_rs.json +++ b/extensions/rust/test/colorize-results/test_rs.json @@ -73,7 +73,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -106,7 +106,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -161,7 +161,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -304,7 +304,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -348,7 +348,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -370,7 +370,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -436,7 +436,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -469,7 +469,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -524,7 +524,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { diff --git a/extensions/scss/test/colorize-results/test-cssvariables_scss.json b/extensions/scss/test/colorize-results/test-cssvariables_scss.json index caf9d121a466b..ff30ea6b97344 100644 --- a/extensions/scss/test/colorize-results/test-cssvariables_scss.json +++ b/extensions/scss/test/colorize-results/test-cssvariables_scss.json @@ -227,7 +227,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -381,7 +381,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -447,7 +447,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { diff --git a/extensions/scss/test/colorize-results/test_scss.json b/extensions/scss/test/colorize-results/test_scss.json index 94003b0d8262f..4f699f59ebfca 100644 --- a/extensions/scss/test/colorize-results/test_scss.json +++ b/extensions/scss/test/colorize-results/test_scss.json @@ -95,7 +95,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -106,7 +106,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -557,7 +557,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -898,7 +898,7 @@ "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -1008,7 +1008,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -1140,7 +1140,7 @@ "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -1569,7 +1569,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -2548,7 +2548,7 @@ "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -2735,7 +2735,7 @@ "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -3362,7 +3362,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3384,7 +3384,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3406,7 +3406,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3428,7 +3428,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3538,7 +3538,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -3582,7 +3582,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -3604,7 +3604,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -3648,7 +3648,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3670,7 +3670,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3714,7 +3714,7 @@ "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -3846,7 +3846,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -4671,7 +4671,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -4759,7 +4759,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -4781,7 +4781,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -4803,7 +4803,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -4825,7 +4825,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -4913,7 +4913,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -5100,7 +5100,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -5133,7 +5133,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5199,7 +5199,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5276,7 +5276,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5518,7 +5518,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5529,7 +5529,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5551,7 +5551,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -5628,7 +5628,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5639,7 +5639,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5980,7 +5980,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -6090,7 +6090,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6101,7 +6101,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6200,7 +6200,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -6277,7 +6277,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6288,7 +6288,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6354,7 +6354,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -6398,7 +6398,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -6420,7 +6420,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -6519,7 +6519,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6530,7 +6530,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6772,7 +6772,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6783,7 +6783,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6805,7 +6805,7 @@ "light_plus": "support.constant.media: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.media: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.media: #CE9178" } }, { @@ -6893,7 +6893,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -7377,7 +7377,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -7388,7 +7388,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -7630,7 +7630,7 @@ "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -7696,7 +7696,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -7861,7 +7861,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -7872,7 +7872,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -7993,7 +7993,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8004,7 +8004,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8037,7 +8037,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8048,7 +8048,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8070,7 +8070,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -8169,7 +8169,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8180,7 +8180,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8202,7 +8202,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -8279,7 +8279,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8290,7 +8290,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8334,7 +8334,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -8356,7 +8356,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -8554,7 +8554,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8565,7 +8565,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8587,7 +8587,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -8664,7 +8664,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8675,7 +8675,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8719,7 +8719,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -8741,7 +8741,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -8972,7 +8972,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -9247,7 +9247,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -9258,7 +9258,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -9478,7 +9478,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -9533,7 +9533,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -9544,7 +9544,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -9720,7 +9720,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -9775,7 +9775,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -9786,7 +9786,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -9896,7 +9896,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -10072,7 +10072,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10083,7 +10083,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10204,7 +10204,7 @@ "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -10259,7 +10259,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10270,7 +10270,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10336,7 +10336,7 @@ "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -10424,7 +10424,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10435,7 +10435,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10479,7 +10479,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10523,7 +10523,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10611,7 +10611,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -10633,7 +10633,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -10853,7 +10853,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10864,7 +10864,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10908,7 +10908,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -10985,7 +10985,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -11007,7 +11007,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -11095,7 +11095,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -11139,7 +11139,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -11161,7 +11161,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -11326,7 +11326,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -11337,7 +11337,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -11469,7 +11469,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -11491,7 +11491,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -11821,7 +11821,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -11832,7 +11832,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -11854,7 +11854,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -11964,7 +11964,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -11975,7 +11975,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12019,7 +12019,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12063,7 +12063,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12129,7 +12129,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12140,7 +12140,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12173,7 +12173,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -12525,7 +12525,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12536,7 +12536,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12657,7 +12657,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12668,7 +12668,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12756,7 +12756,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12767,7 +12767,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -12789,7 +12789,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -12910,7 +12910,7 @@ "light_plus": "support.constant.font-name: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.font-name: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.font-name: #CE9178" } }, { @@ -13053,7 +13053,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -13240,7 +13240,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -13251,7 +13251,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -13273,7 +13273,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -13416,7 +13416,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -13427,7 +13427,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -13449,7 +13449,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -13801,7 +13801,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -13900,7 +13900,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -13911,7 +13911,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -13933,7 +13933,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -13955,7 +13955,7 @@ "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -14032,7 +14032,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -14043,7 +14043,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -14065,7 +14065,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -14406,7 +14406,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -14417,7 +14417,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -14439,7 +14439,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -14780,7 +14780,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -14791,7 +14791,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -14813,7 +14813,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -15308,7 +15308,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15319,7 +15319,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15341,7 +15341,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -15451,7 +15451,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15462,7 +15462,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15484,7 +15484,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -15594,7 +15594,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15649,7 +15649,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15660,7 +15660,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15682,7 +15682,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -15814,7 +15814,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -15847,7 +15847,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -15913,7 +15913,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15924,7 +15924,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -15990,7 +15990,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -16001,7 +16001,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -16023,7 +16023,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -16375,7 +16375,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -16386,7 +16386,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -16408,7 +16408,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -16859,7 +16859,7 @@ "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -16903,7 +16903,7 @@ "light_plus": "support.constant.property-value: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.property-value: #0451A5", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.property-value: #CE9178" } }, { @@ -17002,7 +17002,7 @@ "light_plus": "support.constant.color: #0451A5", "dark_vs": "default: #D4D4D4", "light_vs": "support.constant.color: #0451A5", - "hc_black": "support.constant.color: #B5CEA8" + "hc_black": "support.constant.color: #CE9178" } }, { @@ -17189,7 +17189,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -17277,7 +17277,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -17288,7 +17288,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -17310,7 +17310,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -17409,7 +17409,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -17420,7 +17420,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -17442,7 +17442,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -17464,7 +17464,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -17497,7 +17497,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -17508,7 +17508,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -17530,7 +17530,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -17552,7 +17552,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -17871,7 +17871,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -17882,7 +17882,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -17904,7 +17904,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -18025,7 +18025,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -18036,7 +18036,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -18179,7 +18179,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -18333,7 +18333,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -18355,7 +18355,7 @@ "light_plus": "variable: #001080", "dark_vs": "entity.other.attribute-name.class.css: #D7BA7D", "light_vs": "entity.other.attribute-name.class.css: #800000", - "hc_black": "entity.other.attribute-name.class.css: #D7BA7D" + "hc_black": "variable: #9CDCFE" } }, { @@ -18410,7 +18410,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -18432,7 +18432,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -18520,7 +18520,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -18542,7 +18542,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -18608,7 +18608,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -18630,7 +18630,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -18652,7 +18652,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -18674,7 +18674,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -18751,7 +18751,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -18773,7 +18773,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -18883,7 +18883,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -18894,7 +18894,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -19202,7 +19202,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -19213,7 +19213,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -19818,7 +19818,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -19829,7 +19829,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -19851,7 +19851,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { diff --git a/extensions/shaderlab/test/colorize-results/test_shader.json b/extensions/shaderlab/test/colorize-results/test_shader.json index 2769b1e9713d8..7f731af089fd2 100644 --- a/extensions/shaderlab/test/colorize-results/test_shader.json +++ b/extensions/shaderlab/test/colorize-results/test_shader.json @@ -95,7 +95,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -238,7 +238,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -293,7 +293,7 @@ "light_plus": "support.variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.variable: #9CDCFE" } }, { @@ -359,7 +359,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -381,7 +381,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -425,7 +425,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -535,7 +535,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { diff --git a/extensions/shellscript/test/colorize-results/test_sh.json b/extensions/shellscript/test/colorize-results/test_sh.json index 93acd4ac00c8e..3bb5e394f1e9f 100644 --- a/extensions/shellscript/test/colorize-results/test_sh.json +++ b/extensions/shellscript/test/colorize-results/test_sh.json @@ -29,7 +29,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -84,7 +84,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -95,7 +95,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -238,7 +238,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -260,7 +260,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -337,7 +337,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -348,7 +348,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -458,7 +458,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -491,7 +491,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -502,7 +502,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -557,7 +557,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -590,7 +590,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -601,7 +601,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -623,7 +623,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -634,7 +634,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -656,7 +656,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -678,7 +678,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -821,7 +821,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -832,7 +832,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -887,7 +887,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -975,7 +975,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -986,7 +986,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1030,7 +1030,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1151,7 +1151,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1206,7 +1206,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1228,7 +1228,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1239,7 +1239,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1294,7 +1294,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1448,7 +1448,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1503,7 +1503,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1514,7 +1514,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1657,7 +1657,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1679,7 +1679,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1701,7 +1701,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1734,7 +1734,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1745,7 +1745,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1778,7 +1778,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1800,7 +1800,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1822,7 +1822,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1855,7 +1855,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1866,7 +1866,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1899,7 +1899,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1943,7 +1943,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -1954,7 +1954,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/sql/test/colorize-results/test_sql.json b/extensions/sql/test/colorize-results/test_sql.json index a17bd7e32f7f3..7b133d4de64bb 100644 --- a/extensions/sql/test/colorize-results/test_sql.json +++ b/extensions/sql/test/colorize-results/test_sql.json @@ -51,7 +51,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { diff --git a/extensions/swift/test/colorize-results/test_swift.json b/extensions/swift/test/colorize-results/test_swift.json index 2da06bcd479f2..f421ae1fba8e1 100644 --- a/extensions/swift/test/colorize-results/test_swift.json +++ b/extensions/swift/test/colorize-results/test_swift.json @@ -161,7 +161,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -216,7 +216,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -227,7 +227,7 @@ "light_plus": "meta.return-type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.return-type: #4EC9B0" } }, { @@ -238,7 +238,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { diff --git a/extensions/typescript/test/colorize-results/test-brackets_tsx.json b/extensions/typescript/test/colorize-results/test-brackets_tsx.json index 26c893e42af1a..92fe70a1da2df 100644 --- a/extensions/typescript/test/colorize-results/test-brackets_tsx.json +++ b/extensions/typescript/test/colorize-results/test-brackets_tsx.json @@ -29,7 +29,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -73,7 +73,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -95,7 +95,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -194,7 +194,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -238,7 +238,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -271,7 +271,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -293,7 +293,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -359,7 +359,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/typescript/test/colorize-results/test-function-inv_ts.json b/extensions/typescript/test/colorize-results/test-function-inv_ts.json index 5e3326255f764..c99ec3d0ce263 100644 --- a/extensions/typescript/test/colorize-results/test-function-inv_ts.json +++ b/extensions/typescript/test/colorize-results/test-function-inv_ts.json @@ -7,7 +7,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -29,7 +29,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -51,7 +51,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -95,7 +95,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -117,7 +117,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -150,7 +150,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/typescript/test/colorize-results/test-issue11_ts.json b/extensions/typescript/test/colorize-results/test-issue11_ts.json index dec1231bd198f..c7ee2e71f2126 100644 --- a/extensions/typescript/test/colorize-results/test-issue11_ts.json +++ b/extensions/typescript/test/colorize-results/test-issue11_ts.json @@ -29,7 +29,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -95,7 +95,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -139,7 +139,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -238,7 +238,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -304,7 +304,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -370,7 +370,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -425,7 +425,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -480,7 +480,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -535,7 +535,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -590,7 +590,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -645,7 +645,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -700,7 +700,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -755,7 +755,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -810,7 +810,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -865,7 +865,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -920,7 +920,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -975,7 +975,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1030,7 +1030,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1085,7 +1085,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1162,7 +1162,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1217,7 +1217,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1316,7 +1316,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1426,7 +1426,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1503,7 +1503,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1723,7 +1723,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -1745,7 +1745,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -1778,7 +1778,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -1866,7 +1866,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -1888,7 +1888,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -1954,7 +1954,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2042,7 +2042,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -2152,7 +2152,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2229,7 +2229,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2306,7 +2306,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -2328,7 +2328,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2405,7 +2405,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2482,7 +2482,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2515,7 +2515,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2548,7 +2548,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2592,7 +2592,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -2647,7 +2647,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -2680,7 +2680,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2735,7 +2735,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2768,7 +2768,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2790,7 +2790,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2834,7 +2834,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2867,7 +2867,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2911,7 +2911,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -2966,7 +2966,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3252,7 +3252,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3340,7 +3340,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3362,7 +3362,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { diff --git a/extensions/typescript/test/colorize-results/test-issue5431_ts.json b/extensions/typescript/test/colorize-results/test-issue5431_ts.json index 8f699a350f53f..9d1dd3c555b92 100644 --- a/extensions/typescript/test/colorize-results/test-issue5431_ts.json +++ b/extensions/typescript/test/colorize-results/test-issue5431_ts.json @@ -29,7 +29,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -51,7 +51,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -84,7 +84,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -117,7 +117,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -194,7 +194,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -238,7 +238,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -370,7 +370,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -414,7 +414,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -469,7 +469,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/typescript/test/colorize-results/test-issue5465_ts.json b/extensions/typescript/test/colorize-results/test-issue5465_ts.json index f43dc3fba2991..f4a61d6e1ac21 100644 --- a/extensions/typescript/test/colorize-results/test-issue5465_ts.json +++ b/extensions/typescript/test/colorize-results/test-issue5465_ts.json @@ -40,7 +40,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -106,7 +106,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -183,7 +183,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/typescript/test/colorize-results/test-issue5566_ts.json b/extensions/typescript/test/colorize-results/test-issue5566_ts.json index 1d4071b8100f9..86357c7c0cde4 100644 --- a/extensions/typescript/test/colorize-results/test-issue5566_ts.json +++ b/extensions/typescript/test/colorize-results/test-issue5566_ts.json @@ -29,7 +29,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -117,7 +117,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -205,7 +205,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -315,7 +315,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { diff --git a/extensions/typescript/test/colorize-results/test-keywords_ts.json b/extensions/typescript/test/colorize-results/test-keywords_ts.json index ac1e6e571f76e..016639c505ded 100644 --- a/extensions/typescript/test/colorize-results/test-keywords_ts.json +++ b/extensions/typescript/test/colorize-results/test-keywords_ts.json @@ -7,7 +7,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -51,7 +51,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -172,7 +172,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { diff --git a/extensions/typescript/test/colorize-results/test-members_ts.json b/extensions/typescript/test/colorize-results/test-members_ts.json index e6937242dc4f7..05e924b9c13ed 100644 --- a/extensions/typescript/test/colorize-results/test-members_ts.json +++ b/extensions/typescript/test/colorize-results/test-members_ts.json @@ -29,7 +29,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -73,7 +73,7 @@ "light_plus": "entity.other.inherited-class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.other.inherited-class: #4EC9B0" } }, { @@ -139,7 +139,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -172,7 +172,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -271,7 +271,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -293,7 +293,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -337,7 +337,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { diff --git a/extensions/typescript/test/colorize-results/test-object-literals_ts.json b/extensions/typescript/test/colorize-results/test-object-literals_ts.json index 36b795a88e5ad..1b5123075e022 100644 --- a/extensions/typescript/test/colorize-results/test-object-literals_ts.json +++ b/extensions/typescript/test/colorize-results/test-object-literals_ts.json @@ -29,7 +29,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -95,7 +95,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -106,7 +106,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -150,7 +150,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -161,7 +161,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -183,7 +183,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -216,7 +216,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { @@ -227,7 +227,7 @@ "light_plus": "meta.object-literal.key: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "meta.object-literal.key: #9CDCFE" } }, { diff --git a/extensions/typescript/test/colorize-results/test-strings_ts.json b/extensions/typescript/test/colorize-results/test-strings_ts.json index c3486c526ff75..fd42a3a393069 100644 --- a/extensions/typescript/test/colorize-results/test-strings_ts.json +++ b/extensions/typescript/test/colorize-results/test-strings_ts.json @@ -29,7 +29,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -106,7 +106,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -161,7 +161,7 @@ "light_plus": "support.class: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.class: #4EC9B0" } }, { @@ -183,7 +183,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -271,7 +271,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -315,7 +315,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -370,7 +370,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -414,7 +414,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -480,7 +480,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { @@ -524,7 +524,7 @@ "light_plus": "variable: #001080", "dark_vs": "string: #CE9178", "light_vs": "string: #A31515", - "hc_black": "string: #CE9178" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/typescript/test/colorize-results/test-this_ts.json b/extensions/typescript/test/colorize-results/test-this_ts.json index 0efe6a8d69cd3..bb626c7e1006d 100644 --- a/extensions/typescript/test/colorize-results/test-this_ts.json +++ b/extensions/typescript/test/colorize-results/test-this_ts.json @@ -51,7 +51,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { diff --git a/extensions/typescript/test/colorize-results/test_ts.json b/extensions/typescript/test/colorize-results/test_ts.json index d407ffa3a5bb1..72fb99dba539e 100644 --- a/extensions/typescript/test/colorize-results/test_ts.json +++ b/extensions/typescript/test/colorize-results/test_ts.json @@ -95,7 +95,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -139,7 +139,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -183,7 +183,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -249,7 +249,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -282,7 +282,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -337,7 +337,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -370,7 +370,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -425,7 +425,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -458,7 +458,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -513,7 +513,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -546,7 +546,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -579,7 +579,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -612,7 +612,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -645,7 +645,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -678,7 +678,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -755,7 +755,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -799,7 +799,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -854,7 +854,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -898,7 +898,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -953,7 +953,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -997,7 +997,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1063,7 +1063,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1107,7 +1107,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -1173,7 +1173,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1206,7 +1206,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1261,7 +1261,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1294,7 +1294,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1349,7 +1349,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1382,7 +1382,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1437,7 +1437,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1470,7 +1470,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1525,7 +1525,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1558,7 +1558,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1613,7 +1613,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1646,7 +1646,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1701,7 +1701,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1734,7 +1734,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1789,7 +1789,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1822,7 +1822,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -1877,7 +1877,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1998,7 +1998,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2097,7 +2097,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2196,7 +2196,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2317,7 +2317,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2438,7 +2438,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2559,7 +2559,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2680,7 +2680,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2779,7 +2779,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2878,7 +2878,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2944,7 +2944,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3010,7 +3010,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3098,7 +3098,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3164,7 +3164,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3208,7 +3208,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3252,7 +3252,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3296,7 +3296,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -3373,7 +3373,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3395,7 +3395,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3439,7 +3439,7 @@ "light_plus": "support.constant.math: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.constant.math: #4EC9B0" } }, { @@ -3461,7 +3461,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -3538,7 +3538,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3571,7 +3571,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -3593,7 +3593,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3714,7 +3714,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3780,7 +3780,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -3846,7 +3846,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3912,7 +3912,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -3956,7 +3956,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -3989,7 +3989,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -4066,7 +4066,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4132,7 +4132,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4154,7 +4154,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4176,7 +4176,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4198,7 +4198,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4220,7 +4220,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4286,7 +4286,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -4308,7 +4308,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4352,7 +4352,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -4396,7 +4396,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -4418,7 +4418,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4506,7 +4506,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -4627,7 +4627,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -4704,7 +4704,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4792,7 +4792,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -4814,7 +4814,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -4858,7 +4858,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -4935,7 +4935,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5001,7 +5001,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -5023,7 +5023,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5089,7 +5089,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5155,7 +5155,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -5177,7 +5177,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5199,7 +5199,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5232,7 +5232,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5254,7 +5254,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5287,7 +5287,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5309,7 +5309,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5353,7 +5353,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5375,7 +5375,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5463,7 +5463,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5540,7 +5540,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5562,7 +5562,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5639,7 +5639,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5661,7 +5661,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5683,7 +5683,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5760,7 +5760,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5782,7 +5782,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5859,7 +5859,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -5881,7 +5881,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -5958,7 +5958,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -5980,7 +5980,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6024,7 +6024,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -6101,7 +6101,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6178,7 +6178,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6222,7 +6222,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6310,7 +6310,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6376,7 +6376,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6442,7 +6442,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6486,7 +6486,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6574,7 +6574,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6651,7 +6651,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6717,7 +6717,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6739,7 +6739,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6827,7 +6827,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -6904,7 +6904,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6937,7 +6937,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -6981,7 +6981,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -7003,7 +7003,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7025,7 +7025,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7069,7 +7069,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7102,7 +7102,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7124,7 +7124,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7168,7 +7168,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7223,7 +7223,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7333,7 +7333,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -7355,7 +7355,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7432,7 +7432,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -7454,7 +7454,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7498,7 +7498,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -7531,7 +7531,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7575,7 +7575,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -7630,7 +7630,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -7652,7 +7652,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7740,7 +7740,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7828,7 +7828,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7894,7 +7894,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -7938,7 +7938,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8004,7 +8004,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8037,7 +8037,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8092,7 +8092,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8136,7 +8136,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8158,7 +8158,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8180,7 +8180,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8213,7 +8213,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8290,7 +8290,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -8312,7 +8312,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8389,7 +8389,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8466,7 +8466,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8510,7 +8510,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8587,7 +8587,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8653,7 +8653,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8686,7 +8686,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8774,7 +8774,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8851,7 +8851,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -8895,7 +8895,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -8972,7 +8972,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9038,7 +9038,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9071,7 +9071,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9137,7 +9137,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9159,7 +9159,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -9181,7 +9181,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -9225,7 +9225,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -9247,7 +9247,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9280,7 +9280,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9390,7 +9390,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9412,7 +9412,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -9434,7 +9434,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9500,7 +9500,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -9522,7 +9522,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9599,7 +9599,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -9621,7 +9621,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9665,7 +9665,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -9720,7 +9720,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -9764,7 +9764,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9863,7 +9863,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9929,7 +9929,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -9973,7 +9973,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10028,7 +10028,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10050,7 +10050,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10116,7 +10116,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10171,7 +10171,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10193,7 +10193,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -10215,7 +10215,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10237,7 +10237,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10303,7 +10303,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10336,7 +10336,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10358,7 +10358,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10402,7 +10402,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10457,7 +10457,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10512,7 +10512,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10578,7 +10578,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10600,7 +10600,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10644,7 +10644,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10666,7 +10666,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10732,7 +10732,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10798,7 +10798,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10853,7 +10853,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10875,7 +10875,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -10897,7 +10897,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10919,7 +10919,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -10985,7 +10985,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -11018,7 +11018,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -11040,7 +11040,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -11084,7 +11084,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -11139,7 +11139,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -11194,7 +11194,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -11304,7 +11304,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -11370,7 +11370,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -11392,7 +11392,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { diff --git a/extensions/vb/test/colorize-results/test_vb.json b/extensions/vb/test/colorize-results/test_vb.json index abbc7e6a32f2e..b4567db9c7471 100644 --- a/extensions/vb/test/colorize-results/test_vb.json +++ b/extensions/vb/test/colorize-results/test_vb.json @@ -40,7 +40,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -62,7 +62,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -106,7 +106,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -128,7 +128,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -293,7 +293,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -348,7 +348,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -359,7 +359,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -370,7 +370,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -403,7 +403,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -447,7 +447,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -458,7 +458,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -469,7 +469,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -502,7 +502,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -546,7 +546,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -557,7 +557,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -568,7 +568,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -601,7 +601,7 @@ "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.type: #4EC9B0" } }, { @@ -722,7 +722,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -766,7 +766,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -788,7 +788,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -832,7 +832,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -865,7 +865,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -898,7 +898,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -920,7 +920,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -942,7 +942,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -964,7 +964,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1019,7 +1019,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1052,7 +1052,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1250,7 +1250,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1272,7 +1272,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1294,7 +1294,7 @@ "light_plus": "support.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "support.function: #DCDCAA" } }, { @@ -1349,7 +1349,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1382,7 +1382,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1415,7 +1415,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1514,7 +1514,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { @@ -1536,7 +1536,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1624,7 +1624,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1646,7 +1646,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1668,7 +1668,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -1866,7 +1866,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1888,7 +1888,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1910,7 +1910,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -1998,7 +1998,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2031,7 +2031,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2064,7 +2064,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -2119,7 +2119,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -2163,7 +2163,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { diff --git a/extensions/yaml/test/colorize-results/test_yaml.json b/extensions/yaml/test/colorize-results/test_yaml.json index 8bea09ae57db1..e4e35ba7eefeb 100644 --- a/extensions/yaml/test/colorize-results/test_yaml.json +++ b/extensions/yaml/test/colorize-results/test_yaml.json @@ -84,7 +84,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -95,7 +95,7 @@ "light_plus": "entity.name.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.type: #4EC9B0" } }, { @@ -348,7 +348,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -359,7 +359,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -447,7 +447,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -458,7 +458,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { @@ -579,7 +579,7 @@ "light_plus": "keyword.control: #AF00DB", "dark_vs": "keyword.control: #569CD6", "light_vs": "keyword.control: #0000FF", - "hc_black": "keyword.control: #569CD6" + "hc_black": "keyword.control: #C586C0" } }, { @@ -590,7 +590,7 @@ "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { From 2bae11e918213340133c2c177b7588ae16f5c124 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 11:05:17 +0200 Subject: [PATCH 0665/2747] increase max_old_space_size --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bdf9d6ec67c1c..d7036074be8f9 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "monaco-editor-setup": "node scripts/monaco-editor-setup.js", "monaco-editor-test": "mocha --only-monaco-editor", "precommit": "node build/gulpfile.hygiene.js", - "gulp": "gulp", + "gulp": "gulp --max_old_space_size=4096", "7z": "7z" }, "dependencies": { From 57570d5cb79fcb03aeb9c08cc2b6f5bc203274cf Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 May 2017 11:11:44 +0200 Subject: [PATCH 0666/2747] [php] update grammar (fixes #26543) --- extensions/php/syntaxes/php.tmLanguage.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/php/syntaxes/php.tmLanguage.json b/extensions/php/syntaxes/php.tmLanguage.json index 36af0819d4067..d7e3a548ade64 100644 --- a/extensions/php/syntaxes/php.tmLanguage.json +++ b/extensions/php/syntaxes/php.tmLanguage.json @@ -1651,7 +1651,7 @@ ] }, { - "begin": "(?x)\\s*\n\t\t\t\t\t ((?:(?:final|abstract|public|private|protected|static)\\s+)*)\n\t\t\t\t (function)\n\t\t\t\t (?:\\s+|(\\s*&\\s*))\n\t\t\t\t (?:\n\t\t\t\t (__(?:call|construct|debugInfo|destruct|get|set|isset|unset|tostring|clone|set_state|sleep|wakeup|autoload|invoke|callStatic))\n\t\t\t\t |([a-zA-Z0-9_]+)\n\t\t\t\t )\n\t\t\t\t \\s*\n\t\t\t\t (\\()", + "begin": "(?x)\\s*\n\t\t\t\t\t ((?:(?:final|abstract|public|private|protected|static)\\s+)*)\n\t\t\t\t (function)\n\t\t\t\t (?:\\s+|(\\s*&\\s*))\n\t\t\t\t (?:\n\t\t\t\t (__(?:call|construct|debugInfo|destruct|get|set|isset|unset|tostring|clone|set_state|sleep|wakeup|autoload|invoke|callStatic))\n\t\t\t\t |([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n\t\t\t\t )\n\t\t\t\t \\s*\n\t\t\t\t (\\()", "beginCaptures": { "1": { "patterns": [ @@ -2100,7 +2100,7 @@ "match": "(@xlink)\\s+(.+)\\s*$" }, { - "match": "\\@(a(pi|bstract|uthor)|c(ategory|opyright)|example|global|internal|li(cense|nk)|method|p(roperty(\\-read|\\-write|)|ackage|aram)|return|s(ee|ince|ource|tatic|ubpackage)|t(hrows|odo)|v(ar|ersion)|uses|deprecated|final|ignore)\\b", + "match": "\\@(a(pi|bstract|uthor)|c(ategory|opyright)|example|global|in(herit[Dd]oc|ternal)|li(cense|nk)|method|p(roperty(\\-read|\\-write|)|ackage|aram)|return|s(ee|ince|ource|tatic|ubpackage)|t(hrows|odo)|v(ar|ersion)|uses|deprecated|final|ignore)\\b", "name": "keyword.other.phpdoc.php" }, { @@ -2109,7 +2109,7 @@ "name": "keyword.other.phpdoc.php" } }, - "match": "\\{(@(link)).+?\\}", + "match": "\\{(@(link|inherit[Dd]oc)).+?\\}", "name": "meta.tag.inline.phpdoc.php" } ] @@ -2975,5 +2975,5 @@ ] } }, - "version": "https://github.com/atom/language-php/commit/fca6a6763bd5e07b2cc0a82fda502dbf3bce5dea" + "version": "https://github.com/atom/language-php/commit/22047c19f52f686de471d0deccae0cb1332997b6" } \ No newline at end of file From 7e03c9d106ebee683e280252a50d9fd7b6a8e68e Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 18 May 2017 11:16:39 +0200 Subject: [PATCH 0667/2747] hc theme - improve colors (inspired by high contrast ms word) --- extensions/theme-defaults/themes/hc_black.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/theme-defaults/themes/hc_black.json b/extensions/theme-defaults/themes/hc_black.json index 401ed6a0ab68e..0db3c99f1fc62 100644 --- a/extensions/theme-defaults/themes/hc_black.json +++ b/extensions/theme-defaults/themes/hc_black.json @@ -2,6 +2,11 @@ "$schema": "vscode://schemas/color-theme", "name": "Dark High Contrast", "include": "./hc_black_defaults.json", + "colors": { + "selection.background": "#008000", + "statusBar.background": "#008000", + "editor.selectionBackground": "#FFFFFF" + }, "tokenColors": [ { "name": "Function declarations", From 3e8103ceeca6db9fa1493d0c1ee72780d9a2479b Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 18 May 2017 10:28:39 +0200 Subject: [PATCH 0668/2747] Simplify cursor creation --- .../editor/browser/widget/codeEditorWidget.ts | 5 ++- src/vs/editor/common/commonCodeEditor.ts | 34 ++----------------- .../editor/common/viewModel/viewModelImpl.ts | 22 ++++++++++++ 3 files changed, 29 insertions(+), 32 deletions(-) diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index 2d98476d439fe..29d8baf1cad87 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -182,7 +182,10 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito } public getCompletelyVisibleLinesRangeInViewport(): Range { - const viewRange = this._getCompletelyVisibleViewRange(); + if (!this.hasView) { + return null; + } + const viewRange = this.viewModel.getCompletelyVisibleViewRange(); return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange); } diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index 64c0a5486f1b5..2b9facec78836 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -243,34 +243,6 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo return this.viewModel.getCenteredRangeInViewport(); } - protected _getCompletelyVisibleViewRange(): Range { - if (!this.hasView) { - return null; - } - const partialData = this.viewModel.viewLayout.getLinesViewportData(); - const startViewLineNumber = partialData.completelyVisibleStartLineNumber; - const endViewLineNumber = partialData.completelyVisibleEndLineNumber; - - return new Range( - startViewLineNumber, this.viewModel.getLineMinColumn(startViewLineNumber), - endViewLineNumber, this.viewModel.getLineMaxColumn(endViewLineNumber) - ); - } - - protected _getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range { - if (!this.hasView) { - return null; - } - const partialData = this.viewModel.viewLayout.getLinesViewportDataAtScrollTop(scrollTop); - const startViewLineNumber = partialData.completelyVisibleStartLineNumber; - const endViewLineNumber = partialData.completelyVisibleEndLineNumber; - - return new Range( - startViewLineNumber, this.viewModel.getLineMinColumn(startViewLineNumber), - endViewLineNumber, this.viewModel.getLineMaxColumn(endViewLineNumber) - ); - } - public getVisibleColumnFromPosition(rawPosition: IPosition): number { if (!this.model) { return rawPosition.column; @@ -880,13 +852,13 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo viewModel: this.viewModel, coordinatesConverter: this.viewModel.coordinatesConverter, getScrollTop: (): number => { - return this.getScrollTop(); + return this.viewModel.viewLayout.getScrollTop(); }, getCompletelyVisibleViewRange: (): Range => { - return this._getCompletelyVisibleViewRange(); + return this.viewModel.getCompletelyVisibleViewRange(); }, getCompletelyVisibleViewRangeAtScrollTop: (scrollTop: number): Range => { - return this._getCompletelyVisibleViewRangeAtScrollTop(scrollTop); + return this.viewModel.getCompletelyVisibleViewRangeAtScrollTop(scrollTop); }, getVerticalOffsetForViewLineNumber: (viewLineNumber: number): number => { return this.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewLineNumber); diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index 0ffdbddf6af93..c0d92a4010251 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -401,6 +401,28 @@ export class ViewModel extends ViewEventEmitter implements IViewModel { return this.coordinatesConverter.convertViewRangeToModelRange(currentCenteredViewRange); } + public getCompletelyVisibleViewRange(): Range { + const partialData = this.viewLayout.getLinesViewportData(); + const startViewLineNumber = partialData.completelyVisibleStartLineNumber; + const endViewLineNumber = partialData.completelyVisibleEndLineNumber; + + return new Range( + startViewLineNumber, this.getLineMinColumn(startViewLineNumber), + endViewLineNumber, this.getLineMaxColumn(endViewLineNumber) + ); + } + + public getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range { + const partialData = this.viewLayout.getLinesViewportDataAtScrollTop(scrollTop); + const startViewLineNumber = partialData.completelyVisibleStartLineNumber; + const endViewLineNumber = partialData.completelyVisibleEndLineNumber; + + return new Range( + startViewLineNumber, this.getLineMinColumn(startViewLineNumber), + endViewLineNumber, this.getLineMaxColumn(endViewLineNumber) + ); + } + public getTabSize(): number { return this.model.getOptions().tabSize; } From 371000f2066f615cc39c10ba5e32af0937f63804 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 18 May 2017 10:49:10 +0200 Subject: [PATCH 0669/2747] Move emptySelectionClipboard out of contribInfo --- .../common/config/commonEditorConfig.ts | 2 +- src/vs/editor/common/config/editorOptions.ts | 71 ++++++++++--------- .../contrib/clipboard/browser/clipboard.ts | 6 +- src/vs/editor/editor.main.ts | 2 +- src/vs/monaco.d.ts | 3 +- 5 files changed, 46 insertions(+), 38 deletions(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index e804b2bd36bd1..2c7aacd044a7c 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -385,7 +385,7 @@ const editorConfiguration: IConfigurationNode = { }, 'editor.emptySelectionClipboard': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.contribInfo.emptySelectionClipboard, + 'default': EDITOR_DEFAULTS.emptySelectionClipboard, 'description': nls.localize('emptySelectionClipboard', "Controls whether copying without a selection copies the current line.") }, 'editor.wordBasedSuggestions': { diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 2bc5f7ad1f98c..529555dbab55c 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -729,7 +729,6 @@ export interface EditorContribOptions { readonly acceptSuggestionOnEnter: boolean; readonly acceptSuggestionOnCommitCharacter: boolean; readonly snippetSuggestions: 'top' | 'bottom' | 'inline' | 'none'; - readonly emptySelectionClipboard: boolean; readonly wordBasedSuggestions: boolean; readonly suggestFontSize: number; readonly suggestLineHeight: number; @@ -741,6 +740,36 @@ export interface EditorContribOptions { readonly matchBrackets: boolean; } +/** + * Validated configuration options for the editor. + * This is a 1 to 1 validated/parsed version of IEditorOptions merged on top of the defaults. + * @internal + */ +export interface IValidatedEditorOptions { + readonly inDiffEditor: boolean; + readonly wordSeparators: string; + readonly lineNumbersMinChars: number; + readonly lineDecorationsWidth: number | string; + readonly readOnly: boolean; + readonly mouseStyle: 'text' | 'default' | 'copy'; + readonly disableTranslate3d: boolean; + readonly automaticLayout: boolean; + readonly wordWrap: 'off' | 'on' | 'wordWrapColumn' | 'bounded'; + readonly wordWrapColumn: number; + readonly wordWrapMinified: boolean; + readonly wrappingIndent: WrappingIndent; + readonly wordWrapBreakBeforeCharacters: string; + readonly wordWrapBreakAfterCharacters: string; + readonly wordWrapBreakObtrusiveCharacters: string; + readonly autoClosingBrackets: boolean; + readonly dragAndDrop: boolean; + readonly emptySelectionClipboard: boolean; + readonly useTabStops: boolean; + + readonly viewInfo: InternalEditorViewOptions; + readonly contribInfo: EditorContribOptions; +} + /** * Internal configuration options (transformed or computed) for the editor. */ @@ -759,6 +788,7 @@ export class InternalEditorOptions { readonly useTabStops: boolean; readonly tabFocusMode: boolean; readonly dragAndDrop: boolean; + readonly emptySelectionClipboard: boolean; // ---- grouped options readonly layoutInfo: EditorLayoutInfo; @@ -781,6 +811,7 @@ export class InternalEditorOptions { useTabStops: boolean; tabFocusMode: boolean; dragAndDrop: boolean; + emptySelectionClipboard: boolean; layoutInfo: EditorLayoutInfo; fontInfo: FontInfo; viewInfo: InternalEditorViewOptions; @@ -797,6 +828,7 @@ export class InternalEditorOptions { this.useTabStops = source.useTabStops; this.tabFocusMode = source.tabFocusMode; this.dragAndDrop = source.dragAndDrop; + this.emptySelectionClipboard = source.emptySelectionClipboard; this.layoutInfo = source.layoutInfo; this.fontInfo = source.fontInfo; this.viewInfo = source.viewInfo; @@ -819,6 +851,7 @@ export class InternalEditorOptions { && this.useTabStops === other.useTabStops && this.tabFocusMode === other.tabFocusMode && this.dragAndDrop === other.dragAndDrop + && this.emptySelectionClipboard === other.emptySelectionClipboard && InternalEditorOptions._equalsLayoutInfo(this.layoutInfo, other.layoutInfo) && this.fontInfo.equals(other.fontInfo) && InternalEditorOptions._equalsViewOptions(this.viewInfo, other.viewInfo) @@ -842,6 +875,7 @@ export class InternalEditorOptions { useTabStops: (this.useTabStops !== newOpts.useTabStops), tabFocusMode: (this.tabFocusMode !== newOpts.tabFocusMode), dragAndDrop: (this.dragAndDrop !== newOpts.dragAndDrop), + emptySelectionClipboard: (this.emptySelectionClipboard !== newOpts.emptySelectionClipboard), layoutInfo: (!InternalEditorOptions._equalsLayoutInfo(this.layoutInfo, newOpts.layoutInfo)), fontInfo: (!this.fontInfo.equals(newOpts.fontInfo)), viewInfo: (!InternalEditorOptions._equalsViewOptions(this.viewInfo, newOpts.viewInfo)), @@ -1004,7 +1038,6 @@ export class InternalEditorOptions { && a.acceptSuggestionOnEnter === b.acceptSuggestionOnEnter && a.acceptSuggestionOnCommitCharacter === b.acceptSuggestionOnCommitCharacter && a.snippetSuggestions === b.snippetSuggestions - && a.emptySelectionClipboard === b.emptySelectionClipboard && a.wordBasedSuggestions === b.wordBasedSuggestions && a.suggestFontSize === b.suggestFontSize && a.suggestLineHeight === b.suggestLineHeight @@ -1167,6 +1200,7 @@ export interface IConfigurationChangedEvent { readonly useTabStops: boolean; readonly tabFocusMode: boolean; readonly dragAndDrop: boolean; + readonly emptySelectionClipboard: boolean; readonly layoutInfo: boolean; readonly fontInfo: boolean; readonly viewInfo: boolean; @@ -1189,34 +1223,6 @@ export interface IEnvironmentalOptions { readonly tabFocusMode: boolean; } -/** - * Validated configuration options for the editor. - * @internal - */ -export interface IValidatedEditorOptions { - inDiffEditor: boolean; - wordSeparators: string; - lineNumbersMinChars: number; - lineDecorationsWidth: number | string; - readOnly: boolean; - mouseStyle: 'text' | 'default' | 'copy'; - disableTranslate3d: boolean; - automaticLayout: boolean; - wordWrap: 'off' | 'on' | 'wordWrapColumn' | 'bounded'; - wordWrapColumn: number; - wordWrapMinified: boolean; - wrappingIndent: WrappingIndent; - wordWrapBreakBeforeCharacters: string; - wordWrapBreakAfterCharacters: string; - wordWrapBreakObtrusiveCharacters: string; - autoClosingBrackets: boolean; - dragAndDrop: boolean; - useTabStops: boolean; - - viewInfo: InternalEditorViewOptions; - contribInfo: EditorContribOptions; -} - function _boolean(value: any, defaultValue: T): boolean | T { if (typeof value === 'undefined') { return defaultValue; @@ -1358,6 +1364,7 @@ export class EditorOptionsValidator { wordWrapBreakObtrusiveCharacters: _string(opts.wordWrapBreakObtrusiveCharacters, defaults.wordWrapBreakObtrusiveCharacters), autoClosingBrackets: _boolean(opts.autoClosingBrackets, defaults.autoClosingBrackets), dragAndDrop: _boolean(opts.dragAndDrop, defaults.dragAndDrop), + emptySelectionClipboard: _boolean(opts.emptySelectionClipboard, defaults.emptySelectionClipboard), useTabStops: _boolean(opts.useTabStops, defaults.useTabStops), viewInfo: viewInfo, contribInfo: contribInfo, @@ -1527,7 +1534,6 @@ export class EditorOptionsValidator { acceptSuggestionOnEnter: _boolean(opts.acceptSuggestionOnEnter, defaults.acceptSuggestionOnEnter), acceptSuggestionOnCommitCharacter: _boolean(opts.acceptSuggestionOnCommitCharacter, defaults.acceptSuggestionOnCommitCharacter), snippetSuggestions: _stringSet<'top' | 'bottom' | 'inline' | 'none'>(opts.snippetSuggestions, defaults.snippetSuggestions, ['top', 'bottom', 'inline', 'none']), - emptySelectionClipboard: _boolean(opts.emptySelectionClipboard, defaults.emptySelectionClipboard), wordBasedSuggestions: _boolean(opts.wordBasedSuggestions, defaults.wordBasedSuggestions), suggestFontSize: _clampedInt(opts.suggestFontSize, defaults.suggestFontSize, 0, 1000), suggestLineHeight: _clampedInt(opts.suggestLineHeight, defaults.suggestLineHeight, 0, 1000), @@ -1659,6 +1665,7 @@ export class InternalEditorOptionsFactory { useTabStops: opts.useTabStops, tabFocusMode: opts.readOnly ? true : env.tabFocusMode, dragAndDrop: opts.dragAndDrop, + emptySelectionClipboard: opts.emptySelectionClipboard, layoutInfo: layoutInfo, fontInfo: env.fontInfo, viewInfo: opts.viewInfo, @@ -1869,6 +1876,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { wordWrapBreakObtrusiveCharacters: '.', autoClosingBrackets: true, dragAndDrop: false, + emptySelectionClipboard: true, useTabStops: true, viewInfo: { @@ -1933,7 +1941,6 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { acceptSuggestionOnEnter: true, acceptSuggestionOnCommitCharacter: true, snippetSuggestions: 'inline', - emptySelectionClipboard: true, wordBasedSuggestions: true, suggestFontSize: 0, suggestLineHeight: 0, diff --git a/src/vs/editor/contrib/clipboard/browser/clipboard.ts b/src/vs/editor/contrib/clipboard/browser/clipboard.ts index 5f0be755a1491..5dc8118dfe397 100644 --- a/src/vs/editor/contrib/clipboard/browser/clipboard.ts +++ b/src/vs/editor/contrib/clipboard/browser/clipboard.ts @@ -81,7 +81,7 @@ class ExecCommandCutAction extends ExecCommandAction { } public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): void { - var enableEmptySelectionClipboard = editor.getConfiguration().contribInfo.emptySelectionClipboard && browser.enableEmptySelectionClipboard; + var enableEmptySelectionClipboard = editor.getConfiguration().emptySelectionClipboard && browser.enableEmptySelectionClipboard; if (!enableEmptySelectionClipboard && editor.getSelection().isEmpty()) { return; @@ -113,7 +113,7 @@ class ExecCommandCopyAction extends ExecCommandAction { } public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): void { - var enableEmptySelectionClipboard = editor.getConfiguration().contribInfo.emptySelectionClipboard && browser.enableEmptySelectionClipboard; + var enableEmptySelectionClipboard = editor.getConfiguration().emptySelectionClipboard && browser.enableEmptySelectionClipboard; if (!enableEmptySelectionClipboard && editor.getSelection().isEmpty()) { return; @@ -162,7 +162,7 @@ class ExecCommandCopyWithSyntaxHighlightingAction extends ExecCommandAction { } public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): void { - var enableEmptySelectionClipboard = editor.getConfiguration().contribInfo.emptySelectionClipboard && browser.enableEmptySelectionClipboard; + var enableEmptySelectionClipboard = editor.getConfiguration().emptySelectionClipboard && browser.enableEmptySelectionClipboard; if (!enableEmptySelectionClipboard && editor.getSelection().isEmpty()) { return; diff --git a/src/vs/editor/editor.main.ts b/src/vs/editor/editor.main.ts index 7820913b7de8f..8e3a8c151dd06 100644 --- a/src/vs/editor/editor.main.ts +++ b/src/vs/editor/editor.main.ts @@ -17,7 +17,7 @@ import { createMonacoLanguagesAPI } from 'vs/editor/browser/standalone/standalon import { EDITOR_DEFAULTS, WrappingIndent } from "vs/editor/common/config/editorOptions"; // Set defaults for standalone editor -EDITOR_DEFAULTS.wrappingIndent = WrappingIndent.None; +(EDITOR_DEFAULTS).wrappingIndent = WrappingIndent.None; (EDITOR_DEFAULTS.contribInfo).folding = false; (EDITOR_DEFAULTS.viewInfo).glyphMargin = false; diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 43916db530ced..a06eec92796f4 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -3232,7 +3232,6 @@ declare module monaco.editor { readonly acceptSuggestionOnEnter: boolean; readonly acceptSuggestionOnCommitCharacter: boolean; readonly snippetSuggestions: 'top' | 'bottom' | 'inline' | 'none'; - readonly emptySelectionClipboard: boolean; readonly wordBasedSuggestions: boolean; readonly suggestFontSize: number; readonly suggestLineHeight: number; @@ -3259,6 +3258,7 @@ declare module monaco.editor { readonly useTabStops: boolean; readonly tabFocusMode: boolean; readonly dragAndDrop: boolean; + readonly emptySelectionClipboard: boolean; readonly layoutInfo: EditorLayoutInfo; readonly fontInfo: FontInfo; readonly viewInfo: InternalEditorViewOptions; @@ -3388,6 +3388,7 @@ declare module monaco.editor { readonly useTabStops: boolean; readonly tabFocusMode: boolean; readonly dragAndDrop: boolean; + readonly emptySelectionClipboard: boolean; readonly layoutInfo: boolean; readonly fontInfo: boolean; readonly viewInfo: boolean; From 7a15a509d07d50a5f6952f3b6337a4521676bc7f Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 18 May 2017 11:21:01 +0200 Subject: [PATCH 0670/2747] Remove browser.enableEmptySelectionClipboard --- src/vs/base/browser/browser.ts | 2 -- src/vs/editor/browser/config/configuration.ts | 1 + .../browser/controller/textAreaHandler.ts | 13 +++++++++---- .../editor/browser/widget/codeEditorWidget.ts | 5 ----- src/vs/editor/common/commonCodeEditor.ts | 5 +---- .../editor/common/config/commonEditorConfig.ts | 2 ++ src/vs/editor/common/config/editorOptions.ts | 3 ++- src/vs/editor/common/controller/cursor.ts | 7 ++----- .../editor/common/controller/cursorCommon.ts | 3 +++ .../controller/cursorDeleteOperations.ts | 4 ++-- src/vs/editor/common/view/viewEvents.ts | 2 ++ src/vs/editor/common/viewModel/viewModel.ts | 4 ++-- .../editor/common/viewModel/viewModelImpl.ts | 8 ++++---- .../contrib/clipboard/browser/clipboard.ts | 12 ++++++------ .../test/common/commands/commandTestUtils.ts | 2 +- .../test/common/commands/sideEditing.test.ts | 2 +- .../common/config/commonEditorConfig.test.ts | 1 + .../test/common/controller/cursor.test.ts | 18 +++++++++--------- .../controller/cursorMoveCommand.test.ts | 2 +- .../test/common/mocks/testConfiguration.ts | 1 + 20 files changed, 50 insertions(+), 47 deletions(-) diff --git a/src/vs/base/browser/browser.ts b/src/vs/base/browser/browser.ts index ed183b57cb9d0..39e20a28dd9f4 100644 --- a/src/vs/base/browser/browser.ts +++ b/src/vs/base/browser/browser.ts @@ -153,8 +153,6 @@ export function canUseTranslate3d(): boolean { return true; } -export const enableEmptySelectionClipboard = isWebKit; - export function supportsExecCommand(command: string): boolean { return ( (isIE || Platform.isNative) diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts index 73a05a745c1ec..86fe73ad6decd 100644 --- a/src/vs/editor/browser/config/configuration.ts +++ b/src/vs/editor/browser/config/configuration.ts @@ -351,6 +351,7 @@ export class Configuration extends CommonEditorConfiguration { outerWidth: this._elementSizeObserver.getWidth(), outerHeight: this._elementSizeObserver.getHeight(), canUseTranslate3d: browser.canUseTranslate3d(), + emptySelectionClipboard: browser.isWebKit, pixelRatio: browser.getPixelRatio(), zoomLevel: browser.getZoomLevel() }; diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index f56d75f5b8e9b..247fddd15e091 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -63,6 +63,7 @@ export class TextAreaHandler extends ViewPart { private _experimentalScreenReader: boolean; private _fontInfo: BareFontInfo; private _lineHeight: number; + private _emptySelectionClipboard: boolean; /** * Defined only when the text area is visible (composition case). @@ -93,6 +94,7 @@ export class TextAreaHandler extends ViewPart { this._experimentalScreenReader = conf.viewInfo.experimentalScreenReader; this._fontInfo = conf.fontInfo; this._lineHeight = conf.lineHeight; + this._emptySelectionClipboard = conf.emptySelectionClipboard; this._visibleTextArea = null; this._selections = [new Selection(1, 1, 1, 1)]; @@ -130,9 +132,9 @@ export class TextAreaHandler extends ViewPart { const textAreaInputHost: ITextAreaInputHost = { getPlainTextToCopy: (): string => { - const whatToCopy = this._context.model.getPlainTextToCopy(this._selections, browser.enableEmptySelectionClipboard); + const whatToCopy = this._context.model.getPlainTextToCopy(this._selections, this._emptySelectionClipboard); - if (browser.enableEmptySelectionClipboard) { + if (this._emptySelectionClipboard) { if (browser.isFirefox) { // When writing "LINE\r\n" to the clipboard and then pasting, // Firefox pastes "LINE\n", so let's work around this quirk @@ -149,7 +151,7 @@ export class TextAreaHandler extends ViewPart { }, getHTMLToCopy: (): string => { - return this._context.model.getHTMLToCopy(this._selections, browser.enableEmptySelectionClipboard); + return this._context.model.getHTMLToCopy(this._selections, this._emptySelectionClipboard); }, getScreenReaderContent: (currentState: TextAreaState): TextAreaState => { @@ -181,7 +183,7 @@ export class TextAreaHandler extends ViewPart { this._register(this._textAreaInput.onPaste((e: IPasteData) => { let pasteOnNewLine = false; - if (browser.enableEmptySelectionClipboard) { + if (this._emptySelectionClipboard) { pasteOnNewLine = (e.text === this._lastCopiedValue && this._lastCopiedValueIsFromEmptySelection); } this._viewController.paste('keyboard', e.text, pasteOnNewLine); @@ -285,6 +287,9 @@ export class TextAreaHandler extends ViewPart { if (e.pixelRatio) { this._pixelRatio = conf.pixelRatio; } + if (e.emptySelectionClipboard) { + this._emptySelectionClipboard = conf.emptySelectionClipboard; + } return true; } diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index 29d8baf1cad87..a7de1e2bac1b4 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -9,7 +9,6 @@ import 'vs/editor/common/view/editorColorRegistry'; // initialze editor theming import 'vs/css!./media/tokens'; import { onUnexpectedError } from 'vs/base/common/errors'; import { TPromise } from 'vs/base/common/winjs.base'; -import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ICommandService } from 'vs/platform/commands/common/commands'; @@ -415,10 +414,6 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito } } - protected _enableEmptySelectionClipboard(): boolean { - return browser.enableEmptySelectionClipboard; - } - protected _createView(): void { this._view = new View( this._commandService, diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index 2b9facec78836..d698e6a2f0ce8 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -902,8 +902,7 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo this.cursor = new Cursor( this._configuration, this.model, - viewModelHelper, - this._enableEmptySelectionClipboard() + viewModelHelper ); this.viewCursor = new ViewModelCursors( @@ -938,8 +937,6 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo } } - protected abstract _enableEmptySelectionClipboard(): boolean; - protected abstract _createView(): void; protected _postDetachModelCleanup(detachedModel: editorCommon.IModel): void { diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 2c7aacd044a7c..f1830ec4f7800 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -56,6 +56,7 @@ export interface IEnvConfiguration { outerWidth: number; outerHeight: number; canUseTranslate3d: boolean; + emptySelectionClipboard: boolean; pixelRatio: number; zoomLevel: number; } @@ -119,6 +120,7 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed isDominatedByLongLines: this._isDominatedByLongLines, lineNumbersDigitCount: this._lineNumbersDigitCount, canUseTranslate3d: partialEnv.canUseTranslate3d, + emptySelectionClipboard: partialEnv.emptySelectionClipboard, pixelRatio: partialEnv.pixelRatio, tabFocusMode: TabFocus.getTabFocusMode() }; diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 529555dbab55c..5c43033f67aba 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -1219,6 +1219,7 @@ export interface IEnvironmentalOptions { readonly isDominatedByLongLines: boolean; readonly lineNumbersDigitCount: number; readonly canUseTranslate3d: boolean; + readonly emptySelectionClipboard: boolean; readonly pixelRatio: number; readonly tabFocusMode: boolean; } @@ -1665,7 +1666,7 @@ export class InternalEditorOptionsFactory { useTabStops: opts.useTabStops, tabFocusMode: opts.readOnly ? true : env.tabFocusMode, dragAndDrop: opts.dragAndDrop, - emptySelectionClipboard: opts.emptySelectionClipboard, + emptySelectionClipboard: opts.emptySelectionClipboard && env.emptySelectionClipboard, layoutInfo: layoutInfo, fontInfo: env.fontInfo, viewInfo: opts.viewInfo, diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index b8a95cf04aee4..bc49cef51d3b6 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -77,19 +77,16 @@ export class Cursor extends Disposable implements ICursors { private _isDoingComposition: boolean; private _columnSelectData: IColumnSelectData; - private enableEmptySelectionClipboard: boolean; - private _handlers: { [key: string]: (ctx: IMultipleCursorOperationContext) => void; }; - constructor(configuration: editorCommon.IConfiguration, model: editorCommon.IModel, viewModelHelper: IViewModelHelper, enableEmptySelectionClipboard: boolean) { + constructor(configuration: editorCommon.IConfiguration, model: editorCommon.IModel, viewModelHelper: IViewModelHelper) { super(); this._eventEmitter = this._register(new EventEmitter()); this.configuration = configuration; this.model = model; this.viewModelHelper = viewModelHelper; - this.enableEmptySelectionClipboard = enableEmptySelectionClipboard; const createCursorContext = () => { const config = new CursorConfiguration( @@ -1062,7 +1059,7 @@ export class Cursor extends Disposable implements ICursors { } private _cut(ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, DeleteOperations.cut(this.context.config, this.context.model, this._getAllCursorsModelState(), this.enableEmptySelectionClipboard)); + this._applyEdits(ctx, DeleteOperations.cut(this.context.config, this.context.model, this._getAllCursorsModelState())); } // -------------------- END editing operations diff --git a/src/vs/editor/common/controller/cursorCommon.ts b/src/vs/editor/common/controller/cursorCommon.ts index dd98c3479d4eb..55e1413e19249 100644 --- a/src/vs/editor/common/controller/cursorCommon.ts +++ b/src/vs/editor/common/controller/cursorCommon.ts @@ -61,6 +61,7 @@ export class CursorConfiguration { public readonly lineHeight: number; public readonly useTabStops: boolean; public readonly wordSeparators: string; + public readonly emptySelectionClipboard: boolean; public readonly autoClosingBrackets: boolean; public readonly autoClosingPairsOpen: CharacterMap; public readonly autoClosingPairsClose: CharacterMap; @@ -71,6 +72,7 @@ export class CursorConfiguration { return ( e.layoutInfo || e.wordSeparators + || e.emptySelectionClipboard || e.autoClosingBrackets || e.useTabStops || e.lineHeight @@ -94,6 +96,7 @@ export class CursorConfiguration { this.lineHeight = c.lineHeight; this.useTabStops = c.useTabStops; this.wordSeparators = c.wordSeparators; + this.emptySelectionClipboard = c.emptySelectionClipboard; this.autoClosingBrackets = c.autoClosingBrackets; this.autoClosingPairsOpen = {}; diff --git a/src/vs/editor/common/controller/cursorDeleteOperations.ts b/src/vs/editor/common/controller/cursorDeleteOperations.ts index ffcfaf8530d90..6996f1af6e686 100644 --- a/src/vs/editor/common/controller/cursorDeleteOperations.ts +++ b/src/vs/editor/common/controller/cursorDeleteOperations.ts @@ -163,14 +163,14 @@ export class DeleteOperations { }); } - public static cut(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[], enableEmptySelectionClipboard: boolean): EditOperationResult { + public static cut(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { let commands: CommandResult[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; let selection = cursor.selection; if (selection.isEmpty()) { - if (enableEmptySelectionClipboard) { + if (config.emptySelectionClipboard) { // This is a full line cut let position = cursor.position; diff --git a/src/vs/editor/common/view/viewEvents.ts b/src/vs/editor/common/view/viewEvents.ts index 0f5ee787b72b7..31c994adea807 100644 --- a/src/vs/editor/common/view/viewEvents.ts +++ b/src/vs/editor/common/view/viewEvents.ts @@ -39,6 +39,7 @@ export class ViewConfigurationChangedEvent { public readonly editorClassName: boolean; public readonly lineHeight: boolean; public readonly readOnly: boolean; + public readonly emptySelectionClipboard: boolean; public readonly layoutInfo: boolean; public readonly fontInfo: boolean; public readonly viewInfo: boolean; @@ -50,6 +51,7 @@ export class ViewConfigurationChangedEvent { this.editorClassName = source.editorClassName; this.lineHeight = source.lineHeight; this.readOnly = source.readOnly; + this.emptySelectionClipboard = source.emptySelectionClipboard; this.layoutInfo = source.layoutInfo; this.fontInfo = source.fontInfo; this.viewInfo = source.viewInfo; diff --git a/src/vs/editor/common/viewModel/viewModel.ts b/src/vs/editor/common/viewModel/viewModel.ts index 7ee4226bfc99e..f04c2936c74b9 100644 --- a/src/vs/editor/common/viewModel/viewModel.ts +++ b/src/vs/editor/common/viewModel/viewModel.ts @@ -137,8 +137,8 @@ export interface IViewModel { getModelLineMaxColumn(modelLineNumber: number): number; validateModelPosition(modelPosition: IPosition): Position; - getPlainTextToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string; - getHTMLToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string; + getPlainTextToCopy(ranges: Range[], emptySelectionClipboard: boolean): string; + getHTMLToCopy(ranges: Range[], emptySelectionClipboard: boolean): string; } export class MinimapLinesRenderingData { diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index c0d92a4010251..193e852523c62 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -520,13 +520,13 @@ export class ViewModel extends ViewEventEmitter implements IViewModel { return this.model.validatePosition(position); } - public getPlainTextToCopy(ranges: Range[], enableEmptySelectionClipboard: boolean): string { + public getPlainTextToCopy(ranges: Range[], emptySelectionClipboard: boolean): string { let newLineCharacter = this.model.getEOL(); if (ranges.length === 1) { let range: Range = ranges[0]; if (range.isEmpty()) { - if (enableEmptySelectionClipboard) { + if (emptySelectionClipboard) { let modelLineNumber = this.coordinatesConverter.convertViewPositionToModelPosition(new Position(range.startLineNumber, 1)).lineNumber; return this.model.getLineContent(modelLineNumber) + newLineCharacter; } else { @@ -546,7 +546,7 @@ export class ViewModel extends ViewEventEmitter implements IViewModel { } } - public getHTMLToCopy(viewRanges: Range[], enableEmptySelectionClipboard: boolean): string { + public getHTMLToCopy(viewRanges: Range[], emptySelectionClipboard: boolean): string { if (this.model.getLanguageIdentifier().id === LanguageId.PlainText) { return null; } @@ -558,7 +558,7 @@ export class ViewModel extends ViewEventEmitter implements IViewModel { let range = this.coordinatesConverter.convertViewRangeToModelRange(viewRanges[0]); if (range.isEmpty()) { - if (!enableEmptySelectionClipboard) { + if (!emptySelectionClipboard) { // nothing to copy return null; } diff --git a/src/vs/editor/contrib/clipboard/browser/clipboard.ts b/src/vs/editor/contrib/clipboard/browser/clipboard.ts index 5dc8118dfe397..9ef4294f72884 100644 --- a/src/vs/editor/contrib/clipboard/browser/clipboard.ts +++ b/src/vs/editor/contrib/clipboard/browser/clipboard.ts @@ -81,9 +81,9 @@ class ExecCommandCutAction extends ExecCommandAction { } public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): void { - var enableEmptySelectionClipboard = editor.getConfiguration().emptySelectionClipboard && browser.enableEmptySelectionClipboard; + const emptySelectionClipboard = editor.getConfiguration().emptySelectionClipboard; - if (!enableEmptySelectionClipboard && editor.getSelection().isEmpty()) { + if (!emptySelectionClipboard && editor.getSelection().isEmpty()) { return; } @@ -113,9 +113,9 @@ class ExecCommandCopyAction extends ExecCommandAction { } public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): void { - var enableEmptySelectionClipboard = editor.getConfiguration().emptySelectionClipboard && browser.enableEmptySelectionClipboard; + const emptySelectionClipboard = editor.getConfiguration().emptySelectionClipboard; - if (!enableEmptySelectionClipboard && editor.getSelection().isEmpty()) { + if (!emptySelectionClipboard && editor.getSelection().isEmpty()) { return; } @@ -162,9 +162,9 @@ class ExecCommandCopyWithSyntaxHighlightingAction extends ExecCommandAction { } public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): void { - var enableEmptySelectionClipboard = editor.getConfiguration().emptySelectionClipboard && browser.enableEmptySelectionClipboard; + const emptySelectionClipboard = editor.getConfiguration().emptySelectionClipboard; - if (!enableEmptySelectionClipboard && editor.getSelection().isEmpty()) { + if (!emptySelectionClipboard && editor.getSelection().isEmpty()) { return; } diff --git a/src/vs/editor/test/common/commands/commandTestUtils.ts b/src/vs/editor/test/common/commands/commandTestUtils.ts index 1e9c6202c59cb..3db5dc1fd3c06 100644 --- a/src/vs/editor/test/common/commands/commandTestUtils.ts +++ b/src/vs/editor/test/common/commands/commandTestUtils.ts @@ -25,7 +25,7 @@ export function testCommand( let model = Model.createFromString(lines.join('\n'), undefined, languageIdentifier); let config = new TestConfiguration(null); - let cursor = new Cursor(config, model, viewModelHelper(model), false); + let cursor = new Cursor(config, model, viewModelHelper(model)); cursor.setSelections('tests', [selection]); diff --git a/src/vs/editor/test/common/commands/sideEditing.test.ts b/src/vs/editor/test/common/commands/sideEditing.test.ts index 7ddf9c917296e..6ccc560d22cee 100644 --- a/src/vs/editor/test/common/commands/sideEditing.test.ts +++ b/src/vs/editor/test/common/commands/sideEditing.test.ts @@ -21,7 +21,7 @@ const NO_TAB_SIZE = 0; function testCommand(lines: string[], selections: Selection[], edits: IIdentifiedSingleEditOperation[], expectedLines: string[], expectedSelections: Selection[]): void { let model = Model.createFromString(lines.join('\n')); let config = new TestConfiguration(null); - let cursor = new Cursor(config, model, viewModelHelper(model), false); + let cursor = new Cursor(config, model, viewModelHelper(model)); cursor.setSelections('tests', selections); diff --git a/src/vs/editor/test/common/config/commonEditorConfig.test.ts b/src/vs/editor/test/common/config/commonEditorConfig.test.ts index e98f7cc203c9a..5e6e1dd062a57 100644 --- a/src/vs/editor/test/common/config/commonEditorConfig.test.ts +++ b/src/vs/editor/test/common/config/commonEditorConfig.test.ts @@ -59,6 +59,7 @@ suite('Common Editor Config', () => { outerWidth: 1000, outerHeight: 100, canUseTranslate3d: true, + emptySelectionClipboard: true, pixelRatio: 1, zoomLevel: 0 }; diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index eb7e5df87c720..37e3426c3c7d0 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -146,7 +146,7 @@ suite('Editor Controller - Cursor', () => { thisModel = Model.createFromString(text); thisConfiguration = new TestConfiguration(null); - thisCursor = new Cursor(thisConfiguration, thisModel, viewModelHelper(thisModel), false); + thisCursor = new Cursor(thisConfiguration, thisModel, viewModelHelper(thisModel)); }); teardown(() => { @@ -705,7 +705,7 @@ suite('Editor Controller - Cursor', () => { '\t\t}', '\t}' ].join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model), true); + let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model)); moveTo(cursor, 1, 7, false); assertCursor(cursor, new Position(1, 7)); @@ -739,7 +739,7 @@ suite('Editor Controller - Cursor', () => { 'var concat = require("gulp-concat");', 'var newer = require("gulp-newer");', ].join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model), true); + let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model)); moveTo(cursor, 1, 4, false); assertCursor(cursor, new Position(1, 4)); @@ -774,7 +774,7 @@ suite('Editor Controller - Cursor', () => { '', '', ].join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model), true); + let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model)); moveTo(cursor, 10, 10, false); assertCursor(cursor, new Position(10, 10)); @@ -832,7 +832,7 @@ suite('Editor Controller - Cursor', () => { '', '', ].join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model), true); + let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model)); moveTo(cursor, 10, 10, false); assertCursor(cursor, new Position(10, 10)); @@ -877,7 +877,7 @@ suite('Editor Controller - Cursor', () => { 'var concat = require("gulp-concat");', 'var newer = require("gulp-newer");', ].join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model), true); + let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model)); moveTo(cursor, 1, 4, false); assertCursor(cursor, new Position(1, 4)); @@ -1421,7 +1421,7 @@ suite('Editor Controller - Regression tests', () => { 'qwerty' ]; let model = Model.createFromString(text.join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model), true); + let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model)); moveTo(cursor, 2, 1, false); assertCursor(cursor, new Selection(2, 1, 2, 1)); @@ -1439,7 +1439,7 @@ suite('Editor Controller - Regression tests', () => { '' ]; model = Model.createFromString(text.join('\n')); - cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model), true); + cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model)); moveTo(cursor, 2, 1, false); assertCursor(cursor, new Selection(2, 1, 2, 1)); @@ -2719,7 +2719,7 @@ interface ICursorOpts { function usingCursor(opts: ICursorOpts, callback: (model: Model, cursor: Cursor) => void): void { let model = Model.createFromString(opts.text.join('\n'), opts.modelOpts, opts.languageIdentifier); let config = new TestConfiguration(opts.editorOpts); - let cursor = new Cursor(config, model, viewModelHelper(model), false); + let cursor = new Cursor(config, model, viewModelHelper(model)); callback(model, cursor); diff --git a/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts b/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts index c1388ba58e870..5528a35ac24fa 100644 --- a/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts +++ b/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts @@ -454,7 +454,7 @@ suite('Cursor move command test', () => { }); function aCursor(viewModelHelper?: IViewModelHelper): Cursor { - return new Cursor(thisConfiguration, thisModel, viewModelHelper || aViewModelHelper(thisModel), false); + return new Cursor(thisConfiguration, thisModel, viewModelHelper || aViewModelHelper(thisModel)); } }); diff --git a/src/vs/editor/test/common/mocks/testConfiguration.ts b/src/vs/editor/test/common/mocks/testConfiguration.ts index 2ace40b73d46a..9c3fdd69c0600 100644 --- a/src/vs/editor/test/common/mocks/testConfiguration.ts +++ b/src/vs/editor/test/common/mocks/testConfiguration.ts @@ -21,6 +21,7 @@ export class TestConfiguration extends CommonEditorConfiguration { outerWidth: 100, outerHeight: 100, canUseTranslate3d: true, + emptySelectionClipboard: true, pixelRatio: 1, zoomLevel: 0 }; From 1081ef16c6aebc5666cfa410f6c0b07322f7720e Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 11:32:59 +0200 Subject: [PATCH 0671/2747] clean crash reporter --- build/gulpfile.mixin.js | 38 ++-------------------- package.json | 2 +- src/vs/platform/node/product.ts | 11 ++++++- src/vs/workbench/electron-browser/shell.ts | 22 +++++++++++-- 4 files changed, 33 insertions(+), 40 deletions(-) diff --git a/build/gulpfile.mixin.js b/build/gulpfile.mixin.js index 71c45d4bcf9da..abf3ce4a90cc2 100644 --- a/build/gulpfile.mixin.js +++ b/build/gulpfile.mixin.js @@ -49,46 +49,12 @@ gulp.task('mixin', function () { if (quality) { const productJsonFilter = filter('product.json', { restore: true }); - const arch = process.env.VSCODE_ELECTRON_PLATFORM || process.arch; - - const vsdaFilter = (function () { - const filter = []; - if (process.platform !== 'win32') { filter.push('!**/vsda_win32.node'); } - if (process.platform !== 'darwin') { filter.push('!**/vsda_darwin.node'); } - if (process.platform !== 'linux' || arch !== 'x64') { filter.push('!**/vsda_linux64.node'); } - if (process.platform !== 'linux' || arch === 'x64') { filter.push('!**/vsda_linux32.node'); } - - return filter; - })(); - const mixin = all - .pipe(filter(['quality/' + quality + '/**'].concat(vsdaFilter))) + .pipe(filter(['quality/' + quality + '/**'])) .pipe(util.rebase(2)) .pipe(productJsonFilter) .pipe(buffer()) - .pipe(json(function (patch) { - const original = require('../product.json'); - const result = assign(original, patch); - - // HockeyApp Support - if (patch.crashReporterHockeyAppSubmitURL && result.crashReporter) { - - // Receive submitURL for the platform we are building for - result.crashReporter.submitURL = (function () { - if (process.platform === 'win32') { return patch.crashReporterHockeyAppSubmitURL.win32; } - if (process.platform === 'darwin') { return patch.crashReporterHockeyAppSubmitURL.darwin; } - if (process.platform === 'linux' && arch === 'x64') { return patch.crashReporterHockeyAppSubmitURL.linux64; } - if (process.platform === 'linux' && arch !== 'x64') { return patch.crashReporterHockeyAppSubmitURL.linux32; } - - return void 0; - })(); - - // No longer need crashReporterHockeyAppSubmitURL after this - result.crashReporterHockeyAppSubmitURL = void 0; - } - - return result; - })) + .pipe(json(o => assign({}, require('../product.json'), o))) .pipe(productJsonFilter.restore); all = es.merge(mixin); diff --git a/package.json b/package.json index d7036074be8f9..f94b92357aecd 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev", "version": "1.13.0", "electronVersion": "1.6.6", - "distro": "75907509ec4038a8ebcce47fa85eab15bfe33aac", + "distro": "1dc6b8ea29727a80a9cf0a8832e6d1c16623fe40", "author": { "name": "Microsoft Corporation" }, diff --git a/src/vs/platform/node/product.ts b/src/vs/platform/node/product.ts index 4937ade6d77ea..f92b896b62d6c 100644 --- a/src/vs/platform/node/product.ts +++ b/src/vs/platform/node/product.ts @@ -28,7 +28,10 @@ export interface IProductConfiguration { extensionImportantTips: { [id: string]: { name: string; pattern: string; }; }; extensionKeywords: { [extension: string]: string[]; }; keymapExtensionTips: string[]; - crashReporter: Electron.CrashReporterStartOptions; + crashReporter: { + companyName: string; + productName: string; + }; welcomePage: string; enableTelemetry: boolean; aiConfig: { @@ -52,6 +55,12 @@ export interface IProductConfiguration { npsSurveyUrl: string; checksums: { [path: string]: string; }; checksumFailMoreInfoUrl: string; + hockeyApp: { + 'win32': string; + 'linux-ia32': string; + 'linux-x64': string; + 'darwin': string; + }; } const rootPath = path.dirname(uri.parse(require.toUrl('')).fsPath); diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index f5e39ca7bd489..ef12343f32697 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -172,8 +172,26 @@ export class WorkbenchShell { const [instantiationService, serviceCollection] = this.initServiceCollection(parent.getHTMLElement()); //crash reporting - if (!!product.crashReporter) { - instantiationService.createInstance(CrashReporter, product.crashReporter); + if (product.crashReporter && product.hockeyApp) { + let submitURL: string; + + if (platform.isWindows) { + submitURL = product.hockeyApp.win32; + } else if (platform.isMacintosh) { + submitURL = product.hockeyApp.darwin; + } else if (platform.isLinux) { + submitURL = product.hockeyApp[`linux-${process.arch}`]; + } + + if (submitURL) { + const opts: Electron.CrashReporterStartOptions = { + companyName: product.crashReporter.companyName, + productName: product.crashReporter.productName, + submitURL + }; + + instantiationService.createInstance(CrashReporter, opts); + } } // Workbench From 157fbda81e06f907c32b7406af9584fec77c63da Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 18 May 2017 10:34:50 +0200 Subject: [PATCH 0672/2747] prompt some users to profile after slowish startup --- src/vs/base/common/platform.ts | 2 +- .../performance.contribution.ts | 106 ++++++++++++++---- 2 files changed, 85 insertions(+), 23 deletions(-) diff --git a/src/vs/base/common/platform.ts b/src/vs/base/common/platform.ts index 4e5c5266d0fd7..c69370665fdeb 100644 --- a/src/vs/base/common/platform.ts +++ b/src/vs/base/common/platform.ts @@ -76,7 +76,7 @@ export enum Platform { Windows } -export let _platform: Platform = Platform.Web; +let _platform: Platform = Platform.Web; if (_isNative) { if (_isMacintosh) { _platform = Platform.Mac; diff --git a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts index 9351de679df17..51ff51c8350cb 100644 --- a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts +++ b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts @@ -21,6 +21,48 @@ import { IMessageService } from 'vs/platform/message/common/message'; import { ITimerService } from 'vs/workbench/services/timer/common/timerService'; import { IWorkbenchContributionsRegistry, IWorkbenchContribution, Extensions } from 'vs/workbench/common/contributions'; import product from 'vs/platform/node/product'; +import { platform, Platform } from 'vs/base/common/platform'; +import { release } from 'os'; + +const percentiles: { [key: string]: [number, number] } = { + // 80th - 90th percentiles + ['Linux_4.10.0-20-generic']: [3474, 6300], + ['Linux_4.10.0-21-generic']: [5342, 12022], + ['Linux_4.10.13-1-ARCH']: [3047, 4248], + ['Linux_4.10.13-200.fc25.x86_64']: [2380, 2895], + ['Linux_4.10.14-200.fc25.x86_64']: [5164, 14042], + ['Linux_4.4.0-21-generic']: [3777, 8160], + ['Linux_4.4.0-72-generic']: [6173, 10730], + ['Linux_4.4.0-75-generic']: [4769, 8560], + ['Linux_4.4.0-77-generic']: [3834, 7343], + ['Linux_4.4.0-78-generic']: [3115, 7078], + ['Linux_4.8.0-49-generic']: [7174, 10362], + ['Linux_4.8.0-51-generic']: [3906, 7385], + ['Linux_4.8.0-52-generic']: [6757, 13741], + ['Linux_4.9.0-2-amd64']: [4348, 8754], + ['Mac_14.5.0']: [4403, 7216], + ['Mac_15.4.0']: [3831, 4946], + ['Mac_15.5.0']: [5080, 8296], + ['Mac_15.6.0']: [4621, 7160], + ['Mac_16.0.0']: [4748, 11248], + ['Mac_16.1.0']: [4309, 6106], + ['Mac_16.3.0']: [2756, 3674], + ['Mac_16.4.0']: [3625, 5463], + ['Mac_16.5.0']: [3617, 5288], + ['Mac_16.6.0']: [3655, 5279], + ['Mac_16.7.0']: [4415, 6624], + ['Windows_10.0.10240']: [8284, 14438], + ['Windows_10.0.10586']: [5903, 9224], + ['Windows_10.0.14393']: [6065, 10567], + ['Windows_10.0.15063']: [5521, 8696], + ['Windows_10.0.16184']: [5604, 10671], + ['Windows_10.0.16188']: [7028, 12852], + ['Windows_10.0.16193']: [6431, 9628], + ['Windows_6.1.7601']: [7794, 15194], + ['Windows_6.3.9600']: [6129, 10188], +}; + +const myPercentiles = percentiles[`${Platform[platform]}_${release()}`]; class PerformanceContribution implements IWorkbenchContribution { @@ -32,7 +74,6 @@ class PerformanceContribution implements IWorkbenchContribution { @IStorageService private _storageService: IStorageService, @IExtensionService extensionService: IExtensionService, ) { - const dumpFile = _envService.args['prof-startup-timers']; if (dumpFile) { // wait for extensions being loaded @@ -63,37 +104,58 @@ class PerformanceContribution implements IWorkbenchContribution { private _checkTimersAndSuggestToProfile() { - const disabled = true; - if (disabled) { + if (!this._timerService.isInitialStartup) { return; } - //TODO(joh) use better heuristics (70th percentile, not vm, etc) - const value = this._storageService.get(this.getId(), StorageScope.GLOBAL, undefined); - if (value !== undefined) { + // 1: Check that we have some data about this + // OS version to which we can compare this startup. + // Then only go for startups between the 80th and + // 90th percentile. + if (!Array.isArray(myPercentiles)) { + return; + } + const [from, to] = myPercentiles; + const { ellapsed } = this._timerService.startupMetrics; + if (ellapsed < from || ellapsed > to) { return; } + // 2: Ignore virtual machines and only ask users + // to profile with a certain propability if (virtualMachineHint.value() >= .5) { - // + return; + } + if (Math.ceil(Math.random() * 50) !== 1) { return; } - const { ellapsed } = this._timerService.startupMetrics; - if (ellapsed > 5000 && Math.ceil(Math.random() * 10) % 3 === 0) { - const profile = this._messageService.confirm({ - type: 'info', - message: localize('slow', "Slow startup detected"), - detail: localize('slow.detail', "Sorry that you just had a slow startup. Please restart '{0}' with profiling enabled, share the profiles with us, and we will work hard to make startup great again.", this._envService.appNameLong), - primaryButton: 'Restart and profile' - }); - - if (profile) { - this._storageService.store(this.getId(), 'didProfile', StorageScope.GLOBAL); - this._windowsService.relaunch({ addArgs: ['--prof-startup'] }); - } else { - this._storageService.store(this.getId(), 'didReject', StorageScope.GLOBAL); - } + // 3: Don't ask for the stable version, only + // ask once per version/build + if (this._envService.appQuality === 'stable') { + // don't ask in stable + return; + } + const mementoKey = `performance.didPromptToProfile.${product.commit}`; + const value = this._storageService.get(mementoKey, StorageScope.GLOBAL, undefined); + if (value !== undefined) { + // only ask once per version + return; + } + + + const profile = this._messageService.confirm({ + type: 'info', + message: localize('slow', "Slow startup detected"), + detail: localize('slow.detail', "Sorry that you just had a slow startup. Please restart '{0}' with profiling enabled, share the profiles with us, and we will work hard to make startup great again.", this._envService.appNameLong), + primaryButton: 'Restart and profile' + }); + + if (profile) { + this._storageService.store(mementoKey, 'didProfile', StorageScope.GLOBAL); + this._windowsService.relaunch({ addArgs: ['--prof-startup'] }); + } else { + this._storageService.store(mementoKey, 'didReject', StorageScope.GLOBAL); } } } From 147fee87b872801551482c0a1f8b8d85dbd45b22 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 18 May 2017 10:38:51 +0200 Subject: [PATCH 0673/2747] enable tslint for our workspace --- .vscode/settings.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 19cb4832e9933..ed5e39baa7fb2 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,7 +6,9 @@ ".git": true, ".build": true, "**/.DS_Store": true, - "build/**/*.js": { "when": "$(basename).ts" } + "build/**/*.js": { + "when": "$(basename).ts" + } }, "search.exclude": { "**/node_modules": true, @@ -16,6 +18,7 @@ "i18n/**": true, "extensions/**/out/**": true }, + "tslint.enable": true, "lcov.path": [ "./.build/coverage/lcov.info", "./.build/coverage-single/lcov.info" @@ -29,4 +32,4 @@ } } ] -} \ No newline at end of file +} From c6ad876e11ac9c687cf3d5a1f7b0bc33e8861695 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 18 May 2017 11:19:28 +0200 Subject: [PATCH 0674/2747] remove `prof-startup-timers` option --- .../environment/common/environment.ts | 1 - src/vs/platform/environment/node/argv.ts | 1 - .../performance.contribution.ts | 25 ++----------------- 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/src/vs/platform/environment/common/environment.ts b/src/vs/platform/environment/common/environment.ts index a1c53201b34c3..b7aee17d58400 100644 --- a/src/vs/platform/environment/common/environment.ts +++ b/src/vs/platform/environment/common/environment.ts @@ -37,7 +37,6 @@ export interface ParsedArgs { 'uninstall-extension'?: string | string[]; 'enable-proposed-api'?: string | string[]; 'open-url'?: string | string[]; - 'prof-startup-timers': string; 'skip-getting-started'?: boolean; } diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts index 9b90b9161bde0..52b2183bb92f2 100644 --- a/src/vs/platform/environment/node/argv.ts +++ b/src/vs/platform/environment/node/argv.ts @@ -22,7 +22,6 @@ const options: minimist.Opts = { 'debugBrkPluginHost', 'debugPluginHost', 'open-url', - 'prof-startup-timers', 'enable-proposed-api' ], boolean: [ diff --git a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts index 51ff51c8350cb..9021c0879b57e 100644 --- a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts +++ b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts @@ -6,13 +6,8 @@ 'use strict'; import { localize } from 'vs/nls'; -import { assign } from 'vs/base/common/objects'; -import { join } from 'path'; -import { generateUuid } from 'vs/base/common/uuid'; import { virtualMachineHint } from 'vs/base/node/id'; -import { TPromise } from 'vs/base/common/winjs.base'; import { Registry } from 'vs/platform/platform'; -import { writeFile } from 'vs/base/node/pfs'; import { IWindowsService } from 'vs/platform/windows/common/windows'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; @@ -74,15 +69,8 @@ class PerformanceContribution implements IWorkbenchContribution { @IStorageService private _storageService: IStorageService, @IExtensionService extensionService: IExtensionService, ) { - const dumpFile = _envService.args['prof-startup-timers']; - if (dumpFile) { - // wait for extensions being loaded - extensionService.onReady() - .then(() => TPromise.timeout(15000)) // time service isn't ready yet because it listens on the same event... - .then(() => this._dumpTimersAndQuit(dumpFile)) - .done(undefined, err => console.error(err)); - - } else if (!_envService.args['prof-startup']) { + + if (!_envService.args['prof-startup']) { // notify user of slow start setTimeout(() => { this._checkTimersAndSuggestToProfile(); @@ -94,14 +82,6 @@ class PerformanceContribution implements IWorkbenchContribution { return 'performance'; } - private _dumpTimersAndQuit(folder: string) { - const metrics = this._timerService.startupMetrics; - const id = generateUuid(); - const all = assign({ id, commit: product.commit }, metrics); - const raw = JSON.stringify(all); - return writeFile(join(folder, `timers-${id}.json`), raw).then(() => this._windowsService.quit()); - } - private _checkTimersAndSuggestToProfile() { if (!this._timerService.isInitialStartup) { @@ -143,7 +123,6 @@ class PerformanceContribution implements IWorkbenchContribution { return; } - const profile = this._messageService.confirm({ type: 'info', message: localize('slow', "Slow startup detected"), From 051ba11238f0a58ff2773b30d7968a49af2c45de Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 18 May 2017 11:33:52 +0200 Subject: [PATCH 0675/2747] :lipstick: --- .../performance.contribution.ts | 116 ++++++++---------- 1 file changed, 54 insertions(+), 62 deletions(-) diff --git a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts index 9021c0879b57e..f7b481f4c5015 100644 --- a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts +++ b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts @@ -11,7 +11,6 @@ import { Registry } from 'vs/platform/platform'; import { IWindowsService } from 'vs/platform/windows/common/windows'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; -import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { IMessageService } from 'vs/platform/message/common/message'; import { ITimerService } from 'vs/workbench/services/timer/common/timerService'; import { IWorkbenchContributionsRegistry, IWorkbenchContribution, Extensions } from 'vs/workbench/common/contributions'; @@ -19,63 +18,58 @@ import product from 'vs/platform/node/product'; import { platform, Platform } from 'vs/base/common/platform'; import { release } from 'os'; -const percentiles: { [key: string]: [number, number] } = { - // 80th - 90th percentiles - ['Linux_4.10.0-20-generic']: [3474, 6300], - ['Linux_4.10.0-21-generic']: [5342, 12022], - ['Linux_4.10.13-1-ARCH']: [3047, 4248], - ['Linux_4.10.13-200.fc25.x86_64']: [2380, 2895], - ['Linux_4.10.14-200.fc25.x86_64']: [5164, 14042], - ['Linux_4.4.0-21-generic']: [3777, 8160], - ['Linux_4.4.0-72-generic']: [6173, 10730], - ['Linux_4.4.0-75-generic']: [4769, 8560], - ['Linux_4.4.0-77-generic']: [3834, 7343], - ['Linux_4.4.0-78-generic']: [3115, 7078], - ['Linux_4.8.0-49-generic']: [7174, 10362], - ['Linux_4.8.0-51-generic']: [3906, 7385], - ['Linux_4.8.0-52-generic']: [6757, 13741], - ['Linux_4.9.0-2-amd64']: [4348, 8754], - ['Mac_14.5.0']: [4403, 7216], - ['Mac_15.4.0']: [3831, 4946], - ['Mac_15.5.0']: [5080, 8296], - ['Mac_15.6.0']: [4621, 7160], - ['Mac_16.0.0']: [4748, 11248], - ['Mac_16.1.0']: [4309, 6106], - ['Mac_16.3.0']: [2756, 3674], - ['Mac_16.4.0']: [3625, 5463], - ['Mac_16.5.0']: [3617, 5288], - ['Mac_16.6.0']: [3655, 5279], - ['Mac_16.7.0']: [4415, 6624], - ['Windows_10.0.10240']: [8284, 14438], - ['Windows_10.0.10586']: [5903, 9224], - ['Windows_10.0.14393']: [6065, 10567], - ['Windows_10.0.15063']: [5521, 8696], - ['Windows_10.0.16184']: [5604, 10671], - ['Windows_10.0.16188']: [7028, 12852], - ['Windows_10.0.16193']: [6431, 9628], - ['Windows_6.1.7601']: [7794, 15194], - ['Windows_6.3.9600']: [6129, 10188], -}; - -const myPercentiles = percentiles[`${Platform[platform]}_${release()}`]; - -class PerformanceContribution implements IWorkbenchContribution { + +class ProfilingHint implements IWorkbenchContribution { + + // p80 to p90 by os&release + static readonly _percentiles: { [key: string]: [number, number] } = { + ['Linux_4.10.0-20-generic']: [3474, 6300], + ['Linux_4.10.0-21-generic']: [5342, 12022], + ['Linux_4.10.13-1-ARCH']: [3047, 4248], + ['Linux_4.10.13-200.fc25.x86_64']: [2380, 2895], + ['Linux_4.10.14-200.fc25.x86_64']: [5164, 14042], + ['Linux_4.4.0-21-generic']: [3777, 8160], + ['Linux_4.4.0-72-generic']: [6173, 10730], + ['Linux_4.4.0-75-generic']: [4769, 8560], + ['Linux_4.4.0-77-generic']: [3834, 7343], + ['Linux_4.4.0-78-generic']: [3115, 7078], + ['Linux_4.8.0-49-generic']: [7174, 10362], + ['Linux_4.8.0-51-generic']: [3906, 7385], + ['Linux_4.8.0-52-generic']: [6757, 13741], + ['Linux_4.9.0-2-amd64']: [4348, 8754], + ['Mac_14.5.0']: [4403, 7216], + ['Mac_15.4.0']: [3831, 4946], + ['Mac_15.5.0']: [5080, 8296], + ['Mac_15.6.0']: [4621, 7160], + ['Mac_16.0.0']: [4748, 11248], + ['Mac_16.1.0']: [4309, 6106], + ['Mac_16.3.0']: [2756, 3674], + ['Mac_16.4.0']: [3625, 5463], + ['Mac_16.5.0']: [3617, 5288], + ['Mac_16.6.0']: [3655, 5279], + ['Mac_16.7.0']: [4415, 6624], + ['Windows_10.0.10240']: [8284, 14438], + ['Windows_10.0.10586']: [5903, 9224], + ['Windows_10.0.14393']: [6065, 10567], + ['Windows_10.0.15063']: [5521, 8696], + ['Windows_10.0.16184']: [5604, 10671], + ['Windows_10.0.16188']: [7028, 12852], + ['Windows_10.0.16193']: [6431, 9628], + ['Windows_6.1.7601']: [7794, 15194], + ['Windows_6.3.9600']: [6129, 10188], + }; + + private static readonly _myPercentiles = ProfilingHint._percentiles[`${Platform[platform]}_${release()}`]; constructor( @IWindowsService private _windowsService: IWindowsService, @ITimerService private _timerService: ITimerService, @IMessageService private _messageService: IMessageService, @IEnvironmentService private _envService: IEnvironmentService, - @IStorageService private _storageService: IStorageService, - @IExtensionService extensionService: IExtensionService, + @IStorageService private _storageService: IStorageService ) { - if (!_envService.args['prof-startup']) { - // notify user of slow start - setTimeout(() => { - this._checkTimersAndSuggestToProfile(); - }, 5000); - } + setTimeout(() => this._checkTimersAndSuggestToProfile(), 5000); } getId(): string { @@ -84,33 +78,31 @@ class PerformanceContribution implements IWorkbenchContribution { private _checkTimersAndSuggestToProfile() { - if (!this._timerService.isInitialStartup) { + // Only initial startups, not when already profiling + if (!this._timerService.isInitialStartup || this._envService.args['prof-startup']) { return; } - // 1: Check that we have some data about this + // Check that we have some data about this // OS version to which we can compare this startup. // Then only go for startups between the 80th and // 90th percentile. - if (!Array.isArray(myPercentiles)) { + if (!Array.isArray(ProfilingHint._myPercentiles)) { return; } - const [from, to] = myPercentiles; + const [p80, p90] = ProfilingHint._myPercentiles; const { ellapsed } = this._timerService.startupMetrics; - if (ellapsed < from || ellapsed > to) { + if (ellapsed < p80 || ellapsed > p90) { return; } - // 2: Ignore virtual machines and only ask users + // Ignore virtual machines and only ask users // to profile with a certain propability - if (virtualMachineHint.value() >= .5) { - return; - } - if (Math.ceil(Math.random() * 50) !== 1) { + if (virtualMachineHint.value() >= .5 || Math.ceil(Math.random() * 50) !== 1) { return; } - // 3: Don't ask for the stable version, only + // Don't ask for the stable version, only // ask once per version/build if (this._envService.appQuality === 'stable') { // don't ask in stable @@ -140,4 +132,4 @@ class PerformanceContribution implements IWorkbenchContribution { } const registry = Registry.as(Extensions.Workbench); -registry.registerWorkbenchContribution(PerformanceContribution); +registry.registerWorkbenchContribution(ProfilingHint); From 694a0c3c63a1205b827ed3c5edec28fe0f7a1044 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 11:55:42 +0200 Subject: [PATCH 0676/2747] fix install distro step --- build/tfs/darwin/build.sh | 2 +- build/tfs/win32/1_build.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index 88e4e11648ca1..0a17036d857b8 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -19,7 +19,7 @@ step "Mix in repository from vscode-distro" \ npm run gulp -- mixin step "Install distro dependencies" \ - npm run install-distro + node build/tfs/common/installDistro.js step "Build minified & upload source maps" \ npm run gulp -- --max_old_space_size=4096 vscode-darwin-min upload-vscode-sourcemaps diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index 926aa3ebfedfd..a177c4b82e0e6 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -21,7 +21,7 @@ step "Mix in repository from vscode-distro" { } step "Install distro dependencies" { - exec { & npm run install-distro } + exec { & node build\tfs\common\installDistro.js } } step "Build minified" { From dc8e7e046903eea857192ba21ac6b00995769bda Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 18 May 2017 12:01:16 +0200 Subject: [PATCH 0677/2747] Fixes #23983: Calling model.setEOL does not reset cursor position --- src/vs/editor/common/model/textModel.ts | 2 +- src/vs/editor/common/model/textModelEvents.ts | 13 ++++++- .../editor/common/viewModel/viewModelImpl.ts | 4 ++ .../test/common/controller/cursor.test.ts | 38 ++++++++++++++++++- 4 files changed, 53 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/common/model/textModel.ts b/src/vs/editor/common/model/textModel.ts index a84d56ad65b17..7654eec15867e 100644 --- a/src/vs/editor/common/model/textModel.ts +++ b/src/vs/editor/common/model/textModel.ts @@ -588,7 +588,7 @@ export class TextModel implements editorCommon.ITextModel { this._emitModelRawContentChangedEvent( new textModelEvents.ModelRawContentChangedEvent( [ - new textModelEvents.ModelRawFlush() + new textModelEvents.ModelRawEOLChanged() ], this._versionId, false, diff --git a/src/vs/editor/common/model/textModelEvents.ts b/src/vs/editor/common/model/textModelEvents.ts index 05e0d478f067b..53103be6e27dd 100644 --- a/src/vs/editor/common/model/textModelEvents.ts +++ b/src/vs/editor/common/model/textModelEvents.ts @@ -124,7 +124,8 @@ export const enum RawContentChangedType { Flush = 1, LineChanged = 2, LinesDeleted = 3, - LinesInserted = 4 + LinesInserted = 4, + EOLChanged = 5 } /** @@ -204,9 +205,17 @@ export class ModelRawLinesInserted { } /** + * An event describing that a model has had its EOL changed. * @internal */ -export type ModelRawChange = ModelRawFlush | ModelRawLineChanged | ModelRawLinesDeleted | ModelRawLinesInserted; +export class ModelRawEOLChanged { + public readonly changeType = RawContentChangedType.EOLChanged; +} + +/** + * @internal + */ +export type ModelRawChange = ModelRawFlush | ModelRawLineChanged | ModelRawLinesDeleted | ModelRawLinesInserted | ModelRawEOLChanged; /** * An event describing a change in the text of a model. diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index 193e852523c62..34e254267dd43 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -317,6 +317,10 @@ export class ViewModel extends ViewEventEmitter implements IViewModel { } break; } + case textModelEvents.RawContentChangedType.EOLChanged: { + // Nothing to do. The new version will be accepted below + break; + } } } this.lines.acceptVersionId(versionId); diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index 37e3426c3c7d0..e528da7f733c8 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -13,7 +13,7 @@ import { Selection } from 'vs/editor/common/core/selection'; import { EndOfLinePreference, Handler, DefaultEndOfLine, ITextModelCreationOptions, ICommand, - ITokenizedModel, IEditOperationBuilder, ICursorStateComputerData + ITokenizedModel, IEditOperationBuilder, ICursorStateComputerData, EndOfLineSequence } from 'vs/editor/common/editorCommon'; import { Model } from 'vs/editor/common/model/model'; import { IndentAction, IndentationRule } from 'vs/editor/common/modes/languageConfiguration'; @@ -1751,6 +1751,42 @@ suite('Editor Controller - Regression tests', () => { assert.equal(cursor.getSelections()[LINE_CNT - 1].startLineNumber, LINE_CNT); }); }); + + test('issue #23983: Calling model.setEOL does not reset cursor position', () => { + usingCursor({ + text: [ + 'first line', + 'second line' + ] + }, (model, cursor) => { + model.setEOL(EndOfLineSequence.CRLF); + + cursor.setSelections('test', [new Selection(2, 2, 2, 2)]); + model.setEOL(EndOfLineSequence.LF); + + assertCursor(cursor, new Selection(2, 2, 2, 2)); + }); + }); + + test('issue #23983: Calling model.setValue() resets cursor position', () => { + usingCursor({ + text: [ + 'first line', + 'second line' + ] + }, (model, cursor) => { + model.setEOL(EndOfLineSequence.CRLF); + + cursor.setSelections('test', [new Selection(2, 2, 2, 2)]); + model.setValue([ + 'different first line', + 'different second line', + 'new third line' + ].join('\n')); + + assertCursor(cursor, new Selection(1, 1, 1, 1)); + }); + }); }); suite('Editor Controller - Cursor Configuration', () => { From 795edc34d2c42ce81b80fec36e6413aba08a583e Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 May 2017 11:14:08 +0200 Subject: [PATCH 0678/2747] [coffee] update grammar --- .../coffeescript/syntaxes/coffeescript.tmLanguage.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json b/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json index 10fcd7023b17e..d7c22867d7667 100644 --- a/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json +++ b/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json @@ -183,7 +183,7 @@ "name": "string.regexp.coffee" }, { - "match": "\\b(? Date: Thu, 18 May 2017 12:04:18 +0200 Subject: [PATCH 0679/2747] [java] switch to atom/language-java grammar --- extensions/java/OSSREADME.json | 43 +- extensions/java/package.json | 5 +- extensions/java/syntaxes/java.tmLanguage.json | 1069 +++++++++++------ .../java/syntaxes/javadoc.tmLanguage.json | 432 ------- .../test/colorize-results/basic_java.json | 641 +++++----- extensions/theme-defaults/themes/dark_vs.json | 1 + .../themes/hc_black_defaults.json | 6 +- .../theme-defaults/themes/light_vs.json | 1 + 8 files changed, 1085 insertions(+), 1113 deletions(-) delete mode 100644 extensions/java/syntaxes/javadoc.tmLanguage.json diff --git a/extensions/java/OSSREADME.json b/extensions/java/OSSREADME.json index 6a2da0d287bd6..c87e957510ba8 100644 --- a/extensions/java/OSSREADME.json +++ b/extensions/java/OSSREADME.json @@ -1,42 +1,9 @@ // ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS: [{ - "name": "textmate/java.tmbundle", + "name": "atom/language-java", "version": "0.0.0", - "license": "TextMate Bundle License", - "repositoryURL": "https://github.com/textmate/java.tmbundle", - "licenseDetail": [ - "Copyright (c) textmate-java.tmbundle project authors", - "", - "If not otherwise specified (see below), files in this repository fall under the following license:", - "", - "Permission to copy, use, modify, sell and distribute this", - "software is granted. This software is provided \"as is\" without", - "express or implied warranty, and with no claim as to its", - "suitability for any purpose.", - "", - "An exception is made for files in readable text which contain their own license information,", - "or files where an accompanying file exists (in the same directory) with a \"-license\" suffix added", - "to the base-name name of the original file, and an extension of txt, html, or similar. For example", - "\"tidy\" is accompanied by \"tidy-license.txt\"." - ] -},{ - "name": "textmate/javadoc.tmbundle", - "version": "0.0.0", - "license": "TextMate Bundle License", - "repositoryURL": "https://github.com/textmate/javadoc.tmbundle", - "licenseDetail": [ - "Copyright (c) textmate-javadoc.tmbundle project authors", - "", - "If not otherwise specified (see below), files in this repository fall under the following license:", - "", - "Permission to copy, use, modify, sell and distribute this", - "software is granted. This software is provided \"as is\" without", - "express or implied warranty, and with no claim as to its", - "suitability for any purpose.", - "", - "An exception is made for files in readable text which contain their own license information,", - "or files where an accompanying file exists (in the same directory) with a \"-license\" suffix added", - "to the base-name name of the original file, and an extension of txt, html, or similar. For example", - "\"tidy\" is accompanied by \"tidy-license.txt\"." - ] + "license": "MIT", + "repositoryURL": "https://github.com/atom/language-java", + "description": "The file syntaxes/java.tmLanguage.json was derived from the Atom package https://github.com/atom/language-java which was originally converted from the TextMate bundle https://github.com/textmate/java.tmbundle." + }] diff --git a/extensions/java/package.json b/extensions/java/package.json index ee0e7e616abe1..d8c9375f0c3b5 100644 --- a/extensions/java/package.json +++ b/extensions/java/package.json @@ -4,7 +4,7 @@ "publisher": "vscode", "engines": { "vscode": "*" }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js textmate/java.tmbundle Syntaxes/Java.plist ./syntaxes/java.tmLanguage.json && node ../../build/npm/update-grammar.js textmate/javadoc.tmbundle Syntaxes/JavaDoc.tmLanguage ./syntaxes/javadoc.tmLanguage.json" + "update-grammar": "node ../../build/npm/update-grammar.js atom/language-java grammars/java.cson ./syntaxes/java.tmLanguage.json" }, "contributes": { "languages": [{ @@ -17,9 +17,6 @@ "language": "java", "scopeName": "source.java", "path": "./syntaxes/java.tmLanguage.json" - },{ - "scopeName": "text.html.javadoc", - "path": "./syntaxes/javadoc.tmLanguage.json" }] } } \ No newline at end of file diff --git a/extensions/java/syntaxes/java.tmLanguage.json b/extensions/java/syntaxes/java.tmLanguage.json index f0fcef2d0651f..5d0513d49b0f1 100644 --- a/extensions/java/syntaxes/java.tmLanguage.json +++ b/extensions/java/syntaxes/java.tmLanguage.json @@ -1,100 +1,99 @@ { + "scopeName": "source.java", + "name": "Java", "fileTypes": [ "java", "bsh" ], - "keyEquivalent": "^~J", - "name": "Java", "patterns": [ { - "captures": { - "1": { - "name": "keyword.other.package.java" - }, - "2": { - "name": "storage.modifier.package.java" - }, - "3": { - "name": "punctuation.terminator.java" - } - }, - "match": "^\\s*(package)\\b(?:\\s*([^ ;$]+)\\s*(;)?)?", - "name": "meta.package.java" - }, - { - "begin": "(import static)\\b\\s*", + "begin": "\\b(package)\\b\\s*", "beginCaptures": { "1": { - "name": "keyword.other.import.static.java" - } - }, - "captures": { - "1": { - "name": "keyword.other.import.java" - }, - "2": { - "name": "storage.modifier.import.java" - }, - "3": { - "name": "punctuation.terminator.java" + "name": "keyword.other.package.java" } }, - "contentName": "storage.modifier.import.java", - "end": "\\s*(?:$|(;))", + "end": "\\s*(;)", "endCaptures": { "1": { "name": "punctuation.terminator.java" } }, - "name": "meta.import.java", + "name": "meta.package.java", + "contentName": "storage.modifier.package.java", "patterns": [ { - "match": "\\.", - "name": "punctuation.separator.java" + "include": "#comments" + }, + { + "match": "(?<=\\.)\\s*\\.|\\.(?=\\s*;)", + "name": "invalid.illegal.character_not_allowed_here.java" }, { - "match": "\\s", + "match": "(?\n\t\t\t\t\t\t\t0[xX]\t\t\t\t\t\t\t\t\t# Start literal\n\t\t\t\t\t\t\t(\\h([\\h_]*\\h)?)?\t\t\t\t\t\t# Optional Number\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(?<=\\h)\\.\t\t\t\t\t\t\t# A number must exist on\n\t\t\t\t\t\t | \\.(?=\\h)\t\t\t\t\t\t\t# one side of the decimal\n\t\t\t\t\t\t | (?<=\\h)\t\t\t\t\t\t\t\t# Decimal not required\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t(\\h([\\h_]*\\h)?)?\t\t\t\t\t\t# Optional Number\n\t\t\t\t\t\t\t[pP]\t\t\t\t\t\t\t\t\t# Exponent Indicator\n\t\t\t\t\t\t\t[+-]?(0|[1-9]([0-9_]*[0-9])?)\t\t\t# Signed Integer\n\t\t\t\t\t\t\t[fFdD]?\t\t\t\t\t\t\t\t\t# Float Type Suffix\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?!\\w)\t\t\t\t\t\t\t\t\t\t# Ensure word boundry\n\t\t\t\t\t", - "name": "constant.numeric.hex-float.java" - }, - { - "match": "(?x)\n\t\t\t\t\t\t(?\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(0|[1-9]([0-9_]*[0-9])?)\t\t\t\t# Leading digits\n\t\t\t\t\t\t\t\t(?=[eEfFdD.])\t\t\t\t\t\t\t# Allow for numbers without .\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t(?<=[0-9])(?=[eEfFdD])\t\t\t\t\t# Allow for numbers without .\n\t\t\t\t\t\t\t | \\.\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t[0-9]([0-9_]*[0-9])?\t\t\t\t\t# Numbers after .\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t[eE][+-]?(0|[1-9]([0-9_]*[0-9])?)\t\t# Exponent\n\t\t\t\t\t\t\t)?\n\t\t\t\t\t\t\t[fFdD]?\t\t\t\t\t\t\t\t\t\t# Float Type Suffix\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?!\\w)\t\t\t\t\t\t\t\t\t\t\t# Ensure word boundry\n\t\t\t\t\t", - "name": "constant.numeric.float.java" - }, - { - "captures": { - "1": { - "name": "keyword.operator.dereference.java" + "begin": "^\\s*/\\*\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.java" } }, - "match": "(\\.)?\\b([A-Z][A-Z0-9_]+)(?!<|\\.class|\\s*\\w+\\s*=)\\b", - "name": "constant.other.java" - } - ] - }, - "enums": { - "begin": "^(?=\\s*[A-Z0-9_]+\\s*({|\\(|,))", - "end": "(?=;|})", - "patterns": [ - { - "begin": "\\w+", - "beginCaptures": { + "end": "\\*/", + "endCaptures": { "0": { - "name": "constant.other.enum.java" + "name": "punctuation.definition.comment.java" } }, - "end": "(?=,|;|})", - "name": "meta.enum.java", + "name": "comment.block.javadoc.java", "patterns": [ { - "include": "#parens" + "match": "@(author|deprecated|return|see|serial|since|version)\\b", + "name": "keyword.other.documentation.javadoc.java" }, { - "begin": "{", - "beginCaptures": { - "0": { - "name": "punctuation.section.enum.begin.java" - } - }, - "end": "}", - "endCaptures": { - "0": { - "name": "punctuation.section.enum.end.java" - } - }, - "patterns": [ - { - "include": "#class-body" + "match": "(@param)\\s+(\\S+)", + "captures": { + "1": { + "name": "keyword.other.documentation.javadoc.java" + }, + "2": { + "name": "variable.parameter.java" + } + } + }, + { + "match": "(@(?:exception|throws))\\s+(\\S+)", + "captures": { + "1": { + "name": "keyword.other.documentation.javadoc.java" + }, + "2": { + "name": "entity.name.type.class.java" + } + } + }, + { + "match": "{(@link)\\s+(\\S+)?#([\\w$]+\\s*\\([^\\(\\)]*\\)).*}", + "captures": { + "1": { + "name": "keyword.other.documentation.javadoc.java" + }, + "2": { + "name": "entity.name.type.class.java" + }, + "3": { + "name": "variable.parameter.java" + } + } + } + ] + } + ] + }, + "try-catch-finally": { + "patterns": [ + { + "begin": "\\btry\\b", + "beginCaptures": { + "0": { + "name": "keyword.control.try.java" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.try.end.bracket.curly.java" + } + }, + "name": "meta.try.java", + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.section.try.resources.begin.bracket.round.java" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.section.try.resources.end.bracket.round.java" + } + }, + "name": "meta.try.resources.java", + "patterns": [ + { + "include": "#code" + } + ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.try.begin.bracket.curly.java" + } + }, + "end": "(?=})", + "contentName": "meta.try.body.java", + "patterns": [ + { + "include": "#code" + } + ] + } + ] + }, + { + "begin": "\\b(catch)\\b\\s*(?=\\(\\s*[^\\s]+\\s*[^)]+\\))", + "beginCaptures": { + "1": { + "name": "keyword.control.catch.java" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.catch.end.bracket.curly.java" + } + }, + "name": "meta.catch.java", + "patterns": [ + { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.definition.parameters.begin.bracket.round.java" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.java" + } + }, + "contentName": "meta.catch.parameters.java", + "patterns": [ + { + "include": "#parameters" + } + ] + }, + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.catch.begin.bracket.curly.java" + } + }, + "end": "(?=})", + "contentName": "meta.catch.body.java", + "patterns": [ + { + "include": "#code" } ] } ] }, + { + "begin": "\\bfinally\\b", + "beginCaptures": { + "0": { + "name": "keyword.control.finally.java" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.finally.end.bracket.curly.java" + } + }, + "name": "meta.finally.java", + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.finally.begin.bracket.curly.java" + } + }, + "end": "(?=})", + "contentName": "meta.finally.body.java", + "patterns": [ + { + "include": "#code" + } + ] + } + ] + } + ] + }, + "constants-and-special-vars": { + "patterns": [ + { + "match": "\\b(true|false|null)\\b", + "name": "constant.language.java" + }, + { + "match": "\\bthis\\b", + "name": "variable.language.this.java" + }, + { + "match": "\\bsuper\\b", + "name": "variable.language.java" + } + ] + }, + "generics": { + "begin": "<", + "beginCaptures": { + "0": { + "name": "punctuation.bracket.angle.java" + } + }, + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.bracket.angle.java" + } + }, + "patterns": [ + { + "match": "\\b(extends|super)\\b", + "name": "storage.modifier.$1.java" + }, + { + "match": "([a-zA-Z$_][a-zA-Z0-9$_]*)(?=\\s*<)", + "captures": { + "1": { + "name": "storage.type.java" + } + } + }, + { + "match": "[a-zA-Z$_][a-zA-Z0-9$_]*", + "name": "storage.type.generic.java" + }, + { + "match": "\\?", + "name": "storage.type.generic.wildcard.java" + }, + { + "match": "&", + "name": "punctuation.separator.types.java" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.java" + }, + { + "include": "#parens" + }, + { + "include": "#generics" + }, + { + "include": "#comments" + } + ] + }, + "enums": { + "begin": "^\\s*(enum)\\s+(\\w+)", + "beginCaptures": { + "1": { + "name": "storage.modifier.java" + }, + "2": { + "name": "entity.name.type.enum.java" + } + }, + "end": "}", + "endCaptures": { + "0": { + "name": "punctuation.section.enum.end.bracket.curly.java" + } + }, + "name": "meta.enum.java", + "patterns": [ + { + "begin": "{", + "beginCaptures": { + "0": { + "name": "punctuation.section.enum.begin.bracket.curly.java" + } + }, + "end": "(?=})", + "patterns": [ + { + "match": "\\w+", + "name": "constant.other.enum.java" + }, + { + "include": "#class-body" + } + ] + }, { "include": "#comments" + } + ] + }, + "function-call": { + "begin": "([A-Za-z_$][\\w$]*)\\s*(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.java" }, + "2": { + "name": "punctuation.definition.parameters.begin.bracket.round.java" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.java" + } + }, + "name": "meta.function-call.java", + "patterns": [ { - "include": "#annotations" + "include": "#code" } ] }, "keywords": { "patterns": [ { - "match": "\\b(try|catch|finally|throw)\\b", - "name": "keyword.control.catch-exception.java" + "match": "\\bthrow\\b", + "name": "keyword.control.throw.java" }, { "match": "\\?|:", @@ -604,7 +851,7 @@ }, { "match": "\\b(instanceof)\\b", - "name": "keyword.operator.java" + "name": "keyword.operator.instanceof.java" }, { "match": "(<<|>>>?|~|\\^)", @@ -641,39 +888,38 @@ { "match": "(\\||&)", "name": "keyword.operator.bitwise.java" - }, - { - "match": "(?<=\\S)\\.(?=\\S)", - "name": "keyword.operator.dereference.java" - }, + } + ] + }, + "lambda-expression": { + "patterns": [ { - "match": ";", - "name": "punctuation.terminator.java" + "match": "->", + "name": "storage.type.function.arrow.java" } ] }, "method-call": { - "begin": "([\\w$]+)(\\()", + "begin": "(\\.)\\s*([A-Za-z_$][\\w$]*)\\s*(\\()", "beginCaptures": { "1": { - "name": "meta.method.java" + "name": "punctuation.separator.period.java" }, "2": { - "name": "punctuation.definition.method-parameters.begin.java" + "name": "entity.name.function.java" + }, + "3": { + "name": "punctuation.definition.parameters.begin.bracket.round.java" } }, "end": "\\)", "endCaptures": { "0": { - "name": "punctuation.definition.method-parameters.end.java" + "name": "punctuation.definition.parameters.end.bracket.round.java" } }, "name": "meta.method-call.java", "patterns": [ - { - "match": ",", - "name": "punctuation.definition.seperator.parameter.java" - }, { "include": "#code" } @@ -684,7 +930,7 @@ "end": "(})|(?=;)", "endCaptures": { "1": { - "name": "punctuation.section.method.end.java" + "name": "punctuation.section.method.end.bracket.curly.java" } }, "name": "meta.method.java", @@ -693,49 +939,47 @@ "include": "#storage-modifiers" }, { - "begin": "(\\w+)\\s*\\(", + "begin": "(\\w+)\\s*(\\()", "beginCaptures": { "1": { "name": "entity.name.function.java" + }, + "2": { + "name": "punctuation.definition.parameters.begin.bracket.round.java" } }, "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.end.bracket.round.java" + } + }, "name": "meta.method.identifier.java", "patterns": [ { "include": "#parameters" }, { - "include": "#comments" - } - ] - }, - { - "begin": "<", - "end": ">", - "name": "storage.type.token.java", - "patterns": [ - { - "include": "#object-types" + "include": "#parens" }, { - "begin": "<", - "comment": "This is just to support <>'s with no actual type prefix", - "end": ">|[^\\w\\s,\\[\\]<]", - "name": "storage.type.generic.java" + "include": "#comments-inline" } ] }, + { + "include": "#generics" + }, { "begin": "(?=\\w.*\\s+\\w+\\s*\\()", - "end": "(?=\\w+\\s*\\()", + "end": "(?=\\s+\\w+\\s*\\()", "name": "meta.method.return-type.java", "patterns": [ { "include": "#all-types" }, { - "include": "#comments" + "include": "#parens" } ] }, @@ -746,11 +990,11 @@ "begin": "{", "beginCaptures": { "0": { - "name": "punctuation.section.method.begin.java" + "name": "punctuation.section.method.begin.bracket.curly.java" } }, "end": "(?=})", - "name": "meta.method.body.java", + "contentName": "meta.method.body.java", "patterns": [ { "include": "#code" @@ -762,136 +1006,251 @@ } ] }, + "numbers": { + "patterns": [ + { + "match": "(?x)\n\\b(?|[^\\w\\s,\\?<\\[\\]]", - "name": "storage.type.generic.java", + "include": "#generics" + }, + { + "begin": "\\b(?:[A-Z]\\w*\\s*(\\.)\\s*)*([A-Z]\\w*)\\s*(?=\\[)", + "beginCaptures": { + "1": { + "name": "punctuation.separator.period.java" + }, + "2": { + "name": "storage.type.object.array.java" + } + }, + "end": "(?!\\s*\\[)", "patterns": [ { - "include": "#object-types" + "include": "#comments" }, { - "begin": "<", - "comment": "This is just to support <>'s with no actual type prefix", - "end": ">|[^\\w\\s,\\[\\]<]", - "name": "storage.type.generic.java" + "include": "#parens" } ] }, { - "begin": "\\b((?:[a-z]\\w*\\.)*[A-Z]+\\w*)(?=\\[)", - "end": "(?=[^\\]\\s])", - "name": "storage.type.object.array.java", + "begin": "\\b(?:[A-Z]\\w*\\s*(\\.)\\s*)*[A-Z]\\w*\\s*(?=<)", + "beginCaptures": { + "0": { + "name": "storage.type.java" + }, + "1": { + "name": "punctuation.separator.period.java" + } + }, + "end": "(?<=>)", "patterns": [ { - "begin": "\\[", - "end": "\\]", - "patterns": [ - { - "include": "#code" - } - ] + "include": "#generics" } ] }, { + "match": "\\b(?:[A-Z]\\w*\\s*(\\.)\\s*)*[A-Z]\\w*\\b", + "name": "storage.type.java", "captures": { "1": { - "name": "keyword.operator.dereference.java" + "name": "punctuation.separator.period.java" } - }, - "match": "\\b(?:[a-z]\\w*(\\.))*[A-Z]+\\w*\\b", - "name": "storage.type.java" + } } ] }, "object-types-inherited": { "patterns": [ { - "begin": "\\b((?:[a-z]\\w*\\.)*[A-Z]+\\w*)<", - "end": ">|[^\\w\\s,<]", - "name": "entity.other.inherited-class.java", - "patterns": [ - { - "include": "#object-types" - }, - { - "begin": "<", - "comment": "This is just to support <>'s with no actual type prefix", - "end": ">|[^\\w\\s,<]", - "name": "storage.type.generic.java" - } - ] + "include": "#generics" }, { + "match": "\\b(?:[A-Z]\\w*\\s*(\\.)\\s*)*[A-Z]\\w*\\b", + "name": "entity.other.inherited-class.java", "captures": { "1": { - "name": "keyword.operator.dereference.java" + "name": "punctuation.separator.period.java" } - }, - "match": "\\b(?:[a-z]\\w*(\\.))*[A-Z]+\\w*", - "name": "entity.other.inherited-class.java" + } + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.java" } ] }, + "objects": { + "match": "(?\\[\\],][\\w<>\\[\\],?\\s]*)?\n \\s+\n [A-Za-z_$][\\w$]* # At least one identifier after space\n ([\\w\\[\\],$][\\w\\[\\],\\s]*)? # possibly primitive array or additional identifiers\n \\s*(=|;)\n))", + "end": "(?=;)", + "name": "meta.definition.variable.java", "patterns": [ { - "include": "#strings" + "match": "([A-Za-z$_][\\w$]*)(?=\\s*(\\[\\])*\\s*(;|=|,))", + "captures": { + "1": { + "name": "variable.other.definition.java" + } + } }, { - "include": "#object-types" + "include": "#all-types" }, { - "include": "#constants-and-special-vars" - } - ] - }, - "variables": { - "applyEndPatternLast": 1, - "patterns": [ - { - "begin": "(?x:(?=\n (?:\n (?:private|protected|public|native|synchronized|volatile|abstract|threadsafe|transient|static|final) # visibility/modifier\n |\n (?:def)\n |\n (?:void|boolean|byte|char|short|int|float|long|double)\n |\n (?:(?:[a-z]\\w*\\.)*[A-Z]+\\w*) # object type\n )\n \\s+\n (?!private|protected|public|native|synchronized|volatile|abstract|threadsafe|transient|static|final|def|void|boolean|byte|char|short|int|float|long|double)\n [\\w\\d_<>\\[\\],\\?][\\w\\d_<>\\[\\],\\? \\t]*\n (?:=|$)\n \n\t\t\t\t\t))", + "begin": "=", + "beginCaptures": { + "0": { + "name": "keyword.operator.assignment.java" + } + }, "end": "(?=;)", - "name": "meta.definition.variable.java", "patterns": [ - { - "match": "\\s" - }, - { - "captures": { - "1": { - "name": "constant.other.variable.java" - } - }, - "match": "([A-Z_0-9]+)\\s+(?=\\=)" - }, - { - "captures": { - "1": { - "name": "meta.definition.variable.name.java" - } - }, - "match": "(\\w[^\\s,]*)\\s+(?=\\=)" - }, - { - "begin": "=", - "beginCaptures": { - "0": { - "name": "keyword.operator.assignment.java" - } - }, - "end": "(?=;)", - "patterns": [ - { - "include": "#code" - } - ] - }, - { - "captures": { - "1": { - "name": "meta.definition.variable.name.java" - } - }, - "match": "(\\w[^\\s=]*)(?=\\s*;)" - }, { "include": "#code" } ] + }, + { + "include": "#code" + } + ] + }, + "member-variables": { + "begin": "(?=private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final)", + "end": "(?=;)", + "patterns": [ + { + "include": "#storage-modifiers" + }, + { + "include": "#variables" } ] } }, - "scopeName": "source.java", - "uuid": "2B449DF6-6B1D-11D9-94EC-000D93589AF6", - "version": "https://github.com/textmate/java.tmbundle/commit/faffa518d0b22b68b4e5e6b4c939722522b97d40" + "version": "https://github.com/atom/language-java/commit/0e0ec7966059e3e363868311b3d855014bca95dd" } \ No newline at end of file diff --git a/extensions/java/syntaxes/javadoc.tmLanguage.json b/extensions/java/syntaxes/javadoc.tmLanguage.json deleted file mode 100644 index a47e5c98d04df..0000000000000 --- a/extensions/java/syntaxes/javadoc.tmLanguage.json +++ /dev/null @@ -1,432 +0,0 @@ -{ - "fileTypes": [], - "name": "JavaDoc", - "patterns": [ - { - "begin": "(/\\*\\*)\\s*$", - "beginCaptures": { - "1": { - "name": "punctuation.definition.comment.begin.javadoc" - } - }, - "contentName": "text.html", - "end": "\\*/", - "endCaptures": { - "0": { - "name": "punctuation.definition.comment.end.javadoc" - } - }, - "name": "comment.block.documentation.javadoc", - "patterns": [ - { - "include": "#inline" - }, - { - "begin": "((\\@)param)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.param.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.param.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)return)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.return.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.return.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)throws)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.throws.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.throws.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)exception)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.exception.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.exception.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)author)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.author.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.author.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)version)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.version.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.version.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)see)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.see.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.see.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)since)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.since.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.since.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)serial)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.serial.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.serial.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)serialField)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.serialField.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.serialField.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)serialData)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.serialData.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.serialData.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "begin": "((\\@)deprecated)", - "beginCaptures": { - "1": { - "name": "keyword.other.documentation.deprecated.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "end": "(?=^\\s*\\*?\\s*@|\\*/)", - "name": "meta.documentation.tag.deprecated.javadoc", - "patterns": [ - { - "include": "#inline" - } - ] - }, - { - "captures": { - "1": { - "name": "keyword.other.documentation.custom.javadoc" - }, - "2": { - "name": "punctuation.definition.keyword.javadoc" - } - }, - "match": "((\\@)\\S+)\\s" - } - ] - } - ], - "repository": { - "inline": { - "patterns": [ - { - "include": "#inline-formatting" - }, - { - "comment": "This prevents < characters in commented source from starting\n\t\t\t\t\t\t\t\ta tag that will not end. List of allowed tags taken from\n\t\t\t\t\t\t\t\tjava checkstyle.", - "match": "<(?!/?(a|abbr|acronym|address|area|b|bdo|big|blockquote|br|caption|cite|code|colgroup|dd|del|div|dfn|dl|dt|em|fieldset|font|h1toh6|hr|i|img|ins|kbd|li|ol|p|pre|q|samp|small|span|strong|sub|sup|table|tbody|td|tfoot|th|thread|tr|tt|u|ul)\\b[^>]*>)" - }, - { - "include": "text.html.basic" - }, - { - "match": "((https?|s?ftp|ftps|file|smb|afp|nfs|(x-)?man|gopher|txmt)://|mailto:)[-:@a-zA-Z0-9_.,~%+/?=&#;]+(?", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html meta.tag.block.any.html punctuation.definition.tag.end.html", - "r": { - "dark_plus": "punctuation.definition.tag: #808080", - "light_plus": "punctuation.definition.tag: #800000", - "dark_vs": "punctuation.definition.tag: #808080", - "light_vs": "punctuation.definition.tag: #800000", - "hc_black": "punctuation.definition.tag: #808080" - } - }, - { - "c": "Note:", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html", - "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": "", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html meta.tag.block.any.html punctuation.definition.tag.end.html", - "r": { - "dark_plus": "punctuation.definition.tag: #808080", - "light_plus": "punctuation.definition.tag: #800000", - "dark_vs": "punctuation.definition.tag: #808080", - "light_vs": "punctuation.definition.tag: #800000", - "hc_black": "punctuation.definition.tag: #808080" - } - }, - { - "c": " Hello", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html", + "c": "\t *

    Note:

    Hello", + "t": "source.java meta.class.java meta.class.body.java comment.block.javadoc.java", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -551,7 +463,7 @@ }, { "c": "\t * ", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html", + "t": "source.java meta.class.java meta.class.body.java comment.block.javadoc.java", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -561,8 +473,8 @@ } }, { - "c": "@", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html meta.documentation.tag.param.javadoc keyword.other.documentation.param.javadoc punctuation.definition.keyword.javadoc", + "c": "@param", + "t": "source.java meta.class.java meta.class.body.java comment.block.javadoc.java keyword.other.documentation.javadoc.java", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -572,30 +484,30 @@ } }, { - "c": "param", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html meta.documentation.tag.param.javadoc keyword.other.documentation.param.javadoc", + "c": " ", + "t": "source.java meta.class.java meta.class.body.java comment.block.javadoc.java", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "comment: #608B4E", + "light_plus": "comment: #008000", + "dark_vs": "comment: #608B4E", + "light_vs": "comment: #008000", + "hc_black": "comment: #7CA668" } }, { - "c": " args", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html meta.documentation.tag.param.javadoc", + "c": "args", + "t": "source.java meta.class.java meta.class.body.java comment.block.javadoc.java variable.parameter.java", "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", "dark_vs": "comment: #608B4E", "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" + "hc_black": "variable: #9CDCFE" } }, { "c": "\t ", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc text.html meta.documentation.tag.param.javadoc", + "t": "source.java meta.class.java meta.class.body.java comment.block.javadoc.java", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -606,7 +518,7 @@ }, { "c": "*/", - "t": "source.java meta.class.java meta.class.body.java comment.block.documentation.javadoc punctuation.definition.comment.end.javadoc", + "t": "source.java meta.class.java meta.class.body.java comment.block.javadoc.java punctuation.definition.comment.java", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -650,18 +562,18 @@ }, { "c": "void", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type.primitive.array.java: #4EC9B0" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -683,7 +595,7 @@ }, { "c": "(", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java punctuation.definition.parameters.begin.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -694,13 +606,13 @@ }, { "c": "int", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type.primitive.array.java: #4EC9B0" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { @@ -727,7 +639,7 @@ }, { "c": ")", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java punctuation.definition.parameters.end.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -749,7 +661,7 @@ }, { "c": "{", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.section.method.begin.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.begin.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -771,18 +683,40 @@ }, { "c": "double", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type.primitive.array.java: #4EC9B0" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { - "c": " b ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "b", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java variable.other.definition.java", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -793,7 +727,7 @@ }, { "c": "=", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.operator.assignment.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java keyword.operator.assignment.java", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -804,7 +738,7 @@ }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -815,7 +749,7 @@ }, { "c": "0.0", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.float.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java constant.numeric.decimal.java", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -848,18 +782,40 @@ }, { "c": "double", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type.primitive.array.java: #4EC9B0" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { - "c": " c ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "c", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java variable.other.definition.java", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -870,7 +826,7 @@ }, { "c": "=", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.operator.assignment.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java keyword.operator.assignment.java", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -881,7 +837,7 @@ }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -892,7 +848,7 @@ }, { "c": "10e3", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.float.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java constant.numeric.decimal.java", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -925,18 +881,40 @@ }, { "c": "long", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type.primitive.array.java: #4EC9B0" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { - "c": " l ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "l", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java variable.other.definition.java", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -947,7 +925,7 @@ }, { "c": "=", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.operator.assignment.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java keyword.operator.assignment.java", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -958,7 +936,7 @@ }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -969,7 +947,7 @@ }, { "c": "134l", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.integer.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java constant.numeric.decimal.java", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1002,7 +980,7 @@ }, { "c": "}", - "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.end.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.end.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1090,7 +1068,7 @@ }, { "c": "(", - "t": "source.java meta.class.java meta.class.body.java meta.declaration.annotation.java punctuation.definition.annotation-arguments.begin.java", + "t": "source.java meta.class.java meta.class.body.java meta.declaration.annotation.java punctuation.definition.annotation-arguments.begin.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1178,7 +1156,7 @@ }, { "c": ")", - "t": "source.java meta.class.java meta.class.body.java meta.declaration.annotation.java punctuation.definition.annotation-arguments.end.java", + "t": "source.java meta.class.java meta.class.body.java meta.declaration.annotation.java punctuation.definition.annotation-arguments.end.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1222,18 +1200,18 @@ }, { "c": "long", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type.primitive.array.java: #4EC9B0" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1255,7 +1233,7 @@ }, { "c": "(", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java punctuation.definition.parameters.begin.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1266,13 +1244,13 @@ }, { "c": "long", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type.primitive.array.java: #4EC9B0" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { @@ -1299,7 +1277,7 @@ }, { "c": ")", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java punctuation.definition.parameters.end.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1310,7 +1288,7 @@ }, { "c": "{", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.section.method.begin.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.begin.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1342,7 +1320,7 @@ } }, { - "c": " (", + "c": " ", "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", "r": { "dark_plus": "default: #D4D4D4", @@ -1352,20 +1330,53 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "(", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.bracket.round.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": "int", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type.primitive.array.java: #4EC9B0" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { - "c": " i ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "i", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java variable.other.definition.java", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1376,7 +1387,7 @@ }, { "c": "=", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.operator.assignment.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java keyword.operator.assignment.java", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -1387,7 +1398,7 @@ }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1398,7 +1409,7 @@ }, { "c": "0", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.integer.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java constant.numeric.decimal.java", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1453,7 +1464,7 @@ }, { "c": "9", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.integer.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.decimal.java", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1496,7 +1507,18 @@ } }, { - "c": ") ", + "c": ")", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.bracket.round.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", "r": { "dark_plus": "default: #D4D4D4", @@ -1508,7 +1530,7 @@ }, { "c": "{", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.section.block.begin.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.section.block.begin.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1530,62 +1552,62 @@ }, { "c": "System", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java variable.other.object.java", "r": { - "dark_plus": "storage.type.java: #4EC9B0", - "light_plus": "storage.type.java: #267F99", - "dark_vs": "storage.type: #569CD6", - "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type.java: #4EC9B0" + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" } }, { "c": ".", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.operator.dereference.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.separator.period.java", "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { "c": "out", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java variable.other.object.property.java", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { "c": ".", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.operator.dereference.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.method-call.java punctuation.separator.period.java", "r": { - "dark_plus": "keyword.operator: #D4D4D4", - "light_plus": "keyword.operator: #000000", - "dark_vs": "keyword.operator: #D4D4D4", - "light_vs": "keyword.operator: #000000", - "hc_black": "keyword.operator: #D4D4D4" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { "c": "println", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.method-call.java meta.method.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.method-call.java entity.name.function.java", "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { "c": "(", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.method-call.java punctuation.definition.method-parameters.begin.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.method-call.java punctuation.definition.parameters.begin.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1662,7 +1684,7 @@ }, { "c": ")", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.method-call.java punctuation.definition.method-parameters.end.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.method-call.java punctuation.definition.parameters.end.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1695,7 +1717,7 @@ }, { "c": "}", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.section.block.end.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.section.block.end.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1739,7 +1761,7 @@ }, { "c": "10", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.integer.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.decimal.java", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1772,7 +1794,7 @@ }, { "c": "}", - "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.end.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.end.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1871,18 +1893,18 @@ }, { "c": "void", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type.primitive.array.java: #4EC9B0" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.return-type.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1903,8 +1925,19 @@ } }, { - "c": "()", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java", + "c": "(", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java punctuation.definition.parameters.begin.bracket.round.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.identifier.java punctuation.definition.parameters.end.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1926,7 +1959,7 @@ }, { "c": "{", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java punctuation.section.method.begin.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.begin.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1948,18 +1981,40 @@ }, { "c": "int", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.primitive.array.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java storage.type.primitive.java", "r": { - "dark_plus": "storage.type.primitive.array.java: #4EC9B0", - "light_plus": "storage.type.primitive.array.java: #267F99", + "dark_plus": "storage.type.primitive.java: #4EC9B0", + "light_plus": "storage.type.primitive.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type.primitive.array.java: #4EC9B0" + "hc_black": "storage.type.primitive.java: #4EC9B0" } }, { - "c": " hex ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "hex", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java variable.other.definition.java", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1970,7 +2025,7 @@ }, { "c": "=", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.operator.assignment.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java keyword.operator.assignment.java", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -1981,7 +2036,7 @@ }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1992,7 +2047,7 @@ }, { "c": "0x5", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java constant.numeric.hex.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java constant.numeric.hex.java", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -2024,30 +2079,30 @@ } }, { - "c": "Vector<", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.generic.java", + "c": "Vector", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java storage.type.java", "r": { - "dark_plus": "storage.type.generic.java: #4EC9B0", - "light_plus": "storage.type.generic.java: #267F99", + "dark_plus": "storage.type.java: #4EC9B0", + "light_plus": "storage.type.java: #267F99", "dark_vs": "storage.type: #569CD6", "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type.generic.java: #4EC9B0" + "hc_black": "storage.type.java: #4EC9B0" } }, { - "c": "Number", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.generic.java storage.type.java", + "c": "<", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java punctuation.bracket.angle.java", "r": { - "dark_plus": "storage.type.java: #4EC9B0", - "light_plus": "storage.type.java: #267F99", - "dark_vs": "storage.type: #569CD6", - "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type.java: #4EC9B0" + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" } }, { - "c": ">", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.generic.java", + "c": "Number", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java storage.type.generic.java", "r": { "dark_plus": "storage.type.generic.java: #4EC9B0", "light_plus": "storage.type.generic.java: #267F99", @@ -2057,8 +2112,41 @@ } }, { - "c": " v ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "c": ">", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java punctuation.bracket.angle.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "v", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java variable.other.definition.java", + "r": { + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE" + } + }, + { + "c": " ", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -2069,7 +2157,7 @@ }, { "c": "=", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.operator.assignment.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java keyword.operator.assignment.java", "r": { "dark_plus": "keyword.operator: #D4D4D4", "light_plus": "keyword.operator: #000000", @@ -2080,7 +2168,7 @@ }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -2091,7 +2179,7 @@ }, { "c": "new", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java keyword.control.new.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java keyword.control.new.java", "r": { "dark_plus": "keyword.control: #C586C0", "light_plus": "keyword.control: #AF00DB", @@ -2102,7 +2190,7 @@ }, { "c": " ", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -2113,18 +2201,29 @@ }, { "c": "Vector", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java storage.type.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java meta.function-call.java entity.name.function.java", "r": { - "dark_plus": "storage.type.java: #4EC9B0", - "light_plus": "storage.type.java: #267F99", - "dark_vs": "storage.type: #569CD6", - "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type.java: #4EC9B0" + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.function: #DCDCAA" } }, { - "c": "()", - "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java", + "c": "(", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java meta.function-call.java punctuation.definition.parameters.begin.bracket.round.java", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "source.java meta.class.java meta.class.body.java meta.method.java meta.method.body.java meta.definition.variable.java meta.function-call.java punctuation.definition.parameters.end.bracket.round.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -2157,7 +2256,7 @@ }, { "c": "}", - "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.end.java", + "t": "source.java meta.class.java meta.class.body.java meta.method.java punctuation.section.method.end.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -2168,7 +2267,7 @@ }, { "c": "}", - "t": "source.java meta.class.java punctuation.section.class.end.java", + "t": "source.java meta.class.java punctuation.section.class.end.bracket.curly.java", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", diff --git a/extensions/theme-defaults/themes/dark_vs.json b/extensions/theme-defaults/themes/dark_vs.json index 40bcc308f280b..827f59892d8f8 100644 --- a/extensions/theme-defaults/themes/dark_vs.json +++ b/extensions/theme-defaults/themes/dark_vs.json @@ -325,6 +325,7 @@ "name": "coloring of the Java import and package identifiers", "scope": [ "storage.modifier.import.java", + "variable.language.wildcard.java", "storage.modifier.package.java" ], "settings": { diff --git a/extensions/theme-defaults/themes/hc_black_defaults.json b/extensions/theme-defaults/themes/hc_black_defaults.json index b98e3e17b267d..6537cac26f25c 100644 --- a/extensions/theme-defaults/themes/hc_black_defaults.json +++ b/extensions/theme-defaults/themes/hc_black_defaults.json @@ -300,7 +300,11 @@ }, { "name": "coloring of the Java import and package identifiers", - "scope": ["storage.modifier.import.java", "storage.modifier.package.java"], + "scope": [ + "storage.modifier.import.java", + "variable.language.wildcard.java", + "storage.modifier.package.java" + ], "settings": { "foreground": "#d4d4d4" } diff --git a/extensions/theme-defaults/themes/light_vs.json b/extensions/theme-defaults/themes/light_vs.json index 8d5fabb13a3c3..1c294607f6049 100644 --- a/extensions/theme-defaults/themes/light_vs.json +++ b/extensions/theme-defaults/themes/light_vs.json @@ -341,6 +341,7 @@ "name": "coloring of the Java import and package identifiers", "scope": [ "storage.modifier.import.java", + "variable.language.wildcard.java", "storage.modifier.package.java" ], "settings": { From 99f9b13c4e85672cc3cb79a98a8d9ff017cb6af8 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 12:07:48 +0200 Subject: [PATCH 0680/2747] win32-ia32 --- build/gulpfile.vscode.js | 46 ++++++++++++++++++++-------------- build/gulpfile.vscode.win32.js | 12 ++++----- build/tfs/linux/build.sh | 3 +++ build/tfs/win32/1_build.ps1 | 6 ++++- build/tfs/win32/2_package.ps1 | 2 +- build/tfs/win32/3_upload.ps1 | 10 ++++---- build/win32/code.iss | 2 +- 7 files changed, 48 insertions(+), 33 deletions(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 042e45d4cd44c..309c64326baf3 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -136,20 +136,27 @@ const config = { repo: product.electronRepository || void 0 }; -gulp.task('clean-electron', util.rimraf('.build/electron')); +function getElectron(arch = process.arch) { + return () => { + const electronOpts = _.extend({}, config, { + platform: process.platform, + arch, + ffmpegChromium: true, + keepDefaultApp: true + }); + + return gulp.src('package.json') + .pipe(json({ name: product.nameShort })) + .pipe(electron(electronOpts)) + .pipe(filter(['**', '!**/app/package.json'])) + .pipe(vfs.dest('.build/electron')); + }; +} -gulp.task('electron', ['clean-electron'], () => { - const platform = process.platform; - const arch = process.env.VSCODE_ELECTRON_PLATFORM || (platform === 'win32' ? 'ia32' : process.arch); - const opts = _.extend({}, config, { platform, arch, ffmpegChromium: true, keepDefaultApp: true }); - const name = product.nameShort; - - return gulp.src('package.json') - .pipe(json({ name })) - .pipe(electron(opts)) - .pipe(filter(['**', '!**/app/package.json'])) - .pipe(vfs.dest('.build/electron')); -}); +gulp.task('clean-electron', util.rimraf('.build/electron')); +gulp.task('electron', ['clean-electron'], getElectron()); +gulp.task('electron-ia32', ['clean-electron'], getElectron('ia32')); +gulp.task('electron-x64', ['clean-electron'], getElectron('x64')); const languages = ['chs', 'cht', 'jpn', 'kor', 'deu', 'fra', 'esn', 'rus', 'ita']; @@ -187,9 +194,7 @@ function computeChecksum(filename) { return hash; } -function packageTask(platform, arch, opts) { - opts = opts || {}; - +function packageTask(platform, arch, opts = {}) { const destination = path.join(path.dirname(root), 'VSCode') + (platform ? '-' + platform : '') + (arch ? '-' + arch : ''); platform = platform || process.platform; arch = platform === 'win32' ? 'ia32' : arch; @@ -326,19 +331,22 @@ function packageTask(platform, arch, opts) { const buildRoot = path.dirname(root); -gulp.task('clean-vscode-win32', util.rimraf(path.join(buildRoot, 'VSCode-win32'))); +gulp.task('clean-vscode-win32-ia32', util.rimraf(path.join(buildRoot, 'VSCode-win32-ia32'))); +gulp.task('clean-vscode-win32-x64', util.rimraf(path.join(buildRoot, 'VSCode-win32-x64'))); gulp.task('clean-vscode-darwin', util.rimraf(path.join(buildRoot, 'VSCode-darwin'))); gulp.task('clean-vscode-linux-ia32', util.rimraf(path.join(buildRoot, 'VSCode-linux-ia32'))); gulp.task('clean-vscode-linux-x64', util.rimraf(path.join(buildRoot, 'VSCode-linux-x64'))); gulp.task('clean-vscode-linux-arm', util.rimraf(path.join(buildRoot, 'VSCode-linux-arm'))); -gulp.task('vscode-win32', ['optimize-vscode', 'clean-vscode-win32'], packageTask('win32')); +gulp.task('vscode-win32-ia32', ['optimize-vscode', 'clean-vscode-win32-ia32'], packageTask('win32', 'ia32')); +gulp.task('vscode-win32-x64', ['optimize-vscode', 'clean-vscode-win32-x64'], packageTask('win32', 'x64')); gulp.task('vscode-darwin', ['optimize-vscode', 'clean-vscode-darwin'], packageTask('darwin')); gulp.task('vscode-linux-ia32', ['optimize-vscode', 'clean-vscode-linux-ia32'], packageTask('linux', 'ia32')); gulp.task('vscode-linux-x64', ['optimize-vscode', 'clean-vscode-linux-x64'], packageTask('linux', 'x64')); gulp.task('vscode-linux-arm', ['optimize-vscode', 'clean-vscode-linux-arm'], packageTask('linux', 'arm')); -gulp.task('vscode-win32-min', ['minify-vscode', 'clean-vscode-win32'], packageTask('win32', null, { minified: true })); +gulp.task('vscode-win32-ia32-min', ['minify-vscode', 'clean-vscode-win32-ia32'], packageTask('win32', 'ia32', { minified: true })); +gulp.task('vscode-win32-x64-min', ['minify-vscode', 'clean-vscode-win32-x64'], packageTask('win32', 'x64', { minified: true })); gulp.task('vscode-darwin-min', ['minify-vscode', 'clean-vscode-darwin'], packageTask('darwin', null, { minified: true })); gulp.task('vscode-linux-ia32-min', ['minify-vscode', 'clean-vscode-linux-ia32'], packageTask('linux', 'ia32', { minified: true })); gulp.task('vscode-linux-x64-min', ['minify-vscode', 'clean-vscode-linux-x64'], packageTask('linux', 'x64', { minified: true })); diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js index a398076db3d5f..42f7e3363a6b8 100644 --- a/build/gulpfile.vscode.win32.js +++ b/build/gulpfile.vscode.win32.js @@ -15,8 +15,8 @@ const pkg = require('../package.json'); const product = require('../product.json'); const repoPath = path.dirname(__dirname); -const buildPath = path.join(path.dirname(repoPath), 'VSCode-win32'); -const zipPath = path.join(repoPath, '.build', 'win32', 'archive', 'VSCode-win32.zip'); +const buildPath = path.join(path.dirname(repoPath), 'VSCode-win32-ia32'); +const zipPath = path.join(repoPath, '.build', 'win32-ia32', 'archive', 'VSCode-win32-ia32.zip'); const issPath = path.join(__dirname, 'win32', 'code.iss'); const innoSetupPath = path.join(path.dirname(path.dirname(require.resolve('innosetup-compiler'))), 'bin', 'ISCC.exe'); @@ -57,8 +57,8 @@ function buildWin32Setup(cb) { packageInnoSetup(issPath, { definitions }, cb); } -gulp.task('clean-vscode-win32-setup', util.rimraf('.build/win32/setup')); -gulp.task('vscode-win32-setup', ['clean-vscode-win32-setup'], buildWin32Setup); +gulp.task('clean-vscode-win32-ia32-setup', util.rimraf('.build/win32-ia32/setup')); +gulp.task('vscode-win32-ia32-setup', ['clean-vscode-win32-ia32-setup'], buildWin32Setup); function archiveWin32Setup(cb) { const args = ['a', '-tzip', zipPath, buildPath, '-r']; @@ -68,5 +68,5 @@ function archiveWin32Setup(cb) { .on('exit', () => cb(null)); } -gulp.task('clean-vscode-win32-archive', util.rimraf('.build/win32/archive')); -gulp.task('vscode-win32-archive', ['clean-vscode-win32-archive'], archiveWin32Setup); +gulp.task('clean-vscode-win32-ia32-archive', util.rimraf('.build/win32-ia32/archive')); +gulp.task('vscode-win32-ia32-archive', ['clean-vscode-win32-ia32-archive'], archiveWin32Setup); diff --git a/build/tfs/linux/build.sh b/build/tfs/linux/build.sh index 52edf7ba62d8a..2b876b693c552 100755 --- a/build/tfs/linux/build.sh +++ b/build/tfs/linux/build.sh @@ -20,6 +20,9 @@ step "Install dependencies" \ step "Mix in repository from vscode-distro" \ npm run gulp -- mixin +step "Get Electron" \ + npm run gulp -- "electron-$ARCH" + step "Install distro dependencies" \ node build/tfs/common/installDistro.js --arch=$ARCH diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index a177c4b82e0e6..27ff376a8513e 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -20,12 +20,16 @@ step "Mix in repository from vscode-distro" { exec { & npm run gulp -- mixin } } +step "Get Electron" { + exec { & npm run gulp -- electron-ia32 } +} + step "Install distro dependencies" { exec { & node build\tfs\common\installDistro.js } } step "Build minified" { - exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-min } + exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-ia32-min } } step "Run unit tests" { diff --git a/build/tfs/win32/2_package.ps1 b/build/tfs/win32/2_package.ps1 index 7d29cca6c3a7e..bec7ba9b16765 100644 --- a/build/tfs/win32/2_package.ps1 +++ b/build/tfs/win32/2_package.ps1 @@ -1,7 +1,7 @@ . .\build\tfs\win32\lib.ps1 step "Create archive and setup package" { - exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-archive vscode-win32-setup } + exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-ia32-archive vscode-win32-ia32-setup } } done \ No newline at end of file diff --git a/build/tfs/win32/3_upload.ps1 b/build/tfs/win32/3_upload.ps1 index 5b7e4a0f482c6..13581050618e4 100644 --- a/build/tfs/win32/3_upload.ps1 +++ b/build/tfs/win32/3_upload.ps1 @@ -8,9 +8,9 @@ Param( $Repo = "$(pwd)" $Root = "$Repo\.." -$Exe = "$Repo\.build\win32\setup\VSCodeSetup.exe" -$Zip = "$Repo\.build\win32\archive\VSCode-win32.zip" -$Build = "$Root\VSCode-win32" +$Exe = "$Repo\.build\win32-ia32\setup\VSCodeSetup.exe" +$Zip = "$Repo\.build\win32-ia32\archive\VSCode-win32-ia32.zip" +$Build = "$Root\VSCode-win32-ia32" # get version $PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json @@ -21,11 +21,11 @@ $env:MOONCAKE_STORAGE_ACCESS_KEY = $mooncakeStorageKey $env:AZURE_DOCUMENTDB_MASTERKEY = $documentDbKey step "Publish archive" { - exec { & node build/tfs/common/publish.js $Quality win32-archive archive "VSCode-win32-$Version.zip" $Version true $Zip } + exec { & node build/tfs/common/publish.js $Quality win32-archive archive "VSCode-win32-ia32-$Version.zip" $Version true $Zip } } step "Publish setup package" { - exec { & node build/tfs/common/publish.js $Quality win32 setup "VSCodeSetup-$Version.exe" $Version true $Exe } + exec { & node build/tfs/common/publish.js $Quality win32 setup "VSCodeSetup-ia32-$Version.exe" $Version true $Exe } } done \ No newline at end of file diff --git a/build/win32/code.iss b/build/win32/code.iss index 2fcc70db5540d..ce61c44b8cfe1 100644 --- a/build/win32/code.iss +++ b/build/win32/code.iss @@ -14,7 +14,7 @@ AppUpdatesURL=https://code.visualstudio.com/ DefaultDirName={pf}\{#DirName} DefaultGroupName={#NameLong} AllowNoIcons=yes -OutputDir={#RepoDir}\.build\win32\setup +OutputDir={#RepoDir}\.build\win32-ia32\setup OutputBaseFilename=VSCodeSetup Compression=lzma SolidCompression=yes From 3b6d8a3185fc9291c348f2472f56d99dfd91edc5 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 18 May 2017 12:04:38 +0200 Subject: [PATCH 0681/2747] move startup profiler into perf.contrib --- src/vs/workbench/electron-browser/shell.ts | 34 --------- .../performance.contribution.ts | 75 +++++++++++++++++-- 2 files changed, 67 insertions(+), 42 deletions(-) diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index ef12343f32697..59955d7004984 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -16,7 +16,6 @@ import aria = require('vs/base/browser/ui/aria/aria'); import { dispose, IDisposable, Disposables } from 'vs/base/common/lifecycle'; import errors = require('vs/base/common/errors'); import { toErrorMessage } from 'vs/base/common/errorMessage'; -import { stopProfiling } from 'vs/base/node/profiler'; import product from 'vs/platform/node/product'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import pkg from 'vs/platform/node/package'; @@ -97,8 +96,6 @@ import { MainProcessTextMateSyntax } from 'vs/editor/electron-browser/textMate/T import { BareFontInfo } from 'vs/editor/common/config/fontInfo'; import { restoreFontInfo, readFontInfo, saveFontInfo } from 'vs/editor/browser/config/configuration'; import * as browser from 'vs/base/browser/browser'; -import { readdir } from 'vs/base/node/pfs'; -import { join } from 'path'; import 'vs/platform/opener/browser/opener.contribution'; import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService'; import { WorkbenchThemeService } from 'vs/workbench/services/themes/electron-browser/workbenchThemeService'; @@ -263,37 +260,6 @@ export class WorkbenchShell { if ((platform.isLinux || platform.isMacintosh) && process.getuid() === 0) { this.messageService.show(Severity.Warning, nls.localize('runningAsRoot', "It is recommended not to run Code as 'root'.")); } - - // Profiler: startup cpu profile - const { profileStartup } = this.environmentService; - if (profileStartup) { - this.extensionService.onReady().then(() => stopProfiling(profileStartup.dir, profileStartup.prefix)).then(() => { - readdir(profileStartup.dir).then(files => { - return files.filter(value => value.indexOf(profileStartup.prefix) === 0); - }).then(files => { - const profileFiles = files.reduce((prev, cur) => `${prev}${join(profileStartup.dir, cur)}\n`, '\n'); - - const primaryButton = this.messageService.confirm({ - type: 'info', - message: nls.localize('prof.message', "Successfully created profiles."), - detail: nls.localize('prof.detail', "Please create an issue and manually attach the following files:\n{0}", profileFiles), - primaryButton: nls.localize('prof.restartAndFileIssue', "Create Issue and Restart"), - secondaryButton: nls.localize('prof.restart', "Restart") - }); - - let createIssue = TPromise.as(void 0); - if (primaryButton) { - const action = this.workbench.getInstantiationService().createInstance(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL); - - createIssue = action.run(`:warning: Make sure to **attach** these files: :warning:\n${files.map(file => `-\`${join(profileStartup.dir, file)}\``).join('\n')}`).then(() => { - return this.windowsService.showItemInFolder(join(profileStartup.dir, files[0])); - }); - } - createIssue.then(() => this.windowsService.relaunch({ removeArgs: ['--prof-startup'] })); - }); - - }, err => console.error(err)); - } } private handleNegativePerformanceNumbers(i: IInstantiationService, time: number): void { diff --git a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts index f7b481f4c5015..393dc2a5dc9b5 100644 --- a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts +++ b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts @@ -5,19 +5,25 @@ 'use strict'; -import { localize } from 'vs/nls'; -import { virtualMachineHint } from 'vs/base/node/id'; -import { Registry } from 'vs/platform/platform'; -import { IWindowsService } from 'vs/platform/windows/common/windows'; +import product from 'vs/platform/node/product'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; +import { IExtensionService } from 'vs/platform/extensions/common/extensions'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IMessageService } from 'vs/platform/message/common/message'; +import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { ITimerService } from 'vs/workbench/services/timer/common/timerService'; +import { IWindowsService } from 'vs/platform/windows/common/windows'; import { IWorkbenchContributionsRegistry, IWorkbenchContribution, Extensions } from 'vs/workbench/common/contributions'; -import product from 'vs/platform/node/product'; +import { Registry } from 'vs/platform/platform'; +import { ReportPerformanceIssueAction } from 'vs/workbench/electron-browser/actions'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { join } from 'path'; +import { localize } from 'vs/nls'; import { platform, Platform } from 'vs/base/common/platform'; +import { readdir } from 'vs/base/node/pfs'; import { release } from 'os'; - +import { stopProfiling } from 'vs/base/node/profiler'; +import { virtualMachineHint } from 'vs/base/node/id'; class ProfilingHint implements IWorkbenchContribution { @@ -73,7 +79,7 @@ class ProfilingHint implements IWorkbenchContribution { } getId(): string { - return 'performance'; + return 'performance.ProfilingHint'; } private _checkTimersAndSuggestToProfile() { @@ -131,5 +137,58 @@ class ProfilingHint implements IWorkbenchContribution { } } +class StartupProfiler implements IWorkbenchContribution { + + constructor( + @IWindowsService private readonly _windowsService: IWindowsService, + @IMessageService private readonly _messageService: IMessageService, + @IEnvironmentService private readonly _environmentService: IEnvironmentService, + @IInstantiationService private readonly _instantiationService: IInstantiationService, + @IExtensionService extensionService: IExtensionService, + ) { + + extensionService.onReady().then(() => this._stopProfiling()); + } + + getId(): string { + return 'performance.StartupProfiler'; + } + + private _stopProfiling(): void { + + const { profileStartup } = this._environmentService; + if (!profileStartup) { + return; + } + + stopProfiling(profileStartup.dir, profileStartup.prefix).then(() => { + readdir(profileStartup.dir).then(files => { + return files.filter(value => value.indexOf(profileStartup.prefix) === 0); + }).then(files => { + const profileFiles = files.reduce((prev, cur) => `${prev}${join(profileStartup.dir, cur)}\n`, '\n'); + + const primaryButton = this._messageService.confirm({ + type: 'info', + message: localize('prof.message', "Successfully created profiles."), + detail: localize('prof.detail', "Please create an issue and manually attach the following files:\n{0}", profileFiles), + primaryButton: localize('prof.restartAndFileIssue', "Create Issue and Restart"), + secondaryButton: localize('prof.restart', "Restart") + }); + + let createIssue = TPromise.as(void 0); + if (primaryButton) { + const action = this._instantiationService.createInstance(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL); + + createIssue = action.run(`:warning: Make sure to **attach** these files: :warning:\n${files.map(file => `-\`${join(profileStartup.dir, file)}\``).join('\n')}`).then(() => { + return this._windowsService.showItemInFolder(join(profileStartup.dir, files[0])); + }); + } + createIssue.then(() => this._windowsService.relaunch({ removeArgs: ['--prof-startup'] })); + }); + }); + } +} + const registry = Registry.as(Extensions.Workbench); registry.registerWorkbenchContribution(ProfilingHint); +registry.registerWorkbenchContribution(StartupProfiler); From c6d715e4e53f368ef3f0244e2966eff93950592c Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 18 May 2017 12:16:27 +0200 Subject: [PATCH 0682/2747] add telemetry about profiling invite acceptance --- .../electron-browser/performance.contribution.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts index 393dc2a5dc9b5..1df63eac28dbc 100644 --- a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts +++ b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts @@ -13,6 +13,7 @@ import { IMessageService } from 'vs/platform/message/common/message'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { ITimerService } from 'vs/workbench/services/timer/common/timerService'; import { IWindowsService } from 'vs/platform/windows/common/windows'; +import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWorkbenchContributionsRegistry, IWorkbenchContribution, Extensions } from 'vs/workbench/common/contributions'; import { Registry } from 'vs/platform/platform'; import { ReportPerformanceIssueAction } from 'vs/workbench/electron-browser/actions'; @@ -68,11 +69,12 @@ class ProfilingHint implements IWorkbenchContribution { private static readonly _myPercentiles = ProfilingHint._percentiles[`${Platform[platform]}_${release()}`]; constructor( - @IWindowsService private _windowsService: IWindowsService, - @ITimerService private _timerService: ITimerService, - @IMessageService private _messageService: IMessageService, - @IEnvironmentService private _envService: IEnvironmentService, - @IStorageService private _storageService: IStorageService + @IWindowsService private readonly _windowsService: IWindowsService, + @ITimerService private readonly _timerService: ITimerService, + @IMessageService private readonly _messageService: IMessageService, + @IEnvironmentService private readonly _envService: IEnvironmentService, + @IStorageService private readonly _storageService: IStorageService, + @ITelemetryService private readonly _telemetryService: ITelemetryService, ) { setTimeout(() => this._checkTimersAndSuggestToProfile(), 5000); @@ -128,6 +130,10 @@ class ProfilingHint implements IWorkbenchContribution { primaryButton: 'Restart and profile' }); + this._telemetryService.publicLog('profileStartupInvite', { + acceptedInvite: profile + }); + if (profile) { this._storageService.store(mementoKey, 'didProfile', StorageScope.GLOBAL); this._windowsService.relaunch({ addArgs: ['--prof-startup'] }); From 9b4c2b5acd0d9dd47635aba51a418c51767255b1 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 18 May 2017 12:47:43 +0200 Subject: [PATCH 0683/2747] perf - polish profile, create issue, restart flow --- .../performance.contribution.ts | 23 +++++++++++++++---- .../electron-browser/messageService.ts | 19 ++++++++++----- 2 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts index 1df63eac28dbc..0cc4a86b20034 100644 --- a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts +++ b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts @@ -181,15 +181,28 @@ class StartupProfiler implements IWorkbenchContribution { secondaryButton: localize('prof.restart', "Restart") }); - let createIssue = TPromise.as(void 0); if (primaryButton) { const action = this._instantiationService.createInstance(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL); - - createIssue = action.run(`:warning: Make sure to **attach** these files: :warning:\n${files.map(file => `-\`${join(profileStartup.dir, file)}\``).join('\n')}`).then(() => { - return this._windowsService.showItemInFolder(join(profileStartup.dir, files[0])); + TPromise.join([ + this._windowsService.showItemInFolder(join(profileStartup.dir, files[0])), + action.run(`:warning: Make sure to **attach** these files: :warning:\n${files.map(file => `-\`${join(profileStartup.dir, file)}\``).join('\n')}`) + ]).then(() => { + // keep window stable until restart is selected + this._messageService.confirm({ + type: 'info', + message: localize('prof.thanks', "Thanks for helping us."), + detail: localize('prof.detail.restart', "A final restart is required to continue to use '{0}'. Again, thank you for your contribution.", this._environmentService.appNameLong), + primaryButton: localize('prof.restart', "Restart"), + secondaryButton: null + }); + // now we are ready to restart + this._windowsService.relaunch({ removeArgs: ['--prof-startup'] }); }); + + } else { + // simply restart + this._windowsService.relaunch({ removeArgs: ['--prof-startup'] }); } - createIssue.then(() => this._windowsService.relaunch({ removeArgs: ['--prof-startup'] })); }); }); } diff --git a/src/vs/workbench/services/message/electron-browser/messageService.ts b/src/vs/workbench/services/message/electron-browser/messageService.ts index 607db7a5253f2..811ba46eb1037 100644 --- a/src/vs/workbench/services/message/electron-browser/messageService.ts +++ b/src/vs/workbench/services/message/electron-browser/messageService.ts @@ -26,17 +26,24 @@ export class MessageService extends WorkbenchMessageService implements IChoiceSe } public confirm(confirmation: IConfirmation): boolean { - if (!confirmation.primaryButton) { - confirmation.primaryButton = nls.localize({ key: 'yesButton', comment: ['&& denotes a mnemonic'] }, "&&Yes"); + + const buttons: string[] = []; + if (confirmation.primaryButton) { + buttons.push(confirmation.primaryButton); + } else { + buttons.push(nls.localize({ key: 'yesButton', comment: ['&& denotes a mnemonic'] }, "&&Yes")); } - if (!confirmation.secondaryButton) { - confirmation.secondaryButton = nls.localize('cancelButton', "Cancel"); + + if (confirmation.secondaryButton) { + buttons.push(confirmation.secondaryButton); + } else if (typeof confirmation.secondaryButton === 'undefined') { + buttons.push(nls.localize('cancelButton', "Cancel")); } let opts: Electron.ShowMessageBoxOptions = { title: confirmation.title, message: confirmation.message, - buttons: [confirmation.primaryButton, confirmation.secondaryButton], + buttons, defaultId: 0, cancelId: 1 }; @@ -102,4 +109,4 @@ export class MessageService extends WorkbenchMessageService implements IChoiceSe return label.replace(/&&/g, '&'); } -} \ No newline at end of file +} From c541d8864d2b1e3a454f1c6313cc51b6b9bf66c9 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 13:18:05 +0200 Subject: [PATCH 0684/2747] make linux 32 bits build run unit tests --- build/tfs/linux/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/build/tfs/linux/Dockerfile b/build/tfs/linux/Dockerfile index 59994333b80c2..581ea75a950f8 100644 --- a/build/tfs/linux/Dockerfile +++ b/build/tfs/linux/Dockerfile @@ -24,5 +24,6 @@ RUN apt-get install -y libx11-dev libx11-dev:i386 RUN apt-get install -y libxkbfile-dev:i386 RUN apt-get install -y libxss1 libxss1:i386 RUN apt-get install -y libx11-xcb-dev libx11-xcb-dev:i386 +RUN apt-get install -y libgl1-mesa-glx:i386 libgl1-mesa-dri:i386 RUN apt-get install -y libxkbfile-dev RUN apt-get install -y bc bsdmainutils From 4f0a7486ff64b9b52b9017c494326e4dba634bd3 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 13:18:21 +0200 Subject: [PATCH 0685/2747] tfs: enable linux unit tests --- build/tfs/linux/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tfs/linux/build.sh b/build/tfs/linux/build.sh index 2b876b693c552..227d089654589 100755 --- a/build/tfs/linux/build.sh +++ b/build/tfs/linux/build.sh @@ -30,7 +30,7 @@ step "Build minified" \ npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-min" # step "Run unit tests" \ -# [[ "$ARCH" == "x64" ]] && ./scripts/test.sh --xvfb --build --reporter dot + ./scripts/test.sh --xvfb --build --reporter dot step "Build Debian package" \ npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-deb" From 9056bd666ab91500ddda8ebdff346657086912cc Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 13:32:13 +0200 Subject: [PATCH 0686/2747] tfs: fix windows distro deps --- build/tfs/win32/1_build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index 27ff376a8513e..ab133b6b81cb7 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -25,7 +25,7 @@ step "Get Electron" { } step "Install distro dependencies" { - exec { & node build\tfs\common\installDistro.js } + exec { & node build\tfs\common\installDistro.js --arch=ia32 } } step "Build minified" { From 7da213f840a2f7dc46f55018adce3f1a1af3b310 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Thu, 18 May 2017 13:34:52 +0200 Subject: [PATCH 0687/2747] node-debug@1.13.5 (translations) --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 309c64326baf3..cc301600b2c11 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -42,7 +42,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.13.4' }, + { name: 'ms-vscode.node-debug', version: '1.13.5' }, { name: 'ms-vscode.node-debug2', version: '1.12.4' } ]; From a226da41de597da82e7a55179cefbb3a30793ff6 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 13:47:55 +0200 Subject: [PATCH 0688/2747] tfs: try to get a free xvfb server number --- scripts/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index 19b79bf58438d..d39b1e76f180e 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -29,7 +29,7 @@ test -d node_modules || ./scripts/npm.sh install # Unit Tests if [[ "$1" == "--xvfb" ]]; then cd $ROOT ; \ - xvfb-run "$CODE" test/electron/index.js "$@" + xvfb-run -a "$CODE" test/electron/index.js "$@" elif [[ "$OSTYPE" == "darwin"* ]]; then cd $ROOT ; ulimit -n 4096 ; \ "$CODE" \ From 000905e28495996b34b51af9ff7707e91a5b26d5 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 13:48:37 +0200 Subject: [PATCH 0689/2747] tfs: linux builds --- build/tfs/linux/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tfs/linux/build.sh b/build/tfs/linux/build.sh index 227d089654589..7e50e47c05d84 100755 --- a/build/tfs/linux/build.sh +++ b/build/tfs/linux/build.sh @@ -29,7 +29,7 @@ step "Install distro dependencies" \ step "Build minified" \ npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-min" -# step "Run unit tests" \ +step "Run unit tests" \ ./scripts/test.sh --xvfb --build --reporter dot step "Build Debian package" \ From b244b1483c7ece15d18ec5ff8b42b24eab108bf1 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 14:55:12 +0200 Subject: [PATCH 0690/2747] develop in win-x64 --- scripts/npm.bat | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/npm.bat b/scripts/npm.bat index aeb8e93c90c9f..3fc75df7b0e7a 100644 --- a/scripts/npm.bat +++ b/scripts/npm.bat @@ -1,12 +1,8 @@ @echo off setlocal - set npm_config_disturl="https://atom.io/download/electron" for /f "tokens=2 delims=:, " %%a in ('findstr /R /C:"\"electronVersion\":.*" "%~dp0..\package.json"') do set npm_config_target=%%~a -set npm_config_arch="ia32" set npm_config_runtime="electron" -set HOME=~\.electron-gyp - +set npm_config_cache=~\.npm-electron npm %* - endlocal From cd8a0c43a7aded315d3f861b2ed7600c6a49e1a0 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 15:02:42 +0200 Subject: [PATCH 0691/2747] tfs: win build scripts arch dependent --- build/tfs/win32/1_build.ps1 | 13 +++++++------ build/tfs/win32/2_package.ps1 | 6 +++++- build/tfs/win32/3_upload.ps1 | 11 ++++++----- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index ab133b6b81cb7..6d8cba16af4de 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -1,6 +1,7 @@ Param( - [string]$mixinPassword, - [string]$vsoPAT + [string]$arch, + [string]$mixinPassword, + [string]$vsoPAT ) . .\scripts\env.ps1 @@ -12,7 +13,7 @@ $env:HOME=$env:USERPROFILE "machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII step "Install dependencies" { - exec { & npm install --arch=ia32 } + exec { & npm install --arch=$arch } } $env:VSCODE_MIXIN_PASSWORD = $mixinPassword @@ -21,15 +22,15 @@ step "Mix in repository from vscode-distro" { } step "Get Electron" { - exec { & npm run gulp -- electron-ia32 } + exec { & npm run gulp -- "electron-$arch" } } step "Install distro dependencies" { - exec { & node build\tfs\common\installDistro.js --arch=ia32 } + exec { & node build\tfs\common\installDistro.js --arch=$arch } } step "Build minified" { - exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-ia32-min } + exec { & npm run gulp -- --max_old_space_size=4096 "vscode-win32-$arch-min" } } step "Run unit tests" { diff --git a/build/tfs/win32/2_package.ps1 b/build/tfs/win32/2_package.ps1 index bec7ba9b16765..beaa816e0e43b 100644 --- a/build/tfs/win32/2_package.ps1 +++ b/build/tfs/win32/2_package.ps1 @@ -1,7 +1,11 @@ +Param( + [string]$arch +) + . .\build\tfs\win32\lib.ps1 step "Create archive and setup package" { - exec { & npm run gulp -- --max_old_space_size=4096 vscode-win32-ia32-archive vscode-win32-ia32-setup } + exec { & npm run gulp -- --max_old_space_size=4096 "vscode-win32-$arch-archive" "vscode-win32-$arch-setup" } } done \ No newline at end of file diff --git a/build/tfs/win32/3_upload.ps1 b/build/tfs/win32/3_upload.ps1 index 13581050618e4..7eb99c4a54125 100644 --- a/build/tfs/win32/3_upload.ps1 +++ b/build/tfs/win32/3_upload.ps1 @@ -1,4 +1,5 @@ Param( + [string]$arch, [string]$storageKey, [string]$mooncakeStorageKey, [string]$documentDbKey @@ -8,9 +9,9 @@ Param( $Repo = "$(pwd)" $Root = "$Repo\.." -$Exe = "$Repo\.build\win32-ia32\setup\VSCodeSetup.exe" -$Zip = "$Repo\.build\win32-ia32\archive\VSCode-win32-ia32.zip" -$Build = "$Root\VSCode-win32-ia32" +$Exe = "$Repo\.build\win32-$arch\setup\VSCodeSetup.exe" +$Zip = "$Repo\.build\win32-$arch\archive\VSCode-win32-$arch.zip" +$Build = "$Root\VSCode-win32-$arch" # get version $PackageJson = Get-Content -Raw -Path "$Build\resources\app\package.json" | ConvertFrom-Json @@ -21,11 +22,11 @@ $env:MOONCAKE_STORAGE_ACCESS_KEY = $mooncakeStorageKey $env:AZURE_DOCUMENTDB_MASTERKEY = $documentDbKey step "Publish archive" { - exec { & node build/tfs/common/publish.js $Quality win32-archive archive "VSCode-win32-ia32-$Version.zip" $Version true $Zip } + exec { & node build/tfs/common/publish.js $Quality win32-archive archive "VSCode-win32-$arch-$Version.zip" $Version true $Zip } } step "Publish setup package" { - exec { & node build/tfs/common/publish.js $Quality win32 setup "VSCodeSetup-ia32-$Version.exe" $Version true $Exe } + exec { & node build/tfs/common/publish.js $Quality win32 setup "VSCodeSetup-$arch-$Version.exe" $Version true $Exe } } done \ No newline at end of file From ba7c0d324b6f25c28f4438ee233ae0f0a938b57a Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 15:09:21 +0200 Subject: [PATCH 0692/2747] tfs: fix win64 build --- build/tfs/win32/1_build.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index 6d8cba16af4de..2eb997017489b 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -13,7 +13,7 @@ $env:HOME=$env:USERPROFILE "machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII step "Install dependencies" { - exec { & npm install --arch=$arch } + exec { & npm install "--arch=$arch" } } $env:VSCODE_MIXIN_PASSWORD = $mixinPassword @@ -26,7 +26,7 @@ step "Get Electron" { } step "Install distro dependencies" { - exec { & node build\tfs\common\installDistro.js --arch=$arch } + exec { & node build\tfs\common\installDistro.js "--arch=$arch" } } step "Build minified" { From ad22530b14d2bbc331e671013c9d8238f056414b Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 15:40:58 +0200 Subject: [PATCH 0693/2747] tfs: win64 package and setup --- build/gulpfile.vscode.win32.js | 71 ++++++++++++++++++++-------------- build/win32/code.iss | 2 +- 2 files changed, 43 insertions(+), 30 deletions(-) diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js index 42f7e3363a6b8..a4ebd283ee00d 100644 --- a/build/gulpfile.vscode.win32.js +++ b/build/gulpfile.vscode.win32.js @@ -15,8 +15,10 @@ const pkg = require('../package.json'); const product = require('../product.json'); const repoPath = path.dirname(__dirname); -const buildPath = path.join(path.dirname(repoPath), 'VSCode-win32-ia32'); -const zipPath = path.join(repoPath, '.build', 'win32-ia32', 'archive', 'VSCode-win32-ia32.zip'); +const buildPath = arch => path.join(path.dirname(repoPath), `VSCode-win32-${arch}`); +const zipDir = arch => path.join(repoPath, '.build', `win32-${arch}`, 'archive'); +const zipPath = arch => path.join(zipDir(arch), `VSCode-win32-${arch}.zip`); +const setupDir = arch => path.join(repoPath, '.build', `win32-${arch}`, 'setup'); const issPath = path.join(__dirname, 'win32', 'code.iss'); const innoSetupPath = path.join(path.dirname(path.dirname(require.resolve('innosetup-compiler'))), 'bin', 'ISCC.exe'); @@ -36,37 +38,48 @@ function packageInnoSetup(iss, options, cb) { .on('exit', () => cb(null)); } -function buildWin32Setup(cb) { - const definitions = { - NameLong: product.nameLong, - NameShort: product.nameShort, - DirName: product.win32DirName, - Version: pkg.version, - RawVersion: pkg.version.replace(/-\w+$/, ''), - NameVersion: product.win32NameVersion, - ExeBasename: product.nameShort, - RegValueName: product.win32RegValueName, - ShellNameShort: product.win32ShellNameShort, - AppMutex: product.win32MutexName, - AppId: product.win32AppId, - AppUserId: product.win32AppUserModelId, - SourceDir: buildPath, - RepoDir: repoPath - }; +function buildWin32Setup(arch) { + return cb => { + const definitions = { + NameLong: product.nameLong, + NameShort: product.nameShort, + DirName: product.win32DirName, + Version: pkg.version, + RawVersion: pkg.version.replace(/-\w+$/, ''), + NameVersion: product.win32NameVersion, + ExeBasename: product.nameShort, + RegValueName: product.win32RegValueName, + ShellNameShort: product.win32ShellNameShort, + AppMutex: product.win32MutexName, + AppId: product.win32AppId, + AppUserId: product.win32AppUserModelId, + SourceDir: buildPath(arch), + RepoDir: repoPath, + OutputDir: setupDir(arch) + }; - packageInnoSetup(issPath, { definitions }, cb); + packageInnoSetup(issPath, { definitions }, cb); + }; } -gulp.task('clean-vscode-win32-ia32-setup', util.rimraf('.build/win32-ia32/setup')); -gulp.task('vscode-win32-ia32-setup', ['clean-vscode-win32-ia32-setup'], buildWin32Setup); +gulp.task('clean-vscode-win32-ia32-setup', util.rimraf(setupDir('ia32'))); +gulp.task('vscode-win32-ia32-setup', ['clean-vscode-win32-ia32-setup'], buildWin32Setup('ia32')); -function archiveWin32Setup(cb) { - const args = ['a', '-tzip', zipPath, buildPath, '-r']; +gulp.task('clean-vscode-win32-x64-setup', util.rimraf(setupDir('x64'))); +gulp.task('vscode-win32-x64-setup', ['clean-vscode-win32-x64-setup'], buildWin32Setup('x64')); - cp.spawn(_7z, args, { stdio: 'inherit' }) - .on('error', cb) - .on('exit', () => cb(null)); +function archiveWin32Setup(arch) { + return cb => { + const args = ['a', '-tzip', zipPath(arch), buildPath(arch), '-r']; + + cp.spawn(_7z, args, { stdio: 'inherit' }) + .on('error', cb) + .on('exit', () => cb(null)); + }; } -gulp.task('clean-vscode-win32-ia32-archive', util.rimraf('.build/win32-ia32/archive')); -gulp.task('vscode-win32-ia32-archive', ['clean-vscode-win32-ia32-archive'], archiveWin32Setup); +gulp.task('clean-vscode-win32-ia32-archive', util.rimraf(zipDir('ia32'))); +gulp.task('vscode-win32-ia32-archive', ['clean-vscode-win32-ia32-archive'], archiveWin32Setup('ia32')); + +gulp.task('clean-vscode-win32-x64-archive', util.rimraf(zipDir('x64'))); +gulp.task('vscode-win32-x64-archive', ['clean-vscode-win32-x64-archive'], archiveWin32Setup('x64')); diff --git a/build/win32/code.iss b/build/win32/code.iss index ce61c44b8cfe1..b7988b383cc28 100644 --- a/build/win32/code.iss +++ b/build/win32/code.iss @@ -14,7 +14,7 @@ AppUpdatesURL=https://code.visualstudio.com/ DefaultDirName={pf}\{#DirName} DefaultGroupName={#NameLong} AllowNoIcons=yes -OutputDir={#RepoDir}\.build\win32-ia32\setup +OutputDir={#OutputDir} OutputBaseFilename=VSCodeSetup Compression=lzma SolidCompression=yes From 7efdde8060945822834557f53984850754fd96e5 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 May 2017 12:11:06 +0200 Subject: [PATCH 0694/2747] [diff] update grammar --- extensions/diff/package.json | 5 +- extensions/diff/syntaxes/diff.tmLanguage.json | 163 ++++++++++++++++++ .../diff/test/colorize-results/test_diff.json | 6 +- 3 files changed, 170 insertions(+), 4 deletions(-) create mode 100644 extensions/diff/syntaxes/diff.tmLanguage.json diff --git a/extensions/diff/package.json b/extensions/diff/package.json index 51376f26979e4..a62e57243c30a 100644 --- a/extensions/diff/package.json +++ b/extensions/diff/package.json @@ -3,6 +3,9 @@ "version": "0.1.0", "publisher": "vscode", "engines": { "vscode": "*" }, + "scripts": { + "update-grammar": "node ../../build/npm/update-grammar.js textmate/diff.tmbundle Syntaxes/Diff.plist ./syntaxes/diff.tmLanguage.json" + }, "contributes": { "languages": [ { @@ -16,7 +19,7 @@ { "language": "diff", "scopeName": "source.diff", - "path": "./syntaxes/diff.tmLanguage" + "path": "./syntaxes/diff.tmLanguage.json" } ] } diff --git a/extensions/diff/syntaxes/diff.tmLanguage.json b/extensions/diff/syntaxes/diff.tmLanguage.json new file mode 100644 index 0000000000000..ac16f416a6495 --- /dev/null +++ b/extensions/diff/syntaxes/diff.tmLanguage.json @@ -0,0 +1,163 @@ +{ + "fileTypes": [ + "patch", + "diff", + "rej" + ], + "firstLineMatch": "(?x)^\n\t\t(===\\ modified\\ file\n\t\t|==== \\s* // .+ \\s - \\s .+ \\s+ ====\n\t\t|Index:\\ \n\t\t|---\\ [^%\\n]\n\t\t|\\*\\*\\*.*\\d{4}\\s*$\n\t\t|\\d+(,\\d+)* (a|d|c) \\d+(,\\d+)* $\n\t\t|diff\\ --git\\ \n\t\t|commit\\ [0-9a-f]{40}$\n\t\t)", + "keyEquivalent": "^~D", + "name": "Diff", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.separator.diff" + } + }, + "match": "^((\\*{15})|(={67})|(-{3}))$\\n?", + "name": "meta.separator.diff" + }, + { + "match": "^\\d+(,\\d+)*(a|d|c)\\d+(,\\d+)*$\\n?", + "name": "meta.diff.range.normal" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.range.diff" + }, + "2": { + "name": "meta.toc-list.line-number.diff" + }, + "3": { + "name": "punctuation.definition.range.diff" + } + }, + "match": "^(@@)\\s*(.+?)\\s*(@@)($\\n?)?", + "name": "meta.diff.range.unified" + }, + { + "captures": { + "3": { + "name": "punctuation.definition.range.diff" + }, + "4": { + "name": "punctuation.definition.range.diff" + }, + "6": { + "name": "punctuation.definition.range.diff" + }, + "7": { + "name": "punctuation.definition.range.diff" + } + }, + "match": "^(((\\-{3}) .+ (\\-{4}))|((\\*{3}) .+ (\\*{4})))$\\n?", + "name": "meta.diff.range.context" + }, + { + "match": "^diff --git a/.*$\\n?", + "name": "meta.diff.header.git" + }, + { + "match": "^diff (-|\\S+\\s+\\S+).*$\\n?", + "name": "meta.diff.header.command" + }, + { + "captures": { + "4": { + "name": "punctuation.definition.from-file.diff" + }, + "6": { + "name": "punctuation.definition.from-file.diff" + }, + "7": { + "name": "punctuation.definition.from-file.diff" + } + }, + "match": "(^(((-{3}) .+)|((\\*{3}) .+))$\\n?|^(={4}) .+(?= - ))", + "name": "meta.diff.header.from-file" + }, + { + "captures": { + "2": { + "name": "punctuation.definition.to-file.diff" + }, + "3": { + "name": "punctuation.definition.to-file.diff" + }, + "4": { + "name": "punctuation.definition.to-file.diff" + } + }, + "match": "(^(\\+{3}) .+$\\n?| (-) .* (={4})$\\n?)", + "name": "meta.diff.header.to-file" + }, + { + "captures": { + "3": { + "name": "punctuation.definition.inserted.diff" + }, + "6": { + "name": "punctuation.definition.inserted.diff" + } + }, + "match": "^(((>)( .*)?)|((\\+).*))$\\n?", + "name": "markup.inserted.diff" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.changed.diff" + } + }, + "match": "^(!).*$\\n?", + "name": "markup.changed.diff" + }, + { + "captures": { + "3": { + "name": "punctuation.definition.deleted.diff" + }, + "6": { + "name": "punctuation.definition.deleted.diff" + } + }, + "match": "^(((<)( .*)?)|((-).*))$\\n?", + "name": "markup.deleted.diff" + }, + { + "begin": "^(#)", + "captures": { + "1": { + "name": "punctuation.definition.comment.diff" + } + }, + "comment": "Git produces unified diffs with embedded comments\"", + "end": "\\n", + "name": "comment.line.number-sign.diff" + }, + { + "match": "^index [0-9a-f]{7,40}\\.\\.[0-9a-f]{7,40}.*$\\n?", + "name": "meta.diff.index.git" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.key-value.diff" + }, + "2": { + "name": "meta.toc-list.file-name.diff" + } + }, + "match": "^Index(:) (.+)$\\n?", + "name": "meta.diff.index" + }, + { + "match": "^Only in .*: .*$\\n?", + "name": "meta.diff.only-in" + } + ], + "scopeName": "source.diff", + "uuid": "7E848FF4-708E-11D9-97B4-0011242E4184", + "version": "https://github.com/textmate/diff.tmbundle/commit/0593bb775eab1824af97ef2172fd38822abd97d7" +} \ No newline at end of file diff --git a/extensions/diff/test/colorize-results/test_diff.json b/extensions/diff/test/colorize-results/test_diff.json index 5329bcae5c028..26ab2f4fb0300 100644 --- a/extensions/diff/test/colorize-results/test_diff.json +++ b/extensions/diff/test/colorize-results/test_diff.json @@ -100,7 +100,7 @@ }, { "c": "-", - "t": "source.diff markup.deleted.diff punctuation.definition.inserted.diff", + "t": "source.diff markup.deleted.diff punctuation.definition.deleted.diff", "r": { "dark_plus": "markup.deleted: #CE9178", "light_plus": "markup.deleted: #A31515", @@ -122,7 +122,7 @@ }, { "c": "-", - "t": "source.diff markup.deleted.diff punctuation.definition.inserted.diff", + "t": "source.diff markup.deleted.diff punctuation.definition.deleted.diff", "r": { "dark_plus": "markup.deleted: #CE9178", "light_plus": "markup.deleted: #A31515", @@ -155,7 +155,7 @@ }, { "c": "-", - "t": "source.diff markup.deleted.diff punctuation.definition.inserted.diff", + "t": "source.diff markup.deleted.diff punctuation.definition.deleted.diff", "r": { "dark_plus": "markup.deleted: #CE9178", "light_plus": "markup.deleted: #A31515", From f1abf5ad11db3da8d0b81bf4899066720635a784 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 May 2017 12:14:24 +0200 Subject: [PATCH 0695/2747] [f#] update grammar --- extensions/fsharp/syntaxes/fsharp.json | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/extensions/fsharp/syntaxes/fsharp.json b/extensions/fsharp/syntaxes/fsharp.json index 4fe9eeffc16c4..7ef61094dd103 100644 --- a/extensions/fsharp/syntaxes/fsharp.json +++ b/extensions/fsharp/syntaxes/fsharp.json @@ -16,9 +16,6 @@ { "include": "#structure" }, - { - "include": "#attributes" - }, { "include": "#strings" }, @@ -31,6 +28,9 @@ { "include": "#definition" }, + { + "include": "#attributes" + }, { "include": "#method_calls" }, @@ -59,7 +59,7 @@ { "name": "function.anonymous", "begin": "\\b(fun)\\b", - "end": "[(->)\\n]", + "end": "(->)", "beginCaptures": { "1": { "name": "keyword.other.function-definition.fsharp" @@ -139,7 +139,7 @@ "patterns": [ { "name": "binding.fsharp", - "begin": "\\b(val mutable|val|let mutable|let inline|let|member|static member|override|let!)(\\s+rec|mutable)?(\\s+private|internal|public)?\\s+(\\([^\\s-]*\\)|[_[:alpha:]]([_[:alpha:]0-9,\\.]|(?<=,)\\s)*)", + "begin": "\\b(val mutable|val|let mutable|let inline|let|member|static member|override|let!)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\([^\\s-]*\\)|[_[:alpha:]]([_[:alpha:]0-9,\\._]|(?<=,)\\s)*)", "end": "((``.*``)|(with)|=|$)", "beginCaptures": { "1": { @@ -149,9 +149,12 @@ "name": "keyword.other.function-recursive.fsharp" }, "3": { - "name": "keyword.other.access.fsharp" + "name": "support.function.attribute.fsharp" }, "4": { + "name": "keyword.other.access.fsharp" + }, + "5": { "name": "variable.other.binding.fsharp" } }, @@ -178,7 +181,7 @@ "patterns": [ { "name": "keyword.other.fsharp", - "match": "\\b(function|yield!|yield|class|match|delegate|of|new|in|as|if|then|else|elif|for|begin|end|inherit|do|let\\!|return\\!|return|interface|with|abstract|member|try|finally|and|when|use|use\\!|struct|while)\\b" + "match": "\\b(function|yield!|yield|class|match|delegate|of|new|in|as|if|then|else|elif|for|begin|end|inherit|do|let\\!|return\\!|return|interface|with|abstract|member|try|finally|and|when|use|use\\!|struct|while|mutable)\\b" }, { "name": "meta.preprocessor.fsharp", @@ -195,7 +198,7 @@ "patterns": [ { "name": "entity.name.section.fsharp", - "begin": "\\b(namespace|module)(\\s+public|internal|private)?\\s+([[:alpha:]][[:alpha:]0-9'_. ]*)", + "begin": "\\b(namespace|module)\\s*(public|internal|private)?\\s+([[:alpha:]][[:alpha:]0-9'_. ]*)", "end": "(\\s|$)", "beginCaptures": { "1": { @@ -389,7 +392,7 @@ "patterns": [ { "name": "record.fsharp", - "match": "(type)[\\s]+(private|internal|public)?[\\s]*([[:alpha:]0-9'<>^:,. ]+)[\\s]*(\\([[:alpha:]0-9'<>^:,. ]+\\))?[\\s]*((with)|(as [[:alpha:]0-9']+)|(=)|(\\(\\)))", + "match": "(type)[\\s]+(private|internal|public)?[\\s]*([[:alpha:]0-9'<>^:,._ ]+)[\\s]*(\\([[:alpha:]0-9'<>^:,._ ]+\\))?[\\s]*((with)|(as [[:alpha:]0-9']+)|(=)|(\\(\\)))", "captures": { "1": { "name": "keyword.other.fsharp" @@ -454,5 +457,5 @@ ] } }, - "version": "https://github.com/ionide/ionide-fsgrammar/commit/edb05603ec3f2eb3c633f92df1649e82fe870545" + "version": "https://github.com/ionide/ionide-fsgrammar/commit/f2e3c30f0ebfcc89fb78ad908701159f20516812" } \ No newline at end of file From fb84773f76462cc0e304a3619f0d92da2e2a357a Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 May 2017 12:26:30 +0200 Subject: [PATCH 0696/2747] [git] add grammar update script --- extensions/gitsyntax/package.json | 7 +- .../gitsyntax/syntaxes/git-commit.tmLanguage | 221 ------------------ .../syntaxes/git-commit.tmLanguage.json | 143 ++++++++++++ .../gitsyntax/syntaxes/git-rebase.tmLanguage | 57 ----- .../syntaxes/git-rebase.tmLanguage.json | 35 +++ 5 files changed, 183 insertions(+), 280 deletions(-) delete mode 100644 extensions/gitsyntax/syntaxes/git-commit.tmLanguage create mode 100644 extensions/gitsyntax/syntaxes/git-commit.tmLanguage.json delete mode 100644 extensions/gitsyntax/syntaxes/git-rebase.tmLanguage create mode 100644 extensions/gitsyntax/syntaxes/git-rebase.tmLanguage.json diff --git a/extensions/gitsyntax/package.json b/extensions/gitsyntax/package.json index 8ce5bd1ba32fe..bc1a1810f9167 100644 --- a/extensions/gitsyntax/package.json +++ b/extensions/gitsyntax/package.json @@ -10,6 +10,9 @@ "categories": [ "Other" ], + "scripts": { + "update-grammar": "node ../../build/npm/update-grammar.js textmate/git.tmbundle Syntaxes/Git%20Commit%20Message.tmLanguage ./syntaxes/git-commit.tmLanguage.json Syntaxes/Git%20Rebase%20Message.tmLanguage ./syntaxes/git-rebase.tmLanguage.json" + }, "contributes": { "languages": [ { @@ -40,12 +43,12 @@ { "language": "git-commit", "scopeName": "text.git-commit", - "path": "./syntaxes/git-commit.tmLanguage" + "path": "./syntaxes/git-commit.tmLanguage.json" }, { "language": "git-rebase", "scopeName": "text.git-rebase", - "path": "./syntaxes/git-rebase.tmLanguage" + "path": "./syntaxes/git-rebase.tmLanguage.json" } ] } diff --git a/extensions/gitsyntax/syntaxes/git-commit.tmLanguage b/extensions/gitsyntax/syntaxes/git-commit.tmLanguage deleted file mode 100644 index 705fc0a36f96d..0000000000000 --- a/extensions/gitsyntax/syntaxes/git-commit.tmLanguage +++ /dev/null @@ -1,221 +0,0 @@ - - - - - fileTypes - - COMMIT_EDITMSG - MERGE_MSG - - foldingStartMarker - ^\+\+\+ - foldingStopMarker - ^--- - name - Git Commit Message - patterns - - - begin - \A(?!# Please enter the commit message) - end - ^(?=# Please enter the commit message) - name - meta.scope.message.git-commit - patterns - - - begin - \A(?=#) - end - ^(?!#) - patterns - - - include - #comment - - - - - begin - ^(?!# Please enter the commit message) - end - ^(?=# Please enter the commit message) - patterns - - - begin - \G - end - ^(?!\G) - name - meta.scope.subject.git-commit - patterns - - - captures - - 1 - - name - keyword.other.$2.git-commit - - - match - \G((fixup|squash)!)\s* - - - match - .{66,}$ - name - invalid.illegal.line-too-long.git-commit - - - match - .{51,}$ - name - invalid.deprecated.line-too-long.git-commit - - - - - begin - ^(?!# Please enter the commit message) - end - ^(?=# Please enter the commit message) - patterns - - - include - #comment - - - - - - - - - begin - ^(?=# Please enter the commit message) - end - \z - name - meta.scope.metadata.git-commit - patterns - - - include - #metadata - - - - - repository - - comment - - begin - ^(#) - captures - - 1 - - name - punctuation.definition.comment.git-commit - - - end - \n - name - comment.line.number-sign.git-commit - - metadata - - patterns - - - begin - (?=^# Changes to be committed:) - end - (?!\G)((?=^# \w)|(?!^#)) - patterns - - - begin - (^[ \t]+)?(?=#) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.git-commit - - - contentName - comment.line.number-sign.git-commit - end - (?!\G)^ - patterns - - - match - \G# - name - punctuation.definition.comment.git-commit - - - match - ((modified|renamed):.*)$\n? - name - markup.changed.git-commit - - - match - (new file:.*)$\n? - name - markup.inserted.git-commit - - - match - (deleted:.*)$\n? - name - markup.deleted.git-commit - - - - - - - include - #comment - - - begin - (?=diff\ \-\-git) - comment - diff presented at the end of the commit message when using commit -v. - contentName - source.diff - end - \z - name - meta.embedded.diff.git-commit - patterns - - - include - source.diff - - - - - - - scopeName - text.git-commit - uuid - BFE83C06-8508-44BE-A975-95A57BF619A7 - - diff --git a/extensions/gitsyntax/syntaxes/git-commit.tmLanguage.json b/extensions/gitsyntax/syntaxes/git-commit.tmLanguage.json new file mode 100644 index 0000000000000..5f5db8762fa29 --- /dev/null +++ b/extensions/gitsyntax/syntaxes/git-commit.tmLanguage.json @@ -0,0 +1,143 @@ +{ + "fileTypes": [ + "COMMIT_EDITMSG", + "MERGE_MSG" + ], + "foldingStartMarker": "^\\+\\+\\+", + "foldingStopMarker": "^---", + "name": "Git Commit Message", + "patterns": [ + { + "begin": "\\A(?!# Please enter the commit message)", + "end": "^(?=# Please enter the commit message)", + "name": "meta.scope.message.git-commit", + "patterns": [ + { + "begin": "\\A(?=#)", + "end": "^(?!#)", + "patterns": [ + { + "include": "#comment" + } + ] + }, + { + "begin": "^(?!# Please enter the commit message)", + "end": "^(?=# Please enter the commit message)", + "patterns": [ + { + "begin": "\\G", + "end": "^(?!\\G)", + "name": "meta.scope.subject.git-commit", + "patterns": [ + { + "captures": { + "1": { + "name": "keyword.other.$2.git-commit" + } + }, + "match": "\\G((fixup|squash)!)\\s*" + }, + { + "match": ".{73,}$", + "name": "invalid.illegal.line-too-long.git-commit" + }, + { + "match": ".{51,}$", + "name": "invalid.deprecated.line-too-long.git-commit" + } + ] + }, + { + "begin": "^(?!# Please enter the commit message)", + "end": "^(?=# Please enter the commit message)", + "patterns": [ + { + "include": "#comment" + } + ] + } + ] + } + ] + }, + { + "begin": "^(?=# Please enter the commit message)", + "end": "\\z", + "name": "meta.scope.metadata.git-commit", + "patterns": [ + { + "include": "#metadata" + } + ] + } + ], + "repository": { + "comment": { + "begin": "^(#)", + "captures": { + "1": { + "name": "punctuation.definition.comment.git-commit" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.git-commit" + }, + "metadata": { + "patterns": [ + { + "begin": "(?=^# Changes to be committed:)", + "end": "(?!\\G)((?=^# \\w)|(?!^#))", + "patterns": [ + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.git-commit" + } + }, + "contentName": "comment.line.number-sign.git-commit", + "end": "(?!\\G)^", + "patterns": [ + { + "match": "\\G#", + "name": "punctuation.definition.comment.git-commit" + }, + { + "match": "((modified|renamed):.*)$\\n?", + "name": "markup.changed.git-commit" + }, + { + "match": "(new file:.*)$\\n?", + "name": "markup.inserted.git-commit" + }, + { + "match": "(deleted:.*)$\\n?", + "name": "markup.deleted.git-commit" + } + ] + } + ] + }, + { + "include": "#comment" + }, + { + "begin": "(?=diff\\ \\-\\-git)", + "comment": "diff presented at the end of the commit message when using commit -v.", + "contentName": "source.diff", + "end": "\\z", + "name": "meta.embedded.diff.git-commit", + "patterns": [ + { + "include": "source.diff" + } + ] + } + ] + } + }, + "scopeName": "text.git-commit", + "uuid": "BFE83C06-8508-44BE-A975-95A57BF619A7", + "version": "https://github.com/textmate/git.tmbundle/commit/93897a78c6e52bef13dadc0d4091d203c5facb40" +} \ No newline at end of file diff --git a/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage b/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage deleted file mode 100644 index a53ee1533fd89..0000000000000 --- a/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage +++ /dev/null @@ -1,57 +0,0 @@ - - - - - fileTypes - - git-rebase-todo - - name - Git Rebase Message - patterns - - - captures - - 1 - - name - punctuation.definition.comment.git-rebase - - - match - ^\s*(#).*$\n? - name - comment.line.number-sign.git-rebase - - - captures - - 1 - - name - support.function.git-rebase - - 2 - - name - constant.sha.git-rebase - - 3 - - name - meta.commit-message.git-rebase - - - match - ^\s*(pick|p|reword|r|edit|e|squash|s|fixup|f|d|drop|x|exec)\s+([0-9a-f]+)\s+(.*)$ - name - meta.commit-command.git-rebase - - - scopeName - text.git-rebase - uuid - 7F1CC209-5F6D-486A-8180-09FA282381A1 - - diff --git a/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage.json b/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage.json new file mode 100644 index 0000000000000..c8bf731d9cb2a --- /dev/null +++ b/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage.json @@ -0,0 +1,35 @@ +{ + "fileTypes": [ + "git-rebase-todo" + ], + "name": "Git Rebase Message", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.comment.git-rebase" + } + }, + "match": "^\\s*(#).*$\\n?", + "name": "comment.line.number-sign.git-rebase" + }, + { + "captures": { + "1": { + "name": "support.function.git-rebase" + }, + "2": { + "name": "constant.sha.git-rebase" + }, + "3": { + "name": "meta.commit-message.git-rebase" + } + }, + "match": "^\\s*(pick|p|reword|r|edit|e|squash|s|fixup|f|exec|x|drop|d)\\s+([0-9a-f]+)\\s+(.*)$", + "name": "meta.commit-command.git-rebase" + } + ], + "scopeName": "text.git-rebase", + "uuid": "7F1CC209-5F6D-486A-8180-09FA282381A1", + "version": "https://github.com/textmate/git.tmbundle/commit/d1db42c2d71948662098183a6df519fb53a7a15b" +} \ No newline at end of file From 7728b701bdc8fb0685c2fc3e9eb9df48166e0841 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 May 2017 12:28:55 +0200 Subject: [PATCH 0697/2747] [go] update grammar --- extensions/go/syntaxes/go.json | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/extensions/go/syntaxes/go.json b/extensions/go/syntaxes/go.json index 0cfcf1940ad5f..a6799e3b31993 100644 --- a/extensions/go/syntaxes/go.json +++ b/extensions/go/syntaxes/go.json @@ -227,7 +227,7 @@ ] }, { - "match": "(? Date: Thu, 18 May 2017 12:33:46 +0200 Subject: [PATCH 0698/2747] [groovy] add grammar update script --- extensions/groovy/package.json | 5 +- extensions/groovy/syntaxes/Groovy.tmLanguage | 2145 ----------------- .../groovy/syntaxes/groovy.tmLanguage.json | 1386 +++++++++++ 3 files changed, 1390 insertions(+), 2146 deletions(-) delete mode 100644 extensions/groovy/syntaxes/Groovy.tmLanguage create mode 100644 extensions/groovy/syntaxes/groovy.tmLanguage.json diff --git a/extensions/groovy/package.json b/extensions/groovy/package.json index 5c8e10e120b56..56f91c9dda400 100644 --- a/extensions/groovy/package.json +++ b/extensions/groovy/package.json @@ -3,6 +3,9 @@ "version": "0.1.0", "publisher": "vscode", "engines": { "vscode": "*" }, + "scripts": { + "update-grammar": "node ../../build/npm/update-grammar.js textmate/groovy.tmbundle Syntaxes/Groovy.tmLanguage ./syntaxes/groovy.tmLanguage.json" + }, "contributes": { "languages": [{ "id": "groovy", @@ -15,7 +18,7 @@ "grammars": [{ "language": "groovy", "scopeName": "source.groovy", - "path": "./syntaxes/Groovy.tmLanguage" + "path": "./syntaxes/groovy.tmLanguage.json" }], "snippets": [{ "language": "groovy", diff --git a/extensions/groovy/syntaxes/Groovy.tmLanguage b/extensions/groovy/syntaxes/Groovy.tmLanguage deleted file mode 100644 index e8973140a57f3..0000000000000 --- a/extensions/groovy/syntaxes/Groovy.tmLanguage +++ /dev/null @@ -1,2145 +0,0 @@ - - - - - fileTypes - - groovy - gvy - - foldingStartMarker - (\{\s*$|^\s*// \{\{\{) - foldingStopMarker - ^\s*(\}|// \}\}\}$) - keyEquivalent - ^~G - name - Groovy - patterns - - - captures - - 1 - - name - punctuation.definition.comment.groovy - - - match - ^(#!).+$\n - name - comment.line.hashbang.groovy - - - captures - - 1 - - name - keyword.other.package.groovy - - 2 - - name - storage.modifier.package.groovy - - 3 - - name - punctuation.terminator.groovy - - - match - ^\s*(package)\b(?:\s*([^ ;$]+)\s*(;)?)? - name - meta.package.groovy - - - begin - (import static)\b\s* - beginCaptures - - 1 - - name - keyword.other.import.static.groovy - - - captures - - 1 - - name - keyword.other.import.groovy - - 2 - - name - storage.modifier.import.groovy - - 3 - - name - punctuation.terminator.groovy - - - contentName - storage.modifier.import.groovy - end - \s*(?:$|(?=%>)(;)) - endCaptures - - 1 - - name - punctuation.terminator.groovy - - - name - meta.import.groovy - patterns - - - match - \. - name - punctuation.separator.groovy - - - match - \s - name - invalid.illegal.character_not_allowed_here.groovy - - - - - begin - (import)\b\s* - beginCaptures - - 1 - - name - keyword.other.import.groovy - - - captures - - 1 - - name - keyword.other.import.groovy - - 2 - - name - storage.modifier.import.groovy - - 3 - - name - punctuation.terminator.groovy - - - contentName - storage.modifier.import.groovy - end - \s*(?:$|(?=%>)|(;)) - endCaptures - - 1 - - name - punctuation.terminator.groovy - - - name - meta.import.groovy - patterns - - - match - \. - name - punctuation.separator.groovy - - - match - \s - name - invalid.illegal.character_not_allowed_here.groovy - - - - - captures - - 1 - - name - keyword.other.import.groovy - - 2 - - name - keyword.other.import.static.groovy - - 3 - - name - storage.modifier.import.groovy - - 4 - - name - punctuation.terminator.groovy - - - match - ^\s*(import)(?:\s+(static)\s+)\b(?:\s*([^ ;$]+)\s*(;)?)? - name - meta.import.groovy - - - include - #groovy - - - repository - - annotations - - patterns - - - begin - (?<!\.)(@[^ (]+)(\() - beginCaptures - - 1 - - name - storage.type.annotation.groovy - - 2 - - name - punctuation.definition.annotation-arguments.begin.groovy - - - end - (\)) - endCaptures - - 1 - - name - punctuation.definition.annotation-arguments.end.groovy - - - name - meta.declaration.annotation.groovy - patterns - - - captures - - 1 - - name - constant.other.key.groovy - - 2 - - name - keyword.operator.assignment.groovy - - - match - (\w*)\s*(=) - - - include - #values - - - match - , - name - punctuation.definition.seperator.groovy - - - - - match - (?<!\.)@\S+ - name - storage.type.annotation.groovy - - - - anonymous-classes-and-new - - begin - \bnew\b - beginCaptures - - 0 - - name - keyword.control.new.groovy - - - end - (?<=\)|\])(?!\s*{)|(?<=})|(?=[;])|$ - patterns - - - begin - (\w+)\s*(?=\[) - beginCaptures - - 1 - - name - storage.type.groovy - - - end - }|(?=\s*(?:,|;|\)))|$ - patterns - - - begin - \[ - end - \] - patterns - - - include - #groovy - - - - - begin - { - end - (?=}) - patterns - - - include - #groovy - - - - - - - begin - (?=\w.*\(?) - end - (?<=\))|$ - patterns - - - include - #object-types - - - begin - \( - beginCaptures - - 1 - - name - storage.type.groovy - - - end - \) - patterns - - - include - #groovy - - - - - - - begin - { - end - } - name - meta.inner-class.groovy - patterns - - - include - #class-body - - - - - - braces - - begin - \{ - end - \} - patterns - - - include - #groovy-code - - - - class - - begin - (?=\w?[\w\s]*(?:class|(?:@)?interface|enum)\s+\w+) - end - } - endCaptures - - 0 - - name - punctuation.section.class.end.groovy - - - name - meta.definition.class.groovy - patterns - - - include - #storage-modifiers - - - include - #comments - - - captures - - 1 - - name - storage.modifier.groovy - - 2 - - name - entity.name.type.class.groovy - - - match - (class|(?:@)?interface|enum)\s+(\w+) - name - meta.class.identifier.groovy - - - begin - extends - beginCaptures - - 0 - - name - storage.modifier.extends.groovy - - - end - (?={|implements) - name - meta.definition.class.inherited.classes.groovy - patterns - - - include - #object-types-inherited - - - include - #comments - - - - - begin - (implements)\s - beginCaptures - - 1 - - name - storage.modifier.implements.groovy - - - end - (?=\s*extends|\{) - name - meta.definition.class.implemented.interfaces.groovy - patterns - - - include - #object-types-inherited - - - include - #comments - - - - - begin - { - end - (?=}) - name - meta.class.body.groovy - patterns - - - include - #class-body - - - - - - class-body - - patterns - - - include - #enum-values - - - include - #constructors - - - include - #groovy - - - - closures - - begin - \{(?=.*?->) - end - \} - patterns - - - begin - (?<=\{)(?=[^\}]*?->) - end - -> - endCaptures - - 0 - - name - keyword.operator.groovy - - - patterns - - - begin - (?!->) - end - (?=->) - name - meta.closure.parameters.groovy - patterns - - - begin - (?!,|->) - end - (?=,|->) - name - meta.closure.parameter.groovy - patterns - - - begin - = - beginCaptures - - 0 - - name - keyword.operator.assignment.groovy - - - end - (?=,|->) - name - meta.parameter.default.groovy - patterns - - - include - #groovy-code - - - - - include - #parameters - - - - - - - - - begin - (?=[^}]) - end - (?=\}) - patterns - - - include - #groovy-code - - - - - - comment-block - - begin - /\* - captures - - 0 - - name - punctuation.definition.comment.groovy - - - end - \*/ - name - comment.block.groovy - - comments - - patterns - - - captures - - 0 - - name - punctuation.definition.comment.groovy - - - match - /\*\*/ - name - comment.block.empty.groovy - - - include - text.html.javadoc - - - include - #comment-block - - - captures - - 1 - - name - punctuation.definition.comment.groovy - - - match - (//).*$\n? - name - comment.line.double-slash.groovy - - - - constants - - patterns - - - match - \b([A-Z][A-Z0-9_]+)\b - name - constant.other.groovy - - - match - \b(true|false|null)\b - name - constant.language.groovy - - - - constructors - - applyEndPatternLast - 1 - begin - (?<=;|^)(?=\s*(?:(?:private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final)\s+)*[A-Z]\w*\() - end - } - patterns - - - include - #method-content - - - - enum-values - - patterns - - - begin - (?<=;|^)\s*\b([A-Z0-9_]+)(?=\s*(?:,|;|}|\(|$)) - beginCaptures - - 1 - - name - constant.enum.name.groovy - - - end - ,|;|(?=})|^(?!\s*\w+\s*(?:,|$)) - patterns - - - begin - \( - end - \) - name - meta.enum.value.groovy - patterns - - - match - , - name - punctuation.definition.seperator.parameter.groovy - - - include - #groovy-code - - - - - - - - groovy - - patterns - - - include - #comments - - - include - #class - - - include - #variables - - - include - #methods - - - include - #annotations - - - include - #groovy-code - - - - groovy-code - - patterns - - - include - #groovy-code-minus-map-keys - - - include - #map-keys - - - - groovy-code-minus-map-keys - - comment - In some situations, maps can't be declared without enclosing []'s, - therefore we create a collection of everything but that - patterns - - - include - #comments - - - include - #annotations - - - include - #support-functions - - - include - #keyword-language - - - include - #values - - - include - #anonymous-classes-and-new - - - include - #keyword-operator - - - include - #types - - - include - #storage-modifiers - - - include - #parens - - - include - #closures - - - include - #braces - - - - keyword - - patterns - - - include - #keyword-operator - - - include - #keyword-language - - - - keyword-language - - patterns - - - match - \b(try|catch|finally|throw)\b - name - keyword.control.exception.groovy - - - match - \b((?<!\.)(?:return|break|continue|default|do|while|for|switch|if|else))\b - name - keyword.control.groovy - - - begin - \bcase\b - beginCaptures - - 0 - - name - keyword.control.groovy - - - end - : - endCaptures - - 0 - - name - punctuation.definition.case-terminator.groovy - - - name - meta.case.groovy - patterns - - - include - #groovy-code-minus-map-keys - - - - - begin - \b(assert)\s - beginCaptures - - 1 - - name - keyword.control.assert.groovy - - - end - $|;|} - name - meta.declaration.assertion.groovy - patterns - - - match - : - name - keyword.operator.assert.expression-seperator.groovy - - - include - #groovy-code-minus-map-keys - - - - - match - \b(throws)\b - name - keyword.other.throws.groovy - - - - keyword-operator - - patterns - - - match - \b(as)\b - name - keyword.operator.as.groovy - - - match - \b(in)\b - name - keyword.operator.in.groovy - - - match - \?\: - name - keyword.operator.elvis.groovy - - - match - \*\: - name - keyword.operator.spreadmap.groovy - - - match - \.\. - name - keyword.operator.range.groovy - - - match - \-> - name - keyword.operator.arrow.groovy - - - match - << - name - keyword.operator.leftshift.groovy - - - match - (?<=\S)\.(?=\S) - name - keyword.operator.navigation.groovy - - - match - (?<=\S)\?\.(?=\S) - name - keyword.operator.safe-navigation.groovy - - - begin - \? - beginCaptures - - 0 - - name - keyword.operator.ternary.groovy - - - end - (?=$|\)|}|]) - name - meta.evaluation.ternary.groovy - patterns - - - match - : - name - keyword.operator.ternary.expression-seperator.groovy - - - include - #groovy-code-minus-map-keys - - - - - match - ==~ - name - keyword.operator.match.groovy - - - match - =~ - name - keyword.operator.find.groovy - - - match - \b(instanceof)\b - name - keyword.operator.instanceof.groovy - - - match - (===|==|!=|<=|>=|<=>|<>|<|>|<<) - name - keyword.operator.comparison.groovy - - - match - = - name - keyword.operator.assignment.groovy - - - match - (\-\-|\+\+) - name - keyword.operator.increment-decrement.groovy - - - match - (\-|\+|\*|\/|%) - name - keyword.operator.arithmetic.groovy - - - match - (!|&&|\|\|) - name - keyword.operator.logical.groovy - - - - language-variables - - patterns - - - match - \b(this|super)\b - name - variable.language.groovy - - - - map-keys - - patterns - - - captures - - 1 - - name - constant.other.key.groovy - - 2 - - name - punctuation.definition.seperator.key-value.groovy - - - match - (\w+)\s*(:) - - - - method-call - - begin - ([\w$]+)(\() - beginCaptures - - 1 - - name - meta.method.groovy - - 2 - - name - punctuation.definition.method-parameters.begin.groovy - - - end - \) - endCaptures - - 0 - - name - punctuation.definition.method-parameters.end.groovy - - - name - meta.method-call.groovy - patterns - - - match - , - name - punctuation.definition.seperator.parameter.groovy - - - include - #groovy-code - - - - method-content - - patterns - - - match - \s - - - include - #annotations - - - begin - (?=(?:\w|<)[^\(]*\s+(?:[\w$]|<)+\s*\() - end - (?=[\w$]+\s*\() - name - meta.method.return-type.java - patterns - - - include - #storage-modifiers - - - include - #types - - - - - begin - ([\w$]+)\s*\( - beginCaptures - - 1 - - name - entity.name.function.java - - - end - \) - name - meta.definition.method.signature.java - patterns - - - begin - (?=[^)]) - end - (?=\)) - name - meta.method.parameters.groovy - patterns - - - begin - (?=[^,)]) - end - (?=,|\)) - name - meta.method.parameter.groovy - patterns - - - match - , - name - punctuation.definition.separator.groovy - - - begin - = - beginCaptures - - 0 - - name - keyword.operator.assignment.groovy - - - end - (?=,|\)) - name - meta.parameter.default.groovy - patterns - - - include - #groovy-code - - - - - include - #parameters - - - - - - - - - begin - (?=<) - end - (?=\s) - name - meta.method.paramerised-type.groovy - patterns - - - begin - < - end - > - name - storage.type.parameters.groovy - patterns - - - include - #types - - - match - , - name - punctuation.definition.seperator.groovy - - - - - - - begin - throws - beginCaptures - - 0 - - name - storage.modifier.groovy - - - end - (?={|;)|^(?=\s*(?:[^{\s]|$)) - name - meta.throwables.groovy - patterns - - - include - #object-types - - - - - begin - { - end - (?=}) - name - meta.method.body.java - patterns - - - include - #groovy-code - - - - - - methods - - applyEndPatternLast - 1 - begin - (?x:(?<=;|^|{)(?=\s* - (?: - (?:private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final) # visibility/modifier - | - (?:def) - | - (?: - (?: - (?:void|boolean|byte|char|short|int|float|long|double) - | - (?:@?(?:[a-zA-Z]\w*\.)*[A-Z]+\w*) # object type - ) - [\[\]]* - (?:<.*>)? - ) - - ) - \s+ - ([^=]+\s+)?\w+\s*\( - )) - end - }|(?=[^{]) - name - meta.definition.method.groovy - patterns - - - include - #method-content - - - - nest_curly - - begin - \{ - captures - - 0 - - name - punctuation.section.scope.groovy - - - end - \} - patterns - - - include - #nest_curly - - - - numbers - - patterns - - - match - ((0(x|X)[0-9a-fA-F]*)|(\+|-)?\b(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)([LlFfUuDdg]|UL|ul)?\b - name - constant.numeric.groovy - - - - object-types - - patterns - - - begin - \b((?:[a-z]\w*\.)*(?:[A-Z]+\w*[a-z]+\w*|UR[LI]))< - end - >|[^\w\s,\?<\[\]] - name - storage.type.generic.groovy - patterns - - - include - #object-types - - - begin - < - comment - This is just to support <>'s with no actual type prefix - end - >|[^\w\s,\[\]<] - name - storage.type.generic.groovy - - - - - begin - \b((?:[a-z]\w*\.)*[A-Z]+\w*[a-z]+\w*)(?=\[) - end - (?=[^\]\s]) - name - storage.type.object.array.groovy - patterns - - - begin - \[ - end - \] - patterns - - - include - #groovy - - - - - - - match - \b(?:[a-zA-Z]\w*\.)*(?:[A-Z]+\w*[a-z]+\w*|UR[LI])\b - name - storage.type.groovy - - - - object-types-inherited - - patterns - - - begin - \b((?:[a-zA-Z]\w*\.)*[A-Z]+\w*[a-z]+\w*)< - end - >|[^\w\s,\?<\[\]] - name - entity.other.inherited-class.groovy - patterns - - - include - #object-types-inherited - - - begin - < - comment - This is just to support <>'s with no actual type prefix - end - >|[^\w\s,\[\]<] - name - storage.type.generic.groovy - - - - - captures - - 1 - - name - keyword.operator.dereference.groovy - - - match - \b(?:[a-zA-Z]\w*(\.))*[A-Z]+\w*[a-z]+\w*\b - name - entity.other.inherited-class.groovy - - - - parameters - - patterns - - - include - #annotations - - - include - #storage-modifiers - - - include - #types - - - match - \w+ - name - variable.parameter.method.groovy - - - - parens - - begin - \( - end - \) - patterns - - - include - #groovy-code - - - - primitive-arrays - - patterns - - - match - \b(?:void|boolean|byte|char|short|int|float|long|double)(\[\])*\b - name - storage.type.primitive.array.groovy - - - - primitive-types - - patterns - - - match - \b(?:void|boolean|byte|char|short|int|float|long|double)\b - name - storage.type.primitive.groovy - - - - regexp - - patterns - - - begin - /(?=[^/]+/([^>]|$)) - beginCaptures - - 0 - - name - punctuation.definition.string.regexp.begin.groovy - - - end - / - endCaptures - - 0 - - name - punctuation.definition.string.regexp.end.groovy - - - name - string.regexp.groovy - patterns - - - match - \\. - name - constant.character.escape.groovy - - - - - begin - ~" - beginCaptures - - 0 - - name - punctuation.definition.string.regexp.begin.groovy - - - end - " - endCaptures - - 0 - - name - punctuation.definition.string.regexp.end.groovy - - - name - string.regexp.compiled.groovy - patterns - - - match - \\. - name - constant.character.escape.groovy - - - - - - storage-modifiers - - patterns - - - match - \b(private|protected|public)\b - name - storage.modifier.access-control.groovy - - - match - \b(static)\b - name - storage.modifier.static.groovy - - - match - \b(final)\b - name - storage.modifier.final.groovy - - - match - \b(native|synchronized|abstract|threadsafe|transient)\b - name - storage.modifier.other.groovy - - - - string-quoted-double - - begin - " - beginCaptures - - 0 - - name - punctuation.definition.string.begin.groovy - - - end - " - endCaptures - - 0 - - name - punctuation.definition.string.end.groovy - - - name - string.quoted.double.groovy - patterns - - - include - #string-quoted-double-contents - - - - string-quoted-double-contents - - patterns - - - match - \\. - name - constant.character.escape.groovy - - - applyEndPatternLast - 1 - begin - \$\w - end - (?=\W) - name - variable.other.interpolated.groovy - patterns - - - match - \w - name - variable.other.interpolated.groovy - - - match - \. - name - keyword.other.dereference.groovy - - - - - begin - \$\{ - captures - - 0 - - name - punctuation.section.embedded.groovy - - - end - \} - name - source.groovy.embedded.source - patterns - - - include - #nest_curly - - - - - - string-quoted-double-multiline - - begin - """ - beginCaptures - - 0 - - name - punctuation.definition.string.begin.groovy - - - end - """ - endCaptures - - 0 - - name - punctuation.definition.string.end.groovy - - - name - string.quoted.double.multiline.groovy - patterns - - - include - #string-quoted-double-contents - - - - string-quoted-single - - begin - ' - beginCaptures - - 0 - - name - punctuation.definition.string.begin.groovy - - - end - ' - endCaptures - - 0 - - name - punctuation.definition.string.end.groovy - - - name - string.quoted.single.groovy - patterns - - - include - #string-quoted-single-contents - - - - string-quoted-single-contents - - patterns - - - match - \\. - name - constant.character.escape.groovy - - - - string-quoted-single-multiline - - begin - ''' - beginCaptures - - 0 - - name - punctuation.definition.string.begin.groovy - - - end - ''' - endCaptures - - 0 - - name - punctuation.definition.string.end.groovy - - - name - string.quoted.single.multiline.groovy - patterns - - - include - #string-quoted-single-contents - - - - strings - - patterns - - - include - #string-quoted-double-multiline - - - include - #string-quoted-single-multiline - - - include - #string-quoted-double - - - include - #string-quoted-single - - - include - #regexp - - - - structures - - begin - \[ - beginCaptures - - 0 - - name - punctuation.definition.structure.begin.groovy - - - end - \] - endCaptures - - 0 - - name - punctuation.definition.structure.end.groovy - - - name - meta.structure.groovy - patterns - - - include - #groovy-code - - - match - , - name - punctuation.definition.separator.groovy - - - - support-functions - - patterns - - - match - (?x)\b(?:sprintf|print(?:f|ln)?)\b - name - support.function.print.groovy - - - match - (?x)\b(?:shouldFail|fail(?:NotEquals)?|ass(?:ume|ert(?:S(?:cript|ame)|N(?:ot(?:Same| - Null)|ull)|Contains|T(?:hat|oString|rue)|Inspect|Equals|False|Length| - ArrayEquals)))\b - name - support.function.testing.groovy - - - - types - - patterns - - - match - \b(def)\b - name - storage.type.def.groovy - - - include - #primitive-types - - - include - #primitive-arrays - - - include - #object-types - - - - values - - patterns - - - include - #language-variables - - - include - #strings - - - include - #numbers - - - include - #constants - - - include - #types - - - include - #structures - - - include - #method-call - - - - variables - - applyEndPatternLast - 1 - patterns - - - begin - (?x:(?= - (?: - (?:private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final) # visibility/modifier - | - (?:def) - | - (?:void|boolean|byte|char|short|int|float|long|double) - | - (?:(?:[a-z]\w*\.)*[A-Z]+\w*) # object type - ) - \s+ - [\w\d_<>\[\],\s]+ - (?:=|$) - - )) - end - ;|$ - name - meta.definition.variable.groovy - patterns - - - match - \s - - - captures - - 1 - - name - constant.variable.groovy - - - match - ([A-Z_0-9]+)\s+(?=\=) - - - captures - - 1 - - name - meta.definition.variable.name.groovy - - - match - (\w[^\s,]*)\s+(?=\=) - - - begin - = - beginCaptures - - 0 - - name - keyword.operator.assignment.groovy - - - end - $ - patterns - - - include - #groovy-code - - - - - captures - - 1 - - name - meta.definition.variable.name.groovy - - - match - (\w[^\s=]*)(?=\s*($|;)) - - - include - #groovy-code - - - - - - - scopeName - source.groovy - uuid - B3A64888-EBBB-4436-8D9E-F1169C5D7613 - - \ No newline at end of file diff --git a/extensions/groovy/syntaxes/groovy.tmLanguage.json b/extensions/groovy/syntaxes/groovy.tmLanguage.json new file mode 100644 index 0000000000000..8850454840eb4 --- /dev/null +++ b/extensions/groovy/syntaxes/groovy.tmLanguage.json @@ -0,0 +1,1386 @@ +{ + "fileTypes": [ + "groovy", + "gvy" + ], + "foldingStartMarker": "(\\{\\s*$|^\\s*// \\{\\{\\{)", + "foldingStopMarker": "^\\s*(\\}|// \\}\\}\\}$)", + "keyEquivalent": "^~G", + "name": "Groovy", + "patterns": [ + { + "captures": { + "1": { + "name": "punctuation.definition.comment.groovy" + } + }, + "match": "^(#!).+$\\n", + "name": "comment.line.hashbang.groovy" + }, + { + "captures": { + "1": { + "name": "keyword.other.package.groovy" + }, + "2": { + "name": "storage.modifier.package.groovy" + }, + "3": { + "name": "punctuation.terminator.groovy" + } + }, + "match": "^\\s*(package)\\b(?:\\s*([^ ;$]+)\\s*(;)?)?", + "name": "meta.package.groovy" + }, + { + "begin": "(import static)\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.other.import.static.groovy" + } + }, + "captures": { + "1": { + "name": "keyword.other.import.groovy" + }, + "2": { + "name": "storage.modifier.import.groovy" + }, + "3": { + "name": "punctuation.terminator.groovy" + } + }, + "contentName": "storage.modifier.import.groovy", + "end": "\\s*(?:$|(?=%>)(;))", + "endCaptures": { + "1": { + "name": "punctuation.terminator.groovy" + } + }, + "name": "meta.import.groovy", + "patterns": [ + { + "match": "\\.", + "name": "punctuation.separator.groovy" + }, + { + "match": "\\s", + "name": "invalid.illegal.character_not_allowed_here.groovy" + } + ] + }, + { + "begin": "(import)\\b\\s*", + "beginCaptures": { + "1": { + "name": "keyword.other.import.groovy" + } + }, + "captures": { + "1": { + "name": "keyword.other.import.groovy" + }, + "2": { + "name": "storage.modifier.import.groovy" + }, + "3": { + "name": "punctuation.terminator.groovy" + } + }, + "contentName": "storage.modifier.import.groovy", + "end": "\\s*(?:$|(?=%>)|(;))", + "endCaptures": { + "1": { + "name": "punctuation.terminator.groovy" + } + }, + "name": "meta.import.groovy", + "patterns": [ + { + "match": "\\.", + "name": "punctuation.separator.groovy" + }, + { + "match": "\\s", + "name": "invalid.illegal.character_not_allowed_here.groovy" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.other.import.groovy" + }, + "2": { + "name": "keyword.other.import.static.groovy" + }, + "3": { + "name": "storage.modifier.import.groovy" + }, + "4": { + "name": "punctuation.terminator.groovy" + } + }, + "match": "^\\s*(import)(?:\\s+(static)\\s+)\\b(?:\\s*([^ ;$]+)\\s*(;)?)?", + "name": "meta.import.groovy" + }, + { + "include": "#groovy" + } + ], + "repository": { + "annotations": { + "patterns": [ + { + "begin": "(?)", + "end": "\\}", + "patterns": [ + { + "begin": "(?<=\\{)(?=[^\\}]*?->)", + "end": "->", + "endCaptures": { + "0": { + "name": "keyword.operator.groovy" + } + }, + "patterns": [ + { + "begin": "(?!->)", + "end": "(?=->)", + "name": "meta.closure.parameters.groovy", + "patterns": [ + { + "begin": "(?!,|->)", + "end": "(?=,|->)", + "name": "meta.closure.parameter.groovy", + "patterns": [ + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "keyword.operator.assignment.groovy" + } + }, + "end": "(?=,|->)", + "name": "meta.parameter.default.groovy", + "patterns": [ + { + "include": "#groovy-code" + } + ] + }, + { + "include": "#parameters" + } + ] + } + ] + } + ] + }, + { + "begin": "(?=[^}])", + "end": "(?=\\})", + "patterns": [ + { + "include": "#groovy-code" + } + ] + } + ] + }, + "comment-block": { + "begin": "/\\*", + "captures": { + "0": { + "name": "punctuation.definition.comment.groovy" + } + }, + "end": "\\*/", + "name": "comment.block.groovy" + }, + "comments": { + "patterns": [ + { + "captures": { + "0": { + "name": "punctuation.definition.comment.groovy" + } + }, + "match": "/\\*\\*/", + "name": "comment.block.empty.groovy" + }, + { + "include": "text.html.javadoc" + }, + { + "include": "#comment-block" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.comment.groovy" + } + }, + "match": "(//).*$\\n?", + "name": "comment.line.double-slash.groovy" + } + ] + }, + "constants": { + "patterns": [ + { + "match": "\\b([A-Z][A-Z0-9_]+)\\b", + "name": "constant.other.groovy" + }, + { + "match": "\\b(true|false|null)\\b", + "name": "constant.language.groovy" + } + ] + }, + "constructors": { + "applyEndPatternLast": 1, + "begin": "(?<=;|^)(?=\\s*(?:(?:private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final)\\s+)*[A-Z]\\w*\\()", + "end": "}", + "patterns": [ + { + "include": "#method-content" + } + ] + }, + "enum-values": { + "patterns": [ + { + "begin": "(?<=;|^)\\s*\\b([A-Z0-9_]+)(?=\\s*(?:,|;|}|\\(|$))", + "beginCaptures": { + "1": { + "name": "constant.enum.name.groovy" + } + }, + "end": ",|;|(?=})|^(?!\\s*\\w+\\s*(?:,|$))", + "patterns": [ + { + "begin": "\\(", + "end": "\\)", + "name": "meta.enum.value.groovy", + "patterns": [ + { + "match": ",", + "name": "punctuation.definition.seperator.parameter.groovy" + }, + { + "include": "#groovy-code" + } + ] + } + ] + } + ] + }, + "groovy": { + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#class" + }, + { + "include": "#variables" + }, + { + "include": "#methods" + }, + { + "include": "#annotations" + }, + { + "include": "#groovy-code" + } + ] + }, + "groovy-code": { + "patterns": [ + { + "include": "#groovy-code-minus-map-keys" + }, + { + "include": "#map-keys" + } + ] + }, + "groovy-code-minus-map-keys": { + "comment": "In some situations, maps can't be declared without enclosing []'s, \n\t\t\t\ttherefore we create a collection of everything but that", + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#annotations" + }, + { + "include": "#support-functions" + }, + { + "include": "#keyword-language" + }, + { + "include": "#values" + }, + { + "include": "#anonymous-classes-and-new" + }, + { + "include": "#keyword-operator" + }, + { + "include": "#types" + }, + { + "include": "#storage-modifiers" + }, + { + "include": "#parens" + }, + { + "include": "#closures" + }, + { + "include": "#braces" + } + ] + }, + "keyword": { + "patterns": [ + { + "include": "#keyword-operator" + }, + { + "include": "#keyword-language" + } + ] + }, + "keyword-language": { + "patterns": [ + { + "match": "\\b(try|catch|finally|throw)\\b", + "name": "keyword.control.exception.groovy" + }, + { + "match": "\\b((?", + "name": "keyword.operator.arrow.groovy" + }, + { + "match": "<<", + "name": "keyword.operator.leftshift.groovy" + }, + { + "match": "(?<=\\S)\\.(?=\\S)", + "name": "keyword.operator.navigation.groovy" + }, + { + "match": "(?<=\\S)\\?\\.(?=\\S)", + "name": "keyword.operator.safe-navigation.groovy" + }, + { + "begin": "\\?", + "beginCaptures": { + "0": { + "name": "keyword.operator.ternary.groovy" + } + }, + "end": "(?=$|\\)|}|])", + "name": "meta.evaluation.ternary.groovy", + "patterns": [ + { + "match": ":", + "name": "keyword.operator.ternary.expression-seperator.groovy" + }, + { + "include": "#groovy-code-minus-map-keys" + } + ] + }, + { + "match": "==~", + "name": "keyword.operator.match.groovy" + }, + { + "match": "=~", + "name": "keyword.operator.find.groovy" + }, + { + "match": "\\b(instanceof)\\b", + "name": "keyword.operator.instanceof.groovy" + }, + { + "match": "(===|==|!=|<=|>=|<=>|<>|<|>|<<)", + "name": "keyword.operator.comparison.groovy" + }, + { + "match": "=", + "name": "keyword.operator.assignment.groovy" + }, + { + "match": "(\\-\\-|\\+\\+)", + "name": "keyword.operator.increment-decrement.groovy" + }, + { + "match": "(\\-|\\+|\\*|\\/|%)", + "name": "keyword.operator.arithmetic.groovy" + }, + { + "match": "(!|&&|\\|\\|)", + "name": "keyword.operator.logical.groovy" + } + ] + }, + "language-variables": { + "patterns": [ + { + "match": "\\b(this|super)\\b", + "name": "variable.language.groovy" + } + ] + }, + "map-keys": { + "patterns": [ + { + "captures": { + "1": { + "name": "constant.other.key.groovy" + }, + "2": { + "name": "punctuation.definition.seperator.key-value.groovy" + } + }, + "match": "(\\w+)\\s*(:)" + } + ] + }, + "method-call": { + "begin": "([\\w$]+)(\\()", + "beginCaptures": { + "1": { + "name": "meta.method.groovy" + }, + "2": { + "name": "punctuation.definition.method-parameters.begin.groovy" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.method-parameters.end.groovy" + } + }, + "name": "meta.method-call.groovy", + "patterns": [ + { + "match": ",", + "name": "punctuation.definition.seperator.parameter.groovy" + }, + { + "include": "#groovy-code" + } + ] + }, + "method-content": { + "patterns": [ + { + "match": "\\s" + }, + { + "include": "#annotations" + }, + { + "begin": "(?=(?:\\w|<)[^\\(]*\\s+(?:[\\w$]|<)+\\s*\\()", + "end": "(?=[\\w$]+\\s*\\()", + "name": "meta.method.return-type.java", + "patterns": [ + { + "include": "#storage-modifiers" + }, + { + "include": "#types" + } + ] + }, + { + "begin": "([\\w$]+)\\s*\\(", + "beginCaptures": { + "1": { + "name": "entity.name.function.java" + } + }, + "end": "\\)", + "name": "meta.definition.method.signature.java", + "patterns": [ + { + "begin": "(?=[^)])", + "end": "(?=\\))", + "name": "meta.method.parameters.groovy", + "patterns": [ + { + "begin": "(?=[^,)])", + "end": "(?=,|\\))", + "name": "meta.method.parameter.groovy", + "patterns": [ + { + "match": ",", + "name": "punctuation.definition.separator.groovy" + }, + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "keyword.operator.assignment.groovy" + } + }, + "end": "(?=,|\\))", + "name": "meta.parameter.default.groovy", + "patterns": [ + { + "include": "#groovy-code" + } + ] + }, + { + "include": "#parameters" + } + ] + } + ] + } + ] + }, + { + "begin": "(?=<)", + "end": "(?=\\s)", + "name": "meta.method.paramerised-type.groovy", + "patterns": [ + { + "begin": "<", + "end": ">", + "name": "storage.type.parameters.groovy", + "patterns": [ + { + "include": "#types" + }, + { + "match": ",", + "name": "punctuation.definition.seperator.groovy" + } + ] + } + ] + }, + { + "begin": "throws", + "beginCaptures": { + "0": { + "name": "storage.modifier.groovy" + } + }, + "end": "(?={|;)|^(?=\\s*(?:[^{\\s]|$))", + "name": "meta.throwables.groovy", + "patterns": [ + { + "include": "#object-types" + } + ] + }, + { + "begin": "{", + "end": "(?=})", + "name": "meta.method.body.java", + "patterns": [ + { + "include": "#groovy-code" + } + ] + } + ] + }, + "methods": { + "applyEndPatternLast": 1, + "begin": "(?x:(?<=;|^|{)(?=\\s*\n (?:\n (?:private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final) # visibility/modifier\n |\n (?:def)\n |\n (?:\n (?:\n (?:void|boolean|byte|char|short|int|float|long|double)\n |\n (?:@?(?:[a-zA-Z]\\w*\\.)*[A-Z]+\\w*) # object type\n )\n [\\[\\]]*\n (?:<.*>)?\n ) \n \n )\n \\s+\n ([^=]+\\s+)?\\w+\\s*\\(\n\t\t\t))", + "end": "}|(?=[^{])", + "name": "meta.definition.method.groovy", + "patterns": [ + { + "include": "#method-content" + } + ] + }, + "nest_curly": { + "begin": "\\{", + "captures": { + "0": { + "name": "punctuation.section.scope.groovy" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#nest_curly" + } + ] + }, + "numbers": { + "patterns": [ + { + "match": "((0(x|X)[0-9a-fA-F]*)|(\\+|-)?\\b(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)([LlFfUuDdg]|UL|ul)?\\b", + "name": "constant.numeric.groovy" + } + ] + }, + "object-types": { + "patterns": [ + { + "begin": "\\b((?:[a-z]\\w*\\.)*(?:[A-Z]+\\w*[a-z]+\\w*|UR[LI]))<", + "end": ">|[^\\w\\s,\\?<\\[\\]]", + "name": "storage.type.generic.groovy", + "patterns": [ + { + "include": "#object-types" + }, + { + "begin": "<", + "comment": "This is just to support <>'s with no actual type prefix", + "end": ">|[^\\w\\s,\\[\\]<]", + "name": "storage.type.generic.groovy" + } + ] + }, + { + "begin": "\\b((?:[a-z]\\w*\\.)*[A-Z]+\\w*[a-z]+\\w*)(?=\\[)", + "end": "(?=[^\\]\\s])", + "name": "storage.type.object.array.groovy", + "patterns": [ + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#groovy" + } + ] + } + ] + }, + { + "match": "\\b(?:[a-zA-Z]\\w*\\.)*(?:[A-Z]+\\w*[a-z]+\\w*|UR[LI])\\b", + "name": "storage.type.groovy" + } + ] + }, + "object-types-inherited": { + "patterns": [ + { + "begin": "\\b((?:[a-zA-Z]\\w*\\.)*[A-Z]+\\w*[a-z]+\\w*)<", + "end": ">|[^\\w\\s,\\?<\\[\\]]", + "name": "entity.other.inherited-class.groovy", + "patterns": [ + { + "include": "#object-types-inherited" + }, + { + "begin": "<", + "comment": "This is just to support <>'s with no actual type prefix", + "end": ">|[^\\w\\s,\\[\\]<]", + "name": "storage.type.generic.groovy" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.operator.dereference.groovy" + } + }, + "match": "\\b(?:[a-zA-Z]\\w*(\\.))*[A-Z]+\\w*[a-z]+\\w*\\b", + "name": "entity.other.inherited-class.groovy" + } + ] + }, + "parameters": { + "patterns": [ + { + "include": "#annotations" + }, + { + "include": "#storage-modifiers" + }, + { + "include": "#types" + }, + { + "match": "\\w+", + "name": "variable.parameter.method.groovy" + } + ] + }, + "parens": { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#groovy-code" + } + ] + }, + "primitive-arrays": { + "patterns": [ + { + "match": "\\b(?:void|boolean|byte|char|short|int|float|long|double)(\\[\\])*\\b", + "name": "storage.type.primitive.array.groovy" + } + ] + }, + "primitive-types": { + "patterns": [ + { + "match": "\\b(?:void|boolean|byte|char|short|int|float|long|double)\\b", + "name": "storage.type.primitive.groovy" + } + ] + }, + "regexp": { + "patterns": [ + { + "begin": "/(?=[^/]+/([^>]|$))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.regexp.begin.groovy" + } + }, + "end": "/", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.regexp.end.groovy" + } + }, + "name": "string.regexp.groovy", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.groovy" + } + ] + }, + { + "begin": "~\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.regexp.begin.groovy" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.regexp.end.groovy" + } + }, + "name": "string.regexp.compiled.groovy", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.groovy" + } + ] + } + ] + }, + "storage-modifiers": { + "patterns": [ + { + "match": "\\b(private|protected|public)\\b", + "name": "storage.modifier.access-control.groovy" + }, + { + "match": "\\b(static)\\b", + "name": "storage.modifier.static.groovy" + }, + { + "match": "\\b(final)\\b", + "name": "storage.modifier.final.groovy" + }, + { + "match": "\\b(native|synchronized|abstract|threadsafe|transient)\\b", + "name": "storage.modifier.other.groovy" + } + ] + }, + "string-quoted-double": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.groovy" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.groovy" + } + }, + "name": "string.quoted.double.groovy", + "patterns": [ + { + "include": "#string-quoted-double-contents" + } + ] + }, + "string-quoted-double-contents": { + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.groovy" + }, + { + "applyEndPatternLast": 1, + "begin": "\\$\\w", + "end": "(?=\\W)", + "name": "variable.other.interpolated.groovy", + "patterns": [ + { + "match": "\\w", + "name": "variable.other.interpolated.groovy" + }, + { + "match": "\\.", + "name": "keyword.other.dereference.groovy" + } + ] + }, + { + "begin": "\\$\\{", + "captures": { + "0": { + "name": "punctuation.section.embedded.groovy" + } + }, + "end": "\\}", + "name": "source.groovy.embedded.source", + "patterns": [ + { + "include": "#nest_curly" + } + ] + } + ] + }, + "string-quoted-double-multiline": { + "begin": "\"\"\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.groovy" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.groovy" + } + }, + "name": "string.quoted.double.multiline.groovy", + "patterns": [ + { + "include": "#string-quoted-double-contents" + } + ] + }, + "string-quoted-single": { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.groovy" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.groovy" + } + }, + "name": "string.quoted.single.groovy", + "patterns": [ + { + "include": "#string-quoted-single-contents" + } + ] + }, + "string-quoted-single-contents": { + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.groovy" + } + ] + }, + "string-quoted-single-multiline": { + "begin": "'''", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.groovy" + } + }, + "end": "'''", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.groovy" + } + }, + "name": "string.quoted.single.multiline.groovy", + "patterns": [ + { + "include": "#string-quoted-single-contents" + } + ] + }, + "strings": { + "patterns": [ + { + "include": "#string-quoted-double-multiline" + }, + { + "include": "#string-quoted-single-multiline" + }, + { + "include": "#string-quoted-double" + }, + { + "include": "#string-quoted-single" + }, + { + "include": "#regexp" + } + ] + }, + "structures": { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "punctuation.definition.structure.begin.groovy" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.structure.end.groovy" + } + }, + "name": "meta.structure.groovy", + "patterns": [ + { + "include": "#groovy-code" + }, + { + "match": ",", + "name": "punctuation.definition.separator.groovy" + } + ] + }, + "support-functions": { + "patterns": [ + { + "match": "(?x)\\b(?:sprintf|print(?:f|ln)?)\\b", + "name": "support.function.print.groovy" + }, + { + "match": "(?x)\\b(?:shouldFail|fail(?:NotEquals)?|ass(?:ume|ert(?:S(?:cript|ame)|N(?:ot(?:Same|\n\t\t\t\t\tNull)|ull)|Contains|T(?:hat|oString|rue)|Inspect|Equals|False|Length|\n\t\t\t\t\tArrayEquals)))\\b", + "name": "support.function.testing.groovy" + } + ] + }, + "types": { + "patterns": [ + { + "match": "\\b(def)\\b", + "name": "storage.type.def.groovy" + }, + { + "include": "#primitive-types" + }, + { + "include": "#primitive-arrays" + }, + { + "include": "#object-types" + } + ] + }, + "values": { + "patterns": [ + { + "include": "#language-variables" + }, + { + "include": "#strings" + }, + { + "include": "#numbers" + }, + { + "include": "#constants" + }, + { + "include": "#types" + }, + { + "include": "#structures" + }, + { + "include": "#method-call" + } + ] + }, + "variables": { + "applyEndPatternLast": 1, + "patterns": [ + { + "begin": "(?x:(?=\n (?:\n (?:private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final) # visibility/modifier\n |\n (?:def)\n |\n (?:void|boolean|byte|char|short|int|float|long|double)\n |\n (?:(?:[a-z]\\w*\\.)*[A-Z]+\\w*) # object type\n )\n \\s+\n [\\w\\d_<>\\[\\],\\s]+\n (?:=|$)\n \n \t\t\t))", + "end": ";|$", + "name": "meta.definition.variable.groovy", + "patterns": [ + { + "match": "\\s" + }, + { + "captures": { + "1": { + "name": "constant.variable.groovy" + } + }, + "match": "([A-Z_0-9]+)\\s+(?=\\=)" + }, + { + "captures": { + "1": { + "name": "meta.definition.variable.name.groovy" + } + }, + "match": "(\\w[^\\s,]*)\\s+(?=\\=)" + }, + { + "begin": "=", + "beginCaptures": { + "0": { + "name": "keyword.operator.assignment.groovy" + } + }, + "end": "$", + "patterns": [ + { + "include": "#groovy-code" + } + ] + }, + { + "captures": { + "1": { + "name": "meta.definition.variable.name.groovy" + } + }, + "match": "(\\w[^\\s=]*)(?=\\s*($|;))" + }, + { + "include": "#groovy-code" + } + ] + } + ] + } + }, + "scopeName": "source.groovy", + "uuid": "B3A64888-EBBB-4436-8D9E-F1169C5D7613", + "version": "https://github.com/textmate/groovy.tmbundle/commit/85d8f7c97ae473ccb9473f6c8d27e4ec957f4be1" +} \ No newline at end of file From 72cb93c60ee6b4ac1d31e7ec8ad585aa03e7e76b Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 May 2017 12:37:24 +0200 Subject: [PATCH 0699/2747] [html] update grammar --- extensions/html/syntaxes/html.json | 12 ++- .../test/colorize-results/25920_html.json | 82 ++++++++++++------- 2 files changed, 60 insertions(+), 34 deletions(-) diff --git a/extensions/html/syntaxes/html.json b/extensions/html/syntaxes/html.json index be1113e583ace..cc2d9fd17ea60 100644 --- a/extensions/html/syntaxes/html.json +++ b/extensions/html/syntaxes/html.json @@ -339,7 +339,7 @@ }, { "begin": "\\G", - "end": "(?i:(?=/?>|type\\s*=\\s*('|\"|)(?!text/(javascript|ecmascript)|application/((x-)?javascript|ecmascript)|module)\\b))", + "end": "(?i:(?=/?>|type(?=[\\s=])(?!\\s*=\\s*('|\"|)(text/(javascript|ecmascript|babel)|application/((x-)?javascript|ecmascript|babel)|module)[\\s\"'>])))", "name": "meta.tag.metadata.script.html", "patterns": [ { @@ -348,14 +348,17 @@ ] }, { - "begin": "(?=(?i:type\\s*=\\s*('|\"|)(?=text/(x-handlebars|(x-(handlebars-)?|ng-)?template|html))\\b))", - "end": "(<)(?=/(?i:script))", + "begin": "(?=(?i:type\\s*=\\s*('|\"|)(text/(x-handlebars|(x-(handlebars-)?|ng-)?template|html)[\\s\"'>])))", + "end": "((<))(?=/(?i:script))", "endCaptures": { "0": { "name": "meta.tag.metadata.script.html" }, "1": { "name": "punctuation.definition.tag.begin.html" + }, + "2": { + "name": "text.html.basic" } }, "patterns": [ @@ -377,6 +380,7 @@ { "begin": "(?!\\G)", "end": "(?=", - "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html", "r": { "dark_plus": "punctuation.definition.tag: #808080", "light_plus": "punctuation.definition.tag: #800000", @@ -243,7 +243,7 @@ }, { "c": "<", - "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html meta.scope.between-tag-pair.html", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html meta.scope.between-tag-pair.html", "r": { "dark_plus": "punctuation.definition.tag: #808080", "light_plus": "punctuation.definition.tag: #800000", @@ -254,7 +254,7 @@ }, { "c": "/", - "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html", "r": { "dark_plus": "punctuation.definition.tag: #808080", "light_plus": "punctuation.definition.tag: #800000", @@ -265,7 +265,7 @@ }, { "c": "div", - "t": "text.html.basic meta.embedded.block.html meta.tag.any.html entity.name.tag.html", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html entity.name.tag.html", "r": { "dark_plus": "entity.name.tag: #569CD6", "light_plus": "entity.name.tag: #800000", @@ -276,7 +276,7 @@ }, { "c": ">", - "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html", "r": { "dark_plus": "punctuation.definition.tag: #808080", "light_plus": "punctuation.definition.tag: #800000", @@ -286,7 +286,18 @@ } }, { - "c": "", - "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html", "r": { "dark_plus": "punctuation.definition.tag: #808080", "light_plus": "punctuation.definition.tag: #800000", @@ -771,7 +782,7 @@ }, { "c": "<", - "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html meta.scope.between-tag-pair.html", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html meta.scope.between-tag-pair.html", "r": { "dark_plus": "punctuation.definition.tag: #808080", "light_plus": "punctuation.definition.tag: #800000", @@ -782,7 +793,7 @@ }, { "c": "/", - "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html", "r": { "dark_plus": "punctuation.definition.tag: #808080", "light_plus": "punctuation.definition.tag: #800000", @@ -793,7 +804,7 @@ }, { "c": "div", - "t": "text.html.basic meta.embedded.block.html meta.tag.any.html entity.name.tag.html", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html entity.name.tag.html", "r": { "dark_plus": "entity.name.tag: #569CD6", "light_plus": "entity.name.tag: #800000", @@ -804,7 +815,7 @@ }, { "c": ">", - "t": "text.html.basic meta.embedded.block.html meta.tag.any.html punctuation.definition.tag.html", + "t": "text.html.basic meta.embedded.block.html text.html.basic meta.tag.any.html punctuation.definition.tag.html", "r": { "dark_plus": "punctuation.definition.tag: #808080", "light_plus": "punctuation.definition.tag: #800000", @@ -814,7 +825,18 @@ } }, { - "c": " Date: Thu, 18 May 2017 13:03:14 +0200 Subject: [PATCH 0700/2747] [r] add update grammar script --- extensions/r/package.json | 5 +- extensions/r/syntaxes/R.plist | 316 ------------------------ extensions/r/syntaxes/r.tmLanguage.json | 204 +++++++++++++++ 3 files changed, 208 insertions(+), 317 deletions(-) delete mode 100644 extensions/r/syntaxes/R.plist create mode 100644 extensions/r/syntaxes/r.tmLanguage.json diff --git a/extensions/r/package.json b/extensions/r/package.json index a41d8ef14880d..e1104e2344006 100644 --- a/extensions/r/package.json +++ b/extensions/r/package.json @@ -3,6 +3,9 @@ "version": "0.1.0", "publisher": "vscode", "engines": { "vscode": "*" }, + "scripts": { + "update-grammar": "node ../../build/npm/update-grammar.js textmate/r.tmbundle Syntaxes/R.plist ./syntaxes/r.tmLanguage.json" + }, "contributes": { "languages": [{ "id": "r", @@ -13,7 +16,7 @@ "grammars": [{ "language": "r", "scopeName": "source.r", - "path": "./syntaxes/R.plist" + "path": "./syntaxes/r.tmLanguage.json" }] } } diff --git a/extensions/r/syntaxes/R.plist b/extensions/r/syntaxes/R.plist deleted file mode 100644 index 58022aa142d43..0000000000000 --- a/extensions/r/syntaxes/R.plist +++ /dev/null @@ -1,316 +0,0 @@ - - - - - fileTypes - - R - r - s - S - Rprofile - - keyEquivalent - ^~R - name - R - patterns - - - captures - - 1 - - name - comment.line.pragma.r - - 2 - - name - entity.name.pragma.name.r - - - match - ^(#pragma[ \t]+mark)[ \t](.*) - name - comment.line.pragma-mark.r - - - begin - (^[ \t]+)?(?=#) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.r - - - end - (?!\G) - patterns - - - begin - # - beginCaptures - - 0 - - name - punctuation.definition.comment.r - - - end - \n - name - comment.line.number-sign.r - - - - - match - \b(logical|numeric|character|complex|matrix|array|data\.frame|list|factor)(?=\s*\() - name - storage.type.r - - - match - \b(function|if|break|next|repeat|else|for|return|switch|while|in|invisible)\b - name - keyword.control.r - - - match - \b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(i|L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\b - name - constant.numeric.r - - - match - \b(T|F|TRUE|FALSE|NULL|NA|Inf|NaN)\b - name - constant.language.r - - - match - \b(pi|letters|LETTERS|month\.abb|month\.name)\b - name - support.constant.misc.r - - - match - (\-|\+|\*|\/|%\/%|%%|%\*%|%in%|%o%|%x%|\^) - name - keyword.operator.arithmetic.r - - - match - (=|<-|<<-|->|->>) - name - keyword.operator.assignment.r - - - match - (==|!=|<>|<|>|<=|>=) - name - keyword.operator.comparison.r - - - match - (!|&{1,2}|[|]{1,2}) - name - keyword.operator.logical.r - - - match - (\.\.\.|\$|@|:|\~) - name - keyword.other.r - - - begin - " - beginCaptures - - 0 - - name - punctuation.definition.string.begin.r - - - end - " - endCaptures - - 0 - - name - punctuation.definition.string.end.r - - - name - string.quoted.double.r - patterns - - - match - \\. - name - constant.character.escape.r - - - - - begin - ' - beginCaptures - - 0 - - name - punctuation.definition.string.begin.r - - - end - ' - endCaptures - - 0 - - name - punctuation.definition.string.end.r - - - name - string.quoted.single.r - patterns - - - match - \\. - name - constant.character.escape.r - - - - - captures - - 1 - - name - entity.name.function.r - - 2 - - name - keyword.operator.assignment.r - - 3 - - name - keyword.control.r - - - match - ([[:alpha:].][[:alnum:]._]*)\s*(<-)\s*(function) - name - meta.function.r - - - captures - - 1 - - name - entity.name.tag.r - - 4 - - name - entity.name.type.r - - - match - (setMethod|setReplaceMethod|setGeneric|setGroupGeneric|setClass)\s*\(\s*([[:alpha:]\d]+\s*=\s*)?("|\x{27})([a-zA-Z._\[\$@][a-zA-Z0-9._\[]*?)\3.* - name - meta.method.declaration.r - - - match - ([[:alpha:].][[:alnum:]._]*)\s*\( - - - captures - - 1 - - name - variable.parameter.r - - 2 - - name - keyword.operator.assignment.r - - - match - ([[:alpha:].][[:alnum:]._]*)\s*(=)(?=[^=]) - - - match - \b([\d_][[:alnum:]._]+)\b - name - invalid.illegal.variable.other.r - - - match - \b([[:alnum:]_]+)(?=::) - name - entity.namespace.r - - - match - \b([[:alnum:]._]+)\b - name - variable.other.r - - - begin - \{ - beginCaptures - - 0 - - name - punctuation.section.block.begin.r - - - end - \} - endCaptures - - 0 - - name - punctuation.section.block.end.r - - - name - meta.block.r - patterns - - - include - source.r - - - - - scopeName - source.r - uuid - B2E6B78D-6E70-11D9-A369-000D93B3A10E - - \ No newline at end of file diff --git a/extensions/r/syntaxes/r.tmLanguage.json b/extensions/r/syntaxes/r.tmLanguage.json new file mode 100644 index 0000000000000..829be8d0d2b15 --- /dev/null +++ b/extensions/r/syntaxes/r.tmLanguage.json @@ -0,0 +1,204 @@ +{ + "fileTypes": [ + "R", + "r", + "s", + "S", + "Rprofile" + ], + "keyEquivalent": "^~R", + "name": "R", + "patterns": [ + { + "captures": { + "1": { + "name": "comment.line.pragma.r" + }, + "2": { + "name": "entity.name.pragma.name.r" + } + }, + "match": "^(#pragma[ \\t]+mark)[ \\t](.*)", + "name": "comment.line.pragma-mark.r" + }, + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.r" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.r" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.r" + } + ] + }, + { + "match": "\\b(logical|numeric|character|complex|matrix|array|data\\.frame|list|factor)(?=\\s*\\()", + "name": "storage.type.r" + }, + { + "match": "\\b(function|if|break|next|repeat|else|for|return|switch|while|in|invisible)\\b", + "name": "keyword.control.r" + }, + { + "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(i|L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b", + "name": "constant.numeric.r" + }, + { + "match": "\\b(T|F|TRUE|FALSE|NULL|NA|Inf|NaN)\\b", + "name": "constant.language.r" + }, + { + "match": "\\b(pi|letters|LETTERS|month\\.abb|month\\.name)\\b", + "name": "support.constant.misc.r" + }, + { + "match": "(\\-|\\+|\\*|\\/|%\\/%|%%|%\\*%|%in%|%o%|%x%|\\^)", + "name": "keyword.operator.arithmetic.r" + }, + { + "match": "(=|<-|<<-|->|->>)", + "name": "keyword.operator.assignment.r" + }, + { + "match": "(==|!=|<>|<|>|<=|>=)", + "name": "keyword.operator.comparison.r" + }, + { + "match": "(!|&{1,2}|[|]{1,2})", + "name": "keyword.operator.logical.r" + }, + { + "match": "(\\.\\.\\.|\\$|@|:|\\~)", + "name": "keyword.other.r" + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.r" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.r" + } + }, + "name": "string.quoted.double.r", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.r" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.r" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.r" + } + }, + "name": "string.quoted.single.r", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.r" + } + ] + }, + { + "captures": { + "1": { + "name": "entity.name.function.r" + }, + "2": { + "name": "keyword.operator.assignment.r" + }, + "3": { + "name": "keyword.control.r" + } + }, + "match": "([[:alpha:].][[:alnum:]._]*)\\s*(<-)\\s*(function)", + "name": "meta.function.r" + }, + { + "captures": { + "1": { + "name": "entity.name.tag.r" + }, + "4": { + "name": "entity.name.type.r" + } + }, + "match": "(setMethod|setReplaceMethod|setGeneric|setGroupGeneric|setClass)\\s*\\(\\s*([[:alpha:]\\d]+\\s*=\\s*)?(\"|\\x{27})([a-zA-Z._\\[\\$@][a-zA-Z0-9._\\[]*?)\\3.*", + "name": "meta.method.declaration.r" + }, + { + "match": "([[:alpha:].][[:alnum:]._]*)\\s*\\(" + }, + { + "captures": { + "1": { + "name": "variable.parameter.r" + }, + "2": { + "name": "keyword.operator.assignment.r" + } + }, + "match": "([[:alpha:].][[:alnum:]._]*)\\s*(=)(?=[^=])" + }, + { + "match": "\\b([\\d_][[:alnum:]._]+)\\b", + "name": "invalid.illegal.variable.other.r" + }, + { + "match": "\\b([[:alnum:]_]+)(?=::)", + "name": "entity.namespace.r" + }, + { + "match": "\\b([[:alnum:]._]+)\\b", + "name": "variable.other.r" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.block.begin.r" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.section.block.end.r" + } + }, + "name": "meta.block.r", + "patterns": [ + { + "include": "source.r" + } + ] + } + ], + "scopeName": "source.r", + "uuid": "B2E6B78D-6E70-11D9-A369-000D93B3A10E", + "version": "https://github.com/textmate/r.tmbundle/commit/6b04ff3424f3f1cdfe64a9cfb71d8765959be250" +} \ No newline at end of file From b2c10e50c8fddea6aff4b7404de7570886f9e50c Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 May 2017 13:06:54 +0200 Subject: [PATCH 0701/2747] [ruby] update grammar --- extensions/ruby/package.json | 5 +- extensions/ruby/syntaxes/Ruby.plist | 4092 ----------------- extensions/ruby/syntaxes/ruby.tmLanguage.json | 2728 +++++++++++ .../ruby/test/colorize-results/test_rb.json | 12 +- 4 files changed, 2737 insertions(+), 4100 deletions(-) delete mode 100644 extensions/ruby/syntaxes/Ruby.plist create mode 100644 extensions/ruby/syntaxes/ruby.tmLanguage.json diff --git a/extensions/ruby/package.json b/extensions/ruby/package.json index d5933231e77a0..0599300ca04ff 100644 --- a/extensions/ruby/package.json +++ b/extensions/ruby/package.json @@ -17,11 +17,12 @@ "grammars": [{ "language": "ruby", "scopeName": "source.ruby", - "path": "./syntaxes/Ruby.plist" + "path": "./syntaxes/ruby.tmLanguage.json" }] }, "scripts": { "compile": "gulp compile-extension:ruby", - "watch": "gulp watch-extension:ruby" + "watch": "gulp watch-extension:ruby", + "update-grammar": "node ../../build/npm/update-grammar.js textmate/ruby.tmbundle Syntaxes/Ruby.plist ./syntaxes/ruby.tmLanguage.json" } } diff --git a/extensions/ruby/syntaxes/Ruby.plist b/extensions/ruby/syntaxes/Ruby.plist deleted file mode 100644 index 04e41fabbf5d0..0000000000000 --- a/extensions/ruby/syntaxes/Ruby.plist +++ /dev/null @@ -1,4092 +0,0 @@ - - - - - comment - - TODO: unresolved issues - - text: - "p <<end - print me! - end" - symptoms: - not recognized as a heredoc - solution: - there is no way to distinguish perfectly between the << operator and the start - of a heredoc. Currently, we require assignment to recognize a heredoc. More - refinement is possible. - • Heredocs with indented terminators (<<-) are always distinguishable, however. - • Nested heredocs are not really supportable at present - - text: - print <<-'THERE' - This is single quoted. - The above used #{Time.now} - THERE - symtoms: - From Programming Ruby p306; should be a non-interpolated heredoc. - - text: - val?(a):p(b) - val?'a':'b' - symptoms: - ':p' is recognized as a symbol.. its 2 things ':' and 'p'. - :'b' has same problem. - solution: - ternary operator rule, precedence stuff, symbol rule. - but also consider 'a.b?(:c)' ?? - - fileTypes - - rb - rbx - rjs - Rakefile - rake - cgi - fcgi - gemspec - irbrc - Capfile - ru - prawn - Cheffile - Gemfile - Guardfile - Hobofile - Vagrantfile - Appraisals - Rantfile - Berksfile - Berksfile.lock - Thorfile - Puppetfile - - firstLineMatch - ^#!/.*\bruby - keyEquivalent - ^~R - name - Ruby - patterns - - - captures - - 1 - - name - keyword.control.class.ruby - - 2 - - name - entity.name.type.class.ruby - - 3 - - name - keyword.operator.other.ruby - - 4 - - name - entity.other.inherited-class.ruby - - 5 - - name - keyword.operator.other.ruby - - 6 - - name - variable.other.object.ruby - - - match - ^\s*(class)\s+(?:([.a-zA-Z0-9_:]+)(?:\s*(<)\s*([.a-zA-Z0-9_:]+))?|(<<)\s*([.a-zA-Z0-9_:]+)) - name - meta.class.ruby - - - captures - - 1 - - name - keyword.control.module.ruby - - 2 - - name - entity.name.type.module.ruby - - 3 - - name - entity.other.inherited-class.module.first.ruby - - 4 - - name - punctuation.separator.inheritance.ruby - - 5 - - name - entity.other.inherited-class.module.second.ruby - - 6 - - name - punctuation.separator.inheritance.ruby - - 7 - - name - entity.other.inherited-class.module.third.ruby - - 8 - - name - punctuation.separator.inheritance.ruby - - - match - ^\s*(module)\s+(([A-Z]\w*(::))?([A-Z]\w*(::))?([A-Z]\w*(::))*[A-Z]\w*) - name - meta.module.ruby - - - comment - else if is a common mistake carried over from other languages. it works if you put in a second end, but it’s never what you want. - match - (?<!\.)\belse(\s)+if\b - name - invalid.deprecated.ruby - - - captures - - 1 - - name - punctuation.definition.constant.ruby - - - comment - symbols as hash key (1.9 syntax) - match - (?>[a-zA-Z_]\w*(?>[?!])?)(:)(?!:) - name - constant.other.symbol.hashkey.ruby - - - captures - - 1 - - name - punctuation.definition.constant.ruby - - - comment - symbols as hash key (1.8 syntax) - match - (?<!:)(:)(?>[a-zA-Z_]\w*(?>[?!])?)(?=\s*=>) - name - constant.other.symbol.hashkey.ruby - - - comment - everything being a reserved word, not a value and needing a 'end' is a.. - match - (?<!\.)\b(BEGIN|begin|case|class|else|elsif|END|end|ensure|for|if|in|module|rescue|then|unless|until|when|while)\b(?![?!]) - name - keyword.control.ruby - - - comment - contextual smart pair support for block parameters - match - (?<!\.)\bdo\b\s* - name - keyword.control.start-block.ruby - - - comment - contextual smart pair support - match - (?<=\{)(\s+) - name - meta.syntax.ruby.start-block - - - comment - as above, just doesn't need a 'end' and does a logic operation - match - (?<!\.)\b(and|not|or)\b - name - keyword.operator.logical.ruby - - - comment - just as above but being not a logical operation - match - (?<!\.)\b(alias|alias_method|break|next|redo|retry|return|super|undef|yield)\b(?![?!])|\bdefined\?|\bblock_given\? - name - keyword.control.pseudo-method.ruby - - - match - \b(nil|true|false)\b(?![?!]) - name - constant.language.ruby - - - match - \b(__(FILE|LINE)__|self)\b(?![?!]) - name - variable.language.ruby - - - comment - everything being a method but having a special function is a.. - match - \b(initialize|new|loop|include|extend|prepend|fail|raise|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|module_function|public|protected)\b(?![?!]) - name - keyword.other.special-method.ruby - - - begin - \b(require|require_relative|gem)\b - captures - - 1 - - name - keyword.other.special-method.ruby - - - end - $|(?=#|\}) - name - meta.require.ruby - patterns - - - include - $self - - - - - captures - - 1 - - name - punctuation.definition.variable.ruby - - - match - (@)[a-zA-Z_]\w* - name - variable.other.readwrite.instance.ruby - - - captures - - 1 - - name - punctuation.definition.variable.ruby - - - match - (@@)[a-zA-Z_]\w* - name - variable.other.readwrite.class.ruby - - - captures - - 1 - - name - punctuation.definition.variable.ruby - - - match - (\$)[a-zA-Z_]\w* - name - variable.other.readwrite.global.ruby - - - captures - - 1 - - name - punctuation.definition.variable.ruby - - - match - (\$)(!|@|&|`|'|\+|\d+|~|=|/|\\|,|;|\.|<|>|_|\*|\$|\?|:|"|-[0adFiIlpv]) - name - variable.other.readwrite.global.pre-defined.ruby - - - begin - \b(ENV)\[ - beginCaptures - - 1 - - name - variable.other.constant.ruby - - - end - \] - name - meta.environment-variable.ruby - patterns - - - include - $self - - - - - match - \b[A-Z]\w*(?=((\.|::)[A-Za-z]|\[)) - name - support.class.ruby - - - match - \b[A-Z]\w*\b - name - variable.other.constant.ruby - - - begin - (?x) - (?=def\b) # an optimization to help Oniguruma fail fast - (?<=^|\s)(def)\s+ # the def keyword - ( (?>[a-zA-Z_]\w*(?>\.|::))? # a method name prefix - (?>[a-zA-Z_]\w*(?>[?!]|=(?!>))? # the method name - |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) # …or an operator method - \s*(\() # the openning parenthesis for arguments - - beginCaptures - - 1 - - name - keyword.control.def.ruby - - 2 - - name - entity.name.function.ruby - - 3 - - name - punctuation.definition.parameters.ruby - - - comment - the method pattern comes from the symbol pattern, see there for a explaination - end - \) - endCaptures - - 0 - - name - punctuation.definition.parameters.ruby - - - name - meta.function.method.with-arguments.ruby - patterns - - - begin - (?=[&*_a-zA-Z]) - end - (?=[,)]) - patterns - - - captures - - 1 - - name - storage.type.variable.ruby - - 2 - - name - variable.parameter.function.ruby - - - match - \G([&*]?)([_a-zA-Z][_a-zA-Z0-9]*) - - - include - $self - - - - - - - begin - (?x) - (?=def\b) # an optimization to help Oniguruma fail fast - (?<=^|\s)(def)\s+ # the def keyword - ( (?>[a-zA-Z_]\w*(?>\.|::))? # a method name prefix - (?>[a-zA-Z_]\w*(?>[?!]|=(?!>))? # the method name - |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) # …or an operator method - [ \t] # the space separating the arguments - (?=[ \t]*[^\s#;]) # make sure arguments and not a comment follow - - beginCaptures - - 1 - - name - keyword.control.def.ruby - - 2 - - name - entity.name.function.ruby - - - comment - same as the previous rule, but without parentheses around the arguments - end - $ - name - meta.function.method.with-arguments.ruby - patterns - - - begin - (?![\s,]) - end - (?=,|$) - patterns - - - captures - - 1 - - name - punctuation.definition.variable.ruby - - - match - \G([&*]?)[_a-zA-Z][_a-zA-Z0-9]* - name - variable.parameter.function.ruby - - - include - $self - - - - - - - captures - - 1 - - name - keyword.control.def.ruby - - 3 - - name - entity.name.function.ruby - - - comment - the optional name is just to catch the def also without a method-name - match - (?x) - (?=def\b) # an optimization to help Oniguruma fail fast - (?<=^|\s)(def)\b # the def keyword - ( \s+ # an optional group of whitespace followed by… - ( (?>[a-zA-Z_]\w*(?>\.|::))? # a method name prefix - (?>[a-zA-Z_]\w*(?>[?!]|=(?!>))? # the method name - |===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?) ) )? # …or an operator method - - name - meta.function.method.without-arguments.ruby - - - match - \b\d(?>_?\d)*(?=\.\d|[eE])(\.\d(?>_?\d)*)?([eE][-+]?\d(?>_?\d)*)?r?i?\b - name - constant.numeric.float.ruby - - - match - \b(0[dD]\d|[1-9])(?>_?\d)*r?i?\b - name - constant.numeric.integer.ruby - - - match - \b0[xX]\h(?>_?\h)*r?i?\b - name - constant.numeric.hex.ruby - - - match - \b0[bB][01](?>_?[01])*r?i?\b - name - constant.numeric.binary.ruby - - - match - \b0([oO]?[0-7](?>_?[0-7])*)?r?i?\b - name - constant.numeric.octal.ruby - - - begin - :' - captures - - 0 - - name - punctuation.definition.constant.ruby - - - end - ' - name - constant.other.symbol.single-quoted.ruby - patterns - - - match - \\['\\] - name - constant.character.escape.ruby - - - - - begin - :" - captures - - 0 - - name - punctuation.definition.constant.ruby - - - end - " - name - constant.other.symbol.double-quoted.ruby - patterns - - - include - #interpolated_ruby - - - include - #escaped_char - - - - - comment - Needs higher precidence than regular expressions. - match - (?<!\()/= - name - keyword.operator.assignment.augmented.ruby - - - begin - ' - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - comment - single quoted string (does not allow interpolation) - end - ' - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.quoted.single.ruby - patterns - - - match - \\'|\\\\ - name - constant.character.escape.ruby - - - - - begin - " - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - comment - double quoted string (allows for interpolation) - end - " - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.quoted.double.ruby - patterns - - - include - #interpolated_ruby - - - include - #escaped_char - - - - - begin - ` - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - comment - execute string (allows for interpolation) - end - ` - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.interpolated.ruby - patterns - - - include - #interpolated_ruby - - - include - #escaped_char - - - - - include - #percent_literals - - - begin - (?x) - (?: - ^ # beginning of line - | (?<= # or look-behind on: - [=>~(?:\[,|&;] - | [\s;]if\s # keywords - | [\s;]elsif\s - | [\s;]while\s - | [\s;]unless\s - | [\s;]when\s - | [\s;]assert_match\s - | [\s;]or\s # boolean opperators - | [\s;]and\s - | [\s;]not\s - | [\s.]index\s # methods - | [\s.]scan\s - | [\s.]sub\s - | [\s.]sub!\s - | [\s.]gsub\s - | [\s.]gsub!\s - | [\s.]match\s - ) - | (?<= # or a look-behind with line anchor: - ^when\s # duplication necessary due to limits of regex - | ^if\s - | ^elsif\s - | ^while\s - | ^unless\s - ) - ) - \s*((/))(?![*+{}?]) - - captures - - 1 - - name - string.regexp.classic.ruby - - 2 - - name - punctuation.definition.string.ruby - - - comment - regular expressions (normal) - we only start a regexp if the character before it (excluding whitespace) - is what we think is before a regexp - - contentName - string.regexp.classic.ruby - end - ((/[eimnosux]*)) - patterns - - - include - #regex_sub - - - - - captures - - 1 - - name - punctuation.definition.constant.ruby - - - comment - symbols - match - (?<!:)(:)(?>[a-zA-Z_]\w*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<[<=]?|<=>|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?|@@?[a-zA-Z_]\w*) - name - constant.other.symbol.ruby - - - begin - ^=begin - captures - - 0 - - name - punctuation.definition.comment.ruby - - - comment - multiline comments - end - ^=end - name - comment.block.documentation.ruby - - - begin - (^[ \t]+)?(?=#) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.ruby - - - end - (?!\G) - patterns - - - begin - # - beginCaptures - - 0 - - name - punctuation.definition.comment.ruby - - - end - \n - name - comment.line.number-sign.ruby - - - - - comment - - matches questionmark-letters. - - examples (1st alternation = hex): - ?\x1 ?\x61 - - examples (2nd alternation = octal): - ?\0 ?\07 ?\017 - - examples (3rd alternation = escaped): - ?\n ?\b - - examples (4th alternation = meta-ctrl): - ?\C-a ?\M-a ?\C-\M-\C-\M-a - - examples (4th alternation = normal): - ?a ?A ?0 - ?* ?" ?( - ?. ?# - - - the negative lookbehind prevents against matching - p(42.tainted?) - - match - (?<!\w)\?(\\(x\h{1,2}(?!\h)\b|0[0-7]{0,2}(?![0-7])\b|[^x0MC])|(\\[MC]-)+\w|[^\s\\]) - name - constant.numeric.ruby - - - begin - ^__END__\n - captures - - 0 - - name - string.unquoted.program-block.ruby - - - comment - __END__ marker - contentName - text.plain - end - (?=not)impossible - patterns - - - begin - (?=<?xml|<(?i:html\b)|!DOCTYPE (?i:html\b)) - end - (?=not)impossible - name - text.html.embedded.ruby - patterns - - - include - text.html.basic - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)HTML)\b\1)) - comment - Heredoc with embedded html - end - (?!\G) - name - meta.embedded.block.html - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)HTML)\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - text.html - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - text.html.basic - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)SQL)\b\1)) - comment - Heredoc with embedded sql - end - (?!\G) - name - meta.embedded.block.sql - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)SQL)\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.sql - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.sql - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)CSS)\b\1)) - comment - Heredoc with embedded css - end - (?!\G) - name - meta.embedded.block.css - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)CSS)\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.css - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.css - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)CPP)\b\1)) - comment - Heredoc with embedded c++ - end - (?!\G) - name - meta.embedded.block.cpp - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)CPP)\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.cpp - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.cpp - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)C)\b\1)) - comment - Heredoc with embedded c - end - (?!\G) - name - meta.embedded.block.c - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)C)\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.c - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.c - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)(?:JS|JAVASCRIPT))\b\1)) - comment - Heredoc with embedded javascript - end - (?!\G) - name - meta.embedded.block.js - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)(?:JS|JAVASCRIPT))\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.js - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.js - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)JQUERY)\b\1)) - comment - Heredoc with embedded jQuery javascript - end - (?!\G) - name - meta.embedded.block.js.jquery - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)JQUERY)\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.js.jquery - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.js.jquery - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)(?:SH|SHELL))\b\1)) - comment - Heredoc with embedded shell - end - (?!\G) - name - meta.embedded.block.shell - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)(?:SH|SHELL))\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.shell - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.shell - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)LUA)\b\1)) - comment - Heredoc with embedded lua - end - (?!\G) - name - meta.embedded.block.lua - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)LUA)\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.lua - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.lua - - - include - #escaped_char - - - - - - - begin - (?=(?><<[-~]("?)((?:[_\w]+_|)RUBY)\b\1)) - comment - Heredoc with embedded ruby - end - (?!\G) - name - meta.embedded.block.ruby - patterns - - - begin - (?><<[-~]("?)((?:[_\w]+_|)RUBY)\b\1) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - contentName - source.ruby - end - \s*\2$\n? - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - source.ruby - - - include - #escaped_char - - - - - - - begin - (?>\=\s*<<(\w+)) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - end - ^\1$ - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - #escaped_char - - - - - begin - (?><<[-~](\w+)) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - comment - heredoc with indented terminator - end - \s*\1$ - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.unquoted.heredoc.ruby - patterns - - - include - #heredoc - - - include - #interpolated_ruby - - - include - #escaped_char - - - - - begin - (?<=\{|do|\{\s|do\s)(\|) - captures - - 1 - - name - punctuation.separator.variable.ruby - - - end - (\|) - patterns - - - match - [_a-zA-Z][_a-zA-Z0-9]* - name - variable.other.block.ruby - - - match - , - name - punctuation.separator.variable.ruby - - - - - match - => - name - punctuation.separator.key-value - - - match - <<=|%=|&=|\*=|\*\*=|\+=|\-=|\^=|\|{1,2}=|<< - name - keyword.operator.assignment.augmented.ruby - - - match - <=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~|(?<=[ \t])\? - name - keyword.operator.comparison.ruby - - - match - (?<=[ \t])!+|\bnot\b|&&|\band\b|\|\||\bor\b|\^ - name - keyword.operator.logical.ruby - - - match - (%|&|\*\*|\*|\+|\-|/) - name - keyword.operator.arithmetic.ruby - - - match - = - name - keyword.operator.assignment.ruby - - - match - \||~|>> - name - keyword.operator.other.ruby - - - match - : - name - punctuation.separator.other.ruby - - - match - \; - name - punctuation.separator.statement.ruby - - - match - , - name - punctuation.separator.object.ruby - - - match - \.|:: - name - punctuation.separator.method.ruby - - - match - \{ - name - punctuation.section.scope.begin.ruby - - - match - \} - name - punctuation.section.scope.end.ruby - - - match - \[ - name - punctuation.section.array.begin.ruby - - - match - \] - name - punctuation.section.array.end.ruby - - - match - \(|\) - name - punctuation.section.function.ruby - - - repository - - escaped_char - - match - \\(?:[0-7]{1,3}|x[\da-fA-F]{1,2}|.) - name - constant.character.escape.ruby - - heredoc - - begin - ^<<[-~]?\w+ - end - $ - patterns - - - include - $self - - - - interpolated_ruby - - patterns - - - begin - #\{ - beginCaptures - - 0 - - name - punctuation.section.embedded.begin.ruby - - - contentName - source.ruby - end - (\}) - endCaptures - - 0 - - name - punctuation.section.embedded.end.ruby - - 1 - - name - source.ruby - - - name - meta.embedded.line.ruby - patterns - - - include - #nest_curly_and_self - - - include - $self - - - repository - - nest_curly_and_self - - patterns - - - begin - \{ - captures - - 0 - - name - punctuation.section.scope.ruby - - - end - \} - patterns - - - include - #nest_curly_and_self - - - - - include - $self - - - - - - - captures - - 1 - - name - punctuation.definition.variable.ruby - - - match - (#@)[a-zA-Z_]\w* - name - variable.other.readwrite.instance.ruby - - - captures - - 1 - - name - punctuation.definition.variable.ruby - - - match - (#@@)[a-zA-Z_]\w* - name - variable.other.readwrite.class.ruby - - - captures - - 1 - - name - punctuation.definition.variable.ruby - - - match - (#\$)[a-zA-Z_]\w* - name - variable.other.readwrite.global.ruby - - - - percent_literals - - patterns - - - begin - %i(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.section.array.begin.ruby - - - end - [)\]}>]|\1\2 - endCaptures - - 0 - - name - punctuation.section.array.end.ruby - - - name - meta.array.symbol.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - include - #symbol - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - include - #symbol - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - include - #symbol - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - include - #symbol - - - - - include - #symbol - - - repository - - angles - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\<|\\> - name - constant.other.symbol.ruby - - - begin - < - captures - - 0 - - name - constant.other.symbol.ruby - - - end - > - patterns - - - include - #angles - - - include - #symbol - - - - - - braces - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\\{|\\\} - name - constant.other.symbol.ruby - - - begin - \{ - captures - - 0 - - name - constant.other.symbol.ruby - - - end - \} - patterns - - - include - #braces - - - include - #symbol - - - - - - brackets - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\\[|\\\] - name - constant.other.symbol.ruby - - - begin - \[ - captures - - 0 - - name - constant.other.symbol.ruby - - - end - \] - patterns - - - include - #brackets - - - include - #symbol - - - - - - parens - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\\(|\\\) - name - constant.other.symbol.ruby - - - begin - \( - captures - - 0 - - name - constant.other.symbol.ruby - - - end - \) - patterns - - - include - #parens - - - include - #symbol - - - - - - symbol - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\\\|\\[ ] - name - constant.other.symbol.ruby - - - match - \S\w* - name - constant.other.symbol.ruby - - - - - - - begin - %I(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.section.array.begin.ruby - - - end - [)\]}>]|\1\2 - endCaptures - - 0 - - name - punctuation.section.array.end.ruby - - - name - meta.array.symbol.interpolated.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - include - #symbol - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - include - #symbol - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - include - #symbol - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - include - #symbol - - - - - include - #symbol - - - repository - - angles - - patterns - - - begin - < - captures - - 0 - - name - constant.other.symbol.ruby - - - end - > - patterns - - - include - #angles - - - include - #symbol - - - - - - braces - - patterns - - - begin - \{ - captures - - 0 - - name - constant.other.symbol.ruby - - - end - \} - patterns - - - include - #braces - - - include - #symbol - - - - - - brackets - - patterns - - - begin - \[ - captures - - 0 - - name - constant.other.symbol.ruby - - - end - \] - patterns - - - include - #brackets - - - include - #symbol - - - - - - parens - - patterns - - - begin - \( - captures - - 0 - - name - constant.other.symbol.ruby - - - end - \) - patterns - - - include - #parens - - - include - #symbol - - - - - - symbol - - patterns - - - begin - (?=\\|#\{) - end - (?!\G) - name - constant.other.symbol.ruby - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - - - match - \S\w* - name - constant.other.symbol.ruby - - - - - - - begin - %q(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - end - [)\]}>]|\1\2 - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.quoted.other.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - - - repository - - angles - - patterns - - - match - \\<|\\>|\\\\ - name - constant.character.escape.ruby - - - begin - < - end - > - patterns - - - include - #angles - - - - - - braces - - patterns - - - match - \\\{|\\\}|\\\\ - name - constant.character.escape.ruby - - - begin - \{ - end - \} - patterns - - - include - #braces - - - - - - brackets - - patterns - - - match - \\\[|\\\]|\\\\ - name - constant.character.escape.ruby - - - begin - \[ - end - \] - patterns - - - include - #brackets - - - - - - parens - - patterns - - - match - \\\(|\\\)|\\\\ - name - constant.character.escape.ruby - - - begin - \( - end - \) - patterns - - - include - #parens - - - - - - - - - begin - %Q?(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - end - [)\]}>]|\1\2 - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.quoted.other.interpolated.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - - - include - #escaped_char - - - include - #interpolated_ruby - - - repository - - angles - - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - begin - < - end - > - patterns - - - include - #angles - - - - - - braces - - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - begin - \{ - end - \} - patterns - - - include - #braces - - - - - - brackets - - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - begin - \[ - end - \] - patterns - - - include - #brackets - - - - - - parens - - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - begin - \( - end - \) - patterns - - - include - #parens - - - - - - - - - begin - %r(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - end - ([)\]}>]|\1\2)[eimnosux]* - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.regexp.percent.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - - - include - #regex_sub - - - repository - - angles - - patterns - - - include - #regex_sub - - - begin - < - end - > - patterns - - - include - #angles - - - - - - braces - - patterns - - - include - #regex_sub - - - begin - \{ - end - \} - patterns - - - include - #braces - - - - - - brackets - - patterns - - - include - #regex_sub - - - begin - \[ - end - \] - patterns - - - include - #brackets - - - - - - parens - - patterns - - - include - #regex_sub - - - begin - \( - end - \) - patterns - - - include - #parens - - - - - - - - - begin - %s(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.definition.constant.begin.ruby - - - end - [)\]}>]|\1\2 - endCaptures - - 0 - - name - punctuation.definition.constant.end.ruby - - - name - constant.other.symbol.percent.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - - - repository - - angles - - patterns - - - match - \\<|\\>|\\\\ - name - constant.character.escape.ruby - - - begin - < - end - > - patterns - - - include - #angles - - - - - - braces - - patterns - - - match - \\\{|\\\}|\\\\ - name - constant.character.escape.ruby - - - begin - \{ - end - \} - patterns - - - include - #braces - - - - - - brackets - - patterns - - - match - \\\[|\\\]|\\\\ - name - constant.character.escape.ruby - - - begin - \[ - end - \] - patterns - - - include - #brackets - - - - - - parens - - patterns - - - match - \\\(|\\\)|\\\\ - name - constant.character.escape.ruby - - - begin - \( - end - \) - patterns - - - include - #parens - - - - - - - - - begin - %w(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.section.array.begin.ruby - - - end - [)\]}>]|\1\2 - endCaptures - - 0 - - name - punctuation.section.array.end.ruby - - - name - meta.array.string.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - include - #string - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - include - #string - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - include - #string - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - include - #string - - - - - include - #string - - - repository - - angles - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\<|\\> - name - string.other.ruby - - - begin - < - captures - - 0 - - name - string.other.ruby - - - end - > - patterns - - - include - #angles - - - include - #string - - - - - - braces - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\\{|\\\} - name - string.other.ruby - - - begin - \{ - captures - - 0 - - name - string.other.ruby - - - end - \} - patterns - - - include - #braces - - - include - #string - - - - - - brackets - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\\[|\\\] - name - string.other.ruby - - - begin - \[ - captures - - 0 - - name - string.other.ruby - - - end - \] - patterns - - - include - #brackets - - - include - #string - - - - - - parens - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\\(|\\\) - name - string.other.ruby - - - begin - \( - captures - - 0 - - name - string.other.ruby - - - end - \) - patterns - - - include - #parens - - - include - #string - - - - - - string - - patterns - - - captures - - 0 - - name - constant.character.escape.ruby - - - match - \\\\|\\[ ] - name - string.other.ruby - - - match - \S\w* - name - string.other.ruby - - - - - - - begin - %W(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.section.array.begin.ruby - - - end - [)\]}>]|\1\2 - endCaptures - - 0 - - name - punctuation.section.array.end.ruby - - - name - meta.array.string.interpolated.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - include - #string - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - include - #string - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - include - #string - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - include - #string - - - - - include - #string - - - repository - - angles - - patterns - - - begin - < - captures - - 0 - - name - string.other.ruby - - - end - > - patterns - - - include - #angles - - - include - #string - - - - - - braces - - patterns - - - begin - \{ - captures - - 0 - - name - string.other.ruby - - - end - \} - patterns - - - include - #braces - - - include - #string - - - - - - brackets - - patterns - - - begin - \[ - captures - - 0 - - name - string.other.ruby - - - end - \] - patterns - - - include - #brackets - - - include - #string - - - - - - parens - - patterns - - - begin - \( - captures - - 0 - - name - string.other.ruby - - - end - \) - patterns - - - include - #parens - - - include - #string - - - - - - string - - patterns - - - begin - (?=\\|#\{) - end - (?!\G) - name - string.other.ruby - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - - - match - \S\w* - name - string.other.ruby - - - - - - - begin - %x(?:([(\[{<])|([^\w\s]|_)) - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ruby - - - end - [)\]}>]|\1\2 - endCaptures - - 0 - - name - punctuation.definition.string.end.ruby - - - name - string.interpolated.percent.ruby - patterns - - - begin - \G(?<=\()(?!\)) - end - (?=\)) - patterns - - - include - #parens - - - - - begin - \G(?<=\[)(?!\]) - end - (?=\]) - patterns - - - include - #brackets - - - - - begin - \G(?<=\{)(?!\}) - end - (?=\}) - patterns - - - include - #braces - - - - - begin - \G(?<=<)(?!>) - end - (?=>) - patterns - - - include - #angles - - - - - include - #escaped_char - - - include - #interpolated_ruby - - - repository - - angles - - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - begin - < - end - > - patterns - - - include - #angles - - - - - - braces - - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - begin - \{ - end - \} - patterns - - - include - #braces - - - - - - brackets - - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - begin - \[ - end - \] - patterns - - - include - #brackets - - - - - - parens - - patterns - - - include - #escaped_char - - - include - #interpolated_ruby - - - begin - \( - end - \) - patterns - - - include - #parens - - - - - - - - - - regex_sub - - patterns - - - include - #interpolated_ruby - - - include - #escaped_char - - - captures - - 1 - - name - punctuation.definition.quantifier.begin.ruby - - 3 - - name - punctuation.definition.quantifier.end.ruby - - - match - (\{)\d+(,\d+)?(\}) - name - keyword.operator.quantifier.ruby - - - begin - \[(?:\^?\])? - beginCaptures - - 0 - - name - punctuation.definition.character-class.begin.ruby - - - end - \] - endCaptures - - 0 - - name - punctuation.definition.character-class.end.ruby - - - name - constant.other.character-class.set.ruby - patterns - - - include - #escaped_char - - - - - begin - \(\?# - beginCaptures - - 0 - - name - punctuation.definition.comment.begin.ruby - - - end - \) - endCaptures - - 0 - - name - punctuation.definition.comment.end.ruby - - - name - comment.line.number-sign.ruby - patterns - - - include - #escaped_char - - - - - begin - \( - captures - - 0 - - name - punctuation.definition.group.ruby - - - end - \) - name - meta.group.regexp.ruby - patterns - - - include - #regex_sub - - - - - begin - (?<=^|\s)(#)\s(?=[[a-zA-Z0-9,. \t?!-][^\x{00}-\x{7F}]]*$) - beginCaptures - - 1 - - name - punctuation.definition.comment.ruby - - - comment - We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags. - end - $\n? - name - comment.line.number-sign.ruby - - - - - scopeName - source.ruby - uuid - E00B62AC-6B1C-11D9-9B1F-000D93589AF6 - - - diff --git a/extensions/ruby/syntaxes/ruby.tmLanguage.json b/extensions/ruby/syntaxes/ruby.tmLanguage.json new file mode 100644 index 0000000000000..dce58f758b1cf --- /dev/null +++ b/extensions/ruby/syntaxes/ruby.tmLanguage.json @@ -0,0 +1,2728 @@ +{ + "comment": "\n\tTODO: unresolved issues\n\n\ttext:\n\t\"p <[a-zA-Z_]\\w*(?>[?!])?)(:)(?!:)", + "name": "constant.other.symbol.hashkey.ruby" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.ruby" + } + }, + "comment": "symbols as hash key (1.8 syntax)", + "match": "(?[a-zA-Z_]\\w*(?>[?!])?)(?=\\s*=>)", + "name": "constant.other.symbol.hashkey.ruby" + }, + { + "comment": "everything being a reserved word, not a value and needing a 'end' is a..", + "match": "(?|_|\\*|\\$|\\?|:|\"|-[0adFiIlpvw])", + "name": "variable.other.readwrite.global.pre-defined.ruby" + }, + { + "begin": "\\b(ENV)\\[", + "beginCaptures": { + "1": { + "name": "variable.other.constant.ruby" + } + }, + "end": "\\]", + "name": "meta.environment-variable.ruby", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "match": "\\b[A-Z]\\w*(?=((\\.|::)[A-Za-z]|\\[))", + "name": "support.class.ruby" + }, + { + "match": "\\b(abort|at_exit|autoload[?]?|binding|callcc|caller|caller_locations|chomp|chop|eval|exec|exit|exit!|fork|format|gets|global_variables|gsub|lambda|load|local_variables|open|p|print|printf|proc|putc|puts|rand|readline|readlines|select|set_trace_func|sleep|spawn|sprintf|srand|sub|syscall|system|test|trace_var|trap|untrace_var|warn)(\\b|(?<=[?!]))(?![?!])", + "name": "support.function.kernel.ruby" + }, + { + "match": "\\b[A-Z]\\w*\\b", + "name": "variable.other.constant.ruby" + }, + { + "begin": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\s+ # the def keyword\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|!=|!~|>[>=]?|<=>|<[<=]?|[%&`/\\|^]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # …or an operator method\n\t\t\t \\s*(\\() # the openning parenthesis for arguments\n\t\t\t ", + "beginCaptures": { + "1": { + "name": "keyword.control.def.ruby" + }, + "2": { + "name": "entity.name.function.ruby" + }, + "3": { + "name": "punctuation.definition.parameters.ruby" + } + }, + "comment": "the method pattern comes from the symbol pattern, see there for a explaination", + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.parameters.ruby" + } + }, + "name": "meta.function.method.with-arguments.ruby", + "patterns": [ + { + "begin": "(?=[&*_a-zA-Z])", + "end": "(?=[,)])", + "patterns": [ + { + "captures": { + "1": { + "name": "storage.type.variable.ruby" + }, + "2": { + "name": "constant.other.symbol.hashkey.parameter.function.ruby" + }, + "3": { + "name": "punctuation.definition.constant.ruby" + }, + "4": { + "name": "variable.parameter.function.ruby" + } + }, + "match": "\\G([&*]?)(?:([_a-zA-Z]\\w*(:))|([_a-zA-Z]\\w*))" + }, + { + "begin": "\\(", + "captures": { + "0": { + "name": "punctuation.section.function.ruby" + } + }, + "comment": "Prevent end pattern of parent rule from ending prematurely.", + "end": "\\)", + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "$self" + } + ] + } + ] + }, + { + "begin": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\s+ # the def keyword\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|!=|!~|>[>=]?|<=>|<[<=]?|[%&`/\\|^]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # …or an operator method\n\t\t\t [ \\t] # the space separating the arguments\n\t\t\t (?=[ \\t]*[^\\s#;]) # make sure arguments and not a comment follow\n\t\t\t ", + "beginCaptures": { + "1": { + "name": "keyword.control.def.ruby" + }, + "2": { + "name": "entity.name.function.ruby" + } + }, + "comment": "same as the previous rule, but without parentheses around the arguments", + "end": "$", + "name": "meta.function.method.with-arguments.ruby", + "patterns": [ + { + "begin": "(?![\\s,])", + "end": "(?=,|$)", + "patterns": [ + { + "captures": { + "1": { + "name": "storage.type.variable.ruby" + }, + "2": { + "name": "constant.other.symbol.hashkey.parameter.function.ruby" + }, + "3": { + "name": "punctuation.definition.constant.ruby" + }, + "4": { + "name": "variable.parameter.function.ruby" + } + }, + "match": "\\G([&*]?)(?:([_a-zA-Z]\\w*(:))|([_a-zA-Z]\\w*))", + "name": "variable.parameter.function.ruby" + }, + { + "include": "$self" + } + ] + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.control.def.ruby" + }, + "3": { + "name": "entity.name.function.ruby" + } + }, + "comment": " the optional name is just to catch the def also without a method-name", + "match": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\b # the def keyword\n\t\t\t ( \\s+ # an optional group of whitespace followed by…\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|!=|!~|>[>=]?|<=>|<[<=]?|[%&`/\\|^]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) )? # …or an operator method\n\t\t\t ", + "name": "meta.function.method.without-arguments.ruby" + }, + { + "match": "\\b\\d(?>_?\\d)*(?=\\.\\d|[eE])(\\.\\d(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?r?i?\\b", + "name": "constant.numeric.float.ruby" + }, + { + "match": "\\b(0[dD]\\d|[1-9])(?>_?\\d)*r?i?\\b", + "name": "constant.numeric.integer.ruby" + }, + { + "match": "\\b0[xX]\\h(?>_?\\h)*r?i?\\b", + "name": "constant.numeric.hex.ruby" + }, + { + "match": "\\b0[bB][01](?>_?[01])*r?i?\\b", + "name": "constant.numeric.binary.ruby" + }, + { + "match": "\\b0([oO]?[0-7](?>_?[0-7])*)?r?i?\\b", + "name": "constant.numeric.octal.ruby" + }, + { + "begin": ":'", + "captures": { + "0": { + "name": "punctuation.definition.constant.ruby" + } + }, + "end": "'", + "name": "constant.other.symbol.single-quoted.ruby", + "patterns": [ + { + "match": "\\\\['\\\\]", + "name": "constant.character.escape.ruby" + } + ] + }, + { + "begin": ":\"", + "captures": { + "0": { + "name": "punctuation.definition.constant.ruby" + } + }, + "end": "\"", + "name": "constant.other.symbol.double-quoted.ruby", + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "comment": "Needs higher precidence than regular expressions.", + "match": "(?~(?:\\[,|&;]\n\t\t\t | [\\s;]if\\s\t\t\t# keywords\n\t\t\t | [\\s;]elsif\\s\n\t\t\t | [\\s;]while\\s\n\t\t\t | [\\s;]unless\\s\n\t\t\t | [\\s;]when\\s\n\t\t\t | [\\s;]assert_match\\s\n\t\t\t | [\\s;]or\\s\t\t\t# boolean opperators\n\t\t\t | [\\s;]and\\s\n\t\t\t | [\\s;]not\\s\n\t\t\t | [\\s.]index\\s\t\t\t# methods\n\t\t\t | [\\s.]scan\\s\n\t\t\t | [\\s.]sub\\s\n\t\t\t | [\\s.]sub!\\s\n\t\t\t | [\\s.]gsub\\s\n\t\t\t | [\\s.]gsub!\\s\n\t\t\t | [\\s.]match\\s\n\t\t\t )\n\t\t\t | (?<= # or a look-behind with line anchor:\n\t\t\t ^when\\s # duplication necessary due to limits of regex\n\t\t\t | ^if\\s\n\t\t\t | ^elsif\\s\n\t\t\t | ^while\\s\n\t\t\t | ^unless\\s\n\t\t\t )\n\t\t\t )\n\t\t\t \\s*((/))(?![*+{}?])\n\t\t\t", + "captures": { + "1": { + "name": "string.regexp.classic.ruby" + }, + "2": { + "name": "punctuation.definition.string.ruby" + } + }, + "comment": "regular expressions (normal)\n\t\t\twe only start a regexp if the character before it (excluding whitespace)\n\t\t\tis what we think is before a regexp\n\t\t\t", + "contentName": "string.regexp.classic.ruby", + "end": "((/[eimnosux]*))", + "patterns": [ + { + "include": "#regex_sub" + } + ] + }, + { + "captures": { + "1": { + "name": "punctuation.definition.constant.ruby" + } + }, + "comment": "symbols", + "match": "(?[a-zA-Z_]\\w*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<=>|<[<=]?|[%&`/\\|]|\\*\\*?|=?~|[-+]@?|\\[\\]=?|(@@?|\\$)[a-zA-Z_]\\w*)", + "name": "constant.other.symbol.ruby" + }, + { + "begin": "^=begin", + "captures": { + "0": { + "name": "punctuation.definition.comment.ruby" + } + }, + "comment": "multiline comments", + "end": "^=end", + "name": "comment.block.documentation.ruby" + }, + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.ruby" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.ruby" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.ruby" + } + ] + }, + { + "comment": "\n\t\t\tmatches questionmark-letters.\n\n\t\t\texamples (1st alternation = hex):\n\t\t\t?\\x1 ?\\x61\n\n\t\t\texamples (2nd alternation = octal):\n\t\t\t?\\0 ?\\07 ?\\017\n\n\t\t\texamples (3rd alternation = escaped):\n\t\t\t?\\n ?\\b\n\n\t\t\texamples (4th alternation = meta-ctrl):\n\t\t\t?\\C-a ?\\M-a ?\\C-\\M-\\C-\\M-a\n\n\t\t\texamples (4th alternation = normal):\n\t\t\t?a ?A ?0 \n\t\t\t?* ?\" ?( \n\t\t\t?. ?#\n\t\t\t\n\t\t\t\n\t\t\tthe negative lookbehind prevents against matching\n\t\t\tp(42.tainted?)\n\t\t\t", + "match": "(?<<[-~](\"?)((?:[_\\w]+_|)HTML)\\b\\1))", + "comment": "Heredoc with embedded html", + "end": "(?!\\G)", + "name": "meta.embedded.block.html", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)HTML)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "text.html", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "text.html.basic" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)SQL)\\b\\1))", + "comment": "Heredoc with embedded sql", + "end": "(?!\\G)", + "name": "meta.embedded.block.sql", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)SQL)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.sql", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.sql" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)CSS)\\b\\1))", + "comment": "Heredoc with embedded css", + "end": "(?!\\G)", + "name": "meta.embedded.block.css", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)CSS)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.css", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.css" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)CPP)\\b\\1))", + "comment": "Heredoc with embedded c++", + "end": "(?!\\G)", + "name": "meta.embedded.block.c++", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)CPP)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.c++", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.c++" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)C)\\b\\1))", + "comment": "Heredoc with embedded c", + "end": "(?!\\G)", + "name": "meta.embedded.block.c", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)C)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.c", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.c" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1))", + "comment": "Heredoc with embedded javascript", + "end": "(?!\\G)", + "name": "meta.embedded.block.js", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)(?:JS|JAVASCRIPT))\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.js", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.js" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)JQUERY)\\b\\1))", + "comment": "Heredoc with embedded jQuery javascript", + "end": "(?!\\G)", + "name": "meta.embedded.block.js.jquery", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)JQUERY)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.js.jquery", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.js.jquery" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1))", + "comment": "Heredoc with embedded shell", + "end": "(?!\\G)", + "name": "meta.embedded.block.shell", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)(?:SH|SHELL))\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.shell", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.shell" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)LUA)\\b\\1))", + "comment": "Heredoc with embedded lua", + "end": "(?!\\G)", + "name": "meta.embedded.block.lua", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)LUA)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.lua", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.lua" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?=(?><<[-~](\"?)((?:[_\\w]+_|)RUBY)\\b\\1))", + "comment": "Heredoc with embedded ruby", + "end": "(?!\\G)", + "name": "meta.embedded.block.ruby", + "patterns": [ + { + "begin": "(?><<[-~](\"?)((?:[_\\w]+_|)RUBY)\\b\\1)", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "contentName": "source.ruby", + "end": "\\s*\\2$\\n?", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "source.ruby" + }, + { + "include": "#escaped_char" + } + ] + } + ] + }, + { + "begin": "(?>=\\s*<<(\\w+))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "^\\1$", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?><<[-~](\\w+))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "comment": "heredoc with indented terminator", + "end": "\\s*\\1$", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.unquoted.heredoc.ruby", + "patterns": [ + { + "include": "#heredoc" + }, + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "(?<=\\{|do|\\{\\s|do\\s)(\\|)", + "captures": { + "1": { + "name": "punctuation.separator.arguments.ruby" + } + }, + "end": "(?", + "name": "punctuation.separator.key-value" + }, + { + "match": "->", + "name": "support.function.kernel.lambda.ruby" + }, + { + "match": "<<=|%=|&{1,2}=|\\*=|\\*\\*=|\\+=|-=|\\^=|\\|{1,2}=|<<", + "name": "keyword.operator.assignment.augmented.ruby" + }, + { + "match": "<=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~|(?<=[ \\t])\\?", + "name": "keyword.operator.comparison.ruby" + }, + { + "match": "(?>", + "name": "keyword.operator.other.ruby" + }, + { + "match": ";", + "name": "punctuation.separator.statement.ruby" + }, + { + "match": ",", + "name": "punctuation.separator.object.ruby" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.namespace.ruby" + } + }, + "comment": "Mark as namespace separator if double colons followed by capital letter", + "match": "(::)\\s*(?=[A-Z])" + }, + { + "captures": { + "1": { + "name": "punctuation.separator.method.ruby" + } + }, + "comment": "Mark as method separator if double colons not followed by capital letter", + "match": "(\\.|::)\\s*(?![A-Z])" + }, + { + "comment": "Must come after method and constant separators to prefer double colons", + "match": ":", + "name": "punctuation.separator.other.ruby" + }, + { + "match": "\\{", + "name": "punctuation.section.scope.begin.ruby" + }, + { + "match": "\\}", + "name": "punctuation.section.scope.end.ruby" + }, + { + "match": "\\[", + "name": "punctuation.section.array.begin.ruby" + }, + { + "match": "\\]", + "name": "punctuation.section.array.end.ruby" + }, + { + "match": "\\(|\\)", + "name": "punctuation.section.function.ruby" + } + ], + "repository": { + "escaped_char": { + "match": "\\\\(?:[0-7]{1,3}|x[\\da-fA-F]{1,2}|.)", + "name": "constant.character.escape.ruby" + }, + "heredoc": { + "begin": "^<<[-~]?\\w+", + "end": "$", + "patterns": [ + { + "include": "$self" + } + ] + }, + "interpolated_ruby": { + "patterns": [ + { + "begin": "#\\{", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.ruby" + } + }, + "contentName": "source.ruby", + "end": "(\\})", + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.ruby" + }, + "1": { + "name": "source.ruby" + } + }, + "name": "meta.embedded.line.ruby", + "patterns": [ + { + "include": "#nest_curly_and_self" + }, + { + "include": "$self" + } + ], + "repository": { + "nest_curly_and_self": { + "patterns": [ + { + "begin": "\\{", + "captures": { + "0": { + "name": "punctuation.section.scope.ruby" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#nest_curly_and_self" + } + ] + }, + { + "include": "$self" + } + ] + } + } + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.ruby" + } + }, + "match": "(#@)[a-zA-Z_]\\w*", + "name": "variable.other.readwrite.instance.ruby" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.ruby" + } + }, + "match": "(#@@)[a-zA-Z_]\\w*", + "name": "variable.other.readwrite.class.ruby" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.variable.ruby" + } + }, + "match": "(#\\$)[a-zA-Z_]\\w*", + "name": "variable.other.readwrite.global.ruby" + } + ] + }, + "percent_literals": { + "patterns": [ + { + "begin": "%i(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "meta.array.symbol.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#symbol" + } + ] + }, + { + "include": "#symbol" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\<|\\\\>", + "name": "constant.other.symbol.ruby" + }, + { + "begin": "<", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": ">", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\{|\\\\\\}", + "name": "constant.other.symbol.ruby" + }, + { + "begin": "\\{", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\[|\\\\\\]", + "name": "constant.other.symbol.ruby" + }, + { + "begin": "\\[", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\(|\\\\\\)", + "name": "constant.other.symbol.ruby" + }, + { + "begin": "\\(", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "symbol": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\\\|\\\\[ ]", + "name": "constant.other.symbol.ruby" + }, + { + "match": "\\S\\w*", + "name": "constant.other.symbol.ruby" + } + ] + } + } + }, + { + "begin": "%I(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "meta.array.symbol.interpolated.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#symbol" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#symbol" + } + ] + }, + { + "include": "#symbol" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "begin": "<", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": ">", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "begin": "\\{", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "begin": "\\[", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "begin": "\\(", + "captures": { + "0": { + "name": "constant.other.symbol.ruby" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#symbol" + } + ] + } + ] + }, + "symbol": { + "patterns": [ + { + "begin": "(?=\\\\|#\\{)", + "end": "(?!\\G)", + "name": "constant.other.symbol.ruby", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + } + ] + }, + { + "match": "\\S\\w*", + "name": "constant.other.symbol.ruby" + } + ] + } + } + }, + { + "begin": "%q(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.other.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + } + ] + } + ], + "repository": { + "angles": { + "patterns": [ + { + "match": "\\\\<|\\\\>|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "<", + "end": ">", + "patterns": [ + { + "include": "#angles" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "match": "\\\\\\{|\\\\\\}|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#braces" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "match": "\\\\\\[|\\\\\\]|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "match": "\\\\\\(|\\\\\\)|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#parens" + } + ] + } + ] + } + } + }, + { + "begin": "%Q?(?:([(\\[{<])|([^\\w\\s=]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.quoted.other.interpolated.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + } + ] + }, + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "<", + "end": ">", + "patterns": [ + { + "include": "#angles" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#braces" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#parens" + } + ] + } + ] + } + } + }, + { + "begin": "%r(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "([)\\]}>]\\2|\\1\\2)[eimnosux]*", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.regexp.percent.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + } + ] + }, + { + "include": "#regex_sub" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "include": "#regex_sub" + }, + { + "begin": "<", + "end": ">", + "patterns": [ + { + "include": "#angles" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "include": "#regex_sub" + }, + { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#braces" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "include": "#regex_sub" + }, + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "include": "#regex_sub" + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#parens" + } + ] + } + ] + } + } + }, + { + "begin": "%s(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.constant.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.definition.constant.end.ruby" + } + }, + "name": "constant.other.symbol.percent.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + } + ] + } + ], + "repository": { + "angles": { + "patterns": [ + { + "match": "\\\\<|\\\\>|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "<", + "end": ">", + "patterns": [ + { + "include": "#angles" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "match": "\\\\\\{|\\\\\\}|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#braces" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "match": "\\\\\\[|\\\\\\]|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "match": "\\\\\\(|\\\\\\)|\\\\\\\\", + "name": "constant.character.escape.ruby" + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#parens" + } + ] + } + ] + } + } + }, + { + "begin": "%w(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "meta.array.string.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#string" + } + ] + }, + { + "include": "#string" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\<|\\\\>", + "name": "string.other.ruby" + }, + { + "begin": "<", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": ">", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#string" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\{|\\\\\\}", + "name": "string.other.ruby" + }, + { + "begin": "\\{", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#string" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\[|\\\\\\]", + "name": "string.other.ruby" + }, + { + "begin": "\\[", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#string" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\(|\\\\\\)", + "name": "string.other.ruby" + }, + { + "begin": "\\(", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#string" + } + ] + } + ] + }, + "string": { + "patterns": [ + { + "captures": { + "0": { + "name": "constant.character.escape.ruby" + } + }, + "match": "\\\\\\\\|\\\\[ ]", + "name": "string.other.ruby" + }, + { + "match": "\\S\\w*", + "name": "string.other.ruby" + } + ] + } + } + }, + { + "begin": "%W(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.section.array.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.section.array.end.ruby" + } + }, + "name": "meta.array.string.interpolated.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#string" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#string" + } + ] + }, + { + "include": "#string" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "begin": "<", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": ">", + "patterns": [ + { + "include": "#angles" + }, + { + "include": "#string" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "begin": "\\{", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\}", + "patterns": [ + { + "include": "#braces" + }, + { + "include": "#string" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "begin": "\\[", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + }, + { + "include": "#string" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "begin": "\\(", + "captures": { + "0": { + "name": "string.other.ruby" + } + }, + "end": "\\)", + "patterns": [ + { + "include": "#parens" + }, + { + "include": "#string" + } + ] + } + ] + }, + "string": { + "patterns": [ + { + "begin": "(?=\\\\|#\\{)", + "end": "(?!\\G)", + "name": "string.other.ruby", + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + } + ] + }, + { + "match": "\\S\\w*", + "name": "string.other.ruby" + } + ] + } + } + }, + { + "begin": "%x(?:([(\\[{<])|([^\\w\\s]|_))", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ruby" + } + }, + "end": "[)\\]}>]\\2|\\1\\2", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ruby" + } + }, + "name": "string.interpolated.percent.ruby", + "patterns": [ + { + "begin": "\\G(?<=\\()(?!\\))", + "end": "(?=\\))", + "patterns": [ + { + "include": "#parens" + } + ] + }, + { + "begin": "\\G(?<=\\[)(?!\\])", + "end": "(?=\\])", + "patterns": [ + { + "include": "#brackets" + } + ] + }, + { + "begin": "\\G(?<=\\{)(?!\\})", + "end": "(?=\\})", + "patterns": [ + { + "include": "#braces" + } + ] + }, + { + "begin": "\\G(?<=<)(?!>)", + "end": "(?=>)", + "patterns": [ + { + "include": "#angles" + } + ] + }, + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + } + ], + "repository": { + "angles": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "<", + "end": ">", + "patterns": [ + { + "include": "#angles" + } + ] + } + ] + }, + "braces": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\{", + "end": "\\}", + "patterns": [ + { + "include": "#braces" + } + ] + } + ] + }, + "brackets": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\[", + "end": "\\]", + "patterns": [ + { + "include": "#brackets" + } + ] + } + ] + }, + "parens": { + "patterns": [ + { + "include": "#escaped_char" + }, + { + "include": "#interpolated_ruby" + }, + { + "begin": "\\(", + "end": "\\)", + "patterns": [ + { + "include": "#parens" + } + ] + } + ] + } + } + } + ] + }, + "regex_sub": { + "patterns": [ + { + "include": "#interpolated_ruby" + }, + { + "include": "#escaped_char" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.quantifier.begin.ruby" + }, + "3": { + "name": "punctuation.definition.quantifier.end.ruby" + } + }, + "match": "(\\{)\\d+(,\\d+)?(\\})", + "name": "keyword.operator.quantifier.ruby" + }, + { + "begin": "\\[\\^?", + "beginCaptures": { + "0": { + "name": "punctuation.definition.character-class.begin.ruby" + } + }, + "end": "\\]", + "endCaptures": { + "0": { + "name": "punctuation.definition.character-class.end.ruby" + } + }, + "name": "constant.other.character-class.set.ruby", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "\\(\\?#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.ruby" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.ruby" + } + }, + "name": "comment.line.number-sign.ruby", + "patterns": [ + { + "include": "#escaped_char" + } + ] + }, + { + "begin": "\\(", + "captures": { + "0": { + "name": "punctuation.definition.group.ruby" + } + }, + "end": "\\)", + "name": "meta.group.regexp.ruby", + "patterns": [ + { + "include": "#regex_sub" + } + ] + }, + { + "begin": "(?<=^|\\s)(#)\\s(?=[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$)", + "beginCaptures": { + "1": { + "name": "punctuation.definition.comment.ruby" + } + }, + "comment": "We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.", + "end": "$\\n?", + "name": "comment.line.number-sign.ruby" + } + ] + } + }, + "scopeName": "source.ruby", + "uuid": "E00B62AC-6B1C-11D9-9B1F-000D93589AF6", + "version": "https://github.com/textmate/ruby.tmbundle/commit/f0ab9fb24f32372d3e4054f33e8c243d810c7260" +} \ No newline at end of file diff --git a/extensions/ruby/test/colorize-results/test_rb.json b/extensions/ruby/test/colorize-results/test_rb.json index 5b3da189b4744..4c6e89c33f09a 100644 --- a/extensions/ruby/test/colorize-results/test_rb.json +++ b/extensions/ruby/test/colorize-results/test_rb.json @@ -375,7 +375,7 @@ }, { "c": "::", - "t": "source.ruby punctuation.separator.other.ruby", + "t": "source.ruby punctuation.separator.namespace.ruby", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -397,7 +397,7 @@ }, { "c": "::", - "t": "source.ruby punctuation.separator.other.ruby", + "t": "source.ruby punctuation.separator.namespace.ruby", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -419,7 +419,7 @@ }, { "c": "::", - "t": "source.ruby punctuation.separator.other.ruby", + "t": "source.ruby punctuation.separator.namespace.ruby", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1486,7 +1486,7 @@ }, { "c": "::", - "t": "source.ruby punctuation.separator.other.ruby", + "t": "source.ruby punctuation.separator.namespace.ruby", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -1695,7 +1695,7 @@ }, { "c": "self", - "t": "source.ruby variable.language.ruby", + "t": "source.ruby variable.language.self.ruby", "r": { "dark_plus": "variable.language: #569CD6", "light_plus": "variable.language: #0000FF", @@ -1827,7 +1827,7 @@ }, { "c": "self", - "t": "source.ruby variable.language.ruby", + "t": "source.ruby variable.language.self.ruby", "r": { "dark_plus": "variable.language: #569CD6", "light_plus": "variable.language: #0000FF", From 6b48d58387fe363c7bb75f308e6a63bf8958e605 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 May 2017 13:58:21 +0200 Subject: [PATCH 0702/2747] [rust] update grammar --- extensions/rust/syntaxes/rust.tmLanguage.json | 138 +++++++++++------- .../test/colorize-results/test-6611_rs.json | 135 ++++++++++++++++- 2 files changed, 210 insertions(+), 63 deletions(-) diff --git a/extensions/rust/syntaxes/rust.tmLanguage.json b/extensions/rust/syntaxes/rust.tmLanguage.json index 3b952b7f86863..3af597f3cb7ef 100644 --- a/extensions/rust/syntaxes/rust.tmLanguage.json +++ b/extensions/rust/syntaxes/rust.tmLanguage.json @@ -158,6 +158,11 @@ "name": "support.type.std.rust", "match": "\\b(ToOwned|ToString)\\b" }, + "type": { + "comment": "A type", + "name": "entity.name.type.rust", + "match": "\\b([A-Za-z][_A-Za-z0-9]*|_[_A-Za-z0-9]+)\\b" + }, "type_params": { "comment": "Type parameters", "name": "meta.type_params.rust", @@ -201,6 +206,61 @@ } }, "patterns": [ + { + "comment": "Implementation", + "begin": "\\b(impl)\\b", + "end": "\\{", + "beginCaptures": { + "1": { + "name": "storage.type.rust" + } + }, + "patterns": [ + { + "include": "#block_comment" + }, + { + "include": "#line_comment" + }, + { + "include": "#sigils" + }, + { + "include": "#mut" + }, + { + "include": "#ref_lifetime" + }, + { + "include": "#core_types" + }, + { + "include": "#core_marker" + }, + { + "include": "#core_traits" + }, + { + "include": "#std_types" + }, + { + "include": "#std_traits" + }, + { + "include": "#type_params" + }, + { + "include": "#where" + }, + { + "name": "storage.type.rust", + "match": "\\bfor\\b" + }, + { + "include": "#type" + } + ] + }, { "include": "#block_doc_comment" }, @@ -403,16 +463,34 @@ }, { "comment": "Function call", - "match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\s*\\(", + "match": "\\b([A-Za-z][A-Za-z0-9_]*|_[A-Za-z0-9_]+)\\s*\\(", "captures": { "1": { "name": "entity.name.function.rust" } } }, + { + "comment": "Function call with type parameters", + "begin": "\\b([A-Za-z][A-Za-z0-9_]*|_[A-Za-z0-9_]+)\\s*(::)(?=\\s*<.*>\\s*\\()", + "end": "\\(", + "captures": { + "1": { + "name": "entity.name.function.rust" + }, + "2": { + "name": "keyword.operator.misc.rust" + } + }, + "patterns": [ + { + "include": "#type_params" + } + ] + }, { "comment": "Function definition", - "begin": "\\b(fn)\\s+([a-zA-Z_][a-zA-Z0-9_]*)", + "begin": "\\b(fn)\\s+([A-Za-z][A-Za-z0-9_]*|_[A-Za-z0-9_]+)", "end": "[\\{;]", "beginCaptures": { "1": { @@ -470,7 +548,7 @@ }, { "comment": "Function arguments", - "match": "fn", + "match": "\bfn\b", "name": "keyword.other.fn.rust" } ] @@ -564,59 +642,7 @@ "include": "#type_params" } ] - }, - { - "comment": "Implementation", - "begin": "\\b(impl)\\b", - "end": "\\{", - "beginCaptures": { - "1": { - "name": "storage.type.rust" - } - }, - "patterns": [ - { - "include": "#block_comment" - }, - { - "include": "#line_comment" - }, - { - "include": "#sigils" - }, - { - "include": "#mut" - }, - { - "include": "#ref_lifetime" - }, - { - "include": "#core_types" - }, - { - "include": "#core_marker" - }, - { - "include": "#core_traits" - }, - { - "include": "#std_types" - }, - { - "include": "#std_traits" - }, - { - "include": "#type_params" - }, - { - "include": "#where" - }, - { - "name": "storage.type.rust", - "match": "\\bfor\\b" - } - ] } ], - "version": "https://github.com/zargony/atom-language-rust/commit/5e32388ed873683f3ccdea618c25d1ace8759608" + "version": "https://github.com/zargony/atom-language-rust/commit/c24ef01b9f989f1262c9e70fe13b314b8e646ed0" } \ No newline at end of file diff --git a/extensions/rust/test/colorize-results/test-6611_rs.json b/extensions/rust/test/colorize-results/test-6611_rs.json index d397562ce5c08..6667e4fd311d8 100644 --- a/extensions/rust/test/colorize-results/test-6611_rs.json +++ b/extensions/rust/test/colorize-results/test-6611_rs.json @@ -11,7 +11,7 @@ } }, { - "c": " Foo", + "c": " ", "t": "source.rust", "r": { "dark_plus": "default: #D4D4D4", @@ -21,6 +21,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "Foo", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, { "c": "", "t": "source.rust meta.type_params.rust", @@ -55,7 +66,7 @@ } }, { - "c": " A: B", + "c": " ", "t": "source.rust", "r": { "dark_plus": "default: #D4D4D4", @@ -65,6 +76,39 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "A", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, + { + "c": ": ", + "t": "source.rust", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "B", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, { "c": "{ }", "t": "source.rust", @@ -88,7 +132,7 @@ } }, { - "c": " Foo", + "c": " ", "t": "source.rust", "r": { "dark_plus": "default: #D4D4D4", @@ -98,6 +142,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "Foo", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, { "c": "", "t": "source.rust meta.type_params.rust", @@ -132,7 +187,7 @@ } }, { - "c": " C", + "c": " ", "t": "source.rust", "r": { "dark_plus": "default: #D4D4D4", @@ -142,6 +197,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "C", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, { "c": " ", "t": "source.rust", @@ -165,7 +231,7 @@ } }, { - "c": " A: B", + "c": " ", "t": "source.rust", "r": { "dark_plus": "default: #D4D4D4", @@ -175,6 +241,39 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "A", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, + { + "c": ": ", + "t": "source.rust", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "B", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, { "c": "{ }", "t": "source.rust", @@ -198,7 +297,7 @@ } }, { - "c": " Foo", + "c": " ", "t": "source.rust", "r": { "dark_plus": "default: #D4D4D4", @@ -208,6 +307,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "Foo", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, { "c": "", "t": "source.rust meta.type_params.rust", @@ -242,7 +352,7 @@ } }, { - "c": " C", + "c": " ", "t": "source.rust", "r": { "dark_plus": "default: #D4D4D4", @@ -252,6 +362,17 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "C", + "t": "source.rust entity.name.type.rust", + "r": { + "dark_plus": "entity.name.type: #4EC9B0", + "light_plus": "entity.name.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.type: #4EC9B0" + } + }, { "c": "{", "t": "source.rust", From 486d6e1f006a7702bddb070c92772b42f3f3d379 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 May 2017 15:29:01 +0200 Subject: [PATCH 0703/2747] [shaderlab] update grammar --- extensions/shaderlab/syntaxes/shaderlab.json | 59 ++++++++++++++------ 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/extensions/shaderlab/syntaxes/shaderlab.json b/extensions/shaderlab/syntaxes/shaderlab.json index aad10f3b35aff..dd4ba7f8bb36b 100644 --- a/extensions/shaderlab/syntaxes/shaderlab.json +++ b/extensions/shaderlab/syntaxes/shaderlab.json @@ -93,6 +93,48 @@ "name": "keyword.other" } }, + "patterns": [ + { + "include": "#hlsl-embedded" + } + ] + }, + { + "name": "meta.hlslblock", + "begin": "\\b(HLSLPROGRAM|HLSLINCLUDE)\\b", + "beginCaptures": { + "1": { + "name": "keyword.other" + } + }, + "end": "\\b(ENDHLSL)\\b", + "endCaptures": { + "1": { + "name": "keyword.other" + } + }, + "patterns": [ + { + "include": "#hlsl-embedded" + } + ] + }, + { + "name": "string.quoted.double.shaderlab", + "begin": "\"", + "end": "\"" + } + ], + "repository": { + "numbers": { + "patterns": [ + { + "name": "constant.numeric.shaderlab", + "match": "\\b([0-9]+\\.?[0-9]*)\\b" + } + ] + }, + "hlsl-embedded": { "patterns": [ { "include": "source.hlsl" @@ -154,22 +196,7 @@ "match": "\\b(SurfaceOutputStandardSpecular|SurfaceOutputStandard|SurfaceOutput|Input)\\b" } ] - }, - { - "name": "string.quoted.double.shaderlab", - "begin": "\"", - "end": "\"" - } - ], - "repository": { - "numbers": { - "patterns": [ - { - "name": "constant.numeric.shaderlab", - "match": "\\b([0-9]+\\.?[0-9]*)\\b" - } - ] } }, - "version": "https://github.com/tgjones/shaders-tmLanguage/commit/cd1ef40f549f9ce2b9e6b73498688de114a85382" + "version": "https://github.com/tgjones/shaders-tmLanguage/commit/a6ee9f41e4b99812c6698462cae4868c80f82a3b" } \ No newline at end of file From 767b146e267603f65065373fe047a9282ccbcca7 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 May 2017 15:37:08 +0200 Subject: [PATCH 0704/2747] [swift] update grammar --- extensions/swift/package.json | 5 +- extensions/swift/syntaxes/swift.json | 257 ------------------ .../swift/syntaxes/swift.tmLanguage.json | 217 +++++++++++++++ .../test/colorize-results/test_swift.json | 217 +++++++++++---- 4 files changed, 379 insertions(+), 317 deletions(-) delete mode 100644 extensions/swift/syntaxes/swift.json create mode 100644 extensions/swift/syntaxes/swift.tmLanguage.json diff --git a/extensions/swift/package.json b/extensions/swift/package.json index b8f262b4cff26..a9139a22a6d6c 100644 --- a/extensions/swift/package.json +++ b/extensions/swift/package.json @@ -3,6 +3,9 @@ "version": "0.1.0", "publisher": "vscode", "engines": { "vscode": "*" }, + "scripts": { + "update-grammar": "node ../../build/npm/update-grammar.js freebroccolo/atom-language-swift grammars/swift.cson ./syntaxes/swift.tmLanguage.json" + }, "contributes": { "languages": [{ "id": "swift", @@ -13,7 +16,7 @@ "grammars": [{ "language": "swift", "scopeName": "source.swift", - "path": "./syntaxes/swift.json" + "path": "./syntaxes/swift.tmLanguage.json" }], "snippets": [{ "language": "swift", diff --git a/extensions/swift/syntaxes/swift.json b/extensions/swift/syntaxes/swift.json deleted file mode 100644 index ffd875717c659..0000000000000 --- a/extensions/swift/syntaxes/swift.json +++ /dev/null @@ -1,257 +0,0 @@ -{ - "scopeName": "source.swift", - "fileTypes": [ - "swift" - ], - "name": "Swift", - "firstLineMatch": "^#!\\s*/.*\\bswift", - "patterns": [ - { - "name": "keyword.declaration.swift", - "match": "\\b(class|deinit|enum|extension|import|init|inout|internal|let|operator|private|protocol|public|static|struct|subscript|typealias|var)\\b" - }, - { - "name": "keyword.statement.swift", - "match": "\\b(break|case|continue|default|defer|do|else|fallthrough|for|guard|if|in|repeat|return|switch|where|while)\\b" - }, - { - "name": "keyword.expressions-and-types.swift", - "match": "\\b(as|catch|dynamicType|false|is|nil|rethrows|super|self|Self|throw|throws|true|try|__COLUMN__|__FILE__|__FUNCTION__|__LINE__)\\b" - }, - { - "name": "keyword.patterns.swift", - "match": "\\b(_)\\b" - }, - { - "name": "keyword.primitive-datatypes.swift", - "match": "\\b(Int|UInt|String|Bool|Character|Optional|Float|Double)\\b" - }, - { - "name": "keyword.reserved.swift", - "match": "\\b(associativity|convenience|dynamic|didSet|final|get|infix|lazy|left|mutating|none|nonmutating|optional|override|postfix|precedence|prefix|Protocol|required|right|set|Type|unowned|weak|willSet)\\b" - }, - { - "include": "#comment" - }, - { - "include": "#literal" - }, - { - "include": "#function" - }, - { - "include": "#operator" - }, - { - "include": "#attribute" - } - ], - "repository": { - "comment": { - "patterns": [ - { - "name": "comment.block.swift", - "begin": "/\\*", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.begin.swift" - } - }, - "end": "\\*/", - "endCaptures": { - "0": { - "name": "punctuation.definition.comment.end.swift" - } - }, - "patterns": [ - { - "include": "#comment" - } - ] - }, - { - "begin": "(^[ \\t]+)?(?=//)", - "beginCaptures": { - "1": { - "name": "punctuation.whitespace.comment.leading.swift" - } - }, - "end": "(?!\\G)", - "patterns": [ - { - "name": "comment.line.double-slash.swift", - "begin": "//", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.swift" - } - }, - "end": "\\n", - "patterns": [ - { - "name": "punctuation.separator.continuation.swift", - "match": "(?>\\\\\\s*\\n)" - } - ] - } - ] - } - ] - }, - "escaped-char": { - "patterns": [ - { - "name": "constant.character.escape.swift", - "match": "\\\\[0\\\\tnr\"']" - }, - { - "name": "constant.character.escape.swift", - "match": "\\\\(x\\h{2}|u\\h{4}|U\\h{8})" - }, - { - "name": "invalid.illegal.constant.character.escape.swift", - "match": "\\\\[^uxU]" - } - ] - }, - "identifier": { - "match": "(?x) (? \\g \\g? | ` \\g \\g? ` ){0} (? [ a-z A-Z ] | [ \\u00A8 \\u00AA \\u00AD \\u00AF \\u00B2-\\u00B5 \\u00B7-\\u00BA ] | [ \\u00BC-\\u00BE \\u00C0-\\u00D6 \\u00D8-\\u00F6 \\u00F8-\\u00FF ] | [ \\u0100-\\u02FF \\u0370-\\u167F \\u1681-\\u180D \\u180F-\\u1DBF ] | [ \\u1E00-\\u1FFF ] | [ \\u200B-\\u200D \\u202A-\\u202E \\u203F-\\u2040 \\u2054 \\u2060-\\u206F ] | [ \\u2070-\\u20CF \\u2100-\\u218F \\u2460-\\u24FF \\u2776-\\u2793 ] | [ \\u2C00-\\u2DFF \\u2E80-\\u2FFF ] | [ \\u3004-\\u3007 \\u3021-\\u302F \\u3031-\\u303F \\u3040-\\uD7FF ] | [ \\uF900-\\uFD3D \\uFD40-\\uFDCF \\uFDF0-\\uFE1F \\uFE30-\\uFE44 ] | [ \\uFE47-\\uFFFD ] | [ \\u10000-\\u1FFFD \\u20000-\\u2FFFD \\u30000-\\u3FFFD \\u40000-\\u4FFFD ] | [ \\u50000-\\u5FFFD \\u60000-\\u6FFFD \\u70000-\\u7FFFD \\u80000-\\u8FFFD ] | [ \\u90000-\\u9FFFD \\uA0000-\\uAFFFD \\uB0000-\\uBFFFD \\uC0000-\\uCFFFD ] | [ \\uD0000-\\uDFFFD \\uE0000-\\uEFFFD ] ){0} (? \\d | [ \\u0300-\\u036F \\u1DC0-\\u1DFF \\u20D0-\\u20FF \\uFE20-\\uFE2F ] | \\g ){0} (? \\g \\g? ){0} (? (?) \\$ \\d+ (?!\\g) (?# FIXME) ){0} \\g | \\g", - "captures": { - "5": { - "name": "variable.other.positional.swift" - } - } - }, - "literal": { - "patterns": [ - { - "include": "#literal-number" - }, - { - "include": "#literal-string" - }, - { - "include": "#literal-boolean" - } - ] - }, - "literal-number": { - "name": "constant.numeric.swift", - "match": "(?x) (?### INTEGER ###) (? \\g | \\g | \\g | \\g ){0} (?### BINARY ###) (? 0b \\g \\g? ){0} (? [0-1] ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### OCTAL ###) (? 0o \\g \\g? ){0} (? [0-7] ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### DECIMAL ###) (? \\g \\g? ){0} (? \\d ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### HEXADECIMAL ###) (? 0x \\g \\g? ){0} (? \\h ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### FLOATING POINT ###) (? \\g \\g? \\g? | \\g \\g? \\g ){0} (? \\. \\g ){0} (? \\g \\g? \\g ){0} (? \\. \\g? ){0} (? \\g \\g? \\g ){0} (? [eE] ){0} (? [pP] ){0} (? [+-] ){0} (?!0[box]) \\g | \\g" - }, - "literal-string": { - "name": "string.quoted.double.swift", - "begin": "\"", - "end": "\"", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.swift" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.swift" - } - }, - "patterns": [ - { - "include": "#quoted-text" - } - ] - }, - "literal-boolean": { - "match": "\\b(true|false)\\b(?![?!])", - "name": "constant.language.boolean.swift" - }, - "operator": { - "patterns": [ - { - "include": "#operator-character" - } - ] - }, - "operator-character": { - "name": "keyword.operator.swift", - "match": "[\\/=\\-+!*%<>&|^~.]" - }, - "quoted-text": { - "patterns": [ - { - "name": "meta.embedded.line.swift", - "contentName": "source.swift", - "begin": "\\\\\\(", - "end": "\\)", - "beginCaptures": { - "0": { - "name": "punctuation.section.embedded.begin.swift" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.section.embedded.end.swift" - } - }, - "patterns": [ - { - "include": "$self" - } - ] - }, - { - "include": "#escaped-char" - } - ] - }, - "function": { - "name": "meta.function.swift", - "begin": "(func) \\s*", - "end": "(?=\\{|#)|;|$", - "beginCaptures": { - "1": { - "name": "storage.type.function.swift" - } - }, - "comment": "match regular function like: func myFunc(...)", - "patterns": [ - { - "begin": "([a-zA-Z_0-9]+)\\s*(\\()", - "beginCaptures": { - "1": { - "name": "entity.name.function.swift" - }, - "2": { - "name": "punctuation.definition.parameters.begin.swift" - } - }, - "comment": "match regular function like: func myFunc(...)", - "end": "(\\))", - "endCaptures": { - "1": { - "name": "punctuation.definition.parameters.end.swift" - } - } - }, - { - "name": "meta.return-type.swift", - "match": "((->)\\s*([^\\{]+))", - "captures": { - "2": { - "name": "punctuation.function.swift" - }, - "3": { - "name": "entity.name.type.class.swift" - } - } - } - ] - }, - "whitespace": { - "match": "(?x) [ \\u0020 (?# space) \\u000A (?# line-feed) \\u000D (?# carriage-return) \\u0009 (?# horizontal-tab) \\u000B (?# vertical-tab) \\u000C (?# form-feed) \\u0000 (?# null) ]" - }, - "attribute": { - "name": "storage.type.attribute.swift", - "begin": "@", - "end": " " - } - } -} \ No newline at end of file diff --git a/extensions/swift/syntaxes/swift.tmLanguage.json b/extensions/swift/syntaxes/swift.tmLanguage.json new file mode 100644 index 0000000000000..87fa5be1e7562 --- /dev/null +++ b/extensions/swift/syntaxes/swift.tmLanguage.json @@ -0,0 +1,217 @@ +{ + "scopeName": "source.swift", + "fileTypes": [ + "swift" + ], + "name": "Swift", + "firstLineMatch": "^#!\\s*/.*\\bswift", + "patterns": [ + { + "name": "keyword.others.swift", + "match": "^\\s*(#if|#else|#endif|#elseif|@warn_unused_result|@discardableResult|@IBAction|@IBOutlet|@IBDesignable|@IBInspectable)\\b" + }, + { + "name": "keyword.declaration.swift", + "match": "\\b(deinit|import|init|subscript)\\b" + }, + { + "name": "storage.type.swift", + "match": "\\b(precedencegroup|class|struct|enum|extension|protocol|let|var|typealias)\\b" + }, + { + "name": "storage.modifier.swift", + "match": "\\b(final|internal|private|fileprivate|public|open|static|required|convenience)\\b" + }, + { + "name": "keyword.statement.swift", + "match": "\\b(try|catch|repeat|break|case|continue|default|do|else|fallthrough|if|in|for|return|switch|where|while|guard|defer)\\b" + }, + { + "name": "support.type.swift", + "match": "(?x) \\b(Character|U?Int|U?Int(8|16|32|64) |Float|Double|Float(32|64)|Bool|String|Date|Data|URL |(double|float)[234]|(double|float)[234]x[234] |Any |AnyObject |Error |Equatable |Hashable |Comparable |CustomDebugStringConvertible |CustomStringConvertible |OptionSet |ManagedBuffer |ManagedBufferPointer |BitwiseOperations |CountedSet |Counter |Directions |ExpressibleByArrayLiteral |ExpressibleByBooleanLiteral |ExpressibleByDictionaryLiteral |ExpressibleByExtendedGraphemeClusterLiteral |ExpressibleByFloatLitera |ExpressibleByIntegerLiteral |ExpressibleByNilLiteral |ExpressibleByStringInterpolation |ExpressibleByStringLiteral |ExpressibleByUnicodeScalarLiteral |OrderedSet |PaperSize |RawRepresentable |(UI|NS|CF|CG)[A-Z][a-zA-Z0-9]+ |Stream |(In|Out)putStream |FileManager |Array |Unsafe[a-zA-Z]*Pointer |Bundle |Jex)\\b" + }, + { + "name": "support.function.swift", + "match": "\\b(assert|assertionFailure|print)\\b" + }, + { + "name": "keyword.expressions-and-types.swift", + "match": "\\b(as|dynamicType|is|new|super|self|Self|Type|#column|#file|#function|#line)\\b" + }, + { + "name": "keyword.reserved.swift", + "match": "\\b(associativity|didSet|get|infix|inout|left|mutating|nonmutating|operator|override|postfix|precedence|prefix|right|set|unowned|unowned(safe)|unowned(unsafe)|weak|willSet)\\b" + }, + { + "name": "constant.language.swift", + "match": "\\b(true|false|nil|none)\\b" + }, + { + "name": "entity.name.function.swift", + "match": "\\bfunc\\s+([^\\t\\n\\x20\\x28]+)" + }, + { + "include": "#comment" + }, + { + "include": "#literal" + }, + { + "include": "#operator" + } + ], + "repository": { + "comment": { + "patterns": [ + { + "name": "comment.block.swift", + "begin": "/\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.swift" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.swift" + } + }, + "patterns": [ + { + "include": "#comment" + } + ] + }, + { + "begin": "(^[ \\t]+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.swift" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "name": "comment.line.double-slash.swift", + "begin": "//", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.swift" + } + }, + "end": "\\n", + "patterns": [ + { + "name": "punctuation.separator.continuation.swift", + "match": "(?>\\\\\\s*\\n)" + } + ] + } + ] + } + ] + }, + "escaped-char": { + "patterns": [ + { + "name": "constant.character.escape.swift", + "match": "\\\\[0\\\\tnr\"']" + }, + { + "name": "constant.character.escape.swift", + "match": "\\\\(x\\h{2}|u\\h{4}|U\\h{8})" + }, + { + "name": "invalid.illegal.constant.character.escape.swift", + "match": "\\\\[^uxU]" + } + ] + }, + "identifier": { + "match": "(?x) (? \\g \\g? | ` \\g \\g? ` ){0} (? [ a-z A-Z ] | [ \\u00A8 \\u00AA \\u00AD \\u00AF \\u00B2-\\u00B5 \\u00B7-\\u00BA ] | [ \\u00BC-\\u00BE \\u00C0-\\u00D6 \\u00D8-\\u00F6 \\u00F8-\\u00FF ] | [ \\u0100-\\u02FF \\u0370-\\u167F \\u1681-\\u180D \\u180F-\\u1DBF ] | [ \\u1E00-\\u1FFF ] | [ \\u200B-\\u200D \\u202A-\\u202E \\u203F-\\u2040 \\u2054 \\u2060-\\u206F ] | [ \\u2070-\\u20CF \\u2100-\\u218F \\u2460-\\u24FF \\u2776-\\u2793 ] | [ \\u2C00-\\u2DFF \\u2E80-\\u2FFF ] | [ \\u3004-\\u3007 \\u3021-\\u302F \\u3031-\\u303F \\u3040-\\uD7FF ] | [ \\uF900-\\uFD3D \\uFD40-\\uFDCF \\uFDF0-\\uFE1F \\uFE30-\\uFE44 ] | [ \\uFE47-\\uFFFD ] | [ \\u10000-\\u1FFFD \\u20000-\\u2FFFD \\u30000-\\u3FFFD \\u40000-\\u4FFFD ] | [ \\u50000-\\u5FFFD \\u60000-\\u6FFFD \\u70000-\\u7FFFD \\u80000-\\u8FFFD ] | [ \\u90000-\\u9FFFD \\uA0000-\\uAFFFD \\uB0000-\\uBFFFD \\uC0000-\\uCFFFD ] | [ \\uD0000-\\uDFFFD \\uE0000-\\uEFFFD ] ){0} (? \\d | [ \\u0300-\\u036F \\u1DC0-\\u1DFF \\u20D0-\\u20FF \\uFE20-\\uFE2F ] | \\g ){0} (? \\g \\g? ){0} (? (?) \\$ \\d+ (?!\\g) (?# FIXME) ){0} \\g | \\g", + "captures": { + "5": { + "name": "variable.other.positional.swift" + } + } + }, + "literal": { + "patterns": [ + { + "include": "#literal-number" + }, + { + "include": "#literal-string" + } + ] + }, + "literal-number": { + "name": "constant.numeric.swift", + "match": "(?x) (?### INTEGER ###) (? \\g | \\g | \\g | \\g ){0} (?### BINARY ###) (? \\b 0b \\g \\g? \\b ){0} (? [0-1] ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### OCTAL ###) (? \\b 0o \\g \\g? \\b ){0} (? [0-7] ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### DECIMAL ###) (? \\b \\g \\g? \\b ){0} (? \\d ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### HEXADECIMAL ###) (? \\b 0x \\g \\g? \\b ){0} (? \\h ){0} (? \\g | _ ){0} (? \\g \\g? ){0} (?### FLOATING POINT ###) (? \\b \\g \\g? \\g? \\b | \\b \\g \\g? \\g \\b ){0} (? \\. \\g ){0} (? \\g \\g? \\g ){0} (? \\. \\g? ){0} (? \\g \\g? \\g ){0} (? [eE] ){0} (? [pP] ){0} (? [+-] ){0} (?!0[box]) \\g | \\g" + }, + "literal-string": { + "name": "string.quoted.double.swift", + "begin": "\"", + "end": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.swift" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.swift" + } + }, + "patterns": [ + { + "include": "#quoted-text" + } + ] + }, + "operator": { + "patterns": [ + { + "include": "#operator-character" + } + ] + }, + "operator-character": { + "name": "keyword.operator.swift", + "match": "[\\/=\\-+!*%<>&|^~,\\?:\\[\\]]" + }, + "quoted-text": { + "patterns": [ + { + "name": "meta.embedded.line.swift", + "contentName": "source.swift", + "begin": "\\\\\\(", + "end": "\\)", + "beginCaptures": { + "0": { + "name": "punctuation.section.embedded.begin.swift" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.section.embedded.end.swift" + } + }, + "patterns": [ + { + "include": "$self" + } + ] + }, + { + "include": "#escaped-char" + } + ] + }, + "whitespace": { + "match": "(?x) [ \\u0020 (?# space) \\u000A (?# line-feed) \\u000D (?# carriage-return) \\u0009 (?# horizontal-tab) \\u000B (?# vertical-tab) \\u000C (?# form-feed) \\u0000 (?# null) ]" + } + }, + "version": "https://github.com/freebroccolo/atom-language-swift/commit/fb7c93e0174dea69c8685c00deeb53d480d1d202" +} \ No newline at end of file diff --git a/extensions/swift/test/colorize-results/test_swift.json b/extensions/swift/test/colorize-results/test_swift.json index f421ae1fba8e1..cf3e249352288 100644 --- a/extensions/swift/test/colorize-results/test_swift.json +++ b/extensions/swift/test/colorize-results/test_swift.json @@ -1,13 +1,13 @@ [ { "c": "var", - "t": "source.swift keyword.declaration.swift", + "t": "source.swift storage.type.swift", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "storage.type: #569CD6", + "light_plus": "storage.type: #0000FF", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type: #569CD6" } }, { @@ -56,13 +56,13 @@ }, { "c": "var", - "t": "source.swift keyword.declaration.swift", + "t": "source.swift storage.type.swift", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "storage.type: #569CD6", + "light_plus": "storage.type: #0000FF", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type: #569CD6" } }, { @@ -132,19 +132,41 @@ } }, { - "c": "func", - "t": "source.swift meta.function.swift storage.type.function.swift", + "c": "func hasAnyMatches", + "t": "source.swift entity.name.function.swift", "r": { - "dark_plus": "storage.type: #569CD6", - "light_plus": "storage.type: #0000FF", - "dark_vs": "storage.type: #569CD6", - "light_vs": "storage.type: #0000FF", - "hc_black": "storage.type: #569CD6" + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "entity.name.function: #DCDCAA" + } + }, + { + "c": "(list", + "t": "source.swift", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ":", + "t": "source.swift keyword.operator.swift", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" } }, { "c": " ", - "t": "source.swift meta.function.swift", + "t": "source.swift", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -154,19 +176,41 @@ } }, { - "c": "hasAnyMatches", - "t": "source.swift meta.function.swift entity.name.function.swift", + "c": "[", + "t": "source.swift keyword.operator.swift", "r": { - "dark_plus": "entity.name.function: #DCDCAA", - "light_plus": "entity.name.function: #795E26", + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": "Int", + "t": "source.swift support.type.swift", + "r": { + "dark_plus": "support.type: #4EC9B0", + "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "entity.name.function: #DCDCAA" + "hc_black": "support.type: #4EC9B0" } }, { - "c": "(", - "t": "source.swift meta.function.swift punctuation.definition.parameters.begin.swift", + "c": "],", + "t": "source.swift keyword.operator.swift", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " condition", + "t": "source.swift", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -176,8 +220,19 @@ } }, { - "c": "list: [Int], condition: (Int", - "t": "source.swift meta.function.swift", + "c": ":", + "t": "source.swift keyword.operator.swift", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, + { + "c": " (", + "t": "source.swift", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -187,8 +242,19 @@ } }, { - "c": ")", - "t": "source.swift meta.function.swift punctuation.definition.parameters.end.swift", + "c": "Int", + "t": "source.swift support.type.swift", + "r": { + "dark_plus": "support.type: #4EC9B0", + "light_plus": "support.type: #267F99", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "support.type: #4EC9B0" + } + }, + { + "c": ") ", + "t": "source.swift", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -197,9 +263,20 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "->", + "t": "source.swift keyword.operator.swift", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" + } + }, { "c": " ", - "t": "source.swift meta.function.swift", + "t": "source.swift", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -209,40 +286,62 @@ } }, { - "c": "->", - "t": "source.swift meta.function.swift meta.return-type.swift punctuation.function.swift", + "c": "Bool", + "t": "source.swift support.type.swift", "r": { - "dark_plus": "meta.return-type: #4EC9B0", - "light_plus": "meta.return-type: #267F99", + "dark_plus": "support.type: #4EC9B0", + "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "meta.return-type: #4EC9B0" + "hc_black": "support.type: #4EC9B0" + } + }, + { + "c": ") ", + "t": "source.swift", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "->", + "t": "source.swift keyword.operator.swift", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4" } }, { "c": " ", - "t": "source.swift meta.function.swift meta.return-type.swift", + "t": "source.swift", "r": { - "dark_plus": "meta.return-type: #4EC9B0", - "light_plus": "meta.return-type: #267F99", + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "meta.return-type: #4EC9B0" + "hc_black": "default: #FFFFFF" } }, { - "c": "Bool) -> Bool ", - "t": "source.swift meta.function.swift meta.return-type.swift entity.name.type.class.swift", + "c": "Bool", + "t": "source.swift support.type.swift", "r": { - "dark_plus": "entity.name.type: #4EC9B0", - "light_plus": "entity.name.type: #267F99", + "dark_plus": "support.type: #4EC9B0", + "light_plus": "support.type: #267F99", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "entity.name.type: #4EC9B0" + "hc_black": "support.type: #4EC9B0" } }, { - "c": "{", + "c": " {", "t": "source.swift", "r": { "dark_plus": "default: #D4D4D4", @@ -375,13 +474,13 @@ }, { "c": "true", - "t": "source.swift keyword.expressions-and-types.swift", + "t": "source.swift constant.language.swift", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "constant.language: #569CD6", + "light_plus": "constant.language: #0000FF", + "dark_vs": "constant.language: #569CD6", + "light_vs": "constant.language: #0000FF", + "hc_black": "constant.language: #569CD6" } }, { @@ -441,13 +540,13 @@ }, { "c": "false", - "t": "source.swift keyword.expressions-and-types.swift", + "t": "source.swift constant.language.swift", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "constant.language: #569CD6", + "light_plus": "constant.language: #0000FF", + "dark_vs": "constant.language: #569CD6", + "light_vs": "constant.language: #0000FF", + "hc_black": "constant.language: #569CD6" } }, { From 3d581324cbea1717475a0ac64d3c5e7c69599f98 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 May 2017 15:39:29 +0200 Subject: [PATCH 0705/2747] [xml] update grammar --- extensions/xml/syntaxes/xml.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/extensions/xml/syntaxes/xml.json b/extensions/xml/syntaxes/xml.json index 8237ae9f31582..fb780f0f611a9 100644 --- a/extensions/xml/syntaxes/xml.json +++ b/extensions/xml/syntaxes/xml.json @@ -2,6 +2,7 @@ "scopeName": "text.xml", "name": "XML", "fileTypes": [ + "aiml", "atom", "axml", "bpmn", @@ -21,6 +22,7 @@ "fodt", "fsproj", "fxml", + "gir", "glade", "gpx", "graphml", @@ -29,6 +31,7 @@ "isml", "jmx", "jsp", + "kst", "launch", "menu", "mxml", @@ -44,7 +47,10 @@ "rdf", "rng", "rss", + "sdf", "shproj", + "siml", + "sld", "storyboard", "svg", "targets", @@ -57,7 +63,12 @@ "vcproj.filters", "vcxproj", "vcxproj.filters", + "wixmsp", + "wixmst", + "wixobj", + "wixout", "wsdl", + "wxs", "xaml", "xbl", "xib", @@ -69,6 +80,7 @@ "xul", "ui" ], + "firstLineMatch": "(?x)\n# XML declaration\n(?:\n ^ <\\? xml\n\n # VersionInfo\n \\s+ version\n \\s* = \\s*\n (['\"])\n 1 \\. [0-9]+\n \\1\n\n # EncodingDecl\n (?:\n \\s+ encoding\n \\s* = \\s*\n\n # EncName\n (['\"])\n [A-Za-z]\n [-A-Za-z0-9._]*\n \\2\n )?\n\n # SDDecl\n (?:\n \\s+ standalone\n \\s* = \\s*\n (['\"])\n (?:yes|no)\n \\3\n )?\n\n \\s* \\?>\n)\n|\n# Modeline\n(?i:\n # Emacs\n -\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)\n xml\n (?=[\\s;]|(?]?\\d+|m)?|\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s*set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=\n xml\n (?=\\s|:|$)\n)", "patterns": [ { "begin": "(<\\?)\\s*([-_a-zA-Z0-9]+)", @@ -422,5 +434,5 @@ "name": "comment.block.xml" } }, - "version": "https://github.com/atom/language-xml/commit/f461d428fb87040cb8a52d87d0b95151b9d3c0cc" + "version": "https://github.com/atom/language-xml/commit/ac6bc8ef6a9c79ac3c7e31615bc18436b0c815ab" } \ No newline at end of file From 6ea2875834bbcd9a9a5f41b42fd0ba93f82da962 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 15:47:21 +0200 Subject: [PATCH 0706/2747] tfs: fix global variable access --- build/tfs/win32/1_build.ps1 | 8 ++++---- build/tfs/win32/2_package.ps1 | 2 +- build/tfs/win32/3_upload.ps1 | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index 2eb997017489b..85143023e72dc 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -13,7 +13,7 @@ $env:HOME=$env:USERPROFILE "machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII step "Install dependencies" { - exec { & npm install "--arch=$arch" } + exec { & npm install "--arch=$global:arch" } } $env:VSCODE_MIXIN_PASSWORD = $mixinPassword @@ -22,15 +22,15 @@ step "Mix in repository from vscode-distro" { } step "Get Electron" { - exec { & npm run gulp -- "electron-$arch" } + exec { & npm run gulp -- "electron-$global:arch" } } step "Install distro dependencies" { - exec { & node build\tfs\common\installDistro.js "--arch=$arch" } + exec { & node build\tfs\common\installDistro.js "--arch=$global:arch" } } step "Build minified" { - exec { & npm run gulp -- --max_old_space_size=4096 "vscode-win32-$arch-min" } + exec { & npm run gulp -- --max_old_space_size=4096 "vscode-win32-$global:arch-min" } } step "Run unit tests" { diff --git a/build/tfs/win32/2_package.ps1 b/build/tfs/win32/2_package.ps1 index beaa816e0e43b..63d7c9cc4129e 100644 --- a/build/tfs/win32/2_package.ps1 +++ b/build/tfs/win32/2_package.ps1 @@ -5,7 +5,7 @@ Param( . .\build\tfs\win32\lib.ps1 step "Create archive and setup package" { - exec { & npm run gulp -- --max_old_space_size=4096 "vscode-win32-$arch-archive" "vscode-win32-$arch-setup" } + exec { & npm run gulp -- --max_old_space_size=4096 "vscode-win32-$global:arch-archive" "vscode-win32-$global:arch-setup" } } done \ No newline at end of file diff --git a/build/tfs/win32/3_upload.ps1 b/build/tfs/win32/3_upload.ps1 index 7eb99c4a54125..120865455976a 100644 --- a/build/tfs/win32/3_upload.ps1 +++ b/build/tfs/win32/3_upload.ps1 @@ -22,11 +22,11 @@ $env:MOONCAKE_STORAGE_ACCESS_KEY = $mooncakeStorageKey $env:AZURE_DOCUMENTDB_MASTERKEY = $documentDbKey step "Publish archive" { - exec { & node build/tfs/common/publish.js $Quality win32-archive archive "VSCode-win32-$arch-$Version.zip" $Version true $Zip } + exec { & node build/tfs/common/publish.js $Quality win32-archive archive "VSCode-win32-$global:arch-$Version.zip" $Version true $Zip } } step "Publish setup package" { - exec { & node build/tfs/common/publish.js $Quality win32 setup "VSCodeSetup-$arch-$Version.exe" $Version true $Exe } + exec { & node build/tfs/common/publish.js $Quality win32 setup "VSCodeSetup-$global:arch-$Version.exe" $Version true $Exe } } done \ No newline at end of file From a6afd646f6cd3fad3f435dc80cb332c2d1294fc4 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 18 May 2017 15:50:47 +0200 Subject: [PATCH 0707/2747] send more data about cached data rejection --- .../electron-browser/nodeCachedDataManager.ts | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/src/vs/workbench/electron-browser/nodeCachedDataManager.ts b/src/vs/workbench/electron-browser/nodeCachedDataManager.ts index 0d35516eb40e3..6867f109c80e4 100644 --- a/src/vs/workbench/electron-browser/nodeCachedDataManager.ts +++ b/src/vs/workbench/electron-browser/nodeCachedDataManager.ts @@ -12,6 +12,8 @@ import { readdir, rimraf, stat } from 'vs/base/node/pfs'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; +declare type OnNodeCachedDataArgs = [{ errorCode: string, path: string, detail?: string }, { path: string, length: number }]; +declare const MonacoEnvironment: { onNodeCachedData: OnNodeCachedDataArgs[] }; export class NodeCachedDataManager { @@ -35,25 +37,32 @@ export class NodeCachedDataManager { } private _handleCachedDataInfo(): void { - const onNodeCachedData = (err, data) => { - if (err) { - this._telemetryService.publicLog('nodeCachedData', { errorCode: err.errorCode, path: basename(err.path) }); - } else if (data) { - this._telemetryService.publicLog('nodeCachedDataProduced', { path: basename(data.path) }); - } - }; - // handle future and past errors - (self).require.config({ onNodeCachedData }); - ((window).MonacoEnvironment.onNodeCachedData).forEach(args => onNodeCachedData.apply(undefined, args)); - delete (window).MonacoEnvironment.onNodeCachedData; + let didRejectCachedData = false; + let didProduceCachedData = false; + for (const [err, data] of MonacoEnvironment.onNodeCachedData) { + // build summary + didRejectCachedData = didRejectCachedData || Boolean(err); + didProduceCachedData = didProduceCachedData || Boolean(data); - // stop when being disposed - this._disposables.push({ - dispose() { - (self).require.config({ onNodeCachedData: undefined }, true); + // log each failure separately + if (err) { + this._telemetryService.publicLog('cachedDataError', { + errorCode: err.errorCode, + path: basename(err.path) + }); } + } + + // log summary + this._telemetryService.publicLog('cachedDataInfo', { + didRequestCachedData: Boolean(global.require.getConfig().nodeCachedDataDir), + didRejectCachedData, + didProduceCachedData }); + + global.require.config({ onNodeCachedData: undefined }); + delete MonacoEnvironment.onNodeCachedData; } private _manageCachedDataSoon(): void { From 77d9f925d4b01c0fd5db7dfc2cef383d4d8fc7e5 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 15:52:32 +0200 Subject: [PATCH 0708/2747] tfs: publish x64 correctly --- build/tfs/win32/3_upload.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/tfs/win32/3_upload.ps1 b/build/tfs/win32/3_upload.ps1 index 120865455976a..3f23b6d1831bd 100644 --- a/build/tfs/win32/3_upload.ps1 +++ b/build/tfs/win32/3_upload.ps1 @@ -21,12 +21,14 @@ $env:AZURE_STORAGE_ACCESS_KEY_2 = $storageKey $env:MOONCAKE_STORAGE_ACCESS_KEY = $mooncakeStorageKey $env:AZURE_DOCUMENTDB_MASTERKEY = $documentDbKey +$assetPlatform = if ($arch -eq "ia32") { "win32" } else { "win32-x64" } + step "Publish archive" { - exec { & node build/tfs/common/publish.js $Quality win32-archive archive "VSCode-win32-$global:arch-$Version.zip" $Version true $Zip } + exec { & node build/tfs/common/publish.js $Quality "$global:assetPlatform-archive" archive "VSCode-win32-$global:arch-$Version.zip" $Version true $Zip } } step "Publish setup package" { - exec { & node build/tfs/common/publish.js $Quality win32 setup "VSCodeSetup-$global:arch-$Version.exe" $Version true $Exe } + exec { & node build/tfs/common/publish.js $Quality "$global:assetPlatform" setup "VSCodeSetup-$global:arch-$Version.exe" $Version true $Exe } } done \ No newline at end of file From 258bde4ce449c91686938ad6c88194cef74e53cd Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 16:02:40 +0200 Subject: [PATCH 0709/2747] fix es6 --- build/gulpfile.vscode.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index cc301600b2c11..d4effb3d819a6 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -136,7 +136,7 @@ const config = { repo: product.electronRepository || void 0 }; -function getElectron(arch = process.arch) { +function getElectron(arch) { return () => { const electronOpts = _.extend({}, config, { platform: process.platform, @@ -154,7 +154,7 @@ function getElectron(arch = process.arch) { } gulp.task('clean-electron', util.rimraf('.build/electron')); -gulp.task('electron', ['clean-electron'], getElectron()); +gulp.task('electron', ['clean-electron'], getElectron(process.arch)); gulp.task('electron-ia32', ['clean-electron'], getElectron('ia32')); gulp.task('electron-x64', ['clean-electron'], getElectron('x64')); @@ -194,7 +194,9 @@ function computeChecksum(filename) { return hash; } -function packageTask(platform, arch, opts = {}) { +function packageTask(platform, arch, opts) { + opts = opts || {}; + const destination = path.join(path.dirname(root), 'VSCode') + (platform ? '-' + platform : '') + (arch ? '-' + arch : ''); platform = platform || process.platform; arch = platform === 'win32' ? 'ia32' : arch; From d38e24558edfc7237796413d53e3c9c45c2cb0b4 Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 18 May 2017 16:12:41 +0200 Subject: [PATCH 0710/2747] scm: install additional scm providers fixes #25696 --- .../scm/electron-browser/scm.contribution.ts | 14 +++++++- .../parts/scm/electron-browser/scmMenus.ts | 32 +++++++++++++++---- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts index 2646a7185f3ab..68cf1af577581 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts @@ -17,6 +17,7 @@ import { VIEWLET_ID } from 'vs/workbench/parts/scm/common/scm'; import { IWorkbenchActionRegistry, Extensions as WorkbenchActionExtensions } from 'vs/workbench/common/actionRegistry'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; +import { IExtensionsViewlet, VIEWLET_ID as EXTENSIONS_VIEWLET_ID } from 'vs/workbench/parts/extensions/common/extensions'; import { ISCMService } from 'vs/workbench/services/scm/common/scm'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; @@ -41,7 +42,8 @@ export class SwitchProvider extends Action { id = SwitchProvider.ID, label = SwitchProvider.LABEL, @ISCMService private scmService: ISCMService, - @IQuickOpenService private quickOpenService: IQuickOpenService + @IQuickOpenService private quickOpenService: IQuickOpenService, + @IViewletService private viewletService: IViewletService ) { super('scm.switchprovider', 'Switch SCM Provider', '', true); } @@ -51,6 +53,16 @@ export class SwitchProvider extends Action { label: provider.label, run: () => this.scmService.activeProvider = provider })); + picks.push({ + label: localize('installAdditionalSCMProviders', "Install Additional SCM Providers..."), run: () => { + this.viewletService.openViewlet(EXTENSIONS_VIEWLET_ID, true).then(viewlet => viewlet as IExtensionsViewlet) + .then(viewlet => { + viewlet.search('category:"SCM Providers" @sort:installs'); + viewlet.focus(); + }); + return this.scmService.activeProvider; + } + }); return this.quickOpenService.pick(picks); } diff --git a/src/vs/workbench/parts/scm/electron-browser/scmMenus.ts b/src/vs/workbench/parts/scm/electron-browser/scmMenus.ts index f5cb2241de70b..bfea5b8df9b91 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmMenus.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmMenus.ts @@ -16,6 +16,8 @@ import { IAction, Action } from 'vs/base/common/actions'; import { fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; import { ContextSubMenu } from 'vs/platform/contextview/browser/contextView'; import { Separator } from 'vs/base/browser/ui/actionbar/actionbar'; +import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; +import { IExtensionsViewlet, VIEWLET_ID as EXTENSIONS_VIEWLET_ID } from 'vs/workbench/parts/extensions/common/extensions'; import { ISCMService, ISCMProvider, ISCMResource, ISCMResourceGroup } from 'vs/workbench/services/scm/common/scm'; import { getSCMResourceContextKey } from './scmUtil'; @@ -38,6 +40,21 @@ class SwitchProviderAction extends Action { } } +class InstallAdditionalSCMProviders extends Action { + + constructor(private viewletService: IViewletService) { + super('scm.installAdditionalSCMProviders', localize('installAdditionalSCMProviders', "Install Additional SCM Providers..."), '', true); + } + + run(): TPromise { + return this.viewletService.openViewlet(EXTENSIONS_VIEWLET_ID, true).then(viewlet => viewlet as IExtensionsViewlet) + .then(viewlet => { + viewlet.search('category:"SCM Providers" @sort:installs'); + viewlet.focus(); + }); + } +} + export class SCMMenus implements IDisposable { private disposables: IDisposable[] = []; @@ -52,7 +69,8 @@ export class SCMMenus implements IDisposable { constructor( @IContextKeyService private contextKeyService: IContextKeyService, @ISCMService private scmService: ISCMService, - @IMenuService private menuService: IMenuService + @IMenuService private menuService: IMenuService, + @IViewletService private viewletService: IViewletService ) { this.setActiveProvider(this.scmService.activeProvider); this.scmService.onDidChangeProvider(this.setActiveProvider, this, this.disposables); @@ -92,7 +110,7 @@ export class SCMMenus implements IDisposable { } getTitleSecondaryActions(): IAction[] { - const providerSwitchActions = this.scmService.providers + const providerSwitchActions: IAction[] = this.scmService.providers .map(p => new SwitchProviderAction(p, this.scmService)); let result = []; @@ -100,14 +118,16 @@ export class SCMMenus implements IDisposable { if (this.titleSecondaryActions.length > 0) { result = result.concat(this.titleSecondaryActions); } + if (providerSwitchActions.length > 0) { + providerSwitchActions.push(new Separator()); + } + providerSwitchActions.push(new InstallAdditionalSCMProviders(this.viewletService)); - if (result.length > 0 && providerSwitchActions.length > 0) { + if (result.length > 0) { result.push(new Separator()); } - if (providerSwitchActions.length > 0) { - result.push(new ContextSubMenu(localize('switch provider', "Switch SCM Provider..."), providerSwitchActions)); - } + result.push(new ContextSubMenu(localize('switch provider', "Switch SCM Provider..."), providerSwitchActions)); return result; } From 54b983873d2d7224a976007f98bf6c9f0809996a Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 18 May 2017 16:12:48 +0200 Subject: [PATCH 0711/2747] add restored viewlet and count of restored editors to workspaceLoad-event --- src/vs/workbench/electron-browser/shell.ts | 4 +++- src/vs/workbench/electron-browser/workbench.ts | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 59955d7004984..5753c9c97b9e3 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -235,7 +235,9 @@ export class WorkbenchShell { theme: this.themeService.getColorTheme().id, language: platform.language, experiments: this.telemetryService.getExperiments(), - pinnedViewlets: info.pinnedViewlets + pinnedViewlets: info.pinnedViewlets, + restoredViewlet: info.restoredViewlet, + restoredEditors: info.restoredEditors.length }); // Telemetry: startup metrics diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 35a31823fd00d..56f626450b753 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -120,6 +120,8 @@ export interface IWorkbenchStartedInfo { restoreViewletDuration: number; restoreEditorsDuration: number; pinnedViewlets: string[]; + restoredViewlet: string; + restoredEditors: string[]; } export interface IWorkbenchCallbacks { @@ -294,8 +296,8 @@ export class Workbench implements IPartService { // Restore last opened viewlet let viewletRestoreStopWatch: StopWatch; + let viewletIdToRestore: string; if (!this.sideBarHidden) { - let viewletIdToRestore: string; if (this.shouldRestoreLastOpenedViewlet()) { viewletIdToRestore = this.storageService.get(SidebarPart.activeViewletSettingsKey, StorageScope.WORKSPACE); @@ -321,6 +323,7 @@ export class Workbench implements IPartService { // Load Editors const editorRestoreStopWatch = StopWatch.create(); + const restoredEditors: string[] = []; compositeAndEditorPromises.push(this.resolveEditorsToOpen().then(inputs => { let editorOpenPromise: TPromise; if (inputs.length) { @@ -329,9 +332,16 @@ export class Workbench implements IPartService { editorOpenPromise = this.editorPart.restoreEditors(); } - return editorOpenPromise.then(() => { + return editorOpenPromise.then(editors => { this.onEditorsChanged(); // make sure we show the proper background in the editor area editorRestoreStopWatch.stop(); + for (const editor of editors) { + if (editor.input) { + restoredEditors.push(editor.input.getName()); + } else { + restoredEditors.push(`other:${editor.getId()}`); + } + } }); })); @@ -350,6 +360,8 @@ export class Workbench implements IPartService { restoreViewletDuration: viewletRestoreStopWatch ? Math.round(viewletRestoreStopWatch.elapsed()) : 0, restoreEditorsDuration: Math.round(editorRestoreStopWatch.elapsed()), pinnedViewlets: this.activitybarPart.getPinned(), + restoredViewlet: viewletIdToRestore, + restoredEditors }); } From 75650c1790a4d58b9f4d0c2deb746416a0dca989 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 18 May 2017 16:38:10 +0200 Subject: [PATCH 0712/2747] don't cancel snippet mode when inserting a nested snippet, fixes #26869 --- .../snippet/browser/snippetController2.ts | 21 +++++++++++-------- .../contrib/snippet/browser/snippetSession.ts | 12 +++++++++++ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 329caa67f7b91..1b31742753b4e 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -57,21 +57,24 @@ export class SnippetController2 { overwriteBefore: number = 0, overwriteAfter: number = 0, undoStopBefore: boolean = true, undoStopAfter: boolean = true ): void { - if (this._snippet) { - this.cancel(); - } - this._snippet = new SnippetSession(this._editor, template, overwriteBefore, overwriteAfter); if (undoStopBefore) { this._editor.getModel().pushStackElement(); } - this._snippet.insert(); + if (!this._snippet) { + // insert with new session + this._snippet = new SnippetSession(this._editor, template, overwriteBefore, overwriteAfter); + this._snippet.insert(); + this._snippetListener = [ + this._editor.onDidChangeModel(() => this.cancel()), + this._editor.onDidChangeCursorSelection(() => this._updateState()) + ]; + } else { + // insert nested + this._snippet.insertNested(template, overwriteBefore, overwriteAfter); + } if (undoStopAfter) { this._editor.getModel().pushStackElement(); } - this._snippetListener = [ - this._editor.onDidChangeModel(() => this.cancel()), - this._editor.onDidChangeCursorSelection(() => this._updateState()) - ]; this._updateState(); } diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index 5a5b590f93c24..2b2c9ca44f26c 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -291,6 +291,18 @@ export class SnippetSession { this._editor.setSelections(newSelections); } + insertNested(template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): void { + const { edits } = SnippetSession.makeInsertEditsAndSnippets( + this._editor, template, overwriteBefore, overwriteAfter + ); + const model = this._editor.getModel(); + const selections = this._editor.getSelections(); + const newSelections = model.pushEditOperations(selections, edits, () => { + return this._move(true); + }); + this._editor.setSelections(newSelections); + } + next(): void { const newSelections = this._move(true); this._editor.setSelections(newSelections); From 1a285f35608b6391fa46aa131708196730bab238 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 16:44:02 +0200 Subject: [PATCH 0713/2747] tfs: publish setup only ia32 --- build/tfs/win32/3_upload.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/tfs/win32/3_upload.ps1 b/build/tfs/win32/3_upload.ps1 index 3f23b6d1831bd..f430e0d8c9406 100644 --- a/build/tfs/win32/3_upload.ps1 +++ b/build/tfs/win32/3_upload.ps1 @@ -27,8 +27,10 @@ step "Publish archive" { exec { & node build/tfs/common/publish.js $Quality "$global:assetPlatform-archive" archive "VSCode-win32-$global:arch-$Version.zip" $Version true $Zip } } -step "Publish setup package" { - exec { & node build/tfs/common/publish.js $Quality "$global:assetPlatform" setup "VSCodeSetup-$global:arch-$Version.exe" $Version true $Exe } +if ($arch -eq "ia32") { + step "Publish setup package" { + exec { & node build/tfs/common/publish.js $Quality "$global:assetPlatform" setup "VSCodeSetup-$global:arch-$Version.exe" $Version true $Exe } + } } done \ No newline at end of file From 735d63c5d8ffd2d4449d4317fdfbee819fc71795 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 16:49:45 +0200 Subject: [PATCH 0714/2747] tfs: remove bad arch --- build/gulpfile.vscode.js | 1 - 1 file changed, 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index d4effb3d819a6..f91e140fd96c2 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -199,7 +199,6 @@ function packageTask(platform, arch, opts) { const destination = path.join(path.dirname(root), 'VSCode') + (platform ? '-' + platform : '') + (arch ? '-' + arch : ''); platform = platform || process.platform; - arch = platform === 'win32' ? 'ia32' : arch; return () => { const out = opts.minified ? 'out-vscode-min' : 'out-vscode'; From e637dd32284b3a49f74df5854dbd748d09b27d5c Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 18 May 2017 16:49:48 +0200 Subject: [PATCH 0715/2747] send telemetry when an update is available --- src/vs/platform/update/electron-main/updateService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/platform/update/electron-main/updateService.ts b/src/vs/platform/update/electron-main/updateService.ts index 77ef33d20fe48..aa3f75c6d5140 100644 --- a/src/vs/platform/update/electron-main/updateService.ts +++ b/src/vs/platform/update/electron-main/updateService.ts @@ -177,6 +177,7 @@ export class UpdateService implements IUpdateService { this._availableUpdate = data; this._onUpdateAvailable.fire({ url: update.url, version: update.version }); this.state = State.UpdateAvailable; + this.telemetryService.publicLog('update:available', { explicit, version: update.version, currentVersion: product.commit }); } else { const data: IUpdate = { From 1429328d16c56068a6471ca56feb3806864291f2 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 18 May 2017 17:06:30 +0200 Subject: [PATCH 0716/2747] tfs: fix 32 bit --- build/tfs/win32/1_build.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index 85143023e72dc..0f473ddeff5a0 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -12,8 +12,11 @@ Param( $env:HOME=$env:USERPROFILE "machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII +# Set the right architecture +$env:npm_config_arch="$arch" + step "Install dependencies" { - exec { & npm install "--arch=$global:arch" } + exec { & npm install } } $env:VSCODE_MIXIN_PASSWORD = $mixinPassword @@ -26,7 +29,7 @@ step "Get Electron" { } step "Install distro dependencies" { - exec { & node build\tfs\common\installDistro.js "--arch=$global:arch" } + exec { & node build\tfs\common\installDistro.js } } step "Build minified" { From 3d1a0cc23ca943fd7a48c5300665e39a83665246 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 18 May 2017 17:12:45 +0200 Subject: [PATCH 0717/2747] Name polish for editor.showFoldingControls (#4812) --- src/vs/editor/common/config/commonEditorConfig.ts | 9 +++++---- src/vs/editor/common/config/editorOptions.ts | 14 +++++++------- src/vs/editor/contrib/folding/browser/folding.ts | 12 ++++++------ src/vs/monaco.d.ts | 8 ++++---- 4 files changed, 22 insertions(+), 21 deletions(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index f1830ec4f7800..f541796f5c52a 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -486,10 +486,11 @@ const editorConfiguration: IConfigurationNode = { 'default': EDITOR_DEFAULTS.contribInfo.folding, 'description': nls.localize('folding', "Controls whether the editor has code folding enabled") }, - 'editor.hideFoldIcons': { - 'type': 'boolean', - 'default': EDITOR_DEFAULTS.contribInfo.hideFoldIcons, - 'description': nls.localize('hideFoldIcons', "Controls whether the fold icons on the gutter are automatically hidden.") + 'editor.showFoldingControls': { + 'type': 'string', + 'enum': ['always', 'mouseover'], + 'default': EDITOR_DEFAULTS.contribInfo.showFoldingControls, + 'description': nls.localize('showFoldingControls', "Controls whether the fold controls on the gutter are automatically hidden.") }, 'editor.matchBrackets': { 'type': 'boolean', diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 5c43033f67aba..ce5208a05231f 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -420,10 +420,10 @@ export interface IEditorOptions { */ folding?: boolean; /** - * Enable automatic hiding of non-collapsed fold icons in the gutter. - * Defaults to true. + * Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter. + * Defaults to 'mouseover'. */ - hideFoldIcons?: boolean; + showFoldingControls?: 'always' | 'mouseover'; /** * Enable highlighting of matching brackets. * Defaults to true. @@ -736,7 +736,7 @@ export interface EditorContribOptions { readonly occurrencesHighlight: boolean; readonly codeLens: boolean; readonly folding: boolean; - readonly hideFoldIcons: boolean; + readonly showFoldingControls: 'always' | 'mouseover'; readonly matchBrackets: boolean; } @@ -1045,7 +1045,7 @@ export class InternalEditorOptions { && a.occurrencesHighlight === b.occurrencesHighlight && a.codeLens === b.codeLens && a.folding === b.folding - && a.hideFoldIcons === b.hideFoldIcons + && a.showFoldingControls === b.showFoldingControls && a.matchBrackets === b.matchBrackets ); } @@ -1542,7 +1542,7 @@ export class EditorOptionsValidator { occurrencesHighlight: _boolean(opts.occurrencesHighlight, defaults.occurrencesHighlight), codeLens: _boolean(opts.codeLens, defaults.codeLens) && _boolean(opts.referenceInfos, true), folding: _boolean(opts.folding, defaults.folding), - hideFoldIcons: _boolean(opts.hideFoldIcons, defaults.hideFoldIcons), + showFoldingControls: _stringSet<'always' | 'mouseover'>(opts.showFoldingControls, defaults.showFoldingControls, ['always', 'mouseover']), matchBrackets: _boolean(opts.matchBrackets, defaults.matchBrackets), }; } @@ -1949,7 +1949,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { occurrencesHighlight: true, codeLens: true, folding: true, - hideFoldIcons: true, + showFoldingControls: 'mouseover', matchBrackets: true, }, }; diff --git a/src/vs/editor/contrib/folding/browser/folding.ts b/src/vs/editor/contrib/folding/browser/folding.ts index 24fe018b8de11..f89d26c653607 100644 --- a/src/vs/editor/contrib/folding/browser/folding.ts +++ b/src/vs/editor/contrib/folding/browser/folding.ts @@ -36,7 +36,7 @@ export class FoldingController implements IFoldingController { private editor: ICodeEditor; private _isEnabled: boolean; - private _hideFoldIcons: boolean; + private _showFoldingControls: 'always' | 'mouseover'; private globalToDispose: IDisposable[]; private computeToken: number; @@ -49,7 +49,7 @@ export class FoldingController implements IFoldingController { constructor(editor: ICodeEditor) { this.editor = editor; this._isEnabled = this.editor.getConfiguration().contribInfo.folding; - this._hideFoldIcons = this.editor.getConfiguration().contribInfo.hideFoldIcons; + this._showFoldingControls = this.editor.getConfiguration().contribInfo.showFoldingControls; this.globalToDispose = []; this.localToDispose = []; @@ -63,9 +63,9 @@ export class FoldingController implements IFoldingController { if (oldIsEnabled !== this._isEnabled) { this.onModelChanged(); } - let oldHideFoldIcons = this._hideFoldIcons; - this._hideFoldIcons = this.editor.getConfiguration().contribInfo.hideFoldIcons; - if (oldHideFoldIcons !== this._hideFoldIcons) { + let oldShowFoldingControls = this._showFoldingControls; + this._showFoldingControls = this.editor.getConfiguration().contribInfo.showFoldingControls; + if (oldShowFoldingControls !== this._showFoldingControls) { this.updateHideFoldIconClass(); } })); @@ -85,7 +85,7 @@ export class FoldingController implements IFoldingController { private updateHideFoldIconClass(): void { let domNode = this.editor.getDomNode(); if (domNode) { - dom.toggleClass(domNode, 'alwaysShowFoldIcons', this._hideFoldIcons === false); + dom.toggleClass(domNode, 'alwaysShowFoldIcons', this._showFoldingControls === 'always'); } } diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index a06eec92796f4..140e5d7e7ae12 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2978,10 +2978,10 @@ declare module monaco.editor { */ folding?: boolean; /** - * Enable automatic hiding of non-collapsed fold icons in the gutter. - * Defaults to true. + * Controls whether the fold actions in the gutter stay always visible or hide unless the mouse is over the gutter. + * Defaults to 'mouseover'. */ - hideFoldIcons?: boolean; + showFoldingControls?: 'always' | 'mouseover'; /** * Enable highlighting of matching brackets. * Defaults to true. @@ -3239,7 +3239,7 @@ declare module monaco.editor { readonly occurrencesHighlight: boolean; readonly codeLens: boolean; readonly folding: boolean; - readonly hideFoldIcons: boolean; + readonly showFoldingControls: 'always' | 'mouseover'; readonly matchBrackets: boolean; } From 7371cfd703f041a1c3ab25450d5afd21ca386504 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 18 May 2017 17:33:36 +0200 Subject: [PATCH 0718/2747] add ILifecycleService#startupKind --- src/vs/code/electron-main/lifecycle.ts | 10 ++--- src/vs/platform/lifecycle/common/lifecycle.ts | 28 +++++++++---- src/vs/workbench/electron-browser/shell.ts | 5 ++- .../electron-browser/lifecycleService.ts | 42 ++++++++++++++----- .../workbench/test/workbenchTestServices.ts | 5 ++- 5 files changed, 64 insertions(+), 26 deletions(-) diff --git a/src/vs/code/electron-main/lifecycle.ts b/src/vs/code/electron-main/lifecycle.ts index 7623a9170868b..895f8b056846c 100644 --- a/src/vs/code/electron-main/lifecycle.ts +++ b/src/vs/code/electron-main/lifecycle.ts @@ -17,10 +17,10 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' export const ILifecycleService = createDecorator('lifecycleService'); export enum UnloadReason { - CLOSE, - QUIT, - RELOAD, - LOAD + CLOSE = 1, + QUIT = 2, + RELOAD = 3, + LOAD = 4 } export interface ILifecycleService { @@ -264,4 +264,4 @@ export class LifecycleService implements ILifecycleService { public isQuitRequested(): boolean { return !!this.quitRequested; } -} \ No newline at end of file +} diff --git a/src/vs/platform/lifecycle/common/lifecycle.ts b/src/vs/platform/lifecycle/common/lifecycle.ts index d6fdf34ddb569..1cd1ab93cea11 100644 --- a/src/vs/platform/lifecycle/common/lifecycle.ts +++ b/src/vs/platform/lifecycle/common/lifecycle.ts @@ -26,16 +26,22 @@ export interface ShutdownEvent { export enum ShutdownReason { /** Window is closed */ - CLOSE, + CLOSE = 1, /** Application is quit */ - QUIT, + QUIT = 2, /** Window is reloaded */ - RELOAD, + RELOAD = 3, /** Other configuration loaded into window */ - LOAD + LOAD = 4 +} + +export enum StartupKind { + NewWindow = 1, + ReloadedWindow = 3, + ReopenedWindow = 4, } /** @@ -46,17 +52,22 @@ export interface ILifecycleService { _serviceBrand: any; + /** + * Value indicates how this window got loaded. + */ + readonly startupKind: StartupKind; + /** * A flag indicating if the application is in the process of shutting down. This will be true * before the onWillShutdown event is fired and false if the shutdown is being vetoed. */ - willShutdown: boolean; + readonly willShutdown: boolean; /** * Fired before shutdown happens. Allows listeners to veto against the * shutdown. */ - onWillShutdown: Event; + readonly onWillShutdown: Event; /** * Fired when no client is preventing the shutdown from happening. Can be used to dispose heavy resources @@ -64,12 +75,13 @@ export interface ILifecycleService { * * The event carries a shutdown reason that indicates how the shutdown was triggered. */ - onShutdown: Event; + readonly onShutdown: Event; } export const NullLifecycleService: ILifecycleService = { _serviceBrand: null, + startupKind: StartupKind.NewWindow, willShutdown: false, onWillShutdown: () => ({ dispose() { } }), onShutdown: (reason) => ({ dispose() { } }) -}; \ No newline at end of file +}; diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 5753c9c97b9e3..1f25faacf4303 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -132,6 +132,7 @@ export class WorkbenchShell { private windowIPCService: IWindowIPCService; private timerService: ITimerService; private themeService: WorkbenchThemeService; + private lifecycleService: ILifecycleService; private container: HTMLElement; private toUnbind: IDisposable[]; @@ -237,7 +238,8 @@ export class WorkbenchShell { experiments: this.telemetryService.getExperiments(), pinnedViewlets: info.pinnedViewlets, restoredViewlet: info.restoredViewlet, - restoredEditors: info.restoredEditors.length + restoredEditors: info.restoredEditors.length, + startupKind: this.lifecycleService.startupKind }); // Telemetry: startup metrics @@ -357,6 +359,7 @@ export class WorkbenchShell { this.toUnbind.push(lifecycleService.onShutdown(reason => saveFontInfo(this.storageService))); serviceCollection.set(ILifecycleService, lifecycleService); disposables.add(lifecycleTelemetry(this.telemetryService, lifecycleService)); + this.lifecycleService = lifecycleService; const extensionManagementChannel = getDelayedChannel(sharedProcess.then(c => c.getChannel('extensions'))); serviceCollection.set(IExtensionManagementService, new SyncDescriptor(ExtensionManagementChannelClient, extensionManagementChannel)); diff --git a/src/vs/workbench/services/lifecycle/electron-browser/lifecycleService.ts b/src/vs/workbench/services/lifecycle/electron-browser/lifecycleService.ts index 105a9d202af36..e3c3f8e63ea74 100644 --- a/src/vs/workbench/services/lifecycle/electron-browser/lifecycleService.ts +++ b/src/vs/workbench/services/lifecycle/electron-browser/lifecycleService.ts @@ -7,26 +7,46 @@ import { TPromise } from 'vs/base/common/winjs.base'; import Severity from 'vs/base/common/severity'; import { toErrorMessage } from 'vs/base/common/errorMessage'; -import { ILifecycleService, ShutdownEvent, ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle'; +import { ILifecycleService, ShutdownEvent, ShutdownReason, StartupKind } from 'vs/platform/lifecycle/common/lifecycle'; import { IMessageService } from 'vs/platform/message/common/message'; +import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IWindowIPCService } from 'vs/workbench/services/window/electron-browser/windowService'; import { ipcRenderer as ipc } from 'electron'; import Event, { Emitter } from 'vs/base/common/event'; export class LifecycleService implements ILifecycleService { + private static readonly _lastShutdownReasonKey = 'lifecyle.lastShutdownReason'; + public _serviceBrand: any; - private _onWillShutdown = new Emitter(); - private _onShutdown = new Emitter(); + private readonly _onWillShutdown = new Emitter(); + private readonly _onShutdown = new Emitter(); + private readonly _startupKind: StartupKind; private _willShutdown: boolean; constructor( - @IMessageService private messageService: IMessageService, - @IWindowIPCService private windowService: IWindowIPCService + @IMessageService private _messageService: IMessageService, + @IWindowIPCService private _windowService: IWindowIPCService, + @IStorageService private _storageService: IStorageService ) { - this.registerListeners(); + this._registerListeners(); + + const lastShutdownReason = this._storageService.getInteger(LifecycleService._lastShutdownReasonKey, StorageScope.WORKSPACE); + this._storageService.remove(LifecycleService._lastShutdownReasonKey, StorageScope.WORKSPACE); + if (lastShutdownReason === ShutdownReason.RELOAD) { + this._startupKind = StartupKind.ReloadedWindow; + } else if (lastShutdownReason === ShutdownReason.LOAD) { + this._startupKind = StartupKind.ReopenedWindow; + } else { + this._startupKind = StartupKind.NewWindow; + } + console.log(this.startupKind); + } + + public get startupKind(): StartupKind { + return this._startupKind; } public get willShutdown(): boolean { @@ -41,16 +61,18 @@ export class LifecycleService implements ILifecycleService { return this._onShutdown.event; } - private registerListeners(): void { - const windowId = this.windowService.getWindowId(); + private _registerListeners(): void { + const windowId = this._windowService.getWindowId(); // Main side indicates that window is about to unload, check for vetos ipc.on('vscode:beforeUnload', (event, reply: { okChannel: string, cancelChannel: string, reason: ShutdownReason }) => { this._willShutdown = true; + this._storageService.store(LifecycleService._lastShutdownReasonKey, JSON.stringify(reply.reason), StorageScope.WORKSPACE); // trigger onWillShutdown events and veto collecting this.onBeforeUnload(reply.reason).done(veto => { if (veto) { + this._storageService.remove(LifecycleService._lastShutdownReasonKey, StorageScope.WORKSPACE); this._willShutdown = false; // reset this flag since the shutdown has been vetoed! ipc.send(reply.cancelChannel, windowId); } else { @@ -92,11 +114,11 @@ export class LifecycleService implements ILifecycleService { } }, err => { // error, treated like a veto, done - this.messageService.show(Severity.Error, toErrorMessage(err)); + this._messageService.show(Severity.Error, toErrorMessage(err)); lazyValue = true; })); } } return TPromise.join(promises).then(() => lazyValue); } -} \ No newline at end of file +} diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index bc6068ce24eeb..bc6e0f5e11dff 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -28,7 +28,7 @@ import { IEditorInput, IEditorOptions, Position, Direction, IEditor, IResourceIn import { IUntitledEditorService, UntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IMessageService, IConfirmation } from 'vs/platform/message/common/message'; import { IWorkspace, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { ILifecycleService, ShutdownEvent, ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle'; +import { ILifecycleService, ShutdownEvent, ShutdownReason, StartupKind } from 'vs/platform/lifecycle/common/lifecycle'; import { EditorStacksModel } from 'vs/workbench/common/editor/editorStacksModel'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; @@ -855,6 +855,7 @@ export class TestLifecycleService implements ILifecycleService { public _serviceBrand: any; public willShutdown: boolean; + public startupKind: StartupKind; private _onWillShutdown = new Emitter(); private _onShutdown = new Emitter(); @@ -1023,4 +1024,4 @@ export class TestThemeService implements IThemeService { onThemeChange(participant: IThemingParticipant): IDisposable { return { dispose: () => { } }; } -} \ No newline at end of file +} From fade7d4687d2bab930e7f6345d6df84b5fb6b5ce Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 17 May 2017 16:13:37 -0700 Subject: [PATCH 0719/2747] Reorder / relabel help links --- .../welcome/page/electron-browser/vs_code_welcome_page.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts index dbc50a757c379..6f52d129c86a1 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts @@ -39,9 +39,9 @@ export default () => `

    ${escape(localize('welcomePage.help', "Help"))}

    From b00945fc8c79f6db74b280ef53eba060ed9a1388 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 18 May 2017 12:33:48 -0700 Subject: [PATCH 0720/2747] Quick link for tools and languages (fixes #22098) --- product.json | 5 + .../extensions/browser/extensionsActions.ts | 28 +++ .../extensions.contribution.ts | 7 +- ...keymapExtensions.ts => extensionsUtils.ts} | 24 +-- .../electron-browser/vs_code_welcome_page.ts | 14 +- .../page/electron-browser/welcomePage.css | 6 +- .../page/electron-browser/welcomePage.ts | 190 ++++++++++++------ 7 files changed, 191 insertions(+), 83 deletions(-) rename src/vs/workbench/parts/extensions/electron-browser/{keymapExtensions.ts => extensionsUtils.ts} (81%) diff --git a/product.json b/product.json index 49f852e2928af..b4c35813f4eaf 100644 --- a/product.json +++ b/product.json @@ -14,5 +14,10 @@ "win32ShellNameShort": "C&ode - OSS", "darwinBundleIdentifier": "com.visualstudio.code.oss", "reportIssueUrl": "https://github.com/Microsoft/vscode/issues/new", + "extensionsGallery": { + "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery", + "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index", + "itemUrl": "https://marketplace.visualstudio.com/items" + }, "urlProtocol": "code-oss" } \ No newline at end of file diff --git a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts index 748b574f24849..6b29b621d0fcb 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts @@ -1048,6 +1048,34 @@ export class ShowRecommendedKeymapExtensionsAction extends Action { } } +export class ShowExtensionPacksAction extends Action { + + static ID = 'workbench.extensions.action.showExtensionPacks'; + static LABEL = localize('showExtensionPacks', "Show Extension Packs"); + static SHORT_LABEL = localize('showExtensionPacksShort', "Extension Packs"); + + constructor( + id: string, + label: string, + @IViewletService private viewletService: IViewletService + ) { + super(id, label, null, true); + } + + run(): TPromise { + return this.viewletService.openViewlet(VIEWLET_ID, true) + .then(viewlet => viewlet as IExtensionsViewlet) + .then(viewlet => { + viewlet.search('@sort:installs @category:"extension packs" '); + viewlet.focus(); + }); + } + + protected isEnabled(): boolean { + return true; + } +} + export class ChangeSortAction extends Action { private query: Query; diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts index 827ae6984e184..c46c015065d9d 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts @@ -24,7 +24,7 @@ import { ExtensionsWorkbenchService } from 'vs/workbench/parts/extensions/node/e import { OpenExtensionsViewletAction, InstallExtensionsAction, ShowOutdatedExtensionsAction, ShowRecommendedExtensionsAction, ShowRecommendedKeymapExtensionsAction, ShowWorkspaceRecommendedExtensionsAction, ShowPopularExtensionsAction, ShowInstalledExtensionsAction, ShowDisabledExtensionsAction, UpdateAllAction, ConfigureWorkspaceRecommendedExtensionsAction, - EnableAllAction, EnableAllWorkpsaceAction, DisableAllAction, DisableAllWorkpsaceAction, CheckForUpdatesAction + EnableAllAction, EnableAllWorkpsaceAction, DisableAllAction, DisableAllWorkpsaceAction, CheckForUpdatesAction, ShowExtensionPacksAction } from 'vs/workbench/parts/extensions/browser/extensionsActions'; import { OpenExtensionsFolderAction, InstallVSIXAction } from 'vs/workbench/parts/extensions/electron-browser/extensionsActions'; import { ExtensionsInput } from 'vs/workbench/parts/extensions/common/extensionsInput'; @@ -37,7 +37,7 @@ import jsonContributionRegistry = require('vs/platform/jsonschemas/common/jsonCo import { ExtensionsConfigurationSchema, ExtensionsConfigurationSchemaId } from 'vs/workbench/parts/extensions/common/extensionsFileTemplate'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; -import { KeymapExtensions } from 'vs/workbench/parts/extensions/electron-browser/keymapExtensions'; +import { KeymapExtensions } from 'vs/workbench/parts/extensions/electron-browser/extensionsUtils'; import { adoptToGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; // Singletons @@ -115,6 +115,9 @@ actionRegistry.registerWorkbenchAction(recommendationsActionDescriptor, 'Extensi const keymapRecommendationsActionDescriptor = new SyncActionDescriptor(ShowRecommendedKeymapExtensionsAction, ShowRecommendedKeymapExtensionsAction.ID, ShowRecommendedKeymapExtensionsAction.SHORT_LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_M) }); actionRegistry.registerWorkbenchAction(keymapRecommendationsActionDescriptor, 'Preferences: Keymaps', PreferencesLabel); +const extensionPacksActionDescriptor = new SyncActionDescriptor(ShowExtensionPacksAction, ShowExtensionPacksAction.ID, ShowExtensionPacksAction.SHORT_LABEL); +actionRegistry.registerWorkbenchAction(extensionPacksActionDescriptor, 'Extensions: Extension Packs', PreferencesLabel); + const workspaceRecommendationsActionDescriptor = new SyncActionDescriptor(ShowWorkspaceRecommendedExtensionsAction, ShowWorkspaceRecommendedExtensionsAction.ID, ShowWorkspaceRecommendedExtensionsAction.LABEL); actionRegistry.registerWorkbenchAction(workspaceRecommendationsActionDescriptor, 'Extensions: Show Workspace Recommended Extensions', ExtensionsLabel); diff --git a/src/vs/workbench/parts/extensions/electron-browser/keymapExtensions.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts similarity index 81% rename from src/vs/workbench/parts/extensions/electron-browser/keymapExtensions.ts rename to src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts index 5c30ad7c0be05..e8802bef6f183 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/keymapExtensions.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts @@ -19,7 +19,7 @@ import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -export interface IKeymapExtension { +export interface IExtensionStatus { identifier: string; local: ILocalExtension; globallyEnabled: boolean; @@ -32,13 +32,14 @@ export class KeymapExtensions implements IWorkbenchContribution { constructor( @IInstantiationService private instantiationService: IInstantiationService, @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService, + @IExtensionTipsService private tipsService: IExtensionTipsService, @IChoiceService private choiceService: IChoiceService, @ILifecycleService lifecycleService: ILifecycleService, @ITelemetryService private telemetryService: ITelemetryService, ) { this.disposables.push( lifecycleService.onShutdown(() => this.dispose()), - instantiationService.invokeFunction(onKeymapExtensionChanged)((ids => { + instantiationService.invokeFunction(onExtensionChanged)((ids => { TPromise.join(ids.map(id => this.checkForOtherKeymaps(id))) .then(null, onUnexpectedError); })) @@ -50,10 +51,11 @@ export class KeymapExtensions implements IWorkbenchContribution { } private checkForOtherKeymaps(extensionId: string): TPromise { - return this.instantiationService.invokeFunction(getInstalledKeymaps).then(extensions => { - const extension = arrays.first(extensions, extension => extension.identifier === extensionId); + return this.instantiationService.invokeFunction(getInstalledExtensions).then(extensions => { + const keymaps = extensions.filter(extension => isKeymapExtension(this.tipsService, extension)); + const extension = arrays.first(keymaps, extension => extension.identifier === extensionId); if (extension && extension.globallyEnabled) { - const otherKeymaps = extensions.filter(extension => extension.identifier !== extensionId && extension.globallyEnabled); + const otherKeymaps = keymaps.filter(extension => extension.identifier !== extensionId && extension.globallyEnabled); if (otherKeymaps.length) { return this.promptForDisablingOtherKeymaps(extension, otherKeymaps); } @@ -62,7 +64,7 @@ export class KeymapExtensions implements IWorkbenchContribution { }); } - private promptForDisablingOtherKeymaps(newKeymap: IKeymapExtension, oldKeymaps: IKeymapExtension[]): TPromise { + private promptForDisablingOtherKeymaps(newKeymap: IExtensionStatus, oldKeymaps: IExtensionStatus[]): TPromise { const telemetryData: { [key: string]: any; } = { newKeymap: newKeymap.identifier, oldKeymaps: oldKeymaps.map(k => k.identifier) @@ -92,7 +94,7 @@ export class KeymapExtensions implements IWorkbenchContribution { } } -export function onKeymapExtensionChanged(accessor: ServicesAccessor): Event { +export function onExtensionChanged(accessor: ServicesAccessor): Event { const extensionService = accessor.get(IExtensionManagementService); const extensionEnablementService = accessor.get(IExtensionEnablementService); return debounceEvent(any( @@ -110,13 +112,12 @@ export function onKeymapExtensionChanged(accessor: ServicesAccessor): Event { +export function getInstalledExtensions(accessor: ServicesAccessor): TPromise { const extensionService = accessor.get(IExtensionManagementService); const extensionEnablementService = accessor.get(IExtensionEnablementService); - const tipsService = accessor.get(IExtensionTipsService); return extensionService.getInstalled().then(extensions => { const globallyDisabled = extensionEnablementService.getGloballyDisabledExtensions(); - const installedExtensions = extensions.map(extension => { + return extensions.map(extension => { const identifier = stripVersion(extension.id); return { identifier, @@ -124,11 +125,10 @@ export function getInstalledKeymaps(accessor: ServicesAccessor): TPromise isKeymapExtension(tipsService, extension)); }); } -function isKeymapExtension(tipsService: IExtensionTipsService, extension: IKeymapExtension): boolean { +export function isKeymapExtension(tipsService: IExtensionTipsService, extension: IExtensionStatus): boolean { const cats = extension.local.manifest.categories; return cats && cats.indexOf('Keymaps') !== -1 || tipsService.getKeymapRecommendations().indexOf(extension.identifier) !== -1; } diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts index 6f52d129c86a1..041c4026aa7d9 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts @@ -52,14 +52,15 @@ export default () => `

    ${escape(localize('welcomePage.customize', "Customize"))}

      -
    • +
    • -
    @@ -74,6 +75,7 @@ export default () => `

    ${escape(localize('welcomePage.quickLinks', "Quick links"))}

    • +
    diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css index 78cee53838d22..982a72d9d1bfb 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css @@ -245,13 +245,13 @@ outline-offset: -5px; } -.monaco-workbench > .part.editor > .content .welcomePage .commands li button .currentKeymap { +.monaco-workbench > .part.editor > .content .welcomePage .commands li button .enabledExtension { display: none; } -.monaco-workbench > .part.editor > .content .welcomePage .commands li button .installKeymap.installed { +.monaco-workbench > .part.editor > .content .welcomePage .commands li button .installExtension.installed { display: none; } -.monaco-workbench > .part.editor > .content .welcomePage .commands li button .currentKeymap.installed { +.monaco-workbench > .part.editor > .content .welcomePage .commands li button .enabledExtension.installed { display: inline; } diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index cb7607b164822..874bc17d8ddc5 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -27,8 +27,8 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { Schemas } from 'vs/base/common/network'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { IMessageService, Severity, CloseAction } from 'vs/platform/message/common/message'; -import { getInstalledKeymaps, IKeymapExtension, onKeymapExtensionChanged } from 'vs/workbench/parts/extensions/electron-browser/keymapExtensions'; -import { IExtensionEnablementService, IExtensionManagementService, IExtensionGalleryService } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { getInstalledExtensions, IExtensionStatus, onExtensionChanged, isKeymapExtension } from 'vs/workbench/parts/extensions/electron-browser/extensionsUtils'; +import { IExtensionEnablementService, IExtensionManagementService, IExtensionGalleryService, IExtensionTipsService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { used } from 'vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; @@ -101,6 +101,57 @@ const reorderedQuickLinks = [ 'showInteractivePlayground', ]; +interface ExtensionSuggestion { + name: string; + id: string; + isKeymap?: boolean; +} + +const extensionPacks: ExtensionSuggestion[] = [ + { name: localize('welcomePage.javaScript', "JavaScript"), id: 'dbaeumer.vscode-eslint' }, + { name: localize('welcomePage.typeScript', "TypeScript"), id: 'eg2.tslint' }, + { name: localize('welcomePage.python', "Python"), id: 'donjayamanne.python' }, + // { name: localize('welcomePage.go', "Go"), id: 'lukehoban.go' }, + { name: localize('welcomePage.php', "PHP"), id: 'felixfbecker.php-pack' }, + { name: localize('welcomePage.docker', "Docker"), id: 'PeterJausovec.vscode-docker' }, +]; + +const keymapExtensions: ExtensionSuggestion[] = [ + { name: localize('welcomePage.vim', "Vim"), id: 'vscodevim.vim', isKeymap: true }, + { name: localize('welcomePage.sublime', "Sublime"), id: 'ms-vscode.sublime-keybindings', isKeymap: true }, + { name: localize('welcomePage.atom', "Atom"), id: 'ms-vscode.atom-keybindings', isKeymap: true }, +]; + +interface Strings { + installEvent: string; + installedEvent: string; + + alreadyInstalled: string; + reloadAfterInstall: string; + installing: string; + extensionNotFound: string; +} + +const extensionPackStrings: Strings = { + installEvent: 'installExtension', + installedEvent: 'installedExtension', + + alreadyInstalled: localize('welcomePage.extensionPackAlreadyInstalled', "Support for {0} is already installed."), + reloadAfterInstall: localize('welcomePage.willReloadAfterInstallingExtensionPack', "The window will reload after installing support for {0}."), + installing: localize('welcomePage.installingExtensionPack', "Installing support for {0}..."), + extensionNotFound: localize('welcomePage.extensionPackNotFound', "Support for {0} with id {1} could not be found."), +}; + +const keymapStrings: Strings = { + installEvent: 'installKeymap', + installedEvent: 'installedKeymap', + + alreadyInstalled: localize('welcomePage.keymapAlreadyInstalled', "The {0} keyboard shortcuts are already installed."), + reloadAfterInstall: localize('welcomePage.willReloadAfterInstallingKeymap', "The window will reload after installing the {0} keyboard shortcuts."), + installing: localize('welcomePage.installingKeymap', "Installing the {0} keyboard shortcuts..."), + extensionNotFound: localize('welcomePage.keymapNotFound', "The {0} keyboard shortcuts with id {1} could not be found."), +}; + class WelcomePage { private disposables: IDisposable[] = []; @@ -118,6 +169,7 @@ class WelcomePage { @IExtensionEnablementService private extensionEnablementService: IExtensionEnablementService, @IExtensionGalleryService private extensionGalleryService: IExtensionGalleryService, @IExtensionManagementService private extensionManagementService: IExtensionManagementService, + @IExtensionTipsService private tipsService: IExtensionTipsService, @ILifecycleService lifecycleService: ILifecycleService, @IThemeService private themeService: IThemeService, @ITelemetryService private telemetryService: ITelemetryService @@ -128,18 +180,18 @@ class WelcomePage { private create() { const recentlyOpened = this.windowService.getRecentlyOpen(); - const installedKeymaps = this.instantiationService.invokeFunction(getInstalledKeymaps); + const installedExtensions = this.instantiationService.invokeFunction(getInstalledExtensions); const uri = URI.parse(require.toUrl('./vs_code_welcome_page')) .with({ scheme: Schemas.walkThrough, query: JSON.stringify({ moduleId: 'vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page' }) }); - const input = this.instantiationService.createInstance(WalkThroughInput, localize('welcome.title', "Welcome"), '', uri, telemetryFrom, container => this.onReady(container, recentlyOpened, installedKeymaps)); + const input = this.instantiationService.createInstance(WalkThroughInput, localize('welcome.title', "Welcome"), '', uri, telemetryFrom, container => this.onReady(container, recentlyOpened, installedExtensions)); this.editorService.openEditor(input, { pinned: true }, Position.ONE) .then(null, onUnexpectedError); } - private onReady(container: HTMLElement, recentlyOpened: TPromise<{ files: string[]; folders: string[]; }>, installedKeymaps: TPromise): void { + private onReady(container: HTMLElement, recentlyOpened: TPromise<{ files: string[]; folders: string[]; }>, installedExtensions: TPromise): void { const enabled = this.configurationService.lookup(enabledKey).value; const showOnStartup = container.querySelector('#showOnStartup'); if (enabled) { @@ -214,32 +266,50 @@ class WelcomePage { quickLinks.remove(); } - container.addEventListener('click', event => { - for (let node = event.target as HTMLElement; node; node = node.parentNode as HTMLElement) { - if (node instanceof HTMLAnchorElement && node.classList.contains('installKeymap')) { - const keymapName = node.getAttribute('data-keymap-name'); - const keymapIdentifier = node.getAttribute('data-keymap'); - if (keymapName && keymapIdentifier) { - this.installKeymap(keymapName, keymapIdentifier); - event.preventDefault(); - event.stopPropagation(); - } - } - } - }); + this.addExtensionList(container, '.extensionPackList', extensionPacks, extensionPackStrings); + this.addExtensionList(container, '.keymapList', keymapExtensions, keymapStrings); - this.updateInstalledKeymaps(container, installedKeymaps); - this.disposables.push(this.instantiationService.invokeFunction(onKeymapExtensionChanged)(ids => { + this.updateInstalledExtensions(container, installedExtensions); + this.disposables.push(this.instantiationService.invokeFunction(onExtensionChanged)(ids => { for (const id of ids) { - if (container.querySelector(`.installKeymap[data-keymap="${id}"], .currentKeymap[data-keymap="${id}"]`)) { - const installedKeymaps = this.instantiationService.invokeFunction(getInstalledKeymaps); - this.updateInstalledKeymaps(container, installedKeymaps); + if (container.querySelector(`.installExtension[data-extension="${id}"], .enabledExtension[data-extension="${id}"]`)) { + const installedExtensions = this.instantiationService.invokeFunction(getInstalledExtensions); + this.updateInstalledExtensions(container, installedExtensions); break; } }; })); } + private addExtensionList(container: HTMLElement, listSelector: string, suggestions: ExtensionSuggestion[], strings: Strings) { + const list = container.querySelector(listSelector); + if (list) { + suggestions.forEach((extension, i) => { + if (i) { + list.appendChild(document.createTextNode(localize('welcomePage.extensionListSeparator', ", "))); + } + + const a = document.createElement('a'); + a.innerText = extension.name; + a.classList.add('installExtension'); + a.setAttribute('data-extension', extension.id); + a.href = 'javascript:void(0)'; + a.addEventListener('click', e => { + this.installExtension(extension, strings); + e.preventDefault(); + e.stopPropagation(); + }); + list.appendChild(a); + + const span = document.createElement('span'); + span.innerText = localize('welcomePage.installedExtension', "{0} (installed)", extension.name); + span.classList.add('enabledExtension'); + span.setAttribute('data-extension', extension.id); + list.appendChild(span); + }); + } + } + private pathEquals(path1: string, path2: string): boolean { if (!isLinux) { path1 = path1.toLowerCase(); @@ -249,23 +319,23 @@ class WelcomePage { return path1 === path2; } - private installKeymap(keymapName: string, keymapIdentifier: string): void { - this.telemetryService.publicLog('installKeymap', { + private installExtension(extensionSuggestion: ExtensionSuggestion, strings: Strings): void { + this.telemetryService.publicLog(strings.installEvent, { from: telemetryFrom, - extensionId: keymapIdentifier, + extensionId: extensionSuggestion.id, }); - this.instantiationService.invokeFunction(getInstalledKeymaps).then(extensions => { - const keymap = arrays.first(extensions, extension => extension.identifier === keymapIdentifier); - if (keymap && keymap.globallyEnabled) { - this.telemetryService.publicLog('installedKeymap', { + this.instantiationService.invokeFunction(getInstalledExtensions).then(extensions => { + const installedExtension = arrays.first(extensions, extension => extension.identifier === extensionSuggestion.id); + if (installedExtension && installedExtension.globallyEnabled) { + this.telemetryService.publicLog(strings.installedEvent, { from: telemetryFrom, - extensionId: keymapIdentifier, + extensionId: extensionSuggestion.id, outcome: 'already_enabled', }); - this.messageService.show(Severity.Info, localize('welcomePage.keymapAlreadyInstalled', "The {0} keyboard shortcuts are already installed.", keymapName)); + this.messageService.show(Severity.Info, strings.alreadyInstalled.replace('{0}', extensionSuggestion.name)); return; } - const foundAndInstalled = keymap ? TPromise.as(true) : this.extensionGalleryService.query({ names: [keymapIdentifier] }) + const foundAndInstalled = installedExtension ? TPromise.as(true) : this.extensionGalleryService.query({ names: [extensionSuggestion.id] }) .then(result => { const [extension] = result.firstPage; if (!extension) { @@ -274,52 +344,52 @@ class WelcomePage { return this.extensionManagementService.installFromGallery(extension) .then(() => { // TODO: Do this as part of the install to avoid multiple events. - return this.extensionEnablementService.setEnablement(keymapIdentifier, false); + return this.extensionEnablementService.setEnablement(extensionSuggestion.id, false); }).then(() => { return true; }); }); this.messageService.show(Severity.Info, { - message: localize('welcomePage.willReloadAfterInstallingKeymap', "The window will reload after installing the {0} keyboard shortcuts.", keymapName), + message: strings.reloadAfterInstall.replace('{0}', extensionSuggestion.name), actions: [ new Action('ok', localize('ok', "OK"), null, true, () => { const messageDelay = TPromise.timeout(300); messageDelay.then(() => { this.messageService.show(Severity.Info, { - message: localize('welcomePage.installingKeymap', "Installing the {0} keyboard shortcuts...", keymapName), + message: strings.installing.replace('{0}', extensionSuggestion.name), actions: [CloseAction] }); }); - TPromise.join(extensions.filter(extension => extension.globallyEnabled) + TPromise.join(extensionSuggestion.isKeymap ? extensions.filter(extension => isKeymapExtension(this.tipsService, extension) && extension.globallyEnabled) .map(extension => { return this.extensionEnablementService.setEnablement(extension.identifier, false); - })).then(() => { + }) : []).then(() => { return foundAndInstalled.then(found => { messageDelay.cancel(); if (found) { - return this.extensionEnablementService.setEnablement(keymapIdentifier, true) + return this.extensionEnablementService.setEnablement(extensionSuggestion.id, true) .then(() => { - this.telemetryService.publicLog('installedKeymap', { + this.telemetryService.publicLog(strings.installedEvent, { from: telemetryFrom, - extensionId: keymapIdentifier, - outcome: keymap ? 'enabled' : 'installed', + extensionId: extensionSuggestion.id, + outcome: installedExtension ? 'enabled' : 'installed', }); return this.windowService.reloadWindow(); }); } else { - this.telemetryService.publicLog('installedKeymap', { + this.telemetryService.publicLog(strings.installedEvent, { from: telemetryFrom, - extensionId: keymapIdentifier, + extensionId: extensionSuggestion.id, outcome: 'not_found', }); - this.messageService.show(Severity.Error, localize('welcomePage.keymapNotFound', "The {0} keyboard shortcuts with id {1} could not be found.", keymapName, keymapIdentifier)); + this.messageService.show(Severity.Error, strings.extensionNotFound.replace('{0}', extensionSuggestion.name).replace('{1}', extensionSuggestion.id)); return undefined; } }); }).then(null, err => { - this.telemetryService.publicLog('installedKeymap', { + this.telemetryService.publicLog(strings.installedEvent, { from: telemetryFrom, - extensionId: keymapIdentifier, + extensionId: extensionSuggestion.id, outcome: isPromiseCanceledError(err) ? 'canceled' : 'error', error: String(err), }); @@ -328,9 +398,9 @@ class WelcomePage { return TPromise.as(true); }), new Action('cancel', localize('cancel', "Cancel"), null, true, () => { - this.telemetryService.publicLog('installedKeymap', { + this.telemetryService.publicLog(strings.installedEvent, { from: telemetryFrom, - extensionId: keymapIdentifier, + extensionId: extensionSuggestion.id, outcome: 'user_canceled', }); return TPromise.as(true); @@ -338,9 +408,9 @@ class WelcomePage { ] }); }).then(null, err => { - this.telemetryService.publicLog('installedKeymap', { + this.telemetryService.publicLog(strings.installedEvent, { from: telemetryFrom, - extensionId: keymapIdentifier, + extensionId: extensionSuggestion.id, outcome: isPromiseCanceledError(err) ? 'canceled' : 'error', error: String(err), }); @@ -348,22 +418,22 @@ class WelcomePage { }); } - private updateInstalledKeymaps(container: HTMLElement, installedKeymaps: TPromise) { - installedKeymaps.then(extensions => { - const elements = container.querySelectorAll('.installKeymap, .currentKeymap'); + private updateInstalledExtensions(container: HTMLElement, installedExtensions: TPromise) { + installedExtensions.then(extensions => { + const elements = container.querySelectorAll('.installExtension, .enabledExtension'); for (let i = 0; i < elements.length; i++) { elements[i].classList.remove('installed'); } extensions.filter(ext => ext.globallyEnabled) .map(ext => ext.identifier) .forEach(id => { - const install = container.querySelector(`.installKeymap[data-keymap="${id}"]`); - if (install) { - install.classList.add('installed'); + const install = container.querySelectorAll(`.installExtension[data-extension="${id}"]`); + for (let i = 0; i < install.length; i++) { + install[i].classList.add('installed'); } - const current = container.querySelector(`.currentKeymap[data-keymap="${id}"]`); - if (current) { - current.classList.add('installed'); + const enabled = container.querySelectorAll(`.enabledExtension[data-extension="${id}"]`); + for (let i = 0; i < enabled.length; i++) { + enabled[i].classList.add('installed'); } }); }).then(null, onUnexpectedError); From f1d0c1d88417f85ec66fa5629beca64ef71ac8b8 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 18 May 2017 12:35:32 -0700 Subject: [PATCH 0721/2747] Revert inadvertant change to product.json --- product.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/product.json b/product.json index b4c35813f4eaf..49f852e2928af 100644 --- a/product.json +++ b/product.json @@ -14,10 +14,5 @@ "win32ShellNameShort": "C&ode - OSS", "darwinBundleIdentifier": "com.visualstudio.code.oss", "reportIssueUrl": "https://github.com/Microsoft/vscode/issues/new", - "extensionsGallery": { - "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery", - "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index", - "itemUrl": "https://marketplace.visualstudio.com/items" - }, "urlProtocol": "code-oss" } \ No newline at end of file From f084c2a1e4e764a5a153fda89452f528e50d8b2e Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Thu, 18 May 2017 21:52:00 +0200 Subject: [PATCH 0722/2747] Fixes #23435: Proposed Task Api Feedback --- .../platform/markers/common/problemMatcher.ts | 54 +- src/vs/vscode.d.ts | 520 ++++++++++++++++++ src/vs/vscode.proposed.d.ts | 515 ----------------- src/vs/workbench/api/node/extHostTask.ts | 7 +- src/vs/workbench/api/node/extHostTypes.ts | 114 ++-- src/vs/workbench/parts/tasks/common/tasks.ts | 2 +- .../electron-browser/task.contribution.ts | 22 +- .../electron-browser/terminalTaskSystem.ts | 24 +- .../parts/tasks/node/processTaskSystem.ts | 22 +- .../tasks/test/node/configuration.test.ts | 37 +- 10 files changed, 688 insertions(+), 629 deletions(-) diff --git a/src/vs/platform/markers/common/problemMatcher.ts b/src/vs/platform/markers/common/problemMatcher.ts index b3120929f9c80..b42f0f2a90667 100644 --- a/src/vs/platform/markers/common/problemMatcher.ts +++ b/src/vs/platform/markers/common/problemMatcher.ts @@ -552,7 +552,7 @@ export namespace Config { /** * A description to track the start and end of a watching task. */ - export interface WatchingMatcher { + export interface BackgroundMonitor { /** * If set to true the watcher is in active mode when the task @@ -648,7 +648,11 @@ export namespace Config { */ watchedTaskEndsRegExp?: string; - watching?: WatchingMatcher; + /** + * @deprecated Use background instead. + */ + watching?: BackgroundMonitor; + background?: BackgroundMonitor; } export type ProblemMatcherType = string | ProblemMatcher | (string | ProblemMatcher)[]; @@ -1264,15 +1268,15 @@ export class ProblemMatcherParser extends Parser { }; return; } - if (Types.isUndefinedOrNull(external.watching)) { + let backgroundMonitor = external.background || external.watching; + if (Types.isUndefinedOrNull(backgroundMonitor)) { return; } - let watching = external.watching; - let begins: WatchingPattern = this.createWatchingPattern(watching.beginsPattern); - let ends: WatchingPattern = this.createWatchingPattern(watching.endsPattern); + let begins: WatchingPattern = this.createWatchingPattern(backgroundMonitor.beginsPattern); + let ends: WatchingPattern = this.createWatchingPattern(backgroundMonitor.endsPattern); if (begins && ends) { internal.watching = { - activeOnStart: Types.isBoolean(watching.activeOnStart) ? watching.activeOnStart : false, + activeOnStart: Types.isBoolean(backgroundMonitor.activeOnStart) ? backgroundMonitor.activeOnStart : false, beginsPattern: begins, endsPattern: ends }; @@ -1325,7 +1329,7 @@ export namespace Schemas { properties: { regexp: { type: 'string', - description: localize('WatchingPatternSchema.regexp', 'The regular expression to detect the begin or end of a watching task.') + description: localize('WatchingPatternSchema.regexp', 'The regular expression to detect the begin or end of a background task.') }, file: { type: 'integer', @@ -1385,9 +1389,40 @@ export namespace Schemas { ], description: localize('ProblemMatcherSchema.fileLocation', 'Defines how file names reported in a problem pattern should be interpreted.') }, + background: { + type: 'object', + additionalProperties: false, + description: localize('ProblemMatcherSchema.background', 'Patterns to track the begin and end of a matcher active on a background task.'), + properties: { + activeOnStart: { + type: 'boolean', + description: localize('ProblemMatcherSchema.background.activeOnStart', 'If set to true the background monitor is in active mode when the task starts. This is equals of issuing a line that matches the beginPattern') + }, + beginsPattern: { + oneOf: [ + { + type: 'string' + }, + Schemas.WatchingPattern + ], + description: localize('ProblemMatcherSchema.background.beginsPattern', 'If matched in the output the start of a background task is signaled.') + }, + endsPattern: { + oneOf: [ + { + type: 'string' + }, + Schemas.WatchingPattern + ], + description: localize('ProblemMatcherSchema.background.endsPattern', 'If matched in the output the end of a background task is signaled.') + } + } + }, watching: { type: 'object', additionalProperties: false, + deprecationMessage: localize('ProblemMatcherSchema.watching.deprecated', 'The watching property is deprecated. Use background instead.'), + description: localize('ProblemMatcherSchema.watching', 'Patterns to track the begin and end of a watching matcher.'), properties: { activeOnStart: { type: 'boolean', @@ -1411,8 +1446,7 @@ export namespace Schemas { ], description: localize('ProblemMatcherSchema.watching.endsPattern', 'If matched in the output the end of a watching task is signaled.') } - }, - description: localize('ProblemMatcherSchema.watching', 'Patterns to track the begin and end of a watching pattern.') + } } } }; diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 3faf70275df3d..190042afeeaf8 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -3489,6 +3489,526 @@ declare module 'vscode' { update(key: string, value: any): Thenable; } + /** + * Defines a problem pattern + */ + export interface ProblemPattern { + + /** + * The regular expression to find a problem in the console output of an + * executed task. + */ + regexp: RegExp; + + /** + * The match group index of the filename. + * + * Defaults to 1 if omitted. + */ + file?: number; + + /** + * The match group index of the problems's location. Valid location + * patterns are: (line), (line,column) and (startLine,startColumn,endLine,endColumn). + * If omitted the line and colum properties are used. + */ + location?: number; + + /** + * The match group index of the problem's line in the source file. + * + * Defaults to 2 if omitted. + */ + line?: number; + + /** + * The match group index of the problem's character in the source file. + * + * Defaults to 3 if omitted. + */ + character?: number; + + /** + * The match group index of the problem's end line in the source file. + * + * Defaults to undefined. No end line is captured. + */ + endLine?: number; + + /** + * The match group index of the problem's end character in the source file. + * + * Defaults to undefined. No end column is captured. + */ + endCharacter?: number; + + /** + * The match group index of the problem's severity. + * + * Defaults to undefined. In this case the problem matcher's severity + * is used. + */ + severity?: number; + + /** + * The match group index of the problems's code. + * + * Defaults to undefined. No code is captured. + */ + code?: number; + + /** + * The match group index of the message. If omitted it defaults + * to 4 if location is specified. Otherwise it defaults to 5. + */ + message?: number; + + /** + * Specifies if the last pattern in a multi line problem matcher should + * loop as long as it does match a line consequently. Only valid on the + * last problem pattern in a multi line problem matcher. + */ + loop?: boolean; + } + + /** + * A multi line problem pattern. + */ + export type MultiLineProblemPattern = ProblemPattern[]; + + /** + * The way how the file location is interpreted + */ + export enum FileLocationKind { + /** + * VS Code should decide based on whether the file path found in the + * output is absolute or relative. A relative file path will be treated + * relative to the workspace root. + */ + Auto = 1, + + /** + * Always treat the file path relative. + */ + Relative = 2, + + /** + * Always treat the file path absolute. + */ + Absolute = 3 + } + + /** + * Controls to which kind of documents problems are applied. + */ + export enum ApplyToKind { + /** + * Problems are applied to all documents. + */ + AllDocuments = 1, + + /** + * Problems are applied to open documents only. + */ + OpenDocuments = 2, + + + /** + * Problems are applied to closed documents only. + */ + ClosedDocuments = 3 + } + + + /** + * A background monitor pattern + */ + export interface BackgroundPattern { + /** + * The actual regular expression + */ + regexp: RegExp; + + /** + * The match group index of the filename. If provided the expression + * is matched for that file only. + */ + file?: number; + } + + /** + * A description to control the activity of a problem matcher + * watching a background task. + */ + export interface BackgroundMonitor { + /** + * If set to true the monitor is in active mode when the task + * starts. This is equals of issuing a line that matches the + * beginPattern. + */ + activeOnStart?: boolean; + + /** + * If matched in the output the start of a background activity is signaled. + */ + beginsPattern: RegExp | BackgroundPattern; + + /** + * If matched in the output the end of a background activity is signaled. + */ + endsPattern: RegExp | BackgroundPattern; + } + + /** + * Defines a problem matcher + */ + export interface ProblemMatcher { + /** + * The owner of a problem. Defaults to a generated id + * if omitted. + */ + owner?: string; + + /** + * The type of documents problems detected by this matcher + * apply to. Default to `ApplyToKind.AllDocuments` if omitted. + */ + applyTo?: ApplyToKind; + + /** + * How a file location recognized by a matcher should be interpreted. If omitted the file location + * if `FileLocationKind.Auto`. + */ + fileLocation?: FileLocationKind | string; + + /** + * The actual pattern used by the problem matcher. + */ + pattern: ProblemPattern | MultiLineProblemPattern; + + /** + * The default severity of a detected problem in the output. Used + * if the `ProblemPattern` doesn't define a severity match group. + */ + severity?: DiagnosticSeverity; + + /** + * A background monitor for tasks that are running in the background. + */ + backgound?: BackgroundMonitor; + } + + /** + * Controls the behaviour of the terminal's visibility. + */ + export enum RevealKind { + /** + * Always brings the terminal to front if the task is executed. + */ + Always = 1, + + /** + * Only brings the terminal to front if a problem is detected executing the task + * (e.g. the task couldn't be started because). + */ + Silent = 2, + + /** + * The terminal never comes to front when the task is executed. + */ + Never = 3 + } + + /** + * Controls terminal specific behaviour. + */ + export interface TerminalBehaviour { + /** + * Controls whether the terminal executing a task is brought to front or not. + * Defaults to `RevealKind.Always`. + */ + reveal?: RevealKind; + + /** + * Controls whether the command is echoed in the terminal or not. + */ + echo?: boolean; + } + + export interface ProcessOptions { + /** + * The current working directory of the executed program or shell. + * If omitted VSCode's current workspace root is used. + */ + cwd?: string; + + /** + * The additional environment of the executed program or shell. If omitted + * the parent process' environment is used. If provided it is merged with + * the parent process' environment. + */ + env?: { [key: string]: string }; + } + + export namespace TaskGroup { + /** + * The clean task group + */ + export const Clean: 'clean'; + /** + * The build task group + */ + export const Build: 'build'; + /** + * The rebuild all task group + */ + export const RebuildAll: 'rebuildAll'; + /** + * The test task group + */ + export const Test: 'test'; + } + + /** + * The supported task groups. + */ + export type TaskGroup = 'clean' | 'build' | 'rebuildAll' | 'test'; + + /** + * The ProblemMatchers type definition. + */ + export type ProblemMatchers = string | ProblemMatcher | (string | ProblemMatcher)[]; + + /** + * A task that starts an external process. + */ + export class ProcessTask { + + /** + * Creates a process task. + * + * @param name the task's name. Is presented in the user interface. + * @param process the process to start. + * @param problemMatchers the problem matchers to use. + */ + constructor(name: string, process: string, problemMatchers?: ProblemMatchers); + + /** + * Creates a process task. + * + * @param name the task's name. Is presented in the user interface. + * @param process the process to start. + * @param args arguments to be passed to the process. + * @param problemMatchers the problem matchers to use. + */ + constructor(name: string, process: string, args: string[], problemMatchers?: ProblemMatchers); + + /** + * Creates a process task. + * + * @param name the task's name. Is presented in the user interface. + * @param process the process to start. + * @param args arguments to be passed to the process. + * @param options additional options for the started process. + * @param problemMatchers the problem matchers to use. + */ + constructor(name: string, process: string, args: string[], options: ProcessOptions, problemMatchers?: ProblemMatchers); + + /** + * The task's name + */ + readonly name: string; + + /** + * The task's identifier. If omitted the name is + * used as an identifier. + */ + identifier: string; + + /** + * Whether the task is a background task or not. + */ + isBackground: boolean; + + /** + * The process to be executed. + */ + readonly process: string; + + /** + * The arguments passed to the process. Defaults to an empty array. + */ + args: string[]; + + /** + * The task group this tasks belongs to. Defaults to undefined meaning + * that the task doesn't belong to any special group. + */ + group?: TaskGroup; + + /** + * The process options used when the process is executed. + * Defaults to an empty object literal. + */ + options: ProcessOptions; + + /** + * The terminal options. Defaults to an empty object literal. + */ + terminal: TerminalBehaviour; + + /** + * The problem matchers attached to the task. Defaults to an empty + * array. + */ + problemMatchers: (string | ProblemMatcher)[]; + } + + export type ShellOptions = { + /** + * The shell executable. + */ + executable: string; + + /** + * The arguments to be passed to the shell executable used to run the task. + */ + shellArgs?: string[]; + + /** + * The current working directory of the executed shell. + * If omitted VSCode's current workspace root is used. + */ + cwd?: string; + + /** + * The additional environment of the executed shell. If omitted + * the parent process' environment is used. If provided it is merged with + * the parent process' environment. + */ + env?: { [key: string]: string }; + } | { + /** + * The current working directory of the executed shell. + * If omitted VSCode's current workspace root is used. + */ + cwd: string; + + /** + * The additional environment of the executed shell. If omitted + * the parent process' environment is used. If provided it is merged with + * the parent process' environment. + */ + env?: { [key: string]: string }; + } | { + /** + * The current working directory of the executed shell. + * If omitted VSCode's current workspace root is used. + */ + cwd?: string; + + /** + * The additional environment of the executed shell. If omitted + * the parent process' environment is used. If provided it is merged with + * the parent process' environment. + */ + env: { [key: string]: string }; + }; + + /** + * A task that executes a shell command. + */ + export class ShellTask { + + /** + * Creates a shell task. + * + * @param name the task's name. Is presented in the user interface. + * @param commandLine the command line to execute. + * @param problemMatchers the problem matchers to use. + */ + constructor(name: string, commandLine: string, problemMatchers?: ProblemMatchers); + + /** + * Creates a shell task. + * + * @param name the task's name. Is presented in the user interface. + * @param commandLine the command line to execute. + * @param options additional options used when creating the shell. + * @param problemMatchers the problem matchers to use. + */ + constructor(name: string, commandLine: string, options: ShellOptions, problemMatchers?: ProblemMatchers); + + /** + * The task's name + */ + readonly name: string; + + /** + * The task's identifier. If omitted the name is + * used as an identifier. + */ + identifier: string; + + /** + * Whether the task is a background task or not. + */ + isBackground: boolean; + + /** + * The command line to execute. + */ + readonly commandLine: string; + + /** + * The task group this tasks belongs to. Defaults to undefined meaning + * that the task doesn't belong to any special group. + */ + group?: TaskGroup; + + /** + * The shell options used when the shell is executed. Defaults to an + * empty object literal. + */ + options: ShellOptions; + + /** + * The terminal options. Defaults to an empty object literal. + */ + terminal: TerminalBehaviour; + + /** + * The problem matchers attached to the task. Defaults to an empty + * array. + */ + problemMatchers: (string | ProblemMatcher)[]; + } + + export type Task = ProcessTask | ShellTask; + + /** + * A task provider allows to add tasks to the task service. + * A task provider is registerd via #workspace.registerTaskProvider. + */ + export interface TaskProvider { + /** + * Provides additional tasks. + * @param token A cancellation token. + * @return a #TaskSet + */ + provideTasks(token: CancellationToken): ProviderResult; + } + + export namespace workspace { + /** + * Register a task provider. + * + * @param provider A task provider. + * @return A [disposable](#Disposable) that unregisters this provider when being disposed. + */ + export function registerTaskProvider(provider: TaskProvider): Disposable; + } + /** * Namespace describing the environment the editor runs in. */ diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 60d118eefc67f..5e6265c2d2077 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -7,521 +7,6 @@ declare module 'vscode' { - /** - * Defines a problem pattern - */ - export interface ProblemPattern { - - /** - * The regular expression to find a problem in the console output of an - * executed task. - */ - regexp: RegExp; - - /** - * The match group index of the filename. - * - * Defaults to 1 if omitted. - */ - file?: number; - - /** - * The match group index of the problems's location. Valid location - * patterns are: (line), (line,column) and (startLine,startColumn,endLine,endColumn). - * If omitted the line and colum properties are used. - */ - location?: number; - - /** - * The match group index of the problem's line in the source file. - * - * Defaults to 2 if omitted. - */ - line?: number; - - /** - * The match group index of the problem's character in the source file. - * - * Defaults to 3 if omitted. - */ - character?: number; - - /** - * The match group index of the problem's end line in the source file. - * - * Defaults to undefined. No end line is captured. - */ - endLine?: number; - - /** - * The match group index of the problem's end character in the source file. - * - * Defaults to undefined. No end column is captured. - */ - endCharacter?: number; - - /** - * The match group index of the problem's severity. - * - * Defaults to undefined. In this case the problem matcher's severity - * is used. - */ - severity?: number; - - /** - * The match group index of the problems's code. - * - * Defaults to undefined. No code is captured. - */ - code?: number; - - /** - * The match group index of the message. If omitted it defaults - * to 4 if location is specified. Otherwise it defaults to 5. - */ - message?: number; - - /** - * Specifies if the last pattern in a multi line problem matcher should - * loop as long as it does match a line consequently. Only valid on the - * last problem pattern in a multi line problem matcher. - */ - loop?: boolean; - } - - /** - * A multi line problem pattern. - */ - export type MultiLineProblemPattern = ProblemPattern[]; - - /** - * The way how the file location is interpreted - */ - export enum FileLocationKind { - /** - * VS Code should decide based on whether the file path found in the - * output is absolute or relative. A relative file path will be treated - * relative to the workspace root. - */ - Auto = 1, - - /** - * Always treat the file path relative. - */ - Relative = 2, - - /** - * Always treat the file path absolute. - */ - Absolute = 3 - } - - /** - * Controls to which kind of documents problems are applied. - */ - export enum ApplyToKind { - /** - * Problems are applied to all documents. - */ - AllDocuments = 1, - /** - * Problems are applied to open documents only. - */ - OpenDocuments = 2, - - /** - * Problems are applied to closed documents only. - */ - ClosedDocuments = 3 - } - - - /** - * A background monitor pattern - */ - export interface BackgroundPattern { - /** - * The actual regular expression - */ - regexp: RegExp; - - /** - * The match group index of the filename. If provided the expression - * is matched for that file only. - */ - file?: number; - } - - /** - * A description to control the activity of a problem matcher - * watching a background task. - */ - export interface BackgroundMonitor { - /** - * If set to true the monitor is in active mode when the task - * starts. This is equals of issuing a line that matches the - * beginPattern. - */ - activeOnStart?: boolean; - - /** - * If matched in the output the start of a background activity is signaled. - */ - beginsPattern: RegExp | BackgroundPattern; - - /** - * If matched in the output the end of a background activity is signaled. - */ - endsPattern: RegExp | BackgroundPattern; - } - - /** - * Defines a problem matcher - */ - export interface ProblemMatcher { - /** - * The owner of a problem. Defaults to a generated id - * if omitted. - */ - owner?: string; - - /** - * The type of documents problems detected by this matcher - * apply to. Default to `ApplyToKind.AllDocuments` if omitted. - */ - applyTo?: ApplyToKind; - - /** - * How a file location recognize by a matcher should be interpreted. If omitted the file location - * if `FileLocationKind.Auto`. - */ - fileLocation?: FileLocationKind | string; - - /** - * The actual pattern used by the problem matcher. - */ - pattern: ProblemPattern | MultiLineProblemPattern; - - /** - * The default severity of a detected problem in the output. Used - * if the `ProblemPattern` doesn't define a severity match group. - */ - severity?: DiagnosticSeverity; - - /** - * A background monitor for tasks that are running in the background. - */ - backgound?: BackgroundMonitor; - } - - /** - * Controls the behaviour of the terminal's visibility. - */ - export enum RevealKind { - /** - * Always brings the terminal to front if the task is executed. - */ - Always = 1, - - /** - * Only brings the terminal to front if a problem is detected executing the task - * (e.g. the task couldn't be started because). - */ - Silent = 2, - - /** - * The terminal never comes to front when the task is executed. - */ - Never = 3 - } - - /** - * Controls terminal specific behaviour. - */ - export interface TerminalBehaviour { - /** - * Controls whether the terminal executing a task is brought to front or not. - * Defaults to `RevealKind.Always`. - */ - reveal?: RevealKind; - - /** - * Controls whether the command is echoed in the terminal or not. - */ - echo?: boolean; - } - - - export interface ProcessOptions { - /** - * The current working directory of the executed program or shell. - * If omitted VSCode's current workspace root is used. - */ - cwd?: string; - - /** - * The additional environment of the executed program or shell. If omitted - * the parent process' environment is used. If provided it is merged with - * the parent process' environment. - */ - env?: { [key: string]: string }; - } - - export namespace TaskGroup { - /** - * The clean task group - */ - export const Clean: 'clean'; - /** - * The build task group - */ - export const Build: 'build'; - /** - * The rebuild all task group - */ - export const RebuildAll: 'rebuildAll'; - /** - * The test task group - */ - export const Test: 'test'; - } - - /** - * The supported task groups. - */ - export type TaskGroup = 'clean' | 'build' | 'rebuildAll' | 'test'; - - /** - * A task that starts an external process. - */ - export class ProcessTask { - - /** - * Creates a process task. - * - * @param name the task's name. Is presented in the user interface. - * @param process the process to start. - * @param problemMatchers the problem matchers to use. - */ - constructor(name: string, process: string, ...problemMatchers: ProblemMatcher[]); - - /** - * Creates a process task. - * - * @param name the task's name. Is presented in the user interface. - * @param process the process to start. - * @param args arguments to be passed to the process. - * @param problemMatchers the problem matchers to use. - */ - constructor(name: string, process: string, args: string[], ...problemMatchers: ProblemMatcher[]); - - /** - * Creates a process task. - * - * @param name the task's name. Is presented in the user interface. - * @param process the process to start. - * @param args arguments to be passed to the process. - * @param options additional options for the started process. - * @param problemMatchers the problem matchers to use. - */ - constructor(name: string, process: string, args: string[], options: ProcessOptions, ...problemMatchers: ProblemMatcher[]); - - /** - * The task's name - */ - readonly name: string; - - /** - * The task's identifier. If omitted the name is - * used as an identifier. - */ - identifier: string; - - /** - * Whether the task is a background task or not. - */ - isBackground: boolean; - - /** - * The process to be executed. - */ - readonly process: string; - - /** - * The arguments passed to the process. Defaults to an empty array. - */ - args: string[]; - - /** - * The task group this tasks belongs to. Defaults to undefined meaning - * that the task doesn't belong to any special group. - */ - group?: TaskGroup; - - /** - * The process options used when the process is executed. - * Defaults to an empty object literal. - */ - options: ProcessOptions; - - /** - * The terminal options. Defaults to an empty object literal. - */ - terminal: TerminalBehaviour; - - /** - * The problem matchers attached to the task. Defaults to an empty - * array. - */ - problemMatchers: ProblemMatcher[]; - } - - export type ShellOptions = { - /** - * The shell executable. - */ - executable: string; - - /** - * The arguments to be passed to the shell executable used to run the task. - */ - shellArgs?: string[]; - - /** - * The current working directory of the executed shell. - * If omitted VSCode's current workspace root is used. - */ - cwd?: string; - - /** - * The additional environment of the executed shell. If omitted - * the parent process' environment is used. If provided it is merged with - * the parent process' environment. - */ - env?: { [key: string]: string }; - } | { - /** - * The current working directory of the executed shell. - * If omitted VSCode's current workspace root is used. - */ - cwd: string; - - /** - * The additional environment of the executed shell. If omitted - * the parent process' environment is used. If provided it is merged with - * the parent process' environment. - */ - env?: { [key: string]: string }; - } | { - /** - * The current working directory of the executed shell. - * If omitted VSCode's current workspace root is used. - */ - cwd?: string; - - /** - * The additional environment of the executed shell. If omitted - * the parent process' environment is used. If provided it is merged with - * the parent process' environment. - */ - env: { [key: string]: string }; - }; - - /** - * A task that executes a shell command. - */ - export class ShellTask { - - /** - * Creates a shell task. - * - * @param name the task's name. Is presented in the user interface. - * @param commandLine the command line to execute. - * @param problemMatchers the problem matchers to use. - */ - constructor(name: string, commandLine: string, ...problemMatchers: ProblemMatcher[]); - - /** - * Creates a shell task. - * - * @param name the task's name. Is presented in the user interface. - * @param commandLine the command line to execute. - * @param options additional options used when creating the shell. - * @param problemMatchers the problem matchers to use. - */ - constructor(name: string, commandLine: string, options: ShellOptions, ...problemMatchers: ProblemMatcher[]); - - /** - * The task's name - */ - readonly name: string; - - /** - * The task's identifier. If omitted the name is - * used as an identifier. - */ - identifier: string; - - /** - * Whether the task is a background task or not. - */ - isBackground: boolean; - - /** - * The command line to execute. - */ - readonly commandLine: string; - - /** - * The task group this tasks belongs to. Defaults to undefined meaning - * that the task doesn't belong to any special group. - */ - group?: TaskGroup; - - /** - * The shell options used when the shell is executed. Defaults to an - * empty object literal. - */ - options: ShellOptions; - - /** - * The terminal options. Defaults to an empty object literal. - */ - terminal: TerminalBehaviour; - - /** - * The problem matchers attached to the task. Defaults to an empty - * array. - */ - problemMatchers: ProblemMatcher[]; - } - - export type Task = ProcessTask | ShellTask; - - /** - * A task provider allows to add tasks to the task service. - * A task provider is registerd via #workspace.registerTaskProvider. - */ - export interface TaskProvider { - /** - * Provides additional tasks. - * @param token A cancellation token. - * @return a #TaskSet - */ - provideTasks(token: CancellationToken): ProviderResult; - } - - export namespace workspace { - /** - * Register a task provider. - * - * @param provider A task provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerTaskProvider(provider: TaskProvider): Disposable; - - } - export namespace window { export function sampleFunction(): Thenable; diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index 67bcbec00c9e2..c6bdc5a4d9645 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -159,13 +159,13 @@ namespace WathingMatcher { } namespace ProblemMatcher { - export function from(values: vscode.ProblemMatcher[]): Problems.ProblemMatcher[] { + export function from(values: (string | vscode.ProblemMatcher)[]): (string | Problems.ProblemMatcher)[] { if (values === void 0 || values === null) { return undefined; } - let result: Problems.ProblemMatcher[]; + let result: (string | Problems.ProblemMatcher)[]; for (let value of values) { - let converted = fromSingle(value); + let converted = typeof value === 'string' ? value : fromSingle(value); if (converted) { result.push(converted); } @@ -186,7 +186,6 @@ namespace ProblemMatcher { filePrefix: location.prefix, pattern: ProblemPattern.from(problemMatcher.pattern), severity: fromDiagnosticSeverity(problemMatcher.severity), - }; return result; } diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index d8279811f68e7..e52b04efaa450 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1018,12 +1018,12 @@ export enum RevealKind { export class BaseTask { private _name: string; - private _problemMatchers: vscode.ProblemMatcher[]; + private _problemMatchers: (string | vscode.ProblemMatcher)[]; private _identifier: string; private _isBackground: boolean; private _terminal: vscode.TerminalBehaviour; - constructor(name: string, problemMatchers: vscode.ProblemMatcher[]) { + constructor(name: string, problemMatchers: (string | vscode.ProblemMatcher)[]) { if (typeof name !== 'string') { throw illegalArgument('name'); } @@ -1074,11 +1074,11 @@ export class BaseTask { this._terminal = value; } - get problemMatchers(): vscode.ProblemMatcher[] { + get problemMatchers(): (string | vscode.ProblemMatcher)[] { return this._problemMatchers; } - set problemMatchers(value: vscode.ProblemMatcher[]) { + set problemMatchers(value: (string | vscode.ProblemMatcher)[]) { if (!Array.isArray(value)) { value = []; } @@ -1093,6 +1093,12 @@ namespace ProblemMatcher { } } +namespace ShellOptions { + export function is(value: any): value is vscode.ShellOptions { + return value && ((typeof value.executable === 'string') || (typeof value.cwd === 'string') || !!value.env); + } +} + export namespace TaskGroup { /** * The clean task group @@ -1126,40 +1132,35 @@ export class ProcessTask extends BaseTask { private _group: vscode.TaskGroup; private _options: vscode.ProcessOptions; - private static parseArguments(restArgs: any[]): { args: string[]; options: vscode.ProcessOptions; problemMatchers: vscode.ProblemMatcher[] } { - let args: string[] = []; - let options: vscode.ProcessOptions = undefined; - let problemMatchers: vscode.ProblemMatcher[] = []; - if (!restArgs || restArgs.length === 0) { - return { args, options, problemMatchers }; - } - let current: any = restArgs[0]; - if (Array.isArray(current)) { - args = current; - restArgs.shift(); - current = restArgs[0]; - } - if (ProblemMatcher.is(current)) { - problemMatchers = restArgs; - } else if (current) { - options = current; - restArgs.shift(); - if (restArgs.length > 0) { - problemMatchers = restArgs; - } - } - return { args, options, problemMatchers }; - } - - constructor(name: string, process: string, ...problemMatchers: vscode.ProblemMatcher[]); - constructor(name: string, process: string, args: string[], ...problemMatchers: vscode.ProblemMatcher[]); - constructor(name: string, process: string, args: string[], options: vscode.ProcessOptions, ...problemMatchers: vscode.ProblemMatcher[]); - constructor(name: string, process: string, ...rest: any[]) { + constructor(name: string, process: string, args?: string[], problemMatchers?: vscode.ProblemMatchers); + constructor(name: string, process: string, args: string[] | undefined, options: vscode.ProcessOptions, problemMatchers?: vscode.ProblemMatchers); + constructor(name: string, process: string, arg3?: string[], arg4?: vscode.ProcessOptions | vscode.ProblemMatchers, arg5?: vscode.ProblemMatchers) { if (typeof process !== 'string') { throw illegalArgument('process'); } - let { args, options, problemMatchers } = ProcessTask.parseArguments(rest); - super(name, problemMatchers); + let args: string[]; + let options: vscode.ProcessOptions; + let problemMatchers: vscode.ProblemMatchers; + + args = arg3 || []; + if (arg4) { + if (Array.isArray(arg4) || typeof arg4 === 'string' || ProblemMatcher.is(arg4)) { + problemMatchers = arg4; + } else { + options = arg4; + } + } + if (arg5 && !problemMatchers) { + problemMatchers = arg5; + } + let pm: (string | vscode.ProblemMatcher)[]; + if (problemMatchers && (typeof problemMatchers === 'string' || ProblemMatcher.is(problemMatchers))) { + pm = [problemMatchers]; + } else if (Array.isArray(problemMatchers)) { + pm = problemMatchers; + } + pm = pm || []; + super(name, pm); this._process = process; this._args = args; this._options = options || Object.create(null); @@ -1203,39 +1204,32 @@ export class ProcessTask extends BaseTask { } } -export class ShellTask extends BaseTask { +export class ShellTask extends BaseTask implements vscode.ShellTask { private _commandLine: string; private _group: vscode.TaskGroup; private _options: vscode.ShellOptions; - private static parseArguments(restArgs: any[]): { options: vscode.ShellOptions; problemMatchers: vscode.ProblemMatcher[] } { - let options: vscode.ShellOptions = undefined; - let problemMatchers: vscode.ProblemMatcher[] = []; - if (!restArgs || restArgs.length === 0) { - return { options, problemMatchers }; - } - let current: any = restArgs[0]; - if (current && !ProblemMatcher.is(current)) { - options = current; - restArgs.shift(); - current = restArgs[0]; - } - if (ProblemMatcher.is(current)) { - problemMatchers = restArgs; - } - return { options, problemMatchers }; - } - - constructor(name: string, commandLine: string, ...problemMatchers: vscode.ProblemMatcher[]); - constructor(name: string, commandLine: string, options: vscode.ShellOptions, ...problemMatchers: vscode.ProblemMatcher[]); - constructor(name: string, commandLine: string, ...rest: any[]) { + constructor(name: string, commandLine: string, problemMatchers?: vscode.ProblemMatchers); + constructor(name: string, commandLine: string, options: vscode.ShellOptions, problemMatchers?: vscode.ProblemMatchers); + constructor(name: string, commandLine: string, optionsOrProblemMatchers?: vscode.ShellOptions | vscode.ProblemMatchers, problemMatchers?: vscode.ProblemMatchers) { if (typeof commandLine !== 'string') { throw illegalArgument('commandLine'); } - let { options, problemMatchers } = ShellTask.parseArguments(rest); - - super(name, problemMatchers); + let options: vscode.ShellOptions = undefined; + let pm: (string | vscode.ProblemMatcher)[]; + if (ShellOptions.is(optionsOrProblemMatchers)) { + options = optionsOrProblemMatchers; + } else { + problemMatchers = optionsOrProblemMatchers; + } + if (problemMatchers && (typeof problemMatchers === 'string' || ProblemMatcher.is(problemMatchers))) { + pm = [problemMatchers]; + } else if (Array.isArray(problemMatchers)) { + pm = problemMatchers; + } + pm = pm || []; + super(name, pm); this._commandLine = commandLine; this._options = options || Object.create(null); } diff --git a/src/vs/workbench/parts/tasks/common/tasks.ts b/src/vs/workbench/parts/tasks/common/tasks.ts index 446ae9ca08c6d..78ba0fc9fa69b 100644 --- a/src/vs/workbench/parts/tasks/common/tasks.ts +++ b/src/vs/workbench/parts/tasks/common/tasks.ts @@ -175,7 +175,7 @@ export interface Task { /** * The problem watchers to use for this task */ - problemMatchers?: ProblemMatcher[]; + problemMatchers?: (string | ProblemMatcher)[]; } export enum ExecutionEngine { diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index a779eaf04c5e9..6dd5972868d71 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -791,17 +791,19 @@ class TaskService extends EventEmitter implements ITaskService { } private executeTask(task: Task, resolver: ITaskResolver): TPromise { - return this.textFileService.saveAll().then((value) => { // make sure all dirty files are saved - let executeResult = this.getTaskSystem().run(task, resolver); - if (executeResult.kind === TaskExecuteKind.Active) { - let active = executeResult.active; - if (active.same && active.background) { - this.messageService.show(Severity.Info, nls.localize('TaskSystem.activeSame', 'The task is already active and in watch mode. To terminate the task use `F1 > terminate task`')); - } else { - throw new TaskError(Severity.Warning, nls.localize('TaskSystem.active', 'There is already a task running. Terminate it first before executing another task.'), TaskErrors.RunningTask); + return ProblemMatcherRegistry.onReady().then(() => { + return this.textFileService.saveAll().then((value) => { // make sure all dirty files are saved + let executeResult = this.getTaskSystem().run(task, resolver); + if (executeResult.kind === TaskExecuteKind.Active) { + let active = executeResult.active; + if (active.same && active.background) { + this.messageService.show(Severity.Info, nls.localize('TaskSystem.activeSame', 'The task is already active and in watch mode. To terminate the task use `F1 > terminate task`')); + } else { + throw new TaskError(Severity.Warning, nls.localize('TaskSystem.active', 'There is already a task running. Terminate it first before executing another task.'), TaskErrors.RunningTask); + } } - } - return executeResult.promise; + return executeResult.promise; + }); }); } diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index 4e0d42260d10c..00b2950731fc9 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -24,7 +24,8 @@ import * as TPath from 'vs/base/common/paths'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IModelService } from 'vs/editor/common/services/modelService'; -import { ProblemMatcher /*, ProblemPattern, getResource */ } from 'vs/platform/markers/common/problemMatcher'; +import { ProblemMatcher, ProblemMatcherRegistry /*, ProblemPattern, getResource */ } from 'vs/platform/markers/common/problemMatcher'; + import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; @@ -553,15 +554,22 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { return value.map(s => this.resolveVariable(s)); } - private resolveMatchers(values: T[]): T[] { - if (values === void 0 || values === null) { + private resolveMatchers(values: (string | ProblemMatcher)[]): ProblemMatcher[] { + if (values === void 0 || values === null || values.length === 0) { return []; } - if (values.length === 0) { - return values; - } - let result: T[] = []; - values.forEach((matcher) => { + let result: ProblemMatcher[] = []; + values.forEach((value) => { + let matcher: ProblemMatcher; + if (Types.isString(value)) { + matcher = ProblemMatcherRegistry.get(value); + } else { + matcher = value; + } + if (!matcher) { + this.outputChannel.append(nls.localize('unkownProblemMatcher', 'Problem matcher {0} can\'t be resolved. The matcher will be ignored')); + return; + } if (!matcher.filePrefix) { result.push(matcher); } else { diff --git a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts index 513a82606f9b3..9cc26f22205dd 100644 --- a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts @@ -22,7 +22,7 @@ import { IConfigurationResolverService } from 'vs/workbench/services/configurati import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IModelService } from 'vs/editor/common/services/modelService'; -import { ProblemMatcher } from 'vs/platform/markers/common/problemMatcher'; +import { ProblemMatcher, ProblemMatcherRegistry } from 'vs/platform/markers/common/problemMatcher'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { StartStopProblemCollector, WatchingProblemCollector, ProblemCollectorEvents } from 'vs/workbench/parts/tasks/common/problemCollectors'; @@ -335,12 +335,22 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem { return value.map(s => this.resolveVariable(s)); } - private resolveMatchers(values: T[]): T[] { - if (values.length === 0) { - return values; + private resolveMatchers(values: (string | ProblemMatcher)[]): ProblemMatcher[] { + if (values === void 0 || values === null || values.length === 0) { + return []; } - let result: T[] = []; - values.forEach((matcher) => { + let result: ProblemMatcher[] = []; + values.forEach((value) => { + let matcher: ProblemMatcher; + if (Types.isString(value)) { + matcher = ProblemMatcherRegistry.get(value); + } else { + matcher = value; + } + if (!matcher) { + this.outputChannel.append(nls.localize('unkownProblemMatcher', 'Problem matcher {0} can\'t be resolved. The matcher will be ignored')); + return; + } if (!matcher.filePrefix) { result.push(matcher); } else { diff --git a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts index fd07989830bf1..fb53a216bd3ae 100644 --- a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts +++ b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts @@ -432,22 +432,29 @@ function assertCommandConfiguration(actual: Tasks.CommandConfiguration, expected } } -function assertProblemMatcher(actual: ProblemMatcher, expected: ProblemMatcher) { - if (expected.owner === ProblemMatcherBuilder.DEFAULT_UUID) { - try { - UUID.parse(actual.owner); - } catch (err) { - assert.fail(actual.owner, 'Owner must be a UUID'); - } - } else { - assert.strictEqual(actual.owner, expected.owner); +function assertProblemMatcher(actual: string | ProblemMatcher, expected: string | ProblemMatcher) { + assert.strictEqual(typeof actual, typeof expected); + if (typeof actual === 'string' && typeof expected === 'string') { + assert.strictEqual(actual, expected, 'Problem matcher references are different'); + return; } - assert.strictEqual(actual.applyTo, expected.applyTo); - assert.strictEqual(actual.severity, expected.severity); - assert.strictEqual(actual.fileLocation, expected.fileLocation); - assert.strictEqual(actual.filePrefix, expected.filePrefix); - if (actual.pattern && expected.pattern) { - assertProblemPatterns(actual.pattern, expected.pattern); + if (typeof actual !== 'string' && typeof expected !== 'string') { + if (expected.owner === ProblemMatcherBuilder.DEFAULT_UUID) { + try { + UUID.parse(actual.owner); + } catch (err) { + assert.fail(actual.owner, 'Owner must be a UUID'); + } + } else { + assert.strictEqual(actual.owner, expected.owner); + } + assert.strictEqual(actual.applyTo, expected.applyTo); + assert.strictEqual(actual.severity, expected.severity); + assert.strictEqual(actual.fileLocation, expected.fileLocation); + assert.strictEqual(actual.filePrefix, expected.filePrefix); + if (actual.pattern && expected.pattern) { + assertProblemPatterns(actual.pattern, expected.pattern); + } } } From 544de31692125faa555ae5f0c80d4170180cbe90 Mon Sep 17 00:00:00 2001 From: Amy Qiu Date: Thu, 18 May 2017 13:00:04 -0700 Subject: [PATCH 0723/2747] Fix #26821 Memento - Search now remembers if you cleared your input before shutdown --- src/vs/workbench/parts/search/browser/searchViewlet.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index ebb3c5d321707..2983e323396c7 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -1349,6 +1349,13 @@ export class SearchViewlet extends Viewlet { ]; } + public shutdown(): void { + this.viewletSettings['query.contentPattern'] = this.searchWidget.searchInput.getValue(); + this.saveMemento(); + + super.shutdown(); + } + public dispose(): void { this.isDisposed = true; From 55e5f69dd3ac26e761c746470f0cb9de54ecaa42 Mon Sep 17 00:00:00 2001 From: Amy Qiu Date: Thu, 18 May 2017 14:09:32 -0700 Subject: [PATCH 0724/2747] Fix saveMemento --- src/vs/workbench/parts/search/browser/searchViewlet.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index 2983e323396c7..e99d35d1ad4e1 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -1351,7 +1351,6 @@ export class SearchViewlet extends Viewlet { public shutdown(): void { this.viewletSettings['query.contentPattern'] = this.searchWidget.searchInput.getValue(); - this.saveMemento(); super.shutdown(); } From 8dd07034c0b24df40657f8fecc8a96983d456db0 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 18 May 2017 15:17:31 -0700 Subject: [PATCH 0725/2747] Split reporter out into own file --- .../typescript/src/typescriptServiceClient.ts | 40 +--------- extensions/typescript/src/utils/telemetry.ts | 76 +++++++++++++++++++ 2 files changed, 80 insertions(+), 36 deletions(-) create mode 100644 extensions/typescript/src/utils/telemetry.ts diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 300e0fb842e51..f10338b0cd7a0 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -22,9 +22,8 @@ import Logger from './utils/logger'; import * as VersionStatus from './utils/versionStatus'; import * as is from './utils/is'; -import TelemetryReporter from 'vscode-extension-telemetry'; - import * as nls from 'vscode-nls'; +import TelemetryReporter from "./utils/telemetry"; const localize = nls.loadMessageBundle(); interface CallbackItem { @@ -43,12 +42,6 @@ interface RequestItem { callbacks: CallbackItem | null; } -interface IPackageInfo { - name: string; - version: string; - aiKey: string; -} - enum Trace { Off, Messages, @@ -162,7 +155,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private _onDidEndInstallTypings = new EventEmitter(); private _onTypesInstallerInitializationFailed = new EventEmitter(); - private _packageInfo: IPackageInfo | null; private _apiVersion: API; private telemetryReporter: TelemetryReporter; private checkJs: boolean; @@ -230,10 +222,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.restartTsServer(); } })); - if (this.packageInfo && this.packageInfo.aiKey) { - this.telemetryReporter = new TelemetryReporter(this.packageInfo.name, this.packageInfo.version, this.packageInfo.aiKey); - disposables.push(this.telemetryReporter); - } + this.telemetryReporter = new TelemetryReporter(); + disposables.push(this.telemetryReporter); this.startService(); } @@ -341,30 +331,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.logger.logLevel('Trace', message, data); } - private get packageInfo(): IPackageInfo | null { - - if (this._packageInfo !== undefined) { - return this._packageInfo; - } - let packagePath = path.join(__dirname, './../package.json'); - let extensionPackage = require(packagePath); - if (extensionPackage) { - this._packageInfo = { - name: extensionPackage.name, - version: extensionPackage.version, - aiKey: extensionPackage.aiKey - }; - } else { - this._packageInfo = null; - } - - return this._packageInfo; - } - public logTelemetry(eventName: string, properties?: { [prop: string]: string }) { - if (this.telemetryReporter) { - this.telemetryReporter.sendTelemetryEvent(eventName, properties); - } + this.telemetryReporter.logTelemetry(eventName, properties); } private service(): Thenable { diff --git a/extensions/typescript/src/utils/telemetry.ts b/extensions/typescript/src/utils/telemetry.ts new file mode 100644 index 0000000000000..8092b4fb4a44e --- /dev/null +++ b/extensions/typescript/src/utils/telemetry.ts @@ -0,0 +1,76 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as path from 'path'; +import VsCodeTelemetryReporter from 'vscode-extension-telemetry'; +import { Disposable } from "vscode"; + + +interface IPackageInfo { + name: string; + version: string; + aiKey: string; +} + + +export default class TelemetryReporter extends Disposable { + private _packageInfo: IPackageInfo | null; + + private _reporter: VsCodeTelemetryReporter | null; + + constructor() { + super(() => this.dispose()); + } + + dispose() { + if (this._reporter) { + this._reporter.dispose(); + this._reporter = null; + } + } + + public logTelemetry(eventName: string, properties?: { [prop: string]: string }) { + if (this._reporter) { + this._reporter.sendTelemetryEvent(eventName, properties); + } + } + + private get reporter(): VsCodeTelemetryReporter | null { + if (typeof this._reporter !== 'undefined') { + return this._reporter; + } + + if (this.packageInfo && this.packageInfo.aiKey) { + this._reporter = new VsCodeTelemetryReporter( + this.packageInfo.name, + this.packageInfo.version, + this.packageInfo.aiKey); + } else { + this._reporter = null; + } + return this._reporter; + } + + private get packageInfo(): IPackageInfo | null { + if (this._packageInfo !== undefined) { + return this._packageInfo; + } + let packagePath = path.join(__dirname, './../package.json'); + let extensionPackage = require(packagePath); + if (extensionPackage) { + this._packageInfo = { + name: extensionPackage.name, + version: extensionPackage.version, + aiKey: extensionPackage.aiKey + }; + } else { + this._packageInfo = null; + } + + return this._packageInfo; + } +} \ No newline at end of file From 89f1f0228635daf1ec64f50e32c3981aa44589bc Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 18 May 2017 15:20:13 -0700 Subject: [PATCH 0726/2747] Use correct reporter instance --- extensions/typescript/src/utils/telemetry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/typescript/src/utils/telemetry.ts b/extensions/typescript/src/utils/telemetry.ts index 8092b4fb4a44e..1f5bebb24019a 100644 --- a/extensions/typescript/src/utils/telemetry.ts +++ b/extensions/typescript/src/utils/telemetry.ts @@ -34,8 +34,8 @@ export default class TelemetryReporter extends Disposable { } public logTelemetry(eventName: string, properties?: { [prop: string]: string }) { - if (this._reporter) { - this._reporter.sendTelemetryEvent(eventName, properties); + if (this.reporter) { + this.reporter.sendTelemetryEvent(eventName, properties); } } From a7c862281adf9824a048e28fea8113c85dca517f Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 18 May 2017 12:47:55 +0200 Subject: [PATCH 0727/2747] Stylistic changes --- src/vs/editor/common/controller/cursor.ts | 342 ++++++++++------------ 1 file changed, 158 insertions(+), 184 deletions(-) diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index bc49cef51d3b6..0388e5bc4895f 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -41,14 +41,11 @@ interface IExecContext { interface ICommandData { operations: editorCommon.IIdentifiedSingleEditOperation[]; - hadTrackedRange: boolean; hadTrackedEditOperation: boolean; } interface ICommandsData { operations: editorCommon.IIdentifiedSingleEditOperation[]; - hadTrackedRanges: boolean[]; - anyoneHadTrackedRange: boolean; anyoneHadTrackedEditOperation: boolean; } @@ -60,19 +57,18 @@ export class Cursor extends Disposable implements ICursors { public onDidChangeSelection(listener: (e: ICursorSelectionChangedEvent) => void): IDisposable { return this._eventEmitter.addListener(CursorEventType.CursorSelectionChanged, listener); } - - private configuration: editorCommon.IConfiguration; - public context: CursorContext; - private model: editorCommon.IModel; - private _eventEmitter: EventEmitter; - public addBulkListener(listener: BulkListenerCallback): IDisposable { return this._eventEmitter.addBulkListener(listener); } - private cursors: CursorCollection; - private viewModelHelper: IViewModelHelper; + private readonly _eventEmitter: EventEmitter; + private readonly _configuration: editorCommon.IConfiguration; + private readonly _model: editorCommon.IModel; + private readonly _viewModelHelper: IViewModelHelper; + public context: CursorContext; + + private _cursors: CursorCollection; private _isHandling: boolean; private _isDoingComposition: boolean; private _columnSelectData: IColumnSelectData; @@ -84,35 +80,35 @@ export class Cursor extends Disposable implements ICursors { constructor(configuration: editorCommon.IConfiguration, model: editorCommon.IModel, viewModelHelper: IViewModelHelper) { super(); this._eventEmitter = this._register(new EventEmitter()); - this.configuration = configuration; - this.model = model; - this.viewModelHelper = viewModelHelper; + this._configuration = configuration; + this._model = model; + this._viewModelHelper = viewModelHelper; const createCursorContext = () => { const config = new CursorConfiguration( - this.model.getLanguageIdentifier(), - this.model.getOneIndent(), - this.model.getOptions(), - this.configuration + this._model.getLanguageIdentifier(), + this._model.getOneIndent(), + this._model.getOptions(), + this._configuration ); this.context = new CursorContext( - this.model, - this.viewModelHelper, + this._model, + this._viewModelHelper, config ); - if (this.cursors) { - this.cursors.updateContext(this.context); + if (this._cursors) { + this._cursors.updateContext(this.context); } }; createCursorContext(); - this.cursors = new CursorCollection(this.context); + this._cursors = new CursorCollection(this.context); this._isHandling = false; this._isDoingComposition = false; this._columnSelectData = null; - this._register(this.model.addBulkListener((events) => { + this._register(this._model.addBulkListener((events) => { if (this._isHandling) { return; } @@ -143,7 +139,7 @@ export class Cursor extends Disposable implements ICursors { this._onModelContentChanged(hadFlushEvent); })); - this._register(this.model.onDidChangeLanguage((e) => { + this._register(this._model.onDidChangeLanguage((e) => { createCursorContext(); })); this._register(LanguageConfigurationRegistry.onDidChange(() => { @@ -153,7 +149,7 @@ export class Cursor extends Disposable implements ICursors { this._register(model.onDidChangeOptions(() => { createCursorContext(); })); - this._register(this.configuration.onDidChange((e) => { + this._register(this._configuration.onDidChange((e) => { if (CursorConfiguration.shouldRecreate(e)) { createCursorContext(); } @@ -164,40 +160,37 @@ export class Cursor extends Disposable implements ICursors { } public dispose(): void { - this.model = null; - this.cursors.dispose(); - this.cursors = null; - this.configuration = null; - this.viewModelHelper = null; + this._cursors.dispose(); + this._cursors = null; super.dispose(); } public getPrimaryCursor(): CursorState { - return this.cursors.getPrimaryCursor(); + return this._cursors.getPrimaryCursor(); } public getLastAddedCursorIndex(): number { - return this.cursors.getLastAddedCursorIndex(); + return this._cursors.getLastAddedCursorIndex(); } public getAll(): CursorState[] { - return this.cursors.getAll(); + return this._cursors.getAll(); } public setStates(source: string, reason: CursorChangeReason, states: CursorState[]): void { - const oldSelections = this.cursors.getSelections(); - const oldViewSelections = this.cursors.getViewSelections(); + const oldSelections = this._cursors.getSelections(); + const oldViewSelections = this._cursors.getViewSelections(); // TODO@Alex // ensure valid state on all cursors // this.cursors.ensureValidState(); - this.cursors.setStates(states); - this.cursors.normalize(); + this._cursors.setStates(states); + this._cursors.normalize(); this._columnSelectData = null; - const newSelections = this.cursors.getSelections(); - const newViewSelections = this.cursors.getViewSelections(); + const newSelections = this._cursors.getSelections(); + const newViewSelections = this._cursors.getViewSelections(); let somethingChanged = false; if (oldSelections.length !== newSelections.length) { @@ -241,12 +234,11 @@ export class Cursor extends Disposable implements ICursors { public saveState(): editorCommon.ICursorState[] { - var selections = this.cursors.getSelections(), - result: editorCommon.ICursorState[] = [], - selection: Selection; + let result: editorCommon.ICursorState[] = []; - for (var i = 0; i < selections.length; i++) { - selection = selections[i]; + const selections = this._cursors.getSelections(); + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; result.push({ inSelectionMode: !selection.isEmpty(), @@ -266,13 +258,13 @@ export class Cursor extends Disposable implements ICursors { public restoreState(states: editorCommon.ICursorState[]): void { - var desiredSelections: ISelection[] = [], - state: editorCommon.ICursorState; + let desiredSelections: ISelection[] = []; - for (var i = 0; i < states.length; i++) { - state = states[i]; + for (let i = 0, len = states.length; i < len; i++) { + const state = states[i]; - var positionLineNumber = 1, positionColumn = 1; + let positionLineNumber = 1; + let positionColumn = 1; // Avoid missing properties on the literal if (state.position && state.position.lineNumber) { @@ -282,7 +274,8 @@ export class Cursor extends Disposable implements ICursors { positionColumn = state.position.column; } - var selectionStartLineNumber = positionLineNumber, selectionStartColumn = positionColumn; + let selectionStartLineNumber = positionLineNumber; + let selectionStartColumn = positionColumn; // Avoid missing properties on the literal if (state.selectionStart && state.selectionStart.lineNumber) { @@ -301,7 +294,7 @@ export class Cursor extends Disposable implements ICursors { } this._onHandler('restoreState', (ctx: IMultipleCursorOperationContext) => { - this.cursors.setSelections(desiredSelections); + this._cursors.setSelections(desiredSelections); return false; }, 'restoreState', null); } @@ -309,9 +302,9 @@ export class Cursor extends Disposable implements ICursors { private _onModelContentChanged(hadFlushEvent: boolean): void { if (hadFlushEvent) { // a model.setValue() was called - this.cursors.dispose(); + this._cursors.dispose(); - this.cursors = new CursorCollection(this.context); + this._cursors = new CursorCollection(this.context); this.emitCursorPositionChanged('model', CursorChangeReason.ContentFlush); this.emitCursorSelectionChanged('model', CursorChangeReason.ContentFlush); @@ -319,13 +312,13 @@ export class Cursor extends Disposable implements ICursors { if (!this._isHandling) { // Read the markers before entering `_onHandler`, since that would validate // the position and ruin the markers - const selectionsFromMarkers = this.cursors.readSelectionFromMarkers(); + const selectionsFromMarkers = this._cursors.readSelectionFromMarkers(); this._onHandler('recoverSelectionFromMarkers', (ctx: IMultipleCursorOperationContext) => { ctx.cursorPositionChangeReason = CursorChangeReason.RecoverFromMarkers; ctx.shouldReveal = false; ctx.shouldPushStackElementBefore = false; ctx.shouldPushStackElementAfter = false; - this.cursors.setSelections(selectionsFromMarkers); + this._cursors.setSelections(selectionsFromMarkers); }, 'modelChange', null); } } @@ -334,21 +327,21 @@ export class Cursor extends Disposable implements ICursors { // ------ some getters/setters public getSelection(): Selection { - return this.cursors.getPrimaryCursor().modelState.selection; + return this._cursors.getPrimaryCursor().modelState.selection; } public getSelections(): Selection[] { - return this.cursors.getSelections(); + return this._cursors.getSelections(); } public getPosition(): Position { - return this.cursors.getPrimaryCursor().modelState.position; + return this._cursors.getPrimaryCursor().modelState.position; } public setSelections(source: string, selections: ISelection[]): void { this._onHandler('setSelections', (ctx: IMultipleCursorOperationContext) => { ctx.shouldReveal = false; - this.cursors.setSelections(selections); + this._cursors.setSelections(selections); return false; }, source, null); } @@ -357,7 +350,7 @@ export class Cursor extends Disposable implements ICursors { private _createAndInterpretHandlerCtx(eventSource: string, eventData: any, callback: (currentHandlerCtx: IMultipleCursorOperationContext) => void): void { - var ctx: IMultipleCursorOperationContext = { + const ctx: IMultipleCursorOperationContext = { cursorPositionChangeReason: CursorChangeReason.NotSet, shouldReveal: true, eventSource: eventSource, @@ -371,7 +364,7 @@ export class Cursor extends Disposable implements ICursors { callback(ctx); this._interpretHandlerContext(ctx); - this.cursors.normalize(); + this._cursors.normalize(); } private _onHandler(command: string, handler: (ctx: IMultipleCursorOperationContext) => void, source: string, data: any): void { @@ -379,11 +372,11 @@ export class Cursor extends Disposable implements ICursors { this._isHandling = true; try { - const oldSelections = this.cursors.getSelections(); - const oldViewSelections = this.cursors.getViewSelections(); + const oldSelections = this._cursors.getSelections(); + const oldViewSelections = this._cursors.getViewSelections(); // ensure valid state on all cursors - this.cursors.ensureValidState(); + this._cursors.ensureValidState(); let cursorPositionChangeReason: CursorChangeReason; let shouldReveal: boolean; @@ -395,8 +388,8 @@ export class Cursor extends Disposable implements ICursors { shouldReveal = currentHandlerCtx.shouldReveal; }); - const newSelections = this.cursors.getSelections(); - const newViewSelections = this.cursors.getViewSelections(); + const newSelections = this._cursors.getSelections(); + const newViewSelections = this._cursors.getViewSelections(); let somethingChanged = false; if (oldSelections.length !== newSelections.length) { @@ -432,7 +425,7 @@ export class Cursor extends Disposable implements ICursors { private _interpretHandlerContext(ctx: IMultipleCursorOperationContext): void { if (ctx.shouldPushStackElementBefore) { - this.model.pushStackElement(); + this._model.pushStackElement(); ctx.shouldPushStackElementBefore = false; } @@ -442,7 +435,7 @@ export class Cursor extends Disposable implements ICursors { ctx.executeCommands = []; if (ctx.shouldPushStackElementAfter) { - this.model.pushStackElement(); + this._model.pushStackElement(); ctx.shouldPushStackElementAfter = false; } } @@ -452,16 +445,16 @@ export class Cursor extends Disposable implements ICursors { return; } - this.cursors.setSelections(cursorState); + this._cursors.setSelections(cursorState); } private _getEditOperationsFromCommand(ctx: IExecContext, majorIdentifier: number, command: editorCommon.ICommand, isAutoWhitespaceCommand: boolean): ICommandData { // This method acts as a transaction, if the command fails // everything it has done is ignored - var operations: editorCommon.IIdentifiedSingleEditOperation[] = [], - operationMinor = 0; + let operations: editorCommon.IIdentifiedSingleEditOperation[] = []; + let operationMinor = 0; - var addEditOperation = (selection: Range, text: string) => { + const addEditOperation = (selection: Range, text: string) => { if (selection.isEmpty() && text === '') { // This command wants to add a no-op => no thank you return; @@ -478,16 +471,15 @@ export class Cursor extends Disposable implements ICursors { }); }; - var hadTrackedEditOperation = false; - var addTrackedEditOperation = (selection: Range, text: string) => { + let hadTrackedEditOperation = false; + const addTrackedEditOperation = (selection: Range, text: string) => { hadTrackedEditOperation = true; addEditOperation(selection, text); }; - var hadTrackedRange = false; - var trackSelection = (selection: Selection, trackPreviousOnEmpty?: boolean) => { - var selectionMarkerStickToPreviousCharacter: boolean, - positionMarkerStickToPreviousCharacter: boolean; + const trackSelection = (selection: Selection, trackPreviousOnEmpty?: boolean) => { + let selectionMarkerStickToPreviousCharacter: boolean; + let positionMarkerStickToPreviousCharacter: boolean; if (selection.isEmpty()) { // Try to lock it with surrounding text @@ -495,7 +487,7 @@ export class Cursor extends Disposable implements ICursors { selectionMarkerStickToPreviousCharacter = trackPreviousOnEmpty; positionMarkerStickToPreviousCharacter = trackPreviousOnEmpty; } else { - var maxLineColumn = this.model.getLineMaxColumn(selection.startLineNumber); + const maxLineColumn = this._model.getLineMaxColumn(selection.startLineNumber); if (selection.startColumn === maxLineColumn) { selectionMarkerStickToPreviousCharacter = true; positionMarkerStickToPreviousCharacter = true; @@ -514,59 +506,48 @@ export class Cursor extends Disposable implements ICursors { } } - var l = ctx.selectionStartMarkers.length; - ctx.selectionStartMarkers[l] = this.model._addMarker(0, selection.selectionStartLineNumber, selection.selectionStartColumn, selectionMarkerStickToPreviousCharacter); - ctx.positionMarkers[l] = this.model._addMarker(0, selection.positionLineNumber, selection.positionColumn, positionMarkerStickToPreviousCharacter); + const l = ctx.selectionStartMarkers.length; + ctx.selectionStartMarkers[l] = this._model._addMarker(0, selection.selectionStartLineNumber, selection.selectionStartColumn, selectionMarkerStickToPreviousCharacter); + ctx.positionMarkers[l] = this._model._addMarker(0, selection.positionLineNumber, selection.positionColumn, positionMarkerStickToPreviousCharacter); return l.toString(); }; - var editOperationBuilder: editorCommon.IEditOperationBuilder = { + const editOperationBuilder: editorCommon.IEditOperationBuilder = { addEditOperation: addEditOperation, addTrackedEditOperation: addTrackedEditOperation, trackSelection: trackSelection }; try { - command.getEditOperations(this.model, editOperationBuilder); + command.getEditOperations(this._model, editOperationBuilder); } catch (e) { e.friendlyMessage = nls.localize('corrupt.commands', "Unexpected exception while executing command."); onUnexpectedError(e); return { operations: [], - hadTrackedRange: false, hadTrackedEditOperation: false }; } return { operations: operations, - hadTrackedRange: hadTrackedRange, hadTrackedEditOperation: hadTrackedEditOperation }; } private _getEditOperations(ctx: IExecContext, commands: editorCommon.ICommand[], isAutoWhitespaceCommand: boolean[]): ICommandsData { - var oneResult: ICommandData; - var operations: editorCommon.IIdentifiedSingleEditOperation[] = []; - var hadTrackedRanges: boolean[] = []; - var anyoneHadTrackedEditOperation: boolean = false; - var anyoneHadTrackedRange: boolean; + let operations: editorCommon.IIdentifiedSingleEditOperation[] = []; + let anyoneHadTrackedEditOperation: boolean = false; - for (var i = 0; i < commands.length; i++) { + for (let i = 0, len = commands.length; i < len; i++) { if (commands[i]) { - oneResult = this._getEditOperationsFromCommand(ctx, i, commands[i], isAutoWhitespaceCommand[i]); + const oneResult = this._getEditOperationsFromCommand(ctx, i, commands[i], isAutoWhitespaceCommand[i]); operations = operations.concat(oneResult.operations); - hadTrackedRanges[i] = oneResult.hadTrackedRange; - anyoneHadTrackedRange = anyoneHadTrackedRange || hadTrackedRanges[i]; anyoneHadTrackedEditOperation = anyoneHadTrackedEditOperation || oneResult.hadTrackedEditOperation; - } else { - hadTrackedRanges[i] = false; } } return { operations: operations, - hadTrackedRanges: hadTrackedRanges, - anyoneHadTrackedRange: anyoneHadTrackedRange, anyoneHadTrackedEditOperation: anyoneHadTrackedEditOperation }; } @@ -582,18 +563,16 @@ export class Cursor extends Disposable implements ICursors { }); // Operations can not overlap! - var loserCursorsMap: { [index: string]: boolean; } = {}; - - var previousOp: editorCommon.IIdentifiedSingleEditOperation; - var currentOp: editorCommon.IIdentifiedSingleEditOperation; - var loserMajor: number; + let loserCursorsMap: { [index: string]: boolean; } = {}; - for (var i = 1; i < operations.length; i++) { - previousOp = operations[i - 1]; - currentOp = operations[i]; + for (let i = 1; i < operations.length; i++) { + const previousOp = operations[i - 1]; + const currentOp = operations[i]; if (previousOp.range.getStartPosition().isBefore(currentOp.range.getEndPosition())) { + let loserMajor: number; + if (previousOp.identifier.major > currentOp.identifier.major) { // previousOp loses the battle loserMajor = previousOp.identifier.major; @@ -603,7 +582,7 @@ export class Cursor extends Disposable implements ICursors { loserCursorsMap[loserMajor.toString()] = true; - for (var j = 0; j < operations.length; j++) { + for (let j = 0; j < operations.length; j++) { if (operations[j].identifier.major === loserMajor) { operations.splice(j, 1); if (j < i) { @@ -623,34 +602,30 @@ export class Cursor extends Disposable implements ICursors { } private _internalExecuteCommands(commands: editorCommon.ICommand[], isAutoWhitespaceCommand: boolean[]): void { - var ctx: IExecContext = { + const ctx: IExecContext = { selectionStartMarkers: [], positionMarkers: [] }; this._innerExecuteCommands(ctx, commands, isAutoWhitespaceCommand); - for (var i = 0; i < ctx.selectionStartMarkers.length; i++) { - this.model._removeMarker(ctx.selectionStartMarkers[i]); - this.model._removeMarker(ctx.positionMarkers[i]); + for (let i = 0; i < ctx.selectionStartMarkers.length; i++) { + this._model._removeMarker(ctx.selectionStartMarkers[i]); + this._model._removeMarker(ctx.positionMarkers[i]); } } private _arrayIsEmpty(commands: editorCommon.ICommand[]): boolean { - var i: number, - len: number; - - for (i = 0, len = commands.length; i < len; i++) { + for (let i = 0, len = commands.length; i < len; i++) { if (commands[i]) { return false; } } - return true; } private _innerExecuteCommands(ctx: IExecContext, commands: editorCommon.ICommand[], isAutoWhitespaceCommand: boolean[]): void { - if (this.configuration.editor.readOnly) { + if (this._configuration.editor.readOnly) { return; } @@ -658,27 +633,27 @@ export class Cursor extends Disposable implements ICursors { return; } - var selectionsBefore = this.cursors.getSelections(); + const selectionsBefore = this._cursors.getSelections(); - var commandsData = this._getEditOperations(ctx, commands, isAutoWhitespaceCommand); - if (commandsData.operations.length === 0 && !commandsData.anyoneHadTrackedRange) { + const commandsData = this._getEditOperations(ctx, commands, isAutoWhitespaceCommand); + if (commandsData.operations.length === 0) { return; } - var rawOperations = commandsData.operations; + const rawOperations = commandsData.operations; - var editableRange = this.model.getEditableRange(); - var editableRangeStart = editableRange.getStartPosition(); - var editableRangeEnd = editableRange.getEndPosition(); - for (var i = 0; i < rawOperations.length; i++) { - var operationRange = rawOperations[i].range; + const editableRange = this._model.getEditableRange(); + const editableRangeStart = editableRange.getStartPosition(); + const editableRangeEnd = editableRange.getEndPosition(); + for (let i = 0, len = rawOperations.length; i < len; i++) { + const operationRange = rawOperations[i].range; if (!editableRangeStart.isBeforeOrEqual(operationRange.getStartPosition()) || !operationRange.getEndPosition().isBeforeOrEqual(editableRangeEnd)) { // These commands are outside of the editable range return; } } - var loserCursorsMap = this._getLoserCursorMap(rawOperations); + const loserCursorsMap = this._getLoserCursorMap(rawOperations); if (loserCursorsMap.hasOwnProperty('0')) { // These commands are very messed up console.warn('Ignoring commands'); @@ -686,8 +661,8 @@ export class Cursor extends Disposable implements ICursors { } // Remove operations belonging to losing cursors - var filteredOperations: editorCommon.IIdentifiedSingleEditOperation[] = []; - for (var i = 0; i < rawOperations.length; i++) { + let filteredOperations: editorCommon.IIdentifiedSingleEditOperation[] = []; + for (let i = 0, len = rawOperations.length; i < len; i++) { if (!loserCursorsMap.hasOwnProperty(rawOperations[i].identifier.major.toString())) { filteredOperations.push(rawOperations[i]); } @@ -698,35 +673,35 @@ export class Cursor extends Disposable implements ICursors { if (commandsData.anyoneHadTrackedEditOperation && filteredOperations.length > 0) { filteredOperations[0]._isTracked = true; } - var selectionsAfter = this.model.pushEditOperations(selectionsBefore, filteredOperations, (inverseEditOperations: editorCommon.IIdentifiedSingleEditOperation[]): Selection[] => { - var groupedInverseEditOperations: editorCommon.IIdentifiedSingleEditOperation[][] = []; - for (var i = 0; i < selectionsBefore.length; i++) { + const selectionsAfter = this._model.pushEditOperations(selectionsBefore, filteredOperations, (inverseEditOperations: editorCommon.IIdentifiedSingleEditOperation[]): Selection[] => { + let groupedInverseEditOperations: editorCommon.IIdentifiedSingleEditOperation[][] = []; + for (let i = 0; i < selectionsBefore.length; i++) { groupedInverseEditOperations[i] = []; } - for (var i = 0; i < inverseEditOperations.length; i++) { - var op = inverseEditOperations[i]; + for (let i = 0; i < inverseEditOperations.length; i++) { + const op = inverseEditOperations[i]; if (!op.identifier) { // perhaps auto whitespace trim edits continue; } groupedInverseEditOperations[op.identifier.major].push(op); } - var minorBasedSorter = (a: editorCommon.IIdentifiedSingleEditOperation, b: editorCommon.IIdentifiedSingleEditOperation) => { + const minorBasedSorter = (a: editorCommon.IIdentifiedSingleEditOperation, b: editorCommon.IIdentifiedSingleEditOperation) => { return a.identifier.minor - b.identifier.minor; }; - var cursorSelections: Selection[] = []; - for (var i = 0; i < selectionsBefore.length; i++) { - if (groupedInverseEditOperations[i].length > 0 || commandsData.hadTrackedRanges[i]) { + let cursorSelections: Selection[] = []; + for (let i = 0; i < selectionsBefore.length; i++) { + if (groupedInverseEditOperations[i].length > 0) { groupedInverseEditOperations[i].sort(minorBasedSorter); - cursorSelections[i] = commands[i].computeCursorState(this.model, { + cursorSelections[i] = commands[i].computeCursorState(this._model, { getInverseEditOperations: () => { return groupedInverseEditOperations[i]; }, getTrackedSelection: (id: string) => { - var idx = parseInt(id, 10); - var selectionStartMarker = this.model._getMarker(ctx.selectionStartMarkers[idx]); - var positionMarker = this.model._getMarker(ctx.positionMarkers[idx]); + const idx = parseInt(id, 10); + const selectionStartMarker = this._model._getMarker(ctx.selectionStartMarkers[idx]); + const positionMarker = this._model._getMarker(ctx.positionMarkers[idx]); return new Selection(selectionStartMarker.lineNumber, selectionStartMarker.column, positionMarker.lineNumber, positionMarker.column); } }); @@ -738,9 +713,8 @@ export class Cursor extends Disposable implements ICursors { }); // Extract losing cursors - var losingCursorIndex: string; - var losingCursors: number[] = []; - for (losingCursorIndex in loserCursorsMap) { + let losingCursors: number[] = []; + for (let losingCursorIndex in loserCursorsMap) { if (loserCursorsMap.hasOwnProperty(losingCursorIndex)) { losingCursors.push(parseInt(losingCursorIndex, 10)); } @@ -752,7 +726,7 @@ export class Cursor extends Disposable implements ICursors { }); // Remove losing cursors - for (var i = 0; i < losingCursors.length; i++) { + for (let i = 0; i < losingCursors.length; i++) { selectionsAfter.splice(losingCursors[i], 1); } @@ -764,22 +738,22 @@ export class Cursor extends Disposable implements ICursors { // ----- emitting events private emitCursorPositionChanged(source: string, reason: CursorChangeReason): void { - var positions = this.cursors.getPositions(); - var primaryPosition = positions[0]; - var secondaryPositions = positions.slice(1); + const positions = this._cursors.getPositions(); + const primaryPosition = positions[0]; + const secondaryPositions = positions.slice(1); - var viewPositions = this.cursors.getViewPositions(); - var primaryViewPosition = viewPositions[0]; - var secondaryViewPositions = viewPositions.slice(1); + const viewPositions = this._cursors.getViewPositions(); + const primaryViewPosition = viewPositions[0]; + const secondaryViewPositions = viewPositions.slice(1); - var isInEditableRange: boolean = true; - if (this.model.hasEditableRange()) { - var editableRange = this.model.getEditableRange(); + let isInEditableRange: boolean = true; + if (this._model.hasEditableRange()) { + const editableRange = this._model.getEditableRange(); if (!editableRange.containsPosition(primaryPosition)) { isInEditableRange = false; } } - var e: ICursorPositionChangedEvent = { + const e: ICursorPositionChangedEvent = { position: primaryPosition, viewPosition: primaryViewPosition, secondaryPositions: secondaryPositions, @@ -792,15 +766,15 @@ export class Cursor extends Disposable implements ICursors { } private emitCursorSelectionChanged(source: string, reason: CursorChangeReason): void { - let selections = this.cursors.getSelections(); - let primarySelection = selections[0]; - let secondarySelections = selections.slice(1); + const selections = this._cursors.getSelections(); + const primarySelection = selections[0]; + const secondarySelections = selections.slice(1); - let viewSelections = this.cursors.getViewSelections(); - let primaryViewSelection = viewSelections[0]; - let secondaryViewSelections = viewSelections.slice(1); + const viewSelections = this._cursors.getViewSelections(); + const primaryViewSelection = viewSelections[0]; + const secondaryViewSelections = viewSelections.slice(1); - let e: ICursorSelectionChangedEvent = { + const e: ICursorSelectionChangedEvent = { selection: primarySelection, viewSelection: primaryViewSelection, secondarySelections: secondarySelections, @@ -812,21 +786,21 @@ export class Cursor extends Disposable implements ICursors { } private _revealRange(revealTarget: RevealTarget, verticalType: VerticalRevealType, revealHorizontal: boolean): void { - var positions = this.cursors.getPositions(); - var viewPositions = this.cursors.getViewPositions(); + const positions = this._cursors.getPositions(); + const viewPositions = this._cursors.getViewPositions(); - var position = positions[0]; - var viewPosition = viewPositions[0]; + let position = positions[0]; + let viewPosition = viewPositions[0]; if (revealTarget === RevealTarget.TopMost) { - for (var i = 1; i < positions.length; i++) { + for (let i = 1; i < positions.length; i++) { if (positions[i].isBefore(position)) { position = positions[i]; viewPosition = viewPositions[i]; } } } else if (revealTarget === RevealTarget.BottomMost) { - for (var i = 1; i < positions.length; i++) { + for (let i = 1; i < positions.length; i++) { if (position.isBeforeOrEqual(positions[i])) { position = positions[i]; viewPosition = viewPositions[i]; @@ -839,13 +813,13 @@ export class Cursor extends Disposable implements ICursors { } } - var range = new Range(position.lineNumber, position.column, position.lineNumber, position.column); - var viewRange = new Range(viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column); + const range = new Range(position.lineNumber, position.column, position.lineNumber, position.column); + const viewRange = new Range(viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column); this.emitCursorRevealRange(range, viewRange, verticalType, revealHorizontal); } public emitCursorRevealRange(range: Range, viewRange: Range, verticalType: VerticalRevealType, revealHorizontal: boolean) { - var e: ICursorRevealRangeEvent = { + const e: ICursorRevealRangeEvent = { range: range, viewRange: viewRange, verticalType: verticalType, @@ -905,7 +879,7 @@ export class Cursor extends Disposable implements ICursors { if (this._columnSelectData) { return this._columnSelectData; } - const primaryCursor = this.cursors.getPrimaryCursor(); + const primaryCursor = this._cursors.getPrimaryCursor(); const primaryPos = primaryCursor.viewState.position; return { toViewLineNumber: primaryPos.lineNumber, @@ -929,7 +903,7 @@ export class Cursor extends Disposable implements ICursors { } private _getAllCursorsModelState(sorted: boolean = false): SingleCursorState[] { - let cursors = this.cursors.getAll(); + let cursors = this._cursors.getAll(); if (sorted) { cursors = cursors.sort((a, b) => { @@ -957,7 +931,7 @@ export class Cursor extends Disposable implements ICursors { } private _type(ctx: IMultipleCursorOperationContext): void { - var text = ctx.eventData.text; + const text = ctx.eventData.text; if (!this._isDoingComposition && ctx.eventSource === 'keyboard') { // If this event is coming straight from the keyboard, look for electric characters and enter @@ -1020,18 +994,18 @@ export class Cursor extends Disposable implements ICursors { return null; } - var selections = this.cursors.getSelections(); + const selections = this._cursors.getSelections(); if (selections.length === 1) { return null; } - for (var i = 0; i < selections.length; i++) { + for (let i = 0; i < selections.length; i++) { if (selections[i].startLineNumber !== selections[i].endLineNumber) { return null; } } - var pastePieces = ctx.eventData.text.split(/\r\n|\r|\n/); + let pastePieces = ctx.eventData.text.split(/\r\n|\r|\n/); if (pastePieces.length !== selections.length) { return null; } @@ -1040,7 +1014,7 @@ export class Cursor extends Disposable implements ICursors { } private _paste(ctx: IMultipleCursorOperationContext): void { - var distributedPaste = this._distributePasteToCursors(ctx); + const distributedPaste = this._distributePasteToCursors(ctx); ctx.cursorPositionChangeReason = CursorChangeReason.Paste; if (distributedPaste) { @@ -1066,18 +1040,18 @@ export class Cursor extends Disposable implements ICursors { private _undo(ctx: IMultipleCursorOperationContext): void { ctx.cursorPositionChangeReason = CursorChangeReason.Undo; - this._interpretCommandResult(this.model.undo()); + this._interpretCommandResult(this._model.undo()); } private _redo(ctx: IMultipleCursorOperationContext): void { ctx.cursorPositionChangeReason = CursorChangeReason.Redo; - this._interpretCommandResult(this.model.redo()); + this._interpretCommandResult(this._model.redo()); } private _externalExecuteCommand(ctx: IMultipleCursorOperationContext): void { const command = ctx.eventData; - this.cursors.killSecondaryCursors(); + this._cursors.killSecondaryCursors(); ctx.shouldReveal = true; From 121a4bca1d00a82305abc4435cec4d12be02c504 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 18 May 2017 14:26:03 +0200 Subject: [PATCH 0728/2747] Simplify cursor handlers --- src/vs/editor/common/controller/cursor.ts | 91 ++++++++----------- .../common/controller/cursorCollection.ts | 50 ++-------- .../editor/common/controller/cursorCommon.ts | 22 ++++- src/vs/editor/common/controller/oneCursor.ts | 18 +--- 4 files changed, 66 insertions(+), 115 deletions(-) diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 0388e5bc4895f..1f4e91e86e3fa 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -46,7 +46,7 @@ interface ICommandData { interface ICommandsData { operations: editorCommon.IIdentifiedSingleEditOperation[]; - anyoneHadTrackedEditOperation: boolean; + hadTrackedEditOperation: boolean; } export class Cursor extends Disposable implements ICursors { @@ -293,10 +293,8 @@ export class Cursor extends Disposable implements ICursors { }); } - this._onHandler('restoreState', (ctx: IMultipleCursorOperationContext) => { - this._cursors.setSelections(desiredSelections); - return false; - }, 'restoreState', null); + this.setStates('restoreState', CursorChangeReason.NotSet, CursorState.fromModelSelections(desiredSelections)); + this.reveal(true, RevealTarget.Primary); } private _onModelContentChanged(hadFlushEvent: boolean): void { @@ -313,13 +311,7 @@ export class Cursor extends Disposable implements ICursors { // Read the markers before entering `_onHandler`, since that would validate // the position and ruin the markers const selectionsFromMarkers = this._cursors.readSelectionFromMarkers(); - this._onHandler('recoverSelectionFromMarkers', (ctx: IMultipleCursorOperationContext) => { - ctx.cursorPositionChangeReason = CursorChangeReason.RecoverFromMarkers; - ctx.shouldReveal = false; - ctx.shouldPushStackElementBefore = false; - ctx.shouldPushStackElementAfter = false; - this._cursors.setSelections(selectionsFromMarkers); - }, 'modelChange', null); + this.setStates('modelChange', CursorChangeReason.RecoverFromMarkers, CursorState.fromModelSelections(selectionsFromMarkers)); } } } @@ -339,11 +331,7 @@ export class Cursor extends Disposable implements ICursors { } public setSelections(source: string, selections: ISelection[]): void { - this._onHandler('setSelections', (ctx: IMultipleCursorOperationContext) => { - ctx.shouldReveal = false; - this._cursors.setSelections(selections); - return false; - }, source, null); + this.setStates(source, CursorChangeReason.NotSet, CursorState.fromModelSelections(selections)); } // ------ auxiliary handling logic @@ -363,7 +351,32 @@ export class Cursor extends Disposable implements ICursors { callback(ctx); - this._interpretHandlerContext(ctx); + if (ctx.shouldPushStackElementBefore) { + this._model.pushStackElement(); + ctx.shouldPushStackElementBefore = false; + } + + this._columnSelectData = null; + + const execCtx: IExecContext = { + selectionStartMarkers: [], + positionMarkers: [] + }; + + this._innerExecuteCommands(execCtx, ctx.executeCommands, ctx.isAutoWhitespaceCommand); + + for (let i = 0; i < execCtx.selectionStartMarkers.length; i++) { + this._model._removeMarker(execCtx.selectionStartMarkers[i]); + this._model._removeMarker(execCtx.positionMarkers[i]); + } + + ctx.executeCommands = []; + + if (ctx.shouldPushStackElementAfter) { + this._model.pushStackElement(); + ctx.shouldPushStackElementAfter = false; + } + this._cursors.normalize(); } @@ -423,23 +436,6 @@ export class Cursor extends Disposable implements ICursors { this._isHandling = false; } - private _interpretHandlerContext(ctx: IMultipleCursorOperationContext): void { - if (ctx.shouldPushStackElementBefore) { - this._model.pushStackElement(); - ctx.shouldPushStackElementBefore = false; - } - - this._columnSelectData = null; - - this._internalExecuteCommands(ctx.executeCommands, ctx.isAutoWhitespaceCommand); - ctx.executeCommands = []; - - if (ctx.shouldPushStackElementAfter) { - this._model.pushStackElement(); - ctx.shouldPushStackElementAfter = false; - } - } - private _interpretCommandResult(cursorState: Selection[]): void { if (!cursorState || cursorState.length === 0) { return; @@ -537,18 +533,18 @@ export class Cursor extends Disposable implements ICursors { private _getEditOperations(ctx: IExecContext, commands: editorCommon.ICommand[], isAutoWhitespaceCommand: boolean[]): ICommandsData { let operations: editorCommon.IIdentifiedSingleEditOperation[] = []; - let anyoneHadTrackedEditOperation: boolean = false; + let hadTrackedEditOperation: boolean = false; for (let i = 0, len = commands.length; i < len; i++) { if (commands[i]) { - const oneResult = this._getEditOperationsFromCommand(ctx, i, commands[i], isAutoWhitespaceCommand[i]); - operations = operations.concat(oneResult.operations); - anyoneHadTrackedEditOperation = anyoneHadTrackedEditOperation || oneResult.hadTrackedEditOperation; + const r = this._getEditOperationsFromCommand(ctx, i, commands[i], isAutoWhitespaceCommand[i]); + operations = operations.concat(r.operations); + hadTrackedEditOperation = hadTrackedEditOperation || r.hadTrackedEditOperation; } } return { operations: operations, - anyoneHadTrackedEditOperation: anyoneHadTrackedEditOperation + hadTrackedEditOperation: hadTrackedEditOperation }; } @@ -601,19 +597,6 @@ export class Cursor extends Disposable implements ICursors { return loserCursorsMap; } - private _internalExecuteCommands(commands: editorCommon.ICommand[], isAutoWhitespaceCommand: boolean[]): void { - const ctx: IExecContext = { - selectionStartMarkers: [], - positionMarkers: [] - }; - - this._innerExecuteCommands(ctx, commands, isAutoWhitespaceCommand); - for (let i = 0; i < ctx.selectionStartMarkers.length; i++) { - this._model._removeMarker(ctx.selectionStartMarkers[i]); - this._model._removeMarker(ctx.positionMarkers[i]); - } - } - private _arrayIsEmpty(commands: editorCommon.ICommand[]): boolean { for (let i = 0, len = commands.length; i < len; i++) { if (commands[i]) { @@ -670,7 +653,7 @@ export class Cursor extends Disposable implements ICursors { // TODO@Alex: find a better way to do this. // give the hint that edit operations are tracked to the model - if (commandsData.anyoneHadTrackedEditOperation && filteredOperations.length > 0) { + if (commandsData.hadTrackedEditOperation && filteredOperations.length > 0) { filteredOperations[0]._isTracked = true; } const selectionsAfter = this._model.pushEditOperations(selectionsBefore, filteredOperations, (inverseEditOperations: editorCommon.IIdentifiedSingleEditOperation[]): Selection[] => { diff --git a/src/vs/editor/common/controller/cursorCollection.ts b/src/vs/editor/common/controller/cursorCollection.ts index 49633b4b90fbe..0aa9731766259 100644 --- a/src/vs/editor/common/controller/cursorCollection.ts +++ b/src/vs/editor/common/controller/cursorCollection.ts @@ -104,8 +104,7 @@ export class CursorCollection { } public setSelections(selections: ISelection[]): void { - this.primaryCursor.setSelection(this.context, selections[0]); - this._setSecondarySelections(selections.slice(1)); + this.setStates(CursorState.fromModelSelections(selections)); } public getPrimaryCursor(): CursorState { @@ -130,7 +129,7 @@ export class CursorCollection { if (secondaryCursorsLength < secondaryStatesLength) { let createCnt = secondaryStatesLength - secondaryCursorsLength; for (let i = 0; i < createCnt; i++) { - this._addSecondaryCursor(null); + this._addSecondaryCursor(); } } else if (secondaryCursorsLength > secondaryStatesLength) { let removeCnt = secondaryCursorsLength - secondaryStatesLength; @@ -144,19 +143,16 @@ export class CursorCollection { } } - public killSecondaryCursors(): boolean { - return (this._setSecondarySelections([]) > 0); + public killSecondaryCursors(): void { + this._setSecondaryStates([]); } public normalize(): void { this._mergeCursorsIfNecessary(); } - private _addSecondaryCursor(selection: ISelection): void { + private _addSecondaryCursor(): void { var newCursor = new OneCursor(this.context); - if (selection) { - newCursor.setSelection(this.context, selection); - } this.secondaryCursors.push(newCursor); this.lastAddedCursorIndex = this.secondaryCursors.length; } @@ -168,39 +164,6 @@ export class CursorCollection { return this.lastAddedCursorIndex; } - /** - * Creates or disposes secondary cursors as necessary to match the number of `secondarySelections`. - * Return value: - * - a positive number indicates the number of secondary cursors added - * - a negative number indicates the number of secondary cursors removed - * - 0 indicates that no changes have been done to the secondary cursors list - */ - private _setSecondarySelections(secondarySelections: ISelection[]): number { - var secondaryCursorsLength = this.secondaryCursors.length; - var secondarySelectionsLength = secondarySelections.length; - var returnValue = secondarySelectionsLength - secondaryCursorsLength; - - if (secondaryCursorsLength < secondarySelectionsLength) { - var createCnt = secondarySelectionsLength - secondaryCursorsLength; - for (var i = 0; i < createCnt; i++) { - this._addSecondaryCursor(null); - } - } else if (secondaryCursorsLength > secondarySelectionsLength) { - var removeCnt = secondaryCursorsLength - secondarySelectionsLength; - for (var i = 0; i < removeCnt; i++) { - this._removeSecondaryCursor(this.secondaryCursors.length - 1); - } - } - - for (var i = 0; i < secondarySelectionsLength; i++) { - if (secondarySelections[i]) { - this.secondaryCursors[i].setSelection(this.context, secondarySelections[i]); - } - } - - return returnValue; - } - private _removeSecondaryCursor(removeIndex: number): void { if (this.lastAddedCursorIndex >= removeIndex + 1) { this.lastAddedCursorIndex--; @@ -274,7 +237,8 @@ export class CursorCollection { } sortedCursors[winnerSortedCursorIndex].selection = resultingSelection; - cursors[winnerIndex].setSelection(this.context, resultingSelection); + const resultingState = CursorState.fromModelSelection(resultingSelection); + cursors[winnerIndex].setState(this.context, resultingState.modelState, resultingState.viewState); } for (var j = 0; j < sortedCursors.length; j++) { diff --git a/src/vs/editor/common/controller/cursorCommon.ts b/src/vs/editor/common/controller/cursorCommon.ts index 55e1413e19249..81bd4c7a1863e 100644 --- a/src/vs/editor/common/controller/cursorCommon.ts +++ b/src/vs/editor/common/controller/cursorCommon.ts @@ -9,7 +9,7 @@ import { CharCode } from 'vs/base/common/charCode'; import * as strings from 'vs/base/common/strings'; import { ICommand, TextModelResolvedOptions, IConfiguration, IModel } from 'vs/editor/common/editorCommon'; import { TextModel } from 'vs/editor/common/model/textModel'; -import { Selection } from 'vs/editor/common/core/selection'; +import { Selection, ISelection } from 'vs/editor/common/core/selection'; import { Range } from 'vs/editor/common/core/range'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { onUnexpectedError } from 'vs/base/common/errors'; @@ -354,6 +354,26 @@ export class CursorState { return new CursorState(null, viewState); } + public static fromModelSelection(modelSelection: ISelection): CursorState { + const selectionStartLineNumber = modelSelection.selectionStartLineNumber; + const selectionStartColumn = modelSelection.selectionStartColumn; + const positionLineNumber = modelSelection.positionLineNumber; + const positionColumn = modelSelection.positionColumn; + const modelState = new SingleCursorState( + new Range(selectionStartLineNumber, selectionStartColumn, selectionStartLineNumber, selectionStartColumn), 0, + new Position(positionLineNumber, positionColumn), 0 + ); + return CursorState.fromModelState(modelState); + } + + public static fromModelSelections(modelSelections: ISelection[]): CursorState[] { + let states: CursorState[] = []; + for (let i = 0, len = modelSelections.length; i < len; i++) { + states[i] = this.fromModelSelection(modelSelections[i]); + } + return states; + } + public static ensureInEditableRange(context: CursorContext, states: CursorState[]): CursorState[] { const model = context.model; if (!model.hasEditableRange()) { diff --git a/src/vs/editor/common/controller/oneCursor.ts b/src/vs/editor/common/controller/oneCursor.ts index 6fde100b0b8f2..ae9c990ec4a3d 100644 --- a/src/vs/editor/common/controller/oneCursor.ts +++ b/src/vs/editor/common/controller/oneCursor.ts @@ -7,7 +7,7 @@ import { SingleCursorState, CursorContext, CursorState } from 'vs/editor/common/controller/cursorCommon'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; -import { Selection, SelectionDirection, ISelection } from 'vs/editor/common/core/selection'; +import { Selection, SelectionDirection } from 'vs/editor/common/core/selection'; export class OneCursor { @@ -49,22 +49,6 @@ export class OneCursor { this._setState(context, this.modelState, this.viewState); } - public setSelection(context: CursorContext, selection: ISelection): void { - const selectionStartLineNumber = selection.selectionStartLineNumber; - const selectionStartColumn = selection.selectionStartColumn; - const positionLineNumber = selection.positionLineNumber; - const positionColumn = selection.positionColumn; - const modelState = new SingleCursorState( - new Range(selectionStartLineNumber, selectionStartColumn, selectionStartLineNumber, selectionStartColumn), 0, - new Position(positionLineNumber, positionColumn), 0 - ); - this._setState( - context, - modelState, - null - ); - } - public setState(context: CursorContext, modelState: SingleCursorState, viewState: SingleCursorState): void { this._setState(context, modelState, viewState); } From e91736680a94ae717d7331c8b569864baa147ef9 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 18 May 2017 15:26:36 +0200 Subject: [PATCH 0729/2747] Cursor handlers take an input argument --- src/vs/editor/common/controller/cursor.ts | 146 ++++++++++------------ 1 file changed, 69 insertions(+), 77 deletions(-) diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 1f4e91e86e3fa..8a49775c5ed4a 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -25,15 +25,22 @@ import { CoreEditorCommand } from 'vs/editor/common/controller/coreCommands'; interface IMultipleCursorOperationContext { cursorPositionChangeReason: CursorChangeReason; - shouldReveal: boolean; shouldPushStackElementBefore: boolean; shouldPushStackElementAfter: boolean; - eventSource: string; - eventData: any; executeCommands: editorCommon.ICommand[]; isAutoWhitespaceCommand: boolean[]; } +class CursorOperationArgs { + public readonly eventSource: string; + public readonly eventData: T; + + constructor(eventSource: string, eventData: T) { + this.eventSource = eventSource; + this.eventData = eventData; + } +} + interface IExecContext { selectionStartMarkers: string[]; positionMarkers: string[]; @@ -74,7 +81,7 @@ export class Cursor extends Disposable implements ICursors { private _columnSelectData: IColumnSelectData; private _handlers: { - [key: string]: (ctx: IMultipleCursorOperationContext) => void; + [key: string]: (args: CursorOperationArgs, ctx: IMultipleCursorOperationContext) => void; }; constructor(configuration: editorCommon.IConfiguration, model: editorCommon.IModel, viewModelHelper: IViewModelHelper) { @@ -308,8 +315,6 @@ export class Cursor extends Disposable implements ICursors { this.emitCursorSelectionChanged('model', CursorChangeReason.ContentFlush); } else { if (!this._isHandling) { - // Read the markers before entering `_onHandler`, since that would validate - // the position and ruin the markers const selectionsFromMarkers = this._cursors.readSelectionFromMarkers(); this.setStates('modelChange', CursorChangeReason.RecoverFromMarkers, CursorState.fromModelSelections(selectionsFromMarkers)); } @@ -336,13 +341,10 @@ export class Cursor extends Disposable implements ICursors { // ------ auxiliary handling logic - private _createAndInterpretHandlerCtx(eventSource: string, eventData: any, callback: (currentHandlerCtx: IMultipleCursorOperationContext) => void): void { + private _createAndInterpretHandlerCtx(callback: (currentHandlerCtx: IMultipleCursorOperationContext) => void): void { const ctx: IMultipleCursorOperationContext = { cursorPositionChangeReason: CursorChangeReason.NotSet, - shouldReveal: true, - eventSource: eventSource, - eventData: eventData, executeCommands: [], isAutoWhitespaceCommand: [], shouldPushStackElementBefore: false, @@ -380,7 +382,7 @@ export class Cursor extends Disposable implements ICursors { this._cursors.normalize(); } - private _onHandler(command: string, handler: (ctx: IMultipleCursorOperationContext) => void, source: string, data: any): void { + private _onHandler(command: string, handler: (args: CursorOperationArgs, ctx: IMultipleCursorOperationContext) => void, args: CursorOperationArgs): void { this._isHandling = true; @@ -392,13 +394,11 @@ export class Cursor extends Disposable implements ICursors { this._cursors.ensureValidState(); let cursorPositionChangeReason: CursorChangeReason; - let shouldReveal: boolean; - this._createAndInterpretHandlerCtx(source, data, (currentHandlerCtx: IMultipleCursorOperationContext) => { - handler(currentHandlerCtx); + this._createAndInterpretHandlerCtx((currentHandlerCtx: IMultipleCursorOperationContext) => { + handler(args, currentHandlerCtx); cursorPositionChangeReason = currentHandlerCtx.cursorPositionChangeReason; - shouldReveal = currentHandlerCtx.shouldReveal; }); const newSelections = this._cursors.getSelections(); @@ -421,12 +421,9 @@ export class Cursor extends Disposable implements ICursors { } if (somethingChanged) { - this.emitCursorPositionChanged(source, cursorPositionChangeReason); - - if (shouldReveal) { - this._revealRange(RevealTarget.Primary, VerticalRevealType.Simple, true); - } - this.emitCursorSelectionChanged(source, cursorPositionChangeReason); + this.emitCursorPositionChanged(args.eventSource, cursorPositionChangeReason); + this._revealRange(RevealTarget.Primary, VerticalRevealType.Simple, true); + this.emitCursorSelectionChanged(args.eventSource, cursorPositionChangeReason); } } catch (err) { @@ -826,36 +823,37 @@ export class Cursor extends Disposable implements ICursors { command.runCoreEditorCommand(this, payload); return; } - let handler = this._handlers[handlerId]; - this._onHandler(handlerId, handler, source, payload); + const handler = this._handlers[handlerId]; + const args = new CursorOperationArgs(source, payload); + this._onHandler(handlerId, handler, args); } private _registerHandlers(): void { let H = editorCommon.Handler; - this._handlers[H.LineInsertBefore] = (ctx) => this._lineInsertBefore(ctx); - this._handlers[H.LineInsertAfter] = (ctx) => this._lineInsertAfter(ctx); - this._handlers[H.LineBreakInsert] = (ctx) => this._lineBreakInsert(ctx); + this._handlers[H.LineInsertBefore] = (args, ctx) => this._lineInsertBefore(args, ctx); + this._handlers[H.LineInsertAfter] = (args, ctx) => this._lineInsertAfter(args, ctx); + this._handlers[H.LineBreakInsert] = (args, ctx) => this._lineBreakInsert(args, ctx); - this._handlers[H.Type] = (ctx) => this._type(ctx); - this._handlers[H.ReplacePreviousChar] = (ctx) => this._replacePreviousChar(ctx); - this._handlers[H.CompositionStart] = (ctx) => this._compositionStart(ctx); - this._handlers[H.CompositionEnd] = (ctx) => this._compositionEnd(ctx); - this._handlers[H.Tab] = (ctx) => this._tab(ctx); - this._handlers[H.Indent] = (ctx) => this._indent(ctx); - this._handlers[H.Outdent] = (ctx) => this._outdent(ctx); - this._handlers[H.Paste] = (ctx) => this._paste(ctx); + this._handlers[H.Type] = (args, ctx) => this._type(args, ctx); + this._handlers[H.ReplacePreviousChar] = (args, ctx) => this._replacePreviousChar(args, ctx); + this._handlers[H.CompositionStart] = (args, ctx) => this._compositionStart(args, ctx); + this._handlers[H.CompositionEnd] = (args, ctx) => this._compositionEnd(args, ctx); + this._handlers[H.Tab] = (args, ctx) => this._tab(args, ctx); + this._handlers[H.Indent] = (args, ctx) => this._indent(args, ctx); + this._handlers[H.Outdent] = (args, ctx) => this._outdent(args, ctx); + this._handlers[H.Paste] = (args, ctx) => this._paste(args, ctx); - this._handlers[H.DeleteLeft] = (ctx) => this._deleteLeft(ctx); - this._handlers[H.DeleteRight] = (ctx) => this._deleteRight(ctx); + this._handlers[H.DeleteLeft] = (args, ctx) => this._deleteLeft(args, ctx); + this._handlers[H.DeleteRight] = (args, ctx) => this._deleteRight(args, ctx); - this._handlers[H.Cut] = (ctx) => this._cut(ctx); + this._handlers[H.Cut] = (args, ctx) => this._cut(args, ctx); - this._handlers[H.Undo] = (ctx) => this._undo(ctx); - this._handlers[H.Redo] = (ctx) => this._redo(ctx); + this._handlers[H.Undo] = (args, ctx) => this._undo(args, ctx); + this._handlers[H.Redo] = (args, ctx) => this._redo(args, ctx); - this._handlers[H.ExecuteCommand] = (ctx) => this._externalExecuteCommand(ctx); - this._handlers[H.ExecuteCommands] = (ctx) => this._externalExecuteCommands(ctx); + this._handlers[H.ExecuteCommand] = (args, ctx) => this._externalExecuteCommand(args, ctx); + this._handlers[H.ExecuteCommands] = (args, ctx) => this._externalExecuteCommands(args, ctx); } public getColumnSelectData(): IColumnSelectData { @@ -873,7 +871,6 @@ export class Cursor extends Disposable implements ICursors { // -------------------- START editing operations private _applyEdits(ctx: IMultipleCursorOperationContext, edits: EditOperationResult): void { - ctx.shouldReveal = true; ctx.shouldPushStackElementBefore = edits.shouldPushStackElementBefore; ctx.shouldPushStackElementAfter = edits.shouldPushStackElementAfter; @@ -901,22 +898,22 @@ export class Cursor extends Disposable implements ICursors { return r; } - private _lineInsertBefore(ctx: IMultipleCursorOperationContext): void { + private _lineInsertBefore(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { this._applyEdits(ctx, TypeOperations.lineInsertBefore(this.context.config, this.context.model, this._getAllCursorsModelState())); } - private _lineInsertAfter(ctx: IMultipleCursorOperationContext): void { + private _lineInsertAfter(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { this._applyEdits(ctx, TypeOperations.lineInsertAfter(this.context.config, this.context.model, this._getAllCursorsModelState())); } - private _lineBreakInsert(ctx: IMultipleCursorOperationContext): void { + private _lineBreakInsert(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { this._applyEdits(ctx, TypeOperations.lineBreakInsert(this.context.config, this.context.model, this._getAllCursorsModelState())); } - private _type(ctx: IMultipleCursorOperationContext): void { - const text = ctx.eventData.text; + private _type(args: CursorOperationArgs<{ text: string; }>, ctx: IMultipleCursorOperationContext): void { + const text = args.eventData.text; - if (!this._isDoingComposition && ctx.eventSource === 'keyboard') { + if (!this._isDoingComposition && args.eventSource === 'keyboard') { // If this event is coming straight from the keyboard, look for electric characters and enter for (let i = 0, len = text.length; i < len; i++) { @@ -930,14 +927,13 @@ export class Cursor extends Disposable implements ICursors { } // Here we must interpret each typed character individually, that's why we create a new context - this._createAndInterpretHandlerCtx(ctx.eventSource, ctx.eventData, (charHandlerCtx: IMultipleCursorOperationContext) => { + this._createAndInterpretHandlerCtx((charHandlerCtx: IMultipleCursorOperationContext) => { // Decide what all cursors will do up-front this._applyEdits(charHandlerCtx, TypeOperations.typeWithInterceptors(this.context.config, this.context.model, this._getAllCursorsModelState(), chr)); // The last typed character gets to win ctx.cursorPositionChangeReason = charHandlerCtx.cursorPositionChangeReason; - ctx.shouldReveal = charHandlerCtx.shouldReveal; }); } @@ -946,34 +942,34 @@ export class Cursor extends Disposable implements ICursors { } } - private _replacePreviousChar(ctx: IMultipleCursorOperationContext): void { - let text = ctx.eventData.text; - let replaceCharCnt = ctx.eventData.replaceCharCnt; + private _replacePreviousChar(args: CursorOperationArgs<{ text: string; replaceCharCnt: number; }>, ctx: IMultipleCursorOperationContext): void { + let text = args.eventData.text; + let replaceCharCnt = args.eventData.replaceCharCnt; this._applyEdits(ctx, TypeOperations.replacePreviousChar(this.context.config, this.context.model, this._getAllCursorsModelState(), text, replaceCharCnt)); } - private _compositionStart(ctx: IMultipleCursorOperationContext): void { + private _compositionStart(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { this._isDoingComposition = true; } - private _compositionEnd(ctx: IMultipleCursorOperationContext): void { + private _compositionEnd(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { this._isDoingComposition = false; } - private _tab(ctx: IMultipleCursorOperationContext): void { + private _tab(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { this._applyEdits(ctx, TypeOperations.tab(this.context.config, this.context.model, this._getAllCursorsModelState())); } - private _indent(ctx: IMultipleCursorOperationContext): void { + private _indent(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { this._applyEdits(ctx, TypeOperations.indent(this.context.config, this.context.model, this._getAllCursorsModelState())); } - private _outdent(ctx: IMultipleCursorOperationContext): void { + private _outdent(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { this._applyEdits(ctx, TypeOperations.outdent(this.context.config, this.context.model, this._getAllCursorsModelState())); } - private _distributePasteToCursors(ctx: IMultipleCursorOperationContext): string[] { - if (ctx.eventData.pasteOnNewLine) { + private _distributePasteToCursors(args: CursorOperationArgs<{ pasteOnNewLine: boolean; text: string; }>, ctx: IMultipleCursorOperationContext): string[] { + if (args.eventData.pasteOnNewLine) { return null; } @@ -988,7 +984,7 @@ export class Cursor extends Disposable implements ICursors { } } - let pastePieces = ctx.eventData.text.split(/\r\n|\r|\n/); + let pastePieces = args.eventData.text.split(/\r\n|\r|\n/); if (pastePieces.length !== selections.length) { return null; } @@ -996,48 +992,46 @@ export class Cursor extends Disposable implements ICursors { return pastePieces; } - private _paste(ctx: IMultipleCursorOperationContext): void { - const distributedPaste = this._distributePasteToCursors(ctx); + private _paste(args: CursorOperationArgs<{ pasteOnNewLine: boolean; text: string; }>, ctx: IMultipleCursorOperationContext): void { + const distributedPaste = this._distributePasteToCursors(args, ctx); ctx.cursorPositionChangeReason = CursorChangeReason.Paste; if (distributedPaste) { this._applyEdits(ctx, TypeOperations.distributedPaste(this.context.config, this.context.model, this._getAllCursorsModelState(true), distributedPaste)); } else { - this._applyEdits(ctx, TypeOperations.paste(this.context.config, this.context.model, this._getAllCursorsModelState(), ctx.eventData.text, ctx.eventData.pasteOnNewLine)); + this._applyEdits(ctx, TypeOperations.paste(this.context.config, this.context.model, this._getAllCursorsModelState(), args.eventData.text, args.eventData.pasteOnNewLine)); } } - private _deleteLeft(ctx: IMultipleCursorOperationContext): void { + private _deleteLeft(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { this._applyEdits(ctx, DeleteOperations.deleteLeft(this.context.config, this.context.model, this._getAllCursorsModelState())); } - private _deleteRight(ctx: IMultipleCursorOperationContext): void { + private _deleteRight(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { this._applyEdits(ctx, DeleteOperations.deleteRight(this.context.config, this.context.model, this._getAllCursorsModelState())); } - private _cut(ctx: IMultipleCursorOperationContext): void { + private _cut(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { this._applyEdits(ctx, DeleteOperations.cut(this.context.config, this.context.model, this._getAllCursorsModelState())); } // -------------------- END editing operations - private _undo(ctx: IMultipleCursorOperationContext): void { + private _undo(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { ctx.cursorPositionChangeReason = CursorChangeReason.Undo; this._interpretCommandResult(this._model.undo()); } - private _redo(ctx: IMultipleCursorOperationContext): void { + private _redo(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { ctx.cursorPositionChangeReason = CursorChangeReason.Redo; this._interpretCommandResult(this._model.redo()); } - private _externalExecuteCommand(ctx: IMultipleCursorOperationContext): void { - const command = ctx.eventData; + private _externalExecuteCommand(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { + const command = args.eventData; this._cursors.killSecondaryCursors(); - ctx.shouldReveal = true; - ctx.shouldPushStackElementBefore = true; ctx.shouldPushStackElementAfter = true; @@ -1045,10 +1039,8 @@ export class Cursor extends Disposable implements ICursors { ctx.isAutoWhitespaceCommand[0] = false; } - private _externalExecuteCommands(ctx: IMultipleCursorOperationContext): void { - const commands = ctx.eventData; - - ctx.shouldReveal = true; + private _externalExecuteCommands(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { + const commands = args.eventData; ctx.shouldPushStackElementBefore = true; ctx.shouldPushStackElementAfter = true; From f55399c57708a7c6ed521f5e83d6b43141cab61a Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 18 May 2017 16:19:30 +0200 Subject: [PATCH 0730/2747] Eliminate IMultipleCursorOperationContext --- src/vs/editor/common/controller/cursor.ts | 246 +++++++++--------- .../editor/common/controller/cursorCommon.ts | 7 + .../common/controller/cursorTypeOperations.ts | 7 +- 3 files changed, 128 insertions(+), 132 deletions(-) diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 8a49775c5ed4a..2098d553134cb 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -14,7 +14,7 @@ import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { Selection, SelectionDirection, ISelection } from 'vs/editor/common/core/selection'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { CursorColumns, CursorConfiguration, EditOperationResult, SingleCursorState, IViewModelHelper, CursorContext, CursorState, RevealTarget, IColumnSelectData, ICursors } from 'vs/editor/common/controller/cursorCommon'; +import { CursorColumns, CursorConfiguration, EditOperationResult, SingleCursorState, IViewModelHelper, CursorContext, CursorState, RevealTarget, IColumnSelectData, ICursors, CommandResult } from 'vs/editor/common/controller/cursorCommon'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { DeleteOperations } from 'vs/editor/common/controller/cursorDeleteOperations'; import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; @@ -23,14 +23,6 @@ import { CursorEventType, CursorChangeReason, ICursorPositionChangedEvent, Verti import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; import { CoreEditorCommand } from 'vs/editor/common/controller/coreCommands'; -interface IMultipleCursorOperationContext { - cursorPositionChangeReason: CursorChangeReason; - shouldPushStackElementBefore: boolean; - shouldPushStackElementAfter: boolean; - executeCommands: editorCommon.ICommand[]; - isAutoWhitespaceCommand: boolean[]; -} - class CursorOperationArgs { public readonly eventSource: string; public readonly eventData: T; @@ -81,7 +73,7 @@ export class Cursor extends Disposable implements ICursors { private _columnSelectData: IColumnSelectData; private _handlers: { - [key: string]: (args: CursorOperationArgs, ctx: IMultipleCursorOperationContext) => void; + [key: string]: (args: CursorOperationArgs) => EditOperationResult; }; constructor(configuration: editorCommon.IConfiguration, model: editorCommon.IModel, viewModelHelper: IViewModelHelper) { @@ -341,48 +333,38 @@ export class Cursor extends Disposable implements ICursors { // ------ auxiliary handling logic - private _createAndInterpretHandlerCtx(callback: (currentHandlerCtx: IMultipleCursorOperationContext) => void): void { - - const ctx: IMultipleCursorOperationContext = { - cursorPositionChangeReason: CursorChangeReason.NotSet, - executeCommands: [], - isAutoWhitespaceCommand: [], - shouldPushStackElementBefore: false, - shouldPushStackElementAfter: false - }; + private _createAndInterpretHandlerCtx(callback: () => EditOperationResult): void { - callback(ctx); + const opResult = callback(); - if (ctx.shouldPushStackElementBefore) { + if (opResult && opResult.shouldPushStackElementBefore) { this._model.pushStackElement(); - ctx.shouldPushStackElementBefore = false; } this._columnSelectData = null; - const execCtx: IExecContext = { - selectionStartMarkers: [], - positionMarkers: [] - }; + if (opResult) { + const execCtx: IExecContext = { + selectionStartMarkers: [], + positionMarkers: [] + }; - this._innerExecuteCommands(execCtx, ctx.executeCommands, ctx.isAutoWhitespaceCommand); + this._innerExecuteCommands(execCtx, opResult.commands); - for (let i = 0; i < execCtx.selectionStartMarkers.length; i++) { - this._model._removeMarker(execCtx.selectionStartMarkers[i]); - this._model._removeMarker(execCtx.positionMarkers[i]); + for (let i = 0; i < execCtx.selectionStartMarkers.length; i++) { + this._model._removeMarker(execCtx.selectionStartMarkers[i]); + this._model._removeMarker(execCtx.positionMarkers[i]); + } } - ctx.executeCommands = []; - - if (ctx.shouldPushStackElementAfter) { + if (opResult && opResult.shouldPushStackElementAfter) { this._model.pushStackElement(); - ctx.shouldPushStackElementAfter = false; } this._cursors.normalize(); } - private _onHandler(command: string, handler: (args: CursorOperationArgs, ctx: IMultipleCursorOperationContext) => void, args: CursorOperationArgs): void { + private _onHandler(command: string, handler: (args: CursorOperationArgs) => EditOperationResult, args: CursorOperationArgs): void { this._isHandling = true; @@ -395,10 +377,10 @@ export class Cursor extends Disposable implements ICursors { let cursorPositionChangeReason: CursorChangeReason; - this._createAndInterpretHandlerCtx((currentHandlerCtx: IMultipleCursorOperationContext) => { - handler(args, currentHandlerCtx); - - cursorPositionChangeReason = currentHandlerCtx.cursorPositionChangeReason; + this._createAndInterpretHandlerCtx(() => { + let r = handler(args); + cursorPositionChangeReason = r ? r.reason : CursorChangeReason.NotSet; + return r; }); const newSelections = this._cursors.getSelections(); @@ -441,7 +423,7 @@ export class Cursor extends Disposable implements ICursors { this._cursors.setSelections(cursorState); } - private _getEditOperationsFromCommand(ctx: IExecContext, majorIdentifier: number, command: editorCommon.ICommand, isAutoWhitespaceCommand: boolean): ICommandData { + private _getEditOperationsFromCommand(ctx: IExecContext, majorIdentifier: number, command: CommandResult): ICommandData { // This method acts as a transaction, if the command fails // everything it has done is ignored let operations: editorCommon.IIdentifiedSingleEditOperation[] = []; @@ -460,7 +442,7 @@ export class Cursor extends Disposable implements ICursors { range: selection, text: text, forceMoveMarkers: false, - isAutoWhitespaceEdit: isAutoWhitespaceCommand + isAutoWhitespaceEdit: command.isAutoWhitespaceCommand }); }; @@ -512,7 +494,7 @@ export class Cursor extends Disposable implements ICursors { }; try { - command.getEditOperations(this._model, editOperationBuilder); + command.command.getEditOperations(this._model, editOperationBuilder); } catch (e) { e.friendlyMessage = nls.localize('corrupt.commands', "Unexpected exception while executing command."); onUnexpectedError(e); @@ -528,13 +510,13 @@ export class Cursor extends Disposable implements ICursors { }; } - private _getEditOperations(ctx: IExecContext, commands: editorCommon.ICommand[], isAutoWhitespaceCommand: boolean[]): ICommandsData { + private _getEditOperations(ctx: IExecContext, commands: CommandResult[]): ICommandsData { let operations: editorCommon.IIdentifiedSingleEditOperation[] = []; let hadTrackedEditOperation: boolean = false; for (let i = 0, len = commands.length; i < len; i++) { if (commands[i]) { - const r = this._getEditOperationsFromCommand(ctx, i, commands[i], isAutoWhitespaceCommand[i]); + const r = this._getEditOperationsFromCommand(ctx, i, commands[i]); operations = operations.concat(r.operations); hadTrackedEditOperation = hadTrackedEditOperation || r.hadTrackedEditOperation; } @@ -594,7 +576,7 @@ export class Cursor extends Disposable implements ICursors { return loserCursorsMap; } - private _arrayIsEmpty(commands: editorCommon.ICommand[]): boolean { + private _arrayIsEmpty(commands: CommandResult[]): boolean { for (let i = 0, len = commands.length; i < len; i++) { if (commands[i]) { return false; @@ -603,7 +585,7 @@ export class Cursor extends Disposable implements ICursors { return true; } - private _innerExecuteCommands(ctx: IExecContext, commands: editorCommon.ICommand[], isAutoWhitespaceCommand: boolean[]): void { + private _innerExecuteCommands(ctx: IExecContext, commands: CommandResult[]): void { if (this._configuration.editor.readOnly) { return; @@ -615,7 +597,7 @@ export class Cursor extends Disposable implements ICursors { const selectionsBefore = this._cursors.getSelections(); - const commandsData = this._getEditOperations(ctx, commands, isAutoWhitespaceCommand); + const commandsData = this._getEditOperations(ctx, commands); if (commandsData.operations.length === 0) { return; } @@ -673,7 +655,7 @@ export class Cursor extends Disposable implements ICursors { for (let i = 0; i < selectionsBefore.length; i++) { if (groupedInverseEditOperations[i].length > 0) { groupedInverseEditOperations[i].sort(minorBasedSorter); - cursorSelections[i] = commands[i].computeCursorState(this._model, { + cursorSelections[i] = commands[i].command.computeCursorState(this._model, { getInverseEditOperations: () => { return groupedInverseEditOperations[i]; }, @@ -831,29 +813,29 @@ export class Cursor extends Disposable implements ICursors { private _registerHandlers(): void { let H = editorCommon.Handler; - this._handlers[H.LineInsertBefore] = (args, ctx) => this._lineInsertBefore(args, ctx); - this._handlers[H.LineInsertAfter] = (args, ctx) => this._lineInsertAfter(args, ctx); - this._handlers[H.LineBreakInsert] = (args, ctx) => this._lineBreakInsert(args, ctx); + this._handlers[H.LineInsertBefore] = (args) => this._lineInsertBefore(args); + this._handlers[H.LineInsertAfter] = (args) => this._lineInsertAfter(args); + this._handlers[H.LineBreakInsert] = (args) => this._lineBreakInsert(args); - this._handlers[H.Type] = (args, ctx) => this._type(args, ctx); - this._handlers[H.ReplacePreviousChar] = (args, ctx) => this._replacePreviousChar(args, ctx); - this._handlers[H.CompositionStart] = (args, ctx) => this._compositionStart(args, ctx); - this._handlers[H.CompositionEnd] = (args, ctx) => this._compositionEnd(args, ctx); - this._handlers[H.Tab] = (args, ctx) => this._tab(args, ctx); - this._handlers[H.Indent] = (args, ctx) => this._indent(args, ctx); - this._handlers[H.Outdent] = (args, ctx) => this._outdent(args, ctx); - this._handlers[H.Paste] = (args, ctx) => this._paste(args, ctx); + this._handlers[H.Type] = (args) => this._type(args); + this._handlers[H.ReplacePreviousChar] = (args) => this._replacePreviousChar(args); + this._handlers[H.CompositionStart] = (args) => this._compositionStart(args); + this._handlers[H.CompositionEnd] = (args) => this._compositionEnd(args); + this._handlers[H.Tab] = (args) => this._tab(args); + this._handlers[H.Indent] = (args) => this._indent(args); + this._handlers[H.Outdent] = (args) => this._outdent(args); + this._handlers[H.Paste] = (args) => this._paste(args); - this._handlers[H.DeleteLeft] = (args, ctx) => this._deleteLeft(args, ctx); - this._handlers[H.DeleteRight] = (args, ctx) => this._deleteRight(args, ctx); + this._handlers[H.DeleteLeft] = (args) => this._deleteLeft(args); + this._handlers[H.DeleteRight] = (args) => this._deleteRight(args); - this._handlers[H.Cut] = (args, ctx) => this._cut(args, ctx); + this._handlers[H.Cut] = (args) => this._cut(args); - this._handlers[H.Undo] = (args, ctx) => this._undo(args, ctx); - this._handlers[H.Redo] = (args, ctx) => this._redo(args, ctx); + this._handlers[H.Undo] = (args) => this._undo(args); + this._handlers[H.Redo] = (args) => this._redo(args); - this._handlers[H.ExecuteCommand] = (args, ctx) => this._externalExecuteCommand(args, ctx); - this._handlers[H.ExecuteCommands] = (args, ctx) => this._externalExecuteCommands(args, ctx); + this._handlers[H.ExecuteCommand] = (args) => this._externalExecuteCommand(args); + this._handlers[H.ExecuteCommands] = (args) => this._externalExecuteCommands(args); } public getColumnSelectData(): IColumnSelectData { @@ -870,18 +852,6 @@ export class Cursor extends Disposable implements ICursors { // -------------------- START editing operations - private _applyEdits(ctx: IMultipleCursorOperationContext, edits: EditOperationResult): void { - ctx.shouldPushStackElementBefore = edits.shouldPushStackElementBefore; - ctx.shouldPushStackElementAfter = edits.shouldPushStackElementAfter; - - const commands = edits.commands; - for (let i = 0, len = commands.length; i < len; i++) { - const command = commands[i]; - ctx.executeCommands[i] = command ? command.command : null; - ctx.isAutoWhitespaceCommand[i] = command ? command.isAutoWhitespaceCommand : false; - } - } - private _getAllCursorsModelState(sorted: boolean = false): SingleCursorState[] { let cursors = this._cursors.getAll(); @@ -898,19 +868,19 @@ export class Cursor extends Disposable implements ICursors { return r; } - private _lineInsertBefore(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, TypeOperations.lineInsertBefore(this.context.config, this.context.model, this._getAllCursorsModelState())); + private _lineInsertBefore(args: CursorOperationArgs): EditOperationResult { + return TypeOperations.lineInsertBefore(this.context.config, this.context.model, this._getAllCursorsModelState()); } - private _lineInsertAfter(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, TypeOperations.lineInsertAfter(this.context.config, this.context.model, this._getAllCursorsModelState())); + private _lineInsertAfter(args: CursorOperationArgs): EditOperationResult { + return TypeOperations.lineInsertAfter(this.context.config, this.context.model, this._getAllCursorsModelState()); } - private _lineBreakInsert(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, TypeOperations.lineBreakInsert(this.context.config, this.context.model, this._getAllCursorsModelState())); + private _lineBreakInsert(args: CursorOperationArgs): EditOperationResult { + return TypeOperations.lineBreakInsert(this.context.config, this.context.model, this._getAllCursorsModelState()); } - private _type(args: CursorOperationArgs<{ text: string; }>, ctx: IMultipleCursorOperationContext): void { + private _type(args: CursorOperationArgs<{ text: string; }>): EditOperationResult { const text = args.eventData.text; if (!this._isDoingComposition && args.eventSource === 'keyboard') { @@ -927,48 +897,49 @@ export class Cursor extends Disposable implements ICursors { } // Here we must interpret each typed character individually, that's why we create a new context - this._createAndInterpretHandlerCtx((charHandlerCtx: IMultipleCursorOperationContext) => { + this._createAndInterpretHandlerCtx(() => { // Decide what all cursors will do up-front - this._applyEdits(charHandlerCtx, TypeOperations.typeWithInterceptors(this.context.config, this.context.model, this._getAllCursorsModelState(), chr)); - - // The last typed character gets to win - ctx.cursorPositionChangeReason = charHandlerCtx.cursorPositionChangeReason; + return TypeOperations.typeWithInterceptors(this.context.config, this.context.model, this._getAllCursorsModelState(), chr); }); } + + return null; } else { - this._applyEdits(ctx, TypeOperations.typeWithoutInterceptors(this.context.config, this.context.model, this._getAllCursorsModelState(), text)); + return TypeOperations.typeWithoutInterceptors(this.context.config, this.context.model, this._getAllCursorsModelState(), text); } } - private _replacePreviousChar(args: CursorOperationArgs<{ text: string; replaceCharCnt: number; }>, ctx: IMultipleCursorOperationContext): void { + private _replacePreviousChar(args: CursorOperationArgs<{ text: string; replaceCharCnt: number; }>): EditOperationResult { let text = args.eventData.text; let replaceCharCnt = args.eventData.replaceCharCnt; - this._applyEdits(ctx, TypeOperations.replacePreviousChar(this.context.config, this.context.model, this._getAllCursorsModelState(), text, replaceCharCnt)); + return TypeOperations.replacePreviousChar(this.context.config, this.context.model, this._getAllCursorsModelState(), text, replaceCharCnt); } - private _compositionStart(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { + private _compositionStart(args: CursorOperationArgs): EditOperationResult { this._isDoingComposition = true; + return null; } - private _compositionEnd(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { + private _compositionEnd(args: CursorOperationArgs): EditOperationResult { this._isDoingComposition = false; + return null; } - private _tab(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, TypeOperations.tab(this.context.config, this.context.model, this._getAllCursorsModelState())); + private _tab(args: CursorOperationArgs): EditOperationResult { + return TypeOperations.tab(this.context.config, this.context.model, this._getAllCursorsModelState()); } - private _indent(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, TypeOperations.indent(this.context.config, this.context.model, this._getAllCursorsModelState())); + private _indent(args: CursorOperationArgs): EditOperationResult { + return TypeOperations.indent(this.context.config, this.context.model, this._getAllCursorsModelState()); } - private _outdent(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, TypeOperations.outdent(this.context.config, this.context.model, this._getAllCursorsModelState())); + private _outdent(args: CursorOperationArgs): EditOperationResult { + return TypeOperations.outdent(this.context.config, this.context.model, this._getAllCursorsModelState()); } - private _distributePasteToCursors(args: CursorOperationArgs<{ pasteOnNewLine: boolean; text: string; }>, ctx: IMultipleCursorOperationContext): string[] { + private _distributePasteToCursors(args: CursorOperationArgs<{ pasteOnNewLine: boolean; text: string; }>): string[] { if (args.eventData.pasteOnNewLine) { return null; } @@ -992,62 +963,77 @@ export class Cursor extends Disposable implements ICursors { return pastePieces; } - private _paste(args: CursorOperationArgs<{ pasteOnNewLine: boolean; text: string; }>, ctx: IMultipleCursorOperationContext): void { - const distributedPaste = this._distributePasteToCursors(args, ctx); + private _paste(args: CursorOperationArgs<{ pasteOnNewLine: boolean; text: string; }>): EditOperationResult { + const distributedPaste = this._distributePasteToCursors(args); - ctx.cursorPositionChangeReason = CursorChangeReason.Paste; if (distributedPaste) { - this._applyEdits(ctx, TypeOperations.distributedPaste(this.context.config, this.context.model, this._getAllCursorsModelState(true), distributedPaste)); + return TypeOperations.distributedPaste(this.context.config, this.context.model, this._getAllCursorsModelState(true), distributedPaste); } else { - this._applyEdits(ctx, TypeOperations.paste(this.context.config, this.context.model, this._getAllCursorsModelState(), args.eventData.text, args.eventData.pasteOnNewLine)); + return TypeOperations.paste(this.context.config, this.context.model, this._getAllCursorsModelState(), args.eventData.text, args.eventData.pasteOnNewLine); } } - private _deleteLeft(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, DeleteOperations.deleteLeft(this.context.config, this.context.model, this._getAllCursorsModelState())); + private _deleteLeft(args: CursorOperationArgs): EditOperationResult { + return DeleteOperations.deleteLeft(this.context.config, this.context.model, this._getAllCursorsModelState()); } - private _deleteRight(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, DeleteOperations.deleteRight(this.context.config, this.context.model, this._getAllCursorsModelState())); + private _deleteRight(args: CursorOperationArgs): EditOperationResult { + return DeleteOperations.deleteRight(this.context.config, this.context.model, this._getAllCursorsModelState()); } - private _cut(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { - this._applyEdits(ctx, DeleteOperations.cut(this.context.config, this.context.model, this._getAllCursorsModelState())); + private _cut(args: CursorOperationArgs): EditOperationResult { + return DeleteOperations.cut(this.context.config, this.context.model, this._getAllCursorsModelState()); } // -------------------- END editing operations - private _undo(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { - ctx.cursorPositionChangeReason = CursorChangeReason.Undo; + private _undo(args: CursorOperationArgs): EditOperationResult { this._interpretCommandResult(this._model.undo()); + + return new EditOperationResult([], { + shouldPushStackElementBefore: false, + shouldPushStackElementAfter: false, + reason: CursorChangeReason.Undo + }); } - private _redo(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { - ctx.cursorPositionChangeReason = CursorChangeReason.Redo; + private _redo(args: CursorOperationArgs): EditOperationResult { this._interpretCommandResult(this._model.redo()); + + return new EditOperationResult([], { + shouldPushStackElementBefore: false, + shouldPushStackElementAfter: false, + reason: CursorChangeReason.Redo + }); } - private _externalExecuteCommand(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { + private _externalExecuteCommand(args: CursorOperationArgs): EditOperationResult { const command = args.eventData; this._cursors.killSecondaryCursors(); - ctx.shouldPushStackElementBefore = true; - ctx.shouldPushStackElementAfter = true; - - ctx.executeCommands[0] = command; - ctx.isAutoWhitespaceCommand[0] = false; + return new EditOperationResult( + [ + new CommandResult(command, false) + ], + { + shouldPushStackElementBefore: true, + shouldPushStackElementAfter: true + } + ); } - private _externalExecuteCommands(args: CursorOperationArgs, ctx: IMultipleCursorOperationContext): void { + private _externalExecuteCommands(args: CursorOperationArgs): EditOperationResult { const commands = args.eventData; - ctx.shouldPushStackElementBefore = true; - ctx.shouldPushStackElementAfter = true; - - for (let i = 0; i < commands.length; i++) { - ctx.executeCommands[i] = commands[i]; - ctx.isAutoWhitespaceCommand[i] = false; + let _commands: CommandResult[] = []; + for (let i = 0, len = commands.length; i < len; i++) { + _commands[i] = new CommandResult(commands[i], false); } + + return new EditOperationResult(_commands, { + shouldPushStackElementBefore: true, + shouldPushStackElementAfter: true + }); } } diff --git a/src/vs/editor/common/controller/cursorCommon.ts b/src/vs/editor/common/controller/cursorCommon.ts index 81bd4c7a1863e..69ff558302f35 100644 --- a/src/vs/editor/common/controller/cursorCommon.ts +++ b/src/vs/editor/common/controller/cursorCommon.ts @@ -445,17 +445,24 @@ export class EditOperationResult { readonly commands: CommandResult[]; readonly shouldPushStackElementBefore: boolean; readonly shouldPushStackElementAfter: boolean; + readonly reason: CursorChangeReason; constructor( commands: CommandResult[], opts: { shouldPushStackElementBefore: boolean; shouldPushStackElementAfter: boolean; + reason?: CursorChangeReason; } ) { this.commands = commands; this.shouldPushStackElementBefore = opts.shouldPushStackElementBefore; this.shouldPushStackElementAfter = opts.shouldPushStackElementAfter; + if (typeof opts.reason === 'undefined') { + this.reason = CursorChangeReason.NotSet; + } else { + this.reason = opts.reason; + } } } diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index cc4c9327bc97a..2f88bb956b49c 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -17,6 +17,7 @@ import { IndentAction } from 'vs/editor/common/modes/languageConfiguration'; import { SurroundSelectionCommand } from 'vs/editor/common/commands/surroundSelectionCommand'; import { IElectricAction } from 'vs/editor/common/modes/supports/electricCharacter'; import { getMapForWordSeparators, WordCharacterClass } from "vs/editor/common/controller/cursorWordOperations"; +import { CursorChangeReason } from "vs/editor/common/controller/cursorEvents"; export class TypeOperations { @@ -91,7 +92,8 @@ export class TypeOperations { } return new EditOperationResult(commands, { shouldPushStackElementBefore: true, - shouldPushStackElementAfter: true + shouldPushStackElementAfter: true, + reason: CursorChangeReason.Paste }); } @@ -122,7 +124,8 @@ export class TypeOperations { } return new EditOperationResult(commands, { shouldPushStackElementBefore: true, - shouldPushStackElementAfter: true + shouldPushStackElementAfter: true, + reason: CursorChangeReason.Paste }); } From 0ac00eaa1a0c41a4b992561b965363349a2aeda5 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 18 May 2017 16:40:41 +0200 Subject: [PATCH 0731/2747] Simple rename --- src/vs/editor/browser/view/viewController.ts | 28 +-- .../editor/common/controller/coreCommands.ts | 4 +- .../find/test/common/findModel.test.ts | 12 +- .../test/common/controller/cursor.test.ts | 198 +++++++++--------- .../controller/cursorMoveCommand.test.ts | 12 +- .../common/editor/rangeDecorations.test.ts | 4 +- 6 files changed, 129 insertions(+), 129 deletions(-) diff --git a/src/vs/editor/browser/view/viewController.ts b/src/vs/editor/browser/view/viewController.ts index 34828bc9f9226..f37a97d934489 100644 --- a/src/vs/editor/browser/view/viewController.ts +++ b/src/vs/editor/browser/view/viewController.ts @@ -11,7 +11,7 @@ import { IEditorMouseEvent } from 'vs/editor/browser/editorBrowser'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IViewModel } from 'vs/editor/common/viewModel/viewModel'; import { ViewOutgoingEvents } from 'vs/editor/browser/view/viewOutgoingEvents'; -import { CoreCommands, CoreEditorCommand } from 'vs/editor/common/controller/coreCommands'; +import { CoreNavigationCommands, CoreEditorCommand } from 'vs/editor/common/controller/coreCommands'; export interface ExecCoreEditorCommandFunc { (editorCommand: CoreEditorCommand, args: any): void; @@ -165,7 +165,7 @@ export class ViewController { public moveTo(viewPosition: Position): void { viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.MoveTo, { + this._execMouseCommand(CoreNavigationCommands.MoveTo, { position: this.convertViewToModelPosition(viewPosition), viewPosition: viewPosition }); @@ -173,7 +173,7 @@ export class ViewController { private moveToSelect(viewPosition: Position): void { viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.MoveToSelect, { + this._execMouseCommand(CoreNavigationCommands.MoveToSelect, { position: this.convertViewToModelPosition(viewPosition), viewPosition: viewPosition }); @@ -181,7 +181,7 @@ export class ViewController { private columnSelect(viewPosition: Position, mouseColumn: number): void { viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.ColumnSelect, { + this._execMouseCommand(CoreNavigationCommands.ColumnSelect, { position: this.convertViewToModelPosition(viewPosition), viewPosition: viewPosition, mouseColumn: mouseColumn @@ -190,7 +190,7 @@ export class ViewController { private createCursor(viewPosition: Position, wholeLine: boolean): void { viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.CreateCursor, { + this._execMouseCommand(CoreNavigationCommands.CreateCursor, { position: this.convertViewToModelPosition(viewPosition), viewPosition: viewPosition, wholeLine: wholeLine @@ -199,7 +199,7 @@ export class ViewController { private lastCursorMoveToSelect(viewPosition: Position): void { viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.LastCursorMoveToSelect, { + this._execMouseCommand(CoreNavigationCommands.LastCursorMoveToSelect, { position: this.convertViewToModelPosition(viewPosition), viewPosition: viewPosition }); @@ -207,28 +207,28 @@ export class ViewController { private wordSelect(viewPosition: Position): void { viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.WordSelect, { + this._execMouseCommand(CoreNavigationCommands.WordSelect, { position: this.convertViewToModelPosition(viewPosition) }); } private wordSelectDrag(viewPosition: Position): void { viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.WordSelectDrag, { + this._execMouseCommand(CoreNavigationCommands.WordSelectDrag, { position: this.convertViewToModelPosition(viewPosition) }); } private lastCursorWordSelect(viewPosition: Position): void { viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.LastCursorWordSelect, { + this._execMouseCommand(CoreNavigationCommands.LastCursorWordSelect, { position: this.convertViewToModelPosition(viewPosition) }); } private lineSelect(viewPosition: Position): void { viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.LineSelect, { + this._execMouseCommand(CoreNavigationCommands.LineSelect, { position: this.convertViewToModelPosition(viewPosition), viewPosition: viewPosition }); @@ -236,7 +236,7 @@ export class ViewController { private lineSelectDrag(viewPosition: Position): void { viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.LineSelectDrag, { + this._execMouseCommand(CoreNavigationCommands.LineSelectDrag, { position: this.convertViewToModelPosition(viewPosition), viewPosition: viewPosition }); @@ -244,7 +244,7 @@ export class ViewController { private lastCursorLineSelect(viewPosition: Position): void { viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.LastCursorLineSelect, { + this._execMouseCommand(CoreNavigationCommands.LastCursorLineSelect, { position: this.convertViewToModelPosition(viewPosition), viewPosition: viewPosition }); @@ -252,14 +252,14 @@ export class ViewController { private lastCursorLineSelectDrag(viewPosition: Position): void { viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreCommands.LastCursorLineSelectDrag, { + this._execMouseCommand(CoreNavigationCommands.LastCursorLineSelectDrag, { position: this.convertViewToModelPosition(viewPosition), viewPosition: viewPosition }); } private selectAll(): void { - this._execMouseCommand(CoreCommands.SelectAll, {}); + this._execMouseCommand(CoreNavigationCommands.SelectAll, {}); } // ---------------------- diff --git a/src/vs/editor/common/controller/coreCommands.ts b/src/vs/editor/common/controller/coreCommands.ts index 004c19921ecef..6ad405c37a1f5 100644 --- a/src/vs/editor/common/controller/coreCommands.ts +++ b/src/vs/editor/common/controller/coreCommands.ts @@ -234,7 +234,7 @@ export namespace RevealLine_ { }; } -export namespace CoreCommands { +export namespace CoreNavigationCommands { class BaseMoveToCommand extends CoreEditorCommand { @@ -1538,7 +1538,7 @@ namespace Config { } registerCommand(new BaseTextInputAwareCommand({ - editorHandler: CoreCommands.SelectAll, + editorHandler: CoreNavigationCommands.SelectAll, inputHandler: 'selectAll', id: 'editor.action.selectAll', precondition: null, diff --git a/src/vs/editor/contrib/find/test/common/findModel.test.ts b/src/vs/editor/contrib/find/test/common/findModel.test.ts index a4dca9c06a9fc..b1b48e254995e 100644 --- a/src/vs/editor/contrib/find/test/common/findModel.test.ts +++ b/src/vs/editor/contrib/find/test/common/findModel.test.ts @@ -13,7 +13,7 @@ import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { FindModelBoundToEditorModel } from 'vs/editor/contrib/find/common/findModel'; import { FindReplaceState } from 'vs/editor/contrib/find/common/findState'; import { withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; -import { CoreCommands } from 'vs/editor/common/controller/coreCommands'; +import { CoreNavigationCommands } from 'vs/editor/common/controller/coreCommands'; suite('FindModel', () => { @@ -303,7 +303,7 @@ suite('FindModel', () => { ] ); - cursor.trigger('mouse', CoreCommands.MoveTo.id, { + cursor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { position: new Position(6, 20) }); @@ -663,7 +663,7 @@ suite('FindModel', () => { ] ); - cursor.trigger('mouse', CoreCommands.MoveTo.id, { + cursor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { position: new Position(6, 20) }); assertFindState( @@ -1150,7 +1150,7 @@ suite('FindModel', () => { ] ); - cursor.trigger('mouse', CoreCommands.MoveTo.id, { + cursor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { position: new Position(6, 20) }); assertFindState( @@ -1311,7 +1311,7 @@ suite('FindModel', () => { ] ); - cursor.trigger('mouse', CoreCommands.MoveTo.id, { + cursor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { position: new Position(6, 20) }); assertFindState( @@ -1741,7 +1741,7 @@ suite('FindModel', () => { findState.change({ searchString: 'hello(?=\\sworld)', replaceString: 'hi', isRegex: true }, false); let findModel = new FindModelBoundToEditorModel(editor, findState); - cursor.trigger('mouse', CoreCommands.MoveTo.id, { + cursor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { position: new Position(8, 14) }); diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index e528da7f733c8..134f327f9bf02 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -24,7 +24,7 @@ import { LanguageIdentifier } from 'vs/editor/common/modes'; import { viewModelHelper } from 'vs/editor/test/common/editorTestUtils'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { CoreCommands } from 'vs/editor/common/controller/coreCommands'; +import { CoreNavigationCommands } from 'vs/editor/common/controller/coreCommands'; let H = Handler; @@ -36,11 +36,11 @@ function cursorCommand(cursor: Cursor, command: string, extraData?: any, overwri function moveTo(cursor: Cursor, lineNumber: number, column: number, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.MoveToSelect.runCoreEditorCommand(cursor, { + CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(cursor, { position: new Position(lineNumber, column) }); } else { - CoreCommands.MoveTo.runCoreEditorCommand(cursor, { + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(lineNumber, column) }); } @@ -48,65 +48,65 @@ function moveTo(cursor: Cursor, lineNumber: number, column: number, inSelectionM function moveLeft(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorLeftSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorLeftSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorLeft.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorLeft.runCoreEditorCommand(cursor, {}); } } function moveRight(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorRightSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorRightSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorRight.runCoreEditorCommand(cursor, {}); } } function moveDown(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorDownSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorDownSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorDown.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorDown.runCoreEditorCommand(cursor, {}); } } function moveUp(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorUpSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorUpSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorUp.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorUp.runCoreEditorCommand(cursor, {}); } } function moveToBeginningOfLine(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorHomeSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorHomeSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorHome.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorHome.runCoreEditorCommand(cursor, {}); } } function moveToEndOfLine(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorEndSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorEndSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorEnd.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorEnd.runCoreEditorCommand(cursor, {}); } } function moveToBeginningOfBuffer(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorTopSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorTopSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorTop.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorTop.runCoreEditorCommand(cursor, {}); } } function moveToEndOfBuffer(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorBottomSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorBottomSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorBottom.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorBottom.runCoreEditorCommand(cursor, {}); } } @@ -590,7 +590,7 @@ suite('Editor Controller - Cursor', () => { // --------- misc test('select all', () => { - CoreCommands.SelectAll.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.SelectAll.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 5, LINE5.length + 1)); }); @@ -599,37 +599,37 @@ suite('Editor Controller - Cursor', () => { // 01234 56789012345678 0 // let LINE1 = ' \tMy First Line\t '; moveTo(thisCursor, 1, 1); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 2, 1)); moveTo(thisCursor, 1, 2); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 2, 1)); moveTo(thisCursor, 1, 5); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 2, 1)); moveTo(thisCursor, 1, 19); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 2, 1)); moveTo(thisCursor, 1, 20); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 2, 1)); moveTo(thisCursor, 1, 21); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 2, 1)); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 3, 1)); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 4, 1)); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 5, 1)); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 5, LINE5.length + 1)); - CoreCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); + CoreNavigationCommands.ExpandLineSelection.runCoreEditorCommand(thisCursor, {}); assertCursor(thisCursor, new Selection(1, 1, 5, LINE5.length + 1)); }); @@ -710,7 +710,7 @@ suite('Editor Controller - Cursor', () => { moveTo(cursor, 1, 7, false); assertCursor(cursor, new Position(1, 7)); - CoreCommands.ColumnSelect.runCoreEditorCommand(cursor, { + CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(cursor, { position: new Position(4, 4), viewPosition: new Position(4, 4), mouseColumn: 15 @@ -744,7 +744,7 @@ suite('Editor Controller - Cursor', () => { moveTo(cursor, 1, 4, false); assertCursor(cursor, new Position(1, 4)); - CoreCommands.ColumnSelect.runCoreEditorCommand(cursor, { + CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(cursor, { position: new Position(4, 1), viewPosition: new Position(4, 1), mouseColumn: 1 @@ -779,7 +779,7 @@ suite('Editor Controller - Cursor', () => { moveTo(cursor, 10, 10, false); assertCursor(cursor, new Position(10, 10)); - CoreCommands.ColumnSelect.runCoreEditorCommand(cursor, { + CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(cursor, { position: new Position(1, 1), viewPosition: new Position(1, 1), mouseColumn: 1 @@ -797,7 +797,7 @@ suite('Editor Controller - Cursor', () => { new Selection(1, 10, 1, 1), ]); - CoreCommands.ColumnSelect.runCoreEditorCommand(cursor, { + CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(cursor, { position: new Position(1, 1), viewPosition: new Position(1, 1), mouseColumn: 1 @@ -837,28 +837,28 @@ suite('Editor Controller - Cursor', () => { moveTo(cursor, 10, 10, false); assertCursor(cursor, new Position(10, 10)); - CoreCommands.CursorColumnSelectLeft.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectLeft.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(10, 10, 10, 9) ]); - CoreCommands.CursorColumnSelectLeft.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectLeft.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(10, 10, 10, 8) ]); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(10, 10, 10, 9) ]); - CoreCommands.CursorColumnSelectUp.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectUp.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(10, 10, 10, 9), new Selection(9, 10, 9, 9), ]); - CoreCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(10, 10, 10, 9) ]); @@ -882,28 +882,28 @@ suite('Editor Controller - Cursor', () => { moveTo(cursor, 1, 4, false); assertCursor(cursor, new Position(1, 4)); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 5) ]); - CoreCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 5), new Selection(2, 4, 2, 5) ]); - CoreCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 5), new Selection(2, 4, 2, 5), new Selection(3, 4, 3, 5), ]); - CoreCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectDown.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 5), new Selection(2, 4, 2, 5), @@ -914,7 +914,7 @@ suite('Editor Controller - Cursor', () => { new Selection(7, 4, 7, 5), ]); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 6), new Selection(2, 4, 2, 6), @@ -926,16 +926,16 @@ suite('Editor Controller - Cursor', () => { ]); // 10 times - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 16), new Selection(2, 4, 2, 16), @@ -947,16 +947,16 @@ suite('Editor Controller - Cursor', () => { ]); // 10 times - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 26), new Selection(2, 4, 2, 26), @@ -968,8 +968,8 @@ suite('Editor Controller - Cursor', () => { ]); // 2 times => reaching the ending of lines 1 and 2 - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 28), new Selection(2, 4, 2, 28), @@ -981,10 +981,10 @@ suite('Editor Controller - Cursor', () => { ]); // 4 times => reaching the ending of line 3 - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 28), new Selection(2, 4, 2, 28), @@ -996,8 +996,8 @@ suite('Editor Controller - Cursor', () => { ]); // 2 times => reaching the ending of line 4 - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 28), new Selection(2, 4, 2, 28), @@ -1009,7 +1009,7 @@ suite('Editor Controller - Cursor', () => { ]); // 1 time => reaching the ending of line 7 - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 28), new Selection(2, 4, 2, 28), @@ -1021,9 +1021,9 @@ suite('Editor Controller - Cursor', () => { ]); // 3 times => reaching the ending of lines 5 & 6 - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 28), new Selection(2, 4, 2, 28), @@ -1035,7 +1035,7 @@ suite('Editor Controller - Cursor', () => { ]); // cannot go anywhere anymore - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 28), new Selection(2, 4, 2, 28), @@ -1047,10 +1047,10 @@ suite('Editor Controller - Cursor', () => { ]); // cannot go anywhere anymore even if we insist - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); - CoreCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectRight.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 28), new Selection(2, 4, 2, 28), @@ -1062,7 +1062,7 @@ suite('Editor Controller - Cursor', () => { ]); // can easily go back - CoreCommands.CursorColumnSelectLeft.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorColumnSelectLeft.runCoreEditorCommand(cursor, {}); assertCursor(cursor, [ new Selection(1, 4, 1, 28), new Selection(2, 4, 2, 28), @@ -1143,7 +1143,7 @@ suite('Editor Controller - Regression tests', () => { cursorCommand(cursor, H.Type, { text: 'x' }); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\t\n\tx', 'assert4'); - CoreCommands.CursorLeft.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorLeft.runCoreEditorCommand(cursor, {}); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\t\n\tx', 'assert5'); cursorCommand(cursor, H.DeleteLeft, {}); @@ -1632,9 +1632,9 @@ suite('Editor Controller - Regression tests', () => { } }; if (col === 1) { - CoreCommands.WordSelect.runCoreEditorCommand(cursor, args); + CoreNavigationCommands.WordSelect.runCoreEditorCommand(cursor, args); } else { - CoreCommands.WordSelectDrag.runCoreEditorCommand(cursor, args); + CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(cursor, args); } assert.equal(cursor.getSelection().startColumn, 1, 'TEST FOR ' + col); @@ -1802,7 +1802,7 @@ suite('Editor Controller - Cursor Configuration', () => { ], modelOpts: { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } }, (model, cursor) => { - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(1, 21) }, 'keyboard'); + cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(1, 21) }, 'keyboard'); cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); assert.equal(model.getLineContent(1), ' \tMy First Line\t '); assert.equal(model.getLineContent(2), ' '); @@ -1821,56 +1821,56 @@ suite('Editor Controller - Cursor Configuration', () => { modelOpts: { insertSpaces: true, tabSize: 13, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } }, (model, cursor) => { // Tab on column 1 - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(2, 1) }, 'keyboard'); + cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 1) }, 'keyboard'); cursorCommand(cursor, H.Tab, null, 'keyboard'); assert.equal(model.getLineContent(2), ' My Second Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 2 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(2, 2) }, 'keyboard'); + cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 2) }, 'keyboard'); cursorCommand(cursor, H.Tab, null, 'keyboard'); assert.equal(model.getLineContent(2), 'M y Second Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 3 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(2, 3) }, 'keyboard'); + cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 3) }, 'keyboard'); cursorCommand(cursor, H.Tab, null, 'keyboard'); assert.equal(model.getLineContent(2), 'My Second Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 4 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(2, 4) }, 'keyboard'); + cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 4) }, 'keyboard'); cursorCommand(cursor, H.Tab, null, 'keyboard'); assert.equal(model.getLineContent(2), 'My Second Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 5 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(2, 5) }, 'keyboard'); + cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 5) }, 'keyboard'); cursorCommand(cursor, H.Tab, null, 'keyboard'); assert.equal(model.getLineContent(2), 'My S econd Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 5 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(2, 5) }, 'keyboard'); + cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 5) }, 'keyboard'); cursorCommand(cursor, H.Tab, null, 'keyboard'); assert.equal(model.getLineContent(2), 'My S econd Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 13 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(2, 13) }, 'keyboard'); + cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 13) }, 'keyboard'); cursorCommand(cursor, H.Tab, null, 'keyboard'); assert.equal(model.getLineContent(2), 'My Second Li ne123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 14 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreCommands.MoveTo.id, { position: new Position(2, 14) }, 'keyboard'); + cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 14) }, 'keyboard'); cursorCommand(cursor, H.Tab, null, 'keyboard'); assert.equal(model.getLineContent(2), 'My Second Lin e123'); }); @@ -2341,7 +2341,7 @@ suite('Editor Controller - Cursor Configuration', () => { cursorCommand(cursor, H.Type, { text: 'x' }); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\ty\n\tx', 'assert4'); - CoreCommands.CursorLeft.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorLeft.runCoreEditorCommand(cursor, {}); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\ty\n\tx', 'assert5'); cursorCommand(cursor, H.DeleteLeft, {}); diff --git a/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts b/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts index 5528a35ac24fa..acab85b463e78 100644 --- a/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts +++ b/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts @@ -17,7 +17,7 @@ import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IViewModelHelper } from 'vs/editor/common/controller/cursorCommon'; -import { CoreCommands } from 'vs/editor/common/controller/coreCommands'; +import { CoreNavigationCommands } from 'vs/editor/common/controller/coreCommands'; suite('Cursor move command test', () => { @@ -469,7 +469,7 @@ interface ICursorOpts { // Move command function move(cursor: Cursor, args: any) { - CoreCommands.CursorMove.runCoreEditorCommand(cursor, args); + CoreNavigationCommands.CursorMove.runCoreEditorCommand(cursor, args); } function moveToLineStart(cursor: Cursor) { @@ -553,11 +553,11 @@ function selectionEqual(selection: Selection, posLineNumber: number, posColumn: function moveTo(cursor: Cursor, lineNumber: number, column: number, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.MoveToSelect.runCoreEditorCommand(cursor, { + CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(cursor, { position: new Position(lineNumber, column) }); } else { - CoreCommands.MoveTo.runCoreEditorCommand(cursor, { + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(lineNumber, column) }); } @@ -565,8 +565,8 @@ function moveTo(cursor: Cursor, lineNumber: number, column: number, inSelectionM function moveToEndOfLine(cursor: Cursor, inSelectionMode: boolean = false) { if (inSelectionMode) { - CoreCommands.CursorEndSelect.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorEndSelect.runCoreEditorCommand(cursor, {}); } else { - CoreCommands.CursorEnd.runCoreEditorCommand(cursor, {}); + CoreNavigationCommands.CursorEnd.runCoreEditorCommand(cursor, {}); } } diff --git a/src/vs/workbench/test/common/editor/rangeDecorations.test.ts b/src/vs/workbench/test/common/editor/rangeDecorations.test.ts index f04f09a97e881..617ce785ac108 100644 --- a/src/vs/workbench/test/common/editor/rangeDecorations.test.ts +++ b/src/vs/workbench/test/common/editor/rangeDecorations.test.ts @@ -24,7 +24,7 @@ import { Cursor } from 'vs/editor/common/controller/cursor'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl'; -import { CoreCommands } from 'vs/editor/common/controller/coreCommands'; +import { CoreNavigationCommands } from 'vs/editor/common/controller/coreCommands'; suite('Editor - Range decorations', () => { @@ -111,7 +111,7 @@ suite('Editor - Range decorations', () => { test('highlight is removed on cursor position change', function () { testObject.highlightRange({ resource: model.uri, range: { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 } }); - cursor.trigger('mouse', CoreCommands.MoveTo.id, { + cursor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { position: new Position(2, 1) }); From c466ad6092a3b55b0614a9ae5b6b94b448f4c795 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 18 May 2017 18:53:30 +0200 Subject: [PATCH 0732/2747] Add ICommand.insertsAutoWhitespace --- .../editor/common/commands/replaceCommand.ts | 28 ++-- src/vs/editor/common/controller/cursor.ts | 36 ++--- .../editor/common/controller/cursorCommon.ts | 16 +-- .../controller/cursorDeleteOperations.ts | 24 ++-- .../common/controller/cursorTypeOperations.ts | 132 ++++++++---------- src/vs/editor/common/editorCommon.ts | 8 ++ 6 files changed, 111 insertions(+), 133 deletions(-) diff --git a/src/vs/editor/common/commands/replaceCommand.ts b/src/vs/editor/common/commands/replaceCommand.ts index c3c2c765bc412..1083964b0ff6d 100644 --- a/src/vs/editor/common/commands/replaceCommand.ts +++ b/src/vs/editor/common/commands/replaceCommand.ts @@ -10,12 +10,14 @@ import { Range } from 'vs/editor/common/core/range'; export class ReplaceCommand implements editorCommon.ICommand { - private _range: Range; - private _text: string; + private readonly _range: Range; + private readonly _text: string; + public readonly insertsAutoWhitespace: boolean; - constructor(range: Range, text: string) { + constructor(range: Range, text: string, insertsAutoWhitespace: boolean = false) { this._range = range; this._text = text; + this.insertsAutoWhitespace = insertsAutoWhitespace; } public getEditOperations(model: editorCommon.ITokenizedModel, builder: editorCommon.IEditOperationBuilder): void { @@ -36,12 +38,14 @@ export class ReplaceCommand implements editorCommon.ICommand { export class ReplaceCommandWithoutChangingPosition implements editorCommon.ICommand { - private _range: Range; - private _text: string; + private readonly _range: Range; + private readonly _text: string; + public readonly insertsAutoWhitespace: boolean; - constructor(range: Range, text: string) { + constructor(range: Range, text: string, insertsAutoWhitespace: boolean = false) { this._range = range; this._text = text; + this.insertsAutoWhitespace = insertsAutoWhitespace; } public getEditOperations(model: editorCommon.ITokenizedModel, builder: editorCommon.IEditOperationBuilder): void { @@ -62,16 +66,18 @@ export class ReplaceCommandWithoutChangingPosition implements editorCommon.IComm export class ReplaceCommandWithOffsetCursorState implements editorCommon.ICommand { - private _range: Range; - private _text: string; - private _columnDeltaOffset: number; - private _lineNumberDeltaOffset: number; + private readonly _range: Range; + private readonly _text: string; + private readonly _columnDeltaOffset: number; + private readonly _lineNumberDeltaOffset: number; + public readonly insertsAutoWhitespace: boolean; - constructor(range: Range, text: string, lineNumberDeltaOffset: number, columnDeltaOffset: number) { + constructor(range: Range, text: string, lineNumberDeltaOffset: number, columnDeltaOffset: number, insertsAutoWhitespace: boolean = false) { this._range = range; this._text = text; this._columnDeltaOffset = columnDeltaOffset; this._lineNumberDeltaOffset = lineNumberDeltaOffset; + this.insertsAutoWhitespace = insertsAutoWhitespace; } public getEditOperations(model: editorCommon.ITokenizedModel, builder: editorCommon.IEditOperationBuilder): void { diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 2098d553134cb..f080795bf6d84 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -14,7 +14,7 @@ import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { Selection, SelectionDirection, ISelection } from 'vs/editor/common/core/selection'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { CursorColumns, CursorConfiguration, EditOperationResult, SingleCursorState, IViewModelHelper, CursorContext, CursorState, RevealTarget, IColumnSelectData, ICursors, CommandResult } from 'vs/editor/common/controller/cursorCommon'; +import { CursorColumns, CursorConfiguration, EditOperationResult, SingleCursorState, IViewModelHelper, CursorContext, CursorState, RevealTarget, IColumnSelectData, ICursors } from 'vs/editor/common/controller/cursorCommon'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { DeleteOperations } from 'vs/editor/common/controller/cursorDeleteOperations'; import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; @@ -423,7 +423,7 @@ export class Cursor extends Disposable implements ICursors { this._cursors.setSelections(cursorState); } - private _getEditOperationsFromCommand(ctx: IExecContext, majorIdentifier: number, command: CommandResult): ICommandData { + private _getEditOperationsFromCommand(ctx: IExecContext, majorIdentifier: number, command: editorCommon.ICommand): ICommandData { // This method acts as a transaction, if the command fails // everything it has done is ignored let operations: editorCommon.IIdentifiedSingleEditOperation[] = []; @@ -442,7 +442,7 @@ export class Cursor extends Disposable implements ICursors { range: selection, text: text, forceMoveMarkers: false, - isAutoWhitespaceEdit: command.isAutoWhitespaceCommand + isAutoWhitespaceEdit: command.insertsAutoWhitespace }); }; @@ -494,7 +494,7 @@ export class Cursor extends Disposable implements ICursors { }; try { - command.command.getEditOperations(this._model, editOperationBuilder); + command.getEditOperations(this._model, editOperationBuilder); } catch (e) { e.friendlyMessage = nls.localize('corrupt.commands', "Unexpected exception while executing command."); onUnexpectedError(e); @@ -510,7 +510,7 @@ export class Cursor extends Disposable implements ICursors { }; } - private _getEditOperations(ctx: IExecContext, commands: CommandResult[]): ICommandsData { + private _getEditOperations(ctx: IExecContext, commands: editorCommon.ICommand[]): ICommandsData { let operations: editorCommon.IIdentifiedSingleEditOperation[] = []; let hadTrackedEditOperation: boolean = false; @@ -576,7 +576,7 @@ export class Cursor extends Disposable implements ICursors { return loserCursorsMap; } - private _arrayIsEmpty(commands: CommandResult[]): boolean { + private _arrayIsEmpty(commands: editorCommon.ICommand[]): boolean { for (let i = 0, len = commands.length; i < len; i++) { if (commands[i]) { return false; @@ -585,7 +585,7 @@ export class Cursor extends Disposable implements ICursors { return true; } - private _innerExecuteCommands(ctx: IExecContext, commands: CommandResult[]): void { + private _innerExecuteCommands(ctx: IExecContext, commands: editorCommon.ICommand[]): void { if (this._configuration.editor.readOnly) { return; @@ -655,7 +655,7 @@ export class Cursor extends Disposable implements ICursors { for (let i = 0; i < selectionsBefore.length; i++) { if (groupedInverseEditOperations[i].length > 0) { groupedInverseEditOperations[i].sort(minorBasedSorter); - cursorSelections[i] = commands[i].command.computeCursorState(this._model, { + cursorSelections[i] = commands[i].computeCursorState(this._model, { getInverseEditOperations: () => { return groupedInverseEditOperations[i]; }, @@ -1012,26 +1012,16 @@ export class Cursor extends Disposable implements ICursors { this._cursors.killSecondaryCursors(); - return new EditOperationResult( - [ - new CommandResult(command, false) - ], - { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: true - } - ); + return new EditOperationResult([command], { + shouldPushStackElementBefore: true, + shouldPushStackElementAfter: true + }); } private _externalExecuteCommands(args: CursorOperationArgs): EditOperationResult { const commands = args.eventData; - let _commands: CommandResult[] = []; - for (let i = 0, len = commands.length; i < len; i++) { - _commands[i] = new CommandResult(commands[i], false); - } - - return new EditOperationResult(_commands, { + return new EditOperationResult(commands, { shouldPushStackElementBefore: true, shouldPushStackElementAfter: true }); diff --git a/src/vs/editor/common/controller/cursorCommon.ts b/src/vs/editor/common/controller/cursorCommon.ts index 69ff558302f35..8c37d25a58113 100644 --- a/src/vs/editor/common/controller/cursorCommon.ts +++ b/src/vs/editor/common/controller/cursorCommon.ts @@ -427,28 +427,16 @@ export class CursorState { } } -export class CommandResult { - _commandResultBrand: void; - - readonly command: ICommand; - readonly isAutoWhitespaceCommand: boolean; - - constructor(command: ICommand, isAutoWhitespaceCommand: boolean) { - this.command = command; - this.isAutoWhitespaceCommand = isAutoWhitespaceCommand; - } -} - export class EditOperationResult { _editOperationResultBrand: void; - readonly commands: CommandResult[]; + readonly commands: ICommand[]; readonly shouldPushStackElementBefore: boolean; readonly shouldPushStackElementAfter: boolean; readonly reason: CursorChangeReason; constructor( - commands: CommandResult[], + commands: ICommand[], opts: { shouldPushStackElementBefore: boolean; shouldPushStackElementAfter: boolean; diff --git a/src/vs/editor/common/controller/cursorDeleteOperations.ts b/src/vs/editor/common/controller/cursorDeleteOperations.ts index 6996f1af6e686..68b006b107ec3 100644 --- a/src/vs/editor/common/controller/cursorDeleteOperations.ts +++ b/src/vs/editor/common/controller/cursorDeleteOperations.ts @@ -5,15 +5,16 @@ 'use strict'; import { ReplaceCommand } from 'vs/editor/common/commands/replaceCommand'; -import { SingleCursorState, CursorColumns, CursorConfiguration, ICursorSimpleModel, EditOperationResult, CommandResult } from 'vs/editor/common/controller/cursorCommon'; +import { SingleCursorState, CursorColumns, CursorConfiguration, ICursorSimpleModel, EditOperationResult } from 'vs/editor/common/controller/cursorCommon'; import { Range } from 'vs/editor/common/core/range'; import { MoveOperations } from 'vs/editor/common/controller/cursorMoveOperations'; import * as strings from 'vs/base/common/strings'; +import { ICommand } from "vs/editor/common/editorCommon"; export class DeleteOperations { public static deleteRight(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { - let commands: CommandResult[] = []; + let commands: ICommand[] = []; let shouldPushStackElementBefore = false; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; @@ -41,7 +42,7 @@ export class DeleteOperations { shouldPushStackElementBefore = true; } - commands[i] = new CommandResult(new ReplaceCommand(deleteSelection, ''), false); + commands[i] = new ReplaceCommand(deleteSelection, ''); } return new EditOperationResult(commands, { shouldPushStackElementBefore: shouldPushStackElementBefore, @@ -82,7 +83,7 @@ export class DeleteOperations { } private static _runAutoClosingPairDelete(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { - let commands: CommandResult[] = []; + let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; const position = cursor.position; @@ -92,7 +93,7 @@ export class DeleteOperations { position.lineNumber, position.column + 1 ); - commands[i] = new CommandResult(new ReplaceCommand(deleteSelection, ''), false); + commands[i] = new ReplaceCommand(deleteSelection, ''); } return new EditOperationResult(commands, { shouldPushStackElementBefore: true, @@ -106,7 +107,7 @@ export class DeleteOperations { return this._runAutoClosingPairDelete(config, model, cursors); } - let commands: CommandResult[] = []; + let commands: ICommand[] = []; let shouldPushStackElementBefore = false; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; @@ -155,7 +156,7 @@ export class DeleteOperations { shouldPushStackElementBefore = true; } - commands[i] = new CommandResult(new ReplaceCommand(deleteSelection, ''), false); + commands[i] = new ReplaceCommand(deleteSelection, ''); } return new EditOperationResult(commands, { shouldPushStackElementBefore: shouldPushStackElementBefore, @@ -164,7 +165,7 @@ export class DeleteOperations { } public static cut(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { - let commands: CommandResult[] = []; + let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; let selection = cursor.selection; @@ -208,7 +209,7 @@ export class DeleteOperations { ); if (!deleteSelection.isEmpty()) { - commands[i] = new CommandResult(new ReplaceCommand(deleteSelection, ''), false); + commands[i] = new ReplaceCommand(deleteSelection, ''); } else { commands[i] = null; } @@ -217,7 +218,7 @@ export class DeleteOperations { commands[i] = null; } } else { - commands[i] = new CommandResult(new ReplaceCommand(selection, ''), false); + commands[i] = new ReplaceCommand(selection, ''); } } return new EditOperationResult(commands, { @@ -225,5 +226,4 @@ export class DeleteOperations { shouldPushStackElementAfter: true }); } - -} \ No newline at end of file +} diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index 2f88bb956b49c..b231d46d1e4b7 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -6,7 +6,7 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import { ReplaceCommand, ReplaceCommandWithoutChangingPosition, ReplaceCommandWithOffsetCursorState } from 'vs/editor/common/commands/replaceCommand'; -import { SingleCursorState, CursorColumns, CursorConfiguration, ICursorSimpleModel, EditOperationResult, CommandResult } from 'vs/editor/common/controller/cursorCommon'; +import { SingleCursorState, CursorColumns, CursorConfiguration, ICursorSimpleModel, EditOperationResult } from 'vs/editor/common/controller/cursorCommon'; import { Range } from 'vs/editor/common/core/range'; import { ICommand, ITokenizedModel } from 'vs/editor/common/editorCommon'; import * as strings from 'vs/base/common/strings'; @@ -22,18 +22,15 @@ import { CursorChangeReason } from "vs/editor/common/controller/cursorEvents"; export class TypeOperations { public static indent(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { - let commands: CommandResult[] = []; + let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; - commands[i] = new CommandResult( - new ShiftCommand(cursor.selection, { - isUnshift: false, - tabSize: config.tabSize, - oneIndent: config.oneIndent, - useTabStops: config.useTabStops - }), - false - ); + commands[i] = new ShiftCommand(cursor.selection, { + isUnshift: false, + tabSize: config.tabSize, + oneIndent: config.oneIndent, + useTabStops: config.useTabStops + }); } return new EditOperationResult(commands, { shouldPushStackElementBefore: true, @@ -42,18 +39,15 @@ export class TypeOperations { } public static outdent(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { - let commands: CommandResult[] = []; + let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; - commands[i] = new CommandResult( - new ShiftCommand(cursor.selection, { - isUnshift: true, - tabSize: config.tabSize, - oneIndent: config.oneIndent, - useTabStops: config.useTabStops - }), - false - ); + commands[i] = new ShiftCommand(cursor.selection, { + isUnshift: true, + tabSize: config.tabSize, + oneIndent: config.oneIndent, + useTabStops: config.useTabStops + }); } return new EditOperationResult(commands, { shouldPushStackElementBefore: true, @@ -84,11 +78,11 @@ export class TypeOperations { } public static distributedPaste(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[], text: string[]): EditOperationResult { - let commands: CommandResult[] = []; + let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; let selection = cursor.selection; - commands[i] = new CommandResult(new ReplaceCommand(selection, text[i]), false); + commands[i] = new ReplaceCommand(selection, text[i]); } return new EditOperationResult(commands, { shouldPushStackElementBefore: true, @@ -98,7 +92,7 @@ export class TypeOperations { } public static paste(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[], text: string, pasteOnNewLine: boolean): EditOperationResult { - let commands: CommandResult[] = []; + let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; let position = cursor.position; @@ -117,9 +111,9 @@ export class TypeOperations { if (pasteOnNewLine) { // Paste entire line at the beginning of line let typeSelection = new Range(position.lineNumber, 1, position.lineNumber, 1); - commands[i] = new CommandResult(new ReplaceCommand(typeSelection, text), false); + commands[i] = new ReplaceCommand(typeSelection, text); } else { - commands[i] = new CommandResult(new ReplaceCommand(selection, text), false); + commands[i] = new ReplaceCommand(selection, text); } } return new EditOperationResult(commands, { @@ -160,7 +154,7 @@ export class TypeOperations { return null; } - private static _replaceJumpToNextIndent(config: CursorConfiguration, model: ICursorSimpleModel, selection: Selection): ReplaceCommand { + private static _replaceJumpToNextIndent(config: CursorConfiguration, model: ICursorSimpleModel, selection: Selection, insertsAutoWhitespace: boolean): ReplaceCommand { let typeText = ''; let position = selection.getStartPosition(); @@ -175,11 +169,11 @@ export class TypeOperations { typeText = '\t'; } - return new ReplaceCommand(selection, typeText); + return new ReplaceCommand(selection, typeText, insertsAutoWhitespace); } public static tab(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[]): EditOperationResult { - let commands: CommandResult[] = []; + let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; let selection = cursor.selection; @@ -193,32 +187,28 @@ export class TypeOperations { goodIndent = goodIndent || '\t'; let possibleTypeText = config.normalizeIndentation(goodIndent); if (!strings.startsWith(lineText, possibleTypeText)) { - let command = new ReplaceCommand(new Range(selection.startLineNumber, 1, selection.startLineNumber, lineText.length + 1), possibleTypeText); - commands[i] = new CommandResult(command, true); + commands[i] = new ReplaceCommand(new Range(selection.startLineNumber, 1, selection.startLineNumber, lineText.length + 1), possibleTypeText, true); continue; } } - commands[i] = new CommandResult(this._replaceJumpToNextIndent(config, model, selection), true); + commands[i] = this._replaceJumpToNextIndent(config, model, selection, true); } else { if (selection.startLineNumber === selection.endLineNumber) { let lineMaxColumn = model.getLineMaxColumn(selection.startLineNumber); if (selection.startColumn !== 1 || selection.endColumn !== lineMaxColumn) { // This is a single line selection that is not the entire line - commands[i] = new CommandResult(this._replaceJumpToNextIndent(config, model, selection), false); + commands[i] = this._replaceJumpToNextIndent(config, model, selection, false); continue; } } - commands[i] = new CommandResult( - new ShiftCommand(selection, { - isUnshift: false, - tabSize: config.tabSize, - oneIndent: config.oneIndent, - useTabStops: config.useTabStops - }), - false - ); + commands[i] = new ShiftCommand(selection, { + isUnshift: false, + tabSize: config.tabSize, + oneIndent: config.oneIndent, + useTabStops: config.useTabStops + }); } } return new EditOperationResult(commands, { @@ -228,7 +218,7 @@ export class TypeOperations { } public static replacePreviousChar(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], txt: string, replaceCharCnt: number): EditOperationResult { - let commands: CommandResult[] = []; + let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; if (!cursor.selection.isEmpty()) { @@ -241,7 +231,7 @@ export class TypeOperations { let pos = cursor.position; let startColumn = Math.max(1, pos.column - replaceCharCnt); let range = new Range(pos.lineNumber, startColumn, pos.lineNumber, pos.column); - commands[i] = new CommandResult(new ReplaceCommand(range, txt), false); + commands[i] = new ReplaceCommand(range, txt); } return new EditOperationResult(commands, { shouldPushStackElementBefore: false, @@ -249,15 +239,15 @@ export class TypeOperations { }); } - public static typeCommand(range: Range, text: string, keepPosition: boolean): ICommand { + private static _typeCommand(range: Range, text: string, keepPosition: boolean): ICommand { if (keepPosition) { - return new ReplaceCommandWithoutChangingPosition(range, text); + return new ReplaceCommandWithoutChangingPosition(range, text, true); } else { - return new ReplaceCommand(range, text); + return new ReplaceCommand(range, text, true); } } - private static _enter(config: CursorConfiguration, model: ITokenizedModel, keepPosition: boolean, range: Range): CommandResult { + private static _enter(config: CursorConfiguration, model: ITokenizedModel, keepPosition: boolean, range: Range): ICommand { let r = LanguageConfigurationRegistry.getEnterAction(model, range); let enterAction = r.enterAction; let indentation = r.indentation; @@ -286,14 +276,13 @@ export class TypeOperations { indentation = indentation.substring(0, indentation.length - enterAction.removeText); } - let executeCommand: ICommand; if (enterAction.indentAction === IndentAction.None) { // Nothing special - executeCommand = TypeOperations.typeCommand(range, beforeText + '\n' + config.normalizeIndentation(indentation + enterAction.appendText), keepPosition); + return TypeOperations._typeCommand(range, beforeText + '\n' + config.normalizeIndentation(indentation + enterAction.appendText), keepPosition); } else if (enterAction.indentAction === IndentAction.Indent) { // Indent once - executeCommand = TypeOperations.typeCommand(range, beforeText + '\n' + config.normalizeIndentation(indentation + enterAction.appendText), keepPosition); + return TypeOperations._typeCommand(range, beforeText + '\n' + config.normalizeIndentation(indentation + enterAction.appendText), keepPosition); } else if (enterAction.indentAction === IndentAction.IndentOutdent) { // Ultra special @@ -303,16 +292,16 @@ export class TypeOperations { let typeText = beforeText + '\n' + increasedIndent + '\n' + normalIndent; if (keepPosition) { - executeCommand = new ReplaceCommandWithoutChangingPosition(range, typeText); + return new ReplaceCommandWithoutChangingPosition(range, typeText, true); } else { - executeCommand = new ReplaceCommandWithOffsetCursorState(range, typeText, -1, increasedIndent.length - normalIndent.length); + return new ReplaceCommandWithOffsetCursorState(range, typeText, -1, increasedIndent.length - normalIndent.length, true); } } else if (enterAction.indentAction === IndentAction.Outdent) { let actualIndentation = TypeOperations.unshiftIndent(config, indentation); - executeCommand = TypeOperations.typeCommand(range, beforeText + '\n' + config.normalizeIndentation(actualIndentation + enterAction.appendText), keepPosition); + return TypeOperations._typeCommand(range, beforeText + '\n' + config.normalizeIndentation(actualIndentation + enterAction.appendText), keepPosition); } - return new CommandResult(executeCommand, true); + return null; } private static _isAutoClosingCloseCharType(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): boolean { @@ -341,12 +330,12 @@ export class TypeOperations { } private static _runAutoClosingCloseCharType(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): EditOperationResult { - let commands: CommandResult[] = []; + let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; const position = cursor.position; const typeSelection = new Range(position.lineNumber, position.column, position.lineNumber, position.column + 1); - commands[i] = new CommandResult(new ReplaceCommand(typeSelection, ch), false); + commands[i] = new ReplaceCommand(typeSelection, ch); } return new EditOperationResult(commands, { shouldPushStackElementBefore: false, @@ -419,15 +408,12 @@ export class TypeOperations { } private static _runAutoClosingOpenCharType(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): EditOperationResult { - let commands: CommandResult[] = []; + let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; const selection = cursor.selection; const closeCharacter = config.autoClosingPairsOpen[ch]; - commands[i] = new CommandResult( - new ReplaceCommandWithOffsetCursorState(selection, ch + closeCharacter, 0, -closeCharacter.length), - false - ); + commands[i] = new ReplaceCommandWithOffsetCursorState(selection, ch + closeCharacter, 0, -closeCharacter.length); } return new EditOperationResult(commands, { shouldPushStackElementBefore: true, @@ -471,12 +457,12 @@ export class TypeOperations { } private static _runSurroundSelectionType(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): EditOperationResult { - let commands: CommandResult[] = []; + let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; const selection = cursor.selection; const closeCharacter = config.surroundingPairs[ch]; - commands[i] = new CommandResult(new SurroundSelectionCommand(selection, ch, closeCharacter), false); + commands[i] = new SurroundSelectionCommand(selection, ch, closeCharacter); } return new EditOperationResult(commands, { shouldPushStackElementBefore: true, @@ -505,7 +491,7 @@ export class TypeOperations { } if (electricAction.appendText) { - const command = new CommandResult(new ReplaceCommandWithOffsetCursorState(cursor.selection, ch + electricAction.appendText, 0, -electricAction.appendText.length), false); + const command = new ReplaceCommandWithOffsetCursorState(cursor.selection, ch + electricAction.appendText, 0, -electricAction.appendText.length); return new EditOperationResult([command], { shouldPushStackElementBefore: false, shouldPushStackElementAfter: true @@ -536,7 +522,7 @@ export class TypeOperations { let typeSelection = new Range(position.lineNumber, 1, position.lineNumber, position.column); - const command = new CommandResult(new ReplaceCommand(typeSelection, typeText), false); + const command = new ReplaceCommand(typeSelection, typeText); return new EditOperationResult([command], { shouldPushStackElementBefore: false, shouldPushStackElementAfter: true @@ -550,7 +536,7 @@ export class TypeOperations { public static typeWithInterceptors(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): EditOperationResult { if (ch === '\n') { - let commands: CommandResult[] = []; + let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { commands[i] = TypeOperations._enter(config, model, false, cursors[i].selection); } @@ -585,10 +571,10 @@ export class TypeOperations { } public static typeWithoutInterceptors(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], str: string): EditOperationResult { - let commands: CommandResult[] = []; + let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; - commands[i] = new CommandResult(new ReplaceCommand(cursor.selection, str), false); + commands[i] = new ReplaceCommand(cursor.selection, str); } return new EditOperationResult(commands, { shouldPushStackElementBefore: false, @@ -597,13 +583,13 @@ export class TypeOperations { } public static lineInsertBefore(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[]): EditOperationResult { - let commands: CommandResult[] = []; + let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; let lineNumber = cursor.position.lineNumber; if (lineNumber === 1) { - commands[i] = new CommandResult(new ReplaceCommandWithoutChangingPosition(new Range(1, 1, 1, 1), '\n'), false); + commands[i] = new ReplaceCommandWithoutChangingPosition(new Range(1, 1, 1, 1), '\n'); } else { lineNumber--; let column = model.getLineMaxColumn(lineNumber); @@ -618,7 +604,7 @@ export class TypeOperations { } public static lineInsertAfter(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[]): EditOperationResult { - let commands: CommandResult[] = []; + let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; let position = cursor.position; @@ -632,7 +618,7 @@ export class TypeOperations { } public static lineBreakInsert(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[]): EditOperationResult { - let commands: CommandResult[] = []; + let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; commands[i] = this._enter(config, model, true, cursor.selection); diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index d0faa44be8e12..b5c1bba3a0a3e 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -336,12 +336,20 @@ export interface ICursorStateComputerData { * A command that modifies text / cursor state on a model. */ export interface ICommand { + + /** + * Signal that this command is inserting automatic whitespace that should be trimmed if possible. + * @internal + */ + readonly insertsAutoWhitespace?: boolean; + /** * Get the edit operations needed to execute this command. * @param model The model the command will execute on. * @param builder A helper to collect the needed edit operations and to track selections. */ getEditOperations(model: ITokenizedModel, builder: IEditOperationBuilder): void; + /** * Compute the cursor state after the edit operations were applied. * @param model The model the commad has executed on. From 98465c0cd8b03e52e4e8210fae6608d6d00ba1b3 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 18 May 2017 19:34:35 +0200 Subject: [PATCH 0733/2747] Extract command execution out of Cursor --- src/vs/editor/common/controller/cursor.ts | 791 +++++++++++----------- 1 file changed, 401 insertions(+), 390 deletions(-) diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index f080795bf6d84..3c35af418f368 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -33,11 +33,6 @@ class CursorOperationArgs { } } -interface IExecContext { - selectionStartMarkers: string[]; - positionMarkers: string[]; -} - interface ICommandData { operations: editorCommon.IIdentifiedSingleEditOperation[]; hadTrackedEditOperation: boolean; @@ -343,17 +338,11 @@ export class Cursor extends Disposable implements ICursors { this._columnSelectData = null; - if (opResult) { - const execCtx: IExecContext = { - selectionStartMarkers: [], - positionMarkers: [] - }; - - this._innerExecuteCommands(execCtx, opResult.commands); - - for (let i = 0; i < execCtx.selectionStartMarkers.length; i++) { - this._model._removeMarker(execCtx.selectionStartMarkers[i]); - this._model._removeMarker(execCtx.positionMarkers[i]); + if (opResult && !this._configuration.editor.readOnly) { + const result = CommandExecutor.executeCommands(this._model, this._cursors.getSelections(), opResult.commands); + if (result) { + // The commands were applied correctly + this._interpretCommandResult(result); } } @@ -423,411 +412,138 @@ export class Cursor extends Disposable implements ICursors { this._cursors.setSelections(cursorState); } - private _getEditOperationsFromCommand(ctx: IExecContext, majorIdentifier: number, command: editorCommon.ICommand): ICommandData { - // This method acts as a transaction, if the command fails - // everything it has done is ignored - let operations: editorCommon.IIdentifiedSingleEditOperation[] = []; - let operationMinor = 0; - - const addEditOperation = (selection: Range, text: string) => { - if (selection.isEmpty() && text === '') { - // This command wants to add a no-op => no thank you - return; - } - operations.push({ - identifier: { - major: majorIdentifier, - minor: operationMinor++ - }, - range: selection, - text: text, - forceMoveMarkers: false, - isAutoWhitespaceEdit: command.insertsAutoWhitespace - }); - }; + // ----------------------------------------------------------------------------------------------------------- + // ----- emitting events - let hadTrackedEditOperation = false; - const addTrackedEditOperation = (selection: Range, text: string) => { - hadTrackedEditOperation = true; - addEditOperation(selection, text); - }; + private emitCursorPositionChanged(source: string, reason: CursorChangeReason): void { + const positions = this._cursors.getPositions(); + const primaryPosition = positions[0]; + const secondaryPositions = positions.slice(1); - const trackSelection = (selection: Selection, trackPreviousOnEmpty?: boolean) => { - let selectionMarkerStickToPreviousCharacter: boolean; - let positionMarkerStickToPreviousCharacter: boolean; + const viewPositions = this._cursors.getViewPositions(); + const primaryViewPosition = viewPositions[0]; + const secondaryViewPositions = viewPositions.slice(1); - if (selection.isEmpty()) { - // Try to lock it with surrounding text - if (typeof trackPreviousOnEmpty === 'boolean') { - selectionMarkerStickToPreviousCharacter = trackPreviousOnEmpty; - positionMarkerStickToPreviousCharacter = trackPreviousOnEmpty; - } else { - const maxLineColumn = this._model.getLineMaxColumn(selection.startLineNumber); - if (selection.startColumn === maxLineColumn) { - selectionMarkerStickToPreviousCharacter = true; - positionMarkerStickToPreviousCharacter = true; - } else { - selectionMarkerStickToPreviousCharacter = false; - positionMarkerStickToPreviousCharacter = false; - } - } - } else { - if (selection.getDirection() === SelectionDirection.LTR) { - selectionMarkerStickToPreviousCharacter = false; - positionMarkerStickToPreviousCharacter = true; - } else { - selectionMarkerStickToPreviousCharacter = true; - positionMarkerStickToPreviousCharacter = false; - } + let isInEditableRange: boolean = true; + if (this._model.hasEditableRange()) { + const editableRange = this._model.getEditableRange(); + if (!editableRange.containsPosition(primaryPosition)) { + isInEditableRange = false; } - - const l = ctx.selectionStartMarkers.length; - ctx.selectionStartMarkers[l] = this._model._addMarker(0, selection.selectionStartLineNumber, selection.selectionStartColumn, selectionMarkerStickToPreviousCharacter); - ctx.positionMarkers[l] = this._model._addMarker(0, selection.positionLineNumber, selection.positionColumn, positionMarkerStickToPreviousCharacter); - return l.toString(); - }; - - const editOperationBuilder: editorCommon.IEditOperationBuilder = { - addEditOperation: addEditOperation, - addTrackedEditOperation: addTrackedEditOperation, - trackSelection: trackSelection - }; - - try { - command.getEditOperations(this._model, editOperationBuilder); - } catch (e) { - e.friendlyMessage = nls.localize('corrupt.commands', "Unexpected exception while executing command."); - onUnexpectedError(e); - return { - operations: [], - hadTrackedEditOperation: false - }; } - - return { - operations: operations, - hadTrackedEditOperation: hadTrackedEditOperation + const e: ICursorPositionChangedEvent = { + position: primaryPosition, + viewPosition: primaryViewPosition, + secondaryPositions: secondaryPositions, + secondaryViewPositions: secondaryViewPositions, + reason: reason, + source: source, + isInEditableRange: isInEditableRange }; + this._eventEmitter.emit(CursorEventType.CursorPositionChanged, e); } - private _getEditOperations(ctx: IExecContext, commands: editorCommon.ICommand[]): ICommandsData { - let operations: editorCommon.IIdentifiedSingleEditOperation[] = []; - let hadTrackedEditOperation: boolean = false; + private emitCursorSelectionChanged(source: string, reason: CursorChangeReason): void { + const selections = this._cursors.getSelections(); + const primarySelection = selections[0]; + const secondarySelections = selections.slice(1); - for (let i = 0, len = commands.length; i < len; i++) { - if (commands[i]) { - const r = this._getEditOperationsFromCommand(ctx, i, commands[i]); - operations = operations.concat(r.operations); - hadTrackedEditOperation = hadTrackedEditOperation || r.hadTrackedEditOperation; - } - } - return { - operations: operations, - hadTrackedEditOperation: hadTrackedEditOperation + const viewSelections = this._cursors.getViewSelections(); + const primaryViewSelection = viewSelections[0]; + const secondaryViewSelections = viewSelections.slice(1); + + const e: ICursorSelectionChangedEvent = { + selection: primarySelection, + viewSelection: primaryViewSelection, + secondarySelections: secondarySelections, + secondaryViewSelections: secondaryViewSelections, + source: source || 'keyboard', + reason: reason }; + this._eventEmitter.emit(CursorEventType.CursorSelectionChanged, e); } - private _getLoserCursorMap(operations: editorCommon.IIdentifiedSingleEditOperation[]): { [index: string]: boolean; } { - // This is destructive on the array - operations = operations.slice(0); - - // Sort operations with last one first - operations.sort((a: editorCommon.IIdentifiedSingleEditOperation, b: editorCommon.IIdentifiedSingleEditOperation): number => { - // Note the minus! - return -(Range.compareRangesUsingEnds(a.range, b.range)); - }); - - // Operations can not overlap! - let loserCursorsMap: { [index: string]: boolean; } = {}; - - for (let i = 1; i < operations.length; i++) { - const previousOp = operations[i - 1]; - const currentOp = operations[i]; - - if (previousOp.range.getStartPosition().isBefore(currentOp.range.getEndPosition())) { - - let loserMajor: number; - - if (previousOp.identifier.major > currentOp.identifier.major) { - // previousOp loses the battle - loserMajor = previousOp.identifier.major; - } else { - loserMajor = currentOp.identifier.major; - } + private _revealRange(revealTarget: RevealTarget, verticalType: VerticalRevealType, revealHorizontal: boolean): void { + const positions = this._cursors.getPositions(); + const viewPositions = this._cursors.getViewPositions(); - loserCursorsMap[loserMajor.toString()] = true; + let position = positions[0]; + let viewPosition = viewPositions[0]; - for (let j = 0; j < operations.length; j++) { - if (operations[j].identifier.major === loserMajor) { - operations.splice(j, 1); - if (j < i) { - i--; - } - j--; - } + if (revealTarget === RevealTarget.TopMost) { + for (let i = 1; i < positions.length; i++) { + if (positions[i].isBefore(position)) { + position = positions[i]; + viewPosition = viewPositions[i]; } - - if (i > 0) { - i--; + } + } else if (revealTarget === RevealTarget.BottomMost) { + for (let i = 1; i < positions.length; i++) { + if (position.isBeforeOrEqual(positions[i])) { + position = positions[i]; + viewPosition = viewPositions[i]; } } + } else { + if (positions.length > 1) { + // no revealing! + return; + } } - return loserCursorsMap; + const range = new Range(position.lineNumber, position.column, position.lineNumber, position.column); + const viewRange = new Range(viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column); + this.emitCursorRevealRange(range, viewRange, verticalType, revealHorizontal); } - private _arrayIsEmpty(commands: editorCommon.ICommand[]): boolean { - for (let i = 0, len = commands.length; i < len; i++) { - if (commands[i]) { - return false; - } - } - return true; + public emitCursorRevealRange(range: Range, viewRange: Range, verticalType: VerticalRevealType, revealHorizontal: boolean) { + const e: ICursorRevealRangeEvent = { + range: range, + viewRange: viewRange, + verticalType: verticalType, + revealHorizontal: revealHorizontal + }; + this._eventEmitter.emit(CursorEventType.CursorRevealRange, e); } - private _innerExecuteCommands(ctx: IExecContext, commands: editorCommon.ICommand[]): void { + // ----------------------------------------------------------------------------------------------------------- + // ----- handlers beyond this point - if (this._configuration.editor.readOnly) { - return; - } + public trigger(source: string, handlerId: string, payload: any): void { + if (!this._handlers.hasOwnProperty(handlerId)) { + const command = CommonEditorRegistry.getEditorCommand(handlerId); + if (!command || !(command instanceof CoreEditorCommand)) { + return; + } - if (this._arrayIsEmpty(commands)) { + payload = payload || {}; + payload.source = source; + command.runCoreEditorCommand(this, payload); return; } + const handler = this._handlers[handlerId]; + const args = new CursorOperationArgs(source, payload); + this._onHandler(handlerId, handler, args); + } - const selectionsBefore = this._cursors.getSelections(); + private _registerHandlers(): void { + let H = editorCommon.Handler; - const commandsData = this._getEditOperations(ctx, commands); - if (commandsData.operations.length === 0) { - return; - } + this._handlers[H.LineInsertBefore] = (args) => this._lineInsertBefore(args); + this._handlers[H.LineInsertAfter] = (args) => this._lineInsertAfter(args); + this._handlers[H.LineBreakInsert] = (args) => this._lineBreakInsert(args); - const rawOperations = commandsData.operations; + this._handlers[H.Type] = (args) => this._type(args); + this._handlers[H.ReplacePreviousChar] = (args) => this._replacePreviousChar(args); + this._handlers[H.CompositionStart] = (args) => this._compositionStart(args); + this._handlers[H.CompositionEnd] = (args) => this._compositionEnd(args); + this._handlers[H.Tab] = (args) => this._tab(args); + this._handlers[H.Indent] = (args) => this._indent(args); + this._handlers[H.Outdent] = (args) => this._outdent(args); + this._handlers[H.Paste] = (args) => this._paste(args); - const editableRange = this._model.getEditableRange(); - const editableRangeStart = editableRange.getStartPosition(); - const editableRangeEnd = editableRange.getEndPosition(); - for (let i = 0, len = rawOperations.length; i < len; i++) { - const operationRange = rawOperations[i].range; - if (!editableRangeStart.isBeforeOrEqual(operationRange.getStartPosition()) || !operationRange.getEndPosition().isBeforeOrEqual(editableRangeEnd)) { - // These commands are outside of the editable range - return; - } - } - - const loserCursorsMap = this._getLoserCursorMap(rawOperations); - if (loserCursorsMap.hasOwnProperty('0')) { - // These commands are very messed up - console.warn('Ignoring commands'); - return; - } - - // Remove operations belonging to losing cursors - let filteredOperations: editorCommon.IIdentifiedSingleEditOperation[] = []; - for (let i = 0, len = rawOperations.length; i < len; i++) { - if (!loserCursorsMap.hasOwnProperty(rawOperations[i].identifier.major.toString())) { - filteredOperations.push(rawOperations[i]); - } - } - - // TODO@Alex: find a better way to do this. - // give the hint that edit operations are tracked to the model - if (commandsData.hadTrackedEditOperation && filteredOperations.length > 0) { - filteredOperations[0]._isTracked = true; - } - const selectionsAfter = this._model.pushEditOperations(selectionsBefore, filteredOperations, (inverseEditOperations: editorCommon.IIdentifiedSingleEditOperation[]): Selection[] => { - let groupedInverseEditOperations: editorCommon.IIdentifiedSingleEditOperation[][] = []; - for (let i = 0; i < selectionsBefore.length; i++) { - groupedInverseEditOperations[i] = []; - } - for (let i = 0; i < inverseEditOperations.length; i++) { - const op = inverseEditOperations[i]; - if (!op.identifier) { - // perhaps auto whitespace trim edits - continue; - } - groupedInverseEditOperations[op.identifier.major].push(op); - } - const minorBasedSorter = (a: editorCommon.IIdentifiedSingleEditOperation, b: editorCommon.IIdentifiedSingleEditOperation) => { - return a.identifier.minor - b.identifier.minor; - }; - let cursorSelections: Selection[] = []; - for (let i = 0; i < selectionsBefore.length; i++) { - if (groupedInverseEditOperations[i].length > 0) { - groupedInverseEditOperations[i].sort(minorBasedSorter); - cursorSelections[i] = commands[i].computeCursorState(this._model, { - getInverseEditOperations: () => { - return groupedInverseEditOperations[i]; - }, - - getTrackedSelection: (id: string) => { - const idx = parseInt(id, 10); - const selectionStartMarker = this._model._getMarker(ctx.selectionStartMarkers[idx]); - const positionMarker = this._model._getMarker(ctx.positionMarkers[idx]); - return new Selection(selectionStartMarker.lineNumber, selectionStartMarker.column, positionMarker.lineNumber, positionMarker.column); - } - }); - } else { - cursorSelections[i] = selectionsBefore[i]; - } - } - return cursorSelections; - }); - - // Extract losing cursors - let losingCursors: number[] = []; - for (let losingCursorIndex in loserCursorsMap) { - if (loserCursorsMap.hasOwnProperty(losingCursorIndex)) { - losingCursors.push(parseInt(losingCursorIndex, 10)); - } - } - - // Sort losing cursors descending - losingCursors.sort((a: number, b: number): number => { - return b - a; - }); - - // Remove losing cursors - for (let i = 0; i < losingCursors.length; i++) { - selectionsAfter.splice(losingCursors[i], 1); - } - - this._interpretCommandResult(selectionsAfter); - } - - - // ----------------------------------------------------------------------------------------------------------- - // ----- emitting events - - private emitCursorPositionChanged(source: string, reason: CursorChangeReason): void { - const positions = this._cursors.getPositions(); - const primaryPosition = positions[0]; - const secondaryPositions = positions.slice(1); - - const viewPositions = this._cursors.getViewPositions(); - const primaryViewPosition = viewPositions[0]; - const secondaryViewPositions = viewPositions.slice(1); - - let isInEditableRange: boolean = true; - if (this._model.hasEditableRange()) { - const editableRange = this._model.getEditableRange(); - if (!editableRange.containsPosition(primaryPosition)) { - isInEditableRange = false; - } - } - const e: ICursorPositionChangedEvent = { - position: primaryPosition, - viewPosition: primaryViewPosition, - secondaryPositions: secondaryPositions, - secondaryViewPositions: secondaryViewPositions, - reason: reason, - source: source, - isInEditableRange: isInEditableRange - }; - this._eventEmitter.emit(CursorEventType.CursorPositionChanged, e); - } - - private emitCursorSelectionChanged(source: string, reason: CursorChangeReason): void { - const selections = this._cursors.getSelections(); - const primarySelection = selections[0]; - const secondarySelections = selections.slice(1); - - const viewSelections = this._cursors.getViewSelections(); - const primaryViewSelection = viewSelections[0]; - const secondaryViewSelections = viewSelections.slice(1); - - const e: ICursorSelectionChangedEvent = { - selection: primarySelection, - viewSelection: primaryViewSelection, - secondarySelections: secondarySelections, - secondaryViewSelections: secondaryViewSelections, - source: source || 'keyboard', - reason: reason - }; - this._eventEmitter.emit(CursorEventType.CursorSelectionChanged, e); - } - - private _revealRange(revealTarget: RevealTarget, verticalType: VerticalRevealType, revealHorizontal: boolean): void { - const positions = this._cursors.getPositions(); - const viewPositions = this._cursors.getViewPositions(); - - let position = positions[0]; - let viewPosition = viewPositions[0]; - - if (revealTarget === RevealTarget.TopMost) { - for (let i = 1; i < positions.length; i++) { - if (positions[i].isBefore(position)) { - position = positions[i]; - viewPosition = viewPositions[i]; - } - } - } else if (revealTarget === RevealTarget.BottomMost) { - for (let i = 1; i < positions.length; i++) { - if (position.isBeforeOrEqual(positions[i])) { - position = positions[i]; - viewPosition = viewPositions[i]; - } - } - } else { - if (positions.length > 1) { - // no revealing! - return; - } - } - - const range = new Range(position.lineNumber, position.column, position.lineNumber, position.column); - const viewRange = new Range(viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column); - this.emitCursorRevealRange(range, viewRange, verticalType, revealHorizontal); - } - - public emitCursorRevealRange(range: Range, viewRange: Range, verticalType: VerticalRevealType, revealHorizontal: boolean) { - const e: ICursorRevealRangeEvent = { - range: range, - viewRange: viewRange, - verticalType: verticalType, - revealHorizontal: revealHorizontal - }; - this._eventEmitter.emit(CursorEventType.CursorRevealRange, e); - } - - // ----------------------------------------------------------------------------------------------------------- - // ----- handlers beyond this point - - public trigger(source: string, handlerId: string, payload: any): void { - if (!this._handlers.hasOwnProperty(handlerId)) { - const command = CommonEditorRegistry.getEditorCommand(handlerId); - if (!command || !(command instanceof CoreEditorCommand)) { - return; - } - - payload = payload || {}; - payload.source = source; - command.runCoreEditorCommand(this, payload); - return; - } - const handler = this._handlers[handlerId]; - const args = new CursorOperationArgs(source, payload); - this._onHandler(handlerId, handler, args); - } - - private _registerHandlers(): void { - let H = editorCommon.Handler; - - this._handlers[H.LineInsertBefore] = (args) => this._lineInsertBefore(args); - this._handlers[H.LineInsertAfter] = (args) => this._lineInsertAfter(args); - this._handlers[H.LineBreakInsert] = (args) => this._lineBreakInsert(args); - - this._handlers[H.Type] = (args) => this._type(args); - this._handlers[H.ReplacePreviousChar] = (args) => this._replacePreviousChar(args); - this._handlers[H.CompositionStart] = (args) => this._compositionStart(args); - this._handlers[H.CompositionEnd] = (args) => this._compositionEnd(args); - this._handlers[H.Tab] = (args) => this._tab(args); - this._handlers[H.Indent] = (args) => this._indent(args); - this._handlers[H.Outdent] = (args) => this._outdent(args); - this._handlers[H.Paste] = (args) => this._paste(args); - - this._handlers[H.DeleteLeft] = (args) => this._deleteLeft(args); - this._handlers[H.DeleteRight] = (args) => this._deleteRight(args); + this._handlers[H.DeleteLeft] = (args) => this._deleteLeft(args); + this._handlers[H.DeleteRight] = (args) => this._deleteRight(args); this._handlers[H.Cut] = (args) => this._cut(args); @@ -1027,3 +743,298 @@ export class Cursor extends Disposable implements ICursors { }); } } + +interface IExecContext { + readonly model: editorCommon.IModel; + readonly selectionsBefore: Selection[]; + readonly selectionStartMarkers: string[]; + readonly positionMarkers: string[]; +} + +class CommandExecutor { + + public static executeCommands(model: editorCommon.IModel, selectionsBefore: Selection[], commands: editorCommon.ICommand[]): Selection[] { + + const ctx: IExecContext = { + model: model, + selectionsBefore: selectionsBefore, + selectionStartMarkers: [], + positionMarkers: [] + }; + + const result = this._innerExecuteCommands(ctx, commands); + + for (let i = 0; i < ctx.selectionStartMarkers.length; i++) { + ctx.model._removeMarker(ctx.selectionStartMarkers[i]); + ctx.model._removeMarker(ctx.positionMarkers[i]); + } + + return result; + } + + private static _innerExecuteCommands(ctx: IExecContext, commands: editorCommon.ICommand[]): Selection[] { + + if (this._arrayIsEmpty(commands)) { + return null; + } + + const commandsData = this._getEditOperations(ctx, commands); + if (commandsData.operations.length === 0) { + return null; + } + + const rawOperations = commandsData.operations; + + const editableRange = ctx.model.getEditableRange(); + const editableRangeStart = editableRange.getStartPosition(); + const editableRangeEnd = editableRange.getEndPosition(); + for (let i = 0, len = rawOperations.length; i < len; i++) { + const operationRange = rawOperations[i].range; + if (!editableRangeStart.isBeforeOrEqual(operationRange.getStartPosition()) || !operationRange.getEndPosition().isBeforeOrEqual(editableRangeEnd)) { + // These commands are outside of the editable range + return null; + } + } + + const loserCursorsMap = this._getLoserCursorMap(rawOperations); + if (loserCursorsMap.hasOwnProperty('0')) { + // These commands are very messed up + console.warn('Ignoring commands'); + return null; + } + + // Remove operations belonging to losing cursors + let filteredOperations: editorCommon.IIdentifiedSingleEditOperation[] = []; + for (let i = 0, len = rawOperations.length; i < len; i++) { + if (!loserCursorsMap.hasOwnProperty(rawOperations[i].identifier.major.toString())) { + filteredOperations.push(rawOperations[i]); + } + } + + // TODO@Alex: find a better way to do this. + // give the hint that edit operations are tracked to the model + if (commandsData.hadTrackedEditOperation && filteredOperations.length > 0) { + filteredOperations[0]._isTracked = true; + } + const selectionsAfter = ctx.model.pushEditOperations(ctx.selectionsBefore, filteredOperations, (inverseEditOperations: editorCommon.IIdentifiedSingleEditOperation[]): Selection[] => { + let groupedInverseEditOperations: editorCommon.IIdentifiedSingleEditOperation[][] = []; + for (let i = 0; i < ctx.selectionsBefore.length; i++) { + groupedInverseEditOperations[i] = []; + } + for (let i = 0; i < inverseEditOperations.length; i++) { + const op = inverseEditOperations[i]; + if (!op.identifier) { + // perhaps auto whitespace trim edits + continue; + } + groupedInverseEditOperations[op.identifier.major].push(op); + } + const minorBasedSorter = (a: editorCommon.IIdentifiedSingleEditOperation, b: editorCommon.IIdentifiedSingleEditOperation) => { + return a.identifier.minor - b.identifier.minor; + }; + let cursorSelections: Selection[] = []; + for (let i = 0; i < ctx.selectionsBefore.length; i++) { + if (groupedInverseEditOperations[i].length > 0) { + groupedInverseEditOperations[i].sort(minorBasedSorter); + cursorSelections[i] = commands[i].computeCursorState(ctx.model, { + getInverseEditOperations: () => { + return groupedInverseEditOperations[i]; + }, + + getTrackedSelection: (id: string) => { + const idx = parseInt(id, 10); + const selectionStartMarker = ctx.model._getMarker(ctx.selectionStartMarkers[idx]); + const positionMarker = ctx.model._getMarker(ctx.positionMarkers[idx]); + return new Selection(selectionStartMarker.lineNumber, selectionStartMarker.column, positionMarker.lineNumber, positionMarker.column); + } + }); + } else { + cursorSelections[i] = ctx.selectionsBefore[i]; + } + } + return cursorSelections; + }); + + // Extract losing cursors + let losingCursors: number[] = []; + for (let losingCursorIndex in loserCursorsMap) { + if (loserCursorsMap.hasOwnProperty(losingCursorIndex)) { + losingCursors.push(parseInt(losingCursorIndex, 10)); + } + } + + // Sort losing cursors descending + losingCursors.sort((a: number, b: number): number => { + return b - a; + }); + + // Remove losing cursors + for (let i = 0; i < losingCursors.length; i++) { + selectionsAfter.splice(losingCursors[i], 1); + } + + return selectionsAfter; + } + + private static _arrayIsEmpty(commands: editorCommon.ICommand[]): boolean { + for (let i = 0, len = commands.length; i < len; i++) { + if (commands[i]) { + return false; + } + } + return true; + } + + private static _getEditOperations(ctx: IExecContext, commands: editorCommon.ICommand[]): ICommandsData { + let operations: editorCommon.IIdentifiedSingleEditOperation[] = []; + let hadTrackedEditOperation: boolean = false; + + for (let i = 0, len = commands.length; i < len; i++) { + if (commands[i]) { + const r = this._getEditOperationsFromCommand(ctx, i, commands[i]); + operations = operations.concat(r.operations); + hadTrackedEditOperation = hadTrackedEditOperation || r.hadTrackedEditOperation; + } + } + return { + operations: operations, + hadTrackedEditOperation: hadTrackedEditOperation + }; + } + + private static _getEditOperationsFromCommand(ctx: IExecContext, majorIdentifier: number, command: editorCommon.ICommand): ICommandData { + // This method acts as a transaction, if the command fails + // everything it has done is ignored + let operations: editorCommon.IIdentifiedSingleEditOperation[] = []; + let operationMinor = 0; + + const addEditOperation = (selection: Range, text: string) => { + if (selection.isEmpty() && text === '') { + // This command wants to add a no-op => no thank you + return; + } + operations.push({ + identifier: { + major: majorIdentifier, + minor: operationMinor++ + }, + range: selection, + text: text, + forceMoveMarkers: false, + isAutoWhitespaceEdit: command.insertsAutoWhitespace + }); + }; + + let hadTrackedEditOperation = false; + const addTrackedEditOperation = (selection: Range, text: string) => { + hadTrackedEditOperation = true; + addEditOperation(selection, text); + }; + + const trackSelection = (selection: Selection, trackPreviousOnEmpty?: boolean) => { + let selectionMarkerStickToPreviousCharacter: boolean; + let positionMarkerStickToPreviousCharacter: boolean; + + if (selection.isEmpty()) { + // Try to lock it with surrounding text + if (typeof trackPreviousOnEmpty === 'boolean') { + selectionMarkerStickToPreviousCharacter = trackPreviousOnEmpty; + positionMarkerStickToPreviousCharacter = trackPreviousOnEmpty; + } else { + const maxLineColumn = ctx.model.getLineMaxColumn(selection.startLineNumber); + if (selection.startColumn === maxLineColumn) { + selectionMarkerStickToPreviousCharacter = true; + positionMarkerStickToPreviousCharacter = true; + } else { + selectionMarkerStickToPreviousCharacter = false; + positionMarkerStickToPreviousCharacter = false; + } + } + } else { + if (selection.getDirection() === SelectionDirection.LTR) { + selectionMarkerStickToPreviousCharacter = false; + positionMarkerStickToPreviousCharacter = true; + } else { + selectionMarkerStickToPreviousCharacter = true; + positionMarkerStickToPreviousCharacter = false; + } + } + + const l = ctx.selectionStartMarkers.length; + ctx.selectionStartMarkers[l] = ctx.model._addMarker(0, selection.selectionStartLineNumber, selection.selectionStartColumn, selectionMarkerStickToPreviousCharacter); + ctx.positionMarkers[l] = ctx.model._addMarker(0, selection.positionLineNumber, selection.positionColumn, positionMarkerStickToPreviousCharacter); + return l.toString(); + }; + + const editOperationBuilder: editorCommon.IEditOperationBuilder = { + addEditOperation: addEditOperation, + addTrackedEditOperation: addTrackedEditOperation, + trackSelection: trackSelection + }; + + try { + command.getEditOperations(ctx.model, editOperationBuilder); + } catch (e) { + e.friendlyMessage = nls.localize('corrupt.commands', "Unexpected exception while executing command."); + onUnexpectedError(e); + return { + operations: [], + hadTrackedEditOperation: false + }; + } + + return { + operations: operations, + hadTrackedEditOperation: hadTrackedEditOperation + }; + } + + private static _getLoserCursorMap(operations: editorCommon.IIdentifiedSingleEditOperation[]): { [index: string]: boolean; } { + // This is destructive on the array + operations = operations.slice(0); + + // Sort operations with last one first + operations.sort((a: editorCommon.IIdentifiedSingleEditOperation, b: editorCommon.IIdentifiedSingleEditOperation): number => { + // Note the minus! + return -(Range.compareRangesUsingEnds(a.range, b.range)); + }); + + // Operations can not overlap! + let loserCursorsMap: { [index: string]: boolean; } = {}; + + for (let i = 1; i < operations.length; i++) { + const previousOp = operations[i - 1]; + const currentOp = operations[i]; + + if (previousOp.range.getStartPosition().isBefore(currentOp.range.getEndPosition())) { + + let loserMajor: number; + + if (previousOp.identifier.major > currentOp.identifier.major) { + // previousOp loses the battle + loserMajor = previousOp.identifier.major; + } else { + loserMajor = currentOp.identifier.major; + } + + loserCursorsMap[loserMajor.toString()] = true; + + for (let j = 0; j < operations.length; j++) { + if (operations[j].identifier.major === loserMajor) { + operations.splice(j, 1); + if (j < i) { + i--; + } + j--; + } + } + + if (i > 0) { + i--; + } + } + } + + return loserCursorsMap; + } +} From 12738e3e0df09d79f5011a51a65cfc22af4fb74e Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 18 May 2017 21:09:38 +0200 Subject: [PATCH 0734/2747] Clarify editor API --- src/vs/editor/common/commonCodeEditor.ts | 17 ++-- src/vs/editor/common/controller/cursor.ts | 83 +++++++------------ .../editor/common/controller/cursorCommon.ts | 9 +- src/vs/editor/common/editorCommon.ts | 2 + src/vs/editor/common/model/textModelEvents.ts | 10 +++ .../caretOperations/common/caretOperations.ts | 2 + .../caretOperations/common/transpose.ts | 2 + .../editor/contrib/comment/common/comment.ts | 4 + src/vs/editor/contrib/dnd/browser/dnd.ts | 2 + .../editor/contrib/find/common/findModel.ts | 2 + .../contrib/format/common/formatCommand.ts | 2 + .../inPlaceReplace/common/inPlaceReplace.ts | 3 + .../contrib/indentation/common/indentation.ts | 8 ++ .../linesOperations/common/linesOperations.ts | 14 ++++ .../wordOperations/common/wordOperations.ts | 2 + src/vs/monaco.d.ts | 2 + 16 files changed, 99 insertions(+), 65 deletions(-) diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index d698e6a2f0ce8..2fef9136e64c9 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -698,16 +698,8 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo return this.cursor; } - public executeCommand(source: string, command: editorCommon.ICommand): void { - if (!this.cursor) { - return; - } - this.cursor.trigger(source, editorCommon.Handler.ExecuteCommand, command); - } - public pushUndoStop(): boolean { - if (!this.cursor) { - // no view, no cursor + if (!this.model) { return false; } if (this._configuration.editor.readOnly) { @@ -739,6 +731,13 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo return true; } + public executeCommand(source: string, command: editorCommon.ICommand): void { + if (!this.cursor) { + return; + } + this.cursor.trigger(source, editorCommon.Handler.ExecuteCommand, command); + } + public executeCommands(source: string, commands: editorCommon.ICommand[]): void { if (!this.cursor) { return; diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 3c35af418f368..aec7779027468 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -59,10 +59,9 @@ export class Cursor extends Disposable implements ICursors { private readonly _configuration: editorCommon.IConfiguration; private readonly _model: editorCommon.IModel; private readonly _viewModelHelper: IViewModelHelper; - public context: CursorContext; - private _cursors: CursorCollection; + private _isHandling: boolean; private _isDoingComposition: boolean; private _columnSelectData: IColumnSelectData; @@ -77,31 +76,16 @@ export class Cursor extends Disposable implements ICursors { this._configuration = configuration; this._model = model; this._viewModelHelper = viewModelHelper; - - const createCursorContext = () => { - const config = new CursorConfiguration( - this._model.getLanguageIdentifier(), - this._model.getOneIndent(), - this._model.getOptions(), - this._configuration - ); - this.context = new CursorContext( - this._model, - this._viewModelHelper, - config - ); - if (this._cursors) { - this._cursors.updateContext(this.context); - } - }; - createCursorContext(); - + this.context = new CursorContext(this._configuration, this._model, this._viewModelHelper); this._cursors = new CursorCollection(this.context); this._isHandling = false; this._isDoingComposition = false; this._columnSelectData = null; + this._handlers = {}; + this._registerHandlers(); + this._register(this._model.addBulkListener((events) => { if (this._isHandling) { return; @@ -115,14 +99,8 @@ export class Cursor extends Disposable implements ICursors { if (eventType === TextModelEventType.ModelRawContentChanged2) { hadContentChange = true; - const changeEvent = event.data; - - for (let j = 0, lenJ = changeEvent.changes.length; j < lenJ; j++) { - const change = changeEvent.changes[j]; - if (change.changeType === RawContentChangedType.Flush) { - hadFlushEvent = true; - } - } + const rawChangeEvent = event.data; + hadFlushEvent = hadFlushEvent || rawChangeEvent.containsEvent(RawContentChangedType.Flush); } } @@ -133,29 +111,29 @@ export class Cursor extends Disposable implements ICursors { this._onModelContentChanged(hadFlushEvent); })); + const updateCursorContext = () => { + this.context = new CursorContext(this._configuration, this._model, this._viewModelHelper); + this._cursors.updateContext(this.context); + }; this._register(this._model.onDidChangeLanguage((e) => { - createCursorContext(); + updateCursorContext(); })); this._register(LanguageConfigurationRegistry.onDidChange(() => { // TODO@Alex: react only if certain supports changed? (and if my model's mode changed) - createCursorContext(); + updateCursorContext(); })); this._register(model.onDidChangeOptions(() => { - createCursorContext(); + updateCursorContext(); })); this._register(this._configuration.onDidChange((e) => { if (CursorConfiguration.shouldRecreate(e)) { - createCursorContext(); + updateCursorContext(); } })); - - this._handlers = {}; - this._registerHandlers(); } public dispose(): void { this._cursors.dispose(); - this._cursors = null; super.dispose(); } @@ -203,8 +181,8 @@ export class Cursor extends Disposable implements ICursors { } if (somethingChanged) { - this.emitCursorPositionChanged(source, reason); - this.emitCursorSelectionChanged(source, reason); + this._emitCursorPositionChanged(source, reason); + this._emitCursorSelectionChanged(source, reason); } } @@ -295,16 +273,13 @@ export class Cursor extends Disposable implements ICursors { if (hadFlushEvent) { // a model.setValue() was called this._cursors.dispose(); - this._cursors = new CursorCollection(this.context); - this.emitCursorPositionChanged('model', CursorChangeReason.ContentFlush); - this.emitCursorSelectionChanged('model', CursorChangeReason.ContentFlush); + this._emitCursorPositionChanged('model', CursorChangeReason.ContentFlush); + this._emitCursorSelectionChanged('model', CursorChangeReason.ContentFlush); } else { - if (!this._isHandling) { - const selectionsFromMarkers = this._cursors.readSelectionFromMarkers(); - this.setStates('modelChange', CursorChangeReason.RecoverFromMarkers, CursorState.fromModelSelections(selectionsFromMarkers)); - } + const selectionsFromMarkers = this._cursors.readSelectionFromMarkers(); + this.setStates('modelChange', CursorChangeReason.RecoverFromMarkers, CursorState.fromModelSelections(selectionsFromMarkers)); } } @@ -392,9 +367,9 @@ export class Cursor extends Disposable implements ICursors { } if (somethingChanged) { - this.emitCursorPositionChanged(args.eventSource, cursorPositionChangeReason); + this._emitCursorPositionChanged(args.eventSource, cursorPositionChangeReason); this._revealRange(RevealTarget.Primary, VerticalRevealType.Simple, true); - this.emitCursorSelectionChanged(args.eventSource, cursorPositionChangeReason); + this._emitCursorSelectionChanged(args.eventSource, cursorPositionChangeReason); } } catch (err) { @@ -415,7 +390,7 @@ export class Cursor extends Disposable implements ICursors { // ----------------------------------------------------------------------------------------------------------- // ----- emitting events - private emitCursorPositionChanged(source: string, reason: CursorChangeReason): void { + private _emitCursorPositionChanged(source: string, reason: CursorChangeReason): void { const positions = this._cursors.getPositions(); const primaryPosition = positions[0]; const secondaryPositions = positions.slice(1); @@ -443,7 +418,7 @@ export class Cursor extends Disposable implements ICursors { this._eventEmitter.emit(CursorEventType.CursorPositionChanged, e); } - private emitCursorSelectionChanged(source: string, reason: CursorChangeReason): void { + private _emitCursorSelectionChanged(source: string, reason: CursorChangeReason): void { const selections = this._cursors.getSelections(); const primarySelection = selections[0]; const secondarySelections = selections.slice(1); @@ -729,8 +704,8 @@ export class Cursor extends Disposable implements ICursors { this._cursors.killSecondaryCursors(); return new EditOperationResult([command], { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: true + shouldPushStackElementBefore: false, + shouldPushStackElementAfter: false }); } @@ -738,8 +713,8 @@ export class Cursor extends Disposable implements ICursors { const commands = args.eventData; return new EditOperationResult(commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: true + shouldPushStackElementBefore: false, + shouldPushStackElementAfter: false }); } } diff --git a/src/vs/editor/common/controller/cursorCommon.ts b/src/vs/editor/common/controller/cursorCommon.ts index 8c37d25a58113..8684392bd95dc 100644 --- a/src/vs/editor/common/controller/cursorCommon.ts +++ b/src/vs/editor/common/controller/cursorCommon.ts @@ -284,10 +284,15 @@ export class CursorContext { private readonly _viewModelHelper: IViewModelHelper; private readonly _coordinatesConverter: ICoordinatesConverter; - constructor(model: IModel, viewModelHelper: IViewModelHelper, config: CursorConfiguration) { + constructor(configuration: IConfiguration, model: IModel, viewModelHelper: IViewModelHelper) { this.model = model; this.viewModel = viewModelHelper.viewModel; - this.config = config; + this.config = new CursorConfiguration( + this.model.getLanguageIdentifier(), + this.model.getOneIndent(), + this.model.getOptions(), + configuration + );; this._viewModelHelper = viewModelHelper; this._coordinatesConverter = viewModelHelper.coordinatesConverter; } diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index b5c1bba3a0a3e..268c48f5d1188 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -1886,6 +1886,7 @@ export interface ICommonCodeEditor extends IEditor { /** * Execute a command on the editor. + * The edits will land on the undo-redo stack, but no "undo stop" will be pushed. * @param source The source of the call. * @param command The command to execute */ @@ -1898,6 +1899,7 @@ export interface ICommonCodeEditor extends IEditor { /** * Execute edits on the editor. + * The edits will land on the undo-redo stack, but no "undo stop" will be pushed. * @param source The source of the call. * @param edits The edits to execute. * @param endCursoState Cursor state after the edits were applied. diff --git a/src/vs/editor/common/model/textModelEvents.ts b/src/vs/editor/common/model/textModelEvents.ts index 53103be6e27dd..890dd25df46c5 100644 --- a/src/vs/editor/common/model/textModelEvents.ts +++ b/src/vs/editor/common/model/textModelEvents.ts @@ -243,4 +243,14 @@ export class ModelRawContentChangedEvent { this.isUndoing = isUndoing; this.isRedoing = isRedoing; } + + public containsEvent(type: RawContentChangedType): boolean { + for (let i = 0, len = this.changes.length; i < len; i++) { + const change = this.changes[i]; + if (change.changeType === type) { + return true; + } + } + return false; + } } diff --git a/src/vs/editor/contrib/caretOperations/common/caretOperations.ts b/src/vs/editor/contrib/caretOperations/common/caretOperations.ts index aec00037cb5c0..96e935bd69d78 100644 --- a/src/vs/editor/contrib/caretOperations/common/caretOperations.ts +++ b/src/vs/editor/contrib/caretOperations/common/caretOperations.ts @@ -29,7 +29,9 @@ class MoveCaretAction extends EditorAction { commands.push(new MoveCaretCommand(selections[i], this.left)); } + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } } diff --git a/src/vs/editor/contrib/caretOperations/common/transpose.ts b/src/vs/editor/contrib/caretOperations/common/transpose.ts index fbb8780585655..5ca66ce287d6a 100644 --- a/src/vs/editor/contrib/caretOperations/common/transpose.ts +++ b/src/vs/editor/contrib/caretOperations/common/transpose.ts @@ -63,7 +63,9 @@ class TransposeLettersAction extends EditorAction { } if (commands.length > 0) { + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } } } diff --git a/src/vs/editor/contrib/comment/common/comment.ts b/src/vs/editor/contrib/comment/common/comment.ts index 570d96b7cbb2e..898e1aa89d0b9 100644 --- a/src/vs/editor/contrib/comment/common/comment.ts +++ b/src/vs/editor/contrib/comment/common/comment.ts @@ -35,7 +35,9 @@ abstract class CommentLineAction extends EditorAction { commands.push(new LineCommentCommand(selections[i], opts.tabSize, this._type)); } + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } } @@ -113,6 +115,8 @@ class BlockCommentAction extends EditorAction { commands.push(new BlockCommentCommand(selections[i])); } + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } } diff --git a/src/vs/editor/contrib/dnd/browser/dnd.ts b/src/vs/editor/contrib/dnd/browser/dnd.ts index cca6986ce3304..49a944af722d9 100644 --- a/src/vs/editor/contrib/dnd/browser/dnd.ts +++ b/src/vs/editor/contrib/dnd/browser/dnd.ts @@ -146,7 +146,9 @@ export class DragAndDropController implements editorCommon.IEditorContribution { this._dragSelection.getEndPosition().equals(newCursorPosition) || this._dragSelection.getStartPosition().equals(newCursorPosition) ) // we allow users to paste content beside the selection )) { + this._editor.pushUndoStop(); this._editor.executeCommand(DragAndDropController.ID, new DragAndDropCommand(this._dragSelection, newCursorPosition, mouseEvent.event[DragAndDropController.TRIGGER_MODIFIER] || this._modiferPressed)); + this._editor.pushUndoStop(); } } diff --git a/src/vs/editor/contrib/find/common/findModel.ts b/src/vs/editor/contrib/find/common/findModel.ts index faa2f4ff92419..02ccc8f4ea5dc 100644 --- a/src/vs/editor/contrib/find/common/findModel.ts +++ b/src/vs/editor/contrib/find/common/findModel.ts @@ -468,7 +468,9 @@ export class FindModelBoundToEditorModel { private _executeEditorCommand(source: string, command: editorCommon.ICommand): void { try { this._ignoreModelContentChanged = true; + this._editor.pushUndoStop(); this._editor.executeCommand(source, command); + this._editor.pushUndoStop(); } finally { this._ignoreModelContentChanged = false; } diff --git a/src/vs/editor/contrib/format/common/formatCommand.ts b/src/vs/editor/contrib/format/common/formatCommand.ts index dcf612c8d33d1..8a77bff13e328 100644 --- a/src/vs/editor/contrib/format/common/formatCommand.ts +++ b/src/vs/editor/contrib/format/common/formatCommand.ts @@ -17,7 +17,9 @@ export class EditOperationsCommand implements editorCommon.ICommand { if (typeof cmd._newEol === 'number') { editor.getModel().setEOL(cmd._newEol); } + editor.pushUndoStop(); editor.executeCommand('formatEditsCommand', cmd); + editor.pushUndoStop(); } private _edits: TextEdit[]; diff --git a/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts b/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts index 8f8548bbc00bf..773b69e156e64 100644 --- a/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts +++ b/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts @@ -112,7 +112,10 @@ class InPlaceReplaceController implements IEditorContribution { // Insert new text var command = new InPlaceReplaceCommand(editRange, selection, result.value); + + this.editor.pushUndoStop(); this.editor.executeCommand(source, command); + this.editor.pushUndoStop(); // add decoration this.decorationIds = this.editor.deltaDecorations(this.decorationIds, [{ diff --git a/src/vs/editor/contrib/indentation/common/indentation.ts b/src/vs/editor/contrib/indentation/common/indentation.ts index 44d1a1bdac36f..7fb494c770d07 100644 --- a/src/vs/editor/contrib/indentation/common/indentation.ts +++ b/src/vs/editor/contrib/indentation/common/indentation.ts @@ -164,7 +164,11 @@ export class IndentationToSpacesAction extends EditorAction { } let modelOpts = model.getOptions(); const command = new IndentationToSpacesCommand(editor.getSelection(), modelOpts.tabSize); + + editor.pushUndoStop(); editor.executeCommands(this.id, [command]); + editor.pushUndoStop(); + model.updateOptions({ insertSpaces: true }); @@ -191,7 +195,11 @@ export class IndentationToTabsAction extends EditorAction { } let modelOpts = model.getOptions(); const command = new IndentationToTabsCommand(editor.getSelection(), modelOpts.tabSize); + + editor.pushUndoStop(); editor.executeCommands(this.id, [command]); + editor.pushUndoStop(); + model.updateOptions({ insertSpaces: false }); diff --git a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts index 54255479f3055..59acf7fcd2379 100644 --- a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts +++ b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts @@ -39,7 +39,9 @@ abstract class AbstractCopyLinesAction extends EditorAction { commands.push(new CopyLinesCommand(selections[i], this.down)); } + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } } @@ -97,7 +99,9 @@ abstract class AbstractMoveLinesAction extends EditorAction { commands.push(new MoveLinesCommand(selections[i], this.down)); } + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } } @@ -151,7 +155,9 @@ abstract class AbstractSortLinesAction extends EditorAction { var command = new SortLinesCommand(editor.getSelection(), this.descending); + editor.pushUndoStop(); editor.executeCommands(this.id, [command]); + editor.pushUndoStop(); } } @@ -201,7 +207,9 @@ export class TrimTrailingWhitespaceAction extends EditorAction { var command = new TrimTrailingWhitespaceCommand(editor.getSelection()); + editor.pushUndoStop(); editor.executeCommands(this.id, [command]); + editor.pushUndoStop(); } } @@ -280,7 +288,9 @@ class DeleteLinesAction extends AbstractRemoveLinesAction { return new DeleteLinesCommand(op.startLineNumber, op.endLineNumber, op.positionColumn); }); + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } } @@ -694,7 +704,9 @@ export class TransposeAction extends EditorAction { } } + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } } @@ -725,7 +737,9 @@ export abstract class AbstractCaseAction extends EditorAction { } } + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } protected abstract _modifyText(text: string): string; diff --git a/src/vs/editor/contrib/wordOperations/common/wordOperations.ts b/src/vs/editor/contrib/wordOperations/common/wordOperations.ts index 0b1d96ee992fa..b4b6a410f9d19 100644 --- a/src/vs/editor/contrib/wordOperations/common/wordOperations.ts +++ b/src/vs/editor/contrib/wordOperations/common/wordOperations.ts @@ -275,7 +275,9 @@ export abstract class DeleteWordCommand extends EditorCommand { return new ReplaceCommand(deleteRange, ''); }); + editor.pushUndoStop(); editor.executeCommands(this.id, commands); + editor.pushUndoStop(); } protected abstract _delete(wordSeparators: WordCharacterClassifier, model: IModel, selection: Selection, whitespaceHeuristics: boolean, wordNavigationType: WordNavigationType): Range; diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 140e5d7e7ae12..334b54b64b1d3 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2294,6 +2294,7 @@ declare module monaco.editor { getAction(id: string): IEditorAction; /** * Execute a command on the editor. + * The edits will land on the undo-redo stack, but no "undo stop" will be pushed. * @param source The source of the call. * @param command The command to execute */ @@ -2304,6 +2305,7 @@ declare module monaco.editor { pushUndoStop(): boolean; /** * Execute edits on the editor. + * The edits will land on the undo-redo stack, but no "undo stop" will be pushed. * @param source The source of the call. * @param edits The edits to execute. * @param endCursoState Cursor state after the edits were applied. From 5a40238c40874c2ab3711e0cf5bbb2d71574b015 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 18 May 2017 21:46:23 +0200 Subject: [PATCH 0735/2747] Move LineInsertBefore out of the cursor --- src/vs/editor/browser/editor.all.ts | 1 + src/vs/editor/common/commonCodeEditor.ts | 6 ++- .../editor/common/controller/coreCommands.ts | 5 +- src/vs/editor/common/controller/cursor.ts | 5 -- .../common/controller/cursorTypeOperations.ts | 9 ++-- src/vs/editor/common/core/selection.ts | 9 +++- src/vs/editor/common/editorCommon.ts | 8 +++- .../linesOperations/common/linesOperations.ts | 9 +++- .../test/common/linesOperations.test.ts | 47 ++++++++++++++++++- .../test/common/controller/cursor.test.ts | 42 ----------------- src/vs/monaco.d.ts | 4 ++ 11 files changed, 83 insertions(+), 62 deletions(-) diff --git a/src/vs/editor/browser/editor.all.ts b/src/vs/editor/browser/editor.all.ts index 19ead3cbcafe7..cd56e43c2fab5 100644 --- a/src/vs/editor/browser/editor.all.ts +++ b/src/vs/editor/browser/editor.all.ts @@ -5,6 +5,7 @@ 'use strict'; +import 'vs/editor/common/controller/coreCommands'; import 'vs/editor/browser/widget/codeEditorWidget'; import 'vs/editor/browser/widget/diffEditorWidget'; diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index 2fef9136e64c9..3c8ecce71b18f 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -13,7 +13,7 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle import { IContextKey, IContextKeyServiceTarget, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { CommonEditorConfiguration } from 'vs/editor/common/config/commonEditorConfig'; import { Cursor } from 'vs/editor/common/controller/cursor'; -import { CursorColumns, IViewModelHelper, ICursors } from 'vs/editor/common/controller/cursorCommon'; +import { CursorColumns, IViewModelHelper, ICursors, CursorConfiguration } from 'vs/editor/common/controller/cursorCommon'; import { Position, IPosition } from 'vs/editor/common/core/position'; import { Range, IRange } from 'vs/editor/common/core/range'; import { Selection, ISelection } from 'vs/editor/common/core/selection'; @@ -698,6 +698,10 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo return this.cursor; } + public _getCursorConfiguration(): CursorConfiguration { + return this.cursor.context.config; + } + public pushUndoStop(): boolean { if (!this.model) { return false; diff --git a/src/vs/editor/common/controller/coreCommands.ts b/src/vs/editor/common/controller/coreCommands.ts index 6ad405c37a1f5..ae8a6e85e1ace 100644 --- a/src/vs/editor/common/controller/coreCommands.ts +++ b/src/vs/editor/common/controller/coreCommands.ts @@ -1395,7 +1395,10 @@ export namespace CoreNavigationCommands { ); } }); -}; +} + +export namespace CoreEditingCommands { +} namespace Config { diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index aec7779027468..42b712abd335a 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -504,7 +504,6 @@ export class Cursor extends Disposable implements ICursors { private _registerHandlers(): void { let H = editorCommon.Handler; - this._handlers[H.LineInsertBefore] = (args) => this._lineInsertBefore(args); this._handlers[H.LineInsertAfter] = (args) => this._lineInsertAfter(args); this._handlers[H.LineBreakInsert] = (args) => this._lineBreakInsert(args); @@ -559,10 +558,6 @@ export class Cursor extends Disposable implements ICursors { return r; } - private _lineInsertBefore(args: CursorOperationArgs): EditOperationResult { - return TypeOperations.lineInsertBefore(this.context.config, this.context.model, this._getAllCursorsModelState()); - } - private _lineInsertAfter(args: CursorOperationArgs): EditOperationResult { return TypeOperations.lineInsertAfter(this.context.config, this.context.model, this._getAllCursorsModelState()); } diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index b231d46d1e4b7..7d9346cf06d67 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -582,11 +582,11 @@ export class TypeOperations { }); } - public static lineInsertBefore(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[]): EditOperationResult { + public static lineInsertBefore(config: CursorConfiguration, model: ITokenizedModel, cursors: Selection[]): ICommand[] { let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; - let lineNumber = cursor.position.lineNumber; + let lineNumber = cursor.positionLineNumber; if (lineNumber === 1) { commands[i] = new ReplaceCommandWithoutChangingPosition(new Range(1, 1, 1, 1), '\n'); @@ -597,10 +597,7 @@ export class TypeOperations { commands[i] = this._enter(config, model, false, new Range(lineNumber, column, lineNumber, column)); } } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: false, - }); + return commands; } public static lineInsertAfter(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[]): EditOperationResult { diff --git a/src/vs/editor/common/core/selection.ts b/src/vs/editor/common/core/selection.ts index 21f2066d982ed..10705ad4fe8d8 100644 --- a/src/vs/editor/common/core/selection.ts +++ b/src/vs/editor/common/core/selection.ts @@ -5,7 +5,7 @@ 'use strict'; import { Range } from 'vs/editor/common/core/range'; -import { IPosition } from 'vs/editor/common/core/position'; +import { Position, IPosition } from 'vs/editor/common/core/position'; /** * A selection in the editor. @@ -129,6 +129,13 @@ export class Selection extends Range { return new Selection(endLineNumber, endColumn, this.startLineNumber, this.startColumn); } + /** + * Get the position at `positionLineNumber` and `positionColumn`. + */ + public getPosition(): Position { + return new Position(this.positionLineNumber, this.positionColumn); + } + /** * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`. */ diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index 268c48f5d1188..bca8965eafba9 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -23,7 +23,7 @@ import { } from 'vs/editor/common/model/textModelEvents'; import * as editorOptions from 'vs/editor/common/config/editorOptions'; import { ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { ICursors } from 'vs/editor/common/controller/cursorCommon'; +import { ICursors, CursorConfiguration } from 'vs/editor/common/controller/cursorCommon'; /** * Vertical Lane in the overview ruler of the editor. @@ -1918,6 +1918,11 @@ export interface ICommonCodeEditor extends IEditor { */ _getCursors(): ICursors; + /** + * @internal + */ + _getCursorConfiguration(): CursorConfiguration; + /** * Get all the decorations on a line (filtering out decorations from other editors). */ @@ -2078,7 +2083,6 @@ export var Handler = { Undo: 'undo', Redo: 'redo', - LineInsertBefore: 'lineInsertBefore', LineInsertAfter: 'lineInsertAfter', LineBreakInsert: 'lineBreakInsert', }; diff --git a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts index 59acf7fcd2379..0cb23b5039308 100644 --- a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts +++ b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts @@ -18,6 +18,7 @@ import { editorAction, ServicesAccessor, IActionOptions, EditorAction, HandlerEd import { CopyLinesCommand } from './copyLinesCommand'; import { DeleteLinesCommand } from './deleteLinesCommand'; import { MoveLinesCommand } from './moveLinesCommand'; +import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; // copy lines @@ -329,20 +330,24 @@ class OutdentLinesAction extends HandlerEditorAction { } @editorAction -class InsertLineBeforeAction extends HandlerEditorAction { +export class InsertLineBeforeAction extends EditorAction { constructor() { super({ id: 'editor.action.insertLineBefore', label: nls.localize('lines.insertBefore', "Insert Line Above"), alias: 'Insert Line Above', precondition: EditorContextKeys.writable, - handlerId: Handler.LineInsertBefore, kbOpts: { kbExpr: EditorContextKeys.textFocus, primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Enter } }); } + + public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void { + editor.pushUndoStop(); + editor.executeCommands(this.id, TypeOperations.lineInsertBefore(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections())); + } } @editorAction diff --git a/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts b/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts index 0239d6ee087a6..f32dd7ee82280 100644 --- a/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts +++ b/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts @@ -6,9 +6,11 @@ import * as assert from 'assert'; import { Selection } from 'vs/editor/common/core/selection'; -import { Handler } from 'vs/editor/common/editorCommon'; +import { Position } from 'vs/editor/common/core/position'; +import { Handler, IModel } from 'vs/editor/common/editorCommon'; import { withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; -import { DeleteAllLeftAction, JoinLinesAction, TransposeAction, UpperCaseAction, LowerCaseAction, DeleteAllRightAction } from 'vs/editor/contrib/linesOperations/common/linesOperations'; +import { DeleteAllLeftAction, JoinLinesAction, TransposeAction, UpperCaseAction, LowerCaseAction, DeleteAllRightAction, InsertLineBeforeAction } from 'vs/editor/contrib/linesOperations/common/linesOperations'; +import { Cursor } from "vs/editor/common/controller/cursor"; suite('Editor Contrib - Line Operations', () => { suite('DeleteAllLeftAction', () => { @@ -488,4 +490,45 @@ suite('Editor Contrib - Line Operations', () => { }); }); }); + + test('InsertLineBeforeAction', function () { + function testInsertLineBefore(lineNumber: number, column: number, callback: (model: IModel, cursor: Cursor) => void): void { + const TEXT = [ + 'First line', + 'Second line', + 'Third line' + ]; + withMockCodeEditor(TEXT, {}, (editor, cursor) => { + editor.setPosition(new Position(lineNumber, column)); + let insertLineBeforeAction = new InsertLineBeforeAction(); + + insertLineBeforeAction.run(null, editor); + callback(editor.getModel(), cursor); + }); + } + + testInsertLineBefore(1, 3, (model, cursor) => { + assert.deepEqual(cursor.getSelection(), new Selection(1, 1, 1, 1)); + assert.equal(model.getLineContent(1), ''); + assert.equal(model.getLineContent(2), 'First line'); + assert.equal(model.getLineContent(3), 'Second line'); + assert.equal(model.getLineContent(4), 'Third line'); + }); + + testInsertLineBefore(2, 3, (model, cursor) => { + assert.deepEqual(cursor.getSelection(), new Selection(2, 1, 2, 1)); + assert.equal(model.getLineContent(1), 'First line'); + assert.equal(model.getLineContent(2), ''); + assert.equal(model.getLineContent(3), 'Second line'); + assert.equal(model.getLineContent(4), 'Third line'); + }); + + testInsertLineBefore(3, 3, (model, cursor) => { + assert.deepEqual(cursor.getSelection(), new Selection(3, 1, 3, 1)); + assert.equal(model.getLineContent(1), 'First line'); + assert.equal(model.getLineContent(2), 'Second line'); + assert.equal(model.getLineContent(3), ''); + assert.equal(model.getLineContent(4), 'Third line'); + }); + }); }); \ No newline at end of file diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index 134f327f9bf02..8a505460120c2 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -1930,48 +1930,6 @@ suite('Editor Controller - Cursor Configuration', () => { mode.dispose(); }); - test('Insert line before', () => { - let testInsertLineBefore = (lineNumber: number, column: number, callback: (model: Model, cursor: Cursor) => void) => { - usingCursor({ - text: [ - 'First line', - 'Second line', - 'Third line' - ], - }, (model, cursor) => { - moveTo(cursor, lineNumber, column, false); - assertCursor(cursor, new Position(lineNumber, column)); - - cursorCommand(cursor, H.LineInsertBefore, null, 'keyboard'); - callback(model, cursor); - }); - }; - - testInsertLineBefore(1, 3, (model, cursor) => { - assertCursor(cursor, new Selection(1, 1, 1, 1)); - assert.equal(model.getLineContent(1), ''); - assert.equal(model.getLineContent(2), 'First line'); - assert.equal(model.getLineContent(3), 'Second line'); - assert.equal(model.getLineContent(4), 'Third line'); - }); - - testInsertLineBefore(2, 3, (model, cursor) => { - assertCursor(cursor, new Selection(2, 1, 2, 1)); - assert.equal(model.getLineContent(1), 'First line'); - assert.equal(model.getLineContent(2), ''); - assert.equal(model.getLineContent(3), 'Second line'); - assert.equal(model.getLineContent(4), 'Third line'); - }); - - testInsertLineBefore(3, 3, (model, cursor) => { - assertCursor(cursor, new Selection(3, 1, 3, 1)); - assert.equal(model.getLineContent(1), 'First line'); - assert.equal(model.getLineContent(2), 'Second line'); - assert.equal(model.getLineContent(3), ''); - assert.equal(model.getLineContent(4), 'Third line'); - }); - }); - test('Insert line after', () => { let testInsertLineAfter = (lineNumber: number, column: number, callback: (model: Model, cursor: Cursor) => void) => { usingCursor({ diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 334b54b64b1d3..e12595a783f86 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -724,6 +724,10 @@ declare module monaco { * Create a new selection with a different `positionLineNumber` and `positionColumn`. */ setEndPosition(endLineNumber: number, endColumn: number): Selection; + /** + * Get the position at `positionLineNumber` and `positionColumn`. + */ + getPosition(): Position; /** * Create a new selection with a different `selectionStartLineNumber` and `selectionStartColumn`. */ From cc38e4eabb6e0cdaf33e8ba56b84ca50902a8099 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 00:19:54 +0200 Subject: [PATCH 0736/2747] Move more editing operations out of cursor.ts --- src/vs/editor/common/commonCodeEditor.ts | 28 +- .../editor/common/controller/coreCommands.ts | 194 ++++--- src/vs/editor/common/controller/cursor.ts | 38 +- .../controller/cursorDeleteOperations.ts | 39 +- .../common/controller/cursorTypeOperations.ts | 50 +- src/vs/editor/common/editorCommon.ts | 10 - .../editor/common/editorCommonExtensions.ts | 16 - .../linesOperations/common/linesOperations.ts | 29 +- .../test/common/linesOperations.test.ts | 79 ++- .../test/common/controller/cursor.test.ts | 508 ++++++++++-------- .../debugEditorContribution.ts | 5 +- .../actions/expandAbbreviation.ts | 5 +- .../emmet/electron-browser/editorAccessor.ts | 5 +- 13 files changed, 552 insertions(+), 454 deletions(-) diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index 3c8ecce71b18f..1f652adcaf21f 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -29,6 +29,7 @@ import * as editorOptions from 'vs/editor/common/config/editorOptions'; import { CursorEventType, ICursorPositionChangedEvent, VerticalRevealType, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { ViewModelCursors } from "vs/editor/common/viewModel/viewModelCursors"; +import { CommonEditorRegistry } from "vs/editor/common/editorCommonExtensions"; let EDITOR_ID = 0; @@ -667,6 +668,7 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo return; } + // Special case for pasting if (handlerId === editorCommon.Handler.Paste) { if (!this.cursor || typeof payload.text !== 'string' || payload.text.length === 0) { // nothing to do @@ -683,15 +685,25 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo return; } - let candidate = this.getAction(handlerId); - if (candidate !== null) { - TPromise.as(candidate.run()).done(null, onUnexpectedError); - } else { - if (!this.cursor) { - return; - } - this.cursor.trigger(source, handlerId, payload); + const action = this.getAction(handlerId); + if (action) { + TPromise.as(action.run()).done(null, onUnexpectedError); + return; } + + if (!this.cursor) { + return; + } + + const command = CommonEditorRegistry.getEditorCommand(handlerId); + if (command) { + payload = payload || {}; + payload.source = source; + TPromise.as(command.runEditorCommand(null, this, payload)).done(null, onUnexpectedError); + return; + } + + this.cursor.trigger(source, handlerId, payload); } public _getCursors(): ICursors { diff --git a/src/vs/editor/common/controller/coreCommands.ts b/src/vs/editor/common/controller/coreCommands.ts index ae8a6e85e1ace..3ca21fe60b758 100644 --- a/src/vs/editor/common/controller/coreCommands.ts +++ b/src/vs/editor/common/controller/coreCommands.ts @@ -24,6 +24,8 @@ import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import * as types from 'vs/base/common/types'; import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; import { IEditorService } from 'vs/platform/editor/common/editor'; +import { TypeOperations } from "vs/editor/common/controller/cursorTypeOperations"; +import { DeleteOperations } from "vs/editor/common/controller/cursorDeleteOperations"; const CORE_WEIGHT = KeybindingsRegistry.WEIGHT.editorCore(); @@ -1398,6 +1400,120 @@ export namespace CoreNavigationCommands { } export namespace CoreEditingCommands { + + export const LineBreakInsert: EditorCommand = registerEditorCommand(new class extends EditorCommand { + constructor() { + super({ + id: 'lineBreakInsert', + precondition: EditorContextKeys.writable, + kbOpts: { + weight: CORE_WEIGHT, + kbExpr: EditorContextKeys.textFocus, + primary: null, + mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_O } + } + }); + } + + public runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void { + editor.pushUndoStop(); + editor.executeCommands(this.id, TypeOperations.lineBreakInsert(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections())); + } + }); + + export const Outdent: EditorCommand = registerEditorCommand(new class extends EditorCommand { + constructor() { + super({ + id: 'outdent', + precondition: EditorContextKeys.writable, + kbOpts: { + weight: CORE_WEIGHT, + kbExpr: ContextKeyExpr.and( + EditorContextKeys.textFocus, + EditorContextKeys.tabDoesNotMoveFocus + ), + primary: KeyMod.Shift | KeyCode.Tab + } + }); + } + + public runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void { + editor.pushUndoStop(); + editor.executeCommands(this.id, TypeOperations.outdent(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections())); + editor.pushUndoStop(); + } + }); + + export const Tab: EditorCommand = registerEditorCommand(new class extends EditorCommand { + constructor() { + super({ + id: 'tab', + precondition: EditorContextKeys.writable, + kbOpts: { + weight: CORE_WEIGHT, + kbExpr: ContextKeyExpr.and( + EditorContextKeys.textFocus, + EditorContextKeys.tabDoesNotMoveFocus + ), + primary: KeyCode.Tab + } + }); + } + + public runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void { + editor.pushUndoStop(); + editor.executeCommands(this.id, TypeOperations.tab(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections())); + editor.pushUndoStop(); + } + }); + + export const DeleteLeft: EditorCommand = registerEditorCommand(new class extends EditorCommand { + constructor() { + super({ + id: 'deleteLeft', + precondition: EditorContextKeys.writable, + kbOpts: { + weight: CORE_WEIGHT, + kbExpr: EditorContextKeys.textFocus, + primary: KeyCode.Backspace, + secondary: [KeyMod.Shift | KeyCode.Backspace], + mac: { primary: KeyCode.Backspace, secondary: [KeyMod.Shift | KeyCode.Backspace, KeyMod.WinCtrl | KeyCode.KEY_H, KeyMod.WinCtrl | KeyCode.Backspace] } + } + }); + } + + public runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void { + const [shouldPushStackElementBefore, commands] = DeleteOperations.deleteLeft(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections()); + if (shouldPushStackElementBefore) { + editor.pushUndoStop(); + } + editor.executeCommands(this.id, commands); + } + }); + + export const DeleteRight: EditorCommand = registerEditorCommand(new class extends EditorCommand { + constructor() { + super({ + id: 'deleteRight', + precondition: EditorContextKeys.writable, + kbOpts: { + weight: CORE_WEIGHT, + kbExpr: EditorContextKeys.textFocus, + primary: KeyCode.Delete, + mac: { primary: KeyCode.Delete, secondary: [KeyMod.WinCtrl | KeyCode.KEY_D, KeyMod.WinCtrl | KeyCode.Delete] } + } + }); + } + + public runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void { + const [shouldPushStackElementBefore, commands] = DeleteOperations.deleteRight(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections()); + if (shouldPushStackElementBefore) { + editor.pushUndoStop(); + } + editor.executeCommands(this.id, commands); + } + }); + } namespace Config { @@ -1412,88 +1528,10 @@ namespace Config { return getCodeEditor(activeEditor); } - function withCodeEditorFromCommandHandler(accessor: ServicesAccessor, callback: (editor: editorCommon.ICommonCodeEditor) => void): void { - let editor = findFocusedEditor(accessor); - if (editor) { - callback(editor); - } - } - - function triggerEditorHandler(handlerId: string, accessor: ServicesAccessor, args: any): void { - withCodeEditorFromCommandHandler(accessor, (editor) => { - editor.trigger('keyboard', handlerId, args); - }); - } - - class CoreCommand extends Command { - public runCommand(accessor: ServicesAccessor, args: any): void { - triggerEditorHandler(this.id, accessor, args); - } - } - function registerCommand(command: Command) { KeybindingsRegistry.registerCommandAndKeybindingRule(command.toCommandAndKeybindingRule(CORE_WEIGHT)); } - registerCommand(new CoreCommand({ - id: H.Tab, - precondition: EditorContextKeys.writable, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: ContextKeyExpr.and( - EditorContextKeys.textFocus, - EditorContextKeys.tabDoesNotMoveFocus - ), - primary: KeyCode.Tab - } - })); - registerCommand(new CoreCommand({ - id: H.Outdent, - precondition: EditorContextKeys.writable, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: ContextKeyExpr.and( - EditorContextKeys.textFocus, - EditorContextKeys.tabDoesNotMoveFocus - ), - primary: KeyMod.Shift | KeyCode.Tab - } - })); - - registerCommand(new CoreCommand({ - id: H.DeleteLeft, - precondition: EditorContextKeys.writable, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: EditorContextKeys.textFocus, - primary: KeyCode.Backspace, - secondary: [KeyMod.Shift | KeyCode.Backspace], - mac: { primary: KeyCode.Backspace, secondary: [KeyMod.Shift | KeyCode.Backspace, KeyMod.WinCtrl | KeyCode.KEY_H, KeyMod.WinCtrl | KeyCode.Backspace] } - } - })); - registerCommand(new CoreCommand({ - id: H.DeleteRight, - precondition: EditorContextKeys.writable, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: EditorContextKeys.textFocus, - primary: KeyCode.Delete, - mac: { primary: KeyCode.Delete, secondary: [KeyMod.WinCtrl | KeyCode.KEY_D, KeyMod.WinCtrl | KeyCode.Delete] } - } - })); - - registerCommand(new CoreCommand({ - id: H.LineBreakInsert, - precondition: EditorContextKeys.writable, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: EditorContextKeys.textFocus, - primary: null, - mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_O } - } - })); - - class BaseTextInputAwareCommand extends Command { private readonly _editorHandler: string | EditorCommand; diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 42b712abd335a..5c05fddaa8466 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -504,21 +504,12 @@ export class Cursor extends Disposable implements ICursors { private _registerHandlers(): void { let H = editorCommon.Handler; - this._handlers[H.LineInsertAfter] = (args) => this._lineInsertAfter(args); - this._handlers[H.LineBreakInsert] = (args) => this._lineBreakInsert(args); - this._handlers[H.Type] = (args) => this._type(args); this._handlers[H.ReplacePreviousChar] = (args) => this._replacePreviousChar(args); this._handlers[H.CompositionStart] = (args) => this._compositionStart(args); this._handlers[H.CompositionEnd] = (args) => this._compositionEnd(args); - this._handlers[H.Tab] = (args) => this._tab(args); - this._handlers[H.Indent] = (args) => this._indent(args); - this._handlers[H.Outdent] = (args) => this._outdent(args); this._handlers[H.Paste] = (args) => this._paste(args); - this._handlers[H.DeleteLeft] = (args) => this._deleteLeft(args); - this._handlers[H.DeleteRight] = (args) => this._deleteRight(args); - this._handlers[H.Cut] = (args) => this._cut(args); this._handlers[H.Undo] = (args) => this._undo(args); @@ -542,6 +533,7 @@ export class Cursor extends Disposable implements ICursors { // -------------------- START editing operations + // TODO@Alex: remove private _getAllCursorsModelState(sorted: boolean = false): SingleCursorState[] { let cursors = this._cursors.getAll(); @@ -558,14 +550,6 @@ export class Cursor extends Disposable implements ICursors { return r; } - private _lineInsertAfter(args: CursorOperationArgs): EditOperationResult { - return TypeOperations.lineInsertAfter(this.context.config, this.context.model, this._getAllCursorsModelState()); - } - - private _lineBreakInsert(args: CursorOperationArgs): EditOperationResult { - return TypeOperations.lineBreakInsert(this.context.config, this.context.model, this._getAllCursorsModelState()); - } - private _type(args: CursorOperationArgs<{ text: string; }>): EditOperationResult { const text = args.eventData.text; @@ -613,18 +597,6 @@ export class Cursor extends Disposable implements ICursors { return null; } - private _tab(args: CursorOperationArgs): EditOperationResult { - return TypeOperations.tab(this.context.config, this.context.model, this._getAllCursorsModelState()); - } - - private _indent(args: CursorOperationArgs): EditOperationResult { - return TypeOperations.indent(this.context.config, this.context.model, this._getAllCursorsModelState()); - } - - private _outdent(args: CursorOperationArgs): EditOperationResult { - return TypeOperations.outdent(this.context.config, this.context.model, this._getAllCursorsModelState()); - } - private _distributePasteToCursors(args: CursorOperationArgs<{ pasteOnNewLine: boolean; text: string; }>): string[] { if (args.eventData.pasteOnNewLine) { return null; @@ -659,14 +631,6 @@ export class Cursor extends Disposable implements ICursors { } } - private _deleteLeft(args: CursorOperationArgs): EditOperationResult { - return DeleteOperations.deleteLeft(this.context.config, this.context.model, this._getAllCursorsModelState()); - } - - private _deleteRight(args: CursorOperationArgs): EditOperationResult { - return DeleteOperations.deleteRight(this.context.config, this.context.model, this._getAllCursorsModelState()); - } - private _cut(args: CursorOperationArgs): EditOperationResult { return DeleteOperations.cut(this.context.config, this.context.model, this._getAllCursorsModelState()); } diff --git a/src/vs/editor/common/controller/cursorDeleteOperations.ts b/src/vs/editor/common/controller/cursorDeleteOperations.ts index 68b006b107ec3..b6552f40e5d2e 100644 --- a/src/vs/editor/common/controller/cursorDeleteOperations.ts +++ b/src/vs/editor/common/controller/cursorDeleteOperations.ts @@ -7,22 +7,23 @@ import { ReplaceCommand } from 'vs/editor/common/commands/replaceCommand'; import { SingleCursorState, CursorColumns, CursorConfiguration, ICursorSimpleModel, EditOperationResult } from 'vs/editor/common/controller/cursorCommon'; import { Range } from 'vs/editor/common/core/range'; +import { Selection } from 'vs/editor/common/core/selection'; import { MoveOperations } from 'vs/editor/common/controller/cursorMoveOperations'; import * as strings from 'vs/base/common/strings'; import { ICommand } from "vs/editor/common/editorCommon"; export class DeleteOperations { - public static deleteRight(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { + public static deleteRight(config: CursorConfiguration, model: ICursorSimpleModel, cursors: Selection[]): [boolean, ICommand[]] { let commands: ICommand[] = []; let shouldPushStackElementBefore = false; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; - let deleteSelection: Range = cursor.selection; + let deleteSelection: Range = cursor; if (deleteSelection.isEmpty()) { - let position = cursor.position; + let position = cursor.getPosition(); let rightOfPosition = MoveOperations.right(config, model, position.lineNumber, position.column); deleteSelection = new Range( rightOfPosition.lineNumber, @@ -44,21 +45,17 @@ export class DeleteOperations { commands[i] = new ReplaceCommand(deleteSelection, ''); } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: shouldPushStackElementBefore, - shouldPushStackElementAfter: false - }); + return [shouldPushStackElementBefore, commands]; } - private static _isAutoClosingPairDelete(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): boolean { + private static _isAutoClosingPairDelete(config: CursorConfiguration, model: ICursorSimpleModel, cursors: Selection[]): boolean { if (!config.autoClosingBrackets) { return false; } for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const selection = cursor.selection; - const position = cursor.position; + const selection = cursors[i]; + const position = selection.getPosition(); if (!selection.isEmpty()) { return false; @@ -82,11 +79,11 @@ export class DeleteOperations { return true; } - private static _runAutoClosingPairDelete(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { + private static _runAutoClosingPairDelete(config: CursorConfiguration, model: ICursorSimpleModel, cursors: Selection[]): [boolean, ICommand[]] { let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; - const position = cursor.position; + const position = cursor.getPosition(); const deleteSelection = new Range( position.lineNumber, position.column - 1, @@ -95,13 +92,10 @@ export class DeleteOperations { ); commands[i] = new ReplaceCommand(deleteSelection, ''); } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: false - }); + return [true, commands]; } - public static deleteLeft(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { + public static deleteLeft(config: CursorConfiguration, model: ICursorSimpleModel, cursors: Selection[]): [boolean, ICommand[]] { if (this._isAutoClosingPairDelete(config, model, cursors)) { return this._runAutoClosingPairDelete(config, model, cursors); @@ -112,10 +106,10 @@ export class DeleteOperations { for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; - let deleteSelection: Range = cursor.selection; + let deleteSelection: Range = cursor; if (deleteSelection.isEmpty()) { - let position = cursor.position; + let position = cursor.getPosition(); if (config.useTabStops && position.column > 1) { let lineContent = model.getLineContent(position.lineNumber); @@ -158,10 +152,7 @@ export class DeleteOperations { commands[i] = new ReplaceCommand(deleteSelection, ''); } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: shouldPushStackElementBefore, - shouldPushStackElementAfter: false - }); + return [shouldPushStackElementBefore, commands]; } public static cut(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index 7d9346cf06d67..4b8237f13eb10 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -21,38 +21,32 @@ import { CursorChangeReason } from "vs/editor/common/controller/cursorEvents"; export class TypeOperations { - public static indent(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { + public static indent(config: CursorConfiguration, model: ICursorSimpleModel, cursors: Selection[]): ICommand[] { let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; - commands[i] = new ShiftCommand(cursor.selection, { + commands[i] = new ShiftCommand(cursor, { isUnshift: false, tabSize: config.tabSize, oneIndent: config.oneIndent, useTabStops: config.useTabStops }); } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: true - }); + return commands; } - public static outdent(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { + public static outdent(config: CursorConfiguration, model: ICursorSimpleModel, cursors: Selection[]): ICommand[] { let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; - commands[i] = new ShiftCommand(cursor.selection, { + commands[i] = new ShiftCommand(cursor, { isUnshift: true, tabSize: config.tabSize, oneIndent: config.oneIndent, useTabStops: config.useTabStops }); } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: true - }); + return commands; } public static shiftIndent(config: CursorConfiguration, indentation: string, count?: number): string { @@ -172,11 +166,10 @@ export class TypeOperations { return new ReplaceCommand(selection, typeText, insertsAutoWhitespace); } - public static tab(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[]): EditOperationResult { + public static tab(config: CursorConfiguration, model: ITokenizedModel, cursors: Selection[]): ICommand[] { let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - let selection = cursor.selection; + const selection = cursors[i]; if (selection.isEmpty()) { @@ -211,10 +204,7 @@ export class TypeOperations { }); } } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: true - }); + return commands; } public static replacePreviousChar(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], txt: string, replaceCharCnt: number): EditOperationResult { @@ -600,29 +590,23 @@ export class TypeOperations { return commands; } - public static lineInsertAfter(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[]): EditOperationResult { + public static lineInsertAfter(config: CursorConfiguration, model: ITokenizedModel, cursors: Selection[]): ICommand[] { let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; - let position = cursor.position; - let column = model.getLineMaxColumn(position.lineNumber); - commands[i] = this._enter(config, model, false, new Range(position.lineNumber, column, position.lineNumber, column)); + let lineNumber = cursor.positionLineNumber; + let column = model.getLineMaxColumn(lineNumber); + commands[i] = this._enter(config, model, false, new Range(lineNumber, column, lineNumber, column)); } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: false, - }); + return commands; } - public static lineBreakInsert(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[]): EditOperationResult { + public static lineBreakInsert(config: CursorConfiguration, model: ITokenizedModel, cursors: Selection[]): ICommand[] { let commands: ICommand[] = []; for (let i = 0, len = cursors.length; i < len; i++) { const cursor = cursors[i]; - commands[i] = this._enter(config, model, true, cursor.selection); + commands[i] = this._enter(config, model, true, cursor); } - return new EditOperationResult(commands, { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: false, - }); + return commands; } } diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index bca8965eafba9..bec905e6cf2ff 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -2071,18 +2071,8 @@ export var Handler = { CompositionEnd: 'compositionEnd', Paste: 'paste', - Tab: 'tab', - Indent: 'indent', - Outdent: 'outdent', - - DeleteLeft: 'deleteLeft', - DeleteRight: 'deleteRight', - Cut: 'cut', Undo: 'undo', Redo: 'redo', - - LineInsertAfter: 'lineInsertAfter', - LineBreakInsert: 'lineBreakInsert', }; diff --git a/src/vs/editor/common/editorCommonExtensions.ts b/src/vs/editor/common/editorCommonExtensions.ts index cc2cac81cef88..c80f219223d70 100644 --- a/src/vs/editor/common/editorCommonExtensions.ts +++ b/src/vs/editor/common/editorCommonExtensions.ts @@ -74,22 +74,6 @@ export abstract class EditorAction extends ConfigEditorCommand { public abstract run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void | TPromise; } -export interface IHandlerActionOptions extends IActionOptions { - handlerId: string; -} -export abstract class HandlerEditorAction extends EditorAction { - private _handlerId: string; - - constructor(opts: IHandlerActionOptions) { - super(opts); - this._handlerId = opts.handlerId; - } - - public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): void { - editor.trigger(this.id, this._handlerId, null); - } -} - // --- Editor Actions export function editorAction(ctor: { new (): EditorAction; }): void { diff --git a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts index 0cb23b5039308..54143b106bafc 100644 --- a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts +++ b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts @@ -9,16 +9,17 @@ import { KeyCode, KeyMod, KeyChord } from 'vs/base/common/keyCodes'; import { SortLinesCommand } from 'vs/editor/contrib/linesOperations/common/sortLinesCommand'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { TrimTrailingWhitespaceCommand } from 'vs/editor/common/commands/trimTrailingWhitespaceCommand'; -import { Handler, ICommand, ICommonCodeEditor, IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; +import { ICommand, ICommonCodeEditor, IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { ReplaceCommand, ReplaceCommandThatPreservesSelection } from 'vs/editor/common/commands/replaceCommand'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; -import { editorAction, ServicesAccessor, IActionOptions, EditorAction, HandlerEditorAction } from 'vs/editor/common/editorCommonExtensions'; +import { editorAction, ServicesAccessor, IActionOptions, EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { CopyLinesCommand } from './copyLinesCommand'; import { DeleteLinesCommand } from './deleteLinesCommand'; import { MoveLinesCommand } from './moveLinesCommand'; import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; +import { CoreEditingCommands } from "vs/editor/common/controller/coreCommands"; // copy lines @@ -296,37 +297,45 @@ class DeleteLinesAction extends AbstractRemoveLinesAction { } @editorAction -class IndentLinesAction extends HandlerEditorAction { +export class IndentLinesAction extends EditorAction { constructor() { super({ id: 'editor.action.indentLines', label: nls.localize('lines.indent', "Indent Line"), alias: 'Indent Line', precondition: EditorContextKeys.writable, - handlerId: Handler.Indent, kbOpts: { kbExpr: EditorContextKeys.textFocus, primary: KeyMod.CtrlCmd | KeyCode.US_CLOSE_SQUARE_BRACKET } }); } + + public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void { + editor.pushUndoStop(); + editor.executeCommands(this.id, TypeOperations.indent(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections())); + editor.pushUndoStop(); + } } @editorAction -class OutdentLinesAction extends HandlerEditorAction { +class OutdentLinesAction extends EditorAction { constructor() { super({ id: 'editor.action.outdentLines', label: nls.localize('lines.outdent', "Outdent Line"), alias: 'Outdent Line', precondition: EditorContextKeys.writable, - handlerId: Handler.Outdent, kbOpts: { kbExpr: EditorContextKeys.textFocus, primary: KeyMod.CtrlCmd | KeyCode.US_OPEN_SQUARE_BRACKET } }); } + + public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void { + CoreEditingCommands.Outdent.runEditorCommand(null, editor, null); + } } @editorAction @@ -351,20 +360,24 @@ export class InsertLineBeforeAction extends EditorAction { } @editorAction -class InsertLineAfterAction extends HandlerEditorAction { +export class InsertLineAfterAction extends EditorAction { constructor() { super({ id: 'editor.action.insertLineAfter', label: nls.localize('lines.insertAfter', "Insert Line Below"), alias: 'Insert Line Below', precondition: EditorContextKeys.writable, - handlerId: Handler.LineInsertAfter, kbOpts: { kbExpr: EditorContextKeys.textFocus, primary: KeyMod.CtrlCmd | KeyCode.Enter } }); } + + public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void { + editor.pushUndoStop(); + editor.executeCommands(this.id, TypeOperations.lineInsertAfter(editor._getCursorConfiguration(), editor.getModel(), editor.getSelections())); + } } export abstract class AbstractDeleteAllToBoundaryAction extends EditorAction { diff --git a/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts b/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts index f32dd7ee82280..87930f8457f00 100644 --- a/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts +++ b/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts @@ -7,10 +7,12 @@ import * as assert from 'assert'; import { Selection } from 'vs/editor/common/core/selection'; import { Position } from 'vs/editor/common/core/position'; -import { Handler, IModel } from 'vs/editor/common/editorCommon'; +import { Handler, IModel, DefaultEndOfLine } from 'vs/editor/common/editorCommon'; import { withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; -import { DeleteAllLeftAction, JoinLinesAction, TransposeAction, UpperCaseAction, LowerCaseAction, DeleteAllRightAction, InsertLineBeforeAction } from 'vs/editor/contrib/linesOperations/common/linesOperations'; +import { DeleteAllLeftAction, JoinLinesAction, TransposeAction, UpperCaseAction, LowerCaseAction, DeleteAllRightAction, InsertLineBeforeAction, InsertLineAfterAction, IndentLinesAction } from 'vs/editor/contrib/linesOperations/common/linesOperations'; import { Cursor } from "vs/editor/common/controller/cursor"; +import { Model } from "vs/editor/common/model/model"; +import { CoreEditingCommands } from "vs/editor/common/controller/coreCommands"; suite('Editor Contrib - Line Operations', () => { suite('DeleteAllLeftAction', () => { @@ -531,4 +533,75 @@ suite('Editor Contrib - Line Operations', () => { assert.equal(model.getLineContent(4), 'Third line'); }); }); -}); \ No newline at end of file + + test('InsertLineAfterAction', () => { + function testInsertLineAfter(lineNumber: number, column: number, callback: (model: IModel, cursor: Cursor) => void): void { + const TEXT = [ + 'First line', + 'Second line', + 'Third line' + ]; + withMockCodeEditor(TEXT, {}, (editor, cursor) => { + editor.setPosition(new Position(lineNumber, column)); + let insertLineAfterAction = new InsertLineAfterAction(); + + insertLineAfterAction.run(null, editor); + callback(editor.getModel(), cursor); + }); + } + + testInsertLineAfter(1, 3, (model, cursor) => { + assert.deepEqual(cursor.getSelection(), new Selection(2, 1, 2, 1)); + assert.equal(model.getLineContent(1), 'First line'); + assert.equal(model.getLineContent(2), ''); + assert.equal(model.getLineContent(3), 'Second line'); + assert.equal(model.getLineContent(4), 'Third line'); + }); + + testInsertLineAfter(2, 3, (model, cursor) => { + assert.deepEqual(cursor.getSelection(), new Selection(3, 1, 3, 1)); + assert.equal(model.getLineContent(1), 'First line'); + assert.equal(model.getLineContent(2), 'Second line'); + assert.equal(model.getLineContent(3), ''); + assert.equal(model.getLineContent(4), 'Third line'); + }); + + testInsertLineAfter(3, 3, (model, cursor) => { + assert.deepEqual(cursor.getSelection(), new Selection(4, 1, 4, 1)); + assert.equal(model.getLineContent(1), 'First line'); + assert.equal(model.getLineContent(2), 'Second line'); + assert.equal(model.getLineContent(3), 'Third line'); + assert.equal(model.getLineContent(4), ''); + }); + }); + + test('Bug 18276:[editor] Indentation broken when selection is empty', () => { + + let model = Model.createFromString( + [ + 'function baz() {' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: false, + tabSize: 4, + trimAutoWhitespace: true + } + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { + let indentLinesAction = new IndentLinesAction(); + editor.setPosition(new Position(1, 2)); + + indentLinesAction.run(null, editor); + assert.equal(model.getLineContent(1), '\tfunction baz() {'); + assert.deepEqual(editor.getSelection(), new Selection(1, 3, 1, 3)); + + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); + assert.equal(model.getLineContent(1), '\tf\tunction baz() {'); + }); + + model.dispose(); + }); +}); diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index 8a505460120c2..f11a0c6775e55 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -24,7 +24,9 @@ import { LanguageIdentifier } from 'vs/editor/common/modes'; import { viewModelHelper } from 'vs/editor/test/common/editorTestUtils'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { CoreNavigationCommands } from 'vs/editor/common/controller/coreCommands'; +import { CoreNavigationCommands, CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; +import { withMockCodeEditor } from "vs/editor/test/common/mocks/mockCodeEditor"; +import { TextModel } from "vs/editor/common/model/textModel"; let H = Handler; @@ -1119,22 +1121,24 @@ class IndentRulesMode extends MockMode { suite('Editor Controller - Regression tests', () => { test('Bug 9121: Auto indent + undo + redo is funky', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ '' - ], - modelOpts: { + ].join('\n'), + { defaultEOL: DefaultEndOfLine.LF, detectIndentation: false, insertSpaces: false, tabSize: 4, trimAutoWhitespace: false - } - }, (model, cursor) => { + }, + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); assert.equal(model.getValue(EndOfLinePreference.LF), '\n', 'assert1'); - cursorCommand(cursor, H.Tab, {}); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\t', 'assert2'); cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); @@ -1146,16 +1150,16 @@ suite('Editor Controller - Regression tests', () => { CoreNavigationCommands.CursorLeft.runCoreEditorCommand(cursor, {}); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\t\n\tx', 'assert5'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\t\nx', 'assert6'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\tx', 'assert7'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\nx', 'assert8'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), 'x', 'assert9'); cursorCommand(cursor, H.Undo, {}); @@ -1176,219 +1180,234 @@ suite('Editor Controller - Regression tests', () => { cursorCommand(cursor, H.Redo, {}); assert.equal(model.getValue(EndOfLinePreference.LF), 'x', 'assert15'); }); - }); - + model.dispose(); + }); test('bug #16543: Tab should indent to correct indentation spot immediately', () => { let mode = new OnEnterMode(IndentAction.Indent); - usingCursor({ - text: [ + let model = Model.createFromString( + [ 'function baz() {', '\tfunction hello() { // something here', '\t', '', '\t}', '}' - ], - modelOpts: { + ].join('\n'), + { defaultEOL: DefaultEndOfLine.LF, detectIndentation: false, insertSpaces: false, tabSize: 4, trimAutoWhitespace: true }, - languageIdentifier: mode.getLanguageIdentifier(), - }, (model, cursor) => { + mode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 4, 1, false); assertCursor(cursor, new Selection(4, 1, 4, 1)); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(4), '\t\t'); }); + + model.dispose(); mode.dispose(); }); test('bug #2938 (1): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { let mode = new OnEnterMode(IndentAction.Indent); - usingCursor({ - text: [ + let model = Model.createFromString( + [ '\tfunction baz() {', '\t\tfunction hello() { // something here', '\t\t', '\t', '\t\t}', '\t}' - ], - modelOpts: { + ].join('\n'), + { defaultEOL: DefaultEndOfLine.LF, detectIndentation: false, insertSpaces: false, tabSize: 4, trimAutoWhitespace: true }, - languageIdentifier: mode.getLanguageIdentifier(), - }, (model, cursor) => { + mode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 4, 2, false); assertCursor(cursor, new Selection(4, 2, 4, 2)); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(4), '\t\t\t'); }); + + model.dispose(); mode.dispose(); }); test('bug #2938 (2): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { let mode = new OnEnterMode(IndentAction.Indent); - usingCursor({ - text: [ + let model = Model.createFromString( + [ '\tfunction baz() {', '\t\tfunction hello() { // something here', '\t\t', ' ', '\t\t}', '\t}' - ], - modelOpts: { + ].join('\n'), + { defaultEOL: DefaultEndOfLine.LF, detectIndentation: false, insertSpaces: false, tabSize: 4, trimAutoWhitespace: true }, - languageIdentifier: mode.getLanguageIdentifier(), - }, (model, cursor) => { + mode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 4, 1, false); assertCursor(cursor, new Selection(4, 1, 4, 1)); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(4), '\t\t\t'); }); + + model.dispose(); mode.dispose(); }); test('bug #2938 (3): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { let mode = new OnEnterMode(IndentAction.Indent); - usingCursor({ - text: [ + let model = Model.createFromString( + [ '\tfunction baz() {', '\t\tfunction hello() { // something here', '\t\t', '\t\t\t', '\t\t}', '\t}' - ], - modelOpts: { + ].join('\n'), + { defaultEOL: DefaultEndOfLine.LF, detectIndentation: false, insertSpaces: false, tabSize: 4, trimAutoWhitespace: true }, - languageIdentifier: mode.getLanguageIdentifier(), - }, (model, cursor) => { + mode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 4, 3, false); assertCursor(cursor, new Selection(4, 3, 4, 3)); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(4), '\t\t\t\t'); }); + + model.dispose(); mode.dispose(); }); test('bug #2938 (4): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { let mode = new OnEnterMode(IndentAction.Indent); - usingCursor({ - text: [ + let model = Model.createFromString( + [ '\tfunction baz() {', '\t\tfunction hello() { // something here', '\t\t', '\t\t\t\t', '\t\t}', '\t}' - ], - modelOpts: { + ].join('\n'), + { defaultEOL: DefaultEndOfLine.LF, detectIndentation: false, insertSpaces: false, tabSize: 4, trimAutoWhitespace: true }, - languageIdentifier: mode.getLanguageIdentifier(), - }, (model, cursor) => { + mode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 4, 4, false); assertCursor(cursor, new Selection(4, 4, 4, 4)); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(4), '\t\t\t\t\t'); }); + + model.dispose(); mode.dispose(); }); - test('Bug 18276:[editor] Indentation broken when selection is empty', () => { - usingCursor({ - text: [ - 'function baz() {' - ], - modelOpts: { - defaultEOL: DefaultEndOfLine.LF, - detectIndentation: false, - insertSpaces: false, + test('bug #16815:Shift+Tab doesn\'t go back to tabstop', () => { + let mode = new OnEnterMode(IndentAction.IndentOutdent); + let model = Model.createFromString( + [ + ' function baz() {' + ].join('\n'), + { + insertSpaces: true, tabSize: 4, + detectIndentation: false, + defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true }, - }, (model, cursor) => { - moveTo(cursor, 1, 2, false); - assertCursor(cursor, new Selection(1, 2, 1, 2)); + mode.getLanguageIdentifier() + ); - cursorCommand(cursor, H.Indent, null, 'keyboard'); - assert.equal(model.getLineContent(1), '\tfunction baz() {'); - - assertCursor(cursor, new Selection(1, 3, 1, 3)); - cursorCommand(cursor, H.Tab, null, 'keyboard'); - assert.equal(model.getLineContent(1), '\tf\tunction baz() {'); - }); - }); - - test('bug #16815:Shift+Tab doesn\'t go back to tabstop', () => { - let mode = new OnEnterMode(IndentAction.IndentOutdent); - usingCursor({ - text: [ - ' function baz() {' - ], - languageIdentifier: mode.getLanguageIdentifier(), - modelOpts: { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 1, 6, false); assertCursor(cursor, new Selection(1, 6, 1, 6)); - cursorCommand(cursor, H.Outdent, null, 'keyboard'); + CoreEditingCommands.Outdent.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' function baz() {'); assertCursor(cursor, new Selection(1, 5, 1, 5)); }); + + model.dispose(); mode.dispose(); }); test('Bug #18293:[regression][editor] Can\'t outdent whitespace line', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ ' ' - ], - modelOpts: { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { + ].join('\n'), + { + insertSpaces: true, + tabSize: 4, + detectIndentation: false, + defaultEOL: DefaultEndOfLine.LF, + trimAutoWhitespace: true + } + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 1, 7, false); assertCursor(cursor, new Selection(1, 7, 1, 7)); - cursorCommand(cursor, H.Outdent, null, 'keyboard'); + CoreEditingCommands.Outdent.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' '); assertCursor(cursor, new Selection(1, 5, 1, 5)); }); + + model.dispose(); }); test('Bug #16657: [editor] Tab on empty line of zero indentation moves cursor to position (1,1)', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ 'function baz() {', '\tfunction hello() { // something here', '\t', @@ -1396,22 +1415,26 @@ suite('Editor Controller - Regression tests', () => { '\t}', '}', '' - ], - modelOpts: { + ].join('\n'), + { defaultEOL: DefaultEndOfLine.LF, detectIndentation: false, insertSpaces: false, tabSize: 4, trimAutoWhitespace: true }, - }, (model, cursor) => { + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 7, 1, false); assertCursor(cursor, new Selection(7, 1, 7, 1)); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(7), '\t'); assertCursor(cursor, new Selection(7, 2, 7, 2)); }); + + model.dispose(); }); test('bug #16740: [editor] Cut line doesn\'t quite cut the last line', () => { @@ -1480,24 +1503,33 @@ suite('Editor Controller - Regression tests', () => { test('issue #1140: Backspace stops prematurely', () => { let mode = new SurroundingMode(); - usingCursor({ - text: [ + let model = Model.createFromString( + [ 'function baz() {', ' return 1;', '};' - ], - languageIdentifier: mode.getLanguageIdentifier(), - modelOpts: { tabSize: 4, insertSpaces: true, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { + ].join('\n'), + { + tabSize: 4, + insertSpaces: true, + detectIndentation: false, + defaultEOL: DefaultEndOfLine.LF, + trimAutoWhitespace: true + }, + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 3, 2, false); moveTo(cursor, 1, 14, true); assertCursor(cursor, new Selection(3, 2, 1, 14)); - cursorCommand(cursor, H.DeleteLeft); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assertCursor(cursor, new Selection(1, 14, 1, 14)); assert.equal(model.getLineCount(), 1); assert.equal(model.getLineContent(1), 'function baz(;'); }); + + model.dispose(); mode.dispose(); }); @@ -1520,15 +1552,22 @@ suite('Editor Controller - Regression tests', () => { }); test('issue #3071: Investigate why undo stack gets corrupted', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ 'some lines', 'and more lines', 'just some text', - ], - languageIdentifier: null, - modelOpts: { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { + ].join('\n'), + { + insertSpaces: true, + tabSize: 4, + detectIndentation: false, + defaultEOL: DefaultEndOfLine.LF, + trimAutoWhitespace: true + } + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 1, 1, false); moveTo(cursor, 3, 4, true); @@ -1540,7 +1579,7 @@ suite('Editor Controller - Regression tests', () => { } }); - cursorCommand(cursor, H.Tab); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getValue(), [ '\t just some text' ].join('\n'), '001'); @@ -1559,6 +1598,8 @@ suite('Editor Controller - Regression tests', () => { 'just some text', ].join('\n'), '003'); }); + + model.dispose(); }); test('issue #12950: Cannot Double Click To Insert Emoji Using OSX Emoji Panel', () => { @@ -1584,35 +1625,55 @@ suite('Editor Controller - Regression tests', () => { }); test('issue #3463: pressing tab adds spaces, but not as many as for a tab', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ 'function a() {', '\tvar a = {', '\t\tx: 3', '\t};', '}', - ], - modelOpts: { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { + ].join('\n'), + { + insertSpaces: true, + tabSize: 4, + detectIndentation: false, + defaultEOL: DefaultEndOfLine.LF, + trimAutoWhitespace: true + } + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 3, 2, false); - cursorCommand(cursor, H.Tab); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(3), '\t \tx: 3'); }); + + model.dispose(); }); test('issue #4312: trying to type a tab character over a sequence of spaces results in unexpected behaviour', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ 'var foo = 123; // this is a comment', 'var bar = 4; // another comment' - ], - modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { + ].join('\n'), + { + insertSpaces: false, + tabSize: 4, + detectIndentation: false, + defaultEOL: DefaultEndOfLine.LF, + trimAutoWhitespace: true + } + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 1, 15, false); moveTo(cursor, 1, 22, true); - cursorCommand(cursor, H.Tab); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), 'var foo = 123;\t// this is a comment'); }); + + model.dispose(); }); test('issue #832: word right', () => { @@ -1810,70 +1871,80 @@ suite('Editor Controller - Cursor Configuration', () => { }); test('Cursor honors insertSpaces configuration on tab', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ ' \tMy First Line\t ', 'My Second Line123', ' Third Line', '', '1' - ], - modelOpts: { insertSpaces: true, tabSize: 13, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { + ].join('\n'), + { + insertSpaces: true, + tabSize: 13, + detectIndentation: false, + defaultEOL: DefaultEndOfLine.LF, + trimAutoWhitespace: true + } + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { // Tab on column 1 cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 1) }, 'keyboard'); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), ' My Second Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 2 assert.equal(model.getLineContent(2), 'My Second Line123'); cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 2) }, 'keyboard'); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'M y Second Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 3 assert.equal(model.getLineContent(2), 'My Second Line123'); cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 3) }, 'keyboard'); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My Second Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 4 assert.equal(model.getLineContent(2), 'My Second Line123'); cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 4) }, 'keyboard'); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My Second Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 5 assert.equal(model.getLineContent(2), 'My Second Line123'); cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 5) }, 'keyboard'); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My S econd Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 5 assert.equal(model.getLineContent(2), 'My Second Line123'); cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 5) }, 'keyboard'); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My S econd Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 13 assert.equal(model.getLineContent(2), 'My Second Line123'); cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 13) }, 'keyboard'); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My Second Li ne123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 14 assert.equal(model.getLineContent(2), 'My Second Line123'); cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 14) }, 'keyboard'); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My Second Lin e123'); }); + + model.dispose(); }); test('Enter auto-indents with insertSpaces setting 1', () => { @@ -1930,48 +2001,6 @@ suite('Editor Controller - Cursor Configuration', () => { mode.dispose(); }); - test('Insert line after', () => { - let testInsertLineAfter = (lineNumber: number, column: number, callback: (model: Model, cursor: Cursor) => void) => { - usingCursor({ - text: [ - 'First line', - 'Second line', - 'Third line' - ], - }, (model, cursor) => { - moveTo(cursor, lineNumber, column, false); - assertCursor(cursor, new Position(lineNumber, column)); - - cursorCommand(cursor, H.LineInsertAfter, null, 'keyboard'); - callback(model, cursor); - }); - }; - - testInsertLineAfter(1, 3, (model, cursor) => { - assertCursor(cursor, new Selection(2, 1, 2, 1)); - assert.equal(model.getLineContent(1), 'First line'); - assert.equal(model.getLineContent(2), ''); - assert.equal(model.getLineContent(3), 'Second line'); - assert.equal(model.getLineContent(4), 'Third line'); - }); - - testInsertLineAfter(2, 3, (model, cursor) => { - assertCursor(cursor, new Selection(3, 1, 3, 1)); - assert.equal(model.getLineContent(1), 'First line'); - assert.equal(model.getLineContent(2), 'Second line'); - assert.equal(model.getLineContent(3), ''); - assert.equal(model.getLineContent(4), 'Third line'); - }); - - testInsertLineAfter(3, 3, (model, cursor) => { - assertCursor(cursor, new Selection(4, 1, 4, 1)); - assert.equal(model.getLineContent(1), 'First line'); - assert.equal(model.getLineContent(2), 'Second line'); - assert.equal(model.getLineContent(3), 'Third line'); - assert.equal(model.getLineContent(4), ''); - }); - }); - test('removeAutoWhitespace off', () => { usingCursor({ text: [ @@ -2071,25 +2100,27 @@ suite('Editor Controller - Cursor Configuration', () => { }); test('removeAutoWhitespace on: removes only whitespace the cursor added 2', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ ' if (a) {', ' ', '', '', ' }' - ], - modelOpts: { + ].join('\n'), + { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { moveTo(cursor, 3, 1); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' if (a) {'); assert.equal(model.getLineContent(2), ' '); assert.equal(model.getLineContent(3), ' '); @@ -2097,7 +2128,7 @@ suite('Editor Controller - Cursor Configuration', () => { assert.equal(model.getLineContent(5), ' }'); moveTo(cursor, 4, 1); - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' if (a) {'); assert.equal(model.getLineContent(2), ' '); assert.equal(model.getLineContent(3), ''); @@ -2112,21 +2143,25 @@ suite('Editor Controller - Cursor Configuration', () => { assert.equal(model.getLineContent(4), ''); assert.equal(model.getLineContent(5), ' }something'); }); + + model.dispose(); }); test('removeAutoWhitespace on: test 1', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ ' some line abc ' - ], - modelOpts: { + ].join('\n'), + { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { // Move cursor to the end, verify that we do not trim whitespaces if line has values moveTo(cursor, 1, model.getLineContent(1).length + 1); @@ -2141,7 +2176,7 @@ suite('Editor Controller - Cursor Configuration', () => { assert.equal(model.getLineContent(3), ' '); // More whitespaces - cursorCommand(cursor, H.Tab, null, 'keyboard'); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' some line abc '); assert.equal(model.getLineContent(2), ''); assert.equal(model.getLineContent(3), ' '); @@ -2172,63 +2207,65 @@ suite('Editor Controller - Cursor Configuration', () => { assert.equal(model.getLineContent(4), ''); assert.equal(model.getLineContent(5), ''); }); + + model.dispose(); }); test('UseTabStops is off', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ ' x', ' a ', ' ' - ], - modelOpts: { + ].join('\n'), + { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true - }, - editorOpts: { - useTabStops: false } - }, (model, cursor) => { + ); + + withMockCodeEditor(null, { model: model, useTabStops: false }, (editor, cursor) => { // DeleteLeft removes just one whitespace moveTo(cursor, 2, 9); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), ' a '); }); + + model.dispose(); }); test('Backspace removes whitespaces with tab size', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ ' \t \t x', ' a ', ' ' - ], - modelOpts: { + ].join('\n'), + { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true - }, - editorOpts: { - useTabStops: true } - }, (model, cursor) => { + ); + + withMockCodeEditor(null, { model: model, useTabStops: true }, (editor, cursor) => { // DeleteLeft does not remove tab size, because some text exists before moveTo(cursor, 2, model.getLineContent(2).length + 1); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), ' a '); // DeleteLeft removes tab size = 4 moveTo(cursor, 2, 9); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), ' a '); // DeleteLeft removes tab size = 4 - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'a '); // Undo DeleteLeft - get us back to original indentation @@ -2237,57 +2274,61 @@ suite('Editor Controller - Cursor Configuration', () => { // Nothing is broken when cursor is in (1,1) moveTo(cursor, 1, 1); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' \t \t x'); // DeleteLeft stops at tab stops even in mixed whitespace case moveTo(cursor, 1, 10); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' \t \t x'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' \t \tx'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), ' \tx'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(1), 'x'); // DeleteLeft on last line moveTo(cursor, 3, model.getLineContent(3).length + 1); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(3), ''); // DeleteLeft with removing new line symbol - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), 'x\n a '); // In case of selection DeleteLeft only deletes selected text moveTo(cursor, 2, 3); moveTo(cursor, 2, 4, true); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), ' a '); }); + + model.dispose(); }); test('PR #5423: Auto indent + undo + redo is funky', () => { - usingCursor({ - text: [ + let model = Model.createFromString( + [ '' - ], - modelOpts: { + ].join('\n'), + { defaultEOL: DefaultEndOfLine.LF, detectIndentation: false, insertSpaces: false, tabSize: 4, trimAutoWhitespace: true } - }, (model, cursor) => { + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); assert.equal(model.getValue(EndOfLinePreference.LF), '\n', 'assert1'); - cursorCommand(cursor, H.Tab, {}); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\t', 'assert2'); cursorCommand(cursor, H.Type, { text: 'y' }, 'keyboard'); @@ -2302,19 +2343,19 @@ suite('Editor Controller - Cursor Configuration', () => { CoreNavigationCommands.CursorLeft.runCoreEditorCommand(cursor, {}); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\ty\n\tx', 'assert5'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\ty\nx', 'assert6'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\tyx', 'assert7'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\n\tx', 'assert8'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), '\nx', 'assert9'); - cursorCommand(cursor, H.DeleteLeft, {}); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(EndOfLinePreference.LF), 'x', 'assert10'); cursorCommand(cursor, H.Undo, {}); @@ -2335,6 +2376,8 @@ suite('Editor Controller - Cursor Configuration', () => { cursorCommand(cursor, H.Redo, {}); assert.equal(model.getValue(EndOfLinePreference.LF), 'x', 'assert16'); }); + + model.dispose(); }); }); @@ -3247,23 +3290,26 @@ suite('autoClosingPairs', () => { test('All cursors should do the same thing when deleting left', () => { let mode = new AutoClosingMode(); - usingCursor({ - text: [ + let model = Model.createFromString( + [ 'var a = ()' - ], - languageIdentifier: mode.getLanguageIdentifier() - }, (model, cursor) => { + ].join('\n'), + TextModel.DEFAULT_CREATION_OPTIONS, + mode.getLanguageIdentifier() + ); + withMockCodeEditor(null, { model: model }, (editor, cursor) => { cursor.setSelections('test', [ new Selection(1, 4, 1, 4), new Selection(1, 10, 1, 10), ]); // delete left - cursorCommand(cursor, H.DeleteLeft, null, 'keyboard'); + CoreEditingCommands.DeleteLeft.runEditorCommand(null, editor, null); assert.equal(model.getValue(), 'va a = )'); }); + model.dispose(); mode.dispose(); }); }); diff --git a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts index 2b29b662fecc9..f0e0ed7a9bdef 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts @@ -19,7 +19,7 @@ import { StandardTokenType } from 'vs/editor/common/modes'; import { DEFAULT_WORD_REGEXP } from 'vs/editor/common/model/wordHelper'; import { ICodeEditor, IEditorMouseEvent, MouseTargetType } from 'vs/editor/browser/editorBrowser'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; -import { IDecorationOptions, IModelDecorationOptions, IModelDeltaDecoration, TrackedRangeStickiness, Handler } from 'vs/editor/common/editorCommon'; +import { IDecorationOptions, IModelDecorationOptions, IModelDeltaDecoration, TrackedRangeStickiness } from 'vs/editor/common/editorCommon'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { Range } from 'vs/editor/common/core/range'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; @@ -37,6 +37,7 @@ import { FloatingClickWidget } from 'vs/workbench/parts/preferences/browser/pref import { IListService } from 'vs/platform/list/browser/listService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Position } from 'vs/editor/common/core/position'; +import { CoreEditingCommands } from "vs/editor/common/controller/coreCommands"; const HOVER_DELAY = 300; const LAUNCH_JSON_REGEX = /launch\.json$/; @@ -434,7 +435,7 @@ export class DebugEditorContribution implements IDebugEditorContribution { // Check if there are more characters on a line after a "configurations": [, if yes enter a newline if (this.editor.getModel().getLineLastNonWhitespaceColumn(position.lineNumber) > position.column) { this.editor.setPosition(position); - this.editor.trigger(this.getId(), Handler.LineBreakInsert, undefined); + CoreEditingCommands.LineBreakInsert.runEditorCommand(null, this.editor, null); } // Check if there is already an empty line to insert suggest, if yes just place the cursor if (this.editor.getModel().getLineLastNonWhitespaceColumn(position.lineNumber + 1) === 0) { diff --git a/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts index 85f464b2865b6..f1db99bf6475e 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts @@ -9,8 +9,9 @@ import nls = require('vs/nls'); import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/electron-browser/emmetActions'; import { editorAction } from 'vs/editor/common/editorCommonExtensions'; -import { Handler, ICommonCodeEditor } from 'vs/editor/common/editorCommon'; +import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; +import { CoreEditingCommands } from "vs/editor/common/controller/coreCommands"; import { KeyCode } from 'vs/base/common/keyCodes'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; @@ -40,6 +41,6 @@ class ExpandAbbreviationAction extends BasicEmmetEditorAction { protected noExpansionOccurred(editor: ICommonCodeEditor): void { // forward the tab key back to the editor - editor.trigger('emmet', Handler.Tab, {}); + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); } } diff --git a/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts b/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts index 15079c88a2c11..a55193df5156a 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts @@ -5,13 +5,14 @@ 'use strict'; -import { ICommonCodeEditor, Handler } from 'vs/editor/common/editorCommon'; +import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import strings = require('vs/base/common/strings'); import snippets = require('vs/editor/contrib/snippet/common/snippet'); import { Range } from 'vs/editor/common/core/range'; import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { LanguageId, LanguageIdentifier } from 'vs/editor/common/modes'; import { Position } from 'vs/editor/common/core/position'; +import { CoreEditingCommands } from "vs/editor/common/controller/coreCommands"; import emmet = require('emmet'); @@ -140,7 +141,7 @@ export class EditorAccessor implements emmet.Editor { // During Expand Abbreviation action, if the expanded abbr is the same as the text it intends to replace, // then treat it as a no-op and return TAB to the editor if (this._emmetActionName === 'expand_abbreviation' && (value === textToReplace || value === textToReplace + '${0}')) { - this._editor.trigger('emmet', Handler.Tab, {}); + CoreEditingCommands.Tab.runEditorCommand(null, this._editor, null); return null; } From 8b94148a0456cb1267edc688534089d057f7ccd8 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 00:41:42 +0200 Subject: [PATCH 0737/2747] Renames --- src/vs/editor/common/controller/cursor.ts | 33 +--- .../controller/cursorDeleteOperations.ts | 48 +++--- .../common/controller/cursorTypeOperations.ts | 156 ++++++++---------- 3 files changed, 103 insertions(+), 134 deletions(-) diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 5c05fddaa8466..5df9f4780736a 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -14,7 +14,7 @@ import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { Selection, SelectionDirection, ISelection } from 'vs/editor/common/core/selection'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { CursorColumns, CursorConfiguration, EditOperationResult, SingleCursorState, IViewModelHelper, CursorContext, CursorState, RevealTarget, IColumnSelectData, ICursors } from 'vs/editor/common/controller/cursorCommon'; +import { CursorColumns, CursorConfiguration, EditOperationResult, IViewModelHelper, CursorContext, CursorState, RevealTarget, IColumnSelectData, ICursors } from 'vs/editor/common/controller/cursorCommon'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { DeleteOperations } from 'vs/editor/common/controller/cursorDeleteOperations'; import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; @@ -533,23 +533,6 @@ export class Cursor extends Disposable implements ICursors { // -------------------- START editing operations - // TODO@Alex: remove - private _getAllCursorsModelState(sorted: boolean = false): SingleCursorState[] { - let cursors = this._cursors.getAll(); - - if (sorted) { - cursors = cursors.sort((a, b) => { - return Range.compareRangesUsingStarts(a.modelState.selection, b.modelState.selection); - }); - } - - let r: SingleCursorState[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - r[i] = cursors[i].modelState; - } - return r; - } - private _type(args: CursorOperationArgs<{ text: string; }>): EditOperationResult { const text = args.eventData.text; @@ -570,21 +553,21 @@ export class Cursor extends Disposable implements ICursors { this._createAndInterpretHandlerCtx(() => { // Decide what all cursors will do up-front - return TypeOperations.typeWithInterceptors(this.context.config, this.context.model, this._getAllCursorsModelState(), chr); + return TypeOperations.typeWithInterceptors(this.context.config, this.context.model, this.getSelections(), chr); }); } return null; } else { - return TypeOperations.typeWithoutInterceptors(this.context.config, this.context.model, this._getAllCursorsModelState(), text); + return TypeOperations.typeWithoutInterceptors(this.context.config, this.context.model, this.getSelections(), text); } } private _replacePreviousChar(args: CursorOperationArgs<{ text: string; replaceCharCnt: number; }>): EditOperationResult { let text = args.eventData.text; let replaceCharCnt = args.eventData.replaceCharCnt; - return TypeOperations.replacePreviousChar(this.context.config, this.context.model, this._getAllCursorsModelState(), text, replaceCharCnt); + return TypeOperations.replacePreviousChar(this.context.config, this.context.model, this.getSelections(), text, replaceCharCnt); } private _compositionStart(args: CursorOperationArgs): EditOperationResult { @@ -625,14 +608,16 @@ export class Cursor extends Disposable implements ICursors { const distributedPaste = this._distributePasteToCursors(args); if (distributedPaste) { - return TypeOperations.distributedPaste(this.context.config, this.context.model, this._getAllCursorsModelState(true), distributedPaste); + let selections = this.getSelections(); + selections = selections.sort(Range.compareRangesUsingStarts); + return TypeOperations.distributedPaste(this.context.config, this.context.model, selections, distributedPaste); } else { - return TypeOperations.paste(this.context.config, this.context.model, this._getAllCursorsModelState(), args.eventData.text, args.eventData.pasteOnNewLine); + return TypeOperations.paste(this.context.config, this.context.model, this.getSelections(), args.eventData.text, args.eventData.pasteOnNewLine); } } private _cut(args: CursorOperationArgs): EditOperationResult { - return DeleteOperations.cut(this.context.config, this.context.model, this._getAllCursorsModelState()); + return DeleteOperations.cut(this.context.config, this.context.model, this.getSelections()); } // -------------------- END editing operations diff --git a/src/vs/editor/common/controller/cursorDeleteOperations.ts b/src/vs/editor/common/controller/cursorDeleteOperations.ts index b6552f40e5d2e..c968bb49f76c6 100644 --- a/src/vs/editor/common/controller/cursorDeleteOperations.ts +++ b/src/vs/editor/common/controller/cursorDeleteOperations.ts @@ -5,7 +5,7 @@ 'use strict'; import { ReplaceCommand } from 'vs/editor/common/commands/replaceCommand'; -import { SingleCursorState, CursorColumns, CursorConfiguration, ICursorSimpleModel, EditOperationResult } from 'vs/editor/common/controller/cursorCommon'; +import { CursorColumns, CursorConfiguration, ICursorSimpleModel, EditOperationResult } from 'vs/editor/common/controller/cursorCommon'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { MoveOperations } from 'vs/editor/common/controller/cursorMoveOperations'; @@ -14,16 +14,16 @@ import { ICommand } from "vs/editor/common/editorCommon"; export class DeleteOperations { - public static deleteRight(config: CursorConfiguration, model: ICursorSimpleModel, cursors: Selection[]): [boolean, ICommand[]] { + public static deleteRight(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[]): [boolean, ICommand[]] { let commands: ICommand[] = []; let shouldPushStackElementBefore = false; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; - let deleteSelection: Range = cursor; + let deleteSelection: Range = selection; if (deleteSelection.isEmpty()) { - let position = cursor.getPosition(); + let position = selection.getPosition(); let rightOfPosition = MoveOperations.right(config, model, position.lineNumber, position.column); deleteSelection = new Range( rightOfPosition.lineNumber, @@ -48,13 +48,13 @@ export class DeleteOperations { return [shouldPushStackElementBefore, commands]; } - private static _isAutoClosingPairDelete(config: CursorConfiguration, model: ICursorSimpleModel, cursors: Selection[]): boolean { + private static _isAutoClosingPairDelete(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[]): boolean { if (!config.autoClosingBrackets) { return false; } - for (let i = 0, len = cursors.length; i < len; i++) { - const selection = cursors[i]; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; const position = selection.getPosition(); if (!selection.isEmpty()) { @@ -79,11 +79,10 @@ export class DeleteOperations { return true; } - private static _runAutoClosingPairDelete(config: CursorConfiguration, model: ICursorSimpleModel, cursors: Selection[]): [boolean, ICommand[]] { + private static _runAutoClosingPairDelete(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[]): [boolean, ICommand[]] { let commands: ICommand[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const position = cursor.getPosition(); + for (let i = 0, len = selections.length; i < len; i++) { + const position = selections[i].getPosition(); const deleteSelection = new Range( position.lineNumber, position.column - 1, @@ -95,21 +94,21 @@ export class DeleteOperations { return [true, commands]; } - public static deleteLeft(config: CursorConfiguration, model: ICursorSimpleModel, cursors: Selection[]): [boolean, ICommand[]] { + public static deleteLeft(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[]): [boolean, ICommand[]] { - if (this._isAutoClosingPairDelete(config, model, cursors)) { - return this._runAutoClosingPairDelete(config, model, cursors); + if (this._isAutoClosingPairDelete(config, model, selections)) { + return this._runAutoClosingPairDelete(config, model, selections); } let commands: ICommand[] = []; let shouldPushStackElementBefore = false; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; - let deleteSelection: Range = cursor; + let deleteSelection: Range = selection; if (deleteSelection.isEmpty()) { - let position = cursor.getPosition(); + let position = selection.getPosition(); if (config.useTabStops && position.column > 1) { let lineContent = model.getLineContent(position.lineNumber); @@ -155,17 +154,16 @@ export class DeleteOperations { return [shouldPushStackElementBefore, commands]; } - public static cut(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[]): EditOperationResult { + public static cut(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[]): EditOperationResult { let commands: ICommand[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - let selection = cursor.selection; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; if (selection.isEmpty()) { if (config.emptySelectionClipboard) { // This is a full line cut - let position = cursor.position; + let position = selection.getPosition(); let startLineNumber: number, startColumn: number, diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index 4b8237f13eb10..899ff598a8235 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -6,7 +6,7 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import { ReplaceCommand, ReplaceCommandWithoutChangingPosition, ReplaceCommandWithOffsetCursorState } from 'vs/editor/common/commands/replaceCommand'; -import { SingleCursorState, CursorColumns, CursorConfiguration, ICursorSimpleModel, EditOperationResult } from 'vs/editor/common/controller/cursorCommon'; +import { CursorColumns, CursorConfiguration, ICursorSimpleModel, EditOperationResult } from 'vs/editor/common/controller/cursorCommon'; import { Range } from 'vs/editor/common/core/range'; import { ICommand, ITokenizedModel } from 'vs/editor/common/editorCommon'; import * as strings from 'vs/base/common/strings'; @@ -21,11 +21,10 @@ import { CursorChangeReason } from "vs/editor/common/controller/cursorEvents"; export class TypeOperations { - public static indent(config: CursorConfiguration, model: ICursorSimpleModel, cursors: Selection[]): ICommand[] { + public static indent(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[]): ICommand[] { let commands: ICommand[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - commands[i] = new ShiftCommand(cursor, { + for (let i = 0, len = selections.length; i < len; i++) { + commands[i] = new ShiftCommand(selections[i], { isUnshift: false, tabSize: config.tabSize, oneIndent: config.oneIndent, @@ -35,11 +34,10 @@ export class TypeOperations { return commands; } - public static outdent(config: CursorConfiguration, model: ICursorSimpleModel, cursors: Selection[]): ICommand[] { + public static outdent(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[]): ICommand[] { let commands: ICommand[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - commands[i] = new ShiftCommand(cursor, { + for (let i = 0, len = selections.length; i < len; i++) { + commands[i] = new ShiftCommand(selections[i], { isUnshift: true, tabSize: config.tabSize, oneIndent: config.oneIndent, @@ -71,12 +69,10 @@ export class TypeOperations { return newIndentation; } - public static distributedPaste(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[], text: string[]): EditOperationResult { + public static distributedPaste(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[], text: string[]): EditOperationResult { let commands: ICommand[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - let selection = cursor.selection; - commands[i] = new ReplaceCommand(selection, text[i]); + for (let i = 0, len = selections.length; i < len; i++) { + commands[i] = new ReplaceCommand(selections[i], text[i]); } return new EditOperationResult(commands, { shouldPushStackElementBefore: true, @@ -85,12 +81,11 @@ export class TypeOperations { }); } - public static paste(config: CursorConfiguration, model: ICursorSimpleModel, cursors: SingleCursorState[], text: string, pasteOnNewLine: boolean): EditOperationResult { + public static paste(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[], text: string, pasteOnNewLine: boolean): EditOperationResult { let commands: ICommand[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - let position = cursor.position; - let selection = cursor.selection; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; + let position = selection.getPosition(); if (pasteOnNewLine && text.indexOf('\n') !== text.length - 1) { pasteOnNewLine = false; @@ -166,10 +161,10 @@ export class TypeOperations { return new ReplaceCommand(selection, typeText, insertsAutoWhitespace); } - public static tab(config: CursorConfiguration, model: ITokenizedModel, cursors: Selection[]): ICommand[] { + public static tab(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[]): ICommand[] { let commands: ICommand[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const selection = cursors[i]; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; if (selection.isEmpty()) { @@ -207,18 +202,18 @@ export class TypeOperations { return commands; } - public static replacePreviousChar(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], txt: string, replaceCharCnt: number): EditOperationResult { + public static replacePreviousChar(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], txt: string, replaceCharCnt: number): EditOperationResult { let commands: ICommand[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - if (!cursor.selection.isEmpty()) { + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; + if (!selection.isEmpty()) { // looks like https://github.com/Microsoft/vscode/issues/2773 // where a cursor operation occured before a canceled composition // => ignore composition commands[i] = null; continue; } - let pos = cursor.position; + let pos = selection.getPosition(); let startColumn = Math.max(1, pos.column - replaceCharCnt); let range = new Range(pos.lineNumber, startColumn, pos.lineNumber, pos.column); commands[i] = new ReplaceCommand(range, txt); @@ -294,20 +289,19 @@ export class TypeOperations { return null; } - private static _isAutoClosingCloseCharType(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): boolean { + private static _isAutoClosingCloseCharType(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], ch: string): boolean { if (!config.autoClosingBrackets || !config.autoClosingPairsClose.hasOwnProperty(ch)) { return false; } - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const selection = cursor.selection; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; if (!selection.isEmpty()) { return false; } - const position = cursor.position; + const position = selection.getPosition(); const lineText = model.getLineContent(position.lineNumber); const afterCharacter = lineText.charAt(position.column - 1); @@ -319,11 +313,11 @@ export class TypeOperations { return true; } - private static _runAutoClosingCloseCharType(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): EditOperationResult { + private static _runAutoClosingCloseCharType(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], ch: string): EditOperationResult { let commands: ICommand[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const position = cursor.position; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; + const position = selection.getPosition(); const typeSelection = new Range(position.lineNumber, position.column, position.lineNumber, position.column + 1); commands[i] = new ReplaceCommand(typeSelection, ch); } @@ -333,19 +327,18 @@ export class TypeOperations { }); } - private static _isAutoClosingOpenCharType(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): boolean { + private static _isAutoClosingOpenCharType(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], ch: string): boolean { if (!config.autoClosingBrackets || !config.autoClosingPairsOpen.hasOwnProperty(ch)) { return false; } - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const selection = cursor.selection; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; if (!selection.isEmpty()) { return false; } - const position = cursor.position; + const position = selection.getPosition(); const lineText = model.getLineContent(position.lineNumber); // Do not auto-close ' or " after a word character @@ -397,11 +390,10 @@ export class TypeOperations { return true; } - private static _runAutoClosingOpenCharType(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): EditOperationResult { + private static _runAutoClosingOpenCharType(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], ch: string): EditOperationResult { let commands: ICommand[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const selection = cursor.selection; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; const closeCharacter = config.autoClosingPairsOpen[ch]; commands[i] = new ReplaceCommandWithOffsetCursorState(selection, ch + closeCharacter, 0, -closeCharacter.length); } @@ -411,14 +403,13 @@ export class TypeOperations { }); } - private static _isSurroundSelectionType(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): boolean { + private static _isSurroundSelectionType(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], ch: string): boolean { if (!config.autoClosingBrackets || !config.surroundingPairs.hasOwnProperty(ch)) { return false; } - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const selection = cursor.selection; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; if (selection.isEmpty()) { return false; @@ -446,11 +437,10 @@ export class TypeOperations { return true; } - private static _runSurroundSelectionType(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): EditOperationResult { + private static _runSurroundSelectionType(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], ch: string): EditOperationResult { let commands: ICommand[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - const selection = cursor.selection; + for (let i = 0, len = selections.length; i < len; i++) { + const selection = selections[i]; const closeCharacter = config.surroundingPairs[ch]; commands[i] = new SurroundSelectionCommand(selection, ch, closeCharacter); } @@ -460,12 +450,12 @@ export class TypeOperations { }); } - private static _typeInterceptorElectricChar(config: CursorConfiguration, model: ITokenizedModel, cursor: SingleCursorState, ch: string): EditOperationResult { - if (!config.electricChars.hasOwnProperty(ch) || !cursor.selection.isEmpty()) { + private static _typeInterceptorElectricChar(config: CursorConfiguration, model: ITokenizedModel, selections: Selection, ch: string): EditOperationResult { + if (!config.electricChars.hasOwnProperty(ch) || !selections.isEmpty()) { return null; } - let position = cursor.position; + let position = selections.getPosition(); model.forceTokenization(position.lineNumber); let lineTokens = model.getLineTokens(position.lineNumber); @@ -481,7 +471,7 @@ export class TypeOperations { } if (electricAction.appendText) { - const command = new ReplaceCommandWithOffsetCursorState(cursor.selection, ch + electricAction.appendText, 0, -electricAction.appendText.length); + const command = new ReplaceCommandWithOffsetCursorState(selections, ch + electricAction.appendText, 0, -electricAction.appendText.length); return new EditOperationResult([command], { shouldPushStackElementBefore: false, shouldPushStackElementAfter: true @@ -523,12 +513,12 @@ export class TypeOperations { return null; } - public static typeWithInterceptors(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], ch: string): EditOperationResult { + public static typeWithInterceptors(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], ch: string): EditOperationResult { if (ch === '\n') { let commands: ICommand[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - commands[i] = TypeOperations._enter(config, model, false, cursors[i].selection); + for (let i = 0, len = selections.length; i < len; i++) { + commands[i] = TypeOperations._enter(config, model, false, selections[i]); } return new EditOperationResult(commands, { shouldPushStackElementBefore: true, @@ -536,35 +526,34 @@ export class TypeOperations { }); } - if (this._isAutoClosingCloseCharType(config, model, cursors, ch)) { - return this._runAutoClosingCloseCharType(config, model, cursors, ch); + if (this._isAutoClosingCloseCharType(config, model, selections, ch)) { + return this._runAutoClosingCloseCharType(config, model, selections, ch); } - if (this._isAutoClosingOpenCharType(config, model, cursors, ch)) { - return this._runAutoClosingOpenCharType(config, model, cursors, ch); + if (this._isAutoClosingOpenCharType(config, model, selections, ch)) { + return this._runAutoClosingOpenCharType(config, model, selections, ch); } - if (this._isSurroundSelectionType(config, model, cursors, ch)) { - return this._runSurroundSelectionType(config, model, cursors, ch); + if (this._isSurroundSelectionType(config, model, selections, ch)) { + return this._runSurroundSelectionType(config, model, selections, ch); } // Electric characters make sense only when dealing with a single cursor, // as multiple cursors typing brackets for example would interfer with bracket matching - if (cursors.length === 1) { - const r = this._typeInterceptorElectricChar(config, model, cursors[0], ch); + if (selections.length === 1) { + const r = this._typeInterceptorElectricChar(config, model, selections[0], ch); if (r) { return r; } } - return this.typeWithoutInterceptors(config, model, cursors, ch); + return this.typeWithoutInterceptors(config, model, selections, ch); } - public static typeWithoutInterceptors(config: CursorConfiguration, model: ITokenizedModel, cursors: SingleCursorState[], str: string): EditOperationResult { + public static typeWithoutInterceptors(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], str: string): EditOperationResult { let commands: ICommand[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - commands[i] = new ReplaceCommand(cursor.selection, str); + for (let i = 0, len = selections.length; i < len; i++) { + commands[i] = new ReplaceCommand(selections[i], str); } return new EditOperationResult(commands, { shouldPushStackElementBefore: false, @@ -572,11 +561,10 @@ export class TypeOperations { }); } - public static lineInsertBefore(config: CursorConfiguration, model: ITokenizedModel, cursors: Selection[]): ICommand[] { + public static lineInsertBefore(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[]): ICommand[] { let commands: ICommand[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - let lineNumber = cursor.positionLineNumber; + for (let i = 0, len = selections.length; i < len; i++) { + let lineNumber = selections[i].positionLineNumber; if (lineNumber === 1) { commands[i] = new ReplaceCommandWithoutChangingPosition(new Range(1, 1, 1, 1), '\n'); @@ -590,22 +578,20 @@ export class TypeOperations { return commands; } - public static lineInsertAfter(config: CursorConfiguration, model: ITokenizedModel, cursors: Selection[]): ICommand[] { + public static lineInsertAfter(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[]): ICommand[] { let commands: ICommand[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - let lineNumber = cursor.positionLineNumber; + for (let i = 0, len = selections.length; i < len; i++) { + const lineNumber = selections[i].positionLineNumber; let column = model.getLineMaxColumn(lineNumber); commands[i] = this._enter(config, model, false, new Range(lineNumber, column, lineNumber, column)); } return commands; } - public static lineBreakInsert(config: CursorConfiguration, model: ITokenizedModel, cursors: Selection[]): ICommand[] { + public static lineBreakInsert(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[]): ICommand[] { let commands: ICommand[] = []; - for (let i = 0, len = cursors.length; i < len; i++) { - const cursor = cursors[i]; - commands[i] = this._enter(config, model, true, cursor); + for (let i = 0, len = selections.length; i < len; i++) { + commands[i] = this._enter(config, model, true, selections[i]); } return commands; } From f9a85226d6a0daac4cee9bca2e36986f9b41f063 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 18 May 2017 13:58:12 -0700 Subject: [PATCH 0738/2747] Refactoring css file for better readability, again --- .../contrib/suggest/browser/media/suggest.css | 93 ++++++++++--------- .../contrib/suggest/browser/suggestWidget.ts | 11 ++- 2 files changed, 53 insertions(+), 51 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index d5e20221956e6..f0d8e56e7d5e0 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -3,14 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -/* Suggest */ +/* Suggest widget*/ .monaco-editor .suggest-widget { z-index: 40; - width: 430px; -} - -.monaco-editor .suggest-widget.docs-expanded { - width: 660px; } .monaco-editor .suggest-widget.visible { @@ -20,36 +15,62 @@ transition: left .05s ease-in-out; } -.monaco-editor .suggest-widget > .message { - padding-left: 22px; +/** Initial widths **/ + +.monaco-editor .suggest-widget { + width: 430px; +} + +.monaco-editor .suggest-widget > .tree, +.monaco-editor .suggest-widget > .details { + width: 428px; border-style: solid; border-width: 1px; } -/** Styles for the list element **/ -.monaco-editor .suggest-widget > .tree { - height: 100%; - width: 430px; - float: left; - box-sizing: border-box; +.monaco-editor.hc-black .suggest-widget > .tree, +.monaco-editor.hc-black .suggest-widget > .details { + width: 426px; + border-width: 2px; +} + +/** Adjust width when docs are expanded to the side **/ +.monaco-editor .suggest-widget.docs-side { + width: 660px; +} + +.monaco-editor .suggest-widget.docs-side > .tree, +.monaco-editor .suggest-widget.docs-side > .details { + width: 328px; +} + +.monaco-editor.hc-black .suggest-widget.docs-side > .tree, +.monaco-editor.hc-black .suggest-widget.docs-side > .details { + width: 326px; +} + +/* Styles for Message element for when widget is loading or is empty */ +.monaco-editor .suggest-widget > .message { + padding-left: 22px; border-style: solid; border-width: 1px; } -.monaco-editor .suggest-widget.list-right > .tree { - float: right +.monaco-editor.hc-black .suggest-widget > .message { + border-width: 2px; } -.monaco-editor .suggest-widget.docs-below > .tree { - float: none; +/** Styles for the list element **/ +.monaco-editor .suggest-widget > .tree { + height: 100%; } -.monaco-editor .suggest-widget.docs-expanded > .tree { - width: 330px; +.monaco-editor .suggest-widget.docs-side > .tree { + float: left; } -.monaco-editor .suggest-widget.small.docs-expanded > .tree { - width: 430px; +.monaco-editor .suggest-widget.docs-side.list-right > .tree { + float: right } /** Styles for each row in the list element **/ @@ -123,14 +144,14 @@ .monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore, .monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .type-label, -.monaco-editor .suggest-widget.docs-expanded .monaco-list .monaco-list-row.focused > .contents > .main > .readMore, -.monaco-editor .suggest-widget.docs-expanded .monaco-list .monaco-list-row.focused > .contents > .main > .type-label { +.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused > .contents > .main > .readMore, +.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused > .contents > .main > .type-label, +.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row.focused > .contents > .main > .readMore { display: none; } .monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .readMore, -.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .type-label, -.monaco-editor .suggest-widget.docs-expanded.small .monaco-list .monaco-list-row.focused > .contents > .main > .type-label { +.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused > .contents > .main > .type-label { display: inline; } @@ -187,16 +208,6 @@ display: flex; flex-direction: column; cursor: default; - /* .details does not use border-box, so subtract the border height here (2px). This is the case - because the height of .details is set prorammatically based on .header and .docs, we don't want - our JS to care about the size of the border (which changes based on theme type). */ - width: 328px; - border-style: solid; - border-width: 1px; -} - -.monaco-editor .suggest-widget.small > .details { - width: 430px; } .monaco-editor .suggest-widget .details.no-docs { @@ -241,16 +252,6 @@ background-image: url('./close-dark.svg'); } -.monaco-editor.hc-black .suggest-widget > .tree, -.monaco-editor.hc-black .suggest-widget > .message { - border-width: 2px; -} - -.monaco-editor.hc-black .suggest-widget > .details { - border-width: 2px; - width: 326px; -} - .monaco-editor.vs-dark .suggest-widget .monaco-list .monaco-list-row .icon, .monaco-editor.hc-black .suggest-widget .monaco-list .monaco-list-row .icon { background-image: url('Misc_inverse_16x.svg'); } diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 2c11eb765de0c..4216f33f89df8 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -565,7 +565,7 @@ export class SuggestWidget implements IContentWidget, IDelegate this.adjustDocsPosition(); this._ariaAlert(this.details.getAriaLabel()); } else { - removeClass(this.element, 'docs-expanded'); + removeClass(this.element, 'docs-side'); } }) .then(null, err => !isPromiseCanceledError(err) && onUnexpectedError(err)) @@ -808,7 +808,7 @@ export class SuggestWidget implements IContentWidget, IDelegate if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false)) { this.storageService.store('expandSuggestionDocs', false, StorageScope.GLOBAL); hide(this.details.element); - removeClass(this.element, 'docs-expanded'); + removeClass(this.element, 'docs-side'); this.editor.layoutContentWidget(this); } else { this.storageService.store('expandSuggestionDocs', true, StorageScope.GLOBAL); @@ -822,7 +822,7 @@ export class SuggestWidget implements IContentWidget, IDelegate } show(this.details.element); - addClass(this.element, 'docs-expanded'); + addClass(this.element, 'docs-side'); this.show(); this.editor.focus(); @@ -903,7 +903,7 @@ export class SuggestWidget implements IContentWidget, IDelegate if (this.messageElement.style.display !== 'none' && this.details.element.style.display === 'none' && this.listElement.style.display === 'none') { - addClass(this.element, 'small'); + return; } @@ -929,7 +929,8 @@ export class SuggestWidget implements IContentWidget, IDelegate if (this.element.clientWidth < this.maxWidgetWidth && this.listElement.clientWidth !== this.minWidgetWidth) { // Not enough space to show side by side, so show docs below the list - addClass(this.element, 'small'); + addClass(this.element, 'docs-below'); + removeClass(this.element, 'docs-side'); return; } From 2dfdd52a09b4dbf24366f816cd5f8768f8aef609 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 18 May 2017 15:53:55 -0700 Subject: [PATCH 0739/2747] Remove flicker when docs are expanded below --- .../contrib/suggest/browser/suggestWidget.ts | 39 ++++++++----------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 4216f33f89df8..a572d9beb4b79 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -611,6 +611,7 @@ export class SuggestWidget implements IContentWidget, IDelegate show(this.listElement); if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false)) { show(this.details.element); + this.expandSideOrBelow(); } else { hide(this.details.element); } @@ -809,9 +810,13 @@ export class SuggestWidget implements IContentWidget, IDelegate this.storageService.store('expandSuggestionDocs', false, StorageScope.GLOBAL); hide(this.details.element); removeClass(this.element, 'docs-side'); + removeClass(this.element, 'docs-below'); this.editor.layoutContentWidget(this); } else { this.storageService.store('expandSuggestionDocs', true, StorageScope.GLOBAL); + + this.expandSideOrBelow(); + this.showDetails(); } } @@ -822,7 +827,6 @@ export class SuggestWidget implements IContentWidget, IDelegate } show(this.details.element); - addClass(this.element, 'docs-side'); this.show(); this.editor.focus(); @@ -891,32 +895,12 @@ export class SuggestWidget implements IContentWidget, IDelegate this.listElement.style.height = `${height}px`; this.list.layout(height); - this.adjustWidgetWidth(); + this.listElement.style.marginTop = '0px'; this.editor.layoutContentWidget(this); return height; } - private adjustWidgetWidth() { - - // Message element is shown, list and docs are not - if (this.messageElement.style.display !== 'none' - && this.details.element.style.display === 'none' - && this.listElement.style.display === 'none') { - - return; - } - - let matches = this.element.style.maxWidth.match(/(\d+)px/); - if (!matches || Number(matches[1]) >= this.maxWidgetWidth) { - // Reset width - removeClass(this.element, 'small'); - } - - // Reset list margin - this.listElement.style.marginTop = '0px'; - } - private adjustDocsPosition() { const cursorCoords = this.editor.getScrolledVisiblePosition(this.editor.getPosition()); const editorCoords = getDomNodePagePosition(this.editor.getDomNode()); @@ -945,6 +929,17 @@ export class SuggestWidget implements IContentWidget, IDelegate } } + private expandSideOrBelow() { + let matches = this.element.style.maxWidth.match(/(\d+)px/); + if (!matches || Number(matches[1]) < this.maxWidgetWidth) { + addClass(this.element, 'docs-below'); + removeClass(this.element, 'docs-side'); + } else { + addClass(this.element, 'docs-side'); + removeClass(this.element, 'docs-below'); + } + } + private renderDetails(): void { if (this.state === State.Details || this.state === State.Open) { this.details.render(this.list.getFocusedElements()[0]); From 7d2739bfe4bda502a51acc718d305cf11da453b6 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 18 May 2017 15:37:50 -0700 Subject: [PATCH 0740/2747] Remove some unused functions in reader --- .../typescript/src/utils/wireProtocol.ts | 67 +++---------------- 1 file changed, 10 insertions(+), 57 deletions(-) diff --git a/extensions/typescript/src/utils/wireProtocol.ts b/extensions/typescript/src/utils/wireProtocol.ts index b1a4d8a0d89e9..d88a9256e32af 100644 --- a/extensions/typescript/src/utils/wireProtocol.ts +++ b/extensions/typescript/src/utils/wireProtocol.ts @@ -7,12 +7,12 @@ import stream = require('stream'); -let DefaultSize: number = 8192; -let ContentLength: string = 'Content-Length: '; -let ContentLengthSize: number = Buffer.byteLength(ContentLength, 'utf8'); -let Blank: number = new Buffer(' ', 'utf8')[0]; -let BackslashR: number = new Buffer('\r', 'utf8')[0]; -let BackslashN: number = new Buffer('\n', 'utf8')[0]; +const DefaultSize: number = 8192; +const ContentLength: string = 'Content-Length: '; +const ContentLengthSize: number = Buffer.byteLength(ContentLength, 'utf8'); +const Blank: number = new Buffer(' ', 'utf8')[0]; +const BackslashR: number = new Buffer('\r', 'utf8')[0]; +const BackslashN: number = new Buffer('\n', 'utf8')[0]; class ProtocolBuffer { @@ -83,36 +83,6 @@ class ProtocolBuffer { this.index = this.index - sourceStart; return result; } - - public tryReadLine(): string | null { - let end: number = 0; - while (end < this.index && this.buffer[end] !== BackslashR && this.buffer[end] !== BackslashN) { - end++; - } - if (end >= this.index) { - return null; - } - let result = this.buffer.toString('utf8', 0, end); - while (end < this.index && (this.buffer[end] === BackslashR || this.buffer[end] === BackslashN)) { - end++; - } - if (this.index === end) { - this.index = 0; - } else { - this.buffer.copy(this.buffer, 0, end); - this.index = this.index - end; - } - return result; - } - - public get numberOfBytes(): number { - return this.index; - } -} - -export enum ReaderType { - Length = 0, - Line = 1 } export interface ICallback { @@ -126,20 +96,14 @@ export class Reader { private buffer: ProtocolBuffer; private nextMessageLength: number; - public constructor(readable: stream.Readable, callback: ICallback, type: ReaderType = ReaderType.Length) { + public constructor(readable: stream.Readable, callback: ICallback) { this.readable = readable; this.buffer = new ProtocolBuffer(); this.callback = callback; this.nextMessageLength = -1; - if (type === ReaderType.Length) { - this.readable.on('data', (data: Buffer) => { - this.onLengthData(data); - }); - } else if (type === ReaderType.Line) { - this.readable.on('data', (data: Buffer) => { - this.onLineData(data); - }); - } + this.readable.on('data', (data: Buffer) => { + this.onLengthData(data); + }); } private onLengthData(data: Buffer): void { @@ -160,15 +124,4 @@ export class Reader { this.callback(json); } } - - private onLineData(data: Buffer): void { - this.buffer.append(data); - while (true) { - let msg = this.buffer.tryReadLine(); - if (msg === null) { - return; - } - this.callback(JSON.parse(msg)); - } - } } From 7c2d2c37ebd5fc1d502ffe9145dbb732107dc59e Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 18 May 2017 15:42:49 -0700 Subject: [PATCH 0741/2747] Mark a few members readonly --- extensions/typescript/src/utils/wireProtocol.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/typescript/src/utils/wireProtocol.ts b/extensions/typescript/src/utils/wireProtocol.ts index d88a9256e32af..3cb8e34348d7a 100644 --- a/extensions/typescript/src/utils/wireProtocol.ts +++ b/extensions/typescript/src/utils/wireProtocol.ts @@ -91,9 +91,9 @@ export interface ICallback { export class Reader { - private readable: stream.Readable; - private callback: ICallback; - private buffer: ProtocolBuffer; + private readonly readable: stream.Readable; + private readonly callback: ICallback; + private readonly buffer: ProtocolBuffer; private nextMessageLength: number; public constructor(readable: stream.Readable, callback: ICallback) { @@ -115,7 +115,7 @@ export class Reader { return; } } - let msg = this.buffer.tryReadContent(this.nextMessageLength); + const msg = this.buffer.tryReadContent(this.nextMessageLength); if (msg === null) { return; } From 288968f8036f6dc4bb003fcefb2d7649be33bf8d Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 18 May 2017 16:07:54 -0700 Subject: [PATCH 0742/2747] Fix duplicate code ids names being uploaded to ts --- .../typescript/src/features/codeActionProvider.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/typescript/src/features/codeActionProvider.ts b/extensions/typescript/src/features/codeActionProvider.ts index aea55cef7edfa..0a9d297987c7a 100644 --- a/extensions/typescript/src/features/codeActionProvider.ts +++ b/extensions/typescript/src/features/codeActionProvider.ts @@ -58,7 +58,7 @@ export default class TypeScriptCodeActionProvider implements CodeActionProvider }; return this.getSupportedActionsForContext(context) .then(supportedActions => { - if (!supportedActions.length) { + if (!supportedActions.size) { return []; } return this.client.execute('getCodeFixes', { @@ -67,8 +67,8 @@ export default class TypeScriptCodeActionProvider implements CodeActionProvider endLine: range.end.line + 1, startOffset: range.start.character + 1, endOffset: range.end.character + 1, - errorCodes: supportedActions - }, token).then(response => response.body || []); + errorCodes: Array.from(supportedActions) + } as Proto.CodeFixRequestArgs, token).then(response => response.body || []); }) .then(codeActions => codeActions.map(action => this.actionToEdit(source, action))); } @@ -87,11 +87,11 @@ export default class TypeScriptCodeActionProvider implements CodeActionProvider return this._supportedCodeActions; } - private getSupportedActionsForContext(context: CodeActionContext) { + private getSupportedActionsForContext(context: CodeActionContext): Thenable> { return this.supportedCodeActions.then(supportedActions => - context.diagnostics + new Set(context.diagnostics .map(diagnostic => +diagnostic.code) - .filter(code => supportedActions[code])); + .filter(code => supportedActions[code]))); } private actionToEdit(source: Source, action: Proto.CodeAction): Command { From 6d8e64ee3f5f033a7f8dbc22f93fbef2b74fc4fc Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 18 May 2017 16:24:23 -0700 Subject: [PATCH 0743/2747] Add error handler for reader --- .../typescript/src/typescriptServiceClient.ts | 38 +++++++++---------- .../typescript/src/utils/wireProtocol.ts | 32 ++++++++++------ 2 files changed, 39 insertions(+), 31 deletions(-) diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index f10338b0cd7a0..db669ae5858ed 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -328,7 +328,9 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } private logTrace(message: string, data?: any): void { - this.logger.logLevel('Trace', message, data); + if (this.trace !== Trace.Off) { + this.logger.logLevel('Trace', message, data); + } } public logTelemetry(eventName: string, properties?: { [prop: string]: string }) { @@ -464,13 +466,14 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } let value = process.env.TSS_DEBUG; if (value) { - let port = parseInt(value); + const port = parseInt(value); if (!isNaN(port)) { this.info(`TSServer started in debug mode using port ${port}`); options.execArgv = [`--debug=${port}`]; } } - let args: string[] = []; + + const args: string[] = []; if (this.apiVersion.has206Features()) { args.push('--useSingleInferredProject'); if (workspace.getConfiguration().get('typescript.disableAutomaticTypeAcquisition', false)) { @@ -540,9 +543,12 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } this.serviceExited(true); }); - this.reader = new Reader(childProcess.stdout, (msg) => { - this.dispatchMessage(msg); - }); + + this.reader = new Reader( + childProcess.stdout, + (msg) => { this.dispatchMessage(msg); }, + error => { this.error('ReaderError', error); }); + this._onReady.resolve(); resolve(childProcess); this.serviceStarted(resendModels); @@ -759,7 +765,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient }); this.callbacks = Object.create(null); if (restart) { - let diff = Date.now() - this.lastStart; + const diff = Date.now() - this.lastStart; this.numberRestarts++; let startService = true; if (this.numberRestarts > 5) { @@ -902,17 +908,13 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient for (let i = 0; i < this.requestQueue.length; i++) { if (this.requestQueue[i].request.seq === seq) { this.requestQueue.splice(i, 1); - if (this.trace !== Trace.Off) { - this.logTrace(`TypeScript Service: canceled request with sequence number ${seq}`); - } + this.logTrace(`TypeScript Service: canceled request with sequence number ${seq}`); return true; } } if (this.apiVersion.has222Features() && this.cancellationPipeName) { - if (this.trace !== Trace.Off) { - this.logTrace(`TypeScript Service: trying to cancel ongoing request with sequence number ${seq}`); - } + this.logTrace(`TypeScript Service: trying to cancel ongoing request with sequence number ${seq}`); try { fs.writeFileSync(this.cancellationPipeName + seq, ''); return true; @@ -921,17 +923,15 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } } - if (this.trace !== Trace.Off) { - this.logTrace(`TypeScript Service: tried to cancel request with sequence number ${seq}. But request got already delivered.`); - } + this.logTrace(`TypeScript Service: tried to cancel request with sequence number ${seq}. But request got already delivered.`); return false; } private dispatchMessage(message: Proto.Message): void { try { if (message.type === 'response') { - let response: Proto.Response = message; - let p = this.callbacks[response.request_seq]; + const response: Proto.Response = message as Proto.Response; + const p = this.callbacks[response.request_seq]; if (p) { this.traceResponse(response, p.start); delete this.callbacks[response.request_seq]; @@ -943,7 +943,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } } } else if (message.type === 'event') { - let event: Proto.Event = message; + const event: Proto.Event = message; this.traceEvent(event); if (event.event === 'syntaxDiag') { this.host.syntaxDiagnosticsReceived(event as Proto.DiagnosticEvent); diff --git a/extensions/typescript/src/utils/wireProtocol.ts b/extensions/typescript/src/utils/wireProtocol.ts index 3cb8e34348d7a..218d461f853bf 100644 --- a/extensions/typescript/src/utils/wireProtocol.ts +++ b/extensions/typescript/src/utils/wireProtocol.ts @@ -96,7 +96,11 @@ export class Reader { private readonly buffer: ProtocolBuffer; private nextMessageLength: number; - public constructor(readable: stream.Readable, callback: ICallback) { + public constructor( + readable: stream.Readable, + callback: ICallback, + private readonly onError: (error: any) => void = () => ({}) + ) { this.readable = readable; this.buffer = new ProtocolBuffer(); this.callback = callback; @@ -107,21 +111,25 @@ export class Reader { } private onLengthData(data: Buffer): void { - this.buffer.append(data); - while (true) { - if (this.nextMessageLength === -1) { - this.nextMessageLength = this.buffer.tryReadContentLength(); + try { + this.buffer.append(data); + while (true) { if (this.nextMessageLength === -1) { + this.nextMessageLength = this.buffer.tryReadContentLength(); + if (this.nextMessageLength === -1) { + return; + } + } + const msg = this.buffer.tryReadContent(this.nextMessageLength); + if (msg === null) { return; } + this.nextMessageLength = -1; + const json = JSON.parse(msg); + this.callback(json); } - const msg = this.buffer.tryReadContent(this.nextMessageLength); - if (msg === null) { - return; - } - this.nextMessageLength = -1; - let json = JSON.parse(msg); - this.callback(json); + } catch (e) { + this.onError(e); } } } From b8b81b73b4501982ba1fa8b65fd17fe62e2ffdc5 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 18 May 2017 17:33:54 -0700 Subject: [PATCH 0744/2747] add tsserver.debug option --- .vscode/launch.json | 11 +++++ .../typescript/src/typescriptServiceClient.ts | 40 +++++++++++++++---- 2 files changed, 43 insertions(+), 8 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 7e923598730fd..45c4da7183956 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -163,6 +163,17 @@ "outFiles": [ "${workspaceRoot}/extensions/git/out/**/*.js" ] + }, + { + "name": "Attach to TS Server", + "type": "node", + "request": "attach", + "port": 5859, + "sourceMaps": true, + "protocol": "legacy", + "outFiles": [ + "${workspaceRoot}/extensions/node_modules/typescript/lib/**/*.js" + ] } ], "compounds": [ diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index db669ae5858ed..525fd8e0eecc4 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -9,6 +9,7 @@ import * as cp from 'child_process'; import * as path from 'path'; import * as fs from 'fs'; import * as os from 'os'; +import * as net from 'net'; import * as electron from './utils/electron'; import { Reader } from './utils/wireProtocol'; @@ -415,6 +416,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } return modulePath; }).then(modulePath => { + return this.getDebugPort().then(debugPort => ({ modulePath, debugPort })); + }).then(({ modulePath, debugPort }) => { return this.servicePromise = new Promise((resolve, reject) => { const tsConfig = workspace.getConfiguration('typescript'); @@ -458,19 +461,16 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.lastError = null; try { - let options: electron.IForkOptions = { + const options: electron.IForkOptions = { execArgv: [] // [`--debug-brk=5859`] }; if (workspace.rootPath) { options.cwd = workspace.rootPath; } - let value = process.env.TSS_DEBUG; - if (value) { - const port = parseInt(value); - if (!isNaN(port)) { - this.info(`TSServer started in debug mode using port ${port}`); - options.execArgv = [`--debug=${port}`]; - } + + if (debugPort && !isNaN(debugPort)) { + this.info(`TSServer started in debug mode using port ${debugPort}`); + options.execArgv = [`--debug=${debugPort}`]; } const args: string[] = []; @@ -560,6 +560,30 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient }); } + private getDebugPort(): Promise { + const value = process.env.TSS_DEBUG; + if (value) { + const port = parseInt(value); + if (!isNaN(port)) { + return Promise.resolve(port); + } + } + + if (workspace.getConfiguration('typescript').get('tsserver.debug', false)) { + return Promise.race([ + new Promise((resolve) => setTimeout(() => resolve(undefined), 1000)), + new Promise((resolve) => { + const server = net.createServer(sock => sock.end()); + server.listen(0, function () { + resolve(server.address().port); + }); + }) + ]); + } + + return Promise.resolve(undefined); + } + public onVersionStatusClicked(): Thenable { return this.showVersionPicker(false); } From cdaa5f28efd6d6fa012a34a92a6cf3fe57928b38 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 18 May 2017 21:35:15 -0700 Subject: [PATCH 0745/2747] Record when tsserver exits with code or errors --- extensions/typescript/src/typescriptServiceClient.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 525fd8e0eecc4..18b0f81e5ee9e 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -529,6 +529,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient if (this.tsServerLogFile) { this.error(`TSServer log file: ${this.tsServerLogFile}`); } + this.logTelemetry('tsserver.error'); this.serviceExited(false); }); childProcess.on('exit', (code: any) => { @@ -536,6 +537,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.info(`TSServer exited`); } else { this.error(`TSServer exited with code: ${code}`); + this.logTelemetry('tsserver.exitWithCode', { code: code }); } if (this.tsServerLogFile) { From 452ddbf4b13d840a6768289c21d92b3882d33c7e Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 18 May 2017 22:03:50 -0700 Subject: [PATCH 0746/2747] Fix the flicker while toggling suggest docs on the right end of the screen --- src/vs/editor/contrib/suggest/browser/media/suggest.css | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index f0d8e56e7d5e0..fe64def759b94 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -8,13 +8,6 @@ z-index: 40; } -.monaco-editor .suggest-widget.visible { - -webkit-transition: left .05s ease-in-out; - -moz-transition: left .05s ease-in-out; - -o-transition: left .05s ease-in-out; - transition: left .05s ease-in-out; -} - /** Initial widths **/ .monaco-editor .suggest-widget { From b73e961439290447a7c6423469fdc40cd5c9c77b Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 18 May 2017 22:03:10 -0700 Subject: [PATCH 0747/2747] Split tracer out into own file --- .../typescript/src/typescriptServiceClient.ts | 89 ++--------------- extensions/typescript/src/utils/tracer.ts | 95 +++++++++++++++++++ 2 files changed, 105 insertions(+), 79 deletions(-) create mode 100644 extensions/typescript/src/utils/tracer.ts diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 18b0f81e5ee9e..4ea7ba422875e 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -25,6 +25,7 @@ import * as is from './utils/is'; import * as nls from 'vscode-nls'; import TelemetryReporter from "./utils/telemetry"; +import Tracer from "./utils/tracer"; const localize = nls.loadMessageBundle(); interface CallbackItem { @@ -43,28 +44,6 @@ interface RequestItem { callbacks: CallbackItem | null; } -enum Trace { - Off, - Messages, - Verbose -} - -namespace Trace { - export function fromString(value: string): Trace { - value = value.toLowerCase(); - switch (value) { - case 'off': - return Trace.Off; - case 'messages': - return Trace.Messages; - case 'verbose': - return Trace.Verbose; - default: - return Trace.Off; - } - } -} - enum TsServerLogLevel { Off, Normal, @@ -135,7 +114,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private localTsdk: string | null; private _checkGlobalTSCVersion: boolean; private _experimentalAutoBuild: boolean; - private trace: Trace; + private tracer: Tracer; private readonly logger: Logger = new Logger(); private tsServerLogFile: string | null = null; private tsServerLogLevel: TsServerLogLevel = TsServerLogLevel.Off; @@ -195,7 +174,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this._experimentalAutoBuild = false; // configuration.get('typescript.tsserver.experimentalAutoBuild', false); this._apiVersion = new API('1.0.0'); this._checkGlobalTSCVersion = true; - this.trace = this.readTrace(); + this.tracer = new Tracer(this.logger); this.tsServerLogLevel = this.readTsServerLogLevel(); this.checkJs = this.readCheckJs(); @@ -205,7 +184,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient let oldLocalTsdk = this.localTsdk; let oldCheckJs = this.checkJs; - this.trace = this.readTrace(); + this.tracer.updateConfiguration(); this.tsServerLogLevel = this.readTsServerLogLevel(); const configuration = workspace.getConfiguration(); @@ -230,7 +209,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient public restartTsServer(): void { const start = () => { - this.trace = this.readTrace(); this.tsServerLogLevel = this.readTsServerLogLevel(); this.servicePromise = this.startService(); return this.servicePromise; @@ -283,14 +261,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient return this._onTypesInstallerInitializationFailed.event; } - private readTrace(): Trace { - let result: Trace = Trace.fromString(workspace.getConfiguration().get('typescript.tsserver.trace', 'off')); - if (result === Trace.Off && !!process.env.TSS_TRACE) { - result = Trace.Messages; - } - return result; - } - private readTsServerLogLevel(): TsServerLogLevel { const setting = workspace.getConfiguration().get('typescript.tsserver.log', 'off'); return TsServerLogLevel.fromString(setting); @@ -328,12 +298,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.logger.error(message, data); } - private logTrace(message: string, data?: any): void { - if (this.trace !== Trace.Off) { - this.logger.logLevel('Trace', message, data); - } - } - public logTelemetry(eventName: string, properties?: { [prop: string]: string }) { this.telemetryReporter.logTelemetry(eventName, properties); } @@ -912,7 +876,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private sendRequest(requestItem: RequestItem): void { let serverRequest = requestItem.request; - this.traceRequest(serverRequest, !!requestItem.callbacks); + this.tracer.traceRequest(serverRequest, !!requestItem.callbacks, this.requestQueue.length); if (requestItem.callbacks) { this.callbacks[serverRequest.seq] = requestItem.callbacks; this.pendingResponses++; @@ -934,13 +898,13 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient for (let i = 0; i < this.requestQueue.length; i++) { if (this.requestQueue[i].request.seq === seq) { this.requestQueue.splice(i, 1); - this.logTrace(`TypeScript Service: canceled request with sequence number ${seq}`); + this.tracer.logTrace(`TypeScript Service: canceled request with sequence number ${seq}`); return true; } } if (this.apiVersion.has222Features() && this.cancellationPipeName) { - this.logTrace(`TypeScript Service: trying to cancel ongoing request with sequence number ${seq}`); + this.tracer.logTrace(`TypeScript Service: trying to cancel ongoing request with sequence number ${seq}`); try { fs.writeFileSync(this.cancellationPipeName + seq, ''); return true; @@ -949,7 +913,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } } - this.logTrace(`TypeScript Service: tried to cancel request with sequence number ${seq}. But request got already delivered.`); + this.tracer.logTrace(`TypeScript Service: tried to cancel request with sequence number ${seq}. But request got already delivered.`); return false; } @@ -959,7 +923,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient const response: Proto.Response = message as Proto.Response; const p = this.callbacks[response.request_seq]; if (p) { - this.traceResponse(response, p.start); + this.tracer.traceResponse(response, p.start); delete this.callbacks[response.request_seq]; this.pendingResponses--; if (response.success) { @@ -970,7 +934,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } } else if (message.type === 'event') { const event: Proto.Event = message; - this.traceEvent(event); + this.tracer.traceEvent(event); if (event.event === 'syntaxDiag') { this.host.syntaxDiagnosticsReceived(event as Proto.DiagnosticEvent); } else if (event.event === 'semanticDiag') { @@ -1032,37 +996,4 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.sendNextRequests(); } } - - private traceRequest(request: Proto.Request, responseExpected: boolean): void { - if (this.trace === Trace.Off) { - return; - } - let data: string | undefined = undefined; - if (this.trace === Trace.Verbose && request.arguments) { - data = `Arguments: ${JSON.stringify(request.arguments, null, 4)}`; - } - this.logTrace(`Sending request: ${request.command} (${request.seq}). Response expected: ${responseExpected ? 'yes' : 'no'}. Current queue length: ${this.requestQueue.length}`, data); - } - - private traceResponse(response: Proto.Response, startTime: number): void { - if (this.trace === Trace.Off) { - return; - } - let data: string | undefined = undefined; - if (this.trace === Trace.Verbose && response.body) { - data = `Result: ${JSON.stringify(response.body, null, 4)}`; - } - this.logTrace(`Response received: ${response.command} (${response.request_seq}). Request took ${Date.now() - startTime} ms. Success: ${response.success} ${!response.success ? '. Message: ' + response.message : ''}`, data); - } - - private traceEvent(event: Proto.Event): void { - if (this.trace === Trace.Off) { - return; - } - let data: string | undefined = undefined; - if (this.trace === Trace.Verbose && event.body) { - data = `Data: ${JSON.stringify(event.body, null, 4)}`; - } - this.logTrace(`Event received: ${event.event} (${event.seq}).`, data); - } } \ No newline at end of file diff --git a/extensions/typescript/src/utils/tracer.ts b/extensions/typescript/src/utils/tracer.ts new file mode 100644 index 0000000000000..078d2e6f45a53 --- /dev/null +++ b/extensions/typescript/src/utils/tracer.ts @@ -0,0 +1,95 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { workspace } from 'vscode'; + +import * as Proto from '../protocol'; +import Logger from './logger'; + + +enum Trace { + Off, + Messages, + Verbose +} + +namespace Trace { + export function fromString(value: string): Trace { + value = value.toLowerCase(); + switch (value) { + case 'off': + return Trace.Off; + case 'messages': + return Trace.Messages; + case 'verbose': + return Trace.Verbose; + default: + return Trace.Off; + } + } +} + +export default class Tracer { + private trace: Trace; + + constructor( + private readonly logger: Logger + ) { + this.updateConfiguration(); + } + + public updateConfiguration() { + this.trace = Tracer.readTrace(); + } + + private static readTrace(): Trace { + let result: Trace = Trace.fromString(workspace.getConfiguration().get('typescript.tsserver.trace', 'off')); + if (result === Trace.Off && !!process.env.TSS_TRACE) { + result = Trace.Messages; + } + return result; + } + + public traceRequest(request: Proto.Request, responseExpected: boolean, queueLength: number): void { + if (this.trace === Trace.Off) { + return; + } + let data: string | undefined = undefined; + if (this.trace === Trace.Verbose && request.arguments) { + data = `Arguments: ${JSON.stringify(request.arguments, null, 4)}`; + } + this.logTrace(`Sending request: ${request.command} (${request.seq}). Response expected: ${responseExpected ? 'yes' : 'no'}. Current queue length: ${queueLength}`, data); + } + + public traceResponse(response: Proto.Response, startTime: number): void { + if (this.trace === Trace.Off) { + return; + } + let data: string | undefined = undefined; + if (this.trace === Trace.Verbose && response.body) { + data = `Result: ${JSON.stringify(response.body, null, 4)}`; + } + this.logTrace(`Response received: ${response.command} (${response.request_seq}). Request took ${Date.now() - startTime} ms. Success: ${response.success} ${!response.success ? '. Message: ' + response.message : ''}`, data); + } + + public traceEvent(event: Proto.Event): void { + if (this.trace === Trace.Off) { + return; + } + let data: string | undefined = undefined; + if (this.trace === Trace.Verbose && event.body) { + data = `Data: ${JSON.stringify(event.body, null, 4)}`; + } + this.logTrace(`Event received: ${event.event} (${event.seq}).`, data); + } + + public logTrace(message: string, data?: any): void { + if (this.trace !== Trace.Off) { + this.logger.logLevel('Trace', message, data); + } + } +} \ No newline at end of file From 09c97bca0f91ff93dcc2b13f67d9586ed861a9e8 Mon Sep 17 00:00:00 2001 From: Kaide Mu Date: Fri, 19 May 2017 07:06:27 +0200 Subject: [PATCH 0748/2747] Markdown: Capture right parenthesis as part of url (#26449) * Capture right parenthesis as part of url * Update markdown link pattern * Fix link highlighting when there is nested img and link href --- extensions/markdown/src/documentLinkProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/markdown/src/documentLinkProvider.ts b/extensions/markdown/src/documentLinkProvider.ts index 2b2bde5d53594..4cf4055c940e7 100644 --- a/extensions/markdown/src/documentLinkProvider.ts +++ b/extensions/markdown/src/documentLinkProvider.ts @@ -10,7 +10,7 @@ import * as path from 'path'; export default class MarkdownDocumentLinkProvider implements vscode.DocumentLinkProvider { - private _linkPattern = /(\[[^\]]*\]\(\s*?)([^\s\)]+?)(\s+[^\)]+)?\)/g; + private _linkPattern = /(\[[^\]]*\]\(\s*?)(((((?=.*\)\)+)|(?=.*\)\]+))[^\s\)]+?)|([^\s]+)))\)/g; constructor() { } From 61205ceca3f9b5993f9fde3b73695d6be9ad23e9 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 19 May 2017 09:56:32 +0200 Subject: [PATCH 0749/2747] fix typo --- src/vs/workbench/parts/debug/node/debugAdapter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/node/debugAdapter.ts b/src/vs/workbench/parts/debug/node/debugAdapter.ts index 973340ea1d995..4deae35b1b0c3 100644 --- a/src/vs/workbench/parts/debug/node/debugAdapter.ts +++ b/src/vs/workbench/parts/debug/node/debugAdapter.ts @@ -183,7 +183,7 @@ export class Adapter { enum: [this.type], description: nls.localize('debugType', "Type of configuration."), pattern: '^(?!node2)', - errorMessage: nls.localize('debugTypeNotRecognised', "The debug type is not recoginzed. Make sure that you have a corresponding debug extension installed and that it is enabled."), + errorMessage: nls.localize('debugTypeNotRecognised', "The debug type is not recognized. Make sure that you have a corresponding debug extension installed and that it is enabled."), patternErrorMessage: nls.localize('node2NotSupported', "\"node2\" is no longer supported, use \"node\" instead and set the \"protocol\" attribute to \"inspector\".") }; properties['name'] = { From ec76a9fc5146b822cdb14b982ac3e5b470dd646a Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 19 May 2017 10:00:18 +0200 Subject: [PATCH 0750/2747] fix #26914 --- src/vs/editor/contrib/snippet/browser/snippetController2.ts | 2 +- src/vs/editor/contrib/snippet/browser/snippetSession.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 1b31742753b4e..748e4d190cbd7 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -87,7 +87,7 @@ export class SnippetController2 { if (!this._snippet.hasPlaceholder) { // don't listen for selection changes and don't // update context keys when the snippet is plain text - return; + return this.cancel(); } if (this._snippet.isAtFinalPlaceholder || !this._snippet.isSelectionWithPlaceholders()) { diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index 2b2c9ca44f26c..d9691b82918a5 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -297,8 +297,8 @@ export class SnippetSession { ); const model = this._editor.getModel(); const selections = this._editor.getSelections(); - const newSelections = model.pushEditOperations(selections, edits, () => { - return this._move(true); + const newSelections = model.pushEditOperations(selections, edits, undoEdits => { + return undoEdits.map(edit => Selection.fromPositions(edit.range.getEndPosition())); }); this._editor.setSelections(newSelections); } From 7b6b4d0886b4012ea238bacadd2369b4e07468b7 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 19 May 2017 10:49:24 +0200 Subject: [PATCH 0751/2747] filterText must match when it is defined, fixes #26874 --- .../suggest/browser/completionModel.ts | 30 +++++++++++++------ .../test/browser/completionModel.test.ts | 20 +++++++++++++ 2 files changed, 41 insertions(+), 9 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/completionModel.ts b/src/vs/editor/contrib/suggest/browser/completionModel.ts index dd84990104ea5..e3bc875458f09 100644 --- a/src/vs/editor/contrib/suggest/browser/completionModel.ts +++ b/src/vs/editor/contrib/suggest/browser/completionModel.ts @@ -124,20 +124,32 @@ export class CompletionModel { word = wordLen === 0 ? '' : leadingLineContent.slice(-wordLen); } - let match = fuzzyScore(word, suggestion.label); - if (match) { - item.score = match[0]; - item.matches = match[1]; - } else { - if (typeof suggestion.filterText === 'string') { - match = fuzzyScore(word, suggestion.filterText); - } + if (typeof suggestion.filterText === 'string') { + // when there is a `filterText` it must match the `word`. + // if it matches we check with the label to compute highlights + // and if that doesn't yield a result we have no highlights, + // despite having the match + let match = fuzzyScore(word, suggestion.filterText); if (!match) { continue; } item.score = match[0]; - item.matches = []; // don't use the filterText-matches + item.matches = []; + match = fuzzyScore(word, suggestion.label); + if (match) { + item.matches = match[1]; + } + } else { + // by default match `word` against the `label` + let match = fuzzyScore(word, suggestion.label); + if (match) { + item.score = match[0]; + item.matches = match[1]; + } else { + continue; + } } + item.idx = i; this._filteredItems.push(item); diff --git a/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts b/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts index c5f80a483cb66..ba122d64d51b9 100644 --- a/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts +++ b/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts @@ -181,4 +181,24 @@ suite('CompletionModel', function () { assert.equal(b.suggestion.label, 'Semver'); assert.ok(a.score > b.score); // snippet really demoted }); + + test('filterText seems ignored in autocompletion, #26874', function () { + + const item1 = createSuggestItem('Map - java.util', 1, 'property'); + item1.suggestion.filterText = 'Map'; + const item2 = createSuggestItem('Map - java.util', 1, 'property'); + + model = new CompletionModel([item1, item2], 1, { + leadingLineContent: 'M', + characterCountDelta: 0 + }); + + assert.equal(model.items.length, 2); + + model.lineContext = { + leadingLineContent: 'Map ', + characterCountDelta: 3 + }; + assert.equal(model.items.length, 1); + }); }); From f15ff4e6eedb32bad226084e9bf2f5078c136b95 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 19 May 2017 10:58:04 +0200 Subject: [PATCH 0752/2747] update hockeyapp for win64 --- package.json | 2 +- src/vs/platform/node/product.ts | 3 ++- src/vs/workbench/electron-browser/shell.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f94b92357aecd..fa2e5bddfa5b2 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev", "version": "1.13.0", "electronVersion": "1.6.6", - "distro": "1dc6b8ea29727a80a9cf0a8832e6d1c16623fe40", + "distro": "a1870d5e65d959a5ee8a4c7fce08b136ca47dd79", "author": { "name": "Microsoft Corporation" }, diff --git a/src/vs/platform/node/product.ts b/src/vs/platform/node/product.ts index f92b896b62d6c..ece6de31f9b64 100644 --- a/src/vs/platform/node/product.ts +++ b/src/vs/platform/node/product.ts @@ -56,7 +56,8 @@ export interface IProductConfiguration { checksums: { [path: string]: string; }; checksumFailMoreInfoUrl: string; hockeyApp: { - 'win32': string; + 'win32-ia32': string; + 'win32-x64': string; 'linux-ia32': string; 'linux-x64': string; 'darwin': string; diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 1f25faacf4303..bec5d37606b9e 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -174,7 +174,7 @@ export class WorkbenchShell { let submitURL: string; if (platform.isWindows) { - submitURL = product.hockeyApp.win32; + submitURL = product.hockeyApp[`win32-${process.arch}`]; } else if (platform.isMacintosh) { submitURL = product.hockeyApp.darwin; } else if (platform.isLinux) { From 05fa3b90ffc4b2df71fd159febf65a06e78abf3c Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 19 May 2017 11:03:57 +0200 Subject: [PATCH 0753/2747] remove unit test launch configuration --- .vscode/launch.json | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 45c4da7183956..d56ca22e59dda 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,34 +1,6 @@ { "version": "0.1.0", "configurations": [ - { - "type": "node", - "request": "launch", - "name": "Unit Tests", - "protocol": "legacy", - "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", - "runtimeExecutable": "${workspaceRoot}/.build/electron/Code - OSS.app/Contents/MacOS/Electron", - "windows": { - "runtimeExecutable": "${workspaceRoot}/.build/electron/Code - OSS.exe" - }, - "linux": { - "runtimeExecutable": "${workspaceRoot}/.build/electron/code-oss" - }, - "stopOnEntry": false, - "args": [ - "--timeout", - "2000" - ], - "cwd": "${workspaceRoot}", - "env": { - "ELECTRON_RUN_AS_NODE": "true" - }, - "sourceMaps": true, - "outFiles": [ - "${workspaceRoot}/out/**/*.js" - ], - "preLaunchTask": "electron" - }, { "type": "node", "request": "launch", From 8431be77399c24b0dbb7e5fc67bdeb703807f029 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 19 May 2017 12:07:43 +0200 Subject: [PATCH 0754/2747] Theme: Sidebar default color foreground (fixes #26720) --- .../browser/parts/quickopen/quickOpenController.ts | 6 +++--- src/vs/workbench/browser/parts/sidebar/sidebarPart.ts | 3 ++- src/vs/workbench/common/theme.ts | 6 ++++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index 7e7aa6fed45d3..e86aa2e27e3fa 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -49,7 +49,7 @@ import { IContextKeyService, RawContextKey, IContextKey } from 'vs/platform/cont import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { IListService } from 'vs/platform/list/browser/listService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; +import { SIDE_BAR_BACKGROUND, SIDE_BAR_FOREGROUND } from 'vs/workbench/common/theme'; import { attachQuickOpenStyler } from 'vs/platform/theme/common/styler'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -291,7 +291,7 @@ export class QuickOpenController extends Component implements IQuickOpenService }, this.telemetryService ); - this.toUnbind.push(attachQuickOpenStyler(this.pickOpenWidget, this.themeService, { background: SIDE_BAR_BACKGROUND })); + this.toUnbind.push(attachQuickOpenStyler(this.pickOpenWidget, this.themeService, { background: SIDE_BAR_BACKGROUND, foreground: SIDE_BAR_FOREGROUND })); const pickOpenContainer = this.pickOpenWidget.create(); this.toUnbind.push(this.listService.register(this.pickOpenWidget.getTree())); @@ -553,7 +553,7 @@ export class QuickOpenController extends Component implements IQuickOpenService }, this.telemetryService ); - this.toUnbind.push(attachQuickOpenStyler(this.quickOpenWidget, this.themeService, { background: SIDE_BAR_BACKGROUND })); + this.toUnbind.push(attachQuickOpenStyler(this.quickOpenWidget, this.themeService, { background: SIDE_BAR_BACKGROUND, foreground: SIDE_BAR_FOREGROUND })); const quickOpenContainer = this.quickOpenWidget.create(); this.toUnbind.push(this.listService.register(this.quickOpenWidget.getTree())); diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index 7c0e4827a2d29..f9087b6c6ced4 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -26,7 +26,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import Event from 'vs/base/common/event'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { contrastBorder } from 'vs/platform/theme/common/colorRegistry'; -import { SIDE_BAR_TITLE_FOREGROUND, SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; +import { SIDE_BAR_TITLE_FOREGROUND, SIDE_BAR_BACKGROUND, SIDE_BAR_FOREGROUND } from 'vs/workbench/common/theme'; export class SidebarPart extends CompositePart { @@ -82,6 +82,7 @@ export class SidebarPart extends CompositePart { const container = this.getContainer(); container.style('background-color', this.getColor(SIDE_BAR_BACKGROUND)); + container.style('color', this.getColor(SIDE_BAR_FOREGROUND)); const contrastBorderColor = this.getColor(contrastBorder); const isPositionLeft = this.partService.getSideBarPosition() === SideBarPosition.LEFT; diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 9a4426de311bd..6600353536c78 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -198,6 +198,12 @@ export const SIDE_BAR_BACKGROUND = registerColor('sideBar.background', { hc: '#000000' }, nls.localize('sideBarBackground', "Side bar background color. The side bar is the container for views like explorer and search.")); +export const SIDE_BAR_FOREGROUND = registerColor('sideBar.foreground', { + dark: null, + light: null, + hc: null +}, nls.localize('sideBarForeground', "Side bar foreground color. The side bar is the container for views like explorer and search.")); + export const SIDE_BAR_TITLE_FOREGROUND = registerColor('sideBarTitle.foreground', { dark: '#BBBBBB', light: '#6f6f6f', From 3623fee7d7b20204e13058f4b6f8773ec7f281bf Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 19 May 2017 12:09:04 +0200 Subject: [PATCH 0755/2747] next try to fix #26524 --- src/vs/workbench/api/node/extHostLanguageFeatures.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/api/node/extHostLanguageFeatures.ts b/src/vs/workbench/api/node/extHostLanguageFeatures.ts index 38c1be8627e25..2bf60e23f7ae4 100644 --- a/src/vs/workbench/api/node/extHostLanguageFeatures.ts +++ b/src/vs/workbench/api/node/extHostLanguageFeatures.ts @@ -554,7 +554,7 @@ class SuggestAdapter { } private _convertCompletionItem(item: vscode.CompletionItem, position: vscode.Position, defaultRange: vscode.Range): modes.ISuggestion { - if (!item.label) { + if (typeof item.label !== 'string' || item.label.length === 0) { console.warn('INVALID text edit -> must have at least a label'); return undefined; } From ea05102c9ec0fdcb0a6374476c1d5143eb17a1ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Moreno?= Date: Fri, 19 May 2017 12:10:30 +0200 Subject: [PATCH 0756/2747] fixes #26602 --- .../node/extensionManagementService.ts | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/src/vs/platform/extensionManagement/node/extensionManagementService.ts b/src/vs/platform/extensionManagement/node/extensionManagementService.ts index 9f6240ab3b65c..43b0fb1ed0c08 100644 --- a/src/vs/platform/extensionManagement/node/extensionManagementService.ts +++ b/src/vs/platform/extensionManagement/node/extensionManagementService.ts @@ -268,26 +268,28 @@ export class ExtensionManagementService implements IExtensionManagementService { private installExtension(zipPath: string, id: string, metadata: IGalleryMetadata = null): TPromise { const extensionPath = path.join(this.extensionsPath, id); - return extract(zipPath, extensionPath, { sourcePath: 'extension', overwrite: true }) - .then(() => readManifest(extensionPath)) - .then(({ manifest }) => { - return pfs.readdir(extensionPath).then(children => { - const readme = children.filter(child => /^readme(\.txt|\.md|)$/i.test(child))[0]; - const readmeUrl = readme ? URI.file(path.join(extensionPath, readme)).toString() : null; - const changelog = children.filter(child => /^changelog(\.txt|\.md|)$/i.test(child))[0]; - const changelogUrl = changelog ? URI.file(path.join(extensionPath, changelog)).toString() : null; - const type = LocalExtensionType.User; - - const local: ILocalExtension = { type, id, manifest, metadata, path: extensionPath, readmeUrl, changelogUrl }; - const manifestPath = path.join(extensionPath, 'package.json'); - - return pfs.readFile(manifestPath, 'utf8') - .then(raw => parseManifest(raw)) - .then(({ manifest }) => assign(manifest, { __metadata: metadata })) - .then(manifest => pfs.writeFile(manifestPath, JSON.stringify(manifest, null, '\t'))) - .then(() => local); + return pfs.rimraf(extensionPath).then(() => { + return extract(zipPath, extensionPath, { sourcePath: 'extension', overwrite: true }) + .then(() => readManifest(extensionPath)) + .then(({ manifest }) => { + return pfs.readdir(extensionPath).then(children => { + const readme = children.filter(child => /^readme(\.txt|\.md|)$/i.test(child))[0]; + const readmeUrl = readme ? URI.file(path.join(extensionPath, readme)).toString() : null; + const changelog = children.filter(child => /^changelog(\.txt|\.md|)$/i.test(child))[0]; + const changelogUrl = changelog ? URI.file(path.join(extensionPath, changelog)).toString() : null; + const type = LocalExtensionType.User; + + const local: ILocalExtension = { type, id, manifest, metadata, path: extensionPath, readmeUrl, changelogUrl }; + const manifestPath = path.join(extensionPath, 'package.json'); + + return pfs.readFile(manifestPath, 'utf8') + .then(raw => parseManifest(raw)) + .then(({ manifest }) => assign(manifest, { __metadata: metadata })) + .then(manifest => pfs.writeFile(manifestPath, JSON.stringify(manifest, null, '\t'))) + .then(() => local); + }); }); - }); + }); } uninstall(extension: ILocalExtension, force = false): TPromise { From 52212f2a2e44bb13c08de50bc50dcd7295644122 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 19 May 2017 12:21:36 +0200 Subject: [PATCH 0757/2747] :lipstick: --- extensions/theme-defaults/themes/dark_defaults.json | 7 ++++--- extensions/theme-defaults/themes/hc_black_defaults.json | 3 ++- extensions/theme-defaults/themes/light_defaults.json | 9 +++++---- src/vs/workbench/common/theme.ts | 6 +++--- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/extensions/theme-defaults/themes/dark_defaults.json b/extensions/theme-defaults/themes/dark_defaults.json index bb319ce567533..e15677c62c867 100644 --- a/extensions/theme-defaults/themes/dark_defaults.json +++ b/extensions/theme-defaults/themes/dark_defaults.json @@ -2,12 +2,13 @@ "$schema": "vscode://schemas/color-theme", "name": "Dark Default Colors", "colors": { - "editor.background": "#1e1e1e", + "editor.background": "#1E1E1E", "editor.foreground": "#D4D4D4", "editor.inactiveSelectionBackground": "#3A3D41", "editorIndentGuide.background": "#404040", - "editor.selectionHighlightBackground": "#add6ff26", + "editor.selectionHighlightBackground": "#ADD6FF26", "list.dropBackground": "#383B3D", - "activityBarBadge.background": "#007ACC" + "activityBarBadge.background": "#007ACC", + "sideBarTitle.foreground": "#BBBBBB" } } \ No newline at end of file diff --git a/extensions/theme-defaults/themes/hc_black_defaults.json b/extensions/theme-defaults/themes/hc_black_defaults.json index 6537cac26f25c..e1326f20ea27c 100644 --- a/extensions/theme-defaults/themes/hc_black_defaults.json +++ b/extensions/theme-defaults/themes/hc_black_defaults.json @@ -4,7 +4,8 @@ "colors": { "editor.background": "#000000", "editor.foreground": "#FFFFFF", - "editorIndentGuide.background": "#FFFFFF" + "editorIndentGuide.background": "#FFFFFF", + "sideBarTitle.foreground": "#FFFFFF" }, "settings": [ { diff --git a/extensions/theme-defaults/themes/light_defaults.json b/extensions/theme-defaults/themes/light_defaults.json index fb7571ba81a0a..ad85f382140c4 100644 --- a/extensions/theme-defaults/themes/light_defaults.json +++ b/extensions/theme-defaults/themes/light_defaults.json @@ -2,12 +2,13 @@ "$schema": "vscode://schemas/color-theme", "name": "Light Default Colors", "colors": { - "editor.background": "#ffffff", + "editor.background": "#FFFFFF", "editor.foreground": "#000000", "editor.inactiveSelectionBackground": "#E5EBF1", - "editorIndentGuide.background": "#d3d3d3", - "editor.selectionHighlightBackground": "#add6ff4d", + "editorIndentGuide.background": "#D3D3D3", + "editor.selectionHighlightBackground": "#ADD6FF4D", "editorSuggestWidget.background": "#F3F3F3", - "activityBarBadge.background": "#007ACC" + "activityBarBadge.background": "#007ACC", + "sideBarTitle.foreground": "#6F6F6F" } } \ No newline at end of file diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 6600353536c78..3ea47c3df774d 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -205,9 +205,9 @@ export const SIDE_BAR_FOREGROUND = registerColor('sideBar.foreground', { }, nls.localize('sideBarForeground', "Side bar foreground color. The side bar is the container for views like explorer and search.")); export const SIDE_BAR_TITLE_FOREGROUND = registerColor('sideBarTitle.foreground', { - dark: '#BBBBBB', - light: '#6f6f6f', - hc: '#FFFFFF' + dark: SIDE_BAR_FOREGROUND, + light: SIDE_BAR_FOREGROUND, + hc: SIDE_BAR_FOREGROUND }, nls.localize('sideBarTitleForeground', "Side bar title foreground color. The side bar is the container for views like explorer and search.")); export const SIDE_BAR_SECTION_HEADER_BACKGROUND = registerColor('sideBarSectionHeader.background', { From 5ec18ba9a43496b061ee3368f111c8859254b646 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 19 May 2017 12:28:08 +0200 Subject: [PATCH 0758/2747] remove extra console.log --- .../services/lifecycle/electron-browser/lifecycleService.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/workbench/services/lifecycle/electron-browser/lifecycleService.ts b/src/vs/workbench/services/lifecycle/electron-browser/lifecycleService.ts index e3c3f8e63ea74..3cf631de01a3d 100644 --- a/src/vs/workbench/services/lifecycle/electron-browser/lifecycleService.ts +++ b/src/vs/workbench/services/lifecycle/electron-browser/lifecycleService.ts @@ -42,7 +42,6 @@ export class LifecycleService implements ILifecycleService { } else { this._startupKind = StartupKind.NewWindow; } - console.log(this.startupKind); } public get startupKind(): StartupKind { From 25e2eb9300ab2c67da84bd3592260fdaf6d136af Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 19 May 2017 12:30:49 +0200 Subject: [PATCH 0759/2747] simplify snippet session --- .../snippet/browser/snippetController2.ts | 4 +- .../contrib/snippet/browser/snippetSession.ts | 12 +-- .../test/browser/snippetSession.test.ts | 80 +++++++++---------- 3 files changed, 45 insertions(+), 51 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 748e4d190cbd7..8c5db726afa43 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -62,8 +62,8 @@ export class SnippetController2 { } if (!this._snippet) { // insert with new session - this._snippet = new SnippetSession(this._editor, template, overwriteBefore, overwriteAfter); - this._snippet.insert(); + this._snippet = new SnippetSession(this._editor); + this._snippet.insert(template, overwriteBefore, overwriteAfter); this._snippetListener = [ this._editor.onDidChangeModel(() => this.cancel()), this._editor.onDidChangeCursorSelection(() => this._updateState()) diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index d9691b82918a5..59822d1356380 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -253,16 +253,10 @@ export class SnippetSession { } private readonly _editor: ICommonCodeEditor; - private readonly _template: string; - private readonly _overwriteBefore: number; - private readonly _overwriteAfter: number; private _snippets: OneSnippet[]; - constructor(editor: ICommonCodeEditor, template: string, overwriteBefore: number = 0, overwriteAfter: number = 0) { + constructor(editor: ICommonCodeEditor) { this._editor = editor; - this._template = template; - this._overwriteBefore = overwriteBefore; - this._overwriteAfter = overwriteAfter; this._snippets = []; } @@ -270,11 +264,11 @@ export class SnippetSession { dispose(this._snippets); } - insert(): void { + insert(template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): void { const model = this._editor.getModel(); const { edits, snippets } = SnippetSession.makeInsertEditsAndSnippets( - this._editor, this._template, this._overwriteBefore, this._overwriteAfter + this._editor, template, overwriteBefore, overwriteAfter ); // keep snippets around diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts index 0fc20720ba7fb..e3b79fe0fa0dc 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts @@ -67,8 +67,8 @@ suite('SnippetSession', function () { }); test('text edits & selection', function () { - const session = new SnippetSession(editor, 'foo${1:bar}foo$0'); - session.insert(); + const session = new SnippetSession(editor); + session.insert('foo${1:bar}foo$0'); assert.equal(editor.getModel().getValue(), 'foobarfoofunction foo() {\n foobarfooconsole.log(a);\n}'); assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); @@ -78,17 +78,17 @@ suite('SnippetSession', function () { test('text edit with reversed selection', function () { - const session = new SnippetSession(editor, '${1:bar}$0'); + const session = new SnippetSession(editor); editor.setSelections([new Selection(2, 5, 2, 5), new Selection(1, 1, 1, 1)]); - session.insert(); + session.insert('${1:bar}$0'); assert.equal(model.getValue(), 'barfunction foo() {\n barconsole.log(a);\n}'); assertSelections(editor, new Selection(2, 5, 2, 8), new Selection(1, 1, 1, 4)); }); test('snippets, repeated tabstops', function () { - const session = new SnippetSession(editor, '${1:abc}foo${1:abc}$0'); - session.insert(); + const session = new SnippetSession(editor); + session.insert('${1:abc}foo${1:abc}$0'); assertSelections(editor, new Selection(1, 1, 1, 4), new Selection(1, 7, 1, 10), new Selection(2, 5, 2, 8), new Selection(2, 11, 2, 14), @@ -101,16 +101,16 @@ suite('SnippetSession', function () { }); test('snippets, just text', function () { - const session = new SnippetSession(editor, 'foobar'); - session.insert(); + const session = new SnippetSession(editor); + session.insert('foobar'); assert.equal(model.getValue(), 'foobarfunction foo() {\n foobarconsole.log(a);\n}'); assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); }); test('snippets, selections and new text with newlines', () => { - const session = new SnippetSession(editor, 'foo\n\t${1:bar}\n$0'); - session.insert(); + const session = new SnippetSession(editor); + session.insert('foo\n\t${1:bar}\n$0'); assert.equal(editor.getModel().getValue(), 'foo\n bar\nfunction foo() {\n foo\n bar\n console.log(a);\n}'); @@ -122,8 +122,8 @@ suite('SnippetSession', function () { test('snippets, selections -> next/prev', () => { - const session = new SnippetSession(editor, 'f$1oo${2:bar}foo$0'); - session.insert(); + const session = new SnippetSession(editor); + session.insert('f$1oo${2:bar}foo$0'); // @ $2 assertSelections(editor, new Selection(1, 2, 1, 2), new Selection(2, 6, 2, 6)); @@ -142,8 +142,8 @@ suite('SnippetSession', function () { }); test('snippets, selections & typing', function () { - const session = new SnippetSession(editor, 'f${1:oo}_$2_$0'); - session.insert(); + const session = new SnippetSession(editor); + session.insert('f${1:oo}_$2_$0'); editor.trigger('test', 'type', { text: 'X' }); session.next(); @@ -167,7 +167,7 @@ suite('SnippetSession', function () { model.setValue('foo_bar_foo'); editor.setSelections([new Selection(1, 1, 1, 4), new Selection(1, 9, 1, 12)]); - new SnippetSession(editor, 'x$0').insert(); + new SnippetSession(editor).insert('x$0'); assert.equal(model.getValue(), 'x_bar_x'); assertSelections(editor, new Selection(1, 2, 1, 2), new Selection(1, 8, 1, 8)); }); @@ -176,7 +176,7 @@ suite('SnippetSession', function () { model.setValue('foo_bar_foo'); editor.setSelections([new Selection(1, 1, 1, 4), new Selection(1, 9, 1, 12)]); - new SnippetSession(editor, 'LONGER$0').insert(); + new SnippetSession(editor).insert('LONGER$0'); assert.equal(model.getValue(), 'LONGER_bar_LONGER'); assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(1, 18, 1, 18)); }); @@ -184,8 +184,8 @@ suite('SnippetSession', function () { test('snippets, don\'t grow final tabstop', function () { model.setValue('foo_zzz_foo'); editor.setSelection(new Selection(1, 5, 1, 8)); - const session = new SnippetSession(editor, '$1bar$0'); - session.insert(); + const session = new SnippetSession(editor); + session.insert('$1bar$0'); assertSelections(editor, new Selection(1, 5, 1, 5)); editor.trigger('test', 'type', { text: 'foo-' }); @@ -204,8 +204,8 @@ suite('SnippetSession', function () { test('snippets, don\'t merge touching tabstops 1/2', function () { - const session = new SnippetSession(editor, '$1$2$3$0'); - session.insert(); + const session = new SnippetSession(editor); + session.insert('$1$2$3$0'); assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); session.next(); @@ -242,8 +242,8 @@ suite('SnippetSession', function () { }); test('snippets, don\'t merge touching tabstops 2/2', function () { - const session = new SnippetSession(editor, '$1$2$3$0'); - session.insert(); + const session = new SnippetSession(editor); + session.insert('$1$2$3$0'); assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); editor.trigger('test', 'type', { text: '111' }); @@ -261,8 +261,8 @@ suite('SnippetSession', function () { }); test('snippets, gracefully move over final tabstop', function () { - const session = new SnippetSession(editor, '${1}bar$0'); - session.insert(); + const session = new SnippetSession(editor); + session.insert('${1}bar$0'); assert.equal(session.isAtFinalPlaceholder, false); assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); @@ -277,8 +277,8 @@ suite('SnippetSession', function () { }); test('snippets, overwriting nested placeholder', function () { - const session = new SnippetSession(editor, 'log(${1:"$2"});$0'); - session.insert(); + const session = new SnippetSession(editor); + session.insert('log(${1:"$2"});$0'); assertSelections(editor, new Selection(1, 5, 1, 7), new Selection(2, 9, 2, 11)); editor.trigger('test', 'type', { text: 'XXX' }); @@ -294,8 +294,8 @@ suite('SnippetSession', function () { }); test('snippets, selections and snippet ranges', function () { - const session = new SnippetSession(editor, '${1:foo}farboo${2:bar}$0'); - session.insert(); + const session = new SnippetSession(editor); + session.insert('${1:foo}farboo${2:bar}$0'); assert.equal(model.getValue(), 'foofarboobarfunction foo() {\n foofarboobarconsole.log(a);\n}'); assertSelections(editor, new Selection(1, 1, 1, 4), new Selection(2, 5, 2, 8)); @@ -330,13 +330,13 @@ suite('SnippetSession', function () { model.setValue(''); editor.setSelection(new Selection(1, 1, 1, 1)); - const first = new SnippetSession(editor, 'foo${2:bar}foo$0'); - first.insert(); + const first = new SnippetSession(editor); + first.insert('foo${2:bar}foo$0'); assert.equal(model.getValue(), 'foobarfoo'); assertSelections(editor, new Selection(1, 4, 1, 7)); - const second = new SnippetSession(editor, 'ba${1:zzzz}$0'); - second.insert(); + const second = new SnippetSession(editor); + second.insert('ba${1:zzzz}$0'); assert.equal(model.getValue(), 'foobazzzzfoo'); assertSelections(editor, new Selection(1, 6, 1, 10)); @@ -351,8 +351,8 @@ suite('SnippetSession', function () { test('snippets, typing at final tabstop', function () { - const session = new SnippetSession(editor, 'farboo$0'); - session.insert(); + const session = new SnippetSession(editor); + session.insert('farboo$0'); assert.equal(session.isAtFinalPlaceholder, true); assert.equal(session.isSelectionWithPlaceholders(), false); @@ -363,8 +363,8 @@ suite('SnippetSession', function () { test('snippets, typing at beginning', function () { editor.setSelection(new Selection(1, 2, 1, 2)); - const session = new SnippetSession(editor, 'farboo$0'); - session.insert(); + const session = new SnippetSession(editor); + session.insert('farboo$0'); editor.setSelection(new Selection(1, 2, 1, 2)); assert.equal(session.isSelectionWithPlaceholders(), false); @@ -381,8 +381,8 @@ suite('SnippetSession', function () { test('snippets, typing with nested placeholder', function () { editor.setSelection(new Selection(1, 1, 1, 1)); - const session = new SnippetSession(editor, 'This ${1:is ${2:nested}}.$0'); - session.insert(); + const session = new SnippetSession(editor); + session.insert('This ${1:is ${2:nested}}.$0'); assertSelections(editor, new Selection(1, 6, 1, 15)); session.next(); @@ -397,8 +397,8 @@ suite('SnippetSession', function () { }); test('snippets, snippet with variables', function () { - const session = new SnippetSession(editor, '@line=$TM_LINE_NUMBER$0'); - session.insert(); + const session = new SnippetSession(editor); + session.insert('@line=$TM_LINE_NUMBER$0'); assert.equal(model.getValue(), '@line=1function foo() {\n @line=2console.log(a);\n}'); assertSelections(editor, new Selection(1, 8, 1, 8), new Selection(2, 12, 2, 12)); From c50a70142bde3bc1637b70bedd31652a9bcf5052 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 19 May 2017 12:42:15 +0200 Subject: [PATCH 0760/2747] have only one insert-call, towards nested snippets... --- .../snippet/browser/snippetController2.ts | 15 +++++------- .../contrib/snippet/browser/snippetSession.ts | 23 ++++++------------- .../test/browser/snippetController2.test.ts | 15 +++++++++++- .../test/browser/snippetSession.test.ts | 14 +++++++++++ 4 files changed, 41 insertions(+), 26 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 8c5db726afa43..6f156fffe2de8 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -61,17 +61,14 @@ export class SnippetController2 { this._editor.getModel().pushStackElement(); } if (!this._snippet) { - // insert with new session + // create a new session this._snippet = new SnippetSession(this._editor); - this._snippet.insert(template, overwriteBefore, overwriteAfter); - this._snippetListener = [ - this._editor.onDidChangeModel(() => this.cancel()), - this._editor.onDidChangeCursorSelection(() => this._updateState()) - ]; - } else { - // insert nested - this._snippet.insertNested(template, overwriteBefore, overwriteAfter); } + this._snippet.insert(template, overwriteBefore, overwriteAfter); + this._snippetListener = [ + this._editor.onDidChangeModel(() => this.cancel()), + this._editor.onDidChangeCursorSelection(() => this._updateState()) + ]; if (undoStopAfter) { this._editor.getModel().pushStackElement(); } diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index 59822d1356380..1496dda543dc5 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -257,7 +257,6 @@ export class SnippetSession { constructor(editor: ICommonCodeEditor) { this._editor = editor; - this._snippets = []; } dispose(): void { @@ -271,12 +270,16 @@ export class SnippetSession { this._editor, template, overwriteBefore, overwriteAfter ); - // keep snippets around - this._snippets = snippets; + let isNestedInsert = true; + if (!this._snippets) { + // keep snippets around + this._snippets = snippets; + isNestedInsert = false; + } // make insert edit and start with first selections const newSelections = model.pushEditOperations(this._editor.getSelections(), edits, undoEdits => { - if (this._snippets[0].hasPlaceholder) { + if (!isNestedInsert && this._snippets[0].hasPlaceholder) { return this._move(true); } else { return undoEdits.map(edit => Selection.fromPositions(edit.range.getEndPosition())); @@ -285,18 +288,6 @@ export class SnippetSession { this._editor.setSelections(newSelections); } - insertNested(template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): void { - const { edits } = SnippetSession.makeInsertEditsAndSnippets( - this._editor, template, overwriteBefore, overwriteAfter - ); - const model = this._editor.getModel(); - const selections = this._editor.getSelections(); - const newSelections = model.pushEditOperations(selections, edits, undoEdits => { - return undoEdits.map(edit => Selection.fromPositions(edit.range.getEndPosition())); - }); - this._editor.setSelections(newSelections); - } - next(): void { const newSelections = this._move(true); this._editor.setSelections(newSelections); diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts index 7c9657a1ef657..04a866727d3df 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts @@ -124,7 +124,6 @@ suite('SnippetController2', function () { assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); }); - test('insert, delete snippet text', function () { const ctrl = new SnippetController2(editor, contextKeys); @@ -148,4 +147,18 @@ suite('SnippetController2', function () { // editor.trigger('test', 'type', { text: 'abc' }); // assertContextKeys(contextKeys, false, false, false); }); + + test('insert, insert nested', function () { + const ctrl = new SnippetController2(editor, contextKeys); + ctrl.insert('${1:foobar}$0'); + assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 1, 1, 7), new Selection(2, 5, 2, 11)); + + ctrl.insert('farboo'); + assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + + ctrl.next(); + assertContextKeys(contextKeys, false, false, false); + }); }); diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts index e3b79fe0fa0dc..5eb6c7cba9357 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts @@ -404,5 +404,19 @@ suite('SnippetSession', function () { assertSelections(editor, new Selection(1, 8, 1, 8), new Selection(2, 12, 2, 12)); }); + test('snippet, insert-nested', function () { + const session = new SnippetSession(editor); + session.insert('foo$1foo$0'); + + assertSelections(editor, new Selection(1, 4, 1, 4), new Selection(2, 8, 2, 8)); + session.insert('bar'); + assert.ok(session.isSelectionWithPlaceholders()); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + + session.next(); + assertSelections(editor, new Selection(1, 10, 1, 10), new Selection(2, 14, 2, 14)); + assert.ok(session.isAtFinalPlaceholder); + }); + }); From c3c248fead06503ab3aa53b320f130e53f4b42ea Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 19 May 2017 14:54:29 +0200 Subject: [PATCH 0761/2747] log telemetry event how many extensions have been discovered --- .../api/electron-browser/mainThreadExtensionService.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts b/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts index f5ba6b3cf3aeb..949657cb266af 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts @@ -19,6 +19,7 @@ import { ExtensionScanner, MessagesCollector } from 'vs/workbench/node/extension import { IMessageService } from 'vs/platform/message/common/message'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { ExtHostContext, ExtHostExtensionServiceShape } from '../node/extHost.protocol'; +import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; const SystemExtensionsRoot = path.normalize(path.join(URI.parse(require.toUrl('')).fsPath, '..', 'extensions')); @@ -62,8 +63,9 @@ export class MainProcessExtensionService extends AbstractExtensionService { + + telemetryService.publicLog('extensionsScanned', { + totalCount: extensionDescriptions.length, + disabledCount: disabledExtensions.length + }); + this._onExtensionDescriptions(disabledExtensions.length ? extensionDescriptions.filter(e => disabledExtensions.every(id => !areSameExtensions({ id }, e))) : extensionDescriptions); }); } From e1bb941c1793bafc51103eb38d2a904a77b5760e Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Fri, 19 May 2017 15:31:56 +0200 Subject: [PATCH 0762/2747] Removed handling multiple '--user-data-dir' as no need for Spectron any more #25291. --- src/main.js | 9 +-------- src/vs/platform/environment/node/argv.ts | 11 +---------- .../environment/test/node/environmentService.test.ts | 7 ------- 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/src/main.js b/src/main.js index 67d76f57004cf..9576d766aafc6 100644 --- a/src/main.js +++ b/src/main.js @@ -175,15 +175,8 @@ function mkdir(dir) { }); } -// Because Spectron doesn't allow us to pass a custom user-data-dir, -// Code receives two of them. Let's just take the first one. -var userDataDir = args['user-data-dir']; -if (userDataDir) { - userDataDir = typeof userDataDir === 'string' ? userDataDir : userDataDir[0]; -} - // Set userData path before app 'ready' event and call to process.chdir -var userData = path.resolve(userDataDir || paths.getDefaultUserDataPath(process.platform)); +var userData = path.resolve(args['user-data-dir'] || paths.getDefaultUserDataPath(process.platform)); app.setPath('userData', userData); // Update cwd based on environment and platform diff --git a/src/vs/platform/environment/node/argv.ts b/src/vs/platform/environment/node/argv.ts index 52b2183bb92f2..b022eb3ce6b1e 100644 --- a/src/vs/platform/environment/node/argv.ts +++ b/src/vs/platform/environment/node/argv.ts @@ -105,16 +105,7 @@ export function parseCLIProcessArgv(processArgv: string[]): ParsedArgs { * Use this to parse code arguments such as `--verbose --wait` */ export function parseArgs(args: string[]): ParsedArgs { - const result = minimist(args, options) as ParsedArgs; - - // Because Spectron doesn't allow us to pass a custom user-data-dir, - // Code receives two of them. Let's just take the first one. - const userDataDir: string | string[] = result['user-data-dir']; - if (userDataDir) { - result['user-data-dir'] = typeof userDataDir === 'string' ? userDataDir : userDataDir[0]; - } - - return result; + return minimist(args, options) as ParsedArgs; } export const optionsHelp: { [name: string]: string; } = { diff --git a/src/vs/platform/environment/test/node/environmentService.test.ts b/src/vs/platform/environment/test/node/environmentService.test.ts index 44617be5a87a3..1f3b16ab9443d 100644 --- a/src/vs/platform/environment/test/node/environmentService.test.ts +++ b/src/vs/platform/environment/test/node/environmentService.test.ts @@ -41,11 +41,4 @@ suite('EnvironmentService', () => { assert.equal(parse(['--user-data-dir', './dir'], { cwd: () => '/foo', env: { 'VSCODE_CWD': '/bar' } }), path.resolve('/bar/dir'), 'should use VSCODE_CWD as the cwd when --user-data-dir is specified'); }); - - test('userDataPath should always take the first one', () => { - const parse = (a, b: { cwd: () => string, env: { [key: string]: string } }) => parseUserDataDir(parseArgs(a), b); - - assert.equal(parse(['--user-data-dir', './dir1', '--user-data-dir', './dir2'], { cwd: () => '/foo', env: {} }), path.resolve('/foo/dir1'), - 'should pick first --user-data-dir (dir1)'); - }); }); \ No newline at end of file From fbe3177bed272ca853c8ba10a9e400a37c561a5e Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 19 May 2017 15:08:15 +0200 Subject: [PATCH 0763/2747] get tick by name --- src/vs/base/node/startupTimers.d.ts | 4 +++- src/vs/base/node/startupTimers.js | 13 ++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/vs/base/node/startupTimers.d.ts b/src/vs/base/node/startupTimers.d.ts index bcc276e506de6..c91175b02629c 100644 --- a/src/vs/base/node/startupTimers.d.ts +++ b/src/vs/base/node/startupTimers.d.ts @@ -30,7 +30,9 @@ export function startTimer(name: string, started?: number): TickController; export function stopTimer(name: string, stopped?: number); -export function ticks(): ReadonlyArray; +export function ticks(): Tick[]; + +export function tick(name:string):Tick; export function setProfileList(names: string[]): void; diff --git a/src/vs/base/node/startupTimers.js b/src/vs/base/node/startupTimers.js index 8f0494fc0acfc..61b3556b39ba8 100644 --- a/src/vs/base/node/startupTimers.js +++ b/src/vs/base/node/startupTimers.js @@ -48,7 +48,7 @@ define([], function () { // Because we want both instances to use the same tick-data // we store them globally global._perfStarts = global._perfStarts || new Map(); - global._perfTicks = global._perfTicks || []; + global._perfTicks = global._perfTicks || new Map(); global._perfToBeProfiled = global._perfToBeProfiled || new Set(); var _starts = global._perfStarts; @@ -83,12 +83,18 @@ define([], function () { var profile = _toBeProfiled.has(name) ? requireProfiler().stopProfiling(name) : undefined; var start = _starts.get(name); var tick = new Tick(start.name, start.started, stopped, profile); - _ticks.push(tick); + _ticks.set(name, tick); _starts.delete(name); } function ticks() { - return _ticks; + var ret = []; + _ticks.forEach(function (value) { ret.push(value); }); + return ret; + } + + function tick(name) { + return _ticks.get(name); } function setProfileList(names) { @@ -101,6 +107,7 @@ define([], function () { startTimer: startTimer, stopTimer: stopTimer, ticks: ticks, + tick: tick, setProfileList: setProfileList, disable: disable, }; From b6ec9f9eb90da1d31da24a41df28ced4b084da15 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 19 May 2017 15:46:10 +0200 Subject: [PATCH 0764/2747] add timers2 which is the startup timer ticks --- src/vs/base/node/startupTimers.js | 15 ++++++++---- .../electron-browser/bootstrap/index.js | 2 ++ src/vs/workbench/electron-browser/shell.ts | 7 +++++- .../workbench/electron-browser/workbench.ts | 9 ++++---- .../services/timer/common/timerService.ts | 1 + .../services/timer/node/timerService.ts | 23 +++++++++++++------ 6 files changed, 41 insertions(+), 16 deletions(-) diff --git a/src/vs/base/node/startupTimers.js b/src/vs/base/node/startupTimers.js index 61b3556b39ba8..45637a77b5887 100644 --- a/src/vs/base/node/startupTimers.js +++ b/src/vs/base/node/startupTimers.js @@ -82,9 +82,11 @@ define([], function () { } var profile = _toBeProfiled.has(name) ? requireProfiler().stopProfiling(name) : undefined; var start = _starts.get(name); - var tick = new Tick(start.name, start.started, stopped, profile); - _ticks.set(name, tick); - _starts.delete(name); + if (start !== undefined) { + var tick = new Tick(start.name, start.started, stopped, profile); + _ticks.set(name, tick); + _starts.delete(name); + } } function ticks() { @@ -94,7 +96,12 @@ define([], function () { } function tick(name) { - return _ticks.get(name); + var ret = _ticks.get(name); + if (!ret) { + var now = Date.now(); + ret = new Tick(name, now, now); + } + return ret; } function setProfileList(names) { diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index c01da62847a48..2b20efb7bbc64 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -192,6 +192,8 @@ function main() { beforeLoadWorkbenchMain: Date.now() }; + startTimer('elapsed:overall', configuration.perfStartTime); + const workbenchMainTimer = startTimer('load:workbench.main') require([ 'vs/workbench/electron-browser/workbench.main', diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index bec5d37606b9e..ac4b1759dde85 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -59,7 +59,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; -import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; +import { ILifecycleService, StartupKind } from 'vs/platform/lifecycle/common/lifecycle'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IMessageService, IChoiceService, Severity, CloseAction } from 'vs/platform/message/common/message'; @@ -101,6 +101,7 @@ import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/work import { WorkbenchThemeService } from 'vs/workbench/services/themes/electron-browser/workbenchThemeService'; import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; import { foreground, selectionBackground, focusBorder, scrollbarShadow, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground, listHighlightForeground, inputPlaceholderForeground } from 'vs/platform/theme/common/colorRegistry'; +import { stopTimer } from 'vs/base/node/startupTimers'; /** * Services that we require for the Shell @@ -242,6 +243,10 @@ export class WorkbenchShell { startupKind: this.lifecycleService.startupKind }); + if (this.lifecycleService.startupKind === StartupKind.NewWindow) { + stopTimer('elapsed:overall'); + } + // Telemetry: startup metrics this.timerService.workbenchStarted = Date.now(); this.timerService.restoreEditorsDuration = info.restoreEditorsDuration; diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 56f626450b753..f14318b949a80 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -308,8 +308,8 @@ export class Workbench implements IPartService { } viewletRestoreStopWatch = StopWatch.create(); - const tick = startTimer(`restore:${viewletIdToRestore}`); - compositeAndEditorPromises.push(tick.while(this.viewletService.openViewlet(viewletIdToRestore)).then(() => { + const viewletTimer = startTimer('restore:viewlet'); + compositeAndEditorPromises.push(viewletTimer.while(this.viewletService.openViewlet(viewletIdToRestore)).then(() => { viewletRestoreStopWatch.stop(); })); } @@ -324,7 +324,8 @@ export class Workbench implements IPartService { // Load Editors const editorRestoreStopWatch = StopWatch.create(); const restoredEditors: string[] = []; - compositeAndEditorPromises.push(this.resolveEditorsToOpen().then(inputs => { + const editorsTimer = startTimer('restore:editors'); + compositeAndEditorPromises.push(editorsTimer.while(this.resolveEditorsToOpen().then(inputs => { let editorOpenPromise: TPromise; if (inputs.length) { editorOpenPromise = this.editorService.openEditors(inputs.map(input => { return { input, position: EditorPosition.ONE }; })); @@ -343,7 +344,7 @@ export class Workbench implements IPartService { } } }); - })); + }))); if (this.storageService.getBoolean(Workbench.zenModeActiveSettingKey, StorageScope.WORKSPACE, false)) { this.toggleZenMode(true); diff --git a/src/vs/workbench/services/timer/common/timerService.ts b/src/vs/workbench/services/timer/common/timerService.ts index 16d9af305654a..a02d7249cf915 100644 --- a/src/vs/workbench/services/timer/common/timerService.ts +++ b/src/vs/workbench/services/timer/common/timerService.ts @@ -30,6 +30,7 @@ export interface IStartupMetrics { ellapsedWorkbench: number; ellapsedTimersToTimersComputed: number; }; + timers2: { [name: string]: number }; platform: string; release: string; totalmem: number; diff --git a/src/vs/workbench/services/timer/node/timerService.ts b/src/vs/workbench/services/timer/node/timerService.ts index 4998e257ee1b3..ac011f4ca08f7 100644 --- a/src/vs/workbench/services/timer/node/timerService.ts +++ b/src/vs/workbench/services/timer/node/timerService.ts @@ -6,6 +6,7 @@ import { ITimerService, IStartupMetrics, IInitData, IMemoryInfo } from 'vs/workbench/services/timer/common/timerService'; import { virtualMachineHint } from 'vs/base/node/id'; +import { ticks } from 'vs/base/node/startupTimers'; import * as os from 'os'; @@ -35,13 +36,7 @@ export class TimerService implements ITimerService { public restoreViewletDuration: number; public restoreEditorsDuration: number; - public get startupMetrics(): IStartupMetrics { - if (!this._startupMetrics) { - this.computeStartupMetrics(); - } - return this._startupMetrics; - }; private _startupMetrics: IStartupMetrics; constructor(initData: IInitData, private isEmptyWorkbench: boolean) { @@ -56,7 +51,14 @@ export class TimerService implements ITimerService { this.hasAccessibilitySupport = initData.hasAccessibilitySupport; } - public computeStartupMetrics(): void { + get startupMetrics(): IStartupMetrics { + if (!this._startupMetrics) { + this._computeStartupMetrics(); + } + return this._startupMetrics; + } + + public _computeStartupMetrics(): void { const now = Date.now(); const initialStartup = !!this.isInitialStartup; const start = initialStartup ? this.start : this.windowLoad; @@ -88,6 +90,12 @@ export class TimerService implements ITimerService { console.error(error); // be on the safe side with these hardware method calls } + // fill in startup timers we have until now + const timers2: { [name: string]: number } = Object.create(null); + for (const tick of ticks()) { + timers2[tick.name] = tick.duration; + } + this._startupMetrics = { version: 1, ellapsed: this.workbenchStarted - start, @@ -101,6 +109,7 @@ export class TimerService implements ITimerService { ellapsedWindowLoadToRequire: this.beforeLoadWorkbenchMain - this.windowLoad, ellapsedTimersToTimersComputed: Date.now() - now }, + timers2, platform, release, totalmem, From bf562ce501dd469a4b71e7c9973c52e4897b397e Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 19 May 2017 15:36:17 +0200 Subject: [PATCH 0765/2747] remove build gulpfile.js --- build/gulpfile.js | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 build/gulpfile.js diff --git a/build/gulpfile.js b/build/gulpfile.js deleted file mode 100644 index c0a5700ec1f56..0000000000000 --- a/build/gulpfile.js +++ /dev/null @@ -1,28 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -var gulp = require('gulp'); -var tsb = require('gulp-tsb'); -var util = require('./lib/util'); -var watcher = require('./lib/watch'); -var assign = require('object-assign'); - -var compilation = tsb.create(assign({ verbose: true }, require('./tsconfig.json').compilerOptions)); - -gulp.task('compile', function() { - return gulp.src('**/*.ts', { base: '.' }) - .pipe(compilation()) - .pipe(gulp.dest('')); -}); - -gulp.task('watch', function() { - var src = gulp.src('**/*.ts', { base: '.' }); - - return watcher('**/*.ts', { base: '.' }) - .pipe(util.incremental(compilation, src)) - .pipe(gulp.dest('')); -}); - -gulp.task('default', ['compile']); From d2bac293343c9525e8c1468130c404dbe00aca17 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 11:08:30 +0200 Subject: [PATCH 0766/2747] Move editor command registration to coreCommands.ts --- src/vs/editor/common/config/config.ts | 96 +++++++------------ .../editor/common/controller/coreCommands.ts | 55 +++++++++-- 2 files changed, 81 insertions(+), 70 deletions(-) diff --git a/src/vs/editor/common/config/config.ts b/src/vs/editor/common/config/config.ts index 543f74bf91a3e..59cdce4151fce 100644 --- a/src/vs/editor/common/config/config.ts +++ b/src/vs/editor/common/config/config.ts @@ -11,8 +11,7 @@ import { IContextKeyService, ContextKeyExpr } from 'vs/platform/contextkey/commo import { ICommandAndKeybindingRule, IKeybindings } from 'vs/platform/keybinding/common/keybindingsRegistry'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { ICodeEditorService, getCodeEditor } from 'vs/editor/common/services/codeEditorService'; -import { CommandsRegistry, ICommandHandler, ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; -import H = editorCommon.Handler; +import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; export interface ICommandKeybindingsOptions extends IKeybindings { kbExpr?: ContextKeyExpr; @@ -27,22 +26,20 @@ export interface ICommandOptions { } export abstract class Command { - public id: string; - public precondition: ContextKeyExpr; - private kbOpts: ICommandKeybindingsOptions; - private description: ICommandHandlerDescription; + public readonly id: string; + public readonly precondition: ContextKeyExpr; + private readonly _kbOpts: ICommandKeybindingsOptions; + private readonly _description: ICommandHandlerDescription; constructor(opts: ICommandOptions) { this.id = opts.id; this.precondition = opts.precondition; - this.kbOpts = opts.kbOpts; - this.description = opts.description; + this._kbOpts = opts.kbOpts; + this._description = opts.description; } - public abstract runCommand(accessor: ServicesAccessor, args: any): void | TPromise; - public toCommandAndKeybindingRule(defaultWeight: number): ICommandAndKeybindingRule { - const kbOpts = this.kbOpts || { primary: 0 }; + const kbOpts = this._kbOpts || { primary: 0 }; let kbWhen = kbOpts.kbExpr; if (this.precondition) { @@ -65,23 +62,37 @@ export abstract class Command { win: kbOpts.win, linux: kbOpts.linux, mac: kbOpts.mac, - description: this.description + description: this._description }; } + + public abstract runCommand(accessor: ServicesAccessor, args: any): void | TPromise; +} + +export interface IContributionCommandOptions extends ICommandOptions { + handler: (controller: T) => void; } export interface EditorControllerCommand { new (opts: IContributionCommandOptions): EditorCommand; } -export interface IContributionCommandOptions extends ICommandOptions { - handler: (controller: T) => void; +function findFocusedEditor(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { + return accessor.get(ICodeEditorService).getFocusedCodeEditor(); +} + +function getWorkbenchActiveEditor(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { + const editorService = accessor.get(IEditorService); + let activeEditor = (editorService).getActiveEditor && (editorService).getActiveEditor(); + return getCodeEditor(activeEditor); } export abstract class EditorCommand extends Command { + /** + * Create a command class that is bound to a certain editor contribution. + */ public static bindToContribution(controllerGetter: (editor: editorCommon.ICommonCodeEditor) => T): EditorControllerCommand { - return class EditorControllerCommandImpl extends EditorCommand { private _callback: (controller: T) => void; @@ -100,19 +111,20 @@ export abstract class EditorCommand extends Command { }; } - constructor(opts: ICommandOptions) { - super(opts); - } - public runCommand(accessor: ServicesAccessor, args: any): void | TPromise { + // Find the editor with text focus let editor = findFocusedEditor(accessor); + if (!editor) { - editor = getActiveEditorWidget(accessor); + // Fallback to use what the workbench considers the active editor + editor = getWorkbenchActiveEditor(accessor); } + if (!editor) { // well, at least we tried... return; } + return editor.invokeWithinContext((editorAccessor) => { const kbService = editorAccessor.get(IContextKeyService); if (!kbService.contextMatchesRules(this.precondition)) { @@ -126,47 +138,3 @@ export abstract class EditorCommand extends Command { public abstract runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void | TPromise; } - -function findFocusedEditor(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { - return accessor.get(ICodeEditorService).getFocusedCodeEditor(); -} - -function withCodeEditorFromCommandHandler(accessor: ServicesAccessor, callback: (editor: editorCommon.ICommonCodeEditor) => void): void { - let editor = findFocusedEditor(accessor); - if (editor) { - callback(editor); - } -} - -function getActiveEditorWidget(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { - const editorService = accessor.get(IEditorService); - let activeEditor = (editorService).getActiveEditor && (editorService).getActiveEditor(); - return getCodeEditor(activeEditor); -} - -function triggerEditorHandler(handlerId: string, accessor: ServicesAccessor, args: any): void { - withCodeEditorFromCommandHandler(accessor, (editor) => { - editor.trigger('keyboard', handlerId, args); - }); -} - -class CoreCommand extends Command { - public runCommand(accessor: ServicesAccessor, args: any): void { - triggerEditorHandler(this.id, accessor, args); - } -} - -function registerOverwritableCommand(handlerId: string, handler: ICommandHandler): void { - CommandsRegistry.registerCommand(handlerId, handler); - CommandsRegistry.registerCommand('default:' + handlerId, handler); -} - -function registerCoreDispatchCommand(handlerId: string): void { - registerOverwritableCommand(handlerId, triggerEditorHandler.bind(null, handlerId)); -} -registerCoreDispatchCommand(H.Type); -registerCoreDispatchCommand(H.ReplacePreviousChar); -registerCoreDispatchCommand(H.CompositionStart); -registerCoreDispatchCommand(H.CompositionEnd); -registerCoreDispatchCommand(H.Paste); -registerCoreDispatchCommand(H.Cut); diff --git a/src/vs/editor/common/controller/coreCommands.ts b/src/vs/editor/common/controller/coreCommands.ts index 3ca21fe60b758..8004f96f402ea 100644 --- a/src/vs/editor/common/controller/coreCommands.ts +++ b/src/vs/editor/common/controller/coreCommands.ts @@ -1522,7 +1522,7 @@ namespace Config { return accessor.get(ICodeEditorService).getFocusedCodeEditor(); } - function getActiveEditorWidget(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { + function getWorkbenchActiveEditor(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { const editorService = accessor.get(IEditorService); let activeEditor = (editorService).getActiveEditor && (editorService).getActiveEditor(); return getCodeEditor(activeEditor); @@ -1532,7 +1532,13 @@ namespace Config { KeybindingsRegistry.registerCommandAndKeybindingRule(command.toCommandAndKeybindingRule(CORE_WEIGHT)); } - class BaseTextInputAwareCommand extends Command { + /** + * A command that will: + * 1. invoke a command on the focused editor. + * 2. otherwise, invoke a browser built-in command on the `activeElement`. + * 3. otherwise, invoke a command on the workbench active editor. + */ + class EditorOrNativeTextInputCommand extends Command { private readonly _editorHandler: string | EditorCommand; private readonly _inputHandler: string; @@ -1559,7 +1565,7 @@ namespace Config { } // Redirecting to last active editor - let activeEditor = getActiveEditorWidget(accessor); + let activeEditor = getWorkbenchActiveEditor(accessor); if (activeEditor) { activeEditor.focus(); return this._runEditorHandler(activeEditor, args); @@ -1578,7 +1584,7 @@ namespace Config { } } - registerCommand(new BaseTextInputAwareCommand({ + registerCommand(new EditorOrNativeTextInputCommand({ editorHandler: CoreNavigationCommands.SelectAll, inputHandler: 'selectAll', id: 'editor.action.selectAll', @@ -1590,7 +1596,7 @@ namespace Config { } })); - registerCommand(new BaseTextInputAwareCommand({ + registerCommand(new EditorOrNativeTextInputCommand({ editorHandler: H.Undo, inputHandler: 'undo', id: H.Undo, @@ -1602,7 +1608,7 @@ namespace Config { } })); - registerCommand(new BaseTextInputAwareCommand({ + registerCommand(new EditorOrNativeTextInputCommand({ editorHandler: H.Redo, inputHandler: 'redo', id: H.Redo, @@ -1616,4 +1622,41 @@ namespace Config { } })); + /** + * A command that will invoke a command on the focused editor. + */ + class EditorHandlerCommand extends Command { + + private readonly _handlerId: string; + + constructor(id: string, handlerId: string) { + super({ + id: id, + precondition: null + }); + this._handlerId = handlerId; + } + + public runCommand(accessor: ServicesAccessor, args: any): void { + const editor = findFocusedEditor(accessor); + if (!editor) { + return; + } + + editor.trigger('keyboard', this._handlerId, args); + } + } + + function registerOverwritableCommand(handlerId: string): void { + registerCommand(new EditorHandlerCommand('default:' + handlerId, handlerId)); + registerCommand(new EditorHandlerCommand(handlerId, handlerId)); + } + + registerOverwritableCommand(H.Type); + registerOverwritableCommand(H.ReplacePreviousChar); + registerOverwritableCommand(H.CompositionStart); + registerOverwritableCommand(H.CompositionEnd); + registerOverwritableCommand(H.Paste); + registerOverwritableCommand(H.Cut); + } From 80e93de878192d5bce15c9d8c05d26cb66b9b1a5 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 11:23:34 +0200 Subject: [PATCH 0767/2747] Bring editor command classes together --- src/vs/editor/common/config/config.ts | 140 ---------------- .../editor/common/controller/coreCommands.ts | 3 +- .../editor/common/editorCommonExtensions.ts | 156 ++++++++++++++++-- .../snippet/browser/snippetController2.ts | 3 +- .../test/common/wordOperations.test.ts | 2 +- .../emmet/electron-browser/emmetActions.ts | 3 +- .../browser/keybindingsEditorContribution.ts | 3 +- 7 files changed, 146 insertions(+), 164 deletions(-) delete mode 100644 src/vs/editor/common/config/config.ts diff --git a/src/vs/editor/common/config/config.ts b/src/vs/editor/common/config/config.ts deleted file mode 100644 index 59cdce4151fce..0000000000000 --- a/src/vs/editor/common/config/config.ts +++ /dev/null @@ -1,140 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import { IEditorService } from 'vs/platform/editor/common/editor'; -import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; -import { IContextKeyService, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; -import { ICommandAndKeybindingRule, IKeybindings } from 'vs/platform/keybinding/common/keybindingsRegistry'; -import * as editorCommon from 'vs/editor/common/editorCommon'; -import { ICodeEditorService, getCodeEditor } from 'vs/editor/common/services/codeEditorService'; -import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; - -export interface ICommandKeybindingsOptions extends IKeybindings { - kbExpr?: ContextKeyExpr; - weight?: number; -} - -export interface ICommandOptions { - id: string; - precondition: ContextKeyExpr; - kbOpts?: ICommandKeybindingsOptions; - description?: ICommandHandlerDescription; -} - -export abstract class Command { - public readonly id: string; - public readonly precondition: ContextKeyExpr; - private readonly _kbOpts: ICommandKeybindingsOptions; - private readonly _description: ICommandHandlerDescription; - - constructor(opts: ICommandOptions) { - this.id = opts.id; - this.precondition = opts.precondition; - this._kbOpts = opts.kbOpts; - this._description = opts.description; - } - - public toCommandAndKeybindingRule(defaultWeight: number): ICommandAndKeybindingRule { - const kbOpts = this._kbOpts || { primary: 0 }; - - let kbWhen = kbOpts.kbExpr; - if (this.precondition) { - if (kbWhen) { - kbWhen = ContextKeyExpr.and(kbWhen, this.precondition); - } else { - kbWhen = this.precondition; - } - } - - const weight = (typeof kbOpts.weight === 'number' ? kbOpts.weight : defaultWeight); - - return { - id: this.id, - handler: (accessor, args) => this.runCommand(accessor, args), - weight: weight, - when: kbWhen, - primary: kbOpts.primary, - secondary: kbOpts.secondary, - win: kbOpts.win, - linux: kbOpts.linux, - mac: kbOpts.mac, - description: this._description - }; - } - - public abstract runCommand(accessor: ServicesAccessor, args: any): void | TPromise; -} - -export interface IContributionCommandOptions extends ICommandOptions { - handler: (controller: T) => void; -} - -export interface EditorControllerCommand { - new (opts: IContributionCommandOptions): EditorCommand; -} - -function findFocusedEditor(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { - return accessor.get(ICodeEditorService).getFocusedCodeEditor(); -} - -function getWorkbenchActiveEditor(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { - const editorService = accessor.get(IEditorService); - let activeEditor = (editorService).getActiveEditor && (editorService).getActiveEditor(); - return getCodeEditor(activeEditor); -} - -export abstract class EditorCommand extends Command { - - /** - * Create a command class that is bound to a certain editor contribution. - */ - public static bindToContribution(controllerGetter: (editor: editorCommon.ICommonCodeEditor) => T): EditorControllerCommand { - return class EditorControllerCommandImpl extends EditorCommand { - private _callback: (controller: T) => void; - - constructor(opts: IContributionCommandOptions) { - super(opts); - - this._callback = opts.handler; - } - - public runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void { - let controller = controllerGetter(editor); - if (controller) { - this._callback(controllerGetter(editor)); - } - } - }; - } - - public runCommand(accessor: ServicesAccessor, args: any): void | TPromise { - // Find the editor with text focus - let editor = findFocusedEditor(accessor); - - if (!editor) { - // Fallback to use what the workbench considers the active editor - editor = getWorkbenchActiveEditor(accessor); - } - - if (!editor) { - // well, at least we tried... - return; - } - - return editor.invokeWithinContext((editorAccessor) => { - const kbService = editorAccessor.get(IContextKeyService); - if (!kbService.contextMatchesRules(this.precondition)) { - // precondition does not hold - return; - } - - return this.runEditorCommand(editorAccessor, editor, args); - }); - } - - public abstract runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void | TPromise; -} diff --git a/src/vs/editor/common/controller/coreCommands.ts b/src/vs/editor/common/controller/coreCommands.ts index 8004f96f402ea..9172351e644f2 100644 --- a/src/vs/editor/common/controller/coreCommands.ts +++ b/src/vs/editor/common/controller/coreCommands.ts @@ -11,9 +11,8 @@ import * as editorCommon from 'vs/editor/common/editorCommon'; import { CursorState, ICursors, RevealTarget, IColumnSelectData, CursorContext } from 'vs/editor/common/controller/cursorCommon'; import { CursorChangeReason, VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; import { CursorMoveCommands, CursorMove as CursorMove_ } from 'vs/editor/common/controller/cursorMoveCommands'; -import { EditorCommand, ICommandOptions, Command } from 'vs/editor/common/config/config'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; -import { registerEditorCommand } from 'vs/editor/common/editorCommonExtensions'; +import { registerEditorCommand, ICommandOptions, EditorCommand, Command } from 'vs/editor/common/editorCommonExtensions'; import { IColumnSelectResult, ColumnSelection } from 'vs/editor/common/controller/cursorColumnSelection'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; diff --git a/src/vs/editor/common/editorCommonExtensions.ts b/src/vs/editor/common/editorCommonExtensions.ts index c80f219223d70..e991a1a208cfe 100644 --- a/src/vs/editor/common/editorCommonExtensions.ts +++ b/src/vs/editor/common/editorCommonExtensions.ts @@ -8,22 +8,148 @@ import { illegalArgument } from 'vs/base/common/errors'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; import { ServicesAccessor, IConstructorSignature1 } from 'vs/platform/instantiation/common/instantiation'; -import { CommandsRegistry } from 'vs/platform/commands/common/commands'; -import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; +import { CommandsRegistry, ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; +import { KeybindingsRegistry, ICommandAndKeybindingRule, IKeybindings } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { Registry } from 'vs/platform/platform'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { ICommandOptions, Command as ConfigBasicCommand, EditorCommand as ConfigEditorCommand } from 'vs/editor/common/config/config'; import { Position } from 'vs/editor/common/core/position'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { IModelService } from 'vs/editor/common/services/modelService'; import { MenuId, MenuRegistry, IMenuItem } from 'vs/platform/actions/common/actions'; +import { IEditorService } from 'vs/platform/editor/common/editor'; +import { IContextKeyService, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; +import { ICodeEditorService, getCodeEditor } from 'vs/editor/common/services/codeEditorService'; export type ServicesAccessor = ServicesAccessor; -export const Command = ConfigBasicCommand; -export const EditorCommand = ConfigEditorCommand; -export type ICommandOptions = ICommandOptions; export type ICommonEditorContributionCtor = IConstructorSignature1; +// ----- Generic Command + +export interface ICommandKeybindingsOptions extends IKeybindings { + kbExpr?: ContextKeyExpr; + weight?: number; +} +export interface ICommandOptions { + id: string; + precondition: ContextKeyExpr; + kbOpts?: ICommandKeybindingsOptions; + description?: ICommandHandlerDescription; +} +export abstract class Command { + public readonly id: string; + public readonly precondition: ContextKeyExpr; + private readonly _kbOpts: ICommandKeybindingsOptions; + private readonly _description: ICommandHandlerDescription; + + constructor(opts: ICommandOptions) { + this.id = opts.id; + this.precondition = opts.precondition; + this._kbOpts = opts.kbOpts; + this._description = opts.description; + } + + public toCommandAndKeybindingRule(defaultWeight: number): ICommandAndKeybindingRule { + const kbOpts = this._kbOpts || { primary: 0 }; + + let kbWhen = kbOpts.kbExpr; + if (this.precondition) { + if (kbWhen) { + kbWhen = ContextKeyExpr.and(kbWhen, this.precondition); + } else { + kbWhen = this.precondition; + } + } + + const weight = (typeof kbOpts.weight === 'number' ? kbOpts.weight : defaultWeight); + + return { + id: this.id, + handler: (accessor, args) => this.runCommand(accessor, args), + weight: weight, + when: kbWhen, + primary: kbOpts.primary, + secondary: kbOpts.secondary, + win: kbOpts.win, + linux: kbOpts.linux, + mac: kbOpts.mac, + description: this._description + }; + } + + public abstract runCommand(accessor: ServicesAccessor, args: any): void | TPromise; +} + +// ----- Editor Command & Editor Contribution Command + +function findFocusedEditor(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { + return accessor.get(ICodeEditorService).getFocusedCodeEditor(); +} +function getWorkbenchActiveEditor(accessor: ServicesAccessor): editorCommon.ICommonCodeEditor { + const editorService = accessor.get(IEditorService); + let activeEditor = (editorService).getActiveEditor && (editorService).getActiveEditor(); + return getCodeEditor(activeEditor); +} + +export interface IContributionCommandOptions extends ICommandOptions { + handler: (controller: T) => void; +} +export interface EditorControllerCommand { + new (opts: IContributionCommandOptions): EditorCommand; +} +export abstract class EditorCommand extends Command { + + /** + * Create a command class that is bound to a certain editor contribution. + */ + public static bindToContribution(controllerGetter: (editor: editorCommon.ICommonCodeEditor) => T): EditorControllerCommand { + return class EditorControllerCommandImpl extends EditorCommand { + private _callback: (controller: T) => void; + + constructor(opts: IContributionCommandOptions) { + super(opts); + + this._callback = opts.handler; + } + + public runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void { + let controller = controllerGetter(editor); + if (controller) { + this._callback(controllerGetter(editor)); + } + } + }; + } + + public runCommand(accessor: ServicesAccessor, args: any): void | TPromise { + // Find the editor with text focus + let editor = findFocusedEditor(accessor); + + if (!editor) { + // Fallback to use what the workbench considers the active editor + editor = getWorkbenchActiveEditor(accessor); + } + + if (!editor) { + // well, at least we tried... + return; + } + + return editor.invokeWithinContext((editorAccessor) => { + const kbService = editorAccessor.get(IContextKeyService); + if (!kbService.contextMatchesRules(this.precondition)) { + // precondition does not hold + return; + } + + return this.runEditorCommand(editorAccessor, editor, args); + }); + } + + public abstract runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void | TPromise; +} + +// ----- Editor Action + export interface IEditorCommandMenuOptions { group?: string; order?: number; @@ -33,7 +159,7 @@ export interface IActionOptions extends ICommandOptions { alias: string; menuOpts?: IEditorCommandMenuOptions; } -export abstract class EditorAction extends ConfigEditorCommand { +export abstract class EditorAction extends EditorCommand { public label: string; public alias: string; @@ -74,17 +200,17 @@ export abstract class EditorAction extends ConfigEditorCommand { public abstract run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor, args: any): void | TPromise; } -// --- Editor Actions +// --- Registration of commands and actions export function editorAction(ctor: { new (): EditorAction; }): void { CommonEditorRegistry.registerEditorAction(new ctor()); } -export function editorCommand(ctor: { new (): ConfigEditorCommand }): void { +export function editorCommand(ctor: { new (): EditorCommand }): void { registerEditorCommand(new ctor()); } -export function registerEditorCommand(editorCommand: T): T { +export function registerEditorCommand(editorCommand: T): T { CommonEditorRegistry.registerEditorCommand(editorCommand); return editorCommand; } @@ -103,7 +229,7 @@ export module CommonEditorRegistry { export function getEditorActions(): EditorAction[] { return EditorContributionRegistry.INSTANCE.getEditorActions(); } - export function getEditorCommand(commandId: string): ConfigEditorCommand { + export function getEditorCommand(commandId: string): EditorCommand { return EditorContributionRegistry.INSTANCE.getEditorCommand(commandId); } @@ -119,7 +245,7 @@ export module CommonEditorRegistry { return KeybindingsRegistry.WEIGHT.editorContrib(importance); } - export function registerEditorCommand(editorCommand: ConfigEditorCommand): void { + export function registerEditorCommand(editorCommand: EditorCommand): void { EditorContributionRegistry.INSTANCE.registerEditorCommand(editorCommand); } @@ -161,7 +287,7 @@ class EditorContributionRegistry { private editorContributions: ICommonEditorContributionCtor[]; private editorActions: EditorAction[]; - private editorCommands: { [commandId: string]: ConfigEditorCommand; }; + private editorCommands: { [commandId: string]: EditorCommand; }; constructor() { this.editorContributions = []; @@ -193,12 +319,12 @@ class EditorContributionRegistry { return this.editorActions.slice(0); } - public registerEditorCommand(editorCommand: ConfigEditorCommand) { + public registerEditorCommand(editorCommand: EditorCommand) { KeybindingsRegistry.registerCommandAndKeybindingRule(editorCommand.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib())); this.editorCommands[editorCommand.id] = editorCommand; } - public getEditorCommand(commandId: string): ConfigEditorCommand { + public getEditorCommand(commandId: string): EditorCommand { return (this.editorCommands[commandId] || null); } diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 6f156fffe2de8..3983e58599e0f 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -7,10 +7,9 @@ import { RawContextKey, IContextKey, IContextKeyService, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; -import { commonEditorContribution, CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; +import { commonEditorContribution, CommonEditorRegistry, EditorCommand } from 'vs/editor/common/editorCommonExtensions'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { SnippetSession } from './snippetSession'; -import { EditorCommand } from 'vs/editor/common/config/config'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; diff --git a/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts b/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts index ab99938740b8e..d67a436a400ca 100644 --- a/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts +++ b/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts @@ -17,7 +17,7 @@ import { DeleteWordLeft, DeleteWordStartLeft, DeleteWordEndLeft, DeleteWordRight, DeleteWordStartRight, DeleteWordEndRight } from 'vs/editor/contrib/wordOperations/common/wordOperations'; -import { EditorCommand } from 'vs/editor/common/config/config'; +import { EditorCommand } from "vs/editor/common/editorCommonExtensions"; suite('WordOperations', () => { diff --git a/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts b/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts index d73bc72532713..16c227e880087 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts @@ -7,8 +7,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; -import { EditorAction, ServicesAccessor, IActionOptions } from 'vs/editor/common/editorCommonExtensions'; -import { ICommandKeybindingsOptions } from 'vs/editor/common/config/config'; +import { EditorAction, ServicesAccessor, IActionOptions, ICommandKeybindingsOptions } from 'vs/editor/common/editorCommonExtensions'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { grammarsExtPoint, ITMSyntaxExtensionPoint } from 'vs/editor/node/textMate/TMGrammars'; import { IModeService } from 'vs/editor/common/services/modeService'; diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts index 7f73595d8945b..9733c62707f6a 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts @@ -15,7 +15,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { Range } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { ServicesAccessor, registerEditorCommand } from 'vs/editor/common/editorCommonExtensions'; +import { ServicesAccessor, registerEditorCommand, EditorCommand } from 'vs/editor/common/editorCommonExtensions'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; @@ -26,7 +26,6 @@ import { parseTree, Node } from 'vs/base/common/json'; import { KeybindingIO } from 'vs/workbench/services/keybinding/common/keybindingIO'; import { ScanCodeBinding } from 'vs/workbench/services/keybinding/common/scanCode'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; -import { EditorCommand } from 'vs/editor/common/config/config'; const NLS_LAUNCH_MESSAGE = nls.localize('defineKeybinding.start', "Define Keybinding"); const NLS_KB_LAYOUT_INFO_MESSAGE = nls.localize('defineKeybinding.kbLayoutInfoMessage', "For your current keyboard layout press "); From 2342d2e2311b53e8b82d8881e23fba8160628c7f Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 11:38:49 +0200 Subject: [PATCH 0768/2747] Simplify cursor.trigger --- src/vs/editor/common/controller/cursor.ts | 11 ----------- .../contrib/find/test/common/findModel.test.ts | 10 +++++----- .../test/common/linesOperations.test.ts | 4 ++-- .../test/common/controller/cursor.test.ts | 18 +++++++++--------- .../common/editor/rangeDecorations.test.ts | 7 ++----- 5 files changed, 18 insertions(+), 32 deletions(-) diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 5df9f4780736a..3c91c510bd9b0 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -20,8 +20,6 @@ import { DeleteOperations } from 'vs/editor/common/controller/cursorDeleteOperat import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; import { TextModelEventType, ModelRawContentChangedEvent, RawContentChangedType } from 'vs/editor/common/model/textModelEvents'; import { CursorEventType, CursorChangeReason, ICursorPositionChangedEvent, VerticalRevealType, ICursorSelectionChangedEvent, ICursorRevealRangeEvent, CursorScrollRequest } from 'vs/editor/common/controller/cursorEvents'; -import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; -import { CoreEditorCommand } from 'vs/editor/common/controller/coreCommands'; class CursorOperationArgs { public readonly eventSource: string; @@ -486,14 +484,6 @@ export class Cursor extends Disposable implements ICursors { public trigger(source: string, handlerId: string, payload: any): void { if (!this._handlers.hasOwnProperty(handlerId)) { - const command = CommonEditorRegistry.getEditorCommand(handlerId); - if (!command || !(command instanceof CoreEditorCommand)) { - return; - } - - payload = payload || {}; - payload.source = source; - command.runCoreEditorCommand(this, payload); return; } const handler = this._handlers[handlerId]; @@ -509,7 +499,6 @@ export class Cursor extends Disposable implements ICursors { this._handlers[H.CompositionStart] = (args) => this._compositionStart(args); this._handlers[H.CompositionEnd] = (args) => this._compositionEnd(args); this._handlers[H.Paste] = (args) => this._paste(args); - this._handlers[H.Cut] = (args) => this._cut(args); this._handlers[H.Undo] = (args) => this._undo(args); diff --git a/src/vs/editor/contrib/find/test/common/findModel.test.ts b/src/vs/editor/contrib/find/test/common/findModel.test.ts index b1b48e254995e..7dd3ee4ad4d09 100644 --- a/src/vs/editor/contrib/find/test/common/findModel.test.ts +++ b/src/vs/editor/contrib/find/test/common/findModel.test.ts @@ -303,7 +303,7 @@ suite('FindModel', () => { ] ); - cursor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { + editor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { position: new Position(6, 20) }); @@ -663,7 +663,7 @@ suite('FindModel', () => { ] ); - cursor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { + editor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { position: new Position(6, 20) }); assertFindState( @@ -1150,7 +1150,7 @@ suite('FindModel', () => { ] ); - cursor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { + editor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { position: new Position(6, 20) }); assertFindState( @@ -1311,7 +1311,7 @@ suite('FindModel', () => { ] ); - cursor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { + editor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { position: new Position(6, 20) }); assertFindState( @@ -1741,7 +1741,7 @@ suite('FindModel', () => { findState.change({ searchString: 'hello(?=\\sworld)', replaceString: 'hi', isRegex: true }, false); let findModel = new FindModelBoundToEditorModel(editor, findState); - cursor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { + editor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { position: new Position(8, 14) }); diff --git a/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts b/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts index 87930f8457f00..4a56e203f656a 100644 --- a/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts +++ b/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts @@ -478,13 +478,13 @@ suite('Editor Contrib - Line Operations', () => { new Selection(2, 4, 2, 4) ]); - cursor.trigger('tests', Handler.Undo, {}); + editor.trigger('tests', Handler.Undo, {}); assert.deepEqual(editor.getSelections(), [ new Selection(1, 3, 1, 3), new Selection(1, 6, 1, 6), new Selection(3, 4, 3, 4) ]); - cursor.trigger('tests', Handler.Redo, {}); + editor.trigger('tests', Handler.Redo, {}); assert.deepEqual(editor.getSelections(), [ new Selection(1, 3, 1, 3), new Selection(2, 4, 2, 4) diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index f11a0c6775e55..a2700b342cb51 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -1863,7 +1863,7 @@ suite('Editor Controller - Cursor Configuration', () => { ], modelOpts: { insertSpaces: true, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } }, (model, cursor) => { - cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(1, 21) }, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(1, 21), source: 'keyboard' }); cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); assert.equal(model.getLineContent(1), ' \tMy First Line\t '); assert.equal(model.getLineContent(2), ' '); @@ -1890,56 +1890,56 @@ suite('Editor Controller - Cursor Configuration', () => { withMockCodeEditor(null, { model: model }, (editor, cursor) => { // Tab on column 1 - cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 1) }, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(2, 1) }); CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), ' My Second Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 2 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 2) }, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(2, 2) }); CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'M y Second Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 3 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 3) }, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(2, 3) }); CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My Second Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 4 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 4) }, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(2, 4) }); CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My Second Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 5 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 5) }, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(2, 5) }); CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My S econd Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 5 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 5) }, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(2, 5) }); CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My S econd Line123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 13 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 13) }, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(2, 13) }); CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My Second Li ne123'); cursorCommand(cursor, H.Undo, null, 'keyboard'); // Tab on column 14 assert.equal(model.getLineContent(2), 'My Second Line123'); - cursorCommand(cursor, CoreNavigationCommands.MoveTo.id, { position: new Position(2, 14) }, 'keyboard'); + CoreNavigationCommands.MoveTo.runCoreEditorCommand(cursor, { position: new Position(2, 14) }); CoreEditingCommands.Tab.runEditorCommand(null, editor, null); assert.equal(model.getLineContent(2), 'My Second Lin e123'); }); diff --git a/src/vs/workbench/test/common/editor/rangeDecorations.test.ts b/src/vs/workbench/test/common/editor/rangeDecorations.test.ts index 617ce785ac108..e9677bbdb23b7 100644 --- a/src/vs/workbench/test/common/editor/rangeDecorations.test.ts +++ b/src/vs/workbench/test/common/editor/rangeDecorations.test.ts @@ -13,14 +13,13 @@ import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl'; import WorkbenchEditorService = require('vs/workbench/services/editor/common/editorService'); import { RangeHighlightDecorations } from 'vs/workbench/common/editor/rangeDecorations'; import { Model } from 'vs/editor/common/model/model'; -import { mockCodeEditor, MockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; +import { mockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { IEditorInput } from 'vs/platform/editor/common/editor'; import { FileEditorInput } from 'vs/workbench/parts/files/common/editors/fileEditorInput'; import { TextModel } from 'vs/editor/common/model/textModel'; import { Range, IRange } from 'vs/editor/common/core/range'; import { Position } from 'vs/editor/common/core/position'; -import { Cursor } from 'vs/editor/common/controller/cursor'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { TestConfigurationService } from 'vs/platform/configuration/test/common/testConfigurationService'; import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl'; @@ -33,7 +32,6 @@ suite('Editor - Range decorations', () => { let modelService: IModelService; let modeService: IModeService; let codeEditor: editorCommon.ICommonCodeEditor; - let cursor: Cursor; let model: Model; let text: string; let testObject: RangeHighlightDecorations; @@ -47,7 +45,6 @@ suite('Editor - Range decorations', () => { text = 'LINE1' + '\n' + 'LINE2' + '\n' + 'LINE3' + '\n' + 'LINE4' + '\r\n' + 'LINE5'; model = aModel(URI.file('some_file')); codeEditor = mockCodeEditor([], { model }); - cursor = (codeEditor).getCursor(); mockEditorService(codeEditor.getModel().uri); instantiationService.stub(WorkbenchEditorService.IWorkbenchEditorService, 'getActiveEditor', { getControl: () => { return codeEditor; } }); @@ -111,7 +108,7 @@ suite('Editor - Range decorations', () => { test('highlight is removed on cursor position change', function () { testObject.highlightRange({ resource: model.uri, range: { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 1 } }); - cursor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { + codeEditor.trigger('mouse', CoreNavigationCommands.MoveTo.id, { position: new Position(2, 1) }); From 972223e581153f6f5807fa2735245451d2063c80 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 13:02:09 +0200 Subject: [PATCH 0769/2747] Simplify cursor handlers --- src/vs/editor/common/controller/cursor.ts | 309 +++++++----------- .../editor/common/controller/cursorCommon.ts | 7 - .../common/controller/cursorTypeOperations.ts | 45 ++- 3 files changed, 160 insertions(+), 201 deletions(-) diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 3c91c510bd9b0..4a062380b3c7d 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -64,10 +64,6 @@ export class Cursor extends Disposable implements ICursors { private _isDoingComposition: boolean; private _columnSelectData: IColumnSelectData; - private _handlers: { - [key: string]: (args: CursorOperationArgs) => EditOperationResult; - }; - constructor(configuration: editorCommon.IConfiguration, model: editorCommon.IModel, viewModelHelper: IViewModelHelper) { super(); this._eventEmitter = this._register(new EventEmitter()); @@ -81,9 +77,6 @@ export class Cursor extends Disposable implements ICursors { this._isDoingComposition = false; this._columnSelectData = null; - this._handlers = {}; - this._registerHandlers(); - this._register(this._model.addBulkListener((events) => { if (this._isHandling) { return; @@ -135,6 +128,8 @@ export class Cursor extends Disposable implements ICursors { super.dispose(); } + // ------ some getters/setters + public getPrimaryCursor(): CursorState { return this._cursors.getPrimaryCursor(); } @@ -147,6 +142,26 @@ export class Cursor extends Disposable implements ICursors { return this._cursors.getAll(); } + private static _somethingChanged(oldSelections: Selection[], oldViewSelections: Selection[], newSelections: Selection[], newViewSelections: Selection[]): boolean { + if (oldSelections.length !== newSelections.length) { + return true; + } + + for (let i = 0, len = oldSelections.length; i < len; i++) { + if (!oldSelections[i].equalsSelection(newSelections[i])) { + return true; + } + } + + for (let i = 0, len = oldViewSelections.length; i < len; i++) { + if (!oldViewSelections[i].equalsSelection(newViewSelections[i])) { + return true; + } + } + + return false; + } + public setStates(source: string, reason: CursorChangeReason, states: CursorState[]): void { const oldSelections = this._cursors.getSelections(); const oldViewSelections = this._cursors.getViewSelections(); @@ -162,23 +177,7 @@ export class Cursor extends Disposable implements ICursors { const newSelections = this._cursors.getSelections(); const newViewSelections = this._cursors.getViewSelections(); - let somethingChanged = false; - if (oldSelections.length !== newSelections.length) { - somethingChanged = true; - } else { - for (let i = 0, len = oldSelections.length; !somethingChanged && i < len; i++) { - if (!oldSelections[i].equalsSelection(newSelections[i])) { - somethingChanged = true; - } - } - for (let i = 0, len = oldViewSelections.length; !somethingChanged && i < len; i++) { - if (!oldViewSelections[i].equalsSelection(newViewSelections[i])) { - somethingChanged = true; - } - } - } - - if (somethingChanged) { + if (Cursor._somethingChanged(oldSelections, oldViewSelections, newSelections, newViewSelections)) { this._emitCursorPositionChanged(source, reason); this._emitCursorSelectionChanged(source, reason); } @@ -281,12 +280,22 @@ export class Cursor extends Disposable implements ICursors { } } - // ------ some getters/setters - public getSelection(): Selection { return this._cursors.getPrimaryCursor().modelState.selection; } + public getColumnSelectData(): IColumnSelectData { + if (this._columnSelectData) { + return this._columnSelectData; + } + const primaryCursor = this._cursors.getPrimaryCursor(); + const primaryPos = primaryCursor.viewState.position; + return { + toViewLineNumber: primaryPos.lineNumber, + toViewVisualColumn: CursorColumns.visibleColumnFromColumn2(this.context.config, this.context.viewModel, primaryPos) + }; + } + public getSelections(): Selection[] { return this._cursors.getSelections(); } @@ -301,80 +310,31 @@ export class Cursor extends Disposable implements ICursors { // ------ auxiliary handling logic - private _createAndInterpretHandlerCtx(callback: () => EditOperationResult): void { - - const opResult = callback(); + private _executeEditOperation(opResult: EditOperationResult): void { - if (opResult && opResult.shouldPushStackElementBefore) { - this._model.pushStackElement(); + if (!opResult) { + // Nothing to execute + return; } - this._columnSelectData = null; - - if (opResult && !this._configuration.editor.readOnly) { - const result = CommandExecutor.executeCommands(this._model, this._cursors.getSelections(), opResult.commands); - if (result) { - // The commands were applied correctly - this._interpretCommandResult(result); - } + if (this._configuration.editor.readOnly) { + // Cannot execute when read only + return; } - if (opResult && opResult.shouldPushStackElementAfter) { + if (opResult.shouldPushStackElementBefore) { this._model.pushStackElement(); } - this._cursors.normalize(); - } - - private _onHandler(command: string, handler: (args: CursorOperationArgs) => EditOperationResult, args: CursorOperationArgs): void { - - this._isHandling = true; - - try { - const oldSelections = this._cursors.getSelections(); - const oldViewSelections = this._cursors.getViewSelections(); - - // ensure valid state on all cursors - this._cursors.ensureValidState(); - - let cursorPositionChangeReason: CursorChangeReason; - - this._createAndInterpretHandlerCtx(() => { - let r = handler(args); - cursorPositionChangeReason = r ? r.reason : CursorChangeReason.NotSet; - return r; - }); - - const newSelections = this._cursors.getSelections(); - const newViewSelections = this._cursors.getViewSelections(); - - let somethingChanged = false; - if (oldSelections.length !== newSelections.length) { - somethingChanged = true; - } else { - for (let i = 0, len = oldSelections.length; !somethingChanged && i < len; i++) { - if (!oldSelections[i].equalsSelection(newSelections[i])) { - somethingChanged = true; - } - } - for (let i = 0, len = oldViewSelections.length; !somethingChanged && i < len; i++) { - if (!oldViewSelections[i].equalsSelection(newViewSelections[i])) { - somethingChanged = true; - } - } - } - - if (somethingChanged) { - this._emitCursorPositionChanged(args.eventSource, cursorPositionChangeReason); - this._revealRange(RevealTarget.Primary, VerticalRevealType.Simple, true); - this._emitCursorSelectionChanged(args.eventSource, cursorPositionChangeReason); - } - - } catch (err) { - onUnexpectedError(err); + const result = CommandExecutor.executeCommands(this._model, this._cursors.getSelections(), opResult.commands); + if (result) { + // The commands were applied correctly + this._interpretCommandResult(result); } - this._isHandling = false; + if (opResult.shouldPushStackElementAfter) { + this._model.pushStackElement(); + } } private _interpretCommandResult(cursorState: Selection[]): void { @@ -382,7 +342,9 @@ export class Cursor extends Disposable implements ICursors { return; } + this._columnSelectData = null; this._cursors.setSelections(cursorState); + this._cursors.normalize(); } // ----------------------------------------------------------------------------------------------------------- @@ -483,41 +445,79 @@ export class Cursor extends Disposable implements ICursors { // ----- handlers beyond this point public trigger(source: string, handlerId: string, payload: any): void { - if (!this._handlers.hasOwnProperty(handlerId)) { + const H = editorCommon.Handler; + + if (handlerId === H.CompositionStart) { + this._isDoingComposition = true; return; } - const handler = this._handlers[handlerId]; + + if (handlerId === H.CompositionEnd) { + this._isDoingComposition = false; + return; + } + const args = new CursorOperationArgs(source, payload); - this._onHandler(handlerId, handler, args); - } - private _registerHandlers(): void { - let H = editorCommon.Handler; + const oldSelections = this._cursors.getSelections(); + const oldViewSelections = this._cursors.getViewSelections(); + let cursorChangeReason = CursorChangeReason.NotSet; - this._handlers[H.Type] = (args) => this._type(args); - this._handlers[H.ReplacePreviousChar] = (args) => this._replacePreviousChar(args); - this._handlers[H.CompositionStart] = (args) => this._compositionStart(args); - this._handlers[H.CompositionEnd] = (args) => this._compositionEnd(args); - this._handlers[H.Paste] = (args) => this._paste(args); - this._handlers[H.Cut] = (args) => this._cut(args); + // ensure valid state on all cursors + this._cursors.ensureValidState(); - this._handlers[H.Undo] = (args) => this._undo(args); - this._handlers[H.Redo] = (args) => this._redo(args); + this._isHandling = true; - this._handlers[H.ExecuteCommand] = (args) => this._externalExecuteCommand(args); - this._handlers[H.ExecuteCommands] = (args) => this._externalExecuteCommands(args); - } + try { + switch (handlerId) { + case H.Type: + this._executeEditOperation(this._type(args)); + break; + + case H.ReplacePreviousChar: + this._executeEditOperation(this._replacePreviousChar(args)); + break; + + case H.Paste: + cursorChangeReason = CursorChangeReason.Paste; + this._executeEditOperation(this._paste(args)); + break; + + case H.Cut: + this._executeEditOperation(this._cut(args)); + break; + + case H.Undo: + cursorChangeReason = CursorChangeReason.Undo; + this._interpretCommandResult(this._model.undo()); + break; + + case H.Redo: + cursorChangeReason = CursorChangeReason.Redo; + this._interpretCommandResult(this._model.redo()); + break; + + case H.ExecuteCommand: + this._executeEditOperation(this._externalExecuteCommand(args)); + break; + + case H.ExecuteCommands: + this._executeEditOperation(this._externalExecuteCommands(args)); + break; + } + } catch (err) { + onUnexpectedError(err); + } - public getColumnSelectData(): IColumnSelectData { - if (this._columnSelectData) { - return this._columnSelectData; + this._isHandling = false; + + const newSelections = this._cursors.getSelections(); + const newViewSelections = this._cursors.getViewSelections(); + if (Cursor._somethingChanged(oldSelections, oldViewSelections, newSelections, newViewSelections)) { + this._emitCursorPositionChanged(args.eventSource, cursorChangeReason); + this._revealRange(RevealTarget.Primary, VerticalRevealType.Simple, true); + this._emitCursorSelectionChanged(args.eventSource, cursorChangeReason); } - const primaryCursor = this._cursors.getPrimaryCursor(); - const primaryPos = primaryCursor.viewState.position; - return { - toViewLineNumber: primaryPos.lineNumber, - toViewVisualColumn: CursorColumns.visibleColumnFromColumn2(this.context.config, this.context.viewModel, primaryPos) - }; } // -------------------- START editing operations @@ -539,12 +539,7 @@ export class Cursor extends Disposable implements ICursors { } // Here we must interpret each typed character individually, that's why we create a new context - this._createAndInterpretHandlerCtx(() => { - - // Decide what all cursors will do up-front - return TypeOperations.typeWithInterceptors(this.context.config, this.context.model, this.getSelections(), chr); - }); - + this._executeEditOperation(TypeOperations.typeWithInterceptors(this.context.config, this.context.model, this.getSelections(), chr)); } return null; @@ -554,55 +549,15 @@ export class Cursor extends Disposable implements ICursors { } private _replacePreviousChar(args: CursorOperationArgs<{ text: string; replaceCharCnt: number; }>): EditOperationResult { - let text = args.eventData.text; - let replaceCharCnt = args.eventData.replaceCharCnt; + const text = args.eventData.text; + const replaceCharCnt = args.eventData.replaceCharCnt; return TypeOperations.replacePreviousChar(this.context.config, this.context.model, this.getSelections(), text, replaceCharCnt); } - private _compositionStart(args: CursorOperationArgs): EditOperationResult { - this._isDoingComposition = true; - return null; - } - - private _compositionEnd(args: CursorOperationArgs): EditOperationResult { - this._isDoingComposition = false; - return null; - } - - private _distributePasteToCursors(args: CursorOperationArgs<{ pasteOnNewLine: boolean; text: string; }>): string[] { - if (args.eventData.pasteOnNewLine) { - return null; - } - - const selections = this._cursors.getSelections(); - if (selections.length === 1) { - return null; - } - - for (let i = 0; i < selections.length; i++) { - if (selections[i].startLineNumber !== selections[i].endLineNumber) { - return null; - } - } - - let pastePieces = args.eventData.text.split(/\r\n|\r|\n/); - if (pastePieces.length !== selections.length) { - return null; - } - - return pastePieces; - } - private _paste(args: CursorOperationArgs<{ pasteOnNewLine: boolean; text: string; }>): EditOperationResult { - const distributedPaste = this._distributePasteToCursors(args); - - if (distributedPaste) { - let selections = this.getSelections(); - selections = selections.sort(Range.compareRangesUsingStarts); - return TypeOperations.distributedPaste(this.context.config, this.context.model, selections, distributedPaste); - } else { - return TypeOperations.paste(this.context.config, this.context.model, this.getSelections(), args.eventData.text, args.eventData.pasteOnNewLine); - } + const pasteOnNewLine = args.eventData.pasteOnNewLine; + const text = args.eventData.text; + return TypeOperations.paste(this.context.config, this.context.model, this.getSelections(), pasteOnNewLine, text); } private _cut(args: CursorOperationArgs): EditOperationResult { @@ -611,26 +566,6 @@ export class Cursor extends Disposable implements ICursors { // -------------------- END editing operations - private _undo(args: CursorOperationArgs): EditOperationResult { - this._interpretCommandResult(this._model.undo()); - - return new EditOperationResult([], { - shouldPushStackElementBefore: false, - shouldPushStackElementAfter: false, - reason: CursorChangeReason.Undo - }); - } - - private _redo(args: CursorOperationArgs): EditOperationResult { - this._interpretCommandResult(this._model.redo()); - - return new EditOperationResult([], { - shouldPushStackElementBefore: false, - shouldPushStackElementAfter: false, - reason: CursorChangeReason.Redo - }); - } - private _externalExecuteCommand(args: CursorOperationArgs): EditOperationResult { const command = args.eventData; diff --git a/src/vs/editor/common/controller/cursorCommon.ts b/src/vs/editor/common/controller/cursorCommon.ts index 8684392bd95dc..a8d9c46dfcad2 100644 --- a/src/vs/editor/common/controller/cursorCommon.ts +++ b/src/vs/editor/common/controller/cursorCommon.ts @@ -438,24 +438,17 @@ export class EditOperationResult { readonly commands: ICommand[]; readonly shouldPushStackElementBefore: boolean; readonly shouldPushStackElementAfter: boolean; - readonly reason: CursorChangeReason; constructor( commands: ICommand[], opts: { shouldPushStackElementBefore: boolean; shouldPushStackElementAfter: boolean; - reason?: CursorChangeReason; } ) { this.commands = commands; this.shouldPushStackElementBefore = opts.shouldPushStackElementBefore; this.shouldPushStackElementAfter = opts.shouldPushStackElementAfter; - if (typeof opts.reason === 'undefined') { - this.reason = CursorChangeReason.NotSet; - } else { - this.reason = opts.reason; - } } } diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index 899ff598a8235..b36938ce5e733 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -17,7 +17,6 @@ import { IndentAction } from 'vs/editor/common/modes/languageConfiguration'; import { SurroundSelectionCommand } from 'vs/editor/common/commands/surroundSelectionCommand'; import { IElectricAction } from 'vs/editor/common/modes/supports/electricCharacter'; import { getMapForWordSeparators, WordCharacterClass } from "vs/editor/common/controller/cursorWordOperations"; -import { CursorChangeReason } from "vs/editor/common/controller/cursorEvents"; export class TypeOperations { @@ -69,19 +68,18 @@ export class TypeOperations { return newIndentation; } - public static distributedPaste(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[], text: string[]): EditOperationResult { + private static _distributedPaste(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[], text: string[]): EditOperationResult { let commands: ICommand[] = []; for (let i = 0, len = selections.length; i < len; i++) { commands[i] = new ReplaceCommand(selections[i], text[i]); } return new EditOperationResult(commands, { shouldPushStackElementBefore: true, - shouldPushStackElementAfter: true, - reason: CursorChangeReason.Paste + shouldPushStackElementAfter: true }); } - public static paste(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[], text: string, pasteOnNewLine: boolean): EditOperationResult { + private static _simplePaste(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[], text: string, pasteOnNewLine: boolean): EditOperationResult { let commands: ICommand[] = []; for (let i = 0, len = selections.length; i < len; i++) { const selection = selections[i]; @@ -107,11 +105,44 @@ export class TypeOperations { } return new EditOperationResult(commands, { shouldPushStackElementBefore: true, - shouldPushStackElementAfter: true, - reason: CursorChangeReason.Paste + shouldPushStackElementAfter: true }); } + private static _distributePasteToCursors(selections: Selection[], pasteOnNewLine: boolean, text: string): string[] { + if (pasteOnNewLine) { + return null; + } + + if (selections.length === 1) { + return null; + } + + for (let i = 0; i < selections.length; i++) { + if (selections[i].startLineNumber !== selections[i].endLineNumber) { + return null; + } + } + + let pastePieces = text.split(/\r\n|\r|\n/); + if (pastePieces.length !== selections.length) { + return null; + } + + return pastePieces; + } + + public static paste(config: CursorConfiguration, model: ICursorSimpleModel, selections: Selection[], pasteOnNewLine: boolean, text: string): EditOperationResult { + const distributedPaste = this._distributePasteToCursors(selections, pasteOnNewLine, text); + + if (distributedPaste) { + selections = selections.sort(Range.compareRangesUsingStarts); + return this._distributedPaste(config, model, selections, distributedPaste); + } else { + return this._simplePaste(config, model, selections, text, pasteOnNewLine); + } + } + private static _goodIndentForLine(config: CursorConfiguration, model: ITokenizedModel, lineNumber: number): string { let expectedIndentAction = LanguageConfigurationRegistry.getGoodIndentActionForLine(model, lineNumber); From 0e8cd85d64595c4b5b0a009c9128039a0420c906 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 14:54:48 +0200 Subject: [PATCH 0770/2747] Simplifications --- src/vs/editor/common/controller/cursor.ts | 93 ++++++++--------------- 1 file changed, 33 insertions(+), 60 deletions(-) diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 4a062380b3c7d..318a6d84dafce 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -21,26 +21,6 @@ import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations import { TextModelEventType, ModelRawContentChangedEvent, RawContentChangedType } from 'vs/editor/common/model/textModelEvents'; import { CursorEventType, CursorChangeReason, ICursorPositionChangedEvent, VerticalRevealType, ICursorSelectionChangedEvent, ICursorRevealRangeEvent, CursorScrollRequest } from 'vs/editor/common/controller/cursorEvents'; -class CursorOperationArgs { - public readonly eventSource: string; - public readonly eventData: T; - - constructor(eventSource: string, eventData: T) { - this.eventSource = eventSource; - this.eventData = eventData; - } -} - -interface ICommandData { - operations: editorCommon.IIdentifiedSingleEditOperation[]; - hadTrackedEditOperation: boolean; -} - -interface ICommandsData { - operations: editorCommon.IIdentifiedSingleEditOperation[]; - hadTrackedEditOperation: boolean; -} - export class Cursor extends Disposable implements ICursors { public onDidChangePosition(listener: (e: ICursorPositionChangedEvent) => void): IDisposable { @@ -457,8 +437,6 @@ export class Cursor extends Disposable implements ICursors { return; } - const args = new CursorOperationArgs(source, payload); - const oldSelections = this._cursors.getSelections(); const oldViewSelections = this._cursors.getViewSelections(); let cursorChangeReason = CursorChangeReason.NotSet; @@ -471,20 +449,20 @@ export class Cursor extends Disposable implements ICursors { try { switch (handlerId) { case H.Type: - this._executeEditOperation(this._type(args)); + this._type(source, payload.text); break; case H.ReplacePreviousChar: - this._executeEditOperation(this._replacePreviousChar(args)); + this._replacePreviousChar(payload.text, payload.replaceCharCnt); break; case H.Paste: cursorChangeReason = CursorChangeReason.Paste; - this._executeEditOperation(this._paste(args)); + this._paste(payload.text, payload.pasteOnNewLine); break; case H.Cut: - this._executeEditOperation(this._cut(args)); + this._cut(); break; case H.Undo: @@ -498,11 +476,11 @@ export class Cursor extends Disposable implements ICursors { break; case H.ExecuteCommand: - this._executeEditOperation(this._externalExecuteCommand(args)); + this._externalExecuteCommand(payload); break; case H.ExecuteCommands: - this._executeEditOperation(this._externalExecuteCommands(args)); + this._externalExecuteCommands(payload); break; } } catch (err) { @@ -514,18 +492,14 @@ export class Cursor extends Disposable implements ICursors { const newSelections = this._cursors.getSelections(); const newViewSelections = this._cursors.getViewSelections(); if (Cursor._somethingChanged(oldSelections, oldViewSelections, newSelections, newViewSelections)) { - this._emitCursorPositionChanged(args.eventSource, cursorChangeReason); + this._emitCursorPositionChanged(source, cursorChangeReason); this._revealRange(RevealTarget.Primary, VerticalRevealType.Simple, true); - this._emitCursorSelectionChanged(args.eventSource, cursorChangeReason); + this._emitCursorSelectionChanged(source, cursorChangeReason); } } - // -------------------- START editing operations - - private _type(args: CursorOperationArgs<{ text: string; }>): EditOperationResult { - const text = args.eventData.text; - - if (!this._isDoingComposition && args.eventSource === 'keyboard') { + private _type(source: string, text: string): void { + if (!this._isDoingComposition && source === 'keyboard') { // If this event is coming straight from the keyboard, look for electric characters and enter for (let i = 0, len = text.length; i < len; i++) { @@ -542,48 +516,37 @@ export class Cursor extends Disposable implements ICursors { this._executeEditOperation(TypeOperations.typeWithInterceptors(this.context.config, this.context.model, this.getSelections(), chr)); } - return null; } else { - return TypeOperations.typeWithoutInterceptors(this.context.config, this.context.model, this.getSelections(), text); + this._executeEditOperation(TypeOperations.typeWithoutInterceptors(this.context.config, this.context.model, this.getSelections(), text)); } } - private _replacePreviousChar(args: CursorOperationArgs<{ text: string; replaceCharCnt: number; }>): EditOperationResult { - const text = args.eventData.text; - const replaceCharCnt = args.eventData.replaceCharCnt; - return TypeOperations.replacePreviousChar(this.context.config, this.context.model, this.getSelections(), text, replaceCharCnt); + private _replacePreviousChar(text: string, replaceCharCnt: number): void { + this._executeEditOperation(TypeOperations.replacePreviousChar(this.context.config, this.context.model, this.getSelections(), text, replaceCharCnt)); } - private _paste(args: CursorOperationArgs<{ pasteOnNewLine: boolean; text: string; }>): EditOperationResult { - const pasteOnNewLine = args.eventData.pasteOnNewLine; - const text = args.eventData.text; - return TypeOperations.paste(this.context.config, this.context.model, this.getSelections(), pasteOnNewLine, text); + private _paste(text: string, pasteOnNewLine: boolean): void { + this._executeEditOperation(TypeOperations.paste(this.context.config, this.context.model, this.getSelections(), pasteOnNewLine, text)); } - private _cut(args: CursorOperationArgs): EditOperationResult { - return DeleteOperations.cut(this.context.config, this.context.model, this.getSelections()); + private _cut(): void { + this._executeEditOperation(DeleteOperations.cut(this.context.config, this.context.model, this.getSelections())); } - // -------------------- END editing operations - - private _externalExecuteCommand(args: CursorOperationArgs): EditOperationResult { - const command = args.eventData; - + private _externalExecuteCommand(command: editorCommon.ICommand): void { this._cursors.killSecondaryCursors(); - return new EditOperationResult([command], { + this._executeEditOperation(new EditOperationResult([command], { shouldPushStackElementBefore: false, shouldPushStackElementAfter: false - }); + })); } - private _externalExecuteCommands(args: CursorOperationArgs): EditOperationResult { - const commands = args.eventData; - - return new EditOperationResult(commands, { + private _externalExecuteCommands(commands: editorCommon.ICommand[]): void { + this._executeEditOperation(new EditOperationResult(commands, { shouldPushStackElementBefore: false, shouldPushStackElementAfter: false - }); + })); } } @@ -594,6 +557,16 @@ interface IExecContext { readonly positionMarkers: string[]; } +interface ICommandData { + operations: editorCommon.IIdentifiedSingleEditOperation[]; + hadTrackedEditOperation: boolean; +} + +interface ICommandsData { + operations: editorCommon.IIdentifiedSingleEditOperation[]; + hadTrackedEditOperation: boolean; +} + class CommandExecutor { public static executeCommands(model: editorCommon.IModel, selectionsBefore: Selection[], commands: editorCommon.ICommand[]): Selection[] { From 7a765323ac8eeb901a3b503f5d500ef29734ccf3 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 15:08:14 +0200 Subject: [PATCH 0771/2747] Move ViewEventEmitter out of viewModelImpl --- src/vs/editor/common/view/viewEvents.ts | 50 ++++++++++++++ src/vs/editor/common/viewModel/viewModel.ts | 8 +-- .../common/viewModel/viewModelCursors.ts | 3 +- .../common/viewModel/viewModelDecorations.ts | 9 +-- .../editor/common/viewModel/viewModelImpl.ts | 65 ++++--------------- 5 files changed, 68 insertions(+), 67 deletions(-) diff --git a/src/vs/editor/common/view/viewEvents.ts b/src/vs/editor/common/view/viewEvents.ts index 31c994adea807..7ad7a285c6d0d 100644 --- a/src/vs/editor/common/view/viewEvents.ts +++ b/src/vs/editor/common/view/viewEvents.ts @@ -10,6 +10,8 @@ import { Selection } from 'vs/editor/common/core/selection'; import { ScrollEvent } from 'vs/base/common/scrollable'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; +import * as errors from 'vs/base/common/errors'; +import { IDisposable, Disposable } from "vs/base/common/lifecycle"; export const enum ViewEventType { ViewConfigurationChanged = 1, @@ -311,3 +313,51 @@ export type ViewEvent = ( | ViewZonesChangedEvent | ViewThemeChangedEvent ); + +export interface IViewEventListener { + (events: ViewEvent[]): void; +} + +export class ViewEventEmitter extends Disposable { + private _listeners: IViewEventListener[]; + + constructor() { + super(); + this._listeners = []; + } + + public dispose(): void { + this._listeners = []; + super.dispose(); + } + + protected _emit(events: ViewEvent[]): void { + const listeners = this._listeners.slice(0); + for (let i = 0, len = listeners.length; i < len; i++) { + safeInvokeListener(listeners[i], events); + } + } + + public addEventListener(listener: (events: ViewEvent[]) => void): IDisposable { + this._listeners.push(listener); + return { + dispose: () => { + let listeners = this._listeners; + for (let i = 0, len = listeners.length; i < len; i++) { + if (listeners[i] === listener) { + listeners.splice(i, 1); + break; + } + } + } + }; + } +} + +function safeInvokeListener(listener: IViewEventListener, events: ViewEvent[]): void { + try { + listener(events); + } catch (e) { + errors.onUnexpectedError(e); + } +} diff --git a/src/vs/editor/common/viewModel/viewModel.ts b/src/vs/editor/common/viewModel/viewModel.ts index f04c2936c74b9..93808ca90a36a 100644 --- a/src/vs/editor/common/viewModel/viewModel.ts +++ b/src/vs/editor/common/viewModel/viewModel.ts @@ -9,7 +9,7 @@ import { ViewLineToken } from 'vs/editor/common/core/viewLineToken'; import { Position, IPosition } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; -import { ViewEvent } from 'vs/editor/common/view/viewEvents'; +import { ViewEvent, IViewEventListener } from 'vs/editor/common/view/viewEvents'; import { IDisposable } from 'vs/base/common/lifecycle'; import { Scrollable } from "vs/base/common/scrollable"; import { IPartialViewLinesViewportData } from "vs/editor/common/viewLayout/viewLinesViewportData"; @@ -104,13 +104,9 @@ export interface ICoordinatesConverter { modelPositionIsVisible(modelPosition: Position): boolean; } -export interface IViewModelListener { - (events: ViewEvent[]): void; -} - export interface IViewModel { - addEventListener(listener: IViewModelListener): IDisposable; + addEventListener(listener: IViewEventListener): IDisposable; readonly coordinatesConverter: ICoordinatesConverter; diff --git a/src/vs/editor/common/viewModel/viewModelCursors.ts b/src/vs/editor/common/viewModel/viewModelCursors.ts index 1b37e3ef3d9fc..b0e5fb8d920ad 100644 --- a/src/vs/editor/common/viewModel/viewModelCursors.ts +++ b/src/vs/editor/common/viewModel/viewModelCursors.ts @@ -11,7 +11,6 @@ import { Selection } from 'vs/editor/common/core/selection'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { ICursorRevealRangeEvent, CursorEventType, CursorScrollRequest } from 'vs/editor/common/controller/cursorEvents'; import { Cursor } from "vs/editor/common/controller/cursor"; -import { ViewEventEmitter } from "vs/editor/common/viewModel/viewModelImpl"; import { EmitterEvent } from "vs/base/common/eventEmitter"; export interface ICursorPositionChangedEvent { @@ -38,7 +37,7 @@ function containsLineMappingChanged(events: viewEvents.ViewEvent[]): boolean { return false; } -export class ViewModelCursors extends ViewEventEmitter { +export class ViewModelCursors extends viewEvents.ViewEventEmitter { private readonly configuration: editorCommon.IConfiguration; private readonly viewModel: IViewModel; diff --git a/src/vs/editor/common/viewModel/viewModelDecorations.ts b/src/vs/editor/common/viewModel/viewModelDecorations.ts index 2a5bbea8d827d..6f1a0a184b2e7 100644 --- a/src/vs/editor/common/viewModel/viewModelDecorations.ts +++ b/src/vs/editor/common/viewModel/viewModelDecorations.ts @@ -8,8 +8,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import { Range } from 'vs/editor/common/core/range'; import { Position } from 'vs/editor/common/core/position'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { InlineDecoration, ViewModelDecoration, ICoordinatesConverter, ViewEventsCollector } from 'vs/editor/common/viewModel/viewModel'; -import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import { InlineDecoration, ViewModelDecoration, ICoordinatesConverter } from 'vs/editor/common/viewModel/viewModel'; import { IModelDecorationsChangedEvent } from 'vs/editor/common/model/textModelEvents'; export interface IDecorationsViewportData { @@ -59,7 +58,7 @@ export class ViewModelDecorations implements IDisposable { this._clearCachedModelDecorationsResolver(); } - public onModelDecorationsChanged(eventsCollector: ViewEventsCollector, e: IModelDecorationsChangedEvent): void { + public onModelDecorationsChanged(e: IModelDecorationsChangedEvent): void { let changedDecorations = e.changedDecorations; for (let i = 0, len = changedDecorations.length; i < len; i++) { let changedDecoration = changedDecorations[i]; @@ -78,14 +77,12 @@ export class ViewModelDecorations implements IDisposable { } this._clearCachedModelDecorationsResolver(); - eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); } - public onLineMappingChanged(eventsCollector: ViewEventsCollector): void { + public onLineMappingChanged(): void { this._decorationsCache = Object.create(null); this._clearCachedModelDecorationsResolver(); - eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); } private _getOrCreateViewModelDecoration(modelDecoration: editorCommon.IModelDecoration): ViewModelDecoration { diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index 34e254267dd43..93fb6d5fea785 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -5,7 +5,6 @@ 'use strict'; import { EmitterEvent } from 'vs/base/common/eventEmitter'; -import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; import * as strings from 'vs/base/common/strings'; import { Position, IPosition } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; @@ -14,10 +13,9 @@ import * as editorCommon from 'vs/editor/common/editorCommon'; import { TokenizationRegistry, ColorId, LanguageId } from 'vs/editor/common/modes'; import { tokenizeLineToHTML } from 'vs/editor/common/modes/textToHtmlTokenizer'; import { ViewModelDecorations } from 'vs/editor/common/viewModel/viewModelDecorations'; -import { MinimapLinesRenderingData, ViewLineRenderingData, ViewModelDecoration, IViewModelListener, IViewModel, ICoordinatesConverter, ViewEventsCollector } from 'vs/editor/common/viewModel/viewModel'; +import { MinimapLinesRenderingData, ViewLineRenderingData, ViewModelDecoration, IViewModel, ICoordinatesConverter, ViewEventsCollector } from 'vs/editor/common/viewModel/viewModel'; import { SplitLinesCollection } from 'vs/editor/common/viewModel/splitLinesCollection'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import * as errors from 'vs/base/common/errors'; import { MinimapTokensColorTracker } from 'vs/editor/common/view/minimapCharRenderer'; import * as textModelEvents from 'vs/editor/common/model/textModelEvents'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; @@ -85,43 +83,7 @@ export class CoordinatesConverter implements ICoordinatesConverter { } -export class ViewEventEmitter extends Disposable { - private _listeners: IViewModelListener[]; - - constructor() { - super(); - this._listeners = []; - } - - public dispose(): void { - this._listeners = []; - super.dispose(); - } - - protected _emit(events: viewEvents.ViewEvent[]): void { - const listeners = this._listeners.slice(0); - for (let i = 0, len = listeners.length; i < len; i++) { - safeInvokeListener(listeners[i], events); - } - } - - public addEventListener(listener: (events: viewEvents.ViewEvent[]) => void): IDisposable { - this._listeners.push(listener); - return { - dispose: () => { - let listeners = this._listeners; - for (let i = 0, len = listeners.length; i < len; i++) { - if (listeners[i] === listener) { - listeners.splice(i, 1); - break; - } - } - } - }; - } -} - -export class ViewModel extends ViewEventEmitter implements IViewModel { +export class ViewModel extends viewEvents.ViewEventEmitter implements IViewModel { private readonly editorId: number; private readonly configuration: editorCommon.IConfiguration; @@ -214,7 +176,8 @@ export class ViewModel extends ViewEventEmitter implements IViewModel { if (this.lines.setWrappingSettings(conf.wrappingInfo.wrappingIndent, conf.wrappingInfo.wrappingColumn, conf.fontInfo.typicalFullwidthCharacterWidth / conf.fontInfo.typicalHalfwidthCharacterWidth)) { eventsCollector.emit(new viewEvents.ViewFlushedEvent()); eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); - this.decorations.onLineMappingChanged(eventsCollector); + eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); + this.decorations.onLineMappingChanged(); this.viewLayout.onFlushed(this.getLineCount()); revealPreviousCenteredModelRange = true; } @@ -356,7 +319,8 @@ export class ViewModel extends ViewEventEmitter implements IViewModel { if (this.lines.setTabSize(this.model.getOptions().tabSize)) { eventsCollector.emit(new viewEvents.ViewFlushedEvent()); eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); - this.decorations.onLineMappingChanged(eventsCollector); + eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); + this.decorations.onLineMappingChanged(); this.viewLayout.onFlushed(this.getLineCount()); } @@ -364,7 +328,8 @@ export class ViewModel extends ViewEventEmitter implements IViewModel { } case textModelEvents.TextModelEventType.ModelDecorationsChanged: { const e = data; - this.decorations.onModelDecorationsChanged(eventsCollector, e); + this.decorations.onModelDecorationsChanged(e); + eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); break; } case textModelEvents.TextModelEventType.ModelDispose: { @@ -379,7 +344,8 @@ export class ViewModel extends ViewEventEmitter implements IViewModel { if (!hadOtherModelChange && hadModelLineChangeThatChangedLineMapping) { eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); - this.decorations.onLineMappingChanged(eventsCollector); + eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); + this.decorations.onLineMappingChanged(); } } @@ -389,7 +355,8 @@ export class ViewModel extends ViewEventEmitter implements IViewModel { if (lineMappingChanged) { eventsCollector.emit(new viewEvents.ViewFlushedEvent()); eventsCollector.emit(new viewEvents.ViewLineMappingChangedEvent()); - this.decorations.onLineMappingChanged(eventsCollector); + eventsCollector.emit(new viewEvents.ViewDecorationsChangedEvent()); + this.decorations.onLineMappingChanged(); this.viewLayout.onFlushed(this.getLineCount()); } this._emit(eventsCollector.finalize()); @@ -623,11 +590,3 @@ export class ViewModel extends ViewEventEmitter implements IViewModel { return result; } } - -function safeInvokeListener(listener: IViewModelListener, events: viewEvents.ViewEvent[]): void { - try { - listener(events); - } catch (e) { - errors.onUnexpectedError(e); - } -} From dcbe78a1244abe9d4e39a51c065efa327e8f9b76 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 15:39:57 +0200 Subject: [PATCH 0772/2747] The cursor gets passed in the ViewModel --- src/vs/editor/common/commonCodeEditor.ts | 21 +-- src/vs/editor/common/controller/cursor.ts | 21 ++- src/vs/editor/common/viewModel/viewModel.ts | 4 + .../test/common/commands/commandTestUtils.ts | 21 ++- .../test/common/commands/sideEditing.test.ts | 24 ++-- .../test/common/controller/cursor.test.ts | 128 ++++++++++-------- .../controller/cursorMoveCommand.test.ts | 78 ++--------- src/vs/editor/test/common/editorTestUtils.ts | 50 ------- .../test/common/mocks/mockCodeEditor.ts | 27 +++- 9 files changed, 150 insertions(+), 224 deletions(-) diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index 1f652adcaf21f..531c248be3a8f 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -13,7 +13,7 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle import { IContextKey, IContextKeyServiceTarget, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { CommonEditorConfiguration } from 'vs/editor/common/config/commonEditorConfig'; import { Cursor } from 'vs/editor/common/controller/cursor'; -import { CursorColumns, IViewModelHelper, ICursors, CursorConfiguration } from 'vs/editor/common/controller/cursorCommon'; +import { CursorColumns, ICursors, CursorConfiguration } from 'vs/editor/common/controller/cursorCommon'; import { Position, IPosition } from 'vs/editor/common/core/position'; import { Range, IRange } from 'vs/editor/common/core/range'; import { Selection, ISelection } from 'vs/editor/common/core/selection'; @@ -863,23 +863,6 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo this.viewModel = new ViewModel(this.id, this._configuration, this.model); - let viewModelHelper: IViewModelHelper = { - viewModel: this.viewModel, - coordinatesConverter: this.viewModel.coordinatesConverter, - getScrollTop: (): number => { - return this.viewModel.viewLayout.getScrollTop(); - }, - getCompletelyVisibleViewRange: (): Range => { - return this.viewModel.getCompletelyVisibleViewRange(); - }, - getCompletelyVisibleViewRangeAtScrollTop: (scrollTop: number): Range => { - return this.viewModel.getCompletelyVisibleViewRangeAtScrollTop(scrollTop); - }, - getVerticalOffsetForViewLineNumber: (viewLineNumber: number): number => { - return this.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewLineNumber); - } - }; - this.listenersToRemove.push(this.model.addBulkListener((events) => { for (let i = 0, len = events.length; i < len; i++) { let eventType = events[i].type; @@ -917,7 +900,7 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo this.cursor = new Cursor( this._configuration, this.model, - viewModelHelper + this.viewModel ); this.viewCursor = new ViewModelCursors( diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 318a6d84dafce..3a596ad5730fa 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -20,6 +20,7 @@ import { DeleteOperations } from 'vs/editor/common/controller/cursorDeleteOperat import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; import { TextModelEventType, ModelRawContentChangedEvent, RawContentChangedType } from 'vs/editor/common/model/textModelEvents'; import { CursorEventType, CursorChangeReason, ICursorPositionChangedEvent, VerticalRevealType, ICursorSelectionChangedEvent, ICursorRevealRangeEvent, CursorScrollRequest } from 'vs/editor/common/controller/cursorEvents'; +import { IViewModel } from "vs/editor/common/viewModel/viewModel"; export class Cursor extends Disposable implements ICursors { @@ -44,11 +45,29 @@ export class Cursor extends Disposable implements ICursors { private _isDoingComposition: boolean; private _columnSelectData: IColumnSelectData; - constructor(configuration: editorCommon.IConfiguration, model: editorCommon.IModel, viewModelHelper: IViewModelHelper) { + constructor(configuration: editorCommon.IConfiguration, model: editorCommon.IModel, viewModel: IViewModel) { super(); this._eventEmitter = this._register(new EventEmitter()); this._configuration = configuration; this._model = model; + + let viewModelHelper: IViewModelHelper = { + viewModel: viewModel, + coordinatesConverter: viewModel.coordinatesConverter, + getScrollTop: (): number => { + return viewModel.viewLayout.getScrollTop(); + }, + getCompletelyVisibleViewRange: (): Range => { + return viewModel.getCompletelyVisibleViewRange(); + }, + getCompletelyVisibleViewRangeAtScrollTop: (scrollTop: number): Range => { + return viewModel.getCompletelyVisibleViewRangeAtScrollTop(scrollTop); + }, + getVerticalOffsetForViewLineNumber: (viewLineNumber: number): number => { + return viewModel.viewLayout.getVerticalOffsetForLineNumber(viewLineNumber); + } + }; + this._viewModelHelper = viewModelHelper; this.context = new CursorContext(this._configuration, this._model, this._viewModelHelper); this._cursors = new CursorCollection(this.context); diff --git a/src/vs/editor/common/viewModel/viewModel.ts b/src/vs/editor/common/viewModel/viewModel.ts index 93808ca90a36a..e812f5710f247 100644 --- a/src/vs/editor/common/viewModel/viewModel.ts +++ b/src/vs/editor/common/viewModel/viewModel.ts @@ -120,6 +120,8 @@ export interface IViewModel { getDecorationsInViewport(visibleRange: Range): ViewModelDecoration[]; getViewLineRenderingData(visibleRange: Range, lineNumber: number): ViewLineRenderingData; getMinimapLinesRenderingData(startLineNumber: number, endLineNumber: number, needed: boolean[]): MinimapLinesRenderingData; + getCompletelyVisibleViewRange(): Range; + getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range; getTabSize(): number; getLineCount(): number; @@ -127,6 +129,8 @@ export interface IViewModel { getLineIndentGuide(lineNumber: number): number; getLineMinColumn(lineNumber: number): number; getLineMaxColumn(lineNumber: number): number; + getLineFirstNonWhitespaceColumn(lineNumber: number): number; + getLineLastNonWhitespaceColumn(lineNumber: number): number; getAllOverviewRulerDecorations(): ViewModelDecoration[]; getValueInRange(range: Range, eol: EndOfLinePreference): string; diff --git a/src/vs/editor/test/common/commands/commandTestUtils.ts b/src/vs/editor/test/common/commands/commandTestUtils.ts index 3db5dc1fd3c06..b753b8a063a5e 100644 --- a/src/vs/editor/test/common/commands/commandTestUtils.ts +++ b/src/vs/editor/test/common/commands/commandTestUtils.ts @@ -5,14 +5,12 @@ 'use strict'; import * as assert from 'assert'; -import { Cursor } from 'vs/editor/common/controller/cursor'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { Model } from 'vs/editor/common/model/model'; import { LanguageIdentifier } from 'vs/editor/common/modes'; -import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; -import { viewModelHelper } from 'vs/editor/test/common/editorTestUtils'; +import { withMockCodeEditor } from "vs/editor/test/common/mocks/mockCodeEditor"; export function testCommand( lines: string[], @@ -22,22 +20,19 @@ export function testCommand( expectedLines: string[], expectedSelection: Selection ): void { - let model = Model.createFromString(lines.join('\n'), undefined, languageIdentifier); - let config = new TestConfiguration(null); - let cursor = new Cursor(config, model, viewModelHelper(model)); + withMockCodeEditor(null, { model: model }, (editor, cursor) => { - cursor.setSelections('tests', [selection]); + cursor.setSelections('tests', [selection]); - cursor.trigger('tests', editorCommon.Handler.ExecuteCommand, commandFactory(cursor.getSelection())); + cursor.trigger('tests', editorCommon.Handler.ExecuteCommand, commandFactory(cursor.getSelection())); - assert.deepEqual(model.getLinesContent(), expectedLines); + assert.deepEqual(model.getLinesContent(), expectedLines); - let actualSelection = cursor.getSelection(); - assert.deepEqual(actualSelection.toString(), expectedSelection.toString()); + let actualSelection = cursor.getSelection(); + assert.deepEqual(actualSelection.toString(), expectedSelection.toString()); - cursor.dispose(); - config.dispose(); + }); model.dispose(); } diff --git a/src/vs/editor/test/common/commands/sideEditing.test.ts b/src/vs/editor/test/common/commands/sideEditing.test.ts index 6ccc560d22cee..2fa3ea6035f98 100644 --- a/src/vs/editor/test/common/commands/sideEditing.test.ts +++ b/src/vs/editor/test/common/commands/sideEditing.test.ts @@ -5,36 +5,30 @@ 'use strict'; import * as assert from 'assert'; -import { Cursor } from 'vs/editor/common/controller/cursor'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; -import { Model } from 'vs/editor/common/model/model'; import { ILineEdit, ModelLine, LineMarker, MarkersTracker } from 'vs/editor/common/model/modelLine'; -import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; -import { viewModelHelper } from 'vs/editor/test/common/editorTestUtils'; +import { withMockCodeEditor } from "vs/editor/test/common/mocks/mockCodeEditor"; const NO_TAB_SIZE = 0; function testCommand(lines: string[], selections: Selection[], edits: IIdentifiedSingleEditOperation[], expectedLines: string[], expectedSelections: Selection[]): void { - let model = Model.createFromString(lines.join('\n')); - let config = new TestConfiguration(null); - let cursor = new Cursor(config, model, viewModelHelper(model)); + withMockCodeEditor(lines, {}, (editor, cursor) => { + const model = editor.getModel(); - cursor.setSelections('tests', selections); + cursor.setSelections('tests', selections); - model.applyEdits(edits); + model.applyEdits(edits); - assert.deepEqual(model.getLinesContent(), expectedLines); + assert.deepEqual(model.getLinesContent(), expectedLines); - let actualSelections = cursor.getSelections(); - assert.deepEqual(actualSelections.map(s => s.toString()), expectedSelections.map(s => s.toString())); + let actualSelections = cursor.getSelections(); + assert.deepEqual(actualSelections.map(s => s.toString()), expectedSelections.map(s => s.toString())); - cursor.dispose(); - config.dispose(); - model.dispose(); + }); } function testLineEditMarker(text: string, column: number, stickToPreviousCharacter: boolean, edit: ILineEdit, expectedColumn: number): void { diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index a2700b342cb51..3619bef7d237d 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -21,12 +21,12 @@ import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageCo import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; import { MockMode } from 'vs/editor/test/common/mocks/mockMode'; import { LanguageIdentifier } from 'vs/editor/common/modes'; -import { viewModelHelper } from 'vs/editor/test/common/editorTestUtils'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { CoreNavigationCommands, CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; import { withMockCodeEditor } from "vs/editor/test/common/mocks/mockCodeEditor"; import { TextModel } from "vs/editor/common/model/textModel"; +import { ViewModel } from "vs/editor/common/viewModel/viewModelImpl"; let H = Handler; @@ -136,6 +136,7 @@ suite('Editor Controller - Cursor', () => { let thisModel: Model; let thisConfiguration: TestConfiguration; + let thisViewModel: ViewModel; let thisCursor: Cursor; setup(() => { @@ -148,11 +149,14 @@ suite('Editor Controller - Cursor', () => { thisModel = Model.createFromString(text); thisConfiguration = new TestConfiguration(null); - thisCursor = new Cursor(thisConfiguration, thisModel, viewModelHelper(thisModel)); + thisViewModel = new ViewModel(0, thisConfiguration, thisModel); + + thisCursor = new Cursor(thisConfiguration, thisModel, thisViewModel); }); teardown(() => { thisCursor.dispose(); + thisViewModel.dispose(); thisModel.dispose(); thisConfiguration.dispose(); }); @@ -700,39 +704,37 @@ suite('Editor Controller - Cursor', () => { }); test('column select 1', () => { - let model = Model.createFromString([ + withMockCodeEditor([ '\tprivate compute(a:number): boolean {', '\t\tif (a + 3 === 0 || a + 5 === 0) {', '\t\t\treturn false;', '\t\t}', '\t}' - ].join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model)); + ], {}, (editor, cursor) => { - moveTo(cursor, 1, 7, false); - assertCursor(cursor, new Position(1, 7)); + moveTo(cursor, 1, 7, false); + assertCursor(cursor, new Position(1, 7)); - CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(cursor, { - position: new Position(4, 4), - viewPosition: new Position(4, 4), - mouseColumn: 15 - }); + CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(cursor, { + position: new Position(4, 4), + viewPosition: new Position(4, 4), + mouseColumn: 15 + }); - let expectedSelections = [ - new Selection(1, 7, 1, 12), - new Selection(2, 4, 2, 9), - new Selection(3, 3, 3, 6), - new Selection(4, 4, 4, 4), - ]; + let expectedSelections = [ + new Selection(1, 7, 1, 12), + new Selection(2, 4, 2, 9), + new Selection(3, 3, 3, 6), + new Selection(4, 4, 4, 4), + ]; - assertCursor(cursor, expectedSelections); + assertCursor(cursor, expectedSelections); - cursor.dispose(); - model.dispose(); + }); }); test('issue #4905 - column select is biased to the right', () => { - let model = Model.createFromString([ + const model = Model.createFromString([ 'var gulp = require("gulp");', 'var path = require("path");', 'var rimraf = require("rimraf");', @@ -741,7 +743,9 @@ suite('Editor Controller - Cursor', () => { 'var concat = require("gulp-concat");', 'var newer = require("gulp-newer");', ].join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model)); + const config = new TestConfiguration(null); + const viewModel = new ViewModel(0, config, model); + const cursor = new Cursor(config, model, viewModel); moveTo(cursor, 1, 4, false); assertCursor(cursor, new Position(1, 4)); @@ -760,11 +764,13 @@ suite('Editor Controller - Cursor', () => { ]); cursor.dispose(); + viewModel.dispose(); + config.dispose(); model.dispose(); }); test('issue #20087: column select with mouse', () => { - let model = Model.createFromString([ + const model = Model.createFromString([ '', '', '', @@ -776,7 +782,9 @@ suite('Editor Controller - Cursor', () => { '', '', ].join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model)); + const config = new TestConfiguration(null); + const viewModel = new ViewModel(0, config, model); + const cursor = new Cursor(config, model, viewModel); moveTo(cursor, 10, 10, false); assertCursor(cursor, new Position(10, 10)); @@ -818,11 +826,13 @@ suite('Editor Controller - Cursor', () => { ]); cursor.dispose(); + viewModel.dispose(); + config.dispose(); model.dispose(); }); test('issue #20087: column select with keyboard', () => { - let model = Model.createFromString([ + const model = Model.createFromString([ '', '', '', @@ -834,7 +844,9 @@ suite('Editor Controller - Cursor', () => { '', '', ].join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model)); + const config = new TestConfiguration(null); + const viewModel = new ViewModel(0, config, model); + const cursor = new Cursor(config, model, viewModel); moveTo(cursor, 10, 10, false); assertCursor(cursor, new Position(10, 10)); @@ -866,11 +878,13 @@ suite('Editor Controller - Cursor', () => { ]); cursor.dispose(); + viewModel.dispose(); + config.dispose(); model.dispose(); }); test('column select with keyboard', () => { - let model = Model.createFromString([ + const model = Model.createFromString([ 'var gulp = require("gulp");', 'var path = require("path");', 'var rimraf = require("rimraf");', @@ -879,7 +893,9 @@ suite('Editor Controller - Cursor', () => { 'var concat = require("gulp-concat");', 'var newer = require("gulp-newer");', ].join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model)); + const config = new TestConfiguration(null); + const viewModel = new ViewModel(0, config, model); + const cursor = new Cursor(config, model, viewModel); moveTo(cursor, 1, 4, false); assertCursor(cursor, new Position(1, 4)); @@ -1076,6 +1092,8 @@ suite('Editor Controller - Cursor', () => { ]); cursor.dispose(); + viewModel.dispose(); + config.dispose(); model.dispose(); }); }); @@ -1438,45 +1456,41 @@ suite('Editor Controller - Regression tests', () => { }); test('bug #16740: [editor] Cut line doesn\'t quite cut the last line', () => { + // Part 1 => there is text on the last line - let text = [ + withMockCodeEditor([ 'asdasd', 'qwerty' - ]; - let model = Model.createFromString(text.join('\n')); - let cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model)); + ], {}, (editor, cursor) => { + const model = editor.getModel(); - moveTo(cursor, 2, 1, false); - assertCursor(cursor, new Selection(2, 1, 2, 1)); + moveTo(cursor, 2, 1, false); + assertCursor(cursor, new Selection(2, 1, 2, 1)); - cursorCommand(cursor, H.Cut, null, 'keyboard'); - assert.equal(model.getLineCount(), 1); - assert.equal(model.getLineContent(1), 'asdasd'); + cursorCommand(cursor, H.Cut, null, 'keyboard'); + assert.equal(model.getLineCount(), 1); + assert.equal(model.getLineContent(1), 'asdasd'); - cursor.dispose(); - model.dispose(); + }); // Part 2 => there is no text on the last line - text = [ + withMockCodeEditor([ 'asdasd', '' - ]; - model = Model.createFromString(text.join('\n')); - cursor = new Cursor(new TestConfiguration(null), model, viewModelHelper(model)); - - moveTo(cursor, 2, 1, false); - assertCursor(cursor, new Selection(2, 1, 2, 1)); + ], {}, (editor, cursor) => { + const model = editor.getModel(); - cursorCommand(cursor, H.Cut, null, 'keyboard'); - assert.equal(model.getLineCount(), 1); - assert.equal(model.getLineContent(1), 'asdasd'); + moveTo(cursor, 2, 1, false); + assertCursor(cursor, new Selection(2, 1, 2, 1)); - cursorCommand(cursor, H.Cut, null, 'keyboard'); - assert.equal(model.getLineCount(), 1); - assert.equal(model.getLineContent(1), ''); + cursorCommand(cursor, H.Cut, null, 'keyboard'); + assert.equal(model.getLineCount(), 1); + assert.equal(model.getLineContent(1), 'asdasd'); - cursor.dispose(); - model.dispose(); + cursorCommand(cursor, H.Cut, null, 'keyboard'); + assert.equal(model.getLineCount(), 1); + assert.equal(model.getLineContent(1), ''); + }); }); test('Bug #11476: Double bracket surrounding + undo is broken', () => { @@ -2756,11 +2770,13 @@ interface ICursorOpts { function usingCursor(opts: ICursorOpts, callback: (model: Model, cursor: Cursor) => void): void { let model = Model.createFromString(opts.text.join('\n'), opts.modelOpts, opts.languageIdentifier); let config = new TestConfiguration(opts.editorOpts); - let cursor = new Cursor(config, model, viewModelHelper(model)); + let viewModel = new ViewModel(0, config, model); + let cursor = new Cursor(config, model, viewModel); callback(model, cursor); cursor.dispose(); + viewModel.dispose(); config.dispose(); model.dispose(); } diff --git a/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts b/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts index acab85b463e78..7236cf52bb8e7 100644 --- a/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts +++ b/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts @@ -11,18 +11,18 @@ import { ITextModelCreationOptions } from 'vs/editor/common/editorCommon'; import { Model } from 'vs/editor/common/model/model'; import { IMode } from 'vs/editor/common/modes'; import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; -import { viewModelHelper as aViewModelHelper } from 'vs/editor/test/common/editorTestUtils'; import { CursorMove } from 'vs/editor/common/controller/cursorMoveCommands'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; -import { IViewModelHelper } from 'vs/editor/common/controller/cursorCommon'; import { CoreNavigationCommands } from 'vs/editor/common/controller/coreCommands'; +import { ViewModel } from "vs/editor/common/viewModel/viewModelImpl"; suite('Cursor move command test', () => { let thisModel: Model; let thisConfiguration: TestConfiguration; + let thisViewModel: ViewModel; let thisCursor: Cursor; setup(() => { @@ -36,16 +36,18 @@ suite('Cursor move command test', () => { thisModel = Model.createFromString(text); thisConfiguration = new TestConfiguration(null); + thisViewModel = new ViewModel(0, thisConfiguration, thisModel); + thisCursor = new Cursor(thisConfiguration, thisModel, thisViewModel); }); teardown(() => { thisCursor.dispose(); + thisViewModel.dispose(); thisModel.dispose(); thisConfiguration.dispose(); }); test('move left should move to left character', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveLeft(thisCursor); @@ -54,7 +56,6 @@ suite('Cursor move command test', () => { }); test('move left should move to left by n characters', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveLeft(thisCursor, 3); @@ -63,7 +64,6 @@ suite('Cursor move command test', () => { }); test('move left should move to left by half line', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveLeft(thisCursor, 1, CursorMove.RawUnit.HalfLine); @@ -72,7 +72,6 @@ suite('Cursor move command test', () => { }); test('move left moves to previous line', () => { - thisCursor = aCursor(); moveTo(thisCursor, 2, 3); moveLeft(thisCursor, 10); @@ -81,7 +80,6 @@ suite('Cursor move command test', () => { }); test('move right should move to right character', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 5); moveRight(thisCursor); @@ -90,7 +88,6 @@ suite('Cursor move command test', () => { }); test('move right should move to right by n characters', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 2); moveRight(thisCursor, 6); @@ -99,7 +96,6 @@ suite('Cursor move command test', () => { }); test('move right should move to right by half line', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 4); moveRight(thisCursor, 1, CursorMove.RawUnit.HalfLine); @@ -108,7 +104,6 @@ suite('Cursor move command test', () => { }); test('move right moves to next line', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveRight(thisCursor, 100); @@ -117,14 +112,12 @@ suite('Cursor move command test', () => { }); test('move to first character of line from middle', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveToLineStart(thisCursor); cursorEqual(thisCursor, 1, 1); }); test('move to first character of line from first non white space character', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 6); moveToLineStart(thisCursor); @@ -133,7 +126,6 @@ suite('Cursor move command test', () => { }); test('move to first character of line from first character', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 1); moveToLineStart(thisCursor); @@ -142,7 +134,6 @@ suite('Cursor move command test', () => { }); test('move to first non white space character of line from middle', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveToLineFirstNonWhiteSpaceCharacter(thisCursor); @@ -151,7 +142,6 @@ suite('Cursor move command test', () => { }); test('move to first non white space character of line from first non white space character', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 6); moveToLineFirstNonWhiteSpaceCharacter(thisCursor); @@ -160,7 +150,6 @@ suite('Cursor move command test', () => { }); test('move to first non white space character of line from first character', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 1); moveToLineFirstNonWhiteSpaceCharacter(thisCursor); @@ -169,7 +158,6 @@ suite('Cursor move command test', () => { }); test('move to end of line from middle', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveToLineEnd(thisCursor); @@ -178,7 +166,6 @@ suite('Cursor move command test', () => { }); test('move to end of line from last non white space character', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 19); moveToLineEnd(thisCursor); @@ -187,7 +174,6 @@ suite('Cursor move command test', () => { }); test('move to end of line from line end', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 21); moveToLineEnd(thisCursor); @@ -196,7 +182,6 @@ suite('Cursor move command test', () => { }); test('move to last non white space character from middle', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveToLineLastNonWhiteSpaceCharacter(thisCursor); @@ -205,7 +190,6 @@ suite('Cursor move command test', () => { }); test('move to last non white space character from last non white space character', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 19); moveToLineLastNonWhiteSpaceCharacter(thisCursor); @@ -214,7 +198,6 @@ suite('Cursor move command test', () => { }); test('move to last non white space character from line end', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 21); moveToLineLastNonWhiteSpaceCharacter(thisCursor); @@ -223,7 +206,6 @@ suite('Cursor move command test', () => { }); test('move to center of line not from center', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 8); moveToLineCenter(thisCursor); @@ -232,7 +214,6 @@ suite('Cursor move command test', () => { }); test('move to center of line from center', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 11); moveToLineCenter(thisCursor); @@ -241,7 +222,6 @@ suite('Cursor move command test', () => { }); test('move to center of line from start', () => { - thisCursor = aCursor(); moveToLineStart(thisCursor); moveToLineCenter(thisCursor); @@ -250,7 +230,6 @@ suite('Cursor move command test', () => { }); test('move to center of line from end', () => { - thisCursor = aCursor(); moveToLineEnd(thisCursor); moveToLineCenter(thisCursor); @@ -259,7 +238,6 @@ suite('Cursor move command test', () => { }); test('move up by cursor move command', () => { - thisCursor = aCursor(); moveTo(thisCursor, 3, 5); cursorEqual(thisCursor, 3, 5); @@ -272,7 +250,6 @@ suite('Cursor move command test', () => { }); test('move up by model line cursor move command', () => { - thisCursor = aCursor(); moveTo(thisCursor, 3, 5); cursorEqual(thisCursor, 3, 5); @@ -285,7 +262,6 @@ suite('Cursor move command test', () => { }); test('move down by model line cursor move command', () => { - thisCursor = aCursor(); moveTo(thisCursor, 3, 5); cursorEqual(thisCursor, 3, 5); @@ -298,7 +274,6 @@ suite('Cursor move command test', () => { }); test('move up with selection by cursor move command', () => { - thisCursor = aCursor(); moveTo(thisCursor, 3, 5); cursorEqual(thisCursor, 3, 5); @@ -311,7 +286,6 @@ suite('Cursor move command test', () => { }); test('move up and down with tabs by cursor move command', () => { - thisCursor = aCursor(); moveTo(thisCursor, 1, 5); cursorEqual(thisCursor, 1, 5); @@ -333,7 +307,6 @@ suite('Cursor move command test', () => { }); test('move up and down with end of lines starting from a long one by cursor move command', () => { - thisCursor = aCursor(); moveToEndOfLine(thisCursor); cursorEqual(thisCursor, 1, 21); @@ -355,9 +328,7 @@ suite('Cursor move command test', () => { }); test('move to view top line moves to first visible line if it is first line', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(1, 1, 10, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(1, 1, 10, 1); moveTo(thisCursor, 2, 2); moveToTop(thisCursor); @@ -366,9 +337,7 @@ suite('Cursor move command test', () => { }); test('move to view top line moves to top visible line when first line is not visible', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(2, 1, 10, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(2, 1, 10, 1); moveTo(thisCursor, 4, 1); moveToTop(thisCursor); @@ -377,9 +346,7 @@ suite('Cursor move command test', () => { }); test('move to view top line moves to nth line from top', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(1, 1, 10, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(1, 1, 10, 1); moveTo(thisCursor, 4, 1); moveToTop(thisCursor, 3); @@ -388,9 +355,7 @@ suite('Cursor move command test', () => { }); test('move to view top line moves to last line if n is greater than last visible line number', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(1, 1, 3, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(1, 1, 3, 1); moveTo(thisCursor, 2, 2); moveToTop(thisCursor, 4); @@ -399,9 +364,7 @@ suite('Cursor move command test', () => { }); test('move to view center line moves to the center line', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(3, 1, 3, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(3, 1, 3, 1); moveTo(thisCursor, 2, 2); moveToCenter(thisCursor); @@ -410,9 +373,7 @@ suite('Cursor move command test', () => { }); test('move to view bottom line moves to last visible line if it is last line', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(1, 1, 5, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(1, 1, 5, 1); moveTo(thisCursor, 2, 2); moveToBottom(thisCursor); @@ -421,9 +382,7 @@ suite('Cursor move command test', () => { }); test('move to view bottom line moves to last visible line when last line is not visible', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(2, 1, 3, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(2, 1, 3, 1); moveTo(thisCursor, 2, 2); moveToBottom(thisCursor); @@ -432,9 +391,7 @@ suite('Cursor move command test', () => { }); test('move to view bottom line moves to nth line from bottom', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(1, 1, 5, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(1, 1, 5, 1); moveTo(thisCursor, 4, 1); moveToBottom(thisCursor, 3); @@ -443,20 +400,13 @@ suite('Cursor move command test', () => { }); test('move to view bottom line moves to first line if n is lesser than first visible line number', () => { - let viewModelHelper = aViewModelHelper(thisModel); - viewModelHelper.getCompletelyVisibleViewRange = () => new Range(2, 1, 5, 1); - thisCursor = aCursor(viewModelHelper); + thisViewModel.getCompletelyVisibleViewRange = () => new Range(2, 1, 5, 1); moveTo(thisCursor, 4, 1); moveToBottom(thisCursor, 5); cursorEqual(thisCursor, 2, 2); }); - - function aCursor(viewModelHelper?: IViewModelHelper): Cursor { - return new Cursor(thisConfiguration, thisModel, viewModelHelper || aViewModelHelper(thisModel)); - } - }); interface ICursorOpts { diff --git a/src/vs/editor/test/common/editorTestUtils.ts b/src/vs/editor/test/common/editorTestUtils.ts index 493a466de8749..476e1c4ae260c 100644 --- a/src/vs/editor/test/common/editorTestUtils.ts +++ b/src/vs/editor/test/common/editorTestUtils.ts @@ -5,59 +5,9 @@ 'use strict'; import { Model } from 'vs/editor/common/model/model'; -import { Position } from 'vs/editor/common/core/position'; -import { Range } from 'vs/editor/common/core/range'; -import { Selection } from 'vs/editor/common/core/selection'; -import { IModel } from 'vs/editor/common/editorCommon'; -import { IViewModelHelper } from 'vs/editor/common/controller/cursorCommon'; export function withEditorModel(text: string[], callback: (model: Model) => void): void { var model = Model.createFromString(text.join('\n')); callback(model); model.dispose(); } - -export function viewModelHelper(model: IModel): IViewModelHelper { - return { - viewModel: model, - - coordinatesConverter: { - convertViewPositionToModelPosition: (viewPosition: Position): Position => { - return viewPosition; - }, - convertViewRangeToModelRange: (viewRange: Range): Range => { - return viewRange; - }, - convertViewSelectionToModelSelection: (viewSelection: Selection): Selection => { - return viewSelection; - }, - validateViewPosition: (viewPosition: Position, expectedModelPosition: Position): Position => { - return expectedModelPosition; - }, - validateViewRange: (viewRange: Range, modelRange: Range): Range => { - return modelRange; - }, - convertModelPositionToViewPosition: (modelPosition: Position): Position => { - return modelPosition; - }, - convertModelRangeToViewRange: (modelRange: Range): Range => { - return modelRange; - }, - convertModelSelectionToViewSelection: (modelSelection: Selection): Selection => { - return modelSelection; - }, - modelPositionIsVisible: (modelPosition: Position): boolean => { - return true; - }, - }, - - getScrollTop: (): number => 0, - - getCompletelyVisibleViewRange: () => null, - - getCompletelyVisibleViewRangeAtScrollTop: (scrollTop: number) => null, - - getVerticalOffsetForViewLineNumber: (viewLineNumber: number) => 0 - - }; -} diff --git a/src/vs/editor/test/common/mocks/mockCodeEditor.ts b/src/vs/editor/test/common/mocks/mockCodeEditor.ts index f927151d734fa..52e03d799064c 100644 --- a/src/vs/editor/test/common/mocks/mockCodeEditor.ts +++ b/src/vs/editor/test/common/mocks/mockCodeEditor.ts @@ -71,12 +71,31 @@ export interface MockCodeEditorCreationOptions extends editorOptions.IEditorOpti } export function withMockCodeEditor(text: string[], options: MockCodeEditorCreationOptions, callback: (editor: MockCodeEditor, cursor: Cursor) => void): void { - let editor = mockCodeEditor(text, options); + // create a model if necessary and remember it in order to dispose it. + let modelToDispose: Model = null; + if (!options.model) { + modelToDispose = Model.createFromString(text.join('\n')); + options.model = modelToDispose; + } + + let editor = _mockCodeEditor(options); callback(editor, editor.getCursor()); + + if (modelToDispose) { + modelToDispose.dispose(); + } editor.dispose(); } export function mockCodeEditor(text: string[], options: MockCodeEditorCreationOptions): CommonCodeEditor { + // TODO: who owns this model now? + if (!options.model) { + options.model = Model.createFromString(text.join('\n')); + } + return _mockCodeEditor(options); +} + +function _mockCodeEditor(options: MockCodeEditorCreationOptions): CommonCodeEditor { let contextKeyService = new MockContextKeyService(); @@ -85,10 +104,6 @@ export function mockCodeEditor(text: string[], options: MockCodeEditorCreationOp let instantiationService = new InstantiationService(services); let editor = new MockCodeEditor(new MockScopeLocation(), options, instantiationService, contextKeyService); - let model = options.model || Model.createFromString(text.join('\n')); - if (model) { - editor.setModel(model); - } - + editor.setModel(options.model); return editor; } From 2b0bb057260776e45aca236dc272557e325183cb Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 16:28:57 +0200 Subject: [PATCH 0773/2747] Fixes #26251: Update cursor's view position when view model line mapping changes --- .../browser/controller/textAreaHandler.ts | 3 +- src/vs/editor/browser/view/viewImpl.ts | 4 +- .../browser/viewParts/lines/viewLines.ts | 11 +- .../browser/viewParts/minimap/minimap.ts | 3 +- .../editor/browser/widget/codeEditorWidget.ts | 2 +- src/vs/editor/common/commonCodeEditor.ts | 16 +- .../editor/common/controller/coreCommands.ts | 3 +- src/vs/editor/common/controller/cursor.ts | 87 ++++----- .../editor/common/controller/cursorCommon.ts | 61 ++---- .../editor/common/controller/cursorEvents.ts | 46 ----- src/vs/editor/common/view/viewEvents.ts | 9 +- .../common/viewModel/viewModelCursors.ts | 184 ------------------ .../editor/common/viewModel/viewModelImpl.ts | 3 +- 13 files changed, 86 insertions(+), 346 deletions(-) delete mode 100644 src/vs/editor/common/viewModel/viewModelCursors.ts diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index 247fddd15e091..f5dab069f5889 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -16,7 +16,6 @@ import { ViewContext } from 'vs/editor/common/view/viewContext'; import { HorizontalRange, RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; -import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; import { ViewController } from 'vs/editor/browser/view/viewController'; import { EndOfLinePreference } from "vs/editor/common/editorCommon"; import { IKeyboardEvent } from "vs/base/browser/keyboardEvent"; @@ -207,7 +206,7 @@ export class TextAreaHandler extends ViewPart { this._context.privateViewEventBus.emit(new viewEvents.ViewRevealRangeRequestEvent( new Range(lineNumber, column, lineNumber, column), - VerticalRevealType.Simple, + viewEvents.VerticalRevealType.Simple, true )); diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index cc7605339cc2b..c900db8d5102e 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -49,7 +49,7 @@ import { EditorScrollbar } from 'vs/editor/browser/viewParts/editorScrollbar/edi import { Minimap } from 'vs/editor/browser/viewParts/minimap/minimap'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { IThemeService, getThemeTypeSelector } from 'vs/platform/theme/common/themeService'; -import { ViewModelCursors } from "vs/editor/common/viewModel/viewModelCursors"; +import { Cursor } from "vs/editor/common/controller/cursor"; export interface IContentWidgetData { widget: editorBrowser.IContentWidget; @@ -98,7 +98,7 @@ export class View extends ViewEventHandler { configuration: Configuration, themeService: IThemeService, model: IViewModel, - cursor: ViewModelCursors, + cursor: Cursor, execCoreEditorCommandFunc: ExecCoreEditorCommandFunc ) { super(); diff --git a/src/vs/editor/browser/viewParts/lines/viewLines.ts b/src/vs/editor/browser/viewParts/lines/viewLines.ts index 730e42ad4171a..fc5cd9f21dec9 100644 --- a/src/vs/editor/browser/viewParts/lines/viewLines.ts +++ b/src/vs/editor/browser/viewParts/lines/viewLines.ts @@ -18,7 +18,6 @@ import { IViewLines, HorizontalRange, LineVisibleRanges } from 'vs/editor/common import { Viewport } from 'vs/editor/common/viewModel/viewModel'; import { ViewPart, PartFingerprint, PartFingerprints } from 'vs/editor/browser/view/viewPart'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; class LastRenderedData { @@ -468,7 +467,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, } } - private _computeScrollTopToRevealRange(viewport: Viewport, range: Range, verticalType: VerticalRevealType): number { + private _computeScrollTopToRevealRange(viewport: Viewport, range: Range, verticalType: viewEvents.VerticalRevealType): number { let viewportStartY = viewport.top; let viewportHeight = viewport.height; let viewportEndY = viewportStartY + viewportHeight; @@ -478,15 +477,15 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, // Have a box that includes one extra line height (for the horizontal scrollbar) boxStartY = this._context.viewLayout.getVerticalOffsetForLineNumber(range.startLineNumber); boxEndY = this._context.viewLayout.getVerticalOffsetForLineNumber(range.endLineNumber) + this._lineHeight; - if (verticalType === VerticalRevealType.Simple || verticalType === VerticalRevealType.Bottom) { + if (verticalType === viewEvents.VerticalRevealType.Simple || verticalType === viewEvents.VerticalRevealType.Bottom) { // Reveal one line more when the last line would be covered by the scrollbar - arrow down case or revealing a line explicitly at bottom boxEndY += this._lineHeight; } let newScrollTop: number; - if (verticalType === VerticalRevealType.Center || verticalType === VerticalRevealType.CenterIfOutsideViewport) { - if (verticalType === VerticalRevealType.CenterIfOutsideViewport && viewportStartY <= boxStartY && boxEndY <= viewportEndY) { + if (verticalType === viewEvents.VerticalRevealType.Center || verticalType === viewEvents.VerticalRevealType.CenterIfOutsideViewport) { + if (verticalType === viewEvents.VerticalRevealType.CenterIfOutsideViewport && viewportStartY <= boxStartY && boxEndY <= viewportEndY) { // Box is already in the viewport... do nothing newScrollTop = viewportStartY; } else { @@ -495,7 +494,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, newScrollTop = Math.max(0, boxMiddleY - viewportHeight / 2); } } else { - newScrollTop = this._computeMinimumScrolling(viewportStartY, viewportEndY, boxStartY, boxEndY, verticalType === VerticalRevealType.Top, verticalType === VerticalRevealType.Bottom); + newScrollTop = this._computeMinimumScrolling(viewportStartY, viewportEndY, boxStartY, boxEndY, verticalType === viewEvents.VerticalRevealType.Top, verticalType === viewEvents.VerticalRevealType.Bottom); } return newScrollTop; diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index b24dba31f8725..5cd3d6fedefa0 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -25,7 +25,6 @@ import { RGBA } from 'vs/base/common/color'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { GlobalMouseMoveMonitor, IStandardMouseMoveEventData, standardMouseMoveMerger } from 'vs/base/browser/globalMouseMoveMonitor'; import * as platform from 'vs/base/common/platform'; -import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; import { registerThemingParticipant } from "vs/platform/theme/common/themeService"; import { scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground, scrollbarShadow } from "vs/platform/theme/common/colorRegistry"; @@ -484,7 +483,7 @@ export class Minimap extends ViewPart { this._context.privateViewEventBus.emit(new viewEvents.ViewRevealRangeRequestEvent( new Range(lineNumber, 1, lineNumber, 1), - VerticalRevealType.Center, + viewEvents.VerticalRevealType.Center, false )); }); diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index a7de1e2bac1b4..ae2b1ad3ae93f 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -420,7 +420,7 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito this._configuration, this._themeService, this.viewModel, - this.viewCursor, + this.cursor, (editorCommand: CoreEditorCommand, args: any) => { if (!this.cursor) { return; diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index 531c248be3a8f..edda01a3b786c 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -26,10 +26,10 @@ import { IModelLanguageChangedEvent, IModelOptionsChangedEvent, TextModelEventType } from 'vs/editor/common/model/textModelEvents'; import * as editorOptions from 'vs/editor/common/config/editorOptions'; -import { CursorEventType, ICursorPositionChangedEvent, VerticalRevealType, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; +import { CursorEventType, ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; -import { ViewModelCursors } from "vs/editor/common/viewModel/viewModelCursors"; import { CommonEditorRegistry } from "vs/editor/common/editorCommonExtensions"; +import { VerticalRevealType } from "vs/editor/common/view/viewEvents"; let EDITOR_ID = 0; @@ -101,7 +101,6 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo protected viewModel: ViewModel; protected cursor: Cursor; - protected viewCursor: ViewModelCursors; protected readonly _instantiationService: IInstantiationService; protected readonly _contextKeyService: IContextKeyService; @@ -903,12 +902,6 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo this.viewModel ); - this.viewCursor = new ViewModelCursors( - this._configuration, - this.viewModel, - this.cursor - ); - this._createView(); this.listenersToRemove.push(this.cursor.addBulkListener((events) => { @@ -967,11 +960,6 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo this.cursor = null; } - if (this.viewCursor) { - this.viewCursor.dispose(); - this.viewCursor = null; - } - if (this.viewModel) { this.viewModel.dispose(); this.viewModel = null; diff --git a/src/vs/editor/common/controller/coreCommands.ts b/src/vs/editor/common/controller/coreCommands.ts index 9172351e644f2..02fade2c3d2b0 100644 --- a/src/vs/editor/common/controller/coreCommands.ts +++ b/src/vs/editor/common/controller/coreCommands.ts @@ -9,7 +9,7 @@ import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { CursorState, ICursors, RevealTarget, IColumnSelectData, CursorContext } from 'vs/editor/common/controller/cursorCommon'; -import { CursorChangeReason, VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; +import { CursorChangeReason } from 'vs/editor/common/controller/cursorEvents'; import { CursorMoveCommands, CursorMove as CursorMove_ } from 'vs/editor/common/controller/cursorMoveCommands'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { registerEditorCommand, ICommandOptions, EditorCommand, Command } from 'vs/editor/common/editorCommonExtensions'; @@ -25,6 +25,7 @@ import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands import { IEditorService } from 'vs/platform/editor/common/editor'; import { TypeOperations } from "vs/editor/common/controller/cursorTypeOperations"; import { DeleteOperations } from "vs/editor/common/controller/cursorDeleteOperations"; +import { VerticalRevealType } from "vs/editor/common/view/viewEvents"; const CORE_WEIGHT = KeybindingsRegistry.WEIGHT.editorCore(); diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 3a596ad5730fa..8dfcf3112e7af 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -8,21 +8,31 @@ import * as nls from 'vs/nls'; import * as strings from 'vs/base/common/strings'; import { onUnexpectedError } from 'vs/base/common/errors'; import { EventEmitter, BulkListenerCallback } from 'vs/base/common/eventEmitter'; -import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; +import { IDisposable } from 'vs/base/common/lifecycle'; import { CursorCollection } from 'vs/editor/common/controller/cursorCollection'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { Selection, SelectionDirection, ISelection } from 'vs/editor/common/core/selection'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { CursorColumns, CursorConfiguration, EditOperationResult, IViewModelHelper, CursorContext, CursorState, RevealTarget, IColumnSelectData, ICursors } from 'vs/editor/common/controller/cursorCommon'; +import { CursorColumns, CursorConfiguration, EditOperationResult, CursorContext, CursorState, RevealTarget, IColumnSelectData, ICursors } from 'vs/editor/common/controller/cursorCommon'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { DeleteOperations } from 'vs/editor/common/controller/cursorDeleteOperations'; import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; import { TextModelEventType, ModelRawContentChangedEvent, RawContentChangedType } from 'vs/editor/common/model/textModelEvents'; -import { CursorEventType, CursorChangeReason, ICursorPositionChangedEvent, VerticalRevealType, ICursorSelectionChangedEvent, ICursorRevealRangeEvent, CursorScrollRequest } from 'vs/editor/common/controller/cursorEvents'; +import { CursorEventType, CursorChangeReason, ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { IViewModel } from "vs/editor/common/viewModel/viewModel"; +import * as viewEvents from 'vs/editor/common/view/viewEvents'; -export class Cursor extends Disposable implements ICursors { +function containsLineMappingChanged(events: viewEvents.ViewEvent[]): boolean { + for (let i = 0, len = events.length; i < len; i++) { + if (events[i].type === viewEvents.ViewEventType.ViewLineMappingChanged) { + return true; + } + } + return false; +} + +export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { public onDidChangePosition(listener: (e: ICursorPositionChangedEvent) => void): IDisposable { return this._eventEmitter.addListener(CursorEventType.CursorPositionChanged, listener); @@ -37,7 +47,7 @@ export class Cursor extends Disposable implements ICursors { private readonly _eventEmitter: EventEmitter; private readonly _configuration: editorCommon.IConfiguration; private readonly _model: editorCommon.IModel; - private readonly _viewModelHelper: IViewModelHelper; + private readonly _viewModel: IViewModel; public context: CursorContext; private _cursors: CursorCollection; @@ -50,26 +60,8 @@ export class Cursor extends Disposable implements ICursors { this._eventEmitter = this._register(new EventEmitter()); this._configuration = configuration; this._model = model; - - let viewModelHelper: IViewModelHelper = { - viewModel: viewModel, - coordinatesConverter: viewModel.coordinatesConverter, - getScrollTop: (): number => { - return viewModel.viewLayout.getScrollTop(); - }, - getCompletelyVisibleViewRange: (): Range => { - return viewModel.getCompletelyVisibleViewRange(); - }, - getCompletelyVisibleViewRangeAtScrollTop: (scrollTop: number): Range => { - return viewModel.getCompletelyVisibleViewRangeAtScrollTop(scrollTop); - }, - getVerticalOffsetForViewLineNumber: (viewLineNumber: number): number => { - return viewModel.viewLayout.getVerticalOffsetForLineNumber(viewLineNumber); - } - }; - - this._viewModelHelper = viewModelHelper; - this.context = new CursorContext(this._configuration, this._model, this._viewModelHelper); + this._viewModel = viewModel; + this.context = new CursorContext(this._configuration, this._model, this._viewModel); this._cursors = new CursorCollection(this.context); this._isHandling = false; @@ -101,8 +93,17 @@ export class Cursor extends Disposable implements ICursors { this._onModelContentChanged(hadFlushEvent); })); + this._register(viewModel.addEventListener((events: viewEvents.ViewEvent[]) => { + if (!containsLineMappingChanged(events)) { + return; + } + + // Ensure valid state + this.setStates('viewModel', CursorChangeReason.NotSet, this.getAll()); + })); + const updateCursorContext = () => { - this.context = new CursorContext(this._configuration, this._model, this._viewModelHelper); + this.context = new CursorContext(this._configuration, this._model, this._viewModel); this._cursors.updateContext(this.context); }; this._register(this._model.onDidChangeLanguage((e) => { @@ -165,10 +166,6 @@ export class Cursor extends Disposable implements ICursors { const oldSelections = this._cursors.getSelections(); const oldViewSelections = this._cursors.getViewSelections(); - // TODO@Alex - // ensure valid state on all cursors - // this.cursors.ensureValidState(); - this._cursors.setStates(states); this._cursors.normalize(); this._columnSelectData = null; @@ -187,17 +184,17 @@ export class Cursor extends Disposable implements ICursors { } public reveal(horizontal: boolean, target: RevealTarget): void { - this._revealRange(target, VerticalRevealType.Simple, horizontal); + this._revealRange(target, viewEvents.VerticalRevealType.Simple, horizontal); } - public revealRange(revealHorizontal: boolean, modelRange: Range, viewRange: Range, verticalType: VerticalRevealType) { + public revealRange(revealHorizontal: boolean, modelRange: Range, viewRange: Range, verticalType: viewEvents.VerticalRevealType) { this.emitCursorRevealRange(modelRange, viewRange, verticalType, revealHorizontal); } public scrollTo(desiredScrollTop: number): void { - this._eventEmitter.emit(CursorEventType.CursorScrollRequest, new CursorScrollRequest( - desiredScrollTop - )); + this._viewModel.viewLayout.setScrollPosition({ + scrollTop: desiredScrollTop + }); } public saveState(): editorCommon.ICursorState[] { @@ -375,6 +372,7 @@ export class Cursor extends Disposable implements ICursors { isInEditableRange: isInEditableRange }; this._eventEmitter.emit(CursorEventType.CursorPositionChanged, e); + this._emit([new viewEvents.ViewCursorPositionChangedEvent(primaryViewPosition, secondaryViewPositions, isInEditableRange)]); } private _emitCursorSelectionChanged(source: string, reason: CursorChangeReason): void { @@ -395,9 +393,10 @@ export class Cursor extends Disposable implements ICursors { reason: reason }; this._eventEmitter.emit(CursorEventType.CursorSelectionChanged, e); + this._emit([new viewEvents.ViewCursorSelectionChangedEvent(primaryViewSelection, secondaryViewSelections)]); } - private _revealRange(revealTarget: RevealTarget, verticalType: VerticalRevealType, revealHorizontal: boolean): void { + private _revealRange(revealTarget: RevealTarget, verticalType: viewEvents.VerticalRevealType, revealHorizontal: boolean): void { const positions = this._cursors.getPositions(); const viewPositions = this._cursors.getViewPositions(); @@ -430,14 +429,12 @@ export class Cursor extends Disposable implements ICursors { this.emitCursorRevealRange(range, viewRange, verticalType, revealHorizontal); } - public emitCursorRevealRange(range: Range, viewRange: Range, verticalType: VerticalRevealType, revealHorizontal: boolean) { - const e: ICursorRevealRangeEvent = { - range: range, - viewRange: viewRange, - verticalType: verticalType, - revealHorizontal: revealHorizontal - }; - this._eventEmitter.emit(CursorEventType.CursorRevealRange, e); + public emitCursorRevealRange(range: Range, viewRange: Range, verticalType: viewEvents.VerticalRevealType, revealHorizontal: boolean) { + // Ensure event has viewRange + if (!viewRange) { + viewRange = this.context.convertModelRangeToViewRange(range); + } + this._emit([new viewEvents.ViewRevealRangeRequestEvent(viewRange, verticalType, revealHorizontal)]); } // ----------------------------------------------------------------------------------------------------------- @@ -512,7 +509,7 @@ export class Cursor extends Disposable implements ICursors { const newViewSelections = this._cursors.getViewSelections(); if (Cursor._somethingChanged(oldSelections, oldViewSelections, newSelections, newViewSelections)) { this._emitCursorPositionChanged(source, cursorChangeReason); - this._revealRange(RevealTarget.Primary, VerticalRevealType.Simple, true); + this._revealRange(RevealTarget.Primary, viewEvents.VerticalRevealType.Simple, true); this._emitCursorSelectionChanged(source, cursorChangeReason); } } diff --git a/src/vs/editor/common/controller/cursorCommon.ts b/src/vs/editor/common/controller/cursorCommon.ts index a8d9c46dfcad2..6adb347b4dcb2 100644 --- a/src/vs/editor/common/controller/cursorCommon.ts +++ b/src/vs/editor/common/controller/cursorCommon.ts @@ -16,8 +16,9 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import { LanguageIdentifier } from 'vs/editor/common/modes'; import { IAutoClosingPair } from 'vs/editor/common/modes/languageConfiguration'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; -import { ICoordinatesConverter } from 'vs/editor/common/viewModel/viewModel'; -import { CursorChangeReason, VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; +import { IViewModel } from 'vs/editor/common/viewModel/viewModel'; +import { CursorChangeReason } from 'vs/editor/common/controller/cursorEvents'; +import { VerticalRevealType } from "vs/editor/common/view/viewEvents"; export interface IColumnSelectData { toViewLineNumber: number; @@ -259,92 +260,72 @@ export class SingleCursorState { } } -export interface IViewModelHelper { - - coordinatesConverter: ICoordinatesConverter; - - viewModel: ICursorSimpleModel; - - getScrollTop(): number; - - getCompletelyVisibleViewRange(): Range; - - getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range; - - getVerticalOffsetForViewLineNumber(viewLineNumber: number): number; -} - export class CursorContext { _cursorContextBrand: void; public readonly model: IModel; - public readonly viewModel: ICursorSimpleModel; + public readonly viewModel: IViewModel; public readonly config: CursorConfiguration; - private readonly _viewModelHelper: IViewModelHelper; - private readonly _coordinatesConverter: ICoordinatesConverter; - - constructor(configuration: IConfiguration, model: IModel, viewModelHelper: IViewModelHelper) { + constructor(configuration: IConfiguration, model: IModel, viewModel: IViewModel) { this.model = model; - this.viewModel = viewModelHelper.viewModel; + this.viewModel = viewModel; this.config = new CursorConfiguration( this.model.getLanguageIdentifier(), this.model.getOneIndent(), this.model.getOptions(), configuration - );; - this._viewModelHelper = viewModelHelper; - this._coordinatesConverter = viewModelHelper.coordinatesConverter; + ); } public validateViewPosition(viewPosition: Position, modelPosition: Position): Position { - return this._coordinatesConverter.validateViewPosition(viewPosition, modelPosition); + return this.viewModel.coordinatesConverter.validateViewPosition(viewPosition, modelPosition); } public validateViewRange(viewRange: Range, expectedModelRange: Range): Range { - return this._coordinatesConverter.validateViewRange(viewRange, expectedModelRange); + return this.viewModel.coordinatesConverter.validateViewRange(viewRange, expectedModelRange); } public convertViewRangeToModelRange(viewRange: Range): Range { - return this._coordinatesConverter.convertViewRangeToModelRange(viewRange); + return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange); } public convertViewPositionToModelPosition(lineNumber: number, column: number): Position { - return this._coordinatesConverter.convertViewPositionToModelPosition(new Position(lineNumber, column)); + return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Position(lineNumber, column)); } public convertModelPositionToViewPosition(modelPosition: Position): Position { - return this._coordinatesConverter.convertModelPositionToViewPosition(modelPosition); + return this.viewModel.coordinatesConverter.convertModelPositionToViewPosition(modelPosition); } public convertModelRangeToViewRange(modelRange: Range): Range { - return this._coordinatesConverter.convertModelRangeToViewRange(modelRange); + return this.viewModel.coordinatesConverter.convertModelRangeToViewRange(modelRange); } public getScrollTop(): number { - return this._viewModelHelper.getScrollTop(); + return this.viewModel.viewLayout.getScrollTop(); } public getCompletelyVisibleViewRange(): Range { - return this._viewModelHelper.getCompletelyVisibleViewRange(); + return this.viewModel.getCompletelyVisibleViewRange(); } public getCompletelyVisibleModelRange(): Range { - const viewRange = this._viewModelHelper.getCompletelyVisibleViewRange(); - return this._coordinatesConverter.convertViewRangeToModelRange(viewRange); + const viewRange = this.viewModel.getCompletelyVisibleViewRange(); + return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange); } public getCompletelyVisibleViewRangeAtScrollTop(scrollTop: number): Range { - return this._viewModelHelper.getCompletelyVisibleViewRangeAtScrollTop(scrollTop); + return this.viewModel.getCompletelyVisibleViewRangeAtScrollTop(scrollTop); } public getCompletelyVisibleModelRangeAtScrollTop(scrollTop: number): Range { - const viewRange = this._viewModelHelper.getCompletelyVisibleViewRangeAtScrollTop(scrollTop); - return this._coordinatesConverter.convertViewRangeToModelRange(viewRange); + const viewRange = this.viewModel.getCompletelyVisibleViewRangeAtScrollTop(scrollTop); + return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange); } public getVerticalOffsetForViewLine(viewLineNumber: number): number { - return this._viewModelHelper.getVerticalOffsetForViewLineNumber(viewLineNumber); + return this.viewModel.viewLayout.getVerticalOffsetForLineNumber(viewLineNumber); } } diff --git a/src/vs/editor/common/controller/cursorEvents.ts b/src/vs/editor/common/controller/cursorEvents.ts index 5b0992d96f18d..01dc81093d403 100644 --- a/src/vs/editor/common/controller/cursorEvents.ts +++ b/src/vs/editor/common/controller/cursorEvents.ts @@ -6,7 +6,6 @@ 'use strict'; import { Position } from 'vs/editor/common/core/position'; -import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; /** @@ -15,8 +14,6 @@ import { Selection } from 'vs/editor/common/core/selection'; export const CursorEventType = { CursorPositionChanged: 'positionChanged', CursorSelectionChanged: 'selectionChanged', - CursorRevealRange: 'revealRange', - CursorScrollRequest: 'scrollRequest', }; /** @@ -114,46 +111,3 @@ export interface ICursorSelectionChangedEvent { */ readonly reason: CursorChangeReason; } -/** - * @internal - */ -export const enum VerticalRevealType { - Simple = 0, - Center = 1, - CenterIfOutsideViewport = 2, - Top = 3, - Bottom = 4 -} -/** - * An event describing a request to reveal a specific range in the view of the editor. - * @internal - */ -export interface ICursorRevealRangeEvent { - /** - * Range to be reavealed. - */ - readonly range: Range; - /** - * View range to be reavealed. - */ - readonly viewRange: Range; - - readonly verticalType: VerticalRevealType; - /** - * If true: there should be a horizontal & vertical revealing - * If false: there should be just a vertical revealing - */ - readonly revealHorizontal: boolean; -} - -/** - * @internal - */ -export class CursorScrollRequest { - - public readonly desiredScrollTop: number; - - constructor(desiredScrollTop: number) { - this.desiredScrollTop = desiredScrollTop; - } -} diff --git a/src/vs/editor/common/view/viewEvents.ts b/src/vs/editor/common/view/viewEvents.ts index 7ad7a285c6d0d..d100a0ca0ec55 100644 --- a/src/vs/editor/common/view/viewEvents.ts +++ b/src/vs/editor/common/view/viewEvents.ts @@ -9,7 +9,6 @@ import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { ScrollEvent } from 'vs/base/common/scrollable'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; -import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; import * as errors from 'vs/base/common/errors'; import { IDisposable, Disposable } from "vs/base/common/lifecycle"; @@ -199,6 +198,14 @@ export class ViewLinesInsertedEvent { } } +export const enum VerticalRevealType { + Simple = 0, + Center = 1, + CenterIfOutsideViewport = 2, + Top = 3, + Bottom = 4 +} + export class ViewRevealRangeRequestEvent { public readonly type = ViewEventType.ViewRevealRangeRequest; diff --git a/src/vs/editor/common/viewModel/viewModelCursors.ts b/src/vs/editor/common/viewModel/viewModelCursors.ts deleted file mode 100644 index b0e5fb8d920ad..0000000000000 --- a/src/vs/editor/common/viewModel/viewModelCursors.ts +++ /dev/null @@ -1,184 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import * as editorCommon from 'vs/editor/common/editorCommon'; -import { Position } from 'vs/editor/common/core/position'; -import { ICoordinatesConverter, ViewEventsCollector, IViewModel } from 'vs/editor/common/viewModel/viewModel'; -import { Selection } from 'vs/editor/common/core/selection'; -import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { ICursorRevealRangeEvent, CursorEventType, CursorScrollRequest } from 'vs/editor/common/controller/cursorEvents'; -import { Cursor } from "vs/editor/common/controller/cursor"; -import { EmitterEvent } from "vs/base/common/eventEmitter"; - -export interface ICursorPositionChangedEvent { - readonly position: Position; - readonly viewPosition: Position; - readonly secondaryPositions: Position[]; - readonly secondaryViewPositions: Position[]; - readonly isInEditableRange: boolean; -} - -export interface ICursorSelectionChangedEvent { - readonly selection: Selection; - readonly viewSelection: Selection; - readonly secondarySelections: Selection[]; - readonly secondaryViewSelections: Selection[]; -} - -function containsLineMappingChanged(events: viewEvents.ViewEvent[]): boolean { - for (let i = 0, len = events.length; i < len; i++) { - if (events[i].type === viewEvents.ViewEventType.ViewLineMappingChanged) { - return true; - } - } - return false; -} - -export class ViewModelCursors extends viewEvents.ViewEventEmitter { - - private readonly configuration: editorCommon.IConfiguration; - private readonly viewModel: IViewModel; - private readonly cursor: Cursor; - private readonly coordinatesConverter: ICoordinatesConverter; - - private lastCursorPositionChangedEvent: ICursorPositionChangedEvent; - private lastCursorSelectionChangedEvent: ICursorSelectionChangedEvent; - - constructor(configuration: editorCommon.IConfiguration, viewModel: IViewModel, cursor: Cursor) { - super(); - this.configuration = configuration; - this.viewModel = viewModel; - this.cursor = cursor; - this.coordinatesConverter = viewModel.coordinatesConverter; - this.lastCursorPositionChangedEvent = null; - this.lastCursorSelectionChangedEvent = null; - - this._register(cursor.addBulkListener((events: EmitterEvent[]) => { - const eventsCollector = new ViewEventsCollector(); - this._onCursorEvents(eventsCollector, events); - this._emit(eventsCollector.finalize()); - })); - - this._register(viewModel.addEventListener((events: viewEvents.ViewEvent[]) => { - if (!containsLineMappingChanged(events)) { - return; - } - const eventsCollector = new ViewEventsCollector(); - this.onLineMappingChanged(eventsCollector); - this._emit(eventsCollector.finalize()); - })); - } - - private _onCursorEvents(eventsCollector: ViewEventsCollector, events: EmitterEvent[]): void { - for (let i = 0, len = events.length; i < len; i++) { - const _e = events[i]; - const type = _e.type; - const data = _e.data; - - switch (type) { - case CursorEventType.CursorPositionChanged: { - const e = data; - this.onCursorPositionChanged(eventsCollector, e); - break; - } - case CursorEventType.CursorSelectionChanged: { - const e = data; - this.onCursorSelectionChanged(eventsCollector, e); - break; - } - case CursorEventType.CursorRevealRange: { - const e = data; - this.onCursorRevealRange(eventsCollector, e); - break; - } - case CursorEventType.CursorScrollRequest: { - const e = data; - this.viewModel.viewLayout.setScrollPosition({ - scrollTop: e.desiredScrollTop - }); - break; - } - default: - console.info('View received unknown event: '); - console.info(type, data); - } - } - } - - public dispose(): void { - super.dispose(); - } - - /** - * Limit position to be somewhere where it can actually be rendered - */ - private static _toPositionThatCanBeRendered(position: Position, stopRenderingLineAfter: number) { - // Limit position to be somewhere where it can actually be rendered - if (stopRenderingLineAfter !== -1 && position.column > stopRenderingLineAfter) { - position = new Position(position.lineNumber, stopRenderingLineAfter); - } - return position; - } - - private onCursorPositionChanged(eventsCollector: ViewEventsCollector, e: ICursorPositionChangedEvent): void { - this.lastCursorPositionChangedEvent = e; - - const stopRenderingLineAfter = this.configuration.editor.viewInfo.stopRenderingLineAfter; - - let position = ViewModelCursors._toPositionThatCanBeRendered(e.viewPosition, stopRenderingLineAfter); - let secondaryPositions: Position[] = []; - for (let i = 0, len = e.secondaryPositions.length; i < len; i++) { - secondaryPositions[i] = ViewModelCursors._toPositionThatCanBeRendered(e.secondaryViewPositions[i], stopRenderingLineAfter); - } - - eventsCollector.emit(new viewEvents.ViewCursorPositionChangedEvent(position, secondaryPositions, e.isInEditableRange)); - } - - private onCursorSelectionChanged(eventsCollector: ViewEventsCollector, e: ICursorSelectionChangedEvent): void { - this.lastCursorSelectionChangedEvent = e; - - eventsCollector.emit(new viewEvents.ViewCursorSelectionChangedEvent(e.viewSelection, e.secondaryViewSelections)); - } - - private onCursorRevealRange(eventsCollector: ViewEventsCollector, e: ICursorRevealRangeEvent): void { - // Ensure event has viewRange - const viewRange = ( - e.viewRange - ? e.viewRange - : this.coordinatesConverter.convertModelRangeToViewRange(e.range) - ); - eventsCollector.emit(new viewEvents.ViewRevealRangeRequestEvent( - viewRange, - e.verticalType, - e.revealHorizontal - )); - } - - private onLineMappingChanged(eventsCollector: ViewEventsCollector): void { - if (this.lastCursorPositionChangedEvent) { - const toViewPos = (pos: Position) => this.coordinatesConverter.convertModelPositionToViewPosition(pos); - let e: ICursorPositionChangedEvent = { - position: this.lastCursorPositionChangedEvent.position, - viewPosition: toViewPos(this.lastCursorPositionChangedEvent.position), - secondaryPositions: this.lastCursorPositionChangedEvent.secondaryPositions, - secondaryViewPositions: this.lastCursorPositionChangedEvent.secondaryPositions.map(toViewPos), - isInEditableRange: this.lastCursorPositionChangedEvent.isInEditableRange, - }; - this.onCursorPositionChanged(eventsCollector, e); - } - - if (this.lastCursorSelectionChangedEvent) { - const toViewSel = (sel: Selection) => this.coordinatesConverter.convertModelSelectionToViewSelection(sel); - let e: ICursorSelectionChangedEvent = { - selection: this.lastCursorSelectionChangedEvent.selection, - viewSelection: toViewSel(this.lastCursorSelectionChangedEvent.selection), - secondarySelections: this.lastCursorSelectionChangedEvent.secondarySelections, - secondaryViewSelections: this.lastCursorSelectionChangedEvent.secondarySelections.map(toViewSel), - }; - this.onCursorSelectionChanged(eventsCollector, e); - } - } -} diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index 93fb6d5fea785..f7bb5b8bbb43b 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -19,7 +19,6 @@ import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { MinimapTokensColorTracker } from 'vs/editor/common/view/minimapCharRenderer'; import * as textModelEvents from 'vs/editor/common/model/textModelEvents'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; -import { VerticalRevealType } from 'vs/editor/common/controller/cursorEvents'; import { CharacterHardWrappingLineMapperFactory } from "vs/editor/common/viewModel/characterHardWrappingLineMapper"; import { ViewLayout } from 'vs/editor/common/viewLayout/viewLayout'; @@ -198,7 +197,7 @@ export class ViewModel extends viewEvents.ViewEventEmitter implements IViewModel // Send a reveal event to restore the centered content eventsCollector.emit(new viewEvents.ViewRevealRangeRequestEvent( newCenteredViewRange, - VerticalRevealType.Center, + viewEvents.VerticalRevealType.Center, false )); } From 36ec8ea1de984f306df69ed7b4322332c271ae36 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 16:35:54 +0200 Subject: [PATCH 0774/2747] Ensure the diff overview slider has the correct size on the first diff computation --- src/vs/editor/browser/widget/diffEditorWidget.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index 8ab50398262fc..48b18d28aa225 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -372,7 +372,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE if (this._isHandlingScrollEvent) { return; } - if (!e.scrollTopChanged && !e.scrollLeftChanged) { + if (!e.scrollTopChanged && !e.scrollLeftChanged && !e.scrollHeightChanged) { return; } this._isHandlingScrollEvent = true; @@ -403,7 +403,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE if (this._isHandlingScrollEvent) { return; } - if (!e.scrollTopChanged && !e.scrollLeftChanged) { + if (!e.scrollTopChanged && !e.scrollLeftChanged && !e.scrollHeightChanged) { return; } this._isHandlingScrollEvent = true; From 1c984e8dfa389b388283f7178465f20de0e9f4a5 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 17:02:39 +0200 Subject: [PATCH 0775/2747] Remove synchronous layout in the editor resize case (#26566) --- src/vs/editor/browser/view/viewImpl.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index c900db8d5102e..c447686be87f5 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -6,7 +6,6 @@ import { onUnexpectedError } from 'vs/base/common/errors'; import { IDisposable } from 'vs/base/common/lifecycle'; -import * as browser from 'vs/base/browser/browser'; import * as dom from 'vs/base/browser/dom'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; import { ICommandService } from 'vs/platform/commands/common/commands'; @@ -294,13 +293,6 @@ export class View extends ViewEventHandler { private _setLayout(): void { const layoutInfo = this._context.configuration.editor.layoutInfo; - if (browser.isChrome) { - /* tslint:disable:no-unused-variable */ - // Access overflowGuardContainer.clientWidth to prevent relayouting bug in Chrome - // See Bug 19676: Editor misses a layout event - let clientWidth = this.overflowGuardContainer.domNode.clientWidth + 'px'; - /* tslint:enable:no-unused-variable */ - } this.domNode.setWidth(layoutInfo.width); this.domNode.setHeight(layoutInfo.height); From edaa1a848c0bd4e033235203dba24a53c1bd0a99 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 17:07:28 +0200 Subject: [PATCH 0776/2747] Fixes #26517 --- src/vs/workbench/parts/extensions/browser/extensionEditor.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/parts/extensions/browser/extensionEditor.ts b/src/vs/workbench/parts/extensions/browser/extensionEditor.ts index f6ff2ad5dd9c0..11915ba81c444 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionEditor.ts @@ -688,6 +688,10 @@ export class ExtensionEditor extends BaseEditor { } const keyBinding = KeybindingIO.readKeybinding(key || rawKeyBinding.key, OS); + if (!keyBinding) { + return null; + } + return this.keybindingService.resolveKeybinding(keyBinding)[0]; } From c523e2a131986dd980b23129b17aabe26acf4394 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 19 May 2017 17:16:00 +0200 Subject: [PATCH 0777/2747] add quick open seperator for scm and debug quick pick before 'install more...' #25696 --- .../electron-browser/debugConfigurationManager.ts | 2 +- .../parts/scm/electron-browser/scm.contribution.ts | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts index 0d259effe700d..35091fbd8b73a 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts @@ -409,7 +409,7 @@ export class ConfigurationManager implements debug.IConfigurationManager { } } - return this.quickOpenService.pick([...this.adapters.filter(a => a.hasInitialConfiguration()), { label: 'More...' }], { placeHolder: nls.localize('selectDebug', "Select Environment") }) + return this.quickOpenService.pick([...this.adapters.filter(a => a.hasInitialConfiguration()), { label: 'More...', separator: { border: true } }], { placeHolder: nls.localize('selectDebug', "Select Environment") }) .then(picked => { if (picked instanceof Adapter) { return picked; diff --git a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts index 68cf1af577581..e4cedd1923c96 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts @@ -11,7 +11,7 @@ import { Action } from 'vs/base/common/actions'; import { Registry } from 'vs/platform/platform'; import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { DirtyDiffDecorator } from './dirtydiffDecorator'; -import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; +import { IQuickOpenService, IPickOpenEntry } from 'vs/platform/quickOpen/common/quickOpen'; import { ViewletRegistry, Extensions as ViewletExtensions, ViewletDescriptor, ToggleViewletAction } from 'vs/workbench/browser/viewlet'; import { VIEWLET_ID } from 'vs/workbench/parts/scm/common/scm'; import { IWorkbenchActionRegistry, Extensions as WorkbenchActionExtensions } from 'vs/workbench/common/actionRegistry'; @@ -49,19 +49,21 @@ export class SwitchProvider extends Action { } run(): TPromise { - const picks = this.scmService.providers.map(provider => ({ + const picks: IPickOpenEntry[] = this.scmService.providers.map(provider => ({ label: provider.label, run: () => this.scmService.activeProvider = provider })); picks.push({ - label: localize('installAdditionalSCMProviders', "Install Additional SCM Providers..."), run: () => { + label: localize('installAdditionalSCMProviders', "Install Additional SCM Providers..."), + run: () => { this.viewletService.openViewlet(EXTENSIONS_VIEWLET_ID, true).then(viewlet => viewlet as IExtensionsViewlet) .then(viewlet => { viewlet.search('category:"SCM Providers" @sort:installs'); viewlet.focus(); }); return this.scmService.activeProvider; - } + }, + separator: { border: true } }); return this.quickOpenService.pick(picks); From a331c647e797f57955a60bf98f77d467e7414749 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 19 May 2017 17:20:18 +0200 Subject: [PATCH 0778/2747] rename parts/nps -> parts/surveys --- src/vs/workbench/electron-browser/workbench.main.ts | 2 +- .../parts/{nps => surveys}/electron-browser/nps.contribution.ts | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename src/vs/workbench/parts/{nps => surveys}/electron-browser/nps.contribution.ts (100%) diff --git a/src/vs/workbench/electron-browser/workbench.main.ts b/src/vs/workbench/electron-browser/workbench.main.ts index d0d2f6888e956..07b48d526c982 100644 --- a/src/vs/workbench/electron-browser/workbench.main.ts +++ b/src/vs/workbench/electron-browser/workbench.main.ts @@ -99,7 +99,7 @@ import 'vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarte import 'vs/workbench/parts/update/electron-browser/update.contribution'; -import 'vs/workbench/parts/nps/electron-browser/nps.contribution'; +import 'vs/workbench/parts/surveys/electron-browser/nps.contribution'; import 'vs/workbench/parts/performance/electron-browser/performance.contribution'; diff --git a/src/vs/workbench/parts/nps/electron-browser/nps.contribution.ts b/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.ts similarity index 100% rename from src/vs/workbench/parts/nps/electron-browser/nps.contribution.ts rename to src/vs/workbench/parts/surveys/electron-browser/nps.contribution.ts From 87cfa195245479f201a8be1dfb4aff5f047647e4 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Fri, 19 May 2017 17:35:08 +0200 Subject: [PATCH 0779/2747] Fixes #25518: Cannot associate a problem matcher with an auto detected tasks --- build/npm/postinstall.js | 3 +- extensions/grunt/package.json | 4 +- extensions/gulp/src/main.ts | 1 + extensions/jake/package.json | 48 ++++++ extensions/jake/package.nls.json | 3 + extensions/jake/src/main.ts | 151 ++++++++++++++++++ extensions/jake/src/typings/refs.d.ts | 8 + extensions/jake/tsconfig.json | 18 +++ src/vs/workbench/api/node/extHostTask.ts | 9 +- .../parts/tasks/browser/quickOpen.ts | 85 +++++++--- .../parts/tasks/browser/restartQuickOpen.ts | 4 - .../parts/tasks/browser/taskQuickOpen.ts | 4 - .../parts/tasks/common/taskConfiguration.ts | 120 ++++++++++---- src/vs/workbench/parts/tasks/common/tasks.ts | 16 ++ .../electron-browser/task.contribution.ts | 117 ++++++++++++-- .../tasks/test/node/configuration.test.ts | 1 + 16 files changed, 502 insertions(+), 90 deletions(-) create mode 100644 extensions/jake/package.json create mode 100644 extensions/jake/package.nls.json create mode 100644 extensions/jake/src/main.ts create mode 100644 extensions/jake/src/typings/refs.d.ts create mode 100644 extensions/jake/tsconfig.json diff --git a/build/npm/postinstall.js b/build/npm/postinstall.js index fd64909a4eed2..d8703441b7cd4 100644 --- a/build/npm/postinstall.js +++ b/build/npm/postinstall.js @@ -33,7 +33,8 @@ const extensions = [ 'html', 'git', 'gulp', - 'grunt' + 'grunt', + 'jake' ]; extensions.forEach(extension => npmInstall(`extensions/${extension}`)); diff --git a/extensions/grunt/package.json b/extensions/grunt/package.json index 6e67c3153de58..e3f55e398add8 100644 --- a/extensions/grunt/package.json +++ b/extensions/grunt/package.json @@ -12,8 +12,8 @@ "Other" ], "scripts": { - "compile": "gulp compile-extension:gulp", - "watch": "gulp watch-extension:gulp" + "compile": "gulp compile-extension:grunt", + "watch": "gulp watch-extension:grunt" }, "dependencies": { "vscode-nls": "^2.0.2" diff --git a/extensions/gulp/src/main.ts b/extensions/gulp/src/main.ts index e4bbba3b42245..666b66bf120c1 100644 --- a/extensions/gulp/src/main.ts +++ b/extensions/gulp/src/main.ts @@ -103,6 +103,7 @@ async function getGulpTasks(): Promise { let { stdout, stderr } = await exec(commandLine, { cwd: workspaceRoot }); if (stderr) { channel.appendLine(stderr); + channel.show(true); } let result: vscode.Task[] = []; if (stdout) { diff --git a/extensions/jake/package.json b/extensions/jake/package.json new file mode 100644 index 0000000000000..8298e01ad175e --- /dev/null +++ b/extensions/jake/package.json @@ -0,0 +1,48 @@ +{ + "name": "jake", + "publisher": "vscode", + "description": "Extension to add Jake capabilities to VSCode.", + "displayName": "Jake support for VSCode", + "version": "0.0.1", + "engines": { + "vscode": "*" + }, + "enableProposedApi": true, + "categories": [ + "Other" + ], + "scripts": { + "compile": "gulp compile-extension:jake", + "watch": "gulp watch-extension:jake" + }, + "dependencies": { + "vscode-nls": "^2.0.2" + }, + "devDependencies": { + "@types/node": "^7.0.18" + }, + "main": "./out/main", + "activationEvents": [ + "onCommand:workbench.action.tasks.runTask", + "onCommand:workbench.action.tasks.build", + "onCommand:workbench.action.tasks.test" + ], + "contributes": { + "configuration": { + "id": "jake", + "type": "object", + "title": "Jake", + "properties": { + "jake.autoDetect": { + "type": "string", + "enum": [ + "off", + "on" + ], + "default": "on", + "description": "%config.jake.autoDetect%" + } + } + } + } +} \ No newline at end of file diff --git a/extensions/jake/package.nls.json b/extensions/jake/package.nls.json new file mode 100644 index 0000000000000..c6ca7464a7535 --- /dev/null +++ b/extensions/jake/package.nls.json @@ -0,0 +1,3 @@ +{ + "config.jake.autoDetect": "Controls whether auto detection of Jake tasks is on or off. Default is on." +} \ No newline at end of file diff --git a/extensions/jake/src/main.ts b/extensions/jake/src/main.ts new file mode 100644 index 0000000000000..93b55873eabca --- /dev/null +++ b/extensions/jake/src/main.ts @@ -0,0 +1,151 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as path from 'path'; +import * as fs from 'fs'; +import * as cp from 'child_process'; +import * as vscode from 'vscode'; +import * as nls from 'vscode-nls'; + +const localize = nls.config(process.env.VSCODE_NLS_CONFIG)(); + +type AutoDetect = 'on' | 'off'; +let taskProvider: vscode.Disposable | undefined; + +export function activate(_context: vscode.ExtensionContext): void { + let workspaceRoot = vscode.workspace.rootPath; + if (!workspaceRoot) { + return; + } + let pattern = path.join(workspaceRoot, '{Jakefile,Jakefile.js}'); + let jakePromise: Thenable | undefined = undefined; + let fileWatcher = vscode.workspace.createFileSystemWatcher(pattern); + fileWatcher.onDidChange(() => jakePromise = undefined); + fileWatcher.onDidCreate(() => jakePromise = undefined); + fileWatcher.onDidDelete(() => jakePromise = undefined); + + function onConfigurationChanged() { + let autoDetect = vscode.workspace.getConfiguration('jake').get('autoDetect'); + if (taskProvider && autoDetect === 'off') { + jakePromise = undefined; + taskProvider.dispose(); + taskProvider = undefined; + } else if (!taskProvider && autoDetect === 'on') { + taskProvider = vscode.workspace.registerTaskProvider({ + provideTasks: () => { + if (!jakePromise) { + jakePromise = getJakeTasks(); + } + return jakePromise; + } + }); + } + } + vscode.workspace.onDidChangeConfiguration(onConfigurationChanged); + onConfigurationChanged(); +} + +export function deactivate(): void { + if (taskProvider) { + taskProvider.dispose(); + } +} + +function exists(file: string): Promise { + return new Promise((resolve, _reject) => { + fs.exists(file, (value) => { + resolve(value); + }); + }); +} + +function exec(command: string, options: cp.ExecOptions): Promise<{ stdout: string; stderr: string }> { + return new Promise<{ stdout: string; stderr: string }>((resolve, reject) => { + cp.exec(command, options, (error, stdout, stderr) => { + if (error) { + reject({ error, stdout, stderr }); + } + resolve({ stdout, stderr }); + }); + }); +} + +async function getJakeTasks(): Promise { + let workspaceRoot = vscode.workspace.rootPath; + let emptyTasks: vscode.Task[] = []; + if (!workspaceRoot) { + return emptyTasks; + } + let jakefile = path.join(workspaceRoot, 'Jakefile'); + if (!await exists(jakefile)) { + jakefile = path.join(workspaceRoot, 'Jakefile.js'); + if (! await exists(jakefile)) { + return emptyTasks; + } + } + + let jakeCommand: string; + let platform = process.platform; + if (platform === 'win32' && await exists(path.join(workspaceRoot!, 'node_modules', '.bin', 'jake.cmd'))) { + jakeCommand = path.join('.', 'node_modules', '.bin', 'jake.cmd'); + } else if ((platform === 'linux' || platform === 'darwin') && await exists(path.join(workspaceRoot!, 'node_modules', '.bin', 'jake'))) { + jakeCommand = path.join('.', 'node_modules', '.bin', 'jake'); + } else { + jakeCommand = 'jake'; + } + + let commandLine = `${jakeCommand} --tasks`; + let channel = vscode.window.createOutputChannel('tasks'); + try { + let { stdout, stderr } = await exec(commandLine, { cwd: workspaceRoot }); + if (stderr) { + channel.appendLine(stderr); + channel.show(true); + } + let result: vscode.Task[] = []; + if (stdout) { + let buildTask: { task: vscode.Task | undefined, rank: number } = { task: undefined, rank: 0 }; + let testTask: { task: vscode.Task | undefined, rank: number } = { task: undefined, rank: 0 }; + let lines = stdout.split(/\r{0,1}\n/); + for (let line of lines) { + if (line.length === 0) { + continue; + } + let regExp = /^jake\s+([^\s]+)\s/g; + let matches = regExp.exec(line); + if (matches && matches.length === 2) { + let taskName = matches[1]; + let task = new vscode.ShellTask(`jake: ${taskName}`, `${jakeCommand} ${taskName}`); + task.identifier = `jake.${taskName}`; + result.push(task); + let lowerCaseLine = line.toLowerCase(); + if (lowerCaseLine === 'build') { + buildTask = { task, rank: 2 }; + } else if (lowerCaseLine.indexOf('build') !== -1 && buildTask.rank < 1) { + buildTask = { task, rank: 1 }; + } else if (lowerCaseLine === 'test') { + testTask = { task, rank: 2 }; + } else if (lowerCaseLine.indexOf('test') !== -1 && testTask.rank < 1) { + testTask = { task, rank: 1 }; + } + } + } + if (buildTask.task) { + buildTask.task.group = vscode.TaskGroup.Build; + } + if (testTask.task) { + testTask.task.group = vscode.TaskGroup.Test; + } + } + return result; + } catch (err) { + if (err.stderr) { + channel.appendLine(err.stderr); + } + channel.appendLine(localize('execFailed', 'Auto detecting Jake failed with error: {0}', err.error ? err.error.toString() : 'unknown')); + return emptyTasks; + } +} \ No newline at end of file diff --git a/extensions/jake/src/typings/refs.d.ts b/extensions/jake/src/typings/refs.d.ts new file mode 100644 index 0000000000000..954bab971e334 --- /dev/null +++ b/extensions/jake/src/typings/refs.d.ts @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +/// +/// +/// diff --git a/extensions/jake/tsconfig.json b/extensions/jake/tsconfig.json new file mode 100644 index 0000000000000..e804fa3acd7a6 --- /dev/null +++ b/extensions/jake/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "es6", + "module": "commonjs", + "lib": [ + "es2016" + ], + "outDir": "./out", + "strictNullChecks": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": true + }, + "include": [ + "src/**/*" + ] +} \ No newline at end of file diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index c6bdc5a4d9645..f1c5a8065b8af 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -268,7 +268,7 @@ namespace ShellConfiguration { namespace Tasks { - export function from(tasks: vscode.Task[], uuidMap: UUIDMap): TaskSystem.Task[] { + export function from(tasks: vscode.Task[], extension: IExtensionDescription, uuidMap: UUIDMap): TaskSystem.Task[] { if (tasks === void 0 || tasks === null) { return []; } @@ -276,7 +276,7 @@ namespace Tasks { try { uuidMap.start(); for (let task of tasks) { - let converted = fromSingle(task, uuidMap); + let converted = fromSingle(task, extension, uuidMap); if (converted) { result.push(converted); } @@ -287,7 +287,7 @@ namespace Tasks { return result; } - function fromSingle(task: vscode.Task, uuidMap: UUIDMap): TaskSystem.Task { + function fromSingle(task: vscode.Task, extension: IExtensionDescription, uuidMap: UUIDMap): TaskSystem.Task { if (typeof task.name !== 'string' || typeof task.identifier !== 'string') { return undefined; } @@ -306,6 +306,7 @@ namespace Tasks { command.echo = behaviour.echo; let result: TaskSystem.Task = { _id: uuidMap.getUUID(task.identifier), + _source: { kind: TaskSystem.TaskSourceKind.Extension, detail: extension.id }, name: task.name, identifier: task.identifier, group: types.TaskGroup.is(task.group) ? task.group : undefined, @@ -421,7 +422,7 @@ export class ExtHostTask extends ExtHostTaskShape { } return asWinJsPromise(token => handler.provider.provideTasks(token)).then(value => { return { - tasks: Tasks.from(value, this.getUUIDMap(handler.extension.id)), + tasks: Tasks.from(value, handler.extension, this.getUUIDMap(handler.extension.id)), extension: handler.extension }; }); diff --git a/src/vs/workbench/parts/tasks/browser/quickOpen.ts b/src/vs/workbench/parts/tasks/browser/quickOpen.ts index fc2df2f1c4044..743413653aa94 100644 --- a/src/vs/workbench/parts/tasks/browser/quickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/quickOpen.ts @@ -12,7 +12,7 @@ import QuickOpen = require('vs/base/parts/quickopen/common/quickOpen'); import Model = require('vs/base/parts/quickopen/browser/quickOpenModel'); import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; -import { Task } from 'vs/workbench/parts/tasks/common/tasks'; +import { Task, TaskSourceKind } from 'vs/workbench/parts/tasks/common/tasks'; import { ITaskService } from 'vs/workbench/parts/tasks/common/taskService'; export class TaskEntry extends Model.QuickOpenEntry { @@ -31,11 +31,20 @@ export class TaskEntry extends Model.QuickOpenEntry { } } +export class TaskGroupEntry extends Model.QuickOpenEntryGroup { + constructor(entry: TaskEntry, groupLabel: string, withBorder: boolean) { + super(entry, groupLabel, withBorder); + } +} + export abstract class QuickOpenHandler extends Quickopen.QuickOpenHandler { + private tasks: TPromise; + + constructor( - @IQuickOpenService protected quickOpenService: IQuickOpenService, - @ITaskService protected taskService: ITaskService + protected quickOpenService: IQuickOpenService, + protected taskService: ITaskService, ) { super(); @@ -43,38 +52,64 @@ export abstract class QuickOpenHandler extends Quickopen.QuickOpenHandler { this.taskService = taskService; } + public onOpen(): void { + this.tasks = this.getTasks(); + } + + public onClose(canceled: boolean): void { + this.tasks = undefined; + } + public getResults(input: string): TPromise { - return this.getTasks().then(tasks => tasks - .sort((a, b) => a.name.localeCompare(b.name)) - .map(task => ({ task: task, highlights: Filters.matchesContiguousSubString(input, task.name) })) - .filter(({ highlights }) => !!highlights) - .map(({ task, highlights }) => this.createEntry(this.taskService, task, highlights)) - , _ => []).then(e => new Model.QuickOpenModel(e)); + return this.tasks.then((tasks) => { + let entries: Model.QuickOpenEntry[] = []; + if (tasks.length === 0) { + return new Model.QuickOpenModel(entries); + } + tasks = tasks.sort((a, b) => { + let aKind = a._source.kind; + let bKind = b._source.kind; + if (aKind === bKind) { + return a.name.localeCompare(b.name); + } + if (aKind === TaskSourceKind.Workspace) { + return -1; + } else { + return +1; + } + }); + let hasWorkspace: boolean = tasks[0]._source.kind === TaskSourceKind.Workspace; + let hasExtension: boolean = tasks[tasks.length - 1]._source.kind === TaskSourceKind.Extension; + let groupWorkspace = hasWorkspace && hasExtension; + let groupExtension = groupWorkspace; + let hadWorkspace = false; + for (let task of tasks) { + let highlights = Filters.matchesContiguousSubString(input, task.name); + if (!highlights) { + continue; + } + if (task._source.kind === TaskSourceKind.Workspace && groupWorkspace) { + groupWorkspace = false; + hadWorkspace = true; + entries.push(new TaskGroupEntry(this.createEntry(this.taskService, task, highlights), nls.localize('workspace', 'From Workspace'), false)); + } else if (task._source.kind === TaskSourceKind.Extension && groupExtension) { + groupExtension = false; + entries.push(new TaskGroupEntry(this.createEntry(this.taskService, task, highlights), nls.localize('extension', 'From Extensions'), hadWorkspace)); + } else { + entries.push(this.createEntry(this.taskService, task, highlights)); + } + } + return new Model.QuickOpenModel(entries); + }); } protected abstract getTasks(): TPromise; protected abstract createEntry(taskService: ITaskService, task: Task, highlights: Model.IHighlight[]): TaskEntry; - public getClass(): string { - return null; - } - - public canRun(): boolean { - return true; - } - public getAutoFocus(input: string): QuickOpen.IAutoFocus { return { autoFocusFirstEntry: !!input }; } - - public onClose(canceled: boolean): void { - return; - } - - public getGroupLabel(): string { - return null; - } } \ No newline at end of file diff --git a/src/vs/workbench/parts/tasks/browser/restartQuickOpen.ts b/src/vs/workbench/parts/tasks/browser/restartQuickOpen.ts index 9a8ee28964a28..2c78bdac7e86a 100644 --- a/src/vs/workbench/parts/tasks/browser/restartQuickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/restartQuickOpen.ts @@ -20,10 +20,6 @@ class TaskEntry extends base.TaskEntry { super(taskService, task, highlights); } - public getAriaLabel(): string { - return nls.localize('entryAriaLabel', "{0}, tasks", this.getLabel()); - } - public run(mode: QuickOpen.Mode, context: Model.IContext): boolean { if (mode === QuickOpen.Mode.PREVIEW) { return false; diff --git a/src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts b/src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts index b7f8e4515e28e..f32f5d199f9fb 100644 --- a/src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts @@ -22,10 +22,6 @@ class TaskEntry extends base.TaskEntry { super(taskService, task, highlights); } - public getAriaLabel(): string { - return nls.localize('entryAriaLabel', "{0}, tasks", this.getLabel()); - } - public run(mode: QuickOpen.Mode, context: Model.IContext): boolean { if (mode === QuickOpen.Mode.PREVIEW) { return false; diff --git a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts index abc0a29c2de6b..87feaedfd38d0 100644 --- a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts @@ -631,13 +631,24 @@ namespace ProblemMatcherConverter { } } +interface TaskParseResult { + tasks: Tasks.Task[] | undefined; + annotatingTasks: Tasks.Task[] | undefined; +} + namespace TaskDescription { - export function from(this: void, tasks: TaskDescription[], globals: Globals, context: ParseContext): Tasks.Task[] { + export let source: Tasks.TaskSource = { + kind: Tasks.TaskSourceKind.Workspace, + detail: '.settins\tasks.json' + }; + + export function from(this: void, tasks: TaskDescription[], globals: Globals, context: ParseContext): TaskParseResult { if (!tasks) { return undefined; } let parsedTasks: Tasks.Task[] = []; + let annotatingTasks: Tasks.Task[] = []; let defaultBuildTask: { task: Tasks.Task; rank: number; } = { task: null, rank: -1 }; let defaultTestTask: { task: Tasks.Task; rank: number; } = { task: null, rank: -1 }; tasks.forEach((externalTask) => { @@ -653,6 +664,7 @@ namespace TaskDescription { let identifer = Types.isString(externalTask.identifier) ? externalTask.identifier : taskName; let task: Tasks.Task = { _id: UUID.generateUuid(), + _source: source, name: taskName, identifier: identifer, command, @@ -691,6 +703,10 @@ namespace TaskDescription { task.problemMatchers = problemMatchers; } mergeGlobals(task, globals); + if (context.isTermnial && isAnnotating(task)) { + annotatingTasks.push(task); + return; + } fillDefaults(task); let addTask: boolean = true; if (context.isTermnial && task.command && task.command.name && task.command.isShellCommand && task.command.args && task.command.args.length > 0) { @@ -739,10 +755,10 @@ namespace TaskDescription { if (defaultTestTask.task) { defaultTestTask.task.group = Tasks.TaskGroup.Test; } - return parsedTasks.length === 0 ? undefined : parsedTasks; + return parsedTasks.length === 0 && annotatingTasks.length === 0 ? undefined : { tasks: parsedTasks, annotatingTasks: annotatingTasks }; } - export function merge(target: Tasks.Task[], source: Tasks.Task[]): Tasks.Task[] { + export function mergeTasks(target: Tasks.Task[], source: Tasks.Task[]): Tasks.Task[] { if (source === void 0 || source.length === 0) { return target; } @@ -841,6 +857,30 @@ namespace TaskDescription { return false; } } + + function isAnnotating(task: Tasks.Task): boolean { + return (task.command === void 0 || task.command.name === void 0) && (task.dependsOn === void 0 || task.dependsOn.length === 0); + } + + export function merge(target: Tasks.Task, source: Tasks.Task): Tasks.Task { + if (!target) { + return source; + } + if (!source) { + return target; + } + + mergeProperty(target, source, 'group'); + target.command = CommandConfiguration.merge(target.command, source.command); + mergeProperty(target, source, 'suppressTaskName'); + mergeProperty(target, source, 'args'); + mergeProperty(target, source, 'isBackground'); + mergeProperty(target, source, 'promptOnClose'); + mergeProperty(target, source, 'showOutput'); + mergeProperty(target, source, 'dependsOn'); + mergeProperty(target, source, 'problemMatchers'); + return target; + } } interface Globals { @@ -950,6 +990,7 @@ export namespace ExecutionEngine { export interface ParseResult { validationStatus: ValidationStatus; tasks: Tasks.Task[]; + annotatingTasks: Tasks.Task[]; engine: Tasks.ExecutionEngine; } @@ -960,7 +1001,6 @@ export interface IProblemReporter extends IProblemReporterBase { class ConfigurationParser { private problemReporter: IProblemReporter; - constructor(problemReporter: IProblemReporter) { this.problemReporter = problemReporter; } @@ -970,21 +1010,27 @@ class ConfigurationParser { if (engine === Tasks.ExecutionEngine.Terminal) { this.problemReporter.clearOutput(); } - let context: ParseContext = { problemReporter: this.problemReporter, namedProblemMatchers: undefined, isTermnial: engine === Tasks.ExecutionEngine.Terminal }; + let context: ParseContext = { + problemReporter: this.problemReporter, + namedProblemMatchers: undefined, + isTermnial: engine === Tasks.ExecutionEngine.Terminal + }; + let taskParseResult = this.createTaskRunnerConfiguration(fileConfig, context); return { validationStatus: this.problemReporter.status, - tasks: this.createTaskRunnerConfiguration(fileConfig, context), + tasks: taskParseResult.tasks, + annotatingTasks: taskParseResult.annotatingTasks, engine }; } - private createTaskRunnerConfiguration(fileConfig: ExternalTaskRunnerConfiguration, context: ParseContext): Tasks.Task[] { + private createTaskRunnerConfiguration(fileConfig: ExternalTaskRunnerConfiguration, context: ParseContext): TaskParseResult { let globals = Globals.from(fileConfig, context); if (this.problemReporter.status.isFatal()) { return undefined; } context.namedProblemMatchers = ProblemMatcherConverter.namedFrom(fileConfig.declares, context); - let globalTasks: Tasks.Task[]; + let globalTasks: TaskParseResult; if (fileConfig.windows && Platform.platform === Platform.Platform.Windows) { globalTasks = TaskDescription.from(fileConfig.windows.tasks, globals, context); } else if (fileConfig.osx && Platform.platform === Platform.Platform.Mac) { @@ -993,36 +1039,44 @@ class ConfigurationParser { globalTasks = TaskDescription.from(fileConfig.linux.tasks, globals, context); } - let tasks: Tasks.Task[]; + let result: TaskParseResult = { tasks: undefined, annotatingTasks: undefined }; if (fileConfig.tasks) { - tasks = TaskDescription.from(fileConfig.tasks, globals, context); - } - tasks = TaskDescription.merge(tasks, globalTasks); - - if (!tasks || tasks.length === 0) { - if (globals.command && globals.command.name) { - let matchers: ProblemMatcher[] = ProblemMatcherConverter.from(fileConfig.problemMatcher, context);; - let isBackground = fileConfig.isBackground ? !!fileConfig.isBackground : fileConfig.isWatching ? !!fileConfig.isWatching : undefined; - let task: Tasks.Task = { - _id: UUID.generateUuid(), - name: globals.command.name, - identifier: globals.command.name, - group: Tasks.TaskGroup.Build, - command: undefined, - isBackground: isBackground, - showOutput: undefined, - suppressTaskName: true, // this must be true since we infer the task from the global data. - problemMatchers: matchers - }; - TaskDescription.mergeGlobals(task, globals); - TaskDescription.fillDefaults(task); - tasks = [task]; - } + result = TaskDescription.from(fileConfig.tasks, globals, context); } - return tasks || []; + if (globalTasks) { + result.tasks = TaskDescription.mergeTasks(result.tasks, globalTasks.tasks); + result.annotatingTasks = TaskDescription.mergeTasks(result.annotatingTasks, globalTasks.annotatingTasks); + } + + if ((!result.tasks || result.tasks.length === 0) && (globals.command && globals.command.name)) { + let matchers: ProblemMatcher[] = ProblemMatcherConverter.from(fileConfig.problemMatcher, context);; + let isBackground = fileConfig.isBackground ? !!fileConfig.isBackground : fileConfig.isWatching ? !!fileConfig.isWatching : undefined; + let task: Tasks.Task = { + _id: UUID.generateUuid(), + _source: TaskDescription.source, + name: globals.command.name, + identifier: globals.command.name, + group: Tasks.TaskGroup.Build, + command: undefined, + isBackground: isBackground, + showOutput: undefined, + suppressTaskName: true, // this must be true since we infer the task from the global data. + problemMatchers: matchers + }; + TaskDescription.mergeGlobals(task, globals); + TaskDescription.fillDefaults(task); + result.tasks = [task]; + } + result.tasks = result.tasks || []; + result.annotatingTasks = result.annotatingTasks || []; + return result; } } export function parse(configuration: ExternalTaskRunnerConfiguration, logger: IProblemReporter): ParseResult { return (new ConfigurationParser(logger)).run(configuration); +} + +export function mergeTasks(target: Tasks.Task, source: Tasks.Task): Tasks.Task { + return TaskDescription.merge(target, source); } \ No newline at end of file diff --git a/src/vs/workbench/parts/tasks/common/tasks.ts b/src/vs/workbench/parts/tasks/common/tasks.ts index 78ba0fc9fa69b..c7b3d4ebf9b72 100644 --- a/src/vs/workbench/parts/tasks/common/tasks.ts +++ b/src/vs/workbench/parts/tasks/common/tasks.ts @@ -110,6 +110,17 @@ export namespace TaskGroup { export type TaskGroup = 'clean' | 'build' | 'rebuildAll' | 'test'; +export enum TaskSourceKind { + Workspace = 1, + Extension = 2, + Generic = 3 +} + +export interface TaskSource { + kind: TaskSourceKind; + detail?: string; +} + /** * A task description */ @@ -120,6 +131,11 @@ export interface Task { */ _id: string; + /** + * Indicated the source of the task (e.g tasks.json or extension) + */ + _source: TaskSource; + /** * The task's name */ diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 6dd5972868d71..dd1b8025ae42e 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -69,7 +69,7 @@ import { IOutputService, IOutputChannelRegistry, Extensions as OutputExt, IOutpu import { ITerminalService } from 'vs/workbench/parts/terminal/common/terminal'; import { ITaskSystem, ITaskResolver, ITaskSummary, ITaskExecuteResult, TaskExecuteKind, TaskError, TaskErrors, TaskSystemEvents } from 'vs/workbench/parts/tasks/common/taskSystem'; -import { Task, TaskSet, TaskGroup, ExecutionEngine, ShowOutput } from 'vs/workbench/parts/tasks/common/tasks'; +import { Task, TaskSet, TaskGroup, ExecutionEngine, ShowOutput, TaskSourceKind } from 'vs/workbench/parts/tasks/common/tasks'; import { ITaskService, TaskServiceEvents, ITaskProvider } from 'vs/workbench/parts/tasks/common/taskService'; import { templates as taskTemplates } from 'vs/workbench/parts/tasks/common/taskTemplates'; @@ -489,6 +489,10 @@ class ProblemReporter implements TaskConfig.IProblemReporter { interface WorkspaceTaskResult { set: TaskSet; + annotatingTasks: { + byIdentifier: IStringDictionary; + byName: IStringDictionary; + }; hasErrors: boolean; } @@ -522,7 +526,8 @@ class TaskService extends EventEmitter implements ITaskService { private _configHasErrors: boolean; private _providers: Map; - private _workspaceTasksPromise: TPromise; + + private _workspaceTasksPromise: TPromise; private _taskSystem: ITaskSystem; private _taskSystemListeners: IDisposable[]; @@ -759,6 +764,7 @@ class TaskService extends EventEmitter implements ITaskService { let id: string = UUID.generateUuid(); let task: Task = { _id: id, + _source: { kind: TaskSourceKind.Generic }, name: id, identifier: id, dependsOn: primaryTasks.map(task => task._id), @@ -894,30 +900,94 @@ class TaskService extends EventEmitter implements ITaskService { provider.provideTasks().done(done, error); }); } - // Do this last since the then of a resolved promise returns immediatelly. - counter++; - this.getWorkspaceTasks().done(done, error); + }).then((result) => { + return this.getWorkspaceTasks().then((workspaceTaskResult) => { + let workspaceTasksToDelete: Task[] = []; + let annotatingTasks = workspaceTaskResult.annotatingTasks; + let legacyAnnotatingTasks = workspaceTaskResult.set ? this.getLegacyAnnotatingTasks(workspaceTaskResult.set) : undefined; + if (annotatingTasks || legacyAnnotatingTasks) { + for (let set of result) { + for (let task of set.tasks) { + if (annotatingTasks) { + let annotatingTask = annotatingTasks.byIdentifier[task.identifier] || annotatingTasks.byName[task.name]; + if (annotatingTask) { + TaskConfig.mergeTasks(task, annotatingTask); + task._source.kind = TaskSourceKind.Workspace; + continue; + } + } + if (legacyAnnotatingTasks) { + let legacyAnnotatingTask = legacyAnnotatingTasks[task.identifier]; + if (legacyAnnotatingTask) { + TaskConfig.mergeTasks(task, legacyAnnotatingTask); + task._source.kind = TaskSourceKind.Workspace; + workspaceTasksToDelete.push(legacyAnnotatingTask); + continue; + } + } + } + } + } + if (workspaceTaskResult.set) { + if (workspaceTasksToDelete.length > 0) { + let tasks = workspaceTaskResult.set.tasks; + let newSet: TaskSet = { + extension: workspaceTaskResult.set.extension, + tasks: [] + }; + let toDelete = workspaceTasksToDelete.reduce>((map, task) => { + map[task._id] = true; + return map; + }, Object.create(null)); + newSet.tasks = tasks.filter(task => !toDelete[task._id]); + result.push(newSet); + } else { + result.push(workspaceTaskResult.set); + } + } + return result; + }, () => { + // If we can't read the tasks.json file provide at least the contributed tasks + return result; + }); }); } - private getWorkspaceTasks(): TPromise { + private getLegacyAnnotatingTasks(workspaceTasks: TaskSet): IStringDictionary { + let result: IStringDictionary; + function getResult() { + if (result) { + return result; + } + result = Object.create(null); + return result; + } + for (let task of workspaceTasks.tasks) { + let commandName = task.command && task.command.name; + // This is for backwards compatibility with the 0.1.0 task annotation code + // if we had a gulp, jake or grunt command a task specification was a annotation + if (commandName === 'gulp' || commandName === 'grunt' || commandName === 'jake') { + getResult()[`${commandName}.${task.name}`] = task; + } + } + return result; + } + + private getWorkspaceTasks(): TPromise { if (this._workspaceTasksPromise) { return this._workspaceTasksPromise; } - this._workspaceTasksPromise = this.computeWorkspaceTasks().then(value => { - this._configHasErrors = value.hasErrors; - if (this._taskSystem instanceof ProcessTaskSystem) { - this._taskSystem.hasErrors(this._configHasErrors); - } - return value.set; - }); + this.updateWorkspaceTasks(); return this._workspaceTasksPromise; } private updateWorkspaceTasks(): void { this._workspaceTasksPromise = this.computeWorkspaceTasks().then(value => { this._configHasErrors = value.hasErrors; - return value.set; + if (this._taskSystem instanceof ProcessTaskSystem) { + this._taskSystem.hasErrors(this._configHasErrors); + } + return value; }); } @@ -966,7 +1036,7 @@ class TaskService extends EventEmitter implements ITaskService { return configPromise.then((resolved) => { return ProblemMatcherRegistry.onReady().then((): WorkspaceTaskResult => { if (!resolved || !resolved.config) { - return { set: undefined, hasErrors: resolved !== void 0 ? resolved.hasErrors : false }; + return { set: undefined, annotatingTasks: undefined, hasErrors: resolved !== void 0 ? resolved.hasErrors : false }; } let problemReporter = new ProblemReporter(this._outputChannel); let parseResult = TaskConfig.parse(resolved.config, problemReporter); @@ -977,9 +1047,22 @@ class TaskService extends EventEmitter implements ITaskService { } if (problemReporter.status.isFatal()) { problemReporter.fatal(nls.localize('TaskSystem.configurationErrors', 'Error: the provided task configuration has validation errors and can\'t not be used. Please correct the errors first.')); - return { set: undefined, hasErrors }; + return { set: undefined, annotatingTasks: undefined, hasErrors }; + } + let annotatingTasks: { byIdentifier: IStringDictionary; byName: IStringDictionary; }; + if (parseResult.annotatingTasks && parseResult.annotatingTasks.length > 0) { + annotatingTasks = { + byIdentifier: Object.create(null), + byName: Object.create(null) + }; + for (let task of parseResult.annotatingTasks) { + annotatingTasks.byIdentifier[task.identifier] = task; + if (task.name) { + annotatingTasks.byName[task.name] = task; + } + } } - return { set: { tasks: parseResult.tasks }, hasErrors }; + return { set: { tasks: parseResult.tasks }, annotatingTasks: annotatingTasks, hasErrors }; }); }); } diff --git a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts index fb53a216bd3ae..40ef9ddda1d87 100644 --- a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts +++ b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts @@ -123,6 +123,7 @@ class TaskBuilder { this.commandBuilder = new CommandConfigurationBuilder(this, command); this.result = { _id: name, + _source: { kind: Tasks.TaskSourceKind.Workspace }, identifier: name, name: name, command: this.commandBuilder.result, From d33fce1c91a9a901f9b550139840ba55a9fbb83c Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 17:56:33 +0200 Subject: [PATCH 0780/2747] Simplify key code to string mappings --- src/vs/base/common/keyCodes.ts | 352 +++++++++++++++------------------ 1 file changed, 157 insertions(+), 195 deletions(-) diff --git a/src/vs/base/common/keyCodes.ts b/src/vs/base/common/keyCodes.ts index c2b5c9d519aaf..893b7c0540b82 100644 --- a/src/vs/base/common/keyCodes.ts +++ b/src/vs/base/common/keyCodes.ts @@ -200,222 +200,184 @@ export const enum KeyCode { MAX_VALUE } -export interface IReverseMap { - [str: string]: KeyCode; -} +class KeyCodeStrMap { -export class Mapping { + private _keyCodeToStr: string[]; + private _strToKeyCode: { [str: string]: KeyCode; }; - _fromKeyCode: string[]; - _toKeyCode: IReverseMap; + constructor() { + this._keyCodeToStr = []; + this._strToKeyCode = Object.create(null); + } - constructor(fromKeyCode: string[], toKeyCode: IReverseMap) { - this._fromKeyCode = fromKeyCode; - this._toKeyCode = toKeyCode; + define(keyCode: KeyCode, str: string): void { + this._keyCodeToStr[keyCode] = str; + this._strToKeyCode[str.toLowerCase()] = keyCode; } fromKeyCode(keyCode: KeyCode): string { - return this._fromKeyCode[keyCode]; + return this._keyCodeToStr[keyCode]; } toKeyCode(str: string): KeyCode { - if (this._toKeyCode.hasOwnProperty(str)) { - return this._toKeyCode[str]; - } - return KeyCode.Unknown; + return this._strToKeyCode[str.toLowerCase()] || KeyCode.Unknown; } - } -function createMapping(fill1: (map: string[]) => void, fill2: (reverseMap: IReverseMap) => void): Mapping { - let MAP: string[] = []; - fill1(MAP); +const ui = new KeyCodeStrMap(); +const usUserSettings = new KeyCodeStrMap(); +const generalUserSettings = new KeyCodeStrMap(); - let REVERSE_MAP: IReverseMap = {}; - for (let i = 0, len = MAP.length; i < len; i++) { - if (!MAP[i]) { - continue; - } - REVERSE_MAP[MAP[i]] = i; - } - fill2(REVERSE_MAP); +(function () { - let FINAL_REVERSE_MAP: IReverseMap = {}; - for (let entry in REVERSE_MAP) { - if (REVERSE_MAP.hasOwnProperty(entry)) { - FINAL_REVERSE_MAP[entry] = REVERSE_MAP[entry]; - FINAL_REVERSE_MAP[entry.toLowerCase()] = REVERSE_MAP[entry]; - } + function define(keyCode: KeyCode, uiLabel: string, usUserSettingsLabel: string = uiLabel, generalUserSettingsLabel: string = usUserSettingsLabel): void { + ui.define(keyCode, uiLabel); + usUserSettings.define(keyCode, usUserSettingsLabel); + generalUserSettings.define(keyCode, generalUserSettingsLabel); } - return new Mapping(MAP, FINAL_REVERSE_MAP); -} - -let STRING = createMapping((TO_STRING_MAP) => { - TO_STRING_MAP[KeyCode.Unknown] = 'unknown'; - - TO_STRING_MAP[KeyCode.Backspace] = 'Backspace'; - TO_STRING_MAP[KeyCode.Tab] = 'Tab'; - TO_STRING_MAP[KeyCode.Enter] = 'Enter'; - TO_STRING_MAP[KeyCode.Shift] = 'Shift'; - TO_STRING_MAP[KeyCode.Ctrl] = 'Ctrl'; - TO_STRING_MAP[KeyCode.Alt] = 'Alt'; - TO_STRING_MAP[KeyCode.PauseBreak] = 'PauseBreak'; - TO_STRING_MAP[KeyCode.CapsLock] = 'CapsLock'; - TO_STRING_MAP[KeyCode.Escape] = 'Escape'; - TO_STRING_MAP[KeyCode.Space] = 'Space'; - TO_STRING_MAP[KeyCode.PageUp] = 'PageUp'; - TO_STRING_MAP[KeyCode.PageDown] = 'PageDown'; - TO_STRING_MAP[KeyCode.End] = 'End'; - TO_STRING_MAP[KeyCode.Home] = 'Home'; - TO_STRING_MAP[KeyCode.LeftArrow] = 'LeftArrow'; - TO_STRING_MAP[KeyCode.UpArrow] = 'UpArrow'; - TO_STRING_MAP[KeyCode.RightArrow] = 'RightArrow'; - TO_STRING_MAP[KeyCode.DownArrow] = 'DownArrow'; - TO_STRING_MAP[KeyCode.Insert] = 'Insert'; - TO_STRING_MAP[KeyCode.Delete] = 'Delete'; - - TO_STRING_MAP[KeyCode.KEY_0] = '0'; - TO_STRING_MAP[KeyCode.KEY_1] = '1'; - TO_STRING_MAP[KeyCode.KEY_2] = '2'; - TO_STRING_MAP[KeyCode.KEY_3] = '3'; - TO_STRING_MAP[KeyCode.KEY_4] = '4'; - TO_STRING_MAP[KeyCode.KEY_5] = '5'; - TO_STRING_MAP[KeyCode.KEY_6] = '6'; - TO_STRING_MAP[KeyCode.KEY_7] = '7'; - TO_STRING_MAP[KeyCode.KEY_8] = '8'; - TO_STRING_MAP[KeyCode.KEY_9] = '9'; - - TO_STRING_MAP[KeyCode.KEY_A] = 'A'; - TO_STRING_MAP[KeyCode.KEY_B] = 'B'; - TO_STRING_MAP[KeyCode.KEY_C] = 'C'; - TO_STRING_MAP[KeyCode.KEY_D] = 'D'; - TO_STRING_MAP[KeyCode.KEY_E] = 'E'; - TO_STRING_MAP[KeyCode.KEY_F] = 'F'; - TO_STRING_MAP[KeyCode.KEY_G] = 'G'; - TO_STRING_MAP[KeyCode.KEY_H] = 'H'; - TO_STRING_MAP[KeyCode.KEY_I] = 'I'; - TO_STRING_MAP[KeyCode.KEY_J] = 'J'; - TO_STRING_MAP[KeyCode.KEY_K] = 'K'; - TO_STRING_MAP[KeyCode.KEY_L] = 'L'; - TO_STRING_MAP[KeyCode.KEY_M] = 'M'; - TO_STRING_MAP[KeyCode.KEY_N] = 'N'; - TO_STRING_MAP[KeyCode.KEY_O] = 'O'; - TO_STRING_MAP[KeyCode.KEY_P] = 'P'; - TO_STRING_MAP[KeyCode.KEY_Q] = 'Q'; - TO_STRING_MAP[KeyCode.KEY_R] = 'R'; - TO_STRING_MAP[KeyCode.KEY_S] = 'S'; - TO_STRING_MAP[KeyCode.KEY_T] = 'T'; - TO_STRING_MAP[KeyCode.KEY_U] = 'U'; - TO_STRING_MAP[KeyCode.KEY_V] = 'V'; - TO_STRING_MAP[KeyCode.KEY_W] = 'W'; - TO_STRING_MAP[KeyCode.KEY_X] = 'X'; - TO_STRING_MAP[KeyCode.KEY_Y] = 'Y'; - TO_STRING_MAP[KeyCode.KEY_Z] = 'Z'; - - TO_STRING_MAP[KeyCode.Meta] = 'Meta'; - TO_STRING_MAP[KeyCode.ContextMenu] = 'ContextMenu'; - - TO_STRING_MAP[KeyCode.F1] = 'F1'; - TO_STRING_MAP[KeyCode.F2] = 'F2'; - TO_STRING_MAP[KeyCode.F3] = 'F3'; - TO_STRING_MAP[KeyCode.F4] = 'F4'; - TO_STRING_MAP[KeyCode.F5] = 'F5'; - TO_STRING_MAP[KeyCode.F6] = 'F6'; - TO_STRING_MAP[KeyCode.F7] = 'F7'; - TO_STRING_MAP[KeyCode.F8] = 'F8'; - TO_STRING_MAP[KeyCode.F9] = 'F9'; - TO_STRING_MAP[KeyCode.F10] = 'F10'; - TO_STRING_MAP[KeyCode.F11] = 'F11'; - TO_STRING_MAP[KeyCode.F12] = 'F12'; - TO_STRING_MAP[KeyCode.F13] = 'F13'; - TO_STRING_MAP[KeyCode.F14] = 'F14'; - TO_STRING_MAP[KeyCode.F15] = 'F15'; - TO_STRING_MAP[KeyCode.F16] = 'F16'; - TO_STRING_MAP[KeyCode.F17] = 'F17'; - TO_STRING_MAP[KeyCode.F18] = 'F18'; - TO_STRING_MAP[KeyCode.F19] = 'F19'; - - - TO_STRING_MAP[KeyCode.NumLock] = 'NumLock'; - TO_STRING_MAP[KeyCode.ScrollLock] = 'ScrollLock'; - - TO_STRING_MAP[KeyCode.US_SEMICOLON] = ';'; - TO_STRING_MAP[KeyCode.US_EQUAL] = '='; - TO_STRING_MAP[KeyCode.US_COMMA] = ','; - TO_STRING_MAP[KeyCode.US_MINUS] = '-'; - TO_STRING_MAP[KeyCode.US_DOT] = '.'; - TO_STRING_MAP[KeyCode.US_SLASH] = '/'; - TO_STRING_MAP[KeyCode.US_BACKTICK] = '`'; - TO_STRING_MAP[KeyCode.ABNT_C1] = 'ABNT_C1'; - TO_STRING_MAP[KeyCode.ABNT_C2] = 'ABNT_C2'; - TO_STRING_MAP[KeyCode.US_OPEN_SQUARE_BRACKET] = '['; - TO_STRING_MAP[KeyCode.US_BACKSLASH] = '\\'; - TO_STRING_MAP[KeyCode.US_CLOSE_SQUARE_BRACKET] = ']'; - TO_STRING_MAP[KeyCode.US_QUOTE] = '\''; - TO_STRING_MAP[KeyCode.OEM_8] = 'OEM_8'; - TO_STRING_MAP[KeyCode.OEM_102] = 'OEM_102'; - - TO_STRING_MAP[KeyCode.NUMPAD_0] = 'NumPad0'; - TO_STRING_MAP[KeyCode.NUMPAD_1] = 'NumPad1'; - TO_STRING_MAP[KeyCode.NUMPAD_2] = 'NumPad2'; - TO_STRING_MAP[KeyCode.NUMPAD_3] = 'NumPad3'; - TO_STRING_MAP[KeyCode.NUMPAD_4] = 'NumPad4'; - TO_STRING_MAP[KeyCode.NUMPAD_5] = 'NumPad5'; - TO_STRING_MAP[KeyCode.NUMPAD_6] = 'NumPad6'; - TO_STRING_MAP[KeyCode.NUMPAD_7] = 'NumPad7'; - TO_STRING_MAP[KeyCode.NUMPAD_8] = 'NumPad8'; - TO_STRING_MAP[KeyCode.NUMPAD_9] = 'NumPad9'; - - TO_STRING_MAP[KeyCode.NUMPAD_MULTIPLY] = 'NumPad_Multiply'; - TO_STRING_MAP[KeyCode.NUMPAD_ADD] = 'NumPad_Add'; - TO_STRING_MAP[KeyCode.NUMPAD_SEPARATOR] = 'NumPad_Separator'; - TO_STRING_MAP[KeyCode.NUMPAD_SUBTRACT] = 'NumPad_Subtract'; - TO_STRING_MAP[KeyCode.NUMPAD_DECIMAL] = 'NumPad_Decimal'; - TO_STRING_MAP[KeyCode.NUMPAD_DIVIDE] = 'NumPad_Divide'; - - // for (let i = 0; i < KeyCode.MAX_VALUE; i++) { - // if (!TO_STRING_MAP[i]) { - // console.warn('Missing string representation for ' + KeyCode[i]); - // } - // } -}, (FROM_STRING_MAP) => { - FROM_STRING_MAP['\r'] = KeyCode.Enter; -}); - - -export let USER_SETTINGS = createMapping((TO_USER_SETTINGS_MAP) => { - for (let i = 0, len = STRING._fromKeyCode.length; i < len; i++) { - TO_USER_SETTINGS_MAP[i] = STRING._fromKeyCode[i]; + define(KeyCode.Unknown, 'unknown'); + + define(KeyCode.Backspace, 'Backspace'); + define(KeyCode.Tab, 'Tab'); + define(KeyCode.Enter, 'Enter'); + define(KeyCode.Shift, 'Shift'); + define(KeyCode.Ctrl, 'Ctrl'); + define(KeyCode.Alt, 'Alt'); + define(KeyCode.PauseBreak, 'PauseBreak'); + define(KeyCode.CapsLock, 'CapsLock'); + define(KeyCode.Escape, 'Escape'); + define(KeyCode.Space, 'Space'); + define(KeyCode.PageUp, 'PageUp'); + define(KeyCode.PageDown, 'PageDown'); + define(KeyCode.End, 'End'); + define(KeyCode.Home, 'Home'); + + define(KeyCode.LeftArrow, 'LeftArrow', 'Left'); + define(KeyCode.UpArrow, 'UpArrow', 'Up'); + define(KeyCode.RightArrow, 'RightArrow', 'Right'); + define(KeyCode.DownArrow, 'DownArrow', 'Down'); + define(KeyCode.Insert, 'Insert'); + define(KeyCode.Delete, 'Delete'); + + define(KeyCode.KEY_0, '0'); + define(KeyCode.KEY_1, '1'); + define(KeyCode.KEY_2, '2'); + define(KeyCode.KEY_3, '3'); + define(KeyCode.KEY_4, '4'); + define(KeyCode.KEY_5, '5'); + define(KeyCode.KEY_6, '6'); + define(KeyCode.KEY_7, '7'); + define(KeyCode.KEY_8, '8'); + define(KeyCode.KEY_9, '9'); + + define(KeyCode.KEY_A, 'A'); + define(KeyCode.KEY_B, 'B'); + define(KeyCode.KEY_C, 'C'); + define(KeyCode.KEY_D, 'D'); + define(KeyCode.KEY_E, 'E'); + define(KeyCode.KEY_F, 'F'); + define(KeyCode.KEY_G, 'G'); + define(KeyCode.KEY_H, 'H'); + define(KeyCode.KEY_I, 'I'); + define(KeyCode.KEY_J, 'J'); + define(KeyCode.KEY_K, 'K'); + define(KeyCode.KEY_L, 'L'); + define(KeyCode.KEY_M, 'M'); + define(KeyCode.KEY_N, 'N'); + define(KeyCode.KEY_O, 'O'); + define(KeyCode.KEY_P, 'P'); + define(KeyCode.KEY_Q, 'Q'); + define(KeyCode.KEY_R, 'R'); + define(KeyCode.KEY_S, 'S'); + define(KeyCode.KEY_T, 'T'); + define(KeyCode.KEY_U, 'U'); + define(KeyCode.KEY_V, 'V'); + define(KeyCode.KEY_W, 'W'); + define(KeyCode.KEY_X, 'X'); + define(KeyCode.KEY_Y, 'Y'); + define(KeyCode.KEY_Z, 'Z'); + + define(KeyCode.Meta, 'Meta'); + define(KeyCode.ContextMenu, 'ContextMenu'); + + define(KeyCode.F1, 'F1'); + define(KeyCode.F2, 'F2'); + define(KeyCode.F3, 'F3'); + define(KeyCode.F4, 'F4'); + define(KeyCode.F5, 'F5'); + define(KeyCode.F6, 'F6'); + define(KeyCode.F7, 'F7'); + define(KeyCode.F8, 'F8'); + define(KeyCode.F9, 'F9'); + define(KeyCode.F10, 'F10'); + define(KeyCode.F11, 'F11'); + define(KeyCode.F12, 'F12'); + define(KeyCode.F13, 'F13'); + define(KeyCode.F14, 'F14'); + define(KeyCode.F15, 'F15'); + define(KeyCode.F16, 'F16'); + define(KeyCode.F17, 'F17'); + define(KeyCode.F18, 'F18'); + define(KeyCode.F19, 'F19'); + + define(KeyCode.NumLock, 'NumLock'); + define(KeyCode.ScrollLock, 'ScrollLock'); + + define(KeyCode.US_SEMICOLON, ';', ';', 'OEM_1'); + define(KeyCode.US_EQUAL, '=', '=', 'OEM_PLUS'); + define(KeyCode.US_COMMA, ',', ',', 'OEM_COMMA'); + define(KeyCode.US_MINUS, '-', '-', 'OEM_MINUS'); + define(KeyCode.US_DOT, '.', '.', 'OEM_PERIOD'); + define(KeyCode.US_SLASH, '/', '/', 'OEM_2'); + define(KeyCode.US_BACKTICK, '`', '`', 'OEM_3'); + define(KeyCode.ABNT_C1, 'ABNT_C1'); + define(KeyCode.ABNT_C2, 'ABNT_C2'); + define(KeyCode.US_OPEN_SQUARE_BRACKET, '[', '[', 'OEM_4'); + define(KeyCode.US_BACKSLASH, '\\', '\\', 'OEM_5'); + define(KeyCode.US_CLOSE_SQUARE_BRACKET, ']', ']', 'OEM_6'); + define(KeyCode.US_QUOTE, '\'', '\'', 'OEM_7'); + define(KeyCode.OEM_8, 'OEM_8'); + define(KeyCode.OEM_102, 'OEM_102'); + + define(KeyCode.NUMPAD_0, 'NumPad0'); + define(KeyCode.NUMPAD_1, 'NumPad1'); + define(KeyCode.NUMPAD_2, 'NumPad2'); + define(KeyCode.NUMPAD_3, 'NumPad3'); + define(KeyCode.NUMPAD_4, 'NumPad4'); + define(KeyCode.NUMPAD_5, 'NumPad5'); + define(KeyCode.NUMPAD_6, 'NumPad6'); + define(KeyCode.NUMPAD_7, 'NumPad7'); + define(KeyCode.NUMPAD_8, 'NumPad8'); + define(KeyCode.NUMPAD_9, 'NumPad9'); + + define(KeyCode.NUMPAD_MULTIPLY, 'NumPad_Multiply'); + define(KeyCode.NUMPAD_ADD, 'NumPad_Add'); + define(KeyCode.NUMPAD_SEPARATOR, 'NumPad_Separator'); + define(KeyCode.NUMPAD_SUBTRACT, 'NumPad_Subtract'); + define(KeyCode.NUMPAD_DECIMAL, 'NumPad_Decimal'); + define(KeyCode.NUMPAD_DIVIDE, 'NumPad_Divide'); + +})(); + + +export const USER_SETTINGS = { + fromKeyCode: (keyCode: KeyCode) => { + return usUserSettings.fromKeyCode(keyCode); + }, + toKeyCode: (str: string) => { + return usUserSettings.toKeyCode(str) || generalUserSettings.toKeyCode(str); } - TO_USER_SETTINGS_MAP[KeyCode.LeftArrow] = 'Left'; - TO_USER_SETTINGS_MAP[KeyCode.UpArrow] = 'Up'; - TO_USER_SETTINGS_MAP[KeyCode.RightArrow] = 'Right'; - TO_USER_SETTINGS_MAP[KeyCode.DownArrow] = 'Down'; -}, (FROM_USER_SETTINGS_MAP) => { - FROM_USER_SETTINGS_MAP['OEM_1'] = KeyCode.US_SEMICOLON; - FROM_USER_SETTINGS_MAP['OEM_PLUS'] = KeyCode.US_EQUAL; - FROM_USER_SETTINGS_MAP['OEM_COMMA'] = KeyCode.US_COMMA; - FROM_USER_SETTINGS_MAP['OEM_MINUS'] = KeyCode.US_MINUS; - FROM_USER_SETTINGS_MAP['OEM_PERIOD'] = KeyCode.US_DOT; - FROM_USER_SETTINGS_MAP['OEM_2'] = KeyCode.US_SLASH; - FROM_USER_SETTINGS_MAP['OEM_3'] = KeyCode.US_BACKTICK; - FROM_USER_SETTINGS_MAP['ABNT_C1'] = KeyCode.ABNT_C1; - FROM_USER_SETTINGS_MAP['ABNT_C2'] = KeyCode.ABNT_C2; - FROM_USER_SETTINGS_MAP['OEM_4'] = KeyCode.US_OPEN_SQUARE_BRACKET; - FROM_USER_SETTINGS_MAP['OEM_5'] = KeyCode.US_BACKSLASH; - FROM_USER_SETTINGS_MAP['OEM_6'] = KeyCode.US_CLOSE_SQUARE_BRACKET; - FROM_USER_SETTINGS_MAP['OEM_7'] = KeyCode.US_QUOTE; - FROM_USER_SETTINGS_MAP['OEM_8'] = KeyCode.OEM_8; - FROM_USER_SETTINGS_MAP['OEM_102'] = KeyCode.OEM_102; -}); +}; export namespace KeyCodeUtils { - export function toString(key: KeyCode): string { - return STRING.fromKeyCode(key); + export function toString(keyCode: KeyCode): string { + return ui.fromKeyCode(keyCode); + // return STRING.fromKeyCode(keyCode); } export function fromString(key: string): KeyCode { - return STRING.toKeyCode(key); + return ui.toKeyCode(key); + // return STRING.toKeyCode(key); } } From 227b38f6421c72274a32cb6678eebb5b5501c7b1 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 18:14:03 +0200 Subject: [PATCH 0781/2747] Fixes #26945: Present symbolic names in keybindings.json for non-US standard keyboard layouts --- src/vs/base/common/keyCodes.ts | 42 +++++++++---------- .../common/usLayoutResolvedKeybinding.ts | 4 +- .../keybinding/common/keybindingIO.ts | 6 +-- .../common/macLinuxKeyboardMapper.ts | 6 +-- .../common/windowsKeyboardMapper.ts | 11 +++-- .../electron-browser/keybindingService.ts | 4 +- .../test/windowsKeyboardMapper.test.ts | 26 ++++++------ 7 files changed, 51 insertions(+), 48 deletions(-) diff --git a/src/vs/base/common/keyCodes.ts b/src/vs/base/common/keyCodes.ts index 893b7c0540b82..b3a1ee94fbea1 100644 --- a/src/vs/base/common/keyCodes.ts +++ b/src/vs/base/common/keyCodes.ts @@ -215,25 +215,25 @@ class KeyCodeStrMap { this._strToKeyCode[str.toLowerCase()] = keyCode; } - fromKeyCode(keyCode: KeyCode): string { + keyCodeToStr(keyCode: KeyCode): string { return this._keyCodeToStr[keyCode]; } - toKeyCode(str: string): KeyCode { + strToKeyCode(str: string): KeyCode { return this._strToKeyCode[str.toLowerCase()] || KeyCode.Unknown; } } -const ui = new KeyCodeStrMap(); -const usUserSettings = new KeyCodeStrMap(); -const generalUserSettings = new KeyCodeStrMap(); +const uiMap = new KeyCodeStrMap(); +const userSettingsUSMap = new KeyCodeStrMap(); +const userSettingsGeneralMap = new KeyCodeStrMap(); (function () { function define(keyCode: KeyCode, uiLabel: string, usUserSettingsLabel: string = uiLabel, generalUserSettingsLabel: string = usUserSettingsLabel): void { - ui.define(keyCode, uiLabel); - usUserSettings.define(keyCode, usUserSettingsLabel); - generalUserSettings.define(keyCode, generalUserSettingsLabel); + uiMap.define(keyCode, uiLabel); + userSettingsUSMap.define(keyCode, usUserSettingsLabel); + userSettingsGeneralMap.define(keyCode, generalUserSettingsLabel); } define(KeyCode.Unknown, 'unknown'); @@ -360,24 +360,22 @@ const generalUserSettings = new KeyCodeStrMap(); })(); - -export const USER_SETTINGS = { - fromKeyCode: (keyCode: KeyCode) => { - return usUserSettings.fromKeyCode(keyCode); - }, - toKeyCode: (str: string) => { - return usUserSettings.toKeyCode(str) || generalUserSettings.toKeyCode(str); - } -}; - export namespace KeyCodeUtils { export function toString(keyCode: KeyCode): string { - return ui.fromKeyCode(keyCode); - // return STRING.fromKeyCode(keyCode); + return uiMap.keyCodeToStr(keyCode); } export function fromString(key: string): KeyCode { - return ui.toKeyCode(key); - // return STRING.toKeyCode(key); + return uiMap.strToKeyCode(key); + } + + export function toUserSettingsUS(keyCode: KeyCode): string { + return userSettingsUSMap.keyCodeToStr(keyCode); + } + export function toUserSettingsGeneral(keyCode: KeyCode): string { + return userSettingsGeneralMap.keyCodeToStr(keyCode); + } + export function fromUserSettings(key: string): KeyCode { + return userSettingsUSMap.strToKeyCode(key) || userSettingsGeneralMap.strToKeyCode(key); } } diff --git a/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts b/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts index 11bf5ad1801f3..08d67882828f8 100644 --- a/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts +++ b/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { ResolvedKeybinding, ResolvedKeybindingPart, KeyCode, KeyCodeUtils, USER_SETTINGS, Keybinding, KeybindingType, SimpleKeybinding } from 'vs/base/common/keyCodes'; +import { ResolvedKeybinding, ResolvedKeybindingPart, KeyCode, KeyCodeUtils, Keybinding, KeybindingType, SimpleKeybinding } from 'vs/base/common/keyCodes'; import { UILabelProvider, AriaLabelProvider, ElectronAcceleratorLabelProvider, UserSettingsLabelProvider } from 'vs/platform/keybinding/common/keybindingLabels'; import { OperatingSystem } from 'vs/base/common/platform'; @@ -127,7 +127,7 @@ export class USLayoutResolvedKeybinding extends ResolvedKeybinding { if (keybinding.isDuplicateModifierCase()) { return ''; } - return USER_SETTINGS.fromKeyCode(keybinding.keyCode); + return KeyCodeUtils.toUserSettingsUS(keybinding.keyCode); } public getUserSettingsLabel(): string { diff --git a/src/vs/workbench/services/keybinding/common/keybindingIO.ts b/src/vs/workbench/services/keybinding/common/keybindingIO.ts index 5a432e6d0c1fd..64037ac9774b3 100644 --- a/src/vs/workbench/services/keybinding/common/keybindingIO.ts +++ b/src/vs/workbench/services/keybinding/common/keybindingIO.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { USER_SETTINGS, Keybinding, SimpleKeybinding, ChordKeybinding } from 'vs/base/common/keyCodes'; +import { Keybinding, SimpleKeybinding, ChordKeybinding, KeyCodeUtils } from 'vs/base/common/keyCodes'; import { OperatingSystem } from 'vs/base/common/platform'; import { IUserFriendlyKeybinding } from 'vs/platform/keybinding/common/keybinding'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; @@ -119,7 +119,7 @@ export class KeybindingIO { private static _readSimpleKeybinding(input: string): [SimpleKeybinding, string] { const mods = this._readModifiers(input); - const keyCode = USER_SETTINGS.toKeyCode(mods.key); + const keyCode = KeyCodeUtils.fromUserSettings(mods.key); return [new SimpleKeybinding(mods.ctrl, mods.shift, mods.alt, mods.meta, keyCode), mods.remains]; } @@ -148,7 +148,7 @@ export class KeybindingIO { const scanCode = ScanCodeUtils.lowerCaseToEnum(strScanCode); return [new ScanCodeBinding(mods.ctrl, mods.shift, mods.alt, mods.meta, scanCode), mods.remains]; } - const keyCode = USER_SETTINGS.toKeyCode(mods.key); + const keyCode = KeyCodeUtils.fromUserSettings(mods.key); return [new SimpleKeybinding(mods.ctrl, mods.shift, mods.alt, mods.meta, keyCode), mods.remains]; } diff --git a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts index e7eacdb6a965a..aec84334a9828 100644 --- a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts @@ -6,7 +6,7 @@ 'use strict'; import { OperatingSystem } from 'vs/base/common/platform'; -import { KeyCode, ResolvedKeybinding, KeyCodeUtils, SimpleKeybinding, Keybinding, KeybindingType, USER_SETTINGS, ResolvedKeybindingPart } from 'vs/base/common/keyCodes'; +import { KeyCode, ResolvedKeybinding, KeyCodeUtils, SimpleKeybinding, Keybinding, KeybindingType, ResolvedKeybindingPart } from 'vs/base/common/keyCodes'; import { ScanCode, ScanCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE, IMMUTABLE_KEY_CODE_TO_CODE, ScanCodeBinding } from 'vs/workbench/services/keybinding/common/scanCode'; import { CharCode } from 'vs/base/common/charCode'; import { UILabelProvider, AriaLabelProvider, UserSettingsLabelProvider, ElectronAcceleratorLabelProvider } from 'vs/platform/keybinding/common/keybindingLabels'; @@ -926,7 +926,7 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { const immutableKeyCode = IMMUTABLE_CODE_TO_KEY_CODE[binding.scanCode]; if (immutableKeyCode !== -1) { - return USER_SETTINGS.fromKeyCode(immutableKeyCode).toLowerCase(); + return KeyCodeUtils.toUserSettingsUS(immutableKeyCode).toLowerCase(); } // Check if this scanCode always maps to the same keyCode and back @@ -937,7 +937,7 @@ export class MacLinuxKeyboardMapper implements IKeyboardMapper { for (let i = 0, len = reverseBindings.length; i < len; i++) { const reverseBinding = reverseBindings[i]; if (reverseBinding.scanCode === binding.scanCode) { - return USER_SETTINGS.fromKeyCode(constantKeyCode).toLowerCase(); + return KeyCodeUtils.toUserSettingsUS(constantKeyCode).toLowerCase(); } } } diff --git a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts index 8007414043993..6eef623475fc2 100644 --- a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts @@ -5,7 +5,7 @@ 'use strict'; -import { KeyCode, KeyCodeUtils, ResolvedKeybinding, Keybinding, SimpleKeybinding, KeybindingType, USER_SETTINGS, ResolvedKeybindingPart } from 'vs/base/common/keyCodes'; +import { KeyCode, KeyCodeUtils, ResolvedKeybinding, Keybinding, SimpleKeybinding, KeybindingType, ResolvedKeybindingPart } from 'vs/base/common/keyCodes'; import { ScanCode, ScanCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE, ScanCodeBinding } from 'vs/workbench/services/keybinding/common/scanCode'; import { CharCode } from 'vs/base/common/charCode'; import { UILabelProvider, AriaLabelProvider, ElectronAcceleratorLabelProvider, UserSettingsLabelProvider } from 'vs/platform/keybinding/common/keybindingLabels'; @@ -171,7 +171,10 @@ export class WindowsNativeResolvedKeybinding extends ResolvedKeybinding { if (keybinding.isDuplicateModifierCase()) { return ''; } - return USER_SETTINGS.fromKeyCode(keybinding.keyCode); + if (this._mapper.isUSStandard) { + return KeyCodeUtils.toUserSettingsUS(keybinding.keyCode); + } + return KeyCodeUtils.toUserSettingsGeneral(keybinding.keyCode); } public getUserSettingsLabel(): string { @@ -273,12 +276,14 @@ export class WindowsNativeResolvedKeybinding extends ResolvedKeybinding { export class WindowsKeyboardMapper implements IKeyboardMapper { + public readonly isUSStandard: boolean; private readonly _codeInfo: IScanCodeMapping[]; private readonly _scanCodeToKeyCode: KeyCode[]; private readonly _keyCodeToLabel: string[] = []; private readonly _keyCodeExists: boolean[]; - constructor(rawMappings: IWindowsKeyboardMapping) { + constructor(isUSStandard: boolean, rawMappings: IWindowsKeyboardMapping) { + this.isUSStandard = isUSStandard; this._scanCodeToKeyCode = []; this._keyCodeToLabel = []; this._keyCodeExists = []; diff --git a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts index a569b80797182..c7c61fc9d376a 100644 --- a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts +++ b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts @@ -126,8 +126,9 @@ export class KeyboardMapperFactory { } private static _createKeyboardMapper(isISOKeyboard: boolean, layoutInfo: nativeKeymap.IKeyboardLayoutInfo, rawMapping: nativeKeymap.IKeyboardMapping): IKeyboardMapper { + const isUSStandard = KeyboardMapperFactory._isUSStandard(layoutInfo); if (OS === OperatingSystem.Windows) { - return new WindowsKeyboardMapper(rawMapping); + return new WindowsKeyboardMapper(isUSStandard, rawMapping); } if (Object.keys(rawMapping).length === 0) { @@ -143,7 +144,6 @@ export class KeyboardMapperFactory { } } - const isUSStandard = KeyboardMapperFactory._isUSStandard(layoutInfo); return new MacLinuxKeyboardMapper(isISOKeyboard, isUSStandard, rawMapping, OS); } diff --git a/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts b/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts index 431bfd0a20b51..9ec12ce6b6ca8 100644 --- a/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts +++ b/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts @@ -14,9 +14,9 @@ import { ScanCodeBinding, ScanCode } from 'vs/workbench/services/keybinding/comm const WRITE_FILE_IF_DIFFERENT = false; -function createKeyboardMapper(file: string): TPromise { +function createKeyboardMapper(isUSStandard: boolean, file: string): TPromise { return readRawMapping(file).then((rawMappings) => { - return new WindowsKeyboardMapper(rawMappings); + return new WindowsKeyboardMapper(isUSStandard, rawMappings); }); } @@ -29,7 +29,7 @@ suite('keyboardMapper - WINDOWS de_ch', () => { let mapper: WindowsKeyboardMapper; suiteSetup((done) => { - createKeyboardMapper('win_de_ch').then((_mapper) => { + createKeyboardMapper(false, 'win_de_ch').then((_mapper) => { mapper = _mapper; done(); }, done); @@ -102,7 +102,7 @@ suite('keyboardMapper - WINDOWS de_ch', () => { label: 'Ctrl+^', ariaLabel: 'Control+^', electronAccelerator: 'Ctrl+]', - userSettingsLabel: 'ctrl+]', + userSettingsLabel: 'ctrl+oem_6', isWYSIWYG: false, isChord: false, dispatchParts: ['ctrl+]', null], @@ -125,7 +125,7 @@ suite('keyboardMapper - WINDOWS de_ch', () => { label: 'Ctrl+^', ariaLabel: 'Control+^', electronAccelerator: 'Ctrl+]', - userSettingsLabel: 'ctrl+]', + userSettingsLabel: 'ctrl+oem_6', isWYSIWYG: false, isChord: false, dispatchParts: ['ctrl+]', null], @@ -141,7 +141,7 @@ suite('keyboardMapper - WINDOWS de_ch', () => { label: 'Shift+^', ariaLabel: 'Shift+^', electronAccelerator: 'Shift+]', - userSettingsLabel: 'shift+]', + userSettingsLabel: 'shift+oem_6', isWYSIWYG: false, isChord: false, dispatchParts: ['shift+]', null], @@ -157,7 +157,7 @@ suite('keyboardMapper - WINDOWS de_ch', () => { label: 'Ctrl+§', ariaLabel: 'Control+§', electronAccelerator: 'Ctrl+/', - userSettingsLabel: 'ctrl+/', + userSettingsLabel: 'ctrl+oem_2', isWYSIWYG: false, isChord: false, dispatchParts: ['ctrl+/', null], @@ -173,7 +173,7 @@ suite('keyboardMapper - WINDOWS de_ch', () => { label: 'Ctrl+Shift+§', ariaLabel: 'Control+Shift+§', electronAccelerator: 'Ctrl+Shift+/', - userSettingsLabel: 'ctrl+shift+/', + userSettingsLabel: 'ctrl+shift+oem_2', isWYSIWYG: false, isChord: false, dispatchParts: ['ctrl+shift+/', null], @@ -189,7 +189,7 @@ suite('keyboardMapper - WINDOWS de_ch', () => { label: 'Ctrl+K Ctrl+ä', ariaLabel: 'Control+K Control+ä', electronAccelerator: null, - userSettingsLabel: 'ctrl+k ctrl+\\', + userSettingsLabel: 'ctrl+k ctrl+oem_5', isWYSIWYG: false, isChord: true, dispatchParts: ['ctrl+K', 'ctrl+\\'], @@ -285,7 +285,7 @@ suite('keyboardMapper - WINDOWS de_ch', () => { label: 'Ctrl+, Ctrl+§', ariaLabel: 'Control+, Control+§', electronAccelerator: null, - userSettingsLabel: 'ctrl+, ctrl+/', + userSettingsLabel: 'ctrl+oem_comma ctrl+oem_2', isWYSIWYG: false, isChord: true, dispatchParts: ['ctrl+,', 'ctrl+/'], @@ -322,7 +322,7 @@ suite('keyboardMapper - WINDOWS en_us', () => { let mapper: WindowsKeyboardMapper; suiteSetup((done) => { - createKeyboardMapper('win_en_us').then((_mapper) => { + createKeyboardMapper(true, 'win_en_us').then((_mapper) => { mapper = _mapper; done(); }, done); @@ -412,7 +412,7 @@ suite('keyboardMapper - WINDOWS por_ptb', () => { let mapper: WindowsKeyboardMapper; suiteSetup((done) => { - createKeyboardMapper('win_por_ptb').then((_mapper) => { + createKeyboardMapper(false, 'win_por_ptb').then((_mapper) => { mapper = _mapper; done(); }, done); @@ -471,7 +471,7 @@ suite('keyboardMapper - WINDOWS por_ptb', () => { suite('misc', () => { test('issue #23513: Toggle Sidebar Visibility and Go to Line display same key mapping in Arabic keyboard', () => { - const mapper = new WindowsKeyboardMapper({ + const mapper = new WindowsKeyboardMapper(false, { 'KeyB': { 'vkey': 'VK_B', 'value': 'لا', From 6fd1ac9ccc4f062d271899f9d4919c8c8c5a9b74 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Fri, 19 May 2017 18:17:26 +0200 Subject: [PATCH 0782/2747] Fixes #26949: Task version 0.1.0 doesn't list any task anymore. Shows endless progress --- .../parts/tasks/electron-browser/task.contribution.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index dd1b8025ae42e..3aff765da6a73 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -894,11 +894,13 @@ class TaskService extends EventEmitter implements ITaskService { resolve(result); } }; - if (this.getExecutionEngine() === ExecutionEngine.Terminal) { + if (this.getExecutionEngine() === ExecutionEngine.Terminal && this._providers.size > 0) { this._providers.forEach((provider) => { counter++; provider.provideTasks().done(done, error); }); + } else { + resolve(result); } }).then((result) => { return this.getWorkspaceTasks().then((workspaceTaskResult) => { From e87e0999d43cca3dbbf30ca842e6707cf1585500 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 19 May 2017 18:22:59 +0200 Subject: [PATCH 0783/2747] Implement #26948 - Initial version of custom views and tree data provider API --- .../base/browser/ui/splitview/splitview.css | 4 + src/vs/base/browser/ui/splitview/splitview.ts | 35 ++- src/vs/vscode.proposed.d.ts | 103 +++---- .../extensionHost.contribution.ts | 4 +- .../mainThreadExplorerView.ts | 83 ------ .../electron-browser/mainThreadTreeViews.ts | 123 ++++++++ src/vs/workbench/api/node/extHost.api.impl.ts | 9 +- src/vs/workbench/api/node/extHost.protocol.ts | 34 ++- .../workbench/api/node/extHostExplorerView.ts | 163 ----------- src/vs/workbench/api/node/extHostTreeViews.ts | 210 ++++++++++++++ src/vs/workbench/api/node/extHostTypes.ts | 5 + src/vs/workbench/browser/viewlet.ts | 30 +- .../electron-browser/workbench.main.ts | 5 +- .../browser/explorer.contribution.ts | 10 - .../parts/explorers/browser/media/Refresh.svg | 1 - .../browser/media/Refresh_inverse.svg | 1 - .../browser/treeExplorer.contribution.ts | 120 -------- .../explorers/browser/treeExplorerActions.ts | 21 -- .../explorers/browser/treeExplorerMenus.ts | 100 ------- .../explorers/browser/treeExplorerService.ts | 85 ------ .../explorers/browser/treeExplorerViewlet.ts | 102 ------- .../browser/views/treeExplorerView.ts | 139 --------- .../browser/views/treeExplorerViewer.ts | 208 -------------- .../parts/explorers/common/explorer.ts | 37 --- .../parts/explorers/common/treeExplorer.ts | 21 -- .../explorers/common/treeExplorerService.ts | 28 -- .../explorers/common/treeExplorerViewModel.ts | 27 -- .../parts/files/browser/explorerViewlet.ts | 103 +++++-- .../browser/media/views.css} | 24 +- .../browser/treeView.ts} | 269 ++++++++++-------- src/vs/workbench/parts/views/browser/views.ts | 144 ++++++++++ .../views/browser/viewsExtensionPoint.ts | 101 +++++++ 32 files changed, 964 insertions(+), 1385 deletions(-) delete mode 100644 src/vs/workbench/api/electron-browser/mainThreadExplorerView.ts create mode 100644 src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts delete mode 100644 src/vs/workbench/api/node/extHostExplorerView.ts create mode 100644 src/vs/workbench/api/node/extHostTreeViews.ts delete mode 100644 src/vs/workbench/parts/explorers/browser/explorer.contribution.ts delete mode 100644 src/vs/workbench/parts/explorers/browser/media/Refresh.svg delete mode 100644 src/vs/workbench/parts/explorers/browser/media/Refresh_inverse.svg delete mode 100644 src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.ts delete mode 100644 src/vs/workbench/parts/explorers/browser/treeExplorerActions.ts delete mode 100644 src/vs/workbench/parts/explorers/browser/treeExplorerMenus.ts delete mode 100644 src/vs/workbench/parts/explorers/browser/treeExplorerService.ts delete mode 100644 src/vs/workbench/parts/explorers/browser/treeExplorerViewlet.ts delete mode 100644 src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts delete mode 100644 src/vs/workbench/parts/explorers/browser/views/treeExplorerViewer.ts delete mode 100644 src/vs/workbench/parts/explorers/common/explorer.ts delete mode 100644 src/vs/workbench/parts/explorers/common/treeExplorer.ts delete mode 100644 src/vs/workbench/parts/explorers/common/treeExplorerService.ts delete mode 100644 src/vs/workbench/parts/explorers/common/treeExplorerViewModel.ts rename src/vs/workbench/parts/{explorers/browser/media/treeExplorer.contribution.css => views/browser/media/views.css} (50%) rename src/vs/workbench/parts/{explorers/browser/explorerView.ts => views/browser/treeView.ts} (59%) create mode 100644 src/vs/workbench/parts/views/browser/views.ts create mode 100644 src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts diff --git a/src/vs/base/browser/ui/splitview/splitview.css b/src/vs/base/browser/ui/splitview/splitview.css index 8936d95727e08..4a6de69c521c0 100644 --- a/src/vs/base/browser/ui/splitview/splitview.css +++ b/src/vs/base/browser/ui/splitview/splitview.css @@ -30,6 +30,10 @@ display: flex; } +.monaco-split-view > .split-view-view > .header.hide { + display: none; +} + /* Bold font style does not go well with CJK fonts */ .monaco-split-view:lang(zh-Hans) > .split-view-view > .header, .monaco-split-view:lang(zh-Hant) > .split-view-view > .header, diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 09df1966a1559..b642b5359e497 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -117,7 +117,9 @@ const headerDefaultOpts = { export abstract class HeaderView extends View { - protected headerSize: number; + private _headerSize: number; + private _showHeader: boolean; + protected header: HTMLElement; protected body: HTMLElement; @@ -127,7 +129,8 @@ export abstract class HeaderView extends View { constructor(opts: IHeaderViewOptions) { super(opts); - this.headerSize = types.isUndefined(opts.headerSize) ? 22 : opts.headerSize; + this._headerSize = types.isUndefined(opts.headerSize) ? 22 : opts.headerSize; + this._showHeader = this._headerSize > 0; this.headerBackground = opts.headerBackground || headerDefaultOpts.headerBackground; this.headerHighContrastBorder = opts.headerHighContrastBorder; @@ -140,6 +143,10 @@ export abstract class HeaderView extends View { this.applyStyles(); } + protected get headerSize(): number { + return this._showHeader ? this._headerSize : 0; + } + protected applyStyles(): void { if (this.header) { const headerBackgroundColor = this.headerBackground ? this.headerBackground.toString() : null; @@ -162,7 +169,7 @@ export abstract class HeaderView extends View { this.header.style.height = headerSize; } - if (this.headerSize > 0) { + if (this._showHeader) { this.renderHeader(this.header); container.appendChild(this.header); } @@ -177,6 +184,28 @@ export abstract class HeaderView extends View { this.applyStyles(); } + showHeader(): boolean { + if (!this._showHeader) { + if (!this.body.parentElement.contains(this.header)) { + this.renderHeader(this.header); + this.body.parentElement.insertBefore(this.header, this.body); + } + dom.removeClass(this.header, 'hide'); + this._showHeader = true; + return true; + } + return false; + } + + hideHeader(): boolean { + if (this._showHeader) { + dom.addClass(this.header, 'hide'); + this._showHeader = false; + return true; + } + return false; + } + layout(size: number, orientation: Orientation): void { this.layoutBodyContainer(orientation); this.layoutBody(size - this.headerSize); diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 5e6265c2d2077..c1cad09129dd3 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -13,98 +13,81 @@ declare module 'vscode' { } export namespace window { - /** - * Create a new explorer view. - * + * Register a [TreeDataProvider](#TreeDataProvider) for the registered view `id`. * @param id View id. - * @param name View name. - * @param dataProvider A [TreeDataProvider](#TreeDataProvider). - * @return An instance of [View](#View). + * @param treeDataProvider A [TreeDataProvider](#TreeDataProvider) that provides tree data for the view */ - export function createExplorerView(id: string, name: string, dataProvider: TreeDataProvider): View; + export function registerTreeDataProvider(id: string, treeDataProvider: TreeDataProvider): Disposable; } /** - * A view to interact with nodes + * A data provider that provides tree data for a view */ - export interface View { + export interface TreeDataProvider { + /** + * An optional event to signal that an element or root has changed. + */ + onDidChange?: Event; /** - * Refresh the given nodes + * get [TreeItem](#TreeItem) representation of the `element` + * + * @param element The element for which [TreeItem](#TreeItem) representation is asked for. + * @return [TreeItem](#TreeItem) representation of the element */ - refresh(...nodes: T[]): void; + getTreeItem(element: T): TreeItem; /** - * Dispose this view + * get the children of `element` or root. + * + * @param element The element from which the provider gets children for. + * @return Children of `element` or root. */ - dispose(): void; + getChildren(element?: T): T[] | Thenable; } - /** - * A data provider for a tree view contribution. - * - * The contributed tree view will ask the corresponding provider to provide the root - * node and resolve children for each node. In addition, the provider could **optionally** - * provide the following information for each node: - * - label: A human-readable label used for rendering the node. - * - hasChildren: Whether the node has children and is expandable. - * - clickCommand: A command to execute when the node is clicked. - */ - export interface TreeDataProvider { - + export interface TreeItem { /** - * Provide the root node. This function will be called when the tree explorer is activated - * for the first time. The root node is hidden and its direct children will be displayed on the first level of - * the tree explorer. - * - * @return The root node. + * Label of the tree item */ - provideRootNode(): T | Thenable; + label: string; /** - * Resolve the children of `node`. - * - * @param node The node from which the provider resolves children. - * @return Children of `node`. + * The icon path for the tree item */ - resolveChildren?(node: T): T[] | Thenable; + iconPath?: string | Uri | { light: string | Uri; dark: string | Uri }; /** - * Provide a human-readable string that will be used for rendering the node. Default to use - * `node.toString()` if not provided. - * - * @param node The node from which the provider computes label. - * @return A human-readable label. + * The [command](#Command) which should be run when the tree item + * is open in the Source Control viewlet. */ - getLabel?(node: T): string; + command?: Command; /** - * Determine if `node` has children and is expandable. Default to `true` if not provided. - * - * @param node The node to determine if it has children and is expandable. - * @return A boolean that determines if `node` has children and is expandable. + * Context value of the tree node */ - getHasChildren?(node: T): boolean; + contextValue?: string; /** - * Provider a context key to be set for the node. This can be used to describe actions for each node. - * - * @param node The node from which the provider computes context key. - * @return A context key. + * Collapsible state of the tree item. + * Required only when item has children. */ - getContextKey?(node: T): string; + collapsibleState?: TreeItemCollapsibleState; + } + /** + * Collapsible state of the tree item + */ + export enum TreeItemCollapsibleState { /** - * Get the command to execute when `node` is clicked. - * - * Commands can be registered through [registerCommand](#commands.registerCommand). `node` will be provided - * as the first argument to the command's callback function. - * - * @param node The node that the command is associated with. - * @return The command to execute when `node` is clicked. + * Determines an item is collapsed + */ + Collapsed = 1, + /** + * Determines an item is expanded */ - getClickCommand?(node: T): Command; + Expanded = 2 } /** diff --git a/src/vs/workbench/api/electron-browser/extensionHost.contribution.ts b/src/vs/workbench/api/electron-browser/extensionHost.contribution.ts index 5c84c61db3549..f60782ffe6317 100644 --- a/src/vs/workbench/api/electron-browser/extensionHost.contribution.ts +++ b/src/vs/workbench/api/electron-browser/extensionHost.contribution.ts @@ -19,7 +19,7 @@ import { MainThreadDiagnostics } from './mainThreadDiagnostics'; import { MainThreadDocuments } from './mainThreadDocuments'; import { MainThreadEditors } from './mainThreadEditors'; import { MainThreadErrors } from './mainThreadErrors'; -import { MainThreadExplorerView } from './mainThreadExplorerView'; +import { MainThreadTreeViews } from './mainThreadTreeViews'; import { MainThreadLanguageFeatures } from './mainThreadLanguageFeatures'; import { MainThreadLanguages } from './mainThreadLanguages'; import { MainThreadMessageService } from './mainThreadMessageService'; @@ -74,7 +74,7 @@ export class ExtHostContribution implements IWorkbenchContribution { col.define(MainContext.MainThreadDocuments).set(this.instantiationService.createInstance(MainThreadDocuments, documentsAndEditors)); col.define(MainContext.MainThreadEditors).set(this.instantiationService.createInstance(MainThreadEditors, documentsAndEditors)); col.define(MainContext.MainThreadErrors).set(create(MainThreadErrors)); - col.define(MainContext.MainThreadExplorerViews).set(create(MainThreadExplorerView)); + col.define(MainContext.MainThreadTreeViews).set(create(MainThreadTreeViews)); col.define(MainContext.MainThreadLanguageFeatures).set(create(MainThreadLanguageFeatures)); col.define(MainContext.MainThreadLanguages).set(create(MainThreadLanguages)); col.define(MainContext.MainThreadMessageService).set(create(MainThreadMessageService)); diff --git a/src/vs/workbench/api/electron-browser/mainThreadExplorerView.ts b/src/vs/workbench/api/electron-browser/mainThreadExplorerView.ts deleted file mode 100644 index 19013b27409b5..0000000000000 --- a/src/vs/workbench/api/electron-browser/mainThreadExplorerView.ts +++ /dev/null @@ -1,83 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import Event, { Emitter } from 'vs/base/common/event'; -import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { ExtHostContext, MainThreadExplorerViewShape, ExtHostExplorerViewShape, ITreeNode } from '../node/extHost.protocol'; -import { IMessageService, Severity } from 'vs/platform/message/common/message'; -import { ICommandService } from 'vs/platform/commands/common/commands'; -import { IExplorerViewsService, IExplorerViewDataProvider, IExplorerView } from 'vs/workbench/parts/explorers/common/explorer'; - -export class MainThreadExplorerView extends MainThreadExplorerViewShape { - - private _proxy: ExtHostExplorerViewShape; - private _views: Map> = new Map>(); - - constructor( - @IThreadService threadService: IThreadService, - @IExplorerViewsService private explorerViewsService: IExplorerViewsService, - @IMessageService private messageService: IMessageService, - @ICommandService private commandService: ICommandService - ) { - super(); - this._proxy = threadService.get(ExtHostContext.ExtHostExplorerView); - } - - $registerView(providerId: string, name: string): void { - const provider = new TreeExplorerNodeProvider(providerId, this._proxy, this.messageService, this.commandService); - const view = this.explorerViewsService.createView(providerId, name, provider); - this._views.set(providerId, view); - } - - $refresh(providerId: string, node: ITreeNode): void { - this._views.get(providerId).refresh(node); - } -} - -class TreeExplorerNodeProvider implements IExplorerViewDataProvider { - - readonly _onRefresh: Emitter = new Emitter(); - readonly onRefresh: Event = this._onRefresh.event; - - constructor(public readonly id: string, private _proxy: ExtHostExplorerViewShape, - private messageService: IMessageService, - private commandService: ICommandService - ) { - } - - provideRoot(): TPromise { - return this._proxy.$provideRootNode(this.id).then(rootNode => rootNode, err => this.messageService.show(Severity.Error, err)); - } - - resolveChildren(node: ITreeNode): TPromise { - return this._proxy.$resolveChildren(this.id, node).then(children => children, err => this.messageService.show(Severity.Error, err)); - } - - hasChildren(node: ITreeNode): boolean { - return node.hasChildren; - } - - getLabel(node: ITreeNode): string { - return node.label; - } - - getId(node: ITreeNode): string { - return node.id; - } - - getContextKey(node: ITreeNode): string { - return node.contextKey; - } - - select(node: ITreeNode): void { - this._proxy.$getInternalCommand(this.id, node).then(command => { - if (command) { - this.commandService.executeCommand(command.id, ...command.arguments); - } - }); - } -} diff --git a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts new file mode 100644 index 0000000000000..186c646eaceda --- /dev/null +++ b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts @@ -0,0 +1,123 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import Event, { Emitter } from 'vs/base/common/event'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; +import { ExtHostContext, MainThreadTreeViewsShape, ExtHostTreeViewsShape } from '../node/extHost.protocol'; +import { IMessageService, Severity } from 'vs/platform/message/common/message'; +import { ViewsRegistry, ITreeViewDataProvider, ITreeItem, TreeItemCollapsibleState } from 'vs/workbench/parts/views/browser/views'; + +export class MainThreadTreeViews extends MainThreadTreeViewsShape { + + private _proxy: ExtHostTreeViewsShape; + + constructor( + @IThreadService threadService: IThreadService, + @IMessageService private messageService: IMessageService + ) { + super(); + this._proxy = threadService.get(ExtHostContext.ExtHostTreeViews); + } + + $registerView(treeViewId: string): void { + ViewsRegistry.registerTreeViewDataProvider(treeViewId, new TreeViewDataProvider(treeViewId, this._proxy, this.messageService)); + } + + $refresh(treeViewId: string, treeItemHandle?: number): void { + const treeViewDataProvider: TreeViewDataProvider = ViewsRegistry.getTreeViewDataProvider(treeViewId); + if (treeViewDataProvider) { + treeViewDataProvider.refresh(treeItemHandle); + } + } +} + +type TreeItemHandle = number; + +class TreeViewDataProvider implements ITreeViewDataProvider { + + private _onDidChange: Emitter = new Emitter(); + readonly onDidChange: Event = this._onDidChange.event; + + private childrenMap: Map = new Map(); + private itemsMap: Map = new Map(); + + constructor(private treeViewId: string, + private _proxy: ExtHostTreeViewsShape, + private messageService: IMessageService + ) { + } + + getElements(): TPromise { + return this._proxy.$getElements(this.treeViewId) + .then(elements => { + this.postGetElements(null, elements); + return elements; + }, err => this.messageService.show(Severity.Error, err)); + } + + getChildren(treeItem: ITreeItem): TPromise { + if (treeItem.children) { + return TPromise.as(treeItem.children); + } + return this._proxy.$getChildren(this.treeViewId, treeItem.handle) + .then(children => { + this.postGetElements(treeItem.handle, children); + return children; + }, err => this.messageService.show(Severity.Error, err)); + } + + refresh(treeItemHandle?: number) { + if (treeItemHandle) { + let treeItem = this.itemsMap.get(treeItemHandle); + if (treeItem) { + this._onDidChange.fire(treeItem); + } + } else { + this._onDidChange.fire(); + } + } + + private clearChildren(treeItemHandle: TreeItemHandle): void { + const children = this.childrenMap.get(treeItemHandle); + if (children) { + for (const child of children) { + this.clearChildren(child); + this.itemsMap.delete(child); + } + this.childrenMap.delete(treeItemHandle); + } + } + + private postGetElements(parent: TreeItemHandle, children: ITreeItem[]) { + this.setElements(parent, children); + } + + private setElements(parent: TreeItemHandle, children: ITreeItem[]) { + if (children && children.length) { + for (const child of children) { + this.itemsMap.set(child.handle, child); + if (child.children && child.children.length) { + this.setElements(child.handle, child.children); + } + } + if (parent) { + this.childrenMap.set(parent, children.map(child => child.handle)); + } + } + } + + private populateElementsToExpand(elements: ITreeItem[], toExpand: ITreeItem[]) { + for (const element of elements) { + if (element.collapsibleState === TreeItemCollapsibleState.Expanded) { + toExpand.push(element); + if (element.children && element.children.length) { + this.populateElementsToExpand(element.children, toExpand); + } + } + } + } +} \ No newline at end of file diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index b1e56a9c7e12f..a9cf6c35ce800 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -18,7 +18,7 @@ import { ExtHostDocuments } from 'vs/workbench/api/node/extHostDocuments'; import { ExtHostDocumentSaveParticipant } from 'vs/workbench/api/node/extHostDocumentSaveParticipant'; import { ExtHostConfiguration } from 'vs/workbench/api/node/extHostConfiguration'; import { ExtHostDiagnostics } from 'vs/workbench/api/node/extHostDiagnostics'; -import { ExtHostExplorerView } from 'vs/workbench/api/node/extHostExplorerView'; +import { ExtHostTreeViews } from 'vs/workbench/api/node/extHostTreeViews'; import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; import { ExtHostQuickOpen } from 'vs/workbench/api/node/extHostQuickOpen'; import { ExtHostProgress } from 'vs/workbench/api/node/extHostProgress'; @@ -111,7 +111,7 @@ export function createApiFactory( const extHostDocumentSaveParticipant = col.define(ExtHostContext.ExtHostDocumentSaveParticipant).set(new ExtHostDocumentSaveParticipant(extHostDocuments, threadService.get(MainContext.MainThreadWorkspace))); const extHostEditors = col.define(ExtHostContext.ExtHostEditors).set(new ExtHostEditors(threadService, extHostDocumentsAndEditors)); const extHostCommands = col.define(ExtHostContext.ExtHostCommands).set(new ExtHostCommands(threadService, extHostHeapService)); - const extHostExplorerView = col.define(ExtHostContext.ExtHostExplorerView).set(new ExtHostExplorerView(threadService, extHostCommands)); + const extHostTreeViews = col.define(ExtHostContext.ExtHostTreeViews).set(new ExtHostTreeViews(threadService, extHostCommands)); const extHostConfiguration = col.define(ExtHostContext.ExtHostConfiguration).set(new ExtHostConfiguration(threadService.get(MainContext.MainThreadConfiguration), initData.configuration)); const extHostDiagnostics = col.define(ExtHostContext.ExtHostDiagnostics).set(new ExtHostDiagnostics(threadService)); const languageFeatures = col.define(ExtHostContext.ExtHostLanguageFeatures).set(new ExtHostLanguageFeatures(threadService, extHostDocuments, extHostCommands, extHostHeapService, extHostDiagnostics)); @@ -369,8 +369,8 @@ export function createApiFactory( sampleFunction: proposedApiFunction(extension, () => { return extHostMessageService.showMessage(Severity.Info, 'Hello Proposed Api!', {}, []); }), - createExplorerView: proposedApiFunction(extension, (id: string, name: string, provider: vscode.TreeDataProvider): vscode.View => { - return extHostExplorerView.createExplorerView(id, name, provider); + registerTreeDataProvider: proposedApiFunction(extension, (id: string, treeDataProvider: vscode.TreeDataProvider): vscode.Disposable => { + return extHostTreeViews.registerTreeDataProvider(id, treeDataProvider); }) }; @@ -533,6 +533,7 @@ export function createApiFactory( ViewColumn: extHostTypes.ViewColumn, WorkspaceEdit: extHostTypes.WorkspaceEdit, ProgressLocation: extHostTypes.ProgressLocation, + TreeItemCollapsibleState: extHostTypes.TreeItemCollapsibleState, // functions FileLocationKind: extHostTypes.FileLocationKind, ApplyToKind: extHostTypes.ApplyToKind, diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 1f602e9ac5f6c..df7977297c32a 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -194,17 +194,17 @@ export abstract class MainThreadEditorsShape { $getDiffInformation(id: string): TPromise { throw ni(); } } -export interface ITreeNode { - id: string; - label: string; - hasChildren: boolean; - clickCommand: string; - contextKey: string; +export interface TreeItem extends vscode.TreeItem { + handle: number; + commandId?: string; + icon?: string; + iconDark?: string; + children?: TreeItem[]; } -export abstract class MainThreadExplorerViewShape { - $registerView(id: string, name: string): void { throw ni(); } - $refresh(viewId: string, node: ITreeNode): void { throw ni(); } +export abstract class MainThreadTreeViewsShape { + $registerView(treeViewId: string): void { throw ni(); } + $refresh(treeViewId: string, treeItemHandle?: number): void { throw ni(); } } export abstract class MainThreadErrorsShape { @@ -408,11 +408,15 @@ export abstract class ExtHostDocumentsAndEditorsShape { $acceptDocumentsAndEditorsDelta(delta: IDocumentsAndEditorsDelta): void { throw ni(); } } +export type TreeViewCommandArg = { + treeViewId: string, + treeItemHandle: number +}; -export abstract class ExtHostExplorerViewShape { - $provideRootNode(viewId: string): TPromise { throw ni(); }; - $resolveChildren(viewId: string, node: ITreeNode): TPromise { throw ni(); } - $getInternalCommand(viewId: string, node: ITreeNode): TPromise { throw ni(); } +export abstract class ExtHostTreeViewsShape { + $getElements(treeViewId: string): TPromise { throw ni(); } + $getChildren(treeViewId: string, treeItemHandle: number): TPromise { throw ni(); } + $restore(treeViewId: string, treeItems: TreeItem[]): TPromise { throw ni(); } } export abstract class ExtHostExtensionServiceShape { @@ -503,7 +507,7 @@ export const MainContext = { MainThreadDocuments: createMainId('MainThreadDocuments', MainThreadDocumentsShape), MainThreadEditors: createMainId('MainThreadEditors', MainThreadEditorsShape), MainThreadErrors: createMainId('MainThreadErrors', MainThreadErrorsShape), - MainThreadExplorerViews: createMainId('MainThreadExplorerView', MainThreadExplorerViewShape), + MainThreadTreeViews: createMainId('MainThreadTreeViews', MainThreadTreeViewsShape), MainThreadLanguageFeatures: createMainId('MainThreadLanguageFeatures', MainThreadLanguageFeaturesShape), MainThreadLanguages: createMainId('MainThreadLanguages', MainThreadLanguagesShape), MainThreadMessageService: createMainId('MainThreadMessageService', MainThreadMessageServiceShape), @@ -528,7 +532,7 @@ export const ExtHostContext = { ExtHostDocuments: createExtId('ExtHostDocuments', ExtHostDocumentsShape), ExtHostDocumentSaveParticipant: createExtId('ExtHostDocumentSaveParticipant', ExtHostDocumentSaveParticipantShape), ExtHostEditors: createExtId('ExtHostEditors', ExtHostEditorsShape), - ExtHostExplorerView: createExtId('ExtHostExplorerView', ExtHostExplorerViewShape), + ExtHostTreeViews: createExtId('ExtHostTreeViews', ExtHostTreeViewsShape), ExtHostFileSystemEventService: createExtId('ExtHostFileSystemEventService', ExtHostFileSystemEventServiceShape), ExtHostHeapService: createExtId('ExtHostHeapMonitor', ExtHostHeapServiceShape), ExtHostLanguageFeatures: createExtId('ExtHostLanguageFeatures', ExtHostLanguageFeaturesShape), diff --git a/src/vs/workbench/api/node/extHostExplorerView.ts b/src/vs/workbench/api/node/extHostExplorerView.ts deleted file mode 100644 index cb2bd09645b5f..0000000000000 --- a/src/vs/workbench/api/node/extHostExplorerView.ts +++ /dev/null @@ -1,163 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { localize } from 'vs/nls'; -import { View, TreeDataProvider } from 'vscode'; -import { defaultGenerator } from 'vs/base/common/idGenerator'; -import { TPromise } from 'vs/base/common/winjs.base'; -import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { MainContext, ExtHostExplorerViewShape, MainThreadExplorerViewShape, ITreeNode } from './extHost.protocol'; -import { ExtHostCommands } from 'vs/workbench/api/node/extHostCommands'; -import { asWinJsPromise } from 'vs/base/common/async'; -import * as modes from 'vs/editor/common/modes'; - -class TreeNodeImpl implements ITreeNode { - - readonly id: string; - label: string; - hasChildren: boolean; - clickCommand: string = null; - contextKey: string; - - constructor(readonly providerId: string, node: any, provider: TreeDataProvider) { - this.id = defaultGenerator.nextId(); - this.label = provider.getLabel ? provider.getLabel(node) : node.toString(); - this.hasChildren = provider.getHasChildren ? provider.getHasChildren(node) : true; - this.contextKey = provider.getContextKey ? provider.getContextKey(node) : null; - if (provider.getClickCommand) { - const command = provider.getClickCommand(node); - if (command) { - this.clickCommand = command.command; - } - } - } -} - -export class ExtHostExplorerView extends ExtHostExplorerViewShape { - private _proxy: MainThreadExplorerViewShape; - - private _extNodeProviders: { [providerId: string]: TreeDataProvider }; - private _extViews: Map> = new Map>(); - private _extNodeMaps: { [providerId: string]: { [id: string]: ITreeNode } }; - private _mainNodesMap: Map>; - private _childrenNodesMap: Map>; - - constructor( - threadService: IThreadService, - private commands: ExtHostCommands - ) { - super(); - - this._proxy = threadService.get(MainContext.MainThreadExplorerViews); - - this._extNodeProviders = Object.create(null); - this._extNodeMaps = Object.create(null); - this._mainNodesMap = new Map>(); - this._childrenNodesMap = new Map>(); - - commands.registerArgumentProcessor({ - processArgument: arg => { - if (arg && arg.providerId && arg.id) { - const extNodeMap = this._extNodeMaps[arg.providerId]; - return extNodeMap[arg.id]; - } - return arg; - } - }); - } - - createExplorerView(viewId: string, viewName: string, provider: TreeDataProvider): View { - this._proxy.$registerView(viewId, viewName); - this._extNodeProviders[viewId] = provider; - this._mainNodesMap.set(viewId, new Map()); - this._childrenNodesMap.set(viewId, new Map()); - - const treeView: View = { - refresh: (node: T) => { - const mainThreadNode = this._mainNodesMap.get(viewId).get(node); - this._proxy.$refresh(viewId, mainThreadNode); - }, - dispose: () => { - delete this._extNodeProviders[viewId]; - delete this._extNodeProviders[viewId]; - this._mainNodesMap.delete(viewId); - this._childrenNodesMap.delete(viewId); - this._extViews.delete(viewId); - } - }; - this._extViews.set(viewId, treeView); - return treeView; - } - - $provideRootNode(providerId: string): TPromise { - const provider = this._extNodeProviders[providerId]; - if (!provider) { - const errMessage = localize('treeExplorer.notRegistered', 'No TreeExplorerNodeProvider with id \'{0}\' registered.', providerId); - return TPromise.wrapError(errMessage); - } - - return asWinJsPromise(() => provider.provideRootNode()).then(extRootNode => { - const extNodeMap: { [id: string]: ITreeNode } = Object.create(null); - const internalRootNode = new TreeNodeImpl(providerId, extRootNode, provider); - - extNodeMap[internalRootNode.id] = extRootNode; - this._extNodeMaps[providerId] = extNodeMap; - - this._mainNodesMap.get(providerId).set(extRootNode, internalRootNode); - - return internalRootNode; - }, err => { - const errMessage = localize('treeExplorer.failedToProvideRootNode', 'TreeExplorerNodeProvider \'{0}\' failed to provide root node.', providerId); - return TPromise.wrapError(errMessage); - }); - } - - $resolveChildren(providerId: string, mainThreadNode: ITreeNode): TPromise { - const provider = this._extNodeProviders[providerId]; - if (!provider) { - const errMessage = localize('treeExplorer.notRegistered', 'No TreeExplorerNodeProvider with id \'{0}\' registered.', providerId); - return TPromise.wrapError(errMessage); - } - - const extNodeMap = this._extNodeMaps[providerId]; - const extNode = extNodeMap[mainThreadNode.id]; - - const currentChildren = this._childrenNodesMap.get(providerId).get(extNode); - if (currentChildren) { - for (const child of currentChildren) { - this._mainNodesMap.get(providerId).delete(child); - } - } - - return asWinJsPromise(() => provider.resolveChildren(extNode)).then(children => { - return children.map(extChild => { - const internalChild = new TreeNodeImpl(providerId, extChild, provider); - extNodeMap[internalChild.id] = extChild; - this._mainNodesMap.get(providerId).set(extChild, internalChild); - return internalChild; - }); - }); - } - - // Convert the command on the ExtHost side so we can pass the original externalNode to the registered handler - $getInternalCommand(providerId: string, mainThreadNode: ITreeNode): TPromise { - const commandConverter = this.commands.converter; - - if (mainThreadNode.clickCommand) { - const extNode = this._extNodeMaps[providerId][mainThreadNode.id]; - - const internalCommand = commandConverter.toInternal({ - title: '', - command: mainThreadNode.clickCommand, - arguments: [extNode] - }); - - return TPromise.wrap(internalCommand); - } - - return TPromise.as(null); - } -} \ No newline at end of file diff --git a/src/vs/workbench/api/node/extHostTreeViews.ts b/src/vs/workbench/api/node/extHostTreeViews.ts new file mode 100644 index 0000000000000..bbfde013dddf3 --- /dev/null +++ b/src/vs/workbench/api/node/extHostTreeViews.ts @@ -0,0 +1,210 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { localize } from 'vs/nls'; +import * as vscode from 'vscode'; +import URI from 'vs/base/common/uri'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { Disposable } from 'vs/base/common/lifecycle'; +import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; +import { MainContext, ExtHostTreeViewsShape, MainThreadTreeViewsShape, TreeItem, TreeViewCommandArg } from './extHost.protocol'; +import { TreeItemCollapsibleState } from './extHostTypes'; +import { ExtHostCommands } from 'vs/workbench/api/node/extHostCommands'; +import { asWinJsPromise } from 'vs/base/common/async'; +import * as modes from 'vs/editor/common/modes'; + +type TreeItemHandle = number; + +export class ExtHostTreeViews extends ExtHostTreeViewsShape { + + private treeViews: Map> = new Map>(); + private _proxy: MainThreadTreeViewsShape; + + constructor( + threadService: IThreadService, + private commands: ExtHostCommands + ) { + super(); + this._proxy = threadService.get(MainContext.MainThreadTreeViews); + commands.registerArgumentProcessor({ + processArgument: arg => { + if (arg && arg.treeViewId && arg.treeItemHandle) { + return this.convertArgument(arg); + } + return arg; + } + }); + } + + registerTreeDataProvider(id: string, treeDataProvider: vscode.TreeDataProvider): vscode.Disposable { + const treeView = new ExtHostTreeView(id, treeDataProvider, this._proxy); + this.treeViews.set(id, treeView); + return { + dispose: () => { + this.treeViews.delete(id); + treeView.dispose(); + } + }; + } + + $getElements(treeViewId: string): TPromise { + const treeView = this.treeViews.get(treeViewId); + if (!treeView) { + return TPromise.wrapError(localize('treeView.notRegistered', 'No tree view with id \'{0}\' registered.', treeViewId)); + } + return treeView.getTreeItems(); + } + + $getChildren(treeViewId: string, treeItemHandle?: number): TPromise { + const treeView = this.treeViews.get(treeViewId); + if (!treeView) { + return TPromise.wrapError(localize('treeView.notRegistered', 'No tree view with id \'{0}\' registered.', treeViewId)); + } + return treeView.getChildren(treeItemHandle); + } + + private convertArgument(arg: TreeViewCommandArg): any { + const treeView = this.treeViews.get(arg.treeViewId); + if (!treeView) { + return TPromise.wrapError(localize('treeView.notRegistered', 'No tree view with id \'{0}\' registered.', arg.treeViewId)); + } + return treeView.getExtensionElement(arg.treeItemHandle); + } +} + +class ExtHostTreeView extends Disposable { + + private _itemHandlePool = 0; + + private extElementsMap: Map = new Map(); + private itemHandlesMap: Map = new Map(); + private extChildrenElementsMap: Map = new Map(); + + constructor(private viewId: string, private dataProvider: vscode.TreeDataProvider, private proxy: MainThreadTreeViewsShape) { + super(); + this.proxy.$registerView(viewId); + this._register(dataProvider.onDidChange(element => this._refresh(element))); + } + + getTreeItems(): TPromise { + this.extChildrenElementsMap.clear(); + this.extElementsMap.clear(); + this.itemHandlesMap.clear(); + + return asWinJsPromise(() => this.dataProvider.getChildren()) + .then(elements => this.processAndMapElements(elements)); + } + + getChildren(treeItemHandle: TreeItemHandle): TPromise { + let extElement = this.getExtensionElement(treeItemHandle); + if (extElement) { + this.clearChildren(extElement); + } else { + return TPromise.wrapError(localize('treeItem.notFound', 'No tree item with id \'{0}\' found.', treeItemHandle)); + } + + return asWinJsPromise(() => this.dataProvider.getChildren(extElement)) + .then(childrenElements => this.processAndMapElements(childrenElements)); + } + + getExtensionElement(treeItemHandle: TreeItemHandle): T { + return this.extElementsMap.get(treeItemHandle); + } + + private _refresh(element: T): void { + if (element) { + const itemHandle = this.itemHandlesMap.get(element); + if (itemHandle) { + this.proxy.$refresh(this.viewId, itemHandle); + } + } else { + this.proxy.$refresh(this.viewId); + } + } + + private processAndMapElements(elements: T[]): TPromise { + const treeItemsPromises: TPromise[] = []; + for (const element of elements) { + if (this.extChildrenElementsMap.has(element)) { + return TPromise.wrapError(localize('treeView.duplicateElement', 'Element {0} is already registered', element)); + } + const treeItem = this.massageTreeItem(this.dataProvider.getTreeItem(element)); + this.itemHandlesMap.set(element, treeItem.handle); + this.extElementsMap.set(treeItem.handle, element); + if (treeItem.collapsibleState === TreeItemCollapsibleState.Expanded) { + treeItemsPromises.push(this.getChildren(treeItem.handle).then(children => { + treeItem.children = children; + return treeItem; + })); + } else { + treeItemsPromises.push(TPromise.as(treeItem)); + } + } + return TPromise.join(treeItemsPromises); + } + + private massageTreeItem(extensionTreeItem: vscode.TreeItem): TreeItem { + return { + handle: ++this._itemHandlePool, + label: extensionTreeItem.label, + commandId: extensionTreeItem.command ? extensionTreeItem.command.command : void 0, + contextValue: extensionTreeItem.contextValue, + icon: this.getLightIconPath(extensionTreeItem), + iconDark: this.getDarkIconPath(extensionTreeItem), + collapsibleState: extensionTreeItem.collapsibleState, + }; + } + + private getLightIconPath(extensionTreeItem: vscode.TreeItem) { + if (extensionTreeItem.iconPath) { + if (typeof extensionTreeItem.iconPath === 'string' || extensionTreeItem.iconPath instanceof URI) { + return this.getIconPath(extensionTreeItem.iconPath); + } + return this.getIconPath(extensionTreeItem.iconPath['light']); + } + return void 0; + } + + private getDarkIconPath(extensionTreeItem: vscode.TreeItem) { + if (extensionTreeItem.iconPath && extensionTreeItem.iconPath['dark']) { + return this.getIconPath(extensionTreeItem.iconPath['dark']); + } + return void 0; + } + + private getIconPath(iconPath: string | URI): string { + if (iconPath instanceof URI) { + return iconPath.toString(); + } + return URI.file(iconPath).toString(); + } + + private clearChildren(extElement: T): void { + const children = this.extChildrenElementsMap.get(extElement); + if (children) { + for (const child of children) { + this.clearElement(child); + } + this.extChildrenElementsMap.delete(extElement); + } + } + + private clearElement(extElement: T): void { + this.clearChildren(extElement); + + const treeItemhandle = this.itemHandlesMap.get(extElement); + this.itemHandlesMap.delete(extElement); + if (treeItemhandle) { + this.extElementsMap.delete(treeItemhandle); + } + } + + dispose() { + this.extElementsMap.clear(); + this.itemHandlesMap.clear(); + this.extChildrenElementsMap.clear(); + } +} \ No newline at end of file diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index e52b04efaa450..1c10cc2625192 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1265,3 +1265,8 @@ export enum ProgressLocation { SourceControl = 1, Window = 10, } + +export enum TreeItemCollapsibleState { + Collapsed = 1, + Expanded = 2 +} diff --git a/src/vs/workbench/browser/viewlet.ts b/src/vs/workbench/browser/viewlet.ts index b6b84f4b4c8f2..01ef125d23811 100644 --- a/src/vs/workbench/browser/viewlet.ts +++ b/src/vs/workbench/browser/viewlet.ts @@ -295,6 +295,8 @@ export interface IViewletView extends IView, IThemable { getActions(): IAction[]; getSecondaryActions(): IAction[]; getActionItem(action: IAction): IActionItem; + showHeader(): boolean; + hideHeader(): boolean; shutdown(): void; focusBody(): void; isExpanded(): boolean; @@ -319,20 +321,26 @@ export abstract class AdaptiveCollapsibleViewletView extends FixedCollapsibleVie initialBodySize: number, collapsed: boolean, private viewName: string, - private keybindingService: IKeybindingService, + protected keybindingService: IKeybindingService, protected contextMenuService: IContextMenuService ) { super({ expandedBodySize: initialBodySize, - headerSize: 22, initialState: collapsed ? CollapsibleState.COLLAPSED : CollapsibleState.EXPANDED, - ariaHeaderLabel: viewName + ariaHeaderLabel: viewName, + headerSize: 22, }); this.actionRunner = actionRunner; this.toDispose = []; } + protected changeState(state: CollapsibleState): void { + updateTreeVisibility(this.tree, state === CollapsibleState.EXPANDED); + + super.changeState(state); + } + public create(): TPromise { return TPromise.as(null); } @@ -347,7 +355,7 @@ export abstract class AdaptiveCollapsibleViewletView extends FixedCollapsibleVie getKeyBinding: (action) => this.keybindingService.lookupKeybinding(action.id) }); this.toolBar.actionRunner = this.actionRunner; - this.toolBar.setActions(prepareActions(this.getActions()), prepareActions(this.getSecondaryActions()))(); + this.updateActions(); // Expand on drag over this.dragHandler = new DelayedDragHandler(container, () => { @@ -357,10 +365,8 @@ export abstract class AdaptiveCollapsibleViewletView extends FixedCollapsibleVie }); } - protected changeState(state: CollapsibleState): void { - updateTreeVisibility(this.tree, state === CollapsibleState.EXPANDED); - - super.changeState(state); + protected updateActions(): void { + this.toolBar.setActions(prepareActions(this.getActions()), prepareActions(this.getSecondaryActions()))(); } protected renderViewTree(container: HTMLElement): HTMLElement { @@ -446,7 +452,7 @@ export abstract class CollapsibleViewletView extends CollapsibleView implements headerSize?: number ) { super({ - minimumSize: 2 * 22, + minimumSize: 5 * 22, initialState: collapsed ? CollapsibleState.COLLAPSED : CollapsibleState.EXPANDED, ariaHeaderLabel: viewName, headerSize @@ -476,7 +482,7 @@ export abstract class CollapsibleViewletView extends CollapsibleView implements getKeyBinding: (action) => this.keybindingService.lookupKeybinding(action.id) }); this.toolBar.actionRunner = this.actionRunner; - this.toolBar.setActions(prepareActions(this.getActions()), prepareActions(this.getSecondaryActions()))(); + this.updateActions(); // Expand on drag over this.dragHandler = new DelayedDragHandler(container, () => { @@ -486,6 +492,10 @@ export abstract class CollapsibleViewletView extends CollapsibleView implements }); } + protected updateActions(): void { + this.toolBar.setActions(prepareActions(this.getActions()), prepareActions(this.getSecondaryActions()))(); + } + protected renderViewTree(container: HTMLElement): HTMLElement { return renderViewTree(container); } diff --git a/src/vs/workbench/electron-browser/workbench.main.ts b/src/vs/workbench/electron-browser/workbench.main.ts index 07b48d526c982..ae9d791d648f3 100644 --- a/src/vs/workbench/electron-browser/workbench.main.ts +++ b/src/vs/workbench/electron-browser/workbench.main.ts @@ -18,6 +18,9 @@ import 'vs/editor/browser/editor.all'; // Menus/Actions import 'vs/platform/actions/electron-browser/menusExtensionPoint'; +// Views +import 'vs/workbench/parts/views/browser/viewsExtensionPoint'; + // Workbench import 'vs/workbench/browser/actions/toggleActivityBarVisibility'; import 'vs/workbench/browser/actions/toggleStatusbarVisibility'; @@ -64,8 +67,6 @@ import 'vs/workbench/parts/extensions/electron-browser/extensionsViewlet'; // ca import 'vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution'; -import 'vs/workbench/parts/explorers/browser/explorer.contribution'; - import 'vs/workbench/parts/output/browser/output.contribution'; import 'vs/workbench/parts/output/browser/outputPanel'; // can be packaged separately diff --git a/src/vs/workbench/parts/explorers/browser/explorer.contribution.ts b/src/vs/workbench/parts/explorers/browser/explorer.contribution.ts deleted file mode 100644 index 2c3a9eecbf06e..0000000000000 --- a/src/vs/workbench/parts/explorers/browser/explorer.contribution.ts +++ /dev/null @@ -1,10 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { IExplorerViewsService } from 'vs/workbench/parts/explorers/common/explorer'; -import { ExplorerViewsService } from 'vs/workbench/parts/explorers/browser/explorerView'; -import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; - -registerSingleton(IExplorerViewsService, ExplorerViewsService); \ No newline at end of file diff --git a/src/vs/workbench/parts/explorers/browser/media/Refresh.svg b/src/vs/workbench/parts/explorers/browser/media/Refresh.svg deleted file mode 100644 index e0345748192ee..0000000000000 --- a/src/vs/workbench/parts/explorers/browser/media/Refresh.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/explorers/browser/media/Refresh_inverse.svg b/src/vs/workbench/parts/explorers/browser/media/Refresh_inverse.svg deleted file mode 100644 index d79fdaa4e8e4d..0000000000000 --- a/src/vs/workbench/parts/explorers/browser/media/Refresh_inverse.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.ts b/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.ts deleted file mode 100644 index c55073b102774..0000000000000 --- a/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.ts +++ /dev/null @@ -1,120 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import 'vs/css!./media/treeExplorer.contribution'; - -import { localize } from 'vs/nls'; -import { join } from 'vs/base/common/paths'; -import { createCSSRule } from 'vs/base/browser/dom'; -import { Registry } from 'vs/platform/platform'; -import { ExtensionsRegistry } from 'vs/platform/extensions/common/extensionsRegistry'; -import { IJSONSchema } from 'vs/base/common/jsonSchema'; -import { ITreeExplorerService } from 'vs/workbench/parts/explorers/common/treeExplorerService'; -import { TreeExplorerService } from 'vs/workbench/parts/explorers/browser/treeExplorerService'; -import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import { ViewletRegistry, Extensions as ViewletExtensions, ViewletDescriptor, ToggleViewletAction } from 'vs/workbench/browser/viewlet'; -import { ITreeExplorer } from 'vs/platform/extensionManagement/common/extensionManagement'; -import { toViewletId, toViewletCSSClass, isValidViewletId } from 'vs/workbench/parts/explorers/common/treeExplorer'; -import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; -import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; -import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; -import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; -import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; - -registerSingleton(ITreeExplorerService, TreeExplorerService); - -const viewSchema: IJSONSchema = { - description: localize('vscode.extension.contributes.view', 'Contributes custom view'), - type: 'object', - properties: { - id: { - description: localize('vscode.extension.contributes.view.id', 'Unique id used to identify view created through vscode.workspace.createTreeView'), - type: 'string' - }, - label: { - description: localize('vscode.extension.contributes.view.label', 'Human readable string used to render the view'), - type: 'string' - }, - icon: { - description: localize('vscode.extension.contributes.view.icon', 'Path to the view icon'), - type: 'string' - } - } -}; - -const viewsSchema: IJSONSchema = { - description: localize('vscode.extension.contributes.views', 'Contributes custom views'), - type: 'object', - items: viewSchema -}; - -export class OpenViewletAction extends ToggleViewletAction { - - constructor( - id: string, - label: string, - @IViewletService viewletService: IViewletService, - @IWorkbenchEditorService editorService: IWorkbenchEditorService - ) { - super(id, label, id, viewletService, editorService); - } -} - -export class ExtensionExplorersContribtion implements IWorkbenchContribution { - - constructor() { - this.init(); - } - - public getId(): string { - return 'vs.extension.view'; - } - - private init() { - ExtensionsRegistry.registerExtensionPoint('views', [], viewsSchema).setHandler(extensions => { - for (let extension of extensions) { - for (const { id, label, icon } of extension.value) { - if (!isValidViewletId(id)) { - console.warn(`Tree view extension '${label}' has invalid id and failed to activate.`); - continue; - } - - const viewletId = toViewletId(id); - const viewletCSSClass = toViewletCSSClass(id); - - // Generate CSS to show the icon in the activity bar - if (icon) { - const iconClass = `.monaco-workbench > .activitybar .monaco-action-bar .action-label.${viewletCSSClass}`; - const iconPath = join(extension.description.extensionFolderPath, icon); - - createCSSRule(iconClass, `-webkit-mask: url('${iconPath}') no-repeat 50% 50%`); - } - - // Register action to open the viewlet - const registry = Registry.as(ActionExtensions.WorkbenchActions); - registry.registerWorkbenchAction( - new SyncActionDescriptor(OpenViewletAction, viewletId, localize('showViewlet', "Show {0}", label)), - 'View: Show {0}', - localize('view', "View") - ); - - // Register as viewlet - Registry.as(ViewletExtensions.Viewlets).registerViewlet(new ViewletDescriptor( - 'vs/workbench/parts/explorers/browser/treeExplorerViewlet', - 'TreeExplorerViewlet', - viewletId, - label, - viewletCSSClass, - -1, - extension.description.id - )); - } - } - }); - } -} - -Registry.as(WorkbenchExtensions.Workbench).registerWorkbenchContribution(ExtensionExplorersContribtion); \ No newline at end of file diff --git a/src/vs/workbench/parts/explorers/browser/treeExplorerActions.ts b/src/vs/workbench/parts/explorers/browser/treeExplorerActions.ts deleted file mode 100644 index 04103edf29f32..0000000000000 --- a/src/vs/workbench/parts/explorers/browser/treeExplorerActions.ts +++ /dev/null @@ -1,21 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import * as nls from 'vs/nls'; -import { Action } from 'vs/base/common/actions'; -import { TreeExplorerView } from 'vs/workbench/parts/explorers/browser/views/treeExplorerView'; -import { toViewletActionId } from 'vs/workbench/parts/explorers/common/treeExplorer'; - -export class RefreshViewExplorerAction extends Action { - - constructor(view: TreeExplorerView) { - super(toViewletActionId('refresh'), nls.localize('refresh', "Refresh"), 'extensionViewlet-action toggle', true, () => { - view.updateInput(); - return TPromise.as(null); - }); - } -} diff --git a/src/vs/workbench/parts/explorers/browser/treeExplorerMenus.ts b/src/vs/workbench/parts/explorers/browser/treeExplorerMenus.ts deleted file mode 100644 index 4fa05c578f7c2..0000000000000 --- a/src/vs/workbench/parts/explorers/browser/treeExplorerMenus.ts +++ /dev/null @@ -1,100 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import Event, { Emitter } from 'vs/base/common/event'; -import { IDisposable, dispose, empty as EmptyDisposable, toDisposable } from 'vs/base/common/lifecycle'; -import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; -import { IMenuService, MenuId } from 'vs/platform/actions/common/actions'; -import { IAction } from 'vs/base/common/actions'; -import { fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; -import { ITreeExplorerService } from 'vs/workbench/parts/explorers/common/treeExplorerService'; - - -export class TreeExplorerMenus implements IDisposable { - - private disposables: IDisposable[] = []; - - private activeProviderId: string; - private titleDisposable: IDisposable = EmptyDisposable; - private titleActions: IAction[] = []; - private titleSecondaryActions: IAction[] = []; - - private _onDidChangeTitle = new Emitter(); - get onDidChangeTitle(): Event { return this._onDidChangeTitle.event; } - - constructor( - @IContextKeyService private contextKeyService: IContextKeyService, - @ITreeExplorerService private treeExplorerService: ITreeExplorerService, - @IMenuService private menuService: IMenuService - ) { - this.setActiveProvider(this.treeExplorerService.activeProvider); - this.treeExplorerService.onDidChangeProvider(this.setActiveProvider, this, this.disposables); - } - - private setActiveProvider(activeProvider: string | undefined): void { - if (this.titleDisposable) { - this.titleDisposable.dispose(); - this.titleDisposable = EmptyDisposable; - } - - if (!activeProvider) { - return; - } - - this.activeProviderId = activeProvider; - - const titleMenu = this.menuService.createMenu(MenuId.ViewTitle, this.contextKeyService); - const updateActions = () => { - this.titleActions = []; - this.titleSecondaryActions = []; - fillInActions(titleMenu, null, { primary: this.titleActions, secondary: this.titleSecondaryActions }); - this._onDidChangeTitle.fire(); - }; - - const listener = titleMenu.onDidChange(updateActions); - updateActions(); - - this.titleDisposable = toDisposable(() => { - listener.dispose(); - titleMenu.dispose(); - this.titleActions = []; - this.titleSecondaryActions = []; - }); - } - - getTitleActions(): IAction[] { - return this.titleActions; - } - - getTitleSecondaryActions(): IAction[] { - return this.titleSecondaryActions; - } - - getResourceContextActions(): IAction[] { - return this.getActions(MenuId.ViewResource).secondary; - } - - private getActions(menuId: MenuId): { primary: IAction[]; secondary: IAction[]; } { - if (!this.activeProviderId) { - return { primary: [], secondary: [] }; - } - - const menu = this.menuService.createMenu(menuId, this.contextKeyService); - const primary = []; - const secondary = []; - const result = { primary, secondary }; - fillInActions(menu, { shouldForwardArgs: true }, result, g => g === 'inline'); - - menu.dispose(); - - return result; - } - - dispose(): void { - this.disposables = dispose(this.disposables); - } -} diff --git a/src/vs/workbench/parts/explorers/browser/treeExplorerService.ts b/src/vs/workbench/parts/explorers/browser/treeExplorerService.ts deleted file mode 100644 index 649fa221e2a49..0000000000000 --- a/src/vs/workbench/parts/explorers/browser/treeExplorerService.ts +++ /dev/null @@ -1,85 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import Event, { Emitter } from 'vs/base/common/event'; -import { localize } from 'vs/nls'; -import { TPromise } from 'vs/base/common/winjs.base'; -import { IMessageService, Severity } from 'vs/platform/message/common/message'; -import { InternalTreeNode, InternalTreeNodeProvider } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel'; -import { ITreeExplorerService } from 'vs/workbench/parts/explorers/common/treeExplorerService'; -import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; - -export class TreeExplorerService implements ITreeExplorerService { - public _serviceBrand: any; - - private _activeProvider: string; - private activeProviderContextKey: IContextKey; - - private _onDidChangeProvider = new Emitter(); - get onDidChangeProvider(): Event { return this._onDidChangeProvider.event; } - - private _onTreeExplorerNodeProviderRegistered = new Emitter(); - public get onTreeExplorerNodeProviderRegistered(): Event { return this._onTreeExplorerNodeProviderRegistered.event; }; - - private _treeExplorerNodeProviders: { [providerId: string]: InternalTreeNodeProvider }; - - constructor( - @IContextKeyService private contextKeyService: IContextKeyService, - @IMessageService private messageService: IMessageService - ) { - this._treeExplorerNodeProviders = Object.create(null); - this.activeProviderContextKey = this.contextKeyService.createKey('view', void 0); - } - - get activeProvider(): string { - return this._activeProvider; - } - - set activeProvider(provider: string) { - if (!provider) { - throw new Error('invalid provider'); - } - - this._activeProvider = provider; - this.activeProviderContextKey.set(provider ? provider : void 0); - - this._onDidChangeProvider.fire(provider); - } - - public registerTreeExplorerNodeProvider(providerId: string, provider: InternalTreeNodeProvider): void { - this._treeExplorerNodeProviders[providerId] = provider; - this._onTreeExplorerNodeProviderRegistered.fire(providerId); - } - - public hasProvider(providerId: string): boolean { - return !!this._treeExplorerNodeProviders[providerId]; - } - - public provideRootNode(providerId: string): TPromise { - const provider = this.getProvider(providerId); - return TPromise.wrap(provider.provideRootNode()); - } - - public resolveChildren(providerId: string, node: InternalTreeNode): TPromise { - const provider = this.getProvider(providerId); - return TPromise.wrap(provider.resolveChildren(node)); - } - - public executeCommand(providerId: string, node: InternalTreeNode): TPromise { - const provider = this.getProvider(providerId); - return TPromise.wrap(provider.executeCommand(node)); - } - - public getProvider(providerId: string): InternalTreeNodeProvider { - const provider = this._treeExplorerNodeProviders[providerId]; - - if (!provider) { - this.messageService.show(Severity.Error, localize('treeExplorer.noMatchingProviderId', 'No TreeExplorerNodeProvider with id {providerId} registered.')); - } - - return provider; - } -} diff --git a/src/vs/workbench/parts/explorers/browser/treeExplorerViewlet.ts b/src/vs/workbench/parts/explorers/browser/treeExplorerViewlet.ts deleted file mode 100644 index 51a384bf51c22..0000000000000 --- a/src/vs/workbench/parts/explorers/browser/treeExplorerViewlet.ts +++ /dev/null @@ -1,102 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import { Builder, Dimension } from 'vs/base/browser/builder'; -import { Orientation } from 'vs/base/browser/ui/splitview/splitview'; -import { IAction } from 'vs/base/common/actions'; -import { Viewlet } from 'vs/workbench/browser/viewlet'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { TreeExplorerView } from 'vs/workbench/parts/explorers/browser/views/treeExplorerView'; -import { TreeExplorerViewletState } from 'vs/workbench/parts/explorers/browser/views/treeExplorerViewer'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { attachHeaderViewStyler } from 'vs/platform/theme/common/styler'; - -export class TreeExplorerViewlet extends Viewlet { - - private viewletContainer: Builder; - private view: TreeExplorerView; - - private viewletState: TreeExplorerViewletState; - private viewletId: string; - private treeNodeProviderId: string; - - constructor( - viewletId: string, - @ITelemetryService telemetryService: ITelemetryService, - @IInstantiationService private instantiationService: IInstantiationService, - @IThemeService themeService: IThemeService - ) { - super(viewletId, telemetryService, themeService); - - this.viewletState = new TreeExplorerViewletState(); - this.viewletId = viewletId; - - const tokens = viewletId.split('.'); - this.treeNodeProviderId = tokens[tokens.length - 1]; - } - - public getId(): string { - return this.viewletId; - } - - public create(parent: Builder): TPromise { - super.create(parent); - - this.viewletContainer = parent.div(); - this.addTreeView(); - - return TPromise.as(null); - } - - public layout(dimension: Dimension): void { - this.view.layout(dimension.height, Orientation.VERTICAL); - } - - public setVisible(visible: boolean): TPromise { - return super.setVisible(visible).then(() => { - this.view.setVisible(visible).done(); - }); - } - - public getActions(): IAction[] { - return this.view.getActions(); - } - - private addTreeView(): void { - const headerSize = 0; // Hide header (root node) by default - - this.view = this.instantiationService.createInstance(TreeExplorerView, this.viewletState, this.treeNodeProviderId, this.getActionRunner(), headerSize); - attachHeaderViewStyler(this.view, this.themeService, { noContrastBorder: true }); - this.view.render(this.viewletContainer.getHTMLElement(), Orientation.VERTICAL); - } - - public focus(): void { - super.focus(); - - if (this.view) { - this.view.focusBody(); - } - } - - public shutdown(): void { - if (this.view) { - this.view.shutdown(); - } - - super.shutdown(); - } - - public dispose(): void { - if (this.view) { - this.view = null; - this.view.dispose(); - } - - super.dispose(); - } -} diff --git a/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts b/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts deleted file mode 100644 index 332041abe8473..0000000000000 --- a/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.ts +++ /dev/null @@ -1,139 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import nls = require('vs/nls'); -import { TPromise } from 'vs/base/common/winjs.base'; -import * as DOM from 'vs/base/browser/dom'; -import { Builder, $ } from 'vs/base/browser/builder'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { CollapsibleViewletView } from 'vs/workbench/browser/viewlet'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { IAction, IActionRunner, IActionItem } from 'vs/base/common/actions'; -import { IMessageService } from 'vs/platform/message/common/message'; -import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IListService } from 'vs/platform/list/browser/listService'; -import { ITreeExplorerService } from 'vs/workbench/parts/explorers/common/treeExplorerService'; -import { ITree } from 'vs/base/parts/tree/browser/tree'; -import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; -import { TreeExplorerViewletState, TreeDataSource, TreeRenderer, TreeController } from 'vs/workbench/parts/explorers/browser/views/treeExplorerViewer'; -import { TreeExplorerMenus } from 'vs/workbench/parts/explorers/browser/treeExplorerMenus'; -import { RefreshViewExplorerAction } from 'vs/workbench/parts/explorers/browser/treeExplorerActions'; -import { attachListStyler } from 'vs/platform/theme/common/styler'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { createActionItem } from 'vs/platform/actions/browser/menuItemActionItem'; - -export class TreeExplorerView extends CollapsibleViewletView { - - private providerDisposables: IDisposable[]; - private menus: TreeExplorerMenus; - - constructor( - private viewletState: TreeExplorerViewletState, - private treeNodeProviderId: string, - actionRunner: IActionRunner, - headerSize: number, - @IMessageService messageService: IMessageService, - @IKeybindingService keybindingService: IKeybindingService, - @IContextMenuService contextMenuService: IContextMenuService, - @IWorkspaceContextService contextService: IWorkspaceContextService, - @IInstantiationService private instantiationService: IInstantiationService, - @ITreeExplorerService private treeExplorerService: ITreeExplorerService, - @IListService private listService: IListService, - @IThemeService private themeService: IThemeService - ) { - super(actionRunner, false, nls.localize('treeExplorerViewlet.tree', "Tree Explorer Section"), messageService, keybindingService, contextMenuService, headerSize); - this.treeExplorerService.activeProvider = treeNodeProviderId; - this.menus = this.instantiationService.createInstance(TreeExplorerMenus); - this.create(); - } - - public renderBody(container: HTMLElement): void { - this.treeContainer = super.renderViewTree(container); - DOM.addClass(this.treeContainer, 'tree-explorer-viewlet-tree-view'); - - this.tree = this.createViewer($(this.treeContainer)); - } - - public createViewer(container: Builder): ITree { - const dataSource = this.instantiationService.createInstance(TreeDataSource, this.treeNodeProviderId); - const renderer = this.instantiationService.createInstance(TreeRenderer, this.viewletState, this.actionRunner, container.getHTMLElement()); - const controller = this.instantiationService.createInstance(TreeController, this.treeNodeProviderId, this.menus); - - const tree = new Tree(container.getHTMLElement(), { - dataSource, - renderer, - controller - }, { - keyboardSupport: false - }); - - this.toDispose.push(attachListStyler(tree, this.themeService)); - this.toDispose.push(this.listService.register(tree)); - - return tree; - } - - getActions(): IAction[] { - return [...this.menus.getTitleActions(), new RefreshViewExplorerAction(this)]; - } - - getSecondaryActions(): IAction[] { - return this.menus.getTitleSecondaryActions(); - } - - getActionItem(action: IAction): IActionItem { - return createActionItem(action, this.keybindingService, this.messageService); - } - - public create(): TPromise { - return this.updateInput(); - } - - public setVisible(visible: boolean): TPromise { - return super.setVisible(visible); - } - - public updateInput(): TPromise { - if (this.treeExplorerService.hasProvider(this.treeNodeProviderId)) { - return this.updateProvider(); - } - // Provider registration happens independently of the reading of extension's contribution, - // which constructs the viewlet, so it's possible the viewlet is constructed before a provider - // is registered. - // This renders the viewlet first and wait for a corresponding provider is registered. - else { - this.treeExplorerService.onTreeExplorerNodeProviderRegistered(providerId => { - if (this.treeNodeProviderId === providerId) { - return this.updateProvider(); - } - return undefined; - }); - - return TPromise.as(null); - } - } - - public getOptimalWidth(): number { - const parentNode = this.tree.getHTMLElement(); - const childNodes = [].slice.call(parentNode.querySelectorAll('.outline-item-label > a')); - - return DOM.getLargestChildWidth(parentNode, childNodes); - } - - private updateProvider(): TPromise { - if (this.providerDisposables) { - dispose(this.providerDisposables); - } - - const provider = this.treeExplorerService.getProvider(this.treeNodeProviderId); - provider.onRefresh(node => this.tree.refresh(node)); - return this.treeExplorerService.provideRootNode(this.treeNodeProviderId).then(tree => { - this.tree.setInput(tree); - }); - } -} diff --git a/src/vs/workbench/parts/explorers/browser/views/treeExplorerViewer.ts b/src/vs/workbench/parts/explorers/browser/views/treeExplorerViewer.ts deleted file mode 100644 index a54e64d0c77be..0000000000000 --- a/src/vs/workbench/parts/explorers/browser/views/treeExplorerViewer.ts +++ /dev/null @@ -1,208 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import { $, Builder } from 'vs/base/browser/builder'; -import { ITree, IDataSource, IRenderer, IActionProvider, ContextMenuEvent } from 'vs/base/parts/tree/browser/tree'; -import { InternalTreeNode } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel'; -import { ClickBehavior, DefaultController } from 'vs/base/parts/tree/browser/treeDefaults'; -import { IMouseEvent } from 'vs/base/browser/mouseEvent'; -import { IActionRunner, IAction, ActionRunner } from 'vs/base/common/actions'; -import { ContributableActionProvider } from 'vs/workbench/browser/actionBarRegistry'; -import { ITreeExplorerService } from 'vs/workbench/parts/explorers/common/treeExplorerService'; -import { IProgressService } from 'vs/platform/progress/common/progress'; -import { TreeExplorerMenus } from 'vs/workbench/parts/explorers/browser/treeExplorerMenus'; -import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; -import { ResolvedKeybinding } from 'vs/base/common/keyCodes'; -import { ActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; -import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { MenuItemAction } from 'vs/platform/actions/common/actions'; - -export class TreeDataSource implements IDataSource { - - constructor( - private treeNodeProviderId: string, - @ITreeExplorerService private treeExplorerService: ITreeExplorerService, - @IProgressService private progressService: IProgressService - ) { - - } - - public getId(tree: ITree, node: InternalTreeNode): string { - return node.id.toString(); - } - - public hasChildren(tree: ITree, node: InternalTreeNode): boolean { - return node.hasChildren; - } - - public getChildren(tree: ITree, node: InternalTreeNode): TPromise { - const promise = this.treeExplorerService.resolveChildren(this.treeNodeProviderId, node); - - this.progressService.showWhile(promise, 800); - - return promise; - } - - public getParent(tree: ITree, node: InternalTreeNode): TPromise { - return TPromise.as(null); - } -} - -export interface ITreeExplorerTemplateData { - label: Builder; -} - -export class TreeRenderer implements IRenderer { - - private static ITEM_HEIGHT = 22; - private static TREE_TEMPLATE_ID = 'treeExplorer'; - - constructor( - state: TreeExplorerViewletState, - actionRunner: IActionRunner - ) { - } - - public getHeight(tree: ITree, element: any): number { - return TreeRenderer.ITEM_HEIGHT; - } - - public getTemplateId(tree: ITree, element: any): string { - return TreeRenderer.TREE_TEMPLATE_ID; - } - - public renderTemplate(tree: ITree, templateId: string, container: HTMLElement): ITreeExplorerTemplateData { - const el = $(container); - const item = $('.custom-viewlet-tree-node-item'); - item.appendTo(el); - - const label = $('.custom-viewlet-tree-node-item-label').appendTo(item); - const link = $('a.plain').appendTo(label); - - return { label: link }; - } - - public renderElement(tree: ITree, node: InternalTreeNode, templateId: string, templateData: ITreeExplorerTemplateData): void { - templateData.label.text(node.label).title(node.label); - } - - public disposeTemplate(tree: ITree, templateId: string, templateData: ITreeExplorerTemplateData): void { - } -} - -export class TreeController extends DefaultController { - - constructor( - private treeNodeProviderId: string, - private menus: TreeExplorerMenus, - @IContextMenuService private contextMenuService: IContextMenuService, - @ITreeExplorerService private treeExplorerService: ITreeExplorerService, - @IKeybindingService private _keybindingService: IKeybindingService - ) { - super({ clickBehavior: ClickBehavior.ON_MOUSE_UP /* do not change to not break DND */, keyboardSupport: false }); - } - - public onLeftClick(tree: ITree, node: InternalTreeNode, event: IMouseEvent, origin: string = 'mouse'): boolean { - super.onLeftClick(tree, node, event, origin); - - if (node.clickCommand) { - this.treeExplorerService.executeCommand(this.treeNodeProviderId, node); - } - - return true; - } - - public onContextMenu(tree: ITree, node: InternalTreeNode, event: ContextMenuEvent): boolean { - tree.setFocus(node); - const actions = this.menus.getResourceContextActions(); - if (!actions.length) { - return true; - } - const anchor = { x: event.posx + 1, y: event.posy }; - this.contextMenuService.showContextMenu({ - getAnchor: () => anchor, - - getActions: () => { - return TPromise.as(actions); - }, - - getActionItem: (action) => { - const keybinding = this._keybindingFor(action); - if (keybinding) { - return new ActionItem(action, action, { label: true, keybinding: keybinding.getLabel() }); - } - return null; - }, - - getKeyBinding: (action): ResolvedKeybinding => { - return this._keybindingFor(action); - }, - - onHide: (wasCancelled?: boolean) => { - if (wasCancelled) { - tree.DOMFocus(); - } - }, - - getActionsContext: () => node, - - actionRunner: new MultipleSelectionActionRunner(() => tree.getSelection()) - }); - - return true; - } - - private _keybindingFor(action: IAction): ResolvedKeybinding { - return this._keybindingService.lookupKeybinding(action.id); - } -} - -export interface ITreeExplorerViewletState { - actionProvider: IActionProvider; -} - -export class TreeExplorerActionProvider extends ContributableActionProvider { - private state: TreeExplorerViewletState; - - constructor(state: TreeExplorerViewletState) { - super(); - - this.state = state; - } -} - -export class TreeExplorerViewletState implements ITreeExplorerViewletState { - private _actionProvider: TreeExplorerActionProvider; - - constructor() { - this._actionProvider = new TreeExplorerActionProvider(this); - } - - public get actionProvider() { return this._actionProvider; } -} - -class MultipleSelectionActionRunner extends ActionRunner { - - constructor(private getSelectedResources: () => InternalTreeNode[]) { - super(); - } - - runAction(action: IAction, context: InternalTreeNode): TPromise { - if (action instanceof MenuItemAction) { - const selection = this.getSelectedResources(); - const filteredSelection = selection.filter(s => s !== context); - - if (selection.length === filteredSelection.length || selection.length === 1) { - return action.run(context); - } - - return action.run(context, ...filteredSelection); - } - - return super.runAction(action, context); - } -} diff --git a/src/vs/workbench/parts/explorers/common/explorer.ts b/src/vs/workbench/parts/explorers/common/explorer.ts deleted file mode 100644 index 338b63463de5a..0000000000000 --- a/src/vs/workbench/parts/explorers/common/explorer.ts +++ /dev/null @@ -1,37 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import Event from 'vs/base/common/event'; -import { IDisposable } from 'vs/base/common/lifecycle'; -import { TPromise } from 'vs/base/common/winjs.base'; -import { IActionRunner } from 'vs/base/common/actions'; -import { createDecorator, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; - -export const IExplorerViewsService = createDecorator('explorerViewsService'); - -export interface IExplorerViewsService { - _serviceBrand: any; - - readonly onViewCreated: Event>; - - createView(id: string, name: string, dataProvider: IExplorerViewDataProvider): IExplorerView; - getViews(): IExplorerView[]; -} - -export interface IExplorerView extends IDisposable { - refresh(element: T): void; - instantiate(actionRunner: IActionRunner, viewletSetings: any, instantiationService: IInstantiationService): any; -} - -export interface IExplorerViewDataProvider { - provideRoot(): TPromise; - resolveChildren(element: T): TPromise; - getId(element: T): string; - getLabel(element: T): string; - getContextKey(element: T): string; - hasChildren(element: T): boolean; - select(element: T): void; -} diff --git a/src/vs/workbench/parts/explorers/common/treeExplorer.ts b/src/vs/workbench/parts/explorers/common/treeExplorer.ts deleted file mode 100644 index fad6a30fd8506..0000000000000 --- a/src/vs/workbench/parts/explorers/common/treeExplorer.ts +++ /dev/null @@ -1,21 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -export function toViewletId(viewletId: string): string { - return `workbench.view.extension.${viewletId}`; -} - -export function toViewletActionId(viewletId: string): string { - return `workbench.action.extension.${viewletId}`; -} - -export function toViewletCSSClass(viewletId: string): string { - return `extensionViewlet-${viewletId}`; -} - -export function isValidViewletId(viewletId: string): boolean { - return /^[a-z0-9_-]+$/i.test(viewletId); // Only allow alphanumeric letters, `_` and `-`. -} diff --git a/src/vs/workbench/parts/explorers/common/treeExplorerService.ts b/src/vs/workbench/parts/explorers/common/treeExplorerService.ts deleted file mode 100644 index 6e388e29b822d..0000000000000 --- a/src/vs/workbench/parts/explorers/common/treeExplorerService.ts +++ /dev/null @@ -1,28 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import Event from 'vs/base/common/event'; -import { TPromise } from 'vs/base/common/winjs.base'; -import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; -import { InternalTreeNode, InternalTreeNodeProvider } from 'vs/workbench/parts/explorers/common/treeExplorerViewModel'; - -export const ITreeExplorerService = createDecorator('treeExplorerService'); - -export interface ITreeExplorerService { - _serviceBrand: any; - - onDidChangeProvider: Event; - activeProvider: string; - - onTreeExplorerNodeProviderRegistered: Event; - registerTreeExplorerNodeProvider(providerId: string, provider: InternalTreeNodeProvider): void; - hasProvider(providerId: string): boolean; - getProvider(providerId: string): InternalTreeNodeProvider; - - provideRootNode(providerId: string): TPromise; - resolveChildren(providerId: string, node: InternalTreeNode): TPromise; - executeCommand(providerId: string, node: InternalTreeNode): TPromise; -} diff --git a/src/vs/workbench/parts/explorers/common/treeExplorerViewModel.ts b/src/vs/workbench/parts/explorers/common/treeExplorerViewModel.ts deleted file mode 100644 index a2b197164715f..0000000000000 --- a/src/vs/workbench/parts/explorers/common/treeExplorerViewModel.ts +++ /dev/null @@ -1,27 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import Event from 'vs/base/common/event'; - -export interface InternalTreeNodeContent { - label: string; - hasChildren: boolean; - clickCommand: string; -} - -export interface InternalTreeNode extends InternalTreeNodeContent { - readonly id: string; - readonly providerId: string; -} - -export interface InternalTreeNodeProvider { - id: string; - provideRootNode(): Thenable; - resolveChildren(node: InternalTreeNodeContent): Thenable; - executeCommand(node: InternalTreeNodeContent): TPromise; - onRefresh?: Event; -} diff --git a/src/vs/workbench/parts/files/browser/explorerViewlet.ts b/src/vs/workbench/parts/files/browser/explorerViewlet.ts index 80e70692d7899..f4f1460ac74e0 100644 --- a/src/vs/workbench/parts/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/browser/explorerViewlet.ts @@ -32,7 +32,7 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { attachHeaderViewStyler } from 'vs/platform/theme/common/styler'; -import { IExplorerViewsService } from 'vs/workbench/parts/explorers/common/explorer'; +import { ViewsRegistry, ViewLocation, IViewDescriptor } from 'vs/workbench/parts/views/browser/views'; export class ExplorerViewlet extends Viewlet { private viewletContainer: Builder; @@ -57,14 +57,13 @@ export class ExplorerViewlet extends Viewlet { constructor( @ITelemetryService telemetryService: ITelemetryService, @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IStorageService storageService: IStorageService, + @IStorageService private storageService: IStorageService, @IEditorGroupService private editorGroupService: IEditorGroupService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IConfigurationService private configurationService: IConfigurationService, @IInstantiationService private instantiationService: IInstantiationService, @IContextKeyService contextKeyService: IContextKeyService, @IThemeService themeService: IThemeService, - @IExplorerViewsService private explorerViewsService: IExplorerViewsService ) { super(VIEWLET_ID, telemetryService, themeService); @@ -75,7 +74,7 @@ export class ExplorerViewlet extends Viewlet { this.viewletSettings = this.getMemento(storageService, Scope.WORKSPACE); this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(e.config)); - this.explorerViewsService.onViewCreated(view => this.render()); + ViewsRegistry.onViewsRegistered(viewDescriptors => this.addViews(viewDescriptors.filter(viewDescriptor => ViewLocation.Explorer === viewDescriptor.location))); } public create(parent: Builder): TPromise { @@ -102,7 +101,6 @@ export class ExplorerViewlet extends Viewlet { // Open editors view should always be visible in no folder workspace. this.openEditorsVisible = !this.contextService.hasWorkspace() || config.explorer.openEditors.visible !== 0; - this.dispose(); this.views = []; this.viewletContainer.clearChildren(); @@ -113,7 +111,7 @@ export class ExplorerViewlet extends Viewlet { this.lastFocusedView = view; }); - const customViews = this.explorerViewsService.getViews(); + const customViews = ViewsRegistry.getViews(ViewLocation.Explorer); if (this.openEditorsVisible) { // Open editors view @@ -122,12 +120,14 @@ export class ExplorerViewlet extends Viewlet { } // Explorer view - const view = this.createExplorerOrEmptyView(this.views.length || customViews.length ? undefined : 0); - this.views.push(view); + this.views.push(this.createExplorerOrEmptyView()); // custom views for (const view of customViews) { - this.views.push(view.instantiate(this.getActionRunner(), this.viewletSettings, this.instantiationService)); + this.views.push(this.instantiationService.createInstance(view.ctor, view.id, { + name: view.name, + actionRunner: this.getActionRunner(), + })); } for (let i = 0; i < this.views.length; i++) { @@ -139,6 +139,10 @@ export class ExplorerViewlet extends Viewlet { this.lastFocusedView = this.explorerView; return TPromise.join(this.views.map(view => view.create())).then(() => void 0).then(() => { + if (this.views.length === 1) { + this.views[0].hideHeader(); + + } if (this.dimension) { this.layout(this.dimension); } @@ -149,15 +153,81 @@ export class ExplorerViewlet extends Viewlet { }); } + private updateOpenEditorsView(): void { + if (!this.splitView) { + return; + } + + if (this.openEditorsVisible) { + this.openEditorsView = this.instantiationService.createInstance(OpenEditorsView, this.getActionRunner(), this.viewletSettings); + this.views.unshift(this.openEditorsView); + this.splitView.addView(this.openEditorsView, undefined, 0); + this.openEditorsView.create().then(() => { + if (this.views.length === 2) { + this.views[1].showHeader(); + } + if (this.dimension) { + this.layout(this.dimension); + } + // Update title area since the title actions have changed. + this.updateTitleArea(); + }); + } else { + this.views.shift(); + this.splitView.removeView(this.openEditorsView); + this.openEditorsView.dispose(); + this.openEditorsView = null; + + if (this.views.length === 1) { + this.views[0].hideHeader(); + } + if (this.dimension) { + this.layout(this.dimension); + } + // Update title area since the title actions have changed. + this.updateTitleArea(); + } + } + + private addViews(viewDescriptors: IViewDescriptor[]): void { + if (!this.splitView || !viewDescriptors.length) { + return; + } + const views = []; + + for (const viewDescrirptor of viewDescriptors) { + const view = this.instantiationService.createInstance(viewDescrirptor.ctor, viewDescrirptor.id, { + name: viewDescrirptor.name, + actionRunner: this.getActionRunner(), + }); + views.push(view); + this.views.push(view); + attachHeaderViewStyler(view, this.themeService); + this.splitView.addView(view); + } + + TPromise.join(views.map(view => view.create())).then(() => void 0).then(() => { + this.views[0].showHeader(); + + if (this.dimension) { + this.layout(this.dimension); + } + + // Update title area since the title actions have changed. + this.updateTitleArea(); + }); + } + private onConfigurationUpdated(config: IFilesConfiguration): void { // Open editors view should always be visible in no folder workspace. const openEditorsVisible = !this.contextService.hasWorkspace() || config.explorer.openEditors.visible !== 0; if (this.openEditorsVisible !== openEditorsVisible) { - this.render(); + this.openEditorsVisible = openEditorsVisible; + this.updateOpenEditorsView(); } } - private createExplorerOrEmptyView(headerSize: number): IViewletView { + private createExplorerOrEmptyView(): IViewletView { let explorerOrEmptyView: ExplorerView | EmptyView; // With a Workspace @@ -194,7 +264,7 @@ export class ExplorerViewlet extends Viewlet { }); const explorerInstantiator = this.instantiationService.createChild(new ServiceCollection([IWorkbenchEditorService, delegatingEditorService])); - this.explorerView = explorerOrEmptyView = explorerInstantiator.createInstance(ExplorerView, this.viewletState, this.getActionRunner(), this.viewletSettings, headerSize); + this.explorerView = explorerOrEmptyView = explorerInstantiator.createInstance(ExplorerView, this.viewletState, this.getActionRunner(), this.viewletSettings, void 0); } // No workspace @@ -312,23 +382,24 @@ export class ExplorerViewlet extends Viewlet { } public dispose(): void { + + for (const view of this.views) { + view.dispose(); + } + if (this.splitView) { - this.splitView.dispose(); this.splitView = null; } if (this.explorerView) { - this.explorerView.dispose(); this.explorerView = null; } if (this.openEditorsView) { - this.openEditorsView.dispose(); this.openEditorsView = null; } if (this.emptyView) { - this.emptyView.dispose(); this.emptyView = null; } diff --git a/src/vs/workbench/parts/explorers/browser/media/treeExplorer.contribution.css b/src/vs/workbench/parts/views/browser/media/views.css similarity index 50% rename from src/vs/workbench/parts/explorers/browser/media/treeExplorer.contribution.css rename to src/vs/workbench/parts/views/browser/media/views.css index 35425359a0782..30eede64993ce 100644 --- a/src/vs/workbench/parts/explorers/browser/media/treeExplorer.contribution.css +++ b/src/vs/workbench/parts/views/browser/media/views.css @@ -3,16 +3,22 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -.monaco-workbench .extensionViewlet-action.toggle { - background: url('Refresh.svg') center center no-repeat; -} - -.vs-dark .monaco-workbench .extensionViewlet-action.toggle, -.hc-black .monaco-workbench .extensionViewlet-action.toggle { - background: url('Refresh_inverse.svg') center center no-repeat; +.custom-view-tree-node-item { + display: flex; + height: 22px; + line-height: 22px; } -.custom-viewlet-tree-node-item { +.custom-view-tree-node-item > .custom-view-tree-node-item-icon { + background-size: 16px; + background-position: left center; + background-repeat: no-repeat; + padding-right: 6px; + width: 16px; height: 22px; - line-height: 22px; + -webkit-font-smoothing: antialiased; } + +.custom-view-tree-node-item > .custom-view-tree-node-item-label .label { + vertical-align: middle; +} \ No newline at end of file diff --git a/src/vs/workbench/parts/explorers/browser/explorerView.ts b/src/vs/workbench/parts/views/browser/treeView.ts similarity index 59% rename from src/vs/workbench/parts/explorers/browser/explorerView.ts rename to src/vs/workbench/parts/views/browser/treeView.ts index 7b7d6f375d2d3..fc0e34b8a6239 100644 --- a/src/vs/workbench/parts/explorers/browser/explorerView.ts +++ b/src/vs/workbench/parts/views/browser/treeView.ts @@ -3,16 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import 'vs/css!./media/views'; import Event, { Emitter } from 'vs/base/common/event'; -import { IDisposable, Disposable, dispose, empty as EmptyDisposable, toDisposable } from 'vs/base/common/lifecycle'; -import { IViewletView, CollapsibleViewletView } from 'vs/workbench/browser/viewlet'; -import { IExplorerViewsService, IExplorerViewDataProvider, IExplorerView } from 'vs/workbench/parts/explorers/common/explorer'; +import { IDisposable, dispose, empty as EmptyDisposable, toDisposable } from 'vs/base/common/lifecycle'; +import { CollapsibleViewletView } from 'vs/workbench/browser/viewlet'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { TPromise } from 'vs/base/common/winjs.base'; import * as DOM from 'vs/base/browser/dom'; import { Builder, $ } from 'vs/base/browser/builder'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { IAction, IActionRunner, IActionItem, ActionRunner } from 'vs/base/common/actions'; +import { IAction, IActionItem, ActionRunner } from 'vs/base/common/actions'; import { IMessageService } from 'vs/platform/message/common/message'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; @@ -21,96 +20,51 @@ import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { ClickBehavior, DefaultController } from 'vs/base/parts/tree/browser/treeDefaults'; import { IMenuService, MenuId, MenuItemAction } from 'vs/platform/actions/common/actions'; import { attachListStyler } from 'vs/platform/theme/common/styler'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { IThemeService, LIGHT } from 'vs/platform/theme/common/themeService'; import { createActionItem, fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; import { IProgressService } from 'vs/platform/progress/common/progress'; import { ITree, IDataSource, IRenderer, ContextMenuEvent } from 'vs/base/parts/tree/browser/tree'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { ResolvedKeybinding } from 'vs/base/common/keyCodes'; import { ActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; +import { ViewsRegistry, ITreeViewDataProvider, IViewOptions, ITreeItem, TreeItemCollapsibleState } from 'vs/workbench/parts/views/browser/views'; +import { IExtensionService } from 'vs/platform/extensions/common/extensions'; +import { CollapsibleState } from 'vs/base/browser/ui/splitview/splitview'; +import { ICommandService } from 'vs/platform/commands/common/commands'; -export interface IViewInstantiator { - instantiate(actionRunner: IActionRunner, viewletSetings: any, instantiationService: IInstantiationService): IViewletView; -} - -export class ExplorerViewsService implements IExplorerViewsService { - - public _serviceBrand: any; - - private explorerViews: Map> = new Map>(); - - private _onViewCreated: Emitter> = new Emitter>(); - public readonly onViewCreated: Event> = this._onViewCreated.event; - - private _onDataProviderRegistered: Emitter> = new Emitter>(); - public readonly onDataProviderRegistered: Event> = this._onDataProviderRegistered.event; - - createView(id: string, name: string, dataProvider: IExplorerViewDataProvider): IExplorerView { - const view = new ExplorerView(id, name, dataProvider); - this.explorerViews.set(id, view); - this._onViewCreated.fire(view); - return view; - } - - public getViews(): IExplorerView[] { - const views = []; - this.explorerViews.forEach(view => { - views.push(view); - }); - return views; - } -} - -class ExplorerView extends Disposable implements IExplorerView, IViewInstantiator { - - private view: TreeExplorerView; - - constructor(private id: string, private name: string, private dataProvider: IExplorerViewDataProvider) { - super(); - } - - refresh(element: T): void { - if (this.view) { - this.view.refresh(element); - } - } - - instantiate(actionRunner: IActionRunner, viewletSettings: any, instantiationService: IInstantiationService): IViewletView { - if (!this.view) { - this.view = instantiationService.createInstance(TreeExplorerView, this.id, this.name, this.dataProvider, actionRunner); - } - return this.view; - } -} - -class TreeExplorerView extends CollapsibleViewletView { +export class TreeView extends CollapsibleViewletView { private menus: Menus; private viewFocusContext: IContextKey; + private activated: boolean = false; + private treeInputPromise: TPromise; + + private dataProviderElementChangeListener: IDisposable; + private disposables: IDisposable[] = []; constructor( - private id: string, - private name: string, - private dataProvider: IExplorerViewDataProvider, - actionRunner: IActionRunner, + readonly id: string, + private options: IViewOptions, @IMessageService messageService: IMessageService, @IKeybindingService keybindingService: IKeybindingService, @IContextMenuService contextMenuService: IContextMenuService, - @IWorkspaceContextService contextService: IWorkspaceContextService, @IInstantiationService private instantiationService: IInstantiationService, @IListService private listService: IListService, @IThemeService private themeService: IThemeService, @IContextKeyService private contextKeyService: IContextKeyService, - @IExplorerViewsService private explorerViewsService: IExplorerViewsService + @IExtensionService private extensionService: IExtensionService, + @ICommandService private commandService: ICommandService ) { - super(actionRunner, false, name, messageService, keybindingService, contextMenuService); - this.menus = this.instantiationService.createInstance(Menus, this.id, this.dataProvider); + super(options.actionRunner, true, options.name, messageService, keybindingService, contextMenuService); + this.menus = this.instantiationService.createInstance(Menus, this.id); this.viewFocusContext = this.contextKeyService.createKey(this.id, void 0); + this.menus.onDidChangeTitle(() => this.updateActions(), this, this.disposables); + this.themeService.onThemeChange(() => this.tree.refresh() /* soft refresh */, this, this.disposables); } public renderHeader(container: HTMLElement): void { const titleDiv = $('div.title').appendTo(container); - $('span').text(this.name).appendTo(titleDiv); + $('span').text(this.options.name).appendTo(titleDiv); super.renderHeader(container); } @@ -121,10 +75,24 @@ class TreeExplorerView extends CollapsibleViewletView { this.tree = this.createViewer($(this.treeContainer)); } + protected changeState(state: CollapsibleState): void { + super.changeState(state); + if (state === CollapsibleState.EXPANDED) { + this.triggerActivation(); + } + } + + private triggerActivation() { + if (!this.activated && this.extensionService) { + this.extensionService.activateByEvent(`onView:${this.id}`); + this.activated = true; + } + } + public createViewer(container: Builder): ITree { - const dataSource = this.instantiationService.createInstance(TreeDataSource, this.dataProvider); - const renderer = this.instantiationService.createInstance(TreeRenderer, this.dataProvider); - const controller = this.instantiationService.createInstance(TreeController, this.menus); + const dataSource = this.instantiationService.createInstance(TreeDataSource, this.id); + const renderer = this.instantiationService.createInstance(TreeRenderer); + const controller = this.instantiationService.createInstance(TreeController, this.id, this.menus); const tree = new Tree(container.getHTMLElement(), { dataSource, renderer, @@ -135,12 +103,7 @@ class TreeExplorerView extends CollapsibleViewletView { this.toDispose.push(attachListStyler(tree, this.themeService)); this.toDispose.push(this.listService.register(tree, [this.viewFocusContext])); - tree.addListener('selection', (event: any) => { - const selection = tree.getSelection()[0]; - if (selection) { - this.dataProvider.select(selection); - } - }); + tree.addListener('selection', (event: any) => this.onSelection()); return tree; } @@ -157,16 +120,41 @@ class TreeExplorerView extends CollapsibleViewletView { } public create(): TPromise { - return this.updateInput(); + return this.setInput(); } public setVisible(visible: boolean): TPromise { return super.setVisible(visible); } - public updateInput(): TPromise { - return this.dataProvider.provideRoot() - .then(root => this.tree.setInput(root)); + public setInput(): TPromise { + if (this.listenToDataProvider()) { + this.treeInputPromise = this.tree.setInput(new Root()); + return this.treeInputPromise; + } + this.treeInputPromise = new TPromise((c, e) => { + const disposable = ViewsRegistry.onTreeViewDataProviderRegistered(id => { + if (this.id === id) { + if (this.listenToDataProvider()) { + this.tree.setInput(new Root()).then(() => c(null)); + disposable.dispose(); + } + } + }); + }); + return TPromise.as(null); + } + + private listenToDataProvider(): boolean { + let dataProvider = ViewsRegistry.getTreeViewDataProvider(this.id); + if (dataProvider) { + if (this.dataProviderElementChangeListener) { + this.dataProviderElementChangeListener.dispose(); + } + this.dataProviderElementChangeListener = dataProvider.onDidChange(element => this.refresh(element)); + return true; + } + return false; } public getOptimalWidth(): number { @@ -176,42 +164,81 @@ class TreeExplorerView extends CollapsibleViewletView { return DOM.getLargestChildWidth(parentNode, childNodes); } - refresh(element: any) { + private onSelection(): void { + const selection: ITreeItem = this.tree.getSelection()[0]; + if (selection) { + if (selection.commandId) { + this.commandService.executeCommand(selection.commandId, { treeViewId: this.id, treeItemHandle: selection.handle }); + } + } + } + + private refresh(element?: ITreeItem): void { + element = element ? element : this.tree.getInput(); + element.children = null; this.tree.refresh(element); } + + dispose(): void { + dispose(this.disposables); + super.dispose(); + } +} + +class Root implements ITreeItem { + label = 'root'; + handle = -1; + collapsibleState = TreeItemCollapsibleState.Expanded; } class TreeDataSource implements IDataSource { constructor( - private dataProvider: IExplorerViewDataProvider, - @IProgressService private progressService: IProgressService, - @IExplorerViewsService private explorerViewsService: IExplorerViewsService + private id: string, + @IProgressService private progressService: IProgressService ) { } - public getId(tree: ITree, node: any): string { - return this.dataProvider.getId(node); + public getId(tree: ITree, node: ITreeItem): string { + return '' + node.handle; } - public hasChildren(tree: ITree, node: any): boolean { - return this.dataProvider.hasChildren(node); + public hasChildren(tree: ITree, node: ITreeItem): boolean { + return node.collapsibleState === TreeItemCollapsibleState.Collapsed || node.collapsibleState === TreeItemCollapsibleState.Expanded; } - public getChildren(tree: ITree, node: any): TPromise { - const promise = this.dataProvider.resolveChildren(node); + public getChildren(tree: ITree, node: ITreeItem): TPromise { + if (node.children) { + return TPromise.as(node.children); + } - this.progressService.showWhile(promise, 800); + const dataProvider = this.getDataProvider(); + if (dataProvider) { + const promise = node instanceof Root ? dataProvider.getElements() : dataProvider.getChildren(node); + this.progressService.showWhile(promise, 100); + return promise.then(children => { + node.children = children; + return children; + }); + } + return TPromise.as(null); + } - return promise; + public shouldAutoexpand(tree: ITree, node: ITreeItem): boolean { + return node.collapsibleState === TreeItemCollapsibleState.Expanded; } public getParent(tree: ITree, node: any): TPromise { return TPromise.as(null); } + + private getDataProvider(): ITreeViewDataProvider { + return ViewsRegistry.getTreeViewDataProvider(this.id); + } } interface ITreeExplorerTemplateData { + icon: Builder; label: Builder; } @@ -220,10 +247,7 @@ class TreeRenderer implements IRenderer { private static ITEM_HEIGHT = 22; private static TREE_TEMPLATE_ID = 'treeExplorer'; - constructor( - private dataProvider: IExplorerViewDataProvider, - @IExplorerViewsService private explorerViewsService: IExplorerViewsService - ) { + constructor( @IThemeService private themeService: IThemeService) { } public getHeight(tree: ITree, element: any): number { @@ -236,18 +260,29 @@ class TreeRenderer implements IRenderer { public renderTemplate(tree: ITree, templateId: string, container: HTMLElement): ITreeExplorerTemplateData { const el = $(container); - const item = $('.custom-viewlet-tree-node-item'); + const item = $('.custom-view-tree-node-item'); item.appendTo(el); - const label = $('.custom-viewlet-tree-node-item-label').appendTo(item); - const link = $('a.plain').appendTo(label); + const icon = $('.custom-view-tree-node-item-icon').appendTo(item); + const label = $('.custom-view-tree-node-item-label').appendTo(item); + const link = $('a.label').appendTo(label); - return { label: link }; + return { label: link, icon }; } - public renderElement(tree: ITree, node: any, templateId: string, templateData: ITreeExplorerTemplateData): void { - const label = this.dataProvider.getLabel(node); - templateData.label.text(label).title(label); + public renderElement(tree: ITree, node: ITreeItem, templateId: string, templateData: ITreeExplorerTemplateData): void { + templateData.label.text(node.label).title(node.label); + + const theme = this.themeService.getTheme(); + const icon = theme.type === LIGHT ? node.icon : node.iconDark; + + if (icon) { + templateData.icon.getHTMLElement().style.backgroundImage = `url('${icon}')`; + DOM.addClass(templateData.icon.getHTMLElement(), 'custom-view-tree-node-item-icon'); + } else { + templateData.icon.getHTMLElement().style.backgroundImage = ''; + DOM.removeClass(templateData.icon.getHTMLElement(), 'custom-view-tree-node-item-icon'); + } } public disposeTemplate(tree: ITree, templateId: string, templateData: ITreeExplorerTemplateData): void { @@ -257,6 +292,7 @@ class TreeRenderer implements IRenderer { class TreeController extends DefaultController { constructor( + private treeViewId: string, private menus: Menus, @IContextMenuService private contextMenuService: IContextMenuService, @IKeybindingService private _keybindingService: IKeybindingService @@ -264,7 +300,7 @@ class TreeController extends DefaultController { super({ clickBehavior: ClickBehavior.ON_MOUSE_UP /* do not change to not break DND */, keyboardSupport: false }); } - public onContextMenu(tree: ITree, node: any, event: ContextMenuEvent): boolean { + public onContextMenu(tree: ITree, node: ITreeItem, event: ContextMenuEvent): boolean { tree.setFocus(node); const actions = this.menus.getResourceContextActions(node); if (!actions.length) { @@ -296,7 +332,7 @@ class TreeController extends DefaultController { } }, - getActionsContext: () => node, + getActionsContext: () => ({ treeViewId: this.treeViewId, treeItemHandle: node.handle }), actionRunner: new MultipleSelectionActionRunner(() => tree.getSelection()) }); @@ -342,11 +378,9 @@ class Menus implements IDisposable { get onDidChangeTitle(): Event { return this._onDidChangeTitle.event; } constructor( - private viewId: string, - private dataProvider: IExplorerViewDataProvider, + private id: string, @IContextKeyService private contextKeyService: IContextKeyService, - @IMenuService private menuService: IMenuService, - @IExplorerViewsService private explorerViewsService: IExplorerViewsService + @IMenuService private menuService: IMenuService ) { if (this.titleDisposable) { this.titleDisposable.dispose(); @@ -354,7 +388,7 @@ class Menus implements IDisposable { } const _contextKeyService = this.contextKeyService.createScoped(); - contextKeyService.createKey('view', viewId); + contextKeyService.createKey('view', id); const titleMenu = this.menuService.createMenu(MenuId.ViewTitle, _contextKeyService); const updateActions = () => { @@ -367,7 +401,6 @@ class Menus implements IDisposable { const listener = titleMenu.onDidChange(updateActions); updateActions(); - this.titleDisposable = toDisposable(() => { listener.dispose(); titleMenu.dispose(); @@ -385,13 +418,13 @@ class Menus implements IDisposable { return this.titleSecondaryActions; } - getResourceContextActions(element: any): IAction[] { - return this.getActions(MenuId.ViewResource, { key: 'resource', value: this.dataProvider.getContextKey(element) }).secondary; + getResourceContextActions(element: ITreeItem): IAction[] { + return this.getActions(MenuId.ViewResource, { key: 'resource', value: element.contextValue }).secondary; } private getActions(menuId: MenuId, context: { key: string, value: string }): { primary: IAction[]; secondary: IAction[]; } { const contextKeyService = this.contextKeyService.createScoped(); - contextKeyService.createKey('view', this.viewId); + contextKeyService.createKey('view', this.id); contextKeyService.createKey(context.key, context.value); const menu = this.menuService.createMenu(menuId, contextKeyService); @@ -409,4 +442,4 @@ class Menus implements IDisposable { dispose(): void { this.disposables = dispose(this.disposables); } -} +} \ No newline at end of file diff --git a/src/vs/workbench/parts/views/browser/views.ts b/src/vs/workbench/parts/views/browser/views.ts new file mode 100644 index 0000000000000..831f09c8ecf00 --- /dev/null +++ b/src/vs/workbench/parts/views/browser/views.ts @@ -0,0 +1,144 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { TPromise } from 'vs/base/common/winjs.base'; +import Event, { Emitter } from 'vs/base/common/event'; +import { IActionRunner } from 'vs/base/common/actions'; +import { IViewletView as IView } from 'vs/workbench/browser/viewlet'; + +export class ViewLocation { + + static readonly Explorer = new ViewLocation('explorer'); + + constructor(private _id: string) { + } + + get id(): string { + return this._id; + } +} + +export enum TreeItemCollapsibleState { + Collapsed = 1, + Expanded = 2 +} + +export interface IViewOptions { + name: string; + actionRunner: IActionRunner; +} + +export interface IViewConstructorSignature { + + new (id: string, options: IViewOptions, ...services: { _serviceBrand: any; }[]): IView; + +} + +export interface IViewDescriptor { + + readonly id: string; + + readonly name: string; + + readonly location: ViewLocation; + + readonly ctor: IViewConstructorSignature; + + readonly order?: number; + +} + +export interface ITreeItem { + + handle: number; + + label: string; + + icon?: string; + + iconDark?: string; + + contextValue?: string; + + commandId?: string; + + children?: ITreeItem[]; + + collapsibleState?: TreeItemCollapsibleState; +} + +export interface ITreeViewDataProvider { + + onDidChange: Event; + + getElements(): TPromise; + + getChildren(element: ITreeItem): TPromise; + +} + +export interface IViewsRegistry { + + readonly onViewsRegistered: Event; + + readonly onTreeViewDataProviderRegistered: Event; + + registerViews(views: IViewDescriptor[]): void; + + registerTreeViewDataProvider(id: string, factory: ITreeViewDataProvider): void; + + getViews(loc: ViewLocation): IViewDescriptor[]; + + getTreeViewDataProvider(id: string): ITreeViewDataProvider; + +} + +export const ViewsRegistry: IViewsRegistry = new class { + + private _onViewsRegistered: Emitter = new Emitter(); + readonly onViewsRegistered: Event = this._onViewsRegistered.event; + + private _onTreeViewDataProviderRegistered: Emitter = new Emitter(); + readonly onTreeViewDataProviderRegistered: Event = this._onTreeViewDataProviderRegistered.event; + + private _views: Map = new Map(); + private _treeViewDataPoviders: Map = new Map(); + + registerViews(viewDescriptors: IViewDescriptor[]): void { + if (viewDescriptors.length) { + for (const viewDescriptor of viewDescriptors) { + let views = this._views.get(viewDescriptor.location); + if (!views) { + views = []; + this._views.set(viewDescriptor.location, views); + } + views.push(viewDescriptor); + } + this._onViewsRegistered.fire(viewDescriptors); + } + } + + registerTreeViewDataProvider(id: string, factory: ITreeViewDataProvider) { + if (!this.isViewRegistered(id)) { + // TODO: throw error + } + this._treeViewDataPoviders.set(id, factory); + this._onTreeViewDataProviderRegistered.fire(id); + } + + getViews(loc: ViewLocation): IViewDescriptor[] { + return this._views.get(loc) || []; + } + + getTreeViewDataProvider(id: string): ITreeViewDataProvider { + return this._treeViewDataPoviders.get(id); + } + + private isViewRegistered(id: string): boolean { + let registered = false; + this._views.forEach(views => registered = registered || views.some(view => view.id === id)); + return registered; + } +}; \ No newline at end of file diff --git a/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts b/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts new file mode 100644 index 0000000000000..da935449c647a --- /dev/null +++ b/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts @@ -0,0 +1,101 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { localize } from 'vs/nls'; +import { forEach } from 'vs/base/common/collections'; +import { IJSONSchema } from 'vs/base/common/jsonSchema'; +import { ExtensionMessageCollector, ExtensionsRegistry } from 'vs/platform/extensions/common/extensionsRegistry'; +import { ViewLocation, ViewsRegistry } from 'vs/workbench/parts/views/browser/views'; +import { TreeView } from 'vs/workbench/parts/views/browser/treeView'; + +namespace schema { + + // --views contribution point + + export interface IUserFriendlyViewDescriptor { + id: string; + name: string; + } + + export function parseLocation(value: string): ViewLocation { + switch (value) { + case ViewLocation.Explorer.id: return ViewLocation.Explorer; + } + return void 0; + } + + export function isValidViewDescriptors(viewDescriptors: IUserFriendlyViewDescriptor[], collector: ExtensionMessageCollector): boolean { + if (!Array.isArray(viewDescriptors)) { + collector.error(localize('requirearray', "views must be an array")); + return false; + } + + for (let descriptor of viewDescriptors) { + if (typeof descriptor.id !== 'string') { + collector.error(localize('requirestring', "property `{0}` is mandatory and must be of type `string`", 'id')); + return false; + } + if (typeof descriptor.name !== 'string') { + collector.error(localize('requirestring', "property `{0}` is mandatory and must be of type `string`", 'label')); + return false; + } + } + + return true; + } + + const viewDescriptor: IJSONSchema = { + type: 'object', + properties: { + id: { + description: localize('vscode.extension.contributes.view.id', 'Identifier of the view. Use the same identifier to register a data provider through API.'), + type: 'string' + }, + name: { + description: localize('vscode.extension.contributes.view.name', 'The human-readable name of the view. Will be shown'), + type: 'string' + } + } + }; + + export const viewsContribution: IJSONSchema = { + description: localize('vscode.extension.contributes.views', "Contributes views to the editor"), + type: 'object', + properties: { + 'explorer': { + description: localize('views.explorer', "Explorer"), + type: 'array', + items: viewDescriptor + } + } + }; +} + +ExtensionsRegistry.registerExtensionPoint<{ [loc: string]: schema.IUserFriendlyViewDescriptor[] }>('views', [], schema.viewsContribution).setHandler(extensions => { + for (let extension of extensions) { + const { value, collector } = extension; + + forEach(value, entry => { + if (!schema.isValidViewDescriptors(entry.value, collector)) { + return; + } + + const location = schema.parseLocation(entry.key); + if (!location) { + collector.warn(localize('locationId.invalid', "`{0}` is not a valid view location", entry.key)); + return; + } + + const viewDescriptors = entry.value.map(item => ({ + id: item.id, + name: item.name, + ctor: TreeView, + location + })); + ViewsRegistry.registerViews(viewDescriptors); + }); + } +}); \ No newline at end of file From 1d2d9fe416894659331ad8cc29f434d4a53d34bb Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Fri, 19 May 2017 11:08:03 -0700 Subject: [PATCH 0784/2747] Config for automatically closing 'needs more info' issues --- .github/needs_more_info.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/needs_more_info.yml diff --git a/.github/needs_more_info.yml b/.github/needs_more_info.yml new file mode 100644 index 0000000000000..0e246fd554a86 --- /dev/null +++ b/.github/needs_more_info.yml @@ -0,0 +1,6 @@ +{ + daysUntilClose: 7, + needsMoreInfoLabel: 'needs more info', + perform: false, + closeComment: 'This issue has been closed automatically because it needs more information and has not had recent activity. Please refer to our [guidelines](https://github.com/Microsoft/vscode/blob/master/CONTRIBUTING.md) for filing issues. Thank you for your contributions.' +} From b5fff27131a5e0942703b40b235d89c8c226e7af Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 20:09:55 +0200 Subject: [PATCH 0785/2747] Fixes #5400 --- .../contrib/find/common/findController.ts | 31 ++++++++++++++----- .../find/test/common/findController.test.ts | 27 ++++++++++++++++ 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/src/vs/editor/contrib/find/common/findController.ts b/src/vs/editor/contrib/find/common/findController.ts index a8f06599b3f46..a6edc01be712d 100644 --- a/src/vs/editor/contrib/find/common/findController.ts +++ b/src/vs/editor/contrib/find/common/findController.ts @@ -803,16 +803,31 @@ export class MoveSelectionToPreviousFindMatchAction extends SelectPreviousFindMa export abstract class AbstractSelectHighlightsAction extends EditorAction { public run(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): void { - let r = multiCursorFind(editor, { - changeFindSearchString: true, - allowMultiline: true, - highlightFindOptions: true - }); - if (!r) { - return; + let controller = CommonFindController.get(editor); + if (!controller) { + return null; } - let matches = editor.getModel().findMatches(r.searchText, true, false, r.matchCase, r.wholeWord, false).map(m => m.range); + let matches: Range[] = null; + + const findState = controller.getState(); + if (findState.isRegex && findState.searchString.length > 0) { + + matches = editor.getModel().findMatches(findState.searchString, true, findState.isRegex, findState.matchCase, findState.wholeWord, false).map(m => m.range); + + } else { + + let r = multiCursorFind(editor, { + changeFindSearchString: true, + allowMultiline: true, + highlightFindOptions: true + }); + if (!r) { + return; + } + + matches = editor.getModel().findMatches(r.searchText, true, false, r.matchCase, r.wholeWord, false).map(m => m.range); + } if (matches.length > 0) { let editorSelection = editor.getSelection(); diff --git a/src/vs/editor/contrib/find/test/common/findController.test.ts b/src/vs/editor/contrib/find/test/common/findController.test.ts index 93825e61b9680..2440318851922 100644 --- a/src/vs/editor/contrib/find/test/common/findController.test.ts +++ b/src/vs/editor/contrib/find/test/common/findController.test.ts @@ -215,6 +215,33 @@ suite('FindController', () => { }); }); + test('issue #5400: "Select All Occurences of Find Match" does not select all if find uses regex', () => { + withMockCodeEditor([ + 'something', + 'someething', + 'someeething', + 'nothing' + ], { serviceCollection: serviceCollection }, (editor, cursor) => { + + let findController = editor.registerAndInstantiateContribution(TestFindController); + let selectHighlightsAction = new SelectHighlightsAction(); + + editor.setSelection(new Selection(1, 1, 1, 1)); + findController.getState().change({ searchString: 'some+thing', isRegex: true }, false); + + selectHighlightsAction.run(null, editor); + assert.deepEqual(editor.getSelections().map(fromRange), [ + [1, 1, 1, 10], + [2, 1, 2, 11], + [3, 1, 3, 12], + ]); + + assert.equal(findController.getState().searchString, 'some+thing'); + + findController.dispose(); + }); + }); + test('issue #9043: Clear search scope when find widget is hidden', () => { withMockCodeEditor([ 'var x = (3 * 5)', From 42a38fb1f7b8f83f3c4d1e3c102c5f22ac0b8fe6 Mon Sep 17 00:00:00 2001 From: rebornix Date: Fri, 19 May 2017 11:04:23 -0700 Subject: [PATCH 0786/2747] Fix #5525. Scroll beyond first line to avoid Find Widget covering anything --- .../editor/contrib/find/browser/findWidget.ts | 101 +++++++++++++++++- 1 file changed, 100 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index e909b466c0007..70b5df9beb50c 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -17,7 +17,7 @@ import { FindInput, IFindInputStyles } from 'vs/base/browser/ui/findinput/findIn import { IMessage as InputBoxMessage, InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; import { Widget } from 'vs/base/browser/ui/widget'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, OverlayWidgetPositionPreference } from 'vs/editor/browser/editorBrowser'; +import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, IViewZone, OverlayWidgetPositionPreference } from 'vs/editor/browser/editorBrowser'; import { FIND_IDS, MATCHES_LIMIT } from 'vs/editor/contrib/find/common/findModel'; import { FindReplaceState, FindReplaceStateChangedEvent } from 'vs/editor/contrib/find/common/findState'; import { Range } from 'vs/editor/common/core/range'; @@ -51,12 +51,31 @@ const NLS_NO_RESULTS = nls.localize('label.noResults', "No Results"); let MAX_MATCHES_COUNT_WIDTH = 69; const WIDGET_FIXED_WIDTH = 411 - 69; +export class FindWidgetViewZone implements IViewZone { + + public afterLineNumber: number; + public heightInPx: number; + public suppressMouseDown: boolean; + public domNode: HTMLElement; + + constructor(afterLineNumber: number) { + this.afterLineNumber = afterLineNumber; + + this.heightInPx = 34; + this.suppressMouseDown = false; + this.domNode = document.createElement('div'); + this.domNode.className = 'dock-find-viewzone'; + } +} + export class FindWidget extends Widget implements IOverlayWidget { private static ID = 'editor.contrib.findWidget'; private static PART_WIDTH = 275; private static FIND_INPUT_AREA_WIDTH = FindWidget.PART_WIDTH - 54; private static REPLACE_INPUT_AREA_WIDTH = FindWidget.FIND_INPUT_AREA_WIDTH; + private static FIND_INPUT_AREA_HEIGHT = 34; // The height of Find Widget when Replace Input is not visible. + private static FIND_REPLACE_AREA_HEIGHT = 64; // The height of Find Widget when Replace Input is visible. private _codeEditor: ICodeEditor; private _state: FindReplaceState; @@ -82,6 +101,8 @@ export class FindWidget extends Widget implements IOverlayWidget { private _focusTracker: dom.IFocusTracker; private _findInputFocussed: IContextKey; + private _viewZone: FindWidgetViewZone; + private _viewZoneId: number; constructor( codeEditor: ICodeEditor, @@ -169,9 +190,29 @@ export class FindWidget extends Widget implements IOverlayWidget { }); this._codeEditor.addOverlayWidget(this); + this._viewZone = new FindWidgetViewZone(0); // Put it before the first line then users can scroll beyond the first line. this._applyTheme(themeService.getTheme()); this._register(themeService.onThemeChange(this._applyTheme.bind(this))); + + this._register(this._codeEditor.onDidChangeModel((e) => { + if (!this._isVisible) { + return; + } + + if (this._viewZoneId === undefined) { + return; + } + + this._codeEditor.changeViewZones((accessor) => { + accessor.removeZone(this._viewZoneId); + this._viewZoneId = undefined; + }); + })); + + this._register(this._codeEditor.onDidScrollChange((e) => { + this._layoutViewZone(); + })); } // ----- IOverlayWidget API @@ -246,6 +287,9 @@ export class FindWidget extends Widget implements IOverlayWidget { this._updateMatchesCount(); } + if (e.searchString || e.currentMatch) { + this._layoutViewZone(); + } } private _updateMatchesCount(): void { @@ -331,6 +375,7 @@ export class FindWidget extends Widget implements IOverlayWidget { } }, 0); this._codeEditor.layoutOverlayWidget(this); + this._showViewZone(); } } @@ -345,7 +390,60 @@ export class FindWidget extends Widget implements IOverlayWidget { this._codeEditor.focus(); } this._codeEditor.layoutOverlayWidget(this); + this._codeEditor.changeViewZones((accessor) => { + if (this._viewZoneId !== undefined) { + accessor.removeZone(this._viewZoneId); + this._viewZoneId = undefined; + this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() - this._viewZone.heightInPx); + } + }); + } + } + + private _layoutViewZone() { + if (!this._isVisible) { + return; + } + + if (this._viewZoneId !== undefined) { + return; + } + + this._codeEditor.changeViewZones((accessor) => { + if (this._state.isReplaceRevealed) { + this._viewZone.heightInPx = FindWidget.FIND_REPLACE_AREA_HEIGHT; + } else { + this._viewZone.heightInPx = FindWidget.FIND_INPUT_AREA_HEIGHT; + } + + this._viewZoneId = accessor.addZone(this._viewZone); + this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + this._viewZone.heightInPx); + }); + } + + private _showViewZone() { + if (!this._isVisible) { + return; } + + this._codeEditor.changeViewZones((accessor) => { + let scrollAdjustment = FindWidget.FIND_INPUT_AREA_HEIGHT; + + if (this._viewZoneId !== undefined) { + if (this._state.isReplaceRevealed) { + this._viewZone.heightInPx = FindWidget.FIND_REPLACE_AREA_HEIGHT; + scrollAdjustment = FindWidget.FIND_REPLACE_AREA_HEIGHT - FindWidget.FIND_INPUT_AREA_HEIGHT; + } else { + this._viewZone.heightInPx = FindWidget.FIND_INPUT_AREA_HEIGHT; + scrollAdjustment = FindWidget.FIND_INPUT_AREA_HEIGHT - FindWidget.FIND_REPLACE_AREA_HEIGHT; + } + accessor.removeZone(this._viewZoneId); + } else { + this._viewZone.heightInPx = FindWidget.FIND_INPUT_AREA_HEIGHT; + } + this._viewZoneId = accessor.addZone(this._viewZone); + this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + scrollAdjustment); + }); } private _applyTheme(theme: ITheme) { @@ -644,6 +742,7 @@ export class FindWidget extends Widget implements IOverlayWidget { className: 'toggle left', onTrigger: () => { this._state.change({ isReplaceRevealed: !this._isReplaceVisible }, false); + this._showViewZone(); }, onKeyDown: (e) => { } })); From 0f9771757b7fdc4dffde0cf75f11f6648077040c Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Fri, 19 May 2017 11:57:42 -0700 Subject: [PATCH 0787/2747] Fix seizure when filtered suggest list is above cursor --- .../contrib/suggest/browser/suggestWidget.ts | 59 +++++++++++-------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index a572d9beb4b79..51f12cd01a886 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -352,7 +352,6 @@ export class SuggestWidget implements IContentWidget, IDelegate private readonly maxWidgetWidth = 660; private readonly listWidth = 330; - private readonly minWidgetWidth = 430; private storageService: IStorageService; private detailsFocusBorderColor: string; private detailsBorderColor: string; @@ -548,7 +547,7 @@ export class SuggestWidget implements IContentWidget, IDelegate this.ignoreFocusEvents = false; } - this.updateWidgetHeight(); + this.updateListHeight(); this.list.reveal(index); this.currentSuggestionDetails = item.resolve() @@ -562,7 +561,7 @@ export class SuggestWidget implements IContentWidget, IDelegate if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false)) { this.showDetails(); - this.adjustDocsPosition(); + this._ariaAlert(this.details.getAriaLabel()); } else { removeClass(this.element, 'docs-side'); @@ -827,15 +826,23 @@ export class SuggestWidget implements IContentWidget, IDelegate } show(this.details.element); + this.renderDetails(); + + // With docs showing up, list might need adjustments to keep it close to the cursor + this.adjustListPosition(); + + // with docs showing up widget width/height may change, so reposition the widget + this.editor.layoutContentWidget(this); + + this.adjustDocsPosition(); - this.show(); this.editor.focus(); } private show(): void { - this.updateWidgetHeight(); + this.updateListHeight(); this.suggestWidgetVisible.set(true); - this.renderDetails(); + this.showTimeout = TPromise.timeout(100).then(() => { addClass(this.element, 'visible'); this.onDidShowEmitter.fire(this); @@ -873,12 +880,9 @@ export class SuggestWidget implements IContentWidget, IDelegate return SuggestWidget.ID; } - private updateWidgetHeight(): number { + private updateListHeight(): number { let height = 0; let maxSuggestionsToShow = 11; - if (hasClass(this.element, 'small')) { - maxSuggestionsToShow = 5; - } if (this.state === State.Empty || this.state === State.Loading) { height = this.unfocusedHeight; @@ -895,7 +899,6 @@ export class SuggestWidget implements IContentWidget, IDelegate this.listElement.style.height = `${height}px`; this.list.layout(height); - this.listElement.style.marginTop = '0px'; this.editor.layoutContentWidget(this); return height; @@ -909,23 +912,22 @@ export class SuggestWidget implements IContentWidget, IDelegate const widgetX = this.element.offsetLeft; const widgetY = this.element.offsetTop; - removeClass(this.element, 'list-right'); - - if (this.element.clientWidth < this.maxWidgetWidth && this.listElement.clientWidth !== this.minWidgetWidth) { - // Not enough space to show side by side, so show docs below the list - addClass(this.element, 'docs-below'); - removeClass(this.element, 'docs-side'); - return; - } - if (widgetX < cursorX - this.listWidth) { // Widget is too far to the left of cursor, swap list and docs addClass(this.element, 'list-right'); + } else { + removeClass(this.element, 'list-right'); } - if (cursorY > widgetY && this.details.element.clientHeight > this.listElement.clientHeight) { - // Docs is bigger than list and widget is above cursor, apply margin-top so that list appears right above cursor - this.listElement.style.marginTop = `${this.details.element.clientHeight - this.listElement.clientHeight}px`; + if (cursorY > widgetY) { + if (!hasClass(this.element, 'widget-above')) { + addClass(this.element, 'widget-above'); + // Since the widget was previously not above the cursor, + // the list needs to be adjusted to keep it close to the cursor + this.adjustListPosition(); + } + } else { + removeClass(this.element, 'widget-above'); } } @@ -940,6 +942,17 @@ export class SuggestWidget implements IContentWidget, IDelegate } } + private adjustListPosition(): void { + if (hasClass(this.element, 'widget-above') + && hasClass(this.element, 'docs-side') + && this.details.element.offsetHeight > this.listElement.offsetHeight) { + // Docs is bigger than list and widget is above cursor, apply margin-top so that list appears right above cursor + this.listElement.style.marginTop = `${this.details.element.offsetHeight - this.listElement.offsetHeight}px`; + } else { + this.listElement.style.marginTop = '0px'; + } + } + private renderDetails(): void { if (this.state === State.Details || this.state === State.Open) { this.details.render(this.list.getFocusedElements()[0]); From ada3874b9867ff622ebdf2a50fa4515364ed9a15 Mon Sep 17 00:00:00 2001 From: rebornix Date: Fri, 19 May 2017 12:20:31 -0700 Subject: [PATCH 0788/2747] Fix #26106. Make sure arrary key is string --- src/vs/editor/common/viewModel/viewModelDecorations.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/common/viewModel/viewModelDecorations.ts b/src/vs/editor/common/viewModel/viewModelDecorations.ts index 6f1a0a184b2e7..2a04c160d9410 100644 --- a/src/vs/editor/common/viewModel/viewModelDecorations.ts +++ b/src/vs/editor/common/viewModel/viewModelDecorations.ts @@ -73,7 +73,9 @@ export class ViewModelDecorations implements IDisposable { let removedDecorations = e.removedDecorations; for (let i = 0, len = removedDecorations.length; i < len; i++) { let removedDecoration = removedDecorations[i]; - delete this._decorationsCache[removedDecoration]; + if (removedDecoration !== null && removedDecoration !== undefined) { + delete this._decorationsCache[removedDecoration]; + } } this._clearCachedModelDecorationsResolver(); From 09300167973f0093814b733060baf0a5763a8926 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 21:39:03 +0200 Subject: [PATCH 0789/2747] var -> let, const --- .../common/controller/cursorCollection.ts | 102 +++++++++--------- 1 file changed, 50 insertions(+), 52 deletions(-) diff --git a/src/vs/editor/common/controller/cursorCollection.ts b/src/vs/editor/common/controller/cursorCollection.ts index 0aa9731766259..51ea5a50477cb 100644 --- a/src/vs/editor/common/controller/cursorCollection.ts +++ b/src/vs/editor/common/controller/cursorCollection.ts @@ -51,13 +51,6 @@ export class CursorCollection { return result; } - private _getAll(): OneCursor[] { - var result: OneCursor[] = []; - result.push(this.primaryCursor); - result = result.concat(this.secondaryCursors); - return result; - } - public getAll(): CursorState[] { let result: CursorState[] = []; result[0] = this.primaryCursor.asCursorState(); @@ -68,37 +61,37 @@ export class CursorCollection { } public getPositions(): Position[] { - var result: Position[] = []; - result.push(this.primaryCursor.modelState.position); - for (var i = 0, len = this.secondaryCursors.length; i < len; i++) { - result.push(this.secondaryCursors[i].modelState.position); + let result: Position[] = []; + result[0] = this.primaryCursor.modelState.position; + for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { + result[i + 1] = this.secondaryCursors[i].modelState.position; } return result; } public getViewPositions(): Position[] { - var result: Position[] = []; - result.push(this.primaryCursor.viewState.position); - for (var i = 0, len = this.secondaryCursors.length; i < len; i++) { - result.push(this.secondaryCursors[i].viewState.position); + let result: Position[] = []; + result[0] = this.primaryCursor.viewState.position; + for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { + result[i + 1] = this.secondaryCursors[i].viewState.position; } return result; } public getSelections(): Selection[] { - var result: Selection[] = []; - result.push(this.primaryCursor.modelState.selection); - for (var i = 0, len = this.secondaryCursors.length; i < len; i++) { - result.push(this.secondaryCursors[i].modelState.selection); + let result: Selection[] = []; + result[0] = this.primaryCursor.modelState.selection; + for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { + result[i + 1] = this.secondaryCursors[i].modelState.selection; } return result; } public getViewSelections(): Selection[] { - var result: Selection[] = []; - result.push(this.primaryCursor.viewState.selection); - for (var i = 0, len = this.secondaryCursors.length; i < len; i++) { - result.push(this.secondaryCursors[i].viewState.selection); + let result: Selection[] = []; + result[0] = this.primaryCursor.viewState.selection; + for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { + result[i + 1] = this.secondaryCursors[i].viewState.selection; } return result; } @@ -147,13 +140,8 @@ export class CursorCollection { this._setSecondaryStates([]); } - public normalize(): void { - this._mergeCursorsIfNecessary(); - } - private _addSecondaryCursor(): void { - var newCursor = new OneCursor(this.context); - this.secondaryCursors.push(newCursor); + this.secondaryCursors.push(new OneCursor(this.context)); this.lastAddedCursorIndex = this.secondaryCursors.length; } @@ -172,24 +160,34 @@ export class CursorCollection { this.secondaryCursors.splice(removeIndex, 1); } - private _mergeCursorsIfNecessary(): void { + private _getAll(): OneCursor[] { + let result: OneCursor[] = []; + result[0] = this.primaryCursor; + for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { + result[i + 1] = this.secondaryCursors[i]; + } + return result; + } + + public normalize(): void { if (this.secondaryCursors.length === 0) { return; } - var cursors = this._getAll(); - var sortedCursors: { + let cursors = this._getAll(); + + interface SortedCursor { index: number; selection: Selection; viewSelection: Selection; - }[] = []; - for (var i = 0; i < cursors.length; i++) { + } + let sortedCursors: SortedCursor[] = []; + for (let i = 0, len = cursors.length; i < len; i++) { sortedCursors.push({ index: i, selection: cursors[i].modelState.selection, viewSelection: cursors[i].viewState.selection }); } - sortedCursors.sort((a, b) => { if (a.viewSelection.startLineNumber === b.viewSelection.startLineNumber) { return a.viewSelection.startColumn - b.viewSelection.startColumn; @@ -197,30 +195,30 @@ export class CursorCollection { return a.viewSelection.startLineNumber - b.viewSelection.startLineNumber; }); - for (var sortedCursorIndex = 0; sortedCursorIndex < sortedCursors.length - 1; sortedCursorIndex++) { - var current = sortedCursors[sortedCursorIndex]; - var next = sortedCursors[sortedCursorIndex + 1]; + for (let sortedCursorIndex = 0; sortedCursorIndex < sortedCursors.length - 1; sortedCursorIndex++) { + const current = sortedCursors[sortedCursorIndex]; + const next = sortedCursors[sortedCursorIndex + 1]; - var currentViewSelection = current.viewSelection; - var nextViewSelection = next.viewSelection; + const currentViewSelection = current.viewSelection; + const nextViewSelection = next.viewSelection; if (nextViewSelection.getStartPosition().isBeforeOrEqual(currentViewSelection.getEndPosition())) { - var winnerSortedCursorIndex = current.index < next.index ? sortedCursorIndex : sortedCursorIndex + 1; - var looserSortedCursorIndex = current.index < next.index ? sortedCursorIndex + 1 : sortedCursorIndex; + const winnerSortedCursorIndex = current.index < next.index ? sortedCursorIndex : sortedCursorIndex + 1; + const looserSortedCursorIndex = current.index < next.index ? sortedCursorIndex + 1 : sortedCursorIndex; - var looserIndex = sortedCursors[looserSortedCursorIndex].index; - var winnerIndex = sortedCursors[winnerSortedCursorIndex].index; + const looserIndex = sortedCursors[looserSortedCursorIndex].index; + const winnerIndex = sortedCursors[winnerSortedCursorIndex].index; - var looserSelection = sortedCursors[looserSortedCursorIndex].selection; - var winnerSelection = sortedCursors[winnerSortedCursorIndex].selection; + const looserSelection = sortedCursors[looserSortedCursorIndex].selection; + const winnerSelection = sortedCursors[winnerSortedCursorIndex].selection; if (!looserSelection.equalsSelection(winnerSelection)) { - var resultingRange = looserSelection.plusRange(winnerSelection); - var looserSelectionIsLTR = (looserSelection.selectionStartLineNumber === looserSelection.startLineNumber && looserSelection.selectionStartColumn === looserSelection.startColumn); - var winnerSelectionIsLTR = (winnerSelection.selectionStartLineNumber === winnerSelection.startLineNumber && winnerSelection.selectionStartColumn === winnerSelection.startColumn); + const resultingRange = looserSelection.plusRange(winnerSelection); + const looserSelectionIsLTR = (looserSelection.selectionStartLineNumber === looserSelection.startLineNumber && looserSelection.selectionStartColumn === looserSelection.startColumn); + const winnerSelectionIsLTR = (winnerSelection.selectionStartLineNumber === winnerSelection.startLineNumber && winnerSelection.selectionStartColumn === winnerSelection.startColumn); // Give more importance to the last added cursor (think Ctrl-dragging + hitting another cursor) - var resultingSelectionIsLTR: boolean; + let resultingSelectionIsLTR: boolean; if (looserIndex === this.lastAddedCursorIndex) { resultingSelectionIsLTR = looserSelectionIsLTR; this.lastAddedCursorIndex = winnerIndex; @@ -229,7 +227,7 @@ export class CursorCollection { resultingSelectionIsLTR = winnerSelectionIsLTR; } - var resultingSelection: Selection; + let resultingSelection: Selection; if (resultingSelectionIsLTR) { resultingSelection = new Selection(resultingRange.startLineNumber, resultingRange.startColumn, resultingRange.endLineNumber, resultingRange.endColumn); } else { @@ -241,7 +239,7 @@ export class CursorCollection { cursors[winnerIndex].setState(this.context, resultingState.modelState, resultingState.viewState); } - for (var j = 0; j < sortedCursors.length; j++) { + for (let j = 0; j < sortedCursors.length; j++) { if (sortedCursors[j].index > looserIndex) { sortedCursors[j].index--; } From b3041cbc66fd7896c3f750974a1164fa390c1ecb Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 21:50:41 +0200 Subject: [PATCH 0790/2747] Fixes #6661: Relax cursor merging rules in case of touching ranges --- .../common/controller/cursorCollection.ts | 11 ++++- .../find/test/common/findController.test.ts | 49 ++++++++++++++++++- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/common/controller/cursorCollection.ts b/src/vs/editor/common/controller/cursorCollection.ts index 51ea5a50477cb..2f176653af7d3 100644 --- a/src/vs/editor/common/controller/cursorCollection.ts +++ b/src/vs/editor/common/controller/cursorCollection.ts @@ -202,7 +202,16 @@ export class CursorCollection { const currentViewSelection = current.viewSelection; const nextViewSelection = next.viewSelection; - if (nextViewSelection.getStartPosition().isBeforeOrEqual(currentViewSelection.getEndPosition())) { + let shouldMergeCursors: boolean; + if (nextViewSelection.isEmpty() || currentViewSelection.isEmpty()) { + // Merge touching cursors if one of them is collapsed + shouldMergeCursors = nextViewSelection.getStartPosition().isBeforeOrEqual(currentViewSelection.getEndPosition()); + } else { + // Merge only overlapping cursors (i.e. allow touching ranges) + shouldMergeCursors = nextViewSelection.getStartPosition().isBefore(currentViewSelection.getEndPosition()); + } + + if (shouldMergeCursors) { const winnerSortedCursorIndex = current.index < next.index ? sortedCursorIndex : sortedCursorIndex + 1; const looserSortedCursorIndex = current.index < next.index ? sortedCursorIndex + 1 : sortedCursorIndex; diff --git a/src/vs/editor/contrib/find/test/common/findController.test.ts b/src/vs/editor/contrib/find/test/common/findController.test.ts index 2440318851922..d6e5591d3c22e 100644 --- a/src/vs/editor/contrib/find/test/common/findController.test.ts +++ b/src/vs/editor/contrib/find/test/common/findController.test.ts @@ -11,7 +11,7 @@ import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Position } from 'vs/editor/common/core/position'; import { Selection } from 'vs/editor/common/core/selection'; import { Range } from 'vs/editor/common/core/range'; -import { EndOfLineSequence, ICommonCodeEditor } from 'vs/editor/common/editorCommon'; +import { EndOfLineSequence, ICommonCodeEditor, Handler } from 'vs/editor/common/editorCommon'; import { CommonFindController, FindStartFocusAction, IFindStartOptions, NextMatchFindAction, StartFindAction, SelectHighlightsAction, @@ -412,6 +412,53 @@ suite('FindController', () => { }); }); + test('issue #6661: AddSelectionToNextFindMatchAction can work with touching ranges', () => { + withMockCodeEditor([ + 'abcabc', + 'abc', + 'abcabc', + ], { serviceCollection: serviceCollection }, (editor, cursor) => { + + let findController = editor.registerAndInstantiateContribution(TestFindController); + let addSelectionToNextFindMatch = new AddSelectionToNextFindMatchAction(); + + editor.setSelection(new Selection(1, 1, 1, 4)); + + addSelectionToNextFindMatch.run(null, editor); + assert.deepEqual(editor.getSelections().map(fromRange), [ + [1, 1, 1, 4], + [1, 4, 1, 7] + ]); + + addSelectionToNextFindMatch.run(null, editor); + addSelectionToNextFindMatch.run(null, editor); + addSelectionToNextFindMatch.run(null, editor); + assert.deepEqual(editor.getSelections().map(fromRange), [ + [1, 1, 1, 4], + [1, 4, 1, 7], + [2, 1, 2, 4], + [3, 1, 3, 4], + [3, 4, 3, 7] + ]); + + editor.trigger('test', Handler.Type, { text: 'z' }); + assert.deepEqual(editor.getSelections().map(fromRange), [ + [1, 2, 1, 2], + [1, 3, 1, 3], + [2, 2, 2, 2], + [3, 2, 3, 2], + [3, 3, 3, 3] + ]); + assert.equal(editor.getValue(), [ + 'zz', + 'z', + 'zz', + ].join('\n')); + + findController.dispose(); + }); + }); + test('issue #23541: Multiline Ctrl+D does not work in CRLF files', () => { withMockCodeEditor([ '', From 7e3e420c330e8f99ad72636f08b005c449487179 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 21:54:26 +0200 Subject: [PATCH 0791/2747] Change all respects find state only if the find widget is revealed --- src/vs/editor/contrib/find/common/findController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/find/common/findController.ts b/src/vs/editor/contrib/find/common/findController.ts index a6edc01be712d..f06f35867fd2f 100644 --- a/src/vs/editor/contrib/find/common/findController.ts +++ b/src/vs/editor/contrib/find/common/findController.ts @@ -811,7 +811,7 @@ export abstract class AbstractSelectHighlightsAction extends EditorAction { let matches: Range[] = null; const findState = controller.getState(); - if (findState.isRegex && findState.searchString.length > 0) { + if (findState.isRevealed && findState.isRegex && findState.searchString.length > 0) { matches = editor.getModel().findMatches(findState.searchString, true, findState.isRegex, findState.matchCase, findState.wholeWord, false).map(m => m.range); From fce56a92a86cd45302a6f6d5d177b5e77a052099 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 22:23:01 +0200 Subject: [PATCH 0792/2747] Fixes #26747 --- src/vs/editor/browser/standalone/standaloneLanguages.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/browser/standalone/standaloneLanguages.ts b/src/vs/editor/browser/standalone/standaloneLanguages.ts index f3f5584a0db1b..2e23e5a33ec02 100644 --- a/src/vs/editor/browser/standalone/standaloneLanguages.ts +++ b/src/vs/editor/browser/standalone/standaloneLanguages.ts @@ -242,7 +242,7 @@ export function registerHoverProvider(languageId: string, provider: modes.HoverP return undefined; } if (!value.range && word) { - value.range = new Range(position.lineNumber, word.startColumn, position.column, word.endColumn); + value.range = new Range(position.lineNumber, word.startColumn, position.lineNumber, word.endColumn); } if (!value.range) { value.range = new Range(position.lineNumber, position.column, position.lineNumber, position.column); From efd6e50d493fea2e7b35509d408ad68d49f95ac3 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 19 May 2017 14:03:00 -0700 Subject: [PATCH 0793/2747] Fix scroll of webview sometimes getting reset --- .../parts/html/browser/webview-pre.js | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/parts/html/browser/webview-pre.js b/src/vs/workbench/parts/html/browser/webview-pre.js index da511a2c866f8..a371b3f33c0cd 100644 --- a/src/vs/workbench/parts/html/browser/webview-pre.js +++ b/src/vs/workbench/parts/html/browser/webview-pre.js @@ -9,6 +9,8 @@ const ipcRenderer = require('electron').ipcRenderer; + var firstLoad = true; + const initData = { initialScrollProgress: undefined }; @@ -155,21 +157,25 @@ // keep current scrollTop around and use later var setInitialScrollPosition; - if (frame) { - const scrollY = frame.contentDocument && frame.contentDocument.body ? frame.contentDocument.body.scrollTop : 0; - setInitialScrollPosition = function (body) { - body.scrollTop = scrollY; - } - } else { - // First load + if (firstLoad) { + firstLoad = false; setInitialScrollPosition = function (body, window) { body.scrollTop = 0; if (!isNaN(initData.initialScrollProgress)) { window.addEventListener('load', function () { - body.scrollTop = body.clientHeight * initData.initialScrollProgress + if (body.scrollTop === 0) { + body.scrollTop = body.clientHeight * initData.initialScrollProgress + } }); } } + } else { + const scrollY = frame.contentDocument && frame.contentDocument.body ? frame.contentDocument.body.scrollTop : 0; + setInitialScrollPosition = function (body) { + if (body.scrollTop === 0) { + body.scrollTop = scrollY; + } + } } // Clean up old pending frames and set current one as new one From 96a95af63785fabd0e9a9eb8a47b9ad414ca40c3 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 23:15:21 +0200 Subject: [PATCH 0794/2747] Fixes #2106 --- .../editor/common/controller/coreCommands.ts | 37 +++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/common/controller/coreCommands.ts b/src/vs/editor/common/controller/coreCommands.ts index 02fade2c3d2b0..9ad0e099b2c92 100644 --- a/src/vs/editor/common/controller/coreCommands.ts +++ b/src/vs/editor/common/controller/coreCommands.ts @@ -712,14 +712,45 @@ export namespace CoreNavigationCommands { newState = CursorMoveCommands.moveTo(context, cursors.getPrimaryCursor(), false, args.position, args.viewPosition); } - let newStates = cursors.getAll().slice(0); - newStates.push(newState); + const states = cursors.getAll(); + + // Check if we should remove a cursor (sort of like a toggle) + if (states.length > 1) { + const newModelPosition = (newState.modelState ? newState.modelState.position : null); + const newViewPosition = (newState.viewState ? newState.viewState.position : null); + + for (let i = 0, len = states.length; i < len; i++) { + const state = states[i]; + + if (newModelPosition && !state.modelState.selection.containsPosition(newModelPosition)) { + continue; + } + + if (newViewPosition && !state.viewState.selection.containsPosition(newViewPosition)) { + continue; + } + + // => Remove the cursor + states.splice(i, 1); + + cursors.context.model.pushStackElement(); + cursors.setStates( + args.source, + CursorChangeReason.Explicit, + states + ); + return; + } + } + + // => Add the new cursor + states.push(newState); cursors.context.model.pushStackElement(); cursors.setStates( args.source, CursorChangeReason.Explicit, - newStates + states ); } }); From 9a2b30c1fd69448a11258ec3aa45c4f55611bc9e Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 19 May 2017 23:12:52 +0200 Subject: [PATCH 0795/2747] Theme: Debugger task dropdown inconsistency fixes #26953 --- .../parts/debug/browser/debugActionItems.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/debugActionItems.ts b/src/vs/workbench/parts/debug/browser/debugActionItems.ts index 8165e4055b6e0..b81283f1ac149 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionItems.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionItems.ts @@ -10,7 +10,7 @@ import { IAction, IActionRunner } from 'vs/base/common/actions'; import { KeyCode } from 'vs/base/common/keyCodes'; import * as dom from 'vs/base/browser/dom'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; -import { SelectBox } from 'vs/base/browser/ui/selectBox/selectBox'; +import { SelectBox, ISelectBoxStyles } from 'vs/base/browser/ui/selectBox/selectBox'; import { SelectActionItem, IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { EventEmitter } from 'vs/base/common/eventEmitter'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; @@ -37,7 +37,7 @@ export class StartDebugActionItem extends EventEmitter implements IActionItem { private context: any, private action: IAction, @IDebugService private debugService: IDebugService, - @IThemeService themeService: IThemeService, + @IThemeService private themeService: IThemeService, @IConfigurationService private configurationService: IConfigurationService, @ICommandService private commandService: ICommandService ) { @@ -115,6 +115,14 @@ export class StartDebugActionItem extends EventEmitter implements IActionItem { event.stopPropagation(); } })); + this.toDispose.push(attachSelectBoxStyler({ + style: (colors: ISelectBoxStyles) => { + if (colors.selectBorder) { + this.container.style.borderColor = colors.selectBorder.toString(); + selectBoxContainer.style.borderLeftColor = colors.selectBorder.toString(); + } + } + }, this.themeService)); this.updateOptions(); } From 521c9120c9f87eae2831d4e7098f5262b4e97151 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 19 May 2017 23:21:03 +0200 Subject: [PATCH 0796/2747] Fixes #2292: Place the textarea before the overlay widgets in the dom --- src/vs/editor/browser/view/viewImpl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index c447686be87f5..3ad217b97871c 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -227,9 +227,9 @@ export class View extends ViewEventHandler { this.overflowGuardContainer.appendChild(margin.getDomNode()); this.overflowGuardContainer.appendChild(this._scrollbar.getDomNode()); this.overflowGuardContainer.appendChild(scrollDecoration.getDomNode()); - this.overflowGuardContainer.appendChild(this.overlayWidgets.getDomNode()); this.overflowGuardContainer.appendChild(this._textAreaHandler.textArea); this.overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover); + this.overflowGuardContainer.appendChild(this.overlayWidgets.getDomNode()); this.overflowGuardContainer.appendChild(minimap.getDomNode()); this.domNode.appendChild(this.overflowGuardContainer); this.domNode.appendChild(this.contentWidgets.overflowingContentWidgetsDomNode); From 33843a5916c3a52a297d4f450524273984d32c7d Mon Sep 17 00:00:00 2001 From: isidor Date: Sat, 20 May 2017 00:17:11 +0200 Subject: [PATCH 0797/2747] add generic surveys --- src/vs/platform/node/product.ts | 8 + .../electron-browser/workbench.main.ts | 1 + .../languageSurveys.contribution.ts | 143 ++++++++++++++++++ 3 files changed, 152 insertions(+) create mode 100644 src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.ts diff --git a/src/vs/platform/node/product.ts b/src/vs/platform/node/product.ts index ece6de31f9b64..718fc5a477aa9 100644 --- a/src/vs/platform/node/product.ts +++ b/src/vs/platform/node/product.ts @@ -53,6 +53,7 @@ export interface IProductConfiguration { licenseUrl: string; privacyStatementUrl: string; npsSurveyUrl: string; + surveys: ISurveyData[]; checksums: { [path: string]: string; }; checksumFailMoreInfoUrl: string; hockeyApp: { @@ -64,6 +65,13 @@ export interface IProductConfiguration { }; } +export interface ISurveyData { + surveyUrl: string; + languageId: string; + editCount: number; + userProbability: number; +} + const rootPath = path.dirname(uri.parse(require.toUrl('')).fsPath); const productJsonPath = path.join(rootPath, 'product.json'); const product = require.__$__nodeRequire(productJsonPath) as IProductConfiguration; diff --git a/src/vs/workbench/electron-browser/workbench.main.ts b/src/vs/workbench/electron-browser/workbench.main.ts index ae9d791d648f3..0d6c2c4aa0c22 100644 --- a/src/vs/workbench/electron-browser/workbench.main.ts +++ b/src/vs/workbench/electron-browser/workbench.main.ts @@ -101,6 +101,7 @@ import 'vs/workbench/parts/welcome/gettingStarted/electron-browser/gettingStarte import 'vs/workbench/parts/update/electron-browser/update.contribution'; import 'vs/workbench/parts/surveys/electron-browser/nps.contribution'; +import 'vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution'; import 'vs/workbench/parts/performance/electron-browser/performance.contribution'; diff --git a/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.ts b/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.ts new file mode 100644 index 0000000000000..76c6dcf6a4beb --- /dev/null +++ b/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.ts @@ -0,0 +1,143 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as nls from 'vs/nls'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { Action } from 'vs/base/common/actions'; +import { language } from 'vs/base/common/platform'; +import { IModelService } from 'vs/editor/common/services/modelService'; +import { IWorkbenchContributionsRegistry, IWorkbenchContribution, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; +import { Registry } from 'vs/platform/platform'; +import { IMessageService, Severity } from 'vs/platform/message/common/message'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; +import { FileChangeType, IFileService } from 'vs/platform/files/common/files'; +import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; +import pkg from 'vs/platform/node/package'; +import product, { ISurveyData } from 'vs/platform/node/product'; + +class LanguageSurvey { + + constructor( + data: ISurveyData, + instantiationService: IInstantiationService, + storageService: IStorageService, + messageService: IMessageService, + telemetryService: ITelemetryService, + fileService: IFileService, + modelService: IModelService + ) { + const SESSION_COUNT_KEY = `${data.languageId}.sessionCount`; + const LAST_SESSION_DATE_KEY = `${data.languageId}.lastSessionDate`; + const SKIP_VERSION_KEY = `${data.languageId}.skipVersion`; + const IS_CANDIDATE_KEY = `${data.languageId}.isCandidate`; + const EDITED_LANGUAGE_COUNT_KEY = `${data.languageId}.editedCount`; + const EDITED_LANGUAGE_DATE_KEY = `${data.languageId}.editedDate`; + + const skipVersion = storageService.get(SKIP_VERSION_KEY, StorageScope.GLOBAL, ''); + if (skipVersion) { + return; + } + const date = new Date().toDateString(); + + if (storageService.getInteger(EDITED_LANGUAGE_COUNT_KEY, StorageScope.GLOBAL, 0) < data.editCount) { + fileService.onFileChanges(e => { + e.getUpdated().forEach(event => { + if (event.type === FileChangeType.UPDATED) { + const model = modelService.getModel(event.resource); + if (model && model.getModeId() === data.languageId && date !== storageService.get(EDITED_LANGUAGE_DATE_KEY, StorageScope.GLOBAL)) { + const editedCount = storageService.getInteger(EDITED_LANGUAGE_COUNT_KEY, StorageScope.GLOBAL, 0) + 1; + storageService.store(EDITED_LANGUAGE_COUNT_KEY, editedCount, StorageScope.GLOBAL); + storageService.store(EDITED_LANGUAGE_DATE_KEY, date, StorageScope.GLOBAL); + } + } + }); + }); + } + + const lastSessionDate = storageService.get(LAST_SESSION_DATE_KEY, StorageScope.GLOBAL, new Date(0).toDateString()); + if (date === lastSessionDate) { + return; + } + + const sessionCount = storageService.getInteger(SESSION_COUNT_KEY, StorageScope.GLOBAL, 0) + 1; + storageService.store(LAST_SESSION_DATE_KEY, date, StorageScope.GLOBAL); + storageService.store(SESSION_COUNT_KEY, sessionCount, StorageScope.GLOBAL); + + if (sessionCount < 9) { + return; + } + if (storageService.getInteger(EDITED_LANGUAGE_COUNT_KEY, StorageScope.GLOBAL, 0) < data.editCount) { + return; + } + + const isCandidate = storageService.getBoolean(IS_CANDIDATE_KEY, StorageScope.GLOBAL, false) + || Math.random() < data.userProbability; + + storageService.store(IS_CANDIDATE_KEY, isCandidate, StorageScope.GLOBAL); + + if (!isCandidate) { + storageService.store(SKIP_VERSION_KEY, pkg.version, StorageScope.GLOBAL); + return; + } + + const message = nls.localize('helpUs', "Help us improve our support for {0}", data.languageId); + + const takeSurveyAction = new Action('takeSurvey', nls.localize('takeShortSurvey', "Take Short Survey"), '', true, () => { + telemetryService.publicLog(`${data.languageId}.survey/takeShortSurvey`); + return telemetryService.getTelemetryInfo().then(info => { + window.open(`${data.surveyUrl}?o=${encodeURIComponent(process.platform)}&v=${encodeURIComponent(pkg.version)}&m=${encodeURIComponent(info.machineId)}`); + storageService.store(IS_CANDIDATE_KEY, false, StorageScope.GLOBAL); + storageService.store(SKIP_VERSION_KEY, pkg.version, StorageScope.GLOBAL); + }); + }); + + const remindMeLaterAction = new Action('later', nls.localize('remindLater', "Remind Me later"), '', true, () => { + telemetryService.publicLog(`${data.languageId}.survey/remindMeLater`); + storageService.store(SESSION_COUNT_KEY, sessionCount - 3, StorageScope.GLOBAL); + return TPromise.as(null); + }); + + const neverAgainAction = new Action('never', nls.localize('neverAgain', "Don't Show Again"), '', true, () => { + telemetryService.publicLog(`${data.languageId}.survey/dontShowAgain`); + storageService.store(IS_CANDIDATE_KEY, false, StorageScope.GLOBAL); + storageService.store(SKIP_VERSION_KEY, pkg.version, StorageScope.GLOBAL); + return TPromise.as(null); + }); + + const actions = [neverAgainAction, remindMeLaterAction, takeSurveyAction]; + telemetryService.publicLog(`${data.languageId}.survey/userAsked`); + messageService.show(Severity.Info, { message, actions }); + } + +} + +class LanguageSurveysContribution implements IWorkbenchContribution { + + private surveys: LanguageSurvey[]; + + constructor( + @IInstantiationService instantiationService: IInstantiationService, + @IStorageService storageService: IStorageService, + @IMessageService messageService: IMessageService, + @ITelemetryService telemetryService: ITelemetryService, + @IFileService fileService: IFileService, + @IModelService modelService: IModelService + ) { + this.surveys = product.surveys.filter(surveyData => surveyData.editCount && surveyData.languageId && surveyData.surveyUrl && surveyData.userProbability).map(surveyData => + new LanguageSurvey(surveyData, instantiationService, storageService, messageService, telemetryService, fileService, modelService)); + } + + getId(): string { + return 'languagesurveys.contribution'; + } +} + +if (language === 'en' && product.surveys && product.surveys.length) { + const workbenchRegistry = Registry.as(WorkbenchExtensions.Workbench); + workbenchRegistry.registerWorkbenchContribution(LanguageSurveysContribution); +} \ No newline at end of file From 9c4331038920f7045310b7549623b6efb987708b Mon Sep 17 00:00:00 2001 From: isidor Date: Sat, 20 May 2017 00:22:03 +0200 Subject: [PATCH 0798/2747] update distro --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fa2e5bddfa5b2..817d3162edb35 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev", "version": "1.13.0", "electronVersion": "1.6.6", - "distro": "a1870d5e65d959a5ee8a4c7fce08b136ca47dd79", + "distro": "4de68ec7f643597f97a2bd849d6afeba2ae6a729", "author": { "name": "Microsoft Corporation" }, From 338dea778bf98f0a79ef54b686000a716ad2cfbd Mon Sep 17 00:00:00 2001 From: isidor Date: Sat, 20 May 2017 00:49:37 +0200 Subject: [PATCH 0799/2747] Do not log write to settings.json as a filePUT event as it ruins our JSON usage data --- .../services/textfile/common/textFileEditorModel.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts index 234b9c8cc2df1..debbf1fc9722f 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts @@ -18,6 +18,7 @@ import diagnostics = require('vs/base/common/diagnostics'); import types = require('vs/base/common/types'); import { IMode } from 'vs/editor/common/modes'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITextFileService, IAutoSaveConfiguration, ModelState, ITextFileEditorModel, IModelSaveOptions, ISaveErrorHandler, ISaveParticipant, StateChange, SaveReason, IRawTextContent } from 'vs/workbench/services/textfile/common/textfiles'; import { EncodingMode, EditorModel } from 'vs/workbench/common/editor'; import { BaseTextEditorModel } from 'vs/workbench/common/editor/textEditorModel'; @@ -81,7 +82,8 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil @IInstantiationService private instantiationService: IInstantiationService, @ITelemetryService private telemetryService: ITelemetryService, @ITextFileService private textFileService: ITextFileService, - @IBackupFileService private backupFileService: IBackupFileService + @IBackupFileService private backupFileService: IBackupFileService, + @IEnvironmentService private environmentService: IEnvironmentService ) { super(modelService, modeService); @@ -665,7 +667,12 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil diag(`doSave(${versionId}) - after updateContent()`, this.resource, new Date()); // Telemetry - this.telemetryService.publicLog('filePUT', { mimeType: guessMimeTypes(this.resource.fsPath).join(', '), ext: paths.extname(this.lastResolvedDiskStat.resource.fsPath) }); + if (this.resource.fsPath === this.environmentService.appSettingsPath) { + // Do not log write to settings.json as a filePUT event as it ruins our JSON usage data + this.telemetryService.publicLog('settingsWritten'); + } else { + this.telemetryService.publicLog('filePUT', { mimeType: guessMimeTypes(this.resource.fsPath).join(', '), ext: paths.extname(this.lastResolvedDiskStat.resource.fsPath) }); + } // Update dirty state unless model has changed meanwhile if (versionId === this.versionId) { From bd14b32aeaaec846f41a8ceaee90752e7198354b Mon Sep 17 00:00:00 2001 From: Daniel Ye Date: Fri, 19 May 2017 16:10:35 -0700 Subject: [PATCH 0800/2747] 2017-05-19. Merged in translations. --- .../out/settingsDocumentHelper.i18n.json | 2 +- i18n/chs/extensions/git/out/main.i18n.json | 2 +- .../extensions/git/out/scmProvider.i18n.json | 2 +- i18n/chs/extensions/git/package.i18n.json | 8 +++---- i18n/chs/extensions/jake/out/main.i18n.json | 6 +++++ i18n/chs/extensions/jake/package.i18n.json | 6 +++++ .../typescript/out/utils/logger.i18n.json | 4 +++- .../extensions/typescript/package.i18n.json | 5 +++- .../base/common/jsonErrorMessages.i18n.json | 2 +- .../src/vs/code/electron-main/menus.i18n.json | 1 + .../config/commonEditorConfig.i18n.json | 3 ++- .../browser/referencesWidget.i18n.json | 3 +++ .../suggest/browser/suggestWidget.i18n.json | 2 ++ ...guageConfigurationExtensionPoint.i18n.json | 6 ++++- .../markers/common/problemMatcher.i18n.json | 2 -- .../theme/common/colorRegistry.i18n.json | 17 ++++++++++--- .../api/node/extHostTreeViews.i18n.json | 6 +++++ .../src/vs/workbench/common/theme.i18n.json | 3 +++ .../electron-browser/shell.i18n.json | 6 +---- .../electron-browser/window.i18n.json | 4 +--- .../debugConfigurationManager.i18n.json | 2 +- .../electronDebugActions.i18n.json | 1 + .../parts/debug/node/debugAdapter.i18n.json | 1 - .../actions/balance.i18n.json | 5 +++- .../actions/editPoints.i18n.json | 5 +++- .../actions/evaluateMath.i18n.json | 4 +++- .../actions/expandAbbreviation.i18n.json | 4 +++- .../actions/incrementDecrement.i18n.json | 9 ++++++- .../actions/matchingPair.i18n.json | 4 +++- .../actions/mergeLines.i18n.json | 4 +++- .../actions/reflectCssValue.i18n.json | 4 +++- .../actions/removeTag.i18n.json | 4 +++- .../actions/selectItem.i18n.json | 5 +++- .../actions/splitJoinTag.i18n.json | 4 +++- .../actions/toggleComment.i18n.json | 4 +++- .../actions/updateImageSize.i18n.json | 4 +++- .../actions/updateTag.i18n.json | 6 ++++- .../actions/wrapWithAbbreviation.i18n.json | 6 ++++- .../emmet.contribution.i18n.json | 9 ++++++- .../extensionsUtils.i18n.json | 6 +++++ .../browser/files.contribution.i18n.json | 2 +- .../browser/preferencesRenderers.i18n.json | 1 + .../browser/searchResultsView.i18n.json | 4 +++- .../tasks/browser/restartQuickOpen.i18n.json | 1 - .../tasks/browser/taskQuickOpen.i18n.json | 1 - .../terminalActions.i18n.json | 4 +++- .../themes.contribution.i18n.json | 1 + .../vs_code_welcome_page.i18n.json | 20 +++++++--------- .../electron-browser/welcomePage.i18n.json | 8 ++++--- .../walkThroughPart.i18n.json | 3 ++- .../configurationEditingService.i18n.json | 5 +++- .../common/workbenchModeService.i18n.json | 2 +- .../cht/extensions/git/out/commands.i18n.json | 1 + i18n/cht/extensions/git/package.i18n.json | 4 +++- i18n/cht/extensions/jake/out/main.i18n.json | 6 +++++ i18n/cht/extensions/jake/package.i18n.json | 6 +++++ .../typescript/out/utils/logger.i18n.json | 4 +++- .../extensions/typescript/package.i18n.json | 1 + .../resourceviewer/resourceViewer.i18n.json | 3 +++ .../base/common/jsonErrorMessages.i18n.json | 12 +++++++++- .../config/commonEditorConfig.i18n.json | 1 - .../common/view/editorColorRegistry.i18n.json | 8 +++---- .../browser/referencesWidget.i18n.json | 1 + .../suggest/browser/suggestWidget.i18n.json | 1 + ...guageConfigurationExtensionPoint.i18n.json | 3 ++- .../markers/common/problemMatcher.i18n.json | 2 -- .../theme/common/colorRegistry.i18n.json | 9 ++++++- .../api/node/extHostTreeViews.i18n.json | 6 +++++ .../browser/actions/configureLocale.i18n.json | 1 + .../electron-browser/shell.i18n.json | 6 +---- .../electron-browser/window.i18n.json | 4 +--- .../actions/balance.i18n.json | 5 +++- .../actions/editPoints.i18n.json | 5 +++- .../actions/evaluateMath.i18n.json | 4 +++- .../actions/expandAbbreviation.i18n.json | 4 +++- .../actions/incrementDecrement.i18n.json | 9 ++++++- .../actions/matchingPair.i18n.json | 4 +++- .../actions/mergeLines.i18n.json | 4 +++- .../actions/reflectCssValue.i18n.json | 4 +++- .../actions/removeTag.i18n.json | 4 +++- .../actions/selectItem.i18n.json | 5 +++- .../actions/splitJoinTag.i18n.json | 4 +++- .../actions/toggleComment.i18n.json | 4 +++- .../actions/updateImageSize.i18n.json | 4 +++- .../actions/updateTag.i18n.json | 6 ++++- .../actions/wrapWithAbbreviation.i18n.json | 6 ++++- .../emmet.contribution.i18n.json | 9 ++++++- .../extensionsUtils.i18n.json | 6 +++++ .../tasks/browser/restartQuickOpen.i18n.json | 1 - .../tasks/browser/taskQuickOpen.i18n.json | 1 - .../vs_code_welcome_page.i18n.json | 18 +++++--------- .../electron-browser/welcomePage.i18n.json | 4 ++-- .../deu/extensions/git/out/commands.i18n.json | 1 + i18n/deu/extensions/git/package.i18n.json | 3 ++- i18n/deu/extensions/jake/out/main.i18n.json | 6 +++++ i18n/deu/extensions/jake/package.i18n.json | 6 +++++ .../typescript/out/utils/logger.i18n.json | 4 +++- .../config/commonEditorConfig.i18n.json | 1 - .../common/view/editorColorRegistry.i18n.json | 4 +++- .../suggest/browser/suggestWidget.i18n.json | 1 + .../markers/common/problemMatcher.i18n.json | 2 -- .../theme/common/colorRegistry.i18n.json | 19 ++++++++++++++- .../api/node/extHostTreeViews.i18n.json | 6 +++++ .../electron-browser/shell.i18n.json | 6 +---- .../electron-browser/window.i18n.json | 4 +--- .../actions/balance.i18n.json | 5 +++- .../actions/editPoints.i18n.json | 5 +++- .../actions/evaluateMath.i18n.json | 4 +++- .../actions/expandAbbreviation.i18n.json | 4 +++- .../actions/incrementDecrement.i18n.json | 9 ++++++- .../actions/matchingPair.i18n.json | 4 +++- .../actions/mergeLines.i18n.json | 4 +++- .../actions/reflectCssValue.i18n.json | 4 +++- .../actions/removeTag.i18n.json | 4 +++- .../actions/selectItem.i18n.json | 5 +++- .../actions/splitJoinTag.i18n.json | 4 +++- .../actions/toggleComment.i18n.json | 4 +++- .../actions/updateImageSize.i18n.json | 4 +++- .../actions/updateTag.i18n.json | 6 ++++- .../actions/wrapWithAbbreviation.i18n.json | 6 ++++- .../emmet.contribution.i18n.json | 9 ++++++- .../extensionsUtils.i18n.json | 6 +++++ .../tasks/browser/restartQuickOpen.i18n.json | 1 - .../tasks/browser/taskQuickOpen.i18n.json | 1 - .../vs_code_welcome_page.i18n.json | 18 +++++--------- .../electron-browser/welcomePage.i18n.json | 4 ++-- i18n/esn/extensions/jake/out/main.i18n.json | 6 +++++ i18n/esn/extensions/jake/package.i18n.json | 6 +++++ .../typescript/out/utils/logger.i18n.json | 4 +++- .../extensions/typescript/package.i18n.json | 5 +++- .../src/vs/code/electron-main/menus.i18n.json | 1 + .../config/commonEditorConfig.i18n.json | 1 - .../suggest/browser/suggestWidget.i18n.json | 1 + .../markers/common/problemMatcher.i18n.json | 2 -- .../theme/common/colorRegistry.i18n.json | 6 ++++- .../api/node/extHostTreeViews.i18n.json | 6 +++++ .../electron-browser/shell.i18n.json | 6 +---- .../electron-browser/window.i18n.json | 4 +--- .../electronDebugActions.i18n.json | 1 + .../parts/debug/node/debugAdapter.i18n.json | 1 - .../actions/balance.i18n.json | 5 +++- .../actions/editPoints.i18n.json | 5 +++- .../actions/evaluateMath.i18n.json | 4 +++- .../actions/expandAbbreviation.i18n.json | 4 +++- .../actions/incrementDecrement.i18n.json | 9 ++++++- .../actions/matchingPair.i18n.json | 4 +++- .../actions/mergeLines.i18n.json | 4 +++- .../actions/reflectCssValue.i18n.json | 4 +++- .../actions/removeTag.i18n.json | 4 +++- .../actions/selectItem.i18n.json | 5 +++- .../actions/splitJoinTag.i18n.json | 4 +++- .../actions/toggleComment.i18n.json | 4 +++- .../actions/updateImageSize.i18n.json | 4 +++- .../actions/updateTag.i18n.json | 6 ++++- .../actions/wrapWithAbbreviation.i18n.json | 6 ++++- .../emmet.contribution.i18n.json | 9 ++++++- .../extensionsUtils.i18n.json | 6 +++++ .../browser/preferencesRenderers.i18n.json | 1 + .../tasks/browser/restartQuickOpen.i18n.json | 1 - .../tasks/browser/taskQuickOpen.i18n.json | 1 - .../terminalActions.i18n.json | 4 +++- .../themes.contribution.i18n.json | 1 + .../vs_code_welcome_page.i18n.json | 20 +++++++--------- .../electron-browser/welcomePage.i18n.json | 8 ++++--- .../walkThroughPart.i18n.json | 3 ++- .../configurationEditingService.i18n.json | 1 + i18n/fra/extensions/jake/out/main.i18n.json | 6 +++++ i18n/fra/extensions/jake/package.i18n.json | 6 +++++ .../typescript/out/utils/logger.i18n.json | 4 +++- .../config/commonEditorConfig.i18n.json | 1 + .../common/view/editorColorRegistry.i18n.json | 8 ++++++- .../suggest/browser/suggestWidget.i18n.json | 1 + ...guageConfigurationExtensionPoint.i18n.json | 6 ++++- .../markers/common/problemMatcher.i18n.json | 2 -- .../theme/common/colorRegistry.i18n.json | 15 +++++++++++- .../api/node/extHostTreeViews.i18n.json | 6 +++++ .../electron-browser/shell.i18n.json | 6 +---- .../electron-browser/window.i18n.json | 4 +--- .../actions/balance.i18n.json | 5 +++- .../actions/editPoints.i18n.json | 5 +++- .../actions/evaluateMath.i18n.json | 4 +++- .../actions/expandAbbreviation.i18n.json | 4 +++- .../actions/incrementDecrement.i18n.json | 9 ++++++- .../actions/matchingPair.i18n.json | 4 +++- .../actions/mergeLines.i18n.json | 4 +++- .../actions/reflectCssValue.i18n.json | 4 +++- .../actions/removeTag.i18n.json | 4 +++- .../actions/selectItem.i18n.json | 5 +++- .../actions/splitJoinTag.i18n.json | 4 +++- .../actions/toggleComment.i18n.json | 4 +++- .../actions/updateImageSize.i18n.json | 4 +++- .../actions/updateTag.i18n.json | 6 ++++- .../actions/wrapWithAbbreviation.i18n.json | 6 ++++- .../emmet.contribution.i18n.json | 9 ++++++- .../extensionsUtils.i18n.json | 6 +++++ .../tasks/browser/restartQuickOpen.i18n.json | 1 - .../tasks/browser/taskQuickOpen.i18n.json | 1 - .../vs_code_welcome_page.i18n.json | 18 +++++--------- .../electron-browser/welcomePage.i18n.json | 4 ++-- .../ita/extensions/git/out/commands.i18n.json | 1 + i18n/ita/extensions/git/package.i18n.json | 4 +++- i18n/ita/extensions/jake/out/main.i18n.json | 6 +++++ i18n/ita/extensions/jake/package.i18n.json | 6 +++++ ...rectiveCommentCompletionProvider.i18n.json | 6 ++++- .../typescript/out/utils/logger.i18n.json | 4 +++- .../extensions/typescript/package.i18n.json | 6 ++++- .../config/commonEditorConfig.i18n.json | 1 + .../common/view/editorColorRegistry.i18n.json | 8 ++++++- .../browser/referencesWidget.i18n.json | 3 +++ .../suggest/browser/suggestWidget.i18n.json | 2 ++ ...guageConfigurationExtensionPoint.i18n.json | 6 ++++- .../markers/common/problemMatcher.i18n.json | 2 -- .../theme/common/colorRegistry.i18n.json | 24 ++++++++++++++++++- .../api/node/extHostTreeViews.i18n.json | 6 +++++ .../electron-browser/shell.i18n.json | 6 +---- .../electron-browser/window.i18n.json | 4 +--- .../actions/balance.i18n.json | 5 +++- .../actions/editPoints.i18n.json | 5 +++- .../actions/evaluateMath.i18n.json | 4 +++- .../actions/expandAbbreviation.i18n.json | 4 +++- .../actions/incrementDecrement.i18n.json | 9 ++++++- .../actions/matchingPair.i18n.json | 4 +++- .../actions/mergeLines.i18n.json | 4 +++- .../actions/reflectCssValue.i18n.json | 4 +++- .../actions/removeTag.i18n.json | 4 +++- .../actions/selectItem.i18n.json | 5 +++- .../actions/splitJoinTag.i18n.json | 4 +++- .../actions/toggleComment.i18n.json | 4 +++- .../actions/updateImageSize.i18n.json | 4 +++- .../actions/updateTag.i18n.json | 6 ++++- .../actions/wrapWithAbbreviation.i18n.json | 6 ++++- .../emmet.contribution.i18n.json | 9 ++++++- .../extensionsUtils.i18n.json | 6 +++++ .../tasks/browser/restartQuickOpen.i18n.json | 1 - .../tasks/browser/taskQuickOpen.i18n.json | 1 - .../vs_code_welcome_page.i18n.json | 18 +++++--------- .../electron-browser/welcomePage.i18n.json | 4 ++-- i18n/jpn/extensions/jake/out/main.i18n.json | 6 +++++ i18n/jpn/extensions/jake/package.i18n.json | 6 +++++ .../typescript/out/utils/logger.i18n.json | 4 +++- .../src/vs/code/electron-main/menus.i18n.json | 1 + .../config/commonEditorConfig.i18n.json | 2 +- .../suggest/browser/suggestWidget.i18n.json | 1 + ...guageConfigurationExtensionPoint.i18n.json | 5 +++- .../markers/common/problemMatcher.i18n.json | 2 -- .../theme/common/colorRegistry.i18n.json | 8 ++++++- .../api/node/extHostTreeViews.i18n.json | 6 +++++ .../electron-browser/shell.i18n.json | 6 +---- .../electron-browser/window.i18n.json | 4 +--- .../parts/debug/node/debugAdapter.i18n.json | 1 - .../actions/balance.i18n.json | 5 +++- .../actions/editPoints.i18n.json | 5 +++- .../actions/evaluateMath.i18n.json | 4 +++- .../actions/expandAbbreviation.i18n.json | 4 +++- .../actions/incrementDecrement.i18n.json | 9 ++++++- .../actions/matchingPair.i18n.json | 4 +++- .../actions/mergeLines.i18n.json | 4 +++- .../actions/reflectCssValue.i18n.json | 4 +++- .../actions/removeTag.i18n.json | 4 +++- .../actions/selectItem.i18n.json | 5 +++- .../actions/splitJoinTag.i18n.json | 4 +++- .../actions/toggleComment.i18n.json | 4 +++- .../actions/updateImageSize.i18n.json | 4 +++- .../actions/updateTag.i18n.json | 6 ++++- .../actions/wrapWithAbbreviation.i18n.json | 6 ++++- .../emmet.contribution.i18n.json | 9 ++++++- .../extensionsUtils.i18n.json | 6 +++++ .../tasks/browser/restartQuickOpen.i18n.json | 1 - .../tasks/browser/taskQuickOpen.i18n.json | 1 - .../vs_code_welcome_page.i18n.json | 18 +++++--------- .../electron-browser/welcomePage.i18n.json | 4 ++-- .../walkThroughPart.i18n.json | 3 ++- i18n/kor/extensions/jake/out/main.i18n.json | 6 +++++ i18n/kor/extensions/jake/package.i18n.json | 6 +++++ .../typescript/out/utils/logger.i18n.json | 4 +++- .../suggest/browser/suggestWidget.i18n.json | 1 + .../markers/common/problemMatcher.i18n.json | 2 -- .../theme/common/colorRegistry.i18n.json | 6 ++++- .../api/node/extHostTreeViews.i18n.json | 6 +++++ .../electron-browser/shell.i18n.json | 6 +---- .../electron-browser/window.i18n.json | 4 +--- .../actions/balance.i18n.json | 5 +++- .../actions/editPoints.i18n.json | 5 +++- .../actions/evaluateMath.i18n.json | 4 +++- .../actions/expandAbbreviation.i18n.json | 4 +++- .../actions/incrementDecrement.i18n.json | 9 ++++++- .../actions/matchingPair.i18n.json | 4 +++- .../actions/mergeLines.i18n.json | 4 +++- .../actions/reflectCssValue.i18n.json | 4 +++- .../actions/removeTag.i18n.json | 4 +++- .../actions/selectItem.i18n.json | 5 +++- .../actions/splitJoinTag.i18n.json | 4 +++- .../actions/toggleComment.i18n.json | 4 +++- .../actions/updateImageSize.i18n.json | 4 +++- .../actions/updateTag.i18n.json | 6 ++++- .../actions/wrapWithAbbreviation.i18n.json | 6 ++++- .../emmet.contribution.i18n.json | 9 ++++++- .../extensionsUtils.i18n.json | 6 +++++ .../tasks/browser/restartQuickOpen.i18n.json | 1 - .../tasks/browser/taskQuickOpen.i18n.json | 1 - .../vs_code_welcome_page.i18n.json | 18 +++++--------- .../electron-browser/welcomePage.i18n.json | 4 ++-- i18n/rus/extensions/jake/out/main.i18n.json | 6 +++++ i18n/rus/extensions/jake/package.i18n.json | 6 +++++ .../typescript/out/utils/logger.i18n.json | 4 +++- .../suggest/browser/suggestWidget.i18n.json | 1 + .../markers/common/problemMatcher.i18n.json | 2 -- .../theme/common/colorRegistry.i18n.json | 18 +++++++++++++- .../api/node/extHostTreeViews.i18n.json | 6 +++++ .../electron-browser/shell.i18n.json | 6 +---- .../electron-browser/window.i18n.json | 4 +--- .../actions/balance.i18n.json | 5 +++- .../actions/editPoints.i18n.json | 5 +++- .../actions/evaluateMath.i18n.json | 4 +++- .../actions/expandAbbreviation.i18n.json | 4 +++- .../actions/incrementDecrement.i18n.json | 9 ++++++- .../actions/matchingPair.i18n.json | 4 +++- .../actions/mergeLines.i18n.json | 4 +++- .../actions/reflectCssValue.i18n.json | 4 +++- .../actions/removeTag.i18n.json | 4 +++- .../actions/selectItem.i18n.json | 5 +++- .../actions/splitJoinTag.i18n.json | 4 +++- .../actions/toggleComment.i18n.json | 4 +++- .../actions/updateImageSize.i18n.json | 4 +++- .../actions/updateTag.i18n.json | 6 ++++- .../actions/wrapWithAbbreviation.i18n.json | 6 ++++- .../emmet.contribution.i18n.json | 9 ++++++- .../extensionsUtils.i18n.json | 6 +++++ .../tasks/browser/restartQuickOpen.i18n.json | 1 - .../tasks/browser/taskQuickOpen.i18n.json | 1 - .../vs_code_welcome_page.i18n.json | 18 +++++--------- .../electron-browser/welcomePage.i18n.json | 4 ++-- 332 files changed, 1192 insertions(+), 446 deletions(-) create mode 100644 i18n/chs/extensions/jake/out/main.i18n.json create mode 100644 i18n/chs/extensions/jake/package.i18n.json create mode 100644 i18n/chs/src/vs/workbench/api/node/extHostTreeViews.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json create mode 100644 i18n/cht/extensions/jake/out/main.i18n.json create mode 100644 i18n/cht/extensions/jake/package.i18n.json create mode 100644 i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json create mode 100644 i18n/deu/extensions/jake/out/main.i18n.json create mode 100644 i18n/deu/extensions/jake/package.i18n.json create mode 100644 i18n/deu/src/vs/workbench/api/node/extHostTreeViews.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json create mode 100644 i18n/esn/extensions/jake/out/main.i18n.json create mode 100644 i18n/esn/extensions/jake/package.i18n.json create mode 100644 i18n/esn/src/vs/workbench/api/node/extHostTreeViews.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json create mode 100644 i18n/fra/extensions/jake/out/main.i18n.json create mode 100644 i18n/fra/extensions/jake/package.i18n.json create mode 100644 i18n/fra/src/vs/workbench/api/node/extHostTreeViews.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json create mode 100644 i18n/ita/extensions/jake/out/main.i18n.json create mode 100644 i18n/ita/extensions/jake/package.i18n.json create mode 100644 i18n/ita/src/vs/workbench/api/node/extHostTreeViews.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json create mode 100644 i18n/jpn/extensions/jake/out/main.i18n.json create mode 100644 i18n/jpn/extensions/jake/package.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/api/node/extHostTreeViews.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json create mode 100644 i18n/kor/extensions/jake/out/main.i18n.json create mode 100644 i18n/kor/extensions/jake/package.i18n.json create mode 100644 i18n/kor/src/vs/workbench/api/node/extHostTreeViews.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json create mode 100644 i18n/rus/extensions/jake/out/main.i18n.json create mode 100644 i18n/rus/extensions/jake/package.i18n.json create mode 100644 i18n/rus/src/vs/workbench/api/node/extHostTreeViews.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json diff --git a/i18n/chs/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/chs/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json index 214156f8972a3..6ad910135a07c 100644 --- a/i18n/chs/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json +++ b/i18n/chs/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -6,7 +6,7 @@ { "activeEditorShort": "例如 myFile.txt", "activeEditorMedium": "e.g. myFolder/myFile.txt", - "activeEditorLong": "e.g. /Users/Development/myProject/myFolder/myFile.txt", + "activeEditorLong": "例如 /Users/Development/myProject/myFolder/myFile.txt", "rootName": "例如 myProject", "rootPath": "例如 /Users/Development/myProject", "appName": "例如 VS Code", diff --git a/i18n/chs/extensions/git/out/main.i18n.json b/i18n/chs/extensions/git/out/main.i18n.json index 266c6a1a3e56a..7b6c6f37d1f62 100644 --- a/i18n/chs/extensions/git/out/main.i18n.json +++ b/i18n/chs/extensions/git/out/main.i18n.json @@ -7,5 +7,5 @@ "using git": "使用 {1} 中的 GIT {0}", "updateGit": "更新 GIT", "neverShowAgain": "不再显示", - "git20": "似乎已安装 GIT {0}。Code 非常适合 GIT >= 2" + "git20": "你似乎已安装 Git {0}。Code 和 Git 版本 >=2 一起工作最佳" } \ No newline at end of file diff --git a/i18n/chs/extensions/git/out/scmProvider.i18n.json b/i18n/chs/extensions/git/out/scmProvider.i18n.json index 7fded37328a95..c52199b46c1c4 100644 --- a/i18n/chs/extensions/git/out/scmProvider.i18n.json +++ b/i18n/chs/extensions/git/out/scmProvider.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "commit": "Commit" + "commit": "提交" } \ No newline at end of file diff --git a/i18n/chs/extensions/git/package.i18n.json b/i18n/chs/extensions/git/package.i18n.json index 3ae1cbfe222c9..bed9f4de89c90 100644 --- a/i18n/chs/extensions/git/package.i18n.json +++ b/i18n/chs/extensions/git/package.i18n.json @@ -20,9 +20,9 @@ "command.cleanAll": "放弃所有更改", "command.commit": "Commit", "command.commitStaged": "提交已暂存文件", - "command.commitStagedSigned": "提交暂存数据(已签收)", + "command.commitStagedSigned": "提交已暂存文件(已签名)", "command.commitAll": "全部提交", - "command.commitAllSigned": "提交所有数据(已签收)", + "command.commitAllSigned": "全部提交(已签名)", "command.undoCommit": "撤消上次提交", "command.checkout": "签出到...", "command.branch": "创建分支...", @@ -34,11 +34,11 @@ "command.publish": "发布", "command.showOutput": "显示 GIT 输出", "config.enabled": "是否已启用 GIT", - "config.path": "可执行 GIT 的路径", + "config.path": "Git 可执行文件路径", "config.autorefresh": "是否已启用自动刷新", "config.autofetch": "是否启用了自动提取", "config.enableLongCommitWarning": "是否针对长段提交消息进行警告", - "config.confirmSync": "同步 GIT 存储库前请先进行确认", + "config.confirmSync": "同步 Git 存储库前进行确认", "config.countBadge": "控制 Git 徽章计数器。“all”计算所有更改。“tracked”只计算跟踪的更改。“off”关闭此功能。", "config.checkoutType": "控制运行“签出到...”时列出的分支的类型。“all”显示所有 refs,“local”只显示本地分支,“tags”只显示标签,“remote”只显示远程分支。", "config.ignoreLegacyWarning": "忽略旧版 Git 警告", diff --git a/i18n/chs/extensions/jake/out/main.i18n.json b/i18n/chs/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/extensions/jake/out/main.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/extensions/jake/package.i18n.json b/i18n/chs/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/extensions/jake/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/extensions/typescript/out/utils/logger.i18n.json b/i18n/chs/extensions/typescript/out/utils/logger.i18n.json index 8b6ad71cd4e6d..bc738f43d0c37 100644 --- a/i18n/chs/extensions/typescript/out/utils/logger.i18n.json +++ b/i18n/chs/extensions/typescript/out/utils/logger.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/chs/extensions/typescript/package.i18n.json b/i18n/chs/extensions/typescript/package.i18n.json index 5e077ba8d0229..7d185d9e36eed 100644 --- a/i18n/chs/extensions/typescript/package.i18n.json +++ b/i18n/chs/extensions/typescript/package.i18n.json @@ -33,10 +33,13 @@ "javascript.validate.enable": "启用/禁用 JavaScript 验证。", "typescript.goToProjectConfig.title": "转到项目配置", "javascript.goToProjectConfig.title": "转到项目配置", + "javascript.referencesCodeLens.enabled": "启用/禁用在 JavaScript 文件中引用 CodeLens。", + "typescript.referencesCodeLens.enabled": "启用/禁用在 TypeScript 文件中引用 CodeLens。要求 TypeScript >= 2.0.6。", "typescript.implementationsCodeLens.enabled": "启用/禁用实现 CodeLens。要求 TypeScript >= 2.2.0。", "typescript.openTsServerLog.title": "打开 TS 服务器日志", "typescript.selectTypeScriptVersion.title": "选择 TypeScript 版本", "jsDocCompletion.enabled": "启用/禁用自动 JSDoc 注释", "javascript.implicitProjectConfig.checkJs": "启用/禁用 JavaScript 文件的语义检查。现有的 jsconfig.json 或\n tsconfig.json 文件会覆盖此设置。要求 TypeScript >=2.3.1。", - "typescript.check.npmIsInstalled": "检查是否安装了 NPM 以进行自动 typings 获取" + "typescript.check.npmIsInstalled": "检查是否安装了 NPM 以进行自动 typings 获取", + "javascript.nameSuggestions": "启用/禁用在 JavaScript 建议列表中包含文件中的唯一名称。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/chs/src/vs/base/common/jsonErrorMessages.i18n.json index a8dcb4d10201f..0400ef47d7ca6 100644 --- a/i18n/chs/src/vs/base/common/jsonErrorMessages.i18n.json +++ b/i18n/chs/src/vs/base/common/jsonErrorMessages.i18n.json @@ -12,5 +12,5 @@ "error.commaExpected": "需要逗号", "error.closeBraceExpected": "需要右大括号", "error.closeBracketExpected": "需要右括号", - "error.endOfFileExpected": "预期的文件结尾" + "error.endOfFileExpected": "需要文件结尾(EOF)" } \ No newline at end of file diff --git a/i18n/chs/src/vs/code/electron-main/menus.i18n.json b/i18n/chs/src/vs/code/electron-main/menus.i18n.json index d2d3d4ed79668..16b5dc1479aca 100644 --- a/i18n/chs/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/chs/src/vs/code/electron-main/menus.i18n.json @@ -143,6 +143,7 @@ "miAccessibilityOptions": "辅助功能选项(&&O)", "miReportIssues": "报告问题(&&I)", "miWelcome": "欢迎使用(&&W)", + "miInteractivePlayground": "交互式演练场(&&I)", "miDocumentation": "文档(&&D)", "miReleaseNotes": "发行说明(&&R)", "miKeyboardShortcuts": "键盘快捷方式参考(&&K)", diff --git a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json index 97e41cde2c5c7..ad55e59f4eb4f 100644 --- a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "控制字体粗细。", "fontSize": "以像素为单位控制字号。", "lineHeight": "控制行高。使用 0 通过字号计算行高。", + "letterSpacing": "以像素为单位控制字符间距。", "lineNumbers": "控制行号的显示。可能的值为“开”、“关”和“相对”。“相对”将显示从当前光标位置开始计数的行数。", "rulers": "显示垂直标尺的列", "wordSeparators": "执行文字相关的导航或操作时将用作文字分隔符的字符", @@ -26,6 +27,7 @@ "wordWrap.on": "将在视区宽度处换行。", "wordWrap.wordWrapColumn": "将在 \"editor.wordWrapColumn\" 处换行。", "wordWrap.bounded": "将在最小视区和 \"editor.wordWrapColumn\" 处换行。", + "wordWrap": "控制折行方式。可以选择: - “off” (禁用折行), - “on” (视区折行), - “wordWrapColumn”(在“editor.wordWrapColumn”处折行)或 - “bounded”(在视区与“editor.wordWrapColumn”两者的较小者处折行)。", "wordWrapColumn": "在 \"editor.wordWrap\" 为 \"wordWrapColumn\" 或 \"bounded\" 时控制编辑器列的换行。", "wrappingIndent": "控制换行的行的缩进。可以是\\\\\"none\\\\\"、 \\\\\"same\\\\\" 或 \\\\\"indent\\\\\"。", "mouseWheelScrollSensitivity": "要对鼠标滚轮滚动事件的 \"deltaX\" 和 \"deltaY\" 使用的乘数 ", @@ -61,7 +63,6 @@ "renderLineHighlight": "控制编辑器应如何呈现当前行突出显示,可能为“无”、“装订线”、“线”和“全部”。", "codeLens": "控制编辑器是否显示代码滤镜", "folding": "控制编辑器是否启用代码折叠功能", - "hideFoldIcons": "控制是否自动隐藏导航线上的折叠图标。", "matchBrackets": "当选择其中一项时,将突出显示匹配的括号。", "glyphMargin": "控制编辑器是否应呈现垂直字形边距。字形边距最常用于调试。", "useTabStops": "在制表位后插入和删除空格", diff --git a/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index ae160d592358b..70e89645ee3d5 100644 --- a/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -16,9 +16,12 @@ "peekViewTitleInfoForeground": "速览视图标题信息颜色。", "peekViewBorder": "速览视图边框和箭头颜色。", "peekViewResultsBackground": "速览视图结果列表背景颜色。", + "peekViewResultsMatchForeground": "速览视图结果列表中行节点的前景色。", + "peekViewResultsFileForeground": "速览视图结果列表中文件节点的前景色。", "peekViewResultsSelectionBackground": "速览视图结果列表中所选条目的背景颜色。", "peekViewResultsSelectionForeground": "速览视图结果列表中所选条目的前景色。", "peekViewEditorBackground": "速览视图编辑器背景颜色。", + "peekViewEditorGutterBackground": "速览视图编辑器中导航线的背景颜色。", "peekViewResultsMatchHighlight": "在速览视图结果列表中匹配突出显示颜色。", "peekViewEditorMatchHighlight": "在速览视图编辑器中匹配突出显示颜色。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 215e790d4d502..4e1a0a30e42b6 100644 --- a/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,8 +9,10 @@ "editorSuggestWidgetForeground": "建议小组件的前景颜色。", "editorSuggestWidgetSelectedBackground": "建议小组件中被选择条目的背景颜色。", "editorSuggestWidgetHighlightForeground": "建议小组件中匹配内容的高亮颜色。", + "readMore": "阅读更多...{0}", "suggestionWithDetailsAriaLabel": "{0}(建议)具有详细信息", "suggestionAriaLabel": "{0},建议", + "readLess": "阅读简略信息...{0}", "suggestWidget.loading": "正在加载...", "suggestWidget.noSuggestions": "无建议。", "suggestionAriaAccepted": "{0},已接受", diff --git a/i18n/chs/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/chs/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index f588a8a158692..a4b09b5b447fa 100644 --- a/i18n/chs/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/chs/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,9 @@ "schema.brackets": "定义增加和减少缩进的括号。", "schema.autoClosingPairs": "定义括号对。当输入左方括号时,将自动插入右方括号。", "schema.autoClosingPairs.notIn": "定义禁用了自动配对的作用域列表。", - "schema.surroundingPairs": "定义可用于包围所选字符串的括号对。" + "schema.surroundingPairs": "定义可用于包围所选字符串的括号对。", + "schema.wordPattern": "此语言的文本定义。", + "schema.wordPattern.pattern": "用于匹配文本的正则表达式模式。", + "schema.wordPattern.flags": "用于匹配文本的正则表达式标志。", + "schema.wordPattern.flags.errorMessage": "必须匹配模式“/^([gimuy]+)$/”。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json index a28f091a27bc4..7dc0d66e0aa6e 100644 --- a/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,7 +34,6 @@ "ProblemMatcherParser.noValidIdentifier": "错误: 模式属性 {0} 是无效的模式变量名。", "ProblemMatcherParser.problemPattern.watchingMatcher": "问题匹配程序必须定义监视的开始模式和结束模式。", "ProblemMatcherParser.invalidRegexp": "错误: 字符串 {0} 不是有效的正则表达式。\n", - "WatchingPatternSchema.regexp": "用于检测监视任务的开始和结束的正则表达式。", "WatchingPatternSchema.file": "文件名的匹配组索引。可以省略。", "PatternTypeSchema.name": "所提供或预定义模式的名称", "PatternTypeSchema.description": "问题模式或者所提供或预定义问题模式的名称。如果已指定基准,则可以省略。", @@ -46,7 +45,6 @@ "ProblemMatcherSchema.watching.activeOnStart": "如果设置为 true,则当任务开始时观察程序处于活动模式。这相当于发出与 beginPattern 匹配的行。", "ProblemMatcherSchema.watching.beginsPattern": "如果在输出内匹配,则在监视任务开始时会发出信号。", "ProblemMatcherSchema.watching.endsPattern": "如果在输出内匹配,则在监视任务结束时会发出信号。", - "ProblemMatcherSchema.watching": "用于跟踪观看模式开始和结束的模式。", "LegacyProblemMatcherSchema.watchedBegin.deprecated": "此属性已弃用。请改用观看属性。", "LegacyProblemMatcherSchema.watchedBegin": "一个正则表达式,发出受监视任务开始执行(通过文件监视触发)的信号。", "LegacyProblemMatcherSchema.watchedEnd.deprecated": "此属性已弃用。请改用观看属性。", diff --git a/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json index 6e56d819256cd..0af4fc2114c68 100644 --- a/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -16,6 +16,7 @@ "textSeparatorForeground": "文字分隔符的颜色。", "textLinkForeground": "文本中链接的前景色。", "textLinkActiveForeground": "文本中活动链接的前景色。", + "textPreformatForeground": "预格式化文本段的前景色。", "textBlockQuoteBackground": "文本中块引用的背景颜色。", "textBlockQuoteBorder": "文本中块引用的边框颜色。", "textCodeBlockBackground": "文本中代码块的背景颜色。", @@ -35,10 +36,13 @@ "dropdownForeground": "下拉列表前景色。", "dropdownBorder": "下拉列表边框。", "listFocusBackground": "焦点项在列表或树活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。", + "listFocusForeground": "焦点项在列表或树活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。", "listActiveSelectionBackground": "已选项在列表或树活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。", "listActiveSelectionForeground": "已选项在列表或树活动时的前景颜色。活动的列表或树具有键盘焦点,非活动的没有。", "listInactiveSelectionBackground": "已选项在列表或树非活动时的背景颜色。活动的列表或树具有键盘焦点,非活动的没有。", + "listInactiveSelectionForeground": "已选项在列表或树非活动时的前景颜色。活动的列表或树具有键盘焦点,非活动的没有。", "listHoverBackground": "使用鼠标移动项目时,列表或树的背景颜色。", + "listHoverForeground": "鼠标在项目上悬停时,列表或树的前景颜色。", "listDropBackground": "使用鼠标移动项目时,列表或树进行拖放的背景颜色。", "highlight": "在列表或树中搜索时,其中匹配内容的高亮颜色。", "pickerGroupForeground": "快速选取器分组标签的颜色。", @@ -46,6 +50,8 @@ "buttonForeground": "按钮前景色。", "buttonBackground": "按钮背景色。", "buttonHoverBackground": "按钮在悬停时的背景颜色。", + "badgeBackground": "Badge 背景色。Badge 是小型的信息标签,如表示搜索结果数量的标签。", + "badgeForeground": "Badge 前景色。Badge 是小型的信息标签,如表示搜索结果数量的标签。", "scrollbarShadow": "表示视图被滚动的滚动条阴影。", "scrollbarSliderBackground": "滑块的背景颜色。", "scrollbarSliderHoverBackground": "滑块在悬停时的背景颜色。", @@ -54,14 +60,19 @@ "editorBackground": "编辑器背景颜色。", "editorForeground": "编辑器默认前景色。", "editorWidgetBackground": "编辑器组件(如查找/替换)背景颜色。", + "editorWidgetBorder": "编辑器小组件的边框颜色。", "editorSelection": "编辑器所选内容的颜色。", "editorInactiveSelection": "非活动编辑器中所选内容的颜色。", "editorSelectionHighlight": "与所选内容具有相同内容的区域颜色。", "editorFindMatch": "当前搜索匹配项的颜色。", "findMatchHighlight": "其他搜索匹配项的颜色。", "findRangeHighlight": "限制搜索的范围的颜色。", - "hoverHighlight": "在显示软键盘的字下方突出显示。", - "hoverBackground": "编辑器软键盘背景色。", + "hoverHighlight": "悬停提示显示时文本底下的高亮颜色。", + "hoverBackground": "编辑器悬停提示的背景颜色。", "hoverBorder": "编辑器软键盘边框颜色。", - "activeLinkForeground": "活动链接颜色。" + "activeLinkForeground": "活动链接颜色。", + "diffEditorInserted": "已插入文本的背景颜色。", + "diffEditorRemoved": "被删除文本的背景颜色。", + "diffEditorInsertedOutline": "插入的文本的轮廓颜色。", + "diffEditorRemovedOutline": "被删除文本的轮廓颜色。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/chs/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/common/theme.i18n.json b/i18n/chs/src/vs/workbench/common/theme.i18n.json index d268b3ff22406..64c51b8e74c09 100644 --- a/i18n/chs/src/vs/workbench/common/theme.i18n.json +++ b/i18n/chs/src/vs/workbench/common/theme.i18n.json @@ -10,8 +10,10 @@ "tabActiveEditorGroupActiveForeground": "活动组中活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", "tabInactiveEditorGroupActiveForeground": "活动组中非活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", "editorGroupBackground": "编辑器组的背景颜色。编辑器组是编辑器的容器。此颜色在拖动编辑器组时显示。", + "tabsContainerBackground": "启用选项卡时编辑器组标题的背景颜色。编辑器组是编辑器的容器。", "editorGroupHeaderBackground": "禁用选项卡时编辑器组标题的背景颜色。编辑器组是编辑器的容器。", "editorGroupBorder": "将多个编辑器组彼此分隔开的颜色。编辑器组是编辑器的容器。", + "editorDragAndDropBackground": "拖动编辑器时的背景颜色。此颜色应有透明度,以便编辑器内容能透过背景。", "panelBackground": "面板的背景色。面板显示在编辑器区域下方,可包含输出和集成终端等视图。", "panelBorder": "分隔到编辑器的顶部面板边框色。面板显示在编辑器区域下方,可包含输出和集成终端等视图。", "panelActiveTitleForeground": "活动面板的标题颜色。面板显示在编辑器区域下方,并包含输出和集成终端等视图。", @@ -26,6 +28,7 @@ "statusBarProminentItemHoverBackground": "状态栏突出显示项在悬停时的背景颜色。突出显示项比状态栏中的其他条目更显眼,表明其重要性更高。状态栏显示在窗口底部。", "activityBarBackground": "活动栏背景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "activityBarForeground": "活动栏前景色(例如用于图标)。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", + "activityBarDragAndDropBackground": "活动栏项在被拖放时的反馈颜色。此颜色应有透明度,以便活动栏条目能透过此颜色。活动栏显示在最左侧或最右侧,并允许在侧边栏视图之间切换。", "activityBarBadgeBackground": "活动通知徽章背景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "activityBarBadgeForeground": "活动通知徽章前景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "sideBarBackground": "侧边栏背景色。侧边栏是资源管理器和搜索等视图的容器。", diff --git a/i18n/chs/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/shell.i18n.json index 3af5d3e32a63b..3f8eff44c3f4b 100644 --- a/i18n/chs/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/chs/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "不建议将 Code 作为“根”运行。", - "prof.message": "成功创建的配置文件。", - "prof.detail": "请创建问题并手动附加以下文件:\n{0}", - "prof.restartAndFileIssue": "创建问题并重启", - "prof.restart": "重启" + "runningAsRoot": "不建议将 Code 作为“根”运行。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/electron-browser/window.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/window.i18n.json index 365d467f27081..0f5f23325d4e9 100644 --- a/i18n/chs/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/chs/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "粘贴", "selectAll": "全选", "confirmOpen": "是否确定要打开 {0} 个文件夹?", - "confirmOpenButton": "打开(&&O)...", - "developer": "开发者", - "file": "文件" + "confirmOpenButton": "打开(&&O)..." } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json index 3cd5741027e2f..776abd849a77e 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -24,7 +24,7 @@ "vscode.extension.contributes.debuggers.osx.runtime": "用于 OSX 的运行时。", "vscode.extension.contributes.debuggers.linux": "Linux 特定的设置。", "vscode.extension.contributes.debuggers.linux.runtime": "用于 Linux 的运行时。", - "vscode.extension.contributes.breakpoints": "贡献断电。", + "vscode.extension.contributes.breakpoints": "添加断点。", "vscode.extension.contributes.breakpoints.language": "对此语言允许断点。", "app.launch.json.title": "启动", "app.launch.json.version": "此文件格式的版本。", diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index b02aea13f1dbe..83ff9579591d7 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "复制值", "copy": "复制", + "copyAll": "全部复制", "copyStackTrace": "复制调用堆栈" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 54243f83ce323..c322b5a660a56 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,7 +7,6 @@ "debugAdapterBinNotFound": "调试适配器可执行的“{0}”不存在。", "debugAdapterCannotDetermineExecutable": "无法确定调试适配器“{0}”的可执行文件。", "debugType": "配置类型。", - "debugTypeNotRecognised": "无法识别此调试类型。确保已经安装并启用相应的调试扩展。", "node2NotSupported": "不再支持 \"node2\",改用 \"node\",并将 \"protocol\" 属性设为 \"inspector\"。", "debugName": "配置名称;在启动配置下拉菜单中显示。", "debugRequest": "请求配置类型。可以是“启动”或“附加”。", diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json index 8b6ad71cd4e6d..344b7a80602e1 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "balanceInward": "Emmet: 平衡(向内)", + "balanceOutward": "Emmet: 平衡(向外)" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index 8b6ad71cd4e6d..87fec1a103c22 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "previousEditPoint": "Emmet: 上一编辑点", + "nextEditPoint": "Emmet: 下一编辑点" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json index 8b6ad71cd4e6d..0598c67b46ee4 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "evaluateMathExpression": "Emmet: 评估数学表达式" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json index 8b6ad71cd4e6d..dcef9178c36c7 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "expandAbbreviationAction": "Emmet: 展开缩写" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json index 8b6ad71cd4e6d..403f855e5eba5 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "incrementNumberByOneTenth": "Emmet: 以 0.1 为增量", + "incrementNumberByOne": "Emmet: 以 1 为增量", + "incrementNumberByTen": "Emmet: 以 10 为增量", + "decrementNumberByOneTenth": "Emmet: 以 0.1 为减量", + "decrementNumberByOne": "Emmet: 以 1 为减量", + "decrementNumberByTen": "Emmet: 以 10 为减量" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json index 8b6ad71cd4e6d..bb3ef016208fc 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "matchingPair": "Emmet: 转到匹配对" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json index 8b6ad71cd4e6d..8548113b66b02 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "mergeLines": "Emmet: 合并行" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json index 8b6ad71cd4e6d..1dcfdd7b85ce9 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "reflectCSSValue": "Emmet: 反射 CSS 值" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json index 8b6ad71cd4e6d..b58d42bcafefb 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "removeTag": "Emmet: 删除标记" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json index 8b6ad71cd4e6d..6d307aadabf11 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "selectPreviousItem": "Emmet: 选择上一项", + "selectNextItem": "Emmet: 选择下一项" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json index 8b6ad71cd4e6d..5796a0dcab8c5 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "splitJoinTag": "Emmet: 分离/联接标记" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json index 8b6ad71cd4e6d..ecb3f893e89d1 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "toggleComment": "Emmet: 切换注释" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json index 8b6ad71cd4e6d..c5d6fd7b350db 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateImageSize": "Emmet: 更新映像大小" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json index 8b6ad71cd4e6d..486e5397c4bc5 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateTag": "Emmet: 更新标记", + "enterTag": "输入标记", + "tag": "标记" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json index 8b6ad71cd4e6d..dbca7bf9016be 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "wrapWithAbbreviationAction": "Emmet: 使用缩写进行包装", + "enterAbbreviation": "输入缩写", + "abbreviation": "缩写" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 8b6ad71cd4e6d..6a402e79e1e6b 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "启用后,按 TAB 键时,将展开 Emmet 缩写。", + "emmetPreferences": "用于修改 Emmet 的某些操作和解决程序的首选项。", + "emmetSyntaxProfiles": "为指定的语法定义配置文件或使用带有特定规则的配置文件。", + "emmetExclude": "emmet 缩写不应在其中展开的语言数组。", + "emmetExtensionsPath": "转至包含 Emmet 配置文件、片段和首选项的文件的路径" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 7ceecf29ccc98..ba343731820b7 100644 --- a/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -24,7 +24,7 @@ "files.autoSave.onFocusChange": "编辑器失去焦点时自动保存更新后的文件。", "files.autoSave.onWindowChange": "窗口失去焦点时自动保存更新后的文件。", "autoSave": "控制已更新文件的自动保存。接受的值:“{0}”、\"{1}”、“{2}”(编辑器失去焦点)、“{3}”(窗口失去焦点)。如果设置为“{4}”,则可在 \"files.autoSaveDelay\" 中配置延迟。", - "autoSaveDelay": "控制延迟(以秒为单位),在该延迟后将自动保存更新后的文件。仅在 \"files.autoSave'\" 设置为“{0}”时适用。", + "autoSaveDelay": "控制在多少毫秒后自动保存更改过的文件。仅在“files.autoSave”设置为“{0}”时适用。", "watcherExclude": "配置文件路径的 glob 模式以从文件监视排除。更改此设置要求重启。如果在启动时遇到 Code 消耗大量 CPU 时间,则可以排除大型文件夹以减少初始加载。", "hotExit.off": "禁用热退出。", "hotExit.onExit": "应用程序关闭时将触发热退出。在 Windows/Linux 上关闭最后一个窗口或触发 workbench.action.quit 命令(命令托盘、键绑定、菜单)会引起应用程序关闭。下次启动时将还原所有已备份的窗口。", diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 4cefcb62c6fa4..fe715f38bb462 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "无法写入设置。请更正文件中的错误/警告,然后重试。", "editTtile": "编辑", "replaceDefaultValue": "在设置中替换", "copyDefaultValue": "复制到设置", diff --git a/i18n/chs/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/chs/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index 66f5e523f6b1f..cce9767d1ac59 100644 --- a/i18n/chs/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,5 +6,7 @@ { "searchMatches": "已找到 {0} 个匹配项", "searchMatch": "已找到 {0} 个匹配项", - "fileMatchAriaLabel": "文件夹 {2} 的文件 {1} 中有 {0} 个匹配项,搜索结果" + "fileMatchAriaLabel": "文件夹 {2} 的文件 {1} 中有 {0} 个匹配项,搜索结果", + "replacePreviewResultAria": "在第 {2} 列替换词组 {0} 为 {1},同行文本为 {3}", + "searchResultAria": "在第 {1} 列找到词组 {0},同行文本为 {2}" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index 0fb0ed162d404..5ddd907a1c159 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0},任务", "tasksAriaLabel": "键入要重启的任务的名称", "noTasksMatching": "没有匹配的任务", "noTasksFound": "没有发现要重启的任务" diff --git a/i18n/chs/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index fd9dbffc710ab..9094587319afa 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0},任务", "tasksAriaLabel": "键入要运行的任务的名称", "noTasksMatching": "没有匹配的任务", "noTasksFound": "找不到任务" diff --git a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index a90f5c8220cd2..3b09b277be3c4 100644 --- a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -26,5 +26,7 @@ "workbench.action.terminal.scrollUp": "向上滚动(行)", "workbench.action.terminal.scrollUpPage": "向上滚动(页)", "workbench.action.terminal.scrollToTop": "滚动到顶部", - "workbench.action.terminal.clear": "清除" + "workbench.action.terminal.clear": "清除", + "workbench.action.terminal.allowWorkspaceShell": "允许配置工作区 Shell", + "workbench.action.terminal.disallowWorkspaceShell": "禁止配置工作区 Shell" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index ea901c652ca61..7a4782c776259 100644 --- a/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,6 +6,7 @@ { "selectTheme.label": "颜色主题", "installColorThemes": "安装其他颜色主题...", + "themes.selectTheme": "选择颜色主题(按上下箭头键预览)", "selectIconTheme.label": "文件图标主题", "installIconThemes": "安装其他文件图标主题...", "noIconThemeLabel": "无", diff --git a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index d72b1788e1039..3b9d1ffa9caa8 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,27 +11,20 @@ "welcomePage.openFolder": "打开文件夹...", "welcomePage.cloneGitRepository": "克隆 GIT 存储库...", "welcomePage.recent": "最近", + "welcomePage.moreRecent": "更多...", "welcomePage.noRecentFolders": "无最近使用文件夹", "welcomePage.help": "帮助", - "welcomePage.productDocumentation": "产品文档", "welcomePage.introductoryVideos": "入门视频", - "welcomePage.keybindingsReference": "键盘快捷方式参考", + "welcomePage.productDocumentation": "产品文档", "welcomePage.gitHubRepository": "GitHub 存储库", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "启动时显示欢迎页", + "welcomePage.customize": "自定义", "welcomePage.installKeymapDescription": "安装键盘快捷方式", - "welcomePage.installKeymap": "安装 {0}、{1}、{2} 和 {3} 的键盘快捷方式", - "welcomePage.vim": "Vim", - "welcomePage.vimCurrent": "Vim (当前)", - "welcomePage.sublime": "Sublime", - "welcomePage.sublimeCurrent": "Sublime (当前)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom (当前)", "welcomePage.others": "其他", "welcomePage.colorTheme": "颜色主题", "welcomePage.colorThemeDescription": "使编辑器和代码呈现你喜欢的外观", - "welcomePage.configureSettings": "配置设置", - "welcomePage.configureSettingsDescription": "通过调整设置来解锁 VS Code 的全部功能", + "welcomePage.learn": "学习", "welcomePage.showCommands": "查找并运行所有命令", "welcomePage.showCommandsDescription": "从控制面板快速访问并搜索命令({0})", "welcomePage.interfaceOverview": "界面概述", @@ -39,5 +32,8 @@ "welcomePage.interactivePlayground": "交互式演练场", "welcomePage.interactivePlaygroundDescription": "在简短演练中试用编辑器的基本功能", "welcomePage.quickLinks": "快速链接", - "welcomePage.keybindingsReferenceDescription": "包含常见键盘快捷方式的可打印 PDF 文件" + "welcomePage.keybindingsReference": "键盘快捷方式参考", + "welcomePage.keybindingsReferenceDescription": "包含常见键盘快捷方式的可打印 PDF 文件", + "welcomePage.configureSettings": "配置设置", + "welcomePage.configureSettingsDescription": "通过调整设置来解锁 VS Code 的全部功能" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 71001529b3c3f..de7e3aa24d577 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,13 @@ // Do not edit this file. It is machine generated. { "welcomePage": "欢迎使用", - "welcome.title": "欢迎使用", "welcomePage.keymapAlreadyInstalled": "已安装 {0} 键盘快捷方式。", "welcomePage.willReloadAfterInstallingKeymap": "安装 {0} 键盘快捷方式后,将重载窗口。", - "ok": "确定", "welcomePage.installingKeymap": "正在安装 {0} 键盘快捷方式...", "welcomePage.keymapNotFound": "找不到 ID 为 {1} 的 {0} 键盘快捷方式。", - "cancel": "取消" + "welcome.title": "欢迎使用", + "ok": "确定", + "cancel": "取消", + "welcomePage.quickLinkBackground": "欢迎页快速链接的背景颜色。", + "welcomePage.quickLinkHoverBackground": "欢迎页快速链接被悬停时的背景颜色。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index 20d662cd6cf92..4beaf7510a919 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "walkThrough.unboundCommand": "未绑定", - "walkThrough.gitNotFound": "你的系统上似乎未安装 Git。" + "walkThrough.gitNotFound": "你的系统上似乎未安装 Git。", + "walkThrough.embeddedEditorBackground": "嵌入于交互式演练场中的编辑器的背景颜色。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/chs/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index a7a1da08c20ce..e8a58d8ccea34 100644 --- a/i18n/chs/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -6,9 +6,12 @@ { "open": "打开设置", "close": "关闭", + "saveAndRetry": "保存设置并重试", "errorUnknownKey": "无法写入配置文件(未知密钥)", "errorInvalidTarget": "无法写入到配置文件(无效的目标)", "errorNoWorkspaceOpened": "没有打开任何文件夹,因此无法写入设置。请先打开一个文件夹,然后重试。", "errorInvalidConfiguration": "无法写入设置。请打开 **用户设置** 更正文件中的错误/警告,然后重试。", - "errorInvalidConfigurationWorkspace": "无法写入设置。请打开 **工作区设置** 更正文件中的错误/警告,然后重试。" + "errorInvalidConfigurationWorkspace": "无法写入设置。请打开 **工作区设置** 更正文件中的错误/警告,然后重试。", + "errorConfigurationFileDirty": "文件已变更,因此无法写入设置。请先保存 **用户设置** 文件,然后重试。", + "errorConfigurationFileDirtyWorkspace": "文件已变更,因此无法写入设置。请先保存 **工作区设置** 文件,然后重试。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/chs/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json index 30dff55c8cad7..b21d42c25ac7b 100644 --- a/i18n/chs/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "invalid": "无效的“contributes.{0}”。应为数组。", + "invalid": "“contributes.{0}”无效。应为数组。", "invalid.empty": "“contributes.{0}”的值为空", "require.id": "属性“{0}”是必需的,其类型必须是“字符串”", "opt.extensions": "属性“{0}”可以省略,其类型必须是 \"string[]\"", diff --git a/i18n/cht/extensions/git/out/commands.i18n.json b/i18n/cht/extensions/git/out/commands.i18n.json index 2c6e65039516d..849277aa8fe49 100644 --- a/i18n/cht/extensions/git/out/commands.i18n.json +++ b/i18n/cht/extensions/git/out/commands.i18n.json @@ -18,6 +18,7 @@ "discard": "捨棄變更", "confirm discard all": "確定要捨棄所有變更嗎? 此動作無法復原!", "discardAll": "捨棄所有變更", + "no staged changes": "沒有暫存變更進行提交\n\n您希望自動暫存您所有變更並直接提交?", "yes": "是", "always": "永遠", "no changes": "沒有任何變更要認可。", diff --git a/i18n/cht/extensions/git/package.i18n.json b/i18n/cht/extensions/git/package.i18n.json index 8bab2a3d3eb7b..63f725ec18367 100644 --- a/i18n/cht/extensions/git/package.i18n.json +++ b/i18n/cht/extensions/git/package.i18n.json @@ -42,5 +42,7 @@ "config.countBadge": "控制 git 徽章計數器。[全部] 會計算所有變更。[已追蹤] 只會計算追蹤的變更。[關閉] 會將其關閉。", "config.checkoutType": "控制在執行 [簽出至...] 時,會列出那些類型的分支。[全部] 會顯示所有參考,[本機] 只會顯示本機分支,[標記] 只會顯示標記,[遠端] 只會顯示遠端分支。", "config.ignoreLegacyWarning": "略過舊的 Git 警告", - "config.ignoreLimitWarning": "當存放庫中有過多變更時,略過警告。" + "config.ignoreLimitWarning": "當存放庫中有過多變更時,略過警告。", + "config.defaultCloneDirectory": "複製 Git 存放庫的預設位置", + "config.enableSmartCommit": "無暫存變更時提交所有變更" } \ No newline at end of file diff --git a/i18n/cht/extensions/jake/out/main.i18n.json b/i18n/cht/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/jake/out/main.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/extensions/jake/package.i18n.json b/i18n/cht/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/jake/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/extensions/typescript/out/utils/logger.i18n.json b/i18n/cht/extensions/typescript/out/utils/logger.i18n.json index 8b6ad71cd4e6d..bc738f43d0c37 100644 --- a/i18n/cht/extensions/typescript/out/utils/logger.i18n.json +++ b/i18n/cht/extensions/typescript/out/utils/logger.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/cht/extensions/typescript/package.i18n.json b/i18n/cht/extensions/typescript/package.i18n.json index 40830ab8a6c8a..316f057d5a8b1 100644 --- a/i18n/cht/extensions/typescript/package.i18n.json +++ b/i18n/cht/extensions/typescript/package.i18n.json @@ -34,6 +34,7 @@ "typescript.goToProjectConfig.title": "移至專案組態", "javascript.goToProjectConfig.title": "移至專案組態", "typescript.implementationsCodeLens.enabled": "啟用/停用實作 CodeLens。需要 TypeScript >= 2.2.0。", + "typescript.openTsServerLog.title": "開啟 TS 伺服器記錄", "typescript.selectTypeScriptVersion.title": "選取 TypeScript 版本", "jsDocCompletion.enabled": "啟用/停用自動 JSDoc 註解", "javascript.implicitProjectConfig.checkJs": "啟用/停用 JavaScript 檔案的語意檢查。現有的 jsconfig.json 或 tsconfig.json 檔案會覆寫此設定。需要 TypeScript >=2.3.1。", diff --git a/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index e50c19fed7234..da6b8c6d2c009 100644 --- a/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -5,6 +5,9 @@ // Do not edit this file. It is machine generated. { "imgMeta": "{0}x{1} {2}", + "largeImageError": "因為影像太大,所以無法在編輯器中顯示。", + "resourceOpenExternalButton": "開啟影像", + "resourceOpenExternalText": " 要使用外部程式嗎?", "nativeBinaryError": "檔案為二進位檔、非常大或使用不支援的文字編碼,因此將不會顯示於編輯器中。", "sizeB": "{0}B", "sizeKB": "{0}KB", diff --git a/i18n/cht/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/cht/src/vs/base/common/jsonErrorMessages.i18n.json index 8b6ad71cd4e6d..a131a45e657ff 100644 --- a/i18n/cht/src/vs/base/common/jsonErrorMessages.i18n.json +++ b/i18n/cht/src/vs/base/common/jsonErrorMessages.i18n.json @@ -3,4 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "error.invalidSymbol": "符號無效", + "error.invalidNumberFormat": "數字格式無效", + "error.propertyNameExpected": "必須有屬性名稱", + "error.valueExpected": "必須有值", + "error.colonExpected": "必須為冒號", + "error.commaExpected": "必須為逗號", + "error.closeBraceExpected": "必須為右大括號", + "error.closeBracketExpected": "必須為右中括號", + "error.endOfFileExpected": "必須為檔案結尾" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json index 23eb66546681d..ec8f05fe3403e 100644 --- a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -62,7 +62,6 @@ "renderLineHighlight": "控制編輯器應如何轉譯目前反白的行,可能的值有 'none'、'gutter'、'line' 和 'all'。", "codeLens": "控制編輯器是否顯示程式碼濾鏡", "folding": "控制編輯器是否已啟用程式碼摺疊功能", - "hideFoldIcons": "自動隱藏摺疊圖示", "matchBrackets": "當選取某側的括號時,強調顯示另一側的配對括號。", "glyphMargin": "控制編輯器是否應轉譯垂直字符邊界。字符邊界最常用來進行偵錯。", "useTabStops": "插入和刪除接在定位停駐點後的空白字元", diff --git a/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json index 3597fc58634d1..7b011979df90c 100644 --- a/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -7,11 +7,11 @@ "lineHighlight": "目前游標位置行的反白顯示背景色彩。", "lineHighlightBorderBox": "目前游標位置行之周圍框線的背景色彩。", "rangeHighlight": "反白顯示範圍的背景色彩,例如 Quick Open 與尋找功能。", - "caret": "編輯器游標的色彩。", - "editorWhitespaces": "編輯器中空白字元的色彩。", - "editorIndentGuides": "編輯器縮排輔助線的色彩。", "editorLineNumbers": "編輯器行號的色彩。", + "editorRuler": "編輯器尺規的色彩", "editorCodeLensForeground": "編輯器程式碼濾鏡的前景色彩", "editorBracketMatchBackground": "成對括號背景色彩", - "editorBracketMatchBorder": "成對括號邊框色彩" + "editorBracketMatchBorder": "成對括號邊框色彩", + "editorOverviewRulerBorder": "預覽檢視編輯器尺規的邊框色彩.", + "editorGutter": "編輯器邊框的背景顏色,包含行號與字形圖示的邊框." } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index e0be46a962ea3..3dca8b60ce1d2 100644 --- a/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -21,6 +21,7 @@ "peekViewResultsSelectionBackground": "在預覽檢視之結果清單中選取項目時的背景色彩。", "peekViewResultsSelectionForeground": "在預覽檢視之結果清單中選取項目時的前景色彩。", "peekViewEditorBackground": "預覽檢視編輯器的背景色彩。", + "peekViewEditorGutterBackground": "預覽檢視編輯器邊框(含行號或字形圖示)的背景色彩。", "peekViewResultsMatchHighlight": "在預覽檢視編輯器中比對時的反白顯示色彩。", "peekViewEditorMatchHighlight": "預覽檢視編輯器中比對時的反白顯示色彩。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index e7251477a6ce0..28f57ee6a5fc1 100644 --- a/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,6 +9,7 @@ "editorSuggestWidgetForeground": "建議小工具的前景色彩。", "editorSuggestWidgetSelectedBackground": "建議小工具中所選項目的背景色彩。", "editorSuggestWidgetHighlightForeground": "建議小工具中相符醒目提示的色彩。", + "readMore": "進一步了解...{0}", "suggestionWithDetailsAriaLabel": "{0},建議,有詳細資料", "suggestionAriaLabel": "{0},建議", "suggestWidget.loading": "正在載入...", diff --git a/i18n/cht/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/cht/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index e62440bc202cc..13c0c141c50a6 100644 --- a/i18n/cht/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/cht/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,6 @@ "schema.brackets": "定義增加或減少縮排的括弧符號。", "schema.autoClosingPairs": "定義成對括弧。輸入左括弧時,即自動插入右括弧。", "schema.autoClosingPairs.notIn": "定義停用自動配對的範圍清單。", - "schema.surroundingPairs": "定義可用以括住所選字串的成對括弧。" + "schema.surroundingPairs": "定義可用以括住所選字串的成對括弧。", + "schema.wordPattern.flags.errorMessage": "必須符合樣式 `/^([gimuy]+)$/`" } \ No newline at end of file diff --git a/i18n/cht/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/cht/src/vs/platform/markers/common/problemMatcher.i18n.json index d924f278ad08e..cd3b3aa69fec9 100644 --- a/i18n/cht/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/cht/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,7 +34,6 @@ "ProblemMatcherParser.noValidIdentifier": "錯誤: 樣式屬性 {0} 不是有效的樣式變數名稱。", "ProblemMatcherParser.problemPattern.watchingMatcher": "問題比對器必須同時定義監控的開始模式和結束模式。", "ProblemMatcherParser.invalidRegexp": "錯誤: 字串 {0} 不是有效的規則運算式。\n", - "WatchingPatternSchema.regexp": "規則運算式,用來偵測監看工作開始或結束。", "WatchingPatternSchema.file": "檔案名稱的符合群組索引。可以省略。", "PatternTypeSchema.name": "所提供或預先定義之模式的名稱", "PatternTypeSchema.description": "問題模式或所提供或預先定義之問題模式的名稱。如有指定基底,即可發出。", @@ -46,7 +45,6 @@ "ProblemMatcherSchema.watching.activeOnStart": "如果設定為 True,監控程式在工作啟動時處於主動模式。這相當於發出符合 beginPattern 的行", "ProblemMatcherSchema.watching.beginsPattern": "如果在輸出中相符,則會指示監看工作開始。", "ProblemMatcherSchema.watching.endsPattern": "如果在輸出中相符,則會指示監看工作結束。", - "ProblemMatcherSchema.watching": "這些模式可用於從頭到尾追蹤所關注的模式。", "LegacyProblemMatcherSchema.watchedBegin.deprecated": "此屬性即將淘汰。請改用關注的屬性。", "LegacyProblemMatcherSchema.watchedBegin": "規則運算式,指示監看的工作開始執行 (透過檔案監看觸發)。", "LegacyProblemMatcherSchema.watchedEnd.deprecated": "此屬性即將淘汰。請改用關注的屬性。", diff --git a/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json index 67ff64fbd8057..85fdbbbbdf2c9 100644 --- a/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -16,6 +16,8 @@ "textSeparatorForeground": "文字分隔符號的顏色。", "textLinkForeground": "內文連結的前景色彩", "textLinkActiveForeground": "內文使用連結的前景色彩", + "textPreformatForeground": "提示及建議文字的前景色彩。", + "textBlockQuoteBorder": "引用文字的框線顏色。", "textCodeBlockBackground": "文字區塊的背景顏色。", "widgetShadow": "小工具的陰影色彩,例如編輯器中的尋找/取代。", "inputBoxBackground": "輸入方塊的背景。", @@ -51,6 +53,7 @@ "scrollbarSliderBackground": "滑桿背景色彩。", "scrollbarSliderHoverBackground": "暫留時的滑桿背景色彩。", "scrollbarSliderActiveBackground": "使用中狀態時的滑桿背景色彩。", + "progressBarBackground": "長時間運行進度條的背景色彩.", "editorBackground": "編輯器的背景色彩。", "editorForeground": "編輯器的預設前景色彩。", "editorWidgetBackground": "編輯器小工具的背景色彩,例如尋找/取代。", @@ -63,5 +66,9 @@ "hoverHighlight": "在顯示了動態顯示的單字下方醒目提示。", "hoverBackground": "編輯器動態顯示的背景色彩。", "hoverBorder": "編輯器動態顯示的框線色彩。", - "activeLinkForeground": "使用中之連結的色彩。" + "activeLinkForeground": "使用中之連結的色彩。", + "diffEditorInserted": "插入文字的背景色彩。", + "diffEditorRemoved": "移除文字的背景色彩。", + "diffEditorInsertedOutline": "插入的文字外框色彩。", + "diffEditorRemovedOutline": "移除的文字外框色彩。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/cht/src/vs/workbench/browser/actions/configureLocale.i18n.json index f0c2e15a1002f..3e4cd2547c535 100644 --- a/i18n/cht/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,6 +7,7 @@ "configureLocale": "設定語言", "displayLanguage": "定義 VSCode 的顯示語言。", "doc": "如需支援的語言清單,請參閱 {0}。", + "restart": "變更值必須重新啟動 VSCode。", "fail.createSettings": "無法建立 '{0}' ({1})。", "JsonSchema.locale": "要使用的 UI 語言。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/shell.i18n.json index cd49d332f0dfc..5a00c19854990 100644 --- a/i18n/cht/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/cht/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "建議不要以 'root' 身分執行 Code。", - "prof.message": "已成功建立設定檔。", - "prof.detail": "請建立問題,並手動附加下列檔案:\n{0}", - "prof.restartAndFileIssue": "建立問題並重新啟動", - "prof.restart": "重新啟動" + "runningAsRoot": "建議不要以 'root' 身分執行 Code。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/electron-browser/window.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/window.i18n.json index 89eb6c3653d6b..091cf1f44e4df 100644 --- a/i18n/cht/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/cht/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "貼上", "selectAll": "全選", "confirmOpen": "確定要開啟 {0} 資料夾嗎?", - "confirmOpenButton": "開啟(&&O)...", - "developer": "開發人員", - "file": "檔案" + "confirmOpenButton": "開啟(&&O)..." } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json index 8b6ad71cd4e6d..71f6e49ff9506 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "balanceInward": "Emmet: 平衡 (向內)", + "balanceOutward": "Emmet: 平衡 (向外)" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index 8b6ad71cd4e6d..9c79dedc0ca60 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "previousEditPoint": "Emmet: 上一個編輯端點", + "nextEditPoint": "Emmet: 下一個編輯端點" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json index 8b6ad71cd4e6d..2fd101d61046c 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "evaluateMathExpression": "Emmet: 評估數學運算式" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json index 8b6ad71cd4e6d..e44c6de8d4af8 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "expandAbbreviationAction": "Emmet: 展開縮寫" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json index 8b6ad71cd4e6d..64cf880ae48c1 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "incrementNumberByOneTenth": "Emmet: 依 0.1 遞增", + "incrementNumberByOne": "Emmet: 依 1 遞增", + "incrementNumberByTen": "Emmet: 依 10 遞增", + "decrementNumberByOneTenth": "Emmet: 依 0.1 遞減", + "decrementNumberByOne": "Emmet: 依 1 遞減", + "decrementNumberByTen": "Emmet: 依 10 遞減" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json index 8b6ad71cd4e6d..211f58191fec4 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "matchingPair": "Emmet: 前往相符的配對" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json index 8b6ad71cd4e6d..3e491126dc25c 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "mergeLines": "Emmet: 合併行" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json index 8b6ad71cd4e6d..1dcfdd7b85ce9 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "reflectCSSValue": "Emmet: 反射 CSS 值" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json index 8b6ad71cd4e6d..0c12d23d41a72 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "removeTag": "Emmet: 移除標記" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json index 8b6ad71cd4e6d..2674e2efa4e8a 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "selectPreviousItem": "Emmet: 選取上一個項目", + "selectNextItem": "Emmet: 選取下一個項目" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json index 8b6ad71cd4e6d..b861468d52ec7 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "splitJoinTag": "Emmet: 分割/聯結標記" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json index 8b6ad71cd4e6d..9980a634fb88e 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "toggleComment": "Emmet: 切換註解" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json index 8b6ad71cd4e6d..11fbb1e13ba5b 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateImageSize": "Emmet: 更新影像大小" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json index 8b6ad71cd4e6d..659656b1b2b4e 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateTag": "Emmet: 更新標記", + "enterTag": "輸入標記", + "tag": "標記" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json index 8b6ad71cd4e6d..78eafe156b11b 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "wrapWithAbbreviationAction": "Emmet: 以縮寫包裝", + "enterAbbreviation": "輸入縮寫", + "abbreviation": "縮寫" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 8b6ad71cd4e6d..fa22b35c419d0 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "如有啟用,只要按 Tab 鍵就能展開 Emmet 縮寫。", + "emmetPreferences": "喜好設定,用以修改某些動作的行為及 Emmet 的解析程式。", + "emmetSyntaxProfiles": "為指定的語法定義設定檔,或透過特定規則使用自己的設定檔。", + "emmetExclude": "不應展開 Emmet 縮寫的語言陣列。", + "emmetExtensionsPath": "包含 Emmet 設定檔、程式碼片段及參考的資料夾路徑" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index a6d7f30447aca..b0cd09ce051ca 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0},工作", "tasksAriaLabel": "請鍵入要重新啟動的工作名稱", "noTasksMatching": "沒有工作相符", "noTasksFound": "找不到工作可重新啟動" diff --git a/i18n/cht/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index 7eb3693cef90d..c6d5f5a478b2c 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0},工作", "tasksAriaLabel": "輸入要執行的工作名稱", "noTasksMatching": "No tasks matching", "noTasksFound": "找不到工作" diff --git a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index d9994a0fc55f2..00a45ea1dc0cb 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -13,25 +13,16 @@ "welcomePage.recent": "最近使用", "welcomePage.noRecentFolders": "沒有最近使用的資料夾", "welcomePage.help": "說明", - "welcomePage.productDocumentation": "產品文件", "welcomePage.introductoryVideos": "簡介影片", - "welcomePage.keybindingsReference": "鍵盤快速鍵參考", + "welcomePage.productDocumentation": "產品文件", "welcomePage.gitHubRepository": "GitHub 存放庫", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "啟動時顯示歡迎頁面", + "welcomePage.customize": "自訂", "welcomePage.installKeymapDescription": "安裝鍵盤快速鍵", - "welcomePage.installKeymap": "安裝鍵盤快速鍵 {0}、{1}、{2} 及 {3}", - "welcomePage.vim": "活力", - "welcomePage.vimCurrent": "活力 (目前)", - "welcomePage.sublime": "壯麗", - "welcomePage.sublimeCurrent": "壯麗 (目前)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom (目前)", "welcomePage.others": "其他", "welcomePage.colorTheme": "彩色佈景主題", "welcomePage.colorThemeDescription": "將編輯器及您的程式碼設定成您喜愛的外觀", - "welcomePage.configureSettings": "組態設定", - "welcomePage.configureSettingsDescription": "微調設定就能發揮 VS Code 的所有功能", "welcomePage.showCommands": "尋找及執行所有命令", "welcomePage.showCommandsDescription": "從控制台快速存取及搜尋命令 ({0})", "welcomePage.interfaceOverview": "介面概觀", @@ -39,5 +30,8 @@ "welcomePage.interactivePlayground": "Interactive Playground", "welcomePage.interactivePlaygroundDescription": "嘗試使用逐步解說短片中的一些基本編輯器功能", "welcomePage.quickLinks": "快速連結", - "welcomePage.keybindingsReferenceDescription": "可列印的 PDF,附有最常用的鍵盤快速鍵" + "welcomePage.keybindingsReference": "鍵盤快速鍵參考", + "welcomePage.keybindingsReferenceDescription": "可列印的 PDF,附有最常用的鍵盤快速鍵", + "welcomePage.configureSettings": "組態設定", + "welcomePage.configureSettingsDescription": "微調設定就能發揮 VS Code 的所有功能" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index aceea3407e3b0..02eb36873b6a1 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,11 @@ // Do not edit this file. It is machine generated. { "welcomePage": "歡迎使用", - "welcome.title": "歡迎使用", "welcomePage.keymapAlreadyInstalled": "已安裝 {0} 鍵盤快速鍵。", "welcomePage.willReloadAfterInstallingKeymap": "{0} 鍵盤快速鍵安裝完成後,將會重新載入此視窗。", - "ok": "確定", "welcomePage.installingKeymap": "正在安裝 {0} 鍵盤快速鍵...", "welcomePage.keymapNotFound": "找不到識別碼為 {1} 的 {0} 鍵盤快速鍵。", + "welcome.title": "歡迎使用", + "ok": "確定", "cancel": "取消" } \ No newline at end of file diff --git a/i18n/deu/extensions/git/out/commands.i18n.json b/i18n/deu/extensions/git/out/commands.i18n.json index d0fbcdb0a28f6..1a8943807b8ea 100644 --- a/i18n/deu/extensions/git/out/commands.i18n.json +++ b/i18n/deu/extensions/git/out/commands.i18n.json @@ -18,6 +18,7 @@ "discard": "Änderungen verwerfen", "confirm discard all": "Möchten Sie wirklich ALLE Änderungen verwerfen? Dieser Vorgang kann nicht rückgängig gemacht werden!", "discardAll": "ALLE Änderungen verwerfen", + "no staged changes": "Es sind keine Änderungen bereitgestellt.\n\nMöchten Sie alle Ihre Änderungen automatisch bereitstellen und direkt committen?", "yes": "Ja", "always": "Immer", "no changes": "Keine Änderungen zum Speichern vorhanden.", diff --git a/i18n/deu/extensions/git/package.i18n.json b/i18n/deu/extensions/git/package.i18n.json index c11e465ce4559..26ab785ffbf18 100644 --- a/i18n/deu/extensions/git/package.i18n.json +++ b/i18n/deu/extensions/git/package.i18n.json @@ -42,5 +42,6 @@ "config.countBadge": "Steuert die Git-Badgeanzahl. \"Alle\" zählt alle Änderungen. \"tracked\" (Nachverfolgt) zählt nur die nachverfolgten Änderungen. \"off\" (Aus) deaktiviert dies.", "config.checkoutType": "Steuert, welcher Branchtyp beim Ausführen von \"Auschecken an...\" aufgelistet wird. \"Alle\" zeigt alle Verweise an, \"Lokal\" nur die lokalen Branches, \"Tags\" zeigt nur Tags an, und \"Remote\" zeigt nur Remotebranches an.", "config.ignoreLegacyWarning": "Ignoriert die Legacy-Git-Warnung.", - "config.ignoreLimitWarning": "Ignoriert Warnung bei zu hoher Anzahl von Änderungen in einem Repository" + "config.ignoreLimitWarning": "Ignoriert Warnung bei zu hoher Anzahl von Änderungen in einem Repository", + "config.enableSmartCommit": "Alle Änderungen committen, wenn keine Änderungen bereitgestellt sind." } \ No newline at end of file diff --git a/i18n/deu/extensions/jake/out/main.i18n.json b/i18n/deu/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/jake/out/main.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/extensions/jake/package.i18n.json b/i18n/deu/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/jake/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/extensions/typescript/out/utils/logger.i18n.json b/i18n/deu/extensions/typescript/out/utils/logger.i18n.json index 8b6ad71cd4e6d..bc738f43d0c37 100644 --- a/i18n/deu/extensions/typescript/out/utils/logger.i18n.json +++ b/i18n/deu/extensions/typescript/out/utils/logger.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json index c3e22e8d6713c..2fe70e62eed2e 100644 --- a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -62,7 +62,6 @@ "renderLineHighlight": "Steuert, wie der Editor die aktuelle Zeilenhervorhebung rendern soll. Mögliche Werte sind \"none\", \"gutter\", \"line\" und \"all\".", "codeLens": "Steuert, ob der Editor CodeLenses anzeigt.", "folding": "Steuert, ob für den Editor Codefaltung aktiviert ist.", - "hideFoldIcons": "Steuert, ob die Falt-Symbole an der Leiste automatisch ausgeblendet werden.", "matchBrackets": "Übereinstimmende Klammern hervorheben, wenn eine davon ausgewählt wird.", "glyphMargin": "Steuert, ob der Editor den vertikalen Glyphenrand rendert. Der Glyphenrand wird hauptsächlich zum Debuggen verwendet.", "useTabStops": "Das Einfügen und Löschen von Leerzeichen folgt auf Tabstopps.", diff --git a/i18n/deu/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/deu/src/vs/editor/common/view/editorColorRegistry.i18n.json index aff2b6db4dbec..de766791c8796 100644 --- a/i18n/deu/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/deu/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -10,5 +10,7 @@ "caret": "Farbe des Cursors im Editor.", "editorWhitespaces": "Farbe der Leerzeichen im Editor.", "editorIndentGuides": "Farbe der Führungslinien für Einzüge im Editor.", - "editorLineNumbers": "Zeilennummernfarbe im Editor." + "editorLineNumbers": "Zeilennummernfarbe im Editor.", + "editorCodeLensForeground": "Vordergrundfarbe der CodeLens-Links im Editor", + "editorBracketMatchBackground": "Hintergrundfarbe für zusammengehörige Klammern" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index b63b3d4189850..73686f1e29534 100644 --- a/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,6 +9,7 @@ "editorSuggestWidgetForeground": "Vordergrundfarbe des Vorschlagswidgets.", "editorSuggestWidgetSelectedBackground": "Hintergrundfarbe des ausgewählten Eintrags im Vorschlagswidget.", "editorSuggestWidgetHighlightForeground": "Farbe der Trefferhervorhebung im Vorschlagswidget.", + "readMore": "Mehr anzeigen...{0}", "suggestionWithDetailsAriaLabel": "{0}, Vorschlag, hat Details", "suggestionAriaLabel": "{0}, Vorschlag", "suggestWidget.loading": "Wird geladen...", diff --git a/i18n/deu/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/deu/src/vs/platform/markers/common/problemMatcher.i18n.json index 1955c94d40bf3..565c50e40d10f 100644 --- a/i18n/deu/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/deu/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,7 +34,6 @@ "ProblemMatcherParser.noValidIdentifier": "Fehler: Die Mustereigenschaft {0} ist kein gültiger Name für eine Mustervariable.", "ProblemMatcherParser.problemPattern.watchingMatcher": "Ein Problemmatcher muss ein Anfangsmuster und ein Endmuster für die Überwachung definieren.", "ProblemMatcherParser.invalidRegexp": "Fehler: Die Zeichenfolge {0} ist kein gültiger regulärer Ausdruck.\n", - "WatchingPatternSchema.regexp": "Der reguläre Ausdruck zum Erkennen des Anfangs oder Endes eines Überwachungstasks.", "WatchingPatternSchema.file": "Der Übereinstimmungsgruppenindex des Dateinamens. Kann ausgelassen werden.", "PatternTypeSchema.name": "Der Name eines beigetragenen oder vordefinierten Musters", "PatternTypeSchema.description": "Ein Problemmuster oder der Name eines beigetragenen oder vordefinierten Problemmusters. Kann ausgelassen werden, wenn die Basis angegeben ist.", @@ -46,7 +45,6 @@ "ProblemMatcherSchema.watching.activeOnStart": "Wenn dieser Wert auf \"true\" festgelegt wird, befindet sich die Überwachung im aktiven Modus, wenn der Task gestartet wird. Dies entspricht dem Ausgeben einer Zeile, die mit dem \"beginPattern\" übereinstimmt.", "ProblemMatcherSchema.watching.beginsPattern": "Wenn eine Übereinstimmung mit der Ausgabe vorliegt, wird der Start eines Überwachungstasks signalisiert.", "ProblemMatcherSchema.watching.endsPattern": "Wenn eine Übereinstimmung mit der Ausgabe vorliegt, wird das Ende eines Überwachungstasks signalisiert.", - "ProblemMatcherSchema.watching": "Muster zum Nachverfolgen des Beginns und Endes eines Beobachtungsmusters.", "LegacyProblemMatcherSchema.watchedBegin.deprecated": "Diese Eigenschaft ist veraltet. Verwenden Sie stattdessen die Überwachungseigenschaft.", "LegacyProblemMatcherSchema.watchedBegin": "Ein regulärer Ausdruck, der signalisiert, dass die Ausführung eines überwachten Tasks (ausgelöst durch die Dateiüberwachung) beginnt.", "LegacyProblemMatcherSchema.watchedEnd.deprecated": "Diese Eigenschaft ist veraltet. Verwenden Sie stattdessen die Überwachungseigenschaft.", diff --git a/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json index 90e66cbb9c0c2..e8bca8886d1bf 100644 --- a/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -7,14 +7,24 @@ "invalid.color": "Ungültiges Farbformat. Verwenden Sie #RGB, #RGBA, #RRGGBB oder #RRGGBBAA.", "schema.colors": "In der Workbench verwendete Farben.", "foreground": "Allgemeine Vordergrundfarbe. Diese Farbe wird nur verwendet, wenn sie nicht durch eine Komponente überschrieben wird.", + "errorForeground": "Allgemeine Vordergrundfarbe. Diese Farbe wird nur verwendet, wenn sie nicht durch eine Komponente überschrieben wird.", + "descriptionForeground": "Vordergrundfarbe für Beschreibungstexte, die weitere Informationen anzeigen, z. B. für ein Label.", "focusBorder": "Allgemeine Rahmenfarbe für fokussierte Elemente. Diese Farbe wird nur verwendet, wenn sie nicht durch eine Komponente überschrieben wird.", "contrastBorder": "Ein zusätzlicher Rahmen um Elemente, mit dem diese von anderen getrennt werden, um einen größeren Kontrast zu erreichen.", "activeContrastBorder": "Ein zusätzlicher Rahmen um aktive Elemente, mit dem diese von anderen getrennt werden, um einen größeren Kontrast zu erreichen.", + "textSeparatorForeground": "Farbe für Text-Trennzeichen.", + "textLinkForeground": "Vordergrundfarbe für Links im Text.", + "textLinkActiveForeground": "Vordergrundfarbe für aktive Links im Text.", + "textPreformatForeground": "Vordergrundfarbe für vorformatierte Textsegmente.", + "textBlockQuoteBackground": "Hintergrundfarbe für block quotes im Text.", + "textBlockQuoteBorder": "Rahmenfarbe für block quotes im Text.", + "textCodeBlockBackground": "Hintergrundfarbe für Code-Blöcke im Text.", "widgetShadow": "Schattenfarbe von Widgets wie zum Beispiel Suchen/Ersetzen innerhalb des Editors.", "inputBoxBackground": "Hintergrund für Eingabefeld.", "inputBoxForeground": "Vordergrund für Eingabefeld.", "inputBoxBorder": "Rahmen für Eingabefeld.", "inputBoxActiveOptionBorder": "Rahmenfarbe für aktivierte Optionen in Eingabefeldern.", + "inputPlaceholderForeground": "Input box - Vordergrundfarbe für Platzhalter-Text.", "inputValidationInfoBackground": "Hintergrundfarbe bei der Eingabevalidierung für den Schweregrad der Information.", "inputValidationInfoBorder": "Rahmenfarbe bei der Eingabevalidierung für den Schweregrad der Information.", "inputValidationWarningBackground": "Hintergrundfarbe bei der Eingabevalidierung für eine Warnung zur Information.", @@ -28,6 +38,7 @@ "listActiveSelectionBackground": "Hintergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", "listActiveSelectionForeground": "Vordergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", "listInactiveSelectionBackground": "Hintergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur inaktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", + "listInactiveSelectionForeground": "Liste/Baumstruktur - Vordergrundfarbe für das ausgewählte Element, wenn die Liste/Baumstruktur inaktiv ist. Eine aktive Liste/Baumstruktur hat Tastaturfokus, eine inaktive hingegen nicht.", "listHoverBackground": "Hintergrund der Liste/Struktur, wenn mit der Maus auf Elemente gezeigt wird.", "listDropBackground": "Drag & Drop-Hintergrund der Liste/Struktur, wenn Elemente mithilfe der Maus verschoben werden.", "highlight": "Vordergrundfarbe der Liste/Struktur zur Trefferhervorhebung beim Suchen innerhalb der Liste/Struktur.", @@ -36,6 +47,8 @@ "buttonForeground": "Vordergrundfarbe der Schaltfläche.", "buttonBackground": "Hintergrundfarbe der Schaltfläche.", "buttonHoverBackground": "Hintergrundfarbe der Schaltfläche, wenn darauf gezeigt wird.", + "badgeBackground": "Badge - Hintergrundfarbe. Badges sind kurze Info-Texte, z. B. für Anzahl Suchergebnisse.", + "badgeForeground": "Badge - Vordergrundfarbe. Badges sind kurze Info-Texte, z. B. für Anzahl Suchergebnisse.", "scrollbarShadow": "Schatten der Scrollleiste, um anzuzeigen, dass die Ansicht gescrollt wird.", "scrollbarSliderBackground": "Hintergrundfarbe des Schiebereglers.", "scrollbarSliderHoverBackground": "Hintergrundfarbe des Schiebereglers, wenn darauf gezeigt wird.", @@ -52,5 +65,9 @@ "hoverHighlight": "Hervorhebung eines Worts, unter dem ein Mauszeiger angezeigt wird.", "hoverBackground": "Background color of the editor hover.", "hoverBorder": "Rahmenfarbe des Editor-Mauszeigers.", - "activeLinkForeground": "Farbe der aktiven Links." + "activeLinkForeground": "Farbe der aktiven Links.", + "diffEditorInserted": "Hintergrundfarbe für eingefügten Text.", + "diffEditorRemoved": "Hintergrundfarbe für entfernten Text.", + "diffEditorInsertedOutline": "Konturfarbe für eingefügten Text.", + "diffEditorRemovedOutline": "Konturfarbe für entfernten Text." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/deu/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/shell.i18n.json index dd4ad3fcbb985..b225b8a0012bf 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "Es wird empfohlen, Code nicht als \"root\" auszuführen.", - "prof.message": "Profile wurden erfolgreich erstellt.", - "prof.detail": "Erstellen Sie ein Problem, und fügen Sie die folgenden Dateien manuell an:\n{0}", - "prof.restartAndFileIssue": "Problem erstellen und neu starten", - "prof.restart": "Neu starten" + "runningAsRoot": "Es wird empfohlen, Code nicht als \"root\" auszuführen." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/electron-browser/window.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/window.i18n.json index 1c580a18212a7..41496cf43a09f 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "Einfügen", "selectAll": "Alles auswählen", "confirmOpen": "Möchten Sie \"{0}\" Ordner wirklich öffnen?", - "confirmOpenButton": "&&Öffnen", - "developer": "Entwickler", - "file": "Datei" + "confirmOpenButton": "&&Öffnen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json index 8b6ad71cd4e6d..e0afee4248519 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "balanceInward": "Emmet: Ausgleichen (einwärts)", + "balanceOutward": "Emmet: Ausgleichen (auswärts)" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index 8b6ad71cd4e6d..35ffc123f143a 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "previousEditPoint": "Emmet: Vorheriger Bearbeitungspunkt", + "nextEditPoint": "Emmet: Nächster Bearbeitungspunkt" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json index 8b6ad71cd4e6d..a3f778d565ab5 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "evaluateMathExpression": "Emmet: Mathematischen Ausdruck auswerten" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json index 8b6ad71cd4e6d..278d10a21dc74 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "expandAbbreviationAction": "Emmet: Abkürzung erweitern" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json index 8b6ad71cd4e6d..2aab3f2af7ce7 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "incrementNumberByOneTenth": "Emmet: Um 0,1 inkrementieren", + "incrementNumberByOne": "Emmet: Um 1 inkrementieren", + "incrementNumberByTen": "Emmet: Um 10 inkrementieren", + "decrementNumberByOneTenth": "Emmet: Um 0,1 dekrementieren", + "decrementNumberByOne": "Emmet: Um 1 dekrementieren", + "decrementNumberByTen": "Emmet: Um 10 dekrementieren" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json index 8b6ad71cd4e6d..158b074c05b3d 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "matchingPair": "Emmet: Gehe zu übereinstimmendem Paar" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json index 8b6ad71cd4e6d..e6f2b3e1ba724 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "mergeLines": "Emmet: Zeilen mergen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json index 8b6ad71cd4e6d..1569d01566960 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "reflectCSSValue": "Emmet: CSS-Wert reflektieren" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json index 8b6ad71cd4e6d..bb2a97fd42e31 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "removeTag": "Emmet: Tag entfernen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json index 8b6ad71cd4e6d..0ddd0df478e81 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "selectPreviousItem": "Emmet: Vorheriges Element auswählen", + "selectNextItem": "Emmet: Nächstes Element auswählen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json index 8b6ad71cd4e6d..a214ce3766ae8 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "splitJoinTag": "Emmet: Tag teilen/verknüpfen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json index 8b6ad71cd4e6d..118d88c7df808 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "toggleComment": "Emmet: Kommentar umschalten" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json index 8b6ad71cd4e6d..b682f5d97c3d6 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateImageSize": "Emmet: Bildgröße aktualisieren" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json index 8b6ad71cd4e6d..bba2b0b703e21 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateTag": "Emmet: Tag aktualisieren", + "enterTag": "Tag eingeben", + "tag": "Tag" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json index 8b6ad71cd4e6d..45013796dd3f1 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "wrapWithAbbreviationAction": "Emmet: Mit Abkürzung umschließen", + "enterAbbreviation": "Abkürzung eingeben", + "abbreviation": "Abkürzung" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 8b6ad71cd4e6d..5beaa142e9f13 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "Wenn aktiviert, werden Emmet-Abkürzungen beim Drücken der TAB-TASTE erweitert.", + "emmetPreferences": "Einstellungen, die zum Ändern des Verhaltens einiger Aktionen und Konfliktlöser von Emmet verwendet werden.", + "emmetSyntaxProfiles": "Definieren Sie das Profil für die angegebene Syntax, oder verwenden Sie Ihr eigenes Profil mit bestimmten Regeln.", + "emmetExclude": "Ein Array von Sprachen, in dem Emmet-Abkürzungen nicht erweitert werden sollen.", + "emmetExtensionsPath": "Pfad zu einem Ordner mit Emmet-Profilen, Ausschnitten und Voreinstellungen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index 272bcf769ea51..5c23eff8b3c34 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks", "tasksAriaLabel": "Name einer neu zu startenden Aufgabe eingeben", "noTasksMatching": "Keine übereinstimmenden Aufgaben", "noTasksFound": "Keine neu zu startenden Aufgaben gefunden." diff --git a/i18n/deu/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index 7add7130d906c..6a58cd9cf4ca2 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks", "tasksAriaLabel": "Geben Sie den Namen des auszuführenden Tasks ein.", "noTasksMatching": "Keine übereinstimmenden Tasks", "noTasksFound": "Es wurden keine Tasks gefunden." diff --git a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 0a1018ac4fa80..b167d91d677c3 100644 --- a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -13,25 +13,16 @@ "welcomePage.recent": "Zuletzt verwendet", "welcomePage.noRecentFolders": "Keine kürzlich verwendeten Ordner", "welcomePage.help": "Hilfe", - "welcomePage.productDocumentation": "Produktdokumentation", "welcomePage.introductoryVideos": "Einführungsvideos", - "welcomePage.keybindingsReference": "Referenz für Tastenkombinationen", + "welcomePage.productDocumentation": "Produktdokumentation", "welcomePage.gitHubRepository": "GitHub-Repository", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Willkommensseite beim Start anzeigen", + "welcomePage.customize": "Anpassen", "welcomePage.installKeymapDescription": "Tastenkombinationen installieren", - "welcomePage.installKeymap": "Installieren Sie die Tastenkombinationen von {0} {1}, {2} und {3}.", - "welcomePage.vim": "Vim", - "welcomePage.vimCurrent": "Vim (aktuell)", - "welcomePage.sublime": "Sublime", - "welcomePage.sublimeCurrent": "Sublime (aktuell)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom (aktuell)", "welcomePage.others": "Andere", "welcomePage.colorTheme": "Farbdesign", "welcomePage.colorThemeDescription": "Passen Sie das Aussehen des Editors und Ihres Codes an Ihre Wünsche an.", - "welcomePage.configureSettings": "Einstellungen konfigurieren", - "welcomePage.configureSettingsDescription": "Optimieren Sie die Einstellungen, um VS Code bestmöglich zu nutzen.", "welcomePage.showCommands": "Alle Befehle suchen und ausführen", "welcomePage.showCommandsDescription": "Über die Einstellungen ({0}) können Sie Befehle schnell suchen und darauf zugreifen.", "welcomePage.interfaceOverview": "Überblick über die Schnittstelle", @@ -39,5 +30,8 @@ "welcomePage.interactivePlayground": "Interaktiver Playground", "welcomePage.interactivePlaygroundDescription": "Testen Sie die wichtigsten Editorfunktionen in einer kurzen exemplarischen Vorgehensweise.", "welcomePage.quickLinks": "Direktlinks", - "welcomePage.keybindingsReferenceDescription": "Eine druckbare PDF mit den wichtigsten Tastenkombinationen" + "welcomePage.keybindingsReference": "Referenz für Tastenkombinationen", + "welcomePage.keybindingsReferenceDescription": "Eine druckbare PDF mit den wichtigsten Tastenkombinationen", + "welcomePage.configureSettings": "Einstellungen konfigurieren", + "welcomePage.configureSettingsDescription": "Optimieren Sie die Einstellungen, um VS Code bestmöglich zu nutzen." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index ce4f274eb9024..1bc333472229e 100644 --- a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,11 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Willkommen", - "welcome.title": "Willkommen", "welcomePage.keymapAlreadyInstalled": "Die {0} Tastenkombinationen sind bereits installiert.", "welcomePage.willReloadAfterInstallingKeymap": "Das Fenster wird nach der Installation der {0}-Tastaturbefehle neu geladen.", - "ok": "OK", "welcomePage.installingKeymap": "Die {0}-Tastenkombinationen werden installiert...", "welcomePage.keymapNotFound": "Die {0} Tastenkombinationen mit der ID {1} wurden nicht gefunden.", + "welcome.title": "Willkommen", + "ok": "OK", "cancel": "Abbrechen" } \ No newline at end of file diff --git a/i18n/esn/extensions/jake/out/main.i18n.json b/i18n/esn/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/jake/out/main.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/extensions/jake/package.i18n.json b/i18n/esn/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/jake/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/extensions/typescript/out/utils/logger.i18n.json b/i18n/esn/extensions/typescript/out/utils/logger.i18n.json index 8b6ad71cd4e6d..bc738f43d0c37 100644 --- a/i18n/esn/extensions/typescript/out/utils/logger.i18n.json +++ b/i18n/esn/extensions/typescript/out/utils/logger.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/esn/extensions/typescript/package.i18n.json b/i18n/esn/extensions/typescript/package.i18n.json index 80029cd25d6ed..599140da8f582 100644 --- a/i18n/esn/extensions/typescript/package.i18n.json +++ b/i18n/esn/extensions/typescript/package.i18n.json @@ -33,10 +33,13 @@ "javascript.validate.enable": "Habilita o deshabilita la validación de JavaScript.", "typescript.goToProjectConfig.title": "Ir a configuración del proyecto", "javascript.goToProjectConfig.title": "Ir a configuración del proyecto", + "javascript.referencesCodeLens.enabled": "Habilitar/deshabilitar las referencias de CodeLens en los archivos de JavaScript.", + "typescript.referencesCodeLens.enabled": "Habilitar/deshabilitar las referencias de CodeLens en los archivos de TypeScript. Requiere TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Habilita o deshabilita implementaciones de CodeLens. Requiere TypeScript >= 2.2.0.", "typescript.openTsServerLog.title": "Abrir registro del servidor de TS", "typescript.selectTypeScriptVersion.title": "Seleccionar versión de TypeScript", "jsDocCompletion.enabled": "Habilita o deshabilita comentarios automaticos de JSDoc", "javascript.implicitProjectConfig.checkJs": "Habilita/deshabilita la comprobación semántica de los archivos JavaScript. Los archivos jsconfig.json o tsconfig.json reemplazan esta configuración. Se requiere TypeScript >=2.3.1.", - "typescript.check.npmIsInstalled": "Comprueba si NPM esta instalado para recibir adquisiciones automaticas de Typings" + "typescript.check.npmIsInstalled": "Comprueba si NPM esta instalado para recibir adquisiciones automaticas de Typings", + "javascript.nameSuggestions": "Habilitar/deshabilitar nombres únicos de la lista de sugerencias en los archivos de JavaScript. " } \ No newline at end of file diff --git a/i18n/esn/src/vs/code/electron-main/menus.i18n.json b/i18n/esn/src/vs/code/electron-main/menus.i18n.json index 06ce8e40cb3a5..44ff7a3f5f133 100644 --- a/i18n/esn/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/esn/src/vs/code/electron-main/menus.i18n.json @@ -143,6 +143,7 @@ "miAccessibilityOptions": "&&Opciones de accesibilidad", "miReportIssues": "&&Notificar problemas", "miWelcome": "&&Bienvenido", + "miInteractivePlayground": "Área de juegos &&interactiva", "miDocumentation": "&&Documentación", "miReleaseNotes": "&&Notas de la versión", "miKeyboardShortcuts": "&&Referencia de métodos abreviados de teclado", diff --git a/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json index a8373baa8d6bf..deeb605c6a664 100644 --- a/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -62,7 +62,6 @@ "renderLineHighlight": "Controla cómo el editor debe presentar el resaltado de línea. Las posibilidades son \"ninguno\", \"margen\", \"línea\" y \"todo\".", "codeLens": "Controla si el editor muestra lentes de código", "folding": "Controla si el editor tiene habilitado el plegado de código.", - "hideFoldIcons": "Controla cuándo los iconos de plegado del margen son ocultados automáticamente.", "matchBrackets": "Resaltar corchetes coincidentes cuando se seleccione uno de ellos.", "glyphMargin": "Controla si el editor debe representar el margen de glifo vertical. El margen de glifo se usa, principalmente, para depuración.", "useTabStops": "La inserción y eliminación del espacio en blanco sigue a las tabulaciones.", diff --git a/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 6f314db4b76b9..f9d2c2d5f0993 100644 --- a/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,6 +9,7 @@ "editorSuggestWidgetForeground": "Color de primer plano del widget sugerido.", "editorSuggestWidgetSelectedBackground": "Color de fondo de la entrada seleccionada del widget sugerido.", "editorSuggestWidgetHighlightForeground": "Color del resaltado coincidido en el widget sugerido.", + "readMore": "Leer más...{0}", "suggestionWithDetailsAriaLabel": "{0}, sugerencia, con detalles", "suggestionAriaLabel": "{0}, sugerencia", "suggestWidget.loading": "Cargando...", diff --git a/i18n/esn/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/esn/src/vs/platform/markers/common/problemMatcher.i18n.json index dac524375156a..967ffc7598360 100644 --- a/i18n/esn/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/esn/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,7 +34,6 @@ "ProblemMatcherParser.noValidIdentifier": "Error: La propiedad pattern {0} no es un nombre de variable de patrón válido.", "ProblemMatcherParser.problemPattern.watchingMatcher": "Un buscador de coincidencias de problemas debe definir tanto un patrón de inicio como un patrón de finalización para la inspección.", "ProblemMatcherParser.invalidRegexp": "Error: La cadena {0} no es una expresión regular válida.\n", - "WatchingPatternSchema.regexp": "Expresión regular para detectar el principio o el final de una tarea de inspección.", "WatchingPatternSchema.file": "Índice de grupo de coincidencias del nombre de archivo. Se puede omitir.", "PatternTypeSchema.name": "Nombre de un patrón aportado o predefinido", "PatternTypeSchema.description": "Patrón de problema o nombre de un patrón de problema que se ha aportado o predefinido. Se puede omitir si se especifica la base.", @@ -46,7 +45,6 @@ "ProblemMatcherSchema.watching.activeOnStart": "Si se establece en true, el monitor está en modo activo cuando la tarea empieza. Esto es equivalente a emitir una línea que coincide con beginPattern", "ProblemMatcherSchema.watching.beginsPattern": "Si se encuentran coincidencias en la salida, se señala el inicio de una tarea de inspección.", "ProblemMatcherSchema.watching.endsPattern": "Si se encuentran coincidencias en la salida, se señala el fin de una tarea de inspección", - "ProblemMatcherSchema.watching": "Patrones para hacer un seguimiento del comienzo y el final de un patrón de supervisión.", "LegacyProblemMatcherSchema.watchedBegin.deprecated": "This property is deprecated. Use the watching property instead.", "LegacyProblemMatcherSchema.watchedBegin": "Expresión regular que señala que una tarea inspeccionada comienza a ejecutarse desencadenada a través de la inspección de archivos.", "LegacyProblemMatcherSchema.watchedEnd.deprecated": "This property is deprecated. Use the watching property instead.", diff --git a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json index 987f41fef7b0c..85f87911be1bd 100644 --- a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -67,5 +67,9 @@ "hoverHighlight": "Resaltado debajo de la palabra para la que se muestra un recuadro al mantener el puntero.", "hoverBackground": "Color de fondo al mantener el puntero en el editor.", "hoverBorder": "Color del borde al mantener el puntero en el editor.", - "activeLinkForeground": "Color de los vínculos activos." + "activeLinkForeground": "Color de los vínculos activos.", + "diffEditorInserted": "Color de fondo para el texto insertado.", + "diffEditorRemoved": "Color de fondo para el texto quitado.", + "diffEditorInsertedOutline": "Color de contorno para el texto insertado.", + "diffEditorRemovedOutline": "Color de contorno para el texto quitado." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/esn/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/shell.i18n.json index b9f16ccb05c73..403b7012cbef9 100644 --- a/i18n/esn/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/esn/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "Se recomienda no ejecutar Code como 'root'.", - "prof.message": "Los perfiles se crearon correctamente.", - "prof.detail": "Cree un problema y asóciele manualmente los siguientes archivos: {0}", - "prof.restartAndFileIssue": "Crear problema y reiniciar", - "prof.restart": "Reiniciar" + "runningAsRoot": "Se recomienda no ejecutar Code como 'root'." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/electron-browser/window.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/window.i18n.json index f3b1f414ce3e0..8622e2e3d7dbe 100644 --- a/i18n/esn/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/esn/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "Pegar", "selectAll": "Seleccionar todo", "confirmOpen": "¿Seguro que desea abrir {0} carpetas?", - "confirmOpenButton": "&&Abrir...", - "developer": "Desarrollador", - "file": "Archivo" + "confirmOpenButton": "&&Abrir..." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index 62859637baa26..8155a083b752d 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "Copiar valor", "copy": "Copiar", + "copyAll": "Copiar todo", "copyStackTrace": "Copiar pila de llamadas" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 00a55728fff7c..cb1c21395831b 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,7 +7,6 @@ "debugAdapterBinNotFound": "El ejecutable del adaptador de depuración \"{0}\" no existe.", "debugAdapterCannotDetermineExecutable": "No se puede determinar el ejecutable para el adaptador de depuración \"{0}\".", "debugType": "Tipo de configuración.", - "debugTypeNotRecognised": "Este tipo de depuración no se reconoce. Compruebe que tiene instalada la correspondiente extensión de depuración y que está habilitada.", "node2NotSupported": "\"node2\" ya no se admite; use \"node\" en su lugar y establezca el atributo \"protocol\" en \"inspector\".", "debugName": "Nombre de la configuración. Aparece en el menú desplegable de la configuración de inicio.", "debugRequest": "Tipo de solicitud de la configuración. Puede ser \"launch\" o \"attach\".", diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json index 8b6ad71cd4e6d..80bd75c0a090d 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "balanceInward": "Emmet: Equilibrio (entrante)", + "balanceOutward": "Emmet: Equilibrio (saliente)" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index 8b6ad71cd4e6d..328583915c472 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "previousEditPoint": "Emmet: Punto de edición anterior", + "nextEditPoint": "Emmet: Punto de edición siguiente" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json index 8b6ad71cd4e6d..0cc657ddc149a 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "evaluateMathExpression": "Emmet: Evaluar expresión matemática" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json index 8b6ad71cd4e6d..89f65c5221b5a 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "expandAbbreviationAction": "Emmet: Expandir abreviatura" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json index 8b6ad71cd4e6d..ad86576118f83 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "incrementNumberByOneTenth": "Emmet: Aumentar por 0.1", + "incrementNumberByOne": "Emmet: Aumentar por 1", + "incrementNumberByTen": "Emmet: Aumentar por 10", + "decrementNumberByOneTenth": "Emmet: Disminuir por 0.1", + "decrementNumberByOne": "Emmet: Disminuir por 1", + "decrementNumberByTen": "Emmet: Disminuir por 10" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json index 8b6ad71cd4e6d..d87b661b4e8a9 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "matchingPair": "Emmet: Ir al par coincidente" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json index 8b6ad71cd4e6d..c0708b46d94b2 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "mergeLines": "Emmet: Combinar líneas" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json index 8b6ad71cd4e6d..13ab5650e82d9 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "reflectCSSValue": "Emmet: Reflejar valor CSS" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json index 8b6ad71cd4e6d..376b817f89ecc 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "removeTag": "Emmet: Quitar etiqueta" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json index 8b6ad71cd4e6d..632ec2d3325ba 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "selectPreviousItem": "Emmet: Seleccionar elemento anterior", + "selectNextItem": "Emmet: Seleccionar elemento siguiente" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json index 8b6ad71cd4e6d..7daa550395100 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "splitJoinTag": "Emmet: Dividir/combinar etiqueta" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json index 8b6ad71cd4e6d..4c135de0f9c27 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "toggleComment": "Emmet: Alternar comentario" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json index 8b6ad71cd4e6d..7e29db1791985 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateImageSize": "Emmet: Actualizar tamaño de la imagen" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json index 8b6ad71cd4e6d..b09f7caa8be15 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateTag": "Emmet: Actualizar etiqueta", + "enterTag": "Ingresar etiqueta", + "tag": "Etiqueta" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json index 8b6ad71cd4e6d..5b686426df5ee 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "wrapWithAbbreviationAction": "Emmet: Encapsular con abreviatura", + "enterAbbreviation": "Ingresar abreviatura", + "abbreviation": "Abreviatura" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 8b6ad71cd4e6d..176ecb884a191 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "Cuando se habilita, se expande la abreviación Emmet al presionar la tecla TAB.", + "emmetPreferences": "Preferencias usadas para modificar el comportamiento de algunas acciones y resoluciones de Emmet.", + "emmetSyntaxProfiles": "Defina el perfil de la sintaxis especificada o use su propio perfil con reglas específicas.", + "emmetExclude": "Matriz de lenguajes donde no deben expandirse la abreviación Emmet.", + "emmetExtensionsPath": "Ruta de acceso a una carpeta que contiene perfiles de Emmet, fragmentos de código y preferencias" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 7f0f754882e22..abfe36e35ad5a 100644 --- a/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "No se puede escribir la configuración. Corrija los errores o advertencias del archivo y vuelva a intentarlo.", "editTtile": "Editar", "replaceDefaultValue": "Reemplazar en Configuración", "copyDefaultValue": "Copiar en Configuración", diff --git a/i18n/esn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index 7050d4b273130..743e9be299c07 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tareas", "tasksAriaLabel": "Escriba el nombre de una tarea para reiniciar", "noTasksMatching": "No tasks matching", "noTasksFound": "No se encontró ninguna tarea para reiniciar" diff --git a/i18n/esn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index d4bed99f1a222..e6855cb8a9c06 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tareas", "tasksAriaLabel": "Escribir el nombre de una tarea para ejecutar", "noTasksMatching": "No tasks matching", "noTasksFound": "No se encontraron tareas" diff --git a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 29e623a5d20e8..50e571af89f11 100644 --- a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -26,5 +26,7 @@ "workbench.action.terminal.scrollUp": "Desplazar hacia arriba (línea)", "workbench.action.terminal.scrollUpPage": "Desplazar hacia arriba (página)", "workbench.action.terminal.scrollToTop": "Desplazar al principio", - "workbench.action.terminal.clear": "Borrar" + "workbench.action.terminal.clear": "Borrar", + "workbench.action.terminal.allowWorkspaceShell": "Permitir la configuración del área de trabajo Shell", + "workbench.action.terminal.disallowWorkspaceShell": "No permitir la configuración del área de trabajo Shell" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index e39c3a6cfd264..107a0eecf8aef 100644 --- a/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,6 +6,7 @@ { "selectTheme.label": "Tema de color", "installColorThemes": "Instalar temas de color adicionales...", + "themes.selectTheme": "Seleccione el tema de color (flecha arriba/abajo para vista previa)", "selectIconTheme.label": "Tema de icono de archivo", "installIconThemes": "Instalar temas de icono de archivo adicionles...", "noIconThemeLabel": "Ninguno", diff --git a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index eebabe22162c8..9591e0b167391 100644 --- a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,27 +11,20 @@ "welcomePage.openFolder": "Abrir carpeta...", "welcomePage.cloneGitRepository": "Clonar el repositorio GIT...", "welcomePage.recent": "Reciente", + "welcomePage.moreRecent": "Más...", "welcomePage.noRecentFolders": "No hay ninguna carpeta reciente", "welcomePage.help": "Ayuda", - "welcomePage.productDocumentation": "Documentación del producto", "welcomePage.introductoryVideos": "Vídeos de introducción", - "welcomePage.keybindingsReference": "Referencia de métodos abreviados de teclado", + "welcomePage.productDocumentation": "Documentación del producto", "welcomePage.gitHubRepository": "Repositorio de GitHub", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Mostrar página principal al inicio", + "welcomePage.customize": "Personalizar", "welcomePage.installKeymapDescription": "Instalar los métodos abreviados de teclado", - "welcomePage.installKeymap": "Instale los métodos abreviados de teclado de {0}, {1} {2} y {3}", - "welcomePage.vim": "Vim", - "welcomePage.vimCurrent": "Vim (actual)", - "welcomePage.sublime": "Sublime", - "welcomePage.sublimeCurrent": "Sublime (actual)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom (actual)", "welcomePage.others": "otros", "welcomePage.colorTheme": "Tema de color", "welcomePage.colorThemeDescription": "Modifique a su gusto la apariencia del editor y el código", - "welcomePage.configureSettings": "Definir la configuración", - "welcomePage.configureSettingsDescription": "Revele el poder total de VS Code cambiando la configuración", + "welcomePage.learn": "Más información", "welcomePage.showCommands": "Buscar y ejecutar todos los comandos", "welcomePage.showCommandsDescription": "Acceda rápidamente y busque comandos desde el panel de control ({0})", "welcomePage.interfaceOverview": "Introducción a la interfaz", @@ -39,5 +32,8 @@ "welcomePage.interactivePlayground": "Área de juegos interactiva", "welcomePage.interactivePlaygroundDescription": "Pruebe las características esenciales del editor en un tutorial corto", "welcomePage.quickLinks": "Vínculos rápidos", - "welcomePage.keybindingsReferenceDescription": "Un PDF imprimible con los métodos abreviados de teclado más comunes" + "welcomePage.keybindingsReference": "Referencia de métodos abreviados de teclado", + "welcomePage.keybindingsReferenceDescription": "Un PDF imprimible con los métodos abreviados de teclado más comunes", + "welcomePage.configureSettings": "Definir la configuración", + "welcomePage.configureSettingsDescription": "Revele el poder total de VS Code cambiando la configuración" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 78fdb50afd68f..28283fba5c3e1 100644 --- a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,13 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Bienvenido", - "welcome.title": "Bienvenido", "welcomePage.keymapAlreadyInstalled": "Los métodos abreviados de teclado {0} ya están instalados.", "welcomePage.willReloadAfterInstallingKeymap": "La ventana se volverá a cargar después de instalar los métodos abreviados de teclado {0}.", - "ok": "Aceptar", "welcomePage.installingKeymap": "Instalando los métodos abreviados de teclado de {0}...", "welcomePage.keymapNotFound": "No se pudieron encontrar los métodos abreviados de teclado {0} con el identificador {1}.", - "cancel": "Cancelar" + "welcome.title": "Bienvenido", + "ok": "Aceptar", + "cancel": "Cancelar", + "welcomePage.quickLinkBackground": "Color de fondo de los vínculos rápidos en la página principal.", + "welcomePage.quickLinkHoverBackground": "Mantener el puntero sobre el color de fondo para acceder los vínculos rápidos en la página principal." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/esn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index bf82a6e7f653c..7dc0e8efbdfbc 100644 --- a/i18n/esn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "walkThrough.unboundCommand": "sin enlazar", - "walkThrough.gitNotFound": "Parece que GIT no está instalado en el sistema." + "walkThrough.gitNotFound": "Parece que GIT no está instalado en el sistema.", + "walkThrough.embeddedEditorBackground": "Color de fondo de los editores incrustrados en la área de juegos" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/esn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 108c1b8582466..c8e25212f8bab 100644 --- a/i18n/esn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/esn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -6,6 +6,7 @@ { "open": "Abrir configuración", "close": "Cerrar", + "saveAndRetry": "Guardar la configuración y reintentar. ", "errorUnknownKey": "No se puede escribir en el archivo de configuración (clave desconocida)", "errorInvalidTarget": "No se puede escribir en el archivo de configuración (destino no válido).", "errorNoWorkspaceOpened": "No se pudo guardar la configuración porque no tiene una carpeta abierta. Abra una carpeta primero y vuelva a intentarlo.", diff --git a/i18n/fra/extensions/jake/out/main.i18n.json b/i18n/fra/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/jake/out/main.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/extensions/jake/package.i18n.json b/i18n/fra/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/jake/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/extensions/typescript/out/utils/logger.i18n.json b/i18n/fra/extensions/typescript/out/utils/logger.i18n.json index 8b6ad71cd4e6d..bc738f43d0c37 100644 --- a/i18n/fra/extensions/typescript/out/utils/logger.i18n.json +++ b/i18n/fra/extensions/typescript/out/utils/logger.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json index 93596cccabe56..afe0864b817de 100644 --- a/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "Contrôle l'épaisseur de police.", "fontSize": "Contrôle la taille de police en pixels.", "lineHeight": "Contrôle la hauteur de ligne. Utilisez 0 pour calculer lineHeight à partir de fontSize.", + "letterSpacing": "Définit l'espacement des caractères en pixels.", "lineNumbers": "Contrôle l'affichage des numéros de ligne. Les valeurs possibles sont 'activé', 'désactivé' et 'relatif'. La valeur 'relatif' indique le numéro de ligne à partir de la position actuelle du curseur.", "rulers": "Colonnes où afficher les règles verticales", "wordSeparators": "Caractères utilisés comme séparateurs de mots durant la navigation ou les opérations basées sur les mots", diff --git a/i18n/fra/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/fra/src/vs/editor/common/view/editorColorRegistry.i18n.json index b8302d62f69c2..77ca0b5bb8ff8 100644 --- a/i18n/fra/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/fra/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -10,5 +10,11 @@ "caret": "Couleur du curseur de l'éditeur.", "editorWhitespaces": "Couleur des espaces blancs dans l'éditeur.", "editorIndentGuides": "Couleur des repères de retrait de l'éditeur.", - "editorLineNumbers": "Couleur des numéros de ligne de l'éditeur." + "editorLineNumbers": "Couleur des numéros de ligne de l'éditeur.", + "editorRuler": "Couleur des règles de l'éditeur", + "editorCodeLensForeground": "Couleur pour les indicateurs CodeLens", + "editorBracketMatchBackground": "Couleur d'arrière-plan pour les accolades associées", + "editorBracketMatchBorder": "Couleur pour le contour des accolades associées", + "editorOverviewRulerBorder": "Couleur de la bordure de la règle d'apperçu.", + "editorGutter": "Couleur de fond pour la bordure de l'éditeur. La bordure contient les marges pour les symboles et les numéros de ligne." } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 0632013723d86..e38b8d1bf14ed 100644 --- a/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,6 +9,7 @@ "editorSuggestWidgetForeground": "Couleur de premier plan du widget de suggestion.", "editorSuggestWidgetSelectedBackground": "Couleur d'arrière-plan de l'entrée sélectionnée dans le widget de suggestion.", "editorSuggestWidgetHighlightForeground": "Couleur de la surbrillance des correspondances dans le widget de suggestion.", + "readMore": "En savoir plus...{0}", "suggestionWithDetailsAriaLabel": "{0}, suggestion, avec détails", "suggestionAriaLabel": "{0}, suggestion", "suggestWidget.loading": "Chargement...", diff --git a/i18n/fra/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/fra/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index bdd70d229dba5..1d2d1988d2fae 100644 --- a/i18n/fra/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/fra/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,9 @@ "schema.brackets": "Définit les symboles de type crochet qui augmentent ou diminuent le retrait.", "schema.autoClosingPairs": "Définit les paires de crochets. Quand vous entrez un crochet ouvrant, le crochet fermant est inséré automatiquement.", "schema.autoClosingPairs.notIn": "Définit une liste d'étendues où les paires automatiques sont désactivées.", - "schema.surroundingPairs": "Définit les paires de crochets qui peuvent être utilisées pour entourer la chaîne sélectionnée." + "schema.surroundingPairs": "Définit les paires de crochets qui peuvent être utilisées pour entourer la chaîne sélectionnée.", + "schema.wordPattern": "La définition du mot dans le langage", + "schema.wordPattern.pattern": "L'expression régulière utilisée pour la recherche", + "schema.wordPattern.flags": "Les options d'expression régulière utilisées pour la recherche", + "schema.wordPattern.flags.errorMessage": "Doit valider l'expression régulière `/^([gimuy]+)$/`." } \ No newline at end of file diff --git a/i18n/fra/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/fra/src/vs/platform/markers/common/problemMatcher.i18n.json index 144b90a8319ff..985f7884334dd 100644 --- a/i18n/fra/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/fra/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,7 +34,6 @@ "ProblemMatcherParser.noValidIdentifier": "Erreur : la propriété de modèle {0} n'est pas un nom de variable de modèle valide.", "ProblemMatcherParser.problemPattern.watchingMatcher": "Un détecteur de problèmes de correspondance doit définir un modèle de début et un modèle de fin à observer.", "ProblemMatcherParser.invalidRegexp": "Erreur : la chaîne {0} est une expression régulière non valide.\n", - "WatchingPatternSchema.regexp": "Expression régulière permettant de détecter le début ou la fin d'une tâche de suivi.", "WatchingPatternSchema.file": "Index de groupe de correspondance du nom de fichier. Peut être omis.", "PatternTypeSchema.name": "Nom d'un modèle faisant l'objet d'une contribution ou prédéfini", "PatternTypeSchema.description": "Modèle de problème ou bien nom d'un modèle de problème faisant l'objet d'une contribution ou prédéfini. Peut être omis si base est spécifié.", @@ -46,7 +45,6 @@ "ProblemMatcherSchema.watching.activeOnStart": "Si la valeur est true, le mode espion est actif au démarrage de la tâche. Cela revient à émettre une ligne qui correspond à beginPattern", "ProblemMatcherSchema.watching.beginsPattern": "En cas de correspondance dans la sortie, le début d'une tâche de suivi est signalé.", "ProblemMatcherSchema.watching.endsPattern": "En cas de correspondance dans la sortie, la fin d'une tâche de suivi est signalée.", - "ProblemMatcherSchema.watching": "Modèles de suivi du début et de la fin d'un modèle espion.", "LegacyProblemMatcherSchema.watchedBegin.deprecated": "Cette propriété est déconseillée. Utilisez la propriété espion à la place.", "LegacyProblemMatcherSchema.watchedBegin": "Expression régulière signalant qu'une tâche faisant l'objet d'un suivi commence à s'exécuter via le suivi d'un fichier.", "LegacyProblemMatcherSchema.watchedEnd.deprecated": "Cette propriété est déconseillée. Utilisez la propriété espion à la place.", diff --git a/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json index c626b2d262bee..4977fe04f0ba5 100644 --- a/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -7,9 +7,15 @@ "invalid.color": "Format de couleur non valide. Utilisez #RGB, #RGBA, #RRGGBB ou #RRGGBBAA", "schema.colors": "Couleurs utilisées dans le banc d'essai.", "foreground": "Couleur de premier plan globale. Cette couleur est utilisée si elle n'est pas remplacée par un composant.", + "errorForeground": "Couleur principale de premier plan pour les messages d'erreur. Cette couleur est utilisée uniquement si elle n'est pas redéfinie par un composant.", + "descriptionForeground": "Couleur de premier plan du texte descriptif fournissant des informations supplémentaires, par exemple pour un label.", "focusBorder": "Couleur de bordure globale des éléments ayant le focus. Cette couleur est utilisée si elle n'est pas remplacée par un composant.", "contrastBorder": "Bordure supplémentaire autour des éléments pour les séparer des autres et obtenir un meilleur contraste.", "activeContrastBorder": "Bordure supplémentaire autour des éléments actifs pour les séparer des autres et obtenir un meilleur contraste.", + "textSeparatorForeground": "Couleur pour les séparateurs de texte.", + "textLinkForeground": "Couleur des liens dans le texte.", + "textLinkActiveForeground": "Couleur des liens actifs dans le texte.", + "textPreformatForeground": "Couleur des segments de texte préformatés.", "widgetShadow": "Couleur de l'ombre des widgets, comme rechercher/remplacer, au sein de l'éditeur.", "inputBoxBackground": "Arrière-plan de la zone d'entrée.", "inputBoxForeground": "Premier plan de la zone d'entrée.", @@ -36,10 +42,13 @@ "buttonForeground": "Couleur de premier plan du bouton.", "buttonBackground": "Couleur d'arrière-plan du bouton.", "buttonHoverBackground": "Couleur d'arrière-plan du bouton pendant le pointage.", + "badgeBackground": "Couleur de fond des badges. Les badges sont de courts libelés d'information, ex. le nombre de résultats de recherche.", + "badgeForeground": "Couleur des badges. Les badges sont de courts libelés d'information, ex. le nombre de résultats de recherche.", "scrollbarShadow": "Ombre de la barre de défilement pour indiquer que la vue défile.", "scrollbarSliderBackground": "Couleur d'arrière-plan du curseur.", "scrollbarSliderHoverBackground": "Couleur d'arrière-plan du curseur pendant le pointage.", "scrollbarSliderActiveBackground": "Couleur d'arrière-plan du curseur actif.", + "progressBarBackground": "Couleur de fond pour la barre de progression qui peut s'afficher lors d'opérations longues.", "editorBackground": "Couleur d'arrière-plan de l'éditeur.", "editorForeground": "Couleur de premier plan par défaut de l'éditeur.", "editorWidgetBackground": "Couleur d'arrière-plan des gadgets de l'éditeur tels que rechercher/remplacer.", @@ -52,5 +61,9 @@ "hoverHighlight": "Mettez en surbrillance ci-dessous le mot pour lequel un pointage s'affiche.", "hoverBackground": "Couleur d'arrière-plan du pointage de l'éditeur.", "hoverBorder": "Couleur de bordure du pointage de l'éditeur.", - "activeLinkForeground": "Couleur des liens actifs." + "activeLinkForeground": "Couleur des liens actifs.", + "diffEditorInserted": "Couleur d'arrière-plan du texte inséré.", + "diffEditorRemoved": "Couleur d'arrière-plan du texte supprimé.", + "diffEditorInsertedOutline": "Couleur de contour du texte inséré.", + "diffEditorRemovedOutline": "Couleur de contour du texte supprimé." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/fra/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/shell.i18n.json index 6a2b2ffff3f03..a24bedcde3d85 100644 --- a/i18n/fra/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/fra/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "Il est déconseillé d'exécuter du code en tant qu'utilisateur 'root'.", - "prof.message": "Création réussie des profils.", - "prof.detail": "Créez un problème et joignez manuellement les fichiers suivants :\n{0}", - "prof.restartAndFileIssue": "Créer le problème et redémarrer", - "prof.restart": "Redémarrer" + "runningAsRoot": "Il est déconseillé d'exécuter du code en tant qu'utilisateur 'root'." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/electron-browser/window.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/window.i18n.json index 133473eb18087..4bb9062991df2 100644 --- a/i18n/fra/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/fra/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "Coller", "selectAll": "Tout Sélectionner", "confirmOpen": "Voulez-vous vraiment ouvrir {0} dossiers ?", - "confirmOpenButton": "&&Ouvrir...", - "developer": "Développeur", - "file": "Fichier" + "confirmOpenButton": "&&Ouvrir..." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json index 8b6ad71cd4e6d..b64bb8a15ccd6 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "balanceInward": "Emmet : Balance (inward)", + "balanceOutward": "Emmet : Balance (outward)" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index 8b6ad71cd4e6d..a8c5798771114 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "previousEditPoint": "Emmet : Previous Edit Point", + "nextEditPoint": "Emmet : Next Edit Point" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json index 8b6ad71cd4e6d..4f8041f2fb1b3 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "evaluateMathExpression": "Emmet : Evaluate Math Expression" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json index 8b6ad71cd4e6d..29b06df4dcee7 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "expandAbbreviationAction": "Emmet : Expand Abbreviation" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json index 8b6ad71cd4e6d..89cee185d4d45 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "incrementNumberByOneTenth": "Emmet : Increment by 0.1", + "incrementNumberByOne": "Emmet : Increment by 1", + "incrementNumberByTen": "Emmet : Increment by 10", + "decrementNumberByOneTenth": "Emmet : Decrement by 0.1", + "decrementNumberByOne": "Emmet : Decrement by 1", + "decrementNumberByTen": "Emmet : Decrement by 10" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json index 8b6ad71cd4e6d..fd27599315ae8 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "matchingPair": "Emmet : Go to Matching Pair" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json index 8b6ad71cd4e6d..172231ee72ccf 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "mergeLines": "Emmet : Merge Lines" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json index 8b6ad71cd4e6d..e15d8ff52bc8a 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "reflectCSSValue": "Emmet : Reflect CSS Value" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json index 8b6ad71cd4e6d..1764345605f84 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "removeTag": "Emmet : Remove Tag" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json index 8b6ad71cd4e6d..b53add8790941 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "selectPreviousItem": "Emmet : Select Previous Item", + "selectNextItem": "Emmet : Select Next Item" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json index 8b6ad71cd4e6d..701bd61f9b934 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "splitJoinTag": "Emmet : Split/Join Tag" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json index 8b6ad71cd4e6d..46ab423bdfc7f 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "toggleComment": "Emmet : Toggle Comment" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json index 8b6ad71cd4e6d..ce110b0e82d9b 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateImageSize": "Emmet : Update Image Size" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json index 8b6ad71cd4e6d..948679f37cfbc 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateTag": "Emmet : Update Tag", + "enterTag": "Entrer une balise", + "tag": "Balise" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json index 8b6ad71cd4e6d..4e4c925168c85 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "wrapWithAbbreviationAction": "Emmet : Wrap with Abbreviation", + "enterAbbreviation": "Entrer une abréviation", + "abbreviation": "Abréviation" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 8b6ad71cd4e6d..33db3866d0c12 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "Une fois les abréviations Emmet activées, elles se développent quand vous appuyez sur la touche Tab.", + "emmetPreferences": "Préférences utilisées pour modifier le comportement de certaines actions et résolveurs d'Emmet.", + "emmetSyntaxProfiles": "Définissez le profil pour la syntaxe spécifiée ou utilisez votre propre profil avec des règles spécifiques.", + "emmetExclude": "Ensemble de langages où les abréviations emmet ne doivent pas être développées.", + "emmetExtensionsPath": "Chemin d'un dossier contenant les profils, extraits et préférences Emmet" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index 523b1b3eedffa..03c80a19e007f 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks", "tasksAriaLabel": "Tapez le nom d'une tâche à redémarrer", "noTasksMatching": "Aucune tâche correspondante", "noTasksFound": "Aucune tâche à recommencer n'a été trouvée" diff --git a/i18n/fra/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index dbe8afe6d875f..f1a32f4b7bfb6 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks", "tasksAriaLabel": "Tapez le nom d'une tâche à exécuter", "noTasksMatching": "No tasks matching", "noTasksFound": "Tâches introuvables" diff --git a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index f533c1e348e41..88d26394dcf40 100644 --- a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -13,25 +13,16 @@ "welcomePage.recent": "Récent", "welcomePage.noRecentFolders": "Aucun dossier récent", "welcomePage.help": "Aide", - "welcomePage.productDocumentation": "Documentation du produit", "welcomePage.introductoryVideos": "Vidéos d'introduction", - "welcomePage.keybindingsReference": "Référence des raccourcis clavier", + "welcomePage.productDocumentation": "Documentation du produit", "welcomePage.gitHubRepository": "Dépôt GitHub", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Afficher la page d'accueil au démarrage", + "welcomePage.customize": "Personnaliser", "welcomePage.installKeymapDescription": "Installer les raccourcis clavier", - "welcomePage.installKeymap": "Installez les raccourcis clavier de {0}, {1}, {2} et {3}", - "welcomePage.vim": "Vim", - "welcomePage.vimCurrent": "Vim (actuel)", - "welcomePage.sublime": "Sublime", - "welcomePage.sublimeCurrent": "Sublime (actuel)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom (actuel)", "welcomePage.others": "autres", "welcomePage.colorTheme": "Thème de couleur", "welcomePage.colorThemeDescription": "Personnalisez l'apparence de l'éditeur et de votre code", - "welcomePage.configureSettings": "Configurer les paramètres", - "welcomePage.configureSettingsDescription": "Déverrouillez toute la puissance de VS Code en adaptant les paramètres", "welcomePage.showCommands": "Rechercher et exécuter toutes les commandes", "welcomePage.showCommandsDescription": "Utilisez et recherchez rapidement des commandes dans le Panneau de configuration ({0})", "welcomePage.interfaceOverview": "Vue d'ensemble de l'interface", @@ -39,5 +30,8 @@ "welcomePage.interactivePlayground": "Terrain de jeu interactif", "welcomePage.interactivePlaygroundDescription": "Essayez les fonctionnalités essentielles de l'éditeur en suivant une brève procédure pas à pas", "welcomePage.quickLinks": "Liens rapides", - "welcomePage.keybindingsReferenceDescription": "Fichier PDF imprimable avec les raccourcis clavier les plus usuels" + "welcomePage.keybindingsReference": "Référence des raccourcis clavier", + "welcomePage.keybindingsReferenceDescription": "Fichier PDF imprimable avec les raccourcis clavier les plus usuels", + "welcomePage.configureSettings": "Configurer les paramètres", + "welcomePage.configureSettingsDescription": "Déverrouillez toute la puissance de VS Code en adaptant les paramètres" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 3d4de6c3ca3fa..915c12960a049 100644 --- a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,11 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Bienvenue", - "welcome.title": "Bienvenue", "welcomePage.keymapAlreadyInstalled": "Les raccourcis clavier {0} sont déjà installés.", "welcomePage.willReloadAfterInstallingKeymap": "La fenêtre se recharge après l'installation des raccourcis clavier {0}.", - "ok": "OK", "welcomePage.installingKeymap": "Installation des raccourcis clavier de {0}...", "welcomePage.keymapNotFound": "Les raccourcis clavier {0} ayant l'ID {1} sont introuvables.", + "welcome.title": "Bienvenue", + "ok": "OK", "cancel": "Annuler" } \ No newline at end of file diff --git a/i18n/ita/extensions/git/out/commands.i18n.json b/i18n/ita/extensions/git/out/commands.i18n.json index a95a76b686a72..530bbe4a409b9 100644 --- a/i18n/ita/extensions/git/out/commands.i18n.json +++ b/i18n/ita/extensions/git/out/commands.i18n.json @@ -18,6 +18,7 @@ "discard": "Rimuovi modifiche", "confirm discard all": "Sei sicuro di voler annullare TUTTE le modifiche? Quest'azione è IRREVERSIBILE!", "discardAll": "Rimuovi TUTTE le modifiche", + "no staged changes": "Non ci sono modifiche in stage di cui eseguire il commit.\n\nSI desidera mettere in stage automaticamente tutte le modifiche ed eseguirne il commit direttamente?", "yes": "Sì", "always": "Sempre", "no changes": "Non ci sono modifiche di cui eseguire il commit.", diff --git a/i18n/ita/extensions/git/package.i18n.json b/i18n/ita/extensions/git/package.i18n.json index ec477ab6861ac..3ba24f908e935 100644 --- a/i18n/ita/extensions/git/package.i18n.json +++ b/i18n/ita/extensions/git/package.i18n.json @@ -42,5 +42,7 @@ "config.countBadge": "Controlla il contatore delle notifiche git. Con `all` vengono conteggiate tutte le modifiche. Con `tracked` vengono conteggiate solo le revisioni. Con `off` il contatore è disattivato.", "config.checkoutType": "Controlla il tipo di branch mostrati eseguendo il comando `Checkout in...`. `all` mostra tutti i refs, `local` mostra solamente i branch locali, `tags` mostra solamente i tag e `remote` mostra solamente i branch remoti.", "config.ignoreLegacyWarning": "Ignora l'avvertimento legacy di Git", - "config.ignoreLimitWarning": "Ignora il messaggio di avviso quando ci sono troppi cambiamenti in un repository" + "config.ignoreLimitWarning": "Ignora il messaggio di avviso quando ci sono troppi cambiamenti in un repository", + "config.defaultCloneDirectory": "Il percorso predefinito dove clonare un repository GIT", + "config.enableSmartCommit": "Eseguire il commit di tutte le modifiche quando non ci sono cambiamenti in stage." } \ No newline at end of file diff --git a/i18n/ita/extensions/jake/out/main.i18n.json b/i18n/ita/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/jake/out/main.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/extensions/jake/package.i18n.json b/i18n/ita/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/jake/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/ita/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json index 8b6ad71cd4e6d..39fde0fced390 100644 --- a/i18n/ita/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json +++ b/i18n/ita/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "ts-check": "Attiva il controllo semantico in un file JavaScript. Deve essere all'inizio del file.", + "ts-nocheck": "Disattiva il controllo semantico in un file JavaScript. Deve essere all'inizio del file.", + "ts-ignore": "Elimina errori di @ts-check sulla riga successiva di un file." +} \ No newline at end of file diff --git a/i18n/ita/extensions/typescript/out/utils/logger.i18n.json b/i18n/ita/extensions/typescript/out/utils/logger.i18n.json index 8b6ad71cd4e6d..bc738f43d0c37 100644 --- a/i18n/ita/extensions/typescript/out/utils/logger.i18n.json +++ b/i18n/ita/extensions/typescript/out/utils/logger.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/ita/extensions/typescript/package.i18n.json b/i18n/ita/extensions/typescript/package.i18n.json index c6928c133322f..36ff2654b3ec4 100644 --- a/i18n/ita/extensions/typescript/package.i18n.json +++ b/i18n/ita/extensions/typescript/package.i18n.json @@ -33,9 +33,13 @@ "javascript.validate.enable": "Abilita/Disabilita la convalida JavaScript.", "typescript.goToProjectConfig.title": "Passa a Configurazione progetto", "javascript.goToProjectConfig.title": "Passa a Configurazione progetto", + "javascript.referencesCodeLens.enabled": "Abilita/disabilita riferimenti CodeLens nei file JavaScript.", + "typescript.referencesCodeLens.enabled": "Abilita/disabilita riferimenti CodeLens nei file TypeScript. Richiede TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Abilita/Disabilita le finestre CodeLens per le implementazioni. Richiede una versione di TypeScript uguale o successiva alla 2.2.0.", + "typescript.openTsServerLog.title": "Apri il log del server TypeScript", "typescript.selectTypeScriptVersion.title": "Seleziona la versione di TypeScript", "jsDocCompletion.enabled": "Abilita/Disabilita commenti automatici JSDoc", "javascript.implicitProjectConfig.checkJs": "Abilita/disabilita il controllo semantico di file JavaScript. File jsconfig.json o tsconfig.json esistenti sovrascrivono su questa impostazione. Richiede TypeScript >= 2.3.1.", - "typescript.check.npmIsInstalled": "Controllare se NPM è installato per l'acquisizione automatica delle definizioni di tipi" + "typescript.check.npmIsInstalled": "Controllare se NPM è installato per l'acquisizione automatica delle definizioni di tipi", + "javascript.nameSuggestions": "Abilita/disabilita l'inclusione di nomi univoci dal file negli elenchi di suggerimento di JavaScript." } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json index 99cb8b5cd77c2..59f730fe1dc6d 100644 --- a/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "Controlla lo spessore del carattere.", "fontSize": "Controlla le dimensioni del carattere in pixel.", "lineHeight": "Controlla l'altezza della riga. Usare 0 per calcolare l'altezza della riga dalle dimensioni del carattere.", + "letterSpacing": "Controlla la spaziatura tra le lettere in pixel.", "lineNumbers": "Consente di controllare la visualizzazione dei numeri di riga. I valori possibili sono 'on', 'off' e 'relative'. Con 'relative' viene visualizzato il conteggio delle righe a partire dalla posizione corrente del cursore.", "rulers": "Colonne in corrispondenza delle quali visualizzare i righelli verticali", "wordSeparators": "Caratteri che verranno usati come separatori di parola quando si eseguono operazioni o spostamenti correlati a parole", diff --git a/i18n/ita/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/ita/src/vs/editor/common/view/editorColorRegistry.i18n.json index 6cf52ddd21ea2..48a155767d2a5 100644 --- a/i18n/ita/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/ita/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -10,5 +10,11 @@ "caret": "Colore del cursore dell'editor.", "editorWhitespaces": "Colore dei caratteri di spazio vuoto nell'editor.", "editorIndentGuides": "Colore delle guide per i rientri dell'editor.", - "editorLineNumbers": "Colore dei numeri di riga dell'editor." + "editorLineNumbers": "Colore dei numeri di riga dell'editor.", + "editorRuler": "Colore dei righelli dell'editor.", + "editorCodeLensForeground": "Colore primo piano delle finestre di CodeLens dell'editor", + "editorBracketMatchBackground": "Colore di sfondo delle parentesi corrispondenti", + "editorBracketMatchBorder": "Colore delle caselle di parentesi corrispondenti", + "editorOverviewRulerBorder": "Colore del bordo del righello delle annotazioni.", + "editorGutter": "Colore di sfondo della barra di navigazione dell'editor. La barra contiene i margini di glifo e i numeri di riga." } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index 60ce91d8df1c6..1b3c14ffa2f41 100644 --- a/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -16,9 +16,12 @@ "peekViewTitleInfoForeground": "Colore delle informazioni del titolo della visualizzazione rapida.", "peekViewBorder": "Colore dei bordi e della freccia della visualizzazione rapida.", "peekViewResultsBackground": "Colore di sfondo dell'elenco risultati della visualizzazione rapida.", + "peekViewResultsMatchForeground": "Colore primo piano dei nodi riga nell'elenco risultati della visualizzazione rapida.", + "peekViewResultsFileForeground": "Colore primo piano dei nodi file nell'elenco risultati della visualizzazione rapida.", "peekViewResultsSelectionBackground": "Colore di sfondo della voce selezionata nell'elenco risultati della visualizzazione rapida.", "peekViewResultsSelectionForeground": "Colore primo piano della voce selezionata nell'elenco risultati della visualizzazione rapida.", "peekViewEditorBackground": "Colore di sfondo dell'editor di visualizzazioni rapide.", + "peekViewEditorGutterBackground": "Colore di sfondo della barra di navigazione nell'editor visualizzazione rapida.", "peekViewResultsMatchHighlight": "Colore dell'evidenziazione delle corrispondenze nell'elenco risultati della visualizzazione rapida.", "peekViewEditorMatchHighlight": "Colore dell'evidenziazione delle corrispondenze nell'editor di visualizzazioni rapide." } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index bbb46151abd3d..eb519f2c5dd12 100644 --- a/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,8 +9,10 @@ "editorSuggestWidgetForeground": "Colore primo piano del widget dei suggerimenti.", "editorSuggestWidgetSelectedBackground": "Colore di sfondo della voce selezionata del widget dei suggerimenti.", "editorSuggestWidgetHighlightForeground": "Colore delle evidenziazioni corrispondenze nel widget dei suggerimenti.", + "readMore": "Altre informazioni...{0}", "suggestionWithDetailsAriaLabel": "{0}, suggerimento, con dettagli", "suggestionAriaLabel": "{0}, suggerimento", + "readLess": "Meno informazioni... {0}", "suggestWidget.loading": "Caricamento...", "suggestWidget.noSuggestions": "Non ci sono suggerimenti.", "suggestionAriaAccepted": "{0}, accettato", diff --git a/i18n/ita/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/ita/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index 50520a5626eb7..0a974d1491503 100644 --- a/i18n/ita/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/ita/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,9 @@ "schema.brackets": "Definisce i simboli di parentesi quadra che aumentano o riducono il rientro.", "schema.autoClosingPairs": "Definisce le coppie di parentesi quadre. Quando viene immessa una parentesi quadra di apertura, quella di chiusura viene inserita automaticamente.", "schema.autoClosingPairs.notIn": "Definisce un elenco di ambiti in cui la corrispondenza automatica delle coppie è disabilitata.", - "schema.surroundingPairs": "Definisce le coppie di parentesi quadre che possono essere usate per racchiudere una stringa selezionata." + "schema.surroundingPairs": "Definisce le coppie di parentesi quadre che possono essere usate per racchiudere una stringa selezionata.", + "schema.wordPattern": "La definizione di parola per il linguaggio.", + "schema.wordPattern.pattern": "Il modello di RegExp utilizzato per trovare parole.", + "schema.wordPattern.flags": "I flag di RegExp utilizzati per trovare parole.", + "schema.wordPattern.flags.errorMessage": "Deve corrispondere al modello `/^([gimuy]+)$/`." } \ No newline at end of file diff --git a/i18n/ita/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/ita/src/vs/platform/markers/common/problemMatcher.i18n.json index a69fc6f95b311..a2611139aecce 100644 --- a/i18n/ita/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/ita/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,7 +34,6 @@ "ProblemMatcherParser.noValidIdentifier": "Errore: la proprietà {0} del criterio non è un nome di variabile criterio valido.", "ProblemMatcherParser.problemPattern.watchingMatcher": "Un matcher problemi deve definire un criterio di inizio e un criterio di fine per il controllo.", "ProblemMatcherParser.invalidRegexp": "Errore: la stringa {0} non è un'espressione regolare valida.\n", - "WatchingPatternSchema.regexp": "Espressione regolare per rilevare l'inizio o la fine di un'attività di controllo.", "WatchingPatternSchema.file": "Indice del gruppo di corrispondenze del nome file. Può essere omesso.", "PatternTypeSchema.name": "Nome di un criterio predefinito o aggiunto come contributo", "PatternTypeSchema.description": "Criterio di problema o nome di un criterio di problema predefinito o aggiunto come contributo. Può essere omesso se si specifica base.", @@ -46,7 +45,6 @@ "ProblemMatcherSchema.watching.activeOnStart": "Se impostato su true, indica che il watcher è in modalità attiva all'avvio dell'attività. Equivale a inviare una riga che corrisponde al criterio di avvio", "ProblemMatcherSchema.watching.beginsPattern": "Se corrisponde nell'output, viene segnalato l'avvio di un'attività di controllo.", "ProblemMatcherSchema.watching.endsPattern": "Se corrisponde nell'output, viene segnalata la fine di un'attività di controllo.", - "ProblemMatcherSchema.watching": "Criteri per tenere traccia dell'inizio e della fine di un criterio di controllo.", "LegacyProblemMatcherSchema.watchedBegin.deprecated": "Questa proprietà è deprecata. In alternativa, usare la proprietà watching.", "LegacyProblemMatcherSchema.watchedBegin": "Espressione regolare con cui viene segnalato l'avvio dell'esecuzione di un'attività controllata attivato tramite il controllo dei file.", "LegacyProblemMatcherSchema.watchedEnd.deprecated": "Questa proprietà è deprecata. In alternativa, usare la proprietà watching.", diff --git a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json index 927b93f7b8db4..e1d1005789b54 100644 --- a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -7,14 +7,25 @@ "invalid.color": "Formato colore non valido. Usare #RGB, #RGBA, #RRGGBB o #RRGGBBAA", "schema.colors": "Colori usati nell'area di lavoro.", "foreground": "Colore primo piano. Questo colore è utilizzato solo se non viene sovrascritto da un componente.", + "errorForeground": "Colore primo piano globale per i messaggi di errore. Questo colore è utilizzato solamente se non viene sottoposto a override da un componente.", + "descriptionForeground": "Colore primo piano del testo che fornisce informazioni aggiuntive, ad esempio per un'etichetta di testo.", "focusBorder": "Colore dei bordi degli elementi evidenziati. Questo colore è utilizzato solo se non viene sovrascritto da un componente.", "contrastBorder": "Un bordo supplementare attorno agli elementi per contrastarli maggiormente rispetto agli altri.", "activeContrastBorder": "Un bordo supplementare intorno agli elementi attivi per contrastarli maggiormente rispetto agli altri.", + "selectionBackground": "Il colore di sfondo delle selezioni di testo nel workbench (ad esempio per i campi di input o aree di testo). Si noti che questo non si applica alle selezioni all'interno dell'editor e del terminale.", + "textSeparatorForeground": "Colore dei separatori di testo.", + "textLinkForeground": "Colore primo piano dei link nel testo.", + "textLinkActiveForeground": "Colore primo piano dei link attivi nel testo.", + "textPreformatForeground": "Colore primo piano dei segmenti di testo preformattato.", + "textBlockQuoteBackground": "Colore di sfondo per le citazioni nel testo.", + "textBlockQuoteBorder": "Colore bordo per citazioni nel testo.", + "textCodeBlockBackground": "Colore sfondo per blocchi di codice nel testo.", "widgetShadow": "Colore ombreggiatura dei widget, ad es. Trova/Sostituisci all'interno dell'editor.", "inputBoxBackground": "Sfondo della casella di input.", "inputBoxForeground": "Primo piano della casella di input.", "inputBoxBorder": "Bordo della casella di input.", "inputBoxActiveOptionBorder": "Colore del bordo di opzioni attivate nei campi di input.", + "inputPlaceholderForeground": "Colore primo piano di casella di input per il testo segnaposto.", "inputValidationInfoBackground": "Colore di sfondo di convalida dell'input di tipo Informazione.", "inputValidationInfoBorder": "Colore bordo di convalida dell'input di tipo Informazione.", "inputValidationWarningBackground": "Colore di sfondo di convalida dell'input di tipo Avviso.", @@ -25,10 +36,13 @@ "dropdownForeground": "Primo piano dell'elenco a discesa.", "dropdownBorder": "Bordo dell'elenco a discesa.", "listFocusBackground": "Colore sfondo Elenco/Struttura ad albero per l'elemento evidenziato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", + "listFocusForeground": "Colore primo piano Elenco/Struttura ad albero per l'elemento con stato attivo quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", "listActiveSelectionBackground": "Colore sfondo Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", "listActiveSelectionForeground": "Colore primo piano Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è attivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", "listInactiveSelectionBackground": "Colore sfondo Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è inattivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", + "listInactiveSelectionForeground": "Colore primo piano Elenco/Struttura ad albero per l'elemento selezionato quando l'Elenco/Struttura ad albero è inattivo. Un Elenco/Struttura ad albero attivo\nha il focus della tastiera, uno inattivo no.", "listHoverBackground": "Sfondo Elenco/Struttura ad albero al passaggio del mouse sugli elementi.", + "listHoverForeground": "Primo piano Elenco/Struttura ad albero al passaggio del mouse sugli elementi.", "listDropBackground": "Sfondo Elenco/Struttura ad albero durante il trascinamento degli elementi selezionati.", "highlight": "Colore primo piano Elenco/Struttura ad albero delle occorrenze trovate durante la ricerca nell'Elenco/Struttura ad albero.", "pickerGroupForeground": "Colore di selezione rapida per il raggruppamento delle etichette.", @@ -36,13 +50,17 @@ "buttonForeground": "Colore primo piano del pulsante.", "buttonBackground": "Colore di sfondo del pulsante.", "buttonHoverBackground": "Colore di sfondo del pulsante al passaggio del mouse.", + "badgeBackground": "Colore di sfondo del badge. I badge sono piccole etichette informative, ad esempio per mostrare il conteggio dei risultati di una ricerca.", + "badgeForeground": "Colore primo piano del badge. I badge sono piccole etichette informative, ad esempio per mostrare il conteggio dei risultati di una ricerca.", "scrollbarShadow": "Ombra di ScrollBar per indicare lo scorrimento della visualizzazione.", "scrollbarSliderBackground": "Colore di sfondo dello Slider.", "scrollbarSliderHoverBackground": "Colore di sfondo dello Slider al passaggio del mouse", "scrollbarSliderActiveBackground": "Colore di sfondo dello Slider quando attivo.", + "progressBarBackground": "Colore di sfondo dell'indicatore di stato che può essere mostrato durante l'esecuzione di operazioni lunghe.", "editorBackground": "Colore di sfondo dell'editor.", "editorForeground": "Colore primo piano predefinito dell'editor.", "editorWidgetBackground": "Colore di sfondo dei widget dell'editor, ad esempio Trova/Sostituisci.", + "editorWidgetBorder": "Colore del bordo del widget editor.", "editorSelection": "Colore della selezione dell'editor.", "editorInactiveSelection": "Colore della selezione in un editor inattivo.", "editorSelectionHighlight": "Colore delle aree con lo stesso contenuto della selezione.", @@ -52,5 +70,9 @@ "hoverHighlight": "Evidenziazione sotto la parola per cui è visualizzata un'area sensibile al passaggio del mouse.", "hoverBackground": "Colore di sfondo dell'area sensibile al passaggio del mouse dell'editor.", "hoverBorder": "Colore del bordo dell'area sensibile al passaggio del mouse dell'editor.", - "activeLinkForeground": "Colore dei collegamenti attivi." + "activeLinkForeground": "Colore dei collegamenti attivi.", + "diffEditorInserted": "Colore di sfondo del testo che è stato inserito.", + "diffEditorRemoved": "Colore di sfondo del testo che è stato rimosso.", + "diffEditorInsertedOutline": "Colore del contorno del testo che è stato inserito.", + "diffEditorRemovedOutline": "Colore del contorno del testo che è stato rimosso." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/ita/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/shell.i18n.json index c0bbd0ba75e11..efda81182a137 100644 --- a/i18n/ita/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/ita/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "È consigliabile non eseguire il codice come 'radice'.", - "prof.message": "I profili sono stati creati.", - "prof.detail": "Creare un problema e allegare manualmente i file seguenti:\n{0}", - "prof.restartAndFileIssue": "Crea problema e riavvia", - "prof.restart": "Riavvia" + "runningAsRoot": "È consigliabile non eseguire il codice come 'radice'." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/electron-browser/window.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/window.i18n.json index e4fdc2f801a34..c3698933985aa 100644 --- a/i18n/ita/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/ita/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "Incolla", "selectAll": "Seleziona tutto", "confirmOpen": "Aprire le cartelle di {0}?", - "confirmOpenButton": "&&Apri", - "developer": "Sviluppatore", - "file": "File" + "confirmOpenButton": "&&Apri" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json index 8b6ad71cd4e6d..22f94f4cf3617 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "balanceInward": "Emmet: Saldo (in ingresso)", + "balanceOutward": "Emmet: Saldo (in uscita)" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index 8b6ad71cd4e6d..1549e77ce2781 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "previousEditPoint": "Emmet: Punto di modifica precedente", + "nextEditPoint": "Emmet: Punto di modifica successivo" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json index 8b6ad71cd4e6d..27d67e79fef21 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "evaluateMathExpression": "Emmet: Valuta espressione matematica" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json index 8b6ad71cd4e6d..71a96f5f840bd 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "expandAbbreviationAction": "Emmet: Espandi abbreviazione" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json index 8b6ad71cd4e6d..ece4609ebc50d 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "incrementNumberByOneTenth": "Emmet: Aumenta di 0,1", + "incrementNumberByOne": "Emmet: Aumenta di 1", + "incrementNumberByTen": "Emmet: Aumenta di 10", + "decrementNumberByOneTenth": "Emmet: Riduci di 0,1", + "decrementNumberByOne": "Emmet: Riduci di 1", + "decrementNumberByTen": "Emmet: Riduci di 10" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json index 8b6ad71cd4e6d..e7e21455b6baa 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "matchingPair": "Emmet: Vai alla coppia corrispondente" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json index 8b6ad71cd4e6d..5dc3268b4902b 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "mergeLines": "Emmet: Esegui merge delle righe" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json index 8b6ad71cd4e6d..15cd2c912c486 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "reflectCSSValue": "Emmet: Effettua reflection del valore CSS" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json index 8b6ad71cd4e6d..a375d4ca5766b 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "removeTag": "Emmet: Rimuovi tag" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json index 8b6ad71cd4e6d..78c6fd0761bf9 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "selectPreviousItem": "Emmet: Seleziona elemento precedente", + "selectNextItem": "Emmet: Seleziona elemento successivo" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json index 8b6ad71cd4e6d..006ad09b523b7 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "splitJoinTag": "Emmet: Dividi/Unisci tag" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json index 8b6ad71cd4e6d..f4338f86f4e18 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "toggleComment": "Emmet: Attiva/Disattiva commento" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json index 8b6ad71cd4e6d..49c7306573d37 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateImageSize": "Emmet: Aggiorna dimensioni immagine" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json index 8b6ad71cd4e6d..38caa12dc952d 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateTag": "Emmet: Aggiorna tag", + "enterTag": "Immetti tag", + "tag": "Tag" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json index 8b6ad71cd4e6d..f83f8f8671678 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "wrapWithAbbreviationAction": "Emmet: Esegui il wrapping con l'abbreviazione", + "enterAbbreviation": "Immetti abbreviazione", + "abbreviation": "Abbreviazione" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 8b6ad71cd4e6d..2b16a19f047b9 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "Se abilitate, le abbreviazioni Emmet vengono espanse quando si preme TAB.", + "emmetPreferences": "Preferenze usate per modificare il comportamento di alcune azioni e i resolver di Emmet.", + "emmetSyntaxProfiles": "Consente di definire il profilo per la sintassi specificata oppure di usare un profilo personalizzato con regole specifiche.", + "emmetExclude": "Matrice di linguaggi in cui le abbreviazioni Emmet non devono essere espanse.", + "emmetExtensionsPath": "Percorso di una cartella contenente snippet, preferenze e profili Emmet" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index a0b8634361dd3..cce0f602a0ff5 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks", "tasksAriaLabel": "Digitare il nome di un'attività da riavviare", "noTasksMatching": "No tasks matching", "noTasksFound": "Non sono state trovate attività da riavviare" diff --git a/i18n/ita/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index 1bf6e6b40b958..ed1ead3e156fc 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks", "tasksAriaLabel": "Digitare il nome di un'attività da eseguire", "noTasksMatching": "No tasks matching", "noTasksFound": "Non sono state trovate attività" diff --git a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 1ea541dafa182..aa2a81f6197d8 100644 --- a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -13,25 +13,16 @@ "welcomePage.recent": "Recenti", "welcomePage.noRecentFolders": "Non ci sono cartelle recenti", "welcomePage.help": "Guida", - "welcomePage.productDocumentation": "Documentazione del prodotto", "welcomePage.introductoryVideos": "Video introduttivi", - "welcomePage.keybindingsReference": "Riferimento per tasti di scelta rapida", + "welcomePage.productDocumentation": "Documentazione del prodotto", "welcomePage.gitHubRepository": "Repository GitHub", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Mostra la pagina iniziale all'avvio", + "welcomePage.customize": "Personalizza", "welcomePage.installKeymapDescription": "Installa i tasti di scelta rapida", - "welcomePage.installKeymap": "Installa i tasti di scelta rapida di {0}, {1}, {2} e {3}", - "welcomePage.vim": "Vim", - "welcomePage.vimCurrent": "Vim (corrente)", - "welcomePage.sublime": "Sublime", - "welcomePage.sublimeCurrent": "Sublime (corrente)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom (corrente)", "welcomePage.others": "altri", "welcomePage.colorTheme": "Tema colori", "welcomePage.colorThemeDescription": "Tutto quel che serve per configurare editor e codice nel modo desiderato", - "welcomePage.configureSettings": "Configura le impostazioni", - "welcomePage.configureSettingsDescription": "Perfeziona le impostazioni per sfruttare appieno tutta la potenza di Visual Studio Code", "welcomePage.showCommands": "Trova ed esegui tutti i comandi", "welcomePage.showCommandsDescription": "Accesso e ricerca rapida di comandi dal pannello di controllo ({0})", "welcomePage.interfaceOverview": "Panoramica dell'interfaccia", @@ -39,5 +30,8 @@ "welcomePage.interactivePlayground": "Playground interattivo", "welcomePage.interactivePlaygroundDescription": "Breve panoramica delle funzionalità essenziali dell'editor", "welcomePage.quickLinks": "Collegamenti rapidi", - "welcomePage.keybindingsReferenceDescription": "PDF stampabile con i tasti di scelta rapida più comuni" + "welcomePage.keybindingsReference": "Riferimento per tasti di scelta rapida", + "welcomePage.keybindingsReferenceDescription": "PDF stampabile con i tasti di scelta rapida più comuni", + "welcomePage.configureSettings": "Configura le impostazioni", + "welcomePage.configureSettingsDescription": "Perfeziona le impostazioni per sfruttare appieno tutta la potenza di Visual Studio Code" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 6614c86ca0b2d..d2d18b208df55 100644 --- a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,11 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Benvenuti", - "welcome.title": "Benvenuti", "welcomePage.keymapAlreadyInstalled": "I tasti di scelta rapida di {0} sono già installati.", "welcomePage.willReloadAfterInstallingKeymap": "La finestra verrà ricaricata dopo l'installazione dei tasti di scelta rapida di {0}.", - "ok": "OK", "welcomePage.installingKeymap": "Installazione dei tasti di scelta rapida di {0}...", "welcomePage.keymapNotFound": "I tasti di scelta rapida di {0} con ID {1} non sono stati trovati.", + "welcome.title": "Benvenuti", + "ok": "OK", "cancel": "Annulla" } \ No newline at end of file diff --git a/i18n/jpn/extensions/jake/out/main.i18n.json b/i18n/jpn/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/extensions/jake/out/main.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/jake/package.i18n.json b/i18n/jpn/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/extensions/jake/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/typescript/out/utils/logger.i18n.json b/i18n/jpn/extensions/typescript/out/utils/logger.i18n.json index 8b6ad71cd4e6d..bc738f43d0c37 100644 --- a/i18n/jpn/extensions/typescript/out/utils/logger.i18n.json +++ b/i18n/jpn/extensions/typescript/out/utils/logger.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/code/electron-main/menus.i18n.json b/i18n/jpn/src/vs/code/electron-main/menus.i18n.json index 1231ec0a27542..79412979d8d7f 100644 --- a/i18n/jpn/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/jpn/src/vs/code/electron-main/menus.i18n.json @@ -143,6 +143,7 @@ "miAccessibilityOptions": "ユーザー補助オプション(&&O)", "miReportIssues": "問題の報告(&&I)", "miWelcome": "ようこそ(&&W)", + "miInteractivePlayground": "対話型プレイグラウンド(&&I)", "miDocumentation": "参照資料(&&D)", "miReleaseNotes": "リリース ノート(&&R)", "miKeyboardShortcuts": "キーボード ショートカットの参照(&&K)", diff --git a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json index a202eb9576518..da6b50dacf075 100644 --- a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "フォントの太さを制御します。", "fontSize": "フォント サイズをピクセル単位で制御します。", "lineHeight": "行の高さを制御します。fontSize に基づいて lineHeight を計算する場合には、0 を使用します。", + "letterSpacing": "文字の間隔をピクセル単位で制御します。", "lineNumbers": "行番号の表示を制御します。使用可能な値は、'on'、'off'、および 'relative' です。'relative' は現在のカーソル位置からの行数を示します。", "rulers": "垂直ルーラーを表示する列", "wordSeparators": "単語に関連したナビゲーションまたは操作を実行するときに、単語の区切り文字として使用される文字", @@ -62,7 +63,6 @@ "renderLineHighlight": "エディターが現在の行をどのように強調表示するかを制御します。考えられる値は 'none'、'gutter'、'line'、'all' です。", "codeLens": "エディターで CodeLens を表示するかどうかを制御する", "folding": "エディターでコードの折りたたみを有効にするかどうかを制御します", - "hideFoldIcons": "余白上の展開アイコンを自動的に非表示にするかどうかを制御します 。", "matchBrackets": "かっこを選択すると、対応するかっこを強調表示します。", "glyphMargin": "エディターで縦のグリフ余白が表示されるかどうかを制御します。ほとんどの場合、グリフ余白はデバッグに使用されます。", "useTabStops": "空白の挿入や削除はタブ位置に従って行われます", diff --git a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index c57f70f47ef52..b5c107a4338c7 100644 --- a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,6 +9,7 @@ "editorSuggestWidgetForeground": "候補ウィジェットの前景色。", "editorSuggestWidgetSelectedBackground": "候補ウィジェット内で選択済みエントリの背景色。", "editorSuggestWidgetHighlightForeground": "候補のウィジェット内で一致したハイライトの色。", + "readMore": "詳細を表示...{0}", "suggestionWithDetailsAriaLabel": "{0}、候補、詳細あり", "suggestionAriaLabel": "{0}、候補", "suggestWidget.loading": "読み込んでいます...", diff --git a/i18n/jpn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/jpn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index 918be3ac1a135..991783c660296 100644 --- a/i18n/jpn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/jpn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,8 @@ "schema.brackets": "インデントを増減する角かっこを定義します。", "schema.autoClosingPairs": "角かっこのペアを定義します。左角かっこが入力されると、右角かっこが自動的に挿入されます。", "schema.autoClosingPairs.notIn": "自動ペアが無効なスコープの一覧を定義します。", - "schema.surroundingPairs": "選択文字列を囲むときに使用できる角かっこのペアを定義します。" + "schema.surroundingPairs": "選択文字列を囲むときに使用できる角かっこのペアを定義します。", + "schema.wordPattern.pattern": "言葉の照合に使用する正規表現パターン。", + "schema.wordPattern.flags": "言葉の照合に使用する正規表現フラグ。", + "schema.wordPattern.flags.errorMessage": "`/^([gimuy]+)$/` パターンに一致する必要があります。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json index b656a78c799de..2bbfe1d0b1d59 100644 --- a/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,7 +34,6 @@ "ProblemMatcherParser.noValidIdentifier": "エラー: パターン プロパティ {0} は有効なパターン変数名ではありません。", "ProblemMatcherParser.problemPattern.watchingMatcher": "問題マッチャーは、ウォッチ対象の開始パターンと終了パターンの両方を定義する必要があります。", "ProblemMatcherParser.invalidRegexp": "エラー: 文字列 {0} は、有効な正規表現ではありません。\n", - "WatchingPatternSchema.regexp": "ウォッチ中タスクの開始または終了を検出する正規表現。", "WatchingPatternSchema.file": "ファイル名の一致グループ インデックス。省略できます。", "PatternTypeSchema.name": "提供されたか事前定義された問題パターンの名前", "PatternTypeSchema.description": "A problem pattern or the name of a contributed or predefined problem pattern. Can be omitted if base is specified.", @@ -46,7 +45,6 @@ "ProblemMatcherSchema.watching.activeOnStart": "true に設定すると、タスクの開始時にウォッチャーがアクティブ モードになります。これは beginPattern と一致する行の発行と同等です。", "ProblemMatcherSchema.watching.beginsPattern": "出力内で一致すると、ウォッチ中のタスクの開始が通知されます。", "ProblemMatcherSchema.watching.endsPattern": "出力内で一致すると、ウォッチ中のタスクの終了が通知されます。", - "ProblemMatcherSchema.watching": "監視パターンの開始と終了を追跡するパターン。", "LegacyProblemMatcherSchema.watchedBegin.deprecated": "This property is deprecated. Use the watching property instead.", "LegacyProblemMatcherSchema.watchedBegin": "ファイル ウォッチでトリガーされた ウォッチ対象タスクの実行が開始されたことを伝達する正規表現。", "LegacyProblemMatcherSchema.watchedEnd.deprecated": "This property is deprecated. Use the watching property instead.", diff --git a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json index 750764aa27a8c..8da89f6115cfe 100644 --- a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -36,11 +36,13 @@ "dropdownForeground": "ドロップダウンの前景。", "dropdownBorder": "ドロップダウンの境界線。", "listFocusBackground": "ツリーリストがアクティブのとき、フォーカスされた項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", + "listFocusForeground": "ツリーリストがアクティブのとき、フォーカスされた項目のツリーリスト前景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", "listActiveSelectionBackground": "ツリーリストがアクティブのとき、選択された項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", "listActiveSelectionForeground": "ツリーリストがアクティブのとき、選択された項目のツリーリスト前景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", "listInactiveSelectionBackground": "ツリーリストが非アクティブのとき、フォーカスされた項目のツリーリスト背景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", "listInactiveSelectionForeground": "ツリーリストが非アクティブのとき、選択された項目のツリーリスト前景色。アクティブなツリーリストはキーボード フォーカスがあり、非アクティブではこれがありません。", "listHoverBackground": "マウス操作で項目をホバーするときのツリーリスト背景。", + "listHoverForeground": "マウス操作で項目をホバーするときのツリーリスト前景。", "listDropBackground": "マウス操作で項目を移動するときのツリーリスト ドラッグ アンド ドロップの背景。", "highlight": "ツリーリスト内を検索しているとき、一致した強調のツリーリスト前景色。", "pickerGroupForeground": "ラベルをグループ化するためのクリック選択の色。", @@ -67,5 +69,9 @@ "hoverHighlight": "ホバーが表示されているワードの下を強調表示します。", "hoverBackground": "エディター ホバーの背景色。", "hoverBorder": "エディター ホバーの境界線の色。", - "activeLinkForeground": "アクティブなリンクの色。" + "activeLinkForeground": "アクティブなリンクの色。", + "diffEditorInserted": "挿入されたテキストの背景色。", + "diffEditorRemoved": "削除されたテキストの背景色。", + "diffEditorInsertedOutline": "挿入されたテキストの輪郭の色。", + "diffEditorRemovedOutline": "削除されたテキストの輪郭の色。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/jpn/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/shell.i18n.json index 298d1518ca4d1..7edc0e838e809 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "コードを 'root ' として実行しないことをお勧めします。", - "prof.message": "プロファイルが正常に作成されました。", - "prof.detail": "案件を作成し、手動で次のファイルを添付してください:\n{0}", - "prof.restartAndFileIssue": "案件を作成し再起動する", - "prof.restart": "再起動" + "runningAsRoot": "コードを 'root ' として実行しないことをお勧めします。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/electron-browser/window.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/window.i18n.json index acff2870cf903..472d053bdf66a 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "貼り付け", "selectAll": "すべて選択", "confirmOpen": "{0} 個のフォルダーを開きますか?", - "confirmOpenButton": "&&開く", - "developer": "Developer", - "file": "ファイル" + "confirmOpenButton": "&&開く" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index d63fe387f50b0..af68e40b4aef2 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,7 +7,6 @@ "debugAdapterBinNotFound": "デバッグ アダプターの実行可能ファイル '{0}' がありません。", "debugAdapterCannotDetermineExecutable": "デバッグ アダプター '{0}' の実行可能ファイルを判別できません。", "debugType": "構成の種類。", - "debugTypeNotRecognised": "デバッグの種類は認識されませんでした。対応するデバッグの拡張機能がインストールされており、有効になっていることを確認してください。", "node2NotSupported": "\"node2\" はサポートされていません。代わりに \"node\" を使用し、\"protocol\" 属性を \"inspector\" に設定してください。", "debugName": "構成の名前。起動構成のドロップダウン メニューに表示されます。", "debugRequest": "構成の要求の種類。\"launch\" または \"attach\" です。", diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json index 8b6ad71cd4e6d..13eb719a34fc3 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "balanceInward": "Emmet: バランス (内側)", + "balanceOutward": "Emmet: バランス (外側)" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index 8b6ad71cd4e6d..cf9dccd3bbde3 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "previousEditPoint": "Emmet: 前の編集点", + "nextEditPoint": "Emmet: 次の編集点" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json index 8b6ad71cd4e6d..f6a68a59f42aa 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "evaluateMathExpression": "Emmet: 数式の評価" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json index 8b6ad71cd4e6d..23680f558e5ee 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "expandAbbreviationAction": "Emmet: 略語の展開" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json index 8b6ad71cd4e6d..4c2a1db638c65 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "incrementNumberByOneTenth": "Emmet: 0.1 ずつ増加", + "incrementNumberByOne": "Emmet: 1 ずつ増加", + "incrementNumberByTen": "Emmet: 10 ずつ増加", + "decrementNumberByOneTenth": "Emmet: 0.1 ずつ減少", + "decrementNumberByOne": "Emmet: 1 減少", + "decrementNumberByTen": "Emmet: 10 ずつ減少" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json index 8b6ad71cd4e6d..adcbee4abaf0d 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "matchingPair": "Emmet: 一致するペアに移動" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json index 8b6ad71cd4e6d..c834e4b5aaa3d 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "mergeLines": "Emmet: 行のマージ" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json index 8b6ad71cd4e6d..ab8fd5a62ba11 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "reflectCSSValue": "Emmet: CSS 値の反転" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json index 8b6ad71cd4e6d..c3bc9dd651f53 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "removeTag": "Emmet: タグの削除" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json index 8b6ad71cd4e6d..350aee6aff985 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "selectPreviousItem": "Emmet: 前の項目の選択", + "selectNextItem": "Emmet: 次の項目の選択" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json index 8b6ad71cd4e6d..4b1dbd8a454c2 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "splitJoinTag": "Emmet: タグの分割/結合" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json index 8b6ad71cd4e6d..942a483bfa3d7 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "toggleComment": "Emmet: コメントの表示/非表示" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json index 8b6ad71cd4e6d..ba3773dfcdbeb 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateImageSize": "Emmet: イメージ サイズの更新" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json index 8b6ad71cd4e6d..873d819f37a59 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateTag": "Emmet: タグの更新", + "enterTag": "タグの入力", + "tag": "タグ" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json index 8b6ad71cd4e6d..3f72714a048fb 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "wrapWithAbbreviationAction": "Emmet: 省略形でラップ", + "enterAbbreviation": "省略形の入力", + "abbreviation": "省略形" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 8b6ad71cd4e6d..f8b16e8c78d6f 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "これをオンにすると、TAB キーを押したときに emmet 省略記法が展開されます.", + "emmetPreferences": "Emmet の一部のアクションやリゾルバーの動作の変更に使用される基本設定。", + "emmetSyntaxProfiles": "指定した構文に対してプロファイルを定義するか、特定の規則がある独自のプロファイルをご使用ください。", + "emmetExclude": "emmet 省略記法を展開すべきでない言語の配列。", + "emmetExtensionsPath": "Emmet のプロファイル、スニペット、基本設定を含むフォルダーへのパス" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index eb8ef6b80697c..37bbf2ce2e01a 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}、タスク", "tasksAriaLabel": "再開するタスクの名前を入力します", "noTasksMatching": "No tasks matching", "noTasksFound": "再開するタスクはありません" diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index 17dcb80868eb3..99543dd018aa6 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks", "tasksAriaLabel": "実行するタスクの名前を入力します", "noTasksMatching": "No tasks matching", "noTasksFound": "タスクが見つかりません" diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 997a9ed0f2cff..587eecb5f9d51 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -13,25 +13,16 @@ "welcomePage.recent": "最近", "welcomePage.noRecentFolders": "最近使用したフォルダーなし", "welcomePage.help": "ヘルプ", - "welcomePage.productDocumentation": "製品ドキュメント", "welcomePage.introductoryVideos": "紹介ビデオ", - "welcomePage.keybindingsReference": "キーボード ショートカットの参照資料", + "welcomePage.productDocumentation": "製品ドキュメント", "welcomePage.gitHubRepository": "GitHub リポジトリ", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "起動時にウェルカム ページを表示", + "welcomePage.customize": "カスタマイズする", "welcomePage.installKeymapDescription": "キーボード ショートカットをインストールします", - "welcomePage.installKeymap": "{0}、{1}、{2}、{3} のキーボード ショートカットをインストール", - "welcomePage.vim": "Vim", - "welcomePage.vimCurrent": "Vim (最新)", - "welcomePage.sublime": "Sublime", - "welcomePage.sublimeCurrent": "Sublime (最新)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom (最新)", "welcomePage.others": "その他", "welcomePage.colorTheme": "配色テーマ", "welcomePage.colorThemeDescription": "エディターとコードの外観を自由に設定します", - "welcomePage.configureSettings": "設定を構成する", - "welcomePage.configureSettingsDescription": "VS Code の全機能を活用するために設定を微調整します", "welcomePage.showCommands": "すべてのコマンドの検索と実行", "welcomePage.showCommandsDescription": "コントロール パネルからコマンドを検索してすばやくアクセスします ({0})", "welcomePage.interfaceOverview": "インターフェイスの概要", @@ -39,5 +30,8 @@ "welcomePage.interactivePlayground": "対話型プレイグラウンド", "welcomePage.interactivePlaygroundDescription": "エディターの基本機能を簡潔なチュートリアルで体験します", "welcomePage.quickLinks": "クイック リンク", - "welcomePage.keybindingsReferenceDescription": "最も一般的なキーボード ショートカットを掲載した印刷可能な PDF です" + "welcomePage.keybindingsReference": "キーボード ショートカットの参照資料", + "welcomePage.keybindingsReferenceDescription": "最も一般的なキーボード ショートカットを掲載した印刷可能な PDF です", + "welcomePage.configureSettings": "設定を構成する", + "welcomePage.configureSettingsDescription": "VS Code の全機能を活用するために設定を微調整します" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index e669bacef12ae..07b2eb85861d5 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,11 @@ // Do not edit this file. It is machine generated. { "welcomePage": "ようこそ", - "welcome.title": "ようこそ", "welcomePage.keymapAlreadyInstalled": "キーボード ショートカット {0} は既にインストールされています。", "welcomePage.willReloadAfterInstallingKeymap": "キーボード ショートカット {0} をインストールした後、ウィンドウが再度読み込まれます。", - "ok": "OK", "welcomePage.installingKeymap": "{0} のキーボード ショートカットをインストールしています...", "welcomePage.keymapNotFound": "ID {1} のキーボード ショートカット {0} は見つかりませんでした。", + "welcome.title": "ようこそ", + "ok": "OK", "cancel": "キャンセル" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index 0a5b15ce4a406..f2d0c06274d09 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "walkThrough.unboundCommand": "バインドなし", - "walkThrough.gitNotFound": "システムに Git がインストールされていない可能性があります。" + "walkThrough.gitNotFound": "システムに Git がインストールされていない可能性があります。", + "walkThrough.embeddedEditorBackground": "対話型プレイグラウンドの埋め込みエディターの背景色。" } \ No newline at end of file diff --git a/i18n/kor/extensions/jake/out/main.i18n.json b/i18n/kor/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/jake/out/main.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/extensions/jake/package.i18n.json b/i18n/kor/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/jake/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/extensions/typescript/out/utils/logger.i18n.json b/i18n/kor/extensions/typescript/out/utils/logger.i18n.json index 8b6ad71cd4e6d..bc738f43d0c37 100644 --- a/i18n/kor/extensions/typescript/out/utils/logger.i18n.json +++ b/i18n/kor/extensions/typescript/out/utils/logger.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 35c92b65eeacd..8f85109ab671b 100644 --- a/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,6 +9,7 @@ "editorSuggestWidgetForeground": "제안 위젯의 전경색입니다.", "editorSuggestWidgetSelectedBackground": "제한 위젯에서 선택된 항목의 배경색입니다.", "editorSuggestWidgetHighlightForeground": "제안 위젯의 일치 항목 강조 표시 색입니다.", + "readMore": "자세히 알아보기...{0}", "suggestionWithDetailsAriaLabel": "{0}, 제안, 세부 정보 있음", "suggestionAriaLabel": "{0}, 제안", "suggestWidget.loading": "로드 중...", diff --git a/i18n/kor/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/kor/src/vs/platform/markers/common/problemMatcher.i18n.json index e2cb0557fbc16..ff679b577b235 100644 --- a/i18n/kor/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/kor/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,7 +34,6 @@ "ProblemMatcherParser.noValidIdentifier": "오류: 패턴 속성 {0}이(가) 유효한 패턴 변수 이름이 아닙니다.", "ProblemMatcherParser.problemPattern.watchingMatcher": "문제 검사기에서 감시 시작 패턴과 종료 패턴을 모두 정의해야 합니다.", "ProblemMatcherParser.invalidRegexp": "오류: {0} 문자열은 유효한 정규식이 아닙니다.\n", - "WatchingPatternSchema.regexp": "조사 작업의 시작 또는 끝을 검색하는 정규식입니다.", "WatchingPatternSchema.file": "파일 이름의 일치 그룹 인덱스이며 생략할 수 있습니다.", "PatternTypeSchema.name": "제공되거나 미리 정의된 패턴의 이름", "PatternTypeSchema.description": "문제 패턴 또는 제공되거나 미리 정의된 문제 패턴의 이름입니다. 기본이 지정된 경우 생략할 수 있습니다.", @@ -46,7 +45,6 @@ "ProblemMatcherSchema.watching.activeOnStart": "true로 설정한 경우 작업이 시작되면 선택기가 활성 모드로 전환됩니다. 이는 beginPattern과 일치하는 줄을 실행하는 것과 같습니다.", "ProblemMatcherSchema.watching.beginsPattern": "출력이 일치하는 경우 조사 작업을 시작할 때 신호를 받습니다.", "ProblemMatcherSchema.watching.endsPattern": "출력이 일치하는 경우 조사 작업을 끝날 때 신호를 받습니다.", - "ProblemMatcherSchema.watching": "감시 패턴의 시작과 끝을 추적하는 패턴입니다.", "LegacyProblemMatcherSchema.watchedBegin.deprecated": "이 속성은 사용되지 않습니다. 대신 감시 속성을 사용하세요.", "LegacyProblemMatcherSchema.watchedBegin": "파일 감시를 통해 트리거되는 감시되는 작업이 시작됨을 나타내는 정규식입니다.", "LegacyProblemMatcherSchema.watchedEnd.deprecated": "이 속성은 사용되지 않습니다. 대신 감시 속성을 사용하세요.", diff --git a/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json index d5555899eba18..4ff5446bc0358 100644 --- a/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -52,5 +52,9 @@ "hoverHighlight": "호버가 표시된 단어 아래를 강조 표시합니다.", "hoverBackground": "편집기 호버의 배경색.", "hoverBorder": "편집기 호버의 테두리 색입니다.", - "activeLinkForeground": "활성 링크의 색입니다." + "activeLinkForeground": "활성 링크의 색입니다.", + "diffEditorInserted": "삽입된 텍스트의 배경색입니다.", + "diffEditorRemoved": "제거된 텍스트의 배경색입니다.", + "diffEditorInsertedOutline": "삽입된 텍스트의 윤곽선 색입니다.", + "diffEditorRemovedOutline": "제거된 텍스트의 윤곽선 색입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/kor/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/shell.i18n.json index 1233e0b9ff8ab..79ac1b1fdaaf9 100644 --- a/i18n/kor/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/kor/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "Code를 '루트'로 실행하지 않는 것이 좋습니다.", - "prof.message": "프로필을 만들었습니다.", - "prof.detail": "문제를 발생시키고 다음 파일을 수동으로 첨부하세요.\n{0}", - "prof.restartAndFileIssue": "문제 만들기 및 다시 시작", - "prof.restart": "다시 시작" + "runningAsRoot": "Code를 '루트'로 실행하지 않는 것이 좋습니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/electron-browser/window.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/window.i18n.json index 05bb13702947c..a185383bf4c8f 100644 --- a/i18n/kor/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/kor/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "붙여넣기", "selectAll": "모두 선택", "confirmOpen": "{0}개의 폴더를 여시겠습니까?", - "confirmOpenButton": "열기(&&O)", - "developer": "개발자", - "file": "파일" + "confirmOpenButton": "열기(&&O)" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json index 8b6ad71cd4e6d..82d5698f1e05b 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "balanceInward": "Emmet: 균형있게(안쪽으로)", + "balanceOutward": "Emmet: 균형있게(바깥쪽으로)" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index 8b6ad71cd4e6d..739aa4ea5378a 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "previousEditPoint": "Emmet: 이전 편집 점", + "nextEditPoint": "Emmet: 다음 편집 점" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json index 8b6ad71cd4e6d..5323baf8c0853 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "evaluateMathExpression": "Emmet: 수학 식 평가" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json index 8b6ad71cd4e6d..15be0c84d97fe 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "expandAbbreviationAction": "Emmet: 약어 확장" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json index 8b6ad71cd4e6d..2255914bed5c5 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "incrementNumberByOneTenth": "Emmet: 0.1 증가", + "incrementNumberByOne": "Emmet: 1 증가", + "incrementNumberByTen": "Emmet: 10 증가", + "decrementNumberByOneTenth": "Emmet: 0.1 감소", + "decrementNumberByOne": "Emmet: 1 감소", + "decrementNumberByTen": "Emmet: 10 감소" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json index 8b6ad71cd4e6d..83a77e69884c9 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "matchingPair": "Emmet: 일치하는 쌍으로 이동" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json index 8b6ad71cd4e6d..161537077b590 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "mergeLines": "Emmet: 줄 병합" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json index 8b6ad71cd4e6d..9de599d6dbe99 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "reflectCSSValue": "Emmet: CSS 값 반영" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json index 8b6ad71cd4e6d..d694fdaa5d8dd 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "removeTag": "Emmet: 태그 제거" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json index 8b6ad71cd4e6d..ce90cf1c917bc 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "selectPreviousItem": "Emmet: 이전 항목 선택", + "selectNextItem": "Emmet: 다음 항목 선택" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json index 8b6ad71cd4e6d..d700fca47b36c 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "splitJoinTag": "Emmet: 태그 분할/조인" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json index 8b6ad71cd4e6d..47d9fb34230a5 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "toggleComment": "Emmet: 주석 설정/해제" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json index 8b6ad71cd4e6d..4cf87429ced3b 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateImageSize": "Emmet: 이미지 크기 업데이트" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json index 8b6ad71cd4e6d..00369305a070c 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateTag": "Emmet: 태그 업데이트", + "enterTag": "태그 입력", + "tag": "태그" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json index 8b6ad71cd4e6d..d86b2ec66c025 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "wrapWithAbbreviationAction": "Emmet: 약어로 래핑", + "enterAbbreviation": "약어 입력", + "abbreviation": "약어" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 8b6ad71cd4e6d..b4ba4df288c3d 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "사용하도록 설정하면 emmet 약어는 키를 눌렀을 때 확장됩니다.", + "emmetPreferences": "Emmet의 일부 작업 및 해결 프로그램의 동작을 수정하는 데 사용되는 기본 설정입니다.", + "emmetSyntaxProfiles": "지정된 구문에 대한 프로필을 정의하거나 특정 규칙이 포함된 고유한 프로필을 사용하세요.", + "emmetExclude": "Emmet 약어를 확장하면 안 되는 언어의 배열입니다.", + "emmetExtensionsPath": "Emmet 프로필, 코드 조각 및 기본 설정이 포함된 폴더의 경로" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index 61ec0a4e8b140..0417fe610ad27 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, 작업", "tasksAriaLabel": "다시 시작할 작업 이름 입력", "noTasksMatching": "일치하는 작업 없음", "noTasksFound": "다시 시작할 작업이 없습니다." diff --git a/i18n/kor/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index 63feb95524e94..e3f31c9106dc6 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, 작업", "tasksAriaLabel": "실행할 작업의 이름 입력", "noTasksMatching": "일치하는 작업 없음", "noTasksFound": "작업을 찾을 수 없음" diff --git a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 8cb064b9a4982..3b4766bb5d93e 100644 --- a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -13,25 +13,16 @@ "welcomePage.recent": "최근 항목", "welcomePage.noRecentFolders": "최근 폴더 없음", "welcomePage.help": "도움말", - "welcomePage.productDocumentation": "제품 설명서", "welcomePage.introductoryVideos": "소개 비디오", - "welcomePage.keybindingsReference": "바로 가기 키 참조", + "welcomePage.productDocumentation": "제품 설명서", "welcomePage.gitHubRepository": "GitHub 리포지토리", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "시작 시 시작 페이지 표시", + "welcomePage.customize": "사용자 지정", "welcomePage.installKeymapDescription": "바로 가기 키 설치", - "welcomePage.installKeymap": "{0}, {1}, {2} 및 {3}의 바로 가기 키 설치", - "welcomePage.vim": "Vim", - "welcomePage.vimCurrent": "Vim(현재)", - "welcomePage.sublime": "Sublime", - "welcomePage.sublimeCurrent": "Sublime(현재)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom(현재)", "welcomePage.others": "기타", "welcomePage.colorTheme": "색 테마", "welcomePage.colorThemeDescription": "편집기 및 코드가 좋아하는 방식으로 표시되게 만들기", - "welcomePage.configureSettings": "설정 구성", - "welcomePage.configureSettingsDescription": "설정을 조정하여 VS Code 의 전체 기능 잠금 해제", "welcomePage.showCommands": "모든 명령 찾기 및 실행", "welcomePage.showCommandsDescription": "제어판에서 명령을 빠르게 검색 및 액세스({0})", "welcomePage.interfaceOverview": "인터페이스 개요", @@ -39,5 +30,8 @@ "welcomePage.interactivePlayground": "대화형 실습", "welcomePage.interactivePlaygroundDescription": "짧은 연습에서 기본 편집기 기능 사용해 보기", "welcomePage.quickLinks": "빠른 링크", - "welcomePage.keybindingsReferenceDescription": "가장 일반적인 바로 가기 키가 포함된 인쇄 가능한 PDF" + "welcomePage.keybindingsReference": "바로 가기 키 참조", + "welcomePage.keybindingsReferenceDescription": "가장 일반적인 바로 가기 키가 포함된 인쇄 가능한 PDF", + "welcomePage.configureSettings": "설정 구성", + "welcomePage.configureSettingsDescription": "설정을 조정하여 VS Code 의 전체 기능 잠금 해제" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index f4fb40d07996a..cb5666d331a15 100644 --- a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,11 @@ // Do not edit this file. It is machine generated. { "welcomePage": "시작", - "welcome.title": "시작", "welcomePage.keymapAlreadyInstalled": "{0} 바로 가기 키가 이미 설치되어 있습니다.", "welcomePage.willReloadAfterInstallingKeymap": "{0} 바로 가기 키를 설치한 후 창이 다시 로드됩니다.", - "ok": "확인", "welcomePage.installingKeymap": "{0} 바로 가기 키를 설치하는 중...", "welcomePage.keymapNotFound": "ID가 {1}인 {0} 바로 가기 키를 찾을 수 없습니다.", + "welcome.title": "시작", + "ok": "확인", "cancel": "취소" } \ No newline at end of file diff --git a/i18n/rus/extensions/jake/out/main.i18n.json b/i18n/rus/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/jake/out/main.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/extensions/jake/package.i18n.json b/i18n/rus/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/jake/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/extensions/typescript/out/utils/logger.i18n.json b/i18n/rus/extensions/typescript/out/utils/logger.i18n.json index 8b6ad71cd4e6d..bc738f43d0c37 100644 --- a/i18n/rus/extensions/typescript/out/utils/logger.i18n.json +++ b/i18n/rus/extensions/typescript/out/utils/logger.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 9f09465ad47ce..83631e142ec2c 100644 --- a/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,6 +9,7 @@ "editorSuggestWidgetForeground": "Цвет переднего плана мини-приложения предложений.", "editorSuggestWidgetSelectedBackground": "Фоновый цвет выбранной записи в мини-приложении предложений.", "editorSuggestWidgetHighlightForeground": "Цвет выделения соответствия в мини-приложении предложений.", + "readMore": "Подробнее...{0}", "suggestionWithDetailsAriaLabel": "{0}, предложение, содержит данные", "suggestionAriaLabel": "{0}, предложение", "suggestWidget.loading": "Идет загрузка...", diff --git a/i18n/rus/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/rus/src/vs/platform/markers/common/problemMatcher.i18n.json index 3d34238d89c00..2595229d2aab2 100644 --- a/i18n/rus/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/rus/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,7 +34,6 @@ "ProblemMatcherParser.noValidIdentifier": "Ошибка: свойство шаблона {0} не является допустимым именем переменной шаблона.", "ProblemMatcherParser.problemPattern.watchingMatcher": "В сопоставителе проблем должны быть определены как начальный, так и конечный шаблоны для отслеживания.", "ProblemMatcherParser.invalidRegexp": "Ошибка: строка {0} не является допустимым регулярным выражением.\n", - "WatchingPatternSchema.regexp": "Регулярное выражение для обнаружения начала или конца задачи наблюдения.", "WatchingPatternSchema.file": "Индекс группы сопоставления для имени файла. Может быть опущен.", "PatternTypeSchema.name": "Имя добавленного или предопределенного шаблона", "PatternTypeSchema.description": "Шаблон проблем либо имя добавленного или предопределенного шаблона проблем. Его можно опустить, если указано базовое значение.", @@ -46,7 +45,6 @@ "ProblemMatcherSchema.watching.activeOnStart": "Если задано значение true, наблюдатель находится в активном режиме, когда задача запускается. Это равносильно выдаче строки, соответствующей шаблону начала.", "ProblemMatcherSchema.watching.beginsPattern": "При соответствии в выходных данных сообщает о запуске задачи наблюдения.", "ProblemMatcherSchema.watching.endsPattern": "При соответствии в выходных данных сообщает о завершении задачи наблюдения.", - "ProblemMatcherSchema.watching": "Шаблоны для отслеживания начала и окончания шаблона просмотра.", "LegacyProblemMatcherSchema.watchedBegin.deprecated": "Это свойство устарело. Используйте свойство просмотра.", "LegacyProblemMatcherSchema.watchedBegin": "Регулярное выражение, сообщающее о том, что отслеживаемая задача начинает выполняться в результате активации отслеживания файлов.", "LegacyProblemMatcherSchema.watchedEnd.deprecated": "Это свойство устарело. Используйте свойство просмотра.", diff --git a/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json index 9ce2d8358364b..6d4a756ac40b8 100644 --- a/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -8,15 +8,24 @@ "schema.colors": "Цвета, используемые на рабочем месте.", "foreground": "Общий цвет переднего плана. Этот цвет используется, только если его не переопределит компонент.", "errorForeground": "Общий цвет переднего плана для сообщений об ошибках. Этот цвет используется только если его не переопределяет компонент.", + "descriptionForeground": "Цвет текста элемента, содержащего пояснения, например, для метки.", "focusBorder": "Общий цвет границ для элементов с фокусом. Этот цвет используется только в том случае, если не переопределен в компоненте.", "contrastBorder": "Дополнительная граница вокруг элементов, которая отделяет их от других элементов для улучшения контраста.", "activeContrastBorder": "Дополнительная граница вокруг активных элементов, которая отделяет их от других элементов для улучшения контраста.", + "selectionBackground": "Цвет фона выделенного текста в элементах пользовательского интерфейса (например, в поле для ввода значений или текстовом поле). Не применяется к области редактора и терминала.", "textSeparatorForeground": "Цвет для разделителей текста.", + "textLinkForeground": "Цвет переднего плана для ссылок в тексте.", + "textLinkActiveForeground": "Цвет переднего фона для активных ссылок в тексте.", + "textPreformatForeground": "Цвет текста фиксированного формата.", + "textBlockQuoteBackground": "Цвет фона для блоков с цитатами в тексте.", + "textBlockQuoteBorder": "Цвет границ для блоков с цитатами в тексте.", + "textCodeBlockBackground": "Цвет фона для программного кода в тексте.", "widgetShadow": "Цвет тени мини-приложений редактора, таких как \"Найти/заменить\".", "inputBoxBackground": "Фон поля ввода.", "inputBoxForeground": "Передний план поля ввода.", "inputBoxBorder": "Граница поля ввода.", "inputBoxActiveOptionBorder": "Цвет границ активированных параметров в полях ввода.", + "inputPlaceholderForeground": "Цвет фона поясняющего текста в элементе ввода.", "inputValidationInfoBackground": "Фоновый цвет проверки ввода для уровня серьезности \"Сведения\".", "inputValidationInfoBorder": "Цвет границы проверки ввода для уровня серьезности \"Сведения\".", "inputValidationWarningBackground": "Фоновый цвет проверки ввода для уровня серьезности \"Предупреждение\".", @@ -30,6 +39,7 @@ "listActiveSelectionBackground": "Фоновый цвет выбранного элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", "listActiveSelectionForeground": "Цвет переднего плана выбранного элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", "listInactiveSelectionBackground": "Фоновый цвет выбранного элемента List/Tree, когда элемент List/Tree неактивен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", + "listInactiveSelectionForeground": "Цвет текста выбранного элемента List/Tree, когда элемент List/Tree неактивен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", "listHoverBackground": "Фоновый цвет элементов List/Tree при наведении курсора мыши.", "listDropBackground": "Фоновый цвет элементов List/Tree при перемещении с помощью мыши.", "highlight": "Цвет переднего плана для выделения соответствия при поиске по элементу List/Tree.", @@ -38,6 +48,8 @@ "buttonForeground": "Цвет переднего плана кнопки.", "buttonBackground": "Цвет фона кнопки.", "buttonHoverBackground": "Цвет фона кнопки при наведении.", + "badgeBackground": "Цвет фона бэджа. Бэджи - небольшие информационные элементы, отображающие количество, например, результатов поиска.", + "badgeForeground": "Цвет текста бэджа. Бэджи - небольшие информационные элементы, отображающие количество, например, результатов поиска.", "scrollbarShadow": "Цвет тени полосы прокрутки, которая свидетельствует о том, что содержимое прокручивается.", "scrollbarSliderBackground": "Цвет фона ползунка.", "scrollbarSliderHoverBackground": "Цвет фона ползунка при наведении.", @@ -54,5 +66,9 @@ "hoverHighlight": "Выделение под словом, для которого показано наведение.", "hoverBackground": "Цвет фона при наведении указателя на редактор.", "hoverBorder": "Цвет границ при наведении указателя на редактор.", - "activeLinkForeground": "Цвет активных ссылок." + "activeLinkForeground": "Цвет активных ссылок.", + "diffEditorInserted": "Цвет фона для добавленных строк.", + "diffEditorRemoved": "Цвет фона для удаленных строк.", + "diffEditorInsertedOutline": "Цвет контура для добавленных строк.", + "diffEditorRemovedOutline": "Цвет контура для удаленных строк." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/rus/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/shell.i18n.json index b2ec5a62b60f1..39183187ef0ca 100644 --- a/i18n/rus/src/vs/workbench/electron-browser/shell.i18n.json +++ b/i18n/rus/src/vs/workbench/electron-browser/shell.i18n.json @@ -4,9 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "runningAsRoot": "Не рекомендуется запускать код с правами администратора.", - "prof.message": "Профили успешно созданы.", - "prof.detail": "Создайте проблему и вручную вложите следующие файлы:\n{0}", - "prof.restartAndFileIssue": "Создать проблему и выполнить перезапуск", - "prof.restart": "Перезапустить" + "runningAsRoot": "Не рекомендуется запускать код с правами администратора." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/electron-browser/window.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/window.i18n.json index 46ef3c781f0be..fb864141a425d 100644 --- a/i18n/rus/src/vs/workbench/electron-browser/window.i18n.json +++ b/i18n/rus/src/vs/workbench/electron-browser/window.i18n.json @@ -11,7 +11,5 @@ "paste": "Вставить", "selectAll": "Выбрать все", "confirmOpen": "Действительно открыть папки ({0})?", - "confirmOpenButton": "&&Открыть...", - "developer": "Разработчик", - "file": "Файл" + "confirmOpenButton": "&&Открыть..." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json index 8b6ad71cd4e6d..6f2d64eeffbc2 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "balanceInward": "Emmet: баланс (входящий)", + "balanceOutward": "Emmet: баланс (исходящий)" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index 8b6ad71cd4e6d..4a07fdffeba22 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "previousEditPoint": "Emmet: предыдущая точка изменения", + "nextEditPoint": "Emmet: следующая точка изменения" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json index 8b6ad71cd4e6d..24098651eac22 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "evaluateMathExpression": "Emmet: вычисление математического выражения" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json index 8b6ad71cd4e6d..982ec32564920 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "expandAbbreviationAction": "Emmet: расшифровать аббревиатуру" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json index 8b6ad71cd4e6d..1befe3f226483 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "incrementNumberByOneTenth": "Emmet: увеличение значения на 0,1", + "incrementNumberByOne": "Emmet: увеличение значения на 1", + "incrementNumberByTen": "Emmet: увеличение значения на 10", + "decrementNumberByOneTenth": "Emmet: уменьшение значения на 0,1", + "decrementNumberByOne": "Emmet: уменьшение значения на 1", + "decrementNumberByTen": "Emmet: уменьшение значения на 10" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json index 8b6ad71cd4e6d..526b5d5303f6a 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "matchingPair": "Emmet: перейти к соответствующей паре" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json index 8b6ad71cd4e6d..81f00b3edbc22 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "mergeLines": "Emmet: объединение строк" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json index 8b6ad71cd4e6d..4673022a248ed 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "reflectCSSValue": "Emmet: отражение значения CSS" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json index 8b6ad71cd4e6d..99b383ac90242 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "removeTag": "Emmet: удаление тега" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json index 8b6ad71cd4e6d..50ca8bd70b770 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "selectPreviousItem": "Emmet: выбор предыдущего элемента", + "selectNextItem": "Emmet: выбор следующего элемента" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json index 8b6ad71cd4e6d..b2b30614cea20 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "splitJoinTag": "Emmet: разделение и объединение тегов" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json index 8b6ad71cd4e6d..0bb940b0c93a9 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "toggleComment": "Emmet: переключение комментариев" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json index 8b6ad71cd4e6d..8c273b41250e2 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateImageSize": "Emmet: изменение размера изображения" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json index 8b6ad71cd4e6d..3c3bd54c27aca 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "updateTag": "Emmet: изменение тега", + "enterTag": "Ввод тега", + "tag": "Тег" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json index 8b6ad71cd4e6d..f493f727ad3e0 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "wrapWithAbbreviationAction": "Emmet: перенос с сокращением", + "enterAbbreviation": "Ввод сокращения", + "abbreviation": "Сокращение" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 8b6ad71cd4e6d..b632b35fef617 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -3,4 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "Если включено, сокращения Emmet разворачиваются при нажатии клавиши TAB.", + "emmetPreferences": "Настройки, которые используются для изменения поведения некоторых действий и сопоставителей Emmet.", + "emmetSyntaxProfiles": "Задайте профиль для указанного синтаксиса или используйте свой собственный профиль с определенными правилами.", + "emmetExclude": "Массив языков, в которых не должны развертываться сокращения Emmet.", + "emmetExtensionsPath": "Путь к папке, содержащей профили Emmet, фрагменты кода и настройки" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index 6e9f10d466a54..b24656f0f486a 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, задачи", "tasksAriaLabel": "Введите имя задачи для перезапуска", "noTasksMatching": "Нет соответствующих задач", "noTasksFound": "Задачи для перезапуска не найдены" diff --git a/i18n/rus/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index 3b76f56cac0ad..d68fa91047a01 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, задачи", "tasksAriaLabel": "Введите имя задачи, которую нужно выполнить", "noTasksMatching": "Нет соответствующих задач", "noTasksFound": "Задачи не найдены" diff --git a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 19a58cb17287f..9cf8071dbbf2d 100644 --- a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -13,25 +13,16 @@ "welcomePage.recent": "Последние", "welcomePage.noRecentFolders": "Нет последних папок.", "welcomePage.help": "Справка", - "welcomePage.productDocumentation": "Документация по продукту", "welcomePage.introductoryVideos": "Вступительные видео", - "welcomePage.keybindingsReference": "Справочник по сочетаниям клавиш", + "welcomePage.productDocumentation": "Документация по продукту", "welcomePage.gitHubRepository": "Репозиторий GitHub", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Отображать страницу приветствия при запуске", + "welcomePage.customize": "Настроить", "welcomePage.installKeymapDescription": "Установка сочетаний клавиш", - "welcomePage.installKeymap": "Установите сочетания клавиш {0}, {1}, {2} и {3}.", - "welcomePage.vim": "Vim", - "welcomePage.vimCurrent": "Vim (текущий)", - "welcomePage.sublime": "Sublime", - "welcomePage.sublimeCurrent": "Sublime (текущий)", - "welcomePage.atom": "Atom", - "welcomePage.atomCurrent": "Atom (текущий)", "welcomePage.others": "Другие", "welcomePage.colorTheme": "Цветовая тема", "welcomePage.colorThemeDescription": "Настройте редактор и код удобным образом.", - "welcomePage.configureSettings": "Настройка параметров", - "welcomePage.configureSettingsDescription": "Используйте все возможности VS Code, подобрав нужные параметры.", "welcomePage.showCommands": "Найти и выполнить все команды.", "welcomePage.showCommandsDescription": "Быстрый доступ и поиск команд на панели управления ({0})", "welcomePage.interfaceOverview": "Общие сведения об интерфейсе", @@ -39,5 +30,8 @@ "welcomePage.interactivePlayground": "Интерактивная площадка", "welcomePage.interactivePlaygroundDescription": "Опробуйте основные функции редактора в ходе краткого пошагового руководства.", "welcomePage.quickLinks": "Быстрые ссылки", - "welcomePage.keybindingsReferenceDescription": "Подготовленный к печати PDF-файл с самыми частыми сочетаниями клавиш" + "welcomePage.keybindingsReference": "Справочник по сочетаниям клавиш", + "welcomePage.keybindingsReferenceDescription": "Подготовленный к печати PDF-файл с самыми частыми сочетаниями клавиш", + "welcomePage.configureSettings": "Настройка параметров", + "welcomePage.configureSettingsDescription": "Используйте все возможности VS Code, подобрав нужные параметры." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 16cf088164da8..901720ad5ddfc 100644 --- a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,11 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Добро пожаловать", - "welcome.title": "Добро пожаловать", "welcomePage.keymapAlreadyInstalled": "Сочетания клавиш {0} уже установлены.", "welcomePage.willReloadAfterInstallingKeymap": "Окно перезагрузится после установки сочетаний клавиш {0}.", - "ok": "ОК", "welcomePage.installingKeymap": "Устанавливаются сочетания клавиш {0}...", "welcomePage.keymapNotFound": "Не удалось найти сочетания клавиш {0} с идентификатором {1}.", + "welcome.title": "Добро пожаловать", + "ok": "ОК", "cancel": "Отмена" } \ No newline at end of file From 185886a2d84d3207042764077a4b33dc4dece88d Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sat, 20 May 2017 03:18:46 +0200 Subject: [PATCH 0801/2747] Fix test --- src/vs/editor/contrib/find/test/common/findController.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/find/test/common/findController.test.ts b/src/vs/editor/contrib/find/test/common/findController.test.ts index d6e5591d3c22e..edd256ccedb24 100644 --- a/src/vs/editor/contrib/find/test/common/findController.test.ts +++ b/src/vs/editor/contrib/find/test/common/findController.test.ts @@ -227,7 +227,7 @@ suite('FindController', () => { let selectHighlightsAction = new SelectHighlightsAction(); editor.setSelection(new Selection(1, 1, 1, 1)); - findController.getState().change({ searchString: 'some+thing', isRegex: true }, false); + findController.getState().change({ searchString: 'some+thing', isRegex: true, isRevealed: true }, false); selectHighlightsAction.run(null, editor); assert.deepEqual(editor.getSelections().map(fromRange), [ From 4ba913058376d23a9641448e5ef56b010d092e46 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 19 May 2017 18:25:36 -0700 Subject: [PATCH 0802/2747] Fix workspace shell settings Fixes #26178 --- .../electron-browser/terminalConfigHelper.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts index 5f4e739354ecf..236474f73663a 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts @@ -141,14 +141,12 @@ export class TerminalConfigHelper implements ITerminalConfigHelper { const message = nls.localize('terminal.integrated.allowWorkspaceShell', "Do you allow {0} (defined as a workspace setting) to be launched in the terminal?", changeString); const options = [nls.localize('allow', "Allow"), nls.localize('disallow', "Disallow")]; this._choiceService.choose(Severity.Info, message, options, 1).then(choice => { - switch (choice) { - case 0: - this._storageService.store(IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY, true, StorageScope.WORKSPACE); - case 1: - this._storageService.store(IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY, false, StorageScope.WORKSPACE); - default: - return TPromise.as(null); + if (choice === 0) { + this._storageService.store(IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY, true, StorageScope.WORKSPACE); + } else { + this._storageService.store(IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY, false, StorageScope.WORKSPACE); } + return TPromise.as(null); }); } From 3cbd4a1973c6317eb43eb9cefb99e301d396b1aa Mon Sep 17 00:00:00 2001 From: Young Rok Kim Date: Sat, 20 May 2017 14:24:38 +0900 Subject: [PATCH 0803/2747] Make TMScope inspector togglable (#19675) --- .../electron-browser/inspectTMScopes.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts b/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts index b0792b493ef56..6b424655f7b05 100644 --- a/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts +++ b/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts @@ -89,6 +89,14 @@ class InspectTMScopesController extends Disposable implements IEditorContributio this._widget = null; } } + + public toggle(): void { + if (!this._widget) { + this.launch(); + } else { + this.dispose(); + } + } } @editorAction @@ -106,7 +114,7 @@ class InspectTMScopes extends EditorAction { public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void { let controller = InspectTMScopesController.get(editor); if (controller) { - controller.launch(); + controller.toggle(); } } } From f459d5b17ea49f1e2fa4ae03eac318d67c37b2a6 Mon Sep 17 00:00:00 2001 From: Young Rok Kim Date: Sat, 20 May 2017 15:15:55 +0900 Subject: [PATCH 0804/2747] Add feature to close TMScope inspector with ESCAPE keyboard event --- .../inspectTMScopes/electron-browser/inspectTMScopes.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts b/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts index 6b424655f7b05..e407188b90674 100644 --- a/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts +++ b/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts @@ -9,6 +9,7 @@ import * as nls from 'vs/nls'; import * as dom from 'vs/base/browser/dom'; import { Disposable } from 'vs/base/common/lifecycle'; import { escape } from 'vs/base/common/strings'; +import { KeyCode } from 'vs/base/common/keyCodes'; import { Position } from 'vs/editor/common/core/position'; import { ICommonCodeEditor, IEditorContribution, IModel } from 'vs/editor/common/editorCommon'; import { editorAction, EditorAction, ServicesAccessor } from 'vs/editor/common/editorCommonExtensions'; @@ -62,6 +63,7 @@ class InspectTMScopesController extends Disposable implements IEditorContributio this._register(this._editor.onDidChangeModel((e) => this.stop())); this._register(this._editor.onDidChangeModelLanguage((e) => this.stop())); + this._register(this._editor.onKeyUp((e) => e.keyCode === KeyCode.Escape && this.stop())); } public getId(): string { @@ -94,7 +96,7 @@ class InspectTMScopesController extends Disposable implements IEditorContributio if (!this._widget) { this.launch(); } else { - this.dispose(); + this.stop(); } } } From f151b3ef1fff3f25b02b4f3416888a4fdb5a3011 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sat, 20 May 2017 10:50:45 +0200 Subject: [PATCH 0805/2747] Fixes #3623: Match whole word does not work for not latin characters --- src/vs/base/common/strings.ts | 2 +- .../common/controller/cursorTypeOperations.ts | 2 +- .../common/controller/cursorWordOperations.ts | 38 +--- .../controller/wordCharacterClassifier.ts | 43 ++++ src/vs/editor/common/editorCommon.ts | 16 +- src/vs/editor/common/model/textModel.ts | 12 +- src/vs/editor/common/model/textModelSearch.ts | 207 +++++++++++++----- .../contrib/find/common/findController.ts | 10 +- .../editor/contrib/find/common/findModel.ts | 12 +- .../wordOperations/common/wordOperations.ts | 3 +- .../test/common/model/textModelSearch.test.ts | 144 +++++++----- src/vs/monaco.d.ts | 16 +- src/vs/platform/search/common/search.ts | 4 + .../parts/search/browser/searchViewlet.ts | 3 +- .../parts/search/common/searchModel.ts | 4 +- .../services/search/node/searchService.ts | 2 +- 16 files changed, 326 insertions(+), 192 deletions(-) create mode 100644 src/vs/editor/common/controller/wordCharacterClassifier.ts diff --git a/src/vs/base/common/strings.ts b/src/vs/base/common/strings.ts index dd078b1f44975..83bbdaf61b055 100644 --- a/src/vs/base/common/strings.ts +++ b/src/vs/base/common/strings.ts @@ -202,7 +202,7 @@ export interface RegExpOptions { } export function createRegExp(searchString: string, isRegex: boolean, options: RegExpOptions = {}): RegExp { - if (searchString === '') { + if (!searchString) { throw new Error('Cannot create regex from empty string'); } if (!isRegex) { diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index b36938ce5e733..cb2b2184669c9 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -16,7 +16,7 @@ import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageCo import { IndentAction } from 'vs/editor/common/modes/languageConfiguration'; import { SurroundSelectionCommand } from 'vs/editor/common/commands/surroundSelectionCommand'; import { IElectricAction } from 'vs/editor/common/modes/supports/electricCharacter'; -import { getMapForWordSeparators, WordCharacterClass } from "vs/editor/common/controller/cursorWordOperations"; +import { getMapForWordSeparators, WordCharacterClass } from "vs/editor/common/controller/wordCharacterClassifier"; export class TypeOperations { diff --git a/src/vs/editor/common/controller/cursorWordOperations.ts b/src/vs/editor/common/controller/cursorWordOperations.ts index d420a29b871b2..305cfe68392b0 100644 --- a/src/vs/editor/common/controller/cursorWordOperations.ts +++ b/src/vs/editor/common/controller/cursorWordOperations.ts @@ -6,8 +6,7 @@ import { SingleCursorState, CursorConfiguration, ICursorSimpleModel } from 'vs/editor/common/controller/cursorCommon'; import { Position } from 'vs/editor/common/core/position'; -import { CharCode } from 'vs/base/common/charCode'; -import { CharacterClassifier } from 'vs/editor/common/core/characterClassifier'; +import { WordCharacterClassifier, WordCharacterClass, getMapForWordSeparators } from "vs/editor/common/controller/wordCharacterClassifier"; import * as strings from 'vs/base/common/strings'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; @@ -33,46 +32,11 @@ const enum WordType { Separator = 2 } -export const enum WordCharacterClass { - Regular = 0, - Whitespace = 1, - WordSeparator = 2 -} - export const enum WordNavigationType { WordStart = 0, WordEnd = 1 } -export class WordCharacterClassifier extends CharacterClassifier { - - constructor(wordSeparators: string) { - super(WordCharacterClass.Regular); - - for (let i = 0, len = wordSeparators.length; i < len; i++) { - this.set(wordSeparators.charCodeAt(i), WordCharacterClass.WordSeparator); - } - - this.set(CharCode.Space, WordCharacterClass.Whitespace); - this.set(CharCode.Tab, WordCharacterClass.Whitespace); - } - -} - -function once(computeFn: (input: string) => R): (input: string) => R { - let cache: { [key: string]: R; } = {}; // TODO@Alex unbounded cache - return (input: string): R => { - if (!cache.hasOwnProperty(input)) { - cache[input] = computeFn(input); - } - return cache[input]; - }; -} - -export const getMapForWordSeparators = once( - (input) => new WordCharacterClassifier(input) -); - export class WordOperations { private static _createWord(lineContent: string, wordType: WordType, start: number, end: number): IFindWordResult { diff --git a/src/vs/editor/common/controller/wordCharacterClassifier.ts b/src/vs/editor/common/controller/wordCharacterClassifier.ts new file mode 100644 index 0000000000000..c8399717727c6 --- /dev/null +++ b/src/vs/editor/common/controller/wordCharacterClassifier.ts @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { CharCode } from 'vs/base/common/charCode'; +import { CharacterClassifier } from 'vs/editor/common/core/characterClassifier'; + +export const enum WordCharacterClass { + Regular = 0, + Whitespace = 1, + WordSeparator = 2 +} + +export class WordCharacterClassifier extends CharacterClassifier { + + constructor(wordSeparators: string) { + super(WordCharacterClass.Regular); + + for (let i = 0, len = wordSeparators.length; i < len; i++) { + this.set(wordSeparators.charCodeAt(i), WordCharacterClass.WordSeparator); + } + + this.set(CharCode.Space, WordCharacterClass.Whitespace); + this.set(CharCode.Tab, WordCharacterClass.Whitespace); + } + +} + +function once(computeFn: (input: string) => R): (input: string) => R { + let cache: { [key: string]: R; } = {}; // TODO@Alex unbounded cache + return (input: string): R => { + if (!cache.hasOwnProperty(input)) { + cache[input] = computeFn(input); + } + return cache[input]; + }; +} + +export const getMapForWordSeparators = once( + (input) => new WordCharacterClassifier(input) +); diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index bec905e6cf2ff..c2cb21c2c528a 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -711,46 +711,46 @@ export interface ITextModel { * @param searchOnlyEditableRange Limit the searching to only search inside the editable range of the model. * @param isRegex Used to indicate that `searchString` is a regular expression. * @param matchCase Force the matching to match lower/upper case exactly. - * @param wholeWord Force the matching to match entire words only. + * @param wordSeparators Force the matching to match entire words only. Pass null otherwise. * @param captureMatches The result will contain the captured groups. * @param limitResultCount Limit the number of results * @return The ranges where the matches are. It is empty if not matches have been found. */ - findMatches(searchString: string, searchOnlyEditableRange: boolean, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean, limitResultCount?: number): FindMatch[]; + findMatches(searchString: string, searchOnlyEditableRange: boolean, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean, limitResultCount?: number): FindMatch[]; /** * Search the model. * @param searchString The string used to search. If it is a regular expression, set `isRegex` to true. * @param searchScope Limit the searching to only search inside this range. * @param isRegex Used to indicate that `searchString` is a regular expression. * @param matchCase Force the matching to match lower/upper case exactly. - * @param wholeWord Force the matching to match entire words only. + * @param wordSeparators Force the matching to match entire words only. Pass null otherwise. * @param captureMatches The result will contain the captured groups. * @param limitResultCount Limit the number of results * @return The ranges where the matches are. It is empty if no matches have been found. */ - findMatches(searchString: string, searchScope: IRange, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean, limitResultCount?: number): FindMatch[]; + findMatches(searchString: string, searchScope: IRange, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean, limitResultCount?: number): FindMatch[]; /** * Search the model for the next match. Loops to the beginning of the model if needed. * @param searchString The string used to search. If it is a regular expression, set `isRegex` to true. * @param searchStart Start the searching at the specified position. * @param isRegex Used to indicate that `searchString` is a regular expression. * @param matchCase Force the matching to match lower/upper case exactly. - * @param wholeWord Force the matching to match entire words only. + * @param wordSeparators Force the matching to match entire words only. Pass null otherwise. * @param captureMatches The result will contain the captured groups. * @return The range where the next match is. It is null if no next match has been found. */ - findNextMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean): FindMatch; + findNextMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean): FindMatch; /** * Search the model for the previous match. Loops to the end of the model if needed. * @param searchString The string used to search. If it is a regular expression, set `isRegex` to true. * @param searchStart Start the searching at the specified position. * @param isRegex Used to indicate that `searchString` is a regular expression. * @param matchCase Force the matching to match lower/upper case exactly. - * @param wholeWord Force the matching to match entire words only. + * @param wordSeparators Force the matching to match entire words only. Pass null otherwise. * @param captureMatches The result will contain the captured groups. * @return The range where the previous match is. It is null if no previous match has been found. */ - findPreviousMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean): FindMatch; + findPreviousMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean): FindMatch; } export class FindMatch { diff --git a/src/vs/editor/common/model/textModel.ts b/src/vs/editor/common/model/textModel.ts index 7654eec15867e..0d7ec1065b463 100644 --- a/src/vs/editor/common/model/textModel.ts +++ b/src/vs/editor/common/model/textModel.ts @@ -782,7 +782,7 @@ export class TextModel implements editorCommon.ITextModel { throw new Error('Unknown EOL preference'); } - public findMatches(searchString: string, rawSearchScope: any, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean, limitResultCount: number = LIMIT_FIND_COUNT): editorCommon.FindMatch[] { + public findMatches(searchString: string, rawSearchScope: any, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean, limitResultCount: number = LIMIT_FIND_COUNT): editorCommon.FindMatch[] { this._assertNotDisposed(); let searchRange: Range; @@ -792,18 +792,18 @@ export class TextModel implements editorCommon.ITextModel { searchRange = this.getFullModelRange(); } - return TextModelSearch.findMatches(this, new SearchParams(searchString, isRegex, matchCase, wholeWord), searchRange, captureMatches, limitResultCount); + return TextModelSearch.findMatches(this, new SearchParams(searchString, isRegex, matchCase, wordSeparators), searchRange, captureMatches, limitResultCount); } - public findNextMatch(searchString: string, rawSearchStart: IPosition, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean): editorCommon.FindMatch { + public findNextMatch(searchString: string, rawSearchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean): editorCommon.FindMatch { this._assertNotDisposed(); const searchStart = this.validatePosition(rawSearchStart); - return TextModelSearch.findNextMatch(this, new SearchParams(searchString, isRegex, matchCase, wholeWord), searchStart, captureMatches); + return TextModelSearch.findNextMatch(this, new SearchParams(searchString, isRegex, matchCase, wordSeparators), searchStart, captureMatches); } - public findPreviousMatch(searchString: string, rawSearchStart: IPosition, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean): editorCommon.FindMatch { + public findPreviousMatch(searchString: string, rawSearchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean): editorCommon.FindMatch { this._assertNotDisposed(); const searchStart = this.validatePosition(rawSearchStart); - return TextModelSearch.findPreviousMatch(this, new SearchParams(searchString, isRegex, matchCase, wholeWord), searchStart, captureMatches); + return TextModelSearch.findPreviousMatch(this, new SearchParams(searchString, isRegex, matchCase, wordSeparators), searchStart, captureMatches); } } diff --git a/src/vs/editor/common/model/textModelSearch.ts b/src/vs/editor/common/model/textModelSearch.ts index 4c6bd91c3b284..e34a2abf57a85 100644 --- a/src/vs/editor/common/model/textModelSearch.ts +++ b/src/vs/editor/common/model/textModelSearch.ts @@ -10,6 +10,7 @@ import { Range } from 'vs/editor/common/core/range'; import { FindMatch, EndOfLinePreference } from 'vs/editor/common/editorCommon'; import { CharCode } from 'vs/base/common/charCode'; import { TextModel } from 'vs/editor/common/model/textModel'; +import { getMapForWordSeparators, WordCharacterClassifier, WordCharacterClass } from "vs/editor/common/controller/wordCharacterClassifier"; const LIMIT_FIND_COUNT = 999; @@ -17,13 +18,13 @@ export class SearchParams { public readonly searchString: string; public readonly isRegex: boolean; public readonly matchCase: boolean; - public readonly wholeWord: boolean; + public readonly wordSeparators: string; - constructor(searchString: string, isRegex: boolean, matchCase: boolean, wholeWord: boolean) { + constructor(searchString: string, isRegex: boolean, matchCase: boolean, wordSeparators: string) { this.searchString = searchString; this.isRegex = isRegex; this.matchCase = matchCase; - this.wholeWord = wholeWord; + this.wordSeparators = wordSeparators; } private static _isMultilineRegexSource(searchString: string): boolean { @@ -71,8 +72,8 @@ export class SearchParams { try { regex = strings.createRegExp(this.searchString, this.isRegex, { matchCase: this.matchCase, - wholeWord: this.wholeWord, - multiline, + wholeWord: false, + multiline: multiline, global: true }); } catch (err) { @@ -83,13 +84,13 @@ export class SearchParams { return null; } - let canUseSimpleSearch = (!this.isRegex && !this.wholeWord && !multiline); + let canUseSimpleSearch = (!this.isRegex && !multiline); if (canUseSimpleSearch && this.searchString.toLowerCase() !== this.searchString.toUpperCase()) { // casing might make a difference canUseSimpleSearch = this.matchCase; } - return new SearchData(regex, canUseSimpleSearch ? this.searchString : null); + return new SearchData(regex, this.wordSeparators ? getMapForWordSeparators(this.wordSeparators) : null, canUseSimpleSearch ? this.searchString : null); } } @@ -99,13 +100,18 @@ export class SearchData { * The regex to search for. Always defined. */ public readonly regex: RegExp; + /** + * The word separator classifier. + */ + public readonly wordSeparators: WordCharacterClassifier; /** * The simple string to search for (if possible). */ public readonly simpleSearch: string; - constructor(regex: RegExp, simpleSearch: string) { + constructor(regex: RegExp, wordSeparators: WordCharacterClassifier, simpleSearch: string) { this.regex = regex; + this.wordSeparators = wordSeparators; this.simpleSearch = simpleSearch; } } @@ -130,7 +136,7 @@ export class TextModelSearch { } if (searchData.regex.multiline) { - return this._doFindMatchesMultiline(model, searchRange, searchData.regex, captureMatches, limitResultCount); + return this._doFindMatchesMultiline(model, searchRange, new Searcher(searchData.wordSeparators, searchData.regex), captureMatches, limitResultCount); } return this._doFindMatchesLineByLine(model, searchRange, searchData, captureMatches, limitResultCount); } @@ -173,7 +179,7 @@ export class TextModelSearch { return new Range(startPosition.lineNumber, startPosition.column, endPosition.lineNumber, endPosition.column); } - private static _doFindMatchesMultiline(model: TextModel, searchRange: Range, searchRegex: RegExp, captureMatches: boolean, limitResultCount: number): FindMatch[] { + private static _doFindMatchesMultiline(model: TextModel, searchRange: Range, searcher: Searcher, captureMatches: boolean, limitResultCount: number): FindMatch[] { const deltaOffset = model.getOffsetAt(searchRange.getStartPosition()); // We always execute multiline search over the lines joined with \n // This makes it that \n will match the EOL for both CRLF and LF models @@ -181,20 +187,11 @@ export class TextModelSearch { const text = model.getValueInRange(searchRange, EndOfLinePreference.LF); const result: FindMatch[] = []; - let prevStartOffset = 0; - let prevEndOffset = 0; let counter = 0; let m: RegExpExecArray; - while ((m = searchRegex.exec(text))) { - const startOffset = deltaOffset + m.index; - const endOffset = startOffset + m[0].length; - - if (prevStartOffset === startOffset && prevEndOffset === endOffset) { - // Exit early if the regex matches the same range - return result; - } - + searcher.reset(0); + while ((m = searcher.next(text))) { result[counter++] = createFindMatch( this._getMultilineMatchRange(model, deltaOffset, text, m.index, m[0]), m, @@ -203,9 +200,6 @@ export class TextModelSearch { if (counter >= limitResultCount) { return result; } - - prevStartOffset = startOffset; - prevEndOffset = endOffset; } return result; @@ -241,38 +235,43 @@ export class TextModelSearch { } private static _findMatchesInLine(searchData: SearchData, text: string, lineNumber: number, deltaOffset: number, resultLen: number, result: FindMatch[], captureMatches: boolean, limitResultCount: number): number { + const wordSeparators = searchData.wordSeparators; if (!captureMatches && searchData.simpleSearch) { const searchString = searchData.simpleSearch; const searchStringLen = searchString.length; + const textLength = text.length; let lastMatchIndex = -searchStringLen; while ((lastMatchIndex = text.indexOf(searchString, lastMatchIndex + searchStringLen)) !== -1) { - const range = new Range(lineNumber, lastMatchIndex + 1 + deltaOffset, lineNumber, lastMatchIndex + 1 + searchStringLen + deltaOffset); - result[resultLen++] = new FindMatch(range, null); - if (resultLen >= limitResultCount) { - return resultLen; + if (!wordSeparators || isValidMatch(wordSeparators, text, textLength, lastMatchIndex, searchStringLen)) { + const range = new Range(lineNumber, lastMatchIndex + 1 + deltaOffset, lineNumber, lastMatchIndex + 1 + searchStringLen + deltaOffset); + result[resultLen++] = new FindMatch(range, null); + if (resultLen >= limitResultCount) { + return resultLen; + } } } return resultLen; } - const searchRegex = searchData.regex; + const searcher = new Searcher(searchData.wordSeparators, searchData.regex); let m: RegExpExecArray; // Reset regex to search from the beginning - searchRegex.lastIndex = 0; + searcher.reset(0); do { - m = searchRegex.exec(text); + m = searcher.next(text); if (m) { - const range = new Range(lineNumber, m.index + 1 + deltaOffset, lineNumber, m.index + 1 + m[0].length + deltaOffset); - if (result.length > 0 && range.equalsRange(result[result.length - 1].range)) { - // Exit early if the regex matches the same range - return resultLen; - } + const matchStartIndex = m.index; + const matchLength = m[0].length; + + const range = new Range(lineNumber, matchStartIndex + 1 + deltaOffset, lineNumber, matchStartIndex + 1 + matchLength + deltaOffset); + result[resultLen++] = createFindMatch(range, m, captureMatches); if (resultLen >= limitResultCount) { return resultLen; } - if (m.index + m[0].length === text.length) { + + if (matchStartIndex + matchLength === text.length) { // Reached the end of the line return resultLen; } @@ -287,13 +286,15 @@ export class TextModelSearch { return null; } + const searcher = new Searcher(searchData.wordSeparators, searchData.regex); + if (searchData.regex.multiline) { - return this._doFindNextMatchMultiline(model, searchStart, searchData.regex, captureMatches); + return this._doFindNextMatchMultiline(model, searchStart, searcher, captureMatches); } - return this._doFindNextMatchLineByLine(model, searchStart, searchData.regex, captureMatches); + return this._doFindNextMatchLineByLine(model, searchStart, searcher, captureMatches); } - private static _doFindNextMatchMultiline(model: TextModel, searchStart: Position, searchRegex: RegExp, captureMatches: boolean): FindMatch { + private static _doFindNextMatchMultiline(model: TextModel, searchStart: Position, searcher: Searcher, captureMatches: boolean): FindMatch { const searchTextStart = new Position(searchStart.lineNumber, 1); const deltaOffset = model.getOffsetAt(searchTextStart); const lineCount = model.getLineCount(); @@ -301,8 +302,8 @@ export class TextModelSearch { // This makes it that \n will match the EOL for both CRLF and LF models // We compensate for offset errors in `_getMultilineMatchRange` const text = model.getValueInRange(new Range(searchTextStart.lineNumber, searchTextStart.column, lineCount, model.getLineMaxColumn(lineCount)), EndOfLinePreference.LF); - searchRegex.lastIndex = searchStart.column - 1; - let m = searchRegex.exec(text); + searcher.reset(searchStart.column - 1); + let m = searcher.next(text); if (m) { return createFindMatch( this._getMultilineMatchRange(model, deltaOffset, text, m.index, m[0]), @@ -313,19 +314,19 @@ export class TextModelSearch { if (searchStart.lineNumber !== 1 || searchStart.column !== 1) { // Try again from the top - return this._doFindNextMatchMultiline(model, new Position(1, 1), searchRegex, captureMatches); + return this._doFindNextMatchMultiline(model, new Position(1, 1), searcher, captureMatches); } return null; } - private static _doFindNextMatchLineByLine(model: TextModel, searchStart: Position, searchRegex: RegExp, captureMatches: boolean): FindMatch { + private static _doFindNextMatchLineByLine(model: TextModel, searchStart: Position, searcher: Searcher, captureMatches: boolean): FindMatch { const lineCount = model.getLineCount(); const startLineNumber = searchStart.lineNumber; // Look in first line const text = model.getLineContent(startLineNumber); - const r = this._findFirstMatchInLine(searchRegex, text, startLineNumber, searchStart.column, captureMatches); + const r = this._findFirstMatchInLine(searcher, text, startLineNumber, searchStart.column, captureMatches); if (r) { return r; } @@ -333,7 +334,7 @@ export class TextModelSearch { for (let i = 1; i <= lineCount; i++) { const lineIndex = (startLineNumber + i - 1) % lineCount; const text = model.getLineContent(lineIndex + 1); - const r = this._findFirstMatchInLine(searchRegex, text, lineIndex + 1, 1, captureMatches); + const r = this._findFirstMatchInLine(searcher, text, lineIndex + 1, 1, captureMatches); if (r) { return r; } @@ -342,10 +343,10 @@ export class TextModelSearch { return null; } - private static _findFirstMatchInLine(searchRegex: RegExp, text: string, lineNumber: number, fromColumn: number, captureMatches: boolean): FindMatch { + private static _findFirstMatchInLine(searcher: Searcher, text: string, lineNumber: number, fromColumn: number, captureMatches: boolean): FindMatch { // Set regex to search from column - searchRegex.lastIndex = fromColumn - 1; - const m: RegExpExecArray = searchRegex.exec(text); + searcher.reset(fromColumn - 1); + const m: RegExpExecArray = searcher.next(text); if (m) { return createFindMatch( new Range(lineNumber, m.index + 1, lineNumber, m.index + 1 + m[0].length), @@ -362,14 +363,16 @@ export class TextModelSearch { return null; } + const searcher = new Searcher(searchData.wordSeparators, searchData.regex); + if (searchData.regex.multiline) { - return this._doFindPreviousMatchMultiline(model, searchStart, searchData.regex, captureMatches); + return this._doFindPreviousMatchMultiline(model, searchStart, searcher, captureMatches); } - return this._doFindPreviousMatchLineByLine(model, searchStart, searchData.regex, captureMatches); + return this._doFindPreviousMatchLineByLine(model, searchStart, searcher, captureMatches); } - private static _doFindPreviousMatchMultiline(model: TextModel, searchStart: Position, searchRegex: RegExp, captureMatches: boolean): FindMatch { - const matches = this._doFindMatchesMultiline(model, new Range(1, 1, searchStart.lineNumber, searchStart.column), searchRegex, captureMatches, 10 * LIMIT_FIND_COUNT); + private static _doFindPreviousMatchMultiline(model: TextModel, searchStart: Position, searcher: Searcher, captureMatches: boolean): FindMatch { + const matches = this._doFindMatchesMultiline(model, new Range(1, 1, searchStart.lineNumber, searchStart.column), searcher, captureMatches, 10 * LIMIT_FIND_COUNT); if (matches.length > 0) { return matches[matches.length - 1]; } @@ -377,19 +380,19 @@ export class TextModelSearch { const lineCount = model.getLineCount(); if (searchStart.lineNumber !== lineCount || searchStart.column !== model.getLineMaxColumn(lineCount)) { // Try again with all content - return this._doFindPreviousMatchMultiline(model, new Position(lineCount, model.getLineMaxColumn(lineCount)), searchRegex, captureMatches); + return this._doFindPreviousMatchMultiline(model, new Position(lineCount, model.getLineMaxColumn(lineCount)), searcher, captureMatches); } return null; } - private static _doFindPreviousMatchLineByLine(model: TextModel, searchStart: Position, searchRegex: RegExp, captureMatches: boolean): FindMatch { + private static _doFindPreviousMatchLineByLine(model: TextModel, searchStart: Position, searcher: Searcher, captureMatches: boolean): FindMatch { const lineCount = model.getLineCount(); const startLineNumber = searchStart.lineNumber; // Look in first line const text = model.getLineContent(startLineNumber).substring(0, searchStart.column - 1); - const r = this._findLastMatchInLine(searchRegex, text, startLineNumber, captureMatches); + const r = this._findLastMatchInLine(searcher, text, startLineNumber, captureMatches); if (r) { return r; } @@ -397,7 +400,7 @@ export class TextModelSearch { for (let i = 1; i <= lineCount; i++) { const lineIndex = (lineCount + startLineNumber - i - 1) % lineCount; const text = model.getLineContent(lineIndex + 1); - const r = this._findLastMatchInLine(searchRegex, text, lineIndex + 1, captureMatches); + const r = this._findLastMatchInLine(searcher, text, lineIndex + 1, captureMatches); if (r) { return r; } @@ -406,10 +409,11 @@ export class TextModelSearch { return null; } - private static _findLastMatchInLine(searchRegex: RegExp, text: string, lineNumber: number, captureMatches: boolean): FindMatch { + private static _findLastMatchInLine(searcher: Searcher, text: string, lineNumber: number, captureMatches: boolean): FindMatch { let bestResult: FindMatch = null; let m: RegExpExecArray; - while ((m = searchRegex.exec(text))) { + searcher.reset(0); + while ((m = searcher.next(text))) { const result = new Range(lineNumber, m.index + 1, lineNumber, m.index + 1 + m[0].length); if (bestResult && result.equalsRange(bestResult.range)) { break; @@ -423,3 +427,88 @@ export class TextModelSearch { return bestResult; } } + +function isValidMatch(wordSeparators: WordCharacterClassifier, text: string, textLength: number, matchStartIndex: number, matchLength: number): boolean { + + if (matchStartIndex - 1 >= 0) { + const charBefore = text.charCodeAt(matchStartIndex - 1); + if (wordSeparators.get(charBefore) === WordCharacterClass.Regular) { + return false; + } + } + + if (matchStartIndex + matchLength < textLength) { + const charAfter = text.charCodeAt(matchStartIndex + matchLength); + if (wordSeparators.get(charAfter) === WordCharacterClass.Regular) { + return false; + } + } + + return true; +} + +class Searcher { + private _wordSeparators: WordCharacterClassifier; + private _searchRegex: RegExp; + private _prevMatchStartIndex: number; + private _prevMatchLength: number; + + constructor(wordSeparators: WordCharacterClassifier, searchRegex: RegExp, ) { + this._wordSeparators = wordSeparators; + this._searchRegex = searchRegex; + this._prevMatchStartIndex = -1; + this._prevMatchLength = 0; + } + + public reset(lastIndex: number): void { + this._searchRegex.lastIndex = lastIndex; + this._prevMatchStartIndex = -1; + this._prevMatchLength = 0; + } + + public next(text: string): RegExpExecArray { + if (!this._wordSeparators) { + return this._next(text); + } + + const textLength = text.length; + + let m: RegExpExecArray; + do { + m = this._next(text); + if (!m) { + return null; + } + + const matchStartIndex = m.index; + const matchLength = m[0].length; + + if (isValidMatch(this._wordSeparators, text, textLength, matchStartIndex, matchLength)) { + return m; + } + + } while (m); + + return null; + } + + private _next(text: string): RegExpExecArray { + const m = this._searchRegex.exec(text); + if (!m) { + return null; + } + + const matchStartIndex = m.index; + const matchLength = m[0].length; + + if (matchStartIndex === this._prevMatchStartIndex && matchLength === this._prevMatchLength) { + // Exit early if the regex matches the same range + return null; + } + + this._prevMatchStartIndex = matchStartIndex; + this._prevMatchLength = matchLength; + + return m; + } +} diff --git a/src/vs/editor/contrib/find/common/findController.ts b/src/vs/editor/contrib/find/common/findController.ts index f06f35867fd2f..cef058f864044 100644 --- a/src/vs/editor/contrib/find/common/findController.ts +++ b/src/vs/editor/contrib/find/common/findController.ts @@ -604,7 +604,7 @@ export abstract class SelectNextFindMatchAction extends EditorAction { let allSelections = editor.getSelections(); let lastAddedSelection = allSelections[allSelections.length - 1]; - let nextMatch = editor.getModel().findNextMatch(r.searchText, lastAddedSelection.getEndPosition(), false, r.matchCase, r.wholeWord, false); + let nextMatch = editor.getModel().findNextMatch(r.searchText, lastAddedSelection.getEndPosition(), false, r.matchCase, r.wholeWord ? editor.getConfiguration().wordSeparators : null, false); if (!nextMatch) { return null; @@ -631,7 +631,7 @@ export abstract class SelectPreviousFindMatchAction extends EditorAction { let allSelections = editor.getSelections(); let lastAddedSelection = allSelections[allSelections.length - 1]; - let previousMatch = editor.getModel().findPreviousMatch(r.searchText, lastAddedSelection.getStartPosition(), false, r.matchCase, r.wholeWord, false); + let previousMatch = editor.getModel().findPreviousMatch(r.searchText, lastAddedSelection.getStartPosition(), false, r.matchCase, r.wholeWord ? editor.getConfiguration().wordSeparators : null, false); if (!previousMatch) { return null; @@ -813,7 +813,7 @@ export abstract class AbstractSelectHighlightsAction extends EditorAction { const findState = controller.getState(); if (findState.isRevealed && findState.isRegex && findState.searchString.length > 0) { - matches = editor.getModel().findMatches(findState.searchString, true, findState.isRegex, findState.matchCase, findState.wholeWord, false).map(m => m.range); + matches = editor.getModel().findMatches(findState.searchString, true, findState.isRegex, findState.matchCase, findState.wholeWord ? editor.getConfiguration().wordSeparators : null, false).map(m => m.range); } else { @@ -826,7 +826,7 @@ export abstract class AbstractSelectHighlightsAction extends EditorAction { return; } - matches = editor.getModel().findMatches(r.searchText, true, false, r.matchCase, r.wholeWord, false).map(m => m.range); + matches = editor.getModel().findMatches(r.searchText, true, false, r.matchCase, r.wholeWord ? editor.getConfiguration().wordSeparators : null, false).map(m => m.range); } if (matches.length > 0) { @@ -1010,7 +1010,7 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd } - let allMatches = model.findMatches(r.searchText, true, false, r.matchCase, r.wholeWord, false).map(m => m.range); + let allMatches = model.findMatches(r.searchText, true, false, r.matchCase, r.wholeWord ? this.editor.getConfiguration().wordSeparators : null, false).map(m => m.range); allMatches.sort(Range.compareRangesUsingStarts); selections.sort(Range.compareRangesUsingStarts); diff --git a/src/vs/editor/contrib/find/common/findModel.ts b/src/vs/editor/contrib/find/common/findModel.ts index 02ccc8f4ea5dc..ed888ad922a09 100644 --- a/src/vs/editor/contrib/find/common/findModel.ts +++ b/src/vs/editor/contrib/find/common/findModel.ts @@ -235,7 +235,7 @@ export class FindModelBoundToEditorModel { let position = new Position(lineNumber, column); - let prevMatch = model.findPreviousMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord, false); + let prevMatch = model.findPreviousMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null, false); if (prevMatch && prevMatch.range.isEmpty() && prevMatch.range.getStartPosition().equals(position)) { // Looks like we're stuck at this position, unacceptable! @@ -257,7 +257,7 @@ export class FindModelBoundToEditorModel { } position = new Position(lineNumber, column); - prevMatch = model.findPreviousMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord, false); + prevMatch = model.findPreviousMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null, false); } if (!prevMatch) { @@ -306,7 +306,7 @@ export class FindModelBoundToEditorModel { let position = new Position(lineNumber, column); - let nextMatch = model.findNextMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord, captureMatches); + let nextMatch = model.findNextMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null, captureMatches); if (forceMove && nextMatch && nextMatch.range.isEmpty() && nextMatch.range.getStartPosition().equals(position)) { // Looks like we're stuck at this position, unacceptable! @@ -328,7 +328,7 @@ export class FindModelBoundToEditorModel { } position = new Position(lineNumber, column); - nextMatch = model.findNextMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord, captureMatches); + nextMatch = model.findNextMatch(this._state.searchString, position, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null, captureMatches); } if (!nextMatch) { @@ -382,7 +382,7 @@ export class FindModelBoundToEditorModel { private _findMatches(findScope: Range, captureMatches: boolean, limitResultCount: number): editorCommon.FindMatch[] { let searchRange = FindModelBoundToEditorModel._getSearchRange(this._editor.getModel(), this._state.isReplaceRevealed, findScope); - return this._editor.getModel().findMatches(this._state.searchString, searchRange, this._state.isRegex, this._state.matchCase, this._state.wholeWord, captureMatches, limitResultCount); + return this._editor.getModel().findMatches(this._state.searchString, searchRange, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null, captureMatches, limitResultCount); } public replaceAll(): void { @@ -403,7 +403,7 @@ export class FindModelBoundToEditorModel { } private _largeReplaceAll(): void { - const searchParams = new SearchParams(this._state.searchString, this._state.isRegex, this._state.matchCase, this._state.wholeWord); + const searchParams = new SearchParams(this._state.searchString, this._state.isRegex, this._state.matchCase, this._state.wholeWord ? this._editor.getConfiguration().wordSeparators : null); const searchData = searchParams.parseSearchRequest(); if (!searchData) { return; diff --git a/src/vs/editor/contrib/wordOperations/common/wordOperations.ts b/src/vs/editor/contrib/wordOperations/common/wordOperations.ts index b4b6a410f9d19..b09317b09e6c0 100644 --- a/src/vs/editor/contrib/wordOperations/common/wordOperations.ts +++ b/src/vs/editor/contrib/wordOperations/common/wordOperations.ts @@ -12,8 +12,9 @@ import { Selection } from 'vs/editor/common/core/selection'; import { editorCommand, ServicesAccessor, EditorCommand, ICommandOptions } from 'vs/editor/common/editorCommonExtensions'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; -import { WordNavigationType, WordOperations, getMapForWordSeparators, WordCharacterClassifier } from 'vs/editor/common/controller/cursorWordOperations'; +import { WordNavigationType, WordOperations } from 'vs/editor/common/controller/cursorWordOperations'; import { ReplaceCommand } from 'vs/editor/common/commands/replaceCommand'; +import { getMapForWordSeparators, WordCharacterClassifier } from "vs/editor/common/controller/wordCharacterClassifier"; export interface MoveWordOptions extends ICommandOptions { inSelectionMode: boolean; diff --git a/src/vs/editor/test/common/model/textModelSearch.test.ts b/src/vs/editor/test/common/model/textModelSearch.test.ts index 278ee1539ca47..4102cfad4fef0 100644 --- a/src/vs/editor/test/common/model/textModelSearch.test.ts +++ b/src/vs/editor/test/common/model/textModelSearch.test.ts @@ -10,10 +10,14 @@ import { FindMatch, EndOfLineSequence } from 'vs/editor/common/editorCommon'; import { Range } from 'vs/editor/common/core/range'; import { TextModel } from 'vs/editor/common/model/textModel'; import { TextModelSearch, SearchParams, SearchData } from 'vs/editor/common/model/textModelSearch'; +import { getMapForWordSeparators } from "vs/editor/common/controller/wordCharacterClassifier"; +import { USUAL_WORD_SEPARATORS } from "vs/editor/common/model/wordHelper"; // --------- Find suite('TextModelSearch', () => { + const usualWordSeparators = getMapForWordSeparators(USUAL_WORD_SEPARATORS); + function assertFindMatch(actual: FindMatch, expectedRange: Range, expectedMatches: string[] = null): void { assert.deepEqual(actual, new FindMatch(expectedRange, expectedMatches)); } @@ -43,10 +47,10 @@ suite('TextModelSearch', () => { } } - function assertFindMatches(text: string, searchString: string, isRegex: boolean, matchCase: boolean, wholeWord: boolean, _expected: [number, number, number, number][]): void { + function assertFindMatches(text: string, searchString: string, isRegex: boolean, matchCase: boolean, wordSeparators: string, _expected: [number, number, number, number][]): void { let expectedRanges = _expected.map(entry => new Range(entry[0], entry[1], entry[2], entry[3])); let expectedMatches = expectedRanges.map(entry => new FindMatch(entry, null)); - let searchParams = new SearchParams(searchString, isRegex, matchCase, wholeWord); + let searchParams = new SearchParams(searchString, isRegex, matchCase, wordSeparators); let model = TextModel.createFromString(text); _assertFindMatches(model, searchParams, expectedMatches); @@ -70,7 +74,7 @@ suite('TextModelSearch', () => { test('Simple find', () => { assertFindMatches( regularText.join('\n'), - 'foo', false, false, false, + 'foo', false, false, null, [ [1, 14, 1, 17], [1, 44, 1, 47], @@ -84,7 +88,7 @@ suite('TextModelSearch', () => { test('Case sensitive find', () => { assertFindMatches( regularText.join('\n'), - 'foo', false, true, false, + 'foo', false, true, null, [ [1, 14, 1, 17], [1, 44, 1, 47], @@ -96,7 +100,7 @@ suite('TextModelSearch', () => { test('Whole words find', () => { assertFindMatches( regularText.join('\n'), - 'foo', false, false, true, + 'foo', false, false, USUAL_WORD_SEPARATORS, [ [1, 14, 1, 17], [1, 44, 1, 47], @@ -108,7 +112,7 @@ suite('TextModelSearch', () => { test('/^/ find', () => { assertFindMatches( regularText.join('\n'), - '^', true, false, false, + '^', true, false, null, [ [1, 1, 1, 1], [2, 1, 2, 1], @@ -122,7 +126,7 @@ suite('TextModelSearch', () => { test('/$/ find', () => { assertFindMatches( regularText.join('\n'), - '$', true, false, false, + '$', true, false, null, [ [1, 74, 1, 74], [2, 69, 2, 69], @@ -136,7 +140,7 @@ suite('TextModelSearch', () => { test('/.*/ find', () => { assertFindMatches( regularText.join('\n'), - '.*', true, false, false, + '.*', true, false, null, [ [1, 1, 1, 74], [2, 1, 2, 69], @@ -156,7 +160,7 @@ suite('TextModelSearch', () => { '', 'Again nothing interesting here' ].join('\n'), - '^$', true, false, false, + '^$', true, false, null, [ [2, 1, 2, 1], [4, 1, 4, 1] @@ -172,7 +176,7 @@ suite('TextModelSearch', () => { 'some text again', 'again some text' ].join('\n'), - 'text\\n', true, false, false, + 'text\\n', true, false, null, [ [1, 16, 2, 1], [2, 16, 3, 1], @@ -188,7 +192,7 @@ suite('TextModelSearch', () => { 'some text again', 'again some text' ].join('\n'), - 'text\\nJust', true, false, false, + 'text\\nJust', true, false, null, [ [1, 16, 2, 5] ] @@ -203,7 +207,7 @@ suite('TextModelSearch', () => { 'some text again', 'again some text' ].join('\n'), - '\\nagain', true, false, false, + '\\nagain', true, false, null, [ [3, 16, 4, 6] ] @@ -218,7 +222,7 @@ suite('TextModelSearch', () => { 'some text again', 'again some text' ].join('\n'), - '.*\\nJust.*\\n', true, false, false, + '.*\\nJust.*\\n', true, false, null, [ [1, 1, 3, 1] ] @@ -234,7 +238,7 @@ suite('TextModelSearch', () => { 'if', 'else' ].join('\n'), - '^if\\nelse', true, false, false, + '^if\\nelse', true, false, null, [ [1, 1, 2, 5], [4, 1, 5, 5] @@ -253,7 +257,7 @@ suite('TextModelSearch', () => { ' ', 'else' ].join('\n'), - '^\\s*$\\n', true, false, false, + '^\\s*$\\n', true, false, null, [ [2, 1, 3, 1], [4, 1, 5, 1], @@ -270,7 +274,7 @@ suite('TextModelSearch', () => { 'ab', 'eb' ].join('\n'), - '^a.*b$', true, false, false, + '^a.*b$', true, false, null, [ [1, 1, 1, 7], [3, 1, 3, 3] @@ -288,7 +292,7 @@ suite('TextModelSearch', () => { 'elseif', 'else' ].join('\n'), - 'if\\nelse$', true, false, false, + 'if\\nelse$', true, false, null, [ [1, 1, 2, 5], [5, 5, 6, 5] @@ -305,7 +309,7 @@ suite('TextModelSearch', () => { '', 'again some text' ].join('\n'), - '^.*$', true, false, false, + '^.*$', true, false, null, [ [1, 1, 1, 20], [2, 1, 2, 1], @@ -325,7 +329,7 @@ suite('TextModelSearch', () => { 'again some text', 'but not some' ].join('\n'), - 'text\nsome', false, false, false, + 'text\nsome', false, false, null, [ [1, 16, 2, 5], [2, 11, 3, 5], @@ -333,10 +337,27 @@ suite('TextModelSearch', () => { ); }); + test('issue #3623: Match whole word does not work for not latin characters', () => { + assertFindMatches( + [ + 'я', + 'компилятор', + 'обфускация', + ':я-я' + ].join('\n'), + 'я', false, false, USUAL_WORD_SEPARATORS, + [ + [1, 1, 1, 2], + [4, 2, 4, 3], + [4, 4, 4, 5], + ] + ); + }); + test('findNextMatch without regex', () => { let model = TextModel.createFromString('line line one\nline two\nthree'); - let searchParams = new SearchParams('line', false, false, false); + let searchParams = new SearchParams('line', false, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), false); assertFindMatch(actual, new Range(1, 1, 1, 5)); @@ -359,7 +380,7 @@ suite('TextModelSearch', () => { test('findNextMatch with beginning boundary regex', () => { let model = TextModel.createFromString('line one\nline two\nthree'); - let searchParams = new SearchParams('^line', true, false, false); + let searchParams = new SearchParams('^line', true, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), false); assertFindMatch(actual, new Range(1, 1, 1, 5)); @@ -379,7 +400,7 @@ suite('TextModelSearch', () => { test('findNextMatch with beginning boundary regex and line has repetitive beginnings', () => { let model = TextModel.createFromString('line line one\nline two\nthree'); - let searchParams = new SearchParams('^line', true, false, false); + let searchParams = new SearchParams('^line', true, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), false); assertFindMatch(actual, new Range(1, 1, 1, 5)); @@ -399,7 +420,7 @@ suite('TextModelSearch', () => { test('findNextMatch with beginning boundary multiline regex and line has repetitive beginnings', () => { let model = TextModel.createFromString('line line one\nline two\nline three\nline four'); - let searchParams = new SearchParams('^line.*\\nline', true, false, false); + let searchParams = new SearchParams('^line.*\\nline', true, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), false); assertFindMatch(actual, new Range(1, 1, 2, 5)); @@ -416,7 +437,7 @@ suite('TextModelSearch', () => { test('findNextMatch with ending boundary regex', () => { let model = TextModel.createFromString('one line line\ntwo line\nthree'); - let searchParams = new SearchParams('line$', true, false, false); + let searchParams = new SearchParams('line$', true, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), false); assertFindMatch(actual, new Range(1, 10, 1, 14)); @@ -436,7 +457,7 @@ suite('TextModelSearch', () => { test('findMatches with capturing matches', () => { let model = TextModel.createFromString('one line line\ntwo line\nthree'); - let searchParams = new SearchParams('(l(in)e)', true, false, false); + let searchParams = new SearchParams('(l(in)e)', true, false, null); let actual = TextModelSearch.findMatches(model, searchParams, model.getFullModelRange(), true, 100); assert.deepEqual(actual, [ @@ -451,7 +472,7 @@ suite('TextModelSearch', () => { test('findMatches multiline with capturing matches', () => { let model = TextModel.createFromString('one line line\ntwo line\nthree'); - let searchParams = new SearchParams('(l(in)e)\\n', true, false, false); + let searchParams = new SearchParams('(l(in)e)\\n', true, false, null); let actual = TextModelSearch.findMatches(model, searchParams, model.getFullModelRange(), true, 100); assert.deepEqual(actual, [ @@ -465,7 +486,7 @@ suite('TextModelSearch', () => { test('findNextMatch with capturing matches', () => { let model = TextModel.createFromString('one line line\ntwo line\nthree'); - let searchParams = new SearchParams('(l(in)e)', true, false, false); + let searchParams = new SearchParams('(l(in)e)', true, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), true); assertFindMatch(actual, new Range(1, 5, 1, 9), ['line', 'line', 'in']); @@ -476,7 +497,7 @@ suite('TextModelSearch', () => { test('findNextMatch multiline with capturing matches', () => { let model = TextModel.createFromString('one line line\ntwo line\nthree'); - let searchParams = new SearchParams('(l(in)e)\\n', true, false, false); + let searchParams = new SearchParams('(l(in)e)\\n', true, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), true); assertFindMatch(actual, new Range(1, 10, 2, 1), ['line\n', 'line', 'in']); @@ -487,7 +508,7 @@ suite('TextModelSearch', () => { test('findPreviousMatch with capturing matches', () => { let model = TextModel.createFromString('one line line\ntwo line\nthree'); - let searchParams = new SearchParams('(l(in)e)', true, false, false); + let searchParams = new SearchParams('(l(in)e)', true, false, null); let actual = TextModelSearch.findPreviousMatch(model, searchParams, new Position(1, 1), true); assertFindMatch(actual, new Range(2, 5, 2, 9), ['line', 'line', 'in']); @@ -498,7 +519,7 @@ suite('TextModelSearch', () => { test('findPreviousMatch multiline with capturing matches', () => { let model = TextModel.createFromString('one line line\ntwo line\nthree'); - let searchParams = new SearchParams('(l(in)e)\\n', true, false, false); + let searchParams = new SearchParams('(l(in)e)\\n', true, false, null); let actual = TextModelSearch.findPreviousMatch(model, searchParams, new Position(1, 1), true); assertFindMatch(actual, new Range(2, 5, 3, 1), ['line\n', 'line', 'in']); @@ -511,17 +532,17 @@ suite('TextModelSearch', () => { assert.equal(model.getEOL(), '\r\n'); - let searchParams = new SearchParams('h\\n', true, false, false); + let searchParams = new SearchParams('h\\n', true, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), true); actual = TextModelSearch.findMatches(model, searchParams, model.getFullModelRange(), true, 1000)[0]; assertFindMatch(actual, new Range(8, 1, 9, 1), ['h\n']); - searchParams = new SearchParams('g\\nh\\n', true, false, false); + searchParams = new SearchParams('g\\nh\\n', true, false, null); actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), true); actual = TextModelSearch.findMatches(model, searchParams, model.getFullModelRange(), true, 1000)[0]; assertFindMatch(actual, new Range(7, 1, 9, 1), ['g\nh\n']); - searchParams = new SearchParams('\\ni', true, false, false); + searchParams = new SearchParams('\\ni', true, false, null); actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), true); actual = TextModelSearch.findMatches(model, searchParams, model.getFullModelRange(), true, 1000)[0]; assertFindMatch(actual, new Range(8, 2, 9, 2), ['\ni']); @@ -534,7 +555,7 @@ suite('TextModelSearch', () => { assert.equal(model.getEOL(), '\r\n'); - let searchParams = new SearchParams('\\r\\n', true, false, false); + let searchParams = new SearchParams('\\r\\n', true, false, null); let actual = TextModelSearch.findNextMatch(model, searchParams, new Position(1, 1), true); assert.equal(actual, null); assert.deepEqual(TextModelSearch.findMatches(model, searchParams, model.getFullModelRange(), true, 1000), []); @@ -542,37 +563,48 @@ suite('TextModelSearch', () => { model.dispose(); }); - function assertParseSearchResult(searchString: string, isRegex: boolean, matchCase: boolean, wholeWord: boolean, expected: SearchData): void { - let searchParams = new SearchParams(searchString, isRegex, matchCase, wholeWord); + function assertParseSearchResult(searchString: string, isRegex: boolean, matchCase: boolean, wordSeparators: string, expected: SearchData): void { + let searchParams = new SearchParams(searchString, isRegex, matchCase, wordSeparators); let actual = searchParams.parseSearchRequest(); - assert.deepEqual(actual, expected); + + if (expected === null) { + assert.ok(actual === null); + } else { + assert.deepEqual(actual.regex, expected.regex); + assert.deepEqual(actual.simpleSearch, expected.simpleSearch); + if (wordSeparators) { + assert.ok(actual.wordSeparators !== null); + } else { + assert.ok(actual.wordSeparators === null); + } + } } test('parseSearchRequest invalid', () => { - assertParseSearchResult('', true, true, true, null); - assertParseSearchResult(null, true, true, true, null); - assertParseSearchResult('(', true, false, false, null); + assertParseSearchResult('', true, true, USUAL_WORD_SEPARATORS, null); + assertParseSearchResult(null, true, true, USUAL_WORD_SEPARATORS, null); + assertParseSearchResult('(', true, false, null, null); }); test('parseSearchRequest non regex', () => { - assertParseSearchResult('foo', false, false, false, new SearchData(/foo/gi, null)); - assertParseSearchResult('foo', false, false, true, new SearchData(/\bfoo\b/gi, null)); - assertParseSearchResult('foo', false, true, false, new SearchData(/foo/g, 'foo')); - assertParseSearchResult('foo', false, true, true, new SearchData(/\bfoo\b/g, null)); - assertParseSearchResult('foo\\n', false, false, false, new SearchData(/foo\\n/gi, null)); - assertParseSearchResult('foo\\\\n', false, false, false, new SearchData(/foo\\\\n/gi, null)); - assertParseSearchResult('foo\\r', false, false, false, new SearchData(/foo\\r/gi, null)); - assertParseSearchResult('foo\\\\r', false, false, false, new SearchData(/foo\\\\r/gi, null)); + assertParseSearchResult('foo', false, false, null, new SearchData(/foo/gi, null, null)); + assertParseSearchResult('foo', false, false, USUAL_WORD_SEPARATORS, new SearchData(/foo/gi, usualWordSeparators, null)); + assertParseSearchResult('foo', false, true, null, new SearchData(/foo/g, null, 'foo')); + assertParseSearchResult('foo', false, true, USUAL_WORD_SEPARATORS, new SearchData(/foo/g, usualWordSeparators, 'foo')); + assertParseSearchResult('foo\\n', false, false, null, new SearchData(/foo\\n/gi, null, null)); + assertParseSearchResult('foo\\\\n', false, false, null, new SearchData(/foo\\\\n/gi, null, null)); + assertParseSearchResult('foo\\r', false, false, null, new SearchData(/foo\\r/gi, null, null)); + assertParseSearchResult('foo\\\\r', false, false, null, new SearchData(/foo\\\\r/gi, null, null)); }); test('parseSearchRequest regex', () => { - assertParseSearchResult('foo', true, false, false, new SearchData(/foo/gi, null)); - assertParseSearchResult('foo', true, false, true, new SearchData(/\bfoo\b/gi, null)); - assertParseSearchResult('foo', true, true, false, new SearchData(/foo/g, null)); - assertParseSearchResult('foo', true, true, true, new SearchData(/\bfoo\b/g, null)); - assertParseSearchResult('foo\\n', true, false, false, new SearchData(/foo\n/gim, null)); - assertParseSearchResult('foo\\\\n', true, false, false, new SearchData(/foo\\n/gi, null)); - assertParseSearchResult('foo\\r', true, false, false, new SearchData(/foo\r/gim, null)); - assertParseSearchResult('foo\\\\r', true, false, false, new SearchData(/foo\\r/gi, null)); + assertParseSearchResult('foo', true, false, null, new SearchData(/foo/gi, null, null)); + assertParseSearchResult('foo', true, false, USUAL_WORD_SEPARATORS, new SearchData(/foo/gi, usualWordSeparators, null)); + assertParseSearchResult('foo', true, true, null, new SearchData(/foo/g, null, null)); + assertParseSearchResult('foo', true, true, USUAL_WORD_SEPARATORS, new SearchData(/foo/g, usualWordSeparators, null)); + assertParseSearchResult('foo\\n', true, false, null, new SearchData(/foo\n/gim, null, null)); + assertParseSearchResult('foo\\\\n', true, false, null, new SearchData(/foo\\n/gi, null, null)); + assertParseSearchResult('foo\\r', true, false, null, new SearchData(/foo\r/gim, null, null)); + assertParseSearchResult('foo\\\\r', true, false, null, new SearchData(/foo\\r/gi, null, null)); }); }); diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index e12595a783f86..5380ba9b866d8 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -1538,46 +1538,46 @@ declare module monaco.editor { * @param searchOnlyEditableRange Limit the searching to only search inside the editable range of the model. * @param isRegex Used to indicate that `searchString` is a regular expression. * @param matchCase Force the matching to match lower/upper case exactly. - * @param wholeWord Force the matching to match entire words only. + * @param wordSeparators Force the matching to match entire words only. Pass null otherwise. * @param captureMatches The result will contain the captured groups. * @param limitResultCount Limit the number of results * @return The ranges where the matches are. It is empty if not matches have been found. */ - findMatches(searchString: string, searchOnlyEditableRange: boolean, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean, limitResultCount?: number): FindMatch[]; + findMatches(searchString: string, searchOnlyEditableRange: boolean, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean, limitResultCount?: number): FindMatch[]; /** * Search the model. * @param searchString The string used to search. If it is a regular expression, set `isRegex` to true. * @param searchScope Limit the searching to only search inside this range. * @param isRegex Used to indicate that `searchString` is a regular expression. * @param matchCase Force the matching to match lower/upper case exactly. - * @param wholeWord Force the matching to match entire words only. + * @param wordSeparators Force the matching to match entire words only. Pass null otherwise. * @param captureMatches The result will contain the captured groups. * @param limitResultCount Limit the number of results * @return The ranges where the matches are. It is empty if no matches have been found. */ - findMatches(searchString: string, searchScope: IRange, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean, limitResultCount?: number): FindMatch[]; + findMatches(searchString: string, searchScope: IRange, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean, limitResultCount?: number): FindMatch[]; /** * Search the model for the next match. Loops to the beginning of the model if needed. * @param searchString The string used to search. If it is a regular expression, set `isRegex` to true. * @param searchStart Start the searching at the specified position. * @param isRegex Used to indicate that `searchString` is a regular expression. * @param matchCase Force the matching to match lower/upper case exactly. - * @param wholeWord Force the matching to match entire words only. + * @param wordSeparators Force the matching to match entire words only. Pass null otherwise. * @param captureMatches The result will contain the captured groups. * @return The range where the next match is. It is null if no next match has been found. */ - findNextMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean): FindMatch; + findNextMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean): FindMatch; /** * Search the model for the previous match. Loops to the end of the model if needed. * @param searchString The string used to search. If it is a regular expression, set `isRegex` to true. * @param searchStart Start the searching at the specified position. * @param isRegex Used to indicate that `searchString` is a regular expression. * @param matchCase Force the matching to match lower/upper case exactly. - * @param wholeWord Force the matching to match entire words only. + * @param wordSeparators Force the matching to match entire words only. Pass null otherwise. * @param captureMatches The result will contain the captured groups. * @return The range where the previous match is. It is null if no previous match has been found. */ - findPreviousMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wholeWord: boolean, captureMatches: boolean): FindMatch; + findPreviousMatch(searchString: string, searchStart: IPosition, isRegex: boolean, matchCase: boolean, wordSeparators: string, captureMatches: boolean): FindMatch; } export class FindMatch { diff --git a/src/vs/platform/search/common/search.ts b/src/vs/platform/search/common/search.ts index 171c91ffb8ddf..365796b2a32bb 100644 --- a/src/vs/platform/search/common/search.ts +++ b/src/vs/platform/search/common/search.ts @@ -55,6 +55,7 @@ export interface IPatternInfo { pattern: string; isRegExp?: boolean; isWordMatch?: boolean; + wordSeparators?: string; isMultiline?: boolean; isCaseSensitive?: boolean; } @@ -138,6 +139,9 @@ export interface ISearchConfiguration extends IFilesConfiguration { useRipgrep: boolean; useIgnoreFilesByDefault: boolean; }; + editor: { + wordSeparators: string; + }; } export function getExcludes(configuration: ISearchConfiguration): IExpression { diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index ebb3c5d321707..c481f311de5da 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -948,7 +948,8 @@ export class SearchViewlet extends Viewlet { pattern: contentPattern, isRegExp: isRegex, isCaseSensitive: isCaseSensitive, - isWordMatch: isWholeWords + isWordMatch: isWholeWords, + wordSeparators: this.configurationService.getConfiguration().editor.wordSeparators }; const { expression: excludePattern } = this.inputPatternExclusions.getGlob(); diff --git a/src/vs/workbench/parts/search/common/searchModel.ts b/src/vs/workbench/parts/search/common/searchModel.ts index ed1489ad1ff87..5911cbbcbc2a5 100644 --- a/src/vs/workbench/parts/search/common/searchModel.ts +++ b/src/vs/workbench/parts/search/common/searchModel.ts @@ -187,7 +187,7 @@ export class FileMatch extends Disposable { } this._matches = new LinkedMap(); let matches = this._model - .findMatches(this._query.pattern, this._model.getFullModelRange(), this._query.isRegExp, this._query.isCaseSensitive, this._query.isWordMatch, false, this._maxResults); + .findMatches(this._query.pattern, this._model.getFullModelRange(), this._query.isRegExp, this._query.isCaseSensitive, this._query.isWordMatch ? this._query.wordSeparators : null, false, this._maxResults); this.updateMatches(matches, true); } @@ -202,7 +202,7 @@ export class FileMatch extends Disposable { const oldMatches = this._matches.values().filter(match => match.range().startLineNumber === lineNumber); oldMatches.forEach(match => this._matches.delete(match.id())); - const matches = this._model.findMatches(this._query.pattern, range, this._query.isRegExp, this._query.isCaseSensitive, this._query.isWordMatch, false, this._maxResults); + const matches = this._model.findMatches(this._query.pattern, range, this._query.isRegExp, this._query.isCaseSensitive, this._query.isWordMatch ? this._query.wordSeparators : null, false, this._maxResults); this.updateMatches(matches, modelChange); } diff --git a/src/vs/workbench/services/search/node/searchService.ts b/src/vs/workbench/services/search/node/searchService.ts index dbdec9c59cc11..b1317d6b7cca6 100644 --- a/src/vs/workbench/services/search/node/searchService.ts +++ b/src/vs/workbench/services/search/node/searchService.ts @@ -135,7 +135,7 @@ export class SearchService implements ISearchService { } // Use editor API to find matches - let matches = model.findMatches(query.contentPattern.pattern, false, query.contentPattern.isRegExp, query.contentPattern.isCaseSensitive, query.contentPattern.isWordMatch, false, query.maxResults); + let matches = model.findMatches(query.contentPattern.pattern, false, query.contentPattern.isRegExp, query.contentPattern.isCaseSensitive, query.contentPattern.isWordMatch ? query.contentPattern.wordSeparators : null, false, query.maxResults); if (matches.length) { let fileMatch = new FileMatch(resource); localResults.set(resource, fileMatch); From 0ac4b3181b449d4a7568a26a9f589160adb45ec4 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sat, 20 May 2017 10:58:37 +0200 Subject: [PATCH 0806/2747] Simplifications in textModelSearch.ts --- src/vs/editor/common/model/textModelSearch.ts | 70 +++++-------------- 1 file changed, 17 insertions(+), 53 deletions(-) diff --git a/src/vs/editor/common/model/textModelSearch.ts b/src/vs/editor/common/model/textModelSearch.ts index e34a2abf57a85..d19ad9e608ca4 100644 --- a/src/vs/editor/common/model/textModelSearch.ts +++ b/src/vs/editor/common/model/textModelSearch.ts @@ -192,11 +192,7 @@ export class TextModelSearch { let m: RegExpExecArray; searcher.reset(0); while ((m = searcher.next(text))) { - result[counter++] = createFindMatch( - this._getMultilineMatchRange(model, deltaOffset, text, m.index, m[0]), - m, - captureMatches - ); + result[counter++] = createFindMatch(this._getMultilineMatchRange(model, deltaOffset, text, m.index, m[0]), m, captureMatches); if (counter >= limitResultCount) { return result; } @@ -244,8 +240,7 @@ export class TextModelSearch { let lastMatchIndex = -searchStringLen; while ((lastMatchIndex = text.indexOf(searchString, lastMatchIndex + searchStringLen)) !== -1) { if (!wordSeparators || isValidMatch(wordSeparators, text, textLength, lastMatchIndex, searchStringLen)) { - const range = new Range(lineNumber, lastMatchIndex + 1 + deltaOffset, lineNumber, lastMatchIndex + 1 + searchStringLen + deltaOffset); - result[resultLen++] = new FindMatch(range, null); + result[resultLen++] = new FindMatch(new Range(lineNumber, lastMatchIndex + 1 + deltaOffset, lineNumber, lastMatchIndex + 1 + searchStringLen + deltaOffset), null); if (resultLen >= limitResultCount) { return resultLen; } @@ -261,20 +256,10 @@ export class TextModelSearch { do { m = searcher.next(text); if (m) { - const matchStartIndex = m.index; - const matchLength = m[0].length; - - const range = new Range(lineNumber, matchStartIndex + 1 + deltaOffset, lineNumber, matchStartIndex + 1 + matchLength + deltaOffset); - - result[resultLen++] = createFindMatch(range, m, captureMatches); + result[resultLen++] = createFindMatch(new Range(lineNumber, m.index + 1 + deltaOffset, lineNumber, m.index + 1 + m[0].length + deltaOffset), m, captureMatches); if (resultLen >= limitResultCount) { return resultLen; } - - if (matchStartIndex + matchLength === text.length) { - // Reached the end of the line - return resultLen; - } } } while (m); return resultLen; @@ -414,15 +399,7 @@ export class TextModelSearch { let m: RegExpExecArray; searcher.reset(0); while ((m = searcher.next(text))) { - const result = new Range(lineNumber, m.index + 1, lineNumber, m.index + 1 + m[0].length); - if (bestResult && result.equalsRange(bestResult.range)) { - break; - } - bestResult = createFindMatch(result, m, captureMatches); - if (m.index + m[0].length === text.length) { - // Reached the end of the line - break; - } + bestResult = createFindMatch(new Range(lineNumber, m.index + 1, lineNumber, m.index + 1 + m[0].length), m, captureMatches); } return bestResult; } @@ -467,23 +444,30 @@ class Searcher { } public next(text: string): RegExpExecArray { - if (!this._wordSeparators) { - return this._next(text); - } - const textLength = text.length; let m: RegExpExecArray; do { - m = this._next(text); + if (this._prevMatchStartIndex + this._prevMatchLength === textLength) { + // Reached the end of the line + return null; + } + + m = this._searchRegex.exec(text); if (!m) { return null; } const matchStartIndex = m.index; const matchLength = m[0].length; + if (matchStartIndex === this._prevMatchStartIndex && matchLength === this._prevMatchLength) { + // Exit early if the regex matches the same range twice + return null; + } + this._prevMatchStartIndex = matchStartIndex; + this._prevMatchLength = matchLength; - if (isValidMatch(this._wordSeparators, text, textLength, matchStartIndex, matchLength)) { + if (!this._wordSeparators || isValidMatch(this._wordSeparators, text, textLength, matchStartIndex, matchLength)) { return m; } @@ -491,24 +475,4 @@ class Searcher { return null; } - - private _next(text: string): RegExpExecArray { - const m = this._searchRegex.exec(text); - if (!m) { - return null; - } - - const matchStartIndex = m.index; - const matchLength = m[0].length; - - if (matchStartIndex === this._prevMatchStartIndex && matchLength === this._prevMatchLength) { - // Exit early if the regex matches the same range - return null; - } - - this._prevMatchStartIndex = matchStartIndex; - this._prevMatchLength = matchLength; - - return m; - } } From c327b186d668c8b1b6a039907dd5388c40ac0599 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sat, 20 May 2017 11:44:46 +0200 Subject: [PATCH 0807/2747] Improve files.eol description (#2957) --- src/vs/workbench/parts/files/browser/files.contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/files/browser/files.contribution.ts b/src/vs/workbench/parts/files/browser/files.contribution.ts index 3a8ab2e8e01c5..3e19dc5ed9d82 100644 --- a/src/vs/workbench/parts/files/browser/files.contribution.ts +++ b/src/vs/workbench/parts/files/browser/files.contribution.ts @@ -228,7 +228,7 @@ configurationRegistry.registerConfiguration({ '\r\n' ], 'default': (platform.isLinux || platform.isMacintosh) ? '\n' : '\r\n', - 'description': nls.localize('eol', "The default end of line character."), + 'description': nls.localize('eol', "The default end of line character. Use \\n for LF and \\r\\n for CRLF."), }, 'files.trimTrailingWhitespace': { 'type': 'boolean', From b090499274f1830c981bff91139c1109eef60da1 Mon Sep 17 00:00:00 2001 From: Florent Viel Date: Fri, 12 May 2017 12:03:03 +0200 Subject: [PATCH 0808/2747] update tes tests to show off function name with nbsp --- .../php/test/colorize-fixtures/test.php | 4 +- .../php/test/colorize-results/test_php.json | 90 ++++++++++++++++++- 2 files changed, 92 insertions(+), 2 deletions(-) diff --git a/extensions/php/test/colorize-fixtures/test.php b/extensions/php/test/colorize-fixtures/test.php index 2a64196636887..b7d9578dcac7b 100644 --- a/extensions/php/test/colorize-fixtures/test.php +++ b/extensions/php/test/colorize-fixtures/test.php @@ -40,7 +40,9 @@ function functionName(){ print("Uncut Point: $deck[$index] "); $starting_point++; } + + function foo bar(){} ?> - \ No newline at end of file + diff --git a/extensions/php/test/colorize-results/test_php.json b/extensions/php/test/colorize-results/test_php.json index 4cf717c50c304..71480eae524a0 100644 --- a/extensions/php/test/colorize-results/test_php.json +++ b/extensions/php/test/colorize-results/test_php.json @@ -3233,6 +3233,94 @@ "hc_black": "default: #FFFFFF" } }, + { + "c": "\t", + "t": "text.html.php meta.embedded.block.php source.php meta.function.php", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "function", + "t": "text.html.php meta.embedded.block.php source.php meta.function.php storage.type.function.php", + "r": { + "dark_plus": "storage.type: #569CD6", + "light_plus": "storage.type: #0000FF", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type: #569CD6" + } + }, + { + "c": " ", + "t": "text.html.php meta.embedded.block.php source.php meta.function.php", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "foo bar", + "t": "text.html.php meta.embedded.block.php source.php meta.function.php entity.name.function.php", + "r": { + "dark_plus": "entity.name.function: #DCDCAA", + "light_plus": "entity.name.function: #795E26", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "(", + "t": "text.html.php meta.embedded.block.php source.php meta.function.php punctuation.definition.parameters.begin.php", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": ")", + "t": "text.html.php meta.embedded.block.php source.php meta.function.php punctuation.definition.parameters.end.php", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "{", + "t": "text.html.php meta.embedded.block.php source.php punctuation.section.scope.begin.php", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, + { + "c": "}", + "t": "text.html.php meta.embedded.block.php source.php punctuation.section.scope.end.php", + "r": { + "dark_plus": "default: #D4D4D4", + "light_plus": "default: #000000", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "default: #FFFFFF" + } + }, { "c": "?", "t": "text.html.php meta.embedded.block.php punctuation.section.embedded.end.php source.php", @@ -3321,4 +3409,4 @@ "hc_black": "punctuation.definition.tag: #808080" } } -] \ No newline at end of file +] From 310bcbc40085d979d6e9fa0a5b91b11ae2b002f2 Mon Sep 17 00:00:00 2001 From: Florent Viel Date: Sat, 20 May 2017 13:19:25 +0200 Subject: [PATCH 0809/2747] fix tests --- extensions/php/test/colorize-results/test_php.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/php/test/colorize-results/test_php.json b/extensions/php/test/colorize-results/test_php.json index 71480eae524a0..8285f8dee9b9a 100644 --- a/extensions/php/test/colorize-results/test_php.json +++ b/extensions/php/test/colorize-results/test_php.json @@ -3274,7 +3274,7 @@ "light_plus": "entity.name.function: #795E26", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "entity.name.function: #DCDCAA" } }, { From d1e209bb674112504657740c7b41f8299058abbf Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sat, 20 May 2017 15:03:02 +0200 Subject: [PATCH 0810/2747] Fix some TS noImplicitAny and noUnusedLocals warnings --- src/typings/native-keymap.d.ts | 2 +- src/vs/base/common/objects.ts | 2 +- src/vs/base/test/common/diff/diff.test.ts | 4 ++-- src/vs/base/worker/workerMain.ts | 2 +- .../browser/services/codeEditorServiceImpl.ts | 12 ++++------ .../services/standaloneThemeServiceImpl.ts | 4 ++-- .../contentWidgets/contentWidgets.ts | 4 ++-- .../browser/viewParts/minimap/minimap.ts | 2 +- .../editor/browser/widget/diffEditorWidget.ts | 5 ----- .../editor/common/controller/coreCommands.ts | 4 ++-- .../editor/common/controller/cursorCommon.ts | 2 +- .../common/controller/cursorMoveCommands.ts | 2 +- src/vs/editor/common/services/bulkEdit.ts | 4 ++-- .../common/services/editorSimpleWorker.ts | 2 +- .../editor/common/view/overviewZoneManager.ts | 2 +- src/vs/editor/common/viewModel/viewModel.ts | 2 +- .../bracketMatching/common/bracketMatching.ts | 4 +--- .../find/test/common/findController.test.ts | 15 ++++++++----- .../editor/contrib/folding/browser/folding.ts | 2 +- .../editor/contrib/folding/common/folding.ts | 4 ++-- .../folding/common/indentFoldStrategy.ts | 2 +- .../contrib/gotoError/browser/gotoError.ts | 6 ++--- .../linesOperations/common/linesOperations.ts | 8 +++---- .../quickFix/browser/lightBulbWidget.ts | 2 +- .../browser/referenceSearch.ts | 4 ++-- .../browser/referencesController.ts | 2 +- .../editor/contrib/snippet/common/snippet.ts | 10 ++++----- .../contrib/suggest/browser/suggestModel.ts | 2 +- .../test/browser/completionModel.test.ts | 3 ++- .../zoneWidget/browser/peekViewWidget.ts | 2 +- .../languageConfigurationExtensionPoint.ts | 4 ++-- .../services/decorationRenderOptions.test.ts | 2 +- .../test/browser/view/viewLayer.test.ts | 4 ++-- .../test/common/controller/cursor.test.ts | 2 +- .../controller/cursorMoveCommand.test.ts | 10 --------- .../test/common/diff/diffComputer.test.ts | 22 ++++++++++--------- .../test/common/mocks/mockExtensionService.ts | 2 +- .../test/common/model/model.modes.test.ts | 10 ++++----- .../common/model/modelDecorations.test.ts | 12 +++++----- .../common/model/textModelWithTokens.test.ts | 4 ++-- .../contextkey/test/common/contextkey.test.ts | 8 ++++++- .../common/abstractKeybindingService.test.ts | 8 ++++++- .../test/common/keybindingResolver.test.ts | 8 ++++++- .../browser/keybindingsEditorContribution.ts | 1 - .../electron-browser/snippetsService.ts | 2 +- .../electron-browser/keybindingService.ts | 4 ++-- .../test/keyboardMapperTestUtils.ts | 2 +- 47 files changed, 113 insertions(+), 113 deletions(-) diff --git a/src/typings/native-keymap.d.ts b/src/typings/native-keymap.d.ts index 65acdb584fa45..092191dd75973 100644 --- a/src/typings/native-keymap.d.ts +++ b/src/typings/native-keymap.d.ts @@ -65,7 +65,7 @@ declare module 'native-keymap' { export function getCurrentKeyboardLayout(): IKeyboardLayoutInfo; - export function onDidChangeKeyboardLayout(callback: () => void); + export function onDidChangeKeyboardLayout(callback: () => void): void; export function isISOKeyboard(): boolean; } \ No newline at end of file diff --git a/src/vs/base/common/objects.ts b/src/vs/base/common/objects.ts index c073ced725f55..9a814afa30cd8 100644 --- a/src/vs/base/common/objects.ts +++ b/src/vs/base/common/objects.ts @@ -304,7 +304,7 @@ export function getOrDefault(obj: T, fn: (obj: T) => R, defaultValue: R = * @param obj the object to use for diffing */ export type obj = { [key: string]: any; }; -export function distinct(base: obj, target: obj): obj { +export function distinct(base: obj, target: obj): obj { const result = Object.create(null); if (!base || !target) { diff --git a/src/vs/base/test/common/diff/diff.test.ts b/src/vs/base/test/common/diff/diff.test.ts index a1eb6010406d1..b5467da27fc1f 100644 --- a/src/vs/base/test/common/diff/diff.test.ts +++ b/src/vs/base/test/common/diff/diff.test.ts @@ -19,7 +19,7 @@ class StringDiffSequence { return this.source.length; } - getElementHash(i) { + getElementHash(i: number) { return this.source.charAt(i); } } @@ -96,7 +96,7 @@ function lcsTest(Algorithm: any, originalStr: string, modifiedStr: string, answe } } -function lcsTests(Algorithm) { +function lcsTests(Algorithm: any) { lcsTest(Algorithm, 'heLLo world', 'hello orlando', 'heo orld'); lcsTest(Algorithm, 'abcde', 'acd', 'acd'); // simple lcsTest(Algorithm, 'abcdbce', 'bcede', 'bcde'); // skip diff --git a/src/vs/base/worker/workerMain.ts b/src/vs/base/worker/workerMain.ts index f80f9d44e16b9..9bf45f0b20260 100644 --- a/src/vs/base/worker/workerMain.ts +++ b/src/vs/base/worker/workerMain.ts @@ -18,7 +18,7 @@ catchError: true }); - let loadCode = function (moduleId) { + let loadCode = function (moduleId: string) { require([moduleId], function (ws) { setTimeout(function () { let messageHandler = ws.create((msg: any) => { diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index f79bca4879d89..fa45f009cf8d9 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -280,7 +280,7 @@ class DecorationRenderHelper { * Build the CSS for decorations styled via `className`. */ public static getCSSTextForModelDecorationClassName(opts: IThemeDecorationRenderOptions): string { - let cssTextArr = []; + let cssTextArr: string[] = []; DecorationRenderHelper.collectCSSText(opts, ['backgroundColor', 'outline', 'outlineColor', 'outlineStyle', 'outlineWidth'], cssTextArr); DecorationRenderHelper.collectBorderSettingsCSSText(opts, cssTextArr); @@ -291,7 +291,7 @@ class DecorationRenderHelper { * Build the CSS for decorations styled via `inlineClassName`. */ public static getCSSTextForModelDecorationInlineClassName(opts: IThemeDecorationRenderOptions): string { - let cssTextArr = []; + let cssTextArr: string[] = []; DecorationRenderHelper.collectCSSText(opts, ['textDecoration', 'cursor', 'color', 'letterSpacing'], cssTextArr); return cssTextArr.join(''); } @@ -300,7 +300,7 @@ class DecorationRenderHelper { * Build the CSS for decorations styled before or after content. */ public static getCSSTextForModelDecorationContentClassName(opts: IContentDecorationRenderOptions): string { - let cssTextArr = []; + let cssTextArr: string[] = []; if (typeof opts !== 'undefined') { DecorationRenderHelper.collectBorderSettingsCSSText(opts, cssTextArr); @@ -442,10 +442,6 @@ class CSSNameHelper { } // ---- Normalize decoration render options per theme -interface IResolvedDecorationRenderOptions { - light: IThemeDecorationRenderOptions; - dark: IThemeDecorationRenderOptions; -} function getThemedRenderOptions(opts: { light?: T, dark?: T }): { light?: T, dark?: T } { // TODO@alex,joh - not really how/what deep clone is being used // for here but it will break the URI TODO@martin @@ -462,4 +458,4 @@ function getThemedRenderOptions(opts: { light?: T, dark?: T }): { light?: T, light: light, dark: dark }; -} \ No newline at end of file +} diff --git a/src/vs/editor/browser/services/standaloneThemeServiceImpl.ts b/src/vs/editor/browser/services/standaloneThemeServiceImpl.ts index dd29c95ffc460..ed9e8f753df34 100644 --- a/src/vs/editor/browser/services/standaloneThemeServiceImpl.ts +++ b/src/vs/editor/browser/services/standaloneThemeServiceImpl.ts @@ -172,8 +172,8 @@ export class StandaloneThemeServiceImpl implements IStandaloneThemeService { } this._theme = theme; - let cssRules = []; - let hasRule = {}; + let cssRules: string[] = []; + let hasRule: { [rule: string]: boolean; } = {}; let ruleCollector: ICssStyleCollector = { addRule: (rule: string) => { if (!hasRule[rule]) { diff --git a/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts b/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts index 66e04e6cbf605..15adceca2e1f3 100644 --- a/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts +++ b/src/vs/editor/browser/viewParts/contentWidgets/contentWidgets.ts @@ -338,14 +338,14 @@ class Widget { let position = this._context.model.coordinatesConverter.convertModelPositionToViewPosition(validModelPosition); let placement: IBoxLayoutResult = null; - let fetchPlacement = () => { + let fetchPlacement = (): void => { if (placement) { return; } const topLeft = this._getTopLeft(ctx, position); if (!topLeft) { - return null; + return; } const domNode = this.domNode.domNode; diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index 5cd3d6fedefa0..0b0f19f012e74 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -797,7 +797,7 @@ export class Minimap extends ViewPart { private static _renderLine( target: ImageData, backgroundColor: RGBA, - useLighterFont, + useLighterFont: boolean, renderMinimap: RenderMinimap, colorTracker: MinimapTokensColorTracker, minimapCharRenderer: MinimapCharRenderer, diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index 48b18d28aa225..98c20984b8e51 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -46,11 +46,6 @@ interface IEditorDiffDecorationsWithZones extends IEditorDiffDecorations { zones: editorBrowser.IViewZone[]; } -interface IEditorsDiffDecorations { - original: IEditorDiffDecorations; - modified: IEditorDiffDecorations; -} - interface IEditorsDiffDecorationsWithZones { original: IEditorDiffDecorationsWithZones; modified: IEditorDiffDecorationsWithZones; diff --git a/src/vs/editor/common/controller/coreCommands.ts b/src/vs/editor/common/controller/coreCommands.ts index 9ad0e099b2c92..d4ae88bfadd0f 100644 --- a/src/vs/editor/common/controller/coreCommands.ts +++ b/src/vs/editor/common/controller/coreCommands.ts @@ -39,7 +39,7 @@ export abstract class CoreEditorCommand extends EditorCommand { export namespace EditorScroll_ { - const isEditorScrollArgs = function (arg): boolean { + const isEditorScrollArgs = function (arg: any): boolean { if (!types.isObject(arg)) { return false; } @@ -183,7 +183,7 @@ export namespace EditorScroll_ { export namespace RevealLine_ { - const isRevealLineArgs = function (arg): boolean { + const isRevealLineArgs = function (arg: any): boolean { if (!types.isObject(arg)) { return false; } diff --git a/src/vs/editor/common/controller/cursorCommon.ts b/src/vs/editor/common/controller/cursorCommon.ts index 6adb347b4dcb2..bc94291aab8d8 100644 --- a/src/vs/editor/common/controller/cursorCommon.ts +++ b/src/vs/editor/common/controller/cursorCommon.ts @@ -42,7 +42,7 @@ export interface ICursors { setStates(source: string, reason: CursorChangeReason, states: CursorState[]): void; reveal(horizontal: boolean, target: RevealTarget): void; - revealRange(revealHorizontal: boolean, modelRange: Range, viewRange: Range, verticalType: VerticalRevealType); + revealRange(revealHorizontal: boolean, modelRange: Range, viewRange: Range, verticalType: VerticalRevealType): void; scrollTo(desiredScrollTop: number): void; } diff --git a/src/vs/editor/common/controller/cursorMoveCommands.ts b/src/vs/editor/common/controller/cursorMoveCommands.ts index 37f6197d6ec01..c4fd36b4b6e71 100644 --- a/src/vs/editor/common/controller/cursorMoveCommands.ts +++ b/src/vs/editor/common/controller/cursorMoveCommands.ts @@ -498,7 +498,7 @@ export class CursorMoveCommands { export namespace CursorMove { - const isCursorMoveArgs = function (arg): boolean { + const isCursorMoveArgs = function (arg: any): boolean { if (!types.isObject(arg)) { return false; } diff --git a/src/vs/editor/common/services/bulkEdit.ts b/src/vs/editor/common/services/bulkEdit.ts index 2f63c6f64a718..e847eafc91147 100644 --- a/src/vs/editor/common/services/bulkEdit.ts +++ b/src/vs/editor/common/services/bulkEdit.ts @@ -274,7 +274,7 @@ class BulkEditModel implements IDisposable { return r; } - private applyTask(task): void { + private applyTask(task: EditTask): void { task.apply(); if (this.progress) { this.progress.worked(1); @@ -287,7 +287,7 @@ class BulkEditModel implements IDisposable { } export interface BulkEdit { - progress(progress: IProgressRunner); + progress(progress: IProgressRunner): void; add(edit: IResourceEdit[]): void; finish(): TPromise; ariaMessage(): string; diff --git a/src/vs/editor/common/services/editorSimpleWorker.ts b/src/vs/editor/common/services/editorSimpleWorker.ts index 88d5690bd139f..5d36b8f6c4b5f 100644 --- a/src/vs/editor/common/services/editorSimpleWorker.ts +++ b/src/vs/editor/common/services/editorSimpleWorker.ts @@ -474,7 +474,7 @@ export abstract class BaseEditorSimpleWorker { public loadForeignModule(moduleId: string, createData: any): TPromise { return new TPromise((c, e) => { // Use the global require to be sure to get the global config - (self).require([moduleId], (foreignModule) => { + (self).require([moduleId], (foreignModule: { create: (ctx: IWorkerContext, createData: any) => any; }) => { let ctx: IWorkerContext = { getMirrorModels: (): IMirrorModel[] => { return this._getModels(); diff --git a/src/vs/editor/common/view/overviewZoneManager.ts b/src/vs/editor/common/view/overviewZoneManager.ts index a9d9ec99a1e74..a13baf1e0d24d 100644 --- a/src/vs/editor/common/view/overviewZoneManager.ts +++ b/src/vs/editor/common/view/overviewZoneManager.ts @@ -126,7 +126,7 @@ export class OverviewZoneManager { private _themeType: ThemeType; private _pixelRatio: number; - private _lastAssignedId; + private _lastAssignedId: number; private _color2Id: { [color: string]: number; }; private _id2Color: string[]; diff --git a/src/vs/editor/common/viewModel/viewModel.ts b/src/vs/editor/common/viewModel/viewModel.ts index e812f5710f247..ffb43fadd6aa2 100644 --- a/src/vs/editor/common/viewModel/viewModel.ts +++ b/src/vs/editor/common/viewModel/viewModel.ts @@ -84,7 +84,7 @@ export interface IViewLayout { getWhitespaceViewportData(): IViewWhitespaceViewportData[]; // TODO@Alex whitespace management should work via a change accessor sort of thing - onHeightMaybeChanged(); + onHeightMaybeChanged(): void; // --------------- End vertical whitespace management } diff --git a/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts b/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts index 909547185f21f..0f0a059283654 100644 --- a/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts +++ b/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts @@ -13,7 +13,6 @@ import { Position } from 'vs/editor/common/core/position'; import { RunOnceScheduler } from 'vs/base/common/async'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { editorAction, commonEditorContribution, ServicesAccessor, EditorAction } from 'vs/editor/common/editorCommonExtensions'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { registerThemingParticipant } from "vs/platform/theme/common/themeService"; import { editorBracketMatchBackground, editorBracketMatchBorder } from "vs/editor/common/view/editorColorRegistry"; @@ -71,8 +70,7 @@ export class BracketMatchingController extends Disposable implements editorCommo private _matchBrackets: boolean; constructor( - editor: editorCommon.ICommonCodeEditor, - @IConfigurationService private configurationService: IConfigurationService + editor: editorCommon.ICommonCodeEditor ) { super(); this._editor = editor; diff --git a/src/vs/editor/contrib/find/test/common/findController.test.ts b/src/vs/editor/contrib/find/test/common/findController.test.ts index edd256ccedb24..aa2fb4de23db8 100644 --- a/src/vs/editor/contrib/find/test/common/findController.test.ts +++ b/src/vs/editor/contrib/find/test/common/findController.test.ts @@ -73,11 +73,11 @@ function fromRange(rng: Range): number[] { } suite('FindController', () => { - let queryState = {}; + let queryState: { [key: string]: any; } = {}; let serviceCollection = new ServiceCollection(); serviceCollection.set(IStorageService, { - get: (key) => queryState[key], - getBoolean: (key) => !!queryState[key], + get: (key: string) => queryState[key], + getBoolean: (key: string) => !!queryState[key], store: (key: string, value: any) => { queryState[key] = value; } }); @@ -789,11 +789,14 @@ suite('FindController', () => { }); suite('FindController query options persistence', () => { - let queryState = { 'editor.isRegex': false, 'editor.matchCase': false, 'editor.wholeWord': false }; + let queryState: { [key: string]: any; } = {}; + queryState['editor.isRegex'] = false; + queryState['editor.matchCase'] = false; + queryState['editor.wholeWord'] = false; let serviceCollection = new ServiceCollection(); serviceCollection.set(IStorageService, { - get: (key) => queryState[key], - getBoolean: (key) => !!queryState[key], + get: (key: string) => queryState[key], + getBoolean: (key: string) => !!queryState[key], store: (key: string, value: any) => { queryState[key] = value; } }); diff --git a/src/vs/editor/contrib/folding/browser/folding.ts b/src/vs/editor/contrib/folding/browser/folding.ts index f89d26c653607..121869d46ed66 100644 --- a/src/vs/editor/contrib/folding/browser/folding.ts +++ b/src/vs/editor/contrib/folding/browser/folding.ts @@ -531,7 +531,7 @@ interface FoldingArguments { direction?: 'up' | 'down'; } -function foldingArgumentsConstraint(args) { +function foldingArgumentsConstraint(args: any) { if (!types.isUndefined(args)) { if (!types.isObject(args)) { return false; diff --git a/src/vs/editor/contrib/folding/common/folding.ts b/src/vs/editor/contrib/folding/common/folding.ts index 148fd8f6b885c..c0f677cb95c21 100644 --- a/src/vs/editor/contrib/folding/common/folding.ts +++ b/src/vs/editor/contrib/folding/common/folding.ts @@ -9,7 +9,7 @@ export const ID = 'editor.contrib.folding'; export interface IFoldingController extends IEditorContribution { - foldAll(); - unfoldAll(); + foldAll(): void; + unfoldAll(): void; } \ No newline at end of file diff --git a/src/vs/editor/contrib/folding/common/indentFoldStrategy.ts b/src/vs/editor/contrib/folding/common/indentFoldStrategy.ts index 66e7af5ffe1b3..39f3b5aa6358c 100644 --- a/src/vs/editor/contrib/folding/common/indentFoldStrategy.ts +++ b/src/vs/editor/contrib/folding/common/indentFoldStrategy.ts @@ -21,7 +21,7 @@ export function limitByIndent(ranges: IFoldingRange[], maxEntries: number): IFol return ranges; } - let indentOccurrences = []; + let indentOccurrences: number[] = []; ranges.forEach(r => { if (r.indent < 1000) { indentOccurrences[r.indent] = (indentOccurrences[r.indent] || 0) + 1; diff --git a/src/vs/editor/contrib/gotoError/browser/gotoError.ts b/src/vs/editor/contrib/gotoError/browser/gotoError.ts index 30de9d1b44621..89fb5203c60a0 100644 --- a/src/vs/editor/contrib/gotoError/browser/gotoError.ts +++ b/src/vs/editor/contrib/gotoError/browser/gotoError.ts @@ -13,7 +13,6 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import Severity from 'vs/base/common/severity'; import URI from 'vs/base/common/uri'; import * as dom from 'vs/base/browser/dom'; -import { ICommandService } from 'vs/platform/commands/common/commands'; import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IMarker, IMarkerService } from 'vs/platform/markers/common/markers'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; @@ -221,7 +220,7 @@ class MarkerNavigationWidget extends ZoneWidget { private _severity: Severity; private _backgroundColor: Color; - constructor(editor: ICodeEditor, private _model: MarkerModel, private _commandService: ICommandService, private _themeService: IThemeService) { + constructor(editor: ICodeEditor, private _model: MarkerModel, private _themeService: IThemeService) { super(editor, { showArrow: true, showFrame: true, isAccessible: true }); this._severity = Severity.Warning; this._backgroundColor = Color.white; @@ -377,7 +376,6 @@ class MarkerController implements editorCommon.IEditorContribution { editor: ICodeEditor, @IMarkerService private _markerService: IMarkerService, @IContextKeyService private _contextKeyService: IContextKeyService, - @ICommandService private _commandService: ICommandService, @IThemeService private _themeService: IThemeService ) { this._editor = editor; @@ -407,7 +405,7 @@ class MarkerController implements editorCommon.IEditorContribution { const markers = this._getMarkers(); this._model = new MarkerModel(this._editor, markers); - this._zone = new MarkerNavigationWidget(this._editor, this._model, this._commandService, this._themeService); + this._zone = new MarkerNavigationWidget(this._editor, this._model, this._themeService); this._markersNavigationVisible.set(true); this._callOnClose.push(this._model); diff --git a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts index 54143b106bafc..4bc4b88d0fa66 100644 --- a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts +++ b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts @@ -434,8 +434,8 @@ export class DeleteAllLeftAction extends AbstractDeleteAllToBoundaryAction { } _getEndCursorState(primaryCursor: Range, rangesToDelete: Range[]): Selection[] { - let endPrimaryCursor: Range; - let endCursorState = []; + let endPrimaryCursor: Selection; + let endCursorState: Selection[] = []; for (let i = 0, len = rangesToDelete.length; i < len; i++) { let range = rangesToDelete[i]; @@ -488,8 +488,8 @@ export class DeleteAllRightAction extends AbstractDeleteAllToBoundaryAction { } _getEndCursorState(primaryCursor: Range, rangesToDelete: Range[]): Selection[] { - let endPrimaryCursor: Range; - let endCursorState = []; + let endPrimaryCursor: Selection; + let endCursorState: Selection[] = []; for (let i = 0, len = rangesToDelete.length, offset = 0; i < len; i++) { let range = rangesToDelete[i]; let endCursor = new Selection(range.startLineNumber - offset, range.startColumn, range.startLineNumber - offset, range.startColumn); diff --git a/src/vs/editor/contrib/quickFix/browser/lightBulbWidget.ts b/src/vs/editor/contrib/quickFix/browser/lightBulbWidget.ts index f0946cd792931..c1bde40b2d762 100644 --- a/src/vs/editor/contrib/quickFix/browser/lightBulbWidget.ts +++ b/src/vs/editor/contrib/quickFix/browser/lightBulbWidget.ts @@ -18,7 +18,7 @@ export class LightBulbWidget implements IDisposable { private readonly _options = { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, glyphMarginClassName: 'lightbulb-glyph', - glyphMarginHoverMessage: undefined + glyphMarginHoverMessage: undefined }; private readonly _editor: ICodeEditor; diff --git a/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts b/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts index 3adcedc0662d9..6249277425f0f 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts @@ -163,8 +163,8 @@ CommandsRegistry.registerCommand('editor.action.showReferences', { } }); -function closeActiveReferenceSearch(accessor, args) { - var outerEditor = getOuterEditor(accessor, args); +function closeActiveReferenceSearch(accessor: ServicesAccessor, args: any) { + var outerEditor = getOuterEditor(accessor); if (!outerEditor) { return; } diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts index d4bff8009dddc..140a7e3e0e8d4 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts @@ -58,7 +58,7 @@ export class ReferencesController implements editorCommon.IEditorContribution { editor: ICodeEditor, @IContextKeyService contextKeyService: IContextKeyService, @IEditorService private _editorService: IEditorService, - @ITextModelResolverService private _textModelResolverService, + @ITextModelResolverService private _textModelResolverService: ITextModelResolverService, @ITelemetryService private _telemetryService: ITelemetryService, @IMessageService private _messageService: IMessageService, @IInstantiationService private _instantiationService: IInstantiationService, diff --git a/src/vs/editor/contrib/snippet/common/snippet.ts b/src/vs/editor/contrib/snippet/common/snippet.ts index 84c1b1490ef4a..8efd9e2b8877c 100644 --- a/src/vs/editor/contrib/snippet/common/snippet.ts +++ b/src/vs/editor/contrib/snippet/common/snippet.ts @@ -214,7 +214,7 @@ export class CodeSnippet implements ICodeSnippet { // Compute resultPlaceHolders for (const originalPlaceHolder of this.placeHolders) { - let resultOccurences = []; + let resultOccurences: Range[] = []; for (let { startLineNumber, startColumn, endLineNumber, endColumn } of originalPlaceHolder.occurences) { @@ -232,12 +232,12 @@ export class CodeSnippet implements ICodeSnippet { endColumn += referenceIndentation.length; } - resultOccurences.push({ - startLineNumber: startLineNumber + deltaLine, + resultOccurences.push(new Range( + startLineNumber + deltaLine, startColumn, - endLineNumber: endLineNumber + deltaLine, + endLineNumber + deltaLine, endColumn, - }); + )); } resultPlaceHolders.push({ diff --git a/src/vs/editor/contrib/suggest/browser/suggestModel.ts b/src/vs/editor/contrib/suggest/browser/suggestModel.ts index 1bb4c209b1898..93a9a0a9219c8 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestModel.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestModel.ts @@ -68,7 +68,7 @@ export class LineContext { readonly column: number; readonly leadingLineContent: string; readonly leadingWord: IWordAtPosition; - readonly auto; + readonly auto: boolean; constructor(model: IModel, position: Position, auto: boolean) { this.leadingLineContent = model.getLineContent(position.lineNumber).substr(0, position.column - 1); diff --git a/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts b/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts index ba122d64d51b9..af82d02dca052 100644 --- a/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts +++ b/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts @@ -9,6 +9,7 @@ import { ISuggestion, ISuggestResult, ISuggestSupport, SuggestionType } from 'vs import { ISuggestionItem } from 'vs/editor/contrib/suggest/browser/suggest'; import { CompletionModel } from 'vs/editor/contrib/suggest/browser/completionModel'; import { IPosition } from 'vs/editor/common/core/position'; +import { TPromise } from "vs/base/common/winjs.base"; suite('CompletionModel', function () { @@ -36,7 +37,7 @@ suite('CompletionModel', function () { } }; - resolve() { + resolve(): TPromise { return null; } }; diff --git a/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts b/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts index c994fda89fb50..97a76078bba10 100644 --- a/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts +++ b/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts @@ -37,7 +37,7 @@ export interface IPeekViewService { isActive: boolean; } -export function getOuterEditor(accessor: ServicesAccessor, args: any): ICommonCodeEditor { +export function getOuterEditor(accessor: ServicesAccessor): ICommonCodeEditor { let editor = accessor.get(ICodeEditorService).getFocusedCodeEditor(); if (editor instanceof EmbeddedCodeEditorWidget) { return editor.getParentEditor(); diff --git a/src/vs/editor/node/languageConfigurationExtensionPoint.ts b/src/vs/editor/node/languageConfigurationExtensionPoint.ts index 25a180b79f010..ee24733bf1bfc 100644 --- a/src/vs/editor/node/languageConfigurationExtensionPoint.ts +++ b/src/vs/editor/node/languageConfigurationExtensionPoint.ts @@ -5,7 +5,7 @@ 'use strict'; import * as nls from 'vs/nls'; -import { parse } from 'vs/base/common/json'; +import { parse, ParseError } from 'vs/base/common/json'; import { readFile } from 'vs/base/node/pfs'; import { CharacterPair, LanguageConfiguration, IAutoClosingPair, IAutoClosingPairConditional, CommentRule } from 'vs/editor/common/modes/languageConfiguration'; import { IModeService } from 'vs/editor/common/services/modeService'; @@ -60,7 +60,7 @@ export class LanguageConfigurationFileHandler { private _handleConfigFile(languageIdentifier: LanguageIdentifier, configFilePath: string): void { readFile(configFilePath).then((fileContents) => { - var errors = []; + var errors: ParseError[] = []; var configuration = parse(fileContents.toString(), errors); if (errors.length) { console.error(nls.localize('parseErrors', "Errors parsing {0}: {1}", configFilePath, errors.join('\n'))); diff --git a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts index a5cf90e7e1a90..2dbd09ac1c023 100644 --- a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts +++ b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts @@ -32,7 +32,7 @@ suite('Decoration Render Options', () => { function readStyleSheet(styleSheet: HTMLStyleElement): string { if ((styleSheet.sheet).rules) { - return Array.prototype.map.call((styleSheet.sheet).rules, r => r.cssText).join('\n'); + return Array.prototype.map.call((styleSheet.sheet).rules, (r: { cssText: string }) => r.cssText).join('\n'); } return styleSheet.sheet.toString(); } diff --git a/src/vs/editor/test/browser/view/viewLayer.test.ts b/src/vs/editor/test/browser/view/viewLayer.test.ts index 51344c85c73f7..a71138fc3b731 100644 --- a/src/vs/editor/test/browser/view/viewLayer.test.ts +++ b/src/vs/editor/test/browser/view/viewLayer.test.ts @@ -51,7 +51,7 @@ suite('RenderedLinesCollection onLinesDeleted', () => { new TestLine('old9') ]); let actualDeleted1 = col.onLinesDeleted(deleteFromLineNumber, deleteToLineNumber); - let actualDeleted = []; + let actualDeleted: string[] = []; if (actualDeleted1) { actualDeleted = actualDeleted1.map(line => line.id); } @@ -407,7 +407,7 @@ suite('RenderedLinesCollection onLinesInserted', () => { new TestLine('old9') ]); let actualDeleted1 = col.onLinesInserted(insertFromLineNumber, insertToLineNumber); - let actualDeleted = []; + let actualDeleted: string[] = []; if (actualDeleted1) { actualDeleted = actualDeleted1.map(line => line.id); } diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index 3619bef7d237d..69351a8a81dfe 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -1699,7 +1699,7 @@ suite('Editor Controller - Regression tests', () => { }, (model, cursor) => { moveTo(cursor, 1, 1, false); - function assertWordRight(col, expectedCol) { + function assertWordRight(col: number, expectedCol: number) { let args = { position: { lineNumber: 1, diff --git a/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts b/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts index 7236cf52bb8e7..1b4ae6b014de4 100644 --- a/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts +++ b/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts @@ -7,14 +7,11 @@ import * as assert from 'assert'; import { Cursor } from 'vs/editor/common/controller/cursor'; import { Position } from 'vs/editor/common/core/position'; -import { ITextModelCreationOptions } from 'vs/editor/common/editorCommon'; import { Model } from 'vs/editor/common/model/model'; -import { IMode } from 'vs/editor/common/modes'; import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; import { CursorMove } from 'vs/editor/common/controller/cursorMoveCommands'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; -import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { CoreNavigationCommands } from 'vs/editor/common/controller/coreCommands'; import { ViewModel } from "vs/editor/common/viewModel/viewModelImpl"; @@ -409,13 +406,6 @@ suite('Cursor move command test', () => { }); }); -interface ICursorOpts { - text: string[]; - mode?: IMode; - modelOpts?: ITextModelCreationOptions; - editorOpts?: IEditorOptions; -} - // Move command function move(cursor: Cursor, args: any) { diff --git a/src/vs/editor/test/common/diff/diffComputer.test.ts b/src/vs/editor/test/common/diff/diffComputer.test.ts index 90349d7b7b000..3bb149dcf5383 100644 --- a/src/vs/editor/test/common/diff/diffComputer.test.ts +++ b/src/vs/editor/test/common/diff/diffComputer.test.ts @@ -8,7 +8,7 @@ import * as assert from 'assert'; import { DiffComputer } from 'vs/editor/common/diff/diffComputer'; import { IChange, ICharChange, ILineChange } from 'vs/editor/common/editorCommon'; -function extractCharChangeRepresentation(change, expectedChange): ICharChange { +function extractCharChangeRepresentation(change: ICharChange, expectedChange: ICharChange): ICharChange { var hasOriginal = expectedChange && expectedChange.originalStartLineNumber > 0; var hasModified = expectedChange && expectedChange.modifiedStartLineNumber > 0; return { @@ -24,7 +24,7 @@ function extractCharChangeRepresentation(change, expectedChange): ICharChange { }; } -function extractLineChangeRepresentation(change, expectedChange): IChange | ILineChange { +function extractLineChangeRepresentation(change: ILineChange, expectedChange: ILineChange): IChange | ILineChange { if (change.charChanges) { let charChanges: ICharChange[] = []; for (let i = 0; i < change.charChanges.length; i++) { @@ -61,12 +61,12 @@ function assertDiff(originalLines: string[], modifiedLines: string[], expectedCh var extracted = []; for (var i = 0; i < changes.length; i++) { - extracted.push(extractLineChangeRepresentation(changes[i], i < expectedChanges.length ? expectedChanges[i] : null)); + extracted.push(extractLineChangeRepresentation(changes[i], (i < expectedChanges.length ? expectedChanges[i] : null))); } assert.deepEqual(extracted, expectedChanges); } -function createLineDeletion(startLineNumber, endLineNumber, modifiedLineNumber): IChange { +function createLineDeletion(startLineNumber: number, endLineNumber: number, modifiedLineNumber: number): IChange { return { originalStartLineNumber: startLineNumber, originalEndLineNumber: endLineNumber, @@ -75,7 +75,7 @@ function createLineDeletion(startLineNumber, endLineNumber, modifiedLineNumber): }; } -function createLineInsertion(startLineNumber, endLineNumber, originalLineNumber): IChange { +function createLineInsertion(startLineNumber: number, endLineNumber: number, originalLineNumber: number): IChange { return { originalStartLineNumber: originalLineNumber, originalEndLineNumber: 0, @@ -84,7 +84,7 @@ function createLineInsertion(startLineNumber, endLineNumber, originalLineNumber) }; } -function createLineChange(originalStartLineNumber, originalEndLineNumber, modifiedStartLineNumber, modifiedEndLineNumber, charChanges): ILineChange { +function createLineChange(originalStartLineNumber: number, originalEndLineNumber: number, modifiedStartLineNumber: number, modifiedEndLineNumber: number, charChanges: ICharChange[]): ILineChange { return { originalStartLineNumber: originalStartLineNumber, originalEndLineNumber: originalEndLineNumber, @@ -94,7 +94,7 @@ function createLineChange(originalStartLineNumber, originalEndLineNumber, modifi }; } -function createCharInsertion(startLineNumber, startColumn, endLineNumber, endColumn) { +function createCharInsertion(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number) { return { originalStartLineNumber: 0, originalStartColumn: 0, @@ -107,7 +107,7 @@ function createCharInsertion(startLineNumber, startColumn, endLineNumber, endCol }; } -function createCharDeletion(startLineNumber, startColumn, endLineNumber, endColumn) { +function createCharDeletion(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number) { return { originalStartLineNumber: startLineNumber, originalStartColumn: startColumn, @@ -120,8 +120,10 @@ function createCharDeletion(startLineNumber, startColumn, endLineNumber, endColu }; } -function createCharChange(originalStartLineNumber, originalStartColumn, originalEndLineNumber, originalEndColumn, - modifiedStartLineNumber, modifiedStartColumn, modifiedEndLineNumber, modifiedEndColumn) { +function createCharChange( + originalStartLineNumber: number, originalStartColumn: number, originalEndLineNumber: number, originalEndColumn: number, + modifiedStartLineNumber: number, modifiedStartColumn: number, modifiedEndLineNumber: number, modifiedEndColumn: number +) { return { originalStartLineNumber: originalStartLineNumber, originalStartColumn: originalStartColumn, diff --git a/src/vs/editor/test/common/mocks/mockExtensionService.ts b/src/vs/editor/test/common/mocks/mockExtensionService.ts index 7eb1c1be34618..039c9ec9eb630 100644 --- a/src/vs/editor/test/common/mocks/mockExtensionService.ts +++ b/src/vs/editor/test/common/mocks/mockExtensionService.ts @@ -32,7 +32,7 @@ export class MockExtensionService extends AbstractExtensionService { [1, 4, 4, 7, 7, 10, 10, 13], ]; tokenIterator(thisModel, new Position(1, 1), (iter) => { - var a = [], line = 0; + var a: number[] = [], line = 0; while (iter.hasNext()) { calls++; if (a.length === 0) { @@ -450,7 +450,7 @@ suite('Editor Model - Token Iterator', () => { test('iterator allows next/prev', () => { var n = 0; - var up = [], down = []; + var up: ITokenInfo[] = [], down: ITokenInfo[] = []; tokenIterator(thisModel, new Position(1, 1), (iter) => { while (iter.hasNext()) { var next = iter.next(); @@ -473,7 +473,7 @@ suite('Editor Model - Token Iterator', () => { test('iterator allows prev/next', () => { var n = 0; - var up = [], down = []; + var up: ITokenInfo[] = [], down: ITokenInfo[] = []; tokenIterator(thisModel, new Position(3, 12), (iter) => { while (iter.hasPrev()) { var prev = iter.prev(); @@ -496,7 +496,7 @@ suite('Editor Model - Token Iterator', () => { test('iterator can not be used outside of callback', () => { - var illegalIterReference; + var illegalIterReference: TokenIterator; tokenIterator(thisModel, new Position(3, 12), (iter) => { illegalIterReference = iter; }); diff --git a/src/vs/editor/test/common/model/modelDecorations.test.ts b/src/vs/editor/test/common/model/modelDecorations.test.ts index 12a6c4233d085..b148ac36e17fc 100644 --- a/src/vs/editor/test/common/model/modelDecorations.test.ts +++ b/src/vs/editor/test/common/model/modelDecorations.test.ts @@ -49,7 +49,7 @@ function addDecoration(model: Model, startLineNumber: number, startColumn: numbe }); } -function lineHasDecorations(model, lineNumber, decorations) { +function lineHasDecorations(model: Model, lineNumber: number, decorations: { start: number; end: number; className: string; }[]) { var lineDecorations = []; var decs = model.getLineDecorations(lineNumber); for (var i = 0, len = decs.length; i < len; i++) { @@ -62,11 +62,11 @@ function lineHasDecorations(model, lineNumber, decorations) { assert.deepEqual(lineDecorations, decorations, 'Line decorations'); } -function lineHasNoDecorations(model, lineNumber) { +function lineHasNoDecorations(model: Model, lineNumber: number) { lineHasDecorations(model, lineNumber, []); } -function lineHasDecoration(model, lineNumber, start, end, className) { +function lineHasDecoration(model: Model, lineNumber: number, start: number, end: number, className: string) { lineHasDecorations(model, lineNumber, [{ start: start, end: end, @@ -542,7 +542,7 @@ suite('deltaDecorations', () => { endColumn: 1 }, options: { - hoverMessage: ['hello1'] + hoverMessage: 'hello1' } }]); @@ -554,13 +554,13 @@ suite('deltaDecorations', () => { endColumn: 1 }, options: { - hoverMessage: ['hello2'] + hoverMessage: 'hello2' } }]); let actualDecoration = model.getDecorationOptions(ids[0]); - assert.equal(actualDecoration.hoverMessage[0], 'hello2'); + assert.equal(actualDecoration.hoverMessage, 'hello2'); model.dispose(); }); diff --git a/src/vs/editor/test/common/model/textModelWithTokens.test.ts b/src/vs/editor/test/common/model/textModelWithTokens.test.ts index 09ac2a2df07b7..6ac512096dd10 100644 --- a/src/vs/editor/test/common/model/textModelWithTokens.test.ts +++ b/src/vs/editor/test/common/model/textModelWithTokens.test.ts @@ -240,7 +240,7 @@ suite('TextModelWithTokens - bracket matching', () => { [new Position(5, 5), new Range(5, 4, 5, 5), new Range(1, 11, 1, 12)], ]; - let isABracket = { 1: {}, 2: {}, 3: {}, 4: {}, 5: {} }; + let isABracket: { [lineNumber: number]: { [col: number]: boolean; }; } = { 1: {}, 2: {}, 3: {}, 4: {}, 5: {} }; for (let i = 0, len = brackets.length; i < len; i++) { let [testPos, b1, b2] = brackets[i]; isBracket2(model, testPos, [b1, b2]); @@ -250,7 +250,7 @@ suite('TextModelWithTokens - bracket matching', () => { for (let i = 1, len = model.getLineCount(); i <= len; i++) { let line = model.getLineContent(i); for (let j = 1, lenJ = line.length + 1; j <= lenJ; j++) { - if (!isABracket[i].hasOwnProperty(j)) { + if (!isABracket[i].hasOwnProperty(j)) { isNotABracket(model, i, j); } } diff --git a/src/vs/platform/contextkey/test/common/contextkey.test.ts b/src/vs/platform/contextkey/test/common/contextkey.test.ts index 8456226890749..69f8bca09302b 100644 --- a/src/vs/platform/contextkey/test/common/contextkey.test.ts +++ b/src/vs/platform/contextkey/test/common/contextkey.test.ts @@ -7,7 +7,13 @@ import * as assert from 'assert'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; -const createContext = ctx => ({ getValue: key => ctx[key] }); +function createContext(ctx: any) { + return { + getValue: (key: string) => { + return ctx[key]; + } + }; +} suite('ContextKeyExpr', () => { test('ContextKeyExpr.equals', function () { diff --git a/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts b/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts index 64be8f6ad364f..f5cc9fb798462 100644 --- a/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts +++ b/src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts @@ -20,7 +20,13 @@ import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKe import { OS } from 'vs/base/common/platform'; import { IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding'; -const createContext = ctx => ({ getValue: key => ctx[key] }); +function createContext(ctx: any) { + return { + getValue: (key: string) => { + return ctx[key]; + } + }; +} suite('AbstractKeybindingService', () => { diff --git a/src/vs/platform/keybinding/test/common/keybindingResolver.test.ts b/src/vs/platform/keybinding/test/common/keybindingResolver.test.ts index 13088ab90c227..dc22f50d3ceb1 100644 --- a/src/vs/platform/keybinding/test/common/keybindingResolver.test.ts +++ b/src/vs/platform/keybinding/test/common/keybindingResolver.test.ts @@ -12,7 +12,13 @@ import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKe import { USLayoutResolvedKeybinding } from 'vs/platform/keybinding/common/usLayoutResolvedKeybinding'; import { OS } from 'vs/base/common/platform'; -const createContext = ctx => ({ getValue: key => ctx[key] }); +function createContext(ctx: any) { + return { + getValue: (key: string) => { + return ctx[key]; + } + }; +} suite('KeybindingResolver', () => { diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts index 9733c62707f6a..58359b3d35261 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts @@ -93,7 +93,6 @@ export class KeybindingEditorRenderer extends Disposable { constructor( private _editor: ICodeEditor, - @IKeybindingService private _keybindingService: IKeybindingService, @IInstantiationService private _instantiationService: IInstantiationService ) { super(); diff --git a/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts b/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts index dacd436e19476..fdb96d9beaa5c 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts @@ -156,7 +156,7 @@ class SnippetsService implements ISnippetsService { registerSingleton(ISnippetsService, SnippetsService); export interface ISimpleModel { - getLineContent(lineNumber): string; + getLineContent(lineNumber: number): string; } export function getNonWhitespacePrefix(model: ISimpleModel, position: Position): string { diff --git a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts index c7c61fc9d376a..9e6f12e696c9e 100644 --- a/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts +++ b/src/vs/workbench/services/keybinding/electron-browser/keybindingService.ts @@ -266,10 +266,10 @@ export class WorkbenchKeybindingService extends AbstractKeybindingService { @IContextKeyService contextKeyService: IContextKeyService, @ICommandService commandService: ICommandService, @ITelemetryService private telemetryService: ITelemetryService, - @IMessageService private messageService: IMessageService, + @IMessageService messageService: IMessageService, @IEnvironmentService environmentService: IEnvironmentService, @IStatusbarService statusBarService: IStatusbarService, - @IConfigurationService private configurationService: IConfigurationService + @IConfigurationService configurationService: IConfigurationService ) { super(contextKeyService, commandService, messageService, statusBarService); diff --git a/src/vs/workbench/services/keybinding/test/keyboardMapperTestUtils.ts b/src/vs/workbench/services/keybinding/test/keyboardMapperTestUtils.ts index ae6d665728b9a..d79895b63f017 100644 --- a/src/vs/workbench/services/keybinding/test/keyboardMapperTestUtils.ts +++ b/src/vs/workbench/services/keybinding/test/keyboardMapperTestUtils.ts @@ -88,7 +88,7 @@ export function readRawMapping(file: string): TPromise { let contents = buff.toString(); let func = new Function('define', contents); let rawMappings: T = null; - func(function (value) { + func(function (value: T) { rawMappings = value; }); return rawMappings; From 95d5107965cbf6d8672a24f52569ce11ebb14a7c Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sat, 20 May 2017 17:23:39 +0200 Subject: [PATCH 0811/2747] Fixes #16332: Do not break at offsets that would lead to overflows --- .../common/viewModel/characterHardWrappingLineMapper.ts | 4 ++-- .../common/viewModel/characterHardWrappingLineMapper.test.ts | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/common/viewModel/characterHardWrappingLineMapper.ts b/src/vs/editor/common/viewModel/characterHardWrappingLineMapper.ts index 39d5d6183251d..d301593e8c179 100644 --- a/src/vs/editor/common/viewModel/characterHardWrappingLineMapper.ts +++ b/src/vs/editor/common/viewModel/characterHardWrappingLineMapper.ts @@ -162,13 +162,13 @@ export class CharacterHardWrappingLineMapperFactory implements ILineMapperFactor let breakBeforeOffset: number; let restoreVisibleColumnFrom: number; - if (niceBreakOffset !== -1) { + if (niceBreakOffset !== -1 && niceBreakVisibleColumn <= breakingColumn) { // We will break before `niceBreakLastOffset` breakBeforeOffset = niceBreakOffset; restoreVisibleColumnFrom = niceBreakVisibleColumn; - } else if (obtrusiveBreakOffset !== -1) { + } else if (obtrusiveBreakOffset !== -1 && obtrusiveBreakVisibleColumn <= breakingColumn) { // We will break before `obtrusiveBreakLastOffset` breakBeforeOffset = obtrusiveBreakOffset; diff --git a/src/vs/editor/test/common/viewModel/characterHardWrappingLineMapper.test.ts b/src/vs/editor/test/common/viewModel/characterHardWrappingLineMapper.test.ts index 54c7b2b28a601..614295413ff4e 100644 --- a/src/vs/editor/test/common/viewModel/characterHardWrappingLineMapper.test.ts +++ b/src/vs/editor/test/common/viewModel/characterHardWrappingLineMapper.test.ts @@ -101,4 +101,9 @@ suite('Editor ViewModel - CharacterHardWrappingLineMapper', () => { let factory = new CharacterHardWrappingLineMapperFactory('', ' ', ''); assertLineMapping(factory, 4, 38, ' *123456789012345678901234567890123456|7890', WrappingIndent.Same); }); + + test('issue #16332: Scroll bar overlaying on top of text', () => { + let factory = new CharacterHardWrappingLineMapperFactory('', ' ', ''); + assertLineMapping(factory, 4, 24, 'a/ very/long/line/of/tex|t/that/expands/beyon|d/your/typical/line/|of/code/', WrappingIndent.Indent); + }); }); From c671df07d63756f57533d98fe97c04e0c5fd2d75 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Sat, 20 May 2017 10:29:14 -0700 Subject: [PATCH 0812/2747] Move focus to docs only if docs is open --- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 51f12cd01a886..ac95a24f60872 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -488,6 +488,7 @@ export class SuggestWidget implements IContentWidget, IDelegate this.listElement.style.borderColor = borderColor.toString(); this.details.element.style.borderColor = borderColor.toString(); this.messageElement.style.borderColor = borderColor.toString(); + this.detailsBorderColor = borderColor.toString(); } let focusBorderColor = theme.getColor(focusBorder); if (focusBorderColor) { @@ -795,7 +796,8 @@ export class SuggestWidget implements IContentWidget, IDelegate if (this.detailsBorderColor) { this.details.element.style.borderColor = this.detailsBorderColor; } - } else if (this.state === State.Open) { + } else if (this.state === State.Open + && this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, false)) { this.setState(State.Details); if (this.detailsFocusBorderColor) { this.details.element.style.borderColor = this.detailsFocusBorderColor; From 42ab4c41a415f310f0eeec2afd717f7436795a58 Mon Sep 17 00:00:00 2001 From: Matt Shirley Date: Sat, 20 May 2017 00:10:04 -0700 Subject: [PATCH 0813/2747] Add "pullFrom" git command Resolves Microsoft/vscode#26738 --- extensions/git/package.json | 14 ++++++++++++++ extensions/git/package.nls.json | 1 + extensions/git/src/commands.ts | 27 ++++++++++++++++++++++++++- extensions/git/src/git.ts | 9 ++++++++- extensions/git/src/model.ts | 4 ++-- 5 files changed, 51 insertions(+), 4 deletions(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index 2a47e2dc209b0..8361cf0a4c50d 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -182,6 +182,11 @@ "title": "%command.pullRebase%", "category": "Git" }, + { + "command": "git.pullFrom", + "title": "%command.pullFrom%", + "category": "Git" + }, { "command": "git.push", "title": "%command.push%", @@ -306,6 +311,10 @@ "command": "git.pullRebase", "when": "config.git.enabled && scmProvider == git && gitState == idle" }, + { + "command": "git.pullFrom", + "when": "config.git.enabled && scmProvider == git && gitState == idle" + }, { "command": "git.push", "when": "config.git.enabled && scmProvider == git && gitState == idle" @@ -358,6 +367,11 @@ "group": "1_sync", "when": "config.git.enabled && scmProvider == git && gitState == idle" }, + { + "command": "git.pullFrom", + "group": "1_sync", + "when": "config.git.enabled && scmProvider == git && gitState == idle" + }, { "command": "git.push", "group": "1_sync", diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index efdde34dd7afa..0eb876b369fec 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -23,6 +23,7 @@ "command.branch": "Create Branch...", "command.pull": "Pull", "command.pullRebase": "Pull (Rebase)", + "command.pullFrom": "Pull from...", "command.push": "Push", "command.pushTo": "Push to...", "command.sync": "Sync", diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 24f9c35129a84..cb9b05dc179b7 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -723,6 +723,31 @@ export class CommandCenter { await this.model.pull(true); } + @command('git.pullFrom') + async pullFrom(): Promise { + const remotes = this.model.remotes; + + if (remotes.length === 0) { + window.showWarningMessage(localize('no remotes to pull', "Your repository has no remotes configured to pull from.")); + return; + } + + const picks = remotes.map(r => ({ label: r.name, description: r.url })); + const placeHolder = localize('pick remote pull', "Pick a remote to pull from"); + const pickRemote = await window.showQuickPick(picks, { placeHolder }); + + const pickBranch = await window.showInputBox({ + prompt: localize('pick pull branch', "Type a branch to pull"), + ignoreFocusOut: true + }); + + if (!pickRemote || !pickBranch) { + return; + } + + this.model.pull(false, pickRemote.label, pickBranch); + } + @command('git.push') async push(): Promise { const remotes = this.model.remotes; @@ -894,4 +919,4 @@ export class CommandCenter { dispose(): void { this.disposables.forEach(d => d.dispose()); } -} \ No newline at end of file +} diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 751fbccc15eaa..3d75edd48c0af 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -291,6 +291,8 @@ function getGitErrorCode(stderr: string): string | undefined { return GitErrorCodes.RepositoryNotFound; } else if (/unable to access/.test(stderr)) { return GitErrorCodes.CantAccessRemote; + } else if (/Couldn\'t find remote ref/.test(stderr)) { + return GitErrorCodes.CantAccessRemote; } return void 0; @@ -730,13 +732,18 @@ export class Repository { } } - async pull(rebase?: boolean): Promise { + async pull(rebase?: boolean, remote?: string, branch?: string): Promise { const args = ['pull']; if (rebase) { args.push('-r'); } + if (remote && branch) { + args.push(remote); + args.push(branch); + } + try { await this.run(args); } catch (err) { diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index 3e8377e93eb2c..8ffd900cbe95b 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -474,8 +474,8 @@ export class Model implements Disposable { } } - async pull(rebase?: boolean): Promise { - await this.run(Operation.Pull, () => this.repository.pull(rebase)); + async pull(rebase?: boolean, remote?: string, branch?: string): Promise { + await this.run(Operation.Pull, () => this.repository.pull(rebase, remote, branch)); } async push(remote?: string, name?: string, options?: PushOptions): Promise { From cef4a07203146d7335e58fe3f5394a4c0aa0d328 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sat, 20 May 2017 21:14:57 +0200 Subject: [PATCH 0814/2747] Optimize allocation and comparison of static model decoration options --- .../editor/browser/widget/diffEditorWidget.ts | 109 +++++++++----- src/vs/editor/common/editorCommon.ts | 6 +- .../editor/common/model/editableTextModel.ts | 10 +- .../common/model/textModelWithDecorations.ts | 137 ++++++++++-------- .../common/viewModel/splitLinesCollection.ts | 4 +- .../bracketMatching/common/bracketMatching.ts | 5 +- .../contrib/codelens/browser/codelens.ts | 5 +- src/vs/editor/contrib/dnd/browser/dnd.ts | 7 +- .../contrib/find/common/findController.ts | 28 ++-- .../contrib/find/common/findDecorations.ts | 64 ++++---- .../contrib/folding/common/foldingModel.ts | 35 +++-- .../hover/browser/modesContentHover.ts | 11 +- .../inPlaceReplace/common/inPlaceReplace.ts | 5 +- src/vs/editor/contrib/links/browser/links.ts | 40 ++--- .../quickOpen/browser/editorQuickOpen.ts | 11 +- .../browser/referencesWidget.ts | 5 +- .../contrib/snippet/browser/snippetSession.ts | 11 +- .../wordHighlighter/common/wordHighlighter.ts | 62 +++++--- .../contrib/zoneWidget/browser/zoneWidget.ts | 3 +- src/vs/monaco.d.ts | 4 - .../common/editor/rangeDecorations.ts | 20 ++- .../browser/preferencesRenderers.ts | 11 +- .../electron-browser/dirtydiffDecorator.ts | 13 +- .../parts/search/common/searchModel.ts | 35 +++-- 24 files changed, 385 insertions(+), 256 deletions(-) diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index 98c20984b8e51..c655b958451ed 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -36,6 +36,7 @@ import { scrollbarShadow, diffInserted, diffRemoved, defaultInsertColor, default import { Color } from 'vs/base/common/color'; import { OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; interface IEditorDiffDecorations { decorations: editorCommon.IModelDeltaDecoration[]; @@ -1373,6 +1374,61 @@ abstract class ViewZonesComputer { protected abstract _produceModifiedFromDiff(lineChange: editorCommon.ILineChange, lineChangeOriginalLength: number, lineChangeModifiedLength: number): IMyViewZone; } +function createDecoration(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number, options: ModelDecorationOptions) { + return { + range: new Range(startLineNumber, startColumn, endLineNumber, endColumn), + options: options + }; +} + +const DECORATIONS = { + + charDelete: ModelDecorationOptions.register({ + className: 'char-delete' + }), + charDeleteWholeLine: ModelDecorationOptions.register({ + className: 'char-delete', + isWholeLine: true + }), + + charInsert: ModelDecorationOptions.register({ + className: 'char-insert' + }), + charInsertWholeLine: ModelDecorationOptions.register({ + className: 'char-insert', + isWholeLine: true + }), + + lineInsert: ModelDecorationOptions.register({ + className: 'line-insert', + marginClassName: 'line-insert', + isWholeLine: true + }), + lineInsertWithSign: ModelDecorationOptions.register({ + className: 'line-insert', + linesDecorationsClassName: 'insert-sign', + marginClassName: 'line-insert', + isWholeLine: true + }), + + lineDelete: ModelDecorationOptions.register({ + className: 'line-delete', + marginClassName: 'line-delete', + isWholeLine: true + }), + lineDeleteWithSign: ModelDecorationOptions.register({ + className: 'line-delete', + linesDecorationsClassName: 'delete-sign', + marginClassName: 'line-delete', + isWholeLine: true + + }), + lineDeleteMargin: ModelDecorationOptions.register({ + marginClassName: 'line-delete', + }) + +}; + class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEditorWidgetStyle, IVerticalSashLayoutProvider { static MINIMUM_EDITOR_WIDTH = 100; @@ -1503,15 +1559,10 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd if (isChangeOrDelete(lineChange)) { result.decorations.push({ range: new Range(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, Number.MAX_VALUE), - options: { - className: 'line-delete', - linesDecorationsClassName: renderIndicators ? 'delete-sign' : undefined, - marginClassName: 'line-delete', - isWholeLine: true - } + options: (renderIndicators ? DECORATIONS.lineDeleteWithSign : DECORATIONS.lineDelete) }); if (!isChangeOrInsert(lineChange) || !lineChange.charChanges) { - result.decorations.push(createDecoration(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, Number.MAX_VALUE, 'char-delete', true)); + result.decorations.push(createDecoration(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, Number.MAX_VALUE, DECORATIONS.charDeleteWholeLine)); } let color = this._removeColor.toString(); @@ -1544,10 +1595,10 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd } else { endColumn = originalModel.getLineLastNonWhitespaceColumn(lineNumber); } - result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, 'char-delete', false)); + result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charDelete)); } } else { - result.decorations.push(createDecoration(charChange.originalStartLineNumber, charChange.originalStartColumn, charChange.originalEndLineNumber, charChange.originalEndColumn, 'char-delete', false)); + result.decorations.push(createDecoration(charChange.originalStartLineNumber, charChange.originalStartColumn, charChange.originalEndLineNumber, charChange.originalEndColumn, DECORATIONS.charDelete)); } } } @@ -1574,15 +1625,10 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd result.decorations.push({ range: new Range(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, Number.MAX_VALUE), - options: { - className: 'line-insert', - linesDecorationsClassName: renderIndicators ? 'insert-sign' : undefined, - marginClassName: 'line-insert', - isWholeLine: true - } + options: (renderIndicators ? DECORATIONS.lineInsertWithSign : DECORATIONS.lineInsert) }); if (!isChangeOrDelete(lineChange) || !lineChange.charChanges) { - result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, Number.MAX_VALUE, 'char-insert', true)); + result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, Number.MAX_VALUE, DECORATIONS.charInsertWholeLine)); } let color = this._insertColor.toString(); result.overviewZones.push(new OverviewRulerZone( @@ -1613,10 +1659,10 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd } else { endColumn = modifiedModel.getLineLastNonWhitespaceColumn(lineNumber); } - result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, 'char-insert', false)); + result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charInsert)); } } else { - result.decorations.push(createDecoration(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn, 'char-insert', false)); + result.decorations.push(createDecoration(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn, DECORATIONS.charInsert)); } } } @@ -1700,9 +1746,7 @@ class DiffEdtorWidgetInline extends DiffEditorWidgetStyle implements IDiffEditor if (isChangeOrDelete(lineChange)) { result.decorations.push({ range: new Range(lineChange.originalStartLineNumber, 1, lineChange.originalEndLineNumber, Number.MAX_VALUE), - options: { - marginClassName: 'line-delete', - } + options: DECORATIONS.lineDeleteMargin }); let color = this._removeColor.toString(); @@ -1737,12 +1781,7 @@ class DiffEdtorWidgetInline extends DiffEditorWidgetStyle implements IDiffEditor if (isChangeOrInsert(lineChange)) { result.decorations.push({ range: new Range(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, Number.MAX_VALUE), - options: { - className: 'line-insert', - linesDecorationsClassName: renderIndicators ? 'insert-sign' : undefined, - marginClassName: 'line-insert', - isWholeLine: true - } + options: (renderIndicators ? DECORATIONS.lineInsertWithSign : DECORATIONS.lineInsert) }); let color = this._insertColor.toString(); @@ -1774,15 +1813,15 @@ class DiffEdtorWidgetInline extends DiffEditorWidgetStyle implements IDiffEditor } else { endColumn = modifiedModel.getLineLastNonWhitespaceColumn(lineNumber); } - result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, 'char-insert', false)); + result.decorations.push(createDecoration(lineNumber, startColumn, lineNumber, endColumn, DECORATIONS.charInsert)); } } else { - result.decorations.push(createDecoration(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn, 'char-insert', false)); + result.decorations.push(createDecoration(charChange.modifiedStartLineNumber, charChange.modifiedStartColumn, charChange.modifiedEndLineNumber, charChange.modifiedEndColumn, DECORATIONS.charInsert)); } } } } else { - result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, Number.MAX_VALUE, 'char-insert', true)); + result.decorations.push(createDecoration(lineChange.modifiedStartLineNumber, 1, lineChange.modifiedEndLineNumber, Number.MAX_VALUE, DECORATIONS.charInsertWholeLine)); } } } @@ -1924,16 +1963,6 @@ function isChangeOrDelete(lineChange: editorCommon.IChange): boolean { return lineChange.originalEndLineNumber > 0; } -function createDecoration(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number, className: string, isWholeLine: boolean) { - return { - range: new Range(startLineNumber, startColumn, endLineNumber, endColumn), - options: { - className: className, - isWholeLine: isWholeLine - } - }; -} - function createFakeLinesDiv(): HTMLElement { let r = document.createElement('div'); r.className = 'diagonal-fill'; diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index c2cb21c2c528a..9a0674a5f28ef 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -89,11 +89,7 @@ export interface IModelDecorationOptions { * Always render the decoration (even when the range it encompasses is collapsed). * @internal */ - showIfCollapsed?: boolean; - /** - * @deprecated : Use `overviewRuler` instead - */ - showInOverviewRuler?: string; + readonly showIfCollapsed?: boolean; /** * If set, render this decoration in the overview ruler. */ diff --git a/src/vs/editor/common/model/editableTextModel.ts b/src/vs/editor/common/model/editableTextModel.ts index 358a30d633021..265d8486fa990 100644 --- a/src/vs/editor/common/model/editableTextModel.ts +++ b/src/vs/editor/common/model/editableTextModel.ts @@ -8,7 +8,7 @@ import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { EditStack } from 'vs/editor/common/model/editStack'; import { ILineEdit, LineMarker, ModelLine, MarkersTracker } from 'vs/editor/common/model/modelLine'; -import { TextModelWithDecorations } from 'vs/editor/common/model/textModelWithDecorations'; +import { TextModelWithDecorations, ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; import * as strings from 'vs/base/common/strings'; import { Selection } from 'vs/editor/common/core/selection'; import { Position } from 'vs/editor/common/core/position'; @@ -813,13 +813,15 @@ export class EditableTextModel extends TextModelWithDecorations implements edito if (range) { this._hasEditableRange = true; - this._editableRangeId = changeAccessor.addDecoration(range, { - stickiness: editorCommon.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges - }); + this._editableRangeId = changeAccessor.addDecoration(range, EditableTextModel._DECORATION_OPTION); } }); } + private static _DECORATION_OPTION = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges + }); + public hasEditableRange(): boolean { return this._hasEditableRange; } diff --git a/src/vs/editor/common/model/textModelWithDecorations.ts b/src/vs/editor/common/model/textModelWithDecorations.ts index 8f7d1a1b66061..b37aaf892dfc0 100644 --- a/src/vs/editor/common/model/textModelWithDecorations.ts +++ b/src/vs/editor/common/model/textModelWithDecorations.ts @@ -839,31 +839,81 @@ function cleanClassName(className: string): string { return className.replace(/[^a-z0-9\-]/gi, ' '); } +export class ModelDecorationOverviewRulerOptions implements editorCommon.IModelDecorationOverviewRulerOptions { + readonly color: string; + readonly darkColor: string; + readonly hcColor: string; + readonly position: editorCommon.OverviewRulerLane; + + constructor(options: editorCommon.IModelDecorationOverviewRulerOptions) { + this.color = strings.empty; + this.darkColor = strings.empty; + this.hcColor = strings.empty; + this.position = editorCommon.OverviewRulerLane.Center; + + if (options && options.color) { + this.color = options.color; + } + if (options && options.darkColor) { + this.darkColor = options.darkColor; + this.hcColor = options.darkColor; + } + if (options && options.hcColor) { + this.hcColor = options.hcColor; + } + if (options && options.hasOwnProperty('position')) { + this.position = options.position; + } + } + + public equals(other: ModelDecorationOverviewRulerOptions): boolean { + return ( + this.color === other.color + && this.darkColor === other.darkColor + && this.hcColor === other.hcColor + && this.position === other.position + ); + } +} + +let lastStaticId = 0; + export class ModelDecorationOptions implements editorCommon.IModelDecorationOptions { - stickiness: editorCommon.TrackedRangeStickiness; - className: string; - hoverMessage: MarkedString | MarkedString[]; - glyphMarginHoverMessage: MarkedString | MarkedString[]; - isWholeLine: boolean; - showIfCollapsed: boolean; - showInOverviewRuler: string; - overviewRuler: editorCommon.IModelDecorationOverviewRulerOptions; - glyphMarginClassName: string; - linesDecorationsClassName: string; - marginClassName: string; - inlineClassName: string; - beforeContentClassName: string; - afterContentClassName: string; - - constructor(options: editorCommon.IModelDecorationOptions) { + public static EMPTY = ModelDecorationOptions.register({}); + + public static register(options: editorCommon.IModelDecorationOptions): ModelDecorationOptions { + return new ModelDecorationOptions(++lastStaticId, options); + } + + public static createDynamic(options: editorCommon.IModelDecorationOptions): ModelDecorationOptions { + return new ModelDecorationOptions(0, options); + } + + readonly staticId: number; + readonly stickiness: editorCommon.TrackedRangeStickiness; + readonly className: string; + readonly hoverMessage: MarkedString | MarkedString[]; + readonly glyphMarginHoverMessage: MarkedString | MarkedString[]; + readonly isWholeLine: boolean; + readonly showIfCollapsed: boolean; + readonly overviewRuler: ModelDecorationOverviewRulerOptions; + readonly glyphMarginClassName: string; + readonly linesDecorationsClassName: string; + readonly marginClassName: string; + readonly inlineClassName: string; + readonly beforeContentClassName: string; + readonly afterContentClassName: string; + + private constructor(staticId: number, options: editorCommon.IModelDecorationOptions) { + this.staticId = staticId; this.stickiness = options.stickiness || editorCommon.TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges; this.className = options.className ? cleanClassName(options.className) : strings.empty; this.hoverMessage = options.hoverMessage || []; this.glyphMarginHoverMessage = options.glyphMarginHoverMessage || strings.empty; this.isWholeLine = options.isWholeLine || false; this.showIfCollapsed = options.showIfCollapsed || false; - this.overviewRuler = _normalizeOverviewRulerOptions(options.overviewRuler, options.showInOverviewRuler); + this.overviewRuler = new ModelDecorationOverviewRulerOptions(options.overviewRuler); this.glyphMarginClassName = options.glyphMarginClassName ? cleanClassName(options.glyphMarginClassName) : strings.empty; this.linesDecorationsClassName = options.linesDecorationsClassName ? cleanClassName(options.linesDecorationsClassName) : strings.empty; this.marginClassName = options.marginClassName ? cleanClassName(options.marginClassName) : strings.empty; @@ -872,21 +922,16 @@ export class ModelDecorationOptions implements editorCommon.IModelDecorationOpti this.afterContentClassName = options.afterContentClassName ? cleanClassName(options.afterContentClassName) : strings.empty; } - private static _overviewRulerEquals(a: editorCommon.IModelDecorationOverviewRulerOptions, b: editorCommon.IModelDecorationOverviewRulerOptions): boolean { - return ( - a.color === b.color - && a.position === b.position - && a.darkColor === b.darkColor - ); - } - public equals(other: ModelDecorationOptions): boolean { + if (this.staticId > 0 || other.staticId > 0) { + return this.staticId === other.staticId; + } + return ( this.stickiness === other.stickiness && this.className === other.className && this.isWholeLine === other.isWholeLine && this.showIfCollapsed === other.showIfCollapsed - && this.showInOverviewRuler === other.showInOverviewRuler && this.glyphMarginClassName === other.glyphMarginClassName && this.linesDecorationsClassName === other.linesDecorationsClassName && this.marginClassName === other.marginClassName @@ -895,7 +940,7 @@ export class ModelDecorationOptions implements editorCommon.IModelDecorationOpti && this.afterContentClassName === other.afterContentClassName && markedStringsEquals(this.hoverMessage, other.hoverMessage) && markedStringsEquals(this.glyphMarginHoverMessage, other.glyphMarginHoverMessage) - && ModelDecorationOptions._overviewRulerEquals(this.overviewRuler, other.overviewRuler) + && this.overviewRuler.equals(other.overviewRuler) ); } } @@ -914,40 +959,8 @@ class ModelDeltaDecoration implements editorCommon.IModelDeltaDecoration { } function _normalizeOptions(options: editorCommon.IModelDecorationOptions): ModelDecorationOptions { - return new ModelDecorationOptions(options); -} - -class ModelDecorationOverviewRulerOptions implements editorCommon.IModelDecorationOverviewRulerOptions { - color: string; - darkColor: string; - hcColor: string; - position: editorCommon.OverviewRulerLane; - - constructor(options: editorCommon.IModelDecorationOverviewRulerOptions, legacyShowInOverviewRuler: string) { - this.color = strings.empty; - this.darkColor = strings.empty; - this.hcColor = strings.empty; - this.position = editorCommon.OverviewRulerLane.Center; - - if (legacyShowInOverviewRuler) { - this.color = legacyShowInOverviewRuler; - } - if (options && options.color) { - this.color = options.color; - } - if (options && options.darkColor) { - this.darkColor = options.darkColor; - this.hcColor = options.darkColor; - } - if (options && options.hcColor) { - this.hcColor = options.hcColor; - } - if (options && options.hasOwnProperty('position')) { - this.position = options.position; - } + if (options instanceof ModelDecorationOptions) { + return options; } -} - -function _normalizeOverviewRulerOptions(options: editorCommon.IModelDecorationOverviewRulerOptions, legacyShowInOverviewRuler: string = null): editorCommon.IModelDecorationOverviewRulerOptions { - return new ModelDecorationOverviewRulerOptions(options, legacyShowInOverviewRuler); + return ModelDecorationOptions.createDynamic(options); } diff --git a/src/vs/editor/common/viewModel/splitLinesCollection.ts b/src/vs/editor/common/viewModel/splitLinesCollection.ts index 726df79208ec0..72caeb160e822 100644 --- a/src/vs/editor/common/viewModel/splitLinesCollection.ts +++ b/src/vs/editor/common/viewModel/splitLinesCollection.ts @@ -12,6 +12,7 @@ import { PrefixSumComputerWithCache } from 'vs/editor/common/viewModel/prefixSum import { ViewLineData } from 'vs/editor/common/viewModel/viewModel'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { WrappingIndent } from 'vs/editor/common/config/editorOptions'; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; export class OutputPosition { _outputPositionBrand: void; @@ -190,8 +191,7 @@ export class SplitLinesCollection { for (let i = 0; i < newRanges.length; i++) { newDecorations.push({ range: newRanges[i], - options: { - } + options: ModelDecorationOptions.EMPTY }); } diff --git a/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts b/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts index 0f0a059283654..3851de0c02a9a 100644 --- a/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts +++ b/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts @@ -16,6 +16,7 @@ import { editorAction, commonEditorContribution, ServicesAccessor, EditorAction import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { registerThemingParticipant } from "vs/platform/theme/common/themeService"; import { editorBracketMatchBackground, editorBracketMatchBorder } from "vs/editor/common/view/editorColorRegistry"; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; @editorAction class SelectBracketAction extends EditorAction { @@ -127,10 +128,10 @@ export class BracketMatchingController extends Disposable implements editorCommo } } - private static _DECORATION_OPTIONS: editorCommon.IModelDecorationOptions = { + private static _DECORATION_OPTIONS = ModelDecorationOptions.register({ stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'bracket-match' - }; + }); private _updateBrackets(): void { if (!this._matchBrackets) { diff --git a/src/vs/editor/contrib/codelens/browser/codelens.ts b/src/vs/editor/contrib/codelens/browser/codelens.ts index 428fa8ba7aedc..84fcda05eb1d3 100644 --- a/src/vs/editor/contrib/codelens/browser/codelens.ts +++ b/src/vs/editor/contrib/codelens/browser/codelens.ts @@ -25,6 +25,7 @@ import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOption import { editorCodeLensForeground } from "vs/editor/common/view/editorColorRegistry"; import { registerThemingParticipant } from "vs/platform/theme/common/themeService"; import { editorActiveLinkForeground } from "vs/platform/theme/common/colorRegistry"; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; class CodeLensViewZone implements editorBrowser.IViewZone { @@ -250,7 +251,7 @@ class CodeLens { helper.addDecoration({ range: codeLensData.symbol.range, - options: {} + options: ModelDecorationOptions.EMPTY }, id => this._decorationIds[i] = id); // the range contains all lenses on this line @@ -297,7 +298,7 @@ class CodeLens { this._data.forEach((codeLensData, i) => { helper.addDecoration({ range: codeLensData.symbol.range, - options: {} + options: ModelDecorationOptions.EMPTY }, id => this._decorationIds[i] = id); }); } diff --git a/src/vs/editor/contrib/dnd/browser/dnd.ts b/src/vs/editor/contrib/dnd/browser/dnd.ts index 49a944af722d9..e305c8af11a96 100644 --- a/src/vs/editor/contrib/dnd/browser/dnd.ts +++ b/src/vs/editor/contrib/dnd/browser/dnd.ts @@ -17,6 +17,7 @@ import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { DragAndDropCommand } from '../common/dragAndDropCommand'; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; @editorContribution export class DragAndDropController implements editorCommon.IEditorContribution { @@ -161,12 +162,16 @@ export class DragAndDropController implements editorCommon.IEditorContribution { this._mouseDown = false; } + private static _DECORATION_OPTIONS = ModelDecorationOptions.register({ + className: 'dnd-target' + }); + public showAt(position: Position): void { this._editor.changeDecorations(changeAccessor => { let newDecorations: editorCommon.IModelDeltaDecoration[] = []; newDecorations.push({ range: new Range(position.lineNumber, position.column, position.lineNumber, position.column), - options: { className: 'dnd-target' } + options: DragAndDropController._DECORATION_OPTIONS }); this._dndDecorationIds = changeAccessor.deltaDecorations(this._dndDecorationIds, newDecorations); diff --git a/src/vs/editor/contrib/find/common/findController.ts b/src/vs/editor/contrib/find/common/findController.ts index cef058f864044..c9fbee3b8a233 100644 --- a/src/vs/editor/contrib/find/common/findController.ts +++ b/src/vs/editor/contrib/find/common/findController.ts @@ -21,6 +21,7 @@ import { RunOnceScheduler, Delayer } from 'vs/base/common/async'; import { CursorChangeReason, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; export const enum FindStartFocusAction { NoFocusChange, @@ -1044,22 +1045,29 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd let decorations = matches.map(r => { return { range: r, - options: { - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - className: 'selectionHighlight', - // Show in overviewRuler only if model has no semantic highlighting - overviewRuler: (hasFindOccurences ? undefined : { - color: '#A0A0A0', - darkColor: '#A0A0A0', - position: editorCommon.OverviewRulerLane.Center - }) - } + // Show in overviewRuler only if model has no semantic highlighting + options: (hasFindOccurences ? SelectionHighlighter._SELECTION_HIGHLIGHT : SelectionHighlighter._SELECTION_HIGHLIGHT_OVERVIEW) }; }); this.decorations = this.editor.deltaDecorations(this.decorations, decorations); } + private static _SELECTION_HIGHLIGHT_OVERVIEW = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'selectionHighlight', + overviewRuler: { + color: '#A0A0A0', + darkColor: '#A0A0A0', + position: editorCommon.OverviewRulerLane.Center + } + }); + + private static _SELECTION_HIGHLIGHT = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'selectionHighlight', + }); + public dispose(): void { this.removeDecorations(); super.dispose(); diff --git a/src/vs/editor/contrib/find/common/findDecorations.ts b/src/vs/editor/contrib/find/common/findDecorations.ts index 30fcf8f68e7ad..2a80081cf0aa9 100644 --- a/src/vs/editor/contrib/find/common/findDecorations.ts +++ b/src/vs/editor/contrib/find/common/findDecorations.ts @@ -8,6 +8,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; export class FindDecorations implements IDisposable { @@ -105,7 +106,7 @@ export class FindDecorations implements IDisposable { } if (newCurrentDecorationId !== null) { let rng = this._editor.getModel().getDecorationRange(newCurrentDecorationId); - this._rangeHighlightDecorationId = changeAccessor.addDecoration(rng, FindDecorations.createRangeHighlightDecoration()); + this._rangeHighlightDecorationId = changeAccessor.addDecoration(rng, FindDecorations._RANGE_HIGHLIGHT_DECORATION); } }); } @@ -123,7 +124,7 @@ export class FindDecorations implements IDisposable { if (findScope) { newDecorations.unshift({ range: findScope, - options: FindDecorations.createFindScopeDecorationOptions() + options: FindDecorations._FIND_SCOPE_DECORATION }); } let tmpDecorations = this._editor.deltaDecorations(this._allDecorations(), newDecorations); @@ -150,31 +151,40 @@ export class FindDecorations implements IDisposable { return result; } - private static createFindMatchDecorationOptions(isCurrent: boolean): editorCommon.IModelDecorationOptions { - return { - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - className: isCurrent ? 'currentFindMatch' : 'findMatch', - showIfCollapsed: true, - overviewRuler: { - color: 'rgba(246, 185, 77, 0.7)', - darkColor: 'rgba(246, 185, 77, 0.7)', - position: editorCommon.OverviewRulerLane.Center - } - }; - } - - private static createRangeHighlightDecoration(): editorCommon.IModelDecorationOptions { - return { - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - className: 'rangeHighlight', - isWholeLine: true - }; + private static createFindMatchDecorationOptions(isCurrent: boolean): ModelDecorationOptions { + return (isCurrent ? this._CURRENT_FIND_MATCH_DECORATION : this._FIND_MATCH_DECORATION); } - private static createFindScopeDecorationOptions(): editorCommon.IModelDecorationOptions { - return { - className: 'findScope', - isWholeLine: true - }; - } + private static _CURRENT_FIND_MATCH_DECORATION = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'currentFindMatch', + showIfCollapsed: true, + overviewRuler: { + color: 'rgba(246, 185, 77, 0.7)', + darkColor: 'rgba(246, 185, 77, 0.7)', + position: editorCommon.OverviewRulerLane.Center + } + }); + + private static _FIND_MATCH_DECORATION = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'findMatch', + showIfCollapsed: true, + overviewRuler: { + color: 'rgba(246, 185, 77, 0.7)', + darkColor: 'rgba(246, 185, 77, 0.7)', + position: editorCommon.OverviewRulerLane.Center + } + }); + + private static _RANGE_HIGHLIGHT_DECORATION = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'rangeHighlight', + isWholeLine: true + }); + + private static _FIND_SCOPE_DECORATION = ModelDecorationOptions.register({ + className: 'findScope', + isWholeLine: true + }); } diff --git a/src/vs/editor/contrib/folding/common/foldingModel.ts b/src/vs/editor/contrib/folding/common/foldingModel.ts index fe771764da6a7..128f450b0873c 100644 --- a/src/vs/editor/contrib/folding/common/foldingModel.ts +++ b/src/vs/editor/contrib/folding/common/foldingModel.ts @@ -5,6 +5,7 @@ import * as editorCommon from 'vs/editor/common/editorCommon'; import { Range } from 'vs/editor/common/core/range'; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; export interface IFoldingRange { startLineNumber: number; @@ -68,25 +69,31 @@ export class CollapsibleRegion { return null; } - private getVisualDecorationOptions(): editorCommon.IModelDecorationOptions { + private static _COLLAPSED_VISUAL_DECORATION = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + afterContentClassName: 'inline-folded', + linesDecorationsClassName: 'folding collapsed' + }); + + private static _EXPANDED_VISUAL_DECORATION = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + linesDecorationsClassName: 'folding' + }); + + private getVisualDecorationOptions(): ModelDecorationOptions { if (this._isCollapsed) { - return { - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - afterContentClassName: 'inline-folded', - linesDecorationsClassName: 'folding collapsed' - }; + return CollapsibleRegion._COLLAPSED_VISUAL_DECORATION; } else { - return { - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - linesDecorationsClassName: 'folding' - }; + return CollapsibleRegion._EXPANDED_VISUAL_DECORATION; } } - private getRangeDecorationOptions(): editorCommon.IModelDecorationOptions { - return { - stickiness: editorCommon.TrackedRangeStickiness.GrowsOnlyWhenTypingBefore - }; + private static _RANGE_DECORATION = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.GrowsOnlyWhenTypingBefore + }); + + private getRangeDecorationOptions(): ModelDecorationOptions { + return CollapsibleRegion._RANGE_DECORATION; } public update(newRange: IFoldingRange, model: editorCommon.IModel, changeAccessor: editorCommon.IModelDecorationsChangeAccessor): void { diff --git a/src/vs/editor/contrib/hover/browser/modesContentHover.ts b/src/vs/editor/contrib/hover/browser/modesContentHover.ts index 6c9d4105c2708..636180c1a66d5 100644 --- a/src/vs/editor/contrib/hover/browser/modesContentHover.ts +++ b/src/vs/editor/contrib/hover/browser/modesContentHover.ts @@ -22,6 +22,7 @@ import { getHover } from '../common/hover'; import { HoverOperation, IHoverComputer } from './hoverOperation'; import { ContentHoverWidget } from './hoverWidgets'; import { textToMarkedString, MarkedString } from 'vs/base/common/htmlContent'; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; class ModesContentComputer implements IHoverComputer { @@ -274,10 +275,12 @@ export class ModesContentHoverWidget extends ContentHoverWidget { this._isChangingDecorations = true; this._highlightDecorations = this._editor.deltaDecorations(this._highlightDecorations, [{ range: highlightRange, - options: { - className: 'hoverHighlight' - } + options: ModesContentHoverWidget._DECORATION_OPTIONS }]); this._isChangingDecorations = false; } -} \ No newline at end of file + + private static _DECORATION_OPTIONS = ModelDecorationOptions.register({ + className: 'hoverHighlight' + }); +} diff --git a/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts b/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts index 773b69e156e64..874af70feda74 100644 --- a/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts +++ b/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts @@ -18,6 +18,7 @@ import { InPlaceReplaceCommand } from './inPlaceReplaceCommand'; import { EditorState, CodeEditorStateFlag } from 'vs/editor/common/core/editorState'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorBracketMatchBorder } from 'vs/editor/common/view/editorColorRegistry'; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; @commonEditorContribution class InPlaceReplaceController implements IEditorContribution { @@ -28,9 +29,9 @@ class InPlaceReplaceController implements IEditorContribution { return editor.getContribution(InPlaceReplaceController.ID); } - private static DECORATION = { + private static DECORATION = ModelDecorationOptions.register({ className: 'valueSetReplacement' - }; + }); private editor: ICommonCodeEditor; private requestIdPool: number; diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index 3be7d77a575c3..44f1d2fb3bd05 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -26,6 +26,13 @@ import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { Position } from 'vs/editor/common/core/position'; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; + +const HOVER_MESSAGE_GENERAL = ( + platform.isMacintosh + ? nls.localize('links.navigate.mac', "Cmd + click to follow link") + : nls.localize('links.navigate', "Ctrl + click to follow link") +); class LinkOccurence { @@ -37,24 +44,24 @@ class LinkOccurence { endLineNumber: link.range.endLineNumber, endColumn: link.range.endColumn }, - options: LinkOccurence._getOptions(link, false) + options: LinkOccurence._getOptions(false) }; } - private static _getOptions(link: Link, isActive: boolean): editorCommon.IModelDecorationOptions { - var result = ''; + private static _LINK_DECORATION = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + inlineClassName: 'detected-link', + hoverMessage: HOVER_MESSAGE_GENERAL + }); - if (isActive) { - result += LinkDetector.CLASS_NAME_ACTIVE; - } else { - result += LinkDetector.CLASS_NAME; - } + private static _ACTIVE_LINK_DECORATION = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + inlineClassName: 'detected-link-active', + hoverMessage: HOVER_MESSAGE_GENERAL + }); - return { - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - inlineClassName: result, - hoverMessage: LinkDetector.HOVER_MESSAGE_GENERAL - }; + private static _getOptions(isActive: boolean): ModelDecorationOptions { + return (isActive ? this._ACTIVE_LINK_DECORATION : this._LINK_DECORATION); } public decorationId: string; @@ -66,11 +73,11 @@ class LinkOccurence { } public activate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor): void { - changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(this.link, true)); + changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(true)); } public deactivate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor): void { - changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(this.link, false)); + changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(false)); } } @@ -86,9 +93,6 @@ class LinkDetector implements editorCommon.IEditorContribution { static RECOMPUTE_TIME = 1000; // ms static TRIGGER_KEY_VALUE = platform.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl; static TRIGGER_MODIFIER = platform.isMacintosh ? 'metaKey' : 'ctrlKey'; - static HOVER_MESSAGE_GENERAL = platform.isMacintosh ? nls.localize('links.navigate.mac', "Cmd + click to follow link") : nls.localize('links.navigate', "Ctrl + click to follow link"); - static CLASS_NAME = 'detected-link'; - static CLASS_NAME_ACTIVE = 'detected-link-active'; private editor: ICodeEditor; private listenersToRemove: IDisposable[]; diff --git a/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts b/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts index feb1726927bcc..3b088852ed418 100644 --- a/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts +++ b/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts @@ -14,6 +14,7 @@ import { Selection } from 'vs/editor/common/core/selection'; import { IActionOptions, EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Range } from 'vs/editor/common/core/range'; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; export interface IQuickOpenControllerOpts { inputAriaLabel: string; @@ -94,6 +95,11 @@ export class QuickOpenController implements editorCommon.IEditorContribution { this.widget.show(''); } + private static _RANGE_HIGHLIGHT_DECORATION = ModelDecorationOptions.register({ + className: 'rangeHighlight', + isWholeLine: true + }); + public decorateLine(range: Range, editor: ICodeEditor): void { editor.changeDecorations((changeAccessor: editorCommon.IModelDecorationsChangeAccessor) => { var oldDecorations: string[] = []; @@ -105,10 +111,7 @@ export class QuickOpenController implements editorCommon.IEditorContribution { var newDecorations: editorCommon.IModelDeltaDecoration[] = [ { range: range, - options: { - className: 'rangeHighlight', - isWholeLine: true - } + options: QuickOpenController._RANGE_HIGHLIGHT_DECORATION } ]; diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index cd68e92353065..a7175ad5a1f2c 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -44,13 +44,14 @@ import { attachListStyler, attachBadgeStyler } from 'vs/platform/theme/common/st import { IModelDecorationsChangedEvent } from 'vs/editor/common/model/textModelEvents'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IEnvironmentService } from "vs/platform/environment/common/environment"; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; class DecorationsManager implements IDisposable { - private static DecorationOptions: editorCommon.IModelDecorationOptions = { + private static DecorationOptions = ModelDecorationOptions.register({ stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'reference-decoration' - }; + }); private _decorations = new Map(); private _decorationIgnoreSet = new Set(); diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index 1496dda543dc5..72395327a67bd 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -6,7 +6,7 @@ 'use strict'; import { getLeadingWhitespace } from 'vs/base/common/strings'; -import { ICommonCodeEditor, IModel, IModelDecorationOptions, TrackedRangeStickiness, IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; +import { ICommonCodeEditor, IModel, TrackedRangeStickiness, IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { TextmateSnippet, Placeholder, SnippetParser } from '../common/snippetParser'; import { Selection } from 'vs/editor/common/core/selection'; @@ -15,6 +15,7 @@ import { IPosition } from 'vs/editor/common/core/position'; import { groupBy } from 'vs/base/common/arrays'; import { dispose } from 'vs/base/common/lifecycle'; import { EditorSnippetVariableResolver } from "vs/editor/contrib/snippet/common/snippetVariables"; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; export class OneSnippet { @@ -27,10 +28,10 @@ export class OneSnippet { private _placeholderGroupsIdx: number; private static readonly _decor = { - active: { stickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges, className: 'snippet-placeholder' }, - inactive: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'snippet-placeholder' }, - activeFinal: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'finish-snippet-placeholder' }, - inactiveFinal: { stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'finish-snippet-placeholder' }, + active: ModelDecorationOptions.register({ stickiness: TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges, className: 'snippet-placeholder' }), + inactive: ModelDecorationOptions.register({ stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'snippet-placeholder' }), + activeFinal: ModelDecorationOptions.register({ stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'finish-snippet-placeholder' }), + inactiveFinal: ModelDecorationOptions.register({ stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, className: 'finish-snippet-placeholder' }), }; constructor(editor: ICommonCodeEditor, snippet: TextmateSnippet, offset: number) { diff --git a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts index e0eca99d8f359..ac03ba1d6476b 100644 --- a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts +++ b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts @@ -18,6 +18,7 @@ import { Position } from 'vs/editor/common/core/position'; import { registerColor, editorSelectionHighlight, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { CursorChangeReason, ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; export const editorWordHighlight = registerColor('editor.wordHighlightBackground', { dark: '#575757B8', light: '#57575740', hc: null }, nls.localize('wordHighlight', 'Background color of a symbol during read-access, like reading a variable.')); export const editorWordHighlightStrong = registerColor('editor.wordHighlightStrongBackground', { dark: '#004972B8', light: '#0e639c40', hc: null }, nls.localize('wordHighlightStrong', 'Background color of a symbol during write-access, like writing to a variable.')); @@ -262,34 +263,55 @@ class WordHighlighter { var decorations: editorCommon.IModelDeltaDecoration[] = []; for (var i = 0, len = this.workerRequestValue.length; i < len; i++) { var info = this.workerRequestValue[i]; - var color = '#A0A0A0'; - - let className: string; - if (info.kind === DocumentHighlightKind.Write) { - className = 'wordHighlightStrong'; - } else if (info.kind === DocumentHighlightKind.Text) { - className = 'selectionHighlight'; - } else { - className = 'wordHighlight'; - } - decorations.push({ range: info.range, - options: { - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - className: className, - overviewRuler: { - color: color, - darkColor: color, - position: editorCommon.OverviewRulerLane.Center - } - } + options: WordHighlighter._getDecorationOptions(info.kind) }); } this._decorationIds = this.editor.deltaDecorations(this._decorationIds, decorations); } + private static _getDecorationOptions(kind: DocumentHighlightKind): ModelDecorationOptions { + if (kind === DocumentHighlightKind.Write) { + return this._WRITE_OPTIONS; + } else if (kind === DocumentHighlightKind.Text) { + return this._TEXT_OPTIONS; + } else { + return this._REGULAR_OPTIONS; + } + } + + private static _WRITE_OPTIONS = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'wordHighlightStrong', + overviewRuler: { + color: '#A0A0A0', + darkColor: '#A0A0A0', + position: editorCommon.OverviewRulerLane.Center + } + }); + + private static _TEXT_OPTIONS = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'selectionHighlight', + overviewRuler: { + color: '#A0A0A0', + darkColor: '#A0A0A0', + position: editorCommon.OverviewRulerLane.Center + } + }); + + private static _REGULAR_OPTIONS = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'wordHighlight', + overviewRuler: { + color: '#A0A0A0', + darkColor: '#A0A0A0', + position: editorCommon.OverviewRulerLane.Center + } + }); + public dispose(): void { this._stopAll(); this.toUnhook = dispose(this.toUnhook); diff --git a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts index 1c987bf7d9f4a..e0de87646d883 100644 --- a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts +++ b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts @@ -16,6 +16,7 @@ import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, IViewZone, IViewZo import { Color, RGBA } from 'vs/base/common/color'; import { EditorLayoutInfo } from 'vs/editor/common/config/editorOptions'; import { Position, IPosition } from 'vs/editor/common/core/position'; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; export interface IOptions { showFrame?: boolean; @@ -228,7 +229,7 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout this._isShowing = true; this._showImpl(range, heightInLines); this._isShowing = false; - this._positionMarkerId = this.editor.deltaDecorations(this._positionMarkerId, [{ range, options: {} }]); + this._positionMarkerId = this.editor.deltaDecorations(this._positionMarkerId, [{ range, options: ModelDecorationOptions.EMPTY }]); } public hide(): void { diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 5380ba9b866d8..9c7b1c6cdfe59 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -1112,10 +1112,6 @@ declare module monaco.editor { * Should the decoration expand to encompass a whole line. */ isWholeLine?: boolean; - /** - * @deprecated : Use `overviewRuler` instead - */ - showInOverviewRuler?: string; /** * If set, render this decoration in the overview ruler. */ diff --git a/src/vs/workbench/common/editor/rangeDecorations.ts b/src/vs/workbench/common/editor/rangeDecorations.ts index 322f0cb7c2651..7c8678ab24cc3 100644 --- a/src/vs/workbench/common/editor/rangeDecorations.ts +++ b/src/vs/workbench/common/editor/rangeDecorations.ts @@ -12,6 +12,7 @@ import { toResource } from 'vs/workbench/common/editor'; import { isEqual } from 'vs/platform/files/common/files'; import { IRange } from 'vs/editor/common/core/range'; import { CursorChangeReason, ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; export interface IRangeHighlightDecoration { resource: URI; @@ -91,12 +92,19 @@ export class RangeHighlightDecorations implements IDisposable { this.editorDisposables = []; } - private createRangeHighlightDecoration(isWholeLine: boolean = true): editorCommon.IModelDecorationOptions { - return { - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - className: 'rangeHighlight', - isWholeLine - }; + private static _WHOLE_LINE_RANGE_HIGHLIGHT = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'rangeHighlight', + isWholeLine: true + }); + + private static _RANGE_HIGHLIGHT = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'rangeHighlight' + }); + + private createRangeHighlightDecoration(isWholeLine: boolean = true): ModelDecorationOptions { + return (isWholeLine ? RangeHighlightDecorations._WHOLE_LINE_RANGE_HIGHLIGHT : RangeHighlightDecorations._RANGE_HIGHLIGHT); } public dispose() { diff --git a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts index adcb8af04f221..bd29a6a03dff5 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts @@ -32,6 +32,7 @@ import { IWorkspaceConfigurationService } from 'vs/workbench/services/configurat import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; export interface IPreferencesRenderer extends IDisposable { preferencesModel: IPreferencesEditorModel; @@ -568,13 +569,15 @@ export class HighlightPreferencesRenderer extends Disposable { } } + private static _FIND_MATCH = ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'findMatch' + }); + private createDecoration(range: IRange, model: editorCommon.IModel): editorCommon.IModelDeltaDecoration { return { range, - options: { - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - className: 'findMatch' - } + options: HighlightPreferencesRenderer._FIND_MATCH }; } diff --git a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts index bfe34e1fde2be..fb3d45c4e7c1c 100644 --- a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts @@ -22,10 +22,11 @@ import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerServ import URI from 'vs/base/common/uri'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ISCMService } from 'vs/workbench/services/scm/common/scm'; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; class DirtyDiffModelDecorator { - static MODIFIED_DECORATION_OPTIONS: common.IModelDecorationOptions = { + static MODIFIED_DECORATION_OPTIONS = ModelDecorationOptions.register({ linesDecorationsClassName: 'dirty-diff-modified-glyph', isWholeLine: true, overviewRuler: { @@ -33,9 +34,9 @@ class DirtyDiffModelDecorator { darkColor: 'rgba(0, 122, 204, 0.6)', position: common.OverviewRulerLane.Left } - }; + }); - static ADDED_DECORATION_OPTIONS: common.IModelDecorationOptions = { + static ADDED_DECORATION_OPTIONS = ModelDecorationOptions.register({ linesDecorationsClassName: 'dirty-diff-added-glyph', isWholeLine: true, overviewRuler: { @@ -43,9 +44,9 @@ class DirtyDiffModelDecorator { darkColor: 'rgba(0, 122, 204, 0.6)', position: common.OverviewRulerLane.Left } - }; + }); - static DELETED_DECORATION_OPTIONS: common.IModelDecorationOptions = { + static DELETED_DECORATION_OPTIONS = ModelDecorationOptions.register({ linesDecorationsClassName: 'dirty-diff-deleted-glyph', isWholeLine: true, overviewRuler: { @@ -53,7 +54,7 @@ class DirtyDiffModelDecorator { darkColor: 'rgba(0, 122, 204, 0.6)', position: common.OverviewRulerLane.Left } - }; + }); private decorations: string[]; private baselineModel: common.IModel; diff --git a/src/vs/workbench/parts/search/common/searchModel.ts b/src/vs/workbench/parts/search/common/searchModel.ts index 5911cbbcbc2a5..87dae50f90ede 100644 --- a/src/vs/workbench/parts/search/common/searchModel.ts +++ b/src/vs/workbench/parts/search/common/searchModel.ts @@ -18,12 +18,13 @@ import { ISearchService, ISearchProgressItem, ISearchComplete, ISearchQuery, IPa import { ReplacePattern } from 'vs/platform/search/common/replace'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { Range } from 'vs/editor/common/core/range'; -import { IModel, IModelDeltaDecoration, OverviewRulerLane, TrackedRangeStickiness, IModelDecorationOptions, FindMatch } from 'vs/editor/common/editorCommon'; +import { IModel, IModelDeltaDecoration, OverviewRulerLane, TrackedRangeStickiness, FindMatch } from 'vs/editor/common/editorCommon'; import { IInstantiationService, createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IModelService } from 'vs/editor/common/services/modelService'; import { IReplaceService } from 'vs/workbench/parts/search/common/replace'; import { IProgressRunner } from 'vs/platform/progress/common/progress'; import { RangeHighlightDecorations } from 'vs/workbench/common/editor/rangeDecorations'; +import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; export class Match { @@ -92,16 +93,28 @@ export class Match { export class FileMatch extends Disposable { - private static getDecorationOption(selected: boolean): IModelDecorationOptions { - return { - stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - className: selected ? 'currentFindMatch' : 'findMatch', - overviewRuler: { - color: 'rgba(246, 185, 77, 0.7)', - darkColor: 'rgba(246, 185, 77, 0.7)', - position: OverviewRulerLane.Center - } - }; + private static _CURRENT_FIND_MATCH = ModelDecorationOptions.register({ + stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'currentFindMatch', + overviewRuler: { + color: 'rgba(246, 185, 77, 0.7)', + darkColor: 'rgba(246, 185, 77, 0.7)', + position: OverviewRulerLane.Center + } + }); + + private static _FIND_MATCH = ModelDecorationOptions.register({ + stickiness: TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + className: 'findMatch', + overviewRuler: { + color: 'rgba(246, 185, 77, 0.7)', + darkColor: 'rgba(246, 185, 77, 0.7)', + position: OverviewRulerLane.Center + } + }); + + private static getDecorationOption(selected: boolean): ModelDecorationOptions { + return (selected ? FileMatch._CURRENT_FIND_MATCH : FileMatch._FIND_MATCH); } private _onChange = this._register(new Emitter()); From 6b1a8e89a2c9783e5b564125e68bfd80d9d54602 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sat, 20 May 2017 21:47:07 +0200 Subject: [PATCH 0815/2747] Fixes #14437: Update state in selection highlighter only if needed --- .../contrib/find/common/findController.ts | 124 ++++++++++++------ 1 file changed, 82 insertions(+), 42 deletions(-) diff --git a/src/vs/editor/contrib/find/common/findController.ts b/src/vs/editor/contrib/find/common/findController.ts index c9fbee3b8a233..40d299bedfb82 100644 --- a/src/vs/editor/contrib/find/common/findController.ts +++ b/src/vs/editor/contrib/find/common/findController.ts @@ -883,6 +883,36 @@ export class CompatChangeAll extends AbstractSelectHighlightsAction { } } +class SelectionHighlighterState { + public readonly lastWordUnderCursor: Selection; + public readonly searchText: string; + public readonly matchCase: boolean; + public readonly wordSeparators: string; + + constructor(lastWordUnderCursor: Selection, searchText: string, matchCase: boolean, wordSeparators: string) { + this.searchText = searchText; + this.matchCase = matchCase; + this.wordSeparators = wordSeparators; + } + + /** + * Everything equals except for `lastWordUnderCursor` + */ + public static softEquals(a: SelectionHighlighterState, b: SelectionHighlighterState): boolean { + if (!a && !b) { + return true; + } + if (!a || !b) { + return false; + } + return ( + a.searchText === b.searchText + && a.matchCase === b.matchCase + && a.wordSeparators === b.wordSeparators + ); + } +} + @commonEditorContribution export class SelectionHighlighter extends Disposable implements editorCommon.IEditorContribution { private static ID = 'editor.contrib.selectionHighlighter'; @@ -890,25 +920,25 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd private editor: editorCommon.ICommonCodeEditor; private decorations: string[]; private updateSoon: RunOnceScheduler; - private lastWordUnderCursor: Range; + private state: SelectionHighlighterState; constructor(editor: editorCommon.ICommonCodeEditor) { super(); this.editor = editor; this.decorations = []; this.updateSoon = this._register(new RunOnceScheduler(() => this._update(), 300)); - this.lastWordUnderCursor = null; + this.state = null; this._register(editor.onDidChangeCursorSelection((e: ICursorSelectionChangedEvent) => { if (e.selection.isEmpty()) { if (e.reason === CursorChangeReason.Explicit) { - if (!this.lastWordUnderCursor || !this.lastWordUnderCursor.containsPosition(e.selection.getStartPosition())) { + if (this.state && (!this.state.lastWordUnderCursor || !this.state.lastWordUnderCursor.containsPosition(e.selection.getStartPosition()))) { // no longer valid - this.removeDecorations(); + this._setState(null); } this.updateSoon.schedule(); } else { - this.removeDecorations(); + this._setState(null); } } else { @@ -916,7 +946,7 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd } })); this._register(editor.onDidChangeModel((e) => { - this.removeDecorations(); + this._setState(null); })); this._register(CommonFindController.get(editor).getState().addChangeListener((e) => { this._update(); @@ -927,73 +957,63 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd return SelectionHighlighter.ID; } - private removeDecorations(): void { - this.lastWordUnderCursor = null; - if (this.decorations.length > 0) { - this.decorations = this.editor.deltaDecorations(this.decorations, []); - } + private _update(): void { + this._setState(SelectionHighlighter._createState(this.editor)); } - private _update(): void { - const model = this.editor.getModel(); + private static _createState(editor: editorCommon.ICommonCodeEditor): SelectionHighlighterState { + const model = editor.getModel(); if (!model) { - return; + return null; } - const config = this.editor.getConfiguration(); + const config = editor.getConfiguration(); - this.lastWordUnderCursor = null; + let lastWordUnderCursor: Selection = null; if (!config.contribInfo.selectionHighlight) { - this.removeDecorations(); - return; + return null; } - let r = multiCursorFind(this.editor, { + const r = multiCursorFind(editor, { changeFindSearchString: false, allowMultiline: false, highlightFindOptions: false }); if (!r) { - this.removeDecorations(); - return; + return null; } - let hasFindOccurences = DocumentHighlightProviderRegistry.has(model); + const hasFindOccurences = DocumentHighlightProviderRegistry.has(model); if (r.currentMatch) { // This is an empty selection if (hasFindOccurences) { // Do not interfere with semantic word highlighting in the no selection case - this.removeDecorations(); - return; + return null; } if (!config.contribInfo.occurrencesHighlight) { - this.removeDecorations(); - return; + return null; } - this.lastWordUnderCursor = r.currentMatch; + lastWordUnderCursor = r.currentMatch; } if (/^[ \t]+$/.test(r.searchText)) { // whitespace only selection - this.removeDecorations(); - return; + return null; } if (r.searchText.length > 200) { // very long selection - this.removeDecorations(); - return; + return null; } - const controller = CommonFindController.get(this.editor); + const controller = CommonFindController.get(editor); if (!controller) { - this.removeDecorations(); - return; + return null; } const findState = controller.getState(); const caseSensitive = findState.matchCase; - let selections = this.editor.getSelections(); + const selections = editor.getSelections(); let firstSelectedText = model.getValueInRange(selections[0]); if (!caseSensitive) { firstSelectedText = firstSelectedText.toLowerCase(); @@ -1005,28 +1025,48 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd } if (firstSelectedText !== selectedText) { // not all selections have the same text - this.removeDecorations(); - return; + return null; + } + } + + return new SelectionHighlighterState(lastWordUnderCursor, r.searchText, r.matchCase, r.wholeWord ? editor.getConfiguration().wordSeparators : null); + } + + + private _setState(state: SelectionHighlighterState): void { + if (SelectionHighlighterState.softEquals(this.state, state)) { + this.state = state; + return; + } + this.state = state; + + if (!this.state) { + if (this.decorations.length > 0) { + this.decorations = this.editor.deltaDecorations(this.decorations, []); } + return; } + const model = this.editor.getModel(); + const hasFindOccurences = DocumentHighlightProviderRegistry.has(model); - let allMatches = model.findMatches(r.searchText, true, false, r.matchCase, r.wholeWord ? this.editor.getConfiguration().wordSeparators : null, false).map(m => m.range); + let allMatches = model.findMatches(this.state.searchText, true, false, this.state.matchCase, this.state.wordSeparators, false).map(m => m.range); allMatches.sort(Range.compareRangesUsingStarts); + let selections = this.editor.getSelections(); selections.sort(Range.compareRangesUsingStarts); // do not overlap with selection (issue #64 and #512) let matches: Range[] = []; for (let i = 0, j = 0, len = allMatches.length, lenJ = selections.length; i < len;) { - let match = allMatches[i]; + const match = allMatches[i]; if (j >= lenJ) { // finished all editor selections matches.push(match); i++; } else { - let cmp = Range.compareRangesUsingStarts(match, selections[j]); + const cmp = Range.compareRangesUsingStarts(match, selections[j]); if (cmp < 0) { // match is before sel matches.push(match); @@ -1042,7 +1082,7 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd } } - let decorations = matches.map(r => { + const decorations = matches.map(r => { return { range: r, // Show in overviewRuler only if model has no semantic highlighting @@ -1069,7 +1109,7 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd }); public dispose(): void { - this.removeDecorations(); + this._setState(null); super.dispose(); } } From d4d94b1de9eb56430a6aa1e31eded35d377c04e5 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sun, 21 May 2017 10:28:31 +0200 Subject: [PATCH 0816/2747] Fixes #27019 --- .../browser/keybindingsEditorContribution.ts | 79 +++++++++++++------ 1 file changed, 53 insertions(+), 26 deletions(-) diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts index 58359b3d35261..d5aaccbae4526 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts @@ -42,51 +42,82 @@ export class DefineKeybindingController extends Disposable implements editorComm return editor.getContribution(DefineKeybindingController.ID); } - private _keybindingEditorRenderer: KeybindingEditorRenderer; + private _keybindingWidgetRenderer: KeybindingWidgetRenderer; + private _keybindingDecorationRenderer: KeybindingEditorDecorationsRenderer; constructor( private _editor: ICodeEditor, - @IKeybindingService keybindingService: IKeybindingService, - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private _instantiationService: IInstantiationService ) { super(); - this._register(this._editor.onDidChangeModel(e => this._renderKeybindingEditor())); - this._renderKeybindingEditor(); + this._keybindingWidgetRenderer = null; + this._keybindingDecorationRenderer = null; + + this._register(this._editor.onDidChangeModel(e => this._update())); + this._update(); } public getId(): string { return DefineKeybindingController.ID; } - public get keybindingEditorRenderer(): KeybindingEditorRenderer { - return this._keybindingEditorRenderer; + public get keybindingWidgetRenderer(): KeybindingWidgetRenderer { + return this._keybindingWidgetRenderer; } public dispose(): void { - this._disposeKeybindingEditorRenderer(); + this._disposeKeybindingWidgetRenderer(); + this._disposeKeybindingDecorationRenderer(); super.dispose(); } - private _renderKeybindingEditor(): void { - if (isInterestingEditorModel(this._editor)) { - if (!this._keybindingEditorRenderer) { - this._keybindingEditorRenderer = this.instantiationService.createInstance(KeybindingEditorRenderer, this._editor); - } + private _update(): void { + if (!isInterestingEditorModel(this._editor)) { + this._disposeKeybindingWidgetRenderer(); + this._disposeKeybindingDecorationRenderer(); + return; + } + + // Decorations are shown for the default keybindings.json **and** for the user keybindings.json + this._createKeybindingDecorationRenderer(); + + // The button to define keybindings is shown only for the user keybindings.json + if (!this._editor.getConfiguration().readOnly) { + this._createKeybindingWidgetRenderer(); } else { - this._disposeKeybindingEditorRenderer(); + this._disposeKeybindingWidgetRenderer(); + } + } + + private _createKeybindingWidgetRenderer(): void { + if (!this._keybindingWidgetRenderer) { + this._keybindingWidgetRenderer = this._instantiationService.createInstance(KeybindingWidgetRenderer, this._editor); } } - private _disposeKeybindingEditorRenderer(): void { - if (this._keybindingEditorRenderer) { - this._keybindingEditorRenderer.dispose(); - this._keybindingEditorRenderer = null; + private _disposeKeybindingWidgetRenderer(): void { + if (this._keybindingWidgetRenderer) { + this._keybindingWidgetRenderer.dispose(); + this._keybindingWidgetRenderer = null; + } + } + + private _createKeybindingDecorationRenderer(): void { + if (!this._keybindingDecorationRenderer) { + this._keybindingDecorationRenderer = this._instantiationService.createInstance(KeybindingEditorDecorationsRenderer, this._editor); + } + } + + private _disposeKeybindingDecorationRenderer(): void { + if (this._keybindingDecorationRenderer) { + this._keybindingDecorationRenderer.dispose(); + this._keybindingDecorationRenderer = null; } } } -export class KeybindingEditorRenderer extends Disposable { +export class KeybindingWidgetRenderer extends Disposable { private _launchWidget: FloatingClickWidget; private _defineWidget: DefineKeybindingOverlayWidget; @@ -100,7 +131,6 @@ export class KeybindingEditorRenderer extends Disposable { this._register(this._launchWidget.onClick(() => this.showDefineKeybindingWidget())); this._defineWidget = this._register(this._instantiationService.createInstance(DefineKeybindingOverlayWidget, this._editor)); - this._register(this._instantiationService.createInstance(KeybindingEditorDecorationsRenderer, this._editor)); this._launchWidget.render(); } @@ -314,20 +344,17 @@ class DefineKeybindingCommand extends EditorCommand { } public runEditorCommand(accessor: ServicesAccessor, editor: editorCommon.ICommonCodeEditor): void { - if (!isInterestingEditorModel(editor)) { + if (!isInterestingEditorModel(editor) || editor.getConfiguration().readOnly) { return; } let controller = DefineKeybindingController.get(editor); - if (controller && controller.keybindingEditorRenderer) { - controller.keybindingEditorRenderer.showDefineKeybindingWidget(); + if (controller && controller.keybindingWidgetRenderer) { + controller.keybindingWidgetRenderer.showDefineKeybindingWidget(); } } } function isInterestingEditorModel(editor: editorCommon.ICommonCodeEditor): boolean { - if (editor.getConfiguration().readOnly) { - return false; - } let model = editor.getModel(); if (!model) { return false; From 1d7146c103c3ca9eb95c7e860c4f51c44ff28504 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sun, 21 May 2017 10:50:46 +0200 Subject: [PATCH 0817/2747] Fixes #27021 --- .../common/windowsKeyboardMapper.ts | 38 ++++++++++++++----- .../services/keybinding/test/win_de_ch.txt | 28 +++++++------- .../services/keybinding/test/win_por_ptb.txt | 32 ++++++++-------- 3 files changed, 58 insertions(+), 40 deletions(-) diff --git a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts index 6eef623475fc2..0f59d1047f10b 100644 --- a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts @@ -171,10 +171,7 @@ export class WindowsNativeResolvedKeybinding extends ResolvedKeybinding { if (keybinding.isDuplicateModifierCase()) { return ''; } - if (this._mapper.isUSStandard) { - return KeyCodeUtils.toUserSettingsUS(keybinding.keyCode); - } - return KeyCodeUtils.toUserSettingsGeneral(keybinding.keyCode); + return this._mapper.getUserSettingsLabelForKeyCode(keybinding.keyCode); } public getUserSettingsLabel(): string { @@ -185,13 +182,27 @@ export class WindowsNativeResolvedKeybinding extends ResolvedKeybinding { } public isWYSIWYG(): boolean { - let firstPart1 = this._firstPart ? this._mapper.getAriaLabelForKeyCode(this._firstPart.keyCode) : null; - let chordPart1 = this._chordPart ? this._mapper.getAriaLabelForKeyCode(this._chordPart.keyCode) : null; - - let firstPart2 = this._firstPart ? KeyCodeUtils.toString(this._firstPart.keyCode) : null; - let chordPart2 = this._chordPart ? KeyCodeUtils.toString(this._chordPart.keyCode) : null; + if (this._firstPart && !this._isWYSIWYG(this._firstPart.keyCode)) { + return false; + } + if (this._chordPart && !this._isWYSIWYG(this._chordPart.keyCode)) { + return false; + } + return true; + } - return (firstPart1 === firstPart2 && chordPart1 === chordPart2); + private _isWYSIWYG(keyCode: KeyCode): boolean { + if ( + keyCode === KeyCode.LeftArrow + || keyCode === KeyCode.UpArrow + || keyCode === KeyCode.RightArrow + || keyCode === KeyCode.DownArrow + ) { + return true; + } + const ariaLabel = this._mapper.getAriaLabelForKeyCode(keyCode); + const userSettingsLabel = this._mapper.getUserSettingsLabelForKeyCode(keyCode); + return (ariaLabel === userSettingsLabel); } public isChord(): boolean { @@ -428,6 +439,13 @@ export class WindowsKeyboardMapper implements IKeyboardMapper { return this._getLabelForKeyCode(keyCode); } + public getUserSettingsLabelForKeyCode(keyCode: KeyCode): string { + if (this.isUSStandard) { + return KeyCodeUtils.toUserSettingsUS(keyCode); + } + return KeyCodeUtils.toUserSettingsGeneral(keyCode); + } + private _getLabelForKeyCode(keyCode: KeyCode): string { return this._keyCodeToLabel[keyCode] || KeyCodeUtils.toString(KeyCode.Unknown); } diff --git a/src/vs/workbench/services/keybinding/test/win_de_ch.txt b/src/vs/workbench/services/keybinding/test/win_de_ch.txt index 4936e72b40577..c0358ef1a49bb 100644 --- a/src/vs/workbench/services/keybinding/test/win_de_ch.txt +++ b/src/vs/workbench/services/keybinding/test/win_de_ch.txt @@ -240,20 +240,20 @@ | Ctrl+Alt+Backquote | --- | Ctrl+Alt+/ | Ctrl+Alt+§ | NO | | Ctrl+Shift+Alt+Backquote | --- | Ctrl+Shift+Alt+/ | Ctrl+Shift+Alt+§ | NO | ------------------------------------------------------------------------------------------------------------ -| Comma | , | , | , | | -| Shift+Comma | ; | Shift+, | Shift+, | | -| Ctrl+Alt+Comma | --- | Ctrl+Alt+, | Ctrl+Alt+, | | -| Ctrl+Shift+Alt+Comma | --- | Ctrl+Shift+Alt+, | Ctrl+Shift+Alt+, | | ------------------------------------------------------------------------------------------------------------- -| Period | . | . | . | | -| Shift+Period | : | Shift+. | Shift+. | | -| Ctrl+Alt+Period | --- | Ctrl+Alt+. | Ctrl+Alt+. | | -| Ctrl+Shift+Alt+Period | --- | Ctrl+Shift+Alt+. | Ctrl+Shift+Alt+. | | ------------------------------------------------------------------------------------------------------------- -| Slash | - | - | - | | -| Shift+Slash | _ | Shift+- | Shift+- | | -| Ctrl+Alt+Slash | --- | Ctrl+Alt+- | Ctrl+Alt+- | | -| Ctrl+Shift+Alt+Slash | --- | Ctrl+Shift+Alt+- | Ctrl+Shift+Alt+- | | +| Comma | , | , | , | NO | +| Shift+Comma | ; | Shift+, | Shift+, | NO | +| Ctrl+Alt+Comma | --- | Ctrl+Alt+, | Ctrl+Alt+, | NO | +| Ctrl+Shift+Alt+Comma | --- | Ctrl+Shift+Alt+, | Ctrl+Shift+Alt+, | NO | +------------------------------------------------------------------------------------------------------------ +| Period | . | . | . | NO | +| Shift+Period | : | Shift+. | Shift+. | NO | +| Ctrl+Alt+Period | --- | Ctrl+Alt+. | Ctrl+Alt+. | NO | +| Ctrl+Shift+Alt+Period | --- | Ctrl+Shift+Alt+. | Ctrl+Shift+Alt+. | NO | +------------------------------------------------------------------------------------------------------------ +| Slash | - | - | - | NO | +| Shift+Slash | _ | Shift+- | Shift+- | NO | +| Ctrl+Alt+Slash | --- | Ctrl+Alt+- | Ctrl+Alt+- | NO | +| Ctrl+Shift+Alt+Slash | --- | Ctrl+Shift+Alt+- | Ctrl+Shift+Alt+- | NO | ------------------------------------------------------------------------------------------------------------ | HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------ diff --git a/src/vs/workbench/services/keybinding/test/win_por_ptb.txt b/src/vs/workbench/services/keybinding/test/win_por_ptb.txt index 1a6f16fcbdc52..a09f7654b3228 100644 --- a/src/vs/workbench/services/keybinding/test/win_por_ptb.txt +++ b/src/vs/workbench/services/keybinding/test/win_por_ptb.txt @@ -193,15 +193,15 @@ ------------------------------------------------------------------------------------------------------------ | HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------ -| Minus | - | - | - | | -| Shift+Minus | _ | Shift+- | Shift+- | | -| Ctrl+Alt+Minus | --- | Ctrl+Alt+- | Ctrl+Alt+- | | -| Ctrl+Shift+Alt+Minus | --- | Ctrl+Shift+Alt+- | Ctrl+Shift+Alt+- | | +| Minus | - | - | - | NO | +| Shift+Minus | _ | Shift+- | Shift+- | NO | +| Ctrl+Alt+Minus | --- | Ctrl+Alt+- | Ctrl+Alt+- | NO | +| Ctrl+Shift+Alt+Minus | --- | Ctrl+Shift+Alt+- | Ctrl+Shift+Alt+- | NO | ------------------------------------------------------------------------------------------------------------ -| Equal | = | = | = | | -| Shift+Equal | + | Shift+= | Shift+= | | -| Ctrl+Alt+Equal | § | Ctrl+Alt+= | Ctrl+Alt+= | | -| Ctrl+Shift+Alt+Equal | --- | Ctrl+Shift+Alt+= | Ctrl+Shift+Alt+= | | +| Equal | = | = | = | NO | +| Shift+Equal | + | Shift+= | Shift+= | NO | +| Ctrl+Alt+Equal | § | Ctrl+Alt+= | Ctrl+Alt+= | NO | +| Ctrl+Shift+Alt+Equal | --- | Ctrl+Shift+Alt+= | Ctrl+Shift+Alt+= | NO | ------------------------------------------------------------------------------------------------------------ | BracketLeft | ´ | [ | ´ | NO | | Shift+BracketLeft | ` | Shift+[ | Shift+´ | NO | @@ -240,15 +240,15 @@ | Ctrl+Alt+Backquote | --- | Ctrl+Alt+` | Ctrl+Alt+' | NO | | Ctrl+Shift+Alt+Backquote | --- | Ctrl+Shift+Alt+` | Ctrl+Shift+Alt+' | NO | ------------------------------------------------------------------------------------------------------------ -| Comma | , | , | , | | -| Shift+Comma | < | Shift+, | Shift+, | | -| Ctrl+Alt+Comma | --- | Ctrl+Alt+, | Ctrl+Alt+, | | -| Ctrl+Shift+Alt+Comma | --- | Ctrl+Shift+Alt+, | Ctrl+Shift+Alt+, | | +| Comma | , | , | , | NO | +| Shift+Comma | < | Shift+, | Shift+, | NO | +| Ctrl+Alt+Comma | --- | Ctrl+Alt+, | Ctrl+Alt+, | NO | +| Ctrl+Shift+Alt+Comma | --- | Ctrl+Shift+Alt+, | Ctrl+Shift+Alt+, | NO | ------------------------------------------------------------------------------------------------------------ -| Period | . | . | . | | -| Shift+Period | > | Shift+. | Shift+. | | -| Ctrl+Alt+Period | --- | Ctrl+Alt+. | Ctrl+Alt+. | | -| Ctrl+Shift+Alt+Period | --- | Ctrl+Shift+Alt+. | Ctrl+Shift+Alt+. | | +| Period | . | . | . | NO | +| Shift+Period | > | Shift+. | Shift+. | NO | +| Ctrl+Alt+Period | --- | Ctrl+Alt+. | Ctrl+Alt+. | NO | +| Ctrl+Shift+Alt+Period | --- | Ctrl+Shift+Alt+. | Ctrl+Shift+Alt+. | NO | ------------------------------------------------------------------------------------------------------------ | Slash | ; | / | ; | NO | | Shift+Slash | : | Shift+/ | Shift+; | NO | From 155b5c91c9e8a5591b3ff951914ac7bea6ddf2fe Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sun, 21 May 2017 11:00:42 +0200 Subject: [PATCH 0818/2747] Add suite for Russian keyboard layout --- .../services/keybinding/test/win_ru.js | 1093 +++++++++++++++++ .../services/keybinding/test/win_ru.txt | 284 +++++ .../test/windowsKeyboardMapper.test.ts | 17 +- 3 files changed, 1393 insertions(+), 1 deletion(-) create mode 100644 src/vs/workbench/services/keybinding/test/win_ru.js create mode 100644 src/vs/workbench/services/keybinding/test/win_ru.txt diff --git a/src/vs/workbench/services/keybinding/test/win_ru.js b/src/vs/workbench/services/keybinding/test/win_ru.js new file mode 100644 index 0000000000000..4f024d361eb45 --- /dev/null +++ b/src/vs/workbench/services/keybinding/test/win_ru.js @@ -0,0 +1,1093 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +define({ + Sleep: { + vkey: 'VK_SLEEP', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + WakeUp: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + KeyA: { + vkey: 'VK_A', + value: 'ф', + withShift: 'Ф', + withAltGr: '', + withShiftAltGr: '' + }, + KeyB: { + vkey: 'VK_B', + value: 'и', + withShift: 'И', + withAltGr: '', + withShiftAltGr: '' + }, + KeyC: { + vkey: 'VK_C', + value: 'с', + withShift: 'С', + withAltGr: '', + withShiftAltGr: '' + }, + KeyD: { + vkey: 'VK_D', + value: 'в', + withShift: 'В', + withAltGr: '', + withShiftAltGr: '' + }, + KeyE: { + vkey: 'VK_E', + value: 'у', + withShift: 'У', + withAltGr: '', + withShiftAltGr: '' + }, + KeyF: { + vkey: 'VK_F', + value: 'а', + withShift: 'А', + withAltGr: '', + withShiftAltGr: '' + }, + KeyG: { + vkey: 'VK_G', + value: 'п', + withShift: 'П', + withAltGr: '', + withShiftAltGr: '' + }, + KeyH: { + vkey: 'VK_H', + value: 'р', + withShift: 'Р', + withAltGr: '', + withShiftAltGr: '' + }, + KeyI: { + vkey: 'VK_I', + value: 'ш', + withShift: 'Ш', + withAltGr: '', + withShiftAltGr: '' + }, + KeyJ: { + vkey: 'VK_J', + value: 'о', + withShift: 'О', + withAltGr: '', + withShiftAltGr: '' + }, + KeyK: { + vkey: 'VK_K', + value: 'л', + withShift: 'Л', + withAltGr: '', + withShiftAltGr: '' + }, + KeyL: { + vkey: 'VK_L', + value: 'д', + withShift: 'Д', + withAltGr: '', + withShiftAltGr: '' + }, + KeyM: { + vkey: 'VK_M', + value: 'ь', + withShift: 'Ь', + withAltGr: '', + withShiftAltGr: '' + }, + KeyN: { + vkey: 'VK_N', + value: 'т', + withShift: 'Т', + withAltGr: '', + withShiftAltGr: '' + }, + KeyO: { + vkey: 'VK_O', + value: 'щ', + withShift: 'Щ', + withAltGr: '', + withShiftAltGr: '' + }, + KeyP: { + vkey: 'VK_P', + value: 'з', + withShift: 'З', + withAltGr: '', + withShiftAltGr: '' + }, + KeyQ: { + vkey: 'VK_Q', + value: 'й', + withShift: 'Й', + withAltGr: '', + withShiftAltGr: '' + }, + KeyR: { + vkey: 'VK_R', + value: 'к', + withShift: 'К', + withAltGr: '', + withShiftAltGr: '' + }, + KeyS: { + vkey: 'VK_S', + value: 'ы', + withShift: 'Ы', + withAltGr: '', + withShiftAltGr: '' + }, + KeyT: { + vkey: 'VK_T', + value: 'е', + withShift: 'Е', + withAltGr: '', + withShiftAltGr: '' + }, + KeyU: { + vkey: 'VK_U', + value: 'г', + withShift: 'Г', + withAltGr: '', + withShiftAltGr: '' + }, + KeyV: { + vkey: 'VK_V', + value: 'м', + withShift: 'М', + withAltGr: '', + withShiftAltGr: '' + }, + KeyW: { + vkey: 'VK_W', + value: 'ц', + withShift: 'Ц', + withAltGr: '', + withShiftAltGr: '' + }, + KeyX: { + vkey: 'VK_X', + value: 'ч', + withShift: 'Ч', + withAltGr: '', + withShiftAltGr: '' + }, + KeyY: { + vkey: 'VK_Y', + value: 'н', + withShift: 'Н', + withAltGr: '', + withShiftAltGr: '' + }, + KeyZ: { + vkey: 'VK_Z', + value: 'я', + withShift: 'Я', + withAltGr: '', + withShiftAltGr: '' + }, + Digit1: { + vkey: 'VK_1', + value: '1', + withShift: '!', + withAltGr: '', + withShiftAltGr: '' + }, + Digit2: { + vkey: 'VK_2', + value: '2', + withShift: '\"', + withAltGr: '', + withShiftAltGr: '' + }, + Digit3: { + vkey: 'VK_3', + value: '3', + withShift: '№', + withAltGr: '', + withShiftAltGr: '' + }, + Digit4: { + vkey: 'VK_4', + value: '4', + withShift: ';', + withAltGr: '', + withShiftAltGr: '' + }, + Digit5: { + vkey: 'VK_5', + value: '5', + withShift: '%', + withAltGr: '', + withShiftAltGr: '' + }, + Digit6: { + vkey: 'VK_6', + value: '6', + withShift: ':', + withAltGr: '', + withShiftAltGr: '' + }, + Digit7: { + vkey: 'VK_7', + value: '7', + withShift: '?', + withAltGr: '', + withShiftAltGr: '' + }, + Digit8: { + vkey: 'VK_8', + value: '8', + withShift: '*', + withAltGr: '₽', + withShiftAltGr: '' + }, + Digit9: { + vkey: 'VK_9', + value: '9', + withShift: '(', + withAltGr: '', + withShiftAltGr: '' + }, + Digit0: { + vkey: 'VK_0', + value: '0', + withShift: ')', + withAltGr: '', + withShiftAltGr: '' + }, + Enter: { + vkey: 'VK_RETURN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Escape: { + vkey: 'VK_ESCAPE', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Backspace: { + vkey: 'VK_BACK', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Tab: { + vkey: 'VK_TAB', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Space: { + vkey: 'VK_SPACE', + value: ' ', + withShift: ' ', + withAltGr: '', + withShiftAltGr: '' + }, + Minus: { + vkey: 'VK_OEM_MINUS', + value: '-', + withShift: '_', + withAltGr: '', + withShiftAltGr: '' + }, + Equal: { + vkey: 'VK_OEM_PLUS', + value: '=', + withShift: '+', + withAltGr: '', + withShiftAltGr: '' + }, + BracketLeft: { + vkey: 'VK_OEM_4', + value: 'х', + withShift: 'Х', + withAltGr: '', + withShiftAltGr: '' + }, + BracketRight: { + vkey: 'VK_OEM_6', + value: 'ъ', + withShift: 'Ъ', + withAltGr: '', + withShiftAltGr: '' + }, + Backslash: { + vkey: 'VK_OEM_5', + value: '\\', + withShift: '/', + withAltGr: '', + withShiftAltGr: '' + }, + Semicolon: { + vkey: 'VK_OEM_1', + value: 'ж', + withShift: 'Ж', + withAltGr: '', + withShiftAltGr: '' + }, + Quote: { + vkey: 'VK_OEM_7', + value: 'э', + withShift: 'Э', + withAltGr: '', + withShiftAltGr: '' + }, + Backquote: { + vkey: 'VK_OEM_3', + value: 'ё', + withShift: 'Ё', + withAltGr: '', + withShiftAltGr: '' + }, + Comma: { + vkey: 'VK_OEM_COMMA', + value: 'б', + withShift: 'Б', + withAltGr: '', + withShiftAltGr: '' + }, + Period: { + vkey: 'VK_OEM_PERIOD', + value: 'ю', + withShift: 'Ю', + withAltGr: '', + withShiftAltGr: '' + }, + Slash: { + vkey: 'VK_OEM_2', + value: '.', + withShift: ',', + withAltGr: '', + withShiftAltGr: '' + }, + CapsLock: { + vkey: 'VK_CAPITAL', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F1: { + vkey: 'VK_F1', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F2: { + vkey: 'VK_F2', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F3: { + vkey: 'VK_F3', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F4: { + vkey: 'VK_F4', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F5: { + vkey: 'VK_F5', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F6: { + vkey: 'VK_F6', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F7: { + vkey: 'VK_F7', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F8: { + vkey: 'VK_F8', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F9: { + vkey: 'VK_F9', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F10: { + vkey: 'VK_F10', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F11: { + vkey: 'VK_F11', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F12: { + vkey: 'VK_F12', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + PrintScreen: { + vkey: 'VK_SNAPSHOT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ScrollLock: { + vkey: 'VK_SCROLL', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Pause: { + vkey: 'VK_NUMLOCK', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Insert: { + vkey: 'VK_INSERT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Home: { + vkey: 'VK_HOME', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + PageUp: { + vkey: 'VK_PRIOR', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Delete: { + vkey: 'VK_DELETE', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + End: { + vkey: 'VK_END', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + PageDown: { + vkey: 'VK_NEXT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ArrowRight: { + vkey: 'VK_RIGHT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ArrowLeft: { + vkey: 'VK_LEFT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ArrowDown: { + vkey: 'VK_DOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ArrowUp: { + vkey: 'VK_UP', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + NumLock: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + NumpadDivide: { + vkey: 'VK_DIVIDE', + value: '/', + withShift: '/', + withAltGr: '', + withShiftAltGr: '' + }, + NumpadMultiply: { + vkey: 'VK_MULTIPLY', + value: '*', + withShift: '*', + withAltGr: '', + withShiftAltGr: '' + }, + NumpadSubtract: { + vkey: 'VK_SUBTRACT', + value: '-', + withShift: '-', + withAltGr: '', + withShiftAltGr: '' + }, + NumpadAdd: { + vkey: 'VK_ADD', + value: '+', + withShift: '+', + withAltGr: '', + withShiftAltGr: '' + }, + NumpadEnter: { + vkey: 'VK_RETURN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad1: { + vkey: 'VK_END', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad2: { + vkey: 'VK_DOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad3: { + vkey: 'VK_NEXT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad4: { + vkey: 'VK_LEFT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad5: { + vkey: 'VK_CLEAR', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad6: { + vkey: 'VK_RIGHT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad7: { + vkey: 'VK_HOME', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad8: { + vkey: 'VK_UP', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad9: { + vkey: 'VK_PRIOR', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Numpad0: { + vkey: 'VK_INSERT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + NumpadDecimal: { + vkey: 'VK_DELETE', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + IntlBackslash: { + vkey: 'VK_OEM_102', + value: '\\', + withShift: '/', + withAltGr: '', + withShiftAltGr: '' + }, + ContextMenu: { + vkey: 'VK_APPS', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Power: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + NumpadEqual: { + vkey: 'VK_CLEAR', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F13: { + vkey: 'VK_F13', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F14: { + vkey: 'VK_F14', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F15: { + vkey: 'VK_F15', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F16: { + vkey: 'VK_F16', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F17: { + vkey: 'VK_F17', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F18: { + vkey: 'VK_F18', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F19: { + vkey: 'VK_F19', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F20: { + vkey: 'VK_F20', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F21: { + vkey: 'VK_F21', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F22: { + vkey: 'VK_F22', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F23: { + vkey: 'VK_F23', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + F24: { + vkey: 'VK_F24', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Help: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Undo: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Cut: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Copy: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Paste: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + AudioVolumeMute: { + vkey: 'VK_VOLUME_MUTE', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + AudioVolumeUp: { + vkey: 'VK_VOLUME_UP', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + AudioVolumeDown: { + vkey: 'VK_VOLUME_DOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + NumpadComma: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + IntlRo: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + KanaMode: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + IntlYen: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Convert: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + NonConvert: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Lang1: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Lang2: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Lang3: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Lang4: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ControlLeft: { + vkey: 'VK_CONTROL', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ShiftLeft: { + vkey: 'VK_SHIFT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + AltLeft: { + vkey: 'VK_MENU', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + MetaLeft: { + vkey: 'VK_LWIN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ControlRight: { + vkey: 'VK_CONTROL', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + ShiftRight: { + vkey: 'VK_SHIFT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + AltRight: { + vkey: 'VK_MENU', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + MetaRight: { + vkey: 'VK_RWIN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + MediaTrackNext: { + vkey: 'VK_MEDIA_NEXT_TRACK', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + MediaTrackPrevious: { + vkey: 'VK_MEDIA_PREV_TRACK', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + MediaStop: { + vkey: 'VK_MEDIA_STOP', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + Eject: { + vkey: 'VK_UNKNOWN', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + MediaPlayPause: { + vkey: 'VK_MEDIA_PLAY_PAUSE', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + MediaSelect: { + vkey: 'VK_LAUNCH_MEDIA_SELECT', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + LaunchMail: { + vkey: 'VK_LAUNCH_MAIL', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + LaunchApp2: { + vkey: 'VK_LAUNCH_APP2', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + LaunchApp1: { + vkey: 'VK_LAUNCH_APP1', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + BrowserSearch: { + vkey: 'VK_BROWSER_SEARCH', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + BrowserHome: { + vkey: 'VK_BROWSER_HOME', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + BrowserBack: { + vkey: 'VK_BROWSER_BACK', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + BrowserForward: { + vkey: 'VK_BROWSER_FORWARD', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + BrowserStop: { + vkey: 'VK_BROWSER_STOP', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + BrowserRefresh: { + vkey: 'VK_BROWSER_REFRESH', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + }, + BrowserFavorites: { + vkey: 'VK_BROWSER_FAVORITES', + value: '', + withShift: '', + withAltGr: '', + withShiftAltGr: '' + } +}); diff --git a/src/vs/workbench/services/keybinding/test/win_ru.txt b/src/vs/workbench/services/keybinding/test/win_ru.txt new file mode 100644 index 0000000000000..d3872618cd9ed --- /dev/null +++ b/src/vs/workbench/services/keybinding/test/win_ru.txt @@ -0,0 +1,284 @@ +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| KeyA | ф | A | ф | NO | +| Shift+KeyA | Ф | Shift+A | Shift+ф | NO | +| Ctrl+Alt+KeyA | --- | Ctrl+Alt+A | Ctrl+Alt+ф | NO | +| Ctrl+Shift+Alt+KeyA | --- | Ctrl+Shift+Alt+A | Ctrl+Shift+Alt+ф | NO | +------------------------------------------------------------------------------------------------------------ +| KeyB | и | B | и | NO | +| Shift+KeyB | И | Shift+B | Shift+и | NO | +| Ctrl+Alt+KeyB | --- | Ctrl+Alt+B | Ctrl+Alt+и | NO | +| Ctrl+Shift+Alt+KeyB | --- | Ctrl+Shift+Alt+B | Ctrl+Shift+Alt+и | NO | +------------------------------------------------------------------------------------------------------------ +| KeyC | с | C | с | NO | +| Shift+KeyC | С | Shift+C | Shift+с | NO | +| Ctrl+Alt+KeyC | --- | Ctrl+Alt+C | Ctrl+Alt+с | NO | +| Ctrl+Shift+Alt+KeyC | --- | Ctrl+Shift+Alt+C | Ctrl+Shift+Alt+с | NO | +------------------------------------------------------------------------------------------------------------ +| KeyD | в | D | в | NO | +| Shift+KeyD | В | Shift+D | Shift+в | NO | +| Ctrl+Alt+KeyD | --- | Ctrl+Alt+D | Ctrl+Alt+в | NO | +| Ctrl+Shift+Alt+KeyD | --- | Ctrl+Shift+Alt+D | Ctrl+Shift+Alt+в | NO | +------------------------------------------------------------------------------------------------------------ +| KeyE | у | E | у | NO | +| Shift+KeyE | У | Shift+E | Shift+у | NO | +| Ctrl+Alt+KeyE | --- | Ctrl+Alt+E | Ctrl+Alt+у | NO | +| Ctrl+Shift+Alt+KeyE | --- | Ctrl+Shift+Alt+E | Ctrl+Shift+Alt+у | NO | +------------------------------------------------------------------------------------------------------------ +| KeyF | а | F | а | NO | +| Shift+KeyF | А | Shift+F | Shift+а | NO | +| Ctrl+Alt+KeyF | --- | Ctrl+Alt+F | Ctrl+Alt+а | NO | +| Ctrl+Shift+Alt+KeyF | --- | Ctrl+Shift+Alt+F | Ctrl+Shift+Alt+а | NO | +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| KeyG | п | G | п | NO | +| Shift+KeyG | П | Shift+G | Shift+п | NO | +| Ctrl+Alt+KeyG | --- | Ctrl+Alt+G | Ctrl+Alt+п | NO | +| Ctrl+Shift+Alt+KeyG | --- | Ctrl+Shift+Alt+G | Ctrl+Shift+Alt+п | NO | +------------------------------------------------------------------------------------------------------------ +| KeyH | р | H | р | NO | +| Shift+KeyH | Р | Shift+H | Shift+р | NO | +| Ctrl+Alt+KeyH | --- | Ctrl+Alt+H | Ctrl+Alt+р | NO | +| Ctrl+Shift+Alt+KeyH | --- | Ctrl+Shift+Alt+H | Ctrl+Shift+Alt+р | NO | +------------------------------------------------------------------------------------------------------------ +| KeyI | ш | I | ш | NO | +| Shift+KeyI | Ш | Shift+I | Shift+ш | NO | +| Ctrl+Alt+KeyI | --- | Ctrl+Alt+I | Ctrl+Alt+ш | NO | +| Ctrl+Shift+Alt+KeyI | --- | Ctrl+Shift+Alt+I | Ctrl+Shift+Alt+ш | NO | +------------------------------------------------------------------------------------------------------------ +| KeyJ | о | J | о | NO | +| Shift+KeyJ | О | Shift+J | Shift+о | NO | +| Ctrl+Alt+KeyJ | --- | Ctrl+Alt+J | Ctrl+Alt+о | NO | +| Ctrl+Shift+Alt+KeyJ | --- | Ctrl+Shift+Alt+J | Ctrl+Shift+Alt+о | NO | +------------------------------------------------------------------------------------------------------------ +| KeyK | л | K | л | NO | +| Shift+KeyK | Л | Shift+K | Shift+л | NO | +| Ctrl+Alt+KeyK | --- | Ctrl+Alt+K | Ctrl+Alt+л | NO | +| Ctrl+Shift+Alt+KeyK | --- | Ctrl+Shift+Alt+K | Ctrl+Shift+Alt+л | NO | +------------------------------------------------------------------------------------------------------------ +| KeyL | д | L | д | NO | +| Shift+KeyL | Д | Shift+L | Shift+д | NO | +| Ctrl+Alt+KeyL | --- | Ctrl+Alt+L | Ctrl+Alt+д | NO | +| Ctrl+Shift+Alt+KeyL | --- | Ctrl+Shift+Alt+L | Ctrl+Shift+Alt+д | NO | +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| KeyM | ь | M | ь | NO | +| Shift+KeyM | Ь | Shift+M | Shift+ь | NO | +| Ctrl+Alt+KeyM | --- | Ctrl+Alt+M | Ctrl+Alt+ь | NO | +| Ctrl+Shift+Alt+KeyM | --- | Ctrl+Shift+Alt+M | Ctrl+Shift+Alt+ь | NO | +------------------------------------------------------------------------------------------------------------ +| KeyN | т | N | т | NO | +| Shift+KeyN | Т | Shift+N | Shift+т | NO | +| Ctrl+Alt+KeyN | --- | Ctrl+Alt+N | Ctrl+Alt+т | NO | +| Ctrl+Shift+Alt+KeyN | --- | Ctrl+Shift+Alt+N | Ctrl+Shift+Alt+т | NO | +------------------------------------------------------------------------------------------------------------ +| KeyO | щ | O | щ | NO | +| Shift+KeyO | Щ | Shift+O | Shift+щ | NO | +| Ctrl+Alt+KeyO | --- | Ctrl+Alt+O | Ctrl+Alt+щ | NO | +| Ctrl+Shift+Alt+KeyO | --- | Ctrl+Shift+Alt+O | Ctrl+Shift+Alt+щ | NO | +------------------------------------------------------------------------------------------------------------ +| KeyP | з | P | з | NO | +| Shift+KeyP | З | Shift+P | Shift+з | NO | +| Ctrl+Alt+KeyP | --- | Ctrl+Alt+P | Ctrl+Alt+з | NO | +| Ctrl+Shift+Alt+KeyP | --- | Ctrl+Shift+Alt+P | Ctrl+Shift+Alt+з | NO | +------------------------------------------------------------------------------------------------------------ +| KeyQ | й | Q | й | NO | +| Shift+KeyQ | Й | Shift+Q | Shift+й | NO | +| Ctrl+Alt+KeyQ | --- | Ctrl+Alt+Q | Ctrl+Alt+й | NO | +| Ctrl+Shift+Alt+KeyQ | --- | Ctrl+Shift+Alt+Q | Ctrl+Shift+Alt+й | NO | +------------------------------------------------------------------------------------------------------------ +| KeyR | к | R | к | NO | +| Shift+KeyR | К | Shift+R | Shift+к | NO | +| Ctrl+Alt+KeyR | --- | Ctrl+Alt+R | Ctrl+Alt+к | NO | +| Ctrl+Shift+Alt+KeyR | --- | Ctrl+Shift+Alt+R | Ctrl+Shift+Alt+к | NO | +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| KeyS | ы | S | ы | NO | +| Shift+KeyS | Ы | Shift+S | Shift+ы | NO | +| Ctrl+Alt+KeyS | --- | Ctrl+Alt+S | Ctrl+Alt+ы | NO | +| Ctrl+Shift+Alt+KeyS | --- | Ctrl+Shift+Alt+S | Ctrl+Shift+Alt+ы | NO | +------------------------------------------------------------------------------------------------------------ +| KeyT | е | T | е | NO | +| Shift+KeyT | Е | Shift+T | Shift+е | NO | +| Ctrl+Alt+KeyT | --- | Ctrl+Alt+T | Ctrl+Alt+е | NO | +| Ctrl+Shift+Alt+KeyT | --- | Ctrl+Shift+Alt+T | Ctrl+Shift+Alt+е | NO | +------------------------------------------------------------------------------------------------------------ +| KeyU | г | U | г | NO | +| Shift+KeyU | Г | Shift+U | Shift+г | NO | +| Ctrl+Alt+KeyU | --- | Ctrl+Alt+U | Ctrl+Alt+г | NO | +| Ctrl+Shift+Alt+KeyU | --- | Ctrl+Shift+Alt+U | Ctrl+Shift+Alt+г | NO | +------------------------------------------------------------------------------------------------------------ +| KeyV | м | V | м | NO | +| Shift+KeyV | М | Shift+V | Shift+м | NO | +| Ctrl+Alt+KeyV | --- | Ctrl+Alt+V | Ctrl+Alt+м | NO | +| Ctrl+Shift+Alt+KeyV | --- | Ctrl+Shift+Alt+V | Ctrl+Shift+Alt+м | NO | +------------------------------------------------------------------------------------------------------------ +| KeyW | ц | W | ц | NO | +| Shift+KeyW | Ц | Shift+W | Shift+ц | NO | +| Ctrl+Alt+KeyW | --- | Ctrl+Alt+W | Ctrl+Alt+ц | NO | +| Ctrl+Shift+Alt+KeyW | --- | Ctrl+Shift+Alt+W | Ctrl+Shift+Alt+ц | NO | +------------------------------------------------------------------------------------------------------------ +| KeyX | ч | X | ч | NO | +| Shift+KeyX | Ч | Shift+X | Shift+ч | NO | +| Ctrl+Alt+KeyX | --- | Ctrl+Alt+X | Ctrl+Alt+ч | NO | +| Ctrl+Shift+Alt+KeyX | --- | Ctrl+Shift+Alt+X | Ctrl+Shift+Alt+ч | NO | +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| KeyY | н | Y | н | NO | +| Shift+KeyY | Н | Shift+Y | Shift+н | NO | +| Ctrl+Alt+KeyY | --- | Ctrl+Alt+Y | Ctrl+Alt+н | NO | +| Ctrl+Shift+Alt+KeyY | --- | Ctrl+Shift+Alt+Y | Ctrl+Shift+Alt+н | NO | +------------------------------------------------------------------------------------------------------------ +| KeyZ | я | Z | я | NO | +| Shift+KeyZ | Я | Shift+Z | Shift+я | NO | +| Ctrl+Alt+KeyZ | --- | Ctrl+Alt+Z | Ctrl+Alt+я | NO | +| Ctrl+Shift+Alt+KeyZ | --- | Ctrl+Shift+Alt+Z | Ctrl+Shift+Alt+я | NO | +------------------------------------------------------------------------------------------------------------ +| Digit1 | 1 | 1 | 1 | | +| Shift+Digit1 | ! | Shift+1 | Shift+1 | | +| Ctrl+Alt+Digit1 | --- | Ctrl+Alt+1 | Ctrl+Alt+1 | | +| Ctrl+Shift+Alt+Digit1 | --- | Ctrl+Shift+Alt+1 | Ctrl+Shift+Alt+1 | | +------------------------------------------------------------------------------------------------------------ +| Digit2 | 2 | 2 | 2 | | +| Shift+Digit2 | " | Shift+2 | Shift+2 | | +| Ctrl+Alt+Digit2 | --- | Ctrl+Alt+2 | Ctrl+Alt+2 | | +| Ctrl+Shift+Alt+Digit2 | --- | Ctrl+Shift+Alt+2 | Ctrl+Shift+Alt+2 | | +------------------------------------------------------------------------------------------------------------ +| Digit3 | 3 | 3 | 3 | | +| Shift+Digit3 | № | Shift+3 | Shift+3 | | +| Ctrl+Alt+Digit3 | --- | Ctrl+Alt+3 | Ctrl+Alt+3 | | +| Ctrl+Shift+Alt+Digit3 | --- | Ctrl+Shift+Alt+3 | Ctrl+Shift+Alt+3 | | +------------------------------------------------------------------------------------------------------------ +| Digit4 | 4 | 4 | 4 | | +| Shift+Digit4 | ; | Shift+4 | Shift+4 | | +| Ctrl+Alt+Digit4 | --- | Ctrl+Alt+4 | Ctrl+Alt+4 | | +| Ctrl+Shift+Alt+Digit4 | --- | Ctrl+Shift+Alt+4 | Ctrl+Shift+Alt+4 | | +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| Digit5 | 5 | 5 | 5 | | +| Shift+Digit5 | % | Shift+5 | Shift+5 | | +| Ctrl+Alt+Digit5 | --- | Ctrl+Alt+5 | Ctrl+Alt+5 | | +| Ctrl+Shift+Alt+Digit5 | --- | Ctrl+Shift+Alt+5 | Ctrl+Shift+Alt+5 | | +------------------------------------------------------------------------------------------------------------ +| Digit6 | 6 | 6 | 6 | | +| Shift+Digit6 | : | Shift+6 | Shift+6 | | +| Ctrl+Alt+Digit6 | --- | Ctrl+Alt+6 | Ctrl+Alt+6 | | +| Ctrl+Shift+Alt+Digit6 | --- | Ctrl+Shift+Alt+6 | Ctrl+Shift+Alt+6 | | +------------------------------------------------------------------------------------------------------------ +| Digit7 | 7 | 7 | 7 | | +| Shift+Digit7 | ? | Shift+7 | Shift+7 | | +| Ctrl+Alt+Digit7 | --- | Ctrl+Alt+7 | Ctrl+Alt+7 | | +| Ctrl+Shift+Alt+Digit7 | --- | Ctrl+Shift+Alt+7 | Ctrl+Shift+Alt+7 | | +------------------------------------------------------------------------------------------------------------ +| Digit8 | 8 | 8 | 8 | | +| Shift+Digit8 | * | Shift+8 | Shift+8 | | +| Ctrl+Alt+Digit8 | ₽ | Ctrl+Alt+8 | Ctrl+Alt+8 | | +| Ctrl+Shift+Alt+Digit8 | --- | Ctrl+Shift+Alt+8 | Ctrl+Shift+Alt+8 | | +------------------------------------------------------------------------------------------------------------ +| Digit9 | 9 | 9 | 9 | | +| Shift+Digit9 | ( | Shift+9 | Shift+9 | | +| Ctrl+Alt+Digit9 | --- | Ctrl+Alt+9 | Ctrl+Alt+9 | | +| Ctrl+Shift+Alt+Digit9 | --- | Ctrl+Shift+Alt+9 | Ctrl+Shift+Alt+9 | | +------------------------------------------------------------------------------------------------------------ +| Digit0 | 0 | 0 | 0 | | +| Shift+Digit0 | ) | Shift+0 | Shift+0 | | +| Ctrl+Alt+Digit0 | --- | Ctrl+Alt+0 | Ctrl+Alt+0 | | +| Ctrl+Shift+Alt+Digit0 | --- | Ctrl+Shift+Alt+0 | Ctrl+Shift+Alt+0 | | +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| Minus | - | - | - | NO | +| Shift+Minus | _ | Shift+- | Shift+- | NO | +| Ctrl+Alt+Minus | --- | Ctrl+Alt+- | Ctrl+Alt+- | NO | +| Ctrl+Shift+Alt+Minus | --- | Ctrl+Shift+Alt+- | Ctrl+Shift+Alt+- | NO | +------------------------------------------------------------------------------------------------------------ +| Equal | = | = | = | NO | +| Shift+Equal | + | Shift+= | Shift+= | NO | +| Ctrl+Alt+Equal | --- | Ctrl+Alt+= | Ctrl+Alt+= | NO | +| Ctrl+Shift+Alt+Equal | --- | Ctrl+Shift+Alt+= | Ctrl+Shift+Alt+= | NO | +------------------------------------------------------------------------------------------------------------ +| BracketLeft | х | [ | х | NO | +| Shift+BracketLeft | Х | Shift+[ | Shift+х | NO | +| Ctrl+Alt+BracketLeft | --- | Ctrl+Alt+[ | Ctrl+Alt+х | NO | +| Ctrl+Shift+Alt+BracketLeft | --- | Ctrl+Shift+Alt+[ | Ctrl+Shift+Alt+х | NO | +------------------------------------------------------------------------------------------------------------ +| BracketRight | ъ | ] | ъ | NO | +| Shift+BracketRight | Ъ | Shift+] | Shift+ъ | NO | +| Ctrl+Alt+BracketRight | --- | Ctrl+Alt+] | Ctrl+Alt+ъ | NO | +| Ctrl+Shift+Alt+BracketRight | --- | Ctrl+Shift+Alt+] | Ctrl+Shift+Alt+ъ | NO | +------------------------------------------------------------------------------------------------------------ +| Backslash | \ | \ | \ | NO | +| Shift+Backslash | / | Shift+\ | Shift+\ | NO | +| Ctrl+Alt+Backslash | --- | Ctrl+Alt+\ | Ctrl+Alt+\ | NO | +| Ctrl+Shift+Alt+Backslash | --- | Ctrl+Shift+Alt+\ | Ctrl+Shift+Alt+\ | NO | +------------------------------------------------------------------------------------------------------------ +| IntlHash | --- | null | null | NO | +| Shift+IntlHash | --- | null | null | NO | +| Ctrl+Alt+IntlHash | --- | null | null | NO | +| Ctrl+Shift+Alt+IntlHash | --- | null | null | NO | +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| Semicolon | ж | ; | ж | NO | +| Shift+Semicolon | Ж | Shift+; | Shift+ж | NO | +| Ctrl+Alt+Semicolon | --- | Ctrl+Alt+; | Ctrl+Alt+ж | NO | +| Ctrl+Shift+Alt+Semicolon | --- | Ctrl+Shift+Alt+; | Ctrl+Shift+Alt+ж | NO | +------------------------------------------------------------------------------------------------------------ +| Quote | э | ' | э | NO | +| Shift+Quote | Э | Shift+' | Shift+э | NO | +| Ctrl+Alt+Quote | --- | Ctrl+Alt+' | Ctrl+Alt+э | NO | +| Ctrl+Shift+Alt+Quote | --- | Ctrl+Shift+Alt+' | Ctrl+Shift+Alt+э | NO | +------------------------------------------------------------------------------------------------------------ +| Backquote | ё | ` | ё | NO | +| Shift+Backquote | Ё | Shift+` | Shift+ё | NO | +| Ctrl+Alt+Backquote | --- | Ctrl+Alt+` | Ctrl+Alt+ё | NO | +| Ctrl+Shift+Alt+Backquote | --- | Ctrl+Shift+Alt+` | Ctrl+Shift+Alt+ё | NO | +------------------------------------------------------------------------------------------------------------ +| Comma | б | , | б | NO | +| Shift+Comma | Б | Shift+, | Shift+б | NO | +| Ctrl+Alt+Comma | --- | Ctrl+Alt+, | Ctrl+Alt+б | NO | +| Ctrl+Shift+Alt+Comma | --- | Ctrl+Shift+Alt+, | Ctrl+Shift+Alt+б | NO | +------------------------------------------------------------------------------------------------------------ +| Period | ю | . | ю | NO | +| Shift+Period | Ю | Shift+. | Shift+ю | NO | +| Ctrl+Alt+Period | --- | Ctrl+Alt+. | Ctrl+Alt+ю | NO | +| Ctrl+Shift+Alt+Period | --- | Ctrl+Shift+Alt+. | Ctrl+Shift+Alt+ю | NO | +------------------------------------------------------------------------------------------------------------ +| Slash | . | / | . | NO | +| Shift+Slash | , | Shift+/ | Shift+. | NO | +| Ctrl+Alt+Slash | --- | Ctrl+Alt+/ | Ctrl+Alt+. | NO | +| Ctrl+Shift+Alt+Slash | --- | Ctrl+Shift+Alt+/ | Ctrl+Shift+Alt+. | NO | +------------------------------------------------------------------------------------------------------------ +| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | +------------------------------------------------------------------------------------------------------------ +| ArrowUp | --- | UpArrow | UpArrow | | +| Shift+ArrowUp | --- | Shift+UpArrow | Shift+UpArrow | | +| Ctrl+Alt+ArrowUp | --- | Ctrl+Alt+UpArrow | Ctrl+Alt+UpArrow | | +| Ctrl+Shift+Alt+ArrowUp | --- | Ctrl+Shift+Alt+UpArrow | Ctrl+Shift+Alt+UpArrow | | +------------------------------------------------------------------------------------------------------------ +| Numpad0 | --- | NumPad0 | NumPad0 | | +| Shift+Numpad0 | --- | Shift+NumPad0 | Shift+NumPad0 | | +| Ctrl+Alt+Numpad0 | --- | Ctrl+Alt+NumPad0 | Ctrl+Alt+NumPad0 | | +| Ctrl+Shift+Alt+Numpad0 | --- | Ctrl+Shift+Alt+NumPad0 | Ctrl+Shift+Alt+NumPad0 | | +------------------------------------------------------------------------------------------------------------ +| IntlBackslash | \ | OEM_102 | \ | NO | +| Shift+IntlBackslash | / | Shift+OEM_102 | Shift+\ | NO | +| Ctrl+Alt+IntlBackslash | --- | Ctrl+Alt+OEM_102 | Ctrl+Alt+\ | NO | +| Ctrl+Shift+Alt+IntlBackslash | --- | Ctrl+Shift+Alt+OEM_102 | Ctrl+Shift+Alt+\ | NO | +------------------------------------------------------------------------------------------------------------ +| IntlRo | --- | null | null | NO | +| Shift+IntlRo | --- | null | null | NO | +| Ctrl+Alt+IntlRo | --- | null | null | NO | +| Ctrl+Shift+Alt+IntlRo | --- | null | null | NO | +------------------------------------------------------------------------------------------------------------ +| IntlYen | --- | null | null | NO | +| Shift+IntlYen | --- | null | null | NO | +| Ctrl+Alt+IntlYen | --- | null | null | NO | +| Ctrl+Shift+Alt+IntlYen | --- | null | null | NO | +------------------------------------------------------------------------------------------------------------ \ No newline at end of file diff --git a/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts b/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts index 9ec12ce6b6ca8..5378fae982e5a 100644 --- a/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts +++ b/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts @@ -406,7 +406,6 @@ suite('keyboardMapper - WINDOWS en_us', () => { }); }); - suite('keyboardMapper - WINDOWS por_ptb', () => { let mapper: WindowsKeyboardMapper; @@ -469,6 +468,22 @@ suite('keyboardMapper - WINDOWS por_ptb', () => { }); }); +suite('keyboardMapper - WINDOWS ru', () => { + + let mapper: WindowsKeyboardMapper; + + suiteSetup((done) => { + createKeyboardMapper(false, 'win_ru').then((_mapper) => { + mapper = _mapper; + done(); + }, done); + }); + + test('mapping', (done) => { + assertMapping(WRITE_FILE_IF_DIFFERENT, mapper, 'win_ru.txt', done); + }); +}); + suite('misc', () => { test('issue #23513: Toggle Sidebar Visibility and Go to Line display same key mapping in Arabic keyboard', () => { const mapper = new WindowsKeyboardMapper(false, { From cf5c7cf6e3167994905253625cf99661ffb49fda Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sun, 21 May 2017 11:19:30 +0200 Subject: [PATCH 0819/2747] Add User settings column to windows keyboard mapper test suites --- .../common/windowsKeyboardMapper.ts | 11 +- .../services/keybinding/test/win_de_ch.txt | 568 +++++++++--------- .../services/keybinding/test/win_en_us.txt | 568 +++++++++--------- .../services/keybinding/test/win_por_ptb.txt | 568 +++++++++--------- .../services/keybinding/test/win_ru.txt | 568 +++++++++--------- 5 files changed, 1142 insertions(+), 1141 deletions(-) diff --git a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts index 0f59d1047f10b..3a90f85fdfd4b 100644 --- a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts @@ -377,7 +377,7 @@ export class WindowsKeyboardMapper implements IKeyboardMapper { ]; let cnt = 0; - result.push(`------------------------------------------------------------------------------------------------------------`); + result.push(`-----------------------------------------------------------------------------------------------------------------------------------------`); for (let scanCode = ScanCode.None; scanCode < ScanCode.MAX_VALUE; scanCode++) { if (IMMUTABLE_CODE_TO_KEY_CODE[scanCode] !== -1) { if (immutableSamples.indexOf(scanCode) === -1) { @@ -386,8 +386,8 @@ export class WindowsKeyboardMapper implements IKeyboardMapper { } if (cnt % 6 === 0) { - result.push(`| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG |`); - result.push(`------------------------------------------------------------------------------------------------------------`); + result.push(`| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG |`); + result.push(`-----------------------------------------------------------------------------------------------------------------------------------------`); } cnt++; @@ -408,13 +408,14 @@ export class WindowsKeyboardMapper implements IKeyboardMapper { const outScanCode = `${ctrlKey ? 'Ctrl+' : ''}${shiftKey ? 'Shift+' : ''}${altKey ? 'Alt+' : ''}${strCode}`; const ariaLabel = (resolvedKb ? resolvedKb.getAriaLabel() : null); const outUILabel = (ariaLabel ? ariaLabel.replace(/Control\+/, 'Ctrl+') : null); + const outUserSettings = (resolvedKb ? resolvedKb.getUserSettingsLabel() : null); const outKey = WindowsNativeResolvedKeybinding.getProducedChar(scanCodeBinding, mapping); const outKb = (strKeyCode ? `${ctrlKey ? 'Ctrl+' : ''}${shiftKey ? 'Shift+' : ''}${altKey ? 'Alt+' : ''}${strKeyCode}` : null); const isWYSIWYG = (resolvedKb ? resolvedKb.isWYSIWYG() : false); const outWYSIWYG = (isWYSIWYG ? ' ' : ' NO '); - result.push(`| ${this._leftPad(outScanCode, 30)} | ${outKey} | ${this._leftPad(outKb, 25)} | ${this._leftPad(outUILabel, 25)} | ${outWYSIWYG} |`); + result.push(`| ${this._leftPad(outScanCode, 30)} | ${outKey} | ${this._leftPad(outKb, 25)} | ${this._leftPad(outUILabel, 25)} | ${this._leftPad(outUserSettings, 25)} | ${outWYSIWYG} |`); } - result.push(`------------------------------------------------------------------------------------------------------------`); + result.push(`-----------------------------------------------------------------------------------------------------------------------------------------`); } diff --git a/src/vs/workbench/services/keybinding/test/win_de_ch.txt b/src/vs/workbench/services/keybinding/test/win_de_ch.txt index c0358ef1a49bb..ac0575e250ef2 100644 --- a/src/vs/workbench/services/keybinding/test/win_de_ch.txt +++ b/src/vs/workbench/services/keybinding/test/win_de_ch.txt @@ -1,284 +1,284 @@ ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyA | a | A | A | | -| Shift+KeyA | A | Shift+A | Shift+A | | -| Ctrl+Alt+KeyA | --- | Ctrl+Alt+A | Ctrl+Alt+A | | -| Ctrl+Shift+Alt+KeyA | --- | Ctrl+Shift+Alt+A | Ctrl+Shift+Alt+A | | ------------------------------------------------------------------------------------------------------------- -| KeyB | b | B | B | | -| Shift+KeyB | B | Shift+B | Shift+B | | -| Ctrl+Alt+KeyB | --- | Ctrl+Alt+B | Ctrl+Alt+B | | -| Ctrl+Shift+Alt+KeyB | --- | Ctrl+Shift+Alt+B | Ctrl+Shift+Alt+B | | ------------------------------------------------------------------------------------------------------------- -| KeyC | c | C | C | | -| Shift+KeyC | C | Shift+C | Shift+C | | -| Ctrl+Alt+KeyC | --- | Ctrl+Alt+C | Ctrl+Alt+C | | -| Ctrl+Shift+Alt+KeyC | --- | Ctrl+Shift+Alt+C | Ctrl+Shift+Alt+C | | ------------------------------------------------------------------------------------------------------------- -| KeyD | d | D | D | | -| Shift+KeyD | D | Shift+D | Shift+D | | -| Ctrl+Alt+KeyD | --- | Ctrl+Alt+D | Ctrl+Alt+D | | -| Ctrl+Shift+Alt+KeyD | --- | Ctrl+Shift+Alt+D | Ctrl+Shift+Alt+D | | ------------------------------------------------------------------------------------------------------------- -| KeyE | e | E | E | | -| Shift+KeyE | E | Shift+E | Shift+E | | -| Ctrl+Alt+KeyE | € | Ctrl+Alt+E | Ctrl+Alt+E | | -| Ctrl+Shift+Alt+KeyE | --- | Ctrl+Shift+Alt+E | Ctrl+Shift+Alt+E | | ------------------------------------------------------------------------------------------------------------- -| KeyF | f | F | F | | -| Shift+KeyF | F | Shift+F | Shift+F | | -| Ctrl+Alt+KeyF | --- | Ctrl+Alt+F | Ctrl+Alt+F | | -| Ctrl+Shift+Alt+KeyF | --- | Ctrl+Shift+Alt+F | Ctrl+Shift+Alt+F | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyG | g | G | G | | -| Shift+KeyG | G | Shift+G | Shift+G | | -| Ctrl+Alt+KeyG | --- | Ctrl+Alt+G | Ctrl+Alt+G | | -| Ctrl+Shift+Alt+KeyG | --- | Ctrl+Shift+Alt+G | Ctrl+Shift+Alt+G | | ------------------------------------------------------------------------------------------------------------- -| KeyH | h | H | H | | -| Shift+KeyH | H | Shift+H | Shift+H | | -| Ctrl+Alt+KeyH | --- | Ctrl+Alt+H | Ctrl+Alt+H | | -| Ctrl+Shift+Alt+KeyH | --- | Ctrl+Shift+Alt+H | Ctrl+Shift+Alt+H | | ------------------------------------------------------------------------------------------------------------- -| KeyI | i | I | I | | -| Shift+KeyI | I | Shift+I | Shift+I | | -| Ctrl+Alt+KeyI | --- | Ctrl+Alt+I | Ctrl+Alt+I | | -| Ctrl+Shift+Alt+KeyI | --- | Ctrl+Shift+Alt+I | Ctrl+Shift+Alt+I | | ------------------------------------------------------------------------------------------------------------- -| KeyJ | j | J | J | | -| Shift+KeyJ | J | Shift+J | Shift+J | | -| Ctrl+Alt+KeyJ | --- | Ctrl+Alt+J | Ctrl+Alt+J | | -| Ctrl+Shift+Alt+KeyJ | --- | Ctrl+Shift+Alt+J | Ctrl+Shift+Alt+J | | ------------------------------------------------------------------------------------------------------------- -| KeyK | k | K | K | | -| Shift+KeyK | K | Shift+K | Shift+K | | -| Ctrl+Alt+KeyK | --- | Ctrl+Alt+K | Ctrl+Alt+K | | -| Ctrl+Shift+Alt+KeyK | --- | Ctrl+Shift+Alt+K | Ctrl+Shift+Alt+K | | ------------------------------------------------------------------------------------------------------------- -| KeyL | l | L | L | | -| Shift+KeyL | L | Shift+L | Shift+L | | -| Ctrl+Alt+KeyL | --- | Ctrl+Alt+L | Ctrl+Alt+L | | -| Ctrl+Shift+Alt+KeyL | --- | Ctrl+Shift+Alt+L | Ctrl+Shift+Alt+L | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyM | m | M | M | | -| Shift+KeyM | M | Shift+M | Shift+M | | -| Ctrl+Alt+KeyM | --- | Ctrl+Alt+M | Ctrl+Alt+M | | -| Ctrl+Shift+Alt+KeyM | --- | Ctrl+Shift+Alt+M | Ctrl+Shift+Alt+M | | ------------------------------------------------------------------------------------------------------------- -| KeyN | n | N | N | | -| Shift+KeyN | N | Shift+N | Shift+N | | -| Ctrl+Alt+KeyN | --- | Ctrl+Alt+N | Ctrl+Alt+N | | -| Ctrl+Shift+Alt+KeyN | --- | Ctrl+Shift+Alt+N | Ctrl+Shift+Alt+N | | ------------------------------------------------------------------------------------------------------------- -| KeyO | o | O | O | | -| Shift+KeyO | O | Shift+O | Shift+O | | -| Ctrl+Alt+KeyO | --- | Ctrl+Alt+O | Ctrl+Alt+O | | -| Ctrl+Shift+Alt+KeyO | --- | Ctrl+Shift+Alt+O | Ctrl+Shift+Alt+O | | ------------------------------------------------------------------------------------------------------------- -| KeyP | p | P | P | | -| Shift+KeyP | P | Shift+P | Shift+P | | -| Ctrl+Alt+KeyP | --- | Ctrl+Alt+P | Ctrl+Alt+P | | -| Ctrl+Shift+Alt+KeyP | --- | Ctrl+Shift+Alt+P | Ctrl+Shift+Alt+P | | ------------------------------------------------------------------------------------------------------------- -| KeyQ | q | Q | Q | | -| Shift+KeyQ | Q | Shift+Q | Shift+Q | | -| Ctrl+Alt+KeyQ | --- | Ctrl+Alt+Q | Ctrl+Alt+Q | | -| Ctrl+Shift+Alt+KeyQ | --- | Ctrl+Shift+Alt+Q | Ctrl+Shift+Alt+Q | | ------------------------------------------------------------------------------------------------------------- -| KeyR | r | R | R | | -| Shift+KeyR | R | Shift+R | Shift+R | | -| Ctrl+Alt+KeyR | --- | Ctrl+Alt+R | Ctrl+Alt+R | | -| Ctrl+Shift+Alt+KeyR | --- | Ctrl+Shift+Alt+R | Ctrl+Shift+Alt+R | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyS | s | S | S | | -| Shift+KeyS | S | Shift+S | Shift+S | | -| Ctrl+Alt+KeyS | --- | Ctrl+Alt+S | Ctrl+Alt+S | | -| Ctrl+Shift+Alt+KeyS | --- | Ctrl+Shift+Alt+S | Ctrl+Shift+Alt+S | | ------------------------------------------------------------------------------------------------------------- -| KeyT | t | T | T | | -| Shift+KeyT | T | Shift+T | Shift+T | | -| Ctrl+Alt+KeyT | --- | Ctrl+Alt+T | Ctrl+Alt+T | | -| Ctrl+Shift+Alt+KeyT | --- | Ctrl+Shift+Alt+T | Ctrl+Shift+Alt+T | | ------------------------------------------------------------------------------------------------------------- -| KeyU | u | U | U | | -| Shift+KeyU | U | Shift+U | Shift+U | | -| Ctrl+Alt+KeyU | --- | Ctrl+Alt+U | Ctrl+Alt+U | | -| Ctrl+Shift+Alt+KeyU | --- | Ctrl+Shift+Alt+U | Ctrl+Shift+Alt+U | | ------------------------------------------------------------------------------------------------------------- -| KeyV | v | V | V | | -| Shift+KeyV | V | Shift+V | Shift+V | | -| Ctrl+Alt+KeyV | --- | Ctrl+Alt+V | Ctrl+Alt+V | | -| Ctrl+Shift+Alt+KeyV | --- | Ctrl+Shift+Alt+V | Ctrl+Shift+Alt+V | | ------------------------------------------------------------------------------------------------------------- -| KeyW | w | W | W | | -| Shift+KeyW | W | Shift+W | Shift+W | | -| Ctrl+Alt+KeyW | --- | Ctrl+Alt+W | Ctrl+Alt+W | | -| Ctrl+Shift+Alt+KeyW | --- | Ctrl+Shift+Alt+W | Ctrl+Shift+Alt+W | | ------------------------------------------------------------------------------------------------------------- -| KeyX | x | X | X | | -| Shift+KeyX | X | Shift+X | Shift+X | | -| Ctrl+Alt+KeyX | --- | Ctrl+Alt+X | Ctrl+Alt+X | | -| Ctrl+Shift+Alt+KeyX | --- | Ctrl+Shift+Alt+X | Ctrl+Shift+Alt+X | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyY | z | Z | Z | | -| Shift+KeyY | Z | Shift+Z | Shift+Z | | -| Ctrl+Alt+KeyY | --- | Ctrl+Alt+Z | Ctrl+Alt+Z | | -| Ctrl+Shift+Alt+KeyY | --- | Ctrl+Shift+Alt+Z | Ctrl+Shift+Alt+Z | | ------------------------------------------------------------------------------------------------------------- -| KeyZ | y | Y | Y | | -| Shift+KeyZ | Y | Shift+Y | Shift+Y | | -| Ctrl+Alt+KeyZ | --- | Ctrl+Alt+Y | Ctrl+Alt+Y | | -| Ctrl+Shift+Alt+KeyZ | --- | Ctrl+Shift+Alt+Y | Ctrl+Shift+Alt+Y | | ------------------------------------------------------------------------------------------------------------- -| Digit1 | 1 | 1 | 1 | | -| Shift+Digit1 | + | Shift+1 | Shift+1 | | -| Ctrl+Alt+Digit1 | ¦ | Ctrl+Alt+1 | Ctrl+Alt+1 | | -| Ctrl+Shift+Alt+Digit1 | --- | Ctrl+Shift+Alt+1 | Ctrl+Shift+Alt+1 | | ------------------------------------------------------------------------------------------------------------- -| Digit2 | 2 | 2 | 2 | | -| Shift+Digit2 | " | Shift+2 | Shift+2 | | -| Ctrl+Alt+Digit2 | @ | Ctrl+Alt+2 | Ctrl+Alt+2 | | -| Ctrl+Shift+Alt+Digit2 | --- | Ctrl+Shift+Alt+2 | Ctrl+Shift+Alt+2 | | ------------------------------------------------------------------------------------------------------------- -| Digit3 | 3 | 3 | 3 | | -| Shift+Digit3 | * | Shift+3 | Shift+3 | | -| Ctrl+Alt+Digit3 | # | Ctrl+Alt+3 | Ctrl+Alt+3 | | -| Ctrl+Shift+Alt+Digit3 | --- | Ctrl+Shift+Alt+3 | Ctrl+Shift+Alt+3 | | ------------------------------------------------------------------------------------------------------------- -| Digit4 | 4 | 4 | 4 | | -| Shift+Digit4 | ç | Shift+4 | Shift+4 | | -| Ctrl+Alt+Digit4 | ° | Ctrl+Alt+4 | Ctrl+Alt+4 | | -| Ctrl+Shift+Alt+Digit4 | --- | Ctrl+Shift+Alt+4 | Ctrl+Shift+Alt+4 | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| Digit5 | 5 | 5 | 5 | | -| Shift+Digit5 | % | Shift+5 | Shift+5 | | -| Ctrl+Alt+Digit5 | § | Ctrl+Alt+5 | Ctrl+Alt+5 | | -| Ctrl+Shift+Alt+Digit5 | --- | Ctrl+Shift+Alt+5 | Ctrl+Shift+Alt+5 | | ------------------------------------------------------------------------------------------------------------- -| Digit6 | 6 | 6 | 6 | | -| Shift+Digit6 | & | Shift+6 | Shift+6 | | -| Ctrl+Alt+Digit6 | ¬ | Ctrl+Alt+6 | Ctrl+Alt+6 | | -| Ctrl+Shift+Alt+Digit6 | --- | Ctrl+Shift+Alt+6 | Ctrl+Shift+Alt+6 | | ------------------------------------------------------------------------------------------------------------- -| Digit7 | 7 | 7 | 7 | | -| Shift+Digit7 | / | Shift+7 | Shift+7 | | -| Ctrl+Alt+Digit7 | | | Ctrl+Alt+7 | Ctrl+Alt+7 | | -| Ctrl+Shift+Alt+Digit7 | --- | Ctrl+Shift+Alt+7 | Ctrl+Shift+Alt+7 | | ------------------------------------------------------------------------------------------------------------- -| Digit8 | 8 | 8 | 8 | | -| Shift+Digit8 | ( | Shift+8 | Shift+8 | | -| Ctrl+Alt+Digit8 | ¢ | Ctrl+Alt+8 | Ctrl+Alt+8 | | -| Ctrl+Shift+Alt+Digit8 | --- | Ctrl+Shift+Alt+8 | Ctrl+Shift+Alt+8 | | ------------------------------------------------------------------------------------------------------------- -| Digit9 | 9 | 9 | 9 | | -| Shift+Digit9 | ) | Shift+9 | Shift+9 | | -| Ctrl+Alt+Digit9 | --- | Ctrl+Alt+9 | Ctrl+Alt+9 | | -| Ctrl+Shift+Alt+Digit9 | --- | Ctrl+Shift+Alt+9 | Ctrl+Shift+Alt+9 | | ------------------------------------------------------------------------------------------------------------- -| Digit0 | 0 | 0 | 0 | | -| Shift+Digit0 | = | Shift+0 | Shift+0 | | -| Ctrl+Alt+Digit0 | --- | Ctrl+Alt+0 | Ctrl+Alt+0 | | -| Ctrl+Shift+Alt+Digit0 | --- | Ctrl+Shift+Alt+0 | Ctrl+Shift+Alt+0 | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| Minus | ' | [ | ' | NO | -| Shift+Minus | ? | Shift+[ | Shift+' | NO | -| Ctrl+Alt+Minus | ´ | Ctrl+Alt+[ | Ctrl+Alt+' | NO | -| Ctrl+Shift+Alt+Minus | --- | Ctrl+Shift+Alt+[ | Ctrl+Shift+Alt+' | NO | ------------------------------------------------------------------------------------------------------------- -| Equal | ^ | ] | ^ | NO | -| Shift+Equal | ` | Shift+] | Shift+^ | NO | -| Ctrl+Alt+Equal | ~ | Ctrl+Alt+] | Ctrl+Alt+^ | NO | -| Ctrl+Shift+Alt+Equal | --- | Ctrl+Shift+Alt+] | Ctrl+Shift+Alt+^ | NO | ------------------------------------------------------------------------------------------------------------- -| BracketLeft | ü | ; | ü | NO | -| Shift+BracketLeft | è | Shift+; | Shift+ü | NO | -| Ctrl+Alt+BracketLeft | [ | Ctrl+Alt+; | Ctrl+Alt+ü | NO | -| Ctrl+Shift+Alt+BracketLeft | --- | Ctrl+Shift+Alt+; | Ctrl+Shift+Alt+ü | NO | ------------------------------------------------------------------------------------------------------------- -| BracketRight | ¨ | ` | ¨ | NO | -| Shift+BracketRight | ! | Shift+` | Shift+¨ | NO | -| Ctrl+Alt+BracketRight | ] | Ctrl+Alt+` | Ctrl+Alt+¨ | NO | -| Ctrl+Shift+Alt+BracketRight | --- | Ctrl+Shift+Alt+` | Ctrl+Shift+Alt+¨ | NO | ------------------------------------------------------------------------------------------------------------- -| Backslash | $ | OEM_8 | $ | NO | -| Shift+Backslash | £ | Shift+OEM_8 | Shift+$ | NO | -| Ctrl+Alt+Backslash | } | Ctrl+Alt+OEM_8 | Ctrl+Alt+$ | NO | -| Ctrl+Shift+Alt+Backslash | --- | Ctrl+Shift+Alt+OEM_8 | Ctrl+Shift+Alt+$ | NO | ------------------------------------------------------------------------------------------------------------- -| IntlHash | --- | null | null | NO | -| Shift+IntlHash | --- | null | null | NO | -| Ctrl+Alt+IntlHash | --- | null | null | NO | -| Ctrl+Shift+Alt+IntlHash | --- | null | null | NO | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| Semicolon | ö | ' | ö | NO | -| Shift+Semicolon | é | Shift+' | Shift+ö | NO | -| Ctrl+Alt+Semicolon | --- | Ctrl+Alt+' | Ctrl+Alt+ö | NO | -| Ctrl+Shift+Alt+Semicolon | --- | Ctrl+Shift+Alt+' | Ctrl+Shift+Alt+ö | NO | ------------------------------------------------------------------------------------------------------------- -| Quote | ä | \ | ä | NO | -| Shift+Quote | à | Shift+\ | Shift+ä | NO | -| Ctrl+Alt+Quote | { | Ctrl+Alt+\ | Ctrl+Alt+ä | NO | -| Ctrl+Shift+Alt+Quote | --- | Ctrl+Shift+Alt+\ | Ctrl+Shift+Alt+ä | NO | ------------------------------------------------------------------------------------------------------------- -| Backquote | § | / | § | NO | -| Shift+Backquote | ° | Shift+/ | Shift+§ | NO | -| Ctrl+Alt+Backquote | --- | Ctrl+Alt+/ | Ctrl+Alt+§ | NO | -| Ctrl+Shift+Alt+Backquote | --- | Ctrl+Shift+Alt+/ | Ctrl+Shift+Alt+§ | NO | ------------------------------------------------------------------------------------------------------------- -| Comma | , | , | , | NO | -| Shift+Comma | ; | Shift+, | Shift+, | NO | -| Ctrl+Alt+Comma | --- | Ctrl+Alt+, | Ctrl+Alt+, | NO | -| Ctrl+Shift+Alt+Comma | --- | Ctrl+Shift+Alt+, | Ctrl+Shift+Alt+, | NO | ------------------------------------------------------------------------------------------------------------- -| Period | . | . | . | NO | -| Shift+Period | : | Shift+. | Shift+. | NO | -| Ctrl+Alt+Period | --- | Ctrl+Alt+. | Ctrl+Alt+. | NO | -| Ctrl+Shift+Alt+Period | --- | Ctrl+Shift+Alt+. | Ctrl+Shift+Alt+. | NO | ------------------------------------------------------------------------------------------------------------- -| Slash | - | - | - | NO | -| Shift+Slash | _ | Shift+- | Shift+- | NO | -| Ctrl+Alt+Slash | --- | Ctrl+Alt+- | Ctrl+Alt+- | NO | -| Ctrl+Shift+Alt+Slash | --- | Ctrl+Shift+Alt+- | Ctrl+Shift+Alt+- | NO | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| ArrowUp | --- | UpArrow | UpArrow | | -| Shift+ArrowUp | --- | Shift+UpArrow | Shift+UpArrow | | -| Ctrl+Alt+ArrowUp | --- | Ctrl+Alt+UpArrow | Ctrl+Alt+UpArrow | | -| Ctrl+Shift+Alt+ArrowUp | --- | Ctrl+Shift+Alt+UpArrow | Ctrl+Shift+Alt+UpArrow | | ------------------------------------------------------------------------------------------------------------- -| Numpad0 | --- | NumPad0 | NumPad0 | | -| Shift+Numpad0 | --- | Shift+NumPad0 | Shift+NumPad0 | | -| Ctrl+Alt+Numpad0 | --- | Ctrl+Alt+NumPad0 | Ctrl+Alt+NumPad0 | | -| Ctrl+Shift+Alt+Numpad0 | --- | Ctrl+Shift+Alt+NumPad0 | Ctrl+Shift+Alt+NumPad0 | | ------------------------------------------------------------------------------------------------------------- -| IntlBackslash | < | OEM_102 | < | NO | -| Shift+IntlBackslash | > | Shift+OEM_102 | Shift+< | NO | -| Ctrl+Alt+IntlBackslash | \ | Ctrl+Alt+OEM_102 | Ctrl+Alt+< | NO | -| Ctrl+Shift+Alt+IntlBackslash | --- | Ctrl+Shift+Alt+OEM_102 | Ctrl+Shift+Alt+< | NO | ------------------------------------------------------------------------------------------------------------- -| IntlRo | --- | null | null | NO | -| Shift+IntlRo | --- | null | null | NO | -| Ctrl+Alt+IntlRo | --- | null | null | NO | -| Ctrl+Shift+Alt+IntlRo | --- | null | null | NO | ------------------------------------------------------------------------------------------------------------- -| IntlYen | --- | null | null | NO | -| Shift+IntlYen | --- | null | null | NO | -| Ctrl+Alt+IntlYen | --- | null | null | NO | -| Ctrl+Shift+Alt+IntlYen | --- | null | null | NO | ------------------------------------------------------------------------------------------------------------- \ No newline at end of file +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyA | a | A | A | a | | +| Shift+KeyA | A | Shift+A | Shift+A | shift+a | | +| Ctrl+Alt+KeyA | --- | Ctrl+Alt+A | Ctrl+Alt+A | ctrl+alt+a | | +| Ctrl+Shift+Alt+KeyA | --- | Ctrl+Shift+Alt+A | Ctrl+Shift+Alt+A | ctrl+shift+alt+a | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyB | b | B | B | b | | +| Shift+KeyB | B | Shift+B | Shift+B | shift+b | | +| Ctrl+Alt+KeyB | --- | Ctrl+Alt+B | Ctrl+Alt+B | ctrl+alt+b | | +| Ctrl+Shift+Alt+KeyB | --- | Ctrl+Shift+Alt+B | Ctrl+Shift+Alt+B | ctrl+shift+alt+b | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyC | c | C | C | c | | +| Shift+KeyC | C | Shift+C | Shift+C | shift+c | | +| Ctrl+Alt+KeyC | --- | Ctrl+Alt+C | Ctrl+Alt+C | ctrl+alt+c | | +| Ctrl+Shift+Alt+KeyC | --- | Ctrl+Shift+Alt+C | Ctrl+Shift+Alt+C | ctrl+shift+alt+c | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyD | d | D | D | d | | +| Shift+KeyD | D | Shift+D | Shift+D | shift+d | | +| Ctrl+Alt+KeyD | --- | Ctrl+Alt+D | Ctrl+Alt+D | ctrl+alt+d | | +| Ctrl+Shift+Alt+KeyD | --- | Ctrl+Shift+Alt+D | Ctrl+Shift+Alt+D | ctrl+shift+alt+d | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyE | e | E | E | e | | +| Shift+KeyE | E | Shift+E | Shift+E | shift+e | | +| Ctrl+Alt+KeyE | € | Ctrl+Alt+E | Ctrl+Alt+E | ctrl+alt+e | | +| Ctrl+Shift+Alt+KeyE | --- | Ctrl+Shift+Alt+E | Ctrl+Shift+Alt+E | ctrl+shift+alt+e | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyF | f | F | F | f | | +| Shift+KeyF | F | Shift+F | Shift+F | shift+f | | +| Ctrl+Alt+KeyF | --- | Ctrl+Alt+F | Ctrl+Alt+F | ctrl+alt+f | | +| Ctrl+Shift+Alt+KeyF | --- | Ctrl+Shift+Alt+F | Ctrl+Shift+Alt+F | ctrl+shift+alt+f | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyG | g | G | G | g | | +| Shift+KeyG | G | Shift+G | Shift+G | shift+g | | +| Ctrl+Alt+KeyG | --- | Ctrl+Alt+G | Ctrl+Alt+G | ctrl+alt+g | | +| Ctrl+Shift+Alt+KeyG | --- | Ctrl+Shift+Alt+G | Ctrl+Shift+Alt+G | ctrl+shift+alt+g | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyH | h | H | H | h | | +| Shift+KeyH | H | Shift+H | Shift+H | shift+h | | +| Ctrl+Alt+KeyH | --- | Ctrl+Alt+H | Ctrl+Alt+H | ctrl+alt+h | | +| Ctrl+Shift+Alt+KeyH | --- | Ctrl+Shift+Alt+H | Ctrl+Shift+Alt+H | ctrl+shift+alt+h | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyI | i | I | I | i | | +| Shift+KeyI | I | Shift+I | Shift+I | shift+i | | +| Ctrl+Alt+KeyI | --- | Ctrl+Alt+I | Ctrl+Alt+I | ctrl+alt+i | | +| Ctrl+Shift+Alt+KeyI | --- | Ctrl+Shift+Alt+I | Ctrl+Shift+Alt+I | ctrl+shift+alt+i | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyJ | j | J | J | j | | +| Shift+KeyJ | J | Shift+J | Shift+J | shift+j | | +| Ctrl+Alt+KeyJ | --- | Ctrl+Alt+J | Ctrl+Alt+J | ctrl+alt+j | | +| Ctrl+Shift+Alt+KeyJ | --- | Ctrl+Shift+Alt+J | Ctrl+Shift+Alt+J | ctrl+shift+alt+j | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyK | k | K | K | k | | +| Shift+KeyK | K | Shift+K | Shift+K | shift+k | | +| Ctrl+Alt+KeyK | --- | Ctrl+Alt+K | Ctrl+Alt+K | ctrl+alt+k | | +| Ctrl+Shift+Alt+KeyK | --- | Ctrl+Shift+Alt+K | Ctrl+Shift+Alt+K | ctrl+shift+alt+k | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyL | l | L | L | l | | +| Shift+KeyL | L | Shift+L | Shift+L | shift+l | | +| Ctrl+Alt+KeyL | --- | Ctrl+Alt+L | Ctrl+Alt+L | ctrl+alt+l | | +| Ctrl+Shift+Alt+KeyL | --- | Ctrl+Shift+Alt+L | Ctrl+Shift+Alt+L | ctrl+shift+alt+l | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyM | m | M | M | m | | +| Shift+KeyM | M | Shift+M | Shift+M | shift+m | | +| Ctrl+Alt+KeyM | --- | Ctrl+Alt+M | Ctrl+Alt+M | ctrl+alt+m | | +| Ctrl+Shift+Alt+KeyM | --- | Ctrl+Shift+Alt+M | Ctrl+Shift+Alt+M | ctrl+shift+alt+m | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyN | n | N | N | n | | +| Shift+KeyN | N | Shift+N | Shift+N | shift+n | | +| Ctrl+Alt+KeyN | --- | Ctrl+Alt+N | Ctrl+Alt+N | ctrl+alt+n | | +| Ctrl+Shift+Alt+KeyN | --- | Ctrl+Shift+Alt+N | Ctrl+Shift+Alt+N | ctrl+shift+alt+n | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyO | o | O | O | o | | +| Shift+KeyO | O | Shift+O | Shift+O | shift+o | | +| Ctrl+Alt+KeyO | --- | Ctrl+Alt+O | Ctrl+Alt+O | ctrl+alt+o | | +| Ctrl+Shift+Alt+KeyO | --- | Ctrl+Shift+Alt+O | Ctrl+Shift+Alt+O | ctrl+shift+alt+o | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyP | p | P | P | p | | +| Shift+KeyP | P | Shift+P | Shift+P | shift+p | | +| Ctrl+Alt+KeyP | --- | Ctrl+Alt+P | Ctrl+Alt+P | ctrl+alt+p | | +| Ctrl+Shift+Alt+KeyP | --- | Ctrl+Shift+Alt+P | Ctrl+Shift+Alt+P | ctrl+shift+alt+p | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyQ | q | Q | Q | q | | +| Shift+KeyQ | Q | Shift+Q | Shift+Q | shift+q | | +| Ctrl+Alt+KeyQ | --- | Ctrl+Alt+Q | Ctrl+Alt+Q | ctrl+alt+q | | +| Ctrl+Shift+Alt+KeyQ | --- | Ctrl+Shift+Alt+Q | Ctrl+Shift+Alt+Q | ctrl+shift+alt+q | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyR | r | R | R | r | | +| Shift+KeyR | R | Shift+R | Shift+R | shift+r | | +| Ctrl+Alt+KeyR | --- | Ctrl+Alt+R | Ctrl+Alt+R | ctrl+alt+r | | +| Ctrl+Shift+Alt+KeyR | --- | Ctrl+Shift+Alt+R | Ctrl+Shift+Alt+R | ctrl+shift+alt+r | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyS | s | S | S | s | | +| Shift+KeyS | S | Shift+S | Shift+S | shift+s | | +| Ctrl+Alt+KeyS | --- | Ctrl+Alt+S | Ctrl+Alt+S | ctrl+alt+s | | +| Ctrl+Shift+Alt+KeyS | --- | Ctrl+Shift+Alt+S | Ctrl+Shift+Alt+S | ctrl+shift+alt+s | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyT | t | T | T | t | | +| Shift+KeyT | T | Shift+T | Shift+T | shift+t | | +| Ctrl+Alt+KeyT | --- | Ctrl+Alt+T | Ctrl+Alt+T | ctrl+alt+t | | +| Ctrl+Shift+Alt+KeyT | --- | Ctrl+Shift+Alt+T | Ctrl+Shift+Alt+T | ctrl+shift+alt+t | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyU | u | U | U | u | | +| Shift+KeyU | U | Shift+U | Shift+U | shift+u | | +| Ctrl+Alt+KeyU | --- | Ctrl+Alt+U | Ctrl+Alt+U | ctrl+alt+u | | +| Ctrl+Shift+Alt+KeyU | --- | Ctrl+Shift+Alt+U | Ctrl+Shift+Alt+U | ctrl+shift+alt+u | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyV | v | V | V | v | | +| Shift+KeyV | V | Shift+V | Shift+V | shift+v | | +| Ctrl+Alt+KeyV | --- | Ctrl+Alt+V | Ctrl+Alt+V | ctrl+alt+v | | +| Ctrl+Shift+Alt+KeyV | --- | Ctrl+Shift+Alt+V | Ctrl+Shift+Alt+V | ctrl+shift+alt+v | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyW | w | W | W | w | | +| Shift+KeyW | W | Shift+W | Shift+W | shift+w | | +| Ctrl+Alt+KeyW | --- | Ctrl+Alt+W | Ctrl+Alt+W | ctrl+alt+w | | +| Ctrl+Shift+Alt+KeyW | --- | Ctrl+Shift+Alt+W | Ctrl+Shift+Alt+W | ctrl+shift+alt+w | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyX | x | X | X | x | | +| Shift+KeyX | X | Shift+X | Shift+X | shift+x | | +| Ctrl+Alt+KeyX | --- | Ctrl+Alt+X | Ctrl+Alt+X | ctrl+alt+x | | +| Ctrl+Shift+Alt+KeyX | --- | Ctrl+Shift+Alt+X | Ctrl+Shift+Alt+X | ctrl+shift+alt+x | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyY | z | Z | Z | z | | +| Shift+KeyY | Z | Shift+Z | Shift+Z | shift+z | | +| Ctrl+Alt+KeyY | --- | Ctrl+Alt+Z | Ctrl+Alt+Z | ctrl+alt+z | | +| Ctrl+Shift+Alt+KeyY | --- | Ctrl+Shift+Alt+Z | Ctrl+Shift+Alt+Z | ctrl+shift+alt+z | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyZ | y | Y | Y | y | | +| Shift+KeyZ | Y | Shift+Y | Shift+Y | shift+y | | +| Ctrl+Alt+KeyZ | --- | Ctrl+Alt+Y | Ctrl+Alt+Y | ctrl+alt+y | | +| Ctrl+Shift+Alt+KeyZ | --- | Ctrl+Shift+Alt+Y | Ctrl+Shift+Alt+Y | ctrl+shift+alt+y | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit1 | 1 | 1 | 1 | 1 | | +| Shift+Digit1 | + | Shift+1 | Shift+1 | shift+1 | | +| Ctrl+Alt+Digit1 | ¦ | Ctrl+Alt+1 | Ctrl+Alt+1 | ctrl+alt+1 | | +| Ctrl+Shift+Alt+Digit1 | --- | Ctrl+Shift+Alt+1 | Ctrl+Shift+Alt+1 | ctrl+shift+alt+1 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit2 | 2 | 2 | 2 | 2 | | +| Shift+Digit2 | " | Shift+2 | Shift+2 | shift+2 | | +| Ctrl+Alt+Digit2 | @ | Ctrl+Alt+2 | Ctrl+Alt+2 | ctrl+alt+2 | | +| Ctrl+Shift+Alt+Digit2 | --- | Ctrl+Shift+Alt+2 | Ctrl+Shift+Alt+2 | ctrl+shift+alt+2 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit3 | 3 | 3 | 3 | 3 | | +| Shift+Digit3 | * | Shift+3 | Shift+3 | shift+3 | | +| Ctrl+Alt+Digit3 | # | Ctrl+Alt+3 | Ctrl+Alt+3 | ctrl+alt+3 | | +| Ctrl+Shift+Alt+Digit3 | --- | Ctrl+Shift+Alt+3 | Ctrl+Shift+Alt+3 | ctrl+shift+alt+3 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit4 | 4 | 4 | 4 | 4 | | +| Shift+Digit4 | ç | Shift+4 | Shift+4 | shift+4 | | +| Ctrl+Alt+Digit4 | ° | Ctrl+Alt+4 | Ctrl+Alt+4 | ctrl+alt+4 | | +| Ctrl+Shift+Alt+Digit4 | --- | Ctrl+Shift+Alt+4 | Ctrl+Shift+Alt+4 | ctrl+shift+alt+4 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit5 | 5 | 5 | 5 | 5 | | +| Shift+Digit5 | % | Shift+5 | Shift+5 | shift+5 | | +| Ctrl+Alt+Digit5 | § | Ctrl+Alt+5 | Ctrl+Alt+5 | ctrl+alt+5 | | +| Ctrl+Shift+Alt+Digit5 | --- | Ctrl+Shift+Alt+5 | Ctrl+Shift+Alt+5 | ctrl+shift+alt+5 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit6 | 6 | 6 | 6 | 6 | | +| Shift+Digit6 | & | Shift+6 | Shift+6 | shift+6 | | +| Ctrl+Alt+Digit6 | ¬ | Ctrl+Alt+6 | Ctrl+Alt+6 | ctrl+alt+6 | | +| Ctrl+Shift+Alt+Digit6 | --- | Ctrl+Shift+Alt+6 | Ctrl+Shift+Alt+6 | ctrl+shift+alt+6 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit7 | 7 | 7 | 7 | 7 | | +| Shift+Digit7 | / | Shift+7 | Shift+7 | shift+7 | | +| Ctrl+Alt+Digit7 | | | Ctrl+Alt+7 | Ctrl+Alt+7 | ctrl+alt+7 | | +| Ctrl+Shift+Alt+Digit7 | --- | Ctrl+Shift+Alt+7 | Ctrl+Shift+Alt+7 | ctrl+shift+alt+7 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit8 | 8 | 8 | 8 | 8 | | +| Shift+Digit8 | ( | Shift+8 | Shift+8 | shift+8 | | +| Ctrl+Alt+Digit8 | ¢ | Ctrl+Alt+8 | Ctrl+Alt+8 | ctrl+alt+8 | | +| Ctrl+Shift+Alt+Digit8 | --- | Ctrl+Shift+Alt+8 | Ctrl+Shift+Alt+8 | ctrl+shift+alt+8 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit9 | 9 | 9 | 9 | 9 | | +| Shift+Digit9 | ) | Shift+9 | Shift+9 | shift+9 | | +| Ctrl+Alt+Digit9 | --- | Ctrl+Alt+9 | Ctrl+Alt+9 | ctrl+alt+9 | | +| Ctrl+Shift+Alt+Digit9 | --- | Ctrl+Shift+Alt+9 | Ctrl+Shift+Alt+9 | ctrl+shift+alt+9 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit0 | 0 | 0 | 0 | 0 | | +| Shift+Digit0 | = | Shift+0 | Shift+0 | shift+0 | | +| Ctrl+Alt+Digit0 | --- | Ctrl+Alt+0 | Ctrl+Alt+0 | ctrl+alt+0 | | +| Ctrl+Shift+Alt+Digit0 | --- | Ctrl+Shift+Alt+0 | Ctrl+Shift+Alt+0 | ctrl+shift+alt+0 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| Minus | ' | [ | ' | oem_4 | NO | +| Shift+Minus | ? | Shift+[ | Shift+' | shift+oem_4 | NO | +| Ctrl+Alt+Minus | ´ | Ctrl+Alt+[ | Ctrl+Alt+' | ctrl+alt+oem_4 | NO | +| Ctrl+Shift+Alt+Minus | --- | Ctrl+Shift+Alt+[ | Ctrl+Shift+Alt+' | ctrl+shift+alt+oem_4 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Equal | ^ | ] | ^ | oem_6 | NO | +| Shift+Equal | ` | Shift+] | Shift+^ | shift+oem_6 | NO | +| Ctrl+Alt+Equal | ~ | Ctrl+Alt+] | Ctrl+Alt+^ | ctrl+alt+oem_6 | NO | +| Ctrl+Shift+Alt+Equal | --- | Ctrl+Shift+Alt+] | Ctrl+Shift+Alt+^ | ctrl+shift+alt+oem_6 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| BracketLeft | ü | ; | ü | oem_1 | NO | +| Shift+BracketLeft | è | Shift+; | Shift+ü | shift+oem_1 | NO | +| Ctrl+Alt+BracketLeft | [ | Ctrl+Alt+; | Ctrl+Alt+ü | ctrl+alt+oem_1 | NO | +| Ctrl+Shift+Alt+BracketLeft | --- | Ctrl+Shift+Alt+; | Ctrl+Shift+Alt+ü | ctrl+shift+alt+oem_1 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| BracketRight | ¨ | ` | ¨ | oem_3 | NO | +| Shift+BracketRight | ! | Shift+` | Shift+¨ | shift+oem_3 | NO | +| Ctrl+Alt+BracketRight | ] | Ctrl+Alt+` | Ctrl+Alt+¨ | ctrl+alt+oem_3 | NO | +| Ctrl+Shift+Alt+BracketRight | --- | Ctrl+Shift+Alt+` | Ctrl+Shift+Alt+¨ | ctrl+shift+alt+oem_3 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Backslash | $ | OEM_8 | $ | oem_8 | NO | +| Shift+Backslash | £ | Shift+OEM_8 | Shift+$ | shift+oem_8 | NO | +| Ctrl+Alt+Backslash | } | Ctrl+Alt+OEM_8 | Ctrl+Alt+$ | ctrl+alt+oem_8 | NO | +| Ctrl+Shift+Alt+Backslash | --- | Ctrl+Shift+Alt+OEM_8 | Ctrl+Shift+Alt+$ | ctrl+shift+alt+oem_8 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| IntlHash | --- | null | null | null | NO | +| Shift+IntlHash | --- | null | null | null | NO | +| Ctrl+Alt+IntlHash | --- | null | null | null | NO | +| Ctrl+Shift+Alt+IntlHash | --- | null | null | null | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| Semicolon | ö | ' | ö | oem_7 | NO | +| Shift+Semicolon | é | Shift+' | Shift+ö | shift+oem_7 | NO | +| Ctrl+Alt+Semicolon | --- | Ctrl+Alt+' | Ctrl+Alt+ö | ctrl+alt+oem_7 | NO | +| Ctrl+Shift+Alt+Semicolon | --- | Ctrl+Shift+Alt+' | Ctrl+Shift+Alt+ö | ctrl+shift+alt+oem_7 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Quote | ä | \ | ä | oem_5 | NO | +| Shift+Quote | à | Shift+\ | Shift+ä | shift+oem_5 | NO | +| Ctrl+Alt+Quote | { | Ctrl+Alt+\ | Ctrl+Alt+ä | ctrl+alt+oem_5 | NO | +| Ctrl+Shift+Alt+Quote | --- | Ctrl+Shift+Alt+\ | Ctrl+Shift+Alt+ä | ctrl+shift+alt+oem_5 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Backquote | § | / | § | oem_2 | NO | +| Shift+Backquote | ° | Shift+/ | Shift+§ | shift+oem_2 | NO | +| Ctrl+Alt+Backquote | --- | Ctrl+Alt+/ | Ctrl+Alt+§ | ctrl+alt+oem_2 | NO | +| Ctrl+Shift+Alt+Backquote | --- | Ctrl+Shift+Alt+/ | Ctrl+Shift+Alt+§ | ctrl+shift+alt+oem_2 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Comma | , | , | , | oem_comma | NO | +| Shift+Comma | ; | Shift+, | Shift+, | shift+oem_comma | NO | +| Ctrl+Alt+Comma | --- | Ctrl+Alt+, | Ctrl+Alt+, | ctrl+alt+oem_comma | NO | +| Ctrl+Shift+Alt+Comma | --- | Ctrl+Shift+Alt+, | Ctrl+Shift+Alt+, | ctrl+shift+alt+oem_comma | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Period | . | . | . | oem_period | NO | +| Shift+Period | : | Shift+. | Shift+. | shift+oem_period | NO | +| Ctrl+Alt+Period | --- | Ctrl+Alt+. | Ctrl+Alt+. | ctrl+alt+oem_period | NO | +| Ctrl+Shift+Alt+Period | --- | Ctrl+Shift+Alt+. | Ctrl+Shift+Alt+. | ctrl+shift+alt+oem_period | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Slash | - | - | - | oem_minus | NO | +| Shift+Slash | _ | Shift+- | Shift+- | shift+oem_minus | NO | +| Ctrl+Alt+Slash | --- | Ctrl+Alt+- | Ctrl+Alt+- | ctrl+alt+oem_minus | NO | +| Ctrl+Shift+Alt+Slash | --- | Ctrl+Shift+Alt+- | Ctrl+Shift+Alt+- | ctrl+shift+alt+oem_minus | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| ArrowUp | --- | UpArrow | UpArrow | up | | +| Shift+ArrowUp | --- | Shift+UpArrow | Shift+UpArrow | shift+up | | +| Ctrl+Alt+ArrowUp | --- | Ctrl+Alt+UpArrow | Ctrl+Alt+UpArrow | ctrl+alt+up | | +| Ctrl+Shift+Alt+ArrowUp | --- | Ctrl+Shift+Alt+UpArrow | Ctrl+Shift+Alt+UpArrow | ctrl+shift+alt+up | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Numpad0 | --- | NumPad0 | NumPad0 | numpad0 | | +| Shift+Numpad0 | --- | Shift+NumPad0 | Shift+NumPad0 | shift+numpad0 | | +| Ctrl+Alt+Numpad0 | --- | Ctrl+Alt+NumPad0 | Ctrl+Alt+NumPad0 | ctrl+alt+numpad0 | | +| Ctrl+Shift+Alt+Numpad0 | --- | Ctrl+Shift+Alt+NumPad0 | Ctrl+Shift+Alt+NumPad0 | ctrl+shift+alt+numpad0 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| IntlBackslash | < | OEM_102 | < | oem_102 | NO | +| Shift+IntlBackslash | > | Shift+OEM_102 | Shift+< | shift+oem_102 | NO | +| Ctrl+Alt+IntlBackslash | \ | Ctrl+Alt+OEM_102 | Ctrl+Alt+< | ctrl+alt+oem_102 | NO | +| Ctrl+Shift+Alt+IntlBackslash | --- | Ctrl+Shift+Alt+OEM_102 | Ctrl+Shift+Alt+< | ctrl+shift+alt+oem_102 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| IntlRo | --- | null | null | null | NO | +| Shift+IntlRo | --- | null | null | null | NO | +| Ctrl+Alt+IntlRo | --- | null | null | null | NO | +| Ctrl+Shift+Alt+IntlRo | --- | null | null | null | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| IntlYen | --- | null | null | null | NO | +| Shift+IntlYen | --- | null | null | null | NO | +| Ctrl+Alt+IntlYen | --- | null | null | null | NO | +| Ctrl+Shift+Alt+IntlYen | --- | null | null | null | NO | +----------------------------------------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/vs/workbench/services/keybinding/test/win_en_us.txt b/src/vs/workbench/services/keybinding/test/win_en_us.txt index b0b6ae6b4ac47..b011bd0be5663 100644 --- a/src/vs/workbench/services/keybinding/test/win_en_us.txt +++ b/src/vs/workbench/services/keybinding/test/win_en_us.txt @@ -1,284 +1,284 @@ ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyA | a | A | A | | -| Shift+KeyA | A | Shift+A | Shift+A | | -| Ctrl+Alt+KeyA | --- | Ctrl+Alt+A | Ctrl+Alt+A | | -| Ctrl+Shift+Alt+KeyA | --- | Ctrl+Shift+Alt+A | Ctrl+Shift+Alt+A | | ------------------------------------------------------------------------------------------------------------- -| KeyB | b | B | B | | -| Shift+KeyB | B | Shift+B | Shift+B | | -| Ctrl+Alt+KeyB | --- | Ctrl+Alt+B | Ctrl+Alt+B | | -| Ctrl+Shift+Alt+KeyB | --- | Ctrl+Shift+Alt+B | Ctrl+Shift+Alt+B | | ------------------------------------------------------------------------------------------------------------- -| KeyC | c | C | C | | -| Shift+KeyC | C | Shift+C | Shift+C | | -| Ctrl+Alt+KeyC | --- | Ctrl+Alt+C | Ctrl+Alt+C | | -| Ctrl+Shift+Alt+KeyC | --- | Ctrl+Shift+Alt+C | Ctrl+Shift+Alt+C | | ------------------------------------------------------------------------------------------------------------- -| KeyD | d | D | D | | -| Shift+KeyD | D | Shift+D | Shift+D | | -| Ctrl+Alt+KeyD | --- | Ctrl+Alt+D | Ctrl+Alt+D | | -| Ctrl+Shift+Alt+KeyD | --- | Ctrl+Shift+Alt+D | Ctrl+Shift+Alt+D | | ------------------------------------------------------------------------------------------------------------- -| KeyE | e | E | E | | -| Shift+KeyE | E | Shift+E | Shift+E | | -| Ctrl+Alt+KeyE | --- | Ctrl+Alt+E | Ctrl+Alt+E | | -| Ctrl+Shift+Alt+KeyE | --- | Ctrl+Shift+Alt+E | Ctrl+Shift+Alt+E | | ------------------------------------------------------------------------------------------------------------- -| KeyF | f | F | F | | -| Shift+KeyF | F | Shift+F | Shift+F | | -| Ctrl+Alt+KeyF | --- | Ctrl+Alt+F | Ctrl+Alt+F | | -| Ctrl+Shift+Alt+KeyF | --- | Ctrl+Shift+Alt+F | Ctrl+Shift+Alt+F | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyG | g | G | G | | -| Shift+KeyG | G | Shift+G | Shift+G | | -| Ctrl+Alt+KeyG | --- | Ctrl+Alt+G | Ctrl+Alt+G | | -| Ctrl+Shift+Alt+KeyG | --- | Ctrl+Shift+Alt+G | Ctrl+Shift+Alt+G | | ------------------------------------------------------------------------------------------------------------- -| KeyH | h | H | H | | -| Shift+KeyH | H | Shift+H | Shift+H | | -| Ctrl+Alt+KeyH | --- | Ctrl+Alt+H | Ctrl+Alt+H | | -| Ctrl+Shift+Alt+KeyH | --- | Ctrl+Shift+Alt+H | Ctrl+Shift+Alt+H | | ------------------------------------------------------------------------------------------------------------- -| KeyI | i | I | I | | -| Shift+KeyI | I | Shift+I | Shift+I | | -| Ctrl+Alt+KeyI | --- | Ctrl+Alt+I | Ctrl+Alt+I | | -| Ctrl+Shift+Alt+KeyI | --- | Ctrl+Shift+Alt+I | Ctrl+Shift+Alt+I | | ------------------------------------------------------------------------------------------------------------- -| KeyJ | j | J | J | | -| Shift+KeyJ | J | Shift+J | Shift+J | | -| Ctrl+Alt+KeyJ | --- | Ctrl+Alt+J | Ctrl+Alt+J | | -| Ctrl+Shift+Alt+KeyJ | --- | Ctrl+Shift+Alt+J | Ctrl+Shift+Alt+J | | ------------------------------------------------------------------------------------------------------------- -| KeyK | k | K | K | | -| Shift+KeyK | K | Shift+K | Shift+K | | -| Ctrl+Alt+KeyK | --- | Ctrl+Alt+K | Ctrl+Alt+K | | -| Ctrl+Shift+Alt+KeyK | --- | Ctrl+Shift+Alt+K | Ctrl+Shift+Alt+K | | ------------------------------------------------------------------------------------------------------------- -| KeyL | l | L | L | | -| Shift+KeyL | L | Shift+L | Shift+L | | -| Ctrl+Alt+KeyL | --- | Ctrl+Alt+L | Ctrl+Alt+L | | -| Ctrl+Shift+Alt+KeyL | --- | Ctrl+Shift+Alt+L | Ctrl+Shift+Alt+L | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyM | m | M | M | | -| Shift+KeyM | M | Shift+M | Shift+M | | -| Ctrl+Alt+KeyM | --- | Ctrl+Alt+M | Ctrl+Alt+M | | -| Ctrl+Shift+Alt+KeyM | --- | Ctrl+Shift+Alt+M | Ctrl+Shift+Alt+M | | ------------------------------------------------------------------------------------------------------------- -| KeyN | n | N | N | | -| Shift+KeyN | N | Shift+N | Shift+N | | -| Ctrl+Alt+KeyN | --- | Ctrl+Alt+N | Ctrl+Alt+N | | -| Ctrl+Shift+Alt+KeyN | --- | Ctrl+Shift+Alt+N | Ctrl+Shift+Alt+N | | ------------------------------------------------------------------------------------------------------------- -| KeyO | o | O | O | | -| Shift+KeyO | O | Shift+O | Shift+O | | -| Ctrl+Alt+KeyO | --- | Ctrl+Alt+O | Ctrl+Alt+O | | -| Ctrl+Shift+Alt+KeyO | --- | Ctrl+Shift+Alt+O | Ctrl+Shift+Alt+O | | ------------------------------------------------------------------------------------------------------------- -| KeyP | p | P | P | | -| Shift+KeyP | P | Shift+P | Shift+P | | -| Ctrl+Alt+KeyP | --- | Ctrl+Alt+P | Ctrl+Alt+P | | -| Ctrl+Shift+Alt+KeyP | --- | Ctrl+Shift+Alt+P | Ctrl+Shift+Alt+P | | ------------------------------------------------------------------------------------------------------------- -| KeyQ | q | Q | Q | | -| Shift+KeyQ | Q | Shift+Q | Shift+Q | | -| Ctrl+Alt+KeyQ | --- | Ctrl+Alt+Q | Ctrl+Alt+Q | | -| Ctrl+Shift+Alt+KeyQ | --- | Ctrl+Shift+Alt+Q | Ctrl+Shift+Alt+Q | | ------------------------------------------------------------------------------------------------------------- -| KeyR | r | R | R | | -| Shift+KeyR | R | Shift+R | Shift+R | | -| Ctrl+Alt+KeyR | --- | Ctrl+Alt+R | Ctrl+Alt+R | | -| Ctrl+Shift+Alt+KeyR | --- | Ctrl+Shift+Alt+R | Ctrl+Shift+Alt+R | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyS | s | S | S | | -| Shift+KeyS | S | Shift+S | Shift+S | | -| Ctrl+Alt+KeyS | --- | Ctrl+Alt+S | Ctrl+Alt+S | | -| Ctrl+Shift+Alt+KeyS | --- | Ctrl+Shift+Alt+S | Ctrl+Shift+Alt+S | | ------------------------------------------------------------------------------------------------------------- -| KeyT | t | T | T | | -| Shift+KeyT | T | Shift+T | Shift+T | | -| Ctrl+Alt+KeyT | --- | Ctrl+Alt+T | Ctrl+Alt+T | | -| Ctrl+Shift+Alt+KeyT | --- | Ctrl+Shift+Alt+T | Ctrl+Shift+Alt+T | | ------------------------------------------------------------------------------------------------------------- -| KeyU | u | U | U | | -| Shift+KeyU | U | Shift+U | Shift+U | | -| Ctrl+Alt+KeyU | --- | Ctrl+Alt+U | Ctrl+Alt+U | | -| Ctrl+Shift+Alt+KeyU | --- | Ctrl+Shift+Alt+U | Ctrl+Shift+Alt+U | | ------------------------------------------------------------------------------------------------------------- -| KeyV | v | V | V | | -| Shift+KeyV | V | Shift+V | Shift+V | | -| Ctrl+Alt+KeyV | --- | Ctrl+Alt+V | Ctrl+Alt+V | | -| Ctrl+Shift+Alt+KeyV | --- | Ctrl+Shift+Alt+V | Ctrl+Shift+Alt+V | | ------------------------------------------------------------------------------------------------------------- -| KeyW | w | W | W | | -| Shift+KeyW | W | Shift+W | Shift+W | | -| Ctrl+Alt+KeyW | --- | Ctrl+Alt+W | Ctrl+Alt+W | | -| Ctrl+Shift+Alt+KeyW | --- | Ctrl+Shift+Alt+W | Ctrl+Shift+Alt+W | | ------------------------------------------------------------------------------------------------------------- -| KeyX | x | X | X | | -| Shift+KeyX | X | Shift+X | Shift+X | | -| Ctrl+Alt+KeyX | --- | Ctrl+Alt+X | Ctrl+Alt+X | | -| Ctrl+Shift+Alt+KeyX | --- | Ctrl+Shift+Alt+X | Ctrl+Shift+Alt+X | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyY | y | Y | Y | | -| Shift+KeyY | Y | Shift+Y | Shift+Y | | -| Ctrl+Alt+KeyY | --- | Ctrl+Alt+Y | Ctrl+Alt+Y | | -| Ctrl+Shift+Alt+KeyY | --- | Ctrl+Shift+Alt+Y | Ctrl+Shift+Alt+Y | | ------------------------------------------------------------------------------------------------------------- -| KeyZ | z | Z | Z | | -| Shift+KeyZ | Z | Shift+Z | Shift+Z | | -| Ctrl+Alt+KeyZ | --- | Ctrl+Alt+Z | Ctrl+Alt+Z | | -| Ctrl+Shift+Alt+KeyZ | --- | Ctrl+Shift+Alt+Z | Ctrl+Shift+Alt+Z | | ------------------------------------------------------------------------------------------------------------- -| Digit1 | 1 | 1 | 1 | | -| Shift+Digit1 | ! | Shift+1 | Shift+1 | | -| Ctrl+Alt+Digit1 | --- | Ctrl+Alt+1 | Ctrl+Alt+1 | | -| Ctrl+Shift+Alt+Digit1 | --- | Ctrl+Shift+Alt+1 | Ctrl+Shift+Alt+1 | | ------------------------------------------------------------------------------------------------------------- -| Digit2 | 2 | 2 | 2 | | -| Shift+Digit2 | @ | Shift+2 | Shift+2 | | -| Ctrl+Alt+Digit2 | --- | Ctrl+Alt+2 | Ctrl+Alt+2 | | -| Ctrl+Shift+Alt+Digit2 | --- | Ctrl+Shift+Alt+2 | Ctrl+Shift+Alt+2 | | ------------------------------------------------------------------------------------------------------------- -| Digit3 | 3 | 3 | 3 | | -| Shift+Digit3 | # | Shift+3 | Shift+3 | | -| Ctrl+Alt+Digit3 | --- | Ctrl+Alt+3 | Ctrl+Alt+3 | | -| Ctrl+Shift+Alt+Digit3 | --- | Ctrl+Shift+Alt+3 | Ctrl+Shift+Alt+3 | | ------------------------------------------------------------------------------------------------------------- -| Digit4 | 4 | 4 | 4 | | -| Shift+Digit4 | $ | Shift+4 | Shift+4 | | -| Ctrl+Alt+Digit4 | --- | Ctrl+Alt+4 | Ctrl+Alt+4 | | -| Ctrl+Shift+Alt+Digit4 | --- | Ctrl+Shift+Alt+4 | Ctrl+Shift+Alt+4 | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| Digit5 | 5 | 5 | 5 | | -| Shift+Digit5 | % | Shift+5 | Shift+5 | | -| Ctrl+Alt+Digit5 | --- | Ctrl+Alt+5 | Ctrl+Alt+5 | | -| Ctrl+Shift+Alt+Digit5 | --- | Ctrl+Shift+Alt+5 | Ctrl+Shift+Alt+5 | | ------------------------------------------------------------------------------------------------------------- -| Digit6 | 6 | 6 | 6 | | -| Shift+Digit6 | ^ | Shift+6 | Shift+6 | | -| Ctrl+Alt+Digit6 | --- | Ctrl+Alt+6 | Ctrl+Alt+6 | | -| Ctrl+Shift+Alt+Digit6 | --- | Ctrl+Shift+Alt+6 | Ctrl+Shift+Alt+6 | | ------------------------------------------------------------------------------------------------------------- -| Digit7 | 7 | 7 | 7 | | -| Shift+Digit7 | & | Shift+7 | Shift+7 | | -| Ctrl+Alt+Digit7 | --- | Ctrl+Alt+7 | Ctrl+Alt+7 | | -| Ctrl+Shift+Alt+Digit7 | --- | Ctrl+Shift+Alt+7 | Ctrl+Shift+Alt+7 | | ------------------------------------------------------------------------------------------------------------- -| Digit8 | 8 | 8 | 8 | | -| Shift+Digit8 | * | Shift+8 | Shift+8 | | -| Ctrl+Alt+Digit8 | --- | Ctrl+Alt+8 | Ctrl+Alt+8 | | -| Ctrl+Shift+Alt+Digit8 | --- | Ctrl+Shift+Alt+8 | Ctrl+Shift+Alt+8 | | ------------------------------------------------------------------------------------------------------------- -| Digit9 | 9 | 9 | 9 | | -| Shift+Digit9 | ( | Shift+9 | Shift+9 | | -| Ctrl+Alt+Digit9 | --- | Ctrl+Alt+9 | Ctrl+Alt+9 | | -| Ctrl+Shift+Alt+Digit9 | --- | Ctrl+Shift+Alt+9 | Ctrl+Shift+Alt+9 | | ------------------------------------------------------------------------------------------------------------- -| Digit0 | 0 | 0 | 0 | | -| Shift+Digit0 | ) | Shift+0 | Shift+0 | | -| Ctrl+Alt+Digit0 | --- | Ctrl+Alt+0 | Ctrl+Alt+0 | | -| Ctrl+Shift+Alt+Digit0 | --- | Ctrl+Shift+Alt+0 | Ctrl+Shift+Alt+0 | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| Minus | - | - | - | | -| Shift+Minus | _ | Shift+- | Shift+- | | -| Ctrl+Alt+Minus | --- | Ctrl+Alt+- | Ctrl+Alt+- | | -| Ctrl+Shift+Alt+Minus | --- | Ctrl+Shift+Alt+- | Ctrl+Shift+Alt+- | | ------------------------------------------------------------------------------------------------------------- -| Equal | = | = | = | | -| Shift+Equal | + | Shift+= | Shift+= | | -| Ctrl+Alt+Equal | --- | Ctrl+Alt+= | Ctrl+Alt+= | | -| Ctrl+Shift+Alt+Equal | --- | Ctrl+Shift+Alt+= | Ctrl+Shift+Alt+= | | ------------------------------------------------------------------------------------------------------------- -| BracketLeft | [ | [ | [ | | -| Shift+BracketLeft | { | Shift+[ | Shift+[ | | -| Ctrl+Alt+BracketLeft | --- | Ctrl+Alt+[ | Ctrl+Alt+[ | | -| Ctrl+Shift+Alt+BracketLeft | --- | Ctrl+Shift+Alt+[ | Ctrl+Shift+Alt+[ | | ------------------------------------------------------------------------------------------------------------- -| BracketRight | ] | ] | ] | | -| Shift+BracketRight | } | Shift+] | Shift+] | | -| Ctrl+Alt+BracketRight | --- | Ctrl+Alt+] | Ctrl+Alt+] | | -| Ctrl+Shift+Alt+BracketRight | --- | Ctrl+Shift+Alt+] | Ctrl+Shift+Alt+] | | ------------------------------------------------------------------------------------------------------------- -| Backslash | \ | \ | \ | | -| Shift+Backslash | | | Shift+\ | Shift+\ | | -| Ctrl+Alt+Backslash | --- | Ctrl+Alt+\ | Ctrl+Alt+\ | | -| Ctrl+Shift+Alt+Backslash | --- | Ctrl+Shift+Alt+\ | Ctrl+Shift+Alt+\ | | ------------------------------------------------------------------------------------------------------------- -| IntlHash | --- | null | null | NO | -| Shift+IntlHash | --- | null | null | NO | -| Ctrl+Alt+IntlHash | --- | null | null | NO | -| Ctrl+Shift+Alt+IntlHash | --- | null | null | NO | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| Semicolon | ; | ; | ; | | -| Shift+Semicolon | : | Shift+; | Shift+; | | -| Ctrl+Alt+Semicolon | --- | Ctrl+Alt+; | Ctrl+Alt+; | | -| Ctrl+Shift+Alt+Semicolon | --- | Ctrl+Shift+Alt+; | Ctrl+Shift+Alt+; | | ------------------------------------------------------------------------------------------------------------- -| Quote | ' | ' | ' | | -| Shift+Quote | " | Shift+' | Shift+' | | -| Ctrl+Alt+Quote | --- | Ctrl+Alt+' | Ctrl+Alt+' | | -| Ctrl+Shift+Alt+Quote | --- | Ctrl+Shift+Alt+' | Ctrl+Shift+Alt+' | | ------------------------------------------------------------------------------------------------------------- -| Backquote | ` | ` | ` | | -| Shift+Backquote | ~ | Shift+` | Shift+` | | -| Ctrl+Alt+Backquote | --- | Ctrl+Alt+` | Ctrl+Alt+` | | -| Ctrl+Shift+Alt+Backquote | --- | Ctrl+Shift+Alt+` | Ctrl+Shift+Alt+` | | ------------------------------------------------------------------------------------------------------------- -| Comma | , | , | , | | -| Shift+Comma | < | Shift+, | Shift+, | | -| Ctrl+Alt+Comma | --- | Ctrl+Alt+, | Ctrl+Alt+, | | -| Ctrl+Shift+Alt+Comma | --- | Ctrl+Shift+Alt+, | Ctrl+Shift+Alt+, | | ------------------------------------------------------------------------------------------------------------- -| Period | . | . | . | | -| Shift+Period | > | Shift+. | Shift+. | | -| Ctrl+Alt+Period | --- | Ctrl+Alt+. | Ctrl+Alt+. | | -| Ctrl+Shift+Alt+Period | --- | Ctrl+Shift+Alt+. | Ctrl+Shift+Alt+. | | ------------------------------------------------------------------------------------------------------------- -| Slash | / | / | / | | -| Shift+Slash | ? | Shift+/ | Shift+/ | | -| Ctrl+Alt+Slash | --- | Ctrl+Alt+/ | Ctrl+Alt+/ | | -| Ctrl+Shift+Alt+Slash | --- | Ctrl+Shift+Alt+/ | Ctrl+Shift+Alt+/ | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| ArrowUp | --- | UpArrow | UpArrow | | -| Shift+ArrowUp | --- | Shift+UpArrow | Shift+UpArrow | | -| Ctrl+Alt+ArrowUp | --- | Ctrl+Alt+UpArrow | Ctrl+Alt+UpArrow | | -| Ctrl+Shift+Alt+ArrowUp | --- | Ctrl+Shift+Alt+UpArrow | Ctrl+Shift+Alt+UpArrow | | ------------------------------------------------------------------------------------------------------------- -| Numpad0 | --- | NumPad0 | NumPad0 | | -| Shift+Numpad0 | --- | Shift+NumPad0 | Shift+NumPad0 | | -| Ctrl+Alt+Numpad0 | --- | Ctrl+Alt+NumPad0 | Ctrl+Alt+NumPad0 | | -| Ctrl+Shift+Alt+Numpad0 | --- | Ctrl+Shift+Alt+NumPad0 | Ctrl+Shift+Alt+NumPad0 | | ------------------------------------------------------------------------------------------------------------- -| IntlBackslash | \ | OEM_102 | \ | NO | -| Shift+IntlBackslash | | | Shift+OEM_102 | Shift+\ | NO | -| Ctrl+Alt+IntlBackslash | --- | Ctrl+Alt+OEM_102 | Ctrl+Alt+\ | NO | -| Ctrl+Shift+Alt+IntlBackslash | --- | Ctrl+Shift+Alt+OEM_102 | Ctrl+Shift+Alt+\ | NO | ------------------------------------------------------------------------------------------------------------- -| IntlRo | --- | null | null | NO | -| Shift+IntlRo | --- | null | null | NO | -| Ctrl+Alt+IntlRo | --- | null | null | NO | -| Ctrl+Shift+Alt+IntlRo | --- | null | null | NO | ------------------------------------------------------------------------------------------------------------- -| IntlYen | --- | null | null | NO | -| Shift+IntlYen | --- | null | null | NO | -| Ctrl+Alt+IntlYen | --- | null | null | NO | -| Ctrl+Shift+Alt+IntlYen | --- | null | null | NO | ------------------------------------------------------------------------------------------------------------- \ No newline at end of file +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyA | a | A | A | a | | +| Shift+KeyA | A | Shift+A | Shift+A | shift+a | | +| Ctrl+Alt+KeyA | --- | Ctrl+Alt+A | Ctrl+Alt+A | ctrl+alt+a | | +| Ctrl+Shift+Alt+KeyA | --- | Ctrl+Shift+Alt+A | Ctrl+Shift+Alt+A | ctrl+shift+alt+a | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyB | b | B | B | b | | +| Shift+KeyB | B | Shift+B | Shift+B | shift+b | | +| Ctrl+Alt+KeyB | --- | Ctrl+Alt+B | Ctrl+Alt+B | ctrl+alt+b | | +| Ctrl+Shift+Alt+KeyB | --- | Ctrl+Shift+Alt+B | Ctrl+Shift+Alt+B | ctrl+shift+alt+b | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyC | c | C | C | c | | +| Shift+KeyC | C | Shift+C | Shift+C | shift+c | | +| Ctrl+Alt+KeyC | --- | Ctrl+Alt+C | Ctrl+Alt+C | ctrl+alt+c | | +| Ctrl+Shift+Alt+KeyC | --- | Ctrl+Shift+Alt+C | Ctrl+Shift+Alt+C | ctrl+shift+alt+c | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyD | d | D | D | d | | +| Shift+KeyD | D | Shift+D | Shift+D | shift+d | | +| Ctrl+Alt+KeyD | --- | Ctrl+Alt+D | Ctrl+Alt+D | ctrl+alt+d | | +| Ctrl+Shift+Alt+KeyD | --- | Ctrl+Shift+Alt+D | Ctrl+Shift+Alt+D | ctrl+shift+alt+d | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyE | e | E | E | e | | +| Shift+KeyE | E | Shift+E | Shift+E | shift+e | | +| Ctrl+Alt+KeyE | --- | Ctrl+Alt+E | Ctrl+Alt+E | ctrl+alt+e | | +| Ctrl+Shift+Alt+KeyE | --- | Ctrl+Shift+Alt+E | Ctrl+Shift+Alt+E | ctrl+shift+alt+e | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyF | f | F | F | f | | +| Shift+KeyF | F | Shift+F | Shift+F | shift+f | | +| Ctrl+Alt+KeyF | --- | Ctrl+Alt+F | Ctrl+Alt+F | ctrl+alt+f | | +| Ctrl+Shift+Alt+KeyF | --- | Ctrl+Shift+Alt+F | Ctrl+Shift+Alt+F | ctrl+shift+alt+f | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyG | g | G | G | g | | +| Shift+KeyG | G | Shift+G | Shift+G | shift+g | | +| Ctrl+Alt+KeyG | --- | Ctrl+Alt+G | Ctrl+Alt+G | ctrl+alt+g | | +| Ctrl+Shift+Alt+KeyG | --- | Ctrl+Shift+Alt+G | Ctrl+Shift+Alt+G | ctrl+shift+alt+g | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyH | h | H | H | h | | +| Shift+KeyH | H | Shift+H | Shift+H | shift+h | | +| Ctrl+Alt+KeyH | --- | Ctrl+Alt+H | Ctrl+Alt+H | ctrl+alt+h | | +| Ctrl+Shift+Alt+KeyH | --- | Ctrl+Shift+Alt+H | Ctrl+Shift+Alt+H | ctrl+shift+alt+h | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyI | i | I | I | i | | +| Shift+KeyI | I | Shift+I | Shift+I | shift+i | | +| Ctrl+Alt+KeyI | --- | Ctrl+Alt+I | Ctrl+Alt+I | ctrl+alt+i | | +| Ctrl+Shift+Alt+KeyI | --- | Ctrl+Shift+Alt+I | Ctrl+Shift+Alt+I | ctrl+shift+alt+i | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyJ | j | J | J | j | | +| Shift+KeyJ | J | Shift+J | Shift+J | shift+j | | +| Ctrl+Alt+KeyJ | --- | Ctrl+Alt+J | Ctrl+Alt+J | ctrl+alt+j | | +| Ctrl+Shift+Alt+KeyJ | --- | Ctrl+Shift+Alt+J | Ctrl+Shift+Alt+J | ctrl+shift+alt+j | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyK | k | K | K | k | | +| Shift+KeyK | K | Shift+K | Shift+K | shift+k | | +| Ctrl+Alt+KeyK | --- | Ctrl+Alt+K | Ctrl+Alt+K | ctrl+alt+k | | +| Ctrl+Shift+Alt+KeyK | --- | Ctrl+Shift+Alt+K | Ctrl+Shift+Alt+K | ctrl+shift+alt+k | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyL | l | L | L | l | | +| Shift+KeyL | L | Shift+L | Shift+L | shift+l | | +| Ctrl+Alt+KeyL | --- | Ctrl+Alt+L | Ctrl+Alt+L | ctrl+alt+l | | +| Ctrl+Shift+Alt+KeyL | --- | Ctrl+Shift+Alt+L | Ctrl+Shift+Alt+L | ctrl+shift+alt+l | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyM | m | M | M | m | | +| Shift+KeyM | M | Shift+M | Shift+M | shift+m | | +| Ctrl+Alt+KeyM | --- | Ctrl+Alt+M | Ctrl+Alt+M | ctrl+alt+m | | +| Ctrl+Shift+Alt+KeyM | --- | Ctrl+Shift+Alt+M | Ctrl+Shift+Alt+M | ctrl+shift+alt+m | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyN | n | N | N | n | | +| Shift+KeyN | N | Shift+N | Shift+N | shift+n | | +| Ctrl+Alt+KeyN | --- | Ctrl+Alt+N | Ctrl+Alt+N | ctrl+alt+n | | +| Ctrl+Shift+Alt+KeyN | --- | Ctrl+Shift+Alt+N | Ctrl+Shift+Alt+N | ctrl+shift+alt+n | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyO | o | O | O | o | | +| Shift+KeyO | O | Shift+O | Shift+O | shift+o | | +| Ctrl+Alt+KeyO | --- | Ctrl+Alt+O | Ctrl+Alt+O | ctrl+alt+o | | +| Ctrl+Shift+Alt+KeyO | --- | Ctrl+Shift+Alt+O | Ctrl+Shift+Alt+O | ctrl+shift+alt+o | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyP | p | P | P | p | | +| Shift+KeyP | P | Shift+P | Shift+P | shift+p | | +| Ctrl+Alt+KeyP | --- | Ctrl+Alt+P | Ctrl+Alt+P | ctrl+alt+p | | +| Ctrl+Shift+Alt+KeyP | --- | Ctrl+Shift+Alt+P | Ctrl+Shift+Alt+P | ctrl+shift+alt+p | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyQ | q | Q | Q | q | | +| Shift+KeyQ | Q | Shift+Q | Shift+Q | shift+q | | +| Ctrl+Alt+KeyQ | --- | Ctrl+Alt+Q | Ctrl+Alt+Q | ctrl+alt+q | | +| Ctrl+Shift+Alt+KeyQ | --- | Ctrl+Shift+Alt+Q | Ctrl+Shift+Alt+Q | ctrl+shift+alt+q | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyR | r | R | R | r | | +| Shift+KeyR | R | Shift+R | Shift+R | shift+r | | +| Ctrl+Alt+KeyR | --- | Ctrl+Alt+R | Ctrl+Alt+R | ctrl+alt+r | | +| Ctrl+Shift+Alt+KeyR | --- | Ctrl+Shift+Alt+R | Ctrl+Shift+Alt+R | ctrl+shift+alt+r | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyS | s | S | S | s | | +| Shift+KeyS | S | Shift+S | Shift+S | shift+s | | +| Ctrl+Alt+KeyS | --- | Ctrl+Alt+S | Ctrl+Alt+S | ctrl+alt+s | | +| Ctrl+Shift+Alt+KeyS | --- | Ctrl+Shift+Alt+S | Ctrl+Shift+Alt+S | ctrl+shift+alt+s | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyT | t | T | T | t | | +| Shift+KeyT | T | Shift+T | Shift+T | shift+t | | +| Ctrl+Alt+KeyT | --- | Ctrl+Alt+T | Ctrl+Alt+T | ctrl+alt+t | | +| Ctrl+Shift+Alt+KeyT | --- | Ctrl+Shift+Alt+T | Ctrl+Shift+Alt+T | ctrl+shift+alt+t | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyU | u | U | U | u | | +| Shift+KeyU | U | Shift+U | Shift+U | shift+u | | +| Ctrl+Alt+KeyU | --- | Ctrl+Alt+U | Ctrl+Alt+U | ctrl+alt+u | | +| Ctrl+Shift+Alt+KeyU | --- | Ctrl+Shift+Alt+U | Ctrl+Shift+Alt+U | ctrl+shift+alt+u | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyV | v | V | V | v | | +| Shift+KeyV | V | Shift+V | Shift+V | shift+v | | +| Ctrl+Alt+KeyV | --- | Ctrl+Alt+V | Ctrl+Alt+V | ctrl+alt+v | | +| Ctrl+Shift+Alt+KeyV | --- | Ctrl+Shift+Alt+V | Ctrl+Shift+Alt+V | ctrl+shift+alt+v | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyW | w | W | W | w | | +| Shift+KeyW | W | Shift+W | Shift+W | shift+w | | +| Ctrl+Alt+KeyW | --- | Ctrl+Alt+W | Ctrl+Alt+W | ctrl+alt+w | | +| Ctrl+Shift+Alt+KeyW | --- | Ctrl+Shift+Alt+W | Ctrl+Shift+Alt+W | ctrl+shift+alt+w | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyX | x | X | X | x | | +| Shift+KeyX | X | Shift+X | Shift+X | shift+x | | +| Ctrl+Alt+KeyX | --- | Ctrl+Alt+X | Ctrl+Alt+X | ctrl+alt+x | | +| Ctrl+Shift+Alt+KeyX | --- | Ctrl+Shift+Alt+X | Ctrl+Shift+Alt+X | ctrl+shift+alt+x | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyY | y | Y | Y | y | | +| Shift+KeyY | Y | Shift+Y | Shift+Y | shift+y | | +| Ctrl+Alt+KeyY | --- | Ctrl+Alt+Y | Ctrl+Alt+Y | ctrl+alt+y | | +| Ctrl+Shift+Alt+KeyY | --- | Ctrl+Shift+Alt+Y | Ctrl+Shift+Alt+Y | ctrl+shift+alt+y | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyZ | z | Z | Z | z | | +| Shift+KeyZ | Z | Shift+Z | Shift+Z | shift+z | | +| Ctrl+Alt+KeyZ | --- | Ctrl+Alt+Z | Ctrl+Alt+Z | ctrl+alt+z | | +| Ctrl+Shift+Alt+KeyZ | --- | Ctrl+Shift+Alt+Z | Ctrl+Shift+Alt+Z | ctrl+shift+alt+z | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit1 | 1 | 1 | 1 | 1 | | +| Shift+Digit1 | ! | Shift+1 | Shift+1 | shift+1 | | +| Ctrl+Alt+Digit1 | --- | Ctrl+Alt+1 | Ctrl+Alt+1 | ctrl+alt+1 | | +| Ctrl+Shift+Alt+Digit1 | --- | Ctrl+Shift+Alt+1 | Ctrl+Shift+Alt+1 | ctrl+shift+alt+1 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit2 | 2 | 2 | 2 | 2 | | +| Shift+Digit2 | @ | Shift+2 | Shift+2 | shift+2 | | +| Ctrl+Alt+Digit2 | --- | Ctrl+Alt+2 | Ctrl+Alt+2 | ctrl+alt+2 | | +| Ctrl+Shift+Alt+Digit2 | --- | Ctrl+Shift+Alt+2 | Ctrl+Shift+Alt+2 | ctrl+shift+alt+2 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit3 | 3 | 3 | 3 | 3 | | +| Shift+Digit3 | # | Shift+3 | Shift+3 | shift+3 | | +| Ctrl+Alt+Digit3 | --- | Ctrl+Alt+3 | Ctrl+Alt+3 | ctrl+alt+3 | | +| Ctrl+Shift+Alt+Digit3 | --- | Ctrl+Shift+Alt+3 | Ctrl+Shift+Alt+3 | ctrl+shift+alt+3 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit4 | 4 | 4 | 4 | 4 | | +| Shift+Digit4 | $ | Shift+4 | Shift+4 | shift+4 | | +| Ctrl+Alt+Digit4 | --- | Ctrl+Alt+4 | Ctrl+Alt+4 | ctrl+alt+4 | | +| Ctrl+Shift+Alt+Digit4 | --- | Ctrl+Shift+Alt+4 | Ctrl+Shift+Alt+4 | ctrl+shift+alt+4 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit5 | 5 | 5 | 5 | 5 | | +| Shift+Digit5 | % | Shift+5 | Shift+5 | shift+5 | | +| Ctrl+Alt+Digit5 | --- | Ctrl+Alt+5 | Ctrl+Alt+5 | ctrl+alt+5 | | +| Ctrl+Shift+Alt+Digit5 | --- | Ctrl+Shift+Alt+5 | Ctrl+Shift+Alt+5 | ctrl+shift+alt+5 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit6 | 6 | 6 | 6 | 6 | | +| Shift+Digit6 | ^ | Shift+6 | Shift+6 | shift+6 | | +| Ctrl+Alt+Digit6 | --- | Ctrl+Alt+6 | Ctrl+Alt+6 | ctrl+alt+6 | | +| Ctrl+Shift+Alt+Digit6 | --- | Ctrl+Shift+Alt+6 | Ctrl+Shift+Alt+6 | ctrl+shift+alt+6 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit7 | 7 | 7 | 7 | 7 | | +| Shift+Digit7 | & | Shift+7 | Shift+7 | shift+7 | | +| Ctrl+Alt+Digit7 | --- | Ctrl+Alt+7 | Ctrl+Alt+7 | ctrl+alt+7 | | +| Ctrl+Shift+Alt+Digit7 | --- | Ctrl+Shift+Alt+7 | Ctrl+Shift+Alt+7 | ctrl+shift+alt+7 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit8 | 8 | 8 | 8 | 8 | | +| Shift+Digit8 | * | Shift+8 | Shift+8 | shift+8 | | +| Ctrl+Alt+Digit8 | --- | Ctrl+Alt+8 | Ctrl+Alt+8 | ctrl+alt+8 | | +| Ctrl+Shift+Alt+Digit8 | --- | Ctrl+Shift+Alt+8 | Ctrl+Shift+Alt+8 | ctrl+shift+alt+8 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit9 | 9 | 9 | 9 | 9 | | +| Shift+Digit9 | ( | Shift+9 | Shift+9 | shift+9 | | +| Ctrl+Alt+Digit9 | --- | Ctrl+Alt+9 | Ctrl+Alt+9 | ctrl+alt+9 | | +| Ctrl+Shift+Alt+Digit9 | --- | Ctrl+Shift+Alt+9 | Ctrl+Shift+Alt+9 | ctrl+shift+alt+9 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit0 | 0 | 0 | 0 | 0 | | +| Shift+Digit0 | ) | Shift+0 | Shift+0 | shift+0 | | +| Ctrl+Alt+Digit0 | --- | Ctrl+Alt+0 | Ctrl+Alt+0 | ctrl+alt+0 | | +| Ctrl+Shift+Alt+Digit0 | --- | Ctrl+Shift+Alt+0 | Ctrl+Shift+Alt+0 | ctrl+shift+alt+0 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| Minus | - | - | - | - | | +| Shift+Minus | _ | Shift+- | Shift+- | shift+- | | +| Ctrl+Alt+Minus | --- | Ctrl+Alt+- | Ctrl+Alt+- | ctrl+alt+- | | +| Ctrl+Shift+Alt+Minus | --- | Ctrl+Shift+Alt+- | Ctrl+Shift+Alt+- | ctrl+shift+alt+- | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Equal | = | = | = | = | | +| Shift+Equal | + | Shift+= | Shift+= | shift+= | | +| Ctrl+Alt+Equal | --- | Ctrl+Alt+= | Ctrl+Alt+= | ctrl+alt+= | | +| Ctrl+Shift+Alt+Equal | --- | Ctrl+Shift+Alt+= | Ctrl+Shift+Alt+= | ctrl+shift+alt+= | | +----------------------------------------------------------------------------------------------------------------------------------------- +| BracketLeft | [ | [ | [ | [ | | +| Shift+BracketLeft | { | Shift+[ | Shift+[ | shift+[ | | +| Ctrl+Alt+BracketLeft | --- | Ctrl+Alt+[ | Ctrl+Alt+[ | ctrl+alt+[ | | +| Ctrl+Shift+Alt+BracketLeft | --- | Ctrl+Shift+Alt+[ | Ctrl+Shift+Alt+[ | ctrl+shift+alt+[ | | +----------------------------------------------------------------------------------------------------------------------------------------- +| BracketRight | ] | ] | ] | ] | | +| Shift+BracketRight | } | Shift+] | Shift+] | shift+] | | +| Ctrl+Alt+BracketRight | --- | Ctrl+Alt+] | Ctrl+Alt+] | ctrl+alt+] | | +| Ctrl+Shift+Alt+BracketRight | --- | Ctrl+Shift+Alt+] | Ctrl+Shift+Alt+] | ctrl+shift+alt+] | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Backslash | \ | \ | \ | \ | | +| Shift+Backslash | | | Shift+\ | Shift+\ | shift+\ | | +| Ctrl+Alt+Backslash | --- | Ctrl+Alt+\ | Ctrl+Alt+\ | ctrl+alt+\ | | +| Ctrl+Shift+Alt+Backslash | --- | Ctrl+Shift+Alt+\ | Ctrl+Shift+Alt+\ | ctrl+shift+alt+\ | | +----------------------------------------------------------------------------------------------------------------------------------------- +| IntlHash | --- | null | null | null | NO | +| Shift+IntlHash | --- | null | null | null | NO | +| Ctrl+Alt+IntlHash | --- | null | null | null | NO | +| Ctrl+Shift+Alt+IntlHash | --- | null | null | null | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| Semicolon | ; | ; | ; | ; | | +| Shift+Semicolon | : | Shift+; | Shift+; | shift+; | | +| Ctrl+Alt+Semicolon | --- | Ctrl+Alt+; | Ctrl+Alt+; | ctrl+alt+; | | +| Ctrl+Shift+Alt+Semicolon | --- | Ctrl+Shift+Alt+; | Ctrl+Shift+Alt+; | ctrl+shift+alt+; | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Quote | ' | ' | ' | ' | | +| Shift+Quote | " | Shift+' | Shift+' | shift+' | | +| Ctrl+Alt+Quote | --- | Ctrl+Alt+' | Ctrl+Alt+' | ctrl+alt+' | | +| Ctrl+Shift+Alt+Quote | --- | Ctrl+Shift+Alt+' | Ctrl+Shift+Alt+' | ctrl+shift+alt+' | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Backquote | ` | ` | ` | ` | | +| Shift+Backquote | ~ | Shift+` | Shift+` | shift+` | | +| Ctrl+Alt+Backquote | --- | Ctrl+Alt+` | Ctrl+Alt+` | ctrl+alt+` | | +| Ctrl+Shift+Alt+Backquote | --- | Ctrl+Shift+Alt+` | Ctrl+Shift+Alt+` | ctrl+shift+alt+` | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Comma | , | , | , | , | | +| Shift+Comma | < | Shift+, | Shift+, | shift+, | | +| Ctrl+Alt+Comma | --- | Ctrl+Alt+, | Ctrl+Alt+, | ctrl+alt+, | | +| Ctrl+Shift+Alt+Comma | --- | Ctrl+Shift+Alt+, | Ctrl+Shift+Alt+, | ctrl+shift+alt+, | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Period | . | . | . | . | | +| Shift+Period | > | Shift+. | Shift+. | shift+. | | +| Ctrl+Alt+Period | --- | Ctrl+Alt+. | Ctrl+Alt+. | ctrl+alt+. | | +| Ctrl+Shift+Alt+Period | --- | Ctrl+Shift+Alt+. | Ctrl+Shift+Alt+. | ctrl+shift+alt+. | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Slash | / | / | / | / | | +| Shift+Slash | ? | Shift+/ | Shift+/ | shift+/ | | +| Ctrl+Alt+Slash | --- | Ctrl+Alt+/ | Ctrl+Alt+/ | ctrl+alt+/ | | +| Ctrl+Shift+Alt+Slash | --- | Ctrl+Shift+Alt+/ | Ctrl+Shift+Alt+/ | ctrl+shift+alt+/ | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| ArrowUp | --- | UpArrow | UpArrow | up | | +| Shift+ArrowUp | --- | Shift+UpArrow | Shift+UpArrow | shift+up | | +| Ctrl+Alt+ArrowUp | --- | Ctrl+Alt+UpArrow | Ctrl+Alt+UpArrow | ctrl+alt+up | | +| Ctrl+Shift+Alt+ArrowUp | --- | Ctrl+Shift+Alt+UpArrow | Ctrl+Shift+Alt+UpArrow | ctrl+shift+alt+up | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Numpad0 | --- | NumPad0 | NumPad0 | numpad0 | | +| Shift+Numpad0 | --- | Shift+NumPad0 | Shift+NumPad0 | shift+numpad0 | | +| Ctrl+Alt+Numpad0 | --- | Ctrl+Alt+NumPad0 | Ctrl+Alt+NumPad0 | ctrl+alt+numpad0 | | +| Ctrl+Shift+Alt+Numpad0 | --- | Ctrl+Shift+Alt+NumPad0 | Ctrl+Shift+Alt+NumPad0 | ctrl+shift+alt+numpad0 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| IntlBackslash | \ | OEM_102 | \ | oem_102 | NO | +| Shift+IntlBackslash | | | Shift+OEM_102 | Shift+\ | shift+oem_102 | NO | +| Ctrl+Alt+IntlBackslash | --- | Ctrl+Alt+OEM_102 | Ctrl+Alt+\ | ctrl+alt+oem_102 | NO | +| Ctrl+Shift+Alt+IntlBackslash | --- | Ctrl+Shift+Alt+OEM_102 | Ctrl+Shift+Alt+\ | ctrl+shift+alt+oem_102 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| IntlRo | --- | null | null | null | NO | +| Shift+IntlRo | --- | null | null | null | NO | +| Ctrl+Alt+IntlRo | --- | null | null | null | NO | +| Ctrl+Shift+Alt+IntlRo | --- | null | null | null | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| IntlYen | --- | null | null | null | NO | +| Shift+IntlYen | --- | null | null | null | NO | +| Ctrl+Alt+IntlYen | --- | null | null | null | NO | +| Ctrl+Shift+Alt+IntlYen | --- | null | null | null | NO | +----------------------------------------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/vs/workbench/services/keybinding/test/win_por_ptb.txt b/src/vs/workbench/services/keybinding/test/win_por_ptb.txt index a09f7654b3228..c29ed5469917d 100644 --- a/src/vs/workbench/services/keybinding/test/win_por_ptb.txt +++ b/src/vs/workbench/services/keybinding/test/win_por_ptb.txt @@ -1,284 +1,284 @@ ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyA | a | A | A | | -| Shift+KeyA | A | Shift+A | Shift+A | | -| Ctrl+Alt+KeyA | --- | Ctrl+Alt+A | Ctrl+Alt+A | | -| Ctrl+Shift+Alt+KeyA | --- | Ctrl+Shift+Alt+A | Ctrl+Shift+Alt+A | | ------------------------------------------------------------------------------------------------------------- -| KeyB | b | B | B | | -| Shift+KeyB | B | Shift+B | Shift+B | | -| Ctrl+Alt+KeyB | --- | Ctrl+Alt+B | Ctrl+Alt+B | | -| Ctrl+Shift+Alt+KeyB | --- | Ctrl+Shift+Alt+B | Ctrl+Shift+Alt+B | | ------------------------------------------------------------------------------------------------------------- -| KeyC | c | C | C | | -| Shift+KeyC | C | Shift+C | Shift+C | | -| Ctrl+Alt+KeyC | ₢ | Ctrl+Alt+C | Ctrl+Alt+C | | -| Ctrl+Shift+Alt+KeyC | --- | Ctrl+Shift+Alt+C | Ctrl+Shift+Alt+C | | ------------------------------------------------------------------------------------------------------------- -| KeyD | d | D | D | | -| Shift+KeyD | D | Shift+D | Shift+D | | -| Ctrl+Alt+KeyD | --- | Ctrl+Alt+D | Ctrl+Alt+D | | -| Ctrl+Shift+Alt+KeyD | --- | Ctrl+Shift+Alt+D | Ctrl+Shift+Alt+D | | ------------------------------------------------------------------------------------------------------------- -| KeyE | e | E | E | | -| Shift+KeyE | E | Shift+E | Shift+E | | -| Ctrl+Alt+KeyE | ° | Ctrl+Alt+E | Ctrl+Alt+E | | -| Ctrl+Shift+Alt+KeyE | --- | Ctrl+Shift+Alt+E | Ctrl+Shift+Alt+E | | ------------------------------------------------------------------------------------------------------------- -| KeyF | f | F | F | | -| Shift+KeyF | F | Shift+F | Shift+F | | -| Ctrl+Alt+KeyF | --- | Ctrl+Alt+F | Ctrl+Alt+F | | -| Ctrl+Shift+Alt+KeyF | --- | Ctrl+Shift+Alt+F | Ctrl+Shift+Alt+F | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyG | g | G | G | | -| Shift+KeyG | G | Shift+G | Shift+G | | -| Ctrl+Alt+KeyG | --- | Ctrl+Alt+G | Ctrl+Alt+G | | -| Ctrl+Shift+Alt+KeyG | --- | Ctrl+Shift+Alt+G | Ctrl+Shift+Alt+G | | ------------------------------------------------------------------------------------------------------------- -| KeyH | h | H | H | | -| Shift+KeyH | H | Shift+H | Shift+H | | -| Ctrl+Alt+KeyH | --- | Ctrl+Alt+H | Ctrl+Alt+H | | -| Ctrl+Shift+Alt+KeyH | --- | Ctrl+Shift+Alt+H | Ctrl+Shift+Alt+H | | ------------------------------------------------------------------------------------------------------------- -| KeyI | i | I | I | | -| Shift+KeyI | I | Shift+I | Shift+I | | -| Ctrl+Alt+KeyI | --- | Ctrl+Alt+I | Ctrl+Alt+I | | -| Ctrl+Shift+Alt+KeyI | --- | Ctrl+Shift+Alt+I | Ctrl+Shift+Alt+I | | ------------------------------------------------------------------------------------------------------------- -| KeyJ | j | J | J | | -| Shift+KeyJ | J | Shift+J | Shift+J | | -| Ctrl+Alt+KeyJ | --- | Ctrl+Alt+J | Ctrl+Alt+J | | -| Ctrl+Shift+Alt+KeyJ | --- | Ctrl+Shift+Alt+J | Ctrl+Shift+Alt+J | | ------------------------------------------------------------------------------------------------------------- -| KeyK | k | K | K | | -| Shift+KeyK | K | Shift+K | Shift+K | | -| Ctrl+Alt+KeyK | --- | Ctrl+Alt+K | Ctrl+Alt+K | | -| Ctrl+Shift+Alt+KeyK | --- | Ctrl+Shift+Alt+K | Ctrl+Shift+Alt+K | | ------------------------------------------------------------------------------------------------------------- -| KeyL | l | L | L | | -| Shift+KeyL | L | Shift+L | Shift+L | | -| Ctrl+Alt+KeyL | --- | Ctrl+Alt+L | Ctrl+Alt+L | | -| Ctrl+Shift+Alt+KeyL | --- | Ctrl+Shift+Alt+L | Ctrl+Shift+Alt+L | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyM | m | M | M | | -| Shift+KeyM | M | Shift+M | Shift+M | | -| Ctrl+Alt+KeyM | --- | Ctrl+Alt+M | Ctrl+Alt+M | | -| Ctrl+Shift+Alt+KeyM | --- | Ctrl+Shift+Alt+M | Ctrl+Shift+Alt+M | | ------------------------------------------------------------------------------------------------------------- -| KeyN | n | N | N | | -| Shift+KeyN | N | Shift+N | Shift+N | | -| Ctrl+Alt+KeyN | --- | Ctrl+Alt+N | Ctrl+Alt+N | | -| Ctrl+Shift+Alt+KeyN | --- | Ctrl+Shift+Alt+N | Ctrl+Shift+Alt+N | | ------------------------------------------------------------------------------------------------------------- -| KeyO | o | O | O | | -| Shift+KeyO | O | Shift+O | Shift+O | | -| Ctrl+Alt+KeyO | --- | Ctrl+Alt+O | Ctrl+Alt+O | | -| Ctrl+Shift+Alt+KeyO | --- | Ctrl+Shift+Alt+O | Ctrl+Shift+Alt+O | | ------------------------------------------------------------------------------------------------------------- -| KeyP | p | P | P | | -| Shift+KeyP | P | Shift+P | Shift+P | | -| Ctrl+Alt+KeyP | --- | Ctrl+Alt+P | Ctrl+Alt+P | | -| Ctrl+Shift+Alt+KeyP | --- | Ctrl+Shift+Alt+P | Ctrl+Shift+Alt+P | | ------------------------------------------------------------------------------------------------------------- -| KeyQ | q | Q | Q | | -| Shift+KeyQ | Q | Shift+Q | Shift+Q | | -| Ctrl+Alt+KeyQ | / | Ctrl+Alt+Q | Ctrl+Alt+Q | | -| Ctrl+Shift+Alt+KeyQ | --- | Ctrl+Shift+Alt+Q | Ctrl+Shift+Alt+Q | | ------------------------------------------------------------------------------------------------------------- -| KeyR | r | R | R | | -| Shift+KeyR | R | Shift+R | Shift+R | | -| Ctrl+Alt+KeyR | --- | Ctrl+Alt+R | Ctrl+Alt+R | | -| Ctrl+Shift+Alt+KeyR | --- | Ctrl+Shift+Alt+R | Ctrl+Shift+Alt+R | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyS | s | S | S | | -| Shift+KeyS | S | Shift+S | Shift+S | | -| Ctrl+Alt+KeyS | --- | Ctrl+Alt+S | Ctrl+Alt+S | | -| Ctrl+Shift+Alt+KeyS | --- | Ctrl+Shift+Alt+S | Ctrl+Shift+Alt+S | | ------------------------------------------------------------------------------------------------------------- -| KeyT | t | T | T | | -| Shift+KeyT | T | Shift+T | Shift+T | | -| Ctrl+Alt+KeyT | --- | Ctrl+Alt+T | Ctrl+Alt+T | | -| Ctrl+Shift+Alt+KeyT | --- | Ctrl+Shift+Alt+T | Ctrl+Shift+Alt+T | | ------------------------------------------------------------------------------------------------------------- -| KeyU | u | U | U | | -| Shift+KeyU | U | Shift+U | Shift+U | | -| Ctrl+Alt+KeyU | --- | Ctrl+Alt+U | Ctrl+Alt+U | | -| Ctrl+Shift+Alt+KeyU | --- | Ctrl+Shift+Alt+U | Ctrl+Shift+Alt+U | | ------------------------------------------------------------------------------------------------------------- -| KeyV | v | V | V | | -| Shift+KeyV | V | Shift+V | Shift+V | | -| Ctrl+Alt+KeyV | --- | Ctrl+Alt+V | Ctrl+Alt+V | | -| Ctrl+Shift+Alt+KeyV | --- | Ctrl+Shift+Alt+V | Ctrl+Shift+Alt+V | | ------------------------------------------------------------------------------------------------------------- -| KeyW | w | W | W | | -| Shift+KeyW | W | Shift+W | Shift+W | | -| Ctrl+Alt+KeyW | ? | Ctrl+Alt+W | Ctrl+Alt+W | | -| Ctrl+Shift+Alt+KeyW | --- | Ctrl+Shift+Alt+W | Ctrl+Shift+Alt+W | | ------------------------------------------------------------------------------------------------------------- -| KeyX | x | X | X | | -| Shift+KeyX | X | Shift+X | Shift+X | | -| Ctrl+Alt+KeyX | --- | Ctrl+Alt+X | Ctrl+Alt+X | | -| Ctrl+Shift+Alt+KeyX | --- | Ctrl+Shift+Alt+X | Ctrl+Shift+Alt+X | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyY | y | Y | Y | | -| Shift+KeyY | Y | Shift+Y | Shift+Y | | -| Ctrl+Alt+KeyY | --- | Ctrl+Alt+Y | Ctrl+Alt+Y | | -| Ctrl+Shift+Alt+KeyY | --- | Ctrl+Shift+Alt+Y | Ctrl+Shift+Alt+Y | | ------------------------------------------------------------------------------------------------------------- -| KeyZ | z | Z | Z | | -| Shift+KeyZ | Z | Shift+Z | Shift+Z | | -| Ctrl+Alt+KeyZ | --- | Ctrl+Alt+Z | Ctrl+Alt+Z | | -| Ctrl+Shift+Alt+KeyZ | --- | Ctrl+Shift+Alt+Z | Ctrl+Shift+Alt+Z | | ------------------------------------------------------------------------------------------------------------- -| Digit1 | 1 | 1 | 1 | | -| Shift+Digit1 | ! | Shift+1 | Shift+1 | | -| Ctrl+Alt+Digit1 | ¹ | Ctrl+Alt+1 | Ctrl+Alt+1 | | -| Ctrl+Shift+Alt+Digit1 | --- | Ctrl+Shift+Alt+1 | Ctrl+Shift+Alt+1 | | ------------------------------------------------------------------------------------------------------------- -| Digit2 | 2 | 2 | 2 | | -| Shift+Digit2 | @ | Shift+2 | Shift+2 | | -| Ctrl+Alt+Digit2 | ² | Ctrl+Alt+2 | Ctrl+Alt+2 | | -| Ctrl+Shift+Alt+Digit2 | --- | Ctrl+Shift+Alt+2 | Ctrl+Shift+Alt+2 | | ------------------------------------------------------------------------------------------------------------- -| Digit3 | 3 | 3 | 3 | | -| Shift+Digit3 | # | Shift+3 | Shift+3 | | -| Ctrl+Alt+Digit3 | ³ | Ctrl+Alt+3 | Ctrl+Alt+3 | | -| Ctrl+Shift+Alt+Digit3 | --- | Ctrl+Shift+Alt+3 | Ctrl+Shift+Alt+3 | | ------------------------------------------------------------------------------------------------------------- -| Digit4 | 4 | 4 | 4 | | -| Shift+Digit4 | $ | Shift+4 | Shift+4 | | -| Ctrl+Alt+Digit4 | £ | Ctrl+Alt+4 | Ctrl+Alt+4 | | -| Ctrl+Shift+Alt+Digit4 | --- | Ctrl+Shift+Alt+4 | Ctrl+Shift+Alt+4 | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| Digit5 | 5 | 5 | 5 | | -| Shift+Digit5 | % | Shift+5 | Shift+5 | | -| Ctrl+Alt+Digit5 | ¢ | Ctrl+Alt+5 | Ctrl+Alt+5 | | -| Ctrl+Shift+Alt+Digit5 | --- | Ctrl+Shift+Alt+5 | Ctrl+Shift+Alt+5 | | ------------------------------------------------------------------------------------------------------------- -| Digit6 | 6 | 6 | 6 | | -| Shift+Digit6 | ¨ | Shift+6 | Shift+6 | | -| Ctrl+Alt+Digit6 | ¬ | Ctrl+Alt+6 | Ctrl+Alt+6 | | -| Ctrl+Shift+Alt+Digit6 | --- | Ctrl+Shift+Alt+6 | Ctrl+Shift+Alt+6 | | ------------------------------------------------------------------------------------------------------------- -| Digit7 | 7 | 7 | 7 | | -| Shift+Digit7 | & | Shift+7 | Shift+7 | | -| Ctrl+Alt+Digit7 | --- | Ctrl+Alt+7 | Ctrl+Alt+7 | | -| Ctrl+Shift+Alt+Digit7 | --- | Ctrl+Shift+Alt+7 | Ctrl+Shift+Alt+7 | | ------------------------------------------------------------------------------------------------------------- -| Digit8 | 8 | 8 | 8 | | -| Shift+Digit8 | * | Shift+8 | Shift+8 | | -| Ctrl+Alt+Digit8 | --- | Ctrl+Alt+8 | Ctrl+Alt+8 | | -| Ctrl+Shift+Alt+Digit8 | --- | Ctrl+Shift+Alt+8 | Ctrl+Shift+Alt+8 | | ------------------------------------------------------------------------------------------------------------- -| Digit9 | 9 | 9 | 9 | | -| Shift+Digit9 | ( | Shift+9 | Shift+9 | | -| Ctrl+Alt+Digit9 | --- | Ctrl+Alt+9 | Ctrl+Alt+9 | | -| Ctrl+Shift+Alt+Digit9 | --- | Ctrl+Shift+Alt+9 | Ctrl+Shift+Alt+9 | | ------------------------------------------------------------------------------------------------------------- -| Digit0 | 0 | 0 | 0 | | -| Shift+Digit0 | ) | Shift+0 | Shift+0 | | -| Ctrl+Alt+Digit0 | --- | Ctrl+Alt+0 | Ctrl+Alt+0 | | -| Ctrl+Shift+Alt+Digit0 | --- | Ctrl+Shift+Alt+0 | Ctrl+Shift+Alt+0 | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| Minus | - | - | - | NO | -| Shift+Minus | _ | Shift+- | Shift+- | NO | -| Ctrl+Alt+Minus | --- | Ctrl+Alt+- | Ctrl+Alt+- | NO | -| Ctrl+Shift+Alt+Minus | --- | Ctrl+Shift+Alt+- | Ctrl+Shift+Alt+- | NO | ------------------------------------------------------------------------------------------------------------- -| Equal | = | = | = | NO | -| Shift+Equal | + | Shift+= | Shift+= | NO | -| Ctrl+Alt+Equal | § | Ctrl+Alt+= | Ctrl+Alt+= | NO | -| Ctrl+Shift+Alt+Equal | --- | Ctrl+Shift+Alt+= | Ctrl+Shift+Alt+= | NO | ------------------------------------------------------------------------------------------------------------- -| BracketLeft | ´ | [ | ´ | NO | -| Shift+BracketLeft | ` | Shift+[ | Shift+´ | NO | -| Ctrl+Alt+BracketLeft | --- | Ctrl+Alt+[ | Ctrl+Alt+´ | NO | -| Ctrl+Shift+Alt+BracketLeft | --- | Ctrl+Shift+Alt+[ | Ctrl+Shift+Alt+´ | NO | ------------------------------------------------------------------------------------------------------------- -| BracketRight | [ | ] | [ | NO | -| Shift+BracketRight | { | Shift+] | Shift+[ | NO | -| Ctrl+Alt+BracketRight | ª | Ctrl+Alt+] | Ctrl+Alt+[ | NO | -| Ctrl+Shift+Alt+BracketRight | --- | Ctrl+Shift+Alt+] | Ctrl+Shift+Alt+[ | NO | ------------------------------------------------------------------------------------------------------------- -| Backslash | ] | \ | ] | NO | -| Shift+Backslash | } | Shift+\ | Shift+] | NO | -| Ctrl+Alt+Backslash | º | Ctrl+Alt+\ | Ctrl+Alt+] | NO | -| Ctrl+Shift+Alt+Backslash | --- | Ctrl+Shift+Alt+\ | Ctrl+Shift+Alt+] | NO | ------------------------------------------------------------------------------------------------------------- -| IntlHash | --- | null | null | NO | -| Shift+IntlHash | --- | null | null | NO | -| Ctrl+Alt+IntlHash | --- | null | null | NO | -| Ctrl+Shift+Alt+IntlHash | --- | null | null | NO | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| Semicolon | ç | ; | ç | NO | -| Shift+Semicolon | Ç | Shift+; | Shift+ç | NO | -| Ctrl+Alt+Semicolon | --- | Ctrl+Alt+; | Ctrl+Alt+ç | NO | -| Ctrl+Shift+Alt+Semicolon | --- | Ctrl+Shift+Alt+; | Ctrl+Shift+Alt+ç | NO | ------------------------------------------------------------------------------------------------------------- -| Quote | ~ | ' | ~ | NO | -| Shift+Quote | ^ | Shift+' | Shift+~ | NO | -| Ctrl+Alt+Quote | --- | Ctrl+Alt+' | Ctrl+Alt+~ | NO | -| Ctrl+Shift+Alt+Quote | --- | Ctrl+Shift+Alt+' | Ctrl+Shift+Alt+~ | NO | ------------------------------------------------------------------------------------------------------------- -| Backquote | ' | ` | ' | NO | -| Shift+Backquote | " | Shift+` | Shift+' | NO | -| Ctrl+Alt+Backquote | --- | Ctrl+Alt+` | Ctrl+Alt+' | NO | -| Ctrl+Shift+Alt+Backquote | --- | Ctrl+Shift+Alt+` | Ctrl+Shift+Alt+' | NO | ------------------------------------------------------------------------------------------------------------- -| Comma | , | , | , | NO | -| Shift+Comma | < | Shift+, | Shift+, | NO | -| Ctrl+Alt+Comma | --- | Ctrl+Alt+, | Ctrl+Alt+, | NO | -| Ctrl+Shift+Alt+Comma | --- | Ctrl+Shift+Alt+, | Ctrl+Shift+Alt+, | NO | ------------------------------------------------------------------------------------------------------------- -| Period | . | . | . | NO | -| Shift+Period | > | Shift+. | Shift+. | NO | -| Ctrl+Alt+Period | --- | Ctrl+Alt+. | Ctrl+Alt+. | NO | -| Ctrl+Shift+Alt+Period | --- | Ctrl+Shift+Alt+. | Ctrl+Shift+Alt+. | NO | ------------------------------------------------------------------------------------------------------------- -| Slash | ; | / | ; | NO | -| Shift+Slash | : | Shift+/ | Shift+; | NO | -| Ctrl+Alt+Slash | --- | Ctrl+Alt+/ | Ctrl+Alt+; | NO | -| Ctrl+Shift+Alt+Slash | --- | Ctrl+Shift+Alt+/ | Ctrl+Shift+Alt+; | NO | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| ArrowUp | --- | UpArrow | UpArrow | | -| Shift+ArrowUp | --- | Shift+UpArrow | Shift+UpArrow | | -| Ctrl+Alt+ArrowUp | --- | Ctrl+Alt+UpArrow | Ctrl+Alt+UpArrow | | -| Ctrl+Shift+Alt+ArrowUp | --- | Ctrl+Shift+Alt+UpArrow | Ctrl+Shift+Alt+UpArrow | | ------------------------------------------------------------------------------------------------------------- -| Numpad0 | --- | NumPad0 | NumPad0 | | -| Shift+Numpad0 | --- | Shift+NumPad0 | Shift+NumPad0 | | -| Ctrl+Alt+Numpad0 | --- | Ctrl+Alt+NumPad0 | Ctrl+Alt+NumPad0 | | -| Ctrl+Shift+Alt+Numpad0 | --- | Ctrl+Shift+Alt+NumPad0 | Ctrl+Shift+Alt+NumPad0 | | ------------------------------------------------------------------------------------------------------------- -| IntlBackslash | \ | OEM_102 | \ | NO | -| Shift+IntlBackslash | | | Shift+OEM_102 | Shift+\ | NO | -| Ctrl+Alt+IntlBackslash | --- | Ctrl+Alt+OEM_102 | Ctrl+Alt+\ | NO | -| Ctrl+Shift+Alt+IntlBackslash | --- | Ctrl+Shift+Alt+OEM_102 | Ctrl+Shift+Alt+\ | NO | ------------------------------------------------------------------------------------------------------------- -| IntlRo | / | ABNT_C1 | / | NO | -| Shift+IntlRo | ? | Shift+ABNT_C1 | Shift+/ | NO | -| Ctrl+Alt+IntlRo | ° | Ctrl+Alt+ABNT_C1 | Ctrl+Alt+/ | NO | -| Ctrl+Shift+Alt+IntlRo | --- | Ctrl+Shift+Alt+ABNT_C1 | Ctrl+Shift+Alt+/ | NO | ------------------------------------------------------------------------------------------------------------- -| IntlYen | --- | null | null | NO | -| Shift+IntlYen | --- | null | null | NO | -| Ctrl+Alt+IntlYen | --- | null | null | NO | -| Ctrl+Shift+Alt+IntlYen | --- | null | null | NO | ------------------------------------------------------------------------------------------------------------- \ No newline at end of file +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyA | a | A | A | a | | +| Shift+KeyA | A | Shift+A | Shift+A | shift+a | | +| Ctrl+Alt+KeyA | --- | Ctrl+Alt+A | Ctrl+Alt+A | ctrl+alt+a | | +| Ctrl+Shift+Alt+KeyA | --- | Ctrl+Shift+Alt+A | Ctrl+Shift+Alt+A | ctrl+shift+alt+a | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyB | b | B | B | b | | +| Shift+KeyB | B | Shift+B | Shift+B | shift+b | | +| Ctrl+Alt+KeyB | --- | Ctrl+Alt+B | Ctrl+Alt+B | ctrl+alt+b | | +| Ctrl+Shift+Alt+KeyB | --- | Ctrl+Shift+Alt+B | Ctrl+Shift+Alt+B | ctrl+shift+alt+b | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyC | c | C | C | c | | +| Shift+KeyC | C | Shift+C | Shift+C | shift+c | | +| Ctrl+Alt+KeyC | ₢ | Ctrl+Alt+C | Ctrl+Alt+C | ctrl+alt+c | | +| Ctrl+Shift+Alt+KeyC | --- | Ctrl+Shift+Alt+C | Ctrl+Shift+Alt+C | ctrl+shift+alt+c | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyD | d | D | D | d | | +| Shift+KeyD | D | Shift+D | Shift+D | shift+d | | +| Ctrl+Alt+KeyD | --- | Ctrl+Alt+D | Ctrl+Alt+D | ctrl+alt+d | | +| Ctrl+Shift+Alt+KeyD | --- | Ctrl+Shift+Alt+D | Ctrl+Shift+Alt+D | ctrl+shift+alt+d | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyE | e | E | E | e | | +| Shift+KeyE | E | Shift+E | Shift+E | shift+e | | +| Ctrl+Alt+KeyE | ° | Ctrl+Alt+E | Ctrl+Alt+E | ctrl+alt+e | | +| Ctrl+Shift+Alt+KeyE | --- | Ctrl+Shift+Alt+E | Ctrl+Shift+Alt+E | ctrl+shift+alt+e | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyF | f | F | F | f | | +| Shift+KeyF | F | Shift+F | Shift+F | shift+f | | +| Ctrl+Alt+KeyF | --- | Ctrl+Alt+F | Ctrl+Alt+F | ctrl+alt+f | | +| Ctrl+Shift+Alt+KeyF | --- | Ctrl+Shift+Alt+F | Ctrl+Shift+Alt+F | ctrl+shift+alt+f | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyG | g | G | G | g | | +| Shift+KeyG | G | Shift+G | Shift+G | shift+g | | +| Ctrl+Alt+KeyG | --- | Ctrl+Alt+G | Ctrl+Alt+G | ctrl+alt+g | | +| Ctrl+Shift+Alt+KeyG | --- | Ctrl+Shift+Alt+G | Ctrl+Shift+Alt+G | ctrl+shift+alt+g | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyH | h | H | H | h | | +| Shift+KeyH | H | Shift+H | Shift+H | shift+h | | +| Ctrl+Alt+KeyH | --- | Ctrl+Alt+H | Ctrl+Alt+H | ctrl+alt+h | | +| Ctrl+Shift+Alt+KeyH | --- | Ctrl+Shift+Alt+H | Ctrl+Shift+Alt+H | ctrl+shift+alt+h | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyI | i | I | I | i | | +| Shift+KeyI | I | Shift+I | Shift+I | shift+i | | +| Ctrl+Alt+KeyI | --- | Ctrl+Alt+I | Ctrl+Alt+I | ctrl+alt+i | | +| Ctrl+Shift+Alt+KeyI | --- | Ctrl+Shift+Alt+I | Ctrl+Shift+Alt+I | ctrl+shift+alt+i | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyJ | j | J | J | j | | +| Shift+KeyJ | J | Shift+J | Shift+J | shift+j | | +| Ctrl+Alt+KeyJ | --- | Ctrl+Alt+J | Ctrl+Alt+J | ctrl+alt+j | | +| Ctrl+Shift+Alt+KeyJ | --- | Ctrl+Shift+Alt+J | Ctrl+Shift+Alt+J | ctrl+shift+alt+j | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyK | k | K | K | k | | +| Shift+KeyK | K | Shift+K | Shift+K | shift+k | | +| Ctrl+Alt+KeyK | --- | Ctrl+Alt+K | Ctrl+Alt+K | ctrl+alt+k | | +| Ctrl+Shift+Alt+KeyK | --- | Ctrl+Shift+Alt+K | Ctrl+Shift+Alt+K | ctrl+shift+alt+k | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyL | l | L | L | l | | +| Shift+KeyL | L | Shift+L | Shift+L | shift+l | | +| Ctrl+Alt+KeyL | --- | Ctrl+Alt+L | Ctrl+Alt+L | ctrl+alt+l | | +| Ctrl+Shift+Alt+KeyL | --- | Ctrl+Shift+Alt+L | Ctrl+Shift+Alt+L | ctrl+shift+alt+l | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyM | m | M | M | m | | +| Shift+KeyM | M | Shift+M | Shift+M | shift+m | | +| Ctrl+Alt+KeyM | --- | Ctrl+Alt+M | Ctrl+Alt+M | ctrl+alt+m | | +| Ctrl+Shift+Alt+KeyM | --- | Ctrl+Shift+Alt+M | Ctrl+Shift+Alt+M | ctrl+shift+alt+m | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyN | n | N | N | n | | +| Shift+KeyN | N | Shift+N | Shift+N | shift+n | | +| Ctrl+Alt+KeyN | --- | Ctrl+Alt+N | Ctrl+Alt+N | ctrl+alt+n | | +| Ctrl+Shift+Alt+KeyN | --- | Ctrl+Shift+Alt+N | Ctrl+Shift+Alt+N | ctrl+shift+alt+n | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyO | o | O | O | o | | +| Shift+KeyO | O | Shift+O | Shift+O | shift+o | | +| Ctrl+Alt+KeyO | --- | Ctrl+Alt+O | Ctrl+Alt+O | ctrl+alt+o | | +| Ctrl+Shift+Alt+KeyO | --- | Ctrl+Shift+Alt+O | Ctrl+Shift+Alt+O | ctrl+shift+alt+o | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyP | p | P | P | p | | +| Shift+KeyP | P | Shift+P | Shift+P | shift+p | | +| Ctrl+Alt+KeyP | --- | Ctrl+Alt+P | Ctrl+Alt+P | ctrl+alt+p | | +| Ctrl+Shift+Alt+KeyP | --- | Ctrl+Shift+Alt+P | Ctrl+Shift+Alt+P | ctrl+shift+alt+p | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyQ | q | Q | Q | q | | +| Shift+KeyQ | Q | Shift+Q | Shift+Q | shift+q | | +| Ctrl+Alt+KeyQ | / | Ctrl+Alt+Q | Ctrl+Alt+Q | ctrl+alt+q | | +| Ctrl+Shift+Alt+KeyQ | --- | Ctrl+Shift+Alt+Q | Ctrl+Shift+Alt+Q | ctrl+shift+alt+q | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyR | r | R | R | r | | +| Shift+KeyR | R | Shift+R | Shift+R | shift+r | | +| Ctrl+Alt+KeyR | --- | Ctrl+Alt+R | Ctrl+Alt+R | ctrl+alt+r | | +| Ctrl+Shift+Alt+KeyR | --- | Ctrl+Shift+Alt+R | Ctrl+Shift+Alt+R | ctrl+shift+alt+r | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyS | s | S | S | s | | +| Shift+KeyS | S | Shift+S | Shift+S | shift+s | | +| Ctrl+Alt+KeyS | --- | Ctrl+Alt+S | Ctrl+Alt+S | ctrl+alt+s | | +| Ctrl+Shift+Alt+KeyS | --- | Ctrl+Shift+Alt+S | Ctrl+Shift+Alt+S | ctrl+shift+alt+s | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyT | t | T | T | t | | +| Shift+KeyT | T | Shift+T | Shift+T | shift+t | | +| Ctrl+Alt+KeyT | --- | Ctrl+Alt+T | Ctrl+Alt+T | ctrl+alt+t | | +| Ctrl+Shift+Alt+KeyT | --- | Ctrl+Shift+Alt+T | Ctrl+Shift+Alt+T | ctrl+shift+alt+t | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyU | u | U | U | u | | +| Shift+KeyU | U | Shift+U | Shift+U | shift+u | | +| Ctrl+Alt+KeyU | --- | Ctrl+Alt+U | Ctrl+Alt+U | ctrl+alt+u | | +| Ctrl+Shift+Alt+KeyU | --- | Ctrl+Shift+Alt+U | Ctrl+Shift+Alt+U | ctrl+shift+alt+u | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyV | v | V | V | v | | +| Shift+KeyV | V | Shift+V | Shift+V | shift+v | | +| Ctrl+Alt+KeyV | --- | Ctrl+Alt+V | Ctrl+Alt+V | ctrl+alt+v | | +| Ctrl+Shift+Alt+KeyV | --- | Ctrl+Shift+Alt+V | Ctrl+Shift+Alt+V | ctrl+shift+alt+v | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyW | w | W | W | w | | +| Shift+KeyW | W | Shift+W | Shift+W | shift+w | | +| Ctrl+Alt+KeyW | ? | Ctrl+Alt+W | Ctrl+Alt+W | ctrl+alt+w | | +| Ctrl+Shift+Alt+KeyW | --- | Ctrl+Shift+Alt+W | Ctrl+Shift+Alt+W | ctrl+shift+alt+w | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyX | x | X | X | x | | +| Shift+KeyX | X | Shift+X | Shift+X | shift+x | | +| Ctrl+Alt+KeyX | --- | Ctrl+Alt+X | Ctrl+Alt+X | ctrl+alt+x | | +| Ctrl+Shift+Alt+KeyX | --- | Ctrl+Shift+Alt+X | Ctrl+Shift+Alt+X | ctrl+shift+alt+x | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyY | y | Y | Y | y | | +| Shift+KeyY | Y | Shift+Y | Shift+Y | shift+y | | +| Ctrl+Alt+KeyY | --- | Ctrl+Alt+Y | Ctrl+Alt+Y | ctrl+alt+y | | +| Ctrl+Shift+Alt+KeyY | --- | Ctrl+Shift+Alt+Y | Ctrl+Shift+Alt+Y | ctrl+shift+alt+y | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyZ | z | Z | Z | z | | +| Shift+KeyZ | Z | Shift+Z | Shift+Z | shift+z | | +| Ctrl+Alt+KeyZ | --- | Ctrl+Alt+Z | Ctrl+Alt+Z | ctrl+alt+z | | +| Ctrl+Shift+Alt+KeyZ | --- | Ctrl+Shift+Alt+Z | Ctrl+Shift+Alt+Z | ctrl+shift+alt+z | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit1 | 1 | 1 | 1 | 1 | | +| Shift+Digit1 | ! | Shift+1 | Shift+1 | shift+1 | | +| Ctrl+Alt+Digit1 | ¹ | Ctrl+Alt+1 | Ctrl+Alt+1 | ctrl+alt+1 | | +| Ctrl+Shift+Alt+Digit1 | --- | Ctrl+Shift+Alt+1 | Ctrl+Shift+Alt+1 | ctrl+shift+alt+1 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit2 | 2 | 2 | 2 | 2 | | +| Shift+Digit2 | @ | Shift+2 | Shift+2 | shift+2 | | +| Ctrl+Alt+Digit2 | ² | Ctrl+Alt+2 | Ctrl+Alt+2 | ctrl+alt+2 | | +| Ctrl+Shift+Alt+Digit2 | --- | Ctrl+Shift+Alt+2 | Ctrl+Shift+Alt+2 | ctrl+shift+alt+2 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit3 | 3 | 3 | 3 | 3 | | +| Shift+Digit3 | # | Shift+3 | Shift+3 | shift+3 | | +| Ctrl+Alt+Digit3 | ³ | Ctrl+Alt+3 | Ctrl+Alt+3 | ctrl+alt+3 | | +| Ctrl+Shift+Alt+Digit3 | --- | Ctrl+Shift+Alt+3 | Ctrl+Shift+Alt+3 | ctrl+shift+alt+3 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit4 | 4 | 4 | 4 | 4 | | +| Shift+Digit4 | $ | Shift+4 | Shift+4 | shift+4 | | +| Ctrl+Alt+Digit4 | £ | Ctrl+Alt+4 | Ctrl+Alt+4 | ctrl+alt+4 | | +| Ctrl+Shift+Alt+Digit4 | --- | Ctrl+Shift+Alt+4 | Ctrl+Shift+Alt+4 | ctrl+shift+alt+4 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit5 | 5 | 5 | 5 | 5 | | +| Shift+Digit5 | % | Shift+5 | Shift+5 | shift+5 | | +| Ctrl+Alt+Digit5 | ¢ | Ctrl+Alt+5 | Ctrl+Alt+5 | ctrl+alt+5 | | +| Ctrl+Shift+Alt+Digit5 | --- | Ctrl+Shift+Alt+5 | Ctrl+Shift+Alt+5 | ctrl+shift+alt+5 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit6 | 6 | 6 | 6 | 6 | | +| Shift+Digit6 | ¨ | Shift+6 | Shift+6 | shift+6 | | +| Ctrl+Alt+Digit6 | ¬ | Ctrl+Alt+6 | Ctrl+Alt+6 | ctrl+alt+6 | | +| Ctrl+Shift+Alt+Digit6 | --- | Ctrl+Shift+Alt+6 | Ctrl+Shift+Alt+6 | ctrl+shift+alt+6 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit7 | 7 | 7 | 7 | 7 | | +| Shift+Digit7 | & | Shift+7 | Shift+7 | shift+7 | | +| Ctrl+Alt+Digit7 | --- | Ctrl+Alt+7 | Ctrl+Alt+7 | ctrl+alt+7 | | +| Ctrl+Shift+Alt+Digit7 | --- | Ctrl+Shift+Alt+7 | Ctrl+Shift+Alt+7 | ctrl+shift+alt+7 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit8 | 8 | 8 | 8 | 8 | | +| Shift+Digit8 | * | Shift+8 | Shift+8 | shift+8 | | +| Ctrl+Alt+Digit8 | --- | Ctrl+Alt+8 | Ctrl+Alt+8 | ctrl+alt+8 | | +| Ctrl+Shift+Alt+Digit8 | --- | Ctrl+Shift+Alt+8 | Ctrl+Shift+Alt+8 | ctrl+shift+alt+8 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit9 | 9 | 9 | 9 | 9 | | +| Shift+Digit9 | ( | Shift+9 | Shift+9 | shift+9 | | +| Ctrl+Alt+Digit9 | --- | Ctrl+Alt+9 | Ctrl+Alt+9 | ctrl+alt+9 | | +| Ctrl+Shift+Alt+Digit9 | --- | Ctrl+Shift+Alt+9 | Ctrl+Shift+Alt+9 | ctrl+shift+alt+9 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit0 | 0 | 0 | 0 | 0 | | +| Shift+Digit0 | ) | Shift+0 | Shift+0 | shift+0 | | +| Ctrl+Alt+Digit0 | --- | Ctrl+Alt+0 | Ctrl+Alt+0 | ctrl+alt+0 | | +| Ctrl+Shift+Alt+Digit0 | --- | Ctrl+Shift+Alt+0 | Ctrl+Shift+Alt+0 | ctrl+shift+alt+0 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| Minus | - | - | - | oem_minus | NO | +| Shift+Minus | _ | Shift+- | Shift+- | shift+oem_minus | NO | +| Ctrl+Alt+Minus | --- | Ctrl+Alt+- | Ctrl+Alt+- | ctrl+alt+oem_minus | NO | +| Ctrl+Shift+Alt+Minus | --- | Ctrl+Shift+Alt+- | Ctrl+Shift+Alt+- | ctrl+shift+alt+oem_minus | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Equal | = | = | = | oem_plus | NO | +| Shift+Equal | + | Shift+= | Shift+= | shift+oem_plus | NO | +| Ctrl+Alt+Equal | § | Ctrl+Alt+= | Ctrl+Alt+= | ctrl+alt+oem_plus | NO | +| Ctrl+Shift+Alt+Equal | --- | Ctrl+Shift+Alt+= | Ctrl+Shift+Alt+= | ctrl+shift+alt+oem_plus | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| BracketLeft | ´ | [ | ´ | oem_4 | NO | +| Shift+BracketLeft | ` | Shift+[ | Shift+´ | shift+oem_4 | NO | +| Ctrl+Alt+BracketLeft | --- | Ctrl+Alt+[ | Ctrl+Alt+´ | ctrl+alt+oem_4 | NO | +| Ctrl+Shift+Alt+BracketLeft | --- | Ctrl+Shift+Alt+[ | Ctrl+Shift+Alt+´ | ctrl+shift+alt+oem_4 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| BracketRight | [ | ] | [ | oem_6 | NO | +| Shift+BracketRight | { | Shift+] | Shift+[ | shift+oem_6 | NO | +| Ctrl+Alt+BracketRight | ª | Ctrl+Alt+] | Ctrl+Alt+[ | ctrl+alt+oem_6 | NO | +| Ctrl+Shift+Alt+BracketRight | --- | Ctrl+Shift+Alt+] | Ctrl+Shift+Alt+[ | ctrl+shift+alt+oem_6 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Backslash | ] | \ | ] | oem_5 | NO | +| Shift+Backslash | } | Shift+\ | Shift+] | shift+oem_5 | NO | +| Ctrl+Alt+Backslash | º | Ctrl+Alt+\ | Ctrl+Alt+] | ctrl+alt+oem_5 | NO | +| Ctrl+Shift+Alt+Backslash | --- | Ctrl+Shift+Alt+\ | Ctrl+Shift+Alt+] | ctrl+shift+alt+oem_5 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| IntlHash | --- | null | null | null | NO | +| Shift+IntlHash | --- | null | null | null | NO | +| Ctrl+Alt+IntlHash | --- | null | null | null | NO | +| Ctrl+Shift+Alt+IntlHash | --- | null | null | null | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| Semicolon | ç | ; | ç | oem_1 | NO | +| Shift+Semicolon | Ç | Shift+; | Shift+ç | shift+oem_1 | NO | +| Ctrl+Alt+Semicolon | --- | Ctrl+Alt+; | Ctrl+Alt+ç | ctrl+alt+oem_1 | NO | +| Ctrl+Shift+Alt+Semicolon | --- | Ctrl+Shift+Alt+; | Ctrl+Shift+Alt+ç | ctrl+shift+alt+oem_1 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Quote | ~ | ' | ~ | oem_7 | NO | +| Shift+Quote | ^ | Shift+' | Shift+~ | shift+oem_7 | NO | +| Ctrl+Alt+Quote | --- | Ctrl+Alt+' | Ctrl+Alt+~ | ctrl+alt+oem_7 | NO | +| Ctrl+Shift+Alt+Quote | --- | Ctrl+Shift+Alt+' | Ctrl+Shift+Alt+~ | ctrl+shift+alt+oem_7 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Backquote | ' | ` | ' | oem_3 | NO | +| Shift+Backquote | " | Shift+` | Shift+' | shift+oem_3 | NO | +| Ctrl+Alt+Backquote | --- | Ctrl+Alt+` | Ctrl+Alt+' | ctrl+alt+oem_3 | NO | +| Ctrl+Shift+Alt+Backquote | --- | Ctrl+Shift+Alt+` | Ctrl+Shift+Alt+' | ctrl+shift+alt+oem_3 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Comma | , | , | , | oem_comma | NO | +| Shift+Comma | < | Shift+, | Shift+, | shift+oem_comma | NO | +| Ctrl+Alt+Comma | --- | Ctrl+Alt+, | Ctrl+Alt+, | ctrl+alt+oem_comma | NO | +| Ctrl+Shift+Alt+Comma | --- | Ctrl+Shift+Alt+, | Ctrl+Shift+Alt+, | ctrl+shift+alt+oem_comma | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Period | . | . | . | oem_period | NO | +| Shift+Period | > | Shift+. | Shift+. | shift+oem_period | NO | +| Ctrl+Alt+Period | --- | Ctrl+Alt+. | Ctrl+Alt+. | ctrl+alt+oem_period | NO | +| Ctrl+Shift+Alt+Period | --- | Ctrl+Shift+Alt+. | Ctrl+Shift+Alt+. | ctrl+shift+alt+oem_period | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Slash | ; | / | ; | oem_2 | NO | +| Shift+Slash | : | Shift+/ | Shift+; | shift+oem_2 | NO | +| Ctrl+Alt+Slash | --- | Ctrl+Alt+/ | Ctrl+Alt+; | ctrl+alt+oem_2 | NO | +| Ctrl+Shift+Alt+Slash | --- | Ctrl+Shift+Alt+/ | Ctrl+Shift+Alt+; | ctrl+shift+alt+oem_2 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| ArrowUp | --- | UpArrow | UpArrow | up | | +| Shift+ArrowUp | --- | Shift+UpArrow | Shift+UpArrow | shift+up | | +| Ctrl+Alt+ArrowUp | --- | Ctrl+Alt+UpArrow | Ctrl+Alt+UpArrow | ctrl+alt+up | | +| Ctrl+Shift+Alt+ArrowUp | --- | Ctrl+Shift+Alt+UpArrow | Ctrl+Shift+Alt+UpArrow | ctrl+shift+alt+up | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Numpad0 | --- | NumPad0 | NumPad0 | numpad0 | | +| Shift+Numpad0 | --- | Shift+NumPad0 | Shift+NumPad0 | shift+numpad0 | | +| Ctrl+Alt+Numpad0 | --- | Ctrl+Alt+NumPad0 | Ctrl+Alt+NumPad0 | ctrl+alt+numpad0 | | +| Ctrl+Shift+Alt+Numpad0 | --- | Ctrl+Shift+Alt+NumPad0 | Ctrl+Shift+Alt+NumPad0 | ctrl+shift+alt+numpad0 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| IntlBackslash | \ | OEM_102 | \ | oem_102 | NO | +| Shift+IntlBackslash | | | Shift+OEM_102 | Shift+\ | shift+oem_102 | NO | +| Ctrl+Alt+IntlBackslash | --- | Ctrl+Alt+OEM_102 | Ctrl+Alt+\ | ctrl+alt+oem_102 | NO | +| Ctrl+Shift+Alt+IntlBackslash | --- | Ctrl+Shift+Alt+OEM_102 | Ctrl+Shift+Alt+\ | ctrl+shift+alt+oem_102 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| IntlRo | / | ABNT_C1 | / | abnt_c1 | NO | +| Shift+IntlRo | ? | Shift+ABNT_C1 | Shift+/ | shift+abnt_c1 | NO | +| Ctrl+Alt+IntlRo | ° | Ctrl+Alt+ABNT_C1 | Ctrl+Alt+/ | ctrl+alt+abnt_c1 | NO | +| Ctrl+Shift+Alt+IntlRo | --- | Ctrl+Shift+Alt+ABNT_C1 | Ctrl+Shift+Alt+/ | ctrl+shift+alt+abnt_c1 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| IntlYen | --- | null | null | null | NO | +| Shift+IntlYen | --- | null | null | null | NO | +| Ctrl+Alt+IntlYen | --- | null | null | null | NO | +| Ctrl+Shift+Alt+IntlYen | --- | null | null | null | NO | +----------------------------------------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/src/vs/workbench/services/keybinding/test/win_ru.txt b/src/vs/workbench/services/keybinding/test/win_ru.txt index d3872618cd9ed..5ea3c8575df1f 100644 --- a/src/vs/workbench/services/keybinding/test/win_ru.txt +++ b/src/vs/workbench/services/keybinding/test/win_ru.txt @@ -1,284 +1,284 @@ ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyA | ф | A | ф | NO | -| Shift+KeyA | Ф | Shift+A | Shift+ф | NO | -| Ctrl+Alt+KeyA | --- | Ctrl+Alt+A | Ctrl+Alt+ф | NO | -| Ctrl+Shift+Alt+KeyA | --- | Ctrl+Shift+Alt+A | Ctrl+Shift+Alt+ф | NO | ------------------------------------------------------------------------------------------------------------- -| KeyB | и | B | и | NO | -| Shift+KeyB | И | Shift+B | Shift+и | NO | -| Ctrl+Alt+KeyB | --- | Ctrl+Alt+B | Ctrl+Alt+и | NO | -| Ctrl+Shift+Alt+KeyB | --- | Ctrl+Shift+Alt+B | Ctrl+Shift+Alt+и | NO | ------------------------------------------------------------------------------------------------------------- -| KeyC | с | C | с | NO | -| Shift+KeyC | С | Shift+C | Shift+с | NO | -| Ctrl+Alt+KeyC | --- | Ctrl+Alt+C | Ctrl+Alt+с | NO | -| Ctrl+Shift+Alt+KeyC | --- | Ctrl+Shift+Alt+C | Ctrl+Shift+Alt+с | NO | ------------------------------------------------------------------------------------------------------------- -| KeyD | в | D | в | NO | -| Shift+KeyD | В | Shift+D | Shift+в | NO | -| Ctrl+Alt+KeyD | --- | Ctrl+Alt+D | Ctrl+Alt+в | NO | -| Ctrl+Shift+Alt+KeyD | --- | Ctrl+Shift+Alt+D | Ctrl+Shift+Alt+в | NO | ------------------------------------------------------------------------------------------------------------- -| KeyE | у | E | у | NO | -| Shift+KeyE | У | Shift+E | Shift+у | NO | -| Ctrl+Alt+KeyE | --- | Ctrl+Alt+E | Ctrl+Alt+у | NO | -| Ctrl+Shift+Alt+KeyE | --- | Ctrl+Shift+Alt+E | Ctrl+Shift+Alt+у | NO | ------------------------------------------------------------------------------------------------------------- -| KeyF | а | F | а | NO | -| Shift+KeyF | А | Shift+F | Shift+а | NO | -| Ctrl+Alt+KeyF | --- | Ctrl+Alt+F | Ctrl+Alt+а | NO | -| Ctrl+Shift+Alt+KeyF | --- | Ctrl+Shift+Alt+F | Ctrl+Shift+Alt+а | NO | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyG | п | G | п | NO | -| Shift+KeyG | П | Shift+G | Shift+п | NO | -| Ctrl+Alt+KeyG | --- | Ctrl+Alt+G | Ctrl+Alt+п | NO | -| Ctrl+Shift+Alt+KeyG | --- | Ctrl+Shift+Alt+G | Ctrl+Shift+Alt+п | NO | ------------------------------------------------------------------------------------------------------------- -| KeyH | р | H | р | NO | -| Shift+KeyH | Р | Shift+H | Shift+р | NO | -| Ctrl+Alt+KeyH | --- | Ctrl+Alt+H | Ctrl+Alt+р | NO | -| Ctrl+Shift+Alt+KeyH | --- | Ctrl+Shift+Alt+H | Ctrl+Shift+Alt+р | NO | ------------------------------------------------------------------------------------------------------------- -| KeyI | ш | I | ш | NO | -| Shift+KeyI | Ш | Shift+I | Shift+ш | NO | -| Ctrl+Alt+KeyI | --- | Ctrl+Alt+I | Ctrl+Alt+ш | NO | -| Ctrl+Shift+Alt+KeyI | --- | Ctrl+Shift+Alt+I | Ctrl+Shift+Alt+ш | NO | ------------------------------------------------------------------------------------------------------------- -| KeyJ | о | J | о | NO | -| Shift+KeyJ | О | Shift+J | Shift+о | NO | -| Ctrl+Alt+KeyJ | --- | Ctrl+Alt+J | Ctrl+Alt+о | NO | -| Ctrl+Shift+Alt+KeyJ | --- | Ctrl+Shift+Alt+J | Ctrl+Shift+Alt+о | NO | ------------------------------------------------------------------------------------------------------------- -| KeyK | л | K | л | NO | -| Shift+KeyK | Л | Shift+K | Shift+л | NO | -| Ctrl+Alt+KeyK | --- | Ctrl+Alt+K | Ctrl+Alt+л | NO | -| Ctrl+Shift+Alt+KeyK | --- | Ctrl+Shift+Alt+K | Ctrl+Shift+Alt+л | NO | ------------------------------------------------------------------------------------------------------------- -| KeyL | д | L | д | NO | -| Shift+KeyL | Д | Shift+L | Shift+д | NO | -| Ctrl+Alt+KeyL | --- | Ctrl+Alt+L | Ctrl+Alt+д | NO | -| Ctrl+Shift+Alt+KeyL | --- | Ctrl+Shift+Alt+L | Ctrl+Shift+Alt+д | NO | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyM | ь | M | ь | NO | -| Shift+KeyM | Ь | Shift+M | Shift+ь | NO | -| Ctrl+Alt+KeyM | --- | Ctrl+Alt+M | Ctrl+Alt+ь | NO | -| Ctrl+Shift+Alt+KeyM | --- | Ctrl+Shift+Alt+M | Ctrl+Shift+Alt+ь | NO | ------------------------------------------------------------------------------------------------------------- -| KeyN | т | N | т | NO | -| Shift+KeyN | Т | Shift+N | Shift+т | NO | -| Ctrl+Alt+KeyN | --- | Ctrl+Alt+N | Ctrl+Alt+т | NO | -| Ctrl+Shift+Alt+KeyN | --- | Ctrl+Shift+Alt+N | Ctrl+Shift+Alt+т | NO | ------------------------------------------------------------------------------------------------------------- -| KeyO | щ | O | щ | NO | -| Shift+KeyO | Щ | Shift+O | Shift+щ | NO | -| Ctrl+Alt+KeyO | --- | Ctrl+Alt+O | Ctrl+Alt+щ | NO | -| Ctrl+Shift+Alt+KeyO | --- | Ctrl+Shift+Alt+O | Ctrl+Shift+Alt+щ | NO | ------------------------------------------------------------------------------------------------------------- -| KeyP | з | P | з | NO | -| Shift+KeyP | З | Shift+P | Shift+з | NO | -| Ctrl+Alt+KeyP | --- | Ctrl+Alt+P | Ctrl+Alt+з | NO | -| Ctrl+Shift+Alt+KeyP | --- | Ctrl+Shift+Alt+P | Ctrl+Shift+Alt+з | NO | ------------------------------------------------------------------------------------------------------------- -| KeyQ | й | Q | й | NO | -| Shift+KeyQ | Й | Shift+Q | Shift+й | NO | -| Ctrl+Alt+KeyQ | --- | Ctrl+Alt+Q | Ctrl+Alt+й | NO | -| Ctrl+Shift+Alt+KeyQ | --- | Ctrl+Shift+Alt+Q | Ctrl+Shift+Alt+й | NO | ------------------------------------------------------------------------------------------------------------- -| KeyR | к | R | к | NO | -| Shift+KeyR | К | Shift+R | Shift+к | NO | -| Ctrl+Alt+KeyR | --- | Ctrl+Alt+R | Ctrl+Alt+к | NO | -| Ctrl+Shift+Alt+KeyR | --- | Ctrl+Shift+Alt+R | Ctrl+Shift+Alt+к | NO | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyS | ы | S | ы | NO | -| Shift+KeyS | Ы | Shift+S | Shift+ы | NO | -| Ctrl+Alt+KeyS | --- | Ctrl+Alt+S | Ctrl+Alt+ы | NO | -| Ctrl+Shift+Alt+KeyS | --- | Ctrl+Shift+Alt+S | Ctrl+Shift+Alt+ы | NO | ------------------------------------------------------------------------------------------------------------- -| KeyT | е | T | е | NO | -| Shift+KeyT | Е | Shift+T | Shift+е | NO | -| Ctrl+Alt+KeyT | --- | Ctrl+Alt+T | Ctrl+Alt+е | NO | -| Ctrl+Shift+Alt+KeyT | --- | Ctrl+Shift+Alt+T | Ctrl+Shift+Alt+е | NO | ------------------------------------------------------------------------------------------------------------- -| KeyU | г | U | г | NO | -| Shift+KeyU | Г | Shift+U | Shift+г | NO | -| Ctrl+Alt+KeyU | --- | Ctrl+Alt+U | Ctrl+Alt+г | NO | -| Ctrl+Shift+Alt+KeyU | --- | Ctrl+Shift+Alt+U | Ctrl+Shift+Alt+г | NO | ------------------------------------------------------------------------------------------------------------- -| KeyV | м | V | м | NO | -| Shift+KeyV | М | Shift+V | Shift+м | NO | -| Ctrl+Alt+KeyV | --- | Ctrl+Alt+V | Ctrl+Alt+м | NO | -| Ctrl+Shift+Alt+KeyV | --- | Ctrl+Shift+Alt+V | Ctrl+Shift+Alt+м | NO | ------------------------------------------------------------------------------------------------------------- -| KeyW | ц | W | ц | NO | -| Shift+KeyW | Ц | Shift+W | Shift+ц | NO | -| Ctrl+Alt+KeyW | --- | Ctrl+Alt+W | Ctrl+Alt+ц | NO | -| Ctrl+Shift+Alt+KeyW | --- | Ctrl+Shift+Alt+W | Ctrl+Shift+Alt+ц | NO | ------------------------------------------------------------------------------------------------------------- -| KeyX | ч | X | ч | NO | -| Shift+KeyX | Ч | Shift+X | Shift+ч | NO | -| Ctrl+Alt+KeyX | --- | Ctrl+Alt+X | Ctrl+Alt+ч | NO | -| Ctrl+Shift+Alt+KeyX | --- | Ctrl+Shift+Alt+X | Ctrl+Shift+Alt+ч | NO | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| KeyY | н | Y | н | NO | -| Shift+KeyY | Н | Shift+Y | Shift+н | NO | -| Ctrl+Alt+KeyY | --- | Ctrl+Alt+Y | Ctrl+Alt+н | NO | -| Ctrl+Shift+Alt+KeyY | --- | Ctrl+Shift+Alt+Y | Ctrl+Shift+Alt+н | NO | ------------------------------------------------------------------------------------------------------------- -| KeyZ | я | Z | я | NO | -| Shift+KeyZ | Я | Shift+Z | Shift+я | NO | -| Ctrl+Alt+KeyZ | --- | Ctrl+Alt+Z | Ctrl+Alt+я | NO | -| Ctrl+Shift+Alt+KeyZ | --- | Ctrl+Shift+Alt+Z | Ctrl+Shift+Alt+я | NO | ------------------------------------------------------------------------------------------------------------- -| Digit1 | 1 | 1 | 1 | | -| Shift+Digit1 | ! | Shift+1 | Shift+1 | | -| Ctrl+Alt+Digit1 | --- | Ctrl+Alt+1 | Ctrl+Alt+1 | | -| Ctrl+Shift+Alt+Digit1 | --- | Ctrl+Shift+Alt+1 | Ctrl+Shift+Alt+1 | | ------------------------------------------------------------------------------------------------------------- -| Digit2 | 2 | 2 | 2 | | -| Shift+Digit2 | " | Shift+2 | Shift+2 | | -| Ctrl+Alt+Digit2 | --- | Ctrl+Alt+2 | Ctrl+Alt+2 | | -| Ctrl+Shift+Alt+Digit2 | --- | Ctrl+Shift+Alt+2 | Ctrl+Shift+Alt+2 | | ------------------------------------------------------------------------------------------------------------- -| Digit3 | 3 | 3 | 3 | | -| Shift+Digit3 | № | Shift+3 | Shift+3 | | -| Ctrl+Alt+Digit3 | --- | Ctrl+Alt+3 | Ctrl+Alt+3 | | -| Ctrl+Shift+Alt+Digit3 | --- | Ctrl+Shift+Alt+3 | Ctrl+Shift+Alt+3 | | ------------------------------------------------------------------------------------------------------------- -| Digit4 | 4 | 4 | 4 | | -| Shift+Digit4 | ; | Shift+4 | Shift+4 | | -| Ctrl+Alt+Digit4 | --- | Ctrl+Alt+4 | Ctrl+Alt+4 | | -| Ctrl+Shift+Alt+Digit4 | --- | Ctrl+Shift+Alt+4 | Ctrl+Shift+Alt+4 | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| Digit5 | 5 | 5 | 5 | | -| Shift+Digit5 | % | Shift+5 | Shift+5 | | -| Ctrl+Alt+Digit5 | --- | Ctrl+Alt+5 | Ctrl+Alt+5 | | -| Ctrl+Shift+Alt+Digit5 | --- | Ctrl+Shift+Alt+5 | Ctrl+Shift+Alt+5 | | ------------------------------------------------------------------------------------------------------------- -| Digit6 | 6 | 6 | 6 | | -| Shift+Digit6 | : | Shift+6 | Shift+6 | | -| Ctrl+Alt+Digit6 | --- | Ctrl+Alt+6 | Ctrl+Alt+6 | | -| Ctrl+Shift+Alt+Digit6 | --- | Ctrl+Shift+Alt+6 | Ctrl+Shift+Alt+6 | | ------------------------------------------------------------------------------------------------------------- -| Digit7 | 7 | 7 | 7 | | -| Shift+Digit7 | ? | Shift+7 | Shift+7 | | -| Ctrl+Alt+Digit7 | --- | Ctrl+Alt+7 | Ctrl+Alt+7 | | -| Ctrl+Shift+Alt+Digit7 | --- | Ctrl+Shift+Alt+7 | Ctrl+Shift+Alt+7 | | ------------------------------------------------------------------------------------------------------------- -| Digit8 | 8 | 8 | 8 | | -| Shift+Digit8 | * | Shift+8 | Shift+8 | | -| Ctrl+Alt+Digit8 | ₽ | Ctrl+Alt+8 | Ctrl+Alt+8 | | -| Ctrl+Shift+Alt+Digit8 | --- | Ctrl+Shift+Alt+8 | Ctrl+Shift+Alt+8 | | ------------------------------------------------------------------------------------------------------------- -| Digit9 | 9 | 9 | 9 | | -| Shift+Digit9 | ( | Shift+9 | Shift+9 | | -| Ctrl+Alt+Digit9 | --- | Ctrl+Alt+9 | Ctrl+Alt+9 | | -| Ctrl+Shift+Alt+Digit9 | --- | Ctrl+Shift+Alt+9 | Ctrl+Shift+Alt+9 | | ------------------------------------------------------------------------------------------------------------- -| Digit0 | 0 | 0 | 0 | | -| Shift+Digit0 | ) | Shift+0 | Shift+0 | | -| Ctrl+Alt+Digit0 | --- | Ctrl+Alt+0 | Ctrl+Alt+0 | | -| Ctrl+Shift+Alt+Digit0 | --- | Ctrl+Shift+Alt+0 | Ctrl+Shift+Alt+0 | | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| Minus | - | - | - | NO | -| Shift+Minus | _ | Shift+- | Shift+- | NO | -| Ctrl+Alt+Minus | --- | Ctrl+Alt+- | Ctrl+Alt+- | NO | -| Ctrl+Shift+Alt+Minus | --- | Ctrl+Shift+Alt+- | Ctrl+Shift+Alt+- | NO | ------------------------------------------------------------------------------------------------------------- -| Equal | = | = | = | NO | -| Shift+Equal | + | Shift+= | Shift+= | NO | -| Ctrl+Alt+Equal | --- | Ctrl+Alt+= | Ctrl+Alt+= | NO | -| Ctrl+Shift+Alt+Equal | --- | Ctrl+Shift+Alt+= | Ctrl+Shift+Alt+= | NO | ------------------------------------------------------------------------------------------------------------- -| BracketLeft | х | [ | х | NO | -| Shift+BracketLeft | Х | Shift+[ | Shift+х | NO | -| Ctrl+Alt+BracketLeft | --- | Ctrl+Alt+[ | Ctrl+Alt+х | NO | -| Ctrl+Shift+Alt+BracketLeft | --- | Ctrl+Shift+Alt+[ | Ctrl+Shift+Alt+х | NO | ------------------------------------------------------------------------------------------------------------- -| BracketRight | ъ | ] | ъ | NO | -| Shift+BracketRight | Ъ | Shift+] | Shift+ъ | NO | -| Ctrl+Alt+BracketRight | --- | Ctrl+Alt+] | Ctrl+Alt+ъ | NO | -| Ctrl+Shift+Alt+BracketRight | --- | Ctrl+Shift+Alt+] | Ctrl+Shift+Alt+ъ | NO | ------------------------------------------------------------------------------------------------------------- -| Backslash | \ | \ | \ | NO | -| Shift+Backslash | / | Shift+\ | Shift+\ | NO | -| Ctrl+Alt+Backslash | --- | Ctrl+Alt+\ | Ctrl+Alt+\ | NO | -| Ctrl+Shift+Alt+Backslash | --- | Ctrl+Shift+Alt+\ | Ctrl+Shift+Alt+\ | NO | ------------------------------------------------------------------------------------------------------------- -| IntlHash | --- | null | null | NO | -| Shift+IntlHash | --- | null | null | NO | -| Ctrl+Alt+IntlHash | --- | null | null | NO | -| Ctrl+Shift+Alt+IntlHash | --- | null | null | NO | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| Semicolon | ж | ; | ж | NO | -| Shift+Semicolon | Ж | Shift+; | Shift+ж | NO | -| Ctrl+Alt+Semicolon | --- | Ctrl+Alt+; | Ctrl+Alt+ж | NO | -| Ctrl+Shift+Alt+Semicolon | --- | Ctrl+Shift+Alt+; | Ctrl+Shift+Alt+ж | NO | ------------------------------------------------------------------------------------------------------------- -| Quote | э | ' | э | NO | -| Shift+Quote | Э | Shift+' | Shift+э | NO | -| Ctrl+Alt+Quote | --- | Ctrl+Alt+' | Ctrl+Alt+э | NO | -| Ctrl+Shift+Alt+Quote | --- | Ctrl+Shift+Alt+' | Ctrl+Shift+Alt+э | NO | ------------------------------------------------------------------------------------------------------------- -| Backquote | ё | ` | ё | NO | -| Shift+Backquote | Ё | Shift+` | Shift+ё | NO | -| Ctrl+Alt+Backquote | --- | Ctrl+Alt+` | Ctrl+Alt+ё | NO | -| Ctrl+Shift+Alt+Backquote | --- | Ctrl+Shift+Alt+` | Ctrl+Shift+Alt+ё | NO | ------------------------------------------------------------------------------------------------------------- -| Comma | б | , | б | NO | -| Shift+Comma | Б | Shift+, | Shift+б | NO | -| Ctrl+Alt+Comma | --- | Ctrl+Alt+, | Ctrl+Alt+б | NO | -| Ctrl+Shift+Alt+Comma | --- | Ctrl+Shift+Alt+, | Ctrl+Shift+Alt+б | NO | ------------------------------------------------------------------------------------------------------------- -| Period | ю | . | ю | NO | -| Shift+Period | Ю | Shift+. | Shift+ю | NO | -| Ctrl+Alt+Period | --- | Ctrl+Alt+. | Ctrl+Alt+ю | NO | -| Ctrl+Shift+Alt+Period | --- | Ctrl+Shift+Alt+. | Ctrl+Shift+Alt+ю | NO | ------------------------------------------------------------------------------------------------------------- -| Slash | . | / | . | NO | -| Shift+Slash | , | Shift+/ | Shift+. | NO | -| Ctrl+Alt+Slash | --- | Ctrl+Alt+/ | Ctrl+Alt+. | NO | -| Ctrl+Shift+Alt+Slash | --- | Ctrl+Shift+Alt+/ | Ctrl+Shift+Alt+. | NO | ------------------------------------------------------------------------------------------------------------- -| HW Code combination | Key | KeyCode combination | UI label | WYSIWYG | ------------------------------------------------------------------------------------------------------------- -| ArrowUp | --- | UpArrow | UpArrow | | -| Shift+ArrowUp | --- | Shift+UpArrow | Shift+UpArrow | | -| Ctrl+Alt+ArrowUp | --- | Ctrl+Alt+UpArrow | Ctrl+Alt+UpArrow | | -| Ctrl+Shift+Alt+ArrowUp | --- | Ctrl+Shift+Alt+UpArrow | Ctrl+Shift+Alt+UpArrow | | ------------------------------------------------------------------------------------------------------------- -| Numpad0 | --- | NumPad0 | NumPad0 | | -| Shift+Numpad0 | --- | Shift+NumPad0 | Shift+NumPad0 | | -| Ctrl+Alt+Numpad0 | --- | Ctrl+Alt+NumPad0 | Ctrl+Alt+NumPad0 | | -| Ctrl+Shift+Alt+Numpad0 | --- | Ctrl+Shift+Alt+NumPad0 | Ctrl+Shift+Alt+NumPad0 | | ------------------------------------------------------------------------------------------------------------- -| IntlBackslash | \ | OEM_102 | \ | NO | -| Shift+IntlBackslash | / | Shift+OEM_102 | Shift+\ | NO | -| Ctrl+Alt+IntlBackslash | --- | Ctrl+Alt+OEM_102 | Ctrl+Alt+\ | NO | -| Ctrl+Shift+Alt+IntlBackslash | --- | Ctrl+Shift+Alt+OEM_102 | Ctrl+Shift+Alt+\ | NO | ------------------------------------------------------------------------------------------------------------- -| IntlRo | --- | null | null | NO | -| Shift+IntlRo | --- | null | null | NO | -| Ctrl+Alt+IntlRo | --- | null | null | NO | -| Ctrl+Shift+Alt+IntlRo | --- | null | null | NO | ------------------------------------------------------------------------------------------------------------- -| IntlYen | --- | null | null | NO | -| Shift+IntlYen | --- | null | null | NO | -| Ctrl+Alt+IntlYen | --- | null | null | NO | -| Ctrl+Shift+Alt+IntlYen | --- | null | null | NO | ------------------------------------------------------------------------------------------------------------- \ No newline at end of file +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyA | ф | A | ф | a | NO | +| Shift+KeyA | Ф | Shift+A | Shift+ф | shift+a | NO | +| Ctrl+Alt+KeyA | --- | Ctrl+Alt+A | Ctrl+Alt+ф | ctrl+alt+a | NO | +| Ctrl+Shift+Alt+KeyA | --- | Ctrl+Shift+Alt+A | Ctrl+Shift+Alt+ф | ctrl+shift+alt+a | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyB | и | B | и | b | NO | +| Shift+KeyB | И | Shift+B | Shift+и | shift+b | NO | +| Ctrl+Alt+KeyB | --- | Ctrl+Alt+B | Ctrl+Alt+и | ctrl+alt+b | NO | +| Ctrl+Shift+Alt+KeyB | --- | Ctrl+Shift+Alt+B | Ctrl+Shift+Alt+и | ctrl+shift+alt+b | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyC | с | C | с | c | NO | +| Shift+KeyC | С | Shift+C | Shift+с | shift+c | NO | +| Ctrl+Alt+KeyC | --- | Ctrl+Alt+C | Ctrl+Alt+с | ctrl+alt+c | NO | +| Ctrl+Shift+Alt+KeyC | --- | Ctrl+Shift+Alt+C | Ctrl+Shift+Alt+с | ctrl+shift+alt+c | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyD | в | D | в | d | NO | +| Shift+KeyD | В | Shift+D | Shift+в | shift+d | NO | +| Ctrl+Alt+KeyD | --- | Ctrl+Alt+D | Ctrl+Alt+в | ctrl+alt+d | NO | +| Ctrl+Shift+Alt+KeyD | --- | Ctrl+Shift+Alt+D | Ctrl+Shift+Alt+в | ctrl+shift+alt+d | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyE | у | E | у | e | NO | +| Shift+KeyE | У | Shift+E | Shift+у | shift+e | NO | +| Ctrl+Alt+KeyE | --- | Ctrl+Alt+E | Ctrl+Alt+у | ctrl+alt+e | NO | +| Ctrl+Shift+Alt+KeyE | --- | Ctrl+Shift+Alt+E | Ctrl+Shift+Alt+у | ctrl+shift+alt+e | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyF | а | F | а | f | NO | +| Shift+KeyF | А | Shift+F | Shift+а | shift+f | NO | +| Ctrl+Alt+KeyF | --- | Ctrl+Alt+F | Ctrl+Alt+а | ctrl+alt+f | NO | +| Ctrl+Shift+Alt+KeyF | --- | Ctrl+Shift+Alt+F | Ctrl+Shift+Alt+а | ctrl+shift+alt+f | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyG | п | G | п | g | NO | +| Shift+KeyG | П | Shift+G | Shift+п | shift+g | NO | +| Ctrl+Alt+KeyG | --- | Ctrl+Alt+G | Ctrl+Alt+п | ctrl+alt+g | NO | +| Ctrl+Shift+Alt+KeyG | --- | Ctrl+Shift+Alt+G | Ctrl+Shift+Alt+п | ctrl+shift+alt+g | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyH | р | H | р | h | NO | +| Shift+KeyH | Р | Shift+H | Shift+р | shift+h | NO | +| Ctrl+Alt+KeyH | --- | Ctrl+Alt+H | Ctrl+Alt+р | ctrl+alt+h | NO | +| Ctrl+Shift+Alt+KeyH | --- | Ctrl+Shift+Alt+H | Ctrl+Shift+Alt+р | ctrl+shift+alt+h | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyI | ш | I | ш | i | NO | +| Shift+KeyI | Ш | Shift+I | Shift+ш | shift+i | NO | +| Ctrl+Alt+KeyI | --- | Ctrl+Alt+I | Ctrl+Alt+ш | ctrl+alt+i | NO | +| Ctrl+Shift+Alt+KeyI | --- | Ctrl+Shift+Alt+I | Ctrl+Shift+Alt+ш | ctrl+shift+alt+i | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyJ | о | J | о | j | NO | +| Shift+KeyJ | О | Shift+J | Shift+о | shift+j | NO | +| Ctrl+Alt+KeyJ | --- | Ctrl+Alt+J | Ctrl+Alt+о | ctrl+alt+j | NO | +| Ctrl+Shift+Alt+KeyJ | --- | Ctrl+Shift+Alt+J | Ctrl+Shift+Alt+о | ctrl+shift+alt+j | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyK | л | K | л | k | NO | +| Shift+KeyK | Л | Shift+K | Shift+л | shift+k | NO | +| Ctrl+Alt+KeyK | --- | Ctrl+Alt+K | Ctrl+Alt+л | ctrl+alt+k | NO | +| Ctrl+Shift+Alt+KeyK | --- | Ctrl+Shift+Alt+K | Ctrl+Shift+Alt+л | ctrl+shift+alt+k | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyL | д | L | д | l | NO | +| Shift+KeyL | Д | Shift+L | Shift+д | shift+l | NO | +| Ctrl+Alt+KeyL | --- | Ctrl+Alt+L | Ctrl+Alt+д | ctrl+alt+l | NO | +| Ctrl+Shift+Alt+KeyL | --- | Ctrl+Shift+Alt+L | Ctrl+Shift+Alt+д | ctrl+shift+alt+l | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyM | ь | M | ь | m | NO | +| Shift+KeyM | Ь | Shift+M | Shift+ь | shift+m | NO | +| Ctrl+Alt+KeyM | --- | Ctrl+Alt+M | Ctrl+Alt+ь | ctrl+alt+m | NO | +| Ctrl+Shift+Alt+KeyM | --- | Ctrl+Shift+Alt+M | Ctrl+Shift+Alt+ь | ctrl+shift+alt+m | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyN | т | N | т | n | NO | +| Shift+KeyN | Т | Shift+N | Shift+т | shift+n | NO | +| Ctrl+Alt+KeyN | --- | Ctrl+Alt+N | Ctrl+Alt+т | ctrl+alt+n | NO | +| Ctrl+Shift+Alt+KeyN | --- | Ctrl+Shift+Alt+N | Ctrl+Shift+Alt+т | ctrl+shift+alt+n | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyO | щ | O | щ | o | NO | +| Shift+KeyO | Щ | Shift+O | Shift+щ | shift+o | NO | +| Ctrl+Alt+KeyO | --- | Ctrl+Alt+O | Ctrl+Alt+щ | ctrl+alt+o | NO | +| Ctrl+Shift+Alt+KeyO | --- | Ctrl+Shift+Alt+O | Ctrl+Shift+Alt+щ | ctrl+shift+alt+o | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyP | з | P | з | p | NO | +| Shift+KeyP | З | Shift+P | Shift+з | shift+p | NO | +| Ctrl+Alt+KeyP | --- | Ctrl+Alt+P | Ctrl+Alt+з | ctrl+alt+p | NO | +| Ctrl+Shift+Alt+KeyP | --- | Ctrl+Shift+Alt+P | Ctrl+Shift+Alt+з | ctrl+shift+alt+p | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyQ | й | Q | й | q | NO | +| Shift+KeyQ | Й | Shift+Q | Shift+й | shift+q | NO | +| Ctrl+Alt+KeyQ | --- | Ctrl+Alt+Q | Ctrl+Alt+й | ctrl+alt+q | NO | +| Ctrl+Shift+Alt+KeyQ | --- | Ctrl+Shift+Alt+Q | Ctrl+Shift+Alt+й | ctrl+shift+alt+q | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyR | к | R | к | r | NO | +| Shift+KeyR | К | Shift+R | Shift+к | shift+r | NO | +| Ctrl+Alt+KeyR | --- | Ctrl+Alt+R | Ctrl+Alt+к | ctrl+alt+r | NO | +| Ctrl+Shift+Alt+KeyR | --- | Ctrl+Shift+Alt+R | Ctrl+Shift+Alt+к | ctrl+shift+alt+r | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyS | ы | S | ы | s | NO | +| Shift+KeyS | Ы | Shift+S | Shift+ы | shift+s | NO | +| Ctrl+Alt+KeyS | --- | Ctrl+Alt+S | Ctrl+Alt+ы | ctrl+alt+s | NO | +| Ctrl+Shift+Alt+KeyS | --- | Ctrl+Shift+Alt+S | Ctrl+Shift+Alt+ы | ctrl+shift+alt+s | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyT | е | T | е | t | NO | +| Shift+KeyT | Е | Shift+T | Shift+е | shift+t | NO | +| Ctrl+Alt+KeyT | --- | Ctrl+Alt+T | Ctrl+Alt+е | ctrl+alt+t | NO | +| Ctrl+Shift+Alt+KeyT | --- | Ctrl+Shift+Alt+T | Ctrl+Shift+Alt+е | ctrl+shift+alt+t | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyU | г | U | г | u | NO | +| Shift+KeyU | Г | Shift+U | Shift+г | shift+u | NO | +| Ctrl+Alt+KeyU | --- | Ctrl+Alt+U | Ctrl+Alt+г | ctrl+alt+u | NO | +| Ctrl+Shift+Alt+KeyU | --- | Ctrl+Shift+Alt+U | Ctrl+Shift+Alt+г | ctrl+shift+alt+u | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyV | м | V | м | v | NO | +| Shift+KeyV | М | Shift+V | Shift+м | shift+v | NO | +| Ctrl+Alt+KeyV | --- | Ctrl+Alt+V | Ctrl+Alt+м | ctrl+alt+v | NO | +| Ctrl+Shift+Alt+KeyV | --- | Ctrl+Shift+Alt+V | Ctrl+Shift+Alt+м | ctrl+shift+alt+v | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyW | ц | W | ц | w | NO | +| Shift+KeyW | Ц | Shift+W | Shift+ц | shift+w | NO | +| Ctrl+Alt+KeyW | --- | Ctrl+Alt+W | Ctrl+Alt+ц | ctrl+alt+w | NO | +| Ctrl+Shift+Alt+KeyW | --- | Ctrl+Shift+Alt+W | Ctrl+Shift+Alt+ц | ctrl+shift+alt+w | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyX | ч | X | ч | x | NO | +| Shift+KeyX | Ч | Shift+X | Shift+ч | shift+x | NO | +| Ctrl+Alt+KeyX | --- | Ctrl+Alt+X | Ctrl+Alt+ч | ctrl+alt+x | NO | +| Ctrl+Shift+Alt+KeyX | --- | Ctrl+Shift+Alt+X | Ctrl+Shift+Alt+ч | ctrl+shift+alt+x | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyY | н | Y | н | y | NO | +| Shift+KeyY | Н | Shift+Y | Shift+н | shift+y | NO | +| Ctrl+Alt+KeyY | --- | Ctrl+Alt+Y | Ctrl+Alt+н | ctrl+alt+y | NO | +| Ctrl+Shift+Alt+KeyY | --- | Ctrl+Shift+Alt+Y | Ctrl+Shift+Alt+н | ctrl+shift+alt+y | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyZ | я | Z | я | z | NO | +| Shift+KeyZ | Я | Shift+Z | Shift+я | shift+z | NO | +| Ctrl+Alt+KeyZ | --- | Ctrl+Alt+Z | Ctrl+Alt+я | ctrl+alt+z | NO | +| Ctrl+Shift+Alt+KeyZ | --- | Ctrl+Shift+Alt+Z | Ctrl+Shift+Alt+я | ctrl+shift+alt+z | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit1 | 1 | 1 | 1 | 1 | | +| Shift+Digit1 | ! | Shift+1 | Shift+1 | shift+1 | | +| Ctrl+Alt+Digit1 | --- | Ctrl+Alt+1 | Ctrl+Alt+1 | ctrl+alt+1 | | +| Ctrl+Shift+Alt+Digit1 | --- | Ctrl+Shift+Alt+1 | Ctrl+Shift+Alt+1 | ctrl+shift+alt+1 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit2 | 2 | 2 | 2 | 2 | | +| Shift+Digit2 | " | Shift+2 | Shift+2 | shift+2 | | +| Ctrl+Alt+Digit2 | --- | Ctrl+Alt+2 | Ctrl+Alt+2 | ctrl+alt+2 | | +| Ctrl+Shift+Alt+Digit2 | --- | Ctrl+Shift+Alt+2 | Ctrl+Shift+Alt+2 | ctrl+shift+alt+2 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit3 | 3 | 3 | 3 | 3 | | +| Shift+Digit3 | № | Shift+3 | Shift+3 | shift+3 | | +| Ctrl+Alt+Digit3 | --- | Ctrl+Alt+3 | Ctrl+Alt+3 | ctrl+alt+3 | | +| Ctrl+Shift+Alt+Digit3 | --- | Ctrl+Shift+Alt+3 | Ctrl+Shift+Alt+3 | ctrl+shift+alt+3 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit4 | 4 | 4 | 4 | 4 | | +| Shift+Digit4 | ; | Shift+4 | Shift+4 | shift+4 | | +| Ctrl+Alt+Digit4 | --- | Ctrl+Alt+4 | Ctrl+Alt+4 | ctrl+alt+4 | | +| Ctrl+Shift+Alt+Digit4 | --- | Ctrl+Shift+Alt+4 | Ctrl+Shift+Alt+4 | ctrl+shift+alt+4 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit5 | 5 | 5 | 5 | 5 | | +| Shift+Digit5 | % | Shift+5 | Shift+5 | shift+5 | | +| Ctrl+Alt+Digit5 | --- | Ctrl+Alt+5 | Ctrl+Alt+5 | ctrl+alt+5 | | +| Ctrl+Shift+Alt+Digit5 | --- | Ctrl+Shift+Alt+5 | Ctrl+Shift+Alt+5 | ctrl+shift+alt+5 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit6 | 6 | 6 | 6 | 6 | | +| Shift+Digit6 | : | Shift+6 | Shift+6 | shift+6 | | +| Ctrl+Alt+Digit6 | --- | Ctrl+Alt+6 | Ctrl+Alt+6 | ctrl+alt+6 | | +| Ctrl+Shift+Alt+Digit6 | --- | Ctrl+Shift+Alt+6 | Ctrl+Shift+Alt+6 | ctrl+shift+alt+6 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit7 | 7 | 7 | 7 | 7 | | +| Shift+Digit7 | ? | Shift+7 | Shift+7 | shift+7 | | +| Ctrl+Alt+Digit7 | --- | Ctrl+Alt+7 | Ctrl+Alt+7 | ctrl+alt+7 | | +| Ctrl+Shift+Alt+Digit7 | --- | Ctrl+Shift+Alt+7 | Ctrl+Shift+Alt+7 | ctrl+shift+alt+7 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit8 | 8 | 8 | 8 | 8 | | +| Shift+Digit8 | * | Shift+8 | Shift+8 | shift+8 | | +| Ctrl+Alt+Digit8 | ₽ | Ctrl+Alt+8 | Ctrl+Alt+8 | ctrl+alt+8 | | +| Ctrl+Shift+Alt+Digit8 | --- | Ctrl+Shift+Alt+8 | Ctrl+Shift+Alt+8 | ctrl+shift+alt+8 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit9 | 9 | 9 | 9 | 9 | | +| Shift+Digit9 | ( | Shift+9 | Shift+9 | shift+9 | | +| Ctrl+Alt+Digit9 | --- | Ctrl+Alt+9 | Ctrl+Alt+9 | ctrl+alt+9 | | +| Ctrl+Shift+Alt+Digit9 | --- | Ctrl+Shift+Alt+9 | Ctrl+Shift+Alt+9 | ctrl+shift+alt+9 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Digit0 | 0 | 0 | 0 | 0 | | +| Shift+Digit0 | ) | Shift+0 | Shift+0 | shift+0 | | +| Ctrl+Alt+Digit0 | --- | Ctrl+Alt+0 | Ctrl+Alt+0 | ctrl+alt+0 | | +| Ctrl+Shift+Alt+Digit0 | --- | Ctrl+Shift+Alt+0 | Ctrl+Shift+Alt+0 | ctrl+shift+alt+0 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| Minus | - | - | - | oem_minus | NO | +| Shift+Minus | _ | Shift+- | Shift+- | shift+oem_minus | NO | +| Ctrl+Alt+Minus | --- | Ctrl+Alt+- | Ctrl+Alt+- | ctrl+alt+oem_minus | NO | +| Ctrl+Shift+Alt+Minus | --- | Ctrl+Shift+Alt+- | Ctrl+Shift+Alt+- | ctrl+shift+alt+oem_minus | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Equal | = | = | = | oem_plus | NO | +| Shift+Equal | + | Shift+= | Shift+= | shift+oem_plus | NO | +| Ctrl+Alt+Equal | --- | Ctrl+Alt+= | Ctrl+Alt+= | ctrl+alt+oem_plus | NO | +| Ctrl+Shift+Alt+Equal | --- | Ctrl+Shift+Alt+= | Ctrl+Shift+Alt+= | ctrl+shift+alt+oem_plus | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| BracketLeft | х | [ | х | oem_4 | NO | +| Shift+BracketLeft | Х | Shift+[ | Shift+х | shift+oem_4 | NO | +| Ctrl+Alt+BracketLeft | --- | Ctrl+Alt+[ | Ctrl+Alt+х | ctrl+alt+oem_4 | NO | +| Ctrl+Shift+Alt+BracketLeft | --- | Ctrl+Shift+Alt+[ | Ctrl+Shift+Alt+х | ctrl+shift+alt+oem_4 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| BracketRight | ъ | ] | ъ | oem_6 | NO | +| Shift+BracketRight | Ъ | Shift+] | Shift+ъ | shift+oem_6 | NO | +| Ctrl+Alt+BracketRight | --- | Ctrl+Alt+] | Ctrl+Alt+ъ | ctrl+alt+oem_6 | NO | +| Ctrl+Shift+Alt+BracketRight | --- | Ctrl+Shift+Alt+] | Ctrl+Shift+Alt+ъ | ctrl+shift+alt+oem_6 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Backslash | \ | \ | \ | oem_5 | NO | +| Shift+Backslash | / | Shift+\ | Shift+\ | shift+oem_5 | NO | +| Ctrl+Alt+Backslash | --- | Ctrl+Alt+\ | Ctrl+Alt+\ | ctrl+alt+oem_5 | NO | +| Ctrl+Shift+Alt+Backslash | --- | Ctrl+Shift+Alt+\ | Ctrl+Shift+Alt+\ | ctrl+shift+alt+oem_5 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| IntlHash | --- | null | null | null | NO | +| Shift+IntlHash | --- | null | null | null | NO | +| Ctrl+Alt+IntlHash | --- | null | null | null | NO | +| Ctrl+Shift+Alt+IntlHash | --- | null | null | null | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| Semicolon | ж | ; | ж | oem_1 | NO | +| Shift+Semicolon | Ж | Shift+; | Shift+ж | shift+oem_1 | NO | +| Ctrl+Alt+Semicolon | --- | Ctrl+Alt+; | Ctrl+Alt+ж | ctrl+alt+oem_1 | NO | +| Ctrl+Shift+Alt+Semicolon | --- | Ctrl+Shift+Alt+; | Ctrl+Shift+Alt+ж | ctrl+shift+alt+oem_1 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Quote | э | ' | э | oem_7 | NO | +| Shift+Quote | Э | Shift+' | Shift+э | shift+oem_7 | NO | +| Ctrl+Alt+Quote | --- | Ctrl+Alt+' | Ctrl+Alt+э | ctrl+alt+oem_7 | NO | +| Ctrl+Shift+Alt+Quote | --- | Ctrl+Shift+Alt+' | Ctrl+Shift+Alt+э | ctrl+shift+alt+oem_7 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Backquote | ё | ` | ё | oem_3 | NO | +| Shift+Backquote | Ё | Shift+` | Shift+ё | shift+oem_3 | NO | +| Ctrl+Alt+Backquote | --- | Ctrl+Alt+` | Ctrl+Alt+ё | ctrl+alt+oem_3 | NO | +| Ctrl+Shift+Alt+Backquote | --- | Ctrl+Shift+Alt+` | Ctrl+Shift+Alt+ё | ctrl+shift+alt+oem_3 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Comma | б | , | б | oem_comma | NO | +| Shift+Comma | Б | Shift+, | Shift+б | shift+oem_comma | NO | +| Ctrl+Alt+Comma | --- | Ctrl+Alt+, | Ctrl+Alt+б | ctrl+alt+oem_comma | NO | +| Ctrl+Shift+Alt+Comma | --- | Ctrl+Shift+Alt+, | Ctrl+Shift+Alt+б | ctrl+shift+alt+oem_comma | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Period | ю | . | ю | oem_period | NO | +| Shift+Period | Ю | Shift+. | Shift+ю | shift+oem_period | NO | +| Ctrl+Alt+Period | --- | Ctrl+Alt+. | Ctrl+Alt+ю | ctrl+alt+oem_period | NO | +| Ctrl+Shift+Alt+Period | --- | Ctrl+Shift+Alt+. | Ctrl+Shift+Alt+ю | ctrl+shift+alt+oem_period | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| Slash | . | / | . | oem_2 | NO | +| Shift+Slash | , | Shift+/ | Shift+. | shift+oem_2 | NO | +| Ctrl+Alt+Slash | --- | Ctrl+Alt+/ | Ctrl+Alt+. | ctrl+alt+oem_2 | NO | +| Ctrl+Shift+Alt+Slash | --- | Ctrl+Shift+Alt+/ | Ctrl+Shift+Alt+. | ctrl+shift+alt+oem_2 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | +----------------------------------------------------------------------------------------------------------------------------------------- +| ArrowUp | --- | UpArrow | UpArrow | up | | +| Shift+ArrowUp | --- | Shift+UpArrow | Shift+UpArrow | shift+up | | +| Ctrl+Alt+ArrowUp | --- | Ctrl+Alt+UpArrow | Ctrl+Alt+UpArrow | ctrl+alt+up | | +| Ctrl+Shift+Alt+ArrowUp | --- | Ctrl+Shift+Alt+UpArrow | Ctrl+Shift+Alt+UpArrow | ctrl+shift+alt+up | | +----------------------------------------------------------------------------------------------------------------------------------------- +| Numpad0 | --- | NumPad0 | NumPad0 | numpad0 | | +| Shift+Numpad0 | --- | Shift+NumPad0 | Shift+NumPad0 | shift+numpad0 | | +| Ctrl+Alt+Numpad0 | --- | Ctrl+Alt+NumPad0 | Ctrl+Alt+NumPad0 | ctrl+alt+numpad0 | | +| Ctrl+Shift+Alt+Numpad0 | --- | Ctrl+Shift+Alt+NumPad0 | Ctrl+Shift+Alt+NumPad0 | ctrl+shift+alt+numpad0 | | +----------------------------------------------------------------------------------------------------------------------------------------- +| IntlBackslash | \ | OEM_102 | \ | oem_102 | NO | +| Shift+IntlBackslash | / | Shift+OEM_102 | Shift+\ | shift+oem_102 | NO | +| Ctrl+Alt+IntlBackslash | --- | Ctrl+Alt+OEM_102 | Ctrl+Alt+\ | ctrl+alt+oem_102 | NO | +| Ctrl+Shift+Alt+IntlBackslash | --- | Ctrl+Shift+Alt+OEM_102 | Ctrl+Shift+Alt+\ | ctrl+shift+alt+oem_102 | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| IntlRo | --- | null | null | null | NO | +| Shift+IntlRo | --- | null | null | null | NO | +| Ctrl+Alt+IntlRo | --- | null | null | null | NO | +| Ctrl+Shift+Alt+IntlRo | --- | null | null | null | NO | +----------------------------------------------------------------------------------------------------------------------------------------- +| IntlYen | --- | null | null | null | NO | +| Shift+IntlYen | --- | null | null | null | NO | +| Ctrl+Alt+IntlYen | --- | null | null | null | NO | +| Ctrl+Shift+Alt+IntlYen | --- | null | null | null | NO | +----------------------------------------------------------------------------------------------------------------------------------------- \ No newline at end of file From 9ff9e80200b44954d616960bbf3d7833d3e5ecd1 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sun, 21 May 2017 11:50:41 +0200 Subject: [PATCH 0820/2747] Fixes #24361: Hotkey hints are not displayed in English --- .../common/windowsKeyboardMapper.ts | 79 +++++-- .../services/keybinding/test/win_ru.txt | 218 +++++++++--------- .../test/windowsKeyboardMapper.test.ts | 24 +- 3 files changed, 195 insertions(+), 126 deletions(-) diff --git a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts index 3a90f85fdfd4b..3772cc723fbdd 100644 --- a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts @@ -309,6 +309,8 @@ export class WindowsKeyboardMapper implements IKeyboardMapper { } } + let producesLetter: boolean[] = []; + this._codeInfo = []; for (let strCode in rawMappings) { if (rawMappings.hasOwnProperty(strCode)) { @@ -347,25 +349,76 @@ export class WindowsKeyboardMapper implements IKeyboardMapper { withShiftAltGr: withShiftAltGr, }; this._codeInfo[scanCode] = mapping; + this._scanCodeToKeyCode[scanCode] = keyCode; + + if (keyCode === KeyCode.Unknown) { + continue; + } + this._keyCodeExists[keyCode] = true; + + if (value.length === 0) { + // This key does not produce strings + this._keyCodeToLabel[keyCode] = null; + } + + else if (value.length > 1) { + // This key produces a letter representable with multiple UTF-16 code units. + this._keyCodeToLabel[keyCode] = value; + } - if (keyCode !== KeyCode.Unknown) { - this._keyCodeExists[keyCode] = true; - if (value.length === 0) { - this._keyCodeToLabel[keyCode] = null; - } else if (value.length === 1) { - const charCode = value.charCodeAt(0); - if (charCode >= CharCode.a && charCode <= CharCode.z) { - this._keyCodeToLabel[keyCode] = String.fromCharCode(CharCode.A + (charCode - CharCode.a)); - } else { - this._keyCodeToLabel[keyCode] = value; - } - } else { + else { + const charCode = value.charCodeAt(0); + + if (charCode >= CharCode.a && charCode <= CharCode.z) { + const upperCaseValue = CharCode.A + (charCode - CharCode.a); + producesLetter[upperCaseValue] = true; + this._keyCodeToLabel[keyCode] = String.fromCharCode(CharCode.A + (charCode - CharCode.a)); + } + + else if (charCode >= CharCode.A && charCode <= CharCode.Z) { + producesLetter[charCode] = true; + this._keyCodeToLabel[keyCode] = value; + } + + else { this._keyCodeToLabel[keyCode] = value; } } - this._scanCodeToKeyCode[scanCode] = keyCode; } } + + // Handle keyboard layouts where latin characters are not produced e.g. Cyrillic + const _registerLetterIfMissing = (charCode: CharCode, keyCode: KeyCode): void => { + if (!producesLetter[charCode]) { + this._keyCodeToLabel[keyCode] = String.fromCharCode(charCode); + } + }; + _registerLetterIfMissing(CharCode.A, KeyCode.KEY_A); + _registerLetterIfMissing(CharCode.B, KeyCode.KEY_B); + _registerLetterIfMissing(CharCode.C, KeyCode.KEY_C); + _registerLetterIfMissing(CharCode.D, KeyCode.KEY_D); + _registerLetterIfMissing(CharCode.E, KeyCode.KEY_E); + _registerLetterIfMissing(CharCode.F, KeyCode.KEY_F); + _registerLetterIfMissing(CharCode.G, KeyCode.KEY_G); + _registerLetterIfMissing(CharCode.H, KeyCode.KEY_H); + _registerLetterIfMissing(CharCode.I, KeyCode.KEY_I); + _registerLetterIfMissing(CharCode.J, KeyCode.KEY_J); + _registerLetterIfMissing(CharCode.K, KeyCode.KEY_K); + _registerLetterIfMissing(CharCode.L, KeyCode.KEY_L); + _registerLetterIfMissing(CharCode.M, KeyCode.KEY_M); + _registerLetterIfMissing(CharCode.N, KeyCode.KEY_N); + _registerLetterIfMissing(CharCode.O, KeyCode.KEY_O); + _registerLetterIfMissing(CharCode.P, KeyCode.KEY_P); + _registerLetterIfMissing(CharCode.Q, KeyCode.KEY_Q); + _registerLetterIfMissing(CharCode.R, KeyCode.KEY_R); + _registerLetterIfMissing(CharCode.S, KeyCode.KEY_S); + _registerLetterIfMissing(CharCode.T, KeyCode.KEY_T); + _registerLetterIfMissing(CharCode.U, KeyCode.KEY_U); + _registerLetterIfMissing(CharCode.V, KeyCode.KEY_V); + _registerLetterIfMissing(CharCode.W, KeyCode.KEY_W); + _registerLetterIfMissing(CharCode.X, KeyCode.KEY_X); + _registerLetterIfMissing(CharCode.Y, KeyCode.KEY_Y); + _registerLetterIfMissing(CharCode.Z, KeyCode.KEY_Z); } public dumpDebugInfo(): string { diff --git a/src/vs/workbench/services/keybinding/test/win_ru.txt b/src/vs/workbench/services/keybinding/test/win_ru.txt index 5ea3c8575df1f..359a38623825d 100644 --- a/src/vs/workbench/services/keybinding/test/win_ru.txt +++ b/src/vs/workbench/services/keybinding/test/win_ru.txt @@ -1,143 +1,143 @@ ----------------------------------------------------------------------------------------------------------------------------------------- | HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyA | ф | A | ф | a | NO | -| Shift+KeyA | Ф | Shift+A | Shift+ф | shift+a | NO | -| Ctrl+Alt+KeyA | --- | Ctrl+Alt+A | Ctrl+Alt+ф | ctrl+alt+a | NO | -| Ctrl+Shift+Alt+KeyA | --- | Ctrl+Shift+Alt+A | Ctrl+Shift+Alt+ф | ctrl+shift+alt+a | NO | ------------------------------------------------------------------------------------------------------------------------------------------ -| KeyB | и | B | и | b | NO | -| Shift+KeyB | И | Shift+B | Shift+и | shift+b | NO | -| Ctrl+Alt+KeyB | --- | Ctrl+Alt+B | Ctrl+Alt+и | ctrl+alt+b | NO | -| Ctrl+Shift+Alt+KeyB | --- | Ctrl+Shift+Alt+B | Ctrl+Shift+Alt+и | ctrl+shift+alt+b | NO | ------------------------------------------------------------------------------------------------------------------------------------------ -| KeyC | с | C | с | c | NO | -| Shift+KeyC | С | Shift+C | Shift+с | shift+c | NO | -| Ctrl+Alt+KeyC | --- | Ctrl+Alt+C | Ctrl+Alt+с | ctrl+alt+c | NO | -| Ctrl+Shift+Alt+KeyC | --- | Ctrl+Shift+Alt+C | Ctrl+Shift+Alt+с | ctrl+shift+alt+c | NO | ------------------------------------------------------------------------------------------------------------------------------------------ -| KeyD | в | D | в | d | NO | -| Shift+KeyD | В | Shift+D | Shift+в | shift+d | NO | -| Ctrl+Alt+KeyD | --- | Ctrl+Alt+D | Ctrl+Alt+в | ctrl+alt+d | NO | -| Ctrl+Shift+Alt+KeyD | --- | Ctrl+Shift+Alt+D | Ctrl+Shift+Alt+в | ctrl+shift+alt+d | NO | ------------------------------------------------------------------------------------------------------------------------------------------ -| KeyE | у | E | у | e | NO | -| Shift+KeyE | У | Shift+E | Shift+у | shift+e | NO | -| Ctrl+Alt+KeyE | --- | Ctrl+Alt+E | Ctrl+Alt+у | ctrl+alt+e | NO | -| Ctrl+Shift+Alt+KeyE | --- | Ctrl+Shift+Alt+E | Ctrl+Shift+Alt+у | ctrl+shift+alt+e | NO | ------------------------------------------------------------------------------------------------------------------------------------------ -| KeyF | а | F | а | f | NO | -| Shift+KeyF | А | Shift+F | Shift+а | shift+f | NO | -| Ctrl+Alt+KeyF | --- | Ctrl+Alt+F | Ctrl+Alt+а | ctrl+alt+f | NO | -| Ctrl+Shift+Alt+KeyF | --- | Ctrl+Shift+Alt+F | Ctrl+Shift+Alt+а | ctrl+shift+alt+f | NO | +| KeyA | ф | A | A | a | | +| Shift+KeyA | Ф | Shift+A | Shift+A | shift+a | | +| Ctrl+Alt+KeyA | --- | Ctrl+Alt+A | Ctrl+Alt+A | ctrl+alt+a | | +| Ctrl+Shift+Alt+KeyA | --- | Ctrl+Shift+Alt+A | Ctrl+Shift+Alt+A | ctrl+shift+alt+a | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyB | и | B | B | b | | +| Shift+KeyB | И | Shift+B | Shift+B | shift+b | | +| Ctrl+Alt+KeyB | --- | Ctrl+Alt+B | Ctrl+Alt+B | ctrl+alt+b | | +| Ctrl+Shift+Alt+KeyB | --- | Ctrl+Shift+Alt+B | Ctrl+Shift+Alt+B | ctrl+shift+alt+b | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyC | с | C | C | c | | +| Shift+KeyC | С | Shift+C | Shift+C | shift+c | | +| Ctrl+Alt+KeyC | --- | Ctrl+Alt+C | Ctrl+Alt+C | ctrl+alt+c | | +| Ctrl+Shift+Alt+KeyC | --- | Ctrl+Shift+Alt+C | Ctrl+Shift+Alt+C | ctrl+shift+alt+c | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyD | в | D | D | d | | +| Shift+KeyD | В | Shift+D | Shift+D | shift+d | | +| Ctrl+Alt+KeyD | --- | Ctrl+Alt+D | Ctrl+Alt+D | ctrl+alt+d | | +| Ctrl+Shift+Alt+KeyD | --- | Ctrl+Shift+Alt+D | Ctrl+Shift+Alt+D | ctrl+shift+alt+d | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyE | у | E | E | e | | +| Shift+KeyE | У | Shift+E | Shift+E | shift+e | | +| Ctrl+Alt+KeyE | --- | Ctrl+Alt+E | Ctrl+Alt+E | ctrl+alt+e | | +| Ctrl+Shift+Alt+KeyE | --- | Ctrl+Shift+Alt+E | Ctrl+Shift+Alt+E | ctrl+shift+alt+e | | +----------------------------------------------------------------------------------------------------------------------------------------- +| KeyF | а | F | F | f | | +| Shift+KeyF | А | Shift+F | Shift+F | shift+f | | +| Ctrl+Alt+KeyF | --- | Ctrl+Alt+F | Ctrl+Alt+F | ctrl+alt+f | | +| Ctrl+Shift+Alt+KeyF | --- | Ctrl+Shift+Alt+F | Ctrl+Shift+Alt+F | ctrl+shift+alt+f | | ----------------------------------------------------------------------------------------------------------------------------------------- | HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyG | п | G | п | g | NO | -| Shift+KeyG | П | Shift+G | Shift+п | shift+g | NO | -| Ctrl+Alt+KeyG | --- | Ctrl+Alt+G | Ctrl+Alt+п | ctrl+alt+g | NO | -| Ctrl+Shift+Alt+KeyG | --- | Ctrl+Shift+Alt+G | Ctrl+Shift+Alt+п | ctrl+shift+alt+g | NO | +| KeyG | п | G | G | g | | +| Shift+KeyG | П | Shift+G | Shift+G | shift+g | | +| Ctrl+Alt+KeyG | --- | Ctrl+Alt+G | Ctrl+Alt+G | ctrl+alt+g | | +| Ctrl+Shift+Alt+KeyG | --- | Ctrl+Shift+Alt+G | Ctrl+Shift+Alt+G | ctrl+shift+alt+g | | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyH | р | H | р | h | NO | -| Shift+KeyH | Р | Shift+H | Shift+р | shift+h | NO | -| Ctrl+Alt+KeyH | --- | Ctrl+Alt+H | Ctrl+Alt+р | ctrl+alt+h | NO | -| Ctrl+Shift+Alt+KeyH | --- | Ctrl+Shift+Alt+H | Ctrl+Shift+Alt+р | ctrl+shift+alt+h | NO | +| KeyH | р | H | H | h | | +| Shift+KeyH | Р | Shift+H | Shift+H | shift+h | | +| Ctrl+Alt+KeyH | --- | Ctrl+Alt+H | Ctrl+Alt+H | ctrl+alt+h | | +| Ctrl+Shift+Alt+KeyH | --- | Ctrl+Shift+Alt+H | Ctrl+Shift+Alt+H | ctrl+shift+alt+h | | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyI | ш | I | ш | i | NO | -| Shift+KeyI | Ш | Shift+I | Shift+ш | shift+i | NO | -| Ctrl+Alt+KeyI | --- | Ctrl+Alt+I | Ctrl+Alt+ш | ctrl+alt+i | NO | -| Ctrl+Shift+Alt+KeyI | --- | Ctrl+Shift+Alt+I | Ctrl+Shift+Alt+ш | ctrl+shift+alt+i | NO | +| KeyI | ш | I | I | i | | +| Shift+KeyI | Ш | Shift+I | Shift+I | shift+i | | +| Ctrl+Alt+KeyI | --- | Ctrl+Alt+I | Ctrl+Alt+I | ctrl+alt+i | | +| Ctrl+Shift+Alt+KeyI | --- | Ctrl+Shift+Alt+I | Ctrl+Shift+Alt+I | ctrl+shift+alt+i | | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyJ | о | J | о | j | NO | -| Shift+KeyJ | О | Shift+J | Shift+о | shift+j | NO | -| Ctrl+Alt+KeyJ | --- | Ctrl+Alt+J | Ctrl+Alt+о | ctrl+alt+j | NO | -| Ctrl+Shift+Alt+KeyJ | --- | Ctrl+Shift+Alt+J | Ctrl+Shift+Alt+о | ctrl+shift+alt+j | NO | +| KeyJ | о | J | J | j | | +| Shift+KeyJ | О | Shift+J | Shift+J | shift+j | | +| Ctrl+Alt+KeyJ | --- | Ctrl+Alt+J | Ctrl+Alt+J | ctrl+alt+j | | +| Ctrl+Shift+Alt+KeyJ | --- | Ctrl+Shift+Alt+J | Ctrl+Shift+Alt+J | ctrl+shift+alt+j | | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyK | л | K | л | k | NO | -| Shift+KeyK | Л | Shift+K | Shift+л | shift+k | NO | -| Ctrl+Alt+KeyK | --- | Ctrl+Alt+K | Ctrl+Alt+л | ctrl+alt+k | NO | -| Ctrl+Shift+Alt+KeyK | --- | Ctrl+Shift+Alt+K | Ctrl+Shift+Alt+л | ctrl+shift+alt+k | NO | +| KeyK | л | K | K | k | | +| Shift+KeyK | Л | Shift+K | Shift+K | shift+k | | +| Ctrl+Alt+KeyK | --- | Ctrl+Alt+K | Ctrl+Alt+K | ctrl+alt+k | | +| Ctrl+Shift+Alt+KeyK | --- | Ctrl+Shift+Alt+K | Ctrl+Shift+Alt+K | ctrl+shift+alt+k | | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyL | д | L | д | l | NO | -| Shift+KeyL | Д | Shift+L | Shift+д | shift+l | NO | -| Ctrl+Alt+KeyL | --- | Ctrl+Alt+L | Ctrl+Alt+д | ctrl+alt+l | NO | -| Ctrl+Shift+Alt+KeyL | --- | Ctrl+Shift+Alt+L | Ctrl+Shift+Alt+д | ctrl+shift+alt+l | NO | +| KeyL | д | L | L | l | | +| Shift+KeyL | Д | Shift+L | Shift+L | shift+l | | +| Ctrl+Alt+KeyL | --- | Ctrl+Alt+L | Ctrl+Alt+L | ctrl+alt+l | | +| Ctrl+Shift+Alt+KeyL | --- | Ctrl+Shift+Alt+L | Ctrl+Shift+Alt+L | ctrl+shift+alt+l | | ----------------------------------------------------------------------------------------------------------------------------------------- | HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyM | ь | M | ь | m | NO | -| Shift+KeyM | Ь | Shift+M | Shift+ь | shift+m | NO | -| Ctrl+Alt+KeyM | --- | Ctrl+Alt+M | Ctrl+Alt+ь | ctrl+alt+m | NO | -| Ctrl+Shift+Alt+KeyM | --- | Ctrl+Shift+Alt+M | Ctrl+Shift+Alt+ь | ctrl+shift+alt+m | NO | +| KeyM | ь | M | M | m | | +| Shift+KeyM | Ь | Shift+M | Shift+M | shift+m | | +| Ctrl+Alt+KeyM | --- | Ctrl+Alt+M | Ctrl+Alt+M | ctrl+alt+m | | +| Ctrl+Shift+Alt+KeyM | --- | Ctrl+Shift+Alt+M | Ctrl+Shift+Alt+M | ctrl+shift+alt+m | | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyN | т | N | т | n | NO | -| Shift+KeyN | Т | Shift+N | Shift+т | shift+n | NO | -| Ctrl+Alt+KeyN | --- | Ctrl+Alt+N | Ctrl+Alt+т | ctrl+alt+n | NO | -| Ctrl+Shift+Alt+KeyN | --- | Ctrl+Shift+Alt+N | Ctrl+Shift+Alt+т | ctrl+shift+alt+n | NO | +| KeyN | т | N | N | n | | +| Shift+KeyN | Т | Shift+N | Shift+N | shift+n | | +| Ctrl+Alt+KeyN | --- | Ctrl+Alt+N | Ctrl+Alt+N | ctrl+alt+n | | +| Ctrl+Shift+Alt+KeyN | --- | Ctrl+Shift+Alt+N | Ctrl+Shift+Alt+N | ctrl+shift+alt+n | | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyO | щ | O | щ | o | NO | -| Shift+KeyO | Щ | Shift+O | Shift+щ | shift+o | NO | -| Ctrl+Alt+KeyO | --- | Ctrl+Alt+O | Ctrl+Alt+щ | ctrl+alt+o | NO | -| Ctrl+Shift+Alt+KeyO | --- | Ctrl+Shift+Alt+O | Ctrl+Shift+Alt+щ | ctrl+shift+alt+o | NO | +| KeyO | щ | O | O | o | | +| Shift+KeyO | Щ | Shift+O | Shift+O | shift+o | | +| Ctrl+Alt+KeyO | --- | Ctrl+Alt+O | Ctrl+Alt+O | ctrl+alt+o | | +| Ctrl+Shift+Alt+KeyO | --- | Ctrl+Shift+Alt+O | Ctrl+Shift+Alt+O | ctrl+shift+alt+o | | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyP | з | P | з | p | NO | -| Shift+KeyP | З | Shift+P | Shift+з | shift+p | NO | -| Ctrl+Alt+KeyP | --- | Ctrl+Alt+P | Ctrl+Alt+з | ctrl+alt+p | NO | -| Ctrl+Shift+Alt+KeyP | --- | Ctrl+Shift+Alt+P | Ctrl+Shift+Alt+з | ctrl+shift+alt+p | NO | +| KeyP | з | P | P | p | | +| Shift+KeyP | З | Shift+P | Shift+P | shift+p | | +| Ctrl+Alt+KeyP | --- | Ctrl+Alt+P | Ctrl+Alt+P | ctrl+alt+p | | +| Ctrl+Shift+Alt+KeyP | --- | Ctrl+Shift+Alt+P | Ctrl+Shift+Alt+P | ctrl+shift+alt+p | | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyQ | й | Q | й | q | NO | -| Shift+KeyQ | Й | Shift+Q | Shift+й | shift+q | NO | -| Ctrl+Alt+KeyQ | --- | Ctrl+Alt+Q | Ctrl+Alt+й | ctrl+alt+q | NO | -| Ctrl+Shift+Alt+KeyQ | --- | Ctrl+Shift+Alt+Q | Ctrl+Shift+Alt+й | ctrl+shift+alt+q | NO | +| KeyQ | й | Q | Q | q | | +| Shift+KeyQ | Й | Shift+Q | Shift+Q | shift+q | | +| Ctrl+Alt+KeyQ | --- | Ctrl+Alt+Q | Ctrl+Alt+Q | ctrl+alt+q | | +| Ctrl+Shift+Alt+KeyQ | --- | Ctrl+Shift+Alt+Q | Ctrl+Shift+Alt+Q | ctrl+shift+alt+q | | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyR | к | R | к | r | NO | -| Shift+KeyR | К | Shift+R | Shift+к | shift+r | NO | -| Ctrl+Alt+KeyR | --- | Ctrl+Alt+R | Ctrl+Alt+к | ctrl+alt+r | NO | -| Ctrl+Shift+Alt+KeyR | --- | Ctrl+Shift+Alt+R | Ctrl+Shift+Alt+к | ctrl+shift+alt+r | NO | +| KeyR | к | R | R | r | | +| Shift+KeyR | К | Shift+R | Shift+R | shift+r | | +| Ctrl+Alt+KeyR | --- | Ctrl+Alt+R | Ctrl+Alt+R | ctrl+alt+r | | +| Ctrl+Shift+Alt+KeyR | --- | Ctrl+Shift+Alt+R | Ctrl+Shift+Alt+R | ctrl+shift+alt+r | | ----------------------------------------------------------------------------------------------------------------------------------------- | HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyS | ы | S | ы | s | NO | -| Shift+KeyS | Ы | Shift+S | Shift+ы | shift+s | NO | -| Ctrl+Alt+KeyS | --- | Ctrl+Alt+S | Ctrl+Alt+ы | ctrl+alt+s | NO | -| Ctrl+Shift+Alt+KeyS | --- | Ctrl+Shift+Alt+S | Ctrl+Shift+Alt+ы | ctrl+shift+alt+s | NO | +| KeyS | ы | S | S | s | | +| Shift+KeyS | Ы | Shift+S | Shift+S | shift+s | | +| Ctrl+Alt+KeyS | --- | Ctrl+Alt+S | Ctrl+Alt+S | ctrl+alt+s | | +| Ctrl+Shift+Alt+KeyS | --- | Ctrl+Shift+Alt+S | Ctrl+Shift+Alt+S | ctrl+shift+alt+s | | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyT | е | T | е | t | NO | -| Shift+KeyT | Е | Shift+T | Shift+е | shift+t | NO | -| Ctrl+Alt+KeyT | --- | Ctrl+Alt+T | Ctrl+Alt+е | ctrl+alt+t | NO | -| Ctrl+Shift+Alt+KeyT | --- | Ctrl+Shift+Alt+T | Ctrl+Shift+Alt+е | ctrl+shift+alt+t | NO | +| KeyT | е | T | T | t | | +| Shift+KeyT | Е | Shift+T | Shift+T | shift+t | | +| Ctrl+Alt+KeyT | --- | Ctrl+Alt+T | Ctrl+Alt+T | ctrl+alt+t | | +| Ctrl+Shift+Alt+KeyT | --- | Ctrl+Shift+Alt+T | Ctrl+Shift+Alt+T | ctrl+shift+alt+t | | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyU | г | U | г | u | NO | -| Shift+KeyU | Г | Shift+U | Shift+г | shift+u | NO | -| Ctrl+Alt+KeyU | --- | Ctrl+Alt+U | Ctrl+Alt+г | ctrl+alt+u | NO | -| Ctrl+Shift+Alt+KeyU | --- | Ctrl+Shift+Alt+U | Ctrl+Shift+Alt+г | ctrl+shift+alt+u | NO | +| KeyU | г | U | U | u | | +| Shift+KeyU | Г | Shift+U | Shift+U | shift+u | | +| Ctrl+Alt+KeyU | --- | Ctrl+Alt+U | Ctrl+Alt+U | ctrl+alt+u | | +| Ctrl+Shift+Alt+KeyU | --- | Ctrl+Shift+Alt+U | Ctrl+Shift+Alt+U | ctrl+shift+alt+u | | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyV | м | V | м | v | NO | -| Shift+KeyV | М | Shift+V | Shift+м | shift+v | NO | -| Ctrl+Alt+KeyV | --- | Ctrl+Alt+V | Ctrl+Alt+м | ctrl+alt+v | NO | -| Ctrl+Shift+Alt+KeyV | --- | Ctrl+Shift+Alt+V | Ctrl+Shift+Alt+м | ctrl+shift+alt+v | NO | +| KeyV | м | V | V | v | | +| Shift+KeyV | М | Shift+V | Shift+V | shift+v | | +| Ctrl+Alt+KeyV | --- | Ctrl+Alt+V | Ctrl+Alt+V | ctrl+alt+v | | +| Ctrl+Shift+Alt+KeyV | --- | Ctrl+Shift+Alt+V | Ctrl+Shift+Alt+V | ctrl+shift+alt+v | | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyW | ц | W | ц | w | NO | -| Shift+KeyW | Ц | Shift+W | Shift+ц | shift+w | NO | -| Ctrl+Alt+KeyW | --- | Ctrl+Alt+W | Ctrl+Alt+ц | ctrl+alt+w | NO | -| Ctrl+Shift+Alt+KeyW | --- | Ctrl+Shift+Alt+W | Ctrl+Shift+Alt+ц | ctrl+shift+alt+w | NO | +| KeyW | ц | W | W | w | | +| Shift+KeyW | Ц | Shift+W | Shift+W | shift+w | | +| Ctrl+Alt+KeyW | --- | Ctrl+Alt+W | Ctrl+Alt+W | ctrl+alt+w | | +| Ctrl+Shift+Alt+KeyW | --- | Ctrl+Shift+Alt+W | Ctrl+Shift+Alt+W | ctrl+shift+alt+w | | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyX | ч | X | ч | x | NO | -| Shift+KeyX | Ч | Shift+X | Shift+ч | shift+x | NO | -| Ctrl+Alt+KeyX | --- | Ctrl+Alt+X | Ctrl+Alt+ч | ctrl+alt+x | NO | -| Ctrl+Shift+Alt+KeyX | --- | Ctrl+Shift+Alt+X | Ctrl+Shift+Alt+ч | ctrl+shift+alt+x | NO | +| KeyX | ч | X | X | x | | +| Shift+KeyX | Ч | Shift+X | Shift+X | shift+x | | +| Ctrl+Alt+KeyX | --- | Ctrl+Alt+X | Ctrl+Alt+X | ctrl+alt+x | | +| Ctrl+Shift+Alt+KeyX | --- | Ctrl+Shift+Alt+X | Ctrl+Shift+Alt+X | ctrl+shift+alt+x | | ----------------------------------------------------------------------------------------------------------------------------------------- | HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyY | н | Y | н | y | NO | -| Shift+KeyY | Н | Shift+Y | Shift+н | shift+y | NO | -| Ctrl+Alt+KeyY | --- | Ctrl+Alt+Y | Ctrl+Alt+н | ctrl+alt+y | NO | -| Ctrl+Shift+Alt+KeyY | --- | Ctrl+Shift+Alt+Y | Ctrl+Shift+Alt+н | ctrl+shift+alt+y | NO | +| KeyY | н | Y | Y | y | | +| Shift+KeyY | Н | Shift+Y | Shift+Y | shift+y | | +| Ctrl+Alt+KeyY | --- | Ctrl+Alt+Y | Ctrl+Alt+Y | ctrl+alt+y | | +| Ctrl+Shift+Alt+KeyY | --- | Ctrl+Shift+Alt+Y | Ctrl+Shift+Alt+Y | ctrl+shift+alt+y | | ----------------------------------------------------------------------------------------------------------------------------------------- -| KeyZ | я | Z | я | z | NO | -| Shift+KeyZ | Я | Shift+Z | Shift+я | shift+z | NO | -| Ctrl+Alt+KeyZ | --- | Ctrl+Alt+Z | Ctrl+Alt+я | ctrl+alt+z | NO | -| Ctrl+Shift+Alt+KeyZ | --- | Ctrl+Shift+Alt+Z | Ctrl+Shift+Alt+я | ctrl+shift+alt+z | NO | +| KeyZ | я | Z | Z | z | | +| Shift+KeyZ | Я | Shift+Z | Shift+Z | shift+z | | +| Ctrl+Alt+KeyZ | --- | Ctrl+Alt+Z | Ctrl+Alt+Z | ctrl+alt+z | | +| Ctrl+Shift+Alt+KeyZ | --- | Ctrl+Shift+Alt+Z | Ctrl+Shift+Alt+Z | ctrl+shift+alt+z | | ----------------------------------------------------------------------------------------------------------------------------------------- | Digit1 | 1 | 1 | 1 | 1 | | | Shift+Digit1 | ! | Shift+1 | Shift+1 | shift+1 | | diff --git a/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts b/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts index 5378fae982e5a..f66d60bf206b8 100644 --- a/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts +++ b/src/vs/workbench/services/keybinding/test/windowsKeyboardMapper.test.ts @@ -482,9 +482,25 @@ suite('keyboardMapper - WINDOWS ru', () => { test('mapping', (done) => { assertMapping(WRITE_FILE_IF_DIFFERENT, mapper, 'win_ru.txt', done); }); + + test('issue ##24361: resolveKeybinding Ctrl+K Ctrl+K', () => { + _assertResolveKeybinding( + mapper, + KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_K), + [{ + label: 'Ctrl+K Ctrl+K', + ariaLabel: 'Control+K Control+K', + electronAccelerator: null, + userSettingsLabel: 'ctrl+k ctrl+k', + isWYSIWYG: true, + isChord: true, + dispatchParts: ['ctrl+K', 'ctrl+K'], + }] + ); + }); }); -suite('misc', () => { +suite('keyboardMapper - misc', () => { test('issue #23513: Toggle Sidebar Visibility and Go to Line display same key mapping in Arabic keyboard', () => { const mapper = new WindowsKeyboardMapper(false, { 'KeyB': { @@ -507,11 +523,11 @@ suite('misc', () => { mapper, KeyMod.CtrlCmd | KeyCode.KEY_B, [{ - label: 'Ctrl+لا', - ariaLabel: 'Control+لا', + label: 'Ctrl+B', + ariaLabel: 'Control+B', electronAccelerator: 'Ctrl+B', userSettingsLabel: 'ctrl+b', - isWYSIWYG: false, + isWYSIWYG: true, isChord: false, dispatchParts: ['ctrl+B', null], }] From 4640bd8c183ae34d6c0555cffe6dadf711ec3f39 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Sun, 21 May 2017 18:09:44 +0200 Subject: [PATCH 0821/2747] Fixes in Tree view --- src/vs/workbench/api/node/extHostTreeViews.ts | 4 +++- src/vs/workbench/parts/views/browser/treeView.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/api/node/extHostTreeViews.ts b/src/vs/workbench/api/node/extHostTreeViews.ts index bbfde013dddf3..9a27a7fa3a7b7 100644 --- a/src/vs/workbench/api/node/extHostTreeViews.ts +++ b/src/vs/workbench/api/node/extHostTreeViews.ts @@ -86,7 +86,9 @@ class ExtHostTreeView extends Disposable { constructor(private viewId: string, private dataProvider: vscode.TreeDataProvider, private proxy: MainThreadTreeViewsShape) { super(); this.proxy.$registerView(viewId); - this._register(dataProvider.onDidChange(element => this._refresh(element))); + if (dataProvider.onDidChange) { + this._register(dataProvider.onDidChange(element => this._refresh(element))); + } } getTreeItems(): TPromise { diff --git a/src/vs/workbench/parts/views/browser/treeView.ts b/src/vs/workbench/parts/views/browser/treeView.ts index fc0e34b8a6239..d80990bbe72c6 100644 --- a/src/vs/workbench/parts/views/browser/treeView.ts +++ b/src/vs/workbench/parts/views/browser/treeView.ts @@ -388,7 +388,7 @@ class Menus implements IDisposable { } const _contextKeyService = this.contextKeyService.createScoped(); - contextKeyService.createKey('view', id); + _contextKeyService.createKey('view', id); const titleMenu = this.menuService.createMenu(MenuId.ViewTitle, _contextKeyService); const updateActions = () => { From 2bcb7147e46aebaf9281672cc06a97147b260e79 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Sun, 21 May 2017 18:17:03 +0200 Subject: [PATCH 0822/2747] Fix css in views --- src/vs/workbench/parts/views/browser/media/views.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/vs/workbench/parts/views/browser/media/views.css b/src/vs/workbench/parts/views/browser/media/views.css index 30eede64993ce..ec19ba40429f5 100644 --- a/src/vs/workbench/parts/views/browser/media/views.css +++ b/src/vs/workbench/parts/views/browser/media/views.css @@ -19,6 +19,12 @@ -webkit-font-smoothing: antialiased; } +.custom-view-tree-node-item > .custom-view-tree-node-item-label { + flex: 1; + text-overflow: ellipsis; + overflow: hidden; +} + .custom-view-tree-node-item > .custom-view-tree-node-item-label .label { vertical-align: middle; } \ No newline at end of file From 354e809c4a516785499b090c8d7f99ecd997231a Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sun, 21 May 2017 13:08:55 +0200 Subject: [PATCH 0823/2747] Avoid extension registry lookups for multiple equal activation events --- .../extensions/common/abstractExtensionService.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/vs/platform/extensions/common/abstractExtensionService.ts b/src/vs/platform/extensions/common/abstractExtensionService.ts index 25ae438be94f1..ed0525f99c000 100644 --- a/src/vs/platform/extensions/common/abstractExtensionService.ts +++ b/src/vs/platform/extensions/common/abstractExtensionService.ts @@ -28,6 +28,8 @@ interface IActivatingExtensionMap { [extensionId: string]: TPromise; } +const NO_OP_VOID_PROMISE = TPromise.as(void 0); + export abstract class AbstractExtensionService implements IExtensionService { public _serviceBrand: any; @@ -38,6 +40,11 @@ export abstract class AbstractExtensionService imp private _isReady: boolean; protected _registry: ExtensionDescriptionRegistry; + /** + * A map of already activated events to speed things up if the same activation event is triggered multiple times. + */ + private _alreadyActivatedEvents: { [activationEvent: string]: boolean; }; + constructor(isReadyByDefault: boolean) { if (isReadyByDefault) { this._isReady = true; @@ -54,6 +61,7 @@ export abstract class AbstractExtensionService imp this._activatingExtensions = {}; this._activatedExtensions = {}; this._registry = new ExtensionDescriptionRegistry(); + this._alreadyActivatedEvents = Object.create(null); } protected _triggerOnReady(): void { @@ -97,6 +105,9 @@ export abstract class AbstractExtensionService imp } public activateByEvent(activationEvent: string): TPromise { + if (this._alreadyActivatedEvents[activationEvent]) { + return NO_OP_VOID_PROMISE; + } if (this._isReady) { return this._activateByEvent(activationEvent); } else { @@ -106,7 +117,9 @@ export abstract class AbstractExtensionService imp private _activateByEvent(activationEvent: string): TPromise { let activateExtensions = this._registry.getExtensionDescriptionsForActivationEvent(activationEvent); - return this._activateExtensions(activateExtensions, 0); + return this._activateExtensions(activateExtensions, 0).then(() => { + this._alreadyActivatedEvents[activationEvent] = true; + }); } public activateById(extensionId: string): TPromise { From a0e4acb400f8386f7ecd2aac5aae4d3ab5131bfb Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sun, 21 May 2017 19:02:41 +0200 Subject: [PATCH 0824/2747] Simplify cursor events --- src/vs/editor/common/controller/cursor.ts | 7 +------ .../editor/common/controller/cursorEvents.ts | 20 ------------------- src/vs/monaco.d.ts | 20 ------------------- 3 files changed, 1 insertion(+), 46 deletions(-) diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 8dfcf3112e7af..a4999cb942af1 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -364,12 +364,9 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { } const e: ICursorPositionChangedEvent = { position: primaryPosition, - viewPosition: primaryViewPosition, secondaryPositions: secondaryPositions, - secondaryViewPositions: secondaryViewPositions, reason: reason, - source: source, - isInEditableRange: isInEditableRange + source: source }; this._eventEmitter.emit(CursorEventType.CursorPositionChanged, e); this._emit([new viewEvents.ViewCursorPositionChangedEvent(primaryViewPosition, secondaryViewPositions, isInEditableRange)]); @@ -386,9 +383,7 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { const e: ICursorSelectionChangedEvent = { selection: primarySelection, - viewSelection: primaryViewSelection, secondarySelections: secondarySelections, - secondaryViewSelections: secondaryViewSelections, source: source || 'keyboard', reason: reason }; diff --git a/src/vs/editor/common/controller/cursorEvents.ts b/src/vs/editor/common/controller/cursorEvents.ts index 01dc81093d403..1a1813499f945 100644 --- a/src/vs/editor/common/controller/cursorEvents.ts +++ b/src/vs/editor/common/controller/cursorEvents.ts @@ -57,18 +57,10 @@ export interface ICursorPositionChangedEvent { * Primary cursor's position. */ readonly position: Position; - /** - * Primary cursor's view position - */ - readonly viewPosition: Position; /** * Secondary cursors' position. */ readonly secondaryPositions: Position[]; - /** - * Secondary cursors' view position. - */ - readonly secondaryViewPositions: Position[]; /** * Reason. */ @@ -77,10 +69,6 @@ export interface ICursorPositionChangedEvent { * Source of the call that caused the event. */ readonly source: string; - /** - * Is the primary cursor in the editable range? - */ - readonly isInEditableRange: boolean; } /** * An event describing that the cursor selection has changed. @@ -90,18 +78,10 @@ export interface ICursorSelectionChangedEvent { * The primary selection. */ readonly selection: Selection; - /** - * The primary selection in view coordinates. - */ - readonly viewSelection: Selection; /** * The secondary selections. */ readonly secondarySelections: Selection[]; - /** - * The secondary selections in view coordinates. - */ - readonly secondaryViewSelections: Selection[]; /** * Source of the call that caused the event. */ diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 9c7b1c6cdfe59..83b45948f09ed 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2528,18 +2528,10 @@ declare module monaco.editor { * Primary cursor's position. */ readonly position: Position; - /** - * Primary cursor's view position - */ - readonly viewPosition: Position; /** * Secondary cursors' position. */ readonly secondaryPositions: Position[]; - /** - * Secondary cursors' view position. - */ - readonly secondaryViewPositions: Position[]; /** * Reason. */ @@ -2548,10 +2540,6 @@ declare module monaco.editor { * Source of the call that caused the event. */ readonly source: string; - /** - * Is the primary cursor in the editable range? - */ - readonly isInEditableRange: boolean; } /** @@ -2562,18 +2550,10 @@ declare module monaco.editor { * The primary selection. */ readonly selection: Selection; - /** - * The primary selection in view coordinates. - */ - readonly viewSelection: Selection; /** * The secondary selections. */ readonly secondarySelections: Selection[]; - /** - * The secondary selections in view coordinates. - */ - readonly secondaryViewSelections: Selection[]; /** * Source of the call that caused the event. */ From 4cecfd55399a41ea77421d879bde0635b205718b Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sun, 21 May 2017 19:05:50 +0200 Subject: [PATCH 0825/2747] Cursor position and selection change events are always emitted together --- src/vs/editor/common/controller/cursor.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index a4999cb942af1..42125c4c86f89 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -174,8 +174,7 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { const newViewSelections = this._cursors.getViewSelections(); if (Cursor._somethingChanged(oldSelections, oldViewSelections, newSelections, newViewSelections)) { - this._emitCursorPositionChanged(source, reason); - this._emitCursorSelectionChanged(source, reason); + this._emitStateChanged(source, reason); } } @@ -268,8 +267,7 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { this._cursors.dispose(); this._cursors = new CursorCollection(this.context); - this._emitCursorPositionChanged('model', CursorChangeReason.ContentFlush); - this._emitCursorSelectionChanged('model', CursorChangeReason.ContentFlush); + this._emitStateChanged('model', CursorChangeReason.ContentFlush); } else { const selectionsFromMarkers = this._cursors.readSelectionFromMarkers(); this.setStates('modelChange', CursorChangeReason.RecoverFromMarkers, CursorState.fromModelSelections(selectionsFromMarkers)); @@ -346,6 +344,11 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { // ----------------------------------------------------------------------------------------------------------- // ----- emitting events + private _emitStateChanged(source: string, reason: CursorChangeReason): void { + this._emitCursorPositionChanged(source, reason); + this._emitCursorSelectionChanged(source, reason); + } + private _emitCursorPositionChanged(source: string, reason: CursorChangeReason): void { const positions = this._cursors.getPositions(); const primaryPosition = positions[0]; @@ -503,9 +506,8 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { const newSelections = this._cursors.getSelections(); const newViewSelections = this._cursors.getViewSelections(); if (Cursor._somethingChanged(oldSelections, oldViewSelections, newSelections, newViewSelections)) { - this._emitCursorPositionChanged(source, cursorChangeReason); + this._emitStateChanged(source, cursorChangeReason); this._revealRange(RevealTarget.Primary, viewEvents.VerticalRevealType.Simple, true); - this._emitCursorSelectionChanged(source, cursorChangeReason); } } From 0e3d227c385ba9477501172efcbd9e45184d4a77 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sun, 21 May 2017 19:24:51 +0200 Subject: [PATCH 0826/2747] Cursor fires a single state change event containing both position & selection change details (#26730) --- src/vs/editor/common/commonCodeEditor.ts | 41 +++++++----- src/vs/editor/common/controller/cursor.ts | 67 ++++++++----------- .../editor/common/controller/cursorEvents.ts | 8 --- .../test/common/controller/cursor.test.ts | 28 +++----- 4 files changed, 60 insertions(+), 84 deletions(-) diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index edda01a3b786c..4b2a542f6738e 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -12,7 +12,7 @@ import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiati import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IContextKey, IContextKeyServiceTarget, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { CommonEditorConfiguration } from 'vs/editor/common/config/commonEditorConfig'; -import { Cursor } from 'vs/editor/common/controller/cursor'; +import { Cursor, CursorStateChangedEvent } from 'vs/editor/common/controller/cursor'; import { CursorColumns, ICursors, CursorConfiguration } from 'vs/editor/common/controller/cursorCommon'; import { Position, IPosition } from 'vs/editor/common/core/position'; import { Range, IRange } from 'vs/editor/common/core/range'; @@ -26,7 +26,7 @@ import { IModelLanguageChangedEvent, IModelOptionsChangedEvent, TextModelEventType } from 'vs/editor/common/model/textModelEvents'; import * as editorOptions from 'vs/editor/common/config/editorOptions'; -import { CursorEventType, ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; +import { ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { CommonEditorRegistry } from "vs/editor/common/editorCommonExtensions"; import { VerticalRevealType } from "vs/editor/common/view/viewEvents"; @@ -904,25 +904,30 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo this._createView(); - this.listenersToRemove.push(this.cursor.addBulkListener((events) => { - for (let i = 0, len = events.length; i < len; i++) { - let eventType = events[i].type; - let e = events[i].data; - - switch (eventType) { - case CursorEventType.CursorPositionChanged: - this._onDidChangeCursorPosition.fire(e); - break; + this.listenersToRemove.push(this.cursor.onDidChange((e: CursorStateChangedEvent) => { - case CursorEventType.CursorSelectionChanged: - this._onDidChangeCursorSelection.fire(e); - break; - - default: - // console.warn("Unhandled cursor event: ", e); - } + let positions: Position[] = []; + for (let i = 0, len = e.selections.length; i < len; i++) { + positions[i] = e.selections[i].getPosition(); } + + const e1: ICursorPositionChangedEvent = { + position: positions[0], + secondaryPositions: positions.slice(1), + reason: e.reason, + source: e.source + }; + this._onDidChangeCursorPosition.fire(e1); + + const e2: ICursorSelectionChangedEvent = { + selection: e.selections[0], + secondarySelections: e.selections.slice(1), + source: e.source, + reason: e.reason + }; + this._onDidChangeCursorSelection.fire(e2); })); + } else { this.hasView = false; } diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 42125c4c86f89..de0cbab7df3d8 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -7,8 +7,6 @@ import * as nls from 'vs/nls'; import * as strings from 'vs/base/common/strings'; import { onUnexpectedError } from 'vs/base/common/errors'; -import { EventEmitter, BulkListenerCallback } from 'vs/base/common/eventEmitter'; -import { IDisposable } from 'vs/base/common/lifecycle'; import { CursorCollection } from 'vs/editor/common/controller/cursorCollection'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; @@ -19,9 +17,10 @@ import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageCo import { DeleteOperations } from 'vs/editor/common/controller/cursorDeleteOperations'; import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; import { TextModelEventType, ModelRawContentChangedEvent, RawContentChangedType } from 'vs/editor/common/model/textModelEvents'; -import { CursorEventType, CursorChangeReason, ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; +import { CursorChangeReason } from 'vs/editor/common/controller/cursorEvents'; import { IViewModel } from "vs/editor/common/viewModel/viewModel"; import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import Event, { Emitter } from 'vs/base/common/event'; function containsLineMappingChanged(events: viewEvents.ViewEvent[]): boolean { for (let i = 0, len = events.length; i < len; i++) { @@ -32,19 +31,33 @@ function containsLineMappingChanged(events: viewEvents.ViewEvent[]): boolean { return false; } +export class CursorStateChangedEvent { + /** + * The new selections. + * The primary selection is always at index 0. + */ + readonly selections: Selection[]; + /** + * Source of the call that caused the event. + */ + readonly source: string; + /** + * Reason. + */ + readonly reason: CursorChangeReason; + + constructor(selections: Selection[], source: string, reason: CursorChangeReason) { + this.selections = selections; + this.source = source; + this.reason = reason; + } +} + export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { - public onDidChangePosition(listener: (e: ICursorPositionChangedEvent) => void): IDisposable { - return this._eventEmitter.addListener(CursorEventType.CursorPositionChanged, listener); - } - public onDidChangeSelection(listener: (e: ICursorSelectionChangedEvent) => void): IDisposable { - return this._eventEmitter.addListener(CursorEventType.CursorSelectionChanged, listener); - } - public addBulkListener(listener: BulkListenerCallback): IDisposable { - return this._eventEmitter.addBulkListener(listener); - } + private readonly _onDidChange: Emitter = this._register(new Emitter()); + public readonly onDidChange: Event = this._onDidChange.event; - private readonly _eventEmitter: EventEmitter; private readonly _configuration: editorCommon.IConfiguration; private readonly _model: editorCommon.IModel; private readonly _viewModel: IViewModel; @@ -57,7 +70,6 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { constructor(configuration: editorCommon.IConfiguration, model: editorCommon.IModel, viewModel: IViewModel) { super(); - this._eventEmitter = this._register(new EventEmitter()); this._configuration = configuration; this._model = model; this._viewModel = viewModel; @@ -345,14 +357,10 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { // ----- emitting events private _emitStateChanged(source: string, reason: CursorChangeReason): void { - this._emitCursorPositionChanged(source, reason); - this._emitCursorSelectionChanged(source, reason); - } + source = source || 'keyboard'; - private _emitCursorPositionChanged(source: string, reason: CursorChangeReason): void { const positions = this._cursors.getPositions(); const primaryPosition = positions[0]; - const secondaryPositions = positions.slice(1); const viewPositions = this._cursors.getViewPositions(); const primaryViewPosition = viewPositions[0]; @@ -365,32 +373,15 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { isInEditableRange = false; } } - const e: ICursorPositionChangedEvent = { - position: primaryPosition, - secondaryPositions: secondaryPositions, - reason: reason, - source: source - }; - this._eventEmitter.emit(CursorEventType.CursorPositionChanged, e); - this._emit([new viewEvents.ViewCursorPositionChangedEvent(primaryViewPosition, secondaryViewPositions, isInEditableRange)]); - } - private _emitCursorSelectionChanged(source: string, reason: CursorChangeReason): void { const selections = this._cursors.getSelections(); - const primarySelection = selections[0]; - const secondarySelections = selections.slice(1); const viewSelections = this._cursors.getViewSelections(); const primaryViewSelection = viewSelections[0]; const secondaryViewSelections = viewSelections.slice(1); - const e: ICursorSelectionChangedEvent = { - selection: primarySelection, - secondarySelections: secondarySelections, - source: source || 'keyboard', - reason: reason - }; - this._eventEmitter.emit(CursorEventType.CursorSelectionChanged, e); + this._onDidChange.fire(new CursorStateChangedEvent(selections, source, reason)); + this._emit([new viewEvents.ViewCursorPositionChangedEvent(primaryViewPosition, secondaryViewPositions, isInEditableRange)]); this._emit([new viewEvents.ViewCursorSelectionChangedEvent(primaryViewSelection, secondaryViewSelections)]); } diff --git a/src/vs/editor/common/controller/cursorEvents.ts b/src/vs/editor/common/controller/cursorEvents.ts index 1a1813499f945..9c7b978944573 100644 --- a/src/vs/editor/common/controller/cursorEvents.ts +++ b/src/vs/editor/common/controller/cursorEvents.ts @@ -8,14 +8,6 @@ import { Position } from 'vs/editor/common/core/position'; import { Selection } from 'vs/editor/common/core/selection'; -/** - * @internal - */ -export const CursorEventType = { - CursorPositionChanged: 'positionChanged', - CursorSelectionChanged: 'selectionChanged', -}; - /** * Describes the reason the cursor has changed its position. */ diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index 69351a8a81dfe..3eb3703c7c7fc 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -5,7 +5,7 @@ 'use strict'; import * as assert from 'assert'; -import { Cursor } from 'vs/editor/common/controller/cursor'; +import { Cursor, CursorStateChangedEvent } from 'vs/editor/common/controller/cursor'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; @@ -22,7 +22,6 @@ import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration import { MockMode } from 'vs/editor/test/common/mocks/mockMode'; import { LanguageIdentifier } from 'vs/editor/common/modes'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; -import { ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { CoreNavigationCommands, CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; import { withMockCodeEditor } from "vs/editor/test/common/mocks/mockCodeEditor"; import { TextModel } from "vs/editor/common/model/textModel"; @@ -642,10 +641,7 @@ suite('Editor Controller - Cursor', () => { // --------- eventing test('no move doesn\'t trigger event', () => { - thisCursor.onDidChangePosition((e) => { - assert.ok(false, 'was not expecting event'); - }); - thisCursor.onDidChangeSelection((e) => { + thisCursor.onDidChange((e) => { assert.ok(false, 'was not expecting event'); }); moveTo(thisCursor, 1, 1); @@ -653,30 +649,22 @@ suite('Editor Controller - Cursor', () => { test('move eventing', () => { let events = 0; - thisCursor.onDidChangePosition((e: ICursorPositionChangedEvent) => { - events++; - assert.deepEqual(e.position, new Position(1, 2)); - }); - thisCursor.onDidChangeSelection((e: ICursorSelectionChangedEvent) => { + thisCursor.onDidChange((e: CursorStateChangedEvent) => { events++; - assert.deepEqual(e.selection, new Selection(1, 2, 1, 2)); + assert.deepEqual(e.selections, [new Selection(1, 2, 1, 2)]); }); moveTo(thisCursor, 1, 2); - assert.equal(events, 2, 'receives 2 events'); + assert.equal(events, 1, 'receives 1 event'); }); test('move in selection mode eventing', () => { let events = 0; - thisCursor.onDidChangePosition((e: ICursorPositionChangedEvent) => { - events++; - assert.deepEqual(e.position, new Position(1, 2)); - }); - thisCursor.onDidChangeSelection((e: ICursorSelectionChangedEvent) => { + thisCursor.onDidChange((e: CursorStateChangedEvent) => { events++; - assert.deepEqual(e.selection, new Selection(1, 1, 1, 2)); + assert.deepEqual(e.selections, [new Selection(1, 1, 1, 2)]); }); moveTo(thisCursor, 1, 2, true); - assert.equal(events, 2, 'receives 2 events'); + assert.equal(events, 1, 'receives 1 event'); }); // --------- state save & restore From 7d098ad4e15859b2a8b870f9ce32ff800f63c287 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sun, 21 May 2017 20:37:07 +0200 Subject: [PATCH 0827/2747] Merge view cursor position & selection changed events into a single event (#26730) --- .../editor/browser/controller/mouseHandler.ts | 8 +-- .../browser/controller/textAreaHandler.ts | 4 +- .../currentLineHighlight.ts | 23 ++++--- .../currentLineMarginHighlight.ts | 10 ++- .../viewParts/lineNumbers/lineNumbers.ts | 5 +- .../overviewRuler/decorationsOverviewRuler.ts | 8 ++- .../viewParts/selections/selections.ts | 5 +- .../viewParts/viewCursors/viewCursors.ts | 31 +++++---- src/vs/editor/common/controller/cursor.ts | 13 +--- src/vs/editor/common/view/viewEvents.ts | 69 ++++++------------- .../common/viewModel/viewEventHandler.ts | 15 +--- 11 files changed, 81 insertions(+), 110 deletions(-) diff --git a/src/vs/editor/browser/controller/mouseHandler.ts b/src/vs/editor/browser/controller/mouseHandler.ts index c88d807bc5320..cc44acdd62d3f 100644 --- a/src/vs/editor/browser/controller/mouseHandler.ts +++ b/src/vs/editor/browser/controller/mouseHandler.ts @@ -134,8 +134,8 @@ export class MouseHandler extends ViewEventHandler { } // --- begin event handlers - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - this._mouseDownOperation.onCursorSelectionChanged(e); + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + this._mouseDownOperation.onCursorStateChanged(e); return false; } private _isFocused = false; @@ -411,8 +411,8 @@ class MouseDownOperation extends Disposable { }, 10); } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): void { - this._currentSelection = e.selection; + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): void { + this._currentSelection = e.selections[0]; } private _getPositionOutsideEditor(e: EditorMouseEvent): MouseTarget { diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index f5dab069f5889..8c8b4ae5b8334 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -292,8 +292,8 @@ export class TextAreaHandler extends ViewPart { return true; } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - this._selections = [e.selection].concat(e.secondarySelections); + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + this._selections = e.selections.slice(0); return true; } public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { diff --git a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts index cdc9c97ff256c..58e4ee7b40c08 100644 --- a/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts +++ b/src/vs/editor/browser/viewParts/currentLineHighlight/currentLineHighlight.ts @@ -63,25 +63,28 @@ export class CurrentLineHighlightOverlay extends DynamicViewOverlay { } return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { let hasChanged = false; + if (this._primaryCursorIsInEditableRange !== e.isInEditableRange) { this._primaryCursorIsInEditableRange = e.isInEditableRange; hasChanged = true; } - if (this._primaryCursorLineNumber !== e.position.lineNumber) { - this._primaryCursorLineNumber = e.position.lineNumber; + + const primaryCursorLineNumber = e.selections[0].positionLineNumber; + if (this._primaryCursorLineNumber !== primaryCursorLineNumber) { + this._primaryCursorLineNumber = primaryCursorLineNumber; hasChanged = true; } - return hasChanged; - } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - let isEmpty = e.selection.isEmpty(); - if (this._selectionIsEmpty !== isEmpty) { - this._selectionIsEmpty = isEmpty; + + const selectionIsEmpty = e.selections[0].isEmpty(); + if (this._selectionIsEmpty !== selectionIsEmpty) { + this._selectionIsEmpty = selectionIsEmpty; + hasChanged = true; return true; } - return false; + + return hasChanged; } public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { return true; diff --git a/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts b/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts index 2e0f6dbdb1535..38d980922e96f 100644 --- a/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts +++ b/src/vs/editor/browser/viewParts/currentLineMarginHighlight/currentLineMarginHighlight.ts @@ -54,16 +54,20 @@ export class CurrentLineMarginHighlightOverlay extends DynamicViewOverlay { } return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { let hasChanged = false; + if (this._primaryCursorIsInEditableRange !== e.isInEditableRange) { this._primaryCursorIsInEditableRange = e.isInEditableRange; hasChanged = true; } - if (this._primaryCursorLineNumber !== e.position.lineNumber) { - this._primaryCursorLineNumber = e.position.lineNumber; + + const primaryCursorLineNumber = e.selections[0].positionLineNumber; + if (this._primaryCursorLineNumber !== primaryCursorLineNumber) { + this._primaryCursorLineNumber = primaryCursorLineNumber; hasChanged = true; } + return hasChanged; } public onFlushed(e: viewEvents.ViewFlushedEvent): boolean { diff --git a/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts b/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts index 10db29cb72620..f22cabdff440a 100644 --- a/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts +++ b/src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts @@ -65,8 +65,9 @@ export class LineNumbersOverlay extends DynamicViewOverlay { this._readConfig(); return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { - this._lastCursorModelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(e.position); + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + const primaryViewPosition = e.selections[0].getPosition(); + this._lastCursorModelPosition = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(primaryViewPosition); if (this._renderRelativeLineNumbers) { return true; diff --git a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts index c64a856ba72e3..6f9f3e03b553f 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts @@ -122,10 +122,12 @@ export class DecorationsOverviewRuler extends ViewPart { return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { this._shouldUpdateCursorPosition = true; - this._cursorPositions = [e.position]; - this._cursorPositions = this._cursorPositions.concat(e.secondaryPositions); + this._cursorPositions = []; + for (let i = 0, len = e.selections.length; i < len; i++) { + this._cursorPositions[i] = e.selections[i].getPosition(); + } return true; } diff --git a/src/vs/editor/browser/viewParts/selections/selections.ts b/src/vs/editor/browser/viewParts/selections/selections.ts index a7939523df313..9d8e0168f256b 100644 --- a/src/vs/editor/browser/viewParts/selections/selections.ts +++ b/src/vs/editor/browser/viewParts/selections/selections.ts @@ -110,9 +110,8 @@ export class SelectionsOverlay extends DynamicViewOverlay { } return true; } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - this._selections = [e.selection]; - this._selections = this._selections.concat(e.secondarySelections); + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + this._selections = e.selections.slice(0); return true; } public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts index 4617e931f3158..566424aa72f72 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts @@ -99,41 +99,48 @@ export class ViewCursors extends ViewPart { } return true; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { - this._primaryCursor.onCursorPositionChanged(e.position, e.isInEditableRange); + private _onCursorPositionChanged(position: Position, secondaryPositions: Position[], isInEditableRange: boolean): void { + this._primaryCursor.onCursorPositionChanged(position, isInEditableRange); this._updateBlinking(); - if (this._secondaryCursors.length < e.secondaryPositions.length) { + if (this._secondaryCursors.length < secondaryPositions.length) { // Create new cursors - let addCnt = e.secondaryPositions.length - this._secondaryCursors.length; + let addCnt = secondaryPositions.length - this._secondaryCursors.length; for (let i = 0; i < addCnt; i++) { let newCursor = new ViewCursor(this._context, true); this._domNode.domNode.insertBefore(newCursor.getDomNode().domNode, this._primaryCursor.getDomNode().domNode.nextSibling); this._secondaryCursors.push(newCursor); } - } else if (this._secondaryCursors.length > e.secondaryPositions.length) { + } else if (this._secondaryCursors.length > secondaryPositions.length) { // Remove some cursors - let removeCnt = this._secondaryCursors.length - e.secondaryPositions.length; + let removeCnt = this._secondaryCursors.length - secondaryPositions.length; for (let i = 0; i < removeCnt; i++) { this._domNode.removeChild(this._secondaryCursors[0].getDomNode()); this._secondaryCursors.splice(0, 1); } } - for (let i = 0; i < e.secondaryPositions.length; i++) { - this._secondaryCursors[i].onCursorPositionChanged(e.secondaryPositions[i], e.isInEditableRange); + for (let i = 0; i < secondaryPositions.length; i++) { + this._secondaryCursors[i].onCursorPositionChanged(secondaryPositions[i], isInEditableRange); } - return true; } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { - let selectionIsEmpty = e.selection.isEmpty(); + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { + let positions: Position[] = []; + for (let i = 0, len = e.selections.length; i < len; i++) { + positions[i] = e.selections[i].getPosition(); + } + this._onCursorPositionChanged(positions[0], positions.slice(1), e.isInEditableRange); + + const selectionIsEmpty = e.selections[0].isEmpty(); if (this._selectionIsEmpty !== selectionIsEmpty) { this._selectionIsEmpty = selectionIsEmpty; this._updateDomClassName(); } - return false; + + return true; } + public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { // true for inline decorations that can end up relayouting text return true; diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index de0cbab7df3d8..5f35c0942dc8d 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -360,29 +360,20 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { source = source || 'keyboard'; const positions = this._cursors.getPositions(); - const primaryPosition = positions[0]; - - const viewPositions = this._cursors.getViewPositions(); - const primaryViewPosition = viewPositions[0]; - const secondaryViewPositions = viewPositions.slice(1); let isInEditableRange: boolean = true; if (this._model.hasEditableRange()) { const editableRange = this._model.getEditableRange(); - if (!editableRange.containsPosition(primaryPosition)) { + if (!editableRange.containsPosition(positions[0])) { isInEditableRange = false; } } const selections = this._cursors.getSelections(); - const viewSelections = this._cursors.getViewSelections(); - const primaryViewSelection = viewSelections[0]; - const secondaryViewSelections = viewSelections.slice(1); this._onDidChange.fire(new CursorStateChangedEvent(selections, source, reason)); - this._emit([new viewEvents.ViewCursorPositionChangedEvent(primaryViewPosition, secondaryViewPositions, isInEditableRange)]); - this._emit([new viewEvents.ViewCursorSelectionChangedEvent(primaryViewSelection, secondaryViewSelections)]); + this._emit([new viewEvents.ViewCursorStateChangedEvent(viewSelections, isInEditableRange)]); } private _revealRange(revealTarget: RevealTarget, verticalType: viewEvents.VerticalRevealType, revealHorizontal: boolean): void { diff --git a/src/vs/editor/common/view/viewEvents.ts b/src/vs/editor/common/view/viewEvents.ts index d100a0ca0ec55..e6388d47dd470 100644 --- a/src/vs/editor/common/view/viewEvents.ts +++ b/src/vs/editor/common/view/viewEvents.ts @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { ScrollEvent } from 'vs/base/common/scrollable'; @@ -14,21 +13,20 @@ import { IDisposable, Disposable } from "vs/base/common/lifecycle"; export const enum ViewEventType { ViewConfigurationChanged = 1, - ViewCursorPositionChanged = 2, - ViewCursorSelectionChanged = 3, - ViewDecorationsChanged = 4, - ViewFlushed = 5, - ViewFocusChanged = 6, - ViewLineMappingChanged = 7, - ViewLinesChanged = 8, - ViewLinesDeleted = 9, - ViewLinesInserted = 10, - ViewRevealRangeRequest = 11, - ViewScrollChanged = 12, - ViewTokensChanged = 13, - ViewTokensColorsChanged = 14, - ViewZonesChanged = 15, - ViewThemeChanged = 16 + ViewCursorStateChanged = 2, + ViewDecorationsChanged = 3, + ViewFlushed = 4, + ViewFocusChanged = 5, + ViewLineMappingChanged = 6, + ViewLinesChanged = 7, + ViewLinesDeleted = 8, + ViewLinesInserted = 9, + ViewRevealRangeRequest = 10, + ViewScrollChanged = 11, + ViewTokensChanged = 12, + ViewTokensColorsChanged = 13, + ViewZonesChanged = 14, + ViewThemeChanged = 15 } export class ViewConfigurationChangedEvent { @@ -60,49 +58,25 @@ export class ViewConfigurationChangedEvent { } } -export class ViewCursorPositionChangedEvent { +export class ViewCursorStateChangedEvent { - public readonly type = ViewEventType.ViewCursorPositionChanged; + public readonly type = ViewEventType.ViewCursorStateChanged; /** - * Primary cursor's position. + * The primary selection is always at index 0. */ - public readonly position: Position; - /** - * Secondary cursors' position. - */ - public readonly secondaryPositions: Position[]; + public readonly selections: Selection[]; /** * Is the primary cursor in the editable range? */ public readonly isInEditableRange: boolean; - constructor(position: Position, secondaryPositions: Position[], isInEditableRange: boolean) { - this.position = position; - this.secondaryPositions = secondaryPositions; + constructor(selections: Selection[], isInEditableRange: boolean) { + this.selections = selections; this.isInEditableRange = isInEditableRange; } } -export class ViewCursorSelectionChangedEvent { - - public readonly type = ViewEventType.ViewCursorSelectionChanged; - - /** - * The primary selection. - */ - public readonly selection: Selection; - /** - * The secondary selections. - */ - public readonly secondarySelections: Selection[]; - - constructor(selection: Selection, secondarySelections: Selection[]) { - this.selection = selection; - this.secondarySelections = secondarySelections; - } -} - export class ViewDecorationsChangedEvent { public readonly type = ViewEventType.ViewDecorationsChanged; @@ -304,8 +278,7 @@ export class ViewZonesChangedEvent { export type ViewEvent = ( ViewConfigurationChangedEvent - | ViewCursorPositionChangedEvent - | ViewCursorSelectionChangedEvent + | ViewCursorStateChangedEvent | ViewDecorationsChangedEvent | ViewFlushedEvent | ViewFocusChangedEvent diff --git a/src/vs/editor/common/viewModel/viewEventHandler.ts b/src/vs/editor/common/viewModel/viewEventHandler.ts index 6696cf63894ae..a3e03e9005deb 100644 --- a/src/vs/editor/common/viewModel/viewEventHandler.ts +++ b/src/vs/editor/common/viewModel/viewEventHandler.ts @@ -37,10 +37,7 @@ export class ViewEventHandler extends Disposable { public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { return false; } - public onCursorPositionChanged(e: viewEvents.ViewCursorPositionChangedEvent): boolean { - return false; - } - public onCursorSelectionChanged(e: viewEvents.ViewCursorSelectionChangedEvent): boolean { + public onCursorStateChanged(e: viewEvents.ViewCursorStateChangedEvent): boolean { return false; } public onDecorationsChanged(e: viewEvents.ViewDecorationsChangedEvent): boolean { @@ -100,14 +97,8 @@ export class ViewEventHandler extends Disposable { } break; - case viewEvents.ViewEventType.ViewCursorPositionChanged: - if (this.onCursorPositionChanged(e)) { - shouldRender = true; - } - break; - - case viewEvents.ViewEventType.ViewCursorSelectionChanged: - if (this.onCursorSelectionChanged(e)) { + case viewEvents.ViewEventType.ViewCursorStateChanged: + if (this.onCursorStateChanged(e)) { shouldRender = true; } break; From 1f74c219c38cea8b44a6773e69c9e73dfcdc3b91 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Sun, 21 May 2017 18:35:03 -0700 Subject: [PATCH 0828/2747] Fix #27034 - special case search string '--' --- src/vs/workbench/services/search/node/ripgrepTextSearch.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts index d70ff8bc2e297..50cd95218a9a9 100644 --- a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts +++ b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts @@ -428,6 +428,13 @@ function getRgArgs(config: IRawSearch): { args: string[], siblingClauses: glob.I args.push('--encoding', encoding.toCanonicalName(config.fileEncoding)); } + // Ripgrep handles -- as a -- arg separator. Only --. + // - is ok, --- is ok, --some-flag is handled as query text. Need to special case. + if (config.contentPattern.pattern === '--') { + config.contentPattern.isRegExp = true; + config.contentPattern.pattern = '\\-\\-'; + } + let searchPatternAfterDoubleDashes: string; if (config.contentPattern.isWordMatch) { const regexp = strings.createRegExp(config.contentPattern.pattern, config.contentPattern.isRegExp, { wholeWord: config.contentPattern.isWordMatch }); From 3382a888a9493d6c8ebabdaa6b312fe15952597a Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 21 May 2017 20:04:48 -0700 Subject: [PATCH 0829/2747] Remove node-pty.d.ts --- src/typings/node-pty.d.ts | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 src/typings/node-pty.d.ts diff --git a/src/typings/node-pty.d.ts b/src/typings/node-pty.d.ts deleted file mode 100644 index ef417f1156ed7..0000000000000 --- a/src/typings/node-pty.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -declare module 'node-pty' { - export function fork(file: string, args: string[], options: any): Terminal; - export function spawn(file: string, args: string[], options: any): Terminal; - export function createTerminal(file: string, args: string[], options: any): Terminal; - - export interface Terminal { - /** - * The title of the active process. - */ - process: string; - - on(event: string, callback: (data: any) => void): void; - - resize(columns: number, rows: number): void; - - write(data: string): void; - } -} \ No newline at end of file From 06e162bb2913ce6dd394bd01c7dc4be9a7aa5991 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 21 May 2017 20:16:06 -0700 Subject: [PATCH 0830/2747] node-pty@0.6.6 --- npm-shrinkwrap.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 35505b635ab55..d71aac6cdd1dc 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -338,9 +338,9 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" }, "node-pty": { - "version": "0.6.5", - "from": "node-pty@0.6.5", - "resolved": "https://registry.npmjs.org/node-pty/-/node-pty-0.6.5.tgz", + "version": "0.6.6", + "from": "node-pty@0.6.6", + "resolved": "https://registry.npmjs.org/node-pty/-/node-pty-0.6.6.tgz", "dependencies": { "nan": { "version": "2.5.0", diff --git a/package.json b/package.json index 817d3162edb35..9a92e4ce8d04b 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "jschardet": "^1.4.2", "minimist": "1.2.0", "native-keymap": "1.2.4", - "node-pty": "0.6.5", + "node-pty": "0.6.6", "semver": "4.3.6", "v8-profiler": "jrieken/v8-profiler#vscode", "vscode-debugprotocol": "1.19.0", From 7206748b49926b69c36a35fd506dbbc74c8151f0 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 22 May 2017 07:42:25 +0200 Subject: [PATCH 0831/2747] Theming: Allow to change the colour of warning/error squiggles (fixes #9819) --- .../editor/browser/widget/codeEditorWidget.ts | 51 ++++++++++++++++++- src/vs/editor/browser/widget/media/editor.css | 12 +---- .../editor/common/view/editorColorRegistry.ts | 10 ++-- 3 files changed, 56 insertions(+), 17 deletions(-) diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index ae2b1ad3ae93f..103e0f0956808 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -5,7 +5,6 @@ 'use strict'; import 'vs/css!./media/editor'; -import 'vs/editor/common/view/editorColorRegistry'; // initialze editor theming partcicpants import 'vs/css!./media/tokens'; import { onUnexpectedError } from 'vs/base/common/errors'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -31,7 +30,10 @@ import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IPosition } from 'vs/editor/common/core/position'; import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; import { CoreEditorCommand } from 'vs/editor/common/controller/coreCommands'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { isChrome } from "vs/base/browser/browser"; +import URI from "vs/base/common/uri"; +import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorErrorForeground, editorErrorBorder, editorWarningForeground, editorWarningBorder } from "vs/editor/common/view/editorColorRegistry"; export abstract class CodeEditorWidget extends CommonCodeEditor implements editorBrowser.ICodeEditor { @@ -545,3 +547,48 @@ class CodeEditorWidgetFocusTracker extends Disposable { return this._hasFocus; } } + +const errorIconPath = URI.parse(require.toUrl('vs/editor/browser/widget/media/red-squiggly.svg')).fsPath; +const warningIconPath = URI.parse(require.toUrl('vs/editor/browser/widget/media/green-squiggly.svg')).fsPath; +registerThemingParticipant((theme, collector) => { + + // webkit-mask only supported in chrome + if (isChrome) { + let errorForeground = theme.getColor(editorErrorForeground); + if (errorForeground) { + collector.addRule(`.monaco-editor .redsquiggly { background-color: ${errorForeground}; -webkit-mask: url("${errorIconPath}") repeat-x bottom left; }`); + } + + let errorBorderColor = theme.getColor(editorErrorBorder); + if (errorBorderColor) { + collector.addRule(`.monaco-editor .redsquiggly { border-bottom: 4px double ${errorBorderColor}; -webkit-mask: none; background: none; }`); + } + + let warningForeground = theme.getColor(editorWarningForeground); + if (warningForeground) { + collector.addRule(`.monaco-editor .greensquiggly { background-color: ${warningForeground}; -webkit-mask: url("${warningIconPath}") repeat-x bottom left; }`); + } + + let warningBorderColor = theme.getColor(editorWarningBorder); + if (warningBorderColor) { + collector.addRule(`.monaco-editor .greensquiggly { border-bottom: 4px double ${warningBorderColor}; -webkit-mask: none; background: none; }`); + } + } + + // Any other browser + else { + let errorBorderColor = theme.getColor(editorErrorBorder); + if (errorBorderColor) { + collector.addRule(`.monaco-editor .redsquiggly { border-bottom: 4px double ${errorBorderColor}; }`); + } else { + collector.addRule(`.monaco-editor .redsquiggly { background: url("${errorIconPath}") repeat-x bottom left; }`); + } + + let warningBorderColor = theme.getColor(editorWarningBorder); + if (warningBorderColor) { + collector.addRule(`.monaco-editor .greensquiggly { border-bottom: 4px double ${warningBorderColor}; }`); + } else { + collector.addRule(`.monaco-editor .greensquiggly { background: url("${warningIconPath}") repeat-x bottom left; }`); + } + } +}); \ No newline at end of file diff --git a/src/vs/editor/browser/widget/media/editor.css b/src/vs/editor/browser/widget/media/editor.css index 9f2a59b392a03..ca070ab9a21f7 100644 --- a/src/vs/editor/browser/widget/media/editor.css +++ b/src/vs/editor/browser/widget/media/editor.css @@ -40,14 +40,4 @@ .monaco-editor .view-overlays { position: absolute; top: 0; -} - -/* -------------------- Squigglies -------------------- */ - -.monaco-editor.vs .redsquiggly, -.monaco-editor.vs-dark .redsquiggly { background: url("red-squiggly.svg") repeat-x bottom left; } -.monaco-editor.hc-black .redsquiggly { border-bottom: 4px double #E47777; opacity: 0.8; } - -.monaco-editor.vs .greensquiggly, -.monaco-editor.vs-dark .greensquiggly { background: url("green-squiggly.svg") repeat-x bottom left; } -.monaco-editor.hc-black .greensquiggly { border-bottom: 4px double #71B771; opacity: 0.8; } +} \ No newline at end of file diff --git a/src/vs/editor/common/view/editorColorRegistry.ts b/src/vs/editor/common/view/editorColorRegistry.ts index 223e503e53a6c..9b72bd4af4481 100644 --- a/src/vs/editor/common/view/editorColorRegistry.ts +++ b/src/vs/editor/common/view/editorColorRegistry.ts @@ -29,10 +29,14 @@ export const editorOverviewRulerBorder = registerColor('editorOverviewRuler.bord export const editorGutter = registerColor('editorGutter.background', { dark: editorBackground, light: editorBackground, hc: editorBackground }, nls.localize('editorGutter', 'Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.')); +export const editorErrorForeground = registerColor('editorError.foreground', { dark: '#FF0000', light: '#FF0000', hc: null }, nls.localize('errorForeground', 'Foreground color of error squigglies in the editor.')); +export const editorErrorBorder = registerColor('editorError.border', { dark: null, light: null, hc: Color.fromHex('#E47777').transparent(0.8) }, nls.localize('errorBorder', 'Border color of error squigglies in the editor.')); + +export const editorWarningForeground = registerColor('editorWarning.foreground', { dark: '#008000', light: '#008000', hc: null }, nls.localize('warningForeground', 'Foreground color of warning squigglies in the editor.')); +export const editorWarningBorder = registerColor('editorWarning.border', { dark: null, light: null, hc: Color.fromHex('#71B771').transparent(0.8) }, nls.localize('warningBorder', 'Border color of warning squigglies in the editor.')); // contains all color rules that used to defined in editor/browser/widget/editor.css registerThemingParticipant((theme, collector) => { - let background = theme.getColor(editorBackground); if (background) { collector.addRule(`.monaco-editor, .monaco-editor .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${background}; }`); @@ -60,6 +64,4 @@ registerThemingParticipant((theme, collector) => { if (invisibles) { collector.addRule(`.vs-whitespace { color: ${invisibles} !important; }`); } -}); - - +}); \ No newline at end of file From 2dd19f6ecad4a2dc1fbc8ed92fb9e72bb4da00f6 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 22 May 2017 07:46:57 +0200 Subject: [PATCH 0832/2747] :lipstick: --- src/vs/workbench/electron-browser/workbench.ts | 12 ++++-------- .../parts/debug/browser/debugActionItems.ts | 17 +++++++---------- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index f14318b949a80..86c445e811c25 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -384,17 +384,13 @@ export class Workbench implements IPartService { } private createGlobalActions(): void { + const isDeveloping = !this.environmentService.isBuilt || this.environmentService.isExtensionDevelopment; - // Developer related actions - const developerCategory = localize('developer', "Developer"); + // Actions registered here to adjust for developing vs built workbench const workbenchActionsRegistry = Registry.as(Extensions.WorkbenchActions); - const isDeveloping = !this.environmentService.isBuilt || this.environmentService.isExtensionDevelopment; workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReloadWindowAction, ReloadWindowAction.ID, ReloadWindowAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyCode.KEY_R } : void 0), 'Reload Window'); - workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleDevToolsAction, ToggleDevToolsAction.ID, ToggleDevToolsAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_I, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_I } } : void 0), 'Developer: Toggle Developer Tools', developerCategory); - - // Action registered here to prevent a keybinding conflict with reload window - const fileCategory = localize('file', "File"); - workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenRecentAction, OpenRecentAction.ID, OpenRecentAction.LABEL, { primary: isDeveloping ? null : KeyMod.CtrlCmd | KeyCode.KEY_R, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R } }), 'File: Open Recent', fileCategory); + workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleDevToolsAction, ToggleDevToolsAction.ID, ToggleDevToolsAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_I, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_I } } : void 0), 'Developer: Toggle Developer Tools', localize('developer', "Developer")); + workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenRecentAction, OpenRecentAction.ID, OpenRecentAction.LABEL, { primary: isDeveloping ? null : KeyMod.CtrlCmd | KeyCode.KEY_R, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R } }), 'File: Open Recent', localize('file', "File")); } private resolveEditorsToOpen(): TPromise { diff --git a/src/vs/workbench/parts/debug/browser/debugActionItems.ts b/src/vs/workbench/parts/debug/browser/debugActionItems.ts index b81283f1ac149..8f83bebe2daa9 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionItems.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionItems.ts @@ -10,15 +10,16 @@ import { IAction, IActionRunner } from 'vs/base/common/actions'; import { KeyCode } from 'vs/base/common/keyCodes'; import * as dom from 'vs/base/browser/dom'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; -import { SelectBox, ISelectBoxStyles } from 'vs/base/browser/ui/selectBox/selectBox'; +import { SelectBox } from 'vs/base/browser/ui/selectBox/selectBox'; import { SelectActionItem, IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { EventEmitter } from 'vs/base/common/eventEmitter'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IDebugService } from 'vs/workbench/parts/debug/common/debug'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { attachSelectBoxStyler } from 'vs/platform/theme/common/styler'; +import { attachSelectBoxStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; +import { selectBorder } from "vs/platform/theme/common/colorRegistry"; const $ = dom.$; @@ -115,14 +116,10 @@ export class StartDebugActionItem extends EventEmitter implements IActionItem { event.stopPropagation(); } })); - this.toDispose.push(attachSelectBoxStyler({ - style: (colors: ISelectBoxStyles) => { - if (colors.selectBorder) { - this.container.style.borderColor = colors.selectBorder.toString(); - selectBoxContainer.style.borderLeftColor = colors.selectBorder.toString(); - } - } - }, this.themeService)); + this.toDispose.push(attachStylerCallback(this.themeService, { selectBorder }, colors => { + this.container.style.borderColor = colors.selectBorder; + selectBoxContainer.style.borderLeftColor = colors.selectBorder; + })); this.updateOptions(); } From 8986d52cfcab71521037ead805fe3d2c74ab4406 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 22 May 2017 07:48:40 +0200 Subject: [PATCH 0833/2747] Better support to use tree background color with contrast border (fixes #26218) --- src/vs/workbench/browser/part.ts | 5 +++++ src/vs/workbench/browser/parts/sidebar/sidebarPart.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/part.ts b/src/vs/workbench/browser/part.ts index a0cf82677f941..71e32226b2a8a 100644 --- a/src/vs/workbench/browser/part.ts +++ b/src/vs/workbench/browser/part.ts @@ -12,6 +12,7 @@ import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; export interface IPartOptions { hasTitle?: boolean; + borderWidth?: () => number; } /** @@ -130,6 +131,10 @@ export class PartLayout { // Content Size: Width (Fill), Height (Variable) const contentSize = new Dimension(width, height - titleSize.height); + if (this.options && typeof this.options.borderWidth === 'function') { + contentSize.width -= this.options.borderWidth(); // adjust for border size + } + sizes.push(titleSize); sizes.push(contentSize); diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index f9087b6c6ced4..747d240e069b7 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -63,7 +63,7 @@ export class SidebarPart extends CompositePart { Scope.VIEWLET, SIDE_BAR_TITLE_FOREGROUND, id, - { hasTitle: true } + { hasTitle: true, borderWidth: () => (this.getColor(SIDE_BAR_BORDER) || this.getColor(contrastBorder)) ? 1 : 0 } ); } From 9979c045e73dbb954853ebe05de11da893c93ec0 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 22 May 2017 07:51:55 +0200 Subject: [PATCH 0834/2747] Theming: introduce border colors for individual components to override contrastBorder (fixes #26530) --- src/vs/platform/theme/common/colorRegistry.ts | 3 +- .../parts/activitybar/activitybarPart.ts | 18 ++++----- .../parts/editor/editorGroupsControl.ts | 16 ++++---- .../browser/parts/panel/panelPart.ts | 8 ++-- .../browser/parts/sidebar/sidebarPart.ts | 16 ++++---- .../browser/parts/statusbar/statusbarPart.ts | 10 ++--- src/vs/workbench/common/theme.ts | 40 +++++++++++++++---- 7 files changed, 67 insertions(+), 44 deletions(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index d8aa35889d837..bc3da9fed1680 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -137,7 +137,6 @@ export const focusBorder = registerColor('focusBorder', { dark: Color.fromHex('# export const contrastBorder = registerColor('contrastBorder', { light: null, dark: null, hc: '#6FC3DF' }, nls.localize('contrastBorder', "An extra border around elements to separate them from others for greater contrast.")); export const activeContrastBorder = registerColor('contrastActiveBorder', { light: null, dark: null, hc: focusBorder }, nls.localize('activeContrastBorder', "An extra border around active elements to separate them from others for greater contrast.")); - export const selectionBackground = registerColor('selection.background', { light: null, dark: null, hc: null }, nls.localize('selectionBackground', "The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor and the terminal.")); // ------ text colors @@ -160,7 +159,7 @@ export const inputActiveOptionBorder = registerColor('inputOption.activeBorder', export const inputPlaceholderForeground = registerColor('input.placeholderForeground', { dark: null, light: null, hc: null }, nls.localize('inputPlaceholderForeground', "Input box foreground color for placeholder text.")); export const inputValidationInfoBackground = registerColor('inputValidation.infoBackground', { dark: '#063B49', light: '#D6ECF2', hc: Color.black }, nls.localize('inputValidationInfoBackground', "Input validation background color for information severity.")); -export const inputValidationInfoBorder = registerColor('inputValidation.infoBorder', { dark: '#55AAFF', light: '#55AAFF', hc: contrastBorder }, nls.localize('inputValidationInfoBorder', "Input validation border color for information severity.")); +export const inputValidationInfoBorder = registerColor('inputValidation.infoBorder', { dark: '#007acc', light: '#007acc', hc: contrastBorder }, nls.localize('inputValidationInfoBorder', "Input validation border color for information severity.")); export const inputValidationWarningBackground = registerColor('inputValidation.warningBackground', { dark: '#352A05', light: '#F6F5D2', hc: Color.black }, nls.localize('inputValidationWarningBackground', "Input validation background color for information warning.")); export const inputValidationWarningBorder = registerColor('inputValidation.warningBorder', { dark: '#B89500', light: '#B89500', hc: contrastBorder }, nls.localize('inputValidationWarningBorder', "Input validation border color for warning severity.")); export const inputValidationErrorBackground = registerColor('inputValidation.errorBackground', { dark: '#5A1D1D', light: '#F2DEDE', hc: Color.black }, nls.localize('inputValidationErrorBackground', "Input validation background color for error severity.")); diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index 8951ed6b9008a..d824b944e0c35 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -30,7 +30,7 @@ import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { ToggleActivityBarVisibilityAction } from 'vs/workbench/browser/actions/toggleActivityBarVisibility'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { ACTIVITY_BAR_BACKGROUND } from 'vs/workbench/common/theme'; +import { ACTIVITY_BAR_BACKGROUND, ACTIVITY_BAR_BORDER } from 'vs/workbench/common/theme'; import { contrastBorder } from 'vs/platform/theme/common/colorRegistry'; interface IViewletActivity { @@ -213,15 +213,15 @@ export class ActivitybarPart extends Part implements IActivityBarService { const background = this.getColor(ACTIVITY_BAR_BACKGROUND); container.style('background-color', background); - const contrastBorderColor = this.getColor(contrastBorder); + const borderColor = this.getColor(ACTIVITY_BAR_BORDER) || this.getColor(contrastBorder); const isPositionLeft = this.partService.getSideBarPosition() === SideBarPosition.LEFT; - container.style('box-sizing', contrastBorderColor && isPositionLeft ? 'border-box' : null); - container.style('border-right-width', contrastBorderColor && isPositionLeft ? '1px' : null); - container.style('border-right-style', contrastBorderColor && isPositionLeft ? 'solid' : null); - container.style('border-right-color', isPositionLeft ? contrastBorderColor : null); - container.style('border-left-width', contrastBorderColor && !isPositionLeft ? '1px' : null); - container.style('border-left-style', contrastBorderColor && !isPositionLeft ? 'solid' : null); - container.style('border-left-color', !isPositionLeft ? contrastBorderColor : null); + container.style('box-sizing', borderColor && isPositionLeft ? 'border-box' : null); + container.style('border-right-width', borderColor && isPositionLeft ? '1px' : null); + container.style('border-right-style', borderColor && isPositionLeft ? 'solid' : null); + container.style('border-right-color', isPositionLeft ? borderColor : null); + container.style('border-left-width', borderColor && !isPositionLeft ? '1px' : null); + container.style('border-left-style', borderColor && !isPositionLeft ? 'solid' : null); + container.style('border-left-color', !isPositionLeft ? borderColor : null); } private showContextMenu(e: MouseEvent): void { diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index dea7059b171f2..05bf24ac197bb 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -35,7 +35,7 @@ import { IWindowService } from 'vs/platform/windows/common/windows'; import { getCodeEditor } from 'vs/editor/common/services/codeEditorService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { editorBackground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; -import { Themable, EDITOR_GROUP_HEADER_TABS_BACKGROUND, EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND, EDITOR_GROUP_BORDER_COLOR, EDITOR_DRAG_AND_DROP_BACKGROUND, EDITOR_GROUP_BACKGROUND } from 'vs/workbench/common/theme'; +import { Themable, EDITOR_GROUP_HEADER_TABS_BACKGROUND, EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND, EDITOR_GROUP_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND, EDITOR_GROUP_BACKGROUND, EDITOR_GROUP_HEADER_TABS_BORDER } from 'vs/workbench/common/theme'; import { attachProgressBarStyler } from "vs/platform/theme/common/styler"; export enum Rochade { @@ -1011,19 +1011,19 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro silo.style('background-color', this.getColor(editorBackground)); // Border - silo.style('border-left-color', index > Position.ONE ? (this.getColor(EDITOR_GROUP_BORDER_COLOR) || this.getColor(contrastBorder)) : null); - silo.style('border-top-color', index > Position.ONE ? (this.getColor(EDITOR_GROUP_BORDER_COLOR) || this.getColor(contrastBorder)) : null); + silo.style('border-left-color', index > Position.ONE ? (this.getColor(EDITOR_GROUP_BORDER) || this.getColor(contrastBorder)) : null); + silo.style('border-top-color', index > Position.ONE ? (this.getColor(EDITOR_GROUP_BORDER) || this.getColor(contrastBorder)) : null); }); // Title control POSITIONS.forEach(position => { const container = this.getTitleAreaControl(position).getContainer(); - const contrastBorderColor = this.getColor(contrastBorder); + const borderColor = this.getColor(EDITOR_GROUP_HEADER_TABS_BORDER) || this.getColor(contrastBorder); container.style.backgroundColor = this.getColor(this.tabOptions.showTabs ? EDITOR_GROUP_HEADER_TABS_BACKGROUND : EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND); - container.style.borderBottomWidth = (contrastBorderColor && this.tabOptions.showTabs) ? '1px' : null; - container.style.borderBottomStyle = (contrastBorderColor && this.tabOptions.showTabs) ? 'solid' : null; - container.style.borderBottomColor = this.tabOptions.showTabs ? contrastBorderColor : null; + container.style.borderBottomWidth = (borderColor && this.tabOptions.showTabs) ? '1px' : null; + container.style.borderBottomStyle = (borderColor && this.tabOptions.showTabs) ? 'solid' : null; + container.style.borderBottomColor = this.tabOptions.showTabs ? borderColor : null; }); } @@ -1556,7 +1556,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro if (isDragging) { this.parent.addClass('dragging'); silo.addClass('dragging'); - borderColor = this.getColor(EDITOR_GROUP_BORDER_COLOR) || this.getColor(contrastBorder); + borderColor = this.getColor(EDITOR_GROUP_BORDER) || this.getColor(contrastBorder); } else { this.parent.removeClass('dragging'); silo.removeClass('dragging'); diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index 799e4ecc9c46f..f163fd6aa151b 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -25,7 +25,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { ActionsOrientation, ActionBar } from 'vs/base/browser/ui/actionbar/actionbar'; import { ClosePanelAction, PanelAction, ToggleMaximizedPanelAction } from 'vs/workbench/browser/parts/panel/panelActions'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; -import { PANEL_BACKGROUND, PANEL_BORDER_COLOR, PANEL_ACTIVE_TITLE_COLOR, PANEL_INACTIVE_TITLE_COLOR, PANEL_ACTIVE_TITLE_BORDER } from 'vs/workbench/common/theme'; +import { PANEL_BACKGROUND, PANEL_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_INACTIVE_TITLE_FOREGROUND, PANEL_ACTIVE_TITLE_BORDER } from 'vs/workbench/common/theme'; import { activeContrastBorder, focusBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; export class PanelPart extends CompositePart implements IPanelService { @@ -104,7 +104,7 @@ export class PanelPart extends CompositePart implements IPanelService { container.style('background-color', this.getColor(PANEL_BACKGROUND)); const title = this.getTitleArea(); - title.style('border-top-color', this.getColor(PANEL_BORDER_COLOR) || this.getColor(contrastBorder)); + title.style('border-top-color', this.getColor(PANEL_BORDER) || this.getColor(contrastBorder)); } public openPanel(id: string, focus?: boolean): TPromise { @@ -195,7 +195,7 @@ export class PanelPart extends CompositePart implements IPanelService { registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { // Title Active - const titleActive = theme.getColor(PANEL_ACTIVE_TITLE_COLOR); + const titleActive = theme.getColor(PANEL_ACTIVE_TITLE_FOREGROUND); const titleActiveBorder = theme.getColor(PANEL_ACTIVE_TITLE_BORDER); collector.addRule(` .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:hover .action-label, @@ -206,7 +206,7 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { `); // Title Inactive - const titleInactive = theme.getColor(PANEL_INACTIVE_TITLE_COLOR); + const titleInactive = theme.getColor(PANEL_INACTIVE_TITLE_FOREGROUND); collector.addRule(` .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label { color: ${titleInactive}; diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index 747d240e069b7..fa5d1156e363a 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -26,7 +26,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import Event from 'vs/base/common/event'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { contrastBorder } from 'vs/platform/theme/common/colorRegistry'; -import { SIDE_BAR_TITLE_FOREGROUND, SIDE_BAR_BACKGROUND, SIDE_BAR_FOREGROUND } from 'vs/workbench/common/theme'; +import { SIDE_BAR_TITLE_FOREGROUND, SIDE_BAR_BACKGROUND, SIDE_BAR_FOREGROUND, SIDE_BAR_BORDER } from 'vs/workbench/common/theme'; export class SidebarPart extends CompositePart { @@ -84,14 +84,14 @@ export class SidebarPart extends CompositePart { container.style('background-color', this.getColor(SIDE_BAR_BACKGROUND)); container.style('color', this.getColor(SIDE_BAR_FOREGROUND)); - const contrastBorderColor = this.getColor(contrastBorder); + const borderColor = this.getColor(SIDE_BAR_BORDER) || this.getColor(contrastBorder); const isPositionLeft = this.partService.getSideBarPosition() === SideBarPosition.LEFT; - container.style('border-right-width', contrastBorderColor && isPositionLeft ? '1px' : null); - container.style('border-right-style', contrastBorderColor && isPositionLeft ? 'solid' : null); - container.style('border-right-color', isPositionLeft ? contrastBorderColor : null); - container.style('border-left-width', contrastBorderColor && !isPositionLeft ? '1px' : null); - container.style('border-left-style', contrastBorderColor && !isPositionLeft ? 'solid' : null); - container.style('border-left-color', !isPositionLeft ? contrastBorderColor : null); + container.style('border-right-width', borderColor && isPositionLeft ? '1px' : null); + container.style('border-right-style', borderColor && isPositionLeft ? 'solid' : null); + container.style('border-right-color', isPositionLeft ? borderColor : null); + container.style('border-left-width', borderColor && !isPositionLeft ? '1px' : null); + container.style('border-left-style', borderColor && !isPositionLeft ? 'solid' : null); + container.style('border-left-color', !isPositionLeft ? borderColor : null); } public openViewlet(id: string, focus?: boolean): TPromise { diff --git a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts index 464a368ab25a8..4a23e5a2e9246 100644 --- a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts +++ b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts @@ -27,7 +27,7 @@ import { getCodeEditor } from 'vs/editor/common/services/codeEditorService'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { Action } from 'vs/base/common/actions'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; -import { STATUS_BAR_BACKGROUND, STATUS_BAR_FOREGROUND, STATUS_BAR_NO_FOLDER_BACKGROUND, STATUS_BAR_ITEM_HOVER_BACKGROUND, STATUS_BAR_ITEM_ACTIVE_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND } from 'vs/workbench/common/theme'; +import { STATUS_BAR_BACKGROUND, STATUS_BAR_FOREGROUND, STATUS_BAR_NO_FOLDER_BACKGROUND, STATUS_BAR_ITEM_HOVER_BACKGROUND, STATUS_BAR_ITEM_ACTIVE_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND, STATUS_BAR_BORDER } from 'vs/workbench/common/theme'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { contrastBorder } from 'vs/platform/theme/common/colorRegistry'; @@ -139,10 +139,10 @@ export class StatusbarPart extends Part implements IStatusbarService { container.style('color', this.getColor(STATUS_BAR_FOREGROUND)); container.style('background-color', this.getColor(this.contextService.hasWorkspace() ? STATUS_BAR_BACKGROUND : STATUS_BAR_NO_FOLDER_BACKGROUND)); - const contrastBorderColor = this.getColor(contrastBorder); - container.style('border-top-width', contrastBorderColor ? '1px' : null); - container.style('border-top-style', contrastBorderColor ? 'solid' : null); - container.style('border-top-color', contrastBorderColor); + const borderColor = this.getColor(STATUS_BAR_BORDER) || this.getColor(contrastBorder); + container.style('border-top-width', borderColor ? '1px' : null); + container.style('border-top-style', borderColor ? 'solid' : null); + container.style('border-top-color', borderColor); } private doCreateStatusItem(alignment: StatusbarAlignment, priority: number = 0): HTMLElement { diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 3ea47c3df774d..a7968aa55d3c4 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -56,13 +56,19 @@ export const EDITOR_GROUP_HEADER_TABS_BACKGROUND = registerColor('editorGroupHea hc: null }, nls.localize('tabsContainerBackground', "Background color of the editor group title header when tabs are enabled. Editor groups are the containers of editors.")); +export const EDITOR_GROUP_HEADER_TABS_BORDER = registerColor('editorGroupHeader.tabsBorder', { + dark: null, + light: null, + hc: contrastBorder +}, nls.localize('tabsContainerBorder', "Border color of the editor group title header when tabs are enabled. Editor groups are the containers of editors.")); + export const EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND = registerColor('editorGroupHeader.noTabsBackground', { dark: editorBackground, light: editorBackground, hc: editorBackground }, nls.localize('editorGroupHeaderBackground', "Background color of the editor group title header when tabs are disabled. Editor groups are the containers of editors.")); -export const EDITOR_GROUP_BORDER_COLOR = registerColor('editorGroup.border', { +export const EDITOR_GROUP_BORDER = registerColor('editorGroup.border', { dark: '#444444', light: '#E7E7E7', hc: contrastBorder @@ -84,27 +90,27 @@ export const PANEL_BACKGROUND = registerColor('panel.background', { hc: editorBackground }, nls.localize('panelBackground', "Panel background color. Panels are shown below the editor area and contain views like output and integrated terminal.")); -export const PANEL_BORDER_COLOR = registerColor('panel.border', { +export const PANEL_BORDER = registerColor('panel.border', { dark: Color.fromHex('#808080').transparent(0.35), light: Color.fromHex('#808080').transparent(0.35), hc: contrastBorder }, nls.localize('panelBorder', "Panel border color on the top separating to the editor. Panels are shown below the editor area and contain views like output and integrated terminal.")); -export const PANEL_ACTIVE_TITLE_COLOR = registerColor('panelTitle.activeForeground', { +export const PANEL_ACTIVE_TITLE_FOREGROUND = registerColor('panelTitle.activeForeground', { dark: '#E7E7E7', light: '#424242', hc: Color.white }, nls.localize('panelActiveTitleForeground', "Title color for the active panel. Panels are shown below the editor area and contain views like output and integrated terminal.")); -export const PANEL_INACTIVE_TITLE_COLOR = registerColor('panelTitle.inactiveForeground', { - dark: transparent(PANEL_ACTIVE_TITLE_COLOR, 0.5), - light: transparent(PANEL_ACTIVE_TITLE_COLOR, 0.75), +export const PANEL_INACTIVE_TITLE_FOREGROUND = registerColor('panelTitle.inactiveForeground', { + dark: transparent(PANEL_ACTIVE_TITLE_FOREGROUND, 0.5), + light: transparent(PANEL_ACTIVE_TITLE_FOREGROUND, 0.75), hc: Color.white }, nls.localize('panelInactiveTitleForeground', "Title color for the inactive panel. Panels are shown below the editor area and contain views like output and integrated terminal.")); export const PANEL_ACTIVE_TITLE_BORDER = registerColor('panelTitle.activeBorder', { - dark: PANEL_BORDER_COLOR, - light: PANEL_BORDER_COLOR, + dark: PANEL_BORDER, + light: PANEL_BORDER, hc: contrastBorder }, nls.localize('panelActiveTitleBorder', "Border color for the active panel title. Panels are shown below the editor area and contain views like output and integrated terminal.")); @@ -124,6 +130,12 @@ export const STATUS_BAR_BACKGROUND = registerColor('statusBar.background', { hc: null }, nls.localize('statusBarBackground', "Standard status bar background color. The status bar is shown in the bottom of the window.")); +export const STATUS_BAR_BORDER = registerColor('statusBar.border', { + dark: null, + light: null, + hc: contrastBorder +}, nls.localize('statusBarBorder', "Status bar border color separating to the sidebar and editor. The status bar is shown in the bottom of the window.")); + export const STATUS_BAR_NO_FOLDER_BACKGROUND = registerColor('statusBar.noFolderBackground', { dark: '#68217A', light: '#68217A', @@ -170,6 +182,12 @@ export const ACTIVITY_BAR_FOREGROUND = registerColor('activityBar.foreground', { hc: Color.white }, nls.localize('activityBarForeground', "Activity bar foreground color (e.g. used for the icons). The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); +export const ACTIVITY_BAR_BORDER = registerColor('activityBar.border', { + dark: null, + light: null, + hc: contrastBorder +}, nls.localize('activityBarBorder', "Activity bar border color separating to the side bar. The activity bar is showing on the far left or right and allows to switch between views of the side bar.")); + export const ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND = registerColor('activityBar.dropBackground', { dark: Color.white.transparent(0.12), light: Color.white.transparent(0.12), @@ -204,6 +222,12 @@ export const SIDE_BAR_FOREGROUND = registerColor('sideBar.foreground', { hc: null }, nls.localize('sideBarForeground', "Side bar foreground color. The side bar is the container for views like explorer and search.")); +export const SIDE_BAR_BORDER = registerColor('sideBar.border', { + dark: null, + light: null, + hc: contrastBorder +}, nls.localize('sideBarBorder', "Side bar border color on the side separating to the editor. The side bar is the container for views like explorer and search.")); + export const SIDE_BAR_TITLE_FOREGROUND = registerColor('sideBarTitle.foreground', { dark: SIDE_BAR_FOREGROUND, light: SIDE_BAR_FOREGROUND, From 9b63b6bea1d9cc40e3fc2c0cea4ee5fa5f0e4ed0 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 22 May 2017 07:56:57 +0200 Subject: [PATCH 0835/2747] Add commands to "list" for focusing the first and last child of the current tree (fixes #26827) --- .../quickopen/browser/quickOpenWidget.ts | 2 +- src/vs/base/parts/tree/browser/tree.ts | 10 ++- src/vs/base/parts/tree/browser/treeImpl.ts | 8 +- src/vs/base/parts/tree/browser/treeModel.ts | 32 +++++-- src/vs/workbench/electron-browser/commands.ts | 84 ++++++++++++------- 5 files changed, 88 insertions(+), 48 deletions(-) diff --git a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts index 035dbca0d27b2..5ac4eba897286 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts @@ -349,7 +349,7 @@ export class QuickOpenWidget implements IModelProvider { this.builder.style('color', foreground); this.builder.style('background-color', background); this.builder.style('border-color', borderColor); - this.builder.style('border-width', borderColor ? '2px' : null); + this.builder.style('border-width', borderColor ? '1px' : null); this.builder.style('border-style', borderColor ? 'solid' : null); this.builder.style('box-shadow', widgetShadow ? `0 5px 8px ${widgetShadow}` : null); } diff --git a/src/vs/base/parts/tree/browser/tree.ts b/src/vs/base/parts/tree/browser/tree.ts index 07943806dc2e7..2b03b5f138b76 100644 --- a/src/vs/base/parts/tree/browser/tree.ts +++ b/src/vs/base/parts/tree/browser/tree.ts @@ -283,9 +283,10 @@ export interface ITree extends Events.IEventEmitter { focusFirstChild(eventPayload?: any): void; /** - * Focuses the second element, in visible order. + * Focuses the second element, in visible order. Will focus the first + * child from the provided element's parent if any. */ - focusFirst(eventPayload?: any): void; + focusFirst(eventPayload?: any, from?: any): void; /** * Focuses the nth element, in visible order. @@ -293,9 +294,10 @@ export interface ITree extends Events.IEventEmitter { focusNth(index: number, eventPayload?: any): void; /** - * Focuses the last element, in visible order. + * Focuses the last element, in visible order. Will focus the last + * child from the provided element's parent if any. */ - focusLast(eventPayload?: any): void; + focusLast(eventPayload?: any, from?: any): void; /** * Focuses the element at the end of the next page, in visible order. diff --git a/src/vs/base/parts/tree/browser/treeImpl.ts b/src/vs/base/parts/tree/browser/treeImpl.ts index f2173a9bb2c4c..ba27e68884795 100644 --- a/src/vs/base/parts/tree/browser/treeImpl.ts +++ b/src/vs/base/parts/tree/browser/treeImpl.ts @@ -327,16 +327,16 @@ export class Tree extends Events.EventEmitter implements _.ITree { this.model.focusFirstChild(eventPayload); } - public focusFirst(eventPayload?: any): void { - this.model.focusFirst(eventPayload); + public focusFirst(eventPayload?: any, from?: any): void { + this.model.focusFirst(eventPayload, from); } public focusNth(index: number, eventPayload?: any): void { this.model.focusNth(index, eventPayload); } - public focusLast(eventPayload?: any): void { - this.model.focusLast(eventPayload); + public focusLast(eventPayload?: any, from?: any): void { + this.model.focusLast(eventPayload, from); } public focusNextPage(eventPayload?: any): void { diff --git a/src/vs/base/parts/tree/browser/treeModel.ts b/src/vs/base/parts/tree/browser/treeModel.ts index 1c47debd86198..a3fbdfa04d571 100644 --- a/src/vs/base/parts/tree/browser/treeModel.ts +++ b/src/vs/base/parts/tree/browser/treeModel.ts @@ -1207,12 +1207,13 @@ export class TreeModel extends Events.EventEmitter { } } - public focusFirst(eventPayload?: any): void { - this.focusNth(0, eventPayload); + public focusFirst(eventPayload?: any, from?: any): void { + this.focusNth(0, eventPayload, from); } - public focusNth(index: number, eventPayload?: any): void { - var nav = this.getNavigator(this.input); + public focusNth(index: number, eventPayload?: any, from?: any): void { + var navItem = this.getParent(from); + var nav = this.getNavigator(navItem); var item = nav.first(); for (var i = 0; i < index; i++) { item = nav.next(); @@ -1223,15 +1224,32 @@ export class TreeModel extends Events.EventEmitter { } } - public focusLast(eventPayload?: any): void { - var nav = this.getNavigator(this.input); - var item = nav.last(); + public focusLast(eventPayload?: any, from?: any): void { + var navItem = this.getParent(from); + var item: Item; + if (from) { + item = navItem.lastChild; + } else { + var nav = this.getNavigator(navItem); + item = nav.last(); + } if (item) { this.setFocus(item, eventPayload); } } + private getParent(from?: any): Item { + if (from) { + var fromItem = this.getItem(from); + if (fromItem && fromItem.parent) { + return fromItem.parent; + } + } + + return this.getItem(this.input); + } + public getNavigator(element: any = null, subTreeOnly: boolean = true): INavigator { return new TreeNavigator(this.getItem(element), subTreeOnly); } diff --git a/src/vs/workbench/electron-browser/commands.ts b/src/vs/workbench/electron-browser/commands.ts index 09956f9c775e9..e724e95e880e3 100644 --- a/src/vs/workbench/electron-browser/commands.ts +++ b/src/vs/workbench/electron-browser/commands.ts @@ -207,54 +207,74 @@ export function registerCommands(): void { weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), when: ListFocusContext, primary: KeyCode.Home, - handler: (accessor) => { - const listService = accessor.get(IListService); - const focused = listService.getFocused(); + handler: accessor => listFocusFirst(accessor) + }); - // List - if (focused instanceof List) { - const list = focused; + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: 'list.focusFirstChild', + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: ListFocusContext, + primary: null, + handler: accessor => listFocusFirst(accessor, { fromFocused: true }) + }); - list.setFocus([0]); - list.reveal(0); - } + function listFocusFirst(accessor: ServicesAccessor, options?: { fromFocused: boolean }): void { + const listService = accessor.get(IListService); + const focused = listService.getFocused(); - // Tree - else if (focused) { - const tree = focused; + // List + if (focused instanceof List) { + const list = focused; - tree.focusFirst({ origin: 'keyboard' }); - tree.reveal(tree.getFocus()).done(null, errors.onUnexpectedError); - } + list.setFocus([0]); + list.reveal(0); } - }); + + // Tree + else if (focused) { + const tree = focused; + + tree.focusFirst({ origin: 'keyboard' }, options && options.fromFocused ? tree.getFocus() : void 0); + tree.reveal(tree.getFocus()).done(null, errors.onUnexpectedError); + } + } KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.focusLast', weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), when: ListFocusContext, primary: KeyCode.End, - handler: (accessor) => { - const listService = accessor.get(IListService); - const focused = listService.getFocused(); + handler: accessor => listFocusLast(accessor) + }); - // List - if (focused instanceof List) { - const list = focused; + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: 'list.focusLastChild', + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(), + when: ListFocusContext, + primary: null, + handler: accessor => listFocusLast(accessor, { fromFocused: true }) + }); - list.setFocus([list.length - 1]); - list.reveal(list.length - 1); - } + function listFocusLast(accessor: ServicesAccessor, options?: { fromFocused: boolean }): void { + const listService = accessor.get(IListService); + const focused = listService.getFocused(); - // Tree - else if (focused) { - const tree = focused; + // List + if (focused instanceof List) { + const list = focused; - tree.focusLast({ origin: 'keyboard' }); - tree.reveal(tree.getFocus()).done(null, errors.onUnexpectedError); - } + list.setFocus([list.length - 1]); + list.reveal(list.length - 1); } - }); + + // Tree + else if (focused) { + const tree = focused; + + tree.focusLast({ origin: 'keyboard' }, options && options.fromFocused ? tree.getFocus() : void 0); + tree.reveal(tree.getFocus()).done(null, errors.onUnexpectedError); + } + } KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'list.select', From afb94f4ec09d01ae4d5214201c8562feca416301 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 22 May 2017 08:01:32 +0200 Subject: [PATCH 0836/2747] Launching Code to edit a file with an unsaved file from prior hot exit focuses incorrect file on start (fixes #26973) --- .../parts/backup/common/backupRestorer.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/parts/backup/common/backupRestorer.ts b/src/vs/workbench/parts/backup/common/backupRestorer.ts index 54d1e83289774..77603e199d9c0 100644 --- a/src/vs/workbench/parts/backup/common/backupRestorer.ts +++ b/src/vs/workbench/parts/backup/common/backupRestorer.ts @@ -83,26 +83,25 @@ export class BackupRestorer implements IWorkbenchContribution { private doOpenEditors(resources: URI[]): TPromise { const stacks = this.groupService.getStacksModel(); const hasOpenedEditors = stacks.groups.length > 0; - - const inputs = resources.map(resource => this.resolveInput(resource)); - const openEditorsArgs = inputs.map((input, index) => { - return { input, options: { pinned: true, preserveFocus: true, inactive: index > 0 || hasOpenedEditors }, position: Position.ONE }; - }); + const inputs = resources.map((resource, index) => this.resolveInput(resource, index, hasOpenedEditors)); // Open all remaining backups as editors and resolve them to load their backups - return this.editorService.openEditors(openEditorsArgs).then(() => void 0); + return this.editorService.openEditors(inputs.map(input => { return { input, position: Position.ONE }; })).then(() => void 0); } - private resolveInput(resource: URI): IResourceInput | IUntitledResourceInput { + private resolveInput(resource: URI, index: number, hasOpenedEditors: boolean): IResourceInput | IUntitledResourceInput { + const options = { pinned: true, preserveFocus: true, inactive: index > 0 || hasOpenedEditors }; + if (resource.scheme === 'untitled' && !BackupRestorer.UNTITLED_REGEX.test(resource.fsPath)) { // TODO@Ben debt: instead of guessing if an untitled file has an associated file path or not // this information should be provided by the backup service and stored as meta data within - return { filePath: resource.fsPath }; + return { filePath: resource.fsPath, options }; } - return { resource }; + return { resource, options }; } + public getId(): string { return 'vs.backup.backupRestorer'; } From bc46331a485d21bc8e5e2ca2081172238c7c4e9b Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 22 May 2017 09:46:40 +0200 Subject: [PATCH 0837/2747] tfs: upload darwin signed only --- build/package.json | 3 ++- build/tfs/common/publish.ts | 19 ++++++++++++++++--- build/tfs/darwin/build.sh | 4 ++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/build/package.json b/build/package.json index 8b510f182e957..ccd8c609141b6 100644 --- a/build/package.json +++ b/build/package.json @@ -12,6 +12,7 @@ "azure-storage": "^2.1.0", "documentdb": "^1.11.0", "mime": "^1.3.4", + "minimist": "^1.2.0", "typescript": "^2.2.2", "xml2js": "^0.4.17" }, @@ -20,4 +21,4 @@ "watch": "tsc --watch", "postinstall": "npm run compile" } -} \ No newline at end of file +} diff --git a/build/tfs/common/publish.ts b/build/tfs/common/publish.ts index 025689cea7db4..6ab683f963bb6 100644 --- a/build/tfs/common/publish.ts +++ b/build/tfs/common/publish.ts @@ -10,6 +10,7 @@ import { execSync } from 'child_process'; import * as crypto from 'crypto'; import * as azure from 'azure-storage'; import * as mime from 'mime'; +import * as minimist from 'minimist'; import { DocumentClient, NewDocument } from 'documentdb'; if (process.argv.length < 6) { @@ -137,7 +138,11 @@ async function uploadBlob(blobService: azure.BlobService, quality: string, blobN await new Promise((c, e) => blobService.createBlockBlobFromLocalFile(quality, blobName, file, blobOptions, err => err ? e(err) : c())); } -async function publish(commit: string, quality: string, platform: string, type: string, name: string, version: string, _isUpdate: string, file: string): Promise { +interface PublishOptions { + 'upload-only': boolean; +} + +async function publish(commit: string, quality: string, platform: string, type: string, name: string, version: string, _isUpdate: string, file: string, opts: PublishOptions): Promise { const isUpdate = _isUpdate === 'true'; const queuedBy = process.env['BUILD_QUEUEDBY']; @@ -193,6 +198,10 @@ async function publish(commit: string, quality: string, platform: string, type: console.log('Blobs successfully uploaded.'); + if (opts['upload-only']) { + return; + } + const config = await getConfig(quality); console.log('Quality config:', config); @@ -224,10 +233,14 @@ async function publish(commit: string, quality: string, platform: string, type: } function main(): void { - const [, , quality, platform, type, name, version, _isUpdate, file] = process.argv; + const opts = minimist(process.argv.slice(2), { + boolean: ['upload-only'] + }); + + const [quality, platform, type, name, version, _isUpdate, file] = opts._; const commit = execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim(); - publish(commit, quality, platform, type, name, version, _isUpdate, file).catch(err => { + publish(commit, quality, platform, type, name, version, _isUpdate, file, opts).catch(err => { console.error(err); process.exit(1); }); diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index 0a17036d857b8..1f569cf74f25b 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -46,8 +46,8 @@ rm -rf $UNSIGNEDZIP step "Create unsigned archive" \ zip -r -X -y $UNSIGNEDZIP *) -step "Publish unsigned archive" \ - node build/tfs/common/publish.js $VSCODE_QUALITY darwin archive-unsigned VSCode-darwin-$VSCODE_QUALITY-unsigned.zip $VERSION false $UNSIGNEDZIP +step "Upload unsigned archive" \ + node build/tfs/common/publish.js --upload-only $VSCODE_QUALITY darwin archive-unsigned VSCode-darwin-$VSCODE_QUALITY-unsigned.zip $VERSION false $UNSIGNEDZIP step "Sign build" \ node build/tfs/common/enqueue.js $VSCODE_QUALITY \ No newline at end of file From 72f279e0ad9a21a089acc757cff68d52ccd7d6c5 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 May 2017 09:52:16 +0200 Subject: [PATCH 0838/2747] Fix #27057 --- .../parts/extensions/electron-browser/extensionsViewlet.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts index 59764a21fb627..a6047bd0b2511 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts @@ -32,7 +32,7 @@ import { Delegate, Renderer } from 'vs/workbench/parts/extensions/browser/extens import { IExtensionsWorkbenchService, IExtension, IExtensionsViewlet, VIEWLET_ID, ExtensionState } from '../common/extensions'; import { ShowRecommendedExtensionsAction, ShowWorkspaceRecommendedExtensionsAction, ShowRecommendedKeymapExtensionsAction, ShowPopularExtensionsAction, ShowInstalledExtensionsAction, ShowDisabledExtensionsAction, - ShowOutdatedExtensionsAction, ClearExtensionsInputAction, ChangeSortAction, UpdateAllAction, CheckForUpdatesAction + ShowOutdatedExtensionsAction, ClearExtensionsInputAction, ChangeSortAction, UpdateAllAction, CheckForUpdatesAction, DisableAllAction, EnableAllAction } from 'vs/workbench/parts/extensions/browser/extensionsActions'; import { InstallVSIXAction } from 'vs/workbench/parts/extensions/electron-browser/extensionsActions'; import { IExtensionManagementService, IExtensionGalleryService, IExtensionTipsService, SortBy, SortOrder, IQueryOptions, LocalExtensionType } from 'vs/platform/extensionManagement/common/extensionManagement'; @@ -207,7 +207,10 @@ export class ExtensionsViewlet extends Viewlet implements IExtensionsViewlet { new Separator(), this.instantiationService.createInstance(CheckForUpdatesAction, CheckForUpdatesAction.ID, CheckForUpdatesAction.LABEL), this.instantiationService.createInstance(UpdateAllAction, UpdateAllAction.ID, UpdateAllAction.LABEL), - this.instantiationService.createInstance(InstallVSIXAction, InstallVSIXAction.ID, InstallVSIXAction.LABEL) + this.instantiationService.createInstance(InstallVSIXAction, InstallVSIXAction.ID, InstallVSIXAction.LABEL), + new Separator(), + this.instantiationService.createInstance(DisableAllAction, DisableAllAction.ID, DisableAllAction.LABEL), + this.instantiationService.createInstance(EnableAllAction, EnableAllAction.ID, EnableAllAction.LABEL) ]; } From 6a35450384591b30bef5dca578cfc63051b47e09 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 22 May 2017 10:09:41 +0200 Subject: [PATCH 0839/2747] Fixes #26934. --- src/vs/workbench/parts/debug/browser/linkDetector.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/browser/linkDetector.ts b/src/vs/workbench/parts/debug/browser/linkDetector.ts index e75ea50966428..d2fd4efab48df 100644 --- a/src/vs/workbench/parts/debug/browser/linkDetector.ts +++ b/src/vs/workbench/parts/debug/browser/linkDetector.ts @@ -47,7 +47,8 @@ export class LinkDetector { while (match !== null) { let resource: uri = null; try { - resource = (match && !strings.startsWith(match[0], 'http')) && (match[2] ? uri.file(match[1]) : this.contextService.toResource(match[1])); + resource = (match && !strings.startsWith(match[0], 'http')) + && (match[2] || strings.startsWith(match[0], '/') ? uri.file(match[1]) : this.contextService.toResource(match[1])); } catch (e) { } if (!resource) { From f595041a10d34464c713afd9193b063d52e37dba Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 22 May 2017 10:19:37 +0200 Subject: [PATCH 0840/2747] tfs: fix darwin build --- build/tfs/common/enqueue.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tfs/common/enqueue.ts b/build/tfs/common/enqueue.ts index 875227bdd39f2..61e1171f2eb66 100644 --- a/build/tfs/common/enqueue.ts +++ b/build/tfs/common/enqueue.ts @@ -41,7 +41,7 @@ function isBuildSigned(quality: string, commit: string): Promise { return new Promise((c, e) => { client.queryDocuments(collection, updateQuery).toArray((err, results) => { if (err) { return e(err); } - if (results.length !== 1) { return e(new Error('No such build')); } + if (results.length !== 1) { return c(false); } const [release] = results; const assets: Asset[] = release.assets; From fd141660a8bc4b363461600849137d0712d7f61e Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 22 May 2017 10:25:02 +0200 Subject: [PATCH 0841/2747] tfs: darwin still publish build, but not asset --- build/tfs/common/publish.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/build/tfs/common/publish.ts b/build/tfs/common/publish.ts index 6ab683f963bb6..d7a31ce7440a5 100644 --- a/build/tfs/common/publish.ts +++ b/build/tfs/common/publish.ts @@ -198,10 +198,6 @@ async function publish(commit: string, quality: string, platform: string, type: console.log('Blobs successfully uploaded.'); - if (opts['upload-only']) { - return; - } - const config = await getConfig(quality); console.log('Quality config:', config); @@ -221,12 +217,16 @@ async function publish(commit: string, quality: string, platform: string, type: isReleased: config.frozen ? false : isReleased, sourceBranch, queuedBy, - assets: [asset], + assets: [], updates: {} as any }; - if (isUpdate) { - release.updates[platform] = type; + if (!opts['upload-only']) { + release.assets.push(asset); + + if (isUpdate) { + release.updates[platform] = type; + } } await createOrUpdate(commit, quality, platform, type, release, asset, isUpdate); From 2a51ece444b5a7a36ea20a469aaba28e98f6e595 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 22 May 2017 10:29:54 +0200 Subject: [PATCH 0842/2747] fix #26995 --- src/vs/base/common/filters.ts | 1 + src/vs/base/test/common/filters.test.ts | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index 360da9f2384d5..19056d36a50f7 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -446,6 +446,7 @@ _seps['/'] = true; _seps['\\'] = true; _seps['\''] = true; _seps['"'] = true; +_seps[':'] = true; const enum Arrow { Top = 0b1, Diag = 0b10, Left = 0b100 } diff --git a/src/vs/base/test/common/filters.test.ts b/src/vs/base/test/common/filters.test.ts index 1e9a6a1e713ce..ed8f708e757d4 100644 --- a/src/vs/base/test/common/filters.test.ts +++ b/src/vs/base/test/common/filters.test.ts @@ -320,6 +320,11 @@ suite('Filters', () => { ); }); + test('Fuzzy IntelliSense matching vs Haxe metadata completion, #26995', function () { + assertMatches('f', ':Foo', ':^Foo', fuzzyScore); + assertMatches('f', ':foo', ':^foo', fuzzyScore); + }); + function assertTopScore(filter: typeof fuzzyScore, pattern: string, expected: number, ...words: string[]) { let topScore = -(100 * 10); let topIdx = 0; From 16b3399e17e8f8742bb5877ec6ce7f75eb458624 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 22 May 2017 11:05:50 +0200 Subject: [PATCH 0843/2747] hc theme status bar: back to black like amy winehouse --- extensions/theme-defaults/themes/hc_black.json | 1 - 1 file changed, 1 deletion(-) diff --git a/extensions/theme-defaults/themes/hc_black.json b/extensions/theme-defaults/themes/hc_black.json index 0db3c99f1fc62..5cadf6c65cf9c 100644 --- a/extensions/theme-defaults/themes/hc_black.json +++ b/extensions/theme-defaults/themes/hc_black.json @@ -4,7 +4,6 @@ "include": "./hc_black_defaults.json", "colors": { "selection.background": "#008000", - "statusBar.background": "#008000", "editor.selectionBackground": "#FFFFFF" }, "tokenColors": [ From ed298f91c6f5d46ebaece4cf72d1254d653a8eb2 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 22 May 2017 11:25:18 +0200 Subject: [PATCH 0844/2747] do not do FilePUT for all files inside .vscode folder --- .../services/textfile/common/textFileEditorModel.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts index debbf1fc9722f..eb3a76b87b1b6 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts @@ -18,12 +18,13 @@ import diagnostics = require('vs/base/common/diagnostics'); import types = require('vs/base/common/types'); import { IMode } from 'vs/editor/common/modes'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITextFileService, IAutoSaveConfiguration, ModelState, ITextFileEditorModel, IModelSaveOptions, ISaveErrorHandler, ISaveParticipant, StateChange, SaveReason, IRawTextContent } from 'vs/workbench/services/textfile/common/textfiles'; import { EncodingMode, EditorModel } from 'vs/workbench/common/editor'; import { BaseTextEditorModel } from 'vs/workbench/common/editor/textEditorModel'; import { IBackupFileService, BACKUP_FILE_RESOLVE_OPTIONS } from 'vs/workbench/services/backup/common/backup'; -import { IFileService, IFileStat, IFileOperationResult, FileOperationResult, IContent, CONTENT_CHANGE_EVENT_BUFFER_DELAY, FileChangesEvent, FileChangeType } from 'vs/platform/files/common/files'; +import { IFileService, IFileStat, IFileOperationResult, FileOperationResult, IContent, CONTENT_CHANGE_EVENT_BUFFER_DELAY, FileChangesEvent, FileChangeType, isEqualOrParent } from 'vs/platform/files/common/files'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IModeService } from 'vs/editor/common/services/modeService'; @@ -83,7 +84,8 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil @ITelemetryService private telemetryService: ITelemetryService, @ITextFileService private textFileService: ITextFileService, @IBackupFileService private backupFileService: IBackupFileService, - @IEnvironmentService private environmentService: IEnvironmentService + @IEnvironmentService private environmentService: IEnvironmentService, + @IWorkspaceContextService private contextService: IWorkspaceContextService ) { super(modelService, modeService); @@ -667,8 +669,9 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil diag(`doSave(${versionId}) - after updateContent()`, this.resource, new Date()); // Telemetry - if (this.resource.fsPath === this.environmentService.appSettingsPath) { - // Do not log write to settings.json as a filePUT event as it ruins our JSON usage data + if ((this.contextService.getWorkspace() && isEqualOrParent(this.resource.fsPath, this.contextService.toResource('.vscode').fsPath)) || + this.resource.fsPath === this.environmentService.appSettingsPath) { + // Do not log write to user settings.json and .vscode folder as a filePUT event as it ruins our JSON usage data this.telemetryService.publicLog('settingsWritten'); } else { this.telemetryService.publicLog('filePUT', { mimeType: guessMimeTypes(this.resource.fsPath).join(', '), ext: paths.extname(this.lastResolvedDiskStat.resource.fsPath) }); From 2d0ef8fd56083a24dd1de3be450f525e6aed655e Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sun, 21 May 2017 21:11:54 +0200 Subject: [PATCH 0845/2747] Clean up accessibility tree --- src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts | 2 ++ src/vs/editor/browser/viewParts/minimap/minimap.ts | 2 ++ src/vs/editor/browser/viewParts/rulers/rulers.ts | 2 ++ .../browser/viewParts/scrollDecoration/scrollDecoration.ts | 2 ++ src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts | 2 -- src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts | 2 ++ 6 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts index 9d6879f176f3b..243d62b86f5d8 100644 --- a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts @@ -68,6 +68,8 @@ export abstract class AbstractScrollbar extends Widget { this._mouseMoveMonitor = this._register(new GlobalMouseMoveMonitor()); this._shouldRender = true; this.domNode = createFastDomNode(document.createElement('div')); + this.domNode.setAttribute('role', 'presentation'); + this.domNode.setAttribute('aria-hidden', 'true'); this._visibilityController.setDomNode(this.domNode); this.domNode.setPosition('absolute'); diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index 0b0f19f012e74..9c922137edeba 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -442,6 +442,8 @@ export class Minimap extends ViewPart { PartFingerprints.write(this._domNode, PartFingerprint.Minimap); this._domNode.setClassName('minimap'); this._domNode.setPosition('absolute'); + this._domNode.setAttribute('role', 'presentation'); + this._domNode.setAttribute('aria-hidden', 'true'); this._domNode.setRight(this._context.configuration.editor.layoutInfo.verticalScrollbarWidth); this._shadow = createFastDomNode(document.createElement('div')); diff --git a/src/vs/editor/browser/viewParts/rulers/rulers.ts b/src/vs/editor/browser/viewParts/rulers/rulers.ts index 56aa748b01972..852eb07fb2c6a 100644 --- a/src/vs/editor/browser/viewParts/rulers/rulers.ts +++ b/src/vs/editor/browser/viewParts/rulers/rulers.ts @@ -25,6 +25,8 @@ export class Rulers extends ViewPart { constructor(context: ViewContext) { super(context); this.domNode = createFastDomNode(document.createElement('div')); + this.domNode.setAttribute('role', 'presentation'); + this.domNode.setAttribute('aria-hidden', 'true'); this.domNode.setClassName('view-rulers'); this._renderedRulers = []; this._rulers = this._context.configuration.editor.viewInfo.rulers; diff --git a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts index 3b4252ea03592..92134f722a11f 100644 --- a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts +++ b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts @@ -31,6 +31,8 @@ export class ScrollDecorationViewPart extends ViewPart { this._shouldShow = false; this._useShadows = this._context.configuration.editor.viewInfo.scrollbar.useShadows; this._domNode = createFastDomNode(document.createElement('div')); + this._domNode.setAttribute('role', 'presentation'); + this._domNode.setAttribute('aria-hidden', 'true'); } public dispose(): void { diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts index 974facb28f278..babe35b4178ae 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts @@ -72,8 +72,6 @@ export class ViewCursor { this._domNode.setHeight(this._lineHeight); this._domNode.setTop(0); this._domNode.setLeft(0); - this._domNode.setAttribute('role', 'presentation'); - this._domNode.setAttribute('aria-hidden', 'true'); Configuration.applyFontInfo(this._domNode, this._context.configuration.editor.fontInfo); this._domNode.setDisplay('none'); diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts index 566424aa72f72..a5362a124b8f0 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursors.ts @@ -54,6 +54,8 @@ export class ViewCursors extends ViewPart { this._renderData = []; this._domNode = createFastDomNode(document.createElement('div')); + this._domNode.setAttribute('role', 'presentation'); + this._domNode.setAttribute('aria-hidden', 'true'); this._updateDomClassName(); this._domNode.appendChild(this._primaryCursor.getDomNode()); From 8d30b30eea0a17055a1e60cf7d65870290604c76 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 22 May 2017 11:31:25 +0200 Subject: [PATCH 0846/2747] Let the view get cursor state change events first --- src/vs/editor/browser/controller/textAreaHandler.css | 4 ++++ src/vs/editor/common/controller/cursor.ts | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/browser/controller/textAreaHandler.css b/src/vs/editor/browser/controller/textAreaHandler.css index 69fe6c8497a70..19036f1115f5d 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.css +++ b/src/vs/editor/browser/controller/textAreaHandler.css @@ -24,6 +24,10 @@ left: initial !important; bottom: 0 !important; right: 0 !important; + color: black !important; + background: white !important; + line-height: 15px !important; + font-size: 14px !important; }*/ .monaco-editor .inputarea.ime-input { z-index: 10; diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 5f35c0942dc8d..e4cbc84ef08c1 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -372,8 +372,11 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { const selections = this._cursors.getSelections(); const viewSelections = this._cursors.getViewSelections(); - this._onDidChange.fire(new CursorStateChangedEvent(selections, source, reason)); + // Let the view get the event first. this._emit([new viewEvents.ViewCursorStateChangedEvent(viewSelections, isInEditableRange)]); + + // Only after the view has been notified, let the rest of the world know... + this._onDidChange.fire(new CursorStateChangedEvent(selections, source, reason)); } private _revealRange(revealTarget: RevealTarget, verticalType: viewEvents.VerticalRevealType, revealHorizontal: boolean): void { From 8aa69c52424340c6721a44c1cf3161c26b6be336 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 May 2017 11:32:55 +0200 Subject: [PATCH 0847/2747] Fix twistie alignment in views --- src/vs/workbench/parts/views/browser/media/views.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/vs/workbench/parts/views/browser/media/views.css b/src/vs/workbench/parts/views/browser/media/views.css index ec19ba40429f5..5eceb636e9183 100644 --- a/src/vs/workbench/parts/views/browser/media/views.css +++ b/src/vs/workbench/parts/views/browser/media/views.css @@ -23,8 +23,4 @@ flex: 1; text-overflow: ellipsis; overflow: hidden; -} - -.custom-view-tree-node-item > .custom-view-tree-node-item-label .label { - vertical-align: middle; } \ No newline at end of file From e8c9db130067f7b963da30ec1ea83b1015a70f68 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 22 May 2017 11:38:41 +0200 Subject: [PATCH 0848/2747] fix aria role for expanded (do not use "undefined") --- src/vs/base/parts/tree/browser/treeView.ts | 2 +- src/vs/editor/contrib/find/browser/findWidget.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/base/parts/tree/browser/treeView.ts b/src/vs/base/parts/tree/browser/treeView.ts index 0836cf0bbecbb..ca7ec266b4286 100644 --- a/src/vs/base/parts/tree/browser/treeView.ts +++ b/src/vs/base/parts/tree/browser/treeView.ts @@ -215,7 +215,7 @@ export class ViewItem implements IViewItem { this.element.removeAttribute('aria-labelledby'); } if (this.model.hasChildren()) { - this.element.setAttribute('aria-expanded', String(this.model.isExpanded())); + this.element.setAttribute('aria-expanded', String(!!this.model.isExpanded())); } else { this.element.removeAttribute('aria-expanded'); } diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index 70b5df9beb50c..052efed4506d4 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -893,7 +893,7 @@ class SimpleButton extends Widget { } public setExpanded(expanded: boolean): void { - this._domNode.setAttribute('aria-expanded', String(expanded)); + this._domNode.setAttribute('aria-expanded', String(!!expanded)); } public toggleClass(className: string, shouldHaveIt: boolean): void { From fd2965124f912382ebe6d146f95c269f0b0b2537 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 22 May 2017 11:43:35 +0200 Subject: [PATCH 0849/2747] don't send vm hint as common property --- src/vs/platform/telemetry/node/workbenchCommonProperties.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vs/platform/telemetry/node/workbenchCommonProperties.ts b/src/vs/platform/telemetry/node/workbenchCommonProperties.ts index 95f3e801d3529..570bac18d00b1 100644 --- a/src/vs/platform/telemetry/node/workbenchCommonProperties.ts +++ b/src/vs/platform/telemetry/node/workbenchCommonProperties.ts @@ -9,7 +9,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import * as errors from 'vs/base/common/errors'; import * as uuid from 'vs/base/common/uuid'; import { IStorageService } from 'vs/platform/storage/common/storage'; -import { getMachineId, virtualMachineHint } from 'vs/base/node/id'; +import { getMachineId } from 'vs/base/node/id'; import { resolveCommonProperties, machineIdStorageKey } from '../node/commonProperties'; const SQM_KEY: string = '\\Software\\Microsoft\\SQMClient'; @@ -19,7 +19,6 @@ export function resolveWorkbenchCommonProperties(storageService: IStorageService result['common.version.shell'] = process.versions && (process).versions['electron']; result['common.version.renderer'] = process.versions && (process).versions['chrome']; result['common.osVersion'] = os.release(); - result['common.virtualMachineHint'] = virtualMachineHint.value().toString(); const lastSessionDate = storageService.get('telemetry.lastSessionDate'); const firstSessionDate = storageService.get('telemetry.firstSessionDate') || new Date().toUTCString(); From e48ab0af195321cbcd750cf98e17f5cbdb1c3549 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 May 2017 11:57:18 +0200 Subject: [PATCH 0850/2747] Tree views: Use light icon path for dark icon if not provided --- src/vs/workbench/api/node/extHostTreeViews.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/api/node/extHostTreeViews.ts b/src/vs/workbench/api/node/extHostTreeViews.ts index 9a27a7fa3a7b7..ee77533fc94ff 100644 --- a/src/vs/workbench/api/node/extHostTreeViews.ts +++ b/src/vs/workbench/api/node/extHostTreeViews.ts @@ -149,13 +149,14 @@ class ExtHostTreeView extends Disposable { } private massageTreeItem(extensionTreeItem: vscode.TreeItem): TreeItem { + const icon = this.getLightIconPath(extensionTreeItem); return { handle: ++this._itemHandlePool, label: extensionTreeItem.label, commandId: extensionTreeItem.command ? extensionTreeItem.command.command : void 0, contextValue: extensionTreeItem.contextValue, - icon: this.getLightIconPath(extensionTreeItem), - iconDark: this.getDarkIconPath(extensionTreeItem), + icon, + iconDark: this.getDarkIconPath(extensionTreeItem) || icon, collapsibleState: extensionTreeItem.collapsibleState, }; } From 146c76df369e358c117a1f9ebd0f65500f9a4731 Mon Sep 17 00:00:00 2001 From: Jan Niklas Hasse Date: Mon, 22 May 2017 11:57:54 +0200 Subject: [PATCH 0851/2747] Use pre-#25570 fonts as a fallback for system-ui (#26912) Workaround for: https://bugs.chromium.org/p/chromium/issues/detail?id=724393 --- extensions/markdown/package.json | 2 +- src/vs/workbench/electron-browser/media/shell.css | 2 +- .../workbench/parts/terminal/electron-browser/media/widgets.css | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/markdown/package.json b/extensions/markdown/package.json index 37ea7fb950625..4ffa3bd6b39f6 100644 --- a/extensions/markdown/package.json +++ b/extensions/markdown/package.json @@ -143,7 +143,7 @@ }, "markdown.preview.fontFamily": { "type": "string", - "default": "system-ui", + "default": "system-ui, 'Segoe WPC', 'Segoe UI', 'HelveticaNeue-Light', 'Ubuntu', 'Droid Sans', sans-serif", "description": "%markdown.preview.fontFamily.desc%" }, "markdown.preview.fontSize": { diff --git a/src/vs/workbench/electron-browser/media/shell.css b/src/vs/workbench/electron-browser/media/shell.css index 2c41ad5720aa4..5696fc87867aa 100644 --- a/src/vs/workbench/electron-browser/media/shell.css +++ b/src/vs/workbench/electron-browser/media/shell.css @@ -15,7 +15,7 @@ /* Font Families (with CJK support) */ -.monaco-shell { font-family: system-ui; } +.monaco-shell { font-family: system-ui, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; } .monaco-shell:lang(zh-Hans) { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Noto Sans", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; } .monaco-shell:lang(zh-Hant) { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Noto Sans", "Microsoft Jhenghei", "PingFang TC", "Source Han Sans TC", "Source Han Sans", "Source Han Sans TW", sans-serif; } .monaco-shell:lang(ja) { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Noto Sans", "Meiryo", "Hiragino Kaku Gothic Pro", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", "Sazanami Gothic", "IPA Gothic", sans-serif; } diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/widgets.css b/src/vs/workbench/parts/terminal/electron-browser/media/widgets.css index 49b5376ff570e..2549ad7016355 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/widgets.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/widgets.css @@ -12,7 +12,7 @@ } .monaco-workbench .terminal-message-widget { - font-family: system-ui; + font-family: system-ui, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; font-size: 14px; line-height: 19px; padding: 4px 5px; From bcfedfd596b77a55e83f367fe7f8f08c2f9aae79 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 22 May 2017 12:05:15 +0200 Subject: [PATCH 0852/2747] fix #26851 --- .../api/node/extHostFileSystemEventService.ts | 6 ++--- .../api/extHostFileSystemEventService.test.ts | 26 +++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 src/vs/workbench/test/electron-browser/api/extHostFileSystemEventService.test.ts diff --git a/src/vs/workbench/api/node/extHostFileSystemEventService.ts b/src/vs/workbench/api/node/extHostFileSystemEventService.ts index abfcee9b75f5a..0e6ddf0a9aca8 100644 --- a/src/vs/workbench/api/node/extHostFileSystemEventService.ts +++ b/src/vs/workbench/api/node/extHostFileSystemEventService.ts @@ -33,13 +33,13 @@ class FileSystemWatcher implements _FileSystemWatcher { constructor(dispatcher: Event, globPattern: string, ignoreCreateEvents?: boolean, ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean) { this._config = 0; - if (!ignoreCreateEvents) { + if (ignoreCreateEvents) { this._config += 0b001; } - if (!ignoreChangeEvents) { + if (ignoreChangeEvents) { this._config += 0b010; } - if (!ignoreDeleteEvents) { + if (ignoreDeleteEvents) { this._config += 0b100; } diff --git a/src/vs/workbench/test/electron-browser/api/extHostFileSystemEventService.test.ts b/src/vs/workbench/test/electron-browser/api/extHostFileSystemEventService.test.ts new file mode 100644 index 0000000000000..1bea8cfccef6d --- /dev/null +++ b/src/vs/workbench/test/electron-browser/api/extHostFileSystemEventService.test.ts @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import { ExtHostFileSystemEventService } from 'vs/workbench/api/node/extHostFileSystemEventService'; + +suite('ExtHostFileSystemEventService', () => { + + + test('FileSystemWatcher ignore events properties are reversed #26851', function () { + + const watcher1 = new ExtHostFileSystemEventService().createFileSystemWatcher('**/somethingInteresting', false, false, false); + assert.equal(watcher1.ignoreChangeEvents, false); + assert.equal(watcher1.ignoreCreateEvents, false); + assert.equal(watcher1.ignoreDeleteEvents, false); + + const watcher2 = new ExtHostFileSystemEventService().createFileSystemWatcher('**/somethingBoring', true, true, true); + assert.equal(watcher2.ignoreChangeEvents, true); + assert.equal(watcher2.ignoreCreateEvents, true); + assert.equal(watcher2.ignoreDeleteEvents, true); + }); + +}); From a58c7a6f80593858022f3ca729b30bce5b83693d Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 May 2017 12:21:19 +0200 Subject: [PATCH 0853/2747] Fix tests --- .../services/keybinding/test/keybindingEditing.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/services/keybinding/test/keybindingEditing.test.ts b/src/vs/workbench/services/keybinding/test/keybindingEditing.test.ts index 9a0d80873c6ec..cc4495e14e945 100644 --- a/src/vs/workbench/services/keybinding/test/keybindingEditing.test.ts +++ b/src/vs/workbench/services/keybinding/test/keybindingEditing.test.ts @@ -16,7 +16,8 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { KeyCode, SimpleKeybinding, ChordKeybinding } from 'vs/base/common/keyCodes'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import extfs = require('vs/base/node/extfs'); -import { TestTextFileService, TestEditorGroupService, TestLifecycleService, TestBackupFileService } from 'vs/workbench/test/workbenchTestServices'; +import { TestTextFileService, TestEditorGroupService, TestLifecycleService, TestBackupFileService, TestContextService } from 'vs/workbench/test/workbenchTestServices'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import uuid = require('vs/base/common/uuid'); import { ConfigurationService } from 'vs/platform/configuration/node/configurationService'; import { FileService } from 'vs/workbench/services/files/node/fileService'; @@ -66,6 +67,7 @@ suite('Keybindings Editing', () => { instantiationService.stub(IConfigurationService, 'getConfiguration', { 'eol': '\n' }); instantiationService.stub(IConfigurationService, 'onDidUpdateConfiguration', () => { }); + instantiationService.stub(IWorkspaceContextService, new TestContextService()); instantiationService.stub(ILifecycleService, new TestLifecycleService()); instantiationService.stub(IEditorGroupService, new TestEditorGroupService()); instantiationService.stub(ITelemetryService, NullTelemetryService); From be70f203a417e96bc40c0ef94dbbd65224b2cc61 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 22 May 2017 12:31:25 +0200 Subject: [PATCH 0854/2747] Fixes #26840: Hard crash (of everything) when terminating running task --- src/vs/base/node/terminateProcess.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/node/terminateProcess.sh b/src/vs/base/node/terminateProcess.sh index 2ec9e1c2ec329..acdcbf8ed4210 100755 --- a/src/vs/base/node/terminateProcess.sh +++ b/src/vs/base/node/terminateProcess.sh @@ -1,7 +1,7 @@ #!/bin/bash terminateTree() { - for cpid in $(pgrep -P $1); do + for cpid in $(/usr/bin/pgrep -P $1); do terminateTree $cpid done kill -9 $1 > /dev/null 2>&1 From b4615a8f4e823acba2453ffc7e1bcccfbb615b1d Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 22 May 2017 12:36:00 +0200 Subject: [PATCH 0855/2747] make `acceptSuggestionOnEnter` a tri state, #24420 --- src/vs/editor/common/config/commonEditorConfig.ts | 3 ++- src/vs/editor/common/config/editorOptions.ts | 10 +++++----- src/vs/editor/contrib/suggest/browser/suggest.ts | 3 +-- .../contrib/suggest/browser/suggestController.ts | 9 +++++++-- src/vs/monaco.d.ts | 6 +++--- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index f541796f5c52a..0850d3155882e 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -370,7 +370,8 @@ const editorConfiguration: IConfigurationNode = { 'description': nls.localize('suggestOnTriggerCharacters', "Controls if suggestions should automatically show up when typing trigger characters") }, 'editor.acceptSuggestionOnEnter': { - 'type': 'boolean', + 'type': 'string', + 'enum': ['on', 'smart', 'off'], 'default': EDITOR_DEFAULTS.contribInfo.acceptSuggestionOnEnter, 'description': nls.localize('acceptSuggestionOnEnter', "Controls if suggestions should be accepted on 'Enter' - in addition to 'Tab'. Helps to avoid ambiguity between inserting new lines or accepting suggestions.") }, diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index ce5208a05231f..0f9f1473f36f7 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -364,9 +364,9 @@ export interface IEditorOptions { suggestOnTriggerCharacters?: boolean; /** * Accept suggestions on ENTER. - * Defaults to true. + * Defaults to 'on'. */ - acceptSuggestionOnEnter?: boolean; + acceptSuggestionOnEnter?: 'on' | 'smart' | 'off'; /** * Accept suggestions on provider defined characters. * Defaults to true. @@ -726,7 +726,7 @@ export interface EditorContribOptions { readonly formatOnType: boolean; readonly formatOnPaste: boolean; readonly suggestOnTriggerCharacters: boolean; - readonly acceptSuggestionOnEnter: boolean; + readonly acceptSuggestionOnEnter: 'on' | 'smart' | 'off'; readonly acceptSuggestionOnCommitCharacter: boolean; readonly snippetSuggestions: 'top' | 'bottom' | 'inline' | 'none'; readonly wordBasedSuggestions: boolean; @@ -1532,7 +1532,7 @@ export class EditorOptionsValidator { formatOnType: _boolean(opts.formatOnType, defaults.formatOnType), formatOnPaste: _boolean(opts.formatOnPaste, defaults.formatOnPaste), suggestOnTriggerCharacters: _boolean(opts.suggestOnTriggerCharacters, defaults.suggestOnTriggerCharacters), - acceptSuggestionOnEnter: _boolean(opts.acceptSuggestionOnEnter, defaults.acceptSuggestionOnEnter), + acceptSuggestionOnEnter: _stringSet<'on' | 'smart' | 'off'>(opts.acceptSuggestionOnEnter, defaults.acceptSuggestionOnEnter, ['on', 'smart', 'off']), acceptSuggestionOnCommitCharacter: _boolean(opts.acceptSuggestionOnCommitCharacter, defaults.acceptSuggestionOnCommitCharacter), snippetSuggestions: _stringSet<'top' | 'bottom' | 'inline' | 'none'>(opts.snippetSuggestions, defaults.snippetSuggestions, ['top', 'bottom', 'inline', 'none']), wordBasedSuggestions: _boolean(opts.wordBasedSuggestions, defaults.wordBasedSuggestions), @@ -1939,7 +1939,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { formatOnType: false, formatOnPaste: false, suggestOnTriggerCharacters: true, - acceptSuggestionOnEnter: true, + acceptSuggestionOnEnter: 'smart', acceptSuggestionOnCommitCharacter: true, snippetSuggestions: 'inline', wordBasedSuggestions: true, diff --git a/src/vs/editor/contrib/suggest/browser/suggest.ts b/src/vs/editor/contrib/suggest/browser/suggest.ts index 6f6a5dbff7539..7c2db1e7321da 100644 --- a/src/vs/editor/contrib/suggest/browser/suggest.ts +++ b/src/vs/editor/contrib/suggest/browser/suggest.ts @@ -15,14 +15,13 @@ import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; import { ISuggestResult, ISuggestSupport, ISuggestion, SuggestRegistry } from 'vs/editor/common/modes'; import { Position, IPosition } from 'vs/editor/common/core/position'; import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; -import { EDITOR_DEFAULTS } from "vs/editor/common/config/editorOptions"; export const Context = { Visible: new RawContextKey('suggestWidgetVisible', false), MultipleSuggestions: new RawContextKey('suggestWidgetMultipleSuggestions', false), MakesTextEdit: new RawContextKey('suggestionMakesTextEdit', true), AcceptOnKey: new RawContextKey('suggestionSupportsAcceptOnKey', true), - AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', EDITOR_DEFAULTS.contribInfo.acceptSuggestionOnEnter) + AcceptSuggestionsOnEnter: new RawContextKey('acceptSuggestionOnEnter', true) }; export interface ISuggestionItem { diff --git a/src/vs/editor/contrib/suggest/browser/suggestController.ts b/src/vs/editor/contrib/suggest/browser/suggestController.ts index 0468b72476d67..688535972f332 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestController.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestController.ts @@ -102,7 +102,11 @@ export class SuggestController implements IEditorContribution { // Manage the acceptSuggestionsOnEnter context key let acceptSuggestionsOnEnter = SuggestContext.AcceptSuggestionsOnEnter.bindTo(_contextKeyService); let updateFromConfig = () => { - acceptSuggestionsOnEnter.set(this._editor.getConfiguration().contribInfo.acceptSuggestionOnEnter); + const { acceptSuggestionOnEnter } = this._editor.getConfiguration().contribInfo; + acceptSuggestionsOnEnter.set( + acceptSuggestionOnEnter === 'on' || acceptSuggestionOnEnter === 'smart' + || (acceptSuggestionOnEnter) === true + ); }; this._toDispose.push(this._editor.onDidChangeConfiguration((e) => updateFromConfig())); updateFromConfig(); @@ -129,7 +133,8 @@ export class SuggestController implements IEditorContribution { const endColumn = position.column; let value = true; if ( - this._model.state === State.Auto + this._editor.getConfiguration().contribInfo.acceptSuggestionOnEnter === 'smart' + && this._model.state === State.Auto && !item.suggestion.command && !item.suggestion.additionalTextEdits && item.suggestion.snippetType !== 'textmate' diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 83b45948f09ed..ba397445f67b2 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2909,9 +2909,9 @@ declare module monaco.editor { suggestOnTriggerCharacters?: boolean; /** * Accept suggestions on ENTER. - * Defaults to true. + * Defaults to 'on'. */ - acceptSuggestionOnEnter?: boolean; + acceptSuggestionOnEnter?: 'on' | 'smart' | 'off'; /** * Accept suggestions on provider defined characters. * Defaults to true. @@ -3211,7 +3211,7 @@ declare module monaco.editor { readonly formatOnType: boolean; readonly formatOnPaste: boolean; readonly suggestOnTriggerCharacters: boolean; - readonly acceptSuggestionOnEnter: boolean; + readonly acceptSuggestionOnEnter: 'on' | 'smart' | 'off'; readonly acceptSuggestionOnCommitCharacter: boolean; readonly snippetSuggestions: 'top' | 'bottom' | 'inline' | 'none'; readonly wordBasedSuggestions: boolean; From aac718a2846a1854c6d23e259a7df33d06bf80d8 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 May 2017 13:23:17 +0200 Subject: [PATCH 0856/2747] Fix #25246 --- .../extensions/browser/extensionsActions.ts | 54 +++++++++++++++++++ .../parts/extensions/common/extensions.ts | 2 + .../extensions.contribution.ts | 5 +- .../electron-browser/extensionsViewlet.ts | 21 ++++++-- .../node/extensionsWorkbenchService.ts | 30 +++++++++-- 5 files changed, 105 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts index 6b29b621d0fcb..3c8866f1e60d1 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts @@ -31,6 +31,7 @@ import { IWindowService } from 'vs/platform/windows/common/windows'; import { IExtensionService, IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import URI from 'vs/base/common/uri'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; export class InstallAction extends Action { @@ -681,6 +682,59 @@ export class CheckForUpdatesAction extends Action { } } +export class ToggleAutoUpdateAction extends Action { + + constructor( + id: string, + label: string, + private autoUpdateValue: boolean, + @IConfigurationService configurationService: IConfigurationService, + @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService + ) { + super(id, label, '', true); + this.updateEnablement(); + configurationService.onDidUpdateConfiguration(() => this.updateEnablement()); + } + + private updateEnablement(): void { + this.enabled = this.extensionsWorkbenchService.isAutoUpdateEnabled !== this.autoUpdateValue; + } + + run(): TPromise { + return this.extensionsWorkbenchService.setAutoUpdate(this.autoUpdateValue); + } +} + +export class EnableAutoUpdateAction extends ToggleAutoUpdateAction { + + static ID = 'workbench.extensions.action.enableAutoUpdate'; + static LABEL = localize('enableAutoUpdate', "Enable Auto Updating Extensions"); + + constructor( + id = EnableAutoUpdateAction.ID, + label = EnableAutoUpdateAction.LABEL, + @IConfigurationService configurationService: IConfigurationService, + @IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService + ) { + super(id, label, true, configurationService, extensionsWorkbenchService); + } +} + +export class DisableAutoUpdateAction extends ToggleAutoUpdateAction { + + static ID = 'workbench.extensions.action.disableAutoUpdate'; + static LABEL = localize('disableAutoUpdate', "Disable Auto Updating Extensions"); + + constructor( + id = EnableAutoUpdateAction.ID, + label = EnableAutoUpdateAction.LABEL, + @IConfigurationService configurationService: IConfigurationService, + @IExtensionsWorkbenchService extensionsWorkbenchService: IExtensionsWorkbenchService + ) { + super(id, label, false, configurationService, extensionsWorkbenchService); + } +} + export class UpdateAllAction extends Action { static ID = 'workbench.extensions.action.updateAllExtensions'; diff --git a/src/vs/workbench/parts/extensions/common/extensions.ts b/src/vs/workbench/parts/extensions/common/extensions.ts index f11cd884312ab..269fd45a7df34 100644 --- a/src/vs/workbench/parts/extensions/common/extensions.ts +++ b/src/vs/workbench/parts/extensions/common/extensions.ts @@ -67,6 +67,7 @@ export interface IExtensionsWorkbenchService { _serviceBrand: any; onChange: Event; local: IExtension[]; + isAutoUpdateEnabled: boolean; queryLocal(): TPromise; queryGallery(options?: IQueryOptions): TPromise>; canInstall(extension: IExtension): boolean; @@ -77,6 +78,7 @@ export interface IExtensionsWorkbenchService { loadDependencies(extension: IExtension): TPromise; open(extension: IExtension, sideByside?: boolean): TPromise; checkForUpdates(): TPromise; + setAutoUpdate(autoUpdate: boolean): TPromise; } export const ConfigurationKey = 'extensions'; diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts index c46c015065d9d..5fea11020e866 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts @@ -24,7 +24,7 @@ import { ExtensionsWorkbenchService } from 'vs/workbench/parts/extensions/node/e import { OpenExtensionsViewletAction, InstallExtensionsAction, ShowOutdatedExtensionsAction, ShowRecommendedExtensionsAction, ShowRecommendedKeymapExtensionsAction, ShowWorkspaceRecommendedExtensionsAction, ShowPopularExtensionsAction, ShowInstalledExtensionsAction, ShowDisabledExtensionsAction, UpdateAllAction, ConfigureWorkspaceRecommendedExtensionsAction, - EnableAllAction, EnableAllWorkpsaceAction, DisableAllAction, DisableAllWorkpsaceAction, CheckForUpdatesAction, ShowExtensionPacksAction + EnableAllAction, EnableAllWorkpsaceAction, DisableAllAction, DisableAllWorkpsaceAction, CheckForUpdatesAction, ShowExtensionPacksAction, EnableAutoUpdateAction, DisableAutoUpdateAction } from 'vs/workbench/parts/extensions/browser/extensionsActions'; import { OpenExtensionsFolderAction, InstallVSIXAction } from 'vs/workbench/parts/extensions/electron-browser/extensionsActions'; import { ExtensionsInput } from 'vs/workbench/parts/extensions/common/extensionsInput'; @@ -157,6 +157,9 @@ actionRegistry.registerWorkbenchAction(enableAllWorkspaceAction, 'Extensions: En const checkForUpdatesAction = new SyncActionDescriptor(CheckForUpdatesAction, CheckForUpdatesAction.ID, CheckForUpdatesAction.LABEL); actionRegistry.registerWorkbenchAction(checkForUpdatesAction, `Extensions: Check for Updates`, ExtensionsLabel); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(EnableAutoUpdateAction, EnableAutoUpdateAction.ID, EnableAutoUpdateAction.LABEL), `Extensions: Enable Auto Updating Extensions`, ExtensionsLabel); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DisableAutoUpdateAction, DisableAutoUpdateAction.ID, DisableAutoUpdateAction.LABEL), `Extensions: Disable Auto Updating Extensions`, ExtensionsLabel); + Registry.as(ConfigurationExtensions.Configuration) .registerConfiguration({ id: 'extensions', diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts index a6047bd0b2511..63d676aa2fbaa 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts @@ -32,7 +32,8 @@ import { Delegate, Renderer } from 'vs/workbench/parts/extensions/browser/extens import { IExtensionsWorkbenchService, IExtension, IExtensionsViewlet, VIEWLET_ID, ExtensionState } from '../common/extensions'; import { ShowRecommendedExtensionsAction, ShowWorkspaceRecommendedExtensionsAction, ShowRecommendedKeymapExtensionsAction, ShowPopularExtensionsAction, ShowInstalledExtensionsAction, ShowDisabledExtensionsAction, - ShowOutdatedExtensionsAction, ClearExtensionsInputAction, ChangeSortAction, UpdateAllAction, CheckForUpdatesAction, DisableAllAction, EnableAllAction + ShowOutdatedExtensionsAction, ClearExtensionsInputAction, ChangeSortAction, UpdateAllAction, CheckForUpdatesAction, DisableAllAction, EnableAllAction, + EnableAutoUpdateAction, DisableAutoUpdateAction } from 'vs/workbench/parts/extensions/browser/extensionsActions'; import { InstallVSIXAction } from 'vs/workbench/parts/extensions/electron-browser/extensionsActions'; import { IExtensionManagementService, IExtensionGalleryService, IExtensionTipsService, SortBy, SortOrder, IQueryOptions, LocalExtensionType } from 'vs/platform/extensionManagement/common/extensionManagement'; @@ -52,6 +53,7 @@ import { IModeService } from 'vs/editor/common/services/modeService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { inputForeground, inputBackground, inputBorder } from 'vs/platform/theme/common/colorRegistry'; import { attachListStyler } from 'vs/platform/theme/common/styler'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; interface SearchInputEvent extends Event { target: HTMLInputElement; @@ -71,6 +73,8 @@ export class ExtensionsViewlet extends Viewlet implements IExtensionsViewlet { private secondaryActions: IAction[]; private disposables: IDisposable[] = []; + private isAutoUpdateEnabled: boolean; + constructor( @ITelemetryService telemetryService: ITelemetryService, @IExtensionGalleryService private galleryService: IExtensionGalleryService, @@ -86,12 +90,23 @@ export class ExtensionsViewlet extends Viewlet implements IExtensionsViewlet { @IViewletService private viewletService: IViewletService, @IExtensionService private extensionService: IExtensionService, @IModeService private modeService: IModeService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @IConfigurationService private configurationService: IConfigurationService, ) { super(VIEWLET_ID, telemetryService, themeService); this.searchDelayer = new ThrottledDelayer(500); this.disposables.push(viewletService.onDidViewletOpen(this.onViewletOpen, this, this.disposables)); + this.isAutoUpdateEnabled = this.extensionsWorkbenchService.isAutoUpdateEnabled; + + this.configurationService.onDidUpdateConfiguration(() => { + const isAutoUpdateEnabled = this.extensionsWorkbenchService.isAutoUpdateEnabled; + if (this.isAutoUpdateEnabled !== isAutoUpdateEnabled) { + this.isAutoUpdateEnabled = isAutoUpdateEnabled; + this.secondaryActions = null; + this.updateTitleArea(); + } + }, this, this.disposables); } create(parent: Builder): TPromise { @@ -206,7 +221,7 @@ export class ExtensionsViewlet extends Viewlet implements IExtensionsViewlet { this.instantiationService.createInstance(ChangeSortAction, 'extensions.sort.name', localize('sort by name', "Sort By: Name"), this.onSearchChange, 'name'), new Separator(), this.instantiationService.createInstance(CheckForUpdatesAction, CheckForUpdatesAction.ID, CheckForUpdatesAction.LABEL), - this.instantiationService.createInstance(UpdateAllAction, UpdateAllAction.ID, UpdateAllAction.LABEL), + ...(this.isAutoUpdateEnabled ? [this.instantiationService.createInstance(DisableAutoUpdateAction, DisableAutoUpdateAction.ID, DisableAutoUpdateAction.LABEL)] : [this.instantiationService.createInstance(UpdateAllAction, UpdateAllAction.ID, UpdateAllAction.LABEL), this.instantiationService.createInstance(EnableAutoUpdateAction, EnableAutoUpdateAction.ID, EnableAutoUpdateAction.LABEL)]), this.instantiationService.createInstance(InstallVSIXAction, InstallVSIXAction.ID, InstallVSIXAction.LABEL), new Separator(), this.instantiationService.createInstance(DisableAllAction, DisableAllAction.ID, DisableAllAction.LABEL), diff --git a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts index bcaad136e0458..9f4f45594c441 100644 --- a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts +++ b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts @@ -26,6 +26,7 @@ import { import { getGalleryExtensionIdFromLocal, getGalleryExtensionTelemetryData, getLocalExtensionTelemetryData } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { IChoiceService, IMessageService } from 'vs/platform/message/common/message'; import Severity from 'vs/base/common/severity'; import URI from 'vs/base/common/uri'; @@ -308,12 +309,15 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService { private _onChange: Emitter = new Emitter(); get onChange(): Event { return this._onChange.event; } + private _isAutoUpdateEnabled: boolean; + constructor( @IInstantiationService private instantiationService: IInstantiationService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IExtensionManagementService private extensionService: IExtensionManagementService, @IExtensionGalleryService private galleryService: IExtensionGalleryService, @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationEditingService private configurationEditingService: IConfigurationEditingService, @ITelemetryService private telemetryService: ITelemetryService, @IMessageService private messageService: IMessageService, @IChoiceService private choiceService: IChoiceService, @@ -337,6 +341,17 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService { .filter(uri => /^extension/.test(uri.path)) .on(this.onOpenExtensionUrl, this, this.disposables); + this._isAutoUpdateEnabled = this.configurationService.getConfiguration(ConfigurationKey).autoUpdate; + this.configurationService.onDidUpdateConfiguration(() => { + const isAutoUpdateEnabled = this.configurationService.getConfiguration(ConfigurationKey).autoUpdate; + if (this._isAutoUpdateEnabled !== isAutoUpdateEnabled) { + this._isAutoUpdateEnabled = isAutoUpdateEnabled; + if (this._isAutoUpdateEnabled) { + this.checkForUpdates(); + } + } + }, this, this.disposables); + this.queryLocal().done(() => this.eventuallySyncWithGallery(true)); } @@ -426,6 +441,17 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService { return this.syncDelayer.trigger(() => this.syncWithGallery(), 0); } + get isAutoUpdateEnabled(): boolean { + return this._isAutoUpdateEnabled; + } + + setAutoUpdate(autoUpdate: boolean): TPromise { + if (this.isAutoUpdateEnabled === autoUpdate) { + return TPromise.as(null); + } + return this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: 'extensions.autoUpdate', value: autoUpdate }); + } + private eventuallySyncWithGallery(immediate = false): void { const loop = () => this.syncWithGallery().then(() => this.eventuallySyncWithGallery()); const delay = immediate ? 0 : ExtensionsWorkbenchService.SyncPeriod; @@ -452,9 +478,7 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService { } private autoUpdateExtensions(): TPromise { - const config = this.configurationService.getConfiguration(ConfigurationKey); - - if (!config.autoUpdate) { + if (!this.isAutoUpdateEnabled) { return TPromise.as(null); } From 093eac502f5546171f0f57aecfc9aa1c28bfa413 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 22 May 2017 13:47:01 +0200 Subject: [PATCH 0857/2747] allow offsets for fuzzyScore, towards #26096 --- src/vs/base/common/filters.ts | 74 ++++++++++++------------- src/vs/base/test/common/filters.test.ts | 7 +++ 2 files changed, 44 insertions(+), 37 deletions(-) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index 19056d36a50f7..8719c8c662a6d 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -450,7 +450,7 @@ _seps[':'] = true; const enum Arrow { Top = 0b1, Diag = 0b10, Left = 0b100 } -export function fuzzyScore(pattern: string, word: string): [number, number[]] { +export function fuzzyScore(pattern: string, word: string, patternOffset: number = 0, wordOffset: number = 0): [number, number[]] { const patternLen = pattern.length > 100 ? 100 : pattern.length; const wordLen = word.length > 100 ? 100 : word.length; @@ -465,16 +465,16 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { const lowPattern = pattern.toLowerCase(); const lowWord = word.toLowerCase(); - let i = 0; - let j = 0; + let patternPos = patternOffset; + let wordPos = wordOffset; - while (i < patternLen && j < wordLen) { - if (lowPattern[i] === lowWord[j]) { - i += 1; + while (patternPos < patternLen && wordPos < wordLen) { + if (lowPattern[patternPos] === lowWord[wordPos]) { + patternPos += 1; } - j += 1; + wordPos += 1; } - if (i !== patternLen) { + if (patternPos !== patternLen) { // no simple matches found -> return early return undefined; } @@ -482,24 +482,24 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { // keep track of the maximum score let maxScore = -1; - for (i = 1; i <= patternLen; i++) { + for (patternPos = patternOffset + 1; patternPos <= patternLen; patternPos++) { let lastLowWordChar = ''; - for (j = 1; j <= wordLen; j++) { + for (wordPos = wordOffset + 1; wordPos <= wordLen; wordPos++) { let score = -1; - let lowWordChar = lowWord[j - 1]; - if (lowPattern[i - 1] === lowWordChar) { + let lowWordChar = lowWord[wordPos - 1]; + if (lowPattern[patternPos - 1] === lowWordChar) { - if (j === 1) { - if (pattern[i - 1] === word[j - 1]) { + if (wordPos === wordOffset + 1) { + if (pattern[patternPos - 1] === word[wordPos - 1]) { score = 7; } else { score = 5; } - } else if (lowWordChar !== word[j - 1]) { - if (pattern[i - 1] === word[j - 1]) { + } else if (lowWordChar !== word[wordPos - 1]) { + if (pattern[patternPos - 1] === word[wordPos - 1]) { score = 7; } else { score = 5; @@ -512,38 +512,38 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { } } - _scores[i][j] = score; + _scores[patternPos][wordPos] = score; if (score > maxScore) { maxScore = score; } - let diag = _table[i - 1][j - 1] + (score > 1 ? 1 : score); - let top = _table[i - 1][j] + -1; - let left = _table[i][j - 1] + -1; + let diag = _table[patternPos - 1][wordPos - 1] + (score > 1 ? 1 : score); + let top = _table[patternPos - 1][wordPos] + -1; + let left = _table[patternPos][wordPos - 1] + -1; if (left >= top) { // left or diag if (left > diag) { - _table[i][j] = left; - _arrows[i][j] = Arrow.Left; + _table[patternPos][wordPos] = left; + _arrows[patternPos][wordPos] = Arrow.Left; } else if (left === diag) { - _table[i][j] = left; - _arrows[i][j] = Arrow.Left | Arrow.Diag; + _table[patternPos][wordPos] = left; + _arrows[patternPos][wordPos] = Arrow.Left | Arrow.Diag; } else { - _table[i][j] = diag; - _arrows[i][j] = Arrow.Diag; + _table[patternPos][wordPos] = diag; + _arrows[patternPos][wordPos] = Arrow.Diag; } } else { // top or diag if (top > diag) { - _table[i][j] = top; - _arrows[i][j] = Arrow.Top; + _table[patternPos][wordPos] = top; + _arrows[patternPos][wordPos] = Arrow.Top; } else if (top === diag) { - _table[i][j] = top; - _arrows[i][j] = Arrow.Top | Arrow.Diag; + _table[patternPos][wordPos] = top; + _arrows[patternPos][wordPos] = Arrow.Top | Arrow.Diag; } else { - _table[i][j] = diag; - _arrows[i][j] = Arrow.Diag; + _table[patternPos][wordPos] = diag; + _arrows[patternPos][wordPos] = Arrow.Diag; } } @@ -562,7 +562,7 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { } let bucket: [number, number[]][] = []; - findAllMatches(patternLen, patternLen, wordLen, 0, [], bucket, false); + findAllMatches(patternLen, patternLen, patternOffset, wordLen, wordOffset, 0, [], bucket, false); if (bucket.length === 0) { return undefined; @@ -580,7 +580,7 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { return topMatch; } -function findAllMatches(patternLen: number, patternPos: number, wordPos: number, total: number, matches: number[], bucket: [number, number[]][], lastMatched: boolean): void { +function findAllMatches(patternLen: number, patternPos: number, patternOffset: number, wordPos: number, wordOffset: number, total: number, matches: number[], bucket: [number, number[]][], lastMatched: boolean): void { if (bucket.length >= 10) { return; @@ -588,7 +588,7 @@ function findAllMatches(patternLen: number, patternPos: number, wordPos: number, let simpleMatchCount = 0; - while (patternPos > 0 && wordPos > 0) { + while (patternPos > patternOffset && wordPos > wordOffset) { let score = _scores[patternPos][wordPos]; let arrow = _arrows[patternPos][wordPos]; @@ -609,8 +609,8 @@ function findAllMatches(patternLen: number, patternPos: number, wordPos: number, if (arrow & Arrow.Left) { // left findAllMatches( - patternLen, patternPos, - wordPos - 1, + patternLen, patternPos, patternOffset, + wordPos - 1, wordOffset, matches.length !== 0 ? total - 1 : total, matches.slice(0), bucket, lastMatched ); diff --git a/src/vs/base/test/common/filters.test.ts b/src/vs/base/test/common/filters.test.ts index ed8f708e757d4..797df43d1a2d6 100644 --- a/src/vs/base/test/common/filters.test.ts +++ b/src/vs/base/test/common/filters.test.ts @@ -325,6 +325,13 @@ suite('Filters', () => { assertMatches('f', ':foo', ':^foo', fuzzyScore); }); + test('fuzzyScore with offset', function () { + const matches = fuzzyScore('bc', 'abc', 0, 1); + assert.ok(matches); + const [, range] = matches; + assert.deepEqual(range, [1, 2]); + }); + function assertTopScore(filter: typeof fuzzyScore, pattern: string, expected: number, ...words: string[]) { let topScore = -(100 * 10); let topIdx = 0; From aa81dc3e6658e892b702a759e41c4b632901f84e Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 22 May 2017 13:49:41 +0200 Subject: [PATCH 0858/2747] remove assertion that checks number of common properties --- .../telemetry/test/electron-browser/commonProperties.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts b/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts index 2525949ec9710..d66d22ec6a046 100644 --- a/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts +++ b/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts @@ -53,7 +53,6 @@ suite('Telemetry - common properties', function () { assert.ok('common.sqm.machineid' in props, 'machineid'); } - assert.equal(Object.keys(props).length, process.platform === 'win32' ? 18 : 16); }); }); From 9e80eade9c1adfd2339009598a96afefc44d885c Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 22 May 2017 13:52:16 +0200 Subject: [PATCH 0859/2747] fix test runner doc --- test/electron/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/electron/index.js b/test/electron/index.js index 0337a1421f7d8..f0883bd9ee9d5 100644 --- a/test/electron/index.js +++ b/test/electron/index.js @@ -13,7 +13,7 @@ const events = require('events'); const optimist = require('optimist') .describe('grep', 'only run tests matching ').alias('grep', 'g').alias('grep', 'f').string('grep') .describe('run', 'only run tests from ').string('run') - .describe('runGrep', 'only run tests matching ').boolean('runGrep') + .describe('runGlob', 'only run tests matching ').boolean('runGlob') .describe('build', 'run with build output (out-build)').boolean('build') .describe('coverage', 'generate coverage report').boolean('coverage') .describe('debug', 'open dev tools, keep window open, reuse app data').string('debug') From cbb27e8c6adc6f032d3b4f25efa78168f5fb746e Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 22 May 2017 13:53:14 +0200 Subject: [PATCH 0860/2747] add runGrep as alias --- test/electron/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/electron/index.js b/test/electron/index.js index f0883bd9ee9d5..97529b3f84dc0 100644 --- a/test/electron/index.js +++ b/test/electron/index.js @@ -13,7 +13,7 @@ const events = require('events'); const optimist = require('optimist') .describe('grep', 'only run tests matching ').alias('grep', 'g').alias('grep', 'f').string('grep') .describe('run', 'only run tests from ').string('run') - .describe('runGlob', 'only run tests matching ').boolean('runGlob') + .describe('runGlob', 'only run tests matching ').boolean('runGlob').alias('runGrep') .describe('build', 'run with build output (out-build)').boolean('build') .describe('coverage', 'generate coverage report').boolean('coverage') .describe('debug', 'open dev tools, keep window open, reuse app data').string('debug') From 905020f916acfce079e7092a0be0c6b9b9ddb27f Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 22 May 2017 13:56:23 +0200 Subject: [PATCH 0861/2747] Added smoke test source code. --- smoketest/.gitignore | 7 + smoketest/.vscode/launch.json | 26 + smoketest/.vscode/tasks.json | 10 + smoketest/CONTRIBUTING.md | 12 + smoketest/README.md | 10 + smoketest/package.json | 19 + smoketest/scripts/run.ps1 | 43 ++ smoketest/scripts/run.sh | 43 ++ smoketest/src/areas/common.ts | 163 +++++ smoketest/src/areas/configuration-views.ts | 62 ++ smoketest/src/areas/css.ts | 62 ++ smoketest/src/areas/data-loss.ts | 26 + smoketest/src/areas/extensions.ts | 49 ++ smoketest/src/areas/first-experience.ts | 21 + smoketest/src/areas/git.ts | 69 ++ smoketest/src/areas/integrated-terminal.ts | 38 + smoketest/src/areas/javascript-debug.ts | 42 ++ smoketest/src/areas/javascript.ts | 73 ++ smoketest/src/areas/localization.ts | 55 ++ smoketest/src/areas/search.ts | 50 ++ smoketest/src/areas/statusbar.ts | 99 +++ smoketest/src/areas/tasks.ts | 50 ++ smoketest/src/helpers/screenshot.ts | 48 ++ smoketest/src/helpers/utilities.ts | 37 + smoketest/src/main.ts | 771 +++++++++++++++++++++ smoketest/src/spectron/application.ts | 156 +++++ smoketest/src/spectron/client.ts | 127 ++++ smoketest/tsconfig.json | 21 + vscode-smoketest-express | 1 + 29 files changed, 2190 insertions(+) create mode 100644 smoketest/.gitignore create mode 100644 smoketest/.vscode/launch.json create mode 100644 smoketest/.vscode/tasks.json create mode 100644 smoketest/CONTRIBUTING.md create mode 100644 smoketest/README.md create mode 100644 smoketest/package.json create mode 100644 smoketest/scripts/run.ps1 create mode 100644 smoketest/scripts/run.sh create mode 100644 smoketest/src/areas/common.ts create mode 100644 smoketest/src/areas/configuration-views.ts create mode 100644 smoketest/src/areas/css.ts create mode 100644 smoketest/src/areas/data-loss.ts create mode 100644 smoketest/src/areas/extensions.ts create mode 100644 smoketest/src/areas/first-experience.ts create mode 100644 smoketest/src/areas/git.ts create mode 100644 smoketest/src/areas/integrated-terminal.ts create mode 100644 smoketest/src/areas/javascript-debug.ts create mode 100644 smoketest/src/areas/javascript.ts create mode 100644 smoketest/src/areas/localization.ts create mode 100644 smoketest/src/areas/search.ts create mode 100644 smoketest/src/areas/statusbar.ts create mode 100644 smoketest/src/areas/tasks.ts create mode 100644 smoketest/src/helpers/screenshot.ts create mode 100644 smoketest/src/helpers/utilities.ts create mode 100644 smoketest/src/main.ts create mode 100644 smoketest/src/spectron/application.ts create mode 100644 smoketest/src/spectron/client.ts create mode 100644 smoketest/tsconfig.json create mode 160000 vscode-smoketest-express diff --git a/smoketest/.gitignore b/smoketest/.gitignore new file mode 100644 index 0000000000000..532798d3ea949 --- /dev/null +++ b/smoketest/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +npm-debug.log +Thumbs.db +node_modules/ +out/ +keybindings.*.json +test_data/ \ No newline at end of file diff --git a/smoketest/.vscode/launch.json b/smoketest/.vscode/launch.json new file mode 100644 index 0000000000000..2de33bbb20ba1 --- /dev/null +++ b/smoketest/.vscode/launch.json @@ -0,0 +1,26 @@ +{ + // Use IntelliSense to learn about possible Node.js debug attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Mocha Tests", + "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", + "args": [ + "-u", + "tdd", + "--timeout", + "999999", + "--colors", + "${workspaceRoot}/out/main.js" + ], + "outFiles": [ "${workspaceRoot}/out/**/*.js" ], + "internalConsoleOptions": "openOnSessionStart", + "sourceMaps": true, + "cwd": "${workspaceRoot}" + } + ] +} \ No newline at end of file diff --git a/smoketest/.vscode/tasks.json b/smoketest/.vscode/tasks.json new file mode 100644 index 0000000000000..926b1ddcd18fb --- /dev/null +++ b/smoketest/.vscode/tasks.json @@ -0,0 +1,10 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "0.1.0", + "command": "tsc", + "isShellCommand": true, + "args": ["-p", "."], + "showOutput": "silent", + "problemMatcher": "$tsc" +} \ No newline at end of file diff --git a/smoketest/CONTRIBUTING.md b/smoketest/CONTRIBUTING.md new file mode 100644 index 0000000000000..c15016dc1ad68 --- /dev/null +++ b/smoketest/CONTRIBUTING.md @@ -0,0 +1,12 @@ +# Architecture +* `main.ts` contains the main smoke test suite. It includes all tests separated into mocha `describe()` groups that represent each of the areas of [Smoke Test document](https://github.com/Microsoft/vscode/wiki/Smoke-Test). + +* `./areas/` folder contains a `.ts` file per each area of the document. E.g. `'Search'` area goes under `'search.ts'`. Every area file contains a list of methods with the name that represents the action that can be performed in the corresponding test. This reduces the amount of test suite code and means that if the UI changes, the fix need only be applied in one place. The name of the method reflects the action the tester would do if he would perform the test manually. See [Selenium Page Objects Wiki](https://github.com/SeleniumHQ/selenium/wiki/PageObjects) and [Selenium Bot Style Tests Wiki](https://github.com/SeleniumHQ/selenium/wiki/Bot-Style-Tests) for a good explanation of the implementation. Every smoke test area contains methods that are used in a bot-style approach in `main.ts`. +* `./spectron/` wraps the Spectron, with WebDriverIO API wrapped in `client.ts` and instance of Spectron Application is wrapped in `application.ts`. +* `./scripts/` contains scripts to run the smoke test. + +# Adding new area +To contribute a new smoke test area, add `${area}.ts` file under `./areas`. This has to follow the bot-style approach described in the links mentioned above. Methods should be calling WebDriverIO API through `SpectronClient` class. If there is no existing WebDriverIO method, add it to the class. + +# Adding new test +To add new test area or test, `main.ts` should be updated. The same instruction-style principle needs to be followed with the called area method names that reflect manual tester's actions. \ No newline at end of file diff --git a/smoketest/README.md b/smoketest/README.md new file mode 100644 index 0000000000000..318ddb0751725 --- /dev/null +++ b/smoketest/README.md @@ -0,0 +1,10 @@ +# VS Code Smoke Testing +This repository contains the smoke test automation code with Spectron for Visual Studio Code. + +The following command is used to run the tests: `.\scripts\run.ps1 -latest "path\to\Code.exe"` on Windows (from PowerShell) and `./scripts/run.sh path/to/binary` on Unix system. + +If you want to include 'Data Migration' area tests use `.\scripts\run.ps1 -latest "path\to\Code.exe" -stable "path\to\CurrentStable.exe"` and `./scripts/run.sh path/to/binary path/to/currentStable` respectively. + +# Contributing + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/smoketest/package.json b/smoketest/package.json new file mode 100644 index 0000000000000..a5c3a78273bf3 --- /dev/null +++ b/smoketest/package.json @@ -0,0 +1,19 @@ +{ + "name": "code-oss-dev-smoke-test", + "version": "0.1.0", + "main": "./out/main.js", + "scripts": { + "test": "mocha -u tdd --timeout 360000 --retries 2 --slow 50000 --colors ./out/main.js 2> test_data/errors.log" + }, + "devDependencies": { + "@types/mocha": "^2.2.41", + "@types/node": "^6.0.70", + "@types/webdriverio": "^4.6.1", + "@types/electron": "^1.4.37", + "@types/rimraf": "^0.0.28", + "mocha": "^3.2.0", + "spectron": "^3.6.4", + "typescript": "^2.2.2", + "rimraf": "^2.6.1" + } +} diff --git a/smoketest/scripts/run.ps1 b/smoketest/scripts/run.ps1 new file mode 100644 index 0000000000000..d6368da689082 --- /dev/null +++ b/smoketest/scripts/run.ps1 @@ -0,0 +1,43 @@ +Param( + [Parameter(Position=0,mandatory=$true)] + [string] $latest, + [Parameter(Position=1,mandatory=$false)] + [string] $stable +) + +# Setup sample repository for the smoke test +Set-Location .. +if (-Not (Test-Path vscode-smoketest-express)) { + git clone https://github.com/Microsoft/vscode-smoketest-express.git + Set-Location ./vscode-smoketest-express +} else { + Set-Location ./vscode-smoketest-express + git fetch origin master + git reset --hard FETCH_HEAD + git clean -fd +} +npm install + +# Setup the test directory for running +Set-Location ..\smoketest +if (-Not (Test-Path node_modules)) { + npm install +} + +# Configure environment variables +$env:VSCODE_LATEST_PATH = $latest +$env:VSCODE_STABLE_PATH = $stable +$env:SMOKETEST_REPO = "..\vscode-smoketest-express" + +if ($latest.Contains('Insiders')) { + $env:VSCODE_EDITION = 'insiders' +} + +# Retrieve key bindings config file for Windows +$testDirectory = (Resolve-Path .\).Path +$client = New-Object System.Net.WebClient +$client.DownloadFile("https://raw.githubusercontent.com/Microsoft/vscode-docs/master/scripts/keybindings/doc.keybindings.win.json","$testDirectory\test_data\keybindings.win32.json") + +# Compile and launch the smoke test +tsc +npm test \ No newline at end of file diff --git a/smoketest/scripts/run.sh b/smoketest/scripts/run.sh new file mode 100644 index 0000000000000..fc103a5553954 --- /dev/null +++ b/smoketest/scripts/run.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +if [[ "$#" -ne 1 ]]; then + echo "Usage: ./scripts/run.sh path/to/binary" + echo "To perform data migration tests, use: ./scripts/run.sh path/to/latest_binary path/to/stable_binary" + exit 1 +fi + +# Cloning sample repository for the smoke test +cd .. +if ! [ -d vscode-smoketest-express ]; then + git clone https://github.com/Microsoft/vscode-smoketest-express.git + cd vscode-smoketest-express +else + cd vscode-smoketest-express + git fetch origin master + git reset --hard FETCH_HEAD + git clean -fd +fi +npm install + +# Install Node modules for Spectron +cd ../vscode-smoketest +test -d node_modules || npm install + +# Configuration +export VSCODE_LATEST_PATH="$1" +export VSCODE_STABLE_PATH="$2" +export SMOKETEST_REPO="../vscode-smoketest-express" +mkdir -p test_data + +if [[ $1 == *"Insiders"* || $1 == *"insiders"* ]]; then + export VSCODE_EDITION="insiders" +fi + +if [[ "$OSTYPE" == "darwin"* ]]; then + curl "https://raw.githubusercontent.com/Microsoft/vscode-docs/master/scripts/keybindings/doc.keybindings.osx.json" -o "test_data/keybindings.darwin.json" # Download OS X keybindings +else + wget https://raw.githubusercontent.com/Microsoft/vscode-docs/master/scripts/keybindings/doc.keybindings.linux.json -O test_data/keybindings.linux.json # Download Linux keybindings +fi + +# Compile and launch the smoke test +tsc +exec npm test diff --git a/smoketest/src/areas/common.ts b/smoketest/src/areas/common.ts new file mode 100644 index 0000000000000..c955c206eea22 --- /dev/null +++ b/smoketest/src/areas/common.ts @@ -0,0 +1,163 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from "../spectron/application"; +import { Util } from '../helpers/utilities'; + +/** + * Contains methods that are commonly used across test areas. + */ +export class CommonActions { + private util: Util; + + constructor(private spectron: SpectronApplication) { + this.util = new Util(); + } + + public async getWindowTitle(): Promise { + return this.spectron.client.getTitle(); + } + + public enter(): Promise { + return this.spectron.client.keys(['Enter', 'NULL']); + } + + public async addSetting(setting: string, value: string): Promise { + await this.spectron.command('workbench.action.openGlobalSettings'); + await this.spectron.wait(); + await this.spectron.client.leftClick('.editable-preferences-editor-container .view-lines', 1, 1, false); + await this.spectron.client.keys(['ArrowDown', 'NULL', 'ArrowDown', 'NULL'], false); + await this.spectron.wait(); + await this.spectron.client.keys(`"${setting}": "${value}"`); + await this.spectron.wait(); + return this.saveOpenedFile(); + } + + public async newUntitledFile(): Promise { + await this.spectron.command('workbench.action.files.newUntitledFile'); + return this.spectron.wait(); + } + + public closeTab(): Promise { + return this.spectron.client.keys(['Control', 'w', 'NULL']); + } + + public async getTab(tabName: string, active?: boolean): Promise { + let tabSelector = active ? '.tab.active' : 'div'; + let el = await this.spectron.client.element(`.tabs-container ${tabSelector}[aria-label="${tabName}, tab"]`); + if (el.status === 0) { + return el; + } + + return undefined; + } + + public selectTab(tabName: string): Promise { + return this.spectron.client.click(`.tabs-container div[aria-label="${tabName}, tab"]`); + } + + public async openFirstMatchFile(fileName: string): Promise { + await this.openQuickOpen(); + await this.type(fileName); + await this.spectron.wait(); + await this.enter(); + return this.spectron.wait(); + } + + public saveOpenedFile(): Promise { + return this.spectron.command('workbench.action.files.save'); + } + + public type(text: string): Promise { + let spectron = this.spectron; + + return new Promise(function (res) { + let textSplit = text.split(' '); + + async function type(i: number) { + if (!textSplit[i] || textSplit[i].length <= 0) { + return res(); + } + + const toType = textSplit[i + 1] ? `${textSplit[i]} ` : textSplit[i]; + await spectron.client.keys(toType, false); + await spectron.client.keys(['NULL']); + await type(i + 1); + } + + return type(0); + }); + } + + public showCommands(): Promise { + return this.spectron.command('workbench.action.showCommands'); + } + + public openQuickOpen(): Promise { + return this.spectron.command('workbench.action.quickOpen'); + } + + public closeQuickOpen(): Promise { + return this.spectron.command('workbench.action.closeQuickOpen'); + } + + public selectNextQuickOpenElement(): Promise { + return this.spectron.client.keys(['ArrowDown', 'NULL']); + } + + public async getQuickOpenElements(): Promise { + const elements = await this.spectron.waitFor(this.spectron.client.elements, 'div[aria-label="Quick Picker"] .monaco-tree-rows.show-twisties .monaco-tree-row'); + return elements.value.length; + } + + public async openFile(fileName: string, explorer?: boolean): Promise { + let selector = `div[class="monaco-icon-label file-icon ${fileName}-name-file-icon ${this.getExtensionSelector(fileName)}`; + if (explorer) { + selector += ' explorer-item'; + } + selector += '"]'; + + await this.spectron.waitFor(this.spectron.client.doubleClick, selector); + return this.spectron.wait(); + } + + public getExtensionSelector(fileName: string): string { + const extension = fileName.split('.')[1]; + if (extension === 'js') { + return 'js-ext-file-icon javascript-lang-file-icon'; + } else if (extension === 'json') { + return 'json-ext-file-icon json-lang-file-icon'; + } else if (extension === 'md') { + return 'md-ext-file-icon markdown-lang-file-icon'; + } + + throw new Error('No class defined for this file extension'); + } + + public async getEditorFirstLinePlainText(): Promise { + try { + const span = await this.spectron.client.getText('.view-lines span span'); + if (Array.isArray(span)) { + return span[0]; + } + + return span; + } catch (e) { + return undefined; + } + } + + public removeFile(filePath: string): void { + this.util.removeFile(filePath); + } + + public removeDirectory(directory: string): Promise { + try { + return this.util.rimraf(directory); + } catch (e) { + throw new Error(`Failed to remove ${directory} with an error: ${e}`); + } + } +} \ No newline at end of file diff --git a/smoketest/src/areas/configuration-views.ts b/smoketest/src/areas/configuration-views.ts new file mode 100644 index 0000000000000..1291469c849cb --- /dev/null +++ b/smoketest/src/areas/configuration-views.ts @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; + +export enum ActivityBarPosition { + LEFT = 0, + RIGHT = 1 +}; + +export class ConfigurationView { + // Stores key binding defined for the toggle of activity bar position + private keybinding: string[]; + + constructor(private spectron: SpectronApplication) { + // noop + } + + public getEditorLineNumbers(): any { + return this.spectron.client.elements('.line-numbers'); + } + + public enterKeybindingsView(): any { + return this.spectron.command('workbench.action.openGlobalKeybindings'); + } + + public selectFirstKeybindingsMatch(): any { + return this.spectron.waitFor(this.spectron.client.click, 'div[aria-label="Keybindings"] .monaco-list-row.keybinding-item'); + } + + public changeKeybinding(): any { + return this.spectron.command('editor.action.defineKeybinding'); + } + + public enterBinding(keys: string[]): any { + this.keybinding = keys; + return this.spectron.client.keys(keys); + } + + public toggleActivityBarPosition(): any { + return this.spectron.client.keys(this.keybinding); + } + + public async getActivityBar(position: ActivityBarPosition) { + let positionClass: string; + + if (position === ActivityBarPosition.LEFT) { + positionClass = 'left'; + } else if (position === ActivityBarPosition.RIGHT) { + positionClass = 'right'; + } else { + throw new Error('No such position for activity bar defined.'); + } + try { + return await this.spectron.waitFor(this.spectron.client.getHTML, `.part.activitybar.${positionClass}`); + } catch (e) { + return undefined; + }; + } +} \ No newline at end of file diff --git a/smoketest/src/areas/css.ts b/smoketest/src/areas/css.ts new file mode 100644 index 0000000000000..3388ab4e465ff --- /dev/null +++ b/smoketest/src/areas/css.ts @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; + +export enum CSSProblem { + WARNING = 0, + ERROR = 1 +}; + +export class CSS { + + constructor(private spectron: SpectronApplication) { + // noop + } + + public openQuickOutline(): any { + return this.spectron.command('workbench.action.gotoSymbol'); + } + + public toggleProblemsView(): any { + return this.spectron.command('workbench.actions.view.problems'); + } + + public async getEditorProblem(problemType: CSSProblem): Promise { + let selector; + if (problemType === CSSProblem.WARNING) { + selector = 'greensquiggly'; + } else if (problemType === CSSProblem.ERROR) { + selector = 'redsquiggly'; + } else { + throw new Error('No such problem type defined.'); + } + + let el = await this.spectron.client.element(`.view-overlays .cdr.${selector}`); + if (el.status === 0) { + return el; + } + + return undefined; + } + + public async getProblemsViewsProblem(problemType: CSSProblem): Promise { + let selector; + if (problemType === CSSProblem.WARNING) { + selector = 'warning'; + } else if (problemType === CSSProblem.ERROR) { + selector = 'error'; + } else { + throw new Error('No such problem type defined.'); + } + + let el = await this.spectron.client.element(`div[aria-label="Problems grouped by files"] .icon.${selector}`); + if (el.status === 0) { + return el; + } + + return undefined; + } +} \ No newline at end of file diff --git a/smoketest/src/areas/data-loss.ts b/smoketest/src/areas/data-loss.ts new file mode 100644 index 0000000000000..dc1ecf93730e4 --- /dev/null +++ b/smoketest/src/areas/data-loss.ts @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from "../spectron/application"; + +export class DataLoss { + + constructor(private spectron: SpectronApplication) { + } + + public openExplorerViewlet(): Promise { + return this.spectron.command('workbench.view.explorer'); + } + + public async verifyTabIsDirty(tabName: string, active?: boolean): Promise { + let activeSelector = active ? '.active' : ''; + let el = await this.spectron.client.element(`.tabs-container .tab.dirty${activeSelector}[aria-label="${tabName}, tab"]`); + if (el.status === 0) { + return el; + } + + return undefined; + } +} \ No newline at end of file diff --git a/smoketest/src/areas/extensions.ts b/smoketest/src/areas/extensions.ts new file mode 100644 index 0000000000000..4edec9d06ef87 --- /dev/null +++ b/smoketest/src/areas/extensions.ts @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; +import { CommonActions } from "./common"; + +export class Extensions { + + private readonly extensionsViewletSelector = 'div[id="workbench.view.extensions"]'; + + constructor(private spectron: SpectronApplication, private common: CommonActions) { + } + + public async openExtensionsViewlet(): Promise { + await this.spectron.command('workbench.view.extensions'); + return this.spectron.wait(); + } + + public async searchForExtension(name: string): Promise { + const searchBoxSelector = `${this.extensionsViewletSelector} .search-box`; + + await this.spectron.client.clearElement(searchBoxSelector); + await this.spectron.client.click(searchBoxSelector, false); + await this.spectron.client.keys(name); + return this.spectron.client.keys(['NULL', 'Enter', 'NULL']); + } + + public installFirstResult(): Promise { + return this.spectron.client.click(`${this.extensionsViewletSelector} .monaco-list-rows>:nth-child(1) .extension .extension-action.install`); + } + + public getFirstReloadText(): Promise { + return this.spectron.waitFor(this.spectron.client.getText, `${this.extensionsViewletSelector} .monaco-list-rows>:nth-child(1) .extension .extension-action.reload`); + } + + public async selectMinimalIconsTheme(): Promise { + await this.common.showCommands(); + await this.common.type('File Icon Theme'); + await this.spectron.wait(); + await this.common.enter(); + return this.spectron.client.keys(['ArrowDown', 'NULL', 'Enter', 'NULL']); + } + + public async verifyFolderIconAppearance(): Promise { + return this.spectron.waitFor(this.spectron.client.getHTML, 'style[class="contributedIconTheme"]'); + } +} \ No newline at end of file diff --git a/smoketest/src/areas/first-experience.ts b/smoketest/src/areas/first-experience.ts new file mode 100644 index 0000000000000..e9141bda899aa --- /dev/null +++ b/smoketest/src/areas/first-experience.ts @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from "../spectron/application"; + +export class FirstExperience { + constructor(private spectron: SpectronApplication) { + // noop + } + + public async getWelcomeTab(): Promise { + let el = await this.spectron.client.element('.vs_code_welcome_page-name-file-icon'); + if (el.status === 0) { + return el; + } + + return undefined; + } +} \ No newline at end of file diff --git a/smoketest/src/areas/git.ts b/smoketest/src/areas/git.ts new file mode 100644 index 0000000000000..8228771a7d7fc --- /dev/null +++ b/smoketest/src/areas/git.ts @@ -0,0 +1,69 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; +import { CommonActions } from "./common"; + +export class Git { + private readonly bodyVarSelector = '.view-lines>:nth-child(6) .mtk11'; + + constructor(private spectron: SpectronApplication, private commonActions: CommonActions) { + // noop + } + + public openGitViewlet(): Promise { + return this.spectron.command('workbench.view.git'); + } + + public getScmIconChanges(): Promise { + return this.spectron.waitFor(this.spectron.client.getText, 'div[id="workbench.parts.activitybar"] .badge.scm-viewlet-label .badge-content'); + } + + public async verifyScmChange(fileName: string): Promise { + let el = await this.spectron.client.element(`div[class="monaco-icon-label file-icon ${fileName}-name-file-icon ${this.commonActions.getExtensionSelector(fileName)}"]`); + if (el.status === 0) { + return el; + } + + return undefined; + } + + public getOriginalAppJsBodyVarName(): Promise { + return this.spectron.waitFor(this.spectron.client.getText, `.editor.original ${this.bodyVarSelector}`); + } + + public getModifiedAppJsBodyVarName(): Promise { + return this.spectron.waitFor(this.spectron.client.getText, `.editor.modified ${this.bodyVarSelector}`); + } + + public async stageFile(fileName: string): Promise { + await this.spectron.client.moveToObject(`div[class="monaco-icon-label file-icon ${fileName}-name-file-icon ${this.commonActions.getExtensionSelector(fileName)}"`); + await this.spectron.client.click('.action-label.icon.contrib-cmd-icon-4'); + return this.spectron.wait(); + } + + public async unstageFile(fileName: string): Promise { + await this.spectron.client.moveToObject(`div[class="monaco-icon-label file-icon ${fileName}-name-file-icon ${this.commonActions.getExtensionSelector(fileName)}"`); + await this.spectron.client.click('.action-label.icon.contrib-cmd-icon-6'); + return this.spectron.wait(); + } + + public getStagedCount(): Promise { + return this.spectron.waitFor(this.spectron.client.getText, '.scm-status.show-file-icons .monaco-list-rows>:nth-child(1) .monaco-count-badge'); + } + + public focusOnCommitBox(): Promise { + return this.spectron.client.click('div[id="workbench.view.scm"] textarea'); + } + + public async pressCommit(): Promise { + await this.spectron.client.click('.action-label.icon.contrib-cmd-icon-10'); + return this.spectron.wait(); + } + + public getOutgoingChanges(): Promise { + return this.spectron.client.getText('a[title="Synchronize changes"]'); + } +} \ No newline at end of file diff --git a/smoketest/src/areas/integrated-terminal.ts b/smoketest/src/areas/integrated-terminal.ts new file mode 100644 index 0000000000000..b066db8adf718 --- /dev/null +++ b/smoketest/src/areas/integrated-terminal.ts @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; +import { CommonActions } from "./common"; + +export class IntegratedTerminal { + + constructor(private spectron: SpectronApplication) { + // noop + } + + public async openTerminal(commonActions: CommonActions): Promise { + // Backquote dispatching does not work in OS X + if (process.platform === 'darwin') { + await commonActions.showCommands(); + await commonActions.type('Toggle Integrated Terminal'); + return commonActions.enter(); + } + + return this.spectron.command('workbench.action.terminal.toggleTerminal'); + } + + public async getCommandOutput(command: string): Promise { + const selector = 'div[id="workbench.panel.terminal"] .xterm-rows'; + let readRow = process.platform === 'win32' ? 5 : 2; + let output: string = await this.spectron.client.getText(`${selector}>:nth-child(${readRow})`); + + // If ended up on the wrong line, it could be terminal's restored session (e.g. on OS X) + if (output.trim().endsWith(command)) { + output = await this.spectron.client.getText(`${selector}>:nth-child(${readRow+1})`); // try next line + } + + return output.trim(); // remove many   tags + } +} \ No newline at end of file diff --git a/smoketest/src/areas/javascript-debug.ts b/smoketest/src/areas/javascript-debug.ts new file mode 100644 index 0000000000000..948594945d7a4 --- /dev/null +++ b/smoketest/src/areas/javascript-debug.ts @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; + +export class JavaScriptDebug { + private readonly sidebarSelector = '.margin-view-overlays'; + + constructor(private spectron: SpectronApplication) { + // noop + } + + public openDebugViewlet(): Promise { + return this.spectron.command('workbench.view.debug'); + } + + public async pressConfigureLaunchJson(): Promise { + await this.spectron.waitFor(this.spectron.client.click, 'ul[aria-label="Debug actions"] .action-label.icon.debug-action.configure'); + await this.spectron.wait(); + await this.spectron.client.keys(['ArrowDown', 'NULL', 'Enter']); + return this.spectron.wait(); + } + + public getProgramConfigValue(): Promise { + return this.spectron.client.getText('.view-lines>:nth-child(11) .mtk7'); + } + + public setBreakpointOnLine(lineNumber: number): Promise { + return this.spectron.client.leftClick(`${this.sidebarSelector}>:nth-child(${lineNumber})`, 5, 5); + } + + public async verifyBreakpointOnLine(lineNumber: number): Promise { + let el = await this.spectron.client.element(`${this.sidebarSelector}>:nth-child(${lineNumber}) .cgmr.debug-breakpoint-glyph`); + if (el.status === 0) { + return el; + } + + return undefined; + } +} \ No newline at end of file diff --git a/smoketest/src/areas/javascript.ts b/smoketest/src/areas/javascript.ts new file mode 100644 index 0000000000000..a2f2644c86fd2 --- /dev/null +++ b/smoketest/src/areas/javascript.ts @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; + +export class JavaScript { + private readonly appVarSelector = '.view-lines>:nth-child(7) .mtk11'; + private readonly firstCommentSelector = '.margin-view-overlays>:nth-child(3)'; + private readonly expressVarSelector = '.view-lines>:nth-child(11) .mtk10'; + + constructor(private spectron: SpectronApplication) { + // noop + } + + public openQuickOutline(): Promise { + return this.spectron.command('workbench.action.gotoSymbol'); + } + + public async findAppReferences(): Promise { + await this.spectron.client.click(this.appVarSelector, false); + return this.spectron.command('editor.action.referenceSearch.trigger'); + } + + public async getTitleReferencesCount(): Promise { + const meta = await this.spectron.client.getText('.reference-zone-widget.results-loaded .peekview-title .meta'); + + return meta.match(/\d+/)[0]; + } + + public async getTreeReferencesCount(): Promise { + const treeElems = await this.spectron.client.elements('.reference-zone-widget.results-loaded .ref-tree.inline .show-twisties .monaco-tree-row'); + return treeElems.value.length; + } + + public async renameApp(newValue: string): Promise { + await this.spectron.client.click(this.appVarSelector); + await this.spectron.command('editor.action.rename'); + await this.spectron.wait(); + return this.spectron.client.keys(newValue, false); + } + + public async getNewAppName(): Promise { + return this.spectron.client.getText(this.appVarSelector); + } + + public async toggleFirstCommentFold(): Promise { + return this.spectron.client.click(`${this.firstCommentSelector} .cldr.folding`); + } + + public async getFirstCommentFoldedIcon(): Promise { + return this.spectron.client.getHTML(`${this.firstCommentSelector} .cldr.folding.collapsed`); + } + + public async getNextLineNumberAfterFold(): Promise { + return this.spectron.client.getText(`.margin-view-overlays>:nth-child(4) .line-numbers`) + } + + public async goToExpressDefinition(): Promise { + await this.spectron.client.click(this.expressVarSelector); + return this.spectron.command('editor.action.goToDeclaration'); + } + + public async peekExpressDefinition(): Promise { + await this.spectron.client.click(this.expressVarSelector); + return this.spectron.command('editor.action.previewDeclaration'); + } + + public async getPeekExpressResultName(): Promise { + return this.spectron.client.getText('.reference-zone-widget.results-loaded .filename'); + } +} \ No newline at end of file diff --git a/smoketest/src/areas/localization.ts b/smoketest/src/areas/localization.ts new file mode 100644 index 0000000000000..4ad30cdeb88e1 --- /dev/null +++ b/smoketest/src/areas/localization.ts @@ -0,0 +1,55 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; + +export enum ViewletType { + SEARCH = 0, + SCM = 1, + DEBUG = 2, + EXTENSIONS = 3 +} + +export class Localization { + + constructor(private spectron: SpectronApplication) { + // noop + } + + public async getOpenEditorsText(): Promise { + const explorerTitles = await this.spectron.client.getText('div[id="workbench.view.explorer"] .title span'); + return explorerTitles[0]; + } + + public openViewlet(type: ViewletType): Promise { + let command; + + switch (type) { + case ViewletType.SEARCH: + command = 'workbench.view.search'; + break; + case ViewletType.SCM: + command = 'workbench.view.scm'; + break; + case ViewletType.DEBUG: + command = 'workbench.view.debug'; + break; + case ViewletType.EXTENSIONS: + command = 'workbench.view.extensions'; + break; + } + + return this.spectron.command(command, false); + } + + public getOpenedViewletTitle(): Promise { + return this.spectron.client.getText('div[id="workbench.parts.sidebar"] .title-label span'); + } + + public getExtensionsSearchPlaceholder(): Promise { + return this.spectron.client.getAttribute('div[id="workbench.view.extensions"] .search-box', 'placeholder'); + } + +} \ No newline at end of file diff --git a/smoketest/src/areas/search.ts b/smoketest/src/areas/search.ts new file mode 100644 index 0000000000000..5477a5f25d916 --- /dev/null +++ b/smoketest/src/areas/search.ts @@ -0,0 +1,50 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; + +export class Search { + + constructor(private spectron: SpectronApplication) { + // noop + } + + public openSearchViewlet(): Promise { + return this.spectron.command('workbench.view.search'); + } + + public async searchFor(text: string): Promise { + await this.spectron.client.keys(text); + return this.spectron.client.keys(['NULL', 'Enter', 'NULL'], false); + } + + public setReplaceText(text: string): any { + return this.spectron.client.setValue('.viewlet .input[title="Replace"]', text); + } + + public replaceFirstMatch(): any { + return this.spectron.client.click('.monaco-tree-rows.show-twisties .action-label.icon.action-replace-all'); + } + + public getResultText(): any { + return this.spectron.waitFor(this.spectron.client.getText, '.search-viewlet .message>p'); + } + + public toggleSearchDetails(): any { + return this.spectron.client.click('.query-details .more'); + } + + public toggleReplace(): any { + return this.spectron.client.click('.monaco-button.toggle-replace-button.collapse'); + } + + public hoverOverResultCount(): any { + return this.spectron.waitFor(this.spectron.client.moveToObject, '.monaco-count-badge'); + } + + public dismissResult(): any { + return this.spectron.client.click('.action-label.icon.action-remove') + } +} \ No newline at end of file diff --git a/smoketest/src/areas/statusbar.ts b/smoketest/src/areas/statusbar.ts new file mode 100644 index 0000000000000..93b7349518355 --- /dev/null +++ b/smoketest/src/areas/statusbar.ts @@ -0,0 +1,99 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; + +export enum StatusBarElement { + BRANCH_STATUS = 0, + SYNC_STATUS = 1, + PROBLEMS_STATUS = 2, + SELECTION_STATUS = 3, + INDENTATION_STATUS = 4, + ENCODING_STATUS = 5, + EOL_STATUS = 6, + LANGUAGE_STATUS = 7, + FEEDBACK_ICON = 8 +} + +export class StatusBar { + + private selectorsMap: Map; + private readonly mainSelector = 'div[id="workbench.parts.statusbar"]'; + + constructor(private spectron: SpectronApplication) { + this.populateSelectorsMap(); + } + + public async isVisible(element: StatusBarElement): Promise { + const selector = this.selectorsMap.get(element); + if (!selector) { + throw new Error('No such element in the status bar defined.'); + } + + return this.spectron.client.isVisible(selector); + } + + public async clickOn(element: StatusBarElement): Promise { + const selector = this.selectorsMap.get(element); + if (!selector) { + throw new Error('No such element in the status bar defined.'); + } + + return this.spectron.client.click(selector); + } + + public async getProblemsView(): Promise { + let el = await this.spectron.client.element('div[id="workbench.panel.markers"]'); + if (el.status === 0) { + return el; + } + + return undefined; + } + + public async getFeedbackView(): Promise { + let el = await this.spectron.client.element('.feedback-form'); + if (el.status === 0) { + return el; + } + + return undefined; + } + + public isQuickOpenWidgetVisible(): Promise { + return this.spectron.client.isVisible('.quick-open-widget'); + } + + public async getEditorHighlightedLine(lineNumber: number): Promise { + let el = await this.spectron.client.element(`.monaco-editor .view-overlays>:nth-child(${lineNumber}) .current-line`); + if (el.status === 0) { + return el; + } + + return undefined; + } + + public async getEOLMode(): Promise { + const selector = this.selectorsMap.get(StatusBarElement.EOL_STATUS); + if (!selector) { + throw new Error('No such element in the status bar defined.'); + } + + return this.spectron.client.getText(selector); + } + + private populateSelectorsMap(): void { + this.selectorsMap = new Map(); + this.selectorsMap.set(StatusBarElement.BRANCH_STATUS, `${this.mainSelector} .octicon.octicon-git-branch`); + this.selectorsMap.set(StatusBarElement.SYNC_STATUS, `${this.mainSelector} .octicon.octicon-sync`); + this.selectorsMap.set(StatusBarElement.PROBLEMS_STATUS, `${this.mainSelector} .task-statusbar-item[title="Problems"]`); + this.selectorsMap.set(StatusBarElement.SELECTION_STATUS, `${this.mainSelector} .editor-status-selection`); + this.selectorsMap.set(StatusBarElement.INDENTATION_STATUS, `${this.mainSelector} .editor-status-indentation`); + this.selectorsMap.set(StatusBarElement.ENCODING_STATUS, `${this.mainSelector} .editor-status-encoding`); + this.selectorsMap.set(StatusBarElement.EOL_STATUS, `${this.mainSelector} .editor-status-eol`); + this.selectorsMap.set(StatusBarElement.LANGUAGE_STATUS, `${this.mainSelector} .editor-status-mode`); + this.selectorsMap.set(StatusBarElement.FEEDBACK_ICON, `${this.mainSelector} .dropdown.send-feedback`); + } +} \ No newline at end of file diff --git a/smoketest/src/areas/tasks.ts b/smoketest/src/areas/tasks.ts new file mode 100644 index 0000000000000..e46c2961df585 --- /dev/null +++ b/smoketest/src/areas/tasks.ts @@ -0,0 +1,50 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; + +export class Tasks { + + private readonly outputViewSelector = 'div[id="workbench.panel.output"] .view-lines'; + private readonly workbenchPanelSelector = 'div[id="workbench.parts.panel"]'; + private readonly problemsViewSelector = 'div[id="workbench.panel.markers"] .monaco-tree-row.expanded'; + + constructor(private spectron: SpectronApplication) { + // noop + } + + public build(): Promise { + return this.spectron.command('workbench.action.tasks.build'); + } + + public openProblemsView(): Promise { + return this.spectron.command('workbench.actions.view.problems'); + } + + public async firstOutputLineEndsWith(fileName: string): Promise { + const firstLine = await this.spectron.waitFor(this.spectron.client.getText, `${this.outputViewSelector}>:nth-child(2)`); + return firstLine.endsWith(fileName); + } + + public getOutputResult(): Promise { + return this.spectron.waitFor(this.spectron.client.getText, `${this.outputViewSelector}>:nth-child(10) span.mtk1`); + } + + public selectOutputViewType(type: string): Promise { + return this.spectron.client.selectByValue(`${this.workbenchPanelSelector} .select-box`, type); + } + + public getOutputViewType(): Promise { + return this.spectron.client.getValue(`${this.workbenchPanelSelector} .select-box`); + } + + public getProblemsViewFirstElementName(): Promise { + return this.spectron.waitFor(this.spectron.client.getText, `${this.problemsViewSelector} .label-name`); + } + + public getProblemsViewFirstElementCount(): Promise { + return this.spectron.waitFor(this.spectron.client.getText, `${this.problemsViewSelector} .monaco-count-badge`); + } +} \ No newline at end of file diff --git a/smoketest/src/helpers/screenshot.ts b/smoketest/src/helpers/screenshot.ts new file mode 100644 index 0000000000000..649c38493e4fc --- /dev/null +++ b/smoketest/src/helpers/screenshot.ts @@ -0,0 +1,48 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from "../spectron/application"; +var fs = require('fs'); + +const __testTime = new Date().toISOString(); + +export class Screenshot { + private index: number = 0; + private testPath: string; + + constructor(private spectron: SpectronApplication, testName: string) { + const testTime = this.sanitizeFolderName(__testTime); + testName = this.sanitizeFolderName(testName); + + this.testPath = `test_data/screenshots/${testTime}/${testName}`; + this.createFolder(this.testPath); + } + + public capture(): Promise { + return new Promise(async (res, rej) => { + const image: Electron.NativeImage = await this.spectron.app.browserWindow.capturePage(); + fs.writeFile(`${this.testPath}/${this.index}.png`, image, (err) => { + if (err) { + rej(err); + } + }); + this.index++; + res(); + }); + } + + private createFolder(name: string) { + name.split('/').forEach((folderName, i, fullPath) => { + const folder = fullPath.slice(0, i + 1).join('/'); + if (!fs.existsSync(folder)) { + fs.mkdirSync(folder); + } + }); + } + + private sanitizeFolderName(name: string): string { + return name.replace(/[&*:\/]/g, ''); + } +} \ No newline at end of file diff --git a/smoketest/src/helpers/utilities.ts b/smoketest/src/helpers/utilities.ts new file mode 100644 index 0000000000000..2a52a4fe7dfd2 --- /dev/null +++ b/smoketest/src/helpers/utilities.ts @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +var fs = require('fs'); +var rimraf = require('rimraf'); + +/** + * Contains methods that are commonly used across test areas. + */ +export class Util { + constructor() { + // noop + } + + public removeFile(filePath: string): void { + try { + fs.unlinkSync(`${filePath}`); + } catch (e) { + if (e.code !== 'ENOENT') { + throw e; + } + } + } + + public rimraf(directory: string): Promise { + return new Promise((res, rej) => { + rimraf(directory, (err) => { + if (err) { + rej(err); + } + res(); + }); + }); + } +} \ No newline at end of file diff --git a/smoketest/src/main.ts b/smoketest/src/main.ts new file mode 100644 index 0000000000000..9da55ce546aa7 --- /dev/null +++ b/smoketest/src/main.ts @@ -0,0 +1,771 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; +import { SpectronApplication } from "./spectron/application"; +import { CommonActions } from './areas/common'; +import { FirstExperience } from './areas/first-experience'; +import { ConfigurationView, ActivityBarPosition } from './areas/configuration-views'; +import { Search } from './areas/search'; +import { CSS, CSSProblem } from './areas/css'; +import { JavaScript } from './areas/javascript'; +import { JavaScriptDebug } from './areas/javascript-debug'; +import { Git } from './areas/git'; +import { IntegratedTerminal } from './areas/integrated-terminal'; +import { StatusBar, StatusBarElement } from './areas/statusBar'; +import { DataLoss } from './areas/data-loss'; +import { Tasks } from './areas/tasks'; +import { Extensions } from './areas/extensions'; +import { Localization, ViewletType } from "./areas/localization"; + +describe('Smoke Test Suite', function () { + const latestPath = process.env.VSCODE_LATEST_PATH; + const stablePath = process.env.VSCODE_STABLE_PATH; + const insiders = process.env.VSCODE_EDITION; + const workspacePath = process.env.SMOKETEST_REPO; + const tempUserDir = 'test_data/temp_user_dir'; + const tempExtensionsDir = 'test_data/temp_extensions_dir'; + + let app: SpectronApplication; + let common: CommonActions; + this.retries(2); + + if (stablePath) { + context('Data Migration', function () { + + afterEach(async function () { + await app.stop(); + return await common.removeDirectory(tempUserDir) + }); + + function setupSpectron(context: Mocha.ITestCallbackContext, appPath: string, workspace?: string[]): void { + app = new SpectronApplication(appPath, context.test.fullTitle(), context.test.currentRetry(), workspace, [`--user-data-dir=${tempUserDir}`]); + common = new CommonActions(app); + } + + it('checks if the Untitled file is restored migrating from stable to latest', async function () { + const textToType = 'Very dirty file'; + + // Setting up stable version + setupSpectron(this, stablePath); + await app.start(); + + await common.newUntitledFile(); + await common.type(textToType); + await app.stop(); + + await app.wait(); // wait until all resources are released (e.g. locked local storage) + + // Checking latest version for the restored state + setupSpectron(this, latestPath); + await app.start(); + + assert.ok(await common.getTab('Untitled-1')); + await common.selectTab('Untitled-1'); + const editorText = await common.getEditorFirstLinePlainText(); + assert.equal(editorText, textToType); + }); + + it('checks if the newly created dirty file is restored migrating from stable to latest', async function () { + const fileName = 'test_data/plainFile', + firstTextPart = 'This is going to be an unsaved file', secondTextPart = '_that is dirty.'; + + // Setting up stable version + setupSpectron(this, stablePath, [fileName]); + await common.removeFile(`${fileName}`); + await app.start(); + + await common.type(firstTextPart); + await common.saveOpenedFile(); + await app.wait(); + await common.type(secondTextPart); + + await app.stop(); + await app.wait(); // wait until all resources are released (e.g. locked local storage) + + // Checking latest version for the restored state + setupSpectron(this, latestPath); + await app.start(); + assert.ok(await common.getTab(fileName.split('/')[1])); + await common.selectTab(fileName.split('/')[1]); + const editorText = await common.getEditorFirstLinePlainText(); + assert.equal(editorText, firstTextPart.concat(secondTextPart)); + + // Cleanup + await common.removeFile(`${fileName}`); + }); + + it('cheks if opened tabs are restored migrating from stable to latest', async function () { + const fileName1 = 'app.js', fileName2 = 'jsconfig.json', fileName3 = 'readme.md'; + setupSpectron(this, stablePath, [workspacePath]); + await app.start(); + await common.openFile(fileName1, true); + await common.openFile(fileName2, true); + await common.openFile(fileName3, true); + await app.stop(); + + setupSpectron(this, latestPath, [workspacePath]); + await app.start(); + assert.ok(await common.getTab(fileName1)); + assert.ok(await common.getTab(fileName2)); + assert.ok(await common.getTab(fileName3)); + }); + }); + } + + context('Data Loss', function () { + let dataLoss: DataLoss; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath], [`--user-data-dir=${tempUserDir}`]); + common = new CommonActions(app); + dataLoss = new DataLoss(app); + await common.removeDirectory(tempUserDir); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it(`verifies that 'hot exit' works for dirty files`, async function () { + const textToType = 'Hello, Code!', fileName = 'readme.md', untitled = 'Untitled-1'; + await common.newUntitledFile(); + await common.type(textToType); + await dataLoss.openExplorerViewlet(); + await common.openFile(fileName, true); + await common.type(textToType); + + await app.stop(); + await app.start(); + + // check tab presence + assert.ok(await common.getTab(untitled)); + assert.ok(await common.getTab(fileName, true)); + // check if they marked as dirty (icon) and active tab is the last opened + assert.ok(await dataLoss.verifyTabIsDirty(untitled)); + assert.ok(await dataLoss.verifyTabIsDirty(fileName, true)); + }); + + it(`verifies that contents of the dirty files are restored after 'hot exit'`, async function () { + // make one dirty file, + // create one untitled file + const textToType = 'Hello, Code!'; + + // create one untitled file + await common.newUntitledFile(); + await app.wait(); + await common.type(textToType); + + // make one dirty file, + await common.openFile('readme.md', true); + await app.wait(); + await common.type(textToType); + + await app.stop(); + await app.start(); + + // check their contents + let fileDirt = await common.getEditorFirstLinePlainText(); + assert.equal(fileDirt, 'Hello, Code'); // ignore '!' as it is a separate , first part is enough + await common.selectTab('Untitled-1'); + fileDirt = await common.getEditorFirstLinePlainText(); + assert.equal(fileDirt, textToType); + }); + }); + + context('First User Experience', function () { + let experience: FirstExperience; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), undefined, [`--user-data-dir=${tempUserDir}`, `--excludeSwitches=load-component-extension`]); + common = new CommonActions(app); + experience = new FirstExperience(app); + + await common.removeDirectory(tempUserDir); + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it(`verifies if title is set correctly on the clean user-directory startup`, async function () { + const title = await common.getWindowTitle(); + + let expectedTitle = 'Welcome'; + if (process.platform !== 'darwin') { + expectedTitle += ' — Visual Studio Code'; + if (insiders) expectedTitle += ' - Insiders'; + } + + assert.equal(title, expectedTitle); + }); + + it(`verifies if 'Welcome page' tab is presented on the clean user-directory startup`, async function () { + assert.ok(await experience.getWelcomeTab()); + }); + }); + + context('Explorer', function () { + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('quick open search produces correct result', async function () { + await common.openQuickOpen(); + await common.type('.js'); + await app.wait(); + const elCount = await common.getQuickOpenElements(); + assert.equal(elCount, 7); + }); + + it('quick open respects fuzzy matching', async function () { + await common.openQuickOpen(); + await common.type('a.s'); + await app.wait(); + const elCount = await common.getQuickOpenElements(); + assert.equal(elCount, 3); + }); + }); + + context('Configuration and views', function () { + let configView: ConfigurationView; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + configView = new ConfigurationView(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('turns off editor line numbers and verifies the live change', async function () { + await common.newUntitledFile(); + await app.wait(); + let elements = await configView.getEditorLineNumbers(); + assert.equal(elements.value.length, 1); + await common.addSetting('editor.lineNumbers', 'off'); + await app.wait(); + elements = await configView.getEditorLineNumbers(); + assert.equal(elements.value.length, 0); + }); + + it(`changes 'workbench.action.toggleSidebarPosition' command key binding and verifies it`, async function () { + await configView.enterKeybindingsView() + await common.type('workbench.action.toggleSidebarPosition'); + await app.wait(); + await configView.selectFirstKeybindingsMatch(); + await configView.changeKeybinding(); + await configView.enterBinding(['Control', 'u', 'NULL']); + await common.enter(); + let html = await configView.getActivityBar(ActivityBarPosition.RIGHT); + assert.equal(html, undefined);; + await app.wait(); + await configView.toggleActivityBarPosition(); + html = await configView.getActivityBar(ActivityBarPosition.RIGHT); + assert.ok(html); + }); + }); + + context('Search', function () { + let search: Search; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + search = new Search(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('searches for body & checks for correct result number', async function () { + const s = search; + await s.openSearchViewlet(); + await s.searchFor('body'); + const result = await s.getResultText(); + assert.equal(result, '7 results in 4 files'); + }); + + it('searches only for *.js files & checks for correct result number', async function () { + const s = search; + await s.openSearchViewlet(); + await s.searchFor('body'); + await s.toggleSearchDetails(); + await s.searchFor('*.js'); + const results = await s.getResultText(); + assert.equal(results, '4 results in 1 file'); + }); + + it('dismisses result & checks for correct result number', async function () { + const s = search; + await s.openSearchViewlet() + await s.searchFor('body'); + await s.hoverOverResultCount(); + await s.dismissResult(); + await app.wait(); + const result = await s.getResultText(); + assert.equal(result, '3 results in 3 files') + }); + + it('replaces first search result with a replace term', async function () { + const s = search; + await s.openSearchViewlet() + await s.searchFor('body'); + await s.toggleReplace(); + await s.setReplaceText('ydob'); + await s.hoverOverResultCount(); + await s.replaceFirstMatch(); + await app.wait(); + await common.saveOpenedFile(); + const result = await s.getResultText(); + assert.equal(result, '3 results in 3 files'); + }); + }); + + context('CSS', function () { + let css: CSS; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + css = new CSS(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('verifies quick outline', async function () { + await common.openFirstMatchFile('style.css'); + await css.openQuickOutline(); + await app.wait(); + const count = await common.getQuickOpenElements(); + assert.equal(count, 2); + }); + + it('verifies warnings for the empty rule', async function () { + await common.openFirstMatchFile('style.css'); + await common.type('.foo{}'); + await app.wait(); + let warning = await css.getEditorProblem(CSSProblem.WARNING); + assert.ok(warning); + await css.toggleProblemsView(); + warning = await css.getProblemsViewsProblem(CSSProblem.WARNING); + assert.ok(warning); + }); + + it('verifies that warning becomes an error once setting changed', async function () { + await common.addSetting('css.lint.emptyRules', 'error'); + await common.openFirstMatchFile('style.css'); + await common.type('.foo{}'); + await app.wait(); + let error = await css.getEditorProblem(CSSProblem.ERROR); + assert.ok(error); + await css.toggleProblemsView(); + error = await css.getProblemsViewsProblem(CSSProblem.ERROR); + assert.ok(error); + }); + }); + + context('JavaScript', function () { + let js: JavaScript; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + js = new JavaScript(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('shows correct quick outline', async function () { + await common.openFirstMatchFile('bin/www'); + await js.openQuickOutline(); + await app.wait(); + const symbols = await common.getQuickOpenElements(); + assert.equal(symbols, 12); + }); + + it(`finds 'All References' to 'app'`, async function () { + await common.openFirstMatchFile('bin/www'); + await app.wait(); + await js.findAppReferences(); + const titleCount = await js.getTitleReferencesCount(); + assert.equal(titleCount, 3); + const treeCount = await js.getTreeReferencesCount(); + assert.equal(treeCount, 3); + }); + + it(`renames local 'app' variable`, async function () { + await common.openFirstMatchFile('bin/www'); + + const newVarName = 'newApp'; + await js.renameApp(newVarName); + await common.enter(); + const newName = await js.getNewAppName(); + assert.equal(newName, newVarName); + }); + + it('folds/unfolds the code correctly', async function () { + await common.openFirstMatchFile('bin/www'); + // Fold + await js.toggleFirstCommentFold(); + const foldedIcon = await js.getFirstCommentFoldedIcon(); + assert.ok(foldedIcon); + let nextLineNumber = await js.getNextLineNumberAfterFold(); + assert.equal(nextLineNumber, 7); + // Unfold + await js.toggleFirstCommentFold(); + nextLineNumber = await js.getNextLineNumberAfterFold(); + assert.equal(nextLineNumber, 4); + }); + + it(`verifies that 'Go To Definition' works`, async function () { + await common.openFirstMatchFile('app.js'); + await js.goToExpressDefinition(); + await app.wait(); + assert.ok(await common.getTab('index.d.ts')); + }); + + it(`verifies that 'Peek Definition' works`, async function () { + await common.openFirstMatchFile('app.js'); + await js.peekExpressDefinition(); + const definitionFilename = await js.getPeekExpressResultName(); + assert.equal(definitionFilename, 'index.d.ts'); + }); + }); + + context('Debugging JavaScript', function () { + let jsDebug: JavaScriptDebug; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + jsDebug = new JavaScriptDebug(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('autodetects program attribute for launch.json', async function () { + await jsDebug.openDebugViewlet(); + await jsDebug.pressConfigureLaunchJson(); + const value = await jsDebug.getProgramConfigValue(); + process.platform === 'win32' ? assert.equal(value, '"${workspaceRoot}\\\\bin\\\\www"') : assert.equal(value, '"${workspaceRoot}/bin/www"'); + }); + + it(`can set a breakpoint and verify if it's set`, async function () { + await common.openFirstMatchFile('index.js'); + await jsDebug.setBreakpointOnLine(6); + const breakpoint = await jsDebug.verifyBreakpointOnLine(6); + assert.ok(breakpoint); + }); + }); + + context('Git', function () { + let git: Git; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + git = new Git(app, common); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('verifies current changes are picked up by Git viewlet', async function () { + const changesCount = await git.getScmIconChanges(); + assert.equal(changesCount, 2); + await git.openGitViewlet(); + assert.ok(await git.verifyScmChange('app.js')); + assert.ok(await git.verifyScmChange('launch.json')); + }); + + it(`verifies 'app.js' diff viewer changes`, async function () { + await git.openGitViewlet(); + await common.openFile('app.js'); + const original = await git.getOriginalAppJsBodyVarName(); + assert.equal(original, 'bodyParser'); + const modified = await git.getModifiedAppJsBodyVarName(); + assert.equal(modified, 'ydobParser'); + }); + + it(`stages 'app.js' changes and checks stage count`, async function () { + await git.openGitViewlet(); + await app.wait(); + await git.stageFile('app.js'); + const stagedCount = await git.getStagedCount(); + assert.equal(stagedCount, 1); + + // Return back to unstaged state + await git.unstageFile('app.js'); + }); + + it(`stages, commits change to 'app.js' locally and verifies outgoing change`, async function () { + await git.openGitViewlet(); + await app.wait(); + await git.stageFile('app.js'); + await git.focusOnCommitBox(); + await common.type('Test commit'); + await git.pressCommit(); + const changes = await git.getOutgoingChanges(); + assert.equal(changes, ' 0↓ 1↑'); + }); + }); + + context('Integrated Terminal', function () { + let terminal: IntegratedTerminal; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + terminal = new IntegratedTerminal(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it(`opens terminal, runs 'echo' and verifies the output`, async function () { + const command = 'echo test'; + await terminal.openTerminal(common); + await app.wait(); + await common.type(command); + await common.enter(); + await app.wait(); + // Default Powershell terminal adds 3 header rows at the top, whereas bash does not. + let output = await terminal.getCommandOutput(command); + assert.equal(output, 'test'); + }); + }); + + context('Status Bar', function () { + let statusBar: StatusBar; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + statusBar = new StatusBar(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('verifies presence of all default status bar elements', async function () { + await app.wait(); + assert.ok(await statusBar.isVisible(StatusBarElement.BRANCH_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.FEEDBACK_ICON)); + assert.ok(await statusBar.isVisible(StatusBarElement.SYNC_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.PROBLEMS_STATUS)); + + await common.openFirstMatchFile('app.js'); + assert.ok(await statusBar.isVisible(StatusBarElement.ENCODING_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.EOL_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.INDENTATION_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.LANGUAGE_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.SELECTION_STATUS)); + }); + + it(`verifies that 'quick open' opens when clicking on 'Branch', 'Indentation Status, 'Encoding', 'EOL' and 'Language' status elements`, async function () { + await app.wait(); + await statusBar.clickOn(StatusBarElement.BRANCH_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + + await common.openFirstMatchFile('app.js'); + await statusBar.clickOn(StatusBarElement.INDENTATION_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + await statusBar.clickOn(StatusBarElement.ENCODING_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + await statusBar.clickOn(StatusBarElement.EOL_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + await statusBar.clickOn(StatusBarElement.LANGUAGE_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + }); + + it(`verifies that 'Problems View' appears when clicking on 'Problems' status element`, async function () { + await statusBar.clickOn(StatusBarElement.PROBLEMS_STATUS); + assert.ok(await statusBar.getProblemsView()); + }); + + it(`verifies that 'Tweet us feedback' pop-up appears when clicking on 'Feedback' icon`, async function () { + await statusBar.clickOn(StatusBarElement.FEEDBACK_ICON); + assert.ok(await statusBar.getFeedbackView()); + }); + + it(`checks if 'Go to Line' works if called from the status bar`, async function () { + await common.openFirstMatchFile('app.js'); + await statusBar.clickOn(StatusBarElement.SELECTION_STATUS); + const lineNumber = 15; + await common.type(lineNumber.toString()); + await common.enter(); + assert.ok(await statusBar.getEditorHighlightedLine(lineNumber)); + }); + + it(`verifies if changing EOL is reflected in the status bar`, async function () { + await common.openFirstMatchFile('app.js'); + await statusBar.clickOn(StatusBarElement.EOL_STATUS); + await common.selectNextQuickOpenElement(); + await common.enter(); + const currentEOL = await statusBar.getEOLMode(); + assert.equal(currentEOL, 'CRLF'); + }); + }); + + context('Tasks', function () { + let tasks: Tasks; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + tasks = new Tasks(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('verifies that build task produces 6 errors', async function () { + await tasks.build(); + const res = await tasks.getOutputResult(); + assert.equal(res, '✖ 6 problems (6 errors, 0 warnings)'); + }); + + it(`is able to select 'Git' output`, async function () { + await tasks.build(); + await app.wait(); + await tasks.selectOutputViewType('Git'); + const viewType = await tasks.getOutputViewType(); + assert.equal(viewType, 'Git'); + }); + + it('ensures that build task produces errors in index.js', async function () { + await tasks.build(); + assert.ok(await tasks.firstOutputLineEndsWith('index.js')); + }); + + it(`verifies build errors are reflected in 'Problems View'`, async function () { + await tasks.build(); + await app.wait(); + await tasks.openProblemsView(); + const problemName = await tasks.getProblemsViewFirstElementName(); + assert.equal(problemName, 'index.js'); + const problemsCount = await tasks.getProblemsViewFirstElementCount(); + assert.equal(problemsCount, '6'); + }); + }); + + context('Extensions', function () { + let extensions: Extensions; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath], [`--extensions-dir=${tempExtensionsDir}`]); + common = new CommonActions(app); + extensions = new Extensions(app, common); + await common.removeDirectory(tempExtensionsDir); + + return await app.start(); + }); + afterEach(async function () { + await app.stop(); + return await common.removeDirectory(tempExtensionsDir); + }); + + it(`installs 'vscode-icons' extension and verifies reload is prompted`, async function () { + await extensions.openExtensionsViewlet(); + await extensions.searchForExtension('vscode-icons'); + await app.wait(); + await extensions.installFirstResult(); + await app.wait(); + assert.ok(await extensions.getFirstReloadText()); + }); + + it(`installs an extension and checks if it works on restart`, async function () { + await extensions.openExtensionsViewlet(); + await extensions.searchForExtension('vscode-icons'); + await app.wait(); + await extensions.installFirstResult(); + await app.wait(); + await extensions.getFirstReloadText(); + + await app.stop(); + await app.wait(); // wait until all resources are released (e.g. locked local storage) + await app.start(); + await extensions.selectMinimalIconsTheme(); + const x = await extensions.verifyFolderIconAppearance(); + assert.ok(x); + }); + }); + + context('Localization', function () { + afterEach(async function () { + return await app.stop(); + }); + + it(`starts with 'DE' locale and verifies title and viewlets text is in German`, async function () { + app = new SpectronApplication(latestPath, this.test.fullTitle(), this.test.currentRetry(), [workspacePath, '--locale=DE'], [`--user-data-dir=${tempUserDir}`]); + common = new CommonActions(app); + const locale = new Localization(app); + common.removeDirectory(tempUserDir); + + await app.start(); + + let expectedTitle = 'Willkommen — vscode-smoketest-express'; + if (process.platform !== 'darwin') { + expectedTitle += ' — Visual Studio Code'; + if (insiders) expectedTitle += ' - Insiders'; + } + assert.equal(await common.getWindowTitle(), expectedTitle); + + let text = await locale.getOpenEditorsText(); + assert.equal(text.toLowerCase(), 'geöffnete editoren'); + + await locale.openViewlet(ViewletType.SEARCH); + text = await locale.getOpenedViewletTitle() + assert.equal(text.toLowerCase(), 'suchen'); + + await locale.openViewlet(ViewletType.SCM); + text = await locale.getOpenedViewletTitle(); + assert.equal(text.toLowerCase(), 'quellcodeverwaltung: git'); + + await locale.openViewlet(ViewletType.DEBUG); + text = await locale.getOpenedViewletTitle(); + assert.equal(text.toLowerCase(), 'debuggen'); + + await locale.openViewlet(ViewletType.EXTENSIONS); + text = await locale.getExtensionsSearchPlaceholder(); + assert.equal(text.toLowerCase(), 'nach extensions in marketplace suchen'); + }); + }); + +}); \ No newline at end of file diff --git a/smoketest/src/spectron/application.ts b/smoketest/src/spectron/application.ts new file mode 100644 index 0000000000000..5e45474768c8f --- /dev/null +++ b/smoketest/src/spectron/application.ts @@ -0,0 +1,156 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { Application } from 'spectron'; +import { SpectronClient } from './client'; +import { Screenshot } from "../helpers/screenshot"; +var fs = require('fs'); + +/** + * Wraps Spectron's Application instance with its used methods. + */ +export class SpectronApplication { + public client: SpectronClient; + + private spectron: Application; + private readonly pollTrials = 5; + private readonly pollTimeout = 3; // in secs + private keybindings: any[]; + private screenshot: Screenshot; + + constructor(electronPath: string, testName: string, private testRetry: number, args?: string[], chromeDriverArgs?: string[]) { + if (!args) { + args = []; + } + + this.spectron = new Application({ + path: electronPath, + args: args.concat(['--skip-getting-started']), // prevent 'Getting Started' web page from opening on clean user-data-dir + chromeDriverArgs: chromeDriverArgs + }); + this.screenshot = new Screenshot(this, testName); + this.client = new SpectronClient(this.spectron, this.screenshot); + this.testRetry += 1; // avoid multiplication by 0 for wait times + this.retrieveKeybindings(); + } + + public get app(): Application { + return this.spectron; + } + + public async start(): Promise { + try { + await this.spectron.start(); + await this.focusOnWindow(1); // focuses on main renderer window + return this.checkWindowReady(); + } catch (err) { + throw err; + } + } + + public async stop(): Promise { + if (this.spectron && this.spectron.isRunning()) { + return await this.spectron.stop(); + } + } + + public waitFor(func: (...args: any[]) => any, args: any): Promise { + return this.callClientAPI(func, args, 0); + } + + public wait(): Promise { + return new Promise(resolve => setTimeout(resolve, this.testRetry * this.pollTimeout * 1000)); + } + + public focusOnWindow(index: number): Promise { + return this.client.windowByIndex(index); + } + + private checkWindowReady(): Promise { + return this.waitFor(this.spectron.client.getHTML, '[id="workbench.main.container"]'); + } + + private retrieveKeybindings() { + const os = process.platform; + fs.readFile(`test_data/keybindings.${os}.json`, (err, data) => { + if (err) { + throw err; + } + + this.keybindings = JSON.parse(data); + }); + } + + private callClientAPI(func: (...args: any[]) => Promise, args: any, trial: number): Promise { + if (trial > this.pollTrials) { + return Promise.reject(`Could not retrieve the element in ${this.testRetry * this.pollTrials * this.pollTimeout} seconds.`); + } + + return new Promise(async (res, rej) => { + let resolved = false, capture = false; + + const tryCall = async (resolve: any, reject: any): Promise => { + await this.wait(); + try { + const result = await this.callClientAPI(func, args, ++trial); + res(result); + } catch (error) { + rej(error); + } + } + + try { + const result = await func.call(this.client, args, capture); + if (!resolved && result === '') { + resolved = true; + await tryCall(res, rej); + } else if (!resolved) { + resolved = true; + await this.screenshot.capture(); + res(result); + } + } catch (e) { + if (!resolved) { + resolved = true; + await tryCall(res, rej); + } + } + }); + } + + /** + * Retrieves the command from keybindings file and executes it with WebdriverIO client API + * @param command command (e.g. 'workbench.action.files.newUntitledFile') + */ + public command(command: string, capture?: boolean): Promise { + const binding = this.keybindings.find(x => x['command'] == command); + const keys: string = binding.key; + let keysToPress: string[] = []; + + const chords = keys.split(' '); + chords.forEach((chord) => { + const keys = chord.split('+'); + keys.forEach((key) => keysToPress.push(this.transliterate(key))); + keysToPress.push('NULL'); + }); + + return this.client.keys(keysToPress, capture); + } + + /** + * Transliterates key names from keybindings file to WebdriverIO keyboard actions defined in: + * https://w3c.github.io/webdriver/webdriver-spec.html#keyboard-actions + */ + private transliterate(key: string): string { + switch (key) { + case 'ctrl': + return 'Control'; + case 'cmd': + return 'Meta'; + default: + return key.length === 1 ? key : key.charAt(0).toUpperCase() + key.slice(1); + }; + } +} diff --git a/smoketest/src/spectron/client.ts b/smoketest/src/spectron/client.ts new file mode 100644 index 0000000000000..9376bd3e10044 --- /dev/null +++ b/smoketest/src/spectron/client.ts @@ -0,0 +1,127 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { Application } from 'spectron'; +import { Screenshot } from '../helpers/screenshot'; + +/** + * Abstracts the Spectron's WebdriverIO managed client property on the created Application instances. + */ +export class SpectronClient { + + constructor(private spectron: Application, private shot: Screenshot) { + // noop + } + + public windowByIndex(index: number): Promise { + return this.spectron.client.windowByIndex(index); + } + + public async keys(keys: string[] | string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.keys(keys); + } + + public async getText(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.getText(selector); + } + + public async getHTML(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.getHTML(selector); + } + + public async click(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.click(selector); + } + + public async doubleClick(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.doubleClick(selector); + } + + public async leftClick(selector: string, xoffset: number, yoffset: number, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.leftClick(selector, xoffset, yoffset); + } + + public async rightClick(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.rightClick(selector); + } + + public async moveToObject(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.moveToObject(selector); + } + + public async setValue(selector: string, text: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.setValue(selector, text); + } + + public async elements(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.elements(selector); + } + + public async element(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.element(selector); + } + + public async dragAndDrop(sourceElem: string, destinationElem: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.dragAndDrop(sourceElem, destinationElem); + } + + public async selectByValue(selector: string, value: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.selectByValue(selector, value); + } + + public async getValue(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.getValue(selector); + } + + public async getAttribute(selector: string, attribute: string, capture: boolean = true): Promise { + await this.execute(capture); + return Promise.resolve(this.spectron.client.getAttribute(selector, attribute)); + } + + public clearElement(selector: string): any { + return this.spectron.client.clearElement(selector); + } + + public buttonDown(): any { + return this.spectron.client.buttonDown(); + } + + public buttonUp(): any { + return this.spectron.client.buttonUp(); + } + + public async isVisible(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.isVisible(selector); + } + + public getTitle(): string { + return this.spectron.client.getTitle(); + } + + private async execute(capture: boolean): Promise { + if (capture) { + try { + await this.shot.capture(); + } catch (e) { + throw new Error(`Screenshot could not be captured: ${e}`); + } + } + } +} \ No newline at end of file diff --git a/smoketest/tsconfig.json b/smoketest/tsconfig.json new file mode 100644 index 0000000000000..1b0b03c2d672b --- /dev/null +++ b/smoketest/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "noImplicitAny": false, + "removeComments": false, + "preserveConstEnums": true, + "target": "es2016", + "strictNullChecks": true, + "noUnusedParameters": false, + "noUnusedLocals": true, + "outDir": "out", + "sourceMap": true, + "lib": [ + "es2016", + "dom" + ] + }, + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/vscode-smoketest-express b/vscode-smoketest-express new file mode 160000 index 0000000000000..636dd7a2ff71d --- /dev/null +++ b/vscode-smoketest-express @@ -0,0 +1 @@ +Subproject commit 636dd7a2ff71d266c0e015411b47cf5c3a25be5a From cf0d02a2b2b02c131a5a1a71ece2089381f99140 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 May 2017 14:00:55 +0200 Subject: [PATCH 0862/2747] #25246 Fix tests --- .../extensions/test/electron-browser/extensionsActions.test.ts | 2 ++ .../test/electron-browser/extensionsWorkbenchService.test.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts index ca746ff803c1b..f0ae1aaabe1e8 100644 --- a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts @@ -30,6 +30,7 @@ import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtil import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; suite('ExtensionsActions Test', () => { @@ -52,6 +53,7 @@ suite('ExtensionsActions Test', () => { instantiationService.stub(ITelemetryService, NullTelemetryService); instantiationService.set(IWorkspaceContextService, new WorkspaceContextService(TestWorkspace)); + instantiationService.stub(IConfigurationService, { onDidUpdateConfiguration: () => { }, getConfiguration: () => ({}) }); instantiationService.stub(IExtensionGalleryService, ExtensionGalleryService); diff --git a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsWorkbenchService.test.ts b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsWorkbenchService.test.ts index 3940de5754547..d42837e340ece 100644 --- a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsWorkbenchService.test.ts +++ b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsWorkbenchService.test.ts @@ -31,6 +31,7 @@ import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtil import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; import { IChoiceService } from 'vs/platform/message/common/message'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; suite('ExtensionsWorkbenchService Test', () => { @@ -55,6 +56,7 @@ suite('ExtensionsWorkbenchService Test', () => { instantiationService.stub(IExtensionGalleryService, ExtensionGalleryService); instantiationService.set(IWorkspaceContextService, new WorkspaceContextService(TestWorkspace)); + instantiationService.stub(IConfigurationService, { onDidUpdateConfiguration: () => { }, getConfiguration: () => ({}) }); instantiationService.stub(IExtensionManagementService, ExtensionManagementService); instantiationService.stub(IExtensionManagementService, 'onInstallExtension', installEvent.event); From aa82577941ea9f8b6337a56df47732fb568b9c64 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 22 May 2017 15:28:29 +0200 Subject: [PATCH 0863/2747] Moved to test directory. --- {smoketest => test/smoke}/.gitignore | 0 {smoketest => test/smoke}/.vscode/launch.json | 0 {smoketest => test/smoke}/.vscode/tasks.json | 0 {smoketest => test/smoke}/CONTRIBUTING.md | 0 {smoketest => test/smoke}/README.md | 0 {smoketest => test/smoke}/package.json | 0 {smoketest => test/smoke}/scripts/run.ps1 | 11 +++++------ {smoketest => test/smoke}/scripts/run.sh | 0 {smoketest => test/smoke}/src/areas/common.ts | 0 .../smoke}/src/areas/configuration-views.ts | 0 {smoketest => test/smoke}/src/areas/css.ts | 0 {smoketest => test/smoke}/src/areas/data-loss.ts | 0 {smoketest => test/smoke}/src/areas/extensions.ts | 0 .../smoke}/src/areas/first-experience.ts | 0 {smoketest => test/smoke}/src/areas/git.ts | 0 .../smoke}/src/areas/integrated-terminal.ts | 0 .../smoke}/src/areas/javascript-debug.ts | 0 {smoketest => test/smoke}/src/areas/javascript.ts | 0 {smoketest => test/smoke}/src/areas/localization.ts | 0 {smoketest => test/smoke}/src/areas/search.ts | 0 {smoketest => test/smoke}/src/areas/statusbar.ts | 0 {smoketest => test/smoke}/src/areas/tasks.ts | 0 {smoketest => test/smoke}/src/helpers/screenshot.ts | 0 {smoketest => test/smoke}/src/helpers/utilities.ts | 0 {smoketest => test/smoke}/src/main.ts | 0 {smoketest => test/smoke}/src/spectron/application.ts | 0 {smoketest => test/smoke}/src/spectron/client.ts | 0 {smoketest => test/smoke}/tsconfig.json | 0 28 files changed, 5 insertions(+), 6 deletions(-) rename {smoketest => test/smoke}/.gitignore (100%) rename {smoketest => test/smoke}/.vscode/launch.json (100%) rename {smoketest => test/smoke}/.vscode/tasks.json (100%) rename {smoketest => test/smoke}/CONTRIBUTING.md (100%) rename {smoketest => test/smoke}/README.md (100%) rename {smoketest => test/smoke}/package.json (100%) rename {smoketest => test/smoke}/scripts/run.ps1 (85%) rename {smoketest => test/smoke}/scripts/run.sh (100%) rename {smoketest => test/smoke}/src/areas/common.ts (100%) rename {smoketest => test/smoke}/src/areas/configuration-views.ts (100%) rename {smoketest => test/smoke}/src/areas/css.ts (100%) rename {smoketest => test/smoke}/src/areas/data-loss.ts (100%) rename {smoketest => test/smoke}/src/areas/extensions.ts (100%) rename {smoketest => test/smoke}/src/areas/first-experience.ts (100%) rename {smoketest => test/smoke}/src/areas/git.ts (100%) rename {smoketest => test/smoke}/src/areas/integrated-terminal.ts (100%) rename {smoketest => test/smoke}/src/areas/javascript-debug.ts (100%) rename {smoketest => test/smoke}/src/areas/javascript.ts (100%) rename {smoketest => test/smoke}/src/areas/localization.ts (100%) rename {smoketest => test/smoke}/src/areas/search.ts (100%) rename {smoketest => test/smoke}/src/areas/statusbar.ts (100%) rename {smoketest => test/smoke}/src/areas/tasks.ts (100%) rename {smoketest => test/smoke}/src/helpers/screenshot.ts (100%) rename {smoketest => test/smoke}/src/helpers/utilities.ts (100%) rename {smoketest => test/smoke}/src/main.ts (100%) rename {smoketest => test/smoke}/src/spectron/application.ts (100%) rename {smoketest => test/smoke}/src/spectron/client.ts (100%) rename {smoketest => test/smoke}/tsconfig.json (100%) diff --git a/smoketest/.gitignore b/test/smoke/.gitignore similarity index 100% rename from smoketest/.gitignore rename to test/smoke/.gitignore diff --git a/smoketest/.vscode/launch.json b/test/smoke/.vscode/launch.json similarity index 100% rename from smoketest/.vscode/launch.json rename to test/smoke/.vscode/launch.json diff --git a/smoketest/.vscode/tasks.json b/test/smoke/.vscode/tasks.json similarity index 100% rename from smoketest/.vscode/tasks.json rename to test/smoke/.vscode/tasks.json diff --git a/smoketest/CONTRIBUTING.md b/test/smoke/CONTRIBUTING.md similarity index 100% rename from smoketest/CONTRIBUTING.md rename to test/smoke/CONTRIBUTING.md diff --git a/smoketest/README.md b/test/smoke/README.md similarity index 100% rename from smoketest/README.md rename to test/smoke/README.md diff --git a/smoketest/package.json b/test/smoke/package.json similarity index 100% rename from smoketest/package.json rename to test/smoke/package.json diff --git a/smoketest/scripts/run.ps1 b/test/smoke/scripts/run.ps1 similarity index 85% rename from smoketest/scripts/run.ps1 rename to test/smoke/scripts/run.ps1 index d6368da689082..a7e29482a7814 100644 --- a/smoketest/scripts/run.ps1 +++ b/test/smoke/scripts/run.ps1 @@ -1,10 +1,9 @@ Param( [Parameter(Position=0,mandatory=$true)] - [string] $latest, - [Parameter(Position=1,mandatory=$false)] - [string] $stable + [string]$arch ) + # Setup sample repository for the smoke test Set-Location .. if (-Not (Test-Path vscode-smoketest-express)) { @@ -19,14 +18,14 @@ if (-Not (Test-Path vscode-smoketest-express)) { npm install # Setup the test directory for running -Set-Location ..\smoketest +Set-Location ..\smoke if (-Not (Test-Path node_modules)) { npm install } # Configure environment variables -$env:VSCODE_LATEST_PATH = $latest -$env:VSCODE_STABLE_PATH = $stable +$env:VSCODE_LATEST_PATH = "$Root\VSCode-win32-$arch" +# $env:VSCODE_STABLE_PATH = $stable $env:SMOKETEST_REPO = "..\vscode-smoketest-express" if ($latest.Contains('Insiders')) { diff --git a/smoketest/scripts/run.sh b/test/smoke/scripts/run.sh similarity index 100% rename from smoketest/scripts/run.sh rename to test/smoke/scripts/run.sh diff --git a/smoketest/src/areas/common.ts b/test/smoke/src/areas/common.ts similarity index 100% rename from smoketest/src/areas/common.ts rename to test/smoke/src/areas/common.ts diff --git a/smoketest/src/areas/configuration-views.ts b/test/smoke/src/areas/configuration-views.ts similarity index 100% rename from smoketest/src/areas/configuration-views.ts rename to test/smoke/src/areas/configuration-views.ts diff --git a/smoketest/src/areas/css.ts b/test/smoke/src/areas/css.ts similarity index 100% rename from smoketest/src/areas/css.ts rename to test/smoke/src/areas/css.ts diff --git a/smoketest/src/areas/data-loss.ts b/test/smoke/src/areas/data-loss.ts similarity index 100% rename from smoketest/src/areas/data-loss.ts rename to test/smoke/src/areas/data-loss.ts diff --git a/smoketest/src/areas/extensions.ts b/test/smoke/src/areas/extensions.ts similarity index 100% rename from smoketest/src/areas/extensions.ts rename to test/smoke/src/areas/extensions.ts diff --git a/smoketest/src/areas/first-experience.ts b/test/smoke/src/areas/first-experience.ts similarity index 100% rename from smoketest/src/areas/first-experience.ts rename to test/smoke/src/areas/first-experience.ts diff --git a/smoketest/src/areas/git.ts b/test/smoke/src/areas/git.ts similarity index 100% rename from smoketest/src/areas/git.ts rename to test/smoke/src/areas/git.ts diff --git a/smoketest/src/areas/integrated-terminal.ts b/test/smoke/src/areas/integrated-terminal.ts similarity index 100% rename from smoketest/src/areas/integrated-terminal.ts rename to test/smoke/src/areas/integrated-terminal.ts diff --git a/smoketest/src/areas/javascript-debug.ts b/test/smoke/src/areas/javascript-debug.ts similarity index 100% rename from smoketest/src/areas/javascript-debug.ts rename to test/smoke/src/areas/javascript-debug.ts diff --git a/smoketest/src/areas/javascript.ts b/test/smoke/src/areas/javascript.ts similarity index 100% rename from smoketest/src/areas/javascript.ts rename to test/smoke/src/areas/javascript.ts diff --git a/smoketest/src/areas/localization.ts b/test/smoke/src/areas/localization.ts similarity index 100% rename from smoketest/src/areas/localization.ts rename to test/smoke/src/areas/localization.ts diff --git a/smoketest/src/areas/search.ts b/test/smoke/src/areas/search.ts similarity index 100% rename from smoketest/src/areas/search.ts rename to test/smoke/src/areas/search.ts diff --git a/smoketest/src/areas/statusbar.ts b/test/smoke/src/areas/statusbar.ts similarity index 100% rename from smoketest/src/areas/statusbar.ts rename to test/smoke/src/areas/statusbar.ts diff --git a/smoketest/src/areas/tasks.ts b/test/smoke/src/areas/tasks.ts similarity index 100% rename from smoketest/src/areas/tasks.ts rename to test/smoke/src/areas/tasks.ts diff --git a/smoketest/src/helpers/screenshot.ts b/test/smoke/src/helpers/screenshot.ts similarity index 100% rename from smoketest/src/helpers/screenshot.ts rename to test/smoke/src/helpers/screenshot.ts diff --git a/smoketest/src/helpers/utilities.ts b/test/smoke/src/helpers/utilities.ts similarity index 100% rename from smoketest/src/helpers/utilities.ts rename to test/smoke/src/helpers/utilities.ts diff --git a/smoketest/src/main.ts b/test/smoke/src/main.ts similarity index 100% rename from smoketest/src/main.ts rename to test/smoke/src/main.ts diff --git a/smoketest/src/spectron/application.ts b/test/smoke/src/spectron/application.ts similarity index 100% rename from smoketest/src/spectron/application.ts rename to test/smoke/src/spectron/application.ts diff --git a/smoketest/src/spectron/client.ts b/test/smoke/src/spectron/client.ts similarity index 100% rename from smoketest/src/spectron/client.ts rename to test/smoke/src/spectron/client.ts diff --git a/smoketest/tsconfig.json b/test/smoke/tsconfig.json similarity index 100% rename from smoketest/tsconfig.json rename to test/smoke/tsconfig.json From fc4da30933cf790e677a9243167a8ab8c1b92ab2 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 22 May 2017 15:28:42 +0200 Subject: [PATCH 0864/2747] compute sha256 hash of published assets --- build/tfs/common/publish.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/build/tfs/common/publish.ts b/build/tfs/common/publish.ts index d7a31ce7440a5..79dba115e402a 100644 --- a/build/tfs/common/publish.ts +++ b/build/tfs/common/publish.ts @@ -7,6 +7,7 @@ import * as fs from 'fs'; import { execSync } from 'child_process'; +import { Readable } from 'stream'; import * as crypto from 'crypto'; import * as azure from 'azure-storage'; import * as mime from 'mime'; @@ -18,10 +19,9 @@ if (process.argv.length < 6) { process.exit(-1); } -function sha1hash(file: string): Promise { +function hashStream(hashName: string, stream: Readable): Promise { return new Promise((c, e) => { - const shasum = crypto.createHash('sha1'); - const stream = fs.createReadStream(file); + const shasum = crypto.createHash(hashName); stream .on('data', shasum.update.bind(shasum)) @@ -67,6 +67,7 @@ interface Asset { url: string; mooncakeUrl: string; hash: string; + sha256hash: string; } function createOrUpdate(commit: string, quality: string, platform: string, type: string, release: NewDocument, asset: Asset, isUpdate: boolean): Promise { @@ -162,8 +163,11 @@ async function publish(commit: string, quality: string, platform: string, type: console.log('Is Released:', isReleased); console.log('File:', file); - const hash = await sha1hash(file); - console.log('Hash:', hash); + const stream = fs.createReadStream(file); + const [sha1hash, sha256hash] = await Promise.all([hashStream('sha1', stream), hashStream('sha256', stream)]); + + console.log('SHA1:', sha1hash); + console.log('SHA256:', sha1hash); const blobName = commit + '/' + name; const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']; @@ -207,7 +211,8 @@ async function publish(commit: string, quality: string, platform: string, type: type: type, url: `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`, mooncakeUrl: `${process.env['MOONCAKE_CDN_URL']}/${quality}/${blobName}`, - hash: hash + hash: sha1hash, + sha256hash }; const release = { From 5c94029940e07fc9e3f7c540c9d7c77f1dd94d35 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 22 May 2017 15:34:53 +0200 Subject: [PATCH 0865/2747] tfs: fix typo --- build/tfs/common/publish.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tfs/common/publish.ts b/build/tfs/common/publish.ts index 79dba115e402a..ecf1148c2ff0b 100644 --- a/build/tfs/common/publish.ts +++ b/build/tfs/common/publish.ts @@ -167,7 +167,7 @@ async function publish(commit: string, quality: string, platform: string, type: const [sha1hash, sha256hash] = await Promise.all([hashStream('sha1', stream), hashStream('sha256', stream)]); console.log('SHA1:', sha1hash); - console.log('SHA256:', sha1hash); + console.log('SHA256:', sha256hash); const blobName = commit + '/' + name; const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']; From cdd3d8eed2644522e22da6e45502b322a9258e3a Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 22 May 2017 15:37:13 +0200 Subject: [PATCH 0866/2747] send telemetry when invalid timers have been computed --- .../performance.contribution.ts | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts index 0cc4a86b20034..709ecbf800c6d 100644 --- a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts +++ b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts @@ -25,6 +25,7 @@ import { readdir } from 'vs/base/node/pfs'; import { release } from 'os'; import { stopProfiling } from 'vs/base/node/profiler'; import { virtualMachineHint } from 'vs/base/node/id'; +import { forEach } from "vs/base/common/collections"; class ProfilingHint implements IWorkbenchContribution { @@ -208,6 +209,36 @@ class StartupProfiler implements IWorkbenchContribution { } } +class PerformanceTelemetry implements IWorkbenchContribution { + + constructor( + @ITimerService private readonly _timerService: ITimerService, + @ITelemetryService private readonly _telemetryService: ITelemetryService, + @IExtensionService extensionService: IExtensionService, + ) { + TPromise.join([ + TPromise.timeout(7 * 1000), + extensionService.onReady() + ]).then(() => this._validateTimers()); + } + + getId(): string { + return 'performance.PerformanceTelemetry'; + } + + private _validateTimers(): void { + const { startupMetrics } = this._timerService; + const invalidTimers: string[] = []; + forEach(startupMetrics.timers, (entry) => { + if (entry.value < 0) { + invalidTimers.push(entry.key); + } + }); + this._telemetryService.publicLog('invalidTimers', { invalidTimers }); + } +} + const registry = Registry.as(Extensions.Workbench); registry.registerWorkbenchContribution(ProfilingHint); registry.registerWorkbenchContribution(StartupProfiler); +registry.registerWorkbenchContribution(PerformanceTelemetry); From e1f46c1f6a1fc131c6aca24870fa81be25dd8363 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 22 May 2017 15:44:22 +0200 Subject: [PATCH 0867/2747] send size of workbench.main.js --- .../performance.contribution.ts | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts index 709ecbf800c6d..5f86e8efa07d5 100644 --- a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts +++ b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts @@ -21,11 +21,12 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { join } from 'path'; import { localize } from 'vs/nls'; import { platform, Platform } from 'vs/base/common/platform'; -import { readdir } from 'vs/base/node/pfs'; +import { readdir, stat } from 'vs/base/node/pfs'; import { release } from 'os'; import { stopProfiling } from 'vs/base/node/profiler'; import { virtualMachineHint } from 'vs/base/node/id'; -import { forEach } from "vs/base/common/collections"; +import { forEach } from 'vs/base/common/collections'; +import URI from 'vs/base/common/uri'; class ProfilingHint implements IWorkbenchContribution { @@ -219,7 +220,10 @@ class PerformanceTelemetry implements IWorkbenchContribution { TPromise.join([ TPromise.timeout(7 * 1000), extensionService.onReady() - ]).then(() => this._validateTimers()); + ]).then(() => { + this._sendWorkbenchMainSizeTelemetry(); + this._validateTimers(); + }); } getId(): string { @@ -234,7 +238,14 @@ class PerformanceTelemetry implements IWorkbenchContribution { invalidTimers.push(entry.key); } }); - this._telemetryService.publicLog('invalidTimers', { invalidTimers }); + this._telemetryService.publicLog('perf:invalidTimers', { invalidTimers }); + } + + private _sendWorkbenchMainSizeTelemetry(): void { + const { fsPath } = URI.parse(require.toUrl('vs/workbench/electron-browser/workbench.main.js')); + stat(fsPath).then(stats => { + this._telemetryService.publicLog('perf:jsFileSize', { workbenchMain: stats.size }); + }); } } From d718403074bf3848f24715e1c22bde2191fcca78 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 22 May 2017 15:59:42 +0200 Subject: [PATCH 0868/2747] more accurate percentile values --- .../performance.contribution.ts | 71 +++++++++---------- 1 file changed, 34 insertions(+), 37 deletions(-) diff --git a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts index 5f86e8efa07d5..820590107e2e0 100644 --- a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts +++ b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts @@ -30,42 +30,39 @@ import URI from 'vs/base/common/uri'; class ProfilingHint implements IWorkbenchContribution { - // p80 to p90 by os&release + // p95 to p95 by os&release static readonly _percentiles: { [key: string]: [number, number] } = { - ['Linux_4.10.0-20-generic']: [3474, 6300], - ['Linux_4.10.0-21-generic']: [5342, 12022], - ['Linux_4.10.13-1-ARCH']: [3047, 4248], - ['Linux_4.10.13-200.fc25.x86_64']: [2380, 2895], - ['Linux_4.10.14-200.fc25.x86_64']: [5164, 14042], - ['Linux_4.4.0-21-generic']: [3777, 8160], - ['Linux_4.4.0-72-generic']: [6173, 10730], - ['Linux_4.4.0-75-generic']: [4769, 8560], - ['Linux_4.4.0-77-generic']: [3834, 7343], - ['Linux_4.4.0-78-generic']: [3115, 7078], - ['Linux_4.8.0-49-generic']: [7174, 10362], - ['Linux_4.8.0-51-generic']: [3906, 7385], - ['Linux_4.8.0-52-generic']: [6757, 13741], - ['Linux_4.9.0-2-amd64']: [4348, 8754], - ['Mac_14.5.0']: [4403, 7216], - ['Mac_15.4.0']: [3831, 4946], - ['Mac_15.5.0']: [5080, 8296], - ['Mac_15.6.0']: [4621, 7160], - ['Mac_16.0.0']: [4748, 11248], - ['Mac_16.1.0']: [4309, 6106], - ['Mac_16.3.0']: [2756, 3674], - ['Mac_16.4.0']: [3625, 5463], - ['Mac_16.5.0']: [3617, 5288], - ['Mac_16.6.0']: [3655, 5279], - ['Mac_16.7.0']: [4415, 6624], - ['Windows_10.0.10240']: [8284, 14438], - ['Windows_10.0.10586']: [5903, 9224], - ['Windows_10.0.14393']: [6065, 10567], - ['Windows_10.0.15063']: [5521, 8696], - ['Windows_10.0.16184']: [5604, 10671], - ['Windows_10.0.16188']: [7028, 12852], - ['Windows_10.0.16193']: [6431, 9628], - ['Windows_6.1.7601']: [7794, 15194], - ['Windows_6.3.9600']: [6129, 10188], + ['Windows_6.3.9600']: [35782, 35782], + ['Windows_6.1.7601']: [11160, 18366], + ['Windows_10.0.16199']: [10423, 17222], + ['Windows_10.0.16193']: [7503, 11033], + ['Windows_10.0.16188']: [8544, 8807], + ['Windows_10.0.15063']: [11085, 16837], + ['Windows_10.0.14393']: [12585, 32662], + ['Windows_10.0.10586']: [7047, 10944], + ['Windows_10.0.10240']: [16176, 16176], + ['Mac_16.7.0']: [2192, 4050], + ['Mac_16.6.0']: [8043, 10608], + ['Mac_16.5.0']: [4912, 11348], + ['Mac_16.4.0']: [3900, 4200], + ['Mac_16.3.0']: [7327, 7327], + ['Mac_16.1.0']: [6090, 6555], + ['Mac_16.0.0']: [32574, 32574], + ['Mac_15.6.0']: [16082, 17469], + ['Linux_4.9.0-3-amd64']: [2092, 2197], + ['Linux_4.9.0-2-amd64']: [9779, 9779], + ['Linux_4.8.0-52-generic']: [12803, 13257], + ['Linux_4.8.0-51-generic']: [2670, 2797], + ['Linux_4.8.0-040800-generic']: [3954, 3954], + ['Linux_4.4.0-78-generic']: [4218, 5891], + ['Linux_4.4.0-77-generic']: [6166, 6166], + ['Linux_4.11.2']: [1323, 1323], + ['Linux_4.10.15-200.fc25.x86_64']: [9270, 9480], + ['Linux_4.10.13-1-ARCH']: [7116, 8511], + ['Linux_4.10.11-100.fc24.x86_64']: [1845, 1845], + ['Linux_4.10.0-21-generic']: [14805, 16050], + ['Linux_3.19.0-84-generic']: [4840, 4840], + ['Linux_3.11.10-29-desktop']: [1637, 2891], }; private static readonly _myPercentiles = ProfilingHint._percentiles[`${Platform[platform]}_${release()}`]; @@ -95,8 +92,8 @@ class ProfilingHint implements IWorkbenchContribution { // Check that we have some data about this // OS version to which we can compare this startup. - // Then only go for startups between the 80th and - // 90th percentile. + // Then only go for startups between the 90 and + // 95th percentile. if (!Array.isArray(ProfilingHint._myPercentiles)) { return; } From de5b4813dcb47d22bb6ae30de67dd4e633a2beb4 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 22 May 2017 16:04:33 +0200 Subject: [PATCH 0869/2747] Corrected path to binary. --- test/smoke/scripts/run.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/smoke/scripts/run.ps1 b/test/smoke/scripts/run.ps1 index a7e29482a7814..23da3827cbe3a 100644 --- a/test/smoke/scripts/run.ps1 +++ b/test/smoke/scripts/run.ps1 @@ -24,11 +24,11 @@ if (-Not (Test-Path node_modules)) { } # Configure environment variables -$env:VSCODE_LATEST_PATH = "$Root\VSCode-win32-$arch" +$env:VSCODE_LATEST_PATH = "$Root\VSCode-win32-$arch\Code - OSS.exe" # $env:VSCODE_STABLE_PATH = $stable $env:SMOKETEST_REPO = "..\vscode-smoketest-express" -if ($latest.Contains('Insiders')) { +if ($env:VSCODE_LATEST_PATH.Contains('Insiders')) { $env:VSCODE_EDITION = 'insiders' } From d1759e016cfee7fedcbcb73a17745be6e129d288 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 22 May 2017 16:08:39 +0200 Subject: [PATCH 0870/2747] Changed executable name. --- test/smoke/scripts/run.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/smoke/scripts/run.ps1 b/test/smoke/scripts/run.ps1 index 23da3827cbe3a..a2b8c04711317 100644 --- a/test/smoke/scripts/run.ps1 +++ b/test/smoke/scripts/run.ps1 @@ -24,7 +24,7 @@ if (-Not (Test-Path node_modules)) { } # Configure environment variables -$env:VSCODE_LATEST_PATH = "$Root\VSCode-win32-$arch\Code - OSS.exe" +$env:VSCODE_LATEST_PATH = "$Root\VSCode-win32-$arch\Code - Insiders.exe" # $env:VSCODE_STABLE_PATH = $stable $env:SMOKETEST_REPO = "..\vscode-smoketest-express" From 37b02d8ae4ff76175079bf5ccf875f50dd990e20 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 22 May 2017 16:09:58 +0200 Subject: [PATCH 0871/2747] update test/README --- test/README.md | 9 +++++---- test/electron/index.js | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/test/README.md b/test/README.md index cad17e421e975..60860e3f5233c 100644 --- a/test/README.md +++ b/test/README.md @@ -2,9 +2,7 @@ ## Run -The best way to run the Code tests is from within VS Code. Simply pressF1, type "run test" and press enter to launch the tests. To make development changes to unit tests you need to be running `gulp`. See [Development Workflow](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#incremental-build) for more details. - -If you wish to run the tests from a terminal, from the `vscode` folder run: +The best way to run the Code tests is from the terminal. To make development changes to unit tests you need to be running `gulp`. See [Development Workflow](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#incremental-build) for more details. From the `vscode` folder run: **OS X and Linux** @@ -14,9 +12,12 @@ If you wish to run the tests from a terminal, from the `vscode` folder run: scripts\test + ## Debug -You can use VS Code to debug your tests. Switch to the Debug viewlet, pick the `Unit Tests` debug target and press `Play`. +To debug tests use `--debug` when running the test script. Also, the set of tests can be reduced with the `--run` and `--runGlob` flags. Both require a file path/pattern. Like so: + + ./scripts/test.sh --debug --runGrep **/extHost*.test.js ## Coverage diff --git a/test/electron/index.js b/test/electron/index.js index 97529b3f84dc0..def0f881a7d05 100644 --- a/test/electron/index.js +++ b/test/electron/index.js @@ -13,7 +13,7 @@ const events = require('events'); const optimist = require('optimist') .describe('grep', 'only run tests matching ').alias('grep', 'g').alias('grep', 'f').string('grep') .describe('run', 'only run tests from ').string('run') - .describe('runGlob', 'only run tests matching ').boolean('runGlob').alias('runGrep') + .describe('runGlob', 'only run tests matching ').alias('runGlob', 'runGrep').string('runGlob') .describe('build', 'run with build output (out-build)').boolean('build') .describe('coverage', 'generate coverage report').boolean('coverage') .describe('debug', 'open dev tools, keep window open, reuse app data').string('debug') From 2cda0cdb41de9f6a1bdc58492c17a7d67e5a3d39 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 May 2017 16:12:44 +0200 Subject: [PATCH 0872/2747] Update names in Tree api --- src/vs/vscode.proposed.d.ts | 16 ++++++++-------- src/vs/workbench/api/node/extHost.api.impl.ts | 4 ++-- src/vs/workbench/api/node/extHostTreeViews.ts | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index c1cad09129dd3..cf0218df999bc 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -15,10 +15,10 @@ declare module 'vscode' { export namespace window { /** * Register a [TreeDataProvider](#TreeDataProvider) for the registered view `id`. - * @param id View id. + * @param viewId View id. * @param treeDataProvider A [TreeDataProvider](#TreeDataProvider) that provides tree data for the view */ - export function registerTreeDataProvider(id: string, treeDataProvider: TreeDataProvider): Disposable; + export function registerTreeDataProviderForView(viewId: string, treeDataProvider: TreeDataProvider): Disposable; } /** @@ -28,7 +28,7 @@ declare module 'vscode' { /** * An optional event to signal that an element or root has changed. */ - onDidChange?: Event; + onDidChangeTreeData?: Event; /** * get [TreeItem](#TreeItem) representation of the `element` @@ -51,29 +51,29 @@ declare module 'vscode' { /** * Label of the tree item */ - label: string; + readonly label: string; /** * The icon path for the tree item */ - iconPath?: string | Uri | { light: string | Uri; dark: string | Uri }; + readonly iconPath?: string | Uri | { light: string | Uri; dark: string | Uri }; /** * The [command](#Command) which should be run when the tree item * is open in the Source Control viewlet. */ - command?: Command; + readonly command?: Command; /** * Context value of the tree node */ - contextValue?: string; + readonly contextValue?: string; /** * Collapsible state of the tree item. * Required only when item has children. */ - collapsibleState?: TreeItemCollapsibleState; + readonly collapsibleState?: TreeItemCollapsibleState; } /** diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index a9cf6c35ce800..e87d48660ebde 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -369,8 +369,8 @@ export function createApiFactory( sampleFunction: proposedApiFunction(extension, () => { return extHostMessageService.showMessage(Severity.Info, 'Hello Proposed Api!', {}, []); }), - registerTreeDataProvider: proposedApiFunction(extension, (id: string, treeDataProvider: vscode.TreeDataProvider): vscode.Disposable => { - return extHostTreeViews.registerTreeDataProvider(id, treeDataProvider); + registerTreeDataProviderForView: proposedApiFunction(extension, (viewId: string, treeDataProvider: vscode.TreeDataProvider): vscode.Disposable => { + return extHostTreeViews.registerTreeDataProviderForView(viewId, treeDataProvider); }) }; diff --git a/src/vs/workbench/api/node/extHostTreeViews.ts b/src/vs/workbench/api/node/extHostTreeViews.ts index ee77533fc94ff..b772b89459347 100644 --- a/src/vs/workbench/api/node/extHostTreeViews.ts +++ b/src/vs/workbench/api/node/extHostTreeViews.ts @@ -39,7 +39,7 @@ export class ExtHostTreeViews extends ExtHostTreeViewsShape { }); } - registerTreeDataProvider(id: string, treeDataProvider: vscode.TreeDataProvider): vscode.Disposable { + registerTreeDataProviderForView(id: string, treeDataProvider: vscode.TreeDataProvider): vscode.Disposable { const treeView = new ExtHostTreeView(id, treeDataProvider, this._proxy); this.treeViews.set(id, treeView); return { @@ -86,8 +86,8 @@ class ExtHostTreeView extends Disposable { constructor(private viewId: string, private dataProvider: vscode.TreeDataProvider, private proxy: MainThreadTreeViewsShape) { super(); this.proxy.$registerView(viewId); - if (dataProvider.onDidChange) { - this._register(dataProvider.onDidChange(element => this._refresh(element))); + if (dataProvider.onDidChangeTreeData) { + this._register(dataProvider.onDidChangeTreeData(element => this._refresh(element))); } } From 0795b09e764136ba72618165cdd8035762870e80 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 May 2017 16:35:16 +0200 Subject: [PATCH 0873/2747] Udate context key for tree items --- src/vs/workbench/parts/views/browser/treeView.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/views/browser/treeView.ts b/src/vs/workbench/parts/views/browser/treeView.ts index d80990bbe72c6..12af2142c281c 100644 --- a/src/vs/workbench/parts/views/browser/treeView.ts +++ b/src/vs/workbench/parts/views/browser/treeView.ts @@ -419,7 +419,7 @@ class Menus implements IDisposable { } getResourceContextActions(element: ITreeItem): IAction[] { - return this.getActions(MenuId.ViewResource, { key: 'resource', value: element.contextValue }).secondary; + return this.getActions(MenuId.ViewResource, { key: 'item', value: element.contextValue }).secondary; } private getActions(menuId: MenuId, context: { key: string, value: string }): { primary: IAction[]; secondary: IAction[]; } { @@ -431,7 +431,7 @@ class Menus implements IDisposable { const primary = []; const secondary = []; const result = { primary, secondary }; - fillInActions(menu, { shouldForwardArgs: true }, result, g => g === 'inline'); + fillInActions(menu, { shouldForwardArgs: true }, result); menu.dispose(); contextKeyService.dispose(); From d02524ff8ed38ad0b365a7862167ab93d5354e8a Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 22 May 2017 16:45:41 +0200 Subject: [PATCH 0874/2747] Update tree view item context keys --- src/vs/platform/actions/common/actions.ts | 2 +- src/vs/platform/actions/electron-browser/menusExtensionPoint.ts | 2 +- src/vs/workbench/parts/views/browser/treeView.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/platform/actions/common/actions.ts b/src/vs/platform/actions/common/actions.ts index f94c856c72e5f..84b232e01304e 100644 --- a/src/vs/platform/actions/common/actions.ts +++ b/src/vs/platform/actions/common/actions.ts @@ -51,7 +51,7 @@ export class MenuId { static readonly SCMResourceContext = new MenuId('13'); static readonly CommandPalette = new MenuId('14'); static readonly ViewTitle = new MenuId('15'); - static readonly ViewResource = new MenuId('16'); + static readonly ViewItemContext = new MenuId('16'); constructor(private _id: string) { diff --git a/src/vs/platform/actions/electron-browser/menusExtensionPoint.ts b/src/vs/platform/actions/electron-browser/menusExtensionPoint.ts index 4896cdea038c0..a9a61d92d571b 100644 --- a/src/vs/platform/actions/electron-browser/menusExtensionPoint.ts +++ b/src/vs/platform/actions/electron-browser/menusExtensionPoint.ts @@ -39,7 +39,7 @@ namespace schema { case 'scm/resourceGroup/context': return MenuId.SCMResourceGroupContext; case 'scm/resourceState/context': return MenuId.SCMResourceContext; case 'view/title': return MenuId.ViewTitle; - case 'view/resource': return MenuId.ViewResource; + case 'view/item/context': return MenuId.ViewItemContext; } return void 0; diff --git a/src/vs/workbench/parts/views/browser/treeView.ts b/src/vs/workbench/parts/views/browser/treeView.ts index 12af2142c281c..0802faf97eb0d 100644 --- a/src/vs/workbench/parts/views/browser/treeView.ts +++ b/src/vs/workbench/parts/views/browser/treeView.ts @@ -419,7 +419,7 @@ class Menus implements IDisposable { } getResourceContextActions(element: ITreeItem): IAction[] { - return this.getActions(MenuId.ViewResource, { key: 'item', value: element.contextValue }).secondary; + return this.getActions(MenuId.ViewItemContext, { key: 'item', value: element.contextValue }).secondary; } private getActions(menuId: MenuId, context: { key: string, value: string }): { primary: IAction[]; secondary: IAction[]; } { From 9f896956eb23c465124b46df69faececc6b5eed6 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 22 May 2017 16:29:30 +0200 Subject: [PATCH 0875/2747] Have all cursor state changes go through the same _emitStateChangedIfNecessary method --- src/vs/editor/common/controller/cursor.ts | 82 +++++++++++-------- .../editor/common/controller/cursorCommon.ts | 4 + 2 files changed, 51 insertions(+), 35 deletions(-) diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index e4cbc84ef08c1..d6cf1d70d0ecd 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -53,6 +53,38 @@ export class CursorStateChangedEvent { } } +/** + * A snapshot of the cursor and the model state + */ +class CursorModelState { + + public readonly modelVersionId: number; + public readonly cursorState: CursorState[]; + + constructor(model: editorCommon.IModel, cursor: Cursor) { + this.modelVersionId = model.getVersionId(); + this.cursorState = cursor.getAll(); + } + + public equals(other: CursorModelState): boolean { + if (!other) { + return false; + } + if (this.modelVersionId !== other.modelVersionId) { + return false; + } + if (this.cursorState.length !== other.cursorState.length) { + return false; + } + for (let i = 0, len = this.cursorState.length; i < len; i++) { + if (!this.cursorState[i].equals(other.cursorState[i])) { + return false; + } + } + return true; + } +} + export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { private readonly _onDidChange: Emitter = this._register(new Emitter()); @@ -154,40 +186,14 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { return this._cursors.getAll(); } - private static _somethingChanged(oldSelections: Selection[], oldViewSelections: Selection[], newSelections: Selection[], newViewSelections: Selection[]): boolean { - if (oldSelections.length !== newSelections.length) { - return true; - } - - for (let i = 0, len = oldSelections.length; i < len; i++) { - if (!oldSelections[i].equalsSelection(newSelections[i])) { - return true; - } - } - - for (let i = 0, len = oldViewSelections.length; i < len; i++) { - if (!oldViewSelections[i].equalsSelection(newViewSelections[i])) { - return true; - } - } - - return false; - } - public setStates(source: string, reason: CursorChangeReason, states: CursorState[]): void { - const oldSelections = this._cursors.getSelections(); - const oldViewSelections = this._cursors.getViewSelections(); + const oldState = new CursorModelState(this._model, this); this._cursors.setStates(states); this._cursors.normalize(); this._columnSelectData = null; - const newSelections = this._cursors.getSelections(); - const newViewSelections = this._cursors.getViewSelections(); - - if (Cursor._somethingChanged(oldSelections, oldViewSelections, newSelections, newViewSelections)) { - this._emitStateChanged(source, reason); - } + this._emitStateChangedIfNecessary(source, reason, oldState); } public setColumnSelectData(columnSelectData: IColumnSelectData): void { @@ -279,7 +285,7 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { this._cursors.dispose(); this._cursors = new CursorCollection(this.context); - this._emitStateChanged('model', CursorChangeReason.ContentFlush); + this._emitStateChangedIfNecessary('model', CursorChangeReason.ContentFlush, null); } else { const selectionsFromMarkers = this._cursors.readSelectionFromMarkers(); this.setStates('modelChange', CursorChangeReason.RecoverFromMarkers, CursorState.fromModelSelections(selectionsFromMarkers)); @@ -356,6 +362,16 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { // ----------------------------------------------------------------------------------------------------------- // ----- emitting events + private _emitStateChangedIfNecessary(source: string, reason: CursorChangeReason, oldState: CursorModelState): boolean { + const newState = new CursorModelState(this._model, this); + if (newState.equals(oldState)) { + return false; + } + + this._emitStateChanged(source, reason); + return true; + } + private _emitStateChanged(source: string, reason: CursorChangeReason): void { source = source || 'keyboard'; @@ -436,8 +452,7 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { return; } - const oldSelections = this._cursors.getSelections(); - const oldViewSelections = this._cursors.getViewSelections(); + const oldState = new CursorModelState(this._model, this); let cursorChangeReason = CursorChangeReason.NotSet; // ensure valid state on all cursors @@ -488,10 +503,7 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { this._isHandling = false; - const newSelections = this._cursors.getSelections(); - const newViewSelections = this._cursors.getViewSelections(); - if (Cursor._somethingChanged(oldSelections, oldViewSelections, newSelections, newViewSelections)) { - this._emitStateChanged(source, cursorChangeReason); + if (this._emitStateChangedIfNecessary(source, cursorChangeReason, oldState)) { this._revealRange(RevealTarget.Primary, viewEvents.VerticalRevealType.Simple, true); } } diff --git a/src/vs/editor/common/controller/cursorCommon.ts b/src/vs/editor/common/controller/cursorCommon.ts index bc94291aab8d8..5a24b3c5016ab 100644 --- a/src/vs/editor/common/controller/cursorCommon.ts +++ b/src/vs/editor/common/controller/cursorCommon.ts @@ -411,6 +411,10 @@ export class CursorState { this.modelState = modelState; this.viewState = viewState; } + + public equals(other: CursorState): boolean { + return (this.viewState.equals(other.viewState) && this.modelState.equals(other.viewState)); + } } export class EditOperationResult { From 94c647f246c3e0a98f2234a1c2614415a6420736 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 22 May 2017 16:40:04 +0200 Subject: [PATCH 0876/2747] Simplification in cursor eventing --- src/vs/editor/common/commonCodeEditor.ts | 9 ++-- .../editor/common/controller/coreCommands.ts | 4 +- src/vs/editor/common/controller/cursor.ts | 41 ++++++------------- .../common/controller/cursorCollection.ts | 9 ---- .../editor/common/controller/cursorCommon.ts | 2 +- 5 files changed, 22 insertions(+), 43 deletions(-) diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index 4b2a542f6738e..d8b808d3f0661 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -279,16 +279,17 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo } } - private _sendRevealRange(range: Range, verticalType: VerticalRevealType, revealHorizontal: boolean): void { + private _sendRevealRange(modelRange: Range, verticalType: VerticalRevealType, revealHorizontal: boolean): void { if (!this.model || !this.cursor) { return; } - if (!Range.isIRange(range)) { + if (!Range.isIRange(modelRange)) { throw new Error('Invalid arguments'); } - let validatedRange = this.model.validateRange(range); + const validatedModelRange = this.model.validateRange(modelRange); + const viewRange = this.viewModel.coordinatesConverter.convertModelRangeToViewRange(validatedModelRange); - this.cursor.emitCursorRevealRange(validatedRange, null, verticalType, revealHorizontal); + this.cursor.emitCursorRevealRange(viewRange, verticalType, revealHorizontal); } public revealLine(lineNumber: number): void { diff --git a/src/vs/editor/common/controller/coreCommands.ts b/src/vs/editor/common/controller/coreCommands.ts index d4ae88bfadd0f..639022470cd8e 100644 --- a/src/vs/editor/common/controller/coreCommands.ts +++ b/src/vs/editor/common/controller/coreCommands.ts @@ -1405,7 +1405,9 @@ export namespace CoreNavigationCommands { } } - cursors.revealRange(false, range, null, revealAt); + const viewRange = cursors.context.convertModelRangeToViewRange(range); + + cursors.revealRange(false, viewRange, revealAt); } }); diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index d6cf1d70d0ecd..bcec892c75d75 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -204,8 +204,8 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { this._revealRange(target, viewEvents.VerticalRevealType.Simple, horizontal); } - public revealRange(revealHorizontal: boolean, modelRange: Range, viewRange: Range, verticalType: viewEvents.VerticalRevealType) { - this.emitCursorRevealRange(modelRange, viewRange, verticalType, revealHorizontal); + public revealRange(revealHorizontal: boolean, viewRange: Range, verticalType: viewEvents.VerticalRevealType) { + this.emitCursorRevealRange(viewRange, verticalType, revealHorizontal); } public scrollTo(desiredScrollTop: number): void { @@ -368,19 +368,11 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { return false; } - this._emitStateChanged(source, reason); - return true; - } - - private _emitStateChanged(source: string, reason: CursorChangeReason): void { - source = source || 'keyboard'; - - const positions = this._cursors.getPositions(); let isInEditableRange: boolean = true; if (this._model.hasEditableRange()) { const editableRange = this._model.getEditableRange(); - if (!editableRange.containsPosition(positions[0])) { + if (!editableRange.containsPosition(newState.cursorState[0].modelState.position)) { isInEditableRange = false; } } @@ -392,47 +384,40 @@ export class Cursor extends viewEvents.ViewEventEmitter implements ICursors { this._emit([new viewEvents.ViewCursorStateChangedEvent(viewSelections, isInEditableRange)]); // Only after the view has been notified, let the rest of the world know... - this._onDidChange.fire(new CursorStateChangedEvent(selections, source, reason)); + this._onDidChange.fire(new CursorStateChangedEvent(selections, source || 'keyboard', reason)); + + return true; } private _revealRange(revealTarget: RevealTarget, verticalType: viewEvents.VerticalRevealType, revealHorizontal: boolean): void { - const positions = this._cursors.getPositions(); const viewPositions = this._cursors.getViewPositions(); - let position = positions[0]; let viewPosition = viewPositions[0]; if (revealTarget === RevealTarget.TopMost) { - for (let i = 1; i < positions.length; i++) { - if (positions[i].isBefore(position)) { - position = positions[i]; + for (let i = 1; i < viewPositions.length; i++) { + if (viewPositions[i].isBefore(viewPosition)) { viewPosition = viewPositions[i]; } } } else if (revealTarget === RevealTarget.BottomMost) { - for (let i = 1; i < positions.length; i++) { - if (position.isBeforeOrEqual(positions[i])) { - position = positions[i]; + for (let i = 1; i < viewPositions.length; i++) { + if (viewPosition.isBeforeOrEqual(viewPositions[i])) { viewPosition = viewPositions[i]; } } } else { - if (positions.length > 1) { + if (viewPositions.length > 1) { // no revealing! return; } } - const range = new Range(position.lineNumber, position.column, position.lineNumber, position.column); const viewRange = new Range(viewPosition.lineNumber, viewPosition.column, viewPosition.lineNumber, viewPosition.column); - this.emitCursorRevealRange(range, viewRange, verticalType, revealHorizontal); + this.emitCursorRevealRange(viewRange, verticalType, revealHorizontal); } - public emitCursorRevealRange(range: Range, viewRange: Range, verticalType: viewEvents.VerticalRevealType, revealHorizontal: boolean) { - // Ensure event has viewRange - if (!viewRange) { - viewRange = this.context.convertModelRangeToViewRange(range); - } + public emitCursorRevealRange(viewRange: Range, verticalType: viewEvents.VerticalRevealType, revealHorizontal: boolean) { this._emit([new viewEvents.ViewRevealRangeRequestEvent(viewRange, verticalType, revealHorizontal)]); } diff --git a/src/vs/editor/common/controller/cursorCollection.ts b/src/vs/editor/common/controller/cursorCollection.ts index 2f176653af7d3..9fcae512f2f9d 100644 --- a/src/vs/editor/common/controller/cursorCollection.ts +++ b/src/vs/editor/common/controller/cursorCollection.ts @@ -60,15 +60,6 @@ export class CursorCollection { return result; } - public getPositions(): Position[] { - let result: Position[] = []; - result[0] = this.primaryCursor.modelState.position; - for (let i = 0, len = this.secondaryCursors.length; i < len; i++) { - result[i + 1] = this.secondaryCursors[i].modelState.position; - } - return result; - } - public getViewPositions(): Position[] { let result: Position[] = []; result[0] = this.primaryCursor.viewState.position; diff --git a/src/vs/editor/common/controller/cursorCommon.ts b/src/vs/editor/common/controller/cursorCommon.ts index 5a24b3c5016ab..e82708d17da1a 100644 --- a/src/vs/editor/common/controller/cursorCommon.ts +++ b/src/vs/editor/common/controller/cursorCommon.ts @@ -42,7 +42,7 @@ export interface ICursors { setStates(source: string, reason: CursorChangeReason, states: CursorState[]): void; reveal(horizontal: boolean, target: RevealTarget): void; - revealRange(revealHorizontal: boolean, modelRange: Range, viewRange: Range, verticalType: VerticalRevealType): void; + revealRange(revealHorizontal: boolean, viewRange: Range, verticalType: VerticalRevealType): void; scrollTo(desiredScrollTop: number): void; } From f2ff02b71db8b07869f35ba8e4dfaf8817828489 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 22 May 2017 16:52:50 +0200 Subject: [PATCH 0877/2747] Testing build definition. --- test/smoke/scripts/run.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/smoke/scripts/run.ps1 b/test/smoke/scripts/run.ps1 index a2b8c04711317..5883ce0dbe82e 100644 --- a/test/smoke/scripts/run.ps1 +++ b/test/smoke/scripts/run.ps1 @@ -17,6 +17,8 @@ if (-Not (Test-Path vscode-smoketest-express)) { } npm install +Write-Output "My path: " + $(pwd) + # Setup the test directory for running Set-Location ..\smoke if (-Not (Test-Path node_modules)) { @@ -24,7 +26,7 @@ if (-Not (Test-Path node_modules)) { } # Configure environment variables -$env:VSCODE_LATEST_PATH = "$Root\VSCode-win32-$arch\Code - Insiders.exe" +$env:VSCODE_LATEST_PATH = "$(pwd)\..\VSCode-win32-$arch\Code - Insiders.exe" # $env:VSCODE_STABLE_PATH = $stable $env:SMOKETEST_REPO = "..\vscode-smoketest-express" From 87b95c2df66c0312051ec6353116d4153e44a9d3 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Mon, 22 May 2017 17:20:44 +0200 Subject: [PATCH 0878/2747] add nodePlatform and nodeArch to telemetry common data --- src/vs/platform/telemetry/node/commonProperties.ts | 2 ++ .../telemetry/test/electron-browser/commonProperties.test.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/vs/platform/telemetry/node/commonProperties.ts b/src/vs/platform/telemetry/node/commonProperties.ts index 6011ea38641ef..5e6611497c30c 100644 --- a/src/vs/platform/telemetry/node/commonProperties.ts +++ b/src/vs/platform/telemetry/node/commonProperties.ts @@ -19,6 +19,8 @@ export function resolveCommonProperties(commit: string, version: string): TPromi result['version'] = version; result['common.osVersion'] = os.release(); result['common.platform'] = Platform.Platform[Platform.platform]; + result['common.nodePlatform'] = process.platform; + result['common.nodeArch'] = process.arch; // dynamic properties which value differs on each call let seq = 0; diff --git a/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts b/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts index d66d22ec6a046..54bd6cb56184b 100644 --- a/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts +++ b/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts @@ -33,6 +33,8 @@ suite('Telemetry - common properties', function () { assert.ok('sessionID' in props); assert.ok('timestamp' in props); assert.ok('common.platform' in props); + assert.ok('common.nodePlatform' in props); + assert.ok('common.nodeArch' in props); assert.ok('common.timesincesessionstart' in props); assert.ok('common.sequence' in props); From b8e4b7f52d339e124d6cd4375448b9890692cbf2 Mon Sep 17 00:00:00 2001 From: Nick Snyder Date: Fri, 19 May 2017 14:27:24 -0700 Subject: [PATCH 0879/2747] Make SearchWidget dependencies injectable --- .../workbench/parts/search/browser/searchViewlet.ts | 8 +++----- src/vs/workbench/parts/search/browser/searchWidget.ts | 11 ++++++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index c481f311de5da..d6bbb549a3811 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -42,13 +42,12 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { IMessageService } from 'vs/platform/message/common/message'; import { IProgressService } from 'vs/platform/progress/common/progress'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { KeyCode } from 'vs/base/common/keyCodes'; import { PatternInputWidget, ExcludePatternInputWidget } from 'vs/workbench/parts/search/browser/patternInputWidget'; import { SearchRenderer, SearchDataSource, SearchSorter, SearchAccessibilityProvider, SearchFilter } from 'vs/workbench/parts/search/browser/searchResultsView'; -import { SearchWidget } from 'vs/workbench/parts/search/browser/searchWidget'; +import { SearchWidget, ISearchWidgetOptions } from 'vs/workbench/parts/search/browser/searchWidget'; import { RefreshAction, CollapseAllAction, ClearSearchResultsAction, ConfigureGlobalExclusionsAction } from 'vs/workbench/parts/search/browser/searchActions'; import { IReplaceService } from 'vs/workbench/parts/search/common/replace'; import Severity from 'vs/base/common/severity'; @@ -117,7 +116,6 @@ export class SearchViewlet extends Viewlet { @IWorkspaceContextService private contextService: IWorkspaceContextService, @ISearchWorkbenchService private searchWorkbenchService: ISearchWorkbenchService, @IContextKeyService private contextKeyService: IContextKeyService, - @IKeybindingService private keybindingService: IKeybindingService, @IReplaceService private replaceService: IReplaceService, @IUntitledEditorService private untitledEditorService: IUntitledEditorService, @IPreferencesService private preferencesService: IPreferencesService, @@ -290,12 +288,12 @@ export class SearchViewlet extends Viewlet { let isWholeWords = this.viewletSettings['query.wholeWords'] === true; let isCaseSensitive = this.viewletSettings['query.caseSensitive'] === true; - this.searchWidget = new SearchWidget(builder, this.contextViewService, this.themeService, { + this.searchWidget = this.instantiationService.createInstance(SearchWidget, builder, { value: contentPattern, isRegex: isRegex, isCaseSensitive: isCaseSensitive, isWholeWords: isWholeWords - }, this.contextKeyService, this.keybindingService, this.instantiationService); + }); if (this.storageService.getBoolean(SearchViewlet.SHOW_REPLACE_STORAGE_KEY, StorageScope.WORKSPACE, true)) { this.searchWidget.toggleReplace(true); diff --git a/src/vs/workbench/parts/search/browser/searchWidget.ts b/src/vs/workbench/parts/search/browser/searchWidget.ts index 69725a9ba8e35..c9853dd70a160 100644 --- a/src/vs/workbench/parts/search/browser/searchWidget.ts +++ b/src/vs/workbench/parts/search/browser/searchWidget.ts @@ -21,7 +21,6 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import Event, { Emitter } from 'vs/base/common/event'; import { Builder } from 'vs/base/browser/builder'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { isSearchViewletFocussed, appendKeyBindingLabel } from 'vs/workbench/parts/search/browser/searchActions'; import { CONTEXT_FIND_WIDGET_NOT_VISIBLE } from 'vs/editor/contrib/find/common/findController'; @@ -111,8 +110,14 @@ export class SearchWidget extends Widget { private _onReplaceAll = this._register(new Emitter()); public onReplaceAll: Event = this._onReplaceAll.event; - constructor(container: Builder, private contextViewService: IContextViewService, private themeService: IThemeService, options: ISearchWidgetOptions = Object.create(null), - private keyBindingService: IContextKeyService, private keyBindingService2: IKeybindingService, private instantiationService: IInstantiationService) { + constructor( + container: Builder, + options: ISearchWidgetOptions, + @IContextViewService private contextViewService: IContextViewService, + @IThemeService private themeService: IThemeService, + @IContextKeyService private keyBindingService: IContextKeyService, + @IKeybindingService private keyBindingService2: IKeybindingService, + ) { super(); this.searchHistory = new HistoryNavigator(); this.replaceActive = Constants.ReplaceActiveKey.bindTo(this.keyBindingService); From 3315fcd486ee9ebd7e7280ac5fe079dbd64048c1 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 22 May 2017 17:34:16 +0200 Subject: [PATCH 0880/2747] First attempt to make the terminal the default runner. --- .../parts/tasks/common/taskSampleConfig.json | 6 -- .../parts/tasks/common/taskTemplates.ts | 56 +++++------ .../tasks/electron-browser/jsonSchema_v2.ts | 43 ++++++++- .../electron-browser/task.contribution.ts | 96 ++++++++----------- 4 files changed, 102 insertions(+), 99 deletions(-) delete mode 100644 src/vs/workbench/parts/tasks/common/taskSampleConfig.json diff --git a/src/vs/workbench/parts/tasks/common/taskSampleConfig.json b/src/vs/workbench/parts/tasks/common/taskSampleConfig.json deleted file mode 100644 index 5fc7fce47f9be..0000000000000 --- a/src/vs/workbench/parts/tasks/common/taskSampleConfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - // Use IntelliSense to insert predefined task snippets - -} \ No newline at end of file diff --git a/src/vs/workbench/parts/tasks/common/taskTemplates.ts b/src/vs/workbench/parts/tasks/common/taskTemplates.ts index 01d2b68a0d0ea..d153e7849351f 100644 --- a/src/vs/workbench/parts/tasks/common/taskTemplates.ts +++ b/src/vs/workbench/parts/tasks/common/taskTemplates.ts @@ -22,11 +22,9 @@ const gulp: TaskEntry = { '{', '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', '\t// for the documentation about the tasks.json format', - '\t"version": "0.1.0",', - '\t"command": "gulp",', + '\t"version": "2.0.0",', + '\t"command": "gulp --no-color",', '\t"isShellCommand": true,', - '\t"args": ["--no-color"],', - '\t"showOutput": "always"', '}' ].join('\n') }; @@ -39,11 +37,9 @@ const grunt: TaskEntry = { '{', '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', '\t// for the documentation about the tasks.json format', - '\t"version": "0.1.0",', - '\t"command": "grunt",', + '\t"version": "2.0.0",', + '\t"command": "grunt --no-color",', '\t"isShellCommand": true,', - '\t"args": ["--no-color"],', - '\t"showOutput": "always"', '}' ].join('\n') }; @@ -57,23 +53,22 @@ const npm: TaskEntry = { '{', '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', '\t// for the documentation about the tasks.json format', - '\t"version": "0.1.0",', - '\t"command": "npm",', - '\t"isShellCommand": true,', - '\t"showOutput": "always",', - '\t"suppressTaskName": true,', + '\t"version": "2.0.0",', '\t"tasks": [', '\t\t{', '\t\t\t"taskName": "install",', - '\t\t\t"args": ["install"]', + '\t\t\t"command": "npm install",', + '\t\t\t"isShellCommand": true,', '\t\t},', '\t\t{', '\t\t\t"taskName": "update",', - '\t\t\t"args": ["update"]', + '\t\t\t"command": "npm update",', + '\t\t\t"isShellCommand": true,', '\t\t},', '\t\t{', '\t\t\t"taskName": "test",', - '\t\t\t"args": ["run", "test"]', + '\t\t\t"command": "npm run test",', + '\t\t\t"isShellCommand": true,', '\t\t}', '\t]', '}' @@ -89,10 +84,9 @@ const tscConfig: TaskEntry = { '{', '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', '\t// for the documentation about the tasks.json format', - '\t"version": "0.1.0",', - '\t"command": "tsc",', + '\t"version": "2.0.0",', + '\t"command": "tsc -p .",', '\t"isShellCommand": true,', - '\t"args": ["-p", "."],', '\t"showOutput": "silent",', '\t"problemMatcher": "$tsc"', '}' @@ -108,10 +102,9 @@ const tscWatch: TaskEntry = { '{', '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', '\t// for the documentation about the tasks.json format', - '\t"version": "0.1.0",', - '\t"command": "tsc",', + '\t"version": "2.0.0",', + '\t"command": "tsc -w -p .",', '\t"isShellCommand": true,', - '\t"args": ["-w", "-p", "."],', '\t"showOutput": "silent",', '\t"isBackground": true,', '\t"problemMatcher": "$tsc-watch"', @@ -155,7 +148,7 @@ const msbuild: TaskEntry = { '{', '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', '\t// for the documentation about the tasks.json format', - '\t"version": "0.1.0",', + '\t"version": "2.0.0",', '\t"command": "msbuild",', '\t"args": [', '\t\t// Ask msbuild to generate full paths for file names.', @@ -185,11 +178,9 @@ const command: TaskEntry = { '{', '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', '\t// for the documentation about the tasks.json format', - '\t"version": "0.1.0",', - '\t"command": "echo",', + '\t"version": "2.0.0",', + '\t"command": "echo \"Hello World\"",', '\t"isShellCommand": true,', - '\t"args": ["Hello World"],', - '\t"showOutput": "always"', '}' ].join('\n') }; @@ -204,20 +195,19 @@ const maven: TaskEntry = { '{', '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', '\t// for the documentation about the tasks.json format', - '\t"version": "0.1.0",', - '\t"command": "mvn",', - '\t"isShellCommand": true,', + '\t"version": "2.0.0",', '\t"showOutput": "always",', - '\t"suppressTaskName": true,', '\t"tasks": [', '\t\t{', '\t\t\t"taskName": "verify",', - '\t\t\t"args": ["-B", "verify"],', + '\t\t\t"command": "mvn -B verify",', + '\t\t\t"isShellCommand": true,', '\t\t\t"isBuildCommand": true', '\t\t},', '\t\t{', '\t\t\t"taskName": "test",', - '\t\t\t"args": ["-B", "test"],', + '\t\t\t"command": "mvn -B test",', + '\t\t\t"isShellCommand": true,', '\t\t\t"isTestCommand": true', '\t\t}', '\t]', diff --git a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts index 441507853aabb..4ece04baf2ea9 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts @@ -75,12 +75,47 @@ const dependsOn: IJSONSchema = { ] }; +const terminal: IJSONSchema = { + type: 'object', + default: { + reveal: 'always', + echo: false + }, + description: nls.localize('JsonSchema.tasks.terminal', 'Describe how the terminal used to execute a task behaves.'), + properties: { + echo: { + type: 'boolean', + default: false, + description: nls.localize('JsonSchema.tasks.terminal.echo', 'Controls whether the executed command is echoed to the terminal. Default is false.') + }, + reveal: { + type: 'string', + enum: ['always', 'silent', 'never'], + default: 'always', + description: nls.localize('JsonSchema.tasks.terminal.reveals', 'Controls whether the terminal running the task is revealed or not. Default is \"always\".') + } + } +}; + +const group: IJSONSchema = { + type: 'string', + enum: ['none', 'clean', 'build', 'rebuildAll', 'test'], + default: 'none', + description: nls.localize('JsonSchema.tasks.group', 'Defines to which execution group this task belongs to. If omitted the task belongs to no group') +}; + schema.definitions = Objects.deepClone(commonSchema.definitions); let definitions = schema.definitions; -definitions['commandConfiguration']['properties']['isShellCommand'] = Objects.deepClone(shellCommand); -definitions['taskDescription']['properties']['isShellCommand'] = Objects.deepClone(shellCommand); -definitions['taskDescription']['properties']['dependsOn'] = dependsOn; -definitions['taskRunnerConfiguration']['properties']['isShellCommand'] = Objects.deepClone(shellCommand); +definitions.commandConfiguration.properties.isShellCommand = Objects.deepClone(shellCommand); +definitions.taskDescription.properties.isShellCommand = Objects.deepClone(shellCommand); +definitions.taskDescription.properties.dependsOn = dependsOn; +definitions.showOutputType.deprecationMessage = nls.localize('JsonSchema.tasks.showOputput.deprecated', 'The property showOutput is deprecated. Use the terminal property instead.'); +definitions.taskDescription.properties.echoCommand.deprecationMessage = nls.localize('JsonSchema.tasks.echoCommand.deprecated', 'The property echoCommand is deprecated. Use the terminal property instead.'); +definitions.taskDescription.properties.isBuildCommand.deprecationMessage = nls.localize('JsonSchema.tasks.isBuildCommand.deprecated', 'The property isBuildCommand is deprecated. Use the group property instead.'); +definitions.taskDescription.properties.isTestCommand.deprecationMessage = nls.localize('JsonSchema.tasks.isTestCommand.deprecated', 'The property isTestCommand is deprecated. Use the group property instead.'); +definitions.taskDescription.properties.terminal = terminal; +definitions.taskDescription.properties.group = group; +definitions.taskRunnerConfiguration.properties.isShellCommand = Objects.deepClone(shellCommand); Object.getOwnPropertyNames(definitions).forEach(key => { let newKey = key + '2'; diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 3aff765da6a73..997b51b282391 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -85,30 +85,17 @@ let tasksCategory = nls.localize('tasksCategory', "Tasks"); abstract class OpenTaskConfigurationAction extends Action { - private configurationService: IConfigurationService; - private fileService: IFileService; - - private editorService: IWorkbenchEditorService; - private contextService: IWorkspaceContextService; - private outputService: IOutputService; - private messageService: IMessageService; - private quickOpenService: IQuickOpenService; - - constructor(id: string, label: string, @IConfigurationService configurationService: IConfigurationService, - @IWorkbenchEditorService editorService: IWorkbenchEditorService, @IFileService fileService: IFileService, - @IWorkspaceContextService contextService: IWorkspaceContextService, @IOutputService outputService: IOutputService, - @IMessageService messageService: IMessageService, @IQuickOpenService quickOpenService: IQuickOpenService, - @IEnvironmentService private environmentService: IEnvironmentService, - @IConfigurationResolverService private configurationResolverService: IConfigurationResolverService) { + constructor(id: string, label: string, + private taskService: ITaskService, + private configurationService: IConfigurationService, + private editorService: IWorkbenchEditorService, private fileService: IFileService, + private contextService: IWorkspaceContextService, private outputService: IOutputService, + private messageService: IMessageService, private quickOpenService: IQuickOpenService, + private environmentService: IEnvironmentService, + private configurationResolverService: IConfigurationResolverService, + private extensionService: IExtensionService) { super(id, label); - this.configurationService = configurationService; - this.editorService = editorService; - this.fileService = fileService; - this.contextService = contextService; - this.outputService = outputService; - this.messageService = messageService; - this.quickOpenService = quickOpenService; } public run(event?: any): TPromise { @@ -128,27 +115,18 @@ abstract class OpenTaskConfigurationAction extends Action { } let contentPromise: TPromise; if (selection.autoDetect) { - const outputChannel = this.outputService.getChannel(TaskService.OutputChannelId); - outputChannel.show(true); - outputChannel.append(nls.localize('ConfigureTaskRunnerAction.autoDetecting', 'Auto detecting tasks for {0}', selection.id) + '\n'); - let detector = new ProcessRunnerDetector(this.fileService, this.contextService, this.configurationResolverService); - contentPromise = detector.detect(false, selection.id).then((value) => { - let config = value.config; - if (value.stderr && value.stderr.length > 0) { - value.stderr.forEach((line) => { - outputChannel.append(line + '\n'); + contentPromise = this.extensionService.activateByEvent('onCommand:workbench.action.tasks.runTask').then(() => { + return this.taskService.tasks().then((tasks) => { + let tasksToInsert: Task[] = tasks.filter((task) => { + return task.identifier && task.identifier.indexOf(selection.id) === 0 && task.identifier[selection.id.length] === '.' && task.group !== void 0; }); - if (config && (!config.tasks || config.tasks.length === 0)) { - this.messageService.show(Severity.Warning, nls.localize('ConfigureTaskRunnerAction.autoDetect', 'Auto detecting the task system failed. Using default template. Consult the task output for details.')); + if (tasksToInsert.length === 0) { return selection.content; - } else { - this.messageService.show(Severity.Warning, nls.localize('ConfigureTaskRunnerAction.autoDetectError', 'Auto detecting the task system produced errors. Consult the task output for details.')); - } - } - if (config) { - if (value.stdout && value.stdout.length > 0) { - value.stdout.forEach(line => outputChannel.append(line + '\n')); } + let config: TaskConfig.ExternalTaskRunnerConfiguration = { + version: '2.0.0', + tasks: tasksToInsert.map((task) => { return { taskName: task.name }; }) + }; let content = JSON.stringify(config, null, '\t'); content = [ '{', @@ -156,9 +134,7 @@ abstract class OpenTaskConfigurationAction extends Action { '\t// for the documentation about the tasks.json format', ].join('\n') + content.substr(1); return content; - } else { - return selection.content; - } + }); }); } else { contentPromise = TPromise.as(selection.content); @@ -194,14 +170,17 @@ class ConfigureTaskRunnerAction extends OpenTaskConfigurationAction { public static ID = 'workbench.action.tasks.configureTaskRunner'; public static TEXT = nls.localize('ConfigureTaskRunnerAction.label', "Configure Task Runner"); - constructor(id: string, label: string, @IConfigurationService configurationService: IConfigurationService, + constructor(id: string, label: string, + @ITaskService taskService, @IConfigurationService configurationService: IConfigurationService, @IWorkbenchEditorService editorService: IWorkbenchEditorService, @IFileService fileService: IFileService, @IWorkspaceContextService contextService: IWorkspaceContextService, @IOutputService outputService: IOutputService, @IMessageService messageService: IMessageService, @IQuickOpenService quickOpenService: IQuickOpenService, @IEnvironmentService environmentService: IEnvironmentService, - @IConfigurationResolverService configurationResolverService: IConfigurationResolverService) { - super(id, label, configurationService, editorService, fileService, contextService, - outputService, messageService, quickOpenService, environmentService, configurationResolverService); + @IConfigurationResolverService configurationResolverService: IConfigurationResolverService, + @IExtensionService extensionService) { + super(id, label, taskService, configurationService, editorService, fileService, contextService, + outputService, messageService, quickOpenService, environmentService, configurationResolverService, + extensionService); } } @@ -210,14 +189,17 @@ class ConfigureBuildTaskAction extends OpenTaskConfigurationAction { public static ID = 'workbench.action.tasks.configureBuildTask'; public static TEXT = nls.localize('ConfigureBuildTaskAction.label', "Configure Build Task"); - constructor(id: string, label: string, @IConfigurationService configurationService: IConfigurationService, + constructor(id: string, label: string, + @ITaskService taskService, @IConfigurationService configurationService: IConfigurationService, @IWorkbenchEditorService editorService: IWorkbenchEditorService, @IFileService fileService: IFileService, @IWorkspaceContextService contextService: IWorkspaceContextService, @IOutputService outputService: IOutputService, @IMessageService messageService: IMessageService, @IQuickOpenService quickOpenService: IQuickOpenService, @IEnvironmentService environmentService: IEnvironmentService, - @IConfigurationResolverService configurationResolverService: IConfigurationResolverService) { - super(id, label, configurationService, editorService, fileService, contextService, - outputService, messageService, quickOpenService, environmentService, configurationResolverService); + @IConfigurationResolverService configurationResolverService: IConfigurationResolverService, + @IExtensionService extensionService) { + super(id, label, taskService, configurationService, editorService, fileService, contextService, + outputService, messageService, quickOpenService, environmentService, configurationResolverService, + extensionService); } } @@ -1072,7 +1054,7 @@ class TaskService extends EventEmitter implements ITaskService { private getExecutionEngine(): ExecutionEngine { let { config } = this.getConfiguration(); if (!config) { - return ExecutionEngine.Process; + return ExecutionEngine.Terminal; } return TaskConfig.ExecutionEngine.from(config); } @@ -1124,15 +1106,17 @@ class TaskService extends EventEmitter implements ITaskService { } public configureAction(): Action { - return new ConfigureTaskRunnerAction(ConfigureTaskRunnerAction.ID, ConfigureTaskRunnerAction.TEXT, + return new ConfigureTaskRunnerAction(ConfigureTaskRunnerAction.ID, ConfigureTaskRunnerAction.TEXT, this, this.configurationService, this.editorService, this.fileService, this.contextService, - this.outputService, this.messageService, this.quickOpenService, this.environmentService, this.configurationResolverService); + this.outputService, this.messageService, this.quickOpenService, this.environmentService, this.configurationResolverService, + this.extensionService); } private configureBuildTask(): Action { - return new ConfigureBuildTaskAction(ConfigureBuildTaskAction.ID, ConfigureBuildTaskAction.TEXT, + return new ConfigureBuildTaskAction(ConfigureBuildTaskAction.ID, ConfigureBuildTaskAction.TEXT, this, this.configurationService, this.editorService, this.fileService, this.contextService, - this.outputService, this.messageService, this.quickOpenService, this.environmentService, this.configurationResolverService); + this.outputService, this.messageService, this.quickOpenService, this.environmentService, this.configurationResolverService, + this.extensionService); } public beforeShutdown(): boolean | TPromise { From 68902f7ecee9926c0acb4b9d3324b16a3290c735 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 22 May 2017 18:20:17 +0200 Subject: [PATCH 0881/2747] Editor doesn't render any problem markers anymore. Fixes #27076 --- .../editor/browser/widget/codeEditorWidget.ts | 63 +++++++------------ .../browser/widget/media/green-squiggly.svg | 1 - .../browser/widget/media/red-squiggly.svg | 1 - 3 files changed, 22 insertions(+), 43 deletions(-) delete mode 100644 src/vs/editor/browser/widget/media/green-squiggly.svg delete mode 100644 src/vs/editor/browser/widget/media/red-squiggly.svg diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index 103e0f0956808..0749b9d91715e 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -30,10 +30,9 @@ import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IPosition } from 'vs/editor/common/core/position'; import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; import { CoreEditorCommand } from 'vs/editor/common/controller/coreCommands'; -import { isChrome } from "vs/base/browser/browser"; -import URI from "vs/base/common/uri"; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { editorErrorForeground, editorErrorBorder, editorWarningForeground, editorWarningBorder } from "vs/editor/common/view/editorColorRegistry"; +import { editorErrorForeground, editorErrorBorder, editorWarningForeground, editorWarningBorder } from 'vs/editor/common/view/editorColorRegistry'; +import { Color } from 'vs/base/common/color'; export abstract class CodeEditorWidget extends CommonCodeEditor implements editorBrowser.ICodeEditor { @@ -548,47 +547,29 @@ class CodeEditorWidgetFocusTracker extends Disposable { } } -const errorIconPath = URI.parse(require.toUrl('vs/editor/browser/widget/media/red-squiggly.svg')).fsPath; -const warningIconPath = URI.parse(require.toUrl('vs/editor/browser/widget/media/green-squiggly.svg')).fsPath; -registerThemingParticipant((theme, collector) => { - - // webkit-mask only supported in chrome - if (isChrome) { - let errorForeground = theme.getColor(editorErrorForeground); - if (errorForeground) { - collector.addRule(`.monaco-editor .redsquiggly { background-color: ${errorForeground}; -webkit-mask: url("${errorIconPath}") repeat-x bottom left; }`); - } +const squigglyStart = encodeURIComponent(``); - let errorBorderColor = theme.getColor(editorErrorBorder); - if (errorBorderColor) { - collector.addRule(`.monaco-editor .redsquiggly { border-bottom: 4px double ${errorBorderColor}; -webkit-mask: none; background: none; }`); - } - - let warningForeground = theme.getColor(editorWarningForeground); - if (warningForeground) { - collector.addRule(`.monaco-editor .greensquiggly { background-color: ${warningForeground}; -webkit-mask: url("${warningIconPath}") repeat-x bottom left; }`); - } +function getSquigglySVGData(color: Color) { + return squigglyStart + encodeURIComponent(color.toString()) + squigglyEnd; +} - let warningBorderColor = theme.getColor(editorWarningBorder); - if (warningBorderColor) { - collector.addRule(`.monaco-editor .greensquiggly { border-bottom: 4px double ${warningBorderColor}; -webkit-mask: none; background: none; }`); - } +registerThemingParticipant((theme, collector) => { + let errorBorderColor = theme.getColor(editorErrorBorder); + if (errorBorderColor) { + collector.addRule(`.monaco-editor .redsquiggly { border-bottom: 4px double ${errorBorderColor}; }`); + } + let errorForeground = theme.getColor(editorErrorForeground); + if (errorForeground) { + collector.addRule(`.monaco-editor .redsquiggly { background: url("data:image/svg+xml,${getSquigglySVGData(errorForeground)}") repeat-x bottom left; }`); } - // Any other browser - else { - let errorBorderColor = theme.getColor(editorErrorBorder); - if (errorBorderColor) { - collector.addRule(`.monaco-editor .redsquiggly { border-bottom: 4px double ${errorBorderColor}; }`); - } else { - collector.addRule(`.monaco-editor .redsquiggly { background: url("${errorIconPath}") repeat-x bottom left; }`); - } - - let warningBorderColor = theme.getColor(editorWarningBorder); - if (warningBorderColor) { - collector.addRule(`.monaco-editor .greensquiggly { border-bottom: 4px double ${warningBorderColor}; }`); - } else { - collector.addRule(`.monaco-editor .greensquiggly { background: url("${warningIconPath}") repeat-x bottom left; }`); - } + let warningBorderColor = theme.getColor(editorWarningBorder); + if (warningBorderColor) { + collector.addRule(`.monaco-editor .greensquiggly { border-bottom: 4px double ${warningBorderColor}; }`); + } + let warningForeground = theme.getColor(editorWarningForeground); + if (warningForeground) { + collector.addRule(`.monaco-editor .greensquiggly { background: url("data:image/svg+xml;utf8,${getSquigglySVGData(warningForeground)}") repeat-x bottom left; }`); } }); \ No newline at end of file diff --git a/src/vs/editor/browser/widget/media/green-squiggly.svg b/src/vs/editor/browser/widget/media/green-squiggly.svg deleted file mode 100644 index 8fc5c6f099bcb..0000000000000 --- a/src/vs/editor/browser/widget/media/green-squiggly.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/vs/editor/browser/widget/media/red-squiggly.svg b/src/vs/editor/browser/widget/media/red-squiggly.svg deleted file mode 100644 index 690406efa15a0..0000000000000 --- a/src/vs/editor/browser/widget/media/red-squiggly.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file From e5983e699c33df7983820ed9cf56ef041c663b50 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Mon, 22 May 2017 09:36:44 -0700 Subject: [PATCH 0882/2747] Show languages instead of extension packs --- .../parts/extensions/browser/extensionsActions.ts | 10 +++++----- .../electron-browser/extensions.contribution.ts | 6 +++--- .../page/electron-browser/vs_code_welcome_page.ts | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts index 3c8866f1e60d1..47ccf37113e05 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts @@ -1102,11 +1102,11 @@ export class ShowRecommendedKeymapExtensionsAction extends Action { } } -export class ShowExtensionPacksAction extends Action { +export class ShowLanguageExtensionsAction extends Action { - static ID = 'workbench.extensions.action.showExtensionPacks'; - static LABEL = localize('showExtensionPacks', "Show Extension Packs"); - static SHORT_LABEL = localize('showExtensionPacksShort', "Extension Packs"); + static ID = 'workbench.extensions.action.showLanguageExtensions'; + static LABEL = localize('showLanguageExtensions', "Show Language Extensions"); + static SHORT_LABEL = localize('showLanguageExtensionsShort', "Language Extensions"); constructor( id: string, @@ -1120,7 +1120,7 @@ export class ShowExtensionPacksAction extends Action { return this.viewletService.openViewlet(VIEWLET_ID, true) .then(viewlet => viewlet as IExtensionsViewlet) .then(viewlet => { - viewlet.search('@sort:installs @category:"extension packs" '); + viewlet.search('@sort:installs @category:languages '); viewlet.focus(); }); } diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts index 5fea11020e866..4597ac4fbe8f3 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts @@ -24,7 +24,7 @@ import { ExtensionsWorkbenchService } from 'vs/workbench/parts/extensions/node/e import { OpenExtensionsViewletAction, InstallExtensionsAction, ShowOutdatedExtensionsAction, ShowRecommendedExtensionsAction, ShowRecommendedKeymapExtensionsAction, ShowWorkspaceRecommendedExtensionsAction, ShowPopularExtensionsAction, ShowInstalledExtensionsAction, ShowDisabledExtensionsAction, UpdateAllAction, ConfigureWorkspaceRecommendedExtensionsAction, - EnableAllAction, EnableAllWorkpsaceAction, DisableAllAction, DisableAllWorkpsaceAction, CheckForUpdatesAction, ShowExtensionPacksAction, EnableAutoUpdateAction, DisableAutoUpdateAction + EnableAllAction, EnableAllWorkpsaceAction, DisableAllAction, DisableAllWorkpsaceAction, CheckForUpdatesAction, ShowLanguageExtensionsAction, EnableAutoUpdateAction, DisableAutoUpdateAction } from 'vs/workbench/parts/extensions/browser/extensionsActions'; import { OpenExtensionsFolderAction, InstallVSIXAction } from 'vs/workbench/parts/extensions/electron-browser/extensionsActions'; import { ExtensionsInput } from 'vs/workbench/parts/extensions/common/extensionsInput'; @@ -115,8 +115,8 @@ actionRegistry.registerWorkbenchAction(recommendationsActionDescriptor, 'Extensi const keymapRecommendationsActionDescriptor = new SyncActionDescriptor(ShowRecommendedKeymapExtensionsAction, ShowRecommendedKeymapExtensionsAction.ID, ShowRecommendedKeymapExtensionsAction.SHORT_LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_M) }); actionRegistry.registerWorkbenchAction(keymapRecommendationsActionDescriptor, 'Preferences: Keymaps', PreferencesLabel); -const extensionPacksActionDescriptor = new SyncActionDescriptor(ShowExtensionPacksAction, ShowExtensionPacksAction.ID, ShowExtensionPacksAction.SHORT_LABEL); -actionRegistry.registerWorkbenchAction(extensionPacksActionDescriptor, 'Extensions: Extension Packs', PreferencesLabel); +const languageExtensionsActionDescriptor = new SyncActionDescriptor(ShowLanguageExtensionsAction, ShowLanguageExtensionsAction.ID, ShowLanguageExtensionsAction.SHORT_LABEL); +actionRegistry.registerWorkbenchAction(languageExtensionsActionDescriptor, 'Extensions: Language Extensions', PreferencesLabel); const workspaceRecommendationsActionDescriptor = new SyncActionDescriptor(ShowWorkspaceRecommendedExtensionsAction, ShowWorkspaceRecommendedExtensionsAction.ID, ShowWorkspaceRecommendedExtensionsAction.LABEL); actionRegistry.registerWorkbenchAction(workspaceRecommendationsActionDescriptor, 'Extensions: Show Workspace Recommended Extensions', ExtensionsLabel); diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts index 041c4026aa7d9..cc27fe4978c77 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts @@ -52,9 +52,9 @@ export default () => `

    ${escape(localize('welcomePage.customize', "Customize"))}

      -
    ' - ].join('\n')); - - assert.equal(snippet.placeHolders.length, 3); - assert.equal(snippet.finishPlaceHolderIndex, 2); - let [first, second, third] = snippet.placeHolders; - - assert.equal(third.id, 0); - assert.equal(third.occurences.length, 1); - assert.deepEqual(third.occurences[0], new Range(2, 2, 2, 2)); - - assert.equal(second.id, 2); - assert.equal(second.occurences.length, 1); - assert.deepEqual(second.occurences[0], new Range(1, 10, 1, 17)); - - assert.equal(first.id, '1'); - assert.equal(first.occurences.length, 1); - assert.deepEqual(first.occurences[0], new Range(1, 5, 1, 18)); - }); - - test('bug #17541:[snippets] Support default text in mirrors', () => { - - var external = [ - 'begin{${1:enumerate}}', - '\t$0', - 'end{$1}' - ].join('\n'); - - var internal = [ - 'begin\\{{{1:enumerate}}\\}', - '\t{{}}', - 'end\\{{{1:}}\\}' - ].join('\n'); - - assertInternalAndTextmate(internal, external, snippet => { - assert.deepEqual(snippet.lines, [ - 'begin{enumerate}', - '\t', - 'end{enumerate}' - ]); - assert.equal(snippet.placeHolders.length, 2); - assert.equal(snippet.placeHolders[0].id, '1'); - assert.equal(snippet.placeHolders[0].occurences.length, 2); - assert.deepEqual(snippet.placeHolders[0].occurences[0], new Range(1, 7, 1, 16)); - assert.deepEqual(snippet.placeHolders[0].occurences[1], new Range(3, 5, 3, 14)); - assert.equal(snippet.placeHolders[1].id, ''); - assert.equal(snippet.placeHolders[1].occurences.length, 1); - assert.deepEqual(snippet.placeHolders[1].occurences[0], new Range(2, 2, 2, 2)); - }); - }); - - test('bug #7093: Snippet default value is only populated for first variable reference', () => { - var internal = 'logger.error({ logContext: lc, errorContext: `{{1:err}}`, error: {{1:}} });'; - var external = 'logger.error({ logContext: lc, errorContext: `${1:err}`, error: $1 });'; - - assertInternalAndTextmate(internal, external, snippet => { - assert.equal(snippet.lines.length, 1); - assert.equal(snippet.lines[0], 'logger.error({ logContext: lc, errorContext: `err`, error: err });'); - }); - }); - - test('bug #17487:[snippets] four backslashes are required to get one backslash in the inserted text', () => { - - var external = [ - '\\begin{${1:enumerate}}', - '\t$0', - '\\end{$1}' - ].join('\n'); - - var internal = [ - '\\begin\\{{{1:enumerate}}\\}', - '\t{{}}', - '\\end\\{{{1:}}\\}' - ].join('\n'); - - assertInternalAndTextmate(internal, external, snippet => { - assert.deepEqual(snippet.lines, [ - '\\begin{enumerate}', - '\t', - '\\end{enumerate}' - ]); - assert.equal(snippet.placeHolders.length, 2); - assert.equal(snippet.placeHolders[0].id, '1'); - assert.equal(snippet.placeHolders[0].occurences.length, 2); - assert.deepEqual(snippet.placeHolders[0].occurences[0], new Range(1, 8, 1, 17)); - assert.deepEqual(snippet.placeHolders[0].occurences[1], new Range(3, 6, 3, 15)); - assert.equal(snippet.placeHolders[1].id, ''); - assert.equal(snippet.placeHolders[1].occurences.length, 1); - assert.deepEqual(snippet.placeHolders[1].occurences[0], new Range(2, 2, 2, 2)); - }); - }); - - test('issue #3552: Snippet Converted Not Working for literal Dollar Sign', () => { - - let external = '\n\\$scope.\\$broadcast(\'scroll.infiniteScrollComplete\');\n'; - let snippet = CodeSnippet.fromTextmate(external); - assert.equal(snippet.placeHolders.length, 1); - assert.equal(snippet.finishPlaceHolderIndex, 0); - assert.deepEqual(snippet.lines, ['', '$scope.$broadcast(\'scroll.infiniteScrollComplete\');', '']); - }); - - test('bind, adjust indentation', () => { - - // don't move placeholder at the beginning of the line - let snippet = CodeSnippet.fromTextmate([ - 'afterEach((done) => {', - '\t${1}test${2}', - '})' - ].join('\n')); - - // replace tab-stop with two spaces - let boundSnippet = snippet.bind('', 0, 0, { - normalizeIndentation(str: string): string { - return str.replace(/\t/g, ' '); - } - }); - let [first, second] = boundSnippet.placeHolders; - assert.equal(first.occurences.length, 1); - assert.equal(first.occurences[0].startColumn, 3); - assert.equal(second.occurences.length, 1); - assert.equal(second.occurences[0].startColumn, 7); - - // keep tab-stop, identity - boundSnippet = snippet.bind('', 0, 0, { - normalizeIndentation(str: string): string { - return str; - } - }); - [first, second] = boundSnippet.placeHolders; - assert.equal(first.occurences.length, 1); - assert.equal(first.occurences[0].startColumn, 2); - assert.equal(second.occurences.length, 1); - assert.equal(second.occurences[0].startColumn, 6); - }); - - - test('issue #11890: Bad cursor position 1/2', () => { - - let snippet = CodeSnippet.fromTextmate([ - 'afterEach((done) => {', - '${1}\ttest${2}', - '})' - ].join('\n')); - - let boundSnippet = snippet.bind('', 0, 0, { - normalizeIndentation(str: string): string { - return str.replace(/\t/g, ' '); - } - }); - - assert.equal(boundSnippet.lines[1], ' test'); - assert.equal(boundSnippet.placeHolders.length, 3); - assert.equal(boundSnippet.finishPlaceHolderIndex, 2); - - let [first, second] = boundSnippet.placeHolders; - assert.equal(first.occurences.length, 1); - assert.equal(first.occurences[0].startColumn, 1); - assert.equal(second.occurences.length, 1); - assert.equal(second.occurences[0].startColumn, 7); - }); - - test('issue #11890: Bad cursor position 2/2', () => { - - let snippet = CodeSnippet.fromTextmate('${1}\ttest'); - - let boundSnippet = snippet.bind('abc abc abc prefix3', 0, 12, { - normalizeIndentation(str: string): string { - return str.replace(/\t/g, ' '); - } - }); - - assert.equal(boundSnippet.lines[0], '\ttest'); - assert.equal(boundSnippet.placeHolders.length, 2); - assert.equal(boundSnippet.finishPlaceHolderIndex, 1); - - let [first, second] = boundSnippet.placeHolders; - assert.equal(first.occurences.length, 1); - assert.equal(first.occurences[0].startColumn, 13); - assert.equal(second.occurences.length, 1); - assert.equal(second.occurences[0].startColumn, 18); - }); - - test('issue #17989: Bad selection', () => { - - let snippet = CodeSnippet.fromTextmate('${1:HoldMeTight}'); - - let boundSnippet = snippet.bind('abc abc abc prefix3', 0, 12, { - normalizeIndentation(str: string): string { - return str.replace(/\t/g, ' '); - } - }); - - assert.equal(boundSnippet.lines[0], 'HoldMeTight'); - assert.equal(boundSnippet.placeHolders.length, 2); - assert.equal(boundSnippet.finishPlaceHolderIndex, 1); - let [first, second] = boundSnippet.placeHolders; - assert.equal(first.occurences.length, 1); - assert.equal(first.occurences[0].startColumn, 13); - - assert.equal(second.occurences.length, 1); - assert.equal(second.occurences[0].startColumn, 24); - - }); - - test('variables, simple', () => { - - const resolver: ISnippetVariableResolver = { - resolve(name) { - return name.split('').reverse().join(''); - } - }; - - // simple - let snippet = CodeSnippet.fromTextmate('$FOO', resolver); - assert.equal(snippet.lines[0], 'OOF'); - assert.equal(snippet.placeHolders.length, 1); - assert.equal(snippet.placeHolders[0].occurences[0].endColumn, 4); - - snippet = CodeSnippet.fromTextmate('${FOO:BAR}', resolver); - assert.equal(snippet.lines[0], 'OOF'); - assert.equal(snippet.placeHolders.length, 1); - assert.equal(snippet.placeHolders[0].occurences[0].endColumn, 4); - - // placeholder - snippet = CodeSnippet.fromTextmate('${1:$FOO}bar$1', resolver); - assert.equal(snippet.lines[0], 'OOFbarOOF'); - assert.equal(snippet.placeHolders.length, 2); - assert.equal(snippet.placeHolders[0].occurences.length, 2); - assert.equal(snippet.placeHolders[0].occurences[0].startColumn, 1); - assert.equal(snippet.placeHolders[0].occurences[0].endColumn, 4); - assert.equal(snippet.placeHolders[0].occurences[1].startColumn, 7); - assert.equal(snippet.placeHolders[0].occurences[1].endColumn, 10); - assert.equal(snippet.placeHolders[1].occurences.length, 1); - - snippet = CodeSnippet.fromTextmate('${1:${FOO:abc}}bar$1', resolver); - assert.equal(snippet.lines[0], 'OOFbarOOF'); - }); - - test('variables, evil resolver', () => { - - let snippet = CodeSnippet.fromTextmate('$FOO', { resolve(): string { throw new Error(); } }); - assert.equal(snippet.lines[0], 'FOO'); - }); - - test('variables, default', () => { - - let snippet = CodeSnippet.fromTextmate('$FOO', { resolve(): string { return undefined; } }); - assert.equal(snippet.lines[0], 'FOO'); - - snippet = CodeSnippet.fromTextmate('$FOO', { resolve(): string { return ''; } }); - assert.equal(snippet.lines[0], ''); - - snippet = CodeSnippet.fromTextmate('${FOO:BAR}', { resolve(): string { return undefined; } }); - assert.equal(snippet.lines[0], 'BAR'); - - snippet = CodeSnippet.fromTextmate('${FOO:BAR}', { resolve(): string { return ''; } }); - assert.equal(snippet.lines[0], 'BAR'); - }); -}); - diff --git a/src/vs/editor/contrib/snippet/test/common/snippetController.test.ts b/src/vs/editor/contrib/snippet/test/common/snippetController.test.ts deleted file mode 100644 index 75ddf1777cffc..0000000000000 --- a/src/vs/editor/contrib/snippet/test/common/snippetController.test.ts +++ /dev/null @@ -1,553 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import * as assert from 'assert'; -import { Range } from 'vs/editor/common/core/range'; -import { Position } from 'vs/editor/common/core/position'; -import { Selection } from 'vs/editor/common/core/selection'; -import { CodeSnippet } from 'vs/editor/contrib/snippet/common/snippet'; -import { SnippetController } from 'vs/editor/contrib/snippet/common/snippetController'; -import { MockCodeEditor, withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; -import { Cursor } from 'vs/editor/common/controller/cursor'; - -class TestSnippetController extends SnippetController { - - isInSnippetMode(): boolean { - return !!this._currentController; - } - -} - -suite('SnippetController', () => { - - function snippetTest(cb: (editor: MockCodeEditor, cursor: Cursor, codeSnippet: CodeSnippet, snippetController: TestSnippetController) => void, lines?: string[]): void { - - if (!lines) { - lines = [ - 'function test() {', - '\tvar x = 3;', - '\tvar arr = [];', - '\t', - '}' - ]; - }; - - withMockCodeEditor(lines, {}, (editor, cursor) => { - editor.getModel().updateOptions({ - insertSpaces: false - }); - let snippetController = editor.registerAndInstantiateContribution(TestSnippetController); - let codeSnippet = CodeSnippet.fromInternal([ - 'for (var {{index}}; {{index}} < {{array}}.length; {{index}}++) {', - '\tvar element = {{array}}[{{index}}];', - '\t{{}}', - '}' - ].join('\n')); - - cb(editor, cursor, codeSnippet, snippetController); - - snippetController.dispose(); - }); - } - - test('Simple accepted', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - - snippetController.run(codeSnippet, 0, 0); - assert.equal(editor.getModel().getLineContent(4), '\tfor (var index; index < array.length; index++) {'); - assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = array[index];'); - assert.equal(editor.getModel().getLineContent(6), '\t\t'); - assert.equal(editor.getModel().getLineContent(7), '\t}'); - - editor.trigger('test', 'type', { text: 'i' }); - assert.equal(editor.getModel().getLineContent(4), '\tfor (var i; i < array.length; i++) {'); - assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = array[i];'); - assert.equal(editor.getModel().getLineContent(6), '\t\t'); - assert.equal(editor.getModel().getLineContent(7), '\t}'); - - snippetController.jumpToNextPlaceholder(); - editor.trigger('test', 'type', { text: 'arr' }); - assert.equal(editor.getModel().getLineContent(4), '\tfor (var i; i < arr.length; i++) {'); - assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = arr[i];'); - assert.equal(editor.getModel().getLineContent(6), '\t\t'); - assert.equal(editor.getModel().getLineContent(7), '\t}'); - - snippetController.jumpToPrevPlaceholder(); - editor.trigger('test', 'type', { text: 'j' }); - assert.equal(editor.getModel().getLineContent(4), '\tfor (var j; j < arr.length; j++) {'); - assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = arr[j];'); - assert.equal(editor.getModel().getLineContent(6), '\t\t'); - assert.equal(editor.getModel().getLineContent(7), '\t}'); - - snippetController.acceptSnippet(); - assert.deepEqual(editor.getPosition(), new Position(6, 3)); - }); - }); - - test('Simple canceled', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - - snippetController.run(codeSnippet, 0, 0); - assert.equal(editor.getModel().getLineContent(4), '\tfor (var index; index < array.length; index++) {'); - assert.equal(editor.getModel().getLineContent(5), '\t\tvar element = array[index];'); - assert.equal(editor.getModel().getLineContent(6), '\t\t'); - assert.equal(editor.getModel().getLineContent(7), '\t}'); - - snippetController.leaveSnippet(); - assert.deepEqual(editor.getPosition(), new Position(4, 16)); - }); - }); - - test('Stops when deleting lines above', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - editor.getModel().applyEdits([{ - forceMoveMarkers: false, - identifier: null, - isAutoWhitespaceEdit: false, - range: new Range(1, 1, 3, 1), - text: null - }]); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Stops when deleting lines below', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - editor.getModel().applyEdits([{ - forceMoveMarkers: false, - identifier: null, - isAutoWhitespaceEdit: false, - range: new Range(8, 1, 8, 100), - text: null - }]); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Stops when inserting lines above', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - editor.getModel().applyEdits([{ - forceMoveMarkers: false, - identifier: null, - isAutoWhitespaceEdit: false, - range: new Range(1, 100, 1, 100), - text: '\nHello' - }]); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Stops when inserting lines below', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - editor.getModel().applyEdits([{ - forceMoveMarkers: false, - identifier: null, - isAutoWhitespaceEdit: false, - range: new Range(8, 100, 8, 100), - text: '\nHello' - }]); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Stops when calling model.setValue()', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - editor.getModel().setValue('goodbye'); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Stops when undoing', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - editor.getModel().undo(); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Stops when moving cursor outside', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - editor.setPosition({ lineNumber: 1, column: 1 }); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Stops when disconnecting editor model', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - editor.setModel(null); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Stops when disposing editor', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setPosition({ lineNumber: 4, column: 2 }); - snippetController.run(codeSnippet, 0, 0); - - snippetController.dispose(); - - assert.equal(snippetController.isInSnippetMode(), false); - }); - }); - - test('Final tabstop with multiple selections', () => { - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setSelections([ - new Selection(1, 1, 1, 1), - new Selection(2, 1, 2, 1), - ]); - - codeSnippet = CodeSnippet.fromInternal('foo{{}}'); - snippetController.run(codeSnippet, 0, 0); - - assert.equal(editor.getSelections().length, 2); - const [first, second] = editor.getSelections(); - assert.ok(first.equalsRange({ startLineNumber: 1, startColumn: 4, endLineNumber: 1, endColumn: 4 }), first.toString()); - assert.ok(second.equalsRange({ startLineNumber: 2, startColumn: 4, endLineNumber: 2, endColumn: 4 }), second.toString()); - }); - - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setSelections([ - new Selection(1, 1, 1, 1), - new Selection(2, 1, 2, 1), - ]); - - codeSnippet = CodeSnippet.fromInternal('foo{{}}bar'); - snippetController.run(codeSnippet, 0, 0); - - assert.equal(editor.getSelections().length, 2); - const [first, second] = editor.getSelections(); - assert.ok(first.equalsRange({ startLineNumber: 1, startColumn: 4, endLineNumber: 1, endColumn: 4 }), first.toString()); - assert.ok(second.equalsRange({ startLineNumber: 2, startColumn: 4, endLineNumber: 2, endColumn: 4 }), second.toString()); - }); - - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setSelections([ - new Selection(1, 1, 1, 1), - new Selection(1, 5, 1, 5), - ]); - - codeSnippet = CodeSnippet.fromInternal('foo{{}}bar'); - snippetController.run(codeSnippet, 0, 0); - - assert.equal(editor.getSelections().length, 2); - const [first, second] = editor.getSelections(); - assert.ok(first.equalsRange({ startLineNumber: 1, startColumn: 4, endLineNumber: 1, endColumn: 4 }), first.toString()); - assert.ok(second.equalsRange({ startLineNumber: 1, startColumn: 14, endLineNumber: 1, endColumn: 14 }), second.toString()); - }); - - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setSelections([ - new Selection(1, 1, 1, 1), - new Selection(1, 5, 1, 5), - ]); - - codeSnippet = CodeSnippet.fromInternal('foo\n{{}}\nbar'); - snippetController.run(codeSnippet, 0, 0); - - assert.equal(editor.getSelections().length, 2); - const [first, second] = editor.getSelections(); - assert.ok(first.equalsRange({ startLineNumber: 2, startColumn: 1, endLineNumber: 2, endColumn: 1 }), first.toString()); - assert.ok(second.equalsRange({ startLineNumber: 4, startColumn: 1, endLineNumber: 4, endColumn: 1 }), second.toString()); - }); - - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setSelections([ - new Selection(1, 1, 1, 1), - new Selection(1, 5, 1, 5), - ]); - - codeSnippet = CodeSnippet.fromInternal('foo\n{{}}\nbar'); - snippetController.run(codeSnippet, 0, 0); - - assert.equal(editor.getSelections().length, 2); - const [first, second] = editor.getSelections(); - assert.ok(first.equalsRange({ startLineNumber: 2, startColumn: 1, endLineNumber: 2, endColumn: 1 }), first.toString()); - assert.ok(second.equalsRange({ startLineNumber: 4, startColumn: 1, endLineNumber: 4, endColumn: 1 }), second.toString()); - }); - - snippetTest((editor, cursor, codeSnippet, snippetController) => { - editor.setSelections([ - new Selection(2, 7, 2, 7), - ]); - - codeSnippet = CodeSnippet.fromInternal('xo{{}}r'); - snippetController.run(codeSnippet, 1, 0); - - assert.equal(editor.getSelections().length, 1); - assert.ok(editor.getSelection().equalsRange({ startLineNumber: 2, startColumn: 8, endColumn: 8, endLineNumber: 2 })); - }); - }); - - test('Final tabstop, #11742 simple', () => { - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelection(new Selection(1, 19, 1, 19)); - - codeSnippet = CodeSnippet.fromTextmate('{{% url_**$1** %}}'); - controller.run(codeSnippet, 2, 0); - - assert.equal(editor.getSelections().length, 1); - assert.ok(editor.getSelection().equalsRange({ startLineNumber: 1, startColumn: 27, endLineNumber: 1, endColumn: 27 })); - assert.equal(editor.getModel().getValue(), 'example example {{% url_**** %}}'); - - }, ['example example sc']); - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelection(new Selection(1, 3, 1, 3)); - - codeSnippet = CodeSnippet.fromTextmate([ - 'afterEach((done) => {', - '\t${1}test', - '});' - ].join('\n')); - - controller.run(codeSnippet, 2, 0); - - assert.equal(editor.getSelections().length, 1); - assert.ok(editor.getSelection().equalsRange({ startLineNumber: 2, startColumn: 2, endLineNumber: 2, endColumn: 2 }), editor.getSelection().toString()); - assert.equal(editor.getModel().getValue(), 'afterEach((done) => {\n\ttest\n});'); - - }, ['af']); - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelection(new Selection(1, 3, 1, 3)); - - codeSnippet = CodeSnippet.fromTextmate([ - 'afterEach((done) => {', - '${1}\ttest', - '});' - ].join('\n')); - - controller.run(codeSnippet, 2, 0); - - assert.equal(editor.getSelections().length, 1); - assert.ok(editor.getSelection().equalsRange({ startLineNumber: 2, startColumn: 1, endLineNumber: 2, endColumn: 1 }), editor.getSelection().toString()); - assert.equal(editor.getModel().getValue(), 'afterEach((done) => {\n\ttest\n});'); - - }, ['af']); - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelection(new Selection(1, 9, 1, 9)); - - codeSnippet = CodeSnippet.fromTextmate([ - 'aft${1}er' - ].join('\n')); - - controller.run(codeSnippet, 8, 0); - - assert.equal(editor.getModel().getValue(), 'after'); - assert.equal(editor.getSelections().length, 1); - assert.ok(editor.getSelection().equalsRange({ startLineNumber: 1, startColumn: 4, endLineNumber: 1, endColumn: 4 }), editor.getSelection().toString()); - - }, ['afterone']); - }); - - test('Final tabstop, #11742 different indents', () => { - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(2, 4, 2, 4), - new Selection(1, 3, 1, 3) - ]); - - codeSnippet = CodeSnippet.fromTextmate([ - 'afterEach((done) => {', - '\t${0}test', - '});' - ].join('\n')); - - controller.run(codeSnippet, 2, 0); - - assert.equal(editor.getSelections().length, 2); - const [first, second] = editor.getSelections(); - - assert.ok(first.equalsRange({ startLineNumber: 5, startColumn: 3, endLineNumber: 5, endColumn: 3 }), first.toString()); - assert.ok(second.equalsRange({ startLineNumber: 2, startColumn: 2, endLineNumber: 2, endColumn: 2 }), second.toString()); - - }, ['af', '\taf']); - }); - - test('Final tabstop, #11890 stay at the beginning', () => { - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(1, 5, 1, 5) - ]); - - codeSnippet = CodeSnippet.fromTextmate([ - 'afterEach((done) => {', - '${1}\ttest', - '});' - ].join('\n')); - - controller.run(codeSnippet, 2, 0); - - assert.equal(editor.getSelections().length, 1); - const [first] = editor.getSelections(); - - assert.ok(first.equalsRange({ startLineNumber: 2, startColumn: 3, endLineNumber: 2, endColumn: 3 }), first.toString()); - - }, [' af']); - }); - - test('Final tabstop, no tabstop', () => { - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(1, 3, 1, 3) - ]); - - codeSnippet = CodeSnippet.fromTextmate('afterEach'); - - controller.run(codeSnippet, 2, 0); - - assert.ok(editor.getSelection().equalsRange({ startLineNumber: 1, startColumn: 10, endLineNumber: 1, endColumn: 10 })); - - }, ['af', '\taf']); - }); - - test('Multiple cursor and overwriteBefore/After, issue #11060', () => { - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(1, 7, 1, 7), - new Selection(2, 4, 2, 4) - ]); - - codeSnippet = CodeSnippet.fromTextmate('_foo'); - controller.run(codeSnippet, 1, 0); - assert.equal(editor.getModel().getValue(), 'this._foo\nabc_foo'); - - }, ['this._', 'abc']); - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(1, 7, 1, 7), - new Selection(2, 4, 2, 4) - ]); - - codeSnippet = CodeSnippet.fromTextmate('XX'); - controller.run(codeSnippet, 1, 0); - assert.equal(editor.getModel().getValue(), 'this.XX\nabcXX'); - - }, ['this._', 'abc']); - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(1, 7, 1, 7), - new Selection(2, 4, 2, 4), - new Selection(3, 5, 3, 5) - ]); - - codeSnippet = CodeSnippet.fromTextmate('_foo'); - controller.run(codeSnippet, 1, 0); - assert.equal(editor.getModel().getValue(), 'this._foo\nabc_foo\ndef_foo'); - - }, ['this._', 'abc', 'def_']); - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(1, 7, 1, 7), - new Selection(2, 4, 2, 4), - new Selection(3, 6, 3, 6) - ]); - - codeSnippet = CodeSnippet.fromTextmate('._foo'); - controller.run(codeSnippet, 2, 0); - assert.equal(editor.getModel().getValue(), 'this._foo\nabc._foo\ndef._foo'); - - }, ['this._', 'abc', 'def._']); - - }); - - test('Multiple cursor and overwriteBefore/After, #16277', () => { - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(1, 5, 1, 5), - new Selection(2, 5, 2, 5), - ]); - - codeSnippet = CodeSnippet.fromTextmate('document'); - controller.run(codeSnippet, 3, 0); - assert.equal(editor.getModel().getValue(), '{document}\n{document && true}'); - - }, ['{foo}', '{foo && true}']); - }); - - test('Insert snippet twice, #19449', () => { - - snippetTest((editor, cursor, codeSnippet, controller) => { - - editor.setSelections([ - new Selection(1, 1, 1, 1) - ]); - - codeSnippet = CodeSnippet.fromTextmate('for (var ${1:i}=0; ${1:i} { - - editor.setSelections([ - new Selection(1, 1, 1, 1) - ]); - - codeSnippet = CodeSnippet.fromTextmate('for (let ${1:i}=0; ${1:i} { + if (candidate instanceof Placeholder) { + let index = Number(candidate.index); + if (index > maxIndex) { + maxIndex = index; + } + } + return true; + }); + + // rewrite final tabstops + walk(marker, candidate => { + if (candidate instanceof Placeholder) { + if (candidate.isFinalTabstop) { + candidate.index = String(++maxIndex); + } + } + return true; + }); + + // write back as string + function toSnippetString(marker: Marker): string { + if (marker instanceof Text) { + return SnippetParser.escape(marker.string); + + } else if (marker instanceof Placeholder) { + if (marker.defaultValue.length > 0) { + return `\${${marker.index}:${marker.defaultValue.map(toSnippetString).join('')}}`; + } else { + return `\$${marker.index}`; + } + } else if (marker instanceof Variable) { + if (marker.defaultValue.length > 0) { + return `\${${marker.name}:${marker.defaultValue.map(toSnippetString).join('')}}`; + } else { + return `\$${marker.name}`; + } + } else { + throw new Error('unexpected marker: ' + marker); + } + } + return marker.map(toSnippetString).join(''); + } + public getRangeToReplace(value: string, start: number, end: number): Range { //console.log('value', value); let startPosition = this.getPositionFromOffset(start); From 3215f19074d49e32d5ab55203923865910d4d5ca Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 24 May 2017 12:16:42 +0200 Subject: [PATCH 0980/2747] move everything into snippet/browser --- src/vs/editor/browser/editor.all.ts | 3 +-- .../editor/contrib/snippet/{common => browser}/snippet.md | 0 src/vs/editor/contrib/snippet/browser/snippet.ts | 8 -------- .../contrib/snippet/{common => browser}/snippetParser.ts | 0 .../snippet/browser/{snippet.css => snippetSession.css} | 0 src/vs/editor/contrib/snippet/browser/snippetSession.ts | 5 +++-- .../snippet/{common => browser}/snippetVariables.ts | 0 .../contrib/snippet/test/browser/snippetParser.test.ts | 2 +- .../contrib/snippet/test/browser/snippetVariables.test.ts | 4 ++-- .../editor/contrib/suggest/browser/suggestController.ts | 2 +- .../parts/emmet/electron-browser/editorAccessor.ts | 2 +- .../parts/snippets/electron-browser/TMSnippets.ts | 4 ++-- 12 files changed, 11 insertions(+), 19 deletions(-) rename src/vs/editor/contrib/snippet/{common => browser}/snippet.md (100%) delete mode 100644 src/vs/editor/contrib/snippet/browser/snippet.ts rename src/vs/editor/contrib/snippet/{common => browser}/snippetParser.ts (100%) rename src/vs/editor/contrib/snippet/browser/{snippet.css => snippetSession.css} (100%) rename src/vs/editor/contrib/snippet/{common => browser}/snippetVariables.ts (100%) diff --git a/src/vs/editor/browser/editor.all.ts b/src/vs/editor/browser/editor.all.ts index f6decf73a874a..4223fbac79041 100644 --- a/src/vs/editor/browser/editor.all.ts +++ b/src/vs/editor/browser/editor.all.ts @@ -38,8 +38,7 @@ import 'vs/editor/contrib/quickFix/browser/quickFixCommands'; import 'vs/editor/contrib/referenceSearch/browser/referenceSearch'; import 'vs/editor/contrib/rename/browser/rename'; import 'vs/editor/contrib/smartSelect/common/smartSelect'; -import 'vs/editor/contrib/snippet/common/snippet'; -import 'vs/editor/contrib/snippet/browser/snippet'; +import 'vs/editor/contrib/snippet/browser/snippetController2'; import 'vs/editor/contrib/suggest/browser/suggestController'; import 'vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode'; import 'vs/editor/contrib/wordHighlighter/common/wordHighlighter'; diff --git a/src/vs/editor/contrib/snippet/common/snippet.md b/src/vs/editor/contrib/snippet/browser/snippet.md similarity index 100% rename from src/vs/editor/contrib/snippet/common/snippet.md rename to src/vs/editor/contrib/snippet/browser/snippet.md diff --git a/src/vs/editor/contrib/snippet/browser/snippet.ts b/src/vs/editor/contrib/snippet/browser/snippet.ts deleted file mode 100644 index 3d8b6eb3399a9..0000000000000 --- a/src/vs/editor/contrib/snippet/browser/snippet.ts +++ /dev/null @@ -1,8 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import 'vs/css!./snippet'; \ No newline at end of file diff --git a/src/vs/editor/contrib/snippet/common/snippetParser.ts b/src/vs/editor/contrib/snippet/browser/snippetParser.ts similarity index 100% rename from src/vs/editor/contrib/snippet/common/snippetParser.ts rename to src/vs/editor/contrib/snippet/browser/snippetParser.ts diff --git a/src/vs/editor/contrib/snippet/browser/snippet.css b/src/vs/editor/contrib/snippet/browser/snippetSession.css similarity index 100% rename from src/vs/editor/contrib/snippet/browser/snippet.css rename to src/vs/editor/contrib/snippet/browser/snippetSession.css diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index 72395327a67bd..b5938e3c7e49a 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -5,16 +5,17 @@ 'use strict'; +import 'vs/css!./snippetSession'; import { getLeadingWhitespace } from 'vs/base/common/strings'; import { ICommonCodeEditor, IModel, TrackedRangeStickiness, IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; import { EditOperation } from 'vs/editor/common/core/editOperation'; -import { TextmateSnippet, Placeholder, SnippetParser } from '../common/snippetParser'; +import { TextmateSnippet, Placeholder, SnippetParser } from './snippetParser'; import { Selection } from 'vs/editor/common/core/selection'; import { Range } from 'vs/editor/common/core/range'; import { IPosition } from 'vs/editor/common/core/position'; import { groupBy } from 'vs/base/common/arrays'; import { dispose } from 'vs/base/common/lifecycle'; -import { EditorSnippetVariableResolver } from "vs/editor/contrib/snippet/common/snippetVariables"; +import { EditorSnippetVariableResolver } from "./snippetVariables"; import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; export class OneSnippet { diff --git a/src/vs/editor/contrib/snippet/common/snippetVariables.ts b/src/vs/editor/contrib/snippet/browser/snippetVariables.ts similarity index 100% rename from src/vs/editor/contrib/snippet/common/snippetVariables.ts rename to src/vs/editor/contrib/snippet/browser/snippetVariables.ts diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts index f960afe2ffa4d..66e204e9da225 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts @@ -5,7 +5,7 @@ 'use strict'; import * as assert from 'assert'; -import { Scanner, TokenType, SnippetParser, Text, Placeholder, Variable, Marker, walk } from 'vs/editor/contrib/snippet/common/snippetParser'; +import { Scanner, TokenType, SnippetParser, Text, Placeholder, Variable, Marker, walk } from 'vs/editor/contrib/snippet/browser/snippetParser'; suite('SnippetParser', () => { diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts index 071119f91047f..fa0bb4034f901 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts @@ -8,8 +8,8 @@ import * as assert from 'assert'; import { isWindows } from 'vs/base/common/platform'; import URI from 'vs/base/common/uri'; import { Selection } from 'vs/editor/common/core/selection'; -import { EditorSnippetVariableResolver } from 'vs/editor/contrib/snippet/common/snippetVariables'; -import { SnippetParser } from 'vs/editor/contrib/snippet/common/snippetParser'; +import { EditorSnippetVariableResolver } from 'vs/editor/contrib/snippet/browser/snippetVariables'; +import { SnippetParser } from 'vs/editor/contrib/snippet/browser/snippetParser'; import { Model } from 'vs/editor/common/model/model'; suite('Snippet Variables Resolver', function () { diff --git a/src/vs/editor/contrib/suggest/browser/suggestController.ts b/src/vs/editor/contrib/suggest/browser/suggestController.ts index 144a81b17d8b2..add8b9df096a4 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestController.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestController.ts @@ -21,7 +21,7 @@ import { alert } from 'vs/base/browser/ui/aria/aria'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Range } from 'vs/editor/common/core/range'; -import { SnippetParser } from 'vs/editor/contrib/snippet/common/snippetParser'; +import { SnippetParser } from 'vs/editor/contrib/snippet/browser/snippetParser'; import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { Context as SuggestContext } from './suggest'; import { SuggestModel, State } from './suggestModel'; diff --git a/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts b/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts index 12776157397a3..38cb77ea2fd1f 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts @@ -12,7 +12,7 @@ import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetCon import { LanguageId, LanguageIdentifier } from 'vs/editor/common/modes'; import { Position } from 'vs/editor/common/core/position'; import { CoreEditingCommands } from "vs/editor/common/controller/coreCommands"; -import { SnippetParser, walk, Placeholder, Variable, Text, Marker } from 'vs/editor/contrib/snippet/common/snippetParser'; +import { SnippetParser, walk, Placeholder, Variable, Text, Marker } from 'vs/editor/contrib/snippet/browser/snippetParser'; import emmet = require('emmet'); diff --git a/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts b/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts index 3c04fb922fffd..ae83175077bc3 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts @@ -15,8 +15,8 @@ import { ISnippetsService, ISnippet } from 'vs/workbench/parts/snippets/electron import { IModeService } from 'vs/editor/common/services/modeService'; import { languagesExtPoint } from 'vs/editor/common/services/modeServiceImpl'; import { LanguageIdentifier } from 'vs/editor/common/modes'; -import { SnippetParser, Marker, Placeholder, Variable, Text, walk } from 'vs/editor/contrib/snippet/common/snippetParser'; -import { EditorSnippetVariableResolver } from "vs/editor/contrib/snippet/common/snippetVariables"; +import { SnippetParser, Marker, Placeholder, Variable, Text, walk } from 'vs/editor/contrib/snippet/browser/snippetParser'; +import { EditorSnippetVariableResolver } from "vs/editor/contrib/snippet/browser/snippetVariables"; interface ISnippetsExtensionPoint { language: string; From 04d5fc77ccc0ffbf9af4a721e15abd9c10a69d24 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 24 May 2017 12:04:16 +0200 Subject: [PATCH 0981/2747] theming - dirty diff colors --- .../electron-browser/dirtydiffDecorator.ts | 45 +++++++++++++++++++ .../media/dirtydiffDecorator.css | 24 ++-------- 2 files changed, 48 insertions(+), 21 deletions(-) diff --git a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts index fb3d45c4e7c1c..eaca7cc45e5e8 100644 --- a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts @@ -23,6 +23,10 @@ import URI from 'vs/base/common/uri'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ISCMService } from 'vs/workbench/services/scm/common/scm'; import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { registerThemingParticipant, ITheme, ICssStyleCollector } from "vs/platform/theme/common/themeService"; +import { registerColor } from "vs/platform/theme/common/colorRegistry"; +import { localize } from "vs/nls"; +import { Color } from "vs/base/common/color"; class DirtyDiffModelDecorator { @@ -266,3 +270,44 @@ export class DirtyDiffDecorator implements ext.IWorkbenchContribution { this.decorators = null; } } + +export const editorGutterModifiedBackground = registerColor('editorGutter.modifiedBackground', { + dark: Color.fromHex('#00bcf2').transparent(0.6), + light: Color.fromHex('#007acc').transparent(0.6), + hc: Color.fromHex('#007acc').transparent(0.6) +}, localize('editorGutterModifiedBackground', "Editor gutter background color for lines that are modified.")); + +export const editorGutterAddedBackground = registerColor('editorGutter.addedBackground', { + dark: Color.fromHex('#7fba00').transparent(0.6), + light: Color.fromHex('#2d883e').transparent(0.6), + hc: Color.fromHex('#2d883e').transparent(0.6) +}, localize('editorGutterAddedBackground', "Editor gutter background color for lines that are added.")); + +export const editorGutteDeletedBackground = registerColor('editorGutter.deletedBackground', { + dark: Color.fromHex('#b9131a').transparent(0.76), + light: Color.fromHex('#b9131a').transparent(0.76), + hc: Color.fromHex('#b9131a').transparent(0.76) +}, localize('editorGutterDeletedBackground', "Editor gutter background color for lines that are deleted.")); + +registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { + const editorGutterModifiedBackgroundColor = theme.getColor(editorGutterModifiedBackground); + if (editorGutterModifiedBackgroundColor) { + collector.addRule(`.monaco-editor .dirty-diff-modified-glyph { border-left: 3px solid ${editorGutterModifiedBackgroundColor}; }`); + } + + const editorGutterAddedBackgroundColor = theme.getColor(editorGutterAddedBackground); + if (editorGutterAddedBackgroundColor) { + collector.addRule(`.monaco-editor .dirty-diff-added-glyph { border-left: 3px solid ${editorGutterAddedBackgroundColor}; }`); + } + + const editorGutteDeletedBackgroundColor = theme.getColor(editorGutteDeletedBackground); + if (editorGutteDeletedBackgroundColor) { + collector.addRule(` + .monaco-editor .dirty-diff-deleted-glyph:after { + border-top: 4px solid transparent; + border-bottom: 4px solid transparent; + border-left: 4px solid ${editorGutteDeletedBackgroundColor}; + } + `); + } +}); \ No newline at end of file diff --git a/src/vs/workbench/parts/scm/electron-browser/media/dirtydiffDecorator.css b/src/vs/workbench/parts/scm/electron-browser/media/dirtydiffDecorator.css index 31023d7ffa93c..beaf772629ef5 100644 --- a/src/vs/workbench/parts/scm/electron-browser/media/dirtydiffDecorator.css +++ b/src/vs/workbench/parts/scm/electron-browser/media/dirtydiffDecorator.css @@ -3,23 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -.monaco-editor .dirty-diff-modified-glyph { - border-left: 3px solid rgba(0, 122, 204, 0.6); - margin-left: 5px; -} - -.monaco-editor.vs-dark .dirty-diff-modified-glyph { - border-left: 3px solid rgba(0, 188, 242, 0.6); - margin-left: 5px; -} - -.monaco-editor .dirty-diff-added-glyph { - border-left: 3px solid rgba(45, 136, 62, 0.6); - margin-left: 5px; -} - -.monaco-editor.vs-dark .dirty-diff-added-glyph { - border-left: 3px solid rgba(127, 186, 0, 0.6); +.monaco-editor .dirty-diff-modified-glyph, +.monaco-editor .dirty-diff-added-glyph, +.monaco-editor .dirty-diff-deleted-glyph:after { margin-left: 5px; } @@ -27,11 +13,7 @@ content: ''; position: absolute; bottom: -4px; - margin-left: 5px; box-sizing: border-box; - border-left: 4px solid rgba(185, 19, 26, 0.76); - border-top: 4px solid transparent; - border-bottom: 4px solid transparent; width: 4px; height: 0; z-index: 9; From 3ea2c216aa42cffa2549301eff73b52f760d9315 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Wed, 24 May 2017 12:29:51 +0200 Subject: [PATCH 0982/2747] More work to make v2 the default --- src/vs/workbench/api/node/extHostTask.ts | 23 ++- .../parts/tasks/browser/quickOpen.ts | 61 +++++++- .../parts/tasks/browser/restartQuickOpen.ts | 2 +- .../parts/tasks/browser/taskQuickOpen.ts | 2 +- .../parts/tasks/browser/terminateQuickOpen.ts | 2 +- .../parts/tasks/common/taskConfiguration.ts | 144 +++++++++++++----- .../parts/tasks/common/taskTemplates.ts | 9 +- src/vs/workbench/parts/tasks/common/tasks.ts | 77 ++++++---- .../electron-browser/task.contribution.ts | 59 +++---- .../electron-browser/terminalTaskSystem.ts | 16 +- .../parts/tasks/node/processTaskSystem.ts | 11 +- .../tasks/test/node/configuration.test.ts | 82 ++++++---- 12 files changed, 332 insertions(+), 156 deletions(-) diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index f1c5a8065b8af..5f23efc8f8036 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -192,26 +192,26 @@ namespace ProblemMatcher { } namespace RevealKind { - export function from(value: vscode.RevealKind): TaskSystem.ShowOutput { + export function from(value: vscode.RevealKind): TaskSystem.RevealKind { if (value === void 0 || value === null) { - return TaskSystem.ShowOutput.Always; + return TaskSystem.RevealKind.Always; } switch (value) { case types.RevealKind.Silent: - return TaskSystem.ShowOutput.Silent; + return TaskSystem.RevealKind.Silent; case types.RevealKind.Never: - return TaskSystem.ShowOutput.Never; + return TaskSystem.RevealKind.Never; } - return TaskSystem.ShowOutput.Always; + return TaskSystem.RevealKind.Always; } } namespace TerminalBehaviour { - export function from(value: vscode.TerminalBehaviour): { showOutput: TaskSystem.ShowOutput, echo: boolean } { + export function from(value: vscode.TerminalBehaviour): TaskSystem.TerminalBehavior { if (value === void 0 || value === null) { - return { showOutput: TaskSystem.ShowOutput.Always, echo: false }; + return { reveal: TaskSystem.RevealKind.Always, echo: false }; } - return { showOutput: RevealKind.from(value.reveal), echo: !!value.echo }; + return { reveal: RevealKind.from(value.reveal), echo: !!value.echo }; } } @@ -302,8 +302,6 @@ namespace Tasks { if (command === void 0) { return undefined; } - let behaviour = TerminalBehaviour.from(task.terminal); - command.echo = behaviour.echo; let result: TaskSystem.Task = { _id: uuidMap.getUUID(task.identifier), _source: { kind: TaskSystem.TaskSourceKind.Extension, detail: extension.id }, @@ -311,7 +309,6 @@ namespace Tasks { identifier: task.identifier, group: types.TaskGroup.is(task.group) ? task.group : undefined, command: command, - showOutput: behaviour.showOutput, isBackground: !!task.isBackground, suppressTaskName: true, problemMatchers: ProblemMatcher.from(task.problemMatchers) @@ -327,7 +324,7 @@ namespace Tasks { name: value.process, args: Strings.from(value.args), isShellCommand: false, - echo: false, + terminal: TerminalBehaviour.from(value.terminal) }; if (value.options) { result.options = CommandOptions.from(value.options); @@ -342,7 +339,7 @@ namespace Tasks { let result: TaskSystem.CommandConfiguration = { name: value.commandLine, isShellCommand: ShellConfiguration.from(value.options), - echo: false + terminal: TerminalBehaviour.from(value.terminal) }; if (value.options) { result.options = CommandOptions.from(value.options); diff --git a/src/vs/workbench/parts/tasks/browser/quickOpen.ts b/src/vs/workbench/parts/tasks/browser/quickOpen.ts index 743413653aa94..754d5756a22a3 100644 --- a/src/vs/workbench/parts/tasks/browser/quickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/quickOpen.ts @@ -7,6 +7,7 @@ import nls = require('vs/nls'); import Filters = require('vs/base/common/filters'); import { TPromise } from 'vs/base/common/winjs.base'; +import { Action, IAction } from 'vs/base/common/actions'; import Quickopen = require('vs/workbench/browser/quickopen'); import QuickOpen = require('vs/base/parts/quickopen/common/quickOpen'); import Model = require('vs/base/parts/quickopen/browser/quickOpenModel'); @@ -14,21 +15,26 @@ import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { Task, TaskSourceKind } from 'vs/workbench/parts/tasks/common/tasks'; import { ITaskService } from 'vs/workbench/parts/tasks/common/taskService'; +import { ActionBarContributor } from 'vs/workbench/browser/actionBarRegistry'; export class TaskEntry extends Model.QuickOpenEntry { - constructor(protected taskService: ITaskService, protected task: Task, highlights: Model.IHighlight[] = []) { + constructor(protected taskService: ITaskService, protected _task: Task, highlights: Model.IHighlight[] = []) { super(highlights); - this.task = task; + this._task = _task; } public getLabel(): string { - return this.task.name; + return this._task.name; } public getAriaLabel(): string { return nls.localize('entryAriaLabel', "{0}, tasks", this.getLabel()); } + + public get task(): Task { + return this._task; + } } export class TaskGroupEntry extends Model.QuickOpenEntryGroup { @@ -112,4 +118,53 @@ export abstract class QuickOpenHandler extends Quickopen.QuickOpenHandler { autoFocusFirstEntry: !!input }; } +} + +class CustomizeTaskAction extends Action { + + private static ID = 'workbench.action.tasks.customizeTask'; + private static LABEL = nls.localize('customizeTask', "Customize Task"); + + constructor() { + super(CustomizeTaskAction.ID, CustomizeTaskAction.LABEL); + this.updateClass(); + } + + public updateClass(): void { + this.class = 'quick-open-sidebyside-vertical'; + } + + public run(context: any): TPromise { + return TPromise.as(false); + } +} + +export class QuickOpenActionContributor extends ActionBarContributor { + + constructor() { + super(); + } + + public hasActions(context: any): boolean { + const entry = this.getEntry(context); + + return !!entry; + } + + public getActions(context: any): IAction[] { + const actions: Action[] = []; + + const entry = this.getEntry(context); + if (entry && entry.task._source.kind === TaskSourceKind.Extension) { + actions.push(new CustomizeTaskAction()); + } + return actions; + } + + private getEntry(context: any): TaskEntry { + if (!context || !(context.element instanceof TaskEntry)) { + return undefined; + } + return context.element as TaskEntry; + } } \ No newline at end of file diff --git a/src/vs/workbench/parts/tasks/browser/restartQuickOpen.ts b/src/vs/workbench/parts/tasks/browser/restartQuickOpen.ts index 2c78bdac7e86a..95d4d2bd5dd90 100644 --- a/src/vs/workbench/parts/tasks/browser/restartQuickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/restartQuickOpen.ts @@ -24,7 +24,7 @@ class TaskEntry extends base.TaskEntry { if (mode === QuickOpen.Mode.PREVIEW) { return false; } - this.taskService.restart(this.task._id); + this.taskService.restart(this._task._id); return true; } } diff --git a/src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts b/src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts index f32f5d199f9fb..b6939d7a77ce8 100644 --- a/src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts @@ -26,7 +26,7 @@ class TaskEntry extends base.TaskEntry { if (mode === QuickOpen.Mode.PREVIEW) { return false; } - this.taskService.run(this.task); + this.taskService.run(this._task); return true; } } diff --git a/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.ts b/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.ts index 767e872a446fb..80fc424f5d083 100644 --- a/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.ts @@ -24,7 +24,7 @@ class TaskEntry extends base.TaskEntry { if (mode === QuickOpen.Mode.PREVIEW) { return false; } - this.taskService.terminate(this.task._id); + this.taskService.terminate(this._task._id); return true; } } diff --git a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts index 87feaedfd38d0..b06f6c15bf319 100644 --- a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts @@ -189,6 +189,21 @@ export interface BaseTaskRunnerConfiguration { */ echoCommand?: boolean; + /** + * Controls the behavior of the used terminal + */ + terminal?: { + /** + * The terminal should echo the run command. + */ + echo?: boolean; + /** + * Controls whether or not the terminal is reveal if a task + * is executed. + */ + reveal?: string; + }; + /** * If set to false the task name is added as an additional argument to the * command when executed. If set to true the task name is suppressed. If @@ -402,12 +417,19 @@ namespace ShellConfiguration { } namespace CommandConfiguration { + interface TerminalBehavior { + echo?: boolean; + reveal?: string; + } + interface BaseCommandConfiguationShape { command?: string; isShellCommand?: boolean | ShellConfiguration; args?: string[]; options?: ProcessConfig.CommandOptions; echoCommand?: boolean; + showOutput?: string; + terminal?: TerminalBehavior; taskSelector?: string; } @@ -417,6 +439,70 @@ namespace CommandConfiguration { linux?: BaseCommandConfiguationShape; } + export namespace TerminalBehavior { + export function from(this: void, config: BaseCommandConfiguationShape, context: ParseContext): Tasks.TerminalBehavior { + let echo: boolean = undefined; + let reveal: Tasks.RevealKind = undefined; + if (Types.isBoolean(config.echoCommand)) { + echo = config.echoCommand; + } + if (Types.isString(config.showOutput)) { + reveal = Tasks.RevealKind.fromString(config.showOutput); + } + if (config.terminal) { + if (Types.isBoolean(config.terminal.echo)) { + echo = config.terminal.echo; + } + if (Types.isString(config.terminal.reveal)) { + reveal = Tasks.RevealKind.fromString(config.terminal.reveal); + } + } + if (echo === void 0 && reveal === void 0) { + return undefined; + } + return { echo, reveal }; + } + + export function merge(target: Tasks.TerminalBehavior, source: Tasks.TerminalBehavior): Tasks.TerminalBehavior { + if (isEmpty(source)) { + return target; + } + if (isEmpty(target)) { + return source; + } + mergeProperty(target, source, 'echo'); + mergeProperty(target, source, 'reveal'); + return target; + } + + export function fillDefault(value: Tasks.TerminalBehavior): Tasks.TerminalBehavior { + if (value && Object.isFrozen(value)) { + return value; + } + if (value === void 0) { + return { echo: false, reveal: Tasks.RevealKind.Always }; + } + if (value.echo === void 0) { + value.echo = false; + } + if (value.reveal === void 0) { + value.reveal = Tasks.RevealKind.Always; + } + return value; + } + + export function freeze(value: Tasks.TerminalBehavior): void { + if (value === void 0) { + return; + } + Object.freeze(value); + } + + function isEmpty(this: void, value: Tasks.TerminalBehavior): boolean { + return !value || value.echo === void 0 && value.reveal === void 0; + } + } + export function from(this: void, config: CommandConfiguationShape, context: ParseContext): Tasks.CommandConfiguration { let result: Tasks.CommandConfiguration = fromBase(config, context); @@ -439,7 +525,7 @@ namespace CommandConfiguration { let result: Tasks.CommandConfiguration = { name: undefined, isShellCommand: undefined, - echo: undefined + terminal: undefined }; if (Types.isString(config.command)) { result.name = config.command; @@ -464,8 +550,9 @@ namespace CommandConfiguration { if (config.options !== void 0) { result.options = CommandOptions.from(config.options, context); } - if (Types.isBoolean(config.echoCommand)) { - result.echo = config.echoCommand; + let terminal = TerminalBehavior.from(config, context); + if (terminal) { + result.terminal = terminal; } if (Types.isString(config.taskSelector)) { result.taskSelector = config.taskSelector; @@ -474,11 +561,13 @@ namespace CommandConfiguration { } export function isEmpty(value: Tasks.CommandConfiguration): boolean { - return !value || value.name === void 0 && value.isShellCommand === void 0 && value.args === void 0 && CommandOptions.isEmpty(value.options) && value.echo === void 0; + return !value || value.name === void 0 && value.isShellCommand === void 0 && value.args === void 0 && CommandOptions.isEmpty(value.options) && value.terminal === void 0; } - export function onlyEcho(value: Tasks.CommandConfiguration): boolean { - return value && value.echo !== void 0 && value.name === void 0 && value.isShellCommand === void 0 && value.args === void 0 && CommandOptions.isEmpty(value.options); + export function onlyTerminalBehaviour(value: Tasks.CommandConfiguration): boolean { + return value && + value.terminal && (value.terminal.echo !== void 0 || value.terminal.reveal === void 0) && + value.name === void 0 && value.isShellCommand === void 0 && value.args === void 0 && CommandOptions.isEmpty(value.options); } export function merge(target: Tasks.CommandConfiguration, source: Tasks.CommandConfiguration): Tasks.CommandConfiguration { @@ -500,7 +589,7 @@ namespace CommandConfiguration { target.isShellCommand = source.isShellCommand; } - mergeProperty(target, source, 'echo'); + target.terminal = TerminalBehavior.merge(target.terminal, source.terminal); mergeProperty(target, source, 'taskSelector'); if (source.args !== void 0) { if (target.args === void 0) { @@ -520,9 +609,7 @@ namespace CommandConfiguration { if (value.name !== void 0 && value.isShellCommand === void 0) { value.isShellCommand = false; } - if (value.echo === void 0) { - value.echo = false; - } + value.terminal = TerminalBehavior.fillDefault(value.terminal); if (value.args === void 0) { value.args = EMPTY_ARRAY; } @@ -539,6 +626,9 @@ namespace CommandConfiguration { if (value.options) { CommandOptions.freeze(value.options); } + if (value.terminal) { + TerminalBehavior.freeze(value.terminal); + } if (ShellConfiguration.is(value.isShellCommand)) { ShellConfiguration.freeze(value.isShellCommand); } @@ -660,15 +750,16 @@ namespace TaskDescription { let problemMatchers = ProblemMatcherConverter.from(externalTask.problemMatcher, context); let command: Tasks.CommandConfiguration = externalTask.command !== void 0 ? CommandConfiguration.from(externalTask, context) - : externalTask.echoCommand !== void 0 ? { name: undefined, isShellCommand: undefined, echo: !!externalTask.echoCommand } : undefined; + : externalTask.echoCommand !== void 0 + ? { name: undefined, isShellCommand: undefined, terminal: CommandConfiguration.TerminalBehavior.from(externalTask, context) } + : undefined; let identifer = Types.isString(externalTask.identifier) ? externalTask.identifier : taskName; let task: Tasks.Task = { _id: UUID.generateUuid(), _source: source, name: taskName, identifier: identifer, - command, - showOutput: undefined + command }; if (externalTask.command === void 0 && Types.isStringArray(externalTask.args)) { task.args = externalTask.args.slice(); @@ -682,9 +773,6 @@ namespace TaskDescription { if (externalTask.promptOnClose !== void 0) { task.promptOnClose = !!externalTask.promptOnClose; } - if (Types.isString(externalTask.showOutput)) { - task.showOutput = Tasks.ShowOutput.fromString(externalTask.showOutput); - } if (externalTask.command !== void 0) { // if the task has its own command then we suppress the // task name by default. @@ -793,13 +881,13 @@ namespace TaskDescription { if (CommandConfiguration.isEmpty(task.command) && !CommandConfiguration.isEmpty(globals.command) && globals.command.name !== void 0) { task.command = globals.command; } - if (CommandConfiguration.onlyEcho(task.command)) { + if (CommandConfiguration.onlyTerminalBehaviour(task.command)) { // The globals can have a echo set which would override the local echo // Saves the need of a additional fill method. But might be necessary // at some point. - let oldEcho = task.command.echo; + let oldTerminal = Objects.clone(task.command.terminal); CommandConfiguration.merge(task.command, globals.command); - task.command.echo = oldEcho; + task.command.terminal = oldTerminal; } } // promptOnClose is inferred from isBackground if available @@ -809,9 +897,6 @@ namespace TaskDescription { if (task.suppressTaskName === void 0 && globals.suppressTaskName !== void 0) { task.suppressTaskName = globals.suppressTaskName; } - if (task.showOutput === void 0 && globals.showOutput !== void 0) { - task.showOutput = globals.showOutput; - } } export function fillDefaults(task: Tasks.Task): void { @@ -828,9 +913,6 @@ namespace TaskDescription { if (task.isBackground === void 0) { task.isBackground = false; } - if (task.showOutput === void 0) { - task.showOutput = Tasks.ShowOutput.Always; - } if (task.problemMatchers === void 0) { task.problemMatchers = EMPTY_ARRAY; } @@ -876,7 +958,6 @@ namespace TaskDescription { mergeProperty(target, source, 'args'); mergeProperty(target, source, 'isBackground'); mergeProperty(target, source, 'promptOnClose'); - mergeProperty(target, source, 'showOutput'); mergeProperty(target, source, 'dependsOn'); mergeProperty(target, source, 'problemMatchers'); return target; @@ -887,7 +968,6 @@ interface Globals { command?: Tasks.CommandConfiguration; promptOnClose?: boolean; suppressTaskName?: boolean; - showOutput?: Tasks.ShowOutput; } namespace Globals { @@ -916,9 +996,6 @@ namespace Globals { export function fromBase(this: void, config: BaseTaskRunnerConfiguration, context: ParseContext): Globals { let result: Globals = {}; - if (Types.isString(config.showOutput)) { - result.showOutput = Tasks.ShowOutput.fromString(config.showOutput); - } if (config.suppressTaskName !== void 0) { result.suppressTaskName = !!config.suppressTaskName; } @@ -929,7 +1006,7 @@ namespace Globals { } export function isEmpty(value: Globals): boolean { - return !value || value.command === void 0 && value.promptOnClose === void 0 && value.showOutput === void 0 && value.suppressTaskName === void 0; + return !value || value.command === void 0 && value.promptOnClose === void 0 && value.suppressTaskName === void 0; } export function merge(target: Globals, source: Globals): Globals { @@ -941,7 +1018,6 @@ namespace Globals { } mergeProperty(target, source, 'promptOnClose'); mergeProperty(target, source, 'suppressTaskName'); - mergeProperty(target, source, 'showOutput'); return target; } @@ -952,9 +1028,6 @@ namespace Globals { if (value.suppressTaskName === void 0) { value.suppressTaskName = false; } - if (value.showOutput === void 0) { - value.showOutput = Tasks.ShowOutput.Always; - } if (value.promptOnClose === void 0) { value.promptOnClose = true; } @@ -1059,7 +1132,6 @@ class ConfigurationParser { group: Tasks.TaskGroup.Build, command: undefined, isBackground: isBackground, - showOutput: undefined, suppressTaskName: true, // this must be true since we infer the task from the global data. problemMatchers: matchers }; diff --git a/src/vs/workbench/parts/tasks/common/taskTemplates.ts b/src/vs/workbench/parts/tasks/common/taskTemplates.ts index d153e7849351f..0d7253582b885 100644 --- a/src/vs/workbench/parts/tasks/common/taskTemplates.ts +++ b/src/vs/workbench/parts/tasks/common/taskTemplates.ts @@ -179,8 +179,13 @@ const command: TaskEntry = { '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', '\t// for the documentation about the tasks.json format', '\t"version": "2.0.0",', - '\t"command": "echo \"Hello World\"",', - '\t"isShellCommand": true,', + '\t"tasks": [', + '\t\t{', + '\t\t\t"taskName": "echo",', + '\t\t\t"command": "echo Hello",', + '\t\t\t"isShellCommand": true', + '\t\t}', + '\t]', '}' ].join('\n') }; diff --git a/src/vs/workbench/parts/tasks/common/tasks.ts b/src/vs/workbench/parts/tasks/common/tasks.ts index c7b3d4ebf9b72..4b3031da91fd2 100644 --- a/src/vs/workbench/parts/tasks/common/tasks.ts +++ b/src/vs/workbench/parts/tasks/common/tasks.ts @@ -41,6 +41,52 @@ export namespace ShellConfiguration { } } +export enum RevealKind { + /** + * Always brings the terminal to front if the task is executed. + */ + Always = 1, + + /** + * Only brings the terminal to front if a problem is detected executing the task + * (e.g. the task couldn't be started because). + */ + Silent = 2, + + /** + * The terminal never comes to front when the task is executed. + */ + Never = 3 +} + +export namespace RevealKind { + export function fromString(value: string): RevealKind { + switch (value.toLowerCase()) { + case 'always': + return RevealKind.Always; + case 'silent': + return RevealKind.Silent; + case 'never': + return RevealKind.Never; + default: + return RevealKind.Always; + } + } +} + +export interface TerminalBehavior { + /** + * Controls whether the terminal executing a task is brought to front or not. + * Defaults to `RevealKind.Always`. + */ + reveal: RevealKind; + + /** + * Controls whether the executed command is printed to the output window or terminal as well. + */ + echo: boolean; +} + export interface CommandConfiguration { /** * The command to execute @@ -68,30 +114,9 @@ export interface CommandConfiguration { taskSelector?: string; /** - * Controls whether the executed command is printed to the output windows as well. + * Describes how the terminal is supposed to behave. */ - echo: boolean; -} - -export enum ShowOutput { - Always = 1, - Silent = 2, - Never = 3 -} - -export namespace ShowOutput { - export function fromString(value: string): ShowOutput { - value = value.toLowerCase(); - if (value === 'always') { - return ShowOutput.Always; - } else if (value === 'silent') { - return ShowOutput.Silent; - } else if (value === 'never') { - return ShowOutput.Never; - } else { - return undefined; - } - } + terminal: TerminalBehavior; } export namespace TaskGroup { @@ -177,12 +202,6 @@ export interface Task { */ promptOnClose?: boolean; - /** - * Controls whether the output of the running tasks is shown or not. Default - * value is "always". - */ - showOutput: ShowOutput; - /** * The other tasks this task depends on. */ diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index ac6c9429c5521..98b390f2f21ff 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -65,11 +65,12 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IOutputService, IOutputChannelRegistry, Extensions as OutputExt, IOutputChannel } from 'vs/workbench/parts/output/common/output'; +import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions } from 'vs/workbench/browser/actionBarRegistry'; import { ITerminalService } from 'vs/workbench/parts/terminal/common/terminal'; import { ITaskSystem, ITaskResolver, ITaskSummary, ITaskExecuteResult, TaskExecuteKind, TaskError, TaskErrors, TaskSystemEvents } from 'vs/workbench/parts/tasks/common/taskSystem'; -import { Task, TaskSet, TaskGroup, ExecutionEngine, ShowOutput, TaskSourceKind } from 'vs/workbench/parts/tasks/common/tasks'; +import { Task, TaskSet, TaskGroup, ExecutionEngine, TaskSourceKind } from 'vs/workbench/parts/tasks/common/tasks'; import { ITaskService, TaskServiceEvents, ITaskProvider } from 'vs/workbench/parts/tasks/common/taskService'; import { templates as taskTemplates } from 'vs/workbench/parts/tasks/common/taskTemplates'; @@ -77,6 +78,7 @@ import * as TaskConfig from 'vs/workbench/parts/tasks/common/taskConfiguration'; import { ProcessTaskSystem } from 'vs/workbench/parts/tasks/node/processTaskSystem'; import { TerminalTaskSystem } from './terminalTaskSystem'; import { ProcessRunnerDetector } from 'vs/workbench/parts/tasks/node/processRunnerDetector'; +import { QuickOpenActionContributor } from '../browser/quickOpen'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -758,7 +760,6 @@ class TaskService extends EventEmitter implements ITaskService { identifier: id, dependsOn: primaryTasks.map(task => task._id), command: undefined, - showOutput: ShowOutput.Never }; return { task, resolver }; } @@ -867,30 +868,32 @@ class TaskService extends EventEmitter implements ITaskService { } private getTaskSets(): TPromise { - return new TPromise((resolve, reject) => { - let result: TaskSet[] = []; - let counter: number = 0; - let done = (value: TaskSet) => { - if (value) { - result.push(value); - } - if (--counter === 0) { - resolve(result); - } - }; - let error = () => { - if (--counter === 0) { + return this.extensionService.activateByEvent('onCommand:workbench.action.tasks.runTask').then(() => { + return new TPromise((resolve, reject) => { + let result: TaskSet[] = []; + let counter: number = 0; + let done = (value: TaskSet) => { + if (value) { + result.push(value); + } + if (--counter === 0) { + resolve(result); + } + }; + let error = () => { + if (--counter === 0) { + resolve(result); + } + }; + if (this.getExecutionEngine() === ExecutionEngine.Terminal && this._providers.size > 0) { + this._providers.forEach((provider) => { + counter++; + provider.provideTasks().done(done, error); + }); + } else { resolve(result); } - }; - if (this.getExecutionEngine() === ExecutionEngine.Terminal && this._providers.size > 0) { - this._providers.forEach((provider) => { - counter++; - provider.provideTasks().done(done, error); - }); - } else { - resolve(result); - } + }); }).then((result) => { return this.getWorkspaceTasks().then((workspaceTaskResult) => { let workspaceTasksToDelete: Task[] = []; @@ -1018,10 +1021,7 @@ class TaskService extends EventEmitter implements ITaskService { configPromise = TPromise.as({ config, hasErrors: false }); } } else { - configPromise = new ProcessRunnerDetector(this.fileService, this.contextService, this.configurationResolverService).detect(true).then((value) => { - let hasErrors = this.printStderr(value.stderr); - return { config: value.config, hasErrors }; - }); + configPromise = TPromise.as({ config, hasErrors: false }); } } return configPromise.then((resolved) => { @@ -1326,6 +1326,9 @@ quickOpenRegistry.registerQuickOpenHandler( ) ); +const actionBarRegistry = Registry.as(ActionBarExtensions.Actionbar); +actionBarRegistry.registerActionBarContributor(Scope.VIEWER, QuickOpenActionContributor); + // Status bar let statusbarRegistry = Registry.as(StatusbarExtensions.Statusbar); statusbarRegistry.registerStatusbarItem(new StatusbarItemDescriptor(StatusBarItem, StatusbarAlignment.LEFT, 50 /* Medium Priority */)); diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index 00b2950731fc9..504d0114385e2 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -33,7 +33,7 @@ import { IConfigurationResolverService } from 'vs/workbench/services/configurati import { ITerminalService, ITerminalInstance, IShellLaunchConfig } from 'vs/workbench/parts/terminal/common/terminal'; import { IOutputService, IOutputChannel } from 'vs/workbench/parts/output/common/output'; import { StartStopProblemCollector, WatchingProblemCollector, ProblemCollectorEvents } from 'vs/workbench/parts/tasks/common/problemCollectors'; -import { Task, ShowOutput, CommandOptions, ShellConfiguration } from 'vs/workbench/parts/tasks/common/tasks'; +import { Task, RevealKind, CommandOptions, ShellConfiguration } from 'vs/workbench/parts/tasks/common/tasks'; import { ITaskSystem, ITaskSummary, ITaskExecuteResult, TaskExecuteKind, TaskError, TaskErrors, ITaskResolver, TelemetryEvent, Triggers, TaskSystemEvents, TaskEvent, TaskType @@ -134,7 +134,8 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { public run(task: Task, resolver: ITaskResolver, trigger: string = Triggers.command): ITaskExecuteResult { let terminalData = this.activeTasks[task._id]; if (terminalData && terminalData.promise) { - if (task.showOutput === ShowOutput.Always) { + let reveal = task.command.terminal.reveal; + if (reveal === RevealKind.Always) { terminalData.terminal.setVisible(true); } return { kind: TaskExecuteKind.Active, active: { same: true, background: task.isBackground }, promise: terminalData.promise }; @@ -288,7 +289,8 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { this.emit(TaskSystemEvents.Inactive, event); } eventCounter = 0; - if (exitCode && exitCode === 1 && watchingProblemMatcher.numberOfMatches === 0 && task.showOutput !== ShowOutput.Never) { + let reveal = task.command.terminal.reveal; + if (exitCode && exitCode === 1 && watchingProblemMatcher.numberOfMatches === 0 && reveal !== RevealKind.Never) { this.terminalService.setActiveInstance(terminal); this.terminalService.showPanel(false); } @@ -330,7 +332,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { }); } this.terminalService.setActiveInstance(terminal); - if (task.showOutput === ShowOutput.Always) { + if (task.command.terminal.reveal === RevealKind.Always) { this.terminalService.showPanel(false); } this.activeTasks[task._id] = { terminal, task, promise }; @@ -364,7 +366,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { let options = this.resolveOptions(task.command.options); let { command, args } = this.resolveCommandAndArgs(task); let terminalName = nls.localize('TerminalTaskSystem.terminalName', 'Task - {0}', task.name); - let waitOnExit = task.showOutput !== ShowOutput.Never || !task.isBackground; + let waitOnExit = task.command.terminal.reveal !== RevealKind.Never || !task.isBackground; let shellLaunchConfig: IShellLaunchConfig = undefined; if (task.command.isShellCommand) { if (Platform.isWindows && ((options.cwd && TPath.isUNC(options.cwd)) || (!options.cwd && TPath.isUNC(process.cwd())))) { @@ -413,7 +415,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { }); shellArgs.push(commandLine); shellLaunchConfig.args = Platform.isWindows ? shellArgs.join(' ') : shellArgs; - if (task.command.echo) { + if (task.command.terminal.echo) { shellLaunchConfig.initialText = `> ${commandLine}`; } } else { @@ -427,7 +429,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { args, waitOnExit }; - if (task.command.echo) { + if (task.command.terminal.echo) { let getArgsToEcho = (args: string | string[]): string => { if (!args || args.length === 0) { return ''; diff --git a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts index 9cc26f22205dd..848368e6dc491 100644 --- a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts @@ -29,7 +29,7 @@ import { StartStopProblemCollector, WatchingProblemCollector, ProblemCollectorEv import { ITaskSystem, ITaskSummary, ITaskExecuteResult, TaskExecuteKind, TaskError, TaskErrors, TelemetryEvent, Triggers, TaskSystemEvents, TaskEvent, TaskType } from 'vs/workbench/parts/tasks/common/taskSystem'; -import { Task, CommandOptions, ShowOutput, CommandConfiguration } from 'vs/workbench/parts/tasks/common/tasks'; +import { Task, CommandOptions, RevealKind, CommandConfiguration } from 'vs/workbench/parts/tasks/common/tasks'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; @@ -178,11 +178,12 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem { this.childProcess = new LineProcess(command, args, !!commandConfig.isShellCommand, this.resolveOptions(commandConfig.options)); telemetryEvent.command = this.childProcess.getSanitizedCommand(); // we have no problem matchers defined. So show the output log - if (task.showOutput === ShowOutput.Always || (task.showOutput === ShowOutput.Silent && task.problemMatchers.length === 0)) { + let reveal = task.command.terminal.reveal; + if (reveal === RevealKind.Always || (reveal === RevealKind.Silent && task.problemMatchers.length === 0)) { this.showOutput(); } - if (commandConfig.echo) { + if (commandConfig.terminal.echo) { let prompt: string = Platform.isWindows ? '>' : '$'; this.log(`running command${prompt} ${command} ${args.join(' ')}`); } @@ -214,7 +215,7 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem { if (!this.checkTerminated(task, success)) { this.log(nls.localize('TaskRunnerSystem.watchingBuildTaskFinished', '\nWatching build tasks has finished.')); } - if (success.cmdCode && success.cmdCode === 1 && watchingProblemMatcher.numberOfMatches === 0 && task.showOutput !== ShowOutput.Never) { + if (success.cmdCode && success.cmdCode === 1 && watchingProblemMatcher.numberOfMatches === 0 && reveal !== RevealKind.Never) { this.showOutput(); } taskSummary.exitCode = success.cmdCode; @@ -258,7 +259,7 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem { startStopProblemMatcher.dispose(); this.checkTerminated(task, success); this.emit(TaskSystemEvents.Inactive, event); - if (success.cmdCode && success.cmdCode === 1 && startStopProblemMatcher.numberOfMatches === 0 && task.showOutput !== ShowOutput.Never) { + if (success.cmdCode && success.cmdCode === 1 && startStopProblemMatcher.numberOfMatches === 0 && reveal !== RevealKind.Never) { this.showOutput(); } taskSummary.exitCode = success.cmdCode; diff --git a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts index 40ef9ddda1d87..091899e941a92 100644 --- a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts +++ b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts @@ -68,10 +68,32 @@ class ConfiguationBuilder { } } +class TerminalBehaviorBuilder { + + public result: Tasks.TerminalBehavior; + + constructor(public parent: CommandConfigurationBuilder) { + this.result = { echo: false, reveal: Tasks.RevealKind.Always }; + } + + public echo(value: boolean): TerminalBehaviorBuilder { + this.result.echo = value; + return this; + } + + public reveal(value: Tasks.RevealKind): TerminalBehaviorBuilder { + this.result.reveal = value; + return this; + } +} + class CommandConfigurationBuilder { public result: Tasks.CommandConfiguration; + private terminalBuilder: TerminalBehaviorBuilder; + constructor(public parent: TaskBuilder, command: string) { + this.terminalBuilder = new TerminalBehaviorBuilder(this); this.result = { name: command, isShellCommand: false, @@ -79,7 +101,7 @@ class CommandConfigurationBuilder { options: { cwd: '${workspaceRoot}' }, - echo: false + terminal: this.terminalBuilder.result }; } @@ -103,15 +125,14 @@ class CommandConfigurationBuilder { return this; } - public echo(value: boolean): CommandConfigurationBuilder { - this.result.echo = value; - return this; - } - public taskSelector(value: string): CommandConfigurationBuilder { this.result.taskSelector = value; return this; } + + public terminal(): TerminalBehaviorBuilder { + return this.terminalBuilder; + } } class TaskBuilder { @@ -127,7 +148,6 @@ class TaskBuilder { identifier: name, name: name, command: this.commandBuilder.result, - showOutput: Tasks.ShowOutput.Always, suppressTaskName: false, isBackground: false, promptOnClose: true, @@ -150,11 +170,6 @@ class TaskBuilder { return this; } - public showOutput(value: Tasks.ShowOutput): TaskBuilder { - this.result.showOutput = value; - return this; - } - public suppressTaskName(value: boolean): TaskBuilder { this.result.suppressTaskName = value; return this; @@ -401,7 +416,6 @@ function assertTask(actual: Tasks.Task, expected: Tasks.Task) { assert.ok(actual._id); assert.strictEqual(actual.name, expected.name, 'name'); assertCommandConfiguration(actual.command, expected.command); - assert.strictEqual(actual.showOutput, expected.showOutput, 'showOutput'); assert.strictEqual(actual.suppressTaskName, expected.suppressTaskName, 'suppressTaskName'); assert.strictEqual(actual.isBackground, expected.isBackground, 'isBackground'); assert.strictEqual(actual.promptOnClose, expected.promptOnClose, 'promptOnClose'); @@ -417,6 +431,7 @@ function assertTask(actual: Tasks.Task, expected: Tasks.Task) { function assertCommandConfiguration(actual: Tasks.CommandConfiguration, expected: Tasks.CommandConfiguration) { assert.strictEqual(typeof actual, typeof expected); if (actual && expected) { + assertTerminalBehavior(actual.terminal, expected.terminal); assert.strictEqual(actual.name, expected.name, 'name'); assert.strictEqual(actual.isShellCommand, expected.isShellCommand, 'isShellCommand'); assert.deepEqual(actual.args, expected.args, 'args'); @@ -428,11 +443,18 @@ function assertCommandConfiguration(actual: Tasks.CommandConfiguration, expected assert.deepEqual(actual.options.env, expected.options.env, 'env'); } } - assert.strictEqual(actual.echo, expected.echo, 'echo'); assert.strictEqual(actual.taskSelector, expected.taskSelector, 'taskSelector'); } } +function assertTerminalBehavior(actual: Tasks.TerminalBehavior, expected: Tasks.TerminalBehavior) { + assert.strictEqual(typeof actual, typeof expected); + if (actual && expected) { + assert.strictEqual(actual.echo, expected.echo); + assert.strictEqual(actual.reveal, expected.reveal); + } +} + function assertProblemMatcher(actual: string | ProblemMatcher, expected: string | ProblemMatcher) { assert.strictEqual(typeof actual, typeof expected); if (typeof actual === 'string' && typeof expected === 'string') { @@ -525,7 +547,7 @@ suite('Tasks Configuration parsing tests', () => { task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). suppressTaskName(true). - showOutput(Tasks.ShowOutput.Silent); + command().terminal().reveal(Tasks.RevealKind.Silent); testConfiguration( { version: '0.1.0', @@ -590,7 +612,7 @@ suite('Tasks Configuration parsing tests', () => { task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). suppressTaskName(true). - showOutput(Tasks.ShowOutput.Never); + command().terminal().reveal(Tasks.RevealKind.Never); testConfiguration( { version: '0.1.0', @@ -607,7 +629,7 @@ suite('Tasks Configuration parsing tests', () => { task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). suppressTaskName(true). - command(). + command().terminal(). echo(true); testConfiguration( { @@ -759,8 +781,8 @@ suite('Tasks Configuration parsing tests', () => { builder. task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). - showOutput(Platform.isWindows ? Tasks.ShowOutput.Always : Tasks.ShowOutput.Never). - suppressTaskName(true); + suppressTaskName(true). + command().terminal().reveal(Platform.isWindows ? Tasks.RevealKind.Always : Tasks.RevealKind.Never); let external: ExternalTaskRunnerConfiguration = { version: '0.1.0', command: 'tsc', @@ -778,7 +800,7 @@ suite('Tasks Configuration parsing tests', () => { task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). suppressTaskName(true). - command(). + command().terminal(). echo(Platform.isWindows ? false : true); let external: ExternalTaskRunnerConfiguration = { version: '0.1.0', @@ -903,12 +925,11 @@ suite('Tasks Configuration parsing tests', () => { let builder = new ConfiguationBuilder(); builder.task('test', 'tsc'). group(Tasks.TaskGroup.Test). - showOutput(Tasks.ShowOutput.Never). args(['--p']). isBackground(true). promptOnClose(false). - command(). - echo(true); + command().terminal(). + echo(true).reveal(Tasks.RevealKind.Never); testConfiguration(external, builder); }); @@ -928,9 +949,8 @@ suite('Tasks Configuration parsing tests', () => { let builder = new ConfiguationBuilder(); builder.task('test', 'tsc'). group(Tasks.TaskGroup.Test). - showOutput(Tasks.ShowOutput.Never). - command(). - echo(true); + command().terminal(). + echo(true).reveal(Tasks.RevealKind.Never); testConfiguration(external, builder); }); @@ -1392,15 +1412,17 @@ suite('Bugs / regression tests', () => { let builder = new ConfiguationBuilder(); if (Platform.isWindows) { builder.task('composeForDebug', 'powershell'). - suppressTaskName(true).showOutput(Tasks.ShowOutput.Always). + suppressTaskName(true). args(['-ExecutionPolicy', 'RemoteSigned', '.\\dockerTask.ps1', '-ComposeForDebug', '-Environment', 'debug']). - command().echo(true).options({ cwd: '${workspaceRoot}' }); + command().options({ cwd: '${workspaceRoot}' }). + terminal().echo(true).reveal(Tasks.RevealKind.Always); testConfiguration(external, builder); } else if (Platform.isMacintosh) { builder.task('composeForDebug', '/bin/bash'). - suppressTaskName(true).showOutput(Tasks.ShowOutput.Always). + suppressTaskName(true). args(['-c', './dockerTask.sh composeForDebug debug']). - command().options({ cwd: '${workspaceRoot}' }); + command().options({ cwd: '${workspaceRoot}' }). + terminal().reveal(Tasks.RevealKind.Always); testConfiguration(external, builder); } }); From 92adbb1bb7ac699d8d487a84d417758539717da7 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 24 May 2017 12:41:57 +0200 Subject: [PATCH 0983/2747] update service: get initial state --- src/vs/platform/update/common/updateIpc.ts | 25 +++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/vs/platform/update/common/updateIpc.ts b/src/vs/platform/update/common/updateIpc.ts index 2076719e98a9b..cb48952d2b3cf 100644 --- a/src/vs/platform/update/common/updateIpc.ts +++ b/src/vs/platform/update/common/updateIpc.ts @@ -7,7 +7,9 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IChannel, eventToCall, eventFromCall } from 'vs/base/parts/ipc/common/ipc'; -import Event from 'vs/base/common/event'; +import Event, { Emitter, any, mapEvent } from 'vs/base/common/event'; +import { onUnexpectedError } from 'vs/base/common/errors'; +import { memoize } from 'vs/base/common/decorators'; import { IUpdateService, IRawUpdate, State, IUpdate } from './update'; export interface IUpdateChannel extends IChannel { @@ -18,6 +20,7 @@ export interface IUpdateChannel extends IChannel { call(command: 'event:onStateChange'): TPromise; call(command: 'checkForUpdates', arg: boolean): TPromise; call(command: 'quitAndInstall'): TPromise; + call(command: '_getInitialState'): TPromise; call(command: string, arg?: any): TPromise; } @@ -34,6 +37,7 @@ export class UpdateChannel implements IUpdateChannel { case 'event:onStateChange': return eventToCall(this.service.onStateChange); case 'checkForUpdates': return this.service.checkForUpdates(arg); case 'quitAndInstall': return this.service.quitAndInstall(); + case '_getInitialState': return TPromise.as(this.service.state); } return undefined; } @@ -55,14 +59,25 @@ export class UpdateChannelClient implements IUpdateService { private _onUpdateReady = eventFromCall(this.channel, 'event:onUpdateReady'); get onUpdateReady(): Event { return this._onUpdateReady; } - private _onStateChange = eventFromCall(this.channel, 'event:onStateChange'); - get onStateChange(): Event { return this._onStateChange; } + private _onInitialStateChange = new Emitter(); + private _onRemoteStateChange = eventFromCall(this.channel, 'event:onStateChange'); + + @memoize + get onStateChange(): Event { + const result = any(this._onInitialStateChange.event, this._onRemoteStateChange); + + return mapEvent(result, state => { + this._state = state; + return state; + }); + } private _state: State = State.Uninitialized; get state(): State { return this._state; }; - constructor(private channel: IChannel) { - this.onStateChange(state => this._state = state); + constructor(private channel: IUpdateChannel) { + channel.call('_getInitialState') + .done(state => this._onInitialStateChange.fire(state), onUnexpectedError); } checkForUpdates(explicit: boolean): TPromise { From 48968ba1f3cca8c67a7504954c5236e63c3a75be Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 24 May 2017 13:02:51 +0200 Subject: [PATCH 0984/2747] theming: extension buttons --- .../extensions/browser/extensionsActions.ts | 66 +++++++++++++++++-- .../browser/media/extensionActions.css | 59 ----------------- 2 files changed, 62 insertions(+), 63 deletions(-) diff --git a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts index 47ccf37113e05..3b557abaf33cf 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts @@ -32,13 +32,16 @@ import { IExtensionService, IExtensionDescription } from 'vs/platform/extensions import URI from 'vs/base/common/uri'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { registerThemingParticipant, ITheme, ICssStyleCollector } from "vs/platform/theme/common/themeService"; +import { buttonBackground, buttonForeground, buttonHoverBackground, contrastBorder, registerColor } from "vs/platform/theme/common/colorRegistry"; +import { Color } from "vs/base/common/color"; export class InstallAction extends Action { private static InstallLabel = localize('installAction', "Install"); private static InstallingLabel = localize('installing', "Installing"); - private static Class = 'extension-action install'; + private static Class = 'extension-action prominent install'; private static InstallingClass = 'extension-action install installing'; private disposables: IDisposable[] = []; @@ -153,7 +156,7 @@ export class UninstallAction extends Action { export class CombinedInstallAction extends Action { - private static NoExtensionClass = 'extension-action install no-extension'; + private static NoExtensionClass = 'extension-action prominent install no-extension'; private installAction: InstallAction; private uninstallAction: UninstallAction; private disposables: IDisposable[] = []; @@ -224,7 +227,7 @@ export class CombinedInstallAction extends Action { export class UpdateAction extends Action { - private static EnabledClass = 'extension-action update'; + private static EnabledClass = 'extension-action prominent update'; private static DisabledClass = `${UpdateAction.EnabledClass} disabled`; private static Label = localize('updateAction', "Update"); @@ -477,7 +480,7 @@ export class EnableGloballyAction extends Action implements IExtensionAction { export class EnableAction extends Action { static ID = 'extensions.enable'; - private static EnabledClass = 'extension-action enable'; + private static EnabledClass = 'extension-action prominent enable'; private static DisabledClass = `${EnableAction.EnabledClass} disabled`; private disposables: IDisposable[] = []; @@ -1385,3 +1388,58 @@ CommandsRegistry.registerCommand('workbench.extensions.action.showLanguageExtens viewlet.focus(); }); }); + +export const extensionButtonProminentBackground = registerColor('extensionButton.prominentBackground', { + dark: '#327e36', + light: '#327e36', + hc: null +}, localize('extensionButtonProminentBackground', "Button background color for actions extension that stand out (e.g. install button).")); + +export const extensionButtonProminentForeground = registerColor('extensionButton.prominentForeground', { + dark: Color.white, + light: Color.white, + hc: null +}, localize('extensionButtonProminentForeground', "Button foreground color for actions extension that stand out (e.g. install button).")); + +export const extensionButtonProminentHoverBackground = registerColor('extensionButton.prominentHoverBackground', { + dark: '#28632b', + light: '#28632b', + hc: null +}, localize('extensionButtonProminentHoverBackground', "Button background hover color for actions extension that stand out (e.g. install button).")); + +registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { + const buttonBackgroundColor = theme.getColor(buttonBackground); + if (buttonBackgroundColor) { + collector.addRule(`.monaco-action-bar .action-item .action-label.extension-action { background-color: ${buttonBackgroundColor}; }`); + } + + const buttonForegroundColor = theme.getColor(buttonForeground); + if (buttonForegroundColor) { + collector.addRule(`.monaco-action-bar .action-item .action-label.extension-action { color: ${buttonForegroundColor}; }`); + } + + const buttonHoverBackgroundColor = theme.getColor(buttonHoverBackground); + if (buttonHoverBackgroundColor) { + collector.addRule(`.monaco-action-bar .action-item:hover .action-label.extension-action { background-color: ${buttonHoverBackgroundColor}; }`); + } + + const contrastBorderColor = theme.getColor(contrastBorder); + if (contrastBorderColor) { + collector.addRule(`.monaco-action-bar .action-item .action-label.extension-action { border: 1px solid ${contrastBorderColor}; }`); + } + + const extensionButtonProminentBackgroundColor = theme.getColor(extensionButtonProminentBackground); + if (extensionButtonProminentBackground) { + collector.addRule(`.monaco-action-bar .action-item .action-label.extension-action.prominent { background-color: ${extensionButtonProminentBackgroundColor}; }`); + } + + const extensionButtonProminentForegroundColor = theme.getColor(extensionButtonProminentForeground); + if (extensionButtonProminentForeground) { + collector.addRule(`.monaco-action-bar .action-item .action-label.extension-action.prominent { color: ${extensionButtonProminentForegroundColor}; }`); + } + + const extensionButtonProminentHoverBackgroundColor = theme.getColor(extensionButtonProminentHoverBackground); + if (extensionButtonProminentHoverBackground) { + collector.addRule(`.monaco-action-bar .action-item:hover .action-label.extension-action.prominent { background-color: ${extensionButtonProminentHoverBackgroundColor}; }`); + } +}); \ No newline at end of file diff --git a/src/vs/workbench/parts/extensions/browser/media/extensionActions.css b/src/vs/workbench/parts/extensions/browser/media/extensionActions.css index 5a51986dce882..e80db60cdef0e 100644 --- a/src/vs/workbench/parts/extensions/browser/media/extensionActions.css +++ b/src/vs/workbench/parts/extensions/browser/media/extensionActions.css @@ -4,69 +4,10 @@ *--------------------------------------------------------------------------------------------*/ .monaco-action-bar .action-item .action-label.extension-action { - border: 1px solid #CCC; - color: #6C6C6C; - background-color: #E2E2E2; padding: 0 5px; line-height: initial; } -.monaco-action-bar .action-item:not(.disabled):hover .action-label.extension-action { - background-color: #D9D9D9; -} - -.monaco-action-bar .action-item:not(.disabled):active .action-label.extension-action { - background-color: #C9C9C9; -} - -.vs-dark .monaco-action-bar .action-item .action-label.extension-action { - border: 1px solid #545454; - color: #CCC; - background-color: #3A3A3A; -} - -.vs-dark .monaco-action-bar .action-item:not(.disabled):hover .action-label.extension-action { - background-color: #464646; -} - -.vs-dark .monaco-action-bar .action-item:not(.disabled):active .action-label.extension-action { - background-color: #505050; -} - -.monaco-action-bar .action-item .action-label.extension-action.install, -.monaco-action-bar .action-item .action-label.extension-action.enable, -.monaco-action-bar .action-item .action-label.extension-action.update { - color: white; - background-color: #327e36; - border-color: #519A55; -} - -.monaco-action-bar .action-item:not(.disabled):hover .action-label.extension-action.install, -.monaco-action-bar .action-item:not(.disabled):hover .action-label.extension-action.enable, -.monaco-action-bar .action-item:not(.disabled):hover .action-label.extension-action.update { - background-color: #478E4B; -} - -.monaco-action-bar .action-item:not(.disabled):active .action-label.extension-action.install, -.monaco-action-bar .action-item:not(.disabled):active .action-label.extension-action.enable, -.monaco-action-bar .action-item:not(.disabled):active .action-label.extension-action.update { - background-color: #6DA770; -} - -.monaco-action-bar .action-item .action-label.extension-action.reload { - color: white; - background-color: #007ACC; - border-color: #3F8BCE; -} - -.monaco-action-bar .action-item:not(.disabled):hover .action-label.extension-action.reload { - background-color: #2584C4; -} - -.monaco-action-bar .action-item:not(.disabled):active .action-label.extension-action.reload { - background-color: #4294CC -} - .monaco-action-bar .action-item .action-label.clear-extensions { background: url('clear.svg') center center no-repeat; } From 68bf412dcd10bdb38a2e8ffb8f346605f17f68d3 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 24 May 2017 13:12:13 +0200 Subject: [PATCH 0985/2747] Add tests for PagedScreenReaderStrategy --- .../browser/controller/textAreaState.test.ts | 87 ++++++++++++++++++- 1 file changed, 86 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/test/browser/controller/textAreaState.test.ts b/src/vs/editor/test/browser/controller/textAreaState.test.ts index 2423f8d3836eb..1d2c76be87d76 100644 --- a/src/vs/editor/test/browser/controller/textAreaState.test.ts +++ b/src/vs/editor/test/browser/controller/textAreaState.test.ts @@ -5,10 +5,12 @@ 'use strict'; import * as assert from 'assert'; -import { ISimpleModel, TextAreaState, ITextAreaWrapper } from 'vs/editor/browser/controller/textAreaState'; +import { ISimpleModel, TextAreaState, ITextAreaWrapper, PagedScreenReaderStrategy } from 'vs/editor/browser/controller/textAreaState'; import { Range } from 'vs/editor/common/core/range'; import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; import { Disposable } from 'vs/base/common/lifecycle'; +import { Model } from "vs/editor/common/model/model"; +import { Selection } from 'vs/editor/common/core/selection'; export class MockTextAreaWrapper extends Disposable implements ITextAreaWrapper { @@ -488,6 +490,89 @@ suite('TextAreaState', () => { '⌨️', 0 ); }); + + suite('PagedScreenReaderStrategy', () => { + + function testPagedScreenReaderStrategy(lines: string[], selection: Selection, expected: TextAreaState): void { + const model = Model.createFromString(lines.join('\n')); + const actual = PagedScreenReaderStrategy.fromEditorSelection(TextAreaState.EMPTY, model, selection); + assert.ok(actual.equals(expected), actual); + model.dispose(); + } + + test('simple', () => { + testPagedScreenReaderStrategy( + [ + 'Hello world!' + ], + new Selection(1, 13, 1, 13), + new TextAreaState('Hello world!', 12, 12) + ); + + testPagedScreenReaderStrategy( + [ + 'Hello world!' + ], + new Selection(1, 1, 1, 1), + new TextAreaState('Hello world!', 0, 0) + ); + + testPagedScreenReaderStrategy( + [ + 'Hello world!' + ], + new Selection(1, 1, 1, 6), + new TextAreaState('Hello world!', 0, 5) + ); + }); + + test('multiline', () => { + testPagedScreenReaderStrategy( + [ + 'Hello world!', + 'How are you?' + ], + new Selection(1, 1, 1, 1), + new TextAreaState('Hello world!\nHow are you?', 0, 0) + ); + + testPagedScreenReaderStrategy( + [ + 'Hello world!', + 'How are you?' + ], + new Selection(2, 1, 2, 1), + new TextAreaState('Hello world!\nHow are you?', 13, 13) + ); + }); + + test('page', () => { + testPagedScreenReaderStrategy( + [ + 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' + ], + new Selection(1, 1, 1, 1), + new TextAreaState('L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10', 0, 0) + ); + + testPagedScreenReaderStrategy( + [ + 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' + ], + new Selection(11, 1, 11, 1), + new TextAreaState('L11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20', 0, 0) + ); + + testPagedScreenReaderStrategy( + [ + 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' + ], + new Selection(12, 1, 12, 1), + new TextAreaState('L11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20', 4, 4) + ); + }); + + }); }); class SimpleModel implements ISimpleModel { From 5f49f0979f83c8d91556c9108acc3893f997d765 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 24 May 2017 13:14:25 +0200 Subject: [PATCH 0986/2747] Add trailing new line to current page (if there is one) --- .../editor/browser/controller/textAreaState.ts | 3 +-- .../browser/controller/textAreaState.test.ts | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/browser/controller/textAreaState.ts b/src/vs/editor/browser/controller/textAreaState.ts index 41581a76cda44..d398f5101476c 100644 --- a/src/vs/editor/browser/controller/textAreaState.ts +++ b/src/vs/editor/browser/controller/textAreaState.ts @@ -6,7 +6,6 @@ import { Range } from 'vs/editor/common/core/range'; import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; -import { Constants } from 'vs/editor/common/core/uint'; import * as strings from 'vs/base/common/strings'; export interface ITextAreaWrapper { @@ -206,7 +205,7 @@ export class PagedScreenReaderStrategy { let offset = page * PagedScreenReaderStrategy._LINES_PER_PAGE; let startLineNumber = offset + 1; let endLineNumber = offset + PagedScreenReaderStrategy._LINES_PER_PAGE; - return new Range(startLineNumber, 1, endLineNumber, Constants.MAX_SAFE_SMALL_INTEGER); + return new Range(startLineNumber, 1, endLineNumber + 1, 1); } public static fromEditorSelection(previousState: TextAreaState, model: ISimpleModel, selection: Range): TextAreaState { diff --git a/src/vs/editor/test/browser/controller/textAreaState.test.ts b/src/vs/editor/test/browser/controller/textAreaState.test.ts index 1d2c76be87d76..9170690d5ec84 100644 --- a/src/vs/editor/test/browser/controller/textAreaState.test.ts +++ b/src/vs/editor/test/browser/controller/textAreaState.test.ts @@ -496,7 +496,7 @@ suite('TextAreaState', () => { function testPagedScreenReaderStrategy(lines: string[], selection: Selection, expected: TextAreaState): void { const model = Model.createFromString(lines.join('\n')); const actual = PagedScreenReaderStrategy.fromEditorSelection(TextAreaState.EMPTY, model, selection); - assert.ok(actual.equals(expected), actual); + assert.ok(actual.equals(expected)); model.dispose(); } @@ -552,7 +552,7 @@ suite('TextAreaState', () => { 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' ], new Selection(1, 1, 1, 1), - new TextAreaState('L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10', 0, 0) + new TextAreaState('L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\n', 0, 0) ); testPagedScreenReaderStrategy( @@ -560,7 +560,7 @@ suite('TextAreaState', () => { 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' ], new Selection(11, 1, 11, 1), - new TextAreaState('L11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20', 0, 0) + new TextAreaState('L11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\n', 0, 0) ); testPagedScreenReaderStrategy( @@ -568,7 +568,15 @@ suite('TextAreaState', () => { 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' ], new Selection(12, 1, 12, 1), - new TextAreaState('L11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20', 4, 4) + new TextAreaState('L11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\n', 4, 4) + ); + + testPagedScreenReaderStrategy( + [ + 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' + ], + new Selection(21, 1, 21, 1), + new TextAreaState('L21', 0, 0) ); }); From 667b8956597f130be0911020b27689c30e017637 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 24 May 2017 13:19:01 +0200 Subject: [PATCH 0987/2747] use process.hrtime for tick timers --- src/vs/base/node/startupTimers.d.ts | 6 +++--- src/vs/base/node/startupTimers.js | 16 +++++----------- .../electron-browser/bootstrap/index.js | 2 -- src/vs/workbench/electron-browser/shell.ts | 7 +------ 4 files changed, 9 insertions(+), 22 deletions(-) diff --git a/src/vs/base/node/startupTimers.d.ts b/src/vs/base/node/startupTimers.d.ts index c91175b02629c..5a04270f4b603 100644 --- a/src/vs/base/node/startupTimers.d.ts +++ b/src/vs/base/node/startupTimers.d.ts @@ -26,13 +26,13 @@ declare interface TickController { stop(stopped?: number): void; } -export function startTimer(name: string, started?: number): TickController; +export function startTimer(name: string): TickController; -export function stopTimer(name: string, stopped?: number); +export function stopTimer(name: string); export function ticks(): Tick[]; -export function tick(name:string):Tick; +export function tick(name: string): Tick; export function setProfileList(names: string[]): void; diff --git a/src/vs/base/node/startupTimers.js b/src/vs/base/node/startupTimers.js index 45637a77b5887..7fc81812efc1e 100644 --- a/src/vs/base/node/startupTimers.js +++ b/src/vs/base/node/startupTimers.js @@ -31,7 +31,7 @@ define([], function () { this.name = name; this.started = started; this.stopped = stopped; - this.duration = stopped - started; + this.duration = Math.round(((stopped[0] * 1.e9 + stopped[1]) - (started[0] * 1e9 + started[1])) / 1.e6); this.profile = profile; } Tick.compareByStart = function (a, b) { @@ -55,17 +55,14 @@ define([], function () { var _ticks = global._perfTicks; var _toBeProfiled = global._perfToBeProfiled; - function startTimer(name, started) { - if (typeof started !== 'number') { - started = Date.now(); - } + function startTimer(name) { if (_starts.has(name)) { throw new Error("${name}" + " already exists"); } if (_toBeProfiled.has(name)) { requireProfiler().startProfiling(name, true); } - _starts.set(name, { name: name, started: started }); + _starts.set(name, { name: name, started: process.hrtime() }); var stop = stopTimer.bind(undefined, name); return { stop: stop, @@ -76,14 +73,11 @@ define([], function () { }; } - function stopTimer(name, stopped) { - if (typeof stopped !== 'number') { - stopped = Date.now(); - } + function stopTimer(name) { var profile = _toBeProfiled.has(name) ? requireProfiler().stopProfiling(name) : undefined; var start = _starts.get(name); if (start !== undefined) { - var tick = new Tick(start.name, start.started, stopped, profile); + var tick = new Tick(start.name, start.started, process.hrtime(), profile); _ticks.set(name, tick); _starts.delete(name); } diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index 2b20efb7bbc64..c01da62847a48 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -192,8 +192,6 @@ function main() { beforeLoadWorkbenchMain: Date.now() }; - startTimer('elapsed:overall', configuration.perfStartTime); - const workbenchMainTimer = startTimer('load:workbench.main') require([ 'vs/workbench/electron-browser/workbench.main', diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index ac4b1759dde85..bec5d37606b9e 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -59,7 +59,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; -import { ILifecycleService, StartupKind } from 'vs/platform/lifecycle/common/lifecycle'; +import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IMessageService, IChoiceService, Severity, CloseAction } from 'vs/platform/message/common/message'; @@ -101,7 +101,6 @@ import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/work import { WorkbenchThemeService } from 'vs/workbench/services/themes/electron-browser/workbenchThemeService'; import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; import { foreground, selectionBackground, focusBorder, scrollbarShadow, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground, listHighlightForeground, inputPlaceholderForeground } from 'vs/platform/theme/common/colorRegistry'; -import { stopTimer } from 'vs/base/node/startupTimers'; /** * Services that we require for the Shell @@ -243,10 +242,6 @@ export class WorkbenchShell { startupKind: this.lifecycleService.startupKind }); - if (this.lifecycleService.startupKind === StartupKind.NewWindow) { - stopTimer('elapsed:overall'); - } - // Telemetry: startup metrics this.timerService.workbenchStarted = Date.now(); this.timerService.restoreEditorsDuration = info.restoreEditorsDuration; From b78cd1e05d9e23eda6335cd70ad6444a3702d748 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 24 May 2017 15:27:05 +0200 Subject: [PATCH 0988/2747] use getAccessibilitySupport for F8, fixes #18366 --- src/vs/editor/contrib/gotoError/browser/gotoError.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/gotoError/browser/gotoError.ts b/src/vs/editor/contrib/gotoError/browser/gotoError.ts index 89fb5203c60a0..cf7c165877725 100644 --- a/src/vs/editor/contrib/gotoError/browser/gotoError.ts +++ b/src/vs/editor/contrib/gotoError/browser/gotoError.ts @@ -27,6 +27,8 @@ import { registerColor } from 'vs/platform/theme/common/colorRegistry'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; import { Color } from 'vs/base/common/color'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; +import { getAccessibilitySupport } from 'vs/base/browser/browser'; +import { AccessibilitySupport } from 'vs/base/common/platform'; class MarkerModel { @@ -276,7 +278,9 @@ class MarkerNavigationWidget extends ZoneWidget { public show(where: Position, heightInLines: number): void { super.show(where, heightInLines); - this.focus(); + if (getAccessibilitySupport() !== AccessibilitySupport.Disabled) { + this.focus(); + } } private _wireModelAndView(): void { From 2a5abbaeeb77f359fad6641a4816ad397cd7314a Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 24 May 2017 15:36:37 +0200 Subject: [PATCH 0989/2747] don't double print messages from the extension service --- .../workbench/api/electron-browser/mainThreadExtensionService.ts | 1 - src/vs/workbench/api/node/extHost.protocol.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts b/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts index 4bbea670cc2a3..14b8d69f5dc5f 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts @@ -135,7 +135,6 @@ export class MainProcessExtensionService extends AbstractExtensionService { throw ni(); } } From bbfd39561a5053f6767e7047509c4bd15d1f4411 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 24 May 2017 15:38:21 +0200 Subject: [PATCH 0990/2747] fix update state changes --- src/vs/platform/update/common/updateIpc.ts | 28 ++++++++++------------ 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/vs/platform/update/common/updateIpc.ts b/src/vs/platform/update/common/updateIpc.ts index cb48952d2b3cf..169f827d015d0 100644 --- a/src/vs/platform/update/common/updateIpc.ts +++ b/src/vs/platform/update/common/updateIpc.ts @@ -7,9 +7,8 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IChannel, eventToCall, eventFromCall } from 'vs/base/parts/ipc/common/ipc'; -import Event, { Emitter, any, mapEvent } from 'vs/base/common/event'; +import Event, { Emitter } from 'vs/base/common/event'; import { onUnexpectedError } from 'vs/base/common/errors'; -import { memoize } from 'vs/base/common/decorators'; import { IUpdateService, IRawUpdate, State, IUpdate } from './update'; export interface IUpdateChannel extends IChannel { @@ -59,25 +58,24 @@ export class UpdateChannelClient implements IUpdateService { private _onUpdateReady = eventFromCall(this.channel, 'event:onUpdateReady'); get onUpdateReady(): Event { return this._onUpdateReady; } - private _onInitialStateChange = new Emitter(); private _onRemoteStateChange = eventFromCall(this.channel, 'event:onStateChange'); - - @memoize - get onStateChange(): Event { - const result = any(this._onInitialStateChange.event, this._onRemoteStateChange); - - return mapEvent(result, state => { - this._state = state; - return state; - }); - } + private _onStateChange = new Emitter(); + get onStateChange(): Event { return this._onStateChange.event; } private _state: State = State.Uninitialized; get state(): State { return this._state; }; constructor(private channel: IUpdateChannel) { - channel.call('_getInitialState') - .done(state => this._onInitialStateChange.fire(state), onUnexpectedError); + // always set this._state as the state changes + this.onStateChange(state => this._state = state); + + channel.call('_getInitialState').done(state => { + // fire initial state + this._onStateChange.fire(state); + + // fire subsequent states as they come in from remote + this._onRemoteStateChange(s => this._onStateChange.fire(state)); + }, onUnexpectedError); } checkForUpdates(explicit: boolean): TPromise { From 04c6d43247a99c34c0523c68bdca84581071eb36 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 24 May 2017 15:54:47 +0200 Subject: [PATCH 0991/2747] fixes #26184 --- extensions/git/src/commands.ts | 2 +- src/vs/base/browser/ui/list/listWidget.ts | 23 +++++++++++++++++++ .../parts/scm/electron-browser/scmViewlet.ts | 17 +++++++++++++- 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 24f9c35129a84..3cbd3e23033ed 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -132,7 +132,7 @@ export class CommandCenter { return await commands.executeCommand('vscode.open', right); } - return await commands.executeCommand('vscode.diff', left, right, title); + return await commands.executeCommand('vscode.diff', left, right, title, { preview: true }); } private getLeftResource(resource: Resource): Uri | undefined { diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts index 5643cc768a96d..d8f833da54009 100644 --- a/src/vs/base/browser/ui/list/listWidget.ts +++ b/src/vs/base/browser/ui/list/listWidget.ts @@ -321,6 +321,7 @@ class MouseController implements IDisposable { this.disposables = []; this.disposables.push(view.addListener('mousedown', e => this.onMouseDown(e))); this.disposables.push(view.addListener('click', e => this.onPointer(e))); + this.disposables.push(view.addListener('dblclick', e => this.onDoubleClick(e))); this.disposables.push(view.addListener(TouchEventType.Tap, e => this.onPointer(e))); } @@ -362,6 +363,19 @@ class MouseController implements IDisposable { this.list.open(focus); } + private onDoubleClick(e: IListMouseEvent): void { + e.preventDefault(); + e.stopPropagation(); + + if (isSelectionChangeEvent(e)) { + return; + } + + const focus = this.list.getFocus(); + this.list.setSelection(focus); + this.list.pin(focus); + } + private changeSelection(e: IListMouseEvent, reference: number | undefined): void { const focus = e.index; @@ -574,6 +588,11 @@ export class List implements ISpliceable, IDisposable { return mapEvent(this._onOpen.event, indexes => this.toListEvent({ indexes })); } + private _onPin = new Emitter(); + @memoize get onPin(): Event> { + return mapEvent(this._onPin.event, indexes => this.toListEvent({ indexes })); + } + private _onDOMFocus = new Emitter(); get onDOMFocus(): Event { return this._onDOMFocus.event; } @@ -813,6 +832,10 @@ export class List implements ISpliceable, IDisposable { this._onOpen.fire(indexes); } + pin(indexes: number[]): void { + this._onPin.fire(indexes); + } + style(styles: IListStyles): void { const content: string[] = []; diff --git a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts index f395ebd5eed22..1d4064b4fb311 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts @@ -25,6 +25,8 @@ import { VIEWLET_ID } from 'vs/workbench/parts/scm/common/scm'; import { FileLabel } from 'vs/workbench/browser/labels'; import { CountBadge } from 'vs/base/browser/ui/countBadge/countBadge'; import { ISCMService, ISCMProvider, ISCMResourceGroup, ISCMResource } from 'vs/workbench/services/scm/common/scm'; +import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; +import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IContextViewService, IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; @@ -243,7 +245,9 @@ export class SCMViewlet extends Viewlet { @IThemeService protected themeService: IThemeService, @IMenuService private menuService: IMenuService, @IModelService private modelService: IModelService, - @ICommandService private commandService: ICommandService + @ICommandService private commandService: ICommandService, + @IEditorGroupService private groupService: IEditorGroupService, + @IWorkbenchEditorService private editorService: IWorkbenchEditorService ) { super(VIEWLET_ID, telemetryService, themeService); @@ -320,6 +324,11 @@ export class SCMViewlet extends Viewlet { .filter(e => !!e && isSCMResource(e)) .on(this.open, this, this.disposables); + chain(this.list.onPin) + .map(e => e.elements[0]) + .filter(e => !!e && isSCMResource(e)) + .on(this.pin, this, this.disposables); + this.list.onContextMenu(this.onListContextMenu, this, this.disposables); this.disposables.push(this.list); @@ -406,6 +415,12 @@ export class SCMViewlet extends Viewlet { .done(undefined, onUnexpectedError); } + private pin(): void { + const activeEditor = this.editorService.getActiveEditor(); + const activeEditorInput = this.editorService.getActiveEditorInput(); + this.groupService.pinEditor(activeEditor.position, activeEditorInput); + } + getTitle(): string { const title = localize('source control', "Source Control"); const providerLabel = this.scmService.activeProvider && this.scmService.activeProvider.label; From 5322c9fd5b61d3c568d08453a1a29465f1c252d8 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 24 May 2017 16:36:35 +0200 Subject: [PATCH 0992/2747] Updated the way to run the smoke test. --- test/smoke/.vscode/launch.json | 2 +- test/smoke/CONTRIBUTING.md | 4 +- test/smoke/README.md | 4 +- test/smoke/package.json | 9 +- test/smoke/scripts/run.ps1 | 44 ------ test/smoke/scripts/run.sh | 43 ------ test/smoke/src/areas/common.ts | 12 +- test/smoke/src/areas/css.ts | 4 +- test/smoke/src/areas/data-loss.ts | 2 +- test/smoke/src/areas/extensions.ts | 2 +- test/smoke/src/areas/first-experience.ts | 2 +- test/smoke/src/areas/integrated-terminal.ts | 1 + test/smoke/src/areas/javascript-debug.ts | 2 +- test/smoke/src/areas/statusbar.ts | 6 +- test/smoke/src/areas/tasks.ts | 3 +- test/smoke/src/main.js | 163 ++++++++++++++++++++ test/smoke/src/mocha-runner.js | 21 +++ test/smoke/src/spectron/application.ts | 13 +- test/smoke/src/spectron/client.ts | 2 +- test/smoke/src/{main.ts => tests.ts} | 96 ++++++------ test/smoke/tsconfig.json | 2 +- vscode-smoketest-express | 1 - 22 files changed, 272 insertions(+), 166 deletions(-) delete mode 100644 test/smoke/scripts/run.ps1 delete mode 100644 test/smoke/scripts/run.sh create mode 100644 test/smoke/src/main.js create mode 100644 test/smoke/src/mocha-runner.js rename test/smoke/src/{main.ts => tests.ts} (93%) delete mode 160000 vscode-smoketest-express diff --git a/test/smoke/.vscode/launch.json b/test/smoke/.vscode/launch.json index 2de33bbb20ba1..25b4e7e4c0ed7 100644 --- a/test/smoke/.vscode/launch.json +++ b/test/smoke/.vscode/launch.json @@ -15,7 +15,7 @@ "--timeout", "999999", "--colors", - "${workspaceRoot}/out/main.js" + "${workspaceRoot}/out/tests.js" ], "outFiles": [ "${workspaceRoot}/out/**/*.js" ], "internalConsoleOptions": "openOnSessionStart", diff --git a/test/smoke/CONTRIBUTING.md b/test/smoke/CONTRIBUTING.md index c15016dc1ad68..8aaef8a7875ee 100644 --- a/test/smoke/CONTRIBUTING.md +++ b/test/smoke/CONTRIBUTING.md @@ -1,5 +1,7 @@ # Architecture -* `main.ts` contains the main smoke test suite. It includes all tests separated into mocha `describe()` groups that represent each of the areas of [Smoke Test document](https://github.com/Microsoft/vscode/wiki/Smoke-Test). +* `main.js` is used to prepare all smoke test dependencies (fetching key bindings and 'Express' repository, running `npm install` there). +* `mocha-runner.js` launches Mocha programmatically. It is spawned in Node environment from main.js to ensure that it is possible to listen on `stderr`s (primary `process.stderr` is not readable otherwise). This is accomplished because WebDriverIO command deprecation warnings need to be redirected to a separate log. Those warnings are coming from WebDriverIO because ChromeDriver has not migrated from JsonWire to W3C WebDriver protocol. +* `tests.ts` contains the main smoke test suite. It includes all tests separated into mocha `describe()` groups that represent each of the areas of [Smoke Test document](https://github.com/Microsoft/vscode/wiki/Smoke-Test). * `./areas/` folder contains a `.ts` file per each area of the document. E.g. `'Search'` area goes under `'search.ts'`. Every area file contains a list of methods with the name that represents the action that can be performed in the corresponding test. This reduces the amount of test suite code and means that if the UI changes, the fix need only be applied in one place. The name of the method reflects the action the tester would do if he would perform the test manually. See [Selenium Page Objects Wiki](https://github.com/SeleniumHQ/selenium/wiki/PageObjects) and [Selenium Bot Style Tests Wiki](https://github.com/SeleniumHQ/selenium/wiki/Bot-Style-Tests) for a good explanation of the implementation. Every smoke test area contains methods that are used in a bot-style approach in `main.ts`. * `./spectron/` wraps the Spectron, with WebDriverIO API wrapped in `client.ts` and instance of Spectron Application is wrapped in `application.ts`. diff --git a/test/smoke/README.md b/test/smoke/README.md index 318ddb0751725..501ec51f087d6 100644 --- a/test/smoke/README.md +++ b/test/smoke/README.md @@ -1,9 +1,9 @@ # VS Code Smoke Testing This repository contains the smoke test automation code with Spectron for Visual Studio Code. -The following command is used to run the tests: `.\scripts\run.ps1 -latest "path\to\Code.exe"` on Windows (from PowerShell) and `./scripts/run.sh path/to/binary` on Unix system. +The following command is used to run the tests: `npm test -- --latest "path/to/binary"`. -If you want to include 'Data Migration' area tests use `.\scripts\run.ps1 -latest "path\to\Code.exe" -stable "path\to\CurrentStable.exe"` and `./scripts/run.sh path/to/binary path/to/currentStable` respectively. +If you want to include 'Data Migration' area tests use `npm test -- --latest path/to/binary --stable path/to/currentStable` respectively. # Contributing diff --git a/test/smoke/package.json b/test/smoke/package.json index a5c3a78273bf3..4f637a5adf7e1 100644 --- a/test/smoke/package.json +++ b/test/smoke/package.json @@ -1,9 +1,10 @@ { "name": "code-oss-dev-smoke-test", "version": "0.1.0", - "main": "./out/main.js", + "main": "./src/main.js", "scripts": { - "test": "mocha -u tdd --timeout 360000 --retries 2 --slow 50000 --colors ./out/main.js 2> test_data/errors.log" + "pretest": "tsc", + "test": "node src/main.js" }, "devDependencies": { "@types/mocha": "^2.2.41", @@ -14,6 +15,8 @@ "mocha": "^3.2.0", "spectron": "^3.6.4", "typescript": "^2.2.2", - "rimraf": "^2.6.1" + "rimraf": "^2.6.1", + "commander": "^2.9.0", + "simple-git": "^1.73.0" } } diff --git a/test/smoke/scripts/run.ps1 b/test/smoke/scripts/run.ps1 deleted file mode 100644 index 5883ce0dbe82e..0000000000000 --- a/test/smoke/scripts/run.ps1 +++ /dev/null @@ -1,44 +0,0 @@ -Param( - [Parameter(Position=0,mandatory=$true)] - [string]$arch -) - - -# Setup sample repository for the smoke test -Set-Location .. -if (-Not (Test-Path vscode-smoketest-express)) { - git clone https://github.com/Microsoft/vscode-smoketest-express.git - Set-Location ./vscode-smoketest-express -} else { - Set-Location ./vscode-smoketest-express - git fetch origin master - git reset --hard FETCH_HEAD - git clean -fd -} -npm install - -Write-Output "My path: " + $(pwd) - -# Setup the test directory for running -Set-Location ..\smoke -if (-Not (Test-Path node_modules)) { - npm install -} - -# Configure environment variables -$env:VSCODE_LATEST_PATH = "$(pwd)\..\VSCode-win32-$arch\Code - Insiders.exe" -# $env:VSCODE_STABLE_PATH = $stable -$env:SMOKETEST_REPO = "..\vscode-smoketest-express" - -if ($env:VSCODE_LATEST_PATH.Contains('Insiders')) { - $env:VSCODE_EDITION = 'insiders' -} - -# Retrieve key bindings config file for Windows -$testDirectory = (Resolve-Path .\).Path -$client = New-Object System.Net.WebClient -$client.DownloadFile("https://raw.githubusercontent.com/Microsoft/vscode-docs/master/scripts/keybindings/doc.keybindings.win.json","$testDirectory\test_data\keybindings.win32.json") - -# Compile and launch the smoke test -tsc -npm test \ No newline at end of file diff --git a/test/smoke/scripts/run.sh b/test/smoke/scripts/run.sh deleted file mode 100644 index fc103a5553954..0000000000000 --- a/test/smoke/scripts/run.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bash -if [[ "$#" -ne 1 ]]; then - echo "Usage: ./scripts/run.sh path/to/binary" - echo "To perform data migration tests, use: ./scripts/run.sh path/to/latest_binary path/to/stable_binary" - exit 1 -fi - -# Cloning sample repository for the smoke test -cd .. -if ! [ -d vscode-smoketest-express ]; then - git clone https://github.com/Microsoft/vscode-smoketest-express.git - cd vscode-smoketest-express -else - cd vscode-smoketest-express - git fetch origin master - git reset --hard FETCH_HEAD - git clean -fd -fi -npm install - -# Install Node modules for Spectron -cd ../vscode-smoketest -test -d node_modules || npm install - -# Configuration -export VSCODE_LATEST_PATH="$1" -export VSCODE_STABLE_PATH="$2" -export SMOKETEST_REPO="../vscode-smoketest-express" -mkdir -p test_data - -if [[ $1 == *"Insiders"* || $1 == *"insiders"* ]]; then - export VSCODE_EDITION="insiders" -fi - -if [[ "$OSTYPE" == "darwin"* ]]; then - curl "https://raw.githubusercontent.com/Microsoft/vscode-docs/master/scripts/keybindings/doc.keybindings.osx.json" -o "test_data/keybindings.darwin.json" # Download OS X keybindings -else - wget https://raw.githubusercontent.com/Microsoft/vscode-docs/master/scripts/keybindings/doc.keybindings.linux.json -O test_data/keybindings.linux.json # Download Linux keybindings -fi - -# Compile and launch the smoke test -tsc -exec npm test diff --git a/test/smoke/src/areas/common.ts b/test/smoke/src/areas/common.ts index c955c206eea22..33127905ec65b 100644 --- a/test/smoke/src/areas/common.ts +++ b/test/smoke/src/areas/common.ts @@ -19,7 +19,7 @@ export class CommonActions { public async getWindowTitle(): Promise { return this.spectron.client.getTitle(); } - + public enter(): Promise { return this.spectron.client.keys(['Enter', 'NULL']); } @@ -34,7 +34,7 @@ export class CommonActions { await this.spectron.wait(); return this.saveOpenedFile(); } - + public async newUntitledFile(): Promise { await this.spectron.command('workbench.action.files.newUntitledFile'); return this.spectron.wait(); @@ -50,7 +50,7 @@ export class CommonActions { if (el.status === 0) { return el; } - + return undefined; } @@ -118,7 +118,7 @@ export class CommonActions { selector += ' explorer-item'; } selector += '"]'; - + await this.spectron.waitFor(this.spectron.client.doubleClick, selector); return this.spectron.wait(); } @@ -132,7 +132,7 @@ export class CommonActions { } else if (extension === 'md') { return 'md-ext-file-icon markdown-lang-file-icon'; } - + throw new Error('No class defined for this file extension'); } @@ -142,7 +142,7 @@ export class CommonActions { if (Array.isArray(span)) { return span[0]; } - + return span; } catch (e) { return undefined; diff --git a/test/smoke/src/areas/css.ts b/test/smoke/src/areas/css.ts index 3388ab4e465ff..d2cbd62b0a89b 100644 --- a/test/smoke/src/areas/css.ts +++ b/test/smoke/src/areas/css.ts @@ -11,7 +11,7 @@ export enum CSSProblem { }; export class CSS { - + constructor(private spectron: SpectronApplication) { // noop } @@ -56,7 +56,7 @@ export class CSS { if (el.status === 0) { return el; } - + return undefined; } } \ No newline at end of file diff --git a/test/smoke/src/areas/data-loss.ts b/test/smoke/src/areas/data-loss.ts index dc1ecf93730e4..5988ce6f7f88f 100644 --- a/test/smoke/src/areas/data-loss.ts +++ b/test/smoke/src/areas/data-loss.ts @@ -20,7 +20,7 @@ export class DataLoss { if (el.status === 0) { return el; } - + return undefined; } } \ No newline at end of file diff --git a/test/smoke/src/areas/extensions.ts b/test/smoke/src/areas/extensions.ts index 4edec9d06ef87..bc4e2743e4402 100644 --- a/test/smoke/src/areas/extensions.ts +++ b/test/smoke/src/areas/extensions.ts @@ -7,7 +7,7 @@ import { SpectronApplication } from '../spectron/application'; import { CommonActions } from "./common"; export class Extensions { - + private readonly extensionsViewletSelector = 'div[id="workbench.view.extensions"]'; constructor(private spectron: SpectronApplication, private common: CommonActions) { diff --git a/test/smoke/src/areas/first-experience.ts b/test/smoke/src/areas/first-experience.ts index e9141bda899aa..2d6e9c30eaaf3 100644 --- a/test/smoke/src/areas/first-experience.ts +++ b/test/smoke/src/areas/first-experience.ts @@ -15,7 +15,7 @@ export class FirstExperience { if (el.status === 0) { return el; } - + return undefined; } } \ No newline at end of file diff --git a/test/smoke/src/areas/integrated-terminal.ts b/test/smoke/src/areas/integrated-terminal.ts index b066db8adf718..c41f2946d4d88 100644 --- a/test/smoke/src/areas/integrated-terminal.ts +++ b/test/smoke/src/areas/integrated-terminal.ts @@ -25,6 +25,7 @@ export class IntegratedTerminal { public async getCommandOutput(command: string): Promise { const selector = 'div[id="workbench.panel.terminal"] .xterm-rows'; + // Default Powershell terminal adds 3 header rows at the top, whereas bash does not. let readRow = process.platform === 'win32' ? 5 : 2; let output: string = await this.spectron.client.getText(`${selector}>:nth-child(${readRow})`); diff --git a/test/smoke/src/areas/javascript-debug.ts b/test/smoke/src/areas/javascript-debug.ts index 948594945d7a4..ff39a985d6659 100644 --- a/test/smoke/src/areas/javascript-debug.ts +++ b/test/smoke/src/areas/javascript-debug.ts @@ -36,7 +36,7 @@ export class JavaScriptDebug { if (el.status === 0) { return el; } - + return undefined; } } \ No newline at end of file diff --git a/test/smoke/src/areas/statusbar.ts b/test/smoke/src/areas/statusbar.ts index 93b7349518355..8e330c8e12171 100644 --- a/test/smoke/src/areas/statusbar.ts +++ b/test/smoke/src/areas/statusbar.ts @@ -49,7 +49,7 @@ export class StatusBar { if (el.status === 0) { return el; } - + return undefined; } @@ -58,7 +58,7 @@ export class StatusBar { if (el.status === 0) { return el; } - + return undefined; } @@ -71,7 +71,7 @@ export class StatusBar { if (el.status === 0) { return el; } - + return undefined; } diff --git a/test/smoke/src/areas/tasks.ts b/test/smoke/src/areas/tasks.ts index e46c2961df585..d83cc173efa1f 100644 --- a/test/smoke/src/areas/tasks.ts +++ b/test/smoke/src/areas/tasks.ts @@ -25,6 +25,7 @@ export class Tasks { public async firstOutputLineEndsWith(fileName: string): Promise { const firstLine = await this.spectron.waitFor(this.spectron.client.getText, `${this.outputViewSelector}>:nth-child(2)`); + return firstLine.endsWith(fileName); } @@ -40,7 +41,7 @@ export class Tasks { return this.spectron.client.getValue(`${this.workbenchPanelSelector} .select-box`); } - public getProblemsViewFirstElementName(): Promise { + public getProblemsViewFirstElementName(): Promise { return this.spectron.waitFor(this.spectron.client.getText, `${this.problemsViewSelector} .label-name`); } diff --git a/test/smoke/src/main.js b/test/smoke/src/main.js new file mode 100644 index 0000000000000..8df41b5c73cfb --- /dev/null +++ b/test/smoke/src/main.js @@ -0,0 +1,163 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +var fs = require('fs'); +var https = require('https'); +var program = require('commander'); +var git = require('simple-git')(); +var child_process = require('child_process'); +var path = require('path'); + +var tempFolder = `test_data`; +var testRepoUrl = 'https://github.com/Microsoft/vscode-smoketest-express'; +var testRepoLocalDir = path.join(process.cwd(), `${tempFolder}/vscode-smoketest-express`); +var keybindingsUrl = 'https://raw.githubusercontent.com/Microsoft/vscode-docs/master/scripts/keybindings'; + +program + .option('-l, --latest ', 'path to the latest VS Code to test') + .option('-s, --stable [file path]', 'path to the stable VS Code to be used in data migration tests'); + +program.on('--help', () => { + console.log(' Examples:'); + console.log(''); + console.log(' $ npm test -- --latest path/to/binary'); + console.log(' $ npm test -- -l path/to/binary'); + console.log(''); + console.log(' $ npm test -- --latest path/to/latest/binary --stable path/to/stable/binary'); + console.log(' $ npm test -- -l path/to/latest/binary -s path/to/stable/binary'); + console.log(''); +}); +program.parse(process.argv); + +if (!program.latest) { + console.error('You must specify the binary to run the smoke test against'); + process.exit(1); +} +if (!binaryExists(program.latest) || (program.stable && !binaryExists(program.stable))) { + console.error('The file path to electron binary does not exist or permissions do not allow to execute it. Please check the path provided.'); + process.exit(1); +} + +// Setting up environment variables +process.env['VSCODE_LATEST_PATH'] = program.latest; +if (program.stable) process.env['VSCODE_STABLE_PATH'] = program.stable; +process.env['SMOKETEST_REPO'] = testRepoLocalDir; +if (program.stable && program.stable.toLowerCase().startsWith('insiders')) process.env['VSCODE_EDITION'] = 'insiders'; + +// Setting up 'vscode-smoketest-express' project +var os = process.platform; +if (os === 'darwin') os = 'osx'; +else if (os === 'win32') os = 'win'; +var promises = []; + +try { + // promises.push(execute('npm install'), process.cwd()); + promises.push(getKeybindings(`${keybindingsUrl}/doc.keybindings.${os}.json`, `${tempFolder}/keybindings.json`)); + promises.push(cleanOrClone(testRepoUrl, testRepoLocalDir)); + + Promise.all(promises).then(() => { execute('npm install', testRepoLocalDir).then(() => runTests()); }); +} catch (e) { + throw new Error('Error caught running the smoke test: ' + e); +} + + +function runTests() { + console.log('Running tests...') + const spawn = require('child_process').spawn; + var proc = spawn(process.execPath, [ + 'src/mocha-runner.js' + ]); + proc.stdout.on('data', data => { + console.log(data.toString()); + }); + proc.stderr.on('data', data => { + var date = new Date().toLocaleString(); + fs.appendFile(`${tempFolder}/errors.log`, `${date}: ${data.toString()}`, (err) => { + if (err) throw new Error(`Could not write stderr to errors.log with the following error: ${err}`); + }); + }); +} + +function cleanOrClone(repo, dir) { + console.log('Cleaning or cloning test project repository...'); + return new Promise((res, rej) => { + if (!folderExists(dir)) { + git.clone(repo, dir, () => { + console.log('Test repository successfully cloned.'); + res(); + }); + } else { + git.cwd(dir); + git.fetch((err) => { + if (err) rej(err); + resetAndClean(); + }); + } + + var resetAndClean = () => { + git.reset(['FETCH_HEAD', '--hard'], (err) => { + if (err) rej(err); + + git.clean('f', ['-d'], (err) => { + if (err) rej(err); + console.log('Test project was successfully reset to initial state.'); + res(); + }); + }); + } + }); +} + +function execute(cmd, dir) { + return new Promise((res, rej) => { + console.log(`Running ${cmd}...`); + var output = child_process.exec(cmd, { cwd: dir, stdio: [0, 1, 2] }, (error, stdout, stderr) => { + if (error) rej(error); + if (stderr) console.error(stderr); + console.log(stdout); + res(); + }); + }); +} + +function getKeybindings(url, location) { + console.log(`Fetching keybindings from ${url}...`); + return new Promise((resolve, reject) => { + https.get(url, (res) => { + if (res.statusCode != 200) { + reject(`Failed to obtain key bindings with response code: ${res.statusCode}`); + } + + var buffer = []; + res.on('data', (chunk) => buffer.push(chunk)); + res.on('end', () => { + fs.writeFile(location, Buffer.concat(buffer), 'utf8', () => { + console.log('Keybindings were successfully fetched.'); + resolve(); + }); + }); + }).on('error', (e) => { + reject(`Failed to obtain key bindings with an error: ${e}`); + }); + }); +} + +function folderExists(folder) { + try { + fs.accessSync(folder, 'rw'); + return true; + } catch (e) { + return false; + } +} + +function binaryExists(filePath) { + try { + fs.accessSync(filePath, 'x'); + return true; + } catch (e) { + return false; + } +} \ No newline at end of file diff --git a/test/smoke/src/mocha-runner.js b/test/smoke/src/mocha-runner.js new file mode 100644 index 0000000000000..2a08adca647c7 --- /dev/null +++ b/test/smoke/src/mocha-runner.js @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +var Mocha = require('mocha'); +var path = require('path'); + +var mocha = new Mocha({ + timeout: 360000, + retries: 2, + slow: 50000, + useColors: true +}); + +mocha.addFile(path.join(process.cwd(), 'out/tests.js')); +mocha.run((failures) => { + process.on('exit', () => { + process.exit(failures); + }); +}); \ No newline at end of file diff --git a/test/smoke/src/spectron/application.ts b/test/smoke/src/spectron/application.ts index 5e45474768c8f..d1027a1ef7009 100644 --- a/test/smoke/src/spectron/application.ts +++ b/test/smoke/src/spectron/application.ts @@ -7,6 +7,7 @@ import { Application } from 'spectron'; import { SpectronClient } from './client'; import { Screenshot } from "../helpers/screenshot"; var fs = require('fs'); +var path = require('path'); /** * Wraps Spectron's Application instance with its used methods. @@ -16,7 +17,7 @@ export class SpectronApplication { private spectron: Application; private readonly pollTrials = 5; - private readonly pollTimeout = 3; // in secs + private readonly pollTimeout = 3; // in secs private keybindings: any[]; private screenshot: Screenshot; @@ -73,13 +74,15 @@ export class SpectronApplication { } private retrieveKeybindings() { - const os = process.platform; - fs.readFile(`test_data/keybindings.${os}.json`, (err, data) => { + fs.readFile(path.join(process.cwd(), `test_data/keybindings.json`), 'utf8', (err, data) => { if (err) { throw err; } - - this.keybindings = JSON.parse(data); + try { + this.keybindings = JSON.parse(data); + } catch (e) { + throw new Error(`Error parsing keybindings JSON: ${e}`); + } }); } diff --git a/test/smoke/src/spectron/client.ts b/test/smoke/src/spectron/client.ts index 9376bd3e10044..6a9003199dcca 100644 --- a/test/smoke/src/spectron/client.ts +++ b/test/smoke/src/spectron/client.ts @@ -7,7 +7,7 @@ import { Application } from 'spectron'; import { Screenshot } from '../helpers/screenshot'; /** - * Abstracts the Spectron's WebdriverIO managed client property on the created Application instances. + * Abstracts the Spectron's WebdriverIO managed client property on the created Application instances. */ export class SpectronClient { diff --git a/test/smoke/src/main.ts b/test/smoke/src/tests.ts similarity index 93% rename from test/smoke/src/main.ts rename to test/smoke/src/tests.ts index 9da55ce546aa7..35d6d1f79ac40 100644 --- a/test/smoke/src/main.ts +++ b/test/smoke/src/tests.ts @@ -6,7 +6,7 @@ import * as assert from 'assert'; import { SpectronApplication } from "./spectron/application"; import { CommonActions } from './areas/common'; -import { FirstExperience } from './areas/first-experience'; +// import { FirstExperience } from './areas/first-experience'; import { ConfigurationView, ActivityBarPosition } from './areas/configuration-views'; import { Search } from './areas/search'; import { CSS, CSSProblem } from './areas/css'; @@ -23,14 +23,13 @@ import { Localization, ViewletType } from "./areas/localization"; describe('Smoke Test Suite', function () { const latestPath = process.env.VSCODE_LATEST_PATH; const stablePath = process.env.VSCODE_STABLE_PATH; - const insiders = process.env.VSCODE_EDITION; + // const insiders = process.env.VSCODE_EDITION; const workspacePath = process.env.SMOKETEST_REPO; const tempUserDir = 'test_data/temp_user_dir'; const tempExtensionsDir = 'test_data/temp_extensions_dir'; let app: SpectronApplication; let common: CommonActions; - this.retries(2); if (stablePath) { context('Data Migration', function () { @@ -176,37 +175,38 @@ describe('Smoke Test Suite', function () { }); }); - context('First User Experience', function () { - let experience: FirstExperience; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), undefined, [`--user-data-dir=${tempUserDir}`, `--excludeSwitches=load-component-extension`]); - common = new CommonActions(app); - experience = new FirstExperience(app); - - await common.removeDirectory(tempUserDir); - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it(`verifies if title is set correctly on the clean user-directory startup`, async function () { - const title = await common.getWindowTitle(); - - let expectedTitle = 'Welcome'; - if (process.platform !== 'darwin') { - expectedTitle += ' — Visual Studio Code'; - if (insiders) expectedTitle += ' - Insiders'; - } - - assert.equal(title, expectedTitle); - }); - - it(`verifies if 'Welcome page' tab is presented on the clean user-directory startup`, async function () { - assert.ok(await experience.getWelcomeTab()); - }); - }); + // Do not run until experiments are finished over the first-time startup behaviour. + // context('First User Experience', function () { + // let experience: FirstExperience; + + // beforeEach(async function () { + // app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), undefined, [`--user-data-dir=${tempUserDir}`, `--excludeSwitches=load-component-extension`]); + // common = new CommonActions(app); + // experience = new FirstExperience(app); + + // await common.removeDirectory(tempUserDir); + // return await app.start(); + // }); + // afterEach(async function () { + // return await app.stop(); + // }); + + // it(`verifies if title is set correctly on the clean user-directory startup`, async function () { + // const title = await common.getWindowTitle(); + + // let expectedTitle = 'Welcome'; + // if (process.platform !== 'darwin') { + // expectedTitle += ' — Visual Studio Code'; + // if (insiders) expectedTitle += ' - Insiders'; + // } + + // assert.equal(title, expectedTitle); + // }); + + // it(`verifies if 'Welcome page' tab is presented on the clean user-directory startup`, async function () { + // assert.ok(await experience.getWelcomeTab()); + // }); + // }); context('Explorer', function () { beforeEach(async function () { @@ -557,7 +557,6 @@ describe('Smoke Test Suite', function () { await common.type(command); await common.enter(); await app.wait(); - // Default Powershell terminal adds 3 header rows at the top, whereas bash does not. let output = await terminal.getCommandOutput(command); assert.equal(output, 'test'); }); @@ -660,7 +659,7 @@ describe('Smoke Test Suite', function () { const res = await tasks.getOutputResult(); assert.equal(res, '✖ 6 problems (6 errors, 0 warnings)'); }); - + it(`is able to select 'Git' output`, async function () { await tasks.build(); await app.wait(); @@ -674,7 +673,7 @@ describe('Smoke Test Suite', function () { assert.ok(await tasks.firstOutputLineEndsWith('index.js')); }); - it(`verifies build errors are reflected in 'Problems View'`, async function () { + it(`verifies build errors are reflected in 'Problems View'`, async function () { await tasks.build(); await app.wait(); await tasks.openProblemsView(); @@ -717,9 +716,9 @@ describe('Smoke Test Suite', function () { await extensions.installFirstResult(); await app.wait(); await extensions.getFirstReloadText(); - + await app.stop(); - await app.wait(); // wait until all resources are released (e.g. locked local storage) + await app.wait(); // wait until all resources are released (e.g. locked local storage) await app.start(); await extensions.selectMinimalIconsTheme(); const x = await extensions.verifyFolderIconAppearance(); @@ -739,13 +738,14 @@ describe('Smoke Test Suite', function () { common.removeDirectory(tempUserDir); await app.start(); - - let expectedTitle = 'Willkommen — vscode-smoketest-express'; - if (process.platform !== 'darwin') { - expectedTitle += ' — Visual Studio Code'; - if (insiders) expectedTitle += ' - Insiders'; - } - assert.equal(await common.getWindowTitle(), expectedTitle); + + // Do not run until experiments are finished over the first-time startup behaviour. + // let expectedTitle = 'Willkommen — vscode-smoketest-express'; + // if (process.platform !== 'darwin') { + // expectedTitle += ' — Visual Studio Code'; + // if (insiders) expectedTitle += ' - Insiders'; + // } + // assert.equal(await common.getWindowTitle(), expectedTitle); let text = await locale.getOpenEditorsText(); assert.equal(text.toLowerCase(), 'geöffnete editoren'); @@ -764,8 +764,8 @@ describe('Smoke Test Suite', function () { await locale.openViewlet(ViewletType.EXTENSIONS); text = await locale.getExtensionsSearchPlaceholder(); - assert.equal(text.toLowerCase(), 'nach extensions in marketplace suchen'); + assert.equal(text.toLowerCase(), 'nach erweiterungen im marketplace suchen'); }); }); - + }); \ No newline at end of file diff --git a/test/smoke/tsconfig.json b/test/smoke/tsconfig.json index 1b0b03c2d672b..733c1107e8353 100644 --- a/test/smoke/tsconfig.json +++ b/test/smoke/tsconfig.json @@ -18,4 +18,4 @@ "exclude": [ "node_modules" ] -} \ No newline at end of file +} diff --git a/vscode-smoketest-express b/vscode-smoketest-express deleted file mode 160000 index 636dd7a2ff71d..0000000000000 --- a/vscode-smoketest-express +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 636dd7a2ff71d266c0e015411b47cf5c3a25be5a From b5d3f45e25615d35d816d8f6c5fdd51e81bca0e5 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 24 May 2017 17:01:41 +0200 Subject: [PATCH 0993/2747] fix typo --- src/vs/platform/update/common/updateIpc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/platform/update/common/updateIpc.ts b/src/vs/platform/update/common/updateIpc.ts index 169f827d015d0..0dd76ca51f65a 100644 --- a/src/vs/platform/update/common/updateIpc.ts +++ b/src/vs/platform/update/common/updateIpc.ts @@ -74,7 +74,7 @@ export class UpdateChannelClient implements IUpdateService { this._onStateChange.fire(state); // fire subsequent states as they come in from remote - this._onRemoteStateChange(s => this._onStateChange.fire(state)); + this._onRemoteStateChange(state => this._onStateChange.fire(state)); }, onUnexpectedError); } From 2e539276e9d9945b6e6b87661440430271523148 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 24 May 2017 17:06:53 +0200 Subject: [PATCH 0994/2747] Revert "allow offsets for fuzzyScore, towards #26096" This reverts commit 093eac502f5546171f0f57aecfc9aa1c28bfa413. --- src/vs/base/common/filters.ts | 74 ++++++++++++------------- src/vs/base/test/common/filters.test.ts | 7 --- 2 files changed, 37 insertions(+), 44 deletions(-) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index 8719c8c662a6d..19056d36a50f7 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -450,7 +450,7 @@ _seps[':'] = true; const enum Arrow { Top = 0b1, Diag = 0b10, Left = 0b100 } -export function fuzzyScore(pattern: string, word: string, patternOffset: number = 0, wordOffset: number = 0): [number, number[]] { +export function fuzzyScore(pattern: string, word: string): [number, number[]] { const patternLen = pattern.length > 100 ? 100 : pattern.length; const wordLen = word.length > 100 ? 100 : word.length; @@ -465,16 +465,16 @@ export function fuzzyScore(pattern: string, word: string, patternOffset: number const lowPattern = pattern.toLowerCase(); const lowWord = word.toLowerCase(); - let patternPos = patternOffset; - let wordPos = wordOffset; + let i = 0; + let j = 0; - while (patternPos < patternLen && wordPos < wordLen) { - if (lowPattern[patternPos] === lowWord[wordPos]) { - patternPos += 1; + while (i < patternLen && j < wordLen) { + if (lowPattern[i] === lowWord[j]) { + i += 1; } - wordPos += 1; + j += 1; } - if (patternPos !== patternLen) { + if (i !== patternLen) { // no simple matches found -> return early return undefined; } @@ -482,24 +482,24 @@ export function fuzzyScore(pattern: string, word: string, patternOffset: number // keep track of the maximum score let maxScore = -1; - for (patternPos = patternOffset + 1; patternPos <= patternLen; patternPos++) { + for (i = 1; i <= patternLen; i++) { let lastLowWordChar = ''; - for (wordPos = wordOffset + 1; wordPos <= wordLen; wordPos++) { + for (j = 1; j <= wordLen; j++) { let score = -1; - let lowWordChar = lowWord[wordPos - 1]; - if (lowPattern[patternPos - 1] === lowWordChar) { + let lowWordChar = lowWord[j - 1]; + if (lowPattern[i - 1] === lowWordChar) { - if (wordPos === wordOffset + 1) { - if (pattern[patternPos - 1] === word[wordPos - 1]) { + if (j === 1) { + if (pattern[i - 1] === word[j - 1]) { score = 7; } else { score = 5; } - } else if (lowWordChar !== word[wordPos - 1]) { - if (pattern[patternPos - 1] === word[wordPos - 1]) { + } else if (lowWordChar !== word[j - 1]) { + if (pattern[i - 1] === word[j - 1]) { score = 7; } else { score = 5; @@ -512,38 +512,38 @@ export function fuzzyScore(pattern: string, word: string, patternOffset: number } } - _scores[patternPos][wordPos] = score; + _scores[i][j] = score; if (score > maxScore) { maxScore = score; } - let diag = _table[patternPos - 1][wordPos - 1] + (score > 1 ? 1 : score); - let top = _table[patternPos - 1][wordPos] + -1; - let left = _table[patternPos][wordPos - 1] + -1; + let diag = _table[i - 1][j - 1] + (score > 1 ? 1 : score); + let top = _table[i - 1][j] + -1; + let left = _table[i][j - 1] + -1; if (left >= top) { // left or diag if (left > diag) { - _table[patternPos][wordPos] = left; - _arrows[patternPos][wordPos] = Arrow.Left; + _table[i][j] = left; + _arrows[i][j] = Arrow.Left; } else if (left === diag) { - _table[patternPos][wordPos] = left; - _arrows[patternPos][wordPos] = Arrow.Left | Arrow.Diag; + _table[i][j] = left; + _arrows[i][j] = Arrow.Left | Arrow.Diag; } else { - _table[patternPos][wordPos] = diag; - _arrows[patternPos][wordPos] = Arrow.Diag; + _table[i][j] = diag; + _arrows[i][j] = Arrow.Diag; } } else { // top or diag if (top > diag) { - _table[patternPos][wordPos] = top; - _arrows[patternPos][wordPos] = Arrow.Top; + _table[i][j] = top; + _arrows[i][j] = Arrow.Top; } else if (top === diag) { - _table[patternPos][wordPos] = top; - _arrows[patternPos][wordPos] = Arrow.Top | Arrow.Diag; + _table[i][j] = top; + _arrows[i][j] = Arrow.Top | Arrow.Diag; } else { - _table[patternPos][wordPos] = diag; - _arrows[patternPos][wordPos] = Arrow.Diag; + _table[i][j] = diag; + _arrows[i][j] = Arrow.Diag; } } @@ -562,7 +562,7 @@ export function fuzzyScore(pattern: string, word: string, patternOffset: number } let bucket: [number, number[]][] = []; - findAllMatches(patternLen, patternLen, patternOffset, wordLen, wordOffset, 0, [], bucket, false); + findAllMatches(patternLen, patternLen, wordLen, 0, [], bucket, false); if (bucket.length === 0) { return undefined; @@ -580,7 +580,7 @@ export function fuzzyScore(pattern: string, word: string, patternOffset: number return topMatch; } -function findAllMatches(patternLen: number, patternPos: number, patternOffset: number, wordPos: number, wordOffset: number, total: number, matches: number[], bucket: [number, number[]][], lastMatched: boolean): void { +function findAllMatches(patternLen: number, patternPos: number, wordPos: number, total: number, matches: number[], bucket: [number, number[]][], lastMatched: boolean): void { if (bucket.length >= 10) { return; @@ -588,7 +588,7 @@ function findAllMatches(patternLen: number, patternPos: number, patternOffset: n let simpleMatchCount = 0; - while (patternPos > patternOffset && wordPos > wordOffset) { + while (patternPos > 0 && wordPos > 0) { let score = _scores[patternPos][wordPos]; let arrow = _arrows[patternPos][wordPos]; @@ -609,8 +609,8 @@ function findAllMatches(patternLen: number, patternPos: number, patternOffset: n if (arrow & Arrow.Left) { // left findAllMatches( - patternLen, patternPos, patternOffset, - wordPos - 1, wordOffset, + patternLen, patternPos, + wordPos - 1, matches.length !== 0 ? total - 1 : total, matches.slice(0), bucket, lastMatched ); diff --git a/src/vs/base/test/common/filters.test.ts b/src/vs/base/test/common/filters.test.ts index 797df43d1a2d6..ed8f708e757d4 100644 --- a/src/vs/base/test/common/filters.test.ts +++ b/src/vs/base/test/common/filters.test.ts @@ -325,13 +325,6 @@ suite('Filters', () => { assertMatches('f', ':foo', ':^foo', fuzzyScore); }); - test('fuzzyScore with offset', function () { - const matches = fuzzyScore('bc', 'abc', 0, 1); - assert.ok(matches); - const [, range] = matches; - assert.deepEqual(range, [1, 2]); - }); - function assertTopScore(filter: typeof fuzzyScore, pattern: string, expected: number, ...words: string[]) { let topScore = -(100 * 10); let topIdx = 0; From 76bc3fc157f6b80ca0df3d7ee6e8732c2813d886 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 24 May 2017 17:07:19 +0200 Subject: [PATCH 0995/2747] fix instantiation service warning --- .../workbench/browser/parts/activitybar/activitybarPart.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index 65d97eb74847c..4085747c90049 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -13,7 +13,7 @@ import * as arrays from 'vs/base/common/arrays'; import { illegalArgument } from 'vs/base/common/errors'; import { Builder, $, Dimension } from 'vs/base/browser/builder'; import { Action } from 'vs/base/common/actions'; -import { ActionsOrientation, ActionBar, IActionItem, Separator, IBaseActionItemOptions } from 'vs/base/browser/ui/actionbar/actionbar'; +import { ActionsOrientation, ActionBar, IActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { ViewletDescriptor } from 'vs/workbench/browser/viewlet'; import { IGlobalActivity, GlobalActivityExtensions, IGlobalActivityRegistry } from 'vs/workbench/browser/activity'; import { Registry } from 'vs/platform/platform'; @@ -51,11 +51,10 @@ class GlobalActivityActionItem extends ActivityActionItem { constructor( action: GlobalActivityAction, - options: IBaseActionItemOptions, @IThemeService themeService: IThemeService, @IContextMenuService protected contextMenuService: IContextMenuService ) { - super(action, options, themeService); + super(action, { draggable: false }, themeService); } onClick(e: MouseEvent): void { From fe740b4b6b84e27d1ffdb2fe15c5d8445d980f00 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 24 May 2017 17:31:02 +0200 Subject: [PATCH 0996/2747] make fuzzy match skip leading whitespace in pattern, fixes #26096 --- src/vs/base/common/filters.ts | 92 +++++++++++++++---------- src/vs/base/test/common/filters.test.ts | 14 +++- 2 files changed, 68 insertions(+), 38 deletions(-) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index 19056d36a50f7..cb219b5c31be1 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -448,6 +448,10 @@ _seps['\''] = true; _seps['"'] = true; _seps[':'] = true; +const _ws: { [ch: string]: boolean } = Object.create(null); +_ws[' '] = true; +_ws['\t'] = true; + const enum Arrow { Top = 0b1, Diag = 0b10, Left = 0b100 } export function fuzzyScore(pattern: string, word: string): [number, number[]] { @@ -455,7 +459,20 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { const patternLen = pattern.length > 100 ? 100 : pattern.length; const wordLen = word.length > 100 ? 100 : word.length; - if (patternLen === 0) { + // Check for leading whitespace in the pattern and + // start matching just after that position. This is + // like `pattern = pattern.rtrim()` but doesn't create + // a new string + let patternStartPos = 0; + for (const ch of pattern) { + if (_ws[ch]) { + patternStartPos += 1; + } else { + break; + } + } + + if (patternLen === patternStartPos) { return [-1, []]; } @@ -465,16 +482,17 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { const lowPattern = pattern.toLowerCase(); const lowWord = word.toLowerCase(); - let i = 0; - let j = 0; - while (i < patternLen && j < wordLen) { - if (lowPattern[i] === lowWord[j]) { - i += 1; + let patternPos = patternStartPos; + let wordPos = 0; + + while (patternPos < patternLen && wordPos < wordLen) { + if (lowPattern[patternPos] === lowWord[wordPos]) { + patternPos += 1; } - j += 1; + wordPos += 1; } - if (i !== patternLen) { + if (patternPos !== patternLen) { // no simple matches found -> return early return undefined; } @@ -482,24 +500,24 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { // keep track of the maximum score let maxScore = -1; - for (i = 1; i <= patternLen; i++) { + for (patternPos = patternStartPos + 1; patternPos <= patternLen; patternPos++) { let lastLowWordChar = ''; - for (j = 1; j <= wordLen; j++) { + for (wordPos = 1; wordPos <= wordLen; wordPos++) { let score = -1; - let lowWordChar = lowWord[j - 1]; - if (lowPattern[i - 1] === lowWordChar) { + let lowWordChar = lowWord[wordPos - 1]; + if (lowPattern[patternPos - 1] === lowWordChar) { - if (j === 1) { - if (pattern[i - 1] === word[j - 1]) { + if (wordPos === 1) { + if (pattern[patternPos - 1] === word[wordPos - 1]) { score = 7; } else { score = 5; } - } else if (lowWordChar !== word[j - 1]) { - if (pattern[i - 1] === word[j - 1]) { + } else if (lowWordChar !== word[wordPos - 1]) { + if (pattern[patternPos - 1] === word[wordPos - 1]) { score = 7; } else { score = 5; @@ -512,38 +530,38 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { } } - _scores[i][j] = score; + _scores[patternPos][wordPos] = score; if (score > maxScore) { maxScore = score; } - let diag = _table[i - 1][j - 1] + (score > 1 ? 1 : score); - let top = _table[i - 1][j] + -1; - let left = _table[i][j - 1] + -1; + let diag = _table[patternPos - 1][wordPos - 1] + (score > 1 ? 1 : score); + let top = _table[patternPos - 1][wordPos] + -1; + let left = _table[patternPos][wordPos - 1] + -1; if (left >= top) { // left or diag if (left > diag) { - _table[i][j] = left; - _arrows[i][j] = Arrow.Left; + _table[patternPos][wordPos] = left; + _arrows[patternPos][wordPos] = Arrow.Left; } else if (left === diag) { - _table[i][j] = left; - _arrows[i][j] = Arrow.Left | Arrow.Diag; + _table[patternPos][wordPos] = left; + _arrows[patternPos][wordPos] = Arrow.Left | Arrow.Diag; } else { - _table[i][j] = diag; - _arrows[i][j] = Arrow.Diag; + _table[patternPos][wordPos] = diag; + _arrows[patternPos][wordPos] = Arrow.Diag; } } else { // top or diag if (top > diag) { - _table[i][j] = top; - _arrows[i][j] = Arrow.Top; + _table[patternPos][wordPos] = top; + _arrows[patternPos][wordPos] = Arrow.Top; } else if (top === diag) { - _table[i][j] = top; - _arrows[i][j] = Arrow.Top | Arrow.Diag; + _table[patternPos][wordPos] = top; + _arrows[patternPos][wordPos] = Arrow.Top | Arrow.Diag; } else { - _table[i][j] = diag; - _arrows[i][j] = Arrow.Diag; + _table[patternPos][wordPos] = diag; + _arrows[patternPos][wordPos] = Arrow.Diag; } } @@ -562,7 +580,7 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { } let bucket: [number, number[]][] = []; - findAllMatches(patternLen, patternLen, wordLen, 0, [], bucket, false); + findAllMatches(patternLen, patternLen, patternStartPos, wordLen, 0, [], bucket, false); if (bucket.length === 0) { return undefined; @@ -580,7 +598,7 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { return topMatch; } -function findAllMatches(patternLen: number, patternPos: number, wordPos: number, total: number, matches: number[], bucket: [number, number[]][], lastMatched: boolean): void { +function findAllMatches(patternLen: number, patternPos: number, patternStartPos: number, wordPos: number, total: number, matches: number[], bucket: [number, number[]][], lastMatched: boolean): void { if (bucket.length >= 10) { return; @@ -588,7 +606,7 @@ function findAllMatches(patternLen: number, patternPos: number, wordPos: number, let simpleMatchCount = 0; - while (patternPos > 0 && wordPos > 0) { + while (patternPos > patternStartPos && wordPos > 0) { let score = _scores[patternPos][wordPos]; let arrow = _arrows[patternPos][wordPos]; @@ -609,7 +627,7 @@ function findAllMatches(patternLen: number, patternPos: number, wordPos: number, if (arrow & Arrow.Left) { // left findAllMatches( - patternLen, patternPos, + patternLen, patternPos, patternStartPos, wordPos - 1, matches.length !== 0 ? total - 1 : total, matches.slice(0), bucket, lastMatched @@ -635,7 +653,7 @@ function findAllMatches(patternLen: number, patternPos: number, wordPos: number, } } - if (matches.length !== patternLen) { + if (matches.length !== patternLen - patternStartPos) { // doesn't cover whole pattern return undefined; } diff --git a/src/vs/base/test/common/filters.test.ts b/src/vs/base/test/common/filters.test.ts index ed8f708e757d4..4753059f57c39 100644 --- a/src/vs/base/test/common/filters.test.ts +++ b/src/vs/base/test/common/filters.test.ts @@ -195,7 +195,7 @@ suite('Filters', () => { function assertMatches(pattern: string, word: string, decoratedWord: string, filter: typeof fuzzyScore) { let r = filter(pattern, word); - assert.ok(Boolean(r) === Boolean(decoratedWord)); + assert.ok(!decoratedWord === (!r || r[1].length === 0)); if (r) { const [, matches] = r; let pos = 0; @@ -325,6 +325,18 @@ suite('Filters', () => { assertMatches('f', ':foo', ':^foo', fuzzyScore); }); + test('Vscode 1.12 no longer obeys \'sortText\' in completion items (from language server), #26096', function () { + assertMatches(' ', ' group', undefined, fuzzyScore); + assertMatches(' g', ' group', ' ^group', fuzzyScore); + assertMatches('g', ' group', ' ^group', fuzzyScore); + assertMatches('g g', ' groupGroup', undefined, fuzzyScore); + assertMatches('g g', ' group Group', ' ^group^ ^Group', fuzzyScore); + assertMatches(' g g', ' group Group', ' ^group^ ^Group', fuzzyScore); + assertMatches('zz', 'zzGroup', '^z^zGroup', fuzzyScore); + assertMatches('zzg', 'zzGroup', '^z^z^Group', fuzzyScore); + assertMatches('g', 'zzGroup', 'zz^Group', fuzzyScore); + }); + function assertTopScore(filter: typeof fuzzyScore, pattern: string, expected: number, ...words: string[]) { let topScore = -(100 * 10); let topIdx = 0; From 2b931936098af1b362a947e7ac321ae2f245f236 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 24 May 2017 17:37:22 +0200 Subject: [PATCH 0997/2747] Modularised tests. --- test/smoke/src/mocha-runner.js | 1 + test/smoke/src/spectron/application.ts | 8 +- test/smoke/src/tests.ts | 791 +------------------- test/smoke/src/tests/configuration-views.ts | 57 ++ test/smoke/src/tests/css.ts | 61 ++ test/smoke/src/tests/data-loss.ts | 76 ++ test/smoke/src/tests/data-migration.ts | 98 +++ test/smoke/src/tests/explorer.ts | 42 ++ test/smoke/src/tests/extensions.ts | 57 ++ test/smoke/src/tests/git.ts | 69 ++ test/smoke/src/tests/integrated-terminal.ts | 41 + test/smoke/src/tests/javascript-debug.ts | 44 ++ test/smoke/src/tests/javascript.ts | 86 +++ test/smoke/src/tests/localization.ts | 49 ++ test/smoke/src/tests/search.ts | 73 ++ test/smoke/src/tests/statusbar.ts | 94 +++ test/smoke/src/tests/tasks.ts | 56 ++ 17 files changed, 939 insertions(+), 764 deletions(-) create mode 100644 test/smoke/src/tests/configuration-views.ts create mode 100644 test/smoke/src/tests/css.ts create mode 100644 test/smoke/src/tests/data-loss.ts create mode 100644 test/smoke/src/tests/data-migration.ts create mode 100644 test/smoke/src/tests/explorer.ts create mode 100644 test/smoke/src/tests/extensions.ts create mode 100644 test/smoke/src/tests/git.ts create mode 100644 test/smoke/src/tests/integrated-terminal.ts create mode 100644 test/smoke/src/tests/javascript-debug.ts create mode 100644 test/smoke/src/tests/javascript.ts create mode 100644 test/smoke/src/tests/localization.ts create mode 100644 test/smoke/src/tests/search.ts create mode 100644 test/smoke/src/tests/statusbar.ts create mode 100644 test/smoke/src/tests/tasks.ts diff --git a/test/smoke/src/mocha-runner.js b/test/smoke/src/mocha-runner.js index 2a08adca647c7..8ea1dd905aa1e 100644 --- a/test/smoke/src/mocha-runner.js +++ b/test/smoke/src/mocha-runner.js @@ -5,6 +5,7 @@ var Mocha = require('mocha'); var path = require('path'); +var fs = require('fs'); var mocha = new Mocha({ timeout: 360000, diff --git a/test/smoke/src/spectron/application.ts b/test/smoke/src/spectron/application.ts index d1027a1ef7009..0c8896bcc8d7a 100644 --- a/test/smoke/src/spectron/application.ts +++ b/test/smoke/src/spectron/application.ts @@ -9,6 +9,12 @@ import { Screenshot } from "../helpers/screenshot"; var fs = require('fs'); var path = require('path'); +export const LATEST_PATH = process.env.VSCODE_LATEST_PATH; +export const STABLE_PATH = process.env.VSCODE_STABLE_PATH; +export const WORKSPACE_PATH = process.env.SMOKETEST_REPO; +export const USER_DIR = 'test_data/temp_user_dir'; +export const EXTENSIONS_DIR = 'test_data/temp_extensions_dir'; + /** * Wraps Spectron's Application instance with its used methods. */ @@ -17,7 +23,7 @@ export class SpectronApplication { private spectron: Application; private readonly pollTrials = 5; - private readonly pollTimeout = 3; // in secs + private readonly pollTimeout = 3; // in secs private keybindings: any[]; private screenshot: Screenshot; diff --git a/test/smoke/src/tests.ts b/test/smoke/src/tests.ts index 35d6d1f79ac40..17ca694e20936 100644 --- a/test/smoke/src/tests.ts +++ b/test/smoke/src/tests.ts @@ -3,769 +3,34 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as assert from 'assert'; -import { SpectronApplication } from "./spectron/application"; -import { CommonActions } from './areas/common'; -// import { FirstExperience } from './areas/first-experience'; -import { ConfigurationView, ActivityBarPosition } from './areas/configuration-views'; -import { Search } from './areas/search'; -import { CSS, CSSProblem } from './areas/css'; -import { JavaScript } from './areas/javascript'; -import { JavaScriptDebug } from './areas/javascript-debug'; -import { Git } from './areas/git'; -import { IntegratedTerminal } from './areas/integrated-terminal'; -import { StatusBar, StatusBarElement } from './areas/statusBar'; -import { DataLoss } from './areas/data-loss'; -import { Tasks } from './areas/tasks'; -import { Extensions } from './areas/extensions'; -import { Localization, ViewletType } from "./areas/localization"; +import { dataLoss } from "./tests/data-loss"; +import { dataMigration } from "./tests/data-migration"; +import { explorer } from "./tests/explorer"; +import { configurationViews } from "./tests/configuration-views"; +import { search } from "./tests/search"; +import { css } from "./tests/css"; +import { javascript } from "./tests/javascript"; +import { javascriptDebug } from "./tests/javascript-debug"; +import { test_git } from "./tests/git"; +import { integratedTerminal } from "./tests/integrated-terminal"; +import { statusBar } from "./tests/statusbar"; +import { tasks } from "./tests/tasks"; +import { extensions } from "./tests/extensions"; +import { localization } from "./tests/localization"; describe('Smoke Test Suite', function () { - const latestPath = process.env.VSCODE_LATEST_PATH; - const stablePath = process.env.VSCODE_STABLE_PATH; - // const insiders = process.env.VSCODE_EDITION; - const workspacePath = process.env.SMOKETEST_REPO; - const tempUserDir = 'test_data/temp_user_dir'; - const tempExtensionsDir = 'test_data/temp_extensions_dir'; - - let app: SpectronApplication; - let common: CommonActions; - - if (stablePath) { - context('Data Migration', function () { - - afterEach(async function () { - await app.stop(); - return await common.removeDirectory(tempUserDir) - }); - - function setupSpectron(context: Mocha.ITestCallbackContext, appPath: string, workspace?: string[]): void { - app = new SpectronApplication(appPath, context.test.fullTitle(), context.test.currentRetry(), workspace, [`--user-data-dir=${tempUserDir}`]); - common = new CommonActions(app); - } - - it('checks if the Untitled file is restored migrating from stable to latest', async function () { - const textToType = 'Very dirty file'; - - // Setting up stable version - setupSpectron(this, stablePath); - await app.start(); - - await common.newUntitledFile(); - await common.type(textToType); - await app.stop(); - - await app.wait(); // wait until all resources are released (e.g. locked local storage) - - // Checking latest version for the restored state - setupSpectron(this, latestPath); - await app.start(); - - assert.ok(await common.getTab('Untitled-1')); - await common.selectTab('Untitled-1'); - const editorText = await common.getEditorFirstLinePlainText(); - assert.equal(editorText, textToType); - }); - - it('checks if the newly created dirty file is restored migrating from stable to latest', async function () { - const fileName = 'test_data/plainFile', - firstTextPart = 'This is going to be an unsaved file', secondTextPart = '_that is dirty.'; - - // Setting up stable version - setupSpectron(this, stablePath, [fileName]); - await common.removeFile(`${fileName}`); - await app.start(); - - await common.type(firstTextPart); - await common.saveOpenedFile(); - await app.wait(); - await common.type(secondTextPart); - - await app.stop(); - await app.wait(); // wait until all resources are released (e.g. locked local storage) - - // Checking latest version for the restored state - setupSpectron(this, latestPath); - await app.start(); - assert.ok(await common.getTab(fileName.split('/')[1])); - await common.selectTab(fileName.split('/')[1]); - const editorText = await common.getEditorFirstLinePlainText(); - assert.equal(editorText, firstTextPart.concat(secondTextPart)); - - // Cleanup - await common.removeFile(`${fileName}`); - }); - - it('cheks if opened tabs are restored migrating from stable to latest', async function () { - const fileName1 = 'app.js', fileName2 = 'jsconfig.json', fileName3 = 'readme.md'; - setupSpectron(this, stablePath, [workspacePath]); - await app.start(); - await common.openFile(fileName1, true); - await common.openFile(fileName2, true); - await common.openFile(fileName3, true); - await app.stop(); - - setupSpectron(this, latestPath, [workspacePath]); - await app.start(); - assert.ok(await common.getTab(fileName1)); - assert.ok(await common.getTab(fileName2)); - assert.ok(await common.getTab(fileName3)); - }); - }); - } - - context('Data Loss', function () { - let dataLoss: DataLoss; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath], [`--user-data-dir=${tempUserDir}`]); - common = new CommonActions(app); - dataLoss = new DataLoss(app); - await common.removeDirectory(tempUserDir); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it(`verifies that 'hot exit' works for dirty files`, async function () { - const textToType = 'Hello, Code!', fileName = 'readme.md', untitled = 'Untitled-1'; - await common.newUntitledFile(); - await common.type(textToType); - await dataLoss.openExplorerViewlet(); - await common.openFile(fileName, true); - await common.type(textToType); - - await app.stop(); - await app.start(); - - // check tab presence - assert.ok(await common.getTab(untitled)); - assert.ok(await common.getTab(fileName, true)); - // check if they marked as dirty (icon) and active tab is the last opened - assert.ok(await dataLoss.verifyTabIsDirty(untitled)); - assert.ok(await dataLoss.verifyTabIsDirty(fileName, true)); - }); - - it(`verifies that contents of the dirty files are restored after 'hot exit'`, async function () { - // make one dirty file, - // create one untitled file - const textToType = 'Hello, Code!'; - - // create one untitled file - await common.newUntitledFile(); - await app.wait(); - await common.type(textToType); - - // make one dirty file, - await common.openFile('readme.md', true); - await app.wait(); - await common.type(textToType); - - await app.stop(); - await app.start(); - - // check their contents - let fileDirt = await common.getEditorFirstLinePlainText(); - assert.equal(fileDirt, 'Hello, Code'); // ignore '!' as it is a separate , first part is enough - await common.selectTab('Untitled-1'); - fileDirt = await common.getEditorFirstLinePlainText(); - assert.equal(fileDirt, textToType); - }); - }); - - // Do not run until experiments are finished over the first-time startup behaviour. - // context('First User Experience', function () { - // let experience: FirstExperience; - - // beforeEach(async function () { - // app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), undefined, [`--user-data-dir=${tempUserDir}`, `--excludeSwitches=load-component-extension`]); - // common = new CommonActions(app); - // experience = new FirstExperience(app); - - // await common.removeDirectory(tempUserDir); - // return await app.start(); - // }); - // afterEach(async function () { - // return await app.stop(); - // }); - - // it(`verifies if title is set correctly on the clean user-directory startup`, async function () { - // const title = await common.getWindowTitle(); - - // let expectedTitle = 'Welcome'; - // if (process.platform !== 'darwin') { - // expectedTitle += ' — Visual Studio Code'; - // if (insiders) expectedTitle += ' - Insiders'; - // } - - // assert.equal(title, expectedTitle); - // }); - - // it(`verifies if 'Welcome page' tab is presented on the clean user-directory startup`, async function () { - // assert.ok(await experience.getWelcomeTab()); - // }); - // }); - - context('Explorer', function () { - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('quick open search produces correct result', async function () { - await common.openQuickOpen(); - await common.type('.js'); - await app.wait(); - const elCount = await common.getQuickOpenElements(); - assert.equal(elCount, 7); - }); - - it('quick open respects fuzzy matching', async function () { - await common.openQuickOpen(); - await common.type('a.s'); - await app.wait(); - const elCount = await common.getQuickOpenElements(); - assert.equal(elCount, 3); - }); - }); - - context('Configuration and views', function () { - let configView: ConfigurationView; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - configView = new ConfigurationView(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('turns off editor line numbers and verifies the live change', async function () { - await common.newUntitledFile(); - await app.wait(); - let elements = await configView.getEditorLineNumbers(); - assert.equal(elements.value.length, 1); - await common.addSetting('editor.lineNumbers', 'off'); - await app.wait(); - elements = await configView.getEditorLineNumbers(); - assert.equal(elements.value.length, 0); - }); - - it(`changes 'workbench.action.toggleSidebarPosition' command key binding and verifies it`, async function () { - await configView.enterKeybindingsView() - await common.type('workbench.action.toggleSidebarPosition'); - await app.wait(); - await configView.selectFirstKeybindingsMatch(); - await configView.changeKeybinding(); - await configView.enterBinding(['Control', 'u', 'NULL']); - await common.enter(); - let html = await configView.getActivityBar(ActivityBarPosition.RIGHT); - assert.equal(html, undefined);; - await app.wait(); - await configView.toggleActivityBarPosition(); - html = await configView.getActivityBar(ActivityBarPosition.RIGHT); - assert.ok(html); - }); - }); - - context('Search', function () { - let search: Search; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - search = new Search(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('searches for body & checks for correct result number', async function () { - const s = search; - await s.openSearchViewlet(); - await s.searchFor('body'); - const result = await s.getResultText(); - assert.equal(result, '7 results in 4 files'); - }); - - it('searches only for *.js files & checks for correct result number', async function () { - const s = search; - await s.openSearchViewlet(); - await s.searchFor('body'); - await s.toggleSearchDetails(); - await s.searchFor('*.js'); - const results = await s.getResultText(); - assert.equal(results, '4 results in 1 file'); - }); - - it('dismisses result & checks for correct result number', async function () { - const s = search; - await s.openSearchViewlet() - await s.searchFor('body'); - await s.hoverOverResultCount(); - await s.dismissResult(); - await app.wait(); - const result = await s.getResultText(); - assert.equal(result, '3 results in 3 files') - }); - - it('replaces first search result with a replace term', async function () { - const s = search; - await s.openSearchViewlet() - await s.searchFor('body'); - await s.toggleReplace(); - await s.setReplaceText('ydob'); - await s.hoverOverResultCount(); - await s.replaceFirstMatch(); - await app.wait(); - await common.saveOpenedFile(); - const result = await s.getResultText(); - assert.equal(result, '3 results in 3 files'); - }); - }); - - context('CSS', function () { - let css: CSS; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - css = new CSS(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('verifies quick outline', async function () { - await common.openFirstMatchFile('style.css'); - await css.openQuickOutline(); - await app.wait(); - const count = await common.getQuickOpenElements(); - assert.equal(count, 2); - }); - - it('verifies warnings for the empty rule', async function () { - await common.openFirstMatchFile('style.css'); - await common.type('.foo{}'); - await app.wait(); - let warning = await css.getEditorProblem(CSSProblem.WARNING); - assert.ok(warning); - await css.toggleProblemsView(); - warning = await css.getProblemsViewsProblem(CSSProblem.WARNING); - assert.ok(warning); - }); - - it('verifies that warning becomes an error once setting changed', async function () { - await common.addSetting('css.lint.emptyRules', 'error'); - await common.openFirstMatchFile('style.css'); - await common.type('.foo{}'); - await app.wait(); - let error = await css.getEditorProblem(CSSProblem.ERROR); - assert.ok(error); - await css.toggleProblemsView(); - error = await css.getProblemsViewsProblem(CSSProblem.ERROR); - assert.ok(error); - }); - }); - - context('JavaScript', function () { - let js: JavaScript; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - js = new JavaScript(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('shows correct quick outline', async function () { - await common.openFirstMatchFile('bin/www'); - await js.openQuickOutline(); - await app.wait(); - const symbols = await common.getQuickOpenElements(); - assert.equal(symbols, 12); - }); - - it(`finds 'All References' to 'app'`, async function () { - await common.openFirstMatchFile('bin/www'); - await app.wait(); - await js.findAppReferences(); - const titleCount = await js.getTitleReferencesCount(); - assert.equal(titleCount, 3); - const treeCount = await js.getTreeReferencesCount(); - assert.equal(treeCount, 3); - }); - - it(`renames local 'app' variable`, async function () { - await common.openFirstMatchFile('bin/www'); - - const newVarName = 'newApp'; - await js.renameApp(newVarName); - await common.enter(); - const newName = await js.getNewAppName(); - assert.equal(newName, newVarName); - }); - - it('folds/unfolds the code correctly', async function () { - await common.openFirstMatchFile('bin/www'); - // Fold - await js.toggleFirstCommentFold(); - const foldedIcon = await js.getFirstCommentFoldedIcon(); - assert.ok(foldedIcon); - let nextLineNumber = await js.getNextLineNumberAfterFold(); - assert.equal(nextLineNumber, 7); - // Unfold - await js.toggleFirstCommentFold(); - nextLineNumber = await js.getNextLineNumberAfterFold(); - assert.equal(nextLineNumber, 4); - }); - - it(`verifies that 'Go To Definition' works`, async function () { - await common.openFirstMatchFile('app.js'); - await js.goToExpressDefinition(); - await app.wait(); - assert.ok(await common.getTab('index.d.ts')); - }); - - it(`verifies that 'Peek Definition' works`, async function () { - await common.openFirstMatchFile('app.js'); - await js.peekExpressDefinition(); - const definitionFilename = await js.getPeekExpressResultName(); - assert.equal(definitionFilename, 'index.d.ts'); - }); - }); - - context('Debugging JavaScript', function () { - let jsDebug: JavaScriptDebug; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - jsDebug = new JavaScriptDebug(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('autodetects program attribute for launch.json', async function () { - await jsDebug.openDebugViewlet(); - await jsDebug.pressConfigureLaunchJson(); - const value = await jsDebug.getProgramConfigValue(); - process.platform === 'win32' ? assert.equal(value, '"${workspaceRoot}\\\\bin\\\\www"') : assert.equal(value, '"${workspaceRoot}/bin/www"'); - }); - - it(`can set a breakpoint and verify if it's set`, async function () { - await common.openFirstMatchFile('index.js'); - await jsDebug.setBreakpointOnLine(6); - const breakpoint = await jsDebug.verifyBreakpointOnLine(6); - assert.ok(breakpoint); - }); - }); - - context('Git', function () { - let git: Git; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - git = new Git(app, common); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('verifies current changes are picked up by Git viewlet', async function () { - const changesCount = await git.getScmIconChanges(); - assert.equal(changesCount, 2); - await git.openGitViewlet(); - assert.ok(await git.verifyScmChange('app.js')); - assert.ok(await git.verifyScmChange('launch.json')); - }); - - it(`verifies 'app.js' diff viewer changes`, async function () { - await git.openGitViewlet(); - await common.openFile('app.js'); - const original = await git.getOriginalAppJsBodyVarName(); - assert.equal(original, 'bodyParser'); - const modified = await git.getModifiedAppJsBodyVarName(); - assert.equal(modified, 'ydobParser'); - }); - - it(`stages 'app.js' changes and checks stage count`, async function () { - await git.openGitViewlet(); - await app.wait(); - await git.stageFile('app.js'); - const stagedCount = await git.getStagedCount(); - assert.equal(stagedCount, 1); - - // Return back to unstaged state - await git.unstageFile('app.js'); - }); - - it(`stages, commits change to 'app.js' locally and verifies outgoing change`, async function () { - await git.openGitViewlet(); - await app.wait(); - await git.stageFile('app.js'); - await git.focusOnCommitBox(); - await common.type('Test commit'); - await git.pressCommit(); - const changes = await git.getOutgoingChanges(); - assert.equal(changes, ' 0↓ 1↑'); - }); - }); - - context('Integrated Terminal', function () { - let terminal: IntegratedTerminal; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - terminal = new IntegratedTerminal(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it(`opens terminal, runs 'echo' and verifies the output`, async function () { - const command = 'echo test'; - await terminal.openTerminal(common); - await app.wait(); - await common.type(command); - await common.enter(); - await app.wait(); - let output = await terminal.getCommandOutput(command); - assert.equal(output, 'test'); - }); - }); - - context('Status Bar', function () { - let statusBar: StatusBar; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - statusBar = new StatusBar(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('verifies presence of all default status bar elements', async function () { - await app.wait(); - assert.ok(await statusBar.isVisible(StatusBarElement.BRANCH_STATUS)); - assert.ok(await statusBar.isVisible(StatusBarElement.FEEDBACK_ICON)); - assert.ok(await statusBar.isVisible(StatusBarElement.SYNC_STATUS)); - assert.ok(await statusBar.isVisible(StatusBarElement.PROBLEMS_STATUS)); - - await common.openFirstMatchFile('app.js'); - assert.ok(await statusBar.isVisible(StatusBarElement.ENCODING_STATUS)); - assert.ok(await statusBar.isVisible(StatusBarElement.EOL_STATUS)); - assert.ok(await statusBar.isVisible(StatusBarElement.INDENTATION_STATUS)); - assert.ok(await statusBar.isVisible(StatusBarElement.LANGUAGE_STATUS)); - assert.ok(await statusBar.isVisible(StatusBarElement.SELECTION_STATUS)); - }); - - it(`verifies that 'quick open' opens when clicking on 'Branch', 'Indentation Status, 'Encoding', 'EOL' and 'Language' status elements`, async function () { - await app.wait(); - await statusBar.clickOn(StatusBarElement.BRANCH_STATUS); - assert.ok(await statusBar.isQuickOpenWidgetVisible()); - await common.closeQuickOpen(); - - await common.openFirstMatchFile('app.js'); - await statusBar.clickOn(StatusBarElement.INDENTATION_STATUS); - assert.ok(await statusBar.isQuickOpenWidgetVisible()); - await common.closeQuickOpen(); - await statusBar.clickOn(StatusBarElement.ENCODING_STATUS); - assert.ok(await statusBar.isQuickOpenWidgetVisible()); - await common.closeQuickOpen(); - await statusBar.clickOn(StatusBarElement.EOL_STATUS); - assert.ok(await statusBar.isQuickOpenWidgetVisible()); - await common.closeQuickOpen(); - await statusBar.clickOn(StatusBarElement.LANGUAGE_STATUS); - assert.ok(await statusBar.isQuickOpenWidgetVisible()); - await common.closeQuickOpen(); - }); - - it(`verifies that 'Problems View' appears when clicking on 'Problems' status element`, async function () { - await statusBar.clickOn(StatusBarElement.PROBLEMS_STATUS); - assert.ok(await statusBar.getProblemsView()); - }); - - it(`verifies that 'Tweet us feedback' pop-up appears when clicking on 'Feedback' icon`, async function () { - await statusBar.clickOn(StatusBarElement.FEEDBACK_ICON); - assert.ok(await statusBar.getFeedbackView()); - }); - - it(`checks if 'Go to Line' works if called from the status bar`, async function () { - await common.openFirstMatchFile('app.js'); - await statusBar.clickOn(StatusBarElement.SELECTION_STATUS); - const lineNumber = 15; - await common.type(lineNumber.toString()); - await common.enter(); - assert.ok(await statusBar.getEditorHighlightedLine(lineNumber)); - }); - - it(`verifies if changing EOL is reflected in the status bar`, async function () { - await common.openFirstMatchFile('app.js'); - await statusBar.clickOn(StatusBarElement.EOL_STATUS); - await common.selectNextQuickOpenElement(); - await common.enter(); - const currentEOL = await statusBar.getEOLMode(); - assert.equal(currentEOL, 'CRLF'); - }); - }); - - context('Tasks', function () { - let tasks: Tasks; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - tasks = new Tasks(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('verifies that build task produces 6 errors', async function () { - await tasks.build(); - const res = await tasks.getOutputResult(); - assert.equal(res, '✖ 6 problems (6 errors, 0 warnings)'); - }); - - it(`is able to select 'Git' output`, async function () { - await tasks.build(); - await app.wait(); - await tasks.selectOutputViewType('Git'); - const viewType = await tasks.getOutputViewType(); - assert.equal(viewType, 'Git'); - }); - - it('ensures that build task produces errors in index.js', async function () { - await tasks.build(); - assert.ok(await tasks.firstOutputLineEndsWith('index.js')); - }); - - it(`verifies build errors are reflected in 'Problems View'`, async function () { - await tasks.build(); - await app.wait(); - await tasks.openProblemsView(); - const problemName = await tasks.getProblemsViewFirstElementName(); - assert.equal(problemName, 'index.js'); - const problemsCount = await tasks.getProblemsViewFirstElementCount(); - assert.equal(problemsCount, '6'); - }); - }); - - context('Extensions', function () { - let extensions: Extensions; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath], [`--extensions-dir=${tempExtensionsDir}`]); - common = new CommonActions(app); - extensions = new Extensions(app, common); - await common.removeDirectory(tempExtensionsDir); - - return await app.start(); - }); - afterEach(async function () { - await app.stop(); - return await common.removeDirectory(tempExtensionsDir); - }); - - it(`installs 'vscode-icons' extension and verifies reload is prompted`, async function () { - await extensions.openExtensionsViewlet(); - await extensions.searchForExtension('vscode-icons'); - await app.wait(); - await extensions.installFirstResult(); - await app.wait(); - assert.ok(await extensions.getFirstReloadText()); - }); - - it(`installs an extension and checks if it works on restart`, async function () { - await extensions.openExtensionsViewlet(); - await extensions.searchForExtension('vscode-icons'); - await app.wait(); - await extensions.installFirstResult(); - await app.wait(); - await extensions.getFirstReloadText(); - - await app.stop(); - await app.wait(); // wait until all resources are released (e.g. locked local storage) - await app.start(); - await extensions.selectMinimalIconsTheme(); - const x = await extensions.verifyFolderIconAppearance(); - assert.ok(x); - }); - }); - - context('Localization', function () { - afterEach(async function () { - return await app.stop(); - }); - - it(`starts with 'DE' locale and verifies title and viewlets text is in German`, async function () { - app = new SpectronApplication(latestPath, this.test.fullTitle(), this.test.currentRetry(), [workspacePath, '--locale=DE'], [`--user-data-dir=${tempUserDir}`]); - common = new CommonActions(app); - const locale = new Localization(app); - common.removeDirectory(tempUserDir); - - await app.start(); - - // Do not run until experiments are finished over the first-time startup behaviour. - // let expectedTitle = 'Willkommen — vscode-smoketest-express'; - // if (process.platform !== 'darwin') { - // expectedTitle += ' — Visual Studio Code'; - // if (insiders) expectedTitle += ' - Insiders'; - // } - // assert.equal(await common.getWindowTitle(), expectedTitle); - - let text = await locale.getOpenEditorsText(); - assert.equal(text.toLowerCase(), 'geöffnete editoren'); - - await locale.openViewlet(ViewletType.SEARCH); - text = await locale.getOpenedViewletTitle() - assert.equal(text.toLowerCase(), 'suchen'); - - await locale.openViewlet(ViewletType.SCM); - text = await locale.getOpenedViewletTitle(); - assert.equal(text.toLowerCase(), 'quellcodeverwaltung: git'); - - await locale.openViewlet(ViewletType.DEBUG); - text = await locale.getOpenedViewletTitle(); - assert.equal(text.toLowerCase(), 'debuggen'); - - await locale.openViewlet(ViewletType.EXTENSIONS); - text = await locale.getExtensionsSearchPlaceholder(); - assert.equal(text.toLowerCase(), 'nach erweiterungen im marketplace suchen'); - }); - }); - + dataMigration(); + dataLoss(); + explorer(); + configurationViews(); + search(); + css(); + javascript(); + javascriptDebug(); + test_git(); + integratedTerminal(); + statusBar(); + tasks(); + extensions(); + localization(); }); \ No newline at end of file diff --git a/test/smoke/src/tests/configuration-views.ts b/test/smoke/src/tests/configuration-views.ts new file mode 100644 index 0000000000000..2f61f3337fb63 --- /dev/null +++ b/test/smoke/src/tests/configuration-views.ts @@ -0,0 +1,57 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { ConfigurationView, ActivityBarPosition } from "../areas/configuration-views"; + +let app: SpectronApplication; +let common: CommonActions; + +export function configurationViews() { + context('Configuration and views', function () { + let configView: ConfigurationView; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + configView = new ConfigurationView(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('turns off editor line numbers and verifies the live change', async function () { + await common.newUntitledFile(); + await app.wait(); + let elements = await configView.getEditorLineNumbers(); + assert.equal(elements.value.length, 1); + await common.addSetting('editor.lineNumbers', 'off'); + await app.wait(); + elements = await configView.getEditorLineNumbers(); + assert.equal(elements.value.length, 0); + }); + + it(`changes 'workbench.action.toggleSidebarPosition' command key binding and verifies it`, async function () { + await configView.enterKeybindingsView(); + await common.type('workbench.action.toggleSidebarPosition'); + await app.wait(); + await configView.selectFirstKeybindingsMatch(); + await configView.changeKeybinding(); + await configView.enterBinding(['Control', 'u', 'NULL']); + await common.enter(); + let html = await configView.getActivityBar(ActivityBarPosition.RIGHT); + assert.equal(html, undefined);; + await app.wait(); + await configView.toggleActivityBarPosition(); + html = await configView.getActivityBar(ActivityBarPosition.RIGHT); + assert.ok(html); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/css.ts b/test/smoke/src/tests/css.ts new file mode 100644 index 0000000000000..01a0bddbe2589 --- /dev/null +++ b/test/smoke/src/tests/css.ts @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { CSS, CSSProblem } from '../areas/css'; + +let app: SpectronApplication; +let common: CommonActions; + +export function css() { + context('CSS', function () { + let css: CSS; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + css = new CSS(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('verifies quick outline', async function () { + await common.openFirstMatchFile('style.css'); + await css.openQuickOutline(); + await app.wait(); + const count = await common.getQuickOpenElements(); + assert.equal(count, 2); + }); + + it('verifies warnings for the empty rule', async function () { + await common.openFirstMatchFile('style.css'); + await common.type('.foo{}'); + await app.wait(); + let warning = await css.getEditorProblem(CSSProblem.WARNING); + assert.ok(warning); + await css.toggleProblemsView(); + warning = await css.getProblemsViewsProblem(CSSProblem.WARNING); + assert.ok(warning); + }); + + it('verifies that warning becomes an error once setting changed', async function () { + await common.addSetting('css.lint.emptyRules', 'error'); + await common.openFirstMatchFile('style.css'); + await common.type('.foo{}'); + await app.wait(); + let error = await css.getEditorProblem(CSSProblem.ERROR); + assert.ok(error); + await css.toggleProblemsView(); + error = await css.getProblemsViewsProblem(CSSProblem.ERROR); + assert.ok(error); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/data-loss.ts b/test/smoke/src/tests/data-loss.ts new file mode 100644 index 0000000000000..4be1635cfcefa --- /dev/null +++ b/test/smoke/src/tests/data-loss.ts @@ -0,0 +1,76 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, USER_DIR, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { DataLoss } from "../areas/data-loss"; + +let app: SpectronApplication; +let common: CommonActions; +let dl: DataLoss; + +export function dataLoss() { + context('Data Loss', function () { + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH], [`--user-data-dir=${USER_DIR}`]); + common = new CommonActions(app); + dl = new DataLoss(app); + await common.removeDirectory(USER_DIR); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it(`verifies that 'hot exit' works for dirty files`, async function () { + const textToType = 'Hello, Code!', fileName = 'readme.md', untitled = 'Untitled-1'; + await common.newUntitledFile(); + await common.type(textToType); + await dl.openExplorerViewlet(); + await common.openFile(fileName, true); + await common.type(textToType); + + await app.stop(); + await app.start(); + + // check tab presence + assert.ok(await common.getTab(untitled)); + assert.ok(await common.getTab(fileName, true)); + // check if they marked as dirty (icon) and active tab is the last opened + assert.ok(await dl.verifyTabIsDirty(untitled)); + assert.ok(await dl.verifyTabIsDirty(fileName, true)); + }); + + it(`verifies that contents of the dirty files are restored after 'hot exit'`, async function () { + // make one dirty file, + // create one untitled file + const textToType = 'Hello, Code!'; + + // create one untitled file + await common.newUntitledFile(); + await app.wait(); + await common.type(textToType); + + // make one dirty file, + await common.openFile('readme.md', true); + await app.wait(); + await common.type(textToType); + + await app.stop(); + await app.start(); + + // check their contents + let fileDirt = await common.getEditorFirstLinePlainText(); + assert.equal(fileDirt, 'Hello, Code'); // ignore '!' as it is a separate , first part is enough + await common.selectTab('Untitled-1'); + fileDirt = await common.getEditorFirstLinePlainText(); + assert.equal(fileDirt, textToType); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/data-migration.ts b/test/smoke/src/tests/data-migration.ts new file mode 100644 index 0000000000000..0dba58deccbc0 --- /dev/null +++ b/test/smoke/src/tests/data-migration.ts @@ -0,0 +1,98 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, USER_DIR, STABLE_PATH, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; + +let app: SpectronApplication; +let common: CommonActions; + +export function dataMigration() { + if (!STABLE_PATH) { + return; + } + context('Data Migration', function () { + + afterEach(async function () { + await app.stop(); + return await common.removeDirectory(USER_DIR) + }); + + function setupSpectron(context: Mocha.ITestCallbackContext, appPath: string, workspace?: string[]): void { + app = new SpectronApplication(appPath, context.test.fullTitle(), context.test.currentRetry(), workspace, [`--user-data-dir=${USER_DIR}`]); + common = new CommonActions(app); + } + + it('checks if the Untitled file is restored migrating from stable to latest', async function () { + const textToType = 'Very dirty file'; + + // Setting up stable version + setupSpectron(this, STABLE_PATH); + await app.start(); + + await common.newUntitledFile(); + await common.type(textToType); + await app.stop(); + + await app.wait(); // wait until all resources are released (e.g. locked local storage) + + // Checking latest version for the restored state + setupSpectron(this, LATEST_PATH); + await app.start(); + + assert.ok(await common.getTab('Untitled-1')); + await common.selectTab('Untitled-1'); + const editorText = await common.getEditorFirstLinePlainText(); + assert.equal(editorText, textToType); + }); + + it('checks if the newly created dirty file is restored migrating from stable to latest', async function () { + const fileName = 'test_data/plainFile', + firstTextPart = 'This is going to be an unsaved file', secondTextPart = '_that is dirty.'; + + // Setting up stable version + setupSpectron(this, STABLE_PATH, [fileName]); + await common.removeFile(`${fileName}`); + await app.start(); + + await common.type(firstTextPart); + await common.saveOpenedFile(); + await app.wait(); + await common.type(secondTextPart); + + await app.stop(); + await app.wait(); // wait until all resources are released (e.g. locked local storage) + + // Checking latest version for the restored state + setupSpectron(this, LATEST_PATH); + await app.start(); + assert.ok(await common.getTab(fileName.split('/')[1])); + await common.selectTab(fileName.split('/')[1]); + const editorText = await common.getEditorFirstLinePlainText(); + assert.equal(editorText, firstTextPart.concat(secondTextPart)); + + // Cleanup + await common.removeFile(`${fileName}`); + }); + + it('cheks if opened tabs are restored migrating from stable to latest', async function () { + const fileName1 = 'app.js', fileName2 = 'jsconfig.json', fileName3 = 'readme.md'; + setupSpectron(this, STABLE_PATH, [WORKSPACE_PATH]); + await app.start(); + await common.openFile(fileName1, true); + await common.openFile(fileName2, true); + await common.openFile(fileName3, true); + await app.stop(); + + setupSpectron(this, LATEST_PATH, [WORKSPACE_PATH]); + await app.start(); + assert.ok(await common.getTab(fileName1)); + assert.ok(await common.getTab(fileName2)); + assert.ok(await common.getTab(fileName3)); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/explorer.ts b/test/smoke/src/tests/explorer.ts new file mode 100644 index 0000000000000..83c2d114196f0 --- /dev/null +++ b/test/smoke/src/tests/explorer.ts @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; + +let app: SpectronApplication; +let common: CommonActions; + +export function explorer() { + context('Explorer', function () { + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('quick open search produces correct result', async function () { + await common.openQuickOpen(); + await common.type('.js'); + await app.wait(); + const elCount = await common.getQuickOpenElements(); + assert.equal(elCount, 7); + }); + + it('quick open respects fuzzy matching', async function () { + await common.openQuickOpen(); + await common.type('a.s'); + await app.wait(); + const elCount = await common.getQuickOpenElements(); + assert.equal(elCount, 3); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/extensions.ts b/test/smoke/src/tests/extensions.ts new file mode 100644 index 0000000000000..a545dd7c674b7 --- /dev/null +++ b/test/smoke/src/tests/extensions.ts @@ -0,0 +1,57 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH, EXTENSIONS_DIR } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { Extensions } from "../areas/extensions"; + +let app: SpectronApplication; +let common: CommonActions; + +export function extensions() { + context('Extensions', function () { + let extensions: Extensions; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH], [`--extensions-dir=${EXTENSIONS_DIR}`]); + common = new CommonActions(app); + extensions = new Extensions(app, common); + await common.removeDirectory(EXTENSIONS_DIR); + + return await app.start(); + }); + afterEach(async function () { + await app.stop(); + return await common.removeDirectory(EXTENSIONS_DIR); + }); + + it(`installs 'vscode-icons' extension and verifies reload is prompted`, async function () { + await extensions.openExtensionsViewlet(); + await extensions.searchForExtension('vscode-icons'); + await app.wait(); + await extensions.installFirstResult(); + await app.wait(); + assert.ok(await extensions.getFirstReloadText()); + }); + + it(`installs an extension and checks if it works on restart`, async function () { + await extensions.openExtensionsViewlet(); + await extensions.searchForExtension('vscode-icons'); + await app.wait(); + await extensions.installFirstResult(); + await app.wait(); + await extensions.getFirstReloadText(); + + await app.stop(); + await app.wait(); // wait until all resources are released (e.g. locked local storage) + await app.start(); + await extensions.selectMinimalIconsTheme(); + const x = await extensions.verifyFolderIconAppearance(); + assert.ok(x); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/git.ts b/test/smoke/src/tests/git.ts new file mode 100644 index 0000000000000..11d568c7f8b80 --- /dev/null +++ b/test/smoke/src/tests/git.ts @@ -0,0 +1,69 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { Git } from "../areas/git"; + +let app: SpectronApplication; +let common: CommonActions; + +export function test_git() { + context('Git', function () { + let git: Git; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + git = new Git(app, common); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('verifies current changes are picked up by Git viewlet', async function () { + const changesCount = await git.getScmIconChanges(); + assert.equal(changesCount, 2); + await git.openGitViewlet(); + assert.ok(await git.verifyScmChange('app.js')); + assert.ok(await git.verifyScmChange('launch.json')); + }); + + it(`verifies 'app.js' diff viewer changes`, async function () { + await git.openGitViewlet(); + await common.openFile('app.js'); + const original = await git.getOriginalAppJsBodyVarName(); + assert.equal(original, 'bodyParser'); + const modified = await git.getModifiedAppJsBodyVarName(); + assert.equal(modified, 'ydobParser'); + }); + + it(`stages 'app.js' changes and checks stage count`, async function () { + await git.openGitViewlet(); + await app.wait(); + await git.stageFile('app.js'); + const stagedCount = await git.getStagedCount(); + assert.equal(stagedCount, 1); + + // Return back to unstaged state + await git.unstageFile('app.js'); + }); + + it(`stages, commits change to 'app.js' locally and verifies outgoing change`, async function () { + await git.openGitViewlet(); + await app.wait(); + await git.stageFile('app.js'); + await git.focusOnCommitBox(); + await common.type('Test commit'); + await git.pressCommit(); + const changes = await git.getOutgoingChanges(); + assert.equal(changes, ' 0↓ 1↑'); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/integrated-terminal.ts b/test/smoke/src/tests/integrated-terminal.ts new file mode 100644 index 0000000000000..95925d03f961d --- /dev/null +++ b/test/smoke/src/tests/integrated-terminal.ts @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { IntegratedTerminal } from "../areas/integrated-terminal"; + +let app: SpectronApplication; +let common: CommonActions; + +export function integratedTerminal() { + context('Integrated Terminal', function () { + let terminal: IntegratedTerminal; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + terminal = new IntegratedTerminal(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it(`opens terminal, runs 'echo' and verifies the output`, async function () { + const command = 'echo test'; + await terminal.openTerminal(common); + await app.wait(); + await common.type(command); + await common.enter(); + await app.wait(); + let output = await terminal.getCommandOutput(command); + assert.equal(output, 'test'); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/javascript-debug.ts b/test/smoke/src/tests/javascript-debug.ts new file mode 100644 index 0000000000000..7f85ee4f49ce8 --- /dev/null +++ b/test/smoke/src/tests/javascript-debug.ts @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { JavaScriptDebug } from "../areas/javascript-debug"; + +let app: SpectronApplication; +let common: CommonActions; + +export function javascriptDebug() { + context('Debugging JavaScript', function () { + let jsDebug: JavaScriptDebug; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + jsDebug = new JavaScriptDebug(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('autodetects program attribute for launch.json', async function () { + await jsDebug.openDebugViewlet(); + await jsDebug.pressConfigureLaunchJson(); + const value = await jsDebug.getProgramConfigValue(); + process.platform === 'win32' ? assert.equal(value, '"${workspaceRoot}\\\\bin\\\\www"') : assert.equal(value, '"${workspaceRoot}/bin/www"'); + }); + + it(`can set a breakpoint and verify if it's set`, async function () { + await common.openFirstMatchFile('index.js'); + await jsDebug.setBreakpointOnLine(6); + const breakpoint = await jsDebug.verifyBreakpointOnLine(6); + assert.ok(breakpoint); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/javascript.ts b/test/smoke/src/tests/javascript.ts new file mode 100644 index 0000000000000..2d82fde2d4b83 --- /dev/null +++ b/test/smoke/src/tests/javascript.ts @@ -0,0 +1,86 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { JavaScript } from "../areas/javascript"; + +let app: SpectronApplication; +let common: CommonActions; + +export function javascript() { + context('JavaScript', function () { + let js: JavaScript; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + js = new JavaScript(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('shows correct quick outline', async function () { + await common.openFirstMatchFile('bin/www'); + await js.openQuickOutline(); + await app.wait(); + const symbols = await common.getQuickOpenElements(); + assert.equal(symbols, 12); + }); + + it(`finds 'All References' to 'app'`, async function () { + await common.openFirstMatchFile('bin/www'); + await app.wait(); + await js.findAppReferences(); + const titleCount = await js.getTitleReferencesCount(); + assert.equal(titleCount, 3); + const treeCount = await js.getTreeReferencesCount(); + assert.equal(treeCount, 3); + }); + + it(`renames local 'app' variable`, async function () { + await common.openFirstMatchFile('bin/www'); + + const newVarName = 'newApp'; + await js.renameApp(newVarName); + await common.enter(); + const newName = await js.getNewAppName(); + assert.equal(newName, newVarName); + }); + + it('folds/unfolds the code correctly', async function () { + await common.openFirstMatchFile('bin/www'); + // Fold + await js.toggleFirstCommentFold(); + const foldedIcon = await js.getFirstCommentFoldedIcon(); + assert.ok(foldedIcon); + let nextLineNumber = await js.getNextLineNumberAfterFold(); + assert.equal(nextLineNumber, 7); + // Unfold + await js.toggleFirstCommentFold(); + nextLineNumber = await js.getNextLineNumberAfterFold(); + assert.equal(nextLineNumber, 4); + }); + + it(`verifies that 'Go To Definition' works`, async function () { + await common.openFirstMatchFile('app.js'); + await js.goToExpressDefinition(); + await app.wait(); + assert.ok(await common.getTab('index.d.ts')); + }); + + it(`verifies that 'Peek Definition' works`, async function () { + await common.openFirstMatchFile('app.js'); + await js.peekExpressDefinition(); + const definitionFilename = await js.getPeekExpressResultName(); + assert.equal(definitionFilename, 'index.d.ts'); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/localization.ts b/test/smoke/src/tests/localization.ts new file mode 100644 index 0000000000000..35a72186e820f --- /dev/null +++ b/test/smoke/src/tests/localization.ts @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH, USER_DIR } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { Localization, ViewletType } from "../areas/localization"; + +let app: SpectronApplication; +let common: CommonActions; + +export function localization() { + context('Localization', function () { + afterEach(async function () { + return await app.stop(); + }); + + it(`starts with 'DE' locale and verifies title and viewlets text is in German`, async function () { + app = new SpectronApplication(LATEST_PATH, this.test.fullTitle(), this.test.currentRetry(), [WORKSPACE_PATH, '--locale=DE'], [`--user-data-dir=${USER_DIR}`]); + common = new CommonActions(app); + const locale = new Localization(app); + common.removeDirectory(USER_DIR); + + await app.start(); + + let text = await locale.getOpenEditorsText(); + assert.equal(text.toLowerCase(), 'geöffnete editoren'); + + await locale.openViewlet(ViewletType.SEARCH); + text = await locale.getOpenedViewletTitle(); + assert.equal(text.toLowerCase(), 'suchen'); + + await locale.openViewlet(ViewletType.SCM); + text = await locale.getOpenedViewletTitle(); + assert.equal(text.toLowerCase(), 'quellcodeverwaltung: git'); + + await locale.openViewlet(ViewletType.DEBUG); + text = await locale.getOpenedViewletTitle(); + assert.equal(text.toLowerCase(), 'debuggen'); + + await locale.openViewlet(ViewletType.EXTENSIONS); + text = await locale.getExtensionsSearchPlaceholder(); + assert.equal(text.toLowerCase(), 'nach erweiterungen im marketplace suchen'); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/search.ts b/test/smoke/src/tests/search.ts new file mode 100644 index 0000000000000..8ab012c9b085f --- /dev/null +++ b/test/smoke/src/tests/search.ts @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { Search } from "../areas/search"; + +let app: SpectronApplication; +let common: CommonActions; + +export function search() { + context('Search', function () { + let search: Search; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + search = new Search(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('searches for body & checks for correct result number', async function () { + const s = search; + await s.openSearchViewlet(); + await s.searchFor('body'); + const result = await s.getResultText(); + assert.equal(result, '7 results in 4 files'); + }); + + it('searches only for *.js files & checks for correct result number', async function () { + const s = search; + await s.openSearchViewlet(); + await s.searchFor('body'); + await s.toggleSearchDetails(); + await s.searchFor('*.js'); + const results = await s.getResultText(); + assert.equal(results, '4 results in 1 file'); + }); + + it('dismisses result & checks for correct result number', async function () { + const s = search; + await s.openSearchViewlet(); + await s.searchFor('body'); + await s.hoverOverResultCount(); + await s.dismissResult(); + await app.wait(); + const result = await s.getResultText(); + assert.equal(result, '3 results in 3 files'); + }); + + it('replaces first search result with a replace term', async function () { + const s = search; + await s.openSearchViewlet(); + await s.searchFor('body'); + await s.toggleReplace(); + await s.setReplaceText('ydob'); + await s.hoverOverResultCount(); + await s.replaceFirstMatch(); + await app.wait(); + await common.saveOpenedFile(); + const result = await s.getResultText(); + assert.equal(result, '3 results in 3 files'); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/statusbar.ts b/test/smoke/src/tests/statusbar.ts new file mode 100644 index 0000000000000..6fbcf6472c4ce --- /dev/null +++ b/test/smoke/src/tests/statusbar.ts @@ -0,0 +1,94 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { StatusBarElement, StatusBar } from "../areas/statusBar"; + +let app: SpectronApplication; +let common: CommonActions; + +export function statusBar() { + context('Status Bar', function () { + let statusBar: StatusBar; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + statusBar = new StatusBar(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('verifies presence of all default status bar elements', async function () { + await app.wait(); + assert.ok(await statusBar.isVisible(StatusBarElement.BRANCH_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.FEEDBACK_ICON)); + assert.ok(await statusBar.isVisible(StatusBarElement.SYNC_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.PROBLEMS_STATUS)); + + await common.openFirstMatchFile('app.js'); + assert.ok(await statusBar.isVisible(StatusBarElement.ENCODING_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.EOL_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.INDENTATION_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.LANGUAGE_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.SELECTION_STATUS)); + }); + + it(`verifies that 'quick open' opens when clicking on 'Branch', 'Indentation Status, 'Encoding', 'EOL' and 'Language' status elements`, async function () { + await app.wait(); + await statusBar.clickOn(StatusBarElement.BRANCH_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + + await common.openFirstMatchFile('app.js'); + await statusBar.clickOn(StatusBarElement.INDENTATION_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + await statusBar.clickOn(StatusBarElement.ENCODING_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + await statusBar.clickOn(StatusBarElement.EOL_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + await statusBar.clickOn(StatusBarElement.LANGUAGE_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + }); + + it(`verifies that 'Problems View' appears when clicking on 'Problems' status element`, async function () { + await statusBar.clickOn(StatusBarElement.PROBLEMS_STATUS); + assert.ok(await statusBar.getProblemsView()); + }); + + it(`verifies that 'Tweet us feedback' pop-up appears when clicking on 'Feedback' icon`, async function () { + await statusBar.clickOn(StatusBarElement.FEEDBACK_ICON); + assert.ok(await statusBar.getFeedbackView()); + }); + + it(`checks if 'Go to Line' works if called from the status bar`, async function () { + await common.openFirstMatchFile('app.js'); + await statusBar.clickOn(StatusBarElement.SELECTION_STATUS); + const lineNumber = 15; + await common.type(lineNumber.toString()); + await common.enter(); + assert.ok(await statusBar.getEditorHighlightedLine(lineNumber)); + }); + + it(`verifies if changing EOL is reflected in the status bar`, async function () { + await common.openFirstMatchFile('app.js'); + await statusBar.clickOn(StatusBarElement.EOL_STATUS); + await common.selectNextQuickOpenElement(); + await common.enter(); + const currentEOL = await statusBar.getEOLMode(); + assert.equal(currentEOL, 'CRLF'); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/tasks.ts b/test/smoke/src/tests/tasks.ts new file mode 100644 index 0000000000000..c020aceac0c4c --- /dev/null +++ b/test/smoke/src/tests/tasks.ts @@ -0,0 +1,56 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { Tasks } from "../areas/tasks"; + +let app: SpectronApplication; + +export function tasks() { + context('Tasks', function () { + let tasks: Tasks; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + tasks = new Tasks(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('verifies that build task produces 6 errors', async function () { + await tasks.build(); + const res = await tasks.getOutputResult(); + assert.equal(res, '✖ 6 problems (6 errors, 0 warnings)'); + }); + + it(`is able to select 'Git' output`, async function () { + await tasks.build(); + await app.wait(); + await tasks.selectOutputViewType('Git'); + const viewType = await tasks.getOutputViewType(); + assert.equal(viewType, 'Git'); + }); + + it('ensures that build task produces errors in index.js', async function () { + await tasks.build(); + assert.ok(await tasks.firstOutputLineEndsWith('index.js')); + }); + + it(`verifies build errors are reflected in 'Problems View'`, async function () { + await tasks.build(); + await app.wait(); + await tasks.openProblemsView(); + const problemName = await tasks.getProblemsViewFirstElementName(); + assert.equal(problemName, 'index.js'); + const problemsCount = await tasks.getProblemsViewFirstElementCount(); + assert.equal(problemsCount, '6'); + }); + }); +} \ No newline at end of file From 803e7c29ed07d63214fecb8e59042afa1a069988 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 24 May 2017 17:59:05 +0200 Subject: [PATCH 0998/2747] don't score when the word is the empty word, #26096 --- src/vs/base/common/filters.ts | 2 +- .../suggest/browser/completionModel.ts | 10 ++++++- .../test/browser/completionModel.test.ts | 28 ++++++++++++++++++- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index cb219b5c31be1..d4b186650ccd2 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -473,7 +473,7 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { } if (patternLen === patternStartPos) { - return [-1, []]; + return [-100, []]; } if (patternLen > wordLen) { diff --git a/src/vs/editor/contrib/suggest/browser/completionModel.ts b/src/vs/editor/contrib/suggest/browser/completionModel.ts index e3bc875458f09..7bae1f397812b 100644 --- a/src/vs/editor/contrib/suggest/browser/completionModel.ts +++ b/src/vs/editor/contrib/suggest/browser/completionModel.ts @@ -124,7 +124,15 @@ export class CompletionModel { word = wordLen === 0 ? '' : leadingLineContent.slice(-wordLen); } - if (typeof suggestion.filterText === 'string') { + if (wordLen === 0) { + // when there is nothing to score against, don't + // event try to do. Use a const rank and rely on + // the fallback-sort using the initial sort order. + // use a score of `-100` because that is out of the + // bound of values `fuzzyScore` will return + item.score = -100; + + } else if (typeof suggestion.filterText === 'string') { // when there is a `filterText` it must match the `word`. // if it matches we check with the label to compute highlights // and if that doesn't yield a result we have no highlights, diff --git a/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts b/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts index af82d02dca052..fd3f85b323535 100644 --- a/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts +++ b/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts @@ -6,7 +6,7 @@ import * as assert from 'assert'; import { ISuggestion, ISuggestResult, ISuggestSupport, SuggestionType } from 'vs/editor/common/modes'; -import { ISuggestionItem } from 'vs/editor/contrib/suggest/browser/suggest'; +import { ISuggestionItem, getSuggestionComparator } from 'vs/editor/contrib/suggest/browser/suggest'; import { CompletionModel } from 'vs/editor/contrib/suggest/browser/completionModel'; import { IPosition } from 'vs/editor/common/core/position'; import { TPromise } from "vs/base/common/winjs.base"; @@ -202,4 +202,30 @@ suite('CompletionModel', function () { }; assert.equal(model.items.length, 1); }); + + test('Vscode 1.12 no longer obeys \'sortText\' in completion items (from language server), #26096', function () { + + const item1 = createSuggestItem('<- groups', 2, 'property', false, { lineNumber: 1, column: 3 }); + item1.suggestion.filterText = ' groups'; + item1.suggestion.sortText = '00002'; + + const item2 = createSuggestItem('source', 0, 'property', false, { lineNumber: 1, column: 3 }); + item2.suggestion.filterText = 'source'; + item2.suggestion.sortText = '00001'; + + const items = [item1, item2].sort(getSuggestionComparator('inline')); + + model = new CompletionModel(items, 3, { + leadingLineContent: ' ', + characterCountDelta: 0 + }); + + assert.equal(model.items.length, 2); + + const [first, second] = model.items; + assert.equal(first.suggestion.label, 'source'); + assert.equal(second.suggestion.label, '<- groups'); + + }); + }); From 200cfc58639a2dd3f598a301958a8b05ce1e5915 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 24 May 2017 18:02:57 +0200 Subject: [PATCH 0999/2747] Fix extension actions tests --- .../test/electron-browser/extensionsActions.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts index f0ae1aaabe1e8..0f50eb3a0e55c 100644 --- a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts @@ -99,7 +99,7 @@ suite('ExtensionsActions Test', () => { testObject.extension = paged.firstPage[0]; assert.ok(!testObject.enabled); assert.equal('Install', testObject.label); - assert.equal('extension-action install', testObject.class); + assert.equal('extension-action prominent install', testObject.class); done(); }); }); @@ -233,7 +233,7 @@ suite('ExtensionsActions Test', () => { const testObject: ExtensionsActions.CombinedInstallAction = instantiationService.createInstance(ExtensionsActions.CombinedInstallAction); assert.ok(!testObject.enabled); - assert.equal('extension-action install no-extension', testObject.class); + assert.equal('extension-action prominent install no-extension', testObject.class); }); test('Test CombinedInstallAction when extension is system extension', (done) => { @@ -244,7 +244,7 @@ suite('ExtensionsActions Test', () => { instantiationService.get(IExtensionsWorkbenchService).queryLocal().done(extensions => { testObject.extension = extensions[0]; assert.ok(!testObject.enabled); - assert.equal('extension-action install no-extension', testObject.class); + assert.equal('extension-action prominent install no-extension', testObject.class); done(); }); }); @@ -259,7 +259,7 @@ suite('ExtensionsActions Test', () => { testObject.extension = paged.firstPage[0]; assert.ok(testObject.enabled); assert.equal('Install', testObject.label); - assert.equal('extension-action install', testObject.class); + assert.equal('extension-action prominent install', testObject.class); done(); }); }); From f1f3f60e300abae4055a2a9fe3c40c63be5a8e82 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Wed, 24 May 2017 11:04:57 -0700 Subject: [PATCH 1000/2747] Tweak error message for extension table in github issues --- src/vs/workbench/electron-browser/actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index b5b380afb6a06..98e0d84f20c1c 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -739,7 +739,7 @@ ${tableHeader}\n${table}; // 2000 chars is browsers de-facto limit for URLs, 400 chars are allowed for other string parts of the issue URL // http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers if (encodeURIComponent(extensionTable).length > 1600) { - return 'the listing exceeds the lower minimum of browsers\' URL characters limit'; + return 'the listing length exceeds browsers\' URL characters limit'; } return extensionTable; From 321d8095cf5ab7316b9942ca6f22d059eeed12b3 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 24 May 2017 20:18:03 +0200 Subject: [PATCH 1001/2747] theming :lipstick: --- .../base/browser/ui/findinput/findInput.css | 26 ------------------- .../parts/debug/browser/debugActionItems.ts | 4 +-- .../debug/browser/media/breakpointWidget.css | 4 --- .../debug/browser/media/debugViewlet.css | 15 ----------- .../extensions/browser/extensionsActions.ts | 7 ++++- .../browser/media/extensionActions.css | 1 - .../preferences/browser/keybindingsEditor.ts | 12 +++++++-- .../browser/media/keybindingsEditor.css | 10 ------- 8 files changed, 18 insertions(+), 61 deletions(-) diff --git a/src/vs/base/browser/ui/findinput/findInput.css b/src/vs/base/browser/ui/findinput/findInput.css index 413c2dcafb35f..b785b4fa4cc0b 100644 --- a/src/vs/base/browser/ui/findinput/findInput.css +++ b/src/vs/base/browser/ui/findinput/findInput.css @@ -28,28 +28,6 @@ right: 2px; } -.monaco-findInput > .controls > .matchCount { - margin-left: 2px; - float: left; - overflow: hidden; - max-width: 30px; - min-width: 20px; - text-align: center; - - border-radius: 5px; - padding: 0 4px; - - -webkit-box-sizing: border-box; - -o-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; -} - -.vs .monaco-findInput > .controls > .matchCount { - background: #ddd; -} - .vs .monaco-findInput.disabled { background-color: #E1E1E1; } @@ -59,10 +37,6 @@ background-color: #333; } -.vs-dark .monaco-findInput > .controls > .matchCount { - background: #555; -} - /* Highlighting */ .monaco-findInput.highlight-0 .controls { animation: monaco-findInput-highlight-0 100ms linear 0s; diff --git a/src/vs/workbench/parts/debug/browser/debugActionItems.ts b/src/vs/workbench/parts/debug/browser/debugActionItems.ts index 8f83bebe2daa9..edb07e3d969cc 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionItems.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionItems.ts @@ -117,8 +117,8 @@ export class StartDebugActionItem extends EventEmitter implements IActionItem { } })); this.toDispose.push(attachStylerCallback(this.themeService, { selectBorder }, colors => { - this.container.style.borderColor = colors.selectBorder; - selectBoxContainer.style.borderLeftColor = colors.selectBorder; + this.container.style.border = colors.selectBorder ? `1px solid ${colors.selectBorder}` : null; + selectBoxContainer.style.borderLeft = colors.selectBorder ? `1px solid ${colors.selectBorder}` : null; })); this.updateOptions(); diff --git a/src/vs/workbench/parts/debug/browser/media/breakpointWidget.css b/src/vs/workbench/parts/debug/browser/media/breakpointWidget.css index ad120c2ab7ff2..8d190b91ca032 100644 --- a/src/vs/workbench/parts/debug/browser/media/breakpointWidget.css +++ b/src/vs/workbench/parts/debug/browser/media/breakpointWidget.css @@ -16,10 +16,6 @@ padding: 0 10px; } -.monaco-editor .zone-widget .zone-widget-container.breakpoint-widget .breakpoint-select-container .select-box { - border-color: rgba(128, 128, 128, 0.35); -} - .monaco-editor .zone-widget .zone-widget-container.breakpoint-widget .inputBoxContainer { flex: 1; } diff --git a/src/vs/workbench/parts/debug/browser/media/debugViewlet.css b/src/vs/workbench/parts/debug/browser/media/debugViewlet.css index feff9b7cff6d6..b0d6b4510a12d 100644 --- a/src/vs/workbench/parts/debug/browser/media/debugViewlet.css +++ b/src/vs/workbench/parts/debug/browser/media/debugViewlet.css @@ -57,7 +57,6 @@ margin-right: 0.3em; height: 20px; flex-shrink: 1; - border: 1px solid #dddddd; margin-top: 7px; } @@ -65,11 +64,6 @@ border-radius: 4px; } -.vs-dark .monaco-workbench > .part > .title > .title-actions .start-debug-action-item, -.hc-black .monaco-workbench > .part > .title > .title-actions .start-debug-action-item { - border-color: #3c3c3c; -} - .monaco-workbench > .part > .title > .title-actions .start-debug-action-item .icon { height: 20px; width: 20px; @@ -84,15 +78,6 @@ background: url('continue-inverse.svg') center center no-repeat; } -.monaco-workbench > .part > .title > .title-actions .start-debug-action-item .configuration { - border-left: 1px solid #dddddd; -} - -.vs-dark .monaco-workbench > .part > .title > .title-actions .start-debug-action-item .configuration, -.hc-black .monaco-workbench > .part > .title > .title-actions .start-debug-action-item .configuration { - border-color: #3c3c3c; -} - .monaco-workbench .monaco-action-bar .start-debug-action-item .configuration .select-box { border: none; margin-top: 0px; diff --git a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts index 3b557abaf33cf..f2cf8c9cacdbb 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts @@ -33,7 +33,7 @@ import URI from 'vs/base/common/uri'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { registerThemingParticipant, ITheme, ICssStyleCollector } from "vs/platform/theme/common/themeService"; -import { buttonBackground, buttonForeground, buttonHoverBackground, contrastBorder, registerColor } from "vs/platform/theme/common/colorRegistry"; +import { buttonBackground, buttonForeground, buttonHoverBackground, contrastBorder, registerColor, foreground } from "vs/platform/theme/common/colorRegistry"; import { Color } from "vs/base/common/color"; export class InstallAction extends Action { @@ -1408,6 +1408,11 @@ export const extensionButtonProminentHoverBackground = registerColor('extensionB }, localize('extensionButtonProminentHoverBackground', "Button background hover color for actions extension that stand out (e.g. install button).")); registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { + const foregroundColor = theme.getColor(foreground); + if (foregroundColor) { + collector.addRule(`.monaco-action-bar .action-item .action-label.extension-action.built-in-status { border-color: ${foregroundColor}; }`); + } + const buttonBackgroundColor = theme.getColor(buttonBackground); if (buttonBackgroundColor) { collector.addRule(`.monaco-action-bar .action-item .action-label.extension-action { background-color: ${buttonBackgroundColor}; }`); diff --git a/src/vs/workbench/parts/extensions/browser/media/extensionActions.css b/src/vs/workbench/parts/extensions/browser/media/extensionActions.css index e80db60cdef0e..c9b9d8508a2a9 100644 --- a/src/vs/workbench/parts/extensions/browser/media/extensionActions.css +++ b/src/vs/workbench/parts/extensions/browser/media/extensionActions.css @@ -36,7 +36,6 @@ .monaco-action-bar .action-item .action-label.extension-action.built-in-status { border-radius: 4px; - border-color: #c1c1c1; color: inherit; background-color: transparent; opacity: 0.9; diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts index 2b8adf6502f4c..ca94ecd2c2bf4 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts @@ -33,12 +33,13 @@ import { IKeybindingEditingService } from 'vs/workbench/services/keybinding/comm import { IListService } from 'vs/platform/list/browser/listService'; import { List } from 'vs/base/browser/ui/list/listWidget'; import { IDelegate, IRenderer, IListContextMenuEvent, IListEvent } from 'vs/base/browser/ui/list/list'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IChoiceService, IMessageService, Severity } from 'vs/platform/message/common/message'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyCode, ResolvedKeybinding } from 'vs/base/common/keyCodes'; import { attachListStyler } from 'vs/platform/theme/common/styler'; +import { listHighlightForeground } from "vs/platform/theme/common/colorRegistry"; let $ = DOM.$; @@ -797,4 +798,11 @@ class WhenColumn extends Column { private getAriaLabel(keybindingItemEntry: IKeybindingItemEntry): string { return keybindingItemEntry.keybindingItem.when ? localize('whenAriaLabel', "When is {0}.", keybindingItemEntry.keybindingItem.when) : localize('noWhen', "No when context."); } -} \ No newline at end of file +} + +registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { + const listHighlightForegroundColor = theme.getColor(listHighlightForeground); + if (listHighlightForegroundColor) { + collector.addRule(`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .highlight { color: ${listHighlightForegroundColor}; }`); + } +}); \ No newline at end of file diff --git a/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css b/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css index 27a753c86bd0b..29b4fe0a8d134 100644 --- a/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css +++ b/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css @@ -148,19 +148,9 @@ } .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .highlight { - color: #007ACC; font-weight: bold; } -.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.selected > .column .highlight { - color: #1b3c53; -} - -.vs-dark .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.selected > .column .highlight, -.hc-black .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.selected > .column .highlight { - color: #049aff; -} - .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .monaco-action-bar { display: none; flex: 1; From 78d4aa67e48428ee4cc30ecae34ee82adca3b40a Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 24 May 2017 11:25:31 -0700 Subject: [PATCH 1002/2747] Fixes #26886 --- .../editor/contrib/suggest/browser/media/suggest.css | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index fe64def759b94..08b4e45593d89 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -34,12 +34,18 @@ .monaco-editor .suggest-widget.docs-side > .tree, .monaco-editor .suggest-widget.docs-side > .details { - width: 328px; + /* subtract 2px for border, and another 2 for the Chromium zoom issue + where the children get slightly bigger width than what is set + which makes the docs go below the list */ + width: calc(50% - 4px); } .monaco-editor.hc-black .suggest-widget.docs-side > .tree, .monaco-editor.hc-black .suggest-widget.docs-side > .details { - width: 326px; + /* subtract 4px for border, and another 2 for the Chromium zoom issue + where the children get slightly bigger width than what is set + which makes the docs go below the list */ + width: calc(50% - 6px); } /* Styles for Message element for when widget is loading or is empty */ From 2f90c173afbab620b343768b8be6cc82ae1bef90 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 24 May 2017 11:39:04 -0700 Subject: [PATCH 1003/2747] Enable needs-more-info bot plugin --- .github/needs_more_info.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/needs_more_info.yml b/.github/needs_more_info.yml index 0e246fd554a86..934e98898d42d 100644 --- a/.github/needs_more_info.yml +++ b/.github/needs_more_info.yml @@ -1,6 +1,6 @@ { daysUntilClose: 7, needsMoreInfoLabel: 'needs more info', - perform: false, + perform: true, closeComment: 'This issue has been closed automatically because it needs more information and has not had recent activity. Please refer to our [guidelines](https://github.com/Microsoft/vscode/blob/master/CONTRIBUTING.md) for filing issues. Thank you for your contributions.' } From 87a9dce81d0e70f5fb329ee13a88c9f464082fa2 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 24 May 2017 11:56:54 -0700 Subject: [PATCH 1004/2747] Fixes #27169 --- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 168d22bc846b8..56871ef950444 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -599,12 +599,14 @@ export class SuggestWidget implements IContentWidget, IDelegate this.messageElement.textContent = SuggestWidget.LOADING_MESSAGE; hide(this.listElement, this.details.element); show(this.messageElement); + removeClass(this.element, 'docs-side'); this.show(); break; case State.Empty: this.messageElement.textContent = SuggestWidget.NO_SUGGESTIONS_MESSAGE; hide(this.listElement, this.details.element); show(this.messageElement); + removeClass(this.element, 'docs-side'); this.show(); break; case State.Open: From 8776c1106dcc05463f5ff818f76d57f22a4dfbc8 Mon Sep 17 00:00:00 2001 From: Amy Qiu Date: Wed, 24 May 2017 12:49:23 -0700 Subject: [PATCH 1005/2747] Add mementos to shutdown --- .../parts/search/browser/searchViewlet.ts | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index e99d35d1ad4e1..68630e3181618 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -905,23 +905,10 @@ export class SearchViewlet extends Viewlet { const isCaseSensitive = this.searchWidget.searchInput.getCaseSensitive(); const contentPattern = this.searchWidget.searchInput.getValue(); const patternExcludes = this.inputPatternExclusions.getValue().trim(); - const exclusionsUsePattern = this.inputPatternExclusions.isGlobPattern(); const patternIncludes = this.inputPatternIncludes.getValue().trim(); - const includesUsePattern = this.inputPatternIncludes.isGlobPattern(); const useIgnoreFiles = this.inputPatternExclusions.useIgnoreFiles(); const useExcludeSettings = this.inputPatternExclusions.useExcludeSettings(); - // store memento - this.viewletSettings['query.contentPattern'] = contentPattern; - this.viewletSettings['query.regex'] = isRegex; - this.viewletSettings['query.wholeWords'] = isWholeWords; - this.viewletSettings['query.caseSensitive'] = isCaseSensitive; - this.viewletSettings['query.folderExclusions'] = patternExcludes; - this.viewletSettings['query.exclusionsUsePattern'] = exclusionsUsePattern; - this.viewletSettings['query.folderIncludes'] = patternIncludes; - this.viewletSettings['query.includesUsePattern'] = includesUsePattern; - this.viewletSettings['query.useIgnoreFiles'] = useIgnoreFiles; - if (!rerunQuery) { return; } @@ -1350,7 +1337,27 @@ export class SearchViewlet extends Viewlet { } public shutdown(): void { - this.viewletSettings['query.contentPattern'] = this.searchWidget.searchInput.getValue(); + const isRegex = this.searchWidget.searchInput.getRegex(); + const isWholeWords = this.searchWidget.searchInput.getWholeWords(); + const isCaseSensitive = this.searchWidget.searchInput.getCaseSensitive(); + const contentPattern = this.searchWidget.searchInput.getValue(); + const patternExcludes = this.inputPatternExclusions.getValue().trim(); + const exclusionsUsePattern = this.inputPatternExclusions.isGlobPattern(); + const patternIncludes = this.inputPatternIncludes.getValue().trim(); + const includesUsePattern = this.inputPatternIncludes.isGlobPattern(); + const useIgnoreFiles = this.inputPatternExclusions.useIgnoreFiles(); + + // store memento + this.viewletSettings['query.contentPattern'] = contentPattern; + this.viewletSettings['query.regex'] = isRegex; + this.viewletSettings['query.wholeWords'] = isWholeWords; + this.viewletSettings['query.caseSensitive'] = isCaseSensitive; + this.viewletSettings['query.folderExclusions'] = patternExcludes; + this.viewletSettings['query.exclusionsUsePattern'] = exclusionsUsePattern; + this.viewletSettings['query.folderIncludes'] = patternIncludes; + this.viewletSettings['query.includesUsePattern'] = includesUsePattern; + this.viewletSettings['query.useIgnoreFiles'] = useIgnoreFiles; + this.viewletSettings['query.contentPattern'] = contentPattern; super.shutdown(); } From 6ed4099a89c931505fd2bde0c9791beb99c8f2a9 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 May 2017 10:50:28 -0700 Subject: [PATCH 1006/2747] Move terminalProcess to node/ Part of #27182 --- .../parts/terminal/electron-browser/terminalInstance.ts | 4 ++-- .../terminal/{electron-browser => node}/terminalProcess.js | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename src/vs/workbench/parts/terminal/{electron-browser => node}/terminalProcess.js (100%) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index fe48ea264ff8a..c7bb9a0713140 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -473,9 +473,9 @@ export class TerminalInstance implements ITerminalInstance { } const env = TerminalInstance.createTerminalEnv(process.env, shell, this._getCwd(shell, workspace), locale, this._cols, this._rows); this._title = shell.name || ''; - this._process = cp.fork('./terminalProcess', [], { + this._process = cp.fork('../node/terminalProcess', [], { env: env, - cwd: URI.parse(path.dirname(require.toUrl('./terminalProcess'))).fsPath + cwd: URI.parse(path.dirname(require.toUrl('../node/terminalProcess'))).fsPath }); if (!shell.name) { // Only listen for process title changes when a name is not provided diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalProcess.js b/src/vs/workbench/parts/terminal/node/terminalProcess.js similarity index 100% rename from src/vs/workbench/parts/terminal/electron-browser/terminalProcess.js rename to src/vs/workbench/parts/terminal/node/terminalProcess.js From 5f0e32472a8ac0da345e8aef840b2ecd92af6a48 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 May 2017 13:34:44 -0700 Subject: [PATCH 1007/2747] Add node-pty typings back --- src/typings/node-pty.d.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/typings/node-pty.d.ts diff --git a/src/typings/node-pty.d.ts b/src/typings/node-pty.d.ts new file mode 100644 index 0000000000000..e09b1eb47e5ac --- /dev/null +++ b/src/typings/node-pty.d.ts @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +declare module 'node-pty' { + export function fork(file: string, args: string[], options: any): Terminal; + export function spawn(file: string, args: string[], options: any): Terminal; + export function createTerminal(file: string, args: string[], options: any): Terminal; + + export interface Terminal { + pid: number; + + /** + * The title of the active process. + */ + process: string; + + on(event: string, callback: (data: any) => void): void; + + resize(columns: number, rows: number): void; + + write(data: string): void; + + kill(): void; + } +} \ No newline at end of file From bae64c4db24a29c2e9d05fc5e4fb38ae3e6eb189 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 May 2017 13:37:43 -0700 Subject: [PATCH 1008/2747] Fork terminalProcess using amd, convert to TS Fixes #27182 --- src/vs/workbench/buildfile.js | 4 ++- .../electron-browser/terminalInstance.ts | 5 +-- ...{terminalProcess.js => terminalProcess.ts} | 35 +++++++++++++------ 3 files changed, 30 insertions(+), 14 deletions(-) rename src/vs/workbench/parts/terminal/node/{terminalProcess.js => terminalProcess.ts} (83%) diff --git a/src/vs/workbench/buildfile.js b/src/vs/workbench/buildfile.js index dfb1ee2b60017..b4102009d69e5 100644 --- a/src/vs/workbench/buildfile.js +++ b/src/vs/workbench/buildfile.js @@ -25,7 +25,9 @@ exports.collectModules = function (excludes) { createModuleDescription('vs/workbench/services/search/node/worker/searchWorkerApp', []), createModuleDescription('vs/workbench/services/files/node/watcher/unix/watcherApp', []), - createModuleDescription('vs/workbench/node/extensionHostProcess', []) + createModuleDescription('vs/workbench/node/extensionHostProcess', []), + + createModuleDescription('vs/workbench/parts/terminal/node/terminalProcess', []) ]; return modules; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index c7bb9a0713140..07f8b6b53cb4a 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -473,8 +473,8 @@ export class TerminalInstance implements ITerminalInstance { } const env = TerminalInstance.createTerminalEnv(process.env, shell, this._getCwd(shell, workspace), locale, this._cols, this._rows); this._title = shell.name || ''; - this._process = cp.fork('../node/terminalProcess', [], { - env: env, + this._process = cp.fork(URI.parse(require.toUrl('bootstrap')).fsPath, ['--type=terminal'], { + env, cwd: URI.parse(path.dirname(require.toUrl('../node/terminalProcess'))).fsPath }); if (!shell.name) { @@ -622,6 +622,7 @@ export class TerminalInstance implements ITerminalInstance { env['PTYCOLS'] = cols.toString(); env['PTYROWS'] = rows.toString(); } + env['AMD_ENTRYPOINT'] = 'vs/workbench/parts/terminal/node/terminalProcess'; return env; } diff --git a/src/vs/workbench/parts/terminal/node/terminalProcess.js b/src/vs/workbench/parts/terminal/node/terminalProcess.ts similarity index 83% rename from src/vs/workbench/parts/terminal/node/terminalProcess.js rename to src/vs/workbench/parts/terminal/node/terminalProcess.ts index 8cfea5673f1d7..12642b21a411d 100644 --- a/src/vs/workbench/parts/terminal/node/terminalProcess.js +++ b/src/vs/workbench/parts/terminal/node/terminalProcess.ts @@ -3,21 +3,23 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -var fs = require('fs'); -var os = require('os'); -var path = require('path'); -var ptyJs = require('node-pty'); +import * as fs from 'fs'; +fs.writeFileSync('/home/daniel/testing-terminal-1', 'foo'); +import * as os from 'os'; +import * as path from 'path'; +import * as ptyJs from 'node-pty'; + +fs.writeFileSync('/home/daniel/testing-terminal-2', 'foo'); // The pty process needs to be run in its own child process to get around maxing out CPU on Mac, // see https://github.com/electron/electron/issues/38 - -var name; +var shellName: string; if (os.platform() === 'win32') { - name = path.basename(process.env.PTYSHELL); + shellName = path.basename(process.env.PTYSHELL); } else { // Using 'xterm-256color' here helps ensure that the majority of Linux distributions will use a // color prompt as defined in the default ~/.bashrc file. - name = 'xterm-256color'; + shellName = 'xterm-256color'; } var shell = process.env.PTYSHELL; var args = getArgs(); @@ -29,16 +31,26 @@ var currentTitle = ''; setupPlanB(process.env.PTYPID); cleanEnv(); -var options = { - name: name, - cwd: cwd +interface IOptions { + name: string; + cwd: string; + cols?: number; + rows?: number; +} + +var options: IOptions = { + name: shellName, + cwd }; if (cols && rows) { options.cols = parseInt(cols, 10); options.rows = parseInt(rows, 10); } +fs.writeFileSync('/home/daniel/testing-terminal-3', 'foo'); var ptyProcess = ptyJs.fork(shell, args, options); + +fs.writeFileSync('/home/daniel/testing-terminal-4', 'foo'); var closeTimeout; var exitCode; @@ -93,6 +105,7 @@ function getArgs() { function cleanEnv() { var keys = [ + 'AMD_ENTRYPOINT', 'ELECTRON_RUN_AS_NODE', 'PTYCWD', 'PTYPID', From d1b366fe333c663d50568b6f8b33962534c49eb7 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 24 May 2017 13:39:32 -0700 Subject: [PATCH 1009/2747] Fix ts/js code lens for trailing special character. Fixes #27211 --- extensions/typescript/src/features/baseCodeLensProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/typescript/src/features/baseCodeLensProvider.ts b/extensions/typescript/src/features/baseCodeLensProvider.ts index 9d2c4bfb768f5..98e4de9cc1c2d 100644 --- a/extensions/typescript/src/features/baseCodeLensProvider.ts +++ b/extensions/typescript/src/features/baseCodeLensProvider.ts @@ -108,7 +108,7 @@ export abstract class TypeScriptBaseCodeLensProvider implements CodeLensProvider const text = document.getText(range); - const identifierMatch = new RegExp(`^(.*?(\\b|\\W))${(item.text || '').replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')}\\b`, 'gm'); + const identifierMatch = new RegExp(`^(.*?(\\b|\\W))${(item.text || '').replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')}(\\b|\\W)`, 'gm'); const match = identifierMatch.exec(text); const prefixLength = match ? match.index + match[1].length : 0; const startOffset = document.offsetAt(new Position(range.start.line, range.start.character)) + prefixLength; From 7236f4a191477510fa4ea0e1771848fd54680386 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 24 May 2017 13:54:05 -0700 Subject: [PATCH 1010/2747] Fix 27195 Make sure we handle the case of `/**/` properly in json files --- extensions/json/syntaxes/JSON.tmLanguage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/json/syntaxes/JSON.tmLanguage b/extensions/json/syntaxes/JSON.tmLanguage index 9d6a24cc16a59..507eb03ec93f2 100644 --- a/extensions/json/syntaxes/JSON.tmLanguage +++ b/extensions/json/syntaxes/JSON.tmLanguage @@ -98,7 +98,7 @@ begin - /\*\* + /\*\*(?!/) captures 0 From 410807085666c03712ac831c4c75653e828f74f1 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 May 2017 13:55:34 -0700 Subject: [PATCH 1011/2747] Remove debug logs --- src/vs/workbench/parts/terminal/node/terminalProcess.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/vs/workbench/parts/terminal/node/terminalProcess.ts b/src/vs/workbench/parts/terminal/node/terminalProcess.ts index 12642b21a411d..3a2b00a4a7031 100644 --- a/src/vs/workbench/parts/terminal/node/terminalProcess.ts +++ b/src/vs/workbench/parts/terminal/node/terminalProcess.ts @@ -3,14 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as fs from 'fs'; -fs.writeFileSync('/home/daniel/testing-terminal-1', 'foo'); - import * as os from 'os'; import * as path from 'path'; import * as ptyJs from 'node-pty'; -fs.writeFileSync('/home/daniel/testing-terminal-2', 'foo'); // The pty process needs to be run in its own child process to get around maxing out CPU on Mac, // see https://github.com/electron/electron/issues/38 var shellName: string; @@ -47,10 +43,8 @@ if (cols && rows) { options.rows = parseInt(rows, 10); } -fs.writeFileSync('/home/daniel/testing-terminal-3', 'foo'); var ptyProcess = ptyJs.fork(shell, args, options); -fs.writeFileSync('/home/daniel/testing-terminal-4', 'foo'); var closeTimeout; var exitCode; From 985d05f92004a85a8595ec9cb77148e4c727e964 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 23 May 2017 21:00:41 +0200 Subject: [PATCH 1012/2747] Kimbie builtin theme has dark curly braces. Fixes #27121 --- .../theme-kimbie-dark/themes/kimbie-dark-color-theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json index 2d5e0fadb3194..7de6b3fd42e6b 100644 --- a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json +++ b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json @@ -369,7 +369,7 @@ "variable.interpolation" ], "settings": { - "foreground": "#18401e" + "foreground": "#088649" } }, { From b320bd0de71600ee0ba9fb61cccf191da7184341 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 24 May 2017 22:56:13 +0200 Subject: [PATCH 1013/2747] Allow decorations to use theme colors. For #26974 --- src/vs/base/browser/dom.ts | 5 +- .../browser/services/codeEditorServiceImpl.ts | 480 +++++++++--------- .../browser/standalone/standaloneServices.ts | 5 +- .../overviewRuler/decorationsOverviewRuler.ts | 15 +- src/vs/editor/common/editorCommon.ts | 38 +- .../common/model/textModelWithDecorations.ts | 6 +- .../services/decorationRenderOptions.test.ts | 84 ++- src/vs/monaco.d.ts | 16 +- src/vs/platform/theme/common/themeService.ts | 6 +- src/vs/vscode.d.ts | 32 +- src/vs/workbench/api/node/extHost.api.impl.ts | 1 + src/vs/workbench/api/node/extHostTypes.ts | 7 + .../workbench/test/workbenchTestServices.ts | 36 +- 13 files changed, 442 insertions(+), 289 deletions(-) diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts index 21698e938db4a..228550b57afe7 100644 --- a/src/vs/base/browser/dom.ts +++ b/src/vs/base/browser/dom.ts @@ -710,7 +710,7 @@ export function createCSSRule(selector: string, cssText: string, style: HTMLStyl return; } - (style.sheet).insertRule(selector + '{' + cssText + '}', 0); + (style.sheet).insertRule(selector + '{' + cssText + '}', 0); } export function getCSSRule(selector: string, style: HTMLStyleElement = sharedStyle): any { @@ -739,8 +739,7 @@ export function removeCSSRulesContainingSelector(ruleName: string, style = share let toDelete: number[] = []; for (let i = 0; i < rules.length; i++) { let rule = rules[i]; - let normalizedSelectorText = rule.selectorText.replace(/::/gi, ':'); - if (normalizedSelectorText.indexOf(ruleName) !== -1) { + if (rule.selectorText.indexOf(ruleName) !== -1) { toDelete.push(i); } } diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index fa45f009cf8d9..703e6e4f0eec0 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -4,36 +4,43 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import * as objects from 'vs/base/common/objects'; -import { parse, stringify } from 'vs/base/common/marshalling'; import * as strings from 'vs/base/common/strings'; import URI from 'vs/base/common/uri'; import * as dom from 'vs/base/browser/dom'; import { IDecorationRenderOptions, IModelDecorationOptions, IModelDecorationOverviewRulerOptions, IThemeDecorationRenderOptions, - IContentDecorationRenderOptions, OverviewRulerLane, TrackedRangeStickiness + IContentDecorationRenderOptions, OverviewRulerLane, TrackedRangeStickiness, ThemeColor, isThemeColor } from 'vs/editor/common/editorCommon'; import { AbstractCodeEditorService } from 'vs/editor/common/services/abstractCodeEditorService'; -import { IDisposable, toDisposable } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose as disposeAll } from 'vs/base/common/lifecycle'; +import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; export class CodeEditorServiceImpl extends AbstractCodeEditorService { private _styleSheet: HTMLStyleElement; private _decorationOptionProviders: { [key: string]: IModelDecorationOptionsProvider }; + private _themeService: IThemeService; - constructor(styleSheet = dom.createStyleSheet()) { + constructor( @IThemeService themeService: IThemeService, styleSheet = dom.createStyleSheet()) { super(); this._styleSheet = styleSheet; this._decorationOptionProviders = Object.create(null); + this._themeService = themeService; } public registerDecorationType(key: string, options: IDecorationRenderOptions, parentTypeKey?: string): void { let provider = this._decorationOptionProviders[key]; if (!provider) { + let providerArgs: ProviderArguments = { + styleSheet: this._styleSheet, + key: key, + parentTypeKey: parentTypeKey, + options: options + }; if (!parentTypeKey) { - provider = new DecorationTypeOptionsProvider(this._styleSheet, key, options); + provider = new DecorationTypeOptionsProvider(this._themeService, providerArgs); } else { - provider = new DecorationSubTypeOptionsProvider(this._styleSheet, key, parentTypeKey, options); + provider = new DecorationSubTypeOptionsProvider(this._themeService, providerArgs); } this._decorationOptionProviders[key] = provider; } @@ -71,67 +78,52 @@ class DecorationSubTypeOptionsProvider implements IModelDecorationOptionsProvide public refCount: number; - private _disposable: IDisposable; private _parentTypeKey: string; - private _beforeContentClassName: string; - private _afterContentClassName: string; + private _beforeContentRules: DecorationCSSRules; + private _afterContentRules: DecorationCSSRules; - constructor(styleSheet: HTMLStyleElement, key: string, parentTypeKey: string, options: IDecorationRenderOptions) { - this._parentTypeKey = parentTypeKey; + constructor(themeService: IThemeService, providerArgs: ProviderArguments) { + this._parentTypeKey = providerArgs.parentTypeKey; this.refCount = 0; - let themedOpts = getThemedRenderOptions(options); - - this._beforeContentClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - parentTypeKey, - ModelDecorationCSSRuleType.BeforeContentClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.light.before), - dark: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.dark.before) - } - ); - - this._afterContentClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - parentTypeKey, - ModelDecorationCSSRuleType.AfterContentClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.light.after), - dark: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.dark.after) - } - ); - if (this._beforeContentClassName || this._afterContentClassName) { - this._disposable = toDisposable(() => { - dom.removeCSSRulesContainingSelector(CSSNameHelper.getDeletionSubstring(key), styleSheet); - }); - } + this._beforeContentRules = new DecorationCSSRules(ModelDecorationCSSRuleType.BeforeContentClassName, providerArgs, themeService); + this._afterContentRules = new DecorationCSSRules(ModelDecorationCSSRuleType.AfterContentClassName, providerArgs, themeService); } public getOptions(codeEditorService: AbstractCodeEditorService, writable: boolean): IModelDecorationOptions { let options = codeEditorService.resolveDecorationOptions(this._parentTypeKey, true); - if (this._beforeContentClassName) { - options.beforeContentClassName = this._beforeContentClassName; + if (this._beforeContentRules) { + options.beforeContentClassName = this._beforeContentRules.className; } - if (this._afterContentClassName) { - options.afterContentClassName = this._afterContentClassName; + if (this._afterContentRules) { + options.afterContentClassName = this._afterContentRules.className; } return options; } public dispose(): void { - if (this._disposable) { - this._disposable.dispose(); - delete this._disposable; + if (this._beforeContentRules) { + this._beforeContentRules.dispose(); + this._beforeContentRules = null; + } + if (this._afterContentRules) { + this._afterContentRules.dispose(); + this._afterContentRules = null; } } } +interface ProviderArguments { + styleSheet: HTMLStyleElement; + key: string; + parentTypeKey?: string; + options: IDecorationRenderOptions; +} + + class DecorationTypeOptionsProvider implements IModelDecorationOptionsProvider { - private _disposable: IDisposable; + private _disposables: IDisposable[]; public refCount: number; public className: string; @@ -143,82 +135,40 @@ class DecorationTypeOptionsProvider implements IModelDecorationOptionsProvider { public overviewRuler: IModelDecorationOverviewRulerOptions; public stickiness: TrackedRangeStickiness; - constructor(styleSheet: HTMLStyleElement, key: string, options: IDecorationRenderOptions) { + constructor(themeService: IThemeService, providerArgs: ProviderArguments) { this.refCount = 0; + this._disposables = []; - let themedOpts = getThemedRenderOptions(options); - - this.className = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - null, - ModelDecorationCSSRuleType.ClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationClassName(themedOpts.light), - dark: DecorationRenderHelper.getCSSTextForModelDecorationClassName(themedOpts.dark) - } - ); - - this.inlineClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - null, - ModelDecorationCSSRuleType.InlineClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationInlineClassName(themedOpts.light), - dark: DecorationRenderHelper.getCSSTextForModelDecorationInlineClassName(themedOpts.dark) - } - ); - - this.beforeContentClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - null, - ModelDecorationCSSRuleType.BeforeContentClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.light.before), - dark: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.dark.before) - } - ); - - this.afterContentClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - null, - ModelDecorationCSSRuleType.AfterContentClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.light.after), - dark: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.dark.after) - } - ); - - this.glyphMarginClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - null, - ModelDecorationCSSRuleType.GlyphMarginClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationGlyphMarginClassName(themedOpts.light), - dark: DecorationRenderHelper.getCSSTextForModelDecorationGlyphMarginClassName(themedOpts.dark) + let createCSSRules = (type: ModelDecorationCSSRuleType) => { + let rules = new DecorationCSSRules(type, providerArgs, themeService); + if (rules.hasContent) { + this._disposables.push(rules); + return rules.className; } - ); + return void 0; + }; + + this.className = createCSSRules(ModelDecorationCSSRuleType.ClassName); + this.inlineClassName = createCSSRules(ModelDecorationCSSRuleType.InlineClassName); + this.beforeContentClassName = createCSSRules(ModelDecorationCSSRuleType.BeforeContentClassName); + this.beforeContentClassName = createCSSRules(ModelDecorationCSSRuleType.AfterContentClassName); + this.glyphMarginClassName = createCSSRules(ModelDecorationCSSRuleType.GlyphMarginClassName); + let options = providerArgs.options; this.isWholeLine = Boolean(options.isWholeLine); + let lightOverviewRulerColor = options.light && options.light.overviewRulerColor || options.overviewRulerColor; + let darkOverviewRulerColor = options.dark && options.dark.overviewRulerColor || options.overviewRulerColor; if ( - typeof themedOpts.light.overviewRulerColor !== 'undefined' - || typeof themedOpts.dark.overviewRulerColor !== 'undefined' + typeof lightOverviewRulerColor !== 'undefined' + || typeof darkOverviewRulerColor !== 'undefined' ) { this.overviewRuler = { - color: themedOpts.light.overviewRulerColor || themedOpts.dark.overviewRulerColor, - darkColor: themedOpts.dark.overviewRulerColor || themedOpts.light.overviewRulerColor, + color: lightOverviewRulerColor || darkOverviewRulerColor, + darkColor: darkOverviewRulerColor || lightOverviewRulerColor, position: options.overviewRulerLane || OverviewRulerLane.Center }; } - - this._disposable = toDisposable(() => { - dom.removeCSSRulesContainingSelector(CSSNameHelper.getDeletionSubstring(key), styleSheet); - }); } public getOptions(codeEditorService: AbstractCodeEditorService, writable: boolean): IModelDecorationOptions { @@ -238,51 +188,162 @@ class DecorationTypeOptionsProvider implements IModelDecorationOptionsProvider { } public dispose(): void { - if (this._disposable) { - this._disposable.dispose(); - delete this._disposable; - } + this._disposables = disposeAll(this._disposables); } } -class DecorationRenderHelper { - private static _CSS_MAP = { - color: 'color:{0} !important;', - backgroundColor: 'background-color:{0};', - - outline: 'outline:{0};', - outlineColor: 'outline-color:{0};', - outlineStyle: 'outline-style:{0};', - outlineWidth: 'outline-width:{0};', - - border: 'border:{0};', - borderColor: 'border-color:{0};', - borderRadius: 'border-radius:{0};', - borderSpacing: 'border-spacing:{0};', - borderStyle: 'border-style:{0};', - borderWidth: 'border-width:{0};', - - textDecoration: 'text-decoration:{0};', - cursor: 'cursor:{0};', - letterSpacing: 'letter-spacing:{0};', - - gutterIconPath: 'background:url(\'{0}\') center center no-repeat;', - gutterIconSize: 'background-size:{0};', - - contentText: 'content:\'{0}\';', - contentIconPath: 'content:url(\'{0}\');', - margin: 'margin:{0};', - width: 'width:{0};', - height: 'height:{0};' - }; + +const _CSS_MAP = { + color: 'color:{0} !important;', + backgroundColor: 'background-color:{0};', + + outline: 'outline:{0};', + outlineColor: 'outline-color:{0};', + outlineStyle: 'outline-style:{0};', + outlineWidth: 'outline-width:{0};', + + border: 'border:{0};', + borderColor: 'border-color:{0};', + borderRadius: 'border-radius:{0};', + borderSpacing: 'border-spacing:{0};', + borderStyle: 'border-style:{0};', + borderWidth: 'border-width:{0};', + + textDecoration: 'text-decoration:{0};', + cursor: 'cursor:{0};', + letterSpacing: 'letter-spacing:{0};', + + gutterIconPath: 'background:url(\'{0}\') center center no-repeat;', + gutterIconSize: 'background-size:{0};', + + contentText: 'content:\'{0}\';', + contentIconPath: 'content:url(\'{0}\');', + margin: 'margin:{0};', + width: 'width:{0};', + height: 'height:{0};' +}; + + +class DecorationCSSRules { + + private _theme: ITheme; + private _className: string; + private _unThemedSelector: string; + private _hasContent: boolean; + private _ruleType: ModelDecorationCSSRuleType; + private _themeListener: IDisposable; + private _providerArgs: ProviderArguments; + private _usesThemeColors: boolean; + + public constructor(ruleType: ModelDecorationCSSRuleType, providerArgs: ProviderArguments, themeService: IThemeService) { + this._theme = themeService.getTheme(); + this._ruleType = ruleType; + this._providerArgs = providerArgs; + this._usesThemeColors = false; + this._hasContent = false; + + let className = CSSNameHelper.getClassName(this._providerArgs.key, ruleType); + if (this._providerArgs.parentTypeKey) { + className = className + ' ' + CSSNameHelper.getClassName(this._providerArgs.parentTypeKey, ruleType); + } + this._className = className; + + this._unThemedSelector = CSSNameHelper.getSelector(this._providerArgs.key, this._providerArgs.parentTypeKey, ruleType); + + this._buildCSS(); + + if (this._usesThemeColors) { + this._themeListener = themeService.onThemeChange(theme => { + this._theme = themeService.getTheme(); + this._removeCSS(); + this._buildCSS(); + }); + } + } + + public dispose() { + if (this._hasContent) { + this._removeCSS(); + this._hasContent = false; + } + if (this._themeListener) { + this._themeListener.dispose(); + this._themeListener = null; + } + } + + public get hasContent(): boolean { + return this._hasContent; + } + + public get className(): string { + return this._className; + } + + private _buildCSS(): void { + let options = this._providerArgs.options; + let unthemedCSS, lightCSS, darkCSS: string; + switch (this._ruleType) { + case ModelDecorationCSSRuleType.ClassName: + unthemedCSS = this.getCSSTextForModelDecorationClassName(options); + lightCSS = this.getCSSTextForModelDecorationClassName(options.light); + darkCSS = this.getCSSTextForModelDecorationClassName(options.dark); + break; + case ModelDecorationCSSRuleType.InlineClassName: + unthemedCSS = this.getCSSTextForModelDecorationInlineClassName(options); + lightCSS = this.getCSSTextForModelDecorationInlineClassName(options.light); + darkCSS = this.getCSSTextForModelDecorationInlineClassName(options.dark); + break; + case ModelDecorationCSSRuleType.GlyphMarginClassName: + unthemedCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options); + lightCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options.light); + darkCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options.dark); + break; + case ModelDecorationCSSRuleType.BeforeContentClassName: + unthemedCSS = this.getCSSTextForModelDecorationContentClassName(options.before); + lightCSS = this.getCSSTextForModelDecorationContentClassName(options.light && options.light.before); + darkCSS = this.getCSSTextForModelDecorationContentClassName(options.dark && options.dark.before); + break; + case ModelDecorationCSSRuleType.AfterContentClassName: + unthemedCSS = this.getCSSTextForModelDecorationContentClassName(options.after); + lightCSS = this.getCSSTextForModelDecorationContentClassName(options.light && options.light.after); + darkCSS = this.getCSSTextForModelDecorationContentClassName(options.dark && options.dark.after); + break; + default: + throw new Error('Unknown rule type: ' + this._ruleType); + } + let sheet = this._providerArgs.styleSheet.sheet; + + let hasContent = false; + if (unthemedCSS.length > 0) { + sheet.insertRule(`${this._unThemedSelector} {${unthemedCSS}}`); + hasContent = true; + } + if (lightCSS.length > 0) { + sheet.insertRule(`.vs${this._unThemedSelector} {${lightCSS}}`); + hasContent = true; + } + if (darkCSS.length > 0) { + sheet.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${darkCSS}}`); + hasContent = true; + } + this._hasContent = hasContent; + } + + private _removeCSS(): void { + dom.removeCSSRulesContainingSelector(this._unThemedSelector, this._providerArgs.styleSheet); + } /** * Build the CSS for decorations styled via `className`. */ - public static getCSSTextForModelDecorationClassName(opts: IThemeDecorationRenderOptions): string { + private getCSSTextForModelDecorationClassName(opts: IThemeDecorationRenderOptions): string { + if (!opts) { + return ''; + } let cssTextArr: string[] = []; - DecorationRenderHelper.collectCSSText(opts, ['backgroundColor', 'outline', 'outlineColor', 'outlineStyle', 'outlineWidth'], cssTextArr); - DecorationRenderHelper.collectBorderSettingsCSSText(opts, cssTextArr); + this.collectCSSText(opts, ['backgroundColor', 'outline', 'outlineColor', 'outlineStyle', 'outlineWidth'], cssTextArr); + this.collectBorderSettingsCSSText(opts, cssTextArr); return cssTextArr.join(''); } @@ -290,33 +351,39 @@ class DecorationRenderHelper { /** * Build the CSS for decorations styled via `inlineClassName`. */ - public static getCSSTextForModelDecorationInlineClassName(opts: IThemeDecorationRenderOptions): string { + private getCSSTextForModelDecorationInlineClassName(opts: IThemeDecorationRenderOptions): string { + if (!opts) { + return ''; + } let cssTextArr: string[] = []; - DecorationRenderHelper.collectCSSText(opts, ['textDecoration', 'cursor', 'color', 'letterSpacing'], cssTextArr); + this.collectCSSText(opts, ['textDecoration', 'cursor', 'color', 'letterSpacing'], cssTextArr); return cssTextArr.join(''); } /** * Build the CSS for decorations styled before or after content. */ - public static getCSSTextForModelDecorationContentClassName(opts: IContentDecorationRenderOptions): string { + private getCSSTextForModelDecorationContentClassName(opts: IContentDecorationRenderOptions): string { + if (!opts) { + return ''; + } let cssTextArr: string[] = []; if (typeof opts !== 'undefined') { - DecorationRenderHelper.collectBorderSettingsCSSText(opts, cssTextArr); + this.collectBorderSettingsCSSText(opts, cssTextArr); if (typeof opts.contentIconPath === 'string') { - cssTextArr.push(strings.format(this._CSS_MAP.contentIconPath, URI.file(opts.contentIconPath).toString().replace(/'/g, '%27'))); + cssTextArr.push(strings.format(_CSS_MAP.contentIconPath, URI.file(opts.contentIconPath).toString().replace(/'/g, '%27'))); } else if (opts.contentIconPath instanceof URI) { - cssTextArr.push(strings.format(this._CSS_MAP.contentIconPath, opts.contentIconPath.toString(true).replace(/'/g, '%27'))); + cssTextArr.push(strings.format(_CSS_MAP.contentIconPath, opts.contentIconPath.toString(true).replace(/'/g, '%27'))); } if (typeof opts.contentText === 'string') { const truncated = opts.contentText.match(/^.*$/m)[0]; // only take first line const escaped = truncated.replace(/['\\]/g, '\\$&'); - cssTextArr.push(strings.format(this._CSS_MAP.contentText, escaped)); + cssTextArr.push(strings.format(_CSS_MAP.contentText, escaped)); } - DecorationRenderHelper.collectCSSText(opts, ['textDecoration', 'color', 'backgroundColor', 'margin'], cssTextArr); - if (DecorationRenderHelper.collectCSSText(opts, ['width', 'height'], cssTextArr)) { + this.collectCSSText(opts, ['textDecoration', 'color', 'backgroundColor', 'margin'], cssTextArr); + if (this.collectCSSText(opts, ['width', 'height'], cssTextArr)) { cssTextArr.push('display:inline-block;'); } } @@ -327,17 +394,20 @@ class DecorationRenderHelper { /** * Build the CSS for decorations styled via `glpyhMarginClassName`. */ - public static getCSSTextForModelDecorationGlyphMarginClassName(opts: IThemeDecorationRenderOptions): string { + private getCSSTextForModelDecorationGlyphMarginClassName(opts: IThemeDecorationRenderOptions): string { + if (!opts) { + return ''; + } let cssTextArr = []; if (typeof opts.gutterIconPath !== 'undefined') { if (typeof opts.gutterIconPath === 'string') { - cssTextArr.push(strings.format(this._CSS_MAP.gutterIconPath, URI.file(opts.gutterIconPath).toString())); + cssTextArr.push(strings.format(_CSS_MAP.gutterIconPath, URI.file(opts.gutterIconPath).toString())); } else { - cssTextArr.push(strings.format(this._CSS_MAP.gutterIconPath, opts.gutterIconPath.toString(true).replace(/'/g, '%27'))); + cssTextArr.push(strings.format(_CSS_MAP.gutterIconPath, opts.gutterIconPath.toString(true).replace(/'/g, '%27'))); } if (typeof opts.gutterIconSize !== 'undefined') { - cssTextArr.push(strings.format(this._CSS_MAP.gutterIconSize, opts.gutterIconSize)); + cssTextArr.push(strings.format(_CSS_MAP.gutterIconSize, opts.gutterIconSize)); } } @@ -346,59 +416,38 @@ class DecorationRenderHelper { private static border_rules = ['border', 'borderRadius', 'borderColor', 'borderSpacing', 'borderStyle', 'borderWidth']; - public static collectBorderSettingsCSSText(opts: any, cssTextArr: string[]): boolean { - if (DecorationRenderHelper.collectCSSText(opts, DecorationRenderHelper.border_rules, cssTextArr)) { + private collectBorderSettingsCSSText(opts: any, cssTextArr: string[]): boolean { + if (this.collectCSSText(opts, DecorationCSSRules.border_rules, cssTextArr)) { cssTextArr.push(strings.format('box-sizing: border-box;')); return true; } return false; } - private static collectCSSText(opts: any, properties: string[], cssTextArr: string[]): boolean { + private collectCSSText(opts: any, properties: string[], cssTextArr: string[]): boolean { let lenBefore = cssTextArr.length; for (let property of properties) { - if (typeof opts[property] !== 'undefined') { - cssTextArr.push(strings.format(this._CSS_MAP[property], opts[property])); + let value = this.resolveValue(opts[property]); + if (typeof value === 'string') { + cssTextArr.push(strings.format(_CSS_MAP[property], value)); } } return cssTextArr.length !== lenBefore; } - /** - * Create CSS rules for `cssTexts` with the generated class names from `ruleType` - */ - public static createCSSRules(styleSheet: HTMLStyleElement, key: string, parentKey: string, ruleType: ModelDecorationCSSRuleType, cssTexts: { light: string, dark: string }): string { - function createCSSSelector(themeType: ThemeType, cssText: string) { - let selector = CSSNameHelper.getSelector(themeType, key, parentKey, ruleType); - dom.createCSSRule(selector, cssText, styleSheet); - } - - let hasContent = false; - if (cssTexts.light.length > 0) { - createCSSSelector(ThemeType.Light, cssTexts.light); - hasContent = true; - } - if (cssTexts.dark.length > 0) { - createCSSSelector(ThemeType.Dark, cssTexts.dark); - createCSSSelector(ThemeType.HighContrastBlack, cssTexts.dark); - hasContent = true; - } - if (hasContent) { - let className = CSSNameHelper.getClassName(key, ruleType); - if (parentKey) { - className = className + ' ' + CSSNameHelper.getClassName(parentKey, ruleType); + private resolveValue(value: string | ThemeColor): string { + if (isThemeColor(value)) { + this._usesThemeColors = true; + let color = this._theme.getColor(value.id); + if (color) { + return color.toString(); } - return className; + return void 0; } - return void 0; + return value; } } -const enum ThemeType { - Light = 0, - Dark = 1, - HighContrastBlack = 2 -} const enum ModelDecorationCSSRuleType { ClassName = 0, InlineClassName = 1, @@ -409,22 +458,12 @@ const enum ModelDecorationCSSRuleType { class CSSNameHelper { - private static _getSelectorPrefixOf(theme: ThemeType): string { - if (theme === ThemeType.Light) { - return '.monaco-editor.vs'; - } - if (theme === ThemeType.Dark) { - return '.monaco-editor.vs-dark'; - } - return '.monaco-editor.hc-black'; - } - public static getClassName(key: string, type: ModelDecorationCSSRuleType): string { return 'ced-' + key + '-' + type; } - public static getSelector(themeType: ThemeType, key: string, parentKey: string, ruleType: ModelDecorationCSSRuleType): string { - let selector = this._getSelectorPrefixOf(themeType) + ' .' + this.getClassName(key, ruleType); + public static getSelector(key: string, parentKey: string, ruleType: ModelDecorationCSSRuleType): string { + let selector = '.monaco-editor .' + this.getClassName(key, ruleType); if (parentKey) { selector = selector + '.' + this.getClassName(parentKey, ruleType); } @@ -435,27 +474,4 @@ class CSSNameHelper { } return selector; } - - public static getDeletionSubstring(key: string): string { - return '.ced-' + key + '-'; - } -} - -// ---- Normalize decoration render options per theme -function getThemedRenderOptions(opts: { light?: T, dark?: T }): { light?: T, dark?: T } { - // TODO@alex,joh - not really how/what deep clone is being used - // for here but it will break the URI TODO@martin - - // let light = objects.deepClone(opts); - let light = parse(stringify(opts)); - objects.mixin(light, opts.light); - - // let dark = objects.deepClone(opts); - let dark = parse(stringify(opts)); - objects.mixin(dark, opts.dark); - - return { - light: light, - dark: dark - }; } diff --git a/src/vs/editor/browser/standalone/standaloneServices.ts b/src/vs/editor/browser/standalone/standaloneServices.ts index 1ce2c0d30b34f..550b5294605dd 100644 --- a/src/vs/editor/browser/standalone/standaloneServices.ts +++ b/src/vs/editor/browser/standalone/standaloneServices.ts @@ -133,13 +133,14 @@ export module StaticServices { export const editorWorkerService = define(IEditorWorkerService, (o) => new EditorWorkerServiceImpl(modelService.get(o), configurationService.get(o), modeService.get(o))); - export const codeEditorService = define(ICodeEditorService, () => new CodeEditorServiceImpl()); + export const standaloneThemeService = define(IStandaloneThemeService, () => new StandaloneThemeServiceImpl()); + + export const codeEditorService = define(ICodeEditorService, (o) => new CodeEditorServiceImpl(standaloneThemeService.get(o))); export const progressService = define(IProgressService, () => new SimpleProgressService()); export const storageService = define(IStorageService, () => NullStorageService); - export const standaloneThemeService = define(IStandaloneThemeService, () => new StandaloneThemeServiceImpl()); } export class DynamicStandaloneServices extends Disposable { diff --git a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts index 6f9f3e03b553f..46c6d71d94139 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts @@ -15,6 +15,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; import { editorOverviewRulerBorder, editorCursor } from 'vs/editor/common/view/editorColorRegistry'; +import { Color } from 'vs/base/common/color'; export class DecorationsOverviewRuler extends ViewPart { @@ -186,15 +187,23 @@ export class DecorationsOverviewRuler extends ViewPart { dec.range.endLineNumber, overviewRuler.position, 0, - overviewRuler.color, - overviewRuler.darkColor, - overviewRuler.hcColor + this.resolveRulerColor(overviewRuler.color), + this.resolveRulerColor(overviewRuler.darkColor), + this.resolveRulerColor(overviewRuler.hcColor) )); } return zones; } + private resolveRulerColor(color: string | editorCommon.ThemeColor): string { + if (editorCommon.isThemeColor(color)) { + let c = this._context.theme.getColor(color.id) || Color.transparent; + return c.toString(); + } + return color; + } + private _createZonesFromCursors(): OverviewRulerZone[] { let zones: OverviewRulerZone[] = []; diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index 9a0674a5f28ef..058ea7e36532c 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -41,19 +41,19 @@ export enum OverviewRulerLane { export interface IModelDecorationOverviewRulerOptions { /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - color: string; + color: string | ThemeColor; /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - darkColor: string; + darkColor: string | ThemeColor; /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - hcColor?: string; + hcColor?: string | ThemeColor; /** * The position in the overview ruler. */ @@ -1621,19 +1621,30 @@ export interface IEditorContribution { restoreViewState?(state: any): void; } +export interface ThemeColor { + id: string; +} + +/** + * @internal + */ +export function isThemeColor(o): o is ThemeColor { + return o && typeof o.id === 'string'; +} + /** * @internal */ export interface IThemeDecorationRenderOptions { - backgroundColor?: string; + backgroundColor?: string | ThemeColor; outline?: string; - outlineColor?: string; + outlineColor?: string | ThemeColor; outlineStyle?: string; outlineWidth?: string; border?: string; - borderColor?: string; + borderColor?: string | ThemeColor; borderRadius?: string; borderSpacing?: string; borderStyle?: string; @@ -1641,13 +1652,13 @@ export interface IThemeDecorationRenderOptions { textDecoration?: string; cursor?: string; - color?: string; + color?: string | ThemeColor; letterSpacing?: string; gutterIconPath?: string | URI; gutterIconSize?: string; - overviewRulerColor?: string; + overviewRulerColor?: string | ThemeColor; before?: IContentDecorationRenderOptions; after?: IContentDecorationRenderOptions; @@ -1661,9 +1672,10 @@ export interface IContentDecorationRenderOptions { contentIconPath?: string | URI; border?: string; + borderColor?: string | ThemeColor; textDecoration?: string; - color?: string; - backgroundColor?: string; + color?: string | ThemeColor; + backgroundColor?: string | ThemeColor; margin?: string; width?: string; diff --git a/src/vs/editor/common/model/textModelWithDecorations.ts b/src/vs/editor/common/model/textModelWithDecorations.ts index 3e36eeedda62a..84380b69ef3b3 100644 --- a/src/vs/editor/common/model/textModelWithDecorations.ts +++ b/src/vs/editor/common/model/textModelWithDecorations.ts @@ -840,9 +840,9 @@ function cleanClassName(className: string): string { } export class ModelDecorationOverviewRulerOptions implements editorCommon.IModelDecorationOverviewRulerOptions { - readonly color: string; - readonly darkColor: string; - readonly hcColor: string; + readonly color: string | editorCommon.ThemeColor; + readonly darkColor: string | editorCommon.ThemeColor; + readonly hcColor: string | editorCommon.ThemeColor; readonly position: editorCommon.OverviewRulerLane; constructor(options: editorCommon.IModelDecorationOverviewRulerOptions) { diff --git a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts index 2dbd09ac1c023..d68266803a77a 100644 --- a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts +++ b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts @@ -9,6 +9,9 @@ import URI from 'vs/base/common/uri'; import * as dom from 'vs/base/browser/dom'; import { CodeEditorServiceImpl } from 'vs/editor/browser/services/codeEditorServiceImpl'; import { IDecorationRenderOptions } from 'vs/editor/common/editorCommon'; +import { TestThemeService, TestTheme } from 'vs/workbench/test/workbenchTestServices'; + +const themeServiceMock = new TestThemeService(); suite('Decoration Render Options', () => { var options: IDecorationRenderOptions = { @@ -18,12 +21,12 @@ suite('Decoration Render Options', () => { borderColor: 'yellow' }; test('register and resolve decoration type', () => { - var s = new CodeEditorServiceImpl(); + var s = new CodeEditorServiceImpl(themeServiceMock); s.registerDecorationType('example', options); assert.notEqual(s.resolveDecorationOptions('example', false), undefined); }); test('remove decoration type', () => { - var s = new CodeEditorServiceImpl(); + var s = new CodeEditorServiceImpl(themeServiceMock); s.registerDecorationType('example', options); assert.notEqual(s.resolveDecorationOptions('example', false), undefined); s.removeDecorationType('example'); @@ -39,7 +42,7 @@ suite('Decoration Render Options', () => { test('css properties', () => { var styleSheet = dom.createStyleSheet(); - var s = new CodeEditorServiceImpl(styleSheet); + var s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', options); var sheet = readStyleSheet(styleSheet); assert( @@ -50,11 +53,76 @@ suite('Decoration Render Options', () => { assert(sheet.indexOf('background-color: red;') > 0); }); + test('theme color', () => { + var options: IDecorationRenderOptions = { + backgroundColor: { id: 'editorBackground' }, + borderColor: { id: 'editorBorder' }, + }; + var colors: { [key: string]: string } = { + editorBackground: '#FF0000' + }; + + var styleSheet = dom.createStyleSheet(); + let themeService = new TestThemeService(new TestTheme(colors)); + var s = new CodeEditorServiceImpl(themeService, styleSheet); + s.registerDecorationType('example', options); + var sheet = readStyleSheet(styleSheet); + assert.equal(sheet, '.monaco-editor .ced-example-0 { background-color: rgb(255, 0, 0); }'); + + colors = { + editorBackground: '#EE0000', + editorBorder: '#00FFFF' + }; + themeService.setTheme(new TestTheme(colors)); + sheet = readStyleSheet(styleSheet); + assert.equal(sheet, '.monaco-editor .ced-example-0 { background-color: rgb(238, 0, 0); border-color: rgb(0, 255, 255); box-sizing: border-box; }'); + + s.removeDecorationType('example'); + sheet = readStyleSheet(styleSheet); + assert.equal(sheet, ''); + + }); + + test('theme overrides', () => { + var options: IDecorationRenderOptions = { + color: { id: 'editorBackground' }, + light: { + color: '#FF00FF' + }, + dark: { + color: '#000000', + after: { + color: { id: 'infoForeground' } + } + } + }; + var colors: { [key: string]: string } = { + editorBackground: '#FF0000', + infoForeground: '#444444' + }; + + var styleSheet = dom.createStyleSheet(); + let themeService = new TestThemeService(new TestTheme(colors)); + var s = new CodeEditorServiceImpl(themeService, styleSheet); + s.registerDecorationType('example', options); + var sheet = readStyleSheet(styleSheet); + let expected = + '.vs-dark.monaco-editor .ced-example-4::after, .hc-black.monaco-editor .ced-example-4::after { color: rgb(68, 68, 68) !important; }\n' + + '.vs-dark.monaco-editor .ced-example-1, .hc-black.monaco-editor .ced-example-1 { color: rgb(0, 0, 0) !important; }\n' + + '.vs.monaco-editor .ced-example-1 { color: rgb(255, 0, 255) !important; }\n' + + '.monaco-editor .ced-example-1 { color: rgb(255, 0, 0) !important; }'; + assert.equal(sheet, expected); + + s.removeDecorationType('example'); + sheet = readStyleSheet(styleSheet); + assert.equal(sheet, ''); + }); + test('css properties, gutterIconPaths', () => { var styleSheet = dom.createStyleSheet(); // unix file path (used as string) - var s = new CodeEditorServiceImpl(styleSheet); + var s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', { gutterIconPath: '/Users/foo/bar.png' }); var sheet = readStyleSheet(styleSheet);//.innerHTML || styleSheet.sheet.toString(); assert( @@ -63,7 +131,7 @@ suite('Decoration Render Options', () => { ); // windows file path (used as string) - s = new CodeEditorServiceImpl(styleSheet); + s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', { gutterIconPath: 'c:\\files\\miles\\more.png' }); sheet = readStyleSheet(styleSheet); // TODO@Alex test fails @@ -73,7 +141,7 @@ suite('Decoration Render Options', () => { // ); // URI, only minimal encoding - s = new CodeEditorServiceImpl(styleSheet); + s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', { gutterIconPath: URI.parse('data:image/svg+xml;base64,PHN2ZyB4b+') }); sheet = readStyleSheet(styleSheet); assert( @@ -82,7 +150,7 @@ suite('Decoration Render Options', () => { ); // single quote must always be escaped/encoded - s = new CodeEditorServiceImpl(styleSheet); + s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', { gutterIconPath: '/Users/foo/b\'ar.png' }); sheet = readStyleSheet(styleSheet); assert( @@ -90,7 +158,7 @@ suite('Decoration Render Options', () => { || sheet.indexOf('background: url("file:///Users/foo/b%27ar.png") center center no-repeat;') > 0 ); - s = new CodeEditorServiceImpl(styleSheet); + s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', { gutterIconPath: URI.parse('http://test/pa\'th') }); sheet = readStyleSheet(styleSheet); assert( diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index cee64b0706f55..707cb1047fa20 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -1068,19 +1068,19 @@ declare module monaco.editor { export interface IModelDecorationOverviewRulerOptions { /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - color: string; + color: string | ThemeColor; /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - darkColor: string; + darkColor: string | ThemeColor; /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - hcColor?: string; + hcColor?: string | ThemeColor; /** * The position in the overview ruler. */ @@ -2158,6 +2158,10 @@ declare module monaco.editor { restoreViewState?(state: any): void; } + export interface ThemeColor { + id: string; + } + export interface ICommonCodeEditor extends IEditor { /** * An event emitted when the content of the current model has changed. diff --git a/src/vs/platform/theme/common/themeService.ts b/src/vs/platform/theme/common/themeService.ts index 64e028e6215df..10305538863d4 100644 --- a/src/vs/platform/theme/common/themeService.ts +++ b/src/vs/platform/theme/common/themeService.ts @@ -14,9 +14,9 @@ import Event, { Emitter } from 'vs/base/common/event'; export let IThemeService = createDecorator('themeService'); // base themes -export const DARK = 'dark'; -export const LIGHT = 'light'; -export const HIGH_CONTRAST = 'hc'; +export const DARK: ThemeType = 'dark'; +export const LIGHT: ThemeType = 'light'; +export const HIGH_CONTRAST: ThemeType = 'hc'; export type ThemeType = 'light' | 'dark' | 'hc'; export function getThemeTypeSelector(type: ThemeType): string { diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 190042afeeaf8..4850740fec14c 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -721,14 +721,28 @@ declare module 'vscode' { preview?: boolean; } + /** + * A reference to one of the workbench colors as defined in https://code.visualstudio.com/docs/getstarted/theme-color-reference. + * Using a theme color is preferred over a custom color as it gives theme authors and users the possibility to change the color. + */ + export class ThemeColor { + + /** + * Creates a reference to a theme color. + * @param id of the color. The available colors are listed in https://code.visualstudio.com/docs/getstarted/theme-color-reference. + */ + constructor(id: string); + } + /** * Represents theme specific rendering styles for a [text editor decoration](#TextEditorDecorationType). */ export interface ThemableDecorationRenderOptions { /** * Background color of the decoration. Use rgba() and define transparent background colors to play well with other decorations. + * Alternativly a color from the color registry an be [referenced](#ColorIdentifier). */ - backgroundColor?: string; + backgroundColor?: string | ThemeColor; /** * CSS styling property that will be applied to text enclosed by a decoration. @@ -739,7 +753,7 @@ declare module 'vscode' { * CSS styling property that will be applied to text enclosed by a decoration. * Better use 'outline' for setting one or more of the individual outline properties. */ - outlineColor?: string; + outlineColor?: string | ThemeColor; /** * CSS styling property that will be applied to text enclosed by a decoration. @@ -762,7 +776,7 @@ declare module 'vscode' { * CSS styling property that will be applied to text enclosed by a decoration. * Better use 'border' for setting one or more of the individual border properties. */ - borderColor?: string; + borderColor?: string | ThemeColor; /** * CSS styling property that will be applied to text enclosed by a decoration. @@ -801,7 +815,7 @@ declare module 'vscode' { /** * CSS styling property that will be applied to text enclosed by a decoration. */ - color?: string; + color?: string | ThemeColor; /** * CSS styling property that will be applied to text enclosed by a decoration. @@ -823,7 +837,7 @@ declare module 'vscode' { /** * The color of the decoration in the overview ruler. Use rgba() and define transparent colors to play well with other decorations. */ - overviewRulerColor?: string; + overviewRulerColor?: string | ThemeColor; /** * Defines the rendering options of the attachment that is inserted before the decorated text @@ -850,6 +864,10 @@ declare module 'vscode' { * CSS styling property that will be applied to the decoration attachment. */ border?: string; + /** + * CSS styling property that will be applied to text enclosed by a decoration. + */ + borderColor?: string | ThemeColor; /** * CSS styling property that will be applied to the decoration attachment. */ @@ -857,11 +875,11 @@ declare module 'vscode' { /** * CSS styling property that will be applied to the decoration attachment. */ - color?: string; + color?: string | ThemeColor; /** * CSS styling property that will be applied to the decoration attachment. */ - backgroundColor?: string; + backgroundColor?: string | ThemeColor; /** * CSS styling property that will be applied to the decoration attachment. */ diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 6aebd24157218..eb5b38f2391f0 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -534,6 +534,7 @@ export function createApiFactory( WorkspaceEdit: extHostTypes.WorkspaceEdit, ProgressLocation: extHostTypes.ProgressLocation, TreeItemCollapsibleState: extHostTypes.TreeItemCollapsibleState, + ThemeColor: extHostTypes.ThemeColor, // functions FileLocationKind: extHostTypes.FileLocationKind, ApplyToKind: extHostTypes.ApplyToKind, diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index 1c10cc2625192..20b0d2a1aff0a 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1270,3 +1270,10 @@ export enum TreeItemCollapsibleState { Collapsed = 1, Expanded = 2 } + +export class ThemeColor { + id: string; + constructor(id: string) { + this.id = id; + } +} \ No newline at end of file diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index bc6e0f5e11dff..899b03112be58 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -50,8 +50,7 @@ import { IWindowsService, IWindowService } from 'vs/platform/windows/common/wind import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; import { RawTextSource, IRawTextSource } from 'vs/editor/common/model/textSource'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { IThemeService, ITheme, IThemingParticipant, ThemeType } from 'vs/platform/theme/common/themeService'; -import { IDisposable } from 'vs/base/common/lifecycle'; +import { IThemeService, ITheme, DARK } from 'vs/platform/theme/common/themeService'; import { Color } from 'vs/base/common/color'; import { isLinux } from 'vs/base/common/platform'; @@ -1000,10 +999,16 @@ export class TestWindowsService implements IWindowsService { } export class TestTheme implements ITheme { - type: ThemeType; + + constructor(private colors: { [id: string]: string; } = {}, public type = DARK) { + } getColor(color: string, useDefault?: boolean): Color { - throw new Error('Method not implemented.'); + let value = this.colors[color]; + if (value) { + return Color.fromHex(value); + } + return void 0; } defines(color: string): boolean { @@ -1011,17 +1016,30 @@ export class TestTheme implements ITheme { } } -const testTheme = new TestTheme(); - export class TestThemeService implements IThemeService { _serviceBrand: any; + _theme: ITheme; + _onThemeChange = new Emitter(); + + constructor(theme = new TestTheme()) { + this._theme = theme; + } getTheme(): ITheme { - return testTheme; + return this._theme; + } + + setTheme(theme: ITheme) { + this._theme = theme; + this.fireThemeChange(); + } + + fireThemeChange() { + this._onThemeChange.fire(this._theme); } - onThemeChange(participant: IThemingParticipant): IDisposable { - return { dispose: () => { } }; + public get onThemeChange(): Event { + return this._onThemeChange.event; } } From 2bf7fbfc367ac78871a8c2ca597037741d00b582 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Wed, 24 May 2017 13:59:47 -0700 Subject: [PATCH 1014/2747] Fix #25422 - also search external files --- src/vs/workbench/services/search/node/ripgrepTextSearch.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts index 50cd95218a9a9..829406f52fef6 100644 --- a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts +++ b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts @@ -225,7 +225,7 @@ export class RipgrepParser extends EventEmitter { this.onResult(); } - this.fileMatch = new FileMatch(path.join(this.rootFolder, r[1])); + this.fileMatch = new FileMatch(path.resolve(this.rootFolder, r[1])); } else { // Line is empty (or malformed) } @@ -461,6 +461,8 @@ function getRgArgs(config: IRawSearch): { args: string[], siblingClauses: glob.I args.push('./'); } + args.push(...config.extraFiles); + return { args, siblingClauses }; } From 68c6a61380017c857addc1f98a241832f93fbc3a Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 May 2017 14:00:58 -0700 Subject: [PATCH 1015/2747] Clean up var name --- src/vs/workbench/parts/terminal/node/terminalProcess.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/terminal/node/terminalProcess.ts b/src/vs/workbench/parts/terminal/node/terminalProcess.ts index 3a2b00a4a7031..ab1589b4dcfb8 100644 --- a/src/vs/workbench/parts/terminal/node/terminalProcess.ts +++ b/src/vs/workbench/parts/terminal/node/terminalProcess.ts @@ -5,7 +5,7 @@ import * as os from 'os'; import * as path from 'path'; -import * as ptyJs from 'node-pty'; +import * as pty from 'node-pty'; // The pty process needs to be run in its own child process to get around maxing out CPU on Mac, // see https://github.com/electron/electron/issues/38 @@ -43,7 +43,7 @@ if (cols && rows) { options.rows = parseInt(rows, 10); } -var ptyProcess = ptyJs.fork(shell, args, options); +var ptyProcess = pty.fork(shell, args, options); var closeTimeout; var exitCode; From 6b69d77eb5d5f74d4db061a07db150a2c51eb982 Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 10 May 2017 14:57:21 -0700 Subject: [PATCH 1016/2747] draft version --- .../contrib/find/browser/findWidget.css | 34 ++++++++---- .../editor/contrib/find/browser/findWidget.ts | 53 +++++++++++++++++-- 2 files changed, 73 insertions(+), 14 deletions(-) diff --git a/src/vs/editor/contrib/find/browser/findWidget.css b/src/vs/editor/contrib/find/browser/findWidget.css index 74d52635a45a8..f5b3f333204bd 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.css +++ b/src/vs/editor/contrib/find/browser/findWidget.css @@ -51,7 +51,9 @@ height: 64px; /* find input height + replace input height */ } .monaco-editor .find-widget.replaceToggled > .replace-part { - display: inline-block; + display: flex; + display: -webkit-flex; + align-items: center; } .monaco-editor .find-widget.visible, @@ -81,6 +83,9 @@ .monaco-editor .find-widget > .replace-part { margin: 4px 0 0 17px; font-size: 12px; + display: flex; + display: -webkit-flex; + align-items: center; } .monaco-editor .find-widget > .find-part .monaco-inputbox, @@ -95,8 +100,9 @@ } .monaco-editor .find-widget .monaco-findInput { - display: inline-block; vertical-align: middle; + display: flex; + flex:1; } .monaco-editor .find-widget .matchesCount { @@ -111,6 +117,7 @@ } .monaco-editor .find-widget .button { + min-width: 20px; width: 20px; height: 20px; display: inline-block; @@ -227,7 +234,8 @@ } .monaco-editor .find-widget > .replace-part > .replace-input { - display: inline-block; + display: flex; + flex:1; vertical-align: middle; } @@ -242,12 +250,9 @@ } /* NARROW (SMALLER THAN REDUCED) */ -.monaco-editor .find-widget.narrow-find-widget > .find-part .monaco-findInput, -.monaco-editor .find-widget.narrow-find-widget > .replace-part .replace-input { - width: 171px !important; -} -.monaco-editor .find-widget.narrow-find-widget > .find-part .monaco-inputbox > .wrapper > .input { - width: 105px !important; +.monaco-editor .find-widget.narrow-find-widget > .find-part, +.monaco-editor .find-widget.narrow-find-widget > .replace-part { + width: 240px !important; } /* COLLAPSED (SMALLER THAN NARROW) */ @@ -258,10 +263,14 @@ .monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls { display:none; } +.monaco-editor .find-widget.collapsed-find-widget > .find-part, +.monaco-editor .find-widget.collapsed-find-widget > .replace-part { + max-width: 94px !important; +} .monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput, .monaco-editor .find-widget.collapsed-find-widget > .replace-part .replace-input, .monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-inputbox > .wrapper > .input { - width: 71px !important; + max-width: 71px !important; } .monaco-editor .findMatch { @@ -275,6 +284,11 @@ animation-name: inherit !important; } +.monaco-editor .find-widget .monaco-sash { + background: grey; + margin-left: -4px; +} + .monaco-editor.hc-black .find-widget .previous, .monaco-editor.vs-dark .find-widget .previous { background-image: url('images/previous-inverse.svg'); diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index 145453e625e69..a36edf38b05e7 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -16,6 +16,7 @@ import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview import { FindInput, IFindInputStyles } from 'vs/base/browser/ui/findinput/findInput'; import { IMessage as InputBoxMessage, InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; import { Widget } from 'vs/base/browser/ui/widget'; +import { Sash, IHorizontalSashLayoutProvider, ISashEvent } from 'vs/base/browser/ui/sash/sash'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, IViewZone, OverlayWidgetPositionPreference } from 'vs/editor/browser/editorBrowser'; import { FIND_IDS, MATCHES_LIMIT } from 'vs/editor/contrib/find/common/findModel'; @@ -68,7 +69,9 @@ export class FindWidgetViewZone implements IViewZone { } } -export class FindWidget extends Widget implements IOverlayWidget { + +export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSashLayoutProvider { + private static ID = 'editor.contrib.findWidget'; private static PART_WIDTH = 275; @@ -104,6 +107,8 @@ export class FindWidget extends Widget implements IOverlayWidget { private _viewZone: FindWidgetViewZone; private _viewZoneId: number; + private _resizeSash: Sash; + constructor( codeEditor: ICodeEditor, controller: IFindController, @@ -126,6 +131,26 @@ export class FindWidget extends Widget implements IOverlayWidget { this._register(this._state.addChangeListener((e) => this._onStateChanged(e))); this._buildDomNode(); + this._resizeSash = new Sash(this._domNode, this, { orientation: 0}); + let data: { startX: number; }; + let originalWidth = 411; + this._register(this._resizeSash.addListener('start', (e: ISashEvent) => { + data = { + startX: e.startX, + }; + originalWidth = dom.getTotalWidth(this._domNode); + })); + + this._register(this._resizeSash.addListener('end', () => { + data = undefined; + })); + + this._register(this._resizeSash.addListener('change', (evt: ISashEvent) => { + if (data) { + this._domNode.style.width = `${originalWidth + data.startX - evt.currentX}px`; + this._findInput.setWidth(FindWidget.FIND_INPUT_AREA_WIDTH + Math.max(0, data.startX - evt.currentX)); + } + })); this._updateButtons(); let checkEditorWidth = () => { @@ -134,18 +159,27 @@ export class FindWidget extends Widget implements IOverlayWidget { let collapsedFindWidget = false; let reducedFindWidget = false; let narrowFindWidget = false; - if (WIDGET_FIXED_WIDTH + 28 >= editorWidth + 50) { + let widgetWidth = Math.max(411, dom.getTotalWidth(this._domNode)) - 69; + if (widgetWidth + 28 >= editorWidth + 50) { collapsedFindWidget = true; } - if (WIDGET_FIXED_WIDTH + 28 >= editorWidth) { + if (widgetWidth + 28 >= editorWidth) { narrowFindWidget = true; } - if (WIDGET_FIXED_WIDTH + MAX_MATCHES_COUNT_WIDTH + 28 + minimapWidth >= editorWidth) { + if (widgetWidth + MAX_MATCHES_COUNT_WIDTH + 28 + minimapWidth >= editorWidth) { reducedFindWidget = true; } dom.toggleClass(this._domNode, 'collapsed-find-widget', collapsedFindWidget); dom.toggleClass(this._domNode, 'reduced-find-widget', reducedFindWidget); dom.toggleClass(this._domNode, 'narrow-find-widget', narrowFindWidget); + if (collapsedFindWidget) { + this._domNode.style.maxWidth = '111px'; + } else if (narrowFindWidget) { + this._domNode.style.maxWidth = '257px'; + } else { + this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; + } + }; checkEditorWidth(); @@ -552,6 +586,17 @@ export class FindWidget extends Widget implements IOverlayWidget { } } + // ----- sash + public getHorizontalSashTop(sash: Sash): number { + return 0; + } + public getHorizontalSashLeft?(sash: Sash): number { + return 0; + } + public getHorizontalSashWidth?(sash: Sash): number { + return 500; + } + // ----- initialization private _keybindingLabelFor(actionId: string): string { From 0ac843e30646244cb90a80d79d23ac618cff87ee Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 11 May 2017 15:11:28 -0700 Subject: [PATCH 1017/2747] Flex Box --- .../contrib/find/browser/findWidget.css | 27 +++++++++++++------ .../editor/contrib/find/browser/findWidget.ts | 25 +++++++++++++---- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/src/vs/editor/contrib/find/browser/findWidget.css b/src/vs/editor/contrib/find/browser/findWidget.css index f5b3f333204bd..e974c6a83c799 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.css +++ b/src/vs/editor/contrib/find/browser/findWidget.css @@ -93,6 +93,10 @@ height: 25px; } +.monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .input { + width: 100% !important; + padding-right: 66px; +} .monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .input, .monaco-editor .find-widget > .replace-part .monaco-inputbox > .wrapper > .input { padding-top: 2px; @@ -106,7 +110,9 @@ } .monaco-editor .find-widget .matchesCount { - display: inline-block; + display: flex; + display: -webkit-flex; + flex: initial; margin: 0 1px 0 3px; padding: 2px 2px 0 2px; height: 25px; @@ -120,8 +126,9 @@ min-width: 20px; width: 20px; height: 20px; - display: inline-block; - vertical-align: middle; + display: flex; + display: -webkit-flex; + flex: initial; margin-left: 3px; background-position: center center; background-repeat: no-repeat; @@ -250,10 +257,10 @@ } /* NARROW (SMALLER THAN REDUCED) */ -.monaco-editor .find-widget.narrow-find-widget > .find-part, +/*.monaco-editor .find-widget.narrow-find-widget > .find-part, .monaco-editor .find-widget.narrow-find-widget > .replace-part { width: 240px !important; -} +}*/ /* COLLAPSED (SMALLER THAN NARROW) */ .monaco-editor .find-widget.collapsed-find-widget .button.previous, @@ -263,7 +270,11 @@ .monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls { display:none; } -.monaco-editor .find-widget.collapsed-find-widget > .find-part, + +.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-inputbox > .wrapper > .input { + padding-right: 0px; +} +/*.monaco-editor .find-widget.collapsed-find-widget > .find-part, .monaco-editor .find-widget.collapsed-find-widget > .replace-part { max-width: 94px !important; } @@ -271,7 +282,7 @@ .monaco-editor .find-widget.collapsed-find-widget > .replace-part .replace-input, .monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-inputbox > .wrapper > .input { max-width: 71px !important; -} +}*/ .monaco-editor .findMatch { -webkit-animation-duration: 0; @@ -286,7 +297,7 @@ .monaco-editor .find-widget .monaco-sash { background: grey; - margin-left: -4px; + margin-left: -4px; } .monaco-editor.hc-black .find-widget .previous, diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index a36edf38b05e7..297d4fe61555b 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -50,7 +50,6 @@ const NLS_MATCHES_LOCATION = nls.localize('label.matchesLocation', "{0} of {1}") const NLS_NO_RESULTS = nls.localize('label.noResults', "No Results"); let MAX_MATCHES_COUNT_WIDTH = 69; -const WIDGET_FIXED_WIDTH = 411 - 69; export class FindWidgetViewZone implements IViewZone { @@ -131,7 +130,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._register(this._state.addChangeListener((e) => this._onStateChanged(e))); this._buildDomNode(); - this._resizeSash = new Sash(this._domNode, this, { orientation: 0}); + this._resizeSash = new Sash(this._domNode, this, { orientation: 0 }); let data: { startX: number; }; let originalWidth = 411; this._register(this._resizeSash.addListener('start', (e: ISashEvent) => { @@ -147,8 +146,24 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._register(this._resizeSash.addListener('change', (evt: ISashEvent) => { if (data) { - this._domNode.style.width = `${originalWidth + data.startX - evt.currentX}px`; - this._findInput.setWidth(FindWidget.FIND_INPUT_AREA_WIDTH + Math.max(0, data.startX - evt.currentX)); + let reducedFindWidget = false; + let narrowFindWidget = false; + let collapsedFindWidget = false; + let width = originalWidth + data.startX - evt.currentX; + if (width < 411) { + reducedFindWidget = true; + } + if (width < 411 - 69) { + narrowFindWidget = true; + } + if (width < 265) { + collapsedFindWidget = true; + } + dom.toggleClass(this._domNode, 'collapsed-find-widget', collapsedFindWidget); + dom.toggleClass(this._domNode, 'narrow-find-widget', narrowFindWidget); + dom.toggleClass(this._domNode, 'reduced-find-widget', reducedFindWidget); + this._domNode.style.width = `${width}px`; + // this._findInput.setWidth(FindWidget.FIND_INPUT_AREA_WIDTH + Math.max(0, data.startX - evt.currentX)); } })); this._updateButtons(); @@ -170,8 +185,8 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas reducedFindWidget = true; } dom.toggleClass(this._domNode, 'collapsed-find-widget', collapsedFindWidget); - dom.toggleClass(this._domNode, 'reduced-find-widget', reducedFindWidget); dom.toggleClass(this._domNode, 'narrow-find-widget', narrowFindWidget); + dom.toggleClass(this._domNode, 'reduced-find-widget', reducedFindWidget); if (collapsedFindWidget) { this._domNode.style.maxWidth = '111px'; } else if (narrowFindWidget) { From 3f683632a38292903c96c51122f311ee9649b3ef Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 24 May 2017 14:44:40 -0700 Subject: [PATCH 1018/2747] make input box responsive when widget or editor resizes --- .../contrib/find/browser/findWidget.css | 30 ++-- .../editor/contrib/find/browser/findWidget.ts | 155 ++++++++++-------- 2 files changed, 95 insertions(+), 90 deletions(-) diff --git a/src/vs/editor/contrib/find/browser/findWidget.css b/src/vs/editor/contrib/find/browser/findWidget.css index e974c6a83c799..0fdd469454970 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.css +++ b/src/vs/editor/contrib/find/browser/findWidget.css @@ -106,6 +106,7 @@ .monaco-editor .find-widget .monaco-findInput { vertical-align: middle; display: flex; + display: -webkit-flex; flex:1; } @@ -242,12 +243,9 @@ .monaco-editor .find-widget > .replace-part > .replace-input { display: flex; - flex:1; + display: -webkit-flex; vertical-align: middle; -} - -.monaco-editor .find-widget > .replace-part > .replace-input > .monaco-inputbox { - width: 100%; + width: auto !important; } /* REDUCED */ @@ -257,12 +255,15 @@ } /* NARROW (SMALLER THAN REDUCED) */ -/*.monaco-editor .find-widget.narrow-find-widget > .find-part, -.monaco-editor .find-widget.narrow-find-widget > .replace-part { - width: 240px !important; -}*/ +.monaco-editor .find-widget.narrow-find-widget { + max-width: 257px !important; +} /* COLLAPSED (SMALLER THAN NARROW) */ +.monaco-editor .find-widget.collapsed-find-widget { + max-width: 111px !important; +} + .monaco-editor .find-widget.collapsed-find-widget .button.previous, .monaco-editor .find-widget.collapsed-find-widget .button.next, .monaco-editor .find-widget.collapsed-find-widget .button.replace, @@ -274,15 +275,6 @@ .monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-inputbox > .wrapper > .input { padding-right: 0px; } -/*.monaco-editor .find-widget.collapsed-find-widget > .find-part, -.monaco-editor .find-widget.collapsed-find-widget > .replace-part { - max-width: 94px !important; -} -.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput, -.monaco-editor .find-widget.collapsed-find-widget > .replace-part .replace-input, -.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-inputbox > .wrapper > .input { - max-width: 71px !important; -}*/ .monaco-editor .findMatch { -webkit-animation-duration: 0; @@ -296,7 +288,7 @@ } .monaco-editor .find-widget .monaco-sash { - background: grey; + width: 2px !important; margin-left: -4px; } diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index 297d4fe61555b..74454a278ec52 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -16,7 +16,7 @@ import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview import { FindInput, IFindInputStyles } from 'vs/base/browser/ui/findinput/findInput'; import { IMessage as InputBoxMessage, InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; import { Widget } from 'vs/base/browser/ui/widget'; -import { Sash, IHorizontalSashLayoutProvider, ISashEvent } from 'vs/base/browser/ui/sash/sash'; +import { Sash, IHorizontalSashLayoutProvider, ISashEvent, Orientation } from 'vs/base/browser/ui/sash/sash'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, IViewZone, OverlayWidgetPositionPreference } from 'vs/editor/browser/editorBrowser'; import { FIND_IDS, MATCHES_LIMIT } from 'vs/editor/contrib/find/common/findModel'; @@ -29,6 +29,7 @@ import { Color } from 'vs/base/common/color'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; import { editorFindRangeHighlight, editorFindMatch, editorFindMatchHighlight, activeContrastBorder, contrastBorder, inputBackground, editorWidgetBackground, inputActiveOptionBorder, widgetShadow, inputForeground, inputBorder, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationErrorBackground, inputValidationErrorBorder, errorForeground } from 'vs/platform/theme/common/colorRegistry'; + export interface IFindController { replace(): void; replaceAll(): void; @@ -49,10 +50,19 @@ const NLS_MATCHES_COUNT_LIMIT_TITLE = nls.localize('title.matchesCountLimit', "O const NLS_MATCHES_LOCATION = nls.localize('label.matchesLocation', "{0} of {1}"); const NLS_NO_RESULTS = nls.localize('label.noResults', "No Results"); +const FIND_WIDGET_INITIAL_WIDTH = 411; +const PART_WIDTH = 275; +const FIND_INPUT_AREA_WIDTH = PART_WIDTH - 54; +const REPLACE_INPUT_AREA_WIDTH = FIND_INPUT_AREA_WIDTH; + let MAX_MATCHES_COUNT_WIDTH = 69; +let FIND_ALL_CONTROLS_WIDTH = 17/** Find Input margin-left */ + (MAX_MATCHES_COUNT_WIDTH + 3 + 1) /** Match Results */ + 23 /** Button */ * 4 + 2/** sash */; + +const FIND_INPUT_AREA_HEIGHT = 34; // The height of Find Widget when Replace Input is not visible. +const FIND_REPLACE_AREA_HEIGHT = 64; // The height of Find Widget when Replace Input is visible. -export class FindWidgetViewZone implements IViewZone { +export class FindWidgetViewZone implements IViewZone { public afterLineNumber: number; public heightInPx: number; public suppressMouseDown: boolean; @@ -61,24 +71,15 @@ export class FindWidgetViewZone implements IViewZone { constructor(afterLineNumber: number) { this.afterLineNumber = afterLineNumber; - this.heightInPx = 34; + this.heightInPx = FIND_INPUT_AREA_HEIGHT; this.suppressMouseDown = false; this.domNode = document.createElement('div'); this.domNode.className = 'dock-find-viewzone'; } } - export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSashLayoutProvider { - - - private static ID = 'editor.contrib.findWidget'; - private static PART_WIDTH = 275; - private static FIND_INPUT_AREA_WIDTH = FindWidget.PART_WIDTH - 54; - private static REPLACE_INPUT_AREA_WIDTH = FindWidget.FIND_INPUT_AREA_WIDTH; - private static FIND_INPUT_AREA_HEIGHT = 34; // The height of Find Widget when Replace Input is not visible. - private static FIND_REPLACE_AREA_HEIGHT = 64; // The height of Find Widget when Replace Input is visible. - + private static ID = 'editor.contrib.findWidget';; private _codeEditor: ICodeEditor; private _state: FindReplaceState; private _controller: IFindController; @@ -128,44 +129,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._isReplaceVisible = false; this._register(this._state.addChangeListener((e) => this._onStateChanged(e))); - this._buildDomNode(); - this._resizeSash = new Sash(this._domNode, this, { orientation: 0 }); - let data: { startX: number; }; - let originalWidth = 411; - this._register(this._resizeSash.addListener('start', (e: ISashEvent) => { - data = { - startX: e.startX, - }; - originalWidth = dom.getTotalWidth(this._domNode); - })); - - this._register(this._resizeSash.addListener('end', () => { - data = undefined; - })); - - this._register(this._resizeSash.addListener('change', (evt: ISashEvent) => { - if (data) { - let reducedFindWidget = false; - let narrowFindWidget = false; - let collapsedFindWidget = false; - let width = originalWidth + data.startX - evt.currentX; - if (width < 411) { - reducedFindWidget = true; - } - if (width < 411 - 69) { - narrowFindWidget = true; - } - if (width < 265) { - collapsedFindWidget = true; - } - dom.toggleClass(this._domNode, 'collapsed-find-widget', collapsedFindWidget); - dom.toggleClass(this._domNode, 'narrow-find-widget', narrowFindWidget); - dom.toggleClass(this._domNode, 'reduced-find-widget', reducedFindWidget); - this._domNode.style.width = `${width}px`; - // this._findInput.setWidth(FindWidget.FIND_INPUT_AREA_WIDTH + Math.max(0, data.startX - evt.currentX)); - } - })); this._updateButtons(); let checkEditorWidth = () => { @@ -174,27 +138,38 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas let collapsedFindWidget = false; let reducedFindWidget = false; let narrowFindWidget = false; - let widgetWidth = Math.max(411, dom.getTotalWidth(this._domNode)) - 69; - if (widgetWidth + 28 >= editorWidth + 50) { - collapsedFindWidget = true; + let widgetWidth = dom.getTotalWidth(this._domNode); + + if (widgetWidth > FIND_WIDGET_INITIAL_WIDTH) { + // as the widget is resized by users, we may need to change the max width of the widget as the editor width changes. + this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; + this._replaceInputBox.inputElement.style.width = `${dom.getTotalWidth(this._findInput.inputBox.inputElement)}px`; + return; + } + + if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth >= editorWidth) { + reducedFindWidget = true; } - if (widgetWidth + 28 >= editorWidth) { + if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth) { narrowFindWidget = true; } - if (widgetWidth + MAX_MATCHES_COUNT_WIDTH + 28 + minimapWidth >= editorWidth) { - reducedFindWidget = true; + if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth + 50) { + collapsedFindWidget = true; } dom.toggleClass(this._domNode, 'collapsed-find-widget', collapsedFindWidget); dom.toggleClass(this._domNode, 'narrow-find-widget', narrowFindWidget); dom.toggleClass(this._domNode, 'reduced-find-widget', reducedFindWidget); - if (collapsedFindWidget) { - this._domNode.style.maxWidth = '111px'; - } else if (narrowFindWidget) { - this._domNode.style.maxWidth = '257px'; - } else { + + if (!narrowFindWidget && !collapsedFindWidget) { + // the minimal left offset of findwidget is 15px. this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; } + let findInputWidth = dom.getTotalWidth(this._findInput.inputBox.inputElement); + if (findInputWidth > 0) { + this._replaceInputBox.inputElement.style.width = `${findInputWidth}px`; + } + }; checkEditorWidth(); @@ -467,9 +442,9 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._codeEditor.changeViewZones((accessor) => { if (this._state.isReplaceRevealed) { - this._viewZone.heightInPx = FindWidget.FIND_REPLACE_AREA_HEIGHT; + this._viewZone.heightInPx = FIND_REPLACE_AREA_HEIGHT; } else { - this._viewZone.heightInPx = FindWidget.FIND_INPUT_AREA_HEIGHT; + this._viewZone.heightInPx = FIND_INPUT_AREA_HEIGHT; } this._viewZoneId = accessor.addZone(this._viewZone); @@ -483,19 +458,19 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas } this._codeEditor.changeViewZones((accessor) => { - let scrollAdjustment = FindWidget.FIND_INPUT_AREA_HEIGHT; + let scrollAdjustment = FIND_INPUT_AREA_HEIGHT; if (this._viewZoneId !== undefined) { if (this._state.isReplaceRevealed) { - this._viewZone.heightInPx = FindWidget.FIND_REPLACE_AREA_HEIGHT; - scrollAdjustment = FindWidget.FIND_REPLACE_AREA_HEIGHT - FindWidget.FIND_INPUT_AREA_HEIGHT; + this._viewZone.heightInPx = FIND_REPLACE_AREA_HEIGHT; + scrollAdjustment = FIND_REPLACE_AREA_HEIGHT - FIND_INPUT_AREA_HEIGHT; } else { - this._viewZone.heightInPx = FindWidget.FIND_INPUT_AREA_HEIGHT; - scrollAdjustment = FindWidget.FIND_INPUT_AREA_HEIGHT - FindWidget.FIND_REPLACE_AREA_HEIGHT; + this._viewZone.heightInPx = FIND_INPUT_AREA_HEIGHT; + scrollAdjustment = FIND_INPUT_AREA_HEIGHT - FIND_REPLACE_AREA_HEIGHT; } accessor.removeZone(this._viewZoneId); } else { - this._viewZone.heightInPx = FindWidget.FIND_INPUT_AREA_HEIGHT; + this._viewZone.heightInPx = FIND_INPUT_AREA_HEIGHT; } this._viewZoneId = accessor.addZone(this._viewZone); this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + scrollAdjustment); @@ -625,7 +600,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas private _buildFindPart(): HTMLElement { // Find input this._findInput = this._register(new FindInput(null, this._contextViewProvider, { - width: FindWidget.FIND_INPUT_AREA_WIDTH, + width: FIND_INPUT_AREA_WIDTH, label: NLS_FIND_INPUT_LABEL, placeholder: NLS_FIND_INPUT_PLACEHOLDER, appendCaseSensitiveLabel: this._keybindingLabelFor(FIND_IDS.ToggleCaseSensitiveCommand), @@ -751,7 +726,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas // Replace input let replaceInput = document.createElement('div'); replaceInput.className = 'replace-input'; - replaceInput.style.width = FindWidget.REPLACE_INPUT_AREA_WIDTH + 'px'; + replaceInput.style.width = REPLACE_INPUT_AREA_WIDTH + 'px'; this._replaceInputBox = this._register(new InputBox(replaceInput, null, { ariaLabel: NLS_REPLACE_INPUT_LABEL, placeholder: NLS_REPLACE_INPUT_PLACEHOLDER @@ -809,6 +784,9 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas className: 'toggle left', onTrigger: () => { this._state.change({ isReplaceRevealed: !this._isReplaceVisible }, false); + if (this._isReplaceVisible) { + this._replaceInputBox.width = this._findInput.inputBox.width; + } this._showViewZone(); }, onKeyDown: (e) => { } @@ -825,6 +803,36 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._domNode.appendChild(this._toggleReplaceBtn.domNode); this._domNode.appendChild(findPart); this._domNode.appendChild(replacePart); + + this._buildSash(); + } + + private _buildSash() { + this._resizeSash = new Sash(this._domNode, this, { orientation: Orientation.VERTICAL }); + let originalWidth = FIND_WIDGET_INITIAL_WIDTH; + + this._register(this._resizeSash.addListener('start', (e: ISashEvent) => { + originalWidth = dom.getTotalWidth(this._domNode); + })); + + this._register(this._resizeSash.addListener('change', (evt: ISashEvent) => { + let width = originalWidth + evt.startX - evt.currentX; + + if (width < FIND_WIDGET_INITIAL_WIDTH) { + // narrow down the find widget should be handled by CSS. + return; + } + + let inputBoxWidth = width - FIND_ALL_CONTROLS_WIDTH; + let maxWidth = parseFloat(dom.getComputedStyle(this._domNode).maxWidth) || 0; + if (width > maxWidth) { + return; + } + this._domNode.style.width = `${width}px`; + if (this._isReplaceVisible) { + this._replaceInputBox.width = inputBoxWidth; + } + })); } } @@ -1009,5 +1017,10 @@ registerThemingParticipant((theme, collector) => { if (error) { collector.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${error}; }`); } + + let border = theme.getColor('panel.border'); + if (border) { + collector.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${border}; width: 2px !important; margin-left: -4px;}`); + } }); From 8e1714c81be3ffbed6491a707649df25487116e5 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 24 May 2017 23:49:51 +0200 Subject: [PATCH 1019/2747] Allow extensions to use theme colors in status bar --- src/vs/platform/statusbar/common/statusbar.ts | 3 ++- src/vs/vscode.d.ts | 2 +- .../electron-browser/mainThreadStatusBar.ts | 3 ++- src/vs/workbench/api/node/extHost.protocol.ts | 2 +- src/vs/workbench/api/node/extHostStatusBar.ts | 8 ++++---- .../browser/parts/statusbar/statusbarPart.ts | 18 +++++++++++++++--- 6 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/vs/platform/statusbar/common/statusbar.ts b/src/vs/platform/statusbar/common/statusbar.ts index 6e45f806115df..d42f792b801a3 100644 --- a/src/vs/platform/statusbar/common/statusbar.ts +++ b/src/vs/platform/statusbar/common/statusbar.ts @@ -7,6 +7,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IDisposable } from 'vs/base/common/lifecycle'; +import { ThemeColor } from 'vs/editor/common/editorCommon'; export var IStatusbarService = createDecorator('statusbarService'); @@ -34,7 +35,7 @@ export interface IStatusbarEntry { /** * An optional color to use for the entry */ - color?: string; + color?: string | ThemeColor; /** * An optional id of a command that is known to the workbench to execute on click diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 4850740fec14c..35a6a58cc03ba 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -3301,7 +3301,7 @@ declare module 'vscode' { /** * The foreground color for this entry. */ - color: string | undefined; + color: string | ThemeColor | undefined; /** * The identifier of a command to run on click. The command must be diff --git a/src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts b/src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts index d64d9d3ac2b7e..d16e17cda0906 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts @@ -7,6 +7,7 @@ import { IStatusbarService, StatusbarAlignment as MainThreadStatusBarAlignment } from 'vs/platform/statusbar/common/statusbar'; import { IDisposable } from 'vs/base/common/lifecycle'; import { MainThreadStatusBarShape } from '../node/extHost.protocol'; +import { ThemeColor } from 'vs/editor/common/editorCommon'; export class MainThreadStatusBar extends MainThreadStatusBarShape { private mapIdToDisposable: { [id: number]: IDisposable }; @@ -18,7 +19,7 @@ export class MainThreadStatusBar extends MainThreadStatusBarShape { this.mapIdToDisposable = Object.create(null); } - $setEntry(id: number, extensionId: string, text: string, tooltip: string, command: string, color: string, alignment: MainThreadStatusBarAlignment, priority: number): void { + $setEntry(id: number, extensionId: string, text: string, tooltip: string, command: string, color: string | ThemeColor, alignment: MainThreadStatusBarAlignment, priority: number): void { // Dispose any old this.$dispose(id); diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 1dbe9058048f2..f9c02d01d8c10 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -277,7 +277,7 @@ export abstract class MainThreadQuickOpenShape { } export abstract class MainThreadStatusBarShape { - $setEntry(id: number, extensionId: string, text: string, tooltip: string, command: string, color: string, alignment: MainThreadStatusBarAlignment, priority: number): void { throw ni(); } + $setEntry(id: number, extensionId: string, text: string, tooltip: string, command: string, color: string | editorCommon.ThemeColor, alignment: MainThreadStatusBarAlignment, priority: number): void { throw ni(); } $dispose(id: number) { throw ni(); } } diff --git a/src/vs/workbench/api/node/extHostStatusBar.ts b/src/vs/workbench/api/node/extHostStatusBar.ts index 97c917caf5134..6e91e7dbf9a3b 100644 --- a/src/vs/workbench/api/node/extHostStatusBar.ts +++ b/src/vs/workbench/api/node/extHostStatusBar.ts @@ -6,7 +6,7 @@ import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { StatusbarAlignment as MainThreadStatusBarAlignment } from 'vs/platform/statusbar/common/statusbar'; -import { StatusBarAlignment as ExtHostStatusBarAlignment, Disposable } from './extHostTypes'; +import { StatusBarAlignment as ExtHostStatusBarAlignment, Disposable, ThemeColor } from './extHostTypes'; import { StatusBarItem, StatusBarAlignment } from 'vscode'; import { MainContext, MainThreadStatusBarShape } from './extHost.protocol'; @@ -21,7 +21,7 @@ export class ExtHostStatusBarEntry implements StatusBarItem { private _text: string; private _tooltip: string; - private _color: string; + private _color: string | ThemeColor; private _command: string; private _timeoutHandle: number; @@ -57,7 +57,7 @@ export class ExtHostStatusBarEntry implements StatusBarItem { return this._tooltip; } - public get color(): string { + public get color(): string | ThemeColor { return this._color; } @@ -75,7 +75,7 @@ export class ExtHostStatusBarEntry implements StatusBarItem { this.update(); } - public set color(color: string) { + public set color(color: string | ThemeColor) { this._color = color; this.update(); } diff --git a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts index 123f0f5d26e02..fd2fd574fb4b4 100644 --- a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts +++ b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts @@ -30,6 +30,8 @@ import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } import { STATUS_BAR_BACKGROUND, STATUS_BAR_FOREGROUND, STATUS_BAR_NO_FOLDER_BACKGROUND, STATUS_BAR_ITEM_HOVER_BACKGROUND, STATUS_BAR_ITEM_ACTIVE_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND, STATUS_BAR_BORDER, STATUS_BAR_NO_FOLDER_FOREGROUND } from 'vs/workbench/common/theme'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { contrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { isThemeColor } from "vs/editor/common/editorCommon"; +import { Color } from 'vs/base/common/color'; export class StatusbarPart extends Part implements IStatusbarService { @@ -217,7 +219,8 @@ class StatusBarEntryItem implements IStatusbarItem { @IMessageService private messageService: IMessageService, @ITelemetryService private telemetryService: ITelemetryService, @IContextMenuService private contextMenuService: IContextMenuService, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService + @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @IThemeService private themeService: IThemeService ) { this.entry = entry; @@ -249,8 +252,17 @@ class StatusBarEntryItem implements IStatusbarItem { } // Color - if (this.entry.color) { - $(textContainer).color(this.entry.color); + let color = this.entry.color; + if (color) { + if (isThemeColor(color)) { + let colorId = color.id; + color = (this.themeService.getTheme().getColor(colorId) || Color.transparent).toString(); + toDispose.push(this.themeService.onThemeChange(theme => { + let colorValue = (this.themeService.getTheme().getColor(colorId) || Color.transparent).toString(); + $(textContainer).color(colorValue); + })); + } + $(textContainer).color(color); } // Context Menu From 16dc0593147cc9ef17d8e75919a5116d21fd7835 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 24 May 2017 23:50:40 +0200 Subject: [PATCH 1020/2747] Fix deprecation warning on StyleSheet.insertRule --- src/vs/editor/browser/services/codeEditorServiceImpl.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index 703e6e4f0eec0..26bc62e9e6a2d 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -316,15 +316,15 @@ class DecorationCSSRules { let hasContent = false; if (unthemedCSS.length > 0) { - sheet.insertRule(`${this._unThemedSelector} {${unthemedCSS}}`); + sheet.insertRule(`${this._unThemedSelector} {${unthemedCSS}}`, 0); hasContent = true; } if (lightCSS.length > 0) { - sheet.insertRule(`.vs${this._unThemedSelector} {${lightCSS}}`); + sheet.insertRule(`.vs${this._unThemedSelector} {${lightCSS}}`, 0); hasContent = true; } if (darkCSS.length > 0) { - sheet.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${darkCSS}}`); + sheet.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${darkCSS}}`, 0); hasContent = true; } this._hasContent = hasContent; From 50cc0f90677e2bcabe3346d9c67e8c12b5f56dec Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 24 May 2017 15:03:40 -0700 Subject: [PATCH 1021/2747] use alwaysStrict in TS extension --- extensions/typescript/src/features/baseCodeLensProvider.ts | 2 -- extensions/typescript/src/features/bufferSyncSupport.ts | 1 - extensions/typescript/src/features/codeActionProvider.ts | 2 -- extensions/typescript/src/features/completionItemProvider.ts | 2 -- extensions/typescript/src/features/definitionProvider.ts | 2 -- extensions/typescript/src/features/definitionProviderBase.ts | 2 -- .../src/features/directiveCommentCompletionProvider.ts | 2 -- .../typescript/src/features/documentHighlightProvider.ts | 2 -- extensions/typescript/src/features/documentSymbolProvider.ts | 2 -- extensions/typescript/src/features/formattingProvider.ts | 2 -- extensions/typescript/src/features/hoverProvider.ts | 2 -- extensions/typescript/src/features/implementationProvider.ts | 2 -- .../src/features/implementationsCodeLensProvider.ts | 2 -- extensions/typescript/src/features/jsDocCompletionProvider.ts | 2 -- extensions/typescript/src/features/previewer.ts | 2 -- extensions/typescript/src/features/referenceProvider.ts | 2 -- .../typescript/src/features/referencesCodeLensProvider.ts | 2 -- extensions/typescript/src/features/renameProvider.ts | 2 -- extensions/typescript/src/features/signatureHelpProvider.ts | 2 -- extensions/typescript/src/features/typeDefinitionProvider.ts | 2 -- extensions/typescript/src/features/workspaceSymbolProvider.ts | 2 -- extensions/typescript/src/protocol.const.ts | 2 -- extensions/typescript/src/typescriptMain.ts | 1 - extensions/typescript/src/typescriptService.ts | 1 - extensions/typescript/src/typescriptServiceClient.ts | 2 -- extensions/typescript/src/utils/async.ts | 2 -- extensions/typescript/src/utils/buildStatus.ts | 2 -- extensions/typescript/src/utils/electron.ts | 2 -- extensions/typescript/src/utils/is.ts | 2 -- extensions/typescript/src/utils/logger.ts | 2 -- extensions/typescript/src/utils/plugins.ts | 1 - extensions/typescript/src/utils/projectStatus.ts | 2 -- extensions/typescript/src/utils/telemetry.ts | 2 -- extensions/typescript/src/utils/tracer.ts | 2 -- extensions/typescript/src/utils/typingsStatus.ts | 2 -- extensions/typescript/src/utils/versionStatus.ts | 2 -- extensions/typescript/src/utils/wireProtocol.ts | 2 -- extensions/typescript/tsconfig.json | 4 +++- 38 files changed, 3 insertions(+), 71 deletions(-) diff --git a/extensions/typescript/src/features/baseCodeLensProvider.ts b/extensions/typescript/src/features/baseCodeLensProvider.ts index 98e4de9cc1c2d..20952150c4b57 100644 --- a/extensions/typescript/src/features/baseCodeLensProvider.ts +++ b/extensions/typescript/src/features/baseCodeLensProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { CodeLensProvider, CodeLens, CancellationToken, TextDocument, Range, Uri, Position, Event, EventEmitter, ProviderResult, } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/bufferSyncSupport.ts b/extensions/typescript/src/features/bufferSyncSupport.ts index dfb32d759da02..f2b11faebefea 100644 --- a/extensions/typescript/src/features/bufferSyncSupport.ts +++ b/extensions/typescript/src/features/bufferSyncSupport.ts @@ -2,7 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; import * as cp from 'child_process'; import * as fs from 'fs'; diff --git a/extensions/typescript/src/features/codeActionProvider.ts b/extensions/typescript/src/features/codeActionProvider.ts index 0a9d297987c7a..8f0dd56f01d93 100644 --- a/extensions/typescript/src/features/codeActionProvider.ts +++ b/extensions/typescript/src/features/codeActionProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { CodeActionProvider, TextDocument, Range, CancellationToken, CodeActionContext, Command, commands, Uri, workspace, WorkspaceEdit, TextEdit, FormattingOptions, window, ProviderResult } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/completionItemProvider.ts b/extensions/typescript/src/features/completionItemProvider.ts index 618c84174bc7f..5f0740be10ccf 100644 --- a/extensions/typescript/src/features/completionItemProvider.ts +++ b/extensions/typescript/src/features/completionItemProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { CompletionItem, TextDocument, Position, CompletionItemKind, CompletionItemProvider, CancellationToken, TextEdit, Range, SnippetString, workspace, ProviderResult } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; diff --git a/extensions/typescript/src/features/definitionProvider.ts b/extensions/typescript/src/features/definitionProvider.ts index ee364a636140a..2713fc603db33 100644 --- a/extensions/typescript/src/features/definitionProvider.ts +++ b/extensions/typescript/src/features/definitionProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { DefinitionProvider, TextDocument, Position, CancellationToken, Definition } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; diff --git a/extensions/typescript/src/features/definitionProviderBase.ts b/extensions/typescript/src/features/definitionProviderBase.ts index 3cf6690101571..b405d28fbaf1f 100644 --- a/extensions/typescript/src/features/definitionProviderBase.ts +++ b/extensions/typescript/src/features/definitionProviderBase.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { TextDocument, Position, Range, CancellationToken, Location } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/directiveCommentCompletionProvider.ts b/extensions/typescript/src/features/directiveCommentCompletionProvider.ts index a334e8c2f7b78..6dd8aa8418d84 100644 --- a/extensions/typescript/src/features/directiveCommentCompletionProvider.ts +++ b/extensions/typescript/src/features/directiveCommentCompletionProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { Position, CompletionItemProvider, CompletionItemKind, TextDocument, CancellationToken, CompletionItem, ProviderResult, Range } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; diff --git a/extensions/typescript/src/features/documentHighlightProvider.ts b/extensions/typescript/src/features/documentHighlightProvider.ts index afffc9fa60ca9..f0140953d923c 100644 --- a/extensions/typescript/src/features/documentHighlightProvider.ts +++ b/extensions/typescript/src/features/documentHighlightProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { DocumentHighlightProvider, DocumentHighlight, DocumentHighlightKind, TextDocument, Position, Range, CancellationToken } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/documentSymbolProvider.ts b/extensions/typescript/src/features/documentSymbolProvider.ts index 5d4a8595a37a4..aa6a4e5ab7f64 100644 --- a/extensions/typescript/src/features/documentSymbolProvider.ts +++ b/extensions/typescript/src/features/documentSymbolProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { DocumentSymbolProvider, SymbolInformation, SymbolKind, TextDocument, Range, Location, CancellationToken, Uri } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/formattingProvider.ts b/extensions/typescript/src/features/formattingProvider.ts index 77f6971201e48..40b5522d0fa19 100644 --- a/extensions/typescript/src/features/formattingProvider.ts +++ b/extensions/typescript/src/features/formattingProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { workspace as Workspace, DocumentRangeFormattingEditProvider, OnTypeFormattingEditProvider, FormattingOptions, TextDocument, Position, Range, CancellationToken, TextEdit, WorkspaceConfiguration } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/hoverProvider.ts b/extensions/typescript/src/features/hoverProvider.ts index 75d36131bafde..e726ff1dc3478 100644 --- a/extensions/typescript/src/features/hoverProvider.ts +++ b/extensions/typescript/src/features/hoverProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { HoverProvider, Hover, TextDocument, Position, Range, CancellationToken } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/implementationProvider.ts b/extensions/typescript/src/features/implementationProvider.ts index 452afad10331c..ab4d5b8c45bed 100644 --- a/extensions/typescript/src/features/implementationProvider.ts +++ b/extensions/typescript/src/features/implementationProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { ImplementationProvider, TextDocument, Position, CancellationToken, Definition } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; diff --git a/extensions/typescript/src/features/implementationsCodeLensProvider.ts b/extensions/typescript/src/features/implementationsCodeLensProvider.ts index 793176bb4f625..30daa644a4edc 100644 --- a/extensions/typescript/src/features/implementationsCodeLensProvider.ts +++ b/extensions/typescript/src/features/implementationsCodeLensProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { CodeLens, CancellationToken, TextDocument, Range, Location, ProviderResult, workspace } from 'vscode'; import * as Proto from '../protocol'; import * as PConst from '../protocol.const'; diff --git a/extensions/typescript/src/features/jsDocCompletionProvider.ts b/extensions/typescript/src/features/jsDocCompletionProvider.ts index fc8e88d5df254..da02e942bfc3c 100644 --- a/extensions/typescript/src/features/jsDocCompletionProvider.ts +++ b/extensions/typescript/src/features/jsDocCompletionProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { Position, Range, CompletionItemProvider, CompletionItemKind, TextDocument, CancellationToken, CompletionItem, window, Uri, ProviderResult, TextEditor, SnippetString, workspace } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; diff --git a/extensions/typescript/src/features/previewer.ts b/extensions/typescript/src/features/previewer.ts index d02ab69550bb4..c418e92d59ab7 100644 --- a/extensions/typescript/src/features/previewer.ts +++ b/extensions/typescript/src/features/previewer.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import * as Proto from '../protocol'; export function plain(parts: Proto.SymbolDisplayPart[]): string { diff --git a/extensions/typescript/src/features/referenceProvider.ts b/extensions/typescript/src/features/referenceProvider.ts index 56aac3a0cd8e3..47921d128ea8c 100644 --- a/extensions/typescript/src/features/referenceProvider.ts +++ b/extensions/typescript/src/features/referenceProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { ReferenceProvider, Location, TextDocument, Position, Range, CancellationToken } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/referencesCodeLensProvider.ts b/extensions/typescript/src/features/referencesCodeLensProvider.ts index 46ecf347e7292..5576bfc48250b 100644 --- a/extensions/typescript/src/features/referencesCodeLensProvider.ts +++ b/extensions/typescript/src/features/referencesCodeLensProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { CodeLens, CancellationToken, TextDocument, Range, Location, ProviderResult, workspace } from 'vscode'; import * as Proto from '../protocol'; import * as PConst from '../protocol.const'; diff --git a/extensions/typescript/src/features/renameProvider.ts b/extensions/typescript/src/features/renameProvider.ts index da279ab5596af..39c85f307a736 100644 --- a/extensions/typescript/src/features/renameProvider.ts +++ b/extensions/typescript/src/features/renameProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { RenameProvider, WorkspaceEdit, TextDocument, Position, Range, CancellationToken } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/signatureHelpProvider.ts b/extensions/typescript/src/features/signatureHelpProvider.ts index b8247e03154ad..0a79487862415 100644 --- a/extensions/typescript/src/features/signatureHelpProvider.ts +++ b/extensions/typescript/src/features/signatureHelpProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { SignatureHelpProvider, SignatureHelp, SignatureInformation, ParameterInformation, TextDocument, Position, CancellationToken } from 'vscode'; import * as Previewer from './previewer'; diff --git a/extensions/typescript/src/features/typeDefinitionProvider.ts b/extensions/typescript/src/features/typeDefinitionProvider.ts index edaccf0bf3330..d107f67580a06 100644 --- a/extensions/typescript/src/features/typeDefinitionProvider.ts +++ b/extensions/typescript/src/features/typeDefinitionProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { TypeDefinitionProvider, TextDocument, Position, CancellationToken, Definition } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; diff --git a/extensions/typescript/src/features/workspaceSymbolProvider.ts b/extensions/typescript/src/features/workspaceSymbolProvider.ts index 8593c4a895520..016ac8726b342 100644 --- a/extensions/typescript/src/features/workspaceSymbolProvider.ts +++ b/extensions/typescript/src/features/workspaceSymbolProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { workspace, window, Uri, WorkspaceSymbolProvider, SymbolInformation, SymbolKind, Range, Location, CancellationToken } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/protocol.const.ts b/extensions/typescript/src/protocol.const.ts index 6990868683d89..822e05d2b2117 100644 --- a/extensions/typescript/src/protocol.const.ts +++ b/extensions/typescript/src/protocol.const.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - export class Kind { public static readonly alias = 'alias'; public static readonly callSignature = 'call'; diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 037ae6f8464e2..45ba3a85290df 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -7,7 +7,6 @@ * Includes code from typescript-sublime-plugin project, obtained from * https://github.com/Microsoft/TypeScript-Sublime-Plugin/blob/master/TypeScript%20Indent.tmPreferences * ------------------------------------------------------------------------------------------ */ -'use strict'; import { env, languages, commands, workspace, window, ExtensionContext, Memento, IndentAction, Diagnostic, DiagnosticCollection, Range, Disposable, Uri, MessageItem, TextEditor, DiagnosticSeverity, TextDocument, SnippetString } from 'vscode'; diff --git a/extensions/typescript/src/typescriptService.ts b/extensions/typescript/src/typescriptService.ts index bfc410c6cbab2..8b15cc79f7bc0 100644 --- a/extensions/typescript/src/typescriptService.ts +++ b/extensions/typescript/src/typescriptService.ts @@ -3,7 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; import { CancellationToken, Uri, Event } from 'vscode'; import * as Proto from './protocol'; diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index f5a92dbd4cd38..cf2b7c3be6fd8 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import * as cp from 'child_process'; import * as path from 'path'; import * as fs from 'fs'; diff --git a/extensions/typescript/src/utils/async.ts b/extensions/typescript/src/utils/async.ts index fb260bde50b4f..f87754e69e89a 100644 --- a/extensions/typescript/src/utils/async.ts +++ b/extensions/typescript/src/utils/async.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - export interface ITask { (): T; } diff --git a/extensions/typescript/src/utils/buildStatus.ts b/extensions/typescript/src/utils/buildStatus.ts index cf640508af34c..ced56fd43b900 100644 --- a/extensions/typescript/src/utils/buildStatus.ts +++ b/extensions/typescript/src/utils/buildStatus.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import vscode = require('vscode'); const statusItem: vscode.StatusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, Number.MIN_VALUE); diff --git a/extensions/typescript/src/utils/electron.ts b/extensions/typescript/src/utils/electron.ts index 51c4451989159..4418ca51dbd36 100644 --- a/extensions/typescript/src/utils/electron.ts +++ b/extensions/typescript/src/utils/electron.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import path = require('path'); import os = require('os'); import net = require('net'); diff --git a/extensions/typescript/src/utils/is.ts b/extensions/typescript/src/utils/is.ts index 78ef8c734cdcc..fc6fd6ad2861b 100644 --- a/extensions/typescript/src/utils/is.ts +++ b/extensions/typescript/src/utils/is.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - const toString = Object.prototype.toString; export function defined(value: any): boolean { diff --git a/extensions/typescript/src/utils/logger.ts b/extensions/typescript/src/utils/logger.ts index 577314c351d05..7f82fb28c96dc 100644 --- a/extensions/typescript/src/utils/logger.ts +++ b/extensions/typescript/src/utils/logger.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { OutputChannel, window } from "vscode"; import * as is from './is'; diff --git a/extensions/typescript/src/utils/plugins.ts b/extensions/typescript/src/utils/plugins.ts index 24fb56e99b72f..49f0d93b4b6c0 100644 --- a/extensions/typescript/src/utils/plugins.ts +++ b/extensions/typescript/src/utils/plugins.ts @@ -2,7 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; import { extensions } from "vscode"; diff --git a/extensions/typescript/src/utils/projectStatus.ts b/extensions/typescript/src/utils/projectStatus.ts index f6042d2944913..8c9911531eb64 100644 --- a/extensions/typescript/src/utils/projectStatus.ts +++ b/extensions/typescript/src/utils/projectStatus.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import * as vscode from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; import { loadMessageBundle } from 'vscode-nls'; diff --git a/extensions/typescript/src/utils/telemetry.ts b/extensions/typescript/src/utils/telemetry.ts index 17c43339a9ebf..5162a0c24d5e2 100644 --- a/extensions/typescript/src/utils/telemetry.ts +++ b/extensions/typescript/src/utils/telemetry.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import * as path from 'path'; import VsCodeTelemetryReporter from 'vscode-extension-telemetry'; import { Disposable } from "vscode"; diff --git a/extensions/typescript/src/utils/tracer.ts b/extensions/typescript/src/utils/tracer.ts index 078d2e6f45a53..fe16a13d61a86 100644 --- a/extensions/typescript/src/utils/tracer.ts +++ b/extensions/typescript/src/utils/tracer.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { workspace } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/utils/typingsStatus.ts b/extensions/typescript/src/utils/typingsStatus.ts index 4798046abf622..44f90ec15c1a9 100644 --- a/extensions/typescript/src/utils/typingsStatus.ts +++ b/extensions/typescript/src/utils/typingsStatus.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { MessageItem, workspace, Disposable, ProgressLocation, window, commands, Uri } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; import { loadMessageBundle } from 'vscode-nls'; diff --git a/extensions/typescript/src/utils/versionStatus.ts b/extensions/typescript/src/utils/versionStatus.ts index 358d3a9b10301..e92b87d0f248b 100644 --- a/extensions/typescript/src/utils/versionStatus.ts +++ b/extensions/typescript/src/utils/versionStatus.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import vscode = require('vscode'); const versionBarEntry = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, Number.MIN_VALUE); diff --git a/extensions/typescript/src/utils/wireProtocol.ts b/extensions/typescript/src/utils/wireProtocol.ts index 218d461f853bf..ad5d464304d35 100644 --- a/extensions/typescript/src/utils/wireProtocol.ts +++ b/extensions/typescript/src/utils/wireProtocol.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import stream = require('stream'); const DefaultSize: number = 8192; diff --git a/extensions/typescript/tsconfig.json b/extensions/typescript/tsconfig.json index 3112725c10315..da4f1bb399b46 100644 --- a/extensions/typescript/tsconfig.json +++ b/extensions/typescript/tsconfig.json @@ -11,7 +11,9 @@ "noImplicitAny": true, "noImplicitReturns": true, "noUnusedLocals": true, - "noUnusedParameters": true + "noUnusedParameters": true, + "strict": true, + "alwaysStrict": true }, "include": [ "src/**/*" From d167cf370f36299a4af5d50b2ae33c5227242389 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 24 May 2017 15:07:43 -0700 Subject: [PATCH 1022/2747] Add restart TSServer command. Fixes #22335 --- extensions/typescript/package.json | 5 +++++ extensions/typescript/package.nls.json | 1 + extensions/typescript/src/typescriptMain.ts | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index cb4fa518bf083..a24c0c1051906 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -345,6 +345,11 @@ "command": "typescript.openTsServerLog", "title": "%typescript.openTsServerLog.title%", "category": "TypeScript" + }, + { + "command": "typescript.restartTsServer", + "title": "%typescript.restartTsServer%", + "category": "TypeScript" } ], "menus": { diff --git a/extensions/typescript/package.nls.json b/extensions/typescript/package.nls.json index faa59a26d7f3a..821257b38a130 100644 --- a/extensions/typescript/package.nls.json +++ b/extensions/typescript/package.nls.json @@ -32,6 +32,7 @@ "typescript.referencesCodeLens.enabled": "Enable/disable references CodeLens in TypeScript files. Requires TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Enable/disable implementations CodeLens. Requires TypeScript >= 2.2.0.", "typescript.openTsServerLog.title": "Open TS Server log", + "typescript.restartTsServer": "Restart TS server", "typescript.selectTypeScriptVersion.title": "Select TypeScript Version", "jsDocCompletion.enabled": "Enable/disable auto JSDoc comments", "javascript.implicitProjectConfig.checkJs": "Enable/disable semantic checking of JavaScript files. Existing jsconfig.json or tsconfig.json files override this setting. Requires TypeScript >=2.3.1.", diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 45ba3a85290df..9949d0db9d2fb 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -109,6 +109,10 @@ export function activate(context: ExtensionContext): void { client.openTsServerLogFile(); })); + context.subscriptions.push(commands.registerCommand('typescript.restartTsServer', () => { + client.restartTsServer(); + })); + const goToProjectConfig = (isTypeScript: boolean) => { const editor = window.activeTextEditor; if (editor) { From c77ae5912b43aa69be1cbbc6f5dc53e43bc043dd Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 24 May 2017 15:11:57 -0700 Subject: [PATCH 1023/2747] Fix #27144. We just need to listen to scrollTop change for FindWidget --- src/vs/editor/contrib/find/browser/findWidget.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index 74454a278ec52..78e442c699205 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -235,7 +235,9 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas })); this._register(this._codeEditor.onDidScrollChange((e) => { - this._layoutViewZone(); + if (e.scrollTopChanged) { + this._layoutViewZone(); + } })); } From c35b4b42900a7d100fa8ed8f24ac0e75adca418b Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 24 May 2017 16:43:49 +0200 Subject: [PATCH 1024/2747] Introduce `multicursorModifier` editor options --- .../common/config/commonEditorConfig.ts | 6 ++++ src/vs/editor/common/config/editorOptions.ts | 34 +++++++++++++++++++ src/vs/monaco.d.ts | 7 ++++ 3 files changed, 47 insertions(+) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 6fca4c237d054..bf24f6608befd 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -321,6 +321,12 @@ const editorConfiguration: IConfigurationNode = { 'default': EDITOR_DEFAULTS.viewInfo.scrollbar.mouseWheelScrollSensitivity, 'description': nls.localize('mouseWheelScrollSensitivity', "A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events") }, + 'editor.multicursorModifier': { + 'type': 'string', + 'enum': (platform.isMacintosh ? ['cmd', 'alt'] : ['ctrl', 'alt']), + 'default': 'alt', + 'description': nls.localize('multicursorModifier', "The modifier to be used to add multiple cursors with the mouse.") + }, 'editor.quickSuggestions': { 'anyOf': [ { diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 59056ff82270c..720302d227e30 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -331,6 +331,11 @@ export interface IEditorOptions { * Defaults to 1. */ mouseWheelScrollSensitivity?: number; + /** + * The modifier to be used to add multiple cursors with the mouse. + * Defaults to 'alt' + */ + multicursorModifier?: 'cmd' | 'ctrl' | 'alt'; /** * Enable quick suggestions (shadow suggestions) * Defaults to true. @@ -783,6 +788,7 @@ export interface IValidatedEditorOptions { readonly dragAndDrop: boolean; readonly emptySelectionClipboard: boolean; readonly useTabStops: boolean; + readonly multicursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; readonly viewInfo: InternalEditorViewOptions; readonly contribInfo: EditorContribOptions; @@ -803,6 +809,7 @@ export class InternalEditorOptions { * @internal */ readonly accessibilitySupport: platform.AccessibilitySupport; + readonly multicursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; // ---- cursor options readonly wordSeparators: string; @@ -829,6 +836,7 @@ export class InternalEditorOptions { lineHeight: number; readOnly: boolean; accessibilitySupport: platform.AccessibilitySupport; + multicursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; wordSeparators: string; autoClosingBrackets: boolean; useTabStops: boolean; @@ -847,6 +855,7 @@ export class InternalEditorOptions { this.lineHeight = source.lineHeight | 0; this.readOnly = source.readOnly; this.accessibilitySupport = source.accessibilitySupport; + this.multicursorModifier = source.multicursorModifier; this.wordSeparators = source.wordSeparators; this.autoClosingBrackets = source.autoClosingBrackets; this.useTabStops = source.useTabStops; @@ -871,6 +880,7 @@ export class InternalEditorOptions { && this.lineHeight === other.lineHeight && this.readOnly === other.readOnly && this.accessibilitySupport === other.accessibilitySupport + && this.multicursorModifier === other.multicursorModifier && this.wordSeparators === other.wordSeparators && this.autoClosingBrackets === other.autoClosingBrackets && this.useTabStops === other.useTabStops @@ -896,6 +906,7 @@ export class InternalEditorOptions { lineHeight: (this.lineHeight !== newOpts.lineHeight), readOnly: (this.readOnly !== newOpts.readOnly), accessibilitySupport: (this.accessibilitySupport !== newOpts.accessibilitySupport), + multicursorModifier: (this.multicursorModifier !== newOpts.multicursorModifier), wordSeparators: (this.wordSeparators !== newOpts.wordSeparators), autoClosingBrackets: (this.autoClosingBrackets !== newOpts.autoClosingBrackets), useTabStops: (this.useTabStops !== newOpts.useTabStops), @@ -1233,6 +1244,7 @@ export interface IConfigurationChangedEvent { readonly lineHeight: boolean; readonly readOnly: boolean; readonly accessibilitySupport: boolean; + readonly multicursorModifier: boolean; readonly wordSeparators: boolean; readonly autoClosingBrackets: boolean; readonly useTabStops: boolean; @@ -1386,6 +1398,24 @@ export class EditorOptionsValidator { const viewInfo = this._sanitizeViewInfo(opts, defaults.viewInfo); const contribInfo = this._sanitizeContribInfo(opts, defaults.contribInfo); + let configuredMulticursorModifier: 'altKey' | 'metaKey' | 'ctrlKey'; + if (typeof opts.multicursorModifier === 'string') { + if (platform.isMacintosh) { + if (opts.multicursorModifier === 'cmd') { + configuredMulticursorModifier = 'metaKey'; + } else { + configuredMulticursorModifier = 'altKey'; + } + } else { + if (opts.multicursorModifier === 'ctrl') { + configuredMulticursorModifier = 'ctrlKey'; + } else { + configuredMulticursorModifier = 'altKey'; + } + } + } + const multicursorModifier = _stringSet<'altKey' | 'metaKey' | 'ctrlKey'>(configuredMulticursorModifier, defaults.multicursorModifier, ['altKey', 'metaKey', 'ctrlKey']); + return { inDiffEditor: _boolean(opts.inDiffEditor, defaults.inDiffEditor), wordSeparators: _string(opts.wordSeparators, defaults.wordSeparators), @@ -1406,6 +1436,7 @@ export class EditorOptionsValidator { dragAndDrop: _boolean(opts.dragAndDrop, defaults.dragAndDrop), emptySelectionClipboard: _boolean(opts.emptySelectionClipboard, defaults.emptySelectionClipboard), useTabStops: _boolean(opts.useTabStops, defaults.useTabStops), + multicursorModifier: multicursorModifier, viewInfo: viewInfo, contribInfo: contribInfo, }; @@ -1629,6 +1660,7 @@ export class InternalEditorOptionsFactory { dragAndDrop: opts.dragAndDrop, emptySelectionClipboard: opts.emptySelectionClipboard, useTabStops: opts.useTabStops, + multicursorModifier: opts.multicursorModifier, viewInfo: { extraEditorClassName: opts.viewInfo.extraEditorClassName, @@ -1805,6 +1837,7 @@ export class InternalEditorOptionsFactory { lineHeight: env.fontInfo.lineHeight, readOnly: opts.readOnly, accessibilitySupport: env.accessibilitySupport, + multicursorModifier: opts.multicursorModifier, wordSeparators: opts.wordSeparators, autoClosingBrackets: opts.autoClosingBrackets, useTabStops: opts.useTabStops, @@ -2023,6 +2056,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { dragAndDrop: false, emptySelectionClipboard: true, useTabStops: true, + multicursorModifier: 'altKey', viewInfo: { extraEditorClassName: '', diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 707cb1047fa20..7f3c80b83fa95 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2876,6 +2876,11 @@ declare module monaco.editor { * Defaults to 1. */ mouseWheelScrollSensitivity?: number; + /** + * The modifier to be used to add multiple cursors with the mouse. + * Defaults to 'alt' + */ + multicursorModifier?: 'cmd' | 'ctrl' | 'alt'; /** * Enable quick suggestions (shadow suggestions) * Defaults to true. @@ -3257,6 +3262,7 @@ declare module monaco.editor { readonly editorClassName: string; readonly lineHeight: number; readonly readOnly: boolean; + readonly multicursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; readonly wordSeparators: string; readonly autoClosingBrackets: boolean; readonly useTabStops: boolean; @@ -3388,6 +3394,7 @@ declare module monaco.editor { readonly lineHeight: boolean; readonly readOnly: boolean; readonly accessibilitySupport: boolean; + readonly multicursorModifier: boolean; readonly wordSeparators: boolean; readonly autoClosingBrackets: boolean; readonly useTabStops: boolean; From fd021256871b0434559bc4443a3872ec58e9095f Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 24 May 2017 17:35:55 +0200 Subject: [PATCH 1025/2747] Encapsulate trigger modifier logic in goToDeclarationMouse --- .../browser/goToDeclarationMouse.ts | 81 +++++++++++++------ 1 file changed, 58 insertions(+), 23 deletions(-) diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts index 05aecd1ec0f70..15ccefb5d73ba 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts @@ -30,6 +30,40 @@ import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegist import { EditorState, CodeEditorStateFlag } from 'vs/editor/common/core/editorState'; import { DefinitionAction, DefinitionActionConfig } from './goToDeclarationCommands'; +/** + * An event that encapsulates the various trigger modifiers logic needed for go to definition. + */ +class MyMouseEvent { + + public readonly target: IMouseTarget; + public readonly hasTriggerModifier: boolean; + public readonly hasSideBySideModifier: boolean; + public readonly isSingleMouseDown: boolean; + + constructor(source: IEditorMouseEvent) { + this.target = source.target; + this.hasTriggerModifier = !!source.event[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER]; + this.hasSideBySideModifier = source.event.altKey; + this.isSingleMouseDown = (browser.isIE || source.event.detail <= 1); // IE does not support event.detail properly + } +} + +/** + * An event that encapsulates the various trigger modifiers logic needed for go to definition. + */ +class MyKeyboardEvent { + + public readonly keyCodeIsTriggerKey: boolean; + public readonly keyCodeIsSideBySideKey: boolean; + public readonly hasTriggerModifier: boolean; + + constructor(source: IKeyboardEvent) { + this.keyCodeIsTriggerKey = (source.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_KEY_VALUE); + this.keyCodeIsSideBySideKey = (source.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_SIDEBYSIDE_KEY_VALUE); + this.hasTriggerModifier = !!source[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER]; + } +} + @editorContribution class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorContribution { @@ -44,7 +78,7 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC private decorations: string[]; private currentWordUnderMouse: editorCommon.IWordAtPosition; private throttler: Throttler; - private lastMouseMoveEvent: IEditorMouseEvent; + private lastMouseMoveEvent: MyMouseEvent; private hasTriggerKeyOnMouseDown: boolean; constructor( @@ -57,12 +91,12 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC this.editor = editor; this.throttler = new Throttler(); - this.toUnhook.push(this.editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(e))); - this.toUnhook.push(this.editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(e))); - this.toUnhook.push(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(e))); + this.toUnhook.push(this.editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(new MyMouseEvent(e)))); + this.toUnhook.push(this.editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(new MyMouseEvent(e)))); + this.toUnhook.push(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(new MyMouseEvent(e)))); this.toUnhook.push(this.editor.onMouseDrag(() => this.resetHandler())); - this.toUnhook.push(this.editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(e))); - this.toUnhook.push(this.editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(e))); + this.toUnhook.push(this.editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(new MyKeyboardEvent(e)))); + this.toUnhook.push(this.editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(new MyKeyboardEvent(e)))); this.toUnhook.push(this.editor.onDidChangeCursorSelection((e) => this.onDidChangeCursorSelection(e))); this.toUnhook.push(this.editor.onDidChangeModel((e) => this.resetHandler())); @@ -80,13 +114,13 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } - private onEditorMouseMove(mouseEvent: IEditorMouseEvent, withKey?: IKeyboardEvent): void { + private onEditorMouseMove(mouseEvent: MyMouseEvent): void { this.lastMouseMoveEvent = mouseEvent; - this.startFindDefinition(mouseEvent, withKey); + this.startFindDefinition(mouseEvent); } - private startFindDefinition(mouseEvent: IEditorMouseEvent, withKey?: IKeyboardEvent): void { + private startFindDefinition(mouseEvent: MyMouseEvent, withKey?: MyKeyboardEvent): void { if (!this.isEnabled(mouseEvent, withKey)) { this.currentWordUnderMouse = null; this.removeDecorations(); @@ -196,15 +230,16 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } - private onEditorKeyDown(e: IKeyboardEvent): void { + private onEditorKeyDown(e: MyKeyboardEvent): void { if ( - this.lastMouseMoveEvent && ( - e.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_KEY_VALUE || // User just pressed Ctrl/Cmd (normal goto definition) - e.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_SIDEBYSIDE_KEY_VALUE && e[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER] // User pressed Ctrl/Cmd+Alt (goto definition to the side) + this.lastMouseMoveEvent + && ( + e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition) + || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side) ) ) { this.startFindDefinition(this.lastMouseMoveEvent, e); - } else if (e[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER]) { + } else if (e.hasTriggerModifier) { this.removeDecorations(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration } } @@ -215,17 +250,17 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC this.removeDecorations(); } - private onEditorMouseDown(mouseEvent: IEditorMouseEvent): void { + private onEditorMouseDown(mouseEvent: MyMouseEvent): void { // We need to record if we had the trigger key on mouse down because someone might select something in the editor // holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then // release the mouse button without wanting to do the navigation. // With this flag we prevent goto definition if the mouse was down before the trigger key was pressed. - this.hasTriggerKeyOnMouseDown = !!mouseEvent.event[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER]; + this.hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier; } - private onEditorMouseUp(mouseEvent: IEditorMouseEvent): void { + private onEditorMouseUp(mouseEvent: MyMouseEvent): void { if (this.isEnabled(mouseEvent) && this.hasTriggerKeyOnMouseDown) { - this.gotoDefinition(mouseEvent.target, mouseEvent.event.altKey).done(() => { + this.gotoDefinition(mouseEvent.target, mouseEvent.hasSideBySideModifier).done(() => { this.removeDecorations(); }, (error: Error) => { this.removeDecorations(); @@ -234,18 +269,18 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } - private onEditorKeyUp(e: IKeyboardEvent): void { - if (e.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_KEY_VALUE) { + private onEditorKeyUp(e: MyKeyboardEvent): void { + if (e.keyCodeIsTriggerKey) { this.removeDecorations(); this.currentWordUnderMouse = null; } } - private isEnabled(mouseEvent: IEditorMouseEvent, withKey?: IKeyboardEvent): boolean { + private isEnabled(mouseEvent: MyMouseEvent, withKey?: MyKeyboardEvent): boolean { return this.editor.getModel() && - (browser.isIE || mouseEvent.event.detail <= 1) && // IE does not support event.detail properly + mouseEvent.isSingleMouseDown && mouseEvent.target.type === MouseTargetType.CONTENT_TEXT && - (mouseEvent.event[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER] || (withKey && withKey.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_KEY_VALUE)) && + (mouseEvent.hasTriggerModifier || (withKey && withKey.keyCodeIsTriggerKey)) && DefinitionProviderRegistry.has(this.editor.getModel()); } From d07a391b6b242f47ff404126be0556ca66b0baca Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 24 May 2017 17:40:31 +0200 Subject: [PATCH 1026/2747] Group method logically --- .../browser/goToDeclarationMouse.ts | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts index 15ccefb5d73ba..e4d9aa7b6f4fc 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts @@ -91,12 +91,12 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC this.editor = editor; this.throttler = new Throttler(); + this.toUnhook.push(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(new MyMouseEvent(e)))); this.toUnhook.push(this.editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(new MyMouseEvent(e)))); this.toUnhook.push(this.editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(new MyMouseEvent(e)))); - this.toUnhook.push(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(new MyMouseEvent(e)))); - this.toUnhook.push(this.editor.onMouseDrag(() => this.resetHandler())); this.toUnhook.push(this.editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(new MyKeyboardEvent(e)))); this.toUnhook.push(this.editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(new MyKeyboardEvent(e)))); + this.toUnhook.push(this.editor.onMouseDrag(() => this.resetHandler())); this.toUnhook.push(this.editor.onDidChangeCursorSelection((e) => this.onDidChangeCursorSelection(e))); this.toUnhook.push(this.editor.onDidChangeModel((e) => this.resetHandler())); @@ -114,12 +114,6 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } - private onEditorMouseMove(mouseEvent: MyMouseEvent): void { - this.lastMouseMoveEvent = mouseEvent; - - this.startFindDefinition(mouseEvent); - } - private startFindDefinition(mouseEvent: MyMouseEvent, withKey?: MyKeyboardEvent): void { if (!this.isEnabled(mouseEvent, withKey)) { this.currentWordUnderMouse = null; @@ -230,24 +224,10 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } - private onEditorKeyDown(e: MyKeyboardEvent): void { - if ( - this.lastMouseMoveEvent - && ( - e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition) - || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side) - ) - ) { - this.startFindDefinition(this.lastMouseMoveEvent, e); - } else if (e.hasTriggerModifier) { - this.removeDecorations(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration - } - } + private onEditorMouseMove(mouseEvent: MyMouseEvent): void { + this.lastMouseMoveEvent = mouseEvent; - private resetHandler(): void { - this.lastMouseMoveEvent = null; - this.hasTriggerKeyOnMouseDown = false; - this.removeDecorations(); + this.startFindDefinition(mouseEvent); } private onEditorMouseDown(mouseEvent: MyMouseEvent): void { @@ -269,6 +249,20 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } + private onEditorKeyDown(e: MyKeyboardEvent): void { + if ( + this.lastMouseMoveEvent + && ( + e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition) + || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side) + ) + ) { + this.startFindDefinition(this.lastMouseMoveEvent, e); + } else if (e.hasTriggerModifier) { + this.removeDecorations(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration + } + } + private onEditorKeyUp(e: MyKeyboardEvent): void { if (e.keyCodeIsTriggerKey) { this.removeDecorations(); @@ -276,6 +270,12 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } + private resetHandler(): void { + this.lastMouseMoveEvent = null; + this.hasTriggerKeyOnMouseDown = false; + this.removeDecorations(); + } + private isEnabled(mouseEvent: MyMouseEvent, withKey?: MyKeyboardEvent): boolean { return this.editor.getModel() && mouseEvent.isSingleMouseDown && From d0d23a8752373bba6584b5e949e59a40f312f6d7 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 24 May 2017 19:36:56 +0200 Subject: [PATCH 1027/2747] Encapsulate opening a link gesture in LinkGesture --- .../browser/goToDeclarationMouse.ts | 194 +++++++++++------- 1 file changed, 118 insertions(+), 76 deletions(-) diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts index e4d9aa7b6f4fc..9bc13d23c2bbb 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts @@ -22,13 +22,14 @@ import { Location, DefinitionProviderRegistry } from 'vs/editor/common/modes'; import { ICodeEditor, IEditorMouseEvent, IMouseTarget, MouseTargetType } from 'vs/editor/browser/editorBrowser'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { getDefinitionsAtPosition } from './goToDeclaration'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; import { ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { EditorState, CodeEditorStateFlag } from 'vs/editor/common/core/editorState'; import { DefinitionAction, DefinitionActionConfig } from './goToDeclarationCommands'; +import Event, { Emitter } from 'vs/base/common/event'; /** * An event that encapsulates the various trigger modifiers logic needed for go to definition. @@ -38,13 +39,13 @@ class MyMouseEvent { public readonly target: IMouseTarget; public readonly hasTriggerModifier: boolean; public readonly hasSideBySideModifier: boolean; - public readonly isSingleMouseDown: boolean; + public readonly isNoneOrSingleMouseDown: boolean; constructor(source: IEditorMouseEvent) { this.target = source.target; this.hasTriggerModifier = !!source.event[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER]; this.hasSideBySideModifier = source.event.altKey; - this.isSingleMouseDown = (browser.isIE || source.event.detail <= 1); // IE does not support event.detail properly + this.isNoneOrSingleMouseDown = (browser.isIE || source.event.detail <= 1); // IE does not support event.detail properly } } @@ -64,6 +65,99 @@ class MyKeyboardEvent { } } +class LinkGesture extends Disposable { + + private readonly editor: ICodeEditor; + + private lastMouseMoveEvent: MyMouseEvent; + private hasTriggerKeyOnMouseDown: boolean; + + private readonly _onMouseMoveOrRelevantKeyDown: Emitter<[MyMouseEvent, MyKeyboardEvent]> = this._register(new Emitter<[MyMouseEvent, MyKeyboardEvent]>()); + public readonly onMouseMoveOrRelevantKeyDown: Event<[MyMouseEvent, MyKeyboardEvent]> = this._onMouseMoveOrRelevantKeyDown.event; + + private readonly _onExecute: Emitter = this._register(new Emitter()); + public readonly onExecute: Event = this._onExecute.event; + + private readonly _onCancel: Emitter = this._register(new Emitter()); + public readonly onCancel: Event = this._onCancel.event; + + constructor(editor: ICodeEditor) { + super(); + + this.editor = editor; + this.lastMouseMoveEvent = null; + this.hasTriggerKeyOnMouseDown = false; + + this._register(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(new MyMouseEvent(e)))); + this._register(this.editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(new MyMouseEvent(e)))); + this._register(this.editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(new MyMouseEvent(e)))); + this._register(this.editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(new MyKeyboardEvent(e)))); + this._register(this.editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(new MyKeyboardEvent(e)))); + this._register(this.editor.onMouseDrag(() => this.resetHandler())); + + this._register(this.editor.onDidChangeCursorSelection((e) => this.onDidChangeCursorSelection(e))); + this._register(this.editor.onDidChangeModel((e) => this.resetHandler())); + this._register(this.editor.onDidChangeModelContent(() => this.resetHandler())); + this._register(this.editor.onDidScrollChange((e) => { + if (e.scrollTopChanged || e.scrollLeftChanged) { + this.resetHandler(); + } + })); + } + + private onDidChangeCursorSelection(e: ICursorSelectionChangedEvent): void { + if (e.selection && e.selection.startColumn !== e.selection.endColumn) { + this.resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/Microsoft/vscode/issues/7827) + } + } + + private onEditorMouseMove(mouseEvent: MyMouseEvent): void { + this.lastMouseMoveEvent = mouseEvent; + + this._onMouseMoveOrRelevantKeyDown.fire([mouseEvent, null]); + } + + private onEditorMouseDown(mouseEvent: MyMouseEvent): void { + // We need to record if we had the trigger key on mouse down because someone might select something in the editor + // holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then + // release the mouse button without wanting to do the navigation. + // With this flag we prevent goto definition if the mouse was down before the trigger key was pressed. + this.hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier; + } + + private onEditorMouseUp(mouseEvent: MyMouseEvent): void { + if (this.hasTriggerKeyOnMouseDown) { + this._onExecute.fire(mouseEvent); + } + } + + private onEditorKeyDown(e: MyKeyboardEvent): void { + if ( + this.lastMouseMoveEvent + && ( + e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition) + || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side) + ) + ) { + this._onMouseMoveOrRelevantKeyDown.fire([this.lastMouseMoveEvent, e]); + } else if (e.hasTriggerModifier) { + this._onCancel.fire(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration + } + } + + private onEditorKeyUp(e: MyKeyboardEvent): void { + if (e.keyCodeIsTriggerKey) { + this._onCancel.fire(); + } + } + + private resetHandler(): void { + this.lastMouseMoveEvent = null; + this.hasTriggerKeyOnMouseDown = false; + this._onCancel.fire(); + } +} + @editorContribution class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorContribution { @@ -78,8 +172,6 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC private decorations: string[]; private currentWordUnderMouse: editorCommon.IWordAtPosition; private throttler: Throttler; - private lastMouseMoveEvent: MyMouseEvent; - private hasTriggerKeyOnMouseDown: boolean; constructor( editor: ICodeEditor, @@ -91,27 +183,29 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC this.editor = editor; this.throttler = new Throttler(); - this.toUnhook.push(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(new MyMouseEvent(e)))); - this.toUnhook.push(this.editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(new MyMouseEvent(e)))); - this.toUnhook.push(this.editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(new MyMouseEvent(e)))); - this.toUnhook.push(this.editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(new MyKeyboardEvent(e)))); - this.toUnhook.push(this.editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(new MyKeyboardEvent(e)))); - this.toUnhook.push(this.editor.onMouseDrag(() => this.resetHandler())); - - this.toUnhook.push(this.editor.onDidChangeCursorSelection((e) => this.onDidChangeCursorSelection(e))); - this.toUnhook.push(this.editor.onDidChangeModel((e) => this.resetHandler())); - this.toUnhook.push(this.editor.onDidChangeModelContent(() => this.resetHandler())); - this.toUnhook.push(this.editor.onDidScrollChange((e) => { - if (e.scrollTopChanged || e.scrollLeftChanged) { - this.resetHandler(); + let linkGesture = new LinkGesture(editor); + this.toUnhook.push(linkGesture); + + this.toUnhook.push(linkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => { + this.startFindDefinition(mouseEvent, keyboardEvent); + })); + + this.toUnhook.push(linkGesture.onExecute((mouseEvent: MyMouseEvent) => { + if (this.isEnabled(mouseEvent)) { + this.gotoDefinition(mouseEvent.target, mouseEvent.hasSideBySideModifier).done(() => { + this.removeDecorations(); + }, (error: Error) => { + this.removeDecorations(); + onUnexpectedError(error); + }); } })); - } - private onDidChangeCursorSelection(e: ICursorSelectionChangedEvent): void { - if (e.selection && e.selection.startColumn !== e.selection.endColumn) { - this.resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/Microsoft/vscode/issues/7827) - } + this.toUnhook.push(linkGesture.onCancel(() => { + this.removeDecorations(); + this.currentWordUnderMouse = null; + })); + } private startFindDefinition(mouseEvent: MyMouseEvent, withKey?: MyKeyboardEvent): void { @@ -224,61 +318,9 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } - private onEditorMouseMove(mouseEvent: MyMouseEvent): void { - this.lastMouseMoveEvent = mouseEvent; - - this.startFindDefinition(mouseEvent); - } - - private onEditorMouseDown(mouseEvent: MyMouseEvent): void { - // We need to record if we had the trigger key on mouse down because someone might select something in the editor - // holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then - // release the mouse button without wanting to do the navigation. - // With this flag we prevent goto definition if the mouse was down before the trigger key was pressed. - this.hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier; - } - - private onEditorMouseUp(mouseEvent: MyMouseEvent): void { - if (this.isEnabled(mouseEvent) && this.hasTriggerKeyOnMouseDown) { - this.gotoDefinition(mouseEvent.target, mouseEvent.hasSideBySideModifier).done(() => { - this.removeDecorations(); - }, (error: Error) => { - this.removeDecorations(); - onUnexpectedError(error); - }); - } - } - - private onEditorKeyDown(e: MyKeyboardEvent): void { - if ( - this.lastMouseMoveEvent - && ( - e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition) - || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side) - ) - ) { - this.startFindDefinition(this.lastMouseMoveEvent, e); - } else if (e.hasTriggerModifier) { - this.removeDecorations(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration - } - } - - private onEditorKeyUp(e: MyKeyboardEvent): void { - if (e.keyCodeIsTriggerKey) { - this.removeDecorations(); - this.currentWordUnderMouse = null; - } - } - - private resetHandler(): void { - this.lastMouseMoveEvent = null; - this.hasTriggerKeyOnMouseDown = false; - this.removeDecorations(); - } - private isEnabled(mouseEvent: MyMouseEvent, withKey?: MyKeyboardEvent): boolean { return this.editor.getModel() && - mouseEvent.isSingleMouseDown && + mouseEvent.isNoneOrSingleMouseDown && mouseEvent.target.type === MouseTargetType.CONTENT_TEXT && (mouseEvent.hasTriggerModifier || (withKey && withKey.keyCodeIsTriggerKey)) && DefinitionProviderRegistry.has(this.editor.getModel()); From 1c38b011ea1534cc65cd020c4a39e95348201c98 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 24 May 2017 20:34:46 +0200 Subject: [PATCH 1028/2747] Extract clicking link logic to its own file --- .../browser/clickLinkGesture.ts | 158 ++++++++++++++++++ .../browser/goToDeclarationMouse.ts | 150 ++--------------- 2 files changed, 170 insertions(+), 138 deletions(-) create mode 100644 src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts diff --git a/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts b/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts new file mode 100644 index 0000000000000..bec68dcf19a82 --- /dev/null +++ b/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts @@ -0,0 +1,158 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import 'vs/css!./goToDeclarationMouse'; +import { KeyCode } from 'vs/base/common/keyCodes'; +import * as browser from 'vs/base/browser/browser'; +import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { ICodeEditor, IEditorMouseEvent, IMouseTarget } from 'vs/editor/browser/editorBrowser'; +import { Disposable } from 'vs/base/common/lifecycle'; +import { ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; +import Event, { Emitter } from 'vs/base/common/event'; + +/** + * An event that encapsulates the various trigger modifiers logic needed for go to definition. + */ +export class ClickLinkMouseEvent { + + public readonly target: IMouseTarget; + public readonly hasTriggerModifier: boolean; + public readonly hasSideBySideModifier: boolean; + public readonly isNoneOrSingleMouseDown: boolean; + + constructor(source: IEditorMouseEvent, opts: ClickLinkOptions) { + this.target = source.target; + this.hasTriggerModifier = !!source.event[opts.triggerModifier]; + this.hasSideBySideModifier = source.event.altKey; + this.isNoneOrSingleMouseDown = (browser.isIE || source.event.detail <= 1); // IE does not support event.detail properly + } +} + +/** + * An event that encapsulates the various trigger modifiers logic needed for go to definition. + */ +export class ClickLinkKeyboardEvent { + + public readonly keyCodeIsTriggerKey: boolean; + public readonly keyCodeIsSideBySideKey: boolean; + public readonly hasTriggerModifier: boolean; + + constructor(source: IKeyboardEvent, opts: ClickLinkOptions) { + this.keyCodeIsTriggerKey = (source.keyCode === opts.triggerKey); + this.keyCodeIsSideBySideKey = (source.keyCode === opts.triggerSideBySideKey); + this.hasTriggerModifier = !!source[opts.triggerModifier]; + } +} + +export class ClickLinkOptions { + + public readonly triggerKey: KeyCode; + public readonly triggerModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey'; + public readonly triggerSideBySideKey: KeyCode; + + constructor(triggerKey: KeyCode, triggerModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey', triggerSideBySideKey: KeyCode) { + this.triggerKey = triggerKey; + this.triggerModifier = triggerModifier; + this.triggerSideBySideKey = triggerSideBySideKey; + } +} + +export class ClickLinkGesture extends Disposable { + + private readonly _onMouseMoveOrRelevantKeyDown: Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent]> = this._register(new Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent]>()); + public readonly onMouseMoveOrRelevantKeyDown: Event<[ClickLinkMouseEvent, ClickLinkKeyboardEvent]> = this._onMouseMoveOrRelevantKeyDown.event; + + private readonly _onExecute: Emitter = this._register(new Emitter()); + public readonly onExecute: Event = this._onExecute.event; + + private readonly _onCancel: Emitter = this._register(new Emitter()); + public readonly onCancel: Event = this._onCancel.event; + + private readonly _editor: ICodeEditor; + private readonly _opts: ClickLinkOptions; + + private lastMouseMoveEvent: ClickLinkMouseEvent; + private hasTriggerKeyOnMouseDown: boolean; + + constructor(editor: ICodeEditor, opts: ClickLinkOptions) { + super(); + + this._editor = editor; + this._opts = opts; + + this.lastMouseMoveEvent = null; + this.hasTriggerKeyOnMouseDown = false; + + this._register(this._editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(new ClickLinkMouseEvent(e, this._opts)))); + this._register(this._editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(new ClickLinkMouseEvent(e, this._opts)))); + this._register(this._editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(new ClickLinkMouseEvent(e, this._opts)))); + this._register(this._editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(new ClickLinkKeyboardEvent(e, this._opts)))); + this._register(this._editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(new ClickLinkKeyboardEvent(e, this._opts)))); + this._register(this._editor.onMouseDrag(() => this.resetHandler())); + + this._register(this._editor.onDidChangeCursorSelection((e) => this.onDidChangeCursorSelection(e))); + this._register(this._editor.onDidChangeModel((e) => this.resetHandler())); + this._register(this._editor.onDidChangeModelContent(() => this.resetHandler())); + this._register(this._editor.onDidScrollChange((e) => { + if (e.scrollTopChanged || e.scrollLeftChanged) { + this.resetHandler(); + } + })); + } + + private onDidChangeCursorSelection(e: ICursorSelectionChangedEvent): void { + if (e.selection && e.selection.startColumn !== e.selection.endColumn) { + this.resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/Microsoft/vscode/issues/7827) + } + } + + private onEditorMouseMove(mouseEvent: ClickLinkMouseEvent): void { + this.lastMouseMoveEvent = mouseEvent; + + this._onMouseMoveOrRelevantKeyDown.fire([mouseEvent, null]); + } + + private onEditorMouseDown(mouseEvent: ClickLinkMouseEvent): void { + // We need to record if we had the trigger key on mouse down because someone might select something in the editor + // holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then + // release the mouse button without wanting to do the navigation. + // With this flag we prevent goto definition if the mouse was down before the trigger key was pressed. + this.hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier; + } + + private onEditorMouseUp(mouseEvent: ClickLinkMouseEvent): void { + if (this.hasTriggerKeyOnMouseDown) { + this._onExecute.fire(mouseEvent); + } + } + + private onEditorKeyDown(e: ClickLinkKeyboardEvent): void { + if ( + this.lastMouseMoveEvent + && ( + e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition) + || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side) + ) + ) { + this._onMouseMoveOrRelevantKeyDown.fire([this.lastMouseMoveEvent, e]); + } else if (e.hasTriggerModifier) { + this._onCancel.fire(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration + } + } + + private onEditorKeyUp(e: ClickLinkKeyboardEvent): void { + if (e.keyCodeIsTriggerKey) { + this._onCancel.fire(); + } + } + + private resetHandler(): void { + this.lastMouseMoveEvent = null; + this.hasTriggerKeyOnMouseDown = false; + this._onCancel.fire(); + } +} diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts index 9bc13d23c2bbb..e063801f2d93d 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts @@ -13,156 +13,26 @@ import { MarkedString } from 'vs/base/common/htmlContent'; import { KeyCode } from 'vs/base/common/keyCodes'; import * as platform from 'vs/base/common/platform'; import { TPromise } from 'vs/base/common/winjs.base'; -import * as browser from 'vs/base/browser/browser'; -import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { IModeService } from 'vs/editor/common/services/modeService'; import { Range } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { Location, DefinitionProviderRegistry } from 'vs/editor/common/modes'; -import { ICodeEditor, IEditorMouseEvent, IMouseTarget, MouseTargetType } from 'vs/editor/browser/editorBrowser'; +import { ICodeEditor, IMouseTarget, MouseTargetType } from 'vs/editor/browser/editorBrowser'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { getDefinitionsAtPosition } from './goToDeclaration'; -import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; -import { ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { EditorState, CodeEditorStateFlag } from 'vs/editor/common/core/editorState'; import { DefinitionAction, DefinitionActionConfig } from './goToDeclarationCommands'; -import Event, { Emitter } from 'vs/base/common/event'; - -/** - * An event that encapsulates the various trigger modifiers logic needed for go to definition. - */ -class MyMouseEvent { - - public readonly target: IMouseTarget; - public readonly hasTriggerModifier: boolean; - public readonly hasSideBySideModifier: boolean; - public readonly isNoneOrSingleMouseDown: boolean; - - constructor(source: IEditorMouseEvent) { - this.target = source.target; - this.hasTriggerModifier = !!source.event[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER]; - this.hasSideBySideModifier = source.event.altKey; - this.isNoneOrSingleMouseDown = (browser.isIE || source.event.detail <= 1); // IE does not support event.detail properly - } -} - -/** - * An event that encapsulates the various trigger modifiers logic needed for go to definition. - */ -class MyKeyboardEvent { - - public readonly keyCodeIsTriggerKey: boolean; - public readonly keyCodeIsSideBySideKey: boolean; - public readonly hasTriggerModifier: boolean; - - constructor(source: IKeyboardEvent) { - this.keyCodeIsTriggerKey = (source.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_KEY_VALUE); - this.keyCodeIsSideBySideKey = (source.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_SIDEBYSIDE_KEY_VALUE); - this.hasTriggerModifier = !!source[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER]; - } -} - -class LinkGesture extends Disposable { - - private readonly editor: ICodeEditor; - - private lastMouseMoveEvent: MyMouseEvent; - private hasTriggerKeyOnMouseDown: boolean; - - private readonly _onMouseMoveOrRelevantKeyDown: Emitter<[MyMouseEvent, MyKeyboardEvent]> = this._register(new Emitter<[MyMouseEvent, MyKeyboardEvent]>()); - public readonly onMouseMoveOrRelevantKeyDown: Event<[MyMouseEvent, MyKeyboardEvent]> = this._onMouseMoveOrRelevantKeyDown.event; - - private readonly _onExecute: Emitter = this._register(new Emitter()); - public readonly onExecute: Event = this._onExecute.event; - - private readonly _onCancel: Emitter = this._register(new Emitter()); - public readonly onCancel: Event = this._onCancel.event; - - constructor(editor: ICodeEditor) { - super(); - - this.editor = editor; - this.lastMouseMoveEvent = null; - this.hasTriggerKeyOnMouseDown = false; - - this._register(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(new MyMouseEvent(e)))); - this._register(this.editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(new MyMouseEvent(e)))); - this._register(this.editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(new MyMouseEvent(e)))); - this._register(this.editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(new MyKeyboardEvent(e)))); - this._register(this.editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(new MyKeyboardEvent(e)))); - this._register(this.editor.onMouseDrag(() => this.resetHandler())); - - this._register(this.editor.onDidChangeCursorSelection((e) => this.onDidChangeCursorSelection(e))); - this._register(this.editor.onDidChangeModel((e) => this.resetHandler())); - this._register(this.editor.onDidChangeModelContent(() => this.resetHandler())); - this._register(this.editor.onDidScrollChange((e) => { - if (e.scrollTopChanged || e.scrollLeftChanged) { - this.resetHandler(); - } - })); - } - - private onDidChangeCursorSelection(e: ICursorSelectionChangedEvent): void { - if (e.selection && e.selection.startColumn !== e.selection.endColumn) { - this.resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/Microsoft/vscode/issues/7827) - } - } - - private onEditorMouseMove(mouseEvent: MyMouseEvent): void { - this.lastMouseMoveEvent = mouseEvent; - - this._onMouseMoveOrRelevantKeyDown.fire([mouseEvent, null]); - } - - private onEditorMouseDown(mouseEvent: MyMouseEvent): void { - // We need to record if we had the trigger key on mouse down because someone might select something in the editor - // holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then - // release the mouse button without wanting to do the navigation. - // With this flag we prevent goto definition if the mouse was down before the trigger key was pressed. - this.hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier; - } - - private onEditorMouseUp(mouseEvent: MyMouseEvent): void { - if (this.hasTriggerKeyOnMouseDown) { - this._onExecute.fire(mouseEvent); - } - } - - private onEditorKeyDown(e: MyKeyboardEvent): void { - if ( - this.lastMouseMoveEvent - && ( - e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition) - || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side) - ) - ) { - this._onMouseMoveOrRelevantKeyDown.fire([this.lastMouseMoveEvent, e]); - } else if (e.hasTriggerModifier) { - this._onCancel.fire(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration - } - } - - private onEditorKeyUp(e: MyKeyboardEvent): void { - if (e.keyCodeIsTriggerKey) { - this._onCancel.fire(); - } - } - - private resetHandler(): void { - this.lastMouseMoveEvent = null; - this.hasTriggerKeyOnMouseDown = false; - this._onCancel.fire(); - } -} +import { ClickLinkGesture, ClickLinkOptions, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; @editorContribution class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorContribution { private static ID = 'editor.contrib.gotodefinitionwithmouse'; - static TRIGGER_MODIFIER = platform.isMacintosh ? 'metaKey' : 'ctrlKey'; + static TRIGGER_MODIFIER: 'metaKey' | 'ctrlKey' = platform.isMacintosh ? 'metaKey' : 'ctrlKey'; static TRIGGER_SIDEBYSIDE_KEY_VALUE = KeyCode.Alt; static TRIGGER_KEY_VALUE = platform.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl; static MAX_SOURCE_PREVIEW_LINES = 8; @@ -183,14 +53,18 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC this.editor = editor; this.throttler = new Throttler(); - let linkGesture = new LinkGesture(editor); + let linkGesture = new ClickLinkGesture(editor, new ClickLinkOptions( + GotoDefinitionWithMouseEditorContribution.TRIGGER_KEY_VALUE, + GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER, + GotoDefinitionWithMouseEditorContribution.TRIGGER_SIDEBYSIDE_KEY_VALUE + )); this.toUnhook.push(linkGesture); this.toUnhook.push(linkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => { this.startFindDefinition(mouseEvent, keyboardEvent); })); - this.toUnhook.push(linkGesture.onExecute((mouseEvent: MyMouseEvent) => { + this.toUnhook.push(linkGesture.onExecute((mouseEvent: ClickLinkMouseEvent) => { if (this.isEnabled(mouseEvent)) { this.gotoDefinition(mouseEvent.target, mouseEvent.hasSideBySideModifier).done(() => { this.removeDecorations(); @@ -208,7 +82,7 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } - private startFindDefinition(mouseEvent: MyMouseEvent, withKey?: MyKeyboardEvent): void { + private startFindDefinition(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): void { if (!this.isEnabled(mouseEvent, withKey)) { this.currentWordUnderMouse = null; this.removeDecorations(); @@ -318,7 +192,7 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } - private isEnabled(mouseEvent: MyMouseEvent, withKey?: MyKeyboardEvent): boolean { + private isEnabled(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): boolean { return this.editor.getModel() && mouseEvent.isNoneOrSingleMouseDown && mouseEvent.target.type === MouseTargetType.CONTENT_TEXT && From 9e8f922647e973fba4e52557f823494e2f7b7fed Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 24 May 2017 22:32:38 +0200 Subject: [PATCH 1029/2747] Fixes #6910: Left mouse button up when selecting text with CTRL pressed causes to follow link --- src/vs/editor/contrib/links/browser/links.ts | 60 ++++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index 44f1d2fb3bd05..c14eaf2d911e7 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -12,14 +12,13 @@ import { KeyCode } from 'vs/base/common/keyCodes'; import * as platform from 'vs/base/common/platform'; import Severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { IMessageService } from 'vs/platform/message/common/message'; import { IOpenerService } from 'vs/platform/opener/common/opener'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { editorAction, ServicesAccessor, EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { LinkProviderRegistry } from 'vs/editor/common/modes'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; -import { IEditorMouseEvent, ICodeEditor, MouseTargetType } from 'vs/editor/browser/editorBrowser'; +import { ICodeEditor, MouseTargetType } from 'vs/editor/browser/editorBrowser'; import { getLinks, Link } from 'vs/editor/contrib/links/common/links'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; @@ -27,6 +26,7 @@ import { registerThemingParticipant } from 'vs/platform/theme/common/themeServic import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { Position } from 'vs/editor/common/core/position'; import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ClickLinkGesture, ClickLinkOptions, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; const HOVER_MESSAGE_GENERAL = ( platform.isMacintosh @@ -67,7 +67,7 @@ class LinkOccurence { public decorationId: string; public link: Link; - constructor(link: Link, decorationId: string/*, changeAccessor:editorCommon.IModelDecorationsChangeAccessor*/) { + constructor(link: Link, decorationId: string) { this.link = link; this.decorationId = decorationId; } @@ -92,14 +92,13 @@ class LinkDetector implements editorCommon.IEditorContribution { static RECOMPUTE_TIME = 1000; // ms static TRIGGER_KEY_VALUE = platform.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl; - static TRIGGER_MODIFIER = platform.isMacintosh ? 'metaKey' : 'ctrlKey'; + static TRIGGER_MODIFIER: 'metaKey' | 'ctrlKey' = platform.isMacintosh ? 'metaKey' : 'ctrlKey'; private editor: ICodeEditor; private listenersToRemove: IDisposable[]; private timeoutPromise: TPromise; private computePromise: TPromise; private activeLinkDecorationId: string; - private lastMouseEvent: IEditorMouseEvent; private openerService: IOpenerService; private messageService: IMessageService; private editorWorkerService: IEditorWorkerService; @@ -116,14 +115,28 @@ class LinkDetector implements editorCommon.IEditorContribution { this.messageService = messageService; this.editorWorkerService = editorWorkerService; this.listenersToRemove = []; + + let clickLinkGesture = new ClickLinkGesture(editor, new ClickLinkOptions( + LinkDetector.TRIGGER_KEY_VALUE, + LinkDetector.TRIGGER_MODIFIER, + KeyCode.Alt + )); + this.listenersToRemove.push(clickLinkGesture); + this.listenersToRemove.push(clickLinkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => { + this._onEditorMouseMove(mouseEvent, keyboardEvent); + })); + this.listenersToRemove.push(clickLinkGesture.onExecute((e) => { + this.onEditorMouseUp(e); + })); + this.listenersToRemove.push(clickLinkGesture.onCancel((e) => { + this.cleanUpActiveLinkDecoration(); + })); + this.listenersToRemove.push(editor.onDidChangeModelContent((e) => this.onChange())); this.listenersToRemove.push(editor.onDidChangeModel((e) => this.onModelChanged())); this.listenersToRemove.push(editor.onDidChangeModelLanguage((e) => this.onModelModeChanged())); this.listenersToRemove.push(LinkProviderRegistry.onDidChange((e) => this.onModelModeChanged())); - this.listenersToRemove.push(this.editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(e))); - this.listenersToRemove.push(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(e))); - this.listenersToRemove.push(this.editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(e))); - this.listenersToRemove.push(this.editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(e))); + this.timeoutPromise = null; this.computePromise = null; this.currentOccurences = {}; @@ -140,7 +153,6 @@ class LinkDetector implements editorCommon.IEditorContribution { } private onModelChanged(): void { - this.lastMouseEvent = null; this.currentOccurences = {}; this.activeLinkDecorationId = null; this.stop(); @@ -206,21 +218,7 @@ class LinkDetector implements editorCommon.IEditorContribution { }); } - private onEditorKeyDown(e: IKeyboardEvent): void { - if (e.keyCode === LinkDetector.TRIGGER_KEY_VALUE && this.lastMouseEvent) { - this.onEditorMouseMove(this.lastMouseEvent, e); - } - } - - private onEditorKeyUp(e: IKeyboardEvent): void { - if (e.keyCode === LinkDetector.TRIGGER_KEY_VALUE) { - this.cleanUpActiveLinkDecoration(); - } - } - - private onEditorMouseMove(mouseEvent: IEditorMouseEvent, withKey?: IKeyboardEvent): void { - this.lastMouseEvent = mouseEvent; - + private _onEditorMouseMove(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): void { if (this.isEnabled(mouseEvent, withKey)) { this.cleanUpActiveLinkDecoration(); // always remove previous link decoration as their can only be one var occurence = this.getLinkOccurence(mouseEvent.target.position); @@ -248,7 +246,7 @@ class LinkDetector implements editorCommon.IEditorContribution { } } - private onEditorMouseUp(mouseEvent: IEditorMouseEvent): void { + private onEditorMouseUp(mouseEvent: ClickLinkMouseEvent): void { if (!this.isEnabled(mouseEvent)) { return; } @@ -256,7 +254,7 @@ class LinkDetector implements editorCommon.IEditorContribution { if (!occurence) { return; } - this.openLinkOccurence(occurence, mouseEvent.event.altKey); + this.openLinkOccurence(occurence, mouseEvent.hasSideBySideModifier); } public openLinkOccurence(occurence: LinkOccurence, openToSide: boolean): void { @@ -302,9 +300,11 @@ class LinkDetector implements editorCommon.IEditorContribution { return null; } - private isEnabled(mouseEvent: IEditorMouseEvent, withKey?: IKeyboardEvent): boolean { - return mouseEvent.target.type === MouseTargetType.CONTENT_TEXT && - (mouseEvent.event[LinkDetector.TRIGGER_MODIFIER] || (withKey && withKey.keyCode === LinkDetector.TRIGGER_KEY_VALUE)); + private isEnabled(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): boolean { + return ( + mouseEvent.target.type === MouseTargetType.CONTENT_TEXT + && (mouseEvent.hasTriggerModifier || (withKey && withKey.keyCodeIsTriggerKey)) + ); } private stop(): void { From f7a42a865211994d11766f54d21dbecb1f9089b4 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 25 May 2017 00:00:54 +0200 Subject: [PATCH 1030/2747] Implement editor.multicursorModifier --- src/vs/editor/browser/view/viewController.ts | 99 +++++++++---------- src/vs/editor/browser/view/viewImpl.ts | 2 +- .../browser/clickLinkGesture.ts | 63 ++++++++++-- .../browser/goToDeclarationMouse.ts | 13 +-- src/vs/editor/contrib/hover/browser/hover.ts | 3 +- src/vs/editor/contrib/links/browser/links.ts | 11 +-- 6 files changed, 110 insertions(+), 81 deletions(-) diff --git a/src/vs/editor/browser/view/viewController.ts b/src/vs/editor/browser/view/viewController.ts index f37a97d934489..e05ca74ea605c 100644 --- a/src/vs/editor/browser/view/viewController.ts +++ b/src/vs/editor/browser/view/viewController.ts @@ -12,6 +12,7 @@ import { ICommandService } from 'vs/platform/commands/common/commands'; import { IViewModel } from 'vs/editor/common/viewModel/viewModel'; import { ViewOutgoingEvents } from 'vs/editor/browser/view/viewOutgoingEvents'; import { CoreNavigationCommands, CoreEditorCommand } from 'vs/editor/common/controller/coreCommands'; +import { Configuration } from "vs/editor/browser/config/configuration"; export interface ExecCoreEditorCommandFunc { (editorCommand: CoreEditorCommand, args: any): void; @@ -35,17 +36,20 @@ export interface IMouseDispatchData { export class ViewController { + private readonly configuration: Configuration; private readonly viewModel: IViewModel; private readonly _execCoreEditorCommandFunc: ExecCoreEditorCommandFunc; private readonly outgoingEvents: ViewOutgoingEvents; private readonly commandService: ICommandService; constructor( + configuration: Configuration, viewModel: IViewModel, execCommandFunc: ExecCoreEditorCommandFunc, outgoingEvents: ViewOutgoingEvents, commandService: ICommandService ) { + this.configuration = configuration; this.viewModel = viewModel; this._execCoreEditorCommandFunc = execCommandFunc; this.outgoingEvents = outgoingEvents; @@ -97,10 +101,34 @@ export class ViewController { return viewPosition; } + private _hasMulticursorModifier(data: IMouseDispatchData): boolean { + switch (this.configuration.editor.multicursorModifier) { + case 'altKey': + return data.altKey; + case 'ctrlKey': + return data.ctrlKey; + case 'metaKey': + return data.metaKey; + } + return false; + } + + private _hasNonMulticursorModifier(data: IMouseDispatchData): boolean { + switch (this.configuration.editor.multicursorModifier) { + case 'altKey': + return data.ctrlKey || data.metaKey; + case 'ctrlKey': + return data.altKey || data.metaKey; + case 'metaKey': + return data.ctrlKey || data.altKey; + } + return false; + } + public dispatchMouse(data: IMouseDispatchData): void { if (data.startedOnLineNumbers) { // If the dragging started on the gutter, then have operations work on the entire line - if (data.altKey) { + if (this._hasMulticursorModifier(data)) { if (data.inSelectionMode) { this.lastCursorLineSelect(data.position); } else { @@ -116,7 +144,7 @@ export class ViewController { } else if (data.mouseDownCount >= 4) { this.selectAll(); } else if (data.mouseDownCount === 3) { - if (data.altKey) { + if (this._hasMulticursorModifier(data)) { if (data.inSelectionMode) { this.lastCursorLineSelectDrag(data.position); } else { @@ -130,7 +158,7 @@ export class ViewController { } } } else if (data.mouseDownCount === 2) { - if (data.altKey) { + if (this._hasMulticursorModifier(data)) { this.lastCursorWordSelect(data.position); } else { if (data.inSelectionMode) { @@ -140,8 +168,8 @@ export class ViewController { } } } else { - if (data.altKey) { - if (!data.ctrlKey && !data.metaKey) { + if (this._hasMulticursorModifier(data)) { + if (!this._hasNonMulticursorModifier(data)) { if (data.shiftKey) { this.columnSelect(data.position, data.mouseColumn); } else { @@ -163,20 +191,20 @@ export class ViewController { } } - public moveTo(viewPosition: Position): void { + private _usualArgs(viewPosition: Position) { viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.MoveTo, { + return { position: this.convertViewToModelPosition(viewPosition), viewPosition: viewPosition - }); + }; + } + + public moveTo(viewPosition: Position): void { + this._execMouseCommand(CoreNavigationCommands.MoveTo, this._usualArgs(viewPosition)); } private moveToSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.MoveToSelect, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.MoveToSelect, this._usualArgs(viewPosition)); } private columnSelect(viewPosition: Position, mouseColumn: number): void { @@ -198,64 +226,35 @@ export class ViewController { } private lastCursorMoveToSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.LastCursorMoveToSelect, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.LastCursorMoveToSelect, this._usualArgs(viewPosition)); } private wordSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.WordSelect, { - position: this.convertViewToModelPosition(viewPosition) - }); + this._execMouseCommand(CoreNavigationCommands.WordSelect, this._usualArgs(viewPosition)); } private wordSelectDrag(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.WordSelectDrag, { - position: this.convertViewToModelPosition(viewPosition) - }); + this._execMouseCommand(CoreNavigationCommands.WordSelectDrag, this._usualArgs(viewPosition)); } private lastCursorWordSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.LastCursorWordSelect, { - position: this.convertViewToModelPosition(viewPosition) - }); + this._execMouseCommand(CoreNavigationCommands.LastCursorWordSelect, this._usualArgs(viewPosition)); } private lineSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.LineSelect, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.LineSelect, this._usualArgs(viewPosition)); } private lineSelectDrag(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.LineSelectDrag, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.LineSelectDrag, this._usualArgs(viewPosition)); } private lastCursorLineSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.LastCursorLineSelect, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.LastCursorLineSelect, this._usualArgs(viewPosition)); } private lastCursorLineSelectDrag(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.LastCursorLineSelectDrag, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.LastCursorLineSelectDrag, this._usualArgs(viewPosition)); } private selectAll(): void { diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index 321c4719a6dc3..927c1d1948684 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -105,7 +105,7 @@ export class View extends ViewEventHandler { this._renderAnimationFrame = null; this.outgoingEvents = new ViewOutgoingEvents(model); - let viewController = new ViewController(model, execCoreEditorCommandFunc, this.outgoingEvents, commandService); + let viewController = new ViewController(configuration, model, execCoreEditorCommandFunc, this.outgoingEvents, commandService); // The event dispatcher will always go through _renderOnce before dispatching any events this.eventDispatcher = new ViewEventDispatcher((callback: () => void) => this._renderOnce(callback)); diff --git a/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts b/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts index bec68dcf19a82..79d1043cf50d2 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts @@ -13,6 +13,11 @@ import { ICodeEditor, IEditorMouseEvent, IMouseTarget } from 'vs/editor/browser/ import { Disposable } from 'vs/base/common/lifecycle'; import { ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import Event, { Emitter } from 'vs/base/common/event'; +import * as platform from 'vs/base/common/platform'; + +function hasModifier(e: { ctrlKey: boolean; shiftKey: boolean; altKey: boolean; metaKey: boolean }, modifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey'): boolean { + return !!e[modifier]; +} /** * An event that encapsulates the various trigger modifiers logic needed for go to definition. @@ -26,8 +31,8 @@ export class ClickLinkMouseEvent { constructor(source: IEditorMouseEvent, opts: ClickLinkOptions) { this.target = source.target; - this.hasTriggerModifier = !!source.event[opts.triggerModifier]; - this.hasSideBySideModifier = source.event.altKey; + this.hasTriggerModifier = hasModifier(source.event, opts.triggerModifier); + this.hasSideBySideModifier = hasModifier(source.event, opts.triggerSideBySideModifier); this.isNoneOrSingleMouseDown = (browser.isIE || source.event.detail <= 1); // IE does not support event.detail properly } } @@ -44,7 +49,7 @@ export class ClickLinkKeyboardEvent { constructor(source: IKeyboardEvent, opts: ClickLinkOptions) { this.keyCodeIsTriggerKey = (source.keyCode === opts.triggerKey); this.keyCodeIsSideBySideKey = (source.keyCode === opts.triggerSideBySideKey); - this.hasTriggerModifier = !!source[opts.triggerModifier]; + this.hasTriggerModifier = hasModifier(source, opts.triggerModifier); } } @@ -53,14 +58,44 @@ export class ClickLinkOptions { public readonly triggerKey: KeyCode; public readonly triggerModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey'; public readonly triggerSideBySideKey: KeyCode; - - constructor(triggerKey: KeyCode, triggerModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey', triggerSideBySideKey: KeyCode) { + public readonly triggerSideBySideModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey'; + + constructor( + triggerKey: KeyCode, + triggerModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey', + triggerSideBySideKey: KeyCode, + triggerSideBySideModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey' + ) { this.triggerKey = triggerKey; this.triggerModifier = triggerModifier; this.triggerSideBySideKey = triggerSideBySideKey; + this.triggerSideBySideModifier = triggerSideBySideModifier; + } + + public equals(other: ClickLinkOptions): boolean { + return ( + this.triggerKey === other.triggerKey + && this.triggerModifier === other.triggerModifier + && this.triggerSideBySideKey === other.triggerSideBySideKey + && this.triggerSideBySideModifier === other.triggerSideBySideModifier + ); } } +function createOptions(multicursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'): ClickLinkOptions { + if (multicursorModifier === 'altKey') { + if (platform.isMacintosh) { + return new ClickLinkOptions(KeyCode.Meta, 'metaKey', KeyCode.Alt, 'altKey'); + } + return new ClickLinkOptions(KeyCode.Ctrl, 'ctrlKey', KeyCode.Alt, 'altKey'); + } + + if (platform.isMacintosh) { + return new ClickLinkOptions(KeyCode.Alt, 'altKey', KeyCode.Meta, 'metaKey'); + } + return new ClickLinkOptions(KeyCode.Alt, 'altKey', KeyCode.Ctrl, 'ctrlKey'); +} + export class ClickLinkGesture extends Disposable { private readonly _onMouseMoveOrRelevantKeyDown: Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent]> = this._register(new Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent]>()); @@ -73,20 +108,32 @@ export class ClickLinkGesture extends Disposable { public readonly onCancel: Event = this._onCancel.event; private readonly _editor: ICodeEditor; - private readonly _opts: ClickLinkOptions; + private _opts: ClickLinkOptions; private lastMouseMoveEvent: ClickLinkMouseEvent; private hasTriggerKeyOnMouseDown: boolean; - constructor(editor: ICodeEditor, opts: ClickLinkOptions) { + constructor(editor: ICodeEditor) { super(); this._editor = editor; - this._opts = opts; + this._opts = createOptions(this._editor.getConfiguration().multicursorModifier); this.lastMouseMoveEvent = null; this.hasTriggerKeyOnMouseDown = false; + this._register(this._editor.onDidChangeConfiguration((e) => { + if (e.multicursorModifier) { + const newOpts = createOptions(this._editor.getConfiguration().multicursorModifier); + if (this._opts.equals(newOpts)) { + return; + } + this._opts = newOpts; + this.lastMouseMoveEvent = null; + this.hasTriggerKeyOnMouseDown = false; + this._onCancel.fire(); + } + })); this._register(this._editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(new ClickLinkMouseEvent(e, this._opts)))); this._register(this._editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(new ClickLinkMouseEvent(e, this._opts)))); this._register(this._editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(new ClickLinkMouseEvent(e, this._opts)))); diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts index e063801f2d93d..a29f1511b44ca 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts @@ -10,8 +10,6 @@ import * as nls from 'vs/nls'; import { Throttler } from 'vs/base/common/async'; import { onUnexpectedError } from 'vs/base/common/errors'; import { MarkedString } from 'vs/base/common/htmlContent'; -import { KeyCode } from 'vs/base/common/keyCodes'; -import * as platform from 'vs/base/common/platform'; import { TPromise } from 'vs/base/common/winjs.base'; import { IModeService } from 'vs/editor/common/services/modeService'; import { Range } from 'vs/editor/common/core/range'; @@ -26,15 +24,12 @@ import { registerThemingParticipant } from 'vs/platform/theme/common/themeServic import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { EditorState, CodeEditorStateFlag } from 'vs/editor/common/core/editorState'; import { DefinitionAction, DefinitionActionConfig } from './goToDeclarationCommands'; -import { ClickLinkGesture, ClickLinkOptions, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; +import { ClickLinkGesture, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; @editorContribution class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorContribution { private static ID = 'editor.contrib.gotodefinitionwithmouse'; - static TRIGGER_MODIFIER: 'metaKey' | 'ctrlKey' = platform.isMacintosh ? 'metaKey' : 'ctrlKey'; - static TRIGGER_SIDEBYSIDE_KEY_VALUE = KeyCode.Alt; - static TRIGGER_KEY_VALUE = platform.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl; static MAX_SOURCE_PREVIEW_LINES = 8; private editor: ICodeEditor; @@ -53,11 +48,7 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC this.editor = editor; this.throttler = new Throttler(); - let linkGesture = new ClickLinkGesture(editor, new ClickLinkOptions( - GotoDefinitionWithMouseEditorContribution.TRIGGER_KEY_VALUE, - GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER, - GotoDefinitionWithMouseEditorContribution.TRIGGER_SIDEBYSIDE_KEY_VALUE - )); + let linkGesture = new ClickLinkGesture(editor); this.toUnhook.push(linkGesture); this.toUnhook.push(linkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => { diff --git a/src/vs/editor/contrib/hover/browser/hover.ts b/src/vs/editor/contrib/hover/browser/hover.ts index 7660cff426eb1..b0229e73f1b1c 100644 --- a/src/vs/editor/contrib/hover/browser/hover.ts +++ b/src/vs/editor/contrib/hover/browser/hover.ts @@ -112,8 +112,7 @@ export class ModesHoverController implements editorCommon.IEditorContribution { } private _onKeyDown(e: IKeyboardEvent): void { - var stopKey = platform.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl; - if (e.keyCode !== stopKey) { + if (e.keyCode !== KeyCode.Ctrl && e.keyCode !== KeyCode.Alt && e.keyCode !== KeyCode.Meta) { // Do not hide hover when Ctrl/Meta is pressed this._hideWidgets(); } diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index c14eaf2d911e7..58808a66a34e6 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -8,7 +8,6 @@ import 'vs/css!./links'; import * as nls from 'vs/nls'; import { onUnexpectedError } from 'vs/base/common/errors'; -import { KeyCode } from 'vs/base/common/keyCodes'; import * as platform from 'vs/base/common/platform'; import Severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -26,7 +25,7 @@ import { registerThemingParticipant } from 'vs/platform/theme/common/themeServic import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { Position } from 'vs/editor/common/core/position'; import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; -import { ClickLinkGesture, ClickLinkOptions, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; +import { ClickLinkGesture, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; const HOVER_MESSAGE_GENERAL = ( platform.isMacintosh @@ -91,8 +90,6 @@ class LinkDetector implements editorCommon.IEditorContribution { } static RECOMPUTE_TIME = 1000; // ms - static TRIGGER_KEY_VALUE = platform.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl; - static TRIGGER_MODIFIER: 'metaKey' | 'ctrlKey' = platform.isMacintosh ? 'metaKey' : 'ctrlKey'; private editor: ICodeEditor; private listenersToRemove: IDisposable[]; @@ -116,11 +113,7 @@ class LinkDetector implements editorCommon.IEditorContribution { this.editorWorkerService = editorWorkerService; this.listenersToRemove = []; - let clickLinkGesture = new ClickLinkGesture(editor, new ClickLinkOptions( - LinkDetector.TRIGGER_KEY_VALUE, - LinkDetector.TRIGGER_MODIFIER, - KeyCode.Alt - )); + let clickLinkGesture = new ClickLinkGesture(editor); this.listenersToRemove.push(clickLinkGesture); this.listenersToRemove.push(clickLinkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => { this._onEditorMouseMove(mouseEvent, keyboardEvent); From 31aaf8757e04094421393e887a0ae5249b8c4cb1 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 25 May 2017 00:27:30 +0200 Subject: [PATCH 1031/2747] Show correct link hover when links open with Alt --- src/vs/editor/contrib/links/browser/links.ts | 67 +++++++++++++------- 1 file changed, 43 insertions(+), 24 deletions(-) diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index 58808a66a34e6..356f9bf6843b2 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -27,15 +27,40 @@ import { Position } from 'vs/editor/common/core/position'; import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; import { ClickLinkGesture, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; -const HOVER_MESSAGE_GENERAL = ( +const HOVER_MESSAGE_GENERAL_META = ( platform.isMacintosh ? nls.localize('links.navigate.mac', "Cmd + click to follow link") : nls.localize('links.navigate', "Ctrl + click to follow link") ); +const HOVER_MESSAGE_GENERAL_ALT = nls.localize('links.navigate.al', "Alt + click to follow link"); + +const decoration = { + meta: ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + inlineClassName: 'detected-link', + hoverMessage: HOVER_MESSAGE_GENERAL_META + }), + metaActive: ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + inlineClassName: 'detected-link-active', + hoverMessage: HOVER_MESSAGE_GENERAL_META + }), + alt: ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + inlineClassName: 'detected-link', + hoverMessage: HOVER_MESSAGE_GENERAL_ALT + }), + altActive: ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + inlineClassName: 'detected-link-active', + hoverMessage: HOVER_MESSAGE_GENERAL_ALT + }), +}; + class LinkOccurence { - public static decoration(link: Link): editorCommon.IModelDeltaDecoration { + public static decoration(link: Link, useMetaKey: boolean): editorCommon.IModelDeltaDecoration { return { range: { startLineNumber: link.range.startLineNumber, @@ -43,24 +68,15 @@ class LinkOccurence { endLineNumber: link.range.endLineNumber, endColumn: link.range.endColumn }, - options: LinkOccurence._getOptions(false) + options: LinkOccurence._getOptions(useMetaKey, false) }; } - private static _LINK_DECORATION = ModelDecorationOptions.register({ - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - inlineClassName: 'detected-link', - hoverMessage: HOVER_MESSAGE_GENERAL - }); - - private static _ACTIVE_LINK_DECORATION = ModelDecorationOptions.register({ - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - inlineClassName: 'detected-link-active', - hoverMessage: HOVER_MESSAGE_GENERAL - }); - - private static _getOptions(isActive: boolean): ModelDecorationOptions { - return (isActive ? this._ACTIVE_LINK_DECORATION : this._LINK_DECORATION); + private static _getOptions(useMetaKey: boolean, isActive: boolean): ModelDecorationOptions { + if (useMetaKey) { + return (isActive ? decoration.metaActive : decoration.meta); + } + return (isActive ? decoration.altActive : decoration.alt); } public decorationId: string; @@ -71,12 +87,12 @@ class LinkOccurence { this.decorationId = decorationId; } - public activate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor): void { - changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(true)); + public activate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor, useMetaKey: boolean): void { + changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(useMetaKey, true)); } - public deactivate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor): void { - changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(false)); + public deactivate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor, useMetaKey: boolean): void { + changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(useMetaKey, false)); } } @@ -183,6 +199,7 @@ class LinkDetector implements editorCommon.IEditorContribution { } private updateDecorations(links: Link[]): void { + const useMetaKey = (this.editor.getConfiguration().multicursorModifier === 'altKey'); this.editor.changeDecorations((changeAccessor: editorCommon.IModelDecorationsChangeAccessor) => { var oldDecorations: string[] = []; let keys = Object.keys(this.currentOccurences); @@ -196,7 +213,7 @@ class LinkDetector implements editorCommon.IEditorContribution { if (links) { // Not sure why this is sometimes null for (var i = 0; i < links.length; i++) { - newDecorations.push(LinkOccurence.decoration(links[i])); + newDecorations.push(LinkOccurence.decoration(links[i], useMetaKey)); } } @@ -212,12 +229,13 @@ class LinkDetector implements editorCommon.IEditorContribution { } private _onEditorMouseMove(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): void { + const useMetaKey = (this.editor.getConfiguration().multicursorModifier === 'altKey'); if (this.isEnabled(mouseEvent, withKey)) { this.cleanUpActiveLinkDecoration(); // always remove previous link decoration as their can only be one var occurence = this.getLinkOccurence(mouseEvent.target.position); if (occurence) { this.editor.changeDecorations((changeAccessor) => { - occurence.activate(changeAccessor); + occurence.activate(changeAccessor, useMetaKey); this.activeLinkDecorationId = occurence.decorationId; }); } @@ -227,11 +245,12 @@ class LinkDetector implements editorCommon.IEditorContribution { } private cleanUpActiveLinkDecoration(): void { + const useMetaKey = (this.editor.getConfiguration().multicursorModifier === 'altKey'); if (this.activeLinkDecorationId) { var occurence = this.currentOccurences[this.activeLinkDecorationId]; if (occurence) { this.editor.changeDecorations((changeAccessor) => { - occurence.deactivate(changeAccessor); + occurence.deactivate(changeAccessor, useMetaKey); }); } From 70c10c9172452809c88d2ccf7e8d713580457e31 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Wed, 24 May 2017 15:46:59 -0700 Subject: [PATCH 1032/2747] Fix #26634 - if a `./` include pattern contains glob characters, ignore the `./` --- .../search/browser/patternInputWidget.ts | 39 +++++++++++++------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/src/vs/workbench/parts/search/browser/patternInputWidget.ts b/src/vs/workbench/parts/search/browser/patternInputWidget.ts index 75bef0a6f438c..0657073ca2f31 100644 --- a/src/vs/workbench/parts/search/browser/patternInputWidget.ts +++ b/src/vs/workbench/parts/search/browser/patternInputWidget.ts @@ -110,8 +110,6 @@ export class PatternInputWidget extends Widget { return {}; } - const isSearchPath = segment => segment.match(/^\.\//); - let exprSegments: string[]; let searchPaths: string[]; if (isGlobPattern) { @@ -119,21 +117,17 @@ export class PatternInputWidget extends Widget { .map(s => s.trim()) .filter(s => !!s.length); - const groups = collections.groupBy(segments, - segment => isSearchPath(segment) ? 'searchPaths' : 'exprSegments'); - searchPaths = groups.searchPaths || []; - exprSegments = groups.exprSegments || []; + const groups = this.groupByPathsAndExprSegments(segments); + searchPaths = groups.searchPaths; + exprSegments = groups.exprSegments; } else { const segments = pattern.split(',') .map(s => strings.trim(s.trim(), '/')) .filter(s => !!s.length); - const groups = collections.groupBy(segments, - segment => isSearchPath(segment) ? 'searchPaths' : 'exprSegments'); - searchPaths = groups.searchPaths || []; - exprSegments = groups.exprSegments || []; - - exprSegments = exprSegments + const groups = this.groupByPathsAndExprSegments(segments); + searchPaths = groups.searchPaths; + exprSegments = groups.exprSegments .map(p => { if (p[0] === '.') { p = '*' + p; // convert ".js" to "*.js" @@ -147,6 +141,27 @@ export class PatternInputWidget extends Widget { return { expression, searchPaths }; } + private groupByPathsAndExprSegments(segments: string[]) { + const isSearchPath = segment => segment.match(/^\.\//); + + const groups = collections.groupBy(segments, + segment => isSearchPath(segment) ? 'searchPaths' : 'exprSegments'); + groups.searchPaths = groups.searchPaths || []; + groups.exprSegments = groups.exprSegments || []; + + // If a ./searchPath has a glob character, remove ./ and use it as an expression segment + groups.searchPaths = groups.searchPaths.filter(searchPath => { + if (searchPath.match(/[\*\{\}\(\)\[\]\?]/)) { + groups.exprSegments.push(strings.ltrim(searchPath, './')); + return false; + } + + return true; + }); + + return groups; + } + public select(): void { this.inputBox.select(); } From f95866f07eaf1cdea610479a11778ae82f69bf4b Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 24 May 2017 16:17:47 -0700 Subject: [PATCH 1033/2747] Fix #25783. Middle click pastes in Find Widget on Linux --- src/vs/base/browser/ui/findinput/findInput.ts | 5 +++++ src/vs/editor/contrib/find/browser/findWidget.ts | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/vs/base/browser/ui/findinput/findInput.ts b/src/vs/base/browser/ui/findinput/findInput.ts index 2d38be64dc965..2d44764697416 100644 --- a/src/vs/base/browser/ui/findinput/findInput.ts +++ b/src/vs/base/browser/ui/findinput/findInput.ts @@ -13,6 +13,7 @@ import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview import { Widget } from 'vs/base/browser/ui/widget'; import Event, { Emitter } from 'vs/base/common/event'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { IMouseEvent } from 'vs/base/browser/mouseEvent'; import { KeyCode } from 'vs/base/common/keyCodes'; import { CaseSensitiveCheckbox, WholeWordsCheckbox, RegexCheckbox } from 'vs/base/browser/ui/findinput/findInputCheckboxes'; import { Color } from 'vs/base/common/color'; @@ -69,6 +70,9 @@ export class FindInput extends Widget { private _onKeyDown = this._register(new Emitter()); public onKeyDown: Event = this._onKeyDown.event; + private _onMouseDown = this._register(new Emitter()); + public onMouseDown: Event = this._onMouseDown.event; + private _onInput = this._register(new Emitter()); public onInput: Event = this._onInput.event; @@ -113,6 +117,7 @@ export class FindInput extends Widget { this.onkeydown(this.inputBox.inputElement, (e) => this._onKeyDown.fire(e)); this.onkeyup(this.inputBox.inputElement, (e) => this._onKeyUp.fire(e)); this.oninput(this.inputBox.inputElement, (e) => this._onInput.fire()); + this.onmousedown(this.inputBox.inputElement, (e) => this._onMouseDown.fire(e)); } public enable(): void { diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index 78e442c699205..409caf8fb7372 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -9,9 +9,11 @@ import 'vs/css!./findWidget'; import * as nls from 'vs/nls'; import { onUnexpectedError } from 'vs/base/common/errors'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; +import * as platform from 'vs/base/common/platform'; import * as strings from 'vs/base/common/strings'; import * as dom from 'vs/base/browser/dom'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { IMouseEvent } from 'vs/base/browser/mouseEvent'; import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview'; import { FindInput, IFindInputStyles } from 'vs/base/browser/ui/findinput/findInput'; import { IMessage as InputBoxMessage, InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; @@ -514,6 +516,13 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._findInput.highlightFindOptions(); } + private _onFindInputMouseDown(e: IMouseEvent): void { + // on linux, middle key does pasting. + if (e.middleButton) { + e.stopPropagation(); + } + } + private _onFindInputKeyDown(e: IKeyboardEvent): void { if (e.equals(KeyCode.Enter)) { @@ -647,6 +656,9 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas } } })); + if (platform.isLinux) { + this._register(this._findInput.onMouseDown((e) => this._onFindInputMouseDown(e))); + } this._matchesCount = document.createElement('div'); this._matchesCount.className = 'matchesCount'; From a816b37865a85654fe2d7711836c1d1d7d0edf04 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 May 2017 20:03:13 -0700 Subject: [PATCH 1034/2747] Use 64-bit cmd as default external terminal Fixes #25195 --- src/vs/workbench/parts/execution/electron-browser/terminal.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/execution/electron-browser/terminal.ts b/src/vs/workbench/parts/execution/electron-browser/terminal.ts index 5027154e5ad6d..be37fdd4c3782 100644 --- a/src/vs/workbench/parts/execution/electron-browser/terminal.ts +++ b/src/vs/workbench/parts/execution/electron-browser/terminal.ts @@ -33,7 +33,7 @@ export const DEFAULT_TERMINAL_LINUX_READY = new TPromise(c => { export const DEFAULT_TERMINAL_OSX = 'Terminal.app'; -export const DEFAULT_TERMINAL_WINDOWS = '%COMSPEC%'; +export const DEFAULT_TERMINAL_WINDOWS = `${process.env.windir}\\${process.env.hasOwnProperty('PROCESSOR_ARCHITEW6432') ? 'Sysnative' : 'System32'}\\cmd.exe`; export interface ITerminalConfiguration { terminal: { From 755d45a10785bf5008f27e10a8d607c4443dbf0c Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 May 2017 20:04:00 -0700 Subject: [PATCH 1035/2747] Clean up termianl imports --- .../electron-browser/terminal.contribution.ts | 4 +- .../electron-browser/terminalActions.ts | 4 +- .../electron-browser/terminalColorRegistry.ts | 2 +- .../electron-browser/terminalInstance.ts | 46 +++++++++---------- .../electron-browser/terminalPanel.ts | 26 +++++------ 5 files changed, 41 insertions(+), 41 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index 6becf5badb013..c4e3fc0147185 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -7,9 +7,10 @@ import 'vs/css!./media/scrollbar'; import 'vs/css!./media/terminal'; import 'vs/css!./media/xterm'; import 'vs/css!./media/widgets'; +import * as debugActions from 'vs/workbench/parts/debug/browser/debugActions'; +import * as nls from 'vs/nls'; import * as panel from 'vs/workbench/browser/panel'; import * as platform from 'vs/base/common/platform'; -import nls = require('vs/nls'); import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; import { GlobalQuickOpenAction } from 'vs/workbench/browser/parts/quickopen/quickopen.contribution'; import { ITerminalService, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, TERMINAL_PANEL_ID, TERMINAL_DEFAULT_RIGHT_CLICK_COPY_PASTE, TerminalCursorStyle } from 'vs/workbench/parts/terminal/common/terminal'; @@ -24,7 +25,6 @@ import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { TerminalService } from 'vs/workbench/parts/terminal/electron-browser/terminalService'; import { ToggleTabFocusModeAction } from 'vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import debugActions = require('vs/workbench/parts/debug/browser/debugActions'); import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { OpenNextRecentlyUsedEditorInGroupAction, OpenPreviousRecentlyUsedEditorInGroupAction, FocusActiveGroupAction, FocusFirstGroupAction, FocusSecondGroupAction, FocusThirdGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; import { EDITOR_FONT_DEFAULTS } from "vs/editor/common/config/editorOptions"; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts index 58cd361fd3420..3b62f9642edb8 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import nls = require('vs/nls'); -import os = require('os'); +import * as nls from 'vs/nls'; +import * as os from 'os'; import { Action, IAction } from 'vs/base/common/actions'; import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts index 727078be3bcd9..27f3f23c8ba71 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import nls = require('vs/nls'); +import * as nls from 'vs/nls'; import { registerColor, ColorIdentifier } from 'vs/platform/theme/common/colorRegistry'; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 07f8b6b53cb4a..8d7d30b7099f5 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import * as cp from 'child_process'; +import * as os from 'os'; import * as path from 'path'; -import DOM = require('vs/base/browser/dom'); +import * as lifecycle from 'vs/base/common/lifecycle'; +import * as nls from 'vs/nls'; +import * as platform from 'vs/base/common/platform'; +import * as dom from 'vs/base/browser/dom'; import Event, { Emitter } from 'vs/base/common/event'; -import URI from 'vs/base/common/uri'; -import cp = require('child_process'); -import lifecycle = require('vs/base/common/lifecycle'); -import nls = require('vs/nls'); -import os = require('os'); -import platform = require('vs/base/common/platform'); +import Uri from 'vs/base/common/uri'; import xterm = require('xterm'); import { Dimension } from 'vs/base/browser/builder'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; @@ -39,7 +39,7 @@ class StandardTerminalProcessFactory implements ITerminalProcessFactory { public create(env: { [key: string]: string }): cp.ChildProcess { return cp.fork('./terminalProcess', [], { env, - cwd: URI.parse(path.dirname(require.toUrl('./terminalProcess'))).fsPath + cwd: Uri.parse(path.dirname(require.toUrl('./terminalProcess'))).fsPath }); } } @@ -217,7 +217,7 @@ export class TerminalInstance implements ITerminalInstance { this._container = container; this._wrapperElement = document.createElement('div'); - DOM.addClass(this._wrapperElement, 'terminal-wrapper'); + dom.addClass(this._wrapperElement, 'terminal-wrapper'); this._xtermElement = document.createElement('div'); this._xterm.open(this._xtermElement, false); @@ -242,7 +242,7 @@ export class TerminalInstance implements ITerminalInstance { } return undefined; }); - this._instanceDisposables.push(DOM.addDisposableListener(this._xterm.element, 'mouseup', (event: KeyboardEvent) => { + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'mouseup', (event: KeyboardEvent) => { // Wait until mouseup has propogated through the DOM before evaluating the new selection // state. setTimeout(() => { @@ -251,7 +251,7 @@ export class TerminalInstance implements ITerminalInstance { })); // xterm.js currently drops selection on keyup as we need to handle this case. - this._instanceDisposables.push(DOM.addDisposableListener(this._xterm.element, 'keyup', (event: KeyboardEvent) => { + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'keyup', (event: KeyboardEvent) => { // Wait until keyup has propogated through the DOM before evaluating the new selection // state. setTimeout(() => { @@ -262,10 +262,10 @@ export class TerminalInstance implements ITerminalInstance { const xtermHelper: HTMLElement = this._xterm.element.querySelector('.xterm-helpers'); const focusTrap: HTMLElement = document.createElement('div'); focusTrap.setAttribute('tabindex', '0'); - DOM.addClass(focusTrap, 'focus-trap'); - this._instanceDisposables.push(DOM.addDisposableListener(focusTrap, 'focus', (event: FocusEvent) => { + dom.addClass(focusTrap, 'focus-trap'); + this._instanceDisposables.push(dom.addDisposableListener(focusTrap, 'focus', (event: FocusEvent) => { let currentElement = focusTrap; - while (!DOM.hasClass(currentElement, 'part')) { + while (!dom.hasClass(currentElement, 'part')) { currentElement = currentElement.parentElement; } const hidePanelElement = currentElement.querySelector('.hide-panel-action'); @@ -273,17 +273,17 @@ export class TerminalInstance implements ITerminalInstance { })); xtermHelper.insertBefore(focusTrap, this._xterm.textarea); - this._instanceDisposables.push(DOM.addDisposableListener(this._xterm.textarea, 'focus', (event: KeyboardEvent) => { + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.textarea, 'focus', (event: KeyboardEvent) => { this._terminalFocusContextKey.set(true); })); - this._instanceDisposables.push(DOM.addDisposableListener(this._xterm.textarea, 'blur', (event: KeyboardEvent) => { + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.textarea, 'blur', (event: KeyboardEvent) => { this._terminalFocusContextKey.reset(); this._refreshSelectionContextKey(); })); - this._instanceDisposables.push(DOM.addDisposableListener(this._xterm.element, 'focus', (event: KeyboardEvent) => { + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'focus', (event: KeyboardEvent) => { this._terminalFocusContextKey.set(true); })); - this._instanceDisposables.push(DOM.addDisposableListener(this._xterm.element, 'blur', (event: KeyboardEvent) => { + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'blur', (event: KeyboardEvent) => { this._terminalFocusContextKey.reset(); this._refreshSelectionContextKey(); })); @@ -336,7 +336,7 @@ export class TerminalInstance implements ITerminalInstance { this._linkHandler.dispose(); } if (this._xterm && this._xterm.element) { - this._hadFocusOnExit = DOM.hasClass(this._xterm.element, 'focus'); + this._hadFocusOnExit = dom.hasClass(this._xterm.element, 'focus'); } if (this._wrapperElement) { this._container.removeChild(this._wrapperElement); @@ -389,7 +389,7 @@ export class TerminalInstance implements ITerminalInstance { public setVisible(visible: boolean): void { this._isVisible = visible; if (this._wrapperElement) { - DOM.toggleClass(this._wrapperElement, 'active', visible); + dom.toggleClass(this._wrapperElement, 'active', visible); } if (visible && this._xterm) { // Trigger a manual scroll event which will sync the viewport and scroll bar. This is @@ -473,9 +473,9 @@ export class TerminalInstance implements ITerminalInstance { } const env = TerminalInstance.createTerminalEnv(process.env, shell, this._getCwd(shell, workspace), locale, this._cols, this._rows); this._title = shell.name || ''; - this._process = cp.fork(URI.parse(require.toUrl('bootstrap')).fsPath, ['--type=terminal'], { + this._process = cp.fork(Uri.parse(require.toUrl('bootstrap')).fsPath, ['--type=terminal'], { env, - cwd: URI.parse(path.dirname(require.toUrl('../node/terminalProcess'))).fsPath + cwd: Uri.parse(path.dirname(require.toUrl('../node/terminalProcess'))).fsPath }); if (!shell.name) { // Only listen for process title changes when a name is not provided @@ -559,7 +559,7 @@ export class TerminalInstance implements ITerminalInstance { } private _attachPressAnyKeyToCloseListener() { - this._processDisposables.push(DOM.addDisposableListener(this._xterm.textarea, 'keypress', (event: KeyboardEvent) => { + this._processDisposables.push(dom.addDisposableListener(this._xterm.textarea, 'keypress', (event: KeyboardEvent) => { this.dispose(); event.preventDefault(); })); diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 81ed253bd4224..ec880bdd12c23 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import DOM = require('vs/base/browser/dom'); -import nls = require('vs/nls'); -import platform = require('vs/base/common/platform'); +import * as dom from 'vs/base/browser/dom'; +import * as nls from 'vs/nls'; +import * as platform from 'vs/base/common/platform'; import { Action, IAction } from 'vs/base/common/actions'; import { Builder, Dimension } from 'vs/base/browser/builder'; import { IActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; @@ -51,12 +51,12 @@ export class TerminalPanel extends Panel { public create(parent: Builder): TPromise { super.create(parent); this._parentDomElement = parent.getHTMLElement(); - DOM.addClass(this._parentDomElement, 'integrated-terminal'); + dom.addClass(this._parentDomElement, 'integrated-terminal'); this._themeStyleElement = document.createElement('style'); this._fontStyleElement = document.createElement('style'); this._terminalContainer = document.createElement('div'); - DOM.addClass(this._terminalContainer, 'terminal-outer-container'); + dom.addClass(this._terminalContainer, 'terminal-outer-container'); this._parentDomElement.appendChild(this._themeStyleElement); this._parentDomElement.appendChild(this._fontStyleElement); this._parentDomElement.appendChild(this._terminalContainer); @@ -152,7 +152,7 @@ export class TerminalPanel extends Panel { } private _attachEventListeners(): void { - this._register(DOM.addDisposableListener(this._parentDomElement, 'mousedown', (event: MouseEvent) => { + this._register(dom.addDisposableListener(this._parentDomElement, 'mousedown', (event: MouseEvent) => { if (this._terminalService.terminalInstances.length === 0) { return; } @@ -183,7 +183,7 @@ export class TerminalPanel extends Panel { } } })); - this._register(DOM.addDisposableListener(this._parentDomElement, 'contextmenu', (event: MouseEvent) => { + this._register(dom.addDisposableListener(this._parentDomElement, 'contextmenu', (event: MouseEvent) => { if (!this._cancelContextMenu) { const standardEvent = new StandardMouseEvent(event); let anchor: { x: number, y: number } = { x: standardEvent.posx, y: standardEvent.posy }; @@ -196,7 +196,7 @@ export class TerminalPanel extends Panel { } this._cancelContextMenu = false; })); - this._register(DOM.addDisposableListener(this._parentDomElement, 'click', (event) => { + this._register(dom.addDisposableListener(this._parentDomElement, 'click', (event) => { if (this._terminalService.terminalInstances.length === 0) { return; } @@ -205,14 +205,14 @@ export class TerminalPanel extends Panel { this._terminalService.getActiveInstance().focus(); } })); - this._register(DOM.addDisposableListener(this._parentDomElement, 'keyup', (event: KeyboardEvent) => { + this._register(dom.addDisposableListener(this._parentDomElement, 'keyup', (event: KeyboardEvent) => { if (event.keyCode === 27) { // Keep terminal open on escape event.stopPropagation(); } })); - this._register(DOM.addDisposableListener(this._parentDomElement, DOM.EventType.DROP, (e: DragEvent) => { - if (e.target === this._parentDomElement || DOM.isAncestor(e.target as HTMLElement, this._parentDomElement)) { + this._register(dom.addDisposableListener(this._parentDomElement, dom.EventType.DROP, (e: DragEvent) => { + if (e.target === this._parentDomElement || dom.isAncestor(e.target as HTMLElement, this._parentDomElement)) { if (!e.dataTransfer) { return; } @@ -269,8 +269,8 @@ export class TerminalPanel extends Panel { return; } let newFont = this._terminalService.configHelper.getFont(); - DOM.toggleClass(this._parentDomElement, 'enable-ligatures', this._terminalService.configHelper.config.fontLigatures); - DOM.toggleClass(this._parentDomElement, 'disable-bold', !this._terminalService.configHelper.config.enableBold); + dom.toggleClass(this._parentDomElement, 'enable-ligatures', this._terminalService.configHelper.config.fontLigatures); + dom.toggleClass(this._parentDomElement, 'disable-bold', !this._terminalService.configHelper.config.enableBold); if (!this._font || this._fontsDiffer(this._font, newFont)) { this._fontStyleElement.innerHTML = '.monaco-workbench .panel.integrated-terminal .xterm {' + `font-family: ${newFont.fontFamily};` + From 17f0dc9aad1213b46d00fea41e1fe1e68f7ab838 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 24 May 2017 22:33:35 -0700 Subject: [PATCH 1036/2747] Reverting prev fix as it adds gap between docs and list --- .../editor/contrib/suggest/browser/media/suggest.css | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index 08b4e45593d89..fe64def759b94 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -34,18 +34,12 @@ .monaco-editor .suggest-widget.docs-side > .tree, .monaco-editor .suggest-widget.docs-side > .details { - /* subtract 2px for border, and another 2 for the Chromium zoom issue - where the children get slightly bigger width than what is set - which makes the docs go below the list */ - width: calc(50% - 4px); + width: 328px; } .monaco-editor.hc-black .suggest-widget.docs-side > .tree, .monaco-editor.hc-black .suggest-widget.docs-side > .details { - /* subtract 4px for border, and another 2 for the Chromium zoom issue - where the children get slightly bigger width than what is set - which makes the docs go below the list */ - width: calc(50% - 6px); + width: 326px; } /* Styles for Message element for when widget is loading or is empty */ From 9c6dd374824a40b8425835e813b9b16b598b2945 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 24 May 2017 22:48:10 -0700 Subject: [PATCH 1037/2747] Fixes #26244 prevent double border --- .../contrib/suggest/browser/media/suggest.css | 30 +++++++++---- .../contrib/suggest/browser/suggestWidget.ts | 42 +++++++++++++++---- 2 files changed, 58 insertions(+), 14 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index fe64def759b94..7ca54b83969b6 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -34,7 +34,17 @@ .monaco-editor .suggest-widget.docs-side > .tree, .monaco-editor .suggest-widget.docs-side > .details { - width: 328px; + /* subtract 2px for border, and another 2 for the Chromium zoom issue + where the children get slightly bigger width than what is set + which makes the docs go below the list */ + width: calc(50% - 4px); + float: left; + +} + +.monaco-editor .suggest-widget.docs-side.list-right > .tree, +.monaco-editor .suggest-widget.docs-side.list-right > .details { + float: right; } .monaco-editor.hc-black .suggest-widget.docs-side > .tree, @@ -42,6 +52,14 @@ width: 326px; } +.monaco-editor .suggest-widget.docs-side .empty-left-border { + border-left-width: 0px; +} + +.monaco-editor .suggest-widget.docs-side .empty-right-border { + border-right-width: 0px; +} + /* Styles for Message element for when widget is loading or is empty */ .monaco-editor .suggest-widget > .message { padding-left: 22px; @@ -58,13 +76,7 @@ height: 100%; } -.monaco-editor .suggest-widget.docs-side > .tree { - float: left; -} -.monaco-editor .suggest-widget.docs-side.list-right > .tree { - float: right -} /** Styles for each row in the list element **/ @@ -207,6 +219,10 @@ display: none; } +.monaco-editor .suggest-widget.docs-below .details { + border-top-width: 0px; +} + .monaco-editor .suggest-widget .details > .monaco-scrollable-element { flex: 1; } diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 56871ef950444..c27e0dbaa9505 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -948,14 +948,42 @@ export class SuggestWidget implements IContentWidget, IDelegate } private adjustListPosition(): void { - if (hasClass(this.element, 'widget-above') - && hasClass(this.element, 'docs-side') - && this.details.element.offsetHeight > this.listElement.offsetHeight) { - // Docs is bigger than list and widget is above cursor, apply margin-top so that list appears right above cursor - this.listElement.style.marginTop = `${this.details.element.offsetHeight - this.listElement.offsetHeight}px`; - } else { - this.listElement.style.marginTop = '0px'; + + + if (hasClass(this.element, 'docs-side')) { + + if (this.details.element.offsetHeight > this.listElement.offsetHeight) { + if (hasClass(this.element, 'widget-above')) { + // Docs is bigger than list and widget is above cursor, apply margin-top so that list appears right above cursor + this.listElement.style.marginTop = `${this.details.element.offsetHeight - this.listElement.offsetHeight}px`; + } + + if (hasClass(this.element, 'list-right')) { + addClass(this.listElement, 'empty-left-border'); + removeClass(this.listElement, 'empty-right-border'); + } else { + addClass(this.listElement, 'empty-right-border'); + removeClass(this.listElement, 'empty-left-border'); + } + + removeClass(this.details.element, 'empty-left-border'); + removeClass(this.details.element, 'empty-right-border'); + return; + } else { + if (hasClass(this.element, 'list-right')) { + addClass(this.details.element, 'empty-right-border'); + removeClass(this.details.element, 'empty-left-border'); + } else { + addClass(this.details.element, 'empty-left-border'); + removeClass(this.details.element, 'empty-right-border'); + } + + removeClass(this.listElement, 'empty-right-border'); + removeClass(this.listElement, 'empty-left-border'); + } } + + this.listElement.style.marginTop = '0px'; } private renderDetails(): void { From 2e08585bac59ee3e721803e6234e7e0e7623d5c8 Mon Sep 17 00:00:00 2001 From: Daniel Ye Date: Wed, 24 May 2017 22:56:48 -0700 Subject: [PATCH 1038/2747] 2017-05-24. Merged in translations from transifex. --- build/win32/i18n/messages.pt-br.isl | 8 + .../out/settingsDocumentHelper.i18n.json | 2 +- i18n/chs/extensions/gulp/out/main.i18n.json | 2 +- i18n/chs/extensions/jake/out/main.i18n.json | 4 +- i18n/chs/extensions/jake/package.i18n.json | 4 +- .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/chs/extensions/npm/package.i18n.json | 6 + .../resourceviewer/resourceViewer.i18n.json | 2 - .../src/vs/code/electron-main/menus.i18n.json | 4 +- .../config/commonEditorConfig.i18n.json | 6 +- .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../indentation/common/indentation.i18n.json | 2 +- .../suggest/browser/suggestWidget.i18n.json | 2 +- .../common/configurationRegistry.i18n.json | 2 +- .../markers/common/problemMatcher.i18n.json | 7 + .../api/node/extHostTreeViews.i18n.json | 6 +- .../src/vs/workbench/common/theme.i18n.json | 1 + .../main.contribution.i18n.json | 1 + .../inspectKeybindings.i18n.json | 2 +- .../electron-browser/toggleWordWrap.i18n.json | 2 +- .../parts/debug/node/debugAdapter.i18n.json | 1 + .../actions/evaluateMath.i18n.json | 2 +- .../actions/incrementDecrement.i18n.json | 12 +- .../actions/removeTag.i18n.json | 2 +- .../actions/splitJoinTag.i18n.json | 2 +- .../actions/updateImageSize.i18n.json | 2 +- .../actions/updateTag.i18n.json | 6 +- .../actions/wrapWithAbbreviation.i18n.json | 2 +- .../emmet.contribution.i18n.json | 6 +- .../treeExplorer.contribution.i18n.json | 4 +- .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 1 - .../common/editors/fileEditorInput.i18n.json | 2 +- .../performance.contribution.i18n.json | 8 +- .../browser/keybindingsEditor.i18n.json | 4 +- .../browser/preferencesActions.i18n.json | 2 +- .../scm.contribution.i18n.json | 3 +- .../scm/electron-browser/scmMenus.i18n.json | 3 +- .../electron-browser/TMSnippets.i18n.json | 2 +- .../parts/tasks/browser/quickOpen.i18n.json | 4 +- .../terminalTaskSystem.i18n.json | 3 +- .../tasks/node/processTaskSystem.i18n.json | 3 +- .../electron-browser/watermark.i18n.json | 2 +- .../vs_code_welcome_page.i18n.json | 7 +- .../electron-browser/welcomePage.i18n.json | 14 ++ .../workbenchThemeService.i18n.json | 12 +- .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/cht/extensions/npm/package.i18n.json | 6 + .../resourceviewer/resourceViewer.i18n.json | 2 - .../src/vs/code/electron-main/menus.i18n.json | 1 + .../config/commonEditorConfig.i18n.json | 1 - .../common/view/editorColorRegistry.i18n.json | 3 + .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../api/node/extHostTreeViews.i18n.json | 4 +- .../src/vs/workbench/common/theme.i18n.json | 1 + .../main.contribution.i18n.json | 1 + .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 1 - .../performance.contribution.i18n.json | 6 +- .../scm.contribution.i18n.json | 1 + .../scm/electron-browser/scmMenus.i18n.json | 1 + .../parts/tasks/browser/quickOpen.i18n.json | 4 +- .../themes.contribution.i18n.json | 1 + .../vs_code_welcome_page.i18n.json | 3 + .../electron-browser/welcomePage.i18n.json | 13 +- .../walkThroughPart.i18n.json | 3 +- i18n/deu/extensions/git/out/main.i18n.json | 2 +- .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/deu/extensions/npm/package.i18n.json | 6 + .../resourceviewer/resourceViewer.i18n.json | 2 - .../config/commonEditorConfig.i18n.json | 1 - .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../main.contribution.i18n.json | 1 + .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 1 - .../performance.contribution.i18n.json | 6 +- .../electron-browser/welcomePage.i18n.json | 5 + i18n/esn/extensions/jake/out/main.i18n.json | 4 +- i18n/esn/extensions/jake/package.i18n.json | 4 +- .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/esn/extensions/npm/package.i18n.json | 6 + .../resourceviewer/resourceViewer.i18n.json | 2 - .../config/commonEditorConfig.i18n.json | 3 +- .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../suggest/browser/suggestWidget.i18n.json | 1 + ...guageConfigurationExtensionPoint.i18n.json | 6 +- .../markers/common/problemMatcher.i18n.json | 7 + .../theme/common/colorRegistry.i18n.json | 3 + .../api/node/extHostTreeViews.i18n.json | 6 +- .../src/vs/workbench/common/theme.i18n.json | 1 + .../main.contribution.i18n.json | 1 + .../parts/debug/node/debugAdapter.i18n.json | 1 + .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 1 - .../performance.contribution.i18n.json | 8 +- .../scm.contribution.i18n.json | 1 + .../scm/electron-browser/scmMenus.i18n.json | 1 + .../parts/tasks/browser/quickOpen.i18n.json | 4 +- .../terminalTaskSystem.i18n.json | 3 +- .../tasks/node/processTaskSystem.i18n.json | 3 +- .../vs_code_welcome_page.i18n.json | 5 + .../electron-browser/welcomePage.i18n.json | 14 ++ .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/fra/extensions/npm/package.i18n.json | 6 + .../resourceviewer/resourceViewer.i18n.json | 2 - .../config/commonEditorConfig.i18n.json | 1 - .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../main.contribution.i18n.json | 1 + .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 1 - .../performance.contribution.i18n.json | 6 +- .../electron-browser/welcomePage.i18n.json | 5 + .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/ita/extensions/npm/package.i18n.json | 6 + .../resourceviewer/resourceViewer.i18n.json | 2 - .../config/commonEditorConfig.i18n.json | 2 +- .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../markers/common/problemMatcher.i18n.json | 7 + .../main.contribution.i18n.json | 1 + .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 1 - .../performance.contribution.i18n.json | 6 +- .../electron-browser/welcomePage.i18n.json | 5 + i18n/jpn/extensions/jake/out/main.i18n.json | 4 +- i18n/jpn/extensions/jake/package.i18n.json | 4 +- .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/jpn/extensions/npm/package.i18n.json | 6 + .../extensions/typescript/package.i18n.json | 5 +- .../resourceviewer/resourceViewer.i18n.json | 2 - .../config/commonEditorConfig.i18n.json | 2 +- .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../suggest/browser/suggestWidget.i18n.json | 1 + ...guageConfigurationExtensionPoint.i18n.json | 1 + .../markers/common/problemMatcher.i18n.json | 7 + .../theme/common/colorRegistry.i18n.json | 1 + .../api/node/extHostTreeViews.i18n.json | 6 +- .../src/vs/workbench/common/theme.i18n.json | 1 + .../main.contribution.i18n.json | 1 + .../electronDebugActions.i18n.json | 1 + .../parts/debug/node/debugAdapter.i18n.json | 1 + .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 3 +- .../performance.contribution.i18n.json | 8 +- .../browser/preferencesRenderers.i18n.json | 1 + .../scm.contribution.i18n.json | 1 + .../scm/electron-browser/scmMenus.i18n.json | 1 + .../parts/tasks/browser/quickOpen.i18n.json | 4 +- .../tasks/browser/restartQuickOpen.i18n.json | 2 +- .../tasks/browser/taskQuickOpen.i18n.json | 2 +- .../terminalTaskSystem.i18n.json | 3 +- .../tasks/node/processTaskSystem.i18n.json | 3 +- .../terminalActions.i18n.json | 4 +- .../themes.contribution.i18n.json | 1 + .../vs_code_welcome_page.i18n.json | 7 + .../electron-browser/welcomePage.i18n.json | 18 +- .../configurationEditingService.i18n.json | 1 + .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/kor/extensions/npm/package.i18n.json | 6 + .../resourceviewer/resourceViewer.i18n.json | 2 - .../config/commonEditorConfig.i18n.json | 1 - .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../main.contribution.i18n.json | 1 + .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 1 - .../performance.contribution.i18n.json | 6 +- .../electron-browser/welcomePage.i18n.json | 5 + .../out/settingsDocumentHelper.i18n.json | 36 ++++ .../css/client/out/cssMain.i18n.json | 8 + i18n/ptb/extensions/css/package.i18n.json | 67 +++++++ .../out/packageDocumentHelper.i18n.json | 9 + .../extensions/git/out/askpass-main.i18n.json | 8 + .../ptb/extensions/git/out/commands.i18n.json | 43 +++++ i18n/ptb/extensions/git/out/main.i18n.json | 11 ++ i18n/ptb/extensions/git/out/model.i18n.json | 14 ++ .../extensions/git/out/scmProvider.i18n.json | 8 + .../extensions/git/out/statusbar.i18n.json | 11 ++ i18n/ptb/extensions/git/package.i18n.json | 48 +++++ i18n/ptb/extensions/grunt/out/main.i18n.json | 8 + i18n/ptb/extensions/grunt/package.i18n.json | 8 + i18n/ptb/extensions/gulp/out/main.i18n.json | 8 + i18n/ptb/extensions/gulp/package.i18n.json | 8 + .../html/client/out/htmlMain.i18n.json | 8 + i18n/ptb/extensions/html/package.i18n.json | 27 +++ i18n/ptb/extensions/jake/out/main.i18n.json | 8 + i18n/ptb/extensions/jake/package.i18n.json | 8 + .../features/bowerJSONContribution.i18n.json | 10 ++ .../packageJSONContribution.i18n.json | 13 ++ .../json/client/out/jsonMain.i18n.json | 8 + i18n/ptb/extensions/json/package.i18n.json | 15 ++ .../markdown/out/extension.i18n.json | 6 + .../out/previewContentProvider.i18n.json | 10 ++ .../markdown/out/security.i18n.json | 11 ++ .../ptb/extensions/markdown/package.i18n.json | 22 +++ .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/ptb/extensions/npm/package.i18n.json | 6 + .../out/features/validationProvider.i18n.json | 13 ++ i18n/ptb/extensions/php/package.i18n.json | 14 ++ .../out/features/bufferSyncSupport.i18n.json | 12 ++ .../features/completionItemProvider.i18n.json | 9 + ...rectiveCommentCompletionProvider.i18n.json | 10 ++ .../implementationsCodeLensProvider.i18n.json | 10 ++ .../jsDocCompletionProvider.i18n.json | 8 + .../referencesCodeLensProvider.i18n.json | 10 ++ .../typescript/out/typescriptMain.i18n.json | 15 ++ .../out/typescriptServiceClient.i18n.json | 24 +++ .../typescript/out/utils/logger.i18n.json | 8 + .../out/utils/projectStatus.i18n.json | 12 ++ .../out/utils/typingsStatus.i18n.json | 12 ++ .../extensions/typescript/package.i18n.json | 45 +++++ .../browser/ui/actionbar/actionbar.i18n.json | 8 + .../vs/base/browser/ui/aria/aria.i18n.json | 8 + .../browser/ui/findinput/findInput.i18n.json | 8 + .../findinput/findInputCheckboxes.i18n.json | 10 ++ .../browser/ui/inputbox/inputBox.i18n.json | 10 ++ .../resourceviewer/resourceViewer.i18n.json | 15 ++ .../base/browser/ui/toolbar/toolbar.i18n.json | 8 + .../src/vs/base/common/errorMessage.i18n.json | 18 ++ .../base/common/jsonErrorMessages.i18n.json | 16 ++ .../src/vs/base/common/processes.i18n.json | 11 ++ .../ptb/src/vs/base/common/severity.i18n.json | 10 ++ i18n/ptb/src/vs/base/node/processes.i18n.json | 8 + i18n/ptb/src/vs/base/node/zip.i18n.json | 8 + .../browser/quickOpenModel.i18n.json | 9 + .../browser/quickOpenWidget.i18n.json | 9 + .../parts/tree/browser/treeDefaults.i18n.json | 8 + .../src/vs/code/electron-main/menus.i18n.json | 164 ++++++++++++++++++ .../vs/code/electron-main/window.i18n.json | 8 + .../vs/code/electron-main/windows.i18n.json | 22 +++ .../src/vs/code/node/cliProcessMain.i18n.json | 17 ++ .../config/commonEditorConfig.i18n.json | 76 ++++++++ .../common/config/editorOptions.i18n.json | 8 + .../editor/common/controller/cursor.i18n.json | 8 + .../model/textModelWithTokens.i18n.json | 8 + .../common/modes/modesRegistry.i18n.json | 8 + .../editor/common/services/bulkEdit.i18n.json | 11 ++ .../common/services/modeServiceImpl.i18n.json | 16 ++ .../services/modelServiceImpl.i18n.json | 9 + .../common/view/editorColorRegistry.i18n.json | 20 +++ .../browser/accessibility.i18n.json | 15 ++ .../common/bracketMatching.i18n.json | 8 + .../common/caretOperations.i18n.json | 9 + .../common/transpose.i18n.json | 8 + .../clipboard/browser/clipboard.i18n.json | 11 ++ .../contrib/comment/common/comment.i18n.json | 11 ++ .../contextmenu/browser/contextmenu.i18n.json | 8 + .../contrib/find/browser/findWidget.i18n.json | 21 +++ .../find/common/findController.i18n.json | 19 ++ .../contrib/folding/browser/folding.i18n.json | 14 ++ .../format/browser/formatActions.i18n.json | 13 ++ .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../gotoError/browser/gotoError.i18n.json | 13 ++ .../contrib/hover/browser/hover.i18n.json | 8 + .../hover/browser/modesContentHover.i18n.json | 8 + .../common/inPlaceReplace.i18n.json | 9 + .../indentation/common/indentation.i18n.json | 15 ++ .../inspectTMScopes.i18n.json | 9 + .../common/linesOperations.i18n.json | 25 +++ .../contrib/links/browser/links.i18n.json | 12 ++ .../multicursor/common/multicursor.i18n.json | 10 ++ .../browser/parameterHints.i18n.json | 8 + .../browser/parameterHintsWidget.i18n.json | 8 + .../browser/quickFixCommands.i18n.json | 10 ++ .../browser/referenceSearch.i18n.json | 9 + .../browser/referencesController.i18n.json | 8 + .../browser/referencesModel.i18n.json | 14 ++ .../browser/referencesWidget.i18n.json | 27 +++ .../contrib/rename/browser/rename.i18n.json | 11 ++ .../rename/browser/renameInputField.i18n.json | 8 + .../smartSelect/common/smartSelect.i18n.json | 9 + .../browser/suggestController.i18n.json | 9 + .../suggest/browser/suggestWidget.i18n.json | 21 +++ .../common/toggleTabFocusMode.i18n.json | 8 + .../common/wordHighlighter.i18n.json | 9 + .../browser/peekViewWidget.i18n.json | 8 + .../textMate/TMSyntax.i18n.json | 14 ++ ...guageConfigurationExtensionPoint.i18n.json | 23 +++ .../editor/node/textMate/TMGrammars.i18n.json | 13 ++ .../browser/menuItemActionItem.i18n.json | 8 + .../menusExtensionPoint.i18n.json | 41 +++++ .../common/configurationRegistry.i18n.json | 19 ++ .../platform/environment/node/argv.i18n.json | 32 ++++ .../extensionEnablementService.i18n.json | 8 + .../common/extensionManagement.i18n.json | 9 + .../node/extensionGalleryService.i18n.json | 9 + .../node/extensionManagementService.i18n.json | 22 +++ .../common/abstractExtensionService.i18n.json | 11 ++ .../common/extensionsRegistry.i18n.json | 24 +++ .../node/extensionValidator.i18n.json | 24 +++ .../node/integrityServiceImpl.i18n.json | 11 ++ .../jsonValidationExtensionPoint.i18n.json | 15 ++ .../abstractKeybindingService.i18n.json | 9 + .../common/keybindingLabels.i18n.json | 16 ++ .../markers/common/problemMatcher.i18n.json | 61 +++++++ .../platform/message/common/message.i18n.json | 10 ++ .../platform/request/node/request.i18n.json | 11 ++ .../common/telemetryService.i18n.json | 9 + .../theme/common/colorRegistry.i18n.json | 78 +++++++++ .../mainThreadExtensionService.i18n.json | 9 + .../mainThreadMessageService.i18n.json | 10 ++ .../api/node/extHostDiagnostics.i18n.json | 8 + .../api/node/extHostTreeViews.i18n.json | 10 ++ .../browser/actions/configureLocale.i18n.json | 13 ++ .../browser/actions/fileActions.i18n.json | 9 + .../toggleActivityBarVisibility.i18n.json | 9 + .../actions/toggleEditorLayout.i18n.json | 11 ++ .../actions/toggleSidebarPosition.i18n.json | 9 + .../actions/toggleSidebarVisibility.i18n.json | 9 + .../toggleStatusbarVisibility.i18n.json | 9 + .../browser/actions/toggleZenMode.i18n.json | 9 + .../activitybar/activitybarActions.i18n.json | 14 ++ .../activitybar/activitybarPart.i18n.json | 9 + .../browser/parts/compositePart.i18n.json | 9 + .../parts/editor/binaryDiffEditor.i18n.json | 8 + .../parts/editor/binaryEditor.i18n.json | 8 + .../editor/editor.contribution.i18n.json | 16 ++ .../parts/editor/editorActions.i18n.json | 55 ++++++ .../parts/editor/editorCommands.i18n.json | 12 ++ .../browser/parts/editor/editorPart.i18n.json | 14 ++ .../parts/editor/editorPicker.i18n.json | 13 ++ .../parts/editor/editorStatus.i18n.json | 49 ++++++ .../parts/editor/tabsTitleControl.i18n.json | 8 + .../parts/editor/textDiffEditor.i18n.json | 16 ++ .../browser/parts/editor/textEditor.i18n.json | 8 + .../parts/editor/textResourceEditor.i18n.json | 12 ++ .../parts/editor/titleControl.i18n.json | 14 ++ .../parts/panel/panelActions.i18n.json | 15 ++ .../browser/parts/panel/panelPart.i18n.json | 8 + .../quickopen/quickOpenController.i18n.json | 17 ++ .../quickopen.contribution.i18n.json | 12 ++ .../parts/sidebar/sidebarPart.i18n.json | 9 + .../parts/statusbar/statusbarPart.i18n.json | 9 + .../parts/titlebar/titlebarPart.i18n.json | 9 + .../vs/workbench/browser/quickopen.i18n.json | 11 ++ .../vs/workbench/browser/viewlet.i18n.json | 9 + .../src/vs/workbench/common/theme.i18n.json | 44 +++++ .../electron-browser/actions.i18n.json | 41 +++++ .../electron-browser/commands.i18n.json | 8 + .../electron-browser/crashReporter.i18n.json | 9 + .../electron-browser/extensionHost.i18n.json | 11 ++ .../main.contribution.i18n.json | 62 +++++++ .../workbench/electron-browser/main.i18n.json | 9 + .../electron-browser/shell.i18n.json | 8 + .../electron-browser/window.i18n.json | 15 ++ .../node/extensionHostMain.i18n.json | 8 + .../workbench/node/extensionPoints.i18n.json | 11 ++ .../cli.contribution.i18n.json | 18 ++ .../inspectKeybindings.i18n.json | 8 + .../toggleRenderControlCharacter.i18n.json | 8 + .../toggleRenderWhitespace.i18n.json | 8 + .../electron-browser/toggleWordWrap.i18n.json | 11 ++ .../wordWrapMigration.i18n.json | 11 ++ .../debug/browser/breakpointWidget.i18n.json | 13 ++ .../debug/browser/debugActionItems.i18n.json | 9 + .../debug/browser/debugActions.i18n.json | 49 ++++++ .../browser/debugActionsWidget.i18n.json | 8 + .../browser/debugContentProvider.i18n.json | 8 + .../browser/debugEditorActions.i18n.json | 15 ++ .../browser/debugEditorModelManager.i18n.json | 11 ++ .../debug/browser/debugQuickOpen.i18n.json | 11 ++ .../debug/browser/exceptionWidget.i18n.json | 11 ++ .../debug/browser/linkDetector.i18n.json | 9 + .../parts/debug/common/debug.i18n.json | 8 + .../parts/debug/common/debugModel.i18n.json | 9 + .../parts/debug/common/debugSource.i18n.json | 8 + .../debug.contribution.i18n.json | 20 +++ .../electron-browser/debugCommands.i18n.json | 8 + .../debugConfigurationManager.i18n.json | 38 ++++ .../debugEditorContribution.i18n.json | 20 +++ .../electron-browser/debugHover.i18n.json | 8 + .../electron-browser/debugService.i18n.json | 25 +++ .../electron-browser/debugViewer.i18n.json | 28 +++ .../electron-browser/debugViews.i18n.json | 20 +++ .../electronDebugActions.i18n.json | 11 ++ .../rawDebugSession.i18n.json | 12 ++ .../debug/electron-browser/repl.i18n.json | 11 ++ .../electron-browser/replViewer.i18n.json | 12 ++ .../statusbarColorProvider.i18n.json | 8 + .../terminalSupport.i18n.json | 9 + .../parts/debug/node/debugAdapter.i18n.json | 20 +++ .../actions/showEmmetCommands.i18n.json | 8 + .../actions/balance.i18n.json | 9 + .../actions/editPoints.i18n.json | 9 + .../actions/evaluateMath.i18n.json | 8 + .../actions/expandAbbreviation.i18n.json | 8 + .../actions/incrementDecrement.i18n.json | 13 ++ .../actions/matchingPair.i18n.json | 8 + .../actions/mergeLines.i18n.json | 8 + .../actions/reflectCssValue.i18n.json | 8 + .../actions/removeTag.i18n.json | 8 + .../actions/selectItem.i18n.json | 9 + .../actions/splitJoinTag.i18n.json | 8 + .../actions/toggleComment.i18n.json | 8 + .../actions/updateImageSize.i18n.json | 8 + .../actions/updateTag.i18n.json | 10 ++ .../actions/wrapWithAbbreviation.i18n.json | 10 ++ .../emmet.contribution.i18n.json | 13 ++ .../terminal.contribution.i18n.json | 15 ++ .../terminalService.i18n.json | 12 ++ .../treeExplorer.contribution.i18n.json | 14 ++ .../browser/treeExplorerActions.i18n.json | 8 + .../browser/treeExplorerService.i18n.json | 8 + .../browser/views/treeExplorerView.i18n.json | 8 + .../browser/dependenciesViewer.i18n.json | 9 + .../browser/extensionEditor.i18n.json | 39 +++++ .../browser/extensionsActions.i18n.json | 55 ++++++ .../browser/extensionsQuickOpen.i18n.json | 10 ++ .../common/extensionsFileTemplate.i18n.json | 10 ++ .../common/extensionsInput.i18n.json | 8 + .../extensionTipsService.i18n.json | 16 ++ .../extensions.contribution.i18n.json | 15 ++ .../extensionsActions.i18n.json | 11 ++ .../extensionsUtils.i18n.json | 10 ++ .../extensionsViewlet.i18n.json | 15 ++ .../node/extensionsWorkbenchService.i18n.json | 17 ++ .../electron-browser/feedback.i18n.json | 25 +++ .../editors/binaryFileEditor.i18n.json | 8 + .../browser/editors/textFileEditor.i18n.json | 11 ++ .../fileActions.contribution.i18n.json | 11 ++ .../parts/files/browser/fileActions.i18n.json | 73 ++++++++ .../files/browser/fileCommands.i18n.json | 9 + .../browser/files.contribution.i18n.json | 40 +++++ .../files/browser/saveErrorHandler.i18n.json | 16 ++ .../files/browser/views/emptyView.i18n.json | 11 ++ .../browser/views/explorerView.i18n.json | 9 + .../browser/views/explorerViewer.i18n.json | 12 ++ .../browser/views/openEditorsView.i18n.json | 11 ++ .../browser/views/openEditorsViewer.i18n.json | 13 ++ .../files/common/dirtyFilesTracker.i18n.json | 8 + .../common/editors/fileEditorInput.i18n.json | 8 + .../html/browser/html.contribution.i18n.json | 8 + .../html/browser/htmlPreviewPart.i18n.json | 8 + .../parts/html/browser/webview.i18n.json | 8 + .../parts/markers/common/messages.i18n.json | 39 +++++ .../markersElectronContributions.i18n.json | 8 + .../nps.contribution.i18n.json | 11 ++ .../browser/output.contribution.i18n.json | 10 ++ .../output/browser/outputActions.i18n.json | 11 ++ .../output/browser/outputPanel.i18n.json | 9 + .../parts/output/common/output.i18n.json | 9 + .../performance.contribution.i18n.json | 15 ++ .../browser/keybindingWidgets.i18n.json | 9 + .../browser/keybindingsEditor.i18n.json | 35 ++++ .../keybindingsEditorContribution.i18n.json | 10 ++ .../preferences.contribution.i18n.json | 10 ++ .../browser/preferencesActions.i18n.json | 14 ++ .../browser/preferencesEditor.i18n.json | 15 ++ .../browser/preferencesRenderers.i18n.json | 13 ++ .../browser/preferencesService.i18n.json | 13 ++ .../browser/preferencesWidgets.i18n.json | 10 ++ .../common/keybindingsEditorModel.i18n.json | 11 ++ .../common/preferencesModels.i18n.json | 9 + .../browser/commandsHandler.i18n.json | 16 ++ .../browser/gotoLineHandler.i18n.json | 14 ++ .../browser/gotoSymbolHandler.i18n.json | 34 ++++ .../quickopen/browser/helpHandler.i18n.json | 10 ++ .../browser/quickopen.contribution.i18n.json | 14 ++ .../browser/viewPickerHandler.i18n.json | 15 ++ .../scm.contribution.i18n.json | 12 ++ .../electron-browser/scmActivity.i18n.json | 8 + .../scm/electron-browser/scmMenus.i18n.json | 9 + .../scm/electron-browser/scmViewlet.i18n.json | 10 ++ .../browser/openAnythingHandler.i18n.json | 9 + .../search/browser/openFileHandler.i18n.json | 9 + .../browser/openSymbolHandler.i18n.json | 11 ++ .../browser/patternInputWidget.i18n.json | 12 ++ .../search/browser/replaceService.i18n.json | 8 + .../browser/search.contribution.i18n.json | 22 +++ .../search/browser/searchActions.i18n.json | 21 +++ .../browser/searchResultsView.i18n.json | 12 ++ .../search/browser/searchViewlet.i18n.json | 50 ++++++ .../search/browser/searchWidget.i18n.json | 15 ++ .../electron-browser/TMSnippets.i18n.json | 13 ++ .../electron-browser/insertSnippet.i18n.json | 8 + .../snippets.contribution.i18n.json | 16 ++ .../snippetsService.i18n.json | 9 + .../electron-browser/tabCompletion.i18n.json | 8 + .../parts/tasks/browser/quickOpen.i18n.json | 10 ++ .../tasks/browser/restartQuickOpen.i18n.json | 10 ++ .../tasks/browser/taskQuickOpen.i18n.json | 10 ++ .../browser/terminateQuickOpen.i18n.json | 10 ++ .../tasks/common/taskConfiguration.i18n.json | 17 ++ .../tasks/common/taskTemplates.i18n.json | 13 ++ .../jsonSchemaCommon.i18n.json | 38 ++++ .../electron-browser/jsonSchema_v1.i18n.json | 12 ++ .../electron-browser/jsonSchema_v2.i18n.json | 14 ++ .../task.contribution.i18n.json | 47 +++++ .../terminalTaskSystem.i18n.json | 11 ++ .../node/processRunnerDetector.i18n.json | 15 ++ .../tasks/node/processTaskSystem.i18n.json | 12 ++ .../terminal.contribution.i18n.json | 30 ++++ .../terminalActions.i18n.json | 32 ++++ .../terminalColorRegistry.i18n.json | 10 ++ .../terminalConfigHelper.i18n.json | 10 ++ .../terminalInstance.i18n.json | 11 ++ .../terminalLinkHandler.i18n.json | 9 + .../electron-browser/terminalPanel.i18n.json | 11 ++ .../terminalService.i18n.json | 15 ++ .../themes.contribution.i18n.json | 19 ++ ...edWorkspaceSettings.contribution.i18n.json | 11 ++ .../releaseNotesInput.i18n.json | 8 + .../update.contribution.i18n.json | 10 ++ .../update/electron-browser/update.i18n.json | 19 ++ .../electron-browser/watermark.i18n.json | 24 +++ .../overlay/browser/welcomeOverlay.i18n.json | 17 ++ .../vs_code_welcome_page.i18n.json | 44 +++++ .../welcomePage.contribution.i18n.json | 10 ++ .../electron-browser/welcomePage.i18n.json | 31 ++++ .../editor/editorWalkThrough.i18n.json | 9 + .../walkThrough.contribution.i18n.json | 10 ++ .../walkThroughActions.i18n.json | 11 ++ .../walkThroughPart.i18n.json | 10 ++ .../configurationEditingService.i18n.json | 17 ++ .../editor/browser/editorService.i18n.json | 8 + .../electron-browser/fileService.i18n.json | 11 ++ .../services/files/node/fileService.i18n.json | 14 ++ .../common/keybindingEditing.i18n.json | 11 ++ .../keybindingService.i18n.json | 26 +++ .../message/browser/messageList.i18n.json | 14 ++ .../electron-browser/messageService.i18n.json | 9 + .../common/workbenchModeService.i18n.json | 16 ++ .../common/textFileEditorModel.i18n.json | 9 + .../textfile/common/textFileService.i18n.json | 8 + .../textFileService.i18n.json | 18 ++ .../themes/common/colorThemeSchema.i18n.json | 11 ++ .../common/fileIconThemeSchema.i18n.json | 37 ++++ .../electron-browser/colorThemeData.i18n.json | 13 ++ .../workbenchThemeService.i18n.json | 32 ++++ .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/rus/extensions/npm/package.i18n.json | 6 + .../resourceviewer/resourceViewer.i18n.json | 2 - .../src/vs/code/electron-main/menus.i18n.json | 2 + .../config/commonEditorConfig.i18n.json | 1 - .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../main.contribution.i18n.json | 1 + .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 1 - .../performance.contribution.i18n.json | 6 +- .../electron-browser/welcomePage.i18n.json | 5 + 587 files changed, 6511 insertions(+), 128 deletions(-) create mode 100644 build/win32/i18n/messages.pt-br.isl create mode 100644 i18n/chs/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/chs/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/chs/extensions/npm/package.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/cht/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/cht/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/cht/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/cht/extensions/npm/package.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/deu/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/deu/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/deu/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/deu/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/deu/extensions/npm/package.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/esn/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/esn/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/esn/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/esn/extensions/npm/package.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/fra/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/fra/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/fra/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/fra/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/fra/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/fra/extensions/npm/package.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/ita/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/ita/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/ita/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/ita/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/ita/extensions/npm/package.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/jpn/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/jpn/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/jpn/extensions/npm/package.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/kor/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/kor/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/kor/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/kor/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/kor/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/kor/extensions/npm/package.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json create mode 100644 i18n/ptb/extensions/css/client/out/cssMain.i18n.json create mode 100644 i18n/ptb/extensions/css/package.i18n.json create mode 100644 i18n/ptb/extensions/extension-editing/out/packageDocumentHelper.i18n.json create mode 100644 i18n/ptb/extensions/git/out/askpass-main.i18n.json create mode 100644 i18n/ptb/extensions/git/out/commands.i18n.json create mode 100644 i18n/ptb/extensions/git/out/main.i18n.json create mode 100644 i18n/ptb/extensions/git/out/model.i18n.json create mode 100644 i18n/ptb/extensions/git/out/scmProvider.i18n.json create mode 100644 i18n/ptb/extensions/git/out/statusbar.i18n.json create mode 100644 i18n/ptb/extensions/git/package.i18n.json create mode 100644 i18n/ptb/extensions/grunt/out/main.i18n.json create mode 100644 i18n/ptb/extensions/grunt/package.i18n.json create mode 100644 i18n/ptb/extensions/gulp/out/main.i18n.json create mode 100644 i18n/ptb/extensions/gulp/package.i18n.json create mode 100644 i18n/ptb/extensions/html/client/out/htmlMain.i18n.json create mode 100644 i18n/ptb/extensions/html/package.i18n.json create mode 100644 i18n/ptb/extensions/jake/out/main.i18n.json create mode 100644 i18n/ptb/extensions/jake/package.i18n.json create mode 100644 i18n/ptb/extensions/javascript/out/features/bowerJSONContribution.i18n.json create mode 100644 i18n/ptb/extensions/javascript/out/features/packageJSONContribution.i18n.json create mode 100644 i18n/ptb/extensions/json/client/out/jsonMain.i18n.json create mode 100644 i18n/ptb/extensions/json/package.i18n.json create mode 100644 i18n/ptb/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/ptb/extensions/markdown/out/previewContentProvider.i18n.json create mode 100644 i18n/ptb/extensions/markdown/out/security.i18n.json create mode 100644 i18n/ptb/extensions/markdown/package.i18n.json create mode 100644 i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/ptb/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/ptb/extensions/npm/package.i18n.json create mode 100644 i18n/ptb/extensions/php/out/features/validationProvider.i18n.json create mode 100644 i18n/ptb/extensions/php/package.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/features/bufferSyncSupport.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/features/completionItemProvider.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/typescriptMain.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/typescriptServiceClient.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/utils/logger.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/utils/projectStatus.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json create mode 100644 i18n/ptb/extensions/typescript/package.i18n.json create mode 100644 i18n/ptb/src/vs/base/browser/ui/actionbar/actionbar.i18n.json create mode 100644 i18n/ptb/src/vs/base/browser/ui/aria/aria.i18n.json create mode 100644 i18n/ptb/src/vs/base/browser/ui/findinput/findInput.i18n.json create mode 100644 i18n/ptb/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json create mode 100644 i18n/ptb/src/vs/base/browser/ui/inputbox/inputBox.i18n.json create mode 100644 i18n/ptb/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json create mode 100644 i18n/ptb/src/vs/base/browser/ui/toolbar/toolbar.i18n.json create mode 100644 i18n/ptb/src/vs/base/common/errorMessage.i18n.json create mode 100644 i18n/ptb/src/vs/base/common/jsonErrorMessages.i18n.json create mode 100644 i18n/ptb/src/vs/base/common/processes.i18n.json create mode 100644 i18n/ptb/src/vs/base/common/severity.i18n.json create mode 100644 i18n/ptb/src/vs/base/node/processes.i18n.json create mode 100644 i18n/ptb/src/vs/base/node/zip.i18n.json create mode 100644 i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json create mode 100644 i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json create mode 100644 i18n/ptb/src/vs/base/parts/tree/browser/treeDefaults.i18n.json create mode 100644 i18n/ptb/src/vs/code/electron-main/menus.i18n.json create mode 100644 i18n/ptb/src/vs/code/electron-main/window.i18n.json create mode 100644 i18n/ptb/src/vs/code/electron-main/windows.i18n.json create mode 100644 i18n/ptb/src/vs/code/node/cliProcessMain.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/config/editorOptions.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/controller/cursor.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/model/textModelWithTokens.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/modes/modesRegistry.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/services/bulkEdit.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/services/modeServiceImpl.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/services/modelServiceImpl.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/view/editorColorRegistry.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/comment/common/comment.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/find/browser/findWidget.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/find/common/findController.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/folding/browser/folding.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/format/browser/formatActions.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/hover/browser/hover.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/indentation/common/indentation.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/links/browser/links.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/rename/browser/rename.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json create mode 100644 i18n/ptb/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json create mode 100644 i18n/ptb/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json create mode 100644 i18n/ptb/src/vs/editor/node/textMate/TMGrammars.i18n.json create mode 100644 i18n/ptb/src/vs/platform/actions/browser/menuItemActionItem.i18n.json create mode 100644 i18n/ptb/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json create mode 100644 i18n/ptb/src/vs/platform/configuration/common/configurationRegistry.i18n.json create mode 100644 i18n/ptb/src/vs/platform/environment/node/argv.i18n.json create mode 100644 i18n/ptb/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json create mode 100644 i18n/ptb/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json create mode 100644 i18n/ptb/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json create mode 100644 i18n/ptb/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json create mode 100644 i18n/ptb/src/vs/platform/extensions/common/abstractExtensionService.i18n.json create mode 100644 i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json create mode 100644 i18n/ptb/src/vs/platform/extensions/node/extensionValidator.i18n.json create mode 100644 i18n/ptb/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json create mode 100644 i18n/ptb/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json create mode 100644 i18n/ptb/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json create mode 100644 i18n/ptb/src/vs/platform/keybinding/common/keybindingLabels.i18n.json create mode 100644 i18n/ptb/src/vs/platform/markers/common/problemMatcher.i18n.json create mode 100644 i18n/ptb/src/vs/platform/message/common/message.i18n.json create mode 100644 i18n/ptb/src/vs/platform/request/node/request.i18n.json create mode 100644 i18n/ptb/src/vs/platform/telemetry/common/telemetryService.i18n.json create mode 100644 i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/api/node/extHostDiagnostics.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/api/node/extHostTreeViews.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/actions/configureLocale.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/actions/fileActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/actions/toggleZenMode.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/compositePart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/editorPart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/textEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/titleControl.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/panel/panelActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/panel/panelPart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/viewlet.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/common/theme.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/electron-browser/commands.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/electron-browser/crashReporter.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/electron-browser/extensionHost.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/electron-browser/main.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/electron-browser/shell.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/electron-browser/window.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/node/extensionHostMain.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/node/extensionPoints.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/debugActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/common/debug.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/common/debugModel.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/common/debugSource.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/fileCommands.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/html/browser/html.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/html/browser/webview.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/markers/common/messages.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/output/browser/output.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/output/browser/outputActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/output/browser/outputPanel.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/output/common/output.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/replaceService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/search.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/searchActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/searchWidget.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/editor/browser/editorService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/files/electron-browser/fileService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/files/node/fileService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/message/browser/messageList.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/message/electron-browser/messageService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/textfile/common/textFileService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json create mode 100644 i18n/rus/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/rus/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/rus/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/rus/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/rus/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/rus/extensions/npm/package.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json diff --git a/build/win32/i18n/messages.pt-br.isl b/build/win32/i18n/messages.pt-br.isl new file mode 100644 index 0000000000000..7021e814e8f61 --- /dev/null +++ b/build/win32/i18n/messages.pt-br.isl @@ -0,0 +1,8 @@ +[CustomMessages] +AddContextMenuFiles=Adicione a a��o "Abrir com %1" ao menu de contexto de arquivo do Windows Explorer +AddContextMenuFolders=Adicione a a��o "Abrir com %1" ao menu de contexto de diret�rio do Windows Explorer +AssociateWithFiles=Registre %1 como um editor para tipos de arquivos suportados +AddToPath=Adicione em PATH (dispon�vel ap�s reiniciar) +RunAfter=Executar %1 ap�s a instala��o +Other=Outros: +SourceFile=Arquivo Fonte %1 \ No newline at end of file diff --git a/i18n/chs/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/chs/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json index 6ad910135a07c..f40aa81fa488b 100644 --- a/i18n/chs/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json +++ b/i18n/chs/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "activeEditorShort": "例如 myFile.txt", - "activeEditorMedium": "e.g. myFolder/myFile.txt", + "activeEditorMedium": "例如 myFolder/myFile.txt", "activeEditorLong": "例如 /Users/Development/myProject/myFolder/myFile.txt", "rootName": "例如 myProject", "rootPath": "例如 /Users/Development/myProject", diff --git a/i18n/chs/extensions/gulp/out/main.i18n.json b/i18n/chs/extensions/gulp/out/main.i18n.json index 500082cf82f27..bda8a250c2541 100644 --- a/i18n/chs/extensions/gulp/out/main.i18n.json +++ b/i18n/chs/extensions/gulp/out/main.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "execFailed": "自动检测 gulp 失败,错误为: {0}" + "execFailed": "自动检测 gulp 失败,错误:{0}" } \ No newline at end of file diff --git a/i18n/chs/extensions/jake/out/main.i18n.json b/i18n/chs/extensions/jake/out/main.i18n.json index 8b6ad71cd4e6d..d2f56bdda986c 100644 --- a/i18n/chs/extensions/jake/out/main.i18n.json +++ b/i18n/chs/extensions/jake/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "自动检测 Jake 失败,错误:{0}" +} \ No newline at end of file diff --git a/i18n/chs/extensions/jake/package.i18n.json b/i18n/chs/extensions/jake/package.i18n.json index 8b6ad71cd4e6d..46f020cf890fd 100644 --- a/i18n/chs/extensions/jake/package.i18n.json +++ b/i18n/chs/extensions/jake/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.jake.autoDetect": "控制自动检测 Jake 任务是否打开。默认开启。" +} \ No newline at end of file diff --git a/i18n/chs/extensions/markdown/out/extension.i18n.json b/i18n/chs/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/package.i18n.json b/i18n/chs/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/extensions/npm/package.i18n.json b/i18n/chs/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index 7b395b9c15a79..4e5bf82d935ab 100644 --- a/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "图像太大,无法在编辑器中显示。 ", - "resourceOpenExternalButton": "打开图片", - "resourceOpenExternalText": " 是否使用外部程序?", "nativeBinaryError": "文件将不在编辑器中显示,因为它是二进制文件、非常大或使用不支持的文本编码。", "sizeB": "{0} B", "sizeKB": "{0} KB", diff --git a/i18n/chs/src/vs/code/electron-main/menus.i18n.json b/i18n/chs/src/vs/code/electron-main/menus.i18n.json index 16b5dc1479aca..4f7e61e056c44 100644 --- a/i18n/chs/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/chs/src/vs/code/electron-main/menus.i18n.json @@ -146,7 +146,7 @@ "miInteractivePlayground": "交互式演练场(&&I)", "miDocumentation": "文档(&&D)", "miReleaseNotes": "发行说明(&&R)", - "miKeyboardShortcuts": "键盘快捷方式参考(&&K)", + "miKeyboardShortcuts": "快捷键参考(&&K)", "miIntroductoryVideos": "介绍性视频(&&V)", "miTwitter": "在 Twitter 上加入我们(&&J)", "miUserVoice": "搜索功能请求(&&S)", @@ -159,6 +159,6 @@ "miDownloadingUpdate": "正在下载更新...", "miInstallingUpdate": "正在安装更新...", "miCheckForUpdates": "检查更新...", - "aboutDetail": "\n版本 {0}\n提交 {1}\n日期 {2}\nShell {3}\n呈现器 {4}\nNode {5}", + "aboutDetail": "\n版本 {0}\n提交 {1}\n日期 {2}\nShell {3}\n渲染器 {4}\nNode {5}", "okButton": "确定" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json index ad55e59f4eb4f..5c4e0b1ea13b1 100644 --- a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -14,7 +14,7 @@ "rulers": "显示垂直标尺的列", "wordSeparators": "执行文字相关的导航或操作时将用作文字分隔符的字符", "tabSize": "一个制表符等于的空格数。该设置在 `editor.detectIndentation` 启用时根据文件内容进行重写。", - "tabSize.errorMessage": "应为 \\\\\"number\\\\\"。注意,值\\\\\"auto\\\\\"已由 \\\\\"editor.detectIndentation\\\\\" 设置替换。", + "tabSize.errorMessage": "应为“number”。注意,值“auto”已由“editor.detectIndentation”设置替换。", "insertSpaces": "按 \"Tab\" 时插入空格。该设置在 `editor.detectIndentation` 启用时根据文件内容进行重写。", "insertSpaces.errorMessage": "应为 \"boolean\"。注意,值 \"auto\" 已由 \"editor.detectIndentation\" 设置替换。", "detectIndentation": "当打开文件时,将基于文件内容检测 \"editor.tabSize\" 和 \"editor.insertSpaces\"。", @@ -29,7 +29,7 @@ "wordWrap.bounded": "将在最小视区和 \"editor.wordWrapColumn\" 处换行。", "wordWrap": "控制折行方式。可以选择: - “off” (禁用折行), - “on” (视区折行), - “wordWrapColumn”(在“editor.wordWrapColumn”处折行)或 - “bounded”(在视区与“editor.wordWrapColumn”两者的较小者处折行)。", "wordWrapColumn": "在 \"editor.wordWrap\" 为 \"wordWrapColumn\" 或 \"bounded\" 时控制编辑器列的换行。", - "wrappingIndent": "控制换行的行的缩进。可以是\\\\\"none\\\\\"、 \\\\\"same\\\\\" 或 \\\\\"indent\\\\\"。", + "wrappingIndent": "控制折行的缩进。可以是“none”、“same”或“indent”。", "mouseWheelScrollSensitivity": "要对鼠标滚轮滚动事件的 \"deltaX\" 和 \"deltaY\" 使用的乘数 ", "quickSuggestions.strings": "在字符串内启用快速建议。", "quickSuggestions.comments": "在注释内启用快速建议。", @@ -41,7 +41,6 @@ "formatOnType": "控制编辑器是否应在键入后自动设置行的格式", "formatOnPaste": "控制编辑器是否应自动设置粘贴内容的格式。格式化程序必须可用并且能设置文档中某一范围的格式。", "suggestOnTriggerCharacters": "控制键入触发器字符时是否应自动显示建议", - "acceptSuggestionOnEnter": "控制除了 \"Tab\" 键以外,是否还应在遇到 \"Enter\" 键时接受建议。帮助避免“插入新行”或“接受建议”之间出现歧义。", "acceptSuggestionOnCommitCharacter": "控制是否应在遇到提交字符时接受建议。例如,在 JavaScript 中,分号(\";\")可以为提交字符,可接受建议并键入该字符。", "snippetSuggestions": "控制是否将代码段与其他建议一起显示以及它们的排序方式。", "emptySelectionClipboard": "控制没有选择内容的复制是否复制当前行。", @@ -63,6 +62,7 @@ "renderLineHighlight": "控制编辑器应如何呈现当前行突出显示,可能为“无”、“装订线”、“线”和“全部”。", "codeLens": "控制编辑器是否显示代码滤镜", "folding": "控制编辑器是否启用代码折叠功能", + "showFoldingControls": "控制是否自动隐藏导航线上的折叠控件。", "matchBrackets": "当选择其中一项时,将突出显示匹配的括号。", "glyphMargin": "控制编辑器是否应呈现垂直字形边距。字形边距最常用于调试。", "useTabStops": "在制表位后插入和删除空格", diff --git a/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..e788771d2f25a --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "未找到“{0}”的任何定义", + "generic.noResults": "找不到定义", + "meta.title": " – {0} 定义", + "actions.goToDecl.label": "转到定义", + "actions.goToDeclToSide.label": "打开侧边的定义", + "actions.previewDecl.label": "查看定义", + "goToImplementation.noResultWord": "未找到“{0}”的实现", + "goToImplementation.generic.noResults": "未找到实现", + "meta.implementations.title": "– {0} 个实现", + "actions.goToImplementation.label": "转到实现", + "actions.peekImplementation.label": "速览实现", + "goToTypeDefinition.noResultWord": "未找到“{0}”的类型定义", + "goToTypeDefinition.generic.noResults": "未找到类型定义", + "meta.typeDefinitions.title": " – {0} 个类型定义", + "actions.goToTypeDefinition.label": "转到类型定义", + "actions.peekTypeDefinition.label": "快速查看类型定义" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..ab0b4761cf9a4 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "单击显示 {0} 个定义。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/indentation/common/indentation.i18n.json b/i18n/chs/src/vs/editor/contrib/indentation/common/indentation.i18n.json index 76fa4543d539d..5bd5906da321c 100644 --- a/i18n/chs/src/vs/editor/contrib/indentation/common/indentation.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/indentation/common/indentation.i18n.json @@ -8,7 +8,7 @@ "indentationToTabs": "将缩进转换为制表符", "configuredTabSize": "已配置制表符大小", "selectTabWidth": "选择当前文件的制表符大小", - "indentUsingTabs": "使用 \\\\\"Tab\\\\\" 缩进", + "indentUsingTabs": "使用“Tab”缩进", "indentUsingSpaces": "使用空格缩进", "detectIndentation": "检查内容中的缩进", "editor.reindentlines": "重新缩进行" diff --git a/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 4e1a0a30e42b6..ec34ba659f112 100644 --- a/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,7 +9,7 @@ "editorSuggestWidgetForeground": "建议小组件的前景颜色。", "editorSuggestWidgetSelectedBackground": "建议小组件中被选择条目的背景颜色。", "editorSuggestWidgetHighlightForeground": "建议小组件中匹配内容的高亮颜色。", - "readMore": "阅读更多...{0}", + "readMore": "阅读详细信息...{0}", "suggestionWithDetailsAriaLabel": "{0}(建议)具有详细信息", "suggestionAriaLabel": "{0},建议", "readLess": "阅读简略信息...{0}", diff --git a/i18n/chs/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/chs/src/vs/platform/configuration/common/configurationRegistry.i18n.json index ea616506b8e2c..781727fae4d8d 100644 --- a/i18n/chs/src/vs/platform/configuration/common/configurationRegistry.i18n.json +++ b/i18n/chs/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -10,7 +10,7 @@ "vscode.extension.contributes.configuration": "用于配置字符串。", "vscode.extension.contributes.configuration.title": "设置摘要。此标签将在设置文件中用作分隔注释。", "vscode.extension.contributes.configuration.properties": "配置属性的描述。", - "config.property.languageDefault": "无法注册“{0}”。这符合属性模式 \"\\\\[.*\\\\]$\",可用于描述特定语言编辑器设置。请使用 \"configurationDefaults\"。", + "config.property.languageDefault": "无法注册“{0}”。其符合描述特定语言编辑器设置的表达式 \"\\\\[.*\\\\]$\"。请使用 \"configurationDefaults\"。", "config.property.duplicate": "无法注册“{0}”。此属性已注册。", "invalid.properties": "configuration.properties 必须是对象", "invalid.type": "如果进行设置,\"configuration.type\" 必须设置为对象", diff --git a/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json index 7dc0d66e0aa6e..b9fc2ddbbdea4 100644 --- a/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,6 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "错误: 模式属性 {0} 是无效的模式变量名。", "ProblemMatcherParser.problemPattern.watchingMatcher": "问题匹配程序必须定义监视的开始模式和结束模式。", "ProblemMatcherParser.invalidRegexp": "错误: 字符串 {0} 不是有效的正则表达式。\n", + "WatchingPatternSchema.regexp": "用于检测后台任务开始或结束的正则表达式。", "WatchingPatternSchema.file": "文件名的匹配组索引。可以省略。", "PatternTypeSchema.name": "所提供或预定义模式的名称", "PatternTypeSchema.description": "问题模式或者所提供或预定义问题模式的名称。如果已指定基准,则可以省略。", @@ -42,6 +43,12 @@ "ProblemMatcherSchema.severity": "捕获问题的默认严重性。如果模式未定义严重性的匹配组,则使用。", "ProblemMatcherSchema.applyTo": "控制文本文档上报告的问题是否仅应用于打开、关闭或所有文档。", "ProblemMatcherSchema.fileLocation": "定义应如何解释问题模式中报告的文件名。", + "ProblemMatcherSchema.background": "用于跟踪在后台任务上激活的匹配程序的开始和结束的模式。", + "ProblemMatcherSchema.background.activeOnStart": "如果设置为 true,则会在任务开始时激活后台监控。这相当于发出与 beginPattern 匹配的行。", + "ProblemMatcherSchema.background.beginsPattern": "如果在输出内匹配,则会发出后台任务开始的信号。", + "ProblemMatcherSchema.background.endsPattern": "如果在输出内匹配,则会发出后台任务结束的信号。", + "ProblemMatcherSchema.watching.deprecated": "“watching”属性已被弃用。请改用“background”。", + "ProblemMatcherSchema.watching": "用于跟踪监视匹配程序开始和结束的模式。", "ProblemMatcherSchema.watching.activeOnStart": "如果设置为 true,则当任务开始时观察程序处于活动模式。这相当于发出与 beginPattern 匹配的行。", "ProblemMatcherSchema.watching.beginsPattern": "如果在输出内匹配,则在监视任务开始时会发出信号。", "ProblemMatcherSchema.watching.endsPattern": "如果在输出内匹配,则在监视任务结束时会发出信号。", diff --git a/i18n/chs/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/chs/src/vs/workbench/api/node/extHostTreeViews.i18n.json index 8b6ad71cd4e6d..7bfb0b886ded6 100644 --- a/i18n/chs/src/vs/workbench/api/node/extHostTreeViews.i18n.json +++ b/i18n/chs/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "treeView.notRegistered": "没有注册 ID 为“{0}”的树形图。", + "treeItem.notFound": "没有在树中找到 ID 为“{0}”的项目。", + "treeView.duplicateElement": "已注册元素 {0}。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/common/theme.i18n.json b/i18n/chs/src/vs/workbench/common/theme.i18n.json index 64c51b8e74c09..0f3e7eb1bf9de 100644 --- a/i18n/chs/src/vs/workbench/common/theme.i18n.json +++ b/i18n/chs/src/vs/workbench/common/theme.i18n.json @@ -32,6 +32,7 @@ "activityBarBadgeBackground": "活动通知徽章背景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "activityBarBadgeForeground": "活动通知徽章前景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "sideBarBackground": "侧边栏背景色。侧边栏是资源管理器和搜索等视图的容器。", + "sideBarForeground": "侧边栏前景色。侧边栏是资源管理器和搜索等视图的容器。", "sideBarTitleForeground": "侧边栏标题前景色。侧边栏是资源管理器和搜索等视图的容器。", "sideBarSectionHeaderBackground": "侧边栏节标题的背景颜色。侧边栏是资源管理器和搜索等视图的容器。", "titleBarActiveForeground": "窗口处于活动状态时的标题栏前景色。请注意,该颜色当前仅在 macOS 上受支持。", diff --git a/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json index 375f183373b09..6997449c1ce46 100644 --- a/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "查看", "help": "帮助", "file": "文件", + "developer": "开发者", "showEditorTabs": "控制打开的编辑器是否显示在选项卡中。", "editorTabCloseButton": "控制编辑器的选项卡关闭按钮的位置,或当设置为 \"off\" 时禁用关闭它们。", "showIcons": "控制打开的编辑器是否随图标一起显示。这还需启用图标主题。", diff --git a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index a188f9c1e90a0..b163a2de99e32 100644 --- a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbench.action.inspectKeyMap": "开发者:检查键映射" + "workbench.action.inspectKeyMap": "开发者: 检查键映射" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json index 8d541bedfe0b5..a7b3e519e7d33 100644 --- a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json @@ -6,6 +6,6 @@ { "toggle.wordwrap": "查看: 切换自动换行", "wordWrap.notInDiffEditor": "不能在差异编辑器中切换自动换行。", - "unwrapMinified": "为此文件禁用换行", + "unwrapMinified": "为此文件禁用折行", "wrapMinified": "为此文件启用换行" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index c322b5a660a56..54243f83ce323 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "调试适配器可执行的“{0}”不存在。", "debugAdapterCannotDetermineExecutable": "无法确定调试适配器“{0}”的可执行文件。", "debugType": "配置类型。", + "debugTypeNotRecognised": "无法识别此调试类型。确保已经安装并启用相应的调试扩展。", "node2NotSupported": "不再支持 \"node2\",改用 \"node\",并将 \"protocol\" 属性设为 \"inspector\"。", "debugName": "配置名称;在启动配置下拉菜单中显示。", "debugRequest": "请求配置类型。可以是“启动”或“附加”。", diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json index 0598c67b46ee4..f4159d50b0ea6 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "evaluateMathExpression": "Emmet: 评估数学表达式" + "evaluateMathExpression": "Emmet: 求数学表达式的值" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json index 403f855e5eba5..81f7dcfcab119 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "incrementNumberByOneTenth": "Emmet: 以 0.1 为增量", - "incrementNumberByOne": "Emmet: 以 1 为增量", - "incrementNumberByTen": "Emmet: 以 10 为增量", - "decrementNumberByOneTenth": "Emmet: 以 0.1 为减量", - "decrementNumberByOne": "Emmet: 以 1 为减量", - "decrementNumberByTen": "Emmet: 以 10 为减量" + "incrementNumberByOneTenth": "Emmet: 增加 0.1", + "incrementNumberByOne": "Emmet: 增加 1", + "incrementNumberByTen": "Emmet: 增加 10", + "decrementNumberByOneTenth": "Emmet: 减少 0.1", + "decrementNumberByOne": "Emmet: 减少 1", + "decrementNumberByTen": "Emmet: 减少 10" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json index b58d42bcafefb..545f1c107e703 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "removeTag": "Emmet: 删除标记" + "removeTag": "Emmet: 删除标签" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json index 5796a0dcab8c5..53e4eaafbd993 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "splitJoinTag": "Emmet: 分离/联接标记" + "splitJoinTag": "Emmet: 分离/联接标签" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json index c5d6fd7b350db..d68725525c809 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "updateImageSize": "Emmet: 更新映像大小" + "updateImageSize": "Emmet: 更新图像大小" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json index 486e5397c4bc5..8bf2821c1205f 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "updateTag": "Emmet: 更新标记", - "enterTag": "输入标记", - "tag": "标记" + "updateTag": "Emmet: 更新标签", + "enterTag": "输入标签", + "tag": "标签" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json index dbca7bf9016be..21f0c06d36383 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "wrapWithAbbreviationAction": "Emmet: 使用缩写进行包装", + "wrapWithAbbreviationAction": "Emmet: 使用缩写进行包围", "enterAbbreviation": "输入缩写", "abbreviation": "缩写" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 6a402e79e1e6b..0701c9f4ae63b 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -6,8 +6,8 @@ { "emmetConfigurationTitle": "Emmet", "triggerExpansionOnTab": "启用后,按 TAB 键时,将展开 Emmet 缩写。", - "emmetPreferences": "用于修改 Emmet 的某些操作和解决程序的首选项。", + "emmetPreferences": "用于修改 Emmet 某些操作和解析程序的行为的首选项。", "emmetSyntaxProfiles": "为指定的语法定义配置文件或使用带有特定规则的配置文件。", - "emmetExclude": "emmet 缩写不应在其中展开的语言数组。", - "emmetExtensionsPath": "转至包含 Emmet 配置文件、片段和首选项的文件的路径" + "emmetExclude": "不应展开 Emmet 缩写的语言数组。", + "emmetExtensionsPath": "包含 Emmet 配置文件、代码段和首选项的文件夹路径" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 5d52f90d6278b..076eadb1e72ac 100644 --- a/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.view": "贡献自定义视图", + "vscode.extension.contributes.view": "添加自定义视图", "vscode.extension.contributes.view.id": "用于标识通过 vscode.workspace.createTreeView 创建的视图的唯一 ID", "vscode.extension.contributes.view.label": "用于呈现视图的人类可读的字符串", "vscode.extension.contributes.view.icon": "视图图标的路径", - "vscode.extension.contributes.views": "贡献自定义视图", + "vscode.extension.contributes.views": "添加自定义视图", "showViewlet": "显示 {0}", "view": "查看" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..5a4bf096f38bb 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "是否禁用其他键映射以避免键绑定之间的冲突?", + "yes": "是", + "no": "否" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index ba343731820b7..5813db26a2446 100644 --- a/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "配置语言的文件关联(如: \"*.extension\": \"html\")。这些关联的优先级高于已安装语言的默认关联。", "encoding": "读取和编写文件时将使用的默认字符集编码。", "autoGuessEncoding": "启用时,会在打开文件时尝试猜测字符集编码", - "eol": "默认行尾字符。", "trimTrailingWhitespace": "启用后,将在保存文件时剪裁尾随空格。", "insertFinalNewline": "启用后,保存文件时在文件末尾插入一个最终新行。", "files.autoSave.off": "永不自动保存更新后的文件。", diff --git a/i18n/chs/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json b/i18n/chs/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json index f4fa6caa5bcb3..9745dba45381e 100644 --- a/i18n/chs/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "orphanedFile": "{0} (deleted from disk)" + "orphanedFile": "{0} (磁盘上已删除)" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index dbd6be98f3e07..bb7e4ea7afa06 100644 --- a/i18n/chs/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,11 @@ // Do not edit this file. It is machine generated. { "slow": "检测到启动缓慢", - "slow.detail": "抱歉,出现了启动缓慢的情况。请重启“{0}”并启用分析,将分析文件与我们共享,我们会努力提高启动速度。" + "slow.detail": "抱歉,出现了启动缓慢的情况。请重启“{0}”并启用分析,将分析文件与我们共享,我们会努力提高启动速度。", + "prof.message": "已成功创建描述文件。", + "prof.detail": "请创建问题并手动附加以下文件:\n{0}", + "prof.restartAndFileIssue": "创建问题并重启", + "prof.restart": "重启", + "prof.thanks": "感谢您的帮助。", + "prof.detail.restart": "需要重新启动才能继续使用“{0}”。再次感谢您的贡献。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index d4d305eba54aa..3461ec0a523e9 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "keybindingsInputName": "键盘快捷键", + "keybindingsInputName": "键盘快捷方式", "SearchKeybindings.AriaLabel": "搜索键绑定", "SearchKeybindings.Placeholder": "搜索键绑定", "sortByPrecedene": "按优先级排序", - "header-message": "用于高级自定义打开和编辑", + "header-message": "高级自定义请打开和编辑", "keybindings-file-name": "keybindings.json", "keybindingsLabel": "键绑定", "changeLabel": "更改键绑定", diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 058e01cd6bf65..72a81c0af681d 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,7 +6,7 @@ { "openGlobalSettings": "打开用户设置", "openGlobalKeybindings": "打开键盘快捷方式", - "openGlobalKeybindingsFile": "打开键盘快捷键文件", + "openGlobalKeybindingsFile": "打开键盘快捷方式文件", "openWorkspaceSettings": "打开工作区设置", "configureLanguageBasedSettings": "配置语言特定的设置...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index ab4166d5cd73b..8ea8ff4f96e85 100644 --- a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "toggleGitViewlet": "显示 GIT", + "toggleGitViewlet": "显示 Git", + "installAdditionalSCMProviders": "安装其他 SCM 提供程序...", "source control": "源代码管理", "toggleSCMViewlet": "显示 SCM", "view": "查看" diff --git a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index f03d74e8c9daf..89c41c7a05bad 100644 --- a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "switch provider": "切换 SCM 提供程序..." + "installAdditionalSCMProviders": "安装其他 SCM 提供程序...", + "switch provider": "切换源代码管理系统..." } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 0c4154de4e50a..340ee7fc03e11 100644 --- a/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.snippets": "贡献代码段。", + "vscode.extension.contributes.snippets": "添加代码段。", "vscode.extension.contributes.snippets-language": "此代码片段参与的语言标识符。", "vscode.extension.contributes.snippets-path": "代码片段文件的路径。该路径相对于扩展文件夹,通常以 \"./snippets/\" 开头。", "invalid.language": "“contributes.{0}.language”中存在未知的语言。提供的值: {1}", diff --git a/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index bf5eec2631c96..48bcbb508c253 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0},任务" + "entryAriaLabel": "{0},任务", + "workspace": "来自工作区", + "extension": "来自扩展" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 2132313f0b684..f5f009904e1de 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,6 @@ { "TerminalTaskSystem.unknownError": "在执行任务时发生未知错误。请参见任务输出日志了解详细信息。", "TerminalTaskSystem.terminalName": "任务 - {0}", - "TerminalTaskSystem": "无法对 UNC 驱动器执行 shell 命令。" + "TerminalTaskSystem": "无法对 UNC 驱动器执行 shell 命令。", + "unkownProblemMatcher": "无法解析问题匹配程序 {0}。此匹配程序将被忽略" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index aa659de1014f0..5b8a86d9c21b1 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "在执行任务时发生未知错误。请参见任务输出日志了解详细信息。", "TaskRunnerSystem.watchingBuildTaskFinished": "\n监视生成任务已完成", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\n已根据用户请求终止了任务'{0}' " + "TaskRunnerSystem.cancelRequested": "\n已根据用户请求终止了任务'{0}' ", + "unkownProblemMatcher": "无法解析问题匹配程序 {0}。此匹配程序将被忽略" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/chs/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json index 082e49f08bc47..076dd52ebbba1 100644 --- a/i18n/chs/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -17,7 +17,7 @@ "watermark.selectTheme": "更改主题", "watermark.selectKeymap": "更改键映射", "watermark.keybindingsReference": "键盘参考", - "watermark.openGlobalKeybindings": "键盘快捷键", + "watermark.openGlobalKeybindings": "键盘快捷方式(&&K)", "watermark.unboundCommand": "未绑定", "workbenchConfigurationTitle": "工作台", "tips.enabled": "启用后,当没有打开编辑器时将显示水印提示。" diff --git a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 3b9d1ffa9caa8..3503db3576a03 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -9,18 +9,23 @@ "welcomePage.start": "开始", "welcomePage.newFile": "新建文件", "welcomePage.openFolder": "打开文件夹...", - "welcomePage.cloneGitRepository": "克隆 GIT 存储库...", + "welcomePage.cloneGitRepository": "克隆 Git 存储库...", "welcomePage.recent": "最近", "welcomePage.moreRecent": "更多...", "welcomePage.noRecentFolders": "无最近使用文件夹", "welcomePage.help": "帮助", + "welcomePage.keybindingsCheatsheet": "可打印的键盘速查表", "welcomePage.introductoryVideos": "入门视频", "welcomePage.productDocumentation": "产品文档", "welcomePage.gitHubRepository": "GitHub 存储库", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "启动时显示欢迎页", "welcomePage.customize": "自定义", + "welcomePage.installExtensionPacks": "工具和语言", + "welcomePage.installExtensionPacksDescription": "安装对 {0} 和 {1} 的支持", + "welcomePage.moreExtensions": "更多", "welcomePage.installKeymapDescription": "安装键盘快捷方式", + "welcomePage.installKeymapExtension": "安装 {0} 和 {1} 的键盘快捷方式", "welcomePage.others": "其他", "welcomePage.colorTheme": "颜色主题", "welcomePage.colorThemeDescription": "使编辑器和代码呈现你喜欢的外观", diff --git a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index de7e3aa24d577..07f438f169e7c 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,25 @@ // Do not edit this file. It is machine generated. { "welcomePage": "欢迎使用", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "已安装对 {0} 的支持。", + "welcomePage.willReloadAfterInstallingExtensionPack": "安装对 {0} 的支持后,将重载窗口。", + "welcomePage.installingExtensionPack": "正在安装对 {0} 的支持...", + "welcomePage.extensionPackNotFound": "找不到对 {0} (ID: {1}) 的支持。", "welcomePage.keymapAlreadyInstalled": "已安装 {0} 键盘快捷方式。", "welcomePage.willReloadAfterInstallingKeymap": "安装 {0} 键盘快捷方式后,将重载窗口。", "welcomePage.installingKeymap": "正在安装 {0} 键盘快捷方式...", "welcomePage.keymapNotFound": "找不到 ID 为 {1} 的 {0} 键盘快捷方式。", "welcome.title": "欢迎使用", + "welcomePage.extensionListSeparator": ",", + "welcomePage.installedExtension": "{0}(已安装)", "ok": "确定", "cancel": "取消", "welcomePage.quickLinkBackground": "欢迎页快速链接的背景颜色。", diff --git a/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 69e35ac02d635..4abe2dbd4b81a 100644 --- a/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -14,18 +14,18 @@ "vscode.extension.contributes.iconThemes.label": "UI 中显示的图标主题的标签。", "vscode.extension.contributes.iconThemes.path": "图标主题定义文件的路径。该路径相对于扩展文件夹,通常是 \"./icons/awesome-icon-theme.json\"。", "migration.completed": "已向用户设置添加了新的主题设置。{0} 中可备份。", - "error.cannotloadtheme": "Unable to load {0}: {1}", - "reqarray": "Extension point `{0}` must be an array.", + "error.cannotloadtheme": "无法加载 {0}: {1}", + "reqarray": "扩展点“{0}”必须是一个数组。", "reqpath": "“contributes.{0}.path”中应为字符串。提供的值: {1}", "invalid.path.1": "“contributes.{0}.path”({1})应包含在扩展的文件夹({2})内。这可能会使扩展不可移植。", "reqid": "“contributes.{0}.id”中应为字符串。提供的值: {1}", "error.cannotloadicontheme": "Unable to load {0}", "error.cannotparseicontheme": "Problems parsing file icons file: {0}", - "colorTheme": "Specifies the color theme used in the workbench.", - "colorThemeError": "Theme is unknown or not installed.", - "iconTheme": "Specifies the icon theme used in the workbench.", + "colorTheme": "指定工作台中使用的颜色主题。", + "colorThemeError": "主题未知或未安装。", + "iconTheme": "指定在工作台中使用的图标主题。", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed.", + "iconThemeError": "文件图标主题未知或未安装。", "workbenchColors": "覆盖当前所选颜色主题的颜色。", "workbenchColors.deprecated": "该设置不再是实验性设置,并已重命名为“workbench.colorCustomizations”", "workbenchColors.deprecatedDescription": "改用“workbench.colorCustomizations”" diff --git a/i18n/cht/extensions/markdown/out/extension.i18n.json b/i18n/cht/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/cht/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/package.i18n.json b/i18n/cht/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/extensions/npm/package.i18n.json b/i18n/cht/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index da6b8c6d2c009..c01f13f3bcb0d 100644 --- a/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "因為影像太大,所以無法在編輯器中顯示。", - "resourceOpenExternalButton": "開啟影像", - "resourceOpenExternalText": " 要使用外部程式嗎?", "nativeBinaryError": "檔案為二進位檔、非常大或使用不支援的文字編碼,因此將不會顯示於編輯器中。", "sizeB": "{0}B", "sizeKB": "{0}KB", diff --git a/i18n/cht/src/vs/code/electron-main/menus.i18n.json b/i18n/cht/src/vs/code/electron-main/menus.i18n.json index a1fa3f356ddeb..5961aa8e7894d 100644 --- a/i18n/cht/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/cht/src/vs/code/electron-main/menus.i18n.json @@ -14,6 +14,7 @@ "mHelp": "說明 (&&H)", "miNewWindow": "開新視窗(&&W)", "mAbout": "關於 {0}", + "mServices": "服務", "mHide": "隱藏 {0}", "mHideOthers": "隱藏其他", "mShowAll": "全部顯示", diff --git a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json index ec8f05fe3403e..f06682edb16bb 100644 --- a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -40,7 +40,6 @@ "formatOnType": "控制編輯器是否應在輸入一行後自動格式化", "formatOnPaste": "控制編輯器是否應自動設定貼上的內容格式。格式器必須可供使用,而且格式器應該能夠設定文件中一個範圍的格式。", "suggestOnTriggerCharacters": "控制輸入觸發字元時,是否應自動顯示建議", - "acceptSuggestionOnEnter": "控制除了 'Tab' 外,是否也藉由按下 'Enter' 接受建議。如此可避免混淆要插入新行或接受建議。", "acceptSuggestionOnCommitCharacter": "控制認可字元是否應接受建議。例如在 JavaScript 中,分號 (';') 可以是接受建議並鍵入該字元的認可字元。", "snippetSuggestions": "控制程式碼片段是否隨其他建議顯示,以及其排序方式。", "emptySelectionClipboard": "控制複製時不選取任何項目是否會複製目前程式行。", diff --git a/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json index 7b011979df90c..b08c173b1003a 100644 --- a/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -7,6 +7,9 @@ "lineHighlight": "目前游標位置行的反白顯示背景色彩。", "lineHighlightBorderBox": "目前游標位置行之周圍框線的背景色彩。", "rangeHighlight": "反白顯示範圍的背景色彩,例如 Quick Open 與尋找功能。", + "caret": "編輯器游標的色彩。", + "editorWhitespaces": "編輯器中空白字元的色彩。", + "editorIndentGuides": "編輯器縮排輔助線的色彩。", "editorLineNumbers": "編輯器行號的色彩。", "editorRuler": "編輯器尺規的色彩", "editorCodeLensForeground": "編輯器程式碼濾鏡的前景色彩", diff --git a/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..26ea0a1761cf6 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "找不到 '{0}' 的定義", + "generic.noResults": "找不到任何定義", + "meta.title": " - {0} 個定義", + "actions.goToDecl.label": "移至定義", + "actions.goToDeclToSide.label": "在一側開啟定義", + "actions.previewDecl.label": "預覽定義", + "goToImplementation.noResultWord": "找不到 '{0}' 的任何實作", + "goToImplementation.generic.noResults": "找不到任何實作", + "meta.implementations.title": " – {0} 個實作", + "actions.goToImplementation.label": "前往實作", + "actions.peekImplementation.label": "預覽實作", + "goToTypeDefinition.noResultWord": "找不到 '{0}' 的任何類型定義", + "goToTypeDefinition.generic.noResults": "找不到任何類型定義", + "meta.typeDefinitions.title": " – {0} 個定義", + "actions.goToTypeDefinition.label": "移至類型定義", + "actions.peekTypeDefinition.label": "預覽類型定義" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..24cf4f7503fe8 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "按一下以顯示 {0} 項定義。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json index 8b6ad71cd4e6d..028bfb1a1d027 100644 --- a/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json +++ b/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "treeView.duplicateElement": "元件{0}已被註冊" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/common/theme.i18n.json b/i18n/cht/src/vs/workbench/common/theme.i18n.json index 2d8bce1a6366a..72a8d8abb7e4f 100644 --- a/i18n/cht/src/vs/workbench/common/theme.i18n.json +++ b/i18n/cht/src/vs/workbench/common/theme.i18n.json @@ -29,6 +29,7 @@ "activityBarBadgeBackground": "活動通知徽章的背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", "activityBarBadgeForeground": "活動通知徽章的前背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", "sideBarBackground": "提要欄位的背景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", + "sideBarForeground": "側欄的前景顏色.側欄包含Explorer與搜尋.", "sideBarTitleForeground": "提要欄位標題的前景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", "sideBarSectionHeaderBackground": "提要欄位區段標頭的背景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", "titleBarActiveForeground": "作用中視窗之標題列的前景。請注意,目前只有 macOS 支援此色彩。", diff --git a/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json index c1874024aee5c..bced8b136e5de 100644 --- a/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "檢視", "help": "說明", "file": "檔案", + "developer": "開發人員", "showEditorTabs": "控制已開啟的編輯器是否應顯示在索引標籤中。", "editorTabCloseButton": "控制編輯器的索引標籤關閉按鈕位置,或在設為 'off' 時將其停用。", "showIcons": "控制開啟的編輯器是否搭配圖示顯示。這需要同時啟用圖示佈景主題。", diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..49a87dcf2225a 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "要停用其他按鍵對應,以避免按鍵繫結關係發生衝突嗎?", + "yes": "是", + "no": "否" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 07e8bfd596319..5b044579208f6 100644 --- a/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "將檔案關聯設定為語言 (例如 \"*.extension\": \"html\")。這些語言優先於已安裝語言的預設關聯。", "encoding": "讀取與寫入檔案時要使用的預設字元集編碼。", "autoGuessEncoding": "如有啟用,將會在開啟檔案時,嘗試猜測字元集編碼", - "eol": "預設行尾字元。", "trimTrailingWhitespace": "若啟用,將在儲存檔案時修剪尾端空白。", "insertFinalNewline": "啟用時,請在儲存檔案時在其結尾插入最後一個新行。", "files.autoSave.off": "已變更的檔案一律不會自動儲存。", diff --git a/i18n/cht/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 1c615781faa32..f36b3a04dbaf4 100644 --- a/i18n/cht/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,9 @@ // Do not edit this file. It is machine generated. { "slow": "偵測到啟動速度慢", - "slow.detail": "抱歉! 先前的啟動速度過慢。請重新啟動 '{0}' 並啟用剖析功能,同時將設定檔提供給我們,我們將努力提升啟動的品質。" + "slow.detail": "抱歉! 先前的啟動速度過慢。請重新啟動 '{0}' 並啟用剖析功能,同時將設定檔提供給我們,我們將努力提升啟動的品質。", + "prof.message": "已成功建立設定檔。", + "prof.detail": "請建立問題,並手動附加下列檔案:\n{0}", + "prof.restartAndFileIssue": "建立問題並重新啟動", + "prof.restart": "重新啟動" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index c0bccd6864ce2..cafed39301058 100644 --- a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "顯示 Git", + "installAdditionalSCMProviders": "安裝額外SCM提供者...", "source control": "原始檔控制", "toggleSCMViewlet": "顯示 SCM", "view": "檢視" diff --git a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index d1872f571b1c6..5450727934af6 100644 --- a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "安裝額外SCM提供者...", "switch provider": "切換 SCM 提供者..." } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index e35a088465013..c9f6c178105a9 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0},工作" + "entryAriaLabel": "{0},工作", + "workspace": "從工作區", + "extension": "從擴充功能" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 877f81d59fdd3..ae636e706790b 100644 --- a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,6 +6,7 @@ { "selectTheme.label": "色彩佈景主題", "installColorThemes": "安裝其他的色彩佈景主題...", + "themes.selectTheme": "選取色彩主題(上/下鍵預覽)", "selectIconTheme.label": "檔案圖示佈景主題", "installIconThemes": "安裝其他的檔案圖示主題...", "noIconThemeLabel": "無", diff --git a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 00a45ea1dc0cb..9a00f615c32e6 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,6 +11,7 @@ "welcomePage.openFolder": "開啟資料夾...", "welcomePage.cloneGitRepository": "複製 Git 存放庫...", "welcomePage.recent": "最近使用", + "welcomePage.moreRecent": "更多...", "welcomePage.noRecentFolders": "沒有最近使用的資料夾", "welcomePage.help": "說明", "welcomePage.introductoryVideos": "簡介影片", @@ -19,10 +20,12 @@ "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "啟動時顯示歡迎頁面", "welcomePage.customize": "自訂", + "welcomePage.moreExtensions": "更多", "welcomePage.installKeymapDescription": "安裝鍵盤快速鍵", "welcomePage.others": "其他", "welcomePage.colorTheme": "彩色佈景主題", "welcomePage.colorThemeDescription": "將編輯器及您的程式碼設定成您喜愛的外觀", + "welcomePage.learn": "深入了解", "welcomePage.showCommands": "尋找及執行所有命令", "welcomePage.showCommandsDescription": "從控制台快速存取及搜尋命令 ({0})", "welcomePage.interfaceOverview": "介面概觀", diff --git a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 02eb36873b6a1..dfce04ba61a07 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,22 @@ // Do not edit this file. It is machine generated. { "welcomePage": "歡迎使用", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "活力", + "welcomePage.sublime": "壯麗", + "welcomePage.atom": "Atom", "welcomePage.keymapAlreadyInstalled": "已安裝 {0} 鍵盤快速鍵。", "welcomePage.willReloadAfterInstallingKeymap": "{0} 鍵盤快速鍵安裝完成後,將會重新載入此視窗。", "welcomePage.installingKeymap": "正在安裝 {0} 鍵盤快速鍵...", "welcomePage.keymapNotFound": "找不到識別碼為 {1} 的 {0} 鍵盤快速鍵。", "welcome.title": "歡迎使用", + "welcomePage.extensionListSeparator": ",", + "welcomePage.installedExtension": "{0}(已安裝)", "ok": "確定", - "cancel": "取消" + "cancel": "取消", + "welcomePage.quickLinkBackground": "起始頁面連結的背景色彩." } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index 62ddb9869c6e7..920973ad06303 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "walkThrough.unboundCommand": "未繫結", - "walkThrough.gitNotFound": "您的系統上似乎未安裝 Git。" + "walkThrough.gitNotFound": "您的系統上似乎未安裝 Git。", + "walkThrough.embeddedEditorBackground": "編輯器互動區塊的背景色彩." } \ No newline at end of file diff --git a/i18n/deu/extensions/git/out/main.i18n.json b/i18n/deu/extensions/git/out/main.i18n.json index 6cf07d1824f42..58ab0b365d001 100644 --- a/i18n/deu/extensions/git/out/main.i18n.json +++ b/i18n/deu/extensions/git/out/main.i18n.json @@ -7,5 +7,5 @@ "using git": "Verwenden von Git {0} von {1}", "updateGit": "Git aktualisieren", "neverShowAgain": "Nicht mehr anzeigen", - "git20": "Sie haben anscheinend Git {0} installiert. Der Code funktioniert am besten mit Git 2 oder älter" + "git20": "Sie haben anscheinend Git {0} installiert. Code funktioniert am besten mit Git 2 oder neuer" } \ No newline at end of file diff --git a/i18n/deu/extensions/markdown/out/extension.i18n.json b/i18n/deu/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/deu/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/deu/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/package.i18n.json b/i18n/deu/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/extensions/npm/package.i18n.json b/i18n/deu/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/deu/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index a2b0a61e0fa19..24c2e906e9053 100644 --- a/i18n/deu/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/deu/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "Das Bild ist zu groß für den Editor. ", - "resourceOpenExternalButton": "Bild öffnen", - "resourceOpenExternalText": " mit externem Programm?", "nativeBinaryError": "Die Datei wird nicht im Editor angezeigt, weil sie binär oder sehr groß ist oder eine nicht unterstützte Textcodierung verwendet.", "sizeB": "{0} B", "sizeKB": "{0} KB", diff --git a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json index 2fe70e62eed2e..a01ec274ece9a 100644 --- a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -40,7 +40,6 @@ "formatOnType": "Steuert, ob der Editor Zeilen automatisch nach der Eingabe formatiert.", "formatOnPaste": "Steuert, ob der Editor den eingefügten Inhalt automatisch formatiert.", "suggestOnTriggerCharacters": "Steuert, ob Vorschläge automatisch bei der Eingabe von Triggerzeichen angezeigt werden.", - "acceptSuggestionOnEnter": "Steuert, ob Vorschläge über die Eingabetaste (zusätzlich zur TAB-Taste) angenommen werden sollen. Vermeidet Mehrdeutigkeit zwischen dem Einfügen neuer Zeilen oder dem Annehmen von Vorschlägen.", "acceptSuggestionOnCommitCharacter": "Steuert, ob Vorschläge über Commitzeichen angenommen werden sollen. In JavaScript kann ein Semikolon (\";\") beispielsweise ein Commitzeichen sein, das einen Vorschlag annimmt und dieses Zeichen eingibt.", "snippetSuggestions": "Steuert, ob Codeausschnitte mit anderen Vorschlägen angezeigt und wie diese sortiert werden.", "emptySelectionClipboard": "Steuert, ob ein Kopiervorgang ohne Auswahl die aktuelle Zeile kopiert.", diff --git a/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..ffee2c2fa36db --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Keine Definition gefunden für \"{0}\".", + "generic.noResults": "Keine Definition gefunden", + "meta.title": " – {0} Definitionen", + "actions.goToDecl.label": "Gehe zu Definition", + "actions.goToDeclToSide.label": "Definition an der Seite öffnen", + "actions.previewDecl.label": "Peek-Definition", + "goToImplementation.noResultWord": "Keine Implementierung gefunden für \"{0}\"", + "goToImplementation.generic.noResults": "Keine Implementierung gefunden", + "meta.implementations.title": "{0} Implementierungen", + "actions.goToImplementation.label": "Zur Implementierung wechseln", + "actions.peekImplementation.label": "Vorschau der Implementierung anzeigen", + "goToTypeDefinition.noResultWord": "Keine Typendefinition gefunden für \"{0}\"", + "goToTypeDefinition.generic.noResults": "Keine Typendefinition gefunden", + "meta.typeDefinitions.title": "{0} Typdefinitionen", + "actions.goToTypeDefinition.label": "Zur Typdefinition wechseln", + "actions.peekTypeDefinition.label": "Vorschau der Typdefinition anzeigen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..2d5f00609a890 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Klicken Sie, um {0} Definitionen anzuzeigen." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json index e519ed643e29c..15f166829b2aa 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "Anzeigen", "help": "Hilfe", "file": "Datei", + "developer": "Entwickler", "showEditorTabs": "Steuert, ob geöffnete Editoren auf Registerkarten angezeigt werden sollen.", "editorTabCloseButton": "Steuert die Position der Schließen-Schaltflächen der Editor-Registerkarten oder deaktiviert sie bei der Einstellung \"off\".", "showIcons": "Steuert, ob geöffnete Editoren mit einem Symbol angezeigt werden sollen. Hierzu muss auch ein Symboldesign aktiviert werden.", diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..5c79e37943747 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "Andere Tastenzuordnungen deaktivieren, um Konflikte zwischen Tastenzuordnungen zu vermeiden?", + "yes": "Ja", + "no": "Nein" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 8880b15033b99..8153f54254b59 100644 --- a/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "Konfigurieren Sie Dateizuordnungen zu Sprachen (beispielsweise \"*.extension\": \"html\"). Diese besitzen Vorrang vor den Standardzuordnungen der installierten Sprachen.", "encoding": "Die Standardzeichensatz-Codierung, die beim Lesen und Schreiben von Dateien verwendet werden soll.", "autoGuessEncoding": "Ist diese Option aktiviert, wird beim Öffnen von Dateien versucht, die Zeichensatzcodierung automatisch zu ermitteln.", - "eol": "Das Zeilenende-Standardzeichen.", "trimTrailingWhitespace": "Bei Aktivierung werden nachgestellte Leerzeichen beim Speichern einer Datei gekürzt.", "insertFinalNewline": "Bei Aktivierung wird beim Speichern einer Datei eine abschließende neue Zeile am Dateiende eingefügt.", "files.autoSave.off": "Eine geänderte Datei wird nie automatisch gespeichert.", diff --git a/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 96d83227f6771..687359bd4866a 100644 --- a/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,9 @@ // Do not edit this file. It is machine generated. { "slow": "Langsamer Start erkannt", - "slow.detail": "Es tut uns leid, dass Ihr Start so langsam war. Starten Sie \"{0}\" mit aktivierter Profilerstellung neu, geben Sie die Profile für uns frei, und wir tun unser Bestes, damit der Start bald wieder perfekt funktioniert." + "slow.detail": "Es tut uns leid, dass Ihr Start so langsam war. Starten Sie \"{0}\" mit aktivierter Profilerstellung neu, geben Sie die Profile für uns frei, und wir tun unser Bestes, damit der Start bald wieder perfekt funktioniert.", + "prof.message": "Profile wurden erfolgreich erstellt.", + "prof.detail": "Erstellen Sie ein Problem, und fügen Sie die folgenden Dateien manuell an:\n{0}", + "prof.restartAndFileIssue": "Problem erstellen und neu starten", + "prof.restart": "Neu starten" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 1bc333472229e..5693a1f5b13de 100644 --- a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,6 +5,11 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Willkommen", + "welcomePage.typeScript": "TypeScript", + "welcomePage.php": "PHP", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", "welcomePage.keymapAlreadyInstalled": "Die {0} Tastenkombinationen sind bereits installiert.", "welcomePage.willReloadAfterInstallingKeymap": "Das Fenster wird nach der Installation der {0}-Tastaturbefehle neu geladen.", "welcomePage.installingKeymap": "Die {0}-Tastenkombinationen werden installiert...", diff --git a/i18n/esn/extensions/jake/out/main.i18n.json b/i18n/esn/extensions/jake/out/main.i18n.json index 8b6ad71cd4e6d..1b387f2707002 100644 --- a/i18n/esn/extensions/jake/out/main.i18n.json +++ b/i18n/esn/extensions/jake/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "La detección automática de Jake falló con el error: {0}" +} \ No newline at end of file diff --git a/i18n/esn/extensions/jake/package.i18n.json b/i18n/esn/extensions/jake/package.i18n.json index 8b6ad71cd4e6d..c22d4c52c9202 100644 --- a/i18n/esn/extensions/jake/package.i18n.json +++ b/i18n/esn/extensions/jake/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.jake.autoDetect": "Controla si la detección automática de tareas Jake estan activada/desactivada. El valor predeterminado es \"activada\"." +} \ No newline at end of file diff --git a/i18n/esn/extensions/markdown/out/extension.i18n.json b/i18n/esn/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/esn/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/package.i18n.json b/i18n/esn/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/extensions/npm/package.i18n.json b/i18n/esn/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/esn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index f706005311588..8029ab0b3bdfb 100644 --- a/i18n/esn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/esn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0} x {1} {2}", "largeImageError": "La imagen es muy grande para mostrar en el editor", - "resourceOpenExternalButton": "Abrir imagen", - "resourceOpenExternalText": "usar programa externo?", "nativeBinaryError": "El archivo no se mostrará en el editor porque es binario, muy grande o usa una codificación de texto no compatible.", "sizeB": "{0} B", "sizeKB": "{0} KB", diff --git a/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json index deeb605c6a664..8fe058e55cef5 100644 --- a/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "Controla el grosor de la fuente.", "fontSize": "Controla el tamaño de fuente en píxeles.", "lineHeight": "Controla la altura de línea. Utilice 0 para calcular el valor de lineHeight a partir de fontSize.", + "letterSpacing": "Controla el espacio entre letras en pixels.", "lineNumbers": "Controla la presentación de los números de línea. Los valores posibles son \"on\", \"off\" y \"relative\". \"relative\" muestra el número de líneas desde la posición actual del cursor.", "rulers": "Columnas en las que mostrar reglas verticales", "wordSeparators": "Caracteres que se usarán como separadores de palabras al realizar operaciones o navegaciones relacionadas con palabras.", @@ -40,7 +41,6 @@ "formatOnType": "Controla si el editor debe dar formato automáticamente a la línea después de escribirla", "formatOnPaste": "Controla si el editor debe formatear automáticamente el contenido pegado. Debe haber disponible un formateador capaz de aplicar formato a un intervalo dentro de un documento.", "suggestOnTriggerCharacters": "Controla si las sugerencias deben aparecer de forma automática al escribir caracteres desencadenadores", - "acceptSuggestionOnEnter": "Controla si las sugerencias deben aceptarse en \"Entrar\" (además de \"TAB\"). Ayuda a evitar la ambigüedad entre insertar nuevas líneas o aceptar sugerencias.", "acceptSuggestionOnCommitCharacter": "Controla si se deben aceptar sugerencias en los caracteres de confirmación. Por ejemplo, en Javascript, el punto y coma (\";\") puede ser un carácter de confirmación que acepta una sugerencia y escribe ese carácter.", "snippetSuggestions": "Controla si se muestran los fragmentos de código con otras sugerencias y cómo se ordenan.", "emptySelectionClipboard": "Controla si al copiar sin selección se copia la línea actual.", @@ -62,6 +62,7 @@ "renderLineHighlight": "Controla cómo el editor debe presentar el resaltado de línea. Las posibilidades son \"ninguno\", \"margen\", \"línea\" y \"todo\".", "codeLens": "Controla si el editor muestra lentes de código", "folding": "Controla si el editor tiene habilitado el plegado de código.", + "showFoldingControls": "Controla cuándo los controles de plegado del margen son ocultados automáticamente.", "matchBrackets": "Resaltar corchetes coincidentes cuando se seleccione uno de ellos.", "glyphMargin": "Controla si el editor debe representar el margen de glifo vertical. El margen de glifo se usa, principalmente, para depuración.", "useTabStops": "La inserción y eliminación del espacio en blanco sigue a las tabulaciones.", diff --git a/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..d9243b761356e --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "No se encontró ninguna definición para \"{0}\"", + "generic.noResults": "No se encontró ninguna definición", + "meta.title": " – {0} definiciones", + "actions.goToDecl.label": "Ir a definición", + "actions.goToDeclToSide.label": "Abrir definición en el lateral", + "actions.previewDecl.label": "Ver la definición", + "goToImplementation.noResultWord": "No se encontró ninguna implementación para \"{0}\"", + "goToImplementation.generic.noResults": "No se encontró ninguna implementación", + "meta.implementations.title": "{0} implementaciones", + "actions.goToImplementation.label": "Ir a implementación", + "actions.peekImplementation.label": "Inspeccionar implementación", + "goToTypeDefinition.noResultWord": "No se encontró ninguna definición de tipo para \"{0}\"", + "goToTypeDefinition.generic.noResults": "No se encontró ninguna definición de tipo", + "meta.typeDefinitions.title": " – {0} definiciones de tipo", + "actions.goToTypeDefinition.label": "Ir a la definición de tipo", + "actions.peekTypeDefinition.label": "Inspeccionar definición de tipo" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..d35f93e7fae0b --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Haga clic para mostrar {0} definiciones." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index f9d2c2d5f0993..bf3d8015426a1 100644 --- a/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -12,6 +12,7 @@ "readMore": "Leer más...{0}", "suggestionWithDetailsAriaLabel": "{0}, sugerencia, con detalles", "suggestionAriaLabel": "{0}, sugerencia", + "readLess": "Leer menos...{0}", "suggestWidget.loading": "Cargando...", "suggestWidget.noSuggestions": "No hay sugerencias.", "suggestionAriaAccepted": "{0}, aceptada", diff --git a/i18n/esn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/esn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index df256b0ca88ad..43ec87cbde1f6 100644 --- a/i18n/esn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/esn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,9 @@ "schema.brackets": "Define los corchetes que aumentan o reducen la sangría.", "schema.autoClosingPairs": "Define el par de corchetes. Cuando se escribe un corchete de apertura, se inserta automáticamente el corchete de cierre.", "schema.autoClosingPairs.notIn": "Define una lista de ámbitos donde los pares automáticos están deshabilitados.", - "schema.surroundingPairs": "Define los pares de corchetes que se pueden usar para encerrar una cadena seleccionada." + "schema.surroundingPairs": "Define los pares de corchetes que se pueden usar para encerrar una cadena seleccionada.", + "schema.wordPattern": " La definición de la palabra en el idioma.", + "schema.wordPattern.pattern": "El patrón de expresión regular utilizado para localizar palabras.", + "schema.wordPattern.flags": "Los flags de expresión regular utilizados para localizar palabras.", + "schema.wordPattern.flags.errorMessage": "Debe coincidir con el patrón `/^([gimuy]+)$/`." } \ No newline at end of file diff --git a/i18n/esn/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/esn/src/vs/platform/markers/common/problemMatcher.i18n.json index 967ffc7598360..1c9dfefb5cb70 100644 --- a/i18n/esn/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/esn/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,6 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "Error: La propiedad pattern {0} no es un nombre de variable de patrón válido.", "ProblemMatcherParser.problemPattern.watchingMatcher": "Un buscador de coincidencias de problemas debe definir tanto un patrón de inicio como un patrón de finalización para la inspección.", "ProblemMatcherParser.invalidRegexp": "Error: La cadena {0} no es una expresión regular válida.\n", + "WatchingPatternSchema.regexp": "Expresión regular para detectar el principio o el final de una tarea en segundo plano.", "WatchingPatternSchema.file": "Índice de grupo de coincidencias del nombre de archivo. Se puede omitir.", "PatternTypeSchema.name": "Nombre de un patrón aportado o predefinido", "PatternTypeSchema.description": "Patrón de problema o nombre de un patrón de problema que se ha aportado o predefinido. Se puede omitir si se especifica la base.", @@ -42,6 +43,12 @@ "ProblemMatcherSchema.severity": "Gravedad predeterminada para los problemas de capturas. Se usa si el patrón no define un grupo de coincidencias para \"severity\".", "ProblemMatcherSchema.applyTo": "Controla si un problema notificado en un documento de texto se aplica solamente a los documentos abiertos, cerrados o a todos los documentos.", "ProblemMatcherSchema.fileLocation": "Define cómo deben interpretarse los nombres de archivo notificados en un patrón de problema.", + "ProblemMatcherSchema.background": "Patrones para hacer seguimiento del comienzo y el final en un comprobador activo de la tarea en segundo plano.", + "ProblemMatcherSchema.background.activeOnStart": "Si se establece en True, el monitor está en modo activo cuando la tarea empieza. Esto es equivalente a emitir una línea que coincide con beginPattern", + "ProblemMatcherSchema.background.beginsPattern": "Si se encuentran coincidencias en la salida, se señala el inicio de una tarea en segundo plano.", + "ProblemMatcherSchema.background.endsPattern": "Si se encuentran coincidencias en la salida, se señala el fin de una tarea en segundo plano.", + "ProblemMatcherSchema.watching.deprecated": "Esta propiedad está en desuso. Use la propiedad en segundo plano.", + "ProblemMatcherSchema.watching": "Patrones para hacer un seguimiento del comienzo y el final de un patrón de supervisión.", "ProblemMatcherSchema.watching.activeOnStart": "Si se establece en true, el monitor está en modo activo cuando la tarea empieza. Esto es equivalente a emitir una línea que coincide con beginPattern", "ProblemMatcherSchema.watching.beginsPattern": "Si se encuentran coincidencias en la salida, se señala el inicio de una tarea de inspección.", "ProblemMatcherSchema.watching.endsPattern": "Si se encuentran coincidencias en la salida, se señala el fin de una tarea de inspección", diff --git a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json index 85f87911be1bd..889a845a81315 100644 --- a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -36,11 +36,13 @@ "dropdownForeground": "Primer plano de lista desplegable.", "dropdownBorder": "Borde de lista desplegable.", "listFocusBackground": "Color de fondo de la lista o el árbol del elemento con el foco cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", + "listFocusForeground": "Color de fondo de la lista o el árbol del elemento con el foco cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", "listActiveSelectionBackground": "Color de fondo de la lista o el árbol del elemento seleccionado cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", "listActiveSelectionForeground": "Color de primer plano de la lista o el árbol del elemento con el foco cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", "listInactiveSelectionBackground": "Color de fondo de la lista o el árbol del elemento seleccionado cuando la lista o el árbol están inactivos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", "listInactiveSelectionForeground": "Color de primer plano de la lista o el árbol del elemento con el foco cuando la lista o el árbol esta inactiva. Una lista o un árbol tiene el foco del teclado cuando está activo, cuando esta inactiva no.", "listHoverBackground": "Fondo de la lista o el árbol al mantener el mouse sobre los elementos.", + "listHoverForeground": "Color de primer plano de la lista o el árbol al pasar por encima de los elementos con el ratón.", "listDropBackground": "Fondo de arrastrar y colocar la lista o el árbol al mover los elementos con el mouse.", "highlight": "Color de primer plano de la lista o el árbol de las coincidencias resaltadas al buscar dentro de la lista o el ábol.", "pickerGroupForeground": "Selector de color rápido para la agrupación de etiquetas.", @@ -58,6 +60,7 @@ "editorBackground": "Color de fondo del editor.", "editorForeground": "Color de primer plano predeterminado del editor.", "editorWidgetBackground": "Color de fondo del editor de widgets como buscar/reemplazar", + "editorWidgetBorder": "Color de borde del editor de widget.", "editorSelection": "Color de la selección del editor.", "editorInactiveSelection": "Color de la selección en un editor inactivo.", "editorSelectionHighlight": "Color de las regiones con el mismo contenido que la selección.", diff --git a/i18n/esn/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/esn/src/vs/workbench/api/node/extHostTreeViews.i18n.json index 8b6ad71cd4e6d..1127a4ec4f832 100644 --- a/i18n/esn/src/vs/workbench/api/node/extHostTreeViews.i18n.json +++ b/i18n/esn/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "treeView.notRegistered": "No se ha registrado ninga vista del árbol con id '{0}'.", + "treeItem.notFound": "No se encontró ningún item del árbol con id '{0}'.", + "treeView.duplicateElement": "El elemento '{0}' ya está registrado" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/common/theme.i18n.json b/i18n/esn/src/vs/workbench/common/theme.i18n.json index 97f9736e66572..40dfe03ebb699 100644 --- a/i18n/esn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/esn/src/vs/workbench/common/theme.i18n.json @@ -32,6 +32,7 @@ "activityBarBadgeBackground": "Color de fondo de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", "activityBarBadgeForeground": "Color de primer plano de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", "sideBarBackground": "Color de fondo de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", + "sideBarForeground": "Color de primer plano de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", "sideBarTitleForeground": "Color de primer plano del título de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", "sideBarSectionHeaderBackground": "Color de fondo del encabezado de sección de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", "titleBarActiveForeground": "Color de primer plano de la barra de título cuando la ventana está activa. Tenga en cuenta que, actualmente, este clor solo se admite en macOS.", diff --git a/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json index cbf9d0deef3dc..543d5451907bc 100644 --- a/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "Ver", "help": "Ayuda", "file": "Archivo", + "developer": "Desarrollador", "showEditorTabs": "Controla si los editores abiertos se deben mostrar o no en pestañas.", "editorTabCloseButton": "Controla la posición de los botones de cierre de pestañas del editor o los deshabilita si se establece en \"off\".", "showIcons": "Controla si los editores abiertos deben mostrarse o no con un icono. Requiere que también se habilite un tema de icono.", diff --git a/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index cb1c21395831b..00a55728fff7c 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "El ejecutable del adaptador de depuración \"{0}\" no existe.", "debugAdapterCannotDetermineExecutable": "No se puede determinar el ejecutable para el adaptador de depuración \"{0}\".", "debugType": "Tipo de configuración.", + "debugTypeNotRecognised": "Este tipo de depuración no se reconoce. Compruebe que tiene instalada la correspondiente extensión de depuración y que está habilitada.", "node2NotSupported": "\"node2\" ya no se admite; use \"node\" en su lugar y establezca el atributo \"protocol\" en \"inspector\".", "debugName": "Nombre de la configuración. Aparece en el menú desplegable de la configuración de inicio.", "debugRequest": "Tipo de solicitud de la configuración. Puede ser \"launch\" o \"attach\".", diff --git a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..2b42d7a0c5b37 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "¿Quiere deshabilitar otras asignaciones de teclado para evitar conflictos entre los enlaces de teclado?", + "yes": "Sí", + "no": "No" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 9b8bcb5fdf134..ef718dc3ee129 100644 --- a/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "Configure asociaciones de archivo para los lenguajes (por ejemplo, \"*.extension\": \"html\"). Estas asociaciones tienen prioridad sobre las asociaciones predeterminadas de los lenguajes instalados.", "encoding": "La codificación del juego de caracteres predeterminada que debe utilizarse al leer y escribir archivos.", "autoGuessEncoding": "Si está opción está habilitada, se intentará adivinar la codificación del juego de caracteres al abrir los archivos", - "eol": "Carácter predeterminado de final de línea.", "trimTrailingWhitespace": "Si se habilita, se recortará el espacio final cuando se guarde un archivo.", "insertFinalNewline": "Si se habilita, inserte una nueva línea final al final del archivo cuando lo guarde.", "files.autoSave.off": "Un archivo con modificaciones no se guarda nunca automáticamente.", diff --git a/i18n/esn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 712641fcab11d..81f5a667ca8d3 100644 --- a/i18n/esn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,11 @@ // Do not edit this file. It is machine generated. { "slow": "Inicio lento detectado", - "slow.detail": "Lamentamos que haya tenido un inicio lento. Reinicie \"{0}\" con la generación de perfiles habilitada, comparta los perfiles con nosotros y trabajaremos a fondo para que vuelva a disfrutar de un inicio increíble." + "slow.detail": "Lamentamos que haya tenido un inicio lento. Reinicie \"{0}\" con la generación de perfiles habilitada, comparta los perfiles con nosotros y trabajaremos a fondo para que vuelva a disfrutar de un inicio increíble.", + "prof.message": "Los perfiles se crearon correctamente.", + "prof.detail": "Cree un problema y asóciele manualmente los siguientes archivos: {0}", + "prof.restartAndFileIssue": "Crear problema y reiniciar", + "prof.restart": "Reiniciar", + "prof.thanks": "Gracias por ayudarnos.", + "prof.detail.restart": "Se necesita un reinicio final para continuar utilizando '{0}'. De nuevo, gracias por su aportación." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index 2d44f58d5145a..a77a22117808a 100644 --- a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "Mostrar GIT", + "installAdditionalSCMProviders": "Instalar proveedores adicionales de SCM...", "source control": "Control de código fuente", "toggleSCMViewlet": "Mostrar SCM", "view": "Ver" diff --git a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index 58e5c2559c839..048db5a28d068 100644 --- a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "Instalar proveedores adicionales de SCM...", "switch provider": "Cambiar proveedor de SCM..." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index e5995f59713d9..30e2262eef7a1 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tareas" + "entryAriaLabel": "{0}, tareas", + "workspace": "De área de trabajo", + "extension": "De extensiones" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 930b60298c1c3..58c4eca7cfefd 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,6 @@ { "TerminalTaskSystem.unknownError": "Error desconocido durante la ejecución de una tarea. Vea el registro de resultados de la tarea para obtener más detalles.", "TerminalTaskSystem.terminalName": "Tarea - {0}", - "TerminalTaskSystem": "No se puede ejecutar un comando shell en una unidad UNC." + "TerminalTaskSystem": "No se puede ejecutar un comando shell en una unidad UNC.", + "unkownProblemMatcher": "No puede resolver el comprobador de problemas {0}. Será omitido." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index 651c8b00513f4..b300e0e061aa5 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "Error desconocido durante la ejecución de una tarea. Vea el registro de resultados de la tarea para obtener más detalles.", "TaskRunnerSystem.watchingBuildTaskFinished": "La inspección de las tareas de compilación ha finalizado.", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "La tarea '{0}' se finalizó por solicitud del usuario." + "TaskRunnerSystem.cancelRequested": "La tarea '{0}' se finalizó por solicitud del usuario.", + "unkownProblemMatcher": "No puede resolver el comprobador de problemas {0}. Será omitido" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 9591e0b167391..2438b3e17098b 100644 --- a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -14,13 +14,18 @@ "welcomePage.moreRecent": "Más...", "welcomePage.noRecentFolders": "No hay ninguna carpeta reciente", "welcomePage.help": "Ayuda", + "welcomePage.keybindingsCheatsheet": "Hoja imprimible con ayudas de teclado", "welcomePage.introductoryVideos": "Vídeos de introducción", "welcomePage.productDocumentation": "Documentación del producto", "welcomePage.gitHubRepository": "Repositorio de GitHub", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Mostrar página principal al inicio", "welcomePage.customize": "Personalizar", + "welcomePage.installExtensionPacks": "Herramientas y lenguajes", + "welcomePage.installExtensionPacksDescription": "Instalar soporte para {0} y {1}", + "welcomePage.moreExtensions": "más", "welcomePage.installKeymapDescription": "Instalar los métodos abreviados de teclado", + "welcomePage.installKeymapExtension": "Instalar los métodos abreviados de teclado de {0} y {1}", "welcomePage.others": "otros", "welcomePage.colorTheme": "Tema de color", "welcomePage.colorThemeDescription": "Modifique a su gusto la apariencia del editor y el código", diff --git a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 28283fba5c3e1..57b34bdf736e4 100644 --- a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,25 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Bienvenido", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "El soporte para '{0}' ya está instalado.", + "welcomePage.willReloadAfterInstallingExtensionPack": "La ventana se volverá a cargar después de instalar el soporte para {0}.", + "welcomePage.installingExtensionPack": "Instalando soporte para {0}...", + "welcomePage.extensionPackNotFound": "No se pudo encontrar el soporte para {0} con id {1}.", "welcomePage.keymapAlreadyInstalled": "Los métodos abreviados de teclado {0} ya están instalados.", "welcomePage.willReloadAfterInstallingKeymap": "La ventana se volverá a cargar después de instalar los métodos abreviados de teclado {0}.", "welcomePage.installingKeymap": "Instalando los métodos abreviados de teclado de {0}...", "welcomePage.keymapNotFound": "No se pudieron encontrar los métodos abreviados de teclado {0} con el identificador {1}.", "welcome.title": "Bienvenido", + "welcomePage.extensionListSeparator": ", ", + "welcomePage.installedExtension": "{0} (instalado)", "ok": "Aceptar", "cancel": "Cancelar", "welcomePage.quickLinkBackground": "Color de fondo de los vínculos rápidos en la página principal.", diff --git a/i18n/fra/extensions/markdown/out/extension.i18n.json b/i18n/fra/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/fra/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/fra/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/fra/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/extensions/merge-conflict/package.i18n.json b/i18n/fra/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/extensions/npm/package.i18n.json b/i18n/fra/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/fra/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index d6968482f68eb..b6faf1c8af7d5 100644 --- a/i18n/fra/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/fra/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "L'image est trop grande pour être affichée dans l'éditeur. ", - "resourceOpenExternalButton": "Ouvrir l'image", - "resourceOpenExternalText": " en utilisant un programme externe ?", "nativeBinaryError": "Impossible d'afficher le fichier dans l'éditeur : soit il est binaire, soit il est très volumineux, soit il utilise un encodage de texte non pris en charge.", "sizeB": "{0} o", "sizeKB": "{0} Ko", diff --git a/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json index afe0864b817de..16acf6481b0c5 100644 --- a/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -41,7 +41,6 @@ "formatOnType": "Contrôle si l'éditeur doit automatiquement mettre en forme la ligne après la saisie", "formatOnPaste": "Contrôle si l'éditeur doit automatiquement mettre en forme le contenu collé. Un formateur doit être disponible et doit pouvoir mettre en forme une plage dans un document.", "suggestOnTriggerCharacters": "Contrôle si les suggestions doivent s'afficher automatiquement durant la saisie de caractères de déclenchement", - "acceptSuggestionOnEnter": "Contrôle si les suggestions peuvent être acceptées avec Entrée (en plus de Tab). Cela permet d'éviter toute ambiguïté entre l'insertion de nouvelles lignes et l'acceptation de suggestions.", "acceptSuggestionOnCommitCharacter": "Contrôle si les suggestions doivent être acceptées avec des caractères de validation. Par exemple, en JavaScript, le point-virgule (';') peut être un caractère de validation qui permet d'accepter une suggestion et de taper ce caractère.", "snippetSuggestions": "Contrôle si les extraits de code s'affichent en même temps que d'autres suggestions, ainsi que leur mode de tri.", "emptySelectionClipboard": "Contrôle si la copie sans sélection permet de copier la ligne actuelle.", diff --git a/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..0488ff4835459 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Définition introuvable pour '{0}'", + "generic.noResults": "Définition introuvable", + "meta.title": " – {0} définitions", + "actions.goToDecl.label": "Atteindre la définition", + "actions.goToDeclToSide.label": "Ouvrir la définition sur le côté", + "actions.previewDecl.label": "Apercu de définition", + "goToImplementation.noResultWord": "Implémentation introuvable pour '{0}'", + "goToImplementation.generic.noResults": "Implémentation introuvable", + "meta.implementations.title": "– Implémentations {0}", + "actions.goToImplementation.label": "Accéder à l'implémentation", + "actions.peekImplementation.label": "Aperçu de l'implémentation", + "goToTypeDefinition.noResultWord": "Définition de type introuvable pour '{0}'", + "goToTypeDefinition.generic.noResults": "Définition de type introuvable", + "meta.typeDefinitions.title": " – Définitions de type {0}", + "actions.goToTypeDefinition.label": "Atteindre la définition de type", + "actions.peekTypeDefinition.label": "Aperçu de la définition du type" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..247bd9d24da5d --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Cliquez pour afficher {0} définitions." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json index 7d14c23b2b5f3..d1fbda145ce56 100644 --- a/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "Affichage", "help": "Aide", "file": "Fichier", + "developer": "Développeur", "showEditorTabs": "Contrôle si les éditeurs ouverts doivent s'afficher ou non sous des onglets.", "editorTabCloseButton": "Contrôle la position des boutons de fermeture des onglets de l'éditeur, ou les désactive quand le paramètre a la valeur 'off'.", "showIcons": "Contrôle si les éditeurs ouverts doivent s'afficher ou non avec une icône. Cela implique notamment l'activation d'un thème d'icône.", diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..5ddc77dfc5a2b 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "Désactiver les autres mappages de touches pour éviter les conflits de combinaisons de touches ?", + "yes": "Oui", + "no": "Non" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 8d72ad3193549..6f916235625b1 100644 --- a/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "Configurez les associations entre les fichiers et les langages (par exemple, \"*.extension\": \"html\"). Celles-ci ont priorité sur les associations par défaut des langages installés.", "encoding": "Encodage du jeu de caractères par défaut à utiliser durant la lecture et l'écriture des fichiers.", "autoGuessEncoding": "Quand cette option est activée, tente de deviner l'encodage du jeu de caractères à l'ouverture des fichiers", - "eol": "Caractère de fin de ligne par défaut.", "trimTrailingWhitespace": "Si l'option est activée, l'espace blanc de fin est supprimé au moment de l'enregistrement d'un fichier.", "insertFinalNewline": "Quand l'option est activée, une nouvelle ligne finale est insérée à la fin du fichier au moment de son enregistrement.", "files.autoSave.off": "Un fichier dont l'intégrité est compromise n'est jamais enregistré automatiquement.", diff --git a/i18n/fra/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index fb432045fcc8d..56c9603dba733 100644 --- a/i18n/fra/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,9 @@ // Do not edit this file. It is machine generated. { "slow": "Démarrage lent détecté", - "slow.detail": "Le démarrage a été très lent. Redémarrez '{0}' en ayant activé le profilage, partagez les profils avec nous, et nous ferons en sorte que le démarrage retrouve sa rapidité d'exécution." + "slow.detail": "Le démarrage a été très lent. Redémarrez '{0}' en ayant activé le profilage, partagez les profils avec nous, et nous ferons en sorte que le démarrage retrouve sa rapidité d'exécution.", + "prof.message": "Création réussie des profils.", + "prof.detail": "Créez un problème et joignez manuellement les fichiers suivants :\n{0}", + "prof.restartAndFileIssue": "Créer le problème et redémarrer", + "prof.restart": "Redémarrer" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 915c12960a049..66bb9f2ab6628 100644 --- a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,6 +5,11 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Bienvenue", + "welcomePage.typeScript": "TypeScript", + "welcomePage.php": "PHP", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", "welcomePage.keymapAlreadyInstalled": "Les raccourcis clavier {0} sont déjà installés.", "welcomePage.willReloadAfterInstallingKeymap": "La fenêtre se recharge après l'installation des raccourcis clavier {0}.", "welcomePage.installingKeymap": "Installation des raccourcis clavier de {0}...", diff --git a/i18n/ita/extensions/markdown/out/extension.i18n.json b/i18n/ita/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/ita/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/ita/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/extensions/merge-conflict/package.i18n.json b/i18n/ita/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/extensions/npm/package.i18n.json b/i18n/ita/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index 0ccb13bf8a736..c64a07b43792a 100644 --- a/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "L'immagine è troppo grande per essere visualizzata nell'editor", - "resourceOpenExternalButton": "Apri immagine", - "resourceOpenExternalText": " con il programma esterno?", "nativeBinaryError": "Il file non verrà visualizzato nell'editor perché è binario, è molto grande o usa una codifica testo non supportata.", "sizeB": "{0} B", "sizeKB": "{0} KB", diff --git a/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json index 59f730fe1dc6d..06ec2510c3ae3 100644 --- a/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -41,7 +41,6 @@ "formatOnType": "Controlla se l'editor deve formattare automaticamente la riga dopo la digitazione", "formatOnPaste": "Controlla se l'editor deve formattare automaticamente il contenuto incollato. Deve essere disponibile un formattatore che deve essere in grado di formattare un intervallo in un documento.", "suggestOnTriggerCharacters": "Controlla se i suggerimenti devono essere visualizzati automaticamente durante la digitazione dei caratteri trigger", - "acceptSuggestionOnEnter": "Controlla se i suggerimenti devono essere accettati con 'INVIO' in aggiunta a 'TAB'. In questo modo è possibile evitare ambiguità tra l'inserimento di nuove righe e l'accettazione di suggerimenti.", "acceptSuggestionOnCommitCharacter": "Controlla se accettare i suggerimenti con i caratteri di commit. Ad esempio, in JavaScript il punto e virgola (';') può essere un carattere di commit che accetta un suggerimento e digita tale carattere.", "snippetSuggestions": "Controlla se i frammenti di codice sono visualizzati con altri suggerimenti e il modo in cui sono ordinati.", "emptySelectionClipboard": "Consente di controllare se, quando si copia senza aver effettuato una selezione, viene copiata la riga corrente.", @@ -63,6 +62,7 @@ "renderLineHighlight": "Consente di controllare in che modo l'editor deve eseguire il rendering dell'evidenziazione di riga corrente. Le opzioni possibili sono 'none', 'gutter', 'line' e 'all'.", "codeLens": "Controlla se nell'editor sono visualizzate le finestre di CodeLens", "folding": "Controlla se per l'editor è abilitata la riduzione del codice", + "showFoldingControls": "Controlla se i controlli di riduzione sul margine della barra di scorrimento sono automaticamente nascosti.", "matchBrackets": "Evidenzia le parentesi corrispondenti quando se ne seleziona una.", "glyphMargin": "Controlla se l'editor deve eseguire il rendering del margine verticale del glifo. Il margine del glifo viene usato principalmente per il debug.", "useTabStops": "Inserimento ed eliminazione dello spazio vuoto dopo le tabulazioni", diff --git a/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..9df481ec1b5e8 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Non è stata trovata alcuna definizione per '{0}'", + "generic.noResults": "Non è stata trovata alcuna definizione", + "meta.title": " - Definizioni di {0}", + "actions.goToDecl.label": "Vai alla definizione", + "actions.goToDeclToSide.label": "Apri definizione lateralmente", + "actions.previewDecl.label": "Visualizza la definizione", + "goToImplementation.noResultWord": "Non sono state trovate implementazioni per '{0}'", + "goToImplementation.generic.noResults": "Non sono state trovate implementazioni", + "meta.implementations.title": "- {0} implementazioni", + "actions.goToImplementation.label": "Vai all'implementazione", + "actions.peekImplementation.label": "Anteprima implementazione", + "goToTypeDefinition.noResultWord": "Non sono state trovate definizioni di tipi per '{0}'", + "goToTypeDefinition.generic.noResults": "Non sono state trovate definizioni di tipi", + "meta.typeDefinitions.title": " - {0} definizioni di tipo", + "actions.goToTypeDefinition.label": "Vai alla definizione di tipo", + "actions.peekTypeDefinition.label": "Anteprima definizione di tipo" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..fa526a1f9e6c3 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Fare clic per visualizzare {0} definizioni." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/ita/src/vs/platform/markers/common/problemMatcher.i18n.json index a2611139aecce..87b88acd38842 100644 --- a/i18n/ita/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/ita/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,6 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "Errore: la proprietà {0} del criterio non è un nome di variabile criterio valido.", "ProblemMatcherParser.problemPattern.watchingMatcher": "Un matcher problemi deve definire un criterio di inizio e un criterio di fine per il controllo.", "ProblemMatcherParser.invalidRegexp": "Errore: la stringa {0} non è un'espressione regolare valida.\n", + "WatchingPatternSchema.regexp": "L'espressione regolare per rilevare l'inizio o la fine di un'attività in background.", "WatchingPatternSchema.file": "Indice del gruppo di corrispondenze del nome file. Può essere omesso.", "PatternTypeSchema.name": "Nome di un criterio predefinito o aggiunto come contributo", "PatternTypeSchema.description": "Criterio di problema o nome di un criterio di problema predefinito o aggiunto come contributo. Può essere omesso se si specifica base.", @@ -42,6 +43,12 @@ "ProblemMatcherSchema.severity": "Gravità predefinita per i problemi di acquisizione. Viene usato se il criterio non definisce un gruppo di corrispondenze per la gravità.", "ProblemMatcherSchema.applyTo": "Controlla se un problema segnalato in un documento di testo è valido solo per i documenti aperti o chiusi oppure per tutti i documenti.", "ProblemMatcherSchema.fileLocation": "Consente di definire come interpretare i nomi file indicati in un criterio di problema.", + "ProblemMatcherSchema.background": "Criteri per tenere traccia dell'inizio e della fine di un matcher attivo su un'attività in background.", + "ProblemMatcherSchema.background.activeOnStart": "Se impostato a true, il monitor in backbround è in modalità attiva quando l'attività inizia. Equivale a inviare una riga che corrisponde al beginPattern", + "ProblemMatcherSchema.background.beginsPattern": "Se corrisponde nell'output, viene segnalato l'avvio di un'attività in background.", + "ProblemMatcherSchema.background.endsPattern": "Se corrisponde nell'output, viene segnalata la fine di un'attività in background.", + "ProblemMatcherSchema.watching.deprecated": "La proprietà watching è deprecata. In alternativa, utilizzare background (sfondo).", + "ProblemMatcherSchema.watching": "Criteri per tenere traccia dell'inizio e della fine di un matcher watching.", "ProblemMatcherSchema.watching.activeOnStart": "Se impostato su true, indica che il watcher è in modalità attiva all'avvio dell'attività. Equivale a inviare una riga che corrisponde al criterio di avvio", "ProblemMatcherSchema.watching.beginsPattern": "Se corrisponde nell'output, viene segnalato l'avvio di un'attività di controllo.", "ProblemMatcherSchema.watching.endsPattern": "Se corrisponde nell'output, viene segnalata la fine di un'attività di controllo.", diff --git a/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json index c034a8cc727bf..b13e3a07bdd86 100644 --- a/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "Visualizza", "help": "Guida", "file": "File", + "developer": "Sviluppatore", "showEditorTabs": "Controlla se visualizzare o meno gli editor aperti in schede.", "editorTabCloseButton": "Controlla la posizione dei pulsanti di chiusura delle schede dell'editor oppure li disabilita quando è impostata su 'off'.", "showIcons": "Controlla se visualizzare o meno un'icona per gli editor aperti. Richiede l'abilitazione anche di un tema dell'icona.", diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..6c3f2e984e8d1 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "Disabilitare altre mappature tastiera per evitare conflitti tra tasti di scelta rapida?", + "yes": "Sì", + "no": "No" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 5f1557087a04f..a3c0e1da94b45 100644 --- a/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "Consente di configurare le associazioni tra file e linguaggi, ad esempio \"*.extension\": \"html\". Queste hanno la precedenza sulle associazioni predefinite dei linguaggi installate.", "encoding": "Codifica del set di caratteri predefinita da usare durante la lettura e la scrittura di file.", "autoGuessEncoding": "Quando questa opzione è abilitata, la codifica del set di caratteri viene ipotizzata all'apertura dei file", - "eol": "Carattere di fine riga predefinito.", "trimTrailingWhitespace": "Se è abilitato, taglierà lo spazio vuoto quando si salva un file.", "insertFinalNewline": "Se è abilitato, inserisce un carattere di nuova riga finale alla fine del file durante il salvataggio.", "files.autoSave.off": "Un file dirty non viene mai salvato automaticamente.", diff --git a/i18n/ita/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 18ae03ff77a60..158ed123e7aca 100644 --- a/i18n/ita/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,9 @@ // Do not edit this file. It is machine generated. { "slow": "È stato rilevato un rallentamento all'avvio", - "slow.detail": "È stato appena rilevato un rallentamento all'avvio. Per consentire a Microsoft di analizzare e risolvere il problema, riavviare '{0}' con la profilatura abilitata e condividere i profili." + "slow.detail": "È stato appena rilevato un rallentamento all'avvio. Per consentire a Microsoft di analizzare e risolvere il problema, riavviare '{0}' con la profilatura abilitata e condividere i profili.", + "prof.message": "I profili sono stati creati.", + "prof.detail": "Creare un problema e allegare manualmente i file seguenti:\n{0}", + "prof.restartAndFileIssue": "Crea problema e riavvia", + "prof.restart": "Riavvia" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index d2d18b208df55..01f19048853a9 100644 --- a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,6 +5,11 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Benvenuti", + "welcomePage.typeScript": "TypeScript", + "welcomePage.php": "PHP", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", "welcomePage.keymapAlreadyInstalled": "I tasti di scelta rapida di {0} sono già installati.", "welcomePage.willReloadAfterInstallingKeymap": "La finestra verrà ricaricata dopo l'installazione dei tasti di scelta rapida di {0}.", "welcomePage.installingKeymap": "Installazione dei tasti di scelta rapida di {0}...", diff --git a/i18n/jpn/extensions/jake/out/main.i18n.json b/i18n/jpn/extensions/jake/out/main.i18n.json index 8b6ad71cd4e6d..0f77342ecbcca 100644 --- a/i18n/jpn/extensions/jake/out/main.i18n.json +++ b/i18n/jpn/extensions/jake/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Jake のエラーによる失敗を自動検出: {0}" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/jake/package.i18n.json b/i18n/jpn/extensions/jake/package.i18n.json index 8b6ad71cd4e6d..def0eab1b4ce2 100644 --- a/i18n/jpn/extensions/jake/package.i18n.json +++ b/i18n/jpn/extensions/jake/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.jake.autoDetect": "Jake タスクの自動検出をオンにするかオフにするかを制御します。既定はオンです。" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/markdown/out/extension.i18n.json b/i18n/jpn/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/package.i18n.json b/i18n/jpn/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/npm/package.i18n.json b/i18n/jpn/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/typescript/package.i18n.json b/i18n/jpn/extensions/typescript/package.i18n.json index e30965564d08b..d3f776eaa1130 100644 --- a/i18n/jpn/extensions/typescript/package.i18n.json +++ b/i18n/jpn/extensions/typescript/package.i18n.json @@ -33,10 +33,13 @@ "javascript.validate.enable": "JavaScript の検証を有効/無効にします。", "typescript.goToProjectConfig.title": "プロジェクト構成に移動", "javascript.goToProjectConfig.title": "プロジェクト構成に移動", + "javascript.referencesCodeLens.enabled": "JavaScript ファイル内で CodeLens の参照を有効/無効にします。", + "typescript.referencesCodeLens.enabled": "TypeScript ファイル内で CodeLens の参照を有効/無効にします。TypeScript 2.0.6 以上が必要です。", "typescript.implementationsCodeLens.enabled": "CodeLens の実装を有効/無効にします。TypeScript 2.2.0 以上が必要です。", "typescript.openTsServerLog.title": "TS サーバーのログを開く", "typescript.selectTypeScriptVersion.title": "TypeScript のバージョンの選択", "jsDocCompletion.enabled": " 自動 JSDoc コメントを有効/無効にします", "javascript.implicitProjectConfig.checkJs": "JavaScript ファイルのセマンティック チェックを有効/無効にします。既存の jsconfi.json や tsconfi.json ファイルの設定はこれより優先されます。TypeScript は 2.3.1 以上である必要があります。", - "typescript.check.npmIsInstalled": "型定義の自動取得に NPM がインストールされているかどうかを確認する" + "typescript.check.npmIsInstalled": "型定義の自動取得に NPM がインストールされているかどうかを確認する", + "javascript.nameSuggestions": "JavaScript の候補リスト内でファイルから一意の名前を含むかどうかを有効/無効にします。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index ea2e47d981329..e70844baf7b3f 100644 --- a/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "イメージが大きすぎてエディターに表示できません。", - "resourceOpenExternalButton": "イメージを開く", - "resourceOpenExternalText": " 外部プログラムを使用していますか?", "nativeBinaryError": "このファイルはバイナリか、非常に大きいか、またはサポートされていないテキスト エンコードを使用しているため、エディターに表示されません。", "sizeB": "{0}B", "sizeKB": "{0}KB", diff --git a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json index da6b50dacf075..8ce8d297e0025 100644 --- a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -41,7 +41,6 @@ "formatOnType": "エディターで入力後に自動的に行の書式設定を行うかどうかを制御します", "formatOnPaste": "貼り付けた内容がエディターにより自動的にフォーマットされるかどうかを制御します。フォーマッタを使用可能にする必要があります。また、フォーマッタがドキュメント内の範囲をフォーマットできなければなりません。", "suggestOnTriggerCharacters": "トリガー文字の入力時に候補が自動的に表示されるようにするかどうかを制御します", - "acceptSuggestionOnEnter": "'Tab' キーに加えて 'Enter' キーで候補を受け入れるかどうかを制御します。改行の挿入や候補の反映の間であいまいさを解消するのに役立ちます。", "acceptSuggestionOnCommitCharacter": "コミット文字で候補を受け入れるかどうかを制御します。たとえば、JavaScript ではセミコロン (';') をコミット文字にして、候補を受け入れてその文字を入力することができます。", "snippetSuggestions": "他の修正候補と一緒にスニペットを表示するかどうか、およびその並び替えの方法を制御します。", "emptySelectionClipboard": "選択範囲を指定しないでコピーする場合に現在の行をコピーするかどうかを制御します。", @@ -63,6 +62,7 @@ "renderLineHighlight": "エディターが現在の行をどのように強調表示するかを制御します。考えられる値は 'none'、'gutter'、'line'、'all' です。", "codeLens": "エディターで CodeLens を表示するかどうかを制御する", "folding": "エディターでコードの折りたたみを有効にするかどうかを制御します", + "showFoldingControls": "余白上の折りたたみコントロールを自動的に非表示にするかどうかを制御します 。", "matchBrackets": "かっこを選択すると、対応するかっこを強調表示します。", "glyphMargin": "エディターで縦のグリフ余白が表示されるかどうかを制御します。ほとんどの場合、グリフ余白はデバッグに使用されます。", "useTabStops": "空白の挿入や削除はタブ位置に従って行われます", diff --git a/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..624f9b7af7030 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "'{0}' の定義は見つかりません", + "generic.noResults": "定義が見つかりません", + "meta.title": " – {0} 個の定義", + "actions.goToDecl.label": "定義へ移動", + "actions.goToDeclToSide.label": "定義を横に開く", + "actions.previewDecl.label": "定義をここに表示", + "goToImplementation.noResultWord": "'{0}' の実装が見つかりません", + "goToImplementation.generic.noResults": "実装が見つかりません", + "meta.implementations.title": "– {0} 個の実装", + "actions.goToImplementation.label": "実装に移動", + "actions.peekImplementation.label": "実装のプレビュー", + "goToTypeDefinition.noResultWord": "'{0}' の型定義が見つかりません", + "goToTypeDefinition.generic.noResults": "型定義が見つかりません", + "meta.typeDefinitions.title": " – {0} 個の型定義", + "actions.goToTypeDefinition.label": "型定義へ移動", + "actions.peekTypeDefinition.label": "型定義を表示" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..f918ba9f96d5c --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "クリックして、{0} の定義を表示します。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index b5c107a4338c7..65e2583d291f2 100644 --- a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -12,6 +12,7 @@ "readMore": "詳細を表示...{0}", "suggestionWithDetailsAriaLabel": "{0}、候補、詳細あり", "suggestionAriaLabel": "{0}、候補", + "readLess": "詳細を隠す...{0}", "suggestWidget.loading": "読み込んでいます...", "suggestWidget.noSuggestions": "候補はありません。", "suggestionAriaAccepted": "{0}、受け入れ済み", diff --git a/i18n/jpn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/jpn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index 991783c660296..7f3e60f73e417 100644 --- a/i18n/jpn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/jpn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -16,6 +16,7 @@ "schema.autoClosingPairs": "角かっこのペアを定義します。左角かっこが入力されると、右角かっこが自動的に挿入されます。", "schema.autoClosingPairs.notIn": "自動ペアが無効なスコープの一覧を定義します。", "schema.surroundingPairs": "選択文字列を囲むときに使用できる角かっこのペアを定義します。", + "schema.wordPattern": "言語のための単語の定義。", "schema.wordPattern.pattern": "言葉の照合に使用する正規表現パターン。", "schema.wordPattern.flags": "言葉の照合に使用する正規表現フラグ。", "schema.wordPattern.flags.errorMessage": "`/^([gimuy]+)$/` パターンに一致する必要があります。" diff --git a/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json index 2bbfe1d0b1d59..df4f3d19acde8 100644 --- a/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,6 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "エラー: パターン プロパティ {0} は有効なパターン変数名ではありません。", "ProblemMatcherParser.problemPattern.watchingMatcher": "問題マッチャーは、ウォッチ対象の開始パターンと終了パターンの両方を定義する必要があります。", "ProblemMatcherParser.invalidRegexp": "エラー: 文字列 {0} は、有効な正規表現ではありません。\n", + "WatchingPatternSchema.regexp": "バックグラウンド タスクの開始または終了を検出する正規表現。", "WatchingPatternSchema.file": "ファイル名の一致グループ インデックス。省略できます。", "PatternTypeSchema.name": "提供されたか事前定義された問題パターンの名前", "PatternTypeSchema.description": "A problem pattern or the name of a contributed or predefined problem pattern. Can be omitted if base is specified.", @@ -42,6 +43,12 @@ "ProblemMatcherSchema.severity": "キャプチャされた問題の既定の重大度。パターンが重要度の一致グループを定義していない場合に使用されます。", "ProblemMatcherSchema.applyTo": "テキスト ドキュメントで報告された問題が、開いているドキュメントのみ、閉じられたドキュメントのみ、すべてのドキュメントのいずれに適用されるかを制御します。", "ProblemMatcherSchema.fileLocation": "問題パターンで報告されたファイル名を解釈する方法を定義します。", + "ProblemMatcherSchema.background": "バックグラウンド タスクでアクティブなマッチャーの開始と終了を追跡するパターン。", + "ProblemMatcherSchema.background.activeOnStart": "true に設定すると、タスクの開始時にバックグラウンド モニターがアクティブ モードになります。これは beginPattern と一致する行の発行と同等です。", + "ProblemMatcherSchema.background.beginsPattern": "出力内で一致すると、バックグラウンド タスクの開始が通知されます。", + "ProblemMatcherSchema.background.endsPattern": "出力内で一致すると、バックグラウンド タスクの終了が通知されます。", + "ProblemMatcherSchema.watching.deprecated": "watching プロパティは使用されなくなりました。代わりに background をご使用ください。", + "ProblemMatcherSchema.watching": "監視パターンの開始と終了を追跡するマッチャー。", "ProblemMatcherSchema.watching.activeOnStart": "true に設定すると、タスクの開始時にウォッチャーがアクティブ モードになります。これは beginPattern と一致する行の発行と同等です。", "ProblemMatcherSchema.watching.beginsPattern": "出力内で一致すると、ウォッチ中のタスクの開始が通知されます。", "ProblemMatcherSchema.watching.endsPattern": "出力内で一致すると、ウォッチ中のタスクの終了が通知されます。", diff --git a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json index 8da89f6115cfe..9872f49057d61 100644 --- a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -60,6 +60,7 @@ "editorBackground": "エディターの背景色。", "editorForeground": "エディターの既定の前景色。", "editorWidgetBackground": "検索/置換窓など、エディター ウィジェットの背景色。", + "editorWidgetBorder": "エディター ウィジェットの境界線の色。", "editorSelection": "エディターの選択範囲の色。", "editorInactiveSelection": "非アクティブなエディターの選択範囲の色。", "editorSelectionHighlight": "選択範囲と同じコンテンツの領域の色。", diff --git a/i18n/jpn/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/jpn/src/vs/workbench/api/node/extHostTreeViews.i18n.json index 8b6ad71cd4e6d..74c5f0eabd702 100644 --- a/i18n/jpn/src/vs/workbench/api/node/extHostTreeViews.i18n.json +++ b/i18n/jpn/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "treeView.notRegistered": "ID '{0}' のツリー ビューは登録されていません。", + "treeItem.notFound": "ID '{0}' のツリー項目は見つかりませんでした。", + "treeView.duplicateElement": " {0} 要素は既に登録されています。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/common/theme.i18n.json b/i18n/jpn/src/vs/workbench/common/theme.i18n.json index b361c556bdcec..d183c26792491 100644 --- a/i18n/jpn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/jpn/src/vs/workbench/common/theme.i18n.json @@ -32,6 +32,7 @@ "activityBarBadgeBackground": "アクティビティ通知バッジの背景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", "activityBarBadgeForeground": "アクティビティ通知バッジの前景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", "sideBarBackground": "サイド バーの背景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", + "sideBarForeground": "サイド バーの前景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", "sideBarTitleForeground": "サイド バーのタイトルの前景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", "sideBarSectionHeaderBackground": "サイド バーのセクション ヘッダーの背景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", "titleBarActiveForeground": "ウィンドウがアクティブな場合のタイトル バーの前景。現在、この色は macOS でのみサポートされているのでご注意ください。", diff --git a/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json index e69cb0fb627aa..d813d5f6c23c6 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "表示", "help": "ヘルプ", "file": "ファイル", + "developer": "開発者", "showEditorTabs": "開いているエディターをタブに表示するかどうかを制御します。", "editorTabCloseButton": "エディター タブの閉じるボタンの位置を制御するか、[off] に設定した場合に無効にします。", "showIcons": "開いているエディターをアイコンで表示するかどうかを制御します。これには、アイコンのテーマを有効にする必要もあります。", diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index e57fd60ee0de5..8943a8809bd0f 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "値のコピー", "copy": "コピー", + "copyAll": "すべてコピー", "copyStackTrace": "呼び出し履歴のコピー" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index af68e40b4aef2..d63fe387f50b0 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "デバッグ アダプターの実行可能ファイル '{0}' がありません。", "debugAdapterCannotDetermineExecutable": "デバッグ アダプター '{0}' の実行可能ファイルを判別できません。", "debugType": "構成の種類。", + "debugTypeNotRecognised": "デバッグの種類は認識されませんでした。対応するデバッグの拡張機能がインストールされており、有効になっていることを確認してください。", "node2NotSupported": "\"node2\" はサポートされていません。代わりに \"node\" を使用し、\"protocol\" 属性を \"inspector\" に設定してください。", "debugName": "構成の名前。起動構成のドロップダウン メニューに表示されます。", "debugRequest": "構成の要求の種類。\"launch\" または \"attach\" です。", diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..e5b2af33ec37b 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "キーバインド間の競合を回避するために、他のキーマップを無効にしますか?", + "yes": "はい", + "no": "いいえ" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 15c3aee15db3c..9356fa119aaae 100644 --- a/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "言語に対するファイルの関連付け (例 \"*.extension\": \"html\") を構成します。これらの関連付けは、インストールされている言語の既定の関連付けより優先されます。", "encoding": "ファイルの読み取り/書き込みで使用する既定の文字セット エンコーディング。", "autoGuessEncoding": "有効な場合、ファイルを開くときに文字セット エンコードを推測します", - "eol": "既定の改行文字。", "trimTrailingWhitespace": "有効にすると、ファイルの保存時に末尾の空白をトリミングします。", "insertFinalNewline": "有効にすると、ファイルの保存時に最新の行を末尾に挿入します。", "files.autoSave.off": "ダーティ ファイルを自動的に保存することはしません。", @@ -27,6 +26,8 @@ "autoSaveDelay": "ダーティ ファイルの自動保存の遅延をミリ秒単位で制御します。'files.autoSave' が '{0}' に設定されている場合のみ適用されます", "watcherExclude": "ファイル モニタリングから除外するファイル パスの glob パターンを構成します。この設定を変更すると、再起動が必要になります。始動時に Code が消費する CPU 時間が多い場合は、大規模なフォルダーを除外して初期ロードを減らせます。", "hotExit.off": "Hot Exit を無効にします。", + "hotExit.onExit": "アプリケーションが閉じると (Windows/Linux で最後のウィンドウが閉じるとき、または workbench.action.quit コマンドがトリガーされるとき (コマンド パレット、キー バインド、メニュー))、Hot Exit がトリガーされます。バックアップされているすべてのウィンドウは、次の起動時に復元されます。", + "hotExit.onExitAndWindowClose": "アプリケーションが閉じると (Windows/Linux で最後のウィンドウが閉じるとき、または workbench.action.quit コマンドがトリガーするとき (コマンド パレット、キー バインド、メニュー))、Hot Exit がトリガーされます。また、フォルダーが開かれているウィンドウについても、それが最後のウィンドウかどうかに関係なく、Hot Exit がトリガーされます。フォルダーが開かれていないウィンドウはすべて、次回の起動時に復元されます。フォルダーのウィンドウをシャットダウン前と同じ状態に復元するには、\"window.reopenFolders\" を \"all\" に設定します。", "hotExit": "エディターを終了するときに保存を確認するダイアログを省略し、保存されていないファイルをセッション後も保持するかどうかを制御します。", "defaultLanguage": "新しいファイルに割り当てられる既定の言語モード。", "editorConfigurationTitle": "エディター", diff --git a/i18n/jpn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index a71fcb6fc945c..e14e57a90eb79 100644 --- a/i18n/jpn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,11 @@ // Do not edit this file. It is machine generated. { "slow": "スタートアップの遅延が検出されました", - "slow.detail": "スタートアップが遅かったとのこと、申し訳ございません。プロファイルを有効にして、'{0}' を再起動し、プロファイルを共有してください。スタートアップの改善のために参考にさせていただきます。" + "slow.detail": "スタートアップが遅かったとのこと、申し訳ございません。プロファイルを有効にして、'{0}' を再起動し、プロファイルを共有してください。スタートアップの改善のために参考にさせていただきます。", + "prof.message": "プロファイルが正常に作成されました。", + "prof.detail": "案件を作成し、手動で次のファイルを添付してください:\\n{0}", + "prof.restartAndFileIssue": "問題を作成して再起動", + "prof.restart": "再起動", + "prof.thanks": "ご協力いただき、ありがとうございます。", + "prof.detail.restart": "'{0}' を引き続き使用するには、最後の再起動が必要です。 改めてあなたの貢献に感謝します。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 0a35cdb1be9b0..dba4d278b1447 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "設定を書き込めません。ファイル内のエラー/警告を修正してからもう一度お試しください。", "editTtile": "編集", "replaceDefaultValue": "設定を置換", "copyDefaultValue": "設定にコピー", diff --git a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index b650b0b0eb32f..d45b84374594d 100644 --- a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "Git を表示", + "installAdditionalSCMProviders": "その他の SCM プロバイダーをインストール...", "source control": "ソース管理", "toggleSCMViewlet": "SCM を表示", "view": "表示" diff --git a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index d53de2c62b070..d93c7d2fb84f6 100644 --- a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "その他の SCM プロバイダーをインストール...", "switch provider": "SCM プロバイダーの切り替え..." } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index c0432625724e1..f7db07a2e2d5c 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks" + "entryAriaLabel": "{0}, tasks", + "workspace": "ワークスペースから", + "extension": "拡張機能から" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index 37bbf2ce2e01a..1e77cbdffdfe9 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -5,6 +5,6 @@ // Do not edit this file. It is machine generated. { "tasksAriaLabel": "再開するタスクの名前を入力します", - "noTasksMatching": "No tasks matching", + "noTasksMatching": "一致するタスクがありません", "noTasksFound": "再開するタスクはありません" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index 99543dd018aa6..5a397f34e036d 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -5,6 +5,6 @@ // Do not edit this file. It is machine generated. { "tasksAriaLabel": "実行するタスクの名前を入力します", - "noTasksMatching": "No tasks matching", + "noTasksMatching": "一致するタスクがありません", "noTasksFound": "タスクが見つかりません" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 12b9c699bf24f..440b92fd91d74 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,6 @@ { "TerminalTaskSystem.unknownError": "タスクの実行中に不明なエラーが発生しました。詳細については、タスク出力ログを参照してください。", "TerminalTaskSystem.terminalName": "タスク - {0}", - "TerminalTaskSystem": "UNC ドライブでシェル コマンドを実行できません。" + "TerminalTaskSystem": "UNC ドライブでシェル コマンドを実行できません。", + "unkownProblemMatcher": "問題マッチャー {0} は解決できませんでした。マッチャーは無視されます" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index 6f9be6076a6bf..0cc1f921982e6 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "タスクの実行中に不明なエラーが発生しました。詳細については、タスク出力ログを参照してください。", "TaskRunnerSystem.watchingBuildTaskFinished": "\nビルド タスクのウォッチが終了しました。", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\nユーザー要求ごとにタスク '{0}' が終了しました。" + "TaskRunnerSystem.cancelRequested": "\nユーザー要求ごとにタスク '{0}' が終了しました。", + "unkownProblemMatcher": "問題マッチャー {0} は解決できませんでした。マッチャーは無視されます" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 799b12a797bdc..e7930c9cd7a69 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -26,5 +26,7 @@ "workbench.action.terminal.scrollUp": "上にスクロール (行)", "workbench.action.terminal.scrollUpPage": "スクロール アップ (ページ)", "workbench.action.terminal.scrollToTop": "一番上にスクロール", - "workbench.action.terminal.clear": "クリア" + "workbench.action.terminal.clear": "クリア", + "workbench.action.terminal.allowWorkspaceShell": "ワークスペースでシェルを構成することを許可する", + "workbench.action.terminal.disallowWorkspaceShell": "ワークスペースでシェルを構成することを許可しない" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 89ac9d8c928e1..7592dde26b53f 100644 --- a/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,6 +6,7 @@ { "selectTheme.label": "配色テーマ", "installColorThemes": "その他の配色テーマをインストール...", + "themes.selectTheme": "配色テーマの選択 (上/下キーでプレビュー可能)", "selectIconTheme.label": "ファイル アイコンのテーマ", "installIconThemes": "その他のファイル アイコンのテーマをインストール...", "noIconThemeLabel": "なし", diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 587eecb5f9d51..950f340d9ae19 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,18 +11,25 @@ "welcomePage.openFolder": "フォルダーを開く...", "welcomePage.cloneGitRepository": "Git リポジトリを複製...", "welcomePage.recent": "最近", + "welcomePage.moreRecent": "その他", "welcomePage.noRecentFolders": "最近使用したフォルダーなし", "welcomePage.help": "ヘルプ", + "welcomePage.keybindingsCheatsheet": "印刷可能なキーボードのチートシート", "welcomePage.introductoryVideos": "紹介ビデオ", "welcomePage.productDocumentation": "製品ドキュメント", "welcomePage.gitHubRepository": "GitHub リポジトリ", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "起動時にウェルカム ページを表示", "welcomePage.customize": "カスタマイズする", + "welcomePage.installExtensionPacks": "ツールと言語", + "welcomePage.installExtensionPacksDescription": "{0} と {1} のサポートをインストールする ", + "welcomePage.moreExtensions": "その他", "welcomePage.installKeymapDescription": "キーボード ショートカットをインストールします", + "welcomePage.installKeymapExtension": "{0} と {1} のキーボード ショートカットをインストール", "welcomePage.others": "その他", "welcomePage.colorTheme": "配色テーマ", "welcomePage.colorThemeDescription": "エディターとコードの外観を自由に設定します", + "welcomePage.learn": "学ぶ", "welcomePage.showCommands": "すべてのコマンドの検索と実行", "welcomePage.showCommandsDescription": "コントロール パネルからコマンドを検索してすばやくアクセスします ({0})", "welcomePage.interfaceOverview": "インターフェイスの概要", diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 07b2eb85861d5..eba406025bbb4 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,27 @@ // Do not edit this file. It is machine generated. { "welcomePage": "ようこそ", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "{0} のサポートは既にインストールされています。", + "welcomePage.willReloadAfterInstallingExtensionPack": "{0} のサポートをインストールした後、ウィンドウが再度読み込まれます。", + "welcomePage.installingExtensionPack": "{0} のサポートをインストール...", + "welcomePage.extensionPackNotFound": "ID {1} のサポート {0} は見つかりませんでした。", "welcomePage.keymapAlreadyInstalled": "キーボード ショートカット {0} は既にインストールされています。", "welcomePage.willReloadAfterInstallingKeymap": "キーボード ショートカット {0} をインストールした後、ウィンドウが再度読み込まれます。", "welcomePage.installingKeymap": "{0} のキーボード ショートカットをインストールしています...", "welcomePage.keymapNotFound": "ID {1} のキーボード ショートカット {0} は見つかりませんでした。", "welcome.title": "ようこそ", + "welcomePage.extensionListSeparator": ",", + "welcomePage.installedExtension": "{0} (インストール済み) ", "ok": "OK", - "cancel": "キャンセル" + "cancel": "キャンセル", + "welcomePage.quickLinkBackground": "ウェルカム ページのクイック リンクの背景色。", + "welcomePage.quickLinkHoverBackground": "ウェルカム ページのクイック リンクのホバー背景色。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 0c7056bc9fcc8..81d7a645e3290 100644 --- a/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -6,6 +6,7 @@ { "open": "設定を開く", "close": "閉じる", + "saveAndRetry": "設定を保存して再試行", "errorUnknownKey": "構成ファイルに書き込めません (不明なキー)", "errorInvalidTarget": "構成ファイルに書き込めません (無効なターゲット)", "errorNoWorkspaceOpened": "開いているフォルダーがないため、設定を書き込めません。最初にフォルダーを開いてから、もう一度お試しください。", diff --git a/i18n/kor/extensions/markdown/out/extension.i18n.json b/i18n/kor/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/kor/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/kor/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/kor/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/extensions/merge-conflict/package.i18n.json b/i18n/kor/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/extensions/npm/package.i18n.json b/i18n/kor/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/kor/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index def2cd28d67c8..4266985efc958 100644 --- a/i18n/kor/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/kor/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "이미지가 너무 커서 편집기에 표시할 수 없습니다. ", - "resourceOpenExternalButton": "이미지 열기", - "resourceOpenExternalText": " 외부 프로그램을 사용할까요?", "nativeBinaryError": "파일이 이진이거나 매우 크거나 지원되지 않는 텍스트 인코딩을 사용하기 때문에 편집기에서 표시되지 않습니다.", "sizeB": "{0}B", "sizeKB": "{0}KB", diff --git a/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json index 185383233538c..18aff6704bea0 100644 --- a/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -40,7 +40,6 @@ "formatOnType": "입력 후 편집기에서 자동으로 줄의 서식을 지정할지 여부를 제어합니다.", "formatOnPaste": "붙여넣은 콘텐츠의 서식을 편집기에서 자동으로 지정할지 여부를 제어합니다. 포맷터는 반드시 사용할 수 있어야 하며 문서에서 범위의 서식을 지정할 수 있어야 합니다.", "suggestOnTriggerCharacters": "트리거 문자를 입력할 때 제안을 자동으로 표시할지 여부를 제어합니다.", - "acceptSuggestionOnEnter": "'Tab' 키 외에 'Enter' 키에 대한 제안도 허용할지를 제어합니다. 새 줄을 삽입하는 동작과 제안을 허용하는 동작 간의 모호함을 없앨 수 있습니다.", "acceptSuggestionOnCommitCharacter": "커밋 문자에 대한 제안을 허용할지를 제어합니다. 예를 들어 JavaScript에서는 세미콜론(';')이 제안을 허용하고 해당 문자를 입력하는 커밋 문자일 수 있습니다.", "snippetSuggestions": "코드 조각이 다른 추천과 함께 표시되는지 여부 및 정렬 방법을 제어합니다.", "emptySelectionClipboard": "선택 영역 없이 현재 줄 복사 여부를 제어합니다.", diff --git a/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..eb7148607bdaa --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "'{0}'에 대한 정의를 찾을 수 없습니다.", + "generic.noResults": "정의를 찾을 수 없음", + "meta.title": "– {0} 정의", + "actions.goToDecl.label": "정의로 이동", + "actions.goToDeclToSide.label": "측면에서 정의 열기", + "actions.previewDecl.label": "정의 피킹(Peeking)", + "goToImplementation.noResultWord": "'{0}'에 대한 구현을 찾을 수 없습니다.", + "goToImplementation.generic.noResults": "구현을 찾을 수 없습니다.", + "meta.implementations.title": " – {0} 개 구현", + "actions.goToImplementation.label": "구현으로 이동", + "actions.peekImplementation.label": "구현 미리 보기", + "goToTypeDefinition.noResultWord": "'{0}'에 대한 형식 정의를 찾을 수 없습니다.", + "goToTypeDefinition.generic.noResults": "형식 정의를 찾을 수 없습니다.", + "meta.typeDefinitions.title": "– {0} 형식 정의", + "actions.goToTypeDefinition.label": "형식 정의로 이동", + "actions.peekTypeDefinition.label": "형식 정의 미리 보기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..57b4929798ff4 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "{0}개 정의를 표시하려면 클릭하세요." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json index 603999dbae9f4..4c30f4bc75c5c 100644 --- a/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "보기", "help": "도움말", "file": "파일", + "developer": "개발자", "showEditorTabs": "열려 있는 편집기를 탭에서 표시할지 여부를 제어합니다.", "editorTabCloseButton": "편집기의 탭 닫기 단추의 위치를 제어하거나 'off'로 설정된 경우 이 단추를 사용하지 않도록 설정합니다.", "showIcons": "열린 편집기를 아이콘과 함께 표시할지 여부를 제어합니다. 이를 위해서는 아이콘 테마도 사용하도록 설정해야 합니다.", diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..86d18d9fce388 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "키 바인딩 간 충돌을 피하기 위해 다른 키 맵을 사용하지 않도록 설정할까요?", + "yes": "예", + "no": "아니요" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index f9b799b1655ec..fe8ef9500cec1 100644 --- a/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "파일과 언어의 연결을 구성하세요(예: \"*.extension\": \"html\"). 이러한 구성은 설치된 언어의 기본 연결보다 우선 순위가 높습니다.", "encoding": "파일을 읽고 쓸 때 사용할 기본 문자 집합 인코딩입니다.", "autoGuessEncoding": "사용하도록 설정하는 경우 파일을 열 때 문자 집합 인코딩을 추측합니다.", - "eol": "줄 바꿈 문자의 기본 끝입니다.", "trimTrailingWhitespace": "사용하도록 설정되면 파일을 저장할 때 후행 공백이 잘립니다.", "insertFinalNewline": "사용하도록 설정되면 저장할 때 파일 끝에 마지막 줄바꿈을 삽입합니다.", "files.autoSave.off": "더티 파일이 자동으로 저장되지 않습니다.", diff --git a/i18n/kor/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 4b931297269d4..ef1cdc9bc0949 100644 --- a/i18n/kor/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,9 @@ // Do not edit this file. It is machine generated. { "slow": "느린 시작 감지됨", - "slow.detail": "방금 느리게 시작되었습니다. 프로파일링을 사용하도록 설정한 상태로 '{0}'을(를) 다시 시작하세요. 프로필을 공유해 주시면 다시 빠르게 시작될 수 있도록 최선을 다하겠습니다." + "slow.detail": "방금 느리게 시작되었습니다. 프로파일링을 사용하도록 설정한 상태로 '{0}'을(를) 다시 시작하세요. 프로필을 공유해 주시면 다시 빠르게 시작될 수 있도록 최선을 다하겠습니다.", + "prof.message": "프로필을 만들었습니다.", + "prof.detail": "문제를 발생시키고 다음 파일을 수동으로 첨부하세요.\n{0}", + "prof.restartAndFileIssue": "문제 만들기 및 다시 시작", + "prof.restart": "다시 시작" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index cb5666d331a15..a436e5a707b6c 100644 --- a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,6 +5,11 @@ // Do not edit this file. It is machine generated. { "welcomePage": "시작", + "welcomePage.typeScript": "TypeScript", + "welcomePage.php": "PHP", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", "welcomePage.keymapAlreadyInstalled": "{0} 바로 가기 키가 이미 설치되어 있습니다.", "welcomePage.willReloadAfterInstallingKeymap": "{0} 바로 가기 키를 설치한 후 창이 다시 로드됩니다.", "welcomePage.installingKeymap": "{0} 바로 가기 키를 설치하는 중...", diff --git a/i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json new file mode 100644 index 0000000000000..74a80b4280d24 --- /dev/null +++ b/i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "activeEditorShort": "e.g. meuArquivo.txt", + "activeEditorMedium": "e.g. minhaPasta/meuArquivo.txt", + "activeEditorLong": "e.g. /Usuarios/Desenvolvimento/meuProjeto/minhaPasta/meuArquivo.txt", + "rootName": "e.g. meuProjeto", + "rootPath": "e.g. /Usuarios/Desenvolvimento/meuProjeto", + "appName": "e.g. VS Code", + "dirty": "Um indicador de alteração se o editor ativo foi alterado", + "separator": "um separador condicional (' - ') que somente é mostrado quando envolvido por variáveis com valores", + "assocLabelFile": "Arquivos com Extensão", + "assocDescriptionFile": "Mapear todos arquivos que correspondem ao padrão global no seu nome de arquivo à linguagem com o identificador dado", + "assocLabelPath": "Arquivos com Caminho", + "assocDescriptionPath": "Mapear todos os arquivos que correspondem ao caminho absoluto global no seu caminho à linguagem com o identificador dado", + "fileLabel": "Arquivos por Extensão", + "fileDescription": "Combina todos os arquivos de uma extensão de arquivo específica.", + "filesLabel": "Arquivos com Várias Extensões", + "filesDescription": "Combina todos os arquivos com qualquer uma das extensões de arquivo.", + "derivedLabel": "Arquivos com Irmãos por Nome", + "derivedDescription": "Combina arquivos que têm irmãos com o mesmo nome, mas uma extensão diferente.", + "topFolderLabel": "Pasta por Nome (Nível Superior)", + "topFolderDescription": "Combina uma pasta de nível superior com um nome específico.", + "topFoldersLabel": "Pastas com Vários Nomes (Nível Superior)", + "topFoldersDescription": "Combina várias pastas de nível superior.", + "folderLabel": "Pasta por Nome (Qualquer Local)", + "folderDescription": "Combina uma pasta com um nome específico em qualquer local.", + "falseDescription": "Desabilita o padrão.", + "trueDescription": "Habilita o padrão.", + "siblingsDescription": "Combina arquivos que têm irmãos com o mesmo nome, mas uma extensão diferente.", + "languageSpecificEditorSettings": "Configurações do editor especificas para a linguagem", + "languageSpecificEditorSettingsDescription": "Sobrescrever as configurações do editor para a linguagem" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/css/client/out/cssMain.i18n.json b/i18n/ptb/extensions/css/client/out/cssMain.i18n.json new file mode 100644 index 0000000000000..a649796227bda --- /dev/null +++ b/i18n/ptb/extensions/css/client/out/cssMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cssserver.name": "Servidor de linguagem CSS" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/css/package.i18n.json b/i18n/ptb/extensions/css/package.i18n.json new file mode 100644 index 0000000000000..de011d44dcee1 --- /dev/null +++ b/i18n/ptb/extensions/css/package.i18n.json @@ -0,0 +1,67 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "css.lint.argumentsInColorFunction.desc": "Número inválido de parâmetros", + "css.lint.boxModel.desc": "Não use largura ou altura ao usar preenchimento ou borda", + "css.lint.compatibleVendorPrefixes.desc": "Ao usar um prefixo específico de fornecedor, certifique-se de também incluir todas as outras propriedades específicas do fornecedor", + "css.lint.duplicateProperties.desc": "Não use as definições de estilo duplicadas", + "css.lint.emptyRules.desc": "Não use conjuntos de regra em branco", + "css.lint.float.desc": "Evite usar 'float'. Floats levam a CSS frágil, que é fácil de quebrar se um aspecto do layout for alterado.", + "css.lint.fontFaceProperties.desc": "A regra @font-face deve definir propriedades 'src' e 'font-family'", + "css.lint.hexColorLength.desc": "Cores hexadecimais devem consistir em três ou seis números hexadecimais", + "css.lint.idSelector.desc": "Seletores não devem conter IDs, pois essas regras estão firmemente acopladas ao HTML.", + "css.lint.ieHack.desc": "IE hacks somente são necessários ao dar suporte ao IE7 e mais antigos", + "css.lint.important.desc": "Evite usar !important. Esta é uma indicação de que a especificidade do CSS inteiro saiu de controle e precisa ser fatorada novamente.", + "css.lint.importStatement.desc": "Instruções de importação não carregam em paralelo", + "css.lint.propertyIgnoredDueToDisplay.desc": "Propriedade ignorada devido à exibição. Por exemplo, com 'display: inline', as propriedades width, height, margin-top, margin-bottom e float não têm efeito", + "css.lint.universalSelector.desc": "O seletor universal (*) é conhecido por ser lento", + "css.lint.unknownProperties.desc": "Propriedade desconhecida.", + "css.lint.unknownVendorSpecificProperties.desc": "Propriedade específica do fornecedor desconhecida.", + "css.lint.vendorPrefix.desc": "Ao usar um prefixo específico do fornecedor, inclua também a propriedade padrão", + "css.lint.zeroUnits.desc": "Nenhuma unidade para zero é necessária", + "css.validate.desc": "Habilita ou desabilita todas as validações", + "less.lint.argumentsInColorFunction.desc": "Número inválido de parâmetros", + "less.lint.boxModel.desc": "Não use largura ou altura ao usar preenchimento ou borda", + "less.lint.compatibleVendorPrefixes.desc": "Ao usar um prefixo específico de fornecedor, certifique-se de também incluir todas as outras propriedades específicas do fornecedor", + "less.lint.duplicateProperties.desc": "Não use as definições de estilo duplicadas", + "less.lint.emptyRules.desc": "Não use conjuntos de regra em branco", + "less.lint.float.desc": "Evite usar 'float'. Floats levam a CSS frágil, que é fácil de quebrar se um aspecto do layout for alterado.", + "less.lint.fontFaceProperties.desc": "A regra @font-face deve definir propriedades 'src' e 'font-family'", + "less.lint.hexColorLength.desc": "Cores hexadecimais devem consistir em três ou seis números hexadecimais", + "less.lint.idSelector.desc": "Seletores não devem conter IDs, pois essas regras estão firmemente acopladas ao HTML.", + "less.lint.ieHack.desc": "IE hacks somente são necessários ao dar suporte ao IE7 e mais antigos", + "less.lint.important.desc": "Evite usar !important. Esta é uma indicação de que a especificidade do CSS inteiro saiu de controle e precisa ser fatorada novamente.", + "less.lint.importStatement.desc": "Instruções de importação não carregam em paralelo", + "less.lint.propertyIgnoredDueToDisplay.desc": "Propriedade ignorada devido à exibição. Por exemplo, com 'display: inline', as propriedades width, height, margin-top, margin-bottom e float não têm efeito", + "less.lint.universalSelector.desc": "O seletor universal (*) é conhecido por ser lento", + "less.lint.unknownProperties.desc": "Propriedade desconhecida.", + "less.lint.unknownVendorSpecificProperties.desc": "Propriedade específica do fornecedor desconhecida.", + "less.lint.vendorPrefix.desc": "Ao usar um prefixo específico do fornecedor, inclua também a propriedade padrão", + "less.lint.zeroUnits.desc": "Nenhuma unidade para zero é necessária", + "less.validate.desc": "Habilita ou desabilita todas as validações", + "scss.lint.argumentsInColorFunction.desc": "Número inválido de parâmetros", + "scss.lint.boxModel.desc": "Não use largura ou altura ao usar preenchimento ou borda", + "scss.lint.compatibleVendorPrefixes.desc": "Ao usar um prefixo específico de fornecedor, certifique-se de também incluir todas as outras propriedades específicas do fornecedor", + "scss.lint.duplicateProperties.desc": "Não use as definições de estilo duplicadas", + "scss.lint.emptyRules.desc": "Não use conjuntos de regra em branco", + "scss.lint.float.desc": "Evite usar 'float'. Floats levam a CSS frágil, que é fácil de quebrar se um aspecto do layout for alterado.", + "scss.lint.fontFaceProperties.desc": "A regra @font-face deve definir propriedades 'src' e 'font-family'", + "scss.lint.hexColorLength.desc": "Cores hexadecimais devem consistir em três ou seis números hexadecimais", + "scss.lint.idSelector.desc": "Seletores não devem conter IDs, pois essas regras estão firmemente acopladas ao HTML.", + "scss.lint.ieHack.desc": "IE hacks somente são necessários ao dar suporte ao IE7 e mais antigos", + "scss.lint.important.desc": "Evite usar !important. Esta é uma indicação de que a especificidade do CSS inteiro saiu de controle e precisa ser fatorada novamente.", + "scss.lint.importStatement.desc": "Instruções de importação não carregam em paralelo", + "scss.lint.propertyIgnoredDueToDisplay.desc": "Propriedade ignorada devido à exibição. Por exemplo, com 'display: inline', as propriedades width, height, margin-top, margin-bottom e float não têm efeito", + "scss.lint.universalSelector.desc": "O seletor universal (*) é conhecido por ser lento", + "scss.lint.unknownProperties.desc": "Propriedade desconhecida.", + "scss.lint.unknownVendorSpecificProperties.desc": "Propriedade específica do fornecedor desconhecida.", + "scss.lint.vendorPrefix.desc": "Ao usar um prefixo específico do fornecedor, inclua também a propriedade padrão", + "scss.lint.zeroUnits.desc": "Nenhuma unidade para zero é necessária", + "scss.validate.desc": "Habilita ou desabilita todas as validações", + "less.colorDecorators.enable.desc": "Habilita ou desabilita decoradores de cores", + "scss.colorDecorators.enable.desc": "Habilita ou desabilita decoradores de cores", + "css.colorDecorators.enable.desc": "Habilita ou desabilita decoradores de cores" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/extension-editing/out/packageDocumentHelper.i18n.json b/i18n/ptb/extensions/extension-editing/out/packageDocumentHelper.i18n.json new file mode 100644 index 0000000000000..8505afd6d4a89 --- /dev/null +++ b/i18n/ptb/extensions/extension-editing/out/packageDocumentHelper.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "languageSpecificEditorSettings": "Configurações do editor especificas para a linguagem", + "languageSpecificEditorSettingsDescription": "Sobrescrever as configurações do editor para a linguagem" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/askpass-main.i18n.json b/i18n/ptb/extensions/git/out/askpass-main.i18n.json new file mode 100644 index 0000000000000..280b14bd0d70c --- /dev/null +++ b/i18n/ptb/extensions/git/out/askpass-main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "missOrInvalid": "Credenciais ausentes ou inválidas." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/commands.i18n.json b/i18n/ptb/extensions/git/out/commands.i18n.json new file mode 100644 index 0000000000000..ab5667e260b82 --- /dev/null +++ b/i18n/ptb/extensions/git/out/commands.i18n.json @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tag at": "Etiqueta em {0}", + "remote branch at": "Ramo remoto em {0}", + "repourl": "URL do repositório", + "parent": "Diretório pai", + "cloning": "Clonando repositório do Git...", + "openrepo": "Abrir Repositório", + "proposeopen": "Gostaria de abrir o repositório clonado?", + "confirm revert": "Tem certeza que deseja reverter as alterações selecionadas em {0}?", + "revert": "Reverter as alterações", + "confirm discard": "Tem certeza que deseja descartar as alterações em {0}?", + "confirm discard multiple": "Tem certeza que deseja descartar as alterações em {0} arquivos?", + "discard": "Descartar alterações", + "confirm discard all": "Tem certeza que deseja descartar TODAS as alterações? Isso é IRREVERSÍVEL!", + "discardAll": "Descartar TODAS as alterações", + "no staged changes": "Não há nenhuma modificação escalonada para confirmar.\n\nGostaria de escalonar automaticamente todas as suas alterações e confirmá-las diretamente?", + "yes": "Sim", + "always": "Sempre", + "no changes": "Não há mudanças para confirmar.", + "commit message": "Confirmar mensagem", + "provide commit message": "Por favor, forneça uma mensagem de commit", + "branch name": "Nome do Ramo", + "provide branch name": "Por favor, forneça um nome de ramo", + "no remotes to pull": "O seu repositório não possui remotos configurados para efetuar pull.", + "no remotes to push": "O seu repositório não possui remotos configurados para efetuar push.", + "nobranch": "Por favor, faça checkout em um ramo para fazer push em um remoto.", + "pick remote": "Pegue um remoto para publicar o ramo '{0}':", + "sync is unpredictable": "Esta ação vai fazer push e pull nos commits de e para '{0}'.", + "ok": "OK", + "never again": "Ok, Nunca Mostrar Novamente", + "no remotes to publish": "Seu repositório não possui remotos configurados para publicação.", + "disabled": "Git está desativado ou não é suportado neste espaço de trabalho", + "clean repo": "Por favor, limpe sua árvore de trabalho do repositório antes de fazer check-out.", + "cant push": "Não pode empurrar referências para remoto. Execute 'Pull' primeiro para integrar suas alterações.", + "git error details": "Git: {0}", + "git error": "Erro de Git", + "open git log": "Abrir Histórico do Git" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/main.i18n.json b/i18n/ptb/extensions/git/out/main.i18n.json new file mode 100644 index 0000000000000..ae1dee2603294 --- /dev/null +++ b/i18n/ptb/extensions/git/out/main.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "using git": "Usando git {0} de {1}", + "updateGit": "Atualizar o Git", + "neverShowAgain": "Não mostrar novamente", + "git20": "Você parece ter o git {0} instalado. Code funciona melhor com git > = 2" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/model.i18n.json b/i18n/ptb/extensions/git/out/model.i18n.json new file mode 100644 index 0000000000000..717d2b4364a76 --- /dev/null +++ b/i18n/ptb/extensions/git/out/model.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "open": "Abrir", + "merge changes": "Mesclar Alterações", + "staged changes": "Alterações em Etapas", + "changes": "Alterações", + "ok": "OK", + "neveragain": "Nunca Mostrar Novamente", + "huge": "O repositório git em '{0}' tem muitas atualizações ativas, somente um subconjunto de funcionalidades do Git será habilitado." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/scmProvider.i18n.json b/i18n/ptb/extensions/git/out/scmProvider.i18n.json new file mode 100644 index 0000000000000..490dda3603e0d --- /dev/null +++ b/i18n/ptb/extensions/git/out/scmProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commit": "Confirmar" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/statusbar.i18n.json b/i18n/ptb/extensions/git/out/statusbar.i18n.json new file mode 100644 index 0000000000000..0b6ee800ffa78 --- /dev/null +++ b/i18n/ptb/extensions/git/out/statusbar.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "checkout": "Checkout...", + "sync changes": "Sincronizar alterações", + "publish changes": "Publicar alterações", + "syncing changes": "Sincronizando alterações..." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/package.i18n.json b/i18n/ptb/extensions/git/package.i18n.json new file mode 100644 index 0000000000000..0c79f1929bb26 --- /dev/null +++ b/i18n/ptb/extensions/git/package.i18n.json @@ -0,0 +1,48 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.clone": "Clonar", + "command.init": "Inicializar Repositório", + "command.refresh": "Atualizar", + "command.openChange": "Abrir alterações", + "command.openFile": "Abrir Arquivo", + "command.stage": "Estagiar Alterações", + "command.stageAll": "Estagiar Todas Alterações", + "command.stageSelectedRanges": "Estagiar Faixas Selecionadas", + "command.revertSelectedRanges": "Reverter Faixas Selecionadas", + "command.unstage": "Desestagiar Alterações", + "command.unstageAll": "Desestagiar Todas Alterações", + "command.unstageSelectedRanges": "Desestagiar Faixas Selecionadas", + "command.clean": "Descartar Alterações", + "command.cleanAll": "Descartar Todas as Alterações", + "command.commit": "Confirmar", + "command.commitStaged": "Confirmar os preparados", + "command.commitStagedSigned": "Confirmar Estagiados (Desconectado)", + "command.commitAll": "Confirmar tudo", + "command.commitAllSigned": "Confirmar Tudo (Desconectado)", + "command.undoCommit": "Desfazer Ultima Confirmação", + "command.checkout": "Fazer checkout para...", + "command.branch": "Criar Ramificação...", + "command.pull": "Efetuar pull", + "command.pullRebase": "Efetuar pull (Rebase)", + "command.push": "Enviar por push", + "command.pushTo": "Enviar por push para...", + "command.sync": "Sincronizar", + "command.publish": "Publicar", + "command.showOutput": "Mostrar Saída do Git", + "config.enabled": "Se o git estiver habilitado", + "config.path": "Caminho para o executável do git", + "config.autorefresh": "Se a atualização automática estiver habilitada", + "config.autofetch": "Se a recuperação automática estiver habilitada", + "config.enableLongCommitWarning": "Se mensagens longas de confirmação devem ter aviso", + "config.confirmSync": "Confirmar antes de sincronizar repositórios git", + "config.countBadge": "Controla o contador de distintivos do git. 'todos' considera todas as alterações. 'rastreado' considera apenas as alterações controladas. 'desligado' desliga o contador.", + "config.checkoutType": "Controla quais tipos de ramos são listados quando executando `Checkout para... `. `todos` mostra todas as referências, `local` mostra apenas os ramos locais, `etiqueta` mostra apenas etiquetas e `remoto` mostra apenas os ramos remotos.", + "config.ignoreLegacyWarning": "Ignora o aviso de Git legado", + "config.ignoreLimitWarning": "Ignora o aviso quando houver muitas alterações em um repositório", + "config.defaultCloneDirectory": "O local padrão onde clonar um repositório git", + "config.enableSmartCommit": "Confirme todas as alterações quando não há modificações escalonadas." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/grunt/out/main.i18n.json b/i18n/ptb/extensions/grunt/out/main.i18n.json new file mode 100644 index 0000000000000..909b68937c6e8 --- /dev/null +++ b/i18n/ptb/extensions/grunt/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Auto detecção de Grunt falhou com erro: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/grunt/package.i18n.json b/i18n/ptb/extensions/grunt/package.i18n.json new file mode 100644 index 0000000000000..d79ce76907e73 --- /dev/null +++ b/i18n/ptb/extensions/grunt/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.grunt.autoDetect": "Controla se a deteção automática de tarefas do Grunt está ligado ou desligado. Padrão é ligado." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/gulp/out/main.i18n.json b/i18n/ptb/extensions/gulp/out/main.i18n.json new file mode 100644 index 0000000000000..51b05e4013eff --- /dev/null +++ b/i18n/ptb/extensions/gulp/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Auto detecção de gulp falhou com erro: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/gulp/package.i18n.json b/i18n/ptb/extensions/gulp/package.i18n.json new file mode 100644 index 0000000000000..fae292414c287 --- /dev/null +++ b/i18n/ptb/extensions/gulp/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.gulp.autoDetect": "Controla se a detecção automática de tarefas Gulp está ativada ou desativada. Por padrão, é ativado." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/html/client/out/htmlMain.i18n.json b/i18n/ptb/extensions/html/client/out/htmlMain.i18n.json new file mode 100644 index 0000000000000..314d1e5c58ac0 --- /dev/null +++ b/i18n/ptb/extensions/html/client/out/htmlMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "htmlserver.name": "Servidor de Linguagem HTML" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/html/package.i18n.json b/i18n/ptb/extensions/html/package.i18n.json new file mode 100644 index 0000000000000..2f255a02e7f1c --- /dev/null +++ b/i18n/ptb/extensions/html/package.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.format.enable.desc": "Ativa/desativa o formatador HTML padrão (requer reinicialização)", + "html.format.wrapLineLength.desc": "Quantidade máxima de caracteres por linha (0 = desativar).", + "html.format.unformatted.desc": "Lista de tags, separados por vírgula, que não deveria ser reformatada. o padrão é 'nulo' para todas as tags listadas em https://www.w3.org/TR/html5/dom.html#phrasing-content.", + "html.format.contentUnformatted.desc": "Lista de tags, separada por vírgula, onde o conteúdo não deve ser reformatado. o padrão é 'nulo' para a tag 'pré'.", + "html.format.indentInnerHtml.desc": "Indentar secões e .", + "html.format.preserveNewLines.desc": "Se quebras de linha existentes antes de elementos deveriam ser preservadas. Só funciona antes de elementos, não dentro de rótulos ou para texto.", + "html.format.maxPreserveNewLines.desc": "Número máximo de quebras de linha a serem preservadas em um bloco. Use 'null' para ilimitado.", + "html.format.indentHandlebars.desc": "Formatar e indentar {{#foo}} e {{/ foo}}.", + "html.format.endWithNewline.desc": "Finalizar com uma nova linha.", + "html.format.extraLiners.desc": "Lista de rótulos, separados por vírgulas, que deveriam ter uma quebra de linha extra antes deles. 'null' admite o padrão \"head, body, /html\".", + "html.format.wrapAttributes.desc": "Agrupar atributos.", + "html.format.wrapAttributes.auto": "Agrupar atributos somente quando o tamanho da linha é excedido.", + "html.format.wrapAttributes.force": "Agrupar cada atributo exceto o primeiro.", + "html.format.wrapAttributes.forcealign": "Agrupar cada atributo, exceto o primeiro e manter alinhado.", + "html.format.wrapAttributes.forcemultiline": "Agrupar cada atributo.", + "html.suggest.angular1.desc": "Configura se o suporte da linguagem HTML interna sugere rótulos e propriedades do Angular V1.", + "html.suggest.ionic.desc": "Configura se o suporte da linguagem HTML interna sugere rótulos, propriedades e valores Ionic.", + "html.suggest.html5.desc": "Configura se o suporte da linguagem HTML interna sugere rótulos, propriedades e valores HTML5.", + "html.validate.scripts": "Configura se o suporte da linguagem HTML interna valida scripts embutidos.", + "html.validate.styles": "Configura se o suporte da linguagem HTML interna valida estilos embutidos." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/jake/out/main.i18n.json b/i18n/ptb/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..4cfc54e5fef5f --- /dev/null +++ b/i18n/ptb/extensions/jake/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Auto detecção de Jake falhou com erro: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/jake/package.i18n.json b/i18n/ptb/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..94c08817c8d4e --- /dev/null +++ b/i18n/ptb/extensions/jake/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.jake.autoDetect": "Controla se a detecção automática de tarefas Jake está ativada ou desativada. Por padrão, é ativado." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/javascript/out/features/bowerJSONContribution.i18n.json b/i18n/ptb/extensions/javascript/out/features/bowerJSONContribution.i18n.json new file mode 100644 index 0000000000000..84b277202e8ef --- /dev/null +++ b/i18n/ptb/extensions/javascript/out/features/bowerJSONContribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.bower.default": "Bower.json padrão", + "json.bower.error.repoaccess": "Falha na solicitação ao repositório bower: {0}", + "json.bower.latest.version": "último" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/javascript/out/features/packageJSONContribution.i18n.json b/i18n/ptb/extensions/javascript/out/features/packageJSONContribution.i18n.json new file mode 100644 index 0000000000000..9917fa36b2ea1 --- /dev/null +++ b/i18n/ptb/extensions/javascript/out/features/packageJSONContribution.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.package.default": "Package.json padrão", + "json.npm.error.repoaccess": "Falha na solicitação ao repositório NPM: {0}", + "json.npm.latestversion": "A versão do pacote mais recente no momento", + "json.npm.majorversion": "Combina com a versão principal mais recente (1.x.x)", + "json.npm.minorversion": "Combina a versão secundária mais recente (1.2.x)", + "json.npm.version.hover": "Última versão: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/json/client/out/jsonMain.i18n.json b/i18n/ptb/extensions/json/client/out/jsonMain.i18n.json new file mode 100644 index 0000000000000..4391c95a2ba22 --- /dev/null +++ b/i18n/ptb/extensions/json/client/out/jsonMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "jsonserver.name": "Servidor de linguagem JSON" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/json/package.i18n.json b/i18n/ptb/extensions/json/package.i18n.json new file mode 100644 index 0000000000000..9d812f5b25317 --- /dev/null +++ b/i18n/ptb/extensions/json/package.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.schemas.desc": "Esquemas associadas a arquivos de JSON no projeto atual", + "json.schemas.url.desc": "Um URL para um esquema ou um caminho relativo a um esquema no diretório atual", + "json.schemas.fileMatch.desc": "Uma matriz de padrões de arquivos para correspondência ao resolver arquivos JSON para esquemas.", + "json.schemas.fileMatch.item.desc": "Um padrão de arquivos que pode conter '*' para fazer a correspondência ao resolver arquivos JSON para esquemas.", + "json.schemas.schema.desc": "A definição de esquema para o URL dado. O esquema precisa ser fornecido apenas para evitar acessos ao URL do esquema.", + "json.format.enable.desc": "Habilitar/desabilitar o formatador JSON padrão (requer reinicialização)", + "json.tracing.desc": "Loga a comunicação entre o VS Code e o servidor de linguagem JSON.", + "json.colorDecorators.enable.desc": "Habilita ou desabilita os decoradores de cor" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/markdown/out/extension.i18n.json b/i18n/ptb/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/extensions/markdown/out/previewContentProvider.i18n.json b/i18n/ptb/extensions/markdown/out/previewContentProvider.i18n.json new file mode 100644 index 0000000000000..f4e956aa5ebe6 --- /dev/null +++ b/i18n/ptb/extensions/markdown/out/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "Scripts foram desabilitados neste documento", + "preview.securityMessage.title": "Scripts são desabilitados na pré-visualização de markdown. Altere a configuração de segurança de pré-visualização do Markdown para habilitar scripts", + "preview.securityMessage.label": "Aviso de segurança de scripts desabilitados" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/markdown/out/security.i18n.json b/i18n/ptb/extensions/markdown/out/security.i18n.json new file mode 100644 index 0000000000000..6b83ed6faed19 --- /dev/null +++ b/i18n/ptb/extensions/markdown/out/security.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.showPreviewSecuritySelector.disallowScriptsForWorkspaceTitle": "Desabilitar a execução de scripts em pré-visualização de markdown para este espaço de trabalho", + "preview.showPreviewSecuritySelector.currentSelection": "Configuração atual", + "preview.showPreviewSecuritySelector.allowScriptsForWorkspaceTitle": "Habilitar a execução de scripts em pré-visualizações de markdown para este espaço de trabalho", + "preview.showPreviewSecuritySelector.title": "Alterar configurações de segurança para a pré-visualização do Markdown" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/markdown/package.i18n.json b/i18n/ptb/extensions/markdown/package.i18n.json new file mode 100644 index 0000000000000..83c2f99b16058 --- /dev/null +++ b/i18n/ptb/extensions/markdown/package.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "markdown.preview.doubleClickToSwitchToEditor.desc": "Duplo clique na pré-visualização markdown para alternar para o editor.", + "markdown.preview.fontFamily.desc": "Controla a família de fonte usada na pré-visualização de markdown.", + "markdown.preview.fontSize.desc": "Controla o tamanho da fonte em pixels usado na pré-visualização de markdown.", + "markdown.preview.lineHeight.desc": "Controla a altura de linha usada na pré-visualização de markdown. Este número é relativo ao tamanho de fonte.", + "markdown.preview.markEditorSelection.desc": "Marca a seleção atual do editor na pré-visualização de markdown.", + "markdown.preview.scrollEditorWithPreview.desc": "Quando a pré-visualização de markdown é rolada, atualiza a exibição do editor.", + "markdown.preview.scrollPreviewWithEditorSelection.desc": "Rola a pré-visualização do markdown para revelar a linha atualmente selecionada do editor.", + "markdown.preview.title": "Abrir a visualização", + "markdown.previewFrontMatter.dec": "Configura como o frontispicio YAML frente questão devem ser processado na pré-visualização de markdown. 'hide' remove o frontispicio. Caso contrário, o frontispicio é tratado como conteúdo de markdown.", + "markdown.previewSide.title": "Abre pré-visualização ao lado", + "markdown.showSource.title": "Exibir Código-Fonte", + "markdown.styles.dec": "Uma lista de URLs ou caminhos locais para folhas de estilo CSS para usar na pré-visualização do markdown. Caminhos relativos são interpretados em relação à pasta aberta no explorer. Se não houver nenhuma pasta aberta, eles são interpretados em relação ao local do arquivo markdown. Todos os ' \\' precisam ser escritos como ' \\ \\ '.", + "markdown.showPreviewSecuritySelector.title": "Alterar as configurações de segurança de pré-visualização do Markdown", + "markdown.preview.enableExperimentalExtensionApi.desc": "[Experimental] Permitir extensões para ampliar a pré-visualização do markdown.", + "markdown.trace.desc": "Habilitar log de depuração para a extensão do markdown." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/package.i18n.json b/i18n/ptb/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/extensions/npm/package.i18n.json b/i18n/ptb/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/extensions/php/out/features/validationProvider.i18n.json b/i18n/ptb/extensions/php/out/features/validationProvider.i18n.json new file mode 100644 index 0000000000000..9e0ce64f472fb --- /dev/null +++ b/i18n/ptb/extensions/php/out/features/validationProvider.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "php.useExecutablePath": "Você permite {0} (definido como uma configuração do espaço de trabalho) a ser executado para lint de arquivos PHP?", + "php.yes": "Permitir", + "php.no": "Não permitir", + "wrongExecutable": "Não é possível validar {0} pois não é um executável php válido. Use a configuração 'php.validate.executablePath' para configurar o executável do PHP.", + "noExecutable": "Não é possível validar porque nenhum executável PHP está definido. Use a configuração 'php.validate.executablePath' para configurar o executável do PHP.", + "unknownReason": "Falha ao executar o php usando o caminho: {0}. O motivo é desconhecido." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/php/package.i18n.json b/i18n/ptb/extensions/php/package.i18n.json new file mode 100644 index 0000000000000..7ec916f5dd829 --- /dev/null +++ b/i18n/ptb/extensions/php/package.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "configuration.suggest.basic": "Configura se as sugestões intrínsecas da linguagem PHP estão habilitadas. O suporte sugere globais e variáveis do PHP.", + "configuration.validate.enable": "Habilita/desabilita a validação interna do PHP.", + "configuration.validate.executablePath": "Aponta para o executável do PHP.", + "configuration.validate.run": "Se o linter é executado ao salvar ou ao digitar.", + "configuration.title": "PHP", + "commands.categroy.php": "PHP", + "command.untrustValidationExecutable": "Desabilita a validação de executável do PHP (definida como configuração do espaço de trabalho)" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/ptb/extensions/typescript/out/features/bufferSyncSupport.i18n.json new file mode 100644 index 0000000000000..1cef0c6e94ae8 --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "versionMismatch": "Incompatibilidade de versão! global tsc ({0})! = serviço de linguagem do VS Code ({1}). Erros de compilação inconsistentes podem ocorrer", + "moreInformation": "Mais informações", + "doNotCheckAgain": "Não verificar novamente", + "close": "Fechar", + "updateTscCheck": "Atualizada configuração de usuário 'typescript.check.tscVersion' para false " +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/ptb/extensions/typescript/out/features/completionItemProvider.i18n.json new file mode 100644 index 0000000000000..58097d90545cc --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acquiringTypingsLabel": "Adquirindo digitações...", + "acquiringTypingsDetail": "Adquirindo definições de digitações para o Intellisense." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/ptb/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..99716f32145fd --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "Habilita verificação semântica em um arquivo JavaScript. Deve estar no topo de um arquivo.", + "ts-nocheck": "Desabilita verificação semântica em um arquivo JavaScript. Deve estar no topo de um arquivo.", + "ts-ignore": "Suprime erros de @ts-check na próxima linha de um arquivo." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json b/i18n/ptb/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json new file mode 100644 index 0000000000000..ef8dd6423d6a6 --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "oneImplementationLabel": "1 implementação", + "manyImplementationLabel": "{0} implementações", + "implementationsErrorLabel": "Não foi possível determinar implementações" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json b/i18n/ptb/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json new file mode 100644 index 0000000000000..20b08d7679b9d --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.jsDocCompletionItem.documentation": "Comentário JSDoc" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json b/i18n/ptb/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json new file mode 100644 index 0000000000000..1838c3c162117 --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "oneReferenceLabel": "1 referência", + "manyReferenceLabel": "{0} referências", + "referenceErrorLabel": "Não foi possível determinar as referências" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/typescriptMain.i18n.json b/i18n/ptb/extensions/typescript/out/typescriptMain.i18n.json new file mode 100644 index 0000000000000..82e6c288fb198 --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/typescriptMain.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.projectConfigNoWorkspace": "Favor abrir uma pasta no VS Code para usar um projeto TypeScript ou JavaScript", + "typescript.projectConfigUnsupportedFile": "Não foi possível determinar o projeto TypeScript ou JavaScript. Tipo de arquivo não suportado", + "typescript.projectConfigCouldNotGetInfo": "Não foi possível determinar o projeto TypeScript ou JavaScript", + "typescript.noTypeScriptProjectConfig": "Arquivo não é parte de um projeto TypeScript", + "typescript.noJavaScriptProjectConfig": "Arquivo não é parte de um projeto JavaScript", + "typescript.configureTsconfigQuickPick": "Configurar tsconfig.json", + "typescript.configureJsconfigQuickPick": "Configurar jsconfig.json", + "typescript.projectConfigLearnMore": "Saber Mais" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/ptb/extensions/typescript/out/typescriptServiceClient.i18n.json new file mode 100644 index 0000000000000..37527e507b0ea --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noServerFound": "O caminho {0} não aponta para uma instalação de tsserver válida. Voltando para a versão do TypeScript empacotada.", + "noBundledServerFound": "O tsserver do VS Code foi excluído por outra aplicação, como por exemplo uma ferramenta de detecção de virus mal-comportada. Favor reinstalar o VS Code.", + "versionNumber.custom": "personalizado", + "serverCouldNotBeStarted": "Servidor de linguagem TypeScript não pôde ser iniciado. Mensagem de erro é: {0}", + "useVSCodeVersionOption": "Usar a Versão do VS Code", + "activeVersion": "Atualmente ativo", + "useWorkspaceVersionOption": "Use a versão de área de trabalho", + "learnMore": "Saiba Mais", + "selectTsVersion": "Selecione a versão do TypeScript usada para os recursos de linguagem JavaScript e TypeScript", + "typescript.openTsServerLog.notSupported": "Logging de TS Server requer TS TS 2.2.2+", + "typescript.openTsServerLog.loggingNotEnabled": "Logging de TS Server está desligado. Por favor configure 'typescript.tsserver.log' e reinicie o TS Server para habilitar o log", + "typescript.openTsServerLog.enableAndReloadOption": "Habilitar logging e reniciar TS server", + "typescript.openTsServerLog.noLogFile": "O TS Server não iniciou o logging.", + "openTsServerLog.openFileFailedFailed": "Não foi possível abrir o arquivo de log do TS Server", + "serverDiedAfterStart": "O serviço de linguagem TypeScript morreu 5 vezes depois que começou. O serviço não será reiniciado.", + "serverDiedReportIssue": "Reportar Problema", + "serverDied": "O serviço TypeScript morreu inesperadamente 5 vezes nos últimos 5 minutos." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/utils/logger.i18n.json b/i18n/ptb/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..bc738f43d0c37 --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/ptb/extensions/typescript/out/utils/projectStatus.i18n.json new file mode 100644 index 0000000000000..5cb1837363719 --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/utils/projectStatus.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hintExclude": "Para habilitar os recursos de linguagem JavaScript/TypeScipt em todo o projeto, excluir pastas com muitos arquivos, como: {0}", + "hintExclude.generic": "Para habilitar os recursos de linguagem JavaScript/TypeScipt em todo o projeto, excluir pastas grandes com arquivos em que você não trabalha.", + "open": "Configurar exclusões", + "large.label": "Configurar exclusões", + "hintExclude.tooltip": "Para habilitar os recursos de linguagem JavaScript/TypeScipt em todo o projeto, excluir pastas grandes com arquivos em que você não trabalha." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json new file mode 100644 index 0000000000000..ce050eb3d8ede --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installingPackages": "Buscando dados para melhor IntelliSense do TypeScript", + "typesInstallerInitializationFailed.title": "Não foi possível instalar arquivos de digitação para recursos da linguagem JavaScript. Certifique-se que NPM está instalado e está em seu caminho", + "typesInstallerInitializationFailed.moreInformation": "Mais informações", + "typesInstallerInitializationFailed.doNotCheckAgain": "Não verificar novamente", + "typesInstallerInitializationFailed.close": "Fechar" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/package.i18n.json b/i18n/ptb/extensions/typescript/package.i18n.json new file mode 100644 index 0000000000000..5e4125ec05070 --- /dev/null +++ b/i18n/ptb/extensions/typescript/package.i18n.json @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.reloadProjects.title": "Recarregar Projeto", + "javascript.reloadProjects.title": "Recarregar Projeto", + "configuration.typescript": "TypeScript", + "typescript.useCodeSnippetsOnMethodSuggest.dec": "Funções completas com a assinatura do parâmetro.", + "typescript.tsdk.desc": "Especifica o caminho da pasta que contém os arquivos tsserver e lib*.d.ts para usar.", + "typescript.disableAutomaticTypeAcquisition": "Desabilita a aquisição automática de tipo. Requer TypeScript > = 2.0.6 e um reinício depois da alteração.", + "typescript.check.tscVersion": "Verifica se um ima instalação global do compilador TypeScript (por exemplo, tsc) difere do serviço de linguagem TypeScript usado.", + "typescript.tsserver.log": "Habilita o log do servidor TS para um arquivo. Este log pode ser usado para diagnosticar problemas do servidor de TS. O log pode conter caminhos de arquivo, código-fonte e outras informações potencialmente confidenciais do seu projeto.", + "typescript.tsserver.trace": "Habilita o rastreamento de mensagens enviadas para o servidor de TS. Este rastreamento pode ser usado para diagnosticar problemas do servidor de TS. O rastreamento pode conter caminhos de arquivo, código-fonte e outras informações potencialmente confidenciais do seu projeto.", + "typescript.tsserver.experimentalAutoBuild": "Habilita auto build experimental. Requer a versão 1.9 dev ou 2.x do tsserver e o reinício do VS Code depois da alteração.", + "typescript.validate.enable": "Habilita/Desabilita a validação TypeScript.", + "typescript.format.enable": "Habilita/Desabilita o formatador padrão TypeScript.", + "javascript.format.enable": "Habilita/Desabilita o formatador padrão JavaScript.", + "format.insertSpaceAfterCommaDelimiter": "Define o tratamento de espaços após um delimitador vírgula.", + "format.insertSpaceAfterSemicolonInForStatements": "Define o tratamento de espaços após um ponto e vírgula para um comando.", + "format.insertSpaceBeforeAndAfterBinaryOperators": "Define o tratamento de espaços após um operador binário.", + "format.insertSpaceAfterKeywordsInControlFlowStatements": "Define o tratamento de espaços após palavras-chave em um comando de controle de fluxo.", + "format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": "Define o tratamento de espaços após uma palavra-chave de função para funções anônimas.", + "format.insertSpaceBeforeFunctionParenthesis": "Define a manipulação de espaços antes de parênteses do argumento de função. Requer TypeScript > = 2.1.5.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Define a manipulação de espaços após abrir e antes de fechar parênteses não vazios.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Define a manipulação de espaços após abrir e antes de fechar colchetes não vazios.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Define a manipulação de espaços após abrir e antes de fechar chaves não vazias. Requer TypeScript >= 2.3.0.", + "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Define a manipulação de espaços após abrir e antes de fechar chaves de cadeias de caracteres de modelos. Requer TypeScript >= 2.0.6.", + "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "Define a manipulação de espaços após abrir e antes de fechar chaves de expressões JSX. Requer TypeScript >= 2.0.6.", + "format.placeOpenBraceOnNewLineForFunctions": "Define-se uma chave de abertura é colocada em uma nova linha para funções ou não.", + "format.placeOpenBraceOnNewLineForControlBlocks": "Define-se uma chave de abertura é colocada em uma nova linha para blocos de controle ou não.", + "javascript.validate.enable": "Habilitar/Desabilitar validação JavaScript.", + "typescript.goToProjectConfig.title": "Ir para a Configuração do Projeto", + "javascript.goToProjectConfig.title": "Ir para a Configuração do Projeto", + "javascript.referencesCodeLens.enabled": "Habilitar/desabilitar referências CodeLens em arquivos JavaScript.", + "typescript.referencesCodeLens.enabled": "Habilitar/desabilitar referências CodeLens em arquivos TypeScript. Requer TypeScript > = 2.0.6.", + "typescript.implementationsCodeLens.enabled": "Habilitar/desabilitar implementações CodeLens. Requer TypeScript > = 2.0.6.", + "typescript.openTsServerLog.title": "Abrir arquivo de log do servidor TS", + "typescript.selectTypeScriptVersion.title": "Selecionar a versão do JavaScript", + "jsDocCompletion.enabled": "Habilitar/Desabilitar comentários JSDoc automáticos.", + "javascript.implicitProjectConfig.checkJs": "Habilitar/desabilitar verificação semântica de arquivos JavaScript. Os arquivos existentes jsconfig.json ou tsconfig.json substituem essa configuração. Requer TypeScript > = 2.3.1.", + "typescript.check.npmIsInstalled": "Verificar se NPM está instalado para aquisição automática de digitação", + "javascript.nameSuggestions": "Habilitar/desabilitar incluindo nomes exclusivos do arquivo nas listas de sugestão de JavaScript." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/actionbar/actionbar.i18n.json b/i18n/ptb/src/vs/base/browser/ui/actionbar/actionbar.i18n.json new file mode 100644 index 0000000000000..4ecb2c803f4cd --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/actionbar/actionbar.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "titleLabel": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/aria/aria.i18n.json b/i18n/ptb/src/vs/base/browser/ui/aria/aria.i18n.json new file mode 100644 index 0000000000000..e558eb6187aa1 --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/aria/aria.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "repeated": "{0} (ocorreu novamente)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/findinput/findInput.i18n.json b/i18n/ptb/src/vs/base/browser/ui/findinput/findInput.i18n.json new file mode 100644 index 0000000000000..524ba7bb4a79b --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/findinput/findInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultLabel": "entrada" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json b/i18n/ptb/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json new file mode 100644 index 0000000000000..1a477ef1e6d2b --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caseDescription": "Diferenciar Maiúsculas de Minúsculas", + "wordsDescription": "Coincidir Palavra Inteira", + "regexDescription": "Usar Expressão Regular" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/inputbox/inputBox.i18n.json b/i18n/ptb/src/vs/base/browser/ui/inputbox/inputBox.i18n.json new file mode 100644 index 0000000000000..0b282bdee8a51 --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/inputbox/inputBox.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "alertErrorMessage": "Erro: {0}", + "alertWarningMessage": "Aviso: {0}", + "alertInfoMessage": "Informações: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/ptb/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json new file mode 100644 index 0000000000000..d023184ae7017 --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "imgMeta": "{0}x{1} {2}", + "largeImageError": "A imagem é muito grande para ser exibida no editor.", + "nativeBinaryError": "O arquivo não pode ser exibido no editor porque é binário, muito grande ou usa uma codificação de texto sem suporte.", + "sizeB": "{0}B", + "sizeKB": "{0}KB", + "sizeMB": "{0}MB", + "sizeGB": "{0}GB", + "sizeTB": "{0}TB" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/toolbar/toolbar.i18n.json b/i18n/ptb/src/vs/base/browser/ui/toolbar/toolbar.i18n.json new file mode 100644 index 0000000000000..4a046b57296cd --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/toolbar/toolbar.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "more": "Mais" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/common/errorMessage.i18n.json b/i18n/ptb/src/vs/base/common/errorMessage.i18n.json new file mode 100644 index 0000000000000..257ffd9e14c16 --- /dev/null +++ b/i18n/ptb/src/vs/base/common/errorMessage.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "message": "{0}. Código de erro: {1}", + "error.permission.verbose": "Permissão Negada (HTTP {0})", + "error.permission": "Permissão Negada", + "error.http.verbose": "{0} (HTTP {1}: {2})", + "error.http": "{0} (HTTP {1})", + "error.connection.unknown.verbose": "Erro de Conexão Desconhecido ({0})", + "error.connection.unknown": "Ocorreu um erro de conexão desconhecido. Você não está mais conectado à Internet ou o servidor que você está conectado está offline.", + "stackTrace.format": "{0}: {1}", + "error.defaultMessage": "Ocorreu um erro desconhecido. Consulte o log para obter mais detalhes.", + "nodeExceptionMessage": "Ocorreu um erro de sistema ({0})", + "error.moreErrors": "{0} ({1} erros no total)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/ptb/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..d6108586df8b1 --- /dev/null +++ b/i18n/ptb/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.invalidSymbol": "Símbolo inválido", + "error.invalidNumberFormat": "Formato de número inválido", + "error.propertyNameExpected": "Nome de propriedade esperado", + "error.valueExpected": "Valor esperado", + "error.colonExpected": "Dois-pontos esperados", + "error.commaExpected": "Vírgula esperada", + "error.closeBraceExpected": "Chave de fechamento esperada", + "error.closeBracketExpected": "Colchete de fechamento esperado", + "error.endOfFileExpected": "Fim do arquivo esperado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/common/processes.i18n.json b/i18n/ptb/src/vs/base/common/processes.i18n.json new file mode 100644 index 0000000000000..165322e595234 --- /dev/null +++ b/i18n/ptb/src/vs/base/common/processes.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ExecutableParser.commandMissing": "Erro: informações de executável devem definir um comando do tipo string", + "ExecutableParser.isShellCommand": "Aviso: IsShellCommand deve ser to tipo booleano. Ignorando valor {0}", + "ExecutableParser.args": "Aviso: args deve ser do tipo string[]. Ignorando valor {0}.", + "ExecutableParser.invalidCWD": "Aviso: options.cwd deve ser do tipo string. Ignorando valor {0}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/common/severity.i18n.json b/i18n/ptb/src/vs/base/common/severity.i18n.json new file mode 100644 index 0000000000000..7aff8041180ff --- /dev/null +++ b/i18n/ptb/src/vs/base/common/severity.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "sev.error": "Erro", + "sev.warning": "Aviso", + "sev.info": "Informações" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/node/processes.i18n.json b/i18n/ptb/src/vs/base/node/processes.i18n.json new file mode 100644 index 0000000000000..3584dc9b15e34 --- /dev/null +++ b/i18n/ptb/src/vs/base/node/processes.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskRunner.UNC": "Não é possível executar um comando shell em uma unidade UNC." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/node/zip.i18n.json b/i18n/ptb/src/vs/base/node/zip.i18n.json new file mode 100644 index 0000000000000..a577f90ea2e53 --- /dev/null +++ b/i18n/ptb/src/vs/base/node/zip.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "{0} não encontrado dentro do zip." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json b/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json new file mode 100644 index 0000000000000..1d0f7ebd47a0a --- /dev/null +++ b/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpenAriaLabelEntry": "{0}, seletor", + "quickOpenAriaLabel": "seletor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json b/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json new file mode 100644 index 0000000000000..ca3d8a5266afb --- /dev/null +++ b/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpenAriaLabel": "Seletor rápido. Digite para filtrar resultados.", + "treeAriaLabel": "Seletor rápido" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/parts/tree/browser/treeDefaults.i18n.json b/i18n/ptb/src/vs/base/parts/tree/browser/treeDefaults.i18n.json new file mode 100644 index 0000000000000..5e72c45050c6e --- /dev/null +++ b/i18n/ptb/src/vs/base/parts/tree/browser/treeDefaults.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "collapse": "Recolher" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/electron-main/menus.i18n.json b/i18n/ptb/src/vs/code/electron-main/menus.i18n.json new file mode 100644 index 0000000000000..85312962c12e7 --- /dev/null +++ b/i18n/ptb/src/vs/code/electron-main/menus.i18n.json @@ -0,0 +1,164 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mFile": "&&Arquivo", + "mEdit": "&&Editar", + "mSelection": "&&Seleção", + "mView": "&&Visualizar", + "mGoto": "&&Ir", + "mDebug": "&&Depurar", + "mWindow": "Janela", + "mHelp": "&&Ajuda", + "miNewWindow": "Nova &&Janela", + "mAbout": "Sobre {0}", + "mServices": "Serviços", + "mHide": "Ocultar {0}", + "mHideOthers": "Ocultar Outros", + "mShowAll": "Mostrar Tudo", + "miQuit": "Sair de {0}", + "miNewFile": "&&Novo Arquivo", + "miOpen": "&&Abrir", + "miOpenFolder": "Abrir &&Pasta", + "miOpenFile": "&&Abrir Arquivo", + "miOpenRecent": "Abrir &&Recente", + "miSave": "&&Salvar", + "miSaveAs": "Salvar &&Como...", + "miSaveAll": "Salvar &&Tudo", + "miAutoSave": "Salvar Automaticamente", + "miRevert": "Re&&verter Arquivo", + "miCloseWindow": "Fe&&char Janela", + "miCloseFolder": "Fechar &&Pasta", + "miCloseEditor": "Fechar &&Editor", + "miExit": "Sai&&r", + "miOpenSettings": "&&Configurações", + "miOpenKeymap": "Atalhos de &&Teclado", + "miOpenKeymapExtensions": "Extensões de &&Mapeamento de Teclado", + "miOpenSnippets": "Trechos de Có&&digo do Usuário", + "miSelectColorTheme": "Cor do T&&ema", + "miSelectIconTheme": "&&Ícone de Arquivo do Tema", + "miPreferences": "&&Preferências", + "miReopenClosedEditor": "&&Reabrir Editor Fechado", + "miClearRecentOpen": "&&Limpar Arquivos Recentes", + "miUndo": "&&Desfazer", + "miRedo": "&&Refazer", + "miCut": "Cor&&tar", + "miCopy": "&&Copiar", + "miPaste": "Co&&lar", + "miFind": "&&Localizar", + "miReplace": "&&Substituir", + "miFindInFiles": "Localizar &&nos Arquivos", + "miReplaceInFiles": "Substituir &&nos Arquivos", + "miEmmetExpandAbbreviation": "Emmet: E&&xpandir Abreviação", + "miShowEmmetCommands": "E&&mmet...", + "miToggleLineComment": "&&Alternar Comentário de Linha", + "miToggleBlockComment": "Alternar Comentário de &&Bloco", + "miInsertCursorAbove": "&&Inserir cursor acima", + "miInsertCursorBelow": "Inserir cursor a&&baixo", + "miInsertCursorAtEndOfEachLineSelected": "Adicionar C&&ursores ao Final das Linhas", + "miAddSelectionToNextFindMatch": "Adicionar &&próxima ocorrência", + "miAddSelectionToPreviousFindMatch": "Adicionar ocorrência a&&nterior ", + "miSelectHighlights": "Selecionar todas as &&ocorrências", + "miCopyLinesUp": "&&Copiar linha acima", + "miCopyLinesDown": "C&&opiar linha abaixo", + "miMoveLinesUp": "Mo&&ver linha para cima", + "miMoveLinesDown": "Mover &&linha para baixo", + "miSelectAll": "&&Selecionar Tudo", + "miSmartSelectGrow": "&&Expandir seleção", + "miSmartSelectShrink": "&&Reduzir seleção", + "miViewExplorer": "&&Explorador", + "miViewSearch": "&&Pesquisar", + "miViewSCM": "S&&CM", + "miViewDebug": "&&Depurar", + "miViewExtensions": "E&&xtensões", + "miToggleOutput": "&&Saída", + "miToggleDebugConsole": "Con&&sole de Depuração", + "miToggleIntegratedTerminal": "Terminal &&Integrado", + "miMarker": "&&Problemas", + "miAdditionalViews": "&&Visualizações Adicionais", + "miCommandPalette": "&&Paleta de comando", + "miToggleFullScreen": "Alternar &&Tela Inteira", + "miToggleZenMode": "Alternar modo Zen", + "miToggleMenuBar": "Alternar &&Barra de Menus", + "miSplitEditor": "Dividir &&editor", + "miToggleEditorLayout": "Alternar &&Layout do Grupo de Editor", + "miToggleSidebar": "&&Alternar Barra Lateral", + "miMoveSidebarRight": "&&Mover a barra lateral para a direita", + "miMoveSidebarLeft": "&&Mover a barra lateral para a esquerda", + "miTogglePanel": "Alternar &&Painel", + "miHideStatusbar": "&&Ocultar Barra de Status", + "miShowStatusbar": "&&Mostrar Barra de Status", + "miHideActivityBar": "Ocultar Barra de &&Atividades", + "miShowActivityBar": "Mostrar Barra de &&Atividades", + "miToggleWordWrap": "Alternar &&Quebra de Linha", + "miToggleRenderWhitespace": "Alternar &&Renderização de Espaços em Branco", + "miToggleRenderControlCharacters": "Alternar &&Caracteres de Controle", + "miZoomIn": "&&Ampliar", + "miZoomOut": "Red&&uzir", + "miZoomReset": "&&Reinicializar Zoom", + "miBack": "&&Voltar", + "miForward": "&&Avançar", + "miNextEditor": "&&Próximo Editor", + "miPreviousEditor": "&&Editor Anterior", + "miNextEditorInGroup": "&&Próximo Editor Usado no Grupo", + "miPreviousEditorInGroup": "&&Editor Anterior Usado no Grupo", + "miSwitchEditor": "Trocar &&Editor", + "miFocusFirstGroup": "&&Primeiro Grupo", + "miFocusSecondGroup": "&&Segundo Grupo", + "miFocusThirdGroup": "&&Terceiro Grupo", + "miNextGroup": "&&Próximo Grupo", + "miPreviousGroup": "&&Grupo Anterior", + "miSwitchGroup": "Trocar &&Grupo", + "miGotoFile": "Ir para &&Arquivo...", + "miGotoSymbolInFile": "Ir para o &&Símbolo no Arquivo...", + "miGotoSymbolInWorkspace": "Ir para o Símbolo em &&Área de Trabalho", + "miGotoDefinition": "Ir para &&Definição", + "miGotoTypeDefinition": "Ir para a &&definição de tipo", + "miGotoImplementation": "Ir para a &&implementação", + "miGotoLine": "Ir para &&Linha...", + "miStartDebugging": "Iniciar Depuração", + "miStartWithoutDebugging": "Iniciar &&Sem Depuração", + "miStopDebugging": "&&Parar Depuração", + "miRestart Debugging": "&&Reiniciar Depuração", + "miOpenConfigurations": "Abrir &&Configurações", + "miAddConfiguration": "Adicionar Configuração...", + "miStepOver": "Pular &&Sobre", + "miStepInto": "Pular &&Dentro", + "miStepOut": "Pular &&Fora", + "miContinue": "&&Continuar", + "miToggleBreakpoint": "Alternar &&Ponto de Parada", + "miConditionalBreakpoint": "Ponto de Parada &&Condicional...", + "miColumnBreakpoint": "Ponto de Parada de C&&oluna", + "miFunctionBreakpoint": "Ponto de Parada de &&Função...", + "miNewBreakpoint": "&&Novo Ponto de Parada", + "miDisableAllBreakpoints": "Desabilitar T&&odos os Pontos de Parada", + "miRemoveAllBreakpoints": "Remover &&Todos os Pontos de Parada", + "miInstallAdditionalDebuggers": "&&Instalar Depuradores Adicionais...", + "mMinimize": "Minimizar", + "mClose": "Fechar", + "mBringToFront": "Trazer Tudo para a Frente", + "miToggleDevTools": "&&Alternar Ferramentas do Desenvolvedor", + "miAccessibilityOptions": "&&Opções de Acessibilidade", + "miReportIssues": "Relatar &&Problemas", + "miWelcome": "&&Bem-vindo", + "miInteractivePlayground": "Playground &&Interativo", + "miDocumentation": "&&Documentação", + "miReleaseNotes": "&&Notas de Versão", + "miKeyboardShortcuts": "Referência de &&Atalhos de Teclado", + "miIntroductoryVideos": "&&Vídeos Introdutórios", + "miTwitter": "&&Junte-se a nós no Twitter", + "miUserVoice": "&&Pesquisar Solicitações de Recursos", + "miLicense": "&&Exibir Licença", + "miPrivacyStatement": "&&Política de Privacidade", + "miAbout": "&&Sobre", + "miRestartToUpdate": "Reinicie para Atualizar...", + "miCheckingForUpdates": "Verificando Atualizações...", + "miDownloadUpdate": "Baixar Atualização Disponível", + "miDownloadingUpdate": "Baixando Atualização...", + "miInstallingUpdate": "Instalando Atualização...", + "miCheckForUpdates": "Verificar Atualizações...", + "aboutDetail": "\\\\nVersão {0}\\\\nConfirmação {1}\\\\nData {2}\\\\nShell {3}\\\\nRenderizador {4}\\\\nNó {5}", + "okButton": "OK" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/electron-main/window.i18n.json b/i18n/ptb/src/vs/code/electron-main/window.i18n.json new file mode 100644 index 0000000000000..abee584a9c11d --- /dev/null +++ b/i18n/ptb/src/vs/code/electron-main/window.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hiddenMenuBar": "Você ainda pode acessar a barra de menu pressionando a tecla * * Alt * *." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/electron-main/windows.i18n.json b/i18n/ptb/src/vs/code/electron-main/windows.i18n.json new file mode 100644 index 0000000000000..308aed2953874 --- /dev/null +++ b/i18n/ptb/src/vs/code/electron-main/windows.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ok": "OK", + "pathNotExistTitle": "O caminho não existe", + "pathNotExistDetail": "O caminho '{0}' não parece mais existir no disco.", + "accessibilityOptionsWindowTitle": "Opções de Acessibilidade", + "reopen": "Reabrir", + "wait": "Continuar Esperando", + "close": "Fechar", + "appStalled": "A janela não está mais respondendo", + "appStalledDetail": "Você pode reabrir, fechar a janela ou continuar esperando.", + "appCrashed": "A janela foi fechada inesperadamente", + "appCrashedDetail": "Pedimos desculpas pelo inconveniente! Você pode reabrir a janela para continuar de onde parou.", + "newWindow": "Nova Janela", + "newWindowDesc": "Abrir uma nova janela", + "recentFolders": "Pastas Recentes", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/node/cliProcessMain.i18n.json b/i18n/ptb/src/vs/code/node/cliProcessMain.i18n.json new file mode 100644 index 0000000000000..ee0b74f6e41e5 --- /dev/null +++ b/i18n/ptb/src/vs/code/node/cliProcessMain.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "Extensão '{0}' não encontrada.", + "notInstalled": "Extensão '{0}' não está instalada.", + "useId": "Certifique-se de usar a ID de extensão completa, incluindo o editor, por exemplo: {0}", + "successVsixInstall": "Extensão '{0}' foi instalada com sucesso!", + "alreadyInstalled": "Extensão '{0}' já está instalada.", + "foundExtension": "Encontrado '{0}' na loja VS Code.", + "installing": "Instalando...", + "successInstall": "Extensão '{0}' v {1} foi instalada com sucesso!", + "uninstalling": "Desinstalando {0}...", + "successUninstall": "Extensão '{0}' foi desinstalada com sucesso!" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json new file mode 100644 index 0000000000000..8411a9303639d --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -0,0 +1,76 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorConfigurationTitle": "Editor", + "fontFamily": "Controla a família de fontes.", + "fontWeight": "Controla o peso da fonte.", + "fontSize": "Controla o tamanho da fonte em pixels.", + "lineHeight": "Controla a altura da linha. Use 0 para computar a altura da linha a partir do tamanho da fonte.", + "letterSpacing": "Controla o espaçamento da letra em pixels.", + "lineNumbers": "Controla a exibição de números de linha. Valores possíveis são 'on', 'off' e 'relative'. 'relative' mostra a contagem de linhas a partir da posição atual do cursor.", + "rulers": "Colunas nas quais mostrar réguas verticais", + "wordSeparators": "Caracteres que serão usados como separadores de palavras ao fazer navegação relacionada a palavras ou operações", + "tabSize": "O número de espaços equivalentes a uma tabulação. Esta configuração é sobreposta no conteúdo do arquivo quando `editor.detectIndentation` está ligado.", + "tabSize.errorMessage": "Esperado 'número'. Note que o valor \"auto\" foi alterado pela configuração 'editor.detectIndentation'.", + "insertSpaces": "Insere espaços quanto pressionado Tab. Esta configuração é sobrescrita com base no conteúdo do arquivo quando 'editor.detectIndentation' está habilitado.", + "insertSpaces.errorMessage": "Esperado 'booleano'. Note que o valor \"auto\" foi alterado pela configuração 'editor.detectIndentation'.", + "detectIndentation": "Quando um arquivo está sendo aberto, 'editor.tabSize' e 'editor.insertSpace' será detectado com base no conteúdo do arquivo.", + "roundedSelection": "Controla se as seleções têm cantos arredondados", + "scrollBeyondLastLine": "Controla se o editor rolará além da última linha", + "minimap.enabled": "Controla se o mini mapa é exibido", + "minimap.renderCharacters": "Renderizar os caracteres em uma linha (em oposição a blocos de caracteres)", + "minimap.maxColumn": "Limitar o tamanho de um mini-mapa para renderizar no máximo um número determinado de colunas", + "wordWrap.off": "As linhas nunca serão quebradas.", + "wordWrap.on": "As linhas serão quebradas na largura de visualização", + "wordWrap.wordWrapColumn": "As linhas serão quebradas em `editor.wordWrapColumn`.", + "wordWrap.bounded": "As linhas serão quebradas no mínimo entre a largura de visualização e `editor.wordWrapColumn`.", + "wordWrap": "Controla como as linhas devem ser quebradas automaticamente. Pode ser:\n- 'off' (quebra automática de linha desabilitada)\n- 'on' (quebra automática de linha na largura da janela)\n- 'wordWrapColumn' (quebra automática no numero de colunas definido em `editor.wordWrapColumn`) ou\n- 'bounded' (quebra automática em uma dimensão minima da janela e na largura configurada)", + "wordWrapColumn": "Controla a coluna de quebra de linha do editor quando editor.wordWrap` é 'wordWrapColumn' ou 'bounded'.", + "wrappingIndent": "Controla o recuo de linhas quebradas. Pode ser \"none\", \"same\" ou \"indent\".", + "mouseWheelScrollSensitivity": "Um multiplicador a ser usado em \"deltaX\" e \"deltaY\" dos eventos de rolagem do botão de rolagem do mouse", + "quickSuggestions.strings": "Habilitar sugestões rápidas dentro de strings.", + "quickSuggestions.comments": "Habilitar sugestões rápidas dentro de comentários.", + "quickSuggestions.other": "Habilitar sugestões rápidas fora de strings e comentários.", + "quickSuggestions": "Controlar se sugestões devem aparecer automaticamente ao digitar", + "quickSuggestionsDelay": "Controla o atraso em ms após o qual sugestões rápidas serão exibidas", + "parameterHints": "Habilita dicas de parâmetros", + "autoClosingBrackets": "Controla se o editor deve fechar colchetes automaticamente depois de abri-los", + "formatOnType": "Controla se o editor deve formatar automaticamente a linha após a digitação", + "formatOnPaste": "Controla se o editor deve formatar automaticamente o conteúdo colado. Um formatador deve estar disponível e o formatador deve ser capaz de formatar apenas uma parte do documento.", + "suggestOnTriggerCharacters": "Controla se as sugestões devem aparecer automaticamente ao digitar caracteres de gatilho", + "acceptSuggestionOnCommitCharacter": "Controla se as sugestões devem ser aceitas em caracteres de confirmação. Por exemplo, em JavaScript, o ponto-e-vírgula (';') pode ser um caractere de confirmação que aceita uma sugestão e digita esse caractere.", + "snippetSuggestions": "Controla se os snippets são exibidos juntamente com as outras sugestões e como eles são ordenados.", + "emptySelectionClipboard": "Controla se a cópia sem nenhuma seleção copia a linha atual.", + "wordBasedSuggestions": "Controla se o auto-completar deve ser calculado baseado nas palavras no documento.", + "suggestFontSize": "Tamanho da fonte para a ferramenta de sugestão", + "suggestLineHeight": "Altura de linha para a ferramenta de sugestão", + "selectionHighlight": "Controla se o editor deve realçar correspondências semelhantes à seleção", + "occurrencesHighlight": "Controla se o editor deve realçar ocorrências de símbolos semânticos.", + "overviewRulerLanes": "Controla o número de decorações que podem ser exibidas na mesma posição na régua de visão geral", + "overviewRulerBorder": "Controla se deve desenhar uma borda ao redor da régua de visão geral.", + "cursorBlinking": "Controla o estilo de animação do cursor, os valores possíveis são 'blink', 'smooth', 'phase', 'expand' e 'solid'", + "mouseWheelZoom": "Alterar o zoom da fonte editor quando utilizada a roda do mouse e pressionando Ctrl", + "cursorStyle": "Controla o estilo do cursor, os valores aceitos são 'block', 'block-outline', 'line', 'line-thin', 'underline' e 'underline-thin'", + "fontLigatures": "Habilita ligaduras de fontes", + "hideCursorInOverviewRuler": "Controla se o cursor deve ficar oculto na régua de visão geral.", + "renderWhitespace": "Controla como o editor deve rendenizar caracteres de espaços em branco, possibilidades são 'none', 'boundary' e 'all'. A opção 'boundary' não rendeniza espaços simples entre palavras.", + "renderControlCharacters": "Controla se o editor deve renderizar caracteres de controle", + "renderIndentGuides": "Controla se o editor deve renderizar guias de identação", + "renderLineHighlight": "Controla como o editor deve renderizar a linha atual, as possibilidades são 'none', 'gutter', 'line' e 'all'.", + "codeLens": "Controla se o editor exibirá a lente de códigos.", + "folding": "Controla se o editor tem codigo colapsível hablitado", + "showFoldingControls": "Controla se os controles de desdobramento na divisão são ocultas automaticamente.", + "matchBrackets": "Realça colchetes correspondente quando um deles estiver selecionado.", + "glyphMargin": "Controla se o editor deve renderizar a margem vertical de ícones. A margem vertical de ícones é usada primordialmente na depuração", + "useTabStops": "Inserção e deleção de espaço em branco seguem a tabulação", + "trimAutoWhitespace": "Remove espaços em branco inseridos automaticamente no fim da linha", + "stablePeek": "Mantém os editores de visualização abertos mesmo quando clicando seu conteúdo ou teclando Escape.", + "dragAndDrop": "Controla se o editor deve permitir mover seleções via arrastar e soltar.", + "sideBySide": "Controla se o editor de diff mostra as diff lado a lado ou inline.", + "ignoreTrimWhitespace": "Controla se o editor de diff mostra alterações nos espaços iniciais ou finais como diferenças", + "renderIndicators": "Controla se o editor de diff mostra indicadores +/- para alterações adicionadas/removidas", + "selectionClipboard": "Controla se a área primária de transferência Linux deve ser suportada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/ptb/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..40fed0886ccdb --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorViewAccessibleLabel": "Conteúdo do editor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/controller/cursor.i18n.json b/i18n/ptb/src/vs/editor/common/controller/cursor.i18n.json new file mode 100644 index 0000000000000..60bcb5f5b5ad5 --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/controller/cursor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "corrupt.commands": "Exceção inesperada ao executar o comando." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/model/textModelWithTokens.i18n.json b/i18n/ptb/src/vs/editor/common/model/textModelWithTokens.i18n.json new file mode 100644 index 0000000000000..fc3574b7fde68 --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/model/textModelWithTokens.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mode.tokenizationSupportFailed": "O modo falhou ao gerar token da entrada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/modes/modesRegistry.i18n.json b/i18n/ptb/src/vs/editor/common/modes/modesRegistry.i18n.json new file mode 100644 index 0000000000000..509203220c861 --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/modes/modesRegistry.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "plainText.alias": "Texto sem formatação" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/ptb/src/vs/editor/common/services/bulkEdit.i18n.json new file mode 100644 index 0000000000000..3fada6ebf5375 --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "Estes arquivos foram alterados nesse meio tempo: {0}", + "summary.0": "Não foram feitas edições", + "summary.nm": "Feitas {0} edições de texto em {1} arquivos", + "summary.n0": "Feitas {0} edições de texto em um arquivo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/services/modeServiceImpl.i18n.json b/i18n/ptb/src/vs/editor/common/services/modeServiceImpl.i18n.json new file mode 100644 index 0000000000000..85f2d2943f68d --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/services/modeServiceImpl.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.languages": "Contribui às declarações de linguagem.", + "vscode.extension.contributes.languages.id": "ID da linguagem", + "vscode.extension.contributes.languages.aliases": "Aliases de nome para esta linguagem.", + "vscode.extension.contributes.languages.extensions": "Extensões de arquivos associadas a esta linguagem", + "vscode.extension.contributes.languages.filenames": "Nome dos arquivos associados a esta linguagem", + "vscode.extension.contributes.languages.filenamePatterns": "Padrão glob de nomes de arquivos associados a linguagem.", + "vscode.extension.contributes.languages.mimetypes": "Tipos Mime associados à linguagem.", + "vscode.extension.contributes.languages.firstLine": "Uma expressão regular que coincide com a primeira linha de um arquivo da linguaguem.", + "vscode.extension.contributes.languages.configuration": "Um caminho relativo para um arquivo contendo opções de configuração para a linguagem." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/services/modelServiceImpl.i18n.json b/i18n/ptb/src/vs/editor/common/services/modelServiceImpl.i18n.json new file mode 100644 index 0000000000000..b6c528c5a2505 --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/services/modelServiceImpl.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "diagAndSourceMultiline": "[{0}] {1}", + "diagAndSource": "[{0}] {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/ptb/src/vs/editor/common/view/editorColorRegistry.i18n.json new file mode 100644 index 0000000000000..8d59b0fcb7d7f --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lineHighlight": "Cor de fundo para a posição do cursor na seleção de linhas.", + "lineHighlightBorderBox": "Cor de fundo para a borda em volta da linha na posição do cursor", + "rangeHighlight": "Cor de fundo dos ranges selecionados, assim como abertura instantânea e descoberta de recursos ", + "caret": "Cor do cursor no editor.", + "editorWhitespaces": "Cor dos caracteres em branco no editor", + "editorIndentGuides": "Cor das guias de indentação do editor.", + "editorLineNumbers": "Cor dos números de linha do editor.", + "editorRuler": "Cor das réguas do editor.", + "editorCodeLensForeground": "Cor do primeiro plano das lentes de código do editor", + "editorBracketMatchBackground": "Cor de fundo atrás do colchetes correspondentes", + "editorBracketMatchBorder": "Cor para as caixas de colchetes correspondentes", + "editorOverviewRulerBorder": "Cor da borda da régua de visão geral.", + "editorGutter": "Cor de fundo da separação do editor.O separador contém os glifos das margens e os números de linha." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json b/i18n/ptb/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json new file mode 100644 index 0000000000000..e045839f7c689 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "introMsg": "Obrigado por testar a opção de acessibilidade do VS Code.", + "status": "Status", + "tabFocusModeOnMsg": "Pressionando Tab no editor corrente irá mover o foco para o próximo elemento focável. Mude este comportamento ao pressionar {0}.", + "tabFocusModeOnMsgNoKb": "Pressionando Tab no editor corrente irá mover o foco para o próximo elemento focável. O comando {0} não pode ser ativado atualmente por uma tecla.", + "tabFocusModeOffMsg": "Pressionando Tab no editor atual irá inserir um caractere Tab. Mude este comportamente ao pressionar {0}.", + "tabFocusModeOffMsgNoKb": "Pressionando Tab no editor atual irá inserir um caractere Tab. O comando {0} não pode ser ativado atualmente por uma tecla.", + "outroMsg": "Você pode ignorar essa dica e retornar ao editor apertando a tecla ESC", + "ShowAccessibilityHelpAction": "Mostrar ajuda de acessibilidade" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json b/i18n/ptb/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json new file mode 100644 index 0000000000000..4af1753636d6d --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "Ir para colchete" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json b/i18n/ptb/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json new file mode 100644 index 0000000000000..157105c4a358f --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "Mover cursor para a esquerda", + "caret.moveRight": "Mover cursor para a direita" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json b/i18n/ptb/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json new file mode 100644 index 0000000000000..c1d3083b1985c --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "Transport letras" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json b/i18n/ptb/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json new file mode 100644 index 0000000000000..903f9fc1086fc --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "Recortar", + "actions.clipboard.copyLabel": "Copiar", + "actions.clipboard.pasteLabel": "Colar", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "Copiar com realce de sintaxe" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/comment/common/comment.i18n.json b/i18n/ptb/src/vs/editor/contrib/comment/common/comment.i18n.json new file mode 100644 index 0000000000000..ff1ba569c0c95 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/comment/common/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "Alternar Comentário de Linha", + "comment.line.add": "Adicionar Comentário de Linha", + "comment.line.remove": "Remover Comentário de Linha", + "comment.block": "Alternar Comentário de Bloco" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json b/i18n/ptb/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json new file mode 100644 index 0000000000000..e2b1d946bee13 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "Mostrar o menu de contexto do editor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/find/browser/findWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/find/browser/findWidget.i18n.json new file mode 100644 index 0000000000000..473543c085045 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/find/browser/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Localizar", + "placeholder.find": "Localizar", + "label.previousMatchButton": "Correspondência anterior", + "label.nextMatchButton": "Próxima correspondência", + "label.toggleSelectionFind": "Localizar na seleção", + "label.closeButton": "Fechar", + "label.replace": "Substituir", + "placeholder.replace": "Substituir", + "label.replaceButton": "Substituir", + "label.replaceAllButton": "Substituir Tudo", + "label.toggleReplaceButton": "Ativar/desativar modo Substituir", + "title.matchesCountLimit": "Somente os primeiros 999 resultados são realçados, mas todas as operações de pesquisa funcionam em todo o texto.", + "label.matchesLocation": "{0} de {1}", + "label.noResults": "Nenhum resultado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/ptb/src/vs/editor/contrib/find/common/findController.i18n.json new file mode 100644 index 0000000000000..07397efa5fed7 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/find/common/findController.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "Localizar", + "findNextMatchAction": "Localizar Próximo", + "findPreviousMatchAction": "Localizar anterior", + "nextSelectionMatchFindAction": "Localizar Próxima Seleção", + "previousSelectionMatchFindAction": "Localizar Seleção Anterior", + "startReplace": "Substituir", + "addSelectionToNextFindMatch": "Adicionar Seleção ao Próximo Localizar Correspondência", + "addSelectionToPreviousFindMatch": "Adicionar Seleção à Correspondência de Localização Anterior", + "moveSelectionToNextFindMatch": "Mover Última Seleção para Próximo Localizar Correspondência", + "moveSelectionToPreviousFindMatch": "Mover Última Seleção para Correspondência de Localização Anterior", + "selectAllOccurencesOfFindMatch": "Selecionar Todas as Ocorrências de Localizar Correspondência", + "changeAll.label": "Alterar todas as ocorrências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/folding/browser/folding.i18n.json b/i18n/ptb/src/vs/editor/contrib/folding/browser/folding.i18n.json new file mode 100644 index 0000000000000..c9d6b88a85279 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/folding/browser/folding.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "Abrir", + "unFoldRecursivelyAction.label": "Abrir recursivamente", + "foldAction.label": "Colapsar", + "foldRecursivelyAction.label": "Colapsar recursivamente", + "foldAllAction.label": "Colapsar tudo", + "unfoldAllAction.label": "Abrir tudo", + "foldLevelAction.label": "Nível de colapsamento {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/ptb/src/vs/editor/contrib/format/browser/formatActions.i18n.json new file mode 100644 index 0000000000000..4327e5f6744c2 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "1 edição de formatação feita na linha {0}", + "hintn1": "{0} edições de formatação feitas na linha {1}", + "hint1n": "Feita 1 edição de formatação entre as linhas {0} e {1}", + "hintnn": "Feitas {0} edições de formatação entre as linhas {1} e {2}", + "formatDocument.label": "Formatar Documento", + "formatSelection.label": "Formatar Seleção" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..01753366bca15 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Não foi encontrada definição para '{0}'", + "generic.noResults": "Nenhuma definição encontrada", + "meta.title": "- {0} definições", + "actions.goToDecl.label": "Ir para Definição", + "actions.goToDeclToSide.label": "Abrir definição ao lado", + "actions.previewDecl.label": "Inspecionar definição", + "goToImplementation.noResultWord": "Nenhuma implementação encontrada para '{0}'", + "goToImplementation.generic.noResults": "Nenhuma implementação encontrada", + "meta.implementations.title": "– {0} implementações", + "actions.goToImplementation.label": "Ir para a implementação", + "actions.peekImplementation.label": "Inspecionar implementação", + "goToTypeDefinition.noResultWord": "Nenhuma definição encontrada para '{0}'", + "goToTypeDefinition.generic.noResults": "Nenhuma definição de tipo encontrada", + "meta.typeDefinitions.title": "– {0} definições de tipos", + "actions.goToTypeDefinition.label": "Ir para a definição de tipo", + "actions.peekTypeDefinition.label": "Inspecionar definição de tipo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..675cbe29ae198 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Clique para mostrar {0} definições." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json b/i18n/ptb/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json new file mode 100644 index 0000000000000..0ad65de88635a --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "Ir para o Próximo Erro ou Aviso", + "markerAction.previous.label": "Ir para o Erro ou Aviso Anterior", + "editorMarkerNavigationError": "Ferramenta de marcação de edição apresentando error na cor ", + "editorMarkerNavigationWarning": "Ferramenta de marcação de edição apresentando adventência na cor", + "editorMarkerNavigationBackground": "Cor de fundo da ferramenta de marcação de navegação do editor." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/ptb/src/vs/editor/contrib/hover/browser/hover.i18n.json new file mode 100644 index 0000000000000..196a8fb2bb0aa --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "Mostrar Item Flutuante" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json b/i18n/ptb/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json new file mode 100644 index 0000000000000..2c74cf6f1ec3a --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "Carregando..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json b/i18n/ptb/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json new file mode 100644 index 0000000000000..fbbfbd0216101 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "Substituir pelo valor anterior", + "InPlaceReplaceAction.next.label": "Substituir pelo próximo valor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/indentation/common/indentation.i18n.json b/i18n/ptb/src/vs/editor/contrib/indentation/common/indentation.i18n.json new file mode 100644 index 0000000000000..8edeaaf810408 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/indentation/common/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "Converter indentação em espaços.", + "indentationToTabs": "Coverter Indentação a Tabulações.", + "configuredTabSize": "Tamanho de Tabulação Configurado", + "selectTabWidth": "Selecione o Tamanho de Tabulação para o Arquivo Atual", + "indentUsingTabs": "Indentar Usando Tabulações", + "indentUsingSpaces": "Indentar Usando Espaços", + "detectIndentation": "Detectar Indentação a Partir do Conteúdo", + "editor.reindentlines": "Reindentar Linhas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.i18n.json b/i18n/ptb/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..e715c4d667fe4 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Desenvolvedor: Inspecionar escopos TM", + "inspectTMScopesWidget.loading": "Carregando..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json b/i18n/ptb/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json new file mode 100644 index 0000000000000..8a368ab368da1 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "Copiar linha acima", + "lines.copyDown": "Copiar linha abaixo", + "lines.moveUp": "Mover linha para cima", + "lines.moveDown": "Mover linha para baixo", + "lines.sortAscending": "Classificar Linhas Ascendentemente", + "lines.sortDescending": "Classificar Linhas Descendentemente", + "lines.trimTrailingWhitespace": "Cortar Espaço em Branco à Direita", + "lines.delete": "Excluir linha", + "lines.indent": "Recuar linha", + "lines.outdent": "Recuar linha para a esquerda", + "lines.insertBefore": "Inserir linha acima", + "lines.insertAfter": "Inserir linha abaixo", + "lines.deleteAllLeft": "Excluir tudo à Esquerda", + "lines.deleteAllRight": "Excluir Tudo à Direita", + "lines.joinLines": "Unir Linhas", + "editor.transpose": "Transpor caracteres ao redor do cursor", + "editor.transformToUppercase": "Transformar para maiúsculas", + "editor.transformToLowercase": "Transformar para minúsculas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/ptb/src/vs/editor/contrib/links/browser/links.i18n.json new file mode 100644 index 0000000000000..64628273f2a1c --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/links/browser/links.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "Cmd + clique para seguir o link", + "links.navigate": "Ctrl + clique para seguir o link", + "invalid.url": "Desculpe, falha ao abrir este link porque ele não está bem formatado: {0}", + "missing.url": "Desculpe, falha ao abrir este link porque seu destino está faltando.", + "label": "Abrir link" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json b/i18n/ptb/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json new file mode 100644 index 0000000000000..583be5b3e5c44 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "Inserir cursor acima", + "mutlicursor.insertBelow": "Inserir cursor abaixo", + "mutlicursor.insertAtEndOfEachLineSelected": "Adicionar Cursores ao Final das Linhas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json b/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json new file mode 100644 index 0000000000000..f0450d3f4de44 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "Dicas de parâmetro de gatilho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json new file mode 100644 index 0000000000000..0f8237adbb3f6 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0}, dica" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json b/i18n/ptb/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json new file mode 100644 index 0000000000000..01ae8d7aff8af --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "Mostrar correções ({0})", + "quickFix": "Mostrar correções", + "quickfix.trigger.label": "Correção Rápida" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json new file mode 100644 index 0000000000000..9d557535df611 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": "- {0} referências", + "references.action.label": "Localizar Todas as Referências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json new file mode 100644 index 0000000000000..65217d2ace886 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "Carregando..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json new file mode 100644 index 0000000000000..47c3685850e0d --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "símbolo em {0} na linha {1} e coluna {2}", + "aria.fileReferences.1": "1 símbolo em {0}", + "aria.fileReferences.N": "{0} símbolos em {1}", + "aria.result.0": "Nenhum resultado encontrado", + "aria.result.1": "Encontrado 1 símbolo em {0}", + "aria.result.n1": "Encontrados {0} símbolos em {1}", + "aria.result.nm": "Encontrados {0} símbolos em {1} arquivos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json new file mode 100644 index 0000000000000..72f61eeaf832b --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "Falha ao resolver arquivo.", + "referencesCount": "{0} referências", + "referenceCount": "{0} referência", + "missingPreviewMessage": "nenhuma visualização disponível", + "treeAriaLabel": "Referências", + "noResults": "Nenhum resultado", + "peekView.alternateTitle": "Referências", + "peekViewTitleBackground": "Cor de fundo da área de visualização do título.", + "peekViewTitleForeground": "Cor de visualização do título.", + "peekViewTitleInfoForeground": "Cor da visualização de informações do título.", + "peekViewBorder": "Cor das bordas e seta da área de visualização", + "peekViewResultsBackground": "Cor de fundo da área de visualização da lista de resultados.", + "peekViewResultsMatchForeground": "Cor de primeiro plano para nós de linha na lista de resultados visualizados.", + "peekViewResultsFileForeground": "Cor de primeiro plano para nós de arquivos na lista de resultados visualizados.", + "peekViewResultsSelectionBackground": "Cor de fundo da entrada selecionada na visualização da lista de resultados.", + "peekViewResultsSelectionForeground": "Cor da entrada selecionada na visualização da lista de resultados.", + "peekViewEditorBackground": "Cor de fundo da visualização do editor.", + "peekViewEditorGutterBackground": "Cor de fundo da separação na visualização rápida do editor.", + "peekViewResultsMatchHighlight": "Corresponder cor de realce com visualização da lista de resultados.", + "peekViewEditorMatchHighlight": "Corresponder cor de realce com visualização do editor." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/ptb/src/vs/editor/contrib/rename/browser/rename.i18n.json new file mode 100644 index 0000000000000..a56535f6241cf --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "Nenhum resultado.", + "aria": "Renomeado '{0}' para '{1}'com sucesso. Resumo: {2}", + "rename.failed": "Desculpe, falha na execução de renomear.", + "rename.label": "Renomear Símbolo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json b/i18n/ptb/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json new file mode 100644 index 0000000000000..49eba92fa449e --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "Renomear entrada. Digite o novo nome e tecle Enter para gravar." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json b/i18n/ptb/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json new file mode 100644 index 0000000000000..89319f9a26696 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "Expandir seleção", + "smartSelect.shrink": "Reduzir seleção" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json new file mode 100644 index 0000000000000..b064152c8be90 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "Ao aceitar '{0}' foi inserido o seguinte texto: {1}", + "suggest.trigger.label": "Sugestão de gatilho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json new file mode 100644 index 0000000000000..c9da4793d67a9 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "Cor de fundo para a ferramenta de sugestão.", + "editorSuggestWidgetBorder": "Cor da borda para a ferramenta de sugestão.", + "editorSuggestWidgetForeground": "Cor de primeiro plano para a ferramenta de sugestão.", + "editorSuggestWidgetSelectedBackground": "Cor de fundo da entrada selecionada da ferramenta de sugestões.", + "editorSuggestWidgetHighlightForeground": "Cor de realce da correspondência na ferramenta de sugestão.", + "readMore": "Ler Mais...{0}", + "suggestionWithDetailsAriaLabel": "{0}, sugestão, tem detalhes", + "suggestionAriaLabel": "{0}, sugestão", + "readLess": "Ler menos... {0}", + "suggestWidget.loading": "Carregando...", + "suggestWidget.noSuggestions": "Nenhuma sugestão.", + "suggestionAriaAccepted": "{0}, aceito", + "ariaCurrentSuggestionWithDetails": "{0}, sugestão, tem detalhes", + "ariaCurrentSuggestion": "{0}, sugestão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json b/i18n/ptb/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json new file mode 100644 index 0000000000000..0f3dd0680954e --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "Alterne o uso da tecla Tab para mover o foco" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json b/i18n/ptb/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json new file mode 100644 index 0000000000000..e8556cb38a817 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "Cor de fundo de um símbolo durante acesso de leitura, como ao ler uma variável.", + "wordHighlightStrong": "Cor de fundo de um símbolo durante acesso de escrita, como ao escrever uma variável." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json new file mode 100644 index 0000000000000..41ad7313b7de5 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Fechar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json b/i18n/ptb/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json new file mode 100644 index 0000000000000..dfef3cc47a597 --- /dev/null +++ b/i18n/ptb/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "Linguagem desconhecida em `contributes.{0}.language`. Valor fornecido: {1}", + "invalid.scopeName": "Esperada uma string em 'contributes.{0}.scopeName'. Valor informado: {1}", + "invalid.path.0": "Esperada uma string em `contributes.{0}.path`. Valor informado: {1}", + "invalid.injectTo": "Valor inválido em `contributes.{0}.injectTo`. Deve ser uma matriz de nomes de escopo de idioma. Valor fornecido: {1}", + "invalid.embeddedLanguages": "Valor inválido em `contributes.{0}.embeddedLanguages`. Deve ser um objeto de mapeamento do nome do escopo para a linguagem. Valor informado: {1}", + "invalid.path.1": "É esperado que `contributes.{0}.path` ({1}) seja incluído na pasta da extensão ({2}). Isto pode tornar a extensão não portável.", + "no-tm-grammar": "Nenhuma gramática TM registrada para este idioma." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/ptb/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..04aa2bc703fba --- /dev/null +++ b/i18n/ptb/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "Erros parseando {0}: {1}", + "schema.openBracket": "O colchete de abertura de caractere ou sequência de caracteres.", + "schema.closeBracket": "O colchete de fechamento de caractere ou sequência de caracteres.", + "schema.comments": "Define o símbolo dos comentários", + "schema.blockComments": "Define como comentários em bloco são marcados.", + "schema.blockComment.begin": "A sequência de caracteres que inicia um comentário em bloco.", + "schema.blockComment.end": "A sequência de caracteres que termina um comentário de bloco.", + "schema.lineComment": "A sequência de caracteres que inicia um comentário de linha.", + "schema.brackets": "Define os símbolos de colchetes que aumentam ou diminuem a indentação.", + "schema.autoClosingPairs": "Define os pares de colchetes. Quando é introduzido um colchete de abertura, o colchete de fechamento é inserido automaticamente.", + "schema.autoClosingPairs.notIn": "Define uma lista de escopos onde os auto pares são desativados.", + "schema.surroundingPairs": "Define os pares de colchetes que podem ser usados para cercar uma seqüência selecionada.", + "schema.wordPattern": "A definição da palavra para a linguagem.", + "schema.wordPattern.pattern": "O padrão RegExp usado para coincidir com as palavras.", + "schema.wordPattern.flags": "Os sinalizadores RegExp usados para coincidir com as palavras.", + "schema.wordPattern.flags.errorMessage": "Deve corresponder ao padrão `/^([gimuy]+)$/`." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/node/textMate/TMGrammars.i18n.json b/i18n/ptb/src/vs/editor/node/textMate/TMGrammars.i18n.json new file mode 100644 index 0000000000000..7707ea3401f3b --- /dev/null +++ b/i18n/ptb/src/vs/editor/node/textMate/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "Contibui aos toquenizadores textmate", + "vscode.extension.contributes.grammars.language": "Identificador da linguagem para qual a sintaxe contribui.", + "vscode.extension.contributes.grammars.scopeName": "Nome do escopo Textmate usado pelo arquivo tmLanguage.", + "vscode.extension.contributes.grammars.path": "Caminho para o arquivo tmLanguage. O caminho é relativo a pasta da extensão e geralmente começa com './syntaxes/'.", + "vscode.extension.contributes.grammars.embeddedLanguages": "Um mapeamento no nome do escopo para o Id da linguagem se esta gramática contenha linguagens embutidas.", + "vscode.extension.contributes.grammars.injectTo": "Lista de nomes de escopos de linguagem aos quais esta gramática é injetada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/actions/browser/menuItemActionItem.i18n.json b/i18n/ptb/src/vs/platform/actions/browser/menuItemActionItem.i18n.json new file mode 100644 index 0000000000000..e64a7d0ed09f0 --- /dev/null +++ b/i18n/ptb/src/vs/platform/actions/browser/menuItemActionItem.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "titleAndKb": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/ptb/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json new file mode 100644 index 0000000000000..a8ef6175a0970 --- /dev/null +++ b/i18n/ptb/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "os itens de menu devem ser um array", + "requirestring": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "optstring": "a propriedade `{0}` é opcional ou deve ser do tipo `string`", + "vscode.extension.contributes.menuItem.command": "Identificador do comando para ser executado. O comando deve ser declarado na seção de 'Comandos'", + "vscode.extension.contributes.menuItem.alt": "O identificador de um comando alternativo para executar. O comando deve ser declarado na sessão 'Comandos'", + "vscode.extension.contributes.menuItem.when": "Condição, que deve ser verdadeira, para mostrar esse item", + "vscode.extension.contributes.menuItem.group": "Grupo ao qual pertence este comando", + "vscode.extension.contributes.menus": "Contribui itens de menu ao editor", + "menus.commandPalette": "Paleta de comandos", + "menus.editorTitle": "Meno do título editor", + "menus.editorContext": "Mostrar o menu de contexto do editor", + "menus.explorerContext": "Menu no contexto de explorador de arquivos", + "menus.editorTabContext": "Mostrar o menu de contexto do editor", + "menus.debugCallstackContext": "O menu de contexto de pilha de chamadas de depuração", + "menus.scmTitle": "O menu de título do controle de fonte", + "menus.resourceGroupContext": "O menu de contexto do grupo de recursos de controle de fonte", + "menus.resourceStateContext": "O menu de contexto de estado de recursos do controle de fonte", + "nonempty": "Esperado um valor não vazio", + "opticon": "a propriedade '{0}' é opcional ou pode ser do tipo 'string'", + "requireStringOrObject": "a propriedade '{0}' é obrigatória e deve ser do tipo 'string'", + "requirestrings": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "vscode.extension.contributes.commandType.command": "Indentificador de comando para executar", + "vscode.extension.contributes.commandType.title": "Título para o qual o comando é representado na UI", + "vscode.extension.contributes.commandType.category": "(Opcional) Sequência de categoria será agrupada na interface de usuário", + "vscode.extension.contributes.commandType.icon": "(Opcional) Icone utilizado para representar o comando na interface de usuário. Um arquivo ou configuração do tema.", + "vscode.extension.contributes.commandType.icon.light": "Caminho do Ícone quando o tema light for utilizado", + "vscode.extension.contributes.commandType.icon.dark": "Caminho do ícone quando o tema dark for utilizado", + "vscode.extension.contributes.commands": "Contribui comandos à paleta de comandos", + "dup": "Comando '{0}' aparece multiplas vezes na sessão 'comandos'\n", + "menuId.invalid": "'{0}' nao é um identificador de menu válido ", + "missing.command": "Identificador do comando para ser executado. O comando deve ser declarado na seção de 'Comandos'", + "missing.altCommand": "Referências ao item de menu no alt-command '{0}' qual nao é definido na sessão 'comandos'", + "dupe.command": "Itens de referencias do mesmo comando como padrão e alt-command", + "nosupport.altCommand": "Desculpe, mas atualmente somente o groupo 'navegação' do menu 'editor/título' suporta alt-commands" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/ptb/src/vs/platform/configuration/common/configurationRegistry.i18n.json new file mode 100644 index 0000000000000..928f36b2ee48b --- /dev/null +++ b/i18n/ptb/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultConfigurations.title": "Sobreposições da Configuração Padrão", + "overrideSettings.description": "Definir que configurações do editor sejam substituídas para idioma {0}.", + "overrideSettings.defaultDescription": "Definir que configurações do editor sejam substituídas para um idioma.", + "vscode.extension.contributes.configuration": "Contribui às definições de configuração.", + "vscode.extension.contributes.configuration.title": "Um resumo das configurações. Este rótulo será usado no arquivo de configurações como um comentário de separação.", + "vscode.extension.contributes.configuration.properties": "Descrição das propriedades de configuração.", + "config.property.languageDefault": "Não é possível registrar '{0}'. Isto corresponde a propriedade padrão '\\\\[.*\\\\]$' para descrever configurações do editor específico de linguagem. Use a contribuição 'configurationDefaults'.", + "config.property.duplicate": "Não é possível registrar '{0}'. Esta propriedade já está registrada.", + "invalid.properties": "'configuration.properties' deve ser um objeto", + "invalid.type": "Se definido, 'configuration.type' deve ser do tipo 'object'", + "invalid.title": "'configuration.title' deve ser um string", + "vscode.extension.contributes.defaultConfiguration": "Contribui às definições de configuração padrão do editor por linguagem." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/environment/node/argv.i18n.json b/i18n/ptb/src/vs/platform/environment/node/argv.i18n.json new file mode 100644 index 0000000000000..4cec19113d217 --- /dev/null +++ b/i18n/ptb/src/vs/platform/environment/node/argv.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoValidation": "Argumentos no modo '--goto' deve ser no formato de 'Arquivo(:LINHA(:CARACTERE))'.", + "diff": "Abrir um editor de diff. Requer passar dois caminhos de arquivo como argumentos.", + "goto": "Abra o arquivo no caminho, na linha e caractere (addcionar:linha[:caractere] para o caminho).", + "locale": "Para localização utilize (ex. en-US ou zh-TW).", + "newWindow": "Força uma nova instância do Código.", + "performance": "Comece com o 'Desenvolvedor: Desempenho de inicialização' comando habilitado.", + "prof-startup": "Rodar o CPU profiler durante a inicialização", + "reuseWindow": "Forçar a abertura de um arquivo ou pasta na última janela ativa", + "userDataDir": "Especifica o diretório que os dados do usuário serão mantidos, útil quando estiver rodando como root.", + "verbose": "Imprimir a saída detalhada (Implica -- esperar).", + "wait": "Aguarde a janela ser fechada antes de retornar.", + "extensionHomePath": "Defina o caminho raíz para as extensões.", + "listExtensions": "Lista de extensões instaladas", + "showVersions": "Exibir versões de extensões instaladas, quando estiver usando --list-extension", + "installExtension": "Instala uma extensão.", + "uninstallExtension": "Desinstala uma extensão.", + "experimentalApis": "Permite recursos de api propostos para uma extensão.", + "disableExtensions": "Desabilita todas as extensões instaladas.", + "disableGPU": "Desabilita aceleração de hardware da GPU.", + "version": "Versão de impressão", + "help": "Uso de impressão.", + "usage": "Uso", + "options": "opções", + "paths": "caminhos", + "optionsUpperCase": "Opções" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json b/i18n/ptb/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json new file mode 100644 index 0000000000000..52f37b66ccd23 --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "Não há espaço de trabalho." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json b/i18n/ptb/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json new file mode 100644 index 0000000000000..33ea82613268b --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "Extensões", + "preferences": "Preferências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/ptb/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json new file mode 100644 index 0000000000000..76dc4cf48f3d0 --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "Extensão não encontrada", + "noCompatible": "Não foi possível econtrar uma versão de {0} com esta versão do Code." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/ptb/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json new file mode 100644 index 0000000000000..a6c5a37ab058b --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalidManifest": "Extensão inválida: pacote.json nao é um arquivo JSON válido", + "restartCode": "Por favor reinicie Code antes de reinstalar {0}.", + "installDependeciesConfirmation": "A instalação de '{0}' também inclui suas dependências. Gostaria de continuar?", + "install": "Sim", + "doNotInstall": "Não", + "uninstallDependeciesConfirmation": "Gostaria de desinstalar '{0}' somente, ou suas dependências também?", + "uninstallOnly": "Apenas", + "uninstallAll": "Todos", + "cancel": "Cancelar", + "uninstallConfirmation": "Tem certeza que deseja desinstalar '{0}'?", + "ok": "OK", + "singleDependentError": "Não foi possível desinstalar a extensão '{0}'. A extensão '{1}' depende dela.", + "twoDependentsError": "Não foi possível desinstalar a extensão '{0}'. As extensões '{1}' e '{2}' dependem dela.", + "multipleDependentsError": "Não foi possível desinstalar a extensão '{0}'. As extensões '{1}' e '{2}' e outras dependem dela.", + "notExists": "Não foi possível encontrar a extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensions/common/abstractExtensionService.i18n.json b/i18n/ptb/src/vs/platform/extensions/common/abstractExtensionService.i18n.json new file mode 100644 index 0000000000000..d521fce97ffba --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensions/common/abstractExtensionService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownDep": "Extensão '{1}' falhou ao ativar. Motivo: dependência desconhecida '{0}'.", + "failedDep1": "Extensão '{1}' falhou ao ativar. Motivo: a dependência '{0}' falhou ao ativar.", + "failedDep2": "Extensão '{0}' falhou ao ativar. Motivo: mais de 10 níveis de dependências (provavelmente um laço de dependência).", + "activationError": "Ativação da extensão `{0}` falhou: {1}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json new file mode 100644 index 0000000000000..649e13b03b16e --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.engines.vscode": "Para extensões do VS Code, especifica a versão do VS Code que a extensão é compatível. Não pode ser *. Por exemplo: ^0.10.5 indica compatibilidade com uma versão mínima de 0.10.5 para o VS Code.", + "vscode.extension.publisher": "O editor da extensão do VS Code.", + "vscode.extension.displayName": "O nome de exibição para a extensão do VS Code.", + "vscode.extension.categories": "As categorias usadas pela galeria do VS Code para categorizar a extensão.", + "vscode.extension.galleryBanner": "Banner usado na loja VS Code.", + "vscode.extension.galleryBanner.color": "A cor do banner usado no cabeçalho de página da loja VS Code.", + "vscode.extension.galleryBanner.theme": "A cor do tema usada para o fonte usado no banner.", + "vscode.extension.contributes": "Todas as contribuições da extensão VS Code representadas por este pacote.", + "vscode.extension.preview": "Configura a extensão para ser marcada como pré-visualização na Loja.", + "vscode.extension.activationEvents": "Eventos de ativação para a extensão VS Code.", + "vscode.extension.badges": "Matriz de emblemas a mostrar na barra lateral da página da extensão na Loja.", + "vscode.extension.badges.url": "URL da imagem do emblema.", + "vscode.extension.badges.href": "Link do emblema.", + "vscode.extension.badges.description": "Descrição do emblema.", + "vscode.extension.extensionDependencies": "Dependências para outras extensões. O identificador de uma extensão sempre é ${publisher}. ${nome}. Por exemplo: vscode.csharp.", + "vscode.extension.scripts.prepublish": "Script a ser executado antes do pacote ser publicado como uma extensão VS Code.", + "vscode.extension.icon": "O caminho para um ícone de 128x128 pixels." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensions/node/extensionValidator.i18n.json b/i18n/ptb/src/vs/platform/extensions/node/extensionValidator.i18n.json new file mode 100644 index 0000000000000..fe37dd1820f45 --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensions/node/extensionValidator.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "versionSyntax": "Não foi possível analisar o valor de 'engines.vscode' {0}. Por favor, utilize, por exemplo: ^ 0.10.0, ^ 1.2.3, ^ 0.11.0, ^ 0.10.x, etc.", + "versionSpecificity1": "Versão especificada em 'engines.vscode' ({0}) não é específica o suficiente. Para versões do vscode anteriores a 1.0.0, por favor defina no mínimo a versão principal e secundária desejada. Por exemplo, ^ 0.10.0, 0.10.x, 0.11.0, etc.", + "versionSpecificity2": "Versão especificada em 'engines.vscode' ({0}) não é específica o suficiente. Para as versões do vscode posteriores a 1.0.0, por favor defina no mínimo a versão principal do desejado. Por exemplo, ^ 1.10.0, 1.10.x 1. XX, 2.x.x, etc.", + "versionMismatch": "Extensão não é compatível com Code {0}. A extensão requer: {1}.", + "extensionDescription.empty": "Descrição de extensão vazia obtida", + "extensionDescription.publisher": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "extensionDescription.name": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "extensionDescription.version": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "extensionDescription.engines": "a propriedade `{0}` é obrigatória e deve ser do tipo `object`", + "extensionDescription.engines.vscode": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "extensionDescription.extensionDependencies": "a propriedade `{0}` pode ser omitida ou deve ser do tipo `string[]`", + "extensionDescription.activationEvents1": "a propriedade `{0}` pode ser omitida ou deve ser do tipo `string[]`", + "extensionDescription.activationEvents2": "Propriedades '{0}' e '{1}' devem ser especificadas ou devem ambas ser omitidas", + "extensionDescription.main1": "a propriedade `{0}` é opcional ou pode ser do tipo `string`", + "extensionDescription.main2": "Esperado 'main' ({0}) ser incluído dentro da pasta da extensão ({1}). Isto pode fazer a extensão não-portável.", + "extensionDescription.main3": "propriedades '{0}' e '{1}' devem ser especificadas ou devem ambas ser omitidas", + "notSemver": "Versão da extensão não é compatível a semver" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json b/i18n/ptb/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json new file mode 100644 index 0000000000000..d252527ac1533 --- /dev/null +++ b/i18n/ptb/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "integrity.ok": "OK", + "integrity.dontShowAgain": "Não mostrar novamente", + "integrity.moreInfo": "Mais informações", + "integrity.prompt": "Sua instalação de {0} parece estar corrompida. Favor reinstalar." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json b/i18n/ptb/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..47ff1ba6badad --- /dev/null +++ b/i18n/ptb/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "contributes.jsonValidation": "Contribui à configuração do schema json.", + "contributes.jsonValidation.fileMatch": "O padrão de arquivo a corresponder, por exemplo \"package.json\" ou \"*.launch\".", + "contributes.jsonValidation.url": "Um esquema de URL ('http:', 'https:') ou caminho relativo à pasta de extensão('./').", + "invalid.jsonValidation": "'configuration.jsonValidation' deve ser uma matriz", + "invalid.fileMatch": "'configuration.jsonValidation.fileMatch' deve ser definido", + "invalid.url": "'configuration.jsonValidation.url' deve ser uma URL ou caminho relativo", + "invalid.url.fileschema": "'configuration.jsonValidation.url' é uma URL relativa inválida: {0}", + "invalid.url.schema": "'configuration.jsonValidation.url' deve começar com ' http:', ' https: 'ou'. /' para os esquemas de referência localizados na extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json b/i18n/ptb/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json new file mode 100644 index 0000000000000..59961c4476a0f --- /dev/null +++ b/i18n/ptb/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "first.chord": "({0}) foi pressionado. Aguardando segunda tecla de pressionamento simultâneo...", + "missing.chord": "A combinação de chave ({0}, {1}) não é um comando." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/keybinding/common/keybindingLabels.i18n.json b/i18n/ptb/src/vs/platform/keybinding/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..bf2baf8390608 --- /dev/null +++ b/i18n/ptb/src/vs/platform/keybinding/common/keybindingLabels.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ctrlKey": "Ctrl", + "shiftKey": "Shift", + "altKey": "Alt", + "windowsKey": "Windows", + "ctrlKey.long": "Controle", + "shiftKey.long": "Shift", + "altKey.long": "Alt", + "cmdKey.long": "Comando", + "windowsKey.long": "Windows" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/ptb/src/vs/platform/markers/common/problemMatcher.i18n.json new file mode 100644 index 0000000000000..29df9e58b2bf0 --- /dev/null +++ b/i18n/ptb/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ProblemPatternParser.loopProperty.notLast": "A propriedade loop só é suportada na última linha correspondente.", + "ProblemPatternParser.problemPattern.missingRegExp": "Está faltando uma expressão regular a problema padrão.", + "ProblemPatternParser.problemPattern.missingProperty": "O problema padrão é inválido. Ele deve ter ao menos um arquivo, mensagem e linha ou local de grupo de correspondência.", + "ProblemPatternParser.invalidRegexp": "Erro: a cadeia de caracteres {0} não é uma expressão regular válida.\n", + "ProblemPatternSchema.regexp": "A expressão regular para procurar um erro, aviso ou informação na saída.", + "ProblemPatternSchema.file": "O índice do grupo de correspondência do arquivo. Se omitido, será usado 1.", + "ProblemPatternSchema.location": "O índice de grupo de correspondência da localização do problema. Padrões de localização válidos são: (linha), (linha, coluna) e (startLine, startColumn, endLine, endColumn). Se omitido (linha, coluna) é assumido.", + "ProblemPatternSchema.line": "O índice de grupo de correspondência da linha do problema. O padrão é 2", + "ProblemPatternSchema.column": "O índice de grupo de correspondência de caractere da linha do problema. O padrão é 3", + "ProblemPatternSchema.endLine": "O índice de grupo de correspondência de linha final do problema. O padrão é indefinido", + "ProblemPatternSchema.endColumn": "O índice de grupo de correspondência de caráter final de linha do problema. O padrão é indefinido", + "ProblemPatternSchema.severity": "O índice de grupo de correspondência da gravidade do problema. O padrão é indefinido", + "ProblemPatternSchema.code": "O índice de grupo de correspondência do código do problema. O padrão é indefinido", + "ProblemPatternSchema.message": "O índice de grupo de correspondência da mensagem. Se omitido o padrão é 4 se o local for especificado. Caso contrário o padrão é 5.", + "ProblemPatternSchema.loop": "Em um loop de correspondência multi linha indica se este padrão é executado em um loop enquanto houver correspondências. Somente pode ser especificado no último padrão em um padrão de linha múltiplas.", + "NamedProblemPatternSchema.name": "O nome do modelo de problema.", + "NamedMultiLineProblemPatternSchema.name": "O nome do modelo de problema multi-linhas.", + "NamedMultiLineProblemPatternSchema.patterns": "Os padrões atuais.", + "ProblemPatternExtPoint": "Contribui aos modelos de problema", + "ProblemPatternRegistry.error": "Modelo de problema inválido. O modelo será ignorado.", + "ProblemMatcherParser.noProblemMatcher": "Erro: a descrição não pode ser convertida em uma correspondência de problema:\n{0}\n\n", + "ProblemMatcherParser.noProblemPattern": "Erro: a descrição nao define um padrão de problema válido: {0}\n", + "ProblemMatcherParser.noOwner": "Erro: a descriçao não define um proprietário:\n{0}\n", + "ProblemMatcherParser.noFileLocation": "Erro: a descrição não define uma localização de arquivo:\n{0}\n", + "ProblemMatcherParser.unknownSeverity": "Info: severidade {0} desconhecida. Valores válidos são erro, aviso e info.\n", + "ProblemMatcherParser.noDefinedPatter": "Erro: o padrão com o identificador {0} não existe.", + "ProblemMatcherParser.noIdentifier": "Erro: a propriedade padrão se refere a um identificador vazio.", + "ProblemMatcherParser.noValidIdentifier": "Erro: a propriedade padrão {0} não é uma variável de padrões válida.", + "ProblemMatcherParser.problemPattern.watchingMatcher": "Um problema de correspondência deve obrigatoriamente definir padrão inicial e um padrão final para monitoramento.", + "ProblemMatcherParser.invalidRegexp": "Erro: a cadeia de caracteres {0} não é uma expressão regular válida.\n", + "WatchingPatternSchema.regexp": "A expressão regular para detectar o início ou o fim de uma tarefa em segundo plano.", + "WatchingPatternSchema.file": "O índice do grupo de correspondência do arquivo. Pode ser omitido.", + "PatternTypeSchema.name": "O nome de um padrão pré-definido ou contribuído.", + "PatternTypeSchema.description": "Um padrão de problema ou o nome de um padrão de problema pré-definido ou contribuído. Pode ser omitido se base for especificada.", + "ProblemMatcherSchema.base": "O nome de uma correspondência de problema base a ser utilizado.", + "ProblemMatcherSchema.owner": "O proprietário de um problema dentro do código. Pode ser omitido se base for especificada. Default para 'externo' se omitido e base não for especificada.", + "ProblemMatcherSchema.severity": "A severidade padrão para captura de problemas. É utilizada se o padrão não definir um grupo correspondente para severidade.", + "ProblemMatcherSchema.applyTo": "Controla se um problema reportado em um documento de texto é aplicado somente para aberto, fechado ou todos os documentos.", + "ProblemMatcherSchema.fileLocation": "Define como os nomes de arquivos reportados em um padrão de problema devem ser interpretados.", + "ProblemMatcherSchema.background": "Padrões para monitorar o início e o término de um pesquisador ativo em uma tarefa em segundo plano.", + "ProblemMatcherSchema.background.activeOnStart": "Se configurado para verdadeiro, o monitor em segundo plano está em modo ativo quando a tarefa inicia. Isto é igual a emissão de uma linha que corresponde ao beginPattern", + "ProblemMatcherSchema.background.beginsPattern": "Se houver correspondência na saída o início de uma tarefa em segundo plano é sinalizada.", + "ProblemMatcherSchema.background.endsPattern": "Se houver correspondência na saída o final de uma tarefa em segundo plano é sinalizada.", + "ProblemMatcherSchema.watching.deprecated": "A propriedade watching foi descontinuada. Use background no lugar dela.", + "ProblemMatcherSchema.watching": "Padrões para monitorar o início e o término de um pesquisador observando.", + "ProblemMatcherSchema.watching.activeOnStart": "Se configurado para verdadeiro, o monitoramento está em modo ativo quando a tarefa inicia. Isto é igual a emissão de uma linha que corresponde ao beginPattern", + "ProblemMatcherSchema.watching.beginsPattern": "Se houver correspondência na saída o início de uma tarefa observada é sinalizada.", + "ProblemMatcherSchema.watching.endsPattern": "Se houver correspondência na saída o final de uma tarefa observada é sinalizada.", + "LegacyProblemMatcherSchema.watchedBegin.deprecated": "Esta propriedade está descontinuada. Ao invés, use a propriedade de observação.", + "LegacyProblemMatcherSchema.watchedBegin": "Uma expressão regular sinalizando que uma tarefa observada é ativada através da observação.", + "LegacyProblemMatcherSchema.watchedEnd.deprecated": "Esta propriedade está descontinuada. Ao invés, use a propriedade de observação.", + "LegacyProblemMatcherSchema.watchedEnd": "Uma expressão regular sinalizando que uma tarefa observada terminou a execução.", + "NamedProblemMatcherSchema.name": "O nome do correspondente do problema.", + "ProblemMatcherExtPoint": "Contribui aos correspondentes de problema" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/message/common/message.i18n.json b/i18n/ptb/src/vs/platform/message/common/message.i18n.json new file mode 100644 index 0000000000000..620c63edd0712 --- /dev/null +++ b/i18n/ptb/src/vs/platform/message/common/message.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Fechar", + "later": "Mais tarde", + "cancel": "Cancelar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/request/node/request.i18n.json b/i18n/ptb/src/vs/platform/request/node/request.i18n.json new file mode 100644 index 0000000000000..1f7fd75e5aa68 --- /dev/null +++ b/i18n/ptb/src/vs/platform/request/node/request.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "httpConfigurationTitle": "HTTP", + "proxy": "As configurações de proxy a usar. Se não forem configuradas, serão obtidas das variáveis de ambiente http_proxy e https_proxy", + "strictSSL": "Se o certificado do servidor de proxy deve ser verificado contra a lista de autoridades de certificação fornecida.", + "proxyAuthorization": "O valor para enviar como o cabeçalho de 'autorização Proxy' para cada solicitação de rede." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/telemetry/common/telemetryService.i18n.json b/i18n/ptb/src/vs/platform/telemetry/common/telemetryService.i18n.json new file mode 100644 index 0000000000000..a1d67b82fb73f --- /dev/null +++ b/i18n/ptb/src/vs/platform/telemetry/common/telemetryService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetria", + "telemetry.enableTelemetry": "Permitir que os dados de uso e erros sejam enviados à Microsoft." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json new file mode 100644 index 0000000000000..64d68304f9806 --- /dev/null +++ b/i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.color": "Formato inválido de cor. Use #RGB, #RGBA, #RRGGBB ou #RRGGBBAA", + "schema.colors": "Cores usadas no workbench.", + "foreground": "Cor de primeiro plano geral. Essa cor é só usada se não for substituída por um componente.", + "errorForeground": "Cor de primeiro plano geral para mensagens de erro. Essa cor é só usada se não for substituída por um componente.", + "descriptionForeground": "Cor de primeiro plano para a descrição do texto provendo informação adicional, por exemplo para uma etiqueta.", + "focusBorder": "Cor geral da borda para elementos focalizados. Essa cor é usada somente se não for substituída por um componente.", + "contrastBorder": "Uma borda extra em torno de elementos para separá-los dos outros de maior contraste.", + "activeContrastBorder": "Uma borda extra em torno de elementos ativos para separá-los dos outros de maior contraste.", + "selectionBackground": "A cor de fundo das seleções de texto na bancada de trabalho (por exemplo, para campos de entrada ou áreas de texto). Note que isto não se aplica a seleções dentro do editor e do terminal.", + "textSeparatorForeground": "Cor para separadores de texto.", + "textLinkForeground": "Cor de primeiro plano para links no texto.", + "textLinkActiveForeground": "Cor de primeiro plano para links ativos no texto.", + "textPreformatForeground": "Cor de primeiro plano para segmentos de texto pré-formatados.", + "textBlockQuoteBackground": "Cor de fundo para blocos de citações no texto.", + "textBlockQuoteBorder": "Cor da borda para blocos de citações no texto.", + "textCodeBlockBackground": "Cor de fundo para blocos de código no texto.", + "widgetShadow": "Cor de sombra ferramentas como localizar/substituir dentro do editor.", + "inputBoxBackground": "Cor de fundo da caixa de entrada.", + "inputBoxForeground": "Cor de primeiro plano da caixa de entrada.", + "inputBoxBorder": "Borda da caixa de entrada.", + "inputBoxActiveOptionBorder": "Cor da borda das opções ativas em campos de entrada.", + "inputPlaceholderForeground": "Cor de primeiro plano da caixa de entrada para o texto de espaço reservado.", + "inputValidationInfoBackground": "Cor de fundo de validação de entrada para a severidade de informações.", + "inputValidationInfoBorder": "Cor da borda de validação de entrada para a severidade de informações.", + "inputValidationWarningBackground": "Cor de fundo de validação de entrada para avisos.", + "inputValidationWarningBorder": "Cor da borda de validação para a severidade de avisos.", + "inputValidationErrorBackground": "Cor de fundo de validação de entrada para a severidade do erro.", + "inputValidationErrorBorder": "Cor da borda de validação de entrada para a severidade do erro.", + "dropdownBackground": "Cor de fundo do menu suspenso.", + "dropdownForeground": "Cor de primeiro plano do menu suspenso.", + "dropdownBorder": "Borda do menu suspenso.", + "listFocusBackground": "Cor de fundo para o item focalizado de Lista/árvore quando a lista/árvore está ativa. Uma árvore/lista de ativa tem o foco do teclado, uma inativa não.", + "listFocusForeground": "Cor de fundo da Lista/árvore para o item focalizado quando a lista/árvore está ativa. Uma árvore/lista ativa tem o foco do teclado, uma inativa não.", + "listActiveSelectionBackground": "Cor de fundo para o item selecionado de Lista/árvore quando a lista/árvore está ativa. Uma lista/árvore ativa tem o foco do teclado, uma inativa não.", + "listActiveSelectionForeground": "Cor de primeiro plano para o item selecionado de Lista/árvore quando a lista/árvore está ativa. Uma lista/árvore ativa tem o foco do teclado, uma inativa não.", + "listInactiveSelectionBackground": "Cor de fundo para o item selecionado de Lista/árvore quando a lista/árvore está inativa. Uma lista/árvore ativa tem o foco do teclado, uma inativa não.", + "listInactiveSelectionForeground": "Cor de primeiro plano para Lista/árvore para o item selecionado quando a lista/árvore está inativa. Uma árvore/lista ativa tem o foco do teclado, um inativo não.", + "listHoverBackground": "Cor de fundo de Lista/árvore quando pairando sobre itens usando o mouse.", + "listHoverForeground": "Primeiro plano da Lista/Árvoce quando passar sobre itens usando o mouse.", + "listDropBackground": "Cor de fundo ao arrastar e soltar de Lista/árvore quando movendo itens usando o mouse.", + "highlight": "Cor de primeiro plano de Lista/árvore de destaques de correspondências ao pesquisar na árvore/lista.", + "pickerGroupForeground": "Seletor rápido de cor para rótulos de agrupamento.", + "pickerGroupBorder": "Seletor rápido de cor para bordas de agrupamentos.", + "buttonForeground": "Cor de primeiro plano do botão.", + "buttonBackground": "Cor de fundo do botão.", + "buttonHoverBackground": "Cor de fundo de botão quando flutuar sobre ele.", + "badgeBackground": "Cor de fundo do distintivo. Distintivos são rótulos de pequenas informações, por exemplo, para a contagem de resultados de pesquisa.", + "badgeForeground": "Cor de primeiro plano do distintivo. Distintivos são rótulos de pequenas informações, por exemplo, para a contagem de resultados de pesquisa.", + "scrollbarShadow": "Sombra da barra de rolagem para indicar que a visualização está sendo rolada.", + "scrollbarSliderBackground": "Cor de fundo do controle deslizante.", + "scrollbarSliderHoverBackground": "Cor de fundo de controle deslizante quando estiver flutuando sobre ele.", + "scrollbarSliderActiveBackground": "Cor de fundo de controle deslizante quando ativo.", + "progressBarBackground": "Cor de fundo da barra de progresso que pode ser mostrada em operações de execução demorada.", + "editorBackground": "Cor de plano de fundo do editor.", + "editorForeground": "Cor de primeiro plano padrão do editor.", + "editorWidgetBackground": "Cor de plano de fundo das ferramentas de edição, como pesquisar/substituir.", + "editorWidgetBorder": "Cor da borda da ferramenta editor.", + "editorSelection": "Cor de seleção do editor.", + "editorInactiveSelection": "Cor de seleção em um editor inativo.", + "editorSelectionHighlight": "Cor de regiões com o mesmo conteúdo da seleção.", + "editorFindMatch": "Cor da correspondência de pesquisa atual.", + "findMatchHighlight": "Cor dos outros resultados de pesquisa.", + "findRangeHighlight": "Cor da faixa que limita a pesquisa.", + "hoverHighlight": "Realçar abaixo da palavra onde é mostrado item flutuante", + "hoverBackground": "Cor de fundo para o item flutuante do editor", + "hoverBorder": "Cor da borda para o item flutuante do editor.", + "activeLinkForeground": "Cor dos links ativos.", + "diffEditorInserted": "Cor de fundo para texto que foi inserido.", + "diffEditorRemoved": "Cor de fundo para texto que foi removido.", + "diffEditorInsertedOutline": "Cor de contorno para o texto que foi inserido.", + "diffEditorRemovedOutline": "Cor de contorno para o texto que foi removido." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..d45294dd31757 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "overwritingExtension": "Sobrescrevendo extensão {0} por {1}.", + "extensionUnderDevelopment": "Carregando extensão de desenvolvimento em {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..0feb87677bb4d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Fechar", + "cancel": "Cancelar", + "ok": "OK" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/api/node/extHostDiagnostics.i18n.json b/i18n/ptb/src/vs/workbench/api/node/extHostDiagnostics.i18n.json new file mode 100644 index 0000000000000..867922ab8d2da --- /dev/null +++ b/i18n/ptb/src/vs/workbench/api/node/extHostDiagnostics.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "limitHit": "Não apresentando {0} erros e avisos a mais." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/ptb/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..d5ca67a935360 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeView.notRegistered": "Nenhuma visualização de árvore com id '{0}' registrado.", + "treeItem.notFound": "Nenhum item de árvore com id '{0}' encontrado.", + "treeView.duplicateElement": "Elemento {0} já está registrado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/configureLocale.i18n.json new file mode 100644 index 0000000000000..80686b2c89835 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "configureLocale": "Configurar Idioma", + "displayLanguage": "Define o idioma de exibição do VSCode.", + "doc": "Veja {0} para obter uma lista dos idiomas suportados.", + "restart": "Modificar o valor requer reinicialização do VSCode.", + "fail.createSettings": "Não foi possível criar '{0}' ({1}).", + "JsonSchema.locale": "O idioma da interface do usuário a ser usada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/fileActions.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/fileActions.i18n.json new file mode 100644 index 0000000000000..9da2e4e11c7b4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/fileActions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFolder": "Abrir Pasta...", + "openFileFolder": "Abrir..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json new file mode 100644 index 0000000000000..02e74f2918f40 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleActivityBar": "Alternar Visibilidade da Barra de Atividades", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json new file mode 100644 index 0000000000000..4cdb847aaca74 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleEditorGroupLayout": "Alternar Layout Vertical/Horizontal do Grupo de Editor", + "horizontalLayout": "Layout do Grupo de Editor Horizontal", + "verticalLayout": "Layout do Grupo de Editor Vertical", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json new file mode 100644 index 0000000000000..ee4fc5303618d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Alternar Localização da Barra Lateral", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json new file mode 100644 index 0000000000000..5143e35479cc2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleSidebar": "Alternar Localização da Barra Lateral", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json new file mode 100644 index 0000000000000..5376fb36c3a63 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleStatusbar": "Alternar Visibilidade da Barra de Status", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleZenMode.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleZenMode.i18n.json new file mode 100644 index 0000000000000..b0a635982f2ef --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleZenMode.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleZenMode": "Alternar Modo Zen", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json new file mode 100644 index 0000000000000..8dab311a65fbf --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeFromActivityBar": "Remover da Barra de Atividades", + "keepInActivityBar": "Manter na Barra de Atividades", + "titleKeybinding": "{0} ({1})", + "additionalViews": "Visualizações Adicionais", + "numberBadge": "{0} ({1})", + "manageExtension": "Gerenciar Extensão", + "toggle": "Alternar Visualização Fixa" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json new file mode 100644 index 0000000000000..5f8a7bb47ded7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hideActivitBar": "Ocultar a Barra de Atividades", + "activityBarAriaLabel": "Chave do Modo de exibição Ativo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/compositePart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/compositePart.i18n.json new file mode 100644 index 0000000000000..e12e6d4b90e56 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/compositePart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ariaCompositeToolbarLabel": "{0} ações ", + "titleTooltip": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json new file mode 100644 index 0000000000000..a38af02d66352 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "metadataDiff": "{0} ↔ {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json new file mode 100644 index 0000000000000..53321246ac788 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "binaryEditor": "Visualizador binário" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json new file mode 100644 index 0000000000000..dbfae18a9bfb0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textEditor": "Editor de texto", + "textDiffEditor": "Editor de Diferentes Textos", + "binaryDiffEditor": "Editor de Diferença Binária", + "sideBySideEditor": "Editor Lado a lado", + "groupOnePicker": "Mostrar editores no primeiro grupo", + "groupTwoPicker": "Mostrar editores no segundo grupo", + "groupThreePicker": "Mostrar editores no terceiro grupo", + "allEditorsPicker": "Mostrar todos editores abertos", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json new file mode 100644 index 0000000000000..ae6f9ae84b78d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -0,0 +1,55 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitEditor": "Dividir editor", + "joinTwoGroups": "Juntar editores de dois grupos", + "navigateEditorGroups": "Navegar entre grupos de editores", + "focusActiveEditorGroup": "Focalizar grupo de editores ativo", + "focusFirstEditorGroup": "Focalizar o primeiro grupo de editores", + "focusSecondEditorGroup": "Focalizar o segundo grupo de editores", + "focusThirdEditorGroup": "Focalizar o terceiro grupo de editores", + "focusPreviousGroup": "Focalizar grupo anterior", + "focusNextGroup": "Focalizar próximo grupo", + "openToSide": "Aberto para o lado", + "closeEditor": "Fechar editor", + "revertAndCloseActiveEditor": "Reverter e fechar editor", + "closeEditorsToTheLeft": "Fechar editores à esquerda ", + "closeEditorsToTheRight": "Fechar editores à direita", + "closeAllEditors": "Fechar todos editores", + "closeEditorsInOtherGroups": "Fechar editores nos outros grupos", + "closeOtherEditorsInGroup": "Fechar outros editores", + "closeEditorsInGroup": "Fechar todos editores no grupo", + "moveActiveGroupLeft": "Mover grupo de editores para esquerda", + "moveActiveGroupRight": "Mover grupo de editores para direita", + "minimizeOtherEditorGroups": "Minimizar outros grupos de editores", + "evenEditorGroups": "Igualar larguras de grupos de editores", + "maximizeEditor": "Maximizar grupo de editor e ocultar barra lateral", + "keepEditor": "Manter editor", + "openNextEditor": "Abrir próximo editor", + "openPreviousEditor": "Abrir editor anterior", + "nextEditorInGroup": "Abrir próximo editor no grupo", + "openPreviousEditorInGroup": "Abrir editor anterior no grupo", + "navigateNext": "Avançar", + "navigatePrevious": "Voltar", + "reopenClosedEditor": "Reabrir Editor Fechado", + "clearRecentFiles": "Limpar arquivos recentes", + "showEditorsInFirstGroup": "Mostrar editores no primeiro grupo", + "showEditorsInSecondGroup": "Mostrar editores no segundo grupo", + "showEditorsInThirdGroup": "Mostrar editores no terceiro grupo", + "showEditorsInGroup": "Mostrar editores no grupo", + "showAllEditors": "Mostrar todos editores", + "openPreviousRecentlyUsedEditorInGroup": "Abrir o Editor Anterior Recentemente Usado no Grupo", + "openNextRecentlyUsedEditorInGroup": "Abrir o Próximo Editor Recentemente Usado no Grupo", + "navigateEditorHistoryByInput": "Abrir o Editor Anterior do Histórico", + "openNextRecentlyUsedEditor": "Abrir o Próximo Editor Recentemente Utilizado", + "openPreviousRecentlyUsedEditor": "Abrir o Editor Anterior Recentemente Utilizado", + "clearEditorHistory": "Limpar Histórico do Editor", + "focusLastEditorInStack": "Abrir Último Editor do Grupo", + "moveEditorLeft": "Mover Editor para Esquerda", + "moveEditorRight": "Mover Editor para Direita", + "moveEditorToPreviousGroup": "Mover Editor para o Grupo Anterior", + "moveEditorToNextGroup": "Mover o Editor para o Próximo Grupo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json new file mode 100644 index 0000000000000..f42c45c02f558 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorCommand.activeEditorMove.description": "Mover o editor ativo por guias ou grupos", + "editorCommand.activeEditorMove.arg.name": "Argumento de movimento do editor ativo", + "editorCommand.activeEditorMove.arg.description": "Propriedades do argumento: \n\t\t\t\t\t\t- 'para': sequência de valor fornecendo para onde mover.\n\t\t\t\t\t\t- 'por': sequência de valor, fornecendo a unidade para o movimento. Por guia ou por grupo.\n\t\t\t\t\t\t- 'valor': valor numérico, fornecendo quantas posições ou uma posição absoluta para mover.\n\t\t\t\t\t", + "commandDeprecated": "Comando **{0}** foi removido. Você pode usar **{1}** em vez disso", + "openKeybindings": "Configurar os atalhos de teclado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPart.i18n.json new file mode 100644 index 0000000000000..c6a90d88542a6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPart.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "groupOneVertical": "Esquerda", + "groupTwoVertical": "Centro", + "groupThreeVertical": "Direita", + "groupOneHorizontal": "Topo", + "groupTwoHorizontal": "Centro", + "groupThreeHorizontal": "Baixo", + "editorOpenError": "Não foi possível abrir '{0}': {1}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json new file mode 100644 index 0000000000000..e17bc9405654b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, seletor de grupo editor", + "groupLabel": "Grupo: {0}", + "noResultsFoundInGroup": "Não foi encontrado nennhum editor aberto no grupo", + "noOpenedEditors": "Lista de editores abertos está atualmente vazia no grupo", + "noResultsFound": "Não foi encontrado editor correspondente aberto", + "noOpenedEditorsAllGroups": "A lista de editores abertos está atualmente vazia" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json new file mode 100644 index 0000000000000..c2057c183a1f6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "singleSelectionRange": "Ln {0}, {1} Col ({2} selecionado)", + "singleSelection": "Ln {0}, {1} Col", + "multiSelectionRange": "{0} seleções ({1} caracteres selecionados)", + "multiSelection": "{0} seleções", + "endOfLineLineFeed": "LF", + "endOfLineCarriageReturnLineFeed": "CRLF", + "tabFocusModeEnabled": "Tabulação move o foco", + "disableTabMode": "Desativar o modo de acessibilidade", + "gotoLine": "Ir para linha", + "indentation": "Indentação", + "selectEncoding": "Selecionar a codificação", + "selectEOL": "Selecionar a sequência de fim de linha", + "selectLanguageMode": "Selecionar modo de idioma", + "fileInfo": "Informações do arquivo", + "spacesSize": "Espaços: {0}", + "tabSize": "Tamanho de Tabulação: {0}", + "showLanguageExtensions": "Pesquisar extensões na loja para '{0}'...", + "changeMode": "Alterar o modo de linguagem", + "noEditor": "Nenhum editor de texto ativo neste momento", + "languageDescription": "({0}) - linguagem configurada", + "languageDescriptionConfigured": "({0})", + "languagesPicks": "linguagens (identificador)", + "configureModeSettings": "Configurar '{0}' configurações baseadas em linguagem...", + "configureAssociationsExt": "Configurar a associação de arquivo para '{0}'...", + "autoDetect": "Detecção automática", + "pickLanguage": "Selecionar o modo do idioma", + "currentAssociation": "Associação atual", + "pickLanguageToConfigure": "Selecionar o modo de linguagem para associar a '{0}'", + "changeIndentation": "Alterar a indentação", + "noWritableCodeEditor": "O editor de código ativo é somente leitura.", + "indentView": "alterar visualização", + "indentConvert": "converter arquivo", + "pickAction": "Selecionar ação", + "changeEndOfLine": "Alterar sequência de final de linha", + "pickEndOfLine": "Selecionar sequência de final de linha", + "changeEncoding": "Alterar a codificação do arquivo", + "noFileEditor": "Nenhum arquivo ativo neste momento", + "saveWithEncoding": "Salvar com codificação", + "reopenWithEncoding": "Reabrir com codificação", + "guessedEncoding": "Adivinhado a partir do conteúdo", + "pickEncodingForReopen": "Selecione a codificaçãodo arquivo para reabrir o arquivo.", + "pickEncodingForSave": "Selecione a codificação do arquivo para Salvar Com" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json new file mode 100644 index 0000000000000..9001e58fa9931 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "araLabelTabActions": "Ações de tablulação" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json new file mode 100644 index 0000000000000..8af2aff62d5e2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textDiffEditor": "Editor de Diferentes Textos", + "readonlyEditorWithInputAriaLabel": "{0}. Editor de comparação de texto somente leitura.", + "readonlyEditorAriaLabel": "Editor de comparação de texto somente leitura.", + "editableEditorWithInputAriaLabel": "{0}. Editor de comparação de arquivos texto.", + "editableEditorAriaLabel": "Editor de comparação de arquivos texto.", + "navigate.next.label": "Próxima Alteração", + "navigate.prev.label": "Alteração Anterior", + "inlineDiffLabel": "Alternar para exibição embutida", + "sideBySideDiffLabel": "Alternar para exibição lado a lado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/textEditor.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/textEditor.i18n.json new file mode 100644 index 0000000000000..eb58230b85431 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/textEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorLabelWithGroup": "{0}, Grupo {1}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json new file mode 100644 index 0000000000000..77f89efba5f9c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textEditor": "Editor de texto", + "readonlyEditorWithInputAriaLabel": "{0}. Editor de texto somente leitura.", + "readonlyEditorAriaLabel": "Editor de texto somente leitura.", + "untitledFileEditorWithInputAriaLabel": "{0}. Editor de texto de arquivo sem nome.", + "untitledFileEditorAriaLabel": "Editor de texto de arquivo sem nome." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/titleControl.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/titleControl.i18n.json new file mode 100644 index 0000000000000..bf8307cd384c2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/titleControl.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Fechar", + "closeOthers": "Fechar Outros", + "closeRight": "Fechar à direita", + "closeAll": "Fechar todos", + "keepOpen": "Manter aberto", + "showOpenedEditors": "Mostrar editores abertos", + "araLabelEditorActions": "Ações de editor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/panel/panelActions.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/panel/panelActions.i18n.json new file mode 100644 index 0000000000000..1f98f38c47e8e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/panel/panelActions.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "panelActionTooltip": "{0} ({1})", + "closePanel": "Fechar Painel", + "togglePanel": "Alternar Painel", + "focusPanel": "Foco no Painel", + "toggleMaximizedPanel": "Alternar Painel Maximizado", + "maximizePanel": "Maximizar Tamanho do Painel", + "minimizePanel": "Restaurar tamanho do Painel", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/panel/panelPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/panel/panelPart.i18n.json new file mode 100644 index 0000000000000..48a7b1b2f768e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/panel/panelPart.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "panelSwitcherBarAriaLabel": "Chave do Painel Ativo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json new file mode 100644 index 0000000000000..c98dd22d95d37 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inputModeEntryDescription": "{0} (Pressione 'Enter' para confirmar ou 'Esc' para cancelar)", + "inputModeEntry": "Pressione 'Enter' para confirmar o texto digitado ou 'Esc' para cancelar", + "emptyPicks": "Não há entradas a serem escolhidas", + "quickOpenInput": "Digite '?' para obter ajuda sobre as ações que você pode realizar a partir daqui", + "historyMatches": "aberto recentemente", + "noResultsFound1": "Nenhum resultado encontrado", + "canNotRunPlaceholder": "Esse manipulador de abertura rápida não pode ser usado no contexto atual", + "entryAriaLabel": "{0}, recentemente aberto", + "removeFromEditorHistory": "Remover do Histórico", + "pickHistory": "Selecionar uma entrada do editor para remover do histórico" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json new file mode 100644 index 0000000000000..57f5524e1be3a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "Ir para o Arquivo...", + "quickNavigateNext": "Navegar ao próximo em modo de abertura rápida", + "quickNavigatePrevious": "Navegar ao anterior em modo de abertura rápida", + "quickSelectNext": "Selecionar próximo em modo de abertura rápida", + "quickSelectPrevious": "Selecionar anterior em modo de abertura rápida" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json new file mode 100644 index 0000000000000..89806e051ea34 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "focusSideBar": "Foco na Barra Lateral", + "viewCategory": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json new file mode 100644 index 0000000000000..4a2adabf5a69d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "canNotRun": "O comando '{0}' não está habilitado e não pode ser executado.", + "manageExtension": "Gerenciar Extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json new file mode 100644 index 0000000000000..1c3db4d572b50 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "patchedWindowTitle": "[Sem Suporte]", + "devExtensionWindowTitlePrefix": "[Host de Desenvolvimento de Extensão]" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json b/i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json new file mode 100644 index 0000000000000..26c5e14f3675d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultsMatching": "Nenhum resultado encontrado", + "noResultsFound2": "Nenhum resultado encontrado", + "entryAriaLabel": "{0}, comando", + "noCommands": "Não há comandos correspondentes" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/viewlet.i18n.json b/i18n/ptb/src/vs/workbench/browser/viewlet.i18n.json new file mode 100644 index 0000000000000..34655b736ba10 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/viewlet.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "collapse": "Recolher tudo", + "viewToolbarAriaLabel": "{0} ações " +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/common/theme.i18n.json b/i18n/ptb/src/vs/workbench/common/theme.i18n.json new file mode 100644 index 0000000000000..bfe4c0ef01767 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/common/theme.i18n.json @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tabActiveBackground": "Cor de fundo da guia ativa. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "tabInactiveBackground": "Cor de fundo da guia inativa. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "tabBorder": "Borda para separar uma guia das outras. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "tabActiveEditorGroupActiveForeground": "Cor de primeiro plano da guia ativa em um grupo ativo. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "tabInactiveEditorGroupActiveForeground": "Cor de primeiro plano da guia inativa em um grupo ativo. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "editorGroupBackground": "Cor de fundo de um grupo de editor. Grupos de editor são os recipientes dos editores. A cor de fundo é mostrada ao arrastar o editor de grupos ao redor.", + "tabsContainerBackground": "Cor de fundo do cabeçalho do título do grupo de editor quando as guias são habilitadas. Grupos de editor são os recipientes dos editores.", + "editorGroupHeaderBackground": "Cor de fundo do título do cabeçalho do grupo de editor quando as guias são desabilitadas. Grupos de editor são os recipientes dos editores.", + "editorGroupBorder": "Cor para separar múltiplos grupos de editor de outro. Grupos de editor são os recipientes dos editores.", + "editorDragAndDropBackground": "Cor de fundo ao arrastar editores. A cor deve ter transparência para que o conteúdo do editor ainda possa ser visto.", + "panelBackground": "Cor de fundo do painel. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", + "panelBorder": "Cor da borda do painel no topo separando do editor. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", + "panelActiveTitleForeground": "Cor do título para o painel ativo. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", + "panelInactiveTitleForeground": "Cor do título para o painel inativo. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", + "panelActiveTitleBorder": "Cor da borda para o título do painel ativo. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", + "statusBarForeground": "Cor do primeiro plano da barra de status. A barra de status é mostrada na parte inferior da janela.", + "statusBarBackground": "Cor de fundo da barra de status padrão. A barra de status é mostrada na parte inferior da janela.", + "statusBarNoFolderBackground": "Cor de fundo da barra de status quando nenhuma pasta está aberta. A barra de status é mostrada na parte inferior da janela.", + "statusBarItemActiveBackground": "Cor de fundo do item da barra de status quando você clicado. A barra de status é mostrada na parte inferior da janela.", + "statusBarItemHoverBackground": "Cor de fundo do item da barra de status quando estiver passando sobre ele. A barra de status é mostrada na parte inferior da janela.", + "statusBarProminentItemBackground": "Cor de fundo de itens proeminentes da barra de status. Itens proeminentes destacam-se outras entradas da barra de status para indicar a importância. A barra de status é mostrada na parte inferior da janela.", + "statusBarProminentItemHoverBackground": "Cor de fundo dos itens proeminentes de barra de status quando estiver passando sobre eles. Itens proeminentes destacam-se outras entradas de barra de status para indicar a importância. A barra de status é mostrada na parte inferior da janela.", + "activityBarBackground": "Cor de fundo da barra de atividades. Barra de atividade está visível à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", + "activityBarForeground": "Cor de primeiro plano da barra de atividades (por exemplo, usada para os ícones). A barra de atividades está visível à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", + "activityBarDragAndDropBackground": "Cor de feedback de arrastar e soltar para os itens da barra de atividades. A cor deve ter transparência para que as entradas de bar de atividade ainda possam brilhar. A barra de atividade está visível à esquerda ou à direita e permite para alternar entre as visualizações da barra lateral.", + "activityBarBadgeBackground": "Cor de fundo da notificação de atividade. A barra de atividade está visível à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", + "activityBarBadgeForeground": "Cor de primeiro plano da notificação de atividade. A barra de atividade está visível à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", + "sideBarBackground": "Cor de fundo da barra lateral. A barra lateral é o recipiente para visualizações como explorador e pesquisa.", + "sideBarForeground": "Cor de primeiro plano da barra lateral. A barra lateral é o recipiente para visualizações como o explorador e a busca.", + "sideBarTitleForeground": "Cor de primeiro plano do título da barra lateral. A barra lateral é o recipiente para visualizações como explorador e pesquisa.", + "sideBarSectionHeaderBackground": "Cor de fundo do cabeçalho de seção lateral. A barra lateral é o recipiente para visões como explorador e pesquisa.", + "titleBarActiveForeground": "Cor da barra de título do primeiro plano quando a janela está ativa. Observe que essa cor atualmente somente é suportada no macOS.", + "titleBarInactiveForeground": "Cor de primeiro plano da barra de título quando a janela está inativa. Observe que essa cor atualmente somente é suportada no macOS.", + "titleBarActiveBackground": "Cor de fundo da barra de título quando a janela está ativa. Observe que essa cor atualmente somente é suportada no macOS.", + "titleBarInactiveBackground": "Cor de fundo de barra de título quando a janela está inativa. Observe que essa cor é atualmente somente suportada no macOS.", + "notificationsForeground": "Cor do primeiro plano de notificações. Notificações deslizam na parte superior da janela.", + "notificationsBackground": "Cor de fundo de notificações. Notificações deslizam na parte superior da janela." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json new file mode 100644 index 0000000000000..d829a3c8cad62 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "closeActiveEditor": "Fechar Editor", + "closeWindow": "Fechar Janela", + "switchWindow": "Alternar Janela", + "switchWindowPlaceHolder": "Selecionar uma janela", + "current": "Janela Atual", + "closeFolder": "Fechar Pasta", + "noFolderOpened": "Não há nenhuma pasta aberta nesta instância para ser fechada.", + "newWindow": "Nova Janela", + "toggleFullScreen": "Alternar Tela Inteira", + "toggleMenuBar": "Alternar Barra de Menus", + "toggleDevTools": "Alternar Ferramentas do Desenvolvedor", + "zoomIn": "Ampliar", + "zoomOut": "Reduzir", + "zoomReset": "Reinicializar Zoom", + "appPerf": "Desempenho de inicialização", + "reloadWindow": "Recarregar Janela", + "openRecent": "Abrir Recente", + "folders": "pastas", + "files": "arquivos", + "openRecentPlaceHolderMac": "Selecionar um caminho (Pressione a tecla Cmd para abrir em uma nova janela)", + "openRecentPlaceHolder": "Selecionar um caminho para abrir (Pressione a tecla Cmd para abrir em uma nova janela)", + "closeMessages": "Fechar mensagens de notificação", + "reportIssues": "Reportar Problemas", + "reportPerformanceIssue": "Reportar Problema de Desempenho", + "keybindingsReference": "Referência de Atalhos de Teclado", + "openDocumentationUrl": "Documentação", + "openIntroductoryVideosUrl": "Vídeos Introdutórios", + "toggleSharedProcess": "Alternar processo compartilhado", + "navigateLeft": "Mover para a Visualizção à Esquerda", + "navigateRight": "Mover para a Visualização à Direita", + "navigateUp": "Mover para a Visualização Acima", + "navigateDown": "Mover para a Visualização Abaixo", + "increaseViewSize": "Aumentar o Tamanho da Visualização Atual", + "decreaseViewSize": "Diminuir o Tamanho da Visualização Atual" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/commands.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/commands.i18n.json new file mode 100644 index 0000000000000..3a1051dcfdad7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/commands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "diffLeftRightLabel": "{0} ⟷ {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/crashReporter.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/crashReporter.i18n.json new file mode 100644 index 0000000000000..10b7a7ff10848 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/crashReporter.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetria", + "telemetry.enableCrashReporting": "Ativar o envio de relatórios de incidentes à Microsoft.\nEsta opção requer reinicialização para ser efetivada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/extensionHost.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/extensionHost.i18n.json new file mode 100644 index 0000000000000..e5a7ab8168661 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/extensionHost.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionHostProcess.startupFailDebug": "O host de extensão não iniciou em 10 segundos, ele pode ser interrompido na primeira linha e precisa de um depurador para continuar.", + "extensionHostProcess.startupFail": "Host de extensão não começou em 10 segundos, isso pode ser um problema.", + "extensionHostProcess.error": "Erro do host de extensão: {0}", + "extensionHostProcess.crash": "Host de extensão foi encerrado inesperadamente. Por favor recarregar a janela para recuperar." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json new file mode 100644 index 0000000000000..3b9050de1afb3 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "view": "Exibir", + "help": "Ajuda", + "file": "Arquivo", + "developer": "Desenvolvedor", + "showEditorTabs": "Controla se os editores abertos devem ou não serem exibidos em abas.", + "editorTabCloseButton": "Controla a posição dos botões de fechar das abas do editor ou os desabilita quando configurados para 'desligado'.", + "showIcons": "Controla se os editores abertos devem ou não ser exibidos com um ícone. Requer um tema de ícone para ser habilitado. ", + "enablePreview": "Controla se os editores abertos são exibidos como visualização. Editores de visualização são reutilizados até que eles sejam preservados (por exemplo, através de um duplo clique ou edição).", + "enablePreviewFromQuickOpen": "Controla se os editores abertos da Abertura Rápida são exibidos como visualização. Os editores de visualização são reutilizados até serem preservados (por exemplo, através de um duplo clique ou edição).", + "editorOpenPositioning": "Controla onde os editores serão abertos. Escolha 'esquerda' ou 'direita' para abrir os editores à esquerda ou à direita do \neditor ativo. Selecione 'primeiro' ou 'último' para abrir os editores independentemente do atual.", + "revealIfOpen": "Controla se um editor é exibido em qualquer um dos grupos, se aberto. Se desabilitado, um editor será aberto preferencialmente no grupo de editores ativo. Se habilitado, um editor já aberto será exibido no grupo de editores ativo, ao invés de ser aberto novamente. Note que há alguns casos onde esta configuração é ignorada, por exemplo, quando for forçada a abertura de um editor em um grupo específico ou ao lado do grupo atualmente ativo.", + "closeOnFocusLost": "Controla se Abertura Rápida deve fechar automaticamente caso perca o foco.", + "openDefaultSettings": "Controla se a abertura de configurações também abre um editor mostrando todas as configurações padrão.", + "sideBarLocation": "Controla a localização da barra lateral. Ele pode ser exibido à esquerda ou à direita da área de trabalho.", + "statusBarVisibility": "Controla a visibilidade da barra de status na parte inferior da área de trabalho.", + "activityBarVisibility": "Controla a visibilidade da barra de atividades na área de trabalho.", + "closeOnFileDelete": "Controla se os editores que mostram um arquivo devem fechar automaticamente quanto o arquivo é apagado ou renomeado por algum outro processo. Desativar isso manterá o editor aberto como sujo neste evento. Note que apagar do aplicativo sempre fechará o editor e os arquivos sujos nunca fecharão para preservar seus dados.", + "swipeToNavigate": "Navegue entre arquivos abertos usando o deslizamento horizontal de três dedos.", + "workbenchConfigurationTitle": "Área de Trabalho", + "window.openFilesInNewWindow.on": "Arquivos serão abertos em uma nova janela", + "window.openFilesInNewWindow.off": "Arquivos serão abertos em uma nova janela com a pasta de arquivos aberta ou com a última janela ativa.", + "window.openFilesInNewWindow.default": "Os arquivos serão abertos na janela com a pasta de arquivos aberta ou a última janela ativa, a menos que seja aberto através do dock ou do finder (somente macOS)", + "openFilesInNewWindow": "Controla se os arquivos devem ser abertos em uma nova janela\n- padrão: os arquivos serão abertos em uma nova janela com a pasta de arquivos aberta ou na última janela ativa, a menos que seja aberta através do dock ou do finder (apenas macOS)\n- ligado: os arquivos serão abertos em uma nova janela\n- desligado: os arquivos serão abertos em uma janela com a pasta de arquivos aberta ou a última janela ativa\nNota que ainda podem haver casos em que esta configuração será ignorada (por exemplo, quando estiver usando as opções de linha de comando -new-window ou -reuse-window).", + "window.openFoldersInNewWindow.on": "As pastas serão abertas em uma nova janela", + "window.openFoldersInNewWindow.off": "As pastas substituirão a última janela ativa", + "window.openFoldersInNewWindow.default": "As pastas serão abertas em uma nova janela, a menos que uma pasta seja selecionada dentro do aplicativo (por exemplo, através do menu Arquivo)", + "openFoldersInNewWindow": "Controla se as pastas devem ser abertas em uma nova janela ou substituir a última janela ativa\n- padrão: as pastas serão abertas em uma nova janela, a menos que seja selecionada dentro do aplicativo (por exemplo, através do menu Arquivo)\n- ligado: as pastas serão abertas em uma nova janela\n- desligado: as pastas substituirão a última janela ativa\nNote que ainda podem haver casos em que esta configuração será ignorada (por exemplo, quando estiver usando as opções de linha de comando -new-window ou -reuse-window).", + "window.reopenFolders.none": "Nunca reabra uma pasta.", + "window.reopenFolders.one": "Reabrir a última pasta ativa.", + "window.reopenFolders.all": "Reabrir todas as pastas da última sessão.", + "reopenFolders": "Controla como as pastas são reabertas depois de um reinício. Escolha 'nenhum' para nunca reabrir uma pasta, 'uma' para reabrir a última pasta que você trabalhou ou 'todas' para reabrir todas as pastas da sua última sessão.", + "restoreFullscreen": "Controla se uma janela deve ser restaurada em modo de tela cheia se ela foi finalizada em modo de tela cheia.", + "zoomLevel": "Ajusta o nível de zoom da janela. O tamanho original é 0 e cada aumento (por exemplo, 1) ou redução (por exemplo, -1) representa um zoom 20% maior ou menor. Você também pode digitar decimais para ajustar o nível de zoom com uma granularidade mais fina.", + "title": "Controla o título da janela com base no editor ativo. As variáveis são substituídas com base no contexto:\n$ {ActiveEditorShort}: por exemplo, meuArquivo.txt\n$ {ActiveEditorMedium}: por exemplo, minhaPasta / meuArquivo.txt\n$ {ActiveEditorLong}: por exemplo, /Usuários/Desenvolvimento/meuProjeto/minhaPasta/meuArquivo.txt\n$ {RootName}: por exemplo, meuProjeto\n$ {RootPath}: por exemplo, /Usuários/Desenvolvimento/meuProjeto\n$ {AppName}: por exemplo, VS Code\n$ {Dirty}: um indicador sujo se o editor ativo for sujo\n$ {Separator}: um separador condicional (\"-\") que só aparece quando for rodeado por variáveis com valores", + "window.newWindowDimensions.default": "Abrir novas janelas no centro da tela.", + "window.newWindowDimensions.inherit": "Abrir novas janelas com a mesma dimensão da última janela ativa.", + "window.newWindowDimensions.maximized": "Abrir novas janelas maximizadas.", + "window.newWindowDimensions.fullscreen": "Abrir novas janelas em modo de tela cheia.", + "newWindowDimensions": "Controla as dimensões ao abrir uma nova janela quando pelo menos uma janela já está aberta. Por padrão, uma nova janela será aberta no centro da tela com pequena dimensão. Quando definido como 'inherit', a janela vai ter as mesmas dimensões que a última janela que estava ativa. Quando definido como 'maximized', a janela abrirá maximizada e em tela cheia se configurado para 'fullscreen'. Observe que essa configuração não tem um impacto sobre a primeira janela que é aberta. A primeira janela sempre irá restaurar o tamanho e a localização como você deixou antes de fechar.", + "window.menuBarVisibility.default": "O menu está oculto apenas em modo de tela cheia.", + "window.menuBarVisibility.visible": "O menu está sempre visivel mesmo quando em modo de tela cheia.", + "window.menuBarVisibility.toggle": "O menu está oculto, mas pode ser mostrado através da tecla Alt.", + "window.menuBarVisibility.hidden": "O menu está sempre oculto.", + "menuBarVisibility": "Controla a visibilidade da barra de menu. Uma configuração 'alternar' significa que a barra de menus está oculta e pressionar a tecla Alt irá mostrá-la. Por padrão, a barra de menu será visível, a menos que a janela esteja em modo de tela cheia.", + "enableMenuBarMnemonics": "Se habilitado, os menus principais podem ser abertos através de atalhos de tecla Alt. Desativar mnemônicos permite vincular esses atalhos de tecla Alt para comandos do editor.", + "autoDetectHighContrast": "Se habilitado, irá mudar automaticamente para o tema de alto contraste se o Windows estiver utilizando um tema de alto contraste, e para o tema escuro ao mudar de um tema de alto contraste do Windows.", + "titleBarStyle": "Ajusta a aparência da barra de título da janela. As alterações exigem um reinício completo.", + "window.nativeTabs": "Habilita as abas da janela do macOS Sierra. Note que as alterações exigem um reinício completo e que as abas nativas desabilitarão um estilo de barra de título customizado, se configurado.", + "windowConfigurationTitle": "Janela", + "zenModeConfigurationTitle": "Modo Zen", + "zenMode.fullScreen": "Controla se a ativação do modo Zen também coloca o espaço de trabalho em modo de tela cheia.", + "zenMode.hideTabs": "Controla se a ativação do modo Zen também oculta as abas do espaço de trabalho.", + "zenMode.hideStatusBar": "Controla se a ativação do modo Zen também oculta a barra de status no rodapé do espaço de trabalho.", + "zenMode.hideActivityBar": "Controla se a ativação do modo Zen também oculta a barra de atividades à esquerda do espaço de trabalho.", + "zenMode.restore": "Controla se uma janela deve ser restaurada para o modo zen se ela foi finalizada no modo zen." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/main.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/main.i18n.json new file mode 100644 index 0000000000000..056d426d27d53 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/main.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "loaderError": "Falha ao carregar o arquivo necessário. Você não está mais conectado à Internet ou o servidor que você está conectado está offline. Atualize o navegador e tente novamente.", + "loaderErrorNative": "Falha ao carregar um arquivo necessário. Reinicie o aplicativo para tentar novamente. Detalhes: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/shell.i18n.json new file mode 100644 index 0000000000000..951a140a2ea01 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/shell.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "runningAsRoot": "Não é recomendado executar Code como 'root'." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/window.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/window.i18n.json new file mode 100644 index 0000000000000..50118b77afeb4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/window.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "undo": "Desfazer", + "redo": "Refazer", + "cut": "Recortar", + "copy": "Copiar", + "paste": "Colar", + "selectAll": "Selecionar Tudo", + "confirmOpen": "Tem certeza de que deseja abrir '{0}' pastas?", + "confirmOpenButton": "&&Abrir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/node/extensionHostMain.i18n.json b/i18n/ptb/src/vs/workbench/node/extensionHostMain.i18n.json new file mode 100644 index 0000000000000..f0596b258711c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/node/extensionHostMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionTestError": "Caminho {0} não aponta para um executor de testes com extensão válida." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/node/extensionPoints.i18n.json b/i18n/ptb/src/vs/workbench/node/extensionPoints.i18n.json new file mode 100644 index 0000000000000..18d7b3f26c892 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/node/extensionPoints.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "jsonParseFail": "Falha ao analisar {0}: {1}.", + "fileReadFail": "Não foi possível ler o arquivo {0}: {1}.", + "jsonsParseFail": "Falha ao analisar {0} ou {1}: {2}.", + "missingNLSKey": "Não foi possível encontrar a mensagem para a chave {0}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json new file mode 100644 index 0000000000000..69df9b15d8773 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "install": "Instalar o comando '{0}' em PATH", + "not available": "Este comando não está disponível", + "successIn": "Comando shell '{0}' instalado com sucesso em PATH.", + "warnEscalation": "O código solicitará com 'osascript' pelos privilégios de Administrador para instalar o comando shell.", + "ok": "OK", + "cantCreateBinFolder": "Não é possível criar '/usr/local/bin'.", + "cancel2": "Cancelar", + "aborted": "Abortado", + "uninstall": "Desinstalar o comando '{0}' de PATH", + "successFrom": "Comando shell '{0}' desinstalado com sucesso de PATH.", + "shellCommand": "Comando shell" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json new file mode 100644 index 0000000000000..18ee740ae318e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbench.action.inspectKeyMap": "Desenvolvedor: Inspecionar Mapeamentos de Chave" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json new file mode 100644 index 0000000000000..217bdf1c04ed5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleRenderControlCharacters": "Alternar caracteres de controle" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json new file mode 100644 index 0000000000000..453104fcc6d60 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleRenderWhitespace": "Alternar Espaço em Branco Renderizado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json new file mode 100644 index 0000000000000..058048058af44 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.wordwrap": "Visualizar: Alternar Quebra de Linha", + "wordWrap.notInDiffEditor": "Não pode alternar quebra de linha em um editor diff.", + "unwrapMinified": "Desabilitar empacotamento para este arquivo", + "wrapMinified": "Habilitar empacotamento para este arquivo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json new file mode 100644 index 0000000000000..12f93be687c5d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordWrapMigration.ok": "OK", + "wordWrapMigration.dontShowAgain": "Não mostrar novamente", + "wordWrapMigration.openSettings": "Abrir configurações", + "wordWrapMigration.prompt": "A configuração `editor.wrappingColumn` foi descontinuada e substituída pela configuração `editor.wordWrap`" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json new file mode 100644 index 0000000000000..3d74879563371 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "breakpointWidgetExpressionPlaceholder": "Parar quando a expressão for avaliada como true. 'Enter' para aceitar, 'esc' para cancelar.", + "breakpointWidgetAriaLabel": "O programa só vai parar aqui se esta condição for verdadeira. Pressione Enter para aceitar ou Escape para cancelar.", + "breakpointWidgetHitCountPlaceholder": "Parar quando contagem de ocorrências condição for alcançada. 'Enter' para aceitar, 'esc' para cancelar.", + "breakpointWidgetHitCountAriaLabel": "O programa só vai parar aqui, se a contagem de ocorrências for alcançada. Pressione Enter para aceitar ou Escape para cancelar.", + "expression": "Expressão", + "hitCount": "Contagem de ocorrências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json new file mode 100644 index 0000000000000..32a88b85efd61 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "addConfiguration": "Adicionar Configuração...", + "noConfigurations": "Sem configurações" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActions.i18n.json new file mode 100644 index 0000000000000..1bc052297a12e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openLaunchJson": "Abrir {0}", + "launchJsonNeedsConfigurtion": "Configurar ou corrigir 'launch.json'", + "noFolderDebugConfig": "Primeiro abra uma pasta para fazer uma configuração de depuração avançada.", + "startDebug": "Iniciar Depuração", + "startWithoutDebugging": "Iniciar Sem Depuração", + "selectAndStartDebugging": "Selecionar e Iniciar a Depuração", + "restartDebug": "Reiniciar", + "reconnectDebug": "Reconectar", + "stepOverDebug": "Pular Sobre", + "stepIntoDebug": "Pular Dentro", + "stepOutDebug": "Pular Fora", + "stopDebug": "Parar", + "disconnectDebug": "Desconectar", + "continueDebug": "Continuar", + "pauseDebug": "Pausa", + "restartFrame": "Reiniciar o Frame", + "removeBreakpoint": "Remover Ponto de Parada", + "removeAllBreakpoints": "Remover Todos os Pontos de Parada", + "enableBreakpoint": "Habilitar ponto de Parada", + "disableBreakpoint": "Desativar Ponto de Parada", + "enableAllBreakpoints": "Habilitar Todos os Pontos de Parada", + "disableAllBreakpoints": "Desabilitar Todos Pontos de Parada", + "activateBreakpoints": "Ativar Pontos de Parada", + "deactivateBreakpoints": "Desativar Pontos de Parada", + "reapplyAllBreakpoints": "Reaplicar Todos os Pontos de Parada", + "addFunctionBreakpoint": "Adicionar Ponto de Parada de Função", + "renameFunctionBreakpoint": "Renomeie o Ponto de Parada de Função", + "addConditionalBreakpoint": "Adicionar Ponto de Parada Condicional...", + "editConditionalBreakpoint": "Editar o Ponto de Parada...", + "setValue": "Definir Valor", + "addWatchExpression": "Adicionar Expressão", + "editWatchExpression": "Editar expressão", + "addToWatchExpressions": "Adicionar ao monitoramento", + "removeWatchExpression": "Remover Expressão", + "removeAllWatchExpressions": "Remover Todas as Expressões", + "clearRepl": "Limpar console", + "debugConsoleAction": "Console do Depurador", + "unreadOutput": "Nova Saída no Console de Depuração", + "debugFocusConsole": "Foco no Console de Depuração", + "focusProcess": "Foco no Processo", + "stepBackDebug": "Passo para trás", + "reverseContinue": "Reverter" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..421e5b19c79c4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugToolBarBackground": "Cor de fundo da barra de ferramentas de depuração." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json new file mode 100644 index 0000000000000..d8aa95c869a67 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unable": "Não é possível resolver o recurso sem uma sessão de depuração" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json new file mode 100644 index 0000000000000..ef74c88413dcb --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleBreakpointAction": "Depurar: Alternar Ponto de Parada", + "columnBreakpointAction": "Depurar: Ponto de Interrupção de Coluna", + "columnBreakpoint": "Adicionar Ponto de Interrupção de Coluna", + "conditionalBreakpointEditorAction": "Depurar: Adicionar Ponto de Interrupção Condicional...", + "runToCursor": "Executar até o Cursor", + "debugEvaluate": "Depurar: Avaliar", + "debugAddToWatch": "Depurar: Adicionar ao monitoramento", + "showDebugHover": "Mostrar Item Flutuante" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json new file mode 100644 index 0000000000000..f30b378456b37 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "breakpointDisabledHover": "Ponto de Parada Desativado", + "breakpointUnverifieddHover": "Ponto de Parada Não Verificado", + "breakpointDirtydHover": "Ponto de parada não verificado. O arquivo foi modificado, por favor reinicie a sessão de depuração.", + "breakpointUnsupported": "Pontos de parada condicionais não são suportados por esse tipo de depurador" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json new file mode 100644 index 0000000000000..01955c44965b6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "depurar {0}", + "debugAriaLabel": "Digite um nome de uma configuração de lançamento para ser executado.", + "noConfigurationsMatching": "Não há configurações de depuração correspondentes", + "noConfigurationsFound": "Configurações de depuração não encontradas. Por favor, crie um arquivo 'launch.json'." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json new file mode 100644 index 0000000000000..a8802c1316474 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugExceptionWidgetBorder": "Cor da borda da ferramenta de exceção.", + "debugExceptionWidgetBackground": "Cor de fundo da ferramenta de exceção.", + "exceptionThrownWithId": "Ocorreu exceção: {0}", + "exceptionThrown": "Ocorreu exceção." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..8c7a8761f41cc --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "Clique para seguir (Cmd + clique abre ao lado)", + "fileLink": "Clique para seguir (Cmd + clique abre ao lado)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..3476b79d9e176 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "Controla o comportamento do console depuração interna." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/common/debugModel.i18n.json new file mode 100644 index 0000000000000..fa2f5e8ada5ce --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notAvailable": "não disponível", + "startDebugFirst": "Por favor, inicie uma sessão de depuração para avaliar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..0e10c85d8186e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "Fonte desconhecida" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json new file mode 100644 index 0000000000000..05a7ccfe82744 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleDebugViewlet": "Visualizar Depurador", + "toggleDebugPanel": "Console do Depurador", + "debug": "Depurar", + "debugPanel": "Console do Depurador", + "view": "Exibir", + "debugCategory": "Depurar", + "debugCommands": "Configuração do Depurador", + "debugConfigurationTitle": "Depurar", + "allowBreakpointsEverywhere": "Permite definir um ponto de interrupção em qualquer arquivo.", + "openExplorerOnEnd": "Automaticamente abre a visualização do explorador no final de uma sessão de depuração", + "inlineValues": "Mostrar valores de variáveis em linha no editor durante a depuração", + "hideActionBar": "Controlar se a barra de ação flutuante do depurador deve ser ocultada", + "launch": "Configuração global do lançamento do depurador. Deve ser usado como uma alternativa para o arquivo 'launch.json' que é compartilhado entre os espaços de trabalho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..85b353a37fe00 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noFolderDebugConfig": "Primeiro abra uma pasta para fazer uma configuração de depuração avançada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json new file mode 100644 index 0000000000000..ada60277e7bf6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.debuggers": "Contribui adaptadores de depuração.", + "vscode.extension.contributes.debuggers.type": "Identificador único para esse adaptador de depuração.", + "vscode.extension.contributes.debuggers.label": "Nome de exibição para esse adaptador de depuração.", + "vscode.extension.contributes.debuggers.program": "Caminho para o programa adaptador de depuração. O caminho pode ser absoluto ou relativo à pasta de extensão.", + "vscode.extension.contributes.debuggers.args": "Argumentos opcionais a serem informados para o adaptador.", + "vscode.extension.contributes.debuggers.runtime": "Runtime opcional no caso do atributo do programa não ser um executável, mas requerer um runtime.", + "vscode.extension.contributes.debuggers.runtimeArgs": "Argumentos opcionais do runtime.", + "vscode.extension.contributes.debuggers.variables": "Mapeamento de variáveis interativas (por exemplo ${action.pickProcess}) em 'launch.json' para um comando.", + "vscode.extension.contributes.debuggers.initialConfigurations": "Configurações para gerar o 'launch.json' inicial.", + "vscode.extension.contributes.debuggers.languages": "Lista de idiomas para os quais a extensão de depuração pode ser considerada o \"depurador padrão\".", + "vscode.extension.contributes.debuggers.adapterExecutableCommand": "Se especificado VS Code chamará este comando para determinar o caminho do executável do adaptador de depuração e os argumentos para passar.", + "vscode.extension.contributes.debuggers.startSessionCommand": "Se especificado VS Code chamará este comando para as ações de \"depurar\" ou \"executar\" direcionadas para esta extensão.", + "vscode.extension.contributes.debuggers.configurationSnippets": "Trechos de código para adicionar novas configurações em 'launch.json'.", + "vscode.extension.contributes.debuggers.configurationAttributes": "Configurações de esquema JSON para validar 'launch.json'.", + "vscode.extension.contributes.debuggers.windows": "Configurações específicas do Windows.", + "vscode.extension.contributes.debuggers.windows.runtime": "Runtime usado para Windows.", + "vscode.extension.contributes.debuggers.osx": "Configurações específicas do OS X.", + "vscode.extension.contributes.debuggers.osx.runtime": "Runtime usado para o OS X.", + "vscode.extension.contributes.debuggers.linux": "Configurações específicas do Linux.", + "vscode.extension.contributes.debuggers.linux.runtime": "Runtime usado para o Linux.", + "vscode.extension.contributes.breakpoints": "Contribui aos pontos de interrupção.", + "vscode.extension.contributes.breakpoints.language": "Permitir pontos de parada para este idioma.", + "app.launch.json.title": "Executar", + "app.launch.json.version": "Versão deste formato de arquivo.", + "app.launch.json.configurations": "Lista de configurações. Adicionar novas configurações ou editar as existentes usando o IntelliSense.", + "app.launch.json.compounds": "Lista de compostos. Cada composto faz referência a várias configurações que vão ser executadas juntas.", + "app.launch.json.compound.name": "Nome do composto. Aparece no menu drop-down da configuração de execução.", + "app.launch.json.compounds.configurations": "Nomes das configurações que serão iniciadas como parte deste composto.", + "debugNoType": "'type' do adaptador de depuração não pode ser omitido e deve ser do tipo 'string'.", + "DebugConfig.failed": "Não é possível criar o arquivo 'launch.json' dentro da pasta '.vscode' ({0}).", + "selectDebug": "Selecione o ambiente" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json new file mode 100644 index 0000000000000..1424499bfccb9 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeBreakpoints": "Remover pontos de interrupção", + "removeBreakpointOnColumn": "Remover ponto de interrupção na coluna {0}", + "removeLineBreakpoint": "Remover ponto de interrupção de linha", + "editBreakpoints": "Editar pontos de interrupção", + "editBreakpointOnColumn": "Editar o ponto de interrupção na coluna {0}", + "editLineBrekapoint": "Editar o ponto de interrupção de linha", + "enableDisableBreakpoints": "Habilitar/Desabilitar pontos de interrupção", + "disableColumnBreakpoint": "Desabilitar ponto de interrupção na coluna {0}", + "disableBreakpointOnLine": "Desabilitar ponto de interrupção de linha", + "enableBreakpoints": "Habilitar o ponto de interrupção na coluna {0}", + "enableBreakpointOnLine": "Habilitar o ponto de interrupção de linha", + "addBreakpoint": "Adicionar ponto de interrupção", + "addConfiguration": "Adicionar Configuração..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json new file mode 100644 index 0000000000000..1853865a1ecf9 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeAriaLabel": "Depurar passando o mouse por cima" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json new file mode 100644 index 0000000000000..6dc0bc48afb76 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "snapshotObj": "Apenas valores primitivos são mostrados para este objeto.", + "debuggingStarted": "Depuração Iniciada.", + "debuggingPaused": "Depuração pausada, razão {0}, {1} {2}", + "debuggingStopped": "Depuração parada.", + "breakpointAdded": "Adicionado ponto de interrupção, linha {0}, arquivo {1}", + "breakpointRemoved": "Ponto de interrupção removido, linha {0}, arquivo {1}", + "compoundMustHaveConfigurations": "Composição deve ter o atributo \"configurations\" definido para iniciar várias configurações.", + "configMissing": "Configuração '{0}' não tem 'launch.json'.", + "debugTypeNotSupported": "Tipo de depuração configurado '{0}' não é suportado.", + "debugTypeMissing": "Falta a propriedade 'type' para a configuração de lançamento escolhida.", + "preLaunchTaskErrors": "Erros de build foram detectados durante a preLaunchTask '{0}'.", + "preLaunchTaskError": "Erro de build foi detectado durante a preLaunchTask '{0}'.", + "preLaunchTaskExitCode": "A preLaunchTask '{0}' encerrada com código de saída {1}.", + "debugAnyway": "Depurar mesmo assim", + "noFolderWorkspaceDebugError": "O arquivo ativo não pode ser depurado. Certifique-se de que ele está salvo no disco e que tem uma extensão de depuração instalada para esse tipo de arquivo.", + "NewLaunchConfig": "Por favor, configure o arquivo de configuração de lançamento para seu aplicativo. {0}", + "DebugTaskNotFound": "Não foi possível encontrar o preLaunchTask '{0}'.", + "differentTaskRunning": "Há uma tarefa {0} sendo executada. Não pode executar a tarefa de pré-lançamento {1}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json new file mode 100644 index 0000000000000..ae47cc6a47d15 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "process": "Processar", + "paused": "Em pausa", + "running": "Em execução", + "thread": "Thread", + "pausedOn": "Pausado em {0}", + "loadMoreStackFrames": "Carregar mais segmentos de pilha", + "threadAriaLabel": "Thread {0}, pilha de chamadas, depuração", + "stackFrameAriaLabel": "Segmento de Pilha {0} linha {1} {2}, pilha de chamadas, depuração", + "variableValueAriaLabel": "Digite o novo valor da variável", + "variableScopeAriaLabel": "Escopo {0}, variáveis, depuração", + "variableAriaLabel": "{0} valor {1}, variáveis, depuração", + "watchExpressionPlaceholder": "Expressão para monitorar", + "watchExpressionInputAriaLabel": "Digitar expressão a monitorar", + "watchExpressionAriaLabel": "{0} valor {1}, monitorar, depuração", + "watchVariableAriaLabel": "{0} valor {1}, monitorar, depuração", + "functionBreakpointPlaceholder": "Função de parada", + "functionBreakPointInputAriaLabel": "Digitar Ponto de Parada de Função", + "functionBreakpointsNotSupported": "Pontos de parada de função não são suportados por este tipo de depuração", + "breakpointAriaLabel": "Ponto de parada linha {0} {1}, pontos de parada, depuração", + "functionBreakpointAriaLabel": "Ponto de parada de função {0}, pontos de parada, depuração", + "exceptionBreakpointAriaLabel": "Ponto de parada de exceção {0}, pontos de parada, depuração" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json new file mode 100644 index 0000000000000..d14c4338ceb77 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "Seção de variáveis", + "variables": "Variáveis", + "variablesAriaTreeLabel": "Variáveis de Depuração", + "expressionsSection": "Seção de Expressões", + "watch": "Monitoramento", + "watchAriaTreeLabel": "Depurar Expressões Monitoradas", + "callstackSection": "Seção de Pilha de Chamada", + "debugStopped": "Pausado em {0}", + "callStack": "Pilha de Chamadas", + "callStackAriaLabel": "Depurar a Pilha de Chamadas", + "breakpointsSection": "Seção de Pontos de Parada", + "breakpoints": "Pontos de Parada", + "breakpointsAriaTreeLabel": "Depurar os Pontos de Parada" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json new file mode 100644 index 0000000000000..227ca95927f6a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copyValue": "Copiar valor", + "copy": "Copiar", + "copyAll": "Copiar todos", + "copyStackTrace": "Copiar Pilha de Chamadas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json new file mode 100644 index 0000000000000..0ce97a8f7969c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "moreInfo": "Mais Informações", + "unableToLaunchDebugAdapter": "Não é possível executar o adaptador de depuração de '{0}'.", + "unableToLaunchDebugAdapterNoArgs": "Não é possível executar o adaptador de depuração.", + "stoppingDebugAdapter": "{0}. Parando o adaptador de depuração.", + "debugAdapterCrash": "Processo do adaptador de depuração foi finalizado inesperadamente" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json new file mode 100644 index 0000000000000..73f6f0be4c469 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "replAriaLabel": "Ler o Painel de Impressão Eval", + "actions.repl.historyPrevious": "História anterior", + "actions.repl.historyNext": "Próxima história", + "actions.repl.acceptInput": "REPL Aceitar Entrada" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json new file mode 100644 index 0000000000000..4afd6d64d8257 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "stateCapture": "Estado do objeto é capturado na primeira avaliação", + "replVariableAriaLabel": "Variável {0} tem valor {1}, ler a impressão do valor do loop, depurar", + "replExpressionAriaLabel": "Expressão {0} tem valor {1}, ler o laço de avaliação de impressão, depurar", + "replValueOutputAriaLabel": " impressão da avaliação do laço de leitura, depurar", + "replKeyValueOutputAriaLabel": "Variável de saída {0} tem valor {1}, ler o loop de avaliação de impressão, depurar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json new file mode 100644 index 0000000000000..b191a0de856b0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "statusBarDebuggingBackground": "Cor de fundo da barra de status quando um programa está sendo depurado. A barra de status é mostrada na parte inferior da janela" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json new file mode 100644 index 0000000000000..898a18605fbc3 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debug.terminal.title": "depurado", + "debug.terminal.not.available.error": "Terminal integrado não disponível" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json new file mode 100644 index 0000000000000..f0551dfe57b82 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugAdapterBinNotFound": "Executável do adaptador de depuração '{0}' não existe.", + "debugAdapterCannotDetermineExecutable": "Não é possível determinar o executável para o adaptador de depuração '{0}'.", + "debugType": "Tipo de configuração.", + "debugTypeNotRecognised": "O tipo de depuração não é reconhecido. Certifique-se de que você tem uma extensão de depuração correspondente instalada e que ela está habilitada.", + "node2NotSupported": "\"node2\" não é mais suportado, use \"node\" ao invés e defina o atributo \"protocol\" para \"inspector\".", + "debugName": "Nome da configuração; aparece no menu drop-down da configuração de lançamento. ", + "debugRequest": "Requer o tipo de configuração. Pode ser \"launch\" ou \"attach\".", + "debugServer": "Somente para o desenvolvimento de extensão de depuração: se uma porta é especificada, o VS Code tenta se conectar a um adaptador de depuração executando em modo de servidor", + "debugPrelaunchTask": "Tarefa para ser executada antes de começar a sessão de depuração.", + "debugWindowsConfiguration": "Atributos de configuração de lançamento específicos do Windows.", + "debugOSXConfiguration": "Atributos de configuração de lançamento específicos do OS X.", + "debugLinuxConfiguration": "Atributos de configuração de lançamento específicos do Linux.", + "deprecatedVariables": "'env.', 'config.' e 'command.' foram descontinuados, use ' env:', ' config:' e ' command:' em vez disso." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json new file mode 100644 index 0000000000000..1e3a1c0f277af --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showEmmetCommands": "Mostrar Comandos do Emmet" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..1dc5e1e3b6923 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "balanceInward": "Emmet: Saldo (interno)", + "balanceOutward": "Emmet: Saldo (externo)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..cccc82d8a010e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previousEditPoint": "Emmet: Ponto de edição anterior", + "nextEditPoint": "Emmet: Ponto próxima edição" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..b4a6a03e21357 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "evaluateMathExpression": "Emmet: Avaliar a expressão matemática" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..5a5dd3cc3e843 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expandAbbreviationAction": "Emmet: Expandir Abreviação" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..306332a4af226 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "incrementNumberByOneTenth": "Emmet: Incremento de 0.1", + "incrementNumberByOne": "Emmet: Incremento de 1", + "incrementNumberByTen": "Emmet: Incremento de 10", + "decrementNumberByOneTenth": "Emmet: Decréscimo por 0.1", + "decrementNumberByOne": "Emmet: Decréscimo por 1", + "decrementNumberByTen": "Emmet: Decréscimo por 10" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..6a742c4d5f91d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "matchingPair": "Emmet: Ir para o par de correspondência" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..22ed3f5f533ab --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mergeLines": "Emmet: Mesclar linhas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..bc0eefc2e0042 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reflectCSSValue": "Emmet: Refletir valor CSS" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..a30414b08d2d3 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeTag": "Emmet: Remover Rótulo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..1343e2d6b3664 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectPreviousItem": "Emmet: Selecione o Item anterior", + "selectNextItem": "Emmet: Selecione o próximo Item" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..ea04346ea7cf5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitJoinTag": "Emmet: Dividir/Juntar Rótulo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..366cb874a0c70 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleComment": "Emmet: Alternar Comentário" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..1eff88ade9dcd --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateImageSize": "Emmet: Atualizar o Tamanho da Imagem" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..963a85e1671f5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateTag": "Emmet: Atualizar Rótulo", + "enterTag": "Insira o Rótulo", + "tag": "Rótulo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..501253b7dcbb7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wrapWithAbbreviationAction": "Emmet: Envelope com a abreviatura", + "enterAbbreviation": "Digite a abreviação", + "abbreviation": "Abreviação" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..1caebe040f568 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "Quando habilitado, abreviações emmet são expandidas ao pressionar TAB.", + "emmetPreferences": "Preferências usadas para modificar o comportamento de algumas ações e resolvedores de Emmet.", + "emmetSyntaxProfiles": "Definir o perfil para a sintaxe especificada ou usar seu próprio perfil com regras específicas.", + "emmetExclude": "Uma matriz de línguagens onde abreviaturas emmet não devem ser expandidas.", + "emmetExtensionsPath": "Caminho para uma pasta contendo perfis emmet, trechos e preferências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json new file mode 100644 index 0000000000000..95274daf75039 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalConfigurationTitle": "Terminal Externo", + "terminal.external.windowsExec": "Personalizar qual terminal executar no Windows.", + "terminal.external.osxExec": "Personalizar qual aplicativo de terminal executar no OS X.", + "terminal.external.linuxExec": "Personalizar qual terminal executar no Linux.", + "globalConsoleActionWin": "Abrir Novo Prompt de Comando", + "globalConsoleActionMacLinux": "Abrir Novo Terminal", + "scopedConsoleActionWin": "Abrir no Prompt de Comando", + "scopedConsoleActionMacLinux": "Abrir no Terminal" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json b/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json new file mode 100644 index 0000000000000..fde640b09c5d2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "console.title": "Console VS Code", + "mac.terminal.script.failed": "Script '{0}' falhou com código de saída {1}", + "mac.terminal.type.not.supported": "'{0}' não suportado", + "press.any.key": "Pressione qualquer tecla para continuar...", + "linux.term.failed": "'{0}' falhou com código de saída {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json new file mode 100644 index 0000000000000..d79e3c4ca0ac2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.view": "Contribui ao modo de exibição personalizado", + "vscode.extension.contributes.view.id": "Identificação única usada para identificar a vista criada por vscode.workspace.createTreeView", + "vscode.extension.contributes.view.label": "Sequência de caracteres legível usada para processar a visualização", + "vscode.extension.contributes.view.icon": "Caminho para o ícone da visualização", + "vscode.extension.contributes.views": "Contribui com visualizações personalizadas", + "showViewlet": "Mostrar {0}", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json new file mode 100644 index 0000000000000..37735d1000708 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "refresh": "Atualizar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json new file mode 100644 index 0000000000000..7b7f16b3812fc --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.noMatchingProviderId": "Não há TreeExplorerNodeProvider com id {providerId} registrado." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json b/i18n/ptb/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json new file mode 100644 index 0000000000000..0e7f5f9cd9210 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorerViewlet.tree": "Seção do Explorador da Árvore" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json new file mode 100644 index 0000000000000..0ebd24a9fd8a5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error": "Erro", + "Unknown Dependency": "Dependência Desconhecida:" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json new file mode 100644 index 0000000000000..1a3b9d4cd09d5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "name": "Nome da extensão", + "extension id": "Identificador da extensão", + "publisher": "Nome do editor", + "install count": "Quantidade de Instalações", + "rating": "Avaliação", + "license": "Licença", + "details": "Detalhes", + "contributions": "Contribuições", + "changelog": "Registro de Alterações", + "dependencies": "Dependências", + "noReadme": "README não disponível.", + "noChangelog": "Registro de Alterações não disponível.", + "noContributions": "Sem Contribuições", + "noDependencies": "Sem Dependências", + "settings": "Configurações ({0})", + "setting name": "Nome", + "description": "Descrição", + "default": "Valor padrão", + "debuggers": "Depuradores ({0})", + "debugger name": "Nome", + "themes": "Temas ({0})", + "JSON Validation": "Validação JSON ({0})", + "commands": "Comandos ({0})", + "command name": "Nome", + "keyboard shortcuts": "Atalhos de Teclado", + "menuContexts": "Contextos de Menu", + "languages": "Linguagens ({0})", + "language id": "ID", + "language name": "Nome", + "file extensions": "Extensões de Arquivo", + "grammar": "Gramática", + "snippets": "Trechos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json new file mode 100644 index 0000000000000..e2ff606a7c970 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -0,0 +1,55 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installAction": "Instalar", + "installing": "Instalando", + "uninstallAction": "Desinstalar", + "Uninstalling": "Desinstalando", + "updateAction": "Atualizar", + "updateTo": "Atualizar para {0}", + "enableForWorkspaceAction.label": "Habilitar (Espaço de Trabalho)", + "enableAlwaysAction.label": "Habilitar (Sempre)", + "disableForWorkspaceAction.label": "Desabilitar (Espaço de Trabalho)", + "disableAlwaysAction.label": "Desabilitar (Sempre)", + "ManageExtensionAction.uninstallingTooltip": "Desinstalando", + "enableForWorkspaceAction": "Espaço de trabalho", + "enableGloballyAction": "Sempre", + "enableAction": "Habilitar", + "disableForWorkspaceAction": "Espaço de trabalho", + "disableGloballyAction": "Sempre", + "disableAction": "Desabilitar", + "checkForUpdates": "Verificar Atualizações", + "updateAll": "Atualizar Todas as Extensões", + "reloadAction": "Recarregar", + "postUpdateTooltip": "Recarregar para atualizar", + "postUpdateMessage": "Recarregar esta janela para ativar a extensão atualizada '{0}'?", + "postEnableTooltip": "Recarregar para ativar", + "postEnableMessage": "Recarregar esta janela para ativar a extensão '{0}'?", + "postDisableTooltip": "Recarregar para desativar", + "postDisableMessage": "Recarregar esta janela para desativar a extensão '{0}'?", + "postUninstallTooltip": "Recarregar para desativar", + "postUninstallMessage": "Recarregar esta janela para desativar a extensão desinstalada '{0}'?", + "reload": "&&Recarregar Janela", + "toggleExtensionsViewlet": "Mostrar Extensões", + "installExtensions": "Instalar Extensões", + "showInstalledExtensions": "Mostrar Extensões Instaladas", + "showDisabledExtensions": "Mostrar Extensões Desabilitadas", + "clearExtensionsInput": "Limpar Entrada de Extensões", + "showOutdatedExtensions": "Mostrar Extensões Desatualizadas", + "showPopularExtensions": "Mostrar Extensões Populares", + "showRecommendedExtensions": "Mostrar Extensões Recomendadas", + "showWorkspaceRecommendedExtensions": "Mostrar Extensões Recomendadas para o Espaço de Trabalho", + "showRecommendedKeymapExtensions": "Mostrar Mapeamentos de Teclado Recomendados", + "showRecommendedKeymapExtensionsShort": "Mapeamentos de Teclado", + "configureWorkspaceRecommendedExtensions": "Configurar Extensões Recomendadas (Espaço de Trabalho)", + "ConfigureWorkspaceRecommendations.noWorkspace": "As recomendações somente estão disponíveis em uma pasta do espaço de trabalho.", + "OpenExtensionsFile.failed": "Não foi possível criar o arquivo 'extensions.json' na pasta '.vscode' ({0}).", + "builtin": "Intrínseco", + "disableAll": "Desabilitar Todas as Extensões Instaladas", + "disableAllWorkspace": "Desabilitar Todas as Extensões Instaladas para este Espaço de Trabalho", + "enableAll": "Habilitar Todas as Extensões Instaladas", + "enableAllWorkspace": "Habilitar Todas as Extensões Instaladas para este Espaço de Trabalho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json new file mode 100644 index 0000000000000..666a66921792b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "manage": "Pressione Enter para gerenciar suas extensões.", + "searchFor": "Pressione Enter para pesquisar por '{0}' na Loja.", + "noExtensionsToInstall": "Digite um nome de extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json new file mode 100644 index 0000000000000..b90c0d5ac642c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "app.extensions.json.title": "Extensões", + "app.extensions.json.recommendations": "Lista de recomendações de extensões. O identificador de uma extensão é sempre ' ${publisher}. ${nome}'. Por exemplo: 'vscode.csharp'.", + "app.extension.identifier.errorMessage": "Formato esperado '${editor}.${nome}'. Exemplo: 'vscode.csharp'." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json new file mode 100644 index 0000000000000..333627e961989 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionsInputName": "Extensão: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json new file mode 100644 index 0000000000000..663560d4d78a1 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reallyRecommended2": "A extensão {0} é recomendada para este tipo de arquivo.", + "showRecommendations": "Mostrar Recomendações", + "neverShowAgain": "Não mostrar novamente", + "close": "Fechar", + "workspaceRecommended": "Este espaço de trabalho possui recomendações de extensão.", + "ignoreExtensionRecommendations": "Deseja ignorar todas as recomendações de extensão?", + "ignoreAll": "Sim, Ignorar Tudo", + "no": "Não", + "cancel": "Cancelar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json new file mode 100644 index 0000000000000..76bf037948158 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionsCommands": "Gerenciar Extensões", + "galleryExtensionsCommands": "Instalar Extensões da Galeria", + "extension": "Extensão", + "extensions": "Extensões", + "view": "Exibir", + "extensionsConfigurationTitle": "Extensões", + "extensionsAutoUpdate": "Atualizar extensões automaticamente", + "extensionsIgnoreRecommendations": "Ignorar recomendações de extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json new file mode 100644 index 0000000000000..731e4ef949173 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openExtensionsFolder": "Abrir a Pasta de Extensões", + "installVSIX": "Instalar do VSIX...", + "InstallVSIXAction.success": "A extensão foi instalada com sucesso. Reinicie para habilitá-la.", + "InstallVSIXAction.reloadNow": "Recarregar Agora" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..0cde76b12d897 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "disableOtherKeymapsConfirmation": "Desabilitar outros mapeamentos de teclado para evitar conflitos entre mapeamentos de teclado?", + "yes": "Sim", + "no": "Não" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json new file mode 100644 index 0000000000000..a35f8bbe6c673 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "searchExtensions": "Pesquisar Extensões na Loja", + "extensions": "Extensões", + "sort by installs": "Ordenar por: Quantidade de Instalações", + "sort by rating": "Ordenar por: Avaliação", + "sort by name": "Ordenar por: Nome", + "no extensions found": "Nenhuma extensão encontrada.", + "suggestProxyError": "A Loja retornou 'ECONNREFUSED'. Por favor, verifique a configuração de 'http.proxy'.", + "outdatedExtensions": "{0} Extensões Desatualizadas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json new file mode 100644 index 0000000000000..f0313c203438b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "enableDependeciesConfirmation": "Habilitando '{0}' também habilita suas dependências. Gostaria de continuar?", + "enable": "Sim", + "doNotEnable": "Não", + "disableDependeciesConfirmation": "Gostaria de desabilitar somente '{0}', ou as suas dependências também?", + "disableOnly": "Apenas", + "disableAll": "Todos", + "cancel": "Cancelar", + "singleDependentError": "Não é possível desabilitar a extensão '{0}'. A extensão '{1}' depende dela.", + "twoDependentsError": "Não é possível desabilitar a extensão '{0}'. As extensões '{1}' e '{2}' dependem dela.", + "multipleDependentsError": "Não é possível desabilitar a extensão '{0}'. As extensões '{1}', '{2}' e outras dependem dela." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json b/i18n/ptb/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json new file mode 100644 index 0000000000000..5d3c22c39a84f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "sendFeedback": "Tweetar Feedback", + "label.sendASmile": "Tweete feedback para nós", + "patchedVersion1": "Sua instalação está corrompida.", + "patchedVersion2": "Por favor especificar isso ao enviar um bug.", + "sentiment": "Como foi sua experiência?", + "smileCaption": "Feliz", + "frownCaption": "Triste", + "other ways to contact us": "Outras maneiras de nos contatar", + "submit a bug": "Submeter um bug", + "request a missing feature": "Solicitar um recurso ausente", + "tell us why?": "Diga-nos porquê?", + "commentsHeader": "Comentários", + "tweet": "Tweetar", + "character left": "caractere à esquerda", + "characters left": "caracteres à esquerda", + "feedbackSending": "Enviando", + "feedbackSent": "Obrigado", + "feedbackSendingError": "Tentar novamente" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json new file mode 100644 index 0000000000000..9c33fd25246c0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "binaryFileEditor": "Visualizador de Arquivo Binário" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json new file mode 100644 index 0000000000000..792781bc8c794 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textFileEditor": "Editor de Arquivo de Texto", + "createFile": "Criar arquivo", + "fileEditorWithInputAriaLabel": "{0}. Editor de Arquivo de Texto.", + "fileEditorAriaLabel": "Editor de Arquivo de Texto" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json new file mode 100644 index 0000000000000..f203671c230bf --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "Arquivos", + "revealInSideBar": "Revelar na Barra Lateral", + "acceptLocalChanges": "Usar mudanças locais e sobrescrever o conteúdo do disco", + "revertLocalChanges": "Descartar mudanças locais e reverter para conteúdo do disco" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.i18n.json new file mode 100644 index 0000000000000..161e7a9a16cdf --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.i18n.json @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "Tentar novamente", + "rename": "Renomear", + "newFile": "Novo Arquivo", + "newFolder": "Nova Pasta", + "openFolderFirst": "Abrir uma pasta primeiro para criar arquivos ou pastas dentro dele.", + "newUntitledFile": "Novo Arquivo Sem Título", + "createNewFile": "Novo Arquivo", + "createNewFolder": "Nova Pasta", + "deleteButtonLabelRecycleBin": "&&Mover para Lixeira", + "deleteButtonLabelTrash": "&&Mover para o Lixo", + "deleteButtonLabel": "&&Excluir", + "dirtyMessageFolderOneDelete": "Você está excluindo uma pasta com alterações não salvas em 1 arquivo. Você quer continuar?", + "dirtyMessageFolderDelete": "Você está excluindo uma pasta com alterações não salvas em {0} arquivos. Você quer continuar?", + "dirtyMessageFileDelete": "Você está excluindo um arquivo com alterações não salvas. Você quer continuar?", + "dirtyWarning": "Suas alterações serão perdidas se você não salvá-las.", + "confirmMoveTrashMessageFolder": "Tem certeza de que deseja excluir '{0}' e seu conteúdo?", + "confirmMoveTrashMessageFile": "Tem certeza de que deseja excluir '{0}'?", + "undoBin": "Você pode restaurar da lixeira.", + "undoTrash": "Você pode restaurar a partir do lixo.", + "confirmDeleteMessageFolder": "Tem certeza de que deseja excluir permanentemente '{0}' e seu conteúdo?", + "confirmDeleteMessageFile": "Tem certeza de que deseja excluir permanentemente '{0}'?", + "irreversible": "Esta ação é irreversível!", + "permDelete": "Excluir permanentemente", + "delete": "Excluir", + "importFiles": "Importar Arquivos", + "confirmOverwrite": "Um arquivo ou pasta com o mesmo nome já existe na pasta de destino. Você quer substituí-lo?", + "replaceButtonLabel": "&&Substituir", + "copyFile": "Copiar", + "pasteFile": "Colar", + "duplicateFile": "Duplicar", + "openToSide": "Aberto para o lado", + "compareSource": "Selecione para comparar", + "globalCompareFile": "Compare o Arquivo Ativo Com...", + "pickHistory": "Selecione um arquivo previamente aberto para comparar com", + "unableToFileToCompare": "O arquivo selecionado não pode ser comparado com '{0}'.", + "openFileToCompare": "Abrir um arquivo primeiro para compará-lo com outro arquivo.", + "compareWith": "Comparar com '{0}'", + "compareFiles": "Comparar Arquivos", + "refresh": "Atualizar", + "save": "Salvar", + "saveAs": "Salvar como...", + "saveAll": "Salvar Todos", + "saveAllInGroup": "Salvar Todos no Grupo", + "saveFiles": "Salvar Arquivos Sujos", + "revert": "Reverter Arquivo", + "focusOpenEditors": "Foco na Visualização dos Editores Abertos", + "focusFilesExplorer": "Foco no Explorador de Arquivos", + "showInExplorer": "Revelar o Arquivo Ativo na Barra Lateral", + "openFileToShow": "Abrir um arquivo primeiro para mostrá-lo no explorer", + "collapseExplorerFolders": "Esconder Pastas no Explorador", + "refreshExplorer": "Atualizar Explorador", + "openFile": "Abrir arquivo...", + "openFileInNewWindow": "Abrir o Arquivo Ativo em uma Nova Janela", + "openFileToShowInNewWindow": "Abrir um arquivo primeiro para abrir em uma nova janela", + "revealInWindows": "Revelar no Explorer", + "revealInMac": "Revelar no Finder", + "openContainer": "Abrir a Pasta", + "revealActiveFileInWindows": "Revelar Arquivo Ativo no Windows Explorer", + "revealActiveFileInMac": "Revelar Arquivo Ativo no Finder", + "openActiveFileContainer": "Abrir a Pasta do Arquivo Ativo.", + "copyPath": "Copiar Caminho", + "copyPathOfActive": "Copiar Caminho do Arquivo Ativo", + "emptyFileNameError": "Um nome de arquivo ou pasta deve ser fornecido.", + "fileNameExistsError": "Um arquivo ou pasta **{0}** já existe neste local. Escolha um nome diferente.", + "invalidFileNameError": "O nome **{0}** não é válido como um nome de arquivo ou pasta. Por favor, escolha um nome diferente.", + "filePathTooLongError": "O nome **{0}** resulta em um caminho muito longo. Escolha um nome mais curto." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/fileCommands.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/fileCommands.i18n.json new file mode 100644 index 0000000000000..2e61a1656c803 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "Abrir um arquivo primeiro para copiar seu caminho", + "openFileToReveal": "Abrir um arquivo primeiro para revelar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json new file mode 100644 index 0000000000000..ddbc9408f54f0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "Mostrar Explorer", + "explore": "Explorador", + "view": "Exibir", + "textFileEditor": "Editor de Arquivo de Texto", + "binaryFileEditor": "Editor de Arquivo Binário", + "filesConfigurationTitle": "Arquivos", + "exclude": "Configure os padrões glob para excluir arquivos e pastas.", + "files.exclude.boolean": "O padrão glob com o qual combinar os caminhos de arquivo. Defina para verdadeiro ou falso para habilitar ou desabilitar o padrão.", + "files.exclude.when": "Verificação adicional nos irmãos de um arquivo correspondente. Use $(basename) como variável para o nome do arquivo correspondente.", + "associations": "Configurar as associações de arquivo para linguagens (por exemplo, \"* Extension\": \"html\"). Estas têm precedência sobre as associações padrão das linguagens instaladas.", + "encoding": "A codificação padrão do conjunto de caracteres para ser usada ao ler e gravar arquivos.", + "autoGuessEncoding": "Quando habilitado, tentará adivinhar a codificação do conjunto de caracteres ao abrir arquivos", + "trimTrailingWhitespace": "Quando habilitado, removerá espaços em branco à direita ao salvar um arquivo.", + "insertFinalNewline": "Quando habilitado, inseririrá uma nova linha no final do arquivo quando salvá-lo.", + "files.autoSave.off": "Um arquivo sujo nunca é automaticamente salvo.", + "files.autoSave.afterDelay": "Um arquivo sujo é salvo automaticamente após configurado em 'files.autoSaveDelay'.", + "files.autoSave.onFocusChange": "Um arquivo sujo é salvo automaticamente quando o editor perde o foco.", + "files.autoSave.onWindowChange": "Um arquivo sujo é salvo automaticamente quando a janela perde o foco.", + "autoSave": "Controla o auto-salvamento de arquivos sujos. Aceita os valores: '{0}', '{1}', '{2}' (editor perde o foco), '{3}' (janela perde o foco). Se definido como '{4}', você pode configurar o atraso em 'files.autoSaveDelay'.", + "autoSaveDelay": "Controla o atraso em milissegundos depois que um arquivo sujo é salvo automaticamente. Só se aplica quando 'files.autoSave' for definida como '{0}'", + "watcherExclude": "Configure padrões glob de caminhos de arquivo para excluir do monitoramento de arquivos. Alterar essa configuração requer uma reinicialização. Quando você tiver consumo Code muito alto de cpu na inicialização, você pode excluir pastas grandes para reduzir a carga inicial.", + "hotExit.off": "Desabilitar a saída à quente.", + "hotExit.onExit": "Saída à quente será acionada quando o aplicativo for fechado, ou seja, quando a última janela é fechada no Windows/Linux ou quando o comando workbench.action.quit é acionado (paleta de comandos, keybinding, menu). Todas as janelas com backups serão restauradas na próxima execução.", + "hotExit.onExitAndWindowClose": "Saída à quente será acionada quando o aplicativo for fechado, ou seja, quando a última janela é fechada no Windows/Linux ou quando o comando workbench.action.quit é acionado (paleta de comando, keybinding, menu), e também para qualquer janela com uma pasta aberta independentemente se é a última janela. Todas as janelas sem pastas abertas serão restauradas na próxima execução. Para restaurar as janelas de pastas como eram antes do desligamento configure \"window.reopenFolders\" para \"todos\".", + "hotExit": "Controla se os arquivos não salvos são lembrados entre as sessões, permitindo salvar alerta ao sair do editor seja ignorada.", + "defaultLanguage": "O modo de linguagem padrão que é atribuída para novos arquivos.", + "editorConfigurationTitle": "Editor", + "formatOnSave": "Formata um arquivo no salvamento. Um formatador deve estar disponível, o arquivo não deve ser salvo automaticamente e editor não deve ser desligado.", + "explorerConfigurationTitle": "Explorador de arquivos", + "openEditorsVisible": "Número de editores mostrado no painel Abrir Editores. Configurá-lo para 0 irá ocultar o painel.", + "dynamicHeight": "Controla se a altura da seção de editores abertos deve adaptar-se dinamicamente para o número de elementos ou não.", + "autoReveal": "Controla se o explorador deve automaticamente revelar e selecionar arquivos ao abri-los.", + "enableDragAndDrop": "Controla se o explorador deve permitir mover arquivos e pastas através de arrastar e soltar." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json new file mode 100644 index 0000000000000..30a0a48f866a0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "discard": "Descartar", + "overwrite": "Sobrescrever", + "retry": "Tentar novamente", + "readonlySaveError": "Falha ao salvar '{0}': O arquivo está protegido contra gravação. Selecione 'Substituir' para remover a proteção.", + "genericSaveError": "Erro ao salvar '{0}': {1}", + "staleSaveError": "Falha ao salvar '{0}': O conteúdo no disco é mais recente. Clique em **Comparar** para comparar a sua versão com a do disco.", + "compareChanges": "Comparar", + "saveConflictDiffLabel": "{0} (no disco) ↔ {1} (em {2}) - Resolver conflitos de salvamento", + "userGuide": "Use as ações na barra de ferramentas do editor para **desfazer** suas alterações ou **substituir** o conteúdo no disco com as suas alterações" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json new file mode 100644 index 0000000000000..58da5446b2596 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Seção de Explorador de Arquivos", + "noWorkspace": "Nenhuma Pasta Aberta", + "noWorkspaceHelp": "Você ainda não abriu uma pasta.", + "openFolder": "Abrir Pasta" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json new file mode 100644 index 0000000000000..4753a88bd4c92 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Seção de Explorador de Arquivos", + "treeAriaLabel": "Explorador de Arquivos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json new file mode 100644 index 0000000000000..c670883e6ace8 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "Digite o Nome do arquivo. Pressione Enter para confirmar ou Escape para cancelar.", + "filesExplorerViewerAriaLabel": "{0}, Explorador de Arquivos", + "confirmOverwriteMessage": "'{0}' já existe na pasta de destino. Deseja substituí-lo?", + "irreversible": "Esta ação é irreversível!", + "replaceButtonLabel": "&&Substituir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json new file mode 100644 index 0000000000000..4db9c1f34d87d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditosrSection": "Abrir Seção de Editores", + "openEditors": "Abrir Editores", + "treeAriaLabel": "Abrir Editores: Lista de Arquivos Ativos", + "dirtyCounter": "{0} não salvos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json new file mode 100644 index 0000000000000..dbef8f2ddb5b2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}, Agrupar Editor", + "openEditorAriaLabel": "{0}, Abrir Editor", + "saveAll": "Salvar Todos", + "closeAll": "Fechar todos", + "close": "Fechar", + "closeOthers": "Fechar Outros" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json new file mode 100644 index 0000000000000..9e75b7b2a8904 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "dirtyFiles": "{0} arquivos não salvos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json new file mode 100644 index 0000000000000..f29992f5d95ab --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "orphanedFile": "{0} (excluído do disco)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/html/browser/html.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/html/browser/html.contribution.i18n.json new file mode 100644 index 0000000000000..f9530b0f6f6e5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/html/browser/html.contribution.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.editor.label": "Visualização Html" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json b/i18n/ptb/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json new file mode 100644 index 0000000000000..8df4c48f58cf1 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.voidInput": "Entrada inválida do editor." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/html/browser/webview.i18n.json b/i18n/ptb/src/vs/workbench/parts/html/browser/webview.i18n.json new file mode 100644 index 0000000000000..2ef4463deb991 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/html/browser/webview.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "devtools.webview": "Desenvolvedor: Ferramentas Webview" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/ptb/src/vs/workbench/parts/markers/common/messages.i18n.json new file mode 100644 index 0000000000000..8576955d6093f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewCategory": "Exibir", + "problems.view.show.label": "Mostrar Problemas", + "problems.panel.configuration.title": "Visualização de Problemas", + "problems.panel.configuration.autoreveal": "Controla se a visaulização de problemas evela os arquivos automaticamente ao abri-los", + "markers.panel.title.problems": "Problemas", + "markers.panel.aria.label.problems.tree": "Problemas agrupados por arquivos", + "markers.panel.no.problems.build": "Nenhum problema foi detectado na área de trabalho até agora.", + "markers.panel.no.problems.filters": "Nenhum resultado encontrado com os critérios de filtro fornecidos", + "markers.panel.action.filter": "Problemas de Filtro", + "markers.panel.filter.placeholder": "Filtrar por tipo ou texto", + "markers.panel.filter.errors": "erros", + "markers.panel.filter.warnings": "avisos", + "markers.panel.filter.infos": "informações", + "markers.panel.single.error.label": "1 Erro", + "markers.panel.multiple.errors.label": "{0} Erros", + "markers.panel.single.warning.label": "1 Aviso", + "markers.panel.multiple.warnings.label": "{0} Avisos", + "markers.panel.single.info.label": "1 Informação", + "markers.panel.multiple.infos.label": "{0} Informações", + "markers.panel.single.unknown.label": "1 Desconhecido", + "markers.panel.multiple.unknowns.label": "{0} Desconhecidos", + "markers.panel.at.ln.col.number": "({0}, {1})", + "problems.tree.aria.label.resource": "{0} com {1} problemas", + "problems.tree.aria.label.error.marker": "Erro gerado por {0}: {1} na linha {2} e caractere {3}", + "problems.tree.aria.label.error.marker.nosource": "Erro: {0} na linha {1} e caractere {2}", + "problems.tree.aria.label.warning.marker": "Aviso gerado por {0}: {1} na linha {2} e caractere {3}", + "problems.tree.aria.label.warning.marker.nosource": "Aviso: {0} na linha {1} e caractere {2}", + "problems.tree.aria.label.info.marker": "Informação gerada por {0}: {1} na linha {2} e caractere {3}", + "problems.tree.aria.label.info.marker.nosource": "Informação: {0} na linha {1} e caractere {2}", + "problems.tree.aria.label.marker": "Problema gerado por {0}: {1} na linha {2} e caractere {3}", + "problems.tree.aria.label.marker.nosource": "Problema: {0} na linha {1} e caractere {2}", + "errors.warnings.show.label": "Mostrar Erros e Avisos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json b/i18n/ptb/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json new file mode 100644 index 0000000000000..027c80cca307b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copyMarker": "Copiar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..1ec18c632a4c6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Você deseja responder a uma pequena pesquisa?", + "takeSurvey": "Responder a pesquisa", + "remindLater": "Lembrar mais tarde", + "neverAgain": "Não mostrar novamente" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/output/browser/output.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/output/browser/output.contribution.i18n.json new file mode 100644 index 0000000000000..e36bdadf4e9c8 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/output/browser/output.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "output": "Saída", + "viewCategory": "Exibir", + "clearOutput.label": "Limpar saída" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/output/browser/outputActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/output/browser/outputActions.i18n.json new file mode 100644 index 0000000000000..00bca0dc3098c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/output/browser/outputActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleOutput": "Alternar Saída", + "clearOutput": "Limpar saída", + "toggleOutputScrollLock": "Alternar Scroll Lock de Saída", + "switchToOutput.label": "Mudar para Saída" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/output/browser/outputPanel.i18n.json b/i18n/ptb/src/vs/workbench/parts/output/browser/outputPanel.i18n.json new file mode 100644 index 0000000000000..ec28fd7b2a324 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/output/browser/outputPanel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "outputPanelWithInputAriaLabel": "{0}, Painel de saída", + "outputPanelAriaLabel": "Painel de saída" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/output/common/output.i18n.json b/i18n/ptb/src/vs/workbench/parts/output/common/output.i18n.json new file mode 100644 index 0000000000000..a083a6e7d9d21 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/output/common/output.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "output": "Saída", + "channel": "para '{0}'" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json new file mode 100644 index 0000000000000..5fda62eb168cf --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "slow": "Inicialização lenta detectada", + "slow.detail": "Pena que você teve uma inicialização lenta. Por favor reinicie '{0}' com perfil de desempenho habilitado, compartilhe os perfis conosco e nós trabalharemos duro para fazer com que a inicialização fique perfeita novamente.", + "prof.message": "Perfis criados com sucesso.", + "prof.detail": "Por favor, crie um problema e anexe manualmente os seguintes arquivos:\n{0}", + "prof.restartAndFileIssue": "Criar Problema e Reiniciar", + "prof.restart": "Reiniciar", + "prof.thanks": "Obrigado por nos ajudar.", + "prof.detail.restart": "É necessário um reinício final para continuar a usar '{0}'. Novamente, obrigado pela sua contribuição." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json new file mode 100644 index 0000000000000..279307d4b8756 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defineKeybinding.initial": "Pressionar a combinação de teclas desejada e ENTER. ESCAPE para cancelar.", + "defineKeybinding.chordsTo": "Acorde para" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json new file mode 100644 index 0000000000000..1cb6541687c6c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "keybindingsInputName": "Atalhos de Teclado", + "SearchKeybindings.AriaLabel": "Pesquisar keybindings", + "SearchKeybindings.Placeholder": "Pesquisar keybindings", + "sortByPrecedene": "Ordenar por precedência", + "header-message": "Para personalizações avançadas abrir e editar", + "keybindings-file-name": "keybindings.json", + "keybindingsLabel": "Keybindings", + "changeLabel": "Alterar Keybinding", + "addLabel": "Adicionar Keybinding", + "removeLabel": "Remover Keybinding", + "resetLabel": "Redefinir Keybinding", + "showConflictsLabel": "Mostrar Conflitos", + "copyLabel": "Copiar", + "error": "Erro '{0}' enquanto edita keybinding. Por favor, abra o arquivo 'keybindings.json' e verifique.", + "command": "Comando", + "keybinding": "KeyBinding", + "source": "Fonte", + "when": "Quando", + "editKeybindingLabelWithKey": "Alterar Keybinding {0}", + "editKeybindingLabel": "Alterar Keybinding", + "addKeybindingLabelWithKey": "Adicionar Keybinding {0}", + "addKeybindingLabel": "Adicionar Keybinding", + "commandAriaLabel": "Comando é {0}.", + "keybindingAriaLabel": "KeyBinding é {0}.", + "noKeybinding": "Nenhum Keybinding atribuído.", + "sourceAriaLabel": "Fonte é {0}.", + "whenAriaLabel": "Quando é {0}.", + "noWhen": "Sem contexto Quando." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json new file mode 100644 index 0000000000000..15fd432f9fa85 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defineKeybinding.start": "Definir Keybinding", + "defineKeybinding.kbLayoutInfoMessage": "Para o seu layout de teclado atual pressionar", + "defineKeybinding.kbLayoutErrorMessage": "Você não será capaz de produzir esta combinação de teclas sob seu layout de teclado atual." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json new file mode 100644 index 0000000000000..40e6d0841da34 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "Editor de Preferências Padrão", + "keybindingsEditor": "Editor de Keybindings", + "preferences": "Preferências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json new file mode 100644 index 0000000000000..461e0fb96f78f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openGlobalSettings": "Abra as Configurações de Usuário", + "openGlobalKeybindings": "Abrir Atalhos de Teclado", + "openGlobalKeybindingsFile": "Abrir Arquivo de Atalhos de Teclado", + "openWorkspaceSettings": "Abrir as configurações do espaço de trabalho", + "configureLanguageBasedSettings": "Definir Configurações Específicas de Linguagem...", + "languageDescriptionConfigured": "({0})", + "pickLanguage": "Selecionar Linguagem" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json new file mode 100644 index 0000000000000..e3ef1e68a738f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "settingsEditorName": "Configurações Padrão", + "SearchSettingsWidget.AriaLabel": "Configurações de Pesquisa", + "SearchSettingsWidget.Placeholder": "Configurações de Pesquisa", + "totalSettingsMessage": "Total {0} Configurações", + "noSettingsFound": "Nenhum resultado", + "oneSettingFound": "1 Configuração correspondente", + "settingsFound": "{0} Configurações correspondentes", + "preferencesAriaLabel": "Preferências padrão. Editor de texto somente leitura." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json new file mode 100644 index 0000000000000..e35427eb2dfa1 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "errorInvalidConfiguration": "Não é possível gravar em configurações. Corrija erros/avisos no arquivo e tente novamente.", + "editTtile": "Editar", + "replaceDefaultValue": "Substituir nas Configurações", + "copyDefaultValue": "Copiar para Configurações", + "unsupportedPHPExecutablePathSetting": "Essa configuração deve ser uma Configuração de Usuário. Para configurar o PHP para o espaço de trabalho, abra um arquivo PHP e clique em 'Caminho do PHP' na barra de status.", + "unsupportedWorkspaceSetting": "Essa configuração deve ser uma Configuração de Usuário." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json new file mode 100644 index 0000000000000..3d94af6361561 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFolderFirst": "Abrir uma pasta primeiro para criar configurações de espaço de trabalho", + "emptyKeybindingsHeader": "Coloque suas chaves de ligações neste arquivo para substituir os padrões", + "defaultKeybindings": "Keybindings Padrão", + "emptySettingsHeader": "Colocar suas configurações nesse arquivo para sobrecrever as configurações padrão", + "emptySettingsHeader1": "Colocar as suas configurações nesse arquivo para sobrescrever as configurações e usuário padrão.", + "fail.createSettings": "Não foi possível criar '{0}' ({1})." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json new file mode 100644 index 0000000000000..556ef65c079dd --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "settingsSwitcherBarAriaLabel": "Chave de Configurações", + "userSettings": "Configurações de Usuário", + "workspaceSettings": "Configurações de Espaço de Trabalho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json new file mode 100644 index 0000000000000..68e05e00daf4d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "default": "Valor padrão", + "user": "Usuário", + "meta": "meta", + "option": "opção" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json new file mode 100644 index 0000000000000..6427118b75bed --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commonlyUsed": "Comumente Utilizado", + "defaultKeybindingsHeader": "Substituir as chaves de ligações, colocando-os em seu arquivo de chave ligações." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json new file mode 100644 index 0000000000000..7b246da25ad7e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Mostrar todos os comandos", + "showCommands.label": "Paleta de comandos...", + "entryAriaLabelWithKey": "{0}, {1}, comandos", + "entryAriaLabel": "{0}, comandos", + "canNotRun": "O comando '{0}' não pode ser executado a partir daqui.", + "actionNotEnabled": "O comando '{0}' não está habilitado no contexto atual.", + "commandLabel": "{0}: {1}", + "cat.title": "{0}: {1}", + "noCommandsMatching": "Não há comandos correspondentes" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json new file mode 100644 index 0000000000000..3f922e6decaa0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoLine": "Ir para linha...", + "gotoLineLabelEmptyWithLimit": "Digite um número de linha entre 1 e {0} para navegar para lá", + "gotoLineLabelEmpty": "Digite um número de linha para navegar para lá", + "gotoLineColumnLabel": "Ir para linha {0} e caractere {1}", + "gotoLineLabel": "Ir para linha {0}", + "gotoLineHandlerAriaLabel": "Digite um número de linha para navegar.", + "cannotRunGotoLine": "Abrir um arquivo de texto primeiro para ir a uma linha" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json new file mode 100644 index 0000000000000..5e56bdc5890f9 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoSymbol": "Ir para o Símbolo no Arquivo...", + "symbols": "símbolos ({0})", + "method": "métodos ({0})", + "function": "funções ({0})", + "_constructor": "construtores ({0})", + "variable": "variáveis ({0})", + "class": "classes ({0})", + "interface": "interfaces ({0})", + "namespace": "namespaces ({0})", + "package": "pacotes ({0})", + "modules": "módulos ({0})", + "property": "propriedades ({0})", + "enum": "enumerações ({0})", + "string": "cadeias de caracteres ({0})", + "rule": "regras ({0})", + "file": "arquivos ({0})", + "array": "matrizes ({0})", + "number": "números ({0})", + "boolean": "booleanos ({0})", + "object": "objetos ({0})", + "key": "chaves ({0})", + "entryAriaLabel": "{0}, símbolos", + "noSymbolsMatching": "Não há símbolos correspondentes", + "noSymbolsFound": "Nenhum símbolo encontrado", + "gotoSymbolHandlerAriaLabel": "Tipo para reduzir os símbolos do editor ativo atual.", + "cannotRunGotoSymbolInFile": "Não há informações de símbolo para o arquivo", + "cannotRunGotoSymbol": "Abrir um arquivo de texto primeiro para ir a um símbolo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json new file mode 100644 index 0000000000000..0a2fc637f737a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, ajuda do seletor", + "globalCommands": "comandos globais", + "editorCommands": "comandos do editor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json new file mode 100644 index 0000000000000..e3c6204b6055c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commandsHandlerDescriptionDefault": "Exibir e executar comandos", + "gotoLineDescriptionMac": "Ir para linha", + "gotoLineDescriptionWin": "Ir para linha", + "gotoSymbolDescription": "Ir para o Símbolo no Arquivo", + "gotoSymbolDescriptionScoped": "Ir para o Símbolo no Arquivo Por Categoria", + "helpDescription": "Mostrar ajuda", + "viewPickerDescription": "Abrir Visualização" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json new file mode 100644 index 0000000000000..388043547948b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, visualizar seletor", + "views": "Modos de exibição", + "panels": "Painéis", + "terminals": "Terminal", + "terminalTitle": "{0}: {1}", + "channels": "Saída", + "openView": "Abrir Visualização", + "quickOpenView": "Abrir Visualização Rápida" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json new file mode 100644 index 0000000000000..1b5369ebeea17 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleGitViewlet": "Mostrar Git", + "installAdditionalSCMProviders": "Instalar provedores de SCM adicionais...", + "source control": "Controle de código-fonte", + "toggleSCMViewlet": "Mostrar SCM", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json new file mode 100644 index 0000000000000..7846e2b872dcc --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "scmPendingChangesBadge": "{0} alterações pendentes" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json new file mode 100644 index 0000000000000..5b93869e8d8f4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installAdditionalSCMProviders": "Instalar provedores de SCM adicionais...", + "switch provider": "Mudar Provedor SCM..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json new file mode 100644 index 0000000000000..c14da8019782d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commitMessage": "Mensagem (tecle {0} para confirmar)", + "source control": "Controle de código-fonte", + "viewletTitle": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json new file mode 100644 index 0000000000000..8d52351151529 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileAndTypeResults": "resultados do arquivo e símbolo", + "fileResults": "resultados do arquivo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json new file mode 100644 index 0000000000000..016a91f2c3275 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, seletor de arquivo", + "searchResults": "resultados da pesquisa" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json new file mode 100644 index 0000000000000..ede0a0c718d4e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, selecionador de símbolos", + "symbols": "resultados de símbolo", + "noSymbolsMatching": "Não há símbolos correspondentes", + "noSymbolsWithoutInput": "Digitar para pesquisar símbolos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json new file mode 100644 index 0000000000000..68c8c0ad6b700 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultLabel": "entrada", + "patternDescription": "Use Padrões Glob", + "patternHelpInclude": "O padrão para combinações. Por exemplo, **\\*\\*/*.js** para corresponder a todos os arquivos JavaScript ou **myFolder/\\*\\*** para corresponder a essa pasta com todas pastas aninhadas.\n\n**Referência**:\n**\\*** corresponde a 0 ou mais caracteres\n**?** corresponde a 1 caractere\n**\\*\\*** corresponde a zero ou mais diretórios\n**[a-z]** corresponde a um intervalo de caracteres\n**{a, b}** corresponde a qualquer um dos padrões)", + "useIgnoreFilesDescription": "Usar Ignorar Arquivos", + "useExcludeSettingsDescription": "Usar Configurações de Exclusão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/replaceService.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/replaceService.i18n.json new file mode 100644 index 0000000000000..05d7f4e4cd00a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/replaceService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileReplaceChanges": "{0} ↔ {1} (Substituir Preview)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/search.contribution.i18n.json new file mode 100644 index 0000000000000..b14e20a148767 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Ir para Símbolo no Espaço de Trabalho...", + "name": "Pesquisar", + "showSearchViewlet": "Mostrar Busca", + "view": "Exibir", + "findInFiles": "Localizar nos Arquivos", + "openAnythingHandlerDescription": "Ir para o Arquivo", + "openSymbolDescriptionNormal": "Ir para o Símbolo em Área de Trabalho", + "searchOutputChannelTitle": "Pesquisar", + "searchConfigurationTitle": "Pesquisar", + "exclude": "Configure os padrões glob para excluir arquivos e pastas nas pesquisas. Herda todos os padrões glob da configuração files.exclude.", + "exclude.boolean": "O padrão glob com o qual combinar os caminhos de arquivo. Defina para verdadeiro ou falso para habilitar ou desabilitar o padrão.", + "exclude.when": "Verificação adicional nos irmãos de um arquivo correspondente. Use $(basename) como variável para o nome do arquivo correspondente.", + "useRipgrep": "Controla se deve utilizar ripgrep na pesquisa de texto", + "useIgnoreFilesByDefault": "Controla se deve utilizar arquivos .gitignore e .ignore por padrão ao fazer pesquisas em um novo espaço de trabalho.", + "search.quickOpen.includeSymbols": "Configurar para incluir resultados de uma pesquisa símbolo global nos resultados do arquivo para Abertura Rápida." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/searchActions.i18n.json new file mode 100644 index 0000000000000..94f7c40e78209 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "nextSearchTerm": "Mostrar o Próximo Termo de Pesquisa", + "previousSearchTerm": "Mostrar Termo de Pesquisa Anterior", + "focusNextInputBox": "Focalizar a Próxima Caixa de Entrada", + "focusPreviousInputBox": "Focalizar a Caixa de Entrada Anterior", + "replaceInFiles": "Substituir nos Arquivos", + "findInFolder": "Encontrar na pasta", + "RefreshAction.label": "Atualizar", + "ClearSearchResultsAction.label": "Limpar os Resultados da Pesquisa", + "FocusNextSearchResult.label": "Focalizar o Próximo Resultado da Pesquisa", + "FocusPreviousSearchResult.label": "Focalizar o Resultado da Pesquisa Anterior", + "RemoveAction.label": "Remover", + "file.replaceAll.label": "Substituir Tudo", + "match.replace.label": "Substituir", + "ConfigureGlobalExclusionsAction.label": "Abrir configurações" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json new file mode 100644 index 0000000000000..3edda1861fb81 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "searchMatches": "{0} correspondências encontradas", + "searchMatch": "{0} correspondência encontrada", + "fileMatchAriaLabel": "{0} correspondências no arquivo {1} da pasta {2}, Resultado da pesquisa", + "replacePreviewResultAria": "Substitua o termo {0} pelo termo {1} na coluna posição {2} correspondente ao texto {3}", + "searchResultAria": "Encontrado o termo {0} na posição da coluna {1} correspondente ao texto {2}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json new file mode 100644 index 0000000000000..4ceea61601025 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json @@ -0,0 +1,50 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "moreSearch": "Alternar Detalhes da Pesquisa", + "searchScope.includes": "arquivos a serem incluídos", + "label.includes": "Pesquisa Padrões de Inclusão", + "searchScope.excludes": "arquivos a serem excluídos", + "label.excludes": "Pesquisa de Padrões de Exclusão", + "global.searchScope.folders": "arquivos excluídos pelas configurações", + "label.global.excludes": "Configurado pesquisa padrões de exclusão", + "replaceAll.confirmation.title": "Substituir Tudo", + "replaceAll.confirm.button": "Substituir", + "replaceAll.occurrence.file.message": "Substituída {0} ocorrência no arquivo {1} com '{2}'.", + "removeAll.occurrence.file.message": "Substituída {0} ocorrência no arquivo {1}'.", + "replaceAll.occurrence.files.message": "Substituída {0} ocorrência no arquivo {1} com '{2}'.", + "removeAll.occurrence.files.message": "Substituída {0} ocorrência nos arquivos {1}", + "replaceAll.occurrences.file.message": "Substituídas {0} ocorrências no arquivo {1} com '{2}'.", + "removeAll.occurrences.file.message": "Substituídas {0} ocorrências nos arquivo {1}.", + "replaceAll.occurrences.files.message": "Substituídas {0} ocorrências nos arquivos {1} com '{2}'.", + "removeAll.occurrences.files.message": "Substituídas {0} ocorrências nos arquivos {1}.", + "removeAll.occurrence.file.confirmation.message": "Substituir {0} ocorrências no arquivo {1} com '{2}'?", + "replaceAll.occurrence.file.confirmation.message": "Substituir {0} ocorrência no arquivo {1}?", + "removeAll.occurrence.files.confirmation.message": "Substituir {0} ocorrência nos arquivos {1} com '{2}'?", + "replaceAll.occurrence.files.confirmation.message": "Substituir {0} ocorrência nos arquivos {1}?", + "removeAll.occurrences.file.confirmation.message": "Substituir {0} ocorrências no arquivo {1} com '{2}'?", + "replaceAll.occurrences.file.confirmation.message": "Substituir {0} ocorrências no arquivo {1}?", + "removeAll.occurrences.files.confirmation.message": "Substituir {0} ocorrências nos arquivos {1} com '{2}'?", + "replaceAll.occurrences.files.confirmation.message": "Substituir {0} ocorrências nos arquivos {1}?", + "treeAriaLabel": "Resultados da Pesquisa", + "globLabel": "{0} quando {1}", + "searchMaxResultsWarning": "O conjunto de resultados contém apenas um subconjunto de todas as correspondências. Seja mais específico na sua pesquisa para diminuir o número de resultados.", + "searchCanceled": "Pesquisa foi cancelada antes de qualquer resultado ser encontrado - ", + "noResultsIncludesExcludes": "Nenhum resultado encontrado em '{0}' excluindo '{1}' - ", + "noResultsIncludes": "Nenhum resultado encontrado em '{0}' -", + "noResultsExcludes": "Nenhum resultado encontrado excluindo '{0}' -", + "noResultsFound": "Nenhum resultado encontrado. Analise as configurações para exclusões configuradas - ", + "rerunSearch.message": "Pesquisar novamente", + "rerunSearchInAll.message": "Pesquisar novamente em todos os arquivos", + "openSettings.message": "Abrir configurações", + "ariaSearchResultsStatus": "Pesquisa retornou {0} resultados em {1} arquivos", + "search.file.result": "{0} resultado no arquivo {1}", + "search.files.result": "{0} resultado nos arquivos {1}", + "search.file.results": "{0} resultados no arquivo {1}", + "search.files.results": "{0} resultados nos arquivos {1}", + "searchWithoutFolder": "Você ainda não abriu uma pasta. Somente arquivos abertos são pesquisados - ", + "openFolder": "Abrir Pasta" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/searchWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/searchWidget.i18n.json new file mode 100644 index 0000000000000..41178af28cc96 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/searchWidget.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "search.action.replaceAll.disabled.label": "Substituir Todos (Submeter Pesquisa para Habilitar)", + "search.action.replaceAll.enabled.label": "Substituir Tudo", + "search.replace.toggle.button.title": "Alternar Substituir", + "label.Search": "Pesquisar: Digite o termo de pesquisa e pressione Enter para pesquisar ou Escape para cancelar", + "search.placeHolder": "Pesquisar", + "label.Replace": "Substituir: Digite o termo a ser substituído e pressione Enter para visualizar ou Escape para cancelar", + "search.replace.placeHolder": "Substituir", + "regexp.validationFailure": "A expressão corresponde a tudo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json new file mode 100644 index 0000000000000..0f8e63601874a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.snippets": "Contribui aos trechos de código.", + "vscode.extension.contributes.snippets-language": "Identificador de linguagem para o qual este trecho de código contribui.", + "vscode.extension.contributes.snippets-path": "Caminho do arquivo de trechos de código. O caminho é relativo à pasta de extensão e normalmente começa com '. /snippets/'.", + "invalid.language": "Linguagem desconhecida em `contributes.{0}.language`. Valor fornecido: {1}", + "invalid.path.0": "Esperada uma string em `contributes.{0}.path`. Valor informado: {1}", + "invalid.path.1": "É esperado que `contributes.{0}.path` ({1}) seja incluído na pasta da extensão ({2}). Isto pode tornar a extensão não portável." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json new file mode 100644 index 0000000000000..6c34a620b89ab --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "snippet.suggestions.label": "Inserir trecho de código" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json new file mode 100644 index 0000000000000..05f799f7b6a84 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openSnippet.label": "Abrir trechos de código do usuário", + "openSnippet.pickLanguage": "Selecionar Idioma para o Trecho", + "openSnippet.errorOnCreate": "Não é possível criar {0}", + "preferences": "Preferências", + "snippetSchema.json.default": "Trecho de código vazio", + "snippetSchema.json": "Configuração do trecho do usuário", + "snippetSchema.json.prefix": "O prefixo usado ao selecionar o trecho no intelliSense", + "snippetSchema.json.body": "O conteúdo do trecho de código. Use '${id}', '${id: rótulo}', '${1:label}' para variáveis e '$0', '$1' para posições do cursor", + "snippetSchema.json.description": "A descrição do trecho." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json new file mode 100644 index 0000000000000..a4a18c1e970f9 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "detail.userSnippet": "Trecho de código do usuário", + "snippetSuggest.longLabel": "{0}, {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json new file mode 100644 index 0000000000000..adfb9a4190d5c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tabCompletion": "Inserir trechos de código quando seu prefixo corresponder. Funciona melhor quando 'quickSuggestions' não está habilitado." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json new file mode 100644 index 0000000000000..be3fefb5d3d84 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, tarefas", + "workspace": "Do espaço de trabalho", + "extension": "De extensões" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json new file mode 100644 index 0000000000000..4009d3b815416 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Digite o nome de uma tarefa para reiniciar", + "noTasksMatching": "Não há tarefas correspondentes", + "noTasksFound": "Não há tarefa para ser reiniciada" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json new file mode 100644 index 0000000000000..6b4d6134384d8 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Digite o nome de uma tarefa para executar", + "noTasksMatching": "Não há tarefas correspondentes", + "noTasksFound": "Não há tarefas encontradas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json new file mode 100644 index 0000000000000..9c5ee4b4b598d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Digite o nome de uma tarefa para finalizar", + "noTasksMatching": "Não há tarefas correspondentes", + "noTasksFound": "Nenhuma tarefa para finalizar encontrada" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..2de0b161ac87c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "Aviso: options.cwd deve ser do tipo string. Ignorando valor {0}\n", + "ConfigurationParser.noShell": "Aviso: A configuração do shell somente é suportada quando estiver executando tarefas no terminal.", + "ConfigurationParser.noargs": "Erro: Argumentos do comando devem ser uma matriz de strings. Valor informado é:\n{0}", + "ConfigurationParser.noName": "Erro: Problem Matcher no escopo declarado deve ter um nome:\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "Aviso: a correspondência de problema definido é desconhecido. Tipos suportados são string | ProblemMatcher | (string | ProblemMatcher)[].\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "Erro: ProblemMatcher inválido referência: {0}\n", + "ConfigurationParser.noTaskName": "Erro: tarefas devem fornecer uma propriedade taskName. A tarefa será ignorada.\n{0}\n", + "taskConfiguration.shellArgs": "Aviso: a tarefa '{0}' é um comando do shell e o nome de comando ou um dos seus argumentos tem espaços sem escape. Para garantir a linha de comando correta por favor mesclar argumentos no comando.", + "taskConfiguration.noCommandOrDependsOn": "Erro: a tarefa '{0}' também não especifica um comando ou uma propriedade dependsOn. A tarefa será ignorada. Sua definição é: {1}", + "taskConfiguration.noCommand": "Erro: a tarefa '{0}' não define um comando. A tarefa será ignorada. Sua definição é: {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json new file mode 100644 index 0000000000000..268871153e335 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tsc.config": "Compila um projeto TypeScript", + "tsc.watch": "Compila um projeto TypeScript em mode de monitoramento", + "dotnetCore": "Executa comando de compilação do .NET Core", + "msbuild": "Executa a compilação destino", + "externalCommand": "Exemplo para executar um comando externo arbitrário", + "Maven": "Executa comandos comuns específicos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json new file mode 100644 index 0000000000000..92ae501cdc880 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.options": "Opções de comando adicionais", + "JsonSchema.options.cwd": "O diretório de trabalho atual do programa executado ou do script. Se omitido raiz de espaço de trabalho atual do código é usado.", + "JsonSchema.options.env": "O ambiente do programa executado ou comando shell. Se omitido o ambiente do processo pai é usado.", + "JsonSchema.shell.executable": "O shell a ser usado.", + "JsonSchema.shell.args": "Os argumentos shell.", + "JsonSchema.command": "O comando a ser executado. Pode ser um programa externo ou um comando shell.", + "JsonSchema.tasks.args": "Argumentos passados para o comando quando esta tarefa é invocada.", + "JsonSchema.tasks.taskName": "Nome da tarefa", + "JsonSchema.tasks.windows": "Configuração de comando específica do Windows", + "JsonSchema.tasks.mac": "Configuração de comando específica do Mac", + "JsonSchema.tasks.linux": "Configuração de comando específica do Linux", + "JsonSchema.tasks.suppressTaskName": "Controla se o nome de tarefa é adicionado como um argumento para o comando. Se omitido o valor definido globalmente é usado.", + "JsonSchema.tasks.showOutput": "Controla se a saída da execução de tarefas é mostrada ou não. Se omitido o valor definido globalmente é usado.", + "JsonSchema.echoCommand": "Controla se o comando executado é enviado para a saída. O padrão é false.", + "JsonSchema.tasks.watching.deprecation": "Descontinuado. Use isBackground.", + "JsonSchema.tasks.watching": "Se a tarefa executada é mantida viva e está monitorando o sistema de arquivos.", + "JsonSchema.tasks.background": "Se a tarefa executada é mantida viva e é executado em segundo plano.", + "JsonSchema.tasks.promptOnClose": "Se o usuário é solicitado quando VS Code fecha com uma tarefa sendo executada.", + "JsonSchema.tasks.build": "Esta tarefa é mapeada para o comando de compilação padrão do código.", + "JsonSchema.tasks.test": "Esta tarefa é mapeada para o comando de teste padrão do código.", + "JsonSchema.tasks.matchers": "O problema matcher(s) a seu utilizado. Pode ser uma sequência de caracteres ou uma definição de problem matcher ou uma matriz de sequências de caracteres e problem matchers.", + "JsonSchema.args": "Argumentos adicionais passados para o comando.", + "JsonSchema.showOutput": "Controla se a saída da execução de tarefas é mostrada ou não. Se omitido 'sempre' é usado.", + "JsonSchema.watching.deprecation": "Descontinuado. Use isBackground.", + "JsonSchema.watching": "Se a tarefa executada é mantida viva e está monitorando o sistema de arquivos.", + "JsonSchema.background": "Se a tarefa executada é mantida viva e é executado em segundo plano.", + "JsonSchema.promptOnClose": "Se o usuário é solicitado quando VS Code fecha com uma tarefa de segundo plano em execução.", + "JsonSchema.suppressTaskName": "Controla se o nome de tarefa é adicionado como um argumento para o comando. O padrão é false.", + "JsonSchema.taskSelector": "Prefixo para indicar que um argumento é tarefa.", + "JsonSchema.matchers": "A correspondência de problemas a ser utilizada. Pode ser uma sequência de caracteres ou uma definição de correspondência de problemas ou uma matriz de sequências de caracteres e correspondência de problemas.", + "JsonSchema.tasks": "As configurações de tarefa. Normalmente são ampliações de tarefas já definidas na execução de tarefa externa." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json new file mode 100644 index 0000000000000..dc0695101b037 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.version": "Número da versão do config", + "JsonSchema.windows": "Configuração de comando específica do Windows", + "JsonSchema.mac": "Configuração de comando específica do Mac", + "JsonSchema.linux": "Configuração de comando específica do Linux", + "JsonSchema.shell": "Especifica se o comando é um comando shell ou um programa externo. O padrão é falso se omitido." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json new file mode 100644 index 0000000000000..3130e474d7e22 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.version": "Número da versão do config", + "JsonSchema.windows": "Configuração de comando específica do Windows", + "JsonSchema.mac": "Configuração de comando específica do Mac", + "JsonSchema.linux": "Configuração de comando específica do Linux", + "JsonSchema.shell": "Especifica se o comando é um comando shell ou um programa externo. O padrão é falso se omitido.", + "JsonSchema.tasks.dependsOn.string": "Outra tarefa da qual esta tarefa depende.", + "JsonSchema.tasks.dependsOn.array": "A outra tarefa que esta tarefa depende." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json new file mode 100644 index 0000000000000..a07be4d2850b2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -0,0 +1,47 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksCategory": "Tarefas", + "ConfigureTaskRunnerAction.noWorkspace": "Tarefas somente estão disponíveis em uma pasta da área de trabalho.", + "ConfigureTaskRunnerAction.quickPick.template": "Selecione um gerenciador de tarefa", + "ConfigureTaskRunnerAction.autoDetecting": "Tarefas de auto detecção para {0}", + "ConfigureTaskRunnerAction.autoDetect": "A tarefa de sistema de auto detecção falhou. Usando o modelo padrão. Consulte a saída da tarefa para detalhes.", + "ConfigureTaskRunnerAction.autoDetectError": "A tarefa de sistema de auto detecção produziu erros. Consulte a saída da tarefa para detalhes.", + "ConfigureTaskRunnerAction.failed": "Não é possível criar o arquivo 'tasks.json' na pasta '.vscode'. Consulte a saída da tarefa para detalhes.", + "ConfigureTaskRunnerAction.label": "Configure o gerenciador de tarefas", + "ConfigureBuildTaskAction.label": "Configurar Tarefa de Compilação", + "CloseMessageAction.label": "Fechar", + "ShowTerminalAction.label": "Terminal Visualização", + "problems": "Problemas", + "manyMarkers": "99+", + "tasks": "Tarefas", + "TaskSystem.noHotSwap": "Alterar o mecanismo de execução de tarefa requer reiniciar o VS Code. A alteração será ignorada.", + "TaskService.noBuildTask": "Nenhuma tarefa de compilação definida. Marque uma tarefa com 'isBuildCommand' no arquivo tasks.json.", + "TaskService.noTestTask": "Nenhuma tarefa de teste definida. Marque uma tarefa com 'isTestCommand' no arquivo tasks.json.", + "TaskServer.noTask": "Tarefa {0} requisitada para execução não encontrada.", + "TaskSystem.activeSame": "A tarefa já está ativa e em modo de monitoramento. Para terminar a tarefa, use `F1 > terminar tarefa`", + "TaskSystem.active": "Já existe uma tarefa sendo executada. Finalize-a antes de executar outra tarefa.", + "TaskSystem.restartFailed": "Falha ao finalizar e reiniciar a tarefa {0}", + "TaskSystem.configurationErrors": "Erro: A configuração da tarefa informada possui erros de validação e não pode ser utilizada. Por favor, corrija os erros primeiro.", + "TaskSystem.invalidTaskJson": "Erro: O conteúdo do arquivo tasks.json possui erros de sintaxe. Por favor, corrija-os antes de executar uma tarefa.\n", + "TaskSystem.runningTask": "Há uma tarefa sendo executada. Deseja finalizá-la?", + "TaskSystem.terminateTask": "&&Finalizar Tarefa", + "TaskSystem.noProcess": "A tarefa executada não existe mais. Se a tarefa produziu processos em background, finalizar o VS Code pode resultar em processos órfãos. Para evitar isso inicie o último processo em background com uma flag de espera.", + "TaskSystem.exitAnyways": "&&Sair de qualquer maneira", + "TerminateAction.label": "Finalizar a tarefa sendo executada", + "TaskSystem.unknownError": "Ocorreu um erro enquanto a tarefa estava sendo executada. Verifique o log de tarefas para detalhes.", + "TaskService.noWorkspace": "Tarefas somente estão disponíveis em uma pasta da área de trabalho.", + "TerminateAction.noProcess": "O processo executado não existe mais. Se a tarefa produziu processos em background, finalizar o VS Code pode resultar em processos órfãos.", + "TerminateAction.failed": "Falha ao finalizar a tarefa sendo executada", + "ShowLogAction.label": "Visualizar o Log de Tarefas", + "RunTaskAction.label": "Executar Tarefa", + "RestartTaskAction.label": "Reiniciar Tarefa", + "BuildAction.label": "Executar Tarefa de compilação", + "TestAction.label": "Executar Tarefa de Teste", + "quickOpen.task": "Executar Tarefa", + "quickOpen.terminateTask": "Finalizar Tarefa", + "quickOpen.restartTask": "Reiniciar Tarefa" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json new file mode 100644 index 0000000000000..f21b7eebc35d1 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TerminalTaskSystem.unknownError": "Um erro desconhecido ocorreu durante a execução de uma tarefa. Consulte o log de saída de tarefa para obter detalhes.", + "TerminalTaskSystem.terminalName": "Tarefa - {0}", + "TerminalTaskSystem": "Não é possível executar um comando shell em uma unidade UNC.", + "unkownProblemMatcher": "Problem matcher {0} não pode ser resolvido. O matcher será ignorado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json new file mode 100644 index 0000000000000..a4f13c42f7c1c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskSystemDetector.noGulpTasks": "Executando gulp..-tarefas-simples não listam nenhuma tarefa. Você executou a instalação do npm?", + "TaskSystemDetector.noJakeTasks": "Executando jake..-tarefas não listam nenhuma tarefa. Você instalou o npm?", + "TaskSystemDetector.noGulpProgram": "Gulp não está instalado no seu sistema. Execute npm install -g gulp para instalá-lo.", + "TaskSystemDetector.noJakeProgram": "Jake não está instalado no seu sistema. Execute npm install -g jake para instalá-lo.", + "TaskSystemDetector.noGruntProgram": "Grunhido não está instalado no seu sistema. Execute npm install -g grunt para instalá-lo.", + "TaskSystemDetector.noProgram": "Programa {0} não foi encontrado. Mensagem é {1}", + "TaskSystemDetector.buildTaskDetected": "Tarefa de construção chamada '{0}' detectada.", + "TaskSystemDetector.testTaskDetected": "Tarefa de teste chamada '{0}' detectada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json new file mode 100644 index 0000000000000..72848a8cde1f7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskRunnerSystem.unknownError": "Um erro desconhecido ocorreu durante a execução de uma tarefa. Consulte o log de saída de tarefa para obter detalhes.", + "TaskRunnerSystem.watchingBuildTaskFinished": "\nTarefas de compilação de monitoramento terminaram.", + "TaskRunnerSystem.childProcessError": "Falha ao iniciar o programa externo {0} {1}.", + "TaskRunnerSystem.cancelRequested": "\nA tarefa '{0}' foi finalizada por solicitação do usuário.", + "unkownProblemMatcher": "Problema matcher {0} não pode ser resolvido. O matcher será ignorado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json new file mode 100644 index 0000000000000..de21ec3dca10c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalIntegratedConfigurationTitle": "Terminal Integrado", + "terminal.integrated.shell.linux": "O caminho do shell que o terminal usa no Linux.", + "terminal.integrated.shellArgs.linux": "Os argumentos de linha de comando a serem usados no terminal do Linux.", + "terminal.integrated.shell.osx": "O caminho do shell que o terminal usa no OS X.", + "terminal.integrated.shellArgs.osx": "Os argumentos de linha de comando a serem usados no terminal do OS X.", + "terminal.integrated.shell.windows": "O caminho do shell que o terminal usa no Windows. Quando usar um shell fornecido com o Windows (cmd, PowerShell ou Bash no Ubuntu), prefira utilizar C:\\Windows\\sysnative ao invés de C:\\Windows\\System32 para usar as versões de 64 bits.", + "terminal.integrated.shellArgs.windows": "Os argumentos de linha de comando a serem utilizados no terminal do Windows.", + "terminal.integrated.rightClickCopyPaste": "Quando configurado, isto evitará que o menu de contexto apareça quando pressionado o botão direito do mouse dentro do terminal, em vez disso vai copiar quando há uma seleção e colar quando não há nenhuma seleção.", + "terminal.integrated.fontFamily": "Controla a família de fontes do terminal, este padrão é o valor do editor.fontFamily.", + "terminal.integrated.fontLigatures": "Controla se as ligações de fonte são habilitadas no terminal.", + "terminal.integrated.fontSize": "Controla o tamanho da fonte em pixels do terminal.", + "terminal.integrated.lineHeight": "Controles a altura da linha do terminal, este número é multiplicada pelo tamanho da fonte terminal para obter a altura real da linha em pixels.", + "terminal.integrated.enableBold": "Se habilitar o texto em negrito dentro do terminal requer suporte do terminal shell.", + "terminal.integrated.cursorBlinking": "Controla se o cursor do terminal pisca.", + "terminal.integrated.cursorStyle": "Controla o estilo do cursor do terminal.", + "terminal.integrated.scrollback": "Controla a quantidade máxima de linhas que o terminal mantém em seu buffer.", + "terminal.integrated.setLocaleVariables": "Controla se as variáveis locais são definidas na inicialização do terminal, este padrão é verdadeiro no OS X e falso em outras plataformas.", + "terminal.integrated.cwd": "Um caminho de início explícito onde o terminal será lançado, isso é usado como o diretório de trabalho atual (cwd) para o processo shell. Isto pode ser particularmente útil em configurações de espaço de trabalho se o diretório raiz não é um cwd conveniente.", + "terminal.integrated.confirmOnExit": "Confirmar na saída se ainda houverem sessões de terminal ativas.", + "terminal.integrated.commandsToSkipShell": "Um conjunto de IDs de comando, cujas combinações de teclas não serão enviadas para o shell e sempre serão tratadas por código. Isto permite o uso de combinações de teclas que normalmente seriam consumidas pelo shell para agir da mesma forma quando o terminal não é focado, por exemplo ctrl+p para Execução Rápida.", + "terminal": "Terminal", + "terminalCategory": "Terminal", + "viewCategory": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json new file mode 100644 index 0000000000000..e63bd5db0a068 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbench.action.terminal.toggleTerminal": "Alternar Terminal Integrado", + "workbench.action.terminal.kill": "Finalizar a Instância de Terminal Ativa", + "workbench.action.terminal.kill.short": "Encerrar Terminal", + "workbench.action.terminal.copySelection": "Copiar Seleção", + "workbench.action.terminal.new": "Criar Novo Terminal Integrado", + "workbench.action.terminal.new.short": "Novo Terminal", + "workbench.action.terminal.focus": "Focalizar Terminal", + "workbench.action.terminal.focusNext": "Focalizar Próximo Terminal", + "workbench.action.terminal.focusAtIndex": "Focalizar Terminal {0}", + "workbench.action.terminal.focusPrevious": "Focalizar Terminal Anterior", + "workbench.action.terminal.paste": "Colar no Terminal Ativo", + "workbench.action.terminal.DefaultShell": "Selecionar Shell Padrão", + "workbench.action.terminal.runSelectedText": "Executar Texto Selecionado no Terminal Ativo", + "workbench.action.terminal.runActiveFile": "Executar Arquivo Ativo no Terminal Ativo", + "workbench.action.terminal.runActiveFile.noFile": "Apenas arquivos em disco podem ser executados no terminal", + "workbench.action.terminal.switchTerminalInstance": "Trocar a instância de Terminal", + "workbench.action.terminal.scrollDown": "Rolar para Baixo (Linha)", + "workbench.action.terminal.scrollDownPage": "Rolar para Baixo (Página)", + "workbench.action.terminal.scrollToBottom": "Rolar para baixo", + "workbench.action.terminal.scrollUp": "Rolar para Cima (Linha)", + "workbench.action.terminal.scrollUpPage": "Rolar para Cima (Página)", + "workbench.action.terminal.scrollToTop": "Rolar para cima", + "workbench.action.terminal.clear": "Limpar", + "workbench.action.terminal.allowWorkspaceShell": "Permitir a Configuração de Shell da Área de Trabalho", + "workbench.action.terminal.disallowWorkspaceShell": "Não Permitir a Configuração de Shell da Área de Trabalho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json new file mode 100644 index 0000000000000..495bd79c4bb42 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.background": "A cor de fundo do terminal, isso permite colorir o terminal com uma cor diferente do painel.", + "terminal.foreground": "A cor de primeiro plano do terminal.", + "terminal.ansiColor": "'{0}' cor ansi no terminal." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json new file mode 100644 index 0000000000000..b2b9a9a984326 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.allowWorkspaceShell": "Você permite {0} (definido como uma configuração de espaço de trabalho) a ser executado no terminal?", + "allow": "Permitir", + "disallow": "Não permitir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json new file mode 100644 index 0000000000000..13b6933b1b91b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.copySelection.noSelection": "Não é possível copiar seleção do terminal quando o terminal não tem foco", + "terminal.integrated.exitedWithCode": "O processo terminal encerrado com código de saída: {0}", + "terminal.integrated.waitOnExit": "Pressione qualquer tecla para fechar o terminal", + "terminal.integrated.launchFailed": "O comando de processo de terminal '{0}{1}' falhou ao ser iniciado (código de saída: {2})" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json new file mode 100644 index 0000000000000..fd175c5ad29ad --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalLinkHandler.followLinkCmd": "Cmd + clique para seguir o link", + "terminalLinkHandler.followLinkCtrl": "Ctrl + clique para seguir o link" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json new file mode 100644 index 0000000000000..5e811b8610068 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copy": "Copiar", + "createNewTerminal": "Novo Terminal", + "paste": "Colar", + "clear": "Limpar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json new file mode 100644 index 0000000000000..08ec4bd977709 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.chooseWindowsShellInfo": "Você pode alterar o terminal shell padrão selecionando o botão Personalizar.", + "customize": "Personalizar", + "cancel": "Cancelar", + "never again": "Ok, Nunca Mostrar Novamente", + "terminal.integrated.chooseWindowsShell": "Selecione o seu terminal shell preferido, você pode alterar isso mais tarde em suas configurações", + "terminalService.terminalCloseConfirmationSingular": "Há uma sessão ativa de terminal, você quer finalizá-la?", + "terminalService.terminalCloseConfirmationPlural": "Existem {0} sessões ativas de terminal, você quer finalizá-las?", + "yes": "Sim" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json new file mode 100644 index 0000000000000..9968bf0b9b1e5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectTheme.label": "Tema de Cores", + "installColorThemes": "Instalar temas de cor adicionais...", + "themes.selectTheme": "Selecione o tema de cor (teclas cima/baixo para visualização)", + "selectIconTheme.label": "Arquivo de Ícone do Tema", + "installIconThemes": "Instalar Temas de Ícones de Arquivos Adicionais...", + "noIconThemeLabel": "Nenhum", + "noIconThemeDesc": "Desabilitar ícones de arquivos", + "problemChangingIconTheme": "Problema configurando tema de ícones: {0}", + "themes.selectIconTheme": "Selecionar Tema de Ícones de Arquivos", + "generateColorTheme.label": "Gerar Tema de Cores a Partir das Configurações Atuais", + "preferences": "Preferências", + "developer": "Desenvolvedor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json new file mode 100644 index 0000000000000..1fc9c8fe3a4ca --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unsupportedWorkspaceSettings": "Esta área de trabalho contém configurações que só podem ser definidas nas configurações do usuário. ({0})", + "openWorkspaceSettings": "Abrir as configurações do espaço de trabalho", + "openDocumentation": "Saiba Mais", + "ignore": "Ignorar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json new file mode 100644 index 0000000000000..213c54a3d2484 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "releaseNotesInputName": "Notas da Versão: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json new file mode 100644 index 0000000000000..3634d3c2f2ab0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "release notes": "Notas da versão", + "updateConfigurationTitle": "Atualizar", + "updateChannel": "Configurar se você recebe atualizações automáticas de um canal de atualização. Requer uma reinicialização depois da mudança." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.i18n.json new file mode 100644 index 0000000000000..4199be74572e8 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateNow": "Atualizar Agora", + "later": "Mais tarde", + "unassigned": "Não atribuído", + "releaseNotes": "Notas da Versão", + "showReleaseNotes": "Mostrar Notas da Versão", + "downloadNow": "Baixar agora", + "read the release notes": "Bem-vindo a {0} v{1}! Gostaria de ler as Notas da Versão?", + "licenseChanged": "Nossos termos de licença mudaram, favor revisá-los.", + "license": "Ler Licença", + "updateAvailable": "{0} será atualizado após reiniciar.", + "thereIsUpdateAvailable": "Há uma atualização disponível.", + "noUpdatesAvailable": "Não há nenhuma atualização disponível." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/ptb/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json new file mode 100644 index 0000000000000..dea49eef8d512 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "watermark.showCommands": "Mostrar todos os comandos", + "watermark.quickOpen": "Ir para o Arquivo", + "watermark.openFile": "Abrir Arquivo", + "watermark.openFolder": "Abrir Pasta", + "watermark.openFileFolder": "Abrir Arquivo ou Pasta", + "watermark.openRecent": "Abrir Recente", + "watermark.newUntitledFile": "Novo Arquivo Sem Título", + "watermark.toggleTerminal": "Alternar Terminal", + "watermark.findInFiles": "Localizar nos Arquivos", + "watermark.startDebugging": "Iniciar Depuração", + "watermark.selectTheme": "Mudar Tema", + "watermark.selectKeymap": "Mudar Mapa de Teclas", + "watermark.keybindingsReference": "Referência de Teclado", + "watermark.openGlobalKeybindings": "Atalhos de Teclado", + "watermark.unboundCommand": "não vinculado", + "workbenchConfigurationTitle": "Área de Trabalho", + "tips.enabled": "Quando habilitado, mostrará as dicas de marca d'água quando nenhum editor estiver aberto." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json new file mode 100644 index 0000000000000..93d7a695382ad --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomeOverlay.explorer": "Explorador de arquivos", + "welcomeOverlay.search": "Pesquisar em arquivos", + "welcomeOverlay.git": "Gerenciamento de código fonte", + "welcomeOverlay.debug": "Executar e depurar", + "welcomeOverlay.extensions": "Gerenciar extensões", + "welcomeOverlay.problems": "Visualizar erros e avisos", + "welcomeOverlay.commandPalette": "Encontrar e executar todos os comandos", + "welcomeOverlay": "Visão geral da Interface do usuário", + "hideWelcomeOverlay": "Esconder a visão geral da Interface", + "help": "Ajuda" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json new file mode 100644 index 0000000000000..a0b426025a4f2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomePage.vscode": "Visual Studio Code", + "welcomePage.editingEvolved": "Edição evoluiu", + "welcomePage.start": "Início", + "welcomePage.newFile": "Novo arquivo", + "welcomePage.openFolder": "Abrir pasta...", + "welcomePage.cloneGitRepository": "Clonar repositório Git...", + "welcomePage.recent": "Recente", + "welcomePage.moreRecent": "Mais...", + "welcomePage.noRecentFolders": "Não há pastas recentes", + "welcomePage.help": "Ajuda", + "welcomePage.keybindingsCheatsheet": "Folha de dicas de teclado para impressão", + "welcomePage.introductoryVideos": "Vídeos introdutórios", + "welcomePage.productDocumentation": "Documentação do produto", + "welcomePage.gitHubRepository": "Repositório GitHub", + "welcomePage.stackOverflow": "Stack Overflow", + "welcomePage.showOnStartup": "Mostrar a página de boas-vindas na inicialização", + "welcomePage.customize": "Personalizar", + "welcomePage.installExtensionPacks": "Ferramentas e linguagens", + "welcomePage.installExtensionPacksDescription": "Instalar o suporte para {0} e {1}", + "welcomePage.moreExtensions": "mais", + "welcomePage.installKeymapDescription": "Instalar atalhos de teclado", + "welcomePage.installKeymapExtension": "Instalar os atalhos de teclado de {0} e {1}", + "welcomePage.others": "outros", + "welcomePage.colorTheme": "Tema de cores", + "welcomePage.colorThemeDescription": "Fazer o editor e seu código parecer do jeito que você gosta", + "welcomePage.learn": "Aprender", + "welcomePage.showCommands": "Encontrar e executar todos os comandos", + "welcomePage.showCommandsDescription": "Comandos de rápido acesso e de pesquisar do painel de controle ({0})", + "welcomePage.interfaceOverview": "Visão geral da interface", + "welcomePage.interfaceOverviewDescription": "Obter uma sobreposição visual, destacando os principais componentes da interface do usuário", + "welcomePage.interactivePlayground": "Playground interativo", + "welcomePage.interactivePlaygroundDescription": "Experimente as características essenciais do editor em um curto passo-a-passo", + "welcomePage.quickLinks": "Links rápidos", + "welcomePage.keybindingsReference": "Referência de atalhos de teclado", + "welcomePage.keybindingsReferenceDescription": "Um PDF para impressão com os atalhos de teclado mais comuns", + "welcomePage.configureSettings": "Configurar definições", + "welcomePage.configureSettingsDescription": "Desbloquear o poder completo do VS Coda ajustando as configurações" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json new file mode 100644 index 0000000000000..7012e078815e6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbenchConfigurationTitle": "Área de Trabalho", + "welcomePage.enabled": "Quando habilitado, irá mostrar a página de boas-vindas na inicialização.", + "help": "Ajuda" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json new file mode 100644 index 0000000000000..2975525979495 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomePage": "Bem-vindo", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "Suporte para {0} já está instalado.", + "welcomePage.willReloadAfterInstallingExtensionPack": "A janela irá recarregar depois de instalar o suporte para {0}.", + "welcomePage.installingExtensionPack": "Instalar o suporte para {0}...", + "welcomePage.extensionPackNotFound": "Suporte para {0} com o id {1} não pôde ser encontrado.", + "welcomePage.keymapAlreadyInstalled": "Os atalhos de teclado de {0} já estão instalados.", + "welcomePage.willReloadAfterInstallingKeymap": "A janela irá recarregar depois de instalar os {0} atalhos de teclado.", + "welcomePage.installingKeymap": "Instalando os {0} atalhos de teclado...", + "welcomePage.keymapNotFound": "Os {0} atalhos de teclado com o id {1} não podem ser encontrados.", + "welcome.title": "Bem-vindo", + "welcomePage.extensionListSeparator": ", ", + "welcomePage.installedExtension": "{0} (instalado)", + "ok": "OK", + "cancel": "Cancelar", + "welcomePage.quickLinkBackground": "Cor de fundo para as ligações rápidas na página de boas-vindas.", + "welcomePage.quickLinkHoverBackground": "Passar sobre a cor de fundo para as ligações rápidas na página de boas-vindas." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json new file mode 100644 index 0000000000000..9c7c7f681fa23 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorWalkThrough": "Playground Interativo", + "editorWalkThrough.title": "Playground Interativo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json new file mode 100644 index 0000000000000..a789ae1c81fd4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "walkThrough.editor.label": "Playground Interativo", + "help": "Ajuda", + "interactivePlayground": "Playground Interativo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json new file mode 100644 index 0000000000000..697623110b08d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorWalkThrough.arrowUp": "Rolar para Cima (Linha)", + "editorWalkThrough.arrowDown": "Rolar para Baixo (Linha)", + "editorWalkThrough.pageUp": "Rolar para Cima (Página)", + "editorWalkThrough.pageDown": "Rolar para Baixo (Página)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json new file mode 100644 index 0000000000000..4131ebae487a7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "walkThrough.unboundCommand": "não vinculado", + "walkThrough.gitNotFound": "Parece que o Git não está instalado no seu sistema.", + "walkThrough.embeddedEditorBackground": "Cor de fundo para os editores incorporados no Playground Interativo." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/ptb/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json new file mode 100644 index 0000000000000..188ab8da37e69 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "open": "Abrir configurações", + "close": "Fechar", + "saveAndRetry": "Salvar as configurações e tentar novamente", + "errorUnknownKey": "Não é possível gravar no arquivo de configuração (chave desconhecida)", + "errorInvalidTarget": "Não é possível gravar no arquivo de configuração (destino inválido)", + "errorNoWorkspaceOpened": "Não é possível gravar em configurações porque nenhuma pasta está aberta. Por favor, abra uma pasta primeiro e tente novamente.", + "errorInvalidConfiguration": "Não é possível gravar em configurações. Por favor abra **User Settings** para corrigir erros/avisos no arquivo e tente novamente.", + "errorInvalidConfigurationWorkspace": "Não é possível gravar em configurações. Por favor abra **Workspace Settings** para corrigir erros/avisos no arquivo e tente novamente.", + "errorConfigurationFileDirty": "Não é possível gravar em configurações, porque o arquivo foi alterado. Por favor, salve o arquivo **User Settings** e tente novamente.", + "errorConfigurationFileDirtyWorkspace": "Não é possível gravar em configurações, porque o arquivo foi alterado. Por favor, salve o arquivo **Workspace Settings** e tente novamente." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/editor/browser/editorService.i18n.json b/i18n/ptb/src/vs/workbench/services/editor/browser/editorService.i18n.json new file mode 100644 index 0000000000000..50e968f8ee37e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/editor/browser/editorService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "compareLabels": "{0} ↔ {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/files/electron-browser/fileService.i18n.json b/i18n/ptb/src/vs/workbench/services/files/electron-browser/fileService.i18n.json new file mode 100644 index 0000000000000..49e9152a1dbee --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/files/electron-browser/fileService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "netVersionError": "O Microsoft .NET Framework 4.5 é necessário. Por favor siga o link para instalá-lo.", + "installNet": "Baixar o .NET Framework 4.5", + "neverShowAgain": "Não mostrar novamente", + "trashFailed": "Falha em mover '{0}' para a lixeira" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/ptb/src/vs/workbench/services/files/node/fileService.i18n.json new file mode 100644 index 0000000000000..b84feecdb4fb3 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/files/node/fileService.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInvalidPath": "Recurso de arquivo inválido ({0})", + "fileIsDirectoryError": "Arquivo é diretório ({0})", + "fileBinaryError": "Arquivo parece ser binário e não pode ser aberto como texto", + "fileNotFoundError": "Arquivo não encontrado ({0})", + "unableToMoveCopyError": "Não é possível mover/copiar. Arquivo poderia substituir a pasta em que está contida.", + "foldersCopyError": "Pastas não podem ser copiadas para a área de trabalho. Por favor selecione arquivos individuais para serem copiados.", + "fileReadOnlyError": "Arquivo é Somente Leitura" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json b/i18n/ptb/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json new file mode 100644 index 0000000000000..daa32f59ee979 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "errorKeybindingsFileDirty": "Não é possível gravar porque o arquivo está sujo. Por favor, salve o arquivo **Keybindings** e tente novamente.", + "parseErrors": "Não é possível gravar as combinações de teclas. Por favor abra o **arquivo Keybindings** para corrigir erros/avisos no arquivo e tente novamente.", + "errorInvalidConfiguration": "Não é possível gravar as combinações de teclas. **Arquivo Keybindings** tem um objeto que não é do tipo Matriz. Por favor, abra o arquivo para limpar e tentar novamente.", + "emptyKeybindingsHeader": "Coloque suas combinações de teclas neste arquivo para substituir os padrões" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/ptb/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json new file mode 100644 index 0000000000000..2fac75a567551 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "nonempty": "Esperado um valor não vazio", + "requirestring": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "optstring": "a propriedade `{0}` é opcional ou pode ser do tipo `string`", + "vscode.extension.contributes.keybindings.command": "Identificador do comando a ser executado quando keybinding é acionado.", + "vscode.extension.contributes.keybindings.key": "Tecla ou sequência de teclas (teclas separadas com o sinal de adição e sequências com espaço, por exemplo Ctrl+O e Ctrl+L L para um acorde", + "vscode.extension.contributes.keybindings.mac": "Chave específica Mac ou sequência de teclas.", + "vscode.extension.contributes.keybindings.linux": "Chave específica Linux ou sequência de teclas.", + "vscode.extension.contributes.keybindings.win": "Chave específica Windows ou sequência de teclas.", + "vscode.extension.contributes.keybindings.when": "Condição quando a chave está ativa.", + "vscode.extension.contributes.keybindings": "Contribui para Atalhos de Teclado.", + "invalid.keybindings": "Inválido `contributes.{0}`: {1}", + "unboundCommands": "Aqui estão outros comandos disponíveis: ", + "keybindings.json.title": "Configuração de combinações de teclas", + "keybindings.json.key": "Tecla ou sequência de teclas (separados por espaço)", + "keybindings.json.command": "Nome do comando a ser executado", + "keybindings.json.when": "Condição quando a chave está ativa.", + "keybindings.json.args": "Argumentos a serem passados para o comando para executar.", + "keyboardConfigurationTitle": "Teclado", + "dispatch": "Controla a lógica de expedição para pressionamentos de teclas para usar `keydown.code` (recomendado) ou 'keydown.keyCode'." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/message/browser/messageList.i18n.json b/i18n/ptb/src/vs/workbench/services/message/browser/messageList.i18n.json new file mode 100644 index 0000000000000..267b62d179d2a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/message/browser/messageList.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "alertErrorMessage": "Erro: {0}", + "alertWarningMessage": "Aviso: {0}", + "alertInfoMessage": "Informações: {0}", + "error": "Erro", + "warning": "Aviso", + "info": "Informações", + "close": "Fechar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/message/electron-browser/messageService.i18n.json b/i18n/ptb/src/vs/workbench/services/message/electron-browser/messageService.i18n.json new file mode 100644 index 0000000000000..cecec4b4c3aab --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/message/electron-browser/messageService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yesButton": "&&Sim", + "cancelButton": "Cancelar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/ptb/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json new file mode 100644 index 0000000000000..91df655432d4f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid": "Inválido 'contributes.{0}`. Matriz esperada.", + "invalid.empty": "Valor em branco para` contributes.{0}`", + "require.id": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "opt.extensions": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string[]`", + "opt.filenames": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string[]`", + "opt.firstLine": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string`", + "opt.configuration": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string`", + "opt.aliases": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string[]`", + "opt.mimetypes": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string[]`" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json b/i18n/ptb/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json new file mode 100644 index 0000000000000..7eed5484379af --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "saveFileFirst": "O arquivo está alterado. Por favor, salvá-lo primeiro antes reabri-lo com outra codificação.", + "genericSaveError": "Erro ao salvar '{0}': {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/ptb/src/vs/workbench/services/textfile/common/textFileService.i18n.json new file mode 100644 index 0000000000000..9fe74ad26f3aa --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "files.backup.failSave": "Arquivos não poderiam ser backupeados (erro: {0}), tente salvar seus arquivos para sair." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json b/i18n/ptb/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json new file mode 100644 index 0000000000000..491b19e87c4ef --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "saveChangesMessage": "Você quer salvar as alterações feitas para {0}?", + "saveChangesMessages": "Você quer salvar as alterações para os seguintes {0} arquivos?", + "moreFile": "... 1 arquivo adicional não está mostrado", + "moreFiles": "... {0} arquivos adicionais não estão mostrados", + "saveAll": "&&Salvar tudo", + "save": "&&Salvar", + "dontSave": "&&Não Salvar", + "cancel": "Cancelar", + "saveChangesDetail": "Suas alterações serão perdidas se você não salvá-las.", + "allFiles": "Todos os arquivos", + "noExt": "Sem extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/ptb/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json new file mode 100644 index 0000000000000..02e2bc182734b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "schema.colors": "Cores para o realce de sintaxe", + "schema.properties.name": "Descrição da regra", + "schema.fontStyle": "Estilo da fonte da regra: um estilo ou uma combinação de 'itálico', 'negrito' e 'sublinhado'", + "schema.tokenColors.path": "Caminho para um arquivo tmTheme (relativo ao arquivo atual)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json b/i18n/ptb/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json new file mode 100644 index 0000000000000..3cf20c82de2cb --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "schema.folderExpanded": "O ícone de pasta para pastas expandidas. O ícone da pasta expandido é opcional. Se não definido, o ícone definido para a pasta será mostrado.", + "schema.folder": "O ícone de pasta para pastas colapsadas, e se folderExpanded não estiver definido, também para pastas expandidas.", + "schema.file": "O ícone de arquivo padrão, indicado para todos os arquivos que não correspondem a qualquer extensão, nome de arquivo ou idioma.", + "schema.folderNames": "Associa os nomes de pasta à ícones. A chave do objeto é o nome da pasta, não incluindo quaisquer segmentos de caminho. Nenhum padrão ou curinga são permitidos. O nome da pasta de correspondência diferencia maiusculas de minúsculas.", + "schema.folderName": "A ID da definição do ícone para associação.", + "schema.folderNamesExpanded": "Associa os nomes de pasta a ícones para pastas expandidas. A chave do objeto é o nome da pasta, não incluindo quaisquer segmentos do caminho. Padrões ou curingas não são permitidas. A correspondência do nome de pastas não diferencia maiusculas de minúsculas.", + "schema.folderNameExpanded": "A ID da definição do ícone para a associação.", + "schema.fileExtensions": "Associa as extensões de arquivo aos ícones. A chave do objeto é o nome da extensão do arquivo. O nome da extensão é o último segmento de um nome de arquivo após o último ponto (não incluindo o ponto). As extensões não diferenciam maiúsculas de minúsculas.", + "schema.fileExtension": "A ID da definição do ícone para a associação.", + "schema.fileNames": "Associa os nomes de arquivo à ícones. A chave do objeto é o nome completo do arquivo, mas não incluindo quaisquer segmentos do caminho. O nome do arquivo pode incluir pontos e uma extensão de arquivo. Nenhum padrão ou curinga é permitido. A correspondência de nome de arquivo não diferencia maiúsculas de minúsculas.", + "schema.fileName": "A ID da definição do ícone para a associação.", + "schema.languageIds": "Associa idiomas a ícones. A chave do objeto é o id de idioma definido no ponto de contribuição de linguagem.", + "schema.languageId": "O ID da definição do ícone para a associação.", + "schema.fonts": "Fontes que são usadas nas definições de ícone.", + "schema.id": "O ID da fonte.", + "schema.src": "A localização da fonte.", + "schema.font-path": "O caminho do fonte, relativo ao arquivo de tema de ícone atual.", + "schema.font-format": "O formato da fonte.", + "schema.font-weight": "O peso da fonte.", + "schema.font-sstyle": "O estilo da fonte.", + "schema.font-size": "O tamanho padrão da fonte.", + "schema.iconDefinitions": "Descrição de todos os ícones que podem ser usados quando associar arquivos de ícones.", + "schema.iconDefinition": "Uma definição de ícone. A chave do objeto é o ID da definição.", + "schema.iconPath": "Ao usar um SVG ou PNG: O caminho para a imagem. O caminho é relativo ao arquivo de configuração do ícone.", + "schema.fontCharacter": "Ao usar uma fonte glyph: O caractere na fonte para usar.", + "schema.fontColor": "Ao usar uma fonte glyph: A cor a ser utilizada.", + "schema.fontSize": "Quando estiver utilizando uma fonte: O tamanho da fonte em porcentagem para a fonte de texto. Se não for definido, o padrão é o tamanho na definição de fonte.", + "schema.fontId": "Quando estiver utilizando uma fonte: A identificação da fonte. Se não for definido, o padrão é a primeira definição de fonte.", + "schema.light": "Associações opcionais para ícones de arquivo em temas de cor clara.", + "schema.highContrast": "Associações opcionais para ícones de arquivo em temas de alto contraste." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/ptb/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json new file mode 100644 index 0000000000000..4ef6944ba7352 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.cannotparsejson": "Problemas ao analisar o arquivo de tema JSON: {0}", + "error.invalidformat.colors": "Problema ao analisar o arquivo de tema de cor: {0}. A propriedade 'colors' não é do tipo 'object'.", + "error.invalidformat.tokenColors": "Problema ao analisar o arquivo de tema de cor: {0}. A propriedade 'tokenColors' deve ser também uma matriz especificando as cores ou um caminho para um arquivo de texto de tema correspondente", + "error.plist.invalidformat": "Problema ao analisar o arquivo tmTheme: {0}. 'settings' não é uma matriz.", + "error.cannotparse": "Problemas ao analisar o arquivo tmTheme: {0}", + "error.cannotload": "Problemas ao carregar o arquivo tmTheme {0}: {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/ptb/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json new file mode 100644 index 0000000000000..caeea848338aa --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.themes": "Contribui com temas de cores do textmate.", + "vscode.extension.contributes.themes.id": "ID do tema do ícone conforme usado em configurações do usuário.", + "vscode.extension.contributes.themes.label": "Etiqueta da cor do tema como mostrado na interface do usuário.", + "vscode.extension.contributes.themes.uiTheme": "Tema base de definição das cores do editor: 'vs' é o tema de cor clara, 'vs-dark' é o tema de cor escura. 'hc preto' é o tema escuro de alto contraste.", + "vscode.extension.contributes.themes.path": "Caminho do arquivo tmTheme. O caminho é relativo à pasta de extensão e é normalmente './themes/themeFile.tmTheme'.", + "vscode.extension.contributes.iconThemes": "Contribui com temas de ícones de arquivo.", + "vscode.extension.contributes.iconThemes.id": "ID do tema do ícone como usado em configurações do usuário.", + "vscode.extension.contributes.iconThemes.label": "Etiqueta do tema do ícone como mostrado na interface do usuário.", + "vscode.extension.contributes.iconThemes.path": "Caminho do arquivo de definição do tema do ícone. O caminho é relativo à pasta de extensão e é normalmente './icons/awesome-icon-theme.json'.", + "migration.completed": "Foram adicionadas novas configurações de tema para as configurações de usuário. Backup está disponível em {0}.", + "error.cannotloadtheme": "Não é possível carregar {0}: {1}", + "reqarray": "Ponto de extensão '{0}' deve ser uma matriz.", + "reqpath": "Esperada uma string em `contributes.{0}.path`. Valor informado: {1}", + "invalid.path.1": "É esperado que `contributes.{0}.path` ({1}) seja incluído na pasta da extensão ({2}). Isto pode tornar a extensão não portável.", + "reqid": "Esperada sequência em 'contributes.{0}.ID'. Valor fornecido: {1}", + "error.cannotloadicontheme": "Não é possível carregar {0}", + "error.cannotparseicontheme": "Problemas de análise do arquivo de ícones: {0}", + "colorTheme": "Especifica o tema de cores usado no espaço de trabalho.", + "colorThemeError": "Tema é desconhecido ou não está instalado.", + "iconTheme": "Especifica o tema de ícone usado no espaço de trabalho.", + "noIconThemeDesc": "Nenhum arquivo de ícones", + "iconThemeError": "Arquivo de tema de ícones é desconhecido ou não está instalado.", + "workbenchColors": "Substitui as cores do tema do tema de cores atualmente selecionado.", + "workbenchColors.deprecated": "A configuração não é mais experimental e foi renomeada para 'workbench.colorCustomizations'", + "workbenchColors.deprecatedDescription": "Use 'workbench.colorCustomizations'" +} \ No newline at end of file diff --git a/i18n/rus/extensions/markdown/out/extension.i18n.json b/i18n/rus/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/rus/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/rus/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/rus/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/extensions/merge-conflict/package.i18n.json b/i18n/rus/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/extensions/npm/package.i18n.json b/i18n/rus/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/rus/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index af5b0c29d70d2..32fb4e4b4cd18 100644 --- a/i18n/rus/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/rus/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "Изображение слишком велико для отображения в редакторе. ", - "resourceOpenExternalButton": "Открыть изображение", - "resourceOpenExternalText": " с помощью внешней программы?", "nativeBinaryError": "Файл не будет отображен в редакторе, так как он двоичный, очень большой или использует неподдерживаемую кодировку текста.", "sizeB": "{0} Б", "sizeKB": "{0} КБ", diff --git a/i18n/rus/src/vs/code/electron-main/menus.i18n.json b/i18n/rus/src/vs/code/electron-main/menus.i18n.json index 2caee2db03b5b..68b593f21180e 100644 --- a/i18n/rus/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/rus/src/vs/code/electron-main/menus.i18n.json @@ -14,6 +14,7 @@ "mHelp": "&&Справка", "miNewWindow": "&&Новое окно", "mAbout": "О программе {0}", + "mServices": "Службы", "mHide": "Скрыть {0}", "mHideOthers": "Скрыть другие", "mShowAll": "Показать все", @@ -69,6 +70,7 @@ "miSmartSelectShrink": "&&Сжать выделение", "miViewExplorer": "Проводник", "miViewSearch": "Поиск", + "miViewSCM": "S&&CM", "miViewDebug": "Отладка", "miViewExtensions": "Р&&асширения", "miToggleOutput": "Вывод", diff --git a/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json index 9b6838aa6656d..53078d0a5b6c9 100644 --- a/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -40,7 +40,6 @@ "formatOnType": "Управляет параметром, определяющим, должен ли редактор автоматически форматировать строку после ввода.", "formatOnPaste": "Определяет, будет ли редактор автоматически форматировать вставленное содержимое. Модуль форматирования должен быть доступен и иметь возможность форматировать диапазон в документе.", "suggestOnTriggerCharacters": "Определяет, должны ли при вводе триггерных символов автоматически отображаться предложения.", - "acceptSuggestionOnEnter": "Определяет, будут ли предложения приниматься клавишей ВВОД в дополнение к клавише TAB. Это помогает избежать неоднозначности между вставкой новых строк и принятием предложений.", "acceptSuggestionOnCommitCharacter": "Определяет, будут ли предложения приниматься символами фиксации. Например, в JavaScript точка с запятой (\";\") может быть символом фиксации, принимающим предложение и вводящим данный символ.", "snippetSuggestions": "Управляет отображением фрагментов вместе с другими предложениями и их сортировкой.", "emptySelectionClipboard": "Управляет тем, копируется ли текущая строка при копировании без выделения.", diff --git a/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..e61942e5d18e7 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Определение для \"{0}\" не найдено.", + "generic.noResults": "Определения не найдены.", + "meta.title": " — определения {0}", + "actions.goToDecl.label": "Перейти к определению", + "actions.goToDeclToSide.label": "Открыть определение сбоку", + "actions.previewDecl.label": "Показать определение", + "goToImplementation.noResultWord": "Не найдена реализация для \"{0}\".", + "goToImplementation.generic.noResults": "Не найдена реализация.", + "meta.implementations.title": "— {0} реализаций", + "actions.goToImplementation.label": "Перейти к реализации", + "actions.peekImplementation.label": "Показать реализацию", + "goToTypeDefinition.noResultWord": "Не найдено определение типа для \"{0}\".", + "goToTypeDefinition.generic.noResults": "Не найдено определение типа.", + "meta.typeDefinitions.title": "— {0} определений типов", + "actions.goToTypeDefinition.label": "Перейти к определению типа", + "actions.peekTypeDefinition.label": "Показать определение типа" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..a403ef380f2f7 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Щелкните, чтобы отобразить определения ({0})." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json index ff2b65c8faba0..f2bd599c1b9df 100644 --- a/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "Просмотреть", "help": "Справка", "file": "Файл", + "developer": "Разработчик", "showEditorTabs": "Определяет, должны ли открытые редакторы отображаться на вкладках или нет.", "editorTabCloseButton": "Определяет положение кнопок закрытия вкладок редактора или отключает их, если задано значение off.", "showIcons": "Определяет, должны ли открытые редакторы отображаться со значком. Требует включить тему значков.", diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..906d10fee6b4b 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "Отключить другие раскладки клавиатуры, чтобы избежать конфликта между настраиваемыми сочетаниями клавиш?", + "yes": "Да", + "no": "Нет" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 952d7106938fb..6c404cd1796be 100644 --- a/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "Настройте сопоставления файлов с языками (например, \"*.extension\": \"html\"). У них будет приоритет перед заданными по умолчанию сопоставлениями установленных языков.", "encoding": "Кодировка набора символов по умолчанию, используемая при чтении и записи файлов", "autoGuessEncoding": "Если параметр включен, производится попытка определить кодировку набора символов при открытии файлов", - "eol": "Символ конца строки по умолчанию.", "trimTrailingWhitespace": "Если этот параметр включен, при сохранении файла будут удалены концевые пробелы.", "insertFinalNewline": "Если этот параметр включен, при сохранении файла в его конец вставляется финальная новая строка.", "files.autoSave.off": "\"Грязный\" файл не сохраняется автоматически.", diff --git a/i18n/rus/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index ef99a2ea9f3d3..5ac046256bd5e 100644 --- a/i18n/rus/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,9 @@ // Do not edit this file. It is machine generated. { "slow": "Обнаружен замедленный запуск.", - "slow.detail": "Сожалеем, что у вас произошел замедленный запуск. Перезапустите \"{0}\" с включенным профилированием и отправьте профили нам, чтобы мы могли ускорить загрузку." + "slow.detail": "Сожалеем, что у вас произошел замедленный запуск. Перезапустите \"{0}\" с включенным профилированием и отправьте профили нам, чтобы мы могли ускорить загрузку.", + "prof.message": "Профили успешно созданы.", + "prof.detail": "Создайте проблему и вручную вложите следующие файлы:\n{0}", + "prof.restartAndFileIssue": "Создать проблему и выполнить перезапуск", + "prof.restart": "Перезапустить" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 901720ad5ddfc..1365e07209bb0 100644 --- a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,6 +5,11 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Добро пожаловать", + "welcomePage.typeScript": "TypeScript", + "welcomePage.php": "PHP", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", "welcomePage.keymapAlreadyInstalled": "Сочетания клавиш {0} уже установлены.", "welcomePage.willReloadAfterInstallingKeymap": "Окно перезагрузится после установки сочетаний клавиш {0}.", "welcomePage.installingKeymap": "Устанавливаются сочетания клавиш {0}...", From 84ced6126ea370a757fbff264f106af319029257 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 25 May 2017 08:05:53 +0200 Subject: [PATCH 1039/2747] theming - remove hardcoded list color in keybindings editor --- .../browser/media/keybindingsEditor.css | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css b/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css index 29b4fe0a8d134..9932877ef4d89 100644 --- a/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css +++ b/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css @@ -68,20 +68,6 @@ display: flex; } -.keybindings-editor > .keybindings-body .keybindings-list-container .monaco-list-row.keybindings-list-header.focused, -.keybindings-editor > .keybindings-body .keybindings-list-container .monaco-list-row.keybindings-list-header.selected, -.keybindings-editor > .keybindings-body .keybindings-list-container .monaco-list-row.keybindings-list-header:hover, -.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row.keybindings-list-header, -.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row.even:not(.focused):not(.selected):not(:hover), -.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:not(:focus) .monaco-list-row.focused.even:not(.selected):not(:hover), -.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:not(.focused) .monaco-list-row.focused.even:not(.selected):not(:hover) { - background-color: rgba(130, 130, 130, 0.04); -} - -.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row:hover { - background-color: rgba(128, 128, 128, 0.15); -} - .keybindings-editor > .keybindings-body .keybindings-list-container .monaco-list-row > .header { text-align: left; font-weight: bold; From 145310aea5e41c6af8de4aaf7910bdb90f0e4fea Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 08:44:16 +0200 Subject: [PATCH 1040/2747] [lua] update grammar --- extensions/lua/syntaxes/lua.json | 148 ++++++++++++++---- .../lua/test/colorize-results/test_lua.json | 32 +--- 2 files changed, 123 insertions(+), 57 deletions(-) diff --git a/extensions/lua/syntaxes/lua.json b/extensions/lua/syntaxes/lua.json index 0bde9524ea490..a4da3a43c6a1f 100644 --- a/extensions/lua/syntaxes/lua.json +++ b/extensions/lua/syntaxes/lua.json @@ -1,39 +1,61 @@ { "comment": "Lua Syntax: version 0.8", "fileTypes": [ - "lua" + "lua", + "p8", + "rockspec", + "luacheckrc", + "lakefile" ], - "firstLineMatch": "\\A#!.*?\\blua\\b", + "firstLineMatch": "\\A#!.*?\\blua(\\d+(\\.\\d+)?)?\\b|\\A--\\s+-\\*-\\s*lua\\s*-\\*-", "keyEquivalent": "^~L", "name": "Lua", "patterns": [ { - "captures": { + "begin": "\\b((local\\b)\\s+)?(function)\\s*(\\s+[a-zA-Z_][a-zA-Z0-9_]*(\\.[a-zA-Z_][a-zA-Z0-9_]*)*(:[a-zA-Z_][a-zA-Z0-9_]*)?\\s*)?(\\()", + "beginCaptures": { "1": { - "name": "keyword.control.lua" - }, - "2": { - "name": "entity.name.function.scope.lua" + "name": "storage.modifier.local.lua" }, "3": { - "name": "entity.name.function.lua" + "name": "keyword.control.lua" }, "4": { - "name": "punctuation.definition.parameters.begin.lua" + "name": "entity.name.function.lua" }, "5": { - "name": "variable.parameter.function.lua" - }, - "6": { + "name": "punctuation.definition.parameters.begin.lua" + } + }, + "end": "\\)", + "endCaptures": { + "0": { "name": "punctuation.definition.parameters.end.lua" } }, - "match": "\\b(function)(?:\\s+([a-zA-Z_.:]+[.:])?([a-zA-Z_]\\w*)\\s*)?(\\()([^)]*)(\\))", - "name": "meta.function.lua" + "name": "meta.function.lua", + "patterns": [ + { + "match": "[a-zA-Z_][a-zA-Z0-9_]*", + "name": "variable.parameter.function.lua" + } + ] + }, + { + "match": "(? Date: Thu, 25 May 2017 09:18:28 +0200 Subject: [PATCH 1041/2747] Allow to contribute actions to other quick open handlers (fixes #27197) --- src/vs/workbench/parts/tasks/browser/quickOpen.ts | 6 +++--- .../tasks/electron-browser/media/configure-inverse.svg | 1 + .../parts/tasks/electron-browser/media/configure.svg | 1 + .../tasks/electron-browser/media/task.contribution.css | 9 +++++++++ 4 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 src/vs/workbench/parts/tasks/electron-browser/media/configure-inverse.svg create mode 100644 src/vs/workbench/parts/tasks/electron-browser/media/configure.svg diff --git a/src/vs/workbench/parts/tasks/browser/quickOpen.ts b/src/vs/workbench/parts/tasks/browser/quickOpen.ts index 754d5756a22a3..6c9afcd0b74dd 100644 --- a/src/vs/workbench/parts/tasks/browser/quickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/quickOpen.ts @@ -15,7 +15,7 @@ import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { Task, TaskSourceKind } from 'vs/workbench/parts/tasks/common/tasks'; import { ITaskService } from 'vs/workbench/parts/tasks/common/taskService'; -import { ActionBarContributor } from 'vs/workbench/browser/actionBarRegistry'; +import { ActionBarContributor, ContributableActionProvider } from 'vs/workbench/browser/actionBarRegistry'; export class TaskEntry extends Model.QuickOpenEntry { @@ -105,7 +105,7 @@ export abstract class QuickOpenHandler extends Quickopen.QuickOpenHandler { entries.push(this.createEntry(this.taskService, task, highlights)); } } - return new Model.QuickOpenModel(entries); + return new Model.QuickOpenModel(entries, new ContributableActionProvider()); }); } @@ -131,7 +131,7 @@ class CustomizeTaskAction extends Action { } public updateClass(): void { - this.class = 'quick-open-sidebyside-vertical'; + this.class = 'quick-open-task-configure'; } public run(context: any): TPromise { diff --git a/src/vs/workbench/parts/tasks/electron-browser/media/configure-inverse.svg b/src/vs/workbench/parts/tasks/electron-browser/media/configure-inverse.svg new file mode 100644 index 0000000000000..61baaea2b8b21 --- /dev/null +++ b/src/vs/workbench/parts/tasks/electron-browser/media/configure-inverse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/parts/tasks/electron-browser/media/configure.svg b/src/vs/workbench/parts/tasks/electron-browser/media/configure.svg new file mode 100644 index 0000000000000..3dec2ba50fd1a --- /dev/null +++ b/src/vs/workbench/parts/tasks/electron-browser/media/configure.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/parts/tasks/electron-browser/media/task.contribution.css b/src/vs/workbench/parts/tasks/electron-browser/media/task.contribution.css index 6b1d8221b62e1..f8b7e9e67e553 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/media/task.contribution.css +++ b/src/vs/workbench/parts/tasks/electron-browser/media/task.contribution.css @@ -60,4 +60,13 @@ .task-statusbar-item-label > .task-statusbar-item-label-info { -webkit-mask: url('status-info.svg') no-repeat 50% 50%; -webkit-mask-size: 11px; +} + +.monaco-workbench .quick-open-task-configure { + background-image: url('configure.svg'); +} + +.vs-dark .monaco-workbench .quick-open-task-configure, +.hc-black .monaco-workbench .quick-open-task-configure { + background-image: url('configure-inverse.svg'); } \ No newline at end of file From 561110831b9d64440b27091f996cacd85b009a39 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 25 May 2017 09:44:01 +0200 Subject: [PATCH 1042/2747] How to configure a window (also for reload case)? (fixes #27192) --- src/vs/code/electron-main/menus.ts | 20 +++++- src/vs/code/electron-main/window.ts | 10 +-- src/vs/code/electron-main/windows.ts | 84 +---------------------- src/vs/code/node/keyboard.ts | 70 +++++++++++++++++++ src/vs/workbench/electron-browser/main.ts | 10 ++- 5 files changed, 100 insertions(+), 94 deletions(-) create mode 100644 src/vs/code/node/keyboard.ts diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 91ccab243c9fc..249722e754c0b 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -9,7 +9,7 @@ import * as nls from 'vs/nls'; import { isMacintosh, isLinux, isWindows, language } from 'vs/base/common/platform'; import * as arrays from 'vs/base/common/arrays'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { ipcMain as ipc, app, shell, dialog, Menu, MenuItem } from 'electron'; +import { ipcMain as ipc, app, shell, dialog, Menu, MenuItem, BrowserWindow } from 'electron'; import { OpenContext } from 'vs/code/common/windows'; import { IWindowsMainService } from 'vs/code/electron-main/windows'; import { VSCodeWindow } from 'vs/code/electron-main/window'; @@ -908,7 +908,7 @@ export class VSCodeMenu { label: this.mnemonicLabel(nls.localize({ key: 'miAccessibilityOptions', comment: ['&& denotes a mnemonic'] }, "Accessibility &&Options")), accelerator: null, click: () => { - this.windowsService.openAccessibilityOptions(); + this.openAccessibilityOptions(); } }, false)); @@ -974,6 +974,22 @@ export class VSCodeMenu { } } + private openAccessibilityOptions(): void { + let win = new BrowserWindow({ + alwaysOnTop: true, + skipTaskbar: true, + resizable: false, + width: 450, + height: 300, + show: true, + title: nls.localize('accessibilityOptionsWindowTitle', "Accessibility Options") + }); + + win.setMenuBarVisibility(false); + + win.loadURL('chrome://accessibility'); + } + private getUpdateMenuItems(): Electron.MenuItem[] { switch (this.updateService.state) { case UpdateState.Uninitialized: diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 7cd1f6470833f..4b1840c8642dc 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -22,7 +22,7 @@ import product from 'vs/platform/node/product'; import { getCommonHTTPHeaders } from 'vs/platform/environment/node/http'; import { IWindowSettings, MenuBarVisibility } from 'vs/platform/windows/common/windows'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; - +import { KeyboardLayoutMonitor } from "vs/code/node/keyboard"; export interface IWindowState { width?: number; @@ -82,10 +82,7 @@ export interface IWindowConfiguration extends ParsedArgs { * The physical keyboard is of ISO type (on OSX). */ isISOKeyboard?: boolean; - /** - * Accessibility support is enabled. - */ - accessibilitySupportEnabled?: boolean; + zoomLevel?: number; fullscreen?: boolean; highContrast?: boolean; @@ -558,6 +555,9 @@ export class VSCodeWindow { windowConfiguration.highContrast = platform.isWindows && systemPreferences.isInvertedColorScheme() && (!windowConfig || windowConfig.autoDetectHighContrast); windowConfiguration.accessibilitySupport = app.isAccessibilitySupportEnabled(); + // Set Keyboard Config + windowConfiguration.isISOKeyboard = KeyboardLayoutMonitor.INSTANCE.isISOKeyboard(); + // Theme windowConfiguration.baseTheme = this.getBaseTheme(); windowConfiguration.backgroundColor = this.getBackgroundColor(); diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 72d1091e19642..b4324486c62b6 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -31,8 +31,7 @@ import product from 'vs/platform/node/product'; import { OpenContext } from 'vs/code/common/windows'; import { ITelemetryService, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; import { isParent, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; -import * as nativeKeymap from 'native-keymap'; -import { IDisposable } from 'vs/base/common/lifecycle'; +import { KeyboardLayoutMonitor } from "vs/code/node/keyboard"; enum WindowError { UNRESPONSIVE, @@ -107,7 +106,6 @@ export interface IWindowsMainService { openFileFolderPicker(forceNewWindow?: boolean, data?: ITelemetryData): void; openFilePicker(forceNewWindow?: boolean, path?: string, window?: VSCodeWindow, data?: ITelemetryData): void; openFolderPicker(forceNewWindow?: boolean, window?: VSCodeWindow, data?: ITelemetryData): void; - openAccessibilityOptions(): void; focusLastActive(cli: ParsedArgs, context: OpenContext): VSCodeWindow; getLastActiveWindow(): VSCodeWindow; findWindow(workspacePath: string, filePath?: string, extensionDevelopmentPath?: string): VSCodeWindow; @@ -343,6 +341,7 @@ export class WindowsManager implements IWindowsMainService { } private onBroadcast(event: string, payload: any): void { + // Theme changes if (event === 'vscode:changeColorTheme' && typeof payload === 'string') { @@ -737,8 +736,6 @@ export class WindowsManager implements IWindowsMainService { configuration.filesToCreate = filesToCreate; configuration.filesToDiff = filesToDiff; configuration.nodeCachedDataDir = this.environmentService.nodeCachedDataDir; - configuration.isISOKeyboard = KeyboardLayoutMonitor.INSTANCE.isISOKeyboard(); - configuration.accessibilitySupportEnabled = app.isAccessibilitySupportEnabled(); return configuration; } @@ -1028,22 +1025,6 @@ export class WindowsManager implements IWindowsMainService { this.doPickAndOpen({ pickFolders: true, forceNewWindow, window }, 'openFolder', data); } - public openAccessibilityOptions(): void { - let win = new BrowserWindow({ - alwaysOnTop: true, - skipTaskbar: true, - resizable: false, - width: 450, - height: 300, - show: true, - title: nls.localize('accessibilityOptionsWindowTitle', "Accessibility Options") - }); - - win.setMenuBarVisibility(false); - - win.loadURL('chrome://accessibility'); - } - private doPickAndOpen(options: INativeOpenDialogOptions, eventName: string, data?: ITelemetryData): void { this.getFileOrFolderPaths(options, (paths: string[]) => { const nOfPaths = paths ? paths.length : 0; @@ -1338,63 +1319,4 @@ export class WindowsManager implements IWindowsMainService { }, 10 /* delay to unwind callback stack (IPC) */); } } -} - -class KeyboardLayoutMonitor { - - public static INSTANCE = new KeyboardLayoutMonitor(); - - private _emitter: Emitter; - private _registered: boolean; - private _isISOKeyboard: boolean; - - private constructor() { - this._emitter = new Emitter(); - this._registered = false; - this._isISOKeyboard = this._readIsISOKeyboard(); - } - - public onDidChangeKeyboardLayout(callback: (isISOKeyboard: boolean) => void): IDisposable { - if (!this._registered) { - this._registered = true; - - nativeKeymap.onDidChangeKeyboardLayout(() => { - this._emitter.fire(this._isISOKeyboard); - }); - - if (platform.isMacintosh) { - // See https://github.com/Microsoft/vscode/issues/24153 - // On OSX, on ISO keyboards, Chromium swaps the scan codes - // of IntlBackslash and Backquote. - // - // The C++ methods can give the current keyboard type (ISO or not) - // only after a NSEvent was handled. - // - // We therefore poll. - setInterval(() => { - let newValue = this._readIsISOKeyboard(); - if (this._isISOKeyboard === newValue) { - // no change - return; - } - - this._isISOKeyboard = newValue; - this._emitter.fire(this._isISOKeyboard); - - }, 3000); - } - } - return this._emitter.event(callback); - } - - private _readIsISOKeyboard(): boolean { - if (platform.isMacintosh) { - return nativeKeymap.isISOKeyboard(); - } - return false; - } - - public isISOKeyboard(): boolean { - return this._isISOKeyboard; - } -} +} \ No newline at end of file diff --git a/src/vs/code/node/keyboard.ts b/src/vs/code/node/keyboard.ts new file mode 100644 index 0000000000000..d2f968371ef68 --- /dev/null +++ b/src/vs/code/node/keyboard.ts @@ -0,0 +1,70 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as nativeKeymap from 'native-keymap'; +import { IDisposable } from 'vs/base/common/lifecycle'; +import { isMacintosh } from "vs/base/common/platform"; +import { Emitter } from "vs/base/common/event"; + +export class KeyboardLayoutMonitor { + + public static readonly INSTANCE = new KeyboardLayoutMonitor(); + + private _emitter: Emitter; + private _registered: boolean; + private _isISOKeyboard: boolean; + + private constructor() { + this._emitter = new Emitter(); + this._registered = false; + this._isISOKeyboard = this._readIsISOKeyboard(); + } + + public onDidChangeKeyboardLayout(callback: (isISOKeyboard: boolean) => void): IDisposable { + if (!this._registered) { + this._registered = true; + + nativeKeymap.onDidChangeKeyboardLayout(() => { + this._emitter.fire(this._isISOKeyboard); + }); + + if (isMacintosh) { + // See https://github.com/Microsoft/vscode/issues/24153 + // On OSX, on ISO keyboards, Chromium swaps the scan codes + // of IntlBackslash and Backquote. + // + // The C++ methods can give the current keyboard type (ISO or not) + // only after a NSEvent was handled. + // + // We therefore poll. + setInterval(() => { + let newValue = this._readIsISOKeyboard(); + if (this._isISOKeyboard === newValue) { + // no change + return; + } + + this._isISOKeyboard = newValue; + this._emitter.fire(this._isISOKeyboard); + + }, 3000); + } + } + return this._emitter.event(callback); + } + + private _readIsISOKeyboard(): boolean { + if (isMacintosh) { + return nativeKeymap.isISOKeyboard(); + } + return false; + } + + public isISOKeyboard(): boolean { + return this._isISOKeyboard; + } +} diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index fb179f3196cab..b20a6fd422ae3 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -42,10 +42,7 @@ export interface IWindowConfiguration extends ParsedArgs, IOpenFileRequest { */ isISOKeyboard?: boolean; - /** - * Accessibility support is enabled. - */ - accessibilitySupportEnabled?: boolean; + accessibilitySupport?: boolean; appRoot: string; execPath: string; @@ -62,15 +59,16 @@ export function startup(configuration: IWindowConfiguration): TPromise { // Ensure others can listen to zoom level changes browser.setZoomFactor(webFrame.getZoomFactor()); + // See https://github.com/Microsoft/vscode/issues/26151 // Can be trusted because we are not setting it ourselves. - browser.setZoomLevel(webFrame.getZoomLevel(), /*isTrusted*/true); + browser.setZoomLevel(webFrame.getZoomLevel(), true /* isTrusted */); browser.setFullscreen(!!configuration.fullscreen); KeyboardMapperFactory.INSTANCE._onKeyboardLayoutChanged(configuration.isISOKeyboard); - browser.setAccessibilitySupport(configuration.accessibilitySupportEnabled ? platform.AccessibilitySupport.Enabled : platform.AccessibilitySupport.Disabled); + browser.setAccessibilitySupport(configuration.accessibilitySupport ? platform.AccessibilitySupport.Enabled : platform.AccessibilitySupport.Disabled); // Setup Intl comparer.setFileNameComparer(new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' })); From 1d0b00c60ebd2e3513332d5abf5d274bef96fa66 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 25 May 2017 09:53:23 +0200 Subject: [PATCH 1043/2747] linting: convert double quote imports to single quote --- extensions/typescript/src/utils/logger.ts | 2 +- extensions/typescript/src/utils/plugins.ts | 2 +- extensions/typescript/src/utils/telemetry.ts | 2 +- src/vs/base/browser/ui/countBadge/countBadge.ts | 4 ++-- .../base/browser/ui/progressbar/progressbar.ts | 4 ++-- src/vs/base/test/common/json.test.ts | 2 +- src/vs/code/electron-main/window.ts | 2 +- src/vs/code/electron-main/windows.ts | 2 +- src/vs/code/node/keyboard.ts | 4 ++-- .../editor/browser/controller/textAreaHandler.ts | 12 ++++++------ .../editor/browser/controller/textAreaInput.ts | 4 ++-- src/vs/editor/browser/view/viewController.ts | 2 +- src/vs/editor/browser/view/viewImpl.ts | 2 +- .../viewParts/editorScrollbar/editorScrollbar.ts | 2 +- .../editor/browser/viewParts/minimap/minimap.ts | 4 ++-- .../scrollDecoration/scrollDecoration.ts | 4 ++-- src/vs/editor/browser/widget/diffEditorWidget.ts | 2 +- src/vs/editor/common/commonCodeEditor.ts | 4 ++-- src/vs/editor/common/config/fontInfo.ts | 2 +- src/vs/editor/common/controller/accGenerator.ts | 2 +- src/vs/editor/common/controller/coreCommands.ts | 6 +++--- src/vs/editor/common/controller/cursor.ts | 2 +- src/vs/editor/common/controller/cursorCommon.ts | 2 +- .../common/controller/cursorDeleteOperations.ts | 2 +- .../common/controller/cursorTypeOperations.ts | 2 +- .../common/controller/cursorWordOperations.ts | 2 +- src/vs/editor/common/model/textModel.ts | 2 +- src/vs/editor/common/model/textModelSearch.ts | 2 +- .../editor/common/services/modelServiceImpl.ts | 2 +- src/vs/editor/common/standalone/themes.ts | 4 ++-- src/vs/editor/common/view/viewEvents.ts | 2 +- src/vs/editor/common/viewLayout/viewLayout.ts | 2 +- .../common/viewModel/splitLinesCollection.ts | 2 +- src/vs/editor/common/viewModel/viewModel.ts | 6 +++--- src/vs/editor/common/viewModel/viewModelImpl.ts | 2 +- .../bracketMatching/common/bracketMatching.ts | 6 +++--- .../editor/contrib/codelens/browser/codelens.ts | 8 ++++---- .../test/common/lineCommentCommand.test.ts | 6 +++--- src/vs/editor/contrib/dnd/browser/dnd.ts | 2 +- .../editor/contrib/find/common/findController.ts | 2 +- .../contrib/find/common/findDecorations.ts | 2 +- .../contrib/folding/common/foldingModel.ts | 2 +- .../browser/goToDeclarationMouse.ts | 2 +- .../contrib/hover/browser/modesContentHover.ts | 2 +- .../inPlaceReplace/common/inPlaceReplace.ts | 2 +- .../linesOperations/common/linesOperations.ts | 2 +- .../test/common/linesOperations.test.ts | 6 +++--- src/vs/editor/contrib/links/browser/links.ts | 4 ++-- .../contrib/quickOpen/browser/editorQuickOpen.ts | 2 +- .../referenceSearch/browser/referencesWidget.ts | 4 ++-- .../contrib/snippet/browser/snippetSession.ts | 2 +- .../test/browser/snippetController2.old.test.ts | 4 ++-- .../test/browser/snippetController2.test.ts | 2 +- .../snippet/test/browser/snippetSession.test.ts | 2 +- .../wordHighlighter/common/wordHighlighter.ts | 2 +- .../wordOperations/common/wordOperations.ts | 6 +++--- .../test/common/wordOperations.test.ts | 2 +- .../contrib/zoneWidget/browser/zoneWidget.ts | 2 +- src/vs/editor/editor.main.ts | 2 +- .../browser/controller/textAreaState.test.ts | 2 +- .../test/common/commands/commandTestUtils.ts | 2 +- .../test/common/commands/sideEditing.test.ts | 2 +- .../common/config/commonEditorConfig.test.ts | 4 ++-- .../editor/test/common/controller/cursor.test.ts | 10 +++++----- .../common/controller/cursorMoveCommand.test.ts | 2 +- .../test/common/mocks/testConfiguration.ts | 2 +- .../test/common/model/textModelSearch.test.ts | 4 ++-- src/vs/workbench/browser/parts/compositePart.ts | 2 +- .../browser/parts/editor/editorGroupsControl.ts | 2 +- .../browser/parts/editor/webviewEditor.ts | 8 ++++---- .../browser/parts/statusbar/statusbarPart.ts | 2 +- .../workbench/common/editor/rangeDecorations.ts | 2 +- src/vs/workbench/electron-browser/workbench.ts | 8 ++++---- src/vs/workbench/node/extensionPoints.ts | 2 +- .../parts/debug/browser/debugActionItems.ts | 2 +- .../parts/debug/browser/exceptionWidget.ts | 6 +++--- .../electron-browser/debugEditorContribution.ts | 2 +- .../parts/debug/electron-browser/debugHover.ts | 2 +- .../electron-browser/statusbarColorProvider.ts | 2 +- .../actions/expandAbbreviation.ts | 2 +- .../emmet/electron-browser/editorAccessor.ts | 2 +- .../extensions/browser/extensionsActions.ts | 6 +++--- .../parts/feedback/electron-browser/feedback.ts | 6 +++--- .../electron-browser/feedbackStatusbarItem.ts | 2 +- .../parts/files/browser/views/openEditorsView.ts | 2 +- .../parts/markers/browser/markersTreeViewer.ts | 6 +++--- .../preferences/browser/keybindingWidgets.ts | 2 +- .../preferences/browser/keybindingsEditor.ts | 2 +- .../preferences/browser/preferencesEditor.ts | 4 ++-- .../preferences/browser/preferencesRenderers.ts | 2 +- .../preferences/browser/preferencesWidgets.ts | 2 +- .../parts/quickopen/browser/commandsHandler.ts | 2 +- .../scm/electron-browser/dirtydiffDecorator.ts | 10 +++++----- .../parts/search/browser/openFileHandler.ts | 2 +- .../parts/search/browser/searchResultsView.ts | 4 ++-- .../parts/search/browser/searchViewlet.ts | 2 +- src/vs/workbench/parts/search/common/search.ts | 8 ++++---- .../workbench/parts/search/common/searchModel.ts | 2 +- .../snippets/electron-browser/TMSnippets.ts | 2 +- .../electron-browser/terminal.contribution.ts | 2 +- .../electron-browser/terminalConfigHelper.ts | 2 +- .../electron-browser/terminalInstance.ts | 4 ++-- .../terminalConfigHelper.test.ts | 2 +- .../electron-browser/releaseNotesEditor.ts | 2 +- .../editor/test/browser/editorService.test.ts | 2 +- .../themes/electron-browser/colorThemeData.ts | 2 +- .../electron-browser/workbenchThemeService.ts | 2 +- .../test/browser/parts/editor/baseEditor.test.ts | 2 +- .../test/common/editor/editorDiffModel.test.ts | 16 ++++++++-------- 109 files changed, 177 insertions(+), 177 deletions(-) diff --git a/extensions/typescript/src/utils/logger.ts b/extensions/typescript/src/utils/logger.ts index 7f82fb28c96dc..8e31d66d8581a 100644 --- a/extensions/typescript/src/utils/logger.ts +++ b/extensions/typescript/src/utils/logger.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { OutputChannel, window } from "vscode"; +import { OutputChannel, window } from 'vscode'; import * as is from './is'; import * as nls from 'vscode-nls'; diff --git a/extensions/typescript/src/utils/plugins.ts b/extensions/typescript/src/utils/plugins.ts index 49f0d93b4b6c0..23342cc8b3183 100644 --- a/extensions/typescript/src/utils/plugins.ts +++ b/extensions/typescript/src/utils/plugins.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { extensions } from "vscode"; +import { extensions } from 'vscode'; export interface TypeScriptServerPlugin { diff --git a/extensions/typescript/src/utils/telemetry.ts b/extensions/typescript/src/utils/telemetry.ts index 5162a0c24d5e2..b687b11b4ac60 100644 --- a/extensions/typescript/src/utils/telemetry.ts +++ b/extensions/typescript/src/utils/telemetry.ts @@ -5,7 +5,7 @@ import * as path from 'path'; import VsCodeTelemetryReporter from 'vscode-extension-telemetry'; -import { Disposable } from "vscode"; +import { Disposable } from 'vscode'; interface IPackageInfo { diff --git a/src/vs/base/browser/ui/countBadge/countBadge.ts b/src/vs/base/browser/ui/countBadge/countBadge.ts index a7fa56efce851..8ff58693925e5 100644 --- a/src/vs/base/browser/ui/countBadge/countBadge.ts +++ b/src/vs/base/browser/ui/countBadge/countBadge.ts @@ -8,8 +8,8 @@ import 'vs/css!./countBadge'; import { $, append } from 'vs/base/browser/dom'; import { format } from 'vs/base/common/strings'; -import { Color } from "vs/base/common/color"; -import { mixin } from "vs/base/common/objects"; +import { Color } from 'vs/base/common/color'; +import { mixin } from 'vs/base/common/objects'; export interface ICountBadgeOptions extends ICountBadgetyles { count?: number; diff --git a/src/vs/base/browser/ui/progressbar/progressbar.ts b/src/vs/base/browser/ui/progressbar/progressbar.ts index 1287112824b2e..ea34e06e1cbb9 100644 --- a/src/vs/base/browser/ui/progressbar/progressbar.ts +++ b/src/vs/base/browser/ui/progressbar/progressbar.ts @@ -11,8 +11,8 @@ import assert = require('vs/base/common/assert'); import { Builder, $ } from 'vs/base/browser/builder'; import DOM = require('vs/base/browser/dom'); import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { Color } from "vs/base/common/color"; -import { mixin } from "vs/base/common/objects"; +import { Color } from 'vs/base/common/color'; +import { mixin } from 'vs/base/common/objects'; const css_done = 'done'; const css_active = 'active'; diff --git a/src/vs/base/test/common/json.test.ts b/src/vs/base/test/common/json.test.ts index 42a0804c113ae..fe129f08808eb 100644 --- a/src/vs/base/test/common/json.test.ts +++ b/src/vs/base/test/common/json.test.ts @@ -8,7 +8,7 @@ import * as assert from 'assert'; import { SyntaxKind, createScanner, parse, getLocation, Node, ParseError, parseTree, ParseErrorCode, ParseOptions, Segment, findNodeAtLocation, getNodeValue, ScanError } from 'vs/base/common/json'; -import { getParseErrorMessage } from "vs/base/common/jsonErrorMessages"; +import { getParseErrorMessage } from 'vs/base/common/jsonErrorMessages'; function assertKinds(text: string, ...kinds: SyntaxKind[]): void { var scanner = createScanner(text); diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 4b1840c8642dc..91d560b50fdf8 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -22,7 +22,7 @@ import product from 'vs/platform/node/product'; import { getCommonHTTPHeaders } from 'vs/platform/environment/node/http'; import { IWindowSettings, MenuBarVisibility } from 'vs/platform/windows/common/windows'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { KeyboardLayoutMonitor } from "vs/code/node/keyboard"; +import { KeyboardLayoutMonitor } from 'vs/code/node/keyboard'; export interface IWindowState { width?: number; diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index b4324486c62b6..cc0800f25e6cd 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -31,7 +31,7 @@ import product from 'vs/platform/node/product'; import { OpenContext } from 'vs/code/common/windows'; import { ITelemetryService, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; import { isParent, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; -import { KeyboardLayoutMonitor } from "vs/code/node/keyboard"; +import { KeyboardLayoutMonitor } from 'vs/code/node/keyboard'; enum WindowError { UNRESPONSIVE, diff --git a/src/vs/code/node/keyboard.ts b/src/vs/code/node/keyboard.ts index d2f968371ef68..16979fc90c0a8 100644 --- a/src/vs/code/node/keyboard.ts +++ b/src/vs/code/node/keyboard.ts @@ -7,8 +7,8 @@ import * as nativeKeymap from 'native-keymap'; import { IDisposable } from 'vs/base/common/lifecycle'; -import { isMacintosh } from "vs/base/common/platform"; -import { Emitter } from "vs/base/common/event"; +import { isMacintosh } from 'vs/base/common/platform'; +import { Emitter } from 'vs/base/common/event'; export class KeyboardLayoutMonitor { diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index f9ae737307ecb..e927fcb4ab1a7 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -18,12 +18,12 @@ import { HorizontalRange, RenderingContext, RestrictedRenderingContext } from 'v import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; import { ViewController } from 'vs/editor/browser/view/viewController'; -import { EndOfLinePreference } from "vs/editor/common/editorCommon"; -import { IKeyboardEvent } from "vs/base/browser/keyboardEvent"; -import { PartFingerprints, PartFingerprint, ViewPart } from "vs/editor/browser/view/viewPart"; -import { Margin } from "vs/editor/browser/viewParts/margin/margin"; -import { LineNumbersOverlay } from "vs/editor/browser/viewParts/lineNumbers/lineNumbers"; -import { BareFontInfo } from "vs/editor/common/config/fontInfo"; +import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; +import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { PartFingerprints, PartFingerprint, ViewPart } from 'vs/editor/browser/view/viewPart'; +import { Margin } from 'vs/editor/browser/viewParts/margin/margin'; +import { LineNumbersOverlay } from 'vs/editor/browser/viewParts/lineNumbers/lineNumbers'; +import { BareFontInfo } from 'vs/editor/common/config/fontInfo'; export interface ITextAreaHandlerHelper { visibleRangeForPositionRelativeToEditor(lineNumber: number, column: number): HorizontalRange; diff --git a/src/vs/editor/browser/controller/textAreaInput.ts b/src/vs/editor/browser/controller/textAreaInput.ts index 757bbf1dd4149..e1f99b036e89e 100644 --- a/src/vs/editor/browser/controller/textAreaInput.ts +++ b/src/vs/editor/browser/controller/textAreaInput.ts @@ -13,8 +13,8 @@ import { ITypeData, TextAreaState, ITextAreaWrapper } from 'vs/editor/browser/co import * as browser from 'vs/base/browser/browser'; import * as platform from 'vs/base/common/platform'; import * as dom from 'vs/base/browser/dom'; -import { IKeyboardEvent } from "vs/base/browser/keyboardEvent"; -import { FastDomNode } from "vs/base/browser/fastDomNode"; +import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { FastDomNode } from 'vs/base/browser/fastDomNode'; export interface ICompositionData { data: string; diff --git a/src/vs/editor/browser/view/viewController.ts b/src/vs/editor/browser/view/viewController.ts index e05ca74ea605c..51beeeade2787 100644 --- a/src/vs/editor/browser/view/viewController.ts +++ b/src/vs/editor/browser/view/viewController.ts @@ -12,7 +12,7 @@ import { ICommandService } from 'vs/platform/commands/common/commands'; import { IViewModel } from 'vs/editor/common/viewModel/viewModel'; import { ViewOutgoingEvents } from 'vs/editor/browser/view/viewOutgoingEvents'; import { CoreNavigationCommands, CoreEditorCommand } from 'vs/editor/common/controller/coreCommands'; -import { Configuration } from "vs/editor/browser/config/configuration"; +import { Configuration } from 'vs/editor/browser/config/configuration'; export interface ExecCoreEditorCommandFunc { (editorCommand: CoreEditorCommand, args: any): void; diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index 927c1d1948684..2ac56ac277325 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -48,7 +48,7 @@ import { EditorScrollbar } from 'vs/editor/browser/viewParts/editorScrollbar/edi import { Minimap } from 'vs/editor/browser/viewParts/minimap/minimap'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { IThemeService, getThemeTypeSelector } from 'vs/platform/theme/common/themeService'; -import { Cursor } from "vs/editor/common/controller/cursor"; +import { Cursor } from 'vs/editor/common/controller/cursor'; export interface IContentWidgetData { widget: editorBrowser.IContentWidget; diff --git a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts index 11d5326512873..89aee09559d19 100644 --- a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts +++ b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts @@ -13,7 +13,7 @@ import { ViewContext } from 'vs/editor/common/view/viewContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; -import { getThemeTypeSelector } from "vs/platform/theme/common/themeService"; +import { getThemeTypeSelector } from 'vs/platform/theme/common/themeService'; export class EditorScrollbar extends ViewPart { diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index 9c922137edeba..46d8dde55d56e 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -25,8 +25,8 @@ import { RGBA } from 'vs/base/common/color'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { GlobalMouseMoveMonitor, IStandardMouseMoveEventData, standardMouseMoveMerger } from 'vs/base/browser/globalMouseMoveMonitor'; import * as platform from 'vs/base/common/platform'; -import { registerThemingParticipant } from "vs/platform/theme/common/themeService"; -import { scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground, scrollbarShadow } from "vs/platform/theme/common/colorRegistry"; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground, scrollbarShadow } from 'vs/platform/theme/common/colorRegistry'; const enum RenderMinimap { None = 0, diff --git a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts index 92134f722a11f..e4086a1e00a59 100644 --- a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts +++ b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts @@ -11,8 +11,8 @@ import { ViewPart } from 'vs/editor/browser/view/viewPart'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { registerThemingParticipant } from "vs/platform/theme/common/themeService"; -import { scrollbarShadow } from "vs/platform/theme/common/colorRegistry"; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { scrollbarShadow } from 'vs/platform/theme/common/colorRegistry'; export class ScrollDecorationViewPart extends ViewPart { diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index c655b958451ed..556c843ce1513 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -36,7 +36,7 @@ import { scrollbarShadow, diffInserted, diffRemoved, defaultInsertColor, default import { Color } from 'vs/base/common/color'; import { OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; interface IEditorDiffDecorations { decorations: editorCommon.IModelDeltaDecoration[]; diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index d8b808d3f0661..c5285a837245b 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -28,8 +28,8 @@ import { import * as editorOptions from 'vs/editor/common/config/editorOptions'; import { ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; -import { CommonEditorRegistry } from "vs/editor/common/editorCommonExtensions"; -import { VerticalRevealType } from "vs/editor/common/view/viewEvents"; +import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; +import { VerticalRevealType } from 'vs/editor/common/view/viewEvents'; let EDITOR_ID = 0; diff --git a/src/vs/editor/common/config/fontInfo.ts b/src/vs/editor/common/config/fontInfo.ts index 7740776bebfb2..9ab9a11d2a99a 100644 --- a/src/vs/editor/common/config/fontInfo.ts +++ b/src/vs/editor/common/config/fontInfo.ts @@ -6,7 +6,7 @@ import * as platform from 'vs/base/common/platform'; import { EditorZoom } from 'vs/editor/common/config/editorZoom'; -import { EDITOR_FONT_DEFAULTS } from "vs/editor/common/config/editorOptions"; +import { EDITOR_FONT_DEFAULTS } from 'vs/editor/common/config/editorOptions'; /** * Determined from empirical observations. diff --git a/src/vs/editor/common/controller/accGenerator.ts b/src/vs/editor/common/controller/accGenerator.ts index 6f6bb813e6b2f..ca556f79d2d21 100644 --- a/src/vs/editor/common/controller/accGenerator.ts +++ b/src/vs/editor/common/controller/accGenerator.ts @@ -8,7 +8,7 @@ import { Position } from 'vs/editor/common/core/position'; import * as nls from 'vs/nls'; import { Range } from 'vs/editor/common/core/range'; -import { IModel } from "vs/editor/common/editorCommon"; +import { IModel } from 'vs/editor/common/editorCommon'; import { Selection } from 'vs/editor/common/core/selection'; export class ScreenReaderMessageGenerator { diff --git a/src/vs/editor/common/controller/coreCommands.ts b/src/vs/editor/common/controller/coreCommands.ts index 639022470cd8e..e0a3cd88f63b1 100644 --- a/src/vs/editor/common/controller/coreCommands.ts +++ b/src/vs/editor/common/controller/coreCommands.ts @@ -23,9 +23,9 @@ import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import * as types from 'vs/base/common/types'; import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; import { IEditorService } from 'vs/platform/editor/common/editor'; -import { TypeOperations } from "vs/editor/common/controller/cursorTypeOperations"; -import { DeleteOperations } from "vs/editor/common/controller/cursorDeleteOperations"; -import { VerticalRevealType } from "vs/editor/common/view/viewEvents"; +import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; +import { DeleteOperations } from 'vs/editor/common/controller/cursorDeleteOperations'; +import { VerticalRevealType } from 'vs/editor/common/view/viewEvents'; const CORE_WEIGHT = KeybindingsRegistry.WEIGHT.editorCore(); diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 305894d79b67a..0c203347ccef0 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -18,7 +18,7 @@ import { DeleteOperations } from 'vs/editor/common/controller/cursorDeleteOperat import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; import { TextModelEventType, ModelRawContentChangedEvent, RawContentChangedType } from 'vs/editor/common/model/textModelEvents'; import { CursorChangeReason } from 'vs/editor/common/controller/cursorEvents'; -import { IViewModel } from "vs/editor/common/viewModel/viewModel"; +import { IViewModel } from 'vs/editor/common/viewModel/viewModel'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import Event, { Emitter } from 'vs/base/common/event'; // import { ScreenReaderMessageGenerator } from "vs/editor/common/controller/accGenerator"; diff --git a/src/vs/editor/common/controller/cursorCommon.ts b/src/vs/editor/common/controller/cursorCommon.ts index e82708d17da1a..55e00ad1e4340 100644 --- a/src/vs/editor/common/controller/cursorCommon.ts +++ b/src/vs/editor/common/controller/cursorCommon.ts @@ -18,7 +18,7 @@ import { IAutoClosingPair } from 'vs/editor/common/modes/languageConfiguration'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; import { IViewModel } from 'vs/editor/common/viewModel/viewModel'; import { CursorChangeReason } from 'vs/editor/common/controller/cursorEvents'; -import { VerticalRevealType } from "vs/editor/common/view/viewEvents"; +import { VerticalRevealType } from 'vs/editor/common/view/viewEvents'; export interface IColumnSelectData { toViewLineNumber: number; diff --git a/src/vs/editor/common/controller/cursorDeleteOperations.ts b/src/vs/editor/common/controller/cursorDeleteOperations.ts index c968bb49f76c6..7951ab91b83e9 100644 --- a/src/vs/editor/common/controller/cursorDeleteOperations.ts +++ b/src/vs/editor/common/controller/cursorDeleteOperations.ts @@ -10,7 +10,7 @@ import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { MoveOperations } from 'vs/editor/common/controller/cursorMoveOperations'; import * as strings from 'vs/base/common/strings'; -import { ICommand } from "vs/editor/common/editorCommon"; +import { ICommand } from 'vs/editor/common/editorCommon'; export class DeleteOperations { diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index cb2b2184669c9..6abac0a543e8a 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -16,7 +16,7 @@ import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageCo import { IndentAction } from 'vs/editor/common/modes/languageConfiguration'; import { SurroundSelectionCommand } from 'vs/editor/common/commands/surroundSelectionCommand'; import { IElectricAction } from 'vs/editor/common/modes/supports/electricCharacter'; -import { getMapForWordSeparators, WordCharacterClass } from "vs/editor/common/controller/wordCharacterClassifier"; +import { getMapForWordSeparators, WordCharacterClass } from 'vs/editor/common/controller/wordCharacterClassifier'; export class TypeOperations { diff --git a/src/vs/editor/common/controller/cursorWordOperations.ts b/src/vs/editor/common/controller/cursorWordOperations.ts index 305cfe68392b0..3666961a2a283 100644 --- a/src/vs/editor/common/controller/cursorWordOperations.ts +++ b/src/vs/editor/common/controller/cursorWordOperations.ts @@ -6,7 +6,7 @@ import { SingleCursorState, CursorConfiguration, ICursorSimpleModel } from 'vs/editor/common/controller/cursorCommon'; import { Position } from 'vs/editor/common/core/position'; -import { WordCharacterClassifier, WordCharacterClass, getMapForWordSeparators } from "vs/editor/common/controller/wordCharacterClassifier"; +import { WordCharacterClassifier, WordCharacterClass, getMapForWordSeparators } from 'vs/editor/common/controller/wordCharacterClassifier'; import * as strings from 'vs/base/common/strings'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; diff --git a/src/vs/editor/common/model/textModel.ts b/src/vs/editor/common/model/textModel.ts index 0d7ec1065b463..d15842430f3b6 100644 --- a/src/vs/editor/common/model/textModel.ts +++ b/src/vs/editor/common/model/textModel.ts @@ -11,7 +11,7 @@ import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { ModelLine } from 'vs/editor/common/model/modelLine'; import { guessIndentation } from 'vs/editor/common/model/indentationGuesser'; -import { EDITOR_MODEL_DEFAULTS } from "vs/editor/common/config/editorOptions"; +import { EDITOR_MODEL_DEFAULTS } from 'vs/editor/common/config/editorOptions'; import { PrefixSumComputer } from 'vs/editor/common/viewModel/prefixSumComputer'; import { IndentRange, computeRanges } from 'vs/editor/common/model/indentRanges'; import { TextModelSearch, SearchParams } from 'vs/editor/common/model/textModelSearch'; diff --git a/src/vs/editor/common/model/textModelSearch.ts b/src/vs/editor/common/model/textModelSearch.ts index d19ad9e608ca4..af26593577653 100644 --- a/src/vs/editor/common/model/textModelSearch.ts +++ b/src/vs/editor/common/model/textModelSearch.ts @@ -10,7 +10,7 @@ import { Range } from 'vs/editor/common/core/range'; import { FindMatch, EndOfLinePreference } from 'vs/editor/common/editorCommon'; import { CharCode } from 'vs/base/common/charCode'; import { TextModel } from 'vs/editor/common/model/textModel'; -import { getMapForWordSeparators, WordCharacterClassifier, WordCharacterClass } from "vs/editor/common/controller/wordCharacterClassifier"; +import { getMapForWordSeparators, WordCharacterClassifier, WordCharacterClass } from 'vs/editor/common/controller/wordCharacterClassifier'; const LIMIT_FIND_COUNT = 999; diff --git a/src/vs/editor/common/services/modelServiceImpl.ts b/src/vs/editor/common/services/modelServiceImpl.ts index 5fee6ded32a33..5bcb68eba4bab 100644 --- a/src/vs/editor/common/services/modelServiceImpl.ts +++ b/src/vs/editor/common/services/modelServiceImpl.ts @@ -21,7 +21,7 @@ import { IMode, LanguageIdentifier } from 'vs/editor/common/modes'; import { IModelService } from 'vs/editor/common/services/modelService'; import * as platform from 'vs/base/common/platform'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { EDITOR_MODEL_DEFAULTS } from "vs/editor/common/config/editorOptions"; +import { EDITOR_MODEL_DEFAULTS } from 'vs/editor/common/config/editorOptions'; import { PLAINTEXT_LANGUAGE_IDENTIFIER } from 'vs/editor/common/modes/modesRegistry'; import { IRawTextSource, TextSource, RawTextSource } from 'vs/editor/common/model/textSource'; import * as textModelEvents from 'vs/editor/common/model/textModelEvents'; diff --git a/src/vs/editor/common/standalone/themes.ts b/src/vs/editor/common/standalone/themes.ts index a97a9fab1eede..8093472bba856 100644 --- a/src/vs/editor/common/standalone/themes.ts +++ b/src/vs/editor/common/standalone/themes.ts @@ -6,8 +6,8 @@ 'use strict'; import { IStandaloneThemeData } from 'vs/editor/common/services/standaloneThemeService'; -import { editorBackground, editorForeground, editorSelectionHighlight, editorInactiveSelection } from "vs/platform/theme/common/colorRegistry"; -import { editorIndentGuides } from "vs/editor/common/view/editorColorRegistry"; +import { editorBackground, editorForeground, editorSelectionHighlight, editorInactiveSelection } from 'vs/platform/theme/common/colorRegistry'; +import { editorIndentGuides } from 'vs/editor/common/view/editorColorRegistry'; /* -------------------------------- Begin vs theme -------------------------------- */ export const vs: IStandaloneThemeData = { diff --git a/src/vs/editor/common/view/viewEvents.ts b/src/vs/editor/common/view/viewEvents.ts index f6696746fbf18..72fc6b41fbe18 100644 --- a/src/vs/editor/common/view/viewEvents.ts +++ b/src/vs/editor/common/view/viewEvents.ts @@ -9,7 +9,7 @@ import { Selection } from 'vs/editor/common/core/selection'; import { ScrollEvent } from 'vs/base/common/scrollable'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; import * as errors from 'vs/base/common/errors'; -import { IDisposable, Disposable } from "vs/base/common/lifecycle"; +import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; export const enum ViewEventType { ViewConfigurationChanged = 1, diff --git a/src/vs/editor/common/viewLayout/viewLayout.ts b/src/vs/editor/common/viewLayout/viewLayout.ts index e6a9d763d2985..4af8cbd523567 100644 --- a/src/vs/editor/common/viewLayout/viewLayout.ts +++ b/src/vs/editor/common/viewLayout/viewLayout.ts @@ -12,7 +12,7 @@ import { IViewLayout, IViewWhitespaceViewportData, Viewport } from 'vs/editor/co import { IPartialViewLinesViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData'; import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; import Event from 'vs/base/common/event'; -import { IConfigurationChangedEvent } from "vs/editor/common/config/editorOptions"; +import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; export class ViewLayout extends Disposable implements IViewLayout { diff --git a/src/vs/editor/common/viewModel/splitLinesCollection.ts b/src/vs/editor/common/viewModel/splitLinesCollection.ts index 72caeb160e822..7c40b262f096d 100644 --- a/src/vs/editor/common/viewModel/splitLinesCollection.ts +++ b/src/vs/editor/common/viewModel/splitLinesCollection.ts @@ -12,7 +12,7 @@ import { PrefixSumComputerWithCache } from 'vs/editor/common/viewModel/prefixSum import { ViewLineData } from 'vs/editor/common/viewModel/viewModel'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { WrappingIndent } from 'vs/editor/common/config/editorOptions'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export class OutputPosition { _outputPositionBrand: void; diff --git a/src/vs/editor/common/viewModel/viewModel.ts b/src/vs/editor/common/viewModel/viewModel.ts index ffb43fadd6aa2..6372d3a14158c 100644 --- a/src/vs/editor/common/viewModel/viewModel.ts +++ b/src/vs/editor/common/viewModel/viewModel.ts @@ -11,9 +11,9 @@ import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { ViewEvent, IViewEventListener } from 'vs/editor/common/view/viewEvents'; import { IDisposable } from 'vs/base/common/lifecycle'; -import { Scrollable } from "vs/base/common/scrollable"; -import { IPartialViewLinesViewportData } from "vs/editor/common/viewLayout/viewLinesViewportData"; -import { IEditorWhitespace } from "vs/editor/common/viewLayout/whitespaceComputer"; +import { Scrollable } from 'vs/base/common/scrollable'; +import { IPartialViewLinesViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData'; +import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; export interface IViewWhitespaceViewportData { readonly id: number; diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index be7b24bb8280a..a7a7297e8810a 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -19,7 +19,7 @@ import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { MinimapTokensColorTracker } from 'vs/editor/common/view/minimapCharRenderer'; import * as textModelEvents from 'vs/editor/common/model/textModelEvents'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; -import { CharacterHardWrappingLineMapperFactory } from "vs/editor/common/viewModel/characterHardWrappingLineMapper"; +import { CharacterHardWrappingLineMapperFactory } from 'vs/editor/common/viewModel/characterHardWrappingLineMapper'; import { ViewLayout } from 'vs/editor/common/viewLayout/viewLayout'; export class CoordinatesConverter implements ICoordinatesConverter { diff --git a/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts b/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts index a3443fa79fd79..7b79df152e732 100644 --- a/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts +++ b/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts @@ -14,9 +14,9 @@ import { RunOnceScheduler } from 'vs/base/common/async'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { editorAction, commonEditorContribution, ServicesAccessor, EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; -import { registerThemingParticipant } from "vs/platform/theme/common/themeService"; -import { editorBracketMatchBackground, editorBracketMatchBorder } from "vs/editor/common/view/editorColorRegistry"; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorBracketMatchBackground, editorBracketMatchBorder } from 'vs/editor/common/view/editorColorRegistry'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; @editorAction class SelectBracketAction extends EditorAction { diff --git a/src/vs/editor/contrib/codelens/browser/codelens.ts b/src/vs/editor/contrib/codelens/browser/codelens.ts index 84fcda05eb1d3..2c7e6ff341cdf 100644 --- a/src/vs/editor/contrib/codelens/browser/codelens.ts +++ b/src/vs/editor/contrib/codelens/browser/codelens.ts @@ -22,10 +22,10 @@ import * as editorBrowser from 'vs/editor/browser/editorBrowser'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { ICodeLensData, getCodeLensData } from '../common/codelens'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; -import { editorCodeLensForeground } from "vs/editor/common/view/editorColorRegistry"; -import { registerThemingParticipant } from "vs/platform/theme/common/themeService"; -import { editorActiveLinkForeground } from "vs/platform/theme/common/colorRegistry"; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { editorCodeLensForeground } from 'vs/editor/common/view/editorColorRegistry'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; class CodeLensViewZone implements editorBrowser.IViewZone { diff --git a/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts b/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts index 1326d8bda3392..64d900f1dd7fb 100644 --- a/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts +++ b/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts @@ -12,9 +12,9 @@ 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'; import { TokenizationResult2 } from 'vs/editor/common/core/token'; -import { MockMode } from "vs/editor/test/common/mocks/mockMode"; -import { CommentRule } from "vs/editor/common/modes/languageConfiguration"; -import { LanguageConfigurationRegistry } from "vs/editor/common/modes/languageConfigurationRegistry"; +import { MockMode } from 'vs/editor/test/common/mocks/mockMode'; +import { CommentRule } from 'vs/editor/common/modes/languageConfiguration'; +import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; suite('Editor Contrib - Line Comment Command', () => { diff --git a/src/vs/editor/contrib/dnd/browser/dnd.ts b/src/vs/editor/contrib/dnd/browser/dnd.ts index e305c8af11a96..7628350f4e2af 100644 --- a/src/vs/editor/contrib/dnd/browser/dnd.ts +++ b/src/vs/editor/contrib/dnd/browser/dnd.ts @@ -17,7 +17,7 @@ import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { DragAndDropCommand } from '../common/dragAndDropCommand'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; @editorContribution export class DragAndDropController implements editorCommon.IEditorContribution { diff --git a/src/vs/editor/contrib/find/common/findController.ts b/src/vs/editor/contrib/find/common/findController.ts index e0657d80c734a..4536b2b5b6fbb 100644 --- a/src/vs/editor/contrib/find/common/findController.ts +++ b/src/vs/editor/contrib/find/common/findController.ts @@ -21,7 +21,7 @@ import { RunOnceScheduler, Delayer } from 'vs/base/common/async'; import { CursorChangeReason, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export const enum FindStartFocusAction { NoFocusChange, diff --git a/src/vs/editor/contrib/find/common/findDecorations.ts b/src/vs/editor/contrib/find/common/findDecorations.ts index 2a80081cf0aa9..4cf3d63128420 100644 --- a/src/vs/editor/contrib/find/common/findDecorations.ts +++ b/src/vs/editor/contrib/find/common/findDecorations.ts @@ -8,7 +8,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export class FindDecorations implements IDisposable { diff --git a/src/vs/editor/contrib/folding/common/foldingModel.ts b/src/vs/editor/contrib/folding/common/foldingModel.ts index 128f450b0873c..8ebd2424cc7f2 100644 --- a/src/vs/editor/contrib/folding/common/foldingModel.ts +++ b/src/vs/editor/contrib/folding/common/foldingModel.ts @@ -5,7 +5,7 @@ import * as editorCommon from 'vs/editor/common/editorCommon'; import { Range } from 'vs/editor/common/core/range'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export interface IFoldingRange { startLineNumber: number; diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts index a29f1511b44ca..124e4229c3dfb 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts @@ -24,7 +24,7 @@ import { registerThemingParticipant } from 'vs/platform/theme/common/themeServic import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { EditorState, CodeEditorStateFlag } from 'vs/editor/common/core/editorState'; import { DefinitionAction, DefinitionActionConfig } from './goToDeclarationCommands'; -import { ClickLinkGesture, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; +import { ClickLinkGesture, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from 'vs/editor/contrib/goToDeclaration/browser/clickLinkGesture'; @editorContribution class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorContribution { diff --git a/src/vs/editor/contrib/hover/browser/modesContentHover.ts b/src/vs/editor/contrib/hover/browser/modesContentHover.ts index 636180c1a66d5..0814b278789ca 100644 --- a/src/vs/editor/contrib/hover/browser/modesContentHover.ts +++ b/src/vs/editor/contrib/hover/browser/modesContentHover.ts @@ -22,7 +22,7 @@ import { getHover } from '../common/hover'; import { HoverOperation, IHoverComputer } from './hoverOperation'; import { ContentHoverWidget } from './hoverWidgets'; import { textToMarkedString, MarkedString } from 'vs/base/common/htmlContent'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; class ModesContentComputer implements IHoverComputer { diff --git a/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts b/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts index 874af70feda74..030eff62c2574 100644 --- a/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts +++ b/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts @@ -18,7 +18,7 @@ import { InPlaceReplaceCommand } from './inPlaceReplaceCommand'; import { EditorState, CodeEditorStateFlag } from 'vs/editor/common/core/editorState'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorBracketMatchBorder } from 'vs/editor/common/view/editorColorRegistry'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; @commonEditorContribution class InPlaceReplaceController implements IEditorContribution { diff --git a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts index 4bc4b88d0fa66..a41829a885b17 100644 --- a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts +++ b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts @@ -19,7 +19,7 @@ import { CopyLinesCommand } from './copyLinesCommand'; import { DeleteLinesCommand } from './deleteLinesCommand'; import { MoveLinesCommand } from './moveLinesCommand'; import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; -import { CoreEditingCommands } from "vs/editor/common/controller/coreCommands"; +import { CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; // copy lines diff --git a/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts b/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts index 4a56e203f656a..64c67e2cb9ae3 100644 --- a/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts +++ b/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts @@ -10,9 +10,9 @@ import { Position } from 'vs/editor/common/core/position'; import { Handler, IModel, DefaultEndOfLine } from 'vs/editor/common/editorCommon'; import { withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; import { DeleteAllLeftAction, JoinLinesAction, TransposeAction, UpperCaseAction, LowerCaseAction, DeleteAllRightAction, InsertLineBeforeAction, InsertLineAfterAction, IndentLinesAction } from 'vs/editor/contrib/linesOperations/common/linesOperations'; -import { Cursor } from "vs/editor/common/controller/cursor"; -import { Model } from "vs/editor/common/model/model"; -import { CoreEditingCommands } from "vs/editor/common/controller/coreCommands"; +import { Cursor } from 'vs/editor/common/controller/cursor'; +import { Model } from 'vs/editor/common/model/model'; +import { CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; suite('Editor Contrib - Line Operations', () => { suite('DeleteAllLeftAction', () => { diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index 356f9bf6843b2..d25c7a9a3ad26 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -24,8 +24,8 @@ import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { Position } from 'vs/editor/common/core/position'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; -import { ClickLinkGesture, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; +import { ClickLinkGesture, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from 'vs/editor/contrib/goToDeclaration/browser/clickLinkGesture'; const HOVER_MESSAGE_GENERAL_META = ( platform.isMacintosh diff --git a/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts b/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts index 3b088852ed418..6117ad98768d4 100644 --- a/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts +++ b/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts @@ -14,7 +14,7 @@ import { Selection } from 'vs/editor/common/core/selection'; import { IActionOptions, EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Range } from 'vs/editor/common/core/range'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export interface IQuickOpenControllerOpts { inputAriaLabel: string; diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index a7175ad5a1f2c..959c2bc89399f 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -43,8 +43,8 @@ import { registerThemingParticipant, ITheme, IThemeService } from 'vs/platform/t import { attachListStyler, attachBadgeStyler } from 'vs/platform/theme/common/styler'; import { IModelDecorationsChangedEvent } from 'vs/editor/common/model/textModelEvents'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; -import { IEnvironmentService } from "vs/platform/environment/common/environment"; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; class DecorationsManager implements IDisposable { diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index b5938e3c7e49a..2a38815488c4a 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -16,7 +16,7 @@ import { IPosition } from 'vs/editor/common/core/position'; import { groupBy } from 'vs/base/common/arrays'; import { dispose } from 'vs/base/common/lifecycle'; import { EditorSnippetVariableResolver } from "./snippetVariables"; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export class OneSnippet { diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts index 9e15e0bed55ef..1efa1b1a8c1a8 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts @@ -10,8 +10,8 @@ import { Selection } from 'vs/editor/common/core/selection'; import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { MockCodeEditor, withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; import { Cursor } from 'vs/editor/common/controller/cursor'; -import { IContextKeyService } from "vs/platform/contextkey/common/contextkey"; -import { ICommonCodeEditor } from "vs/editor/common/editorCommon"; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; class TestSnippetController extends SnippetController2 { diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts index 04a866727d3df..6c30a1793156b 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts @@ -9,7 +9,7 @@ import { Selection } from 'vs/editor/common/core/selection'; import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { mockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; -import { Model } from "vs/editor/common/model/model"; +import { Model } from 'vs/editor/common/model/model'; import { MockContextKeyService } from 'vs/platform/keybinding/test/common/mockKeybindingService'; suite('SnippetController2', function () { diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts index 5eb6c7cba9357..100b9c0dbd872 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts @@ -11,7 +11,7 @@ import { IPosition, Position } from 'vs/editor/common/core/position'; import { SnippetSession } from 'vs/editor/contrib/snippet/browser/snippetSession'; import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { mockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; -import { Model } from "vs/editor/common/model/model"; +import { Model } from 'vs/editor/common/model/model'; suite('SnippetSession', function () { diff --git a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts index b3fcd42202ad5..896e593b00577 100644 --- a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts +++ b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts @@ -18,7 +18,7 @@ import { Position } from 'vs/editor/common/core/position'; import { registerColor, editorSelectionHighlight, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { CursorChangeReason, ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export const editorWordHighlight = registerColor('editor.wordHighlightBackground', { dark: '#575757B8', light: '#57575740', hc: null }, nls.localize('wordHighlight', 'Background color of a symbol during read-access, like reading a variable.')); export const editorWordHighlightStrong = registerColor('editor.wordHighlightStrongBackground', { dark: '#004972B8', light: '#0e639c40', hc: null }, nls.localize('wordHighlightStrong', 'Background color of a symbol during write-access, like writing to a variable.')); diff --git a/src/vs/editor/contrib/wordOperations/common/wordOperations.ts b/src/vs/editor/contrib/wordOperations/common/wordOperations.ts index 469e9446eb24b..a2da8517ce54f 100644 --- a/src/vs/editor/contrib/wordOperations/common/wordOperations.ts +++ b/src/vs/editor/contrib/wordOperations/common/wordOperations.ts @@ -14,9 +14,9 @@ import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { WordNavigationType, WordOperations } from 'vs/editor/common/controller/cursorWordOperations'; import { ReplaceCommand } from 'vs/editor/common/commands/replaceCommand'; -import { getMapForWordSeparators, WordCharacterClassifier } from "vs/editor/common/controller/wordCharacterClassifier"; -import { CursorState } from "vs/editor/common/controller/cursorCommon"; -import { CursorChangeReason } from "vs/editor/common/controller/cursorEvents"; +import { getMapForWordSeparators, WordCharacterClassifier } from 'vs/editor/common/controller/wordCharacterClassifier'; +import { CursorState } from 'vs/editor/common/controller/cursorCommon'; +import { CursorChangeReason } from 'vs/editor/common/controller/cursorEvents'; export interface MoveWordOptions extends ICommandOptions { inSelectionMode: boolean; diff --git a/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts b/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts index d67a436a400ca..40c303f0bec6a 100644 --- a/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts +++ b/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts @@ -17,7 +17,7 @@ import { DeleteWordLeft, DeleteWordStartLeft, DeleteWordEndLeft, DeleteWordRight, DeleteWordStartRight, DeleteWordEndRight } from 'vs/editor/contrib/wordOperations/common/wordOperations'; -import { EditorCommand } from "vs/editor/common/editorCommonExtensions"; +import { EditorCommand } from 'vs/editor/common/editorCommonExtensions'; suite('WordOperations', () => { diff --git a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts index e0de87646d883..dc599a468bfbf 100644 --- a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts +++ b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts @@ -16,7 +16,7 @@ import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, IViewZone, IViewZo import { Color, RGBA } from 'vs/base/common/color'; import { EditorLayoutInfo } from 'vs/editor/common/config/editorOptions'; import { Position, IPosition } from 'vs/editor/common/core/position'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export interface IOptions { showFrame?: boolean; diff --git a/src/vs/editor/editor.main.ts b/src/vs/editor/editor.main.ts index 8e3a8c151dd06..667a3004499c7 100644 --- a/src/vs/editor/editor.main.ts +++ b/src/vs/editor/editor.main.ts @@ -14,7 +14,7 @@ import 'vs/editor/contrib/inspectTokens/browser/inspectTokens'; import { createMonacoBaseAPI } from 'vs/editor/common/standalone/standaloneBase'; import { createMonacoEditorAPI } from 'vs/editor/browser/standalone/standaloneEditor'; import { createMonacoLanguagesAPI } from 'vs/editor/browser/standalone/standaloneLanguages'; -import { EDITOR_DEFAULTS, WrappingIndent } from "vs/editor/common/config/editorOptions"; +import { EDITOR_DEFAULTS, WrappingIndent } from 'vs/editor/common/config/editorOptions'; // Set defaults for standalone editor (EDITOR_DEFAULTS).wrappingIndent = WrappingIndent.None; diff --git a/src/vs/editor/test/browser/controller/textAreaState.test.ts b/src/vs/editor/test/browser/controller/textAreaState.test.ts index 9170690d5ec84..59552e7542e2b 100644 --- a/src/vs/editor/test/browser/controller/textAreaState.test.ts +++ b/src/vs/editor/test/browser/controller/textAreaState.test.ts @@ -9,7 +9,7 @@ import { ISimpleModel, TextAreaState, ITextAreaWrapper, PagedScreenReaderStrateg import { Range } from 'vs/editor/common/core/range'; import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; import { Disposable } from 'vs/base/common/lifecycle'; -import { Model } from "vs/editor/common/model/model"; +import { Model } from 'vs/editor/common/model/model'; import { Selection } from 'vs/editor/common/core/selection'; export class MockTextAreaWrapper extends Disposable implements ITextAreaWrapper { diff --git a/src/vs/editor/test/common/commands/commandTestUtils.ts b/src/vs/editor/test/common/commands/commandTestUtils.ts index b753b8a063a5e..184f5e8d99b84 100644 --- a/src/vs/editor/test/common/commands/commandTestUtils.ts +++ b/src/vs/editor/test/common/commands/commandTestUtils.ts @@ -10,7 +10,7 @@ import { Selection } from 'vs/editor/common/core/selection'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { Model } from 'vs/editor/common/model/model'; import { LanguageIdentifier } from 'vs/editor/common/modes'; -import { withMockCodeEditor } from "vs/editor/test/common/mocks/mockCodeEditor"; +import { withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; export function testCommand( lines: string[], diff --git a/src/vs/editor/test/common/commands/sideEditing.test.ts b/src/vs/editor/test/common/commands/sideEditing.test.ts index 2fa3ea6035f98..af17bee84a254 100644 --- a/src/vs/editor/test/common/commands/sideEditing.test.ts +++ b/src/vs/editor/test/common/commands/sideEditing.test.ts @@ -11,7 +11,7 @@ import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; import { ILineEdit, ModelLine, LineMarker, MarkersTracker } from 'vs/editor/common/model/modelLine'; -import { withMockCodeEditor } from "vs/editor/test/common/mocks/mockCodeEditor"; +import { withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; const NO_TAB_SIZE = 0; diff --git a/src/vs/editor/test/common/config/commonEditorConfig.test.ts b/src/vs/editor/test/common/config/commonEditorConfig.test.ts index 6abc5412b0303..c07e1240c1f83 100644 --- a/src/vs/editor/test/common/config/commonEditorConfig.test.ts +++ b/src/vs/editor/test/common/config/commonEditorConfig.test.ts @@ -7,8 +7,8 @@ import * as assert from 'assert'; import { EditorZoom } from 'vs/editor/common/config/editorZoom'; import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; -import { IEnvConfiguration } from "vs/editor/common/config/commonEditorConfig"; -import { AccessibilitySupport } from "vs/base/common/platform"; +import { IEnvConfiguration } from 'vs/editor/common/config/commonEditorConfig'; +import { AccessibilitySupport } from 'vs/base/common/platform'; suite('Common Editor Config', () => { test('Zoom Level', () => { diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index 833bd813b4747..b3d15acc035b9 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -23,15 +23,15 @@ import { MockMode } from 'vs/editor/test/common/mocks/mockMode'; import { LanguageIdentifier } from 'vs/editor/common/modes'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { CoreNavigationCommands, CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; -import { withMockCodeEditor, MockCodeEditor } from "vs/editor/test/common/mocks/mockCodeEditor"; -import { TextModel } from "vs/editor/common/model/textModel"; -import { ViewModel } from "vs/editor/common/viewModel/viewModelImpl"; +import { withMockCodeEditor, MockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; +import { TextModel } from 'vs/editor/common/model/textModel'; +import { ViewModel } from 'vs/editor/common/viewModel/viewModelImpl'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { ScreenReaderMessageGenerator } from "vs/editor/common/controller/accGenerator"; +import { ScreenReaderMessageGenerator } from 'vs/editor/common/controller/accGenerator'; import { CursorWordLeft, CursorWordLeftSelect, CursorWordRight, CursorWordRightSelect } from 'vs/editor/contrib/wordOperations/common/wordOperations'; -import { EditorCommand } from "vs/editor/common/editorCommonExtensions"; +import { EditorCommand } from 'vs/editor/common/editorCommonExtensions'; let H = Handler; // --------- utils diff --git a/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts b/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts index 1b4ae6b014de4..2b9ac20069d6f 100644 --- a/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts +++ b/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts @@ -13,7 +13,7 @@ import { CursorMove } from 'vs/editor/common/controller/cursorMoveCommands'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { CoreNavigationCommands } from 'vs/editor/common/controller/coreCommands'; -import { ViewModel } from "vs/editor/common/viewModel/viewModelImpl"; +import { ViewModel } from 'vs/editor/common/viewModel/viewModelImpl'; suite('Cursor move command test', () => { diff --git a/src/vs/editor/test/common/mocks/testConfiguration.ts b/src/vs/editor/test/common/mocks/testConfiguration.ts index edddfa74fddd4..a8778a6f05503 100644 --- a/src/vs/editor/test/common/mocks/testConfiguration.ts +++ b/src/vs/editor/test/common/mocks/testConfiguration.ts @@ -7,7 +7,7 @@ import { CommonEditorConfiguration, IEnvConfiguration } from 'vs/editor/common/config/commonEditorConfig'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { FontInfo, BareFontInfo } from 'vs/editor/common/config/fontInfo'; -import { AccessibilitySupport } from "vs/base/common/platform"; +import { AccessibilitySupport } from 'vs/base/common/platform'; export class TestConfiguration extends CommonEditorConfiguration { diff --git a/src/vs/editor/test/common/model/textModelSearch.test.ts b/src/vs/editor/test/common/model/textModelSearch.test.ts index 4102cfad4fef0..274ce45b934bf 100644 --- a/src/vs/editor/test/common/model/textModelSearch.test.ts +++ b/src/vs/editor/test/common/model/textModelSearch.test.ts @@ -10,8 +10,8 @@ import { FindMatch, EndOfLineSequence } from 'vs/editor/common/editorCommon'; import { Range } from 'vs/editor/common/core/range'; import { TextModel } from 'vs/editor/common/model/textModel'; import { TextModelSearch, SearchParams, SearchData } from 'vs/editor/common/model/textModelSearch'; -import { getMapForWordSeparators } from "vs/editor/common/controller/wordCharacterClassifier"; -import { USUAL_WORD_SEPARATORS } from "vs/editor/common/model/wordHelper"; +import { getMapForWordSeparators } from 'vs/editor/common/controller/wordCharacterClassifier'; +import { USUAL_WORD_SEPARATORS } from 'vs/editor/common/model/wordHelper'; // --------- Find suite('TextModelSearch', () => { diff --git a/src/vs/workbench/browser/parts/compositePart.ts b/src/vs/workbench/browser/parts/compositePart.ts index bb92039a1f00c..5c23e84ef0f0d 100644 --- a/src/vs/workbench/browser/parts/compositePart.ts +++ b/src/vs/workbench/browser/parts/compositePart.ts @@ -36,7 +36,7 @@ import { IProgressService } from 'vs/platform/progress/common/progress'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { attachProgressBarStyler } from "vs/platform/theme/common/styler"; +import { attachProgressBarStyler } from 'vs/platform/theme/common/styler'; export interface ICompositeTitleLabel { diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index 05bf24ac197bb..4bc4a3b143a7d 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -36,7 +36,7 @@ import { getCodeEditor } from 'vs/editor/common/services/codeEditorService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { editorBackground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { Themable, EDITOR_GROUP_HEADER_TABS_BACKGROUND, EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND, EDITOR_GROUP_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND, EDITOR_GROUP_BACKGROUND, EDITOR_GROUP_HEADER_TABS_BORDER } from 'vs/workbench/common/theme'; -import { attachProgressBarStyler } from "vs/platform/theme/common/styler"; +import { attachProgressBarStyler } from 'vs/platform/theme/common/styler'; export enum Rochade { NONE, diff --git a/src/vs/workbench/browser/parts/editor/webviewEditor.ts b/src/vs/workbench/browser/parts/editor/webviewEditor.ts index cf852a3d1a5b2..50f792c3e9dd9 100644 --- a/src/vs/workbench/browser/parts/editor/webviewEditor.ts +++ b/src/vs/workbench/browser/parts/editor/webviewEditor.ts @@ -5,10 +5,10 @@ 'use strict'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { BaseEditor } from "vs/workbench/browser/parts/editor/baseEditor"; -import URI from "vs/base/common/uri"; -import { IStorageService } from "vs/platform/storage/common/storage"; -import { Scope } from "vs/workbench/common/memento"; +import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; +import URI from 'vs/base/common/uri'; +import { IStorageService } from 'vs/platform/storage/common/storage'; +import { Scope } from 'vs/workbench/common/memento'; export interface HtmlPreviewEditorViewState { scrollYPercentage: number; diff --git a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts index fd2fd574fb4b4..b7909865487c7 100644 --- a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts +++ b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts @@ -30,7 +30,7 @@ import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } import { STATUS_BAR_BACKGROUND, STATUS_BAR_FOREGROUND, STATUS_BAR_NO_FOLDER_BACKGROUND, STATUS_BAR_ITEM_HOVER_BACKGROUND, STATUS_BAR_ITEM_ACTIVE_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND, STATUS_BAR_BORDER, STATUS_BAR_NO_FOLDER_FOREGROUND } from 'vs/workbench/common/theme'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { contrastBorder } from 'vs/platform/theme/common/colorRegistry'; -import { isThemeColor } from "vs/editor/common/editorCommon"; +import { isThemeColor } from 'vs/editor/common/editorCommon'; import { Color } from 'vs/base/common/color'; export class StatusbarPart extends Part implements IStatusbarService { diff --git a/src/vs/workbench/common/editor/rangeDecorations.ts b/src/vs/workbench/common/editor/rangeDecorations.ts index 7c8678ab24cc3..70a95b1427449 100644 --- a/src/vs/workbench/common/editor/rangeDecorations.ts +++ b/src/vs/workbench/common/editor/rangeDecorations.ts @@ -12,7 +12,7 @@ import { toResource } from 'vs/workbench/common/editor'; import { isEqual } from 'vs/platform/files/common/files'; import { IRange } from 'vs/editor/common/core/range'; import { CursorChangeReason, ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export interface IRangeHighlightDecoration { resource: URI; diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 86c445e811c25..5a2a8efaff789 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -7,6 +7,7 @@ import 'vs/css!./media/workbench'; +import { localize } from 'vs/nls'; import { TPromise, ValueCallback } from 'vs/base/common/winjs.base'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import Event, { Emitter, chain } from 'vs/base/common/event'; @@ -91,11 +92,10 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWindowConfiguration } from 'vs/workbench/electron-browser/common'; -import { localize } from "vs/nls"; -import { IWorkbenchActionRegistry, Extensions } from "vs/workbench/common/actionRegistry"; +import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; import { OpenRecentAction, ToggleDevToolsAction, ReloadWindowAction } from "vs/workbench/electron-browser/actions"; -import { KeyMod } from "vs/base/common/keyCodes"; -import { KeyCode } from "vs/editor/common/standalone/standaloneBase"; +import { KeyMod } from 'vs/base/common/keyCodes'; +import { KeyCode } from 'vs/editor/common/standalone/standaloneBase'; export const MessagesVisibleContext = new RawContextKey('globalMessageVisible', false); export const EditorsVisibleContext = new RawContextKey('editorIsOpen', false); diff --git a/src/vs/workbench/node/extensionPoints.ts b/src/vs/workbench/node/extensionPoints.ts index bcb6fc2206d19..c1b76d345ecf1 100644 --- a/src/vs/workbench/node/extensionPoints.ts +++ b/src/vs/workbench/node/extensionPoints.ts @@ -18,7 +18,7 @@ import Types = require('vs/base/common/types'); import { isValidExtensionDescription } from 'vs/platform/extensions/node/extensionValidator'; import * as semver from 'semver'; import { getIdAndVersionFromLocalExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; -import { getParseErrorMessage } from "vs/base/common/jsonErrorMessages"; +import { getParseErrorMessage } from 'vs/base/common/jsonErrorMessages'; const MANIFEST_FILE = 'package.json'; diff --git a/src/vs/workbench/parts/debug/browser/debugActionItems.ts b/src/vs/workbench/parts/debug/browser/debugActionItems.ts index edb07e3d969cc..50d19edfefb15 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionItems.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionItems.ts @@ -19,7 +19,7 @@ import { IDebugService } from 'vs/workbench/parts/debug/common/debug'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { attachSelectBoxStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; -import { selectBorder } from "vs/platform/theme/common/colorRegistry"; +import { selectBorder } from 'vs/platform/theme/common/colorRegistry'; const $ = dom.$; diff --git a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts index a54e0e1ff2093..70004ffb52630 100644 --- a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts +++ b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts @@ -11,9 +11,9 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { IDebugService, IExceptionInfo } from 'vs/workbench/parts/debug/common/debug'; import { RunOnceScheduler } from 'vs/base/common/async'; -import { IThemeService, ITheme } from "vs/platform/theme/common/themeService"; -import { Color } from "vs/base/common/color"; -import { registerColor } from "vs/platform/theme/common/colorRegistry"; +import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; +import { Color } from 'vs/base/common/color'; +import { registerColor } from 'vs/platform/theme/common/colorRegistry'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { LinkDetector } from 'vs/workbench/parts/debug/browser/linkDetector'; const $ = dom.$; diff --git a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts index f0e0ed7a9bdef..95e12911dcfe5 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts @@ -37,7 +37,7 @@ import { FloatingClickWidget } from 'vs/workbench/parts/preferences/browser/pref import { IListService } from 'vs/platform/list/browser/listService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Position } from 'vs/editor/common/core/position'; -import { CoreEditingCommands } from "vs/editor/common/controller/coreCommands"; +import { CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; const HOVER_DELAY = 300; const LAUNCH_JSON_REGEX = /launch\.json$/; diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index 4e5b9be2e79f5..ce54f235ae5f2 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -23,7 +23,7 @@ import { VariablesRenderer, renderExpressionValue, VariablesDataSource } from 'v import { IListService } from 'vs/platform/list/browser/listService'; import { attachListStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { editorHoverBackground, editorHoverBorder } from "vs/platform/theme/common/colorRegistry"; +import { editorHoverBackground, editorHoverBorder } from 'vs/platform/theme/common/colorRegistry'; const $ = dom.$; const MAX_ELEMENTS_SHOWN = 18; diff --git a/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.ts b/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.ts index fe69b0ad530e6..78ba083f9a041 100644 --- a/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.ts +++ b/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.ts @@ -11,7 +11,7 @@ import { IPartService, Parts } from 'vs/workbench/services/part/common/partServi import { IDebugService, State } from 'vs/workbench/parts/debug/common/debug'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { STATUS_BAR_NO_FOLDER_BACKGROUND, STATUS_BAR_NO_FOLDER_FOREGROUND, STATUS_BAR_BACKGROUND, Themable, STATUS_BAR_FOREGROUND } from 'vs/workbench/common/theme'; -import { addClass, removeClass } from "vs/base/browser/dom"; +import { addClass, removeClass } from 'vs/base/browser/dom'; // colors for theming diff --git a/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts index f1db99bf6475e..f046995c79923 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts @@ -11,7 +11,7 @@ import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/electron-browse import { editorAction } from 'vs/editor/common/editorCommonExtensions'; import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; -import { CoreEditingCommands } from "vs/editor/common/controller/coreCommands"; +import { CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; import { KeyCode } from 'vs/base/common/keyCodes'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; diff --git a/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts b/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts index 38cb77ea2fd1f..26f7cf390e7f2 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts @@ -11,7 +11,7 @@ import { Range } from 'vs/editor/common/core/range'; import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { LanguageId, LanguageIdentifier } from 'vs/editor/common/modes'; import { Position } from 'vs/editor/common/core/position'; -import { CoreEditingCommands } from "vs/editor/common/controller/coreCommands"; +import { CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; import { SnippetParser, walk, Placeholder, Variable, Text, Marker } from 'vs/editor/contrib/snippet/browser/snippetParser'; import emmet = require('emmet'); diff --git a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts index f2cf8c9cacdbb..b922ba26c2516 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts @@ -32,9 +32,9 @@ import { IExtensionService, IExtensionDescription } from 'vs/platform/extensions import URI from 'vs/base/common/uri'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { registerThemingParticipant, ITheme, ICssStyleCollector } from "vs/platform/theme/common/themeService"; -import { buttonBackground, buttonForeground, buttonHoverBackground, contrastBorder, registerColor, foreground } from "vs/platform/theme/common/colorRegistry"; -import { Color } from "vs/base/common/color"; +import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; +import { buttonBackground, buttonForeground, buttonHoverBackground, contrastBorder, registerColor, foreground } from 'vs/platform/theme/common/colorRegistry'; +import { Color } from 'vs/base/common/color'; export class InstallAction extends Action { diff --git a/src/vs/workbench/parts/feedback/electron-browser/feedback.ts b/src/vs/workbench/parts/feedback/electron-browser/feedback.ts index 310eb5f0d975b..ec3746121eaaf 100644 --- a/src/vs/workbench/parts/feedback/electron-browser/feedback.ts +++ b/src/vs/workbench/parts/feedback/electron-browser/feedback.ts @@ -17,9 +17,9 @@ import * as dom from 'vs/base/browser/dom'; import { ICommandService } from 'vs/platform/commands/common/commands'; import * as errors from 'vs/base/common/errors'; import { IIntegrityService } from 'vs/platform/integrity/common/integrity'; -import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from "vs/platform/theme/common/themeService"; -import { attachStylerCallback } from "vs/platform/theme/common/styler"; -import { editorWidgetBackground, widgetShadow, inputBorder, inputForeground, inputBackground, inputActiveOptionBorder, editorBackground, buttonBackground, contrastBorder } from "vs/platform/theme/common/colorRegistry"; +import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; +import { attachStylerCallback } from 'vs/platform/theme/common/styler'; +import { editorWidgetBackground, widgetShadow, inputBorder, inputForeground, inputBackground, inputActiveOptionBorder, editorBackground, buttonBackground, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; export interface IFeedback { feedback: string; diff --git a/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts b/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts index b4763f543e6f6..b124264626e57 100644 --- a/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts +++ b/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts @@ -13,7 +13,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import product from 'vs/platform/node/product'; import { Themable, STATUS_BAR_FOREGROUND, STATUS_BAR_NO_FOLDER_FOREGROUND } from 'vs/workbench/common/theme'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { IWorkspaceContextService } from "vs/platform/workspace/common/workspace"; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; class TwitterFeedbackService implements IFeedbackService { diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts index 4b3e4ee277887..3af3b29705705 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts @@ -33,7 +33,7 @@ import { IListService } from 'vs/platform/list/browser/listService'; import { EditorGroup } from 'vs/workbench/common/editor/editorStacksModel'; import { attachListStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { badgeBackground, badgeForeground, contrastBorder } from "vs/platform/theme/common/colorRegistry"; +import { badgeBackground, badgeForeground, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; const $ = dom.$; diff --git a/src/vs/workbench/parts/markers/browser/markersTreeViewer.ts b/src/vs/workbench/parts/markers/browser/markersTreeViewer.ts index b0f736e5e5182..c78dfb63b6870 100644 --- a/src/vs/workbench/parts/markers/browser/markersTreeViewer.ts +++ b/src/vs/workbench/parts/markers/browser/markersTreeViewer.ts @@ -18,9 +18,9 @@ import { IMarker } from 'vs/platform/markers/common/markers'; import { MarkersModel, Resource, Marker } from 'vs/workbench/parts/markers/common/markersModel'; import Messages from 'vs/workbench/parts/markers/common/messages'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { attachBadgeStyler } from "vs/platform/theme/common/styler"; -import { IThemeService } from "vs/platform/theme/common/themeService"; -import { IDisposable } from "vs/base/common/lifecycle"; +import { attachBadgeStyler } from 'vs/platform/theme/common/styler'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { IDisposable } from 'vs/base/common/lifecycle'; interface IAnyResourceTemplateData { count: CountBadge; diff --git a/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts b/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts index 67c6fca57ae3e..65043dc756117 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts @@ -23,7 +23,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition } from 'vs/editor/browser/editorBrowser'; import { attachInputBoxStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { editorWidgetBackground, widgetShadow } from "vs/platform/theme/common/colorRegistry"; +import { editorWidgetBackground, widgetShadow } from 'vs/platform/theme/common/colorRegistry'; class KeybindingInputWidget extends Widget { diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts index ca94ecd2c2bf4..16fedab362323 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts @@ -39,7 +39,7 @@ import { IChoiceService, IMessageService, Severity } from 'vs/platform/message/c import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyCode, ResolvedKeybinding } from 'vs/base/common/keyCodes'; import { attachListStyler } from 'vs/platform/theme/common/styler'; -import { listHighlightForeground } from "vs/platform/theme/common/colorRegistry"; +import { listHighlightForeground } from 'vs/platform/theme/common/colorRegistry'; let $ = DOM.$; diff --git a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts index 0aae0f5f0ff48..ca535cf3de0b0 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts @@ -53,8 +53,8 @@ import { FindController } from 'vs/editor/contrib/find/browser/find'; import { SelectionHighlighter } from 'vs/editor/contrib/find/common/findController'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; -import { attachStylerCallback } from "vs/platform/theme/common/styler"; -import { scrollbarShadow } from "vs/platform/theme/common/colorRegistry"; +import { attachStylerCallback } from 'vs/platform/theme/common/styler'; +import { scrollbarShadow } from 'vs/platform/theme/common/colorRegistry'; export class PreferencesEditorInput extends SideBySideEditorInput { public static ID: string = 'workbench.editorinputs.preferencesEditorInput'; diff --git a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts index bd29a6a03dff5..81941633f5dc7 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts @@ -32,7 +32,7 @@ import { IWorkspaceConfigurationService } from 'vs/workbench/services/configurat import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export interface IPreferencesRenderer extends IDisposable { preferencesModel: IPreferencesEditorModel; diff --git a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts index 1f802861a3167..52f1edebae3c3 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts @@ -27,7 +27,7 @@ import { attachInputBoxStyler, attachStylerCallback } from 'vs/platform/theme/co import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Position } from 'vs/editor/common/core/position'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { buttonBackground, buttonForeground, badgeForeground, badgeBackground, contrastBorder, errorForeground } from "vs/platform/theme/common/colorRegistry"; +import { buttonBackground, buttonForeground, badgeForeground, badgeBackground, contrastBorder, errorForeground } from 'vs/platform/theme/common/colorRegistry'; export class SettingsGroupTitleWidget extends Widget implements IViewZone { diff --git a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts index 5435cc3a6988f..260ab6e1a6431 100644 --- a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts @@ -28,7 +28,7 @@ import { IMessageService, Severity, IMessageWithAction } from 'vs/platform/messa import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; -import { editorAction, EditorAction } from "vs/editor/common/editorCommonExtensions"; +import { editorAction, EditorAction } from 'vs/editor/common/editorCommonExtensions'; export const ALL_COMMANDS_PREFIX = '>'; export const EDITOR_COMMANDS_PREFIX = '$'; diff --git a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts index eaca7cc45e5e8..8561d451305f7 100644 --- a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts @@ -22,11 +22,11 @@ import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerServ import URI from 'vs/base/common/uri'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ISCMService } from 'vs/workbench/services/scm/common/scm'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; -import { registerThemingParticipant, ITheme, ICssStyleCollector } from "vs/platform/theme/common/themeService"; -import { registerColor } from "vs/platform/theme/common/colorRegistry"; -import { localize } from "vs/nls"; -import { Color } from "vs/base/common/color"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; +import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; +import { registerColor } from 'vs/platform/theme/common/colorRegistry'; +import { localize } from 'vs/nls'; +import { Color } from 'vs/base/common/color'; class DirtyDiffModelDecorator { diff --git a/src/vs/workbench/parts/search/browser/openFileHandler.ts b/src/vs/workbench/parts/search/browser/openFileHandler.ts index 28c61bbc3d44d..1ff6554fa378d 100644 --- a/src/vs/workbench/parts/search/browser/openFileHandler.ts +++ b/src/vs/workbench/parts/search/browser/openFileHandler.ts @@ -31,7 +31,7 @@ import { IQueryOptions, ISearchService, ISearchStats, ISearchQuery } from 'vs/pl import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IRange } from 'vs/editor/common/core/range'; -import { getOutOfWorkspaceEditorResources } from "vs/workbench/parts/search/common/search"; +import { getOutOfWorkspaceEditorResources } from 'vs/workbench/parts/search/common/search'; export class FileQuickOpenModel extends QuickOpenModel { diff --git a/src/vs/workbench/parts/search/browser/searchResultsView.ts b/src/vs/workbench/parts/search/browser/searchResultsView.ts index 48452fee61fda..c9d95f8e9abae 100644 --- a/src/vs/workbench/parts/search/browser/searchResultsView.ts +++ b/src/vs/workbench/parts/search/browser/searchResultsView.ts @@ -19,8 +19,8 @@ import { Range } from 'vs/editor/common/core/range'; import { SearchViewlet } from 'vs/workbench/parts/search/browser/searchViewlet'; import { RemoveAction, ReplaceAllAction, ReplaceAction } from 'vs/workbench/parts/search/browser/searchActions'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { attachBadgeStyler } from "vs/platform/theme/common/styler"; -import { IThemeService } from "vs/platform/theme/common/themeService"; +import { attachBadgeStyler } from 'vs/platform/theme/common/styler'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; export class SearchDataSource implements IDataSource { diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index ed2a0c9f95356..04837eb7f6e6a 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -60,7 +60,7 @@ import FileResultsNavigation from 'vs/workbench/browser/fileResultsNavigation'; import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IOutputService } from 'vs/workbench/parts/output/common/output'; import { Color } from 'vs/base/common/color'; -import { getOutOfWorkspaceEditorResources } from "vs/workbench/parts/search/common/search"; +import { getOutOfWorkspaceEditorResources } from 'vs/workbench/parts/search/common/search'; export class SearchViewlet extends Viewlet { diff --git a/src/vs/workbench/parts/search/common/search.ts b/src/vs/workbench/parts/search/common/search.ts index 19cd463c84690..a6f98af6b2243 100644 --- a/src/vs/workbench/parts/search/common/search.ts +++ b/src/vs/workbench/parts/search/common/search.ts @@ -12,10 +12,10 @@ import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; import { ISearchConfiguration } from 'vs/platform/search/common/search'; import glob = require('vs/base/common/glob'); import { SymbolInformation } from 'vs/editor/common/modes'; -import { IEditorGroupService } from "vs/workbench/services/group/common/groupService"; -import { IWorkspaceContextService } from "vs/platform/workspace/common/workspace"; -import URI from "vs/base/common/uri"; -import { toResource } from "vs/workbench/common/editor"; +import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import URI from 'vs/base/common/uri'; +import { toResource } from 'vs/workbench/common/editor'; export interface IWorkspaceSymbolProvider { provideWorkspaceSymbols(search: string): TPromise; diff --git a/src/vs/workbench/parts/search/common/searchModel.ts b/src/vs/workbench/parts/search/common/searchModel.ts index 87dae50f90ede..114d6657c1a59 100644 --- a/src/vs/workbench/parts/search/common/searchModel.ts +++ b/src/vs/workbench/parts/search/common/searchModel.ts @@ -24,7 +24,7 @@ import { IModelService } from 'vs/editor/common/services/modelService'; import { IReplaceService } from 'vs/workbench/parts/search/common/replace'; import { IProgressRunner } from 'vs/platform/progress/common/progress'; import { RangeHighlightDecorations } from 'vs/workbench/common/editor/rangeDecorations'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export class Match { diff --git a/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts b/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts index ae83175077bc3..dcdfe17498ab2 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts @@ -16,7 +16,7 @@ import { IModeService } from 'vs/editor/common/services/modeService'; import { languagesExtPoint } from 'vs/editor/common/services/modeServiceImpl'; import { LanguageIdentifier } from 'vs/editor/common/modes'; import { SnippetParser, Marker, Placeholder, Variable, Text, walk } from 'vs/editor/contrib/snippet/browser/snippetParser'; -import { EditorSnippetVariableResolver } from "vs/editor/contrib/snippet/browser/snippetVariables"; +import { EditorSnippetVariableResolver } from 'vs/editor/contrib/snippet/browser/snippetVariables'; interface ISnippetsExtensionPoint { language: string; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index c4e3fc0147185..17e931a643b4b 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -27,7 +27,7 @@ import { ToggleTabFocusModeAction } from 'vs/editor/contrib/toggleTabFocusMode/c import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { OpenNextRecentlyUsedEditorInGroupAction, OpenPreviousRecentlyUsedEditorInGroupAction, FocusActiveGroupAction, FocusFirstGroupAction, FocusSecondGroupAction, FocusThirdGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; -import { EDITOR_FONT_DEFAULTS } from "vs/editor/common/config/editorOptions"; +import { EDITOR_FONT_DEFAULTS } from 'vs/editor/common/config/editorOptions'; import { registerColors } from './terminalColorRegistry'; let configurationRegistry = Registry.as(Extensions.Configuration); diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts index 236474f73663a..fda8ca9b9948a 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts @@ -5,7 +5,7 @@ import * as nls from 'vs/nls'; import * as platform from 'vs/base/common/platform'; -import { EDITOR_FONT_DEFAULTS, IEditorOptions } from "vs/editor/common/config/editorOptions"; +import { EDITOR_FONT_DEFAULTS, IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; import { IChoiceService } from 'vs/platform/message/common/message'; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 8d7d30b7099f5..5247bd40e7107 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -29,8 +29,8 @@ import { TabFocus } from 'vs/editor/common/config/commonEditorConfig'; import { TerminalConfigHelper } from 'vs/workbench/parts/terminal/electron-browser/terminalConfigHelper'; import { TerminalLinkHandler } from 'vs/workbench/parts/terminal/electron-browser/terminalLinkHandler'; import { TerminalWidgetManager } from 'vs/workbench/parts/terminal/browser/terminalWidgetManager'; -import { registerThemingParticipant, ITheme, ICssStyleCollector } from "vs/platform/theme/common/themeService"; -import { scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground } from "vs/platform/theme/common/colorRegistry"; +import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; +import { scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground } from 'vs/platform/theme/common/colorRegistry'; /** The amount of time to consider terminal errors to be related to the launch */ const LAUNCHING_DURATION = 500; diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts index 285bc9025adb6..2e0b9c5831d14 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts @@ -10,7 +10,7 @@ import { IConfigurationService, getConfigurationValue } from 'vs/platform/config import { Platform } from 'vs/base/common/platform'; import { TPromise } from 'vs/base/common/winjs.base'; import { TerminalConfigHelper } from 'vs/workbench/parts/terminal/electron-browser/terminalConfigHelper'; -import { EDITOR_FONT_DEFAULTS } from "vs/editor/common/config/editorOptions"; +import { EDITOR_FONT_DEFAULTS } from 'vs/editor/common/config/editorOptions'; class MockConfigurationService implements IConfigurationService { diff --git a/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts b/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts index 466aa77c62dd5..7f9174f7ca6a1 100644 --- a/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts +++ b/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts @@ -20,7 +20,7 @@ import { IModeService } from 'vs/editor/common/services/modeService'; import { tokenizeToString } from 'vs/editor/common/modes/textToHtmlTokenizer'; import { IPartService, Parts } from 'vs/workbench/services/part/common/partService'; import { WebviewEditor } from 'vs/workbench/browser/parts/editor/webviewEditor'; -import { IStorageService } from "vs/platform/storage/common/storage"; +import { IStorageService } from 'vs/platform/storage/common/storage'; function renderBody(body: string): string { return ` diff --git a/src/vs/workbench/services/editor/test/browser/editorService.test.ts b/src/vs/workbench/services/editor/test/browser/editorService.test.ts index e1f4057853ffc..4dd5a44fe16df 100644 --- a/src/vs/workbench/services/editor/test/browser/editorService.test.ts +++ b/src/vs/workbench/services/editor/test/browser/editorService.test.ts @@ -16,7 +16,7 @@ import { FileEditorInput } from 'vs/workbench/parts/files/common/editors/fileEdi import { workbenchInstantiationService, TestThemeService } from 'vs/workbench/test/workbenchTestServices'; import { DelegatingWorkbenchEditorService, WorkbenchEditorService, IEditorPart } from 'vs/workbench/services/editor/browser/editorService'; import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput'; -import { ResourceEditorInput } from "vs/workbench/common/editor/resourceEditorInput"; +import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; let activeEditor: BaseEditor = { getSelection: function () { diff --git a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts index aa101644f89b6..f182c1494c867 100644 --- a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts +++ b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts @@ -20,7 +20,7 @@ import { Extensions, IColorRegistry, ColorIdentifier, editorBackground, editorFo import { ThemeType } from 'vs/platform/theme/common/themeService'; import { Registry } from 'vs/platform/platform'; import { WorkbenchThemeService, IColorCustomizations } from "vs/workbench/services/themes/electron-browser/workbenchThemeService"; -import { getParseErrorMessage } from "vs/base/common/jsonErrorMessages"; +import { getParseErrorMessage } from 'vs/base/common/jsonErrorMessages'; let colorRegistry = Registry.as(Extensions.ColorContribution); diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index 72ad60ffe23dd..6e41871b06032 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -39,7 +39,7 @@ import pfs = require('vs/base/node/pfs'); import colorThemeSchema = require('vs/workbench/services/themes/common/colorThemeSchema'); import fileIconThemeSchema = require('vs/workbench/services/themes/common/fileIconThemeSchema'); import { IDisposable } from 'vs/base/common/lifecycle'; -import { getParseErrorMessage } from "vs/base/common/jsonErrorMessages"; +import { getParseErrorMessage } from 'vs/base/common/jsonErrorMessages'; // implementation diff --git a/src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts b/src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts index cbdc513946239..4050b580de039 100644 --- a/src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts +++ b/src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts @@ -16,7 +16,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils'; import { PLAINTEXT_MODE_ID } from 'vs/editor/common/modes/modesRegistry'; import { workbenchInstantiationService, TestThemeService } from 'vs/workbench/test/workbenchTestServices'; -import { ResourceEditorInput } from "vs/workbench/common/editor/resourceEditorInput"; +import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; const NullThemeService = new TestThemeService(); diff --git a/src/vs/workbench/test/common/editor/editorDiffModel.test.ts b/src/vs/workbench/test/common/editor/editorDiffModel.test.ts index 2f5901c6e880f..2db61acaf4ec6 100644 --- a/src/vs/workbench/test/common/editor/editorDiffModel.test.ts +++ b/src/vs/workbench/test/common/editor/editorDiffModel.test.ts @@ -12,15 +12,15 @@ import { TextDiffEditorModel } from 'vs/workbench/common/editor/textDiffEditorMo import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; import { IModelService } from 'vs/editor/common/services/modelService'; import { IModeService } from 'vs/editor/common/services/modeService'; -import { ResourceEditorInput } from "vs/workbench/common/editor/resourceEditorInput"; -import URI from "vs/base/common/uri"; -import { ITextModelResolverService } from "vs/editor/common/services/resolverService"; -import { ITextFileService } from "vs/workbench/services/textfile/common/textfiles"; -import { IUntitledEditorService } from "vs/workbench/services/untitled/common/untitledEditorService"; -import { TestTextFileService, workbenchInstantiationService } from "vs/workbench/test/workbenchTestServices"; +import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; +import URI from 'vs/base/common/uri'; +import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; +import { TestTextFileService, workbenchInstantiationService } from 'vs/workbench/test/workbenchTestServices'; import { TPromise } from "vs/base/common/winjs.base"; -import { IModel } from "vs/editor/common/editorCommon"; -import { IInstantiationService } from "vs/platform/instantiation/common/instantiation"; +import { IModel } from 'vs/editor/common/editorCommon'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; class MyEditorModel extends EditorModel { } class MyTextEditorModel extends BaseTextEditorModel { } From 5ec01d95545c7ddf236424046477b36ec2511998 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 25 May 2017 10:44:49 +0200 Subject: [PATCH 1044/2747] a18y: avoid duplicate events when navigating trees (for #26730) --- src/vs/base/parts/tree/browser/treeView.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/vs/base/parts/tree/browser/treeView.ts b/src/vs/base/parts/tree/browser/treeView.ts index 117e60db01d91..3e27c21e70903 100644 --- a/src/vs/base/parts/tree/browser/treeView.ts +++ b/src/vs/base/parts/tree/browser/treeView.ts @@ -197,22 +197,18 @@ export class ViewItem implements IViewItem { // ARIA this.element.setAttribute('role', 'treeitem'); + const ariaLabel = this.context.accessibilityProvider.getAriaLabel(this.context.tree, this.model.getElement()); + if (ariaLabel) { + this.element.setAttribute('aria-label', ariaLabel); + } if (this.model.hasTrait('focused')) { const base64Id = strings.safeBtoa(this.model.id); - const ariaLabel = this.context.accessibilityProvider.getAriaLabel(this.context.tree, this.model.getElement()); this.element.setAttribute('aria-selected', 'true'); this.element.setAttribute('id', base64Id); - if (ariaLabel) { - this.element.setAttribute('aria-label', ariaLabel); - } else { - this.element.setAttribute('aria-labelledby', base64Id); // force screen reader to compute label from children (helps NVDA at least) - } } else { this.element.setAttribute('aria-selected', 'false'); this.element.removeAttribute('id'); - this.element.removeAttribute('aria-label'); - this.element.removeAttribute('aria-labelledby'); } if (this.model.hasChildren()) { this.element.setAttribute('aria-expanded', String(!!this.model.isExpanded())); From 847fde97f99cec8f17c4f7f1f19d1f6f05f2bea7 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 25 May 2017 12:06:05 +0200 Subject: [PATCH 1045/2747] clean up unused code --- src/vs/workbench/electron-browser/shell.ts | 23 +++------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index bec5d37606b9e..da3ce11662727 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -62,7 +62,7 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { IMessageService, IChoiceService, Severity, CloseAction } from 'vs/platform/message/common/message'; +import { IMessageService, IChoiceService, Severity } from 'vs/platform/message/common/message'; import { ChoiceChannel } from 'vs/platform/message/common/messageIpc'; import { ISearchService } from 'vs/platform/search/common/search'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; @@ -87,7 +87,6 @@ import { URLChannelClient } from 'vs/platform/url/common/urlIpc'; import { IURLService } from 'vs/platform/url/common/url'; import { IBackupService } from 'vs/platform/backup/common/backup'; import { BackupChannelClient } from 'vs/platform/backup/common/backupIpc'; -import { ReportPerformanceIssueAction } from 'vs/workbench/electron-browser/actions'; import { ExtensionHostProcessWorker } from 'vs/workbench/electron-browser/extensionHost'; import { ITimerService } from 'vs/workbench/services/timer/common/timerService'; import { remote, ipcRenderer as ipc } from 'electron'; @@ -198,7 +197,7 @@ export class WorkbenchShell { onWorkbenchStarted: (info: IWorkbenchStartedInfo) => { // run workbench started logic - this.onWorkbenchStarted(instantiationService, info); + this.onWorkbenchStarted(info); // start cached data manager instantiationService.createInstance(NodeCachedDataManager); @@ -221,7 +220,7 @@ export class WorkbenchShell { return workbenchContainer; } - private onWorkbenchStarted(instantiationService: IInstantiationService, info: IWorkbenchStartedInfo): void { + private onWorkbenchStarted(info: IWorkbenchStartedInfo): void { // Telemetry: workspace info const { filesToOpen, filesToCreate, filesToDiff } = this.options; @@ -248,12 +247,6 @@ export class WorkbenchShell { this.timerService.restoreViewletDuration = info.restoreViewletDuration; this.extensionService.onReady().done(() => { this.telemetryService.publicLog('startupTime', this.timerService.startupMetrics); - - // Check for negative performance numbers (insiders only) - // TODO@Ben remove me - if (product.quality !== 'stable' && this.timerService.startupMetrics.ellapsed < 0) { - this.handleNegativePerformanceNumbers(instantiationService, this.timerService.startupMetrics.ellapsed); - } }); // Telemetry: workspace tags @@ -266,16 +259,6 @@ export class WorkbenchShell { } } - private handleNegativePerformanceNumbers(i: IInstantiationService, time: number): void { - this.messageService.show(Severity.Warning, { - message: `Something went wrong measuring startup performance numbers (ellapsed: ${time}ms). We would like to learn more about this issue.`, - actions: [ - i.createInstance(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL), - CloseAction - ] - }); - } - private initServiceCollection(container: HTMLElement): [IInstantiationService, ServiceCollection] { const disposables = new Disposables(); From 4486772abae3463ec6f9ed95556b69e297f00bc1 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 25 May 2017 12:16:33 +0200 Subject: [PATCH 1046/2747] Uncaught TypeError: Cannot read property 'isActive' of undefined (fixes #27257) --- src/vs/workbench/browser/parts/editor/tabsTitleControl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index 3999342995253..de3fda8a4d56e 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -212,7 +212,7 @@ export class TabsTitleControl extends TitleControl { private updateDropFeedback(element: HTMLElement, isDND: boolean, index?: number): void { const isTab = (typeof index === 'number'); - const isActiveTab = isTab && this.context.isActive(this.context.getEditor(index)); + const isActiveTab = isTab && this.context && this.context.isActive(this.context.getEditor(index)); // Background const noDNDBackgroundColor = isTab ? this.getColor(isActiveTab ? TAB_ACTIVE_BACKGROUND : TAB_INACTIVE_BACKGROUND) : null; From 39e6e908588a83c996d4ae3bfb457e17f87971c3 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 25 May 2017 12:21:18 +0200 Subject: [PATCH 1047/2747] theming - fix color clash when dragging over selected or focused item --- src/vs/base/parts/tree/browser/treeView.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/parts/tree/browser/treeView.ts b/src/vs/base/parts/tree/browser/treeView.ts index 3e27c21e70903..fbbef901f5458 100644 --- a/src/vs/base/parts/tree/browser/treeView.ts +++ b/src/vs/base/parts/tree/browser/treeView.ts @@ -602,7 +602,7 @@ export class TreeView extends HeightMap { if (styles.listDropBackground) { content.push(` .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-wrapper.drop-target, - .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: ${styles.listDropBackground} !important; } + .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: ${styles.listDropBackground} !important; color: inherit !important; } `); } From 817d11bd5005d8c5d40731229765b4a6c573b793 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 09:24:50 +0200 Subject: [PATCH 1048/2747] [docker] update grammar --- build/npm/update-grammar.js | 30 ++++++++++++------- extensions/docker/package.json | 2 +- .../docker/syntaxes/docker.tmLanguage.json | 7 +++-- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/build/npm/update-grammar.js b/build/npm/update-grammar.js index 4b0408b89b29d..dbb12cdcb445e 100644 --- a/build/npm/update-grammar.js +++ b/build/npm/update-grammar.js @@ -25,19 +25,28 @@ function getOptions(urlString) { } } -function download(url) { -return new Promise((c, e) => { - var content = ''; - var request = https.get(getOptions(url), function (response) { +function download(url, redirectCount) { + return new Promise((c, e) => { + var content = ''; + https.get(getOptions(url), function (response) { response.on('data', function (data) { content += data.toString(); }).on('end', function () { + let count = redirectCount || 0; + if (count < 5 && response.statusCode >= 300 && response.statusCode <= 303 || response.statusCode === 307) { + let location = response.headers['location']; + if (location) { + console.log("Redirected " + url + " to " + location); + download(location, count+1).then(c, e); + return; + } + } c(content); }); }).on('error', function (err) { e(err.message); }); -}); + }); } function getCommitSha(repoId, repoPath) { @@ -46,14 +55,15 @@ function getCommitSha(repoId, repoPath) { try { let lastCommit = JSON.parse(content)[0]; return Promise.resolve({ - commitSha : lastCommit.sha, - commitDate : lastCommit.commit.author.date + commitSha: lastCommit.sha, + commitDate: lastCommit.commit.author.date }); } catch (e) { + console.error("Failed extracting the SHA: " + content); return Promise.resolve(null); } }, function () { - console.err('Failed loading ' + commitInfo); + console.error('Failed loading ' + commitInfo); return Promise.resolve(null); }); } @@ -97,7 +107,7 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar) { } if (path.basename(process.argv[1]) === 'update-grammar.js') { - for (var i = 3; i < process.argv.length; i+=2) { - exports.update(process.argv[2], process.argv[i], process.argv[i+1]); + for (var i = 3; i < process.argv.length; i += 2) { + exports.update(process.argv[2], process.argv[i], process.argv[i + 1]); } } diff --git a/extensions/docker/package.json b/extensions/docker/package.json index 0da40007bc60a..e58f082641901 100644 --- a/extensions/docker/package.json +++ b/extensions/docker/package.json @@ -4,7 +4,7 @@ "publisher": "vscode", "engines": { "vscode": "*" }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js docker/docker contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage ./syntaxes/docker.tmLanguage.json" + "update-grammar": "node ../../build/npm/update-grammar.js moby/moby contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage ./syntaxes/docker.tmLanguage.json" }, "contributes": { "languages": [{ diff --git a/extensions/docker/syntaxes/docker.tmLanguage.json b/extensions/docker/syntaxes/docker.tmLanguage.json index caab35092b006..8be1c94055d3e 100644 --- a/extensions/docker/syntaxes/docker.tmLanguage.json +++ b/extensions/docker/syntaxes/docker.tmLanguage.json @@ -8,9 +8,12 @@ "captures": { "1": { "name": "keyword.other.special-method.dockerfile" + }, + "2": { + "name": "keyword.other.special-method.dockerfile" } }, - "match": "\\s*(?:(FROM|AS))\\s" + "match": "^\\s*\\b(FROM)\\b.*?\\b(AS)\\b" }, { "captures": { @@ -94,5 +97,5 @@ ], "scopeName": "source.dockerfile", "uuid": "a39d8795-59d2-49af-aa00-fe74ee29576e", - "version": "https://github.com/moby/moby/commit/4cb71f80823af345d063cf0ad657e73ce9caa75f" + "version": "https://github.com/moby/moby/commit/8523e9d108a0e98865673701a7bd0a7929c5260b" } \ No newline at end of file From dba4da9cba830bfd8a940829199c22970da40879 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 09:35:58 +0200 Subject: [PATCH 1049/2747] [scss] update grammar --- extensions/scss/syntaxes/scss.json | 29 +- .../test-cssvariables_scss.json | 12 +- .../scss/test/colorize-results/test_scss.json | 536 +++++++++--------- 3 files changed, 277 insertions(+), 300 deletions(-) diff --git a/extensions/scss/syntaxes/scss.json b/extensions/scss/syntaxes/scss.json index 1f09bd75e562d..252cb843115fb 100644 --- a/extensions/scss/syntaxes/scss.json +++ b/extensions/scss/syntaxes/scss.json @@ -890,15 +890,6 @@ } ] }, - "constant_hex": { - "captures": { - "1": { - "name": "punctuation.definition.constant.scss" - } - }, - "match": "(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\b", - "name": "constant.numeric.color.hex-value.scss" - }, "constant_important": { "match": "!important", "name": "keyword.other.important.scss" @@ -907,10 +898,6 @@ "match": "\\b(\\+|-|\\*|/)\\b", "name": "support.constant.mathematical-symbols.scss" }, - "constant_number": { - "match": "(\\b([0-9]+(\\.[0-9]+)?)|\\B\\.[0-9]+)(?=\\s*(ch|cm|deg|dpi|dpcm|dppx|em|ex|grad|in|mm|mozmm|ms|pc|pt|px|rad|rem|turn|s|vh|vmin|vmax|vw|\\b))", - "name": "constant.numeric.scss" - }, "constant_optional": { "match": "!optional", "name": "keyword.other.optional.scss" @@ -937,10 +924,6 @@ } ] }, - "constant_unit": { - "match": "(?<=[\\d])(ch|cm|deg|dpi|dpcm|dppx|em|ex|grad|in|mm|mozmm|ms|pc|pt|px|rad|rem|turn|s|vh|vmin|vmax|vw)\\b|%", - "name": "keyword.other.unit.scss" - }, "flow_control": { "patterns": [ { @@ -1242,9 +1225,6 @@ { "include": "#constant_sass_functions" }, - { - "include": "#constant_hex" - }, { "include": "#constant_important" }, @@ -1255,10 +1235,7 @@ "include": "#constant_optional" }, { - "include": "#constant_unit" - }, - { - "include": "#constant_number" + "include": "source.css#numeric-values" }, { "include": "source.css#property-keywords" @@ -1543,7 +1520,7 @@ }, { "match": "\\d+", - "name": "constant.numeric.scss" + "name": "constant.numeric.css" }, { "match": "(?<=\\d)n\\b|\\b(n|even|odd)\\b", @@ -1698,5 +1675,5 @@ "name": "variable.scss" } }, - "version": "https://github.com/atom/language-sass/commit/f477576a0ff819657495142f7e64e577a837fadb" + "version": "https://github.com/atom/language-sass/commit/8b8b7b52655ab5cf4dbe597443abe4b078bb6953" } \ No newline at end of file diff --git a/extensions/scss/test/colorize-results/test-cssvariables_scss.json b/extensions/scss/test/colorize-results/test-cssvariables_scss.json index ff30ea6b97344..e51a05d345fb1 100644 --- a/extensions/scss/test/colorize-results/test-cssvariables_scss.json +++ b/extensions/scss/test/colorize-results/test-cssvariables_scss.json @@ -89,7 +89,7 @@ }, { "c": "6", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -100,7 +100,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -177,7 +177,7 @@ }, { "c": "4", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -397,7 +397,7 @@ }, { "c": "4", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -496,7 +496,7 @@ }, { "c": "5", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -507,7 +507,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", diff --git a/extensions/scss/test/colorize-results/test_scss.json b/extensions/scss/test/colorize-results/test_scss.json index 4f699f59ebfca..ffcdbc7f034ad 100644 --- a/extensions/scss/test/colorize-results/test_scss.json +++ b/extensions/scss/test/colorize-results/test_scss.json @@ -287,7 +287,7 @@ }, { "c": "97", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -298,7 +298,7 @@ }, { "c": "%", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -430,7 +430,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -441,7 +441,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -705,7 +705,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -716,7 +716,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1332,7 +1332,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1343,7 +1343,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1365,7 +1365,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1376,7 +1376,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1486,7 +1486,7 @@ }, { "c": "30", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1497,7 +1497,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1849,7 +1849,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1937,7 +1937,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1948,7 +1948,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -2157,7 +2157,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -2278,7 +2278,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -2839,7 +2839,7 @@ }, { "c": "5", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -2850,7 +2850,7 @@ }, { "c": "em", - "t": "source.css.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -3059,7 +3059,7 @@ }, { "c": "6", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3070,7 +3070,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -3202,7 +3202,7 @@ }, { "c": "12", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3213,7 +3213,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -3279,7 +3279,7 @@ }, { "c": "30", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3290,7 +3290,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -3862,7 +3862,7 @@ }, { "c": "100", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3895,7 +3895,7 @@ }, { "c": "100", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3928,7 +3928,7 @@ }, { "c": "225", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3961,7 +3961,7 @@ }, { "c": "0.25", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4137,7 +4137,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4148,7 +4148,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -4192,7 +4192,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4203,7 +4203,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -4258,7 +4258,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4324,24 +4324,24 @@ }, { "c": "#", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "010203", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -4379,24 +4379,24 @@ }, { "c": "#", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "040506", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -4577,7 +4577,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4588,7 +4588,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -4632,7 +4632,7 @@ }, { "c": "4", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4643,7 +4643,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -4764,7 +4764,7 @@ }, { "c": "5", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss string.quoted.double.scss variable.interpolation.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss string.quoted.double.scss variable.interpolation.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4808,7 +4808,7 @@ }, { "c": "10", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss string.quoted.double.scss variable.interpolation.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss string.quoted.double.scss variable.interpolation.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4929,7 +4929,7 @@ }, { "c": "0", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4962,7 +4962,7 @@ }, { "c": "100", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4973,7 +4973,7 @@ }, { "c": "%", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -5006,7 +5006,7 @@ }, { "c": "50", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5017,7 +5017,7 @@ }, { "c": "%", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -5149,7 +5149,7 @@ }, { "c": "0", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5215,7 +5215,7 @@ }, { "c": "100", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5226,7 +5226,7 @@ }, { "c": "%", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -5292,7 +5292,7 @@ }, { "c": "50", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5303,7 +5303,7 @@ }, { "c": "%", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -5413,7 +5413,7 @@ }, { "c": "40", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5424,7 +5424,7 @@ }, { "c": "px", - "t": "source.css.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -5479,7 +5479,7 @@ }, { "c": "10", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5490,7 +5490,7 @@ }, { "c": "px", - "t": "source.css.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -5798,7 +5798,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.at-rule.return.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.return.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5996,7 +5996,7 @@ }, { "c": "5", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -6722,7 +6722,7 @@ }, { "c": "300", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -6733,7 +6733,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -6975,7 +6975,7 @@ }, { "c": "500", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -6986,7 +6986,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -7162,7 +7162,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -7173,7 +7173,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -7195,24 +7195,24 @@ }, { "c": "#", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "f00", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -7272,24 +7272,24 @@ }, { "c": "#", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "fdd", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -7459,7 +7459,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -7470,7 +7470,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -7756,7 +7756,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -7767,7 +7767,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -8438,7 +8438,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -8449,7 +8449,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -8823,7 +8823,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -8834,7 +8834,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -9274,7 +9274,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9318,7 +9318,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9362,7 +9362,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9439,7 +9439,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9450,7 +9450,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -9560,7 +9560,7 @@ }, { "c": "5", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9604,7 +9604,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9681,7 +9681,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9692,7 +9692,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -9857,7 +9857,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9868,7 +9868,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -10495,7 +10495,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.for.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.for.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -10539,7 +10539,7 @@ }, { "c": "3", - "t": "source.css.scss meta.at-rule.for.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.for.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -10704,7 +10704,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -10715,7 +10715,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -11298,7 +11298,7 @@ }, { "c": "6", - "t": "source.css.scss meta.at-rule.each.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -11397,7 +11397,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -11562,7 +11562,7 @@ }, { "c": "2", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -11573,7 +11573,7 @@ }, { "c": "em", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -11749,7 +11749,7 @@ }, { "c": "2", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -12035,7 +12035,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.for.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.for.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -12387,7 +12387,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -12475,7 +12475,7 @@ }, { "c": "100", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -12486,7 +12486,7 @@ }, { "c": "%", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -12970,7 +12970,7 @@ }, { "c": "20", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -12981,7 +12981,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -13135,24 +13135,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "ff0000", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -13333,7 +13333,7 @@ }, { "c": "4", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -13344,7 +13344,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -13520,7 +13520,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.at-rule.mixin.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.at-rule.mixin.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -13531,7 +13531,7 @@ }, { "c": "in", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.at-rule.mixin.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.at-rule.mixin.scss constant.numeric.css keyword.other.unit.in.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14455,7 +14455,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14466,7 +14466,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14488,7 +14488,7 @@ }, { "c": "4", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14499,7 +14499,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14521,7 +14521,7 @@ }, { "c": "5", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14532,7 +14532,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14554,24 +14554,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "666", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -14587,7 +14587,7 @@ }, { "c": "2", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14598,7 +14598,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14620,7 +14620,7 @@ }, { "c": "6", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14631,7 +14631,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14653,7 +14653,7 @@ }, { "c": "10", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14664,7 +14664,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14686,24 +14686,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "999", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -15148,24 +15148,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "ff0000", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -15181,24 +15181,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "00ff00", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -15214,24 +15214,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "0000ff", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -16479,7 +16479,7 @@ }, { "c": "4", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -16490,7 +16490,7 @@ }, { "c": "cm", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.cm.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -16556,7 +16556,7 @@ }, { "c": "3", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -16567,7 +16567,7 @@ }, { "c": "cm", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.cm.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -16798,7 +16798,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -16809,7 +16809,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -17084,7 +17084,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -17128,24 +17128,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "123", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -17205,7 +17205,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -17656,7 +17656,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -17667,7 +17667,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -17777,7 +17777,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -17788,7 +17788,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -18470,7 +18470,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -18569,7 +18569,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -18701,7 +18701,7 @@ }, { "c": "2", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -18811,7 +18811,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19009,7 +19009,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19141,7 +19141,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19328,7 +19328,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19460,7 +19460,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19647,7 +19647,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19757,7 +19757,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19966,7 +19966,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -20098,7 +20098,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", From 175cece493096b00983e88f5c2a7e40220dffd33 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 10:36:09 +0200 Subject: [PATCH 1050/2747] [ini] add update script --- extensions/ini/package.json | 11 +- extensions/ini/syntaxes/ini.tmLanguage.json | 114 +++++++++++ extensions/ini/syntaxes/properties.plist | 181 ------------------ .../ini/test/colorize-results/test_ini.json | 54 +++--- 4 files changed, 148 insertions(+), 212 deletions(-) create mode 100644 extensions/ini/syntaxes/ini.tmLanguage.json delete mode 100644 extensions/ini/syntaxes/properties.plist diff --git a/extensions/ini/package.json b/extensions/ini/package.json index b6a9b6c37d015..bfb7bb522157e 100644 --- a/extensions/ini/package.json +++ b/extensions/ini/package.json @@ -3,6 +3,9 @@ "version": "0.1.0", "publisher": "vscode", "engines": { "vscode": "*" }, + "scripts": { + "update-grammar": "node ../../build/npm/update-grammar.js textmate/ini.tmbundle Syntaxes/Ini.plist ./syntaxes/ini.tmLanguage.json" + }, "contributes": { "languages": [{ "id": "ini", @@ -19,12 +22,12 @@ }], "grammars": [{ "language": "ini", - "scopeName": "source.properties", - "path": "./syntaxes/properties.plist" + "scopeName": "source.ini", + "path": "./syntaxes/ini.tmLanguage.json" },{ "language": "properties", - "scopeName": "source.properties", - "path": "./syntaxes/properties.plist" + "scopeName": "source.ini", + "path": "./syntaxes/ini.tmLanguage.json" }] } } diff --git a/extensions/ini/syntaxes/ini.tmLanguage.json b/extensions/ini/syntaxes/ini.tmLanguage.json new file mode 100644 index 0000000000000..e8f1a0ef9b330 --- /dev/null +++ b/extensions/ini/syntaxes/ini.tmLanguage.json @@ -0,0 +1,114 @@ +{ + "fileTypes": [ + "ini", + "conf" + ], + "keyEquivalent": "^~I", + "name": "Ini", + "patterns": [ + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.ini" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.ini" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.ini" + } + ] + }, + { + "begin": "(^[ \\t]+)?(?=;)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.ini" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": ";", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.ini" + } + }, + "end": "\\n", + "name": "comment.line.semicolon.ini" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.other.definition.ini" + }, + "2": { + "name": "punctuation.separator.key-value.ini" + } + }, + "match": "\\b([a-zA-Z0-9_.-]+)\\b\\s*(=)" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.entity.ini" + }, + "3": { + "name": "punctuation.definition.entity.ini" + } + }, + "match": "^(\\[)(.*?)(\\])", + "name": "entity.name.section.group-title.ini" + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ini" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ini" + } + }, + "name": "string.quoted.single.ini", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.ini" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ini" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ini" + } + }, + "name": "string.quoted.double.ini" + } + ], + "scopeName": "source.ini", + "uuid": "77DC23B6-8A90-11D9-BAA4-000A9584EC8C", + "version": "https://github.com/textmate/ini.tmbundle/commit/2af0cbb0704940f967152616f2f1ff0aae6287a6" +} \ No newline at end of file diff --git a/extensions/ini/syntaxes/properties.plist b/extensions/ini/syntaxes/properties.plist deleted file mode 100644 index 11436566bd5a5..0000000000000 --- a/extensions/ini/syntaxes/properties.plist +++ /dev/null @@ -1,181 +0,0 @@ - - - - - fileTypes - - ini - conf - - keyEquivalent - ^~I - name - Ini - patterns - - - begin - (^[ \t]+)?(?=#) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.ini - - - end - (?!\G) - patterns - - - begin - # - beginCaptures - - 0 - - name - punctuation.definition.comment.ini - - - end - \n - name - comment.line.number-sign.ini - - - - - begin - (^[ \t]+)?(?=;) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.ini - - - end - (?!\G) - patterns - - - begin - ; - beginCaptures - - 0 - - name - punctuation.definition.comment.ini - - - end - \n - name - comment.line.semicolon.ini - - - - - captures - - 1 - - name - keyword.other.definition.ini - - 2 - - name - punctuation.separator.key-value.ini - - - match - \b([a-zA-Z0-9_.-]+)\b\s*(=) - - - captures - - 1 - - name - punctuation.definition.entity.ini - - 3 - - name - punctuation.definition.entity.ini - - - match - ^(\[)(.*?)(\]) - name - entity.name.section.group-title.ini - - - begin - ' - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ini - - - end - ' - endCaptures - - 0 - - name - punctuation.definition.string.end.ini - - - name - string.quoted.single.ini - patterns - - - match - \\. - name - constant.character.escape.ini - - - - - begin - " - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ini - - - end - " - endCaptures - - 0 - - name - punctuation.definition.string.end.ini - - - name - string.quoted.double.ini - - - scopeName - source.properties - uuid - 77DC23B6-8A90-11D9-BAA4-000A9584EC8C - - \ No newline at end of file diff --git a/extensions/ini/test/colorize-results/test_ini.json b/extensions/ini/test/colorize-results/test_ini.json index f30cdc5389207..5b001c68246ed 100644 --- a/extensions/ini/test/colorize-results/test_ini.json +++ b/extensions/ini/test/colorize-results/test_ini.json @@ -1,7 +1,7 @@ [ { "c": ";", - "t": "source.properties comment.line.semicolon.ini punctuation.definition.comment.ini", + "t": "source.ini comment.line.semicolon.ini punctuation.definition.comment.ini", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -12,7 +12,7 @@ }, { "c": " last modified 1 April 2001 by John Doe", - "t": "source.properties comment.line.semicolon.ini", + "t": "source.ini comment.line.semicolon.ini", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -23,7 +23,7 @@ }, { "c": "[", - "t": "source.properties entity.name.section.group-title.ini punctuation.definition.entity.ini", + "t": "source.ini entity.name.section.group-title.ini punctuation.definition.entity.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -34,7 +34,7 @@ }, { "c": "owner", - "t": "source.properties entity.name.section.group-title.ini", + "t": "source.ini entity.name.section.group-title.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -45,7 +45,7 @@ }, { "c": "]", - "t": "source.properties entity.name.section.group-title.ini punctuation.definition.entity.ini", + "t": "source.ini entity.name.section.group-title.ini punctuation.definition.entity.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -56,7 +56,7 @@ }, { "c": "name", - "t": "source.properties keyword.other.definition.ini", + "t": "source.ini keyword.other.definition.ini", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -67,7 +67,7 @@ }, { "c": "=", - "t": "source.properties punctuation.separator.key-value.ini", + "t": "source.ini punctuation.separator.key-value.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -78,7 +78,7 @@ }, { "c": "John Doe", - "t": "source.properties", + "t": "source.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -89,7 +89,7 @@ }, { "c": "organization", - "t": "source.properties keyword.other.definition.ini", + "t": "source.ini keyword.other.definition.ini", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -100,7 +100,7 @@ }, { "c": "=", - "t": "source.properties punctuation.separator.key-value.ini", + "t": "source.ini punctuation.separator.key-value.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -111,7 +111,7 @@ }, { "c": "Acme Widgets Inc.", - "t": "source.properties", + "t": "source.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -122,7 +122,7 @@ }, { "c": "[", - "t": "source.properties entity.name.section.group-title.ini punctuation.definition.entity.ini", + "t": "source.ini entity.name.section.group-title.ini punctuation.definition.entity.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -133,7 +133,7 @@ }, { "c": "database", - "t": "source.properties entity.name.section.group-title.ini", + "t": "source.ini entity.name.section.group-title.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -144,7 +144,7 @@ }, { "c": "]", - "t": "source.properties entity.name.section.group-title.ini punctuation.definition.entity.ini", + "t": "source.ini entity.name.section.group-title.ini punctuation.definition.entity.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -155,7 +155,7 @@ }, { "c": ";", - "t": "source.properties comment.line.semicolon.ini punctuation.definition.comment.ini", + "t": "source.ini comment.line.semicolon.ini punctuation.definition.comment.ini", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -166,7 +166,7 @@ }, { "c": " use IP address in case network name resolution is not working", - "t": "source.properties comment.line.semicolon.ini", + "t": "source.ini comment.line.semicolon.ini", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -177,7 +177,7 @@ }, { "c": "server", - "t": "source.properties keyword.other.definition.ini", + "t": "source.ini keyword.other.definition.ini", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -188,7 +188,7 @@ }, { "c": "=", - "t": "source.properties punctuation.separator.key-value.ini", + "t": "source.ini punctuation.separator.key-value.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -199,7 +199,7 @@ }, { "c": "192.0.2.62", - "t": "source.properties", + "t": "source.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -210,7 +210,7 @@ }, { "c": "port", - "t": "source.properties keyword.other.definition.ini", + "t": "source.ini keyword.other.definition.ini", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -221,7 +221,7 @@ }, { "c": "=", - "t": "source.properties punctuation.separator.key-value.ini", + "t": "source.ini punctuation.separator.key-value.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -232,7 +232,7 @@ }, { "c": "143", - "t": "source.properties", + "t": "source.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -243,7 +243,7 @@ }, { "c": "file", - "t": "source.properties keyword.other.definition.ini", + "t": "source.ini keyword.other.definition.ini", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -254,7 +254,7 @@ }, { "c": "=", - "t": "source.properties punctuation.separator.key-value.ini", + "t": "source.ini punctuation.separator.key-value.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -265,7 +265,7 @@ }, { "c": "\"", - "t": "source.properties string.quoted.double.ini punctuation.definition.string.begin.ini", + "t": "source.ini string.quoted.double.ini punctuation.definition.string.begin.ini", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -276,7 +276,7 @@ }, { "c": "payroll.dat", - "t": "source.properties string.quoted.double.ini", + "t": "source.ini string.quoted.double.ini", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -287,7 +287,7 @@ }, { "c": "\"", - "t": "source.properties string.quoted.double.ini punctuation.definition.string.end.ini", + "t": "source.ini string.quoted.double.ini punctuation.definition.string.end.ini", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", From 3cdc7b7472bcdbb0feef079368afba1b238a7750 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 11:27:32 +0200 Subject: [PATCH 1051/2747] update all grammars script --- build/npm/update-all-grammars.js | 74 ++++++++++++++++++++++++++++++ extensions/typescript/package.json | 2 +- package.json | 3 +- 3 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 build/npm/update-all-grammars.js diff --git a/build/npm/update-all-grammars.js b/build/npm/update-all-grammars.js new file mode 100644 index 0000000000000..252b0f4edcb8b --- /dev/null +++ b/build/npm/update-all-grammars.js @@ -0,0 +1,74 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +const cp = require('child_process'); +const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; +const integrationTests = process.platform === 'win32' ? '.\test-integration.bat' : './test-integration.sh'; + +function updateGrammar(location) { + const result = cp.spawnSync(npm, ['run', 'update-grammar'], { + cwd: location, + stdio: 'inherit' + }); + + if (result.error || result.status !== 0) { + process.exit(1); + } +} + +const extensions = [ + // 'bat' Grammar no longer available + 'clojure', + 'coffeescript', + 'cpp', + 'csharp', + 'css', + 'diff', + 'docker', + 'fsharp', + 'gitsyntax', + 'go', + 'groovy', + 'handlebars', + 'hlsl', + 'html', + 'ini', + 'java', + // 'javascript', updated through JavaScript + // 'json', customized + 'less', + 'lua', + 'make', + 'markdown', + 'objective-c', + 'perl', + 'php', + // 'powershell', grammar not ready yet, @daviwil will ping when ready + 'pug', + 'python', + 'r', + 'razor', + 'ruby', + 'rust', + 'scss', + 'shaderlab', + 'shellscript', + // 'sql', customized, PRs pending + 'swift', + 'typescript', + 'vb', + 'xml', + 'yaml' +]; + +extensions.forEach(extension => updateGrammar(`extensions/${extension}`)); + +// run integration tests + +if (process.platform === 'win32') { + cp.spawn('.\scripts\test-integration.bat', [], { env: process.env, stdio: 'inherit' }); +} else { + cp.spawn('/bin/bash', ['./scripts/test-integration.sh'], { env: process.env, stdio: 'inherit' }); +} \ No newline at end of file diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index a24c0c1051906..461cb773a4dea 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -21,7 +21,7 @@ }, "scripts": { "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:typescript ./tsconfig.json", - "update-grammars": "node ./build/update-grammars.js" + "update-grammar": "node ./build/update-grammars.js" }, "activationEvents": [ "onLanguage:javascript", diff --git a/package.json b/package.json index 236e9d787e575..c31f58f40c999 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "monaco-editor-test": "mocha --only-monaco-editor", "precommit": "node build/gulpfile.hygiene.js", "gulp": "gulp --max_old_space_size=4096", - "7z": "7z" + "7z": "7z", + "update-grammars": "node build/npm/update-all-grammars.js" }, "dependencies": { "applicationinsights": "0.17.1", From c96342e995e652d3b6bcc07237ca9c4953ce6a94 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 11:27:46 +0200 Subject: [PATCH 1052/2747] [clojure] update grammar --- .../clojure/syntaxes/clojure.tmLanguage.json | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/extensions/clojure/syntaxes/clojure.tmLanguage.json b/extensions/clojure/syntaxes/clojure.tmLanguage.json index 6e2d50b5ea544..881ce191e1c6a 100644 --- a/extensions/clojure/syntaxes/clojure.tmLanguage.json +++ b/extensions/clojure/syntaxes/clojure.tmLanguage.json @@ -64,14 +64,11 @@ }, { "include": "#symbol" - }, - { - "include": "#whitespace" } ], "repository": { "comment": { - "begin": ";", + "begin": "(? Date: Thu, 25 May 2017 11:27:59 +0200 Subject: [PATCH 1053/2747] [cpp] update grammar --- extensions/cpp/syntaxes/c++.json | 5 +- .../cpp/test/colorize-results/test_cc.json | 118 +++++++++++++++++- 2 files changed, 118 insertions(+), 5 deletions(-) diff --git a/extensions/cpp/syntaxes/c++.json b/extensions/cpp/syntaxes/c++.json index 0d20c95fb60ef..7ec3054f58ba1 100644 --- a/extensions/cpp/syntaxes/c++.json +++ b/extensions/cpp/syntaxes/c++.json @@ -425,6 +425,9 @@ { "match": "\\\\x\\h+", "name": "constant.character.escape.cpp" + }, + { + "include": "source.c#string_placeholder" } ] }, @@ -455,5 +458,5 @@ ] } }, - "version": "https://github.com/atom/language-c/commit/a74c2f967d73e802a67fa6e971a8e8dedf076597" + "version": "https://github.com/atom/language-c/commit/3a269f88b12e512fb9495dc006a1dabf325d3d7f" } \ No newline at end of file diff --git a/extensions/cpp/test/colorize-results/test_cc.json b/extensions/cpp/test/colorize-results/test_cc.json index 3f7be3caeb863..845a693b3ab32 100644 --- a/extensions/cpp/test/colorize-results/test_cc.json +++ b/extensions/cpp/test/colorize-results/test_cc.json @@ -110,7 +110,29 @@ } }, { - "c": "num_candidate_ret=%d:", + "c": "num_candidate_ret=", + "t": "source.cpp meta.function.c string.quoted.double.cpp", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": "%d", + "t": "source.cpp meta.function.c string.quoted.double.cpp constant.other.placeholder.c", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": ":", "t": "source.cpp meta.function.c string.quoted.double.cpp", "r": { "dark_plus": "string: #CE9178", @@ -407,7 +429,18 @@ } }, { - "c": "%d,", + "c": "%d", + "t": "source.cpp meta.function.c string.quoted.double.cpp constant.other.placeholder.c", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": ",", "t": "source.cpp meta.function.c string.quoted.double.cpp", "r": { "dark_plus": "string: #CE9178", @@ -1375,7 +1408,29 @@ } }, { - "c": "STYLE=Keramik;TITLE=%s;THEME=%s", + "c": "STYLE=Keramik;TITLE=", + "t": "source.cpp meta.block.c string.quoted.double.cpp", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": "%s", + "t": "source.cpp meta.block.c string.quoted.double.cpp constant.other.placeholder.c", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": ";THEME=", "t": "source.cpp meta.block.c string.quoted.double.cpp", "r": { "dark_plus": "string: #CE9178", @@ -1385,6 +1440,17 @@ "hc_black": "string: #CE9178" } }, + { + "c": "%s", + "t": "source.cpp meta.block.c string.quoted.double.cpp constant.other.placeholder.c", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, { "c": "\"", "t": "source.cpp meta.block.c string.quoted.double.cpp punctuation.definition.string.end.cpp", @@ -1705,7 +1771,51 @@ } }, { - "c": "movw $0x38, %ax; ltr %ax", + "c": "movw $0x38, ", + "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": "%a", + "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp constant.other.placeholder.c", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": "x; ltr ", + "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": "%a", + "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp constant.other.placeholder.c", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": "x", "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp", "r": { "dark_plus": "string: #CE9178", From 1913a5cebd98a42aa89c5b54ecd2072daea0bb59 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 11:28:13 +0200 Subject: [PATCH 1054/2747] [css] update grammar --- extensions/css/syntaxes/css.tmLanguage.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/css/syntaxes/css.tmLanguage.json b/extensions/css/syntaxes/css.tmLanguage.json index 072b9cd30515e..700b6dd314068 100644 --- a/extensions/css/syntaxes/css.tmLanguage.json +++ b/extensions/css/syntaxes/css.tmLanguage.json @@ -1328,7 +1328,7 @@ "name": "keyword.other.unit.${2:/downcase}.css" } }, - "match": "(?xi) (? Date: Thu, 25 May 2017 11:28:39 +0200 Subject: [PATCH 1055/2747] [typescript] update grammar --- .../syntaxes/JavaScript.tmLanguage.json | 181 ++++++++++------- .../test/colorize-results/test_jsx.json | 10 +- .../syntaxes/TypeScript.tmLanguage.json | 183 +++++++++++------- .../syntaxes/TypeScriptReact.tmLanguage.json | 181 ++++++++++------- 4 files changed, 330 insertions(+), 225 deletions(-) diff --git a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json index ec077b65656fe..d7aabe6479b4f 100644 --- a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json +++ b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json @@ -74,7 +74,7 @@ "name": "storage.type.js" } }, - "end": "(?=$|;|}|(\\s+(of|in)\\s+))", + "end": "(?=$|^|;|}|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#destructuring-variable" @@ -103,7 +103,7 @@ "name": "meta.definition.variable.js entity.name.function.js" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -118,7 +118,7 @@ "name": "meta.definition.variable.js variable.other.constant.js" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -133,7 +133,7 @@ "name": "meta.definition.variable.js variable.other.readwrite.js" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -160,7 +160,7 @@ { "name": "meta.object-binding-pattern-variable.js", "begin": "(?])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)", + "end": "(?=$|^|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)", "patterns": [ { "include": "#comment" @@ -2019,7 +2062,7 @@ "name": "punctuation.definition.typeparameters.begin.js" } }, - "end": "(?=$)|(>)", + "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.typeparameters.end.js" @@ -2054,7 +2097,7 @@ "name": "keyword.operator.assignment.js" } }, - "end": "(?=$|[,);}\\]])", + "end": "(?=$|^|[,);}\\]])", "patterns": [ { "include": "#expression" @@ -2693,7 +2736,7 @@ "name": "keyword.control.as.js" } }, - "end": "(?=$|[;,:})\\]])", + "end": "(?=$|^|[;,:})\\]])", "patterns": [ { "include": "#type" @@ -2778,7 +2821,7 @@ }, { "name": "meta.arrow.js", - "begin": "(?x) (?:\n (? is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.js" @@ -3358,25 +3401,17 @@ } }, { - "begin": "(^[ \\t]+)?(?=//)", + "begin": "(^[ \\t]+)?(//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.js" + }, + "2": { + "name": "comment.line.double-slash.js punctuation.definition.comment.js" } }, - "end": "(?=$)", - "patterns": [ - { - "name": "comment.line.double-slash.js", - "begin": "//", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.js" - } - }, - "end": "(?=$)" - } - ] + "end": "(?=^)", + "contentName": "comment.line.double-slash.tsx" } ] }, @@ -3388,7 +3423,7 @@ "name": "punctuation.definition.comment.js" } }, - "end": "(?=$)", + "end": "(?=^)", "patterns": [ { "name": "meta.tag.js", @@ -4188,5 +4223,5 @@ ] } }, - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/cb1af7953db224204607cbe22d3a45aa0f77a4c1" + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8c967fe7553297bfad672b7417d78e357c8fe724" } \ No newline at end of file diff --git a/extensions/javascript/test/colorize-results/test_jsx.json b/extensions/javascript/test/colorize-results/test_jsx.json index 7a9eb1f5ca044..55e2c440d3bee 100644 --- a/extensions/javascript/test/colorize-results/test_jsx.json +++ b/extensions/javascript/test/colorize-results/test_jsx.json @@ -529,7 +529,7 @@ }, { "c": " Prevent following the link.", - "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js", + "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -628,7 +628,7 @@ }, { "c": " Invert the chosen default.", - "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js", + "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -661,7 +661,7 @@ }, { "c": " This will trigger an intelligent re-render of the component.", - "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js", + "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -1046,7 +1046,7 @@ }, { "c": " Default to the default message.", - "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js", + "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -1222,7 +1222,7 @@ }, { "c": " If toggled, show the alternate message.", - "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js", + "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", diff --git a/extensions/typescript/syntaxes/TypeScript.tmLanguage.json b/extensions/typescript/syntaxes/TypeScript.tmLanguage.json index b80d24f1c23b0..7c581f92aeae2 100644 --- a/extensions/typescript/syntaxes/TypeScript.tmLanguage.json +++ b/extensions/typescript/syntaxes/TypeScript.tmLanguage.json @@ -71,7 +71,7 @@ "name": "storage.type.ts" } }, - "end": "(?=$|;|}|(\\s+(of|in)\\s+))", + "end": "(?=$|^|;|}|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#destructuring-variable" @@ -100,7 +100,7 @@ "name": "meta.definition.variable.ts entity.name.function.ts" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -115,7 +115,7 @@ "name": "meta.definition.variable.ts variable.other.constant.ts" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -130,7 +130,7 @@ "name": "meta.definition.variable.ts variable.other.readwrite.ts" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -157,7 +157,7 @@ { "name": "meta.object-binding-pattern-variable.ts", "begin": "(?])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)", + "end": "(?=$|^|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)", "patterns": [ { "include": "#comment" @@ -2013,7 +2056,7 @@ "name": "punctuation.definition.typeparameters.begin.ts" } }, - "end": "(?=$)|(>)", + "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.typeparameters.end.ts" @@ -2048,7 +2091,7 @@ "name": "keyword.operator.assignment.ts" } }, - "end": "(?=$|[,);}\\]])", + "end": "(?=$|^|[,);}\\]])", "patterns": [ { "include": "#expression" @@ -2487,7 +2530,7 @@ "patterns": [ { "name": "cast.expr.ts", - "begin": "(?:(?<=return|throw|yield|await|default|[=(,:>*]))\\s*(<)(?!*?]))\\s*(<)(?! is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.ts" @@ -3389,25 +3432,17 @@ } }, { - "begin": "(^[ \\t]+)?(?=//)", + "begin": "(^[ \\t]+)?(//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.ts" + }, + "2": { + "name": "comment.line.double-slash.ts punctuation.definition.comment.ts" } }, - "end": "(?=$)", - "patterns": [ - { - "name": "comment.line.double-slash.ts", - "begin": "//", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.ts" - } - }, - "end": "(?=$)" - } - ] + "end": "(?=^)", + "contentName": "comment.line.double-slash.ts" } ] }, @@ -3419,7 +3454,7 @@ "name": "punctuation.definition.comment.ts" } }, - "end": "(?=$)", + "end": "(?=^)", "patterns": [ { "name": "meta.tag.ts", @@ -3923,5 +3958,5 @@ ] } }, - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/9f6676aa2ddb75cb5a9dbe1f59024069e839d986" + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8c967fe7553297bfad672b7417d78e357c8fe724" } \ No newline at end of file diff --git a/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json b/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json index c20889881a13e..b2c49cbf7f46a 100644 --- a/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json +++ b/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json @@ -71,7 +71,7 @@ "name": "storage.type.tsx" } }, - "end": "(?=$|;|}|(\\s+(of|in)\\s+))", + "end": "(?=$|^|;|}|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#destructuring-variable" @@ -100,7 +100,7 @@ "name": "meta.definition.variable.tsx entity.name.function.tsx" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -115,7 +115,7 @@ "name": "meta.definition.variable.tsx variable.other.constant.tsx" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -130,7 +130,7 @@ "name": "meta.definition.variable.tsx variable.other.readwrite.tsx" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -157,7 +157,7 @@ { "name": "meta.object-binding-pattern-variable.tsx", "begin": "(?])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)", + "end": "(?=$|^|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)", "patterns": [ { "include": "#comment" @@ -2016,7 +2059,7 @@ "name": "punctuation.definition.typeparameters.begin.tsx" } }, - "end": "(?=$)|(>)", + "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.typeparameters.end.tsx" @@ -2051,7 +2094,7 @@ "name": "keyword.operator.assignment.tsx" } }, - "end": "(?=$|[,);}\\]])", + "end": "(?=$|^|[,);}\\]])", "patterns": [ { "include": "#expression" @@ -2690,7 +2733,7 @@ "name": "keyword.control.as.tsx" } }, - "end": "(?=$|[;,:})\\]])", + "end": "(?=$|^|[;,:})\\]])", "patterns": [ { "include": "#type" @@ -2775,7 +2818,7 @@ }, { "name": "meta.arrow.tsx", - "begin": "(?x) (?:\n (? is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" @@ -3355,25 +3398,17 @@ } }, { - "begin": "(^[ \\t]+)?(?=//)", + "begin": "(^[ \\t]+)?(//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.tsx" + }, + "2": { + "name": "comment.line.double-slash.tsx punctuation.definition.comment.tsx" } }, - "end": "(?=$)", - "patterns": [ - { - "name": "comment.line.double-slash.tsx", - "begin": "//", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.tsx" - } - }, - "end": "(?=$)" - } - ] + "end": "(?=^)", + "contentName": "comment.line.double-slash.tsx" } ] }, @@ -3385,7 +3420,7 @@ "name": "punctuation.definition.comment.tsx" } }, - "end": "(?=$)", + "end": "(?=^)", "patterns": [ { "name": "meta.tag.tsx", @@ -4185,5 +4220,5 @@ ] } }, - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/cb1af7953db224204607cbe22d3a45aa0f77a4c1" + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8c967fe7553297bfad672b7417d78e357c8fe724" } \ No newline at end of file From 422ff199cadcb99a60790dc64ce0d64a44090197 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 11:28:58 +0200 Subject: [PATCH 1056/2747] [less] update grammar --- extensions/less/syntaxes/less.tmLanguage.json | 17 +- .../test/colorize-results/14119_less.json | 13 +- .../test-cssvariables_less.json | 28 +- .../less/test/colorize-results/test_less.json | 280 ++++++++++++++++-- 4 files changed, 293 insertions(+), 45 deletions(-) diff --git a/extensions/less/syntaxes/less.tmLanguage.json b/extensions/less/syntaxes/less.tmLanguage.json index 902eb4e8d01dc..cd25b2a89b513 100644 --- a/extensions/less/syntaxes/less.tmLanguage.json +++ b/extensions/less/syntaxes/less.tmLanguage.json @@ -146,12 +146,7 @@ "name": "comment.block.css" }, { - "match": "[+-]?\\d*\\.?\\d+", - "name": "constant.numeric.css" - }, - { - "match": "(?<=[\\d])(ch|cm|deg|dpi|dpcm|dppx|em|ex|grad|in|mm|ms|pc|pt|px|rad|rem|turn|s|vh|vmin|vw)\\b|%", - "name": "keyword.other.unit.css" + "include": "source.css#numeric-values" }, { "captures": { @@ -281,13 +276,13 @@ ] }, { + "match": "(@|\\-\\-)[\\w-]+(?=\\s*)", + "name": "variable.other.less", "captures": { "1": { "name": "punctuation.definition.variable.less" } - }, - "match": "(?:@|\\-\\-)[a-zA-Z0-9_-][\\w-]*(?=\\s*)", - "name": "variable.other.less" + } }, { "include": "#variable_interpolation" @@ -516,7 +511,7 @@ "include": "#strings" }, { - "match": "(\\b|\\.{0,2}/).*\\b", + "match": "(\\b|\\.{0,2}/)[^)]*\\b", "name": "string.url.css" } ] @@ -546,5 +541,5 @@ "name": "support.function.any-method.builtin.less" } }, - "version": "https://github.com/atom/language-less/commit/7d70b66aa9c853d59e27cce25b5bc25cb067e75a" + "version": "https://github.com/atom/language-less/commit/4661d870784f725599e438bf683553cc6cf0f4ed" } \ No newline at end of file diff --git a/extensions/less/test/colorize-results/14119_less.json b/extensions/less/test/colorize-results/14119_less.json index 6e89b6a45872e..0c83af453319a 100644 --- a/extensions/less/test/colorize-results/14119_less.json +++ b/extensions/less/test/colorize-results/14119_less.json @@ -33,7 +33,18 @@ } }, { - "c": "@hm", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "hm", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", diff --git a/extensions/less/test/colorize-results/test-cssvariables_less.json b/extensions/less/test/colorize-results/test-cssvariables_less.json index bca9cd3c3a90c..1c9b8658a0adf 100644 --- a/extensions/less/test/colorize-results/test-cssvariables_less.json +++ b/extensions/less/test/colorize-results/test-cssvariables_less.json @@ -55,7 +55,18 @@ } }, { - "c": "--spacing-unit", + "c": "--", + "t": "source.css.less meta.property-list.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "spacing-unit", "t": "source.css.less meta.property-list.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -100,7 +111,7 @@ }, { "c": "px", - "t": "source.css.less meta.property-list.css meta.property-value.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-value.css constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -132,7 +143,18 @@ } }, { - "c": "--cell-padding", + "c": "--", + "t": "source.css.less meta.property-list.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "cell-padding", "t": "source.css.less meta.property-list.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", diff --git a/extensions/less/test/colorize-results/test_less.json b/extensions/less/test/colorize-results/test_less.json index 4cc4722023879..d6b39257feb6b 100644 --- a/extensions/less/test/colorize-results/test_less.json +++ b/extensions/less/test/colorize-results/test_less.json @@ -308,7 +308,18 @@ } }, { - "c": "@base", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "base", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -385,7 +396,18 @@ } }, { - "c": "@style", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "style", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -418,7 +440,18 @@ } }, { - "c": "@c", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "c", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -506,7 +539,18 @@ } }, { - "c": "@c", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "c", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -594,7 +638,18 @@ } }, { - "c": "@style", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "style", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -616,7 +671,18 @@ } }, { - "c": "@c", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "c", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -671,7 +737,18 @@ } }, { - "c": "@style", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "style", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -704,7 +781,18 @@ } }, { - "c": "@alpha", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "alpha", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -749,7 +837,7 @@ }, { "c": "%", - "t": "source.css.less keyword.other.unit.css", + "t": "source.css.less constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -836,7 +924,18 @@ } }, { - "c": "@alpha", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "alpha", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -913,7 +1012,18 @@ } }, { - "c": "@style", + "c": "@", + "t": "source.css.less meta.property-list.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "style", "t": "source.css.less meta.property-list.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -1232,7 +1342,18 @@ } }, { - "c": "@base", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "base", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -1277,7 +1398,7 @@ }, { "c": "%", - "t": "source.css.less meta.property-list.css meta.property-value.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-value.css constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1375,7 +1496,18 @@ } }, { - "c": "@base", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "base", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -1420,7 +1552,7 @@ }, { "c": "%", - "t": "source.css.less meta.property-list.css meta.property-value.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-value.css constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1585,7 +1717,7 @@ }, { "c": "px", - "t": "source.css.less meta.property-list.css meta.property-list.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-list.css constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1640,7 +1772,7 @@ }, { "c": "%", - "t": "source.css.less meta.property-list.css meta.property-list.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-list.css constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1849,7 +1981,7 @@ }, { "c": "px", - "t": "source.css.less meta.property-list.css meta.property-list.css meta.property-value.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-list.css meta.property-value.css constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -2058,7 +2190,7 @@ }, { "c": "px", - "t": "source.css.less meta.property-list.css meta.property-list.css meta.property-value.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-list.css meta.property-value.css constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -2311,7 +2443,7 @@ }, { "c": "px", - "t": "source.css.less meta.property-list.css meta.property-list.css meta.property-list.css meta.property-list.css meta.property-value.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-list.css meta.property-list.css meta.property-list.css meta.property-value.css constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -2398,7 +2530,18 @@ } }, { - "c": "@the-border", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "the-border", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -2443,7 +2586,7 @@ }, { "c": "px", - "t": "source.css.less keyword.other.unit.css", + "t": "source.css.less constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -2464,7 +2607,18 @@ } }, { - "c": "@base-color", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "base-color", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -2519,7 +2673,18 @@ } }, { - "c": "@red", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "red", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -2673,7 +2838,18 @@ } }, { - "c": "@base-color", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "base-color", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -2794,7 +2970,18 @@ } }, { - "c": "@the-border", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "the-border", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -2871,7 +3058,18 @@ } }, { - "c": "@the-border", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "the-border", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -3058,7 +3256,18 @@ } }, { - "c": "@base-color", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "base-color", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -3201,7 +3410,18 @@ } }, { - "c": "@red", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "red", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -3246,7 +3466,7 @@ }, { "c": "%", - "t": "source.css.less meta.property-list.css meta.property-value.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-value.css constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", From 567bbbc6add42129df944ba91feac01a86860b54 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 11:29:12 +0200 Subject: [PATCH 1057/2747] [php] update grammar --- extensions/php/syntaxes/php.tmLanguage.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/php/syntaxes/php.tmLanguage.json b/extensions/php/syntaxes/php.tmLanguage.json index d7e3a548ade64..8e69579120b01 100644 --- a/extensions/php/syntaxes/php.tmLanguage.json +++ b/extensions/php/syntaxes/php.tmLanguage.json @@ -2071,7 +2071,7 @@ "patterns": [ { "comment": "PHPDocumentor only recognises lines with an asterisk as the first non-whitespaces character", - "match": "^(?!\\s*\\*).*$\\n?", + "match": "^(?!\\s*\\*).*?(?:(?=\\*\\/)|$\\n?)", "name": "invalid.illegal.missing-asterisk.phpdoc.php" }, { @@ -2975,5 +2975,5 @@ ] } }, - "version": "https://github.com/atom/language-php/commit/22047c19f52f686de471d0deccae0cb1332997b6" + "version": "https://github.com/atom/language-php/commit/c523a19f849b97f6499eae6accf80564aa190c0e" } \ No newline at end of file From 6f274872ac46a58606eff6a646a98bf91cff6b82 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 12:26:41 +0200 Subject: [PATCH 1058/2747] Add information_for_contributors to grammars --- build/npm/update-all-grammars.js | 1 - build/npm/update-grammar.js | 16 ++++++++++++++-- .../clojure/syntaxes/clojure.tmLanguage.json | 8 ++++++-- .../syntaxes/coffeescript.tmLanguage.json | 8 ++++++-- extensions/cpp/syntaxes/c++.json | 8 ++++++-- extensions/cpp/syntaxes/c.json | 8 ++++++-- .../csharp/syntaxes/csharp.tmLanguage.json | 8 ++++++-- extensions/css/syntaxes/css.tmLanguage.json | 8 ++++++-- extensions/diff/syntaxes/diff.tmLanguage.json | 8 ++++++-- .../docker/syntaxes/docker.tmLanguage.json | 8 ++++++-- extensions/fsharp/syntaxes/fsharp.json | 8 ++++++-- .../syntaxes/git-commit.tmLanguage.json | 8 ++++++-- .../syntaxes/git-rebase.tmLanguage.json | 8 ++++++-- extensions/go/syntaxes/go.json | 8 ++++++-- .../groovy/syntaxes/groovy.tmLanguage.json | 8 ++++++-- .../syntaxes/Handlebars.tmLanguage.json | 8 ++++++-- extensions/hlsl/syntaxes/hlsl.json | 8 ++++++-- extensions/html/syntaxes/html.json | 8 ++++++-- extensions/ini/syntaxes/ini.tmLanguage.json | 8 ++++++-- extensions/java/syntaxes/java.tmLanguage.json | 8 ++++++-- .../syntaxes/JavaScript.tmLanguage.json | 8 ++++++-- extensions/less/syntaxes/less.tmLanguage.json | 8 ++++++-- extensions/lua/syntaxes/lua.json | 8 ++++++-- extensions/make/syntaxes/Makefile.json | 8 ++++++-- .../syntaxes/objective-c++.tmLanguage.json | 5 +++++ .../syntaxes/objective-c.tmLanguage.json | 8 ++++++-- extensions/perl/syntaxes/perl.tmLanguage.json | 8 ++++++-- extensions/perl/syntaxes/perl6.tmLanguage.json | 8 ++++++-- extensions/php/syntaxes/php.tmLanguage.json | 8 ++++++-- extensions/pug/syntaxes/pug.tmLanguage.json | 8 ++++++-- .../python/syntaxes/MagicPython.tmLanguage.json | 8 ++++++-- .../python/syntaxes/MagicRegExp.tmLanguage.json | 8 ++++++-- extensions/r/syntaxes/r.tmLanguage.json | 8 ++++++-- extensions/razor/syntaxes/cshtml.json | 8 ++++++-- extensions/ruby/syntaxes/ruby.tmLanguage.json | 8 ++++++-- extensions/rust/syntaxes/rust.tmLanguage.json | 8 ++++++-- extensions/scss/syntaxes/scss.json | 8 ++++++-- extensions/shaderlab/syntaxes/shaderlab.json | 8 ++++++-- .../syntaxes/Shell-Unix-Bash.tmLanguage.json | 8 ++++++-- extensions/swift/syntaxes/swift.tmLanguage.json | 8 ++++++-- .../syntaxes/TypeScript.tmLanguage.json | 8 ++++++-- .../syntaxes/TypeScriptReact.tmLanguage.json | 8 ++++++-- .../vb/syntaxes/asp-vb-net.tmlanguage.json | 8 ++++++-- extensions/xml/syntaxes/xml.json | 8 ++++++-- extensions/xml/syntaxes/xsl.json | 8 ++++++-- extensions/yaml/syntaxes/yaml.json | 8 ++++++-- 46 files changed, 277 insertions(+), 89 deletions(-) diff --git a/build/npm/update-all-grammars.js b/build/npm/update-all-grammars.js index 252b0f4edcb8b..88b890af730c1 100644 --- a/build/npm/update-all-grammars.js +++ b/build/npm/update-all-grammars.js @@ -5,7 +5,6 @@ const cp = require('child_process'); const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; -const integrationTests = process.platform === 'win32' ? '.\test-integration.bat' : './test-integration.sh'; function updateGrammar(location) { const result = cp.spawnSync(npm, ['run', 'update-grammar'], { diff --git a/build/npm/update-grammar.js b/build/npm/update-grammar.js index dbb12cdcb445e..fca60d83242dc 100644 --- a/build/npm/update-grammar.js +++ b/build/npm/update-grammar.js @@ -88,11 +88,23 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar) { modifyGrammar(grammar); } return getCommitSha(repoId, repoPath).then(function (info) { + let result = { + information_for_contributors: [ + 'This file has been converted from https://github.com/' + repoId + '/blob/master/' + repoPath, + 'If you want to provide a fix or improvement, please create a pull request against the original repository.', + 'Once accepted there, we are happy to receive an update request.' + ] + }; + if (info) { - grammar.version = 'https://github.com/' + repoId + '/commit/' + info.commitSha; + result.version = 'https://github.com/' + repoId + '/commit/' + info.commitSha; + } + for (let key in grammar) { + result[key] = grammar[key]; } + try { - fs.writeFileSync(dest, JSON.stringify(grammar, null, '\t')); + fs.writeFileSync(dest, JSON.stringify(result, null, '\t')); if (info) { console.log('Updated ' + path.basename(dest) + ' to ' + repoId + '@' + info.commitSha.substr(0, 7) + ' (' + info.commitDate.substr(0, 10) + ')'); } else { diff --git a/extensions/clojure/syntaxes/clojure.tmLanguage.json b/extensions/clojure/syntaxes/clojure.tmLanguage.json index 881ce191e1c6a..437a0c5b5e198 100644 --- a/extensions/clojure/syntaxes/clojure.tmLanguage.json +++ b/extensions/clojure/syntaxes/clojure.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-clojure/blob/master/grammars/clojure.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.clojure", "fileTypes": [ "boot", @@ -440,6 +445,5 @@ } ] } - }, - "version": "https://github.com/atom/language-clojure/commit/70e83b27444da31d6367a0aa447a216836eafc05" + } } \ No newline at end of file diff --git a/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json b/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json index d7c22867d7667..dae1d795f4522 100644 --- a/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json +++ b/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-coffee-script/blob/master/grammars/coffeescript.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.coffee", "name": "CoffeeScript", "fileTypes": [ @@ -686,6 +691,5 @@ } ] } - }, - "version": "https://github.com/atom/language-coffee-script/commit/49c117b24096a369f92dfce180b61bd1f0425a29" + } } \ No newline at end of file diff --git a/extensions/cpp/syntaxes/c++.json b/extensions/cpp/syntaxes/c++.json index 7ec3054f58ba1..bc627e3a036f3 100644 --- a/extensions/cpp/syntaxes/c++.json +++ b/extensions/cpp/syntaxes/c++.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-c/blob/master/grammars/c%2B%2B.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.cpp", "fileTypes": [ "cc", @@ -457,6 +462,5 @@ } ] } - }, - "version": "https://github.com/atom/language-c/commit/3a269f88b12e512fb9495dc006a1dabf325d3d7f" + } } \ No newline at end of file diff --git a/extensions/cpp/syntaxes/c.json b/extensions/cpp/syntaxes/c.json index 6cc84cff24df3..022f588cf28d9 100644 --- a/extensions/cpp/syntaxes/c.json +++ b/extensions/cpp/syntaxes/c.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-c/blob/master/grammars/c.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.c", "fileTypes": [ "c", @@ -1950,6 +1955,5 @@ } ] } - }, - "version": "https://github.com/atom/language-c/commit/1d137279178d06e7f7500800ebc36155e130172e" + } } \ No newline at end of file diff --git a/extensions/csharp/syntaxes/csharp.tmLanguage.json b/extensions/csharp/syntaxes/csharp.tmLanguage.json index eae75041576df..3f81563c5bb92 100644 --- a/extensions/csharp/syntaxes/csharp.tmLanguage.json +++ b/extensions/csharp/syntaxes/csharp.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/dotnet/csharp-tmLanguage/blob/master/grammars/csharp.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "name": "C#", "scopeName": "source.cs", "fileTypes": [ @@ -4186,6 +4191,5 @@ } } } - }, - "version": "https://github.com/dotnet/csharp-tmLanguage/commit/4d0e50c51f336645c98689737db1be321d212d3d" + } } \ No newline at end of file diff --git a/extensions/css/syntaxes/css.tmLanguage.json b/extensions/css/syntaxes/css.tmLanguage.json index 700b6dd314068..dae4475161aea 100644 --- a/extensions/css/syntaxes/css.tmLanguage.json +++ b/extensions/css/syntaxes/css.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-css/blob/master/grammars/css.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.css", "name": "CSS", "fileTypes": [ @@ -1796,6 +1801,5 @@ } ] } - }, - "version": "https://github.com/atom/language-css/commit/23dcdee3372050eb3f07374fbe9188884bd545d1" + } } \ No newline at end of file diff --git a/extensions/diff/syntaxes/diff.tmLanguage.json b/extensions/diff/syntaxes/diff.tmLanguage.json index ac16f416a6495..e259c46be42cb 100644 --- a/extensions/diff/syntaxes/diff.tmLanguage.json +++ b/extensions/diff/syntaxes/diff.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/diff.tmbundle/blob/master/Syntaxes/Diff.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "patch", "diff", @@ -158,6 +163,5 @@ } ], "scopeName": "source.diff", - "uuid": "7E848FF4-708E-11D9-97B4-0011242E4184", - "version": "https://github.com/textmate/diff.tmbundle/commit/0593bb775eab1824af97ef2172fd38822abd97d7" + "uuid": "7E848FF4-708E-11D9-97B4-0011242E4184" } \ No newline at end of file diff --git a/extensions/docker/syntaxes/docker.tmLanguage.json b/extensions/docker/syntaxes/docker.tmLanguage.json index 8be1c94055d3e..d8c2d0fd76666 100644 --- a/extensions/docker/syntaxes/docker.tmLanguage.json +++ b/extensions/docker/syntaxes/docker.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/moby/moby/blob/master/contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "Dockerfile" ], @@ -96,6 +101,5 @@ } ], "scopeName": "source.dockerfile", - "uuid": "a39d8795-59d2-49af-aa00-fe74ee29576e", - "version": "https://github.com/moby/moby/commit/8523e9d108a0e98865673701a7bd0a7929c5260b" + "uuid": "a39d8795-59d2-49af-aa00-fe74ee29576e" } \ No newline at end of file diff --git a/extensions/fsharp/syntaxes/fsharp.json b/extensions/fsharp/syntaxes/fsharp.json index 7ef61094dd103..f7abe7e8a5251 100644 --- a/extensions/fsharp/syntaxes/fsharp.json +++ b/extensions/fsharp/syntaxes/fsharp.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/ionide/ionide-fsgrammar/blob/master/grammar/fsharp.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "name": "fsharp", "scopeName": "source.fsharp", "fileTypes": [ @@ -456,6 +461,5 @@ } ] } - }, - "version": "https://github.com/ionide/ionide-fsgrammar/commit/f2e3c30f0ebfcc89fb78ad908701159f20516812" + } } \ No newline at end of file diff --git a/extensions/gitsyntax/syntaxes/git-commit.tmLanguage.json b/extensions/gitsyntax/syntaxes/git-commit.tmLanguage.json index 5f5db8762fa29..ffe1561f7271b 100644 --- a/extensions/gitsyntax/syntaxes/git-commit.tmLanguage.json +++ b/extensions/gitsyntax/syntaxes/git-commit.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/git.tmbundle/blob/master/Syntaxes/Git%20Commit%20Message.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "COMMIT_EDITMSG", "MERGE_MSG" @@ -138,6 +143,5 @@ } }, "scopeName": "text.git-commit", - "uuid": "BFE83C06-8508-44BE-A975-95A57BF619A7", - "version": "https://github.com/textmate/git.tmbundle/commit/93897a78c6e52bef13dadc0d4091d203c5facb40" + "uuid": "BFE83C06-8508-44BE-A975-95A57BF619A7" } \ No newline at end of file diff --git a/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage.json b/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage.json index c8bf731d9cb2a..15bac0d8d0932 100644 --- a/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage.json +++ b/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/git.tmbundle/blob/master/Syntaxes/Git%20Rebase%20Message.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "git-rebase-todo" ], @@ -30,6 +35,5 @@ } ], "scopeName": "text.git-rebase", - "uuid": "7F1CC209-5F6D-486A-8180-09FA282381A1", - "version": "https://github.com/textmate/git.tmbundle/commit/d1db42c2d71948662098183a6df519fb53a7a15b" + "uuid": "7F1CC209-5F6D-486A-8180-09FA282381A1" } \ No newline at end of file diff --git a/extensions/go/syntaxes/go.json b/extensions/go/syntaxes/go.json index 53908a80bac86..098c8710482c7 100644 --- a/extensions/go/syntaxes/go.json +++ b/extensions/go/syntaxes/go.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-go/blob/master/grammars/go.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.go", "name": "Go", "comment": "Go language", @@ -624,6 +629,5 @@ } ] } - }, - "version": "https://github.com/atom/language-go/commit/c1fe618ccf2dcd17118c5600c49b1c539f26d5c5" + } } \ No newline at end of file diff --git a/extensions/groovy/syntaxes/groovy.tmLanguage.json b/extensions/groovy/syntaxes/groovy.tmLanguage.json index 8850454840eb4..3dc8af7d0a168 100644 --- a/extensions/groovy/syntaxes/groovy.tmLanguage.json +++ b/extensions/groovy/syntaxes/groovy.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/groovy.tmbundle/blob/master/Syntaxes/Groovy.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "groovy", "gvy" @@ -1381,6 +1386,5 @@ } }, "scopeName": "source.groovy", - "uuid": "B3A64888-EBBB-4436-8D9E-F1169C5D7613", - "version": "https://github.com/textmate/groovy.tmbundle/commit/85d8f7c97ae473ccb9473f6c8d27e4ec957f4be1" + "uuid": "B3A64888-EBBB-4436-8D9E-F1169C5D7613" } \ No newline at end of file diff --git a/extensions/handlebars/syntaxes/Handlebars.tmLanguage.json b/extensions/handlebars/syntaxes/Handlebars.tmLanguage.json index 9e3579d90c283..e915b691d7faa 100644 --- a/extensions/handlebars/syntaxes/Handlebars.tmLanguage.json +++ b/extensions/handlebars/syntaxes/Handlebars.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/daaain/Handlebars/blob/master/grammars/Handlebars.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "name": "Handlebars", "repository": { "html_tags": { @@ -849,6 +854,5 @@ "template", "tmpl" ], - "uuid": "70E91676-DE0A-4266-A2B9-3AD2E535E484", - "version": "https://github.com/daaain/Handlebars/commit/4e8244410815da73f93375532939d48bd5a9bb93" + "uuid": "70E91676-DE0A-4266-A2B9-3AD2E535E484" } \ No newline at end of file diff --git a/extensions/hlsl/syntaxes/hlsl.json b/extensions/hlsl/syntaxes/hlsl.json index 91dcf2b252026..20565922c5383 100644 --- a/extensions/hlsl/syntaxes/hlsl.json +++ b/extensions/hlsl/syntaxes/hlsl.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/tgjones/shaders-tmLanguage/blob/master/grammars/hlsl.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.hlsl", "name": "HLSL", "fileTypes": [ @@ -213,6 +218,5 @@ } ] } - ], - "version": "https://github.com/tgjones/shaders-tmLanguage/commit/cd1ef40f549f9ce2b9e6b73498688de114a85382" + ] } \ No newline at end of file diff --git a/extensions/html/syntaxes/html.json b/extensions/html/syntaxes/html.json index cc2d9fd17ea60..4192c82470395 100644 --- a/extensions/html/syntaxes/html.json +++ b/extensions/html/syntaxes/html.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/html.tmbundle/blob/master/Syntaxes/HTML.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "html", "htm", @@ -742,6 +747,5 @@ } }, "scopeName": "text.html.basic", - "uuid": "17994EC8-6B1D-11D9-AC3A-000D93589AF6", - "version": "https://github.com/textmate/html.tmbundle/commit/a723f08ebd49c67c22aca08dd8f17d0bf836ec93" + "uuid": "17994EC8-6B1D-11D9-AC3A-000D93589AF6" } \ No newline at end of file diff --git a/extensions/ini/syntaxes/ini.tmLanguage.json b/extensions/ini/syntaxes/ini.tmLanguage.json index e8f1a0ef9b330..34679c1bee09c 100644 --- a/extensions/ini/syntaxes/ini.tmLanguage.json +++ b/extensions/ini/syntaxes/ini.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/ini.tmbundle/blob/master/Syntaxes/Ini.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "ini", "conf" @@ -109,6 +114,5 @@ } ], "scopeName": "source.ini", - "uuid": "77DC23B6-8A90-11D9-BAA4-000A9584EC8C", - "version": "https://github.com/textmate/ini.tmbundle/commit/2af0cbb0704940f967152616f2f1ff0aae6287a6" + "uuid": "77DC23B6-8A90-11D9-BAA4-000A9584EC8C" } \ No newline at end of file diff --git a/extensions/java/syntaxes/java.tmLanguage.json b/extensions/java/syntaxes/java.tmLanguage.json index 5d0513d49b0f1..654bf8e2ba8fc 100644 --- a/extensions/java/syntaxes/java.tmLanguage.json +++ b/extensions/java/syntaxes/java.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-java/blob/master/grammars/java.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.java", "name": "Java", "fileTypes": [ @@ -1360,6 +1365,5 @@ } ] } - }, - "version": "https://github.com/atom/language-java/commit/0e0ec7966059e3e363868311b3d855014bca95dd" + } } \ No newline at end of file diff --git a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json index d7aabe6479b4f..8856e46770c60 100644 --- a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json +++ b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/Microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "name": "JavaScript (with React support)", "scopeName": "source.js", "fileTypes": [ @@ -4222,6 +4227,5 @@ } ] } - }, - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8c967fe7553297bfad672b7417d78e357c8fe724" + } } \ No newline at end of file diff --git a/extensions/less/syntaxes/less.tmLanguage.json b/extensions/less/syntaxes/less.tmLanguage.json index cd25b2a89b513..cd1543fd7d3eb 100644 --- a/extensions/less/syntaxes/less.tmLanguage.json +++ b/extensions/less/syntaxes/less.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-less/blob/master/grammars/less.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "name": "Less", "scopeName": "source.css.less", "fileTypes": [ @@ -540,6 +545,5 @@ "match": "\\b(abs|acos|alpha|argb|asin|atan|average|blue|calc|ceil|color|contrast|convert|convert|cos|darken|data-uri|desaturate|difference|e|escape|exclusion|extract|fade|fadein|fadeout|floor|format|green|greyscale|hardlight|hsl|hsla|hsv|hsva|hsvhue|hsvsaturation|hsvvalue|hue|length|lighten|lightness|luma|max|min|mix|mod|multiply|negation|overlay|percentage|pi|pow|red|replace|round|saturate|saturation|screen|sin|softlight|spin|sqrt|tan|unit)\\b", "name": "support.function.any-method.builtin.less" } - }, - "version": "https://github.com/atom/language-less/commit/4661d870784f725599e438bf683553cc6cf0f4ed" + } } \ No newline at end of file diff --git a/extensions/lua/syntaxes/lua.json b/extensions/lua/syntaxes/lua.json index a4da3a43c6a1f..efea9819bdee4 100644 --- a/extensions/lua/syntaxes/lua.json +++ b/extensions/lua/syntaxes/lua.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/lua.tmbundle/blob/master/Syntaxes/Lua.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "comment": "Lua Syntax: version 0.8", "fileTypes": [ "lua", @@ -275,6 +280,5 @@ } }, "scopeName": "source.lua", - "uuid": "93E017CC-6F27-11D9-90EB-000D93589AF7", - "version": "https://github.com/textmate/lua.tmbundle/commit/3a97f1b46804a3de99d4d2909e14450299462f2d" + "uuid": "93E017CC-6F27-11D9-90EB-000D93589AF7" } \ No newline at end of file diff --git a/extensions/make/syntaxes/Makefile.json b/extensions/make/syntaxes/Makefile.json index 2264321c9c837..1562efc5c1768 100644 --- a/extensions/make/syntaxes/Makefile.json +++ b/extensions/make/syntaxes/Makefile.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/make.tmbundle/blob/master/Syntaxes/Makefile.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "Makefile", "makefile", @@ -470,6 +475,5 @@ } }, "scopeName": "source.makefile", - "uuid": "FF1825E8-6B1C-11D9-B883-000D93589AF6", - "version": "https://github.com/textmate/make.tmbundle/commit/1a1827da81e20fdce56e2658451340c070ca44b7" + "uuid": "FF1825E8-6B1C-11D9-B883-000D93589AF6" } \ No newline at end of file diff --git a/extensions/objective-c/syntaxes/objective-c++.tmLanguage.json b/extensions/objective-c/syntaxes/objective-c++.tmLanguage.json index 26550c61e1b18..2b46507a2fba2 100644 --- a/extensions/objective-c/syntaxes/objective-c++.tmLanguage.json +++ b/extensions/objective-c/syntaxes/objective-c++.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-objective-c/blob/master/grammars/objective-c++.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.objcpp", "fileTypes": [ "mm", diff --git a/extensions/objective-c/syntaxes/objective-c.tmLanguage.json b/extensions/objective-c/syntaxes/objective-c.tmLanguage.json index 2037028b0c34c..a07e0ba7f437a 100644 --- a/extensions/objective-c/syntaxes/objective-c.tmLanguage.json +++ b/extensions/objective-c/syntaxes/objective-c.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-objective-c/blob/master/grammars/objective-c.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.objc", "fileTypes": [ "m", @@ -993,6 +998,5 @@ } ] } - }, - "version": "https://github.com/atom/language-objective-c/commit/0727e04544f3414c1c339cf15a39a05ea3938cb4" + } } \ No newline at end of file diff --git a/extensions/perl/syntaxes/perl.tmLanguage.json b/extensions/perl/syntaxes/perl.tmLanguage.json index 612c4796cbe7c..4c4209c317b0a 100644 --- a/extensions/perl/syntaxes/perl.tmLanguage.json +++ b/extensions/perl/syntaxes/perl.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/perl.tmbundle/blob/master/Syntaxes/Perl.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "comment": "\n\tTODO:\tInclude RegExp syntax\n", "fileTypes": [ "pl", @@ -2541,6 +2546,5 @@ } }, "scopeName": "source.perl", - "uuid": "EDBFE125-6B1C-11D9-9189-000D93589AF6", - "version": "https://github.com/textmate/perl.tmbundle/commit/c0b7a4bd65882380522d82a60b536479a62b07c3" + "uuid": "EDBFE125-6B1C-11D9-9189-000D93589AF6" } \ No newline at end of file diff --git a/extensions/perl/syntaxes/perl6.tmLanguage.json b/extensions/perl/syntaxes/perl6.tmLanguage.json index a3024a11ae78e..9ddfdf4250901 100644 --- a/extensions/perl/syntaxes/perl6.tmLanguage.json +++ b/extensions/perl/syntaxes/perl6.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/perl.tmbundle/blob/master/Syntaxes/Perl%206.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "p6", "pl6", @@ -314,6 +319,5 @@ } }, "scopeName": "source.perl.6", - "uuid": "E685440C-0E20-4424-9693-864D5240A269", - "version": "https://github.com/textmate/perl.tmbundle/commit/d9841a0878239fa43f88c640f8d458590f97e8f5" + "uuid": "E685440C-0E20-4424-9693-864D5240A269" } \ No newline at end of file diff --git a/extensions/php/syntaxes/php.tmLanguage.json b/extensions/php/syntaxes/php.tmLanguage.json index 8e69579120b01..b815d80e0720e 100644 --- a/extensions/php/syntaxes/php.tmLanguage.json +++ b/extensions/php/syntaxes/php.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-php/blob/master/grammars/php.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "text.html.php", "name": "PHP", "fileTypes": [ @@ -2974,6 +2979,5 @@ } ] } - }, - "version": "https://github.com/atom/language-php/commit/c523a19f849b97f6499eae6accf80564aa190c0e" + } } \ No newline at end of file diff --git a/extensions/pug/syntaxes/pug.tmLanguage.json b/extensions/pug/syntaxes/pug.tmLanguage.json index 808be9e6db8c2..8a3d17a81dc2c 100644 --- a/extensions/pug/syntaxes/pug.tmLanguage.json +++ b/extensions/pug/syntaxes/pug.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/davidrios/jade-tmbundle/blob/master/Syntaxes/Jade.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "jade" ], @@ -981,6 +986,5 @@ } }, "scopeName": "text.jade", - "uuid": "eee6ba25-6ac2-4f7e-9c70-cddf2bd3448b", - "version": "https://github.com/davidrios/jade-tmbundle/commit/f311a516bb29296fcebfdc7da8149b1c79dfb0a1" + "uuid": "eee6ba25-6ac2-4f7e-9c70-cddf2bd3448b" } \ No newline at end of file diff --git a/extensions/python/syntaxes/MagicPython.tmLanguage.json b/extensions/python/syntaxes/MagicPython.tmLanguage.json index f9d673e627361..29e51b920fac4 100644 --- a/extensions/python/syntaxes/MagicPython.tmLanguage.json +++ b/extensions/python/syntaxes/MagicPython.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/MagicStack/MagicPython/blob/master/grammars/MagicPython.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "name": "MagicPython", "scopeName": "source.python", "fileTypes": [ @@ -5230,6 +5235,5 @@ } ] } - }, - "version": "https://github.com/MagicStack/MagicPython/commit/976e59dcb78cb577e79c8f2117216c06718337e0" + } } \ No newline at end of file diff --git a/extensions/python/syntaxes/MagicRegExp.tmLanguage.json b/extensions/python/syntaxes/MagicRegExp.tmLanguage.json index b5795a7b89f3d..34d1a973578a4 100644 --- a/extensions/python/syntaxes/MagicRegExp.tmLanguage.json +++ b/extensions/python/syntaxes/MagicRegExp.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/MagicStack/MagicPython/blob/master/grammars/MagicRegExp.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "name": "MagicRegExp", "scopeName": "source.regexp.python", "fileTypes": [ @@ -460,6 +465,5 @@ } ] } - }, - "version": "https://github.com/MagicStack/MagicPython/commit/df5bb18c64252f2e7b1aa87e2ed124666d314f1d" + } } \ No newline at end of file diff --git a/extensions/r/syntaxes/r.tmLanguage.json b/extensions/r/syntaxes/r.tmLanguage.json index 829be8d0d2b15..025877c7ab4e1 100644 --- a/extensions/r/syntaxes/r.tmLanguage.json +++ b/extensions/r/syntaxes/r.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/r.tmbundle/blob/master/Syntaxes/R.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "R", "r", @@ -199,6 +204,5 @@ } ], "scopeName": "source.r", - "uuid": "B2E6B78D-6E70-11D9-A369-000D93B3A10E", - "version": "https://github.com/textmate/r.tmbundle/commit/6b04ff3424f3f1cdfe64a9cfb71d8765959be250" + "uuid": "B2E6B78D-6E70-11D9-A369-000D93B3A10E" } \ No newline at end of file diff --git a/extensions/razor/syntaxes/cshtml.json b/extensions/razor/syntaxes/cshtml.json index 402915e8c9fc0..180ad0e68dd23 100644 --- a/extensions/razor/syntaxes/cshtml.json +++ b/extensions/razor/syntaxes/cshtml.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/demyte/language-cshtml/blob/master/grammars/cshtml.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "name": "ASP.NET Razor", "scopeName": "text.html.cshtml", "fileTypes": [ @@ -148,6 +153,5 @@ "end": "\\*@", "name": "comment.block.cshtml" } - }, - "version": "https://github.com/demyte/language-cshtml/commit/a49735dc7aef56ae772a3bcfd8e42c89895dcff4" + } } \ No newline at end of file diff --git a/extensions/ruby/syntaxes/ruby.tmLanguage.json b/extensions/ruby/syntaxes/ruby.tmLanguage.json index dce58f758b1cf..a6e0c01b7b9fa 100644 --- a/extensions/ruby/syntaxes/ruby.tmLanguage.json +++ b/extensions/ruby/syntaxes/ruby.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/ruby.tmbundle/blob/master/Syntaxes/Ruby.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "comment": "\n\tTODO: unresolved issues\n\n\ttext:\n\t\"p <", "name": "comment.block.xml" } - }, - "version": "https://github.com/atom/language-xml/commit/ac6bc8ef6a9c79ac3c7e31615bc18436b0c815ab" + } } \ No newline at end of file diff --git a/extensions/xml/syntaxes/xsl.json b/extensions/xml/syntaxes/xsl.json index 8b715b599f94e..2193c1a9570ab 100644 --- a/extensions/xml/syntaxes/xsl.json +++ b/extensions/xml/syntaxes/xsl.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-xml/blob/master/grammars/xsl.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "text.xml.xsl", "name": "XSL", "fileTypes": [ @@ -88,6 +93,5 @@ }, "name": "string.quoted.single.xml" } - }, - "version": "https://github.com/atom/language-xml/commit/507de2ee7daca60cf02e9e21fbeb92bbae73e280" + } } \ No newline at end of file diff --git a/extensions/yaml/syntaxes/yaml.json b/extensions/yaml/syntaxes/yaml.json index 55939b86d8d9a..82cd7d840dbee 100644 --- a/extensions/yaml/syntaxes/yaml.json +++ b/extensions/yaml/syntaxes/yaml.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/yaml.tmbundle/blob/master/Syntaxes/YAML.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "yaml", "yml", @@ -624,6 +629,5 @@ } }, "scopeName": "source.yaml", - "uuid": "686AD6AE-33F3-4493-9512-9E9FC1D5417F", - "version": "https://github.com/textmate/yaml.tmbundle/commit/efc96efafe5e48480cf55a2ed124b388cbea4440" + "uuid": "686AD6AE-33F3-4493-9512-9E9FC1D5417F" } \ No newline at end of file From f33b73f8e064df35930bc5be8da658f8570587eb Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 13:03:01 +0200 Subject: [PATCH 1059/2747] Possible bugs around non-invoking usage of `isEmpty`. Fixes #27201 --- src/vs/editor/contrib/folding/browser/folding.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/contrib/folding/browser/folding.ts b/src/vs/editor/contrib/folding/browser/folding.ts index 9f644ccd761bd..74df9c51570ff 100644 --- a/src/vs/editor/contrib/folding/browser/folding.ts +++ b/src/vs/editor/contrib/folding/browser/folding.ts @@ -287,7 +287,7 @@ export class FoldingController implements IFoldingController { return; } let range = e.target.range; - if (!range || !range.isEmpty) { + if (!range) { return; } if (!e.event.leftButton) { @@ -303,7 +303,7 @@ export class FoldingController implements IFoldingController { break; case MouseTargetType.CONTENT_EMPTY: case MouseTargetType.CONTENT_TEXT: - if (range.isEmpty && range.startColumn === model.getLineMaxColumn(range.startLineNumber)) { + if (range.startColumn === model.getLineMaxColumn(range.startLineNumber)) { break; } return; @@ -322,7 +322,7 @@ export class FoldingController implements IFoldingController { let iconClicked = this.mouseDownInfo.iconClicked; let range = e.target.range; - if (!range || !range.isEmpty || range.startLineNumber !== lineNumber) { + if (!range || range.startLineNumber !== lineNumber) { return; } From 409a694c2def2a0d630b0ecf948bc14bbd42f590 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Thu, 25 May 2017 07:03:56 -0700 Subject: [PATCH 1060/2747] Fix failing ripgrep test --- .../services/search/test/node/ripgrepTextSearch.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts b/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts index 2f377d82d27be..1ee3f9a6a835a 100644 --- a/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts +++ b/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts @@ -70,7 +70,7 @@ suite('RipgrepParser', () => { assert.deepEqual(results[0], { numMatches: 2, - path: path.join(rootFolder, 'a.txt'), + path: path.resolve(rootFolder, 'a.txt'), lineMatches: [ { lineNumber: 0, From 953acb6d7881fdf8b71ffa64ad7a981c68f1931e Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 25 May 2017 17:15:23 +0200 Subject: [PATCH 1061/2747] Fixes Microsoft/monaco-editor#278 --- src/vs/editor/editor.main.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/editor.main.ts b/src/vs/editor/editor.main.ts index 667a3004499c7..012e073ff516f 100644 --- a/src/vs/editor/editor.main.ts +++ b/src/vs/editor/editor.main.ts @@ -21,10 +21,17 @@ import { EDITOR_DEFAULTS, WrappingIndent } from 'vs/editor/common/config/editorO (EDITOR_DEFAULTS.contribInfo).folding = false; (EDITOR_DEFAULTS.viewInfo).glyphMargin = false; +let base = createMonacoBaseAPI(); +for (let prop in base) { + if (base.hasOwnProperty(prop)) { + exports[prop] = base[prop]; + } +} +exports.editor = createMonacoEditorAPI(); +exports.languages = createMonacoLanguagesAPI(); + var global: any = self; -global.monaco = createMonacoBaseAPI(); -global.monaco.editor = createMonacoEditorAPI(); -global.monaco.languages = createMonacoLanguagesAPI(); +global.monaco = exports; if (typeof global.require !== 'undefined' && typeof global.require.config === 'function') { global.require.config({ From fe1d9cb797d644c43935069bdf99bd9f72c6f8f6 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 May 2017 08:44:07 -0700 Subject: [PATCH 1062/2747] Move terminal.foreground defaults to JS Fixes #27230 --- .../parts/terminal/electron-browser/media/terminal.css | 3 --- .../terminal/electron-browser/terminalColorRegistry.ts | 6 +++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css b/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css index f35dde259bf6f..5a7d34f9e1849 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css @@ -9,12 +9,9 @@ display: flex; flex-direction: column; background-color: transparent!important; - color: #333; -webkit-user-select: initial; position: relative; } -.vs-dark .monaco-workbench .panel.integrated-terminal { color: #CCC; } -.hc-black .monaco-workbench .panel.integrated-terminal { color: #FFF; } .monaco-workbench .panel.integrated-terminal .terminal-outer-container { height: 100%; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts index 27f3f23c8ba71..ae1d524a91223 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts @@ -14,7 +14,11 @@ import { registerColor, ColorIdentifier } from 'vs/platform/theme/common/colorRe export const ansiColorIdentifiers: ColorIdentifier[] = []; export const TERMINAL_BACKGROUND_COLOR = registerColor('terminal.background', null, nls.localize('terminal.background', 'The background color of the terminal, this allows coloring the terminal differently to the panel.')); -export const TERMINAL_FOREGROUND_COLOR = registerColor('terminal.foreground', null, nls.localize('terminal.foreground', 'The foreground color of the terminal.')); +export const TERMINAL_FOREGROUND_COLOR = registerColor('terminal.foreground', { + light: '#333333', + dark: '#CCCCCC', + hc: 'FFFFFF' +}, nls.localize('terminal.foreground', 'The foreground color of the terminal.')); const ansiColorMap = { 'terminal.ansiBlack': { From 306de468b0016acde9d86baa6846dbf02e30dcb3 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 May 2017 08:44:54 -0700 Subject: [PATCH 1063/2747] Remove deprecated css property --- .../parts/terminal/electron-browser/media/terminal.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css b/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css index 5a7d34f9e1849..f2cc6747e2c4d 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css @@ -9,7 +9,7 @@ display: flex; flex-direction: column; background-color: transparent!important; - -webkit-user-select: initial; + user-select: initial; position: relative; } From 4c9e59f6926532b69b7db374c8fcfa4cb05ae1ce Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 25 May 2017 09:09:41 -0700 Subject: [PATCH 1064/2747] More welcome page colors (#25798) --- .../electron-browser/vs_code_welcome_page.ts | 38 +++++----- .../page/electron-browser/welcomePage.css | 69 +------------------ .../page/electron-browser/welcomePage.ts | 26 ++++++- 3 files changed, 47 insertions(+), 86 deletions(-) diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts index cc27fe4978c77..767ee36747ab1 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts @@ -14,13 +14,13 @@ export default () => `
    -

    ${escape(localize('welcomePage.vscode', "Visual Studio Code"))}

    -

    ${escape(localize('welcomePage.editingEvolved', "Editing evolved"))}

    +

    ${escape(localize('welcomePage.vscode', "Visual Studio Code"))}

    +

    ${escape(localize('welcomePage.editingEvolved', "Editing evolved"))}

    -

    ${escape(localize('welcomePage.start', "Start"))}

    +

    ${escape(localize('welcomePage.start', "Start"))}

    -

    ${escape(localize('welcomePage.recent', "Recent"))}

    +

    ${escape(localize('welcomePage.recent', "Recent"))}

    -

    ${escape(localize('welcomePage.noRecentFolders', "No recent folders"))}

    +

    ${escape(localize('welcomePage.noRecentFolders', "No recent folders"))}

    -

    +

    -

    ${escape(localize('welcomePage.customize', "Customize"))}

    +

    ${escape(localize('welcomePage.customize', "Customize"))}

      -
    • -
    • -
    • +
    -

    ${escape(localize('welcomePage.learn', "Learn"))}

    +

    ${escape(localize('welcomePage.learn', "Learn"))}

      -
    • -
    • -
    • +
    • +
    • +
    diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css index 982a72d9d1bfb..a3c2fa3e6867e 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css @@ -16,9 +16,6 @@ max-width: 1200px; font-size: 10px; } -.vs .monaco-workbench > .part.editor > .content .welcomePage { - color: #6C6C6C; -} .monaco-workbench > .part.editor > .content .welcomePage .row { display: flex; @@ -41,66 +38,36 @@ } .monaco-workbench > .part.editor > .content .welcomePage a { - color: #2e70c0; text-decoration: none; } -.vs-dark .monaco-workbench > .part.editor > .content .welcomePage a { - color: #4080D0; -} - .monaco-workbench > .part.editor > .content .welcomePage a:focus { outline: 1px solid -webkit-focus-ring-color; outline-offset: -1px; } -.monaco-workbench > .part.editor > .content .welcomePage a:hover { - color: #6ea0dc; -} - -.hc-black .monaco-workbench > .part.editor > .content .welcomePage a { - color: #0b9eff; -} - -.hc-black .monaco-workbench > .part.editor > .content .welcomePage a:hover { - color: #f38518; -} - .monaco-workbench > .part.editor > .content .welcomePage h1 { padding: 0; margin: 0; border: none; font-weight: normal; - color: rgba(0,0,0,.8); font-size: 3.6em; white-space: nowrap; } -.vs-dark .monaco-workbench > .part.editor > .content .welcomePage h1 { - color: rgba(255,255,255,.76); -} - -.hc-black .monaco-workbench > .part.editor > .content .welcomePage h1 { - color: white; -} - .monaco-workbench > .part.editor > .content .welcomePage .title { margin-top: 1em; margin-bottom: 1em; flex: 1 100%; } + .monaco-workbench > .part.editor > .content .welcomePage .subtitle { margin-top: .8em; font-size: 2.6em; - color: rgba(0,0,0,.53); display: block; } -.vs-dark .monaco-workbench > .part.editor > .content .welcomePage .subtitle { - color: rgba(255,255,255,.46); -} .hc-black .monaco-workbench > .part.editor > .content .welcomePage .subtitle { - color: white; font-weight: 200; } @@ -150,22 +117,6 @@ } .monaco-workbench > .part.editor > .content .welcomePage .splash .recent .path { padding-left: 1em; - color: rgba(255,255,255,.46); -} - -.monaco-workbench > .part.editor > .content .welcomePage .splash .recent .none, -.monaco-workbench > .part.editor > .content .welcomePage .splash .recent .path { - color: rgba(0,0,0,.53); -} - -.vs-dark .monaco-workbench > .part.editor > .content .welcomePage .splash .recent .none, -.vs-dark .monaco-workbench > .part.editor > .content .welcomePage .splash .recent .path { - color: rgba(255,255,255,.46); -} - -.hc-black .monaco-workbench > .part.editor > .content .welcomePage .splash .recent .none, -.hc-black .monaco-workbench > .part.editor > .content .welcomePage .splash .recent .path { - color: white; } .monaco-workbench > .part.editor > .content .welcomePage .splash .title, @@ -207,41 +158,27 @@ margin-bottom: .25em; } -.vs .monaco-workbench > .part.editor > .content .welcomePage .commands li button h3 { - color: #2c2c2c; -} - .monaco-workbench > .part.editor > .content .welcomePage .commands li button { - color: #6c6c6c; border: none; } -.vs-dark .monaco-workbench > .part.editor > .content .welcomePage .commands li button > h3 { - color: #ccc; -} - .hc-black .monaco-workbench > .part.editor > .content .welcomePage .commands li button > h3 { font-weight: bold; } -.vs-dark .monaco-workbench > .part.editor > .content .welcomePage .commands li button { - color: #828282; -} - .monaco-workbench > .part.editor > .content .welcomePage .commands li button:focus { outline-style: solid; outline-width: 1px; } .hc-black .monaco-workbench > .part.editor > .content .welcomePage .commands li button { - color: white; - border-color: #f38518; border-width: 1px; border-style: solid; } .hc-black .monaco-workbench > .part.editor > .content .welcomePage .commands li button:hover { - outline: 1px dashed #f38518; + outline-width: 1px; + outline-style: dashed; outline-offset: -5px; } diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 874bc17d8ddc5..86dde1dd27dcf 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -35,7 +35,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { tildify } from 'vs/base/common/labels'; import { isLinux } from 'vs/base/common/platform'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { registerColor } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, textLinkForeground, foreground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { getExtraColor } from 'vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils'; used(); @@ -240,6 +240,7 @@ class WelcomePage { const span = document.createElement('span'); span.classList.add('path'); + span.classList.add('detail'); span.innerText = tildify(parentFolder, this.environmentService.userHome); span.title = folder; li.appendChild(span); @@ -446,10 +447,21 @@ class WelcomePage { // theming +const caption = registerColor('welcomePage.caption', { dark: '#FFFFFFC2', light: '#000000D4', hc: foreground }, localize('welcomePage.caption', 'Caption color on the Welcome page.')); +const detail = registerColor('welcomePage.detail', { dark: '#FFFFFF76', light: '#00000088', hc: foreground }, localize('welcomePage.detail', 'Detail color on the Welcome page.')); + const quickLinkBackground = registerColor('welcomePage.quickLinkBackground', { dark: null, light: null, hc: null }, localize('welcomePage.quickLinkBackground', 'Background color for the quick links on the Welcome page.')); const quickLinkHoverBackground = registerColor('welcomePage.quickLinkHoverBackground', { dark: null, light: null, hc: null }, localize('welcomePage.quickLinkHoverBackground', 'Hover background color for the quick links on the Welcome page.')); registerThemingParticipant((theme, collector) => { + const captionColor = theme.getColor(caption); + if (captionColor) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .caption { color: ${captionColor}; }`); + } + const detailColor = theme.getColor(detail); + if (detailColor) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .detail { color: ${detailColor}; }`); + } const color = getExtraColor(theme, quickLinkBackground, { dark: 'rgba(0, 0, 0, .2)', extra_dark: 'rgba(200, 235, 255, .042)', light: 'rgba(0,0,0,.04)', hc: 'black' }); if (color) { collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .commands li button { background: ${color}; }`); @@ -458,4 +470,16 @@ registerThemingParticipant((theme, collector) => { if (hover) { collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .commands li button:hover { background: ${hover}; }`); } + const link = theme.getColor(textLinkForeground); + if (link) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage a { color: ${link}; }`); + } + const border = theme.getColor(contrastBorder); + if (border) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .commands li button { border-color: ${border}; }`); + } + const activeBorder = theme.getColor(activeContrastBorder); + if (activeBorder) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .commands li button:hover { outline-color: ${activeBorder}; }`); + } }); From 485629d4163c898324c6ef7434c86097a9d4bfb1 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 25 May 2017 09:49:50 -0700 Subject: [PATCH 1065/2747] Playground colors (#25798) --- .../electron-browser/walkThroughPart.css | 30 ++----------------- .../electron-browser/walkThroughPart.ts | 23 +++++++++++++- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.css b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.css index baaf1f3ceed36..305fece6c6b34 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.css +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.css @@ -17,7 +17,6 @@ } .monaco-workbench > .part.editor > .content .walkThroughContent a { - color: #4080D0; text-decoration: none; } @@ -69,7 +68,6 @@ } .monaco-workbench > .part.editor > .content .walkThroughContent a:hover { - color: #4080D0; text-decoration: underline; } @@ -106,36 +104,11 @@ line-height: 19px; } -/*.monaco-workbench.mac > .part.editor > .content .walkThroughContent code, -.monaco-workbench.mac > .part.editor > .content .walkThroughContent .shortcut { - font-size: 12px; - line-height: 18px; -}*/ - -.vs .monaco-workbench > .part.editor > .content .walkThroughContent code, -.vs .monaco-workbench > .part.editor > .content .walkThroughContent .shortcut { - color: #A31515; -} - -.vs-dark .monaco-workbench > .part.editor > .content .walkThroughContent code, -.vs-dark .monaco-workbench > .part.editor > .content .walkThroughContent .shortcut { - color: #D7BA7D; -} - .monaco-workbench > .part.editor > .content .walkThroughContent blockquote { margin: 0 7px 0 5px; padding: 0 16px 0 10px; border-left: 5px solid; } -.vs .monaco-workbench > .part.editor > .content .walkThroughContent blockquote, -.vs-dark .monaco-workbench > .part.editor > .content .walkThroughContent blockquote { - background: rgba(127, 127, 127, 0.1); - border-color: rgba(0, 122, 204, 0.5); -} -.hc-black .monaco-workbench > .part.editor > .content .walkThroughContent blockquote { - background: transparent; - border-color: #fff; -} .monaco-workbench > .part.editor > .content .walkThroughContent .monaco-tokenized-source { white-space: pre; @@ -162,5 +135,6 @@ } .hc-black .monaco-workbench > .part.editor > .content .walkThroughContent .monaco-editor { - border: 1px white solid + border-width: 1px; + border-style: solid; } diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 2fcbace413f7e..f22fa7e0702e5 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -38,7 +38,7 @@ import { IPartService } from 'vs/workbench/services/part/common/partService'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { registerColor } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, textLinkForeground, textPreformatForeground, contrastBorder, textBlockQuoteBackground, textBlockQuoteBorder } from 'vs/platform/theme/common/colorRegistry'; import { getExtraColor } from 'vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils'; export const WALK_THROUGH_FOCUS = new RawContextKey('interactivePlaygroundFocus', false); @@ -534,4 +534,25 @@ registerThemingParticipant((theme, collector) => { collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent .monaco-editor-background, .monaco-workbench > .part.editor > .content .walkThroughContent .margin-view-overlays { background: ${color}; }`); } + const link = theme.getColor(textLinkForeground); + if (link) { + collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent a { color: ${link}; }`); + } + const shortcut = theme.getColor(textPreformatForeground); + if (shortcut) { + collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent code, + .monaco-workbench > .part.editor > .content .walkThroughContent .shortcut { color: ${shortcut}; }`); + } + const border = theme.getColor(contrastBorder); + if (border) { + collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent .monaco-editor { border-color: ${border}; }`); + } + const quoteBackground = theme.getColor(textBlockQuoteBackground); + if (quoteBackground) { + collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent blockquote { background: ${quoteBackground}; }`); + } + const quoteBorder = theme.getColor(textBlockQuoteBorder); + if (quoteBorder) { + collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent blockquote { border-color: ${quoteBorder}; }`); + } }); \ No newline at end of file From 9b02670f995e53f6478e4d3a800128f2325dc22d Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 25 May 2017 10:25:46 -0700 Subject: [PATCH 1066/2747] Overlay color (#25798) --- .../overlay/browser/welcomeOverlay.css | 15 ------------- .../welcome/overlay/browser/welcomeOverlay.ts | 22 +++++++++++++++++++ 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.css b/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.css index 6aa8c04e78915..50cf77eafadbd 100644 --- a/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.css +++ b/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.css @@ -10,15 +10,10 @@ height: 100%; width: 100%; z-index: 9999; - background: rgba(0,0,0,0.52); font-size: 10px; transition: font-size .25s; } -.vs .monaco-workbench > .welcomeOverlay { - background: rgba(255,255,255,.52); -} - #workbench\.parts\.editor { transition: filter .25s, opacity .2s; } @@ -40,15 +35,6 @@ font-size: 1.6em; } -.monaco-workbench > .welcomeOverlay > .key { - color: #000; -} - -.vs-dark .monaco-workbench > .welcomeOverlay > .key, -.hc-black .monaco-workbench > .welcomeOverlay > .key { - color: #FFF; -} - .monaco-workbench > .welcomeOverlay > .key > .label { padding: 0 1ex; } @@ -56,7 +42,6 @@ .monaco-workbench > .welcomeOverlay > .key > .shortcut { letter-spacing: 0.15em; font-size: 0.8125em; - color: #d7ba7d; font-family: "Lucida Grande", sans-serif; } diff --git a/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts b/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts index 8a3bb16246ae8..d5a435aac227d 100644 --- a/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts +++ b/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts @@ -22,6 +22,8 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { KeyCode } from 'vs/base/common/keyCodes'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { registerColor, textPreformatForeground } from 'vs/platform/theme/common/colorRegistry'; interface Key { id: string; @@ -233,3 +235,23 @@ Registry.as(Extensions.WorkbenchActions) Registry.as(Extensions.WorkbenchActions) .registerWorkbenchAction(new SyncActionDescriptor(HideWelcomeOverlayAction, HideWelcomeOverlayAction.ID, HideWelcomeOverlayAction.LABEL, { primary: KeyCode.Escape }, OVERLAY_VISIBLE), 'Help: Hide Interface Overview', localize('help', "Help")); + +// theming + +const foreground = registerColor('welcomeOverlay.foreground', { dark: '#fff', light: '#000', hc: '#fff' }, localize('welcomeOverlay.foreground', 'Foreground color for the Interface Overview.')); +const background = registerColor('welcomeOverlay.background', { dark: '#00000085', light: '#FFFFFF85', hc: '#00000085' }, localize('welcomeOverlay.background', 'Background color for the Interface Overview.')); + +registerThemingParticipant((theme, collector) => { + const key = theme.getColor(foreground); + if (key) { + collector.addRule(`.monaco-workbench > .welcomeOverlay > .key { color: ${key}; }`); + } + const backgroundColor = theme.getColor(background); + if (backgroundColor) { + collector.addRule(`.monaco-workbench > .welcomeOverlay { background: ${backgroundColor}; }`); + } + const shortcut = theme.getColor(textPreformatForeground); + if (shortcut) { + collector.addRule(`.monaco-workbench > .welcomeOverlay > .key > .shortcut { color: ${shortcut}; }`); + } +}); From f479fcd2e5f39b0706533382e1d96e1bbcede7c3 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 May 2017 11:07:55 -0700 Subject: [PATCH 1067/2747] Add null check in terminalPanel click listener Fixes #27256 --- .../parts/terminal/electron-browser/terminalPanel.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index ec880bdd12c23..4b5a29f34c4f8 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -197,11 +197,12 @@ export class TerminalPanel extends Panel { this._cancelContextMenu = false; })); this._register(dom.addDisposableListener(this._parentDomElement, 'click', (event) => { - if (this._terminalService.terminalInstances.length === 0) { + if (event.which === 3) { return; } - if (event.which !== 3) { + const instance = this._terminalService.getActiveInstance(); + if (instance) { this._terminalService.getActiveInstance().focus(); } })); From 796f945a2dd1bdb51846d12dfd2ba0d5f2108caf Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 May 2017 11:11:40 -0700 Subject: [PATCH 1068/2747] Add null check to terminal link handler Fixes #27247 --- .../terminal/electron-browser/terminalLinkHandler.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts index 49df15b331ac1..16047707ea727 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts @@ -226,12 +226,15 @@ export class TerminalLinkHandler { private _resolvePath(link: string): TPromise { link = this._preprocessPath(link); - if (!link) { return TPromise.as(void 0); } const linkUrl = this.extractLinkUrl(link); + if (!linkUrl) { + return TPromise.as(void 0); + } + // Open an editor if the path exists return pfs.fileExists(linkUrl).then(isFile => { if (!isFile) { @@ -292,6 +295,9 @@ export class TerminalLinkHandler { */ public extractLinkUrl(link: string): string { const matches: string[] = this._localLinkRegex.exec(link); + if (!matches) { + return null; + } return matches[1]; } } From d8c1adbd2ef48623709c6c8f227f39f70ba5923e Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 25 May 2017 11:25:34 -0700 Subject: [PATCH 1069/2747] Fix #27265. False positve --- src/vs/editor/contrib/find/common/findController.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/contrib/find/common/findController.ts b/src/vs/editor/contrib/find/common/findController.ts index 4536b2b5b6fbb..a5dae70a8dcdf 100644 --- a/src/vs/editor/contrib/find/common/findController.ts +++ b/src/vs/editor/contrib/find/common/findController.ts @@ -508,13 +508,13 @@ export class StartFindReplaceAction extends EditorAction { let controller = CommonFindController.get(editor); let currentSelection = editor.getSelection(); // we only seed search string from selection when the current selection is single line and not empty. - let seedSearchStringFromSelection = currentSelection.isEmpty() || - currentSelection.startLineNumber !== currentSelection.endLineNumber; + let seedSearchStringFromSelection = !currentSelection.isEmpty() && + currentSelection.startLineNumber === currentSelection.endLineNumber; let oldSearchString = controller.getState().searchString; // if the existing search string in find widget is empty and we don't seed search string from selection, it means the Find Input // is still empty, so we should focus the Find Input instead of Replace Input. - let shouldFocus = !oldSearchString && seedSearchStringFromSelection ? - FindStartFocusAction.FocusFindInput : FindStartFocusAction.FocusReplaceInput; + let shouldFocus = (!!oldSearchString || seedSearchStringFromSelection) ? + FindStartFocusAction.FocusReplaceInput : FindStartFocusAction.FocusFindInput; if (controller) { controller.start({ From 391f7421450567de4abeb4119b98babd7df41efa Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Thu, 25 May 2017 13:10:39 -0700 Subject: [PATCH 1070/2747] Start crash reporter inside child processes (#27180) * Use service to get crash reporter start options * some refactorings and fixes * Move crashesDirectory to the main payload from extra bag --- src/bootstrap.js | 12 +++ src/typings/electron.d.ts | 7 ++ .../electron-browser/crashReporter.ts | 71 --------------- .../electron-browser/extensionHost.ts | 12 ++- src/vs/workbench/electron-browser/shell.ts | 32 ++----- .../common/crashReporterService.ts | 43 +++++++++ .../electron-browser/crashReporterService.ts | 91 +++++++++++++++++++ 7 files changed, 171 insertions(+), 97 deletions(-) delete mode 100644 src/vs/workbench/electron-browser/crashReporter.ts create mode 100644 src/vs/workbench/services/crashReporter/common/crashReporterService.ts create mode 100644 src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts diff --git a/src/bootstrap.js b/src/bootstrap.js index 022aa50b6a368..3f94abadd31cd 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -126,4 +126,16 @@ if (process.env['VSCODE_PARENT_PID']) { } } +const crashReporterOptionsRaw = process.env['CRASH_REPORTER_START_OPTIONS']; +if (typeof crashReporterOptionsRaw === 'string') { + try { + const crashReporterOptions = JSON.parse(crashReporterOptionsRaw); + if (crashReporterOptions) { + process.crashReporter.start(crashReporterOptions); + } + } catch (error) { + console.error(error); + } +} + require('./bootstrap-amd').bootstrap(process.env['AMD_ENTRYPOINT']); \ No newline at end of file diff --git a/src/typings/electron.d.ts b/src/typings/electron.d.ts index 5a1f5ea3430c0..05aab3a81619f 100644 --- a/src/typings/electron.d.ts +++ b/src/typings/electron.d.ts @@ -2066,6 +2066,13 @@ declare namespace Electron { * Only string properties are sent correctly, nested objects are not supported. */ extra?: { [prop: string]: string }; + + /** + * Path to a folder where the crashes will be temporarily stored by the electron crash reporter + * Applies only to child processes that need crash reporting. + * Electron figures out the crashesDirectory on its own for Main and Renderer process + */ + crashesDirectory?: string; } interface CrashReport { diff --git a/src/vs/workbench/electron-browser/crashReporter.ts b/src/vs/workbench/electron-browser/crashReporter.ts deleted file mode 100644 index 119229bc2d46f..0000000000000 --- a/src/vs/workbench/electron-browser/crashReporter.ts +++ /dev/null @@ -1,71 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import nls = require('vs/nls'); -import { onUnexpectedError } from 'vs/base/common/errors'; -import { assign, clone } from 'vs/base/common/objects'; -import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IWindowsService } from 'vs/platform/windows/common/windows'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { Registry } from 'vs/platform/platform'; -import { crashReporter } from 'electron'; -import product from 'vs/platform/node/product'; -import pkg from 'vs/platform/node/package'; - -const TELEMETRY_SECTION_ID = 'telemetry'; - -interface ICrashReporterConfig { - enableCrashReporter: boolean; -} - -const configurationRegistry = Registry.as(Extensions.Configuration); -configurationRegistry.registerConfiguration({ - 'id': TELEMETRY_SECTION_ID, - 'order': 110, - title: nls.localize('telemetryConfigurationTitle', "Telemetry"), - 'type': 'object', - 'properties': { - 'telemetry.enableCrashReporter': { - 'type': 'boolean', - 'description': nls.localize('telemetry.enableCrashReporting', "Enable crash reports to be sent to Microsoft.\nThis option requires restart to take effect."), - 'default': true - } - } -}); - -export class CrashReporter { - - constructor( - configuration: Electron.CrashReporterStartOptions, - @ITelemetryService telemetryService: ITelemetryService, - @IWindowsService windowsService: IWindowsService, - @IConfigurationService configurationService: IConfigurationService - ) { - const config = configurationService.getConfiguration(TELEMETRY_SECTION_ID); - - if (!config.enableCrashReporter) { - return; - } - - telemetryService.getTelemetryInfo() - .then(info => ({ - vscode_sessionId: info.sessionId, - vscode_version: pkg.version, - vscode_commit: product.commit, - vscode_machineId: info.machineId - })) - .then(extra => assign(configuration, { extra })) - .then(configuration => { - // start crash reporter right here - crashReporter.start(clone(configuration)); - - // TODO: start crash reporter in the main process - return windowsService.startCrashReporter(configuration); - }) - .done(null, onUnexpectedError); - } -} \ No newline at end of file diff --git a/src/vs/workbench/electron-browser/extensionHost.ts b/src/vs/workbench/electron-browser/extensionHost.ts index e8f82622b43d8..2431281d98e96 100644 --- a/src/vs/workbench/electron-browser/extensionHost.ts +++ b/src/vs/workbench/electron-browser/extensionHost.ts @@ -32,6 +32,7 @@ import Event, { Emitter } from 'vs/base/common/event'; import { IInitData } from 'vs/workbench/api/node/extHost.protocol'; import { MainProcessExtensionService } from 'vs/workbench/api/electron-browser/mainThreadExtensionService'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; +import { ICrashReporterService } from 'vs/workbench/services/crashReporter/common/crashReporterService'; export const EXTENSION_LOG_BROADCAST_CHANNEL = 'vscode:extensionLog'; export const EXTENSION_ATTACH_BROADCAST_CHANNEL = 'vscode:extensionAttach'; @@ -92,7 +93,9 @@ export class ExtensionHostProcessWorker { @IInstantiationService private instantiationService: IInstantiationService, @IEnvironmentService private environmentService: IEnvironmentService, @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService, - @ITelemetryService private telemetryService: ITelemetryService + @ITelemetryService private telemetryService: ITelemetryService, + @ICrashReporterService private crashReporterService: ICrashReporterService + ) { // handle extension host lifecycle a bit special when we know we are developing an extension that runs inside this.isExtensionDevelopmentHost = environmentService.isExtensionDevelopment; @@ -111,7 +114,7 @@ export class ExtensionHostProcessWorker { const [server, hook] = <[Server, string]>data[0]; const port = data[1]; - let opts = { + const opts = { env: objects.mixin(objects.clone(process.env), { AMD_ENTRYPOINT: 'vs/workbench/node/extensionHostProcess', PIPE_LOGGING: 'true', @@ -130,6 +133,11 @@ export class ExtensionHostProcessWorker { : undefined }; + const crashReporterOptions = this.crashReporterService.getChildProcessStartOptions('extensionHost'); + if (crashReporterOptions) { + opts.env.CRASH_REPORTER_START_OPTIONS = JSON.stringify(crashReporterOptions); + } + // Run Extension Host as fork of current process this.extensionHostProcess = fork(URI.parse(require.toUrl('bootstrap')).fsPath, ['--type=extensionHost'], opts); diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index da3ce11662727..66e974a00c7fe 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -73,7 +73,8 @@ import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { WorkbenchModeServiceImpl } from 'vs/workbench/services/mode/common/workbenchModeService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IUntitledEditorService, UntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; -import { CrashReporter } from 'vs/workbench/electron-browser/crashReporter'; +import { ICrashReporterService, NullCrashReporterService } from 'vs/workbench/services/crashReporter/common/crashReporterService'; +import { CrashReporterService } from 'vs/workbench/services/crashReporter/electron-browser/crashReporterService'; import { NodeCachedDataManager } from 'vs/workbench/electron-browser/nodeCachedDataManager'; import { getDelayedChannel } from 'vs/base/parts/ipc/common/ipc'; import { connect as connectNet } from 'vs/base/parts/ipc/node/ipc.net'; @@ -168,29 +169,6 @@ export class WorkbenchShell { // Instantiation service with services const [instantiationService, serviceCollection] = this.initServiceCollection(parent.getHTMLElement()); - //crash reporting - if (product.crashReporter && product.hockeyApp) { - let submitURL: string; - - if (platform.isWindows) { - submitURL = product.hockeyApp[`win32-${process.arch}`]; - } else if (platform.isMacintosh) { - submitURL = product.hockeyApp.darwin; - } else if (platform.isLinux) { - submitURL = product.hockeyApp[`linux-${process.arch}`]; - } - - if (submitURL) { - const opts: Electron.CrashReporterStartOptions = { - companyName: product.crashReporter.companyName, - productName: product.crashReporter.productName, - submitURL - }; - - instantiationService.createInstance(CrashReporter, opts); - } - } - // Workbench this.workbench = instantiationService.createInstance(Workbench, parent.getHTMLElement(), workbenchContainer.getHTMLElement(), this.options, serviceCollection); this.workbench.startup({ @@ -333,6 +311,12 @@ export class WorkbenchShell { serviceCollection.set(ITelemetryService, this.telemetryService); disposables.add(configurationTelemetry(this.telemetryService, this.configurationService)); + let crashReporterService = NullCrashReporterService; + if (product.crashReporter && product.hockeyApp) { + crashReporterService = instantiationService.createInstance(CrashReporterService); + } + serviceCollection.set(ICrashReporterService, crashReporterService); + this.messageService = instantiationService.createInstance(MessageService, container); serviceCollection.set(IMessageService, this.messageService); serviceCollection.set(IChoiceService, this.messageService); diff --git a/src/vs/workbench/services/crashReporter/common/crashReporterService.ts b/src/vs/workbench/services/crashReporter/common/crashReporterService.ts new file mode 100644 index 0000000000000..4ce3933901d8b --- /dev/null +++ b/src/vs/workbench/services/crashReporter/common/crashReporterService.ts @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import nls = require('vs/nls'); +import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; +import { Registry } from 'vs/platform/platform'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; + +export const ICrashReporterService = createDecorator('crashReporterService'); + +export const TELEMETRY_SECTION_ID = 'telemetry'; + +export interface ICrashReporterConfig { + enableCrashReporter: boolean; +} + +const configurationRegistry = Registry.as(Extensions.Configuration); +configurationRegistry.registerConfiguration({ + 'id': TELEMETRY_SECTION_ID, + 'order': 110, + title: nls.localize('telemetryConfigurationTitle', "Telemetry"), + 'type': 'object', + 'properties': { + 'telemetry.enableCrashReporter': { + 'type': 'boolean', + 'description': nls.localize('telemetry.enableCrashReporting', "Enable crash reports to be sent to Microsoft.\nThis option requires restart to take effect."), + 'default': true + } + } +}); + +export interface ICrashReporterService { + _serviceBrand: any; + getChildProcessStartOptions(processName: string): Electron.CrashReporterStartOptions; +} + +export const NullCrashReporterService: ICrashReporterService = { + _serviceBrand: undefined, + getChildProcessStartOptions(processName: string) { return undefined; } +}; \ No newline at end of file diff --git a/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts b/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts new file mode 100644 index 0000000000000..58cca417c6b3d --- /dev/null +++ b/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts @@ -0,0 +1,91 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { onUnexpectedError } from 'vs/base/common/errors'; +import { assign, clone } from 'vs/base/common/objects'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { IWindowsService } from 'vs/platform/windows/common/windows'; +import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; +import { crashReporter } from 'electron'; +import product from 'vs/platform/node/product'; +import pkg from 'vs/platform/node/package'; +import * as os from 'os'; +import { ICrashReporterService, TELEMETRY_SECTION_ID, ICrashReporterConfig } from "vs/workbench/services/crashReporter/common/crashReporterService"; +import { isWindows, isMacintosh, isLinux } from "vs/base/common/platform"; + +export class CrashReporterService implements ICrashReporterService { + + public _serviceBrand: any; + + private options: Electron.CrashReporterStartOptions; + + constructor( + @ITelemetryService private telemetryService: ITelemetryService, + @IWindowsService private windowsService: IWindowsService, + @IConfigurationService configurationService: IConfigurationService + ) { + const config = configurationService.getConfiguration(TELEMETRY_SECTION_ID); + if (config.enableCrashReporter) { + this.startCrashReporter(); + } + } + + private startCrashReporter(): void { + + // base options + this.options = { + companyName: product.crashReporter.companyName, + productName: product.crashReporter.productName, + submitURL: this.getSubmitURL() + }; + + // mixin telemetry info and product info + this.telemetryService.getTelemetryInfo() + .then(info => { + assign(this.options, { + extra: { + vscode_sessionId: info.sessionId, + vscode_version: pkg.version, + vscode_commit: product.commit, + vscode_machineId: info.machineId + } + }); + + // start crash reporter right here + crashReporter.start(clone(this.options)); + + // start crash reporter in the main process + return this.windowsService.startCrashReporter(this.options); + }) + .done(null, onUnexpectedError); + } + + private getSubmitURL(): string { + let submitURL: string; + if (isWindows) { + submitURL = product.hockeyApp[`win32-${process.arch}`]; + } else if (isMacintosh) { + submitURL = product.hockeyApp.darwin; + } else if (isLinux) { + submitURL = product.hockeyApp[`linux-${process.arch}`]; + } + + return submitURL; + } + + public getChildProcessStartOptions(name: string): Electron.CrashReporterStartOptions { + + // Experimental attempt on Mac only for now + if (isMacintosh) { + const childProcessOptions = clone(this.options); + childProcessOptions.extra.processName = name; + childProcessOptions.crashesDirectory = os.tmpdir(); + return childProcessOptions; + } + + return void 0; + } +} \ No newline at end of file From 92be0f0723b79f984bf5ad2102fb9dcd074ab894 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 25 May 2017 13:18:23 -0700 Subject: [PATCH 1071/2747] Fixes #27287 --- .../parts/emmet/electron-browser/actions/expandAbbreviation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts index f046995c79923..26125b52a0f91 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts @@ -33,7 +33,7 @@ class ExpandAbbreviationAction extends BasicEmmetEditorAction { EditorContextKeys.hasSingleSelection, EditorContextKeys.tabDoesNotMoveFocus, ContextKeyExpr.has('config.emmet.triggerExpansionOnTab'), - ContextKeyExpr.not('config.emmet.suggestExpandedAbbreviation') + ContextKeyExpr.not('config.emmet.useModules') ) } ); From e129461990c0527125264b0e4c24d97693239fab Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 22:40:41 +0200 Subject: [PATCH 1072/2747] [seti] Update to jesseweed/seti-ui@f78d623 (2017-05-11) --- extensions/theme-seti/icons/seti.woff | Bin 30512 -> 30516 bytes .../theme-seti/icons/vs-seti-icon-theme.json | 496 ++++++++++-------- 2 files changed, 281 insertions(+), 215 deletions(-) diff --git a/extensions/theme-seti/icons/seti.woff b/extensions/theme-seti/icons/seti.woff index d1411ae52218317ccb3d374bfa42e106da8ef2fa..5dd4c46c58c12024e051f21d7b8f946184a7f638 100644 GIT binary patch delta 30249 zcmV)EK)}DS?g6y!0Tg#nMn(Vu00000cQgPC00000wk(kpK7T|YV{Kt@0004m0007_ z000O$@Ff;YXKZ<9000Ci003=_005&b)jrC{Xk}q!0042c0000k0000s4T~ioXlP|& z004310000S0000a2fPI+Xl-0043z0002+0002+ z)}8~*ZDDwD05<@05C8xG9{>OVAOcVd5pH2^WdHzkFaQ7n9smFV=H5yf%y4gWbN~Q! zPyhe|;{X5zF9PoGZIcKAL4SV5IDvtcfr05K(;fx}h8_sb_<+HXkqIcuz{<>k6$GTY zrZ6}>V0=)^`~t|00+T?EAOZkRjSR2=0C=43)CW>jK^R5hGcbTiPLc!x0f_mdU${LsTu0k04YFn&=SNUX@*#MMSpBO+>J%|lert+ zkH^ZQJ#pPn+}z%VYfRVhcRac#g}w1mOeKvwq=$1EWRgWTIpLZ`E_virKp{okqnHv( zDWjbGR8YwSs;H)hhtyIRe(QNe1C2D%9NtAMk7=Ww4xWS)PkF|3I_aXD9$wHJ^wG~i zxDN7?A%+=YlrhGc;C~g9Ofk(2v&`|DH_WrZB1VQ5}yX#T*^yvoqL+R(hl(EOpHd99&& zouPTXq4^_2^9GAvHyYa8WN2@*p}j4J_O=?@``FOlHq&=dqTSHm4nupN7~1>P(B5Z; z_C7bXx6`8kRezVEbKQo{^%y$$!qB;1L+APoo$EJrZotsFK||+WT6BNNP-ECoW5iHn z)S^9OhI-?MdJ~3vuMG7j4fUoB^`;H=W(@Ua4fW;>^w`ZugZ>aaqQ188=-hrXs z2SdG&hI*e2^*$TweKFKKG}QZQsCQ(jcWkJ4VyJg&sCQ=3chtF|_JyJLrJ?qfq4u?* z_BTWA?}pkx47Gn6YX36S{%xpzV_g3QhNxOC004NLl)VX@Bu9BCnh}u^k#}b0Sy^{g zc2#vx_kZ+JXOCv4TQg`hqZu)Sq|t$d#taq+O9sSYFv7yJ#cg9`%a#q63=0p|*j&aB z42z5wY(48)EEv4@^1zFY%|0-;*@quKz*c#`FRHo+_Q89aet*&F_x66qqux<6nvSMBWI8!a22GL< z)8Sy3Oa^I&KOTWg>LgAR{8nscEQzI1KgD=7o$UXl@Z_-YWA1auiX6A*OFuGm7hc@J zjQmKXL1YTXgmKw&9yF~mb%h8_x0W5P7`9QVnmv=5%&2>1oxCxPtA=9)KBH1M
    S zmw%DlgxFkTq#Df3g;vZa%|rY0~&_64keHmNrR)Br$YO(SMnahuL(P6k}QRlaF1ydhJ?vL)tpldiiEG z_M!L8Bx)vpo*(FS4&eEDr}`|^7p`nC5h+HjEmwN}%1w40SIbfCH$6n{p3 zJi=ifPbV;(Nhy|v?Cy;xh{aqErjveeIvJ?(PoQ=Ec<=0J(pP84SPbuw$`~YUU0nqI zu|rbqgp@p~8{)!%u~!A$b?y`Qo1tV5V`NR&%W*^ZT$6KRkqtAt(Q#yA_WZI=$@#JF zJC?5Nq%ggsFn%CHQH|Z$(n}$ifq&2)kLzBndp6}n6Z$nPl=vTXT>TzNEN0G5mN@%n zWFFccbfCX7ht9+Pq<_vr?Hc$ZlXN%*by##7Y83Q9)*y2|7*Bd|Xn!*8gWm1X ztU)i80-;bkH=Tfb?dc8u{4qk0G0Qc=rLC-AakeX~BM?@9+&fT>XnU|3nl)w?rhWKi zEvehQ`fNY-YKiTei5FXC!KLo$&BH5acbi3ZiMd@$YS1>r(w(dsRN;n=!82D&0e8~M za<)`ydMW4}6S=4!@J*w;9)G=hXn>YLrxVA`t64oPj8j)^o*1NM%fqG{b9rKx_EPO< zwBOX8(Ec-tNR9NNH&lZ*NT(-3A{uNuoXgKH>0z_i*;o}&W+&( zta=yg&>u}C8n_`oE`#f#Hhp+7*ti%j@JZ3@57Jn4dLyXIFdL*$*M5=C$E)z5iJ%2& zMWH35-Z)hio>xiz453lk5Cx(?*de`+h|@kaF~fWIdn{mJ#}1rd)nm|rfHJDnwAOP# zxO15usn$If2o`UJd4HN++-cOAewkHsNjKI(xX}gJMc>z1`=B5^&AbZWBz%(w;jAv&jyD|F&ojGCNM-l*o*YDEY? z0{OuH88>ZRXWmo0H*a3N(W^QZbEyffqTCC(W$B!oCV>)^fHU!-y`axwsbVqcRG)#@ z&`Sb*1EXmcrhm7Xggb)hCTcvR?08o7!Fyy*Gk{wV>3|Q3t-v%&cEzM(SPdxAt6-a; zurM7Vp@#Tb+PZb2v)*oRwjLE0^sPa4hq}zPs1Z3Z{2Dkjk0vqb%K+p%Q<|^` z7`lZlrhmnFsQ!jh{UwF^E8=M%j(@4UbFi3hoXJlZfn~*B8m5)7S?Uj>#Ji#n4_Mt; zZTXJjq~wXF({pRh|Mv-NO zXWMZUcrCx|H~Wne0Dj#;lUfyGTw@-KD&yw;ghMQT3x#i z?hEod9dns&q#)#NK4?N@WKclcb^$%7%a+?x0HmV>3X52;IE!2XK-; zV1H%Fy|cT%MuIm3jQUIvr_DyMYyac8^TN+i_VXZ{u1NFhMC!Z-V%ZB&B|+FZ2U*nJ z@&RE`?=YvKZN+9_m$-Zi`IGhyXM-o!@;@oan{#tFFW1WLsBEu1$on_tx^rAwJao5u z2Q5c#GfH#t&2G*(sA^Ja#9dwN{!`P7D1T@mxW}^lZR`rwADi?qwFBBw?FN+EVh>cV z6NHq?3m`bcHUfZLU{5H(3gt5Zcq)jAmb|N=s(_vW)7?O`o(=I1H6rzw}W-Bj`- zK?&Jr>?US0qb4O_MkQjZ9}chsTB6PUVH*dx)IfLFR?e_AVt@$S;QLG9`iE^0!V>Fc zSI%xt#pNDYmh2>XJCF3^=E-U{`+t>6p_7&ulUvFioqp-K$*RX^x2n^NqS5RwC{rnu z+k2sfSM19>JIvO#7JS(uL-eV0JSqhRj|Tm%1_TiPC?yY5PJi~bUNv#bwlD0rCR|oat(|Cm>0i{4si)gg~R}E4m z4P_1IkR4QiRUHe@>L*3 zO9CKU2tI&%nQh8AOqdt+rKAQEZti;tGuwwYPaOC3P8Zk(mCl*r>Ju$6W87=x;EO&* z^@^znR%klXkgfqGJXd#p0xq%SfTPW81|tV`hnaZ^&>2(C3;2wT1AmX0PPxS35T#Ye zVg7T>G{~*c@(nAlHv*FqE(l!;gEjD9QLh~J%u3B^_WX@eT)D=P(n$~cFD23j^j-!xqPyHn3;MPO&({a%Ztp*bzwZ=Gk-(Ahg{P8Kc>G6{-rsW zd;vC1BIMgx^arRKA{yD3efr0QodJ0AYi|(-FLiTivb%5Rl7HRK)<1OpJ1@JQyn?cm zU~qr=mpCsKWzO}N{4m$QOb(@M@4fcn>9v=1{6}Goeh3*|zo$sW99a+N!Vj<%2rA&{ z$sBki+3%?{^M5J<{VTqUx2PW&u8|tO9kkmDt^@id*K#8^tc|#cI(D}9yn9}9vKPrD z3YujbnKA)d&dc0)rQSTwb8a#~NhBH+2P(BZPDE_S<@)ONw`S#99(5}f8xSc^%h00* zfKzz3Q(b+=`qR1o%#H2HN8e)DiB$qcAdHyqsT7VtZ+|;7SoXPBYW3FpqiCG3)H;?M z@y5ZH1ioT>VNF^fBb4lqNf~(BgWB8C7H<&1>m%rm9Wa0E#3!9`4?iG0pUi!b>WGd) z`h6_n0iTGAdDujq$3u#^0A-0qBC!BE>_MW8YldPzr!van4G?4ul}pEmf~ez%>74ke zAGAzpyMN#!L1%^!thg`*tMQUq2;G*<*LCPj({USt69Q=G_A-br^`XG7CArVQ%IE=? zz5}PZV}bGbem4O>1vimFRt>)2O#}dVN1xvWzA*bA4&InVoi+7Jp7;S*xX2sv3QKU) z{-2&JI1m*MSHg3hM(zLQvFavJ(lUhiJvZq{ReyPuu6gC%%AvhV!Rsa5F$3(ntz7}5 z{QnEPCPgw#hU4M5n2s-f0T^}kV6m+rYss`@H;od2tidusR`*1Gxx29jcEWR|o07@e zU;w`#8y`MAK0@`w7mmh34Y+49@o_Qmh_ z%d98=GhKV}%F4=k?{9f|dB08H&@3&4Hh;z7B}xGP0Dg?rrwRSi!@u&@5B}_#UiY52 z?@n&Go_yz(KTW=Mym8Bscg#L=%_ScM#82yLmupX-+qn4;7^cZ^u0KN+m)ZlAU~n_g z%R(8lV!t%v1Yqcyip8mOO7Z6>Krq0@Z(KHTQb)R6w>r`2^4?Q_b)8p&T96fcp&2uLyJ^Hbr0bifVmoX0qnF`%n^SwhuhCf49=wS=I6mz3_RAF%;wax?ttUm*yn{k z`p5fYsF5}h!^K|-{>U51L$lky=YQ|hlaEe6I-PxBy3g_cRQdB;5uYzyc!E(6soYej zzct#2Qj@)~)NmfBQ8umHfx;?OgYk|rVE2XJ$506L<`i-JDo|c@xjfY)#(wx&8(F_~ z8)GRCxno8~sqW>2UK~WR*<7hs!cM7{JKpSXYdOG_jJZir)>+;GZ@kp3Reu{L_7{J? zaZPU(VCydMaSFB~iohuVRHp#l%O$XVUR^R_8%{F=#G@M-pt8vDOzKo~ur}SA6lPlM zGCiNY4?R^>suvw#=4^XgTdD6))u=L9*Om-G1Y-%SMCc)LgcFkf4Cgs+RAjzW*jWsX1BG;f@UL(R1k+cdQ+E z=k<#}{5KZ*x*y1>(NBB}JhofP8s4N;=(JfKt#6hLrkeurJO1bB7buv6RQ zfIW*#IOG`p7p;R{7SvE7!FANeOljLZ8VU^`<11TDuB_>Sm#(?t@Q~~1S(-SG&bKC; zhbPyGZoOvEA4;q`PprV~9S>Lf&3ZT)?i|~k6j89;y*8tIqju%O#?0vFG@*GImrrDt z^tl{^V2-n|KmOo@kAKtn@i)KuahiVgru*)@>7xwZ*nPKrWDgtAPqT9{!pq3q7h{yl zIfUvjBC}X&7)z$iN54U69r~aNX54ml(Q9n>uIrDAwZMzQ<=!*8;EGSJ1R0Yb2*&jN z)q1J56t)`O17}C8X~-OZ>EKnDpFe%})SZ5@wmB=C#A!xBTYvkW`W)BJT&mCauT2JC z4e8Hfb^*i4a?XUtBlLMAoUFN2 zZ66GNe!n@l8vYMzOndcUn_MwzF2#;a{k)b$r(G$YvfW+_+~h#j_h&z|*VH+=SYk`i zVy+nrO-nV+B!BIGHtv!VDYX$JldRn@P21#KvoF(~7u-906yBdX`}(%$ozC-?M_T~G3^50sd`Q#_bG2*@LP4~ZvY`*%{voGIw$$uQAf1|lt3HZ1+orAAL znX?`PUta>R|499^o3dN7dv-TQ`Db6Vv-6#eXZ+041Aj~G@r!4!U1j8!M;@7db!TV) zen-I{aj16*EijAP5$}(uS<+215Ig$r*<0WGR&w!y*+(9G?6KKL?z`_k=FYx4`zp!5 za@UvczWYm$Jb32JgV*fc>l5sQsuxgt2}&=UmbxU#WYQ-e{^A!Oewch^cKC~5B>zf2 z^o1|N`+tWYnmzu|{PVuv9b`w*!vhSJSzk{3Q}V5gpMSXb$xrqk`Y-IrW6cLYf7@-J zf3Ue<{&VbAPrUrn0!>!UY1C2mwdRda!O3l{urWJMys=WmXP zZStNPa%c`7!8C=mTVMM|+ZOl{%;5O8+a6eJlIv$5X|&BC2m}Evjh?fq zLP1b9Gx$XUu-bTt&}|Nm-3Bb|*x-~>(*Sh920&Try^PalNr*9HUd6S#5$ATvt=0an zUjLe@8({Mt9@X66q|zkcFbx4v;$cD$>3nrvjpcx56Ny zY|I4Qld1Ti5yMTtQLFv6$$;{69##C`rV-JxPeix4DEYfiwu7xOqu(Nj(C zFWg)*H}9E>4&ZdlmWpWt&lK}mW;U3Djapc+9SR@}i_SwbM+rQDuF108O{yLPdVio> z2*7NaM@*c)3Yr+1zVC2qnt<;(IB#ctDGyx1Drq?gYCb2xKuoJut_7~y>z?W?>FkOZ zo_N|*Pd`76~kN+y++$8uX!uHQGh(#oAA6-zEl0$(WoZPbbeJKSEwaeuBK7+)v(um{#=*cA!LX+K3CmzBjbC@+qXEaPw(BKgqfp*X%m4fTBx0*x=%@XUF?c26A?B~})UmET*7+SMhXO8E< z?`@6?f+>K%f}9%E^IVZ|mr$w;;Kh#XTGU_?2)b@k*5Rf>0YXtrP=8Vb6vqj7IeC}R z1>@8%$&Ll4A#$W?dPw#Kum#Ho8Qv)Cyj(eZezR#1E2>SsD{AE7}c!? z=Ygqvx*=R4be*s7UUir;P$onFdLW{dCB?cI>%4fqU$2_7S6(U^(hrZg0&F(i!ljny zcs^KU*EVpr(9>N4YJZ7UHaN~P2nTeInjGq1!EW*Gj$q_1^S&^l9EYOpc@{G%4;Wh;)Vl5Lx=8@kNd^4xyd;D7}4b-80YPUJXd6YL#hEVQ`J zbg)w*bOoVO>N@KP)1qKExpbk@1HlbYQ`eycYGr}#*QpaSoPVVwbXH}YbJw%=`j(eC zd3Y*vbSPtiE7@&MRvn$m+{qJ%^Vq0*qGE8%?Y7|Tf$6E9&S;?HBe`JA3=_K(RI_oR zqh&UsNv=TCoAWBrHqI#Zn5;%|%d`C$T6z~hSW8mM8)4t|E-=Ck7<}Ox7EaH=*TfV; zfFn8|(0OG|&wt<&I@)pJ3x;!joFWD4qrXh`l*@4Li(0CKfCYi+qWU(Y4$vMOy81Zu z2eXAvsZ=4bIrpc3%Lc&1tKh*mv{z`a)gI8^t$k3_x|4LcNY>ygYJ%Fjh>&zqag(^{ zO?c-h&J|1>BG%erYY8GIvJ3QW-eKh8jJ{{=_TESfu{^q&2+gn z`-Ba>7soani=Ybe9;ftws1QE zr~nZ{1%HQ4CzP{a&-yDzTQrN`(TK~mb7-~yLsY=k;8#qZ#jeARTsADd;)Aj}l`j$x z{IdM}(+7%=qx+A-0-bc+yyw8XCH$N`H8MehyR~e|l9XAYB?V4dJB_28<>i)d zxV9{ec2j4h8|zCG%QgJyR20{|a)0c_mQ3Et4piC)i$;+~l!i&SQLMMh zE1)+}51)g1fQq;Q52%+=?m2tdm~Dbw)U^Z1ZnGhBdGPWCa0}+E%!%s|aL=?Kd!)0D zu{Cf$tOrXfdi+my5ZbwZnPe64tIu)2D~)sqi;Ta zcYkLooxShvpMJ;r)t^3n!|9U;R!`o2^+t11qB-2h)pr8MT-MHNFGPf?qOXe(^*q8b zZGV?XQBhcMQhOomL@Xp%ktB6Vr$3meNw34CI~>e2*Q9C_crNfmDhxhR_Xb}{zG5<~ zDM8C6Xf)?HXWddv$*0ra)3$VG8=>UB&wo=eNaQDUFf93?MFlgZD0OPS2|$5SHvlWi z=!s>pP}e*eo(1FIKL_?G@_osPzIp%*h{Gj!f@u{fG-)wl(9(>WNuxR}%AIC!ZBSfM zl!x_Bwge*&5(r{e(rr$sp3yIbPU_hVti2ccQB*E5lT}XYUI%SkBAHM4V1QgfKMBW`16OlHDxjo-;0OaS0SB{m)EHr`Zjj8QNApO?-c&afL1ZxA zA#z9`Wiqi`3#6RuUJy6c)RrSdX@4?5i?d1+M7j8C$+hO)_ejP1gp?&s-NS z1RwaFpCw--%#v26EOft`WgU2sC%{936)53QxmJSth2SwG&J1S9VC3CM2Y=seuqcOt z#CTZ31LEaq5#osP#MdJZRc(PswWM9K9LvdzkQpX-@}OL4S8A?Yx0uht(J|cwnK9Qa zEAf*M+`n7O?bJ_|<21tb%~&oH5BeiD zBZ35Foc1R}%z@gQvhVMZ{eP(6FdH<9x`w_)xMpCl+Xb;m&$k%W-Iu->`YdgAwy!*D zV>k+Mi6z;GKkUdGsoRZ+P2QW_lzyeo0rQ984&A8y66nMB?l5TfjtGk}BZw^Da>ouBT7T0C#OiU+fWwiL z(%8?>pkHHG1NW~1cU^&=(LnosDvI$DG6V;t!o&p#I_9VqeTknC#IBMF8*L>}>M+1> z@(uPlN>=AJKm_R%pyHj^Eiw5xVJn0__N+VE?;m?QyZSM~9;ftiMmn#5@^MO@fWP+Z zIvbBaMu`c3&zZf45Px_-e)FYR&!EJZBCGCr-D4MWTI-pcTry%04KmB3q!G zFlt-Cspj*0gJ}j-3*Wa!(=9a9F;Z>iZdI-u4tO@{t2s#JuGI&S0f5J15zs~7OJ4|@ zq4N$x4)Um5ZKokXT&D!a zkC|Z2I&lSo3&Z@JrVZK)py)(Xm$&L=z$=LxQ27wC7)WW}t)F)PMsoq*I2 zvw6t`#%0{bT5xWq<9Eb{_rR7@d?*WO(6|vd(;Z2(@Sz zvppwMkxc>g3OQ%W^Te>Zi<7{hRi2jeh4U;=`YEATgI#7$eq{WtE5L-8>rof%dk~qH z&P#zg7Kgf%o%PYncqwTBsk0_s+npIrLo{V~ttnV!J?jOg?udw;Iehmm9(|V!Zpzwa z34h5}pKJM|UJi2RN0wdkb?e^d^2zquGr#0l64L}H(VO}g%@xzA8Qo${gz}uHJ7yHP z$(`n2UYbY00g|$zU9O$hZpK(&sf`o=*q~8wm2`ZHW)7M<_re$z%`ojs$vMzrbrR>; z)X}s*XU~YvM;&zkLZ*kw0IUmhpZqi({C`~&v>Hq}*N=nOjC9%o#0i91)PRlwbp>+` zm8IlH-AMro(Hc0k#PZ!F@O}pnjAIeD$_eH48&Ce-1Hd*nY>dyG0A*%zZ!OL)X2Aa_ zh$k5LvyqUyrM=hrh@U4E`LsU zwo854m(VN2Qk%XdYqvMr?b+{=FU_{e2k$!Zh8L5;?204gUh}<6^VK(|!djhPduV;|qNg2;FmHJF_^G2u zPMkctd)3L87fbZ2BRhad6*|3`H%%+5J#t&tXstC`G`Q;I)-lgCx379mGaB4@B*E0POh^C`gDFUm2maHem=&}RfGXPPMEO-eeElh)1?0ei zlc#;t6R zdHK)%_(`%BnVn62`_QSEpI0ESSzLA5$)m->CatqWz%zad#|$&{7mGLW2h8O>n3>Fj zoQo51c%E5?juT9+!cT~;_OkvJK9*=f6lY2iNCAY#ly$JVs9=M6%10l`2iz6|X?Tbo zG?U#Z9e*2pMkq|(XRKANH1(ACDxJn!vl0pi{GKkTSgKgzxVP;HwtDVNNw;K~*oN(z zwRNc%CL1-REhEuiMs7>)-Z>fgg26Kkig)E+TMX_KNKQhBMpk&Tcg|C4f?y-<~^V z>3QIlt2k$k%zCN06|I5~fQRaVx&ZnZcpH`|u zl<3g*mKaR>BeG8_fNFG9CXdK)(SS-T9ir93ki>9a2#2OW9%NhT;tA*}F!=}V9}X`l zEPvg=wK6gua|~|c%7$XtpqW|~HB}UIZb2v0WKR@u;#Z}`frvzLApmpklT;L;Ig#Cq zt|R#F?avCcd0O1O253-lIuGxz@`JGv*aX!8XcRIuc-9s;G<>K~m-SQ>7KL*<&yg4w z3IXi*#a=fICIfY&!Gy=1={y5-{}K3rY=5Zuo{IW+RH78dkufklns8Ms>}fR?*x+Ie z-Jxgmn~bDERRwQmZ`8~-U`8J6~|Um$M8#*(J`7q08R!c!fhKgCwHU5XobMlWq)B@ z0r#&NQPb%7xWEFOgz2>WsJVg+5e~YRUO(IkL{0A0+HL9(0KvfF%-l&a8!)ttn$(TJ zdcSazk`tRIt_ou=JjT+QlVrl?hRrO`P_an6-Hg^EF#wVtujw)s&3-$=lm&pz(z7Ku zbRk?&+ktRA6R0WB#6y%}kW&}SvVSIcYUkoSv7AhK=D;~^rCZ<@0sT5| zZMz5qlc#3N;XXW`eH8;*lmZBL0JWV-dOX!x9m>+A2hB@Y>wb_#F4U7^a>fePn{MQo zK!z=Dgp3%v6p<4rmO*sOiR)!=_FwM)CVPc#8=mWI)!}w-FAV%z8kUxG;C~5WGqQzc zNv9T+;vlrZ{ii@$0VAeQo-r`n41>m)p~`e*g<_tb3fx@anm^!bwgIEyGA@XOb4;qG z9s+ngJqs`s!*4LIP*mz3wj4a0qdP#bB?t@>VoIOSgl8MRAw$ctJu8IMURyx*eQA49 zBF)Gbjsz~AR3bAHY}UkCLVrOpaD(X|95{qYBti*YC6-F_{S+n1!m~Kjh`A2|t{kx# zR1)LR41e+TVN8Dqsl?X6_h_$P*jAn5t(h@_n?|M=r(SGf2jICt26kj7vgCW@S7&d& z<(mt<`w#TPS^yRi^GxFT+OVl2bmK*q^GKOIR4_SrNw~lel`UT6w11J?u3u^&_m^xl z%4=TfZDF}uZZvAe?N5Em800dvleAh7oaMnrZ{>8omB;i0-*{@#;`|EJ4-X71X(YYO zS-N_#8=ZjWilk$kK{V+PnuWo^aQn(`pJ2}gHa*c!XxC}CYA?|KoE##j$gSkZ$?M32 zKsffo0rE=X|iMrpx-9^9Rf$Y3in1=}={s_J1(V1w$*-#j40And5}X zrJRnvr5{AhtDwHByQmIRc?wxiCFx_ZOeLJ+;?i`o!Fz;BFqm_mK}Q^4t1 z7jT??vAKmnY@*tmb#S%kbljJsH^zv=WHBIYzOWOg^W(V_+@<3ULSIP$0JaDKcq1!O z)L!_}OThgo2!DqxnSfcS0ouE2_-QK2o^VVTQF&13G?a#p{Ym{Q7rJA|^j_-clF2mk z9b8BysIo<%vivoooX8;P8By#=!ULbM%F5+dT3K6jGLr&q06PL0DK`SpI|~4=yi#Yr zZa8XU$~;;Mb(#{swvquC0F{#-rh`!$gp?XGa#Dkd*?-%?vsjo{3_q^x3vN204YeRT z&X;ghW=e>4AS>-O{gP*bwWh=cW#$<)8H)GEO6e57?c?97L=kcbTS8~ZGkOxd@y<4=M(CR zveAI&5PzEb(qp)&z`X`;rb{lN2Xx;FyrtYSTl4~rG4DYpRb5J`KW98lT$_8yyCl)! zsV=9f0Y=uA(D3InTv!kqWtRAyu2I$yFoMi*L;0)Bj{~AR&!#p5o<_hNfd3}Koc%@& z_Ym?$Wk0Z_FsnDOY!};bb6GXK92|Sq3`$ftO@H36nLy`4Ux&V1h59-&X_eZe6-%!| z@hf#`H<(Xff;D%%7G^wxJD~U!TJ@alGqqF#I>2;rAi7!P1(Z5Eh#Tl?X2+!Lfbr%m zsySekWfBso9W%_pwTy%H?WNo-K|77WsR4)%5*@pW>De7-9+klJq_|oMS##j(Y6YK; zj(@q7)rA>;LkAPi!eXhLLZxs7Un6Yj_9oQjGN_(j_2B4-$W)kc9!TxZ%|KUCUZ}oK zi6wO1sQONckbfq)Fw;rGFbx~6EGadHM~@8UUalIG+7z=ZB9#!+8!3x^m?XtKO>lqa zd>%R%saoZt&SOA+RCGHDPO&Ax6UXQhaDM?RF0ERi;W0W1%)(K*>FPGaueWfbl5P)k z7w3iu4ZKDJyB7K+O5Oaqa!i9UV|M`PiI~23mc@ya54J(=K~#Z3`gUR#QB;zf>xc7P zIKCm=(CWbfBZ#|p=sLd5^Zf9IPPf<)8)jifoeSf9;2KS%8wZ9gMLjEYMX*_Bhkw^M z)%nEsFL6pj{{fgmuJxdIVwG((S|=Xm`=2`=>3{c^ueP_3Z@1M8>0SE#z;_*fetYjz z3qPpOt=9J6wDDDy+RtC4pJ6)YVUZ*njsf|y@f4%OB)@$lzw@DwzUQ6S=Zri!d-+2T zku>cM=USBp;P3Ozin=}P7&{z9A%me?^9zCUBHQ8XL`00&Yuep|U?0;ZAE{ADi zm~|_+ODO|eC_S!Mqm43f*2r>sxC2&nOc}GA*cs{i~!07pkMh>7w2|4w=(8&6Cj!mM$#fUX9~6hScJaZC|`yc_wWf0 zZ>cx~I$mph0;kdmJ&rR8tbd?44Ue&IwJ;m?byKe`A6yxLF$?yOy90Ks)1LAC|jVg3kasutL01}!Ohik2Kr+ecHp?`?Qa1-&DEv3GT=tiaA}xg>sn8 zJ)U49444E3LlBbSa+L9WVb%~p!+csa9!}@xV$QR(e!7ROFu@B&ce+EBp;^#wl>&s5 z4ExiCY1Aulm5`FvRDV&*@pPmfm0?1;DwQmjzD%a-M#aLAkt|UJ6FBc;+YyjgfGLxs zWDqA!(x8KMFElxi%+Lv@tzD3HX=GM>ZR|EcOu&gDIw1l$!Xc^~?YII2tYS0fCem_5 zfb0>9z{^)%6Bn#Feuk@$fB>y-R+b{4Nm~ZO1=mq)Qau7PP=D_(S8CwJeg>VXY35-S z{0K-de6^k6Ag0{-AOOq^OD4-@$lW>1DNGif3OAa#9vvTOLM5csrCSro6LDt>#sSJa zY!t>14--ZrtQiMH18!Qho?md>gh>j~Tt6SSG*Hgw&BN^AofF}TcY%W;=H9c{mvH4Y)*!ESR{ zBP@^o3it`bNSiq6gEU95#KYC=Ca9yBJ@YtXJ4Ndl5YO{zGquupHuH@ZVGd3hfriRl z>;%XC>K#=O)eHNv!mkpLQm|N8lBWSvxQ)Dmyqf$nd4CuA4e}oHzmkuU-zC3CK1KeN z{2BR6@>TM; zd+Gb=`+w<&=!fa=&`0R+(vQF?9W=o9o)^gmIIMI{5ZfNnS$Uq;68d2p1B4igO5 z4lh%4c7Vi(PzV(1C?dp=Kqt0OJxW)g&8&<-qz6Mr?vN2DQVqVA<)7_ny)PHd0d41|k{v<~PmY*jOEd zBE@9>U@Q+L2X2$9+sI6OFIgQI<;!s& z8-LiFf@R1iXs^&Hs2hR>;X^2b8xcW^JEJj4M!js8O!NtASba@ul=|)l~a7lBo@Grz%rp&(eD(TOq0zq zUa~nXhH~*meICGzx~2Mr*B&LC-*XIal7GkorxC|K!6Wm}avMJ#kyy4mXHz?&}v~<{C9Ow)6PUEd{GTl-I_DfUpEvjf78cSwIlB#(VLONhD z3Ltt?n!3uPXfS5NnKht5ktxrB*%B`Vh3vgc=Z`I@;NpkUuQQ-rv#+C_04qiSOMlKD z60Fb}c{flXV>X5doYFD&vx}JwC%{XSQ(#u~BNCjxgIh8IiNf`pc|b`AI02eXsK#4> zNs&*Ycb?sd`Hde$GdUYzHkCZgkvV}$`a1f08JRjT#2Q$roADwSLHswr2@qYM{hiQn zr|O2Uf^VN7+j#rg|E|;D5ibOGd4ERULdnYj)ZY&!IH&YDJnB)dL;cpb+q2_mP5@cp zCr&Z)e%iR_CHOQ#jNONmRKBeAtA)i9VQLhIV}a21GwgXMdxZi%KvQkD63I1V!Nd%Wh;Hu|ZWS zOZsr3-o%2ylcB3qj)uQi(-#u7hzDSsQw-pl3Uu)%>%eh-7?Y~$NybiLU~-46ijc=( zK;-NiDqR~G*RwHsQOen8bAJbiCxXEuXCDOj#=gL39{T3PT;)aT$2qwJhxJ`33%K%K ze+;gGqUNK5iBIA%KPcXU{#K^g9eS=aos6M@v$sop&g_*f5I6%M{Hs77NXi}p$cYj} zyU;Vg2sit$FZeN?epNBLny4{MCwh$PyNZo|3!eCv6I8#3k~8p-m4DgVSr7-fd6O}t zw9D8EV@~A%9bBDYkTbxG)Rhh#XBr=GgISi0(-etUEMip`CC+8cDe zXs>TQa@9S*_{yS3$yG;pAGqf#^4ZPfsz3+M9b4a9Z-ILYIJkdSX;{jJQ+Vx5vU}To zcU^tgeYbsxx%tc?le_Pp{UP~Q{@8+}%~(aPd@K!xBygG9E`MS&rLTS2EgzbF`}xka zHb{Ee2FqrDcVnPNVs4H z_!;?*6L;LG6c~I8<|MmWdhC$pSDmn&-LQNxjiSr1 zNPhGuZok05hJTv7NkYq^;hJ05TA{e@dehv`Q(_0{r?gb7Xbo*uMS%A`;9zp&20)upaq3A^I*`+3cuuFI5yFO$I&KT{-Jym#f5t{8U zau4x}uQKlAo)?xcTD}=tL2zs(XQHt_?3;z@2To#ICT4=WQPKskAv`;3w5!GWL*r&Q zUQVZ*M}KtOAI?fma3W8-j1%c3V0UEh8-Z|m+RcUNbd09qacZZQ!72C*vxQOMBKJ*$ zo1D45if0C9DC1JP6WOlLxvX9qCkcA8r1iDK+9~Zvka=OOwT|)av4UYmX}-UW%DF3z zkY}~CeiAMA$Jn7bv8<-k*nC)lSphv#O0|kBa(~rLaP$uol^tCt@Psj~vj>Fr*%v-C2%WUfimkt?=uuSg&wfi8Tu-&c3i*J={9H3O^C2YFFz z>)T^q;6nTHFjKFoY|p=|Z@fr`_x#B_$xEL6i{+K`@BGa5=idpYtGB$ewtW3}W*=Nx zp|AbU+RBrkefi7Z`OdXZ5AJ$7{CnrxHGkUw*dJYxaBT-!C7sO zCanX`?285IIi1$ZO0)21U+7$lhh4^`_Ve2BA;a&MMtj)_0L$Y-rI*C%-UO`LS${0_x$Xw<{ql)f(CB?qtaAx$`{x2smX8TC~3S1LC%+MDYibqz*DxT)WgAe zos7Fv+;(if1WW}QMW%M+Q7MQMr2fTloQ%LgO_0sQqqAOrR49Ym6AQjSe=ZOjp^{|w z7D;1tfF0EJs;QRB%o3--O+N#}0DstK7+me-8QY3!3j>(ABVAnXVy3<@On&8bacx%BP*%6NeHUsdS>XD`mCcvk$Srs z$Pz{iBnf?+`!x?ES-AZUPFy|=&(Wz>b6gWVYGmRx0`9a(smR@G%XJLT3V$WokSEEz zayL%^?*im7p~6in`Dt$If#l6+n$%_u$$Z1d{S6%EKEWfHAfrO3y?OG1NjvaNl3&*DO z*|O;l1-U}o$~TMQd`fS=FGK{a3gfM#dCvNL75*1NFe)80U88z8;D0_3b%W~(U=3Th z95uBo%xoPxwsX9bM?zYR>q4@CEwvjhc!O^0h3)|1YT7Kyer}`Nyd}(z_ z2xc=~vJ$V&K2Aurf^%Y)p}WZg0K80Gtb))GMw`@JN5WH_NT+9d_NvWR>z$Q2VWtet zz|HGnr(g$$I0pk3+zn@m?Z029o<~ ze^<4fVm^lp3ct78<(`#k!03$&HOY!o7hqg5$h?;mqmGLN?uc4H>M4J@P(m@9UfO>M zj{)F%#|Biqgqdu17Mh+ptY<+_L{`TFgrHX{v2RnyA~cAX;#RwVFcp3(gIY6kq~|-H zB6~EYG#d9osdS5CP&uF+)Y{&#nJY3L9j$_Dgf93{#{o0+hL%DbZJ8)C`%*y_HYsAJ^L;v*F;5pvq6eGF?4@acps-0(k`4#Qam@B zXKogzn0+YhWZP74yNB}L8l}sh;(gr6MliP=h5^+x8H!3qS+lad0_MPMx`3vjF}~?p zyf^zdC#mFlL+}zK&Xb=O=GQo*cUhdQfPv9BmX;5lTJh6d(i|<0ZrLRdtew-TBu#0; zICj9U@l@j0%{qVe9)_{IlTz2WJK4ey9-v>)eo=e3_S^FvoK(;`+uM?4VHQ+W8ja1~ zHe?H6nWcLxjq$?qe79Cy(2&mI{RjhN3(u3pSZbYiltaT66hh_t0Wd@FyEES?7BO#} zsfD@)9-j1Zhu?)$!z)u&cy(=HTBRnER&kTBKNjTS1{c&rLfF^!9W;G z86}eAPB?$evSG-b{NNR*uBbagmJIvAQnfWQIqoNd>mO-k`WATQ_01~{hvN!uoAdg? zr&~TJT)IBPpxMusQymhXrJY?l%Bnh3->9u1xcgBdc+tBEkrNjKPw zxnV+8%!Qrmvse?Fg*oBYss6Ac#ciR7=y;u7!?LTP$QF{!Y zdx(EX5HU5?l6B_kfO{Jr7L(p|o=O6lTZ&ex z9Y--IMW!l?Fd2KKxxcjuY6T`5(!qSq7AnskfW#NPL$^1`=E>f%m~I{-m%faSk|Z8) zCgTbH)EV0-MJ3Z}E~$(It6pp^H7s4N4k>^BlAEH)|=!jICf}>Yl^85U&VhM--<4Ai^V3aMYzxIB{5b0EujR&YNuf{_kVv z9#}NWeT=B+dTC?Q)QP_=XbRBPw+{GDy-K>5``p7tzW(K1QmMJY5*R(n!O1&ZzuKP= zatBs*DF-m2-YXcpp#~x35*N_eo3wvWMF_NL*d&+`(DNy75jO6t9lA>J_m|%$&nCb7 z2xZSA-+uHt&w2FxweXMq+{d5&9il($(eFIxr=Rn#>t^<~dp?FRLp!KV0kypVS6r%C zx=K1#D*}guqbiqOO)5RnN(pAvFDXL?C{uz2^oIr0USv=etVE>KP&RRmMi~vQ8M*VTG=ocv-$4wN{CPot` z{jtg-z`2D{Z?w5e)a?MhjfJ}Nbn%4gsIO=tF6K?fpx5v;c+zk(>JNYEzto1~@zMTf z)%5IYDYOJ(E_ewk-0JncqZQydPksw0K2XmiU=NZH0GL8RCP*bo1+110#lu$m|P78(G+Z@CO_rY66~~ ze*{y<7^o#>A-N7}6X7aDnS9waSqKO+a!E@MI247dd=hFJAq{Yt`B{QQO~4WMW)=yk zDu6(74TARov5Ij8F0CdKcY3)TBfL^77o|4HXB#ZgPHA^)KdyhhL3+cJZ31 zHKIjlFSM{&SvY?WsA8lGK178QIn_Fuc7d&Rry$Bxb+ku6AR1X#jh8aq6Uwh`)`{pv zc^=a=01%DS%|y!8TAqg)fR;h6)y%34U}bG+M`;>4dD!|8w|(iFAd1Xy>Grq=6j*vd zZA{Ox0K3ti zJ@xXkUy(u6JUe@wU=p6to8>rhG9zpWw)AQ@&*FiJS!pCb5Sa!yq_kuXg72O=C2}Ey zAJdJJfk|iGZGHAlc#(ev$6Zk-Z(#iB(PheQtL)3%v4N8Gc1}31lP6mV$fmV_ z(!h?X)O&wHV)A}-V8yO9bHi;fwOzvn`6SdG)O3f|w=4!7QgLnD%i{neg5^Q#oGN9d zeo(UIgS7!;gQjqOvveTvL$k{zC3!EgN`@KLqTFwB(7a};mIPou1G6mBo@xDsuxoA> zXCaUkGnRQzoG67Q>2IZ#01zdU+!T&wld(}VWZ8fHHx1tH=%Dm!rLjD6+=`!d+;r(Qb1~|s{4dU0u`j=$Y=`uAbSM-I?jFRo9{`u$s$o&8B$6b|+8~HR=RipKiUR+#0k*s8HFRdBJ*f#R1 znmbEHTzARwThQuEu)DK*^YWD#v|YJdMu2n53g^;u;6Q|Y;4-fS8QtY_GDieXeyD%u zj@)=NHSHKp10Pr@ZuMlf^R^Dz*d(Zy`Un6e>6X^=*82MPn8fX_iYFv!oAmqWFTKD; z2tGVi%jztUNKS;K!f~(^Y_A+_9bQ}sEw;T$zKzv}c!~Ic_$%>`;$H!(F6(kh7KoL| zhdUCvZKTS`3NTn;%*ZwvwiI+?R)>GqDkHCvR$HfU7sY;HICcxlQI|+%q0W;SBcnoR zEs3D3A{7H7>^e5wu>3IZY~57Fe00 zD~=0}>+X)aoHtVfTkZo;jOj2^aK@;2Gn^na32x$!oDQ+TNe`VIMYJA}lCXbHIwVVe zOcoJ>$tPnDghC+^IzBE}XUk>I!3nt|mL-=~!h&(e=aY?qJq03NV}S6fMrN1GV`XS| zw@gIlMcVvo&S4sl21mIJ%HeW3WwvgEg&0tQXO8H0$~>ddVSxn0Sr7`!l#o@1!0$$h zkBaNDjWZne=sAX0HP;{+kL+KV+0``{+l%H}WuC(Sy#=)XtU>;NC|B<9hG(C$4 z2cZN3!@zUm4lx9$>yU<|ixz*7Bd8JRT?1KOXpcbbfND~supFN<#1Ghlch>2Xxum=r zpju-OLFS02s49O9D)DTr*2uy^FYC*RN}bq07|}y%Aa$)UyU!>m*ENr{>Z(vXB#r~( zFtY{=73@cndM&YB_aACRPpLFeAE{g_>z0r#z?%JF%JQa;ieP2=w|#WwQU`yRxrAMoE$rnmjz}zKNF#kf z%A;fxC;xCQfMH{}Ego3OG@^|{Me@8>jWaUu1Jg{JCbR>OC~Vxsj}}+$(2$?)VCBoP z-DK%RMk<-e9jPEpwQUC>X({4fd)URa`jB1KwuR|UK3;~%kAPhJuoh)aRB=la5(zY2 z4EguQb0U8`iWi&+bhKRZ{#`O9L#)aQ8MsT`fmAbFL4;J@FVl5G z9OgaVeUPFO0r3h}>uh0shHCsRQF3K_efhwa;~Z!my71$hO*bUt ztr;98e>n&@SBVYZdazZsWfFHY08)L)&pT@y2i9%NSha&~uWp>cMZUiD7Fx|X*=QU% zc%n0h5`6Kbc;3of%~*4xVw}0Q@5I%s7rGfqqw#z@Y^DdorZ-@WxOoRaa_W5Es^(Fo zoRxoCnq0vu9aj(lLW-r0Oom}QDyu^#@`o$s z+e)mBGTqk557Fd|$RY}l+%_Oj`SjuL=3KvJ#i%hAwe+Bw98K1)YAL;N*TU(YsvGS7 z7HNg_blM)wt+h!sI5hS11MO4M`BlHB!uyqqIN_A8zh4EGZEWL_P%*!8zxGjkipGD6 zo_;^VbiJA;mGaj6;e^}9ayYg8ek>+?u1}}hdwV~?Fc?%$0QqzTd`@gF$h<^T?*c87 zQ%R7+Tu%BvlA_6$n*Lxe#*=Pz>e6Ioer|XRIUHVw=py+jJ*~;{edb~H{EKOGa&b#v zICRtPH*FrKm&0zc~B%Eih{5j#W1CD+9wqsVaf%$SVAUVATK#{A$3HuKoH zO(%4-axJT{f9QlOhxhL#UOQh%Sq$;=@xWVM^#ZxL`(-ikg5a&q{jYYf3p{@@*!?oT z#W}(5U-5M#lGZ)pe3`xozW?>Wd*~rLH^{1eU2(G#JYx?zKUPlQ)uA#A0I%VDucK;UPb|J-Cm2L>^x_rH|G-QLlo z;;!9CpM6$r?tVpSVELck9BhBCo>@D+c4hssO7o;u*@kbDR>-8fCYpH)s>mmdP|@WoDSYTC#~afj@!ZL(qoOu^XluPQ zx@)+(=8`E^Z#$&?!6tuny_BZ!-P&~%4@QA2_h_H01(H$cDz}!X;Ik;IeZ^C1nZf=h zDz>4@^_`jO*%Y(wbCzH-Z;9D{gS}^~%com@>_)e&Zw>};dY@+>KlZb)z9ZERc1~rU z-9FdJHfl&$PgjS{wf4@nLC{3C536@mzEbbkU$8p2BqF~xNA7?0ORu?p_mggz)Iwi= z>-^EP&wup|Z5ll5({H@(nwzue1&Oqbom-#0{aiiq5<>&7%Wy^QzTkOhUzD`_;Z;2k zNSgLa?bwNC9wNx0xiS3JBn{#QyPtb<>#d|q?!=70vd5h5Em4g%!wc^@#{a)V+TJlZ=R3GZd{W;=eyC$Z!v9H7}j^w_2fy-CE?v7WoctqnQ-j&5Zyl z>Qb8e?vu$uN5Rsg|KyC2^vxCzj%s188jz)_A}^$lgeEeR)#EFO7mk6}g@#O?-5C zust7b9V>P^ZF1bNpH3F$oXpMNe(a1Z<%(tZlvp4yp;mRgKxopNN#{UTx8061YE74=;NLkUi!^aQYskZmE2h z>ck0y9Kuo#LAiU)7CA$b%h|fXqQE-G6&n-Yf0+U{+$-GC;FW$}@?{v0G8<6!M`8oE zLO_3BW{|?gXlS<{EGNMrEE>&V*;*t|&RLAR#x!+7{`aXuT7Xga$YvzR^V)5b*bPo{ zDqQlWMOM^mQA%d2IeFdapmGcMwjJ{IYGF`yauoACc=hwPY&%-4JBtpN4%JORwdKR` zl2Y5(t`i2*C8x_K>!;~@9apV4R)RIUv@m~;){D`yV>hT>fg+Pi*!`;y9@MFqc}a~% zPX~k3aVwr2R*U3Z1Zwk$*N8pDLamdx2(Q~A$4)19VhwIn0Ppn>gCzrdo`&9U*7TzG znpR@##gJ^i{dkNYQ)hpm?n<8ZdnTLWeOY9E@z%?i#h+ci{QcvXFaO)+%kuIo|Kfix z{ED;m@=^M|qLW`NpCrz5E1k;e%1=Qr4SRi)BSw+Tj4={-QRuMWHN$ec9TjPLa7obD z&`q58%L_>TSuv7nx2~t%Y0h`((D<^b37KMK#FKUoymXba9>E-2Tg4O&z@!?JPb#bKSnSr7S z6(pAuRjhe;Cy}kLIpTV8a;JFT>Zwzz(_3Brk`=_K?@pFnl7hQ`a;x-`mT0ed&Vd_V#TL#KL5iqH;sIF3NvZsu|3t zU53I;t63e1OXDi}WbMwZG68R_@7v`l#yd03XLvi}xyO4)jN0sxN4op|&7+5lhPd4g zmGAFu5s1_GIs5BU1*(E4z$CeynNx$2e6tjwNJEwa+$$~@Vz z+m(}*^JK@~L3-^Cm3u4is(iTe>B@hve5>*=!WJDd5!Z?rikFI?68DM!EIuNBSA0=? zT|6WHNgBB=uaTEH-|b=f4*4GWJMszn$MUb`*X1+v@8x&p_elfHsU?5aQGGR0$J9x6 zTAfw5sGnC4s&}YgQ;(?+sE??Rt52yX)ECs()HCYu)xTLSt7ENM*I74OKWV+zy2rZL zdW-d-^$F{@t>3dgV|~GT+WK4T8@6vBw$IrY?2GoV+V8PHVgI)M$M%=)uiAfSf5ZN^ zCYMI9=mUC9U#D->KcRnb*RRy~>9^^}^vCok^k?*+>;I*{WfZBf$Sj$4vuOrqV$Pcv znpd0GoBPaL%!B4(^HK9z^QY$P=5NjaHQ#gQot|^hIp$pJT<_fM+~K^!d4qG0^MLbi z=Y!5~I*&U~IbU-A!uf0G8RuE&ADw@8zU%zEYrBCvPa^4vyW@Y};GTD1vs{TH2S~3as&z>&26LBO46q z^zCAbM`s2YlxQ$b)55@8$Y=NKcj{zX8(fIC(WETsD8hf_^9-SE-ANxM&L(DSGz4J` z2Q4@HlSb)S6X_6549g@37Rs#p$fV$F#xv?s7v->_>j*(aXjaxo_GX_{V0jmMCQ1ZM z^U;*Lg_W3C_Ng7?Dcj9^&@jkI-Xzfc|qO5D*c3>S7u)$MU}4KI!;Hsx|rmXd>dbp7l4X`z|1ijFkq*n zDK(#d8yGcWV7UA`&rqj>|^OU4C?(-~^X zWSN|%TodW2o&5$kZ#14}U7~MR&yci2pYeB&h~NR3FT&P&rzAEO7D|tXuAdG8L{H5d z=7oXaF8Ubb9K5+GaIYyfeLAE*_P6V1Jn9ZJ8c=H31QQI;?QfA5n9{uL66G+a)I%Ou zgrI+;g2bd4W<%<^>7$SZrb(ShMZRF4C_N(Uw_L0nmSz(sHJ3@ll4qyT;GRB_h?rddb#K^U_6rh3vK zKZvAJHXEi%F)fkNVJaF1FzgrGeJ+y8m0E$^pYt*<=L?Wuu!NBVTVR2ggM|;%8{ZAnax#$jsbr7&mrAfka;#LW~^U6_tp)EqNSv8=FZ) zs1c+$L>IUOgMlsP@n}F36OYNMNrv}W$@K1To#62;==M2}4`vUC)sf)d+nM9e5D{rI zW6Ep;rn$dG#HGIW$xx>w9p>HhT`B7lYfDg-w~TS`{hrU@{Dh5?k~HjQsAF=_?Vc$-Lo1_1Mtgzyw& zz;IpE_~|x1bWFFVQ5%pb(wHp#~gn2a&;AZv^U+tCfjBkF!`x+LVOw-A2<(*lByAy4_O zpOgM2BV{nuec(jmK>))UjETRX-nzgWfTr1=5Rd51GUSh@L6?*%4Hz*9FCU{G816xx zDcGLL4cbY~>=Lt2kCICwhagrygvh{Y^RWdh9an#I{;;c<n+dmfR)_ zYbqi{Jhrg4+odyt1bN)3Qy`_n#wl+E(OncDbEFs27mJcX&gi+qLK-&W?IS6w^rR5^ z!*q(}OF(g{5}rh&4iF<9A`+V}M3TP)A4XXc^)#s|M#_x$Z8?n?z>Rk9&~qG1EFsNV z@S2{Bgc)Rw^PYb%K-@A}RzI?_lYb{&D#>EBfNSQX>6Uwg;%dr|=;b4#2aDW^TCr+taBJsA#y`CUBDRFdFcB}zJDI~~J>d@_v(JtD+|Ww*ga zd{5?l>eeaxYLysJbtrh|iTmcI#tqtRa$-{exnbeC1;Y>XRt^wa2}VI%yaW5nu^GFU!$XtSrechHN#Kml)2qWJ}!knj;^svb8qB9C2KwK6j z$by(bn$XK1A#4NrbvAfY{1?y5y)eLF26}&XPsI{Nt0NTM?D49LRCsl z8zaCEQy#(zf2|y6Fv2QdFGP(SO-&M?Q`+)W1UL|-p9ZtB@H1kaqfUhQ@ILT^dYOMv z4%p%C=&Urqh)QlyE>7ZNlr)K6W2-+!dx>7D5Vw(jurc1RFHt76^u-&5ZT|{WxS*!W z1A>$nHLEM$K@V|V(n2owD$JY$(xjz~YaynJ_}yhF%^)SM0_aOSQ?k<)KJj5-JokMF ze)$#ZiDjhcT6T_NZbm)D^Hhp3z!ZO@K0V?>QT!(%+L#qTff!w$Z#~9W5eFFzgPH}# zqf55XNVJ{qWp6{9$uI(~jb%O z+!!G`&Bo*vqLiJG4=z|4W8l@?9+614Hk_#M0p8X1Vpo4Bk+$h_tt|&R zwXW;g4tU7L1GLC37-6jLe6la>$k=*Lff31;3WKDbI8~82y~2q}U>r1&S=FfY2cXa< zF_ISp$XiClatbrdxWsYxbw!V^3=lsiJ1pJk;yAvJRENd$Uz54n(XmGzbZC4L(nf@z zqmLv`G+0$}ogE8k4#+HhvOTu65Q!+l79beo$ZK^l3;{+6R-5HP7?ET*#6+>g?xf|L zfFvrU2{qc2OK2K@X1XX=G#4e%dJumJbY4v+tix?)g=A|I2R0E>a*YDVM#tH zM$tSmzSh2$DvpR$!ofxo=7?*nBu2Ql5Q#=suXO2XwaT^`GDk>1Dia}`+YzP(%sR|) zSa^^U7zE>3#XB|l5=yMp9luHgTxWv-Q^_@`JOeY3T@Nxfjc>C(PZP&hWqa9n2JjJ@nZZ~KiH)>269f_!`xkZ8B9nEXFuFDz7vYixEc z44EL7a7!mH#;itNPHJ01Cu2%MSR3dX6u?q{G@Jnd$OO#|L?j}8!AI2t%yP~1nr0wT zD>4po1&MnDqlubmbA&L1Qn)E~JkRh{IzYFQK+F!vDhxHdF^Dx0=m=zyWG_L&FG3_W zSNLL|&;|u<7V9Fd0dmzLZS62}0r4k2Gm1&7fTGZpFmQqDO>_-xlq;2x^E5{T;RH^9 zjQAN;Cm^nsoKeYxWr6ZG=jy|EGO#yo@`tJAbB>_yb0DE@c_bpN2qr8t`EjjgtBIk_ zFlIJKVS@|VJw!P^00qI4hEf%LBAK>UAas>m<_XZ#2GAUw-DR-?7uA7DE=zl@w3PS! zhrN&Gi?n7g1}t>no12})b4tXHp~r-OC}>yqEdsU3BvLjzWia1J15@`%Rq4`$1oH`A z0pOb>;S~&~SWhy_nkDuf3XC6_oQ&+nPVbNYo5e01kiS!L5Z5QVRr)_}XZfh;@0GMc z+6ZzsyByb0qGOcB1ZEK+(;#YG#o)W0ftqc!3|_`ezk}fNQn@u z1iH4GJIPY0fIKM8LU&$zNv&N4h>Hx@i_Ko~a|fgOV*RFOkkr=fy3uxn5yweXnQ??h}=VLY}fn+TV+w=2DfUP^i$f5{3vqR=$98=6V7FSx#w%o#PhL@ zm@zU_t4`E#>uDIc0jgx!Q84PaEj!wL^XAR1Rcg>}XF928&24N4sTY&W7^P> zuU0H~J<`DL>DZymmD}hv;(A!k@AQHQ-C9rmnkHKyBn!;-_Tpk<6;;wo3utkBL3KMf`LF8xN`3UAeEP;~u040=7Y-D7 zzu`X~D8v_cfBj?X?jzFLd(L}RP}YtUY1j0-ZC`ZBRKEEB3un$;5SKpx`Fq8+^#8k} ze&2n&pAhP7Ajad!3vFKGpp?du%|DFDcmbiI;_qW6?f?niTyWbHD z-|2o;G`4sDhg{kH+UCDriGMt#P|f`pDo-JL3Q(d51MTkD3|be}mJKFh)GjWrgUqaI zKCnyt?k+JCf)HnUI@s($?h<0=QBjApxj34Vt^)KogQ;TKcSoHNBP^nJbg#ZWrfEDZ zk;WJy4C||t8EPtj9sB=$#Z8(H)S<}##yaY1&hX()M zCw>nSjs7k_KVE)*Ldb8BRD0mO7au7RQApwH-I#%qJ)jYPk6CNEO1w&KyeViRUcD@u zzUl>okeu1uRl?|vcaH6bt?FxAO_~VlxfHtO;-(4*`6e`VJEQ zocqoN{&(xG7cP8f_xFYLH~p2KN^~uhqDhXZScFl3sY7qm%TiCJbSISpE((^E6NNBP zmdSY)-Am;^`6s)#l732d1d^XrIe5^Ee@+*}d6QgW+m%N{vW<&zO8*=5+dE2hzu3?_ zC%Gihc!PB1^RWb)-LBHrE}8;d&W4>@z!mjnveH6|loBV$gf|NJNeod=Z(ePj}ERnNe+%WcjA^87b`G4gDm zyjlC*_)t&}x0c-iw0-ulk@HLKlRDy-K31BO?v z0(hKbU}Rum0OBW%TYKX9ZN4&aGrs_eFkJQd;DSsuUuNC}q&OIuKs*3R918sa0C=2Z zU}Rume!&0)EE_;1^JNA`22@ZE06xS5?|7VJU|?WienB2)*+9HJA+_|tw06S^K==`# zodEsjYYCG;av*;P@CbkjatYK51PVS1U<&371`C!9Gz@SIjttffN)3Pws142y@D2zL zA`X-f7!SA-0uv4sR1^Xf^c8*;%oc_g>K8y4To-s3`WSo|t{EyBiW*ED)Ey`v#voK6 zlpwGn=p#TU5+_V2W+#Rx(kLh>rYSrrb}6nY+$%CH5-eKUEnqHYE`Tn$FXAu^Fs3oO zGek4iG%7a^H<~y`IF30GIcz!nIwCrJI^a8OJOn(RJitAoJ;pv@KG013O-ZR-;8T2t8~7Yw z;7fdkukj7O#dr7~Kj26FgrD&Xe#LM29e?0Y{Dr@ARs|#(V>UJ8Ur*&7+5&m zghxO`!h{XBvywZfiSaO&JV|BChBu_k#%{>7Cg^`!EJM$|gD3X>kji4bz1Adh5IOKN%2 z@w_DGN${BWE`@cK%$JcrC8?tIXNPGWD$;7J{JBF~1>u#8jPzKN_tsYwv@)@74AH7oCc$!??<2pPHl2vd&(uI?tu1eNsA&005*My}mhHXk}q!004310000k0000s4Hx7RXlP|& z0043n0000O0000a2fGAZXl-004480002!0002! zo@LC2ZDDwD05<@0C;$Ke9{>OVAOcJZ5pH2^WdHzkNB{r<9smFV=H5yf%y4gWbN~Q! zXaE2L#Q*>U|B8h3s*?x-L4Ur_IDvtcfq_AUX%CR>fzXT(7z`Pi7#NrsSeY5Hf`ByF z6b6R}j1MZAUjVsLU=pYiL;wKFdkWJ40C=43)CW>jK^R5hGce>JlA|C9qU0PUiR7Sy zlB1F{M)u}nW+&M9U6&zK-|ON1-KPfX)c`3#a?l*aA!(9Wct>m`+<%Ql_mjzt?#E;K z(Vn>OCmtRj!!@RB_&pw7lfvG3D5jD|IvL?y7TM&G8|3hWJf4zI0fiJ%ObMlwQBDPw zRPl^zYIsg9b>a1bdK!31Bd>T(Q}`4uw9-a<*xx}XU3Ak!FMaff*8qbIh3hbH7-5t# z#+l$Ple}Y!X=a#Zj(>R;SY(N1-t&Qvtgy-_KC{L;8*H-0HaqOH$36!f@`bM)aU4GV z38$QK&IOlTam@|4+;JcNPLd3*$)@Km5jQGFEBJOG&CoX8P_)v>V#nVQ6osp}k#(_I6wJ|LHMwuGi4H zK11jF4V@b>bboHp(77Q)=Y|cPdt=f25krkpLya**jd6?iOc?6DHPo9l)O%;BH)W_d zZKyY6s5fhYCmsJCdSw`8cdY^e9%Q164G-bX{d6+^vML%mOidY=vT)(rL5 z4fQq*^)?OlwhZ;Q4fS>m^>z*Q_6+s*4fPHT^$rd7zJD0%eKpiOGSoXZ)H^ZMJ2lih zGt@gb)Vna$yEN3hvgkYK+EDw(Q2W+U`_54N-cb9Sq4sw}?H`8PKMl2i8EXGF)P6AT z{{pd~OGS8`l)Vd>B}a88m=Tc?k?+i#&ztxCsC#c!S9MkOeO9ZxtJIB}Zgq=pBw7z7 z)TXgOAb(jPSr{4N#Vs>!0xxIzOT&4%y^tQ=l{<+5z?pz|1rWgwd=JzHI0ZwNFhBU#VYA+ z(0;cgg-^tw+ZptC|0d)95i*{QXWL{pJw%30l7EiU(Qt=MhiQg?9)U~hBu*3j)!ock z5=)`}x|8v2y7!mDlf$kbbDuj_JFM%^pxOaep5}qYYOE6v7ZP5>9*-fEt?Yi#~@<(~2-SC7?nV-6rEuGvo zbxE0~t3F((cW6?xw5j$iO^arutUKt+*=UeWpl_h7CgVYWgQ)JCO-I8lQGFX{X_GWa z5<};7JG03sn~jq0M0N+sC$3q&W-YreZGRnYy?V16`_Ox45;YS)&-e8^`|{AS4Lb@4 z4bRI*y zeC1v5`pO3$`SlMj+OVJgtya^vwHuWzbfCH$6h?kB#$le!rZAjIDVAN?+Z|63i+@56 zX464`HXW+*PoQ;!c=zmhI#6dPSPbuw$`~YUU0nqIu}xC!gp@p^8{+(svDXFMb?z4r znxSM4V`NR&%W*^ZT$6KRkqtAt-f?7N_WiO>$+?N{JC?5Nq-%OdVEjOYq8hutrI$i3 z1ED(}*S%QxY|4oy^s84W@jvXi`hP`9EN0G6lsNlVWFFiacA&p>m%}rUo&Nb(lx)k| z+_$xpQX9FWDoKesNS%VbwU^4B)q3LV@^KP4F4SJ~*2!)z+vnfok-G6yQzi^b$ zqs(%RaOprcs5o1d)iDUGKk4tQMzlTL49yxdyQY2UL@lY?y!v84^=gUjn~4`&Wx=KH z>CHncXLg$1>JoE%l+>VYhNU}MGpNE18^af_mICgimE~-y()3c8b4=u-y3aR_-g@-< zkpZ&=I-NLfUd`%Z*Eo5_=6~^FTDClFx>3jzv$R)fKd1ec_O$jNNknR70KK6av_U$3 z2@=s@vr!>GJEV`zUS|_kK&hdu5REB{*g~CPr)B934>hq%CbKczU@}EvMM;_sK^skH zBP=pKLg3Uo8GtrhXE5v1WE;D^Nj6a?M~hAdQBC0DiRxXf!(cp>sDI!___z$NhuRF_ z!Jy+}xWFgf{$QBKqSGHkT}Ih3g}M&9X)#`151I(G0JSKzWZa*ms=`H;)ZYjim5op! z2E%RA?}#`ZKoc{(=b+C526}AYxm7)e84yrLb(+@t4hVNHv%}T8#{$9P17V(K7q%O9 zre9{&oKhbiNEqWBWPj7qc@$Bd8>aB2MJP9P9pr_Dpkv{F;kqa435;MlrOvNJIiWE8 zgc>^6C1^^%>UJt+!K6+FC_E!DbVu55;#pq6&N({UzXV#B`K*=(HQ|Gn;e=W>ICMVk zv^LtUf15{J93CH=lIh%uphYyUf@0;vr7I2|sIc6M+|ZXxt$#d;V$&6lJk#C})o7jl zJwGCGJ&ts0vjEh%1@|F3r;aOh;#!QFoKoJX=GJOO2tNY(!2X#uZCz*Hb9y&!Ubx)O39X{s3%F(JoSP$lZsI_phT~NZi2$XbcBQ&;&*B5*7?qQyS>?Z zLRiqZ2Gt$vGSi|)M}4Me2jvgjn+YRdw(Qukl}O&Qb}F1^UMS1&+qK) zkjiAaxnW%}#%I@u*AIu+zxamodzL5U;hS$JmHC^=^*8SrO`MHInL;bk(aH z&jxV(%YVJ?{oUEd>HN46SXS(%VOj~BrNJ;tyesPPfYpuFmhTu&N}g^yeYd|Mme<{$ z(}dUZP^=8yo-DOQll;r!o3~@Xm!A`v*yWW6j@eyrX5Ft*YeALbI>?_x-;yY zK3#m!{H^E=1NnAuT-n#jSKY|A{CN5DXB%f%UhyKg9OtQ( zSX8oy&q%R-e#eblwXhYgT>nzZ$w3k}11jZLpvv}&U4Lc6aU#>B-3y>mZ4ogC#DDUd zFo^Ap6VcLL+i#s|y3h@j_9Hg`OA+a25Oz=I08djcZ@Ho5MS>Et#n=tZVn$6$z>G@7 zR6p!v`?N$W>|q-Rx70v$*H*@`G-iMZ+hF@kVERXG5W*7cXV0GBoQlgm&@9;r@@^jK z$IKJeZ2qg2u1;EBOl~T7bo%9ECV#6Qo8PQXFN#LMet!ULNrAxJuWMB^}WoTw?t8b(|(+aCAaat;+ zVcwkojWAhf%a41N-_AshMSra>5D(J_Yq)ZHz4A)WOU&gfL5h|HK(-KU0QEB4lyR6a zFBnKk4JO>&_Y!8d4{jbm=INatunQ`k)1%d=TcF0c*T}&ZeVXbOQxB}rbfh6&14?+V z?)n5wV#xtRo7W6R_UjHa^Aeylri>Tx85sv2F`aUW!68bkj>G(yn15-ITcPC}R$Olc zCM8@Dx)cU$V85b%IqI90n$zt28{@cgwIijIAUc4{9b3ptW9czZn`qD0eiX)XR16RN z#V~!LN3m0p2O$0;Y6ReK+DBNnKtjVQYtU_~&Z*)Vo&uqpOdBX0_z&skXbN|nkgxWQ znz6OfPgYE9oWC<^WPkMg$03}?J{eKwr%;Lpg>AG`04Z9AT!!ZgEX}dV+cUdv5kUPXT3FJbhogp|kl{c5d4tNAEm_ zH>KqA>DD1;>OE9>oS81~W?rrf<7uB6@&n}3eETuzuOC5nHGk+UfM1~8Q6Y!`5rHfM zrkxfb7>RdZohiBts95)VIE4Cxt{bbK+(sR$pfey*at$|P!`g_uQOC~K?zs5M6a7dg zQP3>g$XW?dWM1aJEA{3vo^z7{Vjl?Ov<$85 z0#Jl!JJr<}tbaeB>o45cihR`bhMia?5K6*`>7GpC2(;Xh!LrZ2Qmel{7)O(QrPi_B zh&T4PByb1Y3v1GX@uFl;FP4EbJ*>SO_2LEr>^z3v*alU!PJGgt^zjQqK;Yxg3b*e7;4uPtj0@bSLn86zOF-OnvUBDoDcvsx0gYTs1F5pEXjQaGhPq4 z^c^_O9SbJ%54s8147iC5vTE>yZXy6oJ9=>w_`&Rd+JAi#b=K57dHRQ3;Ub5_D=fiH z`+s<@;D10GI9v(ObsDw*m&dA`KuOCG-uK<4BUR;5x{AuXm4myLg7-@pU=BEPOS=L_ z`TrM=OuES^8BIo$?rd`D2SA!5`@35TK9)>7cGD;U_!uk$d~}c3mwOv)FlRkix+$5i z4TtdW6O%)SCWonh==_m5=p$TYOqh0e3UDzFO@BK)+m1uuYx`xdx%S{>ZEI_dZEsJG z9h)rVl>P<%KeVdWgckfTXgll59nzKLSbpZbfAxj@`uqlXow+f(`eya*qJMorf{Vw_ z9K9F*J9_5W#fuj|dG;(|#X_&z3w-Zu5g<~079jno)Gl$j{cQ1=AN2VpI-D=R>s?>^ zL4W_4^~`^yYj>}#tW0)a%gf7qZThBWX(6;J28~?;AO=uitiDa@mmmGrcYgS-r~AE& z@7|eScP;tuYk!t}`&i?q!|$1Y?CMMQ07#hD(=OMZU+B2v4;0gMRLq}|@)7NVJFwds z%*(D)WZk{eXtRMWXUZ?8&Z&uCoB+W9eSf=g+0aQH>2lrbMB~f*&w1JNV6@HLUAwIA z&HlyaLBsutU!}v!zP4Mowogr-clyZ5%Wa-JN$H7C1T9aB!>1~Z4ZoxbQw&(7aVJ1Pi^UwVAal5VM`Ca$jkn(cKhX(TYciWt%eoDYbAMx( zqtU-(WN!?$s0}1-@hZXV8S>3}_7OavdNX3>g*i>o1A(5k z4d~tj<2_h2-E|R-3ZIG6X}t~8@C{Z)XFJHU-8=!z%;qX4j(0*o$~K=*ld$%Jh<%?!|oZe)OvBEvJOQ_Vr!^lDO= zX|2cfeEvbSR8gtk?Ep(=TU+9MC&Io_K$^XT{`n7>BhLlddnuw3r6AO6@P7k7d-&>i zQJpJh1)U2W+JO#UV3^S^JS=**&v#uuQaPZ~!Z{`S0PG>p88 zG(p|2{_|^I#X*8(d9b?mwxgGghs&wCZ22HT0h?DX-%Wl00XwNVS<~T;4DInt>6f;x zZFl?4ix>Vk5&F6x$fz+$e18ipwp+>?-n7-#X|pbha4 zw#fkpb}#YLXS1nxjrLaU1KNkQKSo}f#e1OQ61M0J3gA2$pa{X#8xO_`sud^=_`*od zRb>#1o;!q^8v)#`zaVXZslh}G{FqD&wl~=IXO5-?omCQ>EJT-$3x6T)cJ{DNqBO^- zK>izKm@25#?XMCA-BF_~{A&|>*35Ng)~u41=3Ct1<%*T;Pf|N72}C}Yh;m_b>7*j@ zK;9e?0aoF<;TeN{5%)RJU@zXNRs_t69YIRjD8_fTqqQAJ$-YaL*B}6bf^B zAeRD|0389E1kI+-UVjVHZsj6?spXj^gV)SbAP?pkd=RwPG>IfHv+NQBjn%2i6ppi6 zt-Y@y$)mckO<}LNwsd`<)ZF8QNnnyXH4R<2Ef!fO*ehxRUDYGLmG7YMj&UJ<4hkZV z0^bURFaim^z#NvoL#?l_W0yWC4!{3lBIBJLOnxYs(8sFvQfnz}HG2Eb zj91f;IsVfAD=$BH>deX8{qEZ4ylfJu83k?a`|5K{JAJ7>Ke#p-$~MrG8+sU)$c^yWbJO8XW3ff>CO- zs2%aaWR@kpBm=Rd@1MW(o$n+U9-4pb$tRzje}C-$`|oG&{A=^Ck^HN7e)-;ezx?>a zr%yk8^)4^l&yFDS0!1XVft(Fy)&X>MQo9PS>@I9` zlYb=Li89|K<*a~Th;as!4GM~8I*Uf=qu^`lhzFI{&q#X}>von^WRO_0u)i1h~tBw?ks z!BU&1kap|q-)!3gzk+$1+;Yo9YfWlXC)?|`E(Wv787B`$lKaANv?Kb6CTexX4^g9LE)h&EY-M(t_U;#f6h-HNr zGtDq0bwK%jf&YubKxV@k=$D1|*?*=0j-ck@bL!=3 z9LKkva$KhCrh>%uEW9*?Vbe6@3h*`jA}!qqCG&an16%4<)U2E z!L0c87`pH<@Lw+*UUB@|6R*C;^Yi@fGtYU>>AQ1od8cC^rgEb6@BhWF1$~rj1MPrz zwRSRRDZ;=+nJ4b$Z*m}>C12qu9I%zmlOzZ0R2t+JIG~*DA*Fy z8rI2Vyv@>tbq6Y#y`#o-jD8Cc+(op1I)Mvk$_c4_tSAx%C|6FdB!#&grx{SASSl+5 z73$*r-c6h+3{ZcA7WD+KgbofVA_a&5k`>~EhZkXGD42E7`;nnPB!3a@dz#{;O{V%LpX=jBF#G3BAT%ztuR*P;fK0hhW-S%;ejKq5jdK}ikJH7DHVwJCZ%0rC7WHR(`1R_dV(p~prop;~t*Q=)NmzPS0^uxoh0Dqkgw{WTDIi3$1*|iOf zsCv3fU|M384UTab;lP}uCWrc0uv>f^&?9+A(HAC^;|S{Ru$W1C;0OmW*#;DN56~b+ z=!YuhN?bCfY{gMkvMtkfLzg)RJa-T_xSpl?y4*G$CvqIK3HpvP7FqyHb-GxsxXj=dn@sM8)8i+iStueY2B&ozXzYM*`qvW|-KWpqfp(I%;MUn&b*p zy*aM}yylEjkI8Bjw>;aAp`~~7{k0^eyb%su?>r;ifPcXku3=#a3w|c15CRO*xqudx zH9dn%=xE1rKsv4M?P^29JOG~j%v+0mrFmuV0)L=vqO)u#t!hQx*&2+gn{{tI(G4v?; zNCf?7`_%C>yJW52{mL~r_wCSR6iVtiJ27lvF@G5A6lP|q8}i40#I}Xo31A8kA(R8% zbV51*x7lFjNQ-9idm3?>b`Gu%egp{>rjeLDi(Q8sxolW^#fQo2RK7$!u+KKk6_)~q z0l30#9Nm8w7R*V<&HD~~0!PWob0Xj}vRBKNEZ}!mXi0%#eW!6`v%K8$4Pa7Tqn%Y_ z3V)(z!~CgKp!SXRrK#l_esnU5YhD>BpCyxbvVE2I{%)h2MwEt0uhCs^l~-WiKs|g8 z>H#X^20Wl%LV^D6;##%|a#7dzq1PcBAwdQ!PXM=IPESFLM}T`~gV-aTb@X|H@ga|Y z_{JC8Hypd-IhSveA_7OX>WB z@BYkt&aM9Jsq0Ri*tdG(-m5m6ixSPz9wxpWFy^v$M!O3Urt*p}LI;KCXV(56i=w>a zV5D~Gej*l5Ya(cAr#j0?P$fT^0$yZHgH6_e)34b%1 z^Bc2XDW>EzY5%zgbY>f&S?6d=r2Iqiz6NlF{SKprNjQ zCOiYme{dG`QRMrQ6Mc0bC=iEB?gXq{aw+sKcc2>J=WU-E;sbg2-U9O@HKwKEY&S zxfVz{*S#Qas_>s9LuoQUi?d1+M7jAG0_IlQhB<*H|u+Gk*qS6{$jkGD!#1 z5$1{QrZo(<$(}cMlnt9iT|-|fTr;rO?Jhc2e2Y=tebsM6pQWwN*0Yb;=q3bQVoCPV zk2>;tDmW(F3ESClEJK=(XG|>Jb02{Q=jWbt)mhTAa`Qq7s2F3eX^DIzw_`_dliyBm zNWWU=fcZl(hi+7UC4cl`duJ3h`-g?am=Q#lZ@Ci(6s_q5V)dA3z~M+rY3%t5>DSp+ zz}suUU00xIG?@K972U~UG6Dmn-1l7&bj;)H4kUg<5W7mIYX+F(D?I!J~i@ZW4oEQcLjYJ0+{Oc;~DhDu03rFMuoSFxKQx$R7 z;Vc8Hg`Wq;vjeE6W2D;3+^T#)9Pn(4{Bz;`QC~m?03M5lqaAH8y$fcB&O1Pz^$OA5 zifuTo2~-kn)_;9RF%J#KiqUr20VxN7gI-ykU3;uK%%fhlorVB$of0TNW`Z{B#1#ZC z40D*8Hq2fCMaP@Eyjd>;UP;`D0!WHP;P@W21b|(g3YaE3p=F{=o!#~@2n!>jWCmDK zYFU6fq4x9>!N0VLXnv$@8!p;#BLK1}4BM+`-UZW?V1MO=kOo0BXBf^pHPhp@(9)%C z2PNAOdwIg2*BaVHyG%O<{a!e4yUM_fH*vl|zhky9W?oKMcY@jpNd0Kx=1pK+W<5}u zqXgswKgr{OCZ{*7zMOf7pc~#5^+Fn8Tex)N6hPE7iS6*gdzf@I=@gRoUuwH`4!dl08ny zNw%2lkApsMX(Me4tyrhs{vt)aTN+Jw=pt5?lt!iT091CO+~T9@aI&qEufUqqU*VO0 zI%srC^^9F$Znf?mU-G-AYo2GlTST=2!+#4!C4Xu}a(?H93v?8>B1}UU=F{^hF)uL@ zNZ04@B{$^ef71{33|kUrb}Y9YJ@e2DFI>tO+RvEsb!k22>5}O7$>@XgryhBPY(4U~ zXV3on*|YyAXe@93k8j5RcIU@8>Hnq)n7!ZYlO0U5?>_#vw>?h2{fP%2_ymm}yZYkA ztA8J3kDa@C@!VsJF;40K4t=w%9n{XDy_=ws5{e8jY*N-K!ge@|b}%D$IuqFpK(CMm zQ!bL{3KJ)RL91LgWeW>WJ^i%MtHBO4r!Skl=n7Eb<$BZu{T@W7rSno?PQ=09bbEb# z4=*JRAa&NXXS;KwX^5umtu+OUtQWn))PEfjvD1g{y~(5RbHPkmJ1imD>PszO)XPE6 z{K&FPzHZ&uTt3l0bNZM4N@AK|B>FS|g1KTEHKW&E6QMlo>5dr%ZgRW18zb@PH$hT1 zw9B(HFSj|YM9YCBwm_-ff7*JPG*HBqXuGgIupb)KrK}#&( zO#<)t0KqsGVXK@_PQUrgKRg6%bHhge%yF2^Ebgzx*@X=FAEg|=+{=j%IEz0GoRG0& z=iSJ6O~;J@APBmZg9gAO{k9WmIa@cVzAM zM!P-#ee&h`7Wwd<$KP@{8P2abOztC}ZNZ6+)^E)(lKYeS2k*Q3p$Ewa=8uuuu3vPM z?E_gGYFBF4C_RpvWVHaLb@DyIIMgZq3F$0SUR1gfI>2Tf6{woP_XK(xpnuaUNk)^w zZf)6qzQ6r~gYEk8#;dMRg|#}n=HUA9$DeyN!rbclQzwrcK7QiJ&Xp%#-Cd$r9^M8- zs?h0$ylGld?eSZ(Mr*CnqQR9X4jlDNbL+~NG^645hp%qM+&XvkCJg;ZbN`7i09CZniSjFd^xBg^3&_5GCrFVwk>e_2h%|AqXomc<-Pk){uYmwR6)VB_v zeD!hihQ(EvojB56=%jUa5O~JV;F#emhDETih}4+PagMR?rs_SmpSfak6Q!B4K z$1Dy!TuP?L(5}50c+6g-ZE3%xJ+1wBvXA^Yc`x~6@-+E0`48kXIA0HR)ry>0WkeO} zc+mM&^!HM4m5UM$+U_!p>0nIuNCi-hj>@nS87{0)skb8);{}W~DhlDy3?{?uK)QGW zS_(|cLj8xs3x5-qZs2+%8BaJmH*xhxchsPnS~)gT6tmEv(^;}B3K)=Ase>RQQQQ@P zIrm5^icmphcfIQfzWaO8dRC+k7BxVHf}uFPyUL-)MyN0~HUJuh3=N)j01O&FRH)1P z$_tCaIV*BkMqPyf_WEMC8-~-Ny3ugTbObFj%jhveOiY!a z#UnknJe?3ae-M~c$m?ax)+NiM6rE+t?U=VhP+HxiE2(4nCClg-%^(0Hg9!?@4KpWq zqpr~kfq$#Zu5kt2zh*>DqvPWu6fhE|)AFO{3Nl1E=vsRHP$v*Ixm|0wsY3t+3k+>L zDP~NDmQjG7H_Q_&o> zBTOX$*epF;asxxzFl~pz@l2qmKobvAhE7ghEPuNR{^(!@=A?Imo|^;b zwAI`Kvk2(dacf)MFfe&)rX23W7>t7ozIoW7MTAONGo8(^qJEJW&xtp7_)epj;v4=DZIeV1+I$(u4WrB z3NGV!(l4jkP9f-ON{kPuV)awa_6@C_MSj_p|? zoc7uRs_#qNixO!@zHlUP@uU)&kzn&CMt=zfLB|cI<#6B-CXomwbd`K7&BrK8l7(k6 z(ug@J0j{pGn8Z{IhDD(vaQYA~5df*g*1+#*w_ey*o#L&TF@>8(rWdDPY+(oBxj+VX zWG1rYd*s*VZ@=kV3%vVJ^rKn;8WHn<;$r>WOcA=tA`^V9R31(+S(qeTgo%?aUVr2o zl3T7_Y9I5LY%|JhUg=$7xms>CYTa9(^Q;NTWoRd9wH`Rj!;SvRsd_7q>4(1goNkNr zD@;G!H?*XY^fPDas^Ly_9GWYVj%^0fbTDjo4Q}q`N-(L-FhUrqpl*MxYITSt-692P zFZxrse?+RX+0}V;Dvi6nPJ(XY1b?v31e=8m&2S0DLZeTxp%_V4d9Ug=qi?j(*-p1c zxr_cyLIbbS@B;isqtwk`Dkn6UFm@YE+=%JBXIY#$`EU!yix@7TAm2{RZWNW|=K7&L z7mjZTH?;b2zzE`=9lDNh^E^LvzSHY&hz+xAMxFDMeCPsn@5O;3OHtnnU4Id5mf4~8 zO?5u8{Y$ur(0>B!mTP_JomfST$LqwSeD8Y)nE3bp_*#4G*j8J;k^ZIc4}H(!m$!Gn zweXAj-fC_AT^rw3sl6O+`dOx977IzD(FC+No6OL|LGoKS^4lNz_y^v5ZO+KU^H&4& zN`vpd<&C@brk`Xl(B7#1k$?85$S2Y5u7Z6@+$4oBb#F~0fV;^UFzW=f$cm&A^zF$a ziigF(G-4)v@o$WySQtgP*HDQwdZUWdXi>KHBKin+v=6r~tZ6hZa%Z71TC<4~kRtl7 z+`?+nq&nRn$cCzEu`IPoQ!r=)wT`=RUd{USq<-aegO%dvH*&q^T7S;b{q?vUrio$J zt=ul9Ou%gPxL%Dm%7D8f%jMxVC?764s8}AO=g!CUDHFJg%`Jyhf>tGRE#bvr3pnGZ zWid0gFytqw2TFy2rUqkG`7syc6P#Na^SB9W#wM7PgnoYmuH(AC+$dj$div0DAWTl9*3Hk07?iC3?ph#p{d!>ZMefdi?TmK6_Newj?UUNKRNiiaEAK_OfIPS$1`|am zQw-*UN>KO+=qiS}r;}m<#t86p;o6T!vqD`ISTP%9`bVluqrXSlKfjQHwiWhwF*!23YB(h6!#s((jd(CWSAN{w>o=a7h-W*$~c zgo5L$&FIXA12^XT4>VjjYME}%B;~+nN+(O{xs*9z zqf1VS>VF}$KCg(D&Z-;h3EU8qKbhk;blrkVY)PFOT;{dqxJRCky5Gzi2Vt66*liAL zgyo4}0XtzBX%iinXsQKEJY1y;gen*F7aoJg1qzxl08i)AW@@GHZRQ&-!W?vZ!VHzU z*ba{Q)!V8ds^|Ck?$-!NDQK)`ljo9~$t~nHeFqY+JMM$0q@_S>XOv`71Nm2T1ry^QYAE9jN<41FHG zfj*z!NPmRBkiM9{gx*f?q<7JK=ugp$^tJS->3#HP=o{&q=+Dy!=r7ZU=_B+}`fmCg z^nbVM2kB$6OFIgQI-+#)< z02|n!fo902sIO2ds2hR?;Ug%58;(GWJL3sS#{FzG=s>-OKEeBmj?B7bk^pBc>N-m0 z0L~>ot~!-tW3Ncuh9p zRI)=hCH#U9JiGS+rF>-kqru|9K&Vd|ADASw1FFDYX-dA0>#nF$mduPKRlYw$I-oGR zOgE%7brlP2FlNG;HA>vbl&3*$iMwDz_TQ)TCy|U?`lIw4z&GUl8>lBhi+>TolJiFd z>*|cWAE<#bpTGl7>d0SqFdBCptTZ_ZYDGUR!RR}<^@ItALRA1j}&ySrx&f)m+ zlZ-q@8y8=RPb1_QTLakP-Y|bZRO>OSH5O64X|@;2<16lzCGLvj$4aNve$Y7DhZ z5Vh#FjO@o{!t{~-H5KUMP1b?q{17Gv(i4oGL~^~&RYk~?Fd%Y% zHI=Td3-V%2z>#wPIe$!0rzC>GB4-{3^Txi&=N{VTLtN$d=*Kv@4Ttr8C=0m4Reut$ zfTHFTf{9PzFh4Bbf%aCW*d2NfY?Dl&f%A7ue9ru}Ef6>ZApGk<9!Sa_0mz9GM0?OP zzXUh?&#(9ioqi3Qpw~o=VMzQ*s_$Sz7Wp_6bhI;EDG6q)5P(gAWAT&l?KS9o`I8HdHfI%FRYgi8AqiZjmVbp$XY`Ht-1L$8cV6zyYD1vm z8!Vgu@y#D40Xb~;!&dIKcRAkM*;#Eru0NN1i*P#|1v#4zCdEqeg?kYQ5++>(KO^6D z;*J}Y0>km@7Bp~_o{GE?;KkrrZ{TDl!*h?=oMbmjj~%r9suPy8>z4PYQFQqg$&dZi zt>+o&P=9kLNoYAVT=T#+Rw!<{)-*4z%h^vqt)*H;YiO&=i?O>2#RxZ{Q2TitA``WM zNiAY(OQ3BFTOFZ!#rzU5*9je!+wF4DkQ>&lTidL`zhC^t4{U6#ZETRc<~QCpnUMDl zF55C|(fp@24_qLxi>u^`_C_lVx~sK~t&Q5oJAa>k|Hh}jaQp4_;PSWnTk{Xb)iY{y7s#MUl1=v(p-t7^Jj#iQUAkSY?#>eQdhV{JQ2zV=Vztp=kw1f1 ze2sA**S1@}X!&Mn1;NpkoQcNzXkd0tKX4M$GBKOcjglT%4dK~Qqh0NuJ2+|f;^lO< zd4E{PeW0w=1S9f{%Q%rv0(wX0z7YtAr@dT=PRD2(9;bF{8JvR6Fk8S(vTp911~)l# z`xVa&%uvRqbUU(LopV{eG)@xc$&xnE4rwQ~mm%{4Bm^)9_YqPstXnGfu~2yKE@OqlLk{&IQc+gq4AtSw*r-T8-CR_GhQ zySDPo=U)Bl_r7=SGs8Py4gbA&?SE?Re|l!Bb(A0J2S1bl@JD|B+H>z?r1Ss%#6q9^ zIsLraH%2NizK{c!MT2RvC7O&tFZJEH{oGFCt=)9jO)F-Sua_fp9EEf7oSAYQLcUAu{}4X>V;D!1B1OLZorJ8$_7lW`7-O7p!7| z&1kl_nkw5}23jmNQDL(NZu6l+tr)hz^(ZQUgB&G|7cR(R`GI2VLv%c4yOVk}oUD^c zZ-(0o70VcuqfumP*A10MGezp(9ZixkD5xp2d3bczAB?+7q4vds?-$PnLL*e5cXt6M zdI#8kU9Xxd-Fu!mUEJI+Fn6A(UYyjKQ(36GRY@qY~QFx9{t(xPSU{NEJ@?u9dN=5EgTdrexR(~i#hde{xm%Dia zco!g-yDXgtB|!kmsqS+4Pf$!@7r>(lwMAfnngd!d0~4T)pVx|PIRqOPw#TI=4=n@$ zCanV=f`>U#z(i`wvIV`Q69v-H<$;^ENrT_WswGndQn!dnBdG2ni(=^1X6U~X$|;Wv zpBZ)Z2~=7-qE(gz1Aj2h2zs5^%t#F^DqRbD67V`R{cv~Q#UQKawHIrz)Lw`CyF|NT zJ>_mv0sKPM1Ia7$p4GC`q}bSPZ*h2G6Fh=JUgbLN7XdUCNK;ul9d)<|$7cP3lI(2? za)r8;Z+1t@%~Wg%G>d>$p}%!pZh&nRn;XSn9X#_ zO1w7zBq7y`>4Nwex|=)%z{|vhYlMa{+N9<>5}x8jIz8RDS8cXh@2tcLGi7K7Ze9;N zUAAuoNKJqScYj1`b99Fy$g{1K;pPRn?Sj6%QZL&e$f5H!XXr+D`7p=^!Lh|S5Wm?? zL?jrPJEuxc)$$0Jff?KhOx@YdGm62ky%xq!>vfA*>IRwYCNrWVd7$=jR4Ktlt}sma z-CgZ=wM+v>Z_-tvW(-|`az!WeZd_L#7YW=EXZ^UZsO&yESAYO`F?ZN(3_^AwP&B&3S?|6#r(Uj6?GJr{? zTNItj0p&2Q?G2l`BID7KDol;g1sm!(poZSkvdX>aaXq5KGh**kYC{>`e(}L2E(8oN z?x&?km49rlTrz!88<&^M4c`nhzcM{s54T3n9dR}2+?UdRvYtk+O*qiil z%Af@(jdwwo$W(e2_U2+YlVZ;V`Q z>TUO6-e041`O|!Wn`8*)mcuZhdL~0r$tY`9mRCR>m`xYZ6g0*+J&X6}|LP=_JZ}hI zV#ImoGs65jXY@{slNC@f`o_}o!ILX~noF9a#?dXi~1%-0G3(0yIKw} zoD{n$_cS2#J_C&eUSFE*_o^rfPY+ zQdD?lip#`in1YnW>1ayc#w%$gObb+kC4WE$aY|+w$}K@R7*w~=BkVRW)A^uOcJiI| zi3^AJH@!frB|I<^p#6_5bLqQEyJT42jK`~KyhO~@QXAPh$ zm6Cl^8w3Rv!~rHY*~uBkVu0G3dgvOKNljsq`&yL8nzPyH3eCV>?_%h9~lt?}!9+ml5@w2*f!a4eo%!3>n6TBaGGS2D_UZCRD{- z>@E6(_D4~BKJ31-#a<7+#c$j-g#=&yDsg|GdTRd3&wS?IM;`fuKOpCBxn+JU931ZK zko*u?IZSpAJ#~2d&>=wGhn_fuk1BxJCjFXrMtiw-k9ME-7LdYsf*gKZdj`zFI{6WD z5BWv%Zt}b2ljINSCOt>b)0fh_=xgX3=mYd&`YZHN`s?)H(D%{bK&G(RwP}Ei66Aji zx1a!V#D#=tC^7qEVK6aNv)COqn-)7Q#G?bqG%!YosZ{Bp*g{xMg2^HRjNxRp4-^LQ zc5~onyI;VD0^2}Q%@!*mr+qm*LU7N)Y*9{PY?)zR&uo+kl@6WacBvT7QTwI>zZ+%? zeP86p@A0_7?hnjkSy%?N&T9R`09AjEr$U{+UL?h+%hbvxT+_5jJ5o?K<%_&Ag%%Mp zz^m{^fEEMfAXM@grWvah!XsRLRjgq_x~10Bs`Rs7hDa9hX;)6w)+b|JjiXY}SlTR} zk7^V8Iue+q23_14fNC6}bGR?3xYoiW(PlD9NL*}?w@PrsBHG8@X9op0&pLmLJm zM-fTQ(qhZlq}TuhTB)+3p}SS*P8Zs1k2YtRHKdMp#@Rr|ic)Wo-Bh4Nu}rnIRUtrN zF&9atshI73lY5)f7GEa)sqBnr2jF)sV=Om<7Kt7@lf`f%WB3^Nvdv`BIWX#G^rOO# z(>n9@N^E-oE-EtwemX9{pk9B*gz_2s5l^@)ZOhbIrztQ-Bw?DP>z986a8m+S(&MPA zfQ54gYThuY#LXl)djhwT)7g9ALx383NH^e<($ASN&tcBLAC6N?|2n9)sE1iUEE2f4 ztOr1PGJ6k@;Z&sa0R*AiCkRG!ch523ouoX*`C97N7QW4 zsUe2zjHUsk0IZLtq?PJoC+=@?{$G$I54`cGE}kBDlE&6bXO2)r4-6=(lEG8R`Y&hi=jkh9%Is#QxA5=;)4X9sp53269ynB2(4@ z9T|@B%e7KFgQ^lMw0f2i;IfOsU?r*r!Uj{ziD_FP<6`CjoihU;+6LAPo?&}o$(z*b zAS%!uz}$e;Qu!84bI)5VNuaYvh8x7_`(N-*V3)n<P@1y&s}pl#?%kbbTyX;B=8C zhAn)|f8c*K5_U;KHSChh9)n?oq0mn*J|p}@)q!i0sh+E?#VK2(nDq8B^ke7BQ+-=R zN*fC-sIdpMPvjX-N-Ub+gd z&i33CYQg^Qeggxrp(-{xR{U0J?QW+|)V4^)u4lV8a)wE0)5U%S*>Fm}zSAC zez5uxKuhFy$!pEv@VFA%(8){f^gb^Re9QLk+AfL$aV?6{+kRM4st?**R==5VuWTAD zz^#89m%FCRELXU;X}fo}m)IvPKL|bQ|IMI%(EJ~Z0>JmUDtcGzQc>tGSNXl3q5oB_ zhd!uXrCqPx0zLN{?ac}w{igP@VpZ1nZCF_+?Sf7gP$kW9p%pGe1!FmbUg-~t@6a=o z1bREk0P+m6|0ZhpG9guFlyVP^2a|qx&`p2wIBtlLHqom(9ZXa<6~)Nig5bvt0O z6QS-rTRZ{qhH{VL!rWv6I0l{uPZ~|fgAx62wb5j9WUyH^J-b>8EkPI>6Di#4wf!R% zP$|!R8B+jMY`UzoE066E+T@VL%@N2DS$Jx}oH$1@L=M~A^lAM_E}F-w1L zz6!`6RCxa~{V1W{yuOSdPr+;ya9GG=-XC}~4PzZ{vht!A1A zxlitMA{fsIa6sFujlM%WT;>Gf`&#X~?^M38u2WE$K6KqYe!eE0N8kqa68gl?3Ks6>BgZ%dzl3*O{k z!*N%X$y*pda%7ou+ba7qcWmyM{q5t9>*UFS1Z2};$J1T~6lq|`U?BQIV)8+AXvMBH zbHi;fwOzvn`6SdG)^vx~4_FL3q~hAPm&XA{M#{s~Ia$g|gP>%~higN|hE3u6W@%sG zhh`7VFvjUkbbC0*?r#@XT1|eQ~@LmZX0m ztpvcVndBy*2AfQbnjy>XziRMlNBgB$D^29#V^;j4W2RdlxjnbIK*t!aSpueBcJpxtE>X>6)A9Z0)_=7fXzQA-EN#a zang)I|#3K!6qp0|NU9rgNc9GneM8ttUTWFpYQ$u_usU7 zITm*&XJs@ur=M_MJO@xk$n7n2M39|bZmV%*^yJ^w7?N9Wp{AW6Ht>OK;#N;rJ8$o# z#VQG^l|F24l5S}&Z*6Ywj!E3kR6HR;+oa#ee*Oh6!s)S6XIY&k63K~hR5%V+g59;l zt)t6pWJ7;dJeF@`wIyC6-Y@=A{Db%xfXK_bT#*H0#>lUf$WtR#Mpl5qMhkgy*|4Rc z6SF$B7B5#b@-VrJ*|L}eF))BnR?fOaS_*ZZ#26M0vX<27cGu`3g1{Loifj=Ei7KPa zy6pXye|H!&tlJrLYF&)s8W-dK2wJbi*d`S!;eUUV{nR-rIA^yz>T(WD2_AX?CNZYN zNT(U2zRz%i5KSzXos!cbHhM~DeL5Nf^$7b#w7&jzNp-v7J2}_2@ZL4>Z-=kD5r!BUluiFU81TCx;>BWJ9HwJ&08-HK!y=9i)jj$!`c; zPN?v#rV8jpy9Nk$`i9}duf!%)|;wf0$Lb^H(u!(`)40yE)pd!$XjO+tuV}q;M95YykPe6R}NN!UW;b(<%+@#9mfGy4%;{;!8Z0 zXkq)c;Mg(182vsYV46^R%^)Mu?>9)L>7-Dz_qd20lg&^HSIE;B>C;&_J{Hn=&a0b~q{vZmMsj1NjaFx=y0$Sv)xisR|hOo|ABhAUO4gG$dWL{DXfKL5)D~ z8pzl}djw*rRFfKoZON43dO#K&VT7fGi^{734mbAL&-6@ORqXaTCRQ8pzv=1q)kLLE z>>rNkp)`@YR+!l{%E@)jBdxkF)F~3j0a2LQfQ1V3BT2oHSg!l`H5yN@X(D8@+LQ9p zO+;K1k;RHrpsre+&Yt=X- z^FA=mq-jDs@UU*>CVsTMZignQ*BtBsIJTRt>}8~qX}BX5gsHaeAS8b+Mbv8#yI`vi z+EoD15_^-6mmvZ!u#E|8SU2%akR~J&h+VL7V>~Caqj<@QFpid63saX&$q>6!LI&i5+ z0gUQ+ezd%a9M*c%TI_$150N{o(`7FW+(y-r;2-O7tLbJYh&Rq&Jafvd>O+e`eOjE~ z1iB1XI+R@7-CRAi<2Z*}M{fDi?WP-&@zxBElfN8<+v`MzZ#&$o+A@i|8Nj8!9M+rAT5uUzV8 zB#p+4?Xa013Y*@5@!l34fWoN@d8?X7k#g2*X>u8NbX-9o94VGI7M_RgsH}#;!$f0< zaBirLb|aggFv-;sTh8v<$TM+o@2B2>{k8ugN){J?^2V!v?sXkg`%*QlRmswseQb+P zI37jft5I$?lG=YYH>InqZ@%%u4d-4{uP$7Fg_X6d3we>$EbAcFM1F{D(xu9XGx1?U z9C+^g`x50#p6!>h!|TB|#dIRN{NZxBx)L{|Or16IgT$N>Sw!Kn+Xv(+pFP^$Ug)>1 z7&Wz`mL4>dISplB(0F1P1}QojW&OY28UQbKh!=GU0C;PDtthx zh?7U@`Ug~C*~T_lB{aYOfc8;qi{^@+{s7VyyqYGJ^0o)ygxkh)I8FQkY^r&#Pp8`Z zd*Hw$7*zIvVmboWCbn4R93Q(26dGMq&?CZn*|-VYo!KX`)8G&XM23Eiw*%PN2De|N&=!w2^guU#ypEQWabSm3R% zdx2b@eOU~=Ab4Bz;H%j+fhPvDFXLOB6U_dSuN#rH?g{71^hNOfuLs`457Qan>@1#I zY`5v9b0PJDQvv;WsTLGG4f@>+FUN%0N)wgC zVvm1N<$!A`23j1MLLjZ_ccQSoi`K_LKgtYBO(>BU$ z)w9{__>;Qe)!Qi<0AEC0Pp7v1$TiphwN8KaiN#H^#aFCXYbxqT&g^x<5}ihD(I+Kt z51N~G@@RUS^<#%?sb9aX-hSQzZ+}{y<2GN-tDD6>m@L=jY#ppv00@Ue7y&wwPZ({Y z%av&O&~eVYphM!h(^W@BZTQgEW@mKwaC^fgQ>@;0NcqRjt#h6${p4W)V5YT=^R9o9 zUi^-fUc_5;a?Oe5jp4CF(>NE+>_yYHcHTQZh&`pAb^I`bP3U?lvF|(WD28r_?fogJ2SD$Cv9nbJepg=3zuE!DQYNbKC%X-&U7TxBS?R zZre|^S+%TzyzWmmOm%=y^cJwAX4U_L_N!V6W!Z@RyP_h#TyF?#q9zw~;Qn z3mktr)+XCuq8e+43f^~)2b}LmLVZ-QfMCQUXq+Fw{|AwbXtd^tSeM0re^ij+9@c7J zI_>YYLJ_;Q$c-)X9o$AUDR!G%0n*K-H1*k2$zeyq(xd<6jF9xrmJg3=VXYdFrKut> zq>h9pGL!X_YlxeZfqD>iej9(sZ@lH@gEc>tGH|N4N7jyIR(DT6fA!|wJ}0-!G_B4) zzY<{?6&r!ditNsn!A+x^cVgojAExLQO`4{gU-!z_+YP^#7=M4fQngNW^m4@26#E<3 zKL|R*Mo2jhWa%itgfZ~u9L;1rCpTm*GWu_c-v{}L^~qrevDriH*fM|2Fc1-zmy6Zn zXMXbPe#7_OZf~pGI&{lUiYAUd>HN@3c=%R0<&6tX6N3 z|K>PLk=IyKo~IU&SRk#)^*m|f4HFOJgSm406GWk`-PD_ZqOVhgrHKwf5mZCu^ZZar8{fVo|5GljGOiSCijNRH>#yC$(4oa|Y+*bmH#S}jV+Of{#k868$`;og3Ve7#y2RGl2f zOAlZ9ydB$)mg|4cvcsiPb<9WcCX}Vs=Rhx~qV1q6#jHC5( zwCdOmYFD7hq!M=j%EO0s>SbP1quJBJ;B4HACr8yXITwN2KIS!I4>6&e*kvc*(;>%B zCw5{DZdU-}^$?3H1ACFC-f!0Qvi6!*V(aCQY`%lIv>$&_*I%w}Bl4`@GuagHt0L=* zw_Um<{`AtN@1MMM>0d8hl9yij=Xc{*Tu(0_q2J3o`Ni@nqAa)4shq9+1oYCd*Ecz0 zwaLsF1Hb@<9s6A~EZOb2NXvsOg1&}sV*CSMKFmUtEZoHd*noWZZrJOxE2~&6q3BCL7rJk z_S~meSDy*i^Y_L_x82vpk(TEMiWn+LE+(qj@a{<>TU~X`_2T3%@xJvlXH=)RzWyaE zh|k`WthgivXMcRF^pfPhB=O`qFYp%b+W6weO-q0E*PJ=i=}GIgXO&U*M$Z}#wzh*xBjV!vF*E!7C(_UrcLbgn96OIPBn=|1)$IlXI+YJ7`s~Q& zaG@sCyA8SOl}oJ5o>VQe(&EY@*|EEo)0GQk$KFYL?G2UtD(|j*sPd`Gf3JM2^3TE+ z9WfDCix-NQik}eoi~lS>EPh9PQG8uIBmRF;8o4X4k{3De_YwI{`Cj?k@=5te@~`CA zmlpo)^AzAYkk`Kg7viZH`X_7-#%)ew{L&3 zZ?k{Ney{y;`?u^rvcGJ9)&5)i8}_#~xiorBAJQB88hwNQF@1-ArM_RkT|cfrsz0tj zt^Z8_Fa0f}NQFga#cY~wGcXf#!MxDC+PvP}Z{BJiGLM*#n9rI&F<&=-WB#xCp0num zoWsru=W6F#=O*V)=M~NyoO_)Io%eq@A8>xddBXXO^CjocoxgIPah`Sl!TBfWyUxG4 zwi~#MB$AG~r`+q@3+{{Dm$|QU?{VMgzQuj3`*!zH_kHfi+^5|C=6==vTlbspKf3?N z{hnt5S?ajh?T!t$#j|e5?9Quc7Y1npjoi$oFC9TiS74Wc?8x*jqkH?~X`g>%hVc=* zW!-6mghxSl%!x(!P!*(a>chqq_vjn0LplZ0U<_aiGM)iKZ%UY_NEY2aIY3)->;QJS zyb!L*OVvEaX3B_<4qMvEyPof+UsqQS(bg@Lz_&+pgo)XB6qxDah4 zrYz_v(uML2A-&y6A7$hwW@j|Sz!*;6X!IwI(y^wYLskVW6FR$J%qxjZ3chAMA3f@# z95!?vq1Xsf&H9Kf?2`&C??TT6-2XHmO{rU0iHRkG6US4wo9AUXa4LVGyQooE%9@O) zbbN(PpKgJ5oQx6KPT~iH&94X(-`SmF%LaEuFyM3qb0}*VU{#P5;`lhu7e~d}aar~c zbW%56fIr}x$+SPnOm{eixlg}+Z2qH?=%~m?#n9BL9izOU?qHRELeDEvD3Gd8*YBL9 zqg`Dfj&c`Ykr#lfjs<`2l>yInI+{}R>9>JdBLarYuk#Ese$=ep>9B4<++3Z5F3P(A zft?KT&v=rjJ#kr^=n z@kQ7=@05d$g@w|iq3fqZfXY+zhIwHixQjmKI0tPm3*2i;O`m@bsgM2Lx*3nU!;B`B z8a4rg;ko@C(gIWB%Px%^=9GHK^NQd~RD+ll!)!=BH+>YP0GrflsK^)W(@2lV`Yjjh zhNamArsh&~Sn})?8r0LLA>y9yj%dEHd&9Gl@r7BJ3%@euOu0-%zd%guDzy@8sJy=k zip(?6QJ;ok%2R(tm-bBoa}M1+A%^sfoQA%ijru%M7-K|RV{eAod_3anG1RMah=~-Y z*=`>kP7SKlWRh!`b#xyCLpI-3Pa5P0ku=KY(=;ijCCWKW#S)CLU+ng|5GhxtMXYMh z%eb63MSj5wW)5V51zrx>JW6j^GU6eiK7o?~+>a8jG_QZ0SIcBN1qSZ4C9^Wf7JPuz z2+ie63*9ZoIcaMys5a??SG!jT#{B`a(VaV}qMd_8R*^QC*RjbpDZ9_bj=2T^iGXqA zlqdjrKvRgBqr0N=aqW*3ml{T&)y>T912bvn{v3eQSYJfHAg(MD=- z87ed$G^WE+>UFYw1o8qO;G{kxh#EAfye|ybU`Y3`=MVuj1yCWlA=*-s$}Ta$2pR^k zh`ThuvBazuJjS~;1ZV*8D@h1XF$Y|Hh#EiLrH6lx>DDxB0}@3V%)(#J4JP4)M^@WgFccF?T-NaFqu*txNmi|l;fcxENGTV z?~Z>E3soQ=E8oe7omK3R(su)cOk*Zu(_wkt?IYob1jAG}CYbpto0r`_ktR6EOi>At z<|pq0DrEruO0t5U(Va9j4a*3WN*afCOF1kgJZOS*%r(i_I>wU31EAYhq2r2t2vs;W z#2^`f8X+bS{Y(msrlLN~&4}h47$%UnIg5W-dOC@gI!-L6{RVZR(*-=sWDLfGtT7s7 zM>iagsQbC;l8~p~LI_L?2s(x@<+pxL`j?E9!BF>s`G^Mr6l^di`ht4v0(S+PW_Lm~ zqPNSCKVpL}DN~v-B9JmDemI!o9@LqF?U~%5oz%=O5&QHwxg>Ik!ODja8JJQg8sdM- z3{cuc)%Co?v^w13B3Y=9H7LW(8$*ardMfj9e@Mhfa$?t@>N&U(-9Z5m5CL#KskMkD z7!zp#0gUJtgq`XBV2JjRRfjB!-2ubSnX$Z2NXK8RMWMplPZ%L=+qU$&(n%tc#FDNC zSdbD3UufCBW!o1K`1=Y(AG?khSP?cc zg+rJ5*n*Xgs~JbZ)qqk!kfim#1V%x$390l@@A}Ol$q!2g?bc*Fma=?TtVVWdr`Y>uCGE(S5#8iJf@L>>I z3`boUBW1?>whX5L5Jo$9=sAuhRsi=Pcumhm;vmp7c+Z!5X=SpkWP~_naTg-6$zrrD zV;dh$x7_O#SKMZg$t|Jd6^5h1nS=C|R|1jrg{+r&97qhj5~tAz-;~kIijiKligp-H zLf94`#TK+K+lIS%p5p!I@(h2C;ZyT3)g03V_u*&($sa8#evhxW`D=^Y@;)IR7oTJ_ zNIb;sBTpzR5#sH1s+H7?6I{WejQqp*`mETH>OJ)5ix8PiGtU4O%J!+dfI*oE(WufF z+`&4UW?3&5;&Vd0M@YJkLnF8V5IRFo{VWTGr+tZWIyw5D>0La* zqa;DSN|fV_?Q~2N@@h36^r#RImE8sv@jaRHsat30kCT#jYHe=5vemn#+@Cy#m48D#W>LVUskf+$WD3^RYYWSC=}oc?yT{0$5^ z8vSMQO)mFLcUfo3#=L<>KZPC|MnsWMa_8u%MML=uC@+9MTaH!s0T*F%cZIkF5~BP5 zJbhf4^NU5D;t>ZKGvJVAYxzms&$v9lLK4ZCOJ7 z%o#-(`9>1v%vyia!y>zj&M1fgaY>Y5Ghz=1FcMP!9nt-r@i65fobZ>+c?N$Wtn>9k)VR^qB=I?=El)*& zMN;}{5E~0WBQ`neM2HU^0N|*Xi89mW9q6nyKZmMpP%cj5VwNr1p9Eq(C@VcWmRBV15ZebdlhDZ=*c1xYg`L4RYdPD z#?%W^(kg!uP?$3%J6+)u9R|j8--qCrU!9YEwa1 zYdfQ_5Lnzn%1DSvCL&57Ty5I{rpB|?ib!ZKqlkYri@^wHDwPSR$nX?`%4I5`KS`l3 zGtMuWl~TJ(yQa+aQDq>JC1NE^iTez~j!5%cOAE+^B5g)zI&nyXUU-cpAYz~~af_51 zWUZ3W&_UA3aJvE`hz8X~I!l&=2&nV!O4Y5!)F|TU;RcZ?Q-ThHv<}(pXMvkAFIukj z=pKI-O9CUSD`pKG9M=6v1>givIaMpJxx}(`%Ie}mU^ykZn=p>7l<2hzb~VxjGEi}7 zka9#sOjHCyRxXc?4@pnM8_@W>bwSh^Av(%gGV2;u`$)>_CJ~Ys1C(1vL~;roW?Z5;`X9<5Ue)KgD@h=Zit9tiQP%dH-U@1Bq#>QlN)Fnf9ARX@EsAY)1q#IHXq~ma# zSs~e)#DR@GO0GBH_$W$c`6x{X;5_0J<7@3}sp5!+N;ud^0*|=1N@9d-3z2A`8%URq zR;z5AA#;TEqcRb~xgB9z!0rTx!@`4*s2sYQNl=7Ex|kO(vI9SmRSF~kUUsm|SUt_zi6j?%k{&`uu#-{qOP3mf8gRYDPBmVE9i)gOea=lEI8^kc2aR= zNoou>DNLymX);k6lVpYsPGK#^Go!Kh90V*?N~;>P>_`OGDg=R6@ks+kQ45zR!vXs{ z0FpP6F8v5pClnB{NMKZJ(l|7lkZYx%0E2@=WwC|sLk&2r-AUpC@|JEy5=yMq9luHw ze_UsS0IcL1RFQ!h$gT&On#Q-;o+rk!RoPy)ok4sI0ZGGQ=^A4R;K3j`tv!e2s0*(N zT#mA#B!`FtJ?L$}5yM&viCln7q5=}_wiT2AXY8e=Dp8Hiu7x2J#1d}l#Kquh)Yzo9 zC3G@a3c}hz*Pxh{qUj6(#3+b25Rr)Ve+3^E48Y}@`Iq+fzf24uss|U z2Ip~8>Uf^vsdRvDMSb^FKvp4fF2@lI0R|)~;#h2jveO|IBB{Ar7yE=ZM$l%lF47vH zrybJP4kNe_ebO_dn4}6u6q*tSZUB%RYPO98QwcdwJQ@fmaAL&Ipwa+QEmSzte^oX7 z1R8mpF-zb(8Q7aP`NP!m1xHZ#Igrq{JQ5LB1QQmBCb(9!)x;2wm@}KButA0F9-_1! z0MlSeL#YZrkxW}F5W31O^907z2H+-~-Bqy$7uA7DE=zl@w3PS#hy9P`3%uPqkRZtv zZ()8C^OT4kLyrkjoUZI!gwZ0Ce@NNvl)-!>4NTo5Ri#T062vEX1%Pi3m`@OxVm--d zla@GeC@_Cyax%gpJH0>rZyvjFNd9)kL0q5cR_Xt^o#iD`0!I@dZ3H=+U5;xgQG&|C z0P_ft>5xMm2Gfc7=Bv)%Emog%j1HW-b5+sV=>7D1@2u<9PpqX*5-gs4e_mQEPMzM^ zw$3%&R<%PG+?!^f7pJbc;u$}2P}D%B%PX7P%gf#NPE_~eg+?vX+IDKw-GzRzyw)49 z!9`B@Yw$g%hLz)$8@LkoFJS-e0Q4jl^MIYG1Ran_&?vzK4x+ja(&&aICIfx3pF@NJ z;85l{R(!dk%mpXQ(B1JVf5C;&aAaEors6ViK_(a1i+G8Y2$4#lYwNj_tb_^(tkNuX z7p0ff+EsvA$#ApS?iD|MI9e<=Z)^rhZNomQpFNn~s&D5`HvIRo2z+7)XE+$q{C9Sl8nzxwSDE(y7J?%a39)#B>!o;&xZ&wpM8_uv2hugLBD@1K1_{7B^> zX5)xDdO2oeUJq_8deu;_1!i45Ft1sf;kt?m_*ZO;K&xAQDC|f%&O)CyR2i-C1OGl;yh0W zn;pnqLd-k>D>$2rqbcbslt5rmX)ODmQhQ>AMbwV&)py6l#={bEk&zOyzB-wsN7J$Y z&sW@}=|CNcfBbK3qQ=UWznN||&#VS27&K9;Vs+bXEDQN8keZa3ePkKl9ElrOr;L=Y zP$d%!YE6v-JS2yD3RVul+|??|x49A-HbOQNh~v}Wdh!Wq@ZWjzcOlW}@AC5#<>x1b z{02$22QPT>u@V`I6t14d3=r=Dm3_=w%T?l4YU|BGe-rWQWdZbcz*3MidxuIG#rCeT z-LO@CW2Z@ske*MWOK#g%;UM3J=F|5IF*|;Y`nDp)atGj8beFYd&gEGy`13Z|J(W4m z&Jndz*{PhZJY0FS^6tv7RDQMcL7=W8#C20}0b7H)s?KXTm6fE_bchHWBCmNw&JX|g zMx3%Yed#QefGN;cq;Ibw*VH2`3zdz@kk#Q`x2n(~B{x{^c3dL2n&ra=wgVH{&RzoO z3pSX z89*7l8XOwl9cCT69!MUD9;6@KAv7fhB|s%wC3+>sCLAW3Com^!C!#0NDJCigD$XlZ zELtpRk}z5@gfSj6GBdn1PBfx7hBy*9zBvXth&kjsbUKufJc6#qU8w4YX6#~q_mVX~Eclj2c zhhbnCc+2c)b~cu?{~wGa2vn%iV2%ZjvBU{3;396oCESRca2Yq_7Tk*4a69h6owy5k z;~w0L`*1%Vz=L=Q591L$ipTIcp1_lM3Qyx1tne(J!+-O50ax%MUc$?G1+U^YypA{U zCf>r^cn9y|J-m+(a240^AwI&#_ynKgGklIO@Fl*&*Z2nC;yZkgAMhi7!q4~xzv4Ii zjz91x{=yo6L!yO(2BAZb0R|h4u$bWB5pW$5j5Mod2$qE8sg_wAU$?R)Tep5kQM7F5 zYQ=+$0e`Aea-_v+Scf58Rs*TA_4`$J|E8oD{~c9o!~0rUug0bFR(F|=ca8F{GrdqD z2*q6H7WzoHb4{JhHeJ#bA}N{5-Iem8(WRf_1=1$@c-~AKZpfOwi5Jh7HLGYs5@e^E zV)U^gw#KD-C%2|FHC+KfvFf}_%ig5**}f_1kbm2w-izK}Y5FL&rPIY&uKSo>s`_lh zVvuUI()HCKCp#Y`k7R8#Q1oLK1MRCJm2=ZOA4#7WYcr=P3*OpHvZuZ7qiv;lgxM=K37o!ezI~YUJ9h!bSw$Re_>C4uemg2OmT+b{?YN zkV+!tz6m)5N=-PVq2N4ICz4dDiN0_RRm|<71WrqqmbfcMQN^;@%WbMzNh=#B8P%|0 zO3ApMYaWV*RdH!*xbR4ahC?ishSQ6hsc&ef^5<)?aUG Date: Thu, 25 May 2017 22:57:35 +0200 Subject: [PATCH 1073/2747] [seti] add information_for_contributors --- extensions/theme-seti/build/update-icon-theme.js | 8 ++++++++ extensions/theme-seti/icons/vs-seti-icon-theme.json | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/extensions/theme-seti/build/update-icon-theme.js b/extensions/theme-seti/build/update-icon-theme.js index 7f44c3ac2450e..a2a2bbd840c0d 100644 --- a/extensions/theme-seti/build/update-icon-theme.js +++ b/extensions/theme-seti/build/update-icon-theme.js @@ -212,6 +212,14 @@ exports.update = function () { } var res = { + information_for_contributors: [ + 'This file has been generated from data in https://github.com/jesseweed/seti-ui:', + '- icon definitions: styles/_fonts/seti.less', + '- icon colors: styles/ui-variables.less', + '- file associations: styles/icons/mapping.less', + 'If you want to provide a fix or improvement, please create a pull request against the jesseweed/seti-ui repository.', + 'Once accepted there, we are happy to receive an update request.', + ], fonts: [{ id: "seti", src: [{ "path": "./seti.woff", "format": "woff" }], diff --git a/extensions/theme-seti/icons/vs-seti-icon-theme.json b/extensions/theme-seti/icons/vs-seti-icon-theme.json index b26e557e5d3a9..46e757af3f69c 100644 --- a/extensions/theme-seti/icons/vs-seti-icon-theme.json +++ b/extensions/theme-seti/icons/vs-seti-icon-theme.json @@ -1,4 +1,12 @@ { + "information_for_contributors": [ + "This file has been generated from data in https://github.com/jesseweed/seti-ui:", + "- icon definitions: styles/_fonts/seti.less", + "- icon colors: styles/ui-variables.less", + "- file associations: styles/icons/mapping.less", + "If you want to provide a fix or improvement, please create a pull request against the jesseweed/seti-ui repository.", + "Once accepted there, we are happy to receive an update request." + ], "fonts": [ { "id": "seti", From b6cb1b7a47f1dfbb312445b5ce4868a611b2e7be Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 25 May 2017 14:32:00 -0700 Subject: [PATCH 1074/2747] Comments --- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index c27e0dbaa9505..c5559659a7ffd 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -953,11 +953,14 @@ export class SuggestWidget implements IContentWidget, IDelegate if (hasClass(this.element, 'docs-side')) { if (this.details.element.offsetHeight > this.listElement.offsetHeight) { + + // Fix for #26416 + // Docs is bigger than list and widget is above cursor, apply margin-top so that list appears right above cursor if (hasClass(this.element, 'widget-above')) { - // Docs is bigger than list and widget is above cursor, apply margin-top so that list appears right above cursor this.listElement.style.marginTop = `${this.details.element.offsetHeight - this.listElement.offsetHeight}px`; } + // Fix for #26244 if (hasClass(this.element, 'list-right')) { addClass(this.listElement, 'empty-left-border'); removeClass(this.listElement, 'empty-right-border'); @@ -970,6 +973,7 @@ export class SuggestWidget implements IContentWidget, IDelegate removeClass(this.details.element, 'empty-right-border'); return; } else { + // Fix for #26244 if (hasClass(this.element, 'list-right')) { addClass(this.details.element, 'empty-right-border'); removeClass(this.details.element, 'empty-left-border'); @@ -983,6 +987,7 @@ export class SuggestWidget implements IContentWidget, IDelegate } } + // Reset margin-top that was set as Fix for #26416 this.listElement.style.marginTop = '0px'; } From f17f097cc9e8a158a9d0af02e66a24addf7295e1 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 25 May 2017 14:31:52 -0700 Subject: [PATCH 1075/2747] Extract merge-conflict colors as workbench colors (#27299) --- .../merge-conflict/src/mergeDecorator.ts | 28 ++++++++----------- src/vs/platform/theme/common/colorRegistry.ts | 18 ++++++++++++ 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts index f6d0135aad9a4..39888f727e628 100644 --- a/extensions/merge-conflict/src/mergeDecorator.ts +++ b/extensions/merge-conflict/src/mergeDecorator.ts @@ -13,9 +13,6 @@ export default class MergeDectorator implements vscode.Disposable { private decorationUsesWholeLine: boolean = true; // Useful for debugging, set to false to see exact match ranges - // TODO: Move to config? - private currentColorRgb = `32,200,94`; - private incomingColorRgb = `24,134,255`; private config: interfaces.IExtensionConfiguration; private tracker: interfaces.IDocumentMergeConflictTracker; @@ -69,21 +66,19 @@ export default class MergeDectorator implements vscode.Disposable { // Create decorators if (config.enableDecorations || config.enableEditorOverview) { this.decorations['current.content'] = vscode.window.createTextEditorDecorationType( - this.generateBlockRenderOptions(this.currentColorRgb, config) + this.generateBlockRenderOptions('merge.currentContentBackground', 'overviewRuler.currentContentForeground', config) ); this.decorations['incoming.content'] = vscode.window.createTextEditorDecorationType( - this.generateBlockRenderOptions(this.incomingColorRgb, config) + this.generateBlockRenderOptions('merge.incomingContentBackground', 'overviewRuler.incomingContentForeground', config) ); } if (config.enableDecorations) { this.decorations['current.header'] = vscode.window.createTextEditorDecorationType({ - // backgroundColor: 'rgba(255, 0, 0, 0.01)', - // border: '2px solid red', isWholeLine: this.decorationUsesWholeLine, - backgroundColor: `rgba(${this.currentColorRgb}, 1.0)`, - color: 'white', + backgroundColor: new vscode.ThemeColor('merge.currentHeaderBackground'), + color: new vscode.ThemeColor('editor.foreground'), after: { contentText: ' ' + localize('currentChange', '(Current change)'), color: 'rgba(0, 0, 0, 0.7)' @@ -91,14 +86,13 @@ export default class MergeDectorator implements vscode.Disposable { }); this.decorations['splitter'] = vscode.window.createTextEditorDecorationType({ - backgroundColor: 'rgba(0, 0, 0, 0.25)', - color: 'white', + color: new vscode.ThemeColor('editor.foreground'), isWholeLine: this.decorationUsesWholeLine, }); this.decorations['incoming.header'] = vscode.window.createTextEditorDecorationType({ - backgroundColor: `rgba(${this.incomingColorRgb}, 1.0)`, - color: 'white', + backgroundColor: new vscode.ThemeColor('merge.incomingHeaderBackground'), + color: new vscode.ThemeColor('editor.foreground'), isWholeLine: this.decorationUsesWholeLine, after: { contentText: ' ' + localize('incomingChange', '(Incoming change)'), @@ -118,17 +112,17 @@ export default class MergeDectorator implements vscode.Disposable { this.decorations = {}; } - private generateBlockRenderOptions(color: string, config: interfaces.IExtensionConfiguration): vscode.DecorationRenderOptions { + private generateBlockRenderOptions(backgroundColor: string, overviewRulerColor: string, config: interfaces.IExtensionConfiguration): vscode.DecorationRenderOptions { - let renderOptions: any = {}; + let renderOptions: vscode.DecorationRenderOptions = {}; if (config.enableDecorations) { - renderOptions.backgroundColor = `rgba(${color}, 0.2)`; + renderOptions.backgroundColor = new vscode.ThemeColor(backgroundColor); renderOptions.isWholeLine = this.decorationUsesWholeLine; } if (config.enableEditorOverview) { - renderOptions.overviewRulerColor = `rgba(${color}, 0.5)`; + renderOptions.overviewRulerColor = new vscode.ThemeColor(overviewRulerColor); renderOptions.overviewRulerLane = vscode.OverviewRulerLane.Full; } diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index bc3da9fed1680..b908d663df374 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -254,6 +254,24 @@ export const diffRemoved = registerColor('diffEditor.removedTextBackground', { d export const diffInsertedOutline = registerColor('diffEditor.insertedTextBorder', { dark: null, light: null, hc: '#33ff2eff' }, nls.localize('diffEditorInsertedOutline', 'Outline color for the text that got inserted.')); export const diffRemovedOutline = registerColor('diffEditor.removedTextBorder', { dark: null, light: null, hc: '#FF008F' }, nls.localize('diffEditorRemovedOutline', 'Outline color for text that got removed.')); +/** + * Merge-conflict colors + */ + +const headerTransparency = 1; +const currentBaseColor = Color.fromHex('#20C85E').transparent(headerTransparency); +const incomingBaseColor = Color.fromHex('#1886FF').transparent(headerTransparency); +const contentTransparency = 0.2; +const rulerTransparency = 0.5; + +export const mergeCurrentHeaderBackground = registerColor('merge.currentHeaderBackground', { dark: currentBaseColor, light: currentBaseColor, hc: currentBaseColor }, nls.localize('mergeCurrentHeaderBackground', 'Current header background in inline merge-conflict.')); +export const mergeCurrentContentBackground = registerColor('merge.currentContentBackground', { dark: transparent(mergeCurrentHeaderBackground, contentTransparency), light: transparent(mergeCurrentHeaderBackground, contentTransparency), hc: transparent(mergeCurrentHeaderBackground, contentTransparency) }, nls.localize('mergeCurrentContentBackground', 'Current content background in inline merge-conflict.')); +export const mergeIncomingHeaderBackground = registerColor('merge.incomingHeaderBackground', { dark: incomingBaseColor, light: incomingBaseColor, hc: incomingBaseColor }, nls.localize('mergeIncomingHeaderBackground', 'Incoming header background in inline merge-conflict.')); +export const mergeIncomingContentBackground = registerColor('merge.incomingContentBackground', { dark: transparent(mergeIncomingHeaderBackground, contentTransparency), light: transparent(mergeIncomingHeaderBackground, contentTransparency), hc: transparent(mergeIncomingHeaderBackground, contentTransparency) }, nls.localize('mergeIncomingContentBackground', 'Incoming content background in inline merge-conflict.')); + +export const overviewRulerCurrentContentForeground = registerColor('overviewRuler.currentContentForeground', { dark: transparent(mergeCurrentHeaderBackground, rulerTransparency), light: transparent(mergeCurrentHeaderBackground, rulerTransparency), hc: transparent(mergeCurrentHeaderBackground, rulerTransparency) }, nls.localize('overviewRulerCurrentContentForeground', 'Current overview ruler foreground for inline merge-conflict.')); +export const overviewRulerIncomingContentForeground = registerColor('overviewRuler.incomingContentForeground', { dark: transparent(mergeIncomingHeaderBackground, rulerTransparency), light: transparent(mergeIncomingHeaderBackground, rulerTransparency), hc: transparent(mergeIncomingHeaderBackground, rulerTransparency) }, nls.localize('overviewRulerIncomingContentForeground', 'Incoming overview ruler foreground for inline merge-conflict.')); + // ----- color functions export function darken(colorValue: ColorValue, factor: number): ColorFunction { From 9f48af79ad996dfa6ab3a9ec9b67a79c5919ee8b Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 25 May 2017 14:40:05 -0700 Subject: [PATCH 1076/2747] Tune merge-conflict colors (#27299) --- src/vs/platform/theme/common/colorRegistry.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index b908d663df374..5f3a474f0347f 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -258,11 +258,11 @@ export const diffRemovedOutline = registerColor('diffEditor.removedTextBorder', * Merge-conflict colors */ -const headerTransparency = 1; -const currentBaseColor = Color.fromHex('#20C85E').transparent(headerTransparency); -const incomingBaseColor = Color.fromHex('#1886FF').transparent(headerTransparency); -const contentTransparency = 0.2; -const rulerTransparency = 0.5; +const headerTransparency = 0.5; +const currentBaseColor = Color.fromHex('#40C8AE').transparent(headerTransparency); +const incomingBaseColor = Color.fromHex('#40A6FF').transparent(headerTransparency); +const contentTransparency = 0.4; +const rulerTransparency = 1; export const mergeCurrentHeaderBackground = registerColor('merge.currentHeaderBackground', { dark: currentBaseColor, light: currentBaseColor, hc: currentBaseColor }, nls.localize('mergeCurrentHeaderBackground', 'Current header background in inline merge-conflict.')); export const mergeCurrentContentBackground = registerColor('merge.currentContentBackground', { dark: transparent(mergeCurrentHeaderBackground, contentTransparency), light: transparent(mergeCurrentHeaderBackground, contentTransparency), hc: transparent(mergeCurrentHeaderBackground, contentTransparency) }, nls.localize('mergeCurrentContentBackground', 'Current content background in inline merge-conflict.')); From 6d00bd977be02b60d2c7f1f333fc7d9270ef3c0b Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 25 May 2017 15:18:05 -0700 Subject: [PATCH 1077/2747] Add TSC Task Provider (#27093) * extract standardLanguageDescriptions to constant * Remove client variable * Move VersionStatus into a class * Add TSC Task Provider Fixes #26079 Adds a task provider for building typescript projects. * Make ts loading lazy --- extensions/typescript/package.json | 5 +- .../src/features/jsDocCompletionProvider.ts | 6 +- .../typescript/src/features/taskProvider.ts | 110 ++++++++++++++++++ extensions/typescript/src/typescriptMain.ts | 109 +++++++++++------ .../typescript/src/typescriptServiceClient.ts | 10 +- .../typescript/src/utils/versionStatus.ts | 69 ++++++----- src/vs/workbench/api/node/extHostTask.ts | 2 +- 7 files changed, 235 insertions(+), 76 deletions(-) create mode 100644 extensions/typescript/src/features/taskProvider.ts diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index 461cb773a4dea..b039fac9631fc 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -34,7 +34,10 @@ "onCommand:typescript.selectTypeScriptVersion", "onCommand:javascript.goToProjectConfig", "onCommand:typescript.goToProjectConfig", - "onCommand:typescript.openTsServerLog" + "onCommand:typescript.openTsServerLog", + "onCommand:workbench.action.tasks.runTask", + "onCommand:workbench.action.tasks.build", + "onCommand:workbench.action.tasks.test" ], "main": "./out/typescriptMain", "contributes": { diff --git a/extensions/typescript/src/features/jsDocCompletionProvider.ts b/extensions/typescript/src/features/jsDocCompletionProvider.ts index da02e942bfc3c..502cf89c42c71 100644 --- a/extensions/typescript/src/features/jsDocCompletionProvider.ts +++ b/extensions/typescript/src/features/jsDocCompletionProvider.ts @@ -88,7 +88,7 @@ export class TryCompleteJsDocCommand { static COMMAND_NAME = '_typeScript.tryCompleteJsDoc'; constructor( - private client: ITypescriptServiceClient + private lazyClient: () => ITypescriptServiceClient ) { } /** @@ -96,7 +96,7 @@ export class TryCompleteJsDocCommand { * if possible, otherwise falling back to a default comment format. */ public tryCompleteJsDoc(resource: Uri, start: Position, shouldGetJSDocFromTSServer: boolean): Thenable { - const file = this.client.normalizePath(resource); + const file = this.lazyClient().normalizePath(resource); if (!file) { return Promise.resolve(false); } @@ -126,7 +126,7 @@ export class TryCompleteJsDocCommand { offset: position.character + 1 }; return Promise.race([ - this.client.execute('docCommentTemplate', args), + this.lazyClient().execute('docCommentTemplate', args), new Promise((_, reject) => setTimeout(reject, 250)) ]).then((res: DocCommandTemplateResponse) => { if (!res || !res.body) { diff --git a/extensions/typescript/src/features/taskProvider.ts b/extensions/typescript/src/features/taskProvider.ts new file mode 100644 index 0000000000000..76528021983ef --- /dev/null +++ b/extensions/typescript/src/features/taskProvider.ts @@ -0,0 +1,110 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as fs from 'fs'; +import * as path from 'path'; +import * as vscode from 'vscode'; + +import * as Proto from '../protocol'; +import TypeScriptServiceClient from '../typescriptServiceClient'; + + +const exists = (file: string): Promise => + new Promise((resolve, _reject) => { + fs.exists(file, (value: boolean) => { + resolve(value); + }); + }); + +export default class TypeScriptTaskProvider implements vscode.TaskProvider { + + public constructor( + private readonly lazyClient: () => TypeScriptServiceClient + ) { } + + async provideTasks(token: vscode.CancellationToken): Promise { + const rootPath = vscode.workspace.rootPath; + if (!rootPath) { + return []; + } + + const projects = (await this.getConfigForActiveFile(token)).concat(await this.getConfigsForWorkspace()); + const command = await this.getCommand(); + + return projects + .filter((x, i) => projects.indexOf(x) === i) + .map(configFile => { + const configFileName = path.relative(rootPath, configFile); + const buildTask = new vscode.ShellTask(`tsc: build ${configFileName}`, `${command} -p ${configFile}`, '$tsc'); + buildTask.group = vscode.TaskGroup.Build; + return buildTask; + }); + } + + + private async getConfigForActiveFile(token: vscode.CancellationToken): Promise { + const editor = vscode.window.activeTextEditor; + if (editor) { + if (path.basename(editor.document.fileName).match(/^tsconfig\.(.\.)?json$/)) { + return [editor.document.fileName]; + } + } + + const file = this.getActiveTypeScriptFile(); + if (!file) { + return []; + } + + const res: Proto.ProjectInfoResponse = await this.lazyClient().execute( + 'projectInfo', + { file, needFileNameList: false } as protocol.ProjectInfoRequestArgs, + token); + + if (!res || !res.body) { + return []; + } + + const { configFileName } = res.body; + if (configFileName && configFileName.indexOf('/dev/null/') !== 0) { + return [configFileName]; + } + return []; + } + + private async getConfigsForWorkspace(): Promise { + if (!vscode.workspace.rootPath) { + return []; + } + const rootTsConfig = path.join(vscode.workspace.rootPath, 'tsconfig.json'); + if (!await exists(rootTsConfig)) { + return []; + } + return [rootTsConfig]; + } + + private async getCommand(): Promise { + const platform = process.platform; + if (platform === 'win32' && await exists(path.join(vscode.workspace.rootPath!, 'node_modules', '.bin', 'tsc.cmd'))) { + return path.join('.', 'node_modules', '.bin', 'tsc.cmd'); + } else if ((platform === 'linux' || platform === 'darwin') && await exists(path.join(vscode.workspace.rootPath!, 'node_modules', '.bin', 'tsc'))) { + return path.join('.', 'node_modules', '.bin', 'tsc'); + } else { + return 'tsc'; + } + } + + private getActiveTypeScriptFile(): string | null { + const editor = vscode.window.activeTextEditor; + if (editor) { + const document = editor.document; + if (document && (document.languageId === 'typescript' || document.languageId === 'typescriptreact')) { + return this.lazyClient().normalizePath(document.uri); + } + } + return null; + } +} \ No newline at end of file diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 9949d0db9d2fb..07a666936b956 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -41,13 +41,14 @@ import CodeActionProvider from './features/codeActionProvider'; import ReferenceCodeLensProvider from './features/referencesCodeLensProvider'; import { JsDocCompletionProvider, TryCompleteJsDocCommand } from './features/jsDocCompletionProvider'; import { DirectiveCommentCompletionProvider } from './features/directiveCommentCompletionProvider'; +import TypeScriptTaskProvider from './features/taskProvider'; import ImplementationCodeLensProvider from './features/implementationsCodeLensProvider'; import * as BuildStatus from './utils/buildStatus'; import * as ProjectStatus from './utils/projectStatus'; import TypingsStatus, { AtaProgressReporter } from './utils/typingsStatus'; -import * as VersionStatus from './utils/versionStatus'; +import VersionStatus from './utils/versionStatus'; import { getContributedTypeScriptServerPlugins, TypeScriptServerPlugin } from "./utils/plugins"; interface LanguageDescription { @@ -67,72 +68,100 @@ interface ProjectConfigMessageItem extends MessageItem { id: ProjectConfigAction; } +const MODE_ID_TS = 'typescript'; +const MODE_ID_TSX = 'typescriptreact'; +const MODE_ID_JS = 'javascript'; +const MODE_ID_JSX = 'javascriptreact'; + +const standardLanguageDescriptions: LanguageDescription[] = [ + { + id: 'typescript', + diagnosticSource: 'ts', + modeIds: [MODE_ID_TS, MODE_ID_TSX], + configFile: 'tsconfig.json' + }, { + id: 'javascript', + diagnosticSource: 'js', + modeIds: [MODE_ID_JS, MODE_ID_JSX], + configFile: 'jsconfig.json' + } +]; export function activate(context: ExtensionContext): void { - const MODE_ID_TS = 'typescript'; - const MODE_ID_TSX = 'typescriptreact'; - const MODE_ID_JS = 'javascript'; - const MODE_ID_JSX = 'javascriptreact'; - const plugins = getContributedTypeScriptServerPlugins(); - const clientHost = new TypeScriptServiceClientHost([ - { - id: 'typescript', - diagnosticSource: 'ts', - modeIds: [MODE_ID_TS, MODE_ID_TSX], - configFile: 'tsconfig.json' - }, - { - id: 'javascript', - diagnosticSource: 'js', - modeIds: [MODE_ID_JS, MODE_ID_JSX], - configFile: 'jsconfig.json' - } - ], context.storagePath, context.globalState, context.workspaceState, plugins); - context.subscriptions.push(clientHost); - const client = clientHost.serviceClient; + const lazyClientHost = (() => { + let clientHost: TypeScriptServiceClientHost | undefined; + return () => { + if (!clientHost) { + clientHost = new TypeScriptServiceClientHost(standardLanguageDescriptions, context.storagePath, context.globalState, context.workspaceState, plugins); + context.subscriptions.push(clientHost); + + const host = clientHost; + clientHost.serviceClient.onReady().then(() => { + context.subscriptions.push(ProjectStatus.create(host.serviceClient, + path => new Promise(resolve => setTimeout(() => resolve(host.handles(path)), 750)), + context.workspaceState)); + }, () => { + // Nothing to do here. The client did show a message; + }); + } + return clientHost; + }; + })(); + context.subscriptions.push(commands.registerCommand('typescript.reloadProjects', () => { - clientHost.reloadProjects(); + lazyClientHost().reloadProjects(); })); context.subscriptions.push(commands.registerCommand('javascript.reloadProjects', () => { - clientHost.reloadProjects(); + lazyClientHost().reloadProjects(); })); context.subscriptions.push(commands.registerCommand('typescript.selectTypeScriptVersion', () => { - client.onVersionStatusClicked(); + lazyClientHost().serviceClient.onVersionStatusClicked(); })); context.subscriptions.push(commands.registerCommand('typescript.openTsServerLog', () => { - client.openTsServerLogFile(); + lazyClientHost().serviceClient.openTsServerLogFile(); })); context.subscriptions.push(commands.registerCommand('typescript.restartTsServer', () => { - client.restartTsServer(); + lazyClientHost().serviceClient.restartTsServer(); })); + context.subscriptions.push(workspace.registerTaskProvider(new TypeScriptTaskProvider(() => lazyClientHost().serviceClient))); + const goToProjectConfig = (isTypeScript: boolean) => { const editor = window.activeTextEditor; if (editor) { - clientHost.goToProjectConfig(isTypeScript, editor.document.uri); + lazyClientHost().goToProjectConfig(isTypeScript, editor.document.uri); } }; context.subscriptions.push(commands.registerCommand('typescript.goToProjectConfig', goToProjectConfig.bind(null, true))); context.subscriptions.push(commands.registerCommand('javascript.goToProjectConfig', goToProjectConfig.bind(null, false))); - const jsDocCompletionCommand = new TryCompleteJsDocCommand(client); + const jsDocCompletionCommand = new TryCompleteJsDocCommand(() => lazyClientHost().serviceClient); context.subscriptions.push(commands.registerCommand(TryCompleteJsDocCommand.COMMAND_NAME, jsDocCompletionCommand.tryCompleteJsDoc, jsDocCompletionCommand)); - window.onDidChangeActiveTextEditor(VersionStatus.showHideStatus, null, context.subscriptions); - client.onReady().then(() => { - context.subscriptions.push(ProjectStatus.create(client, - path => new Promise(resolve => setTimeout(() => resolve(clientHost.handles(path)), 750)), - context.workspaceState)); - }, () => { - // Nothing to do here. The client did show a message; - }); + const supportedLanguage = [].concat.apply([], standardLanguageDescriptions.map(x => x.modeIds).concat(plugins.map(x => x.languages))); + function didOpenTextDocument(textDocument: TextDocument): boolean { + if (supportedLanguage.indexOf(textDocument.languageId) >= 0) { + openListener.dispose(); + // Force activation + void lazyClientHost(); + return true; + } + return false; + }; + const openListener = workspace.onDidOpenTextDocument(didOpenTextDocument); + for (let textDocument of workspace.textDocuments) { + if (didOpenTextDocument(textDocument)) { + break; + } + } + BuildStatus.update({ queueLength: 0 }); } @@ -423,6 +452,7 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { private languages: LanguageProvider[] = []; private languagePerId: ObjectMap; private readonly disposables: Disposable[] = []; + private readonly versionStatus: VersionStatus; constructor( descriptions: LanguageDescription[], @@ -446,7 +476,10 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { configFileWatcher.onDidDelete(handleProjectCreateOrDelete, this, this.disposables); configFileWatcher.onDidChange(handleProjectChange, this, this.disposables); - this.client = new TypeScriptServiceClient(this, storagePath, globalState, workspaceState, plugins, this.disposables); + this.versionStatus = new VersionStatus(); + this.disposables.push(this.versionStatus); + + this.client = new TypeScriptServiceClient(this, storagePath, globalState, workspaceState, this.versionStatus, plugins, this.disposables); this.languagePerId = Object.create(null); for (const description of descriptions) { const manager = new LanguageProvider(this.client, description); diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index cf2b7c3be6fd8..5e22350feb050 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -18,7 +18,7 @@ import { ITypescriptServiceClient, ITypescriptServiceClientHost, API } from './t import { TypeScriptServerPlugin } from './utils/plugins'; import Logger from './utils/logger'; -import * as VersionStatus from './utils/versionStatus'; +import VersionStatus from './utils/versionStatus'; import * as is from './utils/is'; import * as nls from 'vscode-nls'; @@ -141,7 +141,9 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient host: ITypescriptServiceClientHost, storagePath: string | undefined, globalState: Memento, - private workspaceState: Memento, + private readonly workspaceState: Memento, + private readonly versionStatus: VersionStatus, + private plugins: TypeScriptServerPlugin[], disposables: Disposable[] ) { @@ -404,8 +406,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient const label = version || localize('versionNumber.custom', 'custom'); const tooltip = modulePath; this.modulePath = modulePath; - VersionStatus.showHideStatus(); - VersionStatus.setInfo(label, tooltip); + this.versionStatus.showHideStatus(); + this.versionStatus.setInfo(label, tooltip); // This is backwards compatibility code to move the setting from the local // store into the workspace setting file. diff --git a/extensions/typescript/src/utils/versionStatus.ts b/extensions/typescript/src/utils/versionStatus.ts index e92b87d0f248b..21f3a1c34f18f 100644 --- a/extensions/typescript/src/utils/versionStatus.ts +++ b/extensions/typescript/src/utils/versionStatus.ts @@ -3,42 +3,53 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import vscode = require('vscode'); +import * as vscode from 'vscode'; -const versionBarEntry = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, Number.MIN_VALUE); -export function showHideStatus() { - if (!versionBarEntry) { - return; - } - if (!vscode.window.activeTextEditor) { - versionBarEntry.hide(); - return; - } +export default class VersionStatus extends vscode.Disposable { + onChangeEditorSub: any; + private versionBarEntry: vscode.StatusBarItem; - let doc = vscode.window.activeTextEditor.document; - if (vscode.languages.match('typescript', doc) || vscode.languages.match('typescriptreact', doc)) { - versionBarEntry.show(); - return; - } + constructor() { + super(() => this.dispose()); + + this.versionBarEntry = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, Number.MIN_VALUE); - if (!vscode.window.activeTextEditor.viewColumn) { - // viewColumn is undefined for the debug/output panel, but we still want - // to show the version info - return; + this.onChangeEditorSub = vscode.window.onDidChangeActiveTextEditor(this.showHideStatus, this); } - versionBarEntry.hide(); -} + dispose() { + this.versionBarEntry.dispose(); + this.onChangeEditorSub.dispose(); + } -export function disposeStatus() { - if (versionBarEntry) { - versionBarEntry.dispose(); + showHideStatus() { + if (!this.versionBarEntry) { + return; + } + if (!vscode.window.activeTextEditor) { + this.versionBarEntry.hide(); + return; + } + + let doc = vscode.window.activeTextEditor.document; + if (vscode.languages.match('typescript', doc) || vscode.languages.match('typescriptreact', doc)) { + this.versionBarEntry.show(); + return; + } + + if (!vscode.window.activeTextEditor.viewColumn) { + // viewColumn is undefined for the debug/output panel, but we still want + // to show the version info + return; + } + + this.versionBarEntry.hide(); } -} -export function setInfo(message: string, tooltip: string) { - versionBarEntry.text = message; - versionBarEntry.tooltip = tooltip; - versionBarEntry.command = 'typescript.selectTypeScriptVersion'; + public setInfo(message: string, tooltip: string) { + this.versionBarEntry.text = message; + this.versionBarEntry.tooltip = tooltip; + this.versionBarEntry.command = 'typescript.selectTypeScriptVersion'; + } } diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index f1c5a8065b8af..65e818dafc380 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -163,7 +163,7 @@ namespace ProblemMatcher { if (values === void 0 || values === null) { return undefined; } - let result: (string | Problems.ProblemMatcher)[]; + let result: (string | Problems.ProblemMatcher)[] = []; for (let value of values) { let converted = typeof value === 'string' ? value : fromSingle(value); if (converted) { From 3dfc44a3fa8a3a2b5fa0500fe8075bf66bae6b21 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 26 May 2017 00:18:20 +0200 Subject: [PATCH 1078/2747] Decoration text after decoration wrongly positioned. Fixes #27288 --- src/vs/editor/browser/services/codeEditorServiceImpl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index 26bc62e9e6a2d..d824627e4ecbb 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -151,7 +151,7 @@ class DecorationTypeOptionsProvider implements IModelDecorationOptionsProvider { this.className = createCSSRules(ModelDecorationCSSRuleType.ClassName); this.inlineClassName = createCSSRules(ModelDecorationCSSRuleType.InlineClassName); this.beforeContentClassName = createCSSRules(ModelDecorationCSSRuleType.BeforeContentClassName); - this.beforeContentClassName = createCSSRules(ModelDecorationCSSRuleType.AfterContentClassName); + this.afterContentClassName = createCSSRules(ModelDecorationCSSRuleType.AfterContentClassName); this.glyphMarginClassName = createCSSRules(ModelDecorationCSSRuleType.GlyphMarginClassName); let options = providerArgs.options; From 4ce3a1e6ac1ea6a00ddaff5c8ffdfd25e30f4f03 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 24 May 2017 15:27:48 -0700 Subject: [PATCH 1079/2747] Move VersionStatus into a class --- extensions/typescript/src/typescriptMain.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 07a666936b956..18bc57678ff18 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -90,6 +90,7 @@ const standardLanguageDescriptions: LanguageDescription[] = [ export function activate(context: ExtensionContext): void { const plugins = getContributedTypeScriptServerPlugins(); +<<<<<<< HEAD const lazyClientHost = (() => { let clientHost: TypeScriptServiceClientHost | undefined; return () => { @@ -110,6 +111,10 @@ export function activate(context: ExtensionContext): void { }; })(); +======= + const clientHost = new TypeScriptServiceClientHost(standardLanguageDescriptions, context.storagePath, context.globalState, context.workspaceState, plugins); + context.subscriptions.push(clientHost); +>>>>>>> a0b779f... Move VersionStatus into a class context.subscriptions.push(commands.registerCommand('typescript.reloadProjects', () => { lazyClientHost().reloadProjects(); @@ -145,6 +150,7 @@ export function activate(context: ExtensionContext): void { const jsDocCompletionCommand = new TryCompleteJsDocCommand(() => lazyClientHost().serviceClient); context.subscriptions.push(commands.registerCommand(TryCompleteJsDocCommand.COMMAND_NAME, jsDocCompletionCommand.tryCompleteJsDoc, jsDocCompletionCommand)); +<<<<<<< HEAD const supportedLanguage = [].concat.apply([], standardLanguageDescriptions.map(x => x.modeIds).concat(plugins.map(x => x.languages))); function didOpenTextDocument(textDocument: TextDocument): boolean { if (supportedLanguage.indexOf(textDocument.languageId) >= 0) { @@ -162,6 +168,15 @@ export function activate(context: ExtensionContext): void { } } +======= + clientHost.serviceClient.onReady().then(() => { + context.subscriptions.push(ProjectStatus.create(clientHost.serviceClient, + path => new Promise(resolve => setTimeout(() => resolve(clientHost.handles(path)), 750)), + context.workspaceState)); + }, () => { + // Nothing to do here. The client did show a message; + }); +>>>>>>> a0b779f... Move VersionStatus into a class BuildStatus.update({ queueLength: 0 }); } From fe69f9ac3b5d2f476a08275884d9c12b05859bb6 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 25 May 2017 15:30:19 -0700 Subject: [PATCH 1080/2747] Actually save the file this time :'( --- extensions/typescript/src/typescriptMain.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 18bc57678ff18..07a666936b956 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -90,7 +90,6 @@ const standardLanguageDescriptions: LanguageDescription[] = [ export function activate(context: ExtensionContext): void { const plugins = getContributedTypeScriptServerPlugins(); -<<<<<<< HEAD const lazyClientHost = (() => { let clientHost: TypeScriptServiceClientHost | undefined; return () => { @@ -111,10 +110,6 @@ export function activate(context: ExtensionContext): void { }; })(); -======= - const clientHost = new TypeScriptServiceClientHost(standardLanguageDescriptions, context.storagePath, context.globalState, context.workspaceState, plugins); - context.subscriptions.push(clientHost); ->>>>>>> a0b779f... Move VersionStatus into a class context.subscriptions.push(commands.registerCommand('typescript.reloadProjects', () => { lazyClientHost().reloadProjects(); @@ -150,7 +145,6 @@ export function activate(context: ExtensionContext): void { const jsDocCompletionCommand = new TryCompleteJsDocCommand(() => lazyClientHost().serviceClient); context.subscriptions.push(commands.registerCommand(TryCompleteJsDocCommand.COMMAND_NAME, jsDocCompletionCommand.tryCompleteJsDoc, jsDocCompletionCommand)); -<<<<<<< HEAD const supportedLanguage = [].concat.apply([], standardLanguageDescriptions.map(x => x.modeIds).concat(plugins.map(x => x.languages))); function didOpenTextDocument(textDocument: TextDocument): boolean { if (supportedLanguage.indexOf(textDocument.languageId) >= 0) { @@ -168,15 +162,6 @@ export function activate(context: ExtensionContext): void { } } -======= - clientHost.serviceClient.onReady().then(() => { - context.subscriptions.push(ProjectStatus.create(clientHost.serviceClient, - path => new Promise(resolve => setTimeout(() => resolve(clientHost.handles(path)), 750)), - context.workspaceState)); - }, () => { - // Nothing to do here. The client did show a message; - }); ->>>>>>> a0b779f... Move VersionStatus into a class BuildStatus.update({ queueLength: 0 }); } From 042217fcbadfb003e04b3076e0e43e051f65bcac Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Thu, 25 May 2017 16:03:38 -0700 Subject: [PATCH 1081/2747] Fix #26708 - use StringDecoder to handle data chunks that split multibyte characters --- .../services/search/node/ripgrepTextSearch.ts | 16 +++++++-- .../test/node/ripgrepTextSearch.test.ts | 36 +++++++++++++++---- 2 files changed, 42 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts index 829406f52fef6..03aaa15bb75ff 100644 --- a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts +++ b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts @@ -6,6 +6,7 @@ import { EventEmitter } from 'events'; import * as path from 'path'; +import { StringDecoder, NodeStringDecoder } from 'string_decoder'; import * as cp from 'child_process'; import { rgPath } from 'vscode-ripgrep'; @@ -174,11 +175,13 @@ export class RipgrepParser extends EventEmitter { private fileMatch: FileMatch; private remainder: string; private isDone: boolean; + private stringDecoder: NodeStringDecoder; private numResults = 0; constructor(private maxResults: number, private rootFolder: string) { super(); + this.stringDecoder = new StringDecoder(); } public cancel(): void { @@ -186,16 +189,23 @@ export class RipgrepParser extends EventEmitter { } public flush(): void { + this.handleDecodedData(this.stringDecoder.end()); + if (this.fileMatch) { this.onResult(); } } - public handleData(data: string | Buffer): void { + public handleData(data: Buffer | string): void { + const dataStr = typeof data === 'string' ? data : this.stringDecoder.write(data); + this.handleDecodedData(dataStr); + } + + private handleDecodedData(decodedData: string): void { // If the previous data chunk didn't end in a newline, prepend it to this chunk const dataStr = this.remainder ? - this.remainder + data.toString() : - data.toString(); + this.remainder + decodedData : + decodedData; const dataLines: string[] = dataStr.split(/\r\n|\n/); this.remainder = dataLines[dataLines.length - 1] ? dataLines.pop() : null; diff --git a/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts b/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts index 1ee3f9a6a835a..9ff4208d109cc 100644 --- a/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts +++ b/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts @@ -33,7 +33,11 @@ suite('RipgrepParser', () => { return matchLine; } - function parseInput(inputChunks: string[]): ISerializedFileMatch[] { + function parseInputStrings(inputChunks: string[]): ISerializedFileMatch[] { + return parseInput(inputChunks.map(chunk => new Buffer(chunk))); + } + + function parseInput(inputChunks: Buffer[]): ISerializedFileMatch[] { const matches: ISerializedFileMatch[] = []; const rgp = new RipgrepParser(1e6, rootFolder); rgp.on('result', (match: ISerializedFileMatch) => { @@ -65,7 +69,7 @@ suite('RipgrepParser', () => { [getFileLine('a.txt'), getMatchLine(1, ['before', 'match', 'after']), getMatchLine(2, ['before', 'match', 'after']), fileSectionEnd].join('\n') ]; - const results = parseInput(input); + const results = parseInputStrings(input); assert.equal(results.length, 1); assert.deepEqual(results[0], { @@ -93,7 +97,7 @@ suite('RipgrepParser', () => { [getFileLine('c.txt'), getMatchLine(1, ['before', 'match', 'after']), getMatchLine(2, ['before', 'match', 'after']), fileSectionEnd].join('\n') ]; - const results = parseInput(input); + const results = parseInputStrings(input); assert.equal(results.length, 3); results.forEach(fileResult => assert.equal(fileResult.numMatches, 2)); }); @@ -116,7 +120,7 @@ suite('RipgrepParser', () => { test('Parses multiple chunks broken at each line', () => { const input = singleLineChunks.map(chunk => chunk + '\n'); - const results = parseInput(input); + const results = parseInputStrings(input); assert.equal(results.length, 3); results.forEach(fileResult => assert.equal(fileResult.numMatches, 2)); }); @@ -126,7 +130,7 @@ suite('RipgrepParser', () => { .map(chunk => chunk + '\n') .map(halve)); - const results = parseInput(input); + const results = parseInputStrings(input); assert.equal(results.length, 3); results.forEach(fileResult => assert.equal(fileResult.numMatches, 2)); }); @@ -136,7 +140,7 @@ suite('RipgrepParser', () => { .map(chunk => chunk + '\n') .map(arrayOfChars)); - const results = parseInput(input); + const results = parseInputStrings(input); assert.equal(results.length, 3); results.forEach(fileResult => assert.equal(fileResult.numMatches, 2)); }); @@ -145,8 +149,26 @@ suite('RipgrepParser', () => { const input = singleLineChunks .map(chunk => '\n' + chunk); - const results = parseInput(input); + const results = parseInputStrings(input); assert.equal(results.length, 3); results.forEach(fileResult => assert.equal(fileResult.numMatches, 2)); }); + + test('Parses chunks broken in the middle of a multibyte character', () => { + const multibyteStr = '漢'; + const multibyteBuf = new Buffer(multibyteStr); + const text = getFileLine('foo/bar') + '\n' + getMatchLine(0, ['before', 'match', 'after']) + '\n'; + + // Split the multibyte char into two pieces and divide between the two buffers + const beforeIndex = 24; + const inputBufs = [ + Buffer.concat([new Buffer(text.substr(0, beforeIndex)), multibyteBuf.slice(0, 2)]), + Buffer.concat([multibyteBuf.slice(2), new Buffer(text.substr(beforeIndex))]) + ]; + + const results = parseInput(inputBufs); + assert.equal(results.length, 1); + assert.equal(results[0].lineMatches.length, 1); + assert.deepEqual(results[0].lineMatches[0].offsetAndLengths, [[7, 5]]); + }); }); \ No newline at end of file From 1119064b34f376a7560a3a1ccfe43d8d156bf2e1 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Thu, 25 May 2017 16:15:19 -0700 Subject: [PATCH 1082/2747] Add Unit Test launch config (not sure why it was deleted?) --- .vscode/launch.json | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index d56ca22e59dda..fa30207ce2b26 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -146,6 +146,32 @@ "outFiles": [ "${workspaceRoot}/extensions/node_modules/typescript/lib/**/*.js" ] + }, + { + "type": "node", + "request": "launch", + "name": "Unit Tests", + "protocol": "legacy", + "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", + "runtimeExecutable": "${workspaceRoot}/.build/electron/Code - OSS.app/Contents/MacOS/Electron", + "windows": { + "runtimeExecutable": "${workspaceRoot}/.build/electron/Code - OSS.exe" + }, + "linux": { + "runtimeExecutable": "${workspaceRoot}/.build/electron/code-oss" + }, + "stopOnEntry": false, + "args": [ + "--timeout", + "2000" + ], + "cwd": "${workspaceRoot}", + "env": { + "ELECTRON_RUN_AS_NODE": "true" + }, + "outFiles": [ + "${workspaceRoot}/out/**/*.js" + ] } ], "compounds": [ From 3b48123e2e3183ce64041e050f777e543961798c Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Thu, 25 May 2017 16:17:37 -0700 Subject: [PATCH 1083/2747] sourceMaps is enabled by default, remove from launch configs --- .vscode/launch.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index fa30207ce2b26..39b72b995a8b4 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -18,7 +18,6 @@ "name": "Attach to Extension Host", "protocol": "legacy", "port": 5870, - "sourceMaps": true, "restart": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" @@ -30,7 +29,6 @@ "name": "Attach to Shared Process", "protocol": "legacy", "port": 5871, - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -41,7 +39,6 @@ "protocol": "legacy", "name": "Attach to Search process", "port": 7890, - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -52,7 +49,6 @@ "name": "Attach to CLI Process", "protocol": "legacy", "port": 5874, - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -63,7 +59,6 @@ "name": "Attach to Main Process", "protocol": "legacy", "port": 5875, - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -78,7 +73,6 @@ "--extensionDevelopmentPath=${workspaceRoot}/extensions/vscode-api-tests", "--extensionTestsPath=${workspaceRoot}/extensions/vscode-api-tests/out" ], - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -93,7 +87,6 @@ "--extensionDevelopmentPath=${workspaceRoot}/extensions/vscode-colorize-tests", "--extensionTestsPath=${workspaceRoot}/extensions/vscode-colorize-tests/out" ], - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -131,7 +124,6 @@ "program": "${workspaceRoot}/extensions/git/node_modules/mocha/bin/_mocha", "stopOnEntry": false, "cwd": "${workspaceRoot}/extensions/git", - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/extensions/git/out/**/*.js" ] @@ -141,7 +133,6 @@ "type": "node", "request": "attach", "port": 5859, - "sourceMaps": true, "protocol": "legacy", "outFiles": [ "${workspaceRoot}/extensions/node_modules/typescript/lib/**/*.js" From 867468a559f55277b443f66a28fe5317f9b76652 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 25 May 2017 16:17:21 -0700 Subject: [PATCH 1084/2747] Use 'descriptionForeground' (#27289) --- extensions/merge-conflict/src/mergeDecorator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts index 39888f727e628..be9e733a562af 100644 --- a/extensions/merge-conflict/src/mergeDecorator.ts +++ b/extensions/merge-conflict/src/mergeDecorator.ts @@ -81,7 +81,7 @@ export default class MergeDectorator implements vscode.Disposable { color: new vscode.ThemeColor('editor.foreground'), after: { contentText: ' ' + localize('currentChange', '(Current change)'), - color: 'rgba(0, 0, 0, 0.7)' + color: new vscode.ThemeColor('descriptionForeground') } }); @@ -96,7 +96,7 @@ export default class MergeDectorator implements vscode.Disposable { isWholeLine: this.decorationUsesWholeLine, after: { contentText: ' ' + localize('incomingChange', '(Incoming change)'), - color: 'rgba(0, 0, 0, 0.7)' + color: new vscode.ThemeColor('descriptionForeground') } }); } From ce18dd018de6f920c1d11fef76deb9e217e60b3e Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Thu, 25 May 2017 16:27:55 -0700 Subject: [PATCH 1085/2747] Safer change for #25422 --- src/vs/workbench/services/search/node/ripgrepTextSearch.ts | 2 +- .../services/search/test/node/ripgrepTextSearch.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts index 03aaa15bb75ff..b7f3b7ad4dc9c 100644 --- a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts +++ b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts @@ -235,7 +235,7 @@ export class RipgrepParser extends EventEmitter { this.onResult(); } - this.fileMatch = new FileMatch(path.resolve(this.rootFolder, r[1])); + this.fileMatch = new FileMatch(path.isAbsolute(r[1]) ? r[1] : path.join(this.rootFolder, r[1])); } else { // Line is empty (or malformed) } diff --git a/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts b/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts index 9ff4208d109cc..87a27629eafbd 100644 --- a/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts +++ b/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts @@ -74,7 +74,7 @@ suite('RipgrepParser', () => { assert.deepEqual(results[0], { numMatches: 2, - path: path.resolve(rootFolder, 'a.txt'), + path: path.join(rootFolder, 'a.txt'), lineMatches: [ { lineNumber: 0, From 370049325180aff3a4ec3b1f2f44aca4d22add03 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Thu, 25 May 2017 17:47:01 -0700 Subject: [PATCH 1086/2747] node-debug2@1.13.0 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 15d2edd0323db..cf894772b6a2b 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -43,7 +43,7 @@ const nodeModules = ['electron', 'original-fs'] const builtInExtensions = [ { name: 'ms-vscode.node-debug', version: '1.13.6' }, - { name: 'ms-vscode.node-debug2', version: '1.12.4' } + { name: 'ms-vscode.node-debug2', version: '1.13.0' } ]; const vscodeEntryPoints = _.flatten([ From 770206ab9c6357943a2145bd3ea49b667f3ff539 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 25 May 2017 21:23:47 -0700 Subject: [PATCH 1087/2747] Pickup all TSConfigs in Workspace for TSC Build Task (#27306) Follow up on #26079 Allows us to pick up all tsconfig files in a workspace for the build tasks --- .../typescript/src/features/taskProvider.ts | 51 +++++++++------- .../typescript/src/utils/tsconfigProvider.ts | 58 +++++++++++++++++++ 2 files changed, 88 insertions(+), 21 deletions(-) create mode 100644 extensions/typescript/src/utils/tsconfigProvider.ts diff --git a/extensions/typescript/src/features/taskProvider.ts b/extensions/typescript/src/features/taskProvider.ts index 76528021983ef..ba53903e447ce 100644 --- a/extensions/typescript/src/features/taskProvider.ts +++ b/extensions/typescript/src/features/taskProvider.ts @@ -11,6 +11,7 @@ import * as vscode from 'vscode'; import * as Proto from '../protocol'; import TypeScriptServiceClient from '../typescriptServiceClient'; +import TsConfigProvider from "../utils/tsconfigProvider"; const exists = (file: string): Promise => @@ -21,32 +22,47 @@ const exists = (file: string): Promise => }); export default class TypeScriptTaskProvider implements vscode.TaskProvider { + private readonly tsconfigProvider: TsConfigProvider; public constructor( private readonly lazyClient: () => TypeScriptServiceClient - ) { } + ) { + this.tsconfigProvider = new TsConfigProvider(); + } + + dispose() { + this.tsconfigProvider.dispose(); + } - async provideTasks(token: vscode.CancellationToken): Promise { + public async provideTasks(token: vscode.CancellationToken): Promise { const rootPath = vscode.workspace.rootPath; if (!rootPath) { return []; } - const projects = (await this.getConfigForActiveFile(token)).concat(await this.getConfigsForWorkspace()); const command = await this.getCommand(); + const projects = await this.getAllTsConfigs(token); - return projects - .filter((x, i) => projects.indexOf(x) === i) - .map(configFile => { - const configFileName = path.relative(rootPath, configFile); - const buildTask = new vscode.ShellTask(`tsc: build ${configFileName}`, `${command} -p ${configFile}`, '$tsc'); - buildTask.group = vscode.TaskGroup.Build; - return buildTask; - }); + return projects.map(configFile => { + const configFileName = path.relative(rootPath, configFile); + const buildTask = new vscode.ShellTask(`tsc: build ${configFileName}`, `${command} -p ${configFile}`, '$tsc'); + buildTask.group = vscode.TaskGroup.Build; + return buildTask; + }); } + private async getAllTsConfigs(token: vscode.CancellationToken): Promise { + const out: string[] = []; + const configs = (await this.getTsConfigForActiveFile(token)).concat(await this.getTsConfigsInWorkspace()); + for (const config of configs) { + if (await exists(config)) { + out.push(config); + } + } + return out; + } - private async getConfigForActiveFile(token: vscode.CancellationToken): Promise { + private async getTsConfigForActiveFile(token: vscode.CancellationToken): Promise { const editor = vscode.window.activeTextEditor; if (editor) { if (path.basename(editor.document.fileName).match(/^tsconfig\.(.\.)?json$/)) { @@ -75,15 +91,8 @@ export default class TypeScriptTaskProvider implements vscode.TaskProvider { return []; } - private async getConfigsForWorkspace(): Promise { - if (!vscode.workspace.rootPath) { - return []; - } - const rootTsConfig = path.join(vscode.workspace.rootPath, 'tsconfig.json'); - if (!await exists(rootTsConfig)) { - return []; - } - return [rootTsConfig]; + private async getTsConfigsInWorkspace(): Promise { + return Array.from(await this.tsconfigProvider.getConfigsForWorkspace()); } private async getCommand(): Promise { diff --git a/extensions/typescript/src/utils/tsconfigProvider.ts b/extensions/typescript/src/utils/tsconfigProvider.ts new file mode 100644 index 0000000000000..e85ca24bbff77 --- /dev/null +++ b/extensions/typescript/src/utils/tsconfigProvider.ts @@ -0,0 +1,58 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as vscode from 'vscode'; + +export default class TsConfigProvider extends vscode.Disposable { + private readonly tsconfigs = new Set(); + + private activated: boolean = false; + private disposables: vscode.Disposable[] = []; + + constructor() { + super(() => this.dispose()); + } + + dispose(): void { + this.disposables.forEach(d => d.dispose()); + } + + public async getConfigsForWorkspace(): Promise> { + if (!vscode.workspace.rootPath) { + return []; + } + await this.ensureActivated(); + return this.tsconfigs; + } + + private async ensureActivated() { + if (this.activated) { + return this; + } + this.activated = true; + + for (const config of await TsConfigProvider.loadWorkspaceTsconfigs()) { + this.tsconfigs.add(config.fsPath); + } + + const configFileWatcher = vscode.workspace.createFileSystemWatcher('**/tsconfig*.json'); + this.disposables.push(configFileWatcher); + configFileWatcher.onDidCreate(this.handleProjectCreate, this, this.disposables); + configFileWatcher.onDidDelete(this.handleProjectDelete, this, this.disposables); + + return this; + } + + private static loadWorkspaceTsconfigs() { + return vscode.workspace.findFiles('**/tsconfig*.json', '**/node_modules/**'); + } + + private handleProjectCreate(e: vscode.Uri) { + this.tsconfigs.add(e.fsPath); + } + + private handleProjectDelete(e: vscode.Uri) { + this.tsconfigs.delete(e.fsPath); + } +} From 01e289eac392c7a2e45da386e3ce3333db327916 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 25 May 2017 23:50:49 -0700 Subject: [PATCH 1088/2747] Select single words in property value --- extensions/emmet/src/selectItemHTML.ts | 65 +++++++++++++++-- extensions/emmet/src/selectItemStylesheet.ts | 75 ++++++++++++++++--- extensions/emmet/src/util.ts | 76 ++++++++++++++++++++ 3 files changed, 200 insertions(+), 16 deletions(-) diff --git a/extensions/emmet/src/selectItemHTML.ts b/extensions/emmet/src/selectItemHTML.ts index 79d0a585e0ae0..2c0be704eadf3 100644 --- a/extensions/emmet/src/selectItemHTML.ts +++ b/extensions/emmet/src/selectItemHTML.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { getNode, getDeepestNode } from './util'; +import { getNode, getDeepestNode, findNextWord, findPrevWord } from './util'; import Node from '@emmetio/node'; export function nextItemHTML(selection: vscode.Selection, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { @@ -99,10 +99,40 @@ function getNextAttribute(selection: vscode.Selection, document: vscode.TextDocu return new vscode.Selection(document.positionAt(attr.start), document.positionAt(attr.end)); } - if ((attr.value.start !== attr.value.end) && ((selectionStart === attr.start && selectionEnd === attr.end) || selectionEnd < attr.end - 1)) { - // select attr value + if (attr.value.start === attr.value.end) { + // No attr value to select + continue; + } + + if ((selectionStart === attr.start && selectionEnd === attr.end) || selectionEnd < attr.value.start) { + // cursor is in attr name, so select full attr value return new vscode.Selection(document.positionAt(attr.value.start), document.positionAt(attr.value.end)); } + + // Fetch the next word in the attr value + + if (attr.value.toString().indexOf(' ') === -1) { + // attr value does not have space, so no next word to find + continue; + } + + let pos = undefined; + if (selectionStart === attr.value.start && selectionEnd === attr.value.end) { + pos = -1; + } + if (pos === undefined && selectionEnd < attr.end) { + pos = selectionEnd - attr.value.start - 1; + } + + if (pos !== undefined) { + let [newSelectionStart, newSelectionEnd] = findNextWord(attr.value.toString(), pos); + if (newSelectionStart >= 0 && newSelectionEnd >= 0) { + newSelectionStart += attr.value.start; + newSelectionEnd += attr.value.start; + return new vscode.Selection(document.positionAt(newSelectionStart), document.positionAt(newSelectionEnd)); + } + } + } } @@ -113,18 +143,39 @@ function getPrevAttribute(selection: vscode.Selection, document: vscode.TextDocu } let selectionStart = document.offsetAt(selection.anchor); + let selectionEnd = document.offsetAt(selection.active); for (let i = node.attributes.length - 1; i >= 0; i--) { let attr = node.attributes[i]; - if (selectionStart > attr.value.start) { - // select attr value - return new vscode.Selection(document.positionAt(attr.value.start), document.positionAt(attr.value.end)); + if (selectionStart <= attr.start) { + continue; } - if (selectionStart > attr.start) { + if (attr.value.start === attr.value.end || selectionStart < attr.value.start) { // select full attr return new vscode.Selection(document.positionAt(attr.start), document.positionAt(attr.end)); } + + if (selectionStart === attr.value.start) { + if (selectionEnd >= attr.value.end) { + // select full attr + return new vscode.Selection(document.positionAt(attr.start), document.positionAt(attr.end)); + } + // select attr value + return new vscode.Selection(document.positionAt(attr.value.start), document.positionAt(attr.value.end)); + } + + // Fetch the prev word in the attr value + + let pos = selectionStart > attr.value.end ? attr.value.toString().length : selectionStart - attr.value.start; + let [newSelectionStart, newSelectionEnd] = findPrevWord(attr.value.toString(), pos); + if (newSelectionStart >= 0 && newSelectionEnd >= 0) { + newSelectionStart += attr.value.start; + newSelectionEnd += attr.value.start; + return new vscode.Selection(document.positionAt(newSelectionStart), document.positionAt(newSelectionEnd)); + } + + } } \ No newline at end of file diff --git a/extensions/emmet/src/selectItemStylesheet.ts b/extensions/emmet/src/selectItemStylesheet.ts index d0167a2d8b93d..e3144cbf6662a 100644 --- a/extensions/emmet/src/selectItemStylesheet.ts +++ b/extensions/emmet/src/selectItemStylesheet.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { getNode, getDeepestNode } from './util'; +import { getNode, getDeepestNode, findNextWord, findPrevWord } from './util'; import Node from '@emmetio/node'; export function nextItemStylesheet(selection: vscode.Selection, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { @@ -12,9 +12,17 @@ export function nextItemStylesheet(selection: vscode.Selection, editor: vscode.T let endOffset = editor.document.offsetAt(selection.active); let currentNode = getNode(rootNode, endOffset, true); - // Full property is selected, so select property value next + // Full property is selected, so select full property value next if (currentNode.type === 'property' && startOffset === currentNode.start && endOffset === currentNode.end) { - return getSelectionFromNode(currentNode, editor.document, true); + return getSelectionFromProperty(currentNode, editor.document, startOffset, endOffset, true, 'next'); + } + + // Part or whole of propertyValue is selected, so select the next word in the propertyValue + if (currentNode.type === 'property' && startOffset >= currentNode.valueToken.start && endOffset <= currentNode.valueToken.end) { + let singlePropertyValue = getSelectionFromProperty(currentNode, editor.document, startOffset, endOffset, false, 'next'); + if (singlePropertyValue) { + return singlePropertyValue; + } } // Cursor is in the selector or in a property @@ -41,13 +49,27 @@ export function nextItemStylesheet(selection: vscode.Selection, editor: vscode.T export function prevItemStylesheet(selection: vscode.Selection, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { let startOffset = editor.document.offsetAt(selection.anchor); + let endOffset = editor.document.offsetAt(selection.active); let currentNode = getNode(rootNode, startOffset); if (!currentNode) { currentNode = rootNode; } + // Full property value is selected, so select the whole property next + if (currentNode.type === 'property' && startOffset === currentNode.valueToken.start && endOffset === currentNode.valueToken.end) { + return getSelectionFromNode(currentNode, editor.document); + } + + // Part of propertyValue is selected, so select the prev word in the propertyValue + if (currentNode.type === 'property' && startOffset >= currentNode.valueToken.start && endOffset <= currentNode.valueToken.end) { + let singlePropertyValue = getSelectionFromProperty(currentNode, editor.document, startOffset, endOffset, false, 'prev'); + if (singlePropertyValue) { + return singlePropertyValue; + } + } + if (currentNode.type === 'property' || !currentNode.firstChild || (currentNode.type === 'rule' && startOffset <= currentNode.firstChild.start)) { - return getSelectionFromNode(currentNode, editor.document);; + return getSelectionFromNode(currentNode, editor.document); } // Select the child that appears just before the cursor @@ -57,23 +79,58 @@ export function prevItemStylesheet(selection: vscode.Selection, editor: vscode.T } prevNode = getDeepestNode(prevNode); - return getSelectionFromNode(prevNode, editor.document, true); + return getSelectionFromProperty(prevNode, editor.document, startOffset, endOffset, false, 'prev'); } -function getSelectionFromNode(node: Node, document: vscode.TextDocument, selectPropertyValue: boolean = false): vscode.Selection { +function getSelectionFromNode(node: Node, document: vscode.TextDocument): vscode.Selection { if (!node) { return; } let nodeToSelect = node.type === 'rule' ? node.selectorToken : node; + return new vscode.Selection(document.positionAt(nodeToSelect.start), document.positionAt(nodeToSelect.end)); +} + + +function getSelectionFromProperty(node: Node, document: vscode.TextDocument, selectionStart: number, selectionEnd: number, selectFullValue: boolean, direction: string): vscode.Selection { + if (!node || node.type !== 'property') { + return; + } + + let propertyValue = node.valueToken.stream.substring(node.valueToken.start, node.valueToken.end); + selectFullValue = selectFullValue || (direction === 'prev' && selectionStart === node.valueToken.start && selectionEnd < node.valueToken.end); + + if (selectFullValue) { + return new vscode.Selection(document.positionAt(node.valueToken.start), document.positionAt(node.valueToken.end)); + } + + let pos; + if (direction === 'prev') { + if (selectionStart === node.valueToken.start) { + return; + } + pos = selectionStart > node.valueToken.end ? propertyValue.length : selectionStart - node.valueToken.start; + } + + if (direction === 'next') { + if (selectionEnd === node.valueToken.end && (selectionStart > node.valueToken.start || propertyValue.indexOf(' ') === -1)) { + return; + } + pos = selectionEnd === node.valueToken.end ? -1 : selectionEnd - node.valueToken.start - 1; + } - let selectionStart = (node.type === 'property' && selectPropertyValue) ? node.valueToken.start : nodeToSelect.start; - let selectionEnd = (node.type === 'property' && selectPropertyValue) ? node.valueToken.end : nodeToSelect.end; - return new vscode.Selection(document.positionAt(selectionStart), document.positionAt(selectionEnd)); + let [newSelectionStart, newSelectionEnd] = direction === 'prev' ? findPrevWord(propertyValue, pos) : findNextWord(propertyValue, pos); + if (!newSelectionStart && !newSelectionEnd) { + return; + } + + newSelectionStart += node.valueToken.start; + newSelectionEnd += node.valueToken.start; + return new vscode.Selection(document.positionAt(newSelectionStart), document.positionAt(newSelectionEnd)); } diff --git a/extensions/emmet/src/util.ts b/extensions/emmet/src/util.ts index 3b495069d1e53..81085e5b6d6dc 100644 --- a/extensions/emmet/src/util.ts +++ b/extensions/emmet/src/util.ts @@ -136,4 +136,80 @@ export function getDeepestNode(node: Node): Node { } return getDeepestNode(node.children[node.children.length - 1]); +} + +export function findNextWord(propertyValue: string, pos: number): [number, number] { + + let foundSpace = pos === -1; + let foundStart = false; + let foundEnd = false; + + let newSelectionStart; + let newSelectionEnd; + while (pos < propertyValue.length - 1) { + pos++; + if (!foundSpace) { + if (propertyValue[pos] === ' ') { + foundSpace = true; + } + continue; + } + if (foundSpace && !foundStart && propertyValue[pos] === ' ') { + continue; + } + if (!foundStart) { + newSelectionStart = pos; + foundStart = true; + continue; + } + if (propertyValue[pos] === ' ') { + newSelectionEnd = pos; + foundEnd = true; + break; + } + } + + if (foundStart && !foundEnd) { + newSelectionEnd = propertyValue.length; + } + + return [newSelectionStart, newSelectionEnd]; +} + +export function findPrevWord(propertyValue: string, pos: number): [number, number] { + + let foundSpace = pos === propertyValue.length; + let foundStart = false; + let foundEnd = false; + + let newSelectionStart; + let newSelectionEnd; + while (pos > -1) { + pos--; + if (!foundSpace) { + if (propertyValue[pos] === ' ') { + foundSpace = true; + } + continue; + } + if (foundSpace && !foundEnd && propertyValue[pos] === ' ') { + continue; + } + if (!foundEnd) { + newSelectionEnd = pos + 1; + foundEnd = true; + continue; + } + if (propertyValue[pos] === ' ') { + newSelectionStart = pos + 1; + foundStart = true; + break; + } + } + + if (foundEnd && !foundStart) { + newSelectionStart = 0; + } + + return [newSelectionStart, newSelectionEnd]; } \ No newline at end of file From b96478ebcc790c03c27e1ee36ee6dbc23c882231 Mon Sep 17 00:00:00 2001 From: Maik Riechert Date: Wed, 3 May 2017 22:53:26 +0100 Subject: [PATCH 1089/2747] add git delete branch command --- extensions/git/package.json | 9 ++++++++ extensions/git/package.nls.json | 1 + extensions/git/src/commands.ts | 39 +++++++++++++++++++++++++++++++++ extensions/git/src/git.ts | 5 +++++ extensions/git/src/model.ts | 7 +++++- 5 files changed, 60 insertions(+), 1 deletion(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index 2a47e2dc209b0..0ea489cc81292 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -172,6 +172,11 @@ "title": "%command.branch%", "category": "Git" }, + { + "command": "git.deleteBranch", + "title": "%command.deleteBranch%", + "category": "Git" + }, { "command": "git.pull", "title": "%command.pull%", @@ -298,6 +303,10 @@ "command": "git.branch", "when": "config.git.enabled && scmProvider == git && gitState == idle" }, + { + "command": "git.deleteBranch", + "when": "config.git.enabled && scmProvider == git && gitState == idle" + }, { "command": "git.pull", "when": "config.git.enabled && scmProvider == git && gitState == idle" diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index efdde34dd7afa..e02a5ed2310fa 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -21,6 +21,7 @@ "command.undoCommit": "Undo Last Commit", "command.checkout": "Checkout to...", "command.branch": "Create Branch...", + "command.deleteBranch": "Delete Branch...", "command.pull": "Pull", "command.pullRebase": "Pull (Rebase)", "command.push": "Push", diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 24f9c35129a84..15532bfc28b71 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -60,6 +60,26 @@ class CheckoutRemoteHeadItem extends CheckoutItem { } } +class BranchDeleteItem implements QuickPickItem { + + protected get shortCommit(): string { return (this.ref.commit || '').substr(0, 8); } + protected get treeish(): string | undefined { return this.ref.name; } + get label(): string { return this.ref.name || this.shortCommit; } + get description(): string { return this.shortCommit; } + + constructor(protected ref: Ref) { } + + async run(model: Model): Promise { + const ref = this.treeish; + + if (!ref) { + return; + } + + await model.deleteBranch(ref); + } +} + interface Command { commandId: string; key: string; @@ -699,6 +719,25 @@ export class CommandCenter { await this.model.branch(name); } + @command('git.deleteBranch') + async deleteBranch(branchName: string): Promise { + if (typeof branchName === 'string') { + return await this.model.deleteBranch(branchName); + } + const currentHead = this.model.HEAD && this.model.HEAD.name; + const heads = this.model.refs.filter(ref => ref.type === RefType.Head && ref.name !== currentHead) + .map(ref => new BranchDeleteItem(ref)); + + const placeHolder = 'Select a branch to delete'; + const choice = await window.showQuickPick(heads, { placeHolder }); + + if (!choice) { + return; + } + + await choice.run(this.model); + } + @command('git.pull') async pull(): Promise { const remotes = this.model.remotes; diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 751fbccc15eaa..edba69ad2edea 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -650,6 +650,11 @@ export class Repository { await this.run(args); } + async deleteBranch(name: string): Promise { + const args = ['branch', '-d', name]; + await this.run(args); + } + async clean(paths: string[]): Promise { const pathsByGroup = groupBy(paths, p => path.dirname(p)); const groups = Object.keys(pathsByGroup).map(k => pathsByGroup[k]); diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index 3e8377e93eb2c..1ce7f8287a9c6 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -210,7 +210,8 @@ export enum Operation { Init = 1 << 12, Show = 1 << 13, Stage = 1 << 14, - GetCommitTemplate = 1 << 15 + GetCommitTemplate = 1 << 15, + DeleteBranch = 1 << 16 } // function getOperationName(operation: Operation): string { @@ -453,6 +454,10 @@ export class Model implements Disposable { await this.run(Operation.Branch, () => this.repository.branch(name, true)); } + async deleteBranch(name: string): Promise { + await this.run(Operation.DeleteBranch, () => this.repository.deleteBranch(name)); + } + async checkout(treeish: string): Promise { await this.run(Operation.Checkout, () => this.repository.checkout(treeish, [])); } From b348a0b780bb1879db84022fc58875000e12bc89 Mon Sep 17 00:00:00 2001 From: Maik Riechert Date: Sat, 6 May 2017 16:23:50 +0100 Subject: [PATCH 1090/2747] handle git branch delete error ("not fully merged") --- extensions/git/src/commands.ts | 59 +++++++++++++++++++++------------- extensions/git/src/git.ts | 9 ++++-- extensions/git/src/model.ts | 4 +-- 3 files changed, 45 insertions(+), 27 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 15532bfc28b71..e8c155102a3d9 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -62,21 +62,18 @@ class CheckoutRemoteHeadItem extends CheckoutItem { class BranchDeleteItem implements QuickPickItem { - protected get shortCommit(): string { return (this.ref.commit || '').substr(0, 8); } - protected get treeish(): string | undefined { return this.ref.name; } - get label(): string { return this.ref.name || this.shortCommit; } + private get shortCommit(): string { return (this.ref.commit || '').substr(0, 8); } + get branchName(): string | undefined { return this.ref.name; } + get label(): string { return this.branchName || ''; } get description(): string { return this.shortCommit; } - constructor(protected ref: Ref) { } - - async run(model: Model): Promise { - const ref = this.treeish; + constructor(private ref: Ref) { } - if (!ref) { + async run(model: Model, force?: boolean): Promise { + if (!this.branchName) { return; } - - await model.deleteBranch(ref); + await model.deleteBranch(this.branchName, force); } } @@ -720,22 +717,40 @@ export class CommandCenter { } @command('git.deleteBranch') - async deleteBranch(branchName: string): Promise { - if (typeof branchName === 'string') { - return await this.model.deleteBranch(branchName); - } - const currentHead = this.model.HEAD && this.model.HEAD.name; - const heads = this.model.refs.filter(ref => ref.type === RefType.Head && ref.name !== currentHead) - .map(ref => new BranchDeleteItem(ref)); + async deleteBranch(name: string, force?: boolean): Promise { + let run: (force?: boolean) => Promise; + if (typeof name === 'string') { + run = force => this.model.deleteBranch(name, force); + } else { + const currentHead = this.model.HEAD && this.model.HEAD.name; + const heads = this.model.refs.filter(ref => ref.type === RefType.Head && ref.name !== currentHead) + .map(ref => new BranchDeleteItem(ref)); - const placeHolder = 'Select a branch to delete'; - const choice = await window.showQuickPick(heads, { placeHolder }); + const placeHolder = 'Select a branch to delete'; + const choice = await window.showQuickPick(heads, { placeHolder }); - if (!choice) { - return; + if (!choice) { + return; + } + name = choice.branchName || ''; + run = force => choice.run(this.model, force); } - await choice.run(this.model); + try { + await run(force); + } catch (err) { + if (err.gitErrorCode !== GitErrorCodes.BranchNotFullyMerged) { + throw err; + } + + const message = localize('confirm force delete branch', "The branch '{0}' is not fully merged. Delete anyway?", name); + const yes = localize('delete branch', "Delete Branch"); + const pick = await window.showWarningMessage(message, yes); + + if (pick === yes) { + await run(true); + } + } } @command('git.pull') diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index edba69ad2edea..9ef482def9318 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -273,7 +273,8 @@ export const GitErrorCodes = { CantCreatePipe: 'CantCreatePipe', CantAccessRemote: 'CantAccessRemote', RepositoryNotFound: 'RepositoryNotFound', - RepositoryIsLocked: 'RepositoryIsLocked' + RepositoryIsLocked: 'RepositoryIsLocked', + BranchNotFullyMerged: 'BranchNotFullyMerged' }; function getGitErrorCode(stderr: string): string | undefined { @@ -291,6 +292,8 @@ function getGitErrorCode(stderr: string): string | undefined { return GitErrorCodes.RepositoryNotFound; } else if (/unable to access/.test(stderr)) { return GitErrorCodes.CantAccessRemote; + } else if (/branch '.+' is not fully merged/.test(stderr)) { + return GitErrorCodes.BranchNotFullyMerged; } return void 0; @@ -650,8 +653,8 @@ export class Repository { await this.run(args); } - async deleteBranch(name: string): Promise { - const args = ['branch', '-d', name]; + async deleteBranch(name: string, force?: boolean): Promise { + const args = ['branch', force ? '-D' : '-d', name]; await this.run(args); } diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index 1ce7f8287a9c6..aba4a4251d621 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -454,8 +454,8 @@ export class Model implements Disposable { await this.run(Operation.Branch, () => this.repository.branch(name, true)); } - async deleteBranch(name: string): Promise { - await this.run(Operation.DeleteBranch, () => this.repository.deleteBranch(name)); + async deleteBranch(name: string, force?: boolean): Promise { + await this.run(Operation.DeleteBranch, () => this.repository.deleteBranch(name, force)); } async checkout(treeish: string): Promise { From 3df1eca296aa247dd5687f352df0cf6478a3b94c Mon Sep 17 00:00:00 2001 From: Maik Riechert Date: Sat, 6 May 2017 16:55:38 +0100 Subject: [PATCH 1091/2747] localize --- extensions/git/src/commands.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index e8c155102a3d9..3ede435fff31c 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -726,13 +726,13 @@ export class CommandCenter { const heads = this.model.refs.filter(ref => ref.type === RefType.Head && ref.name !== currentHead) .map(ref => new BranchDeleteItem(ref)); - const placeHolder = 'Select a branch to delete'; + const placeHolder = localize('select branch to delete', 'Select a branch to delete'); const choice = await window.showQuickPick(heads, { placeHolder }); - if (!choice) { + if (!choice || !choice.branchName) { return; } - name = choice.branchName || ''; + name = choice.branchName; run = force => choice.run(this.model, force); } From 4fc88f02f0ec346215dca2fea3eb8d3ea10f3a78 Mon Sep 17 00:00:00 2001 From: Amy Qiu Date: Thu, 18 May 2017 13:00:04 -0700 Subject: [PATCH 1092/2747] Fix #26821 Memento - Search now remembers if you cleared your input before shutdown --- src/vs/workbench/parts/search/browser/searchViewlet.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index 8b693080d2674..1010cbcaf5b1b 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -1348,6 +1348,13 @@ export class SearchViewlet extends Viewlet { ]; } + public shutdown(): void { + this.viewletSettings['query.contentPattern'] = this.searchWidget.searchInput.getValue(); + this.saveMemento(); + + super.shutdown(); + } + public dispose(): void { this.isDisposed = true; From 41320ccf9e1d473fa26d39a13ee7508918817442 Mon Sep 17 00:00:00 2001 From: Amy Qiu Date: Thu, 18 May 2017 14:09:32 -0700 Subject: [PATCH 1093/2747] Fix saveMemento --- src/vs/workbench/parts/search/browser/searchViewlet.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index 1010cbcaf5b1b..deb804b45b1f7 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -1350,7 +1350,6 @@ export class SearchViewlet extends Viewlet { public shutdown(): void { this.viewletSettings['query.contentPattern'] = this.searchWidget.searchInput.getValue(); - this.saveMemento(); super.shutdown(); } From d82706abf28670120a85e5c64cbda9a65939bf1b Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 24 May 2017 13:02:51 +0200 Subject: [PATCH 1094/2747] theming: extension buttons --- .../extensions/browser/extensionsActions.ts | 66 +++++++++++++++++-- .../browser/media/extensionActions.css | 59 ----------------- 2 files changed, 62 insertions(+), 63 deletions(-) diff --git a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts index 47ccf37113e05..3b557abaf33cf 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts @@ -32,13 +32,16 @@ import { IExtensionService, IExtensionDescription } from 'vs/platform/extensions import URI from 'vs/base/common/uri'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { registerThemingParticipant, ITheme, ICssStyleCollector } from "vs/platform/theme/common/themeService"; +import { buttonBackground, buttonForeground, buttonHoverBackground, contrastBorder, registerColor } from "vs/platform/theme/common/colorRegistry"; +import { Color } from "vs/base/common/color"; export class InstallAction extends Action { private static InstallLabel = localize('installAction', "Install"); private static InstallingLabel = localize('installing', "Installing"); - private static Class = 'extension-action install'; + private static Class = 'extension-action prominent install'; private static InstallingClass = 'extension-action install installing'; private disposables: IDisposable[] = []; @@ -153,7 +156,7 @@ export class UninstallAction extends Action { export class CombinedInstallAction extends Action { - private static NoExtensionClass = 'extension-action install no-extension'; + private static NoExtensionClass = 'extension-action prominent install no-extension'; private installAction: InstallAction; private uninstallAction: UninstallAction; private disposables: IDisposable[] = []; @@ -224,7 +227,7 @@ export class CombinedInstallAction extends Action { export class UpdateAction extends Action { - private static EnabledClass = 'extension-action update'; + private static EnabledClass = 'extension-action prominent update'; private static DisabledClass = `${UpdateAction.EnabledClass} disabled`; private static Label = localize('updateAction', "Update"); @@ -477,7 +480,7 @@ export class EnableGloballyAction extends Action implements IExtensionAction { export class EnableAction extends Action { static ID = 'extensions.enable'; - private static EnabledClass = 'extension-action enable'; + private static EnabledClass = 'extension-action prominent enable'; private static DisabledClass = `${EnableAction.EnabledClass} disabled`; private disposables: IDisposable[] = []; @@ -1385,3 +1388,58 @@ CommandsRegistry.registerCommand('workbench.extensions.action.showLanguageExtens viewlet.focus(); }); }); + +export const extensionButtonProminentBackground = registerColor('extensionButton.prominentBackground', { + dark: '#327e36', + light: '#327e36', + hc: null +}, localize('extensionButtonProminentBackground', "Button background color for actions extension that stand out (e.g. install button).")); + +export const extensionButtonProminentForeground = registerColor('extensionButton.prominentForeground', { + dark: Color.white, + light: Color.white, + hc: null +}, localize('extensionButtonProminentForeground', "Button foreground color for actions extension that stand out (e.g. install button).")); + +export const extensionButtonProminentHoverBackground = registerColor('extensionButton.prominentHoverBackground', { + dark: '#28632b', + light: '#28632b', + hc: null +}, localize('extensionButtonProminentHoverBackground', "Button background hover color for actions extension that stand out (e.g. install button).")); + +registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { + const buttonBackgroundColor = theme.getColor(buttonBackground); + if (buttonBackgroundColor) { + collector.addRule(`.monaco-action-bar .action-item .action-label.extension-action { background-color: ${buttonBackgroundColor}; }`); + } + + const buttonForegroundColor = theme.getColor(buttonForeground); + if (buttonForegroundColor) { + collector.addRule(`.monaco-action-bar .action-item .action-label.extension-action { color: ${buttonForegroundColor}; }`); + } + + const buttonHoverBackgroundColor = theme.getColor(buttonHoverBackground); + if (buttonHoverBackgroundColor) { + collector.addRule(`.monaco-action-bar .action-item:hover .action-label.extension-action { background-color: ${buttonHoverBackgroundColor}; }`); + } + + const contrastBorderColor = theme.getColor(contrastBorder); + if (contrastBorderColor) { + collector.addRule(`.monaco-action-bar .action-item .action-label.extension-action { border: 1px solid ${contrastBorderColor}; }`); + } + + const extensionButtonProminentBackgroundColor = theme.getColor(extensionButtonProminentBackground); + if (extensionButtonProminentBackground) { + collector.addRule(`.monaco-action-bar .action-item .action-label.extension-action.prominent { background-color: ${extensionButtonProminentBackgroundColor}; }`); + } + + const extensionButtonProminentForegroundColor = theme.getColor(extensionButtonProminentForeground); + if (extensionButtonProminentForeground) { + collector.addRule(`.monaco-action-bar .action-item .action-label.extension-action.prominent { color: ${extensionButtonProminentForegroundColor}; }`); + } + + const extensionButtonProminentHoverBackgroundColor = theme.getColor(extensionButtonProminentHoverBackground); + if (extensionButtonProminentHoverBackground) { + collector.addRule(`.monaco-action-bar .action-item:hover .action-label.extension-action.prominent { background-color: ${extensionButtonProminentHoverBackgroundColor}; }`); + } +}); \ No newline at end of file diff --git a/src/vs/workbench/parts/extensions/browser/media/extensionActions.css b/src/vs/workbench/parts/extensions/browser/media/extensionActions.css index 5a51986dce882..e80db60cdef0e 100644 --- a/src/vs/workbench/parts/extensions/browser/media/extensionActions.css +++ b/src/vs/workbench/parts/extensions/browser/media/extensionActions.css @@ -4,69 +4,10 @@ *--------------------------------------------------------------------------------------------*/ .monaco-action-bar .action-item .action-label.extension-action { - border: 1px solid #CCC; - color: #6C6C6C; - background-color: #E2E2E2; padding: 0 5px; line-height: initial; } -.monaco-action-bar .action-item:not(.disabled):hover .action-label.extension-action { - background-color: #D9D9D9; -} - -.monaco-action-bar .action-item:not(.disabled):active .action-label.extension-action { - background-color: #C9C9C9; -} - -.vs-dark .monaco-action-bar .action-item .action-label.extension-action { - border: 1px solid #545454; - color: #CCC; - background-color: #3A3A3A; -} - -.vs-dark .monaco-action-bar .action-item:not(.disabled):hover .action-label.extension-action { - background-color: #464646; -} - -.vs-dark .monaco-action-bar .action-item:not(.disabled):active .action-label.extension-action { - background-color: #505050; -} - -.monaco-action-bar .action-item .action-label.extension-action.install, -.monaco-action-bar .action-item .action-label.extension-action.enable, -.monaco-action-bar .action-item .action-label.extension-action.update { - color: white; - background-color: #327e36; - border-color: #519A55; -} - -.monaco-action-bar .action-item:not(.disabled):hover .action-label.extension-action.install, -.monaco-action-bar .action-item:not(.disabled):hover .action-label.extension-action.enable, -.monaco-action-bar .action-item:not(.disabled):hover .action-label.extension-action.update { - background-color: #478E4B; -} - -.monaco-action-bar .action-item:not(.disabled):active .action-label.extension-action.install, -.monaco-action-bar .action-item:not(.disabled):active .action-label.extension-action.enable, -.monaco-action-bar .action-item:not(.disabled):active .action-label.extension-action.update { - background-color: #6DA770; -} - -.monaco-action-bar .action-item .action-label.extension-action.reload { - color: white; - background-color: #007ACC; - border-color: #3F8BCE; -} - -.monaco-action-bar .action-item:not(.disabled):hover .action-label.extension-action.reload { - background-color: #2584C4; -} - -.monaco-action-bar .action-item:not(.disabled):active .action-label.extension-action.reload { - background-color: #4294CC -} - .monaco-action-bar .action-item .action-label.clear-extensions { background: url('clear.svg') center center no-repeat; } From 9e0a6c00cdd8e6bf2ce298adc2b154a8fcefcfce Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 24 May 2017 13:12:13 +0200 Subject: [PATCH 1095/2747] Add tests for PagedScreenReaderStrategy --- .../browser/controller/textAreaState.test.ts | 87 ++++++++++++++++++- 1 file changed, 86 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/test/browser/controller/textAreaState.test.ts b/src/vs/editor/test/browser/controller/textAreaState.test.ts index 2423f8d3836eb..1d2c76be87d76 100644 --- a/src/vs/editor/test/browser/controller/textAreaState.test.ts +++ b/src/vs/editor/test/browser/controller/textAreaState.test.ts @@ -5,10 +5,12 @@ 'use strict'; import * as assert from 'assert'; -import { ISimpleModel, TextAreaState, ITextAreaWrapper } from 'vs/editor/browser/controller/textAreaState'; +import { ISimpleModel, TextAreaState, ITextAreaWrapper, PagedScreenReaderStrategy } from 'vs/editor/browser/controller/textAreaState'; import { Range } from 'vs/editor/common/core/range'; import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; import { Disposable } from 'vs/base/common/lifecycle'; +import { Model } from "vs/editor/common/model/model"; +import { Selection } from 'vs/editor/common/core/selection'; export class MockTextAreaWrapper extends Disposable implements ITextAreaWrapper { @@ -488,6 +490,89 @@ suite('TextAreaState', () => { '⌨️', 0 ); }); + + suite('PagedScreenReaderStrategy', () => { + + function testPagedScreenReaderStrategy(lines: string[], selection: Selection, expected: TextAreaState): void { + const model = Model.createFromString(lines.join('\n')); + const actual = PagedScreenReaderStrategy.fromEditorSelection(TextAreaState.EMPTY, model, selection); + assert.ok(actual.equals(expected), actual); + model.dispose(); + } + + test('simple', () => { + testPagedScreenReaderStrategy( + [ + 'Hello world!' + ], + new Selection(1, 13, 1, 13), + new TextAreaState('Hello world!', 12, 12) + ); + + testPagedScreenReaderStrategy( + [ + 'Hello world!' + ], + new Selection(1, 1, 1, 1), + new TextAreaState('Hello world!', 0, 0) + ); + + testPagedScreenReaderStrategy( + [ + 'Hello world!' + ], + new Selection(1, 1, 1, 6), + new TextAreaState('Hello world!', 0, 5) + ); + }); + + test('multiline', () => { + testPagedScreenReaderStrategy( + [ + 'Hello world!', + 'How are you?' + ], + new Selection(1, 1, 1, 1), + new TextAreaState('Hello world!\nHow are you?', 0, 0) + ); + + testPagedScreenReaderStrategy( + [ + 'Hello world!', + 'How are you?' + ], + new Selection(2, 1, 2, 1), + new TextAreaState('Hello world!\nHow are you?', 13, 13) + ); + }); + + test('page', () => { + testPagedScreenReaderStrategy( + [ + 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' + ], + new Selection(1, 1, 1, 1), + new TextAreaState('L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10', 0, 0) + ); + + testPagedScreenReaderStrategy( + [ + 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' + ], + new Selection(11, 1, 11, 1), + new TextAreaState('L11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20', 0, 0) + ); + + testPagedScreenReaderStrategy( + [ + 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' + ], + new Selection(12, 1, 12, 1), + new TextAreaState('L11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20', 4, 4) + ); + }); + + }); }); class SimpleModel implements ISimpleModel { From 7a0fec4abf7da4182333f6e769e80587593cc672 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 24 May 2017 13:14:25 +0200 Subject: [PATCH 1096/2747] Add trailing new line to current page (if there is one) --- .../editor/browser/controller/textAreaState.ts | 3 +-- .../browser/controller/textAreaState.test.ts | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/browser/controller/textAreaState.ts b/src/vs/editor/browser/controller/textAreaState.ts index 41581a76cda44..d398f5101476c 100644 --- a/src/vs/editor/browser/controller/textAreaState.ts +++ b/src/vs/editor/browser/controller/textAreaState.ts @@ -6,7 +6,6 @@ import { Range } from 'vs/editor/common/core/range'; import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; -import { Constants } from 'vs/editor/common/core/uint'; import * as strings from 'vs/base/common/strings'; export interface ITextAreaWrapper { @@ -206,7 +205,7 @@ export class PagedScreenReaderStrategy { let offset = page * PagedScreenReaderStrategy._LINES_PER_PAGE; let startLineNumber = offset + 1; let endLineNumber = offset + PagedScreenReaderStrategy._LINES_PER_PAGE; - return new Range(startLineNumber, 1, endLineNumber, Constants.MAX_SAFE_SMALL_INTEGER); + return new Range(startLineNumber, 1, endLineNumber + 1, 1); } public static fromEditorSelection(previousState: TextAreaState, model: ISimpleModel, selection: Range): TextAreaState { diff --git a/src/vs/editor/test/browser/controller/textAreaState.test.ts b/src/vs/editor/test/browser/controller/textAreaState.test.ts index 1d2c76be87d76..9170690d5ec84 100644 --- a/src/vs/editor/test/browser/controller/textAreaState.test.ts +++ b/src/vs/editor/test/browser/controller/textAreaState.test.ts @@ -496,7 +496,7 @@ suite('TextAreaState', () => { function testPagedScreenReaderStrategy(lines: string[], selection: Selection, expected: TextAreaState): void { const model = Model.createFromString(lines.join('\n')); const actual = PagedScreenReaderStrategy.fromEditorSelection(TextAreaState.EMPTY, model, selection); - assert.ok(actual.equals(expected), actual); + assert.ok(actual.equals(expected)); model.dispose(); } @@ -552,7 +552,7 @@ suite('TextAreaState', () => { 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' ], new Selection(1, 1, 1, 1), - new TextAreaState('L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10', 0, 0) + new TextAreaState('L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\n', 0, 0) ); testPagedScreenReaderStrategy( @@ -560,7 +560,7 @@ suite('TextAreaState', () => { 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' ], new Selection(11, 1, 11, 1), - new TextAreaState('L11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20', 0, 0) + new TextAreaState('L11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\n', 0, 0) ); testPagedScreenReaderStrategy( @@ -568,7 +568,15 @@ suite('TextAreaState', () => { 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' ], new Selection(12, 1, 12, 1), - new TextAreaState('L11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20', 4, 4) + new TextAreaState('L11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\n', 4, 4) + ); + + testPagedScreenReaderStrategy( + [ + 'L1\nL2\nL3\nL4\nL5\nL6\nL7\nL8\nL9\nL10\nL11\nL12\nL13\nL14\nL15\nL16\nL17\nL18\nL19\nL20\nL21' + ], + new Selection(21, 1, 21, 1), + new TextAreaState('L21', 0, 0) ); }); From 6cf1e118ae2722785ace9b192f4222ecb0857cec Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 24 May 2017 13:19:01 +0200 Subject: [PATCH 1097/2747] use process.hrtime for tick timers --- src/vs/base/node/startupTimers.d.ts | 6 +++--- src/vs/base/node/startupTimers.js | 16 +++++----------- .../electron-browser/bootstrap/index.js | 2 -- src/vs/workbench/electron-browser/shell.ts | 7 +------ 4 files changed, 9 insertions(+), 22 deletions(-) diff --git a/src/vs/base/node/startupTimers.d.ts b/src/vs/base/node/startupTimers.d.ts index c91175b02629c..5a04270f4b603 100644 --- a/src/vs/base/node/startupTimers.d.ts +++ b/src/vs/base/node/startupTimers.d.ts @@ -26,13 +26,13 @@ declare interface TickController { stop(stopped?: number): void; } -export function startTimer(name: string, started?: number): TickController; +export function startTimer(name: string): TickController; -export function stopTimer(name: string, stopped?: number); +export function stopTimer(name: string); export function ticks(): Tick[]; -export function tick(name:string):Tick; +export function tick(name: string): Tick; export function setProfileList(names: string[]): void; diff --git a/src/vs/base/node/startupTimers.js b/src/vs/base/node/startupTimers.js index 45637a77b5887..7fc81812efc1e 100644 --- a/src/vs/base/node/startupTimers.js +++ b/src/vs/base/node/startupTimers.js @@ -31,7 +31,7 @@ define([], function () { this.name = name; this.started = started; this.stopped = stopped; - this.duration = stopped - started; + this.duration = Math.round(((stopped[0] * 1.e9 + stopped[1]) - (started[0] * 1e9 + started[1])) / 1.e6); this.profile = profile; } Tick.compareByStart = function (a, b) { @@ -55,17 +55,14 @@ define([], function () { var _ticks = global._perfTicks; var _toBeProfiled = global._perfToBeProfiled; - function startTimer(name, started) { - if (typeof started !== 'number') { - started = Date.now(); - } + function startTimer(name) { if (_starts.has(name)) { throw new Error("${name}" + " already exists"); } if (_toBeProfiled.has(name)) { requireProfiler().startProfiling(name, true); } - _starts.set(name, { name: name, started: started }); + _starts.set(name, { name: name, started: process.hrtime() }); var stop = stopTimer.bind(undefined, name); return { stop: stop, @@ -76,14 +73,11 @@ define([], function () { }; } - function stopTimer(name, stopped) { - if (typeof stopped !== 'number') { - stopped = Date.now(); - } + function stopTimer(name) { var profile = _toBeProfiled.has(name) ? requireProfiler().stopProfiling(name) : undefined; var start = _starts.get(name); if (start !== undefined) { - var tick = new Tick(start.name, start.started, stopped, profile); + var tick = new Tick(start.name, start.started, process.hrtime(), profile); _ticks.set(name, tick); _starts.delete(name); } diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index 2b20efb7bbc64..c01da62847a48 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -192,8 +192,6 @@ function main() { beforeLoadWorkbenchMain: Date.now() }; - startTimer('elapsed:overall', configuration.perfStartTime); - const workbenchMainTimer = startTimer('load:workbench.main') require([ 'vs/workbench/electron-browser/workbench.main', diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index ac4b1759dde85..bec5d37606b9e 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -59,7 +59,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; -import { ILifecycleService, StartupKind } from 'vs/platform/lifecycle/common/lifecycle'; +import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IMessageService, IChoiceService, Severity, CloseAction } from 'vs/platform/message/common/message'; @@ -101,7 +101,6 @@ import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/work import { WorkbenchThemeService } from 'vs/workbench/services/themes/electron-browser/workbenchThemeService'; import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; import { foreground, selectionBackground, focusBorder, scrollbarShadow, scrollbarSliderActiveBackground, scrollbarSliderBackground, scrollbarSliderHoverBackground, listHighlightForeground, inputPlaceholderForeground } from 'vs/platform/theme/common/colorRegistry'; -import { stopTimer } from 'vs/base/node/startupTimers'; /** * Services that we require for the Shell @@ -243,10 +242,6 @@ export class WorkbenchShell { startupKind: this.lifecycleService.startupKind }); - if (this.lifecycleService.startupKind === StartupKind.NewWindow) { - stopTimer('elapsed:overall'); - } - // Telemetry: startup metrics this.timerService.workbenchStarted = Date.now(); this.timerService.restoreEditorsDuration = info.restoreEditorsDuration; From 77b02e2c8101611c0299bf901a7e8644d06bf7b9 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 24 May 2017 15:27:05 +0200 Subject: [PATCH 1098/2747] use getAccessibilitySupport for F8, fixes #18366 --- src/vs/editor/contrib/gotoError/browser/gotoError.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/gotoError/browser/gotoError.ts b/src/vs/editor/contrib/gotoError/browser/gotoError.ts index 89fb5203c60a0..cf7c165877725 100644 --- a/src/vs/editor/contrib/gotoError/browser/gotoError.ts +++ b/src/vs/editor/contrib/gotoError/browser/gotoError.ts @@ -27,6 +27,8 @@ import { registerColor } from 'vs/platform/theme/common/colorRegistry'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; import { Color } from 'vs/base/common/color'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; +import { getAccessibilitySupport } from 'vs/base/browser/browser'; +import { AccessibilitySupport } from 'vs/base/common/platform'; class MarkerModel { @@ -276,7 +278,9 @@ class MarkerNavigationWidget extends ZoneWidget { public show(where: Position, heightInLines: number): void { super.show(where, heightInLines); - this.focus(); + if (getAccessibilitySupport() !== AccessibilitySupport.Disabled) { + this.focus(); + } } private _wireModelAndView(): void { From fff0136ca6ef81de2bb5b1d96d7735bb1c837579 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 24 May 2017 15:36:37 +0200 Subject: [PATCH 1099/2747] don't double print messages from the extension service --- .../workbench/api/electron-browser/mainThreadExtensionService.ts | 1 - src/vs/workbench/api/node/extHost.protocol.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts b/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts index 4bbea670cc2a3..14b8d69f5dc5f 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts @@ -135,7 +135,6 @@ export class MainProcessExtensionService extends AbstractExtensionService { throw ni(); } } From a0a1b9e0d606a2b20844a32e73899bfc340b562c Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 24 May 2017 15:54:47 +0200 Subject: [PATCH 1100/2747] fixes #26184 --- extensions/git/src/commands.ts | 2 +- src/vs/base/browser/ui/list/listWidget.ts | 23 +++++++++++++++++++ .../parts/scm/electron-browser/scmViewlet.ts | 17 +++++++++++++- 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 3ede435fff31c..eed354dd8a4f1 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -149,7 +149,7 @@ export class CommandCenter { return await commands.executeCommand('vscode.open', right); } - return await commands.executeCommand('vscode.diff', left, right, title); + return await commands.executeCommand('vscode.diff', left, right, title, { preview: true }); } private getLeftResource(resource: Resource): Uri | undefined { diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts index 5643cc768a96d..d8f833da54009 100644 --- a/src/vs/base/browser/ui/list/listWidget.ts +++ b/src/vs/base/browser/ui/list/listWidget.ts @@ -321,6 +321,7 @@ class MouseController implements IDisposable { this.disposables = []; this.disposables.push(view.addListener('mousedown', e => this.onMouseDown(e))); this.disposables.push(view.addListener('click', e => this.onPointer(e))); + this.disposables.push(view.addListener('dblclick', e => this.onDoubleClick(e))); this.disposables.push(view.addListener(TouchEventType.Tap, e => this.onPointer(e))); } @@ -362,6 +363,19 @@ class MouseController implements IDisposable { this.list.open(focus); } + private onDoubleClick(e: IListMouseEvent): void { + e.preventDefault(); + e.stopPropagation(); + + if (isSelectionChangeEvent(e)) { + return; + } + + const focus = this.list.getFocus(); + this.list.setSelection(focus); + this.list.pin(focus); + } + private changeSelection(e: IListMouseEvent, reference: number | undefined): void { const focus = e.index; @@ -574,6 +588,11 @@ export class List implements ISpliceable, IDisposable { return mapEvent(this._onOpen.event, indexes => this.toListEvent({ indexes })); } + private _onPin = new Emitter(); + @memoize get onPin(): Event> { + return mapEvent(this._onPin.event, indexes => this.toListEvent({ indexes })); + } + private _onDOMFocus = new Emitter(); get onDOMFocus(): Event { return this._onDOMFocus.event; } @@ -813,6 +832,10 @@ export class List implements ISpliceable, IDisposable { this._onOpen.fire(indexes); } + pin(indexes: number[]): void { + this._onPin.fire(indexes); + } + style(styles: IListStyles): void { const content: string[] = []; diff --git a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts index f395ebd5eed22..1d4064b4fb311 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts @@ -25,6 +25,8 @@ import { VIEWLET_ID } from 'vs/workbench/parts/scm/common/scm'; import { FileLabel } from 'vs/workbench/browser/labels'; import { CountBadge } from 'vs/base/browser/ui/countBadge/countBadge'; import { ISCMService, ISCMProvider, ISCMResourceGroup, ISCMResource } from 'vs/workbench/services/scm/common/scm'; +import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; +import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IContextViewService, IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; @@ -243,7 +245,9 @@ export class SCMViewlet extends Viewlet { @IThemeService protected themeService: IThemeService, @IMenuService private menuService: IMenuService, @IModelService private modelService: IModelService, - @ICommandService private commandService: ICommandService + @ICommandService private commandService: ICommandService, + @IEditorGroupService private groupService: IEditorGroupService, + @IWorkbenchEditorService private editorService: IWorkbenchEditorService ) { super(VIEWLET_ID, telemetryService, themeService); @@ -320,6 +324,11 @@ export class SCMViewlet extends Viewlet { .filter(e => !!e && isSCMResource(e)) .on(this.open, this, this.disposables); + chain(this.list.onPin) + .map(e => e.elements[0]) + .filter(e => !!e && isSCMResource(e)) + .on(this.pin, this, this.disposables); + this.list.onContextMenu(this.onListContextMenu, this, this.disposables); this.disposables.push(this.list); @@ -406,6 +415,12 @@ export class SCMViewlet extends Viewlet { .done(undefined, onUnexpectedError); } + private pin(): void { + const activeEditor = this.editorService.getActiveEditor(); + const activeEditorInput = this.editorService.getActiveEditorInput(); + this.groupService.pinEditor(activeEditor.position, activeEditorInput); + } + getTitle(): string { const title = localize('source control', "Source Control"); const providerLabel = this.scmService.activeProvider && this.scmService.activeProvider.label; From 7131a14238e363ce2df6e60e6a0f02c0543a2487 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 24 May 2017 17:06:53 +0200 Subject: [PATCH 1101/2747] Revert "allow offsets for fuzzyScore, towards #26096" This reverts commit 093eac502f5546171f0f57aecfc9aa1c28bfa413. --- src/vs/base/common/filters.ts | 74 ++++++++++++------------- src/vs/base/test/common/filters.test.ts | 7 --- 2 files changed, 37 insertions(+), 44 deletions(-) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index 8719c8c662a6d..19056d36a50f7 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -450,7 +450,7 @@ _seps[':'] = true; const enum Arrow { Top = 0b1, Diag = 0b10, Left = 0b100 } -export function fuzzyScore(pattern: string, word: string, patternOffset: number = 0, wordOffset: number = 0): [number, number[]] { +export function fuzzyScore(pattern: string, word: string): [number, number[]] { const patternLen = pattern.length > 100 ? 100 : pattern.length; const wordLen = word.length > 100 ? 100 : word.length; @@ -465,16 +465,16 @@ export function fuzzyScore(pattern: string, word: string, patternOffset: number const lowPattern = pattern.toLowerCase(); const lowWord = word.toLowerCase(); - let patternPos = patternOffset; - let wordPos = wordOffset; + let i = 0; + let j = 0; - while (patternPos < patternLen && wordPos < wordLen) { - if (lowPattern[patternPos] === lowWord[wordPos]) { - patternPos += 1; + while (i < patternLen && j < wordLen) { + if (lowPattern[i] === lowWord[j]) { + i += 1; } - wordPos += 1; + j += 1; } - if (patternPos !== patternLen) { + if (i !== patternLen) { // no simple matches found -> return early return undefined; } @@ -482,24 +482,24 @@ export function fuzzyScore(pattern: string, word: string, patternOffset: number // keep track of the maximum score let maxScore = -1; - for (patternPos = patternOffset + 1; patternPos <= patternLen; patternPos++) { + for (i = 1; i <= patternLen; i++) { let lastLowWordChar = ''; - for (wordPos = wordOffset + 1; wordPos <= wordLen; wordPos++) { + for (j = 1; j <= wordLen; j++) { let score = -1; - let lowWordChar = lowWord[wordPos - 1]; - if (lowPattern[patternPos - 1] === lowWordChar) { + let lowWordChar = lowWord[j - 1]; + if (lowPattern[i - 1] === lowWordChar) { - if (wordPos === wordOffset + 1) { - if (pattern[patternPos - 1] === word[wordPos - 1]) { + if (j === 1) { + if (pattern[i - 1] === word[j - 1]) { score = 7; } else { score = 5; } - } else if (lowWordChar !== word[wordPos - 1]) { - if (pattern[patternPos - 1] === word[wordPos - 1]) { + } else if (lowWordChar !== word[j - 1]) { + if (pattern[i - 1] === word[j - 1]) { score = 7; } else { score = 5; @@ -512,38 +512,38 @@ export function fuzzyScore(pattern: string, word: string, patternOffset: number } } - _scores[patternPos][wordPos] = score; + _scores[i][j] = score; if (score > maxScore) { maxScore = score; } - let diag = _table[patternPos - 1][wordPos - 1] + (score > 1 ? 1 : score); - let top = _table[patternPos - 1][wordPos] + -1; - let left = _table[patternPos][wordPos - 1] + -1; + let diag = _table[i - 1][j - 1] + (score > 1 ? 1 : score); + let top = _table[i - 1][j] + -1; + let left = _table[i][j - 1] + -1; if (left >= top) { // left or diag if (left > diag) { - _table[patternPos][wordPos] = left; - _arrows[patternPos][wordPos] = Arrow.Left; + _table[i][j] = left; + _arrows[i][j] = Arrow.Left; } else if (left === diag) { - _table[patternPos][wordPos] = left; - _arrows[patternPos][wordPos] = Arrow.Left | Arrow.Diag; + _table[i][j] = left; + _arrows[i][j] = Arrow.Left | Arrow.Diag; } else { - _table[patternPos][wordPos] = diag; - _arrows[patternPos][wordPos] = Arrow.Diag; + _table[i][j] = diag; + _arrows[i][j] = Arrow.Diag; } } else { // top or diag if (top > diag) { - _table[patternPos][wordPos] = top; - _arrows[patternPos][wordPos] = Arrow.Top; + _table[i][j] = top; + _arrows[i][j] = Arrow.Top; } else if (top === diag) { - _table[patternPos][wordPos] = top; - _arrows[patternPos][wordPos] = Arrow.Top | Arrow.Diag; + _table[i][j] = top; + _arrows[i][j] = Arrow.Top | Arrow.Diag; } else { - _table[patternPos][wordPos] = diag; - _arrows[patternPos][wordPos] = Arrow.Diag; + _table[i][j] = diag; + _arrows[i][j] = Arrow.Diag; } } @@ -562,7 +562,7 @@ export function fuzzyScore(pattern: string, word: string, patternOffset: number } let bucket: [number, number[]][] = []; - findAllMatches(patternLen, patternLen, patternOffset, wordLen, wordOffset, 0, [], bucket, false); + findAllMatches(patternLen, patternLen, wordLen, 0, [], bucket, false); if (bucket.length === 0) { return undefined; @@ -580,7 +580,7 @@ export function fuzzyScore(pattern: string, word: string, patternOffset: number return topMatch; } -function findAllMatches(patternLen: number, patternPos: number, patternOffset: number, wordPos: number, wordOffset: number, total: number, matches: number[], bucket: [number, number[]][], lastMatched: boolean): void { +function findAllMatches(patternLen: number, patternPos: number, wordPos: number, total: number, matches: number[], bucket: [number, number[]][], lastMatched: boolean): void { if (bucket.length >= 10) { return; @@ -588,7 +588,7 @@ function findAllMatches(patternLen: number, patternPos: number, patternOffset: n let simpleMatchCount = 0; - while (patternPos > patternOffset && wordPos > wordOffset) { + while (patternPos > 0 && wordPos > 0) { let score = _scores[patternPos][wordPos]; let arrow = _arrows[patternPos][wordPos]; @@ -609,8 +609,8 @@ function findAllMatches(patternLen: number, patternPos: number, patternOffset: n if (arrow & Arrow.Left) { // left findAllMatches( - patternLen, patternPos, patternOffset, - wordPos - 1, wordOffset, + patternLen, patternPos, + wordPos - 1, matches.length !== 0 ? total - 1 : total, matches.slice(0), bucket, lastMatched ); diff --git a/src/vs/base/test/common/filters.test.ts b/src/vs/base/test/common/filters.test.ts index 797df43d1a2d6..ed8f708e757d4 100644 --- a/src/vs/base/test/common/filters.test.ts +++ b/src/vs/base/test/common/filters.test.ts @@ -325,13 +325,6 @@ suite('Filters', () => { assertMatches('f', ':foo', ':^foo', fuzzyScore); }); - test('fuzzyScore with offset', function () { - const matches = fuzzyScore('bc', 'abc', 0, 1); - assert.ok(matches); - const [, range] = matches; - assert.deepEqual(range, [1, 2]); - }); - function assertTopScore(filter: typeof fuzzyScore, pattern: string, expected: number, ...words: string[]) { let topScore = -(100 * 10); let topIdx = 0; From 16ece8e0c977b4c1d4e78d008c138eb91119f6c1 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 24 May 2017 17:31:02 +0200 Subject: [PATCH 1102/2747] make fuzzy match skip leading whitespace in pattern, fixes #26096 --- src/vs/base/common/filters.ts | 92 +++++++++++++++---------- src/vs/base/test/common/filters.test.ts | 14 +++- 2 files changed, 68 insertions(+), 38 deletions(-) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index 19056d36a50f7..cb219b5c31be1 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -448,6 +448,10 @@ _seps['\''] = true; _seps['"'] = true; _seps[':'] = true; +const _ws: { [ch: string]: boolean } = Object.create(null); +_ws[' '] = true; +_ws['\t'] = true; + const enum Arrow { Top = 0b1, Diag = 0b10, Left = 0b100 } export function fuzzyScore(pattern: string, word: string): [number, number[]] { @@ -455,7 +459,20 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { const patternLen = pattern.length > 100 ? 100 : pattern.length; const wordLen = word.length > 100 ? 100 : word.length; - if (patternLen === 0) { + // Check for leading whitespace in the pattern and + // start matching just after that position. This is + // like `pattern = pattern.rtrim()` but doesn't create + // a new string + let patternStartPos = 0; + for (const ch of pattern) { + if (_ws[ch]) { + patternStartPos += 1; + } else { + break; + } + } + + if (patternLen === patternStartPos) { return [-1, []]; } @@ -465,16 +482,17 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { const lowPattern = pattern.toLowerCase(); const lowWord = word.toLowerCase(); - let i = 0; - let j = 0; - while (i < patternLen && j < wordLen) { - if (lowPattern[i] === lowWord[j]) { - i += 1; + let patternPos = patternStartPos; + let wordPos = 0; + + while (patternPos < patternLen && wordPos < wordLen) { + if (lowPattern[patternPos] === lowWord[wordPos]) { + patternPos += 1; } - j += 1; + wordPos += 1; } - if (i !== patternLen) { + if (patternPos !== patternLen) { // no simple matches found -> return early return undefined; } @@ -482,24 +500,24 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { // keep track of the maximum score let maxScore = -1; - for (i = 1; i <= patternLen; i++) { + for (patternPos = patternStartPos + 1; patternPos <= patternLen; patternPos++) { let lastLowWordChar = ''; - for (j = 1; j <= wordLen; j++) { + for (wordPos = 1; wordPos <= wordLen; wordPos++) { let score = -1; - let lowWordChar = lowWord[j - 1]; - if (lowPattern[i - 1] === lowWordChar) { + let lowWordChar = lowWord[wordPos - 1]; + if (lowPattern[patternPos - 1] === lowWordChar) { - if (j === 1) { - if (pattern[i - 1] === word[j - 1]) { + if (wordPos === 1) { + if (pattern[patternPos - 1] === word[wordPos - 1]) { score = 7; } else { score = 5; } - } else if (lowWordChar !== word[j - 1]) { - if (pattern[i - 1] === word[j - 1]) { + } else if (lowWordChar !== word[wordPos - 1]) { + if (pattern[patternPos - 1] === word[wordPos - 1]) { score = 7; } else { score = 5; @@ -512,38 +530,38 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { } } - _scores[i][j] = score; + _scores[patternPos][wordPos] = score; if (score > maxScore) { maxScore = score; } - let diag = _table[i - 1][j - 1] + (score > 1 ? 1 : score); - let top = _table[i - 1][j] + -1; - let left = _table[i][j - 1] + -1; + let diag = _table[patternPos - 1][wordPos - 1] + (score > 1 ? 1 : score); + let top = _table[patternPos - 1][wordPos] + -1; + let left = _table[patternPos][wordPos - 1] + -1; if (left >= top) { // left or diag if (left > diag) { - _table[i][j] = left; - _arrows[i][j] = Arrow.Left; + _table[patternPos][wordPos] = left; + _arrows[patternPos][wordPos] = Arrow.Left; } else if (left === diag) { - _table[i][j] = left; - _arrows[i][j] = Arrow.Left | Arrow.Diag; + _table[patternPos][wordPos] = left; + _arrows[patternPos][wordPos] = Arrow.Left | Arrow.Diag; } else { - _table[i][j] = diag; - _arrows[i][j] = Arrow.Diag; + _table[patternPos][wordPos] = diag; + _arrows[patternPos][wordPos] = Arrow.Diag; } } else { // top or diag if (top > diag) { - _table[i][j] = top; - _arrows[i][j] = Arrow.Top; + _table[patternPos][wordPos] = top; + _arrows[patternPos][wordPos] = Arrow.Top; } else if (top === diag) { - _table[i][j] = top; - _arrows[i][j] = Arrow.Top | Arrow.Diag; + _table[patternPos][wordPos] = top; + _arrows[patternPos][wordPos] = Arrow.Top | Arrow.Diag; } else { - _table[i][j] = diag; - _arrows[i][j] = Arrow.Diag; + _table[patternPos][wordPos] = diag; + _arrows[patternPos][wordPos] = Arrow.Diag; } } @@ -562,7 +580,7 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { } let bucket: [number, number[]][] = []; - findAllMatches(patternLen, patternLen, wordLen, 0, [], bucket, false); + findAllMatches(patternLen, patternLen, patternStartPos, wordLen, 0, [], bucket, false); if (bucket.length === 0) { return undefined; @@ -580,7 +598,7 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { return topMatch; } -function findAllMatches(patternLen: number, patternPos: number, wordPos: number, total: number, matches: number[], bucket: [number, number[]][], lastMatched: boolean): void { +function findAllMatches(patternLen: number, patternPos: number, patternStartPos: number, wordPos: number, total: number, matches: number[], bucket: [number, number[]][], lastMatched: boolean): void { if (bucket.length >= 10) { return; @@ -588,7 +606,7 @@ function findAllMatches(patternLen: number, patternPos: number, wordPos: number, let simpleMatchCount = 0; - while (patternPos > 0 && wordPos > 0) { + while (patternPos > patternStartPos && wordPos > 0) { let score = _scores[patternPos][wordPos]; let arrow = _arrows[patternPos][wordPos]; @@ -609,7 +627,7 @@ function findAllMatches(patternLen: number, patternPos: number, wordPos: number, if (arrow & Arrow.Left) { // left findAllMatches( - patternLen, patternPos, + patternLen, patternPos, patternStartPos, wordPos - 1, matches.length !== 0 ? total - 1 : total, matches.slice(0), bucket, lastMatched @@ -635,7 +653,7 @@ function findAllMatches(patternLen: number, patternPos: number, wordPos: number, } } - if (matches.length !== patternLen) { + if (matches.length !== patternLen - patternStartPos) { // doesn't cover whole pattern return undefined; } diff --git a/src/vs/base/test/common/filters.test.ts b/src/vs/base/test/common/filters.test.ts index ed8f708e757d4..4753059f57c39 100644 --- a/src/vs/base/test/common/filters.test.ts +++ b/src/vs/base/test/common/filters.test.ts @@ -195,7 +195,7 @@ suite('Filters', () => { function assertMatches(pattern: string, word: string, decoratedWord: string, filter: typeof fuzzyScore) { let r = filter(pattern, word); - assert.ok(Boolean(r) === Boolean(decoratedWord)); + assert.ok(!decoratedWord === (!r || r[1].length === 0)); if (r) { const [, matches] = r; let pos = 0; @@ -325,6 +325,18 @@ suite('Filters', () => { assertMatches('f', ':foo', ':^foo', fuzzyScore); }); + test('Vscode 1.12 no longer obeys \'sortText\' in completion items (from language server), #26096', function () { + assertMatches(' ', ' group', undefined, fuzzyScore); + assertMatches(' g', ' group', ' ^group', fuzzyScore); + assertMatches('g', ' group', ' ^group', fuzzyScore); + assertMatches('g g', ' groupGroup', undefined, fuzzyScore); + assertMatches('g g', ' group Group', ' ^group^ ^Group', fuzzyScore); + assertMatches(' g g', ' group Group', ' ^group^ ^Group', fuzzyScore); + assertMatches('zz', 'zzGroup', '^z^zGroup', fuzzyScore); + assertMatches('zzg', 'zzGroup', '^z^z^Group', fuzzyScore); + assertMatches('g', 'zzGroup', 'zz^Group', fuzzyScore); + }); + function assertTopScore(filter: typeof fuzzyScore, pattern: string, expected: number, ...words: string[]) { let topScore = -(100 * 10); let topIdx = 0; From fb0c96d37b281e0d86305148ce8f490e2f2e9187 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 24 May 2017 17:59:05 +0200 Subject: [PATCH 1103/2747] don't score when the word is the empty word, #26096 --- src/vs/base/common/filters.ts | 2 +- .../suggest/browser/completionModel.ts | 10 ++++++- .../test/browser/completionModel.test.ts | 28 ++++++++++++++++++- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index cb219b5c31be1..d4b186650ccd2 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -473,7 +473,7 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { } if (patternLen === patternStartPos) { - return [-1, []]; + return [-100, []]; } if (patternLen > wordLen) { diff --git a/src/vs/editor/contrib/suggest/browser/completionModel.ts b/src/vs/editor/contrib/suggest/browser/completionModel.ts index e3bc875458f09..7bae1f397812b 100644 --- a/src/vs/editor/contrib/suggest/browser/completionModel.ts +++ b/src/vs/editor/contrib/suggest/browser/completionModel.ts @@ -124,7 +124,15 @@ export class CompletionModel { word = wordLen === 0 ? '' : leadingLineContent.slice(-wordLen); } - if (typeof suggestion.filterText === 'string') { + if (wordLen === 0) { + // when there is nothing to score against, don't + // event try to do. Use a const rank and rely on + // the fallback-sort using the initial sort order. + // use a score of `-100` because that is out of the + // bound of values `fuzzyScore` will return + item.score = -100; + + } else if (typeof suggestion.filterText === 'string') { // when there is a `filterText` it must match the `word`. // if it matches we check with the label to compute highlights // and if that doesn't yield a result we have no highlights, diff --git a/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts b/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts index af82d02dca052..fd3f85b323535 100644 --- a/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts +++ b/src/vs/editor/contrib/suggest/test/browser/completionModel.test.ts @@ -6,7 +6,7 @@ import * as assert from 'assert'; import { ISuggestion, ISuggestResult, ISuggestSupport, SuggestionType } from 'vs/editor/common/modes'; -import { ISuggestionItem } from 'vs/editor/contrib/suggest/browser/suggest'; +import { ISuggestionItem, getSuggestionComparator } from 'vs/editor/contrib/suggest/browser/suggest'; import { CompletionModel } from 'vs/editor/contrib/suggest/browser/completionModel'; import { IPosition } from 'vs/editor/common/core/position'; import { TPromise } from "vs/base/common/winjs.base"; @@ -202,4 +202,30 @@ suite('CompletionModel', function () { }; assert.equal(model.items.length, 1); }); + + test('Vscode 1.12 no longer obeys \'sortText\' in completion items (from language server), #26096', function () { + + const item1 = createSuggestItem('<- groups', 2, 'property', false, { lineNumber: 1, column: 3 }); + item1.suggestion.filterText = ' groups'; + item1.suggestion.sortText = '00002'; + + const item2 = createSuggestItem('source', 0, 'property', false, { lineNumber: 1, column: 3 }); + item2.suggestion.filterText = 'source'; + item2.suggestion.sortText = '00001'; + + const items = [item1, item2].sort(getSuggestionComparator('inline')); + + model = new CompletionModel(items, 3, { + leadingLineContent: ' ', + characterCountDelta: 0 + }); + + assert.equal(model.items.length, 2); + + const [first, second] = model.items; + assert.equal(first.suggestion.label, 'source'); + assert.equal(second.suggestion.label, '<- groups'); + + }); + }); From 76a5c5249f29e0d29898b3f0900147afe6449b2f Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 24 May 2017 18:02:57 +0200 Subject: [PATCH 1104/2747] Fix extension actions tests --- .../test/electron-browser/extensionsActions.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts index f0ae1aaabe1e8..0f50eb3a0e55c 100644 --- a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts @@ -99,7 +99,7 @@ suite('ExtensionsActions Test', () => { testObject.extension = paged.firstPage[0]; assert.ok(!testObject.enabled); assert.equal('Install', testObject.label); - assert.equal('extension-action install', testObject.class); + assert.equal('extension-action prominent install', testObject.class); done(); }); }); @@ -233,7 +233,7 @@ suite('ExtensionsActions Test', () => { const testObject: ExtensionsActions.CombinedInstallAction = instantiationService.createInstance(ExtensionsActions.CombinedInstallAction); assert.ok(!testObject.enabled); - assert.equal('extension-action install no-extension', testObject.class); + assert.equal('extension-action prominent install no-extension', testObject.class); }); test('Test CombinedInstallAction when extension is system extension', (done) => { @@ -244,7 +244,7 @@ suite('ExtensionsActions Test', () => { instantiationService.get(IExtensionsWorkbenchService).queryLocal().done(extensions => { testObject.extension = extensions[0]; assert.ok(!testObject.enabled); - assert.equal('extension-action install no-extension', testObject.class); + assert.equal('extension-action prominent install no-extension', testObject.class); done(); }); }); @@ -259,7 +259,7 @@ suite('ExtensionsActions Test', () => { testObject.extension = paged.firstPage[0]; assert.ok(testObject.enabled); assert.equal('Install', testObject.label); - assert.equal('extension-action install', testObject.class); + assert.equal('extension-action prominent install', testObject.class); done(); }); }); From d0e70aca3eef34037fdec72440c3f46f6a089043 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Wed, 24 May 2017 11:04:57 -0700 Subject: [PATCH 1105/2747] Tweak error message for extension table in github issues --- src/vs/workbench/electron-browser/actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index b5b380afb6a06..98e0d84f20c1c 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -739,7 +739,7 @@ ${tableHeader}\n${table}; // 2000 chars is browsers de-facto limit for URLs, 400 chars are allowed for other string parts of the issue URL // http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers if (encodeURIComponent(extensionTable).length > 1600) { - return 'the listing exceeds the lower minimum of browsers\' URL characters limit'; + return 'the listing length exceeds browsers\' URL characters limit'; } return extensionTable; From a6b7efe17f56ae26076cd7b7ee95830d5b24d3d2 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 24 May 2017 20:18:03 +0200 Subject: [PATCH 1106/2747] theming :lipstick: --- .../base/browser/ui/findinput/findInput.css | 26 ------------------- .../parts/debug/browser/debugActionItems.ts | 4 +-- .../debug/browser/media/breakpointWidget.css | 4 --- .../debug/browser/media/debugViewlet.css | 15 ----------- .../extensions/browser/extensionsActions.ts | 7 ++++- .../browser/media/extensionActions.css | 1 - .../preferences/browser/keybindingsEditor.ts | 12 +++++++-- .../browser/media/keybindingsEditor.css | 10 ------- 8 files changed, 18 insertions(+), 61 deletions(-) diff --git a/src/vs/base/browser/ui/findinput/findInput.css b/src/vs/base/browser/ui/findinput/findInput.css index 413c2dcafb35f..b785b4fa4cc0b 100644 --- a/src/vs/base/browser/ui/findinput/findInput.css +++ b/src/vs/base/browser/ui/findinput/findInput.css @@ -28,28 +28,6 @@ right: 2px; } -.monaco-findInput > .controls > .matchCount { - margin-left: 2px; - float: left; - overflow: hidden; - max-width: 30px; - min-width: 20px; - text-align: center; - - border-radius: 5px; - padding: 0 4px; - - -webkit-box-sizing: border-box; - -o-box-sizing: border-box; - -moz-box-sizing: border-box; - -ms-box-sizing: border-box; - box-sizing: border-box; -} - -.vs .monaco-findInput > .controls > .matchCount { - background: #ddd; -} - .vs .monaco-findInput.disabled { background-color: #E1E1E1; } @@ -59,10 +37,6 @@ background-color: #333; } -.vs-dark .monaco-findInput > .controls > .matchCount { - background: #555; -} - /* Highlighting */ .monaco-findInput.highlight-0 .controls { animation: monaco-findInput-highlight-0 100ms linear 0s; diff --git a/src/vs/workbench/parts/debug/browser/debugActionItems.ts b/src/vs/workbench/parts/debug/browser/debugActionItems.ts index 8f83bebe2daa9..edb07e3d969cc 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionItems.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionItems.ts @@ -117,8 +117,8 @@ export class StartDebugActionItem extends EventEmitter implements IActionItem { } })); this.toDispose.push(attachStylerCallback(this.themeService, { selectBorder }, colors => { - this.container.style.borderColor = colors.selectBorder; - selectBoxContainer.style.borderLeftColor = colors.selectBorder; + this.container.style.border = colors.selectBorder ? `1px solid ${colors.selectBorder}` : null; + selectBoxContainer.style.borderLeft = colors.selectBorder ? `1px solid ${colors.selectBorder}` : null; })); this.updateOptions(); diff --git a/src/vs/workbench/parts/debug/browser/media/breakpointWidget.css b/src/vs/workbench/parts/debug/browser/media/breakpointWidget.css index ad120c2ab7ff2..8d190b91ca032 100644 --- a/src/vs/workbench/parts/debug/browser/media/breakpointWidget.css +++ b/src/vs/workbench/parts/debug/browser/media/breakpointWidget.css @@ -16,10 +16,6 @@ padding: 0 10px; } -.monaco-editor .zone-widget .zone-widget-container.breakpoint-widget .breakpoint-select-container .select-box { - border-color: rgba(128, 128, 128, 0.35); -} - .monaco-editor .zone-widget .zone-widget-container.breakpoint-widget .inputBoxContainer { flex: 1; } diff --git a/src/vs/workbench/parts/debug/browser/media/debugViewlet.css b/src/vs/workbench/parts/debug/browser/media/debugViewlet.css index feff9b7cff6d6..b0d6b4510a12d 100644 --- a/src/vs/workbench/parts/debug/browser/media/debugViewlet.css +++ b/src/vs/workbench/parts/debug/browser/media/debugViewlet.css @@ -57,7 +57,6 @@ margin-right: 0.3em; height: 20px; flex-shrink: 1; - border: 1px solid #dddddd; margin-top: 7px; } @@ -65,11 +64,6 @@ border-radius: 4px; } -.vs-dark .monaco-workbench > .part > .title > .title-actions .start-debug-action-item, -.hc-black .monaco-workbench > .part > .title > .title-actions .start-debug-action-item { - border-color: #3c3c3c; -} - .monaco-workbench > .part > .title > .title-actions .start-debug-action-item .icon { height: 20px; width: 20px; @@ -84,15 +78,6 @@ background: url('continue-inverse.svg') center center no-repeat; } -.monaco-workbench > .part > .title > .title-actions .start-debug-action-item .configuration { - border-left: 1px solid #dddddd; -} - -.vs-dark .monaco-workbench > .part > .title > .title-actions .start-debug-action-item .configuration, -.hc-black .monaco-workbench > .part > .title > .title-actions .start-debug-action-item .configuration { - border-color: #3c3c3c; -} - .monaco-workbench .monaco-action-bar .start-debug-action-item .configuration .select-box { border: none; margin-top: 0px; diff --git a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts index 3b557abaf33cf..f2cf8c9cacdbb 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts @@ -33,7 +33,7 @@ import URI from 'vs/base/common/uri'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { registerThemingParticipant, ITheme, ICssStyleCollector } from "vs/platform/theme/common/themeService"; -import { buttonBackground, buttonForeground, buttonHoverBackground, contrastBorder, registerColor } from "vs/platform/theme/common/colorRegistry"; +import { buttonBackground, buttonForeground, buttonHoverBackground, contrastBorder, registerColor, foreground } from "vs/platform/theme/common/colorRegistry"; import { Color } from "vs/base/common/color"; export class InstallAction extends Action { @@ -1408,6 +1408,11 @@ export const extensionButtonProminentHoverBackground = registerColor('extensionB }, localize('extensionButtonProminentHoverBackground', "Button background hover color for actions extension that stand out (e.g. install button).")); registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { + const foregroundColor = theme.getColor(foreground); + if (foregroundColor) { + collector.addRule(`.monaco-action-bar .action-item .action-label.extension-action.built-in-status { border-color: ${foregroundColor}; }`); + } + const buttonBackgroundColor = theme.getColor(buttonBackground); if (buttonBackgroundColor) { collector.addRule(`.monaco-action-bar .action-item .action-label.extension-action { background-color: ${buttonBackgroundColor}; }`); diff --git a/src/vs/workbench/parts/extensions/browser/media/extensionActions.css b/src/vs/workbench/parts/extensions/browser/media/extensionActions.css index e80db60cdef0e..c9b9d8508a2a9 100644 --- a/src/vs/workbench/parts/extensions/browser/media/extensionActions.css +++ b/src/vs/workbench/parts/extensions/browser/media/extensionActions.css @@ -36,7 +36,6 @@ .monaco-action-bar .action-item .action-label.extension-action.built-in-status { border-radius: 4px; - border-color: #c1c1c1; color: inherit; background-color: transparent; opacity: 0.9; diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts index 2b8adf6502f4c..ca94ecd2c2bf4 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts @@ -33,12 +33,13 @@ import { IKeybindingEditingService } from 'vs/workbench/services/keybinding/comm import { IListService } from 'vs/platform/list/browser/listService'; import { List } from 'vs/base/browser/ui/list/listWidget'; import { IDelegate, IRenderer, IListContextMenuEvent, IListEvent } from 'vs/base/browser/ui/list/list'; -import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IChoiceService, IMessageService, Severity } from 'vs/platform/message/common/message'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyCode, ResolvedKeybinding } from 'vs/base/common/keyCodes'; import { attachListStyler } from 'vs/platform/theme/common/styler'; +import { listHighlightForeground } from "vs/platform/theme/common/colorRegistry"; let $ = DOM.$; @@ -797,4 +798,11 @@ class WhenColumn extends Column { private getAriaLabel(keybindingItemEntry: IKeybindingItemEntry): string { return keybindingItemEntry.keybindingItem.when ? localize('whenAriaLabel', "When is {0}.", keybindingItemEntry.keybindingItem.when) : localize('noWhen', "No when context."); } -} \ No newline at end of file +} + +registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { + const listHighlightForegroundColor = theme.getColor(listHighlightForeground); + if (listHighlightForegroundColor) { + collector.addRule(`.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .highlight { color: ${listHighlightForegroundColor}; }`); + } +}); \ No newline at end of file diff --git a/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css b/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css index 27a753c86bd0b..29b4fe0a8d134 100644 --- a/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css +++ b/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css @@ -148,19 +148,9 @@ } .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .highlight { - color: #007ACC; font-weight: bold; } -.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.selected > .column .highlight { - color: #1b3c53; -} - -.vs-dark .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.selected > .column .highlight, -.hc-black .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:focus .monaco-list-row.selected > .column .highlight { - color: #049aff; -} - .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .monaco-action-bar { display: none; flex: 1; From b648308eb340729c76fa570a857488ad4e1baeee Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 24 May 2017 11:25:31 -0700 Subject: [PATCH 1107/2747] Fixes #26886 --- .../editor/contrib/suggest/browser/media/suggest.css | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index fe64def759b94..08b4e45593d89 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -34,12 +34,18 @@ .monaco-editor .suggest-widget.docs-side > .tree, .monaco-editor .suggest-widget.docs-side > .details { - width: 328px; + /* subtract 2px for border, and another 2 for the Chromium zoom issue + where the children get slightly bigger width than what is set + which makes the docs go below the list */ + width: calc(50% - 4px); } .monaco-editor.hc-black .suggest-widget.docs-side > .tree, .monaco-editor.hc-black .suggest-widget.docs-side > .details { - width: 326px; + /* subtract 4px for border, and another 2 for the Chromium zoom issue + where the children get slightly bigger width than what is set + which makes the docs go below the list */ + width: calc(50% - 6px); } /* Styles for Message element for when widget is loading or is empty */ From e4e9bf96216f0166758b7d062a8b9bd99d1a0909 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 24 May 2017 11:39:04 -0700 Subject: [PATCH 1108/2747] Enable needs-more-info bot plugin --- .github/needs_more_info.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/needs_more_info.yml b/.github/needs_more_info.yml index 0e246fd554a86..934e98898d42d 100644 --- a/.github/needs_more_info.yml +++ b/.github/needs_more_info.yml @@ -1,6 +1,6 @@ { daysUntilClose: 7, needsMoreInfoLabel: 'needs more info', - perform: false, + perform: true, closeComment: 'This issue has been closed automatically because it needs more information and has not had recent activity. Please refer to our [guidelines](https://github.com/Microsoft/vscode/blob/master/CONTRIBUTING.md) for filing issues. Thank you for your contributions.' } From 06fdcf1962924c3a6e00f531d8004cdaeb13f5d5 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 24 May 2017 11:56:54 -0700 Subject: [PATCH 1109/2747] Fixes #27169 --- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 168d22bc846b8..56871ef950444 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -599,12 +599,14 @@ export class SuggestWidget implements IContentWidget, IDelegate this.messageElement.textContent = SuggestWidget.LOADING_MESSAGE; hide(this.listElement, this.details.element); show(this.messageElement); + removeClass(this.element, 'docs-side'); this.show(); break; case State.Empty: this.messageElement.textContent = SuggestWidget.NO_SUGGESTIONS_MESSAGE; hide(this.listElement, this.details.element); show(this.messageElement); + removeClass(this.element, 'docs-side'); this.show(); break; case State.Open: From 26aaf73ff9604d3e303c8ef401fe46bb7f463049 Mon Sep 17 00:00:00 2001 From: Amy Qiu Date: Wed, 24 May 2017 12:49:23 -0700 Subject: [PATCH 1110/2747] Add mementos to shutdown --- .../parts/search/browser/searchViewlet.ts | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index deb804b45b1f7..ed2a0c9f95356 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -903,23 +903,10 @@ export class SearchViewlet extends Viewlet { const isCaseSensitive = this.searchWidget.searchInput.getCaseSensitive(); const contentPattern = this.searchWidget.searchInput.getValue(); const patternExcludes = this.inputPatternExclusions.getValue().trim(); - const exclusionsUsePattern = this.inputPatternExclusions.isGlobPattern(); const patternIncludes = this.inputPatternIncludes.getValue().trim(); - const includesUsePattern = this.inputPatternIncludes.isGlobPattern(); const useIgnoreFiles = this.inputPatternExclusions.useIgnoreFiles(); const useExcludeSettings = this.inputPatternExclusions.useExcludeSettings(); - // store memento - this.viewletSettings['query.contentPattern'] = contentPattern; - this.viewletSettings['query.regex'] = isRegex; - this.viewletSettings['query.wholeWords'] = isWholeWords; - this.viewletSettings['query.caseSensitive'] = isCaseSensitive; - this.viewletSettings['query.folderExclusions'] = patternExcludes; - this.viewletSettings['query.exclusionsUsePattern'] = exclusionsUsePattern; - this.viewletSettings['query.folderIncludes'] = patternIncludes; - this.viewletSettings['query.includesUsePattern'] = includesUsePattern; - this.viewletSettings['query.useIgnoreFiles'] = useIgnoreFiles; - if (!rerunQuery) { return; } @@ -1349,7 +1336,27 @@ export class SearchViewlet extends Viewlet { } public shutdown(): void { - this.viewletSettings['query.contentPattern'] = this.searchWidget.searchInput.getValue(); + const isRegex = this.searchWidget.searchInput.getRegex(); + const isWholeWords = this.searchWidget.searchInput.getWholeWords(); + const isCaseSensitive = this.searchWidget.searchInput.getCaseSensitive(); + const contentPattern = this.searchWidget.searchInput.getValue(); + const patternExcludes = this.inputPatternExclusions.getValue().trim(); + const exclusionsUsePattern = this.inputPatternExclusions.isGlobPattern(); + const patternIncludes = this.inputPatternIncludes.getValue().trim(); + const includesUsePattern = this.inputPatternIncludes.isGlobPattern(); + const useIgnoreFiles = this.inputPatternExclusions.useIgnoreFiles(); + + // store memento + this.viewletSettings['query.contentPattern'] = contentPattern; + this.viewletSettings['query.regex'] = isRegex; + this.viewletSettings['query.wholeWords'] = isWholeWords; + this.viewletSettings['query.caseSensitive'] = isCaseSensitive; + this.viewletSettings['query.folderExclusions'] = patternExcludes; + this.viewletSettings['query.exclusionsUsePattern'] = exclusionsUsePattern; + this.viewletSettings['query.folderIncludes'] = patternIncludes; + this.viewletSettings['query.includesUsePattern'] = includesUsePattern; + this.viewletSettings['query.useIgnoreFiles'] = useIgnoreFiles; + this.viewletSettings['query.contentPattern'] = contentPattern; super.shutdown(); } From d3cf7e5fd8cd4db834e1ea19dc0ceee80cded539 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 May 2017 10:50:28 -0700 Subject: [PATCH 1111/2747] Move terminalProcess to node/ Part of #27182 --- .../parts/terminal/electron-browser/terminalInstance.ts | 4 ++-- .../terminal/{electron-browser => node}/terminalProcess.js | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename src/vs/workbench/parts/terminal/{electron-browser => node}/terminalProcess.js (100%) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index fe48ea264ff8a..c7bb9a0713140 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -473,9 +473,9 @@ export class TerminalInstance implements ITerminalInstance { } const env = TerminalInstance.createTerminalEnv(process.env, shell, this._getCwd(shell, workspace), locale, this._cols, this._rows); this._title = shell.name || ''; - this._process = cp.fork('./terminalProcess', [], { + this._process = cp.fork('../node/terminalProcess', [], { env: env, - cwd: URI.parse(path.dirname(require.toUrl('./terminalProcess'))).fsPath + cwd: URI.parse(path.dirname(require.toUrl('../node/terminalProcess'))).fsPath }); if (!shell.name) { // Only listen for process title changes when a name is not provided diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalProcess.js b/src/vs/workbench/parts/terminal/node/terminalProcess.js similarity index 100% rename from src/vs/workbench/parts/terminal/electron-browser/terminalProcess.js rename to src/vs/workbench/parts/terminal/node/terminalProcess.js From e0277260b09596f086158bfe91d942137f700390 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 May 2017 13:34:44 -0700 Subject: [PATCH 1112/2747] Add node-pty typings back --- src/typings/node-pty.d.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/typings/node-pty.d.ts diff --git a/src/typings/node-pty.d.ts b/src/typings/node-pty.d.ts new file mode 100644 index 0000000000000..e09b1eb47e5ac --- /dev/null +++ b/src/typings/node-pty.d.ts @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +declare module 'node-pty' { + export function fork(file: string, args: string[], options: any): Terminal; + export function spawn(file: string, args: string[], options: any): Terminal; + export function createTerminal(file: string, args: string[], options: any): Terminal; + + export interface Terminal { + pid: number; + + /** + * The title of the active process. + */ + process: string; + + on(event: string, callback: (data: any) => void): void; + + resize(columns: number, rows: number): void; + + write(data: string): void; + + kill(): void; + } +} \ No newline at end of file From ed9cdf55b0c9e327ab634cc3e09c97b63671af03 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 May 2017 13:37:43 -0700 Subject: [PATCH 1113/2747] Fork terminalProcess using amd, convert to TS Fixes #27182 --- src/vs/workbench/buildfile.js | 4 ++- .../electron-browser/terminalInstance.ts | 5 +-- ...{terminalProcess.js => terminalProcess.ts} | 35 +++++++++++++------ 3 files changed, 30 insertions(+), 14 deletions(-) rename src/vs/workbench/parts/terminal/node/{terminalProcess.js => terminalProcess.ts} (83%) diff --git a/src/vs/workbench/buildfile.js b/src/vs/workbench/buildfile.js index dfb1ee2b60017..b4102009d69e5 100644 --- a/src/vs/workbench/buildfile.js +++ b/src/vs/workbench/buildfile.js @@ -25,7 +25,9 @@ exports.collectModules = function (excludes) { createModuleDescription('vs/workbench/services/search/node/worker/searchWorkerApp', []), createModuleDescription('vs/workbench/services/files/node/watcher/unix/watcherApp', []), - createModuleDescription('vs/workbench/node/extensionHostProcess', []) + createModuleDescription('vs/workbench/node/extensionHostProcess', []), + + createModuleDescription('vs/workbench/parts/terminal/node/terminalProcess', []) ]; return modules; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index c7bb9a0713140..07f8b6b53cb4a 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -473,8 +473,8 @@ export class TerminalInstance implements ITerminalInstance { } const env = TerminalInstance.createTerminalEnv(process.env, shell, this._getCwd(shell, workspace), locale, this._cols, this._rows); this._title = shell.name || ''; - this._process = cp.fork('../node/terminalProcess', [], { - env: env, + this._process = cp.fork(URI.parse(require.toUrl('bootstrap')).fsPath, ['--type=terminal'], { + env, cwd: URI.parse(path.dirname(require.toUrl('../node/terminalProcess'))).fsPath }); if (!shell.name) { @@ -622,6 +622,7 @@ export class TerminalInstance implements ITerminalInstance { env['PTYCOLS'] = cols.toString(); env['PTYROWS'] = rows.toString(); } + env['AMD_ENTRYPOINT'] = 'vs/workbench/parts/terminal/node/terminalProcess'; return env; } diff --git a/src/vs/workbench/parts/terminal/node/terminalProcess.js b/src/vs/workbench/parts/terminal/node/terminalProcess.ts similarity index 83% rename from src/vs/workbench/parts/terminal/node/terminalProcess.js rename to src/vs/workbench/parts/terminal/node/terminalProcess.ts index 8cfea5673f1d7..12642b21a411d 100644 --- a/src/vs/workbench/parts/terminal/node/terminalProcess.js +++ b/src/vs/workbench/parts/terminal/node/terminalProcess.ts @@ -3,21 +3,23 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -var fs = require('fs'); -var os = require('os'); -var path = require('path'); -var ptyJs = require('node-pty'); +import * as fs from 'fs'; +fs.writeFileSync('/home/daniel/testing-terminal-1', 'foo'); +import * as os from 'os'; +import * as path from 'path'; +import * as ptyJs from 'node-pty'; + +fs.writeFileSync('/home/daniel/testing-terminal-2', 'foo'); // The pty process needs to be run in its own child process to get around maxing out CPU on Mac, // see https://github.com/electron/electron/issues/38 - -var name; +var shellName: string; if (os.platform() === 'win32') { - name = path.basename(process.env.PTYSHELL); + shellName = path.basename(process.env.PTYSHELL); } else { // Using 'xterm-256color' here helps ensure that the majority of Linux distributions will use a // color prompt as defined in the default ~/.bashrc file. - name = 'xterm-256color'; + shellName = 'xterm-256color'; } var shell = process.env.PTYSHELL; var args = getArgs(); @@ -29,16 +31,26 @@ var currentTitle = ''; setupPlanB(process.env.PTYPID); cleanEnv(); -var options = { - name: name, - cwd: cwd +interface IOptions { + name: string; + cwd: string; + cols?: number; + rows?: number; +} + +var options: IOptions = { + name: shellName, + cwd }; if (cols && rows) { options.cols = parseInt(cols, 10); options.rows = parseInt(rows, 10); } +fs.writeFileSync('/home/daniel/testing-terminal-3', 'foo'); var ptyProcess = ptyJs.fork(shell, args, options); + +fs.writeFileSync('/home/daniel/testing-terminal-4', 'foo'); var closeTimeout; var exitCode; @@ -93,6 +105,7 @@ function getArgs() { function cleanEnv() { var keys = [ + 'AMD_ENTRYPOINT', 'ELECTRON_RUN_AS_NODE', 'PTYCWD', 'PTYPID', From 8178df7a1f82013ba0b61d9bfd5cf5686e918435 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 24 May 2017 13:39:32 -0700 Subject: [PATCH 1114/2747] Fix ts/js code lens for trailing special character. Fixes #27211 --- extensions/typescript/src/features/baseCodeLensProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/typescript/src/features/baseCodeLensProvider.ts b/extensions/typescript/src/features/baseCodeLensProvider.ts index 9d2c4bfb768f5..98e4de9cc1c2d 100644 --- a/extensions/typescript/src/features/baseCodeLensProvider.ts +++ b/extensions/typescript/src/features/baseCodeLensProvider.ts @@ -108,7 +108,7 @@ export abstract class TypeScriptBaseCodeLensProvider implements CodeLensProvider const text = document.getText(range); - const identifierMatch = new RegExp(`^(.*?(\\b|\\W))${(item.text || '').replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')}\\b`, 'gm'); + const identifierMatch = new RegExp(`^(.*?(\\b|\\W))${(item.text || '').replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')}(\\b|\\W)`, 'gm'); const match = identifierMatch.exec(text); const prefixLength = match ? match.index + match[1].length : 0; const startOffset = document.offsetAt(new Position(range.start.line, range.start.character)) + prefixLength; From 84f154b7945b0430ea2ae68e844b554b8df16383 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 24 May 2017 13:54:05 -0700 Subject: [PATCH 1115/2747] Fix 27195 Make sure we handle the case of `/**/` properly in json files --- extensions/json/syntaxes/JSON.tmLanguage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/json/syntaxes/JSON.tmLanguage b/extensions/json/syntaxes/JSON.tmLanguage index 9d6a24cc16a59..507eb03ec93f2 100644 --- a/extensions/json/syntaxes/JSON.tmLanguage +++ b/extensions/json/syntaxes/JSON.tmLanguage @@ -98,7 +98,7 @@ begin - /\*\* + /\*\*(?!/) captures 0 From b14bde0c6aaa8ccf3f925542f3a18d55c5a9e3df Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 May 2017 13:55:34 -0700 Subject: [PATCH 1116/2747] Remove debug logs --- src/vs/workbench/parts/terminal/node/terminalProcess.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/vs/workbench/parts/terminal/node/terminalProcess.ts b/src/vs/workbench/parts/terminal/node/terminalProcess.ts index 12642b21a411d..3a2b00a4a7031 100644 --- a/src/vs/workbench/parts/terminal/node/terminalProcess.ts +++ b/src/vs/workbench/parts/terminal/node/terminalProcess.ts @@ -3,14 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as fs from 'fs'; -fs.writeFileSync('/home/daniel/testing-terminal-1', 'foo'); - import * as os from 'os'; import * as path from 'path'; import * as ptyJs from 'node-pty'; -fs.writeFileSync('/home/daniel/testing-terminal-2', 'foo'); // The pty process needs to be run in its own child process to get around maxing out CPU on Mac, // see https://github.com/electron/electron/issues/38 var shellName: string; @@ -47,10 +43,8 @@ if (cols && rows) { options.rows = parseInt(rows, 10); } -fs.writeFileSync('/home/daniel/testing-terminal-3', 'foo'); var ptyProcess = ptyJs.fork(shell, args, options); -fs.writeFileSync('/home/daniel/testing-terminal-4', 'foo'); var closeTimeout; var exitCode; From 64e1c20856ca08c8b754d0675692e70c7ea2edf0 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 23 May 2017 21:00:41 +0200 Subject: [PATCH 1117/2747] Kimbie builtin theme has dark curly braces. Fixes #27121 --- .../theme-kimbie-dark/themes/kimbie-dark-color-theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json index 2d5e0fadb3194..7de6b3fd42e6b 100644 --- a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json +++ b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json @@ -369,7 +369,7 @@ "variable.interpolation" ], "settings": { - "foreground": "#18401e" + "foreground": "#088649" } }, { From e1e5bf41b35614c0c536878db951af70eb9c7d56 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 24 May 2017 22:56:13 +0200 Subject: [PATCH 1118/2747] Allow decorations to use theme colors. For #26974 --- src/vs/base/browser/dom.ts | 5 +- .../browser/services/codeEditorServiceImpl.ts | 480 +++++++++--------- .../browser/standalone/standaloneServices.ts | 5 +- .../overviewRuler/decorationsOverviewRuler.ts | 15 +- src/vs/editor/common/editorCommon.ts | 38 +- .../common/model/textModelWithDecorations.ts | 6 +- .../services/decorationRenderOptions.test.ts | 84 ++- src/vs/monaco.d.ts | 16 +- src/vs/platform/theme/common/themeService.ts | 6 +- src/vs/vscode.d.ts | 32 +- src/vs/workbench/api/node/extHost.api.impl.ts | 1 + src/vs/workbench/api/node/extHostTypes.ts | 7 + .../workbench/test/workbenchTestServices.ts | 36 +- 13 files changed, 442 insertions(+), 289 deletions(-) diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts index 21698e938db4a..228550b57afe7 100644 --- a/src/vs/base/browser/dom.ts +++ b/src/vs/base/browser/dom.ts @@ -710,7 +710,7 @@ export function createCSSRule(selector: string, cssText: string, style: HTMLStyl return; } - (style.sheet).insertRule(selector + '{' + cssText + '}', 0); + (style.sheet).insertRule(selector + '{' + cssText + '}', 0); } export function getCSSRule(selector: string, style: HTMLStyleElement = sharedStyle): any { @@ -739,8 +739,7 @@ export function removeCSSRulesContainingSelector(ruleName: string, style = share let toDelete: number[] = []; for (let i = 0; i < rules.length; i++) { let rule = rules[i]; - let normalizedSelectorText = rule.selectorText.replace(/::/gi, ':'); - if (normalizedSelectorText.indexOf(ruleName) !== -1) { + if (rule.selectorText.indexOf(ruleName) !== -1) { toDelete.push(i); } } diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index fa45f009cf8d9..703e6e4f0eec0 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -4,36 +4,43 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import * as objects from 'vs/base/common/objects'; -import { parse, stringify } from 'vs/base/common/marshalling'; import * as strings from 'vs/base/common/strings'; import URI from 'vs/base/common/uri'; import * as dom from 'vs/base/browser/dom'; import { IDecorationRenderOptions, IModelDecorationOptions, IModelDecorationOverviewRulerOptions, IThemeDecorationRenderOptions, - IContentDecorationRenderOptions, OverviewRulerLane, TrackedRangeStickiness + IContentDecorationRenderOptions, OverviewRulerLane, TrackedRangeStickiness, ThemeColor, isThemeColor } from 'vs/editor/common/editorCommon'; import { AbstractCodeEditorService } from 'vs/editor/common/services/abstractCodeEditorService'; -import { IDisposable, toDisposable } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose as disposeAll } from 'vs/base/common/lifecycle'; +import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; export class CodeEditorServiceImpl extends AbstractCodeEditorService { private _styleSheet: HTMLStyleElement; private _decorationOptionProviders: { [key: string]: IModelDecorationOptionsProvider }; + private _themeService: IThemeService; - constructor(styleSheet = dom.createStyleSheet()) { + constructor( @IThemeService themeService: IThemeService, styleSheet = dom.createStyleSheet()) { super(); this._styleSheet = styleSheet; this._decorationOptionProviders = Object.create(null); + this._themeService = themeService; } public registerDecorationType(key: string, options: IDecorationRenderOptions, parentTypeKey?: string): void { let provider = this._decorationOptionProviders[key]; if (!provider) { + let providerArgs: ProviderArguments = { + styleSheet: this._styleSheet, + key: key, + parentTypeKey: parentTypeKey, + options: options + }; if (!parentTypeKey) { - provider = new DecorationTypeOptionsProvider(this._styleSheet, key, options); + provider = new DecorationTypeOptionsProvider(this._themeService, providerArgs); } else { - provider = new DecorationSubTypeOptionsProvider(this._styleSheet, key, parentTypeKey, options); + provider = new DecorationSubTypeOptionsProvider(this._themeService, providerArgs); } this._decorationOptionProviders[key] = provider; } @@ -71,67 +78,52 @@ class DecorationSubTypeOptionsProvider implements IModelDecorationOptionsProvide public refCount: number; - private _disposable: IDisposable; private _parentTypeKey: string; - private _beforeContentClassName: string; - private _afterContentClassName: string; + private _beforeContentRules: DecorationCSSRules; + private _afterContentRules: DecorationCSSRules; - constructor(styleSheet: HTMLStyleElement, key: string, parentTypeKey: string, options: IDecorationRenderOptions) { - this._parentTypeKey = parentTypeKey; + constructor(themeService: IThemeService, providerArgs: ProviderArguments) { + this._parentTypeKey = providerArgs.parentTypeKey; this.refCount = 0; - let themedOpts = getThemedRenderOptions(options); - - this._beforeContentClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - parentTypeKey, - ModelDecorationCSSRuleType.BeforeContentClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.light.before), - dark: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.dark.before) - } - ); - - this._afterContentClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - parentTypeKey, - ModelDecorationCSSRuleType.AfterContentClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.light.after), - dark: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.dark.after) - } - ); - if (this._beforeContentClassName || this._afterContentClassName) { - this._disposable = toDisposable(() => { - dom.removeCSSRulesContainingSelector(CSSNameHelper.getDeletionSubstring(key), styleSheet); - }); - } + this._beforeContentRules = new DecorationCSSRules(ModelDecorationCSSRuleType.BeforeContentClassName, providerArgs, themeService); + this._afterContentRules = new DecorationCSSRules(ModelDecorationCSSRuleType.AfterContentClassName, providerArgs, themeService); } public getOptions(codeEditorService: AbstractCodeEditorService, writable: boolean): IModelDecorationOptions { let options = codeEditorService.resolveDecorationOptions(this._parentTypeKey, true); - if (this._beforeContentClassName) { - options.beforeContentClassName = this._beforeContentClassName; + if (this._beforeContentRules) { + options.beforeContentClassName = this._beforeContentRules.className; } - if (this._afterContentClassName) { - options.afterContentClassName = this._afterContentClassName; + if (this._afterContentRules) { + options.afterContentClassName = this._afterContentRules.className; } return options; } public dispose(): void { - if (this._disposable) { - this._disposable.dispose(); - delete this._disposable; + if (this._beforeContentRules) { + this._beforeContentRules.dispose(); + this._beforeContentRules = null; + } + if (this._afterContentRules) { + this._afterContentRules.dispose(); + this._afterContentRules = null; } } } +interface ProviderArguments { + styleSheet: HTMLStyleElement; + key: string; + parentTypeKey?: string; + options: IDecorationRenderOptions; +} + + class DecorationTypeOptionsProvider implements IModelDecorationOptionsProvider { - private _disposable: IDisposable; + private _disposables: IDisposable[]; public refCount: number; public className: string; @@ -143,82 +135,40 @@ class DecorationTypeOptionsProvider implements IModelDecorationOptionsProvider { public overviewRuler: IModelDecorationOverviewRulerOptions; public stickiness: TrackedRangeStickiness; - constructor(styleSheet: HTMLStyleElement, key: string, options: IDecorationRenderOptions) { + constructor(themeService: IThemeService, providerArgs: ProviderArguments) { this.refCount = 0; + this._disposables = []; - let themedOpts = getThemedRenderOptions(options); - - this.className = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - null, - ModelDecorationCSSRuleType.ClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationClassName(themedOpts.light), - dark: DecorationRenderHelper.getCSSTextForModelDecorationClassName(themedOpts.dark) - } - ); - - this.inlineClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - null, - ModelDecorationCSSRuleType.InlineClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationInlineClassName(themedOpts.light), - dark: DecorationRenderHelper.getCSSTextForModelDecorationInlineClassName(themedOpts.dark) - } - ); - - this.beforeContentClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - null, - ModelDecorationCSSRuleType.BeforeContentClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.light.before), - dark: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.dark.before) - } - ); - - this.afterContentClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - null, - ModelDecorationCSSRuleType.AfterContentClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.light.after), - dark: DecorationRenderHelper.getCSSTextForModelDecorationContentClassName(themedOpts.dark.after) - } - ); - - this.glyphMarginClassName = DecorationRenderHelper.createCSSRules( - styleSheet, - key, - null, - ModelDecorationCSSRuleType.GlyphMarginClassName, - { - light: DecorationRenderHelper.getCSSTextForModelDecorationGlyphMarginClassName(themedOpts.light), - dark: DecorationRenderHelper.getCSSTextForModelDecorationGlyphMarginClassName(themedOpts.dark) + let createCSSRules = (type: ModelDecorationCSSRuleType) => { + let rules = new DecorationCSSRules(type, providerArgs, themeService); + if (rules.hasContent) { + this._disposables.push(rules); + return rules.className; } - ); + return void 0; + }; + + this.className = createCSSRules(ModelDecorationCSSRuleType.ClassName); + this.inlineClassName = createCSSRules(ModelDecorationCSSRuleType.InlineClassName); + this.beforeContentClassName = createCSSRules(ModelDecorationCSSRuleType.BeforeContentClassName); + this.beforeContentClassName = createCSSRules(ModelDecorationCSSRuleType.AfterContentClassName); + this.glyphMarginClassName = createCSSRules(ModelDecorationCSSRuleType.GlyphMarginClassName); + let options = providerArgs.options; this.isWholeLine = Boolean(options.isWholeLine); + let lightOverviewRulerColor = options.light && options.light.overviewRulerColor || options.overviewRulerColor; + let darkOverviewRulerColor = options.dark && options.dark.overviewRulerColor || options.overviewRulerColor; if ( - typeof themedOpts.light.overviewRulerColor !== 'undefined' - || typeof themedOpts.dark.overviewRulerColor !== 'undefined' + typeof lightOverviewRulerColor !== 'undefined' + || typeof darkOverviewRulerColor !== 'undefined' ) { this.overviewRuler = { - color: themedOpts.light.overviewRulerColor || themedOpts.dark.overviewRulerColor, - darkColor: themedOpts.dark.overviewRulerColor || themedOpts.light.overviewRulerColor, + color: lightOverviewRulerColor || darkOverviewRulerColor, + darkColor: darkOverviewRulerColor || lightOverviewRulerColor, position: options.overviewRulerLane || OverviewRulerLane.Center }; } - - this._disposable = toDisposable(() => { - dom.removeCSSRulesContainingSelector(CSSNameHelper.getDeletionSubstring(key), styleSheet); - }); } public getOptions(codeEditorService: AbstractCodeEditorService, writable: boolean): IModelDecorationOptions { @@ -238,51 +188,162 @@ class DecorationTypeOptionsProvider implements IModelDecorationOptionsProvider { } public dispose(): void { - if (this._disposable) { - this._disposable.dispose(); - delete this._disposable; - } + this._disposables = disposeAll(this._disposables); } } -class DecorationRenderHelper { - private static _CSS_MAP = { - color: 'color:{0} !important;', - backgroundColor: 'background-color:{0};', - - outline: 'outline:{0};', - outlineColor: 'outline-color:{0};', - outlineStyle: 'outline-style:{0};', - outlineWidth: 'outline-width:{0};', - - border: 'border:{0};', - borderColor: 'border-color:{0};', - borderRadius: 'border-radius:{0};', - borderSpacing: 'border-spacing:{0};', - borderStyle: 'border-style:{0};', - borderWidth: 'border-width:{0};', - - textDecoration: 'text-decoration:{0};', - cursor: 'cursor:{0};', - letterSpacing: 'letter-spacing:{0};', - - gutterIconPath: 'background:url(\'{0}\') center center no-repeat;', - gutterIconSize: 'background-size:{0};', - - contentText: 'content:\'{0}\';', - contentIconPath: 'content:url(\'{0}\');', - margin: 'margin:{0};', - width: 'width:{0};', - height: 'height:{0};' - }; + +const _CSS_MAP = { + color: 'color:{0} !important;', + backgroundColor: 'background-color:{0};', + + outline: 'outline:{0};', + outlineColor: 'outline-color:{0};', + outlineStyle: 'outline-style:{0};', + outlineWidth: 'outline-width:{0};', + + border: 'border:{0};', + borderColor: 'border-color:{0};', + borderRadius: 'border-radius:{0};', + borderSpacing: 'border-spacing:{0};', + borderStyle: 'border-style:{0};', + borderWidth: 'border-width:{0};', + + textDecoration: 'text-decoration:{0};', + cursor: 'cursor:{0};', + letterSpacing: 'letter-spacing:{0};', + + gutterIconPath: 'background:url(\'{0}\') center center no-repeat;', + gutterIconSize: 'background-size:{0};', + + contentText: 'content:\'{0}\';', + contentIconPath: 'content:url(\'{0}\');', + margin: 'margin:{0};', + width: 'width:{0};', + height: 'height:{0};' +}; + + +class DecorationCSSRules { + + private _theme: ITheme; + private _className: string; + private _unThemedSelector: string; + private _hasContent: boolean; + private _ruleType: ModelDecorationCSSRuleType; + private _themeListener: IDisposable; + private _providerArgs: ProviderArguments; + private _usesThemeColors: boolean; + + public constructor(ruleType: ModelDecorationCSSRuleType, providerArgs: ProviderArguments, themeService: IThemeService) { + this._theme = themeService.getTheme(); + this._ruleType = ruleType; + this._providerArgs = providerArgs; + this._usesThemeColors = false; + this._hasContent = false; + + let className = CSSNameHelper.getClassName(this._providerArgs.key, ruleType); + if (this._providerArgs.parentTypeKey) { + className = className + ' ' + CSSNameHelper.getClassName(this._providerArgs.parentTypeKey, ruleType); + } + this._className = className; + + this._unThemedSelector = CSSNameHelper.getSelector(this._providerArgs.key, this._providerArgs.parentTypeKey, ruleType); + + this._buildCSS(); + + if (this._usesThemeColors) { + this._themeListener = themeService.onThemeChange(theme => { + this._theme = themeService.getTheme(); + this._removeCSS(); + this._buildCSS(); + }); + } + } + + public dispose() { + if (this._hasContent) { + this._removeCSS(); + this._hasContent = false; + } + if (this._themeListener) { + this._themeListener.dispose(); + this._themeListener = null; + } + } + + public get hasContent(): boolean { + return this._hasContent; + } + + public get className(): string { + return this._className; + } + + private _buildCSS(): void { + let options = this._providerArgs.options; + let unthemedCSS, lightCSS, darkCSS: string; + switch (this._ruleType) { + case ModelDecorationCSSRuleType.ClassName: + unthemedCSS = this.getCSSTextForModelDecorationClassName(options); + lightCSS = this.getCSSTextForModelDecorationClassName(options.light); + darkCSS = this.getCSSTextForModelDecorationClassName(options.dark); + break; + case ModelDecorationCSSRuleType.InlineClassName: + unthemedCSS = this.getCSSTextForModelDecorationInlineClassName(options); + lightCSS = this.getCSSTextForModelDecorationInlineClassName(options.light); + darkCSS = this.getCSSTextForModelDecorationInlineClassName(options.dark); + break; + case ModelDecorationCSSRuleType.GlyphMarginClassName: + unthemedCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options); + lightCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options.light); + darkCSS = this.getCSSTextForModelDecorationGlyphMarginClassName(options.dark); + break; + case ModelDecorationCSSRuleType.BeforeContentClassName: + unthemedCSS = this.getCSSTextForModelDecorationContentClassName(options.before); + lightCSS = this.getCSSTextForModelDecorationContentClassName(options.light && options.light.before); + darkCSS = this.getCSSTextForModelDecorationContentClassName(options.dark && options.dark.before); + break; + case ModelDecorationCSSRuleType.AfterContentClassName: + unthemedCSS = this.getCSSTextForModelDecorationContentClassName(options.after); + lightCSS = this.getCSSTextForModelDecorationContentClassName(options.light && options.light.after); + darkCSS = this.getCSSTextForModelDecorationContentClassName(options.dark && options.dark.after); + break; + default: + throw new Error('Unknown rule type: ' + this._ruleType); + } + let sheet = this._providerArgs.styleSheet.sheet; + + let hasContent = false; + if (unthemedCSS.length > 0) { + sheet.insertRule(`${this._unThemedSelector} {${unthemedCSS}}`); + hasContent = true; + } + if (lightCSS.length > 0) { + sheet.insertRule(`.vs${this._unThemedSelector} {${lightCSS}}`); + hasContent = true; + } + if (darkCSS.length > 0) { + sheet.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${darkCSS}}`); + hasContent = true; + } + this._hasContent = hasContent; + } + + private _removeCSS(): void { + dom.removeCSSRulesContainingSelector(this._unThemedSelector, this._providerArgs.styleSheet); + } /** * Build the CSS for decorations styled via `className`. */ - public static getCSSTextForModelDecorationClassName(opts: IThemeDecorationRenderOptions): string { + private getCSSTextForModelDecorationClassName(opts: IThemeDecorationRenderOptions): string { + if (!opts) { + return ''; + } let cssTextArr: string[] = []; - DecorationRenderHelper.collectCSSText(opts, ['backgroundColor', 'outline', 'outlineColor', 'outlineStyle', 'outlineWidth'], cssTextArr); - DecorationRenderHelper.collectBorderSettingsCSSText(opts, cssTextArr); + this.collectCSSText(opts, ['backgroundColor', 'outline', 'outlineColor', 'outlineStyle', 'outlineWidth'], cssTextArr); + this.collectBorderSettingsCSSText(opts, cssTextArr); return cssTextArr.join(''); } @@ -290,33 +351,39 @@ class DecorationRenderHelper { /** * Build the CSS for decorations styled via `inlineClassName`. */ - public static getCSSTextForModelDecorationInlineClassName(opts: IThemeDecorationRenderOptions): string { + private getCSSTextForModelDecorationInlineClassName(opts: IThemeDecorationRenderOptions): string { + if (!opts) { + return ''; + } let cssTextArr: string[] = []; - DecorationRenderHelper.collectCSSText(opts, ['textDecoration', 'cursor', 'color', 'letterSpacing'], cssTextArr); + this.collectCSSText(opts, ['textDecoration', 'cursor', 'color', 'letterSpacing'], cssTextArr); return cssTextArr.join(''); } /** * Build the CSS for decorations styled before or after content. */ - public static getCSSTextForModelDecorationContentClassName(opts: IContentDecorationRenderOptions): string { + private getCSSTextForModelDecorationContentClassName(opts: IContentDecorationRenderOptions): string { + if (!opts) { + return ''; + } let cssTextArr: string[] = []; if (typeof opts !== 'undefined') { - DecorationRenderHelper.collectBorderSettingsCSSText(opts, cssTextArr); + this.collectBorderSettingsCSSText(opts, cssTextArr); if (typeof opts.contentIconPath === 'string') { - cssTextArr.push(strings.format(this._CSS_MAP.contentIconPath, URI.file(opts.contentIconPath).toString().replace(/'/g, '%27'))); + cssTextArr.push(strings.format(_CSS_MAP.contentIconPath, URI.file(opts.contentIconPath).toString().replace(/'/g, '%27'))); } else if (opts.contentIconPath instanceof URI) { - cssTextArr.push(strings.format(this._CSS_MAP.contentIconPath, opts.contentIconPath.toString(true).replace(/'/g, '%27'))); + cssTextArr.push(strings.format(_CSS_MAP.contentIconPath, opts.contentIconPath.toString(true).replace(/'/g, '%27'))); } if (typeof opts.contentText === 'string') { const truncated = opts.contentText.match(/^.*$/m)[0]; // only take first line const escaped = truncated.replace(/['\\]/g, '\\$&'); - cssTextArr.push(strings.format(this._CSS_MAP.contentText, escaped)); + cssTextArr.push(strings.format(_CSS_MAP.contentText, escaped)); } - DecorationRenderHelper.collectCSSText(opts, ['textDecoration', 'color', 'backgroundColor', 'margin'], cssTextArr); - if (DecorationRenderHelper.collectCSSText(opts, ['width', 'height'], cssTextArr)) { + this.collectCSSText(opts, ['textDecoration', 'color', 'backgroundColor', 'margin'], cssTextArr); + if (this.collectCSSText(opts, ['width', 'height'], cssTextArr)) { cssTextArr.push('display:inline-block;'); } } @@ -327,17 +394,20 @@ class DecorationRenderHelper { /** * Build the CSS for decorations styled via `glpyhMarginClassName`. */ - public static getCSSTextForModelDecorationGlyphMarginClassName(opts: IThemeDecorationRenderOptions): string { + private getCSSTextForModelDecorationGlyphMarginClassName(opts: IThemeDecorationRenderOptions): string { + if (!opts) { + return ''; + } let cssTextArr = []; if (typeof opts.gutterIconPath !== 'undefined') { if (typeof opts.gutterIconPath === 'string') { - cssTextArr.push(strings.format(this._CSS_MAP.gutterIconPath, URI.file(opts.gutterIconPath).toString())); + cssTextArr.push(strings.format(_CSS_MAP.gutterIconPath, URI.file(opts.gutterIconPath).toString())); } else { - cssTextArr.push(strings.format(this._CSS_MAP.gutterIconPath, opts.gutterIconPath.toString(true).replace(/'/g, '%27'))); + cssTextArr.push(strings.format(_CSS_MAP.gutterIconPath, opts.gutterIconPath.toString(true).replace(/'/g, '%27'))); } if (typeof opts.gutterIconSize !== 'undefined') { - cssTextArr.push(strings.format(this._CSS_MAP.gutterIconSize, opts.gutterIconSize)); + cssTextArr.push(strings.format(_CSS_MAP.gutterIconSize, opts.gutterIconSize)); } } @@ -346,59 +416,38 @@ class DecorationRenderHelper { private static border_rules = ['border', 'borderRadius', 'borderColor', 'borderSpacing', 'borderStyle', 'borderWidth']; - public static collectBorderSettingsCSSText(opts: any, cssTextArr: string[]): boolean { - if (DecorationRenderHelper.collectCSSText(opts, DecorationRenderHelper.border_rules, cssTextArr)) { + private collectBorderSettingsCSSText(opts: any, cssTextArr: string[]): boolean { + if (this.collectCSSText(opts, DecorationCSSRules.border_rules, cssTextArr)) { cssTextArr.push(strings.format('box-sizing: border-box;')); return true; } return false; } - private static collectCSSText(opts: any, properties: string[], cssTextArr: string[]): boolean { + private collectCSSText(opts: any, properties: string[], cssTextArr: string[]): boolean { let lenBefore = cssTextArr.length; for (let property of properties) { - if (typeof opts[property] !== 'undefined') { - cssTextArr.push(strings.format(this._CSS_MAP[property], opts[property])); + let value = this.resolveValue(opts[property]); + if (typeof value === 'string') { + cssTextArr.push(strings.format(_CSS_MAP[property], value)); } } return cssTextArr.length !== lenBefore; } - /** - * Create CSS rules for `cssTexts` with the generated class names from `ruleType` - */ - public static createCSSRules(styleSheet: HTMLStyleElement, key: string, parentKey: string, ruleType: ModelDecorationCSSRuleType, cssTexts: { light: string, dark: string }): string { - function createCSSSelector(themeType: ThemeType, cssText: string) { - let selector = CSSNameHelper.getSelector(themeType, key, parentKey, ruleType); - dom.createCSSRule(selector, cssText, styleSheet); - } - - let hasContent = false; - if (cssTexts.light.length > 0) { - createCSSSelector(ThemeType.Light, cssTexts.light); - hasContent = true; - } - if (cssTexts.dark.length > 0) { - createCSSSelector(ThemeType.Dark, cssTexts.dark); - createCSSSelector(ThemeType.HighContrastBlack, cssTexts.dark); - hasContent = true; - } - if (hasContent) { - let className = CSSNameHelper.getClassName(key, ruleType); - if (parentKey) { - className = className + ' ' + CSSNameHelper.getClassName(parentKey, ruleType); + private resolveValue(value: string | ThemeColor): string { + if (isThemeColor(value)) { + this._usesThemeColors = true; + let color = this._theme.getColor(value.id); + if (color) { + return color.toString(); } - return className; + return void 0; } - return void 0; + return value; } } -const enum ThemeType { - Light = 0, - Dark = 1, - HighContrastBlack = 2 -} const enum ModelDecorationCSSRuleType { ClassName = 0, InlineClassName = 1, @@ -409,22 +458,12 @@ const enum ModelDecorationCSSRuleType { class CSSNameHelper { - private static _getSelectorPrefixOf(theme: ThemeType): string { - if (theme === ThemeType.Light) { - return '.monaco-editor.vs'; - } - if (theme === ThemeType.Dark) { - return '.monaco-editor.vs-dark'; - } - return '.monaco-editor.hc-black'; - } - public static getClassName(key: string, type: ModelDecorationCSSRuleType): string { return 'ced-' + key + '-' + type; } - public static getSelector(themeType: ThemeType, key: string, parentKey: string, ruleType: ModelDecorationCSSRuleType): string { - let selector = this._getSelectorPrefixOf(themeType) + ' .' + this.getClassName(key, ruleType); + public static getSelector(key: string, parentKey: string, ruleType: ModelDecorationCSSRuleType): string { + let selector = '.monaco-editor .' + this.getClassName(key, ruleType); if (parentKey) { selector = selector + '.' + this.getClassName(parentKey, ruleType); } @@ -435,27 +474,4 @@ class CSSNameHelper { } return selector; } - - public static getDeletionSubstring(key: string): string { - return '.ced-' + key + '-'; - } -} - -// ---- Normalize decoration render options per theme -function getThemedRenderOptions(opts: { light?: T, dark?: T }): { light?: T, dark?: T } { - // TODO@alex,joh - not really how/what deep clone is being used - // for here but it will break the URI TODO@martin - - // let light = objects.deepClone(opts); - let light = parse(stringify(opts)); - objects.mixin(light, opts.light); - - // let dark = objects.deepClone(opts); - let dark = parse(stringify(opts)); - objects.mixin(dark, opts.dark); - - return { - light: light, - dark: dark - }; } diff --git a/src/vs/editor/browser/standalone/standaloneServices.ts b/src/vs/editor/browser/standalone/standaloneServices.ts index 1ce2c0d30b34f..550b5294605dd 100644 --- a/src/vs/editor/browser/standalone/standaloneServices.ts +++ b/src/vs/editor/browser/standalone/standaloneServices.ts @@ -133,13 +133,14 @@ export module StaticServices { export const editorWorkerService = define(IEditorWorkerService, (o) => new EditorWorkerServiceImpl(modelService.get(o), configurationService.get(o), modeService.get(o))); - export const codeEditorService = define(ICodeEditorService, () => new CodeEditorServiceImpl()); + export const standaloneThemeService = define(IStandaloneThemeService, () => new StandaloneThemeServiceImpl()); + + export const codeEditorService = define(ICodeEditorService, (o) => new CodeEditorServiceImpl(standaloneThemeService.get(o))); export const progressService = define(IProgressService, () => new SimpleProgressService()); export const storageService = define(IStorageService, () => NullStorageService); - export const standaloneThemeService = define(IStandaloneThemeService, () => new StandaloneThemeServiceImpl()); } export class DynamicStandaloneServices extends Disposable { diff --git a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts index 6f9f3e03b553f..46c6d71d94139 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts @@ -15,6 +15,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; import { editorOverviewRulerBorder, editorCursor } from 'vs/editor/common/view/editorColorRegistry'; +import { Color } from 'vs/base/common/color'; export class DecorationsOverviewRuler extends ViewPart { @@ -186,15 +187,23 @@ export class DecorationsOverviewRuler extends ViewPart { dec.range.endLineNumber, overviewRuler.position, 0, - overviewRuler.color, - overviewRuler.darkColor, - overviewRuler.hcColor + this.resolveRulerColor(overviewRuler.color), + this.resolveRulerColor(overviewRuler.darkColor), + this.resolveRulerColor(overviewRuler.hcColor) )); } return zones; } + private resolveRulerColor(color: string | editorCommon.ThemeColor): string { + if (editorCommon.isThemeColor(color)) { + let c = this._context.theme.getColor(color.id) || Color.transparent; + return c.toString(); + } + return color; + } + private _createZonesFromCursors(): OverviewRulerZone[] { let zones: OverviewRulerZone[] = []; diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index 9a0674a5f28ef..058ea7e36532c 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -41,19 +41,19 @@ export enum OverviewRulerLane { export interface IModelDecorationOverviewRulerOptions { /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - color: string; + color: string | ThemeColor; /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - darkColor: string; + darkColor: string | ThemeColor; /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - hcColor?: string; + hcColor?: string | ThemeColor; /** * The position in the overview ruler. */ @@ -1621,19 +1621,30 @@ export interface IEditorContribution { restoreViewState?(state: any): void; } +export interface ThemeColor { + id: string; +} + +/** + * @internal + */ +export function isThemeColor(o): o is ThemeColor { + return o && typeof o.id === 'string'; +} + /** * @internal */ export interface IThemeDecorationRenderOptions { - backgroundColor?: string; + backgroundColor?: string | ThemeColor; outline?: string; - outlineColor?: string; + outlineColor?: string | ThemeColor; outlineStyle?: string; outlineWidth?: string; border?: string; - borderColor?: string; + borderColor?: string | ThemeColor; borderRadius?: string; borderSpacing?: string; borderStyle?: string; @@ -1641,13 +1652,13 @@ export interface IThemeDecorationRenderOptions { textDecoration?: string; cursor?: string; - color?: string; + color?: string | ThemeColor; letterSpacing?: string; gutterIconPath?: string | URI; gutterIconSize?: string; - overviewRulerColor?: string; + overviewRulerColor?: string | ThemeColor; before?: IContentDecorationRenderOptions; after?: IContentDecorationRenderOptions; @@ -1661,9 +1672,10 @@ export interface IContentDecorationRenderOptions { contentIconPath?: string | URI; border?: string; + borderColor?: string | ThemeColor; textDecoration?: string; - color?: string; - backgroundColor?: string; + color?: string | ThemeColor; + backgroundColor?: string | ThemeColor; margin?: string; width?: string; diff --git a/src/vs/editor/common/model/textModelWithDecorations.ts b/src/vs/editor/common/model/textModelWithDecorations.ts index 3e36eeedda62a..84380b69ef3b3 100644 --- a/src/vs/editor/common/model/textModelWithDecorations.ts +++ b/src/vs/editor/common/model/textModelWithDecorations.ts @@ -840,9 +840,9 @@ function cleanClassName(className: string): string { } export class ModelDecorationOverviewRulerOptions implements editorCommon.IModelDecorationOverviewRulerOptions { - readonly color: string; - readonly darkColor: string; - readonly hcColor: string; + readonly color: string | editorCommon.ThemeColor; + readonly darkColor: string | editorCommon.ThemeColor; + readonly hcColor: string | editorCommon.ThemeColor; readonly position: editorCommon.OverviewRulerLane; constructor(options: editorCommon.IModelDecorationOverviewRulerOptions) { diff --git a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts index 2dbd09ac1c023..d68266803a77a 100644 --- a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts +++ b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts @@ -9,6 +9,9 @@ import URI from 'vs/base/common/uri'; import * as dom from 'vs/base/browser/dom'; import { CodeEditorServiceImpl } from 'vs/editor/browser/services/codeEditorServiceImpl'; import { IDecorationRenderOptions } from 'vs/editor/common/editorCommon'; +import { TestThemeService, TestTheme } from 'vs/workbench/test/workbenchTestServices'; + +const themeServiceMock = new TestThemeService(); suite('Decoration Render Options', () => { var options: IDecorationRenderOptions = { @@ -18,12 +21,12 @@ suite('Decoration Render Options', () => { borderColor: 'yellow' }; test('register and resolve decoration type', () => { - var s = new CodeEditorServiceImpl(); + var s = new CodeEditorServiceImpl(themeServiceMock); s.registerDecorationType('example', options); assert.notEqual(s.resolveDecorationOptions('example', false), undefined); }); test('remove decoration type', () => { - var s = new CodeEditorServiceImpl(); + var s = new CodeEditorServiceImpl(themeServiceMock); s.registerDecorationType('example', options); assert.notEqual(s.resolveDecorationOptions('example', false), undefined); s.removeDecorationType('example'); @@ -39,7 +42,7 @@ suite('Decoration Render Options', () => { test('css properties', () => { var styleSheet = dom.createStyleSheet(); - var s = new CodeEditorServiceImpl(styleSheet); + var s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', options); var sheet = readStyleSheet(styleSheet); assert( @@ -50,11 +53,76 @@ suite('Decoration Render Options', () => { assert(sheet.indexOf('background-color: red;') > 0); }); + test('theme color', () => { + var options: IDecorationRenderOptions = { + backgroundColor: { id: 'editorBackground' }, + borderColor: { id: 'editorBorder' }, + }; + var colors: { [key: string]: string } = { + editorBackground: '#FF0000' + }; + + var styleSheet = dom.createStyleSheet(); + let themeService = new TestThemeService(new TestTheme(colors)); + var s = new CodeEditorServiceImpl(themeService, styleSheet); + s.registerDecorationType('example', options); + var sheet = readStyleSheet(styleSheet); + assert.equal(sheet, '.monaco-editor .ced-example-0 { background-color: rgb(255, 0, 0); }'); + + colors = { + editorBackground: '#EE0000', + editorBorder: '#00FFFF' + }; + themeService.setTheme(new TestTheme(colors)); + sheet = readStyleSheet(styleSheet); + assert.equal(sheet, '.monaco-editor .ced-example-0 { background-color: rgb(238, 0, 0); border-color: rgb(0, 255, 255); box-sizing: border-box; }'); + + s.removeDecorationType('example'); + sheet = readStyleSheet(styleSheet); + assert.equal(sheet, ''); + + }); + + test('theme overrides', () => { + var options: IDecorationRenderOptions = { + color: { id: 'editorBackground' }, + light: { + color: '#FF00FF' + }, + dark: { + color: '#000000', + after: { + color: { id: 'infoForeground' } + } + } + }; + var colors: { [key: string]: string } = { + editorBackground: '#FF0000', + infoForeground: '#444444' + }; + + var styleSheet = dom.createStyleSheet(); + let themeService = new TestThemeService(new TestTheme(colors)); + var s = new CodeEditorServiceImpl(themeService, styleSheet); + s.registerDecorationType('example', options); + var sheet = readStyleSheet(styleSheet); + let expected = + '.vs-dark.monaco-editor .ced-example-4::after, .hc-black.monaco-editor .ced-example-4::after { color: rgb(68, 68, 68) !important; }\n' + + '.vs-dark.monaco-editor .ced-example-1, .hc-black.monaco-editor .ced-example-1 { color: rgb(0, 0, 0) !important; }\n' + + '.vs.monaco-editor .ced-example-1 { color: rgb(255, 0, 255) !important; }\n' + + '.monaco-editor .ced-example-1 { color: rgb(255, 0, 0) !important; }'; + assert.equal(sheet, expected); + + s.removeDecorationType('example'); + sheet = readStyleSheet(styleSheet); + assert.equal(sheet, ''); + }); + test('css properties, gutterIconPaths', () => { var styleSheet = dom.createStyleSheet(); // unix file path (used as string) - var s = new CodeEditorServiceImpl(styleSheet); + var s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', { gutterIconPath: '/Users/foo/bar.png' }); var sheet = readStyleSheet(styleSheet);//.innerHTML || styleSheet.sheet.toString(); assert( @@ -63,7 +131,7 @@ suite('Decoration Render Options', () => { ); // windows file path (used as string) - s = new CodeEditorServiceImpl(styleSheet); + s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', { gutterIconPath: 'c:\\files\\miles\\more.png' }); sheet = readStyleSheet(styleSheet); // TODO@Alex test fails @@ -73,7 +141,7 @@ suite('Decoration Render Options', () => { // ); // URI, only minimal encoding - s = new CodeEditorServiceImpl(styleSheet); + s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', { gutterIconPath: URI.parse('data:image/svg+xml;base64,PHN2ZyB4b+') }); sheet = readStyleSheet(styleSheet); assert( @@ -82,7 +150,7 @@ suite('Decoration Render Options', () => { ); // single quote must always be escaped/encoded - s = new CodeEditorServiceImpl(styleSheet); + s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', { gutterIconPath: '/Users/foo/b\'ar.png' }); sheet = readStyleSheet(styleSheet); assert( @@ -90,7 +158,7 @@ suite('Decoration Render Options', () => { || sheet.indexOf('background: url("file:///Users/foo/b%27ar.png") center center no-repeat;') > 0 ); - s = new CodeEditorServiceImpl(styleSheet); + s = new CodeEditorServiceImpl(themeServiceMock, styleSheet); s.registerDecorationType('example', { gutterIconPath: URI.parse('http://test/pa\'th') }); sheet = readStyleSheet(styleSheet); assert( diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index cee64b0706f55..707cb1047fa20 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -1068,19 +1068,19 @@ declare module monaco.editor { export interface IModelDecorationOverviewRulerOptions { /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - color: string; + color: string | ThemeColor; /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - darkColor: string; + darkColor: string | ThemeColor; /** * CSS color to render in the overview ruler. - * e.g.: rgba(100, 100, 100, 0.5) + * e.g.: rgba(100, 100, 100, 0.5) or a color from the color registry */ - hcColor?: string; + hcColor?: string | ThemeColor; /** * The position in the overview ruler. */ @@ -2158,6 +2158,10 @@ declare module monaco.editor { restoreViewState?(state: any): void; } + export interface ThemeColor { + id: string; + } + export interface ICommonCodeEditor extends IEditor { /** * An event emitted when the content of the current model has changed. diff --git a/src/vs/platform/theme/common/themeService.ts b/src/vs/platform/theme/common/themeService.ts index 64e028e6215df..10305538863d4 100644 --- a/src/vs/platform/theme/common/themeService.ts +++ b/src/vs/platform/theme/common/themeService.ts @@ -14,9 +14,9 @@ import Event, { Emitter } from 'vs/base/common/event'; export let IThemeService = createDecorator('themeService'); // base themes -export const DARK = 'dark'; -export const LIGHT = 'light'; -export const HIGH_CONTRAST = 'hc'; +export const DARK: ThemeType = 'dark'; +export const LIGHT: ThemeType = 'light'; +export const HIGH_CONTRAST: ThemeType = 'hc'; export type ThemeType = 'light' | 'dark' | 'hc'; export function getThemeTypeSelector(type: ThemeType): string { diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 190042afeeaf8..4850740fec14c 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -721,14 +721,28 @@ declare module 'vscode' { preview?: boolean; } + /** + * A reference to one of the workbench colors as defined in https://code.visualstudio.com/docs/getstarted/theme-color-reference. + * Using a theme color is preferred over a custom color as it gives theme authors and users the possibility to change the color. + */ + export class ThemeColor { + + /** + * Creates a reference to a theme color. + * @param id of the color. The available colors are listed in https://code.visualstudio.com/docs/getstarted/theme-color-reference. + */ + constructor(id: string); + } + /** * Represents theme specific rendering styles for a [text editor decoration](#TextEditorDecorationType). */ export interface ThemableDecorationRenderOptions { /** * Background color of the decoration. Use rgba() and define transparent background colors to play well with other decorations. + * Alternativly a color from the color registry an be [referenced](#ColorIdentifier). */ - backgroundColor?: string; + backgroundColor?: string | ThemeColor; /** * CSS styling property that will be applied to text enclosed by a decoration. @@ -739,7 +753,7 @@ declare module 'vscode' { * CSS styling property that will be applied to text enclosed by a decoration. * Better use 'outline' for setting one or more of the individual outline properties. */ - outlineColor?: string; + outlineColor?: string | ThemeColor; /** * CSS styling property that will be applied to text enclosed by a decoration. @@ -762,7 +776,7 @@ declare module 'vscode' { * CSS styling property that will be applied to text enclosed by a decoration. * Better use 'border' for setting one or more of the individual border properties. */ - borderColor?: string; + borderColor?: string | ThemeColor; /** * CSS styling property that will be applied to text enclosed by a decoration. @@ -801,7 +815,7 @@ declare module 'vscode' { /** * CSS styling property that will be applied to text enclosed by a decoration. */ - color?: string; + color?: string | ThemeColor; /** * CSS styling property that will be applied to text enclosed by a decoration. @@ -823,7 +837,7 @@ declare module 'vscode' { /** * The color of the decoration in the overview ruler. Use rgba() and define transparent colors to play well with other decorations. */ - overviewRulerColor?: string; + overviewRulerColor?: string | ThemeColor; /** * Defines the rendering options of the attachment that is inserted before the decorated text @@ -850,6 +864,10 @@ declare module 'vscode' { * CSS styling property that will be applied to the decoration attachment. */ border?: string; + /** + * CSS styling property that will be applied to text enclosed by a decoration. + */ + borderColor?: string | ThemeColor; /** * CSS styling property that will be applied to the decoration attachment. */ @@ -857,11 +875,11 @@ declare module 'vscode' { /** * CSS styling property that will be applied to the decoration attachment. */ - color?: string; + color?: string | ThemeColor; /** * CSS styling property that will be applied to the decoration attachment. */ - backgroundColor?: string; + backgroundColor?: string | ThemeColor; /** * CSS styling property that will be applied to the decoration attachment. */ diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 6aebd24157218..eb5b38f2391f0 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -534,6 +534,7 @@ export function createApiFactory( WorkspaceEdit: extHostTypes.WorkspaceEdit, ProgressLocation: extHostTypes.ProgressLocation, TreeItemCollapsibleState: extHostTypes.TreeItemCollapsibleState, + ThemeColor: extHostTypes.ThemeColor, // functions FileLocationKind: extHostTypes.FileLocationKind, ApplyToKind: extHostTypes.ApplyToKind, diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index 1c10cc2625192..20b0d2a1aff0a 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1270,3 +1270,10 @@ export enum TreeItemCollapsibleState { Collapsed = 1, Expanded = 2 } + +export class ThemeColor { + id: string; + constructor(id: string) { + this.id = id; + } +} \ No newline at end of file diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index bc6e0f5e11dff..899b03112be58 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -50,8 +50,7 @@ import { IWindowsService, IWindowService } from 'vs/platform/windows/common/wind import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; import { RawTextSource, IRawTextSource } from 'vs/editor/common/model/textSource'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { IThemeService, ITheme, IThemingParticipant, ThemeType } from 'vs/platform/theme/common/themeService'; -import { IDisposable } from 'vs/base/common/lifecycle'; +import { IThemeService, ITheme, DARK } from 'vs/platform/theme/common/themeService'; import { Color } from 'vs/base/common/color'; import { isLinux } from 'vs/base/common/platform'; @@ -1000,10 +999,16 @@ export class TestWindowsService implements IWindowsService { } export class TestTheme implements ITheme { - type: ThemeType; + + constructor(private colors: { [id: string]: string; } = {}, public type = DARK) { + } getColor(color: string, useDefault?: boolean): Color { - throw new Error('Method not implemented.'); + let value = this.colors[color]; + if (value) { + return Color.fromHex(value); + } + return void 0; } defines(color: string): boolean { @@ -1011,17 +1016,30 @@ export class TestTheme implements ITheme { } } -const testTheme = new TestTheme(); - export class TestThemeService implements IThemeService { _serviceBrand: any; + _theme: ITheme; + _onThemeChange = new Emitter(); + + constructor(theme = new TestTheme()) { + this._theme = theme; + } getTheme(): ITheme { - return testTheme; + return this._theme; + } + + setTheme(theme: ITheme) { + this._theme = theme; + this.fireThemeChange(); + } + + fireThemeChange() { + this._onThemeChange.fire(this._theme); } - onThemeChange(participant: IThemingParticipant): IDisposable { - return { dispose: () => { } }; + public get onThemeChange(): Event { + return this._onThemeChange.event; } } From 55de700961a17cb052553a4dada4d45aa80fec7a Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Wed, 24 May 2017 13:59:47 -0700 Subject: [PATCH 1119/2747] Fix #25422 - also search external files --- src/vs/workbench/services/search/node/ripgrepTextSearch.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts index 50cd95218a9a9..829406f52fef6 100644 --- a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts +++ b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts @@ -225,7 +225,7 @@ export class RipgrepParser extends EventEmitter { this.onResult(); } - this.fileMatch = new FileMatch(path.join(this.rootFolder, r[1])); + this.fileMatch = new FileMatch(path.resolve(this.rootFolder, r[1])); } else { // Line is empty (or malformed) } @@ -461,6 +461,8 @@ function getRgArgs(config: IRawSearch): { args: string[], siblingClauses: glob.I args.push('./'); } + args.push(...config.extraFiles); + return { args, siblingClauses }; } From fab8dabc0dbfcef191291b9648fda27d9c2afdcf Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 May 2017 14:00:58 -0700 Subject: [PATCH 1120/2747] Clean up var name --- src/vs/workbench/parts/terminal/node/terminalProcess.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/terminal/node/terminalProcess.ts b/src/vs/workbench/parts/terminal/node/terminalProcess.ts index 3a2b00a4a7031..ab1589b4dcfb8 100644 --- a/src/vs/workbench/parts/terminal/node/terminalProcess.ts +++ b/src/vs/workbench/parts/terminal/node/terminalProcess.ts @@ -5,7 +5,7 @@ import * as os from 'os'; import * as path from 'path'; -import * as ptyJs from 'node-pty'; +import * as pty from 'node-pty'; // The pty process needs to be run in its own child process to get around maxing out CPU on Mac, // see https://github.com/electron/electron/issues/38 @@ -43,7 +43,7 @@ if (cols && rows) { options.rows = parseInt(rows, 10); } -var ptyProcess = ptyJs.fork(shell, args, options); +var ptyProcess = pty.fork(shell, args, options); var closeTimeout; var exitCode; From 3c52e0de45d83440a06a042a28b611bd3478a50a Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 10 May 2017 14:57:21 -0700 Subject: [PATCH 1121/2747] draft version --- .../contrib/find/browser/findWidget.css | 34 ++++++++---- .../editor/contrib/find/browser/findWidget.ts | 53 +++++++++++++++++-- 2 files changed, 73 insertions(+), 14 deletions(-) diff --git a/src/vs/editor/contrib/find/browser/findWidget.css b/src/vs/editor/contrib/find/browser/findWidget.css index 74d52635a45a8..f5b3f333204bd 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.css +++ b/src/vs/editor/contrib/find/browser/findWidget.css @@ -51,7 +51,9 @@ height: 64px; /* find input height + replace input height */ } .monaco-editor .find-widget.replaceToggled > .replace-part { - display: inline-block; + display: flex; + display: -webkit-flex; + align-items: center; } .monaco-editor .find-widget.visible, @@ -81,6 +83,9 @@ .monaco-editor .find-widget > .replace-part { margin: 4px 0 0 17px; font-size: 12px; + display: flex; + display: -webkit-flex; + align-items: center; } .monaco-editor .find-widget > .find-part .monaco-inputbox, @@ -95,8 +100,9 @@ } .monaco-editor .find-widget .monaco-findInput { - display: inline-block; vertical-align: middle; + display: flex; + flex:1; } .monaco-editor .find-widget .matchesCount { @@ -111,6 +117,7 @@ } .monaco-editor .find-widget .button { + min-width: 20px; width: 20px; height: 20px; display: inline-block; @@ -227,7 +234,8 @@ } .monaco-editor .find-widget > .replace-part > .replace-input { - display: inline-block; + display: flex; + flex:1; vertical-align: middle; } @@ -242,12 +250,9 @@ } /* NARROW (SMALLER THAN REDUCED) */ -.monaco-editor .find-widget.narrow-find-widget > .find-part .monaco-findInput, -.monaco-editor .find-widget.narrow-find-widget > .replace-part .replace-input { - width: 171px !important; -} -.monaco-editor .find-widget.narrow-find-widget > .find-part .monaco-inputbox > .wrapper > .input { - width: 105px !important; +.monaco-editor .find-widget.narrow-find-widget > .find-part, +.monaco-editor .find-widget.narrow-find-widget > .replace-part { + width: 240px !important; } /* COLLAPSED (SMALLER THAN NARROW) */ @@ -258,10 +263,14 @@ .monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls { display:none; } +.monaco-editor .find-widget.collapsed-find-widget > .find-part, +.monaco-editor .find-widget.collapsed-find-widget > .replace-part { + max-width: 94px !important; +} .monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput, .monaco-editor .find-widget.collapsed-find-widget > .replace-part .replace-input, .monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-inputbox > .wrapper > .input { - width: 71px !important; + max-width: 71px !important; } .monaco-editor .findMatch { @@ -275,6 +284,11 @@ animation-name: inherit !important; } +.monaco-editor .find-widget .monaco-sash { + background: grey; + margin-left: -4px; +} + .monaco-editor.hc-black .find-widget .previous, .monaco-editor.vs-dark .find-widget .previous { background-image: url('images/previous-inverse.svg'); diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index 145453e625e69..a36edf38b05e7 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -16,6 +16,7 @@ import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview import { FindInput, IFindInputStyles } from 'vs/base/browser/ui/findinput/findInput'; import { IMessage as InputBoxMessage, InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; import { Widget } from 'vs/base/browser/ui/widget'; +import { Sash, IHorizontalSashLayoutProvider, ISashEvent } from 'vs/base/browser/ui/sash/sash'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, IViewZone, OverlayWidgetPositionPreference } from 'vs/editor/browser/editorBrowser'; import { FIND_IDS, MATCHES_LIMIT } from 'vs/editor/contrib/find/common/findModel'; @@ -68,7 +69,9 @@ export class FindWidgetViewZone implements IViewZone { } } -export class FindWidget extends Widget implements IOverlayWidget { + +export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSashLayoutProvider { + private static ID = 'editor.contrib.findWidget'; private static PART_WIDTH = 275; @@ -104,6 +107,8 @@ export class FindWidget extends Widget implements IOverlayWidget { private _viewZone: FindWidgetViewZone; private _viewZoneId: number; + private _resizeSash: Sash; + constructor( codeEditor: ICodeEditor, controller: IFindController, @@ -126,6 +131,26 @@ export class FindWidget extends Widget implements IOverlayWidget { this._register(this._state.addChangeListener((e) => this._onStateChanged(e))); this._buildDomNode(); + this._resizeSash = new Sash(this._domNode, this, { orientation: 0}); + let data: { startX: number; }; + let originalWidth = 411; + this._register(this._resizeSash.addListener('start', (e: ISashEvent) => { + data = { + startX: e.startX, + }; + originalWidth = dom.getTotalWidth(this._domNode); + })); + + this._register(this._resizeSash.addListener('end', () => { + data = undefined; + })); + + this._register(this._resizeSash.addListener('change', (evt: ISashEvent) => { + if (data) { + this._domNode.style.width = `${originalWidth + data.startX - evt.currentX}px`; + this._findInput.setWidth(FindWidget.FIND_INPUT_AREA_WIDTH + Math.max(0, data.startX - evt.currentX)); + } + })); this._updateButtons(); let checkEditorWidth = () => { @@ -134,18 +159,27 @@ export class FindWidget extends Widget implements IOverlayWidget { let collapsedFindWidget = false; let reducedFindWidget = false; let narrowFindWidget = false; - if (WIDGET_FIXED_WIDTH + 28 >= editorWidth + 50) { + let widgetWidth = Math.max(411, dom.getTotalWidth(this._domNode)) - 69; + if (widgetWidth + 28 >= editorWidth + 50) { collapsedFindWidget = true; } - if (WIDGET_FIXED_WIDTH + 28 >= editorWidth) { + if (widgetWidth + 28 >= editorWidth) { narrowFindWidget = true; } - if (WIDGET_FIXED_WIDTH + MAX_MATCHES_COUNT_WIDTH + 28 + minimapWidth >= editorWidth) { + if (widgetWidth + MAX_MATCHES_COUNT_WIDTH + 28 + minimapWidth >= editorWidth) { reducedFindWidget = true; } dom.toggleClass(this._domNode, 'collapsed-find-widget', collapsedFindWidget); dom.toggleClass(this._domNode, 'reduced-find-widget', reducedFindWidget); dom.toggleClass(this._domNode, 'narrow-find-widget', narrowFindWidget); + if (collapsedFindWidget) { + this._domNode.style.maxWidth = '111px'; + } else if (narrowFindWidget) { + this._domNode.style.maxWidth = '257px'; + } else { + this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; + } + }; checkEditorWidth(); @@ -552,6 +586,17 @@ export class FindWidget extends Widget implements IOverlayWidget { } } + // ----- sash + public getHorizontalSashTop(sash: Sash): number { + return 0; + } + public getHorizontalSashLeft?(sash: Sash): number { + return 0; + } + public getHorizontalSashWidth?(sash: Sash): number { + return 500; + } + // ----- initialization private _keybindingLabelFor(actionId: string): string { From df32b3f94785e2c0ecaa26063bac9ff3b0076eb2 Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 11 May 2017 15:11:28 -0700 Subject: [PATCH 1122/2747] Flex Box --- .../contrib/find/browser/findWidget.css | 27 +++++++++++++------ .../editor/contrib/find/browser/findWidget.ts | 25 +++++++++++++---- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/src/vs/editor/contrib/find/browser/findWidget.css b/src/vs/editor/contrib/find/browser/findWidget.css index f5b3f333204bd..e974c6a83c799 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.css +++ b/src/vs/editor/contrib/find/browser/findWidget.css @@ -93,6 +93,10 @@ height: 25px; } +.monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .input { + width: 100% !important; + padding-right: 66px; +} .monaco-editor .find-widget > .find-part .monaco-inputbox > .wrapper > .input, .monaco-editor .find-widget > .replace-part .monaco-inputbox > .wrapper > .input { padding-top: 2px; @@ -106,7 +110,9 @@ } .monaco-editor .find-widget .matchesCount { - display: inline-block; + display: flex; + display: -webkit-flex; + flex: initial; margin: 0 1px 0 3px; padding: 2px 2px 0 2px; height: 25px; @@ -120,8 +126,9 @@ min-width: 20px; width: 20px; height: 20px; - display: inline-block; - vertical-align: middle; + display: flex; + display: -webkit-flex; + flex: initial; margin-left: 3px; background-position: center center; background-repeat: no-repeat; @@ -250,10 +257,10 @@ } /* NARROW (SMALLER THAN REDUCED) */ -.monaco-editor .find-widget.narrow-find-widget > .find-part, +/*.monaco-editor .find-widget.narrow-find-widget > .find-part, .monaco-editor .find-widget.narrow-find-widget > .replace-part { width: 240px !important; -} +}*/ /* COLLAPSED (SMALLER THAN NARROW) */ .monaco-editor .find-widget.collapsed-find-widget .button.previous, @@ -263,7 +270,11 @@ .monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput .controls { display:none; } -.monaco-editor .find-widget.collapsed-find-widget > .find-part, + +.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-inputbox > .wrapper > .input { + padding-right: 0px; +} +/*.monaco-editor .find-widget.collapsed-find-widget > .find-part, .monaco-editor .find-widget.collapsed-find-widget > .replace-part { max-width: 94px !important; } @@ -271,7 +282,7 @@ .monaco-editor .find-widget.collapsed-find-widget > .replace-part .replace-input, .monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-inputbox > .wrapper > .input { max-width: 71px !important; -} +}*/ .monaco-editor .findMatch { -webkit-animation-duration: 0; @@ -286,7 +297,7 @@ .monaco-editor .find-widget .monaco-sash { background: grey; - margin-left: -4px; + margin-left: -4px; } .monaco-editor.hc-black .find-widget .previous, diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index a36edf38b05e7..297d4fe61555b 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -50,7 +50,6 @@ const NLS_MATCHES_LOCATION = nls.localize('label.matchesLocation', "{0} of {1}") const NLS_NO_RESULTS = nls.localize('label.noResults', "No Results"); let MAX_MATCHES_COUNT_WIDTH = 69; -const WIDGET_FIXED_WIDTH = 411 - 69; export class FindWidgetViewZone implements IViewZone { @@ -131,7 +130,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._register(this._state.addChangeListener((e) => this._onStateChanged(e))); this._buildDomNode(); - this._resizeSash = new Sash(this._domNode, this, { orientation: 0}); + this._resizeSash = new Sash(this._domNode, this, { orientation: 0 }); let data: { startX: number; }; let originalWidth = 411; this._register(this._resizeSash.addListener('start', (e: ISashEvent) => { @@ -147,8 +146,24 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._register(this._resizeSash.addListener('change', (evt: ISashEvent) => { if (data) { - this._domNode.style.width = `${originalWidth + data.startX - evt.currentX}px`; - this._findInput.setWidth(FindWidget.FIND_INPUT_AREA_WIDTH + Math.max(0, data.startX - evt.currentX)); + let reducedFindWidget = false; + let narrowFindWidget = false; + let collapsedFindWidget = false; + let width = originalWidth + data.startX - evt.currentX; + if (width < 411) { + reducedFindWidget = true; + } + if (width < 411 - 69) { + narrowFindWidget = true; + } + if (width < 265) { + collapsedFindWidget = true; + } + dom.toggleClass(this._domNode, 'collapsed-find-widget', collapsedFindWidget); + dom.toggleClass(this._domNode, 'narrow-find-widget', narrowFindWidget); + dom.toggleClass(this._domNode, 'reduced-find-widget', reducedFindWidget); + this._domNode.style.width = `${width}px`; + // this._findInput.setWidth(FindWidget.FIND_INPUT_AREA_WIDTH + Math.max(0, data.startX - evt.currentX)); } })); this._updateButtons(); @@ -170,8 +185,8 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas reducedFindWidget = true; } dom.toggleClass(this._domNode, 'collapsed-find-widget', collapsedFindWidget); - dom.toggleClass(this._domNode, 'reduced-find-widget', reducedFindWidget); dom.toggleClass(this._domNode, 'narrow-find-widget', narrowFindWidget); + dom.toggleClass(this._domNode, 'reduced-find-widget', reducedFindWidget); if (collapsedFindWidget) { this._domNode.style.maxWidth = '111px'; } else if (narrowFindWidget) { From 0ca5f1c77ac526476f6f13309a45a3ff885a5bc0 Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 24 May 2017 14:44:40 -0700 Subject: [PATCH 1123/2747] make input box responsive when widget or editor resizes --- .../contrib/find/browser/findWidget.css | 30 ++-- .../editor/contrib/find/browser/findWidget.ts | 155 ++++++++++-------- 2 files changed, 95 insertions(+), 90 deletions(-) diff --git a/src/vs/editor/contrib/find/browser/findWidget.css b/src/vs/editor/contrib/find/browser/findWidget.css index e974c6a83c799..0fdd469454970 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.css +++ b/src/vs/editor/contrib/find/browser/findWidget.css @@ -106,6 +106,7 @@ .monaco-editor .find-widget .monaco-findInput { vertical-align: middle; display: flex; + display: -webkit-flex; flex:1; } @@ -242,12 +243,9 @@ .monaco-editor .find-widget > .replace-part > .replace-input { display: flex; - flex:1; + display: -webkit-flex; vertical-align: middle; -} - -.monaco-editor .find-widget > .replace-part > .replace-input > .monaco-inputbox { - width: 100%; + width: auto !important; } /* REDUCED */ @@ -257,12 +255,15 @@ } /* NARROW (SMALLER THAN REDUCED) */ -/*.monaco-editor .find-widget.narrow-find-widget > .find-part, -.monaco-editor .find-widget.narrow-find-widget > .replace-part { - width: 240px !important; -}*/ +.monaco-editor .find-widget.narrow-find-widget { + max-width: 257px !important; +} /* COLLAPSED (SMALLER THAN NARROW) */ +.monaco-editor .find-widget.collapsed-find-widget { + max-width: 111px !important; +} + .monaco-editor .find-widget.collapsed-find-widget .button.previous, .monaco-editor .find-widget.collapsed-find-widget .button.next, .monaco-editor .find-widget.collapsed-find-widget .button.replace, @@ -274,15 +275,6 @@ .monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-inputbox > .wrapper > .input { padding-right: 0px; } -/*.monaco-editor .find-widget.collapsed-find-widget > .find-part, -.monaco-editor .find-widget.collapsed-find-widget > .replace-part { - max-width: 94px !important; -} -.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-findInput, -.monaco-editor .find-widget.collapsed-find-widget > .replace-part .replace-input, -.monaco-editor .find-widget.collapsed-find-widget > .find-part .monaco-inputbox > .wrapper > .input { - max-width: 71px !important; -}*/ .monaco-editor .findMatch { -webkit-animation-duration: 0; @@ -296,7 +288,7 @@ } .monaco-editor .find-widget .monaco-sash { - background: grey; + width: 2px !important; margin-left: -4px; } diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index 297d4fe61555b..74454a278ec52 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -16,7 +16,7 @@ import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview import { FindInput, IFindInputStyles } from 'vs/base/browser/ui/findinput/findInput'; import { IMessage as InputBoxMessage, InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; import { Widget } from 'vs/base/browser/ui/widget'; -import { Sash, IHorizontalSashLayoutProvider, ISashEvent } from 'vs/base/browser/ui/sash/sash'; +import { Sash, IHorizontalSashLayoutProvider, ISashEvent, Orientation } from 'vs/base/browser/ui/sash/sash'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, IViewZone, OverlayWidgetPositionPreference } from 'vs/editor/browser/editorBrowser'; import { FIND_IDS, MATCHES_LIMIT } from 'vs/editor/contrib/find/common/findModel'; @@ -29,6 +29,7 @@ import { Color } from 'vs/base/common/color'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; import { editorFindRangeHighlight, editorFindMatch, editorFindMatchHighlight, activeContrastBorder, contrastBorder, inputBackground, editorWidgetBackground, inputActiveOptionBorder, widgetShadow, inputForeground, inputBorder, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationErrorBackground, inputValidationErrorBorder, errorForeground } from 'vs/platform/theme/common/colorRegistry'; + export interface IFindController { replace(): void; replaceAll(): void; @@ -49,10 +50,19 @@ const NLS_MATCHES_COUNT_LIMIT_TITLE = nls.localize('title.matchesCountLimit', "O const NLS_MATCHES_LOCATION = nls.localize('label.matchesLocation', "{0} of {1}"); const NLS_NO_RESULTS = nls.localize('label.noResults', "No Results"); +const FIND_WIDGET_INITIAL_WIDTH = 411; +const PART_WIDTH = 275; +const FIND_INPUT_AREA_WIDTH = PART_WIDTH - 54; +const REPLACE_INPUT_AREA_WIDTH = FIND_INPUT_AREA_WIDTH; + let MAX_MATCHES_COUNT_WIDTH = 69; +let FIND_ALL_CONTROLS_WIDTH = 17/** Find Input margin-left */ + (MAX_MATCHES_COUNT_WIDTH + 3 + 1) /** Match Results */ + 23 /** Button */ * 4 + 2/** sash */; + +const FIND_INPUT_AREA_HEIGHT = 34; // The height of Find Widget when Replace Input is not visible. +const FIND_REPLACE_AREA_HEIGHT = 64; // The height of Find Widget when Replace Input is visible. -export class FindWidgetViewZone implements IViewZone { +export class FindWidgetViewZone implements IViewZone { public afterLineNumber: number; public heightInPx: number; public suppressMouseDown: boolean; @@ -61,24 +71,15 @@ export class FindWidgetViewZone implements IViewZone { constructor(afterLineNumber: number) { this.afterLineNumber = afterLineNumber; - this.heightInPx = 34; + this.heightInPx = FIND_INPUT_AREA_HEIGHT; this.suppressMouseDown = false; this.domNode = document.createElement('div'); this.domNode.className = 'dock-find-viewzone'; } } - export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSashLayoutProvider { - - - private static ID = 'editor.contrib.findWidget'; - private static PART_WIDTH = 275; - private static FIND_INPUT_AREA_WIDTH = FindWidget.PART_WIDTH - 54; - private static REPLACE_INPUT_AREA_WIDTH = FindWidget.FIND_INPUT_AREA_WIDTH; - private static FIND_INPUT_AREA_HEIGHT = 34; // The height of Find Widget when Replace Input is not visible. - private static FIND_REPLACE_AREA_HEIGHT = 64; // The height of Find Widget when Replace Input is visible. - + private static ID = 'editor.contrib.findWidget';; private _codeEditor: ICodeEditor; private _state: FindReplaceState; private _controller: IFindController; @@ -128,44 +129,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._isReplaceVisible = false; this._register(this._state.addChangeListener((e) => this._onStateChanged(e))); - this._buildDomNode(); - this._resizeSash = new Sash(this._domNode, this, { orientation: 0 }); - let data: { startX: number; }; - let originalWidth = 411; - this._register(this._resizeSash.addListener('start', (e: ISashEvent) => { - data = { - startX: e.startX, - }; - originalWidth = dom.getTotalWidth(this._domNode); - })); - - this._register(this._resizeSash.addListener('end', () => { - data = undefined; - })); - - this._register(this._resizeSash.addListener('change', (evt: ISashEvent) => { - if (data) { - let reducedFindWidget = false; - let narrowFindWidget = false; - let collapsedFindWidget = false; - let width = originalWidth + data.startX - evt.currentX; - if (width < 411) { - reducedFindWidget = true; - } - if (width < 411 - 69) { - narrowFindWidget = true; - } - if (width < 265) { - collapsedFindWidget = true; - } - dom.toggleClass(this._domNode, 'collapsed-find-widget', collapsedFindWidget); - dom.toggleClass(this._domNode, 'narrow-find-widget', narrowFindWidget); - dom.toggleClass(this._domNode, 'reduced-find-widget', reducedFindWidget); - this._domNode.style.width = `${width}px`; - // this._findInput.setWidth(FindWidget.FIND_INPUT_AREA_WIDTH + Math.max(0, data.startX - evt.currentX)); - } - })); this._updateButtons(); let checkEditorWidth = () => { @@ -174,27 +138,38 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas let collapsedFindWidget = false; let reducedFindWidget = false; let narrowFindWidget = false; - let widgetWidth = Math.max(411, dom.getTotalWidth(this._domNode)) - 69; - if (widgetWidth + 28 >= editorWidth + 50) { - collapsedFindWidget = true; + let widgetWidth = dom.getTotalWidth(this._domNode); + + if (widgetWidth > FIND_WIDGET_INITIAL_WIDTH) { + // as the widget is resized by users, we may need to change the max width of the widget as the editor width changes. + this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; + this._replaceInputBox.inputElement.style.width = `${dom.getTotalWidth(this._findInput.inputBox.inputElement)}px`; + return; + } + + if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth >= editorWidth) { + reducedFindWidget = true; } - if (widgetWidth + 28 >= editorWidth) { + if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth) { narrowFindWidget = true; } - if (widgetWidth + MAX_MATCHES_COUNT_WIDTH + 28 + minimapWidth >= editorWidth) { - reducedFindWidget = true; + if (FIND_WIDGET_INITIAL_WIDTH + 28 + minimapWidth - MAX_MATCHES_COUNT_WIDTH >= editorWidth + 50) { + collapsedFindWidget = true; } dom.toggleClass(this._domNode, 'collapsed-find-widget', collapsedFindWidget); dom.toggleClass(this._domNode, 'narrow-find-widget', narrowFindWidget); dom.toggleClass(this._domNode, 'reduced-find-widget', reducedFindWidget); - if (collapsedFindWidget) { - this._domNode.style.maxWidth = '111px'; - } else if (narrowFindWidget) { - this._domNode.style.maxWidth = '257px'; - } else { + + if (!narrowFindWidget && !collapsedFindWidget) { + // the minimal left offset of findwidget is 15px. this._domNode.style.maxWidth = `${editorWidth - 28 - minimapWidth - 15}px`; } + let findInputWidth = dom.getTotalWidth(this._findInput.inputBox.inputElement); + if (findInputWidth > 0) { + this._replaceInputBox.inputElement.style.width = `${findInputWidth}px`; + } + }; checkEditorWidth(); @@ -467,9 +442,9 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._codeEditor.changeViewZones((accessor) => { if (this._state.isReplaceRevealed) { - this._viewZone.heightInPx = FindWidget.FIND_REPLACE_AREA_HEIGHT; + this._viewZone.heightInPx = FIND_REPLACE_AREA_HEIGHT; } else { - this._viewZone.heightInPx = FindWidget.FIND_INPUT_AREA_HEIGHT; + this._viewZone.heightInPx = FIND_INPUT_AREA_HEIGHT; } this._viewZoneId = accessor.addZone(this._viewZone); @@ -483,19 +458,19 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas } this._codeEditor.changeViewZones((accessor) => { - let scrollAdjustment = FindWidget.FIND_INPUT_AREA_HEIGHT; + let scrollAdjustment = FIND_INPUT_AREA_HEIGHT; if (this._viewZoneId !== undefined) { if (this._state.isReplaceRevealed) { - this._viewZone.heightInPx = FindWidget.FIND_REPLACE_AREA_HEIGHT; - scrollAdjustment = FindWidget.FIND_REPLACE_AREA_HEIGHT - FindWidget.FIND_INPUT_AREA_HEIGHT; + this._viewZone.heightInPx = FIND_REPLACE_AREA_HEIGHT; + scrollAdjustment = FIND_REPLACE_AREA_HEIGHT - FIND_INPUT_AREA_HEIGHT; } else { - this._viewZone.heightInPx = FindWidget.FIND_INPUT_AREA_HEIGHT; - scrollAdjustment = FindWidget.FIND_INPUT_AREA_HEIGHT - FindWidget.FIND_REPLACE_AREA_HEIGHT; + this._viewZone.heightInPx = FIND_INPUT_AREA_HEIGHT; + scrollAdjustment = FIND_INPUT_AREA_HEIGHT - FIND_REPLACE_AREA_HEIGHT; } accessor.removeZone(this._viewZoneId); } else { - this._viewZone.heightInPx = FindWidget.FIND_INPUT_AREA_HEIGHT; + this._viewZone.heightInPx = FIND_INPUT_AREA_HEIGHT; } this._viewZoneId = accessor.addZone(this._viewZone); this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + scrollAdjustment); @@ -625,7 +600,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas private _buildFindPart(): HTMLElement { // Find input this._findInput = this._register(new FindInput(null, this._contextViewProvider, { - width: FindWidget.FIND_INPUT_AREA_WIDTH, + width: FIND_INPUT_AREA_WIDTH, label: NLS_FIND_INPUT_LABEL, placeholder: NLS_FIND_INPUT_PLACEHOLDER, appendCaseSensitiveLabel: this._keybindingLabelFor(FIND_IDS.ToggleCaseSensitiveCommand), @@ -751,7 +726,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas // Replace input let replaceInput = document.createElement('div'); replaceInput.className = 'replace-input'; - replaceInput.style.width = FindWidget.REPLACE_INPUT_AREA_WIDTH + 'px'; + replaceInput.style.width = REPLACE_INPUT_AREA_WIDTH + 'px'; this._replaceInputBox = this._register(new InputBox(replaceInput, null, { ariaLabel: NLS_REPLACE_INPUT_LABEL, placeholder: NLS_REPLACE_INPUT_PLACEHOLDER @@ -809,6 +784,9 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas className: 'toggle left', onTrigger: () => { this._state.change({ isReplaceRevealed: !this._isReplaceVisible }, false); + if (this._isReplaceVisible) { + this._replaceInputBox.width = this._findInput.inputBox.width; + } this._showViewZone(); }, onKeyDown: (e) => { } @@ -825,6 +803,36 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._domNode.appendChild(this._toggleReplaceBtn.domNode); this._domNode.appendChild(findPart); this._domNode.appendChild(replacePart); + + this._buildSash(); + } + + private _buildSash() { + this._resizeSash = new Sash(this._domNode, this, { orientation: Orientation.VERTICAL }); + let originalWidth = FIND_WIDGET_INITIAL_WIDTH; + + this._register(this._resizeSash.addListener('start', (e: ISashEvent) => { + originalWidth = dom.getTotalWidth(this._domNode); + })); + + this._register(this._resizeSash.addListener('change', (evt: ISashEvent) => { + let width = originalWidth + evt.startX - evt.currentX; + + if (width < FIND_WIDGET_INITIAL_WIDTH) { + // narrow down the find widget should be handled by CSS. + return; + } + + let inputBoxWidth = width - FIND_ALL_CONTROLS_WIDTH; + let maxWidth = parseFloat(dom.getComputedStyle(this._domNode).maxWidth) || 0; + if (width > maxWidth) { + return; + } + this._domNode.style.width = `${width}px`; + if (this._isReplaceVisible) { + this._replaceInputBox.width = inputBoxWidth; + } + })); } } @@ -1009,5 +1017,10 @@ registerThemingParticipant((theme, collector) => { if (error) { collector.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${error}; }`); } + + let border = theme.getColor('panel.border'); + if (border) { + collector.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${border}; width: 2px !important; margin-left: -4px;}`); + } }); From 3ef1b64d4b49cd9f9b59bc7fafd95053baeab51f Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 24 May 2017 23:49:51 +0200 Subject: [PATCH 1124/2747] Allow extensions to use theme colors in status bar --- src/vs/platform/statusbar/common/statusbar.ts | 3 ++- src/vs/vscode.d.ts | 2 +- .../electron-browser/mainThreadStatusBar.ts | 3 ++- src/vs/workbench/api/node/extHost.protocol.ts | 2 +- src/vs/workbench/api/node/extHostStatusBar.ts | 8 ++++---- .../browser/parts/statusbar/statusbarPart.ts | 18 +++++++++++++++--- 6 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/vs/platform/statusbar/common/statusbar.ts b/src/vs/platform/statusbar/common/statusbar.ts index 6e45f806115df..d42f792b801a3 100644 --- a/src/vs/platform/statusbar/common/statusbar.ts +++ b/src/vs/platform/statusbar/common/statusbar.ts @@ -7,6 +7,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IDisposable } from 'vs/base/common/lifecycle'; +import { ThemeColor } from 'vs/editor/common/editorCommon'; export var IStatusbarService = createDecorator('statusbarService'); @@ -34,7 +35,7 @@ export interface IStatusbarEntry { /** * An optional color to use for the entry */ - color?: string; + color?: string | ThemeColor; /** * An optional id of a command that is known to the workbench to execute on click diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 4850740fec14c..35a6a58cc03ba 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -3301,7 +3301,7 @@ declare module 'vscode' { /** * The foreground color for this entry. */ - color: string | undefined; + color: string | ThemeColor | undefined; /** * The identifier of a command to run on click. The command must be diff --git a/src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts b/src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts index d64d9d3ac2b7e..d16e17cda0906 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadStatusBar.ts @@ -7,6 +7,7 @@ import { IStatusbarService, StatusbarAlignment as MainThreadStatusBarAlignment } from 'vs/platform/statusbar/common/statusbar'; import { IDisposable } from 'vs/base/common/lifecycle'; import { MainThreadStatusBarShape } from '../node/extHost.protocol'; +import { ThemeColor } from 'vs/editor/common/editorCommon'; export class MainThreadStatusBar extends MainThreadStatusBarShape { private mapIdToDisposable: { [id: number]: IDisposable }; @@ -18,7 +19,7 @@ export class MainThreadStatusBar extends MainThreadStatusBarShape { this.mapIdToDisposable = Object.create(null); } - $setEntry(id: number, extensionId: string, text: string, tooltip: string, command: string, color: string, alignment: MainThreadStatusBarAlignment, priority: number): void { + $setEntry(id: number, extensionId: string, text: string, tooltip: string, command: string, color: string | ThemeColor, alignment: MainThreadStatusBarAlignment, priority: number): void { // Dispose any old this.$dispose(id); diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 1dbe9058048f2..f9c02d01d8c10 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -277,7 +277,7 @@ export abstract class MainThreadQuickOpenShape { } export abstract class MainThreadStatusBarShape { - $setEntry(id: number, extensionId: string, text: string, tooltip: string, command: string, color: string, alignment: MainThreadStatusBarAlignment, priority: number): void { throw ni(); } + $setEntry(id: number, extensionId: string, text: string, tooltip: string, command: string, color: string | editorCommon.ThemeColor, alignment: MainThreadStatusBarAlignment, priority: number): void { throw ni(); } $dispose(id: number) { throw ni(); } } diff --git a/src/vs/workbench/api/node/extHostStatusBar.ts b/src/vs/workbench/api/node/extHostStatusBar.ts index 97c917caf5134..6e91e7dbf9a3b 100644 --- a/src/vs/workbench/api/node/extHostStatusBar.ts +++ b/src/vs/workbench/api/node/extHostStatusBar.ts @@ -6,7 +6,7 @@ import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { StatusbarAlignment as MainThreadStatusBarAlignment } from 'vs/platform/statusbar/common/statusbar'; -import { StatusBarAlignment as ExtHostStatusBarAlignment, Disposable } from './extHostTypes'; +import { StatusBarAlignment as ExtHostStatusBarAlignment, Disposable, ThemeColor } from './extHostTypes'; import { StatusBarItem, StatusBarAlignment } from 'vscode'; import { MainContext, MainThreadStatusBarShape } from './extHost.protocol'; @@ -21,7 +21,7 @@ export class ExtHostStatusBarEntry implements StatusBarItem { private _text: string; private _tooltip: string; - private _color: string; + private _color: string | ThemeColor; private _command: string; private _timeoutHandle: number; @@ -57,7 +57,7 @@ export class ExtHostStatusBarEntry implements StatusBarItem { return this._tooltip; } - public get color(): string { + public get color(): string | ThemeColor { return this._color; } @@ -75,7 +75,7 @@ export class ExtHostStatusBarEntry implements StatusBarItem { this.update(); } - public set color(color: string) { + public set color(color: string | ThemeColor) { this._color = color; this.update(); } diff --git a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts index 123f0f5d26e02..fd2fd574fb4b4 100644 --- a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts +++ b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts @@ -30,6 +30,8 @@ import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } import { STATUS_BAR_BACKGROUND, STATUS_BAR_FOREGROUND, STATUS_BAR_NO_FOLDER_BACKGROUND, STATUS_BAR_ITEM_HOVER_BACKGROUND, STATUS_BAR_ITEM_ACTIVE_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND, STATUS_BAR_BORDER, STATUS_BAR_NO_FOLDER_FOREGROUND } from 'vs/workbench/common/theme'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { contrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { isThemeColor } from "vs/editor/common/editorCommon"; +import { Color } from 'vs/base/common/color'; export class StatusbarPart extends Part implements IStatusbarService { @@ -217,7 +219,8 @@ class StatusBarEntryItem implements IStatusbarItem { @IMessageService private messageService: IMessageService, @ITelemetryService private telemetryService: ITelemetryService, @IContextMenuService private contextMenuService: IContextMenuService, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService + @IWorkbenchEditorService private editorService: IWorkbenchEditorService, + @IThemeService private themeService: IThemeService ) { this.entry = entry; @@ -249,8 +252,17 @@ class StatusBarEntryItem implements IStatusbarItem { } // Color - if (this.entry.color) { - $(textContainer).color(this.entry.color); + let color = this.entry.color; + if (color) { + if (isThemeColor(color)) { + let colorId = color.id; + color = (this.themeService.getTheme().getColor(colorId) || Color.transparent).toString(); + toDispose.push(this.themeService.onThemeChange(theme => { + let colorValue = (this.themeService.getTheme().getColor(colorId) || Color.transparent).toString(); + $(textContainer).color(colorValue); + })); + } + $(textContainer).color(color); } // Context Menu From 43003d7ff65cdf8a5de2d69360c69d61d9ef96d7 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 24 May 2017 23:50:40 +0200 Subject: [PATCH 1125/2747] Fix deprecation warning on StyleSheet.insertRule --- src/vs/editor/browser/services/codeEditorServiceImpl.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index 703e6e4f0eec0..26bc62e9e6a2d 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -316,15 +316,15 @@ class DecorationCSSRules { let hasContent = false; if (unthemedCSS.length > 0) { - sheet.insertRule(`${this._unThemedSelector} {${unthemedCSS}}`); + sheet.insertRule(`${this._unThemedSelector} {${unthemedCSS}}`, 0); hasContent = true; } if (lightCSS.length > 0) { - sheet.insertRule(`.vs${this._unThemedSelector} {${lightCSS}}`); + sheet.insertRule(`.vs${this._unThemedSelector} {${lightCSS}}`, 0); hasContent = true; } if (darkCSS.length > 0) { - sheet.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${darkCSS}}`); + sheet.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${darkCSS}}`, 0); hasContent = true; } this._hasContent = hasContent; From 59e7fbc25eabf4143c29d9df575fce1875e10e70 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 24 May 2017 15:03:40 -0700 Subject: [PATCH 1126/2747] use alwaysStrict in TS extension --- extensions/typescript/src/features/baseCodeLensProvider.ts | 2 -- extensions/typescript/src/features/bufferSyncSupport.ts | 1 - extensions/typescript/src/features/codeActionProvider.ts | 2 -- extensions/typescript/src/features/completionItemProvider.ts | 2 -- extensions/typescript/src/features/definitionProvider.ts | 2 -- extensions/typescript/src/features/definitionProviderBase.ts | 2 -- .../src/features/directiveCommentCompletionProvider.ts | 2 -- .../typescript/src/features/documentHighlightProvider.ts | 2 -- extensions/typescript/src/features/documentSymbolProvider.ts | 2 -- extensions/typescript/src/features/formattingProvider.ts | 2 -- extensions/typescript/src/features/hoverProvider.ts | 2 -- extensions/typescript/src/features/implementationProvider.ts | 2 -- .../src/features/implementationsCodeLensProvider.ts | 2 -- extensions/typescript/src/features/jsDocCompletionProvider.ts | 2 -- extensions/typescript/src/features/previewer.ts | 2 -- extensions/typescript/src/features/referenceProvider.ts | 2 -- .../typescript/src/features/referencesCodeLensProvider.ts | 2 -- extensions/typescript/src/features/renameProvider.ts | 2 -- extensions/typescript/src/features/signatureHelpProvider.ts | 2 -- extensions/typescript/src/features/typeDefinitionProvider.ts | 2 -- extensions/typescript/src/features/workspaceSymbolProvider.ts | 2 -- extensions/typescript/src/protocol.const.ts | 2 -- extensions/typescript/src/typescriptMain.ts | 1 - extensions/typescript/src/typescriptService.ts | 1 - extensions/typescript/src/typescriptServiceClient.ts | 2 -- extensions/typescript/src/utils/async.ts | 2 -- extensions/typescript/src/utils/buildStatus.ts | 2 -- extensions/typescript/src/utils/electron.ts | 2 -- extensions/typescript/src/utils/is.ts | 2 -- extensions/typescript/src/utils/logger.ts | 2 -- extensions/typescript/src/utils/plugins.ts | 1 - extensions/typescript/src/utils/projectStatus.ts | 2 -- extensions/typescript/src/utils/telemetry.ts | 2 -- extensions/typescript/src/utils/tracer.ts | 2 -- extensions/typescript/src/utils/typingsStatus.ts | 2 -- extensions/typescript/src/utils/versionStatus.ts | 2 -- extensions/typescript/src/utils/wireProtocol.ts | 2 -- extensions/typescript/tsconfig.json | 4 +++- 38 files changed, 3 insertions(+), 71 deletions(-) diff --git a/extensions/typescript/src/features/baseCodeLensProvider.ts b/extensions/typescript/src/features/baseCodeLensProvider.ts index 98e4de9cc1c2d..20952150c4b57 100644 --- a/extensions/typescript/src/features/baseCodeLensProvider.ts +++ b/extensions/typescript/src/features/baseCodeLensProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { CodeLensProvider, CodeLens, CancellationToken, TextDocument, Range, Uri, Position, Event, EventEmitter, ProviderResult, } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/bufferSyncSupport.ts b/extensions/typescript/src/features/bufferSyncSupport.ts index dfb32d759da02..f2b11faebefea 100644 --- a/extensions/typescript/src/features/bufferSyncSupport.ts +++ b/extensions/typescript/src/features/bufferSyncSupport.ts @@ -2,7 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; import * as cp from 'child_process'; import * as fs from 'fs'; diff --git a/extensions/typescript/src/features/codeActionProvider.ts b/extensions/typescript/src/features/codeActionProvider.ts index 0a9d297987c7a..8f0dd56f01d93 100644 --- a/extensions/typescript/src/features/codeActionProvider.ts +++ b/extensions/typescript/src/features/codeActionProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { CodeActionProvider, TextDocument, Range, CancellationToken, CodeActionContext, Command, commands, Uri, workspace, WorkspaceEdit, TextEdit, FormattingOptions, window, ProviderResult } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/completionItemProvider.ts b/extensions/typescript/src/features/completionItemProvider.ts index 618c84174bc7f..5f0740be10ccf 100644 --- a/extensions/typescript/src/features/completionItemProvider.ts +++ b/extensions/typescript/src/features/completionItemProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { CompletionItem, TextDocument, Position, CompletionItemKind, CompletionItemProvider, CancellationToken, TextEdit, Range, SnippetString, workspace, ProviderResult } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; diff --git a/extensions/typescript/src/features/definitionProvider.ts b/extensions/typescript/src/features/definitionProvider.ts index ee364a636140a..2713fc603db33 100644 --- a/extensions/typescript/src/features/definitionProvider.ts +++ b/extensions/typescript/src/features/definitionProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { DefinitionProvider, TextDocument, Position, CancellationToken, Definition } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; diff --git a/extensions/typescript/src/features/definitionProviderBase.ts b/extensions/typescript/src/features/definitionProviderBase.ts index 3cf6690101571..b405d28fbaf1f 100644 --- a/extensions/typescript/src/features/definitionProviderBase.ts +++ b/extensions/typescript/src/features/definitionProviderBase.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { TextDocument, Position, Range, CancellationToken, Location } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/directiveCommentCompletionProvider.ts b/extensions/typescript/src/features/directiveCommentCompletionProvider.ts index a334e8c2f7b78..6dd8aa8418d84 100644 --- a/extensions/typescript/src/features/directiveCommentCompletionProvider.ts +++ b/extensions/typescript/src/features/directiveCommentCompletionProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { Position, CompletionItemProvider, CompletionItemKind, TextDocument, CancellationToken, CompletionItem, ProviderResult, Range } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; diff --git a/extensions/typescript/src/features/documentHighlightProvider.ts b/extensions/typescript/src/features/documentHighlightProvider.ts index afffc9fa60ca9..f0140953d923c 100644 --- a/extensions/typescript/src/features/documentHighlightProvider.ts +++ b/extensions/typescript/src/features/documentHighlightProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { DocumentHighlightProvider, DocumentHighlight, DocumentHighlightKind, TextDocument, Position, Range, CancellationToken } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/documentSymbolProvider.ts b/extensions/typescript/src/features/documentSymbolProvider.ts index 5d4a8595a37a4..aa6a4e5ab7f64 100644 --- a/extensions/typescript/src/features/documentSymbolProvider.ts +++ b/extensions/typescript/src/features/documentSymbolProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { DocumentSymbolProvider, SymbolInformation, SymbolKind, TextDocument, Range, Location, CancellationToken, Uri } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/formattingProvider.ts b/extensions/typescript/src/features/formattingProvider.ts index 77f6971201e48..40b5522d0fa19 100644 --- a/extensions/typescript/src/features/formattingProvider.ts +++ b/extensions/typescript/src/features/formattingProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { workspace as Workspace, DocumentRangeFormattingEditProvider, OnTypeFormattingEditProvider, FormattingOptions, TextDocument, Position, Range, CancellationToken, TextEdit, WorkspaceConfiguration } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/hoverProvider.ts b/extensions/typescript/src/features/hoverProvider.ts index 75d36131bafde..e726ff1dc3478 100644 --- a/extensions/typescript/src/features/hoverProvider.ts +++ b/extensions/typescript/src/features/hoverProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { HoverProvider, Hover, TextDocument, Position, Range, CancellationToken } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/implementationProvider.ts b/extensions/typescript/src/features/implementationProvider.ts index 452afad10331c..ab4d5b8c45bed 100644 --- a/extensions/typescript/src/features/implementationProvider.ts +++ b/extensions/typescript/src/features/implementationProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { ImplementationProvider, TextDocument, Position, CancellationToken, Definition } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; diff --git a/extensions/typescript/src/features/implementationsCodeLensProvider.ts b/extensions/typescript/src/features/implementationsCodeLensProvider.ts index 793176bb4f625..30daa644a4edc 100644 --- a/extensions/typescript/src/features/implementationsCodeLensProvider.ts +++ b/extensions/typescript/src/features/implementationsCodeLensProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { CodeLens, CancellationToken, TextDocument, Range, Location, ProviderResult, workspace } from 'vscode'; import * as Proto from '../protocol'; import * as PConst from '../protocol.const'; diff --git a/extensions/typescript/src/features/jsDocCompletionProvider.ts b/extensions/typescript/src/features/jsDocCompletionProvider.ts index fc8e88d5df254..da02e942bfc3c 100644 --- a/extensions/typescript/src/features/jsDocCompletionProvider.ts +++ b/extensions/typescript/src/features/jsDocCompletionProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { Position, Range, CompletionItemProvider, CompletionItemKind, TextDocument, CancellationToken, CompletionItem, window, Uri, ProviderResult, TextEditor, SnippetString, workspace } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; diff --git a/extensions/typescript/src/features/previewer.ts b/extensions/typescript/src/features/previewer.ts index d02ab69550bb4..c418e92d59ab7 100644 --- a/extensions/typescript/src/features/previewer.ts +++ b/extensions/typescript/src/features/previewer.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import * as Proto from '../protocol'; export function plain(parts: Proto.SymbolDisplayPart[]): string { diff --git a/extensions/typescript/src/features/referenceProvider.ts b/extensions/typescript/src/features/referenceProvider.ts index 56aac3a0cd8e3..47921d128ea8c 100644 --- a/extensions/typescript/src/features/referenceProvider.ts +++ b/extensions/typescript/src/features/referenceProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { ReferenceProvider, Location, TextDocument, Position, Range, CancellationToken } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/referencesCodeLensProvider.ts b/extensions/typescript/src/features/referencesCodeLensProvider.ts index 46ecf347e7292..5576bfc48250b 100644 --- a/extensions/typescript/src/features/referencesCodeLensProvider.ts +++ b/extensions/typescript/src/features/referencesCodeLensProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { CodeLens, CancellationToken, TextDocument, Range, Location, ProviderResult, workspace } from 'vscode'; import * as Proto from '../protocol'; import * as PConst from '../protocol.const'; diff --git a/extensions/typescript/src/features/renameProvider.ts b/extensions/typescript/src/features/renameProvider.ts index da279ab5596af..39c85f307a736 100644 --- a/extensions/typescript/src/features/renameProvider.ts +++ b/extensions/typescript/src/features/renameProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { RenameProvider, WorkspaceEdit, TextDocument, Position, Range, CancellationToken } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/features/signatureHelpProvider.ts b/extensions/typescript/src/features/signatureHelpProvider.ts index b8247e03154ad..0a79487862415 100644 --- a/extensions/typescript/src/features/signatureHelpProvider.ts +++ b/extensions/typescript/src/features/signatureHelpProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { SignatureHelpProvider, SignatureHelp, SignatureInformation, ParameterInformation, TextDocument, Position, CancellationToken } from 'vscode'; import * as Previewer from './previewer'; diff --git a/extensions/typescript/src/features/typeDefinitionProvider.ts b/extensions/typescript/src/features/typeDefinitionProvider.ts index edaccf0bf3330..d107f67580a06 100644 --- a/extensions/typescript/src/features/typeDefinitionProvider.ts +++ b/extensions/typescript/src/features/typeDefinitionProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { TypeDefinitionProvider, TextDocument, Position, CancellationToken, Definition } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; diff --git a/extensions/typescript/src/features/workspaceSymbolProvider.ts b/extensions/typescript/src/features/workspaceSymbolProvider.ts index 8593c4a895520..016ac8726b342 100644 --- a/extensions/typescript/src/features/workspaceSymbolProvider.ts +++ b/extensions/typescript/src/features/workspaceSymbolProvider.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { workspace, window, Uri, WorkspaceSymbolProvider, SymbolInformation, SymbolKind, Range, Location, CancellationToken } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/protocol.const.ts b/extensions/typescript/src/protocol.const.ts index 6990868683d89..822e05d2b2117 100644 --- a/extensions/typescript/src/protocol.const.ts +++ b/extensions/typescript/src/protocol.const.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - export class Kind { public static readonly alias = 'alias'; public static readonly callSignature = 'call'; diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 037ae6f8464e2..45ba3a85290df 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -7,7 +7,6 @@ * Includes code from typescript-sublime-plugin project, obtained from * https://github.com/Microsoft/TypeScript-Sublime-Plugin/blob/master/TypeScript%20Indent.tmPreferences * ------------------------------------------------------------------------------------------ */ -'use strict'; import { env, languages, commands, workspace, window, ExtensionContext, Memento, IndentAction, Diagnostic, DiagnosticCollection, Range, Disposable, Uri, MessageItem, TextEditor, DiagnosticSeverity, TextDocument, SnippetString } from 'vscode'; diff --git a/extensions/typescript/src/typescriptService.ts b/extensions/typescript/src/typescriptService.ts index bfc410c6cbab2..8b15cc79f7bc0 100644 --- a/extensions/typescript/src/typescriptService.ts +++ b/extensions/typescript/src/typescriptService.ts @@ -3,7 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; import { CancellationToken, Uri, Event } from 'vscode'; import * as Proto from './protocol'; diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index f5a92dbd4cd38..cf2b7c3be6fd8 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import * as cp from 'child_process'; import * as path from 'path'; import * as fs from 'fs'; diff --git a/extensions/typescript/src/utils/async.ts b/extensions/typescript/src/utils/async.ts index fb260bde50b4f..f87754e69e89a 100644 --- a/extensions/typescript/src/utils/async.ts +++ b/extensions/typescript/src/utils/async.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - export interface ITask { (): T; } diff --git a/extensions/typescript/src/utils/buildStatus.ts b/extensions/typescript/src/utils/buildStatus.ts index cf640508af34c..ced56fd43b900 100644 --- a/extensions/typescript/src/utils/buildStatus.ts +++ b/extensions/typescript/src/utils/buildStatus.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import vscode = require('vscode'); const statusItem: vscode.StatusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, Number.MIN_VALUE); diff --git a/extensions/typescript/src/utils/electron.ts b/extensions/typescript/src/utils/electron.ts index 51c4451989159..4418ca51dbd36 100644 --- a/extensions/typescript/src/utils/electron.ts +++ b/extensions/typescript/src/utils/electron.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import path = require('path'); import os = require('os'); import net = require('net'); diff --git a/extensions/typescript/src/utils/is.ts b/extensions/typescript/src/utils/is.ts index 78ef8c734cdcc..fc6fd6ad2861b 100644 --- a/extensions/typescript/src/utils/is.ts +++ b/extensions/typescript/src/utils/is.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - const toString = Object.prototype.toString; export function defined(value: any): boolean { diff --git a/extensions/typescript/src/utils/logger.ts b/extensions/typescript/src/utils/logger.ts index 577314c351d05..7f82fb28c96dc 100644 --- a/extensions/typescript/src/utils/logger.ts +++ b/extensions/typescript/src/utils/logger.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { OutputChannel, window } from "vscode"; import * as is from './is'; diff --git a/extensions/typescript/src/utils/plugins.ts b/extensions/typescript/src/utils/plugins.ts index 24fb56e99b72f..49f0d93b4b6c0 100644 --- a/extensions/typescript/src/utils/plugins.ts +++ b/extensions/typescript/src/utils/plugins.ts @@ -2,7 +2,6 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; import { extensions } from "vscode"; diff --git a/extensions/typescript/src/utils/projectStatus.ts b/extensions/typescript/src/utils/projectStatus.ts index f6042d2944913..8c9911531eb64 100644 --- a/extensions/typescript/src/utils/projectStatus.ts +++ b/extensions/typescript/src/utils/projectStatus.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import * as vscode from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; import { loadMessageBundle } from 'vscode-nls'; diff --git a/extensions/typescript/src/utils/telemetry.ts b/extensions/typescript/src/utils/telemetry.ts index 17c43339a9ebf..5162a0c24d5e2 100644 --- a/extensions/typescript/src/utils/telemetry.ts +++ b/extensions/typescript/src/utils/telemetry.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import * as path from 'path'; import VsCodeTelemetryReporter from 'vscode-extension-telemetry'; import { Disposable } from "vscode"; diff --git a/extensions/typescript/src/utils/tracer.ts b/extensions/typescript/src/utils/tracer.ts index 078d2e6f45a53..fe16a13d61a86 100644 --- a/extensions/typescript/src/utils/tracer.ts +++ b/extensions/typescript/src/utils/tracer.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { workspace } from 'vscode'; import * as Proto from '../protocol'; diff --git a/extensions/typescript/src/utils/typingsStatus.ts b/extensions/typescript/src/utils/typingsStatus.ts index 4798046abf622..44f90ec15c1a9 100644 --- a/extensions/typescript/src/utils/typingsStatus.ts +++ b/extensions/typescript/src/utils/typingsStatus.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import { MessageItem, workspace, Disposable, ProgressLocation, window, commands, Uri } from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; import { loadMessageBundle } from 'vscode-nls'; diff --git a/extensions/typescript/src/utils/versionStatus.ts b/extensions/typescript/src/utils/versionStatus.ts index 358d3a9b10301..e92b87d0f248b 100644 --- a/extensions/typescript/src/utils/versionStatus.ts +++ b/extensions/typescript/src/utils/versionStatus.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import vscode = require('vscode'); const versionBarEntry = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, Number.MIN_VALUE); diff --git a/extensions/typescript/src/utils/wireProtocol.ts b/extensions/typescript/src/utils/wireProtocol.ts index 218d461f853bf..ad5d464304d35 100644 --- a/extensions/typescript/src/utils/wireProtocol.ts +++ b/extensions/typescript/src/utils/wireProtocol.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -'use strict'; - import stream = require('stream'); const DefaultSize: number = 8192; diff --git a/extensions/typescript/tsconfig.json b/extensions/typescript/tsconfig.json index 3112725c10315..da4f1bb399b46 100644 --- a/extensions/typescript/tsconfig.json +++ b/extensions/typescript/tsconfig.json @@ -11,7 +11,9 @@ "noImplicitAny": true, "noImplicitReturns": true, "noUnusedLocals": true, - "noUnusedParameters": true + "noUnusedParameters": true, + "strict": true, + "alwaysStrict": true }, "include": [ "src/**/*" From 2890b5d8ab3d3a9fe9dd3401ebc9f14c9fa89319 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 24 May 2017 15:07:43 -0700 Subject: [PATCH 1127/2747] Add restart TSServer command. Fixes #22335 --- extensions/typescript/package.json | 5 +++++ extensions/typescript/package.nls.json | 1 + extensions/typescript/src/typescriptMain.ts | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index cb4fa518bf083..a24c0c1051906 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -345,6 +345,11 @@ "command": "typescript.openTsServerLog", "title": "%typescript.openTsServerLog.title%", "category": "TypeScript" + }, + { + "command": "typescript.restartTsServer", + "title": "%typescript.restartTsServer%", + "category": "TypeScript" } ], "menus": { diff --git a/extensions/typescript/package.nls.json b/extensions/typescript/package.nls.json index faa59a26d7f3a..821257b38a130 100644 --- a/extensions/typescript/package.nls.json +++ b/extensions/typescript/package.nls.json @@ -32,6 +32,7 @@ "typescript.referencesCodeLens.enabled": "Enable/disable references CodeLens in TypeScript files. Requires TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Enable/disable implementations CodeLens. Requires TypeScript >= 2.2.0.", "typescript.openTsServerLog.title": "Open TS Server log", + "typescript.restartTsServer": "Restart TS server", "typescript.selectTypeScriptVersion.title": "Select TypeScript Version", "jsDocCompletion.enabled": "Enable/disable auto JSDoc comments", "javascript.implicitProjectConfig.checkJs": "Enable/disable semantic checking of JavaScript files. Existing jsconfig.json or tsconfig.json files override this setting. Requires TypeScript >=2.3.1.", diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 45ba3a85290df..9949d0db9d2fb 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -109,6 +109,10 @@ export function activate(context: ExtensionContext): void { client.openTsServerLogFile(); })); + context.subscriptions.push(commands.registerCommand('typescript.restartTsServer', () => { + client.restartTsServer(); + })); + const goToProjectConfig = (isTypeScript: boolean) => { const editor = window.activeTextEditor; if (editor) { From d21ff22a1fbceae4b04c517e0cb49c679242154b Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 24 May 2017 15:11:57 -0700 Subject: [PATCH 1128/2747] Fix #27144. We just need to listen to scrollTop change for FindWidget --- src/vs/editor/contrib/find/browser/findWidget.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index 74454a278ec52..78e442c699205 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -235,7 +235,9 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas })); this._register(this._codeEditor.onDidScrollChange((e) => { - this._layoutViewZone(); + if (e.scrollTopChanged) { + this._layoutViewZone(); + } })); } From 3aade944ae7ff0bc62183614f547477fa1722d8c Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 24 May 2017 16:43:49 +0200 Subject: [PATCH 1129/2747] Introduce `multicursorModifier` editor options --- .../common/config/commonEditorConfig.ts | 6 ++++ src/vs/editor/common/config/editorOptions.ts | 34 +++++++++++++++++++ src/vs/monaco.d.ts | 7 ++++ 3 files changed, 47 insertions(+) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 6fca4c237d054..bf24f6608befd 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -321,6 +321,12 @@ const editorConfiguration: IConfigurationNode = { 'default': EDITOR_DEFAULTS.viewInfo.scrollbar.mouseWheelScrollSensitivity, 'description': nls.localize('mouseWheelScrollSensitivity', "A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events") }, + 'editor.multicursorModifier': { + 'type': 'string', + 'enum': (platform.isMacintosh ? ['cmd', 'alt'] : ['ctrl', 'alt']), + 'default': 'alt', + 'description': nls.localize('multicursorModifier', "The modifier to be used to add multiple cursors with the mouse.") + }, 'editor.quickSuggestions': { 'anyOf': [ { diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 59056ff82270c..720302d227e30 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -331,6 +331,11 @@ export interface IEditorOptions { * Defaults to 1. */ mouseWheelScrollSensitivity?: number; + /** + * The modifier to be used to add multiple cursors with the mouse. + * Defaults to 'alt' + */ + multicursorModifier?: 'cmd' | 'ctrl' | 'alt'; /** * Enable quick suggestions (shadow suggestions) * Defaults to true. @@ -783,6 +788,7 @@ export interface IValidatedEditorOptions { readonly dragAndDrop: boolean; readonly emptySelectionClipboard: boolean; readonly useTabStops: boolean; + readonly multicursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; readonly viewInfo: InternalEditorViewOptions; readonly contribInfo: EditorContribOptions; @@ -803,6 +809,7 @@ export class InternalEditorOptions { * @internal */ readonly accessibilitySupport: platform.AccessibilitySupport; + readonly multicursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; // ---- cursor options readonly wordSeparators: string; @@ -829,6 +836,7 @@ export class InternalEditorOptions { lineHeight: number; readOnly: boolean; accessibilitySupport: platform.AccessibilitySupport; + multicursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; wordSeparators: string; autoClosingBrackets: boolean; useTabStops: boolean; @@ -847,6 +855,7 @@ export class InternalEditorOptions { this.lineHeight = source.lineHeight | 0; this.readOnly = source.readOnly; this.accessibilitySupport = source.accessibilitySupport; + this.multicursorModifier = source.multicursorModifier; this.wordSeparators = source.wordSeparators; this.autoClosingBrackets = source.autoClosingBrackets; this.useTabStops = source.useTabStops; @@ -871,6 +880,7 @@ export class InternalEditorOptions { && this.lineHeight === other.lineHeight && this.readOnly === other.readOnly && this.accessibilitySupport === other.accessibilitySupport + && this.multicursorModifier === other.multicursorModifier && this.wordSeparators === other.wordSeparators && this.autoClosingBrackets === other.autoClosingBrackets && this.useTabStops === other.useTabStops @@ -896,6 +906,7 @@ export class InternalEditorOptions { lineHeight: (this.lineHeight !== newOpts.lineHeight), readOnly: (this.readOnly !== newOpts.readOnly), accessibilitySupport: (this.accessibilitySupport !== newOpts.accessibilitySupport), + multicursorModifier: (this.multicursorModifier !== newOpts.multicursorModifier), wordSeparators: (this.wordSeparators !== newOpts.wordSeparators), autoClosingBrackets: (this.autoClosingBrackets !== newOpts.autoClosingBrackets), useTabStops: (this.useTabStops !== newOpts.useTabStops), @@ -1233,6 +1244,7 @@ export interface IConfigurationChangedEvent { readonly lineHeight: boolean; readonly readOnly: boolean; readonly accessibilitySupport: boolean; + readonly multicursorModifier: boolean; readonly wordSeparators: boolean; readonly autoClosingBrackets: boolean; readonly useTabStops: boolean; @@ -1386,6 +1398,24 @@ export class EditorOptionsValidator { const viewInfo = this._sanitizeViewInfo(opts, defaults.viewInfo); const contribInfo = this._sanitizeContribInfo(opts, defaults.contribInfo); + let configuredMulticursorModifier: 'altKey' | 'metaKey' | 'ctrlKey'; + if (typeof opts.multicursorModifier === 'string') { + if (platform.isMacintosh) { + if (opts.multicursorModifier === 'cmd') { + configuredMulticursorModifier = 'metaKey'; + } else { + configuredMulticursorModifier = 'altKey'; + } + } else { + if (opts.multicursorModifier === 'ctrl') { + configuredMulticursorModifier = 'ctrlKey'; + } else { + configuredMulticursorModifier = 'altKey'; + } + } + } + const multicursorModifier = _stringSet<'altKey' | 'metaKey' | 'ctrlKey'>(configuredMulticursorModifier, defaults.multicursorModifier, ['altKey', 'metaKey', 'ctrlKey']); + return { inDiffEditor: _boolean(opts.inDiffEditor, defaults.inDiffEditor), wordSeparators: _string(opts.wordSeparators, defaults.wordSeparators), @@ -1406,6 +1436,7 @@ export class EditorOptionsValidator { dragAndDrop: _boolean(opts.dragAndDrop, defaults.dragAndDrop), emptySelectionClipboard: _boolean(opts.emptySelectionClipboard, defaults.emptySelectionClipboard), useTabStops: _boolean(opts.useTabStops, defaults.useTabStops), + multicursorModifier: multicursorModifier, viewInfo: viewInfo, contribInfo: contribInfo, }; @@ -1629,6 +1660,7 @@ export class InternalEditorOptionsFactory { dragAndDrop: opts.dragAndDrop, emptySelectionClipboard: opts.emptySelectionClipboard, useTabStops: opts.useTabStops, + multicursorModifier: opts.multicursorModifier, viewInfo: { extraEditorClassName: opts.viewInfo.extraEditorClassName, @@ -1805,6 +1837,7 @@ export class InternalEditorOptionsFactory { lineHeight: env.fontInfo.lineHeight, readOnly: opts.readOnly, accessibilitySupport: env.accessibilitySupport, + multicursorModifier: opts.multicursorModifier, wordSeparators: opts.wordSeparators, autoClosingBrackets: opts.autoClosingBrackets, useTabStops: opts.useTabStops, @@ -2023,6 +2056,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { dragAndDrop: false, emptySelectionClipboard: true, useTabStops: true, + multicursorModifier: 'altKey', viewInfo: { extraEditorClassName: '', diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 707cb1047fa20..7f3c80b83fa95 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2876,6 +2876,11 @@ declare module monaco.editor { * Defaults to 1. */ mouseWheelScrollSensitivity?: number; + /** + * The modifier to be used to add multiple cursors with the mouse. + * Defaults to 'alt' + */ + multicursorModifier?: 'cmd' | 'ctrl' | 'alt'; /** * Enable quick suggestions (shadow suggestions) * Defaults to true. @@ -3257,6 +3262,7 @@ declare module monaco.editor { readonly editorClassName: string; readonly lineHeight: number; readonly readOnly: boolean; + readonly multicursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; readonly wordSeparators: string; readonly autoClosingBrackets: boolean; readonly useTabStops: boolean; @@ -3388,6 +3394,7 @@ declare module monaco.editor { readonly lineHeight: boolean; readonly readOnly: boolean; readonly accessibilitySupport: boolean; + readonly multicursorModifier: boolean; readonly wordSeparators: boolean; readonly autoClosingBrackets: boolean; readonly useTabStops: boolean; From 434d941e639acab3e0c6f867cb144d69dc2dd980 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 24 May 2017 17:35:55 +0200 Subject: [PATCH 1130/2747] Encapsulate trigger modifier logic in goToDeclarationMouse --- .../browser/goToDeclarationMouse.ts | 81 +++++++++++++------ 1 file changed, 58 insertions(+), 23 deletions(-) diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts index 05aecd1ec0f70..15ccefb5d73ba 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts @@ -30,6 +30,40 @@ import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegist import { EditorState, CodeEditorStateFlag } from 'vs/editor/common/core/editorState'; import { DefinitionAction, DefinitionActionConfig } from './goToDeclarationCommands'; +/** + * An event that encapsulates the various trigger modifiers logic needed for go to definition. + */ +class MyMouseEvent { + + public readonly target: IMouseTarget; + public readonly hasTriggerModifier: boolean; + public readonly hasSideBySideModifier: boolean; + public readonly isSingleMouseDown: boolean; + + constructor(source: IEditorMouseEvent) { + this.target = source.target; + this.hasTriggerModifier = !!source.event[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER]; + this.hasSideBySideModifier = source.event.altKey; + this.isSingleMouseDown = (browser.isIE || source.event.detail <= 1); // IE does not support event.detail properly + } +} + +/** + * An event that encapsulates the various trigger modifiers logic needed for go to definition. + */ +class MyKeyboardEvent { + + public readonly keyCodeIsTriggerKey: boolean; + public readonly keyCodeIsSideBySideKey: boolean; + public readonly hasTriggerModifier: boolean; + + constructor(source: IKeyboardEvent) { + this.keyCodeIsTriggerKey = (source.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_KEY_VALUE); + this.keyCodeIsSideBySideKey = (source.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_SIDEBYSIDE_KEY_VALUE); + this.hasTriggerModifier = !!source[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER]; + } +} + @editorContribution class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorContribution { @@ -44,7 +78,7 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC private decorations: string[]; private currentWordUnderMouse: editorCommon.IWordAtPosition; private throttler: Throttler; - private lastMouseMoveEvent: IEditorMouseEvent; + private lastMouseMoveEvent: MyMouseEvent; private hasTriggerKeyOnMouseDown: boolean; constructor( @@ -57,12 +91,12 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC this.editor = editor; this.throttler = new Throttler(); - this.toUnhook.push(this.editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(e))); - this.toUnhook.push(this.editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(e))); - this.toUnhook.push(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(e))); + this.toUnhook.push(this.editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(new MyMouseEvent(e)))); + this.toUnhook.push(this.editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(new MyMouseEvent(e)))); + this.toUnhook.push(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(new MyMouseEvent(e)))); this.toUnhook.push(this.editor.onMouseDrag(() => this.resetHandler())); - this.toUnhook.push(this.editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(e))); - this.toUnhook.push(this.editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(e))); + this.toUnhook.push(this.editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(new MyKeyboardEvent(e)))); + this.toUnhook.push(this.editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(new MyKeyboardEvent(e)))); this.toUnhook.push(this.editor.onDidChangeCursorSelection((e) => this.onDidChangeCursorSelection(e))); this.toUnhook.push(this.editor.onDidChangeModel((e) => this.resetHandler())); @@ -80,13 +114,13 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } - private onEditorMouseMove(mouseEvent: IEditorMouseEvent, withKey?: IKeyboardEvent): void { + private onEditorMouseMove(mouseEvent: MyMouseEvent): void { this.lastMouseMoveEvent = mouseEvent; - this.startFindDefinition(mouseEvent, withKey); + this.startFindDefinition(mouseEvent); } - private startFindDefinition(mouseEvent: IEditorMouseEvent, withKey?: IKeyboardEvent): void { + private startFindDefinition(mouseEvent: MyMouseEvent, withKey?: MyKeyboardEvent): void { if (!this.isEnabled(mouseEvent, withKey)) { this.currentWordUnderMouse = null; this.removeDecorations(); @@ -196,15 +230,16 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } - private onEditorKeyDown(e: IKeyboardEvent): void { + private onEditorKeyDown(e: MyKeyboardEvent): void { if ( - this.lastMouseMoveEvent && ( - e.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_KEY_VALUE || // User just pressed Ctrl/Cmd (normal goto definition) - e.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_SIDEBYSIDE_KEY_VALUE && e[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER] // User pressed Ctrl/Cmd+Alt (goto definition to the side) + this.lastMouseMoveEvent + && ( + e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition) + || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side) ) ) { this.startFindDefinition(this.lastMouseMoveEvent, e); - } else if (e[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER]) { + } else if (e.hasTriggerModifier) { this.removeDecorations(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration } } @@ -215,17 +250,17 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC this.removeDecorations(); } - private onEditorMouseDown(mouseEvent: IEditorMouseEvent): void { + private onEditorMouseDown(mouseEvent: MyMouseEvent): void { // We need to record if we had the trigger key on mouse down because someone might select something in the editor // holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then // release the mouse button without wanting to do the navigation. // With this flag we prevent goto definition if the mouse was down before the trigger key was pressed. - this.hasTriggerKeyOnMouseDown = !!mouseEvent.event[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER]; + this.hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier; } - private onEditorMouseUp(mouseEvent: IEditorMouseEvent): void { + private onEditorMouseUp(mouseEvent: MyMouseEvent): void { if (this.isEnabled(mouseEvent) && this.hasTriggerKeyOnMouseDown) { - this.gotoDefinition(mouseEvent.target, mouseEvent.event.altKey).done(() => { + this.gotoDefinition(mouseEvent.target, mouseEvent.hasSideBySideModifier).done(() => { this.removeDecorations(); }, (error: Error) => { this.removeDecorations(); @@ -234,18 +269,18 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } - private onEditorKeyUp(e: IKeyboardEvent): void { - if (e.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_KEY_VALUE) { + private onEditorKeyUp(e: MyKeyboardEvent): void { + if (e.keyCodeIsTriggerKey) { this.removeDecorations(); this.currentWordUnderMouse = null; } } - private isEnabled(mouseEvent: IEditorMouseEvent, withKey?: IKeyboardEvent): boolean { + private isEnabled(mouseEvent: MyMouseEvent, withKey?: MyKeyboardEvent): boolean { return this.editor.getModel() && - (browser.isIE || mouseEvent.event.detail <= 1) && // IE does not support event.detail properly + mouseEvent.isSingleMouseDown && mouseEvent.target.type === MouseTargetType.CONTENT_TEXT && - (mouseEvent.event[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER] || (withKey && withKey.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_KEY_VALUE)) && + (mouseEvent.hasTriggerModifier || (withKey && withKey.keyCodeIsTriggerKey)) && DefinitionProviderRegistry.has(this.editor.getModel()); } From 7bb5e4a68200b70e6ea7e259fff907b9d9fd9944 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 24 May 2017 17:40:31 +0200 Subject: [PATCH 1131/2747] Group method logically --- .../browser/goToDeclarationMouse.ts | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts index 15ccefb5d73ba..e4d9aa7b6f4fc 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts @@ -91,12 +91,12 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC this.editor = editor; this.throttler = new Throttler(); + this.toUnhook.push(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(new MyMouseEvent(e)))); this.toUnhook.push(this.editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(new MyMouseEvent(e)))); this.toUnhook.push(this.editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(new MyMouseEvent(e)))); - this.toUnhook.push(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(new MyMouseEvent(e)))); - this.toUnhook.push(this.editor.onMouseDrag(() => this.resetHandler())); this.toUnhook.push(this.editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(new MyKeyboardEvent(e)))); this.toUnhook.push(this.editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(new MyKeyboardEvent(e)))); + this.toUnhook.push(this.editor.onMouseDrag(() => this.resetHandler())); this.toUnhook.push(this.editor.onDidChangeCursorSelection((e) => this.onDidChangeCursorSelection(e))); this.toUnhook.push(this.editor.onDidChangeModel((e) => this.resetHandler())); @@ -114,12 +114,6 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } - private onEditorMouseMove(mouseEvent: MyMouseEvent): void { - this.lastMouseMoveEvent = mouseEvent; - - this.startFindDefinition(mouseEvent); - } - private startFindDefinition(mouseEvent: MyMouseEvent, withKey?: MyKeyboardEvent): void { if (!this.isEnabled(mouseEvent, withKey)) { this.currentWordUnderMouse = null; @@ -230,24 +224,10 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } - private onEditorKeyDown(e: MyKeyboardEvent): void { - if ( - this.lastMouseMoveEvent - && ( - e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition) - || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side) - ) - ) { - this.startFindDefinition(this.lastMouseMoveEvent, e); - } else if (e.hasTriggerModifier) { - this.removeDecorations(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration - } - } + private onEditorMouseMove(mouseEvent: MyMouseEvent): void { + this.lastMouseMoveEvent = mouseEvent; - private resetHandler(): void { - this.lastMouseMoveEvent = null; - this.hasTriggerKeyOnMouseDown = false; - this.removeDecorations(); + this.startFindDefinition(mouseEvent); } private onEditorMouseDown(mouseEvent: MyMouseEvent): void { @@ -269,6 +249,20 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } + private onEditorKeyDown(e: MyKeyboardEvent): void { + if ( + this.lastMouseMoveEvent + && ( + e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition) + || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side) + ) + ) { + this.startFindDefinition(this.lastMouseMoveEvent, e); + } else if (e.hasTriggerModifier) { + this.removeDecorations(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration + } + } + private onEditorKeyUp(e: MyKeyboardEvent): void { if (e.keyCodeIsTriggerKey) { this.removeDecorations(); @@ -276,6 +270,12 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } + private resetHandler(): void { + this.lastMouseMoveEvent = null; + this.hasTriggerKeyOnMouseDown = false; + this.removeDecorations(); + } + private isEnabled(mouseEvent: MyMouseEvent, withKey?: MyKeyboardEvent): boolean { return this.editor.getModel() && mouseEvent.isSingleMouseDown && From cc270a155da6278f971881d584ee173cef824d4c Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 24 May 2017 19:36:56 +0200 Subject: [PATCH 1132/2747] Encapsulate opening a link gesture in LinkGesture --- .../browser/goToDeclarationMouse.ts | 194 +++++++++++------- 1 file changed, 118 insertions(+), 76 deletions(-) diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts index e4d9aa7b6f4fc..9bc13d23c2bbb 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts @@ -22,13 +22,14 @@ import { Location, DefinitionProviderRegistry } from 'vs/editor/common/modes'; import { ICodeEditor, IEditorMouseEvent, IMouseTarget, MouseTargetType } from 'vs/editor/browser/editorBrowser'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { getDefinitionsAtPosition } from './goToDeclaration'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; import { ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { EditorState, CodeEditorStateFlag } from 'vs/editor/common/core/editorState'; import { DefinitionAction, DefinitionActionConfig } from './goToDeclarationCommands'; +import Event, { Emitter } from 'vs/base/common/event'; /** * An event that encapsulates the various trigger modifiers logic needed for go to definition. @@ -38,13 +39,13 @@ class MyMouseEvent { public readonly target: IMouseTarget; public readonly hasTriggerModifier: boolean; public readonly hasSideBySideModifier: boolean; - public readonly isSingleMouseDown: boolean; + public readonly isNoneOrSingleMouseDown: boolean; constructor(source: IEditorMouseEvent) { this.target = source.target; this.hasTriggerModifier = !!source.event[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER]; this.hasSideBySideModifier = source.event.altKey; - this.isSingleMouseDown = (browser.isIE || source.event.detail <= 1); // IE does not support event.detail properly + this.isNoneOrSingleMouseDown = (browser.isIE || source.event.detail <= 1); // IE does not support event.detail properly } } @@ -64,6 +65,99 @@ class MyKeyboardEvent { } } +class LinkGesture extends Disposable { + + private readonly editor: ICodeEditor; + + private lastMouseMoveEvent: MyMouseEvent; + private hasTriggerKeyOnMouseDown: boolean; + + private readonly _onMouseMoveOrRelevantKeyDown: Emitter<[MyMouseEvent, MyKeyboardEvent]> = this._register(new Emitter<[MyMouseEvent, MyKeyboardEvent]>()); + public readonly onMouseMoveOrRelevantKeyDown: Event<[MyMouseEvent, MyKeyboardEvent]> = this._onMouseMoveOrRelevantKeyDown.event; + + private readonly _onExecute: Emitter = this._register(new Emitter()); + public readonly onExecute: Event = this._onExecute.event; + + private readonly _onCancel: Emitter = this._register(new Emitter()); + public readonly onCancel: Event = this._onCancel.event; + + constructor(editor: ICodeEditor) { + super(); + + this.editor = editor; + this.lastMouseMoveEvent = null; + this.hasTriggerKeyOnMouseDown = false; + + this._register(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(new MyMouseEvent(e)))); + this._register(this.editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(new MyMouseEvent(e)))); + this._register(this.editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(new MyMouseEvent(e)))); + this._register(this.editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(new MyKeyboardEvent(e)))); + this._register(this.editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(new MyKeyboardEvent(e)))); + this._register(this.editor.onMouseDrag(() => this.resetHandler())); + + this._register(this.editor.onDidChangeCursorSelection((e) => this.onDidChangeCursorSelection(e))); + this._register(this.editor.onDidChangeModel((e) => this.resetHandler())); + this._register(this.editor.onDidChangeModelContent(() => this.resetHandler())); + this._register(this.editor.onDidScrollChange((e) => { + if (e.scrollTopChanged || e.scrollLeftChanged) { + this.resetHandler(); + } + })); + } + + private onDidChangeCursorSelection(e: ICursorSelectionChangedEvent): void { + if (e.selection && e.selection.startColumn !== e.selection.endColumn) { + this.resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/Microsoft/vscode/issues/7827) + } + } + + private onEditorMouseMove(mouseEvent: MyMouseEvent): void { + this.lastMouseMoveEvent = mouseEvent; + + this._onMouseMoveOrRelevantKeyDown.fire([mouseEvent, null]); + } + + private onEditorMouseDown(mouseEvent: MyMouseEvent): void { + // We need to record if we had the trigger key on mouse down because someone might select something in the editor + // holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then + // release the mouse button without wanting to do the navigation. + // With this flag we prevent goto definition if the mouse was down before the trigger key was pressed. + this.hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier; + } + + private onEditorMouseUp(mouseEvent: MyMouseEvent): void { + if (this.hasTriggerKeyOnMouseDown) { + this._onExecute.fire(mouseEvent); + } + } + + private onEditorKeyDown(e: MyKeyboardEvent): void { + if ( + this.lastMouseMoveEvent + && ( + e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition) + || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side) + ) + ) { + this._onMouseMoveOrRelevantKeyDown.fire([this.lastMouseMoveEvent, e]); + } else if (e.hasTriggerModifier) { + this._onCancel.fire(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration + } + } + + private onEditorKeyUp(e: MyKeyboardEvent): void { + if (e.keyCodeIsTriggerKey) { + this._onCancel.fire(); + } + } + + private resetHandler(): void { + this.lastMouseMoveEvent = null; + this.hasTriggerKeyOnMouseDown = false; + this._onCancel.fire(); + } +} + @editorContribution class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorContribution { @@ -78,8 +172,6 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC private decorations: string[]; private currentWordUnderMouse: editorCommon.IWordAtPosition; private throttler: Throttler; - private lastMouseMoveEvent: MyMouseEvent; - private hasTriggerKeyOnMouseDown: boolean; constructor( editor: ICodeEditor, @@ -91,27 +183,29 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC this.editor = editor; this.throttler = new Throttler(); - this.toUnhook.push(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(new MyMouseEvent(e)))); - this.toUnhook.push(this.editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(new MyMouseEvent(e)))); - this.toUnhook.push(this.editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(new MyMouseEvent(e)))); - this.toUnhook.push(this.editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(new MyKeyboardEvent(e)))); - this.toUnhook.push(this.editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(new MyKeyboardEvent(e)))); - this.toUnhook.push(this.editor.onMouseDrag(() => this.resetHandler())); - - this.toUnhook.push(this.editor.onDidChangeCursorSelection((e) => this.onDidChangeCursorSelection(e))); - this.toUnhook.push(this.editor.onDidChangeModel((e) => this.resetHandler())); - this.toUnhook.push(this.editor.onDidChangeModelContent(() => this.resetHandler())); - this.toUnhook.push(this.editor.onDidScrollChange((e) => { - if (e.scrollTopChanged || e.scrollLeftChanged) { - this.resetHandler(); + let linkGesture = new LinkGesture(editor); + this.toUnhook.push(linkGesture); + + this.toUnhook.push(linkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => { + this.startFindDefinition(mouseEvent, keyboardEvent); + })); + + this.toUnhook.push(linkGesture.onExecute((mouseEvent: MyMouseEvent) => { + if (this.isEnabled(mouseEvent)) { + this.gotoDefinition(mouseEvent.target, mouseEvent.hasSideBySideModifier).done(() => { + this.removeDecorations(); + }, (error: Error) => { + this.removeDecorations(); + onUnexpectedError(error); + }); } })); - } - private onDidChangeCursorSelection(e: ICursorSelectionChangedEvent): void { - if (e.selection && e.selection.startColumn !== e.selection.endColumn) { - this.resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/Microsoft/vscode/issues/7827) - } + this.toUnhook.push(linkGesture.onCancel(() => { + this.removeDecorations(); + this.currentWordUnderMouse = null; + })); + } private startFindDefinition(mouseEvent: MyMouseEvent, withKey?: MyKeyboardEvent): void { @@ -224,61 +318,9 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } - private onEditorMouseMove(mouseEvent: MyMouseEvent): void { - this.lastMouseMoveEvent = mouseEvent; - - this.startFindDefinition(mouseEvent); - } - - private onEditorMouseDown(mouseEvent: MyMouseEvent): void { - // We need to record if we had the trigger key on mouse down because someone might select something in the editor - // holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then - // release the mouse button without wanting to do the navigation. - // With this flag we prevent goto definition if the mouse was down before the trigger key was pressed. - this.hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier; - } - - private onEditorMouseUp(mouseEvent: MyMouseEvent): void { - if (this.isEnabled(mouseEvent) && this.hasTriggerKeyOnMouseDown) { - this.gotoDefinition(mouseEvent.target, mouseEvent.hasSideBySideModifier).done(() => { - this.removeDecorations(); - }, (error: Error) => { - this.removeDecorations(); - onUnexpectedError(error); - }); - } - } - - private onEditorKeyDown(e: MyKeyboardEvent): void { - if ( - this.lastMouseMoveEvent - && ( - e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition) - || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side) - ) - ) { - this.startFindDefinition(this.lastMouseMoveEvent, e); - } else if (e.hasTriggerModifier) { - this.removeDecorations(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration - } - } - - private onEditorKeyUp(e: MyKeyboardEvent): void { - if (e.keyCodeIsTriggerKey) { - this.removeDecorations(); - this.currentWordUnderMouse = null; - } - } - - private resetHandler(): void { - this.lastMouseMoveEvent = null; - this.hasTriggerKeyOnMouseDown = false; - this.removeDecorations(); - } - private isEnabled(mouseEvent: MyMouseEvent, withKey?: MyKeyboardEvent): boolean { return this.editor.getModel() && - mouseEvent.isSingleMouseDown && + mouseEvent.isNoneOrSingleMouseDown && mouseEvent.target.type === MouseTargetType.CONTENT_TEXT && (mouseEvent.hasTriggerModifier || (withKey && withKey.keyCodeIsTriggerKey)) && DefinitionProviderRegistry.has(this.editor.getModel()); From 647f1d5fc9be786719e723abf4f34c82bcaf4087 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 24 May 2017 20:34:46 +0200 Subject: [PATCH 1133/2747] Extract clicking link logic to its own file --- .../browser/clickLinkGesture.ts | 158 ++++++++++++++++++ .../browser/goToDeclarationMouse.ts | 150 ++--------------- 2 files changed, 170 insertions(+), 138 deletions(-) create mode 100644 src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts diff --git a/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts b/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts new file mode 100644 index 0000000000000..bec68dcf19a82 --- /dev/null +++ b/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts @@ -0,0 +1,158 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import 'vs/css!./goToDeclarationMouse'; +import { KeyCode } from 'vs/base/common/keyCodes'; +import * as browser from 'vs/base/browser/browser'; +import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { ICodeEditor, IEditorMouseEvent, IMouseTarget } from 'vs/editor/browser/editorBrowser'; +import { Disposable } from 'vs/base/common/lifecycle'; +import { ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; +import Event, { Emitter } from 'vs/base/common/event'; + +/** + * An event that encapsulates the various trigger modifiers logic needed for go to definition. + */ +export class ClickLinkMouseEvent { + + public readonly target: IMouseTarget; + public readonly hasTriggerModifier: boolean; + public readonly hasSideBySideModifier: boolean; + public readonly isNoneOrSingleMouseDown: boolean; + + constructor(source: IEditorMouseEvent, opts: ClickLinkOptions) { + this.target = source.target; + this.hasTriggerModifier = !!source.event[opts.triggerModifier]; + this.hasSideBySideModifier = source.event.altKey; + this.isNoneOrSingleMouseDown = (browser.isIE || source.event.detail <= 1); // IE does not support event.detail properly + } +} + +/** + * An event that encapsulates the various trigger modifiers logic needed for go to definition. + */ +export class ClickLinkKeyboardEvent { + + public readonly keyCodeIsTriggerKey: boolean; + public readonly keyCodeIsSideBySideKey: boolean; + public readonly hasTriggerModifier: boolean; + + constructor(source: IKeyboardEvent, opts: ClickLinkOptions) { + this.keyCodeIsTriggerKey = (source.keyCode === opts.triggerKey); + this.keyCodeIsSideBySideKey = (source.keyCode === opts.triggerSideBySideKey); + this.hasTriggerModifier = !!source[opts.triggerModifier]; + } +} + +export class ClickLinkOptions { + + public readonly triggerKey: KeyCode; + public readonly triggerModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey'; + public readonly triggerSideBySideKey: KeyCode; + + constructor(triggerKey: KeyCode, triggerModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey', triggerSideBySideKey: KeyCode) { + this.triggerKey = triggerKey; + this.triggerModifier = triggerModifier; + this.triggerSideBySideKey = triggerSideBySideKey; + } +} + +export class ClickLinkGesture extends Disposable { + + private readonly _onMouseMoveOrRelevantKeyDown: Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent]> = this._register(new Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent]>()); + public readonly onMouseMoveOrRelevantKeyDown: Event<[ClickLinkMouseEvent, ClickLinkKeyboardEvent]> = this._onMouseMoveOrRelevantKeyDown.event; + + private readonly _onExecute: Emitter = this._register(new Emitter()); + public readonly onExecute: Event = this._onExecute.event; + + private readonly _onCancel: Emitter = this._register(new Emitter()); + public readonly onCancel: Event = this._onCancel.event; + + private readonly _editor: ICodeEditor; + private readonly _opts: ClickLinkOptions; + + private lastMouseMoveEvent: ClickLinkMouseEvent; + private hasTriggerKeyOnMouseDown: boolean; + + constructor(editor: ICodeEditor, opts: ClickLinkOptions) { + super(); + + this._editor = editor; + this._opts = opts; + + this.lastMouseMoveEvent = null; + this.hasTriggerKeyOnMouseDown = false; + + this._register(this._editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(new ClickLinkMouseEvent(e, this._opts)))); + this._register(this._editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(new ClickLinkMouseEvent(e, this._opts)))); + this._register(this._editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(new ClickLinkMouseEvent(e, this._opts)))); + this._register(this._editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(new ClickLinkKeyboardEvent(e, this._opts)))); + this._register(this._editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(new ClickLinkKeyboardEvent(e, this._opts)))); + this._register(this._editor.onMouseDrag(() => this.resetHandler())); + + this._register(this._editor.onDidChangeCursorSelection((e) => this.onDidChangeCursorSelection(e))); + this._register(this._editor.onDidChangeModel((e) => this.resetHandler())); + this._register(this._editor.onDidChangeModelContent(() => this.resetHandler())); + this._register(this._editor.onDidScrollChange((e) => { + if (e.scrollTopChanged || e.scrollLeftChanged) { + this.resetHandler(); + } + })); + } + + private onDidChangeCursorSelection(e: ICursorSelectionChangedEvent): void { + if (e.selection && e.selection.startColumn !== e.selection.endColumn) { + this.resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/Microsoft/vscode/issues/7827) + } + } + + private onEditorMouseMove(mouseEvent: ClickLinkMouseEvent): void { + this.lastMouseMoveEvent = mouseEvent; + + this._onMouseMoveOrRelevantKeyDown.fire([mouseEvent, null]); + } + + private onEditorMouseDown(mouseEvent: ClickLinkMouseEvent): void { + // We need to record if we had the trigger key on mouse down because someone might select something in the editor + // holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then + // release the mouse button without wanting to do the navigation. + // With this flag we prevent goto definition if the mouse was down before the trigger key was pressed. + this.hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier; + } + + private onEditorMouseUp(mouseEvent: ClickLinkMouseEvent): void { + if (this.hasTriggerKeyOnMouseDown) { + this._onExecute.fire(mouseEvent); + } + } + + private onEditorKeyDown(e: ClickLinkKeyboardEvent): void { + if ( + this.lastMouseMoveEvent + && ( + e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition) + || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side) + ) + ) { + this._onMouseMoveOrRelevantKeyDown.fire([this.lastMouseMoveEvent, e]); + } else if (e.hasTriggerModifier) { + this._onCancel.fire(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration + } + } + + private onEditorKeyUp(e: ClickLinkKeyboardEvent): void { + if (e.keyCodeIsTriggerKey) { + this._onCancel.fire(); + } + } + + private resetHandler(): void { + this.lastMouseMoveEvent = null; + this.hasTriggerKeyOnMouseDown = false; + this._onCancel.fire(); + } +} diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts index 9bc13d23c2bbb..e063801f2d93d 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts @@ -13,156 +13,26 @@ import { MarkedString } from 'vs/base/common/htmlContent'; import { KeyCode } from 'vs/base/common/keyCodes'; import * as platform from 'vs/base/common/platform'; import { TPromise } from 'vs/base/common/winjs.base'; -import * as browser from 'vs/base/browser/browser'; -import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { IModeService } from 'vs/editor/common/services/modeService'; import { Range } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { Location, DefinitionProviderRegistry } from 'vs/editor/common/modes'; -import { ICodeEditor, IEditorMouseEvent, IMouseTarget, MouseTargetType } from 'vs/editor/browser/editorBrowser'; +import { ICodeEditor, IMouseTarget, MouseTargetType } from 'vs/editor/browser/editorBrowser'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { getDefinitionsAtPosition } from './goToDeclaration'; -import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; -import { ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { EditorState, CodeEditorStateFlag } from 'vs/editor/common/core/editorState'; import { DefinitionAction, DefinitionActionConfig } from './goToDeclarationCommands'; -import Event, { Emitter } from 'vs/base/common/event'; - -/** - * An event that encapsulates the various trigger modifiers logic needed for go to definition. - */ -class MyMouseEvent { - - public readonly target: IMouseTarget; - public readonly hasTriggerModifier: boolean; - public readonly hasSideBySideModifier: boolean; - public readonly isNoneOrSingleMouseDown: boolean; - - constructor(source: IEditorMouseEvent) { - this.target = source.target; - this.hasTriggerModifier = !!source.event[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER]; - this.hasSideBySideModifier = source.event.altKey; - this.isNoneOrSingleMouseDown = (browser.isIE || source.event.detail <= 1); // IE does not support event.detail properly - } -} - -/** - * An event that encapsulates the various trigger modifiers logic needed for go to definition. - */ -class MyKeyboardEvent { - - public readonly keyCodeIsTriggerKey: boolean; - public readonly keyCodeIsSideBySideKey: boolean; - public readonly hasTriggerModifier: boolean; - - constructor(source: IKeyboardEvent) { - this.keyCodeIsTriggerKey = (source.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_KEY_VALUE); - this.keyCodeIsSideBySideKey = (source.keyCode === GotoDefinitionWithMouseEditorContribution.TRIGGER_SIDEBYSIDE_KEY_VALUE); - this.hasTriggerModifier = !!source[GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER]; - } -} - -class LinkGesture extends Disposable { - - private readonly editor: ICodeEditor; - - private lastMouseMoveEvent: MyMouseEvent; - private hasTriggerKeyOnMouseDown: boolean; - - private readonly _onMouseMoveOrRelevantKeyDown: Emitter<[MyMouseEvent, MyKeyboardEvent]> = this._register(new Emitter<[MyMouseEvent, MyKeyboardEvent]>()); - public readonly onMouseMoveOrRelevantKeyDown: Event<[MyMouseEvent, MyKeyboardEvent]> = this._onMouseMoveOrRelevantKeyDown.event; - - private readonly _onExecute: Emitter = this._register(new Emitter()); - public readonly onExecute: Event = this._onExecute.event; - - private readonly _onCancel: Emitter = this._register(new Emitter()); - public readonly onCancel: Event = this._onCancel.event; - - constructor(editor: ICodeEditor) { - super(); - - this.editor = editor; - this.lastMouseMoveEvent = null; - this.hasTriggerKeyOnMouseDown = false; - - this._register(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(new MyMouseEvent(e)))); - this._register(this.editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(new MyMouseEvent(e)))); - this._register(this.editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(new MyMouseEvent(e)))); - this._register(this.editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(new MyKeyboardEvent(e)))); - this._register(this.editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(new MyKeyboardEvent(e)))); - this._register(this.editor.onMouseDrag(() => this.resetHandler())); - - this._register(this.editor.onDidChangeCursorSelection((e) => this.onDidChangeCursorSelection(e))); - this._register(this.editor.onDidChangeModel((e) => this.resetHandler())); - this._register(this.editor.onDidChangeModelContent(() => this.resetHandler())); - this._register(this.editor.onDidScrollChange((e) => { - if (e.scrollTopChanged || e.scrollLeftChanged) { - this.resetHandler(); - } - })); - } - - private onDidChangeCursorSelection(e: ICursorSelectionChangedEvent): void { - if (e.selection && e.selection.startColumn !== e.selection.endColumn) { - this.resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/Microsoft/vscode/issues/7827) - } - } - - private onEditorMouseMove(mouseEvent: MyMouseEvent): void { - this.lastMouseMoveEvent = mouseEvent; - - this._onMouseMoveOrRelevantKeyDown.fire([mouseEvent, null]); - } - - private onEditorMouseDown(mouseEvent: MyMouseEvent): void { - // We need to record if we had the trigger key on mouse down because someone might select something in the editor - // holding the mouse down and then while mouse is down start to press Ctrl/Cmd to start a copy operation and then - // release the mouse button without wanting to do the navigation. - // With this flag we prevent goto definition if the mouse was down before the trigger key was pressed. - this.hasTriggerKeyOnMouseDown = mouseEvent.hasTriggerModifier; - } - - private onEditorMouseUp(mouseEvent: MyMouseEvent): void { - if (this.hasTriggerKeyOnMouseDown) { - this._onExecute.fire(mouseEvent); - } - } - - private onEditorKeyDown(e: MyKeyboardEvent): void { - if ( - this.lastMouseMoveEvent - && ( - e.keyCodeIsTriggerKey // User just pressed Ctrl/Cmd (normal goto definition) - || (e.keyCodeIsSideBySideKey && e.hasTriggerModifier) // User pressed Ctrl/Cmd+Alt (goto definition to the side) - ) - ) { - this._onMouseMoveOrRelevantKeyDown.fire([this.lastMouseMoveEvent, e]); - } else if (e.hasTriggerModifier) { - this._onCancel.fire(); // remove decorations if user holds another key with ctrl/cmd to prevent accident goto declaration - } - } - - private onEditorKeyUp(e: MyKeyboardEvent): void { - if (e.keyCodeIsTriggerKey) { - this._onCancel.fire(); - } - } - - private resetHandler(): void { - this.lastMouseMoveEvent = null; - this.hasTriggerKeyOnMouseDown = false; - this._onCancel.fire(); - } -} +import { ClickLinkGesture, ClickLinkOptions, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; @editorContribution class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorContribution { private static ID = 'editor.contrib.gotodefinitionwithmouse'; - static TRIGGER_MODIFIER = platform.isMacintosh ? 'metaKey' : 'ctrlKey'; + static TRIGGER_MODIFIER: 'metaKey' | 'ctrlKey' = platform.isMacintosh ? 'metaKey' : 'ctrlKey'; static TRIGGER_SIDEBYSIDE_KEY_VALUE = KeyCode.Alt; static TRIGGER_KEY_VALUE = platform.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl; static MAX_SOURCE_PREVIEW_LINES = 8; @@ -183,14 +53,18 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC this.editor = editor; this.throttler = new Throttler(); - let linkGesture = new LinkGesture(editor); + let linkGesture = new ClickLinkGesture(editor, new ClickLinkOptions( + GotoDefinitionWithMouseEditorContribution.TRIGGER_KEY_VALUE, + GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER, + GotoDefinitionWithMouseEditorContribution.TRIGGER_SIDEBYSIDE_KEY_VALUE + )); this.toUnhook.push(linkGesture); this.toUnhook.push(linkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => { this.startFindDefinition(mouseEvent, keyboardEvent); })); - this.toUnhook.push(linkGesture.onExecute((mouseEvent: MyMouseEvent) => { + this.toUnhook.push(linkGesture.onExecute((mouseEvent: ClickLinkMouseEvent) => { if (this.isEnabled(mouseEvent)) { this.gotoDefinition(mouseEvent.target, mouseEvent.hasSideBySideModifier).done(() => { this.removeDecorations(); @@ -208,7 +82,7 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } - private startFindDefinition(mouseEvent: MyMouseEvent, withKey?: MyKeyboardEvent): void { + private startFindDefinition(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): void { if (!this.isEnabled(mouseEvent, withKey)) { this.currentWordUnderMouse = null; this.removeDecorations(); @@ -318,7 +192,7 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC } } - private isEnabled(mouseEvent: MyMouseEvent, withKey?: MyKeyboardEvent): boolean { + private isEnabled(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): boolean { return this.editor.getModel() && mouseEvent.isNoneOrSingleMouseDown && mouseEvent.target.type === MouseTargetType.CONTENT_TEXT && From bf4d419b797f2783578bc793f50a2c2caa508cfb Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 24 May 2017 22:32:38 +0200 Subject: [PATCH 1134/2747] Fixes #6910: Left mouse button up when selecting text with CTRL pressed causes to follow link --- src/vs/editor/contrib/links/browser/links.ts | 60 ++++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index 44f1d2fb3bd05..c14eaf2d911e7 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -12,14 +12,13 @@ import { KeyCode } from 'vs/base/common/keyCodes'; import * as platform from 'vs/base/common/platform'; import Severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { IMessageService } from 'vs/platform/message/common/message'; import { IOpenerService } from 'vs/platform/opener/common/opener'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { editorAction, ServicesAccessor, EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { LinkProviderRegistry } from 'vs/editor/common/modes'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; -import { IEditorMouseEvent, ICodeEditor, MouseTargetType } from 'vs/editor/browser/editorBrowser'; +import { ICodeEditor, MouseTargetType } from 'vs/editor/browser/editorBrowser'; import { getLinks, Link } from 'vs/editor/contrib/links/common/links'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; @@ -27,6 +26,7 @@ import { registerThemingParticipant } from 'vs/platform/theme/common/themeServic import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { Position } from 'vs/editor/common/core/position'; import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ClickLinkGesture, ClickLinkOptions, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; const HOVER_MESSAGE_GENERAL = ( platform.isMacintosh @@ -67,7 +67,7 @@ class LinkOccurence { public decorationId: string; public link: Link; - constructor(link: Link, decorationId: string/*, changeAccessor:editorCommon.IModelDecorationsChangeAccessor*/) { + constructor(link: Link, decorationId: string) { this.link = link; this.decorationId = decorationId; } @@ -92,14 +92,13 @@ class LinkDetector implements editorCommon.IEditorContribution { static RECOMPUTE_TIME = 1000; // ms static TRIGGER_KEY_VALUE = platform.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl; - static TRIGGER_MODIFIER = platform.isMacintosh ? 'metaKey' : 'ctrlKey'; + static TRIGGER_MODIFIER: 'metaKey' | 'ctrlKey' = platform.isMacintosh ? 'metaKey' : 'ctrlKey'; private editor: ICodeEditor; private listenersToRemove: IDisposable[]; private timeoutPromise: TPromise; private computePromise: TPromise; private activeLinkDecorationId: string; - private lastMouseEvent: IEditorMouseEvent; private openerService: IOpenerService; private messageService: IMessageService; private editorWorkerService: IEditorWorkerService; @@ -116,14 +115,28 @@ class LinkDetector implements editorCommon.IEditorContribution { this.messageService = messageService; this.editorWorkerService = editorWorkerService; this.listenersToRemove = []; + + let clickLinkGesture = new ClickLinkGesture(editor, new ClickLinkOptions( + LinkDetector.TRIGGER_KEY_VALUE, + LinkDetector.TRIGGER_MODIFIER, + KeyCode.Alt + )); + this.listenersToRemove.push(clickLinkGesture); + this.listenersToRemove.push(clickLinkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => { + this._onEditorMouseMove(mouseEvent, keyboardEvent); + })); + this.listenersToRemove.push(clickLinkGesture.onExecute((e) => { + this.onEditorMouseUp(e); + })); + this.listenersToRemove.push(clickLinkGesture.onCancel((e) => { + this.cleanUpActiveLinkDecoration(); + })); + this.listenersToRemove.push(editor.onDidChangeModelContent((e) => this.onChange())); this.listenersToRemove.push(editor.onDidChangeModel((e) => this.onModelChanged())); this.listenersToRemove.push(editor.onDidChangeModelLanguage((e) => this.onModelModeChanged())); this.listenersToRemove.push(LinkProviderRegistry.onDidChange((e) => this.onModelModeChanged())); - this.listenersToRemove.push(this.editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(e))); - this.listenersToRemove.push(this.editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(e))); - this.listenersToRemove.push(this.editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(e))); - this.listenersToRemove.push(this.editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(e))); + this.timeoutPromise = null; this.computePromise = null; this.currentOccurences = {}; @@ -140,7 +153,6 @@ class LinkDetector implements editorCommon.IEditorContribution { } private onModelChanged(): void { - this.lastMouseEvent = null; this.currentOccurences = {}; this.activeLinkDecorationId = null; this.stop(); @@ -206,21 +218,7 @@ class LinkDetector implements editorCommon.IEditorContribution { }); } - private onEditorKeyDown(e: IKeyboardEvent): void { - if (e.keyCode === LinkDetector.TRIGGER_KEY_VALUE && this.lastMouseEvent) { - this.onEditorMouseMove(this.lastMouseEvent, e); - } - } - - private onEditorKeyUp(e: IKeyboardEvent): void { - if (e.keyCode === LinkDetector.TRIGGER_KEY_VALUE) { - this.cleanUpActiveLinkDecoration(); - } - } - - private onEditorMouseMove(mouseEvent: IEditorMouseEvent, withKey?: IKeyboardEvent): void { - this.lastMouseEvent = mouseEvent; - + private _onEditorMouseMove(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): void { if (this.isEnabled(mouseEvent, withKey)) { this.cleanUpActiveLinkDecoration(); // always remove previous link decoration as their can only be one var occurence = this.getLinkOccurence(mouseEvent.target.position); @@ -248,7 +246,7 @@ class LinkDetector implements editorCommon.IEditorContribution { } } - private onEditorMouseUp(mouseEvent: IEditorMouseEvent): void { + private onEditorMouseUp(mouseEvent: ClickLinkMouseEvent): void { if (!this.isEnabled(mouseEvent)) { return; } @@ -256,7 +254,7 @@ class LinkDetector implements editorCommon.IEditorContribution { if (!occurence) { return; } - this.openLinkOccurence(occurence, mouseEvent.event.altKey); + this.openLinkOccurence(occurence, mouseEvent.hasSideBySideModifier); } public openLinkOccurence(occurence: LinkOccurence, openToSide: boolean): void { @@ -302,9 +300,11 @@ class LinkDetector implements editorCommon.IEditorContribution { return null; } - private isEnabled(mouseEvent: IEditorMouseEvent, withKey?: IKeyboardEvent): boolean { - return mouseEvent.target.type === MouseTargetType.CONTENT_TEXT && - (mouseEvent.event[LinkDetector.TRIGGER_MODIFIER] || (withKey && withKey.keyCode === LinkDetector.TRIGGER_KEY_VALUE)); + private isEnabled(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): boolean { + return ( + mouseEvent.target.type === MouseTargetType.CONTENT_TEXT + && (mouseEvent.hasTriggerModifier || (withKey && withKey.keyCodeIsTriggerKey)) + ); } private stop(): void { From 17ea00ea442b951f9b1b6bd910d4dd70a2b7022d Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 25 May 2017 00:00:54 +0200 Subject: [PATCH 1135/2747] Implement editor.multicursorModifier --- src/vs/editor/browser/view/viewController.ts | 99 +++++++++---------- src/vs/editor/browser/view/viewImpl.ts | 2 +- .../browser/clickLinkGesture.ts | 63 ++++++++++-- .../browser/goToDeclarationMouse.ts | 13 +-- src/vs/editor/contrib/hover/browser/hover.ts | 3 +- src/vs/editor/contrib/links/browser/links.ts | 11 +-- 6 files changed, 110 insertions(+), 81 deletions(-) diff --git a/src/vs/editor/browser/view/viewController.ts b/src/vs/editor/browser/view/viewController.ts index f37a97d934489..e05ca74ea605c 100644 --- a/src/vs/editor/browser/view/viewController.ts +++ b/src/vs/editor/browser/view/viewController.ts @@ -12,6 +12,7 @@ import { ICommandService } from 'vs/platform/commands/common/commands'; import { IViewModel } from 'vs/editor/common/viewModel/viewModel'; import { ViewOutgoingEvents } from 'vs/editor/browser/view/viewOutgoingEvents'; import { CoreNavigationCommands, CoreEditorCommand } from 'vs/editor/common/controller/coreCommands'; +import { Configuration } from "vs/editor/browser/config/configuration"; export interface ExecCoreEditorCommandFunc { (editorCommand: CoreEditorCommand, args: any): void; @@ -35,17 +36,20 @@ export interface IMouseDispatchData { export class ViewController { + private readonly configuration: Configuration; private readonly viewModel: IViewModel; private readonly _execCoreEditorCommandFunc: ExecCoreEditorCommandFunc; private readonly outgoingEvents: ViewOutgoingEvents; private readonly commandService: ICommandService; constructor( + configuration: Configuration, viewModel: IViewModel, execCommandFunc: ExecCoreEditorCommandFunc, outgoingEvents: ViewOutgoingEvents, commandService: ICommandService ) { + this.configuration = configuration; this.viewModel = viewModel; this._execCoreEditorCommandFunc = execCommandFunc; this.outgoingEvents = outgoingEvents; @@ -97,10 +101,34 @@ export class ViewController { return viewPosition; } + private _hasMulticursorModifier(data: IMouseDispatchData): boolean { + switch (this.configuration.editor.multicursorModifier) { + case 'altKey': + return data.altKey; + case 'ctrlKey': + return data.ctrlKey; + case 'metaKey': + return data.metaKey; + } + return false; + } + + private _hasNonMulticursorModifier(data: IMouseDispatchData): boolean { + switch (this.configuration.editor.multicursorModifier) { + case 'altKey': + return data.ctrlKey || data.metaKey; + case 'ctrlKey': + return data.altKey || data.metaKey; + case 'metaKey': + return data.ctrlKey || data.altKey; + } + return false; + } + public dispatchMouse(data: IMouseDispatchData): void { if (data.startedOnLineNumbers) { // If the dragging started on the gutter, then have operations work on the entire line - if (data.altKey) { + if (this._hasMulticursorModifier(data)) { if (data.inSelectionMode) { this.lastCursorLineSelect(data.position); } else { @@ -116,7 +144,7 @@ export class ViewController { } else if (data.mouseDownCount >= 4) { this.selectAll(); } else if (data.mouseDownCount === 3) { - if (data.altKey) { + if (this._hasMulticursorModifier(data)) { if (data.inSelectionMode) { this.lastCursorLineSelectDrag(data.position); } else { @@ -130,7 +158,7 @@ export class ViewController { } } } else if (data.mouseDownCount === 2) { - if (data.altKey) { + if (this._hasMulticursorModifier(data)) { this.lastCursorWordSelect(data.position); } else { if (data.inSelectionMode) { @@ -140,8 +168,8 @@ export class ViewController { } } } else { - if (data.altKey) { - if (!data.ctrlKey && !data.metaKey) { + if (this._hasMulticursorModifier(data)) { + if (!this._hasNonMulticursorModifier(data)) { if (data.shiftKey) { this.columnSelect(data.position, data.mouseColumn); } else { @@ -163,20 +191,20 @@ export class ViewController { } } - public moveTo(viewPosition: Position): void { + private _usualArgs(viewPosition: Position) { viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.MoveTo, { + return { position: this.convertViewToModelPosition(viewPosition), viewPosition: viewPosition - }); + }; + } + + public moveTo(viewPosition: Position): void { + this._execMouseCommand(CoreNavigationCommands.MoveTo, this._usualArgs(viewPosition)); } private moveToSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.MoveToSelect, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.MoveToSelect, this._usualArgs(viewPosition)); } private columnSelect(viewPosition: Position, mouseColumn: number): void { @@ -198,64 +226,35 @@ export class ViewController { } private lastCursorMoveToSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.LastCursorMoveToSelect, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.LastCursorMoveToSelect, this._usualArgs(viewPosition)); } private wordSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.WordSelect, { - position: this.convertViewToModelPosition(viewPosition) - }); + this._execMouseCommand(CoreNavigationCommands.WordSelect, this._usualArgs(viewPosition)); } private wordSelectDrag(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.WordSelectDrag, { - position: this.convertViewToModelPosition(viewPosition) - }); + this._execMouseCommand(CoreNavigationCommands.WordSelectDrag, this._usualArgs(viewPosition)); } private lastCursorWordSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.LastCursorWordSelect, { - position: this.convertViewToModelPosition(viewPosition) - }); + this._execMouseCommand(CoreNavigationCommands.LastCursorWordSelect, this._usualArgs(viewPosition)); } private lineSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.LineSelect, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.LineSelect, this._usualArgs(viewPosition)); } private lineSelectDrag(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.LineSelectDrag, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.LineSelectDrag, this._usualArgs(viewPosition)); } private lastCursorLineSelect(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.LastCursorLineSelect, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.LastCursorLineSelect, this._usualArgs(viewPosition)); } private lastCursorLineSelectDrag(viewPosition: Position): void { - viewPosition = this._validateViewColumn(viewPosition); - this._execMouseCommand(CoreNavigationCommands.LastCursorLineSelectDrag, { - position: this.convertViewToModelPosition(viewPosition), - viewPosition: viewPosition - }); + this._execMouseCommand(CoreNavigationCommands.LastCursorLineSelectDrag, this._usualArgs(viewPosition)); } private selectAll(): void { diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index 321c4719a6dc3..927c1d1948684 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -105,7 +105,7 @@ export class View extends ViewEventHandler { this._renderAnimationFrame = null; this.outgoingEvents = new ViewOutgoingEvents(model); - let viewController = new ViewController(model, execCoreEditorCommandFunc, this.outgoingEvents, commandService); + let viewController = new ViewController(configuration, model, execCoreEditorCommandFunc, this.outgoingEvents, commandService); // The event dispatcher will always go through _renderOnce before dispatching any events this.eventDispatcher = new ViewEventDispatcher((callback: () => void) => this._renderOnce(callback)); diff --git a/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts b/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts index bec68dcf19a82..79d1043cf50d2 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts @@ -13,6 +13,11 @@ import { ICodeEditor, IEditorMouseEvent, IMouseTarget } from 'vs/editor/browser/ import { Disposable } from 'vs/base/common/lifecycle'; import { ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import Event, { Emitter } from 'vs/base/common/event'; +import * as platform from 'vs/base/common/platform'; + +function hasModifier(e: { ctrlKey: boolean; shiftKey: boolean; altKey: boolean; metaKey: boolean }, modifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey'): boolean { + return !!e[modifier]; +} /** * An event that encapsulates the various trigger modifiers logic needed for go to definition. @@ -26,8 +31,8 @@ export class ClickLinkMouseEvent { constructor(source: IEditorMouseEvent, opts: ClickLinkOptions) { this.target = source.target; - this.hasTriggerModifier = !!source.event[opts.triggerModifier]; - this.hasSideBySideModifier = source.event.altKey; + this.hasTriggerModifier = hasModifier(source.event, opts.triggerModifier); + this.hasSideBySideModifier = hasModifier(source.event, opts.triggerSideBySideModifier); this.isNoneOrSingleMouseDown = (browser.isIE || source.event.detail <= 1); // IE does not support event.detail properly } } @@ -44,7 +49,7 @@ export class ClickLinkKeyboardEvent { constructor(source: IKeyboardEvent, opts: ClickLinkOptions) { this.keyCodeIsTriggerKey = (source.keyCode === opts.triggerKey); this.keyCodeIsSideBySideKey = (source.keyCode === opts.triggerSideBySideKey); - this.hasTriggerModifier = !!source[opts.triggerModifier]; + this.hasTriggerModifier = hasModifier(source, opts.triggerModifier); } } @@ -53,14 +58,44 @@ export class ClickLinkOptions { public readonly triggerKey: KeyCode; public readonly triggerModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey'; public readonly triggerSideBySideKey: KeyCode; - - constructor(triggerKey: KeyCode, triggerModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey', triggerSideBySideKey: KeyCode) { + public readonly triggerSideBySideModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey'; + + constructor( + triggerKey: KeyCode, + triggerModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey', + triggerSideBySideKey: KeyCode, + triggerSideBySideModifier: 'ctrlKey' | 'shiftKey' | 'altKey' | 'metaKey' + ) { this.triggerKey = triggerKey; this.triggerModifier = triggerModifier; this.triggerSideBySideKey = triggerSideBySideKey; + this.triggerSideBySideModifier = triggerSideBySideModifier; + } + + public equals(other: ClickLinkOptions): boolean { + return ( + this.triggerKey === other.triggerKey + && this.triggerModifier === other.triggerModifier + && this.triggerSideBySideKey === other.triggerSideBySideKey + && this.triggerSideBySideModifier === other.triggerSideBySideModifier + ); } } +function createOptions(multicursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'): ClickLinkOptions { + if (multicursorModifier === 'altKey') { + if (platform.isMacintosh) { + return new ClickLinkOptions(KeyCode.Meta, 'metaKey', KeyCode.Alt, 'altKey'); + } + return new ClickLinkOptions(KeyCode.Ctrl, 'ctrlKey', KeyCode.Alt, 'altKey'); + } + + if (platform.isMacintosh) { + return new ClickLinkOptions(KeyCode.Alt, 'altKey', KeyCode.Meta, 'metaKey'); + } + return new ClickLinkOptions(KeyCode.Alt, 'altKey', KeyCode.Ctrl, 'ctrlKey'); +} + export class ClickLinkGesture extends Disposable { private readonly _onMouseMoveOrRelevantKeyDown: Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent]> = this._register(new Emitter<[ClickLinkMouseEvent, ClickLinkKeyboardEvent]>()); @@ -73,20 +108,32 @@ export class ClickLinkGesture extends Disposable { public readonly onCancel: Event = this._onCancel.event; private readonly _editor: ICodeEditor; - private readonly _opts: ClickLinkOptions; + private _opts: ClickLinkOptions; private lastMouseMoveEvent: ClickLinkMouseEvent; private hasTriggerKeyOnMouseDown: boolean; - constructor(editor: ICodeEditor, opts: ClickLinkOptions) { + constructor(editor: ICodeEditor) { super(); this._editor = editor; - this._opts = opts; + this._opts = createOptions(this._editor.getConfiguration().multicursorModifier); this.lastMouseMoveEvent = null; this.hasTriggerKeyOnMouseDown = false; + this._register(this._editor.onDidChangeConfiguration((e) => { + if (e.multicursorModifier) { + const newOpts = createOptions(this._editor.getConfiguration().multicursorModifier); + if (this._opts.equals(newOpts)) { + return; + } + this._opts = newOpts; + this.lastMouseMoveEvent = null; + this.hasTriggerKeyOnMouseDown = false; + this._onCancel.fire(); + } + })); this._register(this._editor.onMouseMove((e: IEditorMouseEvent) => this.onEditorMouseMove(new ClickLinkMouseEvent(e, this._opts)))); this._register(this._editor.onMouseDown((e: IEditorMouseEvent) => this.onEditorMouseDown(new ClickLinkMouseEvent(e, this._opts)))); this._register(this._editor.onMouseUp((e: IEditorMouseEvent) => this.onEditorMouseUp(new ClickLinkMouseEvent(e, this._opts)))); diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts index e063801f2d93d..a29f1511b44ca 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts @@ -10,8 +10,6 @@ import * as nls from 'vs/nls'; import { Throttler } from 'vs/base/common/async'; import { onUnexpectedError } from 'vs/base/common/errors'; import { MarkedString } from 'vs/base/common/htmlContent'; -import { KeyCode } from 'vs/base/common/keyCodes'; -import * as platform from 'vs/base/common/platform'; import { TPromise } from 'vs/base/common/winjs.base'; import { IModeService } from 'vs/editor/common/services/modeService'; import { Range } from 'vs/editor/common/core/range'; @@ -26,15 +24,12 @@ import { registerThemingParticipant } from 'vs/platform/theme/common/themeServic import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { EditorState, CodeEditorStateFlag } from 'vs/editor/common/core/editorState'; import { DefinitionAction, DefinitionActionConfig } from './goToDeclarationCommands'; -import { ClickLinkGesture, ClickLinkOptions, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; +import { ClickLinkGesture, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; @editorContribution class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorContribution { private static ID = 'editor.contrib.gotodefinitionwithmouse'; - static TRIGGER_MODIFIER: 'metaKey' | 'ctrlKey' = platform.isMacintosh ? 'metaKey' : 'ctrlKey'; - static TRIGGER_SIDEBYSIDE_KEY_VALUE = KeyCode.Alt; - static TRIGGER_KEY_VALUE = platform.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl; static MAX_SOURCE_PREVIEW_LINES = 8; private editor: ICodeEditor; @@ -53,11 +48,7 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC this.editor = editor; this.throttler = new Throttler(); - let linkGesture = new ClickLinkGesture(editor, new ClickLinkOptions( - GotoDefinitionWithMouseEditorContribution.TRIGGER_KEY_VALUE, - GotoDefinitionWithMouseEditorContribution.TRIGGER_MODIFIER, - GotoDefinitionWithMouseEditorContribution.TRIGGER_SIDEBYSIDE_KEY_VALUE - )); + let linkGesture = new ClickLinkGesture(editor); this.toUnhook.push(linkGesture); this.toUnhook.push(linkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => { diff --git a/src/vs/editor/contrib/hover/browser/hover.ts b/src/vs/editor/contrib/hover/browser/hover.ts index 7660cff426eb1..b0229e73f1b1c 100644 --- a/src/vs/editor/contrib/hover/browser/hover.ts +++ b/src/vs/editor/contrib/hover/browser/hover.ts @@ -112,8 +112,7 @@ export class ModesHoverController implements editorCommon.IEditorContribution { } private _onKeyDown(e: IKeyboardEvent): void { - var stopKey = platform.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl; - if (e.keyCode !== stopKey) { + if (e.keyCode !== KeyCode.Ctrl && e.keyCode !== KeyCode.Alt && e.keyCode !== KeyCode.Meta) { // Do not hide hover when Ctrl/Meta is pressed this._hideWidgets(); } diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index c14eaf2d911e7..58808a66a34e6 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -8,7 +8,6 @@ import 'vs/css!./links'; import * as nls from 'vs/nls'; import { onUnexpectedError } from 'vs/base/common/errors'; -import { KeyCode } from 'vs/base/common/keyCodes'; import * as platform from 'vs/base/common/platform'; import Severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -26,7 +25,7 @@ import { registerThemingParticipant } from 'vs/platform/theme/common/themeServic import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { Position } from 'vs/editor/common/core/position'; import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; -import { ClickLinkGesture, ClickLinkOptions, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; +import { ClickLinkGesture, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; const HOVER_MESSAGE_GENERAL = ( platform.isMacintosh @@ -91,8 +90,6 @@ class LinkDetector implements editorCommon.IEditorContribution { } static RECOMPUTE_TIME = 1000; // ms - static TRIGGER_KEY_VALUE = platform.isMacintosh ? KeyCode.Meta : KeyCode.Ctrl; - static TRIGGER_MODIFIER: 'metaKey' | 'ctrlKey' = platform.isMacintosh ? 'metaKey' : 'ctrlKey'; private editor: ICodeEditor; private listenersToRemove: IDisposable[]; @@ -116,11 +113,7 @@ class LinkDetector implements editorCommon.IEditorContribution { this.editorWorkerService = editorWorkerService; this.listenersToRemove = []; - let clickLinkGesture = new ClickLinkGesture(editor, new ClickLinkOptions( - LinkDetector.TRIGGER_KEY_VALUE, - LinkDetector.TRIGGER_MODIFIER, - KeyCode.Alt - )); + let clickLinkGesture = new ClickLinkGesture(editor); this.listenersToRemove.push(clickLinkGesture); this.listenersToRemove.push(clickLinkGesture.onMouseMoveOrRelevantKeyDown(([mouseEvent, keyboardEvent]) => { this._onEditorMouseMove(mouseEvent, keyboardEvent); From eae2a774cca75fc73e7b57f886d946ad79d37315 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 25 May 2017 00:27:30 +0200 Subject: [PATCH 1136/2747] Show correct link hover when links open with Alt --- src/vs/editor/contrib/links/browser/links.ts | 67 +++++++++++++------- 1 file changed, 43 insertions(+), 24 deletions(-) diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index 58808a66a34e6..356f9bf6843b2 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -27,15 +27,40 @@ import { Position } from 'vs/editor/common/core/position'; import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; import { ClickLinkGesture, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; -const HOVER_MESSAGE_GENERAL = ( +const HOVER_MESSAGE_GENERAL_META = ( platform.isMacintosh ? nls.localize('links.navigate.mac', "Cmd + click to follow link") : nls.localize('links.navigate', "Ctrl + click to follow link") ); +const HOVER_MESSAGE_GENERAL_ALT = nls.localize('links.navigate.al', "Alt + click to follow link"); + +const decoration = { + meta: ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + inlineClassName: 'detected-link', + hoverMessage: HOVER_MESSAGE_GENERAL_META + }), + metaActive: ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + inlineClassName: 'detected-link-active', + hoverMessage: HOVER_MESSAGE_GENERAL_META + }), + alt: ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + inlineClassName: 'detected-link', + hoverMessage: HOVER_MESSAGE_GENERAL_ALT + }), + altActive: ModelDecorationOptions.register({ + stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, + inlineClassName: 'detected-link-active', + hoverMessage: HOVER_MESSAGE_GENERAL_ALT + }), +}; + class LinkOccurence { - public static decoration(link: Link): editorCommon.IModelDeltaDecoration { + public static decoration(link: Link, useMetaKey: boolean): editorCommon.IModelDeltaDecoration { return { range: { startLineNumber: link.range.startLineNumber, @@ -43,24 +68,15 @@ class LinkOccurence { endLineNumber: link.range.endLineNumber, endColumn: link.range.endColumn }, - options: LinkOccurence._getOptions(false) + options: LinkOccurence._getOptions(useMetaKey, false) }; } - private static _LINK_DECORATION = ModelDecorationOptions.register({ - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - inlineClassName: 'detected-link', - hoverMessage: HOVER_MESSAGE_GENERAL - }); - - private static _ACTIVE_LINK_DECORATION = ModelDecorationOptions.register({ - stickiness: editorCommon.TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges, - inlineClassName: 'detected-link-active', - hoverMessage: HOVER_MESSAGE_GENERAL - }); - - private static _getOptions(isActive: boolean): ModelDecorationOptions { - return (isActive ? this._ACTIVE_LINK_DECORATION : this._LINK_DECORATION); + private static _getOptions(useMetaKey: boolean, isActive: boolean): ModelDecorationOptions { + if (useMetaKey) { + return (isActive ? decoration.metaActive : decoration.meta); + } + return (isActive ? decoration.altActive : decoration.alt); } public decorationId: string; @@ -71,12 +87,12 @@ class LinkOccurence { this.decorationId = decorationId; } - public activate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor): void { - changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(true)); + public activate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor, useMetaKey: boolean): void { + changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(useMetaKey, true)); } - public deactivate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor): void { - changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(false)); + public deactivate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor, useMetaKey: boolean): void { + changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(useMetaKey, false)); } } @@ -183,6 +199,7 @@ class LinkDetector implements editorCommon.IEditorContribution { } private updateDecorations(links: Link[]): void { + const useMetaKey = (this.editor.getConfiguration().multicursorModifier === 'altKey'); this.editor.changeDecorations((changeAccessor: editorCommon.IModelDecorationsChangeAccessor) => { var oldDecorations: string[] = []; let keys = Object.keys(this.currentOccurences); @@ -196,7 +213,7 @@ class LinkDetector implements editorCommon.IEditorContribution { if (links) { // Not sure why this is sometimes null for (var i = 0; i < links.length; i++) { - newDecorations.push(LinkOccurence.decoration(links[i])); + newDecorations.push(LinkOccurence.decoration(links[i], useMetaKey)); } } @@ -212,12 +229,13 @@ class LinkDetector implements editorCommon.IEditorContribution { } private _onEditorMouseMove(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): void { + const useMetaKey = (this.editor.getConfiguration().multicursorModifier === 'altKey'); if (this.isEnabled(mouseEvent, withKey)) { this.cleanUpActiveLinkDecoration(); // always remove previous link decoration as their can only be one var occurence = this.getLinkOccurence(mouseEvent.target.position); if (occurence) { this.editor.changeDecorations((changeAccessor) => { - occurence.activate(changeAccessor); + occurence.activate(changeAccessor, useMetaKey); this.activeLinkDecorationId = occurence.decorationId; }); } @@ -227,11 +245,12 @@ class LinkDetector implements editorCommon.IEditorContribution { } private cleanUpActiveLinkDecoration(): void { + const useMetaKey = (this.editor.getConfiguration().multicursorModifier === 'altKey'); if (this.activeLinkDecorationId) { var occurence = this.currentOccurences[this.activeLinkDecorationId]; if (occurence) { this.editor.changeDecorations((changeAccessor) => { - occurence.deactivate(changeAccessor); + occurence.deactivate(changeAccessor, useMetaKey); }); } From dfff4c5e8e461d48c57a6ce380de8bd72fae1eb6 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Wed, 24 May 2017 15:46:59 -0700 Subject: [PATCH 1137/2747] Fix #26634 - if a `./` include pattern contains glob characters, ignore the `./` --- .../search/browser/patternInputWidget.ts | 39 +++++++++++++------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/src/vs/workbench/parts/search/browser/patternInputWidget.ts b/src/vs/workbench/parts/search/browser/patternInputWidget.ts index 75bef0a6f438c..0657073ca2f31 100644 --- a/src/vs/workbench/parts/search/browser/patternInputWidget.ts +++ b/src/vs/workbench/parts/search/browser/patternInputWidget.ts @@ -110,8 +110,6 @@ export class PatternInputWidget extends Widget { return {}; } - const isSearchPath = segment => segment.match(/^\.\//); - let exprSegments: string[]; let searchPaths: string[]; if (isGlobPattern) { @@ -119,21 +117,17 @@ export class PatternInputWidget extends Widget { .map(s => s.trim()) .filter(s => !!s.length); - const groups = collections.groupBy(segments, - segment => isSearchPath(segment) ? 'searchPaths' : 'exprSegments'); - searchPaths = groups.searchPaths || []; - exprSegments = groups.exprSegments || []; + const groups = this.groupByPathsAndExprSegments(segments); + searchPaths = groups.searchPaths; + exprSegments = groups.exprSegments; } else { const segments = pattern.split(',') .map(s => strings.trim(s.trim(), '/')) .filter(s => !!s.length); - const groups = collections.groupBy(segments, - segment => isSearchPath(segment) ? 'searchPaths' : 'exprSegments'); - searchPaths = groups.searchPaths || []; - exprSegments = groups.exprSegments || []; - - exprSegments = exprSegments + const groups = this.groupByPathsAndExprSegments(segments); + searchPaths = groups.searchPaths; + exprSegments = groups.exprSegments .map(p => { if (p[0] === '.') { p = '*' + p; // convert ".js" to "*.js" @@ -147,6 +141,27 @@ export class PatternInputWidget extends Widget { return { expression, searchPaths }; } + private groupByPathsAndExprSegments(segments: string[]) { + const isSearchPath = segment => segment.match(/^\.\//); + + const groups = collections.groupBy(segments, + segment => isSearchPath(segment) ? 'searchPaths' : 'exprSegments'); + groups.searchPaths = groups.searchPaths || []; + groups.exprSegments = groups.exprSegments || []; + + // If a ./searchPath has a glob character, remove ./ and use it as an expression segment + groups.searchPaths = groups.searchPaths.filter(searchPath => { + if (searchPath.match(/[\*\{\}\(\)\[\]\?]/)) { + groups.exprSegments.push(strings.ltrim(searchPath, './')); + return false; + } + + return true; + }); + + return groups; + } + public select(): void { this.inputBox.select(); } From 2dcccf7cc8f730c0a31ddf7114923adb44bf07d2 Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 24 May 2017 16:17:47 -0700 Subject: [PATCH 1138/2747] Fix #25783. Middle click pastes in Find Widget on Linux --- src/vs/base/browser/ui/findinput/findInput.ts | 5 +++++ src/vs/editor/contrib/find/browser/findWidget.ts | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/vs/base/browser/ui/findinput/findInput.ts b/src/vs/base/browser/ui/findinput/findInput.ts index 2d38be64dc965..2d44764697416 100644 --- a/src/vs/base/browser/ui/findinput/findInput.ts +++ b/src/vs/base/browser/ui/findinput/findInput.ts @@ -13,6 +13,7 @@ import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview import { Widget } from 'vs/base/browser/ui/widget'; import Event, { Emitter } from 'vs/base/common/event'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { IMouseEvent } from 'vs/base/browser/mouseEvent'; import { KeyCode } from 'vs/base/common/keyCodes'; import { CaseSensitiveCheckbox, WholeWordsCheckbox, RegexCheckbox } from 'vs/base/browser/ui/findinput/findInputCheckboxes'; import { Color } from 'vs/base/common/color'; @@ -69,6 +70,9 @@ export class FindInput extends Widget { private _onKeyDown = this._register(new Emitter()); public onKeyDown: Event = this._onKeyDown.event; + private _onMouseDown = this._register(new Emitter()); + public onMouseDown: Event = this._onMouseDown.event; + private _onInput = this._register(new Emitter()); public onInput: Event = this._onInput.event; @@ -113,6 +117,7 @@ export class FindInput extends Widget { this.onkeydown(this.inputBox.inputElement, (e) => this._onKeyDown.fire(e)); this.onkeyup(this.inputBox.inputElement, (e) => this._onKeyUp.fire(e)); this.oninput(this.inputBox.inputElement, (e) => this._onInput.fire()); + this.onmousedown(this.inputBox.inputElement, (e) => this._onMouseDown.fire(e)); } public enable(): void { diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index 78e442c699205..409caf8fb7372 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -9,9 +9,11 @@ import 'vs/css!./findWidget'; import * as nls from 'vs/nls'; import { onUnexpectedError } from 'vs/base/common/errors'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; +import * as platform from 'vs/base/common/platform'; import * as strings from 'vs/base/common/strings'; import * as dom from 'vs/base/browser/dom'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { IMouseEvent } from 'vs/base/browser/mouseEvent'; import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview'; import { FindInput, IFindInputStyles } from 'vs/base/browser/ui/findinput/findInput'; import { IMessage as InputBoxMessage, InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; @@ -514,6 +516,13 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._findInput.highlightFindOptions(); } + private _onFindInputMouseDown(e: IMouseEvent): void { + // on linux, middle key does pasting. + if (e.middleButton) { + e.stopPropagation(); + } + } + private _onFindInputKeyDown(e: IKeyboardEvent): void { if (e.equals(KeyCode.Enter)) { @@ -647,6 +656,9 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas } } })); + if (platform.isLinux) { + this._register(this._findInput.onMouseDown((e) => this._onFindInputMouseDown(e))); + } this._matchesCount = document.createElement('div'); this._matchesCount.className = 'matchesCount'; From 6d3e6cd313040668e136b6088a4e6133d0ada861 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 24 May 2017 20:04:00 -0700 Subject: [PATCH 1139/2747] Clean up termianl imports --- .../electron-browser/terminal.contribution.ts | 4 +- .../electron-browser/terminalActions.ts | 4 +- .../electron-browser/terminalColorRegistry.ts | 2 +- .../electron-browser/terminalInstance.ts | 46 +++++++++---------- .../electron-browser/terminalPanel.ts | 26 +++++------ 5 files changed, 41 insertions(+), 41 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index 6becf5badb013..c4e3fc0147185 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -7,9 +7,10 @@ import 'vs/css!./media/scrollbar'; import 'vs/css!./media/terminal'; import 'vs/css!./media/xterm'; import 'vs/css!./media/widgets'; +import * as debugActions from 'vs/workbench/parts/debug/browser/debugActions'; +import * as nls from 'vs/nls'; import * as panel from 'vs/workbench/browser/panel'; import * as platform from 'vs/base/common/platform'; -import nls = require('vs/nls'); import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; import { GlobalQuickOpenAction } from 'vs/workbench/browser/parts/quickopen/quickopen.contribution'; import { ITerminalService, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, TERMINAL_PANEL_ID, TERMINAL_DEFAULT_RIGHT_CLICK_COPY_PASTE, TerminalCursorStyle } from 'vs/workbench/parts/terminal/common/terminal'; @@ -24,7 +25,6 @@ import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { TerminalService } from 'vs/workbench/parts/terminal/electron-browser/terminalService'; import { ToggleTabFocusModeAction } from 'vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; -import debugActions = require('vs/workbench/parts/debug/browser/debugActions'); import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { OpenNextRecentlyUsedEditorInGroupAction, OpenPreviousRecentlyUsedEditorInGroupAction, FocusActiveGroupAction, FocusFirstGroupAction, FocusSecondGroupAction, FocusThirdGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; import { EDITOR_FONT_DEFAULTS } from "vs/editor/common/config/editorOptions"; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts index 58cd361fd3420..3b62f9642edb8 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import nls = require('vs/nls'); -import os = require('os'); +import * as nls from 'vs/nls'; +import * as os from 'os'; import { Action, IAction } from 'vs/base/common/actions'; import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts index 727078be3bcd9..27f3f23c8ba71 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import nls = require('vs/nls'); +import * as nls from 'vs/nls'; import { registerColor, ColorIdentifier } from 'vs/platform/theme/common/colorRegistry'; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 07f8b6b53cb4a..8d7d30b7099f5 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import * as cp from 'child_process'; +import * as os from 'os'; import * as path from 'path'; -import DOM = require('vs/base/browser/dom'); +import * as lifecycle from 'vs/base/common/lifecycle'; +import * as nls from 'vs/nls'; +import * as platform from 'vs/base/common/platform'; +import * as dom from 'vs/base/browser/dom'; import Event, { Emitter } from 'vs/base/common/event'; -import URI from 'vs/base/common/uri'; -import cp = require('child_process'); -import lifecycle = require('vs/base/common/lifecycle'); -import nls = require('vs/nls'); -import os = require('os'); -import platform = require('vs/base/common/platform'); +import Uri from 'vs/base/common/uri'; import xterm = require('xterm'); import { Dimension } from 'vs/base/browser/builder'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; @@ -39,7 +39,7 @@ class StandardTerminalProcessFactory implements ITerminalProcessFactory { public create(env: { [key: string]: string }): cp.ChildProcess { return cp.fork('./terminalProcess', [], { env, - cwd: URI.parse(path.dirname(require.toUrl('./terminalProcess'))).fsPath + cwd: Uri.parse(path.dirname(require.toUrl('./terminalProcess'))).fsPath }); } } @@ -217,7 +217,7 @@ export class TerminalInstance implements ITerminalInstance { this._container = container; this._wrapperElement = document.createElement('div'); - DOM.addClass(this._wrapperElement, 'terminal-wrapper'); + dom.addClass(this._wrapperElement, 'terminal-wrapper'); this._xtermElement = document.createElement('div'); this._xterm.open(this._xtermElement, false); @@ -242,7 +242,7 @@ export class TerminalInstance implements ITerminalInstance { } return undefined; }); - this._instanceDisposables.push(DOM.addDisposableListener(this._xterm.element, 'mouseup', (event: KeyboardEvent) => { + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'mouseup', (event: KeyboardEvent) => { // Wait until mouseup has propogated through the DOM before evaluating the new selection // state. setTimeout(() => { @@ -251,7 +251,7 @@ export class TerminalInstance implements ITerminalInstance { })); // xterm.js currently drops selection on keyup as we need to handle this case. - this._instanceDisposables.push(DOM.addDisposableListener(this._xterm.element, 'keyup', (event: KeyboardEvent) => { + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'keyup', (event: KeyboardEvent) => { // Wait until keyup has propogated through the DOM before evaluating the new selection // state. setTimeout(() => { @@ -262,10 +262,10 @@ export class TerminalInstance implements ITerminalInstance { const xtermHelper: HTMLElement = this._xterm.element.querySelector('.xterm-helpers'); const focusTrap: HTMLElement = document.createElement('div'); focusTrap.setAttribute('tabindex', '0'); - DOM.addClass(focusTrap, 'focus-trap'); - this._instanceDisposables.push(DOM.addDisposableListener(focusTrap, 'focus', (event: FocusEvent) => { + dom.addClass(focusTrap, 'focus-trap'); + this._instanceDisposables.push(dom.addDisposableListener(focusTrap, 'focus', (event: FocusEvent) => { let currentElement = focusTrap; - while (!DOM.hasClass(currentElement, 'part')) { + while (!dom.hasClass(currentElement, 'part')) { currentElement = currentElement.parentElement; } const hidePanelElement = currentElement.querySelector('.hide-panel-action'); @@ -273,17 +273,17 @@ export class TerminalInstance implements ITerminalInstance { })); xtermHelper.insertBefore(focusTrap, this._xterm.textarea); - this._instanceDisposables.push(DOM.addDisposableListener(this._xterm.textarea, 'focus', (event: KeyboardEvent) => { + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.textarea, 'focus', (event: KeyboardEvent) => { this._terminalFocusContextKey.set(true); })); - this._instanceDisposables.push(DOM.addDisposableListener(this._xterm.textarea, 'blur', (event: KeyboardEvent) => { + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.textarea, 'blur', (event: KeyboardEvent) => { this._terminalFocusContextKey.reset(); this._refreshSelectionContextKey(); })); - this._instanceDisposables.push(DOM.addDisposableListener(this._xterm.element, 'focus', (event: KeyboardEvent) => { + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'focus', (event: KeyboardEvent) => { this._terminalFocusContextKey.set(true); })); - this._instanceDisposables.push(DOM.addDisposableListener(this._xterm.element, 'blur', (event: KeyboardEvent) => { + this._instanceDisposables.push(dom.addDisposableListener(this._xterm.element, 'blur', (event: KeyboardEvent) => { this._terminalFocusContextKey.reset(); this._refreshSelectionContextKey(); })); @@ -336,7 +336,7 @@ export class TerminalInstance implements ITerminalInstance { this._linkHandler.dispose(); } if (this._xterm && this._xterm.element) { - this._hadFocusOnExit = DOM.hasClass(this._xterm.element, 'focus'); + this._hadFocusOnExit = dom.hasClass(this._xterm.element, 'focus'); } if (this._wrapperElement) { this._container.removeChild(this._wrapperElement); @@ -389,7 +389,7 @@ export class TerminalInstance implements ITerminalInstance { public setVisible(visible: boolean): void { this._isVisible = visible; if (this._wrapperElement) { - DOM.toggleClass(this._wrapperElement, 'active', visible); + dom.toggleClass(this._wrapperElement, 'active', visible); } if (visible && this._xterm) { // Trigger a manual scroll event which will sync the viewport and scroll bar. This is @@ -473,9 +473,9 @@ export class TerminalInstance implements ITerminalInstance { } const env = TerminalInstance.createTerminalEnv(process.env, shell, this._getCwd(shell, workspace), locale, this._cols, this._rows); this._title = shell.name || ''; - this._process = cp.fork(URI.parse(require.toUrl('bootstrap')).fsPath, ['--type=terminal'], { + this._process = cp.fork(Uri.parse(require.toUrl('bootstrap')).fsPath, ['--type=terminal'], { env, - cwd: URI.parse(path.dirname(require.toUrl('../node/terminalProcess'))).fsPath + cwd: Uri.parse(path.dirname(require.toUrl('../node/terminalProcess'))).fsPath }); if (!shell.name) { // Only listen for process title changes when a name is not provided @@ -559,7 +559,7 @@ export class TerminalInstance implements ITerminalInstance { } private _attachPressAnyKeyToCloseListener() { - this._processDisposables.push(DOM.addDisposableListener(this._xterm.textarea, 'keypress', (event: KeyboardEvent) => { + this._processDisposables.push(dom.addDisposableListener(this._xterm.textarea, 'keypress', (event: KeyboardEvent) => { this.dispose(); event.preventDefault(); })); diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 81ed253bd4224..ec880bdd12c23 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import DOM = require('vs/base/browser/dom'); -import nls = require('vs/nls'); -import platform = require('vs/base/common/platform'); +import * as dom from 'vs/base/browser/dom'; +import * as nls from 'vs/nls'; +import * as platform from 'vs/base/common/platform'; import { Action, IAction } from 'vs/base/common/actions'; import { Builder, Dimension } from 'vs/base/browser/builder'; import { IActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; @@ -51,12 +51,12 @@ export class TerminalPanel extends Panel { public create(parent: Builder): TPromise { super.create(parent); this._parentDomElement = parent.getHTMLElement(); - DOM.addClass(this._parentDomElement, 'integrated-terminal'); + dom.addClass(this._parentDomElement, 'integrated-terminal'); this._themeStyleElement = document.createElement('style'); this._fontStyleElement = document.createElement('style'); this._terminalContainer = document.createElement('div'); - DOM.addClass(this._terminalContainer, 'terminal-outer-container'); + dom.addClass(this._terminalContainer, 'terminal-outer-container'); this._parentDomElement.appendChild(this._themeStyleElement); this._parentDomElement.appendChild(this._fontStyleElement); this._parentDomElement.appendChild(this._terminalContainer); @@ -152,7 +152,7 @@ export class TerminalPanel extends Panel { } private _attachEventListeners(): void { - this._register(DOM.addDisposableListener(this._parentDomElement, 'mousedown', (event: MouseEvent) => { + this._register(dom.addDisposableListener(this._parentDomElement, 'mousedown', (event: MouseEvent) => { if (this._terminalService.terminalInstances.length === 0) { return; } @@ -183,7 +183,7 @@ export class TerminalPanel extends Panel { } } })); - this._register(DOM.addDisposableListener(this._parentDomElement, 'contextmenu', (event: MouseEvent) => { + this._register(dom.addDisposableListener(this._parentDomElement, 'contextmenu', (event: MouseEvent) => { if (!this._cancelContextMenu) { const standardEvent = new StandardMouseEvent(event); let anchor: { x: number, y: number } = { x: standardEvent.posx, y: standardEvent.posy }; @@ -196,7 +196,7 @@ export class TerminalPanel extends Panel { } this._cancelContextMenu = false; })); - this._register(DOM.addDisposableListener(this._parentDomElement, 'click', (event) => { + this._register(dom.addDisposableListener(this._parentDomElement, 'click', (event) => { if (this._terminalService.terminalInstances.length === 0) { return; } @@ -205,14 +205,14 @@ export class TerminalPanel extends Panel { this._terminalService.getActiveInstance().focus(); } })); - this._register(DOM.addDisposableListener(this._parentDomElement, 'keyup', (event: KeyboardEvent) => { + this._register(dom.addDisposableListener(this._parentDomElement, 'keyup', (event: KeyboardEvent) => { if (event.keyCode === 27) { // Keep terminal open on escape event.stopPropagation(); } })); - this._register(DOM.addDisposableListener(this._parentDomElement, DOM.EventType.DROP, (e: DragEvent) => { - if (e.target === this._parentDomElement || DOM.isAncestor(e.target as HTMLElement, this._parentDomElement)) { + this._register(dom.addDisposableListener(this._parentDomElement, dom.EventType.DROP, (e: DragEvent) => { + if (e.target === this._parentDomElement || dom.isAncestor(e.target as HTMLElement, this._parentDomElement)) { if (!e.dataTransfer) { return; } @@ -269,8 +269,8 @@ export class TerminalPanel extends Panel { return; } let newFont = this._terminalService.configHelper.getFont(); - DOM.toggleClass(this._parentDomElement, 'enable-ligatures', this._terminalService.configHelper.config.fontLigatures); - DOM.toggleClass(this._parentDomElement, 'disable-bold', !this._terminalService.configHelper.config.enableBold); + dom.toggleClass(this._parentDomElement, 'enable-ligatures', this._terminalService.configHelper.config.fontLigatures); + dom.toggleClass(this._parentDomElement, 'disable-bold', !this._terminalService.configHelper.config.enableBold); if (!this._font || this._fontsDiffer(this._font, newFont)) { this._fontStyleElement.innerHTML = '.monaco-workbench .panel.integrated-terminal .xterm {' + `font-family: ${newFont.fontFamily};` + From 31875b67cc33f19b1b1ff8a8a1ced71c325e1684 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 24 May 2017 22:33:35 -0700 Subject: [PATCH 1140/2747] Reverting prev fix as it adds gap between docs and list --- .../editor/contrib/suggest/browser/media/suggest.css | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index 08b4e45593d89..fe64def759b94 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -34,18 +34,12 @@ .monaco-editor .suggest-widget.docs-side > .tree, .monaco-editor .suggest-widget.docs-side > .details { - /* subtract 2px for border, and another 2 for the Chromium zoom issue - where the children get slightly bigger width than what is set - which makes the docs go below the list */ - width: calc(50% - 4px); + width: 328px; } .monaco-editor.hc-black .suggest-widget.docs-side > .tree, .monaco-editor.hc-black .suggest-widget.docs-side > .details { - /* subtract 4px for border, and another 2 for the Chromium zoom issue - where the children get slightly bigger width than what is set - which makes the docs go below the list */ - width: calc(50% - 6px); + width: 326px; } /* Styles for Message element for when widget is loading or is empty */ From c96f85a6d22fc33cf86ac17ed4ba2f79b98ece53 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 24 May 2017 22:48:10 -0700 Subject: [PATCH 1141/2747] Fixes #26244 prevent double border --- .../contrib/suggest/browser/media/suggest.css | 30 +++++++++---- .../contrib/suggest/browser/suggestWidget.ts | 42 +++++++++++++++---- 2 files changed, 58 insertions(+), 14 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index fe64def759b94..7ca54b83969b6 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -34,7 +34,17 @@ .monaco-editor .suggest-widget.docs-side > .tree, .monaco-editor .suggest-widget.docs-side > .details { - width: 328px; + /* subtract 2px for border, and another 2 for the Chromium zoom issue + where the children get slightly bigger width than what is set + which makes the docs go below the list */ + width: calc(50% - 4px); + float: left; + +} + +.monaco-editor .suggest-widget.docs-side.list-right > .tree, +.monaco-editor .suggest-widget.docs-side.list-right > .details { + float: right; } .monaco-editor.hc-black .suggest-widget.docs-side > .tree, @@ -42,6 +52,14 @@ width: 326px; } +.monaco-editor .suggest-widget.docs-side .empty-left-border { + border-left-width: 0px; +} + +.monaco-editor .suggest-widget.docs-side .empty-right-border { + border-right-width: 0px; +} + /* Styles for Message element for when widget is loading or is empty */ .monaco-editor .suggest-widget > .message { padding-left: 22px; @@ -58,13 +76,7 @@ height: 100%; } -.monaco-editor .suggest-widget.docs-side > .tree { - float: left; -} -.monaco-editor .suggest-widget.docs-side.list-right > .tree { - float: right -} /** Styles for each row in the list element **/ @@ -207,6 +219,10 @@ display: none; } +.monaco-editor .suggest-widget.docs-below .details { + border-top-width: 0px; +} + .monaco-editor .suggest-widget .details > .monaco-scrollable-element { flex: 1; } diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 56871ef950444..c27e0dbaa9505 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -948,14 +948,42 @@ export class SuggestWidget implements IContentWidget, IDelegate } private adjustListPosition(): void { - if (hasClass(this.element, 'widget-above') - && hasClass(this.element, 'docs-side') - && this.details.element.offsetHeight > this.listElement.offsetHeight) { - // Docs is bigger than list and widget is above cursor, apply margin-top so that list appears right above cursor - this.listElement.style.marginTop = `${this.details.element.offsetHeight - this.listElement.offsetHeight}px`; - } else { - this.listElement.style.marginTop = '0px'; + + + if (hasClass(this.element, 'docs-side')) { + + if (this.details.element.offsetHeight > this.listElement.offsetHeight) { + if (hasClass(this.element, 'widget-above')) { + // Docs is bigger than list and widget is above cursor, apply margin-top so that list appears right above cursor + this.listElement.style.marginTop = `${this.details.element.offsetHeight - this.listElement.offsetHeight}px`; + } + + if (hasClass(this.element, 'list-right')) { + addClass(this.listElement, 'empty-left-border'); + removeClass(this.listElement, 'empty-right-border'); + } else { + addClass(this.listElement, 'empty-right-border'); + removeClass(this.listElement, 'empty-left-border'); + } + + removeClass(this.details.element, 'empty-left-border'); + removeClass(this.details.element, 'empty-right-border'); + return; + } else { + if (hasClass(this.element, 'list-right')) { + addClass(this.details.element, 'empty-right-border'); + removeClass(this.details.element, 'empty-left-border'); + } else { + addClass(this.details.element, 'empty-left-border'); + removeClass(this.details.element, 'empty-right-border'); + } + + removeClass(this.listElement, 'empty-right-border'); + removeClass(this.listElement, 'empty-left-border'); + } } + + this.listElement.style.marginTop = '0px'; } private renderDetails(): void { From 819467443ca071ace3a0e1036bb67e10b9f68488 Mon Sep 17 00:00:00 2001 From: Daniel Ye Date: Wed, 24 May 2017 22:56:48 -0700 Subject: [PATCH 1142/2747] 2017-05-24. Merged in translations from transifex. --- build/win32/i18n/messages.pt-br.isl | 8 + .../out/settingsDocumentHelper.i18n.json | 2 +- i18n/chs/extensions/gulp/out/main.i18n.json | 2 +- i18n/chs/extensions/jake/out/main.i18n.json | 4 +- i18n/chs/extensions/jake/package.i18n.json | 4 +- .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/chs/extensions/npm/package.i18n.json | 6 + .../resourceviewer/resourceViewer.i18n.json | 2 - .../src/vs/code/electron-main/menus.i18n.json | 4 +- .../config/commonEditorConfig.i18n.json | 6 +- .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../indentation/common/indentation.i18n.json | 2 +- .../suggest/browser/suggestWidget.i18n.json | 2 +- .../common/configurationRegistry.i18n.json | 2 +- .../markers/common/problemMatcher.i18n.json | 7 + .../api/node/extHostTreeViews.i18n.json | 6 +- .../src/vs/workbench/common/theme.i18n.json | 1 + .../main.contribution.i18n.json | 1 + .../inspectKeybindings.i18n.json | 2 +- .../electron-browser/toggleWordWrap.i18n.json | 2 +- .../parts/debug/node/debugAdapter.i18n.json | 1 + .../actions/evaluateMath.i18n.json | 2 +- .../actions/incrementDecrement.i18n.json | 12 +- .../actions/removeTag.i18n.json | 2 +- .../actions/splitJoinTag.i18n.json | 2 +- .../actions/updateImageSize.i18n.json | 2 +- .../actions/updateTag.i18n.json | 6 +- .../actions/wrapWithAbbreviation.i18n.json | 2 +- .../emmet.contribution.i18n.json | 6 +- .../treeExplorer.contribution.i18n.json | 4 +- .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 1 - .../common/editors/fileEditorInput.i18n.json | 2 +- .../performance.contribution.i18n.json | 8 +- .../browser/keybindingsEditor.i18n.json | 4 +- .../browser/preferencesActions.i18n.json | 2 +- .../scm.contribution.i18n.json | 3 +- .../scm/electron-browser/scmMenus.i18n.json | 3 +- .../electron-browser/TMSnippets.i18n.json | 2 +- .../parts/tasks/browser/quickOpen.i18n.json | 4 +- .../terminalTaskSystem.i18n.json | 3 +- .../tasks/node/processTaskSystem.i18n.json | 3 +- .../electron-browser/watermark.i18n.json | 2 +- .../vs_code_welcome_page.i18n.json | 7 +- .../electron-browser/welcomePage.i18n.json | 14 ++ .../workbenchThemeService.i18n.json | 12 +- .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/cht/extensions/npm/package.i18n.json | 6 + .../resourceviewer/resourceViewer.i18n.json | 2 - .../src/vs/code/electron-main/menus.i18n.json | 1 + .../config/commonEditorConfig.i18n.json | 1 - .../common/view/editorColorRegistry.i18n.json | 3 + .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../api/node/extHostTreeViews.i18n.json | 4 +- .../src/vs/workbench/common/theme.i18n.json | 1 + .../main.contribution.i18n.json | 1 + .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 1 - .../performance.contribution.i18n.json | 6 +- .../scm.contribution.i18n.json | 1 + .../scm/electron-browser/scmMenus.i18n.json | 1 + .../parts/tasks/browser/quickOpen.i18n.json | 4 +- .../themes.contribution.i18n.json | 1 + .../vs_code_welcome_page.i18n.json | 3 + .../electron-browser/welcomePage.i18n.json | 13 +- .../walkThroughPart.i18n.json | 3 +- i18n/deu/extensions/git/out/main.i18n.json | 2 +- .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/deu/extensions/npm/package.i18n.json | 6 + .../resourceviewer/resourceViewer.i18n.json | 2 - .../config/commonEditorConfig.i18n.json | 1 - .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../main.contribution.i18n.json | 1 + .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 1 - .../performance.contribution.i18n.json | 6 +- .../electron-browser/welcomePage.i18n.json | 5 + i18n/esn/extensions/jake/out/main.i18n.json | 4 +- i18n/esn/extensions/jake/package.i18n.json | 4 +- .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/esn/extensions/npm/package.i18n.json | 6 + .../resourceviewer/resourceViewer.i18n.json | 2 - .../config/commonEditorConfig.i18n.json | 3 +- .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../suggest/browser/suggestWidget.i18n.json | 1 + ...guageConfigurationExtensionPoint.i18n.json | 6 +- .../markers/common/problemMatcher.i18n.json | 7 + .../theme/common/colorRegistry.i18n.json | 3 + .../api/node/extHostTreeViews.i18n.json | 6 +- .../src/vs/workbench/common/theme.i18n.json | 1 + .../main.contribution.i18n.json | 1 + .../parts/debug/node/debugAdapter.i18n.json | 1 + .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 1 - .../performance.contribution.i18n.json | 8 +- .../scm.contribution.i18n.json | 1 + .../scm/electron-browser/scmMenus.i18n.json | 1 + .../parts/tasks/browser/quickOpen.i18n.json | 4 +- .../terminalTaskSystem.i18n.json | 3 +- .../tasks/node/processTaskSystem.i18n.json | 3 +- .../vs_code_welcome_page.i18n.json | 5 + .../electron-browser/welcomePage.i18n.json | 14 ++ .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/fra/extensions/npm/package.i18n.json | 6 + .../resourceviewer/resourceViewer.i18n.json | 2 - .../config/commonEditorConfig.i18n.json | 1 - .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../main.contribution.i18n.json | 1 + .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 1 - .../performance.contribution.i18n.json | 6 +- .../electron-browser/welcomePage.i18n.json | 5 + .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/ita/extensions/npm/package.i18n.json | 6 + .../resourceviewer/resourceViewer.i18n.json | 2 - .../config/commonEditorConfig.i18n.json | 2 +- .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../markers/common/problemMatcher.i18n.json | 7 + .../main.contribution.i18n.json | 1 + .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 1 - .../performance.contribution.i18n.json | 6 +- .../electron-browser/welcomePage.i18n.json | 5 + i18n/jpn/extensions/jake/out/main.i18n.json | 4 +- i18n/jpn/extensions/jake/package.i18n.json | 4 +- .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/jpn/extensions/npm/package.i18n.json | 6 + .../extensions/typescript/package.i18n.json | 5 +- .../resourceviewer/resourceViewer.i18n.json | 2 - .../config/commonEditorConfig.i18n.json | 2 +- .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../suggest/browser/suggestWidget.i18n.json | 1 + ...guageConfigurationExtensionPoint.i18n.json | 1 + .../markers/common/problemMatcher.i18n.json | 7 + .../theme/common/colorRegistry.i18n.json | 1 + .../api/node/extHostTreeViews.i18n.json | 6 +- .../src/vs/workbench/common/theme.i18n.json | 1 + .../main.contribution.i18n.json | 1 + .../electronDebugActions.i18n.json | 1 + .../parts/debug/node/debugAdapter.i18n.json | 1 + .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 3 +- .../performance.contribution.i18n.json | 8 +- .../browser/preferencesRenderers.i18n.json | 1 + .../scm.contribution.i18n.json | 1 + .../scm/electron-browser/scmMenus.i18n.json | 1 + .../parts/tasks/browser/quickOpen.i18n.json | 4 +- .../tasks/browser/restartQuickOpen.i18n.json | 2 +- .../tasks/browser/taskQuickOpen.i18n.json | 2 +- .../terminalTaskSystem.i18n.json | 3 +- .../tasks/node/processTaskSystem.i18n.json | 3 +- .../terminalActions.i18n.json | 4 +- .../themes.contribution.i18n.json | 1 + .../vs_code_welcome_page.i18n.json | 7 + .../electron-browser/welcomePage.i18n.json | 18 +- .../configurationEditingService.i18n.json | 1 + .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/kor/extensions/npm/package.i18n.json | 6 + .../resourceviewer/resourceViewer.i18n.json | 2 - .../config/commonEditorConfig.i18n.json | 1 - .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../main.contribution.i18n.json | 1 + .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 1 - .../performance.contribution.i18n.json | 6 +- .../electron-browser/welcomePage.i18n.json | 5 + .../out/settingsDocumentHelper.i18n.json | 36 ++++ .../css/client/out/cssMain.i18n.json | 8 + i18n/ptb/extensions/css/package.i18n.json | 67 +++++++ .../out/packageDocumentHelper.i18n.json | 9 + .../extensions/git/out/askpass-main.i18n.json | 8 + .../ptb/extensions/git/out/commands.i18n.json | 43 +++++ i18n/ptb/extensions/git/out/main.i18n.json | 11 ++ i18n/ptb/extensions/git/out/model.i18n.json | 14 ++ .../extensions/git/out/scmProvider.i18n.json | 8 + .../extensions/git/out/statusbar.i18n.json | 11 ++ i18n/ptb/extensions/git/package.i18n.json | 48 +++++ i18n/ptb/extensions/grunt/out/main.i18n.json | 8 + i18n/ptb/extensions/grunt/package.i18n.json | 8 + i18n/ptb/extensions/gulp/out/main.i18n.json | 8 + i18n/ptb/extensions/gulp/package.i18n.json | 8 + .../html/client/out/htmlMain.i18n.json | 8 + i18n/ptb/extensions/html/package.i18n.json | 27 +++ i18n/ptb/extensions/jake/out/main.i18n.json | 8 + i18n/ptb/extensions/jake/package.i18n.json | 8 + .../features/bowerJSONContribution.i18n.json | 10 ++ .../packageJSONContribution.i18n.json | 13 ++ .../json/client/out/jsonMain.i18n.json | 8 + i18n/ptb/extensions/json/package.i18n.json | 15 ++ .../markdown/out/extension.i18n.json | 6 + .../out/previewContentProvider.i18n.json | 10 ++ .../markdown/out/security.i18n.json | 11 ++ .../ptb/extensions/markdown/package.i18n.json | 22 +++ .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/ptb/extensions/npm/package.i18n.json | 6 + .../out/features/validationProvider.i18n.json | 13 ++ i18n/ptb/extensions/php/package.i18n.json | 14 ++ .../out/features/bufferSyncSupport.i18n.json | 12 ++ .../features/completionItemProvider.i18n.json | 9 + ...rectiveCommentCompletionProvider.i18n.json | 10 ++ .../implementationsCodeLensProvider.i18n.json | 10 ++ .../jsDocCompletionProvider.i18n.json | 8 + .../referencesCodeLensProvider.i18n.json | 10 ++ .../typescript/out/typescriptMain.i18n.json | 15 ++ .../out/typescriptServiceClient.i18n.json | 24 +++ .../typescript/out/utils/logger.i18n.json | 8 + .../out/utils/projectStatus.i18n.json | 12 ++ .../out/utils/typingsStatus.i18n.json | 12 ++ .../extensions/typescript/package.i18n.json | 45 +++++ .../browser/ui/actionbar/actionbar.i18n.json | 8 + .../vs/base/browser/ui/aria/aria.i18n.json | 8 + .../browser/ui/findinput/findInput.i18n.json | 8 + .../findinput/findInputCheckboxes.i18n.json | 10 ++ .../browser/ui/inputbox/inputBox.i18n.json | 10 ++ .../resourceviewer/resourceViewer.i18n.json | 15 ++ .../base/browser/ui/toolbar/toolbar.i18n.json | 8 + .../src/vs/base/common/errorMessage.i18n.json | 18 ++ .../base/common/jsonErrorMessages.i18n.json | 16 ++ .../src/vs/base/common/processes.i18n.json | 11 ++ .../ptb/src/vs/base/common/severity.i18n.json | 10 ++ i18n/ptb/src/vs/base/node/processes.i18n.json | 8 + i18n/ptb/src/vs/base/node/zip.i18n.json | 8 + .../browser/quickOpenModel.i18n.json | 9 + .../browser/quickOpenWidget.i18n.json | 9 + .../parts/tree/browser/treeDefaults.i18n.json | 8 + .../src/vs/code/electron-main/menus.i18n.json | 164 ++++++++++++++++++ .../vs/code/electron-main/window.i18n.json | 8 + .../vs/code/electron-main/windows.i18n.json | 22 +++ .../src/vs/code/node/cliProcessMain.i18n.json | 17 ++ .../config/commonEditorConfig.i18n.json | 76 ++++++++ .../common/config/editorOptions.i18n.json | 8 + .../editor/common/controller/cursor.i18n.json | 8 + .../model/textModelWithTokens.i18n.json | 8 + .../common/modes/modesRegistry.i18n.json | 8 + .../editor/common/services/bulkEdit.i18n.json | 11 ++ .../common/services/modeServiceImpl.i18n.json | 16 ++ .../services/modelServiceImpl.i18n.json | 9 + .../common/view/editorColorRegistry.i18n.json | 20 +++ .../browser/accessibility.i18n.json | 15 ++ .../common/bracketMatching.i18n.json | 8 + .../common/caretOperations.i18n.json | 9 + .../common/transpose.i18n.json | 8 + .../clipboard/browser/clipboard.i18n.json | 11 ++ .../contrib/comment/common/comment.i18n.json | 11 ++ .../contextmenu/browser/contextmenu.i18n.json | 8 + .../contrib/find/browser/findWidget.i18n.json | 21 +++ .../find/common/findController.i18n.json | 19 ++ .../contrib/folding/browser/folding.i18n.json | 14 ++ .../format/browser/formatActions.i18n.json | 13 ++ .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../gotoError/browser/gotoError.i18n.json | 13 ++ .../contrib/hover/browser/hover.i18n.json | 8 + .../hover/browser/modesContentHover.i18n.json | 8 + .../common/inPlaceReplace.i18n.json | 9 + .../indentation/common/indentation.i18n.json | 15 ++ .../inspectTMScopes.i18n.json | 9 + .../common/linesOperations.i18n.json | 25 +++ .../contrib/links/browser/links.i18n.json | 12 ++ .../multicursor/common/multicursor.i18n.json | 10 ++ .../browser/parameterHints.i18n.json | 8 + .../browser/parameterHintsWidget.i18n.json | 8 + .../browser/quickFixCommands.i18n.json | 10 ++ .../browser/referenceSearch.i18n.json | 9 + .../browser/referencesController.i18n.json | 8 + .../browser/referencesModel.i18n.json | 14 ++ .../browser/referencesWidget.i18n.json | 27 +++ .../contrib/rename/browser/rename.i18n.json | 11 ++ .../rename/browser/renameInputField.i18n.json | 8 + .../smartSelect/common/smartSelect.i18n.json | 9 + .../browser/suggestController.i18n.json | 9 + .../suggest/browser/suggestWidget.i18n.json | 21 +++ .../common/toggleTabFocusMode.i18n.json | 8 + .../common/wordHighlighter.i18n.json | 9 + .../browser/peekViewWidget.i18n.json | 8 + .../textMate/TMSyntax.i18n.json | 14 ++ ...guageConfigurationExtensionPoint.i18n.json | 23 +++ .../editor/node/textMate/TMGrammars.i18n.json | 13 ++ .../browser/menuItemActionItem.i18n.json | 8 + .../menusExtensionPoint.i18n.json | 41 +++++ .../common/configurationRegistry.i18n.json | 19 ++ .../platform/environment/node/argv.i18n.json | 32 ++++ .../extensionEnablementService.i18n.json | 8 + .../common/extensionManagement.i18n.json | 9 + .../node/extensionGalleryService.i18n.json | 9 + .../node/extensionManagementService.i18n.json | 22 +++ .../common/abstractExtensionService.i18n.json | 11 ++ .../common/extensionsRegistry.i18n.json | 24 +++ .../node/extensionValidator.i18n.json | 24 +++ .../node/integrityServiceImpl.i18n.json | 11 ++ .../jsonValidationExtensionPoint.i18n.json | 15 ++ .../abstractKeybindingService.i18n.json | 9 + .../common/keybindingLabels.i18n.json | 16 ++ .../markers/common/problemMatcher.i18n.json | 61 +++++++ .../platform/message/common/message.i18n.json | 10 ++ .../platform/request/node/request.i18n.json | 11 ++ .../common/telemetryService.i18n.json | 9 + .../theme/common/colorRegistry.i18n.json | 78 +++++++++ .../mainThreadExtensionService.i18n.json | 9 + .../mainThreadMessageService.i18n.json | 10 ++ .../api/node/extHostDiagnostics.i18n.json | 8 + .../api/node/extHostTreeViews.i18n.json | 10 ++ .../browser/actions/configureLocale.i18n.json | 13 ++ .../browser/actions/fileActions.i18n.json | 9 + .../toggleActivityBarVisibility.i18n.json | 9 + .../actions/toggleEditorLayout.i18n.json | 11 ++ .../actions/toggleSidebarPosition.i18n.json | 9 + .../actions/toggleSidebarVisibility.i18n.json | 9 + .../toggleStatusbarVisibility.i18n.json | 9 + .../browser/actions/toggleZenMode.i18n.json | 9 + .../activitybar/activitybarActions.i18n.json | 14 ++ .../activitybar/activitybarPart.i18n.json | 9 + .../browser/parts/compositePart.i18n.json | 9 + .../parts/editor/binaryDiffEditor.i18n.json | 8 + .../parts/editor/binaryEditor.i18n.json | 8 + .../editor/editor.contribution.i18n.json | 16 ++ .../parts/editor/editorActions.i18n.json | 55 ++++++ .../parts/editor/editorCommands.i18n.json | 12 ++ .../browser/parts/editor/editorPart.i18n.json | 14 ++ .../parts/editor/editorPicker.i18n.json | 13 ++ .../parts/editor/editorStatus.i18n.json | 49 ++++++ .../parts/editor/tabsTitleControl.i18n.json | 8 + .../parts/editor/textDiffEditor.i18n.json | 16 ++ .../browser/parts/editor/textEditor.i18n.json | 8 + .../parts/editor/textResourceEditor.i18n.json | 12 ++ .../parts/editor/titleControl.i18n.json | 14 ++ .../parts/panel/panelActions.i18n.json | 15 ++ .../browser/parts/panel/panelPart.i18n.json | 8 + .../quickopen/quickOpenController.i18n.json | 17 ++ .../quickopen.contribution.i18n.json | 12 ++ .../parts/sidebar/sidebarPart.i18n.json | 9 + .../parts/statusbar/statusbarPart.i18n.json | 9 + .../parts/titlebar/titlebarPart.i18n.json | 9 + .../vs/workbench/browser/quickopen.i18n.json | 11 ++ .../vs/workbench/browser/viewlet.i18n.json | 9 + .../src/vs/workbench/common/theme.i18n.json | 44 +++++ .../electron-browser/actions.i18n.json | 41 +++++ .../electron-browser/commands.i18n.json | 8 + .../electron-browser/crashReporter.i18n.json | 9 + .../electron-browser/extensionHost.i18n.json | 11 ++ .../main.contribution.i18n.json | 62 +++++++ .../workbench/electron-browser/main.i18n.json | 9 + .../electron-browser/shell.i18n.json | 8 + .../electron-browser/window.i18n.json | 15 ++ .../node/extensionHostMain.i18n.json | 8 + .../workbench/node/extensionPoints.i18n.json | 11 ++ .../cli.contribution.i18n.json | 18 ++ .../inspectKeybindings.i18n.json | 8 + .../toggleRenderControlCharacter.i18n.json | 8 + .../toggleRenderWhitespace.i18n.json | 8 + .../electron-browser/toggleWordWrap.i18n.json | 11 ++ .../wordWrapMigration.i18n.json | 11 ++ .../debug/browser/breakpointWidget.i18n.json | 13 ++ .../debug/browser/debugActionItems.i18n.json | 9 + .../debug/browser/debugActions.i18n.json | 49 ++++++ .../browser/debugActionsWidget.i18n.json | 8 + .../browser/debugContentProvider.i18n.json | 8 + .../browser/debugEditorActions.i18n.json | 15 ++ .../browser/debugEditorModelManager.i18n.json | 11 ++ .../debug/browser/debugQuickOpen.i18n.json | 11 ++ .../debug/browser/exceptionWidget.i18n.json | 11 ++ .../debug/browser/linkDetector.i18n.json | 9 + .../parts/debug/common/debug.i18n.json | 8 + .../parts/debug/common/debugModel.i18n.json | 9 + .../parts/debug/common/debugSource.i18n.json | 8 + .../debug.contribution.i18n.json | 20 +++ .../electron-browser/debugCommands.i18n.json | 8 + .../debugConfigurationManager.i18n.json | 38 ++++ .../debugEditorContribution.i18n.json | 20 +++ .../electron-browser/debugHover.i18n.json | 8 + .../electron-browser/debugService.i18n.json | 25 +++ .../electron-browser/debugViewer.i18n.json | 28 +++ .../electron-browser/debugViews.i18n.json | 20 +++ .../electronDebugActions.i18n.json | 11 ++ .../rawDebugSession.i18n.json | 12 ++ .../debug/electron-browser/repl.i18n.json | 11 ++ .../electron-browser/replViewer.i18n.json | 12 ++ .../statusbarColorProvider.i18n.json | 8 + .../terminalSupport.i18n.json | 9 + .../parts/debug/node/debugAdapter.i18n.json | 20 +++ .../actions/showEmmetCommands.i18n.json | 8 + .../actions/balance.i18n.json | 9 + .../actions/editPoints.i18n.json | 9 + .../actions/evaluateMath.i18n.json | 8 + .../actions/expandAbbreviation.i18n.json | 8 + .../actions/incrementDecrement.i18n.json | 13 ++ .../actions/matchingPair.i18n.json | 8 + .../actions/mergeLines.i18n.json | 8 + .../actions/reflectCssValue.i18n.json | 8 + .../actions/removeTag.i18n.json | 8 + .../actions/selectItem.i18n.json | 9 + .../actions/splitJoinTag.i18n.json | 8 + .../actions/toggleComment.i18n.json | 8 + .../actions/updateImageSize.i18n.json | 8 + .../actions/updateTag.i18n.json | 10 ++ .../actions/wrapWithAbbreviation.i18n.json | 10 ++ .../emmet.contribution.i18n.json | 13 ++ .../terminal.contribution.i18n.json | 15 ++ .../terminalService.i18n.json | 12 ++ .../treeExplorer.contribution.i18n.json | 14 ++ .../browser/treeExplorerActions.i18n.json | 8 + .../browser/treeExplorerService.i18n.json | 8 + .../browser/views/treeExplorerView.i18n.json | 8 + .../browser/dependenciesViewer.i18n.json | 9 + .../browser/extensionEditor.i18n.json | 39 +++++ .../browser/extensionsActions.i18n.json | 55 ++++++ .../browser/extensionsQuickOpen.i18n.json | 10 ++ .../common/extensionsFileTemplate.i18n.json | 10 ++ .../common/extensionsInput.i18n.json | 8 + .../extensionTipsService.i18n.json | 16 ++ .../extensions.contribution.i18n.json | 15 ++ .../extensionsActions.i18n.json | 11 ++ .../extensionsUtils.i18n.json | 10 ++ .../extensionsViewlet.i18n.json | 15 ++ .../node/extensionsWorkbenchService.i18n.json | 17 ++ .../electron-browser/feedback.i18n.json | 25 +++ .../editors/binaryFileEditor.i18n.json | 8 + .../browser/editors/textFileEditor.i18n.json | 11 ++ .../fileActions.contribution.i18n.json | 11 ++ .../parts/files/browser/fileActions.i18n.json | 73 ++++++++ .../files/browser/fileCommands.i18n.json | 9 + .../browser/files.contribution.i18n.json | 40 +++++ .../files/browser/saveErrorHandler.i18n.json | 16 ++ .../files/browser/views/emptyView.i18n.json | 11 ++ .../browser/views/explorerView.i18n.json | 9 + .../browser/views/explorerViewer.i18n.json | 12 ++ .../browser/views/openEditorsView.i18n.json | 11 ++ .../browser/views/openEditorsViewer.i18n.json | 13 ++ .../files/common/dirtyFilesTracker.i18n.json | 8 + .../common/editors/fileEditorInput.i18n.json | 8 + .../html/browser/html.contribution.i18n.json | 8 + .../html/browser/htmlPreviewPart.i18n.json | 8 + .../parts/html/browser/webview.i18n.json | 8 + .../parts/markers/common/messages.i18n.json | 39 +++++ .../markersElectronContributions.i18n.json | 8 + .../nps.contribution.i18n.json | 11 ++ .../browser/output.contribution.i18n.json | 10 ++ .../output/browser/outputActions.i18n.json | 11 ++ .../output/browser/outputPanel.i18n.json | 9 + .../parts/output/common/output.i18n.json | 9 + .../performance.contribution.i18n.json | 15 ++ .../browser/keybindingWidgets.i18n.json | 9 + .../browser/keybindingsEditor.i18n.json | 35 ++++ .../keybindingsEditorContribution.i18n.json | 10 ++ .../preferences.contribution.i18n.json | 10 ++ .../browser/preferencesActions.i18n.json | 14 ++ .../browser/preferencesEditor.i18n.json | 15 ++ .../browser/preferencesRenderers.i18n.json | 13 ++ .../browser/preferencesService.i18n.json | 13 ++ .../browser/preferencesWidgets.i18n.json | 10 ++ .../common/keybindingsEditorModel.i18n.json | 11 ++ .../common/preferencesModels.i18n.json | 9 + .../browser/commandsHandler.i18n.json | 16 ++ .../browser/gotoLineHandler.i18n.json | 14 ++ .../browser/gotoSymbolHandler.i18n.json | 34 ++++ .../quickopen/browser/helpHandler.i18n.json | 10 ++ .../browser/quickopen.contribution.i18n.json | 14 ++ .../browser/viewPickerHandler.i18n.json | 15 ++ .../scm.contribution.i18n.json | 12 ++ .../electron-browser/scmActivity.i18n.json | 8 + .../scm/electron-browser/scmMenus.i18n.json | 9 + .../scm/electron-browser/scmViewlet.i18n.json | 10 ++ .../browser/openAnythingHandler.i18n.json | 9 + .../search/browser/openFileHandler.i18n.json | 9 + .../browser/openSymbolHandler.i18n.json | 11 ++ .../browser/patternInputWidget.i18n.json | 12 ++ .../search/browser/replaceService.i18n.json | 8 + .../browser/search.contribution.i18n.json | 22 +++ .../search/browser/searchActions.i18n.json | 21 +++ .../browser/searchResultsView.i18n.json | 12 ++ .../search/browser/searchViewlet.i18n.json | 50 ++++++ .../search/browser/searchWidget.i18n.json | 15 ++ .../electron-browser/TMSnippets.i18n.json | 13 ++ .../electron-browser/insertSnippet.i18n.json | 8 + .../snippets.contribution.i18n.json | 16 ++ .../snippetsService.i18n.json | 9 + .../electron-browser/tabCompletion.i18n.json | 8 + .../parts/tasks/browser/quickOpen.i18n.json | 10 ++ .../tasks/browser/restartQuickOpen.i18n.json | 10 ++ .../tasks/browser/taskQuickOpen.i18n.json | 10 ++ .../browser/terminateQuickOpen.i18n.json | 10 ++ .../tasks/common/taskConfiguration.i18n.json | 17 ++ .../tasks/common/taskTemplates.i18n.json | 13 ++ .../jsonSchemaCommon.i18n.json | 38 ++++ .../electron-browser/jsonSchema_v1.i18n.json | 12 ++ .../electron-browser/jsonSchema_v2.i18n.json | 14 ++ .../task.contribution.i18n.json | 47 +++++ .../terminalTaskSystem.i18n.json | 11 ++ .../node/processRunnerDetector.i18n.json | 15 ++ .../tasks/node/processTaskSystem.i18n.json | 12 ++ .../terminal.contribution.i18n.json | 30 ++++ .../terminalActions.i18n.json | 32 ++++ .../terminalColorRegistry.i18n.json | 10 ++ .../terminalConfigHelper.i18n.json | 10 ++ .../terminalInstance.i18n.json | 11 ++ .../terminalLinkHandler.i18n.json | 9 + .../electron-browser/terminalPanel.i18n.json | 11 ++ .../terminalService.i18n.json | 15 ++ .../themes.contribution.i18n.json | 19 ++ ...edWorkspaceSettings.contribution.i18n.json | 11 ++ .../releaseNotesInput.i18n.json | 8 + .../update.contribution.i18n.json | 10 ++ .../update/electron-browser/update.i18n.json | 19 ++ .../electron-browser/watermark.i18n.json | 24 +++ .../overlay/browser/welcomeOverlay.i18n.json | 17 ++ .../vs_code_welcome_page.i18n.json | 44 +++++ .../welcomePage.contribution.i18n.json | 10 ++ .../electron-browser/welcomePage.i18n.json | 31 ++++ .../editor/editorWalkThrough.i18n.json | 9 + .../walkThrough.contribution.i18n.json | 10 ++ .../walkThroughActions.i18n.json | 11 ++ .../walkThroughPart.i18n.json | 10 ++ .../configurationEditingService.i18n.json | 17 ++ .../editor/browser/editorService.i18n.json | 8 + .../electron-browser/fileService.i18n.json | 11 ++ .../services/files/node/fileService.i18n.json | 14 ++ .../common/keybindingEditing.i18n.json | 11 ++ .../keybindingService.i18n.json | 26 +++ .../message/browser/messageList.i18n.json | 14 ++ .../electron-browser/messageService.i18n.json | 9 + .../common/workbenchModeService.i18n.json | 16 ++ .../common/textFileEditorModel.i18n.json | 9 + .../textfile/common/textFileService.i18n.json | 8 + .../textFileService.i18n.json | 18 ++ .../themes/common/colorThemeSchema.i18n.json | 11 ++ .../common/fileIconThemeSchema.i18n.json | 37 ++++ .../electron-browser/colorThemeData.i18n.json | 13 ++ .../workbenchThemeService.i18n.json | 32 ++++ .../markdown/out/extension.i18n.json | 6 + .../out/codelensProvider.i18n.json | 6 + .../out/commandHandler.i18n.json | 6 + .../out/mergeDecorator.i18n.json | 6 + .../merge-conflict/package.i18n.json | 6 + i18n/rus/extensions/npm/package.i18n.json | 6 + .../resourceviewer/resourceViewer.i18n.json | 2 - .../src/vs/code/electron-main/menus.i18n.json | 2 + .../config/commonEditorConfig.i18n.json | 1 - .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../main.contribution.i18n.json | 1 + .../extensionsUtils.i18n.json | 6 +- .../browser/files.contribution.i18n.json | 1 - .../performance.contribution.i18n.json | 6 +- .../electron-browser/welcomePage.i18n.json | 5 + 587 files changed, 6511 insertions(+), 128 deletions(-) create mode 100644 build/win32/i18n/messages.pt-br.isl create mode 100644 i18n/chs/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/chs/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/chs/extensions/npm/package.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/cht/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/cht/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/cht/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/cht/extensions/npm/package.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/deu/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/deu/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/deu/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/deu/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/deu/extensions/npm/package.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/esn/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/esn/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/esn/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/esn/extensions/npm/package.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/fra/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/fra/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/fra/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/fra/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/fra/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/fra/extensions/npm/package.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/ita/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/ita/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/ita/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/ita/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/ita/extensions/npm/package.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/jpn/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/jpn/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/jpn/extensions/npm/package.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/kor/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/kor/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/kor/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/kor/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/kor/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/kor/extensions/npm/package.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json create mode 100644 i18n/ptb/extensions/css/client/out/cssMain.i18n.json create mode 100644 i18n/ptb/extensions/css/package.i18n.json create mode 100644 i18n/ptb/extensions/extension-editing/out/packageDocumentHelper.i18n.json create mode 100644 i18n/ptb/extensions/git/out/askpass-main.i18n.json create mode 100644 i18n/ptb/extensions/git/out/commands.i18n.json create mode 100644 i18n/ptb/extensions/git/out/main.i18n.json create mode 100644 i18n/ptb/extensions/git/out/model.i18n.json create mode 100644 i18n/ptb/extensions/git/out/scmProvider.i18n.json create mode 100644 i18n/ptb/extensions/git/out/statusbar.i18n.json create mode 100644 i18n/ptb/extensions/git/package.i18n.json create mode 100644 i18n/ptb/extensions/grunt/out/main.i18n.json create mode 100644 i18n/ptb/extensions/grunt/package.i18n.json create mode 100644 i18n/ptb/extensions/gulp/out/main.i18n.json create mode 100644 i18n/ptb/extensions/gulp/package.i18n.json create mode 100644 i18n/ptb/extensions/html/client/out/htmlMain.i18n.json create mode 100644 i18n/ptb/extensions/html/package.i18n.json create mode 100644 i18n/ptb/extensions/jake/out/main.i18n.json create mode 100644 i18n/ptb/extensions/jake/package.i18n.json create mode 100644 i18n/ptb/extensions/javascript/out/features/bowerJSONContribution.i18n.json create mode 100644 i18n/ptb/extensions/javascript/out/features/packageJSONContribution.i18n.json create mode 100644 i18n/ptb/extensions/json/client/out/jsonMain.i18n.json create mode 100644 i18n/ptb/extensions/json/package.i18n.json create mode 100644 i18n/ptb/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/ptb/extensions/markdown/out/previewContentProvider.i18n.json create mode 100644 i18n/ptb/extensions/markdown/out/security.i18n.json create mode 100644 i18n/ptb/extensions/markdown/package.i18n.json create mode 100644 i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/ptb/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/ptb/extensions/npm/package.i18n.json create mode 100644 i18n/ptb/extensions/php/out/features/validationProvider.i18n.json create mode 100644 i18n/ptb/extensions/php/package.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/features/bufferSyncSupport.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/features/completionItemProvider.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/typescriptMain.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/typescriptServiceClient.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/utils/logger.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/utils/projectStatus.i18n.json create mode 100644 i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json create mode 100644 i18n/ptb/extensions/typescript/package.i18n.json create mode 100644 i18n/ptb/src/vs/base/browser/ui/actionbar/actionbar.i18n.json create mode 100644 i18n/ptb/src/vs/base/browser/ui/aria/aria.i18n.json create mode 100644 i18n/ptb/src/vs/base/browser/ui/findinput/findInput.i18n.json create mode 100644 i18n/ptb/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json create mode 100644 i18n/ptb/src/vs/base/browser/ui/inputbox/inputBox.i18n.json create mode 100644 i18n/ptb/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json create mode 100644 i18n/ptb/src/vs/base/browser/ui/toolbar/toolbar.i18n.json create mode 100644 i18n/ptb/src/vs/base/common/errorMessage.i18n.json create mode 100644 i18n/ptb/src/vs/base/common/jsonErrorMessages.i18n.json create mode 100644 i18n/ptb/src/vs/base/common/processes.i18n.json create mode 100644 i18n/ptb/src/vs/base/common/severity.i18n.json create mode 100644 i18n/ptb/src/vs/base/node/processes.i18n.json create mode 100644 i18n/ptb/src/vs/base/node/zip.i18n.json create mode 100644 i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json create mode 100644 i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json create mode 100644 i18n/ptb/src/vs/base/parts/tree/browser/treeDefaults.i18n.json create mode 100644 i18n/ptb/src/vs/code/electron-main/menus.i18n.json create mode 100644 i18n/ptb/src/vs/code/electron-main/window.i18n.json create mode 100644 i18n/ptb/src/vs/code/electron-main/windows.i18n.json create mode 100644 i18n/ptb/src/vs/code/node/cliProcessMain.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/config/editorOptions.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/controller/cursor.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/model/textModelWithTokens.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/modes/modesRegistry.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/services/bulkEdit.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/services/modeServiceImpl.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/services/modelServiceImpl.i18n.json create mode 100644 i18n/ptb/src/vs/editor/common/view/editorColorRegistry.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/comment/common/comment.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/find/browser/findWidget.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/find/common/findController.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/folding/browser/folding.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/format/browser/formatActions.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/hover/browser/hover.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/indentation/common/indentation.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/links/browser/links.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/rename/browser/rename.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json create mode 100644 i18n/ptb/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json create mode 100644 i18n/ptb/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json create mode 100644 i18n/ptb/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json create mode 100644 i18n/ptb/src/vs/editor/node/textMate/TMGrammars.i18n.json create mode 100644 i18n/ptb/src/vs/platform/actions/browser/menuItemActionItem.i18n.json create mode 100644 i18n/ptb/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json create mode 100644 i18n/ptb/src/vs/platform/configuration/common/configurationRegistry.i18n.json create mode 100644 i18n/ptb/src/vs/platform/environment/node/argv.i18n.json create mode 100644 i18n/ptb/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json create mode 100644 i18n/ptb/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json create mode 100644 i18n/ptb/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json create mode 100644 i18n/ptb/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json create mode 100644 i18n/ptb/src/vs/platform/extensions/common/abstractExtensionService.i18n.json create mode 100644 i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json create mode 100644 i18n/ptb/src/vs/platform/extensions/node/extensionValidator.i18n.json create mode 100644 i18n/ptb/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json create mode 100644 i18n/ptb/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json create mode 100644 i18n/ptb/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json create mode 100644 i18n/ptb/src/vs/platform/keybinding/common/keybindingLabels.i18n.json create mode 100644 i18n/ptb/src/vs/platform/markers/common/problemMatcher.i18n.json create mode 100644 i18n/ptb/src/vs/platform/message/common/message.i18n.json create mode 100644 i18n/ptb/src/vs/platform/request/node/request.i18n.json create mode 100644 i18n/ptb/src/vs/platform/telemetry/common/telemetryService.i18n.json create mode 100644 i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/api/node/extHostDiagnostics.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/api/node/extHostTreeViews.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/actions/configureLocale.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/actions/fileActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/actions/toggleZenMode.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/compositePart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/editorPart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/textEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/editor/titleControl.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/panel/panelActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/panel/panelPart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/viewlet.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/common/theme.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/electron-browser/commands.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/electron-browser/crashReporter.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/electron-browser/extensionHost.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/electron-browser/main.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/electron-browser/shell.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/electron-browser/window.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/node/extensionHostMain.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/node/extensionPoints.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/debugActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/common/debug.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/common/debugModel.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/common/debugSource.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/fileCommands.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/html/browser/html.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/html/browser/webview.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/markers/common/messages.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/output/browser/output.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/output/browser/outputActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/output/browser/outputPanel.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/output/common/output.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/replaceService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/search.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/searchActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/search/browser/searchWidget.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/editor/browser/editorService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/files/electron-browser/fileService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/files/node/fileService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/message/browser/messageList.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/message/electron-browser/messageService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/textfile/common/textFileService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json create mode 100644 i18n/rus/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/rus/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/rus/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/rus/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/rus/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/rus/extensions/npm/package.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json diff --git a/build/win32/i18n/messages.pt-br.isl b/build/win32/i18n/messages.pt-br.isl new file mode 100644 index 0000000000000..7021e814e8f61 --- /dev/null +++ b/build/win32/i18n/messages.pt-br.isl @@ -0,0 +1,8 @@ +[CustomMessages] +AddContextMenuFiles=Adicione a a��o "Abrir com %1" ao menu de contexto de arquivo do Windows Explorer +AddContextMenuFolders=Adicione a a��o "Abrir com %1" ao menu de contexto de diret�rio do Windows Explorer +AssociateWithFiles=Registre %1 como um editor para tipos de arquivos suportados +AddToPath=Adicione em PATH (dispon�vel ap�s reiniciar) +RunAfter=Executar %1 ap�s a instala��o +Other=Outros: +SourceFile=Arquivo Fonte %1 \ No newline at end of file diff --git a/i18n/chs/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/chs/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json index 6ad910135a07c..f40aa81fa488b 100644 --- a/i18n/chs/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json +++ b/i18n/chs/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "activeEditorShort": "例如 myFile.txt", - "activeEditorMedium": "e.g. myFolder/myFile.txt", + "activeEditorMedium": "例如 myFolder/myFile.txt", "activeEditorLong": "例如 /Users/Development/myProject/myFolder/myFile.txt", "rootName": "例如 myProject", "rootPath": "例如 /Users/Development/myProject", diff --git a/i18n/chs/extensions/gulp/out/main.i18n.json b/i18n/chs/extensions/gulp/out/main.i18n.json index 500082cf82f27..bda8a250c2541 100644 --- a/i18n/chs/extensions/gulp/out/main.i18n.json +++ b/i18n/chs/extensions/gulp/out/main.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "execFailed": "自动检测 gulp 失败,错误为: {0}" + "execFailed": "自动检测 gulp 失败,错误:{0}" } \ No newline at end of file diff --git a/i18n/chs/extensions/jake/out/main.i18n.json b/i18n/chs/extensions/jake/out/main.i18n.json index 8b6ad71cd4e6d..d2f56bdda986c 100644 --- a/i18n/chs/extensions/jake/out/main.i18n.json +++ b/i18n/chs/extensions/jake/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "自动检测 Jake 失败,错误:{0}" +} \ No newline at end of file diff --git a/i18n/chs/extensions/jake/package.i18n.json b/i18n/chs/extensions/jake/package.i18n.json index 8b6ad71cd4e6d..46f020cf890fd 100644 --- a/i18n/chs/extensions/jake/package.i18n.json +++ b/i18n/chs/extensions/jake/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.jake.autoDetect": "控制自动检测 Jake 任务是否打开。默认开启。" +} \ No newline at end of file diff --git a/i18n/chs/extensions/markdown/out/extension.i18n.json b/i18n/chs/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/package.i18n.json b/i18n/chs/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/extensions/npm/package.i18n.json b/i18n/chs/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index 7b395b9c15a79..4e5bf82d935ab 100644 --- a/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "图像太大,无法在编辑器中显示。 ", - "resourceOpenExternalButton": "打开图片", - "resourceOpenExternalText": " 是否使用外部程序?", "nativeBinaryError": "文件将不在编辑器中显示,因为它是二进制文件、非常大或使用不支持的文本编码。", "sizeB": "{0} B", "sizeKB": "{0} KB", diff --git a/i18n/chs/src/vs/code/electron-main/menus.i18n.json b/i18n/chs/src/vs/code/electron-main/menus.i18n.json index 16b5dc1479aca..4f7e61e056c44 100644 --- a/i18n/chs/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/chs/src/vs/code/electron-main/menus.i18n.json @@ -146,7 +146,7 @@ "miInteractivePlayground": "交互式演练场(&&I)", "miDocumentation": "文档(&&D)", "miReleaseNotes": "发行说明(&&R)", - "miKeyboardShortcuts": "键盘快捷方式参考(&&K)", + "miKeyboardShortcuts": "快捷键参考(&&K)", "miIntroductoryVideos": "介绍性视频(&&V)", "miTwitter": "在 Twitter 上加入我们(&&J)", "miUserVoice": "搜索功能请求(&&S)", @@ -159,6 +159,6 @@ "miDownloadingUpdate": "正在下载更新...", "miInstallingUpdate": "正在安装更新...", "miCheckForUpdates": "检查更新...", - "aboutDetail": "\n版本 {0}\n提交 {1}\n日期 {2}\nShell {3}\n呈现器 {4}\nNode {5}", + "aboutDetail": "\n版本 {0}\n提交 {1}\n日期 {2}\nShell {3}\n渲染器 {4}\nNode {5}", "okButton": "确定" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json index ad55e59f4eb4f..5c4e0b1ea13b1 100644 --- a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -14,7 +14,7 @@ "rulers": "显示垂直标尺的列", "wordSeparators": "执行文字相关的导航或操作时将用作文字分隔符的字符", "tabSize": "一个制表符等于的空格数。该设置在 `editor.detectIndentation` 启用时根据文件内容进行重写。", - "tabSize.errorMessage": "应为 \\\\\"number\\\\\"。注意,值\\\\\"auto\\\\\"已由 \\\\\"editor.detectIndentation\\\\\" 设置替换。", + "tabSize.errorMessage": "应为“number”。注意,值“auto”已由“editor.detectIndentation”设置替换。", "insertSpaces": "按 \"Tab\" 时插入空格。该设置在 `editor.detectIndentation` 启用时根据文件内容进行重写。", "insertSpaces.errorMessage": "应为 \"boolean\"。注意,值 \"auto\" 已由 \"editor.detectIndentation\" 设置替换。", "detectIndentation": "当打开文件时,将基于文件内容检测 \"editor.tabSize\" 和 \"editor.insertSpaces\"。", @@ -29,7 +29,7 @@ "wordWrap.bounded": "将在最小视区和 \"editor.wordWrapColumn\" 处换行。", "wordWrap": "控制折行方式。可以选择: - “off” (禁用折行), - “on” (视区折行), - “wordWrapColumn”(在“editor.wordWrapColumn”处折行)或 - “bounded”(在视区与“editor.wordWrapColumn”两者的较小者处折行)。", "wordWrapColumn": "在 \"editor.wordWrap\" 为 \"wordWrapColumn\" 或 \"bounded\" 时控制编辑器列的换行。", - "wrappingIndent": "控制换行的行的缩进。可以是\\\\\"none\\\\\"、 \\\\\"same\\\\\" 或 \\\\\"indent\\\\\"。", + "wrappingIndent": "控制折行的缩进。可以是“none”、“same”或“indent”。", "mouseWheelScrollSensitivity": "要对鼠标滚轮滚动事件的 \"deltaX\" 和 \"deltaY\" 使用的乘数 ", "quickSuggestions.strings": "在字符串内启用快速建议。", "quickSuggestions.comments": "在注释内启用快速建议。", @@ -41,7 +41,6 @@ "formatOnType": "控制编辑器是否应在键入后自动设置行的格式", "formatOnPaste": "控制编辑器是否应自动设置粘贴内容的格式。格式化程序必须可用并且能设置文档中某一范围的格式。", "suggestOnTriggerCharacters": "控制键入触发器字符时是否应自动显示建议", - "acceptSuggestionOnEnter": "控制除了 \"Tab\" 键以外,是否还应在遇到 \"Enter\" 键时接受建议。帮助避免“插入新行”或“接受建议”之间出现歧义。", "acceptSuggestionOnCommitCharacter": "控制是否应在遇到提交字符时接受建议。例如,在 JavaScript 中,分号(\";\")可以为提交字符,可接受建议并键入该字符。", "snippetSuggestions": "控制是否将代码段与其他建议一起显示以及它们的排序方式。", "emptySelectionClipboard": "控制没有选择内容的复制是否复制当前行。", @@ -63,6 +62,7 @@ "renderLineHighlight": "控制编辑器应如何呈现当前行突出显示,可能为“无”、“装订线”、“线”和“全部”。", "codeLens": "控制编辑器是否显示代码滤镜", "folding": "控制编辑器是否启用代码折叠功能", + "showFoldingControls": "控制是否自动隐藏导航线上的折叠控件。", "matchBrackets": "当选择其中一项时,将突出显示匹配的括号。", "glyphMargin": "控制编辑器是否应呈现垂直字形边距。字形边距最常用于调试。", "useTabStops": "在制表位后插入和删除空格", diff --git a/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..e788771d2f25a --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "未找到“{0}”的任何定义", + "generic.noResults": "找不到定义", + "meta.title": " – {0} 定义", + "actions.goToDecl.label": "转到定义", + "actions.goToDeclToSide.label": "打开侧边的定义", + "actions.previewDecl.label": "查看定义", + "goToImplementation.noResultWord": "未找到“{0}”的实现", + "goToImplementation.generic.noResults": "未找到实现", + "meta.implementations.title": "– {0} 个实现", + "actions.goToImplementation.label": "转到实现", + "actions.peekImplementation.label": "速览实现", + "goToTypeDefinition.noResultWord": "未找到“{0}”的类型定义", + "goToTypeDefinition.generic.noResults": "未找到类型定义", + "meta.typeDefinitions.title": " – {0} 个类型定义", + "actions.goToTypeDefinition.label": "转到类型定义", + "actions.peekTypeDefinition.label": "快速查看类型定义" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..ab0b4761cf9a4 --- /dev/null +++ b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "单击显示 {0} 个定义。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/indentation/common/indentation.i18n.json b/i18n/chs/src/vs/editor/contrib/indentation/common/indentation.i18n.json index 76fa4543d539d..5bd5906da321c 100644 --- a/i18n/chs/src/vs/editor/contrib/indentation/common/indentation.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/indentation/common/indentation.i18n.json @@ -8,7 +8,7 @@ "indentationToTabs": "将缩进转换为制表符", "configuredTabSize": "已配置制表符大小", "selectTabWidth": "选择当前文件的制表符大小", - "indentUsingTabs": "使用 \\\\\"Tab\\\\\" 缩进", + "indentUsingTabs": "使用“Tab”缩进", "indentUsingSpaces": "使用空格缩进", "detectIndentation": "检查内容中的缩进", "editor.reindentlines": "重新缩进行" diff --git a/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 4e1a0a30e42b6..ec34ba659f112 100644 --- a/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -9,7 +9,7 @@ "editorSuggestWidgetForeground": "建议小组件的前景颜色。", "editorSuggestWidgetSelectedBackground": "建议小组件中被选择条目的背景颜色。", "editorSuggestWidgetHighlightForeground": "建议小组件中匹配内容的高亮颜色。", - "readMore": "阅读更多...{0}", + "readMore": "阅读详细信息...{0}", "suggestionWithDetailsAriaLabel": "{0}(建议)具有详细信息", "suggestionAriaLabel": "{0},建议", "readLess": "阅读简略信息...{0}", diff --git a/i18n/chs/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/chs/src/vs/platform/configuration/common/configurationRegistry.i18n.json index ea616506b8e2c..781727fae4d8d 100644 --- a/i18n/chs/src/vs/platform/configuration/common/configurationRegistry.i18n.json +++ b/i18n/chs/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -10,7 +10,7 @@ "vscode.extension.contributes.configuration": "用于配置字符串。", "vscode.extension.contributes.configuration.title": "设置摘要。此标签将在设置文件中用作分隔注释。", "vscode.extension.contributes.configuration.properties": "配置属性的描述。", - "config.property.languageDefault": "无法注册“{0}”。这符合属性模式 \"\\\\[.*\\\\]$\",可用于描述特定语言编辑器设置。请使用 \"configurationDefaults\"。", + "config.property.languageDefault": "无法注册“{0}”。其符合描述特定语言编辑器设置的表达式 \"\\\\[.*\\\\]$\"。请使用 \"configurationDefaults\"。", "config.property.duplicate": "无法注册“{0}”。此属性已注册。", "invalid.properties": "configuration.properties 必须是对象", "invalid.type": "如果进行设置,\"configuration.type\" 必须设置为对象", diff --git a/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json index 7dc0d66e0aa6e..b9fc2ddbbdea4 100644 --- a/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,6 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "错误: 模式属性 {0} 是无效的模式变量名。", "ProblemMatcherParser.problemPattern.watchingMatcher": "问题匹配程序必须定义监视的开始模式和结束模式。", "ProblemMatcherParser.invalidRegexp": "错误: 字符串 {0} 不是有效的正则表达式。\n", + "WatchingPatternSchema.regexp": "用于检测后台任务开始或结束的正则表达式。", "WatchingPatternSchema.file": "文件名的匹配组索引。可以省略。", "PatternTypeSchema.name": "所提供或预定义模式的名称", "PatternTypeSchema.description": "问题模式或者所提供或预定义问题模式的名称。如果已指定基准,则可以省略。", @@ -42,6 +43,12 @@ "ProblemMatcherSchema.severity": "捕获问题的默认严重性。如果模式未定义严重性的匹配组,则使用。", "ProblemMatcherSchema.applyTo": "控制文本文档上报告的问题是否仅应用于打开、关闭或所有文档。", "ProblemMatcherSchema.fileLocation": "定义应如何解释问题模式中报告的文件名。", + "ProblemMatcherSchema.background": "用于跟踪在后台任务上激活的匹配程序的开始和结束的模式。", + "ProblemMatcherSchema.background.activeOnStart": "如果设置为 true,则会在任务开始时激活后台监控。这相当于发出与 beginPattern 匹配的行。", + "ProblemMatcherSchema.background.beginsPattern": "如果在输出内匹配,则会发出后台任务开始的信号。", + "ProblemMatcherSchema.background.endsPattern": "如果在输出内匹配,则会发出后台任务结束的信号。", + "ProblemMatcherSchema.watching.deprecated": "“watching”属性已被弃用。请改用“background”。", + "ProblemMatcherSchema.watching": "用于跟踪监视匹配程序开始和结束的模式。", "ProblemMatcherSchema.watching.activeOnStart": "如果设置为 true,则当任务开始时观察程序处于活动模式。这相当于发出与 beginPattern 匹配的行。", "ProblemMatcherSchema.watching.beginsPattern": "如果在输出内匹配,则在监视任务开始时会发出信号。", "ProblemMatcherSchema.watching.endsPattern": "如果在输出内匹配,则在监视任务结束时会发出信号。", diff --git a/i18n/chs/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/chs/src/vs/workbench/api/node/extHostTreeViews.i18n.json index 8b6ad71cd4e6d..7bfb0b886ded6 100644 --- a/i18n/chs/src/vs/workbench/api/node/extHostTreeViews.i18n.json +++ b/i18n/chs/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "treeView.notRegistered": "没有注册 ID 为“{0}”的树形图。", + "treeItem.notFound": "没有在树中找到 ID 为“{0}”的项目。", + "treeView.duplicateElement": "已注册元素 {0}。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/common/theme.i18n.json b/i18n/chs/src/vs/workbench/common/theme.i18n.json index 64c51b8e74c09..0f3e7eb1bf9de 100644 --- a/i18n/chs/src/vs/workbench/common/theme.i18n.json +++ b/i18n/chs/src/vs/workbench/common/theme.i18n.json @@ -32,6 +32,7 @@ "activityBarBadgeBackground": "活动通知徽章背景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "activityBarBadgeForeground": "活动通知徽章前景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "sideBarBackground": "侧边栏背景色。侧边栏是资源管理器和搜索等视图的容器。", + "sideBarForeground": "侧边栏前景色。侧边栏是资源管理器和搜索等视图的容器。", "sideBarTitleForeground": "侧边栏标题前景色。侧边栏是资源管理器和搜索等视图的容器。", "sideBarSectionHeaderBackground": "侧边栏节标题的背景颜色。侧边栏是资源管理器和搜索等视图的容器。", "titleBarActiveForeground": "窗口处于活动状态时的标题栏前景色。请注意,该颜色当前仅在 macOS 上受支持。", diff --git a/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json index 375f183373b09..6997449c1ce46 100644 --- a/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "查看", "help": "帮助", "file": "文件", + "developer": "开发者", "showEditorTabs": "控制打开的编辑器是否显示在选项卡中。", "editorTabCloseButton": "控制编辑器的选项卡关闭按钮的位置,或当设置为 \"off\" 时禁用关闭它们。", "showIcons": "控制打开的编辑器是否随图标一起显示。这还需启用图标主题。", diff --git a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json index a188f9c1e90a0..b163a2de99e32 100644 --- a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbench.action.inspectKeyMap": "开发者:检查键映射" + "workbench.action.inspectKeyMap": "开发者: 检查键映射" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json index 8d541bedfe0b5..a7b3e519e7d33 100644 --- a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json @@ -6,6 +6,6 @@ { "toggle.wordwrap": "查看: 切换自动换行", "wordWrap.notInDiffEditor": "不能在差异编辑器中切换自动换行。", - "unwrapMinified": "为此文件禁用换行", + "unwrapMinified": "为此文件禁用折行", "wrapMinified": "为此文件启用换行" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index c322b5a660a56..54243f83ce323 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "调试适配器可执行的“{0}”不存在。", "debugAdapterCannotDetermineExecutable": "无法确定调试适配器“{0}”的可执行文件。", "debugType": "配置类型。", + "debugTypeNotRecognised": "无法识别此调试类型。确保已经安装并启用相应的调试扩展。", "node2NotSupported": "不再支持 \"node2\",改用 \"node\",并将 \"protocol\" 属性设为 \"inspector\"。", "debugName": "配置名称;在启动配置下拉菜单中显示。", "debugRequest": "请求配置类型。可以是“启动”或“附加”。", diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json index 0598c67b46ee4..f4159d50b0ea6 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "evaluateMathExpression": "Emmet: 评估数学表达式" + "evaluateMathExpression": "Emmet: 求数学表达式的值" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json index 403f855e5eba5..81f7dcfcab119 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "incrementNumberByOneTenth": "Emmet: 以 0.1 为增量", - "incrementNumberByOne": "Emmet: 以 1 为增量", - "incrementNumberByTen": "Emmet: 以 10 为增量", - "decrementNumberByOneTenth": "Emmet: 以 0.1 为减量", - "decrementNumberByOne": "Emmet: 以 1 为减量", - "decrementNumberByTen": "Emmet: 以 10 为减量" + "incrementNumberByOneTenth": "Emmet: 增加 0.1", + "incrementNumberByOne": "Emmet: 增加 1", + "incrementNumberByTen": "Emmet: 增加 10", + "decrementNumberByOneTenth": "Emmet: 减少 0.1", + "decrementNumberByOne": "Emmet: 减少 1", + "decrementNumberByTen": "Emmet: 减少 10" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json index b58d42bcafefb..545f1c107e703 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "removeTag": "Emmet: 删除标记" + "removeTag": "Emmet: 删除标签" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json index 5796a0dcab8c5..53e4eaafbd993 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "splitJoinTag": "Emmet: 分离/联接标记" + "splitJoinTag": "Emmet: 分离/联接标签" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json index c5d6fd7b350db..d68725525c809 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "updateImageSize": "Emmet: 更新映像大小" + "updateImageSize": "Emmet: 更新图像大小" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json index 486e5397c4bc5..8bf2821c1205f 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "updateTag": "Emmet: 更新标记", - "enterTag": "输入标记", - "tag": "标记" + "updateTag": "Emmet: 更新标签", + "enterTag": "输入标签", + "tag": "标签" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json index dbca7bf9016be..21f0c06d36383 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "wrapWithAbbreviationAction": "Emmet: 使用缩写进行包装", + "wrapWithAbbreviationAction": "Emmet: 使用缩写进行包围", "enterAbbreviation": "输入缩写", "abbreviation": "缩写" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 6a402e79e1e6b..0701c9f4ae63b 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -6,8 +6,8 @@ { "emmetConfigurationTitle": "Emmet", "triggerExpansionOnTab": "启用后,按 TAB 键时,将展开 Emmet 缩写。", - "emmetPreferences": "用于修改 Emmet 的某些操作和解决程序的首选项。", + "emmetPreferences": "用于修改 Emmet 某些操作和解析程序的行为的首选项。", "emmetSyntaxProfiles": "为指定的语法定义配置文件或使用带有特定规则的配置文件。", - "emmetExclude": "emmet 缩写不应在其中展开的语言数组。", - "emmetExtensionsPath": "转至包含 Emmet 配置文件、片段和首选项的文件的路径" + "emmetExclude": "不应展开 Emmet 缩写的语言数组。", + "emmetExtensionsPath": "包含 Emmet 配置文件、代码段和首选项的文件夹路径" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json index 5d52f90d6278b..076eadb1e72ac 100644 --- a/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.view": "贡献自定义视图", + "vscode.extension.contributes.view": "添加自定义视图", "vscode.extension.contributes.view.id": "用于标识通过 vscode.workspace.createTreeView 创建的视图的唯一 ID", "vscode.extension.contributes.view.label": "用于呈现视图的人类可读的字符串", "vscode.extension.contributes.view.icon": "视图图标的路径", - "vscode.extension.contributes.views": "贡献自定义视图", + "vscode.extension.contributes.views": "添加自定义视图", "showViewlet": "显示 {0}", "view": "查看" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..5a4bf096f38bb 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "是否禁用其他键映射以避免键绑定之间的冲突?", + "yes": "是", + "no": "否" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index ba343731820b7..5813db26a2446 100644 --- a/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "配置语言的文件关联(如: \"*.extension\": \"html\")。这些关联的优先级高于已安装语言的默认关联。", "encoding": "读取和编写文件时将使用的默认字符集编码。", "autoGuessEncoding": "启用时,会在打开文件时尝试猜测字符集编码", - "eol": "默认行尾字符。", "trimTrailingWhitespace": "启用后,将在保存文件时剪裁尾随空格。", "insertFinalNewline": "启用后,保存文件时在文件末尾插入一个最终新行。", "files.autoSave.off": "永不自动保存更新后的文件。", diff --git a/i18n/chs/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json b/i18n/chs/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json index f4fa6caa5bcb3..9745dba45381e 100644 --- a/i18n/chs/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "orphanedFile": "{0} (deleted from disk)" + "orphanedFile": "{0} (磁盘上已删除)" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index dbd6be98f3e07..bb7e4ea7afa06 100644 --- a/i18n/chs/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,11 @@ // Do not edit this file. It is machine generated. { "slow": "检测到启动缓慢", - "slow.detail": "抱歉,出现了启动缓慢的情况。请重启“{0}”并启用分析,将分析文件与我们共享,我们会努力提高启动速度。" + "slow.detail": "抱歉,出现了启动缓慢的情况。请重启“{0}”并启用分析,将分析文件与我们共享,我们会努力提高启动速度。", + "prof.message": "已成功创建描述文件。", + "prof.detail": "请创建问题并手动附加以下文件:\n{0}", + "prof.restartAndFileIssue": "创建问题并重启", + "prof.restart": "重启", + "prof.thanks": "感谢您的帮助。", + "prof.detail.restart": "需要重新启动才能继续使用“{0}”。再次感谢您的贡献。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json index d4d305eba54aa..3461ec0a523e9 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "keybindingsInputName": "键盘快捷键", + "keybindingsInputName": "键盘快捷方式", "SearchKeybindings.AriaLabel": "搜索键绑定", "SearchKeybindings.Placeholder": "搜索键绑定", "sortByPrecedene": "按优先级排序", - "header-message": "用于高级自定义打开和编辑", + "header-message": "高级自定义请打开和编辑", "keybindings-file-name": "keybindings.json", "keybindingsLabel": "键绑定", "changeLabel": "更改键绑定", diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json index 058e01cd6bf65..72a81c0af681d 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -6,7 +6,7 @@ { "openGlobalSettings": "打开用户设置", "openGlobalKeybindings": "打开键盘快捷方式", - "openGlobalKeybindingsFile": "打开键盘快捷键文件", + "openGlobalKeybindingsFile": "打开键盘快捷方式文件", "openWorkspaceSettings": "打开工作区设置", "configureLanguageBasedSettings": "配置语言特定的设置...", "languageDescriptionConfigured": "({0})", diff --git a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index ab4166d5cd73b..8ea8ff4f96e85 100644 --- a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "toggleGitViewlet": "显示 GIT", + "toggleGitViewlet": "显示 Git", + "installAdditionalSCMProviders": "安装其他 SCM 提供程序...", "source control": "源代码管理", "toggleSCMViewlet": "显示 SCM", "view": "查看" diff --git a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index f03d74e8c9daf..89c41c7a05bad 100644 --- a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "switch provider": "切换 SCM 提供程序..." + "installAdditionalSCMProviders": "安装其他 SCM 提供程序...", + "switch provider": "切换源代码管理系统..." } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 0c4154de4e50a..340ee7fc03e11 100644 --- a/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "vscode.extension.contributes.snippets": "贡献代码段。", + "vscode.extension.contributes.snippets": "添加代码段。", "vscode.extension.contributes.snippets-language": "此代码片段参与的语言标识符。", "vscode.extension.contributes.snippets-path": "代码片段文件的路径。该路径相对于扩展文件夹,通常以 \"./snippets/\" 开头。", "invalid.language": "“contributes.{0}.language”中存在未知的语言。提供的值: {1}", diff --git a/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index bf5eec2631c96..48bcbb508c253 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0},任务" + "entryAriaLabel": "{0},任务", + "workspace": "来自工作区", + "extension": "来自扩展" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 2132313f0b684..f5f009904e1de 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,6 @@ { "TerminalTaskSystem.unknownError": "在执行任务时发生未知错误。请参见任务输出日志了解详细信息。", "TerminalTaskSystem.terminalName": "任务 - {0}", - "TerminalTaskSystem": "无法对 UNC 驱动器执行 shell 命令。" + "TerminalTaskSystem": "无法对 UNC 驱动器执行 shell 命令。", + "unkownProblemMatcher": "无法解析问题匹配程序 {0}。此匹配程序将被忽略" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index aa659de1014f0..5b8a86d9c21b1 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "在执行任务时发生未知错误。请参见任务输出日志了解详细信息。", "TaskRunnerSystem.watchingBuildTaskFinished": "\n监视生成任务已完成", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\n已根据用户请求终止了任务'{0}' " + "TaskRunnerSystem.cancelRequested": "\n已根据用户请求终止了任务'{0}' ", + "unkownProblemMatcher": "无法解析问题匹配程序 {0}。此匹配程序将被忽略" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/chs/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json index 082e49f08bc47..076dd52ebbba1 100644 --- a/i18n/chs/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -17,7 +17,7 @@ "watermark.selectTheme": "更改主题", "watermark.selectKeymap": "更改键映射", "watermark.keybindingsReference": "键盘参考", - "watermark.openGlobalKeybindings": "键盘快捷键", + "watermark.openGlobalKeybindings": "键盘快捷方式(&&K)", "watermark.unboundCommand": "未绑定", "workbenchConfigurationTitle": "工作台", "tips.enabled": "启用后,当没有打开编辑器时将显示水印提示。" diff --git a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 3b9d1ffa9caa8..3503db3576a03 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -9,18 +9,23 @@ "welcomePage.start": "开始", "welcomePage.newFile": "新建文件", "welcomePage.openFolder": "打开文件夹...", - "welcomePage.cloneGitRepository": "克隆 GIT 存储库...", + "welcomePage.cloneGitRepository": "克隆 Git 存储库...", "welcomePage.recent": "最近", "welcomePage.moreRecent": "更多...", "welcomePage.noRecentFolders": "无最近使用文件夹", "welcomePage.help": "帮助", + "welcomePage.keybindingsCheatsheet": "可打印的键盘速查表", "welcomePage.introductoryVideos": "入门视频", "welcomePage.productDocumentation": "产品文档", "welcomePage.gitHubRepository": "GitHub 存储库", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "启动时显示欢迎页", "welcomePage.customize": "自定义", + "welcomePage.installExtensionPacks": "工具和语言", + "welcomePage.installExtensionPacksDescription": "安装对 {0} 和 {1} 的支持", + "welcomePage.moreExtensions": "更多", "welcomePage.installKeymapDescription": "安装键盘快捷方式", + "welcomePage.installKeymapExtension": "安装 {0} 和 {1} 的键盘快捷方式", "welcomePage.others": "其他", "welcomePage.colorTheme": "颜色主题", "welcomePage.colorThemeDescription": "使编辑器和代码呈现你喜欢的外观", diff --git a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index de7e3aa24d577..07f438f169e7c 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,25 @@ // Do not edit this file. It is machine generated. { "welcomePage": "欢迎使用", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "已安装对 {0} 的支持。", + "welcomePage.willReloadAfterInstallingExtensionPack": "安装对 {0} 的支持后,将重载窗口。", + "welcomePage.installingExtensionPack": "正在安装对 {0} 的支持...", + "welcomePage.extensionPackNotFound": "找不到对 {0} (ID: {1}) 的支持。", "welcomePage.keymapAlreadyInstalled": "已安装 {0} 键盘快捷方式。", "welcomePage.willReloadAfterInstallingKeymap": "安装 {0} 键盘快捷方式后,将重载窗口。", "welcomePage.installingKeymap": "正在安装 {0} 键盘快捷方式...", "welcomePage.keymapNotFound": "找不到 ID 为 {1} 的 {0} 键盘快捷方式。", "welcome.title": "欢迎使用", + "welcomePage.extensionListSeparator": ",", + "welcomePage.installedExtension": "{0}(已安装)", "ok": "确定", "cancel": "取消", "welcomePage.quickLinkBackground": "欢迎页快速链接的背景颜色。", diff --git a/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json index 69e35ac02d635..4abe2dbd4b81a 100644 --- a/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -14,18 +14,18 @@ "vscode.extension.contributes.iconThemes.label": "UI 中显示的图标主题的标签。", "vscode.extension.contributes.iconThemes.path": "图标主题定义文件的路径。该路径相对于扩展文件夹,通常是 \"./icons/awesome-icon-theme.json\"。", "migration.completed": "已向用户设置添加了新的主题设置。{0} 中可备份。", - "error.cannotloadtheme": "Unable to load {0}: {1}", - "reqarray": "Extension point `{0}` must be an array.", + "error.cannotloadtheme": "无法加载 {0}: {1}", + "reqarray": "扩展点“{0}”必须是一个数组。", "reqpath": "“contributes.{0}.path”中应为字符串。提供的值: {1}", "invalid.path.1": "“contributes.{0}.path”({1})应包含在扩展的文件夹({2})内。这可能会使扩展不可移植。", "reqid": "“contributes.{0}.id”中应为字符串。提供的值: {1}", "error.cannotloadicontheme": "Unable to load {0}", "error.cannotparseicontheme": "Problems parsing file icons file: {0}", - "colorTheme": "Specifies the color theme used in the workbench.", - "colorThemeError": "Theme is unknown or not installed.", - "iconTheme": "Specifies the icon theme used in the workbench.", + "colorTheme": "指定工作台中使用的颜色主题。", + "colorThemeError": "主题未知或未安装。", + "iconTheme": "指定在工作台中使用的图标主题。", "noIconThemeDesc": "No file icons", - "iconThemeError": "File icon theme is unknown or not installed.", + "iconThemeError": "文件图标主题未知或未安装。", "workbenchColors": "覆盖当前所选颜色主题的颜色。", "workbenchColors.deprecated": "该设置不再是实验性设置,并已重命名为“workbench.colorCustomizations”", "workbenchColors.deprecatedDescription": "改用“workbench.colorCustomizations”" diff --git a/i18n/cht/extensions/markdown/out/extension.i18n.json b/i18n/cht/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/cht/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/package.i18n.json b/i18n/cht/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/extensions/npm/package.i18n.json b/i18n/cht/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index da6b8c6d2c009..c01f13f3bcb0d 100644 --- a/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "因為影像太大,所以無法在編輯器中顯示。", - "resourceOpenExternalButton": "開啟影像", - "resourceOpenExternalText": " 要使用外部程式嗎?", "nativeBinaryError": "檔案為二進位檔、非常大或使用不支援的文字編碼,因此將不會顯示於編輯器中。", "sizeB": "{0}B", "sizeKB": "{0}KB", diff --git a/i18n/cht/src/vs/code/electron-main/menus.i18n.json b/i18n/cht/src/vs/code/electron-main/menus.i18n.json index a1fa3f356ddeb..5961aa8e7894d 100644 --- a/i18n/cht/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/cht/src/vs/code/electron-main/menus.i18n.json @@ -14,6 +14,7 @@ "mHelp": "說明 (&&H)", "miNewWindow": "開新視窗(&&W)", "mAbout": "關於 {0}", + "mServices": "服務", "mHide": "隱藏 {0}", "mHideOthers": "隱藏其他", "mShowAll": "全部顯示", diff --git a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json index ec8f05fe3403e..f06682edb16bb 100644 --- a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -40,7 +40,6 @@ "formatOnType": "控制編輯器是否應在輸入一行後自動格式化", "formatOnPaste": "控制編輯器是否應自動設定貼上的內容格式。格式器必須可供使用,而且格式器應該能夠設定文件中一個範圍的格式。", "suggestOnTriggerCharacters": "控制輸入觸發字元時,是否應自動顯示建議", - "acceptSuggestionOnEnter": "控制除了 'Tab' 外,是否也藉由按下 'Enter' 接受建議。如此可避免混淆要插入新行或接受建議。", "acceptSuggestionOnCommitCharacter": "控制認可字元是否應接受建議。例如在 JavaScript 中,分號 (';') 可以是接受建議並鍵入該字元的認可字元。", "snippetSuggestions": "控制程式碼片段是否隨其他建議顯示,以及其排序方式。", "emptySelectionClipboard": "控制複製時不選取任何項目是否會複製目前程式行。", diff --git a/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json index 7b011979df90c..b08c173b1003a 100644 --- a/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -7,6 +7,9 @@ "lineHighlight": "目前游標位置行的反白顯示背景色彩。", "lineHighlightBorderBox": "目前游標位置行之周圍框線的背景色彩。", "rangeHighlight": "反白顯示範圍的背景色彩,例如 Quick Open 與尋找功能。", + "caret": "編輯器游標的色彩。", + "editorWhitespaces": "編輯器中空白字元的色彩。", + "editorIndentGuides": "編輯器縮排輔助線的色彩。", "editorLineNumbers": "編輯器行號的色彩。", "editorRuler": "編輯器尺規的色彩", "editorCodeLensForeground": "編輯器程式碼濾鏡的前景色彩", diff --git a/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..26ea0a1761cf6 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "找不到 '{0}' 的定義", + "generic.noResults": "找不到任何定義", + "meta.title": " - {0} 個定義", + "actions.goToDecl.label": "移至定義", + "actions.goToDeclToSide.label": "在一側開啟定義", + "actions.previewDecl.label": "預覽定義", + "goToImplementation.noResultWord": "找不到 '{0}' 的任何實作", + "goToImplementation.generic.noResults": "找不到任何實作", + "meta.implementations.title": " – {0} 個實作", + "actions.goToImplementation.label": "前往實作", + "actions.peekImplementation.label": "預覽實作", + "goToTypeDefinition.noResultWord": "找不到 '{0}' 的任何類型定義", + "goToTypeDefinition.generic.noResults": "找不到任何類型定義", + "meta.typeDefinitions.title": " – {0} 個定義", + "actions.goToTypeDefinition.label": "移至類型定義", + "actions.peekTypeDefinition.label": "預覽類型定義" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..24cf4f7503fe8 --- /dev/null +++ b/i18n/cht/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "按一下以顯示 {0} 項定義。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json index 8b6ad71cd4e6d..028bfb1a1d027 100644 --- a/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json +++ b/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "treeView.duplicateElement": "元件{0}已被註冊" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/common/theme.i18n.json b/i18n/cht/src/vs/workbench/common/theme.i18n.json index 2d8bce1a6366a..72a8d8abb7e4f 100644 --- a/i18n/cht/src/vs/workbench/common/theme.i18n.json +++ b/i18n/cht/src/vs/workbench/common/theme.i18n.json @@ -29,6 +29,7 @@ "activityBarBadgeBackground": "活動通知徽章的背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", "activityBarBadgeForeground": "活動通知徽章的前背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", "sideBarBackground": "提要欄位的背景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", + "sideBarForeground": "側欄的前景顏色.側欄包含Explorer與搜尋.", "sideBarTitleForeground": "提要欄位標題的前景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", "sideBarSectionHeaderBackground": "提要欄位區段標頭的背景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", "titleBarActiveForeground": "作用中視窗之標題列的前景。請注意,目前只有 macOS 支援此色彩。", diff --git a/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json index c1874024aee5c..bced8b136e5de 100644 --- a/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "檢視", "help": "說明", "file": "檔案", + "developer": "開發人員", "showEditorTabs": "控制已開啟的編輯器是否應顯示在索引標籤中。", "editorTabCloseButton": "控制編輯器的索引標籤關閉按鈕位置,或在設為 'off' 時將其停用。", "showIcons": "控制開啟的編輯器是否搭配圖示顯示。這需要同時啟用圖示佈景主題。", diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..49a87dcf2225a 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "要停用其他按鍵對應,以避免按鍵繫結關係發生衝突嗎?", + "yes": "是", + "no": "否" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 07e8bfd596319..5b044579208f6 100644 --- a/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "將檔案關聯設定為語言 (例如 \"*.extension\": \"html\")。這些語言優先於已安裝語言的預設關聯。", "encoding": "讀取與寫入檔案時要使用的預設字元集編碼。", "autoGuessEncoding": "如有啟用,將會在開啟檔案時,嘗試猜測字元集編碼", - "eol": "預設行尾字元。", "trimTrailingWhitespace": "若啟用,將在儲存檔案時修剪尾端空白。", "insertFinalNewline": "啟用時,請在儲存檔案時在其結尾插入最後一個新行。", "files.autoSave.off": "已變更的檔案一律不會自動儲存。", diff --git a/i18n/cht/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 1c615781faa32..f36b3a04dbaf4 100644 --- a/i18n/cht/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,9 @@ // Do not edit this file. It is machine generated. { "slow": "偵測到啟動速度慢", - "slow.detail": "抱歉! 先前的啟動速度過慢。請重新啟動 '{0}' 並啟用剖析功能,同時將設定檔提供給我們,我們將努力提升啟動的品質。" + "slow.detail": "抱歉! 先前的啟動速度過慢。請重新啟動 '{0}' 並啟用剖析功能,同時將設定檔提供給我們,我們將努力提升啟動的品質。", + "prof.message": "已成功建立設定檔。", + "prof.detail": "請建立問題,並手動附加下列檔案:\n{0}", + "prof.restartAndFileIssue": "建立問題並重新啟動", + "prof.restart": "重新啟動" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index c0bccd6864ce2..cafed39301058 100644 --- a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "顯示 Git", + "installAdditionalSCMProviders": "安裝額外SCM提供者...", "source control": "原始檔控制", "toggleSCMViewlet": "顯示 SCM", "view": "檢視" diff --git a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index d1872f571b1c6..5450727934af6 100644 --- a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "安裝額外SCM提供者...", "switch provider": "切換 SCM 提供者..." } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index e35a088465013..c9f6c178105a9 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0},工作" + "entryAriaLabel": "{0},工作", + "workspace": "從工作區", + "extension": "從擴充功能" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 877f81d59fdd3..ae636e706790b 100644 --- a/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,6 +6,7 @@ { "selectTheme.label": "色彩佈景主題", "installColorThemes": "安裝其他的色彩佈景主題...", + "themes.selectTheme": "選取色彩主題(上/下鍵預覽)", "selectIconTheme.label": "檔案圖示佈景主題", "installIconThemes": "安裝其他的檔案圖示主題...", "noIconThemeLabel": "無", diff --git a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 00a45ea1dc0cb..9a00f615c32e6 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,6 +11,7 @@ "welcomePage.openFolder": "開啟資料夾...", "welcomePage.cloneGitRepository": "複製 Git 存放庫...", "welcomePage.recent": "最近使用", + "welcomePage.moreRecent": "更多...", "welcomePage.noRecentFolders": "沒有最近使用的資料夾", "welcomePage.help": "說明", "welcomePage.introductoryVideos": "簡介影片", @@ -19,10 +20,12 @@ "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "啟動時顯示歡迎頁面", "welcomePage.customize": "自訂", + "welcomePage.moreExtensions": "更多", "welcomePage.installKeymapDescription": "安裝鍵盤快速鍵", "welcomePage.others": "其他", "welcomePage.colorTheme": "彩色佈景主題", "welcomePage.colorThemeDescription": "將編輯器及您的程式碼設定成您喜愛的外觀", + "welcomePage.learn": "深入了解", "welcomePage.showCommands": "尋找及執行所有命令", "welcomePage.showCommandsDescription": "從控制台快速存取及搜尋命令 ({0})", "welcomePage.interfaceOverview": "介面概觀", diff --git a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 02eb36873b6a1..dfce04ba61a07 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,22 @@ // Do not edit this file. It is machine generated. { "welcomePage": "歡迎使用", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "活力", + "welcomePage.sublime": "壯麗", + "welcomePage.atom": "Atom", "welcomePage.keymapAlreadyInstalled": "已安裝 {0} 鍵盤快速鍵。", "welcomePage.willReloadAfterInstallingKeymap": "{0} 鍵盤快速鍵安裝完成後,將會重新載入此視窗。", "welcomePage.installingKeymap": "正在安裝 {0} 鍵盤快速鍵...", "welcomePage.keymapNotFound": "找不到識別碼為 {1} 的 {0} 鍵盤快速鍵。", "welcome.title": "歡迎使用", + "welcomePage.extensionListSeparator": ",", + "welcomePage.installedExtension": "{0}(已安裝)", "ok": "確定", - "cancel": "取消" + "cancel": "取消", + "welcomePage.quickLinkBackground": "起始頁面連結的背景色彩." } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index 62ddb9869c6e7..920973ad06303 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "walkThrough.unboundCommand": "未繫結", - "walkThrough.gitNotFound": "您的系統上似乎未安裝 Git。" + "walkThrough.gitNotFound": "您的系統上似乎未安裝 Git。", + "walkThrough.embeddedEditorBackground": "編輯器互動區塊的背景色彩." } \ No newline at end of file diff --git a/i18n/deu/extensions/git/out/main.i18n.json b/i18n/deu/extensions/git/out/main.i18n.json index 6cf07d1824f42..58ab0b365d001 100644 --- a/i18n/deu/extensions/git/out/main.i18n.json +++ b/i18n/deu/extensions/git/out/main.i18n.json @@ -7,5 +7,5 @@ "using git": "Verwenden von Git {0} von {1}", "updateGit": "Git aktualisieren", "neverShowAgain": "Nicht mehr anzeigen", - "git20": "Sie haben anscheinend Git {0} installiert. Der Code funktioniert am besten mit Git 2 oder älter" + "git20": "Sie haben anscheinend Git {0} installiert. Code funktioniert am besten mit Git 2 oder neuer" } \ No newline at end of file diff --git a/i18n/deu/extensions/markdown/out/extension.i18n.json b/i18n/deu/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/deu/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/deu/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/package.i18n.json b/i18n/deu/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/extensions/npm/package.i18n.json b/i18n/deu/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/deu/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index a2b0a61e0fa19..24c2e906e9053 100644 --- a/i18n/deu/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/deu/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "Das Bild ist zu groß für den Editor. ", - "resourceOpenExternalButton": "Bild öffnen", - "resourceOpenExternalText": " mit externem Programm?", "nativeBinaryError": "Die Datei wird nicht im Editor angezeigt, weil sie binär oder sehr groß ist oder eine nicht unterstützte Textcodierung verwendet.", "sizeB": "{0} B", "sizeKB": "{0} KB", diff --git a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json index 2fe70e62eed2e..a01ec274ece9a 100644 --- a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -40,7 +40,6 @@ "formatOnType": "Steuert, ob der Editor Zeilen automatisch nach der Eingabe formatiert.", "formatOnPaste": "Steuert, ob der Editor den eingefügten Inhalt automatisch formatiert.", "suggestOnTriggerCharacters": "Steuert, ob Vorschläge automatisch bei der Eingabe von Triggerzeichen angezeigt werden.", - "acceptSuggestionOnEnter": "Steuert, ob Vorschläge über die Eingabetaste (zusätzlich zur TAB-Taste) angenommen werden sollen. Vermeidet Mehrdeutigkeit zwischen dem Einfügen neuer Zeilen oder dem Annehmen von Vorschlägen.", "acceptSuggestionOnCommitCharacter": "Steuert, ob Vorschläge über Commitzeichen angenommen werden sollen. In JavaScript kann ein Semikolon (\";\") beispielsweise ein Commitzeichen sein, das einen Vorschlag annimmt und dieses Zeichen eingibt.", "snippetSuggestions": "Steuert, ob Codeausschnitte mit anderen Vorschlägen angezeigt und wie diese sortiert werden.", "emptySelectionClipboard": "Steuert, ob ein Kopiervorgang ohne Auswahl die aktuelle Zeile kopiert.", diff --git a/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..ffee2c2fa36db --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Keine Definition gefunden für \"{0}\".", + "generic.noResults": "Keine Definition gefunden", + "meta.title": " – {0} Definitionen", + "actions.goToDecl.label": "Gehe zu Definition", + "actions.goToDeclToSide.label": "Definition an der Seite öffnen", + "actions.previewDecl.label": "Peek-Definition", + "goToImplementation.noResultWord": "Keine Implementierung gefunden für \"{0}\"", + "goToImplementation.generic.noResults": "Keine Implementierung gefunden", + "meta.implementations.title": "{0} Implementierungen", + "actions.goToImplementation.label": "Zur Implementierung wechseln", + "actions.peekImplementation.label": "Vorschau der Implementierung anzeigen", + "goToTypeDefinition.noResultWord": "Keine Typendefinition gefunden für \"{0}\"", + "goToTypeDefinition.generic.noResults": "Keine Typendefinition gefunden", + "meta.typeDefinitions.title": "{0} Typdefinitionen", + "actions.goToTypeDefinition.label": "Zur Typdefinition wechseln", + "actions.peekTypeDefinition.label": "Vorschau der Typdefinition anzeigen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..2d5f00609a890 --- /dev/null +++ b/i18n/deu/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Klicken Sie, um {0} Definitionen anzuzeigen." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json index e519ed643e29c..15f166829b2aa 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "Anzeigen", "help": "Hilfe", "file": "Datei", + "developer": "Entwickler", "showEditorTabs": "Steuert, ob geöffnete Editoren auf Registerkarten angezeigt werden sollen.", "editorTabCloseButton": "Steuert die Position der Schließen-Schaltflächen der Editor-Registerkarten oder deaktiviert sie bei der Einstellung \"off\".", "showIcons": "Steuert, ob geöffnete Editoren mit einem Symbol angezeigt werden sollen. Hierzu muss auch ein Symboldesign aktiviert werden.", diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..5c79e37943747 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "Andere Tastenzuordnungen deaktivieren, um Konflikte zwischen Tastenzuordnungen zu vermeiden?", + "yes": "Ja", + "no": "Nein" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 8880b15033b99..8153f54254b59 100644 --- a/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "Konfigurieren Sie Dateizuordnungen zu Sprachen (beispielsweise \"*.extension\": \"html\"). Diese besitzen Vorrang vor den Standardzuordnungen der installierten Sprachen.", "encoding": "Die Standardzeichensatz-Codierung, die beim Lesen und Schreiben von Dateien verwendet werden soll.", "autoGuessEncoding": "Ist diese Option aktiviert, wird beim Öffnen von Dateien versucht, die Zeichensatzcodierung automatisch zu ermitteln.", - "eol": "Das Zeilenende-Standardzeichen.", "trimTrailingWhitespace": "Bei Aktivierung werden nachgestellte Leerzeichen beim Speichern einer Datei gekürzt.", "insertFinalNewline": "Bei Aktivierung wird beim Speichern einer Datei eine abschließende neue Zeile am Dateiende eingefügt.", "files.autoSave.off": "Eine geänderte Datei wird nie automatisch gespeichert.", diff --git a/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 96d83227f6771..687359bd4866a 100644 --- a/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,9 @@ // Do not edit this file. It is machine generated. { "slow": "Langsamer Start erkannt", - "slow.detail": "Es tut uns leid, dass Ihr Start so langsam war. Starten Sie \"{0}\" mit aktivierter Profilerstellung neu, geben Sie die Profile für uns frei, und wir tun unser Bestes, damit der Start bald wieder perfekt funktioniert." + "slow.detail": "Es tut uns leid, dass Ihr Start so langsam war. Starten Sie \"{0}\" mit aktivierter Profilerstellung neu, geben Sie die Profile für uns frei, und wir tun unser Bestes, damit der Start bald wieder perfekt funktioniert.", + "prof.message": "Profile wurden erfolgreich erstellt.", + "prof.detail": "Erstellen Sie ein Problem, und fügen Sie die folgenden Dateien manuell an:\n{0}", + "prof.restartAndFileIssue": "Problem erstellen und neu starten", + "prof.restart": "Neu starten" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 1bc333472229e..5693a1f5b13de 100644 --- a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,6 +5,11 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Willkommen", + "welcomePage.typeScript": "TypeScript", + "welcomePage.php": "PHP", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", "welcomePage.keymapAlreadyInstalled": "Die {0} Tastenkombinationen sind bereits installiert.", "welcomePage.willReloadAfterInstallingKeymap": "Das Fenster wird nach der Installation der {0}-Tastaturbefehle neu geladen.", "welcomePage.installingKeymap": "Die {0}-Tastenkombinationen werden installiert...", diff --git a/i18n/esn/extensions/jake/out/main.i18n.json b/i18n/esn/extensions/jake/out/main.i18n.json index 8b6ad71cd4e6d..1b387f2707002 100644 --- a/i18n/esn/extensions/jake/out/main.i18n.json +++ b/i18n/esn/extensions/jake/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "La detección automática de Jake falló con el error: {0}" +} \ No newline at end of file diff --git a/i18n/esn/extensions/jake/package.i18n.json b/i18n/esn/extensions/jake/package.i18n.json index 8b6ad71cd4e6d..c22d4c52c9202 100644 --- a/i18n/esn/extensions/jake/package.i18n.json +++ b/i18n/esn/extensions/jake/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.jake.autoDetect": "Controla si la detección automática de tareas Jake estan activada/desactivada. El valor predeterminado es \"activada\"." +} \ No newline at end of file diff --git a/i18n/esn/extensions/markdown/out/extension.i18n.json b/i18n/esn/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/esn/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/package.i18n.json b/i18n/esn/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/extensions/npm/package.i18n.json b/i18n/esn/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/esn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index f706005311588..8029ab0b3bdfb 100644 --- a/i18n/esn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/esn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0} x {1} {2}", "largeImageError": "La imagen es muy grande para mostrar en el editor", - "resourceOpenExternalButton": "Abrir imagen", - "resourceOpenExternalText": "usar programa externo?", "nativeBinaryError": "El archivo no se mostrará en el editor porque es binario, muy grande o usa una codificación de texto no compatible.", "sizeB": "{0} B", "sizeKB": "{0} KB", diff --git a/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json index deeb605c6a664..8fe058e55cef5 100644 --- a/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "Controla el grosor de la fuente.", "fontSize": "Controla el tamaño de fuente en píxeles.", "lineHeight": "Controla la altura de línea. Utilice 0 para calcular el valor de lineHeight a partir de fontSize.", + "letterSpacing": "Controla el espacio entre letras en pixels.", "lineNumbers": "Controla la presentación de los números de línea. Los valores posibles son \"on\", \"off\" y \"relative\". \"relative\" muestra el número de líneas desde la posición actual del cursor.", "rulers": "Columnas en las que mostrar reglas verticales", "wordSeparators": "Caracteres que se usarán como separadores de palabras al realizar operaciones o navegaciones relacionadas con palabras.", @@ -40,7 +41,6 @@ "formatOnType": "Controla si el editor debe dar formato automáticamente a la línea después de escribirla", "formatOnPaste": "Controla si el editor debe formatear automáticamente el contenido pegado. Debe haber disponible un formateador capaz de aplicar formato a un intervalo dentro de un documento.", "suggestOnTriggerCharacters": "Controla si las sugerencias deben aparecer de forma automática al escribir caracteres desencadenadores", - "acceptSuggestionOnEnter": "Controla si las sugerencias deben aceptarse en \"Entrar\" (además de \"TAB\"). Ayuda a evitar la ambigüedad entre insertar nuevas líneas o aceptar sugerencias.", "acceptSuggestionOnCommitCharacter": "Controla si se deben aceptar sugerencias en los caracteres de confirmación. Por ejemplo, en Javascript, el punto y coma (\";\") puede ser un carácter de confirmación que acepta una sugerencia y escribe ese carácter.", "snippetSuggestions": "Controla si se muestran los fragmentos de código con otras sugerencias y cómo se ordenan.", "emptySelectionClipboard": "Controla si al copiar sin selección se copia la línea actual.", @@ -62,6 +62,7 @@ "renderLineHighlight": "Controla cómo el editor debe presentar el resaltado de línea. Las posibilidades son \"ninguno\", \"margen\", \"línea\" y \"todo\".", "codeLens": "Controla si el editor muestra lentes de código", "folding": "Controla si el editor tiene habilitado el plegado de código.", + "showFoldingControls": "Controla cuándo los controles de plegado del margen son ocultados automáticamente.", "matchBrackets": "Resaltar corchetes coincidentes cuando se seleccione uno de ellos.", "glyphMargin": "Controla si el editor debe representar el margen de glifo vertical. El margen de glifo se usa, principalmente, para depuración.", "useTabStops": "La inserción y eliminación del espacio en blanco sigue a las tabulaciones.", diff --git a/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..d9243b761356e --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "No se encontró ninguna definición para \"{0}\"", + "generic.noResults": "No se encontró ninguna definición", + "meta.title": " – {0} definiciones", + "actions.goToDecl.label": "Ir a definición", + "actions.goToDeclToSide.label": "Abrir definición en el lateral", + "actions.previewDecl.label": "Ver la definición", + "goToImplementation.noResultWord": "No se encontró ninguna implementación para \"{0}\"", + "goToImplementation.generic.noResults": "No se encontró ninguna implementación", + "meta.implementations.title": "{0} implementaciones", + "actions.goToImplementation.label": "Ir a implementación", + "actions.peekImplementation.label": "Inspeccionar implementación", + "goToTypeDefinition.noResultWord": "No se encontró ninguna definición de tipo para \"{0}\"", + "goToTypeDefinition.generic.noResults": "No se encontró ninguna definición de tipo", + "meta.typeDefinitions.title": " – {0} definiciones de tipo", + "actions.goToTypeDefinition.label": "Ir a la definición de tipo", + "actions.peekTypeDefinition.label": "Inspeccionar definición de tipo" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..d35f93e7fae0b --- /dev/null +++ b/i18n/esn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Haga clic para mostrar {0} definiciones." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index f9d2c2d5f0993..bf3d8015426a1 100644 --- a/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -12,6 +12,7 @@ "readMore": "Leer más...{0}", "suggestionWithDetailsAriaLabel": "{0}, sugerencia, con detalles", "suggestionAriaLabel": "{0}, sugerencia", + "readLess": "Leer menos...{0}", "suggestWidget.loading": "Cargando...", "suggestWidget.noSuggestions": "No hay sugerencias.", "suggestionAriaAccepted": "{0}, aceptada", diff --git a/i18n/esn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/esn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index df256b0ca88ad..43ec87cbde1f6 100644 --- a/i18n/esn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/esn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,9 @@ "schema.brackets": "Define los corchetes que aumentan o reducen la sangría.", "schema.autoClosingPairs": "Define el par de corchetes. Cuando se escribe un corchete de apertura, se inserta automáticamente el corchete de cierre.", "schema.autoClosingPairs.notIn": "Define una lista de ámbitos donde los pares automáticos están deshabilitados.", - "schema.surroundingPairs": "Define los pares de corchetes que se pueden usar para encerrar una cadena seleccionada." + "schema.surroundingPairs": "Define los pares de corchetes que se pueden usar para encerrar una cadena seleccionada.", + "schema.wordPattern": " La definición de la palabra en el idioma.", + "schema.wordPattern.pattern": "El patrón de expresión regular utilizado para localizar palabras.", + "schema.wordPattern.flags": "Los flags de expresión regular utilizados para localizar palabras.", + "schema.wordPattern.flags.errorMessage": "Debe coincidir con el patrón `/^([gimuy]+)$/`." } \ No newline at end of file diff --git a/i18n/esn/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/esn/src/vs/platform/markers/common/problemMatcher.i18n.json index 967ffc7598360..1c9dfefb5cb70 100644 --- a/i18n/esn/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/esn/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,6 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "Error: La propiedad pattern {0} no es un nombre de variable de patrón válido.", "ProblemMatcherParser.problemPattern.watchingMatcher": "Un buscador de coincidencias de problemas debe definir tanto un patrón de inicio como un patrón de finalización para la inspección.", "ProblemMatcherParser.invalidRegexp": "Error: La cadena {0} no es una expresión regular válida.\n", + "WatchingPatternSchema.regexp": "Expresión regular para detectar el principio o el final de una tarea en segundo plano.", "WatchingPatternSchema.file": "Índice de grupo de coincidencias del nombre de archivo. Se puede omitir.", "PatternTypeSchema.name": "Nombre de un patrón aportado o predefinido", "PatternTypeSchema.description": "Patrón de problema o nombre de un patrón de problema que se ha aportado o predefinido. Se puede omitir si se especifica la base.", @@ -42,6 +43,12 @@ "ProblemMatcherSchema.severity": "Gravedad predeterminada para los problemas de capturas. Se usa si el patrón no define un grupo de coincidencias para \"severity\".", "ProblemMatcherSchema.applyTo": "Controla si un problema notificado en un documento de texto se aplica solamente a los documentos abiertos, cerrados o a todos los documentos.", "ProblemMatcherSchema.fileLocation": "Define cómo deben interpretarse los nombres de archivo notificados en un patrón de problema.", + "ProblemMatcherSchema.background": "Patrones para hacer seguimiento del comienzo y el final en un comprobador activo de la tarea en segundo plano.", + "ProblemMatcherSchema.background.activeOnStart": "Si se establece en True, el monitor está en modo activo cuando la tarea empieza. Esto es equivalente a emitir una línea que coincide con beginPattern", + "ProblemMatcherSchema.background.beginsPattern": "Si se encuentran coincidencias en la salida, se señala el inicio de una tarea en segundo plano.", + "ProblemMatcherSchema.background.endsPattern": "Si se encuentran coincidencias en la salida, se señala el fin de una tarea en segundo plano.", + "ProblemMatcherSchema.watching.deprecated": "Esta propiedad está en desuso. Use la propiedad en segundo plano.", + "ProblemMatcherSchema.watching": "Patrones para hacer un seguimiento del comienzo y el final de un patrón de supervisión.", "ProblemMatcherSchema.watching.activeOnStart": "Si se establece en true, el monitor está en modo activo cuando la tarea empieza. Esto es equivalente a emitir una línea que coincide con beginPattern", "ProblemMatcherSchema.watching.beginsPattern": "Si se encuentran coincidencias en la salida, se señala el inicio de una tarea de inspección.", "ProblemMatcherSchema.watching.endsPattern": "Si se encuentran coincidencias en la salida, se señala el fin de una tarea de inspección", diff --git a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json index 85f87911be1bd..889a845a81315 100644 --- a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -36,11 +36,13 @@ "dropdownForeground": "Primer plano de lista desplegable.", "dropdownBorder": "Borde de lista desplegable.", "listFocusBackground": "Color de fondo de la lista o el árbol del elemento con el foco cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", + "listFocusForeground": "Color de fondo de la lista o el árbol del elemento con el foco cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", "listActiveSelectionBackground": "Color de fondo de la lista o el árbol del elemento seleccionado cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", "listActiveSelectionForeground": "Color de primer plano de la lista o el árbol del elemento con el foco cuando la lista o el árbol están activos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", "listInactiveSelectionBackground": "Color de fondo de la lista o el árbol del elemento seleccionado cuando la lista o el árbol están inactivos. Una lista o un árbol tienen el foco del teclado cuando están activos, cuando están inactivos no.", "listInactiveSelectionForeground": "Color de primer plano de la lista o el árbol del elemento con el foco cuando la lista o el árbol esta inactiva. Una lista o un árbol tiene el foco del teclado cuando está activo, cuando esta inactiva no.", "listHoverBackground": "Fondo de la lista o el árbol al mantener el mouse sobre los elementos.", + "listHoverForeground": "Color de primer plano de la lista o el árbol al pasar por encima de los elementos con el ratón.", "listDropBackground": "Fondo de arrastrar y colocar la lista o el árbol al mover los elementos con el mouse.", "highlight": "Color de primer plano de la lista o el árbol de las coincidencias resaltadas al buscar dentro de la lista o el ábol.", "pickerGroupForeground": "Selector de color rápido para la agrupación de etiquetas.", @@ -58,6 +60,7 @@ "editorBackground": "Color de fondo del editor.", "editorForeground": "Color de primer plano predeterminado del editor.", "editorWidgetBackground": "Color de fondo del editor de widgets como buscar/reemplazar", + "editorWidgetBorder": "Color de borde del editor de widget.", "editorSelection": "Color de la selección del editor.", "editorInactiveSelection": "Color de la selección en un editor inactivo.", "editorSelectionHighlight": "Color de las regiones con el mismo contenido que la selección.", diff --git a/i18n/esn/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/esn/src/vs/workbench/api/node/extHostTreeViews.i18n.json index 8b6ad71cd4e6d..1127a4ec4f832 100644 --- a/i18n/esn/src/vs/workbench/api/node/extHostTreeViews.i18n.json +++ b/i18n/esn/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "treeView.notRegistered": "No se ha registrado ninga vista del árbol con id '{0}'.", + "treeItem.notFound": "No se encontró ningún item del árbol con id '{0}'.", + "treeView.duplicateElement": "El elemento '{0}' ya está registrado" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/common/theme.i18n.json b/i18n/esn/src/vs/workbench/common/theme.i18n.json index 97f9736e66572..40dfe03ebb699 100644 --- a/i18n/esn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/esn/src/vs/workbench/common/theme.i18n.json @@ -32,6 +32,7 @@ "activityBarBadgeBackground": "Color de fondo de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", "activityBarBadgeForeground": "Color de primer plano de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", "sideBarBackground": "Color de fondo de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", + "sideBarForeground": "Color de primer plano de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", "sideBarTitleForeground": "Color de primer plano del título de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", "sideBarSectionHeaderBackground": "Color de fondo del encabezado de sección de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", "titleBarActiveForeground": "Color de primer plano de la barra de título cuando la ventana está activa. Tenga en cuenta que, actualmente, este clor solo se admite en macOS.", diff --git a/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json index cbf9d0deef3dc..543d5451907bc 100644 --- a/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "Ver", "help": "Ayuda", "file": "Archivo", + "developer": "Desarrollador", "showEditorTabs": "Controla si los editores abiertos se deben mostrar o no en pestañas.", "editorTabCloseButton": "Controla la posición de los botones de cierre de pestañas del editor o los deshabilita si se establece en \"off\".", "showIcons": "Controla si los editores abiertos deben mostrarse o no con un icono. Requiere que también se habilite un tema de icono.", diff --git a/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index cb1c21395831b..00a55728fff7c 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "El ejecutable del adaptador de depuración \"{0}\" no existe.", "debugAdapterCannotDetermineExecutable": "No se puede determinar el ejecutable para el adaptador de depuración \"{0}\".", "debugType": "Tipo de configuración.", + "debugTypeNotRecognised": "Este tipo de depuración no se reconoce. Compruebe que tiene instalada la correspondiente extensión de depuración y que está habilitada.", "node2NotSupported": "\"node2\" ya no se admite; use \"node\" en su lugar y establezca el atributo \"protocol\" en \"inspector\".", "debugName": "Nombre de la configuración. Aparece en el menú desplegable de la configuración de inicio.", "debugRequest": "Tipo de solicitud de la configuración. Puede ser \"launch\" o \"attach\".", diff --git a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..2b42d7a0c5b37 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "¿Quiere deshabilitar otras asignaciones de teclado para evitar conflictos entre los enlaces de teclado?", + "yes": "Sí", + "no": "No" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 9b8bcb5fdf134..ef718dc3ee129 100644 --- a/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "Configure asociaciones de archivo para los lenguajes (por ejemplo, \"*.extension\": \"html\"). Estas asociaciones tienen prioridad sobre las asociaciones predeterminadas de los lenguajes instalados.", "encoding": "La codificación del juego de caracteres predeterminada que debe utilizarse al leer y escribir archivos.", "autoGuessEncoding": "Si está opción está habilitada, se intentará adivinar la codificación del juego de caracteres al abrir los archivos", - "eol": "Carácter predeterminado de final de línea.", "trimTrailingWhitespace": "Si se habilita, se recortará el espacio final cuando se guarde un archivo.", "insertFinalNewline": "Si se habilita, inserte una nueva línea final al final del archivo cuando lo guarde.", "files.autoSave.off": "Un archivo con modificaciones no se guarda nunca automáticamente.", diff --git a/i18n/esn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 712641fcab11d..81f5a667ca8d3 100644 --- a/i18n/esn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,11 @@ // Do not edit this file. It is machine generated. { "slow": "Inicio lento detectado", - "slow.detail": "Lamentamos que haya tenido un inicio lento. Reinicie \"{0}\" con la generación de perfiles habilitada, comparta los perfiles con nosotros y trabajaremos a fondo para que vuelva a disfrutar de un inicio increíble." + "slow.detail": "Lamentamos que haya tenido un inicio lento. Reinicie \"{0}\" con la generación de perfiles habilitada, comparta los perfiles con nosotros y trabajaremos a fondo para que vuelva a disfrutar de un inicio increíble.", + "prof.message": "Los perfiles se crearon correctamente.", + "prof.detail": "Cree un problema y asóciele manualmente los siguientes archivos: {0}", + "prof.restartAndFileIssue": "Crear problema y reiniciar", + "prof.restart": "Reiniciar", + "prof.thanks": "Gracias por ayudarnos.", + "prof.detail.restart": "Se necesita un reinicio final para continuar utilizando '{0}'. De nuevo, gracias por su aportación." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index 2d44f58d5145a..a77a22117808a 100644 --- a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "Mostrar GIT", + "installAdditionalSCMProviders": "Instalar proveedores adicionales de SCM...", "source control": "Control de código fuente", "toggleSCMViewlet": "Mostrar SCM", "view": "Ver" diff --git a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index 58e5c2559c839..048db5a28d068 100644 --- a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "Instalar proveedores adicionales de SCM...", "switch provider": "Cambiar proveedor de SCM..." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index e5995f59713d9..30e2262eef7a1 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tareas" + "entryAriaLabel": "{0}, tareas", + "workspace": "De área de trabajo", + "extension": "De extensiones" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 930b60298c1c3..58c4eca7cfefd 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,6 @@ { "TerminalTaskSystem.unknownError": "Error desconocido durante la ejecución de una tarea. Vea el registro de resultados de la tarea para obtener más detalles.", "TerminalTaskSystem.terminalName": "Tarea - {0}", - "TerminalTaskSystem": "No se puede ejecutar un comando shell en una unidad UNC." + "TerminalTaskSystem": "No se puede ejecutar un comando shell en una unidad UNC.", + "unkownProblemMatcher": "No puede resolver el comprobador de problemas {0}. Será omitido." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index 651c8b00513f4..b300e0e061aa5 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "Error desconocido durante la ejecución de una tarea. Vea el registro de resultados de la tarea para obtener más detalles.", "TaskRunnerSystem.watchingBuildTaskFinished": "La inspección de las tareas de compilación ha finalizado.", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "La tarea '{0}' se finalizó por solicitud del usuario." + "TaskRunnerSystem.cancelRequested": "La tarea '{0}' se finalizó por solicitud del usuario.", + "unkownProblemMatcher": "No puede resolver el comprobador de problemas {0}. Será omitido" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 9591e0b167391..2438b3e17098b 100644 --- a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -14,13 +14,18 @@ "welcomePage.moreRecent": "Más...", "welcomePage.noRecentFolders": "No hay ninguna carpeta reciente", "welcomePage.help": "Ayuda", + "welcomePage.keybindingsCheatsheet": "Hoja imprimible con ayudas de teclado", "welcomePage.introductoryVideos": "Vídeos de introducción", "welcomePage.productDocumentation": "Documentación del producto", "welcomePage.gitHubRepository": "Repositorio de GitHub", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Mostrar página principal al inicio", "welcomePage.customize": "Personalizar", + "welcomePage.installExtensionPacks": "Herramientas y lenguajes", + "welcomePage.installExtensionPacksDescription": "Instalar soporte para {0} y {1}", + "welcomePage.moreExtensions": "más", "welcomePage.installKeymapDescription": "Instalar los métodos abreviados de teclado", + "welcomePage.installKeymapExtension": "Instalar los métodos abreviados de teclado de {0} y {1}", "welcomePage.others": "otros", "welcomePage.colorTheme": "Tema de color", "welcomePage.colorThemeDescription": "Modifique a su gusto la apariencia del editor y el código", diff --git a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 28283fba5c3e1..57b34bdf736e4 100644 --- a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,25 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Bienvenido", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "El soporte para '{0}' ya está instalado.", + "welcomePage.willReloadAfterInstallingExtensionPack": "La ventana se volverá a cargar después de instalar el soporte para {0}.", + "welcomePage.installingExtensionPack": "Instalando soporte para {0}...", + "welcomePage.extensionPackNotFound": "No se pudo encontrar el soporte para {0} con id {1}.", "welcomePage.keymapAlreadyInstalled": "Los métodos abreviados de teclado {0} ya están instalados.", "welcomePage.willReloadAfterInstallingKeymap": "La ventana se volverá a cargar después de instalar los métodos abreviados de teclado {0}.", "welcomePage.installingKeymap": "Instalando los métodos abreviados de teclado de {0}...", "welcomePage.keymapNotFound": "No se pudieron encontrar los métodos abreviados de teclado {0} con el identificador {1}.", "welcome.title": "Bienvenido", + "welcomePage.extensionListSeparator": ", ", + "welcomePage.installedExtension": "{0} (instalado)", "ok": "Aceptar", "cancel": "Cancelar", "welcomePage.quickLinkBackground": "Color de fondo de los vínculos rápidos en la página principal.", diff --git a/i18n/fra/extensions/markdown/out/extension.i18n.json b/i18n/fra/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/fra/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/fra/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/fra/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/extensions/merge-conflict/package.i18n.json b/i18n/fra/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/extensions/npm/package.i18n.json b/i18n/fra/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/fra/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index d6968482f68eb..b6faf1c8af7d5 100644 --- a/i18n/fra/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/fra/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "L'image est trop grande pour être affichée dans l'éditeur. ", - "resourceOpenExternalButton": "Ouvrir l'image", - "resourceOpenExternalText": " en utilisant un programme externe ?", "nativeBinaryError": "Impossible d'afficher le fichier dans l'éditeur : soit il est binaire, soit il est très volumineux, soit il utilise un encodage de texte non pris en charge.", "sizeB": "{0} o", "sizeKB": "{0} Ko", diff --git a/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json index afe0864b817de..16acf6481b0c5 100644 --- a/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -41,7 +41,6 @@ "formatOnType": "Contrôle si l'éditeur doit automatiquement mettre en forme la ligne après la saisie", "formatOnPaste": "Contrôle si l'éditeur doit automatiquement mettre en forme le contenu collé. Un formateur doit être disponible et doit pouvoir mettre en forme une plage dans un document.", "suggestOnTriggerCharacters": "Contrôle si les suggestions doivent s'afficher automatiquement durant la saisie de caractères de déclenchement", - "acceptSuggestionOnEnter": "Contrôle si les suggestions peuvent être acceptées avec Entrée (en plus de Tab). Cela permet d'éviter toute ambiguïté entre l'insertion de nouvelles lignes et l'acceptation de suggestions.", "acceptSuggestionOnCommitCharacter": "Contrôle si les suggestions doivent être acceptées avec des caractères de validation. Par exemple, en JavaScript, le point-virgule (';') peut être un caractère de validation qui permet d'accepter une suggestion et de taper ce caractère.", "snippetSuggestions": "Contrôle si les extraits de code s'affichent en même temps que d'autres suggestions, ainsi que leur mode de tri.", "emptySelectionClipboard": "Contrôle si la copie sans sélection permet de copier la ligne actuelle.", diff --git a/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..0488ff4835459 --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Définition introuvable pour '{0}'", + "generic.noResults": "Définition introuvable", + "meta.title": " – {0} définitions", + "actions.goToDecl.label": "Atteindre la définition", + "actions.goToDeclToSide.label": "Ouvrir la définition sur le côté", + "actions.previewDecl.label": "Apercu de définition", + "goToImplementation.noResultWord": "Implémentation introuvable pour '{0}'", + "goToImplementation.generic.noResults": "Implémentation introuvable", + "meta.implementations.title": "– Implémentations {0}", + "actions.goToImplementation.label": "Accéder à l'implémentation", + "actions.peekImplementation.label": "Aperçu de l'implémentation", + "goToTypeDefinition.noResultWord": "Définition de type introuvable pour '{0}'", + "goToTypeDefinition.generic.noResults": "Définition de type introuvable", + "meta.typeDefinitions.title": " – Définitions de type {0}", + "actions.goToTypeDefinition.label": "Atteindre la définition de type", + "actions.peekTypeDefinition.label": "Aperçu de la définition du type" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..247bd9d24da5d --- /dev/null +++ b/i18n/fra/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Cliquez pour afficher {0} définitions." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json index 7d14c23b2b5f3..d1fbda145ce56 100644 --- a/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "Affichage", "help": "Aide", "file": "Fichier", + "developer": "Développeur", "showEditorTabs": "Contrôle si les éditeurs ouverts doivent s'afficher ou non sous des onglets.", "editorTabCloseButton": "Contrôle la position des boutons de fermeture des onglets de l'éditeur, ou les désactive quand le paramètre a la valeur 'off'.", "showIcons": "Contrôle si les éditeurs ouverts doivent s'afficher ou non avec une icône. Cela implique notamment l'activation d'un thème d'icône.", diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..5ddc77dfc5a2b 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "Désactiver les autres mappages de touches pour éviter les conflits de combinaisons de touches ?", + "yes": "Oui", + "no": "Non" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 8d72ad3193549..6f916235625b1 100644 --- a/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "Configurez les associations entre les fichiers et les langages (par exemple, \"*.extension\": \"html\"). Celles-ci ont priorité sur les associations par défaut des langages installés.", "encoding": "Encodage du jeu de caractères par défaut à utiliser durant la lecture et l'écriture des fichiers.", "autoGuessEncoding": "Quand cette option est activée, tente de deviner l'encodage du jeu de caractères à l'ouverture des fichiers", - "eol": "Caractère de fin de ligne par défaut.", "trimTrailingWhitespace": "Si l'option est activée, l'espace blanc de fin est supprimé au moment de l'enregistrement d'un fichier.", "insertFinalNewline": "Quand l'option est activée, une nouvelle ligne finale est insérée à la fin du fichier au moment de son enregistrement.", "files.autoSave.off": "Un fichier dont l'intégrité est compromise n'est jamais enregistré automatiquement.", diff --git a/i18n/fra/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index fb432045fcc8d..56c9603dba733 100644 --- a/i18n/fra/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,9 @@ // Do not edit this file. It is machine generated. { "slow": "Démarrage lent détecté", - "slow.detail": "Le démarrage a été très lent. Redémarrez '{0}' en ayant activé le profilage, partagez les profils avec nous, et nous ferons en sorte que le démarrage retrouve sa rapidité d'exécution." + "slow.detail": "Le démarrage a été très lent. Redémarrez '{0}' en ayant activé le profilage, partagez les profils avec nous, et nous ferons en sorte que le démarrage retrouve sa rapidité d'exécution.", + "prof.message": "Création réussie des profils.", + "prof.detail": "Créez un problème et joignez manuellement les fichiers suivants :\n{0}", + "prof.restartAndFileIssue": "Créer le problème et redémarrer", + "prof.restart": "Redémarrer" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 915c12960a049..66bb9f2ab6628 100644 --- a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,6 +5,11 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Bienvenue", + "welcomePage.typeScript": "TypeScript", + "welcomePage.php": "PHP", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", "welcomePage.keymapAlreadyInstalled": "Les raccourcis clavier {0} sont déjà installés.", "welcomePage.willReloadAfterInstallingKeymap": "La fenêtre se recharge après l'installation des raccourcis clavier {0}.", "welcomePage.installingKeymap": "Installation des raccourcis clavier de {0}...", diff --git a/i18n/ita/extensions/markdown/out/extension.i18n.json b/i18n/ita/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/ita/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/ita/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/extensions/merge-conflict/package.i18n.json b/i18n/ita/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/extensions/npm/package.i18n.json b/i18n/ita/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index 0ccb13bf8a736..c64a07b43792a 100644 --- a/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "L'immagine è troppo grande per essere visualizzata nell'editor", - "resourceOpenExternalButton": "Apri immagine", - "resourceOpenExternalText": " con il programma esterno?", "nativeBinaryError": "Il file non verrà visualizzato nell'editor perché è binario, è molto grande o usa una codifica testo non supportata.", "sizeB": "{0} B", "sizeKB": "{0} KB", diff --git a/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json index 59f730fe1dc6d..06ec2510c3ae3 100644 --- a/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -41,7 +41,6 @@ "formatOnType": "Controlla se l'editor deve formattare automaticamente la riga dopo la digitazione", "formatOnPaste": "Controlla se l'editor deve formattare automaticamente il contenuto incollato. Deve essere disponibile un formattatore che deve essere in grado di formattare un intervallo in un documento.", "suggestOnTriggerCharacters": "Controlla se i suggerimenti devono essere visualizzati automaticamente durante la digitazione dei caratteri trigger", - "acceptSuggestionOnEnter": "Controlla se i suggerimenti devono essere accettati con 'INVIO' in aggiunta a 'TAB'. In questo modo è possibile evitare ambiguità tra l'inserimento di nuove righe e l'accettazione di suggerimenti.", "acceptSuggestionOnCommitCharacter": "Controlla se accettare i suggerimenti con i caratteri di commit. Ad esempio, in JavaScript il punto e virgola (';') può essere un carattere di commit che accetta un suggerimento e digita tale carattere.", "snippetSuggestions": "Controlla se i frammenti di codice sono visualizzati con altri suggerimenti e il modo in cui sono ordinati.", "emptySelectionClipboard": "Consente di controllare se, quando si copia senza aver effettuato una selezione, viene copiata la riga corrente.", @@ -63,6 +62,7 @@ "renderLineHighlight": "Consente di controllare in che modo l'editor deve eseguire il rendering dell'evidenziazione di riga corrente. Le opzioni possibili sono 'none', 'gutter', 'line' e 'all'.", "codeLens": "Controlla se nell'editor sono visualizzate le finestre di CodeLens", "folding": "Controlla se per l'editor è abilitata la riduzione del codice", + "showFoldingControls": "Controlla se i controlli di riduzione sul margine della barra di scorrimento sono automaticamente nascosti.", "matchBrackets": "Evidenzia le parentesi corrispondenti quando se ne seleziona una.", "glyphMargin": "Controlla se l'editor deve eseguire il rendering del margine verticale del glifo. Il margine del glifo viene usato principalmente per il debug.", "useTabStops": "Inserimento ed eliminazione dello spazio vuoto dopo le tabulazioni", diff --git a/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..9df481ec1b5e8 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Non è stata trovata alcuna definizione per '{0}'", + "generic.noResults": "Non è stata trovata alcuna definizione", + "meta.title": " - Definizioni di {0}", + "actions.goToDecl.label": "Vai alla definizione", + "actions.goToDeclToSide.label": "Apri definizione lateralmente", + "actions.previewDecl.label": "Visualizza la definizione", + "goToImplementation.noResultWord": "Non sono state trovate implementazioni per '{0}'", + "goToImplementation.generic.noResults": "Non sono state trovate implementazioni", + "meta.implementations.title": "- {0} implementazioni", + "actions.goToImplementation.label": "Vai all'implementazione", + "actions.peekImplementation.label": "Anteprima implementazione", + "goToTypeDefinition.noResultWord": "Non sono state trovate definizioni di tipi per '{0}'", + "goToTypeDefinition.generic.noResults": "Non sono state trovate definizioni di tipi", + "meta.typeDefinitions.title": " - {0} definizioni di tipo", + "actions.goToTypeDefinition.label": "Vai alla definizione di tipo", + "actions.peekTypeDefinition.label": "Anteprima definizione di tipo" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..fa526a1f9e6c3 --- /dev/null +++ b/i18n/ita/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Fare clic per visualizzare {0} definizioni." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/ita/src/vs/platform/markers/common/problemMatcher.i18n.json index a2611139aecce..87b88acd38842 100644 --- a/i18n/ita/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/ita/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,6 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "Errore: la proprietà {0} del criterio non è un nome di variabile criterio valido.", "ProblemMatcherParser.problemPattern.watchingMatcher": "Un matcher problemi deve definire un criterio di inizio e un criterio di fine per il controllo.", "ProblemMatcherParser.invalidRegexp": "Errore: la stringa {0} non è un'espressione regolare valida.\n", + "WatchingPatternSchema.regexp": "L'espressione regolare per rilevare l'inizio o la fine di un'attività in background.", "WatchingPatternSchema.file": "Indice del gruppo di corrispondenze del nome file. Può essere omesso.", "PatternTypeSchema.name": "Nome di un criterio predefinito o aggiunto come contributo", "PatternTypeSchema.description": "Criterio di problema o nome di un criterio di problema predefinito o aggiunto come contributo. Può essere omesso se si specifica base.", @@ -42,6 +43,12 @@ "ProblemMatcherSchema.severity": "Gravità predefinita per i problemi di acquisizione. Viene usato se il criterio non definisce un gruppo di corrispondenze per la gravità.", "ProblemMatcherSchema.applyTo": "Controlla se un problema segnalato in un documento di testo è valido solo per i documenti aperti o chiusi oppure per tutti i documenti.", "ProblemMatcherSchema.fileLocation": "Consente di definire come interpretare i nomi file indicati in un criterio di problema.", + "ProblemMatcherSchema.background": "Criteri per tenere traccia dell'inizio e della fine di un matcher attivo su un'attività in background.", + "ProblemMatcherSchema.background.activeOnStart": "Se impostato a true, il monitor in backbround è in modalità attiva quando l'attività inizia. Equivale a inviare una riga che corrisponde al beginPattern", + "ProblemMatcherSchema.background.beginsPattern": "Se corrisponde nell'output, viene segnalato l'avvio di un'attività in background.", + "ProblemMatcherSchema.background.endsPattern": "Se corrisponde nell'output, viene segnalata la fine di un'attività in background.", + "ProblemMatcherSchema.watching.deprecated": "La proprietà watching è deprecata. In alternativa, utilizzare background (sfondo).", + "ProblemMatcherSchema.watching": "Criteri per tenere traccia dell'inizio e della fine di un matcher watching.", "ProblemMatcherSchema.watching.activeOnStart": "Se impostato su true, indica che il watcher è in modalità attiva all'avvio dell'attività. Equivale a inviare una riga che corrisponde al criterio di avvio", "ProblemMatcherSchema.watching.beginsPattern": "Se corrisponde nell'output, viene segnalato l'avvio di un'attività di controllo.", "ProblemMatcherSchema.watching.endsPattern": "Se corrisponde nell'output, viene segnalata la fine di un'attività di controllo.", diff --git a/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json index c034a8cc727bf..b13e3a07bdd86 100644 --- a/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "Visualizza", "help": "Guida", "file": "File", + "developer": "Sviluppatore", "showEditorTabs": "Controlla se visualizzare o meno gli editor aperti in schede.", "editorTabCloseButton": "Controlla la posizione dei pulsanti di chiusura delle schede dell'editor oppure li disabilita quando è impostata su 'off'.", "showIcons": "Controlla se visualizzare o meno un'icona per gli editor aperti. Richiede l'abilitazione anche di un tema dell'icona.", diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..6c3f2e984e8d1 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "Disabilitare altre mappature tastiera per evitare conflitti tra tasti di scelta rapida?", + "yes": "Sì", + "no": "No" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 5f1557087a04f..a3c0e1da94b45 100644 --- a/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "Consente di configurare le associazioni tra file e linguaggi, ad esempio \"*.extension\": \"html\". Queste hanno la precedenza sulle associazioni predefinite dei linguaggi installate.", "encoding": "Codifica del set di caratteri predefinita da usare durante la lettura e la scrittura di file.", "autoGuessEncoding": "Quando questa opzione è abilitata, la codifica del set di caratteri viene ipotizzata all'apertura dei file", - "eol": "Carattere di fine riga predefinito.", "trimTrailingWhitespace": "Se è abilitato, taglierà lo spazio vuoto quando si salva un file.", "insertFinalNewline": "Se è abilitato, inserisce un carattere di nuova riga finale alla fine del file durante il salvataggio.", "files.autoSave.off": "Un file dirty non viene mai salvato automaticamente.", diff --git a/i18n/ita/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 18ae03ff77a60..158ed123e7aca 100644 --- a/i18n/ita/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,9 @@ // Do not edit this file. It is machine generated. { "slow": "È stato rilevato un rallentamento all'avvio", - "slow.detail": "È stato appena rilevato un rallentamento all'avvio. Per consentire a Microsoft di analizzare e risolvere il problema, riavviare '{0}' con la profilatura abilitata e condividere i profili." + "slow.detail": "È stato appena rilevato un rallentamento all'avvio. Per consentire a Microsoft di analizzare e risolvere il problema, riavviare '{0}' con la profilatura abilitata e condividere i profili.", + "prof.message": "I profili sono stati creati.", + "prof.detail": "Creare un problema e allegare manualmente i file seguenti:\n{0}", + "prof.restartAndFileIssue": "Crea problema e riavvia", + "prof.restart": "Riavvia" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index d2d18b208df55..01f19048853a9 100644 --- a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,6 +5,11 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Benvenuti", + "welcomePage.typeScript": "TypeScript", + "welcomePage.php": "PHP", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", "welcomePage.keymapAlreadyInstalled": "I tasti di scelta rapida di {0} sono già installati.", "welcomePage.willReloadAfterInstallingKeymap": "La finestra verrà ricaricata dopo l'installazione dei tasti di scelta rapida di {0}.", "welcomePage.installingKeymap": "Installazione dei tasti di scelta rapida di {0}...", diff --git a/i18n/jpn/extensions/jake/out/main.i18n.json b/i18n/jpn/extensions/jake/out/main.i18n.json index 8b6ad71cd4e6d..0f77342ecbcca 100644 --- a/i18n/jpn/extensions/jake/out/main.i18n.json +++ b/i18n/jpn/extensions/jake/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Jake のエラーによる失敗を自動検出: {0}" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/jake/package.i18n.json b/i18n/jpn/extensions/jake/package.i18n.json index 8b6ad71cd4e6d..def0eab1b4ce2 100644 --- a/i18n/jpn/extensions/jake/package.i18n.json +++ b/i18n/jpn/extensions/jake/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.jake.autoDetect": "Jake タスクの自動検出をオンにするかオフにするかを制御します。既定はオンです。" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/markdown/out/extension.i18n.json b/i18n/jpn/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/package.i18n.json b/i18n/jpn/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/npm/package.i18n.json b/i18n/jpn/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/typescript/package.i18n.json b/i18n/jpn/extensions/typescript/package.i18n.json index e30965564d08b..d3f776eaa1130 100644 --- a/i18n/jpn/extensions/typescript/package.i18n.json +++ b/i18n/jpn/extensions/typescript/package.i18n.json @@ -33,10 +33,13 @@ "javascript.validate.enable": "JavaScript の検証を有効/無効にします。", "typescript.goToProjectConfig.title": "プロジェクト構成に移動", "javascript.goToProjectConfig.title": "プロジェクト構成に移動", + "javascript.referencesCodeLens.enabled": "JavaScript ファイル内で CodeLens の参照を有効/無効にします。", + "typescript.referencesCodeLens.enabled": "TypeScript ファイル内で CodeLens の参照を有効/無効にします。TypeScript 2.0.6 以上が必要です。", "typescript.implementationsCodeLens.enabled": "CodeLens の実装を有効/無効にします。TypeScript 2.2.0 以上が必要です。", "typescript.openTsServerLog.title": "TS サーバーのログを開く", "typescript.selectTypeScriptVersion.title": "TypeScript のバージョンの選択", "jsDocCompletion.enabled": " 自動 JSDoc コメントを有効/無効にします", "javascript.implicitProjectConfig.checkJs": "JavaScript ファイルのセマンティック チェックを有効/無効にします。既存の jsconfi.json や tsconfi.json ファイルの設定はこれより優先されます。TypeScript は 2.3.1 以上である必要があります。", - "typescript.check.npmIsInstalled": "型定義の自動取得に NPM がインストールされているかどうかを確認する" + "typescript.check.npmIsInstalled": "型定義の自動取得に NPM がインストールされているかどうかを確認する", + "javascript.nameSuggestions": "JavaScript の候補リスト内でファイルから一意の名前を含むかどうかを有効/無効にします。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index ea2e47d981329..e70844baf7b3f 100644 --- a/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "イメージが大きすぎてエディターに表示できません。", - "resourceOpenExternalButton": "イメージを開く", - "resourceOpenExternalText": " 外部プログラムを使用していますか?", "nativeBinaryError": "このファイルはバイナリか、非常に大きいか、またはサポートされていないテキスト エンコードを使用しているため、エディターに表示されません。", "sizeB": "{0}B", "sizeKB": "{0}KB", diff --git a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json index da6b50dacf075..8ce8d297e0025 100644 --- a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -41,7 +41,6 @@ "formatOnType": "エディターで入力後に自動的に行の書式設定を行うかどうかを制御します", "formatOnPaste": "貼り付けた内容がエディターにより自動的にフォーマットされるかどうかを制御します。フォーマッタを使用可能にする必要があります。また、フォーマッタがドキュメント内の範囲をフォーマットできなければなりません。", "suggestOnTriggerCharacters": "トリガー文字の入力時に候補が自動的に表示されるようにするかどうかを制御します", - "acceptSuggestionOnEnter": "'Tab' キーに加えて 'Enter' キーで候補を受け入れるかどうかを制御します。改行の挿入や候補の反映の間であいまいさを解消するのに役立ちます。", "acceptSuggestionOnCommitCharacter": "コミット文字で候補を受け入れるかどうかを制御します。たとえば、JavaScript ではセミコロン (';') をコミット文字にして、候補を受け入れてその文字を入力することができます。", "snippetSuggestions": "他の修正候補と一緒にスニペットを表示するかどうか、およびその並び替えの方法を制御します。", "emptySelectionClipboard": "選択範囲を指定しないでコピーする場合に現在の行をコピーするかどうかを制御します。", @@ -63,6 +62,7 @@ "renderLineHighlight": "エディターが現在の行をどのように強調表示するかを制御します。考えられる値は 'none'、'gutter'、'line'、'all' です。", "codeLens": "エディターで CodeLens を表示するかどうかを制御する", "folding": "エディターでコードの折りたたみを有効にするかどうかを制御します", + "showFoldingControls": "余白上の折りたたみコントロールを自動的に非表示にするかどうかを制御します 。", "matchBrackets": "かっこを選択すると、対応するかっこを強調表示します。", "glyphMargin": "エディターで縦のグリフ余白が表示されるかどうかを制御します。ほとんどの場合、グリフ余白はデバッグに使用されます。", "useTabStops": "空白の挿入や削除はタブ位置に従って行われます", diff --git a/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..624f9b7af7030 --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "'{0}' の定義は見つかりません", + "generic.noResults": "定義が見つかりません", + "meta.title": " – {0} 個の定義", + "actions.goToDecl.label": "定義へ移動", + "actions.goToDeclToSide.label": "定義を横に開く", + "actions.previewDecl.label": "定義をここに表示", + "goToImplementation.noResultWord": "'{0}' の実装が見つかりません", + "goToImplementation.generic.noResults": "実装が見つかりません", + "meta.implementations.title": "– {0} 個の実装", + "actions.goToImplementation.label": "実装に移動", + "actions.peekImplementation.label": "実装のプレビュー", + "goToTypeDefinition.noResultWord": "'{0}' の型定義が見つかりません", + "goToTypeDefinition.generic.noResults": "型定義が見つかりません", + "meta.typeDefinitions.title": " – {0} 個の型定義", + "actions.goToTypeDefinition.label": "型定義へ移動", + "actions.peekTypeDefinition.label": "型定義を表示" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..f918ba9f96d5c --- /dev/null +++ b/i18n/jpn/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "クリックして、{0} の定義を表示します。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index b5c107a4338c7..65e2583d291f2 100644 --- a/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -12,6 +12,7 @@ "readMore": "詳細を表示...{0}", "suggestionWithDetailsAriaLabel": "{0}、候補、詳細あり", "suggestionAriaLabel": "{0}、候補", + "readLess": "詳細を隠す...{0}", "suggestWidget.loading": "読み込んでいます...", "suggestWidget.noSuggestions": "候補はありません。", "suggestionAriaAccepted": "{0}、受け入れ済み", diff --git a/i18n/jpn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/jpn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index 991783c660296..7f3e60f73e417 100644 --- a/i18n/jpn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/jpn/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -16,6 +16,7 @@ "schema.autoClosingPairs": "角かっこのペアを定義します。左角かっこが入力されると、右角かっこが自動的に挿入されます。", "schema.autoClosingPairs.notIn": "自動ペアが無効なスコープの一覧を定義します。", "schema.surroundingPairs": "選択文字列を囲むときに使用できる角かっこのペアを定義します。", + "schema.wordPattern": "言語のための単語の定義。", "schema.wordPattern.pattern": "言葉の照合に使用する正規表現パターン。", "schema.wordPattern.flags": "言葉の照合に使用する正規表現フラグ。", "schema.wordPattern.flags.errorMessage": "`/^([gimuy]+)$/` パターンに一致する必要があります。" diff --git a/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json index 2bbfe1d0b1d59..df4f3d19acde8 100644 --- a/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,6 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "エラー: パターン プロパティ {0} は有効なパターン変数名ではありません。", "ProblemMatcherParser.problemPattern.watchingMatcher": "問題マッチャーは、ウォッチ対象の開始パターンと終了パターンの両方を定義する必要があります。", "ProblemMatcherParser.invalidRegexp": "エラー: 文字列 {0} は、有効な正規表現ではありません。\n", + "WatchingPatternSchema.regexp": "バックグラウンド タスクの開始または終了を検出する正規表現。", "WatchingPatternSchema.file": "ファイル名の一致グループ インデックス。省略できます。", "PatternTypeSchema.name": "提供されたか事前定義された問題パターンの名前", "PatternTypeSchema.description": "A problem pattern or the name of a contributed or predefined problem pattern. Can be omitted if base is specified.", @@ -42,6 +43,12 @@ "ProblemMatcherSchema.severity": "キャプチャされた問題の既定の重大度。パターンが重要度の一致グループを定義していない場合に使用されます。", "ProblemMatcherSchema.applyTo": "テキスト ドキュメントで報告された問題が、開いているドキュメントのみ、閉じられたドキュメントのみ、すべてのドキュメントのいずれに適用されるかを制御します。", "ProblemMatcherSchema.fileLocation": "問題パターンで報告されたファイル名を解釈する方法を定義します。", + "ProblemMatcherSchema.background": "バックグラウンド タスクでアクティブなマッチャーの開始と終了を追跡するパターン。", + "ProblemMatcherSchema.background.activeOnStart": "true に設定すると、タスクの開始時にバックグラウンド モニターがアクティブ モードになります。これは beginPattern と一致する行の発行と同等です。", + "ProblemMatcherSchema.background.beginsPattern": "出力内で一致すると、バックグラウンド タスクの開始が通知されます。", + "ProblemMatcherSchema.background.endsPattern": "出力内で一致すると、バックグラウンド タスクの終了が通知されます。", + "ProblemMatcherSchema.watching.deprecated": "watching プロパティは使用されなくなりました。代わりに background をご使用ください。", + "ProblemMatcherSchema.watching": "監視パターンの開始と終了を追跡するマッチャー。", "ProblemMatcherSchema.watching.activeOnStart": "true に設定すると、タスクの開始時にウォッチャーがアクティブ モードになります。これは beginPattern と一致する行の発行と同等です。", "ProblemMatcherSchema.watching.beginsPattern": "出力内で一致すると、ウォッチ中のタスクの開始が通知されます。", "ProblemMatcherSchema.watching.endsPattern": "出力内で一致すると、ウォッチ中のタスクの終了が通知されます。", diff --git a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json index 8da89f6115cfe..9872f49057d61 100644 --- a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -60,6 +60,7 @@ "editorBackground": "エディターの背景色。", "editorForeground": "エディターの既定の前景色。", "editorWidgetBackground": "検索/置換窓など、エディター ウィジェットの背景色。", + "editorWidgetBorder": "エディター ウィジェットの境界線の色。", "editorSelection": "エディターの選択範囲の色。", "editorInactiveSelection": "非アクティブなエディターの選択範囲の色。", "editorSelectionHighlight": "選択範囲と同じコンテンツの領域の色。", diff --git a/i18n/jpn/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/jpn/src/vs/workbench/api/node/extHostTreeViews.i18n.json index 8b6ad71cd4e6d..74c5f0eabd702 100644 --- a/i18n/jpn/src/vs/workbench/api/node/extHostTreeViews.i18n.json +++ b/i18n/jpn/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "treeView.notRegistered": "ID '{0}' のツリー ビューは登録されていません。", + "treeItem.notFound": "ID '{0}' のツリー項目は見つかりませんでした。", + "treeView.duplicateElement": " {0} 要素は既に登録されています。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/common/theme.i18n.json b/i18n/jpn/src/vs/workbench/common/theme.i18n.json index b361c556bdcec..d183c26792491 100644 --- a/i18n/jpn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/jpn/src/vs/workbench/common/theme.i18n.json @@ -32,6 +32,7 @@ "activityBarBadgeBackground": "アクティビティ通知バッジの背景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", "activityBarBadgeForeground": "アクティビティ通知バッジの前景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", "sideBarBackground": "サイド バーの背景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", + "sideBarForeground": "サイド バーの前景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", "sideBarTitleForeground": "サイド バーのタイトルの前景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", "sideBarSectionHeaderBackground": "サイド バーのセクション ヘッダーの背景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", "titleBarActiveForeground": "ウィンドウがアクティブな場合のタイトル バーの前景。現在、この色は macOS でのみサポートされているのでご注意ください。", diff --git a/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json index e69cb0fb627aa..d813d5f6c23c6 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "表示", "help": "ヘルプ", "file": "ファイル", + "developer": "開発者", "showEditorTabs": "開いているエディターをタブに表示するかどうかを制御します。", "editorTabCloseButton": "エディター タブの閉じるボタンの位置を制御するか、[off] に設定した場合に無効にします。", "showIcons": "開いているエディターをアイコンで表示するかどうかを制御します。これには、アイコンのテーマを有効にする必要もあります。", diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index e57fd60ee0de5..8943a8809bd0f 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "値のコピー", "copy": "コピー", + "copyAll": "すべてコピー", "copyStackTrace": "呼び出し履歴のコピー" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index af68e40b4aef2..d63fe387f50b0 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "デバッグ アダプターの実行可能ファイル '{0}' がありません。", "debugAdapterCannotDetermineExecutable": "デバッグ アダプター '{0}' の実行可能ファイルを判別できません。", "debugType": "構成の種類。", + "debugTypeNotRecognised": "デバッグの種類は認識されませんでした。対応するデバッグの拡張機能がインストールされており、有効になっていることを確認してください。", "node2NotSupported": "\"node2\" はサポートされていません。代わりに \"node\" を使用し、\"protocol\" 属性を \"inspector\" に設定してください。", "debugName": "構成の名前。起動構成のドロップダウン メニューに表示されます。", "debugRequest": "構成の要求の種類。\"launch\" または \"attach\" です。", diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..e5b2af33ec37b 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "キーバインド間の競合を回避するために、他のキーマップを無効にしますか?", + "yes": "はい", + "no": "いいえ" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 15c3aee15db3c..9356fa119aaae 100644 --- a/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "言語に対するファイルの関連付け (例 \"*.extension\": \"html\") を構成します。これらの関連付けは、インストールされている言語の既定の関連付けより優先されます。", "encoding": "ファイルの読み取り/書き込みで使用する既定の文字セット エンコーディング。", "autoGuessEncoding": "有効な場合、ファイルを開くときに文字セット エンコードを推測します", - "eol": "既定の改行文字。", "trimTrailingWhitespace": "有効にすると、ファイルの保存時に末尾の空白をトリミングします。", "insertFinalNewline": "有効にすると、ファイルの保存時に最新の行を末尾に挿入します。", "files.autoSave.off": "ダーティ ファイルを自動的に保存することはしません。", @@ -27,6 +26,8 @@ "autoSaveDelay": "ダーティ ファイルの自動保存の遅延をミリ秒単位で制御します。'files.autoSave' が '{0}' に設定されている場合のみ適用されます", "watcherExclude": "ファイル モニタリングから除外するファイル パスの glob パターンを構成します。この設定を変更すると、再起動が必要になります。始動時に Code が消費する CPU 時間が多い場合は、大規模なフォルダーを除外して初期ロードを減らせます。", "hotExit.off": "Hot Exit を無効にします。", + "hotExit.onExit": "アプリケーションが閉じると (Windows/Linux で最後のウィンドウが閉じるとき、または workbench.action.quit コマンドがトリガーされるとき (コマンド パレット、キー バインド、メニュー))、Hot Exit がトリガーされます。バックアップされているすべてのウィンドウは、次の起動時に復元されます。", + "hotExit.onExitAndWindowClose": "アプリケーションが閉じると (Windows/Linux で最後のウィンドウが閉じるとき、または workbench.action.quit コマンドがトリガーするとき (コマンド パレット、キー バインド、メニュー))、Hot Exit がトリガーされます。また、フォルダーが開かれているウィンドウについても、それが最後のウィンドウかどうかに関係なく、Hot Exit がトリガーされます。フォルダーが開かれていないウィンドウはすべて、次回の起動時に復元されます。フォルダーのウィンドウをシャットダウン前と同じ状態に復元するには、\"window.reopenFolders\" を \"all\" に設定します。", "hotExit": "エディターを終了するときに保存を確認するダイアログを省略し、保存されていないファイルをセッション後も保持するかどうかを制御します。", "defaultLanguage": "新しいファイルに割り当てられる既定の言語モード。", "editorConfigurationTitle": "エディター", diff --git a/i18n/jpn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index a71fcb6fc945c..e14e57a90eb79 100644 --- a/i18n/jpn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,11 @@ // Do not edit this file. It is machine generated. { "slow": "スタートアップの遅延が検出されました", - "slow.detail": "スタートアップが遅かったとのこと、申し訳ございません。プロファイルを有効にして、'{0}' を再起動し、プロファイルを共有してください。スタートアップの改善のために参考にさせていただきます。" + "slow.detail": "スタートアップが遅かったとのこと、申し訳ございません。プロファイルを有効にして、'{0}' を再起動し、プロファイルを共有してください。スタートアップの改善のために参考にさせていただきます。", + "prof.message": "プロファイルが正常に作成されました。", + "prof.detail": "案件を作成し、手動で次のファイルを添付してください:\\n{0}", + "prof.restartAndFileIssue": "問題を作成して再起動", + "prof.restart": "再起動", + "prof.thanks": "ご協力いただき、ありがとうございます。", + "prof.detail.restart": "'{0}' を引き続き使用するには、最後の再起動が必要です。 改めてあなたの貢献に感謝します。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 0a35cdb1be9b0..dba4d278b1447 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "設定を書き込めません。ファイル内のエラー/警告を修正してからもう一度お試しください。", "editTtile": "編集", "replaceDefaultValue": "設定を置換", "copyDefaultValue": "設定にコピー", diff --git a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index b650b0b0eb32f..d45b84374594d 100644 --- a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "Git を表示", + "installAdditionalSCMProviders": "その他の SCM プロバイダーをインストール...", "source control": "ソース管理", "toggleSCMViewlet": "SCM を表示", "view": "表示" diff --git a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index d53de2c62b070..d93c7d2fb84f6 100644 --- a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "その他の SCM プロバイダーをインストール...", "switch provider": "SCM プロバイダーの切り替え..." } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index c0432625724e1..f7db07a2e2d5c 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks" + "entryAriaLabel": "{0}, tasks", + "workspace": "ワークスペースから", + "extension": "拡張機能から" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json index 37bbf2ce2e01a..1e77cbdffdfe9 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -5,6 +5,6 @@ // Do not edit this file. It is machine generated. { "tasksAriaLabel": "再開するタスクの名前を入力します", - "noTasksMatching": "No tasks matching", + "noTasksMatching": "一致するタスクがありません", "noTasksFound": "再開するタスクはありません" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json index 99543dd018aa6..5a397f34e036d 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -5,6 +5,6 @@ // Do not edit this file. It is machine generated. { "tasksAriaLabel": "実行するタスクの名前を入力します", - "noTasksMatching": "No tasks matching", + "noTasksMatching": "一致するタスクがありません", "noTasksFound": "タスクが見つかりません" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 12b9c699bf24f..440b92fd91d74 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,6 @@ { "TerminalTaskSystem.unknownError": "タスクの実行中に不明なエラーが発生しました。詳細については、タスク出力ログを参照してください。", "TerminalTaskSystem.terminalName": "タスク - {0}", - "TerminalTaskSystem": "UNC ドライブでシェル コマンドを実行できません。" + "TerminalTaskSystem": "UNC ドライブでシェル コマンドを実行できません。", + "unkownProblemMatcher": "問題マッチャー {0} は解決できませんでした。マッチャーは無視されます" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index 6f9be6076a6bf..0cc1f921982e6 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "タスクの実行中に不明なエラーが発生しました。詳細については、タスク出力ログを参照してください。", "TaskRunnerSystem.watchingBuildTaskFinished": "\nビルド タスクのウォッチが終了しました。", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\nユーザー要求ごとにタスク '{0}' が終了しました。" + "TaskRunnerSystem.cancelRequested": "\nユーザー要求ごとにタスク '{0}' が終了しました。", + "unkownProblemMatcher": "問題マッチャー {0} は解決できませんでした。マッチャーは無視されます" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 799b12a797bdc..e7930c9cd7a69 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -26,5 +26,7 @@ "workbench.action.terminal.scrollUp": "上にスクロール (行)", "workbench.action.terminal.scrollUpPage": "スクロール アップ (ページ)", "workbench.action.terminal.scrollToTop": "一番上にスクロール", - "workbench.action.terminal.clear": "クリア" + "workbench.action.terminal.clear": "クリア", + "workbench.action.terminal.allowWorkspaceShell": "ワークスペースでシェルを構成することを許可する", + "workbench.action.terminal.disallowWorkspaceShell": "ワークスペースでシェルを構成することを許可しない" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 89ac9d8c928e1..7592dde26b53f 100644 --- a/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,6 +6,7 @@ { "selectTheme.label": "配色テーマ", "installColorThemes": "その他の配色テーマをインストール...", + "themes.selectTheme": "配色テーマの選択 (上/下キーでプレビュー可能)", "selectIconTheme.label": "ファイル アイコンのテーマ", "installIconThemes": "その他のファイル アイコンのテーマをインストール...", "noIconThemeLabel": "なし", diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 587eecb5f9d51..950f340d9ae19 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,18 +11,25 @@ "welcomePage.openFolder": "フォルダーを開く...", "welcomePage.cloneGitRepository": "Git リポジトリを複製...", "welcomePage.recent": "最近", + "welcomePage.moreRecent": "その他", "welcomePage.noRecentFolders": "最近使用したフォルダーなし", "welcomePage.help": "ヘルプ", + "welcomePage.keybindingsCheatsheet": "印刷可能なキーボードのチートシート", "welcomePage.introductoryVideos": "紹介ビデオ", "welcomePage.productDocumentation": "製品ドキュメント", "welcomePage.gitHubRepository": "GitHub リポジトリ", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "起動時にウェルカム ページを表示", "welcomePage.customize": "カスタマイズする", + "welcomePage.installExtensionPacks": "ツールと言語", + "welcomePage.installExtensionPacksDescription": "{0} と {1} のサポートをインストールする ", + "welcomePage.moreExtensions": "その他", "welcomePage.installKeymapDescription": "キーボード ショートカットをインストールします", + "welcomePage.installKeymapExtension": "{0} と {1} のキーボード ショートカットをインストール", "welcomePage.others": "その他", "welcomePage.colorTheme": "配色テーマ", "welcomePage.colorThemeDescription": "エディターとコードの外観を自由に設定します", + "welcomePage.learn": "学ぶ", "welcomePage.showCommands": "すべてのコマンドの検索と実行", "welcomePage.showCommandsDescription": "コントロール パネルからコマンドを検索してすばやくアクセスします ({0})", "welcomePage.interfaceOverview": "インターフェイスの概要", diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 07b2eb85861d5..eba406025bbb4 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,27 @@ // Do not edit this file. It is machine generated. { "welcomePage": "ようこそ", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "{0} のサポートは既にインストールされています。", + "welcomePage.willReloadAfterInstallingExtensionPack": "{0} のサポートをインストールした後、ウィンドウが再度読み込まれます。", + "welcomePage.installingExtensionPack": "{0} のサポートをインストール...", + "welcomePage.extensionPackNotFound": "ID {1} のサポート {0} は見つかりませんでした。", "welcomePage.keymapAlreadyInstalled": "キーボード ショートカット {0} は既にインストールされています。", "welcomePage.willReloadAfterInstallingKeymap": "キーボード ショートカット {0} をインストールした後、ウィンドウが再度読み込まれます。", "welcomePage.installingKeymap": "{0} のキーボード ショートカットをインストールしています...", "welcomePage.keymapNotFound": "ID {1} のキーボード ショートカット {0} は見つかりませんでした。", "welcome.title": "ようこそ", + "welcomePage.extensionListSeparator": ",", + "welcomePage.installedExtension": "{0} (インストール済み) ", "ok": "OK", - "cancel": "キャンセル" + "cancel": "キャンセル", + "welcomePage.quickLinkBackground": "ウェルカム ページのクイック リンクの背景色。", + "welcomePage.quickLinkHoverBackground": "ウェルカム ページのクイック リンクのホバー背景色。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 0c7056bc9fcc8..81d7a645e3290 100644 --- a/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/jpn/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -6,6 +6,7 @@ { "open": "設定を開く", "close": "閉じる", + "saveAndRetry": "設定を保存して再試行", "errorUnknownKey": "構成ファイルに書き込めません (不明なキー)", "errorInvalidTarget": "構成ファイルに書き込めません (無効なターゲット)", "errorNoWorkspaceOpened": "開いているフォルダーがないため、設定を書き込めません。最初にフォルダーを開いてから、もう一度お試しください。", diff --git a/i18n/kor/extensions/markdown/out/extension.i18n.json b/i18n/kor/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/kor/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/kor/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/kor/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/extensions/merge-conflict/package.i18n.json b/i18n/kor/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/extensions/npm/package.i18n.json b/i18n/kor/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/kor/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index def2cd28d67c8..4266985efc958 100644 --- a/i18n/kor/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/kor/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "이미지가 너무 커서 편집기에 표시할 수 없습니다. ", - "resourceOpenExternalButton": "이미지 열기", - "resourceOpenExternalText": " 외부 프로그램을 사용할까요?", "nativeBinaryError": "파일이 이진이거나 매우 크거나 지원되지 않는 텍스트 인코딩을 사용하기 때문에 편집기에서 표시되지 않습니다.", "sizeB": "{0}B", "sizeKB": "{0}KB", diff --git a/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json index 185383233538c..18aff6704bea0 100644 --- a/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -40,7 +40,6 @@ "formatOnType": "입력 후 편집기에서 자동으로 줄의 서식을 지정할지 여부를 제어합니다.", "formatOnPaste": "붙여넣은 콘텐츠의 서식을 편집기에서 자동으로 지정할지 여부를 제어합니다. 포맷터는 반드시 사용할 수 있어야 하며 문서에서 범위의 서식을 지정할 수 있어야 합니다.", "suggestOnTriggerCharacters": "트리거 문자를 입력할 때 제안을 자동으로 표시할지 여부를 제어합니다.", - "acceptSuggestionOnEnter": "'Tab' 키 외에 'Enter' 키에 대한 제안도 허용할지를 제어합니다. 새 줄을 삽입하는 동작과 제안을 허용하는 동작 간의 모호함을 없앨 수 있습니다.", "acceptSuggestionOnCommitCharacter": "커밋 문자에 대한 제안을 허용할지를 제어합니다. 예를 들어 JavaScript에서는 세미콜론(';')이 제안을 허용하고 해당 문자를 입력하는 커밋 문자일 수 있습니다.", "snippetSuggestions": "코드 조각이 다른 추천과 함께 표시되는지 여부 및 정렬 방법을 제어합니다.", "emptySelectionClipboard": "선택 영역 없이 현재 줄 복사 여부를 제어합니다.", diff --git a/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..eb7148607bdaa --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "'{0}'에 대한 정의를 찾을 수 없습니다.", + "generic.noResults": "정의를 찾을 수 없음", + "meta.title": "– {0} 정의", + "actions.goToDecl.label": "정의로 이동", + "actions.goToDeclToSide.label": "측면에서 정의 열기", + "actions.previewDecl.label": "정의 피킹(Peeking)", + "goToImplementation.noResultWord": "'{0}'에 대한 구현을 찾을 수 없습니다.", + "goToImplementation.generic.noResults": "구현을 찾을 수 없습니다.", + "meta.implementations.title": " – {0} 개 구현", + "actions.goToImplementation.label": "구현으로 이동", + "actions.peekImplementation.label": "구현 미리 보기", + "goToTypeDefinition.noResultWord": "'{0}'에 대한 형식 정의를 찾을 수 없습니다.", + "goToTypeDefinition.generic.noResults": "형식 정의를 찾을 수 없습니다.", + "meta.typeDefinitions.title": "– {0} 형식 정의", + "actions.goToTypeDefinition.label": "형식 정의로 이동", + "actions.peekTypeDefinition.label": "형식 정의 미리 보기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..57b4929798ff4 --- /dev/null +++ b/i18n/kor/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "{0}개 정의를 표시하려면 클릭하세요." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json index 603999dbae9f4..4c30f4bc75c5c 100644 --- a/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "보기", "help": "도움말", "file": "파일", + "developer": "개발자", "showEditorTabs": "열려 있는 편집기를 탭에서 표시할지 여부를 제어합니다.", "editorTabCloseButton": "편집기의 탭 닫기 단추의 위치를 제어하거나 'off'로 설정된 경우 이 단추를 사용하지 않도록 설정합니다.", "showIcons": "열린 편집기를 아이콘과 함께 표시할지 여부를 제어합니다. 이를 위해서는 아이콘 테마도 사용하도록 설정해야 합니다.", diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..86d18d9fce388 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "키 바인딩 간 충돌을 피하기 위해 다른 키 맵을 사용하지 않도록 설정할까요?", + "yes": "예", + "no": "아니요" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index f9b799b1655ec..fe8ef9500cec1 100644 --- a/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "파일과 언어의 연결을 구성하세요(예: \"*.extension\": \"html\"). 이러한 구성은 설치된 언어의 기본 연결보다 우선 순위가 높습니다.", "encoding": "파일을 읽고 쓸 때 사용할 기본 문자 집합 인코딩입니다.", "autoGuessEncoding": "사용하도록 설정하는 경우 파일을 열 때 문자 집합 인코딩을 추측합니다.", - "eol": "줄 바꿈 문자의 기본 끝입니다.", "trimTrailingWhitespace": "사용하도록 설정되면 파일을 저장할 때 후행 공백이 잘립니다.", "insertFinalNewline": "사용하도록 설정되면 저장할 때 파일 끝에 마지막 줄바꿈을 삽입합니다.", "files.autoSave.off": "더티 파일이 자동으로 저장되지 않습니다.", diff --git a/i18n/kor/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 4b931297269d4..ef1cdc9bc0949 100644 --- a/i18n/kor/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,9 @@ // Do not edit this file. It is machine generated. { "slow": "느린 시작 감지됨", - "slow.detail": "방금 느리게 시작되었습니다. 프로파일링을 사용하도록 설정한 상태로 '{0}'을(를) 다시 시작하세요. 프로필을 공유해 주시면 다시 빠르게 시작될 수 있도록 최선을 다하겠습니다." + "slow.detail": "방금 느리게 시작되었습니다. 프로파일링을 사용하도록 설정한 상태로 '{0}'을(를) 다시 시작하세요. 프로필을 공유해 주시면 다시 빠르게 시작될 수 있도록 최선을 다하겠습니다.", + "prof.message": "프로필을 만들었습니다.", + "prof.detail": "문제를 발생시키고 다음 파일을 수동으로 첨부하세요.\n{0}", + "prof.restartAndFileIssue": "문제 만들기 및 다시 시작", + "prof.restart": "다시 시작" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index cb5666d331a15..a436e5a707b6c 100644 --- a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,6 +5,11 @@ // Do not edit this file. It is machine generated. { "welcomePage": "시작", + "welcomePage.typeScript": "TypeScript", + "welcomePage.php": "PHP", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", "welcomePage.keymapAlreadyInstalled": "{0} 바로 가기 키가 이미 설치되어 있습니다.", "welcomePage.willReloadAfterInstallingKeymap": "{0} 바로 가기 키를 설치한 후 창이 다시 로드됩니다.", "welcomePage.installingKeymap": "{0} 바로 가기 키를 설치하는 중...", diff --git a/i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json new file mode 100644 index 0000000000000..74a80b4280d24 --- /dev/null +++ b/i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "activeEditorShort": "e.g. meuArquivo.txt", + "activeEditorMedium": "e.g. minhaPasta/meuArquivo.txt", + "activeEditorLong": "e.g. /Usuarios/Desenvolvimento/meuProjeto/minhaPasta/meuArquivo.txt", + "rootName": "e.g. meuProjeto", + "rootPath": "e.g. /Usuarios/Desenvolvimento/meuProjeto", + "appName": "e.g. VS Code", + "dirty": "Um indicador de alteração se o editor ativo foi alterado", + "separator": "um separador condicional (' - ') que somente é mostrado quando envolvido por variáveis com valores", + "assocLabelFile": "Arquivos com Extensão", + "assocDescriptionFile": "Mapear todos arquivos que correspondem ao padrão global no seu nome de arquivo à linguagem com o identificador dado", + "assocLabelPath": "Arquivos com Caminho", + "assocDescriptionPath": "Mapear todos os arquivos que correspondem ao caminho absoluto global no seu caminho à linguagem com o identificador dado", + "fileLabel": "Arquivos por Extensão", + "fileDescription": "Combina todos os arquivos de uma extensão de arquivo específica.", + "filesLabel": "Arquivos com Várias Extensões", + "filesDescription": "Combina todos os arquivos com qualquer uma das extensões de arquivo.", + "derivedLabel": "Arquivos com Irmãos por Nome", + "derivedDescription": "Combina arquivos que têm irmãos com o mesmo nome, mas uma extensão diferente.", + "topFolderLabel": "Pasta por Nome (Nível Superior)", + "topFolderDescription": "Combina uma pasta de nível superior com um nome específico.", + "topFoldersLabel": "Pastas com Vários Nomes (Nível Superior)", + "topFoldersDescription": "Combina várias pastas de nível superior.", + "folderLabel": "Pasta por Nome (Qualquer Local)", + "folderDescription": "Combina uma pasta com um nome específico em qualquer local.", + "falseDescription": "Desabilita o padrão.", + "trueDescription": "Habilita o padrão.", + "siblingsDescription": "Combina arquivos que têm irmãos com o mesmo nome, mas uma extensão diferente.", + "languageSpecificEditorSettings": "Configurações do editor especificas para a linguagem", + "languageSpecificEditorSettingsDescription": "Sobrescrever as configurações do editor para a linguagem" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/css/client/out/cssMain.i18n.json b/i18n/ptb/extensions/css/client/out/cssMain.i18n.json new file mode 100644 index 0000000000000..a649796227bda --- /dev/null +++ b/i18n/ptb/extensions/css/client/out/cssMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cssserver.name": "Servidor de linguagem CSS" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/css/package.i18n.json b/i18n/ptb/extensions/css/package.i18n.json new file mode 100644 index 0000000000000..de011d44dcee1 --- /dev/null +++ b/i18n/ptb/extensions/css/package.i18n.json @@ -0,0 +1,67 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "css.lint.argumentsInColorFunction.desc": "Número inválido de parâmetros", + "css.lint.boxModel.desc": "Não use largura ou altura ao usar preenchimento ou borda", + "css.lint.compatibleVendorPrefixes.desc": "Ao usar um prefixo específico de fornecedor, certifique-se de também incluir todas as outras propriedades específicas do fornecedor", + "css.lint.duplicateProperties.desc": "Não use as definições de estilo duplicadas", + "css.lint.emptyRules.desc": "Não use conjuntos de regra em branco", + "css.lint.float.desc": "Evite usar 'float'. Floats levam a CSS frágil, que é fácil de quebrar se um aspecto do layout for alterado.", + "css.lint.fontFaceProperties.desc": "A regra @font-face deve definir propriedades 'src' e 'font-family'", + "css.lint.hexColorLength.desc": "Cores hexadecimais devem consistir em três ou seis números hexadecimais", + "css.lint.idSelector.desc": "Seletores não devem conter IDs, pois essas regras estão firmemente acopladas ao HTML.", + "css.lint.ieHack.desc": "IE hacks somente são necessários ao dar suporte ao IE7 e mais antigos", + "css.lint.important.desc": "Evite usar !important. Esta é uma indicação de que a especificidade do CSS inteiro saiu de controle e precisa ser fatorada novamente.", + "css.lint.importStatement.desc": "Instruções de importação não carregam em paralelo", + "css.lint.propertyIgnoredDueToDisplay.desc": "Propriedade ignorada devido à exibição. Por exemplo, com 'display: inline', as propriedades width, height, margin-top, margin-bottom e float não têm efeito", + "css.lint.universalSelector.desc": "O seletor universal (*) é conhecido por ser lento", + "css.lint.unknownProperties.desc": "Propriedade desconhecida.", + "css.lint.unknownVendorSpecificProperties.desc": "Propriedade específica do fornecedor desconhecida.", + "css.lint.vendorPrefix.desc": "Ao usar um prefixo específico do fornecedor, inclua também a propriedade padrão", + "css.lint.zeroUnits.desc": "Nenhuma unidade para zero é necessária", + "css.validate.desc": "Habilita ou desabilita todas as validações", + "less.lint.argumentsInColorFunction.desc": "Número inválido de parâmetros", + "less.lint.boxModel.desc": "Não use largura ou altura ao usar preenchimento ou borda", + "less.lint.compatibleVendorPrefixes.desc": "Ao usar um prefixo específico de fornecedor, certifique-se de também incluir todas as outras propriedades específicas do fornecedor", + "less.lint.duplicateProperties.desc": "Não use as definições de estilo duplicadas", + "less.lint.emptyRules.desc": "Não use conjuntos de regra em branco", + "less.lint.float.desc": "Evite usar 'float'. Floats levam a CSS frágil, que é fácil de quebrar se um aspecto do layout for alterado.", + "less.lint.fontFaceProperties.desc": "A regra @font-face deve definir propriedades 'src' e 'font-family'", + "less.lint.hexColorLength.desc": "Cores hexadecimais devem consistir em três ou seis números hexadecimais", + "less.lint.idSelector.desc": "Seletores não devem conter IDs, pois essas regras estão firmemente acopladas ao HTML.", + "less.lint.ieHack.desc": "IE hacks somente são necessários ao dar suporte ao IE7 e mais antigos", + "less.lint.important.desc": "Evite usar !important. Esta é uma indicação de que a especificidade do CSS inteiro saiu de controle e precisa ser fatorada novamente.", + "less.lint.importStatement.desc": "Instruções de importação não carregam em paralelo", + "less.lint.propertyIgnoredDueToDisplay.desc": "Propriedade ignorada devido à exibição. Por exemplo, com 'display: inline', as propriedades width, height, margin-top, margin-bottom e float não têm efeito", + "less.lint.universalSelector.desc": "O seletor universal (*) é conhecido por ser lento", + "less.lint.unknownProperties.desc": "Propriedade desconhecida.", + "less.lint.unknownVendorSpecificProperties.desc": "Propriedade específica do fornecedor desconhecida.", + "less.lint.vendorPrefix.desc": "Ao usar um prefixo específico do fornecedor, inclua também a propriedade padrão", + "less.lint.zeroUnits.desc": "Nenhuma unidade para zero é necessária", + "less.validate.desc": "Habilita ou desabilita todas as validações", + "scss.lint.argumentsInColorFunction.desc": "Número inválido de parâmetros", + "scss.lint.boxModel.desc": "Não use largura ou altura ao usar preenchimento ou borda", + "scss.lint.compatibleVendorPrefixes.desc": "Ao usar um prefixo específico de fornecedor, certifique-se de também incluir todas as outras propriedades específicas do fornecedor", + "scss.lint.duplicateProperties.desc": "Não use as definições de estilo duplicadas", + "scss.lint.emptyRules.desc": "Não use conjuntos de regra em branco", + "scss.lint.float.desc": "Evite usar 'float'. Floats levam a CSS frágil, que é fácil de quebrar se um aspecto do layout for alterado.", + "scss.lint.fontFaceProperties.desc": "A regra @font-face deve definir propriedades 'src' e 'font-family'", + "scss.lint.hexColorLength.desc": "Cores hexadecimais devem consistir em três ou seis números hexadecimais", + "scss.lint.idSelector.desc": "Seletores não devem conter IDs, pois essas regras estão firmemente acopladas ao HTML.", + "scss.lint.ieHack.desc": "IE hacks somente são necessários ao dar suporte ao IE7 e mais antigos", + "scss.lint.important.desc": "Evite usar !important. Esta é uma indicação de que a especificidade do CSS inteiro saiu de controle e precisa ser fatorada novamente.", + "scss.lint.importStatement.desc": "Instruções de importação não carregam em paralelo", + "scss.lint.propertyIgnoredDueToDisplay.desc": "Propriedade ignorada devido à exibição. Por exemplo, com 'display: inline', as propriedades width, height, margin-top, margin-bottom e float não têm efeito", + "scss.lint.universalSelector.desc": "O seletor universal (*) é conhecido por ser lento", + "scss.lint.unknownProperties.desc": "Propriedade desconhecida.", + "scss.lint.unknownVendorSpecificProperties.desc": "Propriedade específica do fornecedor desconhecida.", + "scss.lint.vendorPrefix.desc": "Ao usar um prefixo específico do fornecedor, inclua também a propriedade padrão", + "scss.lint.zeroUnits.desc": "Nenhuma unidade para zero é necessária", + "scss.validate.desc": "Habilita ou desabilita todas as validações", + "less.colorDecorators.enable.desc": "Habilita ou desabilita decoradores de cores", + "scss.colorDecorators.enable.desc": "Habilita ou desabilita decoradores de cores", + "css.colorDecorators.enable.desc": "Habilita ou desabilita decoradores de cores" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/extension-editing/out/packageDocumentHelper.i18n.json b/i18n/ptb/extensions/extension-editing/out/packageDocumentHelper.i18n.json new file mode 100644 index 0000000000000..8505afd6d4a89 --- /dev/null +++ b/i18n/ptb/extensions/extension-editing/out/packageDocumentHelper.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "languageSpecificEditorSettings": "Configurações do editor especificas para a linguagem", + "languageSpecificEditorSettingsDescription": "Sobrescrever as configurações do editor para a linguagem" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/askpass-main.i18n.json b/i18n/ptb/extensions/git/out/askpass-main.i18n.json new file mode 100644 index 0000000000000..280b14bd0d70c --- /dev/null +++ b/i18n/ptb/extensions/git/out/askpass-main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "missOrInvalid": "Credenciais ausentes ou inválidas." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/commands.i18n.json b/i18n/ptb/extensions/git/out/commands.i18n.json new file mode 100644 index 0000000000000..ab5667e260b82 --- /dev/null +++ b/i18n/ptb/extensions/git/out/commands.i18n.json @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tag at": "Etiqueta em {0}", + "remote branch at": "Ramo remoto em {0}", + "repourl": "URL do repositório", + "parent": "Diretório pai", + "cloning": "Clonando repositório do Git...", + "openrepo": "Abrir Repositório", + "proposeopen": "Gostaria de abrir o repositório clonado?", + "confirm revert": "Tem certeza que deseja reverter as alterações selecionadas em {0}?", + "revert": "Reverter as alterações", + "confirm discard": "Tem certeza que deseja descartar as alterações em {0}?", + "confirm discard multiple": "Tem certeza que deseja descartar as alterações em {0} arquivos?", + "discard": "Descartar alterações", + "confirm discard all": "Tem certeza que deseja descartar TODAS as alterações? Isso é IRREVERSÍVEL!", + "discardAll": "Descartar TODAS as alterações", + "no staged changes": "Não há nenhuma modificação escalonada para confirmar.\n\nGostaria de escalonar automaticamente todas as suas alterações e confirmá-las diretamente?", + "yes": "Sim", + "always": "Sempre", + "no changes": "Não há mudanças para confirmar.", + "commit message": "Confirmar mensagem", + "provide commit message": "Por favor, forneça uma mensagem de commit", + "branch name": "Nome do Ramo", + "provide branch name": "Por favor, forneça um nome de ramo", + "no remotes to pull": "O seu repositório não possui remotos configurados para efetuar pull.", + "no remotes to push": "O seu repositório não possui remotos configurados para efetuar push.", + "nobranch": "Por favor, faça checkout em um ramo para fazer push em um remoto.", + "pick remote": "Pegue um remoto para publicar o ramo '{0}':", + "sync is unpredictable": "Esta ação vai fazer push e pull nos commits de e para '{0}'.", + "ok": "OK", + "never again": "Ok, Nunca Mostrar Novamente", + "no remotes to publish": "Seu repositório não possui remotos configurados para publicação.", + "disabled": "Git está desativado ou não é suportado neste espaço de trabalho", + "clean repo": "Por favor, limpe sua árvore de trabalho do repositório antes de fazer check-out.", + "cant push": "Não pode empurrar referências para remoto. Execute 'Pull' primeiro para integrar suas alterações.", + "git error details": "Git: {0}", + "git error": "Erro de Git", + "open git log": "Abrir Histórico do Git" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/main.i18n.json b/i18n/ptb/extensions/git/out/main.i18n.json new file mode 100644 index 0000000000000..ae1dee2603294 --- /dev/null +++ b/i18n/ptb/extensions/git/out/main.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "using git": "Usando git {0} de {1}", + "updateGit": "Atualizar o Git", + "neverShowAgain": "Não mostrar novamente", + "git20": "Você parece ter o git {0} instalado. Code funciona melhor com git > = 2" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/model.i18n.json b/i18n/ptb/extensions/git/out/model.i18n.json new file mode 100644 index 0000000000000..717d2b4364a76 --- /dev/null +++ b/i18n/ptb/extensions/git/out/model.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "open": "Abrir", + "merge changes": "Mesclar Alterações", + "staged changes": "Alterações em Etapas", + "changes": "Alterações", + "ok": "OK", + "neveragain": "Nunca Mostrar Novamente", + "huge": "O repositório git em '{0}' tem muitas atualizações ativas, somente um subconjunto de funcionalidades do Git será habilitado." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/scmProvider.i18n.json b/i18n/ptb/extensions/git/out/scmProvider.i18n.json new file mode 100644 index 0000000000000..490dda3603e0d --- /dev/null +++ b/i18n/ptb/extensions/git/out/scmProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commit": "Confirmar" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/statusbar.i18n.json b/i18n/ptb/extensions/git/out/statusbar.i18n.json new file mode 100644 index 0000000000000..0b6ee800ffa78 --- /dev/null +++ b/i18n/ptb/extensions/git/out/statusbar.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "checkout": "Checkout...", + "sync changes": "Sincronizar alterações", + "publish changes": "Publicar alterações", + "syncing changes": "Sincronizando alterações..." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/package.i18n.json b/i18n/ptb/extensions/git/package.i18n.json new file mode 100644 index 0000000000000..0c79f1929bb26 --- /dev/null +++ b/i18n/ptb/extensions/git/package.i18n.json @@ -0,0 +1,48 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.clone": "Clonar", + "command.init": "Inicializar Repositório", + "command.refresh": "Atualizar", + "command.openChange": "Abrir alterações", + "command.openFile": "Abrir Arquivo", + "command.stage": "Estagiar Alterações", + "command.stageAll": "Estagiar Todas Alterações", + "command.stageSelectedRanges": "Estagiar Faixas Selecionadas", + "command.revertSelectedRanges": "Reverter Faixas Selecionadas", + "command.unstage": "Desestagiar Alterações", + "command.unstageAll": "Desestagiar Todas Alterações", + "command.unstageSelectedRanges": "Desestagiar Faixas Selecionadas", + "command.clean": "Descartar Alterações", + "command.cleanAll": "Descartar Todas as Alterações", + "command.commit": "Confirmar", + "command.commitStaged": "Confirmar os preparados", + "command.commitStagedSigned": "Confirmar Estagiados (Desconectado)", + "command.commitAll": "Confirmar tudo", + "command.commitAllSigned": "Confirmar Tudo (Desconectado)", + "command.undoCommit": "Desfazer Ultima Confirmação", + "command.checkout": "Fazer checkout para...", + "command.branch": "Criar Ramificação...", + "command.pull": "Efetuar pull", + "command.pullRebase": "Efetuar pull (Rebase)", + "command.push": "Enviar por push", + "command.pushTo": "Enviar por push para...", + "command.sync": "Sincronizar", + "command.publish": "Publicar", + "command.showOutput": "Mostrar Saída do Git", + "config.enabled": "Se o git estiver habilitado", + "config.path": "Caminho para o executável do git", + "config.autorefresh": "Se a atualização automática estiver habilitada", + "config.autofetch": "Se a recuperação automática estiver habilitada", + "config.enableLongCommitWarning": "Se mensagens longas de confirmação devem ter aviso", + "config.confirmSync": "Confirmar antes de sincronizar repositórios git", + "config.countBadge": "Controla o contador de distintivos do git. 'todos' considera todas as alterações. 'rastreado' considera apenas as alterações controladas. 'desligado' desliga o contador.", + "config.checkoutType": "Controla quais tipos de ramos são listados quando executando `Checkout para... `. `todos` mostra todas as referências, `local` mostra apenas os ramos locais, `etiqueta` mostra apenas etiquetas e `remoto` mostra apenas os ramos remotos.", + "config.ignoreLegacyWarning": "Ignora o aviso de Git legado", + "config.ignoreLimitWarning": "Ignora o aviso quando houver muitas alterações em um repositório", + "config.defaultCloneDirectory": "O local padrão onde clonar um repositório git", + "config.enableSmartCommit": "Confirme todas as alterações quando não há modificações escalonadas." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/grunt/out/main.i18n.json b/i18n/ptb/extensions/grunt/out/main.i18n.json new file mode 100644 index 0000000000000..909b68937c6e8 --- /dev/null +++ b/i18n/ptb/extensions/grunt/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Auto detecção de Grunt falhou com erro: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/grunt/package.i18n.json b/i18n/ptb/extensions/grunt/package.i18n.json new file mode 100644 index 0000000000000..d79ce76907e73 --- /dev/null +++ b/i18n/ptb/extensions/grunt/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.grunt.autoDetect": "Controla se a deteção automática de tarefas do Grunt está ligado ou desligado. Padrão é ligado." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/gulp/out/main.i18n.json b/i18n/ptb/extensions/gulp/out/main.i18n.json new file mode 100644 index 0000000000000..51b05e4013eff --- /dev/null +++ b/i18n/ptb/extensions/gulp/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Auto detecção de gulp falhou com erro: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/gulp/package.i18n.json b/i18n/ptb/extensions/gulp/package.i18n.json new file mode 100644 index 0000000000000..fae292414c287 --- /dev/null +++ b/i18n/ptb/extensions/gulp/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.gulp.autoDetect": "Controla se a detecção automática de tarefas Gulp está ativada ou desativada. Por padrão, é ativado." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/html/client/out/htmlMain.i18n.json b/i18n/ptb/extensions/html/client/out/htmlMain.i18n.json new file mode 100644 index 0000000000000..314d1e5c58ac0 --- /dev/null +++ b/i18n/ptb/extensions/html/client/out/htmlMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "htmlserver.name": "Servidor de Linguagem HTML" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/html/package.i18n.json b/i18n/ptb/extensions/html/package.i18n.json new file mode 100644 index 0000000000000..2f255a02e7f1c --- /dev/null +++ b/i18n/ptb/extensions/html/package.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.format.enable.desc": "Ativa/desativa o formatador HTML padrão (requer reinicialização)", + "html.format.wrapLineLength.desc": "Quantidade máxima de caracteres por linha (0 = desativar).", + "html.format.unformatted.desc": "Lista de tags, separados por vírgula, que não deveria ser reformatada. o padrão é 'nulo' para todas as tags listadas em https://www.w3.org/TR/html5/dom.html#phrasing-content.", + "html.format.contentUnformatted.desc": "Lista de tags, separada por vírgula, onde o conteúdo não deve ser reformatado. o padrão é 'nulo' para a tag 'pré'.", + "html.format.indentInnerHtml.desc": "Indentar secões e .", + "html.format.preserveNewLines.desc": "Se quebras de linha existentes antes de elementos deveriam ser preservadas. Só funciona antes de elementos, não dentro de rótulos ou para texto.", + "html.format.maxPreserveNewLines.desc": "Número máximo de quebras de linha a serem preservadas em um bloco. Use 'null' para ilimitado.", + "html.format.indentHandlebars.desc": "Formatar e indentar {{#foo}} e {{/ foo}}.", + "html.format.endWithNewline.desc": "Finalizar com uma nova linha.", + "html.format.extraLiners.desc": "Lista de rótulos, separados por vírgulas, que deveriam ter uma quebra de linha extra antes deles. 'null' admite o padrão \"head, body, /html\".", + "html.format.wrapAttributes.desc": "Agrupar atributos.", + "html.format.wrapAttributes.auto": "Agrupar atributos somente quando o tamanho da linha é excedido.", + "html.format.wrapAttributes.force": "Agrupar cada atributo exceto o primeiro.", + "html.format.wrapAttributes.forcealign": "Agrupar cada atributo, exceto o primeiro e manter alinhado.", + "html.format.wrapAttributes.forcemultiline": "Agrupar cada atributo.", + "html.suggest.angular1.desc": "Configura se o suporte da linguagem HTML interna sugere rótulos e propriedades do Angular V1.", + "html.suggest.ionic.desc": "Configura se o suporte da linguagem HTML interna sugere rótulos, propriedades e valores Ionic.", + "html.suggest.html5.desc": "Configura se o suporte da linguagem HTML interna sugere rótulos, propriedades e valores HTML5.", + "html.validate.scripts": "Configura se o suporte da linguagem HTML interna valida scripts embutidos.", + "html.validate.styles": "Configura se o suporte da linguagem HTML interna valida estilos embutidos." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/jake/out/main.i18n.json b/i18n/ptb/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..4cfc54e5fef5f --- /dev/null +++ b/i18n/ptb/extensions/jake/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Auto detecção de Jake falhou com erro: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/jake/package.i18n.json b/i18n/ptb/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..94c08817c8d4e --- /dev/null +++ b/i18n/ptb/extensions/jake/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.jake.autoDetect": "Controla se a detecção automática de tarefas Jake está ativada ou desativada. Por padrão, é ativado." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/javascript/out/features/bowerJSONContribution.i18n.json b/i18n/ptb/extensions/javascript/out/features/bowerJSONContribution.i18n.json new file mode 100644 index 0000000000000..84b277202e8ef --- /dev/null +++ b/i18n/ptb/extensions/javascript/out/features/bowerJSONContribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.bower.default": "Bower.json padrão", + "json.bower.error.repoaccess": "Falha na solicitação ao repositório bower: {0}", + "json.bower.latest.version": "último" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/javascript/out/features/packageJSONContribution.i18n.json b/i18n/ptb/extensions/javascript/out/features/packageJSONContribution.i18n.json new file mode 100644 index 0000000000000..9917fa36b2ea1 --- /dev/null +++ b/i18n/ptb/extensions/javascript/out/features/packageJSONContribution.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.package.default": "Package.json padrão", + "json.npm.error.repoaccess": "Falha na solicitação ao repositório NPM: {0}", + "json.npm.latestversion": "A versão do pacote mais recente no momento", + "json.npm.majorversion": "Combina com a versão principal mais recente (1.x.x)", + "json.npm.minorversion": "Combina a versão secundária mais recente (1.2.x)", + "json.npm.version.hover": "Última versão: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/json/client/out/jsonMain.i18n.json b/i18n/ptb/extensions/json/client/out/jsonMain.i18n.json new file mode 100644 index 0000000000000..4391c95a2ba22 --- /dev/null +++ b/i18n/ptb/extensions/json/client/out/jsonMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "jsonserver.name": "Servidor de linguagem JSON" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/json/package.i18n.json b/i18n/ptb/extensions/json/package.i18n.json new file mode 100644 index 0000000000000..9d812f5b25317 --- /dev/null +++ b/i18n/ptb/extensions/json/package.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.schemas.desc": "Esquemas associadas a arquivos de JSON no projeto atual", + "json.schemas.url.desc": "Um URL para um esquema ou um caminho relativo a um esquema no diretório atual", + "json.schemas.fileMatch.desc": "Uma matriz de padrões de arquivos para correspondência ao resolver arquivos JSON para esquemas.", + "json.schemas.fileMatch.item.desc": "Um padrão de arquivos que pode conter '*' para fazer a correspondência ao resolver arquivos JSON para esquemas.", + "json.schemas.schema.desc": "A definição de esquema para o URL dado. O esquema precisa ser fornecido apenas para evitar acessos ao URL do esquema.", + "json.format.enable.desc": "Habilitar/desabilitar o formatador JSON padrão (requer reinicialização)", + "json.tracing.desc": "Loga a comunicação entre o VS Code e o servidor de linguagem JSON.", + "json.colorDecorators.enable.desc": "Habilita ou desabilita os decoradores de cor" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/markdown/out/extension.i18n.json b/i18n/ptb/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/extensions/markdown/out/previewContentProvider.i18n.json b/i18n/ptb/extensions/markdown/out/previewContentProvider.i18n.json new file mode 100644 index 0000000000000..f4e956aa5ebe6 --- /dev/null +++ b/i18n/ptb/extensions/markdown/out/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "Scripts foram desabilitados neste documento", + "preview.securityMessage.title": "Scripts são desabilitados na pré-visualização de markdown. Altere a configuração de segurança de pré-visualização do Markdown para habilitar scripts", + "preview.securityMessage.label": "Aviso de segurança de scripts desabilitados" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/markdown/out/security.i18n.json b/i18n/ptb/extensions/markdown/out/security.i18n.json new file mode 100644 index 0000000000000..6b83ed6faed19 --- /dev/null +++ b/i18n/ptb/extensions/markdown/out/security.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.showPreviewSecuritySelector.disallowScriptsForWorkspaceTitle": "Desabilitar a execução de scripts em pré-visualização de markdown para este espaço de trabalho", + "preview.showPreviewSecuritySelector.currentSelection": "Configuração atual", + "preview.showPreviewSecuritySelector.allowScriptsForWorkspaceTitle": "Habilitar a execução de scripts em pré-visualizações de markdown para este espaço de trabalho", + "preview.showPreviewSecuritySelector.title": "Alterar configurações de segurança para a pré-visualização do Markdown" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/markdown/package.i18n.json b/i18n/ptb/extensions/markdown/package.i18n.json new file mode 100644 index 0000000000000..83c2f99b16058 --- /dev/null +++ b/i18n/ptb/extensions/markdown/package.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "markdown.preview.doubleClickToSwitchToEditor.desc": "Duplo clique na pré-visualização markdown para alternar para o editor.", + "markdown.preview.fontFamily.desc": "Controla a família de fonte usada na pré-visualização de markdown.", + "markdown.preview.fontSize.desc": "Controla o tamanho da fonte em pixels usado na pré-visualização de markdown.", + "markdown.preview.lineHeight.desc": "Controla a altura de linha usada na pré-visualização de markdown. Este número é relativo ao tamanho de fonte.", + "markdown.preview.markEditorSelection.desc": "Marca a seleção atual do editor na pré-visualização de markdown.", + "markdown.preview.scrollEditorWithPreview.desc": "Quando a pré-visualização de markdown é rolada, atualiza a exibição do editor.", + "markdown.preview.scrollPreviewWithEditorSelection.desc": "Rola a pré-visualização do markdown para revelar a linha atualmente selecionada do editor.", + "markdown.preview.title": "Abrir a visualização", + "markdown.previewFrontMatter.dec": "Configura como o frontispicio YAML frente questão devem ser processado na pré-visualização de markdown. 'hide' remove o frontispicio. Caso contrário, o frontispicio é tratado como conteúdo de markdown.", + "markdown.previewSide.title": "Abre pré-visualização ao lado", + "markdown.showSource.title": "Exibir Código-Fonte", + "markdown.styles.dec": "Uma lista de URLs ou caminhos locais para folhas de estilo CSS para usar na pré-visualização do markdown. Caminhos relativos são interpretados em relação à pasta aberta no explorer. Se não houver nenhuma pasta aberta, eles são interpretados em relação ao local do arquivo markdown. Todos os ' \\' precisam ser escritos como ' \\ \\ '.", + "markdown.showPreviewSecuritySelector.title": "Alterar as configurações de segurança de pré-visualização do Markdown", + "markdown.preview.enableExperimentalExtensionApi.desc": "[Experimental] Permitir extensões para ampliar a pré-visualização do markdown.", + "markdown.trace.desc": "Habilitar log de depuração para a extensão do markdown." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/package.i18n.json b/i18n/ptb/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/extensions/npm/package.i18n.json b/i18n/ptb/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/extensions/php/out/features/validationProvider.i18n.json b/i18n/ptb/extensions/php/out/features/validationProvider.i18n.json new file mode 100644 index 0000000000000..9e0ce64f472fb --- /dev/null +++ b/i18n/ptb/extensions/php/out/features/validationProvider.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "php.useExecutablePath": "Você permite {0} (definido como uma configuração do espaço de trabalho) a ser executado para lint de arquivos PHP?", + "php.yes": "Permitir", + "php.no": "Não permitir", + "wrongExecutable": "Não é possível validar {0} pois não é um executável php válido. Use a configuração 'php.validate.executablePath' para configurar o executável do PHP.", + "noExecutable": "Não é possível validar porque nenhum executável PHP está definido. Use a configuração 'php.validate.executablePath' para configurar o executável do PHP.", + "unknownReason": "Falha ao executar o php usando o caminho: {0}. O motivo é desconhecido." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/php/package.i18n.json b/i18n/ptb/extensions/php/package.i18n.json new file mode 100644 index 0000000000000..7ec916f5dd829 --- /dev/null +++ b/i18n/ptb/extensions/php/package.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "configuration.suggest.basic": "Configura se as sugestões intrínsecas da linguagem PHP estão habilitadas. O suporte sugere globais e variáveis do PHP.", + "configuration.validate.enable": "Habilita/desabilita a validação interna do PHP.", + "configuration.validate.executablePath": "Aponta para o executável do PHP.", + "configuration.validate.run": "Se o linter é executado ao salvar ou ao digitar.", + "configuration.title": "PHP", + "commands.categroy.php": "PHP", + "command.untrustValidationExecutable": "Desabilita a validação de executável do PHP (definida como configuração do espaço de trabalho)" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/ptb/extensions/typescript/out/features/bufferSyncSupport.i18n.json new file mode 100644 index 0000000000000..1cef0c6e94ae8 --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "versionMismatch": "Incompatibilidade de versão! global tsc ({0})! = serviço de linguagem do VS Code ({1}). Erros de compilação inconsistentes podem ocorrer", + "moreInformation": "Mais informações", + "doNotCheckAgain": "Não verificar novamente", + "close": "Fechar", + "updateTscCheck": "Atualizada configuração de usuário 'typescript.check.tscVersion' para false " +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/ptb/extensions/typescript/out/features/completionItemProvider.i18n.json new file mode 100644 index 0000000000000..58097d90545cc --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acquiringTypingsLabel": "Adquirindo digitações...", + "acquiringTypingsDetail": "Adquirindo definições de digitações para o Intellisense." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/ptb/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..99716f32145fd --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "Habilita verificação semântica em um arquivo JavaScript. Deve estar no topo de um arquivo.", + "ts-nocheck": "Desabilita verificação semântica em um arquivo JavaScript. Deve estar no topo de um arquivo.", + "ts-ignore": "Suprime erros de @ts-check na próxima linha de um arquivo." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json b/i18n/ptb/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json new file mode 100644 index 0000000000000..ef8dd6423d6a6 --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "oneImplementationLabel": "1 implementação", + "manyImplementationLabel": "{0} implementações", + "implementationsErrorLabel": "Não foi possível determinar implementações" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json b/i18n/ptb/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json new file mode 100644 index 0000000000000..20b08d7679b9d --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.jsDocCompletionItem.documentation": "Comentário JSDoc" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json b/i18n/ptb/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json new file mode 100644 index 0000000000000..1838c3c162117 --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "oneReferenceLabel": "1 referência", + "manyReferenceLabel": "{0} referências", + "referenceErrorLabel": "Não foi possível determinar as referências" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/typescriptMain.i18n.json b/i18n/ptb/extensions/typescript/out/typescriptMain.i18n.json new file mode 100644 index 0000000000000..82e6c288fb198 --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/typescriptMain.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.projectConfigNoWorkspace": "Favor abrir uma pasta no VS Code para usar um projeto TypeScript ou JavaScript", + "typescript.projectConfigUnsupportedFile": "Não foi possível determinar o projeto TypeScript ou JavaScript. Tipo de arquivo não suportado", + "typescript.projectConfigCouldNotGetInfo": "Não foi possível determinar o projeto TypeScript ou JavaScript", + "typescript.noTypeScriptProjectConfig": "Arquivo não é parte de um projeto TypeScript", + "typescript.noJavaScriptProjectConfig": "Arquivo não é parte de um projeto JavaScript", + "typescript.configureTsconfigQuickPick": "Configurar tsconfig.json", + "typescript.configureJsconfigQuickPick": "Configurar jsconfig.json", + "typescript.projectConfigLearnMore": "Saber Mais" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/ptb/extensions/typescript/out/typescriptServiceClient.i18n.json new file mode 100644 index 0000000000000..37527e507b0ea --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noServerFound": "O caminho {0} não aponta para uma instalação de tsserver válida. Voltando para a versão do TypeScript empacotada.", + "noBundledServerFound": "O tsserver do VS Code foi excluído por outra aplicação, como por exemplo uma ferramenta de detecção de virus mal-comportada. Favor reinstalar o VS Code.", + "versionNumber.custom": "personalizado", + "serverCouldNotBeStarted": "Servidor de linguagem TypeScript não pôde ser iniciado. Mensagem de erro é: {0}", + "useVSCodeVersionOption": "Usar a Versão do VS Code", + "activeVersion": "Atualmente ativo", + "useWorkspaceVersionOption": "Use a versão de área de trabalho", + "learnMore": "Saiba Mais", + "selectTsVersion": "Selecione a versão do TypeScript usada para os recursos de linguagem JavaScript e TypeScript", + "typescript.openTsServerLog.notSupported": "Logging de TS Server requer TS TS 2.2.2+", + "typescript.openTsServerLog.loggingNotEnabled": "Logging de TS Server está desligado. Por favor configure 'typescript.tsserver.log' e reinicie o TS Server para habilitar o log", + "typescript.openTsServerLog.enableAndReloadOption": "Habilitar logging e reniciar TS server", + "typescript.openTsServerLog.noLogFile": "O TS Server não iniciou o logging.", + "openTsServerLog.openFileFailedFailed": "Não foi possível abrir o arquivo de log do TS Server", + "serverDiedAfterStart": "O serviço de linguagem TypeScript morreu 5 vezes depois que começou. O serviço não será reiniciado.", + "serverDiedReportIssue": "Reportar Problema", + "serverDied": "O serviço TypeScript morreu inesperadamente 5 vezes nos últimos 5 minutos." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/utils/logger.i18n.json b/i18n/ptb/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..bc738f43d0c37 --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/ptb/extensions/typescript/out/utils/projectStatus.i18n.json new file mode 100644 index 0000000000000..5cb1837363719 --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/utils/projectStatus.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hintExclude": "Para habilitar os recursos de linguagem JavaScript/TypeScipt em todo o projeto, excluir pastas com muitos arquivos, como: {0}", + "hintExclude.generic": "Para habilitar os recursos de linguagem JavaScript/TypeScipt em todo o projeto, excluir pastas grandes com arquivos em que você não trabalha.", + "open": "Configurar exclusões", + "large.label": "Configurar exclusões", + "hintExclude.tooltip": "Para habilitar os recursos de linguagem JavaScript/TypeScipt em todo o projeto, excluir pastas grandes com arquivos em que você não trabalha." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json new file mode 100644 index 0000000000000..ce050eb3d8ede --- /dev/null +++ b/i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installingPackages": "Buscando dados para melhor IntelliSense do TypeScript", + "typesInstallerInitializationFailed.title": "Não foi possível instalar arquivos de digitação para recursos da linguagem JavaScript. Certifique-se que NPM está instalado e está em seu caminho", + "typesInstallerInitializationFailed.moreInformation": "Mais informações", + "typesInstallerInitializationFailed.doNotCheckAgain": "Não verificar novamente", + "typesInstallerInitializationFailed.close": "Fechar" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/package.i18n.json b/i18n/ptb/extensions/typescript/package.i18n.json new file mode 100644 index 0000000000000..5e4125ec05070 --- /dev/null +++ b/i18n/ptb/extensions/typescript/package.i18n.json @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.reloadProjects.title": "Recarregar Projeto", + "javascript.reloadProjects.title": "Recarregar Projeto", + "configuration.typescript": "TypeScript", + "typescript.useCodeSnippetsOnMethodSuggest.dec": "Funções completas com a assinatura do parâmetro.", + "typescript.tsdk.desc": "Especifica o caminho da pasta que contém os arquivos tsserver e lib*.d.ts para usar.", + "typescript.disableAutomaticTypeAcquisition": "Desabilita a aquisição automática de tipo. Requer TypeScript > = 2.0.6 e um reinício depois da alteração.", + "typescript.check.tscVersion": "Verifica se um ima instalação global do compilador TypeScript (por exemplo, tsc) difere do serviço de linguagem TypeScript usado.", + "typescript.tsserver.log": "Habilita o log do servidor TS para um arquivo. Este log pode ser usado para diagnosticar problemas do servidor de TS. O log pode conter caminhos de arquivo, código-fonte e outras informações potencialmente confidenciais do seu projeto.", + "typescript.tsserver.trace": "Habilita o rastreamento de mensagens enviadas para o servidor de TS. Este rastreamento pode ser usado para diagnosticar problemas do servidor de TS. O rastreamento pode conter caminhos de arquivo, código-fonte e outras informações potencialmente confidenciais do seu projeto.", + "typescript.tsserver.experimentalAutoBuild": "Habilita auto build experimental. Requer a versão 1.9 dev ou 2.x do tsserver e o reinício do VS Code depois da alteração.", + "typescript.validate.enable": "Habilita/Desabilita a validação TypeScript.", + "typescript.format.enable": "Habilita/Desabilita o formatador padrão TypeScript.", + "javascript.format.enable": "Habilita/Desabilita o formatador padrão JavaScript.", + "format.insertSpaceAfterCommaDelimiter": "Define o tratamento de espaços após um delimitador vírgula.", + "format.insertSpaceAfterSemicolonInForStatements": "Define o tratamento de espaços após um ponto e vírgula para um comando.", + "format.insertSpaceBeforeAndAfterBinaryOperators": "Define o tratamento de espaços após um operador binário.", + "format.insertSpaceAfterKeywordsInControlFlowStatements": "Define o tratamento de espaços após palavras-chave em um comando de controle de fluxo.", + "format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": "Define o tratamento de espaços após uma palavra-chave de função para funções anônimas.", + "format.insertSpaceBeforeFunctionParenthesis": "Define a manipulação de espaços antes de parênteses do argumento de função. Requer TypeScript > = 2.1.5.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Define a manipulação de espaços após abrir e antes de fechar parênteses não vazios.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Define a manipulação de espaços após abrir e antes de fechar colchetes não vazios.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Define a manipulação de espaços após abrir e antes de fechar chaves não vazias. Requer TypeScript >= 2.3.0.", + "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Define a manipulação de espaços após abrir e antes de fechar chaves de cadeias de caracteres de modelos. Requer TypeScript >= 2.0.6.", + "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "Define a manipulação de espaços após abrir e antes de fechar chaves de expressões JSX. Requer TypeScript >= 2.0.6.", + "format.placeOpenBraceOnNewLineForFunctions": "Define-se uma chave de abertura é colocada em uma nova linha para funções ou não.", + "format.placeOpenBraceOnNewLineForControlBlocks": "Define-se uma chave de abertura é colocada em uma nova linha para blocos de controle ou não.", + "javascript.validate.enable": "Habilitar/Desabilitar validação JavaScript.", + "typescript.goToProjectConfig.title": "Ir para a Configuração do Projeto", + "javascript.goToProjectConfig.title": "Ir para a Configuração do Projeto", + "javascript.referencesCodeLens.enabled": "Habilitar/desabilitar referências CodeLens em arquivos JavaScript.", + "typescript.referencesCodeLens.enabled": "Habilitar/desabilitar referências CodeLens em arquivos TypeScript. Requer TypeScript > = 2.0.6.", + "typescript.implementationsCodeLens.enabled": "Habilitar/desabilitar implementações CodeLens. Requer TypeScript > = 2.0.6.", + "typescript.openTsServerLog.title": "Abrir arquivo de log do servidor TS", + "typescript.selectTypeScriptVersion.title": "Selecionar a versão do JavaScript", + "jsDocCompletion.enabled": "Habilitar/Desabilitar comentários JSDoc automáticos.", + "javascript.implicitProjectConfig.checkJs": "Habilitar/desabilitar verificação semântica de arquivos JavaScript. Os arquivos existentes jsconfig.json ou tsconfig.json substituem essa configuração. Requer TypeScript > = 2.3.1.", + "typescript.check.npmIsInstalled": "Verificar se NPM está instalado para aquisição automática de digitação", + "javascript.nameSuggestions": "Habilitar/desabilitar incluindo nomes exclusivos do arquivo nas listas de sugestão de JavaScript." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/actionbar/actionbar.i18n.json b/i18n/ptb/src/vs/base/browser/ui/actionbar/actionbar.i18n.json new file mode 100644 index 0000000000000..4ecb2c803f4cd --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/actionbar/actionbar.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "titleLabel": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/aria/aria.i18n.json b/i18n/ptb/src/vs/base/browser/ui/aria/aria.i18n.json new file mode 100644 index 0000000000000..e558eb6187aa1 --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/aria/aria.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "repeated": "{0} (ocorreu novamente)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/findinput/findInput.i18n.json b/i18n/ptb/src/vs/base/browser/ui/findinput/findInput.i18n.json new file mode 100644 index 0000000000000..524ba7bb4a79b --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/findinput/findInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultLabel": "entrada" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json b/i18n/ptb/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json new file mode 100644 index 0000000000000..1a477ef1e6d2b --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caseDescription": "Diferenciar Maiúsculas de Minúsculas", + "wordsDescription": "Coincidir Palavra Inteira", + "regexDescription": "Usar Expressão Regular" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/inputbox/inputBox.i18n.json b/i18n/ptb/src/vs/base/browser/ui/inputbox/inputBox.i18n.json new file mode 100644 index 0000000000000..0b282bdee8a51 --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/inputbox/inputBox.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "alertErrorMessage": "Erro: {0}", + "alertWarningMessage": "Aviso: {0}", + "alertInfoMessage": "Informações: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/ptb/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json new file mode 100644 index 0000000000000..d023184ae7017 --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "imgMeta": "{0}x{1} {2}", + "largeImageError": "A imagem é muito grande para ser exibida no editor.", + "nativeBinaryError": "O arquivo não pode ser exibido no editor porque é binário, muito grande ou usa uma codificação de texto sem suporte.", + "sizeB": "{0}B", + "sizeKB": "{0}KB", + "sizeMB": "{0}MB", + "sizeGB": "{0}GB", + "sizeTB": "{0}TB" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/browser/ui/toolbar/toolbar.i18n.json b/i18n/ptb/src/vs/base/browser/ui/toolbar/toolbar.i18n.json new file mode 100644 index 0000000000000..4a046b57296cd --- /dev/null +++ b/i18n/ptb/src/vs/base/browser/ui/toolbar/toolbar.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "more": "Mais" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/common/errorMessage.i18n.json b/i18n/ptb/src/vs/base/common/errorMessage.i18n.json new file mode 100644 index 0000000000000..257ffd9e14c16 --- /dev/null +++ b/i18n/ptb/src/vs/base/common/errorMessage.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "message": "{0}. Código de erro: {1}", + "error.permission.verbose": "Permissão Negada (HTTP {0})", + "error.permission": "Permissão Negada", + "error.http.verbose": "{0} (HTTP {1}: {2})", + "error.http": "{0} (HTTP {1})", + "error.connection.unknown.verbose": "Erro de Conexão Desconhecido ({0})", + "error.connection.unknown": "Ocorreu um erro de conexão desconhecido. Você não está mais conectado à Internet ou o servidor que você está conectado está offline.", + "stackTrace.format": "{0}: {1}", + "error.defaultMessage": "Ocorreu um erro desconhecido. Consulte o log para obter mais detalhes.", + "nodeExceptionMessage": "Ocorreu um erro de sistema ({0})", + "error.moreErrors": "{0} ({1} erros no total)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/ptb/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..d6108586df8b1 --- /dev/null +++ b/i18n/ptb/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.invalidSymbol": "Símbolo inválido", + "error.invalidNumberFormat": "Formato de número inválido", + "error.propertyNameExpected": "Nome de propriedade esperado", + "error.valueExpected": "Valor esperado", + "error.colonExpected": "Dois-pontos esperados", + "error.commaExpected": "Vírgula esperada", + "error.closeBraceExpected": "Chave de fechamento esperada", + "error.closeBracketExpected": "Colchete de fechamento esperado", + "error.endOfFileExpected": "Fim do arquivo esperado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/common/processes.i18n.json b/i18n/ptb/src/vs/base/common/processes.i18n.json new file mode 100644 index 0000000000000..165322e595234 --- /dev/null +++ b/i18n/ptb/src/vs/base/common/processes.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ExecutableParser.commandMissing": "Erro: informações de executável devem definir um comando do tipo string", + "ExecutableParser.isShellCommand": "Aviso: IsShellCommand deve ser to tipo booleano. Ignorando valor {0}", + "ExecutableParser.args": "Aviso: args deve ser do tipo string[]. Ignorando valor {0}.", + "ExecutableParser.invalidCWD": "Aviso: options.cwd deve ser do tipo string. Ignorando valor {0}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/common/severity.i18n.json b/i18n/ptb/src/vs/base/common/severity.i18n.json new file mode 100644 index 0000000000000..7aff8041180ff --- /dev/null +++ b/i18n/ptb/src/vs/base/common/severity.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "sev.error": "Erro", + "sev.warning": "Aviso", + "sev.info": "Informações" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/node/processes.i18n.json b/i18n/ptb/src/vs/base/node/processes.i18n.json new file mode 100644 index 0000000000000..3584dc9b15e34 --- /dev/null +++ b/i18n/ptb/src/vs/base/node/processes.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskRunner.UNC": "Não é possível executar um comando shell em uma unidade UNC." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/node/zip.i18n.json b/i18n/ptb/src/vs/base/node/zip.i18n.json new file mode 100644 index 0000000000000..a577f90ea2e53 --- /dev/null +++ b/i18n/ptb/src/vs/base/node/zip.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "{0} não encontrado dentro do zip." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json b/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json new file mode 100644 index 0000000000000..1d0f7ebd47a0a --- /dev/null +++ b/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpenAriaLabelEntry": "{0}, seletor", + "quickOpenAriaLabel": "seletor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json b/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json new file mode 100644 index 0000000000000..ca3d8a5266afb --- /dev/null +++ b/i18n/ptb/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpenAriaLabel": "Seletor rápido. Digite para filtrar resultados.", + "treeAriaLabel": "Seletor rápido" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/parts/tree/browser/treeDefaults.i18n.json b/i18n/ptb/src/vs/base/parts/tree/browser/treeDefaults.i18n.json new file mode 100644 index 0000000000000..5e72c45050c6e --- /dev/null +++ b/i18n/ptb/src/vs/base/parts/tree/browser/treeDefaults.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "collapse": "Recolher" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/electron-main/menus.i18n.json b/i18n/ptb/src/vs/code/electron-main/menus.i18n.json new file mode 100644 index 0000000000000..85312962c12e7 --- /dev/null +++ b/i18n/ptb/src/vs/code/electron-main/menus.i18n.json @@ -0,0 +1,164 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mFile": "&&Arquivo", + "mEdit": "&&Editar", + "mSelection": "&&Seleção", + "mView": "&&Visualizar", + "mGoto": "&&Ir", + "mDebug": "&&Depurar", + "mWindow": "Janela", + "mHelp": "&&Ajuda", + "miNewWindow": "Nova &&Janela", + "mAbout": "Sobre {0}", + "mServices": "Serviços", + "mHide": "Ocultar {0}", + "mHideOthers": "Ocultar Outros", + "mShowAll": "Mostrar Tudo", + "miQuit": "Sair de {0}", + "miNewFile": "&&Novo Arquivo", + "miOpen": "&&Abrir", + "miOpenFolder": "Abrir &&Pasta", + "miOpenFile": "&&Abrir Arquivo", + "miOpenRecent": "Abrir &&Recente", + "miSave": "&&Salvar", + "miSaveAs": "Salvar &&Como...", + "miSaveAll": "Salvar &&Tudo", + "miAutoSave": "Salvar Automaticamente", + "miRevert": "Re&&verter Arquivo", + "miCloseWindow": "Fe&&char Janela", + "miCloseFolder": "Fechar &&Pasta", + "miCloseEditor": "Fechar &&Editor", + "miExit": "Sai&&r", + "miOpenSettings": "&&Configurações", + "miOpenKeymap": "Atalhos de &&Teclado", + "miOpenKeymapExtensions": "Extensões de &&Mapeamento de Teclado", + "miOpenSnippets": "Trechos de Có&&digo do Usuário", + "miSelectColorTheme": "Cor do T&&ema", + "miSelectIconTheme": "&&Ícone de Arquivo do Tema", + "miPreferences": "&&Preferências", + "miReopenClosedEditor": "&&Reabrir Editor Fechado", + "miClearRecentOpen": "&&Limpar Arquivos Recentes", + "miUndo": "&&Desfazer", + "miRedo": "&&Refazer", + "miCut": "Cor&&tar", + "miCopy": "&&Copiar", + "miPaste": "Co&&lar", + "miFind": "&&Localizar", + "miReplace": "&&Substituir", + "miFindInFiles": "Localizar &&nos Arquivos", + "miReplaceInFiles": "Substituir &&nos Arquivos", + "miEmmetExpandAbbreviation": "Emmet: E&&xpandir Abreviação", + "miShowEmmetCommands": "E&&mmet...", + "miToggleLineComment": "&&Alternar Comentário de Linha", + "miToggleBlockComment": "Alternar Comentário de &&Bloco", + "miInsertCursorAbove": "&&Inserir cursor acima", + "miInsertCursorBelow": "Inserir cursor a&&baixo", + "miInsertCursorAtEndOfEachLineSelected": "Adicionar C&&ursores ao Final das Linhas", + "miAddSelectionToNextFindMatch": "Adicionar &&próxima ocorrência", + "miAddSelectionToPreviousFindMatch": "Adicionar ocorrência a&&nterior ", + "miSelectHighlights": "Selecionar todas as &&ocorrências", + "miCopyLinesUp": "&&Copiar linha acima", + "miCopyLinesDown": "C&&opiar linha abaixo", + "miMoveLinesUp": "Mo&&ver linha para cima", + "miMoveLinesDown": "Mover &&linha para baixo", + "miSelectAll": "&&Selecionar Tudo", + "miSmartSelectGrow": "&&Expandir seleção", + "miSmartSelectShrink": "&&Reduzir seleção", + "miViewExplorer": "&&Explorador", + "miViewSearch": "&&Pesquisar", + "miViewSCM": "S&&CM", + "miViewDebug": "&&Depurar", + "miViewExtensions": "E&&xtensões", + "miToggleOutput": "&&Saída", + "miToggleDebugConsole": "Con&&sole de Depuração", + "miToggleIntegratedTerminal": "Terminal &&Integrado", + "miMarker": "&&Problemas", + "miAdditionalViews": "&&Visualizações Adicionais", + "miCommandPalette": "&&Paleta de comando", + "miToggleFullScreen": "Alternar &&Tela Inteira", + "miToggleZenMode": "Alternar modo Zen", + "miToggleMenuBar": "Alternar &&Barra de Menus", + "miSplitEditor": "Dividir &&editor", + "miToggleEditorLayout": "Alternar &&Layout do Grupo de Editor", + "miToggleSidebar": "&&Alternar Barra Lateral", + "miMoveSidebarRight": "&&Mover a barra lateral para a direita", + "miMoveSidebarLeft": "&&Mover a barra lateral para a esquerda", + "miTogglePanel": "Alternar &&Painel", + "miHideStatusbar": "&&Ocultar Barra de Status", + "miShowStatusbar": "&&Mostrar Barra de Status", + "miHideActivityBar": "Ocultar Barra de &&Atividades", + "miShowActivityBar": "Mostrar Barra de &&Atividades", + "miToggleWordWrap": "Alternar &&Quebra de Linha", + "miToggleRenderWhitespace": "Alternar &&Renderização de Espaços em Branco", + "miToggleRenderControlCharacters": "Alternar &&Caracteres de Controle", + "miZoomIn": "&&Ampliar", + "miZoomOut": "Red&&uzir", + "miZoomReset": "&&Reinicializar Zoom", + "miBack": "&&Voltar", + "miForward": "&&Avançar", + "miNextEditor": "&&Próximo Editor", + "miPreviousEditor": "&&Editor Anterior", + "miNextEditorInGroup": "&&Próximo Editor Usado no Grupo", + "miPreviousEditorInGroup": "&&Editor Anterior Usado no Grupo", + "miSwitchEditor": "Trocar &&Editor", + "miFocusFirstGroup": "&&Primeiro Grupo", + "miFocusSecondGroup": "&&Segundo Grupo", + "miFocusThirdGroup": "&&Terceiro Grupo", + "miNextGroup": "&&Próximo Grupo", + "miPreviousGroup": "&&Grupo Anterior", + "miSwitchGroup": "Trocar &&Grupo", + "miGotoFile": "Ir para &&Arquivo...", + "miGotoSymbolInFile": "Ir para o &&Símbolo no Arquivo...", + "miGotoSymbolInWorkspace": "Ir para o Símbolo em &&Área de Trabalho", + "miGotoDefinition": "Ir para &&Definição", + "miGotoTypeDefinition": "Ir para a &&definição de tipo", + "miGotoImplementation": "Ir para a &&implementação", + "miGotoLine": "Ir para &&Linha...", + "miStartDebugging": "Iniciar Depuração", + "miStartWithoutDebugging": "Iniciar &&Sem Depuração", + "miStopDebugging": "&&Parar Depuração", + "miRestart Debugging": "&&Reiniciar Depuração", + "miOpenConfigurations": "Abrir &&Configurações", + "miAddConfiguration": "Adicionar Configuração...", + "miStepOver": "Pular &&Sobre", + "miStepInto": "Pular &&Dentro", + "miStepOut": "Pular &&Fora", + "miContinue": "&&Continuar", + "miToggleBreakpoint": "Alternar &&Ponto de Parada", + "miConditionalBreakpoint": "Ponto de Parada &&Condicional...", + "miColumnBreakpoint": "Ponto de Parada de C&&oluna", + "miFunctionBreakpoint": "Ponto de Parada de &&Função...", + "miNewBreakpoint": "&&Novo Ponto de Parada", + "miDisableAllBreakpoints": "Desabilitar T&&odos os Pontos de Parada", + "miRemoveAllBreakpoints": "Remover &&Todos os Pontos de Parada", + "miInstallAdditionalDebuggers": "&&Instalar Depuradores Adicionais...", + "mMinimize": "Minimizar", + "mClose": "Fechar", + "mBringToFront": "Trazer Tudo para a Frente", + "miToggleDevTools": "&&Alternar Ferramentas do Desenvolvedor", + "miAccessibilityOptions": "&&Opções de Acessibilidade", + "miReportIssues": "Relatar &&Problemas", + "miWelcome": "&&Bem-vindo", + "miInteractivePlayground": "Playground &&Interativo", + "miDocumentation": "&&Documentação", + "miReleaseNotes": "&&Notas de Versão", + "miKeyboardShortcuts": "Referência de &&Atalhos de Teclado", + "miIntroductoryVideos": "&&Vídeos Introdutórios", + "miTwitter": "&&Junte-se a nós no Twitter", + "miUserVoice": "&&Pesquisar Solicitações de Recursos", + "miLicense": "&&Exibir Licença", + "miPrivacyStatement": "&&Política de Privacidade", + "miAbout": "&&Sobre", + "miRestartToUpdate": "Reinicie para Atualizar...", + "miCheckingForUpdates": "Verificando Atualizações...", + "miDownloadUpdate": "Baixar Atualização Disponível", + "miDownloadingUpdate": "Baixando Atualização...", + "miInstallingUpdate": "Instalando Atualização...", + "miCheckForUpdates": "Verificar Atualizações...", + "aboutDetail": "\\\\nVersão {0}\\\\nConfirmação {1}\\\\nData {2}\\\\nShell {3}\\\\nRenderizador {4}\\\\nNó {5}", + "okButton": "OK" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/electron-main/window.i18n.json b/i18n/ptb/src/vs/code/electron-main/window.i18n.json new file mode 100644 index 0000000000000..abee584a9c11d --- /dev/null +++ b/i18n/ptb/src/vs/code/electron-main/window.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hiddenMenuBar": "Você ainda pode acessar a barra de menu pressionando a tecla * * Alt * *." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/electron-main/windows.i18n.json b/i18n/ptb/src/vs/code/electron-main/windows.i18n.json new file mode 100644 index 0000000000000..308aed2953874 --- /dev/null +++ b/i18n/ptb/src/vs/code/electron-main/windows.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ok": "OK", + "pathNotExistTitle": "O caminho não existe", + "pathNotExistDetail": "O caminho '{0}' não parece mais existir no disco.", + "accessibilityOptionsWindowTitle": "Opções de Acessibilidade", + "reopen": "Reabrir", + "wait": "Continuar Esperando", + "close": "Fechar", + "appStalled": "A janela não está mais respondendo", + "appStalledDetail": "Você pode reabrir, fechar a janela ou continuar esperando.", + "appCrashed": "A janela foi fechada inesperadamente", + "appCrashedDetail": "Pedimos desculpas pelo inconveniente! Você pode reabrir a janela para continuar de onde parou.", + "newWindow": "Nova Janela", + "newWindowDesc": "Abrir uma nova janela", + "recentFolders": "Pastas Recentes", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/node/cliProcessMain.i18n.json b/i18n/ptb/src/vs/code/node/cliProcessMain.i18n.json new file mode 100644 index 0000000000000..ee0b74f6e41e5 --- /dev/null +++ b/i18n/ptb/src/vs/code/node/cliProcessMain.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "Extensão '{0}' não encontrada.", + "notInstalled": "Extensão '{0}' não está instalada.", + "useId": "Certifique-se de usar a ID de extensão completa, incluindo o editor, por exemplo: {0}", + "successVsixInstall": "Extensão '{0}' foi instalada com sucesso!", + "alreadyInstalled": "Extensão '{0}' já está instalada.", + "foundExtension": "Encontrado '{0}' na loja VS Code.", + "installing": "Instalando...", + "successInstall": "Extensão '{0}' v {1} foi instalada com sucesso!", + "uninstalling": "Desinstalando {0}...", + "successUninstall": "Extensão '{0}' foi desinstalada com sucesso!" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json new file mode 100644 index 0000000000000..8411a9303639d --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -0,0 +1,76 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorConfigurationTitle": "Editor", + "fontFamily": "Controla a família de fontes.", + "fontWeight": "Controla o peso da fonte.", + "fontSize": "Controla o tamanho da fonte em pixels.", + "lineHeight": "Controla a altura da linha. Use 0 para computar a altura da linha a partir do tamanho da fonte.", + "letterSpacing": "Controla o espaçamento da letra em pixels.", + "lineNumbers": "Controla a exibição de números de linha. Valores possíveis são 'on', 'off' e 'relative'. 'relative' mostra a contagem de linhas a partir da posição atual do cursor.", + "rulers": "Colunas nas quais mostrar réguas verticais", + "wordSeparators": "Caracteres que serão usados como separadores de palavras ao fazer navegação relacionada a palavras ou operações", + "tabSize": "O número de espaços equivalentes a uma tabulação. Esta configuração é sobreposta no conteúdo do arquivo quando `editor.detectIndentation` está ligado.", + "tabSize.errorMessage": "Esperado 'número'. Note que o valor \"auto\" foi alterado pela configuração 'editor.detectIndentation'.", + "insertSpaces": "Insere espaços quanto pressionado Tab. Esta configuração é sobrescrita com base no conteúdo do arquivo quando 'editor.detectIndentation' está habilitado.", + "insertSpaces.errorMessage": "Esperado 'booleano'. Note que o valor \"auto\" foi alterado pela configuração 'editor.detectIndentation'.", + "detectIndentation": "Quando um arquivo está sendo aberto, 'editor.tabSize' e 'editor.insertSpace' será detectado com base no conteúdo do arquivo.", + "roundedSelection": "Controla se as seleções têm cantos arredondados", + "scrollBeyondLastLine": "Controla se o editor rolará além da última linha", + "minimap.enabled": "Controla se o mini mapa é exibido", + "minimap.renderCharacters": "Renderizar os caracteres em uma linha (em oposição a blocos de caracteres)", + "minimap.maxColumn": "Limitar o tamanho de um mini-mapa para renderizar no máximo um número determinado de colunas", + "wordWrap.off": "As linhas nunca serão quebradas.", + "wordWrap.on": "As linhas serão quebradas na largura de visualização", + "wordWrap.wordWrapColumn": "As linhas serão quebradas em `editor.wordWrapColumn`.", + "wordWrap.bounded": "As linhas serão quebradas no mínimo entre a largura de visualização e `editor.wordWrapColumn`.", + "wordWrap": "Controla como as linhas devem ser quebradas automaticamente. Pode ser:\n- 'off' (quebra automática de linha desabilitada)\n- 'on' (quebra automática de linha na largura da janela)\n- 'wordWrapColumn' (quebra automática no numero de colunas definido em `editor.wordWrapColumn`) ou\n- 'bounded' (quebra automática em uma dimensão minima da janela e na largura configurada)", + "wordWrapColumn": "Controla a coluna de quebra de linha do editor quando editor.wordWrap` é 'wordWrapColumn' ou 'bounded'.", + "wrappingIndent": "Controla o recuo de linhas quebradas. Pode ser \"none\", \"same\" ou \"indent\".", + "mouseWheelScrollSensitivity": "Um multiplicador a ser usado em \"deltaX\" e \"deltaY\" dos eventos de rolagem do botão de rolagem do mouse", + "quickSuggestions.strings": "Habilitar sugestões rápidas dentro de strings.", + "quickSuggestions.comments": "Habilitar sugestões rápidas dentro de comentários.", + "quickSuggestions.other": "Habilitar sugestões rápidas fora de strings e comentários.", + "quickSuggestions": "Controlar se sugestões devem aparecer automaticamente ao digitar", + "quickSuggestionsDelay": "Controla o atraso em ms após o qual sugestões rápidas serão exibidas", + "parameterHints": "Habilita dicas de parâmetros", + "autoClosingBrackets": "Controla se o editor deve fechar colchetes automaticamente depois de abri-los", + "formatOnType": "Controla se o editor deve formatar automaticamente a linha após a digitação", + "formatOnPaste": "Controla se o editor deve formatar automaticamente o conteúdo colado. Um formatador deve estar disponível e o formatador deve ser capaz de formatar apenas uma parte do documento.", + "suggestOnTriggerCharacters": "Controla se as sugestões devem aparecer automaticamente ao digitar caracteres de gatilho", + "acceptSuggestionOnCommitCharacter": "Controla se as sugestões devem ser aceitas em caracteres de confirmação. Por exemplo, em JavaScript, o ponto-e-vírgula (';') pode ser um caractere de confirmação que aceita uma sugestão e digita esse caractere.", + "snippetSuggestions": "Controla se os snippets são exibidos juntamente com as outras sugestões e como eles são ordenados.", + "emptySelectionClipboard": "Controla se a cópia sem nenhuma seleção copia a linha atual.", + "wordBasedSuggestions": "Controla se o auto-completar deve ser calculado baseado nas palavras no documento.", + "suggestFontSize": "Tamanho da fonte para a ferramenta de sugestão", + "suggestLineHeight": "Altura de linha para a ferramenta de sugestão", + "selectionHighlight": "Controla se o editor deve realçar correspondências semelhantes à seleção", + "occurrencesHighlight": "Controla se o editor deve realçar ocorrências de símbolos semânticos.", + "overviewRulerLanes": "Controla o número de decorações que podem ser exibidas na mesma posição na régua de visão geral", + "overviewRulerBorder": "Controla se deve desenhar uma borda ao redor da régua de visão geral.", + "cursorBlinking": "Controla o estilo de animação do cursor, os valores possíveis são 'blink', 'smooth', 'phase', 'expand' e 'solid'", + "mouseWheelZoom": "Alterar o zoom da fonte editor quando utilizada a roda do mouse e pressionando Ctrl", + "cursorStyle": "Controla o estilo do cursor, os valores aceitos são 'block', 'block-outline', 'line', 'line-thin', 'underline' e 'underline-thin'", + "fontLigatures": "Habilita ligaduras de fontes", + "hideCursorInOverviewRuler": "Controla se o cursor deve ficar oculto na régua de visão geral.", + "renderWhitespace": "Controla como o editor deve rendenizar caracteres de espaços em branco, possibilidades são 'none', 'boundary' e 'all'. A opção 'boundary' não rendeniza espaços simples entre palavras.", + "renderControlCharacters": "Controla se o editor deve renderizar caracteres de controle", + "renderIndentGuides": "Controla se o editor deve renderizar guias de identação", + "renderLineHighlight": "Controla como o editor deve renderizar a linha atual, as possibilidades são 'none', 'gutter', 'line' e 'all'.", + "codeLens": "Controla se o editor exibirá a lente de códigos.", + "folding": "Controla se o editor tem codigo colapsível hablitado", + "showFoldingControls": "Controla se os controles de desdobramento na divisão são ocultas automaticamente.", + "matchBrackets": "Realça colchetes correspondente quando um deles estiver selecionado.", + "glyphMargin": "Controla se o editor deve renderizar a margem vertical de ícones. A margem vertical de ícones é usada primordialmente na depuração", + "useTabStops": "Inserção e deleção de espaço em branco seguem a tabulação", + "trimAutoWhitespace": "Remove espaços em branco inseridos automaticamente no fim da linha", + "stablePeek": "Mantém os editores de visualização abertos mesmo quando clicando seu conteúdo ou teclando Escape.", + "dragAndDrop": "Controla se o editor deve permitir mover seleções via arrastar e soltar.", + "sideBySide": "Controla se o editor de diff mostra as diff lado a lado ou inline.", + "ignoreTrimWhitespace": "Controla se o editor de diff mostra alterações nos espaços iniciais ou finais como diferenças", + "renderIndicators": "Controla se o editor de diff mostra indicadores +/- para alterações adicionadas/removidas", + "selectionClipboard": "Controla se a área primária de transferência Linux deve ser suportada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/ptb/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..40fed0886ccdb --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorViewAccessibleLabel": "Conteúdo do editor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/controller/cursor.i18n.json b/i18n/ptb/src/vs/editor/common/controller/cursor.i18n.json new file mode 100644 index 0000000000000..60bcb5f5b5ad5 --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/controller/cursor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "corrupt.commands": "Exceção inesperada ao executar o comando." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/model/textModelWithTokens.i18n.json b/i18n/ptb/src/vs/editor/common/model/textModelWithTokens.i18n.json new file mode 100644 index 0000000000000..fc3574b7fde68 --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/model/textModelWithTokens.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mode.tokenizationSupportFailed": "O modo falhou ao gerar token da entrada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/modes/modesRegistry.i18n.json b/i18n/ptb/src/vs/editor/common/modes/modesRegistry.i18n.json new file mode 100644 index 0000000000000..509203220c861 --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/modes/modesRegistry.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "plainText.alias": "Texto sem formatação" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/ptb/src/vs/editor/common/services/bulkEdit.i18n.json new file mode 100644 index 0000000000000..3fada6ebf5375 --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "Estes arquivos foram alterados nesse meio tempo: {0}", + "summary.0": "Não foram feitas edições", + "summary.nm": "Feitas {0} edições de texto em {1} arquivos", + "summary.n0": "Feitas {0} edições de texto em um arquivo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/services/modeServiceImpl.i18n.json b/i18n/ptb/src/vs/editor/common/services/modeServiceImpl.i18n.json new file mode 100644 index 0000000000000..85f2d2943f68d --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/services/modeServiceImpl.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.languages": "Contribui às declarações de linguagem.", + "vscode.extension.contributes.languages.id": "ID da linguagem", + "vscode.extension.contributes.languages.aliases": "Aliases de nome para esta linguagem.", + "vscode.extension.contributes.languages.extensions": "Extensões de arquivos associadas a esta linguagem", + "vscode.extension.contributes.languages.filenames": "Nome dos arquivos associados a esta linguagem", + "vscode.extension.contributes.languages.filenamePatterns": "Padrão glob de nomes de arquivos associados a linguagem.", + "vscode.extension.contributes.languages.mimetypes": "Tipos Mime associados à linguagem.", + "vscode.extension.contributes.languages.firstLine": "Uma expressão regular que coincide com a primeira linha de um arquivo da linguaguem.", + "vscode.extension.contributes.languages.configuration": "Um caminho relativo para um arquivo contendo opções de configuração para a linguagem." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/services/modelServiceImpl.i18n.json b/i18n/ptb/src/vs/editor/common/services/modelServiceImpl.i18n.json new file mode 100644 index 0000000000000..b6c528c5a2505 --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/services/modelServiceImpl.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "diagAndSourceMultiline": "[{0}] {1}", + "diagAndSource": "[{0}] {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/ptb/src/vs/editor/common/view/editorColorRegistry.i18n.json new file mode 100644 index 0000000000000..8d59b0fcb7d7f --- /dev/null +++ b/i18n/ptb/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lineHighlight": "Cor de fundo para a posição do cursor na seleção de linhas.", + "lineHighlightBorderBox": "Cor de fundo para a borda em volta da linha na posição do cursor", + "rangeHighlight": "Cor de fundo dos ranges selecionados, assim como abertura instantânea e descoberta de recursos ", + "caret": "Cor do cursor no editor.", + "editorWhitespaces": "Cor dos caracteres em branco no editor", + "editorIndentGuides": "Cor das guias de indentação do editor.", + "editorLineNumbers": "Cor dos números de linha do editor.", + "editorRuler": "Cor das réguas do editor.", + "editorCodeLensForeground": "Cor do primeiro plano das lentes de código do editor", + "editorBracketMatchBackground": "Cor de fundo atrás do colchetes correspondentes", + "editorBracketMatchBorder": "Cor para as caixas de colchetes correspondentes", + "editorOverviewRulerBorder": "Cor da borda da régua de visão geral.", + "editorGutter": "Cor de fundo da separação do editor.O separador contém os glifos das margens e os números de linha." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json b/i18n/ptb/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json new file mode 100644 index 0000000000000..e045839f7c689 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "introMsg": "Obrigado por testar a opção de acessibilidade do VS Code.", + "status": "Status", + "tabFocusModeOnMsg": "Pressionando Tab no editor corrente irá mover o foco para o próximo elemento focável. Mude este comportamento ao pressionar {0}.", + "tabFocusModeOnMsgNoKb": "Pressionando Tab no editor corrente irá mover o foco para o próximo elemento focável. O comando {0} não pode ser ativado atualmente por uma tecla.", + "tabFocusModeOffMsg": "Pressionando Tab no editor atual irá inserir um caractere Tab. Mude este comportamente ao pressionar {0}.", + "tabFocusModeOffMsgNoKb": "Pressionando Tab no editor atual irá inserir um caractere Tab. O comando {0} não pode ser ativado atualmente por uma tecla.", + "outroMsg": "Você pode ignorar essa dica e retornar ao editor apertando a tecla ESC", + "ShowAccessibilityHelpAction": "Mostrar ajuda de acessibilidade" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json b/i18n/ptb/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json new file mode 100644 index 0000000000000..4af1753636d6d --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "Ir para colchete" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json b/i18n/ptb/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json new file mode 100644 index 0000000000000..157105c4a358f --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "Mover cursor para a esquerda", + "caret.moveRight": "Mover cursor para a direita" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json b/i18n/ptb/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json new file mode 100644 index 0000000000000..c1d3083b1985c --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "Transport letras" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json b/i18n/ptb/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json new file mode 100644 index 0000000000000..903f9fc1086fc --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "Recortar", + "actions.clipboard.copyLabel": "Copiar", + "actions.clipboard.pasteLabel": "Colar", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "Copiar com realce de sintaxe" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/comment/common/comment.i18n.json b/i18n/ptb/src/vs/editor/contrib/comment/common/comment.i18n.json new file mode 100644 index 0000000000000..ff1ba569c0c95 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/comment/common/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "Alternar Comentário de Linha", + "comment.line.add": "Adicionar Comentário de Linha", + "comment.line.remove": "Remover Comentário de Linha", + "comment.block": "Alternar Comentário de Bloco" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json b/i18n/ptb/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json new file mode 100644 index 0000000000000..e2b1d946bee13 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "Mostrar o menu de contexto do editor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/find/browser/findWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/find/browser/findWidget.i18n.json new file mode 100644 index 0000000000000..473543c085045 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/find/browser/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Localizar", + "placeholder.find": "Localizar", + "label.previousMatchButton": "Correspondência anterior", + "label.nextMatchButton": "Próxima correspondência", + "label.toggleSelectionFind": "Localizar na seleção", + "label.closeButton": "Fechar", + "label.replace": "Substituir", + "placeholder.replace": "Substituir", + "label.replaceButton": "Substituir", + "label.replaceAllButton": "Substituir Tudo", + "label.toggleReplaceButton": "Ativar/desativar modo Substituir", + "title.matchesCountLimit": "Somente os primeiros 999 resultados são realçados, mas todas as operações de pesquisa funcionam em todo o texto.", + "label.matchesLocation": "{0} de {1}", + "label.noResults": "Nenhum resultado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/ptb/src/vs/editor/contrib/find/common/findController.i18n.json new file mode 100644 index 0000000000000..07397efa5fed7 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/find/common/findController.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "Localizar", + "findNextMatchAction": "Localizar Próximo", + "findPreviousMatchAction": "Localizar anterior", + "nextSelectionMatchFindAction": "Localizar Próxima Seleção", + "previousSelectionMatchFindAction": "Localizar Seleção Anterior", + "startReplace": "Substituir", + "addSelectionToNextFindMatch": "Adicionar Seleção ao Próximo Localizar Correspondência", + "addSelectionToPreviousFindMatch": "Adicionar Seleção à Correspondência de Localização Anterior", + "moveSelectionToNextFindMatch": "Mover Última Seleção para Próximo Localizar Correspondência", + "moveSelectionToPreviousFindMatch": "Mover Última Seleção para Correspondência de Localização Anterior", + "selectAllOccurencesOfFindMatch": "Selecionar Todas as Ocorrências de Localizar Correspondência", + "changeAll.label": "Alterar todas as ocorrências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/folding/browser/folding.i18n.json b/i18n/ptb/src/vs/editor/contrib/folding/browser/folding.i18n.json new file mode 100644 index 0000000000000..c9d6b88a85279 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/folding/browser/folding.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "Abrir", + "unFoldRecursivelyAction.label": "Abrir recursivamente", + "foldAction.label": "Colapsar", + "foldRecursivelyAction.label": "Colapsar recursivamente", + "foldAllAction.label": "Colapsar tudo", + "unfoldAllAction.label": "Abrir tudo", + "foldLevelAction.label": "Nível de colapsamento {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/ptb/src/vs/editor/contrib/format/browser/formatActions.i18n.json new file mode 100644 index 0000000000000..4327e5f6744c2 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "1 edição de formatação feita na linha {0}", + "hintn1": "{0} edições de formatação feitas na linha {1}", + "hint1n": "Feita 1 edição de formatação entre as linhas {0} e {1}", + "hintnn": "Feitas {0} edições de formatação entre as linhas {1} e {2}", + "formatDocument.label": "Formatar Documento", + "formatSelection.label": "Formatar Seleção" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..01753366bca15 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Não foi encontrada definição para '{0}'", + "generic.noResults": "Nenhuma definição encontrada", + "meta.title": "- {0} definições", + "actions.goToDecl.label": "Ir para Definição", + "actions.goToDeclToSide.label": "Abrir definição ao lado", + "actions.previewDecl.label": "Inspecionar definição", + "goToImplementation.noResultWord": "Nenhuma implementação encontrada para '{0}'", + "goToImplementation.generic.noResults": "Nenhuma implementação encontrada", + "meta.implementations.title": "– {0} implementações", + "actions.goToImplementation.label": "Ir para a implementação", + "actions.peekImplementation.label": "Inspecionar implementação", + "goToTypeDefinition.noResultWord": "Nenhuma definição encontrada para '{0}'", + "goToTypeDefinition.generic.noResults": "Nenhuma definição de tipo encontrada", + "meta.typeDefinitions.title": "– {0} definições de tipos", + "actions.goToTypeDefinition.label": "Ir para a definição de tipo", + "actions.peekTypeDefinition.label": "Inspecionar definição de tipo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..675cbe29ae198 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Clique para mostrar {0} definições." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json b/i18n/ptb/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json new file mode 100644 index 0000000000000..0ad65de88635a --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "Ir para o Próximo Erro ou Aviso", + "markerAction.previous.label": "Ir para o Erro ou Aviso Anterior", + "editorMarkerNavigationError": "Ferramenta de marcação de edição apresentando error na cor ", + "editorMarkerNavigationWarning": "Ferramenta de marcação de edição apresentando adventência na cor", + "editorMarkerNavigationBackground": "Cor de fundo da ferramenta de marcação de navegação do editor." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/ptb/src/vs/editor/contrib/hover/browser/hover.i18n.json new file mode 100644 index 0000000000000..196a8fb2bb0aa --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "Mostrar Item Flutuante" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json b/i18n/ptb/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json new file mode 100644 index 0000000000000..2c74cf6f1ec3a --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "Carregando..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json b/i18n/ptb/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json new file mode 100644 index 0000000000000..fbbfbd0216101 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "Substituir pelo valor anterior", + "InPlaceReplaceAction.next.label": "Substituir pelo próximo valor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/indentation/common/indentation.i18n.json b/i18n/ptb/src/vs/editor/contrib/indentation/common/indentation.i18n.json new file mode 100644 index 0000000000000..8edeaaf810408 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/indentation/common/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "Converter indentação em espaços.", + "indentationToTabs": "Coverter Indentação a Tabulações.", + "configuredTabSize": "Tamanho de Tabulação Configurado", + "selectTabWidth": "Selecione o Tamanho de Tabulação para o Arquivo Atual", + "indentUsingTabs": "Indentar Usando Tabulações", + "indentUsingSpaces": "Indentar Usando Espaços", + "detectIndentation": "Detectar Indentação a Partir do Conteúdo", + "editor.reindentlines": "Reindentar Linhas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.i18n.json b/i18n/ptb/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..e715c4d667fe4 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inspectTMScopes": "Desenvolvedor: Inspecionar escopos TM", + "inspectTMScopesWidget.loading": "Carregando..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json b/i18n/ptb/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json new file mode 100644 index 0000000000000..8a368ab368da1 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "Copiar linha acima", + "lines.copyDown": "Copiar linha abaixo", + "lines.moveUp": "Mover linha para cima", + "lines.moveDown": "Mover linha para baixo", + "lines.sortAscending": "Classificar Linhas Ascendentemente", + "lines.sortDescending": "Classificar Linhas Descendentemente", + "lines.trimTrailingWhitespace": "Cortar Espaço em Branco à Direita", + "lines.delete": "Excluir linha", + "lines.indent": "Recuar linha", + "lines.outdent": "Recuar linha para a esquerda", + "lines.insertBefore": "Inserir linha acima", + "lines.insertAfter": "Inserir linha abaixo", + "lines.deleteAllLeft": "Excluir tudo à Esquerda", + "lines.deleteAllRight": "Excluir Tudo à Direita", + "lines.joinLines": "Unir Linhas", + "editor.transpose": "Transpor caracteres ao redor do cursor", + "editor.transformToUppercase": "Transformar para maiúsculas", + "editor.transformToLowercase": "Transformar para minúsculas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/ptb/src/vs/editor/contrib/links/browser/links.i18n.json new file mode 100644 index 0000000000000..64628273f2a1c --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/links/browser/links.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "Cmd + clique para seguir o link", + "links.navigate": "Ctrl + clique para seguir o link", + "invalid.url": "Desculpe, falha ao abrir este link porque ele não está bem formatado: {0}", + "missing.url": "Desculpe, falha ao abrir este link porque seu destino está faltando.", + "label": "Abrir link" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json b/i18n/ptb/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json new file mode 100644 index 0000000000000..583be5b3e5c44 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "Inserir cursor acima", + "mutlicursor.insertBelow": "Inserir cursor abaixo", + "mutlicursor.insertAtEndOfEachLineSelected": "Adicionar Cursores ao Final das Linhas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json b/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json new file mode 100644 index 0000000000000..f0450d3f4de44 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "Dicas de parâmetro de gatilho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json new file mode 100644 index 0000000000000..0f8237adbb3f6 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0}, dica" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json b/i18n/ptb/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json new file mode 100644 index 0000000000000..01ae8d7aff8af --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "Mostrar correções ({0})", + "quickFix": "Mostrar correções", + "quickfix.trigger.label": "Correção Rápida" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json new file mode 100644 index 0000000000000..9d557535df611 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": "- {0} referências", + "references.action.label": "Localizar Todas as Referências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json new file mode 100644 index 0000000000000..65217d2ace886 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "Carregando..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json new file mode 100644 index 0000000000000..47c3685850e0d --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "símbolo em {0} na linha {1} e coluna {2}", + "aria.fileReferences.1": "1 símbolo em {0}", + "aria.fileReferences.N": "{0} símbolos em {1}", + "aria.result.0": "Nenhum resultado encontrado", + "aria.result.1": "Encontrado 1 símbolo em {0}", + "aria.result.n1": "Encontrados {0} símbolos em {1}", + "aria.result.nm": "Encontrados {0} símbolos em {1} arquivos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json new file mode 100644 index 0000000000000..72f61eeaf832b --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "Falha ao resolver arquivo.", + "referencesCount": "{0} referências", + "referenceCount": "{0} referência", + "missingPreviewMessage": "nenhuma visualização disponível", + "treeAriaLabel": "Referências", + "noResults": "Nenhum resultado", + "peekView.alternateTitle": "Referências", + "peekViewTitleBackground": "Cor de fundo da área de visualização do título.", + "peekViewTitleForeground": "Cor de visualização do título.", + "peekViewTitleInfoForeground": "Cor da visualização de informações do título.", + "peekViewBorder": "Cor das bordas e seta da área de visualização", + "peekViewResultsBackground": "Cor de fundo da área de visualização da lista de resultados.", + "peekViewResultsMatchForeground": "Cor de primeiro plano para nós de linha na lista de resultados visualizados.", + "peekViewResultsFileForeground": "Cor de primeiro plano para nós de arquivos na lista de resultados visualizados.", + "peekViewResultsSelectionBackground": "Cor de fundo da entrada selecionada na visualização da lista de resultados.", + "peekViewResultsSelectionForeground": "Cor da entrada selecionada na visualização da lista de resultados.", + "peekViewEditorBackground": "Cor de fundo da visualização do editor.", + "peekViewEditorGutterBackground": "Cor de fundo da separação na visualização rápida do editor.", + "peekViewResultsMatchHighlight": "Corresponder cor de realce com visualização da lista de resultados.", + "peekViewEditorMatchHighlight": "Corresponder cor de realce com visualização do editor." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/ptb/src/vs/editor/contrib/rename/browser/rename.i18n.json new file mode 100644 index 0000000000000..a56535f6241cf --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "Nenhum resultado.", + "aria": "Renomeado '{0}' para '{1}'com sucesso. Resumo: {2}", + "rename.failed": "Desculpe, falha na execução de renomear.", + "rename.label": "Renomear Símbolo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json b/i18n/ptb/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json new file mode 100644 index 0000000000000..49eba92fa449e --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "Renomear entrada. Digite o novo nome e tecle Enter para gravar." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json b/i18n/ptb/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json new file mode 100644 index 0000000000000..89319f9a26696 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "Expandir seleção", + "smartSelect.shrink": "Reduzir seleção" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json new file mode 100644 index 0000000000000..b064152c8be90 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "Ao aceitar '{0}' foi inserido o seguinte texto: {1}", + "suggest.trigger.label": "Sugestão de gatilho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json new file mode 100644 index 0000000000000..c9da4793d67a9 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "Cor de fundo para a ferramenta de sugestão.", + "editorSuggestWidgetBorder": "Cor da borda para a ferramenta de sugestão.", + "editorSuggestWidgetForeground": "Cor de primeiro plano para a ferramenta de sugestão.", + "editorSuggestWidgetSelectedBackground": "Cor de fundo da entrada selecionada da ferramenta de sugestões.", + "editorSuggestWidgetHighlightForeground": "Cor de realce da correspondência na ferramenta de sugestão.", + "readMore": "Ler Mais...{0}", + "suggestionWithDetailsAriaLabel": "{0}, sugestão, tem detalhes", + "suggestionAriaLabel": "{0}, sugestão", + "readLess": "Ler menos... {0}", + "suggestWidget.loading": "Carregando...", + "suggestWidget.noSuggestions": "Nenhuma sugestão.", + "suggestionAriaAccepted": "{0}, aceito", + "ariaCurrentSuggestionWithDetails": "{0}, sugestão, tem detalhes", + "ariaCurrentSuggestion": "{0}, sugestão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json b/i18n/ptb/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json new file mode 100644 index 0000000000000..0f3dd0680954e --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "Alterne o uso da tecla Tab para mover o foco" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json b/i18n/ptb/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json new file mode 100644 index 0000000000000..e8556cb38a817 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "Cor de fundo de um símbolo durante acesso de leitura, como ao ler uma variável.", + "wordHighlightStrong": "Cor de fundo de um símbolo durante acesso de escrita, como ao escrever uma variável." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json b/i18n/ptb/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json new file mode 100644 index 0000000000000..41ad7313b7de5 --- /dev/null +++ b/i18n/ptb/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Fechar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json b/i18n/ptb/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json new file mode 100644 index 0000000000000..dfef3cc47a597 --- /dev/null +++ b/i18n/ptb/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "Linguagem desconhecida em `contributes.{0}.language`. Valor fornecido: {1}", + "invalid.scopeName": "Esperada uma string em 'contributes.{0}.scopeName'. Valor informado: {1}", + "invalid.path.0": "Esperada uma string em `contributes.{0}.path`. Valor informado: {1}", + "invalid.injectTo": "Valor inválido em `contributes.{0}.injectTo`. Deve ser uma matriz de nomes de escopo de idioma. Valor fornecido: {1}", + "invalid.embeddedLanguages": "Valor inválido em `contributes.{0}.embeddedLanguages`. Deve ser um objeto de mapeamento do nome do escopo para a linguagem. Valor informado: {1}", + "invalid.path.1": "É esperado que `contributes.{0}.path` ({1}) seja incluído na pasta da extensão ({2}). Isto pode tornar a extensão não portável.", + "no-tm-grammar": "Nenhuma gramática TM registrada para este idioma." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/ptb/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..04aa2bc703fba --- /dev/null +++ b/i18n/ptb/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "Erros parseando {0}: {1}", + "schema.openBracket": "O colchete de abertura de caractere ou sequência de caracteres.", + "schema.closeBracket": "O colchete de fechamento de caractere ou sequência de caracteres.", + "schema.comments": "Define o símbolo dos comentários", + "schema.blockComments": "Define como comentários em bloco são marcados.", + "schema.blockComment.begin": "A sequência de caracteres que inicia um comentário em bloco.", + "schema.blockComment.end": "A sequência de caracteres que termina um comentário de bloco.", + "schema.lineComment": "A sequência de caracteres que inicia um comentário de linha.", + "schema.brackets": "Define os símbolos de colchetes que aumentam ou diminuem a indentação.", + "schema.autoClosingPairs": "Define os pares de colchetes. Quando é introduzido um colchete de abertura, o colchete de fechamento é inserido automaticamente.", + "schema.autoClosingPairs.notIn": "Define uma lista de escopos onde os auto pares são desativados.", + "schema.surroundingPairs": "Define os pares de colchetes que podem ser usados para cercar uma seqüência selecionada.", + "schema.wordPattern": "A definição da palavra para a linguagem.", + "schema.wordPattern.pattern": "O padrão RegExp usado para coincidir com as palavras.", + "schema.wordPattern.flags": "Os sinalizadores RegExp usados para coincidir com as palavras.", + "schema.wordPattern.flags.errorMessage": "Deve corresponder ao padrão `/^([gimuy]+)$/`." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/node/textMate/TMGrammars.i18n.json b/i18n/ptb/src/vs/editor/node/textMate/TMGrammars.i18n.json new file mode 100644 index 0000000000000..7707ea3401f3b --- /dev/null +++ b/i18n/ptb/src/vs/editor/node/textMate/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "Contibui aos toquenizadores textmate", + "vscode.extension.contributes.grammars.language": "Identificador da linguagem para qual a sintaxe contribui.", + "vscode.extension.contributes.grammars.scopeName": "Nome do escopo Textmate usado pelo arquivo tmLanguage.", + "vscode.extension.contributes.grammars.path": "Caminho para o arquivo tmLanguage. O caminho é relativo a pasta da extensão e geralmente começa com './syntaxes/'.", + "vscode.extension.contributes.grammars.embeddedLanguages": "Um mapeamento no nome do escopo para o Id da linguagem se esta gramática contenha linguagens embutidas.", + "vscode.extension.contributes.grammars.injectTo": "Lista de nomes de escopos de linguagem aos quais esta gramática é injetada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/actions/browser/menuItemActionItem.i18n.json b/i18n/ptb/src/vs/platform/actions/browser/menuItemActionItem.i18n.json new file mode 100644 index 0000000000000..e64a7d0ed09f0 --- /dev/null +++ b/i18n/ptb/src/vs/platform/actions/browser/menuItemActionItem.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "titleAndKb": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/ptb/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json new file mode 100644 index 0000000000000..a8ef6175a0970 --- /dev/null +++ b/i18n/ptb/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "os itens de menu devem ser um array", + "requirestring": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "optstring": "a propriedade `{0}` é opcional ou deve ser do tipo `string`", + "vscode.extension.contributes.menuItem.command": "Identificador do comando para ser executado. O comando deve ser declarado na seção de 'Comandos'", + "vscode.extension.contributes.menuItem.alt": "O identificador de um comando alternativo para executar. O comando deve ser declarado na sessão 'Comandos'", + "vscode.extension.contributes.menuItem.when": "Condição, que deve ser verdadeira, para mostrar esse item", + "vscode.extension.contributes.menuItem.group": "Grupo ao qual pertence este comando", + "vscode.extension.contributes.menus": "Contribui itens de menu ao editor", + "menus.commandPalette": "Paleta de comandos", + "menus.editorTitle": "Meno do título editor", + "menus.editorContext": "Mostrar o menu de contexto do editor", + "menus.explorerContext": "Menu no contexto de explorador de arquivos", + "menus.editorTabContext": "Mostrar o menu de contexto do editor", + "menus.debugCallstackContext": "O menu de contexto de pilha de chamadas de depuração", + "menus.scmTitle": "O menu de título do controle de fonte", + "menus.resourceGroupContext": "O menu de contexto do grupo de recursos de controle de fonte", + "menus.resourceStateContext": "O menu de contexto de estado de recursos do controle de fonte", + "nonempty": "Esperado um valor não vazio", + "opticon": "a propriedade '{0}' é opcional ou pode ser do tipo 'string'", + "requireStringOrObject": "a propriedade '{0}' é obrigatória e deve ser do tipo 'string'", + "requirestrings": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "vscode.extension.contributes.commandType.command": "Indentificador de comando para executar", + "vscode.extension.contributes.commandType.title": "Título para o qual o comando é representado na UI", + "vscode.extension.contributes.commandType.category": "(Opcional) Sequência de categoria será agrupada na interface de usuário", + "vscode.extension.contributes.commandType.icon": "(Opcional) Icone utilizado para representar o comando na interface de usuário. Um arquivo ou configuração do tema.", + "vscode.extension.contributes.commandType.icon.light": "Caminho do Ícone quando o tema light for utilizado", + "vscode.extension.contributes.commandType.icon.dark": "Caminho do ícone quando o tema dark for utilizado", + "vscode.extension.contributes.commands": "Contribui comandos à paleta de comandos", + "dup": "Comando '{0}' aparece multiplas vezes na sessão 'comandos'\n", + "menuId.invalid": "'{0}' nao é um identificador de menu válido ", + "missing.command": "Identificador do comando para ser executado. O comando deve ser declarado na seção de 'Comandos'", + "missing.altCommand": "Referências ao item de menu no alt-command '{0}' qual nao é definido na sessão 'comandos'", + "dupe.command": "Itens de referencias do mesmo comando como padrão e alt-command", + "nosupport.altCommand": "Desculpe, mas atualmente somente o groupo 'navegação' do menu 'editor/título' suporta alt-commands" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/ptb/src/vs/platform/configuration/common/configurationRegistry.i18n.json new file mode 100644 index 0000000000000..928f36b2ee48b --- /dev/null +++ b/i18n/ptb/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultConfigurations.title": "Sobreposições da Configuração Padrão", + "overrideSettings.description": "Definir que configurações do editor sejam substituídas para idioma {0}.", + "overrideSettings.defaultDescription": "Definir que configurações do editor sejam substituídas para um idioma.", + "vscode.extension.contributes.configuration": "Contribui às definições de configuração.", + "vscode.extension.contributes.configuration.title": "Um resumo das configurações. Este rótulo será usado no arquivo de configurações como um comentário de separação.", + "vscode.extension.contributes.configuration.properties": "Descrição das propriedades de configuração.", + "config.property.languageDefault": "Não é possível registrar '{0}'. Isto corresponde a propriedade padrão '\\\\[.*\\\\]$' para descrever configurações do editor específico de linguagem. Use a contribuição 'configurationDefaults'.", + "config.property.duplicate": "Não é possível registrar '{0}'. Esta propriedade já está registrada.", + "invalid.properties": "'configuration.properties' deve ser um objeto", + "invalid.type": "Se definido, 'configuration.type' deve ser do tipo 'object'", + "invalid.title": "'configuration.title' deve ser um string", + "vscode.extension.contributes.defaultConfiguration": "Contribui às definições de configuração padrão do editor por linguagem." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/environment/node/argv.i18n.json b/i18n/ptb/src/vs/platform/environment/node/argv.i18n.json new file mode 100644 index 0000000000000..4cec19113d217 --- /dev/null +++ b/i18n/ptb/src/vs/platform/environment/node/argv.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoValidation": "Argumentos no modo '--goto' deve ser no formato de 'Arquivo(:LINHA(:CARACTERE))'.", + "diff": "Abrir um editor de diff. Requer passar dois caminhos de arquivo como argumentos.", + "goto": "Abra o arquivo no caminho, na linha e caractere (addcionar:linha[:caractere] para o caminho).", + "locale": "Para localização utilize (ex. en-US ou zh-TW).", + "newWindow": "Força uma nova instância do Código.", + "performance": "Comece com o 'Desenvolvedor: Desempenho de inicialização' comando habilitado.", + "prof-startup": "Rodar o CPU profiler durante a inicialização", + "reuseWindow": "Forçar a abertura de um arquivo ou pasta na última janela ativa", + "userDataDir": "Especifica o diretório que os dados do usuário serão mantidos, útil quando estiver rodando como root.", + "verbose": "Imprimir a saída detalhada (Implica -- esperar).", + "wait": "Aguarde a janela ser fechada antes de retornar.", + "extensionHomePath": "Defina o caminho raíz para as extensões.", + "listExtensions": "Lista de extensões instaladas", + "showVersions": "Exibir versões de extensões instaladas, quando estiver usando --list-extension", + "installExtension": "Instala uma extensão.", + "uninstallExtension": "Desinstala uma extensão.", + "experimentalApis": "Permite recursos de api propostos para uma extensão.", + "disableExtensions": "Desabilita todas as extensões instaladas.", + "disableGPU": "Desabilita aceleração de hardware da GPU.", + "version": "Versão de impressão", + "help": "Uso de impressão.", + "usage": "Uso", + "options": "opções", + "paths": "caminhos", + "optionsUpperCase": "Opções" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json b/i18n/ptb/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json new file mode 100644 index 0000000000000..52f37b66ccd23 --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "Não há espaço de trabalho." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json b/i18n/ptb/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json new file mode 100644 index 0000000000000..33ea82613268b --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "Extensões", + "preferences": "Preferências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/ptb/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json new file mode 100644 index 0000000000000..76dc4cf48f3d0 --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "Extensão não encontrada", + "noCompatible": "Não foi possível econtrar uma versão de {0} com esta versão do Code." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/ptb/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json new file mode 100644 index 0000000000000..a6c5a37ab058b --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalidManifest": "Extensão inválida: pacote.json nao é um arquivo JSON válido", + "restartCode": "Por favor reinicie Code antes de reinstalar {0}.", + "installDependeciesConfirmation": "A instalação de '{0}' também inclui suas dependências. Gostaria de continuar?", + "install": "Sim", + "doNotInstall": "Não", + "uninstallDependeciesConfirmation": "Gostaria de desinstalar '{0}' somente, ou suas dependências também?", + "uninstallOnly": "Apenas", + "uninstallAll": "Todos", + "cancel": "Cancelar", + "uninstallConfirmation": "Tem certeza que deseja desinstalar '{0}'?", + "ok": "OK", + "singleDependentError": "Não foi possível desinstalar a extensão '{0}'. A extensão '{1}' depende dela.", + "twoDependentsError": "Não foi possível desinstalar a extensão '{0}'. As extensões '{1}' e '{2}' dependem dela.", + "multipleDependentsError": "Não foi possível desinstalar a extensão '{0}'. As extensões '{1}' e '{2}' e outras dependem dela.", + "notExists": "Não foi possível encontrar a extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensions/common/abstractExtensionService.i18n.json b/i18n/ptb/src/vs/platform/extensions/common/abstractExtensionService.i18n.json new file mode 100644 index 0000000000000..d521fce97ffba --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensions/common/abstractExtensionService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownDep": "Extensão '{1}' falhou ao ativar. Motivo: dependência desconhecida '{0}'.", + "failedDep1": "Extensão '{1}' falhou ao ativar. Motivo: a dependência '{0}' falhou ao ativar.", + "failedDep2": "Extensão '{0}' falhou ao ativar. Motivo: mais de 10 níveis de dependências (provavelmente um laço de dependência).", + "activationError": "Ativação da extensão `{0}` falhou: {1}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json new file mode 100644 index 0000000000000..649e13b03b16e --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.engines.vscode": "Para extensões do VS Code, especifica a versão do VS Code que a extensão é compatível. Não pode ser *. Por exemplo: ^0.10.5 indica compatibilidade com uma versão mínima de 0.10.5 para o VS Code.", + "vscode.extension.publisher": "O editor da extensão do VS Code.", + "vscode.extension.displayName": "O nome de exibição para a extensão do VS Code.", + "vscode.extension.categories": "As categorias usadas pela galeria do VS Code para categorizar a extensão.", + "vscode.extension.galleryBanner": "Banner usado na loja VS Code.", + "vscode.extension.galleryBanner.color": "A cor do banner usado no cabeçalho de página da loja VS Code.", + "vscode.extension.galleryBanner.theme": "A cor do tema usada para o fonte usado no banner.", + "vscode.extension.contributes": "Todas as contribuições da extensão VS Code representadas por este pacote.", + "vscode.extension.preview": "Configura a extensão para ser marcada como pré-visualização na Loja.", + "vscode.extension.activationEvents": "Eventos de ativação para a extensão VS Code.", + "vscode.extension.badges": "Matriz de emblemas a mostrar na barra lateral da página da extensão na Loja.", + "vscode.extension.badges.url": "URL da imagem do emblema.", + "vscode.extension.badges.href": "Link do emblema.", + "vscode.extension.badges.description": "Descrição do emblema.", + "vscode.extension.extensionDependencies": "Dependências para outras extensões. O identificador de uma extensão sempre é ${publisher}. ${nome}. Por exemplo: vscode.csharp.", + "vscode.extension.scripts.prepublish": "Script a ser executado antes do pacote ser publicado como uma extensão VS Code.", + "vscode.extension.icon": "O caminho para um ícone de 128x128 pixels." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/extensions/node/extensionValidator.i18n.json b/i18n/ptb/src/vs/platform/extensions/node/extensionValidator.i18n.json new file mode 100644 index 0000000000000..fe37dd1820f45 --- /dev/null +++ b/i18n/ptb/src/vs/platform/extensions/node/extensionValidator.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "versionSyntax": "Não foi possível analisar o valor de 'engines.vscode' {0}. Por favor, utilize, por exemplo: ^ 0.10.0, ^ 1.2.3, ^ 0.11.0, ^ 0.10.x, etc.", + "versionSpecificity1": "Versão especificada em 'engines.vscode' ({0}) não é específica o suficiente. Para versões do vscode anteriores a 1.0.0, por favor defina no mínimo a versão principal e secundária desejada. Por exemplo, ^ 0.10.0, 0.10.x, 0.11.0, etc.", + "versionSpecificity2": "Versão especificada em 'engines.vscode' ({0}) não é específica o suficiente. Para as versões do vscode posteriores a 1.0.0, por favor defina no mínimo a versão principal do desejado. Por exemplo, ^ 1.10.0, 1.10.x 1. XX, 2.x.x, etc.", + "versionMismatch": "Extensão não é compatível com Code {0}. A extensão requer: {1}.", + "extensionDescription.empty": "Descrição de extensão vazia obtida", + "extensionDescription.publisher": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "extensionDescription.name": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "extensionDescription.version": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "extensionDescription.engines": "a propriedade `{0}` é obrigatória e deve ser do tipo `object`", + "extensionDescription.engines.vscode": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "extensionDescription.extensionDependencies": "a propriedade `{0}` pode ser omitida ou deve ser do tipo `string[]`", + "extensionDescription.activationEvents1": "a propriedade `{0}` pode ser omitida ou deve ser do tipo `string[]`", + "extensionDescription.activationEvents2": "Propriedades '{0}' e '{1}' devem ser especificadas ou devem ambas ser omitidas", + "extensionDescription.main1": "a propriedade `{0}` é opcional ou pode ser do tipo `string`", + "extensionDescription.main2": "Esperado 'main' ({0}) ser incluído dentro da pasta da extensão ({1}). Isto pode fazer a extensão não-portável.", + "extensionDescription.main3": "propriedades '{0}' e '{1}' devem ser especificadas ou devem ambas ser omitidas", + "notSemver": "Versão da extensão não é compatível a semver" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json b/i18n/ptb/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json new file mode 100644 index 0000000000000..d252527ac1533 --- /dev/null +++ b/i18n/ptb/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "integrity.ok": "OK", + "integrity.dontShowAgain": "Não mostrar novamente", + "integrity.moreInfo": "Mais informações", + "integrity.prompt": "Sua instalação de {0} parece estar corrompida. Favor reinstalar." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json b/i18n/ptb/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..47ff1ba6badad --- /dev/null +++ b/i18n/ptb/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "contributes.jsonValidation": "Contribui à configuração do schema json.", + "contributes.jsonValidation.fileMatch": "O padrão de arquivo a corresponder, por exemplo \"package.json\" ou \"*.launch\".", + "contributes.jsonValidation.url": "Um esquema de URL ('http:', 'https:') ou caminho relativo à pasta de extensão('./').", + "invalid.jsonValidation": "'configuration.jsonValidation' deve ser uma matriz", + "invalid.fileMatch": "'configuration.jsonValidation.fileMatch' deve ser definido", + "invalid.url": "'configuration.jsonValidation.url' deve ser uma URL ou caminho relativo", + "invalid.url.fileschema": "'configuration.jsonValidation.url' é uma URL relativa inválida: {0}", + "invalid.url.schema": "'configuration.jsonValidation.url' deve começar com ' http:', ' https: 'ou'. /' para os esquemas de referência localizados na extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json b/i18n/ptb/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json new file mode 100644 index 0000000000000..59961c4476a0f --- /dev/null +++ b/i18n/ptb/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "first.chord": "({0}) foi pressionado. Aguardando segunda tecla de pressionamento simultâneo...", + "missing.chord": "A combinação de chave ({0}, {1}) não é um comando." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/keybinding/common/keybindingLabels.i18n.json b/i18n/ptb/src/vs/platform/keybinding/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..bf2baf8390608 --- /dev/null +++ b/i18n/ptb/src/vs/platform/keybinding/common/keybindingLabels.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ctrlKey": "Ctrl", + "shiftKey": "Shift", + "altKey": "Alt", + "windowsKey": "Windows", + "ctrlKey.long": "Controle", + "shiftKey.long": "Shift", + "altKey.long": "Alt", + "cmdKey.long": "Comando", + "windowsKey.long": "Windows" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/ptb/src/vs/platform/markers/common/problemMatcher.i18n.json new file mode 100644 index 0000000000000..29df9e58b2bf0 --- /dev/null +++ b/i18n/ptb/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ProblemPatternParser.loopProperty.notLast": "A propriedade loop só é suportada na última linha correspondente.", + "ProblemPatternParser.problemPattern.missingRegExp": "Está faltando uma expressão regular a problema padrão.", + "ProblemPatternParser.problemPattern.missingProperty": "O problema padrão é inválido. Ele deve ter ao menos um arquivo, mensagem e linha ou local de grupo de correspondência.", + "ProblemPatternParser.invalidRegexp": "Erro: a cadeia de caracteres {0} não é uma expressão regular válida.\n", + "ProblemPatternSchema.regexp": "A expressão regular para procurar um erro, aviso ou informação na saída.", + "ProblemPatternSchema.file": "O índice do grupo de correspondência do arquivo. Se omitido, será usado 1.", + "ProblemPatternSchema.location": "O índice de grupo de correspondência da localização do problema. Padrões de localização válidos são: (linha), (linha, coluna) e (startLine, startColumn, endLine, endColumn). Se omitido (linha, coluna) é assumido.", + "ProblemPatternSchema.line": "O índice de grupo de correspondência da linha do problema. O padrão é 2", + "ProblemPatternSchema.column": "O índice de grupo de correspondência de caractere da linha do problema. O padrão é 3", + "ProblemPatternSchema.endLine": "O índice de grupo de correspondência de linha final do problema. O padrão é indefinido", + "ProblemPatternSchema.endColumn": "O índice de grupo de correspondência de caráter final de linha do problema. O padrão é indefinido", + "ProblemPatternSchema.severity": "O índice de grupo de correspondência da gravidade do problema. O padrão é indefinido", + "ProblemPatternSchema.code": "O índice de grupo de correspondência do código do problema. O padrão é indefinido", + "ProblemPatternSchema.message": "O índice de grupo de correspondência da mensagem. Se omitido o padrão é 4 se o local for especificado. Caso contrário o padrão é 5.", + "ProblemPatternSchema.loop": "Em um loop de correspondência multi linha indica se este padrão é executado em um loop enquanto houver correspondências. Somente pode ser especificado no último padrão em um padrão de linha múltiplas.", + "NamedProblemPatternSchema.name": "O nome do modelo de problema.", + "NamedMultiLineProblemPatternSchema.name": "O nome do modelo de problema multi-linhas.", + "NamedMultiLineProblemPatternSchema.patterns": "Os padrões atuais.", + "ProblemPatternExtPoint": "Contribui aos modelos de problema", + "ProblemPatternRegistry.error": "Modelo de problema inválido. O modelo será ignorado.", + "ProblemMatcherParser.noProblemMatcher": "Erro: a descrição não pode ser convertida em uma correspondência de problema:\n{0}\n\n", + "ProblemMatcherParser.noProblemPattern": "Erro: a descrição nao define um padrão de problema válido: {0}\n", + "ProblemMatcherParser.noOwner": "Erro: a descriçao não define um proprietário:\n{0}\n", + "ProblemMatcherParser.noFileLocation": "Erro: a descrição não define uma localização de arquivo:\n{0}\n", + "ProblemMatcherParser.unknownSeverity": "Info: severidade {0} desconhecida. Valores válidos são erro, aviso e info.\n", + "ProblemMatcherParser.noDefinedPatter": "Erro: o padrão com o identificador {0} não existe.", + "ProblemMatcherParser.noIdentifier": "Erro: a propriedade padrão se refere a um identificador vazio.", + "ProblemMatcherParser.noValidIdentifier": "Erro: a propriedade padrão {0} não é uma variável de padrões válida.", + "ProblemMatcherParser.problemPattern.watchingMatcher": "Um problema de correspondência deve obrigatoriamente definir padrão inicial e um padrão final para monitoramento.", + "ProblemMatcherParser.invalidRegexp": "Erro: a cadeia de caracteres {0} não é uma expressão regular válida.\n", + "WatchingPatternSchema.regexp": "A expressão regular para detectar o início ou o fim de uma tarefa em segundo plano.", + "WatchingPatternSchema.file": "O índice do grupo de correspondência do arquivo. Pode ser omitido.", + "PatternTypeSchema.name": "O nome de um padrão pré-definido ou contribuído.", + "PatternTypeSchema.description": "Um padrão de problema ou o nome de um padrão de problema pré-definido ou contribuído. Pode ser omitido se base for especificada.", + "ProblemMatcherSchema.base": "O nome de uma correspondência de problema base a ser utilizado.", + "ProblemMatcherSchema.owner": "O proprietário de um problema dentro do código. Pode ser omitido se base for especificada. Default para 'externo' se omitido e base não for especificada.", + "ProblemMatcherSchema.severity": "A severidade padrão para captura de problemas. É utilizada se o padrão não definir um grupo correspondente para severidade.", + "ProblemMatcherSchema.applyTo": "Controla se um problema reportado em um documento de texto é aplicado somente para aberto, fechado ou todos os documentos.", + "ProblemMatcherSchema.fileLocation": "Define como os nomes de arquivos reportados em um padrão de problema devem ser interpretados.", + "ProblemMatcherSchema.background": "Padrões para monitorar o início e o término de um pesquisador ativo em uma tarefa em segundo plano.", + "ProblemMatcherSchema.background.activeOnStart": "Se configurado para verdadeiro, o monitor em segundo plano está em modo ativo quando a tarefa inicia. Isto é igual a emissão de uma linha que corresponde ao beginPattern", + "ProblemMatcherSchema.background.beginsPattern": "Se houver correspondência na saída o início de uma tarefa em segundo plano é sinalizada.", + "ProblemMatcherSchema.background.endsPattern": "Se houver correspondência na saída o final de uma tarefa em segundo plano é sinalizada.", + "ProblemMatcherSchema.watching.deprecated": "A propriedade watching foi descontinuada. Use background no lugar dela.", + "ProblemMatcherSchema.watching": "Padrões para monitorar o início e o término de um pesquisador observando.", + "ProblemMatcherSchema.watching.activeOnStart": "Se configurado para verdadeiro, o monitoramento está em modo ativo quando a tarefa inicia. Isto é igual a emissão de uma linha que corresponde ao beginPattern", + "ProblemMatcherSchema.watching.beginsPattern": "Se houver correspondência na saída o início de uma tarefa observada é sinalizada.", + "ProblemMatcherSchema.watching.endsPattern": "Se houver correspondência na saída o final de uma tarefa observada é sinalizada.", + "LegacyProblemMatcherSchema.watchedBegin.deprecated": "Esta propriedade está descontinuada. Ao invés, use a propriedade de observação.", + "LegacyProblemMatcherSchema.watchedBegin": "Uma expressão regular sinalizando que uma tarefa observada é ativada através da observação.", + "LegacyProblemMatcherSchema.watchedEnd.deprecated": "Esta propriedade está descontinuada. Ao invés, use a propriedade de observação.", + "LegacyProblemMatcherSchema.watchedEnd": "Uma expressão regular sinalizando que uma tarefa observada terminou a execução.", + "NamedProblemMatcherSchema.name": "O nome do correspondente do problema.", + "ProblemMatcherExtPoint": "Contribui aos correspondentes de problema" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/message/common/message.i18n.json b/i18n/ptb/src/vs/platform/message/common/message.i18n.json new file mode 100644 index 0000000000000..620c63edd0712 --- /dev/null +++ b/i18n/ptb/src/vs/platform/message/common/message.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Fechar", + "later": "Mais tarde", + "cancel": "Cancelar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/request/node/request.i18n.json b/i18n/ptb/src/vs/platform/request/node/request.i18n.json new file mode 100644 index 0000000000000..1f7fd75e5aa68 --- /dev/null +++ b/i18n/ptb/src/vs/platform/request/node/request.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "httpConfigurationTitle": "HTTP", + "proxy": "As configurações de proxy a usar. Se não forem configuradas, serão obtidas das variáveis de ambiente http_proxy e https_proxy", + "strictSSL": "Se o certificado do servidor de proxy deve ser verificado contra a lista de autoridades de certificação fornecida.", + "proxyAuthorization": "O valor para enviar como o cabeçalho de 'autorização Proxy' para cada solicitação de rede." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/telemetry/common/telemetryService.i18n.json b/i18n/ptb/src/vs/platform/telemetry/common/telemetryService.i18n.json new file mode 100644 index 0000000000000..a1d67b82fb73f --- /dev/null +++ b/i18n/ptb/src/vs/platform/telemetry/common/telemetryService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetria", + "telemetry.enableTelemetry": "Permitir que os dados de uso e erros sejam enviados à Microsoft." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json new file mode 100644 index 0000000000000..64d68304f9806 --- /dev/null +++ b/i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.color": "Formato inválido de cor. Use #RGB, #RGBA, #RRGGBB ou #RRGGBBAA", + "schema.colors": "Cores usadas no workbench.", + "foreground": "Cor de primeiro plano geral. Essa cor é só usada se não for substituída por um componente.", + "errorForeground": "Cor de primeiro plano geral para mensagens de erro. Essa cor é só usada se não for substituída por um componente.", + "descriptionForeground": "Cor de primeiro plano para a descrição do texto provendo informação adicional, por exemplo para uma etiqueta.", + "focusBorder": "Cor geral da borda para elementos focalizados. Essa cor é usada somente se não for substituída por um componente.", + "contrastBorder": "Uma borda extra em torno de elementos para separá-los dos outros de maior contraste.", + "activeContrastBorder": "Uma borda extra em torno de elementos ativos para separá-los dos outros de maior contraste.", + "selectionBackground": "A cor de fundo das seleções de texto na bancada de trabalho (por exemplo, para campos de entrada ou áreas de texto). Note que isto não se aplica a seleções dentro do editor e do terminal.", + "textSeparatorForeground": "Cor para separadores de texto.", + "textLinkForeground": "Cor de primeiro plano para links no texto.", + "textLinkActiveForeground": "Cor de primeiro plano para links ativos no texto.", + "textPreformatForeground": "Cor de primeiro plano para segmentos de texto pré-formatados.", + "textBlockQuoteBackground": "Cor de fundo para blocos de citações no texto.", + "textBlockQuoteBorder": "Cor da borda para blocos de citações no texto.", + "textCodeBlockBackground": "Cor de fundo para blocos de código no texto.", + "widgetShadow": "Cor de sombra ferramentas como localizar/substituir dentro do editor.", + "inputBoxBackground": "Cor de fundo da caixa de entrada.", + "inputBoxForeground": "Cor de primeiro plano da caixa de entrada.", + "inputBoxBorder": "Borda da caixa de entrada.", + "inputBoxActiveOptionBorder": "Cor da borda das opções ativas em campos de entrada.", + "inputPlaceholderForeground": "Cor de primeiro plano da caixa de entrada para o texto de espaço reservado.", + "inputValidationInfoBackground": "Cor de fundo de validação de entrada para a severidade de informações.", + "inputValidationInfoBorder": "Cor da borda de validação de entrada para a severidade de informações.", + "inputValidationWarningBackground": "Cor de fundo de validação de entrada para avisos.", + "inputValidationWarningBorder": "Cor da borda de validação para a severidade de avisos.", + "inputValidationErrorBackground": "Cor de fundo de validação de entrada para a severidade do erro.", + "inputValidationErrorBorder": "Cor da borda de validação de entrada para a severidade do erro.", + "dropdownBackground": "Cor de fundo do menu suspenso.", + "dropdownForeground": "Cor de primeiro plano do menu suspenso.", + "dropdownBorder": "Borda do menu suspenso.", + "listFocusBackground": "Cor de fundo para o item focalizado de Lista/árvore quando a lista/árvore está ativa. Uma árvore/lista de ativa tem o foco do teclado, uma inativa não.", + "listFocusForeground": "Cor de fundo da Lista/árvore para o item focalizado quando a lista/árvore está ativa. Uma árvore/lista ativa tem o foco do teclado, uma inativa não.", + "listActiveSelectionBackground": "Cor de fundo para o item selecionado de Lista/árvore quando a lista/árvore está ativa. Uma lista/árvore ativa tem o foco do teclado, uma inativa não.", + "listActiveSelectionForeground": "Cor de primeiro plano para o item selecionado de Lista/árvore quando a lista/árvore está ativa. Uma lista/árvore ativa tem o foco do teclado, uma inativa não.", + "listInactiveSelectionBackground": "Cor de fundo para o item selecionado de Lista/árvore quando a lista/árvore está inativa. Uma lista/árvore ativa tem o foco do teclado, uma inativa não.", + "listInactiveSelectionForeground": "Cor de primeiro plano para Lista/árvore para o item selecionado quando a lista/árvore está inativa. Uma árvore/lista ativa tem o foco do teclado, um inativo não.", + "listHoverBackground": "Cor de fundo de Lista/árvore quando pairando sobre itens usando o mouse.", + "listHoverForeground": "Primeiro plano da Lista/Árvoce quando passar sobre itens usando o mouse.", + "listDropBackground": "Cor de fundo ao arrastar e soltar de Lista/árvore quando movendo itens usando o mouse.", + "highlight": "Cor de primeiro plano de Lista/árvore de destaques de correspondências ao pesquisar na árvore/lista.", + "pickerGroupForeground": "Seletor rápido de cor para rótulos de agrupamento.", + "pickerGroupBorder": "Seletor rápido de cor para bordas de agrupamentos.", + "buttonForeground": "Cor de primeiro plano do botão.", + "buttonBackground": "Cor de fundo do botão.", + "buttonHoverBackground": "Cor de fundo de botão quando flutuar sobre ele.", + "badgeBackground": "Cor de fundo do distintivo. Distintivos são rótulos de pequenas informações, por exemplo, para a contagem de resultados de pesquisa.", + "badgeForeground": "Cor de primeiro plano do distintivo. Distintivos são rótulos de pequenas informações, por exemplo, para a contagem de resultados de pesquisa.", + "scrollbarShadow": "Sombra da barra de rolagem para indicar que a visualização está sendo rolada.", + "scrollbarSliderBackground": "Cor de fundo do controle deslizante.", + "scrollbarSliderHoverBackground": "Cor de fundo de controle deslizante quando estiver flutuando sobre ele.", + "scrollbarSliderActiveBackground": "Cor de fundo de controle deslizante quando ativo.", + "progressBarBackground": "Cor de fundo da barra de progresso que pode ser mostrada em operações de execução demorada.", + "editorBackground": "Cor de plano de fundo do editor.", + "editorForeground": "Cor de primeiro plano padrão do editor.", + "editorWidgetBackground": "Cor de plano de fundo das ferramentas de edição, como pesquisar/substituir.", + "editorWidgetBorder": "Cor da borda da ferramenta editor.", + "editorSelection": "Cor de seleção do editor.", + "editorInactiveSelection": "Cor de seleção em um editor inativo.", + "editorSelectionHighlight": "Cor de regiões com o mesmo conteúdo da seleção.", + "editorFindMatch": "Cor da correspondência de pesquisa atual.", + "findMatchHighlight": "Cor dos outros resultados de pesquisa.", + "findRangeHighlight": "Cor da faixa que limita a pesquisa.", + "hoverHighlight": "Realçar abaixo da palavra onde é mostrado item flutuante", + "hoverBackground": "Cor de fundo para o item flutuante do editor", + "hoverBorder": "Cor da borda para o item flutuante do editor.", + "activeLinkForeground": "Cor dos links ativos.", + "diffEditorInserted": "Cor de fundo para texto que foi inserido.", + "diffEditorRemoved": "Cor de fundo para texto que foi removido.", + "diffEditorInsertedOutline": "Cor de contorno para o texto que foi inserido.", + "diffEditorRemovedOutline": "Cor de contorno para o texto que foi removido." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..d45294dd31757 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "overwritingExtension": "Sobrescrevendo extensão {0} por {1}.", + "extensionUnderDevelopment": "Carregando extensão de desenvolvimento em {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..0feb87677bb4d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Fechar", + "cancel": "Cancelar", + "ok": "OK" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/api/node/extHostDiagnostics.i18n.json b/i18n/ptb/src/vs/workbench/api/node/extHostDiagnostics.i18n.json new file mode 100644 index 0000000000000..867922ab8d2da --- /dev/null +++ b/i18n/ptb/src/vs/workbench/api/node/extHostDiagnostics.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "limitHit": "Não apresentando {0} erros e avisos a mais." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/ptb/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..d5ca67a935360 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeView.notRegistered": "Nenhuma visualização de árvore com id '{0}' registrado.", + "treeItem.notFound": "Nenhum item de árvore com id '{0}' encontrado.", + "treeView.duplicateElement": "Elemento {0} já está registrado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/configureLocale.i18n.json new file mode 100644 index 0000000000000..80686b2c89835 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "configureLocale": "Configurar Idioma", + "displayLanguage": "Define o idioma de exibição do VSCode.", + "doc": "Veja {0} para obter uma lista dos idiomas suportados.", + "restart": "Modificar o valor requer reinicialização do VSCode.", + "fail.createSettings": "Não foi possível criar '{0}' ({1}).", + "JsonSchema.locale": "O idioma da interface do usuário a ser usada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/fileActions.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/fileActions.i18n.json new file mode 100644 index 0000000000000..9da2e4e11c7b4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/fileActions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFolder": "Abrir Pasta...", + "openFileFolder": "Abrir..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json new file mode 100644 index 0000000000000..02e74f2918f40 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleActivityBar": "Alternar Visibilidade da Barra de Atividades", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json new file mode 100644 index 0000000000000..4cdb847aaca74 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleEditorGroupLayout": "Alternar Layout Vertical/Horizontal do Grupo de Editor", + "horizontalLayout": "Layout do Grupo de Editor Horizontal", + "verticalLayout": "Layout do Grupo de Editor Vertical", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json new file mode 100644 index 0000000000000..ee4fc5303618d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Alternar Localização da Barra Lateral", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json new file mode 100644 index 0000000000000..5143e35479cc2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleSidebar": "Alternar Localização da Barra Lateral", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json new file mode 100644 index 0000000000000..5376fb36c3a63 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleStatusbar": "Alternar Visibilidade da Barra de Status", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/actions/toggleZenMode.i18n.json b/i18n/ptb/src/vs/workbench/browser/actions/toggleZenMode.i18n.json new file mode 100644 index 0000000000000..b0a635982f2ef --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/actions/toggleZenMode.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleZenMode": "Alternar Modo Zen", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json new file mode 100644 index 0000000000000..8dab311a65fbf --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeFromActivityBar": "Remover da Barra de Atividades", + "keepInActivityBar": "Manter na Barra de Atividades", + "titleKeybinding": "{0} ({1})", + "additionalViews": "Visualizações Adicionais", + "numberBadge": "{0} ({1})", + "manageExtension": "Gerenciar Extensão", + "toggle": "Alternar Visualização Fixa" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json new file mode 100644 index 0000000000000..5f8a7bb47ded7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hideActivitBar": "Ocultar a Barra de Atividades", + "activityBarAriaLabel": "Chave do Modo de exibição Ativo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/compositePart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/compositePart.i18n.json new file mode 100644 index 0000000000000..e12e6d4b90e56 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/compositePart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ariaCompositeToolbarLabel": "{0} ações ", + "titleTooltip": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json new file mode 100644 index 0000000000000..a38af02d66352 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "metadataDiff": "{0} ↔ {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json new file mode 100644 index 0000000000000..53321246ac788 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "binaryEditor": "Visualizador binário" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json new file mode 100644 index 0000000000000..dbfae18a9bfb0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textEditor": "Editor de texto", + "textDiffEditor": "Editor de Diferentes Textos", + "binaryDiffEditor": "Editor de Diferença Binária", + "sideBySideEditor": "Editor Lado a lado", + "groupOnePicker": "Mostrar editores no primeiro grupo", + "groupTwoPicker": "Mostrar editores no segundo grupo", + "groupThreePicker": "Mostrar editores no terceiro grupo", + "allEditorsPicker": "Mostrar todos editores abertos", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json new file mode 100644 index 0000000000000..ae6f9ae84b78d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -0,0 +1,55 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitEditor": "Dividir editor", + "joinTwoGroups": "Juntar editores de dois grupos", + "navigateEditorGroups": "Navegar entre grupos de editores", + "focusActiveEditorGroup": "Focalizar grupo de editores ativo", + "focusFirstEditorGroup": "Focalizar o primeiro grupo de editores", + "focusSecondEditorGroup": "Focalizar o segundo grupo de editores", + "focusThirdEditorGroup": "Focalizar o terceiro grupo de editores", + "focusPreviousGroup": "Focalizar grupo anterior", + "focusNextGroup": "Focalizar próximo grupo", + "openToSide": "Aberto para o lado", + "closeEditor": "Fechar editor", + "revertAndCloseActiveEditor": "Reverter e fechar editor", + "closeEditorsToTheLeft": "Fechar editores à esquerda ", + "closeEditorsToTheRight": "Fechar editores à direita", + "closeAllEditors": "Fechar todos editores", + "closeEditorsInOtherGroups": "Fechar editores nos outros grupos", + "closeOtherEditorsInGroup": "Fechar outros editores", + "closeEditorsInGroup": "Fechar todos editores no grupo", + "moveActiveGroupLeft": "Mover grupo de editores para esquerda", + "moveActiveGroupRight": "Mover grupo de editores para direita", + "minimizeOtherEditorGroups": "Minimizar outros grupos de editores", + "evenEditorGroups": "Igualar larguras de grupos de editores", + "maximizeEditor": "Maximizar grupo de editor e ocultar barra lateral", + "keepEditor": "Manter editor", + "openNextEditor": "Abrir próximo editor", + "openPreviousEditor": "Abrir editor anterior", + "nextEditorInGroup": "Abrir próximo editor no grupo", + "openPreviousEditorInGroup": "Abrir editor anterior no grupo", + "navigateNext": "Avançar", + "navigatePrevious": "Voltar", + "reopenClosedEditor": "Reabrir Editor Fechado", + "clearRecentFiles": "Limpar arquivos recentes", + "showEditorsInFirstGroup": "Mostrar editores no primeiro grupo", + "showEditorsInSecondGroup": "Mostrar editores no segundo grupo", + "showEditorsInThirdGroup": "Mostrar editores no terceiro grupo", + "showEditorsInGroup": "Mostrar editores no grupo", + "showAllEditors": "Mostrar todos editores", + "openPreviousRecentlyUsedEditorInGroup": "Abrir o Editor Anterior Recentemente Usado no Grupo", + "openNextRecentlyUsedEditorInGroup": "Abrir o Próximo Editor Recentemente Usado no Grupo", + "navigateEditorHistoryByInput": "Abrir o Editor Anterior do Histórico", + "openNextRecentlyUsedEditor": "Abrir o Próximo Editor Recentemente Utilizado", + "openPreviousRecentlyUsedEditor": "Abrir o Editor Anterior Recentemente Utilizado", + "clearEditorHistory": "Limpar Histórico do Editor", + "focusLastEditorInStack": "Abrir Último Editor do Grupo", + "moveEditorLeft": "Mover Editor para Esquerda", + "moveEditorRight": "Mover Editor para Direita", + "moveEditorToPreviousGroup": "Mover Editor para o Grupo Anterior", + "moveEditorToNextGroup": "Mover o Editor para o Próximo Grupo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json new file mode 100644 index 0000000000000..f42c45c02f558 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorCommand.activeEditorMove.description": "Mover o editor ativo por guias ou grupos", + "editorCommand.activeEditorMove.arg.name": "Argumento de movimento do editor ativo", + "editorCommand.activeEditorMove.arg.description": "Propriedades do argumento: \n\t\t\t\t\t\t- 'para': sequência de valor fornecendo para onde mover.\n\t\t\t\t\t\t- 'por': sequência de valor, fornecendo a unidade para o movimento. Por guia ou por grupo.\n\t\t\t\t\t\t- 'valor': valor numérico, fornecendo quantas posições ou uma posição absoluta para mover.\n\t\t\t\t\t", + "commandDeprecated": "Comando **{0}** foi removido. Você pode usar **{1}** em vez disso", + "openKeybindings": "Configurar os atalhos de teclado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPart.i18n.json new file mode 100644 index 0000000000000..c6a90d88542a6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPart.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "groupOneVertical": "Esquerda", + "groupTwoVertical": "Centro", + "groupThreeVertical": "Direita", + "groupOneHorizontal": "Topo", + "groupTwoHorizontal": "Centro", + "groupThreeHorizontal": "Baixo", + "editorOpenError": "Não foi possível abrir '{0}': {1}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json new file mode 100644 index 0000000000000..e17bc9405654b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, seletor de grupo editor", + "groupLabel": "Grupo: {0}", + "noResultsFoundInGroup": "Não foi encontrado nennhum editor aberto no grupo", + "noOpenedEditors": "Lista de editores abertos está atualmente vazia no grupo", + "noResultsFound": "Não foi encontrado editor correspondente aberto", + "noOpenedEditorsAllGroups": "A lista de editores abertos está atualmente vazia" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json new file mode 100644 index 0000000000000..c2057c183a1f6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "singleSelectionRange": "Ln {0}, {1} Col ({2} selecionado)", + "singleSelection": "Ln {0}, {1} Col", + "multiSelectionRange": "{0} seleções ({1} caracteres selecionados)", + "multiSelection": "{0} seleções", + "endOfLineLineFeed": "LF", + "endOfLineCarriageReturnLineFeed": "CRLF", + "tabFocusModeEnabled": "Tabulação move o foco", + "disableTabMode": "Desativar o modo de acessibilidade", + "gotoLine": "Ir para linha", + "indentation": "Indentação", + "selectEncoding": "Selecionar a codificação", + "selectEOL": "Selecionar a sequência de fim de linha", + "selectLanguageMode": "Selecionar modo de idioma", + "fileInfo": "Informações do arquivo", + "spacesSize": "Espaços: {0}", + "tabSize": "Tamanho de Tabulação: {0}", + "showLanguageExtensions": "Pesquisar extensões na loja para '{0}'...", + "changeMode": "Alterar o modo de linguagem", + "noEditor": "Nenhum editor de texto ativo neste momento", + "languageDescription": "({0}) - linguagem configurada", + "languageDescriptionConfigured": "({0})", + "languagesPicks": "linguagens (identificador)", + "configureModeSettings": "Configurar '{0}' configurações baseadas em linguagem...", + "configureAssociationsExt": "Configurar a associação de arquivo para '{0}'...", + "autoDetect": "Detecção automática", + "pickLanguage": "Selecionar o modo do idioma", + "currentAssociation": "Associação atual", + "pickLanguageToConfigure": "Selecionar o modo de linguagem para associar a '{0}'", + "changeIndentation": "Alterar a indentação", + "noWritableCodeEditor": "O editor de código ativo é somente leitura.", + "indentView": "alterar visualização", + "indentConvert": "converter arquivo", + "pickAction": "Selecionar ação", + "changeEndOfLine": "Alterar sequência de final de linha", + "pickEndOfLine": "Selecionar sequência de final de linha", + "changeEncoding": "Alterar a codificação do arquivo", + "noFileEditor": "Nenhum arquivo ativo neste momento", + "saveWithEncoding": "Salvar com codificação", + "reopenWithEncoding": "Reabrir com codificação", + "guessedEncoding": "Adivinhado a partir do conteúdo", + "pickEncodingForReopen": "Selecione a codificaçãodo arquivo para reabrir o arquivo.", + "pickEncodingForSave": "Selecione a codificação do arquivo para Salvar Com" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json new file mode 100644 index 0000000000000..9001e58fa9931 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "araLabelTabActions": "Ações de tablulação" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json new file mode 100644 index 0000000000000..8af2aff62d5e2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textDiffEditor": "Editor de Diferentes Textos", + "readonlyEditorWithInputAriaLabel": "{0}. Editor de comparação de texto somente leitura.", + "readonlyEditorAriaLabel": "Editor de comparação de texto somente leitura.", + "editableEditorWithInputAriaLabel": "{0}. Editor de comparação de arquivos texto.", + "editableEditorAriaLabel": "Editor de comparação de arquivos texto.", + "navigate.next.label": "Próxima Alteração", + "navigate.prev.label": "Alteração Anterior", + "inlineDiffLabel": "Alternar para exibição embutida", + "sideBySideDiffLabel": "Alternar para exibição lado a lado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/textEditor.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/textEditor.i18n.json new file mode 100644 index 0000000000000..eb58230b85431 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/textEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorLabelWithGroup": "{0}, Grupo {1}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json new file mode 100644 index 0000000000000..77f89efba5f9c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textEditor": "Editor de texto", + "readonlyEditorWithInputAriaLabel": "{0}. Editor de texto somente leitura.", + "readonlyEditorAriaLabel": "Editor de texto somente leitura.", + "untitledFileEditorWithInputAriaLabel": "{0}. Editor de texto de arquivo sem nome.", + "untitledFileEditorAriaLabel": "Editor de texto de arquivo sem nome." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/titleControl.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/titleControl.i18n.json new file mode 100644 index 0000000000000..bf8307cd384c2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/titleControl.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Fechar", + "closeOthers": "Fechar Outros", + "closeRight": "Fechar à direita", + "closeAll": "Fechar todos", + "keepOpen": "Manter aberto", + "showOpenedEditors": "Mostrar editores abertos", + "araLabelEditorActions": "Ações de editor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/panel/panelActions.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/panel/panelActions.i18n.json new file mode 100644 index 0000000000000..1f98f38c47e8e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/panel/panelActions.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "panelActionTooltip": "{0} ({1})", + "closePanel": "Fechar Painel", + "togglePanel": "Alternar Painel", + "focusPanel": "Foco no Painel", + "toggleMaximizedPanel": "Alternar Painel Maximizado", + "maximizePanel": "Maximizar Tamanho do Painel", + "minimizePanel": "Restaurar tamanho do Painel", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/panel/panelPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/panel/panelPart.i18n.json new file mode 100644 index 0000000000000..48a7b1b2f768e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/panel/panelPart.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "panelSwitcherBarAriaLabel": "Chave do Painel Ativo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json new file mode 100644 index 0000000000000..c98dd22d95d37 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inputModeEntryDescription": "{0} (Pressione 'Enter' para confirmar ou 'Esc' para cancelar)", + "inputModeEntry": "Pressione 'Enter' para confirmar o texto digitado ou 'Esc' para cancelar", + "emptyPicks": "Não há entradas a serem escolhidas", + "quickOpenInput": "Digite '?' para obter ajuda sobre as ações que você pode realizar a partir daqui", + "historyMatches": "aberto recentemente", + "noResultsFound1": "Nenhum resultado encontrado", + "canNotRunPlaceholder": "Esse manipulador de abertura rápida não pode ser usado no contexto atual", + "entryAriaLabel": "{0}, recentemente aberto", + "removeFromEditorHistory": "Remover do Histórico", + "pickHistory": "Selecionar uma entrada do editor para remover do histórico" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json new file mode 100644 index 0000000000000..57f5524e1be3a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "Ir para o Arquivo...", + "quickNavigateNext": "Navegar ao próximo em modo de abertura rápida", + "quickNavigatePrevious": "Navegar ao anterior em modo de abertura rápida", + "quickSelectNext": "Selecionar próximo em modo de abertura rápida", + "quickSelectPrevious": "Selecionar anterior em modo de abertura rápida" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json new file mode 100644 index 0000000000000..89806e051ea34 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "focusSideBar": "Foco na Barra Lateral", + "viewCategory": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json new file mode 100644 index 0000000000000..4a2adabf5a69d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "canNotRun": "O comando '{0}' não está habilitado e não pode ser executado.", + "manageExtension": "Gerenciar Extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json new file mode 100644 index 0000000000000..1c3db4d572b50 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "patchedWindowTitle": "[Sem Suporte]", + "devExtensionWindowTitlePrefix": "[Host de Desenvolvimento de Extensão]" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json b/i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json new file mode 100644 index 0000000000000..26c5e14f3675d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultsMatching": "Nenhum resultado encontrado", + "noResultsFound2": "Nenhum resultado encontrado", + "entryAriaLabel": "{0}, comando", + "noCommands": "Não há comandos correspondentes" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/viewlet.i18n.json b/i18n/ptb/src/vs/workbench/browser/viewlet.i18n.json new file mode 100644 index 0000000000000..34655b736ba10 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/viewlet.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "collapse": "Recolher tudo", + "viewToolbarAriaLabel": "{0} ações " +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/common/theme.i18n.json b/i18n/ptb/src/vs/workbench/common/theme.i18n.json new file mode 100644 index 0000000000000..bfe4c0ef01767 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/common/theme.i18n.json @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tabActiveBackground": "Cor de fundo da guia ativa. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "tabInactiveBackground": "Cor de fundo da guia inativa. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "tabBorder": "Borda para separar uma guia das outras. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "tabActiveEditorGroupActiveForeground": "Cor de primeiro plano da guia ativa em um grupo ativo. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "tabInactiveEditorGroupActiveForeground": "Cor de primeiro plano da guia inativa em um grupo ativo. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "editorGroupBackground": "Cor de fundo de um grupo de editor. Grupos de editor são os recipientes dos editores. A cor de fundo é mostrada ao arrastar o editor de grupos ao redor.", + "tabsContainerBackground": "Cor de fundo do cabeçalho do título do grupo de editor quando as guias são habilitadas. Grupos de editor são os recipientes dos editores.", + "editorGroupHeaderBackground": "Cor de fundo do título do cabeçalho do grupo de editor quando as guias são desabilitadas. Grupos de editor são os recipientes dos editores.", + "editorGroupBorder": "Cor para separar múltiplos grupos de editor de outro. Grupos de editor são os recipientes dos editores.", + "editorDragAndDropBackground": "Cor de fundo ao arrastar editores. A cor deve ter transparência para que o conteúdo do editor ainda possa ser visto.", + "panelBackground": "Cor de fundo do painel. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", + "panelBorder": "Cor da borda do painel no topo separando do editor. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", + "panelActiveTitleForeground": "Cor do título para o painel ativo. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", + "panelInactiveTitleForeground": "Cor do título para o painel inativo. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", + "panelActiveTitleBorder": "Cor da borda para o título do painel ativo. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", + "statusBarForeground": "Cor do primeiro plano da barra de status. A barra de status é mostrada na parte inferior da janela.", + "statusBarBackground": "Cor de fundo da barra de status padrão. A barra de status é mostrada na parte inferior da janela.", + "statusBarNoFolderBackground": "Cor de fundo da barra de status quando nenhuma pasta está aberta. A barra de status é mostrada na parte inferior da janela.", + "statusBarItemActiveBackground": "Cor de fundo do item da barra de status quando você clicado. A barra de status é mostrada na parte inferior da janela.", + "statusBarItemHoverBackground": "Cor de fundo do item da barra de status quando estiver passando sobre ele. A barra de status é mostrada na parte inferior da janela.", + "statusBarProminentItemBackground": "Cor de fundo de itens proeminentes da barra de status. Itens proeminentes destacam-se outras entradas da barra de status para indicar a importância. A barra de status é mostrada na parte inferior da janela.", + "statusBarProminentItemHoverBackground": "Cor de fundo dos itens proeminentes de barra de status quando estiver passando sobre eles. Itens proeminentes destacam-se outras entradas de barra de status para indicar a importância. A barra de status é mostrada na parte inferior da janela.", + "activityBarBackground": "Cor de fundo da barra de atividades. Barra de atividade está visível à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", + "activityBarForeground": "Cor de primeiro plano da barra de atividades (por exemplo, usada para os ícones). A barra de atividades está visível à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", + "activityBarDragAndDropBackground": "Cor de feedback de arrastar e soltar para os itens da barra de atividades. A cor deve ter transparência para que as entradas de bar de atividade ainda possam brilhar. A barra de atividade está visível à esquerda ou à direita e permite para alternar entre as visualizações da barra lateral.", + "activityBarBadgeBackground": "Cor de fundo da notificação de atividade. A barra de atividade está visível à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", + "activityBarBadgeForeground": "Cor de primeiro plano da notificação de atividade. A barra de atividade está visível à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", + "sideBarBackground": "Cor de fundo da barra lateral. A barra lateral é o recipiente para visualizações como explorador e pesquisa.", + "sideBarForeground": "Cor de primeiro plano da barra lateral. A barra lateral é o recipiente para visualizações como o explorador e a busca.", + "sideBarTitleForeground": "Cor de primeiro plano do título da barra lateral. A barra lateral é o recipiente para visualizações como explorador e pesquisa.", + "sideBarSectionHeaderBackground": "Cor de fundo do cabeçalho de seção lateral. A barra lateral é o recipiente para visões como explorador e pesquisa.", + "titleBarActiveForeground": "Cor da barra de título do primeiro plano quando a janela está ativa. Observe que essa cor atualmente somente é suportada no macOS.", + "titleBarInactiveForeground": "Cor de primeiro plano da barra de título quando a janela está inativa. Observe que essa cor atualmente somente é suportada no macOS.", + "titleBarActiveBackground": "Cor de fundo da barra de título quando a janela está ativa. Observe que essa cor atualmente somente é suportada no macOS.", + "titleBarInactiveBackground": "Cor de fundo de barra de título quando a janela está inativa. Observe que essa cor é atualmente somente suportada no macOS.", + "notificationsForeground": "Cor do primeiro plano de notificações. Notificações deslizam na parte superior da janela.", + "notificationsBackground": "Cor de fundo de notificações. Notificações deslizam na parte superior da janela." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json new file mode 100644 index 0000000000000..d829a3c8cad62 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "closeActiveEditor": "Fechar Editor", + "closeWindow": "Fechar Janela", + "switchWindow": "Alternar Janela", + "switchWindowPlaceHolder": "Selecionar uma janela", + "current": "Janela Atual", + "closeFolder": "Fechar Pasta", + "noFolderOpened": "Não há nenhuma pasta aberta nesta instância para ser fechada.", + "newWindow": "Nova Janela", + "toggleFullScreen": "Alternar Tela Inteira", + "toggleMenuBar": "Alternar Barra de Menus", + "toggleDevTools": "Alternar Ferramentas do Desenvolvedor", + "zoomIn": "Ampliar", + "zoomOut": "Reduzir", + "zoomReset": "Reinicializar Zoom", + "appPerf": "Desempenho de inicialização", + "reloadWindow": "Recarregar Janela", + "openRecent": "Abrir Recente", + "folders": "pastas", + "files": "arquivos", + "openRecentPlaceHolderMac": "Selecionar um caminho (Pressione a tecla Cmd para abrir em uma nova janela)", + "openRecentPlaceHolder": "Selecionar um caminho para abrir (Pressione a tecla Cmd para abrir em uma nova janela)", + "closeMessages": "Fechar mensagens de notificação", + "reportIssues": "Reportar Problemas", + "reportPerformanceIssue": "Reportar Problema de Desempenho", + "keybindingsReference": "Referência de Atalhos de Teclado", + "openDocumentationUrl": "Documentação", + "openIntroductoryVideosUrl": "Vídeos Introdutórios", + "toggleSharedProcess": "Alternar processo compartilhado", + "navigateLeft": "Mover para a Visualizção à Esquerda", + "navigateRight": "Mover para a Visualização à Direita", + "navigateUp": "Mover para a Visualização Acima", + "navigateDown": "Mover para a Visualização Abaixo", + "increaseViewSize": "Aumentar o Tamanho da Visualização Atual", + "decreaseViewSize": "Diminuir o Tamanho da Visualização Atual" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/commands.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/commands.i18n.json new file mode 100644 index 0000000000000..3a1051dcfdad7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/commands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "diffLeftRightLabel": "{0} ⟷ {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/crashReporter.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/crashReporter.i18n.json new file mode 100644 index 0000000000000..10b7a7ff10848 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/crashReporter.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetria", + "telemetry.enableCrashReporting": "Ativar o envio de relatórios de incidentes à Microsoft.\nEsta opção requer reinicialização para ser efetivada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/extensionHost.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/extensionHost.i18n.json new file mode 100644 index 0000000000000..e5a7ab8168661 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/extensionHost.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionHostProcess.startupFailDebug": "O host de extensão não iniciou em 10 segundos, ele pode ser interrompido na primeira linha e precisa de um depurador para continuar.", + "extensionHostProcess.startupFail": "Host de extensão não começou em 10 segundos, isso pode ser um problema.", + "extensionHostProcess.error": "Erro do host de extensão: {0}", + "extensionHostProcess.crash": "Host de extensão foi encerrado inesperadamente. Por favor recarregar a janela para recuperar." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json new file mode 100644 index 0000000000000..3b9050de1afb3 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "view": "Exibir", + "help": "Ajuda", + "file": "Arquivo", + "developer": "Desenvolvedor", + "showEditorTabs": "Controla se os editores abertos devem ou não serem exibidos em abas.", + "editorTabCloseButton": "Controla a posição dos botões de fechar das abas do editor ou os desabilita quando configurados para 'desligado'.", + "showIcons": "Controla se os editores abertos devem ou não ser exibidos com um ícone. Requer um tema de ícone para ser habilitado. ", + "enablePreview": "Controla se os editores abertos são exibidos como visualização. Editores de visualização são reutilizados até que eles sejam preservados (por exemplo, através de um duplo clique ou edição).", + "enablePreviewFromQuickOpen": "Controla se os editores abertos da Abertura Rápida são exibidos como visualização. Os editores de visualização são reutilizados até serem preservados (por exemplo, através de um duplo clique ou edição).", + "editorOpenPositioning": "Controla onde os editores serão abertos. Escolha 'esquerda' ou 'direita' para abrir os editores à esquerda ou à direita do \neditor ativo. Selecione 'primeiro' ou 'último' para abrir os editores independentemente do atual.", + "revealIfOpen": "Controla se um editor é exibido em qualquer um dos grupos, se aberto. Se desabilitado, um editor será aberto preferencialmente no grupo de editores ativo. Se habilitado, um editor já aberto será exibido no grupo de editores ativo, ao invés de ser aberto novamente. Note que há alguns casos onde esta configuração é ignorada, por exemplo, quando for forçada a abertura de um editor em um grupo específico ou ao lado do grupo atualmente ativo.", + "closeOnFocusLost": "Controla se Abertura Rápida deve fechar automaticamente caso perca o foco.", + "openDefaultSettings": "Controla se a abertura de configurações também abre um editor mostrando todas as configurações padrão.", + "sideBarLocation": "Controla a localização da barra lateral. Ele pode ser exibido à esquerda ou à direita da área de trabalho.", + "statusBarVisibility": "Controla a visibilidade da barra de status na parte inferior da área de trabalho.", + "activityBarVisibility": "Controla a visibilidade da barra de atividades na área de trabalho.", + "closeOnFileDelete": "Controla se os editores que mostram um arquivo devem fechar automaticamente quanto o arquivo é apagado ou renomeado por algum outro processo. Desativar isso manterá o editor aberto como sujo neste evento. Note que apagar do aplicativo sempre fechará o editor e os arquivos sujos nunca fecharão para preservar seus dados.", + "swipeToNavigate": "Navegue entre arquivos abertos usando o deslizamento horizontal de três dedos.", + "workbenchConfigurationTitle": "Área de Trabalho", + "window.openFilesInNewWindow.on": "Arquivos serão abertos em uma nova janela", + "window.openFilesInNewWindow.off": "Arquivos serão abertos em uma nova janela com a pasta de arquivos aberta ou com a última janela ativa.", + "window.openFilesInNewWindow.default": "Os arquivos serão abertos na janela com a pasta de arquivos aberta ou a última janela ativa, a menos que seja aberto através do dock ou do finder (somente macOS)", + "openFilesInNewWindow": "Controla se os arquivos devem ser abertos em uma nova janela\n- padrão: os arquivos serão abertos em uma nova janela com a pasta de arquivos aberta ou na última janela ativa, a menos que seja aberta através do dock ou do finder (apenas macOS)\n- ligado: os arquivos serão abertos em uma nova janela\n- desligado: os arquivos serão abertos em uma janela com a pasta de arquivos aberta ou a última janela ativa\nNota que ainda podem haver casos em que esta configuração será ignorada (por exemplo, quando estiver usando as opções de linha de comando -new-window ou -reuse-window).", + "window.openFoldersInNewWindow.on": "As pastas serão abertas em uma nova janela", + "window.openFoldersInNewWindow.off": "As pastas substituirão a última janela ativa", + "window.openFoldersInNewWindow.default": "As pastas serão abertas em uma nova janela, a menos que uma pasta seja selecionada dentro do aplicativo (por exemplo, através do menu Arquivo)", + "openFoldersInNewWindow": "Controla se as pastas devem ser abertas em uma nova janela ou substituir a última janela ativa\n- padrão: as pastas serão abertas em uma nova janela, a menos que seja selecionada dentro do aplicativo (por exemplo, através do menu Arquivo)\n- ligado: as pastas serão abertas em uma nova janela\n- desligado: as pastas substituirão a última janela ativa\nNote que ainda podem haver casos em que esta configuração será ignorada (por exemplo, quando estiver usando as opções de linha de comando -new-window ou -reuse-window).", + "window.reopenFolders.none": "Nunca reabra uma pasta.", + "window.reopenFolders.one": "Reabrir a última pasta ativa.", + "window.reopenFolders.all": "Reabrir todas as pastas da última sessão.", + "reopenFolders": "Controla como as pastas são reabertas depois de um reinício. Escolha 'nenhum' para nunca reabrir uma pasta, 'uma' para reabrir a última pasta que você trabalhou ou 'todas' para reabrir todas as pastas da sua última sessão.", + "restoreFullscreen": "Controla se uma janela deve ser restaurada em modo de tela cheia se ela foi finalizada em modo de tela cheia.", + "zoomLevel": "Ajusta o nível de zoom da janela. O tamanho original é 0 e cada aumento (por exemplo, 1) ou redução (por exemplo, -1) representa um zoom 20% maior ou menor. Você também pode digitar decimais para ajustar o nível de zoom com uma granularidade mais fina.", + "title": "Controla o título da janela com base no editor ativo. As variáveis são substituídas com base no contexto:\n$ {ActiveEditorShort}: por exemplo, meuArquivo.txt\n$ {ActiveEditorMedium}: por exemplo, minhaPasta / meuArquivo.txt\n$ {ActiveEditorLong}: por exemplo, /Usuários/Desenvolvimento/meuProjeto/minhaPasta/meuArquivo.txt\n$ {RootName}: por exemplo, meuProjeto\n$ {RootPath}: por exemplo, /Usuários/Desenvolvimento/meuProjeto\n$ {AppName}: por exemplo, VS Code\n$ {Dirty}: um indicador sujo se o editor ativo for sujo\n$ {Separator}: um separador condicional (\"-\") que só aparece quando for rodeado por variáveis com valores", + "window.newWindowDimensions.default": "Abrir novas janelas no centro da tela.", + "window.newWindowDimensions.inherit": "Abrir novas janelas com a mesma dimensão da última janela ativa.", + "window.newWindowDimensions.maximized": "Abrir novas janelas maximizadas.", + "window.newWindowDimensions.fullscreen": "Abrir novas janelas em modo de tela cheia.", + "newWindowDimensions": "Controla as dimensões ao abrir uma nova janela quando pelo menos uma janela já está aberta. Por padrão, uma nova janela será aberta no centro da tela com pequena dimensão. Quando definido como 'inherit', a janela vai ter as mesmas dimensões que a última janela que estava ativa. Quando definido como 'maximized', a janela abrirá maximizada e em tela cheia se configurado para 'fullscreen'. Observe que essa configuração não tem um impacto sobre a primeira janela que é aberta. A primeira janela sempre irá restaurar o tamanho e a localização como você deixou antes de fechar.", + "window.menuBarVisibility.default": "O menu está oculto apenas em modo de tela cheia.", + "window.menuBarVisibility.visible": "O menu está sempre visivel mesmo quando em modo de tela cheia.", + "window.menuBarVisibility.toggle": "O menu está oculto, mas pode ser mostrado através da tecla Alt.", + "window.menuBarVisibility.hidden": "O menu está sempre oculto.", + "menuBarVisibility": "Controla a visibilidade da barra de menu. Uma configuração 'alternar' significa que a barra de menus está oculta e pressionar a tecla Alt irá mostrá-la. Por padrão, a barra de menu será visível, a menos que a janela esteja em modo de tela cheia.", + "enableMenuBarMnemonics": "Se habilitado, os menus principais podem ser abertos através de atalhos de tecla Alt. Desativar mnemônicos permite vincular esses atalhos de tecla Alt para comandos do editor.", + "autoDetectHighContrast": "Se habilitado, irá mudar automaticamente para o tema de alto contraste se o Windows estiver utilizando um tema de alto contraste, e para o tema escuro ao mudar de um tema de alto contraste do Windows.", + "titleBarStyle": "Ajusta a aparência da barra de título da janela. As alterações exigem um reinício completo.", + "window.nativeTabs": "Habilita as abas da janela do macOS Sierra. Note que as alterações exigem um reinício completo e que as abas nativas desabilitarão um estilo de barra de título customizado, se configurado.", + "windowConfigurationTitle": "Janela", + "zenModeConfigurationTitle": "Modo Zen", + "zenMode.fullScreen": "Controla se a ativação do modo Zen também coloca o espaço de trabalho em modo de tela cheia.", + "zenMode.hideTabs": "Controla se a ativação do modo Zen também oculta as abas do espaço de trabalho.", + "zenMode.hideStatusBar": "Controla se a ativação do modo Zen também oculta a barra de status no rodapé do espaço de trabalho.", + "zenMode.hideActivityBar": "Controla se a ativação do modo Zen também oculta a barra de atividades à esquerda do espaço de trabalho.", + "zenMode.restore": "Controla se uma janela deve ser restaurada para o modo zen se ela foi finalizada no modo zen." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/main.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/main.i18n.json new file mode 100644 index 0000000000000..056d426d27d53 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/main.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "loaderError": "Falha ao carregar o arquivo necessário. Você não está mais conectado à Internet ou o servidor que você está conectado está offline. Atualize o navegador e tente novamente.", + "loaderErrorNative": "Falha ao carregar um arquivo necessário. Reinicie o aplicativo para tentar novamente. Detalhes: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/shell.i18n.json new file mode 100644 index 0000000000000..951a140a2ea01 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/shell.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "runningAsRoot": "Não é recomendado executar Code como 'root'." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/window.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/window.i18n.json new file mode 100644 index 0000000000000..50118b77afeb4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/window.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "undo": "Desfazer", + "redo": "Refazer", + "cut": "Recortar", + "copy": "Copiar", + "paste": "Colar", + "selectAll": "Selecionar Tudo", + "confirmOpen": "Tem certeza de que deseja abrir '{0}' pastas?", + "confirmOpenButton": "&&Abrir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/node/extensionHostMain.i18n.json b/i18n/ptb/src/vs/workbench/node/extensionHostMain.i18n.json new file mode 100644 index 0000000000000..f0596b258711c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/node/extensionHostMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionTestError": "Caminho {0} não aponta para um executor de testes com extensão válida." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/node/extensionPoints.i18n.json b/i18n/ptb/src/vs/workbench/node/extensionPoints.i18n.json new file mode 100644 index 0000000000000..18d7b3f26c892 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/node/extensionPoints.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "jsonParseFail": "Falha ao analisar {0}: {1}.", + "fileReadFail": "Não foi possível ler o arquivo {0}: {1}.", + "jsonsParseFail": "Falha ao analisar {0} ou {1}: {2}.", + "missingNLSKey": "Não foi possível encontrar a mensagem para a chave {0}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json new file mode 100644 index 0000000000000..69df9b15d8773 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "install": "Instalar o comando '{0}' em PATH", + "not available": "Este comando não está disponível", + "successIn": "Comando shell '{0}' instalado com sucesso em PATH.", + "warnEscalation": "O código solicitará com 'osascript' pelos privilégios de Administrador para instalar o comando shell.", + "ok": "OK", + "cantCreateBinFolder": "Não é possível criar '/usr/local/bin'.", + "cancel2": "Cancelar", + "aborted": "Abortado", + "uninstall": "Desinstalar o comando '{0}' de PATH", + "successFrom": "Comando shell '{0}' desinstalado com sucesso de PATH.", + "shellCommand": "Comando shell" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json new file mode 100644 index 0000000000000..18ee740ae318e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbench.action.inspectKeyMap": "Desenvolvedor: Inspecionar Mapeamentos de Chave" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json new file mode 100644 index 0000000000000..217bdf1c04ed5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleRenderControlCharacters": "Alternar caracteres de controle" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json new file mode 100644 index 0000000000000..453104fcc6d60 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleRenderWhitespace": "Alternar Espaço em Branco Renderizado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json new file mode 100644 index 0000000000000..058048058af44 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.wordwrap": "Visualizar: Alternar Quebra de Linha", + "wordWrap.notInDiffEditor": "Não pode alternar quebra de linha em um editor diff.", + "unwrapMinified": "Desabilitar empacotamento para este arquivo", + "wrapMinified": "Habilitar empacotamento para este arquivo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json new file mode 100644 index 0000000000000..12f93be687c5d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordWrapMigration.ok": "OK", + "wordWrapMigration.dontShowAgain": "Não mostrar novamente", + "wordWrapMigration.openSettings": "Abrir configurações", + "wordWrapMigration.prompt": "A configuração `editor.wrappingColumn` foi descontinuada e substituída pela configuração `editor.wordWrap`" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json new file mode 100644 index 0000000000000..3d74879563371 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "breakpointWidgetExpressionPlaceholder": "Parar quando a expressão for avaliada como true. 'Enter' para aceitar, 'esc' para cancelar.", + "breakpointWidgetAriaLabel": "O programa só vai parar aqui se esta condição for verdadeira. Pressione Enter para aceitar ou Escape para cancelar.", + "breakpointWidgetHitCountPlaceholder": "Parar quando contagem de ocorrências condição for alcançada. 'Enter' para aceitar, 'esc' para cancelar.", + "breakpointWidgetHitCountAriaLabel": "O programa só vai parar aqui, se a contagem de ocorrências for alcançada. Pressione Enter para aceitar ou Escape para cancelar.", + "expression": "Expressão", + "hitCount": "Contagem de ocorrências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json new file mode 100644 index 0000000000000..32a88b85efd61 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "addConfiguration": "Adicionar Configuração...", + "noConfigurations": "Sem configurações" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActions.i18n.json new file mode 100644 index 0000000000000..1bc052297a12e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openLaunchJson": "Abrir {0}", + "launchJsonNeedsConfigurtion": "Configurar ou corrigir 'launch.json'", + "noFolderDebugConfig": "Primeiro abra uma pasta para fazer uma configuração de depuração avançada.", + "startDebug": "Iniciar Depuração", + "startWithoutDebugging": "Iniciar Sem Depuração", + "selectAndStartDebugging": "Selecionar e Iniciar a Depuração", + "restartDebug": "Reiniciar", + "reconnectDebug": "Reconectar", + "stepOverDebug": "Pular Sobre", + "stepIntoDebug": "Pular Dentro", + "stepOutDebug": "Pular Fora", + "stopDebug": "Parar", + "disconnectDebug": "Desconectar", + "continueDebug": "Continuar", + "pauseDebug": "Pausa", + "restartFrame": "Reiniciar o Frame", + "removeBreakpoint": "Remover Ponto de Parada", + "removeAllBreakpoints": "Remover Todos os Pontos de Parada", + "enableBreakpoint": "Habilitar ponto de Parada", + "disableBreakpoint": "Desativar Ponto de Parada", + "enableAllBreakpoints": "Habilitar Todos os Pontos de Parada", + "disableAllBreakpoints": "Desabilitar Todos Pontos de Parada", + "activateBreakpoints": "Ativar Pontos de Parada", + "deactivateBreakpoints": "Desativar Pontos de Parada", + "reapplyAllBreakpoints": "Reaplicar Todos os Pontos de Parada", + "addFunctionBreakpoint": "Adicionar Ponto de Parada de Função", + "renameFunctionBreakpoint": "Renomeie o Ponto de Parada de Função", + "addConditionalBreakpoint": "Adicionar Ponto de Parada Condicional...", + "editConditionalBreakpoint": "Editar o Ponto de Parada...", + "setValue": "Definir Valor", + "addWatchExpression": "Adicionar Expressão", + "editWatchExpression": "Editar expressão", + "addToWatchExpressions": "Adicionar ao monitoramento", + "removeWatchExpression": "Remover Expressão", + "removeAllWatchExpressions": "Remover Todas as Expressões", + "clearRepl": "Limpar console", + "debugConsoleAction": "Console do Depurador", + "unreadOutput": "Nova Saída no Console de Depuração", + "debugFocusConsole": "Foco no Console de Depuração", + "focusProcess": "Foco no Processo", + "stepBackDebug": "Passo para trás", + "reverseContinue": "Reverter" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..421e5b19c79c4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugToolBarBackground": "Cor de fundo da barra de ferramentas de depuração." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json new file mode 100644 index 0000000000000..d8aa95c869a67 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unable": "Não é possível resolver o recurso sem uma sessão de depuração" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json new file mode 100644 index 0000000000000..ef74c88413dcb --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleBreakpointAction": "Depurar: Alternar Ponto de Parada", + "columnBreakpointAction": "Depurar: Ponto de Interrupção de Coluna", + "columnBreakpoint": "Adicionar Ponto de Interrupção de Coluna", + "conditionalBreakpointEditorAction": "Depurar: Adicionar Ponto de Interrupção Condicional...", + "runToCursor": "Executar até o Cursor", + "debugEvaluate": "Depurar: Avaliar", + "debugAddToWatch": "Depurar: Adicionar ao monitoramento", + "showDebugHover": "Mostrar Item Flutuante" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json new file mode 100644 index 0000000000000..f30b378456b37 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "breakpointDisabledHover": "Ponto de Parada Desativado", + "breakpointUnverifieddHover": "Ponto de Parada Não Verificado", + "breakpointDirtydHover": "Ponto de parada não verificado. O arquivo foi modificado, por favor reinicie a sessão de depuração.", + "breakpointUnsupported": "Pontos de parada condicionais não são suportados por esse tipo de depurador" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json new file mode 100644 index 0000000000000..01955c44965b6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "depurar {0}", + "debugAriaLabel": "Digite um nome de uma configuração de lançamento para ser executado.", + "noConfigurationsMatching": "Não há configurações de depuração correspondentes", + "noConfigurationsFound": "Configurações de depuração não encontradas. Por favor, crie um arquivo 'launch.json'." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json new file mode 100644 index 0000000000000..a8802c1316474 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugExceptionWidgetBorder": "Cor da borda da ferramenta de exceção.", + "debugExceptionWidgetBackground": "Cor de fundo da ferramenta de exceção.", + "exceptionThrownWithId": "Ocorreu exceção: {0}", + "exceptionThrown": "Ocorreu exceção." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..8c7a8761f41cc --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "Clique para seguir (Cmd + clique abre ao lado)", + "fileLink": "Clique para seguir (Cmd + clique abre ao lado)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..3476b79d9e176 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "Controla o comportamento do console depuração interna." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/common/debugModel.i18n.json new file mode 100644 index 0000000000000..fa2f5e8ada5ce --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notAvailable": "não disponível", + "startDebugFirst": "Por favor, inicie uma sessão de depuração para avaliar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..0e10c85d8186e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "Fonte desconhecida" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json new file mode 100644 index 0000000000000..05a7ccfe82744 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleDebugViewlet": "Visualizar Depurador", + "toggleDebugPanel": "Console do Depurador", + "debug": "Depurar", + "debugPanel": "Console do Depurador", + "view": "Exibir", + "debugCategory": "Depurar", + "debugCommands": "Configuração do Depurador", + "debugConfigurationTitle": "Depurar", + "allowBreakpointsEverywhere": "Permite definir um ponto de interrupção em qualquer arquivo.", + "openExplorerOnEnd": "Automaticamente abre a visualização do explorador no final de uma sessão de depuração", + "inlineValues": "Mostrar valores de variáveis em linha no editor durante a depuração", + "hideActionBar": "Controlar se a barra de ação flutuante do depurador deve ser ocultada", + "launch": "Configuração global do lançamento do depurador. Deve ser usado como uma alternativa para o arquivo 'launch.json' que é compartilhado entre os espaços de trabalho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..85b353a37fe00 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noFolderDebugConfig": "Primeiro abra uma pasta para fazer uma configuração de depuração avançada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json new file mode 100644 index 0000000000000..ada60277e7bf6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.debuggers": "Contribui adaptadores de depuração.", + "vscode.extension.contributes.debuggers.type": "Identificador único para esse adaptador de depuração.", + "vscode.extension.contributes.debuggers.label": "Nome de exibição para esse adaptador de depuração.", + "vscode.extension.contributes.debuggers.program": "Caminho para o programa adaptador de depuração. O caminho pode ser absoluto ou relativo à pasta de extensão.", + "vscode.extension.contributes.debuggers.args": "Argumentos opcionais a serem informados para o adaptador.", + "vscode.extension.contributes.debuggers.runtime": "Runtime opcional no caso do atributo do programa não ser um executável, mas requerer um runtime.", + "vscode.extension.contributes.debuggers.runtimeArgs": "Argumentos opcionais do runtime.", + "vscode.extension.contributes.debuggers.variables": "Mapeamento de variáveis interativas (por exemplo ${action.pickProcess}) em 'launch.json' para um comando.", + "vscode.extension.contributes.debuggers.initialConfigurations": "Configurações para gerar o 'launch.json' inicial.", + "vscode.extension.contributes.debuggers.languages": "Lista de idiomas para os quais a extensão de depuração pode ser considerada o \"depurador padrão\".", + "vscode.extension.contributes.debuggers.adapterExecutableCommand": "Se especificado VS Code chamará este comando para determinar o caminho do executável do adaptador de depuração e os argumentos para passar.", + "vscode.extension.contributes.debuggers.startSessionCommand": "Se especificado VS Code chamará este comando para as ações de \"depurar\" ou \"executar\" direcionadas para esta extensão.", + "vscode.extension.contributes.debuggers.configurationSnippets": "Trechos de código para adicionar novas configurações em 'launch.json'.", + "vscode.extension.contributes.debuggers.configurationAttributes": "Configurações de esquema JSON para validar 'launch.json'.", + "vscode.extension.contributes.debuggers.windows": "Configurações específicas do Windows.", + "vscode.extension.contributes.debuggers.windows.runtime": "Runtime usado para Windows.", + "vscode.extension.contributes.debuggers.osx": "Configurações específicas do OS X.", + "vscode.extension.contributes.debuggers.osx.runtime": "Runtime usado para o OS X.", + "vscode.extension.contributes.debuggers.linux": "Configurações específicas do Linux.", + "vscode.extension.contributes.debuggers.linux.runtime": "Runtime usado para o Linux.", + "vscode.extension.contributes.breakpoints": "Contribui aos pontos de interrupção.", + "vscode.extension.contributes.breakpoints.language": "Permitir pontos de parada para este idioma.", + "app.launch.json.title": "Executar", + "app.launch.json.version": "Versão deste formato de arquivo.", + "app.launch.json.configurations": "Lista de configurações. Adicionar novas configurações ou editar as existentes usando o IntelliSense.", + "app.launch.json.compounds": "Lista de compostos. Cada composto faz referência a várias configurações que vão ser executadas juntas.", + "app.launch.json.compound.name": "Nome do composto. Aparece no menu drop-down da configuração de execução.", + "app.launch.json.compounds.configurations": "Nomes das configurações que serão iniciadas como parte deste composto.", + "debugNoType": "'type' do adaptador de depuração não pode ser omitido e deve ser do tipo 'string'.", + "DebugConfig.failed": "Não é possível criar o arquivo 'launch.json' dentro da pasta '.vscode' ({0}).", + "selectDebug": "Selecione o ambiente" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json new file mode 100644 index 0000000000000..1424499bfccb9 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeBreakpoints": "Remover pontos de interrupção", + "removeBreakpointOnColumn": "Remover ponto de interrupção na coluna {0}", + "removeLineBreakpoint": "Remover ponto de interrupção de linha", + "editBreakpoints": "Editar pontos de interrupção", + "editBreakpointOnColumn": "Editar o ponto de interrupção na coluna {0}", + "editLineBrekapoint": "Editar o ponto de interrupção de linha", + "enableDisableBreakpoints": "Habilitar/Desabilitar pontos de interrupção", + "disableColumnBreakpoint": "Desabilitar ponto de interrupção na coluna {0}", + "disableBreakpointOnLine": "Desabilitar ponto de interrupção de linha", + "enableBreakpoints": "Habilitar o ponto de interrupção na coluna {0}", + "enableBreakpointOnLine": "Habilitar o ponto de interrupção de linha", + "addBreakpoint": "Adicionar ponto de interrupção", + "addConfiguration": "Adicionar Configuração..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json new file mode 100644 index 0000000000000..1853865a1ecf9 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeAriaLabel": "Depurar passando o mouse por cima" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json new file mode 100644 index 0000000000000..6dc0bc48afb76 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "snapshotObj": "Apenas valores primitivos são mostrados para este objeto.", + "debuggingStarted": "Depuração Iniciada.", + "debuggingPaused": "Depuração pausada, razão {0}, {1} {2}", + "debuggingStopped": "Depuração parada.", + "breakpointAdded": "Adicionado ponto de interrupção, linha {0}, arquivo {1}", + "breakpointRemoved": "Ponto de interrupção removido, linha {0}, arquivo {1}", + "compoundMustHaveConfigurations": "Composição deve ter o atributo \"configurations\" definido para iniciar várias configurações.", + "configMissing": "Configuração '{0}' não tem 'launch.json'.", + "debugTypeNotSupported": "Tipo de depuração configurado '{0}' não é suportado.", + "debugTypeMissing": "Falta a propriedade 'type' para a configuração de lançamento escolhida.", + "preLaunchTaskErrors": "Erros de build foram detectados durante a preLaunchTask '{0}'.", + "preLaunchTaskError": "Erro de build foi detectado durante a preLaunchTask '{0}'.", + "preLaunchTaskExitCode": "A preLaunchTask '{0}' encerrada com código de saída {1}.", + "debugAnyway": "Depurar mesmo assim", + "noFolderWorkspaceDebugError": "O arquivo ativo não pode ser depurado. Certifique-se de que ele está salvo no disco e que tem uma extensão de depuração instalada para esse tipo de arquivo.", + "NewLaunchConfig": "Por favor, configure o arquivo de configuração de lançamento para seu aplicativo. {0}", + "DebugTaskNotFound": "Não foi possível encontrar o preLaunchTask '{0}'.", + "differentTaskRunning": "Há uma tarefa {0} sendo executada. Não pode executar a tarefa de pré-lançamento {1}." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json new file mode 100644 index 0000000000000..ae47cc6a47d15 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "process": "Processar", + "paused": "Em pausa", + "running": "Em execução", + "thread": "Thread", + "pausedOn": "Pausado em {0}", + "loadMoreStackFrames": "Carregar mais segmentos de pilha", + "threadAriaLabel": "Thread {0}, pilha de chamadas, depuração", + "stackFrameAriaLabel": "Segmento de Pilha {0} linha {1} {2}, pilha de chamadas, depuração", + "variableValueAriaLabel": "Digite o novo valor da variável", + "variableScopeAriaLabel": "Escopo {0}, variáveis, depuração", + "variableAriaLabel": "{0} valor {1}, variáveis, depuração", + "watchExpressionPlaceholder": "Expressão para monitorar", + "watchExpressionInputAriaLabel": "Digitar expressão a monitorar", + "watchExpressionAriaLabel": "{0} valor {1}, monitorar, depuração", + "watchVariableAriaLabel": "{0} valor {1}, monitorar, depuração", + "functionBreakpointPlaceholder": "Função de parada", + "functionBreakPointInputAriaLabel": "Digitar Ponto de Parada de Função", + "functionBreakpointsNotSupported": "Pontos de parada de função não são suportados por este tipo de depuração", + "breakpointAriaLabel": "Ponto de parada linha {0} {1}, pontos de parada, depuração", + "functionBreakpointAriaLabel": "Ponto de parada de função {0}, pontos de parada, depuração", + "exceptionBreakpointAriaLabel": "Ponto de parada de exceção {0}, pontos de parada, depuração" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json new file mode 100644 index 0000000000000..d14c4338ceb77 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "Seção de variáveis", + "variables": "Variáveis", + "variablesAriaTreeLabel": "Variáveis de Depuração", + "expressionsSection": "Seção de Expressões", + "watch": "Monitoramento", + "watchAriaTreeLabel": "Depurar Expressões Monitoradas", + "callstackSection": "Seção de Pilha de Chamada", + "debugStopped": "Pausado em {0}", + "callStack": "Pilha de Chamadas", + "callStackAriaLabel": "Depurar a Pilha de Chamadas", + "breakpointsSection": "Seção de Pontos de Parada", + "breakpoints": "Pontos de Parada", + "breakpointsAriaTreeLabel": "Depurar os Pontos de Parada" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json new file mode 100644 index 0000000000000..227ca95927f6a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copyValue": "Copiar valor", + "copy": "Copiar", + "copyAll": "Copiar todos", + "copyStackTrace": "Copiar Pilha de Chamadas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json new file mode 100644 index 0000000000000..0ce97a8f7969c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "moreInfo": "Mais Informações", + "unableToLaunchDebugAdapter": "Não é possível executar o adaptador de depuração de '{0}'.", + "unableToLaunchDebugAdapterNoArgs": "Não é possível executar o adaptador de depuração.", + "stoppingDebugAdapter": "{0}. Parando o adaptador de depuração.", + "debugAdapterCrash": "Processo do adaptador de depuração foi finalizado inesperadamente" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json new file mode 100644 index 0000000000000..73f6f0be4c469 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "replAriaLabel": "Ler o Painel de Impressão Eval", + "actions.repl.historyPrevious": "História anterior", + "actions.repl.historyNext": "Próxima história", + "actions.repl.acceptInput": "REPL Aceitar Entrada" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json new file mode 100644 index 0000000000000..4afd6d64d8257 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "stateCapture": "Estado do objeto é capturado na primeira avaliação", + "replVariableAriaLabel": "Variável {0} tem valor {1}, ler a impressão do valor do loop, depurar", + "replExpressionAriaLabel": "Expressão {0} tem valor {1}, ler o laço de avaliação de impressão, depurar", + "replValueOutputAriaLabel": " impressão da avaliação do laço de leitura, depurar", + "replKeyValueOutputAriaLabel": "Variável de saída {0} tem valor {1}, ler o loop de avaliação de impressão, depurar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json new file mode 100644 index 0000000000000..b191a0de856b0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "statusBarDebuggingBackground": "Cor de fundo da barra de status quando um programa está sendo depurado. A barra de status é mostrada na parte inferior da janela" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json new file mode 100644 index 0000000000000..898a18605fbc3 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debug.terminal.title": "depurado", + "debug.terminal.not.available.error": "Terminal integrado não disponível" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json new file mode 100644 index 0000000000000..f0551dfe57b82 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugAdapterBinNotFound": "Executável do adaptador de depuração '{0}' não existe.", + "debugAdapterCannotDetermineExecutable": "Não é possível determinar o executável para o adaptador de depuração '{0}'.", + "debugType": "Tipo de configuração.", + "debugTypeNotRecognised": "O tipo de depuração não é reconhecido. Certifique-se de que você tem uma extensão de depuração correspondente instalada e que ela está habilitada.", + "node2NotSupported": "\"node2\" não é mais suportado, use \"node\" ao invés e defina o atributo \"protocol\" para \"inspector\".", + "debugName": "Nome da configuração; aparece no menu drop-down da configuração de lançamento. ", + "debugRequest": "Requer o tipo de configuração. Pode ser \"launch\" ou \"attach\".", + "debugServer": "Somente para o desenvolvimento de extensão de depuração: se uma porta é especificada, o VS Code tenta se conectar a um adaptador de depuração executando em modo de servidor", + "debugPrelaunchTask": "Tarefa para ser executada antes de começar a sessão de depuração.", + "debugWindowsConfiguration": "Atributos de configuração de lançamento específicos do Windows.", + "debugOSXConfiguration": "Atributos de configuração de lançamento específicos do OS X.", + "debugLinuxConfiguration": "Atributos de configuração de lançamento específicos do Linux.", + "deprecatedVariables": "'env.', 'config.' e 'command.' foram descontinuados, use ' env:', ' config:' e ' command:' em vez disso." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json new file mode 100644 index 0000000000000..1e3a1c0f277af --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showEmmetCommands": "Mostrar Comandos do Emmet" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..1dc5e1e3b6923 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "balanceInward": "Emmet: Saldo (interno)", + "balanceOutward": "Emmet: Saldo (externo)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..cccc82d8a010e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previousEditPoint": "Emmet: Ponto de edição anterior", + "nextEditPoint": "Emmet: Ponto próxima edição" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..b4a6a03e21357 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "evaluateMathExpression": "Emmet: Avaliar a expressão matemática" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..5a5dd3cc3e843 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expandAbbreviationAction": "Emmet: Expandir Abreviação" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..306332a4af226 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "incrementNumberByOneTenth": "Emmet: Incremento de 0.1", + "incrementNumberByOne": "Emmet: Incremento de 1", + "incrementNumberByTen": "Emmet: Incremento de 10", + "decrementNumberByOneTenth": "Emmet: Decréscimo por 0.1", + "decrementNumberByOne": "Emmet: Decréscimo por 1", + "decrementNumberByTen": "Emmet: Decréscimo por 10" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..6a742c4d5f91d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "matchingPair": "Emmet: Ir para o par de correspondência" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..22ed3f5f533ab --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mergeLines": "Emmet: Mesclar linhas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..bc0eefc2e0042 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reflectCSSValue": "Emmet: Refletir valor CSS" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..a30414b08d2d3 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeTag": "Emmet: Remover Rótulo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..1343e2d6b3664 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectPreviousItem": "Emmet: Selecione o Item anterior", + "selectNextItem": "Emmet: Selecione o próximo Item" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..ea04346ea7cf5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitJoinTag": "Emmet: Dividir/Juntar Rótulo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..366cb874a0c70 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleComment": "Emmet: Alternar Comentário" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..1eff88ade9dcd --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateImageSize": "Emmet: Atualizar o Tamanho da Imagem" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..963a85e1671f5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateTag": "Emmet: Atualizar Rótulo", + "enterTag": "Insira o Rótulo", + "tag": "Rótulo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..501253b7dcbb7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wrapWithAbbreviationAction": "Emmet: Envelope com a abreviatura", + "enterAbbreviation": "Digite a abreviação", + "abbreviation": "Abreviação" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..1caebe040f568 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "Quando habilitado, abreviações emmet são expandidas ao pressionar TAB.", + "emmetPreferences": "Preferências usadas para modificar o comportamento de algumas ações e resolvedores de Emmet.", + "emmetSyntaxProfiles": "Definir o perfil para a sintaxe especificada ou usar seu próprio perfil com regras específicas.", + "emmetExclude": "Uma matriz de línguagens onde abreviaturas emmet não devem ser expandidas.", + "emmetExtensionsPath": "Caminho para uma pasta contendo perfis emmet, trechos e preferências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json new file mode 100644 index 0000000000000..95274daf75039 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalConfigurationTitle": "Terminal Externo", + "terminal.external.windowsExec": "Personalizar qual terminal executar no Windows.", + "terminal.external.osxExec": "Personalizar qual aplicativo de terminal executar no OS X.", + "terminal.external.linuxExec": "Personalizar qual terminal executar no Linux.", + "globalConsoleActionWin": "Abrir Novo Prompt de Comando", + "globalConsoleActionMacLinux": "Abrir Novo Terminal", + "scopedConsoleActionWin": "Abrir no Prompt de Comando", + "scopedConsoleActionMacLinux": "Abrir no Terminal" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json b/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json new file mode 100644 index 0000000000000..fde640b09c5d2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "console.title": "Console VS Code", + "mac.terminal.script.failed": "Script '{0}' falhou com código de saída {1}", + "mac.terminal.type.not.supported": "'{0}' não suportado", + "press.any.key": "Pressione qualquer tecla para continuar...", + "linux.term.failed": "'{0}' falhou com código de saída {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json new file mode 100644 index 0000000000000..d79e3c4ca0ac2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.view": "Contribui ao modo de exibição personalizado", + "vscode.extension.contributes.view.id": "Identificação única usada para identificar a vista criada por vscode.workspace.createTreeView", + "vscode.extension.contributes.view.label": "Sequência de caracteres legível usada para processar a visualização", + "vscode.extension.contributes.view.icon": "Caminho para o ícone da visualização", + "vscode.extension.contributes.views": "Contribui com visualizações personalizadas", + "showViewlet": "Mostrar {0}", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json new file mode 100644 index 0000000000000..37735d1000708 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "refresh": "Atualizar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json new file mode 100644 index 0000000000000..7b7f16b3812fc --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.noMatchingProviderId": "Não há TreeExplorerNodeProvider com id {providerId} registrado." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json b/i18n/ptb/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json new file mode 100644 index 0000000000000..0e7f5f9cd9210 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorerViewlet.tree": "Seção do Explorador da Árvore" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json new file mode 100644 index 0000000000000..0ebd24a9fd8a5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error": "Erro", + "Unknown Dependency": "Dependência Desconhecida:" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json new file mode 100644 index 0000000000000..1a3b9d4cd09d5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "name": "Nome da extensão", + "extension id": "Identificador da extensão", + "publisher": "Nome do editor", + "install count": "Quantidade de Instalações", + "rating": "Avaliação", + "license": "Licença", + "details": "Detalhes", + "contributions": "Contribuições", + "changelog": "Registro de Alterações", + "dependencies": "Dependências", + "noReadme": "README não disponível.", + "noChangelog": "Registro de Alterações não disponível.", + "noContributions": "Sem Contribuições", + "noDependencies": "Sem Dependências", + "settings": "Configurações ({0})", + "setting name": "Nome", + "description": "Descrição", + "default": "Valor padrão", + "debuggers": "Depuradores ({0})", + "debugger name": "Nome", + "themes": "Temas ({0})", + "JSON Validation": "Validação JSON ({0})", + "commands": "Comandos ({0})", + "command name": "Nome", + "keyboard shortcuts": "Atalhos de Teclado", + "menuContexts": "Contextos de Menu", + "languages": "Linguagens ({0})", + "language id": "ID", + "language name": "Nome", + "file extensions": "Extensões de Arquivo", + "grammar": "Gramática", + "snippets": "Trechos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json new file mode 100644 index 0000000000000..e2ff606a7c970 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -0,0 +1,55 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installAction": "Instalar", + "installing": "Instalando", + "uninstallAction": "Desinstalar", + "Uninstalling": "Desinstalando", + "updateAction": "Atualizar", + "updateTo": "Atualizar para {0}", + "enableForWorkspaceAction.label": "Habilitar (Espaço de Trabalho)", + "enableAlwaysAction.label": "Habilitar (Sempre)", + "disableForWorkspaceAction.label": "Desabilitar (Espaço de Trabalho)", + "disableAlwaysAction.label": "Desabilitar (Sempre)", + "ManageExtensionAction.uninstallingTooltip": "Desinstalando", + "enableForWorkspaceAction": "Espaço de trabalho", + "enableGloballyAction": "Sempre", + "enableAction": "Habilitar", + "disableForWorkspaceAction": "Espaço de trabalho", + "disableGloballyAction": "Sempre", + "disableAction": "Desabilitar", + "checkForUpdates": "Verificar Atualizações", + "updateAll": "Atualizar Todas as Extensões", + "reloadAction": "Recarregar", + "postUpdateTooltip": "Recarregar para atualizar", + "postUpdateMessage": "Recarregar esta janela para ativar a extensão atualizada '{0}'?", + "postEnableTooltip": "Recarregar para ativar", + "postEnableMessage": "Recarregar esta janela para ativar a extensão '{0}'?", + "postDisableTooltip": "Recarregar para desativar", + "postDisableMessage": "Recarregar esta janela para desativar a extensão '{0}'?", + "postUninstallTooltip": "Recarregar para desativar", + "postUninstallMessage": "Recarregar esta janela para desativar a extensão desinstalada '{0}'?", + "reload": "&&Recarregar Janela", + "toggleExtensionsViewlet": "Mostrar Extensões", + "installExtensions": "Instalar Extensões", + "showInstalledExtensions": "Mostrar Extensões Instaladas", + "showDisabledExtensions": "Mostrar Extensões Desabilitadas", + "clearExtensionsInput": "Limpar Entrada de Extensões", + "showOutdatedExtensions": "Mostrar Extensões Desatualizadas", + "showPopularExtensions": "Mostrar Extensões Populares", + "showRecommendedExtensions": "Mostrar Extensões Recomendadas", + "showWorkspaceRecommendedExtensions": "Mostrar Extensões Recomendadas para o Espaço de Trabalho", + "showRecommendedKeymapExtensions": "Mostrar Mapeamentos de Teclado Recomendados", + "showRecommendedKeymapExtensionsShort": "Mapeamentos de Teclado", + "configureWorkspaceRecommendedExtensions": "Configurar Extensões Recomendadas (Espaço de Trabalho)", + "ConfigureWorkspaceRecommendations.noWorkspace": "As recomendações somente estão disponíveis em uma pasta do espaço de trabalho.", + "OpenExtensionsFile.failed": "Não foi possível criar o arquivo 'extensions.json' na pasta '.vscode' ({0}).", + "builtin": "Intrínseco", + "disableAll": "Desabilitar Todas as Extensões Instaladas", + "disableAllWorkspace": "Desabilitar Todas as Extensões Instaladas para este Espaço de Trabalho", + "enableAll": "Habilitar Todas as Extensões Instaladas", + "enableAllWorkspace": "Habilitar Todas as Extensões Instaladas para este Espaço de Trabalho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json new file mode 100644 index 0000000000000..666a66921792b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "manage": "Pressione Enter para gerenciar suas extensões.", + "searchFor": "Pressione Enter para pesquisar por '{0}' na Loja.", + "noExtensionsToInstall": "Digite um nome de extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json new file mode 100644 index 0000000000000..b90c0d5ac642c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "app.extensions.json.title": "Extensões", + "app.extensions.json.recommendations": "Lista de recomendações de extensões. O identificador de uma extensão é sempre ' ${publisher}. ${nome}'. Por exemplo: 'vscode.csharp'.", + "app.extension.identifier.errorMessage": "Formato esperado '${editor}.${nome}'. Exemplo: 'vscode.csharp'." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json new file mode 100644 index 0000000000000..333627e961989 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionsInputName": "Extensão: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json new file mode 100644 index 0000000000000..663560d4d78a1 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reallyRecommended2": "A extensão {0} é recomendada para este tipo de arquivo.", + "showRecommendations": "Mostrar Recomendações", + "neverShowAgain": "Não mostrar novamente", + "close": "Fechar", + "workspaceRecommended": "Este espaço de trabalho possui recomendações de extensão.", + "ignoreExtensionRecommendations": "Deseja ignorar todas as recomendações de extensão?", + "ignoreAll": "Sim, Ignorar Tudo", + "no": "Não", + "cancel": "Cancelar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json new file mode 100644 index 0000000000000..76bf037948158 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionsCommands": "Gerenciar Extensões", + "galleryExtensionsCommands": "Instalar Extensões da Galeria", + "extension": "Extensão", + "extensions": "Extensões", + "view": "Exibir", + "extensionsConfigurationTitle": "Extensões", + "extensionsAutoUpdate": "Atualizar extensões automaticamente", + "extensionsIgnoreRecommendations": "Ignorar recomendações de extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json new file mode 100644 index 0000000000000..731e4ef949173 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openExtensionsFolder": "Abrir a Pasta de Extensões", + "installVSIX": "Instalar do VSIX...", + "InstallVSIXAction.success": "A extensão foi instalada com sucesso. Reinicie para habilitá-la.", + "InstallVSIXAction.reloadNow": "Recarregar Agora" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..0cde76b12d897 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "disableOtherKeymapsConfirmation": "Desabilitar outros mapeamentos de teclado para evitar conflitos entre mapeamentos de teclado?", + "yes": "Sim", + "no": "Não" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json new file mode 100644 index 0000000000000..a35f8bbe6c673 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "searchExtensions": "Pesquisar Extensões na Loja", + "extensions": "Extensões", + "sort by installs": "Ordenar por: Quantidade de Instalações", + "sort by rating": "Ordenar por: Avaliação", + "sort by name": "Ordenar por: Nome", + "no extensions found": "Nenhuma extensão encontrada.", + "suggestProxyError": "A Loja retornou 'ECONNREFUSED'. Por favor, verifique a configuração de 'http.proxy'.", + "outdatedExtensions": "{0} Extensões Desatualizadas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json new file mode 100644 index 0000000000000..f0313c203438b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "enableDependeciesConfirmation": "Habilitando '{0}' também habilita suas dependências. Gostaria de continuar?", + "enable": "Sim", + "doNotEnable": "Não", + "disableDependeciesConfirmation": "Gostaria de desabilitar somente '{0}', ou as suas dependências também?", + "disableOnly": "Apenas", + "disableAll": "Todos", + "cancel": "Cancelar", + "singleDependentError": "Não é possível desabilitar a extensão '{0}'. A extensão '{1}' depende dela.", + "twoDependentsError": "Não é possível desabilitar a extensão '{0}'. As extensões '{1}' e '{2}' dependem dela.", + "multipleDependentsError": "Não é possível desabilitar a extensão '{0}'. As extensões '{1}', '{2}' e outras dependem dela." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json b/i18n/ptb/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json new file mode 100644 index 0000000000000..5d3c22c39a84f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "sendFeedback": "Tweetar Feedback", + "label.sendASmile": "Tweete feedback para nós", + "patchedVersion1": "Sua instalação está corrompida.", + "patchedVersion2": "Por favor especificar isso ao enviar um bug.", + "sentiment": "Como foi sua experiência?", + "smileCaption": "Feliz", + "frownCaption": "Triste", + "other ways to contact us": "Outras maneiras de nos contatar", + "submit a bug": "Submeter um bug", + "request a missing feature": "Solicitar um recurso ausente", + "tell us why?": "Diga-nos porquê?", + "commentsHeader": "Comentários", + "tweet": "Tweetar", + "character left": "caractere à esquerda", + "characters left": "caracteres à esquerda", + "feedbackSending": "Enviando", + "feedbackSent": "Obrigado", + "feedbackSendingError": "Tentar novamente" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json new file mode 100644 index 0000000000000..9c33fd25246c0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "binaryFileEditor": "Visualizador de Arquivo Binário" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json new file mode 100644 index 0000000000000..792781bc8c794 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textFileEditor": "Editor de Arquivo de Texto", + "createFile": "Criar arquivo", + "fileEditorWithInputAriaLabel": "{0}. Editor de Arquivo de Texto.", + "fileEditorAriaLabel": "Editor de Arquivo de Texto" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json new file mode 100644 index 0000000000000..f203671c230bf --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "Arquivos", + "revealInSideBar": "Revelar na Barra Lateral", + "acceptLocalChanges": "Usar mudanças locais e sobrescrever o conteúdo do disco", + "revertLocalChanges": "Descartar mudanças locais e reverter para conteúdo do disco" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.i18n.json new file mode 100644 index 0000000000000..161e7a9a16cdf --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/fileActions.i18n.json @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "Tentar novamente", + "rename": "Renomear", + "newFile": "Novo Arquivo", + "newFolder": "Nova Pasta", + "openFolderFirst": "Abrir uma pasta primeiro para criar arquivos ou pastas dentro dele.", + "newUntitledFile": "Novo Arquivo Sem Título", + "createNewFile": "Novo Arquivo", + "createNewFolder": "Nova Pasta", + "deleteButtonLabelRecycleBin": "&&Mover para Lixeira", + "deleteButtonLabelTrash": "&&Mover para o Lixo", + "deleteButtonLabel": "&&Excluir", + "dirtyMessageFolderOneDelete": "Você está excluindo uma pasta com alterações não salvas em 1 arquivo. Você quer continuar?", + "dirtyMessageFolderDelete": "Você está excluindo uma pasta com alterações não salvas em {0} arquivos. Você quer continuar?", + "dirtyMessageFileDelete": "Você está excluindo um arquivo com alterações não salvas. Você quer continuar?", + "dirtyWarning": "Suas alterações serão perdidas se você não salvá-las.", + "confirmMoveTrashMessageFolder": "Tem certeza de que deseja excluir '{0}' e seu conteúdo?", + "confirmMoveTrashMessageFile": "Tem certeza de que deseja excluir '{0}'?", + "undoBin": "Você pode restaurar da lixeira.", + "undoTrash": "Você pode restaurar a partir do lixo.", + "confirmDeleteMessageFolder": "Tem certeza de que deseja excluir permanentemente '{0}' e seu conteúdo?", + "confirmDeleteMessageFile": "Tem certeza de que deseja excluir permanentemente '{0}'?", + "irreversible": "Esta ação é irreversível!", + "permDelete": "Excluir permanentemente", + "delete": "Excluir", + "importFiles": "Importar Arquivos", + "confirmOverwrite": "Um arquivo ou pasta com o mesmo nome já existe na pasta de destino. Você quer substituí-lo?", + "replaceButtonLabel": "&&Substituir", + "copyFile": "Copiar", + "pasteFile": "Colar", + "duplicateFile": "Duplicar", + "openToSide": "Aberto para o lado", + "compareSource": "Selecione para comparar", + "globalCompareFile": "Compare o Arquivo Ativo Com...", + "pickHistory": "Selecione um arquivo previamente aberto para comparar com", + "unableToFileToCompare": "O arquivo selecionado não pode ser comparado com '{0}'.", + "openFileToCompare": "Abrir um arquivo primeiro para compará-lo com outro arquivo.", + "compareWith": "Comparar com '{0}'", + "compareFiles": "Comparar Arquivos", + "refresh": "Atualizar", + "save": "Salvar", + "saveAs": "Salvar como...", + "saveAll": "Salvar Todos", + "saveAllInGroup": "Salvar Todos no Grupo", + "saveFiles": "Salvar Arquivos Sujos", + "revert": "Reverter Arquivo", + "focusOpenEditors": "Foco na Visualização dos Editores Abertos", + "focusFilesExplorer": "Foco no Explorador de Arquivos", + "showInExplorer": "Revelar o Arquivo Ativo na Barra Lateral", + "openFileToShow": "Abrir um arquivo primeiro para mostrá-lo no explorer", + "collapseExplorerFolders": "Esconder Pastas no Explorador", + "refreshExplorer": "Atualizar Explorador", + "openFile": "Abrir arquivo...", + "openFileInNewWindow": "Abrir o Arquivo Ativo em uma Nova Janela", + "openFileToShowInNewWindow": "Abrir um arquivo primeiro para abrir em uma nova janela", + "revealInWindows": "Revelar no Explorer", + "revealInMac": "Revelar no Finder", + "openContainer": "Abrir a Pasta", + "revealActiveFileInWindows": "Revelar Arquivo Ativo no Windows Explorer", + "revealActiveFileInMac": "Revelar Arquivo Ativo no Finder", + "openActiveFileContainer": "Abrir a Pasta do Arquivo Ativo.", + "copyPath": "Copiar Caminho", + "copyPathOfActive": "Copiar Caminho do Arquivo Ativo", + "emptyFileNameError": "Um nome de arquivo ou pasta deve ser fornecido.", + "fileNameExistsError": "Um arquivo ou pasta **{0}** já existe neste local. Escolha um nome diferente.", + "invalidFileNameError": "O nome **{0}** não é válido como um nome de arquivo ou pasta. Por favor, escolha um nome diferente.", + "filePathTooLongError": "O nome **{0}** resulta em um caminho muito longo. Escolha um nome mais curto." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/fileCommands.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/fileCommands.i18n.json new file mode 100644 index 0000000000000..2e61a1656c803 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "Abrir um arquivo primeiro para copiar seu caminho", + "openFileToReveal": "Abrir um arquivo primeiro para revelar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json new file mode 100644 index 0000000000000..ddbc9408f54f0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "Mostrar Explorer", + "explore": "Explorador", + "view": "Exibir", + "textFileEditor": "Editor de Arquivo de Texto", + "binaryFileEditor": "Editor de Arquivo Binário", + "filesConfigurationTitle": "Arquivos", + "exclude": "Configure os padrões glob para excluir arquivos e pastas.", + "files.exclude.boolean": "O padrão glob com o qual combinar os caminhos de arquivo. Defina para verdadeiro ou falso para habilitar ou desabilitar o padrão.", + "files.exclude.when": "Verificação adicional nos irmãos de um arquivo correspondente. Use $(basename) como variável para o nome do arquivo correspondente.", + "associations": "Configurar as associações de arquivo para linguagens (por exemplo, \"* Extension\": \"html\"). Estas têm precedência sobre as associações padrão das linguagens instaladas.", + "encoding": "A codificação padrão do conjunto de caracteres para ser usada ao ler e gravar arquivos.", + "autoGuessEncoding": "Quando habilitado, tentará adivinhar a codificação do conjunto de caracteres ao abrir arquivos", + "trimTrailingWhitespace": "Quando habilitado, removerá espaços em branco à direita ao salvar um arquivo.", + "insertFinalNewline": "Quando habilitado, inseririrá uma nova linha no final do arquivo quando salvá-lo.", + "files.autoSave.off": "Um arquivo sujo nunca é automaticamente salvo.", + "files.autoSave.afterDelay": "Um arquivo sujo é salvo automaticamente após configurado em 'files.autoSaveDelay'.", + "files.autoSave.onFocusChange": "Um arquivo sujo é salvo automaticamente quando o editor perde o foco.", + "files.autoSave.onWindowChange": "Um arquivo sujo é salvo automaticamente quando a janela perde o foco.", + "autoSave": "Controla o auto-salvamento de arquivos sujos. Aceita os valores: '{0}', '{1}', '{2}' (editor perde o foco), '{3}' (janela perde o foco). Se definido como '{4}', você pode configurar o atraso em 'files.autoSaveDelay'.", + "autoSaveDelay": "Controla o atraso em milissegundos depois que um arquivo sujo é salvo automaticamente. Só se aplica quando 'files.autoSave' for definida como '{0}'", + "watcherExclude": "Configure padrões glob de caminhos de arquivo para excluir do monitoramento de arquivos. Alterar essa configuração requer uma reinicialização. Quando você tiver consumo Code muito alto de cpu na inicialização, você pode excluir pastas grandes para reduzir a carga inicial.", + "hotExit.off": "Desabilitar a saída à quente.", + "hotExit.onExit": "Saída à quente será acionada quando o aplicativo for fechado, ou seja, quando a última janela é fechada no Windows/Linux ou quando o comando workbench.action.quit é acionado (paleta de comandos, keybinding, menu). Todas as janelas com backups serão restauradas na próxima execução.", + "hotExit.onExitAndWindowClose": "Saída à quente será acionada quando o aplicativo for fechado, ou seja, quando a última janela é fechada no Windows/Linux ou quando o comando workbench.action.quit é acionado (paleta de comando, keybinding, menu), e também para qualquer janela com uma pasta aberta independentemente se é a última janela. Todas as janelas sem pastas abertas serão restauradas na próxima execução. Para restaurar as janelas de pastas como eram antes do desligamento configure \"window.reopenFolders\" para \"todos\".", + "hotExit": "Controla se os arquivos não salvos são lembrados entre as sessões, permitindo salvar alerta ao sair do editor seja ignorada.", + "defaultLanguage": "O modo de linguagem padrão que é atribuída para novos arquivos.", + "editorConfigurationTitle": "Editor", + "formatOnSave": "Formata um arquivo no salvamento. Um formatador deve estar disponível, o arquivo não deve ser salvo automaticamente e editor não deve ser desligado.", + "explorerConfigurationTitle": "Explorador de arquivos", + "openEditorsVisible": "Número de editores mostrado no painel Abrir Editores. Configurá-lo para 0 irá ocultar o painel.", + "dynamicHeight": "Controla se a altura da seção de editores abertos deve adaptar-se dinamicamente para o número de elementos ou não.", + "autoReveal": "Controla se o explorador deve automaticamente revelar e selecionar arquivos ao abri-los.", + "enableDragAndDrop": "Controla se o explorador deve permitir mover arquivos e pastas através de arrastar e soltar." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json new file mode 100644 index 0000000000000..30a0a48f866a0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "discard": "Descartar", + "overwrite": "Sobrescrever", + "retry": "Tentar novamente", + "readonlySaveError": "Falha ao salvar '{0}': O arquivo está protegido contra gravação. Selecione 'Substituir' para remover a proteção.", + "genericSaveError": "Erro ao salvar '{0}': {1}", + "staleSaveError": "Falha ao salvar '{0}': O conteúdo no disco é mais recente. Clique em **Comparar** para comparar a sua versão com a do disco.", + "compareChanges": "Comparar", + "saveConflictDiffLabel": "{0} (no disco) ↔ {1} (em {2}) - Resolver conflitos de salvamento", + "userGuide": "Use as ações na barra de ferramentas do editor para **desfazer** suas alterações ou **substituir** o conteúdo no disco com as suas alterações" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json new file mode 100644 index 0000000000000..58da5446b2596 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Seção de Explorador de Arquivos", + "noWorkspace": "Nenhuma Pasta Aberta", + "noWorkspaceHelp": "Você ainda não abriu uma pasta.", + "openFolder": "Abrir Pasta" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json new file mode 100644 index 0000000000000..4753a88bd4c92 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Seção de Explorador de Arquivos", + "treeAriaLabel": "Explorador de Arquivos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json new file mode 100644 index 0000000000000..c670883e6ace8 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "Digite o Nome do arquivo. Pressione Enter para confirmar ou Escape para cancelar.", + "filesExplorerViewerAriaLabel": "{0}, Explorador de Arquivos", + "confirmOverwriteMessage": "'{0}' já existe na pasta de destino. Deseja substituí-lo?", + "irreversible": "Esta ação é irreversível!", + "replaceButtonLabel": "&&Substituir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json new file mode 100644 index 0000000000000..4db9c1f34d87d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditosrSection": "Abrir Seção de Editores", + "openEditors": "Abrir Editores", + "treeAriaLabel": "Abrir Editores: Lista de Arquivos Ativos", + "dirtyCounter": "{0} não salvos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json new file mode 100644 index 0000000000000..dbef8f2ddb5b2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}, Agrupar Editor", + "openEditorAriaLabel": "{0}, Abrir Editor", + "saveAll": "Salvar Todos", + "closeAll": "Fechar todos", + "close": "Fechar", + "closeOthers": "Fechar Outros" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json new file mode 100644 index 0000000000000..9e75b7b2a8904 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "dirtyFiles": "{0} arquivos não salvos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json new file mode 100644 index 0000000000000..f29992f5d95ab --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "orphanedFile": "{0} (excluído do disco)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/html/browser/html.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/html/browser/html.contribution.i18n.json new file mode 100644 index 0000000000000..f9530b0f6f6e5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/html/browser/html.contribution.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.editor.label": "Visualização Html" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json b/i18n/ptb/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json new file mode 100644 index 0000000000000..8df4c48f58cf1 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.voidInput": "Entrada inválida do editor." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/html/browser/webview.i18n.json b/i18n/ptb/src/vs/workbench/parts/html/browser/webview.i18n.json new file mode 100644 index 0000000000000..2ef4463deb991 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/html/browser/webview.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "devtools.webview": "Desenvolvedor: Ferramentas Webview" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/ptb/src/vs/workbench/parts/markers/common/messages.i18n.json new file mode 100644 index 0000000000000..8576955d6093f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewCategory": "Exibir", + "problems.view.show.label": "Mostrar Problemas", + "problems.panel.configuration.title": "Visualização de Problemas", + "problems.panel.configuration.autoreveal": "Controla se a visaulização de problemas evela os arquivos automaticamente ao abri-los", + "markers.panel.title.problems": "Problemas", + "markers.panel.aria.label.problems.tree": "Problemas agrupados por arquivos", + "markers.panel.no.problems.build": "Nenhum problema foi detectado na área de trabalho até agora.", + "markers.panel.no.problems.filters": "Nenhum resultado encontrado com os critérios de filtro fornecidos", + "markers.panel.action.filter": "Problemas de Filtro", + "markers.panel.filter.placeholder": "Filtrar por tipo ou texto", + "markers.panel.filter.errors": "erros", + "markers.panel.filter.warnings": "avisos", + "markers.panel.filter.infos": "informações", + "markers.panel.single.error.label": "1 Erro", + "markers.panel.multiple.errors.label": "{0} Erros", + "markers.panel.single.warning.label": "1 Aviso", + "markers.panel.multiple.warnings.label": "{0} Avisos", + "markers.panel.single.info.label": "1 Informação", + "markers.panel.multiple.infos.label": "{0} Informações", + "markers.panel.single.unknown.label": "1 Desconhecido", + "markers.panel.multiple.unknowns.label": "{0} Desconhecidos", + "markers.panel.at.ln.col.number": "({0}, {1})", + "problems.tree.aria.label.resource": "{0} com {1} problemas", + "problems.tree.aria.label.error.marker": "Erro gerado por {0}: {1} na linha {2} e caractere {3}", + "problems.tree.aria.label.error.marker.nosource": "Erro: {0} na linha {1} e caractere {2}", + "problems.tree.aria.label.warning.marker": "Aviso gerado por {0}: {1} na linha {2} e caractere {3}", + "problems.tree.aria.label.warning.marker.nosource": "Aviso: {0} na linha {1} e caractere {2}", + "problems.tree.aria.label.info.marker": "Informação gerada por {0}: {1} na linha {2} e caractere {3}", + "problems.tree.aria.label.info.marker.nosource": "Informação: {0} na linha {1} e caractere {2}", + "problems.tree.aria.label.marker": "Problema gerado por {0}: {1} na linha {2} e caractere {3}", + "problems.tree.aria.label.marker.nosource": "Problema: {0} na linha {1} e caractere {2}", + "errors.warnings.show.label": "Mostrar Erros e Avisos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json b/i18n/ptb/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json new file mode 100644 index 0000000000000..027c80cca307b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copyMarker": "Copiar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..1ec18c632a4c6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Você deseja responder a uma pequena pesquisa?", + "takeSurvey": "Responder a pesquisa", + "remindLater": "Lembrar mais tarde", + "neverAgain": "Não mostrar novamente" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/output/browser/output.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/output/browser/output.contribution.i18n.json new file mode 100644 index 0000000000000..e36bdadf4e9c8 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/output/browser/output.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "output": "Saída", + "viewCategory": "Exibir", + "clearOutput.label": "Limpar saída" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/output/browser/outputActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/output/browser/outputActions.i18n.json new file mode 100644 index 0000000000000..00bca0dc3098c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/output/browser/outputActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleOutput": "Alternar Saída", + "clearOutput": "Limpar saída", + "toggleOutputScrollLock": "Alternar Scroll Lock de Saída", + "switchToOutput.label": "Mudar para Saída" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/output/browser/outputPanel.i18n.json b/i18n/ptb/src/vs/workbench/parts/output/browser/outputPanel.i18n.json new file mode 100644 index 0000000000000..ec28fd7b2a324 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/output/browser/outputPanel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "outputPanelWithInputAriaLabel": "{0}, Painel de saída", + "outputPanelAriaLabel": "Painel de saída" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/output/common/output.i18n.json b/i18n/ptb/src/vs/workbench/parts/output/common/output.i18n.json new file mode 100644 index 0000000000000..a083a6e7d9d21 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/output/common/output.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "output": "Saída", + "channel": "para '{0}'" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json new file mode 100644 index 0000000000000..5fda62eb168cf --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "slow": "Inicialização lenta detectada", + "slow.detail": "Pena que você teve uma inicialização lenta. Por favor reinicie '{0}' com perfil de desempenho habilitado, compartilhe os perfis conosco e nós trabalharemos duro para fazer com que a inicialização fique perfeita novamente.", + "prof.message": "Perfis criados com sucesso.", + "prof.detail": "Por favor, crie um problema e anexe manualmente os seguintes arquivos:\n{0}", + "prof.restartAndFileIssue": "Criar Problema e Reiniciar", + "prof.restart": "Reiniciar", + "prof.thanks": "Obrigado por nos ajudar.", + "prof.detail.restart": "É necessário um reinício final para continuar a usar '{0}'. Novamente, obrigado pela sua contribuição." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json new file mode 100644 index 0000000000000..279307d4b8756 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defineKeybinding.initial": "Pressionar a combinação de teclas desejada e ENTER. ESCAPE para cancelar.", + "defineKeybinding.chordsTo": "Acorde para" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json new file mode 100644 index 0000000000000..1cb6541687c6c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "keybindingsInputName": "Atalhos de Teclado", + "SearchKeybindings.AriaLabel": "Pesquisar keybindings", + "SearchKeybindings.Placeholder": "Pesquisar keybindings", + "sortByPrecedene": "Ordenar por precedência", + "header-message": "Para personalizações avançadas abrir e editar", + "keybindings-file-name": "keybindings.json", + "keybindingsLabel": "Keybindings", + "changeLabel": "Alterar Keybinding", + "addLabel": "Adicionar Keybinding", + "removeLabel": "Remover Keybinding", + "resetLabel": "Redefinir Keybinding", + "showConflictsLabel": "Mostrar Conflitos", + "copyLabel": "Copiar", + "error": "Erro '{0}' enquanto edita keybinding. Por favor, abra o arquivo 'keybindings.json' e verifique.", + "command": "Comando", + "keybinding": "KeyBinding", + "source": "Fonte", + "when": "Quando", + "editKeybindingLabelWithKey": "Alterar Keybinding {0}", + "editKeybindingLabel": "Alterar Keybinding", + "addKeybindingLabelWithKey": "Adicionar Keybinding {0}", + "addKeybindingLabel": "Adicionar Keybinding", + "commandAriaLabel": "Comando é {0}.", + "keybindingAriaLabel": "KeyBinding é {0}.", + "noKeybinding": "Nenhum Keybinding atribuído.", + "sourceAriaLabel": "Fonte é {0}.", + "whenAriaLabel": "Quando é {0}.", + "noWhen": "Sem contexto Quando." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json new file mode 100644 index 0000000000000..15fd432f9fa85 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defineKeybinding.start": "Definir Keybinding", + "defineKeybinding.kbLayoutInfoMessage": "Para o seu layout de teclado atual pressionar", + "defineKeybinding.kbLayoutErrorMessage": "Você não será capaz de produzir esta combinação de teclas sob seu layout de teclado atual." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json new file mode 100644 index 0000000000000..40e6d0841da34 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "Editor de Preferências Padrão", + "keybindingsEditor": "Editor de Keybindings", + "preferences": "Preferências" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json new file mode 100644 index 0000000000000..461e0fb96f78f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openGlobalSettings": "Abra as Configurações de Usuário", + "openGlobalKeybindings": "Abrir Atalhos de Teclado", + "openGlobalKeybindingsFile": "Abrir Arquivo de Atalhos de Teclado", + "openWorkspaceSettings": "Abrir as configurações do espaço de trabalho", + "configureLanguageBasedSettings": "Definir Configurações Específicas de Linguagem...", + "languageDescriptionConfigured": "({0})", + "pickLanguage": "Selecionar Linguagem" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json new file mode 100644 index 0000000000000..e3ef1e68a738f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "settingsEditorName": "Configurações Padrão", + "SearchSettingsWidget.AriaLabel": "Configurações de Pesquisa", + "SearchSettingsWidget.Placeholder": "Configurações de Pesquisa", + "totalSettingsMessage": "Total {0} Configurações", + "noSettingsFound": "Nenhum resultado", + "oneSettingFound": "1 Configuração correspondente", + "settingsFound": "{0} Configurações correspondentes", + "preferencesAriaLabel": "Preferências padrão. Editor de texto somente leitura." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json new file mode 100644 index 0000000000000..e35427eb2dfa1 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "errorInvalidConfiguration": "Não é possível gravar em configurações. Corrija erros/avisos no arquivo e tente novamente.", + "editTtile": "Editar", + "replaceDefaultValue": "Substituir nas Configurações", + "copyDefaultValue": "Copiar para Configurações", + "unsupportedPHPExecutablePathSetting": "Essa configuração deve ser uma Configuração de Usuário. Para configurar o PHP para o espaço de trabalho, abra um arquivo PHP e clique em 'Caminho do PHP' na barra de status.", + "unsupportedWorkspaceSetting": "Essa configuração deve ser uma Configuração de Usuário." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json new file mode 100644 index 0000000000000..3d94af6361561 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFolderFirst": "Abrir uma pasta primeiro para criar configurações de espaço de trabalho", + "emptyKeybindingsHeader": "Coloque suas chaves de ligações neste arquivo para substituir os padrões", + "defaultKeybindings": "Keybindings Padrão", + "emptySettingsHeader": "Colocar suas configurações nesse arquivo para sobrecrever as configurações padrão", + "emptySettingsHeader1": "Colocar as suas configurações nesse arquivo para sobrescrever as configurações e usuário padrão.", + "fail.createSettings": "Não foi possível criar '{0}' ({1})." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json new file mode 100644 index 0000000000000..556ef65c079dd --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "settingsSwitcherBarAriaLabel": "Chave de Configurações", + "userSettings": "Configurações de Usuário", + "workspaceSettings": "Configurações de Espaço de Trabalho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json new file mode 100644 index 0000000000000..68e05e00daf4d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "default": "Valor padrão", + "user": "Usuário", + "meta": "meta", + "option": "opção" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json new file mode 100644 index 0000000000000..6427118b75bed --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commonlyUsed": "Comumente Utilizado", + "defaultKeybindingsHeader": "Substituir as chaves de ligações, colocando-os em seu arquivo de chave ligações." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json new file mode 100644 index 0000000000000..7b246da25ad7e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Mostrar todos os comandos", + "showCommands.label": "Paleta de comandos...", + "entryAriaLabelWithKey": "{0}, {1}, comandos", + "entryAriaLabel": "{0}, comandos", + "canNotRun": "O comando '{0}' não pode ser executado a partir daqui.", + "actionNotEnabled": "O comando '{0}' não está habilitado no contexto atual.", + "commandLabel": "{0}: {1}", + "cat.title": "{0}: {1}", + "noCommandsMatching": "Não há comandos correspondentes" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json new file mode 100644 index 0000000000000..3f922e6decaa0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoLine": "Ir para linha...", + "gotoLineLabelEmptyWithLimit": "Digite um número de linha entre 1 e {0} para navegar para lá", + "gotoLineLabelEmpty": "Digite um número de linha para navegar para lá", + "gotoLineColumnLabel": "Ir para linha {0} e caractere {1}", + "gotoLineLabel": "Ir para linha {0}", + "gotoLineHandlerAriaLabel": "Digite um número de linha para navegar.", + "cannotRunGotoLine": "Abrir um arquivo de texto primeiro para ir a uma linha" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json new file mode 100644 index 0000000000000..5e56bdc5890f9 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoSymbol": "Ir para o Símbolo no Arquivo...", + "symbols": "símbolos ({0})", + "method": "métodos ({0})", + "function": "funções ({0})", + "_constructor": "construtores ({0})", + "variable": "variáveis ({0})", + "class": "classes ({0})", + "interface": "interfaces ({0})", + "namespace": "namespaces ({0})", + "package": "pacotes ({0})", + "modules": "módulos ({0})", + "property": "propriedades ({0})", + "enum": "enumerações ({0})", + "string": "cadeias de caracteres ({0})", + "rule": "regras ({0})", + "file": "arquivos ({0})", + "array": "matrizes ({0})", + "number": "números ({0})", + "boolean": "booleanos ({0})", + "object": "objetos ({0})", + "key": "chaves ({0})", + "entryAriaLabel": "{0}, símbolos", + "noSymbolsMatching": "Não há símbolos correspondentes", + "noSymbolsFound": "Nenhum símbolo encontrado", + "gotoSymbolHandlerAriaLabel": "Tipo para reduzir os símbolos do editor ativo atual.", + "cannotRunGotoSymbolInFile": "Não há informações de símbolo para o arquivo", + "cannotRunGotoSymbol": "Abrir um arquivo de texto primeiro para ir a um símbolo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json new file mode 100644 index 0000000000000..0a2fc637f737a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, ajuda do seletor", + "globalCommands": "comandos globais", + "editorCommands": "comandos do editor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json new file mode 100644 index 0000000000000..e3c6204b6055c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commandsHandlerDescriptionDefault": "Exibir e executar comandos", + "gotoLineDescriptionMac": "Ir para linha", + "gotoLineDescriptionWin": "Ir para linha", + "gotoSymbolDescription": "Ir para o Símbolo no Arquivo", + "gotoSymbolDescriptionScoped": "Ir para o Símbolo no Arquivo Por Categoria", + "helpDescription": "Mostrar ajuda", + "viewPickerDescription": "Abrir Visualização" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json new file mode 100644 index 0000000000000..388043547948b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, visualizar seletor", + "views": "Modos de exibição", + "panels": "Painéis", + "terminals": "Terminal", + "terminalTitle": "{0}: {1}", + "channels": "Saída", + "openView": "Abrir Visualização", + "quickOpenView": "Abrir Visualização Rápida" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json new file mode 100644 index 0000000000000..1b5369ebeea17 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleGitViewlet": "Mostrar Git", + "installAdditionalSCMProviders": "Instalar provedores de SCM adicionais...", + "source control": "Controle de código-fonte", + "toggleSCMViewlet": "Mostrar SCM", + "view": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json new file mode 100644 index 0000000000000..7846e2b872dcc --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "scmPendingChangesBadge": "{0} alterações pendentes" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json new file mode 100644 index 0000000000000..5b93869e8d8f4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installAdditionalSCMProviders": "Instalar provedores de SCM adicionais...", + "switch provider": "Mudar Provedor SCM..." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json new file mode 100644 index 0000000000000..c14da8019782d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commitMessage": "Mensagem (tecle {0} para confirmar)", + "source control": "Controle de código-fonte", + "viewletTitle": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json new file mode 100644 index 0000000000000..8d52351151529 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileAndTypeResults": "resultados do arquivo e símbolo", + "fileResults": "resultados do arquivo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json new file mode 100644 index 0000000000000..016a91f2c3275 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, seletor de arquivo", + "searchResults": "resultados da pesquisa" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json new file mode 100644 index 0000000000000..ede0a0c718d4e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, selecionador de símbolos", + "symbols": "resultados de símbolo", + "noSymbolsMatching": "Não há símbolos correspondentes", + "noSymbolsWithoutInput": "Digitar para pesquisar símbolos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json new file mode 100644 index 0000000000000..68c8c0ad6b700 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultLabel": "entrada", + "patternDescription": "Use Padrões Glob", + "patternHelpInclude": "O padrão para combinações. Por exemplo, **\\*\\*/*.js** para corresponder a todos os arquivos JavaScript ou **myFolder/\\*\\*** para corresponder a essa pasta com todas pastas aninhadas.\n\n**Referência**:\n**\\*** corresponde a 0 ou mais caracteres\n**?** corresponde a 1 caractere\n**\\*\\*** corresponde a zero ou mais diretórios\n**[a-z]** corresponde a um intervalo de caracteres\n**{a, b}** corresponde a qualquer um dos padrões)", + "useIgnoreFilesDescription": "Usar Ignorar Arquivos", + "useExcludeSettingsDescription": "Usar Configurações de Exclusão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/replaceService.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/replaceService.i18n.json new file mode 100644 index 0000000000000..05d7f4e4cd00a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/replaceService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileReplaceChanges": "{0} ↔ {1} (Substituir Preview)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/search.contribution.i18n.json new file mode 100644 index 0000000000000..b14e20a148767 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Ir para Símbolo no Espaço de Trabalho...", + "name": "Pesquisar", + "showSearchViewlet": "Mostrar Busca", + "view": "Exibir", + "findInFiles": "Localizar nos Arquivos", + "openAnythingHandlerDescription": "Ir para o Arquivo", + "openSymbolDescriptionNormal": "Ir para o Símbolo em Área de Trabalho", + "searchOutputChannelTitle": "Pesquisar", + "searchConfigurationTitle": "Pesquisar", + "exclude": "Configure os padrões glob para excluir arquivos e pastas nas pesquisas. Herda todos os padrões glob da configuração files.exclude.", + "exclude.boolean": "O padrão glob com o qual combinar os caminhos de arquivo. Defina para verdadeiro ou falso para habilitar ou desabilitar o padrão.", + "exclude.when": "Verificação adicional nos irmãos de um arquivo correspondente. Use $(basename) como variável para o nome do arquivo correspondente.", + "useRipgrep": "Controla se deve utilizar ripgrep na pesquisa de texto", + "useIgnoreFilesByDefault": "Controla se deve utilizar arquivos .gitignore e .ignore por padrão ao fazer pesquisas em um novo espaço de trabalho.", + "search.quickOpen.includeSymbols": "Configurar para incluir resultados de uma pesquisa símbolo global nos resultados do arquivo para Abertura Rápida." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/searchActions.i18n.json new file mode 100644 index 0000000000000..94f7c40e78209 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "nextSearchTerm": "Mostrar o Próximo Termo de Pesquisa", + "previousSearchTerm": "Mostrar Termo de Pesquisa Anterior", + "focusNextInputBox": "Focalizar a Próxima Caixa de Entrada", + "focusPreviousInputBox": "Focalizar a Caixa de Entrada Anterior", + "replaceInFiles": "Substituir nos Arquivos", + "findInFolder": "Encontrar na pasta", + "RefreshAction.label": "Atualizar", + "ClearSearchResultsAction.label": "Limpar os Resultados da Pesquisa", + "FocusNextSearchResult.label": "Focalizar o Próximo Resultado da Pesquisa", + "FocusPreviousSearchResult.label": "Focalizar o Resultado da Pesquisa Anterior", + "RemoveAction.label": "Remover", + "file.replaceAll.label": "Substituir Tudo", + "match.replace.label": "Substituir", + "ConfigureGlobalExclusionsAction.label": "Abrir configurações" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json new file mode 100644 index 0000000000000..3edda1861fb81 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "searchMatches": "{0} correspondências encontradas", + "searchMatch": "{0} correspondência encontrada", + "fileMatchAriaLabel": "{0} correspondências no arquivo {1} da pasta {2}, Resultado da pesquisa", + "replacePreviewResultAria": "Substitua o termo {0} pelo termo {1} na coluna posição {2} correspondente ao texto {3}", + "searchResultAria": "Encontrado o termo {0} na posição da coluna {1} correspondente ao texto {2}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json new file mode 100644 index 0000000000000..4ceea61601025 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json @@ -0,0 +1,50 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "moreSearch": "Alternar Detalhes da Pesquisa", + "searchScope.includes": "arquivos a serem incluídos", + "label.includes": "Pesquisa Padrões de Inclusão", + "searchScope.excludes": "arquivos a serem excluídos", + "label.excludes": "Pesquisa de Padrões de Exclusão", + "global.searchScope.folders": "arquivos excluídos pelas configurações", + "label.global.excludes": "Configurado pesquisa padrões de exclusão", + "replaceAll.confirmation.title": "Substituir Tudo", + "replaceAll.confirm.button": "Substituir", + "replaceAll.occurrence.file.message": "Substituída {0} ocorrência no arquivo {1} com '{2}'.", + "removeAll.occurrence.file.message": "Substituída {0} ocorrência no arquivo {1}'.", + "replaceAll.occurrence.files.message": "Substituída {0} ocorrência no arquivo {1} com '{2}'.", + "removeAll.occurrence.files.message": "Substituída {0} ocorrência nos arquivos {1}", + "replaceAll.occurrences.file.message": "Substituídas {0} ocorrências no arquivo {1} com '{2}'.", + "removeAll.occurrences.file.message": "Substituídas {0} ocorrências nos arquivo {1}.", + "replaceAll.occurrences.files.message": "Substituídas {0} ocorrências nos arquivos {1} com '{2}'.", + "removeAll.occurrences.files.message": "Substituídas {0} ocorrências nos arquivos {1}.", + "removeAll.occurrence.file.confirmation.message": "Substituir {0} ocorrências no arquivo {1} com '{2}'?", + "replaceAll.occurrence.file.confirmation.message": "Substituir {0} ocorrência no arquivo {1}?", + "removeAll.occurrence.files.confirmation.message": "Substituir {0} ocorrência nos arquivos {1} com '{2}'?", + "replaceAll.occurrence.files.confirmation.message": "Substituir {0} ocorrência nos arquivos {1}?", + "removeAll.occurrences.file.confirmation.message": "Substituir {0} ocorrências no arquivo {1} com '{2}'?", + "replaceAll.occurrences.file.confirmation.message": "Substituir {0} ocorrências no arquivo {1}?", + "removeAll.occurrences.files.confirmation.message": "Substituir {0} ocorrências nos arquivos {1} com '{2}'?", + "replaceAll.occurrences.files.confirmation.message": "Substituir {0} ocorrências nos arquivos {1}?", + "treeAriaLabel": "Resultados da Pesquisa", + "globLabel": "{0} quando {1}", + "searchMaxResultsWarning": "O conjunto de resultados contém apenas um subconjunto de todas as correspondências. Seja mais específico na sua pesquisa para diminuir o número de resultados.", + "searchCanceled": "Pesquisa foi cancelada antes de qualquer resultado ser encontrado - ", + "noResultsIncludesExcludes": "Nenhum resultado encontrado em '{0}' excluindo '{1}' - ", + "noResultsIncludes": "Nenhum resultado encontrado em '{0}' -", + "noResultsExcludes": "Nenhum resultado encontrado excluindo '{0}' -", + "noResultsFound": "Nenhum resultado encontrado. Analise as configurações para exclusões configuradas - ", + "rerunSearch.message": "Pesquisar novamente", + "rerunSearchInAll.message": "Pesquisar novamente em todos os arquivos", + "openSettings.message": "Abrir configurações", + "ariaSearchResultsStatus": "Pesquisa retornou {0} resultados em {1} arquivos", + "search.file.result": "{0} resultado no arquivo {1}", + "search.files.result": "{0} resultado nos arquivos {1}", + "search.file.results": "{0} resultados no arquivo {1}", + "search.files.results": "{0} resultados nos arquivos {1}", + "searchWithoutFolder": "Você ainda não abriu uma pasta. Somente arquivos abertos são pesquisados - ", + "openFolder": "Abrir Pasta" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/search/browser/searchWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/search/browser/searchWidget.i18n.json new file mode 100644 index 0000000000000..41178af28cc96 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/search/browser/searchWidget.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "search.action.replaceAll.disabled.label": "Substituir Todos (Submeter Pesquisa para Habilitar)", + "search.action.replaceAll.enabled.label": "Substituir Tudo", + "search.replace.toggle.button.title": "Alternar Substituir", + "label.Search": "Pesquisar: Digite o termo de pesquisa e pressione Enter para pesquisar ou Escape para cancelar", + "search.placeHolder": "Pesquisar", + "label.Replace": "Substituir: Digite o termo a ser substituído e pressione Enter para visualizar ou Escape para cancelar", + "search.replace.placeHolder": "Substituir", + "regexp.validationFailure": "A expressão corresponde a tudo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json new file mode 100644 index 0000000000000..0f8e63601874a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.snippets": "Contribui aos trechos de código.", + "vscode.extension.contributes.snippets-language": "Identificador de linguagem para o qual este trecho de código contribui.", + "vscode.extension.contributes.snippets-path": "Caminho do arquivo de trechos de código. O caminho é relativo à pasta de extensão e normalmente começa com '. /snippets/'.", + "invalid.language": "Linguagem desconhecida em `contributes.{0}.language`. Valor fornecido: {1}", + "invalid.path.0": "Esperada uma string em `contributes.{0}.path`. Valor informado: {1}", + "invalid.path.1": "É esperado que `contributes.{0}.path` ({1}) seja incluído na pasta da extensão ({2}). Isto pode tornar a extensão não portável." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json new file mode 100644 index 0000000000000..6c34a620b89ab --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "snippet.suggestions.label": "Inserir trecho de código" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json new file mode 100644 index 0000000000000..05f799f7b6a84 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openSnippet.label": "Abrir trechos de código do usuário", + "openSnippet.pickLanguage": "Selecionar Idioma para o Trecho", + "openSnippet.errorOnCreate": "Não é possível criar {0}", + "preferences": "Preferências", + "snippetSchema.json.default": "Trecho de código vazio", + "snippetSchema.json": "Configuração do trecho do usuário", + "snippetSchema.json.prefix": "O prefixo usado ao selecionar o trecho no intelliSense", + "snippetSchema.json.body": "O conteúdo do trecho de código. Use '${id}', '${id: rótulo}', '${1:label}' para variáveis e '$0', '$1' para posições do cursor", + "snippetSchema.json.description": "A descrição do trecho." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json new file mode 100644 index 0000000000000..a4a18c1e970f9 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "detail.userSnippet": "Trecho de código do usuário", + "snippetSuggest.longLabel": "{0}, {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json new file mode 100644 index 0000000000000..adfb9a4190d5c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tabCompletion": "Inserir trechos de código quando seu prefixo corresponder. Funciona melhor quando 'quickSuggestions' não está habilitado." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json new file mode 100644 index 0000000000000..be3fefb5d3d84 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, tarefas", + "workspace": "Do espaço de trabalho", + "extension": "De extensões" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json new file mode 100644 index 0000000000000..4009d3b815416 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Digite o nome de uma tarefa para reiniciar", + "noTasksMatching": "Não há tarefas correspondentes", + "noTasksFound": "Não há tarefa para ser reiniciada" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json new file mode 100644 index 0000000000000..6b4d6134384d8 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Digite o nome de uma tarefa para executar", + "noTasksMatching": "Não há tarefas correspondentes", + "noTasksFound": "Não há tarefas encontradas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json new file mode 100644 index 0000000000000..9c5ee4b4b598d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Digite o nome de uma tarefa para finalizar", + "noTasksMatching": "Não há tarefas correspondentes", + "noTasksFound": "Nenhuma tarefa para finalizar encontrada" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..2de0b161ac87c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "Aviso: options.cwd deve ser do tipo string. Ignorando valor {0}\n", + "ConfigurationParser.noShell": "Aviso: A configuração do shell somente é suportada quando estiver executando tarefas no terminal.", + "ConfigurationParser.noargs": "Erro: Argumentos do comando devem ser uma matriz de strings. Valor informado é:\n{0}", + "ConfigurationParser.noName": "Erro: Problem Matcher no escopo declarado deve ter um nome:\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "Aviso: a correspondência de problema definido é desconhecido. Tipos suportados são string | ProblemMatcher | (string | ProblemMatcher)[].\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "Erro: ProblemMatcher inválido referência: {0}\n", + "ConfigurationParser.noTaskName": "Erro: tarefas devem fornecer uma propriedade taskName. A tarefa será ignorada.\n{0}\n", + "taskConfiguration.shellArgs": "Aviso: a tarefa '{0}' é um comando do shell e o nome de comando ou um dos seus argumentos tem espaços sem escape. Para garantir a linha de comando correta por favor mesclar argumentos no comando.", + "taskConfiguration.noCommandOrDependsOn": "Erro: a tarefa '{0}' também não especifica um comando ou uma propriedade dependsOn. A tarefa será ignorada. Sua definição é: {1}", + "taskConfiguration.noCommand": "Erro: a tarefa '{0}' não define um comando. A tarefa será ignorada. Sua definição é: {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json new file mode 100644 index 0000000000000..268871153e335 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tsc.config": "Compila um projeto TypeScript", + "tsc.watch": "Compila um projeto TypeScript em mode de monitoramento", + "dotnetCore": "Executa comando de compilação do .NET Core", + "msbuild": "Executa a compilação destino", + "externalCommand": "Exemplo para executar um comando externo arbitrário", + "Maven": "Executa comandos comuns específicos" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json new file mode 100644 index 0000000000000..92ae501cdc880 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.options": "Opções de comando adicionais", + "JsonSchema.options.cwd": "O diretório de trabalho atual do programa executado ou do script. Se omitido raiz de espaço de trabalho atual do código é usado.", + "JsonSchema.options.env": "O ambiente do programa executado ou comando shell. Se omitido o ambiente do processo pai é usado.", + "JsonSchema.shell.executable": "O shell a ser usado.", + "JsonSchema.shell.args": "Os argumentos shell.", + "JsonSchema.command": "O comando a ser executado. Pode ser um programa externo ou um comando shell.", + "JsonSchema.tasks.args": "Argumentos passados para o comando quando esta tarefa é invocada.", + "JsonSchema.tasks.taskName": "Nome da tarefa", + "JsonSchema.tasks.windows": "Configuração de comando específica do Windows", + "JsonSchema.tasks.mac": "Configuração de comando específica do Mac", + "JsonSchema.tasks.linux": "Configuração de comando específica do Linux", + "JsonSchema.tasks.suppressTaskName": "Controla se o nome de tarefa é adicionado como um argumento para o comando. Se omitido o valor definido globalmente é usado.", + "JsonSchema.tasks.showOutput": "Controla se a saída da execução de tarefas é mostrada ou não. Se omitido o valor definido globalmente é usado.", + "JsonSchema.echoCommand": "Controla se o comando executado é enviado para a saída. O padrão é false.", + "JsonSchema.tasks.watching.deprecation": "Descontinuado. Use isBackground.", + "JsonSchema.tasks.watching": "Se a tarefa executada é mantida viva e está monitorando o sistema de arquivos.", + "JsonSchema.tasks.background": "Se a tarefa executada é mantida viva e é executado em segundo plano.", + "JsonSchema.tasks.promptOnClose": "Se o usuário é solicitado quando VS Code fecha com uma tarefa sendo executada.", + "JsonSchema.tasks.build": "Esta tarefa é mapeada para o comando de compilação padrão do código.", + "JsonSchema.tasks.test": "Esta tarefa é mapeada para o comando de teste padrão do código.", + "JsonSchema.tasks.matchers": "O problema matcher(s) a seu utilizado. Pode ser uma sequência de caracteres ou uma definição de problem matcher ou uma matriz de sequências de caracteres e problem matchers.", + "JsonSchema.args": "Argumentos adicionais passados para o comando.", + "JsonSchema.showOutput": "Controla se a saída da execução de tarefas é mostrada ou não. Se omitido 'sempre' é usado.", + "JsonSchema.watching.deprecation": "Descontinuado. Use isBackground.", + "JsonSchema.watching": "Se a tarefa executada é mantida viva e está monitorando o sistema de arquivos.", + "JsonSchema.background": "Se a tarefa executada é mantida viva e é executado em segundo plano.", + "JsonSchema.promptOnClose": "Se o usuário é solicitado quando VS Code fecha com uma tarefa de segundo plano em execução.", + "JsonSchema.suppressTaskName": "Controla se o nome de tarefa é adicionado como um argumento para o comando. O padrão é false.", + "JsonSchema.taskSelector": "Prefixo para indicar que um argumento é tarefa.", + "JsonSchema.matchers": "A correspondência de problemas a ser utilizada. Pode ser uma sequência de caracteres ou uma definição de correspondência de problemas ou uma matriz de sequências de caracteres e correspondência de problemas.", + "JsonSchema.tasks": "As configurações de tarefa. Normalmente são ampliações de tarefas já definidas na execução de tarefa externa." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json new file mode 100644 index 0000000000000..dc0695101b037 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.version": "Número da versão do config", + "JsonSchema.windows": "Configuração de comando específica do Windows", + "JsonSchema.mac": "Configuração de comando específica do Mac", + "JsonSchema.linux": "Configuração de comando específica do Linux", + "JsonSchema.shell": "Especifica se o comando é um comando shell ou um programa externo. O padrão é falso se omitido." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json new file mode 100644 index 0000000000000..3130e474d7e22 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.version": "Número da versão do config", + "JsonSchema.windows": "Configuração de comando específica do Windows", + "JsonSchema.mac": "Configuração de comando específica do Mac", + "JsonSchema.linux": "Configuração de comando específica do Linux", + "JsonSchema.shell": "Especifica se o comando é um comando shell ou um programa externo. O padrão é falso se omitido.", + "JsonSchema.tasks.dependsOn.string": "Outra tarefa da qual esta tarefa depende.", + "JsonSchema.tasks.dependsOn.array": "A outra tarefa que esta tarefa depende." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json new file mode 100644 index 0000000000000..a07be4d2850b2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -0,0 +1,47 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksCategory": "Tarefas", + "ConfigureTaskRunnerAction.noWorkspace": "Tarefas somente estão disponíveis em uma pasta da área de trabalho.", + "ConfigureTaskRunnerAction.quickPick.template": "Selecione um gerenciador de tarefa", + "ConfigureTaskRunnerAction.autoDetecting": "Tarefas de auto detecção para {0}", + "ConfigureTaskRunnerAction.autoDetect": "A tarefa de sistema de auto detecção falhou. Usando o modelo padrão. Consulte a saída da tarefa para detalhes.", + "ConfigureTaskRunnerAction.autoDetectError": "A tarefa de sistema de auto detecção produziu erros. Consulte a saída da tarefa para detalhes.", + "ConfigureTaskRunnerAction.failed": "Não é possível criar o arquivo 'tasks.json' na pasta '.vscode'. Consulte a saída da tarefa para detalhes.", + "ConfigureTaskRunnerAction.label": "Configure o gerenciador de tarefas", + "ConfigureBuildTaskAction.label": "Configurar Tarefa de Compilação", + "CloseMessageAction.label": "Fechar", + "ShowTerminalAction.label": "Terminal Visualização", + "problems": "Problemas", + "manyMarkers": "99+", + "tasks": "Tarefas", + "TaskSystem.noHotSwap": "Alterar o mecanismo de execução de tarefa requer reiniciar o VS Code. A alteração será ignorada.", + "TaskService.noBuildTask": "Nenhuma tarefa de compilação definida. Marque uma tarefa com 'isBuildCommand' no arquivo tasks.json.", + "TaskService.noTestTask": "Nenhuma tarefa de teste definida. Marque uma tarefa com 'isTestCommand' no arquivo tasks.json.", + "TaskServer.noTask": "Tarefa {0} requisitada para execução não encontrada.", + "TaskSystem.activeSame": "A tarefa já está ativa e em modo de monitoramento. Para terminar a tarefa, use `F1 > terminar tarefa`", + "TaskSystem.active": "Já existe uma tarefa sendo executada. Finalize-a antes de executar outra tarefa.", + "TaskSystem.restartFailed": "Falha ao finalizar e reiniciar a tarefa {0}", + "TaskSystem.configurationErrors": "Erro: A configuração da tarefa informada possui erros de validação e não pode ser utilizada. Por favor, corrija os erros primeiro.", + "TaskSystem.invalidTaskJson": "Erro: O conteúdo do arquivo tasks.json possui erros de sintaxe. Por favor, corrija-os antes de executar uma tarefa.\n", + "TaskSystem.runningTask": "Há uma tarefa sendo executada. Deseja finalizá-la?", + "TaskSystem.terminateTask": "&&Finalizar Tarefa", + "TaskSystem.noProcess": "A tarefa executada não existe mais. Se a tarefa produziu processos em background, finalizar o VS Code pode resultar em processos órfãos. Para evitar isso inicie o último processo em background com uma flag de espera.", + "TaskSystem.exitAnyways": "&&Sair de qualquer maneira", + "TerminateAction.label": "Finalizar a tarefa sendo executada", + "TaskSystem.unknownError": "Ocorreu um erro enquanto a tarefa estava sendo executada. Verifique o log de tarefas para detalhes.", + "TaskService.noWorkspace": "Tarefas somente estão disponíveis em uma pasta da área de trabalho.", + "TerminateAction.noProcess": "O processo executado não existe mais. Se a tarefa produziu processos em background, finalizar o VS Code pode resultar em processos órfãos.", + "TerminateAction.failed": "Falha ao finalizar a tarefa sendo executada", + "ShowLogAction.label": "Visualizar o Log de Tarefas", + "RunTaskAction.label": "Executar Tarefa", + "RestartTaskAction.label": "Reiniciar Tarefa", + "BuildAction.label": "Executar Tarefa de compilação", + "TestAction.label": "Executar Tarefa de Teste", + "quickOpen.task": "Executar Tarefa", + "quickOpen.terminateTask": "Finalizar Tarefa", + "quickOpen.restartTask": "Reiniciar Tarefa" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json new file mode 100644 index 0000000000000..f21b7eebc35d1 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TerminalTaskSystem.unknownError": "Um erro desconhecido ocorreu durante a execução de uma tarefa. Consulte o log de saída de tarefa para obter detalhes.", + "TerminalTaskSystem.terminalName": "Tarefa - {0}", + "TerminalTaskSystem": "Não é possível executar um comando shell em uma unidade UNC.", + "unkownProblemMatcher": "Problem matcher {0} não pode ser resolvido. O matcher será ignorado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json new file mode 100644 index 0000000000000..a4f13c42f7c1c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskSystemDetector.noGulpTasks": "Executando gulp..-tarefas-simples não listam nenhuma tarefa. Você executou a instalação do npm?", + "TaskSystemDetector.noJakeTasks": "Executando jake..-tarefas não listam nenhuma tarefa. Você instalou o npm?", + "TaskSystemDetector.noGulpProgram": "Gulp não está instalado no seu sistema. Execute npm install -g gulp para instalá-lo.", + "TaskSystemDetector.noJakeProgram": "Jake não está instalado no seu sistema. Execute npm install -g jake para instalá-lo.", + "TaskSystemDetector.noGruntProgram": "Grunhido não está instalado no seu sistema. Execute npm install -g grunt para instalá-lo.", + "TaskSystemDetector.noProgram": "Programa {0} não foi encontrado. Mensagem é {1}", + "TaskSystemDetector.buildTaskDetected": "Tarefa de construção chamada '{0}' detectada.", + "TaskSystemDetector.testTaskDetected": "Tarefa de teste chamada '{0}' detectada." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json new file mode 100644 index 0000000000000..72848a8cde1f7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskRunnerSystem.unknownError": "Um erro desconhecido ocorreu durante a execução de uma tarefa. Consulte o log de saída de tarefa para obter detalhes.", + "TaskRunnerSystem.watchingBuildTaskFinished": "\nTarefas de compilação de monitoramento terminaram.", + "TaskRunnerSystem.childProcessError": "Falha ao iniciar o programa externo {0} {1}.", + "TaskRunnerSystem.cancelRequested": "\nA tarefa '{0}' foi finalizada por solicitação do usuário.", + "unkownProblemMatcher": "Problema matcher {0} não pode ser resolvido. O matcher será ignorado" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json new file mode 100644 index 0000000000000..de21ec3dca10c --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalIntegratedConfigurationTitle": "Terminal Integrado", + "terminal.integrated.shell.linux": "O caminho do shell que o terminal usa no Linux.", + "terminal.integrated.shellArgs.linux": "Os argumentos de linha de comando a serem usados no terminal do Linux.", + "terminal.integrated.shell.osx": "O caminho do shell que o terminal usa no OS X.", + "terminal.integrated.shellArgs.osx": "Os argumentos de linha de comando a serem usados no terminal do OS X.", + "terminal.integrated.shell.windows": "O caminho do shell que o terminal usa no Windows. Quando usar um shell fornecido com o Windows (cmd, PowerShell ou Bash no Ubuntu), prefira utilizar C:\\Windows\\sysnative ao invés de C:\\Windows\\System32 para usar as versões de 64 bits.", + "terminal.integrated.shellArgs.windows": "Os argumentos de linha de comando a serem utilizados no terminal do Windows.", + "terminal.integrated.rightClickCopyPaste": "Quando configurado, isto evitará que o menu de contexto apareça quando pressionado o botão direito do mouse dentro do terminal, em vez disso vai copiar quando há uma seleção e colar quando não há nenhuma seleção.", + "terminal.integrated.fontFamily": "Controla a família de fontes do terminal, este padrão é o valor do editor.fontFamily.", + "terminal.integrated.fontLigatures": "Controla se as ligações de fonte são habilitadas no terminal.", + "terminal.integrated.fontSize": "Controla o tamanho da fonte em pixels do terminal.", + "terminal.integrated.lineHeight": "Controles a altura da linha do terminal, este número é multiplicada pelo tamanho da fonte terminal para obter a altura real da linha em pixels.", + "terminal.integrated.enableBold": "Se habilitar o texto em negrito dentro do terminal requer suporte do terminal shell.", + "terminal.integrated.cursorBlinking": "Controla se o cursor do terminal pisca.", + "terminal.integrated.cursorStyle": "Controla o estilo do cursor do terminal.", + "terminal.integrated.scrollback": "Controla a quantidade máxima de linhas que o terminal mantém em seu buffer.", + "terminal.integrated.setLocaleVariables": "Controla se as variáveis locais são definidas na inicialização do terminal, este padrão é verdadeiro no OS X e falso em outras plataformas.", + "terminal.integrated.cwd": "Um caminho de início explícito onde o terminal será lançado, isso é usado como o diretório de trabalho atual (cwd) para o processo shell. Isto pode ser particularmente útil em configurações de espaço de trabalho se o diretório raiz não é um cwd conveniente.", + "terminal.integrated.confirmOnExit": "Confirmar na saída se ainda houverem sessões de terminal ativas.", + "terminal.integrated.commandsToSkipShell": "Um conjunto de IDs de comando, cujas combinações de teclas não serão enviadas para o shell e sempre serão tratadas por código. Isto permite o uso de combinações de teclas que normalmente seriam consumidas pelo shell para agir da mesma forma quando o terminal não é focado, por exemplo ctrl+p para Execução Rápida.", + "terminal": "Terminal", + "terminalCategory": "Terminal", + "viewCategory": "Exibir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json new file mode 100644 index 0000000000000..e63bd5db0a068 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbench.action.terminal.toggleTerminal": "Alternar Terminal Integrado", + "workbench.action.terminal.kill": "Finalizar a Instância de Terminal Ativa", + "workbench.action.terminal.kill.short": "Encerrar Terminal", + "workbench.action.terminal.copySelection": "Copiar Seleção", + "workbench.action.terminal.new": "Criar Novo Terminal Integrado", + "workbench.action.terminal.new.short": "Novo Terminal", + "workbench.action.terminal.focus": "Focalizar Terminal", + "workbench.action.terminal.focusNext": "Focalizar Próximo Terminal", + "workbench.action.terminal.focusAtIndex": "Focalizar Terminal {0}", + "workbench.action.terminal.focusPrevious": "Focalizar Terminal Anterior", + "workbench.action.terminal.paste": "Colar no Terminal Ativo", + "workbench.action.terminal.DefaultShell": "Selecionar Shell Padrão", + "workbench.action.terminal.runSelectedText": "Executar Texto Selecionado no Terminal Ativo", + "workbench.action.terminal.runActiveFile": "Executar Arquivo Ativo no Terminal Ativo", + "workbench.action.terminal.runActiveFile.noFile": "Apenas arquivos em disco podem ser executados no terminal", + "workbench.action.terminal.switchTerminalInstance": "Trocar a instância de Terminal", + "workbench.action.terminal.scrollDown": "Rolar para Baixo (Linha)", + "workbench.action.terminal.scrollDownPage": "Rolar para Baixo (Página)", + "workbench.action.terminal.scrollToBottom": "Rolar para baixo", + "workbench.action.terminal.scrollUp": "Rolar para Cima (Linha)", + "workbench.action.terminal.scrollUpPage": "Rolar para Cima (Página)", + "workbench.action.terminal.scrollToTop": "Rolar para cima", + "workbench.action.terminal.clear": "Limpar", + "workbench.action.terminal.allowWorkspaceShell": "Permitir a Configuração de Shell da Área de Trabalho", + "workbench.action.terminal.disallowWorkspaceShell": "Não Permitir a Configuração de Shell da Área de Trabalho" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json new file mode 100644 index 0000000000000..495bd79c4bb42 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.background": "A cor de fundo do terminal, isso permite colorir o terminal com uma cor diferente do painel.", + "terminal.foreground": "A cor de primeiro plano do terminal.", + "terminal.ansiColor": "'{0}' cor ansi no terminal." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json new file mode 100644 index 0000000000000..b2b9a9a984326 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.allowWorkspaceShell": "Você permite {0} (definido como uma configuração de espaço de trabalho) a ser executado no terminal?", + "allow": "Permitir", + "disallow": "Não permitir" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json new file mode 100644 index 0000000000000..13b6933b1b91b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.copySelection.noSelection": "Não é possível copiar seleção do terminal quando o terminal não tem foco", + "terminal.integrated.exitedWithCode": "O processo terminal encerrado com código de saída: {0}", + "terminal.integrated.waitOnExit": "Pressione qualquer tecla para fechar o terminal", + "terminal.integrated.launchFailed": "O comando de processo de terminal '{0}{1}' falhou ao ser iniciado (código de saída: {2})" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json new file mode 100644 index 0000000000000..fd175c5ad29ad --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalLinkHandler.followLinkCmd": "Cmd + clique para seguir o link", + "terminalLinkHandler.followLinkCtrl": "Ctrl + clique para seguir o link" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json new file mode 100644 index 0000000000000..5e811b8610068 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copy": "Copiar", + "createNewTerminal": "Novo Terminal", + "paste": "Colar", + "clear": "Limpar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json new file mode 100644 index 0000000000000..08ec4bd977709 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.chooseWindowsShellInfo": "Você pode alterar o terminal shell padrão selecionando o botão Personalizar.", + "customize": "Personalizar", + "cancel": "Cancelar", + "never again": "Ok, Nunca Mostrar Novamente", + "terminal.integrated.chooseWindowsShell": "Selecione o seu terminal shell preferido, você pode alterar isso mais tarde em suas configurações", + "terminalService.terminalCloseConfirmationSingular": "Há uma sessão ativa de terminal, você quer finalizá-la?", + "terminalService.terminalCloseConfirmationPlural": "Existem {0} sessões ativas de terminal, você quer finalizá-las?", + "yes": "Sim" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json new file mode 100644 index 0000000000000..9968bf0b9b1e5 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectTheme.label": "Tema de Cores", + "installColorThemes": "Instalar temas de cor adicionais...", + "themes.selectTheme": "Selecione o tema de cor (teclas cima/baixo para visualização)", + "selectIconTheme.label": "Arquivo de Ícone do Tema", + "installIconThemes": "Instalar Temas de Ícones de Arquivos Adicionais...", + "noIconThemeLabel": "Nenhum", + "noIconThemeDesc": "Desabilitar ícones de arquivos", + "problemChangingIconTheme": "Problema configurando tema de ícones: {0}", + "themes.selectIconTheme": "Selecionar Tema de Ícones de Arquivos", + "generateColorTheme.label": "Gerar Tema de Cores a Partir das Configurações Atuais", + "preferences": "Preferências", + "developer": "Desenvolvedor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json new file mode 100644 index 0000000000000..1fc9c8fe3a4ca --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unsupportedWorkspaceSettings": "Esta área de trabalho contém configurações que só podem ser definidas nas configurações do usuário. ({0})", + "openWorkspaceSettings": "Abrir as configurações do espaço de trabalho", + "openDocumentation": "Saiba Mais", + "ignore": "Ignorar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json new file mode 100644 index 0000000000000..213c54a3d2484 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "releaseNotesInputName": "Notas da Versão: {0}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json new file mode 100644 index 0000000000000..3634d3c2f2ab0 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "release notes": "Notas da versão", + "updateConfigurationTitle": "Atualizar", + "updateChannel": "Configurar se você recebe atualizações automáticas de um canal de atualização. Requer uma reinicialização depois da mudança." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.i18n.json new file mode 100644 index 0000000000000..4199be74572e8 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateNow": "Atualizar Agora", + "later": "Mais tarde", + "unassigned": "Não atribuído", + "releaseNotes": "Notas da Versão", + "showReleaseNotes": "Mostrar Notas da Versão", + "downloadNow": "Baixar agora", + "read the release notes": "Bem-vindo a {0} v{1}! Gostaria de ler as Notas da Versão?", + "licenseChanged": "Nossos termos de licença mudaram, favor revisá-los.", + "license": "Ler Licença", + "updateAvailable": "{0} será atualizado após reiniciar.", + "thereIsUpdateAvailable": "Há uma atualização disponível.", + "noUpdatesAvailable": "Não há nenhuma atualização disponível." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/ptb/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json new file mode 100644 index 0000000000000..dea49eef8d512 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "watermark.showCommands": "Mostrar todos os comandos", + "watermark.quickOpen": "Ir para o Arquivo", + "watermark.openFile": "Abrir Arquivo", + "watermark.openFolder": "Abrir Pasta", + "watermark.openFileFolder": "Abrir Arquivo ou Pasta", + "watermark.openRecent": "Abrir Recente", + "watermark.newUntitledFile": "Novo Arquivo Sem Título", + "watermark.toggleTerminal": "Alternar Terminal", + "watermark.findInFiles": "Localizar nos Arquivos", + "watermark.startDebugging": "Iniciar Depuração", + "watermark.selectTheme": "Mudar Tema", + "watermark.selectKeymap": "Mudar Mapa de Teclas", + "watermark.keybindingsReference": "Referência de Teclado", + "watermark.openGlobalKeybindings": "Atalhos de Teclado", + "watermark.unboundCommand": "não vinculado", + "workbenchConfigurationTitle": "Área de Trabalho", + "tips.enabled": "Quando habilitado, mostrará as dicas de marca d'água quando nenhum editor estiver aberto." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json new file mode 100644 index 0000000000000..93d7a695382ad --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomeOverlay.explorer": "Explorador de arquivos", + "welcomeOverlay.search": "Pesquisar em arquivos", + "welcomeOverlay.git": "Gerenciamento de código fonte", + "welcomeOverlay.debug": "Executar e depurar", + "welcomeOverlay.extensions": "Gerenciar extensões", + "welcomeOverlay.problems": "Visualizar erros e avisos", + "welcomeOverlay.commandPalette": "Encontrar e executar todos os comandos", + "welcomeOverlay": "Visão geral da Interface do usuário", + "hideWelcomeOverlay": "Esconder a visão geral da Interface", + "help": "Ajuda" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json new file mode 100644 index 0000000000000..a0b426025a4f2 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomePage.vscode": "Visual Studio Code", + "welcomePage.editingEvolved": "Edição evoluiu", + "welcomePage.start": "Início", + "welcomePage.newFile": "Novo arquivo", + "welcomePage.openFolder": "Abrir pasta...", + "welcomePage.cloneGitRepository": "Clonar repositório Git...", + "welcomePage.recent": "Recente", + "welcomePage.moreRecent": "Mais...", + "welcomePage.noRecentFolders": "Não há pastas recentes", + "welcomePage.help": "Ajuda", + "welcomePage.keybindingsCheatsheet": "Folha de dicas de teclado para impressão", + "welcomePage.introductoryVideos": "Vídeos introdutórios", + "welcomePage.productDocumentation": "Documentação do produto", + "welcomePage.gitHubRepository": "Repositório GitHub", + "welcomePage.stackOverflow": "Stack Overflow", + "welcomePage.showOnStartup": "Mostrar a página de boas-vindas na inicialização", + "welcomePage.customize": "Personalizar", + "welcomePage.installExtensionPacks": "Ferramentas e linguagens", + "welcomePage.installExtensionPacksDescription": "Instalar o suporte para {0} e {1}", + "welcomePage.moreExtensions": "mais", + "welcomePage.installKeymapDescription": "Instalar atalhos de teclado", + "welcomePage.installKeymapExtension": "Instalar os atalhos de teclado de {0} e {1}", + "welcomePage.others": "outros", + "welcomePage.colorTheme": "Tema de cores", + "welcomePage.colorThemeDescription": "Fazer o editor e seu código parecer do jeito que você gosta", + "welcomePage.learn": "Aprender", + "welcomePage.showCommands": "Encontrar e executar todos os comandos", + "welcomePage.showCommandsDescription": "Comandos de rápido acesso e de pesquisar do painel de controle ({0})", + "welcomePage.interfaceOverview": "Visão geral da interface", + "welcomePage.interfaceOverviewDescription": "Obter uma sobreposição visual, destacando os principais componentes da interface do usuário", + "welcomePage.interactivePlayground": "Playground interativo", + "welcomePage.interactivePlaygroundDescription": "Experimente as características essenciais do editor em um curto passo-a-passo", + "welcomePage.quickLinks": "Links rápidos", + "welcomePage.keybindingsReference": "Referência de atalhos de teclado", + "welcomePage.keybindingsReferenceDescription": "Um PDF para impressão com os atalhos de teclado mais comuns", + "welcomePage.configureSettings": "Configurar definições", + "welcomePage.configureSettingsDescription": "Desbloquear o poder completo do VS Coda ajustando as configurações" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json new file mode 100644 index 0000000000000..7012e078815e6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbenchConfigurationTitle": "Área de Trabalho", + "welcomePage.enabled": "Quando habilitado, irá mostrar a página de boas-vindas na inicialização.", + "help": "Ajuda" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json new file mode 100644 index 0000000000000..2975525979495 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomePage": "Bem-vindo", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "Suporte para {0} já está instalado.", + "welcomePage.willReloadAfterInstallingExtensionPack": "A janela irá recarregar depois de instalar o suporte para {0}.", + "welcomePage.installingExtensionPack": "Instalar o suporte para {0}...", + "welcomePage.extensionPackNotFound": "Suporte para {0} com o id {1} não pôde ser encontrado.", + "welcomePage.keymapAlreadyInstalled": "Os atalhos de teclado de {0} já estão instalados.", + "welcomePage.willReloadAfterInstallingKeymap": "A janela irá recarregar depois de instalar os {0} atalhos de teclado.", + "welcomePage.installingKeymap": "Instalando os {0} atalhos de teclado...", + "welcomePage.keymapNotFound": "Os {0} atalhos de teclado com o id {1} não podem ser encontrados.", + "welcome.title": "Bem-vindo", + "welcomePage.extensionListSeparator": ", ", + "welcomePage.installedExtension": "{0} (instalado)", + "ok": "OK", + "cancel": "Cancelar", + "welcomePage.quickLinkBackground": "Cor de fundo para as ligações rápidas na página de boas-vindas.", + "welcomePage.quickLinkHoverBackground": "Passar sobre a cor de fundo para as ligações rápidas na página de boas-vindas." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json new file mode 100644 index 0000000000000..9c7c7f681fa23 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorWalkThrough": "Playground Interativo", + "editorWalkThrough.title": "Playground Interativo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json new file mode 100644 index 0000000000000..a789ae1c81fd4 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "walkThrough.editor.label": "Playground Interativo", + "help": "Ajuda", + "interactivePlayground": "Playground Interativo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json new file mode 100644 index 0000000000000..697623110b08d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorWalkThrough.arrowUp": "Rolar para Cima (Linha)", + "editorWalkThrough.arrowDown": "Rolar para Baixo (Linha)", + "editorWalkThrough.pageUp": "Rolar para Cima (Página)", + "editorWalkThrough.pageDown": "Rolar para Baixo (Página)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json new file mode 100644 index 0000000000000..4131ebae487a7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "walkThrough.unboundCommand": "não vinculado", + "walkThrough.gitNotFound": "Parece que o Git não está instalado no seu sistema.", + "walkThrough.embeddedEditorBackground": "Cor de fundo para os editores incorporados no Playground Interativo." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/ptb/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json new file mode 100644 index 0000000000000..188ab8da37e69 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "open": "Abrir configurações", + "close": "Fechar", + "saveAndRetry": "Salvar as configurações e tentar novamente", + "errorUnknownKey": "Não é possível gravar no arquivo de configuração (chave desconhecida)", + "errorInvalidTarget": "Não é possível gravar no arquivo de configuração (destino inválido)", + "errorNoWorkspaceOpened": "Não é possível gravar em configurações porque nenhuma pasta está aberta. Por favor, abra uma pasta primeiro e tente novamente.", + "errorInvalidConfiguration": "Não é possível gravar em configurações. Por favor abra **User Settings** para corrigir erros/avisos no arquivo e tente novamente.", + "errorInvalidConfigurationWorkspace": "Não é possível gravar em configurações. Por favor abra **Workspace Settings** para corrigir erros/avisos no arquivo e tente novamente.", + "errorConfigurationFileDirty": "Não é possível gravar em configurações, porque o arquivo foi alterado. Por favor, salve o arquivo **User Settings** e tente novamente.", + "errorConfigurationFileDirtyWorkspace": "Não é possível gravar em configurações, porque o arquivo foi alterado. Por favor, salve o arquivo **Workspace Settings** e tente novamente." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/editor/browser/editorService.i18n.json b/i18n/ptb/src/vs/workbench/services/editor/browser/editorService.i18n.json new file mode 100644 index 0000000000000..50e968f8ee37e --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/editor/browser/editorService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "compareLabels": "{0} ↔ {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/files/electron-browser/fileService.i18n.json b/i18n/ptb/src/vs/workbench/services/files/electron-browser/fileService.i18n.json new file mode 100644 index 0000000000000..49e9152a1dbee --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/files/electron-browser/fileService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "netVersionError": "O Microsoft .NET Framework 4.5 é necessário. Por favor siga o link para instalá-lo.", + "installNet": "Baixar o .NET Framework 4.5", + "neverShowAgain": "Não mostrar novamente", + "trashFailed": "Falha em mover '{0}' para a lixeira" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/ptb/src/vs/workbench/services/files/node/fileService.i18n.json new file mode 100644 index 0000000000000..b84feecdb4fb3 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/files/node/fileService.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInvalidPath": "Recurso de arquivo inválido ({0})", + "fileIsDirectoryError": "Arquivo é diretório ({0})", + "fileBinaryError": "Arquivo parece ser binário e não pode ser aberto como texto", + "fileNotFoundError": "Arquivo não encontrado ({0})", + "unableToMoveCopyError": "Não é possível mover/copiar. Arquivo poderia substituir a pasta em que está contida.", + "foldersCopyError": "Pastas não podem ser copiadas para a área de trabalho. Por favor selecione arquivos individuais para serem copiados.", + "fileReadOnlyError": "Arquivo é Somente Leitura" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json b/i18n/ptb/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json new file mode 100644 index 0000000000000..daa32f59ee979 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "errorKeybindingsFileDirty": "Não é possível gravar porque o arquivo está sujo. Por favor, salve o arquivo **Keybindings** e tente novamente.", + "parseErrors": "Não é possível gravar as combinações de teclas. Por favor abra o **arquivo Keybindings** para corrigir erros/avisos no arquivo e tente novamente.", + "errorInvalidConfiguration": "Não é possível gravar as combinações de teclas. **Arquivo Keybindings** tem um objeto que não é do tipo Matriz. Por favor, abra o arquivo para limpar e tentar novamente.", + "emptyKeybindingsHeader": "Coloque suas combinações de teclas neste arquivo para substituir os padrões" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/ptb/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json new file mode 100644 index 0000000000000..2fac75a567551 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "nonempty": "Esperado um valor não vazio", + "requirestring": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "optstring": "a propriedade `{0}` é opcional ou pode ser do tipo `string`", + "vscode.extension.contributes.keybindings.command": "Identificador do comando a ser executado quando keybinding é acionado.", + "vscode.extension.contributes.keybindings.key": "Tecla ou sequência de teclas (teclas separadas com o sinal de adição e sequências com espaço, por exemplo Ctrl+O e Ctrl+L L para um acorde", + "vscode.extension.contributes.keybindings.mac": "Chave específica Mac ou sequência de teclas.", + "vscode.extension.contributes.keybindings.linux": "Chave específica Linux ou sequência de teclas.", + "vscode.extension.contributes.keybindings.win": "Chave específica Windows ou sequência de teclas.", + "vscode.extension.contributes.keybindings.when": "Condição quando a chave está ativa.", + "vscode.extension.contributes.keybindings": "Contribui para Atalhos de Teclado.", + "invalid.keybindings": "Inválido `contributes.{0}`: {1}", + "unboundCommands": "Aqui estão outros comandos disponíveis: ", + "keybindings.json.title": "Configuração de combinações de teclas", + "keybindings.json.key": "Tecla ou sequência de teclas (separados por espaço)", + "keybindings.json.command": "Nome do comando a ser executado", + "keybindings.json.when": "Condição quando a chave está ativa.", + "keybindings.json.args": "Argumentos a serem passados para o comando para executar.", + "keyboardConfigurationTitle": "Teclado", + "dispatch": "Controla a lógica de expedição para pressionamentos de teclas para usar `keydown.code` (recomendado) ou 'keydown.keyCode'." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/message/browser/messageList.i18n.json b/i18n/ptb/src/vs/workbench/services/message/browser/messageList.i18n.json new file mode 100644 index 0000000000000..267b62d179d2a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/message/browser/messageList.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "alertErrorMessage": "Erro: {0}", + "alertWarningMessage": "Aviso: {0}", + "alertInfoMessage": "Informações: {0}", + "error": "Erro", + "warning": "Aviso", + "info": "Informações", + "close": "Fechar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/message/electron-browser/messageService.i18n.json b/i18n/ptb/src/vs/workbench/services/message/electron-browser/messageService.i18n.json new file mode 100644 index 0000000000000..cecec4b4c3aab --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/message/electron-browser/messageService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yesButton": "&&Sim", + "cancelButton": "Cancelar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/ptb/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json new file mode 100644 index 0000000000000..91df655432d4f --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid": "Inválido 'contributes.{0}`. Matriz esperada.", + "invalid.empty": "Valor em branco para` contributes.{0}`", + "require.id": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "opt.extensions": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string[]`", + "opt.filenames": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string[]`", + "opt.firstLine": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string`", + "opt.configuration": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string`", + "opt.aliases": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string[]`", + "opt.mimetypes": "a propriedade `{0}` pode ser omitida e deve ser do tipo `string[]`" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json b/i18n/ptb/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json new file mode 100644 index 0000000000000..7eed5484379af --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "saveFileFirst": "O arquivo está alterado. Por favor, salvá-lo primeiro antes reabri-lo com outra codificação.", + "genericSaveError": "Erro ao salvar '{0}': {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/ptb/src/vs/workbench/services/textfile/common/textFileService.i18n.json new file mode 100644 index 0000000000000..9fe74ad26f3aa --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "files.backup.failSave": "Arquivos não poderiam ser backupeados (erro: {0}), tente salvar seus arquivos para sair." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json b/i18n/ptb/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json new file mode 100644 index 0000000000000..491b19e87c4ef --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "saveChangesMessage": "Você quer salvar as alterações feitas para {0}?", + "saveChangesMessages": "Você quer salvar as alterações para os seguintes {0} arquivos?", + "moreFile": "... 1 arquivo adicional não está mostrado", + "moreFiles": "... {0} arquivos adicionais não estão mostrados", + "saveAll": "&&Salvar tudo", + "save": "&&Salvar", + "dontSave": "&&Não Salvar", + "cancel": "Cancelar", + "saveChangesDetail": "Suas alterações serão perdidas se você não salvá-las.", + "allFiles": "Todos os arquivos", + "noExt": "Sem extensão" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/ptb/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json new file mode 100644 index 0000000000000..02e2bc182734b --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "schema.colors": "Cores para o realce de sintaxe", + "schema.properties.name": "Descrição da regra", + "schema.fontStyle": "Estilo da fonte da regra: um estilo ou uma combinação de 'itálico', 'negrito' e 'sublinhado'", + "schema.tokenColors.path": "Caminho para um arquivo tmTheme (relativo ao arquivo atual)" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json b/i18n/ptb/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json new file mode 100644 index 0000000000000..3cf20c82de2cb --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "schema.folderExpanded": "O ícone de pasta para pastas expandidas. O ícone da pasta expandido é opcional. Se não definido, o ícone definido para a pasta será mostrado.", + "schema.folder": "O ícone de pasta para pastas colapsadas, e se folderExpanded não estiver definido, também para pastas expandidas.", + "schema.file": "O ícone de arquivo padrão, indicado para todos os arquivos que não correspondem a qualquer extensão, nome de arquivo ou idioma.", + "schema.folderNames": "Associa os nomes de pasta à ícones. A chave do objeto é o nome da pasta, não incluindo quaisquer segmentos de caminho. Nenhum padrão ou curinga são permitidos. O nome da pasta de correspondência diferencia maiusculas de minúsculas.", + "schema.folderName": "A ID da definição do ícone para associação.", + "schema.folderNamesExpanded": "Associa os nomes de pasta a ícones para pastas expandidas. A chave do objeto é o nome da pasta, não incluindo quaisquer segmentos do caminho. Padrões ou curingas não são permitidas. A correspondência do nome de pastas não diferencia maiusculas de minúsculas.", + "schema.folderNameExpanded": "A ID da definição do ícone para a associação.", + "schema.fileExtensions": "Associa as extensões de arquivo aos ícones. A chave do objeto é o nome da extensão do arquivo. O nome da extensão é o último segmento de um nome de arquivo após o último ponto (não incluindo o ponto). As extensões não diferenciam maiúsculas de minúsculas.", + "schema.fileExtension": "A ID da definição do ícone para a associação.", + "schema.fileNames": "Associa os nomes de arquivo à ícones. A chave do objeto é o nome completo do arquivo, mas não incluindo quaisquer segmentos do caminho. O nome do arquivo pode incluir pontos e uma extensão de arquivo. Nenhum padrão ou curinga é permitido. A correspondência de nome de arquivo não diferencia maiúsculas de minúsculas.", + "schema.fileName": "A ID da definição do ícone para a associação.", + "schema.languageIds": "Associa idiomas a ícones. A chave do objeto é o id de idioma definido no ponto de contribuição de linguagem.", + "schema.languageId": "O ID da definição do ícone para a associação.", + "schema.fonts": "Fontes que são usadas nas definições de ícone.", + "schema.id": "O ID da fonte.", + "schema.src": "A localização da fonte.", + "schema.font-path": "O caminho do fonte, relativo ao arquivo de tema de ícone atual.", + "schema.font-format": "O formato da fonte.", + "schema.font-weight": "O peso da fonte.", + "schema.font-sstyle": "O estilo da fonte.", + "schema.font-size": "O tamanho padrão da fonte.", + "schema.iconDefinitions": "Descrição de todos os ícones que podem ser usados quando associar arquivos de ícones.", + "schema.iconDefinition": "Uma definição de ícone. A chave do objeto é o ID da definição.", + "schema.iconPath": "Ao usar um SVG ou PNG: O caminho para a imagem. O caminho é relativo ao arquivo de configuração do ícone.", + "schema.fontCharacter": "Ao usar uma fonte glyph: O caractere na fonte para usar.", + "schema.fontColor": "Ao usar uma fonte glyph: A cor a ser utilizada.", + "schema.fontSize": "Quando estiver utilizando uma fonte: O tamanho da fonte em porcentagem para a fonte de texto. Se não for definido, o padrão é o tamanho na definição de fonte.", + "schema.fontId": "Quando estiver utilizando uma fonte: A identificação da fonte. Se não for definido, o padrão é a primeira definição de fonte.", + "schema.light": "Associações opcionais para ícones de arquivo em temas de cor clara.", + "schema.highContrast": "Associações opcionais para ícones de arquivo em temas de alto contraste." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/ptb/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json new file mode 100644 index 0000000000000..4ef6944ba7352 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.cannotparsejson": "Problemas ao analisar o arquivo de tema JSON: {0}", + "error.invalidformat.colors": "Problema ao analisar o arquivo de tema de cor: {0}. A propriedade 'colors' não é do tipo 'object'.", + "error.invalidformat.tokenColors": "Problema ao analisar o arquivo de tema de cor: {0}. A propriedade 'tokenColors' deve ser também uma matriz especificando as cores ou um caminho para um arquivo de texto de tema correspondente", + "error.plist.invalidformat": "Problema ao analisar o arquivo tmTheme: {0}. 'settings' não é uma matriz.", + "error.cannotparse": "Problemas ao analisar o arquivo tmTheme: {0}", + "error.cannotload": "Problemas ao carregar o arquivo tmTheme {0}: {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/ptb/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json new file mode 100644 index 0000000000000..caeea848338aa --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.themes": "Contribui com temas de cores do textmate.", + "vscode.extension.contributes.themes.id": "ID do tema do ícone conforme usado em configurações do usuário.", + "vscode.extension.contributes.themes.label": "Etiqueta da cor do tema como mostrado na interface do usuário.", + "vscode.extension.contributes.themes.uiTheme": "Tema base de definição das cores do editor: 'vs' é o tema de cor clara, 'vs-dark' é o tema de cor escura. 'hc preto' é o tema escuro de alto contraste.", + "vscode.extension.contributes.themes.path": "Caminho do arquivo tmTheme. O caminho é relativo à pasta de extensão e é normalmente './themes/themeFile.tmTheme'.", + "vscode.extension.contributes.iconThemes": "Contribui com temas de ícones de arquivo.", + "vscode.extension.contributes.iconThemes.id": "ID do tema do ícone como usado em configurações do usuário.", + "vscode.extension.contributes.iconThemes.label": "Etiqueta do tema do ícone como mostrado na interface do usuário.", + "vscode.extension.contributes.iconThemes.path": "Caminho do arquivo de definição do tema do ícone. O caminho é relativo à pasta de extensão e é normalmente './icons/awesome-icon-theme.json'.", + "migration.completed": "Foram adicionadas novas configurações de tema para as configurações de usuário. Backup está disponível em {0}.", + "error.cannotloadtheme": "Não é possível carregar {0}: {1}", + "reqarray": "Ponto de extensão '{0}' deve ser uma matriz.", + "reqpath": "Esperada uma string em `contributes.{0}.path`. Valor informado: {1}", + "invalid.path.1": "É esperado que `contributes.{0}.path` ({1}) seja incluído na pasta da extensão ({2}). Isto pode tornar a extensão não portável.", + "reqid": "Esperada sequência em 'contributes.{0}.ID'. Valor fornecido: {1}", + "error.cannotloadicontheme": "Não é possível carregar {0}", + "error.cannotparseicontheme": "Problemas de análise do arquivo de ícones: {0}", + "colorTheme": "Especifica o tema de cores usado no espaço de trabalho.", + "colorThemeError": "Tema é desconhecido ou não está instalado.", + "iconTheme": "Especifica o tema de ícone usado no espaço de trabalho.", + "noIconThemeDesc": "Nenhum arquivo de ícones", + "iconThemeError": "Arquivo de tema de ícones é desconhecido ou não está instalado.", + "workbenchColors": "Substitui as cores do tema do tema de cores atualmente selecionado.", + "workbenchColors.deprecated": "A configuração não é mais experimental e foi renomeada para 'workbench.colorCustomizations'", + "workbenchColors.deprecatedDescription": "Use 'workbench.colorCustomizations'" +} \ No newline at end of file diff --git a/i18n/rus/extensions/markdown/out/extension.i18n.json b/i18n/rus/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/rus/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/rus/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/rus/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/extensions/merge-conflict/package.i18n.json b/i18n/rus/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/extensions/npm/package.i18n.json b/i18n/rus/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/extensions/npm/package.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/rus/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index af5b0c29d70d2..32fb4e4b4cd18 100644 --- a/i18n/rus/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/rus/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,8 +6,6 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "Изображение слишком велико для отображения в редакторе. ", - "resourceOpenExternalButton": "Открыть изображение", - "resourceOpenExternalText": " с помощью внешней программы?", "nativeBinaryError": "Файл не будет отображен в редакторе, так как он двоичный, очень большой или использует неподдерживаемую кодировку текста.", "sizeB": "{0} Б", "sizeKB": "{0} КБ", diff --git a/i18n/rus/src/vs/code/electron-main/menus.i18n.json b/i18n/rus/src/vs/code/electron-main/menus.i18n.json index 2caee2db03b5b..68b593f21180e 100644 --- a/i18n/rus/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/rus/src/vs/code/electron-main/menus.i18n.json @@ -14,6 +14,7 @@ "mHelp": "&&Справка", "miNewWindow": "&&Новое окно", "mAbout": "О программе {0}", + "mServices": "Службы", "mHide": "Скрыть {0}", "mHideOthers": "Скрыть другие", "mShowAll": "Показать все", @@ -69,6 +70,7 @@ "miSmartSelectShrink": "&&Сжать выделение", "miViewExplorer": "Проводник", "miViewSearch": "Поиск", + "miViewSCM": "S&&CM", "miViewDebug": "Отладка", "miViewExtensions": "Р&&асширения", "miToggleOutput": "Вывод", diff --git a/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json index 9b6838aa6656d..53078d0a5b6c9 100644 --- a/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -40,7 +40,6 @@ "formatOnType": "Управляет параметром, определяющим, должен ли редактор автоматически форматировать строку после ввода.", "formatOnPaste": "Определяет, будет ли редактор автоматически форматировать вставленное содержимое. Модуль форматирования должен быть доступен и иметь возможность форматировать диапазон в документе.", "suggestOnTriggerCharacters": "Определяет, должны ли при вводе триггерных символов автоматически отображаться предложения.", - "acceptSuggestionOnEnter": "Определяет, будут ли предложения приниматься клавишей ВВОД в дополнение к клавише TAB. Это помогает избежать неоднозначности между вставкой новых строк и принятием предложений.", "acceptSuggestionOnCommitCharacter": "Определяет, будут ли предложения приниматься символами фиксации. Например, в JavaScript точка с запятой (\";\") может быть символом фиксации, принимающим предложение и вводящим данный символ.", "snippetSuggestions": "Управляет отображением фрагментов вместе с другими предложениями и их сортировкой.", "emptySelectionClipboard": "Управляет тем, копируется ли текущая строка при копировании без выделения.", diff --git a/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..e61942e5d18e7 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Определение для \"{0}\" не найдено.", + "generic.noResults": "Определения не найдены.", + "meta.title": " — определения {0}", + "actions.goToDecl.label": "Перейти к определению", + "actions.goToDeclToSide.label": "Открыть определение сбоку", + "actions.previewDecl.label": "Показать определение", + "goToImplementation.noResultWord": "Не найдена реализация для \"{0}\".", + "goToImplementation.generic.noResults": "Не найдена реализация.", + "meta.implementations.title": "— {0} реализаций", + "actions.goToImplementation.label": "Перейти к реализации", + "actions.peekImplementation.label": "Показать реализацию", + "goToTypeDefinition.noResultWord": "Не найдено определение типа для \"{0}\".", + "goToTypeDefinition.generic.noResults": "Не найдено определение типа.", + "meta.typeDefinitions.title": "— {0} определений типов", + "actions.goToTypeDefinition.label": "Перейти к определению типа", + "actions.peekTypeDefinition.label": "Показать определение типа" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..a403ef380f2f7 --- /dev/null +++ b/i18n/rus/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Щелкните, чтобы отобразить определения ({0})." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json index ff2b65c8faba0..f2bd599c1b9df 100644 --- a/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -7,6 +7,7 @@ "view": "Просмотреть", "help": "Справка", "file": "Файл", + "developer": "Разработчик", "showEditorTabs": "Определяет, должны ли открытые редакторы отображаться на вкладках или нет.", "editorTabCloseButton": "Определяет положение кнопок закрытия вкладок редактора или отключает их, если задано значение off.", "showIcons": "Определяет, должны ли открытые редакторы отображаться со значком. Требует включить тему значков.", diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8b6ad71cd4e6d..906d10fee6b4b 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "disableOtherKeymapsConfirmation": "Отключить другие раскладки клавиатуры, чтобы избежать конфликта между настраиваемыми сочетаниями клавиш?", + "yes": "Да", + "no": "Нет" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 952d7106938fb..6c404cd1796be 100644 --- a/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,7 +16,6 @@ "associations": "Настройте сопоставления файлов с языками (например, \"*.extension\": \"html\"). У них будет приоритет перед заданными по умолчанию сопоставлениями установленных языков.", "encoding": "Кодировка набора символов по умолчанию, используемая при чтении и записи файлов", "autoGuessEncoding": "Если параметр включен, производится попытка определить кодировку набора символов при открытии файлов", - "eol": "Символ конца строки по умолчанию.", "trimTrailingWhitespace": "Если этот параметр включен, при сохранении файла будут удалены концевые пробелы.", "insertFinalNewline": "Если этот параметр включен, при сохранении файла в его конец вставляется финальная новая строка.", "files.autoSave.off": "\"Грязный\" файл не сохраняется автоматически.", diff --git a/i18n/rus/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index ef99a2ea9f3d3..5ac046256bd5e 100644 --- a/i18n/rus/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -5,5 +5,9 @@ // Do not edit this file. It is machine generated. { "slow": "Обнаружен замедленный запуск.", - "slow.detail": "Сожалеем, что у вас произошел замедленный запуск. Перезапустите \"{0}\" с включенным профилированием и отправьте профили нам, чтобы мы могли ускорить загрузку." + "slow.detail": "Сожалеем, что у вас произошел замедленный запуск. Перезапустите \"{0}\" с включенным профилированием и отправьте профили нам, чтобы мы могли ускорить загрузку.", + "prof.message": "Профили успешно созданы.", + "prof.detail": "Создайте проблему и вручную вложите следующие файлы:\n{0}", + "prof.restartAndFileIssue": "Создать проблему и выполнить перезапуск", + "prof.restart": "Перезапустить" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 901720ad5ddfc..1365e07209bb0 100644 --- a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,6 +5,11 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Добро пожаловать", + "welcomePage.typeScript": "TypeScript", + "welcomePage.php": "PHP", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", "welcomePage.keymapAlreadyInstalled": "Сочетания клавиш {0} уже установлены.", "welcomePage.willReloadAfterInstallingKeymap": "Окно перезагрузится после установки сочетаний клавиш {0}.", "welcomePage.installingKeymap": "Устанавливаются сочетания клавиш {0}...", From fc59debe991a0d6ed546d02a47a97d1a312ccc47 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 25 May 2017 08:05:53 +0200 Subject: [PATCH 1143/2747] theming - remove hardcoded list color in keybindings editor --- .../browser/media/keybindingsEditor.css | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css b/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css index 29b4fe0a8d134..9932877ef4d89 100644 --- a/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css +++ b/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css @@ -68,20 +68,6 @@ display: flex; } -.keybindings-editor > .keybindings-body .keybindings-list-container .monaco-list-row.keybindings-list-header.focused, -.keybindings-editor > .keybindings-body .keybindings-list-container .monaco-list-row.keybindings-list-header.selected, -.keybindings-editor > .keybindings-body .keybindings-list-container .monaco-list-row.keybindings-list-header:hover, -.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row.keybindings-list-header, -.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row.even:not(.focused):not(.selected):not(:hover), -.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:not(:focus) .monaco-list-row.focused.even:not(.selected):not(:hover), -.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:not(.focused) .monaco-list-row.focused.even:not(.selected):not(:hover) { - background-color: rgba(130, 130, 130, 0.04); -} - -.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row:hover { - background-color: rgba(128, 128, 128, 0.15); -} - .keybindings-editor > .keybindings-body .keybindings-list-container .monaco-list-row > .header { text-align: left; font-weight: bold; From 27625c21a2036f243ffcb1bc74f080513c9f4341 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 08:44:16 +0200 Subject: [PATCH 1144/2747] [lua] update grammar --- extensions/lua/syntaxes/lua.json | 148 ++++++++++++++---- .../lua/test/colorize-results/test_lua.json | 32 +--- 2 files changed, 123 insertions(+), 57 deletions(-) diff --git a/extensions/lua/syntaxes/lua.json b/extensions/lua/syntaxes/lua.json index 0bde9524ea490..a4da3a43c6a1f 100644 --- a/extensions/lua/syntaxes/lua.json +++ b/extensions/lua/syntaxes/lua.json @@ -1,39 +1,61 @@ { "comment": "Lua Syntax: version 0.8", "fileTypes": [ - "lua" + "lua", + "p8", + "rockspec", + "luacheckrc", + "lakefile" ], - "firstLineMatch": "\\A#!.*?\\blua\\b", + "firstLineMatch": "\\A#!.*?\\blua(\\d+(\\.\\d+)?)?\\b|\\A--\\s+-\\*-\\s*lua\\s*-\\*-", "keyEquivalent": "^~L", "name": "Lua", "patterns": [ { - "captures": { + "begin": "\\b((local\\b)\\s+)?(function)\\s*(\\s+[a-zA-Z_][a-zA-Z0-9_]*(\\.[a-zA-Z_][a-zA-Z0-9_]*)*(:[a-zA-Z_][a-zA-Z0-9_]*)?\\s*)?(\\()", + "beginCaptures": { "1": { - "name": "keyword.control.lua" - }, - "2": { - "name": "entity.name.function.scope.lua" + "name": "storage.modifier.local.lua" }, "3": { - "name": "entity.name.function.lua" + "name": "keyword.control.lua" }, "4": { - "name": "punctuation.definition.parameters.begin.lua" + "name": "entity.name.function.lua" }, "5": { - "name": "variable.parameter.function.lua" - }, - "6": { + "name": "punctuation.definition.parameters.begin.lua" + } + }, + "end": "\\)", + "endCaptures": { + "0": { "name": "punctuation.definition.parameters.end.lua" } }, - "match": "\\b(function)(?:\\s+([a-zA-Z_.:]+[.:])?([a-zA-Z_]\\w*)\\s*)?(\\()([^)]*)(\\))", - "name": "meta.function.lua" + "name": "meta.function.lua", + "patterns": [ + { + "match": "[a-zA-Z_][a-zA-Z0-9_]*", + "name": "variable.parameter.function.lua" + } + ] + }, + { + "match": "(? Date: Thu, 25 May 2017 09:44:01 +0200 Subject: [PATCH 1145/2747] How to configure a window (also for reload case)? (fixes #27192) --- src/vs/code/electron-main/menus.ts | 20 +++++- src/vs/code/electron-main/window.ts | 10 +-- src/vs/code/electron-main/windows.ts | 84 +---------------------- src/vs/code/node/keyboard.ts | 70 +++++++++++++++++++ src/vs/workbench/electron-browser/main.ts | 10 ++- 5 files changed, 100 insertions(+), 94 deletions(-) create mode 100644 src/vs/code/node/keyboard.ts diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 91ccab243c9fc..249722e754c0b 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -9,7 +9,7 @@ import * as nls from 'vs/nls'; import { isMacintosh, isLinux, isWindows, language } from 'vs/base/common/platform'; import * as arrays from 'vs/base/common/arrays'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { ipcMain as ipc, app, shell, dialog, Menu, MenuItem } from 'electron'; +import { ipcMain as ipc, app, shell, dialog, Menu, MenuItem, BrowserWindow } from 'electron'; import { OpenContext } from 'vs/code/common/windows'; import { IWindowsMainService } from 'vs/code/electron-main/windows'; import { VSCodeWindow } from 'vs/code/electron-main/window'; @@ -908,7 +908,7 @@ export class VSCodeMenu { label: this.mnemonicLabel(nls.localize({ key: 'miAccessibilityOptions', comment: ['&& denotes a mnemonic'] }, "Accessibility &&Options")), accelerator: null, click: () => { - this.windowsService.openAccessibilityOptions(); + this.openAccessibilityOptions(); } }, false)); @@ -974,6 +974,22 @@ export class VSCodeMenu { } } + private openAccessibilityOptions(): void { + let win = new BrowserWindow({ + alwaysOnTop: true, + skipTaskbar: true, + resizable: false, + width: 450, + height: 300, + show: true, + title: nls.localize('accessibilityOptionsWindowTitle', "Accessibility Options") + }); + + win.setMenuBarVisibility(false); + + win.loadURL('chrome://accessibility'); + } + private getUpdateMenuItems(): Electron.MenuItem[] { switch (this.updateService.state) { case UpdateState.Uninitialized: diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 7cd1f6470833f..4b1840c8642dc 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -22,7 +22,7 @@ import product from 'vs/platform/node/product'; import { getCommonHTTPHeaders } from 'vs/platform/environment/node/http'; import { IWindowSettings, MenuBarVisibility } from 'vs/platform/windows/common/windows'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; - +import { KeyboardLayoutMonitor } from "vs/code/node/keyboard"; export interface IWindowState { width?: number; @@ -82,10 +82,7 @@ export interface IWindowConfiguration extends ParsedArgs { * The physical keyboard is of ISO type (on OSX). */ isISOKeyboard?: boolean; - /** - * Accessibility support is enabled. - */ - accessibilitySupportEnabled?: boolean; + zoomLevel?: number; fullscreen?: boolean; highContrast?: boolean; @@ -558,6 +555,9 @@ export class VSCodeWindow { windowConfiguration.highContrast = platform.isWindows && systemPreferences.isInvertedColorScheme() && (!windowConfig || windowConfig.autoDetectHighContrast); windowConfiguration.accessibilitySupport = app.isAccessibilitySupportEnabled(); + // Set Keyboard Config + windowConfiguration.isISOKeyboard = KeyboardLayoutMonitor.INSTANCE.isISOKeyboard(); + // Theme windowConfiguration.baseTheme = this.getBaseTheme(); windowConfiguration.backgroundColor = this.getBackgroundColor(); diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 72d1091e19642..b4324486c62b6 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -31,8 +31,7 @@ import product from 'vs/platform/node/product'; import { OpenContext } from 'vs/code/common/windows'; import { ITelemetryService, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; import { isParent, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; -import * as nativeKeymap from 'native-keymap'; -import { IDisposable } from 'vs/base/common/lifecycle'; +import { KeyboardLayoutMonitor } from "vs/code/node/keyboard"; enum WindowError { UNRESPONSIVE, @@ -107,7 +106,6 @@ export interface IWindowsMainService { openFileFolderPicker(forceNewWindow?: boolean, data?: ITelemetryData): void; openFilePicker(forceNewWindow?: boolean, path?: string, window?: VSCodeWindow, data?: ITelemetryData): void; openFolderPicker(forceNewWindow?: boolean, window?: VSCodeWindow, data?: ITelemetryData): void; - openAccessibilityOptions(): void; focusLastActive(cli: ParsedArgs, context: OpenContext): VSCodeWindow; getLastActiveWindow(): VSCodeWindow; findWindow(workspacePath: string, filePath?: string, extensionDevelopmentPath?: string): VSCodeWindow; @@ -343,6 +341,7 @@ export class WindowsManager implements IWindowsMainService { } private onBroadcast(event: string, payload: any): void { + // Theme changes if (event === 'vscode:changeColorTheme' && typeof payload === 'string') { @@ -737,8 +736,6 @@ export class WindowsManager implements IWindowsMainService { configuration.filesToCreate = filesToCreate; configuration.filesToDiff = filesToDiff; configuration.nodeCachedDataDir = this.environmentService.nodeCachedDataDir; - configuration.isISOKeyboard = KeyboardLayoutMonitor.INSTANCE.isISOKeyboard(); - configuration.accessibilitySupportEnabled = app.isAccessibilitySupportEnabled(); return configuration; } @@ -1028,22 +1025,6 @@ export class WindowsManager implements IWindowsMainService { this.doPickAndOpen({ pickFolders: true, forceNewWindow, window }, 'openFolder', data); } - public openAccessibilityOptions(): void { - let win = new BrowserWindow({ - alwaysOnTop: true, - skipTaskbar: true, - resizable: false, - width: 450, - height: 300, - show: true, - title: nls.localize('accessibilityOptionsWindowTitle', "Accessibility Options") - }); - - win.setMenuBarVisibility(false); - - win.loadURL('chrome://accessibility'); - } - private doPickAndOpen(options: INativeOpenDialogOptions, eventName: string, data?: ITelemetryData): void { this.getFileOrFolderPaths(options, (paths: string[]) => { const nOfPaths = paths ? paths.length : 0; @@ -1338,63 +1319,4 @@ export class WindowsManager implements IWindowsMainService { }, 10 /* delay to unwind callback stack (IPC) */); } } -} - -class KeyboardLayoutMonitor { - - public static INSTANCE = new KeyboardLayoutMonitor(); - - private _emitter: Emitter; - private _registered: boolean; - private _isISOKeyboard: boolean; - - private constructor() { - this._emitter = new Emitter(); - this._registered = false; - this._isISOKeyboard = this._readIsISOKeyboard(); - } - - public onDidChangeKeyboardLayout(callback: (isISOKeyboard: boolean) => void): IDisposable { - if (!this._registered) { - this._registered = true; - - nativeKeymap.onDidChangeKeyboardLayout(() => { - this._emitter.fire(this._isISOKeyboard); - }); - - if (platform.isMacintosh) { - // See https://github.com/Microsoft/vscode/issues/24153 - // On OSX, on ISO keyboards, Chromium swaps the scan codes - // of IntlBackslash and Backquote. - // - // The C++ methods can give the current keyboard type (ISO or not) - // only after a NSEvent was handled. - // - // We therefore poll. - setInterval(() => { - let newValue = this._readIsISOKeyboard(); - if (this._isISOKeyboard === newValue) { - // no change - return; - } - - this._isISOKeyboard = newValue; - this._emitter.fire(this._isISOKeyboard); - - }, 3000); - } - } - return this._emitter.event(callback); - } - - private _readIsISOKeyboard(): boolean { - if (platform.isMacintosh) { - return nativeKeymap.isISOKeyboard(); - } - return false; - } - - public isISOKeyboard(): boolean { - return this._isISOKeyboard; - } -} +} \ No newline at end of file diff --git a/src/vs/code/node/keyboard.ts b/src/vs/code/node/keyboard.ts new file mode 100644 index 0000000000000..d2f968371ef68 --- /dev/null +++ b/src/vs/code/node/keyboard.ts @@ -0,0 +1,70 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as nativeKeymap from 'native-keymap'; +import { IDisposable } from 'vs/base/common/lifecycle'; +import { isMacintosh } from "vs/base/common/platform"; +import { Emitter } from "vs/base/common/event"; + +export class KeyboardLayoutMonitor { + + public static readonly INSTANCE = new KeyboardLayoutMonitor(); + + private _emitter: Emitter; + private _registered: boolean; + private _isISOKeyboard: boolean; + + private constructor() { + this._emitter = new Emitter(); + this._registered = false; + this._isISOKeyboard = this._readIsISOKeyboard(); + } + + public onDidChangeKeyboardLayout(callback: (isISOKeyboard: boolean) => void): IDisposable { + if (!this._registered) { + this._registered = true; + + nativeKeymap.onDidChangeKeyboardLayout(() => { + this._emitter.fire(this._isISOKeyboard); + }); + + if (isMacintosh) { + // See https://github.com/Microsoft/vscode/issues/24153 + // On OSX, on ISO keyboards, Chromium swaps the scan codes + // of IntlBackslash and Backquote. + // + // The C++ methods can give the current keyboard type (ISO or not) + // only after a NSEvent was handled. + // + // We therefore poll. + setInterval(() => { + let newValue = this._readIsISOKeyboard(); + if (this._isISOKeyboard === newValue) { + // no change + return; + } + + this._isISOKeyboard = newValue; + this._emitter.fire(this._isISOKeyboard); + + }, 3000); + } + } + return this._emitter.event(callback); + } + + private _readIsISOKeyboard(): boolean { + if (isMacintosh) { + return nativeKeymap.isISOKeyboard(); + } + return false; + } + + public isISOKeyboard(): boolean { + return this._isISOKeyboard; + } +} diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index fb179f3196cab..b20a6fd422ae3 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -42,10 +42,7 @@ export interface IWindowConfiguration extends ParsedArgs, IOpenFileRequest { */ isISOKeyboard?: boolean; - /** - * Accessibility support is enabled. - */ - accessibilitySupportEnabled?: boolean; + accessibilitySupport?: boolean; appRoot: string; execPath: string; @@ -62,15 +59,16 @@ export function startup(configuration: IWindowConfiguration): TPromise { // Ensure others can listen to zoom level changes browser.setZoomFactor(webFrame.getZoomFactor()); + // See https://github.com/Microsoft/vscode/issues/26151 // Can be trusted because we are not setting it ourselves. - browser.setZoomLevel(webFrame.getZoomLevel(), /*isTrusted*/true); + browser.setZoomLevel(webFrame.getZoomLevel(), true /* isTrusted */); browser.setFullscreen(!!configuration.fullscreen); KeyboardMapperFactory.INSTANCE._onKeyboardLayoutChanged(configuration.isISOKeyboard); - browser.setAccessibilitySupport(configuration.accessibilitySupportEnabled ? platform.AccessibilitySupport.Enabled : platform.AccessibilitySupport.Disabled); + browser.setAccessibilitySupport(configuration.accessibilitySupport ? platform.AccessibilitySupport.Enabled : platform.AccessibilitySupport.Disabled); // Setup Intl comparer.setFileNameComparer(new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' })); From a9486e406f22836b9ca6fac6c113ea9116f70cbc Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 25 May 2017 09:53:23 +0200 Subject: [PATCH 1146/2747] linting: convert double quote imports to single quote --- extensions/typescript/src/utils/logger.ts | 2 +- extensions/typescript/src/utils/plugins.ts | 2 +- extensions/typescript/src/utils/telemetry.ts | 2 +- src/vs/base/browser/ui/countBadge/countBadge.ts | 4 ++-- .../base/browser/ui/progressbar/progressbar.ts | 4 ++-- src/vs/base/test/common/json.test.ts | 2 +- src/vs/code/electron-main/window.ts | 2 +- src/vs/code/electron-main/windows.ts | 2 +- src/vs/code/node/keyboard.ts | 4 ++-- .../editor/browser/controller/textAreaHandler.ts | 12 ++++++------ .../editor/browser/controller/textAreaInput.ts | 4 ++-- src/vs/editor/browser/view/viewController.ts | 2 +- src/vs/editor/browser/view/viewImpl.ts | 2 +- .../viewParts/editorScrollbar/editorScrollbar.ts | 2 +- .../editor/browser/viewParts/minimap/minimap.ts | 4 ++-- .../scrollDecoration/scrollDecoration.ts | 4 ++-- src/vs/editor/browser/widget/diffEditorWidget.ts | 2 +- src/vs/editor/common/commonCodeEditor.ts | 4 ++-- src/vs/editor/common/config/fontInfo.ts | 2 +- src/vs/editor/common/controller/accGenerator.ts | 2 +- src/vs/editor/common/controller/coreCommands.ts | 6 +++--- src/vs/editor/common/controller/cursor.ts | 2 +- src/vs/editor/common/controller/cursorCommon.ts | 2 +- .../common/controller/cursorDeleteOperations.ts | 2 +- .../common/controller/cursorTypeOperations.ts | 2 +- .../common/controller/cursorWordOperations.ts | 2 +- src/vs/editor/common/model/textModel.ts | 2 +- src/vs/editor/common/model/textModelSearch.ts | 2 +- .../editor/common/services/modelServiceImpl.ts | 2 +- src/vs/editor/common/standalone/themes.ts | 4 ++-- src/vs/editor/common/view/viewEvents.ts | 2 +- src/vs/editor/common/viewLayout/viewLayout.ts | 2 +- .../common/viewModel/splitLinesCollection.ts | 2 +- src/vs/editor/common/viewModel/viewModel.ts | 6 +++--- src/vs/editor/common/viewModel/viewModelImpl.ts | 2 +- .../bracketMatching/common/bracketMatching.ts | 6 +++--- .../editor/contrib/codelens/browser/codelens.ts | 8 ++++---- .../test/common/lineCommentCommand.test.ts | 6 +++--- src/vs/editor/contrib/dnd/browser/dnd.ts | 2 +- .../editor/contrib/find/common/findController.ts | 2 +- .../contrib/find/common/findDecorations.ts | 2 +- .../contrib/folding/common/foldingModel.ts | 2 +- .../browser/goToDeclarationMouse.ts | 2 +- .../contrib/hover/browser/modesContentHover.ts | 2 +- .../inPlaceReplace/common/inPlaceReplace.ts | 2 +- .../linesOperations/common/linesOperations.ts | 2 +- .../test/common/linesOperations.test.ts | 6 +++--- src/vs/editor/contrib/links/browser/links.ts | 4 ++-- .../contrib/quickOpen/browser/editorQuickOpen.ts | 2 +- .../referenceSearch/browser/referencesWidget.ts | 4 ++-- .../contrib/snippet/browser/snippetSession.ts | 2 +- .../test/browser/snippetController2.old.test.ts | 4 ++-- .../test/browser/snippetController2.test.ts | 2 +- .../snippet/test/browser/snippetSession.test.ts | 2 +- .../wordHighlighter/common/wordHighlighter.ts | 2 +- .../wordOperations/common/wordOperations.ts | 6 +++--- .../test/common/wordOperations.test.ts | 2 +- .../contrib/zoneWidget/browser/zoneWidget.ts | 2 +- src/vs/editor/editor.main.ts | 2 +- .../browser/controller/textAreaState.test.ts | 2 +- .../test/common/commands/commandTestUtils.ts | 2 +- .../test/common/commands/sideEditing.test.ts | 2 +- .../common/config/commonEditorConfig.test.ts | 4 ++-- .../editor/test/common/controller/cursor.test.ts | 10 +++++----- .../common/controller/cursorMoveCommand.test.ts | 2 +- .../test/common/mocks/testConfiguration.ts | 2 +- .../test/common/model/textModelSearch.test.ts | 4 ++-- src/vs/workbench/browser/parts/compositePart.ts | 2 +- .../browser/parts/editor/editorGroupsControl.ts | 2 +- .../browser/parts/editor/webviewEditor.ts | 8 ++++---- .../browser/parts/statusbar/statusbarPart.ts | 2 +- .../workbench/common/editor/rangeDecorations.ts | 2 +- src/vs/workbench/electron-browser/workbench.ts | 8 ++++---- src/vs/workbench/node/extensionPoints.ts | 2 +- .../parts/debug/browser/debugActionItems.ts | 2 +- .../parts/debug/browser/exceptionWidget.ts | 6 +++--- .../electron-browser/debugEditorContribution.ts | 2 +- .../parts/debug/electron-browser/debugHover.ts | 2 +- .../electron-browser/statusbarColorProvider.ts | 2 +- .../actions/expandAbbreviation.ts | 2 +- .../emmet/electron-browser/editorAccessor.ts | 2 +- .../extensions/browser/extensionsActions.ts | 6 +++--- .../parts/feedback/electron-browser/feedback.ts | 6 +++--- .../electron-browser/feedbackStatusbarItem.ts | 2 +- .../parts/files/browser/views/openEditorsView.ts | 2 +- .../parts/markers/browser/markersTreeViewer.ts | 6 +++--- .../preferences/browser/keybindingWidgets.ts | 2 +- .../preferences/browser/keybindingsEditor.ts | 2 +- .../preferences/browser/preferencesEditor.ts | 4 ++-- .../preferences/browser/preferencesRenderers.ts | 2 +- .../preferences/browser/preferencesWidgets.ts | 2 +- .../parts/quickopen/browser/commandsHandler.ts | 2 +- .../scm/electron-browser/dirtydiffDecorator.ts | 10 +++++----- .../parts/search/browser/openFileHandler.ts | 2 +- .../parts/search/browser/searchResultsView.ts | 4 ++-- .../parts/search/browser/searchViewlet.ts | 2 +- src/vs/workbench/parts/search/common/search.ts | 8 ++++---- .../workbench/parts/search/common/searchModel.ts | 2 +- .../snippets/electron-browser/TMSnippets.ts | 2 +- .../electron-browser/terminal.contribution.ts | 2 +- .../electron-browser/terminalConfigHelper.ts | 2 +- .../electron-browser/terminalInstance.ts | 4 ++-- .../terminalConfigHelper.test.ts | 2 +- .../electron-browser/releaseNotesEditor.ts | 2 +- .../editor/test/browser/editorService.test.ts | 2 +- .../themes/electron-browser/colorThemeData.ts | 2 +- .../electron-browser/workbenchThemeService.ts | 2 +- .../test/browser/parts/editor/baseEditor.test.ts | 2 +- .../test/common/editor/editorDiffModel.test.ts | 16 ++++++++-------- 109 files changed, 177 insertions(+), 177 deletions(-) diff --git a/extensions/typescript/src/utils/logger.ts b/extensions/typescript/src/utils/logger.ts index 7f82fb28c96dc..8e31d66d8581a 100644 --- a/extensions/typescript/src/utils/logger.ts +++ b/extensions/typescript/src/utils/logger.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { OutputChannel, window } from "vscode"; +import { OutputChannel, window } from 'vscode'; import * as is from './is'; import * as nls from 'vscode-nls'; diff --git a/extensions/typescript/src/utils/plugins.ts b/extensions/typescript/src/utils/plugins.ts index 49f0d93b4b6c0..23342cc8b3183 100644 --- a/extensions/typescript/src/utils/plugins.ts +++ b/extensions/typescript/src/utils/plugins.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { extensions } from "vscode"; +import { extensions } from 'vscode'; export interface TypeScriptServerPlugin { diff --git a/extensions/typescript/src/utils/telemetry.ts b/extensions/typescript/src/utils/telemetry.ts index 5162a0c24d5e2..b687b11b4ac60 100644 --- a/extensions/typescript/src/utils/telemetry.ts +++ b/extensions/typescript/src/utils/telemetry.ts @@ -5,7 +5,7 @@ import * as path from 'path'; import VsCodeTelemetryReporter from 'vscode-extension-telemetry'; -import { Disposable } from "vscode"; +import { Disposable } from 'vscode'; interface IPackageInfo { diff --git a/src/vs/base/browser/ui/countBadge/countBadge.ts b/src/vs/base/browser/ui/countBadge/countBadge.ts index a7fa56efce851..8ff58693925e5 100644 --- a/src/vs/base/browser/ui/countBadge/countBadge.ts +++ b/src/vs/base/browser/ui/countBadge/countBadge.ts @@ -8,8 +8,8 @@ import 'vs/css!./countBadge'; import { $, append } from 'vs/base/browser/dom'; import { format } from 'vs/base/common/strings'; -import { Color } from "vs/base/common/color"; -import { mixin } from "vs/base/common/objects"; +import { Color } from 'vs/base/common/color'; +import { mixin } from 'vs/base/common/objects'; export interface ICountBadgeOptions extends ICountBadgetyles { count?: number; diff --git a/src/vs/base/browser/ui/progressbar/progressbar.ts b/src/vs/base/browser/ui/progressbar/progressbar.ts index 1287112824b2e..ea34e06e1cbb9 100644 --- a/src/vs/base/browser/ui/progressbar/progressbar.ts +++ b/src/vs/base/browser/ui/progressbar/progressbar.ts @@ -11,8 +11,8 @@ import assert = require('vs/base/common/assert'); import { Builder, $ } from 'vs/base/browser/builder'; import DOM = require('vs/base/browser/dom'); import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { Color } from "vs/base/common/color"; -import { mixin } from "vs/base/common/objects"; +import { Color } from 'vs/base/common/color'; +import { mixin } from 'vs/base/common/objects'; const css_done = 'done'; const css_active = 'active'; diff --git a/src/vs/base/test/common/json.test.ts b/src/vs/base/test/common/json.test.ts index 42a0804c113ae..fe129f08808eb 100644 --- a/src/vs/base/test/common/json.test.ts +++ b/src/vs/base/test/common/json.test.ts @@ -8,7 +8,7 @@ import * as assert from 'assert'; import { SyntaxKind, createScanner, parse, getLocation, Node, ParseError, parseTree, ParseErrorCode, ParseOptions, Segment, findNodeAtLocation, getNodeValue, ScanError } from 'vs/base/common/json'; -import { getParseErrorMessage } from "vs/base/common/jsonErrorMessages"; +import { getParseErrorMessage } from 'vs/base/common/jsonErrorMessages'; function assertKinds(text: string, ...kinds: SyntaxKind[]): void { var scanner = createScanner(text); diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 4b1840c8642dc..91d560b50fdf8 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -22,7 +22,7 @@ import product from 'vs/platform/node/product'; import { getCommonHTTPHeaders } from 'vs/platform/environment/node/http'; import { IWindowSettings, MenuBarVisibility } from 'vs/platform/windows/common/windows'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { KeyboardLayoutMonitor } from "vs/code/node/keyboard"; +import { KeyboardLayoutMonitor } from 'vs/code/node/keyboard'; export interface IWindowState { width?: number; diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index b4324486c62b6..cc0800f25e6cd 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -31,7 +31,7 @@ import product from 'vs/platform/node/product'; import { OpenContext } from 'vs/code/common/windows'; import { ITelemetryService, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; import { isParent, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; -import { KeyboardLayoutMonitor } from "vs/code/node/keyboard"; +import { KeyboardLayoutMonitor } from 'vs/code/node/keyboard'; enum WindowError { UNRESPONSIVE, diff --git a/src/vs/code/node/keyboard.ts b/src/vs/code/node/keyboard.ts index d2f968371ef68..16979fc90c0a8 100644 --- a/src/vs/code/node/keyboard.ts +++ b/src/vs/code/node/keyboard.ts @@ -7,8 +7,8 @@ import * as nativeKeymap from 'native-keymap'; import { IDisposable } from 'vs/base/common/lifecycle'; -import { isMacintosh } from "vs/base/common/platform"; -import { Emitter } from "vs/base/common/event"; +import { isMacintosh } from 'vs/base/common/platform'; +import { Emitter } from 'vs/base/common/event'; export class KeyboardLayoutMonitor { diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index f9ae737307ecb..e927fcb4ab1a7 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -18,12 +18,12 @@ import { HorizontalRange, RenderingContext, RestrictedRenderingContext } from 'v import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; import { ViewController } from 'vs/editor/browser/view/viewController'; -import { EndOfLinePreference } from "vs/editor/common/editorCommon"; -import { IKeyboardEvent } from "vs/base/browser/keyboardEvent"; -import { PartFingerprints, PartFingerprint, ViewPart } from "vs/editor/browser/view/viewPart"; -import { Margin } from "vs/editor/browser/viewParts/margin/margin"; -import { LineNumbersOverlay } from "vs/editor/browser/viewParts/lineNumbers/lineNumbers"; -import { BareFontInfo } from "vs/editor/common/config/fontInfo"; +import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; +import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { PartFingerprints, PartFingerprint, ViewPart } from 'vs/editor/browser/view/viewPart'; +import { Margin } from 'vs/editor/browser/viewParts/margin/margin'; +import { LineNumbersOverlay } from 'vs/editor/browser/viewParts/lineNumbers/lineNumbers'; +import { BareFontInfo } from 'vs/editor/common/config/fontInfo'; export interface ITextAreaHandlerHelper { visibleRangeForPositionRelativeToEditor(lineNumber: number, column: number): HorizontalRange; diff --git a/src/vs/editor/browser/controller/textAreaInput.ts b/src/vs/editor/browser/controller/textAreaInput.ts index 757bbf1dd4149..e1f99b036e89e 100644 --- a/src/vs/editor/browser/controller/textAreaInput.ts +++ b/src/vs/editor/browser/controller/textAreaInput.ts @@ -13,8 +13,8 @@ import { ITypeData, TextAreaState, ITextAreaWrapper } from 'vs/editor/browser/co import * as browser from 'vs/base/browser/browser'; import * as platform from 'vs/base/common/platform'; import * as dom from 'vs/base/browser/dom'; -import { IKeyboardEvent } from "vs/base/browser/keyboardEvent"; -import { FastDomNode } from "vs/base/browser/fastDomNode"; +import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { FastDomNode } from 'vs/base/browser/fastDomNode'; export interface ICompositionData { data: string; diff --git a/src/vs/editor/browser/view/viewController.ts b/src/vs/editor/browser/view/viewController.ts index e05ca74ea605c..51beeeade2787 100644 --- a/src/vs/editor/browser/view/viewController.ts +++ b/src/vs/editor/browser/view/viewController.ts @@ -12,7 +12,7 @@ import { ICommandService } from 'vs/platform/commands/common/commands'; import { IViewModel } from 'vs/editor/common/viewModel/viewModel'; import { ViewOutgoingEvents } from 'vs/editor/browser/view/viewOutgoingEvents'; import { CoreNavigationCommands, CoreEditorCommand } from 'vs/editor/common/controller/coreCommands'; -import { Configuration } from "vs/editor/browser/config/configuration"; +import { Configuration } from 'vs/editor/browser/config/configuration'; export interface ExecCoreEditorCommandFunc { (editorCommand: CoreEditorCommand, args: any): void; diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index 927c1d1948684..2ac56ac277325 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -48,7 +48,7 @@ import { EditorScrollbar } from 'vs/editor/browser/viewParts/editorScrollbar/edi import { Minimap } from 'vs/editor/browser/viewParts/minimap/minimap'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { IThemeService, getThemeTypeSelector } from 'vs/platform/theme/common/themeService'; -import { Cursor } from "vs/editor/common/controller/cursor"; +import { Cursor } from 'vs/editor/common/controller/cursor'; export interface IContentWidgetData { widget: editorBrowser.IContentWidget; diff --git a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts index 11d5326512873..89aee09559d19 100644 --- a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts +++ b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts @@ -13,7 +13,7 @@ import { ViewContext } from 'vs/editor/common/view/viewContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; -import { getThemeTypeSelector } from "vs/platform/theme/common/themeService"; +import { getThemeTypeSelector } from 'vs/platform/theme/common/themeService'; export class EditorScrollbar extends ViewPart { diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index 9c922137edeba..46d8dde55d56e 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -25,8 +25,8 @@ import { RGBA } from 'vs/base/common/color'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { GlobalMouseMoveMonitor, IStandardMouseMoveEventData, standardMouseMoveMerger } from 'vs/base/browser/globalMouseMoveMonitor'; import * as platform from 'vs/base/common/platform'; -import { registerThemingParticipant } from "vs/platform/theme/common/themeService"; -import { scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground, scrollbarShadow } from "vs/platform/theme/common/colorRegistry"; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground, scrollbarShadow } from 'vs/platform/theme/common/colorRegistry'; const enum RenderMinimap { None = 0, diff --git a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts index 92134f722a11f..e4086a1e00a59 100644 --- a/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts +++ b/src/vs/editor/browser/viewParts/scrollDecoration/scrollDecoration.ts @@ -11,8 +11,8 @@ import { ViewPart } from 'vs/editor/browser/view/viewPart'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { registerThemingParticipant } from "vs/platform/theme/common/themeService"; -import { scrollbarShadow } from "vs/platform/theme/common/colorRegistry"; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { scrollbarShadow } from 'vs/platform/theme/common/colorRegistry'; export class ScrollDecorationViewPart extends ViewPart { diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index c655b958451ed..556c843ce1513 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -36,7 +36,7 @@ import { scrollbarShadow, diffInserted, diffRemoved, defaultInsertColor, default import { Color } from 'vs/base/common/color'; import { OverviewRulerZone } from 'vs/editor/common/view/overviewZoneManager'; import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; interface IEditorDiffDecorations { decorations: editorCommon.IModelDeltaDecoration[]; diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index d8b808d3f0661..c5285a837245b 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -28,8 +28,8 @@ import { import * as editorOptions from 'vs/editor/common/config/editorOptions'; import { ICursorPositionChangedEvent, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; -import { CommonEditorRegistry } from "vs/editor/common/editorCommonExtensions"; -import { VerticalRevealType } from "vs/editor/common/view/viewEvents"; +import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; +import { VerticalRevealType } from 'vs/editor/common/view/viewEvents'; let EDITOR_ID = 0; diff --git a/src/vs/editor/common/config/fontInfo.ts b/src/vs/editor/common/config/fontInfo.ts index 7740776bebfb2..9ab9a11d2a99a 100644 --- a/src/vs/editor/common/config/fontInfo.ts +++ b/src/vs/editor/common/config/fontInfo.ts @@ -6,7 +6,7 @@ import * as platform from 'vs/base/common/platform'; import { EditorZoom } from 'vs/editor/common/config/editorZoom'; -import { EDITOR_FONT_DEFAULTS } from "vs/editor/common/config/editorOptions"; +import { EDITOR_FONT_DEFAULTS } from 'vs/editor/common/config/editorOptions'; /** * Determined from empirical observations. diff --git a/src/vs/editor/common/controller/accGenerator.ts b/src/vs/editor/common/controller/accGenerator.ts index 6f6bb813e6b2f..ca556f79d2d21 100644 --- a/src/vs/editor/common/controller/accGenerator.ts +++ b/src/vs/editor/common/controller/accGenerator.ts @@ -8,7 +8,7 @@ import { Position } from 'vs/editor/common/core/position'; import * as nls from 'vs/nls'; import { Range } from 'vs/editor/common/core/range'; -import { IModel } from "vs/editor/common/editorCommon"; +import { IModel } from 'vs/editor/common/editorCommon'; import { Selection } from 'vs/editor/common/core/selection'; export class ScreenReaderMessageGenerator { diff --git a/src/vs/editor/common/controller/coreCommands.ts b/src/vs/editor/common/controller/coreCommands.ts index 639022470cd8e..e0a3cd88f63b1 100644 --- a/src/vs/editor/common/controller/coreCommands.ts +++ b/src/vs/editor/common/controller/coreCommands.ts @@ -23,9 +23,9 @@ import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import * as types from 'vs/base/common/types'; import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; import { IEditorService } from 'vs/platform/editor/common/editor'; -import { TypeOperations } from "vs/editor/common/controller/cursorTypeOperations"; -import { DeleteOperations } from "vs/editor/common/controller/cursorDeleteOperations"; -import { VerticalRevealType } from "vs/editor/common/view/viewEvents"; +import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; +import { DeleteOperations } from 'vs/editor/common/controller/cursorDeleteOperations'; +import { VerticalRevealType } from 'vs/editor/common/view/viewEvents'; const CORE_WEIGHT = KeybindingsRegistry.WEIGHT.editorCore(); diff --git a/src/vs/editor/common/controller/cursor.ts b/src/vs/editor/common/controller/cursor.ts index 305894d79b67a..0c203347ccef0 100644 --- a/src/vs/editor/common/controller/cursor.ts +++ b/src/vs/editor/common/controller/cursor.ts @@ -18,7 +18,7 @@ import { DeleteOperations } from 'vs/editor/common/controller/cursorDeleteOperat import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; import { TextModelEventType, ModelRawContentChangedEvent, RawContentChangedType } from 'vs/editor/common/model/textModelEvents'; import { CursorChangeReason } from 'vs/editor/common/controller/cursorEvents'; -import { IViewModel } from "vs/editor/common/viewModel/viewModel"; +import { IViewModel } from 'vs/editor/common/viewModel/viewModel'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import Event, { Emitter } from 'vs/base/common/event'; // import { ScreenReaderMessageGenerator } from "vs/editor/common/controller/accGenerator"; diff --git a/src/vs/editor/common/controller/cursorCommon.ts b/src/vs/editor/common/controller/cursorCommon.ts index e82708d17da1a..55e00ad1e4340 100644 --- a/src/vs/editor/common/controller/cursorCommon.ts +++ b/src/vs/editor/common/controller/cursorCommon.ts @@ -18,7 +18,7 @@ import { IAutoClosingPair } from 'vs/editor/common/modes/languageConfiguration'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; import { IViewModel } from 'vs/editor/common/viewModel/viewModel'; import { CursorChangeReason } from 'vs/editor/common/controller/cursorEvents'; -import { VerticalRevealType } from "vs/editor/common/view/viewEvents"; +import { VerticalRevealType } from 'vs/editor/common/view/viewEvents'; export interface IColumnSelectData { toViewLineNumber: number; diff --git a/src/vs/editor/common/controller/cursorDeleteOperations.ts b/src/vs/editor/common/controller/cursorDeleteOperations.ts index c968bb49f76c6..7951ab91b83e9 100644 --- a/src/vs/editor/common/controller/cursorDeleteOperations.ts +++ b/src/vs/editor/common/controller/cursorDeleteOperations.ts @@ -10,7 +10,7 @@ import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { MoveOperations } from 'vs/editor/common/controller/cursorMoveOperations'; import * as strings from 'vs/base/common/strings'; -import { ICommand } from "vs/editor/common/editorCommon"; +import { ICommand } from 'vs/editor/common/editorCommon'; export class DeleteOperations { diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index cb2b2184669c9..6abac0a543e8a 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -16,7 +16,7 @@ import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageCo import { IndentAction } from 'vs/editor/common/modes/languageConfiguration'; import { SurroundSelectionCommand } from 'vs/editor/common/commands/surroundSelectionCommand'; import { IElectricAction } from 'vs/editor/common/modes/supports/electricCharacter'; -import { getMapForWordSeparators, WordCharacterClass } from "vs/editor/common/controller/wordCharacterClassifier"; +import { getMapForWordSeparators, WordCharacterClass } from 'vs/editor/common/controller/wordCharacterClassifier'; export class TypeOperations { diff --git a/src/vs/editor/common/controller/cursorWordOperations.ts b/src/vs/editor/common/controller/cursorWordOperations.ts index 305cfe68392b0..3666961a2a283 100644 --- a/src/vs/editor/common/controller/cursorWordOperations.ts +++ b/src/vs/editor/common/controller/cursorWordOperations.ts @@ -6,7 +6,7 @@ import { SingleCursorState, CursorConfiguration, ICursorSimpleModel } from 'vs/editor/common/controller/cursorCommon'; import { Position } from 'vs/editor/common/core/position'; -import { WordCharacterClassifier, WordCharacterClass, getMapForWordSeparators } from "vs/editor/common/controller/wordCharacterClassifier"; +import { WordCharacterClassifier, WordCharacterClass, getMapForWordSeparators } from 'vs/editor/common/controller/wordCharacterClassifier'; import * as strings from 'vs/base/common/strings'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; diff --git a/src/vs/editor/common/model/textModel.ts b/src/vs/editor/common/model/textModel.ts index 0d7ec1065b463..d15842430f3b6 100644 --- a/src/vs/editor/common/model/textModel.ts +++ b/src/vs/editor/common/model/textModel.ts @@ -11,7 +11,7 @@ import { Range, IRange } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { ModelLine } from 'vs/editor/common/model/modelLine'; import { guessIndentation } from 'vs/editor/common/model/indentationGuesser'; -import { EDITOR_MODEL_DEFAULTS } from "vs/editor/common/config/editorOptions"; +import { EDITOR_MODEL_DEFAULTS } from 'vs/editor/common/config/editorOptions'; import { PrefixSumComputer } from 'vs/editor/common/viewModel/prefixSumComputer'; import { IndentRange, computeRanges } from 'vs/editor/common/model/indentRanges'; import { TextModelSearch, SearchParams } from 'vs/editor/common/model/textModelSearch'; diff --git a/src/vs/editor/common/model/textModelSearch.ts b/src/vs/editor/common/model/textModelSearch.ts index d19ad9e608ca4..af26593577653 100644 --- a/src/vs/editor/common/model/textModelSearch.ts +++ b/src/vs/editor/common/model/textModelSearch.ts @@ -10,7 +10,7 @@ import { Range } from 'vs/editor/common/core/range'; import { FindMatch, EndOfLinePreference } from 'vs/editor/common/editorCommon'; import { CharCode } from 'vs/base/common/charCode'; import { TextModel } from 'vs/editor/common/model/textModel'; -import { getMapForWordSeparators, WordCharacterClassifier, WordCharacterClass } from "vs/editor/common/controller/wordCharacterClassifier"; +import { getMapForWordSeparators, WordCharacterClassifier, WordCharacterClass } from 'vs/editor/common/controller/wordCharacterClassifier'; const LIMIT_FIND_COUNT = 999; diff --git a/src/vs/editor/common/services/modelServiceImpl.ts b/src/vs/editor/common/services/modelServiceImpl.ts index 5fee6ded32a33..5bcb68eba4bab 100644 --- a/src/vs/editor/common/services/modelServiceImpl.ts +++ b/src/vs/editor/common/services/modelServiceImpl.ts @@ -21,7 +21,7 @@ import { IMode, LanguageIdentifier } from 'vs/editor/common/modes'; import { IModelService } from 'vs/editor/common/services/modelService'; import * as platform from 'vs/base/common/platform'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { EDITOR_MODEL_DEFAULTS } from "vs/editor/common/config/editorOptions"; +import { EDITOR_MODEL_DEFAULTS } from 'vs/editor/common/config/editorOptions'; import { PLAINTEXT_LANGUAGE_IDENTIFIER } from 'vs/editor/common/modes/modesRegistry'; import { IRawTextSource, TextSource, RawTextSource } from 'vs/editor/common/model/textSource'; import * as textModelEvents from 'vs/editor/common/model/textModelEvents'; diff --git a/src/vs/editor/common/standalone/themes.ts b/src/vs/editor/common/standalone/themes.ts index a97a9fab1eede..8093472bba856 100644 --- a/src/vs/editor/common/standalone/themes.ts +++ b/src/vs/editor/common/standalone/themes.ts @@ -6,8 +6,8 @@ 'use strict'; import { IStandaloneThemeData } from 'vs/editor/common/services/standaloneThemeService'; -import { editorBackground, editorForeground, editorSelectionHighlight, editorInactiveSelection } from "vs/platform/theme/common/colorRegistry"; -import { editorIndentGuides } from "vs/editor/common/view/editorColorRegistry"; +import { editorBackground, editorForeground, editorSelectionHighlight, editorInactiveSelection } from 'vs/platform/theme/common/colorRegistry'; +import { editorIndentGuides } from 'vs/editor/common/view/editorColorRegistry'; /* -------------------------------- Begin vs theme -------------------------------- */ export const vs: IStandaloneThemeData = { diff --git a/src/vs/editor/common/view/viewEvents.ts b/src/vs/editor/common/view/viewEvents.ts index f6696746fbf18..72fc6b41fbe18 100644 --- a/src/vs/editor/common/view/viewEvents.ts +++ b/src/vs/editor/common/view/viewEvents.ts @@ -9,7 +9,7 @@ import { Selection } from 'vs/editor/common/core/selection'; import { ScrollEvent } from 'vs/base/common/scrollable'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; import * as errors from 'vs/base/common/errors'; -import { IDisposable, Disposable } from "vs/base/common/lifecycle"; +import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; export const enum ViewEventType { ViewConfigurationChanged = 1, diff --git a/src/vs/editor/common/viewLayout/viewLayout.ts b/src/vs/editor/common/viewLayout/viewLayout.ts index e6a9d763d2985..4af8cbd523567 100644 --- a/src/vs/editor/common/viewLayout/viewLayout.ts +++ b/src/vs/editor/common/viewLayout/viewLayout.ts @@ -12,7 +12,7 @@ import { IViewLayout, IViewWhitespaceViewportData, Viewport } from 'vs/editor/co import { IPartialViewLinesViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData'; import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; import Event from 'vs/base/common/event'; -import { IConfigurationChangedEvent } from "vs/editor/common/config/editorOptions"; +import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; export class ViewLayout extends Disposable implements IViewLayout { diff --git a/src/vs/editor/common/viewModel/splitLinesCollection.ts b/src/vs/editor/common/viewModel/splitLinesCollection.ts index 72caeb160e822..7c40b262f096d 100644 --- a/src/vs/editor/common/viewModel/splitLinesCollection.ts +++ b/src/vs/editor/common/viewModel/splitLinesCollection.ts @@ -12,7 +12,7 @@ import { PrefixSumComputerWithCache } from 'vs/editor/common/viewModel/prefixSum import { ViewLineData } from 'vs/editor/common/viewModel/viewModel'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { WrappingIndent } from 'vs/editor/common/config/editorOptions'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export class OutputPosition { _outputPositionBrand: void; diff --git a/src/vs/editor/common/viewModel/viewModel.ts b/src/vs/editor/common/viewModel/viewModel.ts index ffb43fadd6aa2..6372d3a14158c 100644 --- a/src/vs/editor/common/viewModel/viewModel.ts +++ b/src/vs/editor/common/viewModel/viewModel.ts @@ -11,9 +11,9 @@ import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { ViewEvent, IViewEventListener } from 'vs/editor/common/view/viewEvents'; import { IDisposable } from 'vs/base/common/lifecycle'; -import { Scrollable } from "vs/base/common/scrollable"; -import { IPartialViewLinesViewportData } from "vs/editor/common/viewLayout/viewLinesViewportData"; -import { IEditorWhitespace } from "vs/editor/common/viewLayout/whitespaceComputer"; +import { Scrollable } from 'vs/base/common/scrollable'; +import { IPartialViewLinesViewportData } from 'vs/editor/common/viewLayout/viewLinesViewportData'; +import { IEditorWhitespace } from 'vs/editor/common/viewLayout/whitespaceComputer'; export interface IViewWhitespaceViewportData { readonly id: number; diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index be7b24bb8280a..a7a7297e8810a 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -19,7 +19,7 @@ import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { MinimapTokensColorTracker } from 'vs/editor/common/view/minimapCharRenderer'; import * as textModelEvents from 'vs/editor/common/model/textModelEvents'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; -import { CharacterHardWrappingLineMapperFactory } from "vs/editor/common/viewModel/characterHardWrappingLineMapper"; +import { CharacterHardWrappingLineMapperFactory } from 'vs/editor/common/viewModel/characterHardWrappingLineMapper'; import { ViewLayout } from 'vs/editor/common/viewLayout/viewLayout'; export class CoordinatesConverter implements ICoordinatesConverter { diff --git a/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts b/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts index a3443fa79fd79..7b79df152e732 100644 --- a/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts +++ b/src/vs/editor/contrib/bracketMatching/common/bracketMatching.ts @@ -14,9 +14,9 @@ import { RunOnceScheduler } from 'vs/base/common/async'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { editorAction, commonEditorContribution, ServicesAccessor, EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; -import { registerThemingParticipant } from "vs/platform/theme/common/themeService"; -import { editorBracketMatchBackground, editorBracketMatchBorder } from "vs/editor/common/view/editorColorRegistry"; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorBracketMatchBackground, editorBracketMatchBorder } from 'vs/editor/common/view/editorColorRegistry'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; @editorAction class SelectBracketAction extends EditorAction { diff --git a/src/vs/editor/contrib/codelens/browser/codelens.ts b/src/vs/editor/contrib/codelens/browser/codelens.ts index 84fcda05eb1d3..2c7e6ff341cdf 100644 --- a/src/vs/editor/contrib/codelens/browser/codelens.ts +++ b/src/vs/editor/contrib/codelens/browser/codelens.ts @@ -22,10 +22,10 @@ import * as editorBrowser from 'vs/editor/browser/editorBrowser'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { ICodeLensData, getCodeLensData } from '../common/codelens'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; -import { editorCodeLensForeground } from "vs/editor/common/view/editorColorRegistry"; -import { registerThemingParticipant } from "vs/platform/theme/common/themeService"; -import { editorActiveLinkForeground } from "vs/platform/theme/common/colorRegistry"; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { editorCodeLensForeground } from 'vs/editor/common/view/editorColorRegistry'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; class CodeLensViewZone implements editorBrowser.IViewZone { diff --git a/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts b/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts index 1326d8bda3392..64d900f1dd7fb 100644 --- a/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts +++ b/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts @@ -12,9 +12,9 @@ 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'; import { TokenizationResult2 } from 'vs/editor/common/core/token'; -import { MockMode } from "vs/editor/test/common/mocks/mockMode"; -import { CommentRule } from "vs/editor/common/modes/languageConfiguration"; -import { LanguageConfigurationRegistry } from "vs/editor/common/modes/languageConfigurationRegistry"; +import { MockMode } from 'vs/editor/test/common/mocks/mockMode'; +import { CommentRule } from 'vs/editor/common/modes/languageConfiguration'; +import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; suite('Editor Contrib - Line Comment Command', () => { diff --git a/src/vs/editor/contrib/dnd/browser/dnd.ts b/src/vs/editor/contrib/dnd/browser/dnd.ts index e305c8af11a96..7628350f4e2af 100644 --- a/src/vs/editor/contrib/dnd/browser/dnd.ts +++ b/src/vs/editor/contrib/dnd/browser/dnd.ts @@ -17,7 +17,7 @@ import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { DragAndDropCommand } from '../common/dragAndDropCommand'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; @editorContribution export class DragAndDropController implements editorCommon.IEditorContribution { diff --git a/src/vs/editor/contrib/find/common/findController.ts b/src/vs/editor/contrib/find/common/findController.ts index e0657d80c734a..4536b2b5b6fbb 100644 --- a/src/vs/editor/contrib/find/common/findController.ts +++ b/src/vs/editor/contrib/find/common/findController.ts @@ -21,7 +21,7 @@ import { RunOnceScheduler, Delayer } from 'vs/base/common/async'; import { CursorChangeReason, ICursorSelectionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export const enum FindStartFocusAction { NoFocusChange, diff --git a/src/vs/editor/contrib/find/common/findDecorations.ts b/src/vs/editor/contrib/find/common/findDecorations.ts index 2a80081cf0aa9..4cf3d63128420 100644 --- a/src/vs/editor/contrib/find/common/findDecorations.ts +++ b/src/vs/editor/contrib/find/common/findDecorations.ts @@ -8,7 +8,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export class FindDecorations implements IDisposable { diff --git a/src/vs/editor/contrib/folding/common/foldingModel.ts b/src/vs/editor/contrib/folding/common/foldingModel.ts index 128f450b0873c..8ebd2424cc7f2 100644 --- a/src/vs/editor/contrib/folding/common/foldingModel.ts +++ b/src/vs/editor/contrib/folding/common/foldingModel.ts @@ -5,7 +5,7 @@ import * as editorCommon from 'vs/editor/common/editorCommon'; import { Range } from 'vs/editor/common/core/range'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export interface IFoldingRange { startLineNumber: number; diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts index a29f1511b44ca..124e4229c3dfb 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts @@ -24,7 +24,7 @@ import { registerThemingParticipant } from 'vs/platform/theme/common/themeServic import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { EditorState, CodeEditorStateFlag } from 'vs/editor/common/core/editorState'; import { DefinitionAction, DefinitionActionConfig } from './goToDeclarationCommands'; -import { ClickLinkGesture, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; +import { ClickLinkGesture, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from 'vs/editor/contrib/goToDeclaration/browser/clickLinkGesture'; @editorContribution class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorContribution { diff --git a/src/vs/editor/contrib/hover/browser/modesContentHover.ts b/src/vs/editor/contrib/hover/browser/modesContentHover.ts index 636180c1a66d5..0814b278789ca 100644 --- a/src/vs/editor/contrib/hover/browser/modesContentHover.ts +++ b/src/vs/editor/contrib/hover/browser/modesContentHover.ts @@ -22,7 +22,7 @@ import { getHover } from '../common/hover'; import { HoverOperation, IHoverComputer } from './hoverOperation'; import { ContentHoverWidget } from './hoverWidgets'; import { textToMarkedString, MarkedString } from 'vs/base/common/htmlContent'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; class ModesContentComputer implements IHoverComputer { diff --git a/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts b/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts index 874af70feda74..030eff62c2574 100644 --- a/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts +++ b/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.ts @@ -18,7 +18,7 @@ import { InPlaceReplaceCommand } from './inPlaceReplaceCommand'; import { EditorState, CodeEditorStateFlag } from 'vs/editor/common/core/editorState'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorBracketMatchBorder } from 'vs/editor/common/view/editorColorRegistry'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; @commonEditorContribution class InPlaceReplaceController implements IEditorContribution { diff --git a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts index 4bc4b88d0fa66..a41829a885b17 100644 --- a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts +++ b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts @@ -19,7 +19,7 @@ import { CopyLinesCommand } from './copyLinesCommand'; import { DeleteLinesCommand } from './deleteLinesCommand'; import { MoveLinesCommand } from './moveLinesCommand'; import { TypeOperations } from 'vs/editor/common/controller/cursorTypeOperations'; -import { CoreEditingCommands } from "vs/editor/common/controller/coreCommands"; +import { CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; // copy lines diff --git a/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts b/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts index 4a56e203f656a..64c67e2cb9ae3 100644 --- a/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts +++ b/src/vs/editor/contrib/linesOperations/test/common/linesOperations.test.ts @@ -10,9 +10,9 @@ import { Position } from 'vs/editor/common/core/position'; import { Handler, IModel, DefaultEndOfLine } from 'vs/editor/common/editorCommon'; import { withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; import { DeleteAllLeftAction, JoinLinesAction, TransposeAction, UpperCaseAction, LowerCaseAction, DeleteAllRightAction, InsertLineBeforeAction, InsertLineAfterAction, IndentLinesAction } from 'vs/editor/contrib/linesOperations/common/linesOperations'; -import { Cursor } from "vs/editor/common/controller/cursor"; -import { Model } from "vs/editor/common/model/model"; -import { CoreEditingCommands } from "vs/editor/common/controller/coreCommands"; +import { Cursor } from 'vs/editor/common/controller/cursor'; +import { Model } from 'vs/editor/common/model/model'; +import { CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; suite('Editor Contrib - Line Operations', () => { suite('DeleteAllLeftAction', () => { diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index 356f9bf6843b2..d25c7a9a3ad26 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -24,8 +24,8 @@ import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { Position } from 'vs/editor/common/core/position'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; -import { ClickLinkGesture, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from "vs/editor/contrib/goToDeclaration/browser/clickLinkGesture"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; +import { ClickLinkGesture, ClickLinkMouseEvent, ClickLinkKeyboardEvent } from 'vs/editor/contrib/goToDeclaration/browser/clickLinkGesture'; const HOVER_MESSAGE_GENERAL_META = ( platform.isMacintosh diff --git a/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts b/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts index 3b088852ed418..6117ad98768d4 100644 --- a/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts +++ b/src/vs/editor/contrib/quickOpen/browser/editorQuickOpen.ts @@ -14,7 +14,7 @@ import { Selection } from 'vs/editor/common/core/selection'; import { IActionOptions, EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Range } from 'vs/editor/common/core/range'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export interface IQuickOpenControllerOpts { inputAriaLabel: string; diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index a7175ad5a1f2c..959c2bc89399f 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -43,8 +43,8 @@ import { registerThemingParticipant, ITheme, IThemeService } from 'vs/platform/t import { attachListStyler, attachBadgeStyler } from 'vs/platform/theme/common/styler'; import { IModelDecorationsChangedEvent } from 'vs/editor/common/model/textModelEvents'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; -import { IEnvironmentService } from "vs/platform/environment/common/environment"; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; class DecorationsManager implements IDisposable { diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index b5938e3c7e49a..2a38815488c4a 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -16,7 +16,7 @@ import { IPosition } from 'vs/editor/common/core/position'; import { groupBy } from 'vs/base/common/arrays'; import { dispose } from 'vs/base/common/lifecycle'; import { EditorSnippetVariableResolver } from "./snippetVariables"; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export class OneSnippet { diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts index 9e15e0bed55ef..1efa1b1a8c1a8 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts @@ -10,8 +10,8 @@ import { Selection } from 'vs/editor/common/core/selection'; import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { MockCodeEditor, withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; import { Cursor } from 'vs/editor/common/controller/cursor'; -import { IContextKeyService } from "vs/platform/contextkey/common/contextkey"; -import { ICommonCodeEditor } from "vs/editor/common/editorCommon"; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; class TestSnippetController extends SnippetController2 { diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts index 04a866727d3df..6c30a1793156b 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts @@ -9,7 +9,7 @@ import { Selection } from 'vs/editor/common/core/selection'; import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { mockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; -import { Model } from "vs/editor/common/model/model"; +import { Model } from 'vs/editor/common/model/model'; import { MockContextKeyService } from 'vs/platform/keybinding/test/common/mockKeybindingService'; suite('SnippetController2', function () { diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts index 5eb6c7cba9357..100b9c0dbd872 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts @@ -11,7 +11,7 @@ import { IPosition, Position } from 'vs/editor/common/core/position'; import { SnippetSession } from 'vs/editor/contrib/snippet/browser/snippetSession'; import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { mockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; -import { Model } from "vs/editor/common/model/model"; +import { Model } from 'vs/editor/common/model/model'; suite('SnippetSession', function () { diff --git a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts index b3fcd42202ad5..896e593b00577 100644 --- a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts +++ b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts @@ -18,7 +18,7 @@ import { Position } from 'vs/editor/common/core/position'; import { registerColor, editorSelectionHighlight, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { CursorChangeReason, ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export const editorWordHighlight = registerColor('editor.wordHighlightBackground', { dark: '#575757B8', light: '#57575740', hc: null }, nls.localize('wordHighlight', 'Background color of a symbol during read-access, like reading a variable.')); export const editorWordHighlightStrong = registerColor('editor.wordHighlightStrongBackground', { dark: '#004972B8', light: '#0e639c40', hc: null }, nls.localize('wordHighlightStrong', 'Background color of a symbol during write-access, like writing to a variable.')); diff --git a/src/vs/editor/contrib/wordOperations/common/wordOperations.ts b/src/vs/editor/contrib/wordOperations/common/wordOperations.ts index 469e9446eb24b..a2da8517ce54f 100644 --- a/src/vs/editor/contrib/wordOperations/common/wordOperations.ts +++ b/src/vs/editor/contrib/wordOperations/common/wordOperations.ts @@ -14,9 +14,9 @@ import { Position } from 'vs/editor/common/core/position'; import { Range } from 'vs/editor/common/core/range'; import { WordNavigationType, WordOperations } from 'vs/editor/common/controller/cursorWordOperations'; import { ReplaceCommand } from 'vs/editor/common/commands/replaceCommand'; -import { getMapForWordSeparators, WordCharacterClassifier } from "vs/editor/common/controller/wordCharacterClassifier"; -import { CursorState } from "vs/editor/common/controller/cursorCommon"; -import { CursorChangeReason } from "vs/editor/common/controller/cursorEvents"; +import { getMapForWordSeparators, WordCharacterClassifier } from 'vs/editor/common/controller/wordCharacterClassifier'; +import { CursorState } from 'vs/editor/common/controller/cursorCommon'; +import { CursorChangeReason } from 'vs/editor/common/controller/cursorEvents'; export interface MoveWordOptions extends ICommandOptions { inSelectionMode: boolean; diff --git a/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts b/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts index d67a436a400ca..40c303f0bec6a 100644 --- a/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts +++ b/src/vs/editor/contrib/wordOperations/test/common/wordOperations.test.ts @@ -17,7 +17,7 @@ import { DeleteWordLeft, DeleteWordStartLeft, DeleteWordEndLeft, DeleteWordRight, DeleteWordStartRight, DeleteWordEndRight } from 'vs/editor/contrib/wordOperations/common/wordOperations'; -import { EditorCommand } from "vs/editor/common/editorCommonExtensions"; +import { EditorCommand } from 'vs/editor/common/editorCommonExtensions'; suite('WordOperations', () => { diff --git a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts index e0de87646d883..dc599a468bfbf 100644 --- a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts +++ b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts @@ -16,7 +16,7 @@ import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, IViewZone, IViewZo import { Color, RGBA } from 'vs/base/common/color'; import { EditorLayoutInfo } from 'vs/editor/common/config/editorOptions'; import { Position, IPosition } from 'vs/editor/common/core/position'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export interface IOptions { showFrame?: boolean; diff --git a/src/vs/editor/editor.main.ts b/src/vs/editor/editor.main.ts index 8e3a8c151dd06..667a3004499c7 100644 --- a/src/vs/editor/editor.main.ts +++ b/src/vs/editor/editor.main.ts @@ -14,7 +14,7 @@ import 'vs/editor/contrib/inspectTokens/browser/inspectTokens'; import { createMonacoBaseAPI } from 'vs/editor/common/standalone/standaloneBase'; import { createMonacoEditorAPI } from 'vs/editor/browser/standalone/standaloneEditor'; import { createMonacoLanguagesAPI } from 'vs/editor/browser/standalone/standaloneLanguages'; -import { EDITOR_DEFAULTS, WrappingIndent } from "vs/editor/common/config/editorOptions"; +import { EDITOR_DEFAULTS, WrappingIndent } from 'vs/editor/common/config/editorOptions'; // Set defaults for standalone editor (EDITOR_DEFAULTS).wrappingIndent = WrappingIndent.None; diff --git a/src/vs/editor/test/browser/controller/textAreaState.test.ts b/src/vs/editor/test/browser/controller/textAreaState.test.ts index 9170690d5ec84..59552e7542e2b 100644 --- a/src/vs/editor/test/browser/controller/textAreaState.test.ts +++ b/src/vs/editor/test/browser/controller/textAreaState.test.ts @@ -9,7 +9,7 @@ import { ISimpleModel, TextAreaState, ITextAreaWrapper, PagedScreenReaderStrateg import { Range } from 'vs/editor/common/core/range'; import { EndOfLinePreference } from 'vs/editor/common/editorCommon'; import { Disposable } from 'vs/base/common/lifecycle'; -import { Model } from "vs/editor/common/model/model"; +import { Model } from 'vs/editor/common/model/model'; import { Selection } from 'vs/editor/common/core/selection'; export class MockTextAreaWrapper extends Disposable implements ITextAreaWrapper { diff --git a/src/vs/editor/test/common/commands/commandTestUtils.ts b/src/vs/editor/test/common/commands/commandTestUtils.ts index b753b8a063a5e..184f5e8d99b84 100644 --- a/src/vs/editor/test/common/commands/commandTestUtils.ts +++ b/src/vs/editor/test/common/commands/commandTestUtils.ts @@ -10,7 +10,7 @@ import { Selection } from 'vs/editor/common/core/selection'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { Model } from 'vs/editor/common/model/model'; import { LanguageIdentifier } from 'vs/editor/common/modes'; -import { withMockCodeEditor } from "vs/editor/test/common/mocks/mockCodeEditor"; +import { withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; export function testCommand( lines: string[], diff --git a/src/vs/editor/test/common/commands/sideEditing.test.ts b/src/vs/editor/test/common/commands/sideEditing.test.ts index 2fa3ea6035f98..af17bee84a254 100644 --- a/src/vs/editor/test/common/commands/sideEditing.test.ts +++ b/src/vs/editor/test/common/commands/sideEditing.test.ts @@ -11,7 +11,7 @@ import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { IIdentifiedSingleEditOperation } from 'vs/editor/common/editorCommon'; import { ILineEdit, ModelLine, LineMarker, MarkersTracker } from 'vs/editor/common/model/modelLine'; -import { withMockCodeEditor } from "vs/editor/test/common/mocks/mockCodeEditor"; +import { withMockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; const NO_TAB_SIZE = 0; diff --git a/src/vs/editor/test/common/config/commonEditorConfig.test.ts b/src/vs/editor/test/common/config/commonEditorConfig.test.ts index 6abc5412b0303..c07e1240c1f83 100644 --- a/src/vs/editor/test/common/config/commonEditorConfig.test.ts +++ b/src/vs/editor/test/common/config/commonEditorConfig.test.ts @@ -7,8 +7,8 @@ import * as assert from 'assert'; import { EditorZoom } from 'vs/editor/common/config/editorZoom'; import { TestConfiguration } from 'vs/editor/test/common/mocks/testConfiguration'; -import { IEnvConfiguration } from "vs/editor/common/config/commonEditorConfig"; -import { AccessibilitySupport } from "vs/base/common/platform"; +import { IEnvConfiguration } from 'vs/editor/common/config/commonEditorConfig'; +import { AccessibilitySupport } from 'vs/base/common/platform'; suite('Common Editor Config', () => { test('Zoom Level', () => { diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index 833bd813b4747..b3d15acc035b9 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -23,15 +23,15 @@ import { MockMode } from 'vs/editor/test/common/mocks/mockMode'; import { LanguageIdentifier } from 'vs/editor/common/modes'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { CoreNavigationCommands, CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; -import { withMockCodeEditor, MockCodeEditor } from "vs/editor/test/common/mocks/mockCodeEditor"; -import { TextModel } from "vs/editor/common/model/textModel"; -import { ViewModel } from "vs/editor/common/viewModel/viewModelImpl"; +import { withMockCodeEditor, MockCodeEditor } from 'vs/editor/test/common/mocks/mockCodeEditor'; +import { TextModel } from 'vs/editor/common/model/textModel'; +import { ViewModel } from 'vs/editor/common/viewModel/viewModelImpl'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; -import { ScreenReaderMessageGenerator } from "vs/editor/common/controller/accGenerator"; +import { ScreenReaderMessageGenerator } from 'vs/editor/common/controller/accGenerator'; import { CursorWordLeft, CursorWordLeftSelect, CursorWordRight, CursorWordRightSelect } from 'vs/editor/contrib/wordOperations/common/wordOperations'; -import { EditorCommand } from "vs/editor/common/editorCommonExtensions"; +import { EditorCommand } from 'vs/editor/common/editorCommonExtensions'; let H = Handler; // --------- utils diff --git a/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts b/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts index 1b4ae6b014de4..2b9ac20069d6f 100644 --- a/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts +++ b/src/vs/editor/test/common/controller/cursorMoveCommand.test.ts @@ -13,7 +13,7 @@ import { CursorMove } from 'vs/editor/common/controller/cursorMoveCommands'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { CoreNavigationCommands } from 'vs/editor/common/controller/coreCommands'; -import { ViewModel } from "vs/editor/common/viewModel/viewModelImpl"; +import { ViewModel } from 'vs/editor/common/viewModel/viewModelImpl'; suite('Cursor move command test', () => { diff --git a/src/vs/editor/test/common/mocks/testConfiguration.ts b/src/vs/editor/test/common/mocks/testConfiguration.ts index edddfa74fddd4..a8778a6f05503 100644 --- a/src/vs/editor/test/common/mocks/testConfiguration.ts +++ b/src/vs/editor/test/common/mocks/testConfiguration.ts @@ -7,7 +7,7 @@ import { CommonEditorConfiguration, IEnvConfiguration } from 'vs/editor/common/config/commonEditorConfig'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { FontInfo, BareFontInfo } from 'vs/editor/common/config/fontInfo'; -import { AccessibilitySupport } from "vs/base/common/platform"; +import { AccessibilitySupport } from 'vs/base/common/platform'; export class TestConfiguration extends CommonEditorConfiguration { diff --git a/src/vs/editor/test/common/model/textModelSearch.test.ts b/src/vs/editor/test/common/model/textModelSearch.test.ts index 4102cfad4fef0..274ce45b934bf 100644 --- a/src/vs/editor/test/common/model/textModelSearch.test.ts +++ b/src/vs/editor/test/common/model/textModelSearch.test.ts @@ -10,8 +10,8 @@ import { FindMatch, EndOfLineSequence } from 'vs/editor/common/editorCommon'; import { Range } from 'vs/editor/common/core/range'; import { TextModel } from 'vs/editor/common/model/textModel'; import { TextModelSearch, SearchParams, SearchData } from 'vs/editor/common/model/textModelSearch'; -import { getMapForWordSeparators } from "vs/editor/common/controller/wordCharacterClassifier"; -import { USUAL_WORD_SEPARATORS } from "vs/editor/common/model/wordHelper"; +import { getMapForWordSeparators } from 'vs/editor/common/controller/wordCharacterClassifier'; +import { USUAL_WORD_SEPARATORS } from 'vs/editor/common/model/wordHelper'; // --------- Find suite('TextModelSearch', () => { diff --git a/src/vs/workbench/browser/parts/compositePart.ts b/src/vs/workbench/browser/parts/compositePart.ts index bb92039a1f00c..5c23e84ef0f0d 100644 --- a/src/vs/workbench/browser/parts/compositePart.ts +++ b/src/vs/workbench/browser/parts/compositePart.ts @@ -36,7 +36,7 @@ import { IProgressService } from 'vs/platform/progress/common/progress'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { attachProgressBarStyler } from "vs/platform/theme/common/styler"; +import { attachProgressBarStyler } from 'vs/platform/theme/common/styler'; export interface ICompositeTitleLabel { diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index 05bf24ac197bb..4bc4a3b143a7d 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -36,7 +36,7 @@ import { getCodeEditor } from 'vs/editor/common/services/codeEditorService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { editorBackground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { Themable, EDITOR_GROUP_HEADER_TABS_BACKGROUND, EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND, EDITOR_GROUP_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND, EDITOR_GROUP_BACKGROUND, EDITOR_GROUP_HEADER_TABS_BORDER } from 'vs/workbench/common/theme'; -import { attachProgressBarStyler } from "vs/platform/theme/common/styler"; +import { attachProgressBarStyler } from 'vs/platform/theme/common/styler'; export enum Rochade { NONE, diff --git a/src/vs/workbench/browser/parts/editor/webviewEditor.ts b/src/vs/workbench/browser/parts/editor/webviewEditor.ts index cf852a3d1a5b2..50f792c3e9dd9 100644 --- a/src/vs/workbench/browser/parts/editor/webviewEditor.ts +++ b/src/vs/workbench/browser/parts/editor/webviewEditor.ts @@ -5,10 +5,10 @@ 'use strict'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { BaseEditor } from "vs/workbench/browser/parts/editor/baseEditor"; -import URI from "vs/base/common/uri"; -import { IStorageService } from "vs/platform/storage/common/storage"; -import { Scope } from "vs/workbench/common/memento"; +import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; +import URI from 'vs/base/common/uri'; +import { IStorageService } from 'vs/platform/storage/common/storage'; +import { Scope } from 'vs/workbench/common/memento'; export interface HtmlPreviewEditorViewState { scrollYPercentage: number; diff --git a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts index fd2fd574fb4b4..b7909865487c7 100644 --- a/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts +++ b/src/vs/workbench/browser/parts/statusbar/statusbarPart.ts @@ -30,7 +30,7 @@ import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } import { STATUS_BAR_BACKGROUND, STATUS_BAR_FOREGROUND, STATUS_BAR_NO_FOLDER_BACKGROUND, STATUS_BAR_ITEM_HOVER_BACKGROUND, STATUS_BAR_ITEM_ACTIVE_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_BACKGROUND, STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND, STATUS_BAR_BORDER, STATUS_BAR_NO_FOLDER_FOREGROUND } from 'vs/workbench/common/theme'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { contrastBorder } from 'vs/platform/theme/common/colorRegistry'; -import { isThemeColor } from "vs/editor/common/editorCommon"; +import { isThemeColor } from 'vs/editor/common/editorCommon'; import { Color } from 'vs/base/common/color'; export class StatusbarPart extends Part implements IStatusbarService { diff --git a/src/vs/workbench/common/editor/rangeDecorations.ts b/src/vs/workbench/common/editor/rangeDecorations.ts index 7c8678ab24cc3..70a95b1427449 100644 --- a/src/vs/workbench/common/editor/rangeDecorations.ts +++ b/src/vs/workbench/common/editor/rangeDecorations.ts @@ -12,7 +12,7 @@ import { toResource } from 'vs/workbench/common/editor'; import { isEqual } from 'vs/platform/files/common/files'; import { IRange } from 'vs/editor/common/core/range'; import { CursorChangeReason, ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export interface IRangeHighlightDecoration { resource: URI; diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 86c445e811c25..5a2a8efaff789 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -7,6 +7,7 @@ import 'vs/css!./media/workbench'; +import { localize } from 'vs/nls'; import { TPromise, ValueCallback } from 'vs/base/common/winjs.base'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import Event, { Emitter, chain } from 'vs/base/common/event'; @@ -91,11 +92,10 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWindowConfiguration } from 'vs/workbench/electron-browser/common'; -import { localize } from "vs/nls"; -import { IWorkbenchActionRegistry, Extensions } from "vs/workbench/common/actionRegistry"; +import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; import { OpenRecentAction, ToggleDevToolsAction, ReloadWindowAction } from "vs/workbench/electron-browser/actions"; -import { KeyMod } from "vs/base/common/keyCodes"; -import { KeyCode } from "vs/editor/common/standalone/standaloneBase"; +import { KeyMod } from 'vs/base/common/keyCodes'; +import { KeyCode } from 'vs/editor/common/standalone/standaloneBase'; export const MessagesVisibleContext = new RawContextKey('globalMessageVisible', false); export const EditorsVisibleContext = new RawContextKey('editorIsOpen', false); diff --git a/src/vs/workbench/node/extensionPoints.ts b/src/vs/workbench/node/extensionPoints.ts index bcb6fc2206d19..c1b76d345ecf1 100644 --- a/src/vs/workbench/node/extensionPoints.ts +++ b/src/vs/workbench/node/extensionPoints.ts @@ -18,7 +18,7 @@ import Types = require('vs/base/common/types'); import { isValidExtensionDescription } from 'vs/platform/extensions/node/extensionValidator'; import * as semver from 'semver'; import { getIdAndVersionFromLocalExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; -import { getParseErrorMessage } from "vs/base/common/jsonErrorMessages"; +import { getParseErrorMessage } from 'vs/base/common/jsonErrorMessages'; const MANIFEST_FILE = 'package.json'; diff --git a/src/vs/workbench/parts/debug/browser/debugActionItems.ts b/src/vs/workbench/parts/debug/browser/debugActionItems.ts index edb07e3d969cc..50d19edfefb15 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionItems.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionItems.ts @@ -19,7 +19,7 @@ import { IDebugService } from 'vs/workbench/parts/debug/common/debug'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { attachSelectBoxStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; -import { selectBorder } from "vs/platform/theme/common/colorRegistry"; +import { selectBorder } from 'vs/platform/theme/common/colorRegistry'; const $ = dom.$; diff --git a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts index a54e0e1ff2093..70004ffb52630 100644 --- a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts +++ b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts @@ -11,9 +11,9 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { IDebugService, IExceptionInfo } from 'vs/workbench/parts/debug/common/debug'; import { RunOnceScheduler } from 'vs/base/common/async'; -import { IThemeService, ITheme } from "vs/platform/theme/common/themeService"; -import { Color } from "vs/base/common/color"; -import { registerColor } from "vs/platform/theme/common/colorRegistry"; +import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; +import { Color } from 'vs/base/common/color'; +import { registerColor } from 'vs/platform/theme/common/colorRegistry'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { LinkDetector } from 'vs/workbench/parts/debug/browser/linkDetector'; const $ = dom.$; diff --git a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts index f0e0ed7a9bdef..95e12911dcfe5 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts @@ -37,7 +37,7 @@ import { FloatingClickWidget } from 'vs/workbench/parts/preferences/browser/pref import { IListService } from 'vs/platform/list/browser/listService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Position } from 'vs/editor/common/core/position'; -import { CoreEditingCommands } from "vs/editor/common/controller/coreCommands"; +import { CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; const HOVER_DELAY = 300; const LAUNCH_JSON_REGEX = /launch\.json$/; diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index 4e5b9be2e79f5..ce54f235ae5f2 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -23,7 +23,7 @@ import { VariablesRenderer, renderExpressionValue, VariablesDataSource } from 'v import { IListService } from 'vs/platform/list/browser/listService'; import { attachListStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { editorHoverBackground, editorHoverBorder } from "vs/platform/theme/common/colorRegistry"; +import { editorHoverBackground, editorHoverBorder } from 'vs/platform/theme/common/colorRegistry'; const $ = dom.$; const MAX_ELEMENTS_SHOWN = 18; diff --git a/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.ts b/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.ts index fe69b0ad530e6..78ba083f9a041 100644 --- a/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.ts +++ b/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.ts @@ -11,7 +11,7 @@ import { IPartService, Parts } from 'vs/workbench/services/part/common/partServi import { IDebugService, State } from 'vs/workbench/parts/debug/common/debug'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { STATUS_BAR_NO_FOLDER_BACKGROUND, STATUS_BAR_NO_FOLDER_FOREGROUND, STATUS_BAR_BACKGROUND, Themable, STATUS_BAR_FOREGROUND } from 'vs/workbench/common/theme'; -import { addClass, removeClass } from "vs/base/browser/dom"; +import { addClass, removeClass } from 'vs/base/browser/dom'; // colors for theming diff --git a/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts index f1db99bf6475e..f046995c79923 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts @@ -11,7 +11,7 @@ import { BasicEmmetEditorAction } from 'vs/workbench/parts/emmet/electron-browse import { editorAction } from 'vs/editor/common/editorCommonExtensions'; import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; -import { CoreEditingCommands } from "vs/editor/common/controller/coreCommands"; +import { CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; import { KeyCode } from 'vs/base/common/keyCodes'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; diff --git a/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts b/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts index 38cb77ea2fd1f..26f7cf390e7f2 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts @@ -11,7 +11,7 @@ import { Range } from 'vs/editor/common/core/range'; import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { LanguageId, LanguageIdentifier } from 'vs/editor/common/modes'; import { Position } from 'vs/editor/common/core/position'; -import { CoreEditingCommands } from "vs/editor/common/controller/coreCommands"; +import { CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; import { SnippetParser, walk, Placeholder, Variable, Text, Marker } from 'vs/editor/contrib/snippet/browser/snippetParser'; import emmet = require('emmet'); diff --git a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts index f2cf8c9cacdbb..b922ba26c2516 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts @@ -32,9 +32,9 @@ import { IExtensionService, IExtensionDescription } from 'vs/platform/extensions import URI from 'vs/base/common/uri'; import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { registerThemingParticipant, ITheme, ICssStyleCollector } from "vs/platform/theme/common/themeService"; -import { buttonBackground, buttonForeground, buttonHoverBackground, contrastBorder, registerColor, foreground } from "vs/platform/theme/common/colorRegistry"; -import { Color } from "vs/base/common/color"; +import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; +import { buttonBackground, buttonForeground, buttonHoverBackground, contrastBorder, registerColor, foreground } from 'vs/platform/theme/common/colorRegistry'; +import { Color } from 'vs/base/common/color'; export class InstallAction extends Action { diff --git a/src/vs/workbench/parts/feedback/electron-browser/feedback.ts b/src/vs/workbench/parts/feedback/electron-browser/feedback.ts index 310eb5f0d975b..ec3746121eaaf 100644 --- a/src/vs/workbench/parts/feedback/electron-browser/feedback.ts +++ b/src/vs/workbench/parts/feedback/electron-browser/feedback.ts @@ -17,9 +17,9 @@ import * as dom from 'vs/base/browser/dom'; import { ICommandService } from 'vs/platform/commands/common/commands'; import * as errors from 'vs/base/common/errors'; import { IIntegrityService } from 'vs/platform/integrity/common/integrity'; -import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from "vs/platform/theme/common/themeService"; -import { attachStylerCallback } from "vs/platform/theme/common/styler"; -import { editorWidgetBackground, widgetShadow, inputBorder, inputForeground, inputBackground, inputActiveOptionBorder, editorBackground, buttonBackground, contrastBorder } from "vs/platform/theme/common/colorRegistry"; +import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; +import { attachStylerCallback } from 'vs/platform/theme/common/styler'; +import { editorWidgetBackground, widgetShadow, inputBorder, inputForeground, inputBackground, inputActiveOptionBorder, editorBackground, buttonBackground, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; export interface IFeedback { feedback: string; diff --git a/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts b/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts index b4763f543e6f6..b124264626e57 100644 --- a/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts +++ b/src/vs/workbench/parts/feedback/electron-browser/feedbackStatusbarItem.ts @@ -13,7 +13,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import product from 'vs/platform/node/product'; import { Themable, STATUS_BAR_FOREGROUND, STATUS_BAR_NO_FOLDER_FOREGROUND } from 'vs/workbench/common/theme'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { IWorkspaceContextService } from "vs/platform/workspace/common/workspace"; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; class TwitterFeedbackService implements IFeedbackService { diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts index 4b3e4ee277887..3af3b29705705 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts @@ -33,7 +33,7 @@ import { IListService } from 'vs/platform/list/browser/listService'; import { EditorGroup } from 'vs/workbench/common/editor/editorStacksModel'; import { attachListStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { badgeBackground, badgeForeground, contrastBorder } from "vs/platform/theme/common/colorRegistry"; +import { badgeBackground, badgeForeground, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; const $ = dom.$; diff --git a/src/vs/workbench/parts/markers/browser/markersTreeViewer.ts b/src/vs/workbench/parts/markers/browser/markersTreeViewer.ts index b0f736e5e5182..c78dfb63b6870 100644 --- a/src/vs/workbench/parts/markers/browser/markersTreeViewer.ts +++ b/src/vs/workbench/parts/markers/browser/markersTreeViewer.ts @@ -18,9 +18,9 @@ import { IMarker } from 'vs/platform/markers/common/markers'; import { MarkersModel, Resource, Marker } from 'vs/workbench/parts/markers/common/markersModel'; import Messages from 'vs/workbench/parts/markers/common/messages'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { attachBadgeStyler } from "vs/platform/theme/common/styler"; -import { IThemeService } from "vs/platform/theme/common/themeService"; -import { IDisposable } from "vs/base/common/lifecycle"; +import { attachBadgeStyler } from 'vs/platform/theme/common/styler'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { IDisposable } from 'vs/base/common/lifecycle'; interface IAnyResourceTemplateData { count: CountBadge; diff --git a/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts b/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts index 67c6fca57ae3e..65043dc756117 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingWidgets.ts @@ -23,7 +23,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition } from 'vs/editor/browser/editorBrowser'; import { attachInputBoxStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { editorWidgetBackground, widgetShadow } from "vs/platform/theme/common/colorRegistry"; +import { editorWidgetBackground, widgetShadow } from 'vs/platform/theme/common/colorRegistry'; class KeybindingInputWidget extends Widget { diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts index ca94ecd2c2bf4..16fedab362323 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts @@ -39,7 +39,7 @@ import { IChoiceService, IMessageService, Severity } from 'vs/platform/message/c import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyCode, ResolvedKeybinding } from 'vs/base/common/keyCodes'; import { attachListStyler } from 'vs/platform/theme/common/styler'; -import { listHighlightForeground } from "vs/platform/theme/common/colorRegistry"; +import { listHighlightForeground } from 'vs/platform/theme/common/colorRegistry'; let $ = DOM.$; diff --git a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts index 0aae0f5f0ff48..ca535cf3de0b0 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts @@ -53,8 +53,8 @@ import { FindController } from 'vs/editor/contrib/find/browser/find'; import { SelectionHighlighter } from 'vs/editor/contrib/find/common/findController'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; -import { attachStylerCallback } from "vs/platform/theme/common/styler"; -import { scrollbarShadow } from "vs/platform/theme/common/colorRegistry"; +import { attachStylerCallback } from 'vs/platform/theme/common/styler'; +import { scrollbarShadow } from 'vs/platform/theme/common/colorRegistry'; export class PreferencesEditorInput extends SideBySideEditorInput { public static ID: string = 'workbench.editorinputs.preferencesEditorInput'; diff --git a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts index bd29a6a03dff5..81941633f5dc7 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts @@ -32,7 +32,7 @@ import { IWorkspaceConfigurationService } from 'vs/workbench/services/configurat import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export interface IPreferencesRenderer extends IDisposable { preferencesModel: IPreferencesEditorModel; diff --git a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts index 1f802861a3167..52f1edebae3c3 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesWidgets.ts @@ -27,7 +27,7 @@ import { attachInputBoxStyler, attachStylerCallback } from 'vs/platform/theme/co import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Position } from 'vs/editor/common/core/position'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; -import { buttonBackground, buttonForeground, badgeForeground, badgeBackground, contrastBorder, errorForeground } from "vs/platform/theme/common/colorRegistry"; +import { buttonBackground, buttonForeground, badgeForeground, badgeBackground, contrastBorder, errorForeground } from 'vs/platform/theme/common/colorRegistry'; export class SettingsGroupTitleWidget extends Widget implements IViewZone { diff --git a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts index 5435cc3a6988f..260ab6e1a6431 100644 --- a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts @@ -28,7 +28,7 @@ import { IMessageService, Severity, IMessageWithAction } from 'vs/platform/messa import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; -import { editorAction, EditorAction } from "vs/editor/common/editorCommonExtensions"; +import { editorAction, EditorAction } from 'vs/editor/common/editorCommonExtensions'; export const ALL_COMMANDS_PREFIX = '>'; export const EDITOR_COMMANDS_PREFIX = '$'; diff --git a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts index eaca7cc45e5e8..8561d451305f7 100644 --- a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts @@ -22,11 +22,11 @@ import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerServ import URI from 'vs/base/common/uri'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ISCMService } from 'vs/workbench/services/scm/common/scm'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; -import { registerThemingParticipant, ITheme, ICssStyleCollector } from "vs/platform/theme/common/themeService"; -import { registerColor } from "vs/platform/theme/common/colorRegistry"; -import { localize } from "vs/nls"; -import { Color } from "vs/base/common/color"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; +import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; +import { registerColor } from 'vs/platform/theme/common/colorRegistry'; +import { localize } from 'vs/nls'; +import { Color } from 'vs/base/common/color'; class DirtyDiffModelDecorator { diff --git a/src/vs/workbench/parts/search/browser/openFileHandler.ts b/src/vs/workbench/parts/search/browser/openFileHandler.ts index 28c61bbc3d44d..1ff6554fa378d 100644 --- a/src/vs/workbench/parts/search/browser/openFileHandler.ts +++ b/src/vs/workbench/parts/search/browser/openFileHandler.ts @@ -31,7 +31,7 @@ import { IQueryOptions, ISearchService, ISearchStats, ISearchQuery } from 'vs/pl import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IRange } from 'vs/editor/common/core/range'; -import { getOutOfWorkspaceEditorResources } from "vs/workbench/parts/search/common/search"; +import { getOutOfWorkspaceEditorResources } from 'vs/workbench/parts/search/common/search'; export class FileQuickOpenModel extends QuickOpenModel { diff --git a/src/vs/workbench/parts/search/browser/searchResultsView.ts b/src/vs/workbench/parts/search/browser/searchResultsView.ts index 48452fee61fda..c9d95f8e9abae 100644 --- a/src/vs/workbench/parts/search/browser/searchResultsView.ts +++ b/src/vs/workbench/parts/search/browser/searchResultsView.ts @@ -19,8 +19,8 @@ import { Range } from 'vs/editor/common/core/range'; import { SearchViewlet } from 'vs/workbench/parts/search/browser/searchViewlet'; import { RemoveAction, ReplaceAllAction, ReplaceAction } from 'vs/workbench/parts/search/browser/searchActions'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { attachBadgeStyler } from "vs/platform/theme/common/styler"; -import { IThemeService } from "vs/platform/theme/common/themeService"; +import { attachBadgeStyler } from 'vs/platform/theme/common/styler'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; export class SearchDataSource implements IDataSource { diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index ed2a0c9f95356..04837eb7f6e6a 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -60,7 +60,7 @@ import FileResultsNavigation from 'vs/workbench/browser/fileResultsNavigation'; import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IOutputService } from 'vs/workbench/parts/output/common/output'; import { Color } from 'vs/base/common/color'; -import { getOutOfWorkspaceEditorResources } from "vs/workbench/parts/search/common/search"; +import { getOutOfWorkspaceEditorResources } from 'vs/workbench/parts/search/common/search'; export class SearchViewlet extends Viewlet { diff --git a/src/vs/workbench/parts/search/common/search.ts b/src/vs/workbench/parts/search/common/search.ts index 19cd463c84690..a6f98af6b2243 100644 --- a/src/vs/workbench/parts/search/common/search.ts +++ b/src/vs/workbench/parts/search/common/search.ts @@ -12,10 +12,10 @@ import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; import { ISearchConfiguration } from 'vs/platform/search/common/search'; import glob = require('vs/base/common/glob'); import { SymbolInformation } from 'vs/editor/common/modes'; -import { IEditorGroupService } from "vs/workbench/services/group/common/groupService"; -import { IWorkspaceContextService } from "vs/platform/workspace/common/workspace"; -import URI from "vs/base/common/uri"; -import { toResource } from "vs/workbench/common/editor"; +import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import URI from 'vs/base/common/uri'; +import { toResource } from 'vs/workbench/common/editor'; export interface IWorkspaceSymbolProvider { provideWorkspaceSymbols(search: string): TPromise; diff --git a/src/vs/workbench/parts/search/common/searchModel.ts b/src/vs/workbench/parts/search/common/searchModel.ts index 87dae50f90ede..114d6657c1a59 100644 --- a/src/vs/workbench/parts/search/common/searchModel.ts +++ b/src/vs/workbench/parts/search/common/searchModel.ts @@ -24,7 +24,7 @@ import { IModelService } from 'vs/editor/common/services/modelService'; import { IReplaceService } from 'vs/workbench/parts/search/common/replace'; import { IProgressRunner } from 'vs/platform/progress/common/progress'; import { RangeHighlightDecorations } from 'vs/workbench/common/editor/rangeDecorations'; -import { ModelDecorationOptions } from "vs/editor/common/model/textModelWithDecorations"; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; export class Match { diff --git a/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts b/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts index ae83175077bc3..dcdfe17498ab2 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts @@ -16,7 +16,7 @@ import { IModeService } from 'vs/editor/common/services/modeService'; import { languagesExtPoint } from 'vs/editor/common/services/modeServiceImpl'; import { LanguageIdentifier } from 'vs/editor/common/modes'; import { SnippetParser, Marker, Placeholder, Variable, Text, walk } from 'vs/editor/contrib/snippet/browser/snippetParser'; -import { EditorSnippetVariableResolver } from "vs/editor/contrib/snippet/browser/snippetVariables"; +import { EditorSnippetVariableResolver } from 'vs/editor/contrib/snippet/browser/snippetVariables'; interface ISnippetsExtensionPoint { language: string; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index c4e3fc0147185..17e931a643b4b 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -27,7 +27,7 @@ import { ToggleTabFocusModeAction } from 'vs/editor/contrib/toggleTabFocusMode/c import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { OpenNextRecentlyUsedEditorInGroupAction, OpenPreviousRecentlyUsedEditorInGroupAction, FocusActiveGroupAction, FocusFirstGroupAction, FocusSecondGroupAction, FocusThirdGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; -import { EDITOR_FONT_DEFAULTS } from "vs/editor/common/config/editorOptions"; +import { EDITOR_FONT_DEFAULTS } from 'vs/editor/common/config/editorOptions'; import { registerColors } from './terminalColorRegistry'; let configurationRegistry = Registry.as(Extensions.Configuration); diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts index 236474f73663a..fda8ca9b9948a 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts @@ -5,7 +5,7 @@ import * as nls from 'vs/nls'; import * as platform from 'vs/base/common/platform'; -import { EDITOR_FONT_DEFAULTS, IEditorOptions } from "vs/editor/common/config/editorOptions"; +import { EDITOR_FONT_DEFAULTS, IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; import { IChoiceService } from 'vs/platform/message/common/message'; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 8d7d30b7099f5..5247bd40e7107 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -29,8 +29,8 @@ import { TabFocus } from 'vs/editor/common/config/commonEditorConfig'; import { TerminalConfigHelper } from 'vs/workbench/parts/terminal/electron-browser/terminalConfigHelper'; import { TerminalLinkHandler } from 'vs/workbench/parts/terminal/electron-browser/terminalLinkHandler'; import { TerminalWidgetManager } from 'vs/workbench/parts/terminal/browser/terminalWidgetManager'; -import { registerThemingParticipant, ITheme, ICssStyleCollector } from "vs/platform/theme/common/themeService"; -import { scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground } from "vs/platform/theme/common/colorRegistry"; +import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; +import { scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground } from 'vs/platform/theme/common/colorRegistry'; /** The amount of time to consider terminal errors to be related to the launch */ const LAUNCHING_DURATION = 500; diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts index 285bc9025adb6..2e0b9c5831d14 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts @@ -10,7 +10,7 @@ import { IConfigurationService, getConfigurationValue } from 'vs/platform/config import { Platform } from 'vs/base/common/platform'; import { TPromise } from 'vs/base/common/winjs.base'; import { TerminalConfigHelper } from 'vs/workbench/parts/terminal/electron-browser/terminalConfigHelper'; -import { EDITOR_FONT_DEFAULTS } from "vs/editor/common/config/editorOptions"; +import { EDITOR_FONT_DEFAULTS } from 'vs/editor/common/config/editorOptions'; class MockConfigurationService implements IConfigurationService { diff --git a/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts b/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts index 466aa77c62dd5..7f9174f7ca6a1 100644 --- a/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts +++ b/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts @@ -20,7 +20,7 @@ import { IModeService } from 'vs/editor/common/services/modeService'; import { tokenizeToString } from 'vs/editor/common/modes/textToHtmlTokenizer'; import { IPartService, Parts } from 'vs/workbench/services/part/common/partService'; import { WebviewEditor } from 'vs/workbench/browser/parts/editor/webviewEditor'; -import { IStorageService } from "vs/platform/storage/common/storage"; +import { IStorageService } from 'vs/platform/storage/common/storage'; function renderBody(body: string): string { return ` diff --git a/src/vs/workbench/services/editor/test/browser/editorService.test.ts b/src/vs/workbench/services/editor/test/browser/editorService.test.ts index e1f4057853ffc..4dd5a44fe16df 100644 --- a/src/vs/workbench/services/editor/test/browser/editorService.test.ts +++ b/src/vs/workbench/services/editor/test/browser/editorService.test.ts @@ -16,7 +16,7 @@ import { FileEditorInput } from 'vs/workbench/parts/files/common/editors/fileEdi import { workbenchInstantiationService, TestThemeService } from 'vs/workbench/test/workbenchTestServices'; import { DelegatingWorkbenchEditorService, WorkbenchEditorService, IEditorPart } from 'vs/workbench/services/editor/browser/editorService'; import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput'; -import { ResourceEditorInput } from "vs/workbench/common/editor/resourceEditorInput"; +import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; let activeEditor: BaseEditor = { getSelection: function () { diff --git a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts index aa101644f89b6..f182c1494c867 100644 --- a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts +++ b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts @@ -20,7 +20,7 @@ import { Extensions, IColorRegistry, ColorIdentifier, editorBackground, editorFo import { ThemeType } from 'vs/platform/theme/common/themeService'; import { Registry } from 'vs/platform/platform'; import { WorkbenchThemeService, IColorCustomizations } from "vs/workbench/services/themes/electron-browser/workbenchThemeService"; -import { getParseErrorMessage } from "vs/base/common/jsonErrorMessages"; +import { getParseErrorMessage } from 'vs/base/common/jsonErrorMessages'; let colorRegistry = Registry.as(Extensions.ColorContribution); diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index 72ad60ffe23dd..6e41871b06032 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -39,7 +39,7 @@ import pfs = require('vs/base/node/pfs'); import colorThemeSchema = require('vs/workbench/services/themes/common/colorThemeSchema'); import fileIconThemeSchema = require('vs/workbench/services/themes/common/fileIconThemeSchema'); import { IDisposable } from 'vs/base/common/lifecycle'; -import { getParseErrorMessage } from "vs/base/common/jsonErrorMessages"; +import { getParseErrorMessage } from 'vs/base/common/jsonErrorMessages'; // implementation diff --git a/src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts b/src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts index cbdc513946239..4050b580de039 100644 --- a/src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts +++ b/src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts @@ -16,7 +16,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils'; import { PLAINTEXT_MODE_ID } from 'vs/editor/common/modes/modesRegistry'; import { workbenchInstantiationService, TestThemeService } from 'vs/workbench/test/workbenchTestServices'; -import { ResourceEditorInput } from "vs/workbench/common/editor/resourceEditorInput"; +import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; const NullThemeService = new TestThemeService(); diff --git a/src/vs/workbench/test/common/editor/editorDiffModel.test.ts b/src/vs/workbench/test/common/editor/editorDiffModel.test.ts index 2f5901c6e880f..2db61acaf4ec6 100644 --- a/src/vs/workbench/test/common/editor/editorDiffModel.test.ts +++ b/src/vs/workbench/test/common/editor/editorDiffModel.test.ts @@ -12,15 +12,15 @@ import { TextDiffEditorModel } from 'vs/workbench/common/editor/textDiffEditorMo import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; import { IModelService } from 'vs/editor/common/services/modelService'; import { IModeService } from 'vs/editor/common/services/modeService'; -import { ResourceEditorInput } from "vs/workbench/common/editor/resourceEditorInput"; -import URI from "vs/base/common/uri"; -import { ITextModelResolverService } from "vs/editor/common/services/resolverService"; -import { ITextFileService } from "vs/workbench/services/textfile/common/textfiles"; -import { IUntitledEditorService } from "vs/workbench/services/untitled/common/untitledEditorService"; -import { TestTextFileService, workbenchInstantiationService } from "vs/workbench/test/workbenchTestServices"; +import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; +import URI from 'vs/base/common/uri'; +import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; +import { TestTextFileService, workbenchInstantiationService } from 'vs/workbench/test/workbenchTestServices'; import { TPromise } from "vs/base/common/winjs.base"; -import { IModel } from "vs/editor/common/editorCommon"; -import { IInstantiationService } from "vs/platform/instantiation/common/instantiation"; +import { IModel } from 'vs/editor/common/editorCommon'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; class MyEditorModel extends EditorModel { } class MyTextEditorModel extends BaseTextEditorModel { } From 03284d80534cf2bc57b777f47783a1475608cd6b Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 25 May 2017 10:44:49 +0200 Subject: [PATCH 1147/2747] a18y: avoid duplicate events when navigating trees (for #26730) --- src/vs/base/parts/tree/browser/treeView.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/vs/base/parts/tree/browser/treeView.ts b/src/vs/base/parts/tree/browser/treeView.ts index 117e60db01d91..3e27c21e70903 100644 --- a/src/vs/base/parts/tree/browser/treeView.ts +++ b/src/vs/base/parts/tree/browser/treeView.ts @@ -197,22 +197,18 @@ export class ViewItem implements IViewItem { // ARIA this.element.setAttribute('role', 'treeitem'); + const ariaLabel = this.context.accessibilityProvider.getAriaLabel(this.context.tree, this.model.getElement()); + if (ariaLabel) { + this.element.setAttribute('aria-label', ariaLabel); + } if (this.model.hasTrait('focused')) { const base64Id = strings.safeBtoa(this.model.id); - const ariaLabel = this.context.accessibilityProvider.getAriaLabel(this.context.tree, this.model.getElement()); this.element.setAttribute('aria-selected', 'true'); this.element.setAttribute('id', base64Id); - if (ariaLabel) { - this.element.setAttribute('aria-label', ariaLabel); - } else { - this.element.setAttribute('aria-labelledby', base64Id); // force screen reader to compute label from children (helps NVDA at least) - } } else { this.element.setAttribute('aria-selected', 'false'); this.element.removeAttribute('id'); - this.element.removeAttribute('aria-label'); - this.element.removeAttribute('aria-labelledby'); } if (this.model.hasChildren()) { this.element.setAttribute('aria-expanded', String(!!this.model.isExpanded())); From e4d9b4d9ed6959c200e464f33cb9b6c00cda52f8 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 25 May 2017 12:06:05 +0200 Subject: [PATCH 1148/2747] clean up unused code --- src/vs/workbench/electron-browser/shell.ts | 23 +++------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index bec5d37606b9e..da3ce11662727 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -62,7 +62,7 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { IMessageService, IChoiceService, Severity, CloseAction } from 'vs/platform/message/common/message'; +import { IMessageService, IChoiceService, Severity } from 'vs/platform/message/common/message'; import { ChoiceChannel } from 'vs/platform/message/common/messageIpc'; import { ISearchService } from 'vs/platform/search/common/search'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; @@ -87,7 +87,6 @@ import { URLChannelClient } from 'vs/platform/url/common/urlIpc'; import { IURLService } from 'vs/platform/url/common/url'; import { IBackupService } from 'vs/platform/backup/common/backup'; import { BackupChannelClient } from 'vs/platform/backup/common/backupIpc'; -import { ReportPerformanceIssueAction } from 'vs/workbench/electron-browser/actions'; import { ExtensionHostProcessWorker } from 'vs/workbench/electron-browser/extensionHost'; import { ITimerService } from 'vs/workbench/services/timer/common/timerService'; import { remote, ipcRenderer as ipc } from 'electron'; @@ -198,7 +197,7 @@ export class WorkbenchShell { onWorkbenchStarted: (info: IWorkbenchStartedInfo) => { // run workbench started logic - this.onWorkbenchStarted(instantiationService, info); + this.onWorkbenchStarted(info); // start cached data manager instantiationService.createInstance(NodeCachedDataManager); @@ -221,7 +220,7 @@ export class WorkbenchShell { return workbenchContainer; } - private onWorkbenchStarted(instantiationService: IInstantiationService, info: IWorkbenchStartedInfo): void { + private onWorkbenchStarted(info: IWorkbenchStartedInfo): void { // Telemetry: workspace info const { filesToOpen, filesToCreate, filesToDiff } = this.options; @@ -248,12 +247,6 @@ export class WorkbenchShell { this.timerService.restoreViewletDuration = info.restoreViewletDuration; this.extensionService.onReady().done(() => { this.telemetryService.publicLog('startupTime', this.timerService.startupMetrics); - - // Check for negative performance numbers (insiders only) - // TODO@Ben remove me - if (product.quality !== 'stable' && this.timerService.startupMetrics.ellapsed < 0) { - this.handleNegativePerformanceNumbers(instantiationService, this.timerService.startupMetrics.ellapsed); - } }); // Telemetry: workspace tags @@ -266,16 +259,6 @@ export class WorkbenchShell { } } - private handleNegativePerformanceNumbers(i: IInstantiationService, time: number): void { - this.messageService.show(Severity.Warning, { - message: `Something went wrong measuring startup performance numbers (ellapsed: ${time}ms). We would like to learn more about this issue.`, - actions: [ - i.createInstance(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL), - CloseAction - ] - }); - } - private initServiceCollection(container: HTMLElement): [IInstantiationService, ServiceCollection] { const disposables = new Disposables(); From 8ee8d60b837b978c807a06a3800bfacd4fba53b0 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 25 May 2017 12:16:33 +0200 Subject: [PATCH 1149/2747] Uncaught TypeError: Cannot read property 'isActive' of undefined (fixes #27257) --- src/vs/workbench/browser/parts/editor/tabsTitleControl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index 3999342995253..de3fda8a4d56e 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -212,7 +212,7 @@ export class TabsTitleControl extends TitleControl { private updateDropFeedback(element: HTMLElement, isDND: boolean, index?: number): void { const isTab = (typeof index === 'number'); - const isActiveTab = isTab && this.context.isActive(this.context.getEditor(index)); + const isActiveTab = isTab && this.context && this.context.isActive(this.context.getEditor(index)); // Background const noDNDBackgroundColor = isTab ? this.getColor(isActiveTab ? TAB_ACTIVE_BACKGROUND : TAB_INACTIVE_BACKGROUND) : null; From 51a10b5ebe173ff28ef55f4dde9579778dc42295 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 25 May 2017 12:21:18 +0200 Subject: [PATCH 1150/2747] theming - fix color clash when dragging over selected or focused item --- src/vs/base/parts/tree/browser/treeView.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/parts/tree/browser/treeView.ts b/src/vs/base/parts/tree/browser/treeView.ts index 3e27c21e70903..fbbef901f5458 100644 --- a/src/vs/base/parts/tree/browser/treeView.ts +++ b/src/vs/base/parts/tree/browser/treeView.ts @@ -602,7 +602,7 @@ export class TreeView extends HeightMap { if (styles.listDropBackground) { content.push(` .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-wrapper.drop-target, - .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: ${styles.listDropBackground} !important; } + .monaco-tree.monaco-tree-instance-${this.instance} .monaco-tree-rows > .monaco-tree-row.drop-target { background-color: ${styles.listDropBackground} !important; color: inherit !important; } `); } From d264b70f2015d7469385bd156a57dd8663921dbb Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 09:24:50 +0200 Subject: [PATCH 1151/2747] [docker] update grammar --- build/npm/update-grammar.js | 30 ++++++++++++------- extensions/docker/package.json | 2 +- .../docker/syntaxes/docker.tmLanguage.json | 7 +++-- 3 files changed, 26 insertions(+), 13 deletions(-) diff --git a/build/npm/update-grammar.js b/build/npm/update-grammar.js index 4b0408b89b29d..dbb12cdcb445e 100644 --- a/build/npm/update-grammar.js +++ b/build/npm/update-grammar.js @@ -25,19 +25,28 @@ function getOptions(urlString) { } } -function download(url) { -return new Promise((c, e) => { - var content = ''; - var request = https.get(getOptions(url), function (response) { +function download(url, redirectCount) { + return new Promise((c, e) => { + var content = ''; + https.get(getOptions(url), function (response) { response.on('data', function (data) { content += data.toString(); }).on('end', function () { + let count = redirectCount || 0; + if (count < 5 && response.statusCode >= 300 && response.statusCode <= 303 || response.statusCode === 307) { + let location = response.headers['location']; + if (location) { + console.log("Redirected " + url + " to " + location); + download(location, count+1).then(c, e); + return; + } + } c(content); }); }).on('error', function (err) { e(err.message); }); -}); + }); } function getCommitSha(repoId, repoPath) { @@ -46,14 +55,15 @@ function getCommitSha(repoId, repoPath) { try { let lastCommit = JSON.parse(content)[0]; return Promise.resolve({ - commitSha : lastCommit.sha, - commitDate : lastCommit.commit.author.date + commitSha: lastCommit.sha, + commitDate: lastCommit.commit.author.date }); } catch (e) { + console.error("Failed extracting the SHA: " + content); return Promise.resolve(null); } }, function () { - console.err('Failed loading ' + commitInfo); + console.error('Failed loading ' + commitInfo); return Promise.resolve(null); }); } @@ -97,7 +107,7 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar) { } if (path.basename(process.argv[1]) === 'update-grammar.js') { - for (var i = 3; i < process.argv.length; i+=2) { - exports.update(process.argv[2], process.argv[i], process.argv[i+1]); + for (var i = 3; i < process.argv.length; i += 2) { + exports.update(process.argv[2], process.argv[i], process.argv[i + 1]); } } diff --git a/extensions/docker/package.json b/extensions/docker/package.json index 0da40007bc60a..e58f082641901 100644 --- a/extensions/docker/package.json +++ b/extensions/docker/package.json @@ -4,7 +4,7 @@ "publisher": "vscode", "engines": { "vscode": "*" }, "scripts": { - "update-grammar": "node ../../build/npm/update-grammar.js docker/docker contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage ./syntaxes/docker.tmLanguage.json" + "update-grammar": "node ../../build/npm/update-grammar.js moby/moby contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage ./syntaxes/docker.tmLanguage.json" }, "contributes": { "languages": [{ diff --git a/extensions/docker/syntaxes/docker.tmLanguage.json b/extensions/docker/syntaxes/docker.tmLanguage.json index caab35092b006..8be1c94055d3e 100644 --- a/extensions/docker/syntaxes/docker.tmLanguage.json +++ b/extensions/docker/syntaxes/docker.tmLanguage.json @@ -8,9 +8,12 @@ "captures": { "1": { "name": "keyword.other.special-method.dockerfile" + }, + "2": { + "name": "keyword.other.special-method.dockerfile" } }, - "match": "\\s*(?:(FROM|AS))\\s" + "match": "^\\s*\\b(FROM)\\b.*?\\b(AS)\\b" }, { "captures": { @@ -94,5 +97,5 @@ ], "scopeName": "source.dockerfile", "uuid": "a39d8795-59d2-49af-aa00-fe74ee29576e", - "version": "https://github.com/moby/moby/commit/4cb71f80823af345d063cf0ad657e73ce9caa75f" + "version": "https://github.com/moby/moby/commit/8523e9d108a0e98865673701a7bd0a7929c5260b" } \ No newline at end of file From 2d811977f822871792e603718edd5f34f2fde4f7 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 09:35:58 +0200 Subject: [PATCH 1152/2747] [scss] update grammar --- extensions/scss/syntaxes/scss.json | 29 +- .../test-cssvariables_scss.json | 12 +- .../scss/test/colorize-results/test_scss.json | 536 +++++++++--------- 3 files changed, 277 insertions(+), 300 deletions(-) diff --git a/extensions/scss/syntaxes/scss.json b/extensions/scss/syntaxes/scss.json index 1f09bd75e562d..252cb843115fb 100644 --- a/extensions/scss/syntaxes/scss.json +++ b/extensions/scss/syntaxes/scss.json @@ -890,15 +890,6 @@ } ] }, - "constant_hex": { - "captures": { - "1": { - "name": "punctuation.definition.constant.scss" - } - }, - "match": "(#)([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\\b", - "name": "constant.numeric.color.hex-value.scss" - }, "constant_important": { "match": "!important", "name": "keyword.other.important.scss" @@ -907,10 +898,6 @@ "match": "\\b(\\+|-|\\*|/)\\b", "name": "support.constant.mathematical-symbols.scss" }, - "constant_number": { - "match": "(\\b([0-9]+(\\.[0-9]+)?)|\\B\\.[0-9]+)(?=\\s*(ch|cm|deg|dpi|dpcm|dppx|em|ex|grad|in|mm|mozmm|ms|pc|pt|px|rad|rem|turn|s|vh|vmin|vmax|vw|\\b))", - "name": "constant.numeric.scss" - }, "constant_optional": { "match": "!optional", "name": "keyword.other.optional.scss" @@ -937,10 +924,6 @@ } ] }, - "constant_unit": { - "match": "(?<=[\\d])(ch|cm|deg|dpi|dpcm|dppx|em|ex|grad|in|mm|mozmm|ms|pc|pt|px|rad|rem|turn|s|vh|vmin|vmax|vw)\\b|%", - "name": "keyword.other.unit.scss" - }, "flow_control": { "patterns": [ { @@ -1242,9 +1225,6 @@ { "include": "#constant_sass_functions" }, - { - "include": "#constant_hex" - }, { "include": "#constant_important" }, @@ -1255,10 +1235,7 @@ "include": "#constant_optional" }, { - "include": "#constant_unit" - }, - { - "include": "#constant_number" + "include": "source.css#numeric-values" }, { "include": "source.css#property-keywords" @@ -1543,7 +1520,7 @@ }, { "match": "\\d+", - "name": "constant.numeric.scss" + "name": "constant.numeric.css" }, { "match": "(?<=\\d)n\\b|\\b(n|even|odd)\\b", @@ -1698,5 +1675,5 @@ "name": "variable.scss" } }, - "version": "https://github.com/atom/language-sass/commit/f477576a0ff819657495142f7e64e577a837fadb" + "version": "https://github.com/atom/language-sass/commit/8b8b7b52655ab5cf4dbe597443abe4b078bb6953" } \ No newline at end of file diff --git a/extensions/scss/test/colorize-results/test-cssvariables_scss.json b/extensions/scss/test/colorize-results/test-cssvariables_scss.json index ff30ea6b97344..e51a05d345fb1 100644 --- a/extensions/scss/test/colorize-results/test-cssvariables_scss.json +++ b/extensions/scss/test/colorize-results/test-cssvariables_scss.json @@ -89,7 +89,7 @@ }, { "c": "6", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -100,7 +100,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -177,7 +177,7 @@ }, { "c": "4", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -397,7 +397,7 @@ }, { "c": "4", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -496,7 +496,7 @@ }, { "c": "5", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -507,7 +507,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", diff --git a/extensions/scss/test/colorize-results/test_scss.json b/extensions/scss/test/colorize-results/test_scss.json index 4f699f59ebfca..ffcdbc7f034ad 100644 --- a/extensions/scss/test/colorize-results/test_scss.json +++ b/extensions/scss/test/colorize-results/test_scss.json @@ -287,7 +287,7 @@ }, { "c": "97", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -298,7 +298,7 @@ }, { "c": "%", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -430,7 +430,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -441,7 +441,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -705,7 +705,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -716,7 +716,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1332,7 +1332,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1343,7 +1343,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1365,7 +1365,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1376,7 +1376,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1486,7 +1486,7 @@ }, { "c": "30", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1497,7 +1497,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1849,7 +1849,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1937,7 +1937,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -1948,7 +1948,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -2157,7 +2157,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -2278,7 +2278,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -2839,7 +2839,7 @@ }, { "c": "5", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -2850,7 +2850,7 @@ }, { "c": "em", - "t": "source.css.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -3059,7 +3059,7 @@ }, { "c": "6", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3070,7 +3070,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -3202,7 +3202,7 @@ }, { "c": "12", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3213,7 +3213,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -3279,7 +3279,7 @@ }, { "c": "30", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3290,7 +3290,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -3862,7 +3862,7 @@ }, { "c": "100", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3895,7 +3895,7 @@ }, { "c": "100", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3928,7 +3928,7 @@ }, { "c": "225", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -3961,7 +3961,7 @@ }, { "c": "0.25", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4137,7 +4137,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4148,7 +4148,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -4192,7 +4192,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4203,7 +4203,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -4258,7 +4258,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4324,24 +4324,24 @@ }, { "c": "#", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "010203", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -4379,24 +4379,24 @@ }, { "c": "#", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "040506", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -4577,7 +4577,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4588,7 +4588,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -4632,7 +4632,7 @@ }, { "c": "4", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4643,7 +4643,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -4764,7 +4764,7 @@ }, { "c": "5", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss string.quoted.double.scss variable.interpolation.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss string.quoted.double.scss variable.interpolation.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4808,7 +4808,7 @@ }, { "c": "10", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss string.quoted.double.scss variable.interpolation.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss string.quoted.double.scss variable.interpolation.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4929,7 +4929,7 @@ }, { "c": "0", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4962,7 +4962,7 @@ }, { "c": "100", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -4973,7 +4973,7 @@ }, { "c": "%", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -5006,7 +5006,7 @@ }, { "c": "50", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5017,7 +5017,7 @@ }, { "c": "%", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -5149,7 +5149,7 @@ }, { "c": "0", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5215,7 +5215,7 @@ }, { "c": "100", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5226,7 +5226,7 @@ }, { "c": "%", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -5292,7 +5292,7 @@ }, { "c": "50", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5303,7 +5303,7 @@ }, { "c": "%", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -5413,7 +5413,7 @@ }, { "c": "40", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5424,7 +5424,7 @@ }, { "c": "px", - "t": "source.css.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -5479,7 +5479,7 @@ }, { "c": "10", - "t": "source.css.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5490,7 +5490,7 @@ }, { "c": "px", - "t": "source.css.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -5798,7 +5798,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.at-rule.return.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.return.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -5996,7 +5996,7 @@ }, { "c": "5", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -6722,7 +6722,7 @@ }, { "c": "300", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -6733,7 +6733,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -6975,7 +6975,7 @@ }, { "c": "500", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -6986,7 +6986,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -7162,7 +7162,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -7173,7 +7173,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -7195,24 +7195,24 @@ }, { "c": "#", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "f00", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -7272,24 +7272,24 @@ }, { "c": "#", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "fdd", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -7459,7 +7459,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -7470,7 +7470,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -7756,7 +7756,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -7767,7 +7767,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -8438,7 +8438,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -8449,7 +8449,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -8823,7 +8823,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -8834,7 +8834,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -9274,7 +9274,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9318,7 +9318,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9362,7 +9362,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9439,7 +9439,7 @@ }, { "c": "1", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9450,7 +9450,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -9560,7 +9560,7 @@ }, { "c": "5", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9604,7 +9604,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9681,7 +9681,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9692,7 +9692,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -9857,7 +9857,7 @@ }, { "c": "3", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -9868,7 +9868,7 @@ }, { "c": "px", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -10495,7 +10495,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.for.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.for.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -10539,7 +10539,7 @@ }, { "c": "3", - "t": "source.css.scss meta.at-rule.for.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.for.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -10704,7 +10704,7 @@ }, { "c": "2", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -10715,7 +10715,7 @@ }, { "c": "em", - "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -11298,7 +11298,7 @@ }, { "c": "6", - "t": "source.css.scss meta.at-rule.each.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -11397,7 +11397,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -11562,7 +11562,7 @@ }, { "c": "2", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -11573,7 +11573,7 @@ }, { "c": "em", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.em.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -11749,7 +11749,7 @@ }, { "c": "2", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -12035,7 +12035,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.for.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.for.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -12387,7 +12387,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.at-rule.if.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -12475,7 +12475,7 @@ }, { "c": "100", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -12486,7 +12486,7 @@ }, { "c": "%", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -12970,7 +12970,7 @@ }, { "c": "20", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -12981,7 +12981,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -13135,24 +13135,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "ff0000", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -13333,7 +13333,7 @@ }, { "c": "4", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -13344,7 +13344,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -13520,7 +13520,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.at-rule.mixin.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.at-rule.mixin.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -13531,7 +13531,7 @@ }, { "c": "in", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.at-rule.mixin.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.at-rule.mixin.scss constant.numeric.css keyword.other.unit.in.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14455,7 +14455,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14466,7 +14466,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14488,7 +14488,7 @@ }, { "c": "4", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14499,7 +14499,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14521,7 +14521,7 @@ }, { "c": "5", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14532,7 +14532,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14554,24 +14554,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "666", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -14587,7 +14587,7 @@ }, { "c": "2", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14598,7 +14598,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14620,7 +14620,7 @@ }, { "c": "6", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14631,7 +14631,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14653,7 +14653,7 @@ }, { "c": "10", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -14664,7 +14664,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -14686,24 +14686,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "999", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.include.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -15148,24 +15148,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "ff0000", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -15181,24 +15181,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "00ff00", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -15214,24 +15214,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "0000ff", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -16479,7 +16479,7 @@ }, { "c": "4", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -16490,7 +16490,7 @@ }, { "c": "cm", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.cm.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -16556,7 +16556,7 @@ }, { "c": "3", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -16567,7 +16567,7 @@ }, { "c": "cm", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.cm.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -16798,7 +16798,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -16809,7 +16809,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -17084,7 +17084,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.set.variable.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -17128,24 +17128,24 @@ }, { "c": "#", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss punctuation.definition.constant.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css punctuation.definition.constant.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { "c": "123", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.color.hex-value.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.other.color.rgb-value.hex.css", "r": { - "dark_plus": "constant.numeric: #B5CEA8", - "light_plus": "constant.numeric: #09885A", - "dark_vs": "constant.numeric: #B5CEA8", - "light_vs": "constant.numeric: #09885A", - "hc_black": "constant.numeric: #B5CEA8" + "dark_plus": "constant.other.color.rgb-value: #CE9178", + "light_plus": "constant.other.color.rgb-value: #0451A5", + "dark_vs": "default: #D4D4D4", + "light_vs": "constant.other.color.rgb-value: #0451A5", + "hc_black": "constant.other.color.rgb-value: #CE9178" } }, { @@ -17205,7 +17205,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -17656,7 +17656,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -17667,7 +17667,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -17777,7 +17777,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -17788,7 +17788,7 @@ }, { "c": "px", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss keyword.other.unit.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -18470,7 +18470,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -18569,7 +18569,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -18701,7 +18701,7 @@ }, { "c": "2", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -18811,7 +18811,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19009,7 +19009,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19141,7 +19141,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19328,7 +19328,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19460,7 +19460,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19647,7 +19647,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19757,7 +19757,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.property-list.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -19966,7 +19966,7 @@ }, { "c": "0", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", @@ -20098,7 +20098,7 @@ }, { "c": "1", - "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.scss", + "t": "source.css.scss meta.at-rule.each.scss meta.at-rule.while.scss meta.property-list.scss meta.at-rule.keyframes.scss meta.property-list.scss meta.property-value.scss constant.numeric.css", "r": { "dark_plus": "constant.numeric: #B5CEA8", "light_plus": "constant.numeric: #09885A", From d57a3ab57e274b315b16545bae70da5db37c1ce2 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 10:36:09 +0200 Subject: [PATCH 1153/2747] [ini] add update script --- extensions/ini/package.json | 11 +- extensions/ini/syntaxes/ini.tmLanguage.json | 114 +++++++++++ extensions/ini/syntaxes/properties.plist | 181 ------------------ .../ini/test/colorize-results/test_ini.json | 54 +++--- 4 files changed, 148 insertions(+), 212 deletions(-) create mode 100644 extensions/ini/syntaxes/ini.tmLanguage.json delete mode 100644 extensions/ini/syntaxes/properties.plist diff --git a/extensions/ini/package.json b/extensions/ini/package.json index b6a9b6c37d015..bfb7bb522157e 100644 --- a/extensions/ini/package.json +++ b/extensions/ini/package.json @@ -3,6 +3,9 @@ "version": "0.1.0", "publisher": "vscode", "engines": { "vscode": "*" }, + "scripts": { + "update-grammar": "node ../../build/npm/update-grammar.js textmate/ini.tmbundle Syntaxes/Ini.plist ./syntaxes/ini.tmLanguage.json" + }, "contributes": { "languages": [{ "id": "ini", @@ -19,12 +22,12 @@ }], "grammars": [{ "language": "ini", - "scopeName": "source.properties", - "path": "./syntaxes/properties.plist" + "scopeName": "source.ini", + "path": "./syntaxes/ini.tmLanguage.json" },{ "language": "properties", - "scopeName": "source.properties", - "path": "./syntaxes/properties.plist" + "scopeName": "source.ini", + "path": "./syntaxes/ini.tmLanguage.json" }] } } diff --git a/extensions/ini/syntaxes/ini.tmLanguage.json b/extensions/ini/syntaxes/ini.tmLanguage.json new file mode 100644 index 0000000000000..e8f1a0ef9b330 --- /dev/null +++ b/extensions/ini/syntaxes/ini.tmLanguage.json @@ -0,0 +1,114 @@ +{ + "fileTypes": [ + "ini", + "conf" + ], + "keyEquivalent": "^~I", + "name": "Ini", + "patterns": [ + { + "begin": "(^[ \\t]+)?(?=#)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.ini" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.ini" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.ini" + } + ] + }, + { + "begin": "(^[ \\t]+)?(?=;)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.ini" + } + }, + "end": "(?!\\G)", + "patterns": [ + { + "begin": ";", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.ini" + } + }, + "end": "\\n", + "name": "comment.line.semicolon.ini" + } + ] + }, + { + "captures": { + "1": { + "name": "keyword.other.definition.ini" + }, + "2": { + "name": "punctuation.separator.key-value.ini" + } + }, + "match": "\\b([a-zA-Z0-9_.-]+)\\b\\s*(=)" + }, + { + "captures": { + "1": { + "name": "punctuation.definition.entity.ini" + }, + "3": { + "name": "punctuation.definition.entity.ini" + } + }, + "match": "^(\\[)(.*?)(\\])", + "name": "entity.name.section.group-title.ini" + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ini" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ini" + } + }, + "name": "string.quoted.single.ini", + "patterns": [ + { + "match": "\\\\.", + "name": "constant.character.escape.ini" + } + ] + }, + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.ini" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.ini" + } + }, + "name": "string.quoted.double.ini" + } + ], + "scopeName": "source.ini", + "uuid": "77DC23B6-8A90-11D9-BAA4-000A9584EC8C", + "version": "https://github.com/textmate/ini.tmbundle/commit/2af0cbb0704940f967152616f2f1ff0aae6287a6" +} \ No newline at end of file diff --git a/extensions/ini/syntaxes/properties.plist b/extensions/ini/syntaxes/properties.plist deleted file mode 100644 index 11436566bd5a5..0000000000000 --- a/extensions/ini/syntaxes/properties.plist +++ /dev/null @@ -1,181 +0,0 @@ - - - - - fileTypes - - ini - conf - - keyEquivalent - ^~I - name - Ini - patterns - - - begin - (^[ \t]+)?(?=#) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.ini - - - end - (?!\G) - patterns - - - begin - # - beginCaptures - - 0 - - name - punctuation.definition.comment.ini - - - end - \n - name - comment.line.number-sign.ini - - - - - begin - (^[ \t]+)?(?=;) - beginCaptures - - 1 - - name - punctuation.whitespace.comment.leading.ini - - - end - (?!\G) - patterns - - - begin - ; - beginCaptures - - 0 - - name - punctuation.definition.comment.ini - - - end - \n - name - comment.line.semicolon.ini - - - - - captures - - 1 - - name - keyword.other.definition.ini - - 2 - - name - punctuation.separator.key-value.ini - - - match - \b([a-zA-Z0-9_.-]+)\b\s*(=) - - - captures - - 1 - - name - punctuation.definition.entity.ini - - 3 - - name - punctuation.definition.entity.ini - - - match - ^(\[)(.*?)(\]) - name - entity.name.section.group-title.ini - - - begin - ' - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ini - - - end - ' - endCaptures - - 0 - - name - punctuation.definition.string.end.ini - - - name - string.quoted.single.ini - patterns - - - match - \\. - name - constant.character.escape.ini - - - - - begin - " - beginCaptures - - 0 - - name - punctuation.definition.string.begin.ini - - - end - " - endCaptures - - 0 - - name - punctuation.definition.string.end.ini - - - name - string.quoted.double.ini - - - scopeName - source.properties - uuid - 77DC23B6-8A90-11D9-BAA4-000A9584EC8C - - \ No newline at end of file diff --git a/extensions/ini/test/colorize-results/test_ini.json b/extensions/ini/test/colorize-results/test_ini.json index f30cdc5389207..5b001c68246ed 100644 --- a/extensions/ini/test/colorize-results/test_ini.json +++ b/extensions/ini/test/colorize-results/test_ini.json @@ -1,7 +1,7 @@ [ { "c": ";", - "t": "source.properties comment.line.semicolon.ini punctuation.definition.comment.ini", + "t": "source.ini comment.line.semicolon.ini punctuation.definition.comment.ini", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -12,7 +12,7 @@ }, { "c": " last modified 1 April 2001 by John Doe", - "t": "source.properties comment.line.semicolon.ini", + "t": "source.ini comment.line.semicolon.ini", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -23,7 +23,7 @@ }, { "c": "[", - "t": "source.properties entity.name.section.group-title.ini punctuation.definition.entity.ini", + "t": "source.ini entity.name.section.group-title.ini punctuation.definition.entity.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -34,7 +34,7 @@ }, { "c": "owner", - "t": "source.properties entity.name.section.group-title.ini", + "t": "source.ini entity.name.section.group-title.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -45,7 +45,7 @@ }, { "c": "]", - "t": "source.properties entity.name.section.group-title.ini punctuation.definition.entity.ini", + "t": "source.ini entity.name.section.group-title.ini punctuation.definition.entity.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -56,7 +56,7 @@ }, { "c": "name", - "t": "source.properties keyword.other.definition.ini", + "t": "source.ini keyword.other.definition.ini", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -67,7 +67,7 @@ }, { "c": "=", - "t": "source.properties punctuation.separator.key-value.ini", + "t": "source.ini punctuation.separator.key-value.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -78,7 +78,7 @@ }, { "c": "John Doe", - "t": "source.properties", + "t": "source.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -89,7 +89,7 @@ }, { "c": "organization", - "t": "source.properties keyword.other.definition.ini", + "t": "source.ini keyword.other.definition.ini", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -100,7 +100,7 @@ }, { "c": "=", - "t": "source.properties punctuation.separator.key-value.ini", + "t": "source.ini punctuation.separator.key-value.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -111,7 +111,7 @@ }, { "c": "Acme Widgets Inc.", - "t": "source.properties", + "t": "source.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -122,7 +122,7 @@ }, { "c": "[", - "t": "source.properties entity.name.section.group-title.ini punctuation.definition.entity.ini", + "t": "source.ini entity.name.section.group-title.ini punctuation.definition.entity.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -133,7 +133,7 @@ }, { "c": "database", - "t": "source.properties entity.name.section.group-title.ini", + "t": "source.ini entity.name.section.group-title.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -144,7 +144,7 @@ }, { "c": "]", - "t": "source.properties entity.name.section.group-title.ini punctuation.definition.entity.ini", + "t": "source.ini entity.name.section.group-title.ini punctuation.definition.entity.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -155,7 +155,7 @@ }, { "c": ";", - "t": "source.properties comment.line.semicolon.ini punctuation.definition.comment.ini", + "t": "source.ini comment.line.semicolon.ini punctuation.definition.comment.ini", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -166,7 +166,7 @@ }, { "c": " use IP address in case network name resolution is not working", - "t": "source.properties comment.line.semicolon.ini", + "t": "source.ini comment.line.semicolon.ini", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -177,7 +177,7 @@ }, { "c": "server", - "t": "source.properties keyword.other.definition.ini", + "t": "source.ini keyword.other.definition.ini", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -188,7 +188,7 @@ }, { "c": "=", - "t": "source.properties punctuation.separator.key-value.ini", + "t": "source.ini punctuation.separator.key-value.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -199,7 +199,7 @@ }, { "c": "192.0.2.62", - "t": "source.properties", + "t": "source.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -210,7 +210,7 @@ }, { "c": "port", - "t": "source.properties keyword.other.definition.ini", + "t": "source.ini keyword.other.definition.ini", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -221,7 +221,7 @@ }, { "c": "=", - "t": "source.properties punctuation.separator.key-value.ini", + "t": "source.ini punctuation.separator.key-value.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -232,7 +232,7 @@ }, { "c": "143", - "t": "source.properties", + "t": "source.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -243,7 +243,7 @@ }, { "c": "file", - "t": "source.properties keyword.other.definition.ini", + "t": "source.ini keyword.other.definition.ini", "r": { "dark_plus": "keyword: #569CD6", "light_plus": "keyword: #0000FF", @@ -254,7 +254,7 @@ }, { "c": "=", - "t": "source.properties punctuation.separator.key-value.ini", + "t": "source.ini punctuation.separator.key-value.ini", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -265,7 +265,7 @@ }, { "c": "\"", - "t": "source.properties string.quoted.double.ini punctuation.definition.string.begin.ini", + "t": "source.ini string.quoted.double.ini punctuation.definition.string.begin.ini", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -276,7 +276,7 @@ }, { "c": "payroll.dat", - "t": "source.properties string.quoted.double.ini", + "t": "source.ini string.quoted.double.ini", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -287,7 +287,7 @@ }, { "c": "\"", - "t": "source.properties string.quoted.double.ini punctuation.definition.string.end.ini", + "t": "source.ini string.quoted.double.ini punctuation.definition.string.end.ini", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", From 984750930c8623f1a31c653495919a66cde5f216 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 11:27:32 +0200 Subject: [PATCH 1154/2747] update all grammars script --- build/npm/update-all-grammars.js | 74 ++++++++++++++++++++++++++++++ extensions/typescript/package.json | 2 +- package.json | 3 +- 3 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 build/npm/update-all-grammars.js diff --git a/build/npm/update-all-grammars.js b/build/npm/update-all-grammars.js new file mode 100644 index 0000000000000..252b0f4edcb8b --- /dev/null +++ b/build/npm/update-all-grammars.js @@ -0,0 +1,74 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +const cp = require('child_process'); +const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; +const integrationTests = process.platform === 'win32' ? '.\test-integration.bat' : './test-integration.sh'; + +function updateGrammar(location) { + const result = cp.spawnSync(npm, ['run', 'update-grammar'], { + cwd: location, + stdio: 'inherit' + }); + + if (result.error || result.status !== 0) { + process.exit(1); + } +} + +const extensions = [ + // 'bat' Grammar no longer available + 'clojure', + 'coffeescript', + 'cpp', + 'csharp', + 'css', + 'diff', + 'docker', + 'fsharp', + 'gitsyntax', + 'go', + 'groovy', + 'handlebars', + 'hlsl', + 'html', + 'ini', + 'java', + // 'javascript', updated through JavaScript + // 'json', customized + 'less', + 'lua', + 'make', + 'markdown', + 'objective-c', + 'perl', + 'php', + // 'powershell', grammar not ready yet, @daviwil will ping when ready + 'pug', + 'python', + 'r', + 'razor', + 'ruby', + 'rust', + 'scss', + 'shaderlab', + 'shellscript', + // 'sql', customized, PRs pending + 'swift', + 'typescript', + 'vb', + 'xml', + 'yaml' +]; + +extensions.forEach(extension => updateGrammar(`extensions/${extension}`)); + +// run integration tests + +if (process.platform === 'win32') { + cp.spawn('.\scripts\test-integration.bat', [], { env: process.env, stdio: 'inherit' }); +} else { + cp.spawn('/bin/bash', ['./scripts/test-integration.sh'], { env: process.env, stdio: 'inherit' }); +} \ No newline at end of file diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index a24c0c1051906..461cb773a4dea 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -21,7 +21,7 @@ }, "scripts": { "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:typescript ./tsconfig.json", - "update-grammars": "node ./build/update-grammars.js" + "update-grammar": "node ./build/update-grammars.js" }, "activationEvents": [ "onLanguage:javascript", diff --git a/package.json b/package.json index 236e9d787e575..c31f58f40c999 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "monaco-editor-test": "mocha --only-monaco-editor", "precommit": "node build/gulpfile.hygiene.js", "gulp": "gulp --max_old_space_size=4096", - "7z": "7z" + "7z": "7z", + "update-grammars": "node build/npm/update-all-grammars.js" }, "dependencies": { "applicationinsights": "0.17.1", From b135eef9926bcac95f84c1b63ac43e9ff6038918 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 11:27:46 +0200 Subject: [PATCH 1155/2747] [clojure] update grammar --- .../clojure/syntaxes/clojure.tmLanguage.json | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/extensions/clojure/syntaxes/clojure.tmLanguage.json b/extensions/clojure/syntaxes/clojure.tmLanguage.json index 6e2d50b5ea544..881ce191e1c6a 100644 --- a/extensions/clojure/syntaxes/clojure.tmLanguage.json +++ b/extensions/clojure/syntaxes/clojure.tmLanguage.json @@ -64,14 +64,11 @@ }, { "include": "#symbol" - }, - { - "include": "#whitespace" } ], "repository": { "comment": { - "begin": ";", + "begin": "(? Date: Thu, 25 May 2017 11:27:59 +0200 Subject: [PATCH 1156/2747] [cpp] update grammar --- extensions/cpp/syntaxes/c++.json | 5 +- .../cpp/test/colorize-results/test_cc.json | 118 +++++++++++++++++- 2 files changed, 118 insertions(+), 5 deletions(-) diff --git a/extensions/cpp/syntaxes/c++.json b/extensions/cpp/syntaxes/c++.json index 0d20c95fb60ef..7ec3054f58ba1 100644 --- a/extensions/cpp/syntaxes/c++.json +++ b/extensions/cpp/syntaxes/c++.json @@ -425,6 +425,9 @@ { "match": "\\\\x\\h+", "name": "constant.character.escape.cpp" + }, + { + "include": "source.c#string_placeholder" } ] }, @@ -455,5 +458,5 @@ ] } }, - "version": "https://github.com/atom/language-c/commit/a74c2f967d73e802a67fa6e971a8e8dedf076597" + "version": "https://github.com/atom/language-c/commit/3a269f88b12e512fb9495dc006a1dabf325d3d7f" } \ No newline at end of file diff --git a/extensions/cpp/test/colorize-results/test_cc.json b/extensions/cpp/test/colorize-results/test_cc.json index 3f7be3caeb863..845a693b3ab32 100644 --- a/extensions/cpp/test/colorize-results/test_cc.json +++ b/extensions/cpp/test/colorize-results/test_cc.json @@ -110,7 +110,29 @@ } }, { - "c": "num_candidate_ret=%d:", + "c": "num_candidate_ret=", + "t": "source.cpp meta.function.c string.quoted.double.cpp", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": "%d", + "t": "source.cpp meta.function.c string.quoted.double.cpp constant.other.placeholder.c", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": ":", "t": "source.cpp meta.function.c string.quoted.double.cpp", "r": { "dark_plus": "string: #CE9178", @@ -407,7 +429,18 @@ } }, { - "c": "%d,", + "c": "%d", + "t": "source.cpp meta.function.c string.quoted.double.cpp constant.other.placeholder.c", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": ",", "t": "source.cpp meta.function.c string.quoted.double.cpp", "r": { "dark_plus": "string: #CE9178", @@ -1375,7 +1408,29 @@ } }, { - "c": "STYLE=Keramik;TITLE=%s;THEME=%s", + "c": "STYLE=Keramik;TITLE=", + "t": "source.cpp meta.block.c string.quoted.double.cpp", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": "%s", + "t": "source.cpp meta.block.c string.quoted.double.cpp constant.other.placeholder.c", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": ";THEME=", "t": "source.cpp meta.block.c string.quoted.double.cpp", "r": { "dark_plus": "string: #CE9178", @@ -1385,6 +1440,17 @@ "hc_black": "string: #CE9178" } }, + { + "c": "%s", + "t": "source.cpp meta.block.c string.quoted.double.cpp constant.other.placeholder.c", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, { "c": "\"", "t": "source.cpp meta.block.c string.quoted.double.cpp punctuation.definition.string.end.cpp", @@ -1705,7 +1771,51 @@ } }, { - "c": "movw $0x38, %ax; ltr %ax", + "c": "movw $0x38, ", + "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": "%a", + "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp constant.other.placeholder.c", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": "x; ltr ", + "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": "%a", + "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp constant.other.placeholder.c", + "r": { + "dark_plus": "string: #CE9178", + "light_plus": "string: #A31515", + "dark_vs": "string: #CE9178", + "light_vs": "string: #A31515", + "hc_black": "string: #CE9178" + } + }, + { + "c": "x", "t": "source.cpp meta.block.c meta.function-call.c string.quoted.double.cpp", "r": { "dark_plus": "string: #CE9178", From 3785324cc135d0fb4738f88d0840770d7cc931b0 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 11:28:13 +0200 Subject: [PATCH 1157/2747] [css] update grammar --- extensions/css/syntaxes/css.tmLanguage.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/css/syntaxes/css.tmLanguage.json b/extensions/css/syntaxes/css.tmLanguage.json index 072b9cd30515e..700b6dd314068 100644 --- a/extensions/css/syntaxes/css.tmLanguage.json +++ b/extensions/css/syntaxes/css.tmLanguage.json @@ -1328,7 +1328,7 @@ "name": "keyword.other.unit.${2:/downcase}.css" } }, - "match": "(?xi) (? Date: Thu, 25 May 2017 11:28:39 +0200 Subject: [PATCH 1158/2747] [typescript] update grammar --- .../syntaxes/JavaScript.tmLanguage.json | 181 ++++++++++------- .../test/colorize-results/test_jsx.json | 10 +- .../syntaxes/TypeScript.tmLanguage.json | 183 +++++++++++------- .../syntaxes/TypeScriptReact.tmLanguage.json | 181 ++++++++++------- 4 files changed, 330 insertions(+), 225 deletions(-) diff --git a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json index ec077b65656fe..d7aabe6479b4f 100644 --- a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json +++ b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json @@ -74,7 +74,7 @@ "name": "storage.type.js" } }, - "end": "(?=$|;|}|(\\s+(of|in)\\s+))", + "end": "(?=$|^|;|}|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#destructuring-variable" @@ -103,7 +103,7 @@ "name": "meta.definition.variable.js entity.name.function.js" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -118,7 +118,7 @@ "name": "meta.definition.variable.js variable.other.constant.js" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -133,7 +133,7 @@ "name": "meta.definition.variable.js variable.other.readwrite.js" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -160,7 +160,7 @@ { "name": "meta.object-binding-pattern-variable.js", "begin": "(?])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)", + "end": "(?=$|^|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)", "patterns": [ { "include": "#comment" @@ -2019,7 +2062,7 @@ "name": "punctuation.definition.typeparameters.begin.js" } }, - "end": "(?=$)|(>)", + "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.typeparameters.end.js" @@ -2054,7 +2097,7 @@ "name": "keyword.operator.assignment.js" } }, - "end": "(?=$|[,);}\\]])", + "end": "(?=$|^|[,);}\\]])", "patterns": [ { "include": "#expression" @@ -2693,7 +2736,7 @@ "name": "keyword.control.as.js" } }, - "end": "(?=$|[;,:})\\]])", + "end": "(?=$|^|[;,:})\\]])", "patterns": [ { "include": "#type" @@ -2778,7 +2821,7 @@ }, { "name": "meta.arrow.js", - "begin": "(?x) (?:\n (? is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.js" @@ -3358,25 +3401,17 @@ } }, { - "begin": "(^[ \\t]+)?(?=//)", + "begin": "(^[ \\t]+)?(//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.js" + }, + "2": { + "name": "comment.line.double-slash.js punctuation.definition.comment.js" } }, - "end": "(?=$)", - "patterns": [ - { - "name": "comment.line.double-slash.js", - "begin": "//", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.js" - } - }, - "end": "(?=$)" - } - ] + "end": "(?=^)", + "contentName": "comment.line.double-slash.tsx" } ] }, @@ -3388,7 +3423,7 @@ "name": "punctuation.definition.comment.js" } }, - "end": "(?=$)", + "end": "(?=^)", "patterns": [ { "name": "meta.tag.js", @@ -4188,5 +4223,5 @@ ] } }, - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/cb1af7953db224204607cbe22d3a45aa0f77a4c1" + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8c967fe7553297bfad672b7417d78e357c8fe724" } \ No newline at end of file diff --git a/extensions/javascript/test/colorize-results/test_jsx.json b/extensions/javascript/test/colorize-results/test_jsx.json index 7a9eb1f5ca044..55e2c440d3bee 100644 --- a/extensions/javascript/test/colorize-results/test_jsx.json +++ b/extensions/javascript/test/colorize-results/test_jsx.json @@ -529,7 +529,7 @@ }, { "c": " Prevent following the link.", - "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js", + "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -628,7 +628,7 @@ }, { "c": " Invert the chosen default.", - "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js", + "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -661,7 +661,7 @@ }, { "c": " This will trigger an intelligent re-render of the component.", - "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js", + "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -1046,7 +1046,7 @@ }, { "c": " Default to the default message.", - "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js", + "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", @@ -1222,7 +1222,7 @@ }, { "c": " If toggled, show the alternate message.", - "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.js", + "t": "source.js meta.var.expr.js meta.objectliteral.js meta.object.member.js meta.function.expression.js meta.block.js comment.line.double-slash.tsx", "r": { "dark_plus": "comment: #608B4E", "light_plus": "comment: #008000", diff --git a/extensions/typescript/syntaxes/TypeScript.tmLanguage.json b/extensions/typescript/syntaxes/TypeScript.tmLanguage.json index b80d24f1c23b0..7c581f92aeae2 100644 --- a/extensions/typescript/syntaxes/TypeScript.tmLanguage.json +++ b/extensions/typescript/syntaxes/TypeScript.tmLanguage.json @@ -71,7 +71,7 @@ "name": "storage.type.ts" } }, - "end": "(?=$|;|}|(\\s+(of|in)\\s+))", + "end": "(?=$|^|;|}|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#destructuring-variable" @@ -100,7 +100,7 @@ "name": "meta.definition.variable.ts entity.name.function.ts" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -115,7 +115,7 @@ "name": "meta.definition.variable.ts variable.other.constant.ts" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -130,7 +130,7 @@ "name": "meta.definition.variable.ts variable.other.readwrite.ts" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -157,7 +157,7 @@ { "name": "meta.object-binding-pattern-variable.ts", "begin": "(?])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)", + "end": "(?=$|^|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)", "patterns": [ { "include": "#comment" @@ -2013,7 +2056,7 @@ "name": "punctuation.definition.typeparameters.begin.ts" } }, - "end": "(?=$)|(>)", + "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.typeparameters.end.ts" @@ -2048,7 +2091,7 @@ "name": "keyword.operator.assignment.ts" } }, - "end": "(?=$|[,);}\\]])", + "end": "(?=$|^|[,);}\\]])", "patterns": [ { "include": "#expression" @@ -2487,7 +2530,7 @@ "patterns": [ { "name": "cast.expr.ts", - "begin": "(?:(?<=return|throw|yield|await|default|[=(,:>*]))\\s*(<)(?!*?]))\\s*(<)(?! is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.ts" @@ -3389,25 +3432,17 @@ } }, { - "begin": "(^[ \\t]+)?(?=//)", + "begin": "(^[ \\t]+)?(//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.ts" + }, + "2": { + "name": "comment.line.double-slash.ts punctuation.definition.comment.ts" } }, - "end": "(?=$)", - "patterns": [ - { - "name": "comment.line.double-slash.ts", - "begin": "//", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.ts" - } - }, - "end": "(?=$)" - } - ] + "end": "(?=^)", + "contentName": "comment.line.double-slash.ts" } ] }, @@ -3419,7 +3454,7 @@ "name": "punctuation.definition.comment.ts" } }, - "end": "(?=$)", + "end": "(?=^)", "patterns": [ { "name": "meta.tag.ts", @@ -3923,5 +3958,5 @@ ] } }, - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/9f6676aa2ddb75cb5a9dbe1f59024069e839d986" + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8c967fe7553297bfad672b7417d78e357c8fe724" } \ No newline at end of file diff --git a/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json b/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json index c20889881a13e..b2c49cbf7f46a 100644 --- a/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json +++ b/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json @@ -71,7 +71,7 @@ "name": "storage.type.tsx" } }, - "end": "(?=$|;|}|(\\s+(of|in)\\s+))", + "end": "(?=$|^|;|}|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#destructuring-variable" @@ -100,7 +100,7 @@ "name": "meta.definition.variable.tsx entity.name.function.tsx" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -115,7 +115,7 @@ "name": "meta.definition.variable.tsx variable.other.constant.tsx" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -130,7 +130,7 @@ "name": "meta.definition.variable.tsx variable.other.readwrite.tsx" } }, - "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))", + "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))", "patterns": [ { "include": "#var-single-variable-type-annotation" @@ -157,7 +157,7 @@ { "name": "meta.object-binding-pattern-variable.tsx", "begin": "(?])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)", + "end": "(?=$|^|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)", "patterns": [ { "include": "#comment" @@ -2016,7 +2059,7 @@ "name": "punctuation.definition.typeparameters.begin.tsx" } }, - "end": "(?=$)|(>)", + "end": "(>)", "endCaptures": { "1": { "name": "punctuation.definition.typeparameters.end.tsx" @@ -2051,7 +2094,7 @@ "name": "keyword.operator.assignment.tsx" } }, - "end": "(?=$|[,);}\\]])", + "end": "(?=$|^|[,);}\\]])", "patterns": [ { "include": "#expression" @@ -2690,7 +2733,7 @@ "name": "keyword.control.as.tsx" } }, - "end": "(?=$|[;,:})\\]])", + "end": "(?=$|^|[;,:})\\]])", "patterns": [ { "include": "#type" @@ -2775,7 +2818,7 @@ }, { "name": "meta.arrow.tsx", - "begin": "(?x) (?:\n (? is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", + "begin": "(?x) (?:\n (? is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)", "beginCaptures": { "1": { "name": "storage.modifier.async.tsx" @@ -3355,25 +3398,17 @@ } }, { - "begin": "(^[ \\t]+)?(?=//)", + "begin": "(^[ \\t]+)?(//)", "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.tsx" + }, + "2": { + "name": "comment.line.double-slash.tsx punctuation.definition.comment.tsx" } }, - "end": "(?=$)", - "patterns": [ - { - "name": "comment.line.double-slash.tsx", - "begin": "//", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.tsx" - } - }, - "end": "(?=$)" - } - ] + "end": "(?=^)", + "contentName": "comment.line.double-slash.tsx" } ] }, @@ -3385,7 +3420,7 @@ "name": "punctuation.definition.comment.tsx" } }, - "end": "(?=$)", + "end": "(?=^)", "patterns": [ { "name": "meta.tag.tsx", @@ -4185,5 +4220,5 @@ ] } }, - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/cb1af7953db224204607cbe22d3a45aa0f77a4c1" + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8c967fe7553297bfad672b7417d78e357c8fe724" } \ No newline at end of file From 7c55d50e827d57fc421ab0940bf9cc32852167c5 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 11:28:58 +0200 Subject: [PATCH 1159/2747] [less] update grammar --- extensions/less/syntaxes/less.tmLanguage.json | 17 +- .../test/colorize-results/14119_less.json | 13 +- .../test-cssvariables_less.json | 28 +- .../less/test/colorize-results/test_less.json | 280 ++++++++++++++++-- 4 files changed, 293 insertions(+), 45 deletions(-) diff --git a/extensions/less/syntaxes/less.tmLanguage.json b/extensions/less/syntaxes/less.tmLanguage.json index 902eb4e8d01dc..cd25b2a89b513 100644 --- a/extensions/less/syntaxes/less.tmLanguage.json +++ b/extensions/less/syntaxes/less.tmLanguage.json @@ -146,12 +146,7 @@ "name": "comment.block.css" }, { - "match": "[+-]?\\d*\\.?\\d+", - "name": "constant.numeric.css" - }, - { - "match": "(?<=[\\d])(ch|cm|deg|dpi|dpcm|dppx|em|ex|grad|in|mm|ms|pc|pt|px|rad|rem|turn|s|vh|vmin|vw)\\b|%", - "name": "keyword.other.unit.css" + "include": "source.css#numeric-values" }, { "captures": { @@ -281,13 +276,13 @@ ] }, { + "match": "(@|\\-\\-)[\\w-]+(?=\\s*)", + "name": "variable.other.less", "captures": { "1": { "name": "punctuation.definition.variable.less" } - }, - "match": "(?:@|\\-\\-)[a-zA-Z0-9_-][\\w-]*(?=\\s*)", - "name": "variable.other.less" + } }, { "include": "#variable_interpolation" @@ -516,7 +511,7 @@ "include": "#strings" }, { - "match": "(\\b|\\.{0,2}/).*\\b", + "match": "(\\b|\\.{0,2}/)[^)]*\\b", "name": "string.url.css" } ] @@ -546,5 +541,5 @@ "name": "support.function.any-method.builtin.less" } }, - "version": "https://github.com/atom/language-less/commit/7d70b66aa9c853d59e27cce25b5bc25cb067e75a" + "version": "https://github.com/atom/language-less/commit/4661d870784f725599e438bf683553cc6cf0f4ed" } \ No newline at end of file diff --git a/extensions/less/test/colorize-results/14119_less.json b/extensions/less/test/colorize-results/14119_less.json index 6e89b6a45872e..0c83af453319a 100644 --- a/extensions/less/test/colorize-results/14119_less.json +++ b/extensions/less/test/colorize-results/14119_less.json @@ -33,7 +33,18 @@ } }, { - "c": "@hm", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "hm", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", diff --git a/extensions/less/test/colorize-results/test-cssvariables_less.json b/extensions/less/test/colorize-results/test-cssvariables_less.json index bca9cd3c3a90c..1c9b8658a0adf 100644 --- a/extensions/less/test/colorize-results/test-cssvariables_less.json +++ b/extensions/less/test/colorize-results/test-cssvariables_less.json @@ -55,7 +55,18 @@ } }, { - "c": "--spacing-unit", + "c": "--", + "t": "source.css.less meta.property-list.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "spacing-unit", "t": "source.css.less meta.property-list.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -100,7 +111,7 @@ }, { "c": "px", - "t": "source.css.less meta.property-list.css meta.property-value.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-value.css constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -132,7 +143,18 @@ } }, { - "c": "--cell-padding", + "c": "--", + "t": "source.css.less meta.property-list.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "cell-padding", "t": "source.css.less meta.property-list.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", diff --git a/extensions/less/test/colorize-results/test_less.json b/extensions/less/test/colorize-results/test_less.json index 4cc4722023879..d6b39257feb6b 100644 --- a/extensions/less/test/colorize-results/test_less.json +++ b/extensions/less/test/colorize-results/test_less.json @@ -308,7 +308,18 @@ } }, { - "c": "@base", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "base", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -385,7 +396,18 @@ } }, { - "c": "@style", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "style", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -418,7 +440,18 @@ } }, { - "c": "@c", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "c", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -506,7 +539,18 @@ } }, { - "c": "@c", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "c", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -594,7 +638,18 @@ } }, { - "c": "@style", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "style", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -616,7 +671,18 @@ } }, { - "c": "@c", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "c", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -671,7 +737,18 @@ } }, { - "c": "@style", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "style", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -704,7 +781,18 @@ } }, { - "c": "@alpha", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "alpha", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -749,7 +837,7 @@ }, { "c": "%", - "t": "source.css.less keyword.other.unit.css", + "t": "source.css.less constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -836,7 +924,18 @@ } }, { - "c": "@alpha", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "alpha", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -913,7 +1012,18 @@ } }, { - "c": "@style", + "c": "@", + "t": "source.css.less meta.property-list.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "style", "t": "source.css.less meta.property-list.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -1232,7 +1342,18 @@ } }, { - "c": "@base", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "base", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -1277,7 +1398,7 @@ }, { "c": "%", - "t": "source.css.less meta.property-list.css meta.property-value.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-value.css constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1375,7 +1496,18 @@ } }, { - "c": "@base", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "base", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -1420,7 +1552,7 @@ }, { "c": "%", - "t": "source.css.less meta.property-list.css meta.property-value.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-value.css constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1585,7 +1717,7 @@ }, { "c": "px", - "t": "source.css.less meta.property-list.css meta.property-list.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-list.css constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1640,7 +1772,7 @@ }, { "c": "%", - "t": "source.css.less meta.property-list.css meta.property-list.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-list.css constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -1849,7 +1981,7 @@ }, { "c": "px", - "t": "source.css.less meta.property-list.css meta.property-list.css meta.property-value.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-list.css meta.property-value.css constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -2058,7 +2190,7 @@ }, { "c": "px", - "t": "source.css.less meta.property-list.css meta.property-list.css meta.property-value.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-list.css meta.property-value.css constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -2311,7 +2443,7 @@ }, { "c": "px", - "t": "source.css.less meta.property-list.css meta.property-list.css meta.property-list.css meta.property-list.css meta.property-value.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-list.css meta.property-list.css meta.property-list.css meta.property-value.css constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -2398,7 +2530,18 @@ } }, { - "c": "@the-border", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "the-border", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -2443,7 +2586,7 @@ }, { "c": "px", - "t": "source.css.less keyword.other.unit.css", + "t": "source.css.less constant.numeric.css keyword.other.unit.px.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", @@ -2464,7 +2607,18 @@ } }, { - "c": "@base-color", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "base-color", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -2519,7 +2673,18 @@ } }, { - "c": "@red", + "c": "@", + "t": "source.css.less variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "red", "t": "source.css.less variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -2673,7 +2838,18 @@ } }, { - "c": "@base-color", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "base-color", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -2794,7 +2970,18 @@ } }, { - "c": "@the-border", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "the-border", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -2871,7 +3058,18 @@ } }, { - "c": "@the-border", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "the-border", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -3058,7 +3256,18 @@ } }, { - "c": "@base-color", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "base-color", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -3201,7 +3410,18 @@ } }, { - "c": "@red", + "c": "@", + "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less punctuation.definition.variable.less", + "r": { + "dark_plus": "variable.other.less: #9CDCFE", + "light_plus": "variable.other.less: #FF0000", + "dark_vs": "variable.other.less: #9CDCFE", + "light_vs": "variable.other.less: #FF0000", + "hc_black": "variable.other.less: #D4D4D4" + } + }, + { + "c": "red", "t": "source.css.less meta.property-list.css meta.property-value.css variable.other.less", "r": { "dark_plus": "variable.other.less: #9CDCFE", @@ -3246,7 +3466,7 @@ }, { "c": "%", - "t": "source.css.less meta.property-list.css meta.property-value.css keyword.other.unit.css", + "t": "source.css.less meta.property-list.css meta.property-value.css constant.numeric.css keyword.other.unit.percentage.css", "r": { "dark_plus": "keyword.other.unit: #B5CEA8", "light_plus": "keyword.other.unit: #09885A", From a90342f431ec777932e5ea9665da3a8efc47c055 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 11:29:12 +0200 Subject: [PATCH 1160/2747] [php] update grammar --- extensions/php/syntaxes/php.tmLanguage.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/php/syntaxes/php.tmLanguage.json b/extensions/php/syntaxes/php.tmLanguage.json index d7e3a548ade64..8e69579120b01 100644 --- a/extensions/php/syntaxes/php.tmLanguage.json +++ b/extensions/php/syntaxes/php.tmLanguage.json @@ -2071,7 +2071,7 @@ "patterns": [ { "comment": "PHPDocumentor only recognises lines with an asterisk as the first non-whitespaces character", - "match": "^(?!\\s*\\*).*$\\n?", + "match": "^(?!\\s*\\*).*?(?:(?=\\*\\/)|$\\n?)", "name": "invalid.illegal.missing-asterisk.phpdoc.php" }, { @@ -2975,5 +2975,5 @@ ] } }, - "version": "https://github.com/atom/language-php/commit/22047c19f52f686de471d0deccae0cb1332997b6" + "version": "https://github.com/atom/language-php/commit/c523a19f849b97f6499eae6accf80564aa190c0e" } \ No newline at end of file From f9084bb2446eb5c42289dd64d4b3b6f92c4d9228 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 12:26:41 +0200 Subject: [PATCH 1161/2747] Add information_for_contributors to grammars --- build/npm/update-all-grammars.js | 1 - build/npm/update-grammar.js | 16 ++++++++++++++-- .../clojure/syntaxes/clojure.tmLanguage.json | 8 ++++++-- .../syntaxes/coffeescript.tmLanguage.json | 8 ++++++-- extensions/cpp/syntaxes/c++.json | 8 ++++++-- extensions/cpp/syntaxes/c.json | 8 ++++++-- .../csharp/syntaxes/csharp.tmLanguage.json | 8 ++++++-- extensions/css/syntaxes/css.tmLanguage.json | 8 ++++++-- extensions/diff/syntaxes/diff.tmLanguage.json | 8 ++++++-- .../docker/syntaxes/docker.tmLanguage.json | 8 ++++++-- extensions/fsharp/syntaxes/fsharp.json | 8 ++++++-- .../syntaxes/git-commit.tmLanguage.json | 8 ++++++-- .../syntaxes/git-rebase.tmLanguage.json | 8 ++++++-- extensions/go/syntaxes/go.json | 8 ++++++-- .../groovy/syntaxes/groovy.tmLanguage.json | 8 ++++++-- .../syntaxes/Handlebars.tmLanguage.json | 8 ++++++-- extensions/hlsl/syntaxes/hlsl.json | 8 ++++++-- extensions/html/syntaxes/html.json | 8 ++++++-- extensions/ini/syntaxes/ini.tmLanguage.json | 8 ++++++-- extensions/java/syntaxes/java.tmLanguage.json | 8 ++++++-- .../syntaxes/JavaScript.tmLanguage.json | 8 ++++++-- extensions/less/syntaxes/less.tmLanguage.json | 8 ++++++-- extensions/lua/syntaxes/lua.json | 8 ++++++-- extensions/make/syntaxes/Makefile.json | 8 ++++++-- .../syntaxes/objective-c++.tmLanguage.json | 5 +++++ .../syntaxes/objective-c.tmLanguage.json | 8 ++++++-- extensions/perl/syntaxes/perl.tmLanguage.json | 8 ++++++-- extensions/perl/syntaxes/perl6.tmLanguage.json | 8 ++++++-- extensions/php/syntaxes/php.tmLanguage.json | 8 ++++++-- extensions/pug/syntaxes/pug.tmLanguage.json | 8 ++++++-- .../python/syntaxes/MagicPython.tmLanguage.json | 8 ++++++-- .../python/syntaxes/MagicRegExp.tmLanguage.json | 8 ++++++-- extensions/r/syntaxes/r.tmLanguage.json | 8 ++++++-- extensions/razor/syntaxes/cshtml.json | 8 ++++++-- extensions/ruby/syntaxes/ruby.tmLanguage.json | 8 ++++++-- extensions/rust/syntaxes/rust.tmLanguage.json | 8 ++++++-- extensions/scss/syntaxes/scss.json | 8 ++++++-- extensions/shaderlab/syntaxes/shaderlab.json | 8 ++++++-- .../syntaxes/Shell-Unix-Bash.tmLanguage.json | 8 ++++++-- extensions/swift/syntaxes/swift.tmLanguage.json | 8 ++++++-- .../syntaxes/TypeScript.tmLanguage.json | 8 ++++++-- .../syntaxes/TypeScriptReact.tmLanguage.json | 8 ++++++-- .../vb/syntaxes/asp-vb-net.tmlanguage.json | 8 ++++++-- extensions/xml/syntaxes/xml.json | 8 ++++++-- extensions/xml/syntaxes/xsl.json | 8 ++++++-- extensions/yaml/syntaxes/yaml.json | 8 ++++++-- 46 files changed, 277 insertions(+), 89 deletions(-) diff --git a/build/npm/update-all-grammars.js b/build/npm/update-all-grammars.js index 252b0f4edcb8b..88b890af730c1 100644 --- a/build/npm/update-all-grammars.js +++ b/build/npm/update-all-grammars.js @@ -5,7 +5,6 @@ const cp = require('child_process'); const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm'; -const integrationTests = process.platform === 'win32' ? '.\test-integration.bat' : './test-integration.sh'; function updateGrammar(location) { const result = cp.spawnSync(npm, ['run', 'update-grammar'], { diff --git a/build/npm/update-grammar.js b/build/npm/update-grammar.js index dbb12cdcb445e..fca60d83242dc 100644 --- a/build/npm/update-grammar.js +++ b/build/npm/update-grammar.js @@ -88,11 +88,23 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar) { modifyGrammar(grammar); } return getCommitSha(repoId, repoPath).then(function (info) { + let result = { + information_for_contributors: [ + 'This file has been converted from https://github.com/' + repoId + '/blob/master/' + repoPath, + 'If you want to provide a fix or improvement, please create a pull request against the original repository.', + 'Once accepted there, we are happy to receive an update request.' + ] + }; + if (info) { - grammar.version = 'https://github.com/' + repoId + '/commit/' + info.commitSha; + result.version = 'https://github.com/' + repoId + '/commit/' + info.commitSha; + } + for (let key in grammar) { + result[key] = grammar[key]; } + try { - fs.writeFileSync(dest, JSON.stringify(grammar, null, '\t')); + fs.writeFileSync(dest, JSON.stringify(result, null, '\t')); if (info) { console.log('Updated ' + path.basename(dest) + ' to ' + repoId + '@' + info.commitSha.substr(0, 7) + ' (' + info.commitDate.substr(0, 10) + ')'); } else { diff --git a/extensions/clojure/syntaxes/clojure.tmLanguage.json b/extensions/clojure/syntaxes/clojure.tmLanguage.json index 881ce191e1c6a..437a0c5b5e198 100644 --- a/extensions/clojure/syntaxes/clojure.tmLanguage.json +++ b/extensions/clojure/syntaxes/clojure.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-clojure/blob/master/grammars/clojure.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.clojure", "fileTypes": [ "boot", @@ -440,6 +445,5 @@ } ] } - }, - "version": "https://github.com/atom/language-clojure/commit/70e83b27444da31d6367a0aa447a216836eafc05" + } } \ No newline at end of file diff --git a/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json b/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json index d7c22867d7667..dae1d795f4522 100644 --- a/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json +++ b/extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-coffee-script/blob/master/grammars/coffeescript.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.coffee", "name": "CoffeeScript", "fileTypes": [ @@ -686,6 +691,5 @@ } ] } - }, - "version": "https://github.com/atom/language-coffee-script/commit/49c117b24096a369f92dfce180b61bd1f0425a29" + } } \ No newline at end of file diff --git a/extensions/cpp/syntaxes/c++.json b/extensions/cpp/syntaxes/c++.json index 7ec3054f58ba1..bc627e3a036f3 100644 --- a/extensions/cpp/syntaxes/c++.json +++ b/extensions/cpp/syntaxes/c++.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-c/blob/master/grammars/c%2B%2B.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.cpp", "fileTypes": [ "cc", @@ -457,6 +462,5 @@ } ] } - }, - "version": "https://github.com/atom/language-c/commit/3a269f88b12e512fb9495dc006a1dabf325d3d7f" + } } \ No newline at end of file diff --git a/extensions/cpp/syntaxes/c.json b/extensions/cpp/syntaxes/c.json index 6cc84cff24df3..022f588cf28d9 100644 --- a/extensions/cpp/syntaxes/c.json +++ b/extensions/cpp/syntaxes/c.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-c/blob/master/grammars/c.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.c", "fileTypes": [ "c", @@ -1950,6 +1955,5 @@ } ] } - }, - "version": "https://github.com/atom/language-c/commit/1d137279178d06e7f7500800ebc36155e130172e" + } } \ No newline at end of file diff --git a/extensions/csharp/syntaxes/csharp.tmLanguage.json b/extensions/csharp/syntaxes/csharp.tmLanguage.json index eae75041576df..3f81563c5bb92 100644 --- a/extensions/csharp/syntaxes/csharp.tmLanguage.json +++ b/extensions/csharp/syntaxes/csharp.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/dotnet/csharp-tmLanguage/blob/master/grammars/csharp.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "name": "C#", "scopeName": "source.cs", "fileTypes": [ @@ -4186,6 +4191,5 @@ } } } - }, - "version": "https://github.com/dotnet/csharp-tmLanguage/commit/4d0e50c51f336645c98689737db1be321d212d3d" + } } \ No newline at end of file diff --git a/extensions/css/syntaxes/css.tmLanguage.json b/extensions/css/syntaxes/css.tmLanguage.json index 700b6dd314068..dae4475161aea 100644 --- a/extensions/css/syntaxes/css.tmLanguage.json +++ b/extensions/css/syntaxes/css.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-css/blob/master/grammars/css.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.css", "name": "CSS", "fileTypes": [ @@ -1796,6 +1801,5 @@ } ] } - }, - "version": "https://github.com/atom/language-css/commit/23dcdee3372050eb3f07374fbe9188884bd545d1" + } } \ No newline at end of file diff --git a/extensions/diff/syntaxes/diff.tmLanguage.json b/extensions/diff/syntaxes/diff.tmLanguage.json index ac16f416a6495..e259c46be42cb 100644 --- a/extensions/diff/syntaxes/diff.tmLanguage.json +++ b/extensions/diff/syntaxes/diff.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/diff.tmbundle/blob/master/Syntaxes/Diff.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "patch", "diff", @@ -158,6 +163,5 @@ } ], "scopeName": "source.diff", - "uuid": "7E848FF4-708E-11D9-97B4-0011242E4184", - "version": "https://github.com/textmate/diff.tmbundle/commit/0593bb775eab1824af97ef2172fd38822abd97d7" + "uuid": "7E848FF4-708E-11D9-97B4-0011242E4184" } \ No newline at end of file diff --git a/extensions/docker/syntaxes/docker.tmLanguage.json b/extensions/docker/syntaxes/docker.tmLanguage.json index 8be1c94055d3e..d8c2d0fd76666 100644 --- a/extensions/docker/syntaxes/docker.tmLanguage.json +++ b/extensions/docker/syntaxes/docker.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/moby/moby/blob/master/contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "Dockerfile" ], @@ -96,6 +101,5 @@ } ], "scopeName": "source.dockerfile", - "uuid": "a39d8795-59d2-49af-aa00-fe74ee29576e", - "version": "https://github.com/moby/moby/commit/8523e9d108a0e98865673701a7bd0a7929c5260b" + "uuid": "a39d8795-59d2-49af-aa00-fe74ee29576e" } \ No newline at end of file diff --git a/extensions/fsharp/syntaxes/fsharp.json b/extensions/fsharp/syntaxes/fsharp.json index 7ef61094dd103..f7abe7e8a5251 100644 --- a/extensions/fsharp/syntaxes/fsharp.json +++ b/extensions/fsharp/syntaxes/fsharp.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/ionide/ionide-fsgrammar/blob/master/grammar/fsharp.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "name": "fsharp", "scopeName": "source.fsharp", "fileTypes": [ @@ -456,6 +461,5 @@ } ] } - }, - "version": "https://github.com/ionide/ionide-fsgrammar/commit/f2e3c30f0ebfcc89fb78ad908701159f20516812" + } } \ No newline at end of file diff --git a/extensions/gitsyntax/syntaxes/git-commit.tmLanguage.json b/extensions/gitsyntax/syntaxes/git-commit.tmLanguage.json index 5f5db8762fa29..ffe1561f7271b 100644 --- a/extensions/gitsyntax/syntaxes/git-commit.tmLanguage.json +++ b/extensions/gitsyntax/syntaxes/git-commit.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/git.tmbundle/blob/master/Syntaxes/Git%20Commit%20Message.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "COMMIT_EDITMSG", "MERGE_MSG" @@ -138,6 +143,5 @@ } }, "scopeName": "text.git-commit", - "uuid": "BFE83C06-8508-44BE-A975-95A57BF619A7", - "version": "https://github.com/textmate/git.tmbundle/commit/93897a78c6e52bef13dadc0d4091d203c5facb40" + "uuid": "BFE83C06-8508-44BE-A975-95A57BF619A7" } \ No newline at end of file diff --git a/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage.json b/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage.json index c8bf731d9cb2a..15bac0d8d0932 100644 --- a/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage.json +++ b/extensions/gitsyntax/syntaxes/git-rebase.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/git.tmbundle/blob/master/Syntaxes/Git%20Rebase%20Message.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "git-rebase-todo" ], @@ -30,6 +35,5 @@ } ], "scopeName": "text.git-rebase", - "uuid": "7F1CC209-5F6D-486A-8180-09FA282381A1", - "version": "https://github.com/textmate/git.tmbundle/commit/d1db42c2d71948662098183a6df519fb53a7a15b" + "uuid": "7F1CC209-5F6D-486A-8180-09FA282381A1" } \ No newline at end of file diff --git a/extensions/go/syntaxes/go.json b/extensions/go/syntaxes/go.json index 53908a80bac86..098c8710482c7 100644 --- a/extensions/go/syntaxes/go.json +++ b/extensions/go/syntaxes/go.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-go/blob/master/grammars/go.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.go", "name": "Go", "comment": "Go language", @@ -624,6 +629,5 @@ } ] } - }, - "version": "https://github.com/atom/language-go/commit/c1fe618ccf2dcd17118c5600c49b1c539f26d5c5" + } } \ No newline at end of file diff --git a/extensions/groovy/syntaxes/groovy.tmLanguage.json b/extensions/groovy/syntaxes/groovy.tmLanguage.json index 8850454840eb4..3dc8af7d0a168 100644 --- a/extensions/groovy/syntaxes/groovy.tmLanguage.json +++ b/extensions/groovy/syntaxes/groovy.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/groovy.tmbundle/blob/master/Syntaxes/Groovy.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "groovy", "gvy" @@ -1381,6 +1386,5 @@ } }, "scopeName": "source.groovy", - "uuid": "B3A64888-EBBB-4436-8D9E-F1169C5D7613", - "version": "https://github.com/textmate/groovy.tmbundle/commit/85d8f7c97ae473ccb9473f6c8d27e4ec957f4be1" + "uuid": "B3A64888-EBBB-4436-8D9E-F1169C5D7613" } \ No newline at end of file diff --git a/extensions/handlebars/syntaxes/Handlebars.tmLanguage.json b/extensions/handlebars/syntaxes/Handlebars.tmLanguage.json index 9e3579d90c283..e915b691d7faa 100644 --- a/extensions/handlebars/syntaxes/Handlebars.tmLanguage.json +++ b/extensions/handlebars/syntaxes/Handlebars.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/daaain/Handlebars/blob/master/grammars/Handlebars.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "name": "Handlebars", "repository": { "html_tags": { @@ -849,6 +854,5 @@ "template", "tmpl" ], - "uuid": "70E91676-DE0A-4266-A2B9-3AD2E535E484", - "version": "https://github.com/daaain/Handlebars/commit/4e8244410815da73f93375532939d48bd5a9bb93" + "uuid": "70E91676-DE0A-4266-A2B9-3AD2E535E484" } \ No newline at end of file diff --git a/extensions/hlsl/syntaxes/hlsl.json b/extensions/hlsl/syntaxes/hlsl.json index 91dcf2b252026..20565922c5383 100644 --- a/extensions/hlsl/syntaxes/hlsl.json +++ b/extensions/hlsl/syntaxes/hlsl.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/tgjones/shaders-tmLanguage/blob/master/grammars/hlsl.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.hlsl", "name": "HLSL", "fileTypes": [ @@ -213,6 +218,5 @@ } ] } - ], - "version": "https://github.com/tgjones/shaders-tmLanguage/commit/cd1ef40f549f9ce2b9e6b73498688de114a85382" + ] } \ No newline at end of file diff --git a/extensions/html/syntaxes/html.json b/extensions/html/syntaxes/html.json index cc2d9fd17ea60..4192c82470395 100644 --- a/extensions/html/syntaxes/html.json +++ b/extensions/html/syntaxes/html.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/html.tmbundle/blob/master/Syntaxes/HTML.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "html", "htm", @@ -742,6 +747,5 @@ } }, "scopeName": "text.html.basic", - "uuid": "17994EC8-6B1D-11D9-AC3A-000D93589AF6", - "version": "https://github.com/textmate/html.tmbundle/commit/a723f08ebd49c67c22aca08dd8f17d0bf836ec93" + "uuid": "17994EC8-6B1D-11D9-AC3A-000D93589AF6" } \ No newline at end of file diff --git a/extensions/ini/syntaxes/ini.tmLanguage.json b/extensions/ini/syntaxes/ini.tmLanguage.json index e8f1a0ef9b330..34679c1bee09c 100644 --- a/extensions/ini/syntaxes/ini.tmLanguage.json +++ b/extensions/ini/syntaxes/ini.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/ini.tmbundle/blob/master/Syntaxes/Ini.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "ini", "conf" @@ -109,6 +114,5 @@ } ], "scopeName": "source.ini", - "uuid": "77DC23B6-8A90-11D9-BAA4-000A9584EC8C", - "version": "https://github.com/textmate/ini.tmbundle/commit/2af0cbb0704940f967152616f2f1ff0aae6287a6" + "uuid": "77DC23B6-8A90-11D9-BAA4-000A9584EC8C" } \ No newline at end of file diff --git a/extensions/java/syntaxes/java.tmLanguage.json b/extensions/java/syntaxes/java.tmLanguage.json index 5d0513d49b0f1..654bf8e2ba8fc 100644 --- a/extensions/java/syntaxes/java.tmLanguage.json +++ b/extensions/java/syntaxes/java.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-java/blob/master/grammars/java.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.java", "name": "Java", "fileTypes": [ @@ -1360,6 +1365,5 @@ } ] } - }, - "version": "https://github.com/atom/language-java/commit/0e0ec7966059e3e363868311b3d855014bca95dd" + } } \ No newline at end of file diff --git a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json index d7aabe6479b4f..8856e46770c60 100644 --- a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json +++ b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/Microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "name": "JavaScript (with React support)", "scopeName": "source.js", "fileTypes": [ @@ -4222,6 +4227,5 @@ } ] } - }, - "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/8c967fe7553297bfad672b7417d78e357c8fe724" + } } \ No newline at end of file diff --git a/extensions/less/syntaxes/less.tmLanguage.json b/extensions/less/syntaxes/less.tmLanguage.json index cd25b2a89b513..cd1543fd7d3eb 100644 --- a/extensions/less/syntaxes/less.tmLanguage.json +++ b/extensions/less/syntaxes/less.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-less/blob/master/grammars/less.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "name": "Less", "scopeName": "source.css.less", "fileTypes": [ @@ -540,6 +545,5 @@ "match": "\\b(abs|acos|alpha|argb|asin|atan|average|blue|calc|ceil|color|contrast|convert|convert|cos|darken|data-uri|desaturate|difference|e|escape|exclusion|extract|fade|fadein|fadeout|floor|format|green|greyscale|hardlight|hsl|hsla|hsv|hsva|hsvhue|hsvsaturation|hsvvalue|hue|length|lighten|lightness|luma|max|min|mix|mod|multiply|negation|overlay|percentage|pi|pow|red|replace|round|saturate|saturation|screen|sin|softlight|spin|sqrt|tan|unit)\\b", "name": "support.function.any-method.builtin.less" } - }, - "version": "https://github.com/atom/language-less/commit/4661d870784f725599e438bf683553cc6cf0f4ed" + } } \ No newline at end of file diff --git a/extensions/lua/syntaxes/lua.json b/extensions/lua/syntaxes/lua.json index a4da3a43c6a1f..efea9819bdee4 100644 --- a/extensions/lua/syntaxes/lua.json +++ b/extensions/lua/syntaxes/lua.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/lua.tmbundle/blob/master/Syntaxes/Lua.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "comment": "Lua Syntax: version 0.8", "fileTypes": [ "lua", @@ -275,6 +280,5 @@ } }, "scopeName": "source.lua", - "uuid": "93E017CC-6F27-11D9-90EB-000D93589AF7", - "version": "https://github.com/textmate/lua.tmbundle/commit/3a97f1b46804a3de99d4d2909e14450299462f2d" + "uuid": "93E017CC-6F27-11D9-90EB-000D93589AF7" } \ No newline at end of file diff --git a/extensions/make/syntaxes/Makefile.json b/extensions/make/syntaxes/Makefile.json index 2264321c9c837..1562efc5c1768 100644 --- a/extensions/make/syntaxes/Makefile.json +++ b/extensions/make/syntaxes/Makefile.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/make.tmbundle/blob/master/Syntaxes/Makefile.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "Makefile", "makefile", @@ -470,6 +475,5 @@ } }, "scopeName": "source.makefile", - "uuid": "FF1825E8-6B1C-11D9-B883-000D93589AF6", - "version": "https://github.com/textmate/make.tmbundle/commit/1a1827da81e20fdce56e2658451340c070ca44b7" + "uuid": "FF1825E8-6B1C-11D9-B883-000D93589AF6" } \ No newline at end of file diff --git a/extensions/objective-c/syntaxes/objective-c++.tmLanguage.json b/extensions/objective-c/syntaxes/objective-c++.tmLanguage.json index 26550c61e1b18..2b46507a2fba2 100644 --- a/extensions/objective-c/syntaxes/objective-c++.tmLanguage.json +++ b/extensions/objective-c/syntaxes/objective-c++.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-objective-c/blob/master/grammars/objective-c++.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.objcpp", "fileTypes": [ "mm", diff --git a/extensions/objective-c/syntaxes/objective-c.tmLanguage.json b/extensions/objective-c/syntaxes/objective-c.tmLanguage.json index 2037028b0c34c..a07e0ba7f437a 100644 --- a/extensions/objective-c/syntaxes/objective-c.tmLanguage.json +++ b/extensions/objective-c/syntaxes/objective-c.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-objective-c/blob/master/grammars/objective-c.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "source.objc", "fileTypes": [ "m", @@ -993,6 +998,5 @@ } ] } - }, - "version": "https://github.com/atom/language-objective-c/commit/0727e04544f3414c1c339cf15a39a05ea3938cb4" + } } \ No newline at end of file diff --git a/extensions/perl/syntaxes/perl.tmLanguage.json b/extensions/perl/syntaxes/perl.tmLanguage.json index 612c4796cbe7c..4c4209c317b0a 100644 --- a/extensions/perl/syntaxes/perl.tmLanguage.json +++ b/extensions/perl/syntaxes/perl.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/perl.tmbundle/blob/master/Syntaxes/Perl.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "comment": "\n\tTODO:\tInclude RegExp syntax\n", "fileTypes": [ "pl", @@ -2541,6 +2546,5 @@ } }, "scopeName": "source.perl", - "uuid": "EDBFE125-6B1C-11D9-9189-000D93589AF6", - "version": "https://github.com/textmate/perl.tmbundle/commit/c0b7a4bd65882380522d82a60b536479a62b07c3" + "uuid": "EDBFE125-6B1C-11D9-9189-000D93589AF6" } \ No newline at end of file diff --git a/extensions/perl/syntaxes/perl6.tmLanguage.json b/extensions/perl/syntaxes/perl6.tmLanguage.json index a3024a11ae78e..9ddfdf4250901 100644 --- a/extensions/perl/syntaxes/perl6.tmLanguage.json +++ b/extensions/perl/syntaxes/perl6.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/perl.tmbundle/blob/master/Syntaxes/Perl%206.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "p6", "pl6", @@ -314,6 +319,5 @@ } }, "scopeName": "source.perl.6", - "uuid": "E685440C-0E20-4424-9693-864D5240A269", - "version": "https://github.com/textmate/perl.tmbundle/commit/d9841a0878239fa43f88c640f8d458590f97e8f5" + "uuid": "E685440C-0E20-4424-9693-864D5240A269" } \ No newline at end of file diff --git a/extensions/php/syntaxes/php.tmLanguage.json b/extensions/php/syntaxes/php.tmLanguage.json index 8e69579120b01..b815d80e0720e 100644 --- a/extensions/php/syntaxes/php.tmLanguage.json +++ b/extensions/php/syntaxes/php.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-php/blob/master/grammars/php.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "text.html.php", "name": "PHP", "fileTypes": [ @@ -2974,6 +2979,5 @@ } ] } - }, - "version": "https://github.com/atom/language-php/commit/c523a19f849b97f6499eae6accf80564aa190c0e" + } } \ No newline at end of file diff --git a/extensions/pug/syntaxes/pug.tmLanguage.json b/extensions/pug/syntaxes/pug.tmLanguage.json index 808be9e6db8c2..8a3d17a81dc2c 100644 --- a/extensions/pug/syntaxes/pug.tmLanguage.json +++ b/extensions/pug/syntaxes/pug.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/davidrios/jade-tmbundle/blob/master/Syntaxes/Jade.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "jade" ], @@ -981,6 +986,5 @@ } }, "scopeName": "text.jade", - "uuid": "eee6ba25-6ac2-4f7e-9c70-cddf2bd3448b", - "version": "https://github.com/davidrios/jade-tmbundle/commit/f311a516bb29296fcebfdc7da8149b1c79dfb0a1" + "uuid": "eee6ba25-6ac2-4f7e-9c70-cddf2bd3448b" } \ No newline at end of file diff --git a/extensions/python/syntaxes/MagicPython.tmLanguage.json b/extensions/python/syntaxes/MagicPython.tmLanguage.json index f9d673e627361..29e51b920fac4 100644 --- a/extensions/python/syntaxes/MagicPython.tmLanguage.json +++ b/extensions/python/syntaxes/MagicPython.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/MagicStack/MagicPython/blob/master/grammars/MagicPython.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "name": "MagicPython", "scopeName": "source.python", "fileTypes": [ @@ -5230,6 +5235,5 @@ } ] } - }, - "version": "https://github.com/MagicStack/MagicPython/commit/976e59dcb78cb577e79c8f2117216c06718337e0" + } } \ No newline at end of file diff --git a/extensions/python/syntaxes/MagicRegExp.tmLanguage.json b/extensions/python/syntaxes/MagicRegExp.tmLanguage.json index b5795a7b89f3d..34d1a973578a4 100644 --- a/extensions/python/syntaxes/MagicRegExp.tmLanguage.json +++ b/extensions/python/syntaxes/MagicRegExp.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/MagicStack/MagicPython/blob/master/grammars/MagicRegExp.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "name": "MagicRegExp", "scopeName": "source.regexp.python", "fileTypes": [ @@ -460,6 +465,5 @@ } ] } - }, - "version": "https://github.com/MagicStack/MagicPython/commit/df5bb18c64252f2e7b1aa87e2ed124666d314f1d" + } } \ No newline at end of file diff --git a/extensions/r/syntaxes/r.tmLanguage.json b/extensions/r/syntaxes/r.tmLanguage.json index 829be8d0d2b15..025877c7ab4e1 100644 --- a/extensions/r/syntaxes/r.tmLanguage.json +++ b/extensions/r/syntaxes/r.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/r.tmbundle/blob/master/Syntaxes/R.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "R", "r", @@ -199,6 +204,5 @@ } ], "scopeName": "source.r", - "uuid": "B2E6B78D-6E70-11D9-A369-000D93B3A10E", - "version": "https://github.com/textmate/r.tmbundle/commit/6b04ff3424f3f1cdfe64a9cfb71d8765959be250" + "uuid": "B2E6B78D-6E70-11D9-A369-000D93B3A10E" } \ No newline at end of file diff --git a/extensions/razor/syntaxes/cshtml.json b/extensions/razor/syntaxes/cshtml.json index 402915e8c9fc0..180ad0e68dd23 100644 --- a/extensions/razor/syntaxes/cshtml.json +++ b/extensions/razor/syntaxes/cshtml.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/demyte/language-cshtml/blob/master/grammars/cshtml.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "name": "ASP.NET Razor", "scopeName": "text.html.cshtml", "fileTypes": [ @@ -148,6 +153,5 @@ "end": "\\*@", "name": "comment.block.cshtml" } - }, - "version": "https://github.com/demyte/language-cshtml/commit/a49735dc7aef56ae772a3bcfd8e42c89895dcff4" + } } \ No newline at end of file diff --git a/extensions/ruby/syntaxes/ruby.tmLanguage.json b/extensions/ruby/syntaxes/ruby.tmLanguage.json index dce58f758b1cf..a6e0c01b7b9fa 100644 --- a/extensions/ruby/syntaxes/ruby.tmLanguage.json +++ b/extensions/ruby/syntaxes/ruby.tmLanguage.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/ruby.tmbundle/blob/master/Syntaxes/Ruby.plist", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "comment": "\n\tTODO: unresolved issues\n\n\ttext:\n\t\"p <", "name": "comment.block.xml" } - }, - "version": "https://github.com/atom/language-xml/commit/ac6bc8ef6a9c79ac3c7e31615bc18436b0c815ab" + } } \ No newline at end of file diff --git a/extensions/xml/syntaxes/xsl.json b/extensions/xml/syntaxes/xsl.json index 8b715b599f94e..2193c1a9570ab 100644 --- a/extensions/xml/syntaxes/xsl.json +++ b/extensions/xml/syntaxes/xsl.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/atom/language-xml/blob/master/grammars/xsl.cson", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "scopeName": "text.xml.xsl", "name": "XSL", "fileTypes": [ @@ -88,6 +93,5 @@ }, "name": "string.quoted.single.xml" } - }, - "version": "https://github.com/atom/language-xml/commit/507de2ee7daca60cf02e9e21fbeb92bbae73e280" + } } \ No newline at end of file diff --git a/extensions/yaml/syntaxes/yaml.json b/extensions/yaml/syntaxes/yaml.json index 55939b86d8d9a..82cd7d840dbee 100644 --- a/extensions/yaml/syntaxes/yaml.json +++ b/extensions/yaml/syntaxes/yaml.json @@ -1,4 +1,9 @@ { + "information_for_contributors": [ + "This file has been converted from https://github.com/textmate/yaml.tmbundle/blob/master/Syntaxes/YAML.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], "fileTypes": [ "yaml", "yml", @@ -624,6 +629,5 @@ } }, "scopeName": "source.yaml", - "uuid": "686AD6AE-33F3-4493-9512-9E9FC1D5417F", - "version": "https://github.com/textmate/yaml.tmbundle/commit/efc96efafe5e48480cf55a2ed124b388cbea4440" + "uuid": "686AD6AE-33F3-4493-9512-9E9FC1D5417F" } \ No newline at end of file From fa35c9a9424d5417f67db142274ea7b20c0944bf Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 13:03:01 +0200 Subject: [PATCH 1162/2747] Possible bugs around non-invoking usage of `isEmpty`. Fixes #27201 --- src/vs/editor/contrib/folding/browser/folding.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/contrib/folding/browser/folding.ts b/src/vs/editor/contrib/folding/browser/folding.ts index 9f644ccd761bd..74df9c51570ff 100644 --- a/src/vs/editor/contrib/folding/browser/folding.ts +++ b/src/vs/editor/contrib/folding/browser/folding.ts @@ -287,7 +287,7 @@ export class FoldingController implements IFoldingController { return; } let range = e.target.range; - if (!range || !range.isEmpty) { + if (!range) { return; } if (!e.event.leftButton) { @@ -303,7 +303,7 @@ export class FoldingController implements IFoldingController { break; case MouseTargetType.CONTENT_EMPTY: case MouseTargetType.CONTENT_TEXT: - if (range.isEmpty && range.startColumn === model.getLineMaxColumn(range.startLineNumber)) { + if (range.startColumn === model.getLineMaxColumn(range.startLineNumber)) { break; } return; @@ -322,7 +322,7 @@ export class FoldingController implements IFoldingController { let iconClicked = this.mouseDownInfo.iconClicked; let range = e.target.range; - if (!range || !range.isEmpty || range.startLineNumber !== lineNumber) { + if (!range || range.startLineNumber !== lineNumber) { return; } From 656bde928aabfec81fea9ae735d5dde13eaa59c5 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Thu, 25 May 2017 07:03:56 -0700 Subject: [PATCH 1163/2747] Fix failing ripgrep test --- .../services/search/test/node/ripgrepTextSearch.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts b/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts index 2f377d82d27be..1ee3f9a6a835a 100644 --- a/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts +++ b/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts @@ -70,7 +70,7 @@ suite('RipgrepParser', () => { assert.deepEqual(results[0], { numMatches: 2, - path: path.join(rootFolder, 'a.txt'), + path: path.resolve(rootFolder, 'a.txt'), lineMatches: [ { lineNumber: 0, From 8fcb57e8b6f02e1c977ee620473e976550969144 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 25 May 2017 17:15:23 +0200 Subject: [PATCH 1164/2747] Fixes Microsoft/monaco-editor#278 --- src/vs/editor/editor.main.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/editor.main.ts b/src/vs/editor/editor.main.ts index 667a3004499c7..012e073ff516f 100644 --- a/src/vs/editor/editor.main.ts +++ b/src/vs/editor/editor.main.ts @@ -21,10 +21,17 @@ import { EDITOR_DEFAULTS, WrappingIndent } from 'vs/editor/common/config/editorO (EDITOR_DEFAULTS.contribInfo).folding = false; (EDITOR_DEFAULTS.viewInfo).glyphMargin = false; +let base = createMonacoBaseAPI(); +for (let prop in base) { + if (base.hasOwnProperty(prop)) { + exports[prop] = base[prop]; + } +} +exports.editor = createMonacoEditorAPI(); +exports.languages = createMonacoLanguagesAPI(); + var global: any = self; -global.monaco = createMonacoBaseAPI(); -global.monaco.editor = createMonacoEditorAPI(); -global.monaco.languages = createMonacoLanguagesAPI(); +global.monaco = exports; if (typeof global.require !== 'undefined' && typeof global.require.config === 'function') { global.require.config({ From 735d7d07b3113e7f09f7624d4b12199c6e3a0445 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 May 2017 08:44:07 -0700 Subject: [PATCH 1165/2747] Move terminal.foreground defaults to JS Fixes #27230 --- .../parts/terminal/electron-browser/media/terminal.css | 3 --- .../terminal/electron-browser/terminalColorRegistry.ts | 6 +++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css b/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css index f35dde259bf6f..5a7d34f9e1849 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css @@ -9,12 +9,9 @@ display: flex; flex-direction: column; background-color: transparent!important; - color: #333; -webkit-user-select: initial; position: relative; } -.vs-dark .monaco-workbench .panel.integrated-terminal { color: #CCC; } -.hc-black .monaco-workbench .panel.integrated-terminal { color: #FFF; } .monaco-workbench .panel.integrated-terminal .terminal-outer-container { height: 100%; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts index 27f3f23c8ba71..ae1d524a91223 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts @@ -14,7 +14,11 @@ import { registerColor, ColorIdentifier } from 'vs/platform/theme/common/colorRe export const ansiColorIdentifiers: ColorIdentifier[] = []; export const TERMINAL_BACKGROUND_COLOR = registerColor('terminal.background', null, nls.localize('terminal.background', 'The background color of the terminal, this allows coloring the terminal differently to the panel.')); -export const TERMINAL_FOREGROUND_COLOR = registerColor('terminal.foreground', null, nls.localize('terminal.foreground', 'The foreground color of the terminal.')); +export const TERMINAL_FOREGROUND_COLOR = registerColor('terminal.foreground', { + light: '#333333', + dark: '#CCCCCC', + hc: 'FFFFFF' +}, nls.localize('terminal.foreground', 'The foreground color of the terminal.')); const ansiColorMap = { 'terminal.ansiBlack': { From 3356f28259ca3f95c2b8112b875a3fe79aa18a15 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 May 2017 08:44:54 -0700 Subject: [PATCH 1166/2747] Remove deprecated css property --- .../parts/terminal/electron-browser/media/terminal.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css b/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css index 5a7d34f9e1849..f2cc6747e2c4d 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css @@ -9,7 +9,7 @@ display: flex; flex-direction: column; background-color: transparent!important; - -webkit-user-select: initial; + user-select: initial; position: relative; } From d0de62ea2b7158b2c5882928c7d079b4fafd1b56 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 25 May 2017 09:09:41 -0700 Subject: [PATCH 1167/2747] More welcome page colors (#25798) --- .../electron-browser/vs_code_welcome_page.ts | 38 +++++----- .../page/electron-browser/welcomePage.css | 69 +------------------ .../page/electron-browser/welcomePage.ts | 26 ++++++- 3 files changed, 47 insertions(+), 86 deletions(-) diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts index cc27fe4978c77..767ee36747ab1 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts @@ -14,13 +14,13 @@ export default () => `
    -

    ${escape(localize('welcomePage.vscode', "Visual Studio Code"))}

    -

    ${escape(localize('welcomePage.editingEvolved', "Editing evolved"))}

    +

    ${escape(localize('welcomePage.vscode', "Visual Studio Code"))}

    +

    ${escape(localize('welcomePage.editingEvolved', "Editing evolved"))}

    -

    ${escape(localize('welcomePage.start', "Start"))}

    +

    ${escape(localize('welcomePage.start', "Start"))}

    -

    ${escape(localize('welcomePage.recent', "Recent"))}

    +

    ${escape(localize('welcomePage.recent', "Recent"))}

    -

    ${escape(localize('welcomePage.noRecentFolders', "No recent folders"))}

    +

    ${escape(localize('welcomePage.noRecentFolders', "No recent folders"))}

    -

    +

    -

    ${escape(localize('welcomePage.customize', "Customize"))}

    +

    ${escape(localize('welcomePage.customize', "Customize"))}

      -
    • -
    • -
    • +
    -

    ${escape(localize('welcomePage.learn', "Learn"))}

    +

    ${escape(localize('welcomePage.learn', "Learn"))}

      -
    • -
    • -
    • +
    • +
    • +
    diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css index 982a72d9d1bfb..a3c2fa3e6867e 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css @@ -16,9 +16,6 @@ max-width: 1200px; font-size: 10px; } -.vs .monaco-workbench > .part.editor > .content .welcomePage { - color: #6C6C6C; -} .monaco-workbench > .part.editor > .content .welcomePage .row { display: flex; @@ -41,66 +38,36 @@ } .monaco-workbench > .part.editor > .content .welcomePage a { - color: #2e70c0; text-decoration: none; } -.vs-dark .monaco-workbench > .part.editor > .content .welcomePage a { - color: #4080D0; -} - .monaco-workbench > .part.editor > .content .welcomePage a:focus { outline: 1px solid -webkit-focus-ring-color; outline-offset: -1px; } -.monaco-workbench > .part.editor > .content .welcomePage a:hover { - color: #6ea0dc; -} - -.hc-black .monaco-workbench > .part.editor > .content .welcomePage a { - color: #0b9eff; -} - -.hc-black .monaco-workbench > .part.editor > .content .welcomePage a:hover { - color: #f38518; -} - .monaco-workbench > .part.editor > .content .welcomePage h1 { padding: 0; margin: 0; border: none; font-weight: normal; - color: rgba(0,0,0,.8); font-size: 3.6em; white-space: nowrap; } -.vs-dark .monaco-workbench > .part.editor > .content .welcomePage h1 { - color: rgba(255,255,255,.76); -} - -.hc-black .monaco-workbench > .part.editor > .content .welcomePage h1 { - color: white; -} - .monaco-workbench > .part.editor > .content .welcomePage .title { margin-top: 1em; margin-bottom: 1em; flex: 1 100%; } + .monaco-workbench > .part.editor > .content .welcomePage .subtitle { margin-top: .8em; font-size: 2.6em; - color: rgba(0,0,0,.53); display: block; } -.vs-dark .monaco-workbench > .part.editor > .content .welcomePage .subtitle { - color: rgba(255,255,255,.46); -} .hc-black .monaco-workbench > .part.editor > .content .welcomePage .subtitle { - color: white; font-weight: 200; } @@ -150,22 +117,6 @@ } .monaco-workbench > .part.editor > .content .welcomePage .splash .recent .path { padding-left: 1em; - color: rgba(255,255,255,.46); -} - -.monaco-workbench > .part.editor > .content .welcomePage .splash .recent .none, -.monaco-workbench > .part.editor > .content .welcomePage .splash .recent .path { - color: rgba(0,0,0,.53); -} - -.vs-dark .monaco-workbench > .part.editor > .content .welcomePage .splash .recent .none, -.vs-dark .monaco-workbench > .part.editor > .content .welcomePage .splash .recent .path { - color: rgba(255,255,255,.46); -} - -.hc-black .monaco-workbench > .part.editor > .content .welcomePage .splash .recent .none, -.hc-black .monaco-workbench > .part.editor > .content .welcomePage .splash .recent .path { - color: white; } .monaco-workbench > .part.editor > .content .welcomePage .splash .title, @@ -207,41 +158,27 @@ margin-bottom: .25em; } -.vs .monaco-workbench > .part.editor > .content .welcomePage .commands li button h3 { - color: #2c2c2c; -} - .monaco-workbench > .part.editor > .content .welcomePage .commands li button { - color: #6c6c6c; border: none; } -.vs-dark .monaco-workbench > .part.editor > .content .welcomePage .commands li button > h3 { - color: #ccc; -} - .hc-black .monaco-workbench > .part.editor > .content .welcomePage .commands li button > h3 { font-weight: bold; } -.vs-dark .monaco-workbench > .part.editor > .content .welcomePage .commands li button { - color: #828282; -} - .monaco-workbench > .part.editor > .content .welcomePage .commands li button:focus { outline-style: solid; outline-width: 1px; } .hc-black .monaco-workbench > .part.editor > .content .welcomePage .commands li button { - color: white; - border-color: #f38518; border-width: 1px; border-style: solid; } .hc-black .monaco-workbench > .part.editor > .content .welcomePage .commands li button:hover { - outline: 1px dashed #f38518; + outline-width: 1px; + outline-style: dashed; outline-offset: -5px; } diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 874bc17d8ddc5..86dde1dd27dcf 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -35,7 +35,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { tildify } from 'vs/base/common/labels'; import { isLinux } from 'vs/base/common/platform'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { registerColor } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, textLinkForeground, foreground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { getExtraColor } from 'vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils'; used(); @@ -240,6 +240,7 @@ class WelcomePage { const span = document.createElement('span'); span.classList.add('path'); + span.classList.add('detail'); span.innerText = tildify(parentFolder, this.environmentService.userHome); span.title = folder; li.appendChild(span); @@ -446,10 +447,21 @@ class WelcomePage { // theming +const caption = registerColor('welcomePage.caption', { dark: '#FFFFFFC2', light: '#000000D4', hc: foreground }, localize('welcomePage.caption', 'Caption color on the Welcome page.')); +const detail = registerColor('welcomePage.detail', { dark: '#FFFFFF76', light: '#00000088', hc: foreground }, localize('welcomePage.detail', 'Detail color on the Welcome page.')); + const quickLinkBackground = registerColor('welcomePage.quickLinkBackground', { dark: null, light: null, hc: null }, localize('welcomePage.quickLinkBackground', 'Background color for the quick links on the Welcome page.')); const quickLinkHoverBackground = registerColor('welcomePage.quickLinkHoverBackground', { dark: null, light: null, hc: null }, localize('welcomePage.quickLinkHoverBackground', 'Hover background color for the quick links on the Welcome page.')); registerThemingParticipant((theme, collector) => { + const captionColor = theme.getColor(caption); + if (captionColor) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .caption { color: ${captionColor}; }`); + } + const detailColor = theme.getColor(detail); + if (detailColor) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .detail { color: ${detailColor}; }`); + } const color = getExtraColor(theme, quickLinkBackground, { dark: 'rgba(0, 0, 0, .2)', extra_dark: 'rgba(200, 235, 255, .042)', light: 'rgba(0,0,0,.04)', hc: 'black' }); if (color) { collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .commands li button { background: ${color}; }`); @@ -458,4 +470,16 @@ registerThemingParticipant((theme, collector) => { if (hover) { collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .commands li button:hover { background: ${hover}; }`); } + const link = theme.getColor(textLinkForeground); + if (link) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage a { color: ${link}; }`); + } + const border = theme.getColor(contrastBorder); + if (border) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .commands li button { border-color: ${border}; }`); + } + const activeBorder = theme.getColor(activeContrastBorder); + if (activeBorder) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .commands li button:hover { outline-color: ${activeBorder}; }`); + } }); From 60a5167e093ae2a95defac1a6c77976986ac7467 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 25 May 2017 09:49:50 -0700 Subject: [PATCH 1168/2747] Playground colors (#25798) --- .../electron-browser/walkThroughPart.css | 30 ++----------------- .../electron-browser/walkThroughPart.ts | 23 +++++++++++++- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.css b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.css index baaf1f3ceed36..305fece6c6b34 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.css +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.css @@ -17,7 +17,6 @@ } .monaco-workbench > .part.editor > .content .walkThroughContent a { - color: #4080D0; text-decoration: none; } @@ -69,7 +68,6 @@ } .monaco-workbench > .part.editor > .content .walkThroughContent a:hover { - color: #4080D0; text-decoration: underline; } @@ -106,36 +104,11 @@ line-height: 19px; } -/*.monaco-workbench.mac > .part.editor > .content .walkThroughContent code, -.monaco-workbench.mac > .part.editor > .content .walkThroughContent .shortcut { - font-size: 12px; - line-height: 18px; -}*/ - -.vs .monaco-workbench > .part.editor > .content .walkThroughContent code, -.vs .monaco-workbench > .part.editor > .content .walkThroughContent .shortcut { - color: #A31515; -} - -.vs-dark .monaco-workbench > .part.editor > .content .walkThroughContent code, -.vs-dark .monaco-workbench > .part.editor > .content .walkThroughContent .shortcut { - color: #D7BA7D; -} - .monaco-workbench > .part.editor > .content .walkThroughContent blockquote { margin: 0 7px 0 5px; padding: 0 16px 0 10px; border-left: 5px solid; } -.vs .monaco-workbench > .part.editor > .content .walkThroughContent blockquote, -.vs-dark .monaco-workbench > .part.editor > .content .walkThroughContent blockquote { - background: rgba(127, 127, 127, 0.1); - border-color: rgba(0, 122, 204, 0.5); -} -.hc-black .monaco-workbench > .part.editor > .content .walkThroughContent blockquote { - background: transparent; - border-color: #fff; -} .monaco-workbench > .part.editor > .content .walkThroughContent .monaco-tokenized-source { white-space: pre; @@ -162,5 +135,6 @@ } .hc-black .monaco-workbench > .part.editor > .content .walkThroughContent .monaco-editor { - border: 1px white solid + border-width: 1px; + border-style: solid; } diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 2fcbace413f7e..f22fa7e0702e5 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -38,7 +38,7 @@ import { IPartService } from 'vs/workbench/services/part/common/partService'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { registerColor } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, textLinkForeground, textPreformatForeground, contrastBorder, textBlockQuoteBackground, textBlockQuoteBorder } from 'vs/platform/theme/common/colorRegistry'; import { getExtraColor } from 'vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils'; export const WALK_THROUGH_FOCUS = new RawContextKey('interactivePlaygroundFocus', false); @@ -534,4 +534,25 @@ registerThemingParticipant((theme, collector) => { collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent .monaco-editor-background, .monaco-workbench > .part.editor > .content .walkThroughContent .margin-view-overlays { background: ${color}; }`); } + const link = theme.getColor(textLinkForeground); + if (link) { + collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent a { color: ${link}; }`); + } + const shortcut = theme.getColor(textPreformatForeground); + if (shortcut) { + collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent code, + .monaco-workbench > .part.editor > .content .walkThroughContent .shortcut { color: ${shortcut}; }`); + } + const border = theme.getColor(contrastBorder); + if (border) { + collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent .monaco-editor { border-color: ${border}; }`); + } + const quoteBackground = theme.getColor(textBlockQuoteBackground); + if (quoteBackground) { + collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent blockquote { background: ${quoteBackground}; }`); + } + const quoteBorder = theme.getColor(textBlockQuoteBorder); + if (quoteBorder) { + collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent blockquote { border-color: ${quoteBorder}; }`); + } }); \ No newline at end of file From fb5eab501353456adc7523b3582ca3c0535d3466 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 25 May 2017 10:25:46 -0700 Subject: [PATCH 1169/2747] Overlay color (#25798) --- .../overlay/browser/welcomeOverlay.css | 15 ------------- .../welcome/overlay/browser/welcomeOverlay.ts | 22 +++++++++++++++++++ 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.css b/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.css index 6aa8c04e78915..50cf77eafadbd 100644 --- a/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.css +++ b/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.css @@ -10,15 +10,10 @@ height: 100%; width: 100%; z-index: 9999; - background: rgba(0,0,0,0.52); font-size: 10px; transition: font-size .25s; } -.vs .monaco-workbench > .welcomeOverlay { - background: rgba(255,255,255,.52); -} - #workbench\.parts\.editor { transition: filter .25s, opacity .2s; } @@ -40,15 +35,6 @@ font-size: 1.6em; } -.monaco-workbench > .welcomeOverlay > .key { - color: #000; -} - -.vs-dark .monaco-workbench > .welcomeOverlay > .key, -.hc-black .monaco-workbench > .welcomeOverlay > .key { - color: #FFF; -} - .monaco-workbench > .welcomeOverlay > .key > .label { padding: 0 1ex; } @@ -56,7 +42,6 @@ .monaco-workbench > .welcomeOverlay > .key > .shortcut { letter-spacing: 0.15em; font-size: 0.8125em; - color: #d7ba7d; font-family: "Lucida Grande", sans-serif; } diff --git a/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts b/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts index 8a3bb16246ae8..d5a435aac227d 100644 --- a/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts +++ b/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts @@ -22,6 +22,8 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { KeyCode } from 'vs/base/common/keyCodes'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { registerColor, textPreformatForeground } from 'vs/platform/theme/common/colorRegistry'; interface Key { id: string; @@ -233,3 +235,23 @@ Registry.as(Extensions.WorkbenchActions) Registry.as(Extensions.WorkbenchActions) .registerWorkbenchAction(new SyncActionDescriptor(HideWelcomeOverlayAction, HideWelcomeOverlayAction.ID, HideWelcomeOverlayAction.LABEL, { primary: KeyCode.Escape }, OVERLAY_VISIBLE), 'Help: Hide Interface Overview', localize('help', "Help")); + +// theming + +const foreground = registerColor('welcomeOverlay.foreground', { dark: '#fff', light: '#000', hc: '#fff' }, localize('welcomeOverlay.foreground', 'Foreground color for the Interface Overview.')); +const background = registerColor('welcomeOverlay.background', { dark: '#00000085', light: '#FFFFFF85', hc: '#00000085' }, localize('welcomeOverlay.background', 'Background color for the Interface Overview.')); + +registerThemingParticipant((theme, collector) => { + const key = theme.getColor(foreground); + if (key) { + collector.addRule(`.monaco-workbench > .welcomeOverlay > .key { color: ${key}; }`); + } + const backgroundColor = theme.getColor(background); + if (backgroundColor) { + collector.addRule(`.monaco-workbench > .welcomeOverlay { background: ${backgroundColor}; }`); + } + const shortcut = theme.getColor(textPreformatForeground); + if (shortcut) { + collector.addRule(`.monaco-workbench > .welcomeOverlay > .key > .shortcut { color: ${shortcut}; }`); + } +}); From dbeb66f8fd416f58d4a3b7b5d76f84c1d5b56811 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 May 2017 11:07:55 -0700 Subject: [PATCH 1170/2747] Add null check in terminalPanel click listener Fixes #27256 --- .../parts/terminal/electron-browser/terminalPanel.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index ec880bdd12c23..4b5a29f34c4f8 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -197,11 +197,12 @@ export class TerminalPanel extends Panel { this._cancelContextMenu = false; })); this._register(dom.addDisposableListener(this._parentDomElement, 'click', (event) => { - if (this._terminalService.terminalInstances.length === 0) { + if (event.which === 3) { return; } - if (event.which !== 3) { + const instance = this._terminalService.getActiveInstance(); + if (instance) { this._terminalService.getActiveInstance().focus(); } })); From f0ebd2b48287f0cdbe6f93a93c7af4009afae2d0 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 25 May 2017 11:11:40 -0700 Subject: [PATCH 1171/2747] Add null check to terminal link handler Fixes #27247 --- .../terminal/electron-browser/terminalLinkHandler.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts index 49df15b331ac1..16047707ea727 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.ts @@ -226,12 +226,15 @@ export class TerminalLinkHandler { private _resolvePath(link: string): TPromise { link = this._preprocessPath(link); - if (!link) { return TPromise.as(void 0); } const linkUrl = this.extractLinkUrl(link); + if (!linkUrl) { + return TPromise.as(void 0); + } + // Open an editor if the path exists return pfs.fileExists(linkUrl).then(isFile => { if (!isFile) { @@ -292,6 +295,9 @@ export class TerminalLinkHandler { */ public extractLinkUrl(link: string): string { const matches: string[] = this._localLinkRegex.exec(link); + if (!matches) { + return null; + } return matches[1]; } } From f962f52cd4c13c1dea6572a496b96bf628ca7d56 Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 25 May 2017 11:25:34 -0700 Subject: [PATCH 1172/2747] Fix #27265. False positve --- src/vs/editor/contrib/find/common/findController.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/contrib/find/common/findController.ts b/src/vs/editor/contrib/find/common/findController.ts index 4536b2b5b6fbb..a5dae70a8dcdf 100644 --- a/src/vs/editor/contrib/find/common/findController.ts +++ b/src/vs/editor/contrib/find/common/findController.ts @@ -508,13 +508,13 @@ export class StartFindReplaceAction extends EditorAction { let controller = CommonFindController.get(editor); let currentSelection = editor.getSelection(); // we only seed search string from selection when the current selection is single line and not empty. - let seedSearchStringFromSelection = currentSelection.isEmpty() || - currentSelection.startLineNumber !== currentSelection.endLineNumber; + let seedSearchStringFromSelection = !currentSelection.isEmpty() && + currentSelection.startLineNumber === currentSelection.endLineNumber; let oldSearchString = controller.getState().searchString; // if the existing search string in find widget is empty and we don't seed search string from selection, it means the Find Input // is still empty, so we should focus the Find Input instead of Replace Input. - let shouldFocus = !oldSearchString && seedSearchStringFromSelection ? - FindStartFocusAction.FocusFindInput : FindStartFocusAction.FocusReplaceInput; + let shouldFocus = (!!oldSearchString || seedSearchStringFromSelection) ? + FindStartFocusAction.FocusReplaceInput : FindStartFocusAction.FocusFindInput; if (controller) { controller.start({ From 29a7a86c3afcc98ad4f96e4b6193cf41877131bc Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Thu, 25 May 2017 13:10:39 -0700 Subject: [PATCH 1173/2747] Start crash reporter inside child processes (#27180) * Use service to get crash reporter start options * some refactorings and fixes * Move crashesDirectory to the main payload from extra bag --- src/bootstrap.js | 12 +++ src/typings/electron.d.ts | 7 ++ .../electron-browser/crashReporter.ts | 71 --------------- .../electron-browser/extensionHost.ts | 12 ++- src/vs/workbench/electron-browser/shell.ts | 32 ++----- .../common/crashReporterService.ts | 43 +++++++++ .../electron-browser/crashReporterService.ts | 91 +++++++++++++++++++ 7 files changed, 171 insertions(+), 97 deletions(-) delete mode 100644 src/vs/workbench/electron-browser/crashReporter.ts create mode 100644 src/vs/workbench/services/crashReporter/common/crashReporterService.ts create mode 100644 src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts diff --git a/src/bootstrap.js b/src/bootstrap.js index 022aa50b6a368..3f94abadd31cd 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -126,4 +126,16 @@ if (process.env['VSCODE_PARENT_PID']) { } } +const crashReporterOptionsRaw = process.env['CRASH_REPORTER_START_OPTIONS']; +if (typeof crashReporterOptionsRaw === 'string') { + try { + const crashReporterOptions = JSON.parse(crashReporterOptionsRaw); + if (crashReporterOptions) { + process.crashReporter.start(crashReporterOptions); + } + } catch (error) { + console.error(error); + } +} + require('./bootstrap-amd').bootstrap(process.env['AMD_ENTRYPOINT']); \ No newline at end of file diff --git a/src/typings/electron.d.ts b/src/typings/electron.d.ts index 5a1f5ea3430c0..05aab3a81619f 100644 --- a/src/typings/electron.d.ts +++ b/src/typings/electron.d.ts @@ -2066,6 +2066,13 @@ declare namespace Electron { * Only string properties are sent correctly, nested objects are not supported. */ extra?: { [prop: string]: string }; + + /** + * Path to a folder where the crashes will be temporarily stored by the electron crash reporter + * Applies only to child processes that need crash reporting. + * Electron figures out the crashesDirectory on its own for Main and Renderer process + */ + crashesDirectory?: string; } interface CrashReport { diff --git a/src/vs/workbench/electron-browser/crashReporter.ts b/src/vs/workbench/electron-browser/crashReporter.ts deleted file mode 100644 index 119229bc2d46f..0000000000000 --- a/src/vs/workbench/electron-browser/crashReporter.ts +++ /dev/null @@ -1,71 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import nls = require('vs/nls'); -import { onUnexpectedError } from 'vs/base/common/errors'; -import { assign, clone } from 'vs/base/common/objects'; -import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IWindowsService } from 'vs/platform/windows/common/windows'; -import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { Registry } from 'vs/platform/platform'; -import { crashReporter } from 'electron'; -import product from 'vs/platform/node/product'; -import pkg from 'vs/platform/node/package'; - -const TELEMETRY_SECTION_ID = 'telemetry'; - -interface ICrashReporterConfig { - enableCrashReporter: boolean; -} - -const configurationRegistry = Registry.as(Extensions.Configuration); -configurationRegistry.registerConfiguration({ - 'id': TELEMETRY_SECTION_ID, - 'order': 110, - title: nls.localize('telemetryConfigurationTitle', "Telemetry"), - 'type': 'object', - 'properties': { - 'telemetry.enableCrashReporter': { - 'type': 'boolean', - 'description': nls.localize('telemetry.enableCrashReporting', "Enable crash reports to be sent to Microsoft.\nThis option requires restart to take effect."), - 'default': true - } - } -}); - -export class CrashReporter { - - constructor( - configuration: Electron.CrashReporterStartOptions, - @ITelemetryService telemetryService: ITelemetryService, - @IWindowsService windowsService: IWindowsService, - @IConfigurationService configurationService: IConfigurationService - ) { - const config = configurationService.getConfiguration(TELEMETRY_SECTION_ID); - - if (!config.enableCrashReporter) { - return; - } - - telemetryService.getTelemetryInfo() - .then(info => ({ - vscode_sessionId: info.sessionId, - vscode_version: pkg.version, - vscode_commit: product.commit, - vscode_machineId: info.machineId - })) - .then(extra => assign(configuration, { extra })) - .then(configuration => { - // start crash reporter right here - crashReporter.start(clone(configuration)); - - // TODO: start crash reporter in the main process - return windowsService.startCrashReporter(configuration); - }) - .done(null, onUnexpectedError); - } -} \ No newline at end of file diff --git a/src/vs/workbench/electron-browser/extensionHost.ts b/src/vs/workbench/electron-browser/extensionHost.ts index e8f82622b43d8..2431281d98e96 100644 --- a/src/vs/workbench/electron-browser/extensionHost.ts +++ b/src/vs/workbench/electron-browser/extensionHost.ts @@ -32,6 +32,7 @@ import Event, { Emitter } from 'vs/base/common/event'; import { IInitData } from 'vs/workbench/api/node/extHost.protocol'; import { MainProcessExtensionService } from 'vs/workbench/api/electron-browser/mainThreadExtensionService'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; +import { ICrashReporterService } from 'vs/workbench/services/crashReporter/common/crashReporterService'; export const EXTENSION_LOG_BROADCAST_CHANNEL = 'vscode:extensionLog'; export const EXTENSION_ATTACH_BROADCAST_CHANNEL = 'vscode:extensionAttach'; @@ -92,7 +93,9 @@ export class ExtensionHostProcessWorker { @IInstantiationService private instantiationService: IInstantiationService, @IEnvironmentService private environmentService: IEnvironmentService, @IWorkspaceConfigurationService private configurationService: IWorkspaceConfigurationService, - @ITelemetryService private telemetryService: ITelemetryService + @ITelemetryService private telemetryService: ITelemetryService, + @ICrashReporterService private crashReporterService: ICrashReporterService + ) { // handle extension host lifecycle a bit special when we know we are developing an extension that runs inside this.isExtensionDevelopmentHost = environmentService.isExtensionDevelopment; @@ -111,7 +114,7 @@ export class ExtensionHostProcessWorker { const [server, hook] = <[Server, string]>data[0]; const port = data[1]; - let opts = { + const opts = { env: objects.mixin(objects.clone(process.env), { AMD_ENTRYPOINT: 'vs/workbench/node/extensionHostProcess', PIPE_LOGGING: 'true', @@ -130,6 +133,11 @@ export class ExtensionHostProcessWorker { : undefined }; + const crashReporterOptions = this.crashReporterService.getChildProcessStartOptions('extensionHost'); + if (crashReporterOptions) { + opts.env.CRASH_REPORTER_START_OPTIONS = JSON.stringify(crashReporterOptions); + } + // Run Extension Host as fork of current process this.extensionHostProcess = fork(URI.parse(require.toUrl('bootstrap')).fsPath, ['--type=extensionHost'], opts); diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index da3ce11662727..66e974a00c7fe 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -73,7 +73,8 @@ import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { WorkbenchModeServiceImpl } from 'vs/workbench/services/mode/common/workbenchModeService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IUntitledEditorService, UntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; -import { CrashReporter } from 'vs/workbench/electron-browser/crashReporter'; +import { ICrashReporterService, NullCrashReporterService } from 'vs/workbench/services/crashReporter/common/crashReporterService'; +import { CrashReporterService } from 'vs/workbench/services/crashReporter/electron-browser/crashReporterService'; import { NodeCachedDataManager } from 'vs/workbench/electron-browser/nodeCachedDataManager'; import { getDelayedChannel } from 'vs/base/parts/ipc/common/ipc'; import { connect as connectNet } from 'vs/base/parts/ipc/node/ipc.net'; @@ -168,29 +169,6 @@ export class WorkbenchShell { // Instantiation service with services const [instantiationService, serviceCollection] = this.initServiceCollection(parent.getHTMLElement()); - //crash reporting - if (product.crashReporter && product.hockeyApp) { - let submitURL: string; - - if (platform.isWindows) { - submitURL = product.hockeyApp[`win32-${process.arch}`]; - } else if (platform.isMacintosh) { - submitURL = product.hockeyApp.darwin; - } else if (platform.isLinux) { - submitURL = product.hockeyApp[`linux-${process.arch}`]; - } - - if (submitURL) { - const opts: Electron.CrashReporterStartOptions = { - companyName: product.crashReporter.companyName, - productName: product.crashReporter.productName, - submitURL - }; - - instantiationService.createInstance(CrashReporter, opts); - } - } - // Workbench this.workbench = instantiationService.createInstance(Workbench, parent.getHTMLElement(), workbenchContainer.getHTMLElement(), this.options, serviceCollection); this.workbench.startup({ @@ -333,6 +311,12 @@ export class WorkbenchShell { serviceCollection.set(ITelemetryService, this.telemetryService); disposables.add(configurationTelemetry(this.telemetryService, this.configurationService)); + let crashReporterService = NullCrashReporterService; + if (product.crashReporter && product.hockeyApp) { + crashReporterService = instantiationService.createInstance(CrashReporterService); + } + serviceCollection.set(ICrashReporterService, crashReporterService); + this.messageService = instantiationService.createInstance(MessageService, container); serviceCollection.set(IMessageService, this.messageService); serviceCollection.set(IChoiceService, this.messageService); diff --git a/src/vs/workbench/services/crashReporter/common/crashReporterService.ts b/src/vs/workbench/services/crashReporter/common/crashReporterService.ts new file mode 100644 index 0000000000000..4ce3933901d8b --- /dev/null +++ b/src/vs/workbench/services/crashReporter/common/crashReporterService.ts @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import nls = require('vs/nls'); +import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; +import { Registry } from 'vs/platform/platform'; +import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; + +export const ICrashReporterService = createDecorator('crashReporterService'); + +export const TELEMETRY_SECTION_ID = 'telemetry'; + +export interface ICrashReporterConfig { + enableCrashReporter: boolean; +} + +const configurationRegistry = Registry.as(Extensions.Configuration); +configurationRegistry.registerConfiguration({ + 'id': TELEMETRY_SECTION_ID, + 'order': 110, + title: nls.localize('telemetryConfigurationTitle', "Telemetry"), + 'type': 'object', + 'properties': { + 'telemetry.enableCrashReporter': { + 'type': 'boolean', + 'description': nls.localize('telemetry.enableCrashReporting', "Enable crash reports to be sent to Microsoft.\nThis option requires restart to take effect."), + 'default': true + } + } +}); + +export interface ICrashReporterService { + _serviceBrand: any; + getChildProcessStartOptions(processName: string): Electron.CrashReporterStartOptions; +} + +export const NullCrashReporterService: ICrashReporterService = { + _serviceBrand: undefined, + getChildProcessStartOptions(processName: string) { return undefined; } +}; \ No newline at end of file diff --git a/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts b/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts new file mode 100644 index 0000000000000..58cca417c6b3d --- /dev/null +++ b/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts @@ -0,0 +1,91 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { onUnexpectedError } from 'vs/base/common/errors'; +import { assign, clone } from 'vs/base/common/objects'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { IWindowsService } from 'vs/platform/windows/common/windows'; +import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; +import { crashReporter } from 'electron'; +import product from 'vs/platform/node/product'; +import pkg from 'vs/platform/node/package'; +import * as os from 'os'; +import { ICrashReporterService, TELEMETRY_SECTION_ID, ICrashReporterConfig } from "vs/workbench/services/crashReporter/common/crashReporterService"; +import { isWindows, isMacintosh, isLinux } from "vs/base/common/platform"; + +export class CrashReporterService implements ICrashReporterService { + + public _serviceBrand: any; + + private options: Electron.CrashReporterStartOptions; + + constructor( + @ITelemetryService private telemetryService: ITelemetryService, + @IWindowsService private windowsService: IWindowsService, + @IConfigurationService configurationService: IConfigurationService + ) { + const config = configurationService.getConfiguration(TELEMETRY_SECTION_ID); + if (config.enableCrashReporter) { + this.startCrashReporter(); + } + } + + private startCrashReporter(): void { + + // base options + this.options = { + companyName: product.crashReporter.companyName, + productName: product.crashReporter.productName, + submitURL: this.getSubmitURL() + }; + + // mixin telemetry info and product info + this.telemetryService.getTelemetryInfo() + .then(info => { + assign(this.options, { + extra: { + vscode_sessionId: info.sessionId, + vscode_version: pkg.version, + vscode_commit: product.commit, + vscode_machineId: info.machineId + } + }); + + // start crash reporter right here + crashReporter.start(clone(this.options)); + + // start crash reporter in the main process + return this.windowsService.startCrashReporter(this.options); + }) + .done(null, onUnexpectedError); + } + + private getSubmitURL(): string { + let submitURL: string; + if (isWindows) { + submitURL = product.hockeyApp[`win32-${process.arch}`]; + } else if (isMacintosh) { + submitURL = product.hockeyApp.darwin; + } else if (isLinux) { + submitURL = product.hockeyApp[`linux-${process.arch}`]; + } + + return submitURL; + } + + public getChildProcessStartOptions(name: string): Electron.CrashReporterStartOptions { + + // Experimental attempt on Mac only for now + if (isMacintosh) { + const childProcessOptions = clone(this.options); + childProcessOptions.extra.processName = name; + childProcessOptions.crashesDirectory = os.tmpdir(); + return childProcessOptions; + } + + return void 0; + } +} \ No newline at end of file From 0dd3f6b7bddfca066152e380c21764787a326296 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 25 May 2017 13:18:23 -0700 Subject: [PATCH 1174/2747] Fixes #27287 --- .../parts/emmet/electron-browser/actions/expandAbbreviation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts index f046995c79923..26125b52a0f91 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts @@ -33,7 +33,7 @@ class ExpandAbbreviationAction extends BasicEmmetEditorAction { EditorContextKeys.hasSingleSelection, EditorContextKeys.tabDoesNotMoveFocus, ContextKeyExpr.has('config.emmet.triggerExpansionOnTab'), - ContextKeyExpr.not('config.emmet.suggestExpandedAbbreviation') + ContextKeyExpr.not('config.emmet.useModules') ) } ); From 23f76d4e468bd9aa6fea291fc23a38049a7c9d8c Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 25 May 2017 22:40:41 +0200 Subject: [PATCH 1175/2747] [seti] Update to jesseweed/seti-ui@f78d623 (2017-05-11) --- extensions/theme-seti/icons/seti.woff | Bin 30512 -> 30516 bytes .../theme-seti/icons/vs-seti-icon-theme.json | 496 ++++++++++-------- 2 files changed, 281 insertions(+), 215 deletions(-) diff --git a/extensions/theme-seti/icons/seti.woff b/extensions/theme-seti/icons/seti.woff index d1411ae52218317ccb3d374bfa42e106da8ef2fa..5dd4c46c58c12024e051f21d7b8f946184a7f638 100644 GIT binary patch delta 30249 zcmV)EK)}DS?g6y!0Tg#nMn(Vu00000cQgPC00000wk(kpK7T|YV{Kt@0004m0007_ z000O$@Ff;YXKZ<9000Ci003=_005&b)jrC{Xk}q!0042c0000k0000s4T~ioXlP|& z004310000S0000a2fPI+Xl-0043z0002+0002+ z)}8~*ZDDwD05<@05C8xG9{>OVAOcVd5pH2^WdHzkFaQ7n9smFV=H5yf%y4gWbN~Q! zPyhe|;{X5zF9PoGZIcKAL4SV5IDvtcfr05K(;fx}h8_sb_<+HXkqIcuz{<>k6$GTY zrZ6}>V0=)^`~t|00+T?EAOZkRjSR2=0C=43)CW>jK^R5hGcbTiPLc!x0f_mdU${LsTu0k04YFn&=SNUX@*#MMSpBO+>J%|lert+ zkH^ZQJ#pPn+}z%VYfRVhcRac#g}w1mOeKvwq=$1EWRgWTIpLZ`E_virKp{okqnHv( zDWjbGR8YwSs;H)hhtyIRe(QNe1C2D%9NtAMk7=Ww4xWS)PkF|3I_aXD9$wHJ^wG~i zxDN7?A%+=YlrhGc;C~g9Ofk(2v&`|DH_WrZB1VQ5}yX#T*^yvoqL+R(hl(EOpHd99&& zouPTXq4^_2^9GAvHyYa8WN2@*p}j4J_O=?@``FOlHq&=dqTSHm4nupN7~1>P(B5Z; z_C7bXx6`8kRezVEbKQo{^%y$$!qB;1L+APoo$EJrZotsFK||+WT6BNNP-ECoW5iHn z)S^9OhI-?MdJ~3vuMG7j4fUoB^`;H=W(@Ua4fW;>^w`ZugZ>aaqQ188=-hrXs z2SdG&hI*e2^*$TweKFKKG}QZQsCQ(jcWkJ4VyJg&sCQ=3chtF|_JyJLrJ?qfq4u?* z_BTWA?}pkx47Gn6YX36S{%xpzV_g3QhNxOC004NLl)VX@Bu9BCnh}u^k#}b0Sy^{g zc2#vx_kZ+JXOCv4TQg`hqZu)Sq|t$d#taq+O9sSYFv7yJ#cg9`%a#q63=0p|*j&aB z42z5wY(48)EEv4@^1zFY%|0-;*@quKz*c#`FRHo+_Q89aet*&F_x66qqux<6nvSMBWI8!a22GL< z)8Sy3Oa^I&KOTWg>LgAR{8nscEQzI1KgD=7o$UXl@Z_-YWA1auiX6A*OFuGm7hc@J zjQmKXL1YTXgmKw&9yF~mb%h8_x0W5P7`9QVnmv=5%&2>1oxCxPtA=9)KBH1M
    S zmw%DlgxFkTq#Df3g;vZa%|rY0~&_64keHmNrR)Br$YO(SMnahuL(P6k}QRlaF1ydhJ?vL)tpldiiEG z_M!L8Bx)vpo*(FS4&eEDr}`|^7p`nC5h+HjEmwN}%1w40SIbfCH$6n{p3 zJi=ifPbV;(Nhy|v?Cy;xh{aqErjveeIvJ?(PoQ=Ec<=0J(pP84SPbuw$`~YUU0nqI zu|rbqgp@p~8{)!%u~!A$b?y`Qo1tV5V`NR&%W*^ZT$6KRkqtAt(Q#yA_WZI=$@#JF zJC?5Nq%ggsFn%CHQH|Z$(n}$ifq&2)kLzBndp6}n6Z$nPl=vTXT>TzNEN0G5mN@%n zWFFccbfCX7ht9+Pq<_vr?Hc$ZlXN%*by##7Y83Q9)*y2|7*Bd|Xn!*8gWm1X ztU)i80-;bkH=Tfb?dc8u{4qk0G0Qc=rLC-AakeX~BM?@9+&fT>XnU|3nl)w?rhWKi zEvehQ`fNY-YKiTei5FXC!KLo$&BH5acbi3ZiMd@$YS1>r(w(dsRN;n=!82D&0e8~M za<)`ydMW4}6S=4!@J*w;9)G=hXn>YLrxVA`t64oPj8j)^o*1NM%fqG{b9rKx_EPO< zwBOX8(Ec-tNR9NNH&lZ*NT(-3A{uNuoXgKH>0z_i*;o}&W+&( zta=yg&>u}C8n_`oE`#f#Hhp+7*ti%j@JZ3@57Jn4dLyXIFdL*$*M5=C$E)z5iJ%2& zMWH35-Z)hio>xiz453lk5Cx(?*de`+h|@kaF~fWIdn{mJ#}1rd)nm|rfHJDnwAOP# zxO15usn$If2o`UJd4HN++-cOAewkHsNjKI(xX}gJMc>z1`=B5^&AbZWBz%(w;jAv&jyD|F&ojGCNM-l*o*YDEY? z0{OuH88>ZRXWmo0H*a3N(W^QZbEyffqTCC(W$B!oCV>)^fHU!-y`axwsbVqcRG)#@ z&`Sb*1EXmcrhm7Xggb)hCTcvR?08o7!Fyy*Gk{wV>3|Q3t-v%&cEzM(SPdxAt6-a; zurM7Vp@#Tb+PZb2v)*oRwjLE0^sPa4hq}zPs1Z3Z{2Dkjk0vqb%K+p%Q<|^` z7`lZlrhmnFsQ!jh{UwF^E8=M%j(@4UbFi3hoXJlZfn~*B8m5)7S?Uj>#Ji#n4_Mt; zZTXJjq~wXF({pRh|Mv-NO zXWMZUcrCx|H~Wne0Dj#;lUfyGTw@-KD&yw;ghMQT3x#i z?hEod9dns&q#)#NK4?N@WKclcb^$%7%a+?x0HmV>3X52;IE!2XK-; zV1H%Fy|cT%MuIm3jQUIvr_DyMYyac8^TN+i_VXZ{u1NFhMC!Z-V%ZB&B|+FZ2U*nJ z@&RE`?=YvKZN+9_m$-Zi`IGhyXM-o!@;@oan{#tFFW1WLsBEu1$on_tx^rAwJao5u z2Q5c#GfH#t&2G*(sA^Ja#9dwN{!`P7D1T@mxW}^lZR`rwADi?qwFBBw?FN+EVh>cV z6NHq?3m`bcHUfZLU{5H(3gt5Zcq)jAmb|N=s(_vW)7?O`o(=I1H6rzw}W-Bj`- zK?&Jr>?US0qb4O_MkQjZ9}chsTB6PUVH*dx)IfLFR?e_AVt@$S;QLG9`iE^0!V>Fc zSI%xt#pNDYmh2>XJCF3^=E-U{`+t>6p_7&ulUvFioqp-K$*RX^x2n^NqS5RwC{rnu z+k2sfSM19>JIvO#7JS(uL-eV0JSqhRj|Tm%1_TiPC?yY5PJi~bUNv#bwlD0rCR|oat(|Cm>0i{4si)gg~R}E4m z4P_1IkR4QiRUHe@>L*3 zO9CKU2tI&%nQh8AOqdt+rKAQEZti;tGuwwYPaOC3P8Zk(mCl*r>Ju$6W87=x;EO&* z^@^znR%klXkgfqGJXd#p0xq%SfTPW81|tV`hnaZ^&>2(C3;2wT1AmX0PPxS35T#Ye zVg7T>G{~*c@(nAlHv*FqE(l!;gEjD9QLh~J%u3B^_WX@eT)D=P(n$~cFD23j^j-!xqPyHn3;MPO&({a%Ztp*bzwZ=Gk-(Ahg{P8Kc>G6{-rsW zd;vC1BIMgx^arRKA{yD3efr0QodJ0AYi|(-FLiTivb%5Rl7HRK)<1OpJ1@JQyn?cm zU~qr=mpCsKWzO}N{4m$QOb(@M@4fcn>9v=1{6}Goeh3*|zo$sW99a+N!Vj<%2rA&{ z$sBki+3%?{^M5J<{VTqUx2PW&u8|tO9kkmDt^@id*K#8^tc|#cI(D}9yn9}9vKPrD z3YujbnKA)d&dc0)rQSTwb8a#~NhBH+2P(BZPDE_S<@)ONw`S#99(5}f8xSc^%h00* zfKzz3Q(b+=`qR1o%#H2HN8e)DiB$qcAdHyqsT7VtZ+|;7SoXPBYW3FpqiCG3)H;?M z@y5ZH1ioT>VNF^fBb4lqNf~(BgWB8C7H<&1>m%rm9Wa0E#3!9`4?iG0pUi!b>WGd) z`h6_n0iTGAdDujq$3u#^0A-0qBC!BE>_MW8YldPzr!van4G?4ul}pEmf~ez%>74ke zAGAzpyMN#!L1%^!thg`*tMQUq2;G*<*LCPj({USt69Q=G_A-br^`XG7CArVQ%IE=? zz5}PZV}bGbem4O>1vimFRt>)2O#}dVN1xvWzA*bA4&InVoi+7Jp7;S*xX2sv3QKU) z{-2&JI1m*MSHg3hM(zLQvFavJ(lUhiJvZq{ReyPuu6gC%%AvhV!Rsa5F$3(ntz7}5 z{QnEPCPgw#hU4M5n2s-f0T^}kV6m+rYss`@H;od2tidusR`*1Gxx29jcEWR|o07@e zU;w`#8y`MAK0@`w7mmh34Y+49@o_Qmh_ z%d98=GhKV}%F4=k?{9f|dB08H&@3&4Hh;z7B}xGP0Dg?rrwRSi!@u&@5B}_#UiY52 z?@n&Go_yz(KTW=Mym8Bscg#L=%_ScM#82yLmupX-+qn4;7^cZ^u0KN+m)ZlAU~n_g z%R(8lV!t%v1Yqcyip8mOO7Z6>Krq0@Z(KHTQb)R6w>r`2^4?Q_b)8p&T96fcp&2uLyJ^Hbr0bifVmoX0qnF`%n^SwhuhCf49=wS=I6mz3_RAF%;wax?ttUm*yn{k z`p5fYsF5}h!^K|-{>U51L$lky=YQ|hlaEe6I-PxBy3g_cRQdB;5uYzyc!E(6soYej zzct#2Qj@)~)NmfBQ8umHfx;?OgYk|rVE2XJ$506L<`i-JDo|c@xjfY)#(wx&8(F_~ z8)GRCxno8~sqW>2UK~WR*<7hs!cM7{JKpSXYdOG_jJZir)>+;GZ@kp3Reu{L_7{J? zaZPU(VCydMaSFB~iohuVRHp#l%O$XVUR^R_8%{F=#G@M-pt8vDOzKo~ur}SA6lPlM zGCiNY4?R^>suvw#=4^XgTdD6))u=L9*Om-G1Y-%SMCc)LgcFkf4Cgs+RAjzW*jWsX1BG;f@UL(R1k+cdQ+E z=k<#}{5KZ*x*y1>(NBB}JhofP8s4N;=(JfKt#6hLrkeurJO1bB7buv6RQ zfIW*#IOG`p7p;R{7SvE7!FANeOljLZ8VU^`<11TDuB_>Sm#(?t@Q~~1S(-SG&bKC; zhbPyGZoOvEA4;q`PprV~9S>Lf&3ZT)?i|~k6j89;y*8tIqju%O#?0vFG@*GImrrDt z^tl{^V2-n|KmOo@kAKtn@i)KuahiVgru*)@>7xwZ*nPKrWDgtAPqT9{!pq3q7h{yl zIfUvjBC}X&7)z$iN54U69r~aNX54ml(Q9n>uIrDAwZMzQ<=!*8;EGSJ1R0Yb2*&jN z)q1J56t)`O17}C8X~-OZ>EKnDpFe%})SZ5@wmB=C#A!xBTYvkW`W)BJT&mCauT2JC z4e8Hfb^*i4a?XUtBlLMAoUFN2 zZ66GNe!n@l8vYMzOndcUn_MwzF2#;a{k)b$r(G$YvfW+_+~h#j_h&z|*VH+=SYk`i zVy+nrO-nV+B!BIGHtv!VDYX$JldRn@P21#KvoF(~7u-906yBdX`}(%$ozC-?M_T~G3^50sd`Q#_bG2*@LP4~ZvY`*%{voGIw$$uQAf1|lt3HZ1+orAAL znX?`PUta>R|499^o3dN7dv-TQ`Db6Vv-6#eXZ+041Aj~G@r!4!U1j8!M;@7db!TV) zen-I{aj16*EijAP5$}(uS<+215Ig$r*<0WGR&w!y*+(9G?6KKL?z`_k=FYx4`zp!5 za@UvczWYm$Jb32JgV*fc>l5sQsuxgt2}&=UmbxU#WYQ-e{^A!Oewch^cKC~5B>zf2 z^o1|N`+tWYnmzu|{PVuv9b`w*!vhSJSzk{3Q}V5gpMSXb$xrqk`Y-IrW6cLYf7@-J zf3Ue<{&VbAPrUrn0!>!UY1C2mwdRda!O3l{urWJMys=WmXP zZStNPa%c`7!8C=mTVMM|+ZOl{%;5O8+a6eJlIv$5X|&BC2m}Evjh?fq zLP1b9Gx$XUu-bTt&}|Nm-3Bb|*x-~>(*Sh920&Try^PalNr*9HUd6S#5$ATvt=0an zUjLe@8({Mt9@X66q|zkcFbx4v;$cD$>3nrvjpcx56Ny zY|I4Qld1Ti5yMTtQLFv6$$;{69##C`rV-JxPeix4DEYfiwu7xOqu(Nj(C zFWg)*H}9E>4&ZdlmWpWt&lK}mW;U3Djapc+9SR@}i_SwbM+rQDuF108O{yLPdVio> z2*7NaM@*c)3Yr+1zVC2qnt<;(IB#ctDGyx1Drq?gYCb2xKuoJut_7~y>z?W?>FkOZ zo_N|*Pd`76~kN+y++$8uX!uHQGh(#oAA6-zEl0$(WoZPbbeJKSEwaeuBK7+)v(um{#=*cA!LX+K3CmzBjbC@+qXEaPw(BKgqfp*X%m4fTBx0*x=%@XUF?c26A?B~})UmET*7+SMhXO8E< z?`@6?f+>K%f}9%E^IVZ|mr$w;;Kh#XTGU_?2)b@k*5Rf>0YXtrP=8Vb6vqj7IeC}R z1>@8%$&Ll4A#$W?dPw#Kum#Ho8Qv)Cyj(eZezR#1E2>SsD{AE7}c!? z=Ygqvx*=R4be*s7UUir;P$onFdLW{dCB?cI>%4fqU$2_7S6(U^(hrZg0&F(i!ljny zcs^KU*EVpr(9>N4YJZ7UHaN~P2nTeInjGq1!EW*Gj$q_1^S&^l9EYOpc@{G%4;Wh;)Vl5Lx=8@kNd^4xyd;D7}4b-80YPUJXd6YL#hEVQ`J zbg)w*bOoVO>N@KP)1qKExpbk@1HlbYQ`eycYGr}#*QpaSoPVVwbXH}YbJw%=`j(eC zd3Y*vbSPtiE7@&MRvn$m+{qJ%^Vq0*qGE8%?Y7|Tf$6E9&S;?HBe`JA3=_K(RI_oR zqh&UsNv=TCoAWBrHqI#Zn5;%|%d`C$T6z~hSW8mM8)4t|E-=Ck7<}Ox7EaH=*TfV; zfFn8|(0OG|&wt<&I@)pJ3x;!joFWD4qrXh`l*@4Li(0CKfCYi+qWU(Y4$vMOy81Zu z2eXAvsZ=4bIrpc3%Lc&1tKh*mv{z`a)gI8^t$k3_x|4LcNY>ygYJ%Fjh>&zqag(^{ zO?c-h&J|1>BG%erYY8GIvJ3QW-eKh8jJ{{=_TESfu{^q&2+gn z`-Ba>7soani=Ybe9;ftws1QE zr~nZ{1%HQ4CzP{a&-yDzTQrN`(TK~mb7-~yLsY=k;8#qZ#jeARTsADd;)Aj}l`j$x z{IdM}(+7%=qx+A-0-bc+yyw8XCH$N`H8MehyR~e|l9XAYB?V4dJB_28<>i)d zxV9{ec2j4h8|zCG%QgJyR20{|a)0c_mQ3Et4piC)i$;+~l!i&SQLMMh zE1)+}51)g1fQq;Q52%+=?m2tdm~Dbw)U^Z1ZnGhBdGPWCa0}+E%!%s|aL=?Kd!)0D zu{Cf$tOrXfdi+my5ZbwZnPe64tIu)2D~)sqi;Ta zcYkLooxShvpMJ;r)t^3n!|9U;R!`o2^+t11qB-2h)pr8MT-MHNFGPf?qOXe(^*q8b zZGV?XQBhcMQhOomL@Xp%ktB6Vr$3meNw34CI~>e2*Q9C_crNfmDhxhR_Xb}{zG5<~ zDM8C6Xf)?HXWddv$*0ra)3$VG8=>UB&wo=eNaQDUFf93?MFlgZD0OPS2|$5SHvlWi z=!s>pP}e*eo(1FIKL_?G@_osPzIp%*h{Gj!f@u{fG-)wl(9(>WNuxR}%AIC!ZBSfM zl!x_Bwge*&5(r{e(rr$sp3yIbPU_hVti2ccQB*E5lT}XYUI%SkBAHM4V1QgfKMBW`16OlHDxjo-;0OaS0SB{m)EHr`Zjj8QNApO?-c&afL1ZxA zA#z9`Wiqi`3#6RuUJy6c)RrSdX@4?5i?d1+M7j8C$+hO)_ejP1gp?&s-NS z1RwaFpCw--%#v26EOft`WgU2sC%{936)53QxmJSth2SwG&J1S9VC3CM2Y=seuqcOt z#CTZ31LEaq5#osP#MdJZRc(PswWM9K9LvdzkQpX-@}OL4S8A?Yx0uht(J|cwnK9Qa zEAf*M+`n7O?bJ_|<21tb%~&oH5BeiD zBZ35Foc1R}%z@gQvhVMZ{eP(6FdH<9x`w_)xMpCl+Xb;m&$k%W-Iu->`YdgAwy!*D zV>k+Mi6z;GKkUdGsoRZ+P2QW_lzyeo0rQ984&A8y66nMB?l5TfjtGk}BZw^Da>ouBT7T0C#OiU+fWwiL z(%8?>pkHHG1NW~1cU^&=(LnosDvI$DG6V;t!o&p#I_9VqeTknC#IBMF8*L>}>M+1> z@(uPlN>=AJKm_R%pyHj^Eiw5xVJn0__N+VE?;m?QyZSM~9;ftiMmn#5@^MO@fWP+Z zIvbBaMu`c3&zZf45Px_-e)FYR&!EJZBCGCr-D4MWTI-pcTry%04KmB3q!G zFlt-Cspj*0gJ}j-3*Wa!(=9a9F;Z>iZdI-u4tO@{t2s#JuGI&S0f5J15zs~7OJ4|@ zq4N$x4)Um5ZKokXT&D!a zkC|Z2I&lSo3&Z@JrVZK)py)(Xm$&L=z$=LxQ27wC7)WW}t)F)PMsoq*I2 zvw6t`#%0{bT5xWq<9Eb{_rR7@d?*WO(6|vd(;Z2(@Sz zvppwMkxc>g3OQ%W^Te>Zi<7{hRi2jeh4U;=`YEATgI#7$eq{WtE5L-8>rof%dk~qH z&P#zg7Kgf%o%PYncqwTBsk0_s+npIrLo{V~ttnV!J?jOg?udw;Iehmm9(|V!Zpzwa z34h5}pKJM|UJi2RN0wdkb?e^d^2zquGr#0l64L}H(VO}g%@xzA8Qo${gz}uHJ7yHP z$(`n2UYbY00g|$zU9O$hZpK(&sf`o=*q~8wm2`ZHW)7M<_re$z%`ojs$vMzrbrR>; z)X}s*XU~YvM;&zkLZ*kw0IUmhpZqi({C`~&v>Hq}*N=nOjC9%o#0i91)PRlwbp>+` zm8IlH-AMro(Hc0k#PZ!F@O}pnjAIeD$_eH48&Ce-1Hd*nY>dyG0A*%zZ!OL)X2Aa_ zh$k5LvyqUyrM=hrh@U4E`LsU zwo854m(VN2Qk%XdYqvMr?b+{=FU_{e2k$!Zh8L5;?204gUh}<6^VK(|!djhPduV;|qNg2;FmHJF_^G2u zPMkctd)3L87fbZ2BRhad6*|3`H%%+5J#t&tXstC`G`Q;I)-lgCx379mGaB4@B*E0POh^C`gDFUm2maHem=&}RfGXPPMEO-eeElh)1?0ei zlc#;t6R zdHK)%_(`%BnVn62`_QSEpI0ESSzLA5$)m->CatqWz%zad#|$&{7mGLW2h8O>n3>Fj zoQo51c%E5?juT9+!cT~;_OkvJK9*=f6lY2iNCAY#ly$JVs9=M6%10l`2iz6|X?Tbo zG?U#Z9e*2pMkq|(XRKANH1(ACDxJn!vl0pi{GKkTSgKgzxVP;HwtDVNNw;K~*oN(z zwRNc%CL1-REhEuiMs7>)-Z>fgg26Kkig)E+TMX_KNKQhBMpk&Tcg|C4f?y-<~^V z>3QIlt2k$k%zCN06|I5~fQRaVx&ZnZcpH`|u zl<3g*mKaR>BeG8_fNFG9CXdK)(SS-T9ir93ki>9a2#2OW9%NhT;tA*}F!=}V9}X`l zEPvg=wK6gua|~|c%7$XtpqW|~HB}UIZb2v0WKR@u;#Z}`frvzLApmpklT;L;Ig#Cq zt|R#F?avCcd0O1O253-lIuGxz@`JGv*aX!8XcRIuc-9s;G<>K~m-SQ>7KL*<&yg4w z3IXi*#a=fICIfY&!Gy=1={y5-{}K3rY=5Zuo{IW+RH78dkufklns8Ms>}fR?*x+Ie z-Jxgmn~bDERRwQmZ`8~-U`8J6~|Um$M8#*(J`7q08R!c!fhKgCwHU5XobMlWq)B@ z0r#&NQPb%7xWEFOgz2>WsJVg+5e~YRUO(IkL{0A0+HL9(0KvfF%-l&a8!)ttn$(TJ zdcSazk`tRIt_ou=JjT+QlVrl?hRrO`P_an6-Hg^EF#wVtujw)s&3-$=lm&pz(z7Ku zbRk?&+ktRA6R0WB#6y%}kW&}SvVSIcYUkoSv7AhK=D;~^rCZ<@0sT5| zZMz5qlc#3N;XXW`eH8;*lmZBL0JWV-dOX!x9m>+A2hB@Y>wb_#F4U7^a>fePn{MQo zK!z=Dgp3%v6p<4rmO*sOiR)!=_FwM)CVPc#8=mWI)!}w-FAV%z8kUxG;C~5WGqQzc zNv9T+;vlrZ{ii@$0VAeQo-r`n41>m)p~`e*g<_tb3fx@anm^!bwgIEyGA@XOb4;qG z9s+ngJqs`s!*4LIP*mz3wj4a0qdP#bB?t@>VoIOSgl8MRAw$ctJu8IMURyx*eQA49 zBF)Gbjsz~AR3bAHY}UkCLVrOpaD(X|95{qYBti*YC6-F_{S+n1!m~Kjh`A2|t{kx# zR1)LR41e+TVN8Dqsl?X6_h_$P*jAn5t(h@_n?|M=r(SGf2jICt26kj7vgCW@S7&d& z<(mt<`w#TPS^yRi^GxFT+OVl2bmK*q^GKOIR4_SrNw~lel`UT6w11J?u3u^&_m^xl z%4=TfZDF}uZZvAe?N5Em800dvleAh7oaMnrZ{>8omB;i0-*{@#;`|EJ4-X71X(YYO zS-N_#8=ZjWilk$kK{V+PnuWo^aQn(`pJ2}gHa*c!XxC}CYA?|KoE##j$gSkZ$?M32 zKsffo0rE=X|iMrpx-9^9Rf$Y3in1=}={s_J1(V1w$*-#j40And5}X zrJRnvr5{AhtDwHByQmIRc?wxiCFx_ZOeLJ+;?i`o!Fz;BFqm_mK}Q^4t1 z7jT??vAKmnY@*tmb#S%kbljJsH^zv=WHBIYzOWOg^W(V_+@<3ULSIP$0JaDKcq1!O z)L!_}OThgo2!DqxnSfcS0ouE2_-QK2o^VVTQF&13G?a#p{Ym{Q7rJA|^j_-clF2mk z9b8BysIo<%vivoooX8;P8By#=!ULbM%F5+dT3K6jGLr&q06PL0DK`SpI|~4=yi#Yr zZa8XU$~;;Mb(#{swvquC0F{#-rh`!$gp?XGa#Dkd*?-%?vsjo{3_q^x3vN204YeRT z&X;ghW=e>4AS>-O{gP*bwWh=cW#$<)8H)GEO6e57?c?97L=kcbTS8~ZGkOxd@y<4=M(CR zveAI&5PzEb(qp)&z`X`;rb{lN2Xx;FyrtYSTl4~rG4DYpRb5J`KW98lT$_8yyCl)! zsV=9f0Y=uA(D3InTv!kqWtRAyu2I$yFoMi*L;0)Bj{~AR&!#p5o<_hNfd3}Koc%@& z_Ym?$Wk0Z_FsnDOY!};bb6GXK92|Sq3`$ftO@H36nLy`4Ux&V1h59-&X_eZe6-%!| z@hf#`H<(Xff;D%%7G^wxJD~U!TJ@alGqqF#I>2;rAi7!P1(Z5Eh#Tl?X2+!Lfbr%m zsySekWfBso9W%_pwTy%H?WNo-K|77WsR4)%5*@pW>De7-9+klJq_|oMS##j(Y6YK; zj(@q7)rA>;LkAPi!eXhLLZxs7Un6Yj_9oQjGN_(j_2B4-$W)kc9!TxZ%|KUCUZ}oK zi6wO1sQONckbfq)Fw;rGFbx~6EGadHM~@8UUalIG+7z=ZB9#!+8!3x^m?XtKO>lqa zd>%R%saoZt&SOA+RCGHDPO&Ax6UXQhaDM?RF0ERi;W0W1%)(K*>FPGaueWfbl5P)k z7w3iu4ZKDJyB7K+O5Oaqa!i9UV|M`PiI~23mc@ya54J(=K~#Z3`gUR#QB;zf>xc7P zIKCm=(CWbfBZ#|p=sLd5^Zf9IPPf<)8)jifoeSf9;2KS%8wZ9gMLjEYMX*_Bhkw^M z)%nEsFL6pj{{fgmuJxdIVwG((S|=Xm`=2`=>3{c^ueP_3Z@1M8>0SE#z;_*fetYjz z3qPpOt=9J6wDDDy+RtC4pJ6)YVUZ*njsf|y@f4%OB)@$lzw@DwzUQ6S=Zri!d-+2T zku>cM=USBp;P3Ozin=}P7&{z9A%me?^9zCUBHQ8XL`00&Yuep|U?0;ZAE{ADi zm~|_+ODO|eC_S!Mqm43f*2r>sxC2&nOc}GA*cs{i~!07pkMh>7w2|4w=(8&6Cj!mM$#fUX9~6hScJaZC|`yc_wWf0 zZ>cx~I$mph0;kdmJ&rR8tbd?44Ue&IwJ;m?byKe`A6yxLF$?yOy90Ks)1LAC|jVg3kasutL01}!Ohik2Kr+ecHp?`?Qa1-&DEv3GT=tiaA}xg>sn8 zJ)U49444E3LlBbSa+L9WVb%~p!+csa9!}@xV$QR(e!7ROFu@B&ce+EBp;^#wl>&s5 z4ExiCY1Aulm5`FvRDV&*@pPmfm0?1;DwQmjzD%a-M#aLAkt|UJ6FBc;+YyjgfGLxs zWDqA!(x8KMFElxi%+Lv@tzD3HX=GM>ZR|EcOu&gDIw1l$!Xc^~?YII2tYS0fCem_5 zfb0>9z{^)%6Bn#Feuk@$fB>y-R+b{4Nm~ZO1=mq)Qau7PP=D_(S8CwJeg>VXY35-S z{0K-de6^k6Ag0{-AOOq^OD4-@$lW>1DNGif3OAa#9vvTOLM5csrCSro6LDt>#sSJa zY!t>14--ZrtQiMH18!Qho?md>gh>j~Tt6SSG*Hgw&BN^AofF}TcY%W;=H9c{mvH4Y)*!ESR{ zBP@^o3it`bNSiq6gEU95#KYC=Ca9yBJ@YtXJ4Ndl5YO{zGquupHuH@ZVGd3hfriRl z>;%XC>K#=O)eHNv!mkpLQm|N8lBWSvxQ)Dmyqf$nd4CuA4e}oHzmkuU-zC3CK1KeN z{2BR6@>TM; zd+Gb=`+w<&=!fa=&`0R+(vQF?9W=o9o)^gmIIMI{5ZfNnS$Uq;68d2p1B4igO5 z4lh%4c7Vi(PzV(1C?dp=Kqt0OJxW)g&8&<-qz6Mr?vN2DQVqVA<)7_ny)PHd0d41|k{v<~PmY*jOEd zBE@9>U@Q+L2X2$9+sI6OFIgQI<;!s& z8-LiFf@R1iXs^&Hs2hR>;X^2b8xcW^JEJj4M!js8O!NtASba@ul=|)l~a7lBo@Grz%rp&(eD(TOq0zq zUa~nXhH~*meICGzx~2Mr*B&LC-*XIal7GkorxC|K!6Wm}avMJ#kyy4mXHz?&}v~<{C9Ow)6PUEd{GTl-I_DfUpEvjf78cSwIlB#(VLONhD z3Ltt?n!3uPXfS5NnKht5ktxrB*%B`Vh3vgc=Z`I@;NpkUuQQ-rv#+C_04qiSOMlKD z60Fb}c{flXV>X5doYFD&vx}JwC%{XSQ(#u~BNCjxgIh8IiNf`pc|b`AI02eXsK#4> zNs&*Ycb?sd`Hde$GdUYzHkCZgkvV}$`a1f08JRjT#2Q$roADwSLHswr2@qYM{hiQn zr|O2Uf^VN7+j#rg|E|;D5ibOGd4ERULdnYj)ZY&!IH&YDJnB)dL;cpb+q2_mP5@cp zCr&Z)e%iR_CHOQ#jNONmRKBeAtA)i9VQLhIV}a21GwgXMdxZi%KvQkD63I1V!Nd%Wh;Hu|ZWS zOZsr3-o%2ylcB3qj)uQi(-#u7hzDSsQw-pl3Uu)%>%eh-7?Y~$NybiLU~-46ijc=( zK;-NiDqR~G*RwHsQOen8bAJbiCxXEuXCDOj#=gL39{T3PT;)aT$2qwJhxJ`33%K%K ze+;gGqUNK5iBIA%KPcXU{#K^g9eS=aos6M@v$sop&g_*f5I6%M{Hs77NXi}p$cYj} zyU;Vg2sit$FZeN?epNBLny4{MCwh$PyNZo|3!eCv6I8#3k~8p-m4DgVSr7-fd6O}t zw9D8EV@~A%9bBDYkTbxG)Rhh#XBr=GgISi0(-etUEMip`CC+8cDe zXs>TQa@9S*_{yS3$yG;pAGqf#^4ZPfsz3+M9b4a9Z-ILYIJkdSX;{jJQ+Vx5vU}To zcU^tgeYbsxx%tc?le_Pp{UP~Q{@8+}%~(aPd@K!xBygG9E`MS&rLTS2EgzbF`}xka zHb{Ee2FqrDcVnPNVs4H z_!;?*6L;LG6c~I8<|MmWdhC$pSDmn&-LQNxjiSr1 zNPhGuZok05hJTv7NkYq^;hJ05TA{e@dehv`Q(_0{r?gb7Xbo*uMS%A`;9zp&20)upaq3A^I*`+3cuuFI5yFO$I&KT{-Jym#f5t{8U zau4x}uQKlAo)?xcTD}=tL2zs(XQHt_?3;z@2To#ICT4=WQPKskAv`;3w5!GWL*r&Q zUQVZ*M}KtOAI?fma3W8-j1%c3V0UEh8-Z|m+RcUNbd09qacZZQ!72C*vxQOMBKJ*$ zo1D45if0C9DC1JP6WOlLxvX9qCkcA8r1iDK+9~Zvka=OOwT|)av4UYmX}-UW%DF3z zkY}~CeiAMA$Jn7bv8<-k*nC)lSphv#O0|kBa(~rLaP$uol^tCt@Psj~vj>Fr*%v-C2%WUfimkt?=uuSg&wfi8Tu-&c3i*J={9H3O^C2YFFz z>)T^q;6nTHFjKFoY|p=|Z@fr`_x#B_$xEL6i{+K`@BGa5=idpYtGB$ewtW3}W*=Nx zp|AbU+RBrkefi7Z`OdXZ5AJ$7{CnrxHGkUw*dJYxaBT-!C7sO zCanX`?285IIi1$ZO0)21U+7$lhh4^`_Ve2BA;a&MMtj)_0L$Y-rI*C%-UO`LS${0_x$Xw<{ql)f(CB?qtaAx$`{x2smX8TC~3S1LC%+MDYibqz*DxT)WgAe zos7Fv+;(if1WW}QMW%M+Q7MQMr2fTloQ%LgO_0sQqqAOrR49Ym6AQjSe=ZOjp^{|w z7D;1tfF0EJs;QRB%o3--O+N#}0DstK7+me-8QY3!3j>(ABVAnXVy3<@On&8bacx%BP*%6NeHUsdS>XD`mCcvk$Srs z$Pz{iBnf?+`!x?ES-AZUPFy|=&(Wz>b6gWVYGmRx0`9a(smR@G%XJLT3V$WokSEEz zayL%^?*im7p~6in`Dt$If#l6+n$%_u$$Z1d{S6%EKEWfHAfrO3y?OG1NjvaNl3&*DO z*|O;l1-U}o$~TMQd`fS=FGK{a3gfM#dCvNL75*1NFe)80U88z8;D0_3b%W~(U=3Th z95uBo%xoPxwsX9bM?zYR>q4@CEwvjhc!O^0h3)|1YT7Kyer}`Nyd}(z_ z2xc=~vJ$V&K2Aurf^%Y)p}WZg0K80Gtb))GMw`@JN5WH_NT+9d_NvWR>z$Q2VWtet zz|HGnr(g$$I0pk3+zn@m?Z029o<~ ze^<4fVm^lp3ct78<(`#k!03$&HOY!o7hqg5$h?;mqmGLN?uc4H>M4J@P(m@9UfO>M zj{)F%#|Biqgqdu17Mh+ptY<+_L{`TFgrHX{v2RnyA~cAX;#RwVFcp3(gIY6kq~|-H zB6~EYG#d9osdS5CP&uF+)Y{&#nJY3L9j$_Dgf93{#{o0+hL%DbZJ8)C`%*y_HYsAJ^L;v*F;5pvq6eGF?4@acps-0(k`4#Qam@B zXKogzn0+YhWZP74yNB}L8l}sh;(gr6MliP=h5^+x8H!3qS+lad0_MPMx`3vjF}~?p zyf^zdC#mFlL+}zK&Xb=O=GQo*cUhdQfPv9BmX;5lTJh6d(i|<0ZrLRdtew-TBu#0; zICj9U@l@j0%{qVe9)_{IlTz2WJK4ey9-v>)eo=e3_S^FvoK(;`+uM?4VHQ+W8ja1~ zHe?H6nWcLxjq$?qe79Cy(2&mI{RjhN3(u3pSZbYiltaT66hh_t0Wd@FyEES?7BO#} zsfD@)9-j1Zhu?)$!z)u&cy(=HTBRnER&kTBKNjTS1{c&rLfF^!9W;G z86}eAPB?$evSG-b{NNR*uBbagmJIvAQnfWQIqoNd>mO-k`WATQ_01~{hvN!uoAdg? zr&~TJT)IBPpxMusQymhXrJY?l%Bnh3->9u1xcgBdc+tBEkrNjKPw zxnV+8%!Qrmvse?Fg*oBYss6Ac#ciR7=y;u7!?LTP$QF{!Y zdx(EX5HU5?l6B_kfO{Jr7L(p|o=O6lTZ&ex z9Y--IMW!l?Fd2KKxxcjuY6T`5(!qSq7AnskfW#NPL$^1`=E>f%m~I{-m%faSk|Z8) zCgTbH)EV0-MJ3Z}E~$(It6pp^H7s4N4k>^BlAEH)|=!jICf}>Yl^85U&VhM--<4Ai^V3aMYzxIB{5b0EujR&YNuf{_kVv z9#}NWeT=B+dTC?Q)QP_=XbRBPw+{GDy-K>5``p7tzW(K1QmMJY5*R(n!O1&ZzuKP= zatBs*DF-m2-YXcpp#~x35*N_eo3wvWMF_NL*d&+`(DNy75jO6t9lA>J_m|%$&nCb7 z2xZSA-+uHt&w2FxweXMq+{d5&9il($(eFIxr=Rn#>t^<~dp?FRLp!KV0kypVS6r%C zx=K1#D*}guqbiqOO)5RnN(pAvFDXL?C{uz2^oIr0USv=etVE>KP&RRmMi~vQ8M*VTG=ocv-$4wN{CPot` z{jtg-z`2D{Z?w5e)a?MhjfJ}Nbn%4gsIO=tF6K?fpx5v;c+zk(>JNYEzto1~@zMTf z)%5IYDYOJ(E_ewk-0JncqZQydPksw0K2XmiU=NZH0GL8RCP*bo1+110#lu$m|P78(G+Z@CO_rY66~~ ze*{y<7^o#>A-N7}6X7aDnS9waSqKO+a!E@MI247dd=hFJAq{Yt`B{QQO~4WMW)=yk zDu6(74TARov5Ij8F0CdKcY3)TBfL^77o|4HXB#ZgPHA^)KdyhhL3+cJZ31 zHKIjlFSM{&SvY?WsA8lGK178QIn_Fuc7d&Rry$Bxb+ku6AR1X#jh8aq6Uwh`)`{pv zc^=a=01%DS%|y!8TAqg)fR;h6)y%34U}bG+M`;>4dD!|8w|(iFAd1Xy>Grq=6j*vd zZA{Ox0K3ti zJ@xXkUy(u6JUe@wU=p6to8>rhG9zpWw)AQ@&*FiJS!pCb5Sa!yq_kuXg72O=C2}Ey zAJdJJfk|iGZGHAlc#(ev$6Zk-Z(#iB(PheQtL)3%v4N8Gc1}31lP6mV$fmV_ z(!h?X)O&wHV)A}-V8yO9bHi;fwOzvn`6SdG)O3f|w=4!7QgLnD%i{neg5^Q#oGN9d zeo(UIgS7!;gQjqOvveTvL$k{zC3!EgN`@KLqTFwB(7a};mIPou1G6mBo@xDsuxoA> zXCaUkGnRQzoG67Q>2IZ#01zdU+!T&wld(}VWZ8fHHx1tH=%Dm!rLjD6+=`!d+;r(Qb1~|s{4dU0u`j=$Y=`uAbSM-I?jFRo9{`u$s$o&8B$6b|+8~HR=RipKiUR+#0k*s8HFRdBJ*f#R1 znmbEHTzARwThQuEu)DK*^YWD#v|YJdMu2n53g^;u;6Q|Y;4-fS8QtY_GDieXeyD%u zj@)=NHSHKp10Pr@ZuMlf^R^Dz*d(Zy`Un6e>6X^=*82MPn8fX_iYFv!oAmqWFTKD; z2tGVi%jztUNKS;K!f~(^Y_A+_9bQ}sEw;T$zKzv}c!~Ic_$%>`;$H!(F6(kh7KoL| zhdUCvZKTS`3NTn;%*ZwvwiI+?R)>GqDkHCvR$HfU7sY;HICcxlQI|+%q0W;SBcnoR zEs3D3A{7H7>^e5wu>3IZY~57Fe00 zD~=0}>+X)aoHtVfTkZo;jOj2^aK@;2Gn^na32x$!oDQ+TNe`VIMYJA}lCXbHIwVVe zOcoJ>$tPnDghC+^IzBE}XUk>I!3nt|mL-=~!h&(e=aY?qJq03NV}S6fMrN1GV`XS| zw@gIlMcVvo&S4sl21mIJ%HeW3WwvgEg&0tQXO8H0$~>ddVSxn0Sr7`!l#o@1!0$$h zkBaNDjWZne=sAX0HP;{+kL+KV+0``{+l%H}WuC(Sy#=)XtU>;NC|B<9hG(C$4 z2cZN3!@zUm4lx9$>yU<|ixz*7Bd8JRT?1KOXpcbbfND~supFN<#1Ghlch>2Xxum=r zpju-OLFS02s49O9D)DTr*2uy^FYC*RN}bq07|}y%Aa$)UyU!>m*ENr{>Z(vXB#r~( zFtY{=73@cndM&YB_aACRPpLFeAE{g_>z0r#z?%JF%JQa;ieP2=w|#WwQU`yRxrAMoE$rnmjz}zKNF#kf z%A;fxC;xCQfMH{}Ego3OG@^|{Me@8>jWaUu1Jg{JCbR>OC~Vxsj}}+$(2$?)VCBoP z-DK%RMk<-e9jPEpwQUC>X({4fd)URa`jB1KwuR|UK3;~%kAPhJuoh)aRB=la5(zY2 z4EguQb0U8`iWi&+bhKRZ{#`O9L#)aQ8MsT`fmAbFL4;J@FVl5G z9OgaVeUPFO0r3h}>uh0shHCsRQF3K_efhwa;~Z!my71$hO*bUt ztr;98e>n&@SBVYZdazZsWfFHY08)L)&pT@y2i9%NSha&~uWp>cMZUiD7Fx|X*=QU% zc%n0h5`6Kbc;3of%~*4xVw}0Q@5I%s7rGfqqw#z@Y^DdorZ-@WxOoRaa_W5Es^(Fo zoRxoCnq0vu9aj(lLW-r0Oom}QDyu^#@`o$s z+e)mBGTqk557Fd|$RY}l+%_Oj`SjuL=3KvJ#i%hAwe+Bw98K1)YAL;N*TU(YsvGS7 z7HNg_blM)wt+h!sI5hS11MO4M`BlHB!uyqqIN_A8zh4EGZEWL_P%*!8zxGjkipGD6 zo_;^VbiJA;mGaj6;e^}9ayYg8ek>+?u1}}hdwV~?Fc?%$0QqzTd`@gF$h<^T?*c87 zQ%R7+Tu%BvlA_6$n*Lxe#*=Pz>e6Ioer|XRIUHVw=py+jJ*~;{edb~H{EKOGa&b#v zICRtPH*FrKm&0zc~B%Eih{5j#W1CD+9wqsVaf%$SVAUVATK#{A$3HuKoH zO(%4-axJT{f9QlOhxhL#UOQh%Sq$;=@xWVM^#ZxL`(-ikg5a&q{jYYf3p{@@*!?oT z#W}(5U-5M#lGZ)pe3`xozW?>Wd*~rLH^{1eU2(G#JYx?zKUPlQ)uA#A0I%VDucK;UPb|J-Cm2L>^x_rH|G-QLlo z;;!9CpM6$r?tVpSVELck9BhBCo>@D+c4hssO7o;u*@kbDR>-8fCYpH)s>mmdP|@WoDSYTC#~afj@!ZL(qoOu^XluPQ zx@)+(=8`E^Z#$&?!6tuny_BZ!-P&~%4@QA2_h_H01(H$cDz}!X;Ik;IeZ^C1nZf=h zDz>4@^_`jO*%Y(wbCzH-Z;9D{gS}^~%com@>_)e&Zw>};dY@+>KlZb)z9ZERc1~rU z-9FdJHfl&$PgjS{wf4@nLC{3C536@mzEbbkU$8p2BqF~xNA7?0ORu?p_mggz)Iwi= z>-^EP&wup|Z5ll5({H@(nwzue1&Oqbom-#0{aiiq5<>&7%Wy^QzTkOhUzD`_;Z;2k zNSgLa?bwNC9wNx0xiS3JBn{#QyPtb<>#d|q?!=70vd5h5Em4g%!wc^@#{a)V+TJlZ=R3GZd{W;=eyC$Z!v9H7}j^w_2fy-CE?v7WoctqnQ-j&5Zyl z>Qb8e?vu$uN5Rsg|KyC2^vxCzj%s188jz)_A}^$lgeEeR)#EFO7mk6}g@#O?-5C zust7b9V>P^ZF1bNpH3F$oXpMNe(a1Z<%(tZlvp4yp;mRgKxopNN#{UTx8061YE74=;NLkUi!^aQYskZmE2h z>ck0y9Kuo#LAiU)7CA$b%h|fXqQE-G6&n-Yf0+U{+$-GC;FW$}@?{v0G8<6!M`8oE zLO_3BW{|?gXlS<{EGNMrEE>&V*;*t|&RLAR#x!+7{`aXuT7Xga$YvzR^V)5b*bPo{ zDqQlWMOM^mQA%d2IeFdapmGcMwjJ{IYGF`yauoACc=hwPY&%-4JBtpN4%JORwdKR` zl2Y5(t`i2*C8x_K>!;~@9apV4R)RIUv@m~;){D`yV>hT>fg+Pi*!`;y9@MFqc}a~% zPX~k3aVwr2R*U3Z1Zwk$*N8pDLamdx2(Q~A$4)19VhwIn0Ppn>gCzrdo`&9U*7TzG znpR@##gJ^i{dkNYQ)hpm?n<8ZdnTLWeOY9E@z%?i#h+ci{QcvXFaO)+%kuIo|Kfix z{ED;m@=^M|qLW`NpCrz5E1k;e%1=Qr4SRi)BSw+Tj4={-QRuMWHN$ec9TjPLa7obD z&`q58%L_>TSuv7nx2~t%Y0h`((D<^b37KMK#FKUoymXba9>E-2Tg4O&z@!?JPb#bKSnSr7S z6(pAuRjhe;Cy}kLIpTV8a;JFT>Zwzz(_3Brk`=_K?@pFnl7hQ`a;x-`mT0ed&Vd_V#TL#KL5iqH;sIF3NvZsu|3t zU53I;t63e1OXDi}WbMwZG68R_@7v`l#yd03XLvi}xyO4)jN0sxN4op|&7+5lhPd4g zmGAFu5s1_GIs5BU1*(E4z$CeynNx$2e6tjwNJEwa+$$~@Vz z+m(}*^JK@~L3-^Cm3u4is(iTe>B@hve5>*=!WJDd5!Z?rikFI?68DM!EIuNBSA0=? zT|6WHNgBB=uaTEH-|b=f4*4GWJMszn$MUb`*X1+v@8x&p_elfHsU?5aQGGR0$J9x6 zTAfw5sGnC4s&}YgQ;(?+sE??Rt52yX)ECs()HCYu)xTLSt7ENM*I74OKWV+zy2rZL zdW-d-^$F{@t>3dgV|~GT+WK4T8@6vBw$IrY?2GoV+V8PHVgI)M$M%=)uiAfSf5ZN^ zCYMI9=mUC9U#D->KcRnb*RRy~>9^^}^vCok^k?*+>;I*{WfZBf$Sj$4vuOrqV$Pcv znpd0GoBPaL%!B4(^HK9z^QY$P=5NjaHQ#gQot|^hIp$pJT<_fM+~K^!d4qG0^MLbi z=Y!5~I*&U~IbU-A!uf0G8RuE&ADw@8zU%zEYrBCvPa^4vyW@Y};GTD1vs{TH2S~3as&z>&26LBO46q z^zCAbM`s2YlxQ$b)55@8$Y=NKcj{zX8(fIC(WETsD8hf_^9-SE-ANxM&L(DSGz4J` z2Q4@HlSb)S6X_6549g@37Rs#p$fV$F#xv?s7v->_>j*(aXjaxo_GX_{V0jmMCQ1ZM z^U;*Lg_W3C_Ng7?Dcj9^&@jkI-Xzfc|qO5D*c3>S7u)$MU}4KI!;Hsx|rmXd>dbp7l4X`z|1ijFkq*n zDK(#d8yGcWV7UA`&rqj>|^OU4C?(-~^X zWSN|%TodW2o&5$kZ#14}U7~MR&yci2pYeB&h~NR3FT&P&rzAEO7D|tXuAdG8L{H5d z=7oXaF8Ubb9K5+GaIYyfeLAE*_P6V1Jn9ZJ8c=H31QQI;?QfA5n9{uL66G+a)I%Ou zgrI+;g2bd4W<%<^>7$SZrb(ShMZRF4C_N(Uw_L0nmSz(sHJ3@ll4qyT;GRB_h?rddb#K^U_6rh3vK zKZvAJHXEi%F)fkNVJaF1FzgrGeJ+y8m0E$^pYt*<=L?Wuu!NBVTVR2ggM|;%8{ZAnax#$jsbr7&mrAfka;#LW~^U6_tp)EqNSv8=FZ) zs1c+$L>IUOgMlsP@n}F36OYNMNrv}W$@K1To#62;==M2}4`vUC)sf)d+nM9e5D{rI zW6Ep;rn$dG#HGIW$xx>w9p>HhT`B7lYfDg-w~TS`{hrU@{Dh5?k~HjQsAF=_?Vc$-Lo1_1Mtgzyw& zz;IpE_~|x1bWFFVQ5%pb(wHp#~gn2a&;AZv^U+tCfjBkF!`x+LVOw-A2<(*lByAy4_O zpOgM2BV{nuec(jmK>))UjETRX-nzgWfTr1=5Rd51GUSh@L6?*%4Hz*9FCU{G816xx zDcGLL4cbY~>=Lt2kCICwhagrygvh{Y^RWdh9an#I{;;c<n+dmfR)_ zYbqi{Jhrg4+odyt1bN)3Qy`_n#wl+E(OncDbEFs27mJcX&gi+qLK-&W?IS6w^rR5^ z!*q(}OF(g{5}rh&4iF<9A`+V}M3TP)A4XXc^)#s|M#_x$Z8?n?z>Rk9&~qG1EFsNV z@S2{Bgc)Rw^PYb%K-@A}RzI?_lYb{&D#>EBfNSQX>6Uwg;%dr|=;b4#2aDW^TCr+taBJsA#y`CUBDRFdFcB}zJDI~~J>d@_v(JtD+|Ww*ga zd{5?l>eeaxYLysJbtrh|iTmcI#tqtRa$-{exnbeC1;Y>XRt^wa2}VI%yaW5nu^GFU!$XtSrechHN#Kml)2qWJ}!knj;^svb8qB9C2KwK6j z$by(bn$XK1A#4NrbvAfY{1?y5y)eLF26}&XPsI{Nt0NTM?D49LRCsl z8zaCEQy#(zf2|y6Fv2QdFGP(SO-&M?Q`+)W1UL|-p9ZtB@H1kaqfUhQ@ILT^dYOMv z4%p%C=&Urqh)QlyE>7ZNlr)K6W2-+!dx>7D5Vw(jurc1RFHt76^u-&5ZT|{WxS*!W z1A>$nHLEM$K@V|V(n2owD$JY$(xjz~YaynJ_}yhF%^)SM0_aOSQ?k<)KJj5-JokMF ze)$#ZiDjhcT6T_NZbm)D^Hhp3z!ZO@K0V?>QT!(%+L#qTff!w$Z#~9W5eFFzgPH}# zqf55XNVJ{qWp6{9$uI(~jb%O z+!!G`&Bo*vqLiJG4=z|4W8l@?9+614Hk_#M0p8X1Vpo4Bk+$h_tt|&R zwXW;g4tU7L1GLC37-6jLe6la>$k=*Lff31;3WKDbI8~82y~2q}U>r1&S=FfY2cXa< zF_ISp$XiClatbrdxWsYxbw!V^3=lsiJ1pJk;yAvJRENd$Uz54n(XmGzbZC4L(nf@z zqmLv`G+0$}ogE8k4#+HhvOTu65Q!+l79beo$ZK^l3;{+6R-5HP7?ET*#6+>g?xf|L zfFvrU2{qc2OK2K@X1XX=G#4e%dJumJbY4v+tix?)g=A|I2R0E>a*YDVM#tH zM$tSmzSh2$DvpR$!ofxo=7?*nBu2Ql5Q#=suXO2XwaT^`GDk>1Dia}`+YzP(%sR|) zSa^^U7zE>3#XB|l5=yMp9luHgTxWv-Q^_@`JOeY3T@Nxfjc>C(PZP&hWqa9n2JjJ@nZZ~KiH)>269f_!`xkZ8B9nEXFuFDz7vYixEc z44EL7a7!mH#;itNPHJ01Cu2%MSR3dX6u?q{G@Jnd$OO#|L?j}8!AI2t%yP~1nr0wT zD>4po1&MnDqlubmbA&L1Qn)E~JkRh{IzYFQK+F!vDhxHdF^Dx0=m=zyWG_L&FG3_W zSNLL|&;|u<7V9Fd0dmzLZS62}0r4k2Gm1&7fTGZpFmQqDO>_-xlq;2x^E5{T;RH^9 zjQAN;Cm^nsoKeYxWr6ZG=jy|EGO#yo@`tJAbB>_yb0DE@c_bpN2qr8t`EjjgtBIk_ zFlIJKVS@|VJw!P^00qI4hEf%LBAK>UAas>m<_XZ#2GAUw-DR-?7uA7DE=zl@w3PS! zhrN&Gi?n7g1}t>no12})b4tXHp~r-OC}>yqEdsU3BvLjzWia1J15@`%Rq4`$1oH`A z0pOb>;S~&~SWhy_nkDuf3XC6_oQ&+nPVbNYo5e01kiS!L5Z5QVRr)_}XZfh;@0GMc z+6ZzsyByb0qGOcB1ZEK+(;#YG#o)W0ftqc!3|_`ezk}fNQn@u z1iH4GJIPY0fIKM8LU&$zNv&N4h>Hx@i_Ko~a|fgOV*RFOkkr=fy3uxn5yweXnQ??h}=VLY}fn+TV+w=2DfUP^i$f5{3vqR=$98=6V7FSx#w%o#PhL@ zm@zU_t4`E#>uDIc0jgx!Q84PaEj!wL^XAR1Rcg>}XF928&24N4sTY&W7^P> zuU0H~J<`DL>DZymmD}hv;(A!k@AQHQ-C9rmnkHKyBn!;-_Tpk<6;;wo3utkBL3KMf`LF8xN`3UAeEP;~u040=7Y-D7 zzu`X~D8v_cfBj?X?jzFLd(L}RP}YtUY1j0-ZC`ZBRKEEB3un$;5SKpx`Fq8+^#8k} ze&2n&pAhP7Ajad!3vFKGpp?du%|DFDcmbiI;_qW6?f?niTyWbHD z-|2o;G`4sDhg{kH+UCDriGMt#P|f`pDo-JL3Q(d51MTkD3|be}mJKFh)GjWrgUqaI zKCnyt?k+JCf)HnUI@s($?h<0=QBjApxj34Vt^)KogQ;TKcSoHNBP^nJbg#ZWrfEDZ zk;WJy4C||t8EPtj9sB=$#Z8(H)S<}##yaY1&hX()M zCw>nSjs7k_KVE)*Ldb8BRD0mO7au7RQApwH-I#%qJ)jYPk6CNEO1w&KyeViRUcD@u zzUl>okeu1uRl?|vcaH6bt?FxAO_~VlxfHtO;-(4*`6e`VJEQ zocqoN{&(xG7cP8f_xFYLH~p2KN^~uhqDhXZScFl3sY7qm%TiCJbSISpE((^E6NNBP zmdSY)-Am;^`6s)#l732d1d^XrIe5^Ee@+*}d6QgW+m%N{vW<&zO8*=5+dE2hzu3?_ zC%Gihc!PB1^RWb)-LBHrE}8;d&W4>@z!mjnveH6|loBV$gf|NJNeod=Z(ePj}ERnNe+%WcjA^87b`G4gDm zyjlC*_)t&}x0c-iw0-ulk@HLKlRDy-K31BO?v z0(hKbU}Rum0OBW%TYKX9ZN4&aGrs_eFkJQd;DSsuUuNC}q&OIuKs*3R918sa0C=2Z zU}Rume!&0)EE_;1^JNA`22@ZE06xS5?|7VJU|?WienB2)*+9HJA+_|tw06S^K==`# zodEsjYYCG;av*;P@CbkjatYK51PVS1U<&371`C!9Gz@SIjttffN)3Pws142y@D2zL zA`X-f7!SA-0uv4sR1^Xf^c8*;%oc_g>K8y4To-s3`WSo|t{EyBiW*ED)Ey`v#voK6 zlpwGn=p#TU5+_V2W+#Rx(kLh>rYSrrb}6nY+$%CH5-eKUEnqHYE`Tn$FXAu^Fs3oO zGek4iG%7a^H<~y`IF30GIcz!nIwCrJI^a8OJOn(RJitAoJ;pv@KG013O-ZR-;8T2t8~7Yw z;7fdkukj7O#dr7~Kj26FgrD&Xe#LM29e?0Y{Dr@ARs|#(V>UJ8Ur*&7+5&m zghxO`!h{XBvywZfiSaO&JV|BChBu_k#%{>7Cg^`!EJM$|gD3X>kji4bz1Adh5IOKN%2 z@w_DGN${BWE`@cK%$JcrC8?tIXNPGWD$;7J{JBF~1>u#8jPzKN_tsYwv@)@74AH7oCc$!??<2pPHl2vd&(uI?tu1eNsA&005*My}mhHXk}q!004310000k0000s4Hx7RXlP|& z0043n0000O0000a2fGAZXl-004480002!0002! zo@LC2ZDDwD05<@0C;$Ke9{>OVAOcJZ5pH2^WdHzkNB{r<9smFV=H5yf%y4gWbN~Q! zXaE2L#Q*>U|B8h3s*?x-L4Ur_IDvtcfq_AUX%CR>fzXT(7z`Pi7#NrsSeY5Hf`ByF z6b6R}j1MZAUjVsLU=pYiL;wKFdkWJ40C=43)CW>jK^R5hGce>JlA|C9qU0PUiR7Sy zlB1F{M)u}nW+&M9U6&zK-|ON1-KPfX)c`3#a?l*aA!(9Wct>m`+<%Ql_mjzt?#E;K z(Vn>OCmtRj!!@RB_&pw7lfvG3D5jD|IvL?y7TM&G8|3hWJf4zI0fiJ%ObMlwQBDPw zRPl^zYIsg9b>a1bdK!31Bd>T(Q}`4uw9-a<*xx}XU3Ak!FMaff*8qbIh3hbH7-5t# z#+l$Ple}Y!X=a#Zj(>R;SY(N1-t&Qvtgy-_KC{L;8*H-0HaqOH$36!f@`bM)aU4GV z38$QK&IOlTam@|4+;JcNPLd3*$)@Km5jQGFEBJOG&CoX8P_)v>V#nVQ6osp}k#(_I6wJ|LHMwuGi4H zK11jF4V@b>bboHp(77Q)=Y|cPdt=f25krkpLya**jd6?iOc?6DHPo9l)O%;BH)W_d zZKyY6s5fhYCmsJCdSw`8cdY^e9%Q164G-bX{d6+^vML%mOidY=vT)(rL5 z4fQq*^)?OlwhZ;Q4fS>m^>z*Q_6+s*4fPHT^$rd7zJD0%eKpiOGSoXZ)H^ZMJ2lih zGt@gb)Vna$yEN3hvgkYK+EDw(Q2W+U`_54N-cb9Sq4sw}?H`8PKMl2i8EXGF)P6AT z{{pd~OGS8`l)Vd>B}a88m=Tc?k?+i#&ztxCsC#c!S9MkOeO9ZxtJIB}Zgq=pBw7z7 z)TXgOAb(jPSr{4N#Vs>!0xxIzOT&4%y^tQ=l{<+5z?pz|1rWgwd=JzHI0ZwNFhBU#VYA+ z(0;cgg-^tw+ZptC|0d)95i*{QXWL{pJw%30l7EiU(Qt=MhiQg?9)U~hBu*3j)!ock z5=)`}x|8v2y7!mDlf$kbbDuj_JFM%^pxOaep5}qYYOE6v7ZP5>9*-fEt?Yi#~@<(~2-SC7?nV-6rEuGvo zbxE0~t3F((cW6?xw5j$iO^arutUKt+*=UeWpl_h7CgVYWgQ)JCO-I8lQGFX{X_GWa z5<};7JG03sn~jq0M0N+sC$3q&W-YreZGRnYy?V16`_Ox45;YS)&-e8^`|{AS4Lb@4 z4bRI*y zeC1v5`pO3$`SlMj+OVJgtya^vwHuWzbfCH$6h?kB#$le!rZAjIDVAN?+Z|63i+@56 zX464`HXW+*PoQ;!c=zmhI#6dPSPbuw$`~YUU0nqIu}xC!gp@p^8{+(svDXFMb?z4r znxSM4V`NR&%W*^ZT$6KRkqtAt-f?7N_WiO>$+?N{JC?5Nq-%OdVEjOYq8hutrI$i3 z1ED(}*S%QxY|4oy^s84W@jvXi`hP`9EN0G6lsNlVWFFiacA&p>m%}rUo&Nb(lx)k| z+_$xpQX9FWDoKesNS%VbwU^4B)q3LV@^KP4F4SJ~*2!)z+vnfok-G6yQzi^b$ zqs(%RaOprcs5o1d)iDUGKk4tQMzlTL49yxdyQY2UL@lY?y!v84^=gUjn~4`&Wx=KH z>CHncXLg$1>JoE%l+>VYhNU}MGpNE18^af_mICgimE~-y()3c8b4=u-y3aR_-g@-< zkpZ&=I-NLfUd`%Z*Eo5_=6~^FTDClFx>3jzv$R)fKd1ec_O$jNNknR70KK6av_U$3 z2@=s@vr!>GJEV`zUS|_kK&hdu5REB{*g~CPr)B934>hq%CbKczU@}EvMM;_sK^skH zBP=pKLg3Uo8GtrhXE5v1WE;D^Nj6a?M~hAdQBC0DiRxXf!(cp>sDI!___z$NhuRF_ z!Jy+}xWFgf{$QBKqSGHkT}Ih3g}M&9X)#`151I(G0JSKzWZa*ms=`H;)ZYjim5op! z2E%RA?}#`ZKoc{(=b+C526}AYxm7)e84yrLb(+@t4hVNHv%}T8#{$9P17V(K7q%O9 zre9{&oKhbiNEqWBWPj7qc@$Bd8>aB2MJP9P9pr_Dpkv{F;kqa435;MlrOvNJIiWE8 zgc>^6C1^^%>UJt+!K6+FC_E!DbVu55;#pq6&N({UzXV#B`K*=(HQ|Gn;e=W>ICMVk zv^LtUf15{J93CH=lIh%uphYyUf@0;vr7I2|sIc6M+|ZXxt$#d;V$&6lJk#C})o7jl zJwGCGJ&ts0vjEh%1@|F3r;aOh;#!QFoKoJX=GJOO2tNY(!2X#uZCz*Hb9y&!Ubx)O39X{s3%F(JoSP$lZsI_phT~NZi2$XbcBQ&;&*B5*7?qQyS>?Z zLRiqZ2Gt$vGSi|)M}4Me2jvgjn+YRdw(Qukl}O&Qb}F1^UMS1&+qK) zkjiAaxnW%}#%I@u*AIu+zxamodzL5U;hS$JmHC^=^*8SrO`MHInL;bk(aH z&jxV(%YVJ?{oUEd>HN46SXS(%VOj~BrNJ;tyesPPfYpuFmhTu&N}g^yeYd|Mme<{$ z(}dUZP^=8yo-DOQll;r!o3~@Xm!A`v*yWW6j@eyrX5Ft*YeALbI>?_x-;yY zK3#m!{H^E=1NnAuT-n#jSKY|A{CN5DXB%f%UhyKg9OtQ( zSX8oy&q%R-e#eblwXhYgT>nzZ$w3k}11jZLpvv}&U4Lc6aU#>B-3y>mZ4ogC#DDUd zFo^Ap6VcLL+i#s|y3h@j_9Hg`OA+a25Oz=I08djcZ@Ho5MS>Et#n=tZVn$6$z>G@7 zR6p!v`?N$W>|q-Rx70v$*H*@`G-iMZ+hF@kVERXG5W*7cXV0GBoQlgm&@9;r@@^jK z$IKJeZ2qg2u1;EBOl~T7bo%9ECV#6Qo8PQXFN#LMet!ULNrAxJuWMB^}WoTw?t8b(|(+aCAaat;+ zVcwkojWAhf%a41N-_AshMSra>5D(J_Yq)ZHz4A)WOU&gfL5h|HK(-KU0QEB4lyR6a zFBnKk4JO>&_Y!8d4{jbm=INatunQ`k)1%d=TcF0c*T}&ZeVXbOQxB}rbfh6&14?+V z?)n5wV#xtRo7W6R_UjHa^Aeylri>Tx85sv2F`aUW!68bkj>G(yn15-ITcPC}R$Olc zCM8@Dx)cU$V85b%IqI90n$zt28{@cgwIijIAUc4{9b3ptW9czZn`qD0eiX)XR16RN z#V~!LN3m0p2O$0;Y6ReK+DBNnKtjVQYtU_~&Z*)Vo&uqpOdBX0_z&skXbN|nkgxWQ znz6OfPgYE9oWC<^WPkMg$03}?J{eKwr%;Lpg>AG`04Z9AT!!ZgEX}dV+cUdv5kUPXT3FJbhogp|kl{c5d4tNAEm_ zH>KqA>DD1;>OE9>oS81~W?rrf<7uB6@&n}3eETuzuOC5nHGk+UfM1~8Q6Y!`5rHfM zrkxfb7>RdZohiBts95)VIE4Cxt{bbK+(sR$pfey*at$|P!`g_uQOC~K?zs5M6a7dg zQP3>g$XW?dWM1aJEA{3vo^z7{Vjl?Ov<$85 z0#Jl!JJr<}tbaeB>o45cihR`bhMia?5K6*`>7GpC2(;Xh!LrZ2Qmel{7)O(QrPi_B zh&T4PByb1Y3v1GX@uFl;FP4EbJ*>SO_2LEr>^z3v*alU!PJGgt^zjQqK;Yxg3b*e7;4uPtj0@bSLn86zOF-OnvUBDoDcvsx0gYTs1F5pEXjQaGhPq4 z^c^_O9SbJ%54s8147iC5vTE>yZXy6oJ9=>w_`&Rd+JAi#b=K57dHRQ3;Ub5_D=fiH z`+s<@;D10GI9v(ObsDw*m&dA`KuOCG-uK<4BUR;5x{AuXm4myLg7-@pU=BEPOS=L_ z`TrM=OuES^8BIo$?rd`D2SA!5`@35TK9)>7cGD;U_!uk$d~}c3mwOv)FlRkix+$5i z4TtdW6O%)SCWonh==_m5=p$TYOqh0e3UDzFO@BK)+m1uuYx`xdx%S{>ZEI_dZEsJG z9h)rVl>P<%KeVdWgckfTXgll59nzKLSbpZbfAxj@`uqlXow+f(`eya*qJMorf{Vw_ z9K9F*J9_5W#fuj|dG;(|#X_&z3w-Zu5g<~079jno)Gl$j{cQ1=AN2VpI-D=R>s?>^ zL4W_4^~`^yYj>}#tW0)a%gf7qZThBWX(6;J28~?;AO=uitiDa@mmmGrcYgS-r~AE& z@7|eScP;tuYk!t}`&i?q!|$1Y?CMMQ07#hD(=OMZU+B2v4;0gMRLq}|@)7NVJFwds z%*(D)WZk{eXtRMWXUZ?8&Z&uCoB+W9eSf=g+0aQH>2lrbMB~f*&w1JNV6@HLUAwIA z&HlyaLBsutU!}v!zP4Mowogr-clyZ5%Wa-JN$H7C1T9aB!>1~Z4ZoxbQw&(7aVJ1Pi^UwVAal5VM`Ca$jkn(cKhX(TYciWt%eoDYbAMx( zqtU-(WN!?$s0}1-@hZXV8S>3}_7OavdNX3>g*i>o1A(5k z4d~tj<2_h2-E|R-3ZIG6X}t~8@C{Z)XFJHU-8=!z%;qX4j(0*o$~K=*ld$%Jh<%?!|oZe)OvBEvJOQ_Vr!^lDO= zX|2cfeEvbSR8gtk?Ep(=TU+9MC&Io_K$^XT{`n7>BhLlddnuw3r6AO6@P7k7d-&>i zQJpJh1)U2W+JO#UV3^S^JS=**&v#uuQaPZ~!Z{`S0PG>p88 zG(p|2{_|^I#X*8(d9b?mwxgGghs&wCZ22HT0h?DX-%Wl00XwNVS<~T;4DInt>6f;x zZFl?4ix>Vk5&F6x$fz+$e18ipwp+>?-n7-#X|pbha4 zw#fkpb}#YLXS1nxjrLaU1KNkQKSo}f#e1OQ61M0J3gA2$pa{X#8xO_`sud^=_`*od zRb>#1o;!q^8v)#`zaVXZslh}G{FqD&wl~=IXO5-?omCQ>EJT-$3x6T)cJ{DNqBO^- zK>izKm@25#?XMCA-BF_~{A&|>*35Ng)~u41=3Ct1<%*T;Pf|N72}C}Yh;m_b>7*j@ zK;9e?0aoF<;TeN{5%)RJU@zXNRs_t69YIRjD8_fTqqQAJ$-YaL*B}6bf^B zAeRD|0389E1kI+-UVjVHZsj6?spXj^gV)SbAP?pkd=RwPG>IfHv+NQBjn%2i6ppi6 zt-Y@y$)mckO<}LNwsd`<)ZF8QNnnyXH4R<2Ef!fO*ehxRUDYGLmG7YMj&UJ<4hkZV z0^bURFaim^z#NvoL#?l_W0yWC4!{3lBIBJLOnxYs(8sFvQfnz}HG2Eb zj91f;IsVfAD=$BH>deX8{qEZ4ylfJu83k?a`|5K{JAJ7>Ke#p-$~MrG8+sU)$c^yWbJO8XW3ff>CO- zs2%aaWR@kpBm=Rd@1MW(o$n+U9-4pb$tRzje}C-$`|oG&{A=^Ck^HN7e)-;ezx?>a zr%yk8^)4^l&yFDS0!1XVft(Fy)&X>MQo9PS>@I9` zlYb=Li89|K<*a~Th;as!4GM~8I*Uf=qu^`lhzFI{&q#X}>von^WRO_0u)i1h~tBw?ks z!BU&1kap|q-)!3gzk+$1+;Yo9YfWlXC)?|`E(Wv787B`$lKaANv?Kb6CTexX4^g9LE)h&EY-M(t_U;#f6h-HNr zGtDq0bwK%jf&YubKxV@k=$D1|*?*=0j-ck@bL!=3 z9LKkva$KhCrh>%uEW9*?Vbe6@3h*`jA}!qqCG&an16%4<)U2E z!L0c87`pH<@Lw+*UUB@|6R*C;^Yi@fGtYU>>AQ1od8cC^rgEb6@BhWF1$~rj1MPrz zwRSRRDZ;=+nJ4b$Z*m}>C12qu9I%zmlOzZ0R2t+JIG~*DA*Fy z8rI2Vyv@>tbq6Y#y`#o-jD8Cc+(op1I)Mvk$_c4_tSAx%C|6FdB!#&grx{SASSl+5 z73$*r-c6h+3{ZcA7WD+KgbofVA_a&5k`>~EhZkXGD42E7`;nnPB!3a@dz#{;O{V%LpX=jBF#G3BAT%ztuR*P;fK0hhW-S%;ejKq5jdK}ikJH7DHVwJCZ%0rC7WHR(`1R_dV(p~prop;~t*Q=)NmzPS0^uxoh0Dqkgw{WTDIi3$1*|iOf zsCv3fU|M384UTab;lP}uCWrc0uv>f^&?9+A(HAC^;|S{Ru$W1C;0OmW*#;DN56~b+ z=!YuhN?bCfY{gMkvMtkfLzg)RJa-T_xSpl?y4*G$CvqIK3HpvP7FqyHb-GxsxXj=dn@sM8)8i+iStueY2B&ozXzYM*`qvW|-KWpqfp(I%;MUn&b*p zy*aM}yylEjkI8Bjw>;aAp`~~7{k0^eyb%su?>r;ifPcXku3=#a3w|c15CRO*xqudx zH9dn%=xE1rKsv4M?P^29JOG~j%v+0mrFmuV0)L=vqO)u#t!hQx*&2+gn{{tI(G4v?; zNCf?7`_%C>yJW52{mL~r_wCSR6iVtiJ27lvF@G5A6lP|q8}i40#I}Xo31A8kA(R8% zbV51*x7lFjNQ-9idm3?>b`Gu%egp{>rjeLDi(Q8sxolW^#fQo2RK7$!u+KKk6_)~q z0l30#9Nm8w7R*V<&HD~~0!PWob0Xj}vRBKNEZ}!mXi0%#eW!6`v%K8$4Pa7Tqn%Y_ z3V)(z!~CgKp!SXRrK#l_esnU5YhD>BpCyxbvVE2I{%)h2MwEt0uhCs^l~-WiKs|g8 z>H#X^20Wl%LV^D6;##%|a#7dzq1PcBAwdQ!PXM=IPESFLM}T`~gV-aTb@X|H@ga|Y z_{JC8Hypd-IhSveA_7OX>WB z@BYkt&aM9Jsq0Ri*tdG(-m5m6ixSPz9wxpWFy^v$M!O3Urt*p}LI;KCXV(56i=w>a zV5D~Gej*l5Ya(cAr#j0?P$fT^0$yZHgH6_e)34b%1 z^Bc2XDW>EzY5%zgbY>f&S?6d=r2Iqiz6NlF{SKprNjQ zCOiYme{dG`QRMrQ6Mc0bC=iEB?gXq{aw+sKcc2>J=WU-E;sbg2-U9O@HKwKEY&S zxfVz{*S#Qas_>s9LuoQUi?d1+M7jAG0_IlQhB<*H|u+Gk*qS6{$jkGD!#1 z5$1{QrZo(<$(}cMlnt9iT|-|fTr;rO?Jhc2e2Y=tebsM6pQWwN*0Yb;=q3bQVoCPV zk2>;tDmW(F3ESClEJK=(XG|>Jb02{Q=jWbt)mhTAa`Qq7s2F3eX^DIzw_`_dliyBm zNWWU=fcZl(hi+7UC4cl`duJ3h`-g?am=Q#lZ@Ci(6s_q5V)dA3z~M+rY3%t5>DSp+ zz}suUU00xIG?@K972U~UG6Dmn-1l7&bj;)H4kUg<5W7mIYX+F(D?I!J~i@ZW4oEQcLjYJ0+{Oc;~DhDu03rFMuoSFxKQx$R7 z;Vc8Hg`Wq;vjeE6W2D;3+^T#)9Pn(4{Bz;`QC~m?03M5lqaAH8y$fcB&O1Pz^$OA5 zifuTo2~-kn)_;9RF%J#KiqUr20VxN7gI-ykU3;uK%%fhlorVB$of0TNW`Z{B#1#ZC z40D*8Hq2fCMaP@Eyjd>;UP;`D0!WHP;P@W21b|(g3YaE3p=F{=o!#~@2n!>jWCmDK zYFU6fq4x9>!N0VLXnv$@8!p;#BLK1}4BM+`-UZW?V1MO=kOo0BXBf^pHPhp@(9)%C z2PNAOdwIg2*BaVHyG%O<{a!e4yUM_fH*vl|zhky9W?oKMcY@jpNd0Kx=1pK+W<5}u zqXgswKgr{OCZ{*7zMOf7pc~#5^+Fn8Tex)N6hPE7iS6*gdzf@I=@gRoUuwH`4!dl08ny zNw%2lkApsMX(Me4tyrhs{vt)aTN+Jw=pt5?lt!iT091CO+~T9@aI&qEufUqqU*VO0 zI%srC^^9F$Znf?mU-G-AYo2GlTST=2!+#4!C4Xu}a(?H93v?8>B1}UU=F{^hF)uL@ zNZ04@B{$^ef71{33|kUrb}Y9YJ@e2DFI>tO+RvEsb!k22>5}O7$>@XgryhBPY(4U~ zXV3on*|YyAXe@93k8j5RcIU@8>Hnq)n7!ZYlO0U5?>_#vw>?h2{fP%2_ymm}yZYkA ztA8J3kDa@C@!VsJF;40K4t=w%9n{XDy_=ws5{e8jY*N-K!ge@|b}%D$IuqFpK(CMm zQ!bL{3KJ)RL91LgWeW>WJ^i%MtHBO4r!Skl=n7Eb<$BZu{T@W7rSno?PQ=09bbEb# z4=*JRAa&NXXS;KwX^5umtu+OUtQWn))PEfjvD1g{y~(5RbHPkmJ1imD>PszO)XPE6 z{K&FPzHZ&uTt3l0bNZM4N@AK|B>FS|g1KTEHKW&E6QMlo>5dr%ZgRW18zb@PH$hT1 zw9B(HFSj|YM9YCBwm_-ff7*JPG*HBqXuGgIupb)KrK}#&( zO#<)t0KqsGVXK@_PQUrgKRg6%bHhge%yF2^Ebgzx*@X=FAEg|=+{=j%IEz0GoRG0& z=iSJ6O~;J@APBmZg9gAO{k9WmIa@cVzAM zM!P-#ee&h`7Wwd<$KP@{8P2abOztC}ZNZ6+)^E)(lKYeS2k*Q3p$Ewa=8uuuu3vPM z?E_gGYFBF4C_RpvWVHaLb@DyIIMgZq3F$0SUR1gfI>2Tf6{woP_XK(xpnuaUNk)^w zZf)6qzQ6r~gYEk8#;dMRg|#}n=HUA9$DeyN!rbclQzwrcK7QiJ&Xp%#-Cd$r9^M8- zs?h0$ylGld?eSZ(Mr*CnqQR9X4jlDNbL+~NG^645hp%qM+&XvkCJg;ZbN`7i09CZniSjFd^xBg^3&_5GCrFVwk>e_2h%|AqXomc<-Pk){uYmwR6)VB_v zeD!hihQ(EvojB56=%jUa5O~JV;F#emhDETih}4+PagMR?rs_SmpSfak6Q!B4K z$1Dy!TuP?L(5}50c+6g-ZE3%xJ+1wBvXA^Yc`x~6@-+E0`48kXIA0HR)ry>0WkeO} zc+mM&^!HM4m5UM$+U_!p>0nIuNCi-hj>@nS87{0)skb8);{}W~DhlDy3?{?uK)QGW zS_(|cLj8xs3x5-qZs2+%8BaJmH*xhxchsPnS~)gT6tmEv(^;}B3K)=Ase>RQQQQ@P zIrm5^icmphcfIQfzWaO8dRC+k7BxVHf}uFPyUL-)MyN0~HUJuh3=N)j01O&FRH)1P z$_tCaIV*BkMqPyf_WEMC8-~-Ny3ugTbObFj%jhveOiY!a z#UnknJe?3ae-M~c$m?ax)+NiM6rE+t?U=VhP+HxiE2(4nCClg-%^(0Hg9!?@4KpWq zqpr~kfq$#Zu5kt2zh*>DqvPWu6fhE|)AFO{3Nl1E=vsRHP$v*Ixm|0wsY3t+3k+>L zDP~NDmQjG7H_Q_&o> zBTOX$*epF;asxxzFl~pz@l2qmKobvAhE7ghEPuNR{^(!@=A?Imo|^;b zwAI`Kvk2(dacf)MFfe&)rX23W7>t7ozIoW7MTAONGo8(^qJEJW&xtp7_)epj;v4=DZIeV1+I$(u4WrB z3NGV!(l4jkP9f-ON{kPuV)awa_6@C_MSj_p|? zoc7uRs_#qNixO!@zHlUP@uU)&kzn&CMt=zfLB|cI<#6B-CXomwbd`K7&BrK8l7(k6 z(ug@J0j{pGn8Z{IhDD(vaQYA~5df*g*1+#*w_ey*o#L&TF@>8(rWdDPY+(oBxj+VX zWG1rYd*s*VZ@=kV3%vVJ^rKn;8WHn<;$r>WOcA=tA`^V9R31(+S(qeTgo%?aUVr2o zl3T7_Y9I5LY%|JhUg=$7xms>CYTa9(^Q;NTWoRd9wH`Rj!;SvRsd_7q>4(1goNkNr zD@;G!H?*XY^fPDas^Ly_9GWYVj%^0fbTDjo4Q}q`N-(L-FhUrqpl*MxYITSt-692P zFZxrse?+RX+0}V;Dvi6nPJ(XY1b?v31e=8m&2S0DLZeTxp%_V4d9Ug=qi?j(*-p1c zxr_cyLIbbS@B;isqtwk`Dkn6UFm@YE+=%JBXIY#$`EU!yix@7TAm2{RZWNW|=K7&L z7mjZTH?;b2zzE`=9lDNh^E^LvzSHY&hz+xAMxFDMeCPsn@5O;3OHtnnU4Id5mf4~8 zO?5u8{Y$ur(0>B!mTP_JomfST$LqwSeD8Y)nE3bp_*#4G*j8J;k^ZIc4}H(!m$!Gn zweXAj-fC_AT^rw3sl6O+`dOx977IzD(FC+No6OL|LGoKS^4lNz_y^v5ZO+KU^H&4& zN`vpd<&C@brk`Xl(B7#1k$?85$S2Y5u7Z6@+$4oBb#F~0fV;^UFzW=f$cm&A^zF$a ziigF(G-4)v@o$WySQtgP*HDQwdZUWdXi>KHBKin+v=6r~tZ6hZa%Z71TC<4~kRtl7 z+`?+nq&nRn$cCzEu`IPoQ!r=)wT`=RUd{USq<-aegO%dvH*&q^T7S;b{q?vUrio$J zt=ul9Ou%gPxL%Dm%7D8f%jMxVC?764s8}AO=g!CUDHFJg%`Jyhf>tGRE#bvr3pnGZ zWid0gFytqw2TFy2rUqkG`7syc6P#Na^SB9W#wM7PgnoYmuH(AC+$dj$div0DAWTl9*3Hk07?iC3?ph#p{d!>ZMefdi?TmK6_Newj?UUNKRNiiaEAK_OfIPS$1`|am zQw-*UN>KO+=qiS}r;}m<#t86p;o6T!vqD`ISTP%9`bVluqrXSlKfjQHwiWhwF*!23YB(h6!#s((jd(CWSAN{w>o=a7h-W*$~c zgo5L$&FIXA12^XT4>VjjYME}%B;~+nN+(O{xs*9z zqf1VS>VF}$KCg(D&Z-;h3EU8qKbhk;blrkVY)PFOT;{dqxJRCky5Gzi2Vt66*liAL zgyo4}0XtzBX%iinXsQKEJY1y;gen*F7aoJg1qzxl08i)AW@@GHZRQ&-!W?vZ!VHzU z*ba{Q)!V8ds^|Ck?$-!NDQK)`ljo9~$t~nHeFqY+JMM$0q@_S>XOv`71Nm2T1ry^QYAE9jN<41FHG zfj*z!NPmRBkiM9{gx*f?q<7JK=ugp$^tJS->3#HP=o{&q=+Dy!=r7ZU=_B+}`fmCg z^nbVM2kB$6OFIgQI-+#)< z02|n!fo902sIO2ds2hR?;Ug%58;(GWJL3sS#{FzG=s>-OKEeBmj?B7bk^pBc>N-m0 z0L~>ot~!-tW3Ncuh9p zRI)=hCH#U9JiGS+rF>-kqru|9K&Vd|ADASw1FFDYX-dA0>#nF$mduPKRlYw$I-oGR zOgE%7brlP2FlNG;HA>vbl&3*$iMwDz_TQ)TCy|U?`lIw4z&GUl8>lBhi+>TolJiFd z>*|cWAE<#bpTGl7>d0SqFdBCptTZ_ZYDGUR!RR}<^@ItALRA1j}&ySrx&f)m+ zlZ-q@8y8=RPb1_QTLakP-Y|bZRO>OSH5O64X|@;2<16lzCGLvj$4aNve$Y7DhZ z5Vh#FjO@o{!t{~-H5KUMP1b?q{17Gv(i4oGL~^~&RYk~?Fd%Y% zHI=Td3-V%2z>#wPIe$!0rzC>GB4-{3^Txi&=N{VTLtN$d=*Kv@4Ttr8C=0m4Reut$ zfTHFTf{9PzFh4Bbf%aCW*d2NfY?Dl&f%A7ue9ru}Ef6>ZApGk<9!Sa_0mz9GM0?OP zzXUh?&#(9ioqi3Qpw~o=VMzQ*s_$Sz7Wp_6bhI;EDG6q)5P(gAWAT&l?KS9o`I8HdHfI%FRYgi8AqiZjmVbp$XY`Ht-1L$8cV6zyYD1vm z8!Vgu@y#D40Xb~;!&dIKcRAkM*;#Eru0NN1i*P#|1v#4zCdEqeg?kYQ5++>(KO^6D z;*J}Y0>km@7Bp~_o{GE?;KkrrZ{TDl!*h?=oMbmjj~%r9suPy8>z4PYQFQqg$&dZi zt>+o&P=9kLNoYAVT=T#+Rw!<{)-*4z%h^vqt)*H;YiO&=i?O>2#RxZ{Q2TitA``WM zNiAY(OQ3BFTOFZ!#rzU5*9je!+wF4DkQ>&lTidL`zhC^t4{U6#ZETRc<~QCpnUMDl zF55C|(fp@24_qLxi>u^`_C_lVx~sK~t&Q5oJAa>k|Hh}jaQp4_;PSWnTk{Xb)iY{y7s#MUl1=v(p-t7^Jj#iQUAkSY?#>eQdhV{JQ2zV=Vztp=kw1f1 ze2sA**S1@}X!&Mn1;NpkoQcNzXkd0tKX4M$GBKOcjglT%4dK~Qqh0NuJ2+|f;^lO< zd4E{PeW0w=1S9f{%Q%rv0(wX0z7YtAr@dT=PRD2(9;bF{8JvR6Fk8S(vTp911~)l# z`xVa&%uvRqbUU(LopV{eG)@xc$&xnE4rwQ~mm%{4Bm^)9_YqPstXnGfu~2yKE@OqlLk{&IQc+gq4AtSw*r-T8-CR_GhQ zySDPo=U)Bl_r7=SGs8Py4gbA&?SE?Re|l!Bb(A0J2S1bl@JD|B+H>z?r1Ss%#6q9^ zIsLraH%2NizK{c!MT2RvC7O&tFZJEH{oGFCt=)9jO)F-Sua_fp9EEf7oSAYQLcUAu{}4X>V;D!1B1OLZorJ8$_7lW`7-O7p!7| z&1kl_nkw5}23jmNQDL(NZu6l+tr)hz^(ZQUgB&G|7cR(R`GI2VLv%c4yOVk}oUD^c zZ-(0o70VcuqfumP*A10MGezp(9ZixkD5xp2d3bczAB?+7q4vds?-$PnLL*e5cXt6M zdI#8kU9Xxd-Fu!mUEJI+Fn6A(UYyjKQ(36GRY@qY~QFx9{t(xPSU{NEJ@?u9dN=5EgTdrexR(~i#hde{xm%Dia zco!g-yDXgtB|!kmsqS+4Pf$!@7r>(lwMAfnngd!d0~4T)pVx|PIRqOPw#TI=4=n@$ zCanV=f`>U#z(i`wvIV`Q69v-H<$;^ENrT_WswGndQn!dnBdG2ni(=^1X6U~X$|;Wv zpBZ)Z2~=7-qE(gz1Aj2h2zs5^%t#F^DqRbD67V`R{cv~Q#UQKawHIrz)Lw`CyF|NT zJ>_mv0sKPM1Ia7$p4GC`q}bSPZ*h2G6Fh=JUgbLN7XdUCNK;ul9d)<|$7cP3lI(2? za)r8;Z+1t@%~Wg%G>d>$p}%!pZh&nRn;XSn9X#_ zO1w7zBq7y`>4Nwex|=)%z{|vhYlMa{+N9<>5}x8jIz8RDS8cXh@2tcLGi7K7Ze9;N zUAAuoNKJqScYj1`b99Fy$g{1K;pPRn?Sj6%QZL&e$f5H!XXr+D`7p=^!Lh|S5Wm?? zL?jrPJEuxc)$$0Jff?KhOx@YdGm62ky%xq!>vfA*>IRwYCNrWVd7$=jR4Ktlt}sma z-CgZ=wM+v>Z_-tvW(-|`az!WeZd_L#7YW=EXZ^UZsO&yESAYO`F?ZN(3_^AwP&B&3S?|6#r(Uj6?GJr{? zTNItj0p&2Q?G2l`BID7KDol;g1sm!(poZSkvdX>aaXq5KGh**kYC{>`e(}L2E(8oN z?x&?km49rlTrz!88<&^M4c`nhzcM{s54T3n9dR}2+?UdRvYtk+O*qiil z%Af@(jdwwo$W(e2_U2+YlVZ;V`Q z>TUO6-e041`O|!Wn`8*)mcuZhdL~0r$tY`9mRCR>m`xYZ6g0*+J&X6}|LP=_JZ}hI zV#ImoGs65jXY@{slNC@f`o_}o!ILX~noF9a#?dXi~1%-0G3(0yIKw} zoD{n$_cS2#J_C&eUSFE*_o^rfPY+ zQdD?lip#`in1YnW>1ayc#w%$gObb+kC4WE$aY|+w$}K@R7*w~=BkVRW)A^uOcJiI| zi3^AJH@!frB|I<^p#6_5bLqQEyJT42jK`~KyhO~@QXAPh$ zm6Cl^8w3Rv!~rHY*~uBkVu0G3dgvOKNljsq`&yL8nzPyH3eCV>?_%h9~lt?}!9+ml5@w2*f!a4eo%!3>n6TBaGGS2D_UZCRD{- z>@E6(_D4~BKJ31-#a<7+#c$j-g#=&yDsg|GdTRd3&wS?IM;`fuKOpCBxn+JU931ZK zko*u?IZSpAJ#~2d&>=wGhn_fuk1BxJCjFXrMtiw-k9ME-7LdYsf*gKZdj`zFI{6WD z5BWv%Zt}b2ljINSCOt>b)0fh_=xgX3=mYd&`YZHN`s?)H(D%{bK&G(RwP}Ei66Aji zx1a!V#D#=tC^7qEVK6aNv)COqn-)7Q#G?bqG%!YosZ{Bp*g{xMg2^HRjNxRp4-^LQ zc5~onyI;VD0^2}Q%@!*mr+qm*LU7N)Y*9{PY?)zR&uo+kl@6WacBvT7QTwI>zZ+%? zeP86p@A0_7?hnjkSy%?N&T9R`09AjEr$U{+UL?h+%hbvxT+_5jJ5o?K<%_&Ag%%Mp zz^m{^fEEMfAXM@grWvah!XsRLRjgq_x~10Bs`Rs7hDa9hX;)6w)+b|JjiXY}SlTR} zk7^V8Iue+q23_14fNC6}bGR?3xYoiW(PlD9NL*}?w@PrsBHG8@X9op0&pLmLJm zM-fTQ(qhZlq}TuhTB)+3p}SS*P8Zs1k2YtRHKdMp#@Rr|ic)Wo-Bh4Nu}rnIRUtrN zF&9atshI73lY5)f7GEa)sqBnr2jF)sV=Om<7Kt7@lf`f%WB3^Nvdv`BIWX#G^rOO# z(>n9@N^E-oE-EtwemX9{pk9B*gz_2s5l^@)ZOhbIrztQ-Bw?DP>z986a8m+S(&MPA zfQ54gYThuY#LXl)djhwT)7g9ALx383NH^e<($ASN&tcBLAC6N?|2n9)sE1iUEE2f4 ztOr1PGJ6k@;Z&sa0R*AiCkRG!ch523ouoX*`C97N7QW4 zsUe2zjHUsk0IZLtq?PJoC+=@?{$G$I54`cGE}kBDlE&6bXO2)r4-6=(lEG8R`Y&hi=jkh9%Is#QxA5=;)4X9sp53269ynB2(4@ z9T|@B%e7KFgQ^lMw0f2i;IfOsU?r*r!Uj{ziD_FP<6`CjoihU;+6LAPo?&}o$(z*b zAS%!uz}$e;Qu!84bI)5VNuaYvh8x7_`(N-*V3)n<P@1y&s}pl#?%kbbTyX;B=8C zhAn)|f8c*K5_U;KHSChh9)n?oq0mn*J|p}@)q!i0sh+E?#VK2(nDq8B^ke7BQ+-=R zN*fC-sIdpMPvjX-N-Ub+gd z&i33CYQg^Qeggxrp(-{xR{U0J?QW+|)V4^)u4lV8a)wE0)5U%S*>Fm}zSAC zez5uxKuhFy$!pEv@VFA%(8){f^gb^Re9QLk+AfL$aV?6{+kRM4st?**R==5VuWTAD zz^#89m%FCRELXU;X}fo}m)IvPKL|bQ|IMI%(EJ~Z0>JmUDtcGzQc>tGSNXl3q5oB_ zhd!uXrCqPx0zLN{?ac}w{igP@VpZ1nZCF_+?Sf7gP$kW9p%pGe1!FmbUg-~t@6a=o z1bREk0P+m6|0ZhpG9guFlyVP^2a|qx&`p2wIBtlLHqom(9ZXa<6~)Nig5bvt0O z6QS-rTRZ{qhH{VL!rWv6I0l{uPZ~|fgAx62wb5j9WUyH^J-b>8EkPI>6Di#4wf!R% zP$|!R8B+jMY`UzoE066E+T@VL%@N2DS$Jx}oH$1@L=M~A^lAM_E}F-w1L zz6!`6RCxa~{V1W{yuOSdPr+;ya9GG=-XC}~4PzZ{vht!A1A zxlitMA{fsIa6sFujlM%WT;>Gf`&#X~?^M38u2WE$K6KqYe!eE0N8kqa68gl?3Ks6>BgZ%dzl3*O{k z!*N%X$y*pda%7ou+ba7qcWmyM{q5t9>*UFS1Z2};$J1T~6lq|`U?BQIV)8+AXvMBH zbHi;fwOzvn`6SdG)^vx~4_FL3q~hAPm&XA{M#{s~Ia$g|gP>%~higN|hE3u6W@%sG zhh`7VFvjUkbbC0*?r#@XT1|eQ~@LmZX0m ztpvcVndBy*2AfQbnjy>XziRMlNBgB$D^29#V^;j4W2RdlxjnbIK*t!aSpueBcJpxtE>X>6)A9Z0)_=7fXzQA-EN#a zang)I|#3K!6qp0|NU9rgNc9GneM8ttUTWFpYQ$u_usU7 zITm*&XJs@ur=M_MJO@xk$n7n2M39|bZmV%*^yJ^w7?N9Wp{AW6Ht>OK;#N;rJ8$o# z#VQG^l|F24l5S}&Z*6Ywj!E3kR6HR;+oa#ee*Oh6!s)S6XIY&k63K~hR5%V+g59;l zt)t6pWJ7;dJeF@`wIyC6-Y@=A{Db%xfXK_bT#*H0#>lUf$WtR#Mpl5qMhkgy*|4Rc z6SF$B7B5#b@-VrJ*|L}eF))BnR?fOaS_*ZZ#26M0vX<27cGu`3g1{Loifj=Ei7KPa zy6pXye|H!&tlJrLYF&)s8W-dK2wJbi*d`S!;eUUV{nR-rIA^yz>T(WD2_AX?CNZYN zNT(U2zRz%i5KSzXos!cbHhM~DeL5Nf^$7b#w7&jzNp-v7J2}_2@ZL4>Z-=kD5r!BUluiFU81TCx;>BWJ9HwJ&08-HK!y=9i)jj$!`c; zPN?v#rV8jpy9Nk$`i9}duf!%)|;wf0$Lb^H(u!(`)40yE)pd!$XjO+tuV}q;M95YykPe6R}NN!UW;b(<%+@#9mfGy4%;{;!8Z0 zXkq)c;Mg(182vsYV46^R%^)Mu?>9)L>7-Dz_qd20lg&^HSIE;B>C;&_J{Hn=&a0b~q{vZmMsj1NjaFx=y0$Sv)xisR|hOo|ABhAUO4gG$dWL{DXfKL5)D~ z8pzl}djw*rRFfKoZON43dO#K&VT7fGi^{734mbAL&-6@ORqXaTCRQ8pzv=1q)kLLE z>>rNkp)`@YR+!l{%E@)jBdxkF)F~3j0a2LQfQ1V3BT2oHSg!l`H5yN@X(D8@+LQ9p zO+;K1k;RHrpsre+&Yt=X- z^FA=mq-jDs@UU*>CVsTMZignQ*BtBsIJTRt>}8~qX}BX5gsHaeAS8b+Mbv8#yI`vi z+EoD15_^-6mmvZ!u#E|8SU2%akR~J&h+VL7V>~Caqj<@QFpid63saX&$q>6!LI&i5+ z0gUQ+ezd%a9M*c%TI_$150N{o(`7FW+(y-r;2-O7tLbJYh&Rq&Jafvd>O+e`eOjE~ z1iB1XI+R@7-CRAi<2Z*}M{fDi?WP-&@zxBElfN8<+v`MzZ#&$o+A@i|8Nj8!9M+rAT5uUzV8 zB#p+4?Xa013Y*@5@!l34fWoN@d8?X7k#g2*X>u8NbX-9o94VGI7M_RgsH}#;!$f0< zaBirLb|aggFv-;sTh8v<$TM+o@2B2>{k8ugN){J?^2V!v?sXkg`%*QlRmswseQb+P zI37jft5I$?lG=YYH>InqZ@%%u4d-4{uP$7Fg_X6d3we>$EbAcFM1F{D(xu9XGx1?U z9C+^g`x50#p6!>h!|TB|#dIRN{NZxBx)L{|Or16IgT$N>Sw!Kn+Xv(+pFP^$Ug)>1 z7&Wz`mL4>dISplB(0F1P1}QojW&OY28UQbKh!=GU0C;PDtthx zh?7U@`Ug~C*~T_lB{aYOfc8;qi{^@+{s7VyyqYGJ^0o)ygxkh)I8FQkY^r&#Pp8`Z zd*Hw$7*zIvVmboWCbn4R93Q(26dGMq&?CZn*|-VYo!KX`)8G&XM23Eiw*%PN2De|N&=!w2^guU#ypEQWabSm3R% zdx2b@eOU~=Ab4Bz;H%j+fhPvDFXLOB6U_dSuN#rH?g{71^hNOfuLs`457Qan>@1#I zY`5v9b0PJDQvv;WsTLGG4f@>+FUN%0N)wgC zVvm1N<$!A`23j1MLLjZ_ccQSoi`K_LKgtYBO(>BU$ z)w9{__>;Qe)!Qi<0AEC0Pp7v1$TiphwN8KaiN#H^#aFCXYbxqT&g^x<5}ihD(I+Kt z51N~G@@RUS^<#%?sb9aX-hSQzZ+}{y<2GN-tDD6>m@L=jY#ppv00@Ue7y&wwPZ({Y z%av&O&~eVYphM!h(^W@BZTQgEW@mKwaC^fgQ>@;0NcqRjt#h6${p4W)V5YT=^R9o9 zUi^-fUc_5;a?Oe5jp4CF(>NE+>_yYHcHTQZh&`pAb^I`bP3U?lvF|(WD28r_?fogJ2SD$Cv9nbJepg=3zuE!DQYNbKC%X-&U7TxBS?R zZre|^S+%TzyzWmmOm%=y^cJwAX4U_L_N!V6W!Z@RyP_h#TyF?#q9zw~;Qn z3mktr)+XCuq8e+43f^~)2b}LmLVZ-QfMCQUXq+Fw{|AwbXtd^tSeM0re^ij+9@c7J zI_>YYLJ_;Q$c-)X9o$AUDR!G%0n*K-H1*k2$zeyq(xd<6jF9xrmJg3=VXYdFrKut> zq>h9pGL!X_YlxeZfqD>iej9(sZ@lH@gEc>tGH|N4N7jyIR(DT6fA!|wJ}0-!G_B4) zzY<{?6&r!ditNsn!A+x^cVgojAExLQO`4{gU-!z_+YP^#7=M4fQngNW^m4@26#E<3 zKL|R*Mo2jhWa%itgfZ~u9L;1rCpTm*GWu_c-v{}L^~qrevDriH*fM|2Fc1-zmy6Zn zXMXbPe#7_OZf~pGI&{lUiYAUd>HN@3c=%R0<&6tX6N3 z|K>PLk=IyKo~IU&SRk#)^*m|f4HFOJgSm406GWk`-PD_ZqOVhgrHKwf5mZCu^ZZar8{fVo|5GljGOiSCijNRH>#yC$(4oa|Y+*bmH#S}jV+Of{#k868$`;og3Ve7#y2RGl2f zOAlZ9ydB$)mg|4cvcsiPb<9WcCX}Vs=Rhx~qV1q6#jHC5( zwCdOmYFD7hq!M=j%EO0s>SbP1quJBJ;B4HACr8yXITwN2KIS!I4>6&e*kvc*(;>%B zCw5{DZdU-}^$?3H1ACFC-f!0Qvi6!*V(aCQY`%lIv>$&_*I%w}Bl4`@GuagHt0L=* zw_Um<{`AtN@1MMM>0d8hl9yij=Xc{*Tu(0_q2J3o`Ni@nqAa)4shq9+1oYCd*Ecz0 zwaLsF1Hb@<9s6A~EZOb2NXvsOg1&}sV*CSMKFmUtEZoHd*noWZZrJOxE2~&6q3BCL7rJk z_S~meSDy*i^Y_L_x82vpk(TEMiWn+LE+(qj@a{<>TU~X`_2T3%@xJvlXH=)RzWyaE zh|k`WthgivXMcRF^pfPhB=O`qFYp%b+W6weO-q0E*PJ=i=}GIgXO&U*M$Z}#wzh*xBjV!vF*E!7C(_UrcLbgn96OIPBn=|1)$IlXI+YJ7`s~Q& zaG@sCyA8SOl}oJ5o>VQe(&EY@*|EEo)0GQk$KFYL?G2UtD(|j*sPd`Gf3JM2^3TE+ z9WfDCix-NQik}eoi~lS>EPh9PQG8uIBmRF;8o4X4k{3De_YwI{`Cj?k@=5te@~`CA zmlpo)^AzAYkk`Kg7viZH`X_7-#%)ew{L&3 zZ?k{Ney{y;`?u^rvcGJ9)&5)i8}_#~xiorBAJQB88hwNQF@1-ArM_RkT|cfrsz0tj zt^Z8_Fa0f}NQFga#cY~wGcXf#!MxDC+PvP}Z{BJiGLM*#n9rI&F<&=-WB#xCp0num zoWsru=W6F#=O*V)=M~NyoO_)Io%eq@A8>xddBXXO^CjocoxgIPah`Sl!TBfWyUxG4 zwi~#MB$AG~r`+q@3+{{Dm$|QU?{VMgzQuj3`*!zH_kHfi+^5|C=6==vTlbspKf3?N z{hnt5S?ajh?T!t$#j|e5?9Quc7Y1npjoi$oFC9TiS74Wc?8x*jqkH?~X`g>%hVc=* zW!-6mghxSl%!x(!P!*(a>chqq_vjn0LplZ0U<_aiGM)iKZ%UY_NEY2aIY3)->;QJS zyb!L*OVvEaX3B_<4qMvEyPof+UsqQS(bg@Lz_&+pgo)XB6qxDah4 zrYz_v(uML2A-&y6A7$hwW@j|Sz!*;6X!IwI(y^wYLskVW6FR$J%qxjZ3chAMA3f@# z95!?vq1Xsf&H9Kf?2`&C??TT6-2XHmO{rU0iHRkG6US4wo9AUXa4LVGyQooE%9@O) zbbN(PpKgJ5oQx6KPT~iH&94X(-`SmF%LaEuFyM3qb0}*VU{#P5;`lhu7e~d}aar~c zbW%56fIr}x$+SPnOm{eixlg}+Z2qH?=%~m?#n9BL9izOU?qHRELeDEvD3Gd8*YBL9 zqg`Dfj&c`Ykr#lfjs<`2l>yInI+{}R>9>JdBLarYuk#Ese$=ep>9B4<++3Z5F3P(A zft?KT&v=rjJ#kr^=n z@kQ7=@05d$g@w|iq3fqZfXY+zhIwHixQjmKI0tPm3*2i;O`m@bsgM2Lx*3nU!;B`B z8a4rg;ko@C(gIWB%Px%^=9GHK^NQd~RD+ll!)!=BH+>YP0GrflsK^)W(@2lV`Yjjh zhNamArsh&~Sn})?8r0LLA>y9yj%dEHd&9Gl@r7BJ3%@euOu0-%zd%guDzy@8sJy=k zip(?6QJ;ok%2R(tm-bBoa}M1+A%^sfoQA%ijru%M7-K|RV{eAod_3anG1RMah=~-Y z*=`>kP7SKlWRh!`b#xyCLpI-3Pa5P0ku=KY(=;ijCCWKW#S)CLU+ng|5GhxtMXYMh z%eb63MSj5wW)5V51zrx>JW6j^GU6eiK7o?~+>a8jG_QZ0SIcBN1qSZ4C9^Wf7JPuz z2+ie63*9ZoIcaMys5a??SG!jT#{B`a(VaV}qMd_8R*^QC*RjbpDZ9_bj=2T^iGXqA zlqdjrKvRgBqr0N=aqW*3ml{T&)y>T912bvn{v3eQSYJfHAg(MD=- z87ed$G^WE+>UFYw1o8qO;G{kxh#EAfye|ybU`Y3`=MVuj1yCWlA=*-s$}Ta$2pR^k zh`ThuvBazuJjS~;1ZV*8D@h1XF$Y|Hh#EiLrH6lx>DDxB0}@3V%)(#J4JP4)M^@WgFccF?T-NaFqu*txNmi|l;fcxENGTV z?~Z>E3soQ=E8oe7omK3R(su)cOk*Zu(_wkt?IYob1jAG}CYbpto0r`_ktR6EOi>At z<|pq0DrEruO0t5U(Va9j4a*3WN*afCOF1kgJZOS*%r(i_I>wU31EAYhq2r2t2vs;W z#2^`f8X+bS{Y(msrlLN~&4}h47$%UnIg5W-dOC@gI!-L6{RVZR(*-=sWDLfGtT7s7 zM>iagsQbC;l8~p~LI_L?2s(x@<+pxL`j?E9!BF>s`G^Mr6l^di`ht4v0(S+PW_Lm~ zqPNSCKVpL}DN~v-B9JmDemI!o9@LqF?U~%5oz%=O5&QHwxg>Ik!ODja8JJQg8sdM- z3{cuc)%Co?v^w13B3Y=9H7LW(8$*ardMfj9e@Mhfa$?t@>N&U(-9Z5m5CL#KskMkD z7!zp#0gUJtgq`XBV2JjRRfjB!-2ubSnX$Z2NXK8RMWMplPZ%L=+qU$&(n%tc#FDNC zSdbD3UufCBW!o1K`1=Y(AG?khSP?cc zg+rJ5*n*Xgs~JbZ)qqk!kfim#1V%x$390l@@A}Ol$q!2g?bc*Fma=?TtVVWdr`Y>uCGE(S5#8iJf@L>>I z3`boUBW1?>whX5L5Jo$9=sAuhRsi=Pcumhm;vmp7c+Z!5X=SpkWP~_naTg-6$zrrD zV;dh$x7_O#SKMZg$t|Jd6^5h1nS=C|R|1jrg{+r&97qhj5~tAz-;~kIijiKligp-H zLf94`#TK+K+lIS%p5p!I@(h2C;ZyT3)g03V_u*&($sa8#evhxW`D=^Y@;)IR7oTJ_ zNIb;sBTpzR5#sH1s+H7?6I{WejQqp*`mETH>OJ)5ix8PiGtU4O%J!+dfI*oE(WufF z+`&4UW?3&5;&Vd0M@YJkLnF8V5IRFo{VWTGr+tZWIyw5D>0La* zqa;DSN|fV_?Q~2N@@h36^r#RImE8sv@jaRHsat30kCT#jYHe=5vemn#+@Cy#m48D#W>LVUskf+$WD3^RYYWSC=}oc?yT{0$5^ z8vSMQO)mFLcUfo3#=L<>KZPC|MnsWMa_8u%MML=uC@+9MTaH!s0T*F%cZIkF5~BP5 zJbhf4^NU5D;t>ZKGvJVAYxzms&$v9lLK4ZCOJ7 z%o#-(`9>1v%vyia!y>zj&M1fgaY>Y5Ghz=1FcMP!9nt-r@i65fobZ>+c?N$Wtn>9k)VR^qB=I?=El)*& zMN;}{5E~0WBQ`neM2HU^0N|*Xi89mW9q6nyKZmMpP%cj5VwNr1p9Eq(C@VcWmRBV15ZebdlhDZ=*c1xYg`L4RYdPD z#?%W^(kg!uP?$3%J6+)u9R|j8--qCrU!9YEwa1 zYdfQ_5Lnzn%1DSvCL&57Ty5I{rpB|?ib!ZKqlkYri@^wHDwPSR$nX?`%4I5`KS`l3 zGtMuWl~TJ(yQa+aQDq>JC1NE^iTez~j!5%cOAE+^B5g)zI&nyXUU-cpAYz~~af_51 zWUZ3W&_UA3aJvE`hz8X~I!l&=2&nV!O4Y5!)F|TU;RcZ?Q-ThHv<}(pXMvkAFIukj z=pKI-O9CUSD`pKG9M=6v1>givIaMpJxx}(`%Ie}mU^ykZn=p>7l<2hzb~VxjGEi}7 zka9#sOjHCyRxXc?4@pnM8_@W>bwSh^Av(%gGV2;u`$)>_CJ~Ys1C(1vL~;roW?Z5;`X9<5Ue)KgD@h=Zit9tiQP%dH-U@1Bq#>QlN)Fnf9ARX@EsAY)1q#IHXq~ma# zSs~e)#DR@GO0GBH_$W$c`6x{X;5_0J<7@3}sp5!+N;ud^0*|=1N@9d-3z2A`8%URq zR;z5AA#;TEqcRb~xgB9z!0rTx!@`4*s2sYQNl=7Ex|kO(vI9SmRSF~kUUsm|SUt_zi6j?%k{&`uu#-{qOP3mf8gRYDPBmVE9i)gOea=lEI8^kc2aR= zNoou>DNLymX);k6lVpYsPGK#^Go!Kh90V*?N~;>P>_`OGDg=R6@ks+kQ45zR!vXs{ z0FpP6F8v5pClnB{NMKZJ(l|7lkZYx%0E2@=WwC|sLk&2r-AUpC@|JEy5=yMq9luHw ze_UsS0IcL1RFQ!h$gT&On#Q-;o+rk!RoPy)ok4sI0ZGGQ=^A4R;K3j`tv!e2s0*(N zT#mA#B!`FtJ?L$}5yM&viCln7q5=}_wiT2AXY8e=Dp8Hiu7x2J#1d}l#Kquh)Yzo9 zC3G@a3c}hz*Pxh{qUj6(#3+b25Rr)Ve+3^E48Y}@`Iq+fzf24uss|U z2Ip~8>Uf^vsdRvDMSb^FKvp4fF2@lI0R|)~;#h2jveO|IBB{Ar7yE=ZM$l%lF47vH zrybJP4kNe_ebO_dn4}6u6q*tSZUB%RYPO98QwcdwJQ@fmaAL&Ipwa+QEmSzte^oX7 z1R8mpF-zb(8Q7aP`NP!m1xHZ#Igrq{JQ5LB1QQmBCb(9!)x;2wm@}KButA0F9-_1! z0MlSeL#YZrkxW}F5W31O^907z2H+-~-Bqy$7uA7DE=zl@w3PS#hy9P`3%uPqkRZtv zZ()8C^OT4kLyrkjoUZI!gwZ0Ce@NNvl)-!>4NTo5Ri#T062vEX1%Pi3m`@OxVm--d zla@GeC@_Cyax%gpJH0>rZyvjFNd9)kL0q5cR_Xt^o#iD`0!I@dZ3H=+U5;xgQG&|C z0P_ft>5xMm2Gfc7=Bv)%Emog%j1HW-b5+sV=>7D1@2u<9PpqX*5-gs4e_mQEPMzM^ zw$3%&R<%PG+?!^f7pJbc;u$}2P}D%B%PX7P%gf#NPE_~eg+?vX+IDKw-GzRzyw)49 z!9`B@Yw$g%hLz)$8@LkoFJS-e0Q4jl^MIYG1Ran_&?vzK4x+ja(&&aICIfx3pF@NJ z;85l{R(!dk%mpXQ(B1JVf5C;&aAaEors6ViK_(a1i+G8Y2$4#lYwNj_tb_^(tkNuX z7p0ff+EsvA$#ApS?iD|MI9e<=Z)^rhZNomQpFNn~s&D5`HvIRo2z+7)XE+$q{C9Sl8nzxwSDE(y7J?%a39)#B>!o;&xZ&wpM8_uv2hugLBD@1K1_{7B^> zX5)xDdO2oeUJq_8deu;_1!i45Ft1sf;kt?m_*ZO;K&xAQDC|f%&O)CyR2i-C1OGl;yh0W zn;pnqLd-k>D>$2rqbcbslt5rmX)ODmQhQ>AMbwV&)py6l#={bEk&zOyzB-wsN7J$Y z&sW@}=|CNcfBbK3qQ=UWznN||&#VS27&K9;Vs+bXEDQN8keZa3ePkKl9ElrOr;L=Y zP$d%!YE6v-JS2yD3RVul+|??|x49A-HbOQNh~v}Wdh!Wq@ZWjzcOlW}@AC5#<>x1b z{02$22QPT>u@V`I6t14d3=r=Dm3_=w%T?l4YU|BGe-rWQWdZbcz*3MidxuIG#rCeT z-LO@CW2Z@ske*MWOK#g%;UM3J=F|5IF*|;Y`nDp)atGj8beFYd&gEGy`13Z|J(W4m z&Jndz*{PhZJY0FS^6tv7RDQMcL7=W8#C20}0b7H)s?KXTm6fE_bchHWBCmNw&JX|g zMx3%Yed#QefGN;cq;Ibw*VH2`3zdz@kk#Q`x2n(~B{x{^c3dL2n&ra=wgVH{&RzoO z3pSX z89*7l8XOwl9cCT69!MUD9;6@KAv7fhB|s%wC3+>sCLAW3Com^!C!#0NDJCigD$XlZ zELtpRk}z5@gfSj6GBdn1PBfx7hBy*9zBvXth&kjsbUKufJc6#qU8w4YX6#~q_mVX~Eclj2c zhhbnCc+2c)b~cu?{~wGa2vn%iV2%ZjvBU{3;396oCESRca2Yq_7Tk*4a69h6owy5k z;~w0L`*1%Vz=L=Q591L$ipTIcp1_lM3Qyx1tne(J!+-O50ax%MUc$?G1+U^YypA{U zCf>r^cn9y|J-m+(a240^AwI&#_ynKgGklIO@Fl*&*Z2nC;yZkgAMhi7!q4~xzv4Ii zjz91x{=yo6L!yO(2BAZb0R|h4u$bWB5pW$5j5Mod2$qE8sg_wAU$?R)Tep5kQM7F5 zYQ=+$0e`Aea-_v+Scf58Rs*TA_4`$J|E8oD{~c9o!~0rUug0bFR(F|=ca8F{GrdqD z2*q6H7WzoHb4{JhHeJ#bA}N{5-Iem8(WRf_1=1$@c-~AKZpfOwi5Jh7HLGYs5@e^E zV)U^gw#KD-C%2|FHC+KfvFf}_%ig5**}f_1kbm2w-izK}Y5FL&rPIY&uKSo>s`_lh zVvuUI()HCKCp#Y`k7R8#Q1oLK1MRCJm2=ZOA4#7WYcr=P3*OpHvZuZ7qiv;lgxM=K37o!ezI~YUJ9h!bSw$Re_>C4uemg2OmT+b{?YN zkV+!tz6m)5N=-PVq2N4ICz4dDiN0_RRm|<71WrqqmbfcMQN^;@%WbMzNh=#B8P%|0 zO3ApMYaWV*RdH!*xbR4ahC?ishSQ6hsc&ef^5<)?aUG Date: Thu, 25 May 2017 22:57:35 +0200 Subject: [PATCH 1176/2747] [seti] add information_for_contributors --- extensions/theme-seti/build/update-icon-theme.js | 8 ++++++++ extensions/theme-seti/icons/vs-seti-icon-theme.json | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/extensions/theme-seti/build/update-icon-theme.js b/extensions/theme-seti/build/update-icon-theme.js index 7f44c3ac2450e..a2a2bbd840c0d 100644 --- a/extensions/theme-seti/build/update-icon-theme.js +++ b/extensions/theme-seti/build/update-icon-theme.js @@ -212,6 +212,14 @@ exports.update = function () { } var res = { + information_for_contributors: [ + 'This file has been generated from data in https://github.com/jesseweed/seti-ui:', + '- icon definitions: styles/_fonts/seti.less', + '- icon colors: styles/ui-variables.less', + '- file associations: styles/icons/mapping.less', + 'If you want to provide a fix or improvement, please create a pull request against the jesseweed/seti-ui repository.', + 'Once accepted there, we are happy to receive an update request.', + ], fonts: [{ id: "seti", src: [{ "path": "./seti.woff", "format": "woff" }], diff --git a/extensions/theme-seti/icons/vs-seti-icon-theme.json b/extensions/theme-seti/icons/vs-seti-icon-theme.json index b26e557e5d3a9..46e757af3f69c 100644 --- a/extensions/theme-seti/icons/vs-seti-icon-theme.json +++ b/extensions/theme-seti/icons/vs-seti-icon-theme.json @@ -1,4 +1,12 @@ { + "information_for_contributors": [ + "This file has been generated from data in https://github.com/jesseweed/seti-ui:", + "- icon definitions: styles/_fonts/seti.less", + "- icon colors: styles/ui-variables.less", + "- file associations: styles/icons/mapping.less", + "If you want to provide a fix or improvement, please create a pull request against the jesseweed/seti-ui repository.", + "Once accepted there, we are happy to receive an update request." + ], "fonts": [ { "id": "seti", From acadd61cc39d97b30642cf05bc7d475dfbd35225 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 25 May 2017 14:32:00 -0700 Subject: [PATCH 1177/2747] Comments --- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index c27e0dbaa9505..c5559659a7ffd 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -953,11 +953,14 @@ export class SuggestWidget implements IContentWidget, IDelegate if (hasClass(this.element, 'docs-side')) { if (this.details.element.offsetHeight > this.listElement.offsetHeight) { + + // Fix for #26416 + // Docs is bigger than list and widget is above cursor, apply margin-top so that list appears right above cursor if (hasClass(this.element, 'widget-above')) { - // Docs is bigger than list and widget is above cursor, apply margin-top so that list appears right above cursor this.listElement.style.marginTop = `${this.details.element.offsetHeight - this.listElement.offsetHeight}px`; } + // Fix for #26244 if (hasClass(this.element, 'list-right')) { addClass(this.listElement, 'empty-left-border'); removeClass(this.listElement, 'empty-right-border'); @@ -970,6 +973,7 @@ export class SuggestWidget implements IContentWidget, IDelegate removeClass(this.details.element, 'empty-right-border'); return; } else { + // Fix for #26244 if (hasClass(this.element, 'list-right')) { addClass(this.details.element, 'empty-right-border'); removeClass(this.details.element, 'empty-left-border'); @@ -983,6 +987,7 @@ export class SuggestWidget implements IContentWidget, IDelegate } } + // Reset margin-top that was set as Fix for #26416 this.listElement.style.marginTop = '0px'; } From 2b7cf864395e501b95f285e3a3449e204e07eb3d Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 25 May 2017 14:31:52 -0700 Subject: [PATCH 1178/2747] Extract merge-conflict colors as workbench colors (#27299) --- .../merge-conflict/src/mergeDecorator.ts | 28 ++++++++----------- src/vs/platform/theme/common/colorRegistry.ts | 18 ++++++++++++ 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts index f6d0135aad9a4..39888f727e628 100644 --- a/extensions/merge-conflict/src/mergeDecorator.ts +++ b/extensions/merge-conflict/src/mergeDecorator.ts @@ -13,9 +13,6 @@ export default class MergeDectorator implements vscode.Disposable { private decorationUsesWholeLine: boolean = true; // Useful for debugging, set to false to see exact match ranges - // TODO: Move to config? - private currentColorRgb = `32,200,94`; - private incomingColorRgb = `24,134,255`; private config: interfaces.IExtensionConfiguration; private tracker: interfaces.IDocumentMergeConflictTracker; @@ -69,21 +66,19 @@ export default class MergeDectorator implements vscode.Disposable { // Create decorators if (config.enableDecorations || config.enableEditorOverview) { this.decorations['current.content'] = vscode.window.createTextEditorDecorationType( - this.generateBlockRenderOptions(this.currentColorRgb, config) + this.generateBlockRenderOptions('merge.currentContentBackground', 'overviewRuler.currentContentForeground', config) ); this.decorations['incoming.content'] = vscode.window.createTextEditorDecorationType( - this.generateBlockRenderOptions(this.incomingColorRgb, config) + this.generateBlockRenderOptions('merge.incomingContentBackground', 'overviewRuler.incomingContentForeground', config) ); } if (config.enableDecorations) { this.decorations['current.header'] = vscode.window.createTextEditorDecorationType({ - // backgroundColor: 'rgba(255, 0, 0, 0.01)', - // border: '2px solid red', isWholeLine: this.decorationUsesWholeLine, - backgroundColor: `rgba(${this.currentColorRgb}, 1.0)`, - color: 'white', + backgroundColor: new vscode.ThemeColor('merge.currentHeaderBackground'), + color: new vscode.ThemeColor('editor.foreground'), after: { contentText: ' ' + localize('currentChange', '(Current change)'), color: 'rgba(0, 0, 0, 0.7)' @@ -91,14 +86,13 @@ export default class MergeDectorator implements vscode.Disposable { }); this.decorations['splitter'] = vscode.window.createTextEditorDecorationType({ - backgroundColor: 'rgba(0, 0, 0, 0.25)', - color: 'white', + color: new vscode.ThemeColor('editor.foreground'), isWholeLine: this.decorationUsesWholeLine, }); this.decorations['incoming.header'] = vscode.window.createTextEditorDecorationType({ - backgroundColor: `rgba(${this.incomingColorRgb}, 1.0)`, - color: 'white', + backgroundColor: new vscode.ThemeColor('merge.incomingHeaderBackground'), + color: new vscode.ThemeColor('editor.foreground'), isWholeLine: this.decorationUsesWholeLine, after: { contentText: ' ' + localize('incomingChange', '(Incoming change)'), @@ -118,17 +112,17 @@ export default class MergeDectorator implements vscode.Disposable { this.decorations = {}; } - private generateBlockRenderOptions(color: string, config: interfaces.IExtensionConfiguration): vscode.DecorationRenderOptions { + private generateBlockRenderOptions(backgroundColor: string, overviewRulerColor: string, config: interfaces.IExtensionConfiguration): vscode.DecorationRenderOptions { - let renderOptions: any = {}; + let renderOptions: vscode.DecorationRenderOptions = {}; if (config.enableDecorations) { - renderOptions.backgroundColor = `rgba(${color}, 0.2)`; + renderOptions.backgroundColor = new vscode.ThemeColor(backgroundColor); renderOptions.isWholeLine = this.decorationUsesWholeLine; } if (config.enableEditorOverview) { - renderOptions.overviewRulerColor = `rgba(${color}, 0.5)`; + renderOptions.overviewRulerColor = new vscode.ThemeColor(overviewRulerColor); renderOptions.overviewRulerLane = vscode.OverviewRulerLane.Full; } diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index bc3da9fed1680..b908d663df374 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -254,6 +254,24 @@ export const diffRemoved = registerColor('diffEditor.removedTextBackground', { d export const diffInsertedOutline = registerColor('diffEditor.insertedTextBorder', { dark: null, light: null, hc: '#33ff2eff' }, nls.localize('diffEditorInsertedOutline', 'Outline color for the text that got inserted.')); export const diffRemovedOutline = registerColor('diffEditor.removedTextBorder', { dark: null, light: null, hc: '#FF008F' }, nls.localize('diffEditorRemovedOutline', 'Outline color for text that got removed.')); +/** + * Merge-conflict colors + */ + +const headerTransparency = 1; +const currentBaseColor = Color.fromHex('#20C85E').transparent(headerTransparency); +const incomingBaseColor = Color.fromHex('#1886FF').transparent(headerTransparency); +const contentTransparency = 0.2; +const rulerTransparency = 0.5; + +export const mergeCurrentHeaderBackground = registerColor('merge.currentHeaderBackground', { dark: currentBaseColor, light: currentBaseColor, hc: currentBaseColor }, nls.localize('mergeCurrentHeaderBackground', 'Current header background in inline merge-conflict.')); +export const mergeCurrentContentBackground = registerColor('merge.currentContentBackground', { dark: transparent(mergeCurrentHeaderBackground, contentTransparency), light: transparent(mergeCurrentHeaderBackground, contentTransparency), hc: transparent(mergeCurrentHeaderBackground, contentTransparency) }, nls.localize('mergeCurrentContentBackground', 'Current content background in inline merge-conflict.')); +export const mergeIncomingHeaderBackground = registerColor('merge.incomingHeaderBackground', { dark: incomingBaseColor, light: incomingBaseColor, hc: incomingBaseColor }, nls.localize('mergeIncomingHeaderBackground', 'Incoming header background in inline merge-conflict.')); +export const mergeIncomingContentBackground = registerColor('merge.incomingContentBackground', { dark: transparent(mergeIncomingHeaderBackground, contentTransparency), light: transparent(mergeIncomingHeaderBackground, contentTransparency), hc: transparent(mergeIncomingHeaderBackground, contentTransparency) }, nls.localize('mergeIncomingContentBackground', 'Incoming content background in inline merge-conflict.')); + +export const overviewRulerCurrentContentForeground = registerColor('overviewRuler.currentContentForeground', { dark: transparent(mergeCurrentHeaderBackground, rulerTransparency), light: transparent(mergeCurrentHeaderBackground, rulerTransparency), hc: transparent(mergeCurrentHeaderBackground, rulerTransparency) }, nls.localize('overviewRulerCurrentContentForeground', 'Current overview ruler foreground for inline merge-conflict.')); +export const overviewRulerIncomingContentForeground = registerColor('overviewRuler.incomingContentForeground', { dark: transparent(mergeIncomingHeaderBackground, rulerTransparency), light: transparent(mergeIncomingHeaderBackground, rulerTransparency), hc: transparent(mergeIncomingHeaderBackground, rulerTransparency) }, nls.localize('overviewRulerIncomingContentForeground', 'Incoming overview ruler foreground for inline merge-conflict.')); + // ----- color functions export function darken(colorValue: ColorValue, factor: number): ColorFunction { From 5860e3dcad744cde8156f55ad8726d862f9c5498 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 25 May 2017 14:40:05 -0700 Subject: [PATCH 1179/2747] Tune merge-conflict colors (#27299) --- src/vs/platform/theme/common/colorRegistry.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index b908d663df374..5f3a474f0347f 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -258,11 +258,11 @@ export const diffRemovedOutline = registerColor('diffEditor.removedTextBorder', * Merge-conflict colors */ -const headerTransparency = 1; -const currentBaseColor = Color.fromHex('#20C85E').transparent(headerTransparency); -const incomingBaseColor = Color.fromHex('#1886FF').transparent(headerTransparency); -const contentTransparency = 0.2; -const rulerTransparency = 0.5; +const headerTransparency = 0.5; +const currentBaseColor = Color.fromHex('#40C8AE').transparent(headerTransparency); +const incomingBaseColor = Color.fromHex('#40A6FF').transparent(headerTransparency); +const contentTransparency = 0.4; +const rulerTransparency = 1; export const mergeCurrentHeaderBackground = registerColor('merge.currentHeaderBackground', { dark: currentBaseColor, light: currentBaseColor, hc: currentBaseColor }, nls.localize('mergeCurrentHeaderBackground', 'Current header background in inline merge-conflict.')); export const mergeCurrentContentBackground = registerColor('merge.currentContentBackground', { dark: transparent(mergeCurrentHeaderBackground, contentTransparency), light: transparent(mergeCurrentHeaderBackground, contentTransparency), hc: transparent(mergeCurrentHeaderBackground, contentTransparency) }, nls.localize('mergeCurrentContentBackground', 'Current content background in inline merge-conflict.')); From 64d676ccf7d0062e18ca6bfa113bef8efbd6d58f Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 25 May 2017 15:18:05 -0700 Subject: [PATCH 1180/2747] Add TSC Task Provider (#27093) * extract standardLanguageDescriptions to constant * Remove client variable * Move VersionStatus into a class * Add TSC Task Provider Fixes #26079 Adds a task provider for building typescript projects. * Make ts loading lazy --- extensions/typescript/package.json | 5 +- .../src/features/jsDocCompletionProvider.ts | 6 +- .../typescript/src/features/taskProvider.ts | 110 ++++++++++++++++++ extensions/typescript/src/typescriptMain.ts | 109 +++++++++++------ .../typescript/src/typescriptServiceClient.ts | 10 +- .../typescript/src/utils/versionStatus.ts | 69 ++++++----- src/vs/workbench/api/node/extHostTask.ts | 2 +- 7 files changed, 235 insertions(+), 76 deletions(-) create mode 100644 extensions/typescript/src/features/taskProvider.ts diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index 461cb773a4dea..b039fac9631fc 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -34,7 +34,10 @@ "onCommand:typescript.selectTypeScriptVersion", "onCommand:javascript.goToProjectConfig", "onCommand:typescript.goToProjectConfig", - "onCommand:typescript.openTsServerLog" + "onCommand:typescript.openTsServerLog", + "onCommand:workbench.action.tasks.runTask", + "onCommand:workbench.action.tasks.build", + "onCommand:workbench.action.tasks.test" ], "main": "./out/typescriptMain", "contributes": { diff --git a/extensions/typescript/src/features/jsDocCompletionProvider.ts b/extensions/typescript/src/features/jsDocCompletionProvider.ts index da02e942bfc3c..502cf89c42c71 100644 --- a/extensions/typescript/src/features/jsDocCompletionProvider.ts +++ b/extensions/typescript/src/features/jsDocCompletionProvider.ts @@ -88,7 +88,7 @@ export class TryCompleteJsDocCommand { static COMMAND_NAME = '_typeScript.tryCompleteJsDoc'; constructor( - private client: ITypescriptServiceClient + private lazyClient: () => ITypescriptServiceClient ) { } /** @@ -96,7 +96,7 @@ export class TryCompleteJsDocCommand { * if possible, otherwise falling back to a default comment format. */ public tryCompleteJsDoc(resource: Uri, start: Position, shouldGetJSDocFromTSServer: boolean): Thenable { - const file = this.client.normalizePath(resource); + const file = this.lazyClient().normalizePath(resource); if (!file) { return Promise.resolve(false); } @@ -126,7 +126,7 @@ export class TryCompleteJsDocCommand { offset: position.character + 1 }; return Promise.race([ - this.client.execute('docCommentTemplate', args), + this.lazyClient().execute('docCommentTemplate', args), new Promise((_, reject) => setTimeout(reject, 250)) ]).then((res: DocCommandTemplateResponse) => { if (!res || !res.body) { diff --git a/extensions/typescript/src/features/taskProvider.ts b/extensions/typescript/src/features/taskProvider.ts new file mode 100644 index 0000000000000..76528021983ef --- /dev/null +++ b/extensions/typescript/src/features/taskProvider.ts @@ -0,0 +1,110 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as fs from 'fs'; +import * as path from 'path'; +import * as vscode from 'vscode'; + +import * as Proto from '../protocol'; +import TypeScriptServiceClient from '../typescriptServiceClient'; + + +const exists = (file: string): Promise => + new Promise((resolve, _reject) => { + fs.exists(file, (value: boolean) => { + resolve(value); + }); + }); + +export default class TypeScriptTaskProvider implements vscode.TaskProvider { + + public constructor( + private readonly lazyClient: () => TypeScriptServiceClient + ) { } + + async provideTasks(token: vscode.CancellationToken): Promise { + const rootPath = vscode.workspace.rootPath; + if (!rootPath) { + return []; + } + + const projects = (await this.getConfigForActiveFile(token)).concat(await this.getConfigsForWorkspace()); + const command = await this.getCommand(); + + return projects + .filter((x, i) => projects.indexOf(x) === i) + .map(configFile => { + const configFileName = path.relative(rootPath, configFile); + const buildTask = new vscode.ShellTask(`tsc: build ${configFileName}`, `${command} -p ${configFile}`, '$tsc'); + buildTask.group = vscode.TaskGroup.Build; + return buildTask; + }); + } + + + private async getConfigForActiveFile(token: vscode.CancellationToken): Promise { + const editor = vscode.window.activeTextEditor; + if (editor) { + if (path.basename(editor.document.fileName).match(/^tsconfig\.(.\.)?json$/)) { + return [editor.document.fileName]; + } + } + + const file = this.getActiveTypeScriptFile(); + if (!file) { + return []; + } + + const res: Proto.ProjectInfoResponse = await this.lazyClient().execute( + 'projectInfo', + { file, needFileNameList: false } as protocol.ProjectInfoRequestArgs, + token); + + if (!res || !res.body) { + return []; + } + + const { configFileName } = res.body; + if (configFileName && configFileName.indexOf('/dev/null/') !== 0) { + return [configFileName]; + } + return []; + } + + private async getConfigsForWorkspace(): Promise { + if (!vscode.workspace.rootPath) { + return []; + } + const rootTsConfig = path.join(vscode.workspace.rootPath, 'tsconfig.json'); + if (!await exists(rootTsConfig)) { + return []; + } + return [rootTsConfig]; + } + + private async getCommand(): Promise { + const platform = process.platform; + if (platform === 'win32' && await exists(path.join(vscode.workspace.rootPath!, 'node_modules', '.bin', 'tsc.cmd'))) { + return path.join('.', 'node_modules', '.bin', 'tsc.cmd'); + } else if ((platform === 'linux' || platform === 'darwin') && await exists(path.join(vscode.workspace.rootPath!, 'node_modules', '.bin', 'tsc'))) { + return path.join('.', 'node_modules', '.bin', 'tsc'); + } else { + return 'tsc'; + } + } + + private getActiveTypeScriptFile(): string | null { + const editor = vscode.window.activeTextEditor; + if (editor) { + const document = editor.document; + if (document && (document.languageId === 'typescript' || document.languageId === 'typescriptreact')) { + return this.lazyClient().normalizePath(document.uri); + } + } + return null; + } +} \ No newline at end of file diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 9949d0db9d2fb..07a666936b956 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -41,13 +41,14 @@ import CodeActionProvider from './features/codeActionProvider'; import ReferenceCodeLensProvider from './features/referencesCodeLensProvider'; import { JsDocCompletionProvider, TryCompleteJsDocCommand } from './features/jsDocCompletionProvider'; import { DirectiveCommentCompletionProvider } from './features/directiveCommentCompletionProvider'; +import TypeScriptTaskProvider from './features/taskProvider'; import ImplementationCodeLensProvider from './features/implementationsCodeLensProvider'; import * as BuildStatus from './utils/buildStatus'; import * as ProjectStatus from './utils/projectStatus'; import TypingsStatus, { AtaProgressReporter } from './utils/typingsStatus'; -import * as VersionStatus from './utils/versionStatus'; +import VersionStatus from './utils/versionStatus'; import { getContributedTypeScriptServerPlugins, TypeScriptServerPlugin } from "./utils/plugins"; interface LanguageDescription { @@ -67,72 +68,100 @@ interface ProjectConfigMessageItem extends MessageItem { id: ProjectConfigAction; } +const MODE_ID_TS = 'typescript'; +const MODE_ID_TSX = 'typescriptreact'; +const MODE_ID_JS = 'javascript'; +const MODE_ID_JSX = 'javascriptreact'; + +const standardLanguageDescriptions: LanguageDescription[] = [ + { + id: 'typescript', + diagnosticSource: 'ts', + modeIds: [MODE_ID_TS, MODE_ID_TSX], + configFile: 'tsconfig.json' + }, { + id: 'javascript', + diagnosticSource: 'js', + modeIds: [MODE_ID_JS, MODE_ID_JSX], + configFile: 'jsconfig.json' + } +]; export function activate(context: ExtensionContext): void { - const MODE_ID_TS = 'typescript'; - const MODE_ID_TSX = 'typescriptreact'; - const MODE_ID_JS = 'javascript'; - const MODE_ID_JSX = 'javascriptreact'; - const plugins = getContributedTypeScriptServerPlugins(); - const clientHost = new TypeScriptServiceClientHost([ - { - id: 'typescript', - diagnosticSource: 'ts', - modeIds: [MODE_ID_TS, MODE_ID_TSX], - configFile: 'tsconfig.json' - }, - { - id: 'javascript', - diagnosticSource: 'js', - modeIds: [MODE_ID_JS, MODE_ID_JSX], - configFile: 'jsconfig.json' - } - ], context.storagePath, context.globalState, context.workspaceState, plugins); - context.subscriptions.push(clientHost); - const client = clientHost.serviceClient; + const lazyClientHost = (() => { + let clientHost: TypeScriptServiceClientHost | undefined; + return () => { + if (!clientHost) { + clientHost = new TypeScriptServiceClientHost(standardLanguageDescriptions, context.storagePath, context.globalState, context.workspaceState, plugins); + context.subscriptions.push(clientHost); + + const host = clientHost; + clientHost.serviceClient.onReady().then(() => { + context.subscriptions.push(ProjectStatus.create(host.serviceClient, + path => new Promise(resolve => setTimeout(() => resolve(host.handles(path)), 750)), + context.workspaceState)); + }, () => { + // Nothing to do here. The client did show a message; + }); + } + return clientHost; + }; + })(); + context.subscriptions.push(commands.registerCommand('typescript.reloadProjects', () => { - clientHost.reloadProjects(); + lazyClientHost().reloadProjects(); })); context.subscriptions.push(commands.registerCommand('javascript.reloadProjects', () => { - clientHost.reloadProjects(); + lazyClientHost().reloadProjects(); })); context.subscriptions.push(commands.registerCommand('typescript.selectTypeScriptVersion', () => { - client.onVersionStatusClicked(); + lazyClientHost().serviceClient.onVersionStatusClicked(); })); context.subscriptions.push(commands.registerCommand('typescript.openTsServerLog', () => { - client.openTsServerLogFile(); + lazyClientHost().serviceClient.openTsServerLogFile(); })); context.subscriptions.push(commands.registerCommand('typescript.restartTsServer', () => { - client.restartTsServer(); + lazyClientHost().serviceClient.restartTsServer(); })); + context.subscriptions.push(workspace.registerTaskProvider(new TypeScriptTaskProvider(() => lazyClientHost().serviceClient))); + const goToProjectConfig = (isTypeScript: boolean) => { const editor = window.activeTextEditor; if (editor) { - clientHost.goToProjectConfig(isTypeScript, editor.document.uri); + lazyClientHost().goToProjectConfig(isTypeScript, editor.document.uri); } }; context.subscriptions.push(commands.registerCommand('typescript.goToProjectConfig', goToProjectConfig.bind(null, true))); context.subscriptions.push(commands.registerCommand('javascript.goToProjectConfig', goToProjectConfig.bind(null, false))); - const jsDocCompletionCommand = new TryCompleteJsDocCommand(client); + const jsDocCompletionCommand = new TryCompleteJsDocCommand(() => lazyClientHost().serviceClient); context.subscriptions.push(commands.registerCommand(TryCompleteJsDocCommand.COMMAND_NAME, jsDocCompletionCommand.tryCompleteJsDoc, jsDocCompletionCommand)); - window.onDidChangeActiveTextEditor(VersionStatus.showHideStatus, null, context.subscriptions); - client.onReady().then(() => { - context.subscriptions.push(ProjectStatus.create(client, - path => new Promise(resolve => setTimeout(() => resolve(clientHost.handles(path)), 750)), - context.workspaceState)); - }, () => { - // Nothing to do here. The client did show a message; - }); + const supportedLanguage = [].concat.apply([], standardLanguageDescriptions.map(x => x.modeIds).concat(plugins.map(x => x.languages))); + function didOpenTextDocument(textDocument: TextDocument): boolean { + if (supportedLanguage.indexOf(textDocument.languageId) >= 0) { + openListener.dispose(); + // Force activation + void lazyClientHost(); + return true; + } + return false; + }; + const openListener = workspace.onDidOpenTextDocument(didOpenTextDocument); + for (let textDocument of workspace.textDocuments) { + if (didOpenTextDocument(textDocument)) { + break; + } + } + BuildStatus.update({ queueLength: 0 }); } @@ -423,6 +452,7 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { private languages: LanguageProvider[] = []; private languagePerId: ObjectMap; private readonly disposables: Disposable[] = []; + private readonly versionStatus: VersionStatus; constructor( descriptions: LanguageDescription[], @@ -446,7 +476,10 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { configFileWatcher.onDidDelete(handleProjectCreateOrDelete, this, this.disposables); configFileWatcher.onDidChange(handleProjectChange, this, this.disposables); - this.client = new TypeScriptServiceClient(this, storagePath, globalState, workspaceState, plugins, this.disposables); + this.versionStatus = new VersionStatus(); + this.disposables.push(this.versionStatus); + + this.client = new TypeScriptServiceClient(this, storagePath, globalState, workspaceState, this.versionStatus, plugins, this.disposables); this.languagePerId = Object.create(null); for (const description of descriptions) { const manager = new LanguageProvider(this.client, description); diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index cf2b7c3be6fd8..5e22350feb050 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -18,7 +18,7 @@ import { ITypescriptServiceClient, ITypescriptServiceClientHost, API } from './t import { TypeScriptServerPlugin } from './utils/plugins'; import Logger from './utils/logger'; -import * as VersionStatus from './utils/versionStatus'; +import VersionStatus from './utils/versionStatus'; import * as is from './utils/is'; import * as nls from 'vscode-nls'; @@ -141,7 +141,9 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient host: ITypescriptServiceClientHost, storagePath: string | undefined, globalState: Memento, - private workspaceState: Memento, + private readonly workspaceState: Memento, + private readonly versionStatus: VersionStatus, + private plugins: TypeScriptServerPlugin[], disposables: Disposable[] ) { @@ -404,8 +406,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient const label = version || localize('versionNumber.custom', 'custom'); const tooltip = modulePath; this.modulePath = modulePath; - VersionStatus.showHideStatus(); - VersionStatus.setInfo(label, tooltip); + this.versionStatus.showHideStatus(); + this.versionStatus.setInfo(label, tooltip); // This is backwards compatibility code to move the setting from the local // store into the workspace setting file. diff --git a/extensions/typescript/src/utils/versionStatus.ts b/extensions/typescript/src/utils/versionStatus.ts index e92b87d0f248b..21f3a1c34f18f 100644 --- a/extensions/typescript/src/utils/versionStatus.ts +++ b/extensions/typescript/src/utils/versionStatus.ts @@ -3,42 +3,53 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import vscode = require('vscode'); +import * as vscode from 'vscode'; -const versionBarEntry = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, Number.MIN_VALUE); -export function showHideStatus() { - if (!versionBarEntry) { - return; - } - if (!vscode.window.activeTextEditor) { - versionBarEntry.hide(); - return; - } +export default class VersionStatus extends vscode.Disposable { + onChangeEditorSub: any; + private versionBarEntry: vscode.StatusBarItem; - let doc = vscode.window.activeTextEditor.document; - if (vscode.languages.match('typescript', doc) || vscode.languages.match('typescriptreact', doc)) { - versionBarEntry.show(); - return; - } + constructor() { + super(() => this.dispose()); + + this.versionBarEntry = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, Number.MIN_VALUE); - if (!vscode.window.activeTextEditor.viewColumn) { - // viewColumn is undefined for the debug/output panel, but we still want - // to show the version info - return; + this.onChangeEditorSub = vscode.window.onDidChangeActiveTextEditor(this.showHideStatus, this); } - versionBarEntry.hide(); -} + dispose() { + this.versionBarEntry.dispose(); + this.onChangeEditorSub.dispose(); + } -export function disposeStatus() { - if (versionBarEntry) { - versionBarEntry.dispose(); + showHideStatus() { + if (!this.versionBarEntry) { + return; + } + if (!vscode.window.activeTextEditor) { + this.versionBarEntry.hide(); + return; + } + + let doc = vscode.window.activeTextEditor.document; + if (vscode.languages.match('typescript', doc) || vscode.languages.match('typescriptreact', doc)) { + this.versionBarEntry.show(); + return; + } + + if (!vscode.window.activeTextEditor.viewColumn) { + // viewColumn is undefined for the debug/output panel, but we still want + // to show the version info + return; + } + + this.versionBarEntry.hide(); } -} -export function setInfo(message: string, tooltip: string) { - versionBarEntry.text = message; - versionBarEntry.tooltip = tooltip; - versionBarEntry.command = 'typescript.selectTypeScriptVersion'; + public setInfo(message: string, tooltip: string) { + this.versionBarEntry.text = message; + this.versionBarEntry.tooltip = tooltip; + this.versionBarEntry.command = 'typescript.selectTypeScriptVersion'; + } } diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index 5f23efc8f8036..aa6497bc4101a 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -163,7 +163,7 @@ namespace ProblemMatcher { if (values === void 0 || values === null) { return undefined; } - let result: (string | Problems.ProblemMatcher)[]; + let result: (string | Problems.ProblemMatcher)[] = []; for (let value of values) { let converted = typeof value === 'string' ? value : fromSingle(value); if (converted) { From 416861268af5c06b56a6ca880020097ab0bbc11b Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 26 May 2017 00:18:20 +0200 Subject: [PATCH 1181/2747] Decoration text after decoration wrongly positioned. Fixes #27288 --- src/vs/editor/browser/services/codeEditorServiceImpl.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index 26bc62e9e6a2d..d824627e4ecbb 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -151,7 +151,7 @@ class DecorationTypeOptionsProvider implements IModelDecorationOptionsProvider { this.className = createCSSRules(ModelDecorationCSSRuleType.ClassName); this.inlineClassName = createCSSRules(ModelDecorationCSSRuleType.InlineClassName); this.beforeContentClassName = createCSSRules(ModelDecorationCSSRuleType.BeforeContentClassName); - this.beforeContentClassName = createCSSRules(ModelDecorationCSSRuleType.AfterContentClassName); + this.afterContentClassName = createCSSRules(ModelDecorationCSSRuleType.AfterContentClassName); this.glyphMarginClassName = createCSSRules(ModelDecorationCSSRuleType.GlyphMarginClassName); let options = providerArgs.options; From 2db5b3a43cabdbcbcfba8cff6ee65273eb1998c6 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 24 May 2017 15:27:48 -0700 Subject: [PATCH 1182/2747] Move VersionStatus into a class --- extensions/typescript/src/typescriptMain.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 07a666936b956..18bc57678ff18 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -90,6 +90,7 @@ const standardLanguageDescriptions: LanguageDescription[] = [ export function activate(context: ExtensionContext): void { const plugins = getContributedTypeScriptServerPlugins(); +<<<<<<< HEAD const lazyClientHost = (() => { let clientHost: TypeScriptServiceClientHost | undefined; return () => { @@ -110,6 +111,10 @@ export function activate(context: ExtensionContext): void { }; })(); +======= + const clientHost = new TypeScriptServiceClientHost(standardLanguageDescriptions, context.storagePath, context.globalState, context.workspaceState, plugins); + context.subscriptions.push(clientHost); +>>>>>>> a0b779f... Move VersionStatus into a class context.subscriptions.push(commands.registerCommand('typescript.reloadProjects', () => { lazyClientHost().reloadProjects(); @@ -145,6 +150,7 @@ export function activate(context: ExtensionContext): void { const jsDocCompletionCommand = new TryCompleteJsDocCommand(() => lazyClientHost().serviceClient); context.subscriptions.push(commands.registerCommand(TryCompleteJsDocCommand.COMMAND_NAME, jsDocCompletionCommand.tryCompleteJsDoc, jsDocCompletionCommand)); +<<<<<<< HEAD const supportedLanguage = [].concat.apply([], standardLanguageDescriptions.map(x => x.modeIds).concat(plugins.map(x => x.languages))); function didOpenTextDocument(textDocument: TextDocument): boolean { if (supportedLanguage.indexOf(textDocument.languageId) >= 0) { @@ -162,6 +168,15 @@ export function activate(context: ExtensionContext): void { } } +======= + clientHost.serviceClient.onReady().then(() => { + context.subscriptions.push(ProjectStatus.create(clientHost.serviceClient, + path => new Promise(resolve => setTimeout(() => resolve(clientHost.handles(path)), 750)), + context.workspaceState)); + }, () => { + // Nothing to do here. The client did show a message; + }); +>>>>>>> a0b779f... Move VersionStatus into a class BuildStatus.update({ queueLength: 0 }); } From 68dbf58ff72b9dc136aaf1b7faddd99f75e21c48 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 25 May 2017 15:30:19 -0700 Subject: [PATCH 1183/2747] Actually save the file this time :'( --- extensions/typescript/src/typescriptMain.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 18bc57678ff18..07a666936b956 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -90,7 +90,6 @@ const standardLanguageDescriptions: LanguageDescription[] = [ export function activate(context: ExtensionContext): void { const plugins = getContributedTypeScriptServerPlugins(); -<<<<<<< HEAD const lazyClientHost = (() => { let clientHost: TypeScriptServiceClientHost | undefined; return () => { @@ -111,10 +110,6 @@ export function activate(context: ExtensionContext): void { }; })(); -======= - const clientHost = new TypeScriptServiceClientHost(standardLanguageDescriptions, context.storagePath, context.globalState, context.workspaceState, plugins); - context.subscriptions.push(clientHost); ->>>>>>> a0b779f... Move VersionStatus into a class context.subscriptions.push(commands.registerCommand('typescript.reloadProjects', () => { lazyClientHost().reloadProjects(); @@ -150,7 +145,6 @@ export function activate(context: ExtensionContext): void { const jsDocCompletionCommand = new TryCompleteJsDocCommand(() => lazyClientHost().serviceClient); context.subscriptions.push(commands.registerCommand(TryCompleteJsDocCommand.COMMAND_NAME, jsDocCompletionCommand.tryCompleteJsDoc, jsDocCompletionCommand)); -<<<<<<< HEAD const supportedLanguage = [].concat.apply([], standardLanguageDescriptions.map(x => x.modeIds).concat(plugins.map(x => x.languages))); function didOpenTextDocument(textDocument: TextDocument): boolean { if (supportedLanguage.indexOf(textDocument.languageId) >= 0) { @@ -168,15 +162,6 @@ export function activate(context: ExtensionContext): void { } } -======= - clientHost.serviceClient.onReady().then(() => { - context.subscriptions.push(ProjectStatus.create(clientHost.serviceClient, - path => new Promise(resolve => setTimeout(() => resolve(clientHost.handles(path)), 750)), - context.workspaceState)); - }, () => { - // Nothing to do here. The client did show a message; - }); ->>>>>>> a0b779f... Move VersionStatus into a class BuildStatus.update({ queueLength: 0 }); } From 065b600fe726a4e8e1e183eb2e39dbd4565173a9 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Thu, 25 May 2017 16:03:38 -0700 Subject: [PATCH 1184/2747] Fix #26708 - use StringDecoder to handle data chunks that split multibyte characters --- .../services/search/node/ripgrepTextSearch.ts | 16 +++++++-- .../test/node/ripgrepTextSearch.test.ts | 36 +++++++++++++++---- 2 files changed, 42 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts index 829406f52fef6..03aaa15bb75ff 100644 --- a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts +++ b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts @@ -6,6 +6,7 @@ import { EventEmitter } from 'events'; import * as path from 'path'; +import { StringDecoder, NodeStringDecoder } from 'string_decoder'; import * as cp from 'child_process'; import { rgPath } from 'vscode-ripgrep'; @@ -174,11 +175,13 @@ export class RipgrepParser extends EventEmitter { private fileMatch: FileMatch; private remainder: string; private isDone: boolean; + private stringDecoder: NodeStringDecoder; private numResults = 0; constructor(private maxResults: number, private rootFolder: string) { super(); + this.stringDecoder = new StringDecoder(); } public cancel(): void { @@ -186,16 +189,23 @@ export class RipgrepParser extends EventEmitter { } public flush(): void { + this.handleDecodedData(this.stringDecoder.end()); + if (this.fileMatch) { this.onResult(); } } - public handleData(data: string | Buffer): void { + public handleData(data: Buffer | string): void { + const dataStr = typeof data === 'string' ? data : this.stringDecoder.write(data); + this.handleDecodedData(dataStr); + } + + private handleDecodedData(decodedData: string): void { // If the previous data chunk didn't end in a newline, prepend it to this chunk const dataStr = this.remainder ? - this.remainder + data.toString() : - data.toString(); + this.remainder + decodedData : + decodedData; const dataLines: string[] = dataStr.split(/\r\n|\n/); this.remainder = dataLines[dataLines.length - 1] ? dataLines.pop() : null; diff --git a/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts b/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts index 1ee3f9a6a835a..9ff4208d109cc 100644 --- a/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts +++ b/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts @@ -33,7 +33,11 @@ suite('RipgrepParser', () => { return matchLine; } - function parseInput(inputChunks: string[]): ISerializedFileMatch[] { + function parseInputStrings(inputChunks: string[]): ISerializedFileMatch[] { + return parseInput(inputChunks.map(chunk => new Buffer(chunk))); + } + + function parseInput(inputChunks: Buffer[]): ISerializedFileMatch[] { const matches: ISerializedFileMatch[] = []; const rgp = new RipgrepParser(1e6, rootFolder); rgp.on('result', (match: ISerializedFileMatch) => { @@ -65,7 +69,7 @@ suite('RipgrepParser', () => { [getFileLine('a.txt'), getMatchLine(1, ['before', 'match', 'after']), getMatchLine(2, ['before', 'match', 'after']), fileSectionEnd].join('\n') ]; - const results = parseInput(input); + const results = parseInputStrings(input); assert.equal(results.length, 1); assert.deepEqual(results[0], { @@ -93,7 +97,7 @@ suite('RipgrepParser', () => { [getFileLine('c.txt'), getMatchLine(1, ['before', 'match', 'after']), getMatchLine(2, ['before', 'match', 'after']), fileSectionEnd].join('\n') ]; - const results = parseInput(input); + const results = parseInputStrings(input); assert.equal(results.length, 3); results.forEach(fileResult => assert.equal(fileResult.numMatches, 2)); }); @@ -116,7 +120,7 @@ suite('RipgrepParser', () => { test('Parses multiple chunks broken at each line', () => { const input = singleLineChunks.map(chunk => chunk + '\n'); - const results = parseInput(input); + const results = parseInputStrings(input); assert.equal(results.length, 3); results.forEach(fileResult => assert.equal(fileResult.numMatches, 2)); }); @@ -126,7 +130,7 @@ suite('RipgrepParser', () => { .map(chunk => chunk + '\n') .map(halve)); - const results = parseInput(input); + const results = parseInputStrings(input); assert.equal(results.length, 3); results.forEach(fileResult => assert.equal(fileResult.numMatches, 2)); }); @@ -136,7 +140,7 @@ suite('RipgrepParser', () => { .map(chunk => chunk + '\n') .map(arrayOfChars)); - const results = parseInput(input); + const results = parseInputStrings(input); assert.equal(results.length, 3); results.forEach(fileResult => assert.equal(fileResult.numMatches, 2)); }); @@ -145,8 +149,26 @@ suite('RipgrepParser', () => { const input = singleLineChunks .map(chunk => '\n' + chunk); - const results = parseInput(input); + const results = parseInputStrings(input); assert.equal(results.length, 3); results.forEach(fileResult => assert.equal(fileResult.numMatches, 2)); }); + + test('Parses chunks broken in the middle of a multibyte character', () => { + const multibyteStr = '漢'; + const multibyteBuf = new Buffer(multibyteStr); + const text = getFileLine('foo/bar') + '\n' + getMatchLine(0, ['before', 'match', 'after']) + '\n'; + + // Split the multibyte char into two pieces and divide between the two buffers + const beforeIndex = 24; + const inputBufs = [ + Buffer.concat([new Buffer(text.substr(0, beforeIndex)), multibyteBuf.slice(0, 2)]), + Buffer.concat([multibyteBuf.slice(2), new Buffer(text.substr(beforeIndex))]) + ]; + + const results = parseInput(inputBufs); + assert.equal(results.length, 1); + assert.equal(results[0].lineMatches.length, 1); + assert.deepEqual(results[0].lineMatches[0].offsetAndLengths, [[7, 5]]); + }); }); \ No newline at end of file From 018f6ac2a610685b40770ebcbc39087fb609d07e Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Thu, 25 May 2017 16:15:19 -0700 Subject: [PATCH 1185/2747] Add Unit Test launch config (not sure why it was deleted?) --- .vscode/launch.json | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index d56ca22e59dda..fa30207ce2b26 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -146,6 +146,32 @@ "outFiles": [ "${workspaceRoot}/extensions/node_modules/typescript/lib/**/*.js" ] + }, + { + "type": "node", + "request": "launch", + "name": "Unit Tests", + "protocol": "legacy", + "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", + "runtimeExecutable": "${workspaceRoot}/.build/electron/Code - OSS.app/Contents/MacOS/Electron", + "windows": { + "runtimeExecutable": "${workspaceRoot}/.build/electron/Code - OSS.exe" + }, + "linux": { + "runtimeExecutable": "${workspaceRoot}/.build/electron/code-oss" + }, + "stopOnEntry": false, + "args": [ + "--timeout", + "2000" + ], + "cwd": "${workspaceRoot}", + "env": { + "ELECTRON_RUN_AS_NODE": "true" + }, + "outFiles": [ + "${workspaceRoot}/out/**/*.js" + ] } ], "compounds": [ From 665dbb442e970564c8d3771ee4653b8961dfc765 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Thu, 25 May 2017 16:17:37 -0700 Subject: [PATCH 1186/2747] sourceMaps is enabled by default, remove from launch configs --- .vscode/launch.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index fa30207ce2b26..39b72b995a8b4 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -18,7 +18,6 @@ "name": "Attach to Extension Host", "protocol": "legacy", "port": 5870, - "sourceMaps": true, "restart": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" @@ -30,7 +29,6 @@ "name": "Attach to Shared Process", "protocol": "legacy", "port": 5871, - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -41,7 +39,6 @@ "protocol": "legacy", "name": "Attach to Search process", "port": 7890, - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -52,7 +49,6 @@ "name": "Attach to CLI Process", "protocol": "legacy", "port": 5874, - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -63,7 +59,6 @@ "name": "Attach to Main Process", "protocol": "legacy", "port": 5875, - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -78,7 +73,6 @@ "--extensionDevelopmentPath=${workspaceRoot}/extensions/vscode-api-tests", "--extensionTestsPath=${workspaceRoot}/extensions/vscode-api-tests/out" ], - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -93,7 +87,6 @@ "--extensionDevelopmentPath=${workspaceRoot}/extensions/vscode-colorize-tests", "--extensionTestsPath=${workspaceRoot}/extensions/vscode-colorize-tests/out" ], - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/out/**/*.js" ] @@ -131,7 +124,6 @@ "program": "${workspaceRoot}/extensions/git/node_modules/mocha/bin/_mocha", "stopOnEntry": false, "cwd": "${workspaceRoot}/extensions/git", - "sourceMaps": true, "outFiles": [ "${workspaceRoot}/extensions/git/out/**/*.js" ] @@ -141,7 +133,6 @@ "type": "node", "request": "attach", "port": 5859, - "sourceMaps": true, "protocol": "legacy", "outFiles": [ "${workspaceRoot}/extensions/node_modules/typescript/lib/**/*.js" From c81df3a4f446dbcd5d0b7c03bbabe581455b46b6 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 25 May 2017 16:17:21 -0700 Subject: [PATCH 1187/2747] Use 'descriptionForeground' (#27289) --- extensions/merge-conflict/src/mergeDecorator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts index 39888f727e628..be9e733a562af 100644 --- a/extensions/merge-conflict/src/mergeDecorator.ts +++ b/extensions/merge-conflict/src/mergeDecorator.ts @@ -81,7 +81,7 @@ export default class MergeDectorator implements vscode.Disposable { color: new vscode.ThemeColor('editor.foreground'), after: { contentText: ' ' + localize('currentChange', '(Current change)'), - color: 'rgba(0, 0, 0, 0.7)' + color: new vscode.ThemeColor('descriptionForeground') } }); @@ -96,7 +96,7 @@ export default class MergeDectorator implements vscode.Disposable { isWholeLine: this.decorationUsesWholeLine, after: { contentText: ' ' + localize('incomingChange', '(Incoming change)'), - color: 'rgba(0, 0, 0, 0.7)' + color: new vscode.ThemeColor('descriptionForeground') } }); } From b117a11c0db5743c35d111a607c1a53f05573503 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Thu, 25 May 2017 16:27:55 -0700 Subject: [PATCH 1188/2747] Safer change for #25422 --- src/vs/workbench/services/search/node/ripgrepTextSearch.ts | 2 +- .../services/search/test/node/ripgrepTextSearch.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts index 03aaa15bb75ff..b7f3b7ad4dc9c 100644 --- a/src/vs/workbench/services/search/node/ripgrepTextSearch.ts +++ b/src/vs/workbench/services/search/node/ripgrepTextSearch.ts @@ -235,7 +235,7 @@ export class RipgrepParser extends EventEmitter { this.onResult(); } - this.fileMatch = new FileMatch(path.resolve(this.rootFolder, r[1])); + this.fileMatch = new FileMatch(path.isAbsolute(r[1]) ? r[1] : path.join(this.rootFolder, r[1])); } else { // Line is empty (or malformed) } diff --git a/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts b/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts index 9ff4208d109cc..87a27629eafbd 100644 --- a/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts +++ b/src/vs/workbench/services/search/test/node/ripgrepTextSearch.test.ts @@ -74,7 +74,7 @@ suite('RipgrepParser', () => { assert.deepEqual(results[0], { numMatches: 2, - path: path.resolve(rootFolder, 'a.txt'), + path: path.join(rootFolder, 'a.txt'), lineMatches: [ { lineNumber: 0, From c79c2fe9fb57aecdd1cbe468b6b9cda2b9daf7fb Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Thu, 25 May 2017 17:47:01 -0700 Subject: [PATCH 1189/2747] node-debug2@1.13.0 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 15d2edd0323db..cf894772b6a2b 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -43,7 +43,7 @@ const nodeModules = ['electron', 'original-fs'] const builtInExtensions = [ { name: 'ms-vscode.node-debug', version: '1.13.6' }, - { name: 'ms-vscode.node-debug2', version: '1.12.4' } + { name: 'ms-vscode.node-debug2', version: '1.13.0' } ]; const vscodeEntryPoints = _.flatten([ From 71aeb83f8a5ece369534350157fed381d03c6eb1 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 25 May 2017 21:23:47 -0700 Subject: [PATCH 1190/2747] Pickup all TSConfigs in Workspace for TSC Build Task (#27306) Follow up on #26079 Allows us to pick up all tsconfig files in a workspace for the build tasks --- .../typescript/src/features/taskProvider.ts | 51 +++++++++------- .../typescript/src/utils/tsconfigProvider.ts | 58 +++++++++++++++++++ 2 files changed, 88 insertions(+), 21 deletions(-) create mode 100644 extensions/typescript/src/utils/tsconfigProvider.ts diff --git a/extensions/typescript/src/features/taskProvider.ts b/extensions/typescript/src/features/taskProvider.ts index 76528021983ef..ba53903e447ce 100644 --- a/extensions/typescript/src/features/taskProvider.ts +++ b/extensions/typescript/src/features/taskProvider.ts @@ -11,6 +11,7 @@ import * as vscode from 'vscode'; import * as Proto from '../protocol'; import TypeScriptServiceClient from '../typescriptServiceClient'; +import TsConfigProvider from "../utils/tsconfigProvider"; const exists = (file: string): Promise => @@ -21,32 +22,47 @@ const exists = (file: string): Promise => }); export default class TypeScriptTaskProvider implements vscode.TaskProvider { + private readonly tsconfigProvider: TsConfigProvider; public constructor( private readonly lazyClient: () => TypeScriptServiceClient - ) { } + ) { + this.tsconfigProvider = new TsConfigProvider(); + } + + dispose() { + this.tsconfigProvider.dispose(); + } - async provideTasks(token: vscode.CancellationToken): Promise { + public async provideTasks(token: vscode.CancellationToken): Promise { const rootPath = vscode.workspace.rootPath; if (!rootPath) { return []; } - const projects = (await this.getConfigForActiveFile(token)).concat(await this.getConfigsForWorkspace()); const command = await this.getCommand(); + const projects = await this.getAllTsConfigs(token); - return projects - .filter((x, i) => projects.indexOf(x) === i) - .map(configFile => { - const configFileName = path.relative(rootPath, configFile); - const buildTask = new vscode.ShellTask(`tsc: build ${configFileName}`, `${command} -p ${configFile}`, '$tsc'); - buildTask.group = vscode.TaskGroup.Build; - return buildTask; - }); + return projects.map(configFile => { + const configFileName = path.relative(rootPath, configFile); + const buildTask = new vscode.ShellTask(`tsc: build ${configFileName}`, `${command} -p ${configFile}`, '$tsc'); + buildTask.group = vscode.TaskGroup.Build; + return buildTask; + }); } + private async getAllTsConfigs(token: vscode.CancellationToken): Promise { + const out: string[] = []; + const configs = (await this.getTsConfigForActiveFile(token)).concat(await this.getTsConfigsInWorkspace()); + for (const config of configs) { + if (await exists(config)) { + out.push(config); + } + } + return out; + } - private async getConfigForActiveFile(token: vscode.CancellationToken): Promise { + private async getTsConfigForActiveFile(token: vscode.CancellationToken): Promise { const editor = vscode.window.activeTextEditor; if (editor) { if (path.basename(editor.document.fileName).match(/^tsconfig\.(.\.)?json$/)) { @@ -75,15 +91,8 @@ export default class TypeScriptTaskProvider implements vscode.TaskProvider { return []; } - private async getConfigsForWorkspace(): Promise { - if (!vscode.workspace.rootPath) { - return []; - } - const rootTsConfig = path.join(vscode.workspace.rootPath, 'tsconfig.json'); - if (!await exists(rootTsConfig)) { - return []; - } - return [rootTsConfig]; + private async getTsConfigsInWorkspace(): Promise { + return Array.from(await this.tsconfigProvider.getConfigsForWorkspace()); } private async getCommand(): Promise { diff --git a/extensions/typescript/src/utils/tsconfigProvider.ts b/extensions/typescript/src/utils/tsconfigProvider.ts new file mode 100644 index 0000000000000..e85ca24bbff77 --- /dev/null +++ b/extensions/typescript/src/utils/tsconfigProvider.ts @@ -0,0 +1,58 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +import * as vscode from 'vscode'; + +export default class TsConfigProvider extends vscode.Disposable { + private readonly tsconfigs = new Set(); + + private activated: boolean = false; + private disposables: vscode.Disposable[] = []; + + constructor() { + super(() => this.dispose()); + } + + dispose(): void { + this.disposables.forEach(d => d.dispose()); + } + + public async getConfigsForWorkspace(): Promise> { + if (!vscode.workspace.rootPath) { + return []; + } + await this.ensureActivated(); + return this.tsconfigs; + } + + private async ensureActivated() { + if (this.activated) { + return this; + } + this.activated = true; + + for (const config of await TsConfigProvider.loadWorkspaceTsconfigs()) { + this.tsconfigs.add(config.fsPath); + } + + const configFileWatcher = vscode.workspace.createFileSystemWatcher('**/tsconfig*.json'); + this.disposables.push(configFileWatcher); + configFileWatcher.onDidCreate(this.handleProjectCreate, this, this.disposables); + configFileWatcher.onDidDelete(this.handleProjectDelete, this, this.disposables); + + return this; + } + + private static loadWorkspaceTsconfigs() { + return vscode.workspace.findFiles('**/tsconfig*.json', '**/node_modules/**'); + } + + private handleProjectCreate(e: vscode.Uri) { + this.tsconfigs.add(e.fsPath); + } + + private handleProjectDelete(e: vscode.Uri) { + this.tsconfigs.delete(e.fsPath); + } +} From 5be2260d22aa832ab53ae9196c513553b410bef3 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 25 May 2017 23:50:49 -0700 Subject: [PATCH 1191/2747] Select single words in property value --- extensions/emmet/src/selectItemHTML.ts | 65 +++++++++++++++-- extensions/emmet/src/selectItemStylesheet.ts | 75 ++++++++++++++++--- extensions/emmet/src/util.ts | 76 ++++++++++++++++++++ 3 files changed, 200 insertions(+), 16 deletions(-) diff --git a/extensions/emmet/src/selectItemHTML.ts b/extensions/emmet/src/selectItemHTML.ts index 79d0a585e0ae0..2c0be704eadf3 100644 --- a/extensions/emmet/src/selectItemHTML.ts +++ b/extensions/emmet/src/selectItemHTML.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { getNode, getDeepestNode } from './util'; +import { getNode, getDeepestNode, findNextWord, findPrevWord } from './util'; import Node from '@emmetio/node'; export function nextItemHTML(selection: vscode.Selection, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { @@ -99,10 +99,40 @@ function getNextAttribute(selection: vscode.Selection, document: vscode.TextDocu return new vscode.Selection(document.positionAt(attr.start), document.positionAt(attr.end)); } - if ((attr.value.start !== attr.value.end) && ((selectionStart === attr.start && selectionEnd === attr.end) || selectionEnd < attr.end - 1)) { - // select attr value + if (attr.value.start === attr.value.end) { + // No attr value to select + continue; + } + + if ((selectionStart === attr.start && selectionEnd === attr.end) || selectionEnd < attr.value.start) { + // cursor is in attr name, so select full attr value return new vscode.Selection(document.positionAt(attr.value.start), document.positionAt(attr.value.end)); } + + // Fetch the next word in the attr value + + if (attr.value.toString().indexOf(' ') === -1) { + // attr value does not have space, so no next word to find + continue; + } + + let pos = undefined; + if (selectionStart === attr.value.start && selectionEnd === attr.value.end) { + pos = -1; + } + if (pos === undefined && selectionEnd < attr.end) { + pos = selectionEnd - attr.value.start - 1; + } + + if (pos !== undefined) { + let [newSelectionStart, newSelectionEnd] = findNextWord(attr.value.toString(), pos); + if (newSelectionStart >= 0 && newSelectionEnd >= 0) { + newSelectionStart += attr.value.start; + newSelectionEnd += attr.value.start; + return new vscode.Selection(document.positionAt(newSelectionStart), document.positionAt(newSelectionEnd)); + } + } + } } @@ -113,18 +143,39 @@ function getPrevAttribute(selection: vscode.Selection, document: vscode.TextDocu } let selectionStart = document.offsetAt(selection.anchor); + let selectionEnd = document.offsetAt(selection.active); for (let i = node.attributes.length - 1; i >= 0; i--) { let attr = node.attributes[i]; - if (selectionStart > attr.value.start) { - // select attr value - return new vscode.Selection(document.positionAt(attr.value.start), document.positionAt(attr.value.end)); + if (selectionStart <= attr.start) { + continue; } - if (selectionStart > attr.start) { + if (attr.value.start === attr.value.end || selectionStart < attr.value.start) { // select full attr return new vscode.Selection(document.positionAt(attr.start), document.positionAt(attr.end)); } + + if (selectionStart === attr.value.start) { + if (selectionEnd >= attr.value.end) { + // select full attr + return new vscode.Selection(document.positionAt(attr.start), document.positionAt(attr.end)); + } + // select attr value + return new vscode.Selection(document.positionAt(attr.value.start), document.positionAt(attr.value.end)); + } + + // Fetch the prev word in the attr value + + let pos = selectionStart > attr.value.end ? attr.value.toString().length : selectionStart - attr.value.start; + let [newSelectionStart, newSelectionEnd] = findPrevWord(attr.value.toString(), pos); + if (newSelectionStart >= 0 && newSelectionEnd >= 0) { + newSelectionStart += attr.value.start; + newSelectionEnd += attr.value.start; + return new vscode.Selection(document.positionAt(newSelectionStart), document.positionAt(newSelectionEnd)); + } + + } } \ No newline at end of file diff --git a/extensions/emmet/src/selectItemStylesheet.ts b/extensions/emmet/src/selectItemStylesheet.ts index d0167a2d8b93d..e3144cbf6662a 100644 --- a/extensions/emmet/src/selectItemStylesheet.ts +++ b/extensions/emmet/src/selectItemStylesheet.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { getNode, getDeepestNode } from './util'; +import { getNode, getDeepestNode, findNextWord, findPrevWord } from './util'; import Node from '@emmetio/node'; export function nextItemStylesheet(selection: vscode.Selection, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { @@ -12,9 +12,17 @@ export function nextItemStylesheet(selection: vscode.Selection, editor: vscode.T let endOffset = editor.document.offsetAt(selection.active); let currentNode = getNode(rootNode, endOffset, true); - // Full property is selected, so select property value next + // Full property is selected, so select full property value next if (currentNode.type === 'property' && startOffset === currentNode.start && endOffset === currentNode.end) { - return getSelectionFromNode(currentNode, editor.document, true); + return getSelectionFromProperty(currentNode, editor.document, startOffset, endOffset, true, 'next'); + } + + // Part or whole of propertyValue is selected, so select the next word in the propertyValue + if (currentNode.type === 'property' && startOffset >= currentNode.valueToken.start && endOffset <= currentNode.valueToken.end) { + let singlePropertyValue = getSelectionFromProperty(currentNode, editor.document, startOffset, endOffset, false, 'next'); + if (singlePropertyValue) { + return singlePropertyValue; + } } // Cursor is in the selector or in a property @@ -41,13 +49,27 @@ export function nextItemStylesheet(selection: vscode.Selection, editor: vscode.T export function prevItemStylesheet(selection: vscode.Selection, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { let startOffset = editor.document.offsetAt(selection.anchor); + let endOffset = editor.document.offsetAt(selection.active); let currentNode = getNode(rootNode, startOffset); if (!currentNode) { currentNode = rootNode; } + // Full property value is selected, so select the whole property next + if (currentNode.type === 'property' && startOffset === currentNode.valueToken.start && endOffset === currentNode.valueToken.end) { + return getSelectionFromNode(currentNode, editor.document); + } + + // Part of propertyValue is selected, so select the prev word in the propertyValue + if (currentNode.type === 'property' && startOffset >= currentNode.valueToken.start && endOffset <= currentNode.valueToken.end) { + let singlePropertyValue = getSelectionFromProperty(currentNode, editor.document, startOffset, endOffset, false, 'prev'); + if (singlePropertyValue) { + return singlePropertyValue; + } + } + if (currentNode.type === 'property' || !currentNode.firstChild || (currentNode.type === 'rule' && startOffset <= currentNode.firstChild.start)) { - return getSelectionFromNode(currentNode, editor.document);; + return getSelectionFromNode(currentNode, editor.document); } // Select the child that appears just before the cursor @@ -57,23 +79,58 @@ export function prevItemStylesheet(selection: vscode.Selection, editor: vscode.T } prevNode = getDeepestNode(prevNode); - return getSelectionFromNode(prevNode, editor.document, true); + return getSelectionFromProperty(prevNode, editor.document, startOffset, endOffset, false, 'prev'); } -function getSelectionFromNode(node: Node, document: vscode.TextDocument, selectPropertyValue: boolean = false): vscode.Selection { +function getSelectionFromNode(node: Node, document: vscode.TextDocument): vscode.Selection { if (!node) { return; } let nodeToSelect = node.type === 'rule' ? node.selectorToken : node; + return new vscode.Selection(document.positionAt(nodeToSelect.start), document.positionAt(nodeToSelect.end)); +} + + +function getSelectionFromProperty(node: Node, document: vscode.TextDocument, selectionStart: number, selectionEnd: number, selectFullValue: boolean, direction: string): vscode.Selection { + if (!node || node.type !== 'property') { + return; + } + + let propertyValue = node.valueToken.stream.substring(node.valueToken.start, node.valueToken.end); + selectFullValue = selectFullValue || (direction === 'prev' && selectionStart === node.valueToken.start && selectionEnd < node.valueToken.end); + + if (selectFullValue) { + return new vscode.Selection(document.positionAt(node.valueToken.start), document.positionAt(node.valueToken.end)); + } + + let pos; + if (direction === 'prev') { + if (selectionStart === node.valueToken.start) { + return; + } + pos = selectionStart > node.valueToken.end ? propertyValue.length : selectionStart - node.valueToken.start; + } + + if (direction === 'next') { + if (selectionEnd === node.valueToken.end && (selectionStart > node.valueToken.start || propertyValue.indexOf(' ') === -1)) { + return; + } + pos = selectionEnd === node.valueToken.end ? -1 : selectionEnd - node.valueToken.start - 1; + } - let selectionStart = (node.type === 'property' && selectPropertyValue) ? node.valueToken.start : nodeToSelect.start; - let selectionEnd = (node.type === 'property' && selectPropertyValue) ? node.valueToken.end : nodeToSelect.end; - return new vscode.Selection(document.positionAt(selectionStart), document.positionAt(selectionEnd)); + let [newSelectionStart, newSelectionEnd] = direction === 'prev' ? findPrevWord(propertyValue, pos) : findNextWord(propertyValue, pos); + if (!newSelectionStart && !newSelectionEnd) { + return; + } + + newSelectionStart += node.valueToken.start; + newSelectionEnd += node.valueToken.start; + return new vscode.Selection(document.positionAt(newSelectionStart), document.positionAt(newSelectionEnd)); } diff --git a/extensions/emmet/src/util.ts b/extensions/emmet/src/util.ts index 3b495069d1e53..81085e5b6d6dc 100644 --- a/extensions/emmet/src/util.ts +++ b/extensions/emmet/src/util.ts @@ -136,4 +136,80 @@ export function getDeepestNode(node: Node): Node { } return getDeepestNode(node.children[node.children.length - 1]); +} + +export function findNextWord(propertyValue: string, pos: number): [number, number] { + + let foundSpace = pos === -1; + let foundStart = false; + let foundEnd = false; + + let newSelectionStart; + let newSelectionEnd; + while (pos < propertyValue.length - 1) { + pos++; + if (!foundSpace) { + if (propertyValue[pos] === ' ') { + foundSpace = true; + } + continue; + } + if (foundSpace && !foundStart && propertyValue[pos] === ' ') { + continue; + } + if (!foundStart) { + newSelectionStart = pos; + foundStart = true; + continue; + } + if (propertyValue[pos] === ' ') { + newSelectionEnd = pos; + foundEnd = true; + break; + } + } + + if (foundStart && !foundEnd) { + newSelectionEnd = propertyValue.length; + } + + return [newSelectionStart, newSelectionEnd]; +} + +export function findPrevWord(propertyValue: string, pos: number): [number, number] { + + let foundSpace = pos === propertyValue.length; + let foundStart = false; + let foundEnd = false; + + let newSelectionStart; + let newSelectionEnd; + while (pos > -1) { + pos--; + if (!foundSpace) { + if (propertyValue[pos] === ' ') { + foundSpace = true; + } + continue; + } + if (foundSpace && !foundEnd && propertyValue[pos] === ' ') { + continue; + } + if (!foundEnd) { + newSelectionEnd = pos + 1; + foundEnd = true; + continue; + } + if (propertyValue[pos] === ' ') { + newSelectionStart = pos + 1; + foundStart = true; + break; + } + } + + if (foundEnd && !foundStart) { + newSelectionStart = 0; + } + + return [newSelectionStart, newSelectionEnd]; } \ No newline at end of file From 0fbbc8eb0c0e88c55474eb07ac31759d0b5255ec Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 May 2017 10:17:58 +0200 Subject: [PATCH 1192/2747] fix #27245 --- src/vs/vscode.d.ts | 4 +++- src/vs/workbench/api/node/extHostDocumentData.ts | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 35a6a58cc03ba..296649cd8f907 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -201,7 +201,9 @@ declare module 'vscode' { * Get a word-range at the given position. By default words are defined by * common separators, like space, -, _, etc. In addition, per languge custom * [word definitions](#LanguageConfiguration.wordPattern) can be defined. It - * is also possible to provide a custom regular expression. + * is also possible to provide a custom regular expression. *Note* that a + * custom regular expression must not match the empty string and that it will + * be ignored if it does. * * The position will be [adjusted](#TextDocument.validatePosition). * diff --git a/src/vs/workbench/api/node/extHostDocumentData.ts b/src/vs/workbench/api/node/extHostDocumentData.ts index 96cb2aec92d11..e52493a31e034 100644 --- a/src/vs/workbench/api/node/extHostDocumentData.ts +++ b/src/vs/workbench/api/node/extHostDocumentData.ts @@ -243,6 +243,7 @@ export class ExtHostDocumentData extends MirrorModel { private _getWordRangeAtPosition(_position: vscode.Position, regexp?: RegExp): vscode.Range { let position = this._validatePosition(_position); if (!regexp || regExpLeadsToEndlessLoop(regexp)) { + console.warn(`[getWordRangeAtPosition]: ignoring custom regexp '${regexp.source}' because it matches the empty string.`); regexp = getWordDefinitionFor(this._languageId); } let wordAtText = getWordAtText( From de6e586588f7701cadb966a70d2452700b5b3858 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 May 2017 10:27:58 +0200 Subject: [PATCH 1193/2747] fix #27277 --- src/vs/vscode.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 296649cd8f907..e9645e8147d47 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -4680,6 +4680,8 @@ declare module 'vscode' { * A glob pattern that filters the file events must be provided. Optionally, flags to ignore certain * kinds of events can be provided. To stop listening to events the watcher must be disposed. * + * *Note* that only files within the current [workspace](#workspace.rootPath) can be watched. + * * @param globPattern A glob pattern that is applied to the names of created, changed, and deleted files. * @param ignoreCreateEvents Ignore when files have been created. * @param ignoreChangeEvents Ignore when files have been changed. From 929ac9047d0c4f17a944d59f5f845de0fe75f0dc Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Fri, 26 May 2017 10:36:52 +0200 Subject: [PATCH 1194/2747] Updated tasks tests with respect to new Express eslint config. Code cleanup. --- test/smoke/.vscode/launch.json | 26 --------------- test/smoke/.vscode/tasks.json | 10 ------ test/smoke/src/areas/tasks.ts | 11 ++++--- test/smoke/src/main.js | 1 - test/smoke/src/mocha-runner.js | 2 +- test/smoke/src/test.ts | 36 +++++++++++++++++++++ test/smoke/src/tests.ts | 36 --------------------- test/smoke/src/tests/configuration-views.ts | 4 +-- test/smoke/src/tests/css.ts | 4 +-- test/smoke/src/tests/data-loss.ts | 4 +-- test/smoke/src/tests/data-migration.ts | 5 +-- test/smoke/src/tests/explorer.ts | 5 +-- test/smoke/src/tests/extensions.ts | 19 +++++++++-- test/smoke/src/tests/git.ts | 4 +-- test/smoke/src/tests/integrated-terminal.ts | 4 +-- test/smoke/src/tests/javascript-debug.ts | 4 +-- test/smoke/src/tests/javascript.ts | 4 +-- test/smoke/src/tests/localization.ts | 4 +-- test/smoke/src/tests/search.ts | 4 +-- test/smoke/src/tests/statusbar.ts | 4 +-- test/smoke/src/tests/tasks.ts | 12 +++---- 21 files changed, 91 insertions(+), 112 deletions(-) delete mode 100644 test/smoke/.vscode/launch.json delete mode 100644 test/smoke/.vscode/tasks.json create mode 100644 test/smoke/src/test.ts delete mode 100644 test/smoke/src/tests.ts diff --git a/test/smoke/.vscode/launch.json b/test/smoke/.vscode/launch.json deleted file mode 100644 index 25b4e7e4c0ed7..0000000000000 --- a/test/smoke/.vscode/launch.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - // Use IntelliSense to learn about possible Node.js debug attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "node", - "request": "launch", - "name": "Mocha Tests", - "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", - "args": [ - "-u", - "tdd", - "--timeout", - "999999", - "--colors", - "${workspaceRoot}/out/tests.js" - ], - "outFiles": [ "${workspaceRoot}/out/**/*.js" ], - "internalConsoleOptions": "openOnSessionStart", - "sourceMaps": true, - "cwd": "${workspaceRoot}" - } - ] -} \ No newline at end of file diff --git a/test/smoke/.vscode/tasks.json b/test/smoke/.vscode/tasks.json deleted file mode 100644 index 926b1ddcd18fb..0000000000000 --- a/test/smoke/.vscode/tasks.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "0.1.0", - "command": "tsc", - "isShellCommand": true, - "args": ["-p", "."], - "showOutput": "silent", - "problemMatcher": "$tsc" -} \ No newline at end of file diff --git a/test/smoke/src/areas/tasks.ts b/test/smoke/src/areas/tasks.ts index d83cc173efa1f..e0774854f3ad2 100644 --- a/test/smoke/src/areas/tasks.ts +++ b/test/smoke/src/areas/tasks.ts @@ -15,8 +15,9 @@ export class Tasks { // noop } - public build(): Promise { - return this.spectron.command('workbench.action.tasks.build'); + public async build(): Promise { + await this.spectron.command('workbench.action.tasks.build'); + return this.spectron.wait(); // wait for build to finish } public openProblemsView(): Promise { @@ -25,12 +26,12 @@ export class Tasks { public async firstOutputLineEndsWith(fileName: string): Promise { const firstLine = await this.spectron.waitFor(this.spectron.client.getText, `${this.outputViewSelector}>:nth-child(2)`); - + return firstLine.endsWith(fileName); } public getOutputResult(): Promise { - return this.spectron.waitFor(this.spectron.client.getText, `${this.outputViewSelector}>:nth-child(10) span.mtk1`); + return this.spectron.waitFor(this.spectron.client.getText, `${this.outputViewSelector}>:nth-child(5) span.mtk1`); } public selectOutputViewType(type: string): Promise { @@ -41,7 +42,7 @@ export class Tasks { return this.spectron.client.getValue(`${this.workbenchPanelSelector} .select-box`); } - public getProblemsViewFirstElementName(): Promise { + public getProblemsViewFirstElementName(): Promise { return this.spectron.waitFor(this.spectron.client.getText, `${this.problemsViewSelector} .label-name`); } diff --git a/test/smoke/src/main.js b/test/smoke/src/main.js index 8df41b5c73cfb..a6acc9a7d8956 100644 --- a/test/smoke/src/main.js +++ b/test/smoke/src/main.js @@ -53,7 +53,6 @@ else if (os === 'win32') os = 'win'; var promises = []; try { - // promises.push(execute('npm install'), process.cwd()); promises.push(getKeybindings(`${keybindingsUrl}/doc.keybindings.${os}.json`, `${tempFolder}/keybindings.json`)); promises.push(cleanOrClone(testRepoUrl, testRepoLocalDir)); diff --git a/test/smoke/src/mocha-runner.js b/test/smoke/src/mocha-runner.js index 8ea1dd905aa1e..39a91bcdbabc6 100644 --- a/test/smoke/src/mocha-runner.js +++ b/test/smoke/src/mocha-runner.js @@ -14,7 +14,7 @@ var mocha = new Mocha({ useColors: true }); -mocha.addFile(path.join(process.cwd(), 'out/tests.js')); +mocha.addFile(path.join(process.cwd(), 'out/test.js')); mocha.run((failures) => { process.on('exit', () => { process.exit(failures); diff --git a/test/smoke/src/test.ts b/test/smoke/src/test.ts new file mode 100644 index 0000000000000..70cc2f5d3229d --- /dev/null +++ b/test/smoke/src/test.ts @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { testDataLoss } from "./tests/data-loss"; +import { testDataMigration } from "./tests/data-migration"; +import { testExplorer } from "./tests/explorer"; +import { testConfigViews } from "./tests/configuration-views"; +import { testSearch } from "./tests/search"; +import { testCSS } from "./tests/css"; +import { testJavaScript } from "./tests/javascript"; +import { testJavaScriptDebug } from "./tests/javascript-debug"; +import { testGit } from "./tests/git"; +import { testIntegratedTerminal } from "./tests/integrated-terminal"; +import { testStatusbar } from "./tests/statusbar"; +import { testTasks } from "./tests/tasks"; +import { testExtensions } from "./tests/extensions"; +import { testLocalization } from "./tests/localization"; + +describe('Smoke Test Suite', async () => { + testDataMigration(); + testDataLoss(); + testExplorer(); + testConfigViews(); + testSearch(); + testCSS(); + testJavaScript(); + testJavaScriptDebug(); + testGit(); + testIntegratedTerminal(); + testStatusbar(); + testTasks(); + testExtensions(); + testLocalization(); +}); \ No newline at end of file diff --git a/test/smoke/src/tests.ts b/test/smoke/src/tests.ts deleted file mode 100644 index 17ca694e20936..0000000000000 --- a/test/smoke/src/tests.ts +++ /dev/null @@ -1,36 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { dataLoss } from "./tests/data-loss"; -import { dataMigration } from "./tests/data-migration"; -import { explorer } from "./tests/explorer"; -import { configurationViews } from "./tests/configuration-views"; -import { search } from "./tests/search"; -import { css } from "./tests/css"; -import { javascript } from "./tests/javascript"; -import { javascriptDebug } from "./tests/javascript-debug"; -import { test_git } from "./tests/git"; -import { integratedTerminal } from "./tests/integrated-terminal"; -import { statusBar } from "./tests/statusbar"; -import { tasks } from "./tests/tasks"; -import { extensions } from "./tests/extensions"; -import { localization } from "./tests/localization"; - -describe('Smoke Test Suite', function () { - dataMigration(); - dataLoss(); - explorer(); - configurationViews(); - search(); - css(); - javascript(); - javascriptDebug(); - test_git(); - integratedTerminal(); - statusBar(); - tasks(); - extensions(); - localization(); -}); \ No newline at end of file diff --git a/test/smoke/src/tests/configuration-views.ts b/test/smoke/src/tests/configuration-views.ts index 2f61f3337fb63..e1241b6bfb5fb 100644 --- a/test/smoke/src/tests/configuration-views.ts +++ b/test/smoke/src/tests/configuration-views.ts @@ -12,8 +12,8 @@ import { ConfigurationView, ActivityBarPosition } from "../areas/configuration-v let app: SpectronApplication; let common: CommonActions; -export function configurationViews() { - context('Configuration and views', function () { +export function testConfigViews() { + context('Configuration and views', () => { let configView: ConfigurationView; beforeEach(async function () { diff --git a/test/smoke/src/tests/css.ts b/test/smoke/src/tests/css.ts index 01a0bddbe2589..d91513f543116 100644 --- a/test/smoke/src/tests/css.ts +++ b/test/smoke/src/tests/css.ts @@ -12,8 +12,8 @@ import { CSS, CSSProblem } from '../areas/css'; let app: SpectronApplication; let common: CommonActions; -export function css() { - context('CSS', function () { +export function testCSS() { + context('CSS', () => { let css: CSS; beforeEach(async function () { diff --git a/test/smoke/src/tests/data-loss.ts b/test/smoke/src/tests/data-loss.ts index 4be1635cfcefa..e1498299e8ee8 100644 --- a/test/smoke/src/tests/data-loss.ts +++ b/test/smoke/src/tests/data-loss.ts @@ -13,8 +13,8 @@ let app: SpectronApplication; let common: CommonActions; let dl: DataLoss; -export function dataLoss() { - context('Data Loss', function () { +export function testDataLoss() { + context('Data Loss', () => { beforeEach(async function () { app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH], [`--user-data-dir=${USER_DIR}`]); diff --git a/test/smoke/src/tests/data-migration.ts b/test/smoke/src/tests/data-migration.ts index 0dba58deccbc0..4b8e627bcfe63 100644 --- a/test/smoke/src/tests/data-migration.ts +++ b/test/smoke/src/tests/data-migration.ts @@ -11,11 +11,12 @@ import { CommonActions } from '../areas/common'; let app: SpectronApplication; let common: CommonActions; -export function dataMigration() { +export function testDataMigration() { if (!STABLE_PATH) { return; } - context('Data Migration', function () { + + context('Data Migration', () => { afterEach(async function () { await app.stop(); diff --git a/test/smoke/src/tests/explorer.ts b/test/smoke/src/tests/explorer.ts index 83c2d114196f0..d1a4570f003cd 100644 --- a/test/smoke/src/tests/explorer.ts +++ b/test/smoke/src/tests/explorer.ts @@ -11,8 +11,9 @@ import { CommonActions } from '../areas/common'; let app: SpectronApplication; let common: CommonActions; -export function explorer() { - context('Explorer', function () { +export function testExplorer() { + context('Explorer', () => { + beforeEach(async function () { app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); common = new CommonActions(app); diff --git a/test/smoke/src/tests/extensions.ts b/test/smoke/src/tests/extensions.ts index a545dd7c674b7..9e563f2f3c104 100644 --- a/test/smoke/src/tests/extensions.ts +++ b/test/smoke/src/tests/extensions.ts @@ -9,11 +9,18 @@ import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH, EXTENSIONS_DIR } from import { CommonActions } from '../areas/common'; import { Extensions } from "../areas/extensions"; +var dns = require('dns'); + let app: SpectronApplication; let common: CommonActions; -export function extensions() { - context('Extensions', function () { +export async function testExtensions() { + const network = await networkAttached(); + if (!network) { + return; + } + + context('Extensions', () => { let extensions: Extensions; beforeEach(async function () { @@ -54,4 +61,12 @@ export function extensions() { assert.ok(x); }); }); +} + +function networkAttached(): Promise { + return new Promise((res, rej) => { + dns.resolve('marketplace.visualstudio.com', (err) => { + err ? res(false) : res(true); + }); + }); } \ No newline at end of file diff --git a/test/smoke/src/tests/git.ts b/test/smoke/src/tests/git.ts index 11d568c7f8b80..cb5e71e7fa381 100644 --- a/test/smoke/src/tests/git.ts +++ b/test/smoke/src/tests/git.ts @@ -12,8 +12,8 @@ import { Git } from "../areas/git"; let app: SpectronApplication; let common: CommonActions; -export function test_git() { - context('Git', function () { +export function testGit() { + context('Git', () => { let git: Git; beforeEach(async function () { diff --git a/test/smoke/src/tests/integrated-terminal.ts b/test/smoke/src/tests/integrated-terminal.ts index 95925d03f961d..c05a84e0b2af6 100644 --- a/test/smoke/src/tests/integrated-terminal.ts +++ b/test/smoke/src/tests/integrated-terminal.ts @@ -12,8 +12,8 @@ import { IntegratedTerminal } from "../areas/integrated-terminal"; let app: SpectronApplication; let common: CommonActions; -export function integratedTerminal() { - context('Integrated Terminal', function () { +export function testIntegratedTerminal() { + context('Integrated Terminal', () => { let terminal: IntegratedTerminal; beforeEach(async function () { diff --git a/test/smoke/src/tests/javascript-debug.ts b/test/smoke/src/tests/javascript-debug.ts index 7f85ee4f49ce8..801543f539a36 100644 --- a/test/smoke/src/tests/javascript-debug.ts +++ b/test/smoke/src/tests/javascript-debug.ts @@ -12,8 +12,8 @@ import { JavaScriptDebug } from "../areas/javascript-debug"; let app: SpectronApplication; let common: CommonActions; -export function javascriptDebug() { - context('Debugging JavaScript', function () { +export function testJavaScriptDebug() { + context('Debugging JavaScript', () => { let jsDebug: JavaScriptDebug; beforeEach(async function () { diff --git a/test/smoke/src/tests/javascript.ts b/test/smoke/src/tests/javascript.ts index 2d82fde2d4b83..490677f1f2980 100644 --- a/test/smoke/src/tests/javascript.ts +++ b/test/smoke/src/tests/javascript.ts @@ -12,8 +12,8 @@ import { JavaScript } from "../areas/javascript"; let app: SpectronApplication; let common: CommonActions; -export function javascript() { - context('JavaScript', function () { +export function testJavaScript() { + context('JavaScript', () => { let js: JavaScript; beforeEach(async function () { diff --git a/test/smoke/src/tests/localization.ts b/test/smoke/src/tests/localization.ts index 35a72186e820f..3ac81ae2f7553 100644 --- a/test/smoke/src/tests/localization.ts +++ b/test/smoke/src/tests/localization.ts @@ -12,8 +12,8 @@ import { Localization, ViewletType } from "../areas/localization"; let app: SpectronApplication; let common: CommonActions; -export function localization() { - context('Localization', function () { +export function testLocalization() { + context('Localization', () => { afterEach(async function () { return await app.stop(); }); diff --git a/test/smoke/src/tests/search.ts b/test/smoke/src/tests/search.ts index 8ab012c9b085f..ea2041d3af011 100644 --- a/test/smoke/src/tests/search.ts +++ b/test/smoke/src/tests/search.ts @@ -12,8 +12,8 @@ import { Search } from "../areas/search"; let app: SpectronApplication; let common: CommonActions; -export function search() { - context('Search', function () { +export function testSearch() { + context('Search', () => { let search: Search; beforeEach(async function () { diff --git a/test/smoke/src/tests/statusbar.ts b/test/smoke/src/tests/statusbar.ts index 6fbcf6472c4ce..86a315daebcde 100644 --- a/test/smoke/src/tests/statusbar.ts +++ b/test/smoke/src/tests/statusbar.ts @@ -12,8 +12,8 @@ import { StatusBarElement, StatusBar } from "../areas/statusBar"; let app: SpectronApplication; let common: CommonActions; -export function statusBar() { - context('Status Bar', function () { +export function testStatusbar() { + context('Status Bar', () => { let statusBar: StatusBar; beforeEach(async function () { diff --git a/test/smoke/src/tests/tasks.ts b/test/smoke/src/tests/tasks.ts index c020aceac0c4c..bbe36ef39680f 100644 --- a/test/smoke/src/tests/tasks.ts +++ b/test/smoke/src/tests/tasks.ts @@ -10,8 +10,8 @@ import { Tasks } from "../areas/tasks"; let app: SpectronApplication; -export function tasks() { - context('Tasks', function () { +export function testTasks() { + context('Tasks', () => { let tasks: Tasks; beforeEach(async function () { @@ -24,15 +24,14 @@ export function tasks() { return await app.stop(); }); - it('verifies that build task produces 6 errors', async function () { + it('verifies that eslint task results in 1 problem', async function () { await tasks.build(); const res = await tasks.getOutputResult(); - assert.equal(res, '✖ 6 problems (6 errors, 0 warnings)'); + assert.equal(res, '✖ 1 problem (0 errors, 1 warning)'); }); it(`is able to select 'Git' output`, async function () { await tasks.build(); - await app.wait(); await tasks.selectOutputViewType('Git'); const viewType = await tasks.getOutputViewType(); assert.equal(viewType, 'Git'); @@ -45,12 +44,11 @@ export function tasks() { it(`verifies build errors are reflected in 'Problems View'`, async function () { await tasks.build(); - await app.wait(); await tasks.openProblemsView(); const problemName = await tasks.getProblemsViewFirstElementName(); assert.equal(problemName, 'index.js'); const problemsCount = await tasks.getProblemsViewFirstElementCount(); - assert.equal(problemsCount, '6'); + assert.equal(problemsCount, '1'); }); }); } \ No newline at end of file From e14e783ca890d389a2db4eb22a043aeb10201cd5 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 May 2017 11:00:10 +0200 Subject: [PATCH 1195/2747] followup fix from fix #27245 --- src/vs/workbench/api/node/extHostDocumentData.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/api/node/extHostDocumentData.ts b/src/vs/workbench/api/node/extHostDocumentData.ts index e52493a31e034..be60815d55386 100644 --- a/src/vs/workbench/api/node/extHostDocumentData.ts +++ b/src/vs/workbench/api/node/extHostDocumentData.ts @@ -242,10 +242,17 @@ export class ExtHostDocumentData extends MirrorModel { private _getWordRangeAtPosition(_position: vscode.Position, regexp?: RegExp): vscode.Range { let position = this._validatePosition(_position); - if (!regexp || regExpLeadsToEndlessLoop(regexp)) { - console.warn(`[getWordRangeAtPosition]: ignoring custom regexp '${regexp.source}' because it matches the empty string.`); + + if (!regexp) { + // use default when custom-regexp isn't provided + regexp = getWordDefinitionFor(this._languageId); + + } else if (regExpLeadsToEndlessLoop(regexp)) { + // use default when custom-regexp is bad regexp = getWordDefinitionFor(this._languageId); + console.warn(`[getWordRangeAtPosition]: ignoring custom regexp '${regexp.source}' because it matches the empty string.`); } + let wordAtText = getWordAtText( position.character + 1, ensureValidWordDefinition(regexp), From 7e68adad6427a6e9745a9e43af5bf17a3f3b0a7b Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 May 2017 11:07:17 +0200 Subject: [PATCH 1196/2747] simplify tests, fix tests, promise ftw --- .../vscode-api-tests/src/languages.test.ts | 33 +++++++------------ .../workbench/api/node/extHostDocumentData.ts | 2 +- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/extensions/vscode-api-tests/src/languages.test.ts b/extensions/vscode-api-tests/src/languages.test.ts index d4a0c80130ef1..321b1b772f234 100644 --- a/extensions/vscode-api-tests/src/languages.test.ts +++ b/extensions/vscode-api-tests/src/languages.test.ts @@ -14,7 +14,7 @@ import { suite('languages namespace tests', () => { - test('diagnostics & CodeActionProvider', function (done) { + test('diagnostics & CodeActionProvider', function () { class D2 extends Diagnostic { customProp = { complex() { } }; @@ -54,20 +54,15 @@ suite('languages namespace tests', () => { let r4 = languages.createDiagnosticCollection(); r4.set(uri, [diag2]); - workspace.openTextDocument(uri).then(doc => { + return workspace.openTextDocument(uri).then(doc => { return commands.executeCommand('vscode.executeCodeActionProvider', uri, new Range(0, 0, 0, 10)); }).then(commands => { - try { - assert.ok(ran); - Disposable.from(r1, r2, r3, r4).dispose(); - done(); - } catch (e) { - done(e); - } - }, done); + assert.ok(ran); + Disposable.from(r1, r2, r3, r4).dispose(); + }); }); - test('completions with document filters', function (done) { + test('completions with document filters', function () { let ran = false; let uri = Uri.file(join(workspace.rootPath || '', './bower.json')); @@ -82,17 +77,13 @@ suite('languages namespace tests', () => { } }); - workspace.openTextDocument(uri).then(doc => { + return workspace.openTextDocument(uri).then(doc => { return commands.executeCommand('vscode.executeCompletionItemProvider', uri, new Position(1, 0)); }).then((result: CompletionList) => { - try { - assert.equal(result.items[0].label, 'foo'); - assert.ok(ran); - Disposable.from(r1).dispose(); - done(); - } catch (e) { - done(e); - } - }, done); + r1.dispose(); + assert.ok(ran); + console.log(result.items); + assert.equal(result.items[0].label, 'foo'); + }); }); }); diff --git a/src/vs/workbench/api/node/extHostDocumentData.ts b/src/vs/workbench/api/node/extHostDocumentData.ts index be60815d55386..edb38779935cd 100644 --- a/src/vs/workbench/api/node/extHostDocumentData.ts +++ b/src/vs/workbench/api/node/extHostDocumentData.ts @@ -249,8 +249,8 @@ export class ExtHostDocumentData extends MirrorModel { } else if (regExpLeadsToEndlessLoop(regexp)) { // use default when custom-regexp is bad - regexp = getWordDefinitionFor(this._languageId); console.warn(`[getWordRangeAtPosition]: ignoring custom regexp '${regexp.source}' because it matches the empty string.`); + regexp = getWordDefinitionFor(this._languageId); } let wordAtText = getWordAtText( From d3ba078be9c1afa09be4d73201da3534d37f1762 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Fri, 26 May 2017 11:18:40 +0200 Subject: [PATCH 1197/2747] Code sanity. --- test/smoke/src/main.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/smoke/src/main.js b/test/smoke/src/main.js index a6acc9a7d8956..85e3778d1a7e0 100644 --- a/test/smoke/src/main.js +++ b/test/smoke/src/main.js @@ -10,7 +10,7 @@ var git = require('simple-git')(); var child_process = require('child_process'); var path = require('path'); -var tempFolder = `test_data`; +var tempFolder = 'test_data'; var testRepoUrl = 'https://github.com/Microsoft/vscode-smoketest-express'; var testRepoLocalDir = path.join(process.cwd(), `${tempFolder}/vscode-smoketest-express`); var keybindingsUrl = 'https://raw.githubusercontent.com/Microsoft/vscode-docs/master/scripts/keybindings'; @@ -41,10 +41,10 @@ if (!binaryExists(program.latest) || (program.stable && !binaryExists(program.st } // Setting up environment variables -process.env['VSCODE_LATEST_PATH'] = program.latest; -if (program.stable) process.env['VSCODE_STABLE_PATH'] = program.stable; -process.env['SMOKETEST_REPO'] = testRepoLocalDir; -if (program.stable && program.stable.toLowerCase().startsWith('insiders')) process.env['VSCODE_EDITION'] = 'insiders'; +process.env.VSCODE_LATEST_PATH = program.latest; +if (program.stable) process.env.VSCODE_STABLE_PATH = program.stable; +process.env.SMOKETEST_REPO = testRepoLocalDir; +if (program.stable && program.stable.toLowerCase().startsWith('insiders')) process.env.VSCODE_EDITION = 'insiders'; // Setting up 'vscode-smoketest-express' project var os = process.platform; @@ -112,7 +112,7 @@ function cleanOrClone(repo, dir) { function execute(cmd, dir) { return new Promise((res, rej) => { console.log(`Running ${cmd}...`); - var output = child_process.exec(cmd, { cwd: dir, stdio: [0, 1, 2] }, (error, stdout, stderr) => { + child_process.exec(cmd, { cwd: dir, stdio: [0, 1, 2] }, (error, stdout, stderr) => { if (error) rej(error); if (stderr) console.error(stderr); console.log(stdout); From b2b81e4f3eb16074407f86340554d58e71a3f1b6 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 May 2017 11:31:28 +0200 Subject: [PATCH 1198/2747] fix #27231 --- .../api/electron-browser/mainThreadDocuments.ts | 6 +++--- src/vs/workbench/api/node/extHost.protocol.ts | 3 +-- src/vs/workbench/api/node/extHostDocuments.ts | 17 ++++++++--------- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts b/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts index 120beef086f76..13e61675fa4c3 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts @@ -123,12 +123,12 @@ export class MainThreadDocuments extends MainThreadDocumentsShape { })); this._toDispose.push(textFileService.models.onModelReverted(e => { if (this._shouldHandleFileEvent(e)) { - this._proxy.$acceptModelReverted(e.resource.toString()); + this._proxy.$acceptDirtyStateChanged(e.resource.toString(), false); } })); this._toDispose.push(textFileService.models.onModelDirty(e => { if (this._shouldHandleFileEvent(e)) { - this._proxy.$acceptModelDirty(e.resource.toString()); + this._proxy.$acceptDirtyStateChanged(e.resource.toString(), true); } })); @@ -240,7 +240,7 @@ export class MainThreadDocuments extends MainThreadDocumentsShape { if (!this._modelIsSynced[input.getResource().toString()]) { throw new Error(`expected URI ${input.getResource().toString()} to have come to LIFE`); } - return this._proxy.$acceptModelDirty(input.getResource().toString()); // mark as dirty + return this._proxy.$acceptDirtyStateChanged(input.getResource().toString(), true); // mark as dirty }).then(() => { return input.getResource(); }); diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index f9c02d01d8c10..b168ae2ddac53 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -371,8 +371,7 @@ export abstract class ExtHostDocumentsShape { $provideTextDocumentContent(handle: number, uri: URI): TPromise { throw ni(); } $acceptModelModeChanged(strURL: string, oldModeId: string, newModeId: string): void { throw ni(); } $acceptModelSaved(strURL: string): void { throw ni(); } - $acceptModelDirty(strURL: string): void { throw ni(); } - $acceptModelReverted(strURL: string): void { throw ni(); } + $acceptDirtyStateChanged(strURL: string, isDirty: boolean): void { throw ni(); } $acceptModelChanged(strURL: string, e: IModelChangedEvent, isDirty: boolean): void { throw ni(); } } diff --git a/src/vs/workbench/api/node/extHostDocuments.ts b/src/vs/workbench/api/node/extHostDocuments.ts index 918efad51f393..eacff1334c5cf 100644 --- a/src/vs/workbench/api/node/extHostDocuments.ts +++ b/src/vs/workbench/api/node/extHostDocuments.ts @@ -171,18 +171,17 @@ export class ExtHostDocuments extends ExtHostDocumentsShape { public $acceptModelSaved(strURL: string): void { let data = this._documentsAndEditors.getDocument(strURL); - data._acceptIsDirty(false); + this.$acceptDirtyStateChanged(strURL, false); this._onDidSaveDocument.fire(data.document); } - public $acceptModelDirty(strURL: string): void { - let document = this._documentsAndEditors.getDocument(strURL); - document._acceptIsDirty(true); - } - - public $acceptModelReverted(strURL: string): void { - let document = this._documentsAndEditors.getDocument(strURL); - document._acceptIsDirty(false); + public $acceptDirtyStateChanged(strURL: string, isDirty: boolean): void { + let data = this._documentsAndEditors.getDocument(strURL); + data._acceptIsDirty(isDirty); + this._onDidChangeDocument.fire({ + document: data.document, + contentChanges: [] + }); } public $acceptModelChanged(strURL: string, events: IModelChangedEvent, isDirty: boolean): void { From 3022b4cde49d380f1f4d609b567b152fdf7c80f0 Mon Sep 17 00:00:00 2001 From: YukiUeda Date: Fri, 26 May 2017 19:18:05 +0900 Subject: [PATCH 1199/2747] support %%(fix #26825) --- extensions/bat/syntaxes/Batch File.tmLanguage | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/extensions/bat/syntaxes/Batch File.tmLanguage b/extensions/bat/syntaxes/Batch File.tmLanguage index 499096364044b..7f0a1061423e0 100644 --- a/extensions/bat/syntaxes/Batch File.tmLanguage +++ b/extensions/bat/syntaxes/Batch File.tmLanguage @@ -74,13 +74,18 @@ 1 name - variable.parameter.loop.begin.shell + variable.other.parsetime.begin.shell + + 2 + + name + variable.other.parsetime.end.shell name - variable.parameter.loop.dosbatch + variable.other.parsetime.dosbatch match - (?i)(%%)(~(?:f|d|p|n|x|s|a|t|z|\$[^:]*:)*)?[a-z] + (%)[^%]+(%)|(%%)[^%]+(%%) captures @@ -88,18 +93,13 @@ 1 name - variable.other.parsetime.begin.shell - - 2 - - name - variable.other.parsetime.end.shell + variable.parameter.loop.begin.shell name - variable.other.parsetime.dosbatch + variable.parameter.loop.dosbatch match - (%)[^%]+(%) + (?i)(%%)(~(?:f|d|p|n|x|s|a|t|z|\$[^:]*:)*)?[a-z] captures From e81c07d7c23145ea726a4534b46fed0539b9b7df Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 May 2017 12:28:31 +0200 Subject: [PATCH 1200/2747] snippets - fix leaking listeners that break subsequent snippet insertion --- .../contrib/snippet/browser/snippetController2.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 3983e58599e0f..7394641578536 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -62,12 +62,16 @@ export class SnippetController2 { if (!this._snippet) { // create a new session this._snippet = new SnippetSession(this._editor); + this._snippet.insert(template, overwriteBefore, overwriteAfter); + this._snippetListener = [ + this._editor.onDidChangeModel(() => this.cancel()), + this._editor.onDidChangeCursorSelection(() => this._updateState()) + ]; + } else { + // only insert the snippet when a session + // is already active + this._snippet.insert(template, overwriteBefore, overwriteAfter); } - this._snippet.insert(template, overwriteBefore, overwriteAfter); - this._snippetListener = [ - this._editor.onDidChangeModel(() => this.cancel()), - this._editor.onDidChangeCursorSelection(() => this._updateState()) - ]; if (undoStopAfter) { this._editor.getModel().pushStackElement(); } From 8973edf9cc024896eceda82630ce3660083285bc Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 22 May 2017 13:56:23 +0200 Subject: [PATCH 1201/2747] Added smoke test source code. --- smoketest/.gitignore | 7 + smoketest/.vscode/launch.json | 26 + smoketest/.vscode/tasks.json | 10 + smoketest/CONTRIBUTING.md | 12 + smoketest/README.md | 10 + smoketest/package.json | 19 + smoketest/scripts/run.ps1 | 43 ++ smoketest/scripts/run.sh | 43 ++ smoketest/src/areas/common.ts | 163 +++++ smoketest/src/areas/configuration-views.ts | 62 ++ smoketest/src/areas/css.ts | 62 ++ smoketest/src/areas/data-loss.ts | 26 + smoketest/src/areas/extensions.ts | 49 ++ smoketest/src/areas/first-experience.ts | 21 + smoketest/src/areas/git.ts | 69 ++ smoketest/src/areas/integrated-terminal.ts | 38 + smoketest/src/areas/javascript-debug.ts | 42 ++ smoketest/src/areas/javascript.ts | 73 ++ smoketest/src/areas/localization.ts | 55 ++ smoketest/src/areas/search.ts | 50 ++ smoketest/src/areas/statusbar.ts | 99 +++ smoketest/src/areas/tasks.ts | 50 ++ smoketest/src/helpers/screenshot.ts | 48 ++ smoketest/src/helpers/utilities.ts | 37 + smoketest/src/main.ts | 771 +++++++++++++++++++++ smoketest/src/spectron/application.ts | 156 +++++ smoketest/src/spectron/client.ts | 127 ++++ smoketest/tsconfig.json | 21 + vscode-smoketest-express | 1 + 29 files changed, 2190 insertions(+) create mode 100644 smoketest/.gitignore create mode 100644 smoketest/.vscode/launch.json create mode 100644 smoketest/.vscode/tasks.json create mode 100644 smoketest/CONTRIBUTING.md create mode 100644 smoketest/README.md create mode 100644 smoketest/package.json create mode 100644 smoketest/scripts/run.ps1 create mode 100644 smoketest/scripts/run.sh create mode 100644 smoketest/src/areas/common.ts create mode 100644 smoketest/src/areas/configuration-views.ts create mode 100644 smoketest/src/areas/css.ts create mode 100644 smoketest/src/areas/data-loss.ts create mode 100644 smoketest/src/areas/extensions.ts create mode 100644 smoketest/src/areas/first-experience.ts create mode 100644 smoketest/src/areas/git.ts create mode 100644 smoketest/src/areas/integrated-terminal.ts create mode 100644 smoketest/src/areas/javascript-debug.ts create mode 100644 smoketest/src/areas/javascript.ts create mode 100644 smoketest/src/areas/localization.ts create mode 100644 smoketest/src/areas/search.ts create mode 100644 smoketest/src/areas/statusbar.ts create mode 100644 smoketest/src/areas/tasks.ts create mode 100644 smoketest/src/helpers/screenshot.ts create mode 100644 smoketest/src/helpers/utilities.ts create mode 100644 smoketest/src/main.ts create mode 100644 smoketest/src/spectron/application.ts create mode 100644 smoketest/src/spectron/client.ts create mode 100644 smoketest/tsconfig.json create mode 160000 vscode-smoketest-express diff --git a/smoketest/.gitignore b/smoketest/.gitignore new file mode 100644 index 0000000000000..532798d3ea949 --- /dev/null +++ b/smoketest/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +npm-debug.log +Thumbs.db +node_modules/ +out/ +keybindings.*.json +test_data/ \ No newline at end of file diff --git a/smoketest/.vscode/launch.json b/smoketest/.vscode/launch.json new file mode 100644 index 0000000000000..2de33bbb20ba1 --- /dev/null +++ b/smoketest/.vscode/launch.json @@ -0,0 +1,26 @@ +{ + // Use IntelliSense to learn about possible Node.js debug attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Mocha Tests", + "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", + "args": [ + "-u", + "tdd", + "--timeout", + "999999", + "--colors", + "${workspaceRoot}/out/main.js" + ], + "outFiles": [ "${workspaceRoot}/out/**/*.js" ], + "internalConsoleOptions": "openOnSessionStart", + "sourceMaps": true, + "cwd": "${workspaceRoot}" + } + ] +} \ No newline at end of file diff --git a/smoketest/.vscode/tasks.json b/smoketest/.vscode/tasks.json new file mode 100644 index 0000000000000..926b1ddcd18fb --- /dev/null +++ b/smoketest/.vscode/tasks.json @@ -0,0 +1,10 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "0.1.0", + "command": "tsc", + "isShellCommand": true, + "args": ["-p", "."], + "showOutput": "silent", + "problemMatcher": "$tsc" +} \ No newline at end of file diff --git a/smoketest/CONTRIBUTING.md b/smoketest/CONTRIBUTING.md new file mode 100644 index 0000000000000..c15016dc1ad68 --- /dev/null +++ b/smoketest/CONTRIBUTING.md @@ -0,0 +1,12 @@ +# Architecture +* `main.ts` contains the main smoke test suite. It includes all tests separated into mocha `describe()` groups that represent each of the areas of [Smoke Test document](https://github.com/Microsoft/vscode/wiki/Smoke-Test). + +* `./areas/` folder contains a `.ts` file per each area of the document. E.g. `'Search'` area goes under `'search.ts'`. Every area file contains a list of methods with the name that represents the action that can be performed in the corresponding test. This reduces the amount of test suite code and means that if the UI changes, the fix need only be applied in one place. The name of the method reflects the action the tester would do if he would perform the test manually. See [Selenium Page Objects Wiki](https://github.com/SeleniumHQ/selenium/wiki/PageObjects) and [Selenium Bot Style Tests Wiki](https://github.com/SeleniumHQ/selenium/wiki/Bot-Style-Tests) for a good explanation of the implementation. Every smoke test area contains methods that are used in a bot-style approach in `main.ts`. +* `./spectron/` wraps the Spectron, with WebDriverIO API wrapped in `client.ts` and instance of Spectron Application is wrapped in `application.ts`. +* `./scripts/` contains scripts to run the smoke test. + +# Adding new area +To contribute a new smoke test area, add `${area}.ts` file under `./areas`. This has to follow the bot-style approach described in the links mentioned above. Methods should be calling WebDriverIO API through `SpectronClient` class. If there is no existing WebDriverIO method, add it to the class. + +# Adding new test +To add new test area or test, `main.ts` should be updated. The same instruction-style principle needs to be followed with the called area method names that reflect manual tester's actions. \ No newline at end of file diff --git a/smoketest/README.md b/smoketest/README.md new file mode 100644 index 0000000000000..318ddb0751725 --- /dev/null +++ b/smoketest/README.md @@ -0,0 +1,10 @@ +# VS Code Smoke Testing +This repository contains the smoke test automation code with Spectron for Visual Studio Code. + +The following command is used to run the tests: `.\scripts\run.ps1 -latest "path\to\Code.exe"` on Windows (from PowerShell) and `./scripts/run.sh path/to/binary` on Unix system. + +If you want to include 'Data Migration' area tests use `.\scripts\run.ps1 -latest "path\to\Code.exe" -stable "path\to\CurrentStable.exe"` and `./scripts/run.sh path/to/binary path/to/currentStable` respectively. + +# Contributing + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/smoketest/package.json b/smoketest/package.json new file mode 100644 index 0000000000000..a5c3a78273bf3 --- /dev/null +++ b/smoketest/package.json @@ -0,0 +1,19 @@ +{ + "name": "code-oss-dev-smoke-test", + "version": "0.1.0", + "main": "./out/main.js", + "scripts": { + "test": "mocha -u tdd --timeout 360000 --retries 2 --slow 50000 --colors ./out/main.js 2> test_data/errors.log" + }, + "devDependencies": { + "@types/mocha": "^2.2.41", + "@types/node": "^6.0.70", + "@types/webdriverio": "^4.6.1", + "@types/electron": "^1.4.37", + "@types/rimraf": "^0.0.28", + "mocha": "^3.2.0", + "spectron": "^3.6.4", + "typescript": "^2.2.2", + "rimraf": "^2.6.1" + } +} diff --git a/smoketest/scripts/run.ps1 b/smoketest/scripts/run.ps1 new file mode 100644 index 0000000000000..d6368da689082 --- /dev/null +++ b/smoketest/scripts/run.ps1 @@ -0,0 +1,43 @@ +Param( + [Parameter(Position=0,mandatory=$true)] + [string] $latest, + [Parameter(Position=1,mandatory=$false)] + [string] $stable +) + +# Setup sample repository for the smoke test +Set-Location .. +if (-Not (Test-Path vscode-smoketest-express)) { + git clone https://github.com/Microsoft/vscode-smoketest-express.git + Set-Location ./vscode-smoketest-express +} else { + Set-Location ./vscode-smoketest-express + git fetch origin master + git reset --hard FETCH_HEAD + git clean -fd +} +npm install + +# Setup the test directory for running +Set-Location ..\smoketest +if (-Not (Test-Path node_modules)) { + npm install +} + +# Configure environment variables +$env:VSCODE_LATEST_PATH = $latest +$env:VSCODE_STABLE_PATH = $stable +$env:SMOKETEST_REPO = "..\vscode-smoketest-express" + +if ($latest.Contains('Insiders')) { + $env:VSCODE_EDITION = 'insiders' +} + +# Retrieve key bindings config file for Windows +$testDirectory = (Resolve-Path .\).Path +$client = New-Object System.Net.WebClient +$client.DownloadFile("https://raw.githubusercontent.com/Microsoft/vscode-docs/master/scripts/keybindings/doc.keybindings.win.json","$testDirectory\test_data\keybindings.win32.json") + +# Compile and launch the smoke test +tsc +npm test \ No newline at end of file diff --git a/smoketest/scripts/run.sh b/smoketest/scripts/run.sh new file mode 100644 index 0000000000000..fc103a5553954 --- /dev/null +++ b/smoketest/scripts/run.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +if [[ "$#" -ne 1 ]]; then + echo "Usage: ./scripts/run.sh path/to/binary" + echo "To perform data migration tests, use: ./scripts/run.sh path/to/latest_binary path/to/stable_binary" + exit 1 +fi + +# Cloning sample repository for the smoke test +cd .. +if ! [ -d vscode-smoketest-express ]; then + git clone https://github.com/Microsoft/vscode-smoketest-express.git + cd vscode-smoketest-express +else + cd vscode-smoketest-express + git fetch origin master + git reset --hard FETCH_HEAD + git clean -fd +fi +npm install + +# Install Node modules for Spectron +cd ../vscode-smoketest +test -d node_modules || npm install + +# Configuration +export VSCODE_LATEST_PATH="$1" +export VSCODE_STABLE_PATH="$2" +export SMOKETEST_REPO="../vscode-smoketest-express" +mkdir -p test_data + +if [[ $1 == *"Insiders"* || $1 == *"insiders"* ]]; then + export VSCODE_EDITION="insiders" +fi + +if [[ "$OSTYPE" == "darwin"* ]]; then + curl "https://raw.githubusercontent.com/Microsoft/vscode-docs/master/scripts/keybindings/doc.keybindings.osx.json" -o "test_data/keybindings.darwin.json" # Download OS X keybindings +else + wget https://raw.githubusercontent.com/Microsoft/vscode-docs/master/scripts/keybindings/doc.keybindings.linux.json -O test_data/keybindings.linux.json # Download Linux keybindings +fi + +# Compile and launch the smoke test +tsc +exec npm test diff --git a/smoketest/src/areas/common.ts b/smoketest/src/areas/common.ts new file mode 100644 index 0000000000000..c955c206eea22 --- /dev/null +++ b/smoketest/src/areas/common.ts @@ -0,0 +1,163 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from "../spectron/application"; +import { Util } from '../helpers/utilities'; + +/** + * Contains methods that are commonly used across test areas. + */ +export class CommonActions { + private util: Util; + + constructor(private spectron: SpectronApplication) { + this.util = new Util(); + } + + public async getWindowTitle(): Promise { + return this.spectron.client.getTitle(); + } + + public enter(): Promise { + return this.spectron.client.keys(['Enter', 'NULL']); + } + + public async addSetting(setting: string, value: string): Promise { + await this.spectron.command('workbench.action.openGlobalSettings'); + await this.spectron.wait(); + await this.spectron.client.leftClick('.editable-preferences-editor-container .view-lines', 1, 1, false); + await this.spectron.client.keys(['ArrowDown', 'NULL', 'ArrowDown', 'NULL'], false); + await this.spectron.wait(); + await this.spectron.client.keys(`"${setting}": "${value}"`); + await this.spectron.wait(); + return this.saveOpenedFile(); + } + + public async newUntitledFile(): Promise { + await this.spectron.command('workbench.action.files.newUntitledFile'); + return this.spectron.wait(); + } + + public closeTab(): Promise { + return this.spectron.client.keys(['Control', 'w', 'NULL']); + } + + public async getTab(tabName: string, active?: boolean): Promise { + let tabSelector = active ? '.tab.active' : 'div'; + let el = await this.spectron.client.element(`.tabs-container ${tabSelector}[aria-label="${tabName}, tab"]`); + if (el.status === 0) { + return el; + } + + return undefined; + } + + public selectTab(tabName: string): Promise { + return this.spectron.client.click(`.tabs-container div[aria-label="${tabName}, tab"]`); + } + + public async openFirstMatchFile(fileName: string): Promise { + await this.openQuickOpen(); + await this.type(fileName); + await this.spectron.wait(); + await this.enter(); + return this.spectron.wait(); + } + + public saveOpenedFile(): Promise { + return this.spectron.command('workbench.action.files.save'); + } + + public type(text: string): Promise { + let spectron = this.spectron; + + return new Promise(function (res) { + let textSplit = text.split(' '); + + async function type(i: number) { + if (!textSplit[i] || textSplit[i].length <= 0) { + return res(); + } + + const toType = textSplit[i + 1] ? `${textSplit[i]} ` : textSplit[i]; + await spectron.client.keys(toType, false); + await spectron.client.keys(['NULL']); + await type(i + 1); + } + + return type(0); + }); + } + + public showCommands(): Promise { + return this.spectron.command('workbench.action.showCommands'); + } + + public openQuickOpen(): Promise { + return this.spectron.command('workbench.action.quickOpen'); + } + + public closeQuickOpen(): Promise { + return this.spectron.command('workbench.action.closeQuickOpen'); + } + + public selectNextQuickOpenElement(): Promise { + return this.spectron.client.keys(['ArrowDown', 'NULL']); + } + + public async getQuickOpenElements(): Promise { + const elements = await this.spectron.waitFor(this.spectron.client.elements, 'div[aria-label="Quick Picker"] .monaco-tree-rows.show-twisties .monaco-tree-row'); + return elements.value.length; + } + + public async openFile(fileName: string, explorer?: boolean): Promise { + let selector = `div[class="monaco-icon-label file-icon ${fileName}-name-file-icon ${this.getExtensionSelector(fileName)}`; + if (explorer) { + selector += ' explorer-item'; + } + selector += '"]'; + + await this.spectron.waitFor(this.spectron.client.doubleClick, selector); + return this.spectron.wait(); + } + + public getExtensionSelector(fileName: string): string { + const extension = fileName.split('.')[1]; + if (extension === 'js') { + return 'js-ext-file-icon javascript-lang-file-icon'; + } else if (extension === 'json') { + return 'json-ext-file-icon json-lang-file-icon'; + } else if (extension === 'md') { + return 'md-ext-file-icon markdown-lang-file-icon'; + } + + throw new Error('No class defined for this file extension'); + } + + public async getEditorFirstLinePlainText(): Promise { + try { + const span = await this.spectron.client.getText('.view-lines span span'); + if (Array.isArray(span)) { + return span[0]; + } + + return span; + } catch (e) { + return undefined; + } + } + + public removeFile(filePath: string): void { + this.util.removeFile(filePath); + } + + public removeDirectory(directory: string): Promise { + try { + return this.util.rimraf(directory); + } catch (e) { + throw new Error(`Failed to remove ${directory} with an error: ${e}`); + } + } +} \ No newline at end of file diff --git a/smoketest/src/areas/configuration-views.ts b/smoketest/src/areas/configuration-views.ts new file mode 100644 index 0000000000000..1291469c849cb --- /dev/null +++ b/smoketest/src/areas/configuration-views.ts @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; + +export enum ActivityBarPosition { + LEFT = 0, + RIGHT = 1 +}; + +export class ConfigurationView { + // Stores key binding defined for the toggle of activity bar position + private keybinding: string[]; + + constructor(private spectron: SpectronApplication) { + // noop + } + + public getEditorLineNumbers(): any { + return this.spectron.client.elements('.line-numbers'); + } + + public enterKeybindingsView(): any { + return this.spectron.command('workbench.action.openGlobalKeybindings'); + } + + public selectFirstKeybindingsMatch(): any { + return this.spectron.waitFor(this.spectron.client.click, 'div[aria-label="Keybindings"] .monaco-list-row.keybinding-item'); + } + + public changeKeybinding(): any { + return this.spectron.command('editor.action.defineKeybinding'); + } + + public enterBinding(keys: string[]): any { + this.keybinding = keys; + return this.spectron.client.keys(keys); + } + + public toggleActivityBarPosition(): any { + return this.spectron.client.keys(this.keybinding); + } + + public async getActivityBar(position: ActivityBarPosition) { + let positionClass: string; + + if (position === ActivityBarPosition.LEFT) { + positionClass = 'left'; + } else if (position === ActivityBarPosition.RIGHT) { + positionClass = 'right'; + } else { + throw new Error('No such position for activity bar defined.'); + } + try { + return await this.spectron.waitFor(this.spectron.client.getHTML, `.part.activitybar.${positionClass}`); + } catch (e) { + return undefined; + }; + } +} \ No newline at end of file diff --git a/smoketest/src/areas/css.ts b/smoketest/src/areas/css.ts new file mode 100644 index 0000000000000..3388ab4e465ff --- /dev/null +++ b/smoketest/src/areas/css.ts @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; + +export enum CSSProblem { + WARNING = 0, + ERROR = 1 +}; + +export class CSS { + + constructor(private spectron: SpectronApplication) { + // noop + } + + public openQuickOutline(): any { + return this.spectron.command('workbench.action.gotoSymbol'); + } + + public toggleProblemsView(): any { + return this.spectron.command('workbench.actions.view.problems'); + } + + public async getEditorProblem(problemType: CSSProblem): Promise { + let selector; + if (problemType === CSSProblem.WARNING) { + selector = 'greensquiggly'; + } else if (problemType === CSSProblem.ERROR) { + selector = 'redsquiggly'; + } else { + throw new Error('No such problem type defined.'); + } + + let el = await this.spectron.client.element(`.view-overlays .cdr.${selector}`); + if (el.status === 0) { + return el; + } + + return undefined; + } + + public async getProblemsViewsProblem(problemType: CSSProblem): Promise { + let selector; + if (problemType === CSSProblem.WARNING) { + selector = 'warning'; + } else if (problemType === CSSProblem.ERROR) { + selector = 'error'; + } else { + throw new Error('No such problem type defined.'); + } + + let el = await this.spectron.client.element(`div[aria-label="Problems grouped by files"] .icon.${selector}`); + if (el.status === 0) { + return el; + } + + return undefined; + } +} \ No newline at end of file diff --git a/smoketest/src/areas/data-loss.ts b/smoketest/src/areas/data-loss.ts new file mode 100644 index 0000000000000..dc1ecf93730e4 --- /dev/null +++ b/smoketest/src/areas/data-loss.ts @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from "../spectron/application"; + +export class DataLoss { + + constructor(private spectron: SpectronApplication) { + } + + public openExplorerViewlet(): Promise { + return this.spectron.command('workbench.view.explorer'); + } + + public async verifyTabIsDirty(tabName: string, active?: boolean): Promise { + let activeSelector = active ? '.active' : ''; + let el = await this.spectron.client.element(`.tabs-container .tab.dirty${activeSelector}[aria-label="${tabName}, tab"]`); + if (el.status === 0) { + return el; + } + + return undefined; + } +} \ No newline at end of file diff --git a/smoketest/src/areas/extensions.ts b/smoketest/src/areas/extensions.ts new file mode 100644 index 0000000000000..4edec9d06ef87 --- /dev/null +++ b/smoketest/src/areas/extensions.ts @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; +import { CommonActions } from "./common"; + +export class Extensions { + + private readonly extensionsViewletSelector = 'div[id="workbench.view.extensions"]'; + + constructor(private spectron: SpectronApplication, private common: CommonActions) { + } + + public async openExtensionsViewlet(): Promise { + await this.spectron.command('workbench.view.extensions'); + return this.spectron.wait(); + } + + public async searchForExtension(name: string): Promise { + const searchBoxSelector = `${this.extensionsViewletSelector} .search-box`; + + await this.spectron.client.clearElement(searchBoxSelector); + await this.spectron.client.click(searchBoxSelector, false); + await this.spectron.client.keys(name); + return this.spectron.client.keys(['NULL', 'Enter', 'NULL']); + } + + public installFirstResult(): Promise { + return this.spectron.client.click(`${this.extensionsViewletSelector} .monaco-list-rows>:nth-child(1) .extension .extension-action.install`); + } + + public getFirstReloadText(): Promise { + return this.spectron.waitFor(this.spectron.client.getText, `${this.extensionsViewletSelector} .monaco-list-rows>:nth-child(1) .extension .extension-action.reload`); + } + + public async selectMinimalIconsTheme(): Promise { + await this.common.showCommands(); + await this.common.type('File Icon Theme'); + await this.spectron.wait(); + await this.common.enter(); + return this.spectron.client.keys(['ArrowDown', 'NULL', 'Enter', 'NULL']); + } + + public async verifyFolderIconAppearance(): Promise { + return this.spectron.waitFor(this.spectron.client.getHTML, 'style[class="contributedIconTheme"]'); + } +} \ No newline at end of file diff --git a/smoketest/src/areas/first-experience.ts b/smoketest/src/areas/first-experience.ts new file mode 100644 index 0000000000000..e9141bda899aa --- /dev/null +++ b/smoketest/src/areas/first-experience.ts @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from "../spectron/application"; + +export class FirstExperience { + constructor(private spectron: SpectronApplication) { + // noop + } + + public async getWelcomeTab(): Promise { + let el = await this.spectron.client.element('.vs_code_welcome_page-name-file-icon'); + if (el.status === 0) { + return el; + } + + return undefined; + } +} \ No newline at end of file diff --git a/smoketest/src/areas/git.ts b/smoketest/src/areas/git.ts new file mode 100644 index 0000000000000..8228771a7d7fc --- /dev/null +++ b/smoketest/src/areas/git.ts @@ -0,0 +1,69 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; +import { CommonActions } from "./common"; + +export class Git { + private readonly bodyVarSelector = '.view-lines>:nth-child(6) .mtk11'; + + constructor(private spectron: SpectronApplication, private commonActions: CommonActions) { + // noop + } + + public openGitViewlet(): Promise { + return this.spectron.command('workbench.view.git'); + } + + public getScmIconChanges(): Promise { + return this.spectron.waitFor(this.spectron.client.getText, 'div[id="workbench.parts.activitybar"] .badge.scm-viewlet-label .badge-content'); + } + + public async verifyScmChange(fileName: string): Promise { + let el = await this.spectron.client.element(`div[class="monaco-icon-label file-icon ${fileName}-name-file-icon ${this.commonActions.getExtensionSelector(fileName)}"]`); + if (el.status === 0) { + return el; + } + + return undefined; + } + + public getOriginalAppJsBodyVarName(): Promise { + return this.spectron.waitFor(this.spectron.client.getText, `.editor.original ${this.bodyVarSelector}`); + } + + public getModifiedAppJsBodyVarName(): Promise { + return this.spectron.waitFor(this.spectron.client.getText, `.editor.modified ${this.bodyVarSelector}`); + } + + public async stageFile(fileName: string): Promise { + await this.spectron.client.moveToObject(`div[class="monaco-icon-label file-icon ${fileName}-name-file-icon ${this.commonActions.getExtensionSelector(fileName)}"`); + await this.spectron.client.click('.action-label.icon.contrib-cmd-icon-4'); + return this.spectron.wait(); + } + + public async unstageFile(fileName: string): Promise { + await this.spectron.client.moveToObject(`div[class="monaco-icon-label file-icon ${fileName}-name-file-icon ${this.commonActions.getExtensionSelector(fileName)}"`); + await this.spectron.client.click('.action-label.icon.contrib-cmd-icon-6'); + return this.spectron.wait(); + } + + public getStagedCount(): Promise { + return this.spectron.waitFor(this.spectron.client.getText, '.scm-status.show-file-icons .monaco-list-rows>:nth-child(1) .monaco-count-badge'); + } + + public focusOnCommitBox(): Promise { + return this.spectron.client.click('div[id="workbench.view.scm"] textarea'); + } + + public async pressCommit(): Promise { + await this.spectron.client.click('.action-label.icon.contrib-cmd-icon-10'); + return this.spectron.wait(); + } + + public getOutgoingChanges(): Promise { + return this.spectron.client.getText('a[title="Synchronize changes"]'); + } +} \ No newline at end of file diff --git a/smoketest/src/areas/integrated-terminal.ts b/smoketest/src/areas/integrated-terminal.ts new file mode 100644 index 0000000000000..b066db8adf718 --- /dev/null +++ b/smoketest/src/areas/integrated-terminal.ts @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; +import { CommonActions } from "./common"; + +export class IntegratedTerminal { + + constructor(private spectron: SpectronApplication) { + // noop + } + + public async openTerminal(commonActions: CommonActions): Promise { + // Backquote dispatching does not work in OS X + if (process.platform === 'darwin') { + await commonActions.showCommands(); + await commonActions.type('Toggle Integrated Terminal'); + return commonActions.enter(); + } + + return this.spectron.command('workbench.action.terminal.toggleTerminal'); + } + + public async getCommandOutput(command: string): Promise { + const selector = 'div[id="workbench.panel.terminal"] .xterm-rows'; + let readRow = process.platform === 'win32' ? 5 : 2; + let output: string = await this.spectron.client.getText(`${selector}>:nth-child(${readRow})`); + + // If ended up on the wrong line, it could be terminal's restored session (e.g. on OS X) + if (output.trim().endsWith(command)) { + output = await this.spectron.client.getText(`${selector}>:nth-child(${readRow+1})`); // try next line + } + + return output.trim(); // remove many   tags + } +} \ No newline at end of file diff --git a/smoketest/src/areas/javascript-debug.ts b/smoketest/src/areas/javascript-debug.ts new file mode 100644 index 0000000000000..948594945d7a4 --- /dev/null +++ b/smoketest/src/areas/javascript-debug.ts @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; + +export class JavaScriptDebug { + private readonly sidebarSelector = '.margin-view-overlays'; + + constructor(private spectron: SpectronApplication) { + // noop + } + + public openDebugViewlet(): Promise { + return this.spectron.command('workbench.view.debug'); + } + + public async pressConfigureLaunchJson(): Promise { + await this.spectron.waitFor(this.spectron.client.click, 'ul[aria-label="Debug actions"] .action-label.icon.debug-action.configure'); + await this.spectron.wait(); + await this.spectron.client.keys(['ArrowDown', 'NULL', 'Enter']); + return this.spectron.wait(); + } + + public getProgramConfigValue(): Promise { + return this.spectron.client.getText('.view-lines>:nth-child(11) .mtk7'); + } + + public setBreakpointOnLine(lineNumber: number): Promise { + return this.spectron.client.leftClick(`${this.sidebarSelector}>:nth-child(${lineNumber})`, 5, 5); + } + + public async verifyBreakpointOnLine(lineNumber: number): Promise { + let el = await this.spectron.client.element(`${this.sidebarSelector}>:nth-child(${lineNumber}) .cgmr.debug-breakpoint-glyph`); + if (el.status === 0) { + return el; + } + + return undefined; + } +} \ No newline at end of file diff --git a/smoketest/src/areas/javascript.ts b/smoketest/src/areas/javascript.ts new file mode 100644 index 0000000000000..a2f2644c86fd2 --- /dev/null +++ b/smoketest/src/areas/javascript.ts @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; + +export class JavaScript { + private readonly appVarSelector = '.view-lines>:nth-child(7) .mtk11'; + private readonly firstCommentSelector = '.margin-view-overlays>:nth-child(3)'; + private readonly expressVarSelector = '.view-lines>:nth-child(11) .mtk10'; + + constructor(private spectron: SpectronApplication) { + // noop + } + + public openQuickOutline(): Promise { + return this.spectron.command('workbench.action.gotoSymbol'); + } + + public async findAppReferences(): Promise { + await this.spectron.client.click(this.appVarSelector, false); + return this.spectron.command('editor.action.referenceSearch.trigger'); + } + + public async getTitleReferencesCount(): Promise { + const meta = await this.spectron.client.getText('.reference-zone-widget.results-loaded .peekview-title .meta'); + + return meta.match(/\d+/)[0]; + } + + public async getTreeReferencesCount(): Promise { + const treeElems = await this.spectron.client.elements('.reference-zone-widget.results-loaded .ref-tree.inline .show-twisties .monaco-tree-row'); + return treeElems.value.length; + } + + public async renameApp(newValue: string): Promise { + await this.spectron.client.click(this.appVarSelector); + await this.spectron.command('editor.action.rename'); + await this.spectron.wait(); + return this.spectron.client.keys(newValue, false); + } + + public async getNewAppName(): Promise { + return this.spectron.client.getText(this.appVarSelector); + } + + public async toggleFirstCommentFold(): Promise { + return this.spectron.client.click(`${this.firstCommentSelector} .cldr.folding`); + } + + public async getFirstCommentFoldedIcon(): Promise { + return this.spectron.client.getHTML(`${this.firstCommentSelector} .cldr.folding.collapsed`); + } + + public async getNextLineNumberAfterFold(): Promise { + return this.spectron.client.getText(`.margin-view-overlays>:nth-child(4) .line-numbers`) + } + + public async goToExpressDefinition(): Promise { + await this.spectron.client.click(this.expressVarSelector); + return this.spectron.command('editor.action.goToDeclaration'); + } + + public async peekExpressDefinition(): Promise { + await this.spectron.client.click(this.expressVarSelector); + return this.spectron.command('editor.action.previewDeclaration'); + } + + public async getPeekExpressResultName(): Promise { + return this.spectron.client.getText('.reference-zone-widget.results-loaded .filename'); + } +} \ No newline at end of file diff --git a/smoketest/src/areas/localization.ts b/smoketest/src/areas/localization.ts new file mode 100644 index 0000000000000..4ad30cdeb88e1 --- /dev/null +++ b/smoketest/src/areas/localization.ts @@ -0,0 +1,55 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; + +export enum ViewletType { + SEARCH = 0, + SCM = 1, + DEBUG = 2, + EXTENSIONS = 3 +} + +export class Localization { + + constructor(private spectron: SpectronApplication) { + // noop + } + + public async getOpenEditorsText(): Promise { + const explorerTitles = await this.spectron.client.getText('div[id="workbench.view.explorer"] .title span'); + return explorerTitles[0]; + } + + public openViewlet(type: ViewletType): Promise { + let command; + + switch (type) { + case ViewletType.SEARCH: + command = 'workbench.view.search'; + break; + case ViewletType.SCM: + command = 'workbench.view.scm'; + break; + case ViewletType.DEBUG: + command = 'workbench.view.debug'; + break; + case ViewletType.EXTENSIONS: + command = 'workbench.view.extensions'; + break; + } + + return this.spectron.command(command, false); + } + + public getOpenedViewletTitle(): Promise { + return this.spectron.client.getText('div[id="workbench.parts.sidebar"] .title-label span'); + } + + public getExtensionsSearchPlaceholder(): Promise { + return this.spectron.client.getAttribute('div[id="workbench.view.extensions"] .search-box', 'placeholder'); + } + +} \ No newline at end of file diff --git a/smoketest/src/areas/search.ts b/smoketest/src/areas/search.ts new file mode 100644 index 0000000000000..5477a5f25d916 --- /dev/null +++ b/smoketest/src/areas/search.ts @@ -0,0 +1,50 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; + +export class Search { + + constructor(private spectron: SpectronApplication) { + // noop + } + + public openSearchViewlet(): Promise { + return this.spectron.command('workbench.view.search'); + } + + public async searchFor(text: string): Promise { + await this.spectron.client.keys(text); + return this.spectron.client.keys(['NULL', 'Enter', 'NULL'], false); + } + + public setReplaceText(text: string): any { + return this.spectron.client.setValue('.viewlet .input[title="Replace"]', text); + } + + public replaceFirstMatch(): any { + return this.spectron.client.click('.monaco-tree-rows.show-twisties .action-label.icon.action-replace-all'); + } + + public getResultText(): any { + return this.spectron.waitFor(this.spectron.client.getText, '.search-viewlet .message>p'); + } + + public toggleSearchDetails(): any { + return this.spectron.client.click('.query-details .more'); + } + + public toggleReplace(): any { + return this.spectron.client.click('.monaco-button.toggle-replace-button.collapse'); + } + + public hoverOverResultCount(): any { + return this.spectron.waitFor(this.spectron.client.moveToObject, '.monaco-count-badge'); + } + + public dismissResult(): any { + return this.spectron.client.click('.action-label.icon.action-remove') + } +} \ No newline at end of file diff --git a/smoketest/src/areas/statusbar.ts b/smoketest/src/areas/statusbar.ts new file mode 100644 index 0000000000000..93b7349518355 --- /dev/null +++ b/smoketest/src/areas/statusbar.ts @@ -0,0 +1,99 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; + +export enum StatusBarElement { + BRANCH_STATUS = 0, + SYNC_STATUS = 1, + PROBLEMS_STATUS = 2, + SELECTION_STATUS = 3, + INDENTATION_STATUS = 4, + ENCODING_STATUS = 5, + EOL_STATUS = 6, + LANGUAGE_STATUS = 7, + FEEDBACK_ICON = 8 +} + +export class StatusBar { + + private selectorsMap: Map; + private readonly mainSelector = 'div[id="workbench.parts.statusbar"]'; + + constructor(private spectron: SpectronApplication) { + this.populateSelectorsMap(); + } + + public async isVisible(element: StatusBarElement): Promise { + const selector = this.selectorsMap.get(element); + if (!selector) { + throw new Error('No such element in the status bar defined.'); + } + + return this.spectron.client.isVisible(selector); + } + + public async clickOn(element: StatusBarElement): Promise { + const selector = this.selectorsMap.get(element); + if (!selector) { + throw new Error('No such element in the status bar defined.'); + } + + return this.spectron.client.click(selector); + } + + public async getProblemsView(): Promise { + let el = await this.spectron.client.element('div[id="workbench.panel.markers"]'); + if (el.status === 0) { + return el; + } + + return undefined; + } + + public async getFeedbackView(): Promise { + let el = await this.spectron.client.element('.feedback-form'); + if (el.status === 0) { + return el; + } + + return undefined; + } + + public isQuickOpenWidgetVisible(): Promise { + return this.spectron.client.isVisible('.quick-open-widget'); + } + + public async getEditorHighlightedLine(lineNumber: number): Promise { + let el = await this.spectron.client.element(`.monaco-editor .view-overlays>:nth-child(${lineNumber}) .current-line`); + if (el.status === 0) { + return el; + } + + return undefined; + } + + public async getEOLMode(): Promise { + const selector = this.selectorsMap.get(StatusBarElement.EOL_STATUS); + if (!selector) { + throw new Error('No such element in the status bar defined.'); + } + + return this.spectron.client.getText(selector); + } + + private populateSelectorsMap(): void { + this.selectorsMap = new Map(); + this.selectorsMap.set(StatusBarElement.BRANCH_STATUS, `${this.mainSelector} .octicon.octicon-git-branch`); + this.selectorsMap.set(StatusBarElement.SYNC_STATUS, `${this.mainSelector} .octicon.octicon-sync`); + this.selectorsMap.set(StatusBarElement.PROBLEMS_STATUS, `${this.mainSelector} .task-statusbar-item[title="Problems"]`); + this.selectorsMap.set(StatusBarElement.SELECTION_STATUS, `${this.mainSelector} .editor-status-selection`); + this.selectorsMap.set(StatusBarElement.INDENTATION_STATUS, `${this.mainSelector} .editor-status-indentation`); + this.selectorsMap.set(StatusBarElement.ENCODING_STATUS, `${this.mainSelector} .editor-status-encoding`); + this.selectorsMap.set(StatusBarElement.EOL_STATUS, `${this.mainSelector} .editor-status-eol`); + this.selectorsMap.set(StatusBarElement.LANGUAGE_STATUS, `${this.mainSelector} .editor-status-mode`); + this.selectorsMap.set(StatusBarElement.FEEDBACK_ICON, `${this.mainSelector} .dropdown.send-feedback`); + } +} \ No newline at end of file diff --git a/smoketest/src/areas/tasks.ts b/smoketest/src/areas/tasks.ts new file mode 100644 index 0000000000000..e46c2961df585 --- /dev/null +++ b/smoketest/src/areas/tasks.ts @@ -0,0 +1,50 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from '../spectron/application'; + +export class Tasks { + + private readonly outputViewSelector = 'div[id="workbench.panel.output"] .view-lines'; + private readonly workbenchPanelSelector = 'div[id="workbench.parts.panel"]'; + private readonly problemsViewSelector = 'div[id="workbench.panel.markers"] .monaco-tree-row.expanded'; + + constructor(private spectron: SpectronApplication) { + // noop + } + + public build(): Promise { + return this.spectron.command('workbench.action.tasks.build'); + } + + public openProblemsView(): Promise { + return this.spectron.command('workbench.actions.view.problems'); + } + + public async firstOutputLineEndsWith(fileName: string): Promise { + const firstLine = await this.spectron.waitFor(this.spectron.client.getText, `${this.outputViewSelector}>:nth-child(2)`); + return firstLine.endsWith(fileName); + } + + public getOutputResult(): Promise { + return this.spectron.waitFor(this.spectron.client.getText, `${this.outputViewSelector}>:nth-child(10) span.mtk1`); + } + + public selectOutputViewType(type: string): Promise { + return this.spectron.client.selectByValue(`${this.workbenchPanelSelector} .select-box`, type); + } + + public getOutputViewType(): Promise { + return this.spectron.client.getValue(`${this.workbenchPanelSelector} .select-box`); + } + + public getProblemsViewFirstElementName(): Promise { + return this.spectron.waitFor(this.spectron.client.getText, `${this.problemsViewSelector} .label-name`); + } + + public getProblemsViewFirstElementCount(): Promise { + return this.spectron.waitFor(this.spectron.client.getText, `${this.problemsViewSelector} .monaco-count-badge`); + } +} \ No newline at end of file diff --git a/smoketest/src/helpers/screenshot.ts b/smoketest/src/helpers/screenshot.ts new file mode 100644 index 0000000000000..649c38493e4fc --- /dev/null +++ b/smoketest/src/helpers/screenshot.ts @@ -0,0 +1,48 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { SpectronApplication } from "../spectron/application"; +var fs = require('fs'); + +const __testTime = new Date().toISOString(); + +export class Screenshot { + private index: number = 0; + private testPath: string; + + constructor(private spectron: SpectronApplication, testName: string) { + const testTime = this.sanitizeFolderName(__testTime); + testName = this.sanitizeFolderName(testName); + + this.testPath = `test_data/screenshots/${testTime}/${testName}`; + this.createFolder(this.testPath); + } + + public capture(): Promise { + return new Promise(async (res, rej) => { + const image: Electron.NativeImage = await this.spectron.app.browserWindow.capturePage(); + fs.writeFile(`${this.testPath}/${this.index}.png`, image, (err) => { + if (err) { + rej(err); + } + }); + this.index++; + res(); + }); + } + + private createFolder(name: string) { + name.split('/').forEach((folderName, i, fullPath) => { + const folder = fullPath.slice(0, i + 1).join('/'); + if (!fs.existsSync(folder)) { + fs.mkdirSync(folder); + } + }); + } + + private sanitizeFolderName(name: string): string { + return name.replace(/[&*:\/]/g, ''); + } +} \ No newline at end of file diff --git a/smoketest/src/helpers/utilities.ts b/smoketest/src/helpers/utilities.ts new file mode 100644 index 0000000000000..2a52a4fe7dfd2 --- /dev/null +++ b/smoketest/src/helpers/utilities.ts @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +var fs = require('fs'); +var rimraf = require('rimraf'); + +/** + * Contains methods that are commonly used across test areas. + */ +export class Util { + constructor() { + // noop + } + + public removeFile(filePath: string): void { + try { + fs.unlinkSync(`${filePath}`); + } catch (e) { + if (e.code !== 'ENOENT') { + throw e; + } + } + } + + public rimraf(directory: string): Promise { + return new Promise((res, rej) => { + rimraf(directory, (err) => { + if (err) { + rej(err); + } + res(); + }); + }); + } +} \ No newline at end of file diff --git a/smoketest/src/main.ts b/smoketest/src/main.ts new file mode 100644 index 0000000000000..9da55ce546aa7 --- /dev/null +++ b/smoketest/src/main.ts @@ -0,0 +1,771 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; +import { SpectronApplication } from "./spectron/application"; +import { CommonActions } from './areas/common'; +import { FirstExperience } from './areas/first-experience'; +import { ConfigurationView, ActivityBarPosition } from './areas/configuration-views'; +import { Search } from './areas/search'; +import { CSS, CSSProblem } from './areas/css'; +import { JavaScript } from './areas/javascript'; +import { JavaScriptDebug } from './areas/javascript-debug'; +import { Git } from './areas/git'; +import { IntegratedTerminal } from './areas/integrated-terminal'; +import { StatusBar, StatusBarElement } from './areas/statusBar'; +import { DataLoss } from './areas/data-loss'; +import { Tasks } from './areas/tasks'; +import { Extensions } from './areas/extensions'; +import { Localization, ViewletType } from "./areas/localization"; + +describe('Smoke Test Suite', function () { + const latestPath = process.env.VSCODE_LATEST_PATH; + const stablePath = process.env.VSCODE_STABLE_PATH; + const insiders = process.env.VSCODE_EDITION; + const workspacePath = process.env.SMOKETEST_REPO; + const tempUserDir = 'test_data/temp_user_dir'; + const tempExtensionsDir = 'test_data/temp_extensions_dir'; + + let app: SpectronApplication; + let common: CommonActions; + this.retries(2); + + if (stablePath) { + context('Data Migration', function () { + + afterEach(async function () { + await app.stop(); + return await common.removeDirectory(tempUserDir) + }); + + function setupSpectron(context: Mocha.ITestCallbackContext, appPath: string, workspace?: string[]): void { + app = new SpectronApplication(appPath, context.test.fullTitle(), context.test.currentRetry(), workspace, [`--user-data-dir=${tempUserDir}`]); + common = new CommonActions(app); + } + + it('checks if the Untitled file is restored migrating from stable to latest', async function () { + const textToType = 'Very dirty file'; + + // Setting up stable version + setupSpectron(this, stablePath); + await app.start(); + + await common.newUntitledFile(); + await common.type(textToType); + await app.stop(); + + await app.wait(); // wait until all resources are released (e.g. locked local storage) + + // Checking latest version for the restored state + setupSpectron(this, latestPath); + await app.start(); + + assert.ok(await common.getTab('Untitled-1')); + await common.selectTab('Untitled-1'); + const editorText = await common.getEditorFirstLinePlainText(); + assert.equal(editorText, textToType); + }); + + it('checks if the newly created dirty file is restored migrating from stable to latest', async function () { + const fileName = 'test_data/plainFile', + firstTextPart = 'This is going to be an unsaved file', secondTextPart = '_that is dirty.'; + + // Setting up stable version + setupSpectron(this, stablePath, [fileName]); + await common.removeFile(`${fileName}`); + await app.start(); + + await common.type(firstTextPart); + await common.saveOpenedFile(); + await app.wait(); + await common.type(secondTextPart); + + await app.stop(); + await app.wait(); // wait until all resources are released (e.g. locked local storage) + + // Checking latest version for the restored state + setupSpectron(this, latestPath); + await app.start(); + assert.ok(await common.getTab(fileName.split('/')[1])); + await common.selectTab(fileName.split('/')[1]); + const editorText = await common.getEditorFirstLinePlainText(); + assert.equal(editorText, firstTextPart.concat(secondTextPart)); + + // Cleanup + await common.removeFile(`${fileName}`); + }); + + it('cheks if opened tabs are restored migrating from stable to latest', async function () { + const fileName1 = 'app.js', fileName2 = 'jsconfig.json', fileName3 = 'readme.md'; + setupSpectron(this, stablePath, [workspacePath]); + await app.start(); + await common.openFile(fileName1, true); + await common.openFile(fileName2, true); + await common.openFile(fileName3, true); + await app.stop(); + + setupSpectron(this, latestPath, [workspacePath]); + await app.start(); + assert.ok(await common.getTab(fileName1)); + assert.ok(await common.getTab(fileName2)); + assert.ok(await common.getTab(fileName3)); + }); + }); + } + + context('Data Loss', function () { + let dataLoss: DataLoss; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath], [`--user-data-dir=${tempUserDir}`]); + common = new CommonActions(app); + dataLoss = new DataLoss(app); + await common.removeDirectory(tempUserDir); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it(`verifies that 'hot exit' works for dirty files`, async function () { + const textToType = 'Hello, Code!', fileName = 'readme.md', untitled = 'Untitled-1'; + await common.newUntitledFile(); + await common.type(textToType); + await dataLoss.openExplorerViewlet(); + await common.openFile(fileName, true); + await common.type(textToType); + + await app.stop(); + await app.start(); + + // check tab presence + assert.ok(await common.getTab(untitled)); + assert.ok(await common.getTab(fileName, true)); + // check if they marked as dirty (icon) and active tab is the last opened + assert.ok(await dataLoss.verifyTabIsDirty(untitled)); + assert.ok(await dataLoss.verifyTabIsDirty(fileName, true)); + }); + + it(`verifies that contents of the dirty files are restored after 'hot exit'`, async function () { + // make one dirty file, + // create one untitled file + const textToType = 'Hello, Code!'; + + // create one untitled file + await common.newUntitledFile(); + await app.wait(); + await common.type(textToType); + + // make one dirty file, + await common.openFile('readme.md', true); + await app.wait(); + await common.type(textToType); + + await app.stop(); + await app.start(); + + // check their contents + let fileDirt = await common.getEditorFirstLinePlainText(); + assert.equal(fileDirt, 'Hello, Code'); // ignore '!' as it is a separate , first part is enough + await common.selectTab('Untitled-1'); + fileDirt = await common.getEditorFirstLinePlainText(); + assert.equal(fileDirt, textToType); + }); + }); + + context('First User Experience', function () { + let experience: FirstExperience; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), undefined, [`--user-data-dir=${tempUserDir}`, `--excludeSwitches=load-component-extension`]); + common = new CommonActions(app); + experience = new FirstExperience(app); + + await common.removeDirectory(tempUserDir); + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it(`verifies if title is set correctly on the clean user-directory startup`, async function () { + const title = await common.getWindowTitle(); + + let expectedTitle = 'Welcome'; + if (process.platform !== 'darwin') { + expectedTitle += ' — Visual Studio Code'; + if (insiders) expectedTitle += ' - Insiders'; + } + + assert.equal(title, expectedTitle); + }); + + it(`verifies if 'Welcome page' tab is presented on the clean user-directory startup`, async function () { + assert.ok(await experience.getWelcomeTab()); + }); + }); + + context('Explorer', function () { + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('quick open search produces correct result', async function () { + await common.openQuickOpen(); + await common.type('.js'); + await app.wait(); + const elCount = await common.getQuickOpenElements(); + assert.equal(elCount, 7); + }); + + it('quick open respects fuzzy matching', async function () { + await common.openQuickOpen(); + await common.type('a.s'); + await app.wait(); + const elCount = await common.getQuickOpenElements(); + assert.equal(elCount, 3); + }); + }); + + context('Configuration and views', function () { + let configView: ConfigurationView; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + configView = new ConfigurationView(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('turns off editor line numbers and verifies the live change', async function () { + await common.newUntitledFile(); + await app.wait(); + let elements = await configView.getEditorLineNumbers(); + assert.equal(elements.value.length, 1); + await common.addSetting('editor.lineNumbers', 'off'); + await app.wait(); + elements = await configView.getEditorLineNumbers(); + assert.equal(elements.value.length, 0); + }); + + it(`changes 'workbench.action.toggleSidebarPosition' command key binding and verifies it`, async function () { + await configView.enterKeybindingsView() + await common.type('workbench.action.toggleSidebarPosition'); + await app.wait(); + await configView.selectFirstKeybindingsMatch(); + await configView.changeKeybinding(); + await configView.enterBinding(['Control', 'u', 'NULL']); + await common.enter(); + let html = await configView.getActivityBar(ActivityBarPosition.RIGHT); + assert.equal(html, undefined);; + await app.wait(); + await configView.toggleActivityBarPosition(); + html = await configView.getActivityBar(ActivityBarPosition.RIGHT); + assert.ok(html); + }); + }); + + context('Search', function () { + let search: Search; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + search = new Search(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('searches for body & checks for correct result number', async function () { + const s = search; + await s.openSearchViewlet(); + await s.searchFor('body'); + const result = await s.getResultText(); + assert.equal(result, '7 results in 4 files'); + }); + + it('searches only for *.js files & checks for correct result number', async function () { + const s = search; + await s.openSearchViewlet(); + await s.searchFor('body'); + await s.toggleSearchDetails(); + await s.searchFor('*.js'); + const results = await s.getResultText(); + assert.equal(results, '4 results in 1 file'); + }); + + it('dismisses result & checks for correct result number', async function () { + const s = search; + await s.openSearchViewlet() + await s.searchFor('body'); + await s.hoverOverResultCount(); + await s.dismissResult(); + await app.wait(); + const result = await s.getResultText(); + assert.equal(result, '3 results in 3 files') + }); + + it('replaces first search result with a replace term', async function () { + const s = search; + await s.openSearchViewlet() + await s.searchFor('body'); + await s.toggleReplace(); + await s.setReplaceText('ydob'); + await s.hoverOverResultCount(); + await s.replaceFirstMatch(); + await app.wait(); + await common.saveOpenedFile(); + const result = await s.getResultText(); + assert.equal(result, '3 results in 3 files'); + }); + }); + + context('CSS', function () { + let css: CSS; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + css = new CSS(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('verifies quick outline', async function () { + await common.openFirstMatchFile('style.css'); + await css.openQuickOutline(); + await app.wait(); + const count = await common.getQuickOpenElements(); + assert.equal(count, 2); + }); + + it('verifies warnings for the empty rule', async function () { + await common.openFirstMatchFile('style.css'); + await common.type('.foo{}'); + await app.wait(); + let warning = await css.getEditorProblem(CSSProblem.WARNING); + assert.ok(warning); + await css.toggleProblemsView(); + warning = await css.getProblemsViewsProblem(CSSProblem.WARNING); + assert.ok(warning); + }); + + it('verifies that warning becomes an error once setting changed', async function () { + await common.addSetting('css.lint.emptyRules', 'error'); + await common.openFirstMatchFile('style.css'); + await common.type('.foo{}'); + await app.wait(); + let error = await css.getEditorProblem(CSSProblem.ERROR); + assert.ok(error); + await css.toggleProblemsView(); + error = await css.getProblemsViewsProblem(CSSProblem.ERROR); + assert.ok(error); + }); + }); + + context('JavaScript', function () { + let js: JavaScript; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + js = new JavaScript(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('shows correct quick outline', async function () { + await common.openFirstMatchFile('bin/www'); + await js.openQuickOutline(); + await app.wait(); + const symbols = await common.getQuickOpenElements(); + assert.equal(symbols, 12); + }); + + it(`finds 'All References' to 'app'`, async function () { + await common.openFirstMatchFile('bin/www'); + await app.wait(); + await js.findAppReferences(); + const titleCount = await js.getTitleReferencesCount(); + assert.equal(titleCount, 3); + const treeCount = await js.getTreeReferencesCount(); + assert.equal(treeCount, 3); + }); + + it(`renames local 'app' variable`, async function () { + await common.openFirstMatchFile('bin/www'); + + const newVarName = 'newApp'; + await js.renameApp(newVarName); + await common.enter(); + const newName = await js.getNewAppName(); + assert.equal(newName, newVarName); + }); + + it('folds/unfolds the code correctly', async function () { + await common.openFirstMatchFile('bin/www'); + // Fold + await js.toggleFirstCommentFold(); + const foldedIcon = await js.getFirstCommentFoldedIcon(); + assert.ok(foldedIcon); + let nextLineNumber = await js.getNextLineNumberAfterFold(); + assert.equal(nextLineNumber, 7); + // Unfold + await js.toggleFirstCommentFold(); + nextLineNumber = await js.getNextLineNumberAfterFold(); + assert.equal(nextLineNumber, 4); + }); + + it(`verifies that 'Go To Definition' works`, async function () { + await common.openFirstMatchFile('app.js'); + await js.goToExpressDefinition(); + await app.wait(); + assert.ok(await common.getTab('index.d.ts')); + }); + + it(`verifies that 'Peek Definition' works`, async function () { + await common.openFirstMatchFile('app.js'); + await js.peekExpressDefinition(); + const definitionFilename = await js.getPeekExpressResultName(); + assert.equal(definitionFilename, 'index.d.ts'); + }); + }); + + context('Debugging JavaScript', function () { + let jsDebug: JavaScriptDebug; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + jsDebug = new JavaScriptDebug(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('autodetects program attribute for launch.json', async function () { + await jsDebug.openDebugViewlet(); + await jsDebug.pressConfigureLaunchJson(); + const value = await jsDebug.getProgramConfigValue(); + process.platform === 'win32' ? assert.equal(value, '"${workspaceRoot}\\\\bin\\\\www"') : assert.equal(value, '"${workspaceRoot}/bin/www"'); + }); + + it(`can set a breakpoint and verify if it's set`, async function () { + await common.openFirstMatchFile('index.js'); + await jsDebug.setBreakpointOnLine(6); + const breakpoint = await jsDebug.verifyBreakpointOnLine(6); + assert.ok(breakpoint); + }); + }); + + context('Git', function () { + let git: Git; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + git = new Git(app, common); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('verifies current changes are picked up by Git viewlet', async function () { + const changesCount = await git.getScmIconChanges(); + assert.equal(changesCount, 2); + await git.openGitViewlet(); + assert.ok(await git.verifyScmChange('app.js')); + assert.ok(await git.verifyScmChange('launch.json')); + }); + + it(`verifies 'app.js' diff viewer changes`, async function () { + await git.openGitViewlet(); + await common.openFile('app.js'); + const original = await git.getOriginalAppJsBodyVarName(); + assert.equal(original, 'bodyParser'); + const modified = await git.getModifiedAppJsBodyVarName(); + assert.equal(modified, 'ydobParser'); + }); + + it(`stages 'app.js' changes and checks stage count`, async function () { + await git.openGitViewlet(); + await app.wait(); + await git.stageFile('app.js'); + const stagedCount = await git.getStagedCount(); + assert.equal(stagedCount, 1); + + // Return back to unstaged state + await git.unstageFile('app.js'); + }); + + it(`stages, commits change to 'app.js' locally and verifies outgoing change`, async function () { + await git.openGitViewlet(); + await app.wait(); + await git.stageFile('app.js'); + await git.focusOnCommitBox(); + await common.type('Test commit'); + await git.pressCommit(); + const changes = await git.getOutgoingChanges(); + assert.equal(changes, ' 0↓ 1↑'); + }); + }); + + context('Integrated Terminal', function () { + let terminal: IntegratedTerminal; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + terminal = new IntegratedTerminal(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it(`opens terminal, runs 'echo' and verifies the output`, async function () { + const command = 'echo test'; + await terminal.openTerminal(common); + await app.wait(); + await common.type(command); + await common.enter(); + await app.wait(); + // Default Powershell terminal adds 3 header rows at the top, whereas bash does not. + let output = await terminal.getCommandOutput(command); + assert.equal(output, 'test'); + }); + }); + + context('Status Bar', function () { + let statusBar: StatusBar; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + common = new CommonActions(app); + statusBar = new StatusBar(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('verifies presence of all default status bar elements', async function () { + await app.wait(); + assert.ok(await statusBar.isVisible(StatusBarElement.BRANCH_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.FEEDBACK_ICON)); + assert.ok(await statusBar.isVisible(StatusBarElement.SYNC_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.PROBLEMS_STATUS)); + + await common.openFirstMatchFile('app.js'); + assert.ok(await statusBar.isVisible(StatusBarElement.ENCODING_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.EOL_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.INDENTATION_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.LANGUAGE_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.SELECTION_STATUS)); + }); + + it(`verifies that 'quick open' opens when clicking on 'Branch', 'Indentation Status, 'Encoding', 'EOL' and 'Language' status elements`, async function () { + await app.wait(); + await statusBar.clickOn(StatusBarElement.BRANCH_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + + await common.openFirstMatchFile('app.js'); + await statusBar.clickOn(StatusBarElement.INDENTATION_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + await statusBar.clickOn(StatusBarElement.ENCODING_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + await statusBar.clickOn(StatusBarElement.EOL_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + await statusBar.clickOn(StatusBarElement.LANGUAGE_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + }); + + it(`verifies that 'Problems View' appears when clicking on 'Problems' status element`, async function () { + await statusBar.clickOn(StatusBarElement.PROBLEMS_STATUS); + assert.ok(await statusBar.getProblemsView()); + }); + + it(`verifies that 'Tweet us feedback' pop-up appears when clicking on 'Feedback' icon`, async function () { + await statusBar.clickOn(StatusBarElement.FEEDBACK_ICON); + assert.ok(await statusBar.getFeedbackView()); + }); + + it(`checks if 'Go to Line' works if called from the status bar`, async function () { + await common.openFirstMatchFile('app.js'); + await statusBar.clickOn(StatusBarElement.SELECTION_STATUS); + const lineNumber = 15; + await common.type(lineNumber.toString()); + await common.enter(); + assert.ok(await statusBar.getEditorHighlightedLine(lineNumber)); + }); + + it(`verifies if changing EOL is reflected in the status bar`, async function () { + await common.openFirstMatchFile('app.js'); + await statusBar.clickOn(StatusBarElement.EOL_STATUS); + await common.selectNextQuickOpenElement(); + await common.enter(); + const currentEOL = await statusBar.getEOLMode(); + assert.equal(currentEOL, 'CRLF'); + }); + }); + + context('Tasks', function () { + let tasks: Tasks; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); + tasks = new Tasks(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('verifies that build task produces 6 errors', async function () { + await tasks.build(); + const res = await tasks.getOutputResult(); + assert.equal(res, '✖ 6 problems (6 errors, 0 warnings)'); + }); + + it(`is able to select 'Git' output`, async function () { + await tasks.build(); + await app.wait(); + await tasks.selectOutputViewType('Git'); + const viewType = await tasks.getOutputViewType(); + assert.equal(viewType, 'Git'); + }); + + it('ensures that build task produces errors in index.js', async function () { + await tasks.build(); + assert.ok(await tasks.firstOutputLineEndsWith('index.js')); + }); + + it(`verifies build errors are reflected in 'Problems View'`, async function () { + await tasks.build(); + await app.wait(); + await tasks.openProblemsView(); + const problemName = await tasks.getProblemsViewFirstElementName(); + assert.equal(problemName, 'index.js'); + const problemsCount = await tasks.getProblemsViewFirstElementCount(); + assert.equal(problemsCount, '6'); + }); + }); + + context('Extensions', function () { + let extensions: Extensions; + + beforeEach(async function () { + app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath], [`--extensions-dir=${tempExtensionsDir}`]); + common = new CommonActions(app); + extensions = new Extensions(app, common); + await common.removeDirectory(tempExtensionsDir); + + return await app.start(); + }); + afterEach(async function () { + await app.stop(); + return await common.removeDirectory(tempExtensionsDir); + }); + + it(`installs 'vscode-icons' extension and verifies reload is prompted`, async function () { + await extensions.openExtensionsViewlet(); + await extensions.searchForExtension('vscode-icons'); + await app.wait(); + await extensions.installFirstResult(); + await app.wait(); + assert.ok(await extensions.getFirstReloadText()); + }); + + it(`installs an extension and checks if it works on restart`, async function () { + await extensions.openExtensionsViewlet(); + await extensions.searchForExtension('vscode-icons'); + await app.wait(); + await extensions.installFirstResult(); + await app.wait(); + await extensions.getFirstReloadText(); + + await app.stop(); + await app.wait(); // wait until all resources are released (e.g. locked local storage) + await app.start(); + await extensions.selectMinimalIconsTheme(); + const x = await extensions.verifyFolderIconAppearance(); + assert.ok(x); + }); + }); + + context('Localization', function () { + afterEach(async function () { + return await app.stop(); + }); + + it(`starts with 'DE' locale and verifies title and viewlets text is in German`, async function () { + app = new SpectronApplication(latestPath, this.test.fullTitle(), this.test.currentRetry(), [workspacePath, '--locale=DE'], [`--user-data-dir=${tempUserDir}`]); + common = new CommonActions(app); + const locale = new Localization(app); + common.removeDirectory(tempUserDir); + + await app.start(); + + let expectedTitle = 'Willkommen — vscode-smoketest-express'; + if (process.platform !== 'darwin') { + expectedTitle += ' — Visual Studio Code'; + if (insiders) expectedTitle += ' - Insiders'; + } + assert.equal(await common.getWindowTitle(), expectedTitle); + + let text = await locale.getOpenEditorsText(); + assert.equal(text.toLowerCase(), 'geöffnete editoren'); + + await locale.openViewlet(ViewletType.SEARCH); + text = await locale.getOpenedViewletTitle() + assert.equal(text.toLowerCase(), 'suchen'); + + await locale.openViewlet(ViewletType.SCM); + text = await locale.getOpenedViewletTitle(); + assert.equal(text.toLowerCase(), 'quellcodeverwaltung: git'); + + await locale.openViewlet(ViewletType.DEBUG); + text = await locale.getOpenedViewletTitle(); + assert.equal(text.toLowerCase(), 'debuggen'); + + await locale.openViewlet(ViewletType.EXTENSIONS); + text = await locale.getExtensionsSearchPlaceholder(); + assert.equal(text.toLowerCase(), 'nach extensions in marketplace suchen'); + }); + }); + +}); \ No newline at end of file diff --git a/smoketest/src/spectron/application.ts b/smoketest/src/spectron/application.ts new file mode 100644 index 0000000000000..5e45474768c8f --- /dev/null +++ b/smoketest/src/spectron/application.ts @@ -0,0 +1,156 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { Application } from 'spectron'; +import { SpectronClient } from './client'; +import { Screenshot } from "../helpers/screenshot"; +var fs = require('fs'); + +/** + * Wraps Spectron's Application instance with its used methods. + */ +export class SpectronApplication { + public client: SpectronClient; + + private spectron: Application; + private readonly pollTrials = 5; + private readonly pollTimeout = 3; // in secs + private keybindings: any[]; + private screenshot: Screenshot; + + constructor(electronPath: string, testName: string, private testRetry: number, args?: string[], chromeDriverArgs?: string[]) { + if (!args) { + args = []; + } + + this.spectron = new Application({ + path: electronPath, + args: args.concat(['--skip-getting-started']), // prevent 'Getting Started' web page from opening on clean user-data-dir + chromeDriverArgs: chromeDriverArgs + }); + this.screenshot = new Screenshot(this, testName); + this.client = new SpectronClient(this.spectron, this.screenshot); + this.testRetry += 1; // avoid multiplication by 0 for wait times + this.retrieveKeybindings(); + } + + public get app(): Application { + return this.spectron; + } + + public async start(): Promise { + try { + await this.spectron.start(); + await this.focusOnWindow(1); // focuses on main renderer window + return this.checkWindowReady(); + } catch (err) { + throw err; + } + } + + public async stop(): Promise { + if (this.spectron && this.spectron.isRunning()) { + return await this.spectron.stop(); + } + } + + public waitFor(func: (...args: any[]) => any, args: any): Promise { + return this.callClientAPI(func, args, 0); + } + + public wait(): Promise { + return new Promise(resolve => setTimeout(resolve, this.testRetry * this.pollTimeout * 1000)); + } + + public focusOnWindow(index: number): Promise { + return this.client.windowByIndex(index); + } + + private checkWindowReady(): Promise { + return this.waitFor(this.spectron.client.getHTML, '[id="workbench.main.container"]'); + } + + private retrieveKeybindings() { + const os = process.platform; + fs.readFile(`test_data/keybindings.${os}.json`, (err, data) => { + if (err) { + throw err; + } + + this.keybindings = JSON.parse(data); + }); + } + + private callClientAPI(func: (...args: any[]) => Promise, args: any, trial: number): Promise { + if (trial > this.pollTrials) { + return Promise.reject(`Could not retrieve the element in ${this.testRetry * this.pollTrials * this.pollTimeout} seconds.`); + } + + return new Promise(async (res, rej) => { + let resolved = false, capture = false; + + const tryCall = async (resolve: any, reject: any): Promise => { + await this.wait(); + try { + const result = await this.callClientAPI(func, args, ++trial); + res(result); + } catch (error) { + rej(error); + } + } + + try { + const result = await func.call(this.client, args, capture); + if (!resolved && result === '') { + resolved = true; + await tryCall(res, rej); + } else if (!resolved) { + resolved = true; + await this.screenshot.capture(); + res(result); + } + } catch (e) { + if (!resolved) { + resolved = true; + await tryCall(res, rej); + } + } + }); + } + + /** + * Retrieves the command from keybindings file and executes it with WebdriverIO client API + * @param command command (e.g. 'workbench.action.files.newUntitledFile') + */ + public command(command: string, capture?: boolean): Promise { + const binding = this.keybindings.find(x => x['command'] == command); + const keys: string = binding.key; + let keysToPress: string[] = []; + + const chords = keys.split(' '); + chords.forEach((chord) => { + const keys = chord.split('+'); + keys.forEach((key) => keysToPress.push(this.transliterate(key))); + keysToPress.push('NULL'); + }); + + return this.client.keys(keysToPress, capture); + } + + /** + * Transliterates key names from keybindings file to WebdriverIO keyboard actions defined in: + * https://w3c.github.io/webdriver/webdriver-spec.html#keyboard-actions + */ + private transliterate(key: string): string { + switch (key) { + case 'ctrl': + return 'Control'; + case 'cmd': + return 'Meta'; + default: + return key.length === 1 ? key : key.charAt(0).toUpperCase() + key.slice(1); + }; + } +} diff --git a/smoketest/src/spectron/client.ts b/smoketest/src/spectron/client.ts new file mode 100644 index 0000000000000..9376bd3e10044 --- /dev/null +++ b/smoketest/src/spectron/client.ts @@ -0,0 +1,127 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { Application } from 'spectron'; +import { Screenshot } from '../helpers/screenshot'; + +/** + * Abstracts the Spectron's WebdriverIO managed client property on the created Application instances. + */ +export class SpectronClient { + + constructor(private spectron: Application, private shot: Screenshot) { + // noop + } + + public windowByIndex(index: number): Promise { + return this.spectron.client.windowByIndex(index); + } + + public async keys(keys: string[] | string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.keys(keys); + } + + public async getText(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.getText(selector); + } + + public async getHTML(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.getHTML(selector); + } + + public async click(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.click(selector); + } + + public async doubleClick(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.doubleClick(selector); + } + + public async leftClick(selector: string, xoffset: number, yoffset: number, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.leftClick(selector, xoffset, yoffset); + } + + public async rightClick(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.rightClick(selector); + } + + public async moveToObject(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.moveToObject(selector); + } + + public async setValue(selector: string, text: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.setValue(selector, text); + } + + public async elements(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.elements(selector); + } + + public async element(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.element(selector); + } + + public async dragAndDrop(sourceElem: string, destinationElem: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.dragAndDrop(sourceElem, destinationElem); + } + + public async selectByValue(selector: string, value: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.selectByValue(selector, value); + } + + public async getValue(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.getValue(selector); + } + + public async getAttribute(selector: string, attribute: string, capture: boolean = true): Promise { + await this.execute(capture); + return Promise.resolve(this.spectron.client.getAttribute(selector, attribute)); + } + + public clearElement(selector: string): any { + return this.spectron.client.clearElement(selector); + } + + public buttonDown(): any { + return this.spectron.client.buttonDown(); + } + + public buttonUp(): any { + return this.spectron.client.buttonUp(); + } + + public async isVisible(selector: string, capture: boolean = true): Promise { + await this.execute(capture); + return this.spectron.client.isVisible(selector); + } + + public getTitle(): string { + return this.spectron.client.getTitle(); + } + + private async execute(capture: boolean): Promise { + if (capture) { + try { + await this.shot.capture(); + } catch (e) { + throw new Error(`Screenshot could not be captured: ${e}`); + } + } + } +} \ No newline at end of file diff --git a/smoketest/tsconfig.json b/smoketest/tsconfig.json new file mode 100644 index 0000000000000..1b0b03c2d672b --- /dev/null +++ b/smoketest/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "noImplicitAny": false, + "removeComments": false, + "preserveConstEnums": true, + "target": "es2016", + "strictNullChecks": true, + "noUnusedParameters": false, + "noUnusedLocals": true, + "outDir": "out", + "sourceMap": true, + "lib": [ + "es2016", + "dom" + ] + }, + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/vscode-smoketest-express b/vscode-smoketest-express new file mode 160000 index 0000000000000..636dd7a2ff71d --- /dev/null +++ b/vscode-smoketest-express @@ -0,0 +1 @@ +Subproject commit 636dd7a2ff71d266c0e015411b47cf5c3a25be5a From 7e6fb9ffab12a7605ae7ad1ba4320aa5d22101cd Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 22 May 2017 15:28:29 +0200 Subject: [PATCH 1202/2747] Moved to test directory. --- {smoketest => test/smoke}/.gitignore | 0 {smoketest => test/smoke}/.vscode/launch.json | 0 {smoketest => test/smoke}/.vscode/tasks.json | 0 {smoketest => test/smoke}/CONTRIBUTING.md | 0 {smoketest => test/smoke}/README.md | 0 {smoketest => test/smoke}/package.json | 0 {smoketest => test/smoke}/scripts/run.ps1 | 11 +++++------ {smoketest => test/smoke}/scripts/run.sh | 0 {smoketest => test/smoke}/src/areas/common.ts | 0 .../smoke}/src/areas/configuration-views.ts | 0 {smoketest => test/smoke}/src/areas/css.ts | 0 {smoketest => test/smoke}/src/areas/data-loss.ts | 0 {smoketest => test/smoke}/src/areas/extensions.ts | 0 .../smoke}/src/areas/first-experience.ts | 0 {smoketest => test/smoke}/src/areas/git.ts | 0 .../smoke}/src/areas/integrated-terminal.ts | 0 .../smoke}/src/areas/javascript-debug.ts | 0 {smoketest => test/smoke}/src/areas/javascript.ts | 0 {smoketest => test/smoke}/src/areas/localization.ts | 0 {smoketest => test/smoke}/src/areas/search.ts | 0 {smoketest => test/smoke}/src/areas/statusbar.ts | 0 {smoketest => test/smoke}/src/areas/tasks.ts | 0 {smoketest => test/smoke}/src/helpers/screenshot.ts | 0 {smoketest => test/smoke}/src/helpers/utilities.ts | 0 {smoketest => test/smoke}/src/main.ts | 0 {smoketest => test/smoke}/src/spectron/application.ts | 0 {smoketest => test/smoke}/src/spectron/client.ts | 0 {smoketest => test/smoke}/tsconfig.json | 0 28 files changed, 5 insertions(+), 6 deletions(-) rename {smoketest => test/smoke}/.gitignore (100%) rename {smoketest => test/smoke}/.vscode/launch.json (100%) rename {smoketest => test/smoke}/.vscode/tasks.json (100%) rename {smoketest => test/smoke}/CONTRIBUTING.md (100%) rename {smoketest => test/smoke}/README.md (100%) rename {smoketest => test/smoke}/package.json (100%) rename {smoketest => test/smoke}/scripts/run.ps1 (85%) rename {smoketest => test/smoke}/scripts/run.sh (100%) rename {smoketest => test/smoke}/src/areas/common.ts (100%) rename {smoketest => test/smoke}/src/areas/configuration-views.ts (100%) rename {smoketest => test/smoke}/src/areas/css.ts (100%) rename {smoketest => test/smoke}/src/areas/data-loss.ts (100%) rename {smoketest => test/smoke}/src/areas/extensions.ts (100%) rename {smoketest => test/smoke}/src/areas/first-experience.ts (100%) rename {smoketest => test/smoke}/src/areas/git.ts (100%) rename {smoketest => test/smoke}/src/areas/integrated-terminal.ts (100%) rename {smoketest => test/smoke}/src/areas/javascript-debug.ts (100%) rename {smoketest => test/smoke}/src/areas/javascript.ts (100%) rename {smoketest => test/smoke}/src/areas/localization.ts (100%) rename {smoketest => test/smoke}/src/areas/search.ts (100%) rename {smoketest => test/smoke}/src/areas/statusbar.ts (100%) rename {smoketest => test/smoke}/src/areas/tasks.ts (100%) rename {smoketest => test/smoke}/src/helpers/screenshot.ts (100%) rename {smoketest => test/smoke}/src/helpers/utilities.ts (100%) rename {smoketest => test/smoke}/src/main.ts (100%) rename {smoketest => test/smoke}/src/spectron/application.ts (100%) rename {smoketest => test/smoke}/src/spectron/client.ts (100%) rename {smoketest => test/smoke}/tsconfig.json (100%) diff --git a/smoketest/.gitignore b/test/smoke/.gitignore similarity index 100% rename from smoketest/.gitignore rename to test/smoke/.gitignore diff --git a/smoketest/.vscode/launch.json b/test/smoke/.vscode/launch.json similarity index 100% rename from smoketest/.vscode/launch.json rename to test/smoke/.vscode/launch.json diff --git a/smoketest/.vscode/tasks.json b/test/smoke/.vscode/tasks.json similarity index 100% rename from smoketest/.vscode/tasks.json rename to test/smoke/.vscode/tasks.json diff --git a/smoketest/CONTRIBUTING.md b/test/smoke/CONTRIBUTING.md similarity index 100% rename from smoketest/CONTRIBUTING.md rename to test/smoke/CONTRIBUTING.md diff --git a/smoketest/README.md b/test/smoke/README.md similarity index 100% rename from smoketest/README.md rename to test/smoke/README.md diff --git a/smoketest/package.json b/test/smoke/package.json similarity index 100% rename from smoketest/package.json rename to test/smoke/package.json diff --git a/smoketest/scripts/run.ps1 b/test/smoke/scripts/run.ps1 similarity index 85% rename from smoketest/scripts/run.ps1 rename to test/smoke/scripts/run.ps1 index d6368da689082..a7e29482a7814 100644 --- a/smoketest/scripts/run.ps1 +++ b/test/smoke/scripts/run.ps1 @@ -1,10 +1,9 @@ Param( [Parameter(Position=0,mandatory=$true)] - [string] $latest, - [Parameter(Position=1,mandatory=$false)] - [string] $stable + [string]$arch ) + # Setup sample repository for the smoke test Set-Location .. if (-Not (Test-Path vscode-smoketest-express)) { @@ -19,14 +18,14 @@ if (-Not (Test-Path vscode-smoketest-express)) { npm install # Setup the test directory for running -Set-Location ..\smoketest +Set-Location ..\smoke if (-Not (Test-Path node_modules)) { npm install } # Configure environment variables -$env:VSCODE_LATEST_PATH = $latest -$env:VSCODE_STABLE_PATH = $stable +$env:VSCODE_LATEST_PATH = "$Root\VSCode-win32-$arch" +# $env:VSCODE_STABLE_PATH = $stable $env:SMOKETEST_REPO = "..\vscode-smoketest-express" if ($latest.Contains('Insiders')) { diff --git a/smoketest/scripts/run.sh b/test/smoke/scripts/run.sh similarity index 100% rename from smoketest/scripts/run.sh rename to test/smoke/scripts/run.sh diff --git a/smoketest/src/areas/common.ts b/test/smoke/src/areas/common.ts similarity index 100% rename from smoketest/src/areas/common.ts rename to test/smoke/src/areas/common.ts diff --git a/smoketest/src/areas/configuration-views.ts b/test/smoke/src/areas/configuration-views.ts similarity index 100% rename from smoketest/src/areas/configuration-views.ts rename to test/smoke/src/areas/configuration-views.ts diff --git a/smoketest/src/areas/css.ts b/test/smoke/src/areas/css.ts similarity index 100% rename from smoketest/src/areas/css.ts rename to test/smoke/src/areas/css.ts diff --git a/smoketest/src/areas/data-loss.ts b/test/smoke/src/areas/data-loss.ts similarity index 100% rename from smoketest/src/areas/data-loss.ts rename to test/smoke/src/areas/data-loss.ts diff --git a/smoketest/src/areas/extensions.ts b/test/smoke/src/areas/extensions.ts similarity index 100% rename from smoketest/src/areas/extensions.ts rename to test/smoke/src/areas/extensions.ts diff --git a/smoketest/src/areas/first-experience.ts b/test/smoke/src/areas/first-experience.ts similarity index 100% rename from smoketest/src/areas/first-experience.ts rename to test/smoke/src/areas/first-experience.ts diff --git a/smoketest/src/areas/git.ts b/test/smoke/src/areas/git.ts similarity index 100% rename from smoketest/src/areas/git.ts rename to test/smoke/src/areas/git.ts diff --git a/smoketest/src/areas/integrated-terminal.ts b/test/smoke/src/areas/integrated-terminal.ts similarity index 100% rename from smoketest/src/areas/integrated-terminal.ts rename to test/smoke/src/areas/integrated-terminal.ts diff --git a/smoketest/src/areas/javascript-debug.ts b/test/smoke/src/areas/javascript-debug.ts similarity index 100% rename from smoketest/src/areas/javascript-debug.ts rename to test/smoke/src/areas/javascript-debug.ts diff --git a/smoketest/src/areas/javascript.ts b/test/smoke/src/areas/javascript.ts similarity index 100% rename from smoketest/src/areas/javascript.ts rename to test/smoke/src/areas/javascript.ts diff --git a/smoketest/src/areas/localization.ts b/test/smoke/src/areas/localization.ts similarity index 100% rename from smoketest/src/areas/localization.ts rename to test/smoke/src/areas/localization.ts diff --git a/smoketest/src/areas/search.ts b/test/smoke/src/areas/search.ts similarity index 100% rename from smoketest/src/areas/search.ts rename to test/smoke/src/areas/search.ts diff --git a/smoketest/src/areas/statusbar.ts b/test/smoke/src/areas/statusbar.ts similarity index 100% rename from smoketest/src/areas/statusbar.ts rename to test/smoke/src/areas/statusbar.ts diff --git a/smoketest/src/areas/tasks.ts b/test/smoke/src/areas/tasks.ts similarity index 100% rename from smoketest/src/areas/tasks.ts rename to test/smoke/src/areas/tasks.ts diff --git a/smoketest/src/helpers/screenshot.ts b/test/smoke/src/helpers/screenshot.ts similarity index 100% rename from smoketest/src/helpers/screenshot.ts rename to test/smoke/src/helpers/screenshot.ts diff --git a/smoketest/src/helpers/utilities.ts b/test/smoke/src/helpers/utilities.ts similarity index 100% rename from smoketest/src/helpers/utilities.ts rename to test/smoke/src/helpers/utilities.ts diff --git a/smoketest/src/main.ts b/test/smoke/src/main.ts similarity index 100% rename from smoketest/src/main.ts rename to test/smoke/src/main.ts diff --git a/smoketest/src/spectron/application.ts b/test/smoke/src/spectron/application.ts similarity index 100% rename from smoketest/src/spectron/application.ts rename to test/smoke/src/spectron/application.ts diff --git a/smoketest/src/spectron/client.ts b/test/smoke/src/spectron/client.ts similarity index 100% rename from smoketest/src/spectron/client.ts rename to test/smoke/src/spectron/client.ts diff --git a/smoketest/tsconfig.json b/test/smoke/tsconfig.json similarity index 100% rename from smoketest/tsconfig.json rename to test/smoke/tsconfig.json From 75621d237d1e1760015e82c8a74c1fce55108540 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 22 May 2017 16:04:33 +0200 Subject: [PATCH 1203/2747] Corrected path to binary. --- test/smoke/scripts/run.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/smoke/scripts/run.ps1 b/test/smoke/scripts/run.ps1 index a7e29482a7814..23da3827cbe3a 100644 --- a/test/smoke/scripts/run.ps1 +++ b/test/smoke/scripts/run.ps1 @@ -24,11 +24,11 @@ if (-Not (Test-Path node_modules)) { } # Configure environment variables -$env:VSCODE_LATEST_PATH = "$Root\VSCode-win32-$arch" +$env:VSCODE_LATEST_PATH = "$Root\VSCode-win32-$arch\Code - OSS.exe" # $env:VSCODE_STABLE_PATH = $stable $env:SMOKETEST_REPO = "..\vscode-smoketest-express" -if ($latest.Contains('Insiders')) { +if ($env:VSCODE_LATEST_PATH.Contains('Insiders')) { $env:VSCODE_EDITION = 'insiders' } From 29c5b3bbda4556f3a6c0f4bd98bb653c0c00656d Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 22 May 2017 16:08:39 +0200 Subject: [PATCH 1204/2747] Changed executable name. --- test/smoke/scripts/run.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/smoke/scripts/run.ps1 b/test/smoke/scripts/run.ps1 index 23da3827cbe3a..a2b8c04711317 100644 --- a/test/smoke/scripts/run.ps1 +++ b/test/smoke/scripts/run.ps1 @@ -24,7 +24,7 @@ if (-Not (Test-Path node_modules)) { } # Configure environment variables -$env:VSCODE_LATEST_PATH = "$Root\VSCode-win32-$arch\Code - OSS.exe" +$env:VSCODE_LATEST_PATH = "$Root\VSCode-win32-$arch\Code - Insiders.exe" # $env:VSCODE_STABLE_PATH = $stable $env:SMOKETEST_REPO = "..\vscode-smoketest-express" From c50481255f9878ed29684107759b0c1ba64d01b2 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 22 May 2017 16:52:50 +0200 Subject: [PATCH 1205/2747] Testing build definition. --- test/smoke/scripts/run.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/smoke/scripts/run.ps1 b/test/smoke/scripts/run.ps1 index a2b8c04711317..5883ce0dbe82e 100644 --- a/test/smoke/scripts/run.ps1 +++ b/test/smoke/scripts/run.ps1 @@ -17,6 +17,8 @@ if (-Not (Test-Path vscode-smoketest-express)) { } npm install +Write-Output "My path: " + $(pwd) + # Setup the test directory for running Set-Location ..\smoke if (-Not (Test-Path node_modules)) { @@ -24,7 +26,7 @@ if (-Not (Test-Path node_modules)) { } # Configure environment variables -$env:VSCODE_LATEST_PATH = "$Root\VSCode-win32-$arch\Code - Insiders.exe" +$env:VSCODE_LATEST_PATH = "$(pwd)\..\VSCode-win32-$arch\Code - Insiders.exe" # $env:VSCODE_STABLE_PATH = $stable $env:SMOKETEST_REPO = "..\vscode-smoketest-express" From 9b73f62ce3ab21195734262ca56875c66f726fdc Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 24 May 2017 16:36:35 +0200 Subject: [PATCH 1206/2747] Updated the way to run the smoke test. --- test/smoke/.vscode/launch.json | 2 +- test/smoke/CONTRIBUTING.md | 4 +- test/smoke/README.md | 4 +- test/smoke/package.json | 9 +- test/smoke/scripts/run.ps1 | 44 ------ test/smoke/scripts/run.sh | 43 ------ test/smoke/src/areas/common.ts | 12 +- test/smoke/src/areas/css.ts | 4 +- test/smoke/src/areas/data-loss.ts | 2 +- test/smoke/src/areas/extensions.ts | 2 +- test/smoke/src/areas/first-experience.ts | 2 +- test/smoke/src/areas/integrated-terminal.ts | 1 + test/smoke/src/areas/javascript-debug.ts | 2 +- test/smoke/src/areas/statusbar.ts | 6 +- test/smoke/src/areas/tasks.ts | 3 +- test/smoke/src/main.js | 163 ++++++++++++++++++++ test/smoke/src/mocha-runner.js | 21 +++ test/smoke/src/spectron/application.ts | 13 +- test/smoke/src/spectron/client.ts | 2 +- test/smoke/src/{main.ts => tests.ts} | 96 ++++++------ test/smoke/tsconfig.json | 2 +- vscode-smoketest-express | 1 - 22 files changed, 272 insertions(+), 166 deletions(-) delete mode 100644 test/smoke/scripts/run.ps1 delete mode 100644 test/smoke/scripts/run.sh create mode 100644 test/smoke/src/main.js create mode 100644 test/smoke/src/mocha-runner.js rename test/smoke/src/{main.ts => tests.ts} (93%) delete mode 160000 vscode-smoketest-express diff --git a/test/smoke/.vscode/launch.json b/test/smoke/.vscode/launch.json index 2de33bbb20ba1..25b4e7e4c0ed7 100644 --- a/test/smoke/.vscode/launch.json +++ b/test/smoke/.vscode/launch.json @@ -15,7 +15,7 @@ "--timeout", "999999", "--colors", - "${workspaceRoot}/out/main.js" + "${workspaceRoot}/out/tests.js" ], "outFiles": [ "${workspaceRoot}/out/**/*.js" ], "internalConsoleOptions": "openOnSessionStart", diff --git a/test/smoke/CONTRIBUTING.md b/test/smoke/CONTRIBUTING.md index c15016dc1ad68..8aaef8a7875ee 100644 --- a/test/smoke/CONTRIBUTING.md +++ b/test/smoke/CONTRIBUTING.md @@ -1,5 +1,7 @@ # Architecture -* `main.ts` contains the main smoke test suite. It includes all tests separated into mocha `describe()` groups that represent each of the areas of [Smoke Test document](https://github.com/Microsoft/vscode/wiki/Smoke-Test). +* `main.js` is used to prepare all smoke test dependencies (fetching key bindings and 'Express' repository, running `npm install` there). +* `mocha-runner.js` launches Mocha programmatically. It is spawned in Node environment from main.js to ensure that it is possible to listen on `stderr`s (primary `process.stderr` is not readable otherwise). This is accomplished because WebDriverIO command deprecation warnings need to be redirected to a separate log. Those warnings are coming from WebDriverIO because ChromeDriver has not migrated from JsonWire to W3C WebDriver protocol. +* `tests.ts` contains the main smoke test suite. It includes all tests separated into mocha `describe()` groups that represent each of the areas of [Smoke Test document](https://github.com/Microsoft/vscode/wiki/Smoke-Test). * `./areas/` folder contains a `.ts` file per each area of the document. E.g. `'Search'` area goes under `'search.ts'`. Every area file contains a list of methods with the name that represents the action that can be performed in the corresponding test. This reduces the amount of test suite code and means that if the UI changes, the fix need only be applied in one place. The name of the method reflects the action the tester would do if he would perform the test manually. See [Selenium Page Objects Wiki](https://github.com/SeleniumHQ/selenium/wiki/PageObjects) and [Selenium Bot Style Tests Wiki](https://github.com/SeleniumHQ/selenium/wiki/Bot-Style-Tests) for a good explanation of the implementation. Every smoke test area contains methods that are used in a bot-style approach in `main.ts`. * `./spectron/` wraps the Spectron, with WebDriverIO API wrapped in `client.ts` and instance of Spectron Application is wrapped in `application.ts`. diff --git a/test/smoke/README.md b/test/smoke/README.md index 318ddb0751725..501ec51f087d6 100644 --- a/test/smoke/README.md +++ b/test/smoke/README.md @@ -1,9 +1,9 @@ # VS Code Smoke Testing This repository contains the smoke test automation code with Spectron for Visual Studio Code. -The following command is used to run the tests: `.\scripts\run.ps1 -latest "path\to\Code.exe"` on Windows (from PowerShell) and `./scripts/run.sh path/to/binary` on Unix system. +The following command is used to run the tests: `npm test -- --latest "path/to/binary"`. -If you want to include 'Data Migration' area tests use `.\scripts\run.ps1 -latest "path\to\Code.exe" -stable "path\to\CurrentStable.exe"` and `./scripts/run.sh path/to/binary path/to/currentStable` respectively. +If you want to include 'Data Migration' area tests use `npm test -- --latest path/to/binary --stable path/to/currentStable` respectively. # Contributing diff --git a/test/smoke/package.json b/test/smoke/package.json index a5c3a78273bf3..4f637a5adf7e1 100644 --- a/test/smoke/package.json +++ b/test/smoke/package.json @@ -1,9 +1,10 @@ { "name": "code-oss-dev-smoke-test", "version": "0.1.0", - "main": "./out/main.js", + "main": "./src/main.js", "scripts": { - "test": "mocha -u tdd --timeout 360000 --retries 2 --slow 50000 --colors ./out/main.js 2> test_data/errors.log" + "pretest": "tsc", + "test": "node src/main.js" }, "devDependencies": { "@types/mocha": "^2.2.41", @@ -14,6 +15,8 @@ "mocha": "^3.2.0", "spectron": "^3.6.4", "typescript": "^2.2.2", - "rimraf": "^2.6.1" + "rimraf": "^2.6.1", + "commander": "^2.9.0", + "simple-git": "^1.73.0" } } diff --git a/test/smoke/scripts/run.ps1 b/test/smoke/scripts/run.ps1 deleted file mode 100644 index 5883ce0dbe82e..0000000000000 --- a/test/smoke/scripts/run.ps1 +++ /dev/null @@ -1,44 +0,0 @@ -Param( - [Parameter(Position=0,mandatory=$true)] - [string]$arch -) - - -# Setup sample repository for the smoke test -Set-Location .. -if (-Not (Test-Path vscode-smoketest-express)) { - git clone https://github.com/Microsoft/vscode-smoketest-express.git - Set-Location ./vscode-smoketest-express -} else { - Set-Location ./vscode-smoketest-express - git fetch origin master - git reset --hard FETCH_HEAD - git clean -fd -} -npm install - -Write-Output "My path: " + $(pwd) - -# Setup the test directory for running -Set-Location ..\smoke -if (-Not (Test-Path node_modules)) { - npm install -} - -# Configure environment variables -$env:VSCODE_LATEST_PATH = "$(pwd)\..\VSCode-win32-$arch\Code - Insiders.exe" -# $env:VSCODE_STABLE_PATH = $stable -$env:SMOKETEST_REPO = "..\vscode-smoketest-express" - -if ($env:VSCODE_LATEST_PATH.Contains('Insiders')) { - $env:VSCODE_EDITION = 'insiders' -} - -# Retrieve key bindings config file for Windows -$testDirectory = (Resolve-Path .\).Path -$client = New-Object System.Net.WebClient -$client.DownloadFile("https://raw.githubusercontent.com/Microsoft/vscode-docs/master/scripts/keybindings/doc.keybindings.win.json","$testDirectory\test_data\keybindings.win32.json") - -# Compile and launch the smoke test -tsc -npm test \ No newline at end of file diff --git a/test/smoke/scripts/run.sh b/test/smoke/scripts/run.sh deleted file mode 100644 index fc103a5553954..0000000000000 --- a/test/smoke/scripts/run.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bash -if [[ "$#" -ne 1 ]]; then - echo "Usage: ./scripts/run.sh path/to/binary" - echo "To perform data migration tests, use: ./scripts/run.sh path/to/latest_binary path/to/stable_binary" - exit 1 -fi - -# Cloning sample repository for the smoke test -cd .. -if ! [ -d vscode-smoketest-express ]; then - git clone https://github.com/Microsoft/vscode-smoketest-express.git - cd vscode-smoketest-express -else - cd vscode-smoketest-express - git fetch origin master - git reset --hard FETCH_HEAD - git clean -fd -fi -npm install - -# Install Node modules for Spectron -cd ../vscode-smoketest -test -d node_modules || npm install - -# Configuration -export VSCODE_LATEST_PATH="$1" -export VSCODE_STABLE_PATH="$2" -export SMOKETEST_REPO="../vscode-smoketest-express" -mkdir -p test_data - -if [[ $1 == *"Insiders"* || $1 == *"insiders"* ]]; then - export VSCODE_EDITION="insiders" -fi - -if [[ "$OSTYPE" == "darwin"* ]]; then - curl "https://raw.githubusercontent.com/Microsoft/vscode-docs/master/scripts/keybindings/doc.keybindings.osx.json" -o "test_data/keybindings.darwin.json" # Download OS X keybindings -else - wget https://raw.githubusercontent.com/Microsoft/vscode-docs/master/scripts/keybindings/doc.keybindings.linux.json -O test_data/keybindings.linux.json # Download Linux keybindings -fi - -# Compile and launch the smoke test -tsc -exec npm test diff --git a/test/smoke/src/areas/common.ts b/test/smoke/src/areas/common.ts index c955c206eea22..33127905ec65b 100644 --- a/test/smoke/src/areas/common.ts +++ b/test/smoke/src/areas/common.ts @@ -19,7 +19,7 @@ export class CommonActions { public async getWindowTitle(): Promise { return this.spectron.client.getTitle(); } - + public enter(): Promise { return this.spectron.client.keys(['Enter', 'NULL']); } @@ -34,7 +34,7 @@ export class CommonActions { await this.spectron.wait(); return this.saveOpenedFile(); } - + public async newUntitledFile(): Promise { await this.spectron.command('workbench.action.files.newUntitledFile'); return this.spectron.wait(); @@ -50,7 +50,7 @@ export class CommonActions { if (el.status === 0) { return el; } - + return undefined; } @@ -118,7 +118,7 @@ export class CommonActions { selector += ' explorer-item'; } selector += '"]'; - + await this.spectron.waitFor(this.spectron.client.doubleClick, selector); return this.spectron.wait(); } @@ -132,7 +132,7 @@ export class CommonActions { } else if (extension === 'md') { return 'md-ext-file-icon markdown-lang-file-icon'; } - + throw new Error('No class defined for this file extension'); } @@ -142,7 +142,7 @@ export class CommonActions { if (Array.isArray(span)) { return span[0]; } - + return span; } catch (e) { return undefined; diff --git a/test/smoke/src/areas/css.ts b/test/smoke/src/areas/css.ts index 3388ab4e465ff..d2cbd62b0a89b 100644 --- a/test/smoke/src/areas/css.ts +++ b/test/smoke/src/areas/css.ts @@ -11,7 +11,7 @@ export enum CSSProblem { }; export class CSS { - + constructor(private spectron: SpectronApplication) { // noop } @@ -56,7 +56,7 @@ export class CSS { if (el.status === 0) { return el; } - + return undefined; } } \ No newline at end of file diff --git a/test/smoke/src/areas/data-loss.ts b/test/smoke/src/areas/data-loss.ts index dc1ecf93730e4..5988ce6f7f88f 100644 --- a/test/smoke/src/areas/data-loss.ts +++ b/test/smoke/src/areas/data-loss.ts @@ -20,7 +20,7 @@ export class DataLoss { if (el.status === 0) { return el; } - + return undefined; } } \ No newline at end of file diff --git a/test/smoke/src/areas/extensions.ts b/test/smoke/src/areas/extensions.ts index 4edec9d06ef87..bc4e2743e4402 100644 --- a/test/smoke/src/areas/extensions.ts +++ b/test/smoke/src/areas/extensions.ts @@ -7,7 +7,7 @@ import { SpectronApplication } from '../spectron/application'; import { CommonActions } from "./common"; export class Extensions { - + private readonly extensionsViewletSelector = 'div[id="workbench.view.extensions"]'; constructor(private spectron: SpectronApplication, private common: CommonActions) { diff --git a/test/smoke/src/areas/first-experience.ts b/test/smoke/src/areas/first-experience.ts index e9141bda899aa..2d6e9c30eaaf3 100644 --- a/test/smoke/src/areas/first-experience.ts +++ b/test/smoke/src/areas/first-experience.ts @@ -15,7 +15,7 @@ export class FirstExperience { if (el.status === 0) { return el; } - + return undefined; } } \ No newline at end of file diff --git a/test/smoke/src/areas/integrated-terminal.ts b/test/smoke/src/areas/integrated-terminal.ts index b066db8adf718..c41f2946d4d88 100644 --- a/test/smoke/src/areas/integrated-terminal.ts +++ b/test/smoke/src/areas/integrated-terminal.ts @@ -25,6 +25,7 @@ export class IntegratedTerminal { public async getCommandOutput(command: string): Promise { const selector = 'div[id="workbench.panel.terminal"] .xterm-rows'; + // Default Powershell terminal adds 3 header rows at the top, whereas bash does not. let readRow = process.platform === 'win32' ? 5 : 2; let output: string = await this.spectron.client.getText(`${selector}>:nth-child(${readRow})`); diff --git a/test/smoke/src/areas/javascript-debug.ts b/test/smoke/src/areas/javascript-debug.ts index 948594945d7a4..ff39a985d6659 100644 --- a/test/smoke/src/areas/javascript-debug.ts +++ b/test/smoke/src/areas/javascript-debug.ts @@ -36,7 +36,7 @@ export class JavaScriptDebug { if (el.status === 0) { return el; } - + return undefined; } } \ No newline at end of file diff --git a/test/smoke/src/areas/statusbar.ts b/test/smoke/src/areas/statusbar.ts index 93b7349518355..8e330c8e12171 100644 --- a/test/smoke/src/areas/statusbar.ts +++ b/test/smoke/src/areas/statusbar.ts @@ -49,7 +49,7 @@ export class StatusBar { if (el.status === 0) { return el; } - + return undefined; } @@ -58,7 +58,7 @@ export class StatusBar { if (el.status === 0) { return el; } - + return undefined; } @@ -71,7 +71,7 @@ export class StatusBar { if (el.status === 0) { return el; } - + return undefined; } diff --git a/test/smoke/src/areas/tasks.ts b/test/smoke/src/areas/tasks.ts index e46c2961df585..d83cc173efa1f 100644 --- a/test/smoke/src/areas/tasks.ts +++ b/test/smoke/src/areas/tasks.ts @@ -25,6 +25,7 @@ export class Tasks { public async firstOutputLineEndsWith(fileName: string): Promise { const firstLine = await this.spectron.waitFor(this.spectron.client.getText, `${this.outputViewSelector}>:nth-child(2)`); + return firstLine.endsWith(fileName); } @@ -40,7 +41,7 @@ export class Tasks { return this.spectron.client.getValue(`${this.workbenchPanelSelector} .select-box`); } - public getProblemsViewFirstElementName(): Promise { + public getProblemsViewFirstElementName(): Promise { return this.spectron.waitFor(this.spectron.client.getText, `${this.problemsViewSelector} .label-name`); } diff --git a/test/smoke/src/main.js b/test/smoke/src/main.js new file mode 100644 index 0000000000000..8df41b5c73cfb --- /dev/null +++ b/test/smoke/src/main.js @@ -0,0 +1,163 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +var fs = require('fs'); +var https = require('https'); +var program = require('commander'); +var git = require('simple-git')(); +var child_process = require('child_process'); +var path = require('path'); + +var tempFolder = `test_data`; +var testRepoUrl = 'https://github.com/Microsoft/vscode-smoketest-express'; +var testRepoLocalDir = path.join(process.cwd(), `${tempFolder}/vscode-smoketest-express`); +var keybindingsUrl = 'https://raw.githubusercontent.com/Microsoft/vscode-docs/master/scripts/keybindings'; + +program + .option('-l, --latest ', 'path to the latest VS Code to test') + .option('-s, --stable [file path]', 'path to the stable VS Code to be used in data migration tests'); + +program.on('--help', () => { + console.log(' Examples:'); + console.log(''); + console.log(' $ npm test -- --latest path/to/binary'); + console.log(' $ npm test -- -l path/to/binary'); + console.log(''); + console.log(' $ npm test -- --latest path/to/latest/binary --stable path/to/stable/binary'); + console.log(' $ npm test -- -l path/to/latest/binary -s path/to/stable/binary'); + console.log(''); +}); +program.parse(process.argv); + +if (!program.latest) { + console.error('You must specify the binary to run the smoke test against'); + process.exit(1); +} +if (!binaryExists(program.latest) || (program.stable && !binaryExists(program.stable))) { + console.error('The file path to electron binary does not exist or permissions do not allow to execute it. Please check the path provided.'); + process.exit(1); +} + +// Setting up environment variables +process.env['VSCODE_LATEST_PATH'] = program.latest; +if (program.stable) process.env['VSCODE_STABLE_PATH'] = program.stable; +process.env['SMOKETEST_REPO'] = testRepoLocalDir; +if (program.stable && program.stable.toLowerCase().startsWith('insiders')) process.env['VSCODE_EDITION'] = 'insiders'; + +// Setting up 'vscode-smoketest-express' project +var os = process.platform; +if (os === 'darwin') os = 'osx'; +else if (os === 'win32') os = 'win'; +var promises = []; + +try { + // promises.push(execute('npm install'), process.cwd()); + promises.push(getKeybindings(`${keybindingsUrl}/doc.keybindings.${os}.json`, `${tempFolder}/keybindings.json`)); + promises.push(cleanOrClone(testRepoUrl, testRepoLocalDir)); + + Promise.all(promises).then(() => { execute('npm install', testRepoLocalDir).then(() => runTests()); }); +} catch (e) { + throw new Error('Error caught running the smoke test: ' + e); +} + + +function runTests() { + console.log('Running tests...') + const spawn = require('child_process').spawn; + var proc = spawn(process.execPath, [ + 'src/mocha-runner.js' + ]); + proc.stdout.on('data', data => { + console.log(data.toString()); + }); + proc.stderr.on('data', data => { + var date = new Date().toLocaleString(); + fs.appendFile(`${tempFolder}/errors.log`, `${date}: ${data.toString()}`, (err) => { + if (err) throw new Error(`Could not write stderr to errors.log with the following error: ${err}`); + }); + }); +} + +function cleanOrClone(repo, dir) { + console.log('Cleaning or cloning test project repository...'); + return new Promise((res, rej) => { + if (!folderExists(dir)) { + git.clone(repo, dir, () => { + console.log('Test repository successfully cloned.'); + res(); + }); + } else { + git.cwd(dir); + git.fetch((err) => { + if (err) rej(err); + resetAndClean(); + }); + } + + var resetAndClean = () => { + git.reset(['FETCH_HEAD', '--hard'], (err) => { + if (err) rej(err); + + git.clean('f', ['-d'], (err) => { + if (err) rej(err); + console.log('Test project was successfully reset to initial state.'); + res(); + }); + }); + } + }); +} + +function execute(cmd, dir) { + return new Promise((res, rej) => { + console.log(`Running ${cmd}...`); + var output = child_process.exec(cmd, { cwd: dir, stdio: [0, 1, 2] }, (error, stdout, stderr) => { + if (error) rej(error); + if (stderr) console.error(stderr); + console.log(stdout); + res(); + }); + }); +} + +function getKeybindings(url, location) { + console.log(`Fetching keybindings from ${url}...`); + return new Promise((resolve, reject) => { + https.get(url, (res) => { + if (res.statusCode != 200) { + reject(`Failed to obtain key bindings with response code: ${res.statusCode}`); + } + + var buffer = []; + res.on('data', (chunk) => buffer.push(chunk)); + res.on('end', () => { + fs.writeFile(location, Buffer.concat(buffer), 'utf8', () => { + console.log('Keybindings were successfully fetched.'); + resolve(); + }); + }); + }).on('error', (e) => { + reject(`Failed to obtain key bindings with an error: ${e}`); + }); + }); +} + +function folderExists(folder) { + try { + fs.accessSync(folder, 'rw'); + return true; + } catch (e) { + return false; + } +} + +function binaryExists(filePath) { + try { + fs.accessSync(filePath, 'x'); + return true; + } catch (e) { + return false; + } +} \ No newline at end of file diff --git a/test/smoke/src/mocha-runner.js b/test/smoke/src/mocha-runner.js new file mode 100644 index 0000000000000..2a08adca647c7 --- /dev/null +++ b/test/smoke/src/mocha-runner.js @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +var Mocha = require('mocha'); +var path = require('path'); + +var mocha = new Mocha({ + timeout: 360000, + retries: 2, + slow: 50000, + useColors: true +}); + +mocha.addFile(path.join(process.cwd(), 'out/tests.js')); +mocha.run((failures) => { + process.on('exit', () => { + process.exit(failures); + }); +}); \ No newline at end of file diff --git a/test/smoke/src/spectron/application.ts b/test/smoke/src/spectron/application.ts index 5e45474768c8f..d1027a1ef7009 100644 --- a/test/smoke/src/spectron/application.ts +++ b/test/smoke/src/spectron/application.ts @@ -7,6 +7,7 @@ import { Application } from 'spectron'; import { SpectronClient } from './client'; import { Screenshot } from "../helpers/screenshot"; var fs = require('fs'); +var path = require('path'); /** * Wraps Spectron's Application instance with its used methods. @@ -16,7 +17,7 @@ export class SpectronApplication { private spectron: Application; private readonly pollTrials = 5; - private readonly pollTimeout = 3; // in secs + private readonly pollTimeout = 3; // in secs private keybindings: any[]; private screenshot: Screenshot; @@ -73,13 +74,15 @@ export class SpectronApplication { } private retrieveKeybindings() { - const os = process.platform; - fs.readFile(`test_data/keybindings.${os}.json`, (err, data) => { + fs.readFile(path.join(process.cwd(), `test_data/keybindings.json`), 'utf8', (err, data) => { if (err) { throw err; } - - this.keybindings = JSON.parse(data); + try { + this.keybindings = JSON.parse(data); + } catch (e) { + throw new Error(`Error parsing keybindings JSON: ${e}`); + } }); } diff --git a/test/smoke/src/spectron/client.ts b/test/smoke/src/spectron/client.ts index 9376bd3e10044..6a9003199dcca 100644 --- a/test/smoke/src/spectron/client.ts +++ b/test/smoke/src/spectron/client.ts @@ -7,7 +7,7 @@ import { Application } from 'spectron'; import { Screenshot } from '../helpers/screenshot'; /** - * Abstracts the Spectron's WebdriverIO managed client property on the created Application instances. + * Abstracts the Spectron's WebdriverIO managed client property on the created Application instances. */ export class SpectronClient { diff --git a/test/smoke/src/main.ts b/test/smoke/src/tests.ts similarity index 93% rename from test/smoke/src/main.ts rename to test/smoke/src/tests.ts index 9da55ce546aa7..35d6d1f79ac40 100644 --- a/test/smoke/src/main.ts +++ b/test/smoke/src/tests.ts @@ -6,7 +6,7 @@ import * as assert from 'assert'; import { SpectronApplication } from "./spectron/application"; import { CommonActions } from './areas/common'; -import { FirstExperience } from './areas/first-experience'; +// import { FirstExperience } from './areas/first-experience'; import { ConfigurationView, ActivityBarPosition } from './areas/configuration-views'; import { Search } from './areas/search'; import { CSS, CSSProblem } from './areas/css'; @@ -23,14 +23,13 @@ import { Localization, ViewletType } from "./areas/localization"; describe('Smoke Test Suite', function () { const latestPath = process.env.VSCODE_LATEST_PATH; const stablePath = process.env.VSCODE_STABLE_PATH; - const insiders = process.env.VSCODE_EDITION; + // const insiders = process.env.VSCODE_EDITION; const workspacePath = process.env.SMOKETEST_REPO; const tempUserDir = 'test_data/temp_user_dir'; const tempExtensionsDir = 'test_data/temp_extensions_dir'; let app: SpectronApplication; let common: CommonActions; - this.retries(2); if (stablePath) { context('Data Migration', function () { @@ -176,37 +175,38 @@ describe('Smoke Test Suite', function () { }); }); - context('First User Experience', function () { - let experience: FirstExperience; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), undefined, [`--user-data-dir=${tempUserDir}`, `--excludeSwitches=load-component-extension`]); - common = new CommonActions(app); - experience = new FirstExperience(app); - - await common.removeDirectory(tempUserDir); - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it(`verifies if title is set correctly on the clean user-directory startup`, async function () { - const title = await common.getWindowTitle(); - - let expectedTitle = 'Welcome'; - if (process.platform !== 'darwin') { - expectedTitle += ' — Visual Studio Code'; - if (insiders) expectedTitle += ' - Insiders'; - } - - assert.equal(title, expectedTitle); - }); - - it(`verifies if 'Welcome page' tab is presented on the clean user-directory startup`, async function () { - assert.ok(await experience.getWelcomeTab()); - }); - }); + // Do not run until experiments are finished over the first-time startup behaviour. + // context('First User Experience', function () { + // let experience: FirstExperience; + + // beforeEach(async function () { + // app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), undefined, [`--user-data-dir=${tempUserDir}`, `--excludeSwitches=load-component-extension`]); + // common = new CommonActions(app); + // experience = new FirstExperience(app); + + // await common.removeDirectory(tempUserDir); + // return await app.start(); + // }); + // afterEach(async function () { + // return await app.stop(); + // }); + + // it(`verifies if title is set correctly on the clean user-directory startup`, async function () { + // const title = await common.getWindowTitle(); + + // let expectedTitle = 'Welcome'; + // if (process.platform !== 'darwin') { + // expectedTitle += ' — Visual Studio Code'; + // if (insiders) expectedTitle += ' - Insiders'; + // } + + // assert.equal(title, expectedTitle); + // }); + + // it(`verifies if 'Welcome page' tab is presented on the clean user-directory startup`, async function () { + // assert.ok(await experience.getWelcomeTab()); + // }); + // }); context('Explorer', function () { beforeEach(async function () { @@ -557,7 +557,6 @@ describe('Smoke Test Suite', function () { await common.type(command); await common.enter(); await app.wait(); - // Default Powershell terminal adds 3 header rows at the top, whereas bash does not. let output = await terminal.getCommandOutput(command); assert.equal(output, 'test'); }); @@ -660,7 +659,7 @@ describe('Smoke Test Suite', function () { const res = await tasks.getOutputResult(); assert.equal(res, '✖ 6 problems (6 errors, 0 warnings)'); }); - + it(`is able to select 'Git' output`, async function () { await tasks.build(); await app.wait(); @@ -674,7 +673,7 @@ describe('Smoke Test Suite', function () { assert.ok(await tasks.firstOutputLineEndsWith('index.js')); }); - it(`verifies build errors are reflected in 'Problems View'`, async function () { + it(`verifies build errors are reflected in 'Problems View'`, async function () { await tasks.build(); await app.wait(); await tasks.openProblemsView(); @@ -717,9 +716,9 @@ describe('Smoke Test Suite', function () { await extensions.installFirstResult(); await app.wait(); await extensions.getFirstReloadText(); - + await app.stop(); - await app.wait(); // wait until all resources are released (e.g. locked local storage) + await app.wait(); // wait until all resources are released (e.g. locked local storage) await app.start(); await extensions.selectMinimalIconsTheme(); const x = await extensions.verifyFolderIconAppearance(); @@ -739,13 +738,14 @@ describe('Smoke Test Suite', function () { common.removeDirectory(tempUserDir); await app.start(); - - let expectedTitle = 'Willkommen — vscode-smoketest-express'; - if (process.platform !== 'darwin') { - expectedTitle += ' — Visual Studio Code'; - if (insiders) expectedTitle += ' - Insiders'; - } - assert.equal(await common.getWindowTitle(), expectedTitle); + + // Do not run until experiments are finished over the first-time startup behaviour. + // let expectedTitle = 'Willkommen — vscode-smoketest-express'; + // if (process.platform !== 'darwin') { + // expectedTitle += ' — Visual Studio Code'; + // if (insiders) expectedTitle += ' - Insiders'; + // } + // assert.equal(await common.getWindowTitle(), expectedTitle); let text = await locale.getOpenEditorsText(); assert.equal(text.toLowerCase(), 'geöffnete editoren'); @@ -764,8 +764,8 @@ describe('Smoke Test Suite', function () { await locale.openViewlet(ViewletType.EXTENSIONS); text = await locale.getExtensionsSearchPlaceholder(); - assert.equal(text.toLowerCase(), 'nach extensions in marketplace suchen'); + assert.equal(text.toLowerCase(), 'nach erweiterungen im marketplace suchen'); }); }); - + }); \ No newline at end of file diff --git a/test/smoke/tsconfig.json b/test/smoke/tsconfig.json index 1b0b03c2d672b..733c1107e8353 100644 --- a/test/smoke/tsconfig.json +++ b/test/smoke/tsconfig.json @@ -18,4 +18,4 @@ "exclude": [ "node_modules" ] -} \ No newline at end of file +} diff --git a/vscode-smoketest-express b/vscode-smoketest-express deleted file mode 160000 index 636dd7a2ff71d..0000000000000 --- a/vscode-smoketest-express +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 636dd7a2ff71d266c0e015411b47cf5c3a25be5a From c925cfb72ce64af9856e447ef8559e7d928963cb Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 24 May 2017 17:37:22 +0200 Subject: [PATCH 1207/2747] Modularised tests. --- test/smoke/src/mocha-runner.js | 1 + test/smoke/src/spectron/application.ts | 8 +- test/smoke/src/tests.ts | 791 +------------------- test/smoke/src/tests/configuration-views.ts | 57 ++ test/smoke/src/tests/css.ts | 61 ++ test/smoke/src/tests/data-loss.ts | 76 ++ test/smoke/src/tests/data-migration.ts | 98 +++ test/smoke/src/tests/explorer.ts | 42 ++ test/smoke/src/tests/extensions.ts | 57 ++ test/smoke/src/tests/git.ts | 69 ++ test/smoke/src/tests/integrated-terminal.ts | 41 + test/smoke/src/tests/javascript-debug.ts | 44 ++ test/smoke/src/tests/javascript.ts | 86 +++ test/smoke/src/tests/localization.ts | 49 ++ test/smoke/src/tests/search.ts | 73 ++ test/smoke/src/tests/statusbar.ts | 94 +++ test/smoke/src/tests/tasks.ts | 56 ++ 17 files changed, 939 insertions(+), 764 deletions(-) create mode 100644 test/smoke/src/tests/configuration-views.ts create mode 100644 test/smoke/src/tests/css.ts create mode 100644 test/smoke/src/tests/data-loss.ts create mode 100644 test/smoke/src/tests/data-migration.ts create mode 100644 test/smoke/src/tests/explorer.ts create mode 100644 test/smoke/src/tests/extensions.ts create mode 100644 test/smoke/src/tests/git.ts create mode 100644 test/smoke/src/tests/integrated-terminal.ts create mode 100644 test/smoke/src/tests/javascript-debug.ts create mode 100644 test/smoke/src/tests/javascript.ts create mode 100644 test/smoke/src/tests/localization.ts create mode 100644 test/smoke/src/tests/search.ts create mode 100644 test/smoke/src/tests/statusbar.ts create mode 100644 test/smoke/src/tests/tasks.ts diff --git a/test/smoke/src/mocha-runner.js b/test/smoke/src/mocha-runner.js index 2a08adca647c7..8ea1dd905aa1e 100644 --- a/test/smoke/src/mocha-runner.js +++ b/test/smoke/src/mocha-runner.js @@ -5,6 +5,7 @@ var Mocha = require('mocha'); var path = require('path'); +var fs = require('fs'); var mocha = new Mocha({ timeout: 360000, diff --git a/test/smoke/src/spectron/application.ts b/test/smoke/src/spectron/application.ts index d1027a1ef7009..0c8896bcc8d7a 100644 --- a/test/smoke/src/spectron/application.ts +++ b/test/smoke/src/spectron/application.ts @@ -9,6 +9,12 @@ import { Screenshot } from "../helpers/screenshot"; var fs = require('fs'); var path = require('path'); +export const LATEST_PATH = process.env.VSCODE_LATEST_PATH; +export const STABLE_PATH = process.env.VSCODE_STABLE_PATH; +export const WORKSPACE_PATH = process.env.SMOKETEST_REPO; +export const USER_DIR = 'test_data/temp_user_dir'; +export const EXTENSIONS_DIR = 'test_data/temp_extensions_dir'; + /** * Wraps Spectron's Application instance with its used methods. */ @@ -17,7 +23,7 @@ export class SpectronApplication { private spectron: Application; private readonly pollTrials = 5; - private readonly pollTimeout = 3; // in secs + private readonly pollTimeout = 3; // in secs private keybindings: any[]; private screenshot: Screenshot; diff --git a/test/smoke/src/tests.ts b/test/smoke/src/tests.ts index 35d6d1f79ac40..17ca694e20936 100644 --- a/test/smoke/src/tests.ts +++ b/test/smoke/src/tests.ts @@ -3,769 +3,34 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as assert from 'assert'; -import { SpectronApplication } from "./spectron/application"; -import { CommonActions } from './areas/common'; -// import { FirstExperience } from './areas/first-experience'; -import { ConfigurationView, ActivityBarPosition } from './areas/configuration-views'; -import { Search } from './areas/search'; -import { CSS, CSSProblem } from './areas/css'; -import { JavaScript } from './areas/javascript'; -import { JavaScriptDebug } from './areas/javascript-debug'; -import { Git } from './areas/git'; -import { IntegratedTerminal } from './areas/integrated-terminal'; -import { StatusBar, StatusBarElement } from './areas/statusBar'; -import { DataLoss } from './areas/data-loss'; -import { Tasks } from './areas/tasks'; -import { Extensions } from './areas/extensions'; -import { Localization, ViewletType } from "./areas/localization"; +import { dataLoss } from "./tests/data-loss"; +import { dataMigration } from "./tests/data-migration"; +import { explorer } from "./tests/explorer"; +import { configurationViews } from "./tests/configuration-views"; +import { search } from "./tests/search"; +import { css } from "./tests/css"; +import { javascript } from "./tests/javascript"; +import { javascriptDebug } from "./tests/javascript-debug"; +import { test_git } from "./tests/git"; +import { integratedTerminal } from "./tests/integrated-terminal"; +import { statusBar } from "./tests/statusbar"; +import { tasks } from "./tests/tasks"; +import { extensions } from "./tests/extensions"; +import { localization } from "./tests/localization"; describe('Smoke Test Suite', function () { - const latestPath = process.env.VSCODE_LATEST_PATH; - const stablePath = process.env.VSCODE_STABLE_PATH; - // const insiders = process.env.VSCODE_EDITION; - const workspacePath = process.env.SMOKETEST_REPO; - const tempUserDir = 'test_data/temp_user_dir'; - const tempExtensionsDir = 'test_data/temp_extensions_dir'; - - let app: SpectronApplication; - let common: CommonActions; - - if (stablePath) { - context('Data Migration', function () { - - afterEach(async function () { - await app.stop(); - return await common.removeDirectory(tempUserDir) - }); - - function setupSpectron(context: Mocha.ITestCallbackContext, appPath: string, workspace?: string[]): void { - app = new SpectronApplication(appPath, context.test.fullTitle(), context.test.currentRetry(), workspace, [`--user-data-dir=${tempUserDir}`]); - common = new CommonActions(app); - } - - it('checks if the Untitled file is restored migrating from stable to latest', async function () { - const textToType = 'Very dirty file'; - - // Setting up stable version - setupSpectron(this, stablePath); - await app.start(); - - await common.newUntitledFile(); - await common.type(textToType); - await app.stop(); - - await app.wait(); // wait until all resources are released (e.g. locked local storage) - - // Checking latest version for the restored state - setupSpectron(this, latestPath); - await app.start(); - - assert.ok(await common.getTab('Untitled-1')); - await common.selectTab('Untitled-1'); - const editorText = await common.getEditorFirstLinePlainText(); - assert.equal(editorText, textToType); - }); - - it('checks if the newly created dirty file is restored migrating from stable to latest', async function () { - const fileName = 'test_data/plainFile', - firstTextPart = 'This is going to be an unsaved file', secondTextPart = '_that is dirty.'; - - // Setting up stable version - setupSpectron(this, stablePath, [fileName]); - await common.removeFile(`${fileName}`); - await app.start(); - - await common.type(firstTextPart); - await common.saveOpenedFile(); - await app.wait(); - await common.type(secondTextPart); - - await app.stop(); - await app.wait(); // wait until all resources are released (e.g. locked local storage) - - // Checking latest version for the restored state - setupSpectron(this, latestPath); - await app.start(); - assert.ok(await common.getTab(fileName.split('/')[1])); - await common.selectTab(fileName.split('/')[1]); - const editorText = await common.getEditorFirstLinePlainText(); - assert.equal(editorText, firstTextPart.concat(secondTextPart)); - - // Cleanup - await common.removeFile(`${fileName}`); - }); - - it('cheks if opened tabs are restored migrating from stable to latest', async function () { - const fileName1 = 'app.js', fileName2 = 'jsconfig.json', fileName3 = 'readme.md'; - setupSpectron(this, stablePath, [workspacePath]); - await app.start(); - await common.openFile(fileName1, true); - await common.openFile(fileName2, true); - await common.openFile(fileName3, true); - await app.stop(); - - setupSpectron(this, latestPath, [workspacePath]); - await app.start(); - assert.ok(await common.getTab(fileName1)); - assert.ok(await common.getTab(fileName2)); - assert.ok(await common.getTab(fileName3)); - }); - }); - } - - context('Data Loss', function () { - let dataLoss: DataLoss; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath], [`--user-data-dir=${tempUserDir}`]); - common = new CommonActions(app); - dataLoss = new DataLoss(app); - await common.removeDirectory(tempUserDir); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it(`verifies that 'hot exit' works for dirty files`, async function () { - const textToType = 'Hello, Code!', fileName = 'readme.md', untitled = 'Untitled-1'; - await common.newUntitledFile(); - await common.type(textToType); - await dataLoss.openExplorerViewlet(); - await common.openFile(fileName, true); - await common.type(textToType); - - await app.stop(); - await app.start(); - - // check tab presence - assert.ok(await common.getTab(untitled)); - assert.ok(await common.getTab(fileName, true)); - // check if they marked as dirty (icon) and active tab is the last opened - assert.ok(await dataLoss.verifyTabIsDirty(untitled)); - assert.ok(await dataLoss.verifyTabIsDirty(fileName, true)); - }); - - it(`verifies that contents of the dirty files are restored after 'hot exit'`, async function () { - // make one dirty file, - // create one untitled file - const textToType = 'Hello, Code!'; - - // create one untitled file - await common.newUntitledFile(); - await app.wait(); - await common.type(textToType); - - // make one dirty file, - await common.openFile('readme.md', true); - await app.wait(); - await common.type(textToType); - - await app.stop(); - await app.start(); - - // check their contents - let fileDirt = await common.getEditorFirstLinePlainText(); - assert.equal(fileDirt, 'Hello, Code'); // ignore '!' as it is a separate , first part is enough - await common.selectTab('Untitled-1'); - fileDirt = await common.getEditorFirstLinePlainText(); - assert.equal(fileDirt, textToType); - }); - }); - - // Do not run until experiments are finished over the first-time startup behaviour. - // context('First User Experience', function () { - // let experience: FirstExperience; - - // beforeEach(async function () { - // app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), undefined, [`--user-data-dir=${tempUserDir}`, `--excludeSwitches=load-component-extension`]); - // common = new CommonActions(app); - // experience = new FirstExperience(app); - - // await common.removeDirectory(tempUserDir); - // return await app.start(); - // }); - // afterEach(async function () { - // return await app.stop(); - // }); - - // it(`verifies if title is set correctly on the clean user-directory startup`, async function () { - // const title = await common.getWindowTitle(); - - // let expectedTitle = 'Welcome'; - // if (process.platform !== 'darwin') { - // expectedTitle += ' — Visual Studio Code'; - // if (insiders) expectedTitle += ' - Insiders'; - // } - - // assert.equal(title, expectedTitle); - // }); - - // it(`verifies if 'Welcome page' tab is presented on the clean user-directory startup`, async function () { - // assert.ok(await experience.getWelcomeTab()); - // }); - // }); - - context('Explorer', function () { - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('quick open search produces correct result', async function () { - await common.openQuickOpen(); - await common.type('.js'); - await app.wait(); - const elCount = await common.getQuickOpenElements(); - assert.equal(elCount, 7); - }); - - it('quick open respects fuzzy matching', async function () { - await common.openQuickOpen(); - await common.type('a.s'); - await app.wait(); - const elCount = await common.getQuickOpenElements(); - assert.equal(elCount, 3); - }); - }); - - context('Configuration and views', function () { - let configView: ConfigurationView; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - configView = new ConfigurationView(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('turns off editor line numbers and verifies the live change', async function () { - await common.newUntitledFile(); - await app.wait(); - let elements = await configView.getEditorLineNumbers(); - assert.equal(elements.value.length, 1); - await common.addSetting('editor.lineNumbers', 'off'); - await app.wait(); - elements = await configView.getEditorLineNumbers(); - assert.equal(elements.value.length, 0); - }); - - it(`changes 'workbench.action.toggleSidebarPosition' command key binding and verifies it`, async function () { - await configView.enterKeybindingsView() - await common.type('workbench.action.toggleSidebarPosition'); - await app.wait(); - await configView.selectFirstKeybindingsMatch(); - await configView.changeKeybinding(); - await configView.enterBinding(['Control', 'u', 'NULL']); - await common.enter(); - let html = await configView.getActivityBar(ActivityBarPosition.RIGHT); - assert.equal(html, undefined);; - await app.wait(); - await configView.toggleActivityBarPosition(); - html = await configView.getActivityBar(ActivityBarPosition.RIGHT); - assert.ok(html); - }); - }); - - context('Search', function () { - let search: Search; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - search = new Search(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('searches for body & checks for correct result number', async function () { - const s = search; - await s.openSearchViewlet(); - await s.searchFor('body'); - const result = await s.getResultText(); - assert.equal(result, '7 results in 4 files'); - }); - - it('searches only for *.js files & checks for correct result number', async function () { - const s = search; - await s.openSearchViewlet(); - await s.searchFor('body'); - await s.toggleSearchDetails(); - await s.searchFor('*.js'); - const results = await s.getResultText(); - assert.equal(results, '4 results in 1 file'); - }); - - it('dismisses result & checks for correct result number', async function () { - const s = search; - await s.openSearchViewlet() - await s.searchFor('body'); - await s.hoverOverResultCount(); - await s.dismissResult(); - await app.wait(); - const result = await s.getResultText(); - assert.equal(result, '3 results in 3 files') - }); - - it('replaces first search result with a replace term', async function () { - const s = search; - await s.openSearchViewlet() - await s.searchFor('body'); - await s.toggleReplace(); - await s.setReplaceText('ydob'); - await s.hoverOverResultCount(); - await s.replaceFirstMatch(); - await app.wait(); - await common.saveOpenedFile(); - const result = await s.getResultText(); - assert.equal(result, '3 results in 3 files'); - }); - }); - - context('CSS', function () { - let css: CSS; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - css = new CSS(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('verifies quick outline', async function () { - await common.openFirstMatchFile('style.css'); - await css.openQuickOutline(); - await app.wait(); - const count = await common.getQuickOpenElements(); - assert.equal(count, 2); - }); - - it('verifies warnings for the empty rule', async function () { - await common.openFirstMatchFile('style.css'); - await common.type('.foo{}'); - await app.wait(); - let warning = await css.getEditorProblem(CSSProblem.WARNING); - assert.ok(warning); - await css.toggleProblemsView(); - warning = await css.getProblemsViewsProblem(CSSProblem.WARNING); - assert.ok(warning); - }); - - it('verifies that warning becomes an error once setting changed', async function () { - await common.addSetting('css.lint.emptyRules', 'error'); - await common.openFirstMatchFile('style.css'); - await common.type('.foo{}'); - await app.wait(); - let error = await css.getEditorProblem(CSSProblem.ERROR); - assert.ok(error); - await css.toggleProblemsView(); - error = await css.getProblemsViewsProblem(CSSProblem.ERROR); - assert.ok(error); - }); - }); - - context('JavaScript', function () { - let js: JavaScript; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - js = new JavaScript(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('shows correct quick outline', async function () { - await common.openFirstMatchFile('bin/www'); - await js.openQuickOutline(); - await app.wait(); - const symbols = await common.getQuickOpenElements(); - assert.equal(symbols, 12); - }); - - it(`finds 'All References' to 'app'`, async function () { - await common.openFirstMatchFile('bin/www'); - await app.wait(); - await js.findAppReferences(); - const titleCount = await js.getTitleReferencesCount(); - assert.equal(titleCount, 3); - const treeCount = await js.getTreeReferencesCount(); - assert.equal(treeCount, 3); - }); - - it(`renames local 'app' variable`, async function () { - await common.openFirstMatchFile('bin/www'); - - const newVarName = 'newApp'; - await js.renameApp(newVarName); - await common.enter(); - const newName = await js.getNewAppName(); - assert.equal(newName, newVarName); - }); - - it('folds/unfolds the code correctly', async function () { - await common.openFirstMatchFile('bin/www'); - // Fold - await js.toggleFirstCommentFold(); - const foldedIcon = await js.getFirstCommentFoldedIcon(); - assert.ok(foldedIcon); - let nextLineNumber = await js.getNextLineNumberAfterFold(); - assert.equal(nextLineNumber, 7); - // Unfold - await js.toggleFirstCommentFold(); - nextLineNumber = await js.getNextLineNumberAfterFold(); - assert.equal(nextLineNumber, 4); - }); - - it(`verifies that 'Go To Definition' works`, async function () { - await common.openFirstMatchFile('app.js'); - await js.goToExpressDefinition(); - await app.wait(); - assert.ok(await common.getTab('index.d.ts')); - }); - - it(`verifies that 'Peek Definition' works`, async function () { - await common.openFirstMatchFile('app.js'); - await js.peekExpressDefinition(); - const definitionFilename = await js.getPeekExpressResultName(); - assert.equal(definitionFilename, 'index.d.ts'); - }); - }); - - context('Debugging JavaScript', function () { - let jsDebug: JavaScriptDebug; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - jsDebug = new JavaScriptDebug(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('autodetects program attribute for launch.json', async function () { - await jsDebug.openDebugViewlet(); - await jsDebug.pressConfigureLaunchJson(); - const value = await jsDebug.getProgramConfigValue(); - process.platform === 'win32' ? assert.equal(value, '"${workspaceRoot}\\\\bin\\\\www"') : assert.equal(value, '"${workspaceRoot}/bin/www"'); - }); - - it(`can set a breakpoint and verify if it's set`, async function () { - await common.openFirstMatchFile('index.js'); - await jsDebug.setBreakpointOnLine(6); - const breakpoint = await jsDebug.verifyBreakpointOnLine(6); - assert.ok(breakpoint); - }); - }); - - context('Git', function () { - let git: Git; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - git = new Git(app, common); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('verifies current changes are picked up by Git viewlet', async function () { - const changesCount = await git.getScmIconChanges(); - assert.equal(changesCount, 2); - await git.openGitViewlet(); - assert.ok(await git.verifyScmChange('app.js')); - assert.ok(await git.verifyScmChange('launch.json')); - }); - - it(`verifies 'app.js' diff viewer changes`, async function () { - await git.openGitViewlet(); - await common.openFile('app.js'); - const original = await git.getOriginalAppJsBodyVarName(); - assert.equal(original, 'bodyParser'); - const modified = await git.getModifiedAppJsBodyVarName(); - assert.equal(modified, 'ydobParser'); - }); - - it(`stages 'app.js' changes and checks stage count`, async function () { - await git.openGitViewlet(); - await app.wait(); - await git.stageFile('app.js'); - const stagedCount = await git.getStagedCount(); - assert.equal(stagedCount, 1); - - // Return back to unstaged state - await git.unstageFile('app.js'); - }); - - it(`stages, commits change to 'app.js' locally and verifies outgoing change`, async function () { - await git.openGitViewlet(); - await app.wait(); - await git.stageFile('app.js'); - await git.focusOnCommitBox(); - await common.type('Test commit'); - await git.pressCommit(); - const changes = await git.getOutgoingChanges(); - assert.equal(changes, ' 0↓ 1↑'); - }); - }); - - context('Integrated Terminal', function () { - let terminal: IntegratedTerminal; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - terminal = new IntegratedTerminal(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it(`opens terminal, runs 'echo' and verifies the output`, async function () { - const command = 'echo test'; - await terminal.openTerminal(common); - await app.wait(); - await common.type(command); - await common.enter(); - await app.wait(); - let output = await terminal.getCommandOutput(command); - assert.equal(output, 'test'); - }); - }); - - context('Status Bar', function () { - let statusBar: StatusBar; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - common = new CommonActions(app); - statusBar = new StatusBar(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('verifies presence of all default status bar elements', async function () { - await app.wait(); - assert.ok(await statusBar.isVisible(StatusBarElement.BRANCH_STATUS)); - assert.ok(await statusBar.isVisible(StatusBarElement.FEEDBACK_ICON)); - assert.ok(await statusBar.isVisible(StatusBarElement.SYNC_STATUS)); - assert.ok(await statusBar.isVisible(StatusBarElement.PROBLEMS_STATUS)); - - await common.openFirstMatchFile('app.js'); - assert.ok(await statusBar.isVisible(StatusBarElement.ENCODING_STATUS)); - assert.ok(await statusBar.isVisible(StatusBarElement.EOL_STATUS)); - assert.ok(await statusBar.isVisible(StatusBarElement.INDENTATION_STATUS)); - assert.ok(await statusBar.isVisible(StatusBarElement.LANGUAGE_STATUS)); - assert.ok(await statusBar.isVisible(StatusBarElement.SELECTION_STATUS)); - }); - - it(`verifies that 'quick open' opens when clicking on 'Branch', 'Indentation Status, 'Encoding', 'EOL' and 'Language' status elements`, async function () { - await app.wait(); - await statusBar.clickOn(StatusBarElement.BRANCH_STATUS); - assert.ok(await statusBar.isQuickOpenWidgetVisible()); - await common.closeQuickOpen(); - - await common.openFirstMatchFile('app.js'); - await statusBar.clickOn(StatusBarElement.INDENTATION_STATUS); - assert.ok(await statusBar.isQuickOpenWidgetVisible()); - await common.closeQuickOpen(); - await statusBar.clickOn(StatusBarElement.ENCODING_STATUS); - assert.ok(await statusBar.isQuickOpenWidgetVisible()); - await common.closeQuickOpen(); - await statusBar.clickOn(StatusBarElement.EOL_STATUS); - assert.ok(await statusBar.isQuickOpenWidgetVisible()); - await common.closeQuickOpen(); - await statusBar.clickOn(StatusBarElement.LANGUAGE_STATUS); - assert.ok(await statusBar.isQuickOpenWidgetVisible()); - await common.closeQuickOpen(); - }); - - it(`verifies that 'Problems View' appears when clicking on 'Problems' status element`, async function () { - await statusBar.clickOn(StatusBarElement.PROBLEMS_STATUS); - assert.ok(await statusBar.getProblemsView()); - }); - - it(`verifies that 'Tweet us feedback' pop-up appears when clicking on 'Feedback' icon`, async function () { - await statusBar.clickOn(StatusBarElement.FEEDBACK_ICON); - assert.ok(await statusBar.getFeedbackView()); - }); - - it(`checks if 'Go to Line' works if called from the status bar`, async function () { - await common.openFirstMatchFile('app.js'); - await statusBar.clickOn(StatusBarElement.SELECTION_STATUS); - const lineNumber = 15; - await common.type(lineNumber.toString()); - await common.enter(); - assert.ok(await statusBar.getEditorHighlightedLine(lineNumber)); - }); - - it(`verifies if changing EOL is reflected in the status bar`, async function () { - await common.openFirstMatchFile('app.js'); - await statusBar.clickOn(StatusBarElement.EOL_STATUS); - await common.selectNextQuickOpenElement(); - await common.enter(); - const currentEOL = await statusBar.getEOLMode(); - assert.equal(currentEOL, 'CRLF'); - }); - }); - - context('Tasks', function () { - let tasks: Tasks; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath]); - tasks = new Tasks(app); - - return await app.start(); - }); - afterEach(async function () { - return await app.stop(); - }); - - it('verifies that build task produces 6 errors', async function () { - await tasks.build(); - const res = await tasks.getOutputResult(); - assert.equal(res, '✖ 6 problems (6 errors, 0 warnings)'); - }); - - it(`is able to select 'Git' output`, async function () { - await tasks.build(); - await app.wait(); - await tasks.selectOutputViewType('Git'); - const viewType = await tasks.getOutputViewType(); - assert.equal(viewType, 'Git'); - }); - - it('ensures that build task produces errors in index.js', async function () { - await tasks.build(); - assert.ok(await tasks.firstOutputLineEndsWith('index.js')); - }); - - it(`verifies build errors are reflected in 'Problems View'`, async function () { - await tasks.build(); - await app.wait(); - await tasks.openProblemsView(); - const problemName = await tasks.getProblemsViewFirstElementName(); - assert.equal(problemName, 'index.js'); - const problemsCount = await tasks.getProblemsViewFirstElementCount(); - assert.equal(problemsCount, '6'); - }); - }); - - context('Extensions', function () { - let extensions: Extensions; - - beforeEach(async function () { - app = new SpectronApplication(latestPath, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [workspacePath], [`--extensions-dir=${tempExtensionsDir}`]); - common = new CommonActions(app); - extensions = new Extensions(app, common); - await common.removeDirectory(tempExtensionsDir); - - return await app.start(); - }); - afterEach(async function () { - await app.stop(); - return await common.removeDirectory(tempExtensionsDir); - }); - - it(`installs 'vscode-icons' extension and verifies reload is prompted`, async function () { - await extensions.openExtensionsViewlet(); - await extensions.searchForExtension('vscode-icons'); - await app.wait(); - await extensions.installFirstResult(); - await app.wait(); - assert.ok(await extensions.getFirstReloadText()); - }); - - it(`installs an extension and checks if it works on restart`, async function () { - await extensions.openExtensionsViewlet(); - await extensions.searchForExtension('vscode-icons'); - await app.wait(); - await extensions.installFirstResult(); - await app.wait(); - await extensions.getFirstReloadText(); - - await app.stop(); - await app.wait(); // wait until all resources are released (e.g. locked local storage) - await app.start(); - await extensions.selectMinimalIconsTheme(); - const x = await extensions.verifyFolderIconAppearance(); - assert.ok(x); - }); - }); - - context('Localization', function () { - afterEach(async function () { - return await app.stop(); - }); - - it(`starts with 'DE' locale and verifies title and viewlets text is in German`, async function () { - app = new SpectronApplication(latestPath, this.test.fullTitle(), this.test.currentRetry(), [workspacePath, '--locale=DE'], [`--user-data-dir=${tempUserDir}`]); - common = new CommonActions(app); - const locale = new Localization(app); - common.removeDirectory(tempUserDir); - - await app.start(); - - // Do not run until experiments are finished over the first-time startup behaviour. - // let expectedTitle = 'Willkommen — vscode-smoketest-express'; - // if (process.platform !== 'darwin') { - // expectedTitle += ' — Visual Studio Code'; - // if (insiders) expectedTitle += ' - Insiders'; - // } - // assert.equal(await common.getWindowTitle(), expectedTitle); - - let text = await locale.getOpenEditorsText(); - assert.equal(text.toLowerCase(), 'geöffnete editoren'); - - await locale.openViewlet(ViewletType.SEARCH); - text = await locale.getOpenedViewletTitle() - assert.equal(text.toLowerCase(), 'suchen'); - - await locale.openViewlet(ViewletType.SCM); - text = await locale.getOpenedViewletTitle(); - assert.equal(text.toLowerCase(), 'quellcodeverwaltung: git'); - - await locale.openViewlet(ViewletType.DEBUG); - text = await locale.getOpenedViewletTitle(); - assert.equal(text.toLowerCase(), 'debuggen'); - - await locale.openViewlet(ViewletType.EXTENSIONS); - text = await locale.getExtensionsSearchPlaceholder(); - assert.equal(text.toLowerCase(), 'nach erweiterungen im marketplace suchen'); - }); - }); - + dataMigration(); + dataLoss(); + explorer(); + configurationViews(); + search(); + css(); + javascript(); + javascriptDebug(); + test_git(); + integratedTerminal(); + statusBar(); + tasks(); + extensions(); + localization(); }); \ No newline at end of file diff --git a/test/smoke/src/tests/configuration-views.ts b/test/smoke/src/tests/configuration-views.ts new file mode 100644 index 0000000000000..2f61f3337fb63 --- /dev/null +++ b/test/smoke/src/tests/configuration-views.ts @@ -0,0 +1,57 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { ConfigurationView, ActivityBarPosition } from "../areas/configuration-views"; + +let app: SpectronApplication; +let common: CommonActions; + +export function configurationViews() { + context('Configuration and views', function () { + let configView: ConfigurationView; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + configView = new ConfigurationView(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('turns off editor line numbers and verifies the live change', async function () { + await common.newUntitledFile(); + await app.wait(); + let elements = await configView.getEditorLineNumbers(); + assert.equal(elements.value.length, 1); + await common.addSetting('editor.lineNumbers', 'off'); + await app.wait(); + elements = await configView.getEditorLineNumbers(); + assert.equal(elements.value.length, 0); + }); + + it(`changes 'workbench.action.toggleSidebarPosition' command key binding and verifies it`, async function () { + await configView.enterKeybindingsView(); + await common.type('workbench.action.toggleSidebarPosition'); + await app.wait(); + await configView.selectFirstKeybindingsMatch(); + await configView.changeKeybinding(); + await configView.enterBinding(['Control', 'u', 'NULL']); + await common.enter(); + let html = await configView.getActivityBar(ActivityBarPosition.RIGHT); + assert.equal(html, undefined);; + await app.wait(); + await configView.toggleActivityBarPosition(); + html = await configView.getActivityBar(ActivityBarPosition.RIGHT); + assert.ok(html); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/css.ts b/test/smoke/src/tests/css.ts new file mode 100644 index 0000000000000..01a0bddbe2589 --- /dev/null +++ b/test/smoke/src/tests/css.ts @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { CSS, CSSProblem } from '../areas/css'; + +let app: SpectronApplication; +let common: CommonActions; + +export function css() { + context('CSS', function () { + let css: CSS; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + css = new CSS(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('verifies quick outline', async function () { + await common.openFirstMatchFile('style.css'); + await css.openQuickOutline(); + await app.wait(); + const count = await common.getQuickOpenElements(); + assert.equal(count, 2); + }); + + it('verifies warnings for the empty rule', async function () { + await common.openFirstMatchFile('style.css'); + await common.type('.foo{}'); + await app.wait(); + let warning = await css.getEditorProblem(CSSProblem.WARNING); + assert.ok(warning); + await css.toggleProblemsView(); + warning = await css.getProblemsViewsProblem(CSSProblem.WARNING); + assert.ok(warning); + }); + + it('verifies that warning becomes an error once setting changed', async function () { + await common.addSetting('css.lint.emptyRules', 'error'); + await common.openFirstMatchFile('style.css'); + await common.type('.foo{}'); + await app.wait(); + let error = await css.getEditorProblem(CSSProblem.ERROR); + assert.ok(error); + await css.toggleProblemsView(); + error = await css.getProblemsViewsProblem(CSSProblem.ERROR); + assert.ok(error); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/data-loss.ts b/test/smoke/src/tests/data-loss.ts new file mode 100644 index 0000000000000..4be1635cfcefa --- /dev/null +++ b/test/smoke/src/tests/data-loss.ts @@ -0,0 +1,76 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, USER_DIR, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { DataLoss } from "../areas/data-loss"; + +let app: SpectronApplication; +let common: CommonActions; +let dl: DataLoss; + +export function dataLoss() { + context('Data Loss', function () { + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH], [`--user-data-dir=${USER_DIR}`]); + common = new CommonActions(app); + dl = new DataLoss(app); + await common.removeDirectory(USER_DIR); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it(`verifies that 'hot exit' works for dirty files`, async function () { + const textToType = 'Hello, Code!', fileName = 'readme.md', untitled = 'Untitled-1'; + await common.newUntitledFile(); + await common.type(textToType); + await dl.openExplorerViewlet(); + await common.openFile(fileName, true); + await common.type(textToType); + + await app.stop(); + await app.start(); + + // check tab presence + assert.ok(await common.getTab(untitled)); + assert.ok(await common.getTab(fileName, true)); + // check if they marked as dirty (icon) and active tab is the last opened + assert.ok(await dl.verifyTabIsDirty(untitled)); + assert.ok(await dl.verifyTabIsDirty(fileName, true)); + }); + + it(`verifies that contents of the dirty files are restored after 'hot exit'`, async function () { + // make one dirty file, + // create one untitled file + const textToType = 'Hello, Code!'; + + // create one untitled file + await common.newUntitledFile(); + await app.wait(); + await common.type(textToType); + + // make one dirty file, + await common.openFile('readme.md', true); + await app.wait(); + await common.type(textToType); + + await app.stop(); + await app.start(); + + // check their contents + let fileDirt = await common.getEditorFirstLinePlainText(); + assert.equal(fileDirt, 'Hello, Code'); // ignore '!' as it is a separate , first part is enough + await common.selectTab('Untitled-1'); + fileDirt = await common.getEditorFirstLinePlainText(); + assert.equal(fileDirt, textToType); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/data-migration.ts b/test/smoke/src/tests/data-migration.ts new file mode 100644 index 0000000000000..0dba58deccbc0 --- /dev/null +++ b/test/smoke/src/tests/data-migration.ts @@ -0,0 +1,98 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, USER_DIR, STABLE_PATH, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; + +let app: SpectronApplication; +let common: CommonActions; + +export function dataMigration() { + if (!STABLE_PATH) { + return; + } + context('Data Migration', function () { + + afterEach(async function () { + await app.stop(); + return await common.removeDirectory(USER_DIR) + }); + + function setupSpectron(context: Mocha.ITestCallbackContext, appPath: string, workspace?: string[]): void { + app = new SpectronApplication(appPath, context.test.fullTitle(), context.test.currentRetry(), workspace, [`--user-data-dir=${USER_DIR}`]); + common = new CommonActions(app); + } + + it('checks if the Untitled file is restored migrating from stable to latest', async function () { + const textToType = 'Very dirty file'; + + // Setting up stable version + setupSpectron(this, STABLE_PATH); + await app.start(); + + await common.newUntitledFile(); + await common.type(textToType); + await app.stop(); + + await app.wait(); // wait until all resources are released (e.g. locked local storage) + + // Checking latest version for the restored state + setupSpectron(this, LATEST_PATH); + await app.start(); + + assert.ok(await common.getTab('Untitled-1')); + await common.selectTab('Untitled-1'); + const editorText = await common.getEditorFirstLinePlainText(); + assert.equal(editorText, textToType); + }); + + it('checks if the newly created dirty file is restored migrating from stable to latest', async function () { + const fileName = 'test_data/plainFile', + firstTextPart = 'This is going to be an unsaved file', secondTextPart = '_that is dirty.'; + + // Setting up stable version + setupSpectron(this, STABLE_PATH, [fileName]); + await common.removeFile(`${fileName}`); + await app.start(); + + await common.type(firstTextPart); + await common.saveOpenedFile(); + await app.wait(); + await common.type(secondTextPart); + + await app.stop(); + await app.wait(); // wait until all resources are released (e.g. locked local storage) + + // Checking latest version for the restored state + setupSpectron(this, LATEST_PATH); + await app.start(); + assert.ok(await common.getTab(fileName.split('/')[1])); + await common.selectTab(fileName.split('/')[1]); + const editorText = await common.getEditorFirstLinePlainText(); + assert.equal(editorText, firstTextPart.concat(secondTextPart)); + + // Cleanup + await common.removeFile(`${fileName}`); + }); + + it('cheks if opened tabs are restored migrating from stable to latest', async function () { + const fileName1 = 'app.js', fileName2 = 'jsconfig.json', fileName3 = 'readme.md'; + setupSpectron(this, STABLE_PATH, [WORKSPACE_PATH]); + await app.start(); + await common.openFile(fileName1, true); + await common.openFile(fileName2, true); + await common.openFile(fileName3, true); + await app.stop(); + + setupSpectron(this, LATEST_PATH, [WORKSPACE_PATH]); + await app.start(); + assert.ok(await common.getTab(fileName1)); + assert.ok(await common.getTab(fileName2)); + assert.ok(await common.getTab(fileName3)); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/explorer.ts b/test/smoke/src/tests/explorer.ts new file mode 100644 index 0000000000000..83c2d114196f0 --- /dev/null +++ b/test/smoke/src/tests/explorer.ts @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; + +let app: SpectronApplication; +let common: CommonActions; + +export function explorer() { + context('Explorer', function () { + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('quick open search produces correct result', async function () { + await common.openQuickOpen(); + await common.type('.js'); + await app.wait(); + const elCount = await common.getQuickOpenElements(); + assert.equal(elCount, 7); + }); + + it('quick open respects fuzzy matching', async function () { + await common.openQuickOpen(); + await common.type('a.s'); + await app.wait(); + const elCount = await common.getQuickOpenElements(); + assert.equal(elCount, 3); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/extensions.ts b/test/smoke/src/tests/extensions.ts new file mode 100644 index 0000000000000..a545dd7c674b7 --- /dev/null +++ b/test/smoke/src/tests/extensions.ts @@ -0,0 +1,57 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH, EXTENSIONS_DIR } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { Extensions } from "../areas/extensions"; + +let app: SpectronApplication; +let common: CommonActions; + +export function extensions() { + context('Extensions', function () { + let extensions: Extensions; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH], [`--extensions-dir=${EXTENSIONS_DIR}`]); + common = new CommonActions(app); + extensions = new Extensions(app, common); + await common.removeDirectory(EXTENSIONS_DIR); + + return await app.start(); + }); + afterEach(async function () { + await app.stop(); + return await common.removeDirectory(EXTENSIONS_DIR); + }); + + it(`installs 'vscode-icons' extension and verifies reload is prompted`, async function () { + await extensions.openExtensionsViewlet(); + await extensions.searchForExtension('vscode-icons'); + await app.wait(); + await extensions.installFirstResult(); + await app.wait(); + assert.ok(await extensions.getFirstReloadText()); + }); + + it(`installs an extension and checks if it works on restart`, async function () { + await extensions.openExtensionsViewlet(); + await extensions.searchForExtension('vscode-icons'); + await app.wait(); + await extensions.installFirstResult(); + await app.wait(); + await extensions.getFirstReloadText(); + + await app.stop(); + await app.wait(); // wait until all resources are released (e.g. locked local storage) + await app.start(); + await extensions.selectMinimalIconsTheme(); + const x = await extensions.verifyFolderIconAppearance(); + assert.ok(x); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/git.ts b/test/smoke/src/tests/git.ts new file mode 100644 index 0000000000000..11d568c7f8b80 --- /dev/null +++ b/test/smoke/src/tests/git.ts @@ -0,0 +1,69 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { Git } from "../areas/git"; + +let app: SpectronApplication; +let common: CommonActions; + +export function test_git() { + context('Git', function () { + let git: Git; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + git = new Git(app, common); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('verifies current changes are picked up by Git viewlet', async function () { + const changesCount = await git.getScmIconChanges(); + assert.equal(changesCount, 2); + await git.openGitViewlet(); + assert.ok(await git.verifyScmChange('app.js')); + assert.ok(await git.verifyScmChange('launch.json')); + }); + + it(`verifies 'app.js' diff viewer changes`, async function () { + await git.openGitViewlet(); + await common.openFile('app.js'); + const original = await git.getOriginalAppJsBodyVarName(); + assert.equal(original, 'bodyParser'); + const modified = await git.getModifiedAppJsBodyVarName(); + assert.equal(modified, 'ydobParser'); + }); + + it(`stages 'app.js' changes and checks stage count`, async function () { + await git.openGitViewlet(); + await app.wait(); + await git.stageFile('app.js'); + const stagedCount = await git.getStagedCount(); + assert.equal(stagedCount, 1); + + // Return back to unstaged state + await git.unstageFile('app.js'); + }); + + it(`stages, commits change to 'app.js' locally and verifies outgoing change`, async function () { + await git.openGitViewlet(); + await app.wait(); + await git.stageFile('app.js'); + await git.focusOnCommitBox(); + await common.type('Test commit'); + await git.pressCommit(); + const changes = await git.getOutgoingChanges(); + assert.equal(changes, ' 0↓ 1↑'); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/integrated-terminal.ts b/test/smoke/src/tests/integrated-terminal.ts new file mode 100644 index 0000000000000..95925d03f961d --- /dev/null +++ b/test/smoke/src/tests/integrated-terminal.ts @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { IntegratedTerminal } from "../areas/integrated-terminal"; + +let app: SpectronApplication; +let common: CommonActions; + +export function integratedTerminal() { + context('Integrated Terminal', function () { + let terminal: IntegratedTerminal; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + terminal = new IntegratedTerminal(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it(`opens terminal, runs 'echo' and verifies the output`, async function () { + const command = 'echo test'; + await terminal.openTerminal(common); + await app.wait(); + await common.type(command); + await common.enter(); + await app.wait(); + let output = await terminal.getCommandOutput(command); + assert.equal(output, 'test'); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/javascript-debug.ts b/test/smoke/src/tests/javascript-debug.ts new file mode 100644 index 0000000000000..7f85ee4f49ce8 --- /dev/null +++ b/test/smoke/src/tests/javascript-debug.ts @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { JavaScriptDebug } from "../areas/javascript-debug"; + +let app: SpectronApplication; +let common: CommonActions; + +export function javascriptDebug() { + context('Debugging JavaScript', function () { + let jsDebug: JavaScriptDebug; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + jsDebug = new JavaScriptDebug(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('autodetects program attribute for launch.json', async function () { + await jsDebug.openDebugViewlet(); + await jsDebug.pressConfigureLaunchJson(); + const value = await jsDebug.getProgramConfigValue(); + process.platform === 'win32' ? assert.equal(value, '"${workspaceRoot}\\\\bin\\\\www"') : assert.equal(value, '"${workspaceRoot}/bin/www"'); + }); + + it(`can set a breakpoint and verify if it's set`, async function () { + await common.openFirstMatchFile('index.js'); + await jsDebug.setBreakpointOnLine(6); + const breakpoint = await jsDebug.verifyBreakpointOnLine(6); + assert.ok(breakpoint); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/javascript.ts b/test/smoke/src/tests/javascript.ts new file mode 100644 index 0000000000000..2d82fde2d4b83 --- /dev/null +++ b/test/smoke/src/tests/javascript.ts @@ -0,0 +1,86 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { JavaScript } from "../areas/javascript"; + +let app: SpectronApplication; +let common: CommonActions; + +export function javascript() { + context('JavaScript', function () { + let js: JavaScript; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + js = new JavaScript(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('shows correct quick outline', async function () { + await common.openFirstMatchFile('bin/www'); + await js.openQuickOutline(); + await app.wait(); + const symbols = await common.getQuickOpenElements(); + assert.equal(symbols, 12); + }); + + it(`finds 'All References' to 'app'`, async function () { + await common.openFirstMatchFile('bin/www'); + await app.wait(); + await js.findAppReferences(); + const titleCount = await js.getTitleReferencesCount(); + assert.equal(titleCount, 3); + const treeCount = await js.getTreeReferencesCount(); + assert.equal(treeCount, 3); + }); + + it(`renames local 'app' variable`, async function () { + await common.openFirstMatchFile('bin/www'); + + const newVarName = 'newApp'; + await js.renameApp(newVarName); + await common.enter(); + const newName = await js.getNewAppName(); + assert.equal(newName, newVarName); + }); + + it('folds/unfolds the code correctly', async function () { + await common.openFirstMatchFile('bin/www'); + // Fold + await js.toggleFirstCommentFold(); + const foldedIcon = await js.getFirstCommentFoldedIcon(); + assert.ok(foldedIcon); + let nextLineNumber = await js.getNextLineNumberAfterFold(); + assert.equal(nextLineNumber, 7); + // Unfold + await js.toggleFirstCommentFold(); + nextLineNumber = await js.getNextLineNumberAfterFold(); + assert.equal(nextLineNumber, 4); + }); + + it(`verifies that 'Go To Definition' works`, async function () { + await common.openFirstMatchFile('app.js'); + await js.goToExpressDefinition(); + await app.wait(); + assert.ok(await common.getTab('index.d.ts')); + }); + + it(`verifies that 'Peek Definition' works`, async function () { + await common.openFirstMatchFile('app.js'); + await js.peekExpressDefinition(); + const definitionFilename = await js.getPeekExpressResultName(); + assert.equal(definitionFilename, 'index.d.ts'); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/localization.ts b/test/smoke/src/tests/localization.ts new file mode 100644 index 0000000000000..35a72186e820f --- /dev/null +++ b/test/smoke/src/tests/localization.ts @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH, USER_DIR } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { Localization, ViewletType } from "../areas/localization"; + +let app: SpectronApplication; +let common: CommonActions; + +export function localization() { + context('Localization', function () { + afterEach(async function () { + return await app.stop(); + }); + + it(`starts with 'DE' locale and verifies title and viewlets text is in German`, async function () { + app = new SpectronApplication(LATEST_PATH, this.test.fullTitle(), this.test.currentRetry(), [WORKSPACE_PATH, '--locale=DE'], [`--user-data-dir=${USER_DIR}`]); + common = new CommonActions(app); + const locale = new Localization(app); + common.removeDirectory(USER_DIR); + + await app.start(); + + let text = await locale.getOpenEditorsText(); + assert.equal(text.toLowerCase(), 'geöffnete editoren'); + + await locale.openViewlet(ViewletType.SEARCH); + text = await locale.getOpenedViewletTitle(); + assert.equal(text.toLowerCase(), 'suchen'); + + await locale.openViewlet(ViewletType.SCM); + text = await locale.getOpenedViewletTitle(); + assert.equal(text.toLowerCase(), 'quellcodeverwaltung: git'); + + await locale.openViewlet(ViewletType.DEBUG); + text = await locale.getOpenedViewletTitle(); + assert.equal(text.toLowerCase(), 'debuggen'); + + await locale.openViewlet(ViewletType.EXTENSIONS); + text = await locale.getExtensionsSearchPlaceholder(); + assert.equal(text.toLowerCase(), 'nach erweiterungen im marketplace suchen'); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/search.ts b/test/smoke/src/tests/search.ts new file mode 100644 index 0000000000000..8ab012c9b085f --- /dev/null +++ b/test/smoke/src/tests/search.ts @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { Search } from "../areas/search"; + +let app: SpectronApplication; +let common: CommonActions; + +export function search() { + context('Search', function () { + let search: Search; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + search = new Search(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('searches for body & checks for correct result number', async function () { + const s = search; + await s.openSearchViewlet(); + await s.searchFor('body'); + const result = await s.getResultText(); + assert.equal(result, '7 results in 4 files'); + }); + + it('searches only for *.js files & checks for correct result number', async function () { + const s = search; + await s.openSearchViewlet(); + await s.searchFor('body'); + await s.toggleSearchDetails(); + await s.searchFor('*.js'); + const results = await s.getResultText(); + assert.equal(results, '4 results in 1 file'); + }); + + it('dismisses result & checks for correct result number', async function () { + const s = search; + await s.openSearchViewlet(); + await s.searchFor('body'); + await s.hoverOverResultCount(); + await s.dismissResult(); + await app.wait(); + const result = await s.getResultText(); + assert.equal(result, '3 results in 3 files'); + }); + + it('replaces first search result with a replace term', async function () { + const s = search; + await s.openSearchViewlet(); + await s.searchFor('body'); + await s.toggleReplace(); + await s.setReplaceText('ydob'); + await s.hoverOverResultCount(); + await s.replaceFirstMatch(); + await app.wait(); + await common.saveOpenedFile(); + const result = await s.getResultText(); + assert.equal(result, '3 results in 3 files'); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/statusbar.ts b/test/smoke/src/tests/statusbar.ts new file mode 100644 index 0000000000000..6fbcf6472c4ce --- /dev/null +++ b/test/smoke/src/tests/statusbar.ts @@ -0,0 +1,94 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { CommonActions } from '../areas/common'; +import { StatusBarElement, StatusBar } from "../areas/statusBar"; + +let app: SpectronApplication; +let common: CommonActions; + +export function statusBar() { + context('Status Bar', function () { + let statusBar: StatusBar; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + common = new CommonActions(app); + statusBar = new StatusBar(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('verifies presence of all default status bar elements', async function () { + await app.wait(); + assert.ok(await statusBar.isVisible(StatusBarElement.BRANCH_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.FEEDBACK_ICON)); + assert.ok(await statusBar.isVisible(StatusBarElement.SYNC_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.PROBLEMS_STATUS)); + + await common.openFirstMatchFile('app.js'); + assert.ok(await statusBar.isVisible(StatusBarElement.ENCODING_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.EOL_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.INDENTATION_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.LANGUAGE_STATUS)); + assert.ok(await statusBar.isVisible(StatusBarElement.SELECTION_STATUS)); + }); + + it(`verifies that 'quick open' opens when clicking on 'Branch', 'Indentation Status, 'Encoding', 'EOL' and 'Language' status elements`, async function () { + await app.wait(); + await statusBar.clickOn(StatusBarElement.BRANCH_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + + await common.openFirstMatchFile('app.js'); + await statusBar.clickOn(StatusBarElement.INDENTATION_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + await statusBar.clickOn(StatusBarElement.ENCODING_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + await statusBar.clickOn(StatusBarElement.EOL_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + await statusBar.clickOn(StatusBarElement.LANGUAGE_STATUS); + assert.ok(await statusBar.isQuickOpenWidgetVisible()); + await common.closeQuickOpen(); + }); + + it(`verifies that 'Problems View' appears when clicking on 'Problems' status element`, async function () { + await statusBar.clickOn(StatusBarElement.PROBLEMS_STATUS); + assert.ok(await statusBar.getProblemsView()); + }); + + it(`verifies that 'Tweet us feedback' pop-up appears when clicking on 'Feedback' icon`, async function () { + await statusBar.clickOn(StatusBarElement.FEEDBACK_ICON); + assert.ok(await statusBar.getFeedbackView()); + }); + + it(`checks if 'Go to Line' works if called from the status bar`, async function () { + await common.openFirstMatchFile('app.js'); + await statusBar.clickOn(StatusBarElement.SELECTION_STATUS); + const lineNumber = 15; + await common.type(lineNumber.toString()); + await common.enter(); + assert.ok(await statusBar.getEditorHighlightedLine(lineNumber)); + }); + + it(`verifies if changing EOL is reflected in the status bar`, async function () { + await common.openFirstMatchFile('app.js'); + await statusBar.clickOn(StatusBarElement.EOL_STATUS); + await common.selectNextQuickOpenElement(); + await common.enter(); + const currentEOL = await statusBar.getEOLMode(); + assert.equal(currentEOL, 'CRLF'); + }); + }); +} \ No newline at end of file diff --git a/test/smoke/src/tests/tasks.ts b/test/smoke/src/tests/tasks.ts new file mode 100644 index 0000000000000..c020aceac0c4c --- /dev/null +++ b/test/smoke/src/tests/tasks.ts @@ -0,0 +1,56 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as assert from 'assert'; + +import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { Tasks } from "../areas/tasks"; + +let app: SpectronApplication; + +export function tasks() { + context('Tasks', function () { + let tasks: Tasks; + + beforeEach(async function () { + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); + tasks = new Tasks(app); + + return await app.start(); + }); + afterEach(async function () { + return await app.stop(); + }); + + it('verifies that build task produces 6 errors', async function () { + await tasks.build(); + const res = await tasks.getOutputResult(); + assert.equal(res, '✖ 6 problems (6 errors, 0 warnings)'); + }); + + it(`is able to select 'Git' output`, async function () { + await tasks.build(); + await app.wait(); + await tasks.selectOutputViewType('Git'); + const viewType = await tasks.getOutputViewType(); + assert.equal(viewType, 'Git'); + }); + + it('ensures that build task produces errors in index.js', async function () { + await tasks.build(); + assert.ok(await tasks.firstOutputLineEndsWith('index.js')); + }); + + it(`verifies build errors are reflected in 'Problems View'`, async function () { + await tasks.build(); + await app.wait(); + await tasks.openProblemsView(); + const problemName = await tasks.getProblemsViewFirstElementName(); + assert.equal(problemName, 'index.js'); + const problemsCount = await tasks.getProblemsViewFirstElementCount(); + assert.equal(problemsCount, '6'); + }); + }); +} \ No newline at end of file From 0335ea84d637f9ef5657a6f3051c5e9be823b08d Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Fri, 26 May 2017 10:36:52 +0200 Subject: [PATCH 1208/2747] Updated tasks tests with respect to new Express eslint config. Code cleanup. --- test/smoke/.vscode/launch.json | 26 --------------- test/smoke/.vscode/tasks.json | 10 ------ test/smoke/src/areas/tasks.ts | 11 ++++--- test/smoke/src/main.js | 1 - test/smoke/src/mocha-runner.js | 2 +- test/smoke/src/test.ts | 36 +++++++++++++++++++++ test/smoke/src/tests.ts | 36 --------------------- test/smoke/src/tests/configuration-views.ts | 4 +-- test/smoke/src/tests/css.ts | 4 +-- test/smoke/src/tests/data-loss.ts | 4 +-- test/smoke/src/tests/data-migration.ts | 5 +-- test/smoke/src/tests/explorer.ts | 5 +-- test/smoke/src/tests/extensions.ts | 19 +++++++++-- test/smoke/src/tests/git.ts | 4 +-- test/smoke/src/tests/integrated-terminal.ts | 4 +-- test/smoke/src/tests/javascript-debug.ts | 4 +-- test/smoke/src/tests/javascript.ts | 4 +-- test/smoke/src/tests/localization.ts | 4 +-- test/smoke/src/tests/search.ts | 4 +-- test/smoke/src/tests/statusbar.ts | 4 +-- test/smoke/src/tests/tasks.ts | 12 +++---- 21 files changed, 91 insertions(+), 112 deletions(-) delete mode 100644 test/smoke/.vscode/launch.json delete mode 100644 test/smoke/.vscode/tasks.json create mode 100644 test/smoke/src/test.ts delete mode 100644 test/smoke/src/tests.ts diff --git a/test/smoke/.vscode/launch.json b/test/smoke/.vscode/launch.json deleted file mode 100644 index 25b4e7e4c0ed7..0000000000000 --- a/test/smoke/.vscode/launch.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - // Use IntelliSense to learn about possible Node.js debug attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "node", - "request": "launch", - "name": "Mocha Tests", - "program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", - "args": [ - "-u", - "tdd", - "--timeout", - "999999", - "--colors", - "${workspaceRoot}/out/tests.js" - ], - "outFiles": [ "${workspaceRoot}/out/**/*.js" ], - "internalConsoleOptions": "openOnSessionStart", - "sourceMaps": true, - "cwd": "${workspaceRoot}" - } - ] -} \ No newline at end of file diff --git a/test/smoke/.vscode/tasks.json b/test/smoke/.vscode/tasks.json deleted file mode 100644 index 926b1ddcd18fb..0000000000000 --- a/test/smoke/.vscode/tasks.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "0.1.0", - "command": "tsc", - "isShellCommand": true, - "args": ["-p", "."], - "showOutput": "silent", - "problemMatcher": "$tsc" -} \ No newline at end of file diff --git a/test/smoke/src/areas/tasks.ts b/test/smoke/src/areas/tasks.ts index d83cc173efa1f..e0774854f3ad2 100644 --- a/test/smoke/src/areas/tasks.ts +++ b/test/smoke/src/areas/tasks.ts @@ -15,8 +15,9 @@ export class Tasks { // noop } - public build(): Promise { - return this.spectron.command('workbench.action.tasks.build'); + public async build(): Promise { + await this.spectron.command('workbench.action.tasks.build'); + return this.spectron.wait(); // wait for build to finish } public openProblemsView(): Promise { @@ -25,12 +26,12 @@ export class Tasks { public async firstOutputLineEndsWith(fileName: string): Promise { const firstLine = await this.spectron.waitFor(this.spectron.client.getText, `${this.outputViewSelector}>:nth-child(2)`); - + return firstLine.endsWith(fileName); } public getOutputResult(): Promise { - return this.spectron.waitFor(this.spectron.client.getText, `${this.outputViewSelector}>:nth-child(10) span.mtk1`); + return this.spectron.waitFor(this.spectron.client.getText, `${this.outputViewSelector}>:nth-child(5) span.mtk1`); } public selectOutputViewType(type: string): Promise { @@ -41,7 +42,7 @@ export class Tasks { return this.spectron.client.getValue(`${this.workbenchPanelSelector} .select-box`); } - public getProblemsViewFirstElementName(): Promise { + public getProblemsViewFirstElementName(): Promise { return this.spectron.waitFor(this.spectron.client.getText, `${this.problemsViewSelector} .label-name`); } diff --git a/test/smoke/src/main.js b/test/smoke/src/main.js index 8df41b5c73cfb..a6acc9a7d8956 100644 --- a/test/smoke/src/main.js +++ b/test/smoke/src/main.js @@ -53,7 +53,6 @@ else if (os === 'win32') os = 'win'; var promises = []; try { - // promises.push(execute('npm install'), process.cwd()); promises.push(getKeybindings(`${keybindingsUrl}/doc.keybindings.${os}.json`, `${tempFolder}/keybindings.json`)); promises.push(cleanOrClone(testRepoUrl, testRepoLocalDir)); diff --git a/test/smoke/src/mocha-runner.js b/test/smoke/src/mocha-runner.js index 8ea1dd905aa1e..39a91bcdbabc6 100644 --- a/test/smoke/src/mocha-runner.js +++ b/test/smoke/src/mocha-runner.js @@ -14,7 +14,7 @@ var mocha = new Mocha({ useColors: true }); -mocha.addFile(path.join(process.cwd(), 'out/tests.js')); +mocha.addFile(path.join(process.cwd(), 'out/test.js')); mocha.run((failures) => { process.on('exit', () => { process.exit(failures); diff --git a/test/smoke/src/test.ts b/test/smoke/src/test.ts new file mode 100644 index 0000000000000..70cc2f5d3229d --- /dev/null +++ b/test/smoke/src/test.ts @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { testDataLoss } from "./tests/data-loss"; +import { testDataMigration } from "./tests/data-migration"; +import { testExplorer } from "./tests/explorer"; +import { testConfigViews } from "./tests/configuration-views"; +import { testSearch } from "./tests/search"; +import { testCSS } from "./tests/css"; +import { testJavaScript } from "./tests/javascript"; +import { testJavaScriptDebug } from "./tests/javascript-debug"; +import { testGit } from "./tests/git"; +import { testIntegratedTerminal } from "./tests/integrated-terminal"; +import { testStatusbar } from "./tests/statusbar"; +import { testTasks } from "./tests/tasks"; +import { testExtensions } from "./tests/extensions"; +import { testLocalization } from "./tests/localization"; + +describe('Smoke Test Suite', async () => { + testDataMigration(); + testDataLoss(); + testExplorer(); + testConfigViews(); + testSearch(); + testCSS(); + testJavaScript(); + testJavaScriptDebug(); + testGit(); + testIntegratedTerminal(); + testStatusbar(); + testTasks(); + testExtensions(); + testLocalization(); +}); \ No newline at end of file diff --git a/test/smoke/src/tests.ts b/test/smoke/src/tests.ts deleted file mode 100644 index 17ca694e20936..0000000000000 --- a/test/smoke/src/tests.ts +++ /dev/null @@ -1,36 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { dataLoss } from "./tests/data-loss"; -import { dataMigration } from "./tests/data-migration"; -import { explorer } from "./tests/explorer"; -import { configurationViews } from "./tests/configuration-views"; -import { search } from "./tests/search"; -import { css } from "./tests/css"; -import { javascript } from "./tests/javascript"; -import { javascriptDebug } from "./tests/javascript-debug"; -import { test_git } from "./tests/git"; -import { integratedTerminal } from "./tests/integrated-terminal"; -import { statusBar } from "./tests/statusbar"; -import { tasks } from "./tests/tasks"; -import { extensions } from "./tests/extensions"; -import { localization } from "./tests/localization"; - -describe('Smoke Test Suite', function () { - dataMigration(); - dataLoss(); - explorer(); - configurationViews(); - search(); - css(); - javascript(); - javascriptDebug(); - test_git(); - integratedTerminal(); - statusBar(); - tasks(); - extensions(); - localization(); -}); \ No newline at end of file diff --git a/test/smoke/src/tests/configuration-views.ts b/test/smoke/src/tests/configuration-views.ts index 2f61f3337fb63..e1241b6bfb5fb 100644 --- a/test/smoke/src/tests/configuration-views.ts +++ b/test/smoke/src/tests/configuration-views.ts @@ -12,8 +12,8 @@ import { ConfigurationView, ActivityBarPosition } from "../areas/configuration-v let app: SpectronApplication; let common: CommonActions; -export function configurationViews() { - context('Configuration and views', function () { +export function testConfigViews() { + context('Configuration and views', () => { let configView: ConfigurationView; beforeEach(async function () { diff --git a/test/smoke/src/tests/css.ts b/test/smoke/src/tests/css.ts index 01a0bddbe2589..d91513f543116 100644 --- a/test/smoke/src/tests/css.ts +++ b/test/smoke/src/tests/css.ts @@ -12,8 +12,8 @@ import { CSS, CSSProblem } from '../areas/css'; let app: SpectronApplication; let common: CommonActions; -export function css() { - context('CSS', function () { +export function testCSS() { + context('CSS', () => { let css: CSS; beforeEach(async function () { diff --git a/test/smoke/src/tests/data-loss.ts b/test/smoke/src/tests/data-loss.ts index 4be1635cfcefa..e1498299e8ee8 100644 --- a/test/smoke/src/tests/data-loss.ts +++ b/test/smoke/src/tests/data-loss.ts @@ -13,8 +13,8 @@ let app: SpectronApplication; let common: CommonActions; let dl: DataLoss; -export function dataLoss() { - context('Data Loss', function () { +export function testDataLoss() { + context('Data Loss', () => { beforeEach(async function () { app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH], [`--user-data-dir=${USER_DIR}`]); diff --git a/test/smoke/src/tests/data-migration.ts b/test/smoke/src/tests/data-migration.ts index 0dba58deccbc0..4b8e627bcfe63 100644 --- a/test/smoke/src/tests/data-migration.ts +++ b/test/smoke/src/tests/data-migration.ts @@ -11,11 +11,12 @@ import { CommonActions } from '../areas/common'; let app: SpectronApplication; let common: CommonActions; -export function dataMigration() { +export function testDataMigration() { if (!STABLE_PATH) { return; } - context('Data Migration', function () { + + context('Data Migration', () => { afterEach(async function () { await app.stop(); diff --git a/test/smoke/src/tests/explorer.ts b/test/smoke/src/tests/explorer.ts index 83c2d114196f0..d1a4570f003cd 100644 --- a/test/smoke/src/tests/explorer.ts +++ b/test/smoke/src/tests/explorer.ts @@ -11,8 +11,9 @@ import { CommonActions } from '../areas/common'; let app: SpectronApplication; let common: CommonActions; -export function explorer() { - context('Explorer', function () { +export function testExplorer() { + context('Explorer', () => { + beforeEach(async function () { app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH]); common = new CommonActions(app); diff --git a/test/smoke/src/tests/extensions.ts b/test/smoke/src/tests/extensions.ts index a545dd7c674b7..9e563f2f3c104 100644 --- a/test/smoke/src/tests/extensions.ts +++ b/test/smoke/src/tests/extensions.ts @@ -9,11 +9,18 @@ import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH, EXTENSIONS_DIR } from import { CommonActions } from '../areas/common'; import { Extensions } from "../areas/extensions"; +var dns = require('dns'); + let app: SpectronApplication; let common: CommonActions; -export function extensions() { - context('Extensions', function () { +export async function testExtensions() { + const network = await networkAttached(); + if (!network) { + return; + } + + context('Extensions', () => { let extensions: Extensions; beforeEach(async function () { @@ -54,4 +61,12 @@ export function extensions() { assert.ok(x); }); }); +} + +function networkAttached(): Promise { + return new Promise((res, rej) => { + dns.resolve('marketplace.visualstudio.com', (err) => { + err ? res(false) : res(true); + }); + }); } \ No newline at end of file diff --git a/test/smoke/src/tests/git.ts b/test/smoke/src/tests/git.ts index 11d568c7f8b80..cb5e71e7fa381 100644 --- a/test/smoke/src/tests/git.ts +++ b/test/smoke/src/tests/git.ts @@ -12,8 +12,8 @@ import { Git } from "../areas/git"; let app: SpectronApplication; let common: CommonActions; -export function test_git() { - context('Git', function () { +export function testGit() { + context('Git', () => { let git: Git; beforeEach(async function () { diff --git a/test/smoke/src/tests/integrated-terminal.ts b/test/smoke/src/tests/integrated-terminal.ts index 95925d03f961d..c05a84e0b2af6 100644 --- a/test/smoke/src/tests/integrated-terminal.ts +++ b/test/smoke/src/tests/integrated-terminal.ts @@ -12,8 +12,8 @@ import { IntegratedTerminal } from "../areas/integrated-terminal"; let app: SpectronApplication; let common: CommonActions; -export function integratedTerminal() { - context('Integrated Terminal', function () { +export function testIntegratedTerminal() { + context('Integrated Terminal', () => { let terminal: IntegratedTerminal; beforeEach(async function () { diff --git a/test/smoke/src/tests/javascript-debug.ts b/test/smoke/src/tests/javascript-debug.ts index 7f85ee4f49ce8..801543f539a36 100644 --- a/test/smoke/src/tests/javascript-debug.ts +++ b/test/smoke/src/tests/javascript-debug.ts @@ -12,8 +12,8 @@ import { JavaScriptDebug } from "../areas/javascript-debug"; let app: SpectronApplication; let common: CommonActions; -export function javascriptDebug() { - context('Debugging JavaScript', function () { +export function testJavaScriptDebug() { + context('Debugging JavaScript', () => { let jsDebug: JavaScriptDebug; beforeEach(async function () { diff --git a/test/smoke/src/tests/javascript.ts b/test/smoke/src/tests/javascript.ts index 2d82fde2d4b83..490677f1f2980 100644 --- a/test/smoke/src/tests/javascript.ts +++ b/test/smoke/src/tests/javascript.ts @@ -12,8 +12,8 @@ import { JavaScript } from "../areas/javascript"; let app: SpectronApplication; let common: CommonActions; -export function javascript() { - context('JavaScript', function () { +export function testJavaScript() { + context('JavaScript', () => { let js: JavaScript; beforeEach(async function () { diff --git a/test/smoke/src/tests/localization.ts b/test/smoke/src/tests/localization.ts index 35a72186e820f..3ac81ae2f7553 100644 --- a/test/smoke/src/tests/localization.ts +++ b/test/smoke/src/tests/localization.ts @@ -12,8 +12,8 @@ import { Localization, ViewletType } from "../areas/localization"; let app: SpectronApplication; let common: CommonActions; -export function localization() { - context('Localization', function () { +export function testLocalization() { + context('Localization', () => { afterEach(async function () { return await app.stop(); }); diff --git a/test/smoke/src/tests/search.ts b/test/smoke/src/tests/search.ts index 8ab012c9b085f..ea2041d3af011 100644 --- a/test/smoke/src/tests/search.ts +++ b/test/smoke/src/tests/search.ts @@ -12,8 +12,8 @@ import { Search } from "../areas/search"; let app: SpectronApplication; let common: CommonActions; -export function search() { - context('Search', function () { +export function testSearch() { + context('Search', () => { let search: Search; beforeEach(async function () { diff --git a/test/smoke/src/tests/statusbar.ts b/test/smoke/src/tests/statusbar.ts index 6fbcf6472c4ce..86a315daebcde 100644 --- a/test/smoke/src/tests/statusbar.ts +++ b/test/smoke/src/tests/statusbar.ts @@ -12,8 +12,8 @@ import { StatusBarElement, StatusBar } from "../areas/statusBar"; let app: SpectronApplication; let common: CommonActions; -export function statusBar() { - context('Status Bar', function () { +export function testStatusbar() { + context('Status Bar', () => { let statusBar: StatusBar; beforeEach(async function () { diff --git a/test/smoke/src/tests/tasks.ts b/test/smoke/src/tests/tasks.ts index c020aceac0c4c..bbe36ef39680f 100644 --- a/test/smoke/src/tests/tasks.ts +++ b/test/smoke/src/tests/tasks.ts @@ -10,8 +10,8 @@ import { Tasks } from "../areas/tasks"; let app: SpectronApplication; -export function tasks() { - context('Tasks', function () { +export function testTasks() { + context('Tasks', () => { let tasks: Tasks; beforeEach(async function () { @@ -24,15 +24,14 @@ export function tasks() { return await app.stop(); }); - it('verifies that build task produces 6 errors', async function () { + it('verifies that eslint task results in 1 problem', async function () { await tasks.build(); const res = await tasks.getOutputResult(); - assert.equal(res, '✖ 6 problems (6 errors, 0 warnings)'); + assert.equal(res, '✖ 1 problem (0 errors, 1 warning)'); }); it(`is able to select 'Git' output`, async function () { await tasks.build(); - await app.wait(); await tasks.selectOutputViewType('Git'); const viewType = await tasks.getOutputViewType(); assert.equal(viewType, 'Git'); @@ -45,12 +44,11 @@ export function tasks() { it(`verifies build errors are reflected in 'Problems View'`, async function () { await tasks.build(); - await app.wait(); await tasks.openProblemsView(); const problemName = await tasks.getProblemsViewFirstElementName(); assert.equal(problemName, 'index.js'); const problemsCount = await tasks.getProblemsViewFirstElementCount(); - assert.equal(problemsCount, '6'); + assert.equal(problemsCount, '1'); }); }); } \ No newline at end of file From bc4688051382b91880f653099a64846f19d39f8c Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Fri, 26 May 2017 11:18:40 +0200 Subject: [PATCH 1209/2747] Code sanity. --- test/smoke/src/main.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/smoke/src/main.js b/test/smoke/src/main.js index a6acc9a7d8956..85e3778d1a7e0 100644 --- a/test/smoke/src/main.js +++ b/test/smoke/src/main.js @@ -10,7 +10,7 @@ var git = require('simple-git')(); var child_process = require('child_process'); var path = require('path'); -var tempFolder = `test_data`; +var tempFolder = 'test_data'; var testRepoUrl = 'https://github.com/Microsoft/vscode-smoketest-express'; var testRepoLocalDir = path.join(process.cwd(), `${tempFolder}/vscode-smoketest-express`); var keybindingsUrl = 'https://raw.githubusercontent.com/Microsoft/vscode-docs/master/scripts/keybindings'; @@ -41,10 +41,10 @@ if (!binaryExists(program.latest) || (program.stable && !binaryExists(program.st } // Setting up environment variables -process.env['VSCODE_LATEST_PATH'] = program.latest; -if (program.stable) process.env['VSCODE_STABLE_PATH'] = program.stable; -process.env['SMOKETEST_REPO'] = testRepoLocalDir; -if (program.stable && program.stable.toLowerCase().startsWith('insiders')) process.env['VSCODE_EDITION'] = 'insiders'; +process.env.VSCODE_LATEST_PATH = program.latest; +if (program.stable) process.env.VSCODE_STABLE_PATH = program.stable; +process.env.SMOKETEST_REPO = testRepoLocalDir; +if (program.stable && program.stable.toLowerCase().startsWith('insiders')) process.env.VSCODE_EDITION = 'insiders'; // Setting up 'vscode-smoketest-express' project var os = process.platform; @@ -112,7 +112,7 @@ function cleanOrClone(repo, dir) { function execute(cmd, dir) { return new Promise((res, rej) => { console.log(`Running ${cmd}...`); - var output = child_process.exec(cmd, { cwd: dir, stdio: [0, 1, 2] }, (error, stdout, stderr) => { + child_process.exec(cmd, { cwd: dir, stdio: [0, 1, 2] }, (error, stdout, stderr) => { if (error) rej(error); if (stderr) console.error(stderr); console.log(stdout); From e030a071355c05735d3ab248bb3f795219ec4e40 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Fri, 26 May 2017 14:52:06 +0200 Subject: [PATCH 1210/2747] Support customiying tasks --- src/vs/workbench/api/node/extHostTask.ts | 18 ++- .../parts/tasks/browser/quickOpen.ts | 14 +- .../parts/tasks/common/taskConfiguration.ts | 105 ++++++++----- .../parts/tasks/common/taskService.ts | 2 + .../parts/tasks/common/taskTemplates.ts | 139 +++--------------- src/vs/workbench/parts/tasks/common/tasks.ts | 61 +++++--- .../tasks/electron-browser/jsonSchema_v2.ts | 9 ++ .../electron-browser/task.contribution.ts | 83 ++++++----- .../electron-browser/terminalTaskSystem.ts | 16 +- .../parts/tasks/node/processTaskSystem.ts | 4 +- .../tasks/test/node/configuration.test.ts | 16 +- 11 files changed, 228 insertions(+), 239 deletions(-) diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index aa6497bc4101a..656f57739d7bc 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -230,7 +230,10 @@ namespace Strings { } namespace CommandOptions { - export function from(value: { cwd?: string; env?: { [key: string]: string; } }): TaskSystem.CommandOptions { + function isShellOptions(value: any): value is vscode.ShellOptions { + return value && typeof value.executable === 'string'; + } + export function from(value: vscode.ShellOptions | vscode.ProcessOptions): TaskSystem.CommandOptions { if (value === void 0 || value === null) { return undefined; } @@ -248,14 +251,17 @@ namespace CommandOptions { } }); } + if (isShellOptions(value)) { + result.shell = ShellConfiguration.from(value); + } return result; } } namespace ShellConfiguration { - export function from(value: { executable?: string, args?: string[] }): boolean | TaskSystem.ShellConfiguration { - if (value === void 0 || value === null || typeof value.executable !== 'string') { - return true; + export function from(value: { executable?: string, args?: string[] }): TaskSystem.ShellConfiguration { + if (value === void 0 || value === null || !value.executable) { + return undefined; } let result: TaskSystem.ShellConfiguration = { @@ -323,7 +329,7 @@ namespace Tasks { let result: TaskSystem.CommandConfiguration = { name: value.process, args: Strings.from(value.args), - isShellCommand: false, + type: TaskSystem.CommandType.Process, terminal: TerminalBehaviour.from(value.terminal) }; if (value.options) { @@ -338,7 +344,7 @@ namespace Tasks { } let result: TaskSystem.CommandConfiguration = { name: value.commandLine, - isShellCommand: ShellConfiguration.from(value.options), + type: TaskSystem.CommandType.Shell, terminal: TerminalBehaviour.from(value.terminal) }; if (value.options) { diff --git a/src/vs/workbench/parts/tasks/browser/quickOpen.ts b/src/vs/workbench/parts/tasks/browser/quickOpen.ts index 6c9afcd0b74dd..e282ee6832183 100644 --- a/src/vs/workbench/parts/tasks/browser/quickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/quickOpen.ts @@ -97,10 +97,10 @@ export abstract class QuickOpenHandler extends Quickopen.QuickOpenHandler { if (task._source.kind === TaskSourceKind.Workspace && groupWorkspace) { groupWorkspace = false; hadWorkspace = true; - entries.push(new TaskGroupEntry(this.createEntry(this.taskService, task, highlights), nls.localize('workspace', 'From Workspace'), false)); + entries.push(new TaskGroupEntry(this.createEntry(this.taskService, task, highlights), nls.localize('configured', 'Configured Tasks'), false)); } else if (task._source.kind === TaskSourceKind.Extension && groupExtension) { groupExtension = false; - entries.push(new TaskGroupEntry(this.createEntry(this.taskService, task, highlights), nls.localize('extension', 'From Extensions'), hadWorkspace)); + entries.push(new TaskGroupEntry(this.createEntry(this.taskService, task, highlights), nls.localize('detected', 'Detected Tasks'), hadWorkspace)); } else { entries.push(this.createEntry(this.taskService, task, highlights)); } @@ -125,7 +125,7 @@ class CustomizeTaskAction extends Action { private static ID = 'workbench.action.tasks.customizeTask'; private static LABEL = nls.localize('customizeTask', "Customize Task"); - constructor() { + constructor(private taskService: ITaskService, private task: Task) { super(CustomizeTaskAction.ID, CustomizeTaskAction.LABEL); this.updateClass(); } @@ -134,14 +134,14 @@ class CustomizeTaskAction extends Action { this.class = 'quick-open-task-configure'; } - public run(context: any): TPromise { - return TPromise.as(false); + public run(context: any): TPromise { + return this.taskService.customize(this.task, true).then(_ => false, _ => false); } } export class QuickOpenActionContributor extends ActionBarContributor { - constructor() { + constructor( @ITaskService private taskService: ITaskService) { super(); } @@ -156,7 +156,7 @@ export class QuickOpenActionContributor extends ActionBarContributor { const entry = this.getEntry(context); if (entry && entry.task._source.kind === TaskSourceKind.Extension) { - actions.push(new CustomizeTaskAction()); + actions.push(new CustomizeTaskAction(this.taskService, entry.task)); } return actions; } diff --git a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts index b06f6c15bf319..9af9833e240d0 100644 --- a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts @@ -11,7 +11,6 @@ import { IStringDictionary } from 'vs/base/common/collections'; import * as Platform from 'vs/base/common/platform'; import * as Types from 'vs/base/common/types'; import * as UUID from 'vs/base/common/uuid'; -import { Config as ProcessConfig } from 'vs/base/common/processes'; import { ValidationStatus, IProblemReporter as IProblemReporterBase } from 'vs/base/common/parsers'; import { @@ -32,7 +31,37 @@ export class ProblemHandling { public static clean: string = 'cleanMatcherMatchers'; } +export interface ShellConfiguration { + executable: string; + args?: string[]; +} + +export interface CommandOptions { + /** + * The current working directory of the executed program or shell. + * If omitted VSCode's current workspace root is used. + */ + cwd?: string; + + /** + * The additional environment of the executed program or shell. If omitted + * the parent process' environment is used. + */ + env?: IStringDictionary; + + /** + * The shell configuration; + */ + shell?: ShellConfiguration; +} + export interface PlatformTaskDescription { + + /** + * Whether the task is a shell task or a process task. + */ + type?: string; + /** * The command to be executed. Can be an external program or a shell * command. @@ -40,17 +69,18 @@ export interface PlatformTaskDescription { command?: string; /** + * @deprecated use the task type instead. * Specifies whether the command is a shell command and therefore must * be executed in a shell interpreter (e.g. cmd.exe, bash, ...). * * Defaults to false if omitted. */ - isShellCommand?: boolean; + isShellCommand?: boolean | ShellConfiguration; /** * The command options used when the command is executed. Can be omitted. */ - options?: ProcessConfig.CommandOptions; + options?: CommandOptions; /** * The arguments passed to the command or additional arguments passed to the @@ -166,7 +196,7 @@ export interface BaseTaskRunnerConfiguration { /** * The command options used when the command is executed. Can be omitted. */ - options?: ProcessConfig.CommandOptions; + options?: CommandOptions; /** * The arguments passed to the command. Can be omitted. @@ -308,7 +338,7 @@ interface ParseContext { } namespace CommandOptions { - export function from(this: void, options: ProcessConfig.CommandOptions, context: ParseContext): Tasks.CommandOptions { + export function from(this: void, options: CommandOptions, context: ParseContext): Tasks.CommandOptions { let result: Tasks.CommandOptions = {}; if (options.cwd !== void 0) { if (Types.isString(options.cwd)) { @@ -320,11 +350,12 @@ namespace CommandOptions { if (options.env !== void 0) { result.env = Objects.clone(options.env); } + result.shell = ShellConfiguration.from(options.shell, context); return isEmpty(result) ? undefined : result; } export function isEmpty(value: Tasks.CommandOptions): boolean { - return !value || value.cwd === void 0 && value.env === void 0; + return !value || value.cwd === void 0 && value.env === void 0 && value.shell === void 0; } export function merge(target: Tasks.CommandOptions, source: Tasks.CommandOptions): Tasks.CommandOptions { @@ -343,6 +374,7 @@ namespace CommandOptions { Object.keys(source.env).forEach(key => env[key = source.env[key]]); target.env = env; } + target.shell = ShellConfiguration.merge(target.shell, source.shell); return target; } @@ -356,6 +388,7 @@ namespace CommandOptions { if (value.cwd === void 0) { value.cwd = '${workspaceRoot}'; } + ShellConfiguration.fillDefaults(value.shell); return value; } @@ -364,14 +397,10 @@ namespace CommandOptions { if (value.env) { Object.freeze(value.env); } + ShellConfiguration.freeze(value.shell); } } -interface ShellConfiguration { - executable: string; - args?: string[]; -} - namespace ShellConfiguration { export function is(value: any): value is ShellConfiguration { let candidate: ShellConfiguration = value; @@ -424,9 +453,10 @@ namespace CommandConfiguration { interface BaseCommandConfiguationShape { command?: string; + type?: string; isShellCommand?: boolean | ShellConfiguration; args?: string[]; - options?: ProcessConfig.CommandOptions; + options?: CommandOptions; echoCommand?: boolean; showOutput?: string; terminal?: TerminalBehavior; @@ -524,21 +554,20 @@ namespace CommandConfiguration { function fromBase(this: void, config: BaseCommandConfiguationShape, context: ParseContext): Tasks.CommandConfiguration { let result: Tasks.CommandConfiguration = { name: undefined, - isShellCommand: undefined, + type: undefined, terminal: undefined }; if (Types.isString(config.command)) { result.name = config.command; } - if (Types.isBoolean(config.isShellCommand)) { - result.isShellCommand = config.isShellCommand; - } else if (ShellConfiguration.is(config.isShellCommand)) { - result.isShellCommand = ShellConfiguration.from(config.isShellCommand, context); - if (!context.isTermnial) { - context.problemReporter.warn(nls.localize('ConfigurationParser.noShell', 'Warning: shell configuration is only supported when executing tasks in the terminal.')); - } + if (Types.isString(config.type)) { + result.type = Tasks.CommandType.fromString(config.type); + } + let isShellConfiguration = ShellConfiguration.is(config.isShellCommand); + if (Types.isBoolean(config.isShellCommand) || isShellConfiguration) { + result.type = Tasks.CommandType.Shell; } else if (config.isShellCommand !== void 0) { - result.isShellCommand = !!config.isShellCommand; + result.type = !!config.isShellCommand ? Tasks.CommandType.Shell : Tasks.CommandType.Process; } if (config.args !== void 0) { if (Types.isStringArray(config.args)) { @@ -549,6 +578,12 @@ namespace CommandConfiguration { } if (config.options !== void 0) { result.options = CommandOptions.from(config.options, context); + if (result.options && result.options.shell === void 0 && isShellConfiguration) { + result.options.shell = ShellConfiguration.from(config.isShellCommand as ShellConfiguration, context); + if (!context.isTermnial) { + context.problemReporter.warn(nls.localize('ConfigurationParser.noShell', 'Warning: shell configuration is only supported when executing tasks in the terminal.')); + } + } } let terminal = TerminalBehavior.from(config, context); if (terminal) { @@ -561,13 +596,13 @@ namespace CommandConfiguration { } export function isEmpty(value: Tasks.CommandConfiguration): boolean { - return !value || value.name === void 0 && value.isShellCommand === void 0 && value.args === void 0 && CommandOptions.isEmpty(value.options) && value.terminal === void 0; + return !value || value.name === void 0 && value.type === void 0 && value.args === void 0 && CommandOptions.isEmpty(value.options) && value.terminal === void 0; } export function onlyTerminalBehaviour(value: Tasks.CommandConfiguration): boolean { return value && - value.terminal && (value.terminal.echo !== void 0 || value.terminal.reveal === void 0) && - value.name === void 0 && value.isShellCommand === void 0 && value.args === void 0 && CommandOptions.isEmpty(value.options); + value.terminal && (value.terminal.echo !== void 0 || value.terminal.reveal !== void 0) && + value.name === void 0 && value.type === void 0 && value.args === void 0 && CommandOptions.isEmpty(value.options); } export function merge(target: Tasks.CommandConfiguration, source: Tasks.CommandConfiguration): Tasks.CommandConfiguration { @@ -578,15 +613,10 @@ namespace CommandConfiguration { return source; } mergeProperty(target, source, 'name'); + mergeProperty(target, source, 'type'); // Merge isShellCommand - if (target.isShellCommand === void 0) { - target.isShellCommand = source.isShellCommand; - } if (Types.isBoolean(target.isShellCommand) && Types.isBoolean(source.isShellCommand)) { - mergeProperty(target, source, 'isShellCommand'); - } else if (ShellConfiguration.is(target.isShellCommand) && ShellConfiguration.is(source.isShellCommand)) { - ShellConfiguration.merge(target.isShellCommand, source.isShellCommand); - } else if (Types.isBoolean(target.isShellCommand) && ShellConfiguration.is(source.isShellCommand)) { - target.isShellCommand = source.isShellCommand; + if (target.type === void 0) { + target.type = source.type; } target.terminal = TerminalBehavior.merge(target.terminal, source.terminal); @@ -606,8 +636,8 @@ namespace CommandConfiguration { if (!value || Object.isFrozen(value)) { return; } - if (value.name !== void 0 && value.isShellCommand === void 0) { - value.isShellCommand = false; + if (value.name !== void 0 && value.type === void 0) { + value.type = Tasks.CommandType.Process; } value.terminal = TerminalBehavior.fillDefault(value.terminal); if (value.args === void 0) { @@ -629,9 +659,6 @@ namespace CommandConfiguration { if (value.terminal) { TerminalBehavior.freeze(value.terminal); } - if (ShellConfiguration.is(value.isShellCommand)) { - ShellConfiguration.freeze(value.isShellCommand); - } } } @@ -751,7 +778,7 @@ namespace TaskDescription { let command: Tasks.CommandConfiguration = externalTask.command !== void 0 ? CommandConfiguration.from(externalTask, context) : externalTask.echoCommand !== void 0 - ? { name: undefined, isShellCommand: undefined, terminal: CommandConfiguration.TerminalBehavior.from(externalTask, context) } + ? { name: undefined, type: undefined, terminal: CommandConfiguration.TerminalBehavior.from(externalTask, context) } : undefined; let identifer = Types.isString(externalTask.identifier) ? externalTask.identifier : taskName; let task: Tasks.Task = { @@ -797,7 +824,7 @@ namespace TaskDescription { } fillDefaults(task); let addTask: boolean = true; - if (context.isTermnial && task.command && task.command.name && task.command.isShellCommand && task.command.args && task.command.args.length > 0) { + if (context.isTermnial && task.command && task.command.name && task.command.type === Tasks.CommandType.Shell && task.command.args && task.command.args.length > 0) { if (hasUnescapedSpaces(task.command.name) || task.command.args.some(hasUnescapedSpaces)) { context.problemReporter.warn(nls.localize('taskConfiguration.shellArgs', 'Warning: the task \'{0}\' is a shell command and either the command name or one of its arguments has unescaped spaces. To ensure correct command line quoting please merge args into the command.', task.name)); } diff --git a/src/vs/workbench/parts/tasks/common/taskService.ts b/src/vs/workbench/parts/tasks/common/taskService.ts index 53f92ee18ee8b..63b2da0413770 100644 --- a/src/vs/workbench/parts/tasks/common/taskService.ts +++ b/src/vs/workbench/parts/tasks/common/taskService.ts @@ -43,6 +43,8 @@ export interface ITaskService extends IEventEmitter { terminateAll(): TPromise; tasks(): TPromise; + customize(task: Task, openConfig?: boolean): TPromise; + registerTaskProvider(handle: number, taskProvider: ITaskProvider): void; unregisterTaskProvider(handle: number): boolean; } \ No newline at end of file diff --git a/src/vs/workbench/parts/tasks/common/taskTemplates.ts b/src/vs/workbench/parts/tasks/common/taskTemplates.ts index 0d7253582b885..ca3454752668d 100644 --- a/src/vs/workbench/parts/tasks/common/taskTemplates.ts +++ b/src/vs/workbench/parts/tasks/common/taskTemplates.ts @@ -14,104 +14,6 @@ export interface TaskEntry extends IPickOpenEntry { content: string; } -const gulp: TaskEntry = { - id: 'gulp', - label: 'Gulp', - autoDetect: true, - content: [ - '{', - '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', - '\t// for the documentation about the tasks.json format', - '\t"version": "2.0.0",', - '\t"command": "gulp --no-color",', - '\t"isShellCommand": true,', - '}' - ].join('\n') -}; - -const grunt: TaskEntry = { - id: 'grunt', - label: 'Grunt', - autoDetect: true, - content: [ - '{', - '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', - '\t// for the documentation about the tasks.json format', - '\t"version": "2.0.0",', - '\t"command": "grunt --no-color",', - '\t"isShellCommand": true,', - '}' - ].join('\n') -}; - -const npm: TaskEntry = { - id: 'npm', - label: 'npm', - sort: 'NPM', - autoDetect: false, - content: [ - '{', - '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', - '\t// for the documentation about the tasks.json format', - '\t"version": "2.0.0",', - '\t"tasks": [', - '\t\t{', - '\t\t\t"taskName": "install",', - '\t\t\t"command": "npm install",', - '\t\t\t"isShellCommand": true,', - '\t\t},', - '\t\t{', - '\t\t\t"taskName": "update",', - '\t\t\t"command": "npm update",', - '\t\t\t"isShellCommand": true,', - '\t\t},', - '\t\t{', - '\t\t\t"taskName": "test",', - '\t\t\t"command": "npm run test",', - '\t\t\t"isShellCommand": true,', - '\t\t}', - '\t]', - '}' - ].join('\n') -}; - -const tscConfig: TaskEntry = { - id: 'tsc.config', - label: 'TypeScript - tsconfig.json', - autoDetect: false, - description: nls.localize('tsc.config', 'Compiles a TypeScript project'), - content: [ - '{', - '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', - '\t// for the documentation about the tasks.json format', - '\t"version": "2.0.0",', - '\t"command": "tsc -p .",', - '\t"isShellCommand": true,', - '\t"showOutput": "silent",', - '\t"problemMatcher": "$tsc"', - '}' - ].join('\n') -}; - -const tscWatch: TaskEntry = { - id: 'tsc.watch', - label: 'TypeScript - Watch Mode', - autoDetect: false, - description: nls.localize('tsc.watch', 'Compiles a TypeScript project in watch mode'), - content: [ - '{', - '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', - '\t// for the documentation about the tasks.json format', - '\t"version": "2.0.0",', - '\t"command": "tsc -w -p .",', - '\t"isShellCommand": true,', - '\t"showOutput": "silent",', - '\t"isBackground": true,', - '\t"problemMatcher": "$tsc-watch"', - '}' - ].join('\n') -}; - const dotnetBuild: TaskEntry = { id: 'dotnetCore', label: '.NET Core', @@ -122,16 +24,16 @@ const dotnetBuild: TaskEntry = { '{', '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', '\t// for the documentation about the tasks.json format', - '\t"version": "0.1.0",', - '\t"command": "dotnet",', - '\t"isShellCommand": true,', - '\t"args": [],', + '\t"version": "2.0.0",', '\t"tasks": [', '\t\t{', '\t\t\t"taskName": "build",', - '\t\t\t"args": [ ],', - '\t\t\t"isBuildCommand": true,', - '\t\t\t"showOutput": "silent",', + '\t\t\t"command": "dotnet",', + '\t\t\t"isShellCommand": true,', + '\t\t\t"group": "build",', + '\t\t\t"terminal": {', + '\t\t\t\t"reveal": "silent"', + '\t\t\t},', '\t\t\t"problemMatcher": "$msCompile"', '\t\t}', '\t]', @@ -149,18 +51,20 @@ const msbuild: TaskEntry = { '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', '\t// for the documentation about the tasks.json format', '\t"version": "2.0.0",', - '\t"command": "msbuild",', - '\t"args": [', - '\t\t// Ask msbuild to generate full paths for file names.', - '\t\t"/property:GenerateFullPaths=true"', - '\t],', - '\t"taskSelector": "/t:",', - '\t"showOutput": "silent",', '\t"tasks": [', '\t\t{', '\t\t\t"taskName": "build",', - '\t\t\t// Show the output window only if unrecognized errors occur.', - '\t\t\t"showOutput": "silent",', + '\t\t\t"command": "msbuild",', + '\t\t\t"args": [', + '\t\t\t\t// Ask msbuild to generate full paths for file names.', + '\t\t\t\t"/property:GenerateFullPaths=true",', + '\t\t\t\t"/t:build"', + '\t\t\t],', + '\t\t\t"group": "build",', + '\t\t\t"terminal": {', + '\t\t\t\t// Reveal the terminal only if unrecognized errors occur.', + '\t\t\t\t"reveal": "silent"', + '\t\t\t},', '\t\t\t// Use the standard MS compiler pattern to detect errors, warnings and infos', '\t\t\t"problemMatcher": "$msCompile"', '\t\t}', @@ -201,26 +105,25 @@ const maven: TaskEntry = { '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', '\t// for the documentation about the tasks.json format', '\t"version": "2.0.0",', - '\t"showOutput": "always",', '\t"tasks": [', '\t\t{', '\t\t\t"taskName": "verify",', '\t\t\t"command": "mvn -B verify",', '\t\t\t"isShellCommand": true,', - '\t\t\t"isBuildCommand": true', + '\t\t\t"group": "build"', '\t\t},', '\t\t{', '\t\t\t"taskName": "test",', '\t\t\t"command": "mvn -B test",', '\t\t\t"isShellCommand": true,', - '\t\t\t"isTestCommand": true', + '\t\t\t"group": "test"', '\t\t}', '\t]', '}' ].join('\n') }; -export let templates: TaskEntry[] = [gulp, grunt, tscConfig, tscWatch, dotnetBuild, msbuild, npm, maven].sort((a, b) => { +export let templates: TaskEntry[] = [dotnetBuild, msbuild, maven].sort((a, b) => { return (a.sort || a.label).localeCompare(b.sort || b.label); }); templates.push(command); diff --git a/src/vs/workbench/parts/tasks/common/tasks.ts b/src/vs/workbench/parts/tasks/common/tasks.ts index 4b3031da91fd2..c3e90f83fb68f 100644 --- a/src/vs/workbench/parts/tasks/common/tasks.ts +++ b/src/vs/workbench/parts/tasks/common/tasks.ts @@ -9,20 +9,6 @@ import * as Types from 'vs/base/common/types'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { ProblemMatcher } from 'vs/platform/markers/common/problemMatcher'; -export interface CommandOptions { - /** - * The current working directory of the executed program or shell. - * If omitted VSCode's current workspace root is used. - */ - cwd?: string; - - /** - * The environment of the executed program or shell. If omitted - * the parent process' environment is used. - */ - env?: { [key: string]: string; }; -} - export interface ShellConfiguration { /** * The shell executable. @@ -41,6 +27,26 @@ export namespace ShellConfiguration { } } +export interface CommandOptions { + + /** + * The shell to use if the task is a shell command. + */ + shell?: ShellConfiguration; + + /** + * The current working directory of the executed program or shell. + * If omitted VSCode's current workspace root is used. + */ + cwd?: string; + + /** + * The environment of the executed program or shell. If omitted + * the parent process' environment is used. + */ + env?: { [key: string]: string; }; +} + export enum RevealKind { /** * Always brings the terminal to front if the task is executed. @@ -87,16 +93,35 @@ export interface TerminalBehavior { echo: boolean; } +export enum CommandType { + Shell = 1, + Process = 2 +} + +export namespace CommandType { + export function fromString(value: string): CommandType { + switch (value.toLowerCase()) { + case 'shell': + return CommandType.Shell; + case 'process': + return CommandType.Process; + default: + return CommandType.Process; + } + } +} + export interface CommandConfiguration { + /** - * The command to execute + * The task type */ - name: string; + type: CommandType; /** - * Whether the command is a shell command or not + * The command to execute */ - isShellCommand: boolean | ShellConfiguration; + name: string; /** * Additional command options. diff --git a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts index 4ece04baf2ea9..2efb28f4d6a23 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts @@ -104,6 +104,13 @@ const group: IJSONSchema = { description: nls.localize('JsonSchema.tasks.group', 'Defines to which execution group this task belongs to. If omitted the task belongs to no group') }; +const taskType: IJSONSchema = { + type: 'string', + enum: ['shell', 'process'], + default: 'process', + description: nls.localize('JsonSchema.tasks.type', 'Defines whether the task is run as a process or as a command inside a shell. Default is process') +}; + schema.definitions = Objects.deepClone(commonSchema.definitions); let definitions = schema.definitions; definitions.commandConfiguration.properties.isShellCommand = Objects.deepClone(shellCommand); @@ -113,6 +120,8 @@ definitions.showOutputType.deprecationMessage = nls.localize('JsonSchema.tasks.s definitions.taskDescription.properties.echoCommand.deprecationMessage = nls.localize('JsonSchema.tasks.echoCommand.deprecated', 'The property echoCommand is deprecated. Use the terminal property instead.'); definitions.taskDescription.properties.isBuildCommand.deprecationMessage = nls.localize('JsonSchema.tasks.isBuildCommand.deprecated', 'The property isBuildCommand is deprecated. Use the group property instead.'); definitions.taskDescription.properties.isTestCommand.deprecationMessage = nls.localize('JsonSchema.tasks.isTestCommand.deprecated', 'The property isTestCommand is deprecated. Use the group property instead.'); +definitions.taskDescription.properties.type = taskType; +definitions.taskDescription.properties.isShellCommand.deprecationMessage = nls.localize('JsonSchema.tasks.isShellCommand.deprecated', 'The property isShellCommand is deprecated. Use the type property instead.'); definitions.taskDescription.properties.terminal = terminal; definitions.taskDescription.properties.group = group; definitions.taskRunnerConfiguration.properties.isShellCommand = Objects.deepClone(shellCommand); diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 98b390f2f21ff..49c14ca211049 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -61,6 +61,7 @@ import Constants from 'vs/workbench/parts/markers/common/constants'; import { IPartService } from 'vs/workbench/services/part/common/partService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IConfigurationResolverService } from 'vs/workbench/services/configurationResolver/common/configurationResolver'; +import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; @@ -118,40 +119,13 @@ abstract class OpenTaskConfigurationAction extends Action { if (!selection) { return undefined; } - let contentPromise: TPromise; - if (selection.autoDetect) { - contentPromise = this.extensionService.activateByEvent('onCommand:workbench.action.tasks.runTask').then(() => { - return this.taskService.tasks().then((tasks) => { - let tasksToInsert: Task[] = tasks.filter((task) => { - return task.identifier && task.identifier.indexOf(selection.id) === 0 && task.identifier[selection.id.length] === '.' && task.group !== void 0; - }); - if (tasksToInsert.length === 0) { - return selection.content; - } - let config: TaskConfig.ExternalTaskRunnerConfiguration = { - version: '2.0.0', - tasks: tasksToInsert.map((task) => { return { taskName: task.name }; }) - }; - let content = JSON.stringify(config, null, '\t'); - content = [ - '{', - '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', - '\t// for the documentation about the tasks.json format', - ].join('\n') + content.substr(1); - return content; - }); - }); - } else { - contentPromise = TPromise.as(selection.content); + let content = selection.content; + let editorConfig = this.configurationService.getConfiguration(); + if (editorConfig.editor.insertSpaces) { + content = content.replace(/(\n)(\t+)/g, (_, s1, s2) => s1 + strings.repeat(' ', s2.length * editorConfig.editor.tabSize)); } - return contentPromise.then(content => { - let editorConfig = this.configurationService.getConfiguration(); - if (editorConfig.editor.insertSpaces) { - content = content.replace(/(\n)(\t+)/g, (_, s1, s2) => s1 + strings.repeat(' ', s2.length * editorConfig.editor.tabSize)); - } - configFileCreated = true; - return this.fileService.createFile(this.contextService.toResource('.vscode/tasks.json'), content); - }); + configFileCreated = true; + return this.fileService.createFile(this.contextService.toResource('.vscode/tasks.json'), content); }); }).then((stat) => { if (!stat) { @@ -187,7 +161,6 @@ class ConfigureTaskRunnerAction extends OpenTaskConfigurationAction { outputService, messageService, quickOpenService, environmentService, configurationResolverService, extensionService); } - } class ConfigureBuildTaskAction extends OpenTaskConfigurationAction { @@ -503,6 +476,7 @@ class TaskService extends EventEmitter implements ITaskService { private modeService: IModeService; private configurationService: IConfigurationService; + private configurationEditingService: IConfigurationEditingService; private markerService: IMarkerService; private outputService: IOutputService; private messageService: IMessageService; @@ -526,6 +500,7 @@ class TaskService extends EventEmitter implements ITaskService { private _outputChannel: IOutputChannel; constructor( @IModeService modeService: IModeService, @IConfigurationService configurationService: IConfigurationService, + @IConfigurationEditingService configurationEditingService: IConfigurationEditingService, @IMarkerService markerService: IMarkerService, @IOutputService outputService: IOutputService, @IMessageService messageService: IMessageService, @IWorkbenchEditorService editorService: IWorkbenchEditorService, @IFileService fileService: IFileService, @IWorkspaceContextService contextService: IWorkspaceContextService, @@ -542,6 +517,7 @@ class TaskService extends EventEmitter implements ITaskService { super(); this.modeService = modeService; this.configurationService = configurationService; + this.configurationEditingService = configurationEditingService; this.markerService = markerService; this.outputService = outputService; this.messageService = messageService; @@ -723,6 +699,43 @@ class TaskService extends EventEmitter implements ITaskService { }); } + public customize(task: Task, openConfig: boolean = false): TPromise { + if (task._source.kind !== TaskSourceKind.Extension) { + return TPromise.as(undefined); + } + let configuration = this.getConfiguration(); + if (configuration.hasParseErrors) { + this.messageService.show(Severity.Warning, nls.localize('customizeParseErrors', 'The current task configuration has errors. Please fix the errors first before customizing a task.')); + return TPromise.as(undefined); + } + let fileConfig = configuration.config; + let customize = { taskName: task.name }; + if (!fileConfig) { + fileConfig = { + version: '2.0.0', + tasks: [customize] + }; + } else { + if (Array.isArray(fileConfig.tasks)) { + fileConfig.tasks.push(customize); + } else { + fileConfig.tasks = [customize]; + } + }; + return this.configurationEditingService.writeConfiguration(ConfigurationTarget.WORKSPACE, { key: 'tasks', value: fileConfig }).then(() => { + if (openConfig) { + let resource = this.contextService.toResource('.vscode/tasks.json'); + this.editorService.openEditor({ + resource: resource, + options: { + forceOpen: true, + pinned: false + } + }, false); + } + }); + } + private createRunnableTask(sets: TaskSet[], group: TaskGroup): { task: Task; resolver: ITaskResolver } { let uuidMap: IStringDictionary = Object.create(null); let identifierMap: IStringDictionary = Object.create(null); @@ -740,6 +753,8 @@ class TaskService extends EventEmitter implements ITaskService { if (primaryTasks.length === 0) { return undefined; } + // check for a WORKSPACE build task and use that onemptied.apply + let resolver: ITaskResolver = { resolve: (id: string) => { let result = uuidMap[id]; diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index 504d0114385e2..bf6065aa66a3f 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -33,7 +33,7 @@ import { IConfigurationResolverService } from 'vs/workbench/services/configurati import { ITerminalService, ITerminalInstance, IShellLaunchConfig } from 'vs/workbench/parts/terminal/common/terminal'; import { IOutputService, IOutputChannel } from 'vs/workbench/parts/output/common/output'; import { StartStopProblemCollector, WatchingProblemCollector, ProblemCollectorEvents } from 'vs/workbench/parts/tasks/common/problemCollectors'; -import { Task, RevealKind, CommandOptions, ShellConfiguration } from 'vs/workbench/parts/tasks/common/tasks'; +import { Task, RevealKind, CommandOptions, ShellConfiguration, CommandType } from 'vs/workbench/parts/tasks/common/tasks'; import { ITaskSystem, ITaskSummary, ITaskExecuteResult, TaskExecuteKind, TaskError, TaskErrors, ITaskResolver, TelemetryEvent, Triggers, TaskSystemEvents, TaskEvent, TaskType @@ -368,17 +368,19 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { let terminalName = nls.localize('TerminalTaskSystem.terminalName', 'Task - {0}', task.name); let waitOnExit = task.command.terminal.reveal !== RevealKind.Never || !task.isBackground; let shellLaunchConfig: IShellLaunchConfig = undefined; - if (task.command.isShellCommand) { + let isShellCommand = task.command.type === CommandType.Shell; + if (isShellCommand) { if (Platform.isWindows && ((options.cwd && TPath.isUNC(options.cwd)) || (!options.cwd && TPath.isUNC(process.cwd())))) { throw new TaskError(Severity.Error, nls.localize('TerminalTaskSystem', 'Can\'t execute a shell command on an UNC drive.'), TaskErrors.UnknownError); } shellLaunchConfig = { name: terminalName, executable: null, args: null, waitOnExit }; let shellSpecified: boolean = false; - if (ShellConfiguration.is(task.command.isShellCommand)) { - shellLaunchConfig.executable = task.command.isShellCommand.executable; + let shellOptions: ShellConfiguration = task.command.options && task.command.options.shell; + if (shellOptions && shellOptions.executable) { + shellLaunchConfig.executable = shellOptions.executable; shellSpecified = true; - if (task.command.isShellCommand.args) { - shellLaunchConfig.args = task.command.isShellCommand.args.slice(); + if (shellOptions.args) { + shellLaunchConfig.args = shellOptions.args.slice(); } else { shellLaunchConfig.args = []; } @@ -422,7 +424,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { let cwd = options && options.cwd ? options.cwd : process.cwd(); // On Windows executed process must be described absolute. Since we allowed command without an // absolute path (e.g. "command": "node") we need to find the executable in the CWD or PATH. - let executable = Platform.isWindows && !task.command.isShellCommand ? this.findExecutable(command, cwd) : command; + let executable = Platform.isWindows && !isShellCommand ? this.findExecutable(command, cwd) : command; shellLaunchConfig = { name: terminalName, executable: executable, diff --git a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts index 848368e6dc491..2a1fcb76e73a3 100644 --- a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts @@ -29,7 +29,7 @@ import { StartStopProblemCollector, WatchingProblemCollector, ProblemCollectorEv import { ITaskSystem, ITaskSummary, ITaskExecuteResult, TaskExecuteKind, TaskError, TaskErrors, TelemetryEvent, Triggers, TaskSystemEvents, TaskEvent, TaskType } from 'vs/workbench/parts/tasks/common/taskSystem'; -import { Task, CommandOptions, RevealKind, CommandConfiguration } from 'vs/workbench/parts/tasks/common/tasks'; +import { Task, CommandOptions, RevealKind, CommandConfiguration, CommandType } from 'vs/workbench/parts/tasks/common/tasks'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; @@ -175,7 +175,7 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem { } args = this.resolveVariables(args); let command: string = this.resolveVariable(commandConfig.name); - this.childProcess = new LineProcess(command, args, !!commandConfig.isShellCommand, this.resolveOptions(commandConfig.options)); + this.childProcess = new LineProcess(command, args, commandConfig.type === CommandType.Shell, this.resolveOptions(commandConfig.options)); telemetryEvent.command = this.childProcess.getSanitizedCommand(); // we have no problem matchers defined. So show the output log let reveal = task.command.terminal.reveal; diff --git a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts index 091899e941a92..03610ad7ecca0 100644 --- a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts +++ b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts @@ -96,7 +96,7 @@ class CommandConfigurationBuilder { this.terminalBuilder = new TerminalBehaviorBuilder(this); this.result = { name: command, - isShellCommand: false, + type: Tasks.CommandType.Process, args: [], options: { cwd: '${workspaceRoot}' @@ -110,8 +110,8 @@ class CommandConfigurationBuilder { return this; } - public shell(value: boolean): CommandConfigurationBuilder { - this.result.isShellCommand = value; + public type(value: Tasks.CommandType): CommandConfigurationBuilder { + this.result.type = value; return this; } @@ -433,7 +433,7 @@ function assertCommandConfiguration(actual: Tasks.CommandConfiguration, expected if (actual && expected) { assertTerminalBehavior(actual.terminal, expected.terminal); assert.strictEqual(actual.name, expected.name, 'name'); - assert.strictEqual(actual.isShellCommand, expected.isShellCommand, 'isShellCommand'); + assert.strictEqual(actual.type, expected.type, 'task type'); assert.deepEqual(actual.args, expected.args, 'args'); assert.strictEqual(typeof actual.options, typeof expected.options); if (actual.options && expected.options) { @@ -531,7 +531,7 @@ suite('Tasks Configuration parsing tests', () => { group(Tasks.TaskGroup.Build). suppressTaskName(true). command(). - shell(true); + type(Tasks.CommandType.Shell); testConfiguration( { version: '0.1.0', @@ -730,7 +730,7 @@ suite('Tasks Configuration parsing tests', () => { group(Tasks.TaskGroup.Build). suppressTaskName(true). command(). - shell(true); + type(Tasks.CommandType.Shell); let external: ExternalTaskRunnerConfiguration = { version: '0.1.0', command: 'tsc', @@ -1280,7 +1280,7 @@ suite('Tasks Configuration parsing tests', () => { }; let builder = new ConfiguationBuilder(); builder.task('taskNameOne', 'tsc').suppressTaskName(true).command(). - shell(true).args(['arg']).options({ cwd: 'cwd', env: { env: 'env' } }); + type(Tasks.CommandType.Shell).args(['arg']).options({ cwd: 'cwd', env: { env: 'env' } }); testConfiguration(external, builder); }); @@ -1355,7 +1355,7 @@ suite('Tasks Configuration parsing tests', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskNameOne', 'tsc').command().shell(false); + builder.task('taskNameOne', 'tsc').command().type(Tasks.CommandType.Process); testConfiguration(external, builder); }); }); From abb10a8520e38b4f81ace849a3c6e43a9a6b9c0f Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Fri, 26 May 2017 14:57:53 +0200 Subject: [PATCH 1211/2747] Allowed async for smoke test folder. --- tslint.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tslint.json b/tslint.json index 9c0f132b77e5f..b61b70ab04611 100644 --- a/tslint.json +++ b/tslint.json @@ -66,7 +66,8 @@ "node", "electron-main", "electron-browser", - "extensions" + "extensions", + "smoke" ] ] } From 447622435ae4745a0a4b9b7033e178d399c82b88 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Fri, 26 May 2017 15:17:19 +0200 Subject: [PATCH 1212/2747] Remove ProblemMatchers from API. --- src/vs/vscode.d.ts | 215 +----------------- src/vs/workbench/api/node/extHost.api.impl.ts | 2 - src/vs/workbench/api/node/extHostTask.ts | 8 +- src/vs/workbench/api/node/extHostTypes.ts | 20 +- .../workbench/parts/tasks/common/task.api.ts | 213 +++++++++++++++++ 5 files changed, 231 insertions(+), 227 deletions(-) create mode 100644 src/vs/workbench/parts/tasks/common/task.api.ts diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index e9645e8147d47..f9587fccbe028 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -3509,215 +3509,6 @@ declare module 'vscode' { update(key: string, value: any): Thenable; } - /** - * Defines a problem pattern - */ - export interface ProblemPattern { - - /** - * The regular expression to find a problem in the console output of an - * executed task. - */ - regexp: RegExp; - - /** - * The match group index of the filename. - * - * Defaults to 1 if omitted. - */ - file?: number; - - /** - * The match group index of the problems's location. Valid location - * patterns are: (line), (line,column) and (startLine,startColumn,endLine,endColumn). - * If omitted the line and colum properties are used. - */ - location?: number; - - /** - * The match group index of the problem's line in the source file. - * - * Defaults to 2 if omitted. - */ - line?: number; - - /** - * The match group index of the problem's character in the source file. - * - * Defaults to 3 if omitted. - */ - character?: number; - - /** - * The match group index of the problem's end line in the source file. - * - * Defaults to undefined. No end line is captured. - */ - endLine?: number; - - /** - * The match group index of the problem's end character in the source file. - * - * Defaults to undefined. No end column is captured. - */ - endCharacter?: number; - - /** - * The match group index of the problem's severity. - * - * Defaults to undefined. In this case the problem matcher's severity - * is used. - */ - severity?: number; - - /** - * The match group index of the problems's code. - * - * Defaults to undefined. No code is captured. - */ - code?: number; - - /** - * The match group index of the message. If omitted it defaults - * to 4 if location is specified. Otherwise it defaults to 5. - */ - message?: number; - - /** - * Specifies if the last pattern in a multi line problem matcher should - * loop as long as it does match a line consequently. Only valid on the - * last problem pattern in a multi line problem matcher. - */ - loop?: boolean; - } - - /** - * A multi line problem pattern. - */ - export type MultiLineProblemPattern = ProblemPattern[]; - - /** - * The way how the file location is interpreted - */ - export enum FileLocationKind { - /** - * VS Code should decide based on whether the file path found in the - * output is absolute or relative. A relative file path will be treated - * relative to the workspace root. - */ - Auto = 1, - - /** - * Always treat the file path relative. - */ - Relative = 2, - - /** - * Always treat the file path absolute. - */ - Absolute = 3 - } - - /** - * Controls to which kind of documents problems are applied. - */ - export enum ApplyToKind { - /** - * Problems are applied to all documents. - */ - AllDocuments = 1, - - /** - * Problems are applied to open documents only. - */ - OpenDocuments = 2, - - - /** - * Problems are applied to closed documents only. - */ - ClosedDocuments = 3 - } - - - /** - * A background monitor pattern - */ - export interface BackgroundPattern { - /** - * The actual regular expression - */ - regexp: RegExp; - - /** - * The match group index of the filename. If provided the expression - * is matched for that file only. - */ - file?: number; - } - - /** - * A description to control the activity of a problem matcher - * watching a background task. - */ - export interface BackgroundMonitor { - /** - * If set to true the monitor is in active mode when the task - * starts. This is equals of issuing a line that matches the - * beginPattern. - */ - activeOnStart?: boolean; - - /** - * If matched in the output the start of a background activity is signaled. - */ - beginsPattern: RegExp | BackgroundPattern; - - /** - * If matched in the output the end of a background activity is signaled. - */ - endsPattern: RegExp | BackgroundPattern; - } - - /** - * Defines a problem matcher - */ - export interface ProblemMatcher { - /** - * The owner of a problem. Defaults to a generated id - * if omitted. - */ - owner?: string; - - /** - * The type of documents problems detected by this matcher - * apply to. Default to `ApplyToKind.AllDocuments` if omitted. - */ - applyTo?: ApplyToKind; - - /** - * How a file location recognized by a matcher should be interpreted. If omitted the file location - * if `FileLocationKind.Auto`. - */ - fileLocation?: FileLocationKind | string; - - /** - * The actual pattern used by the problem matcher. - */ - pattern: ProblemPattern | MultiLineProblemPattern; - - /** - * The default severity of a detected problem in the output. Used - * if the `ProblemPattern` doesn't define a severity match group. - */ - severity?: DiagnosticSeverity; - - /** - * A background monitor for tasks that are running in the background. - */ - backgound?: BackgroundMonitor; - } - /** * Controls the behaviour of the terminal's visibility. */ @@ -3797,7 +3588,7 @@ declare module 'vscode' { /** * The ProblemMatchers type definition. */ - export type ProblemMatchers = string | ProblemMatcher | (string | ProblemMatcher)[]; + export type ProblemMatchers = string | string[]; /** * A task that starts an external process. @@ -3881,7 +3672,7 @@ declare module 'vscode' { * The problem matchers attached to the task. Defaults to an empty * array. */ - problemMatchers: (string | ProblemMatcher)[]; + problemMatchers: string[]; } export type ShellOptions = { @@ -4001,7 +3792,7 @@ declare module 'vscode' { * The problem matchers attached to the task. Defaults to an empty * array. */ - problemMatchers: (string | ProblemMatcher)[]; + problemMatchers: string[]; } export type Task = ProcessTask | ShellTask; diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index eb5b38f2391f0..80ab4b01781f6 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -536,8 +536,6 @@ export function createApiFactory( TreeItemCollapsibleState: extHostTypes.TreeItemCollapsibleState, ThemeColor: extHostTypes.ThemeColor, // functions - FileLocationKind: extHostTypes.FileLocationKind, - ApplyToKind: extHostTypes.ApplyToKind, RevealKind: extHostTypes.RevealKind, TaskGroup: extHostTypes.TaskGroup, ShellTask: extHostTypes.ShellTask, diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index 65e818dafc380..19b3bcaae5dd7 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -8,13 +8,11 @@ import { TPromise } from 'vs/base/common/winjs.base'; import * as UUID from 'vs/base/common/uuid'; import { asWinJsPromise } from 'vs/base/common/async'; -import * as Problems from 'vs/platform/markers/common/problemMatcher'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import * as TaskSystem from 'vs/workbench/parts/tasks/common/tasks'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { MainContext, MainThreadTaskShape, ExtHostTaskShape } from 'vs/workbench/api/node/extHost.protocol'; -import { fromDiagnosticSeverity } from 'vs/workbench/api/node/extHostTypeConverters'; import * as types from 'vs/workbench/api/node/extHostTypes'; import * as vscode from 'vscode'; @@ -23,6 +21,7 @@ interface StringMap { [key: string]: V; } +/* namespace ProblemPattern { export function from(value: vscode.ProblemPattern | vscode.MultiLineProblemPattern): Problems.ProblemPattern | Problems.MultiLineProblemPattern { if (value === void 0 || value === null) { @@ -144,7 +143,7 @@ namespace WatchingPattern { } } -namespace WathingMatcher { +namespace BackgroundMonitor { export function from(value: vscode.BackgroundMonitor): Problems.WatchingMatcher { if (value === void 0 || value === null) { return undefined; @@ -190,6 +189,7 @@ namespace ProblemMatcher { return result; } } +*/ namespace RevealKind { export function from(value: vscode.RevealKind): TaskSystem.ShowOutput { @@ -314,7 +314,7 @@ namespace Tasks { showOutput: behaviour.showOutput, isBackground: !!task.isBackground, suppressTaskName: true, - problemMatchers: ProblemMatcher.from(task.problemMatchers) + problemMatchers: task.problemMatchers.slice() }; return result; } diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index 20b0d2a1aff0a..d78f0d8d75ea9 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1018,12 +1018,12 @@ export enum RevealKind { export class BaseTask { private _name: string; - private _problemMatchers: (string | vscode.ProblemMatcher)[]; + private _problemMatchers: string[]; private _identifier: string; private _isBackground: boolean; private _terminal: vscode.TerminalBehaviour; - constructor(name: string, problemMatchers: (string | vscode.ProblemMatcher)[]) { + constructor(name: string, problemMatchers: string[]) { if (typeof name !== 'string') { throw illegalArgument('name'); } @@ -1074,11 +1074,11 @@ export class BaseTask { this._terminal = value; } - get problemMatchers(): (string | vscode.ProblemMatcher)[] { + get problemMatchers(): string[] { return this._problemMatchers; } - set problemMatchers(value: (string | vscode.ProblemMatcher)[]) { + set problemMatchers(value: string[]) { if (!Array.isArray(value)) { value = []; } @@ -1086,12 +1086,14 @@ export class BaseTask { } } +/* namespace ProblemMatcher { export function is(value: any): value is vscode.ProblemMatcher { let candidate: vscode.ProblemMatcher = value; return candidate && !!candidate.pattern; } } +*/ namespace ShellOptions { export function is(value: any): value is vscode.ShellOptions { @@ -1144,7 +1146,7 @@ export class ProcessTask extends BaseTask { args = arg3 || []; if (arg4) { - if (Array.isArray(arg4) || typeof arg4 === 'string' || ProblemMatcher.is(arg4)) { + if (Array.isArray(arg4) || typeof arg4 === 'string') { problemMatchers = arg4; } else { options = arg4; @@ -1153,8 +1155,8 @@ export class ProcessTask extends BaseTask { if (arg5 && !problemMatchers) { problemMatchers = arg5; } - let pm: (string | vscode.ProblemMatcher)[]; - if (problemMatchers && (typeof problemMatchers === 'string' || ProblemMatcher.is(problemMatchers))) { + let pm: string[]; + if (problemMatchers && (typeof problemMatchers === 'string')) { pm = [problemMatchers]; } else if (Array.isArray(problemMatchers)) { pm = problemMatchers; @@ -1217,13 +1219,13 @@ export class ShellTask extends BaseTask implements vscode.ShellTask { throw illegalArgument('commandLine'); } let options: vscode.ShellOptions = undefined; - let pm: (string | vscode.ProblemMatcher)[]; + let pm: string[]; if (ShellOptions.is(optionsOrProblemMatchers)) { options = optionsOrProblemMatchers; } else { problemMatchers = optionsOrProblemMatchers; } - if (problemMatchers && (typeof problemMatchers === 'string' || ProblemMatcher.is(problemMatchers))) { + if (problemMatchers && (typeof problemMatchers === 'string')) { pm = [problemMatchers]; } else if (Array.isArray(problemMatchers)) { pm = problemMatchers; diff --git a/src/vs/workbench/parts/tasks/common/task.api.ts b/src/vs/workbench/parts/tasks/common/task.api.ts new file mode 100644 index 0000000000000..212047ae08416 --- /dev/null +++ b/src/vs/workbench/parts/tasks/common/task.api.ts @@ -0,0 +1,213 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +/** + * Defines a problem pattern + */ +export interface ProblemPattern { + + /** + * The regular expression to find a problem in the console output of an + * executed task. + */ + regexp: RegExp; + + /** + * The match group index of the filename. + * + * Defaults to 1 if omitted. + */ + file?: number; + + /** + * The match group index of the problems's location. Valid location + * patterns are: (line), (line,column) and (startLine,startColumn,endLine,endColumn). + * If omitted the line and colum properties are used. + */ + location?: number; + + /** + * The match group index of the problem's line in the source file. + * + * Defaults to 2 if omitted. + */ + line?: number; + + /** + * The match group index of the problem's character in the source file. + * + * Defaults to 3 if omitted. + */ + character?: number; + + /** + * The match group index of the problem's end line in the source file. + * + * Defaults to undefined. No end line is captured. + */ + endLine?: number; + + /** + * The match group index of the problem's end character in the source file. + * + * Defaults to undefined. No end column is captured. + */ + endCharacter?: number; + + /** + * The match group index of the problem's severity. + * + * Defaults to undefined. In this case the problem matcher's severity + * is used. + */ + severity?: number; + + /** + * The match group index of the problems's code. + * + * Defaults to undefined. No code is captured. + */ + code?: number; + + /** + * The match group index of the message. If omitted it defaults + * to 4 if location is specified. Otherwise it defaults to 5. + */ + message?: number; + + /** + * Specifies if the last pattern in a multi line problem matcher should + * loop as long as it does match a line consequently. Only valid on the + * last problem pattern in a multi line problem matcher. + */ + loop?: boolean; +} + +/** + * A multi line problem pattern. + */ +export type MultiLineProblemPattern = ProblemPattern[]; + +/** + * The way how the file location is interpreted + */ +export enum FileLocationKind { + /** + * VS Code should decide based on whether the file path found in the + * output is absolute or relative. A relative file path will be treated + * relative to the workspace root. + */ + Auto = 1, + + /** + * Always treat the file path relative. + */ + Relative = 2, + + /** + * Always treat the file path absolute. + */ + Absolute = 3 +} + +/** + * Controls to which kind of documents problems are applied. + */ +export enum ApplyToKind { + /** + * Problems are applied to all documents. + */ + AllDocuments = 1, + + /** + * Problems are applied to open documents only. + */ + OpenDocuments = 2, + + + /** + * Problems are applied to closed documents only. + */ + ClosedDocuments = 3 +} + + +/** + * A background monitor pattern + */ +export interface BackgroundPattern { + /** + * The actual regular expression + */ + regexp: RegExp; + + /** + * The match group index of the filename. If provided the expression + * is matched for that file only. + */ + file?: number; +} + +/** + * A description to control the activity of a problem matcher + * watching a background task. + */ +export interface BackgroundMonitor { + /** + * If set to true the monitor is in active mode when the task + * starts. This is equals of issuing a line that matches the + * beginPattern. + */ + activeOnStart?: boolean; + + /** + * If matched in the output the start of a background activity is signaled. + */ + beginsPattern: RegExp | BackgroundPattern; + + /** + * If matched in the output the end of a background activity is signaled. + */ + endsPattern: RegExp | BackgroundPattern; +} + +/** + * Defines a problem matcher + */ +export interface ProblemMatcher { + /** + * The owner of a problem. Defaults to a generated id + * if omitted. + */ + owner?: string; + + /** + * The type of documents problems detected by this matcher + * apply to. Default to `ApplyToKind.AllDocuments` if omitted. + */ + applyTo?: ApplyToKind; + + /** + * How a file location recognized by a matcher should be interpreted. If omitted the file location + * if `FileLocationKind.Auto`. + */ + fileLocation?: FileLocationKind | string; + + /** + * The actual pattern used by the problem matcher. + */ + pattern: ProblemPattern | MultiLineProblemPattern; + + /** + * The default severity of a detected problem in the output. Used + * if the `ProblemPattern` doesn't define a severity match group. + */ + severity?: any; + + /** + * A background monitor for tasks that are running in the background. + */ + backgound?: BackgroundMonitor; +} \ No newline at end of file From 201ea1922ec96aeb1e1fbe3fd838df4dd53a5127 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 May 2017 15:29:02 +0200 Subject: [PATCH 1213/2747] snippets - fix test failures because 'deleteLeft' is gone --- .../contrib/snippet/test/browser/snippetController2.test.ts | 2 +- .../editor/contrib/snippet/test/browser/snippetSession.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts index 6c30a1793156b..b862a3dba9232 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts @@ -131,7 +131,7 @@ suite('SnippetController2', function () { assertContextKeys(contextKeys, true, false, true); assertSelections(editor, new Selection(1, 1, 1, 7), new Selection(2, 5, 2, 11)); - editor.trigger('test', 'deleteLeft', {}); + editor.trigger('test', 'cut', {}); assertContextKeys(contextKeys, true, false, true); assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts index 100b9c0dbd872..d6a999e751e76 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts @@ -388,7 +388,7 @@ suite('SnippetSession', function () { session.next(); assertSelections(editor, new Selection(1, 9, 1, 15)); - editor.trigger('test', 'deleteLeft', {}); + editor.trigger('test', 'cut', {}); assertSelections(editor, new Selection(1, 9, 1, 9)); editor.trigger('test', 'type', { text: 'XXX' }); From 4c71f96c8c518202a0cf57e1624b5f879dc77193 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Fri, 26 May 2017 16:11:25 +0200 Subject: [PATCH 1214/2747] More work on the task v2 json schema --- .../electron-browser/jsonSchemaCommon.ts | 1 + .../tasks/electron-browser/jsonSchema_v2.ts | 83 ++++++++++--------- 2 files changed, 46 insertions(+), 38 deletions(-) diff --git a/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.ts b/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.ts index 12350a98ac856..51b794a250ab8 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.ts @@ -57,6 +57,7 @@ const schema: IJSONSchema = { shellConfiguration: { type: 'object', additionalProperties: false, + description: nls.localize('JsonSchema.shellConfiguration', 'Configures the shell to be used.'), properties: { executable: { type: 'string', diff --git a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts index 2efb28f4d6a23..b184d7ee3ff99 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts @@ -10,41 +10,6 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema'; import commonSchema from './jsonSchemaCommon'; -const schema: IJSONSchema = { - oneOf: [ - { - 'allOf': [ - { - 'type': 'object', - 'required': ['version'], - 'properties': { - 'version': { - 'type': 'string', - 'enum': ['2.0.0'], - 'description': nls.localize('JsonSchema.version', 'The config\'s version number') - }, - 'windows': { - '$ref': '#/definitions/taskRunnerConfiguration', - 'description': nls.localize('JsonSchema.windows', 'Windows specific command configuration') - }, - 'osx': { - '$ref': '#/definitions/taskRunnerConfiguration', - 'description': nls.localize('JsonSchema.mac', 'Mac specific command configuration') - }, - 'linux': { - '$ref': '#/definitions/taskRunnerConfiguration', - 'description': nls.localize('JsonSchema.linux', 'Linux specific command configuration') - } - } - }, - { - '$ref': '#/definitions/taskRunnerConfiguration' - } - ] - } - ] -}; - const shellCommand: IJSONSchema = { anyOf: [ { @@ -55,7 +20,8 @@ const shellCommand: IJSONSchema = { { $ref: '#definitions/shellConfiguration' } - ] + ], + deprecationMessage: nls.localize('JsonSchema.tasks.isShellCommand.deprecated', 'The property isShellCommand is deprecated. Use the type property and the shell property in the options instead.') }; const dependsOn: IJSONSchema = { @@ -111,6 +77,43 @@ const taskType: IJSONSchema = { description: nls.localize('JsonSchema.tasks.type', 'Defines whether the task is run as a process or as a command inside a shell. Default is process') }; +const version: IJSONSchema = { + type: 'string', + enum: ['2.0.0'], + description: nls.localize('JsonSchema.version', 'The config\'s version number') +}; + +const schema: IJSONSchema = { + oneOf: [ + { + 'allOf': [ + { + type: 'object', + required: ['version'], + properties: { + version: Objects.deepClone(version), + windows: { + '$ref': '#/definitions/taskRunnerConfiguration', + 'description': nls.localize('JsonSchema.windows', 'Windows specific command configuration') + }, + osx: { + '$ref': '#/definitions/taskRunnerConfiguration', + 'description': nls.localize('JsonSchema.mac', 'Mac specific command configuration') + }, + linux: { + '$ref': '#/definitions/taskRunnerConfiguration', + 'description': nls.localize('JsonSchema.linux', 'Linux specific command configuration') + } + } + }, + { + $ref: '#/definitions/taskRunnerConfiguration' + } + ] + } + ] +}; + schema.definitions = Objects.deepClone(commonSchema.definitions); let definitions = schema.definitions; definitions.commandConfiguration.properties.isShellCommand = Objects.deepClone(shellCommand); @@ -120,11 +123,15 @@ definitions.showOutputType.deprecationMessage = nls.localize('JsonSchema.tasks.s definitions.taskDescription.properties.echoCommand.deprecationMessage = nls.localize('JsonSchema.tasks.echoCommand.deprecated', 'The property echoCommand is deprecated. Use the terminal property instead.'); definitions.taskDescription.properties.isBuildCommand.deprecationMessage = nls.localize('JsonSchema.tasks.isBuildCommand.deprecated', 'The property isBuildCommand is deprecated. Use the group property instead.'); definitions.taskDescription.properties.isTestCommand.deprecationMessage = nls.localize('JsonSchema.tasks.isTestCommand.deprecated', 'The property isTestCommand is deprecated. Use the group property instead.'); -definitions.taskDescription.properties.type = taskType; -definitions.taskDescription.properties.isShellCommand.deprecationMessage = nls.localize('JsonSchema.tasks.isShellCommand.deprecated', 'The property isShellCommand is deprecated. Use the type property instead.'); +definitions.taskDescription.properties.type = Objects.deepClone(taskType); definitions.taskDescription.properties.terminal = terminal; definitions.taskDescription.properties.group = group; +definitions.options.properties.shell = { + $ref: '#/definitions/shellConfiguration' +}; definitions.taskRunnerConfiguration.properties.isShellCommand = Objects.deepClone(shellCommand); +definitions.taskRunnerConfiguration.properties.type = Objects.deepClone(taskType); +definitions.taskRunnerConfiguration.properties.version = Objects.deepClone(version); Object.getOwnPropertyNames(definitions).forEach(key => { let newKey = key + '2'; From c29241c9603a23522033d2d919220e59adbf3df2 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 26 May 2017 17:25:03 +0200 Subject: [PATCH 1215/2747] [bat] add test for #26825 --- .../bat/test/colorize-fixtures/test.bat | 8 +- .../bat/test/colorize-results/test_bat.json | 85 ++++--------------- 2 files changed, 17 insertions(+), 76 deletions(-) diff --git a/extensions/bat/test/colorize-fixtures/test.bat b/extensions/bat/test/colorize-fixtures/test.bat index f5ae5d25119c8..3e215fc5efc2d 100644 --- a/extensions/bat/test/colorize-fixtures/test.bat +++ b/extensions/bat/test/colorize-fixtures/test.bat @@ -16,13 +16,9 @@ if not exist out node .\node_modules\gulp\bin\gulp.js compile :: Configuration set NODE_ENV=development -set VSCODE_DEV=1 -set ELECTRON_DEFAULT_ERROR_MODE=1 -set ELECTRON_ENABLE_LOGGING=1 -set ELECTRON_ENABLE_STACK_DUMPING=1 -:: Launch Code -.\.build\electron\electron.exe . %* +call echo %%LINE:rem +=%% + popd endlocal \ No newline at end of file diff --git a/extensions/bat/test/colorize-results/test_bat.json b/extensions/bat/test/colorize-results/test_bat.json index d909fe69bef55..d0f381fc7f3f2 100644 --- a/extensions/bat/test/colorize-results/test_bat.json +++ b/extensions/bat/test/colorize-results/test_bat.json @@ -264,62 +264,18 @@ } }, { - "c": "set", - "t": "source.dosbatch keyword.command.dosbatch", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": " VSCODE_DEV=1", - "t": "source.dosbatch", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "set", - "t": "source.dosbatch keyword.command.dosbatch", - "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" - } - }, - { - "c": " ELECTRON_DEFAULT_ERROR_MODE=1", - "t": "source.dosbatch", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" - } - }, - { - "c": "set", - "t": "source.dosbatch keyword.command.dosbatch", + "c": "call", + "t": "source.dosbatch keyword.control.statement.dosbatch", "r": { - "dark_plus": "keyword: #569CD6", - "light_plus": "keyword: #0000FF", - "dark_vs": "keyword: #569CD6", - "light_vs": "keyword: #0000FF", - "hc_black": "keyword: #569CD6" + "dark_plus": "keyword.control: #C586C0", + "light_plus": "keyword.control: #AF00DB", + "dark_vs": "keyword.control: #569CD6", + "light_vs": "keyword.control: #0000FF", + "hc_black": "keyword.control: #C586C0" } }, { - "c": " ELECTRON_ENABLE_LOGGING=1", + "c": " ", "t": "source.dosbatch", "r": { "dark_plus": "default: #D4D4D4", @@ -330,7 +286,7 @@ } }, { - "c": "set", + "c": "echo", "t": "source.dosbatch keyword.command.dosbatch", "r": { "dark_plus": "keyword: #569CD6", @@ -341,7 +297,7 @@ } }, { - "c": " ELECTRON_ENABLE_STACK_DUMPING=1", + "c": " ", "t": "source.dosbatch", "r": { "dark_plus": "default: #D4D4D4", @@ -352,25 +308,14 @@ } }, { - "c": ":: Launch Code", - "t": "source.dosbatch comment.line.colons.dosbatch", + "c": "%%LINE:rem +=%%", + "t": "source.dosbatch variable.other.parsetime.dosbatch", "r": { - "dark_plus": "comment: #608B4E", - "light_plus": "comment: #008000", - "dark_vs": "comment: #608B4E", - "light_vs": "comment: #008000", - "hc_black": "comment: #7CA668" - } - }, - { - "c": ".\\.build\\electron\\electron.exe . %*", - "t": "source.dosbatch", - "r": { - "dark_plus": "default: #D4D4D4", - "light_plus": "default: #000000", + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", "dark_vs": "default: #D4D4D4", "light_vs": "default: #000000", - "hc_black": "default: #FFFFFF" + "hc_black": "variable: #9CDCFE" } }, { From dfd358082f4f03d6439e65fb130eb77988ad53ef Mon Sep 17 00:00:00 2001 From: Nick Snyder Date: Fri, 26 May 2017 08:57:47 -0700 Subject: [PATCH 1216/2747] Handle progress results in quick open controller (#27152) --- .../parts/quickopen/quickOpenController.ts | 5 +- src/vs/workbench/browser/quickopen.ts | 4 +- .../search/browser/openAnythingHandler.ts | 47 ++++++++++++------- 3 files changed, 36 insertions(+), 20 deletions(-) diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index e86aa2e27e3fa..59e116b11d402 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -774,7 +774,7 @@ export class QuickOpenController extends Component implements IQuickOpenService } // Get results - return resolvedHandler.getResults(value).then(result => { + const handleResult = (result) => { if (this.currentResultToken === currentResultToken) { // now is the time to show the input if we did not have set it before @@ -787,7 +787,8 @@ export class QuickOpenController extends Component implements IQuickOpenService const handlerResults = (result && result.entries) || []; this.mergeResults(quickOpenModel, handlerResults, resolvedHandler.getGroupLabel()); } - }); + }; + return resolvedHandler.getResults(value).then(handleResult, undefined, handleResult); }); } diff --git a/src/vs/workbench/browser/quickopen.ts b/src/vs/workbench/browser/quickopen.ts index ebb31e7a83392..551ffbd9808b5 100644 --- a/src/vs/workbench/browser/quickopen.ts +++ b/src/vs/workbench/browser/quickopen.ts @@ -5,7 +5,7 @@ 'use strict'; import nls = require('vs/nls'); -import { TPromise } from 'vs/base/common/winjs.base'; +import { PPromise, TPromise } from 'vs/base/common/winjs.base'; import * as objects from 'vs/base/common/objects'; import filters = require('vs/base/common/filters'); import arrays = require('vs/base/common/arrays'); @@ -34,7 +34,7 @@ export class QuickOpenHandler { * As such, returning the same model instance across multiple searches will yield best * results in terms of performance when many items are shown. */ - public getResults(searchValue: string): TPromise> { + public getResults(searchValue: string): PPromise, IModel> { return TPromise.as(null); } diff --git a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts index cc77586caa21f..7ac06c931f6db 100644 --- a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts +++ b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts @@ -7,7 +7,7 @@ import * as arrays from 'vs/base/common/arrays'; import * as objects from 'vs/base/common/objects'; -import { TPromise } from 'vs/base/common/winjs.base'; +import { PPromise, TPromise } from 'vs/base/common/winjs.base'; import nls = require('vs/nls'); import { ThrottledDelayer } from 'vs/base/common/async'; import types = require('vs/base/common/types'); @@ -91,7 +91,7 @@ export class OpenAnythingHandler extends QuickOpenHandler { private openSymbolHandler: OpenSymbolHandler; private openFileHandler: OpenFileHandler; private searchDelayer: ThrottledDelayer; - private pendingSearch: TPromise; + private pendingSearch: PPromise; private isClosed: boolean; private scorerCache: { [key: string]: number }; private includeSymbols: boolean; @@ -135,7 +135,7 @@ export class OpenAnythingHandler extends QuickOpenHandler { }); } - public getResults(searchValue: string): TPromise { + public getResults(searchValue: string): PPromise { const startTime = Date.now(); this.cancelPendingSearch(); @@ -166,21 +166,21 @@ export class OpenAnythingHandler extends QuickOpenHandler { // Symbol Results (unless disabled or a range or absolute path is specified) if (this.includeSymbols && !searchWithRange) { resultPromises.push(this.openSymbolHandler.getResults(searchValue)); - } else { - resultPromises.push(TPromise.as(new QuickOpenModel())); // We need this empty promise because we are using the throttler below! } // Join and sort unified - this.pendingSearch = TPromise.join(resultPromises).then(results => { + const handleResults = (results: (QuickOpenModel | FileQuickOpenModel)[]) => { this.pendingSearch = null; // If the quick open widget has been closed meanwhile, ignore the result if (this.isClosed) { - return TPromise.as(new QuickOpenModel()); + return new QuickOpenModel(); } // Combine file results and symbol results (if any) - const mergedResults = [...results[0].entries, ...results[1].entries]; + const mergedResults: QuickOpenEntry[] = results.reduce((entries: QuickOpenEntry[], model: QuickOpenModel) => { + return entries.concat(model.entries); + }, []); // Sort const unsortedResultTime = Date.now(); @@ -200,10 +200,11 @@ export class OpenAnythingHandler extends QuickOpenHandler { }); let fileSearchStats: ISearchStats; - if (results[0] instanceof FileQuickOpenModel) { - fileSearchStats = (results[0]).stats; - } else if (results[1] instanceof FileQuickOpenModel) { - fileSearchStats = (results[1]).stats; + for (const result of results) { + if (result instanceof FileQuickOpenModel) { + fileSearchStats = (result).stats; + break; + } } const duration = new Date().getTime() - startTime; @@ -218,10 +219,24 @@ export class OpenAnythingHandler extends QuickOpenHandler { this.telemetryService.publicLog('openAnything', objects.assign(data, { duration })); - return TPromise.as(new QuickOpenModel(viewResults)); - }, (error: Error) => { - this.pendingSearch = null; - this.messageService.show(Severity.Error, error); + return new QuickOpenModel(viewResults); + }; + + this.pendingSearch = new PPromise((complete, error, progress) => { + // When any of the result promises return, forward the result as progress. + resultPromises.map(resultPromise => { + resultPromise.then(result => { + progress(handleResults([result])); + }); + }); + // Complete the promise when all promises have completed. + TPromise.join(resultPromises).then(() => { + // We already sent the results via progress. + complete(new QuickOpenModel()); + }, error => { + this.pendingSearch = null; + this.messageService.show(Severity.Error, error); + }); }); return this.pendingSearch; From 66bc0d13fafadbddb5b26a3bc114bdcc29cfd39c Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Fri, 26 May 2017 09:02:10 -0700 Subject: [PATCH 1217/2747] Update controller, simplify telemetry (#27152) --- .../parts/quickopen/quickOpenController.ts | 19 ++++--- .../search/browser/openAnythingHandler.ts | 52 ++++++++----------- 2 files changed, 34 insertions(+), 37 deletions(-) diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index 59e116b11d402..70ab133073225 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -774,7 +774,8 @@ export class QuickOpenController extends Component implements IQuickOpenService } // Get results - const handleResult = (result) => { + let addedGroupLabel = false; + const handleResult = (result: IModel, last = false) => { if (this.currentResultToken === currentResultToken) { // now is the time to show the input if we did not have set it before @@ -785,10 +786,10 @@ export class QuickOpenController extends Component implements IQuickOpenService // merge history and default handler results const handlerResults = (result && result.entries) || []; - this.mergeResults(quickOpenModel, handlerResults, resolvedHandler.getGroupLabel()); + addedGroupLabel = this.mergeResults(quickOpenModel, handlerResults, !addedGroupLabel ? resolvedHandler.getGroupLabel() : null, last) || addedGroupLabel; } }; - return resolvedHandler.getResults(value).then(handleResult, undefined, handleResult); + return resolvedHandler.getResults(value).then(result => handleResult(result, true), undefined, handleResult); }); } @@ -845,7 +846,7 @@ export class QuickOpenController extends Component implements IQuickOpenService return results.sort((elementA: EditorHistoryEntry, elementB: EditorHistoryEntry) => QuickOpenEntry.compare(elementA, elementB, normalizedSearchValue)); } - private mergeResults(quickOpenModel: QuickOpenModel, handlerResults: QuickOpenEntry[], groupLabel: string): void { + private mergeResults(quickOpenModel: QuickOpenModel, handlerResults: QuickOpenEntry[], groupLabel: string, last: boolean): boolean { // Remove results already showing by checking for a "resource" property const mapEntryToResource = this.mapEntriesToResource(quickOpenModel); @@ -862,17 +863,21 @@ export class QuickOpenController extends Component implements IQuickOpenService // Show additional handler results below any existing results if (additionalHandlerResults.length > 0) { const autoFocusFirstEntry = (quickOpenModel.getEntries().length === 0); // the user might have selected another entry meanwhile in local history (see https://github.com/Microsoft/vscode/issues/20828) - const useTopBorder = quickOpenModel.getEntries().length > 0; - additionalHandlerResults[0] = new QuickOpenEntryGroup(additionalHandlerResults[0], groupLabel, useTopBorder); + if (groupLabel) { + const useTopBorder = quickOpenModel.getEntries().length > 0; + additionalHandlerResults[0] = new QuickOpenEntryGroup(additionalHandlerResults[0], groupLabel, useTopBorder); + } quickOpenModel.addEntries(additionalHandlerResults); this.quickOpenWidget.refresh(quickOpenModel, { autoFocusFirstEntry }); + return !!groupLabel; } // Otherwise if no results are present (even from histoy) indicate this to the user - else if (quickOpenModel.getEntries().length === 0) { + else if (quickOpenModel.getEntries().length === 0 && last) { quickOpenModel.addEntries([new PlaceholderQuickOpenEntry(nls.localize('noResultsFound1', "No results found"))]); this.quickOpenWidget.refresh(quickOpenModel, { autoFocusFirstEntry: true }); } + return false; } private handleSpecificHandler(handlerDescriptor: QuickOpenHandlerDescriptor, value: string, currentResultToken: string): TPromise { diff --git a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts index 7ac06c931f6db..113adfd286d13 100644 --- a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts +++ b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts @@ -168,8 +168,7 @@ export class OpenAnythingHandler extends QuickOpenHandler { resultPromises.push(this.openSymbolHandler.getResults(searchValue)); } - // Join and sort unified - const handleResults = (results: (QuickOpenModel | FileQuickOpenModel)[]) => { + const handleResult = (result: QuickOpenModel | FileQuickOpenModel) => { this.pendingSearch = null; // If the quick open widget has been closed meanwhile, ignore the result @@ -177,16 +176,13 @@ export class OpenAnythingHandler extends QuickOpenHandler { return new QuickOpenModel(); } - // Combine file results and symbol results (if any) - const mergedResults: QuickOpenEntry[] = results.reduce((entries: QuickOpenEntry[], model: QuickOpenModel) => { - return entries.concat(model.entries); - }, []); + const entries = result.entries; // Sort const unsortedResultTime = Date.now(); const normalizedSearchValue = strings.stripWildcards(searchValue).toLowerCase(); const compare = (elementA: QuickOpenEntry, elementB: QuickOpenEntry) => QuickOpenEntry.compareByScore(elementA, elementB, searchValue, normalizedSearchValue, this.scorerCache); - const viewResults = arrays.top(mergedResults, compare, OpenAnythingHandler.MAX_DISPLAYED_RESULTS); + const viewResults = arrays.top(entries, compare, OpenAnythingHandler.MAX_DISPLAYED_RESULTS); const sortedResultTime = Date.now(); // Apply range and highlights to file entries @@ -199,38 +195,34 @@ export class OpenAnythingHandler extends QuickOpenHandler { } }); - let fileSearchStats: ISearchStats; - for (const result of results) { - if (result instanceof FileQuickOpenModel) { - fileSearchStats = (result).stats; - break; - } - } - - const duration = new Date().getTime() - startTime; - const data = this.createTimerEventData(startTime, { - searchLength: searchValue.length, - unsortedResultTime, - sortedResultTime, - resultCount: mergedResults.length, - symbols: { fromCache: false }, - files: fileSearchStats - }); + // Telemetry + if (result instanceof FileQuickOpenModel) { + const fileSearchStats = (result).stats; + const duration = new Date().getTime() - startTime; + const data = this.createTimerEventData(startTime, { + searchLength: searchValue.length, + unsortedResultTime, + sortedResultTime, + resultCount: entries.length, + symbols: { fromCache: false }, + files: fileSearchStats + }); - this.telemetryService.publicLog('openAnything', objects.assign(data, { duration })); + this.telemetryService.publicLog('openAnything', objects.assign(data, { duration })); + } return new QuickOpenModel(viewResults); }; this.pendingSearch = new PPromise((complete, error, progress) => { // When any of the result promises return, forward the result as progress. - resultPromises.map(resultPromise => { + const processed = resultPromises.map(resultPromise => resultPromise.then(result => { - progress(handleResults([result])); - }); - }); + progress(handleResult(result)); + }) + ); // Complete the promise when all promises have completed. - TPromise.join(resultPromises).then(() => { + TPromise.join(processed).then(() => { // We already sent the results via progress. complete(new QuickOpenModel()); }, error => { From f2cf819a7b0dbea76b304667658026c4e7965e72 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Fri, 26 May 2017 09:38:25 -0700 Subject: [PATCH 1218/2747] Mention keymaps (fixes #24727) --- .../parts/extensions/electron-browser/extensionsUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts index bff8aa3754baf..c33a4ecd7d4ea 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.ts @@ -73,7 +73,7 @@ export class KeymapExtensions implements IWorkbenchContribution { oldKeymaps: oldKeymaps.map(k => k.identifier) }; this.telemetryService.publicLog('disableOtherKeymapsConfirmation', telemetryData); - const message = localize('disableOtherKeymapsConfirmation', "Disable other keymaps to avoid conflicts between keybindings?"); + const message = localize('disableOtherKeymapsConfirmation', "Disable other keymaps ({0}) to avoid conflicts between keybindings?", oldKeymaps.map(k => `'${k.local.manifest.displayName}'`).join(', ')); const options = [ localize('yes', "Yes"), localize('no', "No") From 4ad0fd04f28d3e42fdfa23eb43bb970840bfd195 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 May 2017 16:03:36 +0200 Subject: [PATCH 1219/2747] debt - renames --- .../snippet/browser/snippetController2.ts | 2 +- .../contrib/snippet/browser/snippetSession.ts | 2 +- .../test/browser/snippetSession.test.ts | 24 +++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 7394641578536..c17c871a82332 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -90,7 +90,7 @@ export class SnippetController2 { return this.cancel(); } - if (this._snippet.isAtFinalPlaceholder || !this._snippet.isSelectionWithPlaceholders()) { + if (this._snippet.isAtFinalPlaceholder || !this._snippet.isSelectionWithinPlaceholders()) { return this.cancel(); } diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index 2a38815488c4a..9450bfa8ba351 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -321,7 +321,7 @@ export class SnippetSession { return this._snippets[0].hasPlaceholder; } - isSelectionWithPlaceholders(): boolean { + isSelectionWithinPlaceholders(): boolean { const selections = this._editor.getSelections(); if (selections.length < this._snippets.length) { // this means we started snippet mode with N diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts index d6a999e751e76..8d5af1eef2e02 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts @@ -299,28 +299,28 @@ suite('SnippetSession', function () { assert.equal(model.getValue(), 'foofarboobarfunction foo() {\n foofarboobarconsole.log(a);\n}'); assertSelections(editor, new Selection(1, 1, 1, 4), new Selection(2, 5, 2, 8)); - assert.equal(session.isSelectionWithPlaceholders(), true); + assert.equal(session.isSelectionWithinPlaceholders(), true); editor.setSelections([new Selection(1, 1, 1, 1)]); - assert.equal(session.isSelectionWithPlaceholders(), false); + assert.equal(session.isSelectionWithinPlaceholders(), false); editor.setSelections([new Selection(1, 6, 1, 6), new Selection(2, 10, 2, 10)]); - assert.equal(session.isSelectionWithPlaceholders(), false); // in snippet, outside placeholder + assert.equal(session.isSelectionWithinPlaceholders(), false); // in snippet, outside placeholder editor.setSelections([new Selection(1, 6, 1, 6), new Selection(2, 10, 2, 10), new Selection(1, 1, 1, 1)]); - assert.equal(session.isSelectionWithPlaceholders(), false); // in snippet, outside placeholder + assert.equal(session.isSelectionWithinPlaceholders(), false); // in snippet, outside placeholder editor.setSelections([new Selection(1, 6, 1, 6), new Selection(2, 10, 2, 10), new Selection(2, 20, 2, 21)]); - assert.equal(session.isSelectionWithPlaceholders(), false); + assert.equal(session.isSelectionWithinPlaceholders(), false); // reset selection to placeholder session.next(); - assert.equal(session.isSelectionWithPlaceholders(), true); + assert.equal(session.isSelectionWithinPlaceholders(), true); assertSelections(editor, new Selection(1, 10, 1, 13), new Selection(2, 14, 2, 17)); // reset selection to placeholder session.next(); - assert.equal(session.isSelectionWithPlaceholders(), true); + assert.equal(session.isSelectionWithinPlaceholders(), true); assert.equal(session.isAtFinalPlaceholder, true); assertSelections(editor, new Selection(1, 13, 1, 13), new Selection(2, 17, 2, 17)); }); @@ -354,10 +354,10 @@ suite('SnippetSession', function () { const session = new SnippetSession(editor); session.insert('farboo$0'); assert.equal(session.isAtFinalPlaceholder, true); - assert.equal(session.isSelectionWithPlaceholders(), false); + assert.equal(session.isSelectionWithinPlaceholders(), false); editor.trigger('test', 'type', { text: 'XXX' }); - assert.equal(session.isSelectionWithPlaceholders(), false); + assert.equal(session.isSelectionWithinPlaceholders(), false); }); test('snippets, typing at beginning', function () { @@ -367,12 +367,12 @@ suite('SnippetSession', function () { session.insert('farboo$0'); editor.setSelection(new Selection(1, 2, 1, 2)); - assert.equal(session.isSelectionWithPlaceholders(), false); + assert.equal(session.isSelectionWithinPlaceholders(), false); assert.equal(session.isAtFinalPlaceholder, true); editor.trigger('test', 'type', { text: 'XXX' }); assert.equal(model.getLineContent(1), 'fXXXfarboounction foo() {'); - assert.equal(session.isSelectionWithPlaceholders(), false); + assert.equal(session.isSelectionWithinPlaceholders(), false); session.next(); assertSelections(editor, new Selection(1, 11, 1, 11)); @@ -410,7 +410,7 @@ suite('SnippetSession', function () { assertSelections(editor, new Selection(1, 4, 1, 4), new Selection(2, 8, 2, 8)); session.insert('bar'); - assert.ok(session.isSelectionWithPlaceholders()); + assert.ok(session.isSelectionWithinPlaceholders()); assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); session.next(); From 52cc722dcd00b02e59edc4ea38cc694fc210d34e Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 May 2017 17:27:22 +0200 Subject: [PATCH 1220/2747] basic support for nested snippets, #24855 --- .../snippet/browser/snippetController2.ts | 124 +++++++++++++----- .../contrib/snippet/browser/snippetSession.ts | 74 +++++------ .../test/browser/snippetController2.test.ts | 24 +++- .../test/browser/snippetSession.test.ts | 15 --- 4 files changed, 142 insertions(+), 95 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index c17c871a82332..c35e9766a499c 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -13,6 +13,62 @@ import { SnippetSession } from './snippetSession'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; +class SnippetSessions { + + private _stack: SnippetSession[] = []; + + add(session: SnippetSession): number { + return this._stack.push(session); + } + + clear(): void { + dispose(this._stack); + this._stack.length = 0; + } + + get empty(): boolean { + return this._stack.length === 0; + } + + get hasPlaceholder(): boolean { + return this._stack.some(s => s.hasPlaceholder); + } + + get isAtFirstPlaceholder(): boolean { + // return !this.empty && this._stack[0].isAtFirstPlaceholder; + return this._stack.every(s => s.isAtFirstPlaceholder); + } + + get isAtFinalPlaceholder(): boolean { + // return !this.empty && this._stack[0].isAtFinalPlaceholder; + return this._stack.every(s => s.isAtFinalPlaceholder); + } + + get isSelectionWithinPlaceholders(): boolean { + return this._stack.some(s => s.isSelectionWithinPlaceholders()); + } + + prev(): void { + for (let i = this._stack.length - 1; i >= 0; i--) { + const snippet = this._stack[i]; + if (!snippet.isAtFirstPlaceholder) { + snippet.prev(); + break; + } + } + } + + next(): void { + for (let i = this._stack.length - 1; i >= 0; i--) { + const snippet = this._stack[i]; + if (!snippet.isAtFinalPlaceholder) { + snippet.next(); + break; + } + } + } +} + @commonEditorContribution export class SnippetController2 { @@ -28,7 +84,8 @@ export class SnippetController2 { private readonly _hasNextTabstop: IContextKey; private readonly _hasPrevTabstop: IContextKey; - private _snippet: SnippetSession; + // private _snippet: SnippetSession; + private _sessions = new SnippetSessions(); private _snippetListener: IDisposable[] = []; constructor( @@ -44,7 +101,7 @@ export class SnippetController2 { this._inSnippet.reset(); this._hasPrevTabstop.reset(); this._hasNextTabstop.reset(); - dispose(this._snippet); + this._sessions.clear(); } getId(): string { @@ -56,47 +113,49 @@ export class SnippetController2 { overwriteBefore: number = 0, overwriteAfter: number = 0, undoStopBefore: boolean = true, undoStopAfter: boolean = true ): void { + + // don't listen while inserting the snippet + // as that is the inflight state causing cancelation + this._snippetListener = dispose(this._snippetListener); + if (undoStopBefore) { this._editor.getModel().pushStackElement(); } - if (!this._snippet) { - // create a new session - this._snippet = new SnippetSession(this._editor); - this._snippet.insert(template, overwriteBefore, overwriteAfter); - this._snippetListener = [ - this._editor.onDidChangeModel(() => this.cancel()), - this._editor.onDidChangeCursorSelection(() => this._updateState()) - ]; - } else { - // only insert the snippet when a session - // is already active - this._snippet.insert(template, overwriteBefore, overwriteAfter); - } + + const snippet = new SnippetSession(this._editor); + snippet.insert(template, overwriteBefore, overwriteAfter); + this._sessions.add(snippet); + if (undoStopAfter) { this._editor.getModel().pushStackElement(); } + + this._snippetListener = [ + this._editor.onDidChangeModel(() => this.cancel()), + this._editor.onDidChangeCursorSelection(() => this._updateState()) + ]; this._updateState(); } private _updateState(): void { - if (!this._snippet) { + if (this._sessions.empty) { // canceled in the meanwhile return; } - if (!this._snippet.hasPlaceholder) { + if (!this._sessions.hasPlaceholder) { // don't listen for selection changes and don't // update context keys when the snippet is plain text return this.cancel(); } - if (this._snippet.isAtFinalPlaceholder || !this._snippet.isSelectionWithinPlaceholders()) { + if (this._sessions.isAtFinalPlaceholder || !this._sessions.isSelectionWithinPlaceholders) { return this.cancel(); } this._inSnippet.set(true); - this._hasPrevTabstop.set(!this._snippet.isAtFirstPlaceholder); - this._hasNextTabstop.set(!this._snippet.isAtFinalPlaceholder); + this._hasPrevTabstop.set(!this._sessions.isAtFirstPlaceholder); + this._hasNextTabstop.set(!this._sessions.isAtFinalPlaceholder); } finish(): void { @@ -106,28 +165,21 @@ export class SnippetController2 { } cancel(): void { - if (this._snippet) { - this._inSnippet.reset(); - this._hasPrevTabstop.reset(); - this._hasNextTabstop.reset(); - dispose(this._snippetListener); - dispose(this._snippet); - this._snippet = undefined; - } + this._inSnippet.reset(); + this._hasPrevTabstop.reset(); + this._hasNextTabstop.reset(); + this._sessions.clear(); + dispose(this._snippetListener); } prev(): void { - if (this._snippet) { - this._snippet.prev(); - this._updateState(); - } + this._sessions.prev(); + this._updateState(); } next(): void { - if (this._snippet) { - this._snippet.next(); - this._updateState(); - } + this._sessions.next(); + this._updateState(); } } diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index 9450bfa8ba351..51567e97c200c 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -130,11 +130,13 @@ export class OneSnippet { } get isAtFirstPlaceholder() { - return this._placeholderGroupsIdx === 0; + return this._placeholderGroupsIdx === 0 || this._placeholderGroups.length === 0; } get isAtFinalPlaceholder() { - if (this._placeholderGroupsIdx < 0) { + if (this._placeholderGroups.length === 0) { + return true; + } else if (this._placeholderGroupsIdx < 0) { return false; } else { return this._placeholderGroups[this._placeholderGroupsIdx][0].isFinalTabstop; @@ -196,24 +198,35 @@ export class SnippetSession { return selection; } - static makeInsertEditsAndSnippets(editor: ICommonCodeEditor, template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): { edits: IIdentifiedSingleEditOperation[], snippets: OneSnippet[] } { + private readonly _editor: ICommonCodeEditor; + private _snippets: OneSnippet[] = []; + + constructor(editor: ICommonCodeEditor) { + this._editor = editor; + } + + dispose(): void { + dispose(this._snippets); + } + + insert(template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): void { + + const model = this._editor.getModel(); + const edits: IIdentifiedSingleEditOperation[] = []; let delta = 0; - let edits: IIdentifiedSingleEditOperation[] = []; - let snippets: OneSnippet[] = []; - let model = editor.getModel(); // know what text the overwrite[Before|After] extensions // of the primary curser have selected because only when // secondary selections extend to the same text we can grow them - let firstBeforeText = model.getValueInRange(SnippetSession.adjustSelection(model, editor.getSelection(), overwriteBefore, 0)); - let firstAfterText = model.getValueInRange(SnippetSession.adjustSelection(model, editor.getSelection(), 0, overwriteAfter)); + let firstBeforeText = model.getValueInRange(SnippetSession.adjustSelection(model, this._editor.getSelection(), overwriteBefore, 0)); + let firstAfterText = model.getValueInRange(SnippetSession.adjustSelection(model, this._editor.getSelection(), 0, overwriteAfter)); // sort selections by their start position but remeber // the original index. that allows you to create correct // offset-based selection logic without changing the // primary selection - const indexedSelection = editor.getSelections() + const indexedSelection = this._editor.getSelections() .map((selection, idx) => ({ selection, idx })) .sort((a, b) => Range.compareRangesUsingStarts(a.selection, b.selection)); @@ -248,46 +261,18 @@ export class SnippetSession { // that ensures the primiary cursor stays primary despite not being // the one with lowest start position edits[idx] = EditOperation.replaceMove(snippetSelection, snippet.text); - snippets[idx] = new OneSnippet(editor, snippet, offset); - } - - return { edits, snippets }; - } - - private readonly _editor: ICommonCodeEditor; - private _snippets: OneSnippet[]; - - constructor(editor: ICommonCodeEditor) { - this._editor = editor; - } - - dispose(): void { - dispose(this._snippets); - } - - insert(template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): void { - - const model = this._editor.getModel(); - const { edits, snippets } = SnippetSession.makeInsertEditsAndSnippets( - this._editor, template, overwriteBefore, overwriteAfter - ); - - let isNestedInsert = true; - if (!this._snippets) { - // keep snippets around - this._snippets = snippets; - isNestedInsert = false; + this._snippets[idx] = new OneSnippet(this._editor, snippet, offset); } // make insert edit and start with first selections - const newSelections = model.pushEditOperations(this._editor.getSelections(), edits, undoEdits => { - if (!isNestedInsert && this._snippets[0].hasPlaceholder) { + + this._editor.setSelections(model.pushEditOperations(this._editor.getSelections(), edits, undoEdits => { + if (this._snippets[0].hasPlaceholder) { return this._move(true); } else { return undoEdits.map(edit => Selection.fromPositions(edit.range.getEndPosition())); } - }); - this._editor.setSelections(newSelections); + })); } next(): void { @@ -322,6 +307,11 @@ export class SnippetSession { } isSelectionWithinPlaceholders(): boolean { + + if (!this.hasPlaceholder) { + return false; + } + const selections = this._editor.getSelections(); if (selections.length < this._snippets.length) { // this means we started snippet mode with N diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts index b862a3dba9232..ce84d8796d83d 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts @@ -148,17 +148,37 @@ suite('SnippetController2', function () { // assertContextKeys(contextKeys, false, false, false); }); - test('insert, insert nested', function () { + test('insert, nested snippet', function () { const ctrl = new SnippetController2(editor, contextKeys); ctrl.insert('${1:foobar}$0'); assertContextKeys(contextKeys, true, false, true); assertSelections(editor, new Selection(1, 1, 1, 7), new Selection(2, 5, 2, 11)); - ctrl.insert('farboo'); + ctrl.insert('farboo$1$0'); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + assertContextKeys(contextKeys, true, false, true); + + ctrl.next(); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + assertContextKeys(contextKeys, true, true, true); + + ctrl.next(); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + assertContextKeys(contextKeys, false, false, false); + }); + + test('insert, nested plain text', function () { + const ctrl = new SnippetController2(editor, contextKeys); + ctrl.insert('${1:foobar}$0'); assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 1, 1, 7), new Selection(2, 5, 2, 11)); + + ctrl.insert('farboo'); assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + assertContextKeys(contextKeys, true, false, true); ctrl.next(); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); assertContextKeys(contextKeys, false, false, false); }); }); diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts index 8d5af1eef2e02..ce807bedad76b 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts @@ -403,20 +403,5 @@ suite('SnippetSession', function () { assert.equal(model.getValue(), '@line=1function foo() {\n @line=2console.log(a);\n}'); assertSelections(editor, new Selection(1, 8, 1, 8), new Selection(2, 12, 2, 12)); }); - - test('snippet, insert-nested', function () { - const session = new SnippetSession(editor); - session.insert('foo$1foo$0'); - - assertSelections(editor, new Selection(1, 4, 1, 4), new Selection(2, 8, 2, 8)); - session.insert('bar'); - assert.ok(session.isSelectionWithinPlaceholders()); - assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); - - session.next(); - assertSelections(editor, new Selection(1, 10, 1, 10), new Selection(2, 14, 2, 14)); - assert.ok(session.isAtFinalPlaceholder); - }); - }); From 90a68e55391afc18cc1caffef776280983e14350 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 May 2017 17:32:27 +0200 Subject: [PATCH 1221/2747] make SnippetSession single insert again, #24855 --- .../snippet/browser/snippetController2.ts | 4 +- .../contrib/snippet/browser/snippetSession.ts | 20 +++-- .../test/browser/snippetSession.test.ts | 80 +++++++++---------- 3 files changed, 55 insertions(+), 49 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index c35e9766a499c..fbf4764ba64d9 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -122,9 +122,9 @@ export class SnippetController2 { this._editor.getModel().pushStackElement(); } - const snippet = new SnippetSession(this._editor); - snippet.insert(template, overwriteBefore, overwriteAfter); + const snippet = new SnippetSession(this._editor, template, overwriteBefore, overwriteAfter); this._sessions.add(snippet); + snippet.insert(); if (undoStopAfter) { this._editor.getModel().pushStackElement(); diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index 51567e97c200c..de1eea466b9fc 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -199,17 +199,23 @@ export class SnippetSession { } private readonly _editor: ICommonCodeEditor; + private readonly _template: string; + private readonly _overwriteBefore: number; + private readonly _overwriteAfter: number; private _snippets: OneSnippet[] = []; - constructor(editor: ICommonCodeEditor) { + constructor(editor: ICommonCodeEditor, template: string, overwriteBefore: number = 0, overwriteAfter: number = 0) { this._editor = editor; + this._template = template; + this._overwriteBefore = overwriteBefore; + this._overwriteAfter = overwriteAfter; } dispose(): void { dispose(this._snippets); } - insert(template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): void { + insert(): void { const model = this._editor.getModel(); const edits: IIdentifiedSingleEditOperation[] = []; @@ -219,8 +225,8 @@ export class SnippetSession { // know what text the overwrite[Before|After] extensions // of the primary curser have selected because only when // secondary selections extend to the same text we can grow them - let firstBeforeText = model.getValueInRange(SnippetSession.adjustSelection(model, this._editor.getSelection(), overwriteBefore, 0)); - let firstAfterText = model.getValueInRange(SnippetSession.adjustSelection(model, this._editor.getSelection(), 0, overwriteAfter)); + let firstBeforeText = model.getValueInRange(SnippetSession.adjustSelection(model, this._editor.getSelection(), this._overwriteBefore, 0)); + let firstAfterText = model.getValueInRange(SnippetSession.adjustSelection(model, this._editor.getSelection(), 0, this._overwriteAfter)); // sort selections by their start position but remeber // the original index. that allows you to create correct @@ -234,8 +240,8 @@ export class SnippetSession { // extend selection with the `overwriteBefore` and `overwriteAfter` and then // compare if this matches the extensions of the primary selection - let extensionBefore = SnippetSession.adjustSelection(model, selection, overwriteBefore, 0); - let extensionAfter = SnippetSession.adjustSelection(model, selection, 0, overwriteAfter); + let extensionBefore = SnippetSession.adjustSelection(model, selection, this._overwriteBefore, 0); + let extensionAfter = SnippetSession.adjustSelection(model, selection, 0, this._overwriteAfter); if (firstBeforeText !== model.getValueInRange(extensionBefore)) { extensionBefore = selection; } @@ -251,7 +257,7 @@ export class SnippetSession { // adjust the template string to match the indentation and // whitespace rules of this insert location (can be different for each cursor) const start = snippetSelection.getStartPosition(); - const adjustedTemplate = SnippetSession.adjustWhitespace(model, start, template); + const adjustedTemplate = SnippetSession.adjustWhitespace(model, start, this._template); const snippet = SnippetParser.parse(adjustedTemplate).resolveVariables(new EditorSnippetVariableResolver(model, snippetSelection)); const offset = model.getOffsetAt(start) + delta; diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts index ce807bedad76b..5d5db85fb93e8 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts @@ -67,8 +67,8 @@ suite('SnippetSession', function () { }); test('text edits & selection', function () { - const session = new SnippetSession(editor); - session.insert('foo${1:bar}foo$0'); + const session = new SnippetSession(editor, 'foo${1:bar}foo$0'); + session.insert(); assert.equal(editor.getModel().getValue(), 'foobarfoofunction foo() {\n foobarfooconsole.log(a);\n}'); assertSelections(editor, new Selection(1, 4, 1, 7), new Selection(2, 8, 2, 11)); @@ -78,17 +78,17 @@ suite('SnippetSession', function () { test('text edit with reversed selection', function () { - const session = new SnippetSession(editor); + const session = new SnippetSession(editor, '${1:bar}$0'); editor.setSelections([new Selection(2, 5, 2, 5), new Selection(1, 1, 1, 1)]); - session.insert('${1:bar}$0'); + session.insert(); assert.equal(model.getValue(), 'barfunction foo() {\n barconsole.log(a);\n}'); assertSelections(editor, new Selection(2, 5, 2, 8), new Selection(1, 1, 1, 4)); }); test('snippets, repeated tabstops', function () { - const session = new SnippetSession(editor); - session.insert('${1:abc}foo${1:abc}$0'); + const session = new SnippetSession(editor, '${1:abc}foo${1:abc}$0'); + session.insert(); assertSelections(editor, new Selection(1, 1, 1, 4), new Selection(1, 7, 1, 10), new Selection(2, 5, 2, 8), new Selection(2, 11, 2, 14), @@ -101,16 +101,16 @@ suite('SnippetSession', function () { }); test('snippets, just text', function () { - const session = new SnippetSession(editor); - session.insert('foobar'); + const session = new SnippetSession(editor, 'foobar'); + session.insert(); assert.equal(model.getValue(), 'foobarfunction foo() {\n foobarconsole.log(a);\n}'); assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); }); test('snippets, selections and new text with newlines', () => { - const session = new SnippetSession(editor); - session.insert('foo\n\t${1:bar}\n$0'); + const session = new SnippetSession(editor, 'foo\n\t${1:bar}\n$0'); + session.insert(); assert.equal(editor.getModel().getValue(), 'foo\n bar\nfunction foo() {\n foo\n bar\n console.log(a);\n}'); @@ -122,8 +122,8 @@ suite('SnippetSession', function () { test('snippets, selections -> next/prev', () => { - const session = new SnippetSession(editor); - session.insert('f$1oo${2:bar}foo$0'); + const session = new SnippetSession(editor, 'f$1oo${2:bar}foo$0'); + session.insert(); // @ $2 assertSelections(editor, new Selection(1, 2, 1, 2), new Selection(2, 6, 2, 6)); @@ -142,8 +142,8 @@ suite('SnippetSession', function () { }); test('snippets, selections & typing', function () { - const session = new SnippetSession(editor); - session.insert('f${1:oo}_$2_$0'); + const session = new SnippetSession(editor, 'f${1:oo}_$2_$0'); + session.insert(); editor.trigger('test', 'type', { text: 'X' }); session.next(); @@ -167,7 +167,7 @@ suite('SnippetSession', function () { model.setValue('foo_bar_foo'); editor.setSelections([new Selection(1, 1, 1, 4), new Selection(1, 9, 1, 12)]); - new SnippetSession(editor).insert('x$0'); + new SnippetSession(editor, 'x$0').insert(); assert.equal(model.getValue(), 'x_bar_x'); assertSelections(editor, new Selection(1, 2, 1, 2), new Selection(1, 8, 1, 8)); }); @@ -176,7 +176,7 @@ suite('SnippetSession', function () { model.setValue('foo_bar_foo'); editor.setSelections([new Selection(1, 1, 1, 4), new Selection(1, 9, 1, 12)]); - new SnippetSession(editor).insert('LONGER$0'); + new SnippetSession(editor, 'LONGER$0').insert(); assert.equal(model.getValue(), 'LONGER_bar_LONGER'); assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(1, 18, 1, 18)); }); @@ -184,8 +184,8 @@ suite('SnippetSession', function () { test('snippets, don\'t grow final tabstop', function () { model.setValue('foo_zzz_foo'); editor.setSelection(new Selection(1, 5, 1, 8)); - const session = new SnippetSession(editor); - session.insert('$1bar$0'); + const session = new SnippetSession(editor, '$1bar$0'); + session.insert(); assertSelections(editor, new Selection(1, 5, 1, 5)); editor.trigger('test', 'type', { text: 'foo-' }); @@ -204,8 +204,8 @@ suite('SnippetSession', function () { test('snippets, don\'t merge touching tabstops 1/2', function () { - const session = new SnippetSession(editor); - session.insert('$1$2$3$0'); + const session = new SnippetSession(editor, '$1$2$3$0'); + session.insert(); assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); session.next(); @@ -242,8 +242,8 @@ suite('SnippetSession', function () { }); test('snippets, don\'t merge touching tabstops 2/2', function () { - const session = new SnippetSession(editor); - session.insert('$1$2$3$0'); + const session = new SnippetSession(editor, '$1$2$3$0'); + session.insert(); assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); editor.trigger('test', 'type', { text: '111' }); @@ -261,8 +261,8 @@ suite('SnippetSession', function () { }); test('snippets, gracefully move over final tabstop', function () { - const session = new SnippetSession(editor); - session.insert('${1}bar$0'); + const session = new SnippetSession(editor, '${1}bar$0'); + session.insert(); assert.equal(session.isAtFinalPlaceholder, false); assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); @@ -277,8 +277,8 @@ suite('SnippetSession', function () { }); test('snippets, overwriting nested placeholder', function () { - const session = new SnippetSession(editor); - session.insert('log(${1:"$2"});$0'); + const session = new SnippetSession(editor, 'log(${1:"$2"});$0'); + session.insert(); assertSelections(editor, new Selection(1, 5, 1, 7), new Selection(2, 9, 2, 11)); editor.trigger('test', 'type', { text: 'XXX' }); @@ -294,8 +294,8 @@ suite('SnippetSession', function () { }); test('snippets, selections and snippet ranges', function () { - const session = new SnippetSession(editor); - session.insert('${1:foo}farboo${2:bar}$0'); + const session = new SnippetSession(editor, '${1:foo}farboo${2:bar}$0'); + session.insert(); assert.equal(model.getValue(), 'foofarboobarfunction foo() {\n foofarboobarconsole.log(a);\n}'); assertSelections(editor, new Selection(1, 1, 1, 4), new Selection(2, 5, 2, 8)); @@ -330,13 +330,13 @@ suite('SnippetSession', function () { model.setValue(''); editor.setSelection(new Selection(1, 1, 1, 1)); - const first = new SnippetSession(editor); - first.insert('foo${2:bar}foo$0'); + const first = new SnippetSession(editor, 'foo${2:bar}foo$0'); + first.insert(); assert.equal(model.getValue(), 'foobarfoo'); assertSelections(editor, new Selection(1, 4, 1, 7)); - const second = new SnippetSession(editor); - second.insert('ba${1:zzzz}$0'); + const second = new SnippetSession(editor, 'ba${1:zzzz}$0'); + second.insert(); assert.equal(model.getValue(), 'foobazzzzfoo'); assertSelections(editor, new Selection(1, 6, 1, 10)); @@ -351,8 +351,8 @@ suite('SnippetSession', function () { test('snippets, typing at final tabstop', function () { - const session = new SnippetSession(editor); - session.insert('farboo$0'); + const session = new SnippetSession(editor, 'farboo$0'); + session.insert(); assert.equal(session.isAtFinalPlaceholder, true); assert.equal(session.isSelectionWithinPlaceholders(), false); @@ -363,8 +363,8 @@ suite('SnippetSession', function () { test('snippets, typing at beginning', function () { editor.setSelection(new Selection(1, 2, 1, 2)); - const session = new SnippetSession(editor); - session.insert('farboo$0'); + const session = new SnippetSession(editor, 'farboo$0'); + session.insert(); editor.setSelection(new Selection(1, 2, 1, 2)); assert.equal(session.isSelectionWithinPlaceholders(), false); @@ -381,8 +381,8 @@ suite('SnippetSession', function () { test('snippets, typing with nested placeholder', function () { editor.setSelection(new Selection(1, 1, 1, 1)); - const session = new SnippetSession(editor); - session.insert('This ${1:is ${2:nested}}.$0'); + const session = new SnippetSession(editor, 'This ${1:is ${2:nested}}.$0'); + session.insert(); assertSelections(editor, new Selection(1, 6, 1, 15)); session.next(); @@ -397,8 +397,8 @@ suite('SnippetSession', function () { }); test('snippets, snippet with variables', function () { - const session = new SnippetSession(editor); - session.insert('@line=$TM_LINE_NUMBER$0'); + const session = new SnippetSession(editor, '@line=$TM_LINE_NUMBER$0'); + session.insert(); assert.equal(model.getValue(), '@line=1function foo() {\n @line=2console.log(a);\n}'); assertSelections(editor, new Selection(1, 8, 1, 8), new Selection(2, 12, 2, 12)); From f8a959aec0cfe896c0e3bf32bf81a1592524d8b3 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 May 2017 18:47:47 +0200 Subject: [PATCH 1222/2747] make final tabstops of nested snippets normal tabstop, #24855 --- .../snippet/browser/snippetController2.ts | 10 +++---- .../contrib/snippet/browser/snippetSession.ts | 29 +++++++++++-------- .../test/browser/snippetController2.test.ts | 4 +-- .../test/browser/snippetSession.test.ts | 22 +++++++------- 4 files changed, 34 insertions(+), 31 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index fbf4764ba64d9..4c210d851ac28 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -35,13 +35,11 @@ class SnippetSessions { } get isAtFirstPlaceholder(): boolean { - // return !this.empty && this._stack[0].isAtFirstPlaceholder; return this._stack.every(s => s.isAtFirstPlaceholder); } get isAtFinalPlaceholder(): boolean { - // return !this.empty && this._stack[0].isAtFinalPlaceholder; - return this._stack.every(s => s.isAtFinalPlaceholder); + return !this.empty && this._stack[0].isAtLastPlaceholder; } get isSelectionWithinPlaceholders(): boolean { @@ -61,7 +59,7 @@ class SnippetSessions { next(): void { for (let i = this._stack.length - 1; i >= 0; i--) { const snippet = this._stack[i]; - if (!snippet.isAtFinalPlaceholder) { + if (!snippet.isAtLastPlaceholder) { snippet.next(); break; } @@ -123,8 +121,8 @@ export class SnippetController2 { } const snippet = new SnippetSession(this._editor, template, overwriteBefore, overwriteAfter); - this._sessions.add(snippet); - snippet.insert(); + const newLen = this._sessions.add(snippet); + snippet.insert(newLen > 1); if (undoStopAfter) { this._editor.getModel().pushStackElement(); diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index de1eea466b9fc..c4fcdaa3e413e 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -130,17 +130,11 @@ export class OneSnippet { } get isAtFirstPlaceholder() { - return this._placeholderGroupsIdx === 0 || this._placeholderGroups.length === 0; + return this._placeholderGroupsIdx <= 0 || this._placeholderGroups.length === 0; } - get isAtFinalPlaceholder() { - if (this._placeholderGroups.length === 0) { - return true; - } else if (this._placeholderGroupsIdx < 0) { - return false; - } else { - return this._placeholderGroups[this._placeholderGroupsIdx][0].isFinalTabstop; - } + get isAtLastPlaceholder() { + return this._placeholderGroupsIdx === this._placeholderGroups.length - 1; } get hasPlaceholder() { @@ -215,7 +209,7 @@ export class SnippetSession { dispose(this._snippets); } - insert(): void { + insert(ignoreFinalTabstops: boolean = false): void { const model = this._editor.getModel(); const edits: IIdentifiedSingleEditOperation[] = []; @@ -260,6 +254,17 @@ export class SnippetSession { const adjustedTemplate = SnippetSession.adjustWhitespace(model, start, this._template); const snippet = SnippetParser.parse(adjustedTemplate).resolveVariables(new EditorSnippetVariableResolver(model, snippetSelection)); + + // rewrite final-tabstop to some other placeholder because this + // snippet sits inside another snippet + if (ignoreFinalTabstops) { + for (const placeholder of snippet.placeholders) { + if (placeholder.isFinalTabstop) { + placeholder.index = String(snippet.placeholders.length); + } + } + } + const offset = model.getOffsetAt(start) + delta; delta += snippet.text.length - model.getValueLengthInRange(snippetSelection); @@ -304,8 +309,8 @@ export class SnippetSession { return this._snippets[0].isAtFirstPlaceholder; } - get isAtFinalPlaceholder() { - return this._snippets[0].isAtFinalPlaceholder; + get isAtLastPlaceholder() { + return this._snippets[0].isAtLastPlaceholder; } get hasPlaceholder() { diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts index ce84d8796d83d..7a485ac4f6b21 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts @@ -154,8 +154,8 @@ suite('SnippetController2', function () { assertContextKeys(contextKeys, true, false, true); assertSelections(editor, new Selection(1, 1, 1, 7), new Selection(2, 5, 2, 11)); - ctrl.insert('farboo$1$0'); - assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + ctrl.insert('far$1boo$0'); + assertSelections(editor, new Selection(1, 4, 1, 4), new Selection(2, 8, 2, 8)); assertContextKeys(contextKeys, true, false, true); ctrl.next(); diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts index 5d5db85fb93e8..4691eaad476dd 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts @@ -257,22 +257,22 @@ suite('SnippetSession', function () { editor.trigger('test', 'type', { text: '333' }); session.next(); - assert.equal(session.isAtFinalPlaceholder, true); + assert.equal(session.isAtLastPlaceholder, true); }); test('snippets, gracefully move over final tabstop', function () { const session = new SnippetSession(editor, '${1}bar$0'); session.insert(); - assert.equal(session.isAtFinalPlaceholder, false); + assert.equal(session.isAtLastPlaceholder, false); assertSelections(editor, new Selection(1, 1, 1, 1), new Selection(2, 5, 2, 5)); session.next(); - assert.equal(session.isAtFinalPlaceholder, true); + assert.equal(session.isAtLastPlaceholder, true); assertSelections(editor, new Selection(1, 4, 1, 4), new Selection(2, 8, 2, 8)); session.next(); - assert.equal(session.isAtFinalPlaceholder, true); + assert.equal(session.isAtLastPlaceholder, true); assertSelections(editor, new Selection(1, 4, 1, 4), new Selection(2, 8, 2, 8)); }); @@ -285,11 +285,11 @@ suite('SnippetSession', function () { assert.equal(model.getValue(), 'log(XXX);function foo() {\n log(XXX);console.log(a);\n}'); session.next(); - assert.equal(session.isAtFinalPlaceholder, false); + assert.equal(session.isAtLastPlaceholder, false); // assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); session.next(); - assert.equal(session.isAtFinalPlaceholder, true); + assert.equal(session.isAtLastPlaceholder, true); assertSelections(editor, new Selection(1, 10, 1, 10), new Selection(2, 14, 2, 14)); }); @@ -321,7 +321,7 @@ suite('SnippetSession', function () { // reset selection to placeholder session.next(); assert.equal(session.isSelectionWithinPlaceholders(), true); - assert.equal(session.isAtFinalPlaceholder, true); + assert.equal(session.isAtLastPlaceholder, true); assertSelections(editor, new Selection(1, 13, 1, 13), new Selection(2, 17, 2, 17)); }); @@ -341,11 +341,11 @@ suite('SnippetSession', function () { assertSelections(editor, new Selection(1, 6, 1, 10)); second.next(); - assert.equal(second.isAtFinalPlaceholder, true); + assert.equal(second.isAtLastPlaceholder, true); assertSelections(editor, new Selection(1, 10, 1, 10)); first.next(); - assert.equal(first.isAtFinalPlaceholder, true); + assert.equal(first.isAtLastPlaceholder, true); assertSelections(editor, new Selection(1, 13, 1, 13)); }); @@ -353,7 +353,7 @@ suite('SnippetSession', function () { const session = new SnippetSession(editor, 'farboo$0'); session.insert(); - assert.equal(session.isAtFinalPlaceholder, true); + assert.equal(session.isAtLastPlaceholder, true); assert.equal(session.isSelectionWithinPlaceholders(), false); editor.trigger('test', 'type', { text: 'XXX' }); @@ -368,7 +368,7 @@ suite('SnippetSession', function () { editor.setSelection(new Selection(1, 2, 1, 2)); assert.equal(session.isSelectionWithinPlaceholders(), false); - assert.equal(session.isAtFinalPlaceholder, true); + assert.equal(session.isAtLastPlaceholder, true); editor.trigger('test', 'type', { text: 'XXX' }); assert.equal(model.getLineContent(1), 'fXXXfarboounction foo() {'); From 3e7152fb4d0e69e539329c729f54868f2d605cfd Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 26 May 2017 18:58:47 +0200 Subject: [PATCH 1223/2747] snippets - remove unused css --- src/vs/editor/contrib/snippet/browser/snippetSession.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.css b/src/vs/editor/contrib/snippet/browser/snippetSession.css index 6f839f10d22ae..b6c7d72adda32 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.css +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.css @@ -3,10 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -.monaco-editor.vs .new-snippet { background-color: rgba(10, 50, 150, 0.1); } -.monaco-editor.vs-dark .new-snippet { background-color: rgba(100, 105, 110, 0.1); } -.monaco-editor.hc-black .new-snippet { background-color: rgba(100, 105, 110, 0.1); } - .monaco-editor.vs .snippet-placeholder { background-color: rgba(10, 50, 100, 0.1); } .monaco-editor.vs-dark .snippet-placeholder { background-color: rgba(124, 124, 124, 0.1); } .monaco-editor.hc-black .snippet-placeholder { background-color: rgba(124, 124, 124, 0.1); } From 0ece9b10815b7014ebcba4838f10c4ace2522eb1 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 26 May 2017 12:03:17 -0700 Subject: [PATCH 1224/2747] Update markdown extension contributes key names --- extensions/markdown/src/extension.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/markdown/src/extension.ts b/extensions/markdown/src/extension.ts index 8e459df89a28d..4deb344b9f27b 100644 --- a/extensions/markdown/src/extension.ts +++ b/extensions/markdown/src/extension.ts @@ -61,7 +61,7 @@ export function activate(context: vscode.ExtensionContext) { continue; } - let styles = contributes['markdown.preview'] && contributes['markdown.preview'].styles; + let styles = contributes['markdown.previewStyles']; if (styles) { if (!Array.isArray(styles)) { styles = [styles]; @@ -75,7 +75,7 @@ export function activate(context: vscode.ExtensionContext) { } } - let scripts = contributes['markdown.preview'] && contributes['markdown.preview'].scripts; + let scripts = contributes['markdown.previewScripts']; if (scripts) { if (!Array.isArray(scripts)) { scripts = [scripts]; From f7288dfcb9eda68e7105e0e683cc52e1ddf55d10 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 26 May 2017 23:04:48 +0200 Subject: [PATCH 1225/2747] Ugly flicker upon first startup. Fixes #25448 --- src/vs/workbench/electron-browser/bootstrap/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/electron-browser/bootstrap/index.html b/src/vs/workbench/electron-browser/bootstrap/index.html index 018512e1164df..1474a70e097d7 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.html +++ b/src/vs/workbench/electron-browser/bootstrap/index.html @@ -30,8 +30,9 @@ if (!backgroundColor) { backgroundColor = baseTheme === 'hc-black' ? '#000000' : (baseTheme === 'vs' ? '#FFFFFF' : '#1E1E1E'); } + let foregroundColor = baseTheme === 'hc-black' ? '#FFFFFF' : (baseTheme === 'vs' ? '#6C6C6C' : '#CCCCCC'); let style = document.createElement('style'); - style.innerHTML = '.monaco-shell { background-color:' + backgroundColor + '; }'; + style.innerHTML = '.monaco-shell { background-color:' + backgroundColor + '; color:' + foregroundColor + '; }'; document.head.appendChild(style); } catch (error) { From 5a83b55b70480eac2bf5d8fca4d628645bd48e02 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 26 May 2017 13:56:26 -0700 Subject: [PATCH 1226/2747] Fix a few potential issues for tsc task provider --- extensions/typescript/src/features/taskProvider.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/typescript/src/features/taskProvider.ts b/extensions/typescript/src/features/taskProvider.ts index ba53903e447ce..de8394594c998 100644 --- a/extensions/typescript/src/features/taskProvider.ts +++ b/extensions/typescript/src/features/taskProvider.ts @@ -45,21 +45,21 @@ export default class TypeScriptTaskProvider implements vscode.TaskProvider { return projects.map(configFile => { const configFileName = path.relative(rootPath, configFile); - const buildTask = new vscode.ShellTask(`tsc: build ${configFileName}`, `${command} -p ${configFile}`, '$tsc'); + const buildTask = new vscode.ShellTask(`tsc: build ${configFileName}`, `${command} -p "${configFile}"`, '$tsc'); buildTask.group = vscode.TaskGroup.Build; return buildTask; }); } private async getAllTsConfigs(token: vscode.CancellationToken): Promise { - const out: string[] = []; + const out = new Set(); const configs = (await this.getTsConfigForActiveFile(token)).concat(await this.getTsConfigsInWorkspace()); for (const config of configs) { if (await exists(config)) { - out.push(config); + out.add(config); } } - return out; + return Array.from(out); } private async getTsConfigForActiveFile(token: vscode.CancellationToken): Promise { From c9a2a5be88f67f0d1a82c5a53cf36891553a9dee Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 26 May 2017 14:24:15 -0700 Subject: [PATCH 1227/2747] Allow tsc tasks to be disabled using settings. Fixes #27312 --- extensions/typescript/package.json | 9 +++++ extensions/typescript/package.nls.json | 3 +- .../typescript/src/features/taskProvider.ts | 40 ++++++++++++++++++- extensions/typescript/src/typescriptMain.ts | 4 +- 4 files changed, 52 insertions(+), 4 deletions(-) diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index b039fac9631fc..cff9784cabe70 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -315,6 +315,15 @@ "type": "boolean", "default": true, "description": "%javascript.nameSuggestions%" + }, + "typescript.tsc.autoDetect": { + "type": "string", + "default": "on", + "enum": [ + "on", + "off" + ], + "description": "%typescript.tsc.autoDetect%" } } }, diff --git a/extensions/typescript/package.nls.json b/extensions/typescript/package.nls.json index 821257b38a130..0679841532d80 100644 --- a/extensions/typescript/package.nls.json +++ b/extensions/typescript/package.nls.json @@ -37,5 +37,6 @@ "jsDocCompletion.enabled": "Enable/disable auto JSDoc comments", "javascript.implicitProjectConfig.checkJs": "Enable/disable semantic checking of JavaScript files. Existing jsconfig.json or tsconfig.json files override this setting. Requires TypeScript >=2.3.1.", "typescript.check.npmIsInstalled": "Check if NPM is installed for automatic typings acquisition", - "javascript.nameSuggestions": "Enable/disable including unique names from the file in JavaScript suggestion lists." + "javascript.nameSuggestions": "Enable/disable including unique names from the file in JavaScript suggestion lists.", + "typescript.tsc.autoDetect": "Controls whether auto detection of tsc tasks is on or off." } diff --git a/extensions/typescript/src/features/taskProvider.ts b/extensions/typescript/src/features/taskProvider.ts index de8394594c998..4d50b23329400 100644 --- a/extensions/typescript/src/features/taskProvider.ts +++ b/extensions/typescript/src/features/taskProvider.ts @@ -21,7 +21,10 @@ const exists = (file: string): Promise => }); }); -export default class TypeScriptTaskProvider implements vscode.TaskProvider { +/** + * Provides tasks for building `tsconfig.json` files in a project. + */ +class TscTaskProvider implements vscode.TaskProvider { private readonly tsconfigProvider: TsConfigProvider; public constructor( @@ -116,4 +119,39 @@ export default class TypeScriptTaskProvider implements vscode.TaskProvider { } return null; } +} + +type AutoDetect = 'on' | 'off'; + +/** + * Manages registrations of TypeScript task provides with VScode. + */ +export default class TypeScriptTaskProviderManager { + private taskProviderSub: vscode.Disposable | undefined = undefined; + private readonly disposables: vscode.Disposable[] = []; + + constructor( + private readonly lazyClient: () => TypeScriptServiceClient + ) { + vscode.workspace.onDidChangeConfiguration(this.onConfigurationChanged, this, this.disposables); + this.onConfigurationChanged(); + } + + dispose() { + if (this.taskProviderSub) { + this.taskProviderSub.dispose(); + this.taskProviderSub = undefined; + } + this.disposables.forEach(x => x.dispose()); + } + + private onConfigurationChanged() { + let autoDetect = vscode.workspace.getConfiguration('typescript.tsc').get('autoDetect'); + if (this.taskProviderSub && autoDetect === 'off') { + this.taskProviderSub.dispose(); + this.taskProviderSub = undefined; + } else if (!this.taskProviderSub && autoDetect === 'on') { + this.taskProviderSub = vscode.workspace.registerTaskProvider(new TscTaskProvider(this.lazyClient)); + } + } } \ No newline at end of file diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 07a666936b956..9c20725093204 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -41,7 +41,7 @@ import CodeActionProvider from './features/codeActionProvider'; import ReferenceCodeLensProvider from './features/referencesCodeLensProvider'; import { JsDocCompletionProvider, TryCompleteJsDocCommand } from './features/jsDocCompletionProvider'; import { DirectiveCommentCompletionProvider } from './features/directiveCommentCompletionProvider'; -import TypeScriptTaskProvider from './features/taskProvider'; +import TypeScriptTaskProviderManager from './features/taskProvider'; import ImplementationCodeLensProvider from './features/implementationsCodeLensProvider'; @@ -131,7 +131,7 @@ export function activate(context: ExtensionContext): void { lazyClientHost().serviceClient.restartTsServer(); })); - context.subscriptions.push(workspace.registerTaskProvider(new TypeScriptTaskProvider(() => lazyClientHost().serviceClient))); + context.subscriptions.push(new TypeScriptTaskProviderManager(() => lazyClientHost().serviceClient)); const goToProjectConfig = (isTypeScript: boolean) => { const editor = window.activeTextEditor; From 23c6f80062af89e8fba66d10e43eccd9d018c3f3 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Fri, 26 May 2017 14:47:57 -0700 Subject: [PATCH 1228/2747] Fix #26771 - use focus tracker to set search focus context keys --- src/vs/workbench/parts/search/browser/searchViewlet.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index 04837eb7f6e6a..97f51caa16cfa 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -498,7 +498,7 @@ export class SearchViewlet extends Viewlet { } })); - this.toUnbind.push(this.tree.addListener('focus', (event: any) => { + this.toUnbind.push(this.tree.onDOMFocus(e => { const focus = this.tree.getFocus(); this.firstMatchFocussed.set(this.tree.getNavigator().first() === this.tree.getFocus()); this.fileMatchOrMatchFocussed.set(true); From 5b09beb12bcd95f884ec43aaf1f45efcf9bfb7b5 Mon Sep 17 00:00:00 2001 From: kieferrm Date: Fri, 26 May 2017 15:03:50 -0700 Subject: [PATCH 1229/2747] Change default settings. Fixes #26893. --- src/vs/editor/common/config/editorOptions.ts | 8 ++++---- src/vs/workbench/electron-browser/main.contribution.ts | 2 +- .../electron-browser/extensions.contribution.ts | 2 +- .../themes/electron-browser/workbenchThemeService.ts | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 720302d227e30..c6997e43114a3 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -2053,7 +2053,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { wordWrapBreakAfterCharacters: ' \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー’”〉》」』】〕)]}」', wordWrapBreakObtrusiveCharacters: '.', autoClosingBrackets: true, - dragAndDrop: false, + dragAndDrop: true, emptySelectionClipboard: true, useTabStops: true, multicursorModifier: 'altKey', @@ -2081,7 +2081,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { renderWhitespace: 'none', renderControlCharacters: false, fontLigatures: false, - renderIndentGuides: false, + renderIndentGuides: true, renderLineHighlight: 'line', scrollbar: { vertical: ScrollbarVisibility.Auto, @@ -2098,7 +2098,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { mouseWheelScrollSensitivity: 1, }, minimap: { - enabled: false, + enabled: true, renderCharacters: true, maxColumn: 120 }, @@ -2114,7 +2114,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { parameterHints: true, iconsInSuggestions: true, formatOnType: false, - formatOnPaste: false, + formatOnPaste: true, suggestOnTriggerCharacters: true, acceptSuggestionOnEnter: 'on', acceptSuggestionOnCommitCharacter: true, diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts index 46b0bce9b765c..53ab7b017601e 100644 --- a/src/vs/workbench/electron-browser/main.contribution.ts +++ b/src/vs/workbench/electron-browser/main.contribution.ts @@ -182,7 +182,7 @@ let properties: { [path: string]: IJSONSchema; } = { nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.openFilesInNewWindow.off' }, "Files will open in the window with the files' folder open or the last active window"), nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.openFilesInNewWindow.default' }, "Files will open in the window with the files' folder open or the last active window unless opened via the dock or from finder (macOS only)") ], - 'default': 'default', + 'default': 'off', 'description': nls.localize('openFilesInNewWindow', `Controls if files should open in a new window. diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts index 7e6ec97a78ecc..74161d1c27c48 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts @@ -171,7 +171,7 @@ Registry.as(ConfigurationExtensions.Configuration) 'extensions.autoUpdate': { type: 'boolean', description: localize('extensionsAutoUpdate', "Automatically update extensions"), - default: false + default: true }, 'extensions.ignoreRecommendations': { type: 'boolean', diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index 6e41871b06032..4125a7a1ea8ce 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -51,6 +51,7 @@ const PERSISTED_THEME_STORAGE_KEY = 'colorThemeData'; const defaultThemeExtensionId = 'vscode-theme-defaults'; const oldDefaultThemeExtensionId = 'vscode-theme-colorful-defaults'; +const DEFAULT_ICON_THEME_SETTING_VALUE = 'vs-seti'; const fileIconsEnabledClass = 'file-icons-enabled'; const themingRegistry = Registry.as(ThemingExtensions.ThemingContribution); @@ -962,7 +963,7 @@ const colorThemeSettingSchema: IJSONSchema = { }; const iconThemeSettingSchema: IJSONSchema = { type: ['string', 'null'], - default: null, + default: DEFAULT_ICON_THEME_SETTING_VALUE, description: nls.localize('iconTheme', "Specifies the icon theme used in the workbench."), enum: [null], enumDescriptions: [nls.localize('noIconThemeDesc', 'No file icons')], From 8853b2db99a8a6f3151a08ecabf7727a8fb568a3 Mon Sep 17 00:00:00 2001 From: kieferrm Date: Fri, 26 May 2017 15:21:14 -0700 Subject: [PATCH 1230/2747] Ajust test to new defaults. See #26893. --- .../test/common/config/commonEditorConfig.test.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/test/common/config/commonEditorConfig.test.ts b/src/vs/editor/test/common/config/commonEditorConfig.test.ts index c07e1240c1f83..2e2f47b16aab6 100644 --- a/src/vs/editor/test/common/config/commonEditorConfig.test.ts +++ b/src/vs/editor/test/common/config/commonEditorConfig.test.ts @@ -89,13 +89,23 @@ suite('Common Editor Config', () => { let config = new TestWrappingConfiguration({ wordWrap: true }); - assertWrapping(config, true, 89); + assertWrapping(config, true, 81); }); test('wordWrap on', () => { let config = new TestWrappingConfiguration({ wordWrap: 'on' }); + assertWrapping(config, true, 81); + }); + + test('wordWrap on without minimap', () => { + let config = new TestWrappingConfiguration({ + wordWrap: 'on', + minimap: { + enabled: false + } + }); assertWrapping(config, true, 89); }); @@ -104,7 +114,7 @@ suite('Common Editor Config', () => { wordWrap: 'on', wordWrapColumn: 10 }); - assertWrapping(config, true, 89); + assertWrapping(config, true, 81); }); test('wordWrap off', () => { From 944d4f1391dab48dec301bbb3a042921688d8cfb Mon Sep 17 00:00:00 2001 From: Daniel Ye Date: Fri, 26 May 2017 19:26:40 -0700 Subject: [PATCH 1231/2747] 2017-05-26. Merged in translation from transifex. --- .../chs/extensions/git/out/commands.i18n.json | 3 +++ i18n/chs/extensions/git/package.i18n.json | 1 + .../out/codelensProvider.i18n.json | 4 +++- .../out/commandHandler.i18n.json | 6 +++++- .../out/mergeDecorator.i18n.json | 4 +++- .../merge-conflict/package.i18n.json | 8 +++++++- i18n/chs/extensions/npm/package.i18n.json | 4 +++- .../out/features/bufferSyncSupport.i18n.json | 2 +- .../extensions/typescript/package.i18n.json | 1 + .../vs/code/electron-main/windows.i18n.json | 1 - .../browser/goToDeclarationCommands.i18n.json | 19 +------------------ .../browser/goToDeclarationMouse.i18n.json | 4 +--- .../electron-browser/workbench.i18n.json | 6 ++++++ .../extensionsUtils.i18n.json | 5 +++-- .../dirtydiffDecorator.i18n.json | 6 ++++++ .../out/codelensProvider.i18n.json | 7 ++++++- .../out/commandHandler.i18n.json | 5 ++++- .../out/mergeDecorator.i18n.json | 5 ++++- .../merge-conflict/package.i18n.json | 15 ++++++++++++++- i18n/cht/extensions/npm/package.i18n.json | 4 +++- .../vs/code/electron-main/windows.i18n.json | 1 - .../electron-browser/workbench.i18n.json | 6 ++++++ .../extensionsUtils.i18n.json | 5 +++-- .../dirtydiffDecorator.i18n.json | 6 ++++++ .../vs/code/electron-main/windows.i18n.json | 1 - .../electron-browser/workbench.i18n.json | 6 ++++++ .../extensionsUtils.i18n.json | 5 +++-- .../dirtydiffDecorator.i18n.json | 6 ++++++ .../esn/extensions/git/out/commands.i18n.json | 3 +++ i18n/esn/extensions/git/package.i18n.json | 1 + .../markdown/out/extension.i18n.json | 4 +++- .../out/codelensProvider.i18n.json | 7 ++++++- .../out/commandHandler.i18n.json | 8 +++++++- .../out/mergeDecorator.i18n.json | 5 ++++- .../merge-conflict/package.i18n.json | 16 +++++++++++++++- i18n/esn/extensions/npm/package.i18n.json | 4 +++- .../extensions/typescript/package.i18n.json | 1 + .../vs/code/electron-main/windows.i18n.json | 1 - .../electron-browser/workbench.i18n.json | 6 ++++++ .../statusbarColorProvider.i18n.json | 3 ++- .../extensionsUtils.i18n.json | 5 +++-- .../browser/files.contribution.i18n.json | 1 + .../dirtydiffDecorator.i18n.json | 6 ++++++ .../vs/code/electron-main/windows.i18n.json | 1 - .../electron-browser/workbench.i18n.json | 6 ++++++ .../extensionsUtils.i18n.json | 5 +++-- .../dirtydiffDecorator.i18n.json | 6 ++++++ .../vs/code/electron-main/windows.i18n.json | 1 - .../electron-browser/workbench.i18n.json | 6 ++++++ .../extensionsUtils.i18n.json | 5 +++-- .../dirtydiffDecorator.i18n.json | 6 ++++++ .../jpn/extensions/git/out/commands.i18n.json | 3 +++ i18n/jpn/extensions/git/package.i18n.json | 1 + .../markdown/out/extension.i18n.json | 4 +++- .../out/codelensProvider.i18n.json | 4 +++- .../out/commandHandler.i18n.json | 6 +++++- .../out/mergeDecorator.i18n.json | 4 +++- .../merge-conflict/package.i18n.json | 8 +++++++- i18n/jpn/extensions/npm/package.i18n.json | 4 +++- .../extensions/typescript/package.i18n.json | 1 + .../resourceviewer/resourceViewer.i18n.json | 1 + .../vs/code/electron-main/windows.i18n.json | 1 - .../common/view/editorColorRegistry.i18n.json | 6 +++++- .../contrib/links/browser/links.i18n.json | 1 + .../electron-browser/workbench.i18n.json | 6 ++++++ .../statusbarColorProvider.i18n.json | 3 ++- .../browser/extensionsActions.i18n.json | 4 ++++ .../extensionsUtils.i18n.json | 5 +++-- .../browser/files.contribution.i18n.json | 1 + .../dirtydiffDecorator.i18n.json | 6 ++++++ .../electron-browser/TMSnippets.i18n.json | 3 ++- .../vs/code/electron-main/windows.i18n.json | 1 - .../electron-browser/workbench.i18n.json | 6 ++++++ .../extensionsUtils.i18n.json | 5 +++-- .../dirtydiffDecorator.i18n.json | 6 ++++++ .../ptb/extensions/git/out/commands.i18n.json | 3 +++ i18n/ptb/extensions/git/package.i18n.json | 1 + .../markdown/out/extension.i18n.json | 4 +++- .../out/codelensProvider.i18n.json | 7 ++++++- .../out/commandHandler.i18n.json | 8 +++++++- .../out/mergeDecorator.i18n.json | 5 ++++- .../merge-conflict/package.i18n.json | 16 +++++++++++++++- i18n/ptb/extensions/npm/package.i18n.json | 4 +++- .../extensions/typescript/package.i18n.json | 1 + .../resourceviewer/resourceViewer.i18n.json | 1 + .../vs/code/electron-main/windows.i18n.json | 1 - .../config/commonEditorConfig.i18n.json | 4 ++++ .../common/view/editorColorRegistry.i18n.json | 6 +++++- .../contrib/links/browser/links.i18n.json | 1 + .../parts/editor/editorStatus.i18n.json | 1 + .../src/vs/workbench/common/theme.i18n.json | 6 ++++++ .../electron-browser/workbench.i18n.json | 6 ++++++ .../statusbarColorProvider.i18n.json | 3 ++- .../emmet.contribution.i18n.json | 3 ++- .../browser/extensionsActions.i18n.json | 9 ++++++++- .../extensionsUtils.i18n.json | 6 ++++-- .../browser/files.contribution.i18n.json | 1 + .../dirtydiffDecorator.i18n.json | 6 ++++++ .../electron-browser/TMSnippets.i18n.json | 3 ++- .../vs/code/electron-main/windows.i18n.json | 1 - .../electron-browser/workbench.i18n.json | 6 ++++++ .../extensionsUtils.i18n.json | 5 +++-- .../dirtydiffDecorator.i18n.json | 6 ++++++ 103 files changed, 378 insertions(+), 89 deletions(-) create mode 100644 i18n/chs/src/vs/workbench/electron-browser/workbench.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json create mode 100644 i18n/cht/src/vs/workbench/electron-browser/workbench.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json create mode 100644 i18n/deu/src/vs/workbench/electron-browser/workbench.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json create mode 100644 i18n/esn/src/vs/workbench/electron-browser/workbench.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json create mode 100644 i18n/fra/src/vs/workbench/electron-browser/workbench.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json create mode 100644 i18n/ita/src/vs/workbench/electron-browser/workbench.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/electron-browser/workbench.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json create mode 100644 i18n/kor/src/vs/workbench/electron-browser/workbench.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/electron-browser/workbench.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json create mode 100644 i18n/rus/src/vs/workbench/electron-browser/workbench.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json diff --git a/i18n/chs/extensions/git/out/commands.i18n.json b/i18n/chs/extensions/git/out/commands.i18n.json index 3a000b987738e..ceede002e08b3 100644 --- a/i18n/chs/extensions/git/out/commands.i18n.json +++ b/i18n/chs/extensions/git/out/commands.i18n.json @@ -26,6 +26,9 @@ "provide commit message": "请提供提交消息", "branch name": "分支名称", "provide branch name": "请提供分支名称", + "select branch to delete": "选择要删除的分支", + "confirm force delete branch": "“{0}”分支未被完全合并。是否仍要删除?", + "delete branch": "删除分支", "no remotes to pull": "存储库未配置任何从其中进行拉取的远程存储库。", "no remotes to push": "存储库未配置任何要推送到的远程存储库。", "nobranch": "请签出一个分支以推送到远程。", diff --git a/i18n/chs/extensions/git/package.i18n.json b/i18n/chs/extensions/git/package.i18n.json index bed9f4de89c90..9c65f275fd6e4 100644 --- a/i18n/chs/extensions/git/package.i18n.json +++ b/i18n/chs/extensions/git/package.i18n.json @@ -26,6 +26,7 @@ "command.undoCommit": "撤消上次提交", "command.checkout": "签出到...", "command.branch": "创建分支...", + "command.deleteBranch": "删除分支...", "command.pull": "拉取", "command.pullRebase": "拉取(变基)", "command.push": "推送", diff --git a/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json index 8b6ad71cd4e6d..3590523ef879c 100644 --- a/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "acceptCurrentChange": "采用当前更改" +} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json index 8b6ad71cd4e6d..996cf7276b845 100644 --- a/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "cursorNotInConflict": "编辑器光标不在合并冲突内", + "noConflicts": "没有在此文件中找到合并冲突", + "noOtherConflictsInThisFile": "此文件中没有其他合并冲突了" +} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json index 8b6ad71cd4e6d..feac7a236d88d 100644 --- a/i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json +++ b/i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "currentChange": "(当前更改)" +} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/package.i18n.json b/i18n/chs/extensions/merge-conflict/package.i18n.json index 8b6ad71cd4e6d..82e4bc5846357 100644 --- a/i18n/chs/extensions/merge-conflict/package.i18n.json +++ b/i18n/chs/extensions/merge-conflict/package.i18n.json @@ -3,4 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "command.category": "合并冲突", + "command.next": "下一个冲突", + "command.previous": "上一个冲突", + "command.compare": "比较当前冲突", + "config.title": "合并冲突" +} \ No newline at end of file diff --git a/i18n/chs/extensions/npm/package.i18n.json b/i18n/chs/extensions/npm/package.i18n.json index 8b6ad71cd4e6d..6130b12cc0571 100644 --- a/i18n/chs/extensions/npm/package.i18n.json +++ b/i18n/chs/extensions/npm/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.npm.autoDetect": "控制自动检测 npm 脚本是否打开。默认开启。" +} \ No newline at end of file diff --git a/i18n/chs/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/chs/extensions/typescript/out/features/bufferSyncSupport.i18n.json index c885212097a21..9dcaf692d8f98 100644 --- a/i18n/chs/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/chs/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -6,7 +6,7 @@ { "versionMismatch": "版本不匹配! 全局 tsc ({0}) != VS Code 的语言服务({1})。可能出现不一致的编译错误", "moreInformation": "详细信息", - "doNotCheckAgain": "不要再次检查", + "doNotCheckAgain": "不再检查", "close": "关闭", "updateTscCheck": "已将用户设置 \"typescript.check.tscVersion\" 更新为 false" } \ No newline at end of file diff --git a/i18n/chs/extensions/typescript/package.i18n.json b/i18n/chs/extensions/typescript/package.i18n.json index 7d185d9e36eed..e9bd0e95be067 100644 --- a/i18n/chs/extensions/typescript/package.i18n.json +++ b/i18n/chs/extensions/typescript/package.i18n.json @@ -37,6 +37,7 @@ "typescript.referencesCodeLens.enabled": "启用/禁用在 TypeScript 文件中引用 CodeLens。要求 TypeScript >= 2.0.6。", "typescript.implementationsCodeLens.enabled": "启用/禁用实现 CodeLens。要求 TypeScript >= 2.2.0。", "typescript.openTsServerLog.title": "打开 TS 服务器日志", + "typescript.restartTsServer": "重启 TS 服务器", "typescript.selectTypeScriptVersion.title": "选择 TypeScript 版本", "jsDocCompletion.enabled": "启用/禁用自动 JSDoc 注释", "javascript.implicitProjectConfig.checkJs": "启用/禁用 JavaScript 文件的语义检查。现有的 jsconfig.json 或\n tsconfig.json 文件会覆盖此设置。要求 TypeScript >=2.3.1。", diff --git a/i18n/chs/src/vs/code/electron-main/windows.i18n.json b/i18n/chs/src/vs/code/electron-main/windows.i18n.json index 6982cf6190cbd..55246096dd2d0 100644 --- a/i18n/chs/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/chs/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "确定", "pathNotExistTitle": "路径不存在", "pathNotExistDetail": "磁盘上似乎不再存在路径“{0}”。", - "accessibilityOptionsWindowTitle": "辅助功能选项", "reopen": "重新打开", "wait": "保持等待", "close": "关闭", diff --git a/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json index e788771d2f25a..8b6ad71cd4e6d 100644 --- a/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -3,21 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "noResultWord": "未找到“{0}”的任何定义", - "generic.noResults": "找不到定义", - "meta.title": " – {0} 定义", - "actions.goToDecl.label": "转到定义", - "actions.goToDeclToSide.label": "打开侧边的定义", - "actions.previewDecl.label": "查看定义", - "goToImplementation.noResultWord": "未找到“{0}”的实现", - "goToImplementation.generic.noResults": "未找到实现", - "meta.implementations.title": "– {0} 个实现", - "actions.goToImplementation.label": "转到实现", - "actions.peekImplementation.label": "速览实现", - "goToTypeDefinition.noResultWord": "未找到“{0}”的类型定义", - "goToTypeDefinition.generic.noResults": "未找到类型定义", - "meta.typeDefinitions.title": " – {0} 个类型定义", - "actions.goToTypeDefinition.label": "转到类型定义", - "actions.peekTypeDefinition.label": "快速查看类型定义" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json index ab0b4761cf9a4..8b6ad71cd4e6d 100644 --- a/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "multipleResults": "单击显示 {0} 个定义。" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 5a4bf096f38bb..a8554464048cd 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "disableOtherKeymapsConfirmation": "是否禁用其他键映射以避免键绑定之间的冲突?", "yes": "是", - "no": "否" + "no": "否", + "uninstall": "卸载", + "later": "稍后" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json index 8b6ad71cd4e6d..fd3fc4ee5125c 100644 --- a/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "acceptCurrentChange": "接受當前變更", + "acceptIncomingChange": "接受來源變更", + "acceptBothChanges": "接受兩者變更", + "compareChanges": "比較變更" +} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json index 8b6ad71cd4e6d..b72349a9332bb 100644 --- a/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "noConflicts": "檔案內找不到需要合併衝突項目", + "noOtherConflictsInThisFile": "此檔案內沒有其他的衝突合併項目" +} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/cht/extensions/merge-conflict/out/mergeDecorator.i18n.json index 8b6ad71cd4e6d..1282a1b3de3af 100644 --- a/i18n/cht/extensions/merge-conflict/out/mergeDecorator.i18n.json +++ b/i18n/cht/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "currentChange": "(目前變更)", + "incomingChange": "(來源變更)" +} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/package.i18n.json b/i18n/cht/extensions/merge-conflict/package.i18n.json index 8b6ad71cd4e6d..1afd0effd3ea1 100644 --- a/i18n/cht/extensions/merge-conflict/package.i18n.json +++ b/i18n/cht/extensions/merge-conflict/package.i18n.json @@ -3,4 +3,17 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "command.category": "合併衝突", + "command.accept.all-incoming": "接受所有來源", + "command.accept.all-both": "接受兩者", + "command.accept.current": "接受當前項目", + "command.accept.incoming": "接受來源", + "command.accept.selection": "接受選取項目", + "command.accept.both": "接受兩者", + "command.next": "後一個衝突", + "command.previous": "前一個衝突", + "command.compare": "比較目前衝突", + "config.title": "合併衝突", + "config.codeLensEnabled": "啟用/停用 編輯器CodeLens衝突合併 " +} \ No newline at end of file diff --git a/i18n/cht/extensions/npm/package.i18n.json b/i18n/cht/extensions/npm/package.i18n.json index 8b6ad71cd4e6d..74cbc6cffe4b8 100644 --- a/i18n/cht/extensions/npm/package.i18n.json +++ b/i18n/cht/extensions/npm/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.npm.autoDetect": "控制是否自動檢測npm腳本.預設為開啟." +} \ No newline at end of file diff --git a/i18n/cht/src/vs/code/electron-main/windows.i18n.json b/i18n/cht/src/vs/code/electron-main/windows.i18n.json index 1a51baff5db5c..08847b4b8e488 100644 --- a/i18n/cht/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/cht/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "確定", "pathNotExistTitle": "路徑不存在", "pathNotExistDetail": "磁碟上似乎已沒有路徑 '{0}'。", - "accessibilityOptionsWindowTitle": "協助工具選項", "reopen": "重新開啟", "wait": "繼續等候", "close": "關閉", diff --git a/i18n/cht/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 49a87dcf2225a..6394eecabd8b9 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "disableOtherKeymapsConfirmation": "要停用其他按鍵對應,以避免按鍵繫結關係發生衝突嗎?", "yes": "是", - "no": "否" + "no": "否", + "uninstall": "解除安裝", + "later": "稍後" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/code/electron-main/windows.i18n.json b/i18n/deu/src/vs/code/electron-main/windows.i18n.json index 19ea01ffe2bea..b31c876e93003 100644 --- a/i18n/deu/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/deu/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "OK", "pathNotExistTitle": "Der Pfad ist nicht vorhanden.", "pathNotExistDetail": "Der Pfad \"{0}\" scheint auf dem Datenträger nicht mehr vorhanden zu sein.", - "accessibilityOptionsWindowTitle": "Optionen für erleichterte Bedienung", "reopen": "Erneut öffnen", "wait": "Bitte warten.", "close": "Schließen", diff --git a/i18n/deu/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 5c79e37943747..4769dc3fe1e89 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "disableOtherKeymapsConfirmation": "Andere Tastenzuordnungen deaktivieren, um Konflikte zwischen Tastenzuordnungen zu vermeiden?", "yes": "Ja", - "no": "Nein" + "no": "Nein", + "uninstall": "Deinstallieren", + "later": "Später" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/deu/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/extensions/git/out/commands.i18n.json b/i18n/esn/extensions/git/out/commands.i18n.json index 1897af0ac2629..6ace96fe6d2c1 100644 --- a/i18n/esn/extensions/git/out/commands.i18n.json +++ b/i18n/esn/extensions/git/out/commands.i18n.json @@ -26,6 +26,9 @@ "provide commit message": "Proporcione un mensaje de confirmación", "branch name": "Nombre de rama", "provide branch name": "Especifique un nombre para la rama", + "select branch to delete": "Seleccione una rama para borrar", + "confirm force delete branch": "La rama '{0}' no está completamente fusionada. ¿Borrarla de todas formas?", + "delete branch": "Borrar rama...", "no remotes to pull": "El repositorio no tiene remotos configurados de los que extraer.", "no remotes to push": "El repositorio no tiene remotos configurados en los que insertar.", "nobranch": "Extraiga del repositorio una rama para insertar un remoto.", diff --git a/i18n/esn/extensions/git/package.i18n.json b/i18n/esn/extensions/git/package.i18n.json index 504bfa025696e..afda046fe5a80 100644 --- a/i18n/esn/extensions/git/package.i18n.json +++ b/i18n/esn/extensions/git/package.i18n.json @@ -26,6 +26,7 @@ "command.undoCommit": "Deshacer última confirmación", "command.checkout": "Desproteger en...", "command.branch": "Crear rama...", + "command.deleteBranch": "Borrar rama...", "command.pull": "Incorporación de cambios", "command.pullRebase": "Incorporación de cambios (fusionar mediante cambio de base)", "command.push": "Insertar", diff --git a/i18n/esn/extensions/markdown/out/extension.i18n.json b/i18n/esn/extensions/markdown/out/extension.i18n.json index 8b6ad71cd4e6d..360f0b974b76f 100644 --- a/i18n/esn/extensions/markdown/out/extension.i18n.json +++ b/i18n/esn/extensions/markdown/out/extension.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "onPreviewStyleLoadError": "No se pudo cargar 'markdown.styles': {0}" +} \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json index 8b6ad71cd4e6d..22ca13053b59f 100644 --- a/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "acceptCurrentChange": "Aceptar cambio actual", + "acceptIncomingChange": "Aceptar cambio entrante", + "acceptBothChanges": "Aceptar ambos cambios", + "compareChanges": "Comparar cambios" +} \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json index 8b6ad71cd4e6d..eb8028b1717b2 100644 --- a/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json @@ -3,4 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "cursorNotInConflict": "El cursor de edición no se encuentra en un conflicto de fusión", + "compareChangesTitle": "{0}: Cambios actuales \\u2194 Cambios entrantes", + "cursorOnSplitterRange": "El cursor del editor está dentro del separador de conflictos de fusión, muévalo al bloque \"actual\" o al \"entrante\" ", + "noConflicts": "No se encontraron conflictos en este archivo", + "noOtherConflictsInThisFile": "No hay más conflictos en este archivo" +} \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/esn/extensions/merge-conflict/out/mergeDecorator.i18n.json index 8b6ad71cd4e6d..9cf24c3ecc5e0 100644 --- a/i18n/esn/extensions/merge-conflict/out/mergeDecorator.i18n.json +++ b/i18n/esn/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "currentChange": "(Cambio actual)", + "incomingChange": "(Cambio entrante)" +} \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/package.i18n.json b/i18n/esn/extensions/merge-conflict/package.i18n.json index 8b6ad71cd4e6d..880711d45ac89 100644 --- a/i18n/esn/extensions/merge-conflict/package.i18n.json +++ b/i18n/esn/extensions/merge-conflict/package.i18n.json @@ -3,4 +3,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "command.category": "Fusionar conflicto", + "command.accept.all-incoming": "Aceptar todos los entrantes", + "command.accept.all-both": "Aceptar todos ambos", + "command.accept.current": "Aceptar actual", + "command.accept.incoming": "Aceptar entrante", + "command.accept.selection": "Aceptar selección", + "command.accept.both": "Aceptar ambos", + "command.next": "Siguiente conflicto", + "command.previous": "Conflicto anterior", + "command.compare": "Comparar conflicto actual", + "config.title": "Fusionar conflicto", + "config.codeLensEnabled": "Habilitar/deshabilitar CodeLens de fusionar bloque de conflictos en el editor", + "config.decoratorsEnabled": "Habilitar/deshabilitar decoradores de conflictos de fusión en el editor" +} \ No newline at end of file diff --git a/i18n/esn/extensions/npm/package.i18n.json b/i18n/esn/extensions/npm/package.i18n.json index 8b6ad71cd4e6d..d71e21915daba 100644 --- a/i18n/esn/extensions/npm/package.i18n.json +++ b/i18n/esn/extensions/npm/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.npm.autoDetect": "Controla si la detección automática de scripts npm está activada o desactivada. Por defecto está activada." +} \ No newline at end of file diff --git a/i18n/esn/extensions/typescript/package.i18n.json b/i18n/esn/extensions/typescript/package.i18n.json index 599140da8f582..4ff6892a0a6e6 100644 --- a/i18n/esn/extensions/typescript/package.i18n.json +++ b/i18n/esn/extensions/typescript/package.i18n.json @@ -37,6 +37,7 @@ "typescript.referencesCodeLens.enabled": "Habilitar/deshabilitar las referencias de CodeLens en los archivos de TypeScript. Requiere TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Habilita o deshabilita implementaciones de CodeLens. Requiere TypeScript >= 2.2.0.", "typescript.openTsServerLog.title": "Abrir registro del servidor de TS", + "typescript.restartTsServer": "Reiniciar servidor TS", "typescript.selectTypeScriptVersion.title": "Seleccionar versión de TypeScript", "jsDocCompletion.enabled": "Habilita o deshabilita comentarios automaticos de JSDoc", "javascript.implicitProjectConfig.checkJs": "Habilita/deshabilita la comprobación semántica de los archivos JavaScript. Los archivos jsconfig.json o tsconfig.json reemplazan esta configuración. Se requiere TypeScript >=2.3.1.", diff --git a/i18n/esn/src/vs/code/electron-main/windows.i18n.json b/i18n/esn/src/vs/code/electron-main/windows.i18n.json index fd891dfad9464..80fb2bc32dc6d 100644 --- a/i18n/esn/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/esn/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "Aceptar", "pathNotExistTitle": "La ruta no existe", "pathNotExistDetail": "Parece que la ruta '{0}' ya no existe en el disco.", - "accessibilityOptionsWindowTitle": "Opciones de accesibilidad", "reopen": "Volver a abrir", "wait": "Siga esperando", "close": "Cerrar", diff --git a/i18n/esn/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index 916ac3e48848c..ff677b59a60d7 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "Color de fondo de la barra de estado cuando se está depurando un programa. La barra de estado se muestra en la parte inferior de la ventana" + "statusBarDebuggingBackground": "Color de fondo de la barra de estado cuando se está depurando un programa. La barra de estado se muestra en la parte inferior de la ventana", + "statusBarDebuggingForeground": "Color de primer plano de la barra de estado cuando se está depurando un programa. La barra de estado se muestra en la parte inferior de la ventana" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 2b42d7a0c5b37..f9f715ea4a98e 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "disableOtherKeymapsConfirmation": "¿Quiere deshabilitar otras asignaciones de teclado para evitar conflictos entre los enlaces de teclado?", "yes": "Sí", - "no": "No" + "no": "No", + "uninstall": "Desinstalación", + "later": "Más tarde" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index ef718dc3ee129..923353af13327 100644 --- a/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,6 +16,7 @@ "associations": "Configure asociaciones de archivo para los lenguajes (por ejemplo, \"*.extension\": \"html\"). Estas asociaciones tienen prioridad sobre las asociaciones predeterminadas de los lenguajes instalados.", "encoding": "La codificación del juego de caracteres predeterminada que debe utilizarse al leer y escribir archivos.", "autoGuessEncoding": "Si está opción está habilitada, se intentará adivinar la codificación del juego de caracteres al abrir los archivos", + "eol": "Carácter predeterminado de final de línea. Utilice \\n para LF y \\r\\n para CRLF.", "trimTrailingWhitespace": "Si se habilita, se recortará el espacio final cuando se guarde un archivo.", "insertFinalNewline": "Si se habilita, inserte una nueva línea final al final del archivo cuando lo guarde.", "files.autoSave.off": "Un archivo con modificaciones no se guarda nunca automáticamente.", diff --git a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/code/electron-main/windows.i18n.json b/i18n/fra/src/vs/code/electron-main/windows.i18n.json index 7893fb77cc30a..af0778db0155d 100644 --- a/i18n/fra/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/fra/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "OK", "pathNotExistTitle": "Le chemin d'accès n'existe pas", "pathNotExistDetail": "Le chemin d'accès '{0}' ne semble plus exister sur le disque.", - "accessibilityOptionsWindowTitle": "Options d'accessibilité", "reopen": "Rouvrir", "wait": "Continuer à attendre", "close": "Fermer", diff --git a/i18n/fra/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 5ddc77dfc5a2b..8fa1a11d54a58 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "disableOtherKeymapsConfirmation": "Désactiver les autres mappages de touches pour éviter les conflits de combinaisons de touches ?", "yes": "Oui", - "no": "Non" + "no": "Non", + "uninstall": "Désinstaller", + "later": "Plus tard" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/fra/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/code/electron-main/windows.i18n.json b/i18n/ita/src/vs/code/electron-main/windows.i18n.json index 2d2cdf7fee4d6..6add23a425757 100644 --- a/i18n/ita/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/ita/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "OK", "pathNotExistTitle": "Il percorso non esiste", "pathNotExistDetail": "Il percorso '{0}' sembra non esistere più sul disco.", - "accessibilityOptionsWindowTitle": "Opzioni accessibilità", "reopen": "Riapri", "wait": "Continua ad attendere", "close": "Chiudi", diff --git a/i18n/ita/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 6c3f2e984e8d1..0a6152b0c7b2a 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "disableOtherKeymapsConfirmation": "Disabilitare altre mappature tastiera per evitare conflitti tra tasti di scelta rapida?", "yes": "Sì", - "no": "No" + "no": "No", + "uninstall": "Disinstalla", + "later": "In seguito" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/ita/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/git/out/commands.i18n.json b/i18n/jpn/extensions/git/out/commands.i18n.json index 8ecbb56396551..9c6bd23d15549 100644 --- a/i18n/jpn/extensions/git/out/commands.i18n.json +++ b/i18n/jpn/extensions/git/out/commands.i18n.json @@ -26,6 +26,9 @@ "provide commit message": "コミット メッセージを入力してください", "branch name": "ブランチ名", "provide branch name": "ブランチ名を指定してください", + "select branch to delete": "削除するブランチの選択", + "confirm force delete branch": "ブランチ '{0}' はマージされていません。それでも削除しますか?", + "delete branch": "ブランチの削除", "no remotes to pull": "リポジトリには、プル元として構成されているリモートがありません。", "no remotes to push": "リポジトリには、プッシュ先として構成されているリモートがありません。", "nobranch": "リモートにプッシュするブランチをチェックアウトしてください。", diff --git a/i18n/jpn/extensions/git/package.i18n.json b/i18n/jpn/extensions/git/package.i18n.json index 66c511eaf69b2..1c27e31a01c5f 100644 --- a/i18n/jpn/extensions/git/package.i18n.json +++ b/i18n/jpn/extensions/git/package.i18n.json @@ -26,6 +26,7 @@ "command.undoCommit": "前回のコミットを元に戻す", "command.checkout": "チェックアウト先...", "command.branch": "分岐の作成...", + "command.deleteBranch": "ブランチの削除...", "command.pull": "プル", "command.pullRebase": "プル (リベース)", "command.push": "プッシュ", diff --git a/i18n/jpn/extensions/markdown/out/extension.i18n.json b/i18n/jpn/extensions/markdown/out/extension.i18n.json index 8b6ad71cd4e6d..fd083fda4b6ca 100644 --- a/i18n/jpn/extensions/markdown/out/extension.i18n.json +++ b/i18n/jpn/extensions/markdown/out/extension.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "onPreviewStyleLoadError": "'markdown.styles' を読み込むことができません: {0}" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json index 8b6ad71cd4e6d..104396accee7b 100644 --- a/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "compareChanges": "変更の比較" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json index 8b6ad71cd4e6d..6c318704912ce 100644 --- a/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "cursorNotInConflict": "エディターのカーソルがマージの競合の範囲内にありません", + "noConflicts": "このファイルにマージの競合は存在しません", + "noOtherConflictsInThisFile": "このファイルに他のマージの競合は存在しません" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json index 8b6ad71cd4e6d..9da2446076d63 100644 --- a/i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json +++ b/i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "currentChange": "(現在の変更)" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/package.i18n.json b/i18n/jpn/extensions/merge-conflict/package.i18n.json index 8b6ad71cd4e6d..178880dd69d0d 100644 --- a/i18n/jpn/extensions/merge-conflict/package.i18n.json +++ b/i18n/jpn/extensions/merge-conflict/package.i18n.json @@ -3,4 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "command.category": "マージの競合", + "command.next": "次の競合", + "command.previous": "前の競合", + "command.compare": "現在の競合を比較", + "config.title": "マージの競合" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/npm/package.i18n.json b/i18n/jpn/extensions/npm/package.i18n.json index 8b6ad71cd4e6d..6a332075fd0c7 100644 --- a/i18n/jpn/extensions/npm/package.i18n.json +++ b/i18n/jpn/extensions/npm/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.npm.autoDetect": "npm スクリプトの自動検出をオンにするかオフにするかを制御します。既定はオンです。" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/typescript/package.i18n.json b/i18n/jpn/extensions/typescript/package.i18n.json index d3f776eaa1130..1ad434c32052d 100644 --- a/i18n/jpn/extensions/typescript/package.i18n.json +++ b/i18n/jpn/extensions/typescript/package.i18n.json @@ -37,6 +37,7 @@ "typescript.referencesCodeLens.enabled": "TypeScript ファイル内で CodeLens の参照を有効/無効にします。TypeScript 2.0.6 以上が必要です。", "typescript.implementationsCodeLens.enabled": "CodeLens の実装を有効/無効にします。TypeScript 2.2.0 以上が必要です。", "typescript.openTsServerLog.title": "TS サーバーのログを開く", + "typescript.restartTsServer": "TS サーバーを再起動する", "typescript.selectTypeScriptVersion.title": "TypeScript のバージョンの選択", "jsDocCompletion.enabled": " 自動 JSDoc コメントを有効/無効にします", "javascript.implicitProjectConfig.checkJs": "JavaScript ファイルのセマンティック チェックを有効/無効にします。既存の jsconfi.json や tsconfi.json ファイルの設定はこれより優先されます。TypeScript は 2.3.1 以上である必要があります。", diff --git a/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index e70844baf7b3f..15d556bd644e0 100644 --- a/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,6 +6,7 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "イメージが大きすぎてエディターに表示できません。", + "resourceOpenExternalButton": "外部のプログラムを使用して画像を開きますか?", "nativeBinaryError": "このファイルはバイナリか、非常に大きいか、またはサポートされていないテキスト エンコードを使用しているため、エディターに表示されません。", "sizeB": "{0}B", "sizeKB": "{0}KB", diff --git a/i18n/jpn/src/vs/code/electron-main/windows.i18n.json b/i18n/jpn/src/vs/code/electron-main/windows.i18n.json index 6b0480ce2d2eb..6631797b5a49c 100644 --- a/i18n/jpn/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/jpn/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "OK", "pathNotExistTitle": "パスが存在しません", "pathNotExistDetail": "パス '{0}' はディスクに存在しなくなったようです。", - "accessibilityOptionsWindowTitle": "ユーザー補助オプション", "reopen": "もう一度開く", "wait": "待機を続ける", "close": "閉じる", diff --git a/i18n/jpn/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/jpn/src/vs/editor/common/view/editorColorRegistry.i18n.json index f364e5e0d147a..b380e645e9860 100644 --- a/i18n/jpn/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/jpn/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -16,5 +16,9 @@ "editorBracketMatchBackground": "一致するかっこの背景色", "editorBracketMatchBorder": "一致するかっこ内のボックスの色", "editorOverviewRulerBorder": "概要ルーラーの境界色。", - "editorGutter": "エディターの余白の背景色。余白にはグリフ マージンと行番号が含まれます。" + "editorGutter": "エディターの余白の背景色。余白にはグリフ マージンと行番号が含まれます。", + "errorForeground": "エディターでエラーを示す波線の前景色。", + "errorBorder": "エディターでエラーを示す波線の境界線の色。", + "warningForeground": "エディターで警告を示す波線の前景色。", + "warningBorder": "エディターで警告を示す波線の境界線の色。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/jpn/src/vs/editor/contrib/links/browser/links.i18n.json index 178a2d932ba15..67812ff35d18c 100644 --- a/i18n/jpn/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "command キーを押しながらクリックしてリンク先を表示", "links.navigate": "Ctrl キーを押しながらクリックしてリンク先を表示", + "links.navigate.al": "Altl キーを押しながらクリックしてリンク先を表示", "invalid.url": "申し訳ありません。このリンクは形式が正しくないため開くことができませんでした: {0}", "missing.url": "申し訳ありません。このリンクはターゲットが存在しないため開くことができませんでした。", "label": "リンクを開く" diff --git a/i18n/jpn/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index aa4a05fcb7236..ccdb00421dca2 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "プログラムをデバッグしているときのステータス バーの背景色。ステータス バーはウィンドウの下部に表示されます" + "statusBarDebuggingBackground": "プログラムをデバッグしているときのステータス バーの背景色。ステータス バーはウィンドウの下部に表示されます", + "statusBarDebuggingForeground": "プログラムをデバッグしているときのステータス バーの前景色。ステータス バーはウィンドウの下部に表示されます" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index b12d5ba07d845..868785478db0b 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,6 +22,8 @@ "disableGloballyAction": "常に行う", "disableAction": "無効にする", "checkForUpdates": "更新の確認", + "enableAutoUpdate": "拡張機能の自動更新を有効にする", + "disableAutoUpdate": "拡張機能の自動更新を無効にする", "updateAll": "すべての拡張機能を更新します", "reloadAction": "再読み込み", "postUpdateTooltip": "再度読み込んで更新する", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "ワークスペースのおすすめの拡張機能を表示", "showRecommendedKeymapExtensions": "推奨のキーマップを表示する", "showRecommendedKeymapExtensionsShort": "キーマップ", + "showLanguageExtensions": "言語の拡張機能を表示", + "showLanguageExtensionsShort": "言語の拡張機能", "configureWorkspaceRecommendedExtensions": "お勧めの拡張機能の構成 (ワークスペース)", "ConfigureWorkspaceRecommendations.noWorkspace": "推奨事項はワークスペース フォルダーでのみ利用可能です。", "OpenExtensionsFile.failed": "'.vscode' ファルダー ({0}) 内に 'extensions.json' ファイルを作成できません。", diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index e5b2af33ec37b..6fd33bfb0e040 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "disableOtherKeymapsConfirmation": "キーバインド間の競合を回避するために、他のキーマップを無効にしますか?", "yes": "はい", - "no": "いいえ" + "no": "いいえ", + "uninstall": "アンインストール", + "later": "後続" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 9356fa119aaae..a23d7187ba270 100644 --- a/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,6 +16,7 @@ "associations": "言語に対するファイルの関連付け (例 \"*.extension\": \"html\") を構成します。これらの関連付けは、インストールされている言語の既定の関連付けより優先されます。", "encoding": "ファイルの読み取り/書き込みで使用する既定の文字セット エンコーディング。", "autoGuessEncoding": "有効な場合、ファイルを開くときに文字セット エンコードを推測します", + "eol": "既定の改行文字。LF の場合には \\n を CRLF の場合には \\r\\n を使用してください。", "trimTrailingWhitespace": "有効にすると、ファイルの保存時に末尾の空白をトリミングします。", "insertFinalNewline": "有効にすると、ファイルの保存時に最新の行を末尾に挿入します。", "files.autoSave.off": "ダーティ ファイルを自動的に保存することはしません。", diff --git a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 54fb4cd8f9366..98112fb116446 100644 --- a/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -9,5 +9,6 @@ "vscode.extension.contributes.snippets-path": "スニペット ファイルのパス。拡張機能フォルダーの相対パスであり、通常 './snippets/' で始まります。", "invalid.language": "`contributes.{0}.language` で不明な言語です。提供された値: {1}", "invalid.path.0": "`contributes.{0}.path` に文字列が必要です。提供された値: {1}", - "invalid.path.1": "拡張機能のフォルダー ({2}) の中に `contributes.{0}.path` ({1}) が含まれている必要があります。これにより拡張を移植できなくなる可能性があります。" + "invalid.path.1": "拡張機能のフォルダー ({2}) の中に `contributes.{0}.path` ({1}) が含まれている必要があります。これにより拡張を移植できなくなる可能性があります。", + "badVariableUse": "スニペット \"{0}\" は、スニペット変数とスニペット プレースホルダーを混乱させる可能性が非常にあります。詳細については https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax をご覧ください。" } \ No newline at end of file diff --git a/i18n/kor/src/vs/code/electron-main/windows.i18n.json b/i18n/kor/src/vs/code/electron-main/windows.i18n.json index 0756d51cd469d..474475abdb126 100644 --- a/i18n/kor/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/kor/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "확인", "pathNotExistTitle": "경로가 없습니다.", "pathNotExistDetail": "'{0}' 경로가 디스크에 더 이상 없는 것 같습니다.", - "accessibilityOptionsWindowTitle": "접근성 옵션", "reopen": "다시 열기", "wait": "계속 대기", "close": "닫기", diff --git a/i18n/kor/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 86d18d9fce388..77a775439157c 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "disableOtherKeymapsConfirmation": "키 바인딩 간 충돌을 피하기 위해 다른 키 맵을 사용하지 않도록 설정할까요?", "yes": "예", - "no": "아니요" + "no": "아니요", + "uninstall": "제거", + "later": "나중에" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/kor/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/extensions/git/out/commands.i18n.json b/i18n/ptb/extensions/git/out/commands.i18n.json index ab5667e260b82..6744be04c882d 100644 --- a/i18n/ptb/extensions/git/out/commands.i18n.json +++ b/i18n/ptb/extensions/git/out/commands.i18n.json @@ -26,6 +26,9 @@ "provide commit message": "Por favor, forneça uma mensagem de commit", "branch name": "Nome do Ramo", "provide branch name": "Por favor, forneça um nome de ramo", + "select branch to delete": "Selecione uma ramificação para excluir", + "confirm force delete branch": "A ramificação '{0}' não foi totalmente mesclada. Excluir mesmo assim?", + "delete branch": "Excluir ramificação", "no remotes to pull": "O seu repositório não possui remotos configurados para efetuar pull.", "no remotes to push": "O seu repositório não possui remotos configurados para efetuar push.", "nobranch": "Por favor, faça checkout em um ramo para fazer push em um remoto.", diff --git a/i18n/ptb/extensions/git/package.i18n.json b/i18n/ptb/extensions/git/package.i18n.json index 0c79f1929bb26..e3eec31c008e8 100644 --- a/i18n/ptb/extensions/git/package.i18n.json +++ b/i18n/ptb/extensions/git/package.i18n.json @@ -26,6 +26,7 @@ "command.undoCommit": "Desfazer Ultima Confirmação", "command.checkout": "Fazer checkout para...", "command.branch": "Criar Ramificação...", + "command.deleteBranch": "Excluir Ramificação...", "command.pull": "Efetuar pull", "command.pullRebase": "Efetuar pull (Rebase)", "command.push": "Enviar por push", diff --git a/i18n/ptb/extensions/markdown/out/extension.i18n.json b/i18n/ptb/extensions/markdown/out/extension.i18n.json index 8b6ad71cd4e6d..0f4d1689d7f2e 100644 --- a/i18n/ptb/extensions/markdown/out/extension.i18n.json +++ b/i18n/ptb/extensions/markdown/out/extension.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "onPreviewStyleLoadError": "Não foi possível carregar o 'markdown.styles': {0}" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json index 8b6ad71cd4e6d..dd5a316f1a134 100644 --- a/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "acceptCurrentChange": "Aceitar a mudança atual", + "acceptIncomingChange": "Aceitar a mudança de entrada", + "acceptBothChanges": "Aceitar ambas alterações", + "compareChanges": "Comparar alteracões" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json index 8b6ad71cd4e6d..ee80b2e19051a 100644 --- a/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json @@ -3,4 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "cursorNotInConflict": "Cursor do editor não está dentro de um conflito de mesclagem", + "compareChangesTitle": "{0}: Mudanças atuais \\u2194 alterações de entrada ", + "cursorOnSplitterRange": "Cursor do editor está dentro do separador de conflitos de mesclagem, por favor mova-o para o bloco \"atual\" ou \"entrada\"", + "noConflicts": "Nenhum conflito de mesclagem encontrado neste arquivo", + "noOtherConflictsInThisFile": "Não há outros conflitos de mesclagem dentro desse arquivo" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json index 8b6ad71cd4e6d..a3da6d4660e50 100644 --- a/i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json +++ b/i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "currentChange": "(Mudança atual)", + "incomingChange": "(Mudança de entrada)" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/package.i18n.json b/i18n/ptb/extensions/merge-conflict/package.i18n.json index 8b6ad71cd4e6d..b290f272513db 100644 --- a/i18n/ptb/extensions/merge-conflict/package.i18n.json +++ b/i18n/ptb/extensions/merge-conflict/package.i18n.json @@ -3,4 +3,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "command.category": "Conflito de Mesclagem", + "command.accept.all-incoming": "Aceitar todas as novas entradas", + "command.accept.all-both": "Aceitar Ambos", + "command.accept.current": "Aceitar a atual", + "command.accept.incoming": "Aceitar as novas entradas", + "command.accept.selection": "Aceitar a seleção", + "command.accept.both": "Aceitar Ambos", + "command.next": "Próximo conflito", + "command.previous": "Conflito anterior", + "command.compare": "Comparar o conflito atual", + "config.title": "Mesclar conflitos", + "config.codeLensEnabled": "Habilitar/Desabilitar o conflito de mesclagem no bloco CodeLens dentro do editor", + "config.decoratorsEnabled": "Habilitar/Desabilitar decoradores de mesclagem de conflitos dentro do editor" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/npm/package.i18n.json b/i18n/ptb/extensions/npm/package.i18n.json index 8b6ad71cd4e6d..8d33aa31e7fdd 100644 --- a/i18n/ptb/extensions/npm/package.i18n.json +++ b/i18n/ptb/extensions/npm/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.npm.autoDetect": "Controla se a deteção automática de scripts npm está ligado ou desligado. O padrão é ligado." +} \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/package.i18n.json b/i18n/ptb/extensions/typescript/package.i18n.json index 5e4125ec05070..74b4568f8b908 100644 --- a/i18n/ptb/extensions/typescript/package.i18n.json +++ b/i18n/ptb/extensions/typescript/package.i18n.json @@ -37,6 +37,7 @@ "typescript.referencesCodeLens.enabled": "Habilitar/desabilitar referências CodeLens em arquivos TypeScript. Requer TypeScript > = 2.0.6.", "typescript.implementationsCodeLens.enabled": "Habilitar/desabilitar implementações CodeLens. Requer TypeScript > = 2.0.6.", "typescript.openTsServerLog.title": "Abrir arquivo de log do servidor TS", + "typescript.restartTsServer": "Reiniciar o servidor TS", "typescript.selectTypeScriptVersion.title": "Selecionar a versão do JavaScript", "jsDocCompletion.enabled": "Habilitar/Desabilitar comentários JSDoc automáticos.", "javascript.implicitProjectConfig.checkJs": "Habilitar/desabilitar verificação semântica de arquivos JavaScript. Os arquivos existentes jsconfig.json ou tsconfig.json substituem essa configuração. Requer TypeScript > = 2.3.1.", diff --git a/i18n/ptb/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/ptb/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index d023184ae7017..ff9f2c98cbb22 100644 --- a/i18n/ptb/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/ptb/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,6 +6,7 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "A imagem é muito grande para ser exibida no editor.", + "resourceOpenExternalButton": "Abrir imagem usando um programa externo?", "nativeBinaryError": "O arquivo não pode ser exibido no editor porque é binário, muito grande ou usa uma codificação de texto sem suporte.", "sizeB": "{0}B", "sizeKB": "{0}KB", diff --git a/i18n/ptb/src/vs/code/electron-main/windows.i18n.json b/i18n/ptb/src/vs/code/electron-main/windows.i18n.json index 308aed2953874..abf3a42e2eb54 100644 --- a/i18n/ptb/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/ptb/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "OK", "pathNotExistTitle": "O caminho não existe", "pathNotExistDetail": "O caminho '{0}' não parece mais existir no disco.", - "accessibilityOptionsWindowTitle": "Opções de Acessibilidade", "reopen": "Reabrir", "wait": "Continuar Esperando", "close": "Fechar", diff --git a/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json index 8411a9303639d..32deba05d12ca 100644 --- a/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -23,6 +23,8 @@ "minimap.enabled": "Controla se o mini mapa é exibido", "minimap.renderCharacters": "Renderizar os caracteres em uma linha (em oposição a blocos de caracteres)", "minimap.maxColumn": "Limitar o tamanho de um mini-mapa para renderizar no máximo um número determinado de colunas", + "find.seedSearchStringFromSelection": "Controla se nós inicializamos a string de pesquisa na Ferramenta de Pesquisa a partir da seleção do editor", + "find.autoFindInSelection": "Controla se a configuração Find in Selection deve estar ativada quando vários caracteres ou linhas de texto estão selecionados no editor", "wordWrap.off": "As linhas nunca serão quebradas.", "wordWrap.on": "As linhas serão quebradas na largura de visualização", "wordWrap.wordWrapColumn": "As linhas serão quebradas em `editor.wordWrapColumn`.", @@ -31,6 +33,7 @@ "wordWrapColumn": "Controla a coluna de quebra de linha do editor quando editor.wordWrap` é 'wordWrapColumn' ou 'bounded'.", "wrappingIndent": "Controla o recuo de linhas quebradas. Pode ser \"none\", \"same\" ou \"indent\".", "mouseWheelScrollSensitivity": "Um multiplicador a ser usado em \"deltaX\" e \"deltaY\" dos eventos de rolagem do botão de rolagem do mouse", + "multicursorModifier": "O modificador a ser utilizado para adicionar vários cursores com o mouse.", "quickSuggestions.strings": "Habilitar sugestões rápidas dentro de strings.", "quickSuggestions.comments": "Habilitar sugestões rápidas dentro de comentários.", "quickSuggestions.other": "Habilitar sugestões rápidas fora de strings e comentários.", @@ -41,6 +44,7 @@ "formatOnType": "Controla se o editor deve formatar automaticamente a linha após a digitação", "formatOnPaste": "Controla se o editor deve formatar automaticamente o conteúdo colado. Um formatador deve estar disponível e o formatador deve ser capaz de formatar apenas uma parte do documento.", "suggestOnTriggerCharacters": "Controla se as sugestões devem aparecer automaticamente ao digitar caracteres de gatilho", + "acceptSuggestionOnEnter": "Controla se as sugestões devem ser aceitas com 'Enter' - em adição a 'Tab'. Ajuda a evitar a ambiguidade entre a inserção de novas linhas ou aceitar sugestões. O valor 'smart' significa apenas aceitar uma sugestão com Enter quando ela fizer uma mudança textual", "acceptSuggestionOnCommitCharacter": "Controla se as sugestões devem ser aceitas em caracteres de confirmação. Por exemplo, em JavaScript, o ponto-e-vírgula (';') pode ser um caractere de confirmação que aceita uma sugestão e digita esse caractere.", "snippetSuggestions": "Controla se os snippets são exibidos juntamente com as outras sugestões e como eles são ordenados.", "emptySelectionClipboard": "Controla se a cópia sem nenhuma seleção copia a linha atual.", diff --git a/i18n/ptb/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/ptb/src/vs/editor/common/view/editorColorRegistry.i18n.json index 8d59b0fcb7d7f..a1bf17d6ec86b 100644 --- a/i18n/ptb/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/ptb/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -16,5 +16,9 @@ "editorBracketMatchBackground": "Cor de fundo atrás do colchetes correspondentes", "editorBracketMatchBorder": "Cor para as caixas de colchetes correspondentes", "editorOverviewRulerBorder": "Cor da borda da régua de visão geral.", - "editorGutter": "Cor de fundo da separação do editor.O separador contém os glifos das margens e os números de linha." + "editorGutter": "Cor de fundo da separação do editor.O separador contém os glifos das margens e os números de linha.", + "errorForeground": "Cor do primeiro plano das linhas onduladas de erro no editor.", + "errorBorder": "Cor da borda das linhas onduladas de erro no editor.", + "warningForeground": "Cor do primeiro plano de linhas onduladas de aviso no editor.", + "warningBorder": "Cor da borda das linhas onduladas de aviso no editor." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/ptb/src/vs/editor/contrib/links/browser/links.i18n.json index 64628273f2a1c..32cd9d3212a7b 100644 --- a/i18n/ptb/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/ptb/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "Cmd + clique para seguir o link", "links.navigate": "Ctrl + clique para seguir o link", + "links.navigate.al": "Alt + clique para seguir o link", "invalid.url": "Desculpe, falha ao abrir este link porque ele não está bem formatado: {0}", "missing.url": "Desculpe, falha ao abrir este link porque seu destino está faltando.", "label": "Abrir link" diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index c2057c183a1f6..ff6a038e701b5 100644 --- a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -11,6 +11,7 @@ "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", "tabFocusModeEnabled": "Tabulação move o foco", + "screenReaderDetected": "Leitor de tela detectado", "disableTabMode": "Desativar o modo de acessibilidade", "gotoLine": "Ir para linha", "indentation": "Indentação", diff --git a/i18n/ptb/src/vs/workbench/common/theme.i18n.json b/i18n/ptb/src/vs/workbench/common/theme.i18n.json index bfe4c0ef01767..635ace8d70878 100644 --- a/i18n/ptb/src/vs/workbench/common/theme.i18n.json +++ b/i18n/ptb/src/vs/workbench/common/theme.i18n.json @@ -11,6 +11,7 @@ "tabInactiveEditorGroupActiveForeground": "Cor de primeiro plano da guia inativa em um grupo ativo. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", "editorGroupBackground": "Cor de fundo de um grupo de editor. Grupos de editor são os recipientes dos editores. A cor de fundo é mostrada ao arrastar o editor de grupos ao redor.", "tabsContainerBackground": "Cor de fundo do cabeçalho do título do grupo de editor quando as guias são habilitadas. Grupos de editor são os recipientes dos editores.", + "tabsContainerBorder": "Cor da borda do cabeçalho do título do grupo de editor quando as guias estão habilitadas. Grupos de editor são os recipientes dos editores.", "editorGroupHeaderBackground": "Cor de fundo do título do cabeçalho do grupo de editor quando as guias são desabilitadas. Grupos de editor são os recipientes dos editores.", "editorGroupBorder": "Cor para separar múltiplos grupos de editor de outro. Grupos de editor são os recipientes dos editores.", "editorDragAndDropBackground": "Cor de fundo ao arrastar editores. A cor deve ter transparência para que o conteúdo do editor ainda possa ser visto.", @@ -21,20 +22,25 @@ "panelActiveTitleBorder": "Cor da borda para o título do painel ativo. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", "statusBarForeground": "Cor do primeiro plano da barra de status. A barra de status é mostrada na parte inferior da janela.", "statusBarBackground": "Cor de fundo da barra de status padrão. A barra de status é mostrada na parte inferior da janela.", + "statusBarBorder": "Cor da borda da barra de status que separa a barra lateral e o editor.A barra de status é mostrada na parte inferior da janela.", "statusBarNoFolderBackground": "Cor de fundo da barra de status quando nenhuma pasta está aberta. A barra de status é mostrada na parte inferior da janela.", + "statusBarNoFolderForeground": "Cor do primeiro plano da barra de status quando nenhuma pasta está aberta. A barra de status é mostrada na parte inferior da janela.", "statusBarItemActiveBackground": "Cor de fundo do item da barra de status quando você clicado. A barra de status é mostrada na parte inferior da janela.", "statusBarItemHoverBackground": "Cor de fundo do item da barra de status quando estiver passando sobre ele. A barra de status é mostrada na parte inferior da janela.", "statusBarProminentItemBackground": "Cor de fundo de itens proeminentes da barra de status. Itens proeminentes destacam-se outras entradas da barra de status para indicar a importância. A barra de status é mostrada na parte inferior da janela.", "statusBarProminentItemHoverBackground": "Cor de fundo dos itens proeminentes de barra de status quando estiver passando sobre eles. Itens proeminentes destacam-se outras entradas de barra de status para indicar a importância. A barra de status é mostrada na parte inferior da janela.", "activityBarBackground": "Cor de fundo da barra de atividades. Barra de atividade está visível à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", "activityBarForeground": "Cor de primeiro plano da barra de atividades (por exemplo, usada para os ícones). A barra de atividades está visível à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", + "activityBarBorder": "Cor da borda da barra de atividades separando a barra lateral. A barra de atividade é mostrada à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", "activityBarDragAndDropBackground": "Cor de feedback de arrastar e soltar para os itens da barra de atividades. A cor deve ter transparência para que as entradas de bar de atividade ainda possam brilhar. A barra de atividade está visível à esquerda ou à direita e permite para alternar entre as visualizações da barra lateral.", "activityBarBadgeBackground": "Cor de fundo da notificação de atividade. A barra de atividade está visível à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", "activityBarBadgeForeground": "Cor de primeiro plano da notificação de atividade. A barra de atividade está visível à esquerda ou à direita e permite alternar entre as visualizações da barra lateral.", "sideBarBackground": "Cor de fundo da barra lateral. A barra lateral é o recipiente para visualizações como explorador e pesquisa.", "sideBarForeground": "Cor de primeiro plano da barra lateral. A barra lateral é o recipiente para visualizações como o explorador e a busca.", + "sideBarBorder": "Cor da borda da barra lateral separando o editor. A barra lateral é o recipiente para visualizações como explorador e pesquisa.", "sideBarTitleForeground": "Cor de primeiro plano do título da barra lateral. A barra lateral é o recipiente para visualizações como explorador e pesquisa.", "sideBarSectionHeaderBackground": "Cor de fundo do cabeçalho de seção lateral. A barra lateral é o recipiente para visões como explorador e pesquisa.", + "sideBarSectionHeaderForeground": "Cor de primeiro plano do cabeçalho de seção da barra lateral. A barra lateral é o recipiente para visualizações como o explorador e pesquisa.", "titleBarActiveForeground": "Cor da barra de título do primeiro plano quando a janela está ativa. Observe que essa cor atualmente somente é suportada no macOS.", "titleBarInactiveForeground": "Cor de primeiro plano da barra de título quando a janela está inativa. Observe que essa cor atualmente somente é suportada no macOS.", "titleBarActiveBackground": "Cor de fundo da barra de título quando a janela está ativa. Observe que essa cor atualmente somente é suportada no macOS.", diff --git a/i18n/ptb/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index b191a0de856b0..86bf6e71ecc6a 100644 --- a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "Cor de fundo da barra de status quando um programa está sendo depurado. A barra de status é mostrada na parte inferior da janela" + "statusBarDebuggingBackground": "Cor de fundo da barra de status quando um programa está sendo depurado. A barra de status é mostrada na parte inferior da janela", + "statusBarDebuggingForeground": "Cor de primeiro plano da barra de status quando um programa está sendo depurado. A barra de status é mostrada na parte inferior da janela" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 1caebe040f568..7f32e3bf15617 100644 --- a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -9,5 +9,6 @@ "emmetPreferences": "Preferências usadas para modificar o comportamento de algumas ações e resolvedores de Emmet.", "emmetSyntaxProfiles": "Definir o perfil para a sintaxe especificada ou usar seu próprio perfil com regras específicas.", "emmetExclude": "Uma matriz de línguagens onde abreviaturas emmet não devem ser expandidas.", - "emmetExtensionsPath": "Caminho para uma pasta contendo perfis emmet, trechos e preferências" + "emmetExtensionsPath": "Caminho para uma pasta contendo perfis emmet, trechos e preferências", + "emmetUseModules": "Use os novos módulos emmet para características emmet ao invés da biblioteca emmet única." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index e2ff606a7c970..61966d0e312bb 100644 --- a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,6 +22,8 @@ "disableGloballyAction": "Sempre", "disableAction": "Desabilitar", "checkForUpdates": "Verificar Atualizações", + "enableAutoUpdate": "Habilitar Extensões Auto-Atualizáveis", + "disableAutoUpdate": "Desabilitar Extensões Auto-Atualizáveis", "updateAll": "Atualizar Todas as Extensões", "reloadAction": "Recarregar", "postUpdateTooltip": "Recarregar para atualizar", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "Mostrar Extensões Recomendadas para o Espaço de Trabalho", "showRecommendedKeymapExtensions": "Mostrar Mapeamentos de Teclado Recomendados", "showRecommendedKeymapExtensionsShort": "Mapeamentos de Teclado", + "showLanguageExtensions": "Mostrar Extensões de Linguagem", + "showLanguageExtensionsShort": "Extensões de Linguagem", "configureWorkspaceRecommendedExtensions": "Configurar Extensões Recomendadas (Espaço de Trabalho)", "ConfigureWorkspaceRecommendations.noWorkspace": "As recomendações somente estão disponíveis em uma pasta do espaço de trabalho.", "OpenExtensionsFile.failed": "Não foi possível criar o arquivo 'extensions.json' na pasta '.vscode' ({0}).", @@ -51,5 +55,8 @@ "disableAll": "Desabilitar Todas as Extensões Instaladas", "disableAllWorkspace": "Desabilitar Todas as Extensões Instaladas para este Espaço de Trabalho", "enableAll": "Habilitar Todas as Extensões Instaladas", - "enableAllWorkspace": "Habilitar Todas as Extensões Instaladas para este Espaço de Trabalho" + "enableAllWorkspace": "Habilitar Todas as Extensões Instaladas para este Espaço de Trabalho", + "extensionButtonProminentBackground": "Cor de fundo do botão para a ações de extensão que se destacam (por exemplo, o botão de instalar).", + "extensionButtonProminentForeground": "Cor de primeiro plano do botão para a ações de extensão que se destacam (por exemplo, o botão de instalar).", + "extensionButtonProminentHoverBackground": "Cor de fundo ao passar o mouse sobre o botão para a ações de extensão que se destacam (por exemplo, o botão de instalar)." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 0cde76b12d897..7e8cde2d602d5 100644 --- a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,7 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "disableOtherKeymapsConfirmation": "Desabilitar outros mapeamentos de teclado para evitar conflitos entre mapeamentos de teclado?", "yes": "Sim", - "no": "Não" + "no": "Não", + "betterMergeDisabled": "A extensão Better Merge agora é intrínseca, a extensão instalada foi desabilitada e pode ser desinstalada.", + "uninstall": "Desinstalar", + "later": "Mais tarde" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index ddbc9408f54f0..f4309c6a9bcb9 100644 --- a/i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,6 +16,7 @@ "associations": "Configurar as associações de arquivo para linguagens (por exemplo, \"* Extension\": \"html\"). Estas têm precedência sobre as associações padrão das linguagens instaladas.", "encoding": "A codificação padrão do conjunto de caracteres para ser usada ao ler e gravar arquivos.", "autoGuessEncoding": "Quando habilitado, tentará adivinhar a codificação do conjunto de caracteres ao abrir arquivos", + "eol": "O caractere padrão de fim de linha. Use \\n para LF e \\r\\n para CRLF.", "trimTrailingWhitespace": "Quando habilitado, removerá espaços em branco à direita ao salvar um arquivo.", "insertFinalNewline": "Quando habilitado, inseririrá uma nova linha no final do arquivo quando salvá-lo.", "files.autoSave.off": "Um arquivo sujo nunca é automaticamente salvo.", diff --git a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 0f8e63601874a..b98cf8d093735 100644 --- a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -9,5 +9,6 @@ "vscode.extension.contributes.snippets-path": "Caminho do arquivo de trechos de código. O caminho é relativo à pasta de extensão e normalmente começa com '. /snippets/'.", "invalid.language": "Linguagem desconhecida em `contributes.{0}.language`. Valor fornecido: {1}", "invalid.path.0": "Esperada uma string em `contributes.{0}.path`. Valor informado: {1}", - "invalid.path.1": "É esperado que `contributes.{0}.path` ({1}) seja incluído na pasta da extensão ({2}). Isto pode tornar a extensão não portável." + "invalid.path.1": "É esperado que `contributes.{0}.path` ({1}) seja incluído na pasta da extensão ({2}). Isto pode tornar a extensão não portável.", + "badVariableUse": "O trecho de código \"{0}\" muito provavelmente confunde as variáveis de trecho de código e espaços reservados do trecho de código. Consulte https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax para obter mais detalhes." } \ No newline at end of file diff --git a/i18n/rus/src/vs/code/electron-main/windows.i18n.json b/i18n/rus/src/vs/code/electron-main/windows.i18n.json index 6a621782e32d1..b1934cff062ea 100644 --- a/i18n/rus/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/rus/src/vs/code/electron-main/windows.i18n.json @@ -7,7 +7,6 @@ "ok": "ОК", "pathNotExistTitle": "Путь не существует.", "pathNotExistDetail": "Путь \"{0}\" больше не существует на диске.", - "accessibilityOptionsWindowTitle": "Специальные возможности", "reopen": "Открыть повторно", "wait": "Подождать", "close": "Закрыть", diff --git a/i18n/rus/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 906d10fee6b4b..82ee62547a4a8 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,7 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "disableOtherKeymapsConfirmation": "Отключить другие раскладки клавиатуры, чтобы избежать конфликта между настраиваемыми сочетаниями клавиш?", "yes": "Да", - "no": "Нет" + "no": "Нет", + "uninstall": "Удаление", + "later": "Позже" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/rus/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file From 8c1c1d14df3c2f819078484aeffee37c3f00a7a8 Mon Sep 17 00:00:00 2001 From: Erich Gamma Date: Sun, 28 May 2017 17:29:39 +0200 Subject: [PATCH 1232/2747] Added npm install to the list of discovered npm tasks --- extensions/npm/src/main.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extensions/npm/src/main.ts b/extensions/npm/src/main.ts index 9308210ede8f7..9dc734a4ffebc 100644 --- a/extensions/npm/src/main.ts +++ b/extensions/npm/src/main.ts @@ -90,6 +90,8 @@ async function getNpmScriptsAsTasks(): Promise { } result.push(task); }); + // add some 'well known' npm tasks + result.push(new vscode.ShellTask(`npm: install`, `npm install`)); return Promise.resolve(result); } catch (e) { return Promise.resolve(emptyTasks); From 4b2a13aae48e8cdc1485c31d1ac4ecfa37094b69 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 29 May 2017 09:06:04 +0200 Subject: [PATCH 1233/2747] Make the workspace build / test task win over contributed tasks --- .../parts/tasks/common/taskConfiguration.ts | 39 +++++++++++++------ .../electron-browser/task.contribution.ts | 30 +++++++++----- .../tasks/test/node/configuration.test.ts | 25 +++++++++++- 3 files changed, 71 insertions(+), 23 deletions(-) diff --git a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts index 9af9833e240d0..09fa78dfd77e4 100644 --- a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts @@ -137,11 +137,18 @@ export interface TaskDescription extends PlatformTaskDescription { promptOnClose?: boolean; /** + * Defines the group the task belongs too. + */ + group?: string; + + /** + * @deprecated Use `group` instead. * Whether this task maps to the default build command. */ isBuildCommand?: boolean; /** + * @deprecated Use `group` instead. * Whether this task maps to the default test command. */ isTestCommand?: boolean; @@ -766,8 +773,8 @@ namespace TaskDescription { } let parsedTasks: Tasks.Task[] = []; let annotatingTasks: Tasks.Task[] = []; - let defaultBuildTask: { task: Tasks.Task; rank: number; } = { task: null, rank: -1 }; - let defaultTestTask: { task: Tasks.Task; rank: number; } = { task: null, rank: -1 }; + let defaultBuildTask: { task: Tasks.Task; rank: number; } = { task: undefined, rank: -1 }; + let defaultTestTask: { task: Tasks.Task; rank: number; } = { task: undefined, rank: -1 }; tasks.forEach((externalTask) => { let taskName = externalTask.taskName; if (!taskName) { @@ -800,6 +807,16 @@ namespace TaskDescription { if (externalTask.promptOnClose !== void 0) { task.promptOnClose = !!externalTask.promptOnClose; } + if (Tasks.TaskGroup.is(externalTask.group)) { + task.group = externalTask.group; + } + if (task.group === void 0) { + if (Types.isBoolean(externalTask.isBuildCommand) && externalTask.isBuildCommand) { + task.group = Tasks.TaskGroup.Build; + } else if (Types.isBoolean(externalTask.isTestCommand && externalTask.isTestCommand)) { + task.group = Tasks.TaskGroup.Test; + } + } if (externalTask.command !== void 0) { // if the task has its own command then we suppress the // task name by default. @@ -848,26 +865,24 @@ namespace TaskDescription { } if (addTask) { parsedTasks.push(task); - if (!Types.isUndefined(externalTask.isBuildCommand) && externalTask.isBuildCommand && defaultBuildTask.rank < 2) { + if (task.group === Tasks.TaskGroup.Build && defaultBuildTask.rank < 2) { defaultBuildTask.task = task; defaultBuildTask.rank = 2; - } else if (taskName === 'build' && defaultBuildTask.rank < 2) { - defaultBuildTask.task = task; - defaultBuildTask.rank = 1; - } - if (!Types.isUndefined(externalTask.isTestCommand) && externalTask.isTestCommand && defaultTestTask.rank < 2) { + } else if (task.group === Tasks.TaskGroup.Test && defaultTestTask.rank < 2) { defaultTestTask.task = task; defaultTestTask.rank = 2; - } else if (taskName === 'test' && defaultTestTask.rank < 2) { + } else if (task.name === 'build' && defaultBuildTask.rank < 1) { + defaultBuildTask.task = task; + defaultBuildTask.rank = 1; + } else if (task.name === 'test' && defaultTestTask.rank < 1) { defaultTestTask.task = task; defaultTestTask.rank = 1; } } }); - if (defaultBuildTask.task) { + if (defaultBuildTask.rank > -1 && defaultBuildTask.rank < 2) { defaultBuildTask.task.group = Tasks.TaskGroup.Build; - } - if (defaultTestTask.task) { + } else if (defaultTestTask.rank > -1 && defaultTestTask.rank < 2) { defaultTestTask.task.group = Tasks.TaskGroup.Test; } return parsedTasks.length === 0 && annotatingTasks.length === 0 ? undefined : { tasks: parsedTasks, annotatingTasks: annotatingTasks }; diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 49c14ca211049..68b32dfc24474 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -740,21 +740,21 @@ class TaskService extends EventEmitter implements ITaskService { let uuidMap: IStringDictionary = Object.create(null); let identifierMap: IStringDictionary = Object.create(null); - let primaryTasks: Task[] = []; + let workspaceTasks: Task[] = []; + let extensionTasks: Task[] = []; sets.forEach((set) => { set.tasks.forEach((task) => { uuidMap[task._id] = task; identifierMap[task.identifier] = task; if (group && task.group === group) { - primaryTasks.push(task); + if (task._source.kind === TaskSourceKind.Workspace) { + workspaceTasks.push(task); + } else { + extensionTasks.push(task); + } } }); }); - if (primaryTasks.length === 0) { - return undefined; - } - // check for a WORKSPACE build task and use that onemptied.apply - let resolver: ITaskResolver = { resolve: (id: string) => { let result = uuidMap[id]; @@ -764,8 +764,18 @@ class TaskService extends EventEmitter implements ITaskService { return identifierMap[id]; } }; - if (primaryTasks.length === 1) { - return { task: primaryTasks[0], resolver }; + if (workspaceTasks.length > 0) { + if (workspaceTasks.length > 1) { + this._outputChannel.append(nls.localize('moreThanOneBuildTask', 'There are many build tasks defined in the tasks.json. Executing the first one.\n')); + } + return { task: workspaceTasks[0], resolver }; + } + if (extensionTasks.length === 0) { + return undefined; + } + + if (extensionTasks.length === 1) { + return { task: extensionTasks[0], resolver }; } else { let id: string = UUID.generateUuid(); let task: Task = { @@ -773,7 +783,7 @@ class TaskService extends EventEmitter implements ITaskService { _source: { kind: TaskSourceKind.Generic }, name: id, identifier: id, - dependsOn: primaryTasks.map(task => task._id), + dependsOn: extensionTasks.map(task => task._id), command: undefined, }; return { task, resolver }; diff --git a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts index 03610ad7ecca0..cbccf978e9df1 100644 --- a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts +++ b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts @@ -512,7 +512,7 @@ function assertProblemPattern(actual: ProblemPattern, expected: ProblemPattern) assert.strictEqual(actual.loop, expected.loop); } -suite('Tasks Configuration parsing tests', () => { +suite('Tasks version 0.1.0', () => { test('tasks: all default', () => { let builder = new ConfiguationBuilder(); builder.task('tsc', 'tsc'). @@ -1360,6 +1360,29 @@ suite('Tasks Configuration parsing tests', () => { }); }); +suite('Tasks version 2.0.0', () => { + test('Build workspace task', () => { + let external: ExternalTaskRunnerConfiguration = { + version: '2.0.0', + tasks: [ + { + taskName: 'dir', + command: 'dir', + type: 'shell', + group: 'build' + } + ] + }; + let builder = new ConfiguationBuilder(); + builder.task('dir', 'dir'). + suppressTaskName(true). + group(Tasks.TaskGroup.Build). + command().type(Tasks.CommandType.Shell); + testConfiguration(external, builder); + }); + +}); + suite('Bugs / regression tests', () => { test('Bug 19548', () => { if (Platform.isLinux) { From 2fa17a91dab942b8466ed2960b170c67f088ab23 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 29 May 2017 09:08:57 +0200 Subject: [PATCH 1234/2747] Added script to compile. --- test/smoke/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/test/smoke/package.json b/test/smoke/package.json index 4f637a5adf7e1..eb58965b87c87 100644 --- a/test/smoke/package.json +++ b/test/smoke/package.json @@ -3,6 +3,7 @@ "version": "0.1.0", "main": "./src/main.js", "scripts": { + "compile": "tsc", "pretest": "tsc", "test": "node src/main.js" }, From 60328f1db18b81ce53a21ecb82e4861fffa41a0e Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 29 May 2017 09:31:59 +0200 Subject: [PATCH 1235/2747] Revert "theming - remove hardcoded list color in keybindings editor" This reverts commit 84ced6126ea370a757fbff264f106af319029257. --- .../parts/preferences/browser/media/keybindingsEditor.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css b/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css index 9932877ef4d89..94a771ce087ad 100644 --- a/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css +++ b/src/vs/workbench/parts/preferences/browser/media/keybindingsEditor.css @@ -68,6 +68,12 @@ display: flex; } +.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row.even:not(.focused):not(.selected):not(:hover), +.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:not(:focus) .monaco-list-row.focused.even:not(.selected):not(:hover), +.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list:not(.focused) .monaco-list-row.focused.even:not(.selected):not(:hover) { + background-color: rgba(130, 130, 130, 0.04); +} + .keybindings-editor > .keybindings-body .keybindings-list-container .monaco-list-row > .header { text-align: left; font-weight: bold; From 3c1f7878b2d3114483d09c5ee8490d3cf27ec0b2 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 29 May 2017 10:50:34 +0200 Subject: [PATCH 1236/2747] theming - remove panel.background as we currently do not support it end to end --- extensions/theme-abyss/themes/abyss-color-theme.json | 1 - .../theme-quietlight/themes/quietlight-color-theme.json | 1 - .../themes/solarized-dark-color-theme.json | 1 - .../themes/solarized-light-color-theme.json | 1 - src/vs/workbench/browser/parts/panel/panelPart.ts | 6 +++--- src/vs/workbench/common/theme.ts | 6 ------ 6 files changed, 3 insertions(+), 13 deletions(-) diff --git a/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json index b244eb1cd6aba..a67dd83b89d56 100644 --- a/extensions/theme-abyss/themes/abyss-color-theme.json +++ b/extensions/theme-abyss/themes/abyss-color-theme.json @@ -375,7 +375,6 @@ // "activityBar.dropBackground": "", // Workbench: Panel - // "panel.background": "", "panel.border": "#2b2b4a", // "panelTitle.activeBorder": "", // "panelTitle.activeForeground": "", diff --git a/extensions/theme-quietlight/themes/quietlight-color-theme.json b/extensions/theme-quietlight/themes/quietlight-color-theme.json index db8f30e0db208..3086021874bfa 100644 --- a/extensions/theme-quietlight/themes/quietlight-color-theme.json +++ b/extensions/theme-quietlight/themes/quietlight-color-theme.json @@ -465,7 +465,6 @@ "editorWhitespace.foreground": "#AAAAAA", "editor.lineHighlightBackground": "#E4F6D4", "editor.selectionBackground": "#C9D0D9", - "panel.background": "#F5F5F5", "sideBar.background": "#F2F2F2", "sideBarSectionHeader.background": "#ede8ef", "editorLineNumber.foreground": "#9DA39A", diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index c89667099de44..10b058c491161 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -419,7 +419,6 @@ // "activityBarBadge.foreground": "", // Workbench: Panel - // "panel.background": "", "panel.border": "#2b2b4a", // "panelTitle.activeBorder": "", // "panelTitle.activeForeground": "", diff --git a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json index 0c3123614c0c7..cebad7db3b270 100644 --- a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -419,7 +419,6 @@ // "activityBarBadge.foreground": "", // Workbench: Panel - // "panel.background": "", "panel.border": "#DDD6C1", // "panelTitle.activeBorder": "", // "panelTitle.activeForeground": "", diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index f163fd6aa151b..33c4fabe88449 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -25,8 +25,8 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { ActionsOrientation, ActionBar } from 'vs/base/browser/ui/actionbar/actionbar'; import { ClosePanelAction, PanelAction, ToggleMaximizedPanelAction } from 'vs/workbench/browser/parts/panel/panelActions'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; -import { PANEL_BACKGROUND, PANEL_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_INACTIVE_TITLE_FOREGROUND, PANEL_ACTIVE_TITLE_BORDER } from 'vs/workbench/common/theme'; -import { activeContrastBorder, focusBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { PANEL_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_INACTIVE_TITLE_FOREGROUND, PANEL_ACTIVE_TITLE_BORDER } from 'vs/workbench/common/theme'; +import { activeContrastBorder, focusBorder, contrastBorder, editorBackground } from 'vs/platform/theme/common/colorRegistry'; export class PanelPart extends CompositePart implements IPanelService { @@ -101,7 +101,7 @@ export class PanelPart extends CompositePart implements IPanelService { super.updateStyles(); const container = this.getContainer(); - container.style('background-color', this.getColor(PANEL_BACKGROUND)); + container.style('background-color', this.getColor(editorBackground)); const title = this.getTitleArea(); title.style('border-top-color', this.getColor(PANEL_BORDER) || this.getColor(contrastBorder)); diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index ae51ff8ef6dac..6a3c745dafbf2 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -84,12 +84,6 @@ export const EDITOR_DRAG_AND_DROP_BACKGROUND = registerColor('editorGroup.dropBa // < --- Panels --- > -export const PANEL_BACKGROUND = registerColor('panel.background', { - dark: editorBackground, - light: editorBackground, - hc: editorBackground -}, nls.localize('panelBackground', "Panel background color. Panels are shown below the editor area and contain views like output and integrated terminal.")); - export const PANEL_BORDER = registerColor('panel.border', { dark: Color.fromHex('#808080').transparent(0.35), light: Color.fromHex('#808080').transparent(0.35), From cf4f34d8081746cbd144a6a8a883047f758e5bd2 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 29 May 2017 11:04:46 +0200 Subject: [PATCH 1237/2747] Extension viewlet high contrast mouse over borders only highlight a single border for top and bottom entries (fixes #15859) --- src/vs/base/browser/ui/list/listWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/browser/ui/list/listWidget.ts b/src/vs/base/browser/ui/list/listWidget.ts index d8f833da54009..1ed888d7f2a3c 100644 --- a/src/vs/base/browser/ui/list/listWidget.ts +++ b/src/vs/base/browser/ui/list/listWidget.ts @@ -887,7 +887,7 @@ export class List implements ISpliceable, IDisposable { } if (styles.listSelectionOutline) { - content.push(`.monaco-list.${this.idPrefix} .monaco-list-row.selected { outline: 1px dotted ${styles.listSelectionOutline}; }`); + content.push(`.monaco-list.${this.idPrefix} .monaco-list-row.selected { outline: 1px dotted ${styles.listSelectionOutline}; outline-offset: -1px; }`); } if (styles.listFocusOutline) { From bcf8f556928bf5c49ef94d60ef696dfd64423e54 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 29 May 2017 11:07:57 +0200 Subject: [PATCH 1238/2747] Search viewlet doesn't get selected text from diff editor (fixes #25293) --- .../workbench/parts/search/browser/searchViewlet.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index 97f51caa16cfa..9fe88c72d579d 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -9,7 +9,7 @@ import 'vs/css!./media/searchviewlet'; import nls = require('vs/nls'); import { TPromise } from 'vs/base/common/winjs.base'; import { Emitter, debounceEvent } from 'vs/base/common/event'; -import { ICommonCodeEditor, isCommonCodeEditor } from 'vs/editor/common/editorCommon'; +import { ICommonCodeEditor, isCommonCodeEditor, isCommonDiffEditor } from 'vs/editor/common/editorCommon'; import lifecycle = require('vs/base/common/lifecycle'); import errors = require('vs/base/common/errors'); import aria = require('vs/base/browser/ui/aria/aria'); @@ -797,7 +797,15 @@ export class SearchViewlet extends Viewlet { return null; } - let editorControl: any = this.editorService.getActiveEditor().getControl(); + let editorControl = this.editorService.getActiveEditor().getControl(); + if (isCommonDiffEditor(editorControl)) { + if (editorControl.getOriginalEditor().isFocused()) { + editorControl = editorControl.getOriginalEditor(); + } else { + editorControl = editorControl.getModifiedEditor(); + } + } + if (!isCommonCodeEditor(editorControl)) { return null; } From e4080aa0941ed748859a176be39d587b89432d00 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 29 May 2017 11:21:36 +0200 Subject: [PATCH 1239/2747] Extensions: double-click should open new extension window pinned (fixes #17048) --- src/vs/base/browser/ui/list/listPaging.ts | 4 ++++ .../extensions/electron-browser/extensionsViewlet.ts | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/vs/base/browser/ui/list/listPaging.ts b/src/vs/base/browser/ui/list/listPaging.ts index 70170ab730b83..c11ff0e6f8d1a 100644 --- a/src/vs/base/browser/ui/list/listPaging.ts +++ b/src/vs/base/browser/ui/list/listPaging.ts @@ -85,6 +85,10 @@ export class PagedList { return mapEvent(this.list.onSelectionChange, ({ elements, indexes }) => ({ elements: elements.map(e => this._model.get(e)), indexes })); } + get onPin(): Event> { + return mapEvent(this.list.onPin, ({ elements, indexes }) => ({ elements: elements.map(e => this._model.get(e)), indexes })); + } + get model(): IPagedModel { return this._model; } diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts index 63d676aa2fbaa..63e301eff01a7 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts @@ -155,6 +155,11 @@ export class ExtensionsViewlet extends Viewlet implements IExtensionsViewlet { .filter(e => !!e) .on(this.openExtension, this, this.disposables); + chain(this.list.onPin) + .map(e => e.elements[0]) + .filter(e => !!e) + .on(this.pin, this, this.disposables); + return TPromise.as(null); } @@ -437,6 +442,13 @@ export class ExtensionsViewlet extends Viewlet implements IExtensionsViewlet { this.extensionsWorkbenchService.open(extension).done(null, err => this.onError(err)); } + private pin(): void { + const activeEditor = this.editorService.getActiveEditor(); + const activeEditorInput = this.editorService.getActiveEditorInput(); + + this.editorInputService.pinEditor(activeEditor.position, activeEditorInput); + } + private onEnter(): void { this.list.setSelection(this.list.getFocus()); } From 43298ba5473ad3282a6e25fb29bc0eaaa4ac808d Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 29 May 2017 11:36:23 +0200 Subject: [PATCH 1240/2747] macOS: custom titlebar double-click not consistent (fixes #27382) --- src/vs/code/electron-main/window.ts | 27 +++++++++++++++++++ src/vs/platform/windows/common/windows.ts | 2 ++ src/vs/platform/windows/common/windowsIpc.ts | 6 +++++ .../windows/electron-browser/windowService.ts | 4 +++ .../windows/electron-main/windowsService.ts | 10 +++++++ .../browser/parts/titlebar/titlebarPart.ts | 8 +----- .../workbench/test/workbenchTestServices.ts | 7 +++++ 7 files changed, 57 insertions(+), 7 deletions(-) diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 91d560b50fdf8..b4151b960d399 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -823,6 +823,33 @@ export class VSCodeWindow { }; } + public onWindowTitleDoubleClick(): void { + + // Respect system settings on mac with regards to title click on windows title + if (platform.isMacintosh) { + const action = systemPreferences.getUserDefault('AppleActionOnDoubleClick', 'string'); + switch (action) { + case 'Minimize': + this.win.minimize(); + break; + case 'None': + break; + case 'Maximize': + default: + this.win.maximize(); + } + } + + // Linux/Windows: just toggle maximize/minimized state + else { + if (this.win.isMaximized()) { + this.win.unmaximize(); + } else { + this.win.maximize(); + } + } + } + public sendWhenReady(channel: string, ...args: any[]): void { this.ready().then(() => { this.send(channel, ...args); diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index d24aafc9bfbf4..b4ff59ddacf3b 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -37,6 +37,7 @@ export interface IWindowsService { isMaximized(windowId: number): TPromise; maximizeWindow(windowId: number): TPromise; unmaximizeWindow(windowId: number): TPromise; + onWindowTitleDoubleClick(windowId: number): TPromise; setDocumentEdited(windowId: number, flag: boolean): TPromise; quit(): TPromise; relaunch(options: { addArgs?: string[], removeArgs?: string[] }): TPromise; @@ -89,6 +90,7 @@ export interface IWindowService { isMaximized(): TPromise; maximizeWindow(): TPromise; unmaximizeWindow(): TPromise; + onWindowTitleDoubleClick(): TPromise; } export type MenuBarVisibility = 'default' | 'visible' | 'toggle' | 'hidden'; diff --git a/src/vs/platform/windows/common/windowsIpc.ts b/src/vs/platform/windows/common/windowsIpc.ts index 2d9e9d3650610..01840d84f1e37 100644 --- a/src/vs/platform/windows/common/windowsIpc.ts +++ b/src/vs/platform/windows/common/windowsIpc.ts @@ -31,6 +31,7 @@ export interface IWindowsChannel extends IChannel { call(command: 'isMaximized', arg: number): TPromise; call(command: 'maximizeWindow', arg: number): TPromise; call(command: 'unmaximizeWindow', arg: number): TPromise; + call(command: 'onWindowTitleDoubleClick', arg: number): TPromise; call(command: 'setDocumentEdited', arg: [number, boolean]): TPromise; call(command: 'quit'): TPromise; call(command: 'openWindow', arg: [string[], { forceNewWindow?: boolean, forceReuseWindow?: boolean }]): TPromise; @@ -81,6 +82,7 @@ export class WindowsChannel implements IWindowsChannel { case 'isMaximized': return this.service.isMaximized(arg); case 'maximizeWindow': return this.service.maximizeWindow(arg); case 'unmaximizeWindow': return this.service.unmaximizeWindow(arg); + case 'onWindowTitleDoubleClick': return this.service.onWindowTitleDoubleClick(arg); case 'setDocumentEdited': return this.service.setDocumentEdited(arg[0], arg[1]); case 'openWindow': return this.service.openWindow(arg[0], arg[1]); case 'openNewWindow': return this.service.openNewWindow(); @@ -185,6 +187,10 @@ export class WindowsChannelClient implements IWindowsService { return this.channel.call('unmaximizeWindow', windowId); } + onWindowTitleDoubleClick(windowId: number): TPromise { + return this.channel.call('onWindowTitleDoubleClick', windowId); + } + setDocumentEdited(windowId: number, flag: boolean): TPromise { return this.channel.call('setDocumentEdited', [windowId, flag]); } diff --git a/src/vs/platform/windows/electron-browser/windowService.ts b/src/vs/platform/windows/electron-browser/windowService.ts index c5d2e5c7e8a7d..1247697fd17ae 100644 --- a/src/vs/platform/windows/electron-browser/windowService.ts +++ b/src/vs/platform/windows/electron-browser/windowService.ts @@ -90,6 +90,10 @@ export class WindowService implements IWindowService { return this.windowsService.unmaximizeWindow(this.windowId); } + onWindowTitleDoubleClick(): TPromise { + return this.windowsService.onWindowTitleDoubleClick(this.windowId); + } + setDocumentEdited(flag: boolean): TPromise { return this.windowsService.setDocumentEdited(this.windowId, flag); } diff --git a/src/vs/platform/windows/electron-main/windowsService.ts b/src/vs/platform/windows/electron-main/windowsService.ts index f74c4e5af3997..5cef01c60f54c 100644 --- a/src/vs/platform/windows/electron-main/windowsService.ts +++ b/src/vs/platform/windows/electron-main/windowsService.ts @@ -209,6 +209,16 @@ export class WindowsService implements IWindowsService, IDisposable { return TPromise.as(null); } + onWindowTitleDoubleClick(windowId: number): TPromise { + const vscodeWindow = this.windowsMainService.getWindowById(windowId); + + if (vscodeWindow) { + vscodeWindow.onWindowTitleDoubleClick(); + } + + return TPromise.as(null); + } + setDocumentEdited(windowId: number, flag: boolean): TPromise { const vscodeWindow = this.windowsMainService.getWindowById(windowId); diff --git a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts index 1e1aa16a14f05..d7aa9318fd662 100644 --- a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts +++ b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts @@ -241,13 +241,7 @@ export class TitlebarPart extends Part implements ITitleService { } private onTitleDoubleclick(): void { - this.windowService.isMaximized().then(maximized => { - if (maximized) { - this.windowService.unmaximizeWindow().done(null, errors.onUnexpectedError); - } else { - this.windowService.maximizeWindow().done(null, errors.onUnexpectedError); - } - }, errors.onUnexpectedError); + this.windowService.onWindowTitleDoubleClick().then(null, errors.onUnexpectedError); } private onContextMenu(e: MouseEvent): void { diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 899b03112be58..a7f4f1ea91844 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -847,6 +847,10 @@ export class TestWindowService implements IWindowService { unmaximizeWindow(): TPromise { return TPromise.as(void 0); } + + onWindowTitleDoubleClick(): TPromise { + return TPromise.as(void 0); + } } export class TestLifecycleService implements ILifecycleService { @@ -944,6 +948,9 @@ export class TestWindowsService implements IWindowsService { unmaximizeWindow(windowId: number): TPromise { return TPromise.as(void 0); } + onWindowTitleDoubleClick(windowId: number): TPromise { + return TPromise.as(void 0); + } setDocumentEdited(windowId: number, flag: boolean): TPromise { return TPromise.as(void 0); } From a168746445d2a36a073be820acd7b9ec5a28f5ff Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 29 May 2017 11:49:15 +0200 Subject: [PATCH 1241/2747] debug repl input disable minimap --- src/vs/workbench/parts/debug/electron-browser/repl.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/repl.ts b/src/vs/workbench/parts/debug/electron-browser/repl.ts index cf2e3937375e1..06e263aff1d7c 100644 --- a/src/vs/workbench/parts/debug/electron-browser/repl.ts +++ b/src/vs/workbench/parts/debug/electron-browser/repl.ts @@ -281,7 +281,10 @@ export class Repl extends Panel implements IPrivateReplService { scrollBeyondLastLine: false, renderLineHighlight: 'none', fixedOverflowWidgets: true, - acceptSuggestionOnEnter: 'smart' + acceptSuggestionOnEnter: 'smart', + minimap: { + enabled: false + } }; } From a315b7cb724da24533c00769f61c5d0969601d7a Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 29 May 2017 12:06:06 +0200 Subject: [PATCH 1242/2747] Workbench theme customisation for forground tab colour of inactive group appears to be missing (fixes #27067) --- .../parts/editor/noTabsTitleControl.ts | 20 ++++--------- .../browser/parts/editor/tabsTitleControl.ts | 30 ++----------------- src/vs/workbench/common/theme.ts | 16 ++++++++-- 3 files changed, 23 insertions(+), 43 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts index fa83f95df080d..6814ef611b8b1 100644 --- a/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/noTabsTitleControl.ts @@ -12,7 +12,7 @@ import DOM = require('vs/base/browser/dom'); import { TitleControl } from 'vs/workbench/browser/parts/editor/titleControl'; import { EditorLabel } from 'vs/workbench/browser/labels'; import { Verbosity } from 'vs/platform/editor/common/editor'; -import { TAB_ACTIVE_FOREGROUND } from 'vs/workbench/common/theme'; +import { TAB_ACTIVE_FOREGROUND, TAB_UNFOCUSED_ACTIVE_FOREGROUND } from 'vs/workbench/common/theme'; export class NoTabsTitleControl extends TitleControl { private titleContainer: HTMLElement; @@ -126,19 +126,11 @@ export class NoTabsTitleControl extends TitleControl { } this.editorLabel.setLabel({ name, description, resource }, { title, italic: !isPinned, extraClasses: ['title-label'] }); - this.editorLabel.element.style.color = this.getColor(TAB_ACTIVE_FOREGROUND, (color, theme) => { - if (!isActive) { - if (theme.type === 'dark') { - return color.transparent(0.5); - } - - if (theme.type === 'light') { - return color.transparent(0.7); - } - } - - return color; - }); + if (isActive) { + this.editorLabel.element.style.color = this.getColor(TAB_ACTIVE_FOREGROUND); + } else { + this.editorLabel.element.style.color = this.getColor(TAB_UNFOCUSED_ACTIVE_FOREGROUND); + } // Update Editor Actions Toolbar this.updateEditorActionsToolbar(); diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index de3fda8a4d56e..759efa00c160f 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -40,7 +40,7 @@ import { LinkedMap } from 'vs/base/common/map'; import { DelegatingWorkbenchEditorService } from 'vs/workbench/services/editor/browser/editorService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; -import { TAB_INACTIVE_BACKGROUND, TAB_ACTIVE_BACKGROUND, TAB_ACTIVE_FOREGROUND, TAB_INACTIVE_FOREGROUND, TAB_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND } from 'vs/workbench/common/theme'; +import { TAB_INACTIVE_BACKGROUND, TAB_ACTIVE_BACKGROUND, TAB_ACTIVE_FOREGROUND, TAB_INACTIVE_FOREGROUND, TAB_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND, TAB_UNFOCUSED_ACTIVE_FOREGROUND, TAB_UNFOCUSED_INACTIVE_FOREGROUND } from 'vs/workbench/common/theme'; import { activeContrastBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; interface IEditorInputLabel { @@ -291,38 +291,14 @@ export class TabsTitleControl extends TitleControl { DOM.addClass(tabContainer, 'active'); tabContainer.setAttribute('aria-selected', 'true'); tabContainer.style.backgroundColor = this.getColor(TAB_ACTIVE_BACKGROUND); - tabLabel.element.style.color = this.getColor(TAB_ACTIVE_FOREGROUND, (color, theme) => { - if (!isGroupActive) { - if (theme.type === 'dark') { - return color.transparent(0.5); - } - - if (theme.type === 'light') { - return color.transparent(0.7); - } - } - - return color; - }); + tabLabel.element.style.color = this.getColor(isGroupActive ? TAB_ACTIVE_FOREGROUND : TAB_UNFOCUSED_ACTIVE_FOREGROUND); this.activeTab = tabContainer; } else { DOM.removeClass(tabContainer, 'active'); tabContainer.setAttribute('aria-selected', 'false'); tabContainer.style.backgroundColor = this.getColor(TAB_INACTIVE_BACKGROUND); - tabLabel.element.style.color = this.getColor(TAB_INACTIVE_FOREGROUND, (color, theme) => { - if (!isGroupActive) { - if (theme.type === 'dark') { - return color.transparent(0.5); - } - - if (theme.type === 'light') { - return color.transparent(0.5); - } - } - - return color; - }); + tabLabel.element.style.color = this.getColor(isGroupActive ? TAB_INACTIVE_FOREGROUND : TAB_UNFOCUSED_INACTIVE_FOREGROUND); } // Dirty State diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 6a3c745dafbf2..3b35554eb6ecd 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -33,13 +33,25 @@ export const TAB_ACTIVE_FOREGROUND = registerColor('tab.activeForeground', { dark: Color.white, light: '#333333', hc: Color.white -}, nls.localize('tabActiveEditorGroupActiveForeground', "Active tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); +}, nls.localize('tabActiveForeground', "Active tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); export const TAB_INACTIVE_FOREGROUND = registerColor('tab.inactiveForeground', { dark: transparent(TAB_ACTIVE_FOREGROUND, 0.5), light: transparent(TAB_ACTIVE_FOREGROUND, 0.5), hc: Color.white -}, nls.localize('tabInactiveEditorGroupActiveForeground', "Inactive tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); +}, nls.localize('tabInactiveForeground', "Inactive tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); + +export const TAB_UNFOCUSED_ACTIVE_FOREGROUND = registerColor('tab.unfocusedActiveForeground', { + dark: transparent(TAB_ACTIVE_FOREGROUND, 0.5), + light: transparent(TAB_ACTIVE_FOREGROUND, 0.7), + hc: Color.white +}, nls.localize('tabUnfocusedActiveForeground', "Active tab foreground color in an inactive group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); + +export const TAB_UNFOCUSED_INACTIVE_FOREGROUND = registerColor('tab.unfocusedInactiveForeground', { + dark: transparent(TAB_INACTIVE_FOREGROUND, 0.5), + light: transparent(TAB_INACTIVE_FOREGROUND, 0.5), + hc: Color.white +}, nls.localize('tabUnfocusedInactiveForeground', "Inactive tab foreground color in an inactive group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups.")); // < --- Editors --- > From c1e60c7461a1c0bca82c2aa1f8f7418ebe007710 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 29 May 2017 12:16:43 +0200 Subject: [PATCH 1243/2747] debug actions widget: default position go back to center for discoverability #2513 --- src/vs/workbench/parts/debug/browser/debugActionsWidget.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts index dc9a9d0d19dcd..7afe47c4c782f 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts @@ -114,8 +114,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi const mouseClickEvent = new StandardMouseEvent(event); if (mouseClickEvent.detail === 2) { // double click on debug bar centers it again #8250 - const widgetWidth = this.$el.getHTMLElement().clientWidth; - this.setXCoordinate(window.innerWidth - widgetWidth); + this.setXCoordinate(0.5 * window.innerWidth); this.storePosition(); } }); @@ -174,7 +173,7 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi return; } if (x === undefined) { - x = parseFloat(this.storageService.get(DEBUG_ACTIONS_WIDGET_POSITION_KEY, StorageScope.WORKSPACE, '1')) * window.innerWidth; + x = parseFloat(this.storageService.get(DEBUG_ACTIONS_WIDGET_POSITION_KEY, StorageScope.WORKSPACE, '0.5')) * window.innerWidth; } const widgetWidth = this.$el.getHTMLElement().clientWidth; From 8f1fe44e86453fa2ef89b82f576f5c46640730d6 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 29 May 2017 12:17:01 +0200 Subject: [PATCH 1244/2747] Fixes #27426: Add runner information to telemetry --- src/vs/workbench/parts/tasks/common/taskSystem.ts | 2 ++ .../parts/tasks/electron-browser/terminalTaskSystem.ts | 2 ++ src/vs/workbench/parts/tasks/node/processTaskSystem.ts | 1 + 3 files changed, 5 insertions(+) diff --git a/src/vs/workbench/parts/tasks/common/taskSystem.ts b/src/vs/workbench/parts/tasks/common/taskSystem.ts index cca11d1e6a9d9..30e51e8a2e33d 100644 --- a/src/vs/workbench/parts/tasks/common/taskSystem.ts +++ b/src/vs/workbench/parts/tasks/common/taskSystem.ts @@ -37,6 +37,8 @@ export interface TelemetryEvent { // How the task got trigger. Is either shortcut or command trigger: string; + runner: 'terminal' | 'output'; + // The command triggered command: string; diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index bf6065aa66a3f..e374bce4cd9bd 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -340,6 +340,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { try { let telemetryEvent: TelemetryEvent = { trigger: trigger, + runner: 'terminal', command: this.getSanitizedCommand(executedCommand), success: true, exitCode: summary.exitCode @@ -352,6 +353,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { try { let telemetryEvent: TelemetryEvent = { trigger: trigger, + runner: 'terminal', command: this.getSanitizedCommand(executedCommand), success: false }; diff --git a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts index 2a1fcb76e73a3..9f4d55278f5ff 100644 --- a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts @@ -120,6 +120,7 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem { private executeTask(task: Task, trigger: string = Triggers.command): ITaskExecuteResult { let telemetryEvent: TelemetryEvent = { trigger: trigger, + runner: 'output', command: 'other', success: true }; From 7223e4bfe4892580ef420341a58be5441ed387f7 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 29 May 2017 12:44:49 +0200 Subject: [PATCH 1245/2747] Added wait time for peek widgets to be loaded. --- test/smoke/src/tests/javascript.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/smoke/src/tests/javascript.ts b/test/smoke/src/tests/javascript.ts index 490677f1f2980..3bde32ccc39ef 100644 --- a/test/smoke/src/tests/javascript.ts +++ b/test/smoke/src/tests/javascript.ts @@ -37,8 +37,8 @@ export function testJavaScript() { it(`finds 'All References' to 'app'`, async function () { await common.openFirstMatchFile('bin/www'); - await app.wait(); await js.findAppReferences(); + await app.wait(); const titleCount = await js.getTitleReferencesCount(); assert.equal(titleCount, 3); const treeCount = await js.getTreeReferencesCount(); @@ -79,6 +79,7 @@ export function testJavaScript() { it(`verifies that 'Peek Definition' works`, async function () { await common.openFirstMatchFile('app.js'); await js.peekExpressDefinition(); + await app.wait(); const definitionFilename = await js.getPeekExpressResultName(); assert.equal(definitionFilename, 'index.d.ts'); }); From 9a55652262ee29c9efaa373fe264a67265521998 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 29 May 2017 12:52:49 +0200 Subject: [PATCH 1246/2747] Fixes #27338: Let the task framework configure 'Press any key to close the terminal' --- src/vs/workbench/parts/terminal/common/terminal.ts | 4 +++- .../parts/terminal/electron-browser/terminalInstance.ts | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/terminal/common/terminal.ts b/src/vs/workbench/parts/terminal/common/terminal.ts index bd7df535e4e94..1093b3ee7e075 100644 --- a/src/vs/workbench/parts/terminal/common/terminal.ts +++ b/src/vs/workbench/parts/terminal/common/terminal.ts @@ -109,8 +109,10 @@ export interface IShellLaunchConfig { * shell is being launched by an extension). */ ignoreConfigurationCwd?: boolean; + /** Whether to wait for a key press before closing the terminal. */ - waitOnExit?: boolean; + waitOnExit?: boolean | string; + /** * A string including ANSI escape sequences that will be written to the terminal emulator * _before_ the terminal process has launched, a trailing \n is added at the end of the string. diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 5247bd40e7107..3b32036382612 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -529,7 +529,10 @@ export class TerminalInstance implements ITerminalInstance { if (exitCode) { this._xterm.writeln(exitCodeMessage); } - this._xterm.writeln(nls.localize('terminal.integrated.waitOnExit', 'Press any key to close the terminal')); + let message = typeof this._shellLaunchConfig.waitOnExit === 'string' + ? this._shellLaunchConfig.waitOnExit + : nls.localize('terminal.integrated.waitOnExit', 'Press any key to close the terminal'); + this._xterm.writeln(message); // Disable all input if the terminal is exiting and listen for next keypress this._xterm.setOption('disableStdin', true); if (this._xterm.textarea) { From e8271ae2ae426d29ef087af8e64b14f2b678298b Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 29 May 2017 12:53:24 +0200 Subject: [PATCH 1247/2747] Adopt #27338 --- .../parts/tasks/electron-browser/terminalTaskSystem.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index e374bce4cd9bd..04591b40b5595 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -368,7 +368,10 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { let options = this.resolveOptions(task.command.options); let { command, args } = this.resolveCommandAndArgs(task); let terminalName = nls.localize('TerminalTaskSystem.terminalName', 'Task - {0}', task.name); - let waitOnExit = task.command.terminal.reveal !== RevealKind.Never || !task.isBackground; + let waitOnExit: boolean | string = false; + if (task.command.terminal.reveal !== RevealKind.Never || !task.isBackground) { + waitOnExit = nls.localize('reuseTerminal', 'Terminal will be reused by tasks, press any key to close it.'); + }; let shellLaunchConfig: IShellLaunchConfig = undefined; let isShellCommand = task.command.type === CommandType.Shell; if (isShellCommand) { From a41a0c007ff39cf50a2d3d6bea25516edbe7a08e Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 29 May 2017 13:04:06 +0200 Subject: [PATCH 1248/2747] Intercept child process exit and exit from the main process as well. --- test/smoke/src/main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/smoke/src/main.js b/test/smoke/src/main.js index 85e3778d1a7e0..ef6d65112e9f3 100644 --- a/test/smoke/src/main.js +++ b/test/smoke/src/main.js @@ -77,6 +77,9 @@ function runTests() { if (err) throw new Error(`Could not write stderr to errors.log with the following error: ${err}`); }); }); + proc.on('exit', (code) => { + process.exit(code); + }); } function cleanOrClone(repo, dir) { From 365fcece1868764f2a9c771f18dd01ff7072cf79 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 29 May 2017 13:04:24 +0200 Subject: [PATCH 1249/2747] Fixes #27320 --- .../parts/tasks/browser/quickOpen.ts | 35 +++++++++++-------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/parts/tasks/browser/quickOpen.ts b/src/vs/workbench/parts/tasks/browser/quickOpen.ts index e282ee6832183..fe5ec004ee474 100644 --- a/src/vs/workbench/parts/tasks/browser/quickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/quickOpen.ts @@ -125,7 +125,7 @@ class CustomizeTaskAction extends Action { private static ID = 'workbench.action.tasks.customizeTask'; private static LABEL = nls.localize('customizeTask', "Customize Task"); - constructor(private taskService: ITaskService, private task: Task) { + constructor(private taskService: ITaskService, private quickOpenService: IQuickOpenService, private task: Task) { super(CustomizeTaskAction.ID, CustomizeTaskAction.LABEL); this.updateClass(); } @@ -134,37 +134,44 @@ class CustomizeTaskAction extends Action { this.class = 'quick-open-task-configure'; } - public run(context: any): TPromise { - return this.taskService.customize(this.task, true).then(_ => false, _ => false); + public run(context: any): TPromise { + return this.taskService.customize(this.task, true).then(() => { + this.quickOpenService.close(); + }); } } export class QuickOpenActionContributor extends ActionBarContributor { - constructor( @ITaskService private taskService: ITaskService) { + constructor( @ITaskService private taskService: ITaskService, @IQuickOpenService private quickOpenService: IQuickOpenService) { super(); } public hasActions(context: any): boolean { - const entry = this.getEntry(context); + let task = this.getTask(context); - return !!entry; + return !!task; } public getActions(context: any): IAction[] { - const actions: Action[] = []; - - const entry = this.getEntry(context); - if (entry && entry.task._source.kind === TaskSourceKind.Extension) { - actions.push(new CustomizeTaskAction(this.taskService, entry.task)); + let actions: Action[] = []; + let task = this.getTask(context); + if (task && task._source.kind === TaskSourceKind.Extension) { + actions.push(new CustomizeTaskAction(this.taskService, this.quickOpenService, task)); } return actions; } - private getEntry(context: any): TaskEntry { - if (!context || !(context.element instanceof TaskEntry)) { + private getTask(context: any): Task { + if (!context) { return undefined; } - return context.element as TaskEntry; + let element = context.element; + if (element instanceof TaskEntry) { + return element.task; + } else if (element instanceof TaskGroupEntry) { + return (element.getEntry() as TaskEntry).task; + } + return undefined; } } \ No newline at end of file From 7c27e9ba0815db59c765aa2ca2719cb0865c9ab3 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 29 May 2017 14:19:33 +0200 Subject: [PATCH 1250/2747] remove variablesDealy setting we used for experimentation fixes #27262 --- src/vs/workbench/parts/debug/common/debug.ts | 1 - .../parts/debug/electron-browser/debug.contribution.ts | 4 ---- .../workbench/parts/debug/electron-browser/debugViews.ts | 8 +++----- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debug.ts b/src/vs/workbench/parts/debug/common/debug.ts index 5947fe89104dc..310e20a0d22e3 100644 --- a/src/vs/workbench/parts/debug/common/debug.ts +++ b/src/vs/workbench/parts/debug/common/debug.ts @@ -306,7 +306,6 @@ export interface IDebugConfiguration { inlineValues: boolean; hideActionBar: boolean; internalConsoleOptions: string; - variablesDelay: number; } export interface IGlobalConfig { diff --git a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts index b8faa49a1a163..22c7191e5170c 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts @@ -173,10 +173,6 @@ configurationRegistry.registerConfiguration({ default: false }, 'debug.internalConsoleOptions': INTERNAL_CONSOLE_OPTIONS_SCHEMA, - 'debug.variablesDelay': { - type: 'number', - default: 400 - }, 'launch': { type: 'object', description: nls.localize({ comment: ['This is the description for a setting'], key: 'launch' }, "Global debug launch configuration. Should be used as an alternative to 'launch.json' that is shared across workspaces"), diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts index 63d48fe56945c..3d4d2f1838b68 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts @@ -17,7 +17,7 @@ import { IHighlightEvent, ITree } from 'vs/base/parts/tree/browser/tree'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { CollapsibleState } from 'vs/base/browser/ui/splitview/splitview'; import { CollapsibleViewletView, AdaptiveCollapsibleViewletView, CollapseAction } from 'vs/workbench/browser/viewlet'; -import { IDebugService, State, IDebugConfiguration, IBreakpoint, IExpression, CONTEXT_BREAKPOINTS_FOCUSED, CONTEXT_WATCH_EXPRESSIONS_FOCUSED, CONTEXT_VARIABLES_FOCUSED } from 'vs/workbench/parts/debug/common/debug'; +import { IDebugService, State, IBreakpoint, IExpression, CONTEXT_BREAKPOINTS_FOCUSED, CONTEXT_WATCH_EXPRESSIONS_FOCUSED, CONTEXT_VARIABLES_FOCUSED } from 'vs/workbench/parts/debug/common/debug'; import { Expression, Variable, ExceptionBreakpoint, FunctionBreakpoint, Thread, StackFrame, Breakpoint, ThreadAndProcessIds } from 'vs/workbench/parts/debug/common/debugModel'; import * as viewer from 'vs/workbench/parts/debug/electron-browser/debugViewer'; import { AddWatchExpressionAction, RemoveAllWatchExpressionsAction, AddFunctionBreakpointAction, ToggleBreakpointsActivatedAction, RemoveAllBreakpointsAction } from 'vs/workbench/parts/debug/browser/debugActions'; @@ -26,7 +26,6 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { MenuId } from 'vs/platform/actions/common/actions'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IMessageService } from 'vs/platform/message/common/message'; -import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IListService } from 'vs/platform/list/browser/listService'; @@ -60,8 +59,7 @@ export class VariablesView extends CollapsibleViewletView { @IInstantiationService private instantiationService: IInstantiationService, @IContextKeyService contextKeyService: IContextKeyService, @IListService private listService: IListService, - @IThemeService private themeService: IThemeService, - @IConfigurationService private configurationService: IConfigurationService + @IThemeService private themeService: IThemeService ) { super(actionRunner, !!settings[VariablesView.MEMENTO], nls.localize('variablesSection', "Variables Section"), messageService, keybindingService, contextMenuService); @@ -82,7 +80,7 @@ export class VariablesView extends CollapsibleViewletView { } return undefined; }).done(null, errors.onUnexpectedError); - }, this.configurationService.getConfiguration('debug').variablesDelay); + }, 400); } public renderHeader(container: HTMLElement): void { From 7c3f873bed2b3b89ff14882866a3afd656627e8b Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 29 May 2017 14:31:57 +0200 Subject: [PATCH 1251/2747] update to vscode-textmate@3.1.5 --- npm-shrinkwrap.json | 6 +++--- package.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 678f3be8298bb..d7f219b16383a 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -420,9 +420,9 @@ "resolved": "https://registry.npmjs.org/vscode-ripgrep/-/vscode-ripgrep-0.0.12.tgz" }, "vscode-textmate": { - "version": "3.1.4", - "from": "vscode-textmate@3.1.4", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-3.1.4.tgz" + "version": "3.1.5", + "from": "vscode-textmate@3.1.5", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-3.1.5.tgz" }, "windows-foreground-love": { "version": "0.1.0", diff --git a/package.json b/package.json index c31f58f40c999..bfc4fed85751e 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "v8-profiler": "jrieken/v8-profiler#vscode", "vscode-debugprotocol": "1.19.0", "vscode-ripgrep": "0.0.12", - "vscode-textmate": "^3.1.4", + "vscode-textmate": "^3.1.5", "winreg": "1.2.0", "xterm": "Tyriar/xterm.js#vscode-release/1.13", "yauzl": "2.3.1" @@ -124,4 +124,4 @@ "windows-mutex": "^0.2.0", "fsevents": "0.3.8" } -} \ No newline at end of file +} From e58c2abb979281c1f4a6530840e5a4ed0093bfb6 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 29 May 2017 14:44:01 +0200 Subject: [PATCH 1252/2747] Implements #27399: Separate the task provider name from the task name in the task API --- extensions/grunt/src/main.ts | 4 +- extensions/gulp/src/main.ts | 2 +- extensions/jake/src/main.ts | 2 +- extensions/npm/src/main.ts | 4 +- .../typescript/src/features/taskProvider.ts | 3 +- src/vs/vscode.d.ts | 33 +++++++---- src/vs/workbench/api/node/extHostTask.ts | 6 +- src/vs/workbench/api/node/extHostTypes.ts | 58 +++++++++++-------- .../parts/tasks/browser/quickOpen.ts | 16 ++++- .../parts/tasks/common/taskConfiguration.ts | 1 + src/vs/workbench/parts/tasks/common/tasks.ts | 5 +- .../electron-browser/task.contribution.ts | 2 +- .../tasks/test/node/configuration.test.ts | 2 +- 13 files changed, 88 insertions(+), 50 deletions(-) diff --git a/extensions/grunt/src/main.ts b/extensions/grunt/src/main.ts index ff551f904ecc9..a90eff6c93347 100644 --- a/extensions/grunt/src/main.ts +++ b/extensions/grunt/src/main.ts @@ -139,8 +139,8 @@ async function getGruntTasks(): Promise { if (matches && matches.length === 2) { let taskName = matches[1]; let task = taskName.indexOf(' ') === -1 - ? new vscode.ShellTask(`grunt: ${taskName}`, `${command} ${taskName}`) - : new vscode.ShellTask(`grunt: ${taskName}`, `${command} "${taskName}"`); + ? new vscode.ShellTask(taskName, `${command} ${taskName}`) + : new vscode.ShellTask(taskName, `${command} "${taskName}"`); task.identifier = `grunt.${taskName}`; result.push(task); let lowerCaseTaskName = taskName.toLowerCase(); diff --git a/extensions/gulp/src/main.ts b/extensions/gulp/src/main.ts index 666b66bf120c1..c75a8ce5d9cc0 100644 --- a/extensions/gulp/src/main.ts +++ b/extensions/gulp/src/main.ts @@ -114,7 +114,7 @@ async function getGulpTasks(): Promise { if (line.length === 0) { continue; } - let task = new vscode.ShellTask(`gulp: ${line}`, `${gulpCommand} ${line}`); + let task = new vscode.ShellTask(line, `${gulpCommand} ${line}`); task.identifier = `gulp.${line}`; result.push(task); let lowerCaseLine = line.toLowerCase(); diff --git a/extensions/jake/src/main.ts b/extensions/jake/src/main.ts index 93b55873eabca..25d93a29780f0 100644 --- a/extensions/jake/src/main.ts +++ b/extensions/jake/src/main.ts @@ -118,7 +118,7 @@ async function getJakeTasks(): Promise { let matches = regExp.exec(line); if (matches && matches.length === 2) { let taskName = matches[1]; - let task = new vscode.ShellTask(`jake: ${taskName}`, `${jakeCommand} ${taskName}`); + let task = new vscode.ShellTask(taskName, `${jakeCommand} ${taskName}`); task.identifier = `jake.${taskName}`; result.push(task); let lowerCaseLine = line.toLowerCase(); diff --git a/extensions/npm/src/main.ts b/extensions/npm/src/main.ts index 9dc734a4ffebc..beeddfa5a8607 100644 --- a/extensions/npm/src/main.ts +++ b/extensions/npm/src/main.ts @@ -81,7 +81,7 @@ async function getNpmScriptsAsTasks(): Promise { const result: vscode.Task[] = []; Object.keys(json.scripts).forEach(each => { - const task = new vscode.ShellTask(`npm: run ${each}`, `npm run ${each}`); + const task = new vscode.ShellTask(`run ${each}`, `npm run ${each}`); const lowerCaseTaskName = each.toLowerCase(); if (lowerCaseTaskName === 'build') { task.group = vscode.TaskGroup.Build; @@ -91,7 +91,7 @@ async function getNpmScriptsAsTasks(): Promise { result.push(task); }); // add some 'well known' npm tasks - result.push(new vscode.ShellTask(`npm: install`, `npm install`)); + result.push(new vscode.ShellTask(`install`, `npm install`)); return Promise.resolve(result); } catch (e) { return Promise.resolve(emptyTasks); diff --git a/extensions/typescript/src/features/taskProvider.ts b/extensions/typescript/src/features/taskProvider.ts index 4d50b23329400..9cb0a3a64a8a1 100644 --- a/extensions/typescript/src/features/taskProvider.ts +++ b/extensions/typescript/src/features/taskProvider.ts @@ -48,7 +48,8 @@ class TscTaskProvider implements vscode.TaskProvider { return projects.map(configFile => { const configFileName = path.relative(rootPath, configFile); - const buildTask = new vscode.ShellTask(`tsc: build ${configFileName}`, `${command} -p "${configFile}"`, '$tsc'); + const buildTask = new vscode.ShellTask(`build ${configFileName}`, `${command} -p "${configFile}"`, '$tsc'); + buildTask.source = 'tsc'; buildTask.group = vscode.TaskGroup.Build; return buildTask; }); diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index f9587fccbe028..979822a1f4dde 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -3580,11 +3580,6 @@ declare module 'vscode' { export const Test: 'test'; } - /** - * The supported task groups. - */ - export type TaskGroup = 'clean' | 'build' | 'rebuildAll' | 'test'; - /** * The ProblemMatchers type definition. */ @@ -3652,10 +3647,18 @@ declare module 'vscode' { args: string[]; /** - * The task group this tasks belongs to. Defaults to undefined meaning - * that the task doesn't belong to any special group. + * A human-readable string describing the source of this + * shell task, e.g. 'gulp' or 'npm'. */ - group?: TaskGroup; + source: string | undefined; + + /** + * The task group this tasks belongs to. See TaskGroup + * for a predefined set of available groups. + * Defaults to undefined meaning that the task doesn't + * belong to any special group. + */ + group: string | undefined; /** * The process options used when the process is executed. @@ -3772,10 +3775,18 @@ declare module 'vscode' { readonly commandLine: string; /** - * The task group this tasks belongs to. Defaults to undefined meaning - * that the task doesn't belong to any special group. + * A human-readable string describing the source of this + * shell task, e.g. 'gulp' or 'npm'. + */ + source: string | undefined; + + /** + * The task group this tasks belongs to. See TaskGroup + * for a predefined set of available groups. + * Defaults to undefined meaning that the task doesn't + * belong to any special group. */ - group?: TaskGroup; + group: string | undefined; /** * The shell options used when the shell is executed. Defaults to an diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index 04836f73af83e..99f5368de6fff 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -310,7 +310,11 @@ namespace Tasks { } let result: TaskSystem.Task = { _id: uuidMap.getUUID(task.identifier), - _source: { kind: TaskSystem.TaskSourceKind.Extension, detail: extension.id }, + _source: { + kind: TaskSystem.TaskSourceKind.Extension, + label: typeof task.source === 'string' ? task.source : extension.name, + detail: extension.id + }, name: task.name, identifier: task.identifier, group: types.TaskGroup.is(task.group) ? task.group : undefined, diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index d78f0d8d75ea9..87509da16495a 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1021,6 +1021,8 @@ export class BaseTask { private _problemMatchers: string[]; private _identifier: string; private _isBackground: boolean; + private _source: string; + private _group: string; private _terminal: vscode.TerminalBehaviour; constructor(name: string, problemMatchers: string[]) { @@ -1063,6 +1065,36 @@ export class BaseTask { this._isBackground = value; } + get source(): string { + return this._source; + } + + set source(value: string) { + if (value === void 0 || value === null) { + this._source = undefined; + return; + } + if (typeof value !== 'string' || value.length === 0) { + throw illegalArgument('source must be a string of length > 0'); + } + this._source = value; + } + + get group(): string { + return this._group; + } + + set group(value: string) { + if (value === void 0 || value === null) { + this._group = undefined; + return; + } + if (typeof value !== 'string' || value.length === 0) { + throw illegalArgument('group must be a string of length > 0'); + } + this._group = value; + } + get terminal(): vscode.TerminalBehaviour { return this._terminal; } @@ -1122,7 +1154,7 @@ export namespace TaskGroup { */ export const Test: 'test' = 'test'; - export function is(value: string): value is vscode.TaskGroup { + export function is(value: string): value is string { return value === Clean || value === Build || value === RebuildAll || value === Test; } } @@ -1131,7 +1163,6 @@ export class ProcessTask extends BaseTask { private _process: string; private _args: string[]; - private _group: vscode.TaskGroup; private _options: vscode.ProcessOptions; constructor(name: string, process: string, args?: string[], problemMatchers?: vscode.ProblemMatchers); @@ -1183,17 +1214,6 @@ export class ProcessTask extends BaseTask { this._args = value; } - get group(): vscode.TaskGroup { - return this._group; - } - - set group(value: vscode.TaskGroup) { - if (!TaskGroup.is(value)) { - throw illegalArgument('group'); - } - this._group = value; - } - get options(): vscode.ProcessOptions { return this._options; } @@ -1209,7 +1229,6 @@ export class ProcessTask extends BaseTask { export class ShellTask extends BaseTask implements vscode.ShellTask { private _commandLine: string; - private _group: vscode.TaskGroup; private _options: vscode.ShellOptions; constructor(name: string, commandLine: string, problemMatchers?: vscode.ProblemMatchers); @@ -1240,17 +1259,6 @@ export class ShellTask extends BaseTask implements vscode.ShellTask { return this._commandLine; } - get group(): vscode.TaskGroup { - return this._group; - } - - set group(value: vscode.TaskGroup) { - if (!TaskGroup.is(value)) { - throw illegalArgument('group'); - } - this._group = value; - } - get options(): vscode.ShellOptions { return this._options; } diff --git a/src/vs/workbench/parts/tasks/browser/quickOpen.ts b/src/vs/workbench/parts/tasks/browser/quickOpen.ts index fe5ec004ee474..15432e9c647ed 100644 --- a/src/vs/workbench/parts/tasks/browser/quickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/quickOpen.ts @@ -19,13 +19,19 @@ import { ActionBarContributor, ContributableActionProvider } from 'vs/workbench/ export class TaskEntry extends Model.QuickOpenEntry { + private _label: string; + constructor(protected taskService: ITaskService, protected _task: Task, highlights: Model.IHighlight[] = []) { super(highlights); - this._task = _task; + if (_task._source.kind === TaskSourceKind.Extension) { + this._label = nls.localize('taskEntry.label', '{0}: {1}', _task._source.label, _task.name); + } else { + this._label = _task.name; + } } public getLabel(): string { - return this._task.name; + return this._label; } public getAriaLabel(): string { @@ -76,6 +82,12 @@ export abstract class QuickOpenHandler extends Quickopen.QuickOpenHandler { let aKind = a._source.kind; let bKind = b._source.kind; if (aKind === bKind) { + if (aKind === TaskSourceKind.Extension) { + let compare = a._source.label.localeCompare(b._source.label); + if (compare !== 0) { + return compare; + } + } return a.name.localeCompare(b.name); } if (aKind === TaskSourceKind.Workspace) { diff --git a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts index 09fa78dfd77e4..a7ccb15f65ee9 100644 --- a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts @@ -764,6 +764,7 @@ namespace TaskDescription { export let source: Tasks.TaskSource = { kind: Tasks.TaskSourceKind.Workspace, + label: 'Workspace', detail: '.settins\tasks.json' }; diff --git a/src/vs/workbench/parts/tasks/common/tasks.ts b/src/vs/workbench/parts/tasks/common/tasks.ts index c3e90f83fb68f..e7d54343b07ec 100644 --- a/src/vs/workbench/parts/tasks/common/tasks.ts +++ b/src/vs/workbench/parts/tasks/common/tasks.ts @@ -153,7 +153,7 @@ export namespace TaskGroup { export const Test: 'test' = 'test'; - export function is(value: string): value is TaskGroup { + export function is(value: string): value is string { return value === Clean || value === Build || value === RebuildAll || value === Test; } } @@ -168,6 +168,7 @@ export enum TaskSourceKind { export interface TaskSource { kind: TaskSourceKind; + label: string; detail?: string; } @@ -199,7 +200,7 @@ export interface Task { /** * the task's group; */ - group?: TaskGroup; + group?: string; /** * The command configuration diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 68b32dfc24474..d94812a35bb5c 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -780,7 +780,7 @@ class TaskService extends EventEmitter implements ITaskService { let id: string = UUID.generateUuid(); let task: Task = { _id: id, - _source: { kind: TaskSourceKind.Generic }, + _source: { kind: TaskSourceKind.Generic, label: 'generic' }, name: id, identifier: id, dependsOn: extensionTasks.map(task => task._id), diff --git a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts index cbccf978e9df1..c958d68336b14 100644 --- a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts +++ b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts @@ -144,7 +144,7 @@ class TaskBuilder { this.commandBuilder = new CommandConfigurationBuilder(this, command); this.result = { _id: name, - _source: { kind: Tasks.TaskSourceKind.Workspace }, + _source: { kind: Tasks.TaskSourceKind.Workspace, label: 'workspace' }, identifier: name, name: name, command: this.commandBuilder.result, From 632837a8708dbd1859c701b2b3eeda08d3d2eadd Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 29 May 2017 14:46:27 +0200 Subject: [PATCH 1253/2747] Added debug log to find out where Windows build fails. --- test/smoke/src/areas/git.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/smoke/src/areas/git.ts b/test/smoke/src/areas/git.ts index 8228771a7d7fc..3c04f44832800 100644 --- a/test/smoke/src/areas/git.ts +++ b/test/smoke/src/areas/git.ts @@ -39,6 +39,7 @@ export class Git { } public async stageFile(fileName: string): Promise { + console.log('Stage file' + fileName); await this.spectron.client.moveToObject(`div[class="monaco-icon-label file-icon ${fileName}-name-file-icon ${this.commonActions.getExtensionSelector(fileName)}"`); await this.spectron.client.click('.action-label.icon.contrib-cmd-icon-4'); return this.spectron.wait(); @@ -55,15 +56,18 @@ export class Git { } public focusOnCommitBox(): Promise { + console.log('Focus on commit box'); return this.spectron.client.click('div[id="workbench.view.scm"] textarea'); } public async pressCommit(): Promise { + console.log('Press commit'); await this.spectron.client.click('.action-label.icon.contrib-cmd-icon-10'); return this.spectron.wait(); } public getOutgoingChanges(): Promise { + console.log('Get outgoing code'); return this.spectron.client.getText('a[title="Synchronize changes"]'); } } \ No newline at end of file From bf5bb9de5c0049b72ca3a506917af64241e5dc4a Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 29 May 2017 14:50:16 +0200 Subject: [PATCH 1254/2747] Implements #27087: Simplify task activation events --- extensions/grunt/package.json | 4 +--- extensions/gulp/package.json | 4 +--- extensions/jake/package.json | 4 +--- extensions/npm/package.json | 4 +--- extensions/typescript/package.json | 4 +--- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/extensions/grunt/package.json b/extensions/grunt/package.json index e3338dd8d346d..e8bac905a6945 100644 --- a/extensions/grunt/package.json +++ b/extensions/grunt/package.json @@ -22,9 +22,7 @@ }, "main": "./out/main", "activationEvents": [ - "onCommand:workbench.action.tasks.runTask", - "onCommand:workbench.action.tasks.build", - "onCommand:workbench.action.tasks.test" + "onCommand:workbench.action.tasks.runTask" ], "contributes": { "configuration": { diff --git a/extensions/gulp/package.json b/extensions/gulp/package.json index 0d1d70f9e1ef6..5ec491853fef1 100644 --- a/extensions/gulp/package.json +++ b/extensions/gulp/package.json @@ -22,9 +22,7 @@ }, "main": "./out/main", "activationEvents": [ - "onCommand:workbench.action.tasks.runTask", - "onCommand:workbench.action.tasks.build", - "onCommand:workbench.action.tasks.test" + "onCommand:workbench.action.tasks.runTask" ], "contributes": { "configuration": { diff --git a/extensions/jake/package.json b/extensions/jake/package.json index dd34c9b2235c2..ee5a916ade52f 100644 --- a/extensions/jake/package.json +++ b/extensions/jake/package.json @@ -22,9 +22,7 @@ }, "main": "./out/main", "activationEvents": [ - "onCommand:workbench.action.tasks.runTask", - "onCommand:workbench.action.tasks.build", - "onCommand:workbench.action.tasks.test" + "onCommand:workbench.action.tasks.runTask" ], "contributes": { "configuration": { diff --git a/extensions/npm/package.json b/extensions/npm/package.json index e6a6a3ec4fa88..9d626265d3642 100644 --- a/extensions/npm/package.json +++ b/extensions/npm/package.json @@ -23,9 +23,7 @@ }, "main": "./out/main", "activationEvents": [ - "onCommand:workbench.action.tasks.runTask", - "onCommand:workbench.action.tasks.build", - "onCommand:workbench.action.tasks.test" + "onCommand:workbench.action.tasks.runTask" ], "contributes": { "configuration": { diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index cff9784cabe70..11b75cfc26bfe 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -35,9 +35,7 @@ "onCommand:javascript.goToProjectConfig", "onCommand:typescript.goToProjectConfig", "onCommand:typescript.openTsServerLog", - "onCommand:workbench.action.tasks.runTask", - "onCommand:workbench.action.tasks.build", - "onCommand:workbench.action.tasks.test" + "onCommand:workbench.action.tasks.runTask" ], "main": "./out/typescriptMain", "contributes": { From c25eb69604f19b405d7a28281285be6831e94b76 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 29 May 2017 14:58:29 +0200 Subject: [PATCH 1255/2747] show update activity for all platforms but only for insider quality --- .../parts/update/electron-browser/update.contribution.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/update/electron-browser/update.contribution.ts b/src/vs/workbench/parts/update/electron-browser/update.contribution.ts index 39c771ee7c942..26cc50dfe8e40 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.contribution.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.contribution.ts @@ -8,7 +8,7 @@ import * as nls from 'vs/nls'; import 'vs/css!./media/update.contribution'; import { Registry } from 'vs/platform/platform'; -import { isMacintosh } from 'vs/base/common/platform'; +import product from 'vs/platform/node/product'; import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { ReleaseNotesEditor } from 'vs/workbench/parts/update/electron-browser/releaseNotesEditor'; import { ReleaseNotesInput } from 'vs/workbench/parts/update/electron-browser/releaseNotesInput'; @@ -24,7 +24,7 @@ import { ShowCurrentReleaseNotesAction, ProductContribution, UpdateContribution, Registry.as(WorkbenchExtensions.Workbench) .registerWorkbenchContribution(ProductContribution); -if (isMacintosh) { +if (product.quality === 'insider') { Registry.as(GlobalActivityExtensions) .registerActivity(LightUpdateContribution); } else { From 03fa5a859d5b6da6d70a1cecc2bb6aad5f13bfff Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 29 May 2017 15:02:48 +0200 Subject: [PATCH 1256/2747] use a wrench icon for the update activity --- .../workbench/parts/update/electron-browser/media/update.svg | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/update/electron-browser/media/update.svg b/src/vs/workbench/parts/update/electron-browser/media/update.svg index 637b2ad42defa..3dec2ba50fd1a 100644 --- a/src/vs/workbench/parts/update/electron-browser/media/update.svg +++ b/src/vs/workbench/parts/update/electron-browser/media/update.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file From 91988af341f2379c0c0312f433a6ea9f5fce5dc5 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 29 May 2017 15:12:55 +0200 Subject: [PATCH 1257/2747] update activity: action labels to better reflect os --- .../parts/update/electron-browser/update.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/update/electron-browser/update.ts b/src/vs/workbench/parts/update/electron-browser/update.ts index ff79f211a378a..323a9e0718162 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.ts @@ -28,7 +28,7 @@ import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IUpdateService, State as UpdateState } from 'vs/platform/update/common/update'; import * as semver from 'semver'; -import { OS } from 'vs/base/common/platform'; +import { OS, isLinux, isWindows } from 'vs/base/common/platform'; class ApplyUpdateAction extends Action { constructor( @IUpdateService private updateService: IUpdateService) { @@ -308,7 +308,17 @@ export class LightUpdateContribution implements IGlobalActivity { return [new Action('update.checking', nls.localize('checkingForUpdates', "Checking For Updates..."), undefined, false)]; case UpdateState.UpdateAvailable: - return [new Action('update.installing', nls.localize('installingUpdate', "Installing Update..."), undefined, false)]; + if (isLinux) { + return [new Action('update.linux.available', nls.localize('DownloadUpdate', "Download Available Update"), undefined, true, () => + this.updateService.quitAndInstall() + )]; + } + + const updateAvailableLabel = isWindows + ? nls.localize('DownloadingUpdate', "Downloading Update...") + : nls.localize('InstallingUpdate', "Installing Update..."); + + return [new Action('update.available', updateAvailableLabel, undefined, false)]; case UpdateState.UpdateDownloaded: return [new Action('update.restart', nls.localize('restartToUpdate', "Restart To Update..."), undefined, true, () => From 87adb8d06a9d77794bf10a5b5c57896d01b60206 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 29 May 2017 15:30:51 +0200 Subject: [PATCH 1258/2747] add more actions to the update activity --- .../parts/update/electron-browser/update.ts | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/src/vs/workbench/parts/update/electron-browser/update.ts b/src/vs/workbench/parts/update/electron-browser/update.ts index 323a9e0718162..cfdf028a84140 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.ts @@ -9,6 +9,7 @@ import nls = require('vs/nls'); import severity from 'vs/base/common/severity'; import { TPromise } from 'vs/base/common/winjs.base'; import { IAction, Action } from 'vs/base/common/actions'; +import { Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { IMessageService, CloseAction, Severity } from 'vs/platform/message/common/message'; import pkg from 'vs/platform/node/package'; import product from 'vs/platform/node/product'; @@ -300,35 +301,43 @@ export class LightUpdateContribution implements IGlobalActivity { } getActions(): IAction[] { + return [ + new Action('showCommandPalette', nls.localize('commandPalette', "Command Palette..."), undefined, true, () => this.commandService.executeCommand('workbench.action.showCommands')), + new Separator(), + new Action('openKeybindings', nls.localize('settings', "Settings"), null, true, () => this.commandService.executeCommand('workbench.action.openGlobalSettings')), + new Action('openSettings', nls.localize('keyboardShortcuts', "Keyboard Shortcuts"), null, true, () => this.commandService.executeCommand('workbench.action.openGlobalKeybindings')), + new Separator(), + this.getUpdateAction() + ]; + } + + private getUpdateAction(): IAction { switch (this.updateService.state) { case UpdateState.Uninitialized: - return [new Action('update.notavailable', nls.localize('not available', "Updates Not Available"), undefined, false)]; + return new Action('update.notavailable', nls.localize('not available', "Updates Not Available"), undefined, false); case UpdateState.CheckingForUpdate: - return [new Action('update.checking', nls.localize('checkingForUpdates', "Checking For Updates..."), undefined, false)]; + return new Action('update.checking', nls.localize('checkingForUpdates', "Checking For Updates..."), undefined, false); case UpdateState.UpdateAvailable: if (isLinux) { - return [new Action('update.linux.available', nls.localize('DownloadUpdate', "Download Available Update"), undefined, true, () => - this.updateService.quitAndInstall() - )]; + return new Action('update.linux.available', nls.localize('DownloadUpdate', "Download Available Update"), undefined, true, () => + this.updateService.quitAndInstall()); } const updateAvailableLabel = isWindows ? nls.localize('DownloadingUpdate', "Downloading Update...") : nls.localize('InstallingUpdate', "Installing Update..."); - return [new Action('update.available', updateAvailableLabel, undefined, false)]; + return new Action('update.available', updateAvailableLabel, undefined, false); case UpdateState.UpdateDownloaded: - return [new Action('update.restart', nls.localize('restartToUpdate', "Restart To Update..."), undefined, true, () => - this.updateService.quitAndInstall() - )]; + return new Action('update.restart', nls.localize('restartToUpdate', "Restart To Update..."), undefined, true, () => + this.updateService.quitAndInstall()); default: - return [new Action('update.check', nls.localize('checkForUpdates', "Check For Updates..."), undefined, this.updateService.state === UpdateState.Idle, () => - this.updateService.checkForUpdates(true) - )]; + return new Action('update.check', nls.localize('checkForUpdates', "Check For Updates..."), undefined, this.updateService.state === UpdateState.Idle, () => + this.updateService.checkForUpdates(true)); } } } \ No newline at end of file From fdadd0ed5fd39deebe8fb9e0ac5bd6efb4dfb94e Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 29 May 2017 15:38:55 +0200 Subject: [PATCH 1259/2747] Make identifier computed to better support task customization --- src/vs/vscode.d.ts | 12 ++++++------ src/vs/workbench/api/node/extHostTask.ts | 2 +- src/vs/workbench/api/node/extHostTypes.ts | 9 ++++----- src/vs/workbench/parts/tasks/browser/quickOpen.ts | 8 ++------ src/vs/workbench/parts/tasks/common/tasks.ts | 9 +++++++++ .../parts/tasks/electron-browser/jsonSchema_v2.ts | 12 +++++++++--- .../tasks/electron-browser/task.contribution.ts | 6 ++++-- 7 files changed, 35 insertions(+), 23 deletions(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 979822a1f4dde..a2de9d4811ada 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -3626,10 +3626,10 @@ declare module 'vscode' { readonly name: string; /** - * The task's identifier. If omitted the name is - * used as an identifier. + * The task's identifier. If omitted the internal identifier will + * be `${extensionName}:${name}` */ - identifier: string; + identifier: string | undefined; /** * Whether the task is a background task or not. @@ -3759,10 +3759,10 @@ declare module 'vscode' { readonly name: string; /** - * The task's identifier. If omitted the name is - * used as an identifier. + * The task's identifier. If omitted the internal identifier will + * be `${extensionName}:${name}` */ - identifier: string; + identifier: string | undefined; /** * Whether the task is a background task or not. diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index 99f5368de6fff..7508d947d45b0 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -316,7 +316,7 @@ namespace Tasks { detail: extension.id }, name: task.name, - identifier: task.identifier, + identifier: task.identifier ? task.identifier : `${extension.id}.${task.name}`, group: types.TaskGroup.is(task.group) ? task.group : undefined, command: command, isBackground: !!task.isBackground, diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index 87509da16495a..2912a30ef4251 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1030,7 +1030,6 @@ export class BaseTask { throw illegalArgument('name'); } this._name = name; - this._identifier = name; this._problemMatchers = problemMatchers || []; this._isBackground = false; this._terminal = Object.create(null); @@ -1041,11 +1040,11 @@ export class BaseTask { } set identifier(value: string) { - if (typeof value !== 'string') { - throw illegalArgument('identifier'); + if (value === void 0 || value === null) { + this._identifier = undefined; } - if (value.indexOf(':') !== -1) { - throw illegalArgument('identifier must not contain \':\''); + if (typeof value !== 'string' || value.length === 0) { + throw illegalArgument('identifier must be a string of length > 0'); } this._identifier = value; } diff --git a/src/vs/workbench/parts/tasks/browser/quickOpen.ts b/src/vs/workbench/parts/tasks/browser/quickOpen.ts index 15432e9c647ed..6f82d0482705b 100644 --- a/src/vs/workbench/parts/tasks/browser/quickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/quickOpen.ts @@ -13,7 +13,7 @@ import QuickOpen = require('vs/base/parts/quickopen/common/quickOpen'); import Model = require('vs/base/parts/quickopen/browser/quickOpenModel'); import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; -import { Task, TaskSourceKind } from 'vs/workbench/parts/tasks/common/tasks'; +import { Task, TaskSourceKind, computeLabel } from 'vs/workbench/parts/tasks/common/tasks'; import { ITaskService } from 'vs/workbench/parts/tasks/common/taskService'; import { ActionBarContributor, ContributableActionProvider } from 'vs/workbench/browser/actionBarRegistry'; @@ -23,11 +23,7 @@ export class TaskEntry extends Model.QuickOpenEntry { constructor(protected taskService: ITaskService, protected _task: Task, highlights: Model.IHighlight[] = []) { super(highlights); - if (_task._source.kind === TaskSourceKind.Extension) { - this._label = nls.localize('taskEntry.label', '{0}: {1}', _task._source.label, _task.name); - } else { - this._label = _task.name; - } + this._label = computeLabel(_task); } public getLabel(): string { diff --git a/src/vs/workbench/parts/tasks/common/tasks.ts b/src/vs/workbench/parts/tasks/common/tasks.ts index e7d54343b07ec..b798e6314e5f2 100644 --- a/src/vs/workbench/parts/tasks/common/tasks.ts +++ b/src/vs/workbench/parts/tasks/common/tasks.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import nls = require('vs/nls'); import * as Types from 'vs/base/common/types'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; @@ -248,4 +249,12 @@ export enum ExecutionEngine { export interface TaskSet { tasks: Task[]; extension?: IExtensionDescription; +} + +export function computeLabel(task: Task): string { + if (task._source.kind === TaskSourceKind.Extension) { + return nls.localize('taskEntry.label', '{0}: {1}', task._source.label, task.name); + } else { + return task.name; + } } \ No newline at end of file diff --git a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts index b184d7ee3ff99..e12e519fc0283 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts @@ -67,20 +67,25 @@ const group: IJSONSchema = { type: 'string', enum: ['none', 'clean', 'build', 'rebuildAll', 'test'], default: 'none', - description: nls.localize('JsonSchema.tasks.group', 'Defines to which execution group this task belongs to. If omitted the task belongs to no group') + description: nls.localize('JsonSchema.tasks.group', 'Defines to which execution group this task belongs to. If omitted the task belongs to no group.') }; const taskType: IJSONSchema = { type: 'string', enum: ['shell', 'process'], default: 'process', - description: nls.localize('JsonSchema.tasks.type', 'Defines whether the task is run as a process or as a command inside a shell. Default is process') + description: nls.localize('JsonSchema.tasks.type', 'Defines whether the task is run as a process or as a command inside a shell. Default is process.') }; const version: IJSONSchema = { type: 'string', enum: ['2.0.0'], - description: nls.localize('JsonSchema.version', 'The config\'s version number') + description: nls.localize('JsonSchema.version', 'The config\'s version number.') +}; + +const identifier: IJSONSchema = { + type: 'string', + description: nls.localize('JsonSchema.tasks.identifier', 'A unique identifier of the task.') }; const schema: IJSONSchema = { @@ -123,6 +128,7 @@ definitions.showOutputType.deprecationMessage = nls.localize('JsonSchema.tasks.s definitions.taskDescription.properties.echoCommand.deprecationMessage = nls.localize('JsonSchema.tasks.echoCommand.deprecated', 'The property echoCommand is deprecated. Use the terminal property instead.'); definitions.taskDescription.properties.isBuildCommand.deprecationMessage = nls.localize('JsonSchema.tasks.isBuildCommand.deprecated', 'The property isBuildCommand is deprecated. Use the group property instead.'); definitions.taskDescription.properties.isTestCommand.deprecationMessage = nls.localize('JsonSchema.tasks.isTestCommand.deprecated', 'The property isTestCommand is deprecated. Use the group property instead.'); +definitions.taskDescription.properties.identifier = identifier; definitions.taskDescription.properties.type = Objects.deepClone(taskType); definitions.taskDescription.properties.terminal = terminal; definitions.taskDescription.properties.group = group; diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index d94812a35bb5c..411e04c6df50b 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -71,7 +71,7 @@ import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions } from 'vs import { ITerminalService } from 'vs/workbench/parts/terminal/common/terminal'; import { ITaskSystem, ITaskResolver, ITaskSummary, ITaskExecuteResult, TaskExecuteKind, TaskError, TaskErrors, TaskSystemEvents } from 'vs/workbench/parts/tasks/common/taskSystem'; -import { Task, TaskSet, TaskGroup, ExecutionEngine, TaskSourceKind } from 'vs/workbench/parts/tasks/common/tasks'; +import { Task, TaskSet, TaskGroup, ExecutionEngine, TaskSourceKind, computeLabel as computeTaskLabel } from 'vs/workbench/parts/tasks/common/tasks'; import { ITaskService, TaskServiceEvents, ITaskProvider } from 'vs/workbench/parts/tasks/common/taskService'; import { templates as taskTemplates } from 'vs/workbench/parts/tasks/common/taskTemplates'; @@ -709,7 +709,7 @@ class TaskService extends EventEmitter implements ITaskService { return TPromise.as(undefined); } let fileConfig = configuration.config; - let customize = { taskName: task.name }; + let customize = { taskName: computeTaskLabel(task), identifier: task.identifier }; if (!fileConfig) { fileConfig = { version: '2.0.0', @@ -931,6 +931,7 @@ class TaskService extends EventEmitter implements ITaskService { let annotatingTask = annotatingTasks.byIdentifier[task.identifier] || annotatingTasks.byName[task.name]; if (annotatingTask) { TaskConfig.mergeTasks(task, annotatingTask); + task.name = annotatingTask.name; task._source.kind = TaskSourceKind.Workspace; continue; } @@ -940,6 +941,7 @@ class TaskService extends EventEmitter implements ITaskService { if (legacyAnnotatingTask) { TaskConfig.mergeTasks(task, legacyAnnotatingTask); task._source.kind = TaskSourceKind.Workspace; + task.name = legacyAnnotatingTask.name; workspaceTasksToDelete.push(legacyAnnotatingTask); continue; } From d9b33cf00ad979aee77a4b714297d9ede80b3547 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 29 May 2017 15:44:13 +0200 Subject: [PATCH 1260/2747] Attempt to fix git test 'element not visible' error. --- test/smoke/src/areas/git.ts | 5 +---- test/smoke/src/test.ts | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/test/smoke/src/areas/git.ts b/test/smoke/src/areas/git.ts index 3c04f44832800..58dcd1e9b3e86 100644 --- a/test/smoke/src/areas/git.ts +++ b/test/smoke/src/areas/git.ts @@ -39,8 +39,8 @@ export class Git { } public async stageFile(fileName: string): Promise { - console.log('Stage file' + fileName); await this.spectron.client.moveToObject(`div[class="monaco-icon-label file-icon ${fileName}-name-file-icon ${this.commonActions.getExtensionSelector(fileName)}"`); + await this.spectron.wait(); await this.spectron.client.click('.action-label.icon.contrib-cmd-icon-4'); return this.spectron.wait(); } @@ -56,18 +56,15 @@ export class Git { } public focusOnCommitBox(): Promise { - console.log('Focus on commit box'); return this.spectron.client.click('div[id="workbench.view.scm"] textarea'); } public async pressCommit(): Promise { - console.log('Press commit'); await this.spectron.client.click('.action-label.icon.contrib-cmd-icon-10'); return this.spectron.wait(); } public getOutgoingChanges(): Promise { - console.log('Get outgoing code'); return this.spectron.client.getText('a[title="Synchronize changes"]'); } } \ No newline at end of file diff --git a/test/smoke/src/test.ts b/test/smoke/src/test.ts index 70cc2f5d3229d..998616c02979f 100644 --- a/test/smoke/src/test.ts +++ b/test/smoke/src/test.ts @@ -18,7 +18,7 @@ import { testTasks } from "./tests/tasks"; import { testExtensions } from "./tests/extensions"; import { testLocalization } from "./tests/localization"; -describe('Smoke Test Suite', async () => { +describe('Smoke Test Suite', () => { testDataMigration(); testDataLoss(); testExplorer(); From ccd3c1f94e64f7798ddf30d187274bd8905593fd Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 29 May 2017 15:50:50 +0200 Subject: [PATCH 1261/2747] [c++] grammar in endless loop. Fixes #23850 --- extensions/cpp/OSSREADME.json | 2 +- extensions/cpp/syntaxes/c.json | 22 ++-- .../cpp/test/colorize-fixtures/test-23630.cpp | 3 + .../test/colorize-results/test-23630_cpp.json | 123 ++++++++++++++++++ 4 files changed, 138 insertions(+), 12 deletions(-) create mode 100644 extensions/cpp/test/colorize-fixtures/test-23630.cpp create mode 100644 extensions/cpp/test/colorize-results/test-23630_cpp.json diff --git a/extensions/cpp/OSSREADME.json b/extensions/cpp/OSSREADME.json index 58859a1b77640..5137487d2ed03 100644 --- a/extensions/cpp/OSSREADME.json +++ b/extensions/cpp/OSSREADME.json @@ -2,7 +2,7 @@ [ { "name": "atom/language-c", - "version": "0.51.3", + "version": "0.0.0", "license": "MIT", "repositoryURL": "https://github.com/atom/language-c", "description": "The files syntaxes/c.json and syntaxes/c++.json were derived from the Atom package https://atom.io/packages/language-c which was originally converted from the C TextMate bundle https://github.com/textmate/c.tmbundle." diff --git a/extensions/cpp/syntaxes/c.json b/extensions/cpp/syntaxes/c.json index 022f588cf28d9..b83b31ad22e41 100644 --- a/extensions/cpp/syntaxes/c.json +++ b/extensions/cpp/syntaxes/c.json @@ -778,7 +778,7 @@ }, "patterns": [ { - "begin": "\\G", + "begin": "\\G(?=.)", "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(? Date: Mon, 29 May 2017 16:07:38 +0200 Subject: [PATCH 1262/2747] node-debug: add 'subtle' value to 'presentationhint' attribute --- src/vs/workbench/parts/debug/common/debugProtocol.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debugProtocol.d.ts b/src/vs/workbench/parts/debug/common/debugProtocol.d.ts index b6b16f7ad5bff..a8ec4386a55d7 100644 --- a/src/vs/workbench/parts/debug/common/debugProtocol.d.ts +++ b/src/vs/workbench/parts/debug/common/debugProtocol.d.ts @@ -1123,8 +1123,8 @@ declare module DebugProtocol { endColumn?: number; /** The module associated with this frame, if any. */ moduleId?: number | string; - /** An optional hint for how to present this frame in the UI. A value of 'label' can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. */ - presentationHint?: 'normal' | 'label'; + /** An optional hint for how to present this frame in the UI. A value of 'label' can be used to indicate that the frame is an artificial frame that is used as a visual label or separator. A value of 'subtle' can be used to change the appearance of a frame in a 'subtle' way. */ + presentationHint?: 'normal' | 'label' | 'subtle'; } /** A Scope is a named container for variables. Optionally a scope can map to a source or a range within a source. */ From 862088c2b1b0ba7ebfba1d71fc90f16bd7e94523 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 29 May 2017 16:12:40 +0200 Subject: [PATCH 1263/2747] do not use a special badge for update notification --- .../browser/parts/activitybar/activitybarActions.ts | 9 +-------- .../browser/parts/activitybar/media/activityaction.css | 10 ---------- .../workbench/parts/update/electron-browser/update.ts | 6 +++--- .../services/activity/common/activityBarService.ts | 2 -- 4 files changed, 4 insertions(+), 23 deletions(-) diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts index 7711afeab128a..cc95a89bdd068 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts @@ -13,7 +13,7 @@ import { Builder, $ } from 'vs/base/browser/builder'; import { DelayedDragHandler } from 'vs/base/browser/dnd'; import { Action } from 'vs/base/common/actions'; import { BaseActionItem, Separator, IBaseActionItemOptions } from 'vs/base/browser/ui/actionbar/actionbar'; -import { IActivityBarService, DotBadge, ProgressBadge, TextBadge, NumberBadge, IconBadge, IBadge } from 'vs/workbench/services/activity/common/activityBarService'; +import { IActivityBarService, ProgressBadge, TextBadge, NumberBadge, IconBadge, IBadge } from 'vs/workbench/services/activity/common/activityBarService'; import Event, { Emitter } from 'vs/base/common/event'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { ICommandService } from 'vs/platform/commands/common/commands'; @@ -206,13 +206,6 @@ export class ActivityActionItem extends BaseActionItem { this.$badge.show(); } - // Dot - else if (badge instanceof DotBadge) { - this.$badge.addClass('dot-badge'); - this.$badge.title(badge.getDescription()); - this.$badge.show(); - } - // Progress else if (badge instanceof ProgressBadge) { this.$badge.show(); diff --git a/src/vs/workbench/browser/parts/activitybar/media/activityaction.css b/src/vs/workbench/browser/parts/activitybar/media/activityaction.css index 2cc5e0c94bc64..f9bb260bdbe39 100644 --- a/src/vs/workbench/browser/parts/activitybar/media/activityaction.css +++ b/src/vs/workbench/browser/parts/activitybar/media/activityaction.css @@ -67,16 +67,6 @@ text-align: center; } -.monaco-workbench > .activitybar > .content .monaco-action-bar .badge.dot-badge .badge-content { - box-sizing: border-box; - content: ''; - top: 9px; - width: 11px; - height: 11px; - min-width: inherit; - padding: 0; -} - /* Right aligned */ .monaco-workbench > .activitybar.right > .content .monaco-action-bar .action-label { diff --git a/src/vs/workbench/parts/update/electron-browser/update.ts b/src/vs/workbench/parts/update/electron-browser/update.ts index cfdf028a84140..4b8eff773df95 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.ts @@ -15,7 +15,7 @@ import pkg from 'vs/platform/node/package'; import product from 'vs/platform/node/product'; import URI from 'vs/base/common/uri'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { IActivityBarService, DotBadge } from 'vs/workbench/services/activity/common/activityBarService'; +import { IActivityBarService, TextBadge } from 'vs/workbench/services/activity/common/activityBarService'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { ReleaseNotesInput } from 'vs/workbench/parts/update/electron-browser/releaseNotesInput'; import { IGlobalActivity } from 'vs/workbench/browser/activity'; @@ -280,7 +280,7 @@ export class UpdateContribution implements IWorkbenchContribution { export class LightUpdateContribution implements IGlobalActivity { get id() { return 'vs.update'; } - get name() { return 'VS Code'; } + get name() { return ''; } get cssClass() { return 'update-activity'; } constructor( @@ -293,7 +293,7 @@ export class LightUpdateContribution implements IGlobalActivity { @IActivityBarService activityBarService: IActivityBarService ) { this.updateService.onUpdateReady(() => { - const badge = new DotBadge(() => nls.localize('updateIsReady', "New update available.")); + const badge = new TextBadge('\u21e9', () => nls.localize('updateIsReady', "New update available.")); activityBarService.showGlobalActivity(this.id, badge); }); diff --git a/src/vs/workbench/services/activity/common/activityBarService.ts b/src/vs/workbench/services/activity/common/activityBarService.ts index a07ea58e26a54..5c5b18a2105ed 100644 --- a/src/vs/workbench/services/activity/common/activityBarService.ts +++ b/src/vs/workbench/services/activity/common/activityBarService.ts @@ -24,8 +24,6 @@ export class BaseBadge implements IBadge { } } -export class DotBadge extends BaseBadge { } - export class NumberBadge extends BaseBadge { public number: number; From 109435f8cff94ebe2e8119f1fa6560b1b9c6421e Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 29 May 2017 16:19:04 +0200 Subject: [PATCH 1264/2747] Fixed path to module. --- test/smoke/src/tests/statusbar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/smoke/src/tests/statusbar.ts b/test/smoke/src/tests/statusbar.ts index 86a315daebcde..63bcb9688b183 100644 --- a/test/smoke/src/tests/statusbar.ts +++ b/test/smoke/src/tests/statusbar.ts @@ -7,7 +7,7 @@ import * as assert from 'assert'; import { SpectronApplication, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; import { CommonActions } from '../areas/common'; -import { StatusBarElement, StatusBar } from "../areas/statusBar"; +import { StatusBarElement, StatusBar } from "../areas/statusbar"; let app: SpectronApplication; let common: CommonActions; From b0b5d17de1ad636aa943002f9ea6e064169b54b7 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 29 May 2017 16:39:35 +0200 Subject: [PATCH 1265/2747] debug: suport presentationHint = "subtle" fixes #25162 --- src/vs/workbench/parts/debug/browser/media/debugViewlet.css | 4 ++++ .../workbench/parts/debug/electron-browser/debugViewer.ts | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/media/debugViewlet.css b/src/vs/workbench/parts/debug/browser/media/debugViewlet.css index b0d6b4510a12d..174bf9f39aae5 100644 --- a/src/vs/workbench/parts/debug/browser/media/debugViewlet.css +++ b/src/vs/workbench/parts/debug/browser/media/debugViewlet.css @@ -207,6 +207,10 @@ font-style: italic; } +.debug-viewlet .debug-call-stack .stack-frame.subtle { + font-style: italic; +} + .debug-viewlet .debug-call-stack .stack-frame.label > .file { display: none; } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index 2c8391b709fbe..ea989342bbb95 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -537,8 +537,10 @@ export class CallStackRenderer implements IRenderer { } private renderStackFrame(stackFrame: debug.IStackFrame, data: IStackFrameTemplateData): void { - stackFrame.source.presenationHint === 'deemphasize' ? dom.addClass(data.stackFrame, 'disabled') : dom.removeClass(data.stackFrame, 'disabled'); - stackFrame.source.presenationHint === 'label' ? dom.addClass(data.stackFrame, 'label') : dom.removeClass(data.stackFrame, 'label'); + dom.toggleClass(data.stackFrame, 'disabled', stackFrame.source.presenationHint === 'deemphasize'); + dom.toggleClass(data.stackFrame, 'label', stackFrame.source.presenationHint === 'label'); + dom.toggleClass(data.stackFrame, 'subtle', stackFrame.source.presenationHint === 'subtle'); + data.file.title = stackFrame.source.raw.path || stackFrame.source.name; if (stackFrame.source.raw.origin) { data.file.title += `\n${stackFrame.source.raw.origin}`; From afa75ce314939793a14081e47ac7e8ca9b03cb78 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Mon, 29 May 2017 16:38:58 +0200 Subject: [PATCH 1266/2747] node-debug@1.13.7 (translations) --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index cf894772b6a2b..e73e03c311de3 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -42,7 +42,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.13.6' }, + { name: 'ms-vscode.node-debug', version: '1.13.7' }, { name: 'ms-vscode.node-debug2', version: '1.13.0' } ]; From 5b7b38d8a5ef6025dea1bc889f3719e5e9cd4ed1 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 29 May 2017 16:51:26 +0200 Subject: [PATCH 1267/2747] Have Ctrl+A go to line start on OSX (#19644) --- .../editor/common/controller/coreCommands.ts | 40 ++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/common/controller/coreCommands.ts b/src/vs/editor/common/controller/coreCommands.ts index e0a3cd88f63b1..b6372c58eb835 100644 --- a/src/vs/editor/common/controller/coreCommands.ts +++ b/src/vs/editor/common/controller/coreCommands.ts @@ -815,10 +815,48 @@ export namespace CoreNavigationCommands { weight: CORE_WEIGHT, kbExpr: EditorContextKeys.textFocus, primary: KeyCode.Home, - mac: { primary: KeyCode.Home, secondary: [KeyMod.CtrlCmd | KeyCode.LeftArrow, KeyMod.WinCtrl | KeyCode.KEY_A] } + mac: { primary: KeyCode.Home, secondary: [KeyMod.CtrlCmd | KeyCode.LeftArrow] } } })); + export const CursorLineStart: CoreEditorCommand = registerEditorCommand(new class extends CoreEditorCommand { + constructor() { + super({ + id: 'cursorLineStart', + precondition: null, + kbOpts: { + weight: CORE_WEIGHT, + kbExpr: EditorContextKeys.textFocus, + primary: 0, + mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_A } + } + }); + } + + public runCoreEditorCommand(cursors: ICursors, args: any): void { + cursors.context.model.pushStackElement(); + cursors.setStates( + args.source, + CursorChangeReason.Explicit, + CursorState.ensureInEditableRange( + cursors.context, + this._exec(cursors.context, cursors.getAll()) + ) + ); + cursors.reveal(true, RevealTarget.Primary); + } + + private _exec(context: CursorContext, cursors: CursorState[]): CursorState[] { + let result: CursorState[] = []; + for (let i = 0, len = cursors.length; i < len; i++) { + const cursor = cursors[i]; + const lineNumber = cursor.modelState.position.lineNumber; + result[i] = CursorState.fromModelState(cursor.modelState.move(false, lineNumber, 1, 0)); + } + return result; + } + }); + export const CursorHomeSelect: CoreEditorCommand = registerEditorCommand(new HomeCommand({ inSelectionMode: true, id: 'cursorHomeSelect', From f43e78769ba24714a2007364d4b8d99dd34a4a85 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 29 May 2017 16:54:52 +0200 Subject: [PATCH 1268/2747] Have Ctrl+E go to line end on OSX --- .../editor/common/controller/coreCommands.ts | 65 +++++++++++++++---- 1 file changed, 52 insertions(+), 13 deletions(-) diff --git a/src/vs/editor/common/controller/coreCommands.ts b/src/vs/editor/common/controller/coreCommands.ts index b6372c58eb835..3794e7ace1361 100644 --- a/src/vs/editor/common/controller/coreCommands.ts +++ b/src/vs/editor/common/controller/coreCommands.ts @@ -819,6 +819,18 @@ export namespace CoreNavigationCommands { } })); + export const CursorHomeSelect: CoreEditorCommand = registerEditorCommand(new HomeCommand({ + inSelectionMode: true, + id: 'cursorHomeSelect', + precondition: null, + kbOpts: { + weight: CORE_WEIGHT, + kbExpr: EditorContextKeys.textFocus, + primary: KeyMod.Shift | KeyCode.Home, + mac: { primary: KeyMod.Shift | KeyCode.Home, secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.LeftArrow] } + } + })); + export const CursorLineStart: CoreEditorCommand = registerEditorCommand(new class extends CoreEditorCommand { constructor() { super({ @@ -857,18 +869,6 @@ export namespace CoreNavigationCommands { } }); - export const CursorHomeSelect: CoreEditorCommand = registerEditorCommand(new HomeCommand({ - inSelectionMode: true, - id: 'cursorHomeSelect', - precondition: null, - kbOpts: { - weight: CORE_WEIGHT, - kbExpr: EditorContextKeys.textFocus, - primary: KeyMod.Shift | KeyCode.Home, - mac: { primary: KeyMod.Shift | KeyCode.Home, secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.LeftArrow] } - } - })); - class EndCommand extends CoreEditorCommand { private readonly _inSelectionMode: boolean; @@ -900,7 +900,7 @@ export namespace CoreNavigationCommands { weight: CORE_WEIGHT, kbExpr: EditorContextKeys.textFocus, primary: KeyCode.End, - mac: { primary: KeyCode.End, secondary: [KeyMod.CtrlCmd | KeyCode.RightArrow, KeyMod.WinCtrl | KeyCode.KEY_E] } + mac: { primary: KeyCode.End, secondary: [KeyMod.CtrlCmd | KeyCode.RightArrow] } } })); @@ -916,6 +916,45 @@ export namespace CoreNavigationCommands { } })); + export const CursorLineEnd: CoreEditorCommand = registerEditorCommand(new class extends CoreEditorCommand { + constructor() { + super({ + id: 'cursorLineEnd', + precondition: null, + kbOpts: { + weight: CORE_WEIGHT, + kbExpr: EditorContextKeys.textFocus, + primary: 0, + mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_E } + } + }); + } + + public runCoreEditorCommand(cursors: ICursors, args: any): void { + cursors.context.model.pushStackElement(); + cursors.setStates( + args.source, + CursorChangeReason.Explicit, + CursorState.ensureInEditableRange( + cursors.context, + this._exec(cursors.context, cursors.getAll()) + ) + ); + cursors.reveal(true, RevealTarget.Primary); + } + + private _exec(context: CursorContext, cursors: CursorState[]): CursorState[] { + let result: CursorState[] = []; + for (let i = 0, len = cursors.length; i < len; i++) { + const cursor = cursors[i]; + const lineNumber = cursor.modelState.position.lineNumber; + const maxColumn = context.model.getLineMaxColumn(lineNumber); + result[i] = CursorState.fromModelState(cursor.modelState.move(false, lineNumber, maxColumn, 0)); + } + return result; + } + }); + class TopCommand extends CoreEditorCommand { private readonly _inSelectionMode: boolean; From 3214dd602484c208fad3148c86d5d4fd7394b357 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 29 May 2017 17:05:08 +0200 Subject: [PATCH 1269/2747] [css] update services --- extensions/css/server/npm-shrinkwrap.json | 4 ++-- extensions/css/server/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/css/server/npm-shrinkwrap.json b/extensions/css/server/npm-shrinkwrap.json index aebf5bf5121e4..13f55cd6b2827 100644 --- a/extensions/css/server/npm-shrinkwrap.json +++ b/extensions/css/server/npm-shrinkwrap.json @@ -3,9 +3,9 @@ "version": "1.0.0", "dependencies": { "vscode-css-languageservice": { - "version": "2.0.3", + "version": "2.1.0", "from": "vscode-css-languageservice@next", - "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-2.0.3.tgz" + "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-2.1.0.tgz" }, "vscode-jsonrpc": { "version": "3.2.0", diff --git a/extensions/css/server/package.json b/extensions/css/server/package.json index 9e4322d03fe88..ba141abd6cd29 100644 --- a/extensions/css/server/package.json +++ b/extensions/css/server/package.json @@ -8,7 +8,7 @@ "node": "*" }, "dependencies": { - "vscode-css-languageservice": "^2.0.3", + "vscode-css-languageservice": "^2.1.0", "vscode-languageserver": "^3.2.0" }, "devDependencies": { From 41e7b3f9ac73f2a15195fd6679ecd2324a5e361f Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Mon, 29 May 2017 17:05:18 +0200 Subject: [PATCH 1270/2747] [html] update services --- extensions/html/server/npm-shrinkwrap.json | 15 +++++++++++---- extensions/html/server/package.json | 4 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/extensions/html/server/npm-shrinkwrap.json b/extensions/html/server/npm-shrinkwrap.json index 82254c66b11df..ee83f51e71e65 100644 --- a/extensions/html/server/npm-shrinkwrap.json +++ b/extensions/html/server/npm-shrinkwrap.json @@ -3,14 +3,21 @@ "version": "1.0.0", "dependencies": { "vscode-css-languageservice": { - "version": "2.0.2", + "version": "2.1.0", "from": "vscode-css-languageservice@next", - "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-2.0.2.tgz" + "resolved": "https://registry.npmjs.org/vscode-css-languageservice/-/vscode-css-languageservice-2.1.0.tgz", + "dependencies": { + "vscode-languageserver-types": { + "version": "3.2.0", + "from": "vscode-languageserver-types@>=3.2.0 <4.0.0", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.2.0.tgz" + } + } }, "vscode-html-languageservice": { - "version": "2.0.4", + "version": "2.0.5", "from": "vscode-html-languageservice@next", - "resolved": "https://registry.npmjs.org/vscode-html-languageservice/-/vscode-html-languageservice-2.0.4.tgz" + "resolved": "https://registry.npmjs.org/vscode-html-languageservice/-/vscode-html-languageservice-2.0.5.tgz" }, "vscode-jsonrpc": { "version": "3.1.0-alpha.1", diff --git a/extensions/html/server/package.json b/extensions/html/server/package.json index a80e9b214bafa..5284d547143e5 100644 --- a/extensions/html/server/package.json +++ b/extensions/html/server/package.json @@ -8,8 +8,8 @@ "node": "*" }, "dependencies": { - "vscode-css-languageservice": "^2.0.2", - "vscode-html-languageservice": "^2.0.4", + "vscode-css-languageservice": "^2.1.0", + "vscode-html-languageservice": "^2.0.5", "vscode-languageserver": "^3.1.0-alpha.1", "vscode-nls": "^2.0.2", "vscode-uri": "^1.0.0" From 64d9133505b6fa46df8f8292e1dbedb811a59e6b Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 29 May 2017 16:49:19 +0200 Subject: [PATCH 1271/2747] Dispose tree view listeners --- src/vs/workbench/parts/views/browser/treeView.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/views/browser/treeView.ts b/src/vs/workbench/parts/views/browser/treeView.ts index c3f3482549467..957f7a6f9b219 100644 --- a/src/vs/workbench/parts/views/browser/treeView.ts +++ b/src/vs/workbench/parts/views/browser/treeView.ts @@ -39,6 +39,7 @@ export class TreeView extends CollapsibleViewletView { private activated: boolean = false; private treeInputPromise: TPromise; + private dataProviderRegisteredListener: IDisposable; private dataProviderElementChangeListener: IDisposable; private disposables: IDisposable[] = []; @@ -136,11 +137,11 @@ export class TreeView extends CollapsibleViewletView { return this.treeInputPromise; } this.treeInputPromise = new TPromise((c, e) => { - const disposable = ViewsRegistry.onTreeViewDataProviderRegistered(id => { + this.dataProviderRegisteredListener = ViewsRegistry.onTreeViewDataProviderRegistered(id => { if (this.id === id) { if (this.listenToDataProvider()) { this.tree.setInput(new Root()).then(() => c(null)); - disposable.dispose(); + this.dataProviderRegisteredListener.dispose(); } } }); @@ -183,6 +184,13 @@ export class TreeView extends CollapsibleViewletView { } dispose(): void { + if (this.dataProviderRegisteredListener) { + this.dataProviderRegisteredListener.dispose(); + } + dispose(this.disposables); + if (this.dataProviderElementChangeListener) { + this.dataProviderElementChangeListener.dispose(); + } dispose(this.disposables); super.dispose(); } From 16255827d87054f34bf6674dbd3a54f9dfe35a01 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 29 May 2017 17:03:19 +0200 Subject: [PATCH 1272/2747] Explorer viewlet - Dispose listeners - Expand the view if it is only view - Check sash index before disposing --- src/vs/base/browser/ui/splitview/splitview.ts | 6 +- src/vs/workbench/browser/viewlet.ts | 2 + .../parts/files/browser/explorerViewlet.ts | 101 ++++++++++-------- 3 files changed, 61 insertions(+), 48 deletions(-) diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 47ae7bc96ebac..a328f784bdc03 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -611,8 +611,10 @@ export class SplitView implements this.onViewChange(deadView, 0); let sashIndex = Math.max(index - 1, 0); - this.sashes[sashIndex].dispose(); - this.sashes.splice(sashIndex, 1); + if (sashIndex < this.sashes.length) { + this.sashes[sashIndex].dispose(); + this.sashes.splice(sashIndex, 1); + } this.viewChangeListeners[index].dispose(); this.viewChangeListeners.splice(index, 1); diff --git a/src/vs/workbench/browser/viewlet.ts b/src/vs/workbench/browser/viewlet.ts index 56c11d7b11a10..0403d96aa35b2 100644 --- a/src/vs/workbench/browser/viewlet.ts +++ b/src/vs/workbench/browser/viewlet.ts @@ -301,6 +301,8 @@ export interface IViewletView extends IView, IThemable { shutdown(): void; focusBody(): void; isExpanded(): boolean; + expand(): void; + collapse(): void; } /** diff --git a/src/vs/workbench/parts/files/browser/explorerViewlet.ts b/src/vs/workbench/parts/files/browser/explorerViewlet.ts index f0def3cae9472..9160ec7459ba7 100644 --- a/src/vs/workbench/parts/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/browser/explorerViewlet.ts @@ -6,7 +6,7 @@ 'use strict'; import 'vs/css!./media/explorerviewlet'; -import { IDisposable } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IAction, IActionRunner } from 'vs/base/common/actions'; import { TPromise } from 'vs/base/common/winjs.base'; import { Dimension, Builder } from 'vs/base/browser/builder'; @@ -61,6 +61,7 @@ export class ExplorerViewlet extends Viewlet { private dimension: Dimension; private viewletVisibleContextKey: IContextKey; + private disposables: IDisposable[] = []; constructor( @ITelemetryService telemetryService: ITelemetryService, @@ -71,7 +72,7 @@ export class ExplorerViewlet extends Viewlet { @IConfigurationService private configurationService: IConfigurationService, @IInstantiationService private instantiationService: IInstantiationService, @IContextKeyService contextKeyService: IContextKeyService, - @IThemeService themeService: IThemeService, + @IThemeService themeService: IThemeService ) { super(VIEWLET_ID, telemetryService, themeService); @@ -81,8 +82,9 @@ export class ExplorerViewlet extends Viewlet { this.viewletVisibleContextKey = ExplorerViewletVisibleContext.bindTo(contextKeyService); this.viewletSettings = this.getMemento(storageService, Scope.WORKSPACE); - this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(e.config)); - ViewsRegistry.onViewsRegistered(viewDescriptors => this.addViews(viewDescriptors.filter(viewDescriptor => ViewLocation.Explorer === viewDescriptor.location))); + + this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(e.config), this, this.disposables); + ViewsRegistry.onViewsRegistered(viewDescriptors => this.addCustomViews(viewDescriptors.filter(viewDescriptor => ViewLocation.Explorer === viewDescriptor.location), true), this, this.disposables); } public create(parent: Builder): TPromise { @@ -134,11 +136,7 @@ export class ExplorerViewlet extends Viewlet { // custom views for (const view of customViews) { - this.views.push(this.instantiationService.createInstance(view.ctor, view.id, { - name: view.name, - actionRunner: this.getActionRunner(), - collapsed: viewsState[view.id] ? (viewsState[view.id]).collapsed : true - })); + this.addCustomView(view, viewsState[view.id], -1); } for (let i = 0; i < this.views.length; i++) { @@ -150,16 +148,7 @@ export class ExplorerViewlet extends Viewlet { this.lastFocusedView = this.explorerView; return TPromise.join(this.views.map(view => view.create())).then(() => void 0).then(() => { - if (this.views.length === 1) { - this.views[0].hideHeader(); - - } - if (this.dimension) { - this.layout(this.dimension); - } - - // Update title area since the title actions have changed. - this.updateTitleArea(); + this.onViewsUpdated(); return this.setVisible(this.isVisible()).then(() => this.focus()); // Focus the viewlet since that triggers a rerender. }); } @@ -188,47 +177,61 @@ export class ExplorerViewlet extends Viewlet { this.splitView.removeView(this.openEditorsView); this.openEditorsView.dispose(); this.openEditorsView = null; - - if (this.views.length === 1) { - this.views[0].hideHeader(); - } - if (this.dimension) { - this.layout(this.dimension); - } - // Update title area since the title actions have changed. - this.updateTitleArea(); + this.onViewsUpdated(); } } - private addViews(viewDescriptors: IViewDescriptor[]): void { + private addCustomViews(viewDescriptors: IViewDescriptor[], end: boolean): void { if (!this.splitView || !viewDescriptors.length) { return; } const views = []; + const registered = ViewsRegistry.getViews(ViewLocation.Explorer); const viewsState = JSON.parse(this.storageService.get(ExplorerViewlet.EXPLORER_VIEWS_STATE, this.contextService.hasWorkspace() ? StorageScope.WORKSPACE : StorageScope.GLOBAL, '{}')); for (const viewDescriptor of viewDescriptors) { - const view = this.instantiationService.createInstance(viewDescriptor.ctor, viewDescriptor.id, { - name: viewDescriptor.name, - actionRunner: this.getActionRunner(), - collapsed: viewsState[viewDescriptor.id] ? (viewsState[viewDescriptor.id]).collapsed : true - }); + let index = end ? -1 : this.openEditorsView ? registered.indexOf(viewDescriptor) + 2 : registered.indexOf(viewDescriptor) + 1; + const view = this.addCustomView(viewDescriptor, viewsState[viewDescriptor.id], index); views.push(view); - this.views.push(view); attachHeaderViewStyler(view, this.themeService); - this.splitView.addView(view, viewsState[view.id] ? (viewsState[view.id]).size : void 0); + this.splitView.addView(view, viewsState[view.id] ? (viewsState[view.id]).size : void 0, end ? void 0 : index); } TPromise.join(views.map(view => view.create())).then(() => void 0).then(() => { - this.views[0].showHeader(); + this.onViewsUpdated(); + }); + } + + private addCustomView(viewDescriptor: IViewDescriptor, viewState: IViewState, index: number): IViewletView { + const view = this.instantiationService.createInstance(viewDescriptor.ctor, viewDescriptor.id, { + name: viewDescriptor.name, + actionRunner: this.getActionRunner(), + collapsed: viewState ? viewState.collapsed : true + }); + if (index !== -1) { + this.views.splice(index, 0, view); + } else { + this.views.push(view); + } + return view; + } - if (this.dimension) { - this.layout(this.dimension); + private onViewsUpdated(): void { + if (this.views.length > 1) { + this.views[0].showHeader(); + } else { + this.views[0].hideHeader(); + if (!this.views[0].isExpanded()) { + this.views[0].expand(); } + } - // Update title area since the title actions have changed. - this.updateTitleArea(); - }); + if (this.dimension) { + this.layout(this.dimension); + } + + // Update title area since the title actions have changed. + this.updateTitleArea(); } private onConfigurationUpdated(config: IFilesConfiguration): void { @@ -395,15 +398,17 @@ export class ExplorerViewlet extends Viewlet { } public shutdown(): void { + this.saveViewsState(); + this.views.forEach((view) => view.shutdown()); + super.shutdown(); + } + + private saveViewsState(): void { const viewletState = this.views.reduce((result, view) => { result[view.id] = this.getViewState(view); return result; }, {}); this.storageService.store(ExplorerViewlet.EXPLORER_VIEWS_STATE, JSON.stringify(viewletState), this.contextService.hasWorkspace() ? StorageScope.WORKSPACE : StorageScope.GLOBAL); - - this.views.forEach((view) => view.shutdown()); - - super.shutdown(); } private getViewState(view: IViewletView): IViewState { @@ -439,5 +444,9 @@ export class ExplorerViewlet extends Viewlet { this.focusListener.dispose(); this.focusListener = null; } + + this.disposables = dispose(this.disposables); + + super.dispose(); } } \ No newline at end of file From 5199dddb6fbaa0605b3ca2ef8504311d0c55757b Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 29 May 2017 17:14:31 +0200 Subject: [PATCH 1273/2747] Allowed more time for build task to prevent native dialog popup that blocks the test. Added missing comma in search test. --- test/smoke/src/areas/search.ts | 2 +- test/smoke/src/tests/tasks.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/smoke/src/areas/search.ts b/test/smoke/src/areas/search.ts index 5477a5f25d916..8b74c8ffb9a4f 100644 --- a/test/smoke/src/areas/search.ts +++ b/test/smoke/src/areas/search.ts @@ -45,6 +45,6 @@ export class Search { } public dismissResult(): any { - return this.spectron.client.click('.action-label.icon.action-remove') + return this.spectron.client.click('.action-label.icon.action-remove'); } } \ No newline at end of file diff --git a/test/smoke/src/tests/tasks.ts b/test/smoke/src/tests/tasks.ts index bbe36ef39680f..cdf58d6c12487 100644 --- a/test/smoke/src/tests/tasks.ts +++ b/test/smoke/src/tests/tasks.ts @@ -32,6 +32,7 @@ export function testTasks() { it(`is able to select 'Git' output`, async function () { await tasks.build(); + await app.wait(); await tasks.selectOutputViewType('Git'); const viewType = await tasks.getOutputViewType(); assert.equal(viewType, 'Git'); From 43786fc1f763232fd81f5a2797fa55aacebd2809 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 29 May 2017 17:23:34 +0200 Subject: [PATCH 1274/2747] global settings - enable when running "out of dev" and show keybindings --- .../browser/parts/activitybar/activitybarActions.ts | 2 -- .../browser/parts/activitybar/activitybarPart.ts | 10 ++++++---- src/vs/workbench/electron-browser/window.ts | 3 +-- .../parts/files/browser/views/explorerViewer.ts | 7 ++----- .../parts/files/browser/views/openEditorsViewer.ts | 4 +--- .../parts/markers/browser/markersTreeController.ts | 11 +---------- .../parts/preferences/browser/keybindingsEditor.ts | 3 +-- .../parts/terminal/electron-browser/terminalPanel.ts | 5 +---- .../update/electron-browser/update.contribution.ts | 2 +- .../workbench/parts/update/electron-browser/update.ts | 10 +++++++--- src/vs/workbench/parts/views/browser/treeView.ts | 11 +---------- .../electron-browser/contextmenuService.ts | 2 +- 12 files changed, 23 insertions(+), 47 deletions(-) diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts index cc95a89bdd068..287ad54470dad 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts @@ -504,7 +504,6 @@ export class ViewletOverflowActivityActionItem extends ActivityActionItem { private getBadge: (viewlet: ViewletDescriptor) => IBadge, @IInstantiationService private instantiationService: IInstantiationService, @IViewletService private viewletService: IViewletService, - @IKeybindingService private keybindingService: IKeybindingService, @IContextMenuService private contextMenuService: IContextMenuService, @IThemeService themeService: IThemeService ) { @@ -548,7 +547,6 @@ export class ViewletOverflowActivityActionItem extends ActivityActionItem { this.contextMenuService.showContextMenu({ getAnchor: () => this.builder.getHTMLElement(), getActions: () => TPromise.as(this.actions), - getKeyBinding: (action) => this.keybindingService.lookupKeybinding(action.id), onHide: () => dispose(this.actions) }); } diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index 4085747c90049..4e773ecab3898 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -83,12 +83,13 @@ export class ActivitybarPart extends Part implements IActivityBarService { private dimension: Dimension; + private globalActionBar: ActionBar; + private globalActivityIdToActions: { [globalActivityId: string]: GlobalActivityAction; }; + private viewletSwitcherBar: ActionBar; - private activityActionBar: ActionBar; private viewletOverflowAction: ViewletOverflowActivityAction; private viewletOverflowActionItem: ViewletOverflowActivityActionItem; - private globalActivityIdToActions: { [globalActivityId: string]: GlobalActivityAction; }; private viewletIdToActions: { [viewletId: string]: ActivityAction; }; private viewletIdToActionItems: { [viewletId: string]: IActionItem; }; private viewletIdToActivityStack: { [viewletId: string]: IViewletActivity[]; }; @@ -110,6 +111,7 @@ export class ActivitybarPart extends Part implements IActivityBarService { super(id, { hasTitle: false }, themeService); this.globalActivityIdToActions = Object.create(null); + this.viewletIdToActionItems = Object.create(null); this.viewletIdToActions = Object.create(null); this.viewletIdToActivityStack = Object.create(null); @@ -316,7 +318,7 @@ export class ActivitybarPart extends Part implements IActivityBarService { .map(d => this.instantiationService.createInstance(d)) .map(a => new GlobalActivityAction(a)); - this.activityActionBar = new ActionBar(container, { + this.globalActionBar = new ActionBar(container, { actionItemProvider: a => this.instantiationService.createInstance(GlobalActivityActionItem, a), orientation: ActionsOrientation.VERTICAL, ariaLabel: nls.localize('globalActions', "Global Actions"), @@ -325,7 +327,7 @@ export class ActivitybarPart extends Part implements IActivityBarService { actions.forEach(a => { this.globalActivityIdToActions[a.id] = a; - this.activityActionBar.push(a); + this.globalActionBar.push(a); }); } diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index be59101349eb9..e0eb6f23dfe51 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -338,8 +338,7 @@ export class ElectronWindow extends Themable { this.contextMenuService.showContextMenu({ getAnchor: () => target, - getActions: () => TPromise.as(TextInputActions), - getKeyBinding: action => this.keybindingService.lookupKeybinding(action.id) + getActions: () => TPromise.as(TextInputActions) }); } } diff --git a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts index 4494835dff88f..ec485a2d39143 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts @@ -33,7 +33,6 @@ import { DesktopDragAndDropData, ExternalElementsDragAndDropData } from 'vs/base import { ClickBehavior, DefaultController } from 'vs/base/parts/tree/browser/treeDefaults'; import { FileStat, NewStatPlaceholder } from 'vs/workbench/parts/files/common/explorerViewModel'; import { DragMouseEvent, IMouseEvent } from 'vs/base/browser/mouseEvent'; -import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IPartService } from 'vs/workbench/services/part/common/partService'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; @@ -44,7 +43,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { IMessageService, IConfirmation, Severity } from 'vs/platform/message/common/message'; import { IProgressService } from 'vs/platform/progress/common/progress'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { ResolvedKeybinding, KeyCode } from 'vs/base/common/keyCodes'; +import { KeyCode } from 'vs/base/common/keyCodes'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { IMenuService, IMenu, MenuId } from 'vs/platform/actions/common/actions'; import { fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; @@ -396,8 +395,7 @@ export class FileController extends DefaultController { @ITelemetryService private telemetryService: ITelemetryService, @IWorkspaceContextService private contextService: IWorkspaceContextService, @IMenuService menuService: IMenuService, - @IContextKeyService contextKeyService: IContextKeyService, - @IKeybindingService private keybindingService: IKeybindingService + @IContextKeyService contextKeyService: IContextKeyService ) { super({ clickBehavior: ClickBehavior.ON_MOUSE_UP /* do not change to not break DND */, keyboardSupport: false /* handled via IListService */ }); @@ -495,7 +493,6 @@ export class FileController extends DefaultController { }); }, getActionItem: this.state.actionProvider.getActionItem.bind(this.state.actionProvider, tree, stat), - getKeyBinding: (a): ResolvedKeybinding => this.keybindingService.lookupKeybinding(a.id), getActionsContext: (event) => { return { viewletState: this.state, diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts b/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts index e662f47ce91ef..0985b01da568c 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts @@ -170,8 +170,7 @@ export class Controller extends DefaultController { @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IEditorGroupService private editorGroupService: IEditorGroupService, @IContextMenuService private contextMenuService: IContextMenuService, - @ITelemetryService private telemetryService: ITelemetryService, - @IKeybindingService private keybindingService: IKeybindingService + @ITelemetryService private telemetryService: ITelemetryService ) { super({ clickBehavior: ClickBehavior.ON_MOUSE_DOWN, keyboardSupport: false }); } @@ -261,7 +260,6 @@ export class Controller extends DefaultController { this.contextMenuService.showContextMenu({ getAnchor: () => anchor, getActions: () => this.actionProvider.getSecondaryActions(tree, element), - getKeyBinding: (action) => this.keybindingService.lookupKeybinding(action.id), onHide: (wasCancelled?: boolean) => { if (wasCancelled) { tree.DOMFocus(); diff --git a/src/vs/workbench/parts/markers/browser/markersTreeController.ts b/src/vs/workbench/parts/markers/browser/markersTreeController.ts index 0177d32592098..9b420131e3cdc 100644 --- a/src/vs/workbench/parts/markers/browser/markersTreeController.ts +++ b/src/vs/workbench/parts/markers/browser/markersTreeController.ts @@ -13,7 +13,6 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IMenuService, IMenu, MenuId } from 'vs/platform/actions/common/actions'; import { IAction } from 'vs/base/common/actions'; -import { ResolvedKeybinding } from 'vs/base/common/keyCodes'; import { ActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; @@ -61,17 +60,13 @@ export class Controller extends treedefaults.DefaultController { }, getActionItem: (action) => { - const keybinding = this._keybindingFor(action); + const keybinding = this._keybindingService.lookupKeybinding(action.id); if (keybinding) { return new ActionItem(action, action, { label: true, keybinding: keybinding.getLabel() }); } return null; }, - getKeyBinding: (action): ResolvedKeybinding => { - return this._keybindingFor(action); - }, - onHide: (wasCancelled?: boolean) => { if (wasCancelled) { tree.DOMFocus(); @@ -94,8 +89,4 @@ export class Controller extends treedefaults.DefaultController { result.pop(); // remove last separator return result; } - - private _keybindingFor(action: IAction): ResolvedKeybinding { - return this._keybindingService.lookupKeybinding(action.id); - } } diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts index 16fedab362323..f0aa2694035e5 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditor.ts @@ -444,8 +444,7 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor this.createRemoveAction(e.element), this.createResetAction(e.element), new Separator(), - this.createShowConflictsAction(e.element)]), - getKeyBinding: (action) => this.keybindingsService.lookupKeybinding(action.id) + this.createShowConflictsAction(e.element)]) }); } } diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 4b5a29f34c4f8..78364b99abf90 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -12,7 +12,6 @@ import { IActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ITerminalService, ITerminalFont, TERMINAL_PANEL_ID } from 'vs/workbench/parts/terminal/common/terminal'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; @@ -40,7 +39,6 @@ export class TerminalPanel extends Panel { @IConfigurationService private _configurationService: IConfigurationService, @IContextMenuService private _contextMenuService: IContextMenuService, @IInstantiationService private _instantiationService: IInstantiationService, - @IKeybindingService private _keybindingService: IKeybindingService, @ITerminalService private _terminalService: ITerminalService, @IThemeService protected themeService: IThemeService, @ITelemetryService telemetryService: ITelemetryService @@ -190,8 +188,7 @@ export class TerminalPanel extends Panel { this._contextMenuService.showContextMenu({ getAnchor: () => anchor, getActions: () => TPromise.as(this._getContextMenuActions()), - getActionsContext: () => this._parentDomElement, - getKeyBinding: (action) => this._keybindingService.lookupKeybinding(action.id) + getActionsContext: () => this._parentDomElement }); } this._cancelContextMenu = false; diff --git a/src/vs/workbench/parts/update/electron-browser/update.contribution.ts b/src/vs/workbench/parts/update/electron-browser/update.contribution.ts index 26cc50dfe8e40..64bba795487ec 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.contribution.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.contribution.ts @@ -24,7 +24,7 @@ import { ShowCurrentReleaseNotesAction, ProductContribution, UpdateContribution, Registry.as(WorkbenchExtensions.Workbench) .registerWorkbenchContribution(ProductContribution); -if (product.quality === 'insider') { +if (product.quality !== 'stable') { Registry.as(GlobalActivityExtensions) .registerActivity(LightUpdateContribution); } else { diff --git a/src/vs/workbench/parts/update/electron-browser/update.ts b/src/vs/workbench/parts/update/electron-browser/update.ts index 4b8eff773df95..c68899b083050 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.ts @@ -279,6 +279,10 @@ export class UpdateContribution implements IWorkbenchContribution { export class LightUpdateContribution implements IGlobalActivity { + private static readonly showCommandsId = 'workbench.action.showCommands'; + private static readonly openSettingsId = 'workbench.action.openGlobalSettings'; + private static readonly openKeybindingsId = 'workbench.action.openGlobalKeybindings'; + get id() { return 'vs.update'; } get name() { return ''; } get cssClass() { return 'update-activity'; } @@ -302,10 +306,10 @@ export class LightUpdateContribution implements IGlobalActivity { getActions(): IAction[] { return [ - new Action('showCommandPalette', nls.localize('commandPalette', "Command Palette..."), undefined, true, () => this.commandService.executeCommand('workbench.action.showCommands')), + new Action(LightUpdateContribution.showCommandsId, nls.localize('commandPalette', "Command Palette..."), undefined, true, () => this.commandService.executeCommand(LightUpdateContribution.showCommandsId)), new Separator(), - new Action('openKeybindings', nls.localize('settings', "Settings"), null, true, () => this.commandService.executeCommand('workbench.action.openGlobalSettings')), - new Action('openSettings', nls.localize('keyboardShortcuts', "Keyboard Shortcuts"), null, true, () => this.commandService.executeCommand('workbench.action.openGlobalKeybindings')), + new Action(LightUpdateContribution.openSettingsId, nls.localize('settings', "Settings"), null, true, () => this.commandService.executeCommand(LightUpdateContribution.openSettingsId)), + new Action(LightUpdateContribution.openKeybindingsId, nls.localize('keyboardShortcuts', "Keyboard Shortcuts"), null, true, () => this.commandService.executeCommand(LightUpdateContribution.openKeybindingsId)), new Separator(), this.getUpdateAction() ]; diff --git a/src/vs/workbench/parts/views/browser/treeView.ts b/src/vs/workbench/parts/views/browser/treeView.ts index 957f7a6f9b219..cc6c4c38b4e42 100644 --- a/src/vs/workbench/parts/views/browser/treeView.ts +++ b/src/vs/workbench/parts/views/browser/treeView.ts @@ -25,7 +25,6 @@ import { createActionItem, fillInActions } from 'vs/platform/actions/browser/men import { IProgressService } from 'vs/platform/progress/common/progress'; import { ITree, IDataSource, IRenderer, ContextMenuEvent } from 'vs/base/parts/tree/browser/tree'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; -import { ResolvedKeybinding } from 'vs/base/common/keyCodes'; import { ActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { ViewsRegistry, ITreeViewDataProvider, IViewOptions, ITreeItem, TreeItemCollapsibleState } from 'vs/workbench/parts/views/browser/views'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; @@ -326,17 +325,13 @@ class TreeController extends DefaultController { }, getActionItem: (action) => { - const keybinding = this._keybindingFor(action); + const keybinding = this._keybindingService.lookupKeybinding(action.id); if (keybinding) { return new ActionItem(action, action, { label: true, keybinding: keybinding.getLabel() }); } return null; }, - getKeyBinding: (action): ResolvedKeybinding => { - return this._keybindingFor(action); - }, - onHide: (wasCancelled?: boolean) => { if (wasCancelled) { tree.DOMFocus(); @@ -350,10 +345,6 @@ class TreeController extends DefaultController { return true; } - - private _keybindingFor(action: IAction): ResolvedKeybinding { - return this._keybindingService.lookupKeybinding(action.id); - } } class MultipleSelectionActionRunner extends ActionRunner { diff --git a/src/vs/workbench/services/contextview/electron-browser/contextmenuService.ts b/src/vs/workbench/services/contextview/electron-browser/contextmenuService.ts index 0815aae6e3359..50e56ffac45c4 100644 --- a/src/vs/workbench/services/contextview/electron-browser/contextmenuService.ts +++ b/src/vs/workbench/services/contextview/electron-browser/contextmenuService.ts @@ -87,7 +87,7 @@ export class ContextMenuService implements IContextMenuService { } }; - const keybinding = !!delegate.getKeyBinding ? delegate.getKeyBinding(e) : undefined; + const keybinding = !!delegate.getKeyBinding ? delegate.getKeyBinding(e) : this.keybindingService.lookupKeybinding(e.id); if (keybinding) { const electronAccelerator = keybinding.getElectronAccelerator(); if (electronAccelerator) { From a336df99e34f266920f5f4cc677fde810f6b5003 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 29 May 2017 17:24:43 +0200 Subject: [PATCH 1275/2747] Shutdown glob pattern searching process after 1s of idle time --- src/vs/workbench/node/extensionHostMain.ts | 3 ++- src/vs/workbench/services/search/node/searchService.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index ae3bd6cb18bc6..fd41b0c29fe16 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -130,7 +130,8 @@ export class ExtensionHostMain { // `workspaceGlob` or something along those lines? if (p.indexOf('*') > -1 || p.indexOf('?') > -1) { if (!this._diskSearch) { - this._diskSearch = new DiskSearch(false); + // Shut down this search process after 1s + this._diskSearch = new DiskSearch(false, 1000); } const query: ISearchQuery = { diff --git a/src/vs/workbench/services/search/node/searchService.ts b/src/vs/workbench/services/search/node/searchService.ts index b1317d6b7cca6..1c2d62c29d14c 100644 --- a/src/vs/workbench/services/search/node/searchService.ts +++ b/src/vs/workbench/services/search/node/searchService.ts @@ -200,12 +200,12 @@ export class DiskSearch { private raw: IRawSearchService; - constructor(verboseLogging: boolean) { + constructor(verboseLogging: boolean, timeout: number = 60 * 60 * 1000) { const client = new Client( uri.parse(require.toUrl('bootstrap')).fsPath, { serverName: 'Search', - timeout: 60 * 60 * 1000, + timeout: timeout, args: ['--type=searchService'], env: { AMD_ENTRYPOINT: 'vs/workbench/services/search/node/searchApp', From 1fc69c89e7a31f0c6fcdf58c2c4a36c9b391fee4 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 29 May 2017 17:54:39 +0200 Subject: [PATCH 1276/2747] actionBarRegistry.ts => actions.ts --- src/vs/workbench/browser/{actionBarRegistry.ts => actions.ts} | 0 src/vs/workbench/browser/parts/compositePart.ts | 2 +- src/vs/workbench/browser/parts/editor/editor.contribution.ts | 2 +- src/vs/workbench/browser/parts/editor/titleControl.ts | 2 +- src/vs/workbench/browser/parts/panel/panelPart.ts | 2 +- src/vs/workbench/browser/parts/quickopen/quickOpenController.ts | 2 +- src/vs/workbench/browser/parts/sidebar/sidebarPart.ts | 2 +- src/vs/workbench/browser/viewlet.ts | 2 +- src/vs/workbench/electron-browser/workbench.ts | 2 +- src/vs/workbench/parts/debug/electron-browser/debugViews.ts | 2 +- .../parts/execution/electron-browser/terminal.contribution.ts | 2 +- .../workbench/parts/files/browser/fileActions.contribution.ts | 2 +- src/vs/workbench/parts/files/browser/views/explorerView.ts | 2 +- src/vs/workbench/parts/files/browser/views/explorerViewer.ts | 2 +- src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts | 2 +- src/vs/workbench/parts/markers/browser/markersPanel.ts | 2 +- src/vs/workbench/parts/search/browser/search.contribution.ts | 2 +- src/vs/workbench/parts/tasks/browser/quickOpen.ts | 2 +- .../workbench/parts/tasks/electron-browser/task.contribution.ts | 2 +- src/vs/workbench/test/browser/actionRegistry.test.ts | 2 +- 20 files changed, 19 insertions(+), 19 deletions(-) rename src/vs/workbench/browser/{actionBarRegistry.ts => actions.ts} (100%) diff --git a/src/vs/workbench/browser/actionBarRegistry.ts b/src/vs/workbench/browser/actions.ts similarity index 100% rename from src/vs/workbench/browser/actionBarRegistry.ts rename to src/vs/workbench/browser/actions.ts diff --git a/src/vs/workbench/browser/parts/compositePart.ts b/src/vs/workbench/browser/parts/compositePart.ts index 5c23e84ef0f0d..dea7bce19b3e7 100644 --- a/src/vs/workbench/browser/parts/compositePart.ts +++ b/src/vs/workbench/browser/parts/compositePart.ts @@ -20,7 +20,7 @@ import errors = require('vs/base/common/errors'); import { CONTEXT as ToolBarContext, ToolBar } from 'vs/base/browser/ui/toolbar/toolbar'; import { IActionItem, ActionsOrientation } from 'vs/base/browser/ui/actionbar/actionbar'; import { ProgressBar } from 'vs/base/browser/ui/progressbar/progressbar'; -import { IActionBarRegistry, Extensions, prepareActions } from 'vs/workbench/browser/actionBarRegistry'; +import { IActionBarRegistry, Extensions, prepareActions } from 'vs/workbench/browser/actions'; import { Action, IAction } from 'vs/base/common/actions'; import { Part, IPartOptions } from 'vs/workbench/browser/part'; import { Composite, CompositeRegistry } from 'vs/workbench/browser/composite'; diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts index e8a5d028fd331..7e8aa1bae2b9c 100644 --- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts +++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts @@ -23,7 +23,7 @@ import { ITextFileService } from 'vs/workbench/services/textfile/common/textfile import { BinaryResourceDiffEditor } from 'vs/workbench/browser/parts/editor/binaryDiffEditor'; import { ChangeEncodingAction, ChangeEOLAction, ChangeModeAction, EditorStatus } from 'vs/workbench/browser/parts/editor/editorStatus'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; -import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions, ActionBarContributor } from 'vs/workbench/browser/actionBarRegistry'; +import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions, ActionBarContributor } from 'vs/workbench/browser/actions'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; diff --git a/src/vs/workbench/browser/parts/editor/titleControl.ts b/src/vs/workbench/browser/parts/editor/titleControl.ts index acb5d5e3e26ab..12c13c861ed7d 100644 --- a/src/vs/workbench/browser/parts/editor/titleControl.ts +++ b/src/vs/workbench/browser/parts/editor/titleControl.ts @@ -8,7 +8,7 @@ import 'vs/css!./media/titlecontrol'; import nls = require('vs/nls'); import { Registry } from 'vs/platform/platform'; -import { Scope, IActionBarRegistry, Extensions, prepareActions } from 'vs/workbench/browser/actionBarRegistry'; +import { Scope, IActionBarRegistry, Extensions, prepareActions } from 'vs/workbench/browser/actions'; import { IAction, Action } from 'vs/base/common/actions'; import errors = require('vs/base/common/errors'); import DOM = require('vs/base/browser/dom'); diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index 33c4fabe88449..8f535d23acfb3 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -10,7 +10,7 @@ import { IAction } from 'vs/base/common/actions'; import Event from 'vs/base/common/event'; import { Builder, $ } from 'vs/base/browser/builder'; import { Registry } from 'vs/platform/platform'; -import { Scope } from 'vs/workbench/browser/actionBarRegistry'; +import { Scope } from 'vs/workbench/browser/actions'; import { IPanel } from 'vs/workbench/common/panel'; import { CompositePart, ICompositeTitleLabel } from 'vs/workbench/browser/parts/compositePart'; import { Panel, PanelRegistry, Extensions as PanelExtensions } from 'vs/workbench/browser/panel'; diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index 70ab133073225..32ef0a9c37a55 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -22,7 +22,7 @@ import { CancellationToken } from 'vs/base/common/cancellation'; import { Mode, IEntryRunContext, IAutoFocus, IQuickNavigateConfiguration, IModel } from 'vs/base/parts/quickopen/common/quickOpen'; import { QuickOpenEntry, QuickOpenModel, QuickOpenEntryGroup } from 'vs/base/parts/quickopen/browser/quickOpenModel'; import { QuickOpenWidget, HideReason } from 'vs/base/parts/quickopen/browser/quickOpenWidget'; -import { ContributableActionProvider } from 'vs/workbench/browser/actionBarRegistry'; +import { ContributableActionProvider } from 'vs/workbench/browser/actions'; import labels = require('vs/base/common/labels'); import paths = require('vs/base/common/paths'); import { ITextFileService, AutoSaveMode } from 'vs/workbench/services/textfile/common/textfiles'; diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index fa5d1156e363a..36f23b53283a7 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -15,7 +15,7 @@ import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IPartService, Parts, Position as SideBarPosition } from 'vs/workbench/services/part/common/partService'; import { IViewlet } from 'vs/workbench/common/viewlet'; -import { Scope } from 'vs/workbench/browser/actionBarRegistry'; +import { Scope } from 'vs/workbench/browser/actions'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IMessageService } from 'vs/platform/message/common/message'; diff --git a/src/vs/workbench/browser/viewlet.ts b/src/vs/workbench/browser/viewlet.ts index 0403d96aa35b2..5f153eee59cbe 100644 --- a/src/vs/workbench/browser/viewlet.ts +++ b/src/vs/workbench/browser/viewlet.ts @@ -12,7 +12,7 @@ import { Dimension, Builder, $ } from 'vs/base/browser/builder'; import { IAction, IActionRunner, Action } from 'vs/base/common/actions'; import { IActionItem, ActionsOrientation } from 'vs/base/browser/ui/actionbar/actionbar'; import { ITree, IFocusEvent, ISelectionEvent } from 'vs/base/parts/tree/browser/tree'; -import { prepareActions } from 'vs/workbench/browser/actionBarRegistry'; +import { prepareActions } from 'vs/workbench/browser/actions'; import { ToolBar } from 'vs/base/browser/ui/toolbar/toolbar'; import { DelayedDragHandler } from 'vs/base/browser/dnd'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 5a2a8efaff789..b8c52c3c98468 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -36,7 +36,7 @@ import { PanelPart } from 'vs/workbench/browser/parts/panel/panelPart'; import { StatusbarPart } from 'vs/workbench/browser/parts/statusbar/statusbarPart'; import { TitlebarPart } from 'vs/workbench/browser/parts/titlebar/titlebarPart'; import { WorkbenchLayout } from 'vs/workbench/browser/layout'; -import { IActionBarRegistry, Extensions as ActionBarExtensions } from 'vs/workbench/browser/actionBarRegistry'; +import { IActionBarRegistry, Extensions as ActionBarExtensions } from 'vs/workbench/browser/actions'; import { PanelRegistry, Extensions as PanelExtensions } from 'vs/workbench/browser/panel'; import { QuickOpenController } from 'vs/workbench/browser/parts/quickopen/quickOpenController'; import { getServices } from 'vs/platform/instantiation/common/extensions'; diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts index 3d4d2f1838b68..f70b82840e57b 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts @@ -12,7 +12,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import * as errors from 'vs/base/common/errors'; import { EventType } from 'vs/base/common/events'; import { IActionRunner, IAction } from 'vs/base/common/actions'; -import { prepareActions } from 'vs/workbench/browser/actionBarRegistry'; +import { prepareActions } from 'vs/workbench/browser/actions'; import { IHighlightEvent, ITree } from 'vs/base/parts/tree/browser/tree'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { CollapsibleState } from 'vs/base/browser/ui/splitview/splitview'; diff --git a/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.ts index c7b09a28e16c7..d191c41542658 100644 --- a/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.ts @@ -11,7 +11,7 @@ import baseplatform = require('vs/base/common/platform'); import { IAction, Action } from 'vs/base/common/actions'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; import paths = require('vs/base/common/paths'); -import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions, ActionBarContributor } from 'vs/workbench/browser/actionBarRegistry'; +import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions, ActionBarContributor } from 'vs/workbench/browser/actions'; import uri from 'vs/base/common/uri'; import { explorerItemToFileResource } from 'vs/workbench/parts/files/common/files'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; diff --git a/src/vs/workbench/parts/files/browser/fileActions.contribution.ts b/src/vs/workbench/parts/files/browser/fileActions.contribution.ts index 7c3bd0125d2d2..6f04409b592b7 100644 --- a/src/vs/workbench/parts/files/browser/fileActions.contribution.ts +++ b/src/vs/workbench/parts/files/browser/fileActions.contribution.ts @@ -9,7 +9,7 @@ import { Registry } from 'vs/platform/platform'; import { Action, IAction } from 'vs/base/common/actions'; import { isMacintosh } from 'vs/base/common/platform'; import { ActionItem, BaseActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; -import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions, ActionBarContributor } from 'vs/workbench/browser/actionBarRegistry'; +import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions, ActionBarContributor } from 'vs/workbench/browser/actions'; import { GlobalNewUntitledFileAction, SaveFileAsAction, OpenFileAction, ShowOpenedFileInNewWindow, CopyPathAction, GlobalCopyPathAction, RevealInOSAction, GlobalRevealInOSAction, pasteIntoFocusedFilesExplorerViewItem, FocusOpenEditorsView, FocusFilesExplorer, GlobalCompareResourcesAction, GlobalNewFileAction, GlobalNewFolderAction, RevertFileAction, SaveFilesAction, SaveAllAction, SaveFileAction, MoveFileToTrashAction, TriggerRenameFileAction, PasteFileAction, CopyFileAction, SelectResourceForCompareAction, CompareResourcesAction, NewFolderAction, NewFileAction, OpenToSideAction, ShowActiveFileInExplorer, CollapseExplorerView, RefreshExplorerView } from 'vs/workbench/parts/files/browser/fileActions'; import { revertLocalChangesCommand, acceptLocalChangesCommand, CONFLICT_RESOLUTION_CONTEXT } from 'vs/workbench/parts/files/browser/saveErrorHandler'; import { SyncActionDescriptor, MenuId, MenuRegistry } from 'vs/platform/actions/common/actions'; diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index 5895751dd8b3b..cad31f52e9fc8 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -13,7 +13,7 @@ import errors = require('vs/base/common/errors'); import labels = require('vs/base/common/labels'); import paths = require('vs/base/common/paths'); import { Action, IAction } from 'vs/base/common/actions'; -import { prepareActions } from 'vs/workbench/browser/actionBarRegistry'; +import { prepareActions } from 'vs/workbench/browser/actions'; import { ITree } from 'vs/base/parts/tree/browser/tree'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { IFilesConfiguration, ExplorerFolderContext, FilesExplorerFocussedContext, ExplorerFocussedContext } from 'vs/workbench/parts/files/common/files'; diff --git a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts index ec485a2d39143..95f1dc2599cf1 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts @@ -22,7 +22,7 @@ import { isMacintosh, isLinux } from 'vs/base/common/platform'; import glob = require('vs/base/common/glob'); import { FileLabel, IFileLabelOptions } from 'vs/workbench/browser/labels'; import { IDisposable } from 'vs/base/common/lifecycle'; -import { ContributableActionProvider } from 'vs/workbench/browser/actionBarRegistry'; +import { ContributableActionProvider } from 'vs/workbench/browser/actions'; import { IFilesConfiguration } from 'vs/workbench/parts/files/common/files'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IFileOperationResult, FileOperationResult, IFileService, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts b/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts index 0985b01da568c..f275bfd30a52e 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts @@ -23,7 +23,7 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IEditorGroup, IEditorStacksModel } from 'vs/workbench/common/editor'; import { OpenEditor } from 'vs/workbench/parts/files/common/explorerViewModel'; -import { ContributableActionProvider } from 'vs/workbench/browser/actionBarRegistry'; +import { ContributableActionProvider } from 'vs/workbench/browser/actions'; import { explorerItemToFileResource } from 'vs/workbench/parts/files/common/files'; import { ITextFileService, AutoSaveMode } from 'vs/workbench/services/textfile/common/textfiles'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; diff --git a/src/vs/workbench/parts/markers/browser/markersPanel.ts b/src/vs/workbench/parts/markers/browser/markersPanel.ts index 615851f727f0e..f771f5dcaf903 100644 --- a/src/vs/workbench/parts/markers/browser/markersPanel.ts +++ b/src/vs/workbench/parts/markers/browser/markersPanel.ts @@ -32,7 +32,7 @@ import { CollapseAllAction, FilterAction, FilterInputBoxActionItem } from 'vs/wo import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import Messages from 'vs/workbench/parts/markers/common/messages'; import { RangeHighlightDecorations } from 'vs/workbench/common/editor/rangeDecorations'; -import { ContributableActionProvider } from 'vs/workbench/browser/actionBarRegistry'; +import { ContributableActionProvider } from 'vs/workbench/browser/actions'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IListService } from 'vs/platform/list/browser/listService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; diff --git a/src/vs/workbench/parts/search/browser/search.contribution.ts b/src/vs/workbench/parts/search/browser/search.contribution.ts index 9cede51de89ee..a03f6572e09ec 100644 --- a/src/vs/workbench/parts/search/browser/search.contribution.ts +++ b/src/vs/workbench/parts/search/browser/search.contribution.ts @@ -15,7 +15,7 @@ import { IAction } from 'vs/base/common/actions'; import { explorerItemToFileResource } from 'vs/workbench/parts/files/common/files'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { Separator } from 'vs/base/browser/ui/actionbar/actionbar'; -import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions, ActionBarContributor } from 'vs/workbench/browser/actionBarRegistry'; +import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions, ActionBarContributor } from 'vs/workbench/browser/actions'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; import { QuickOpenHandlerDescriptor, IQuickOpenRegistry, Extensions as QuickOpenExtensions, QuickOpenAction } from 'vs/workbench/browser/quickopen'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; diff --git a/src/vs/workbench/parts/tasks/browser/quickOpen.ts b/src/vs/workbench/parts/tasks/browser/quickOpen.ts index 6f82d0482705b..e4208bafd3a2e 100644 --- a/src/vs/workbench/parts/tasks/browser/quickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/quickOpen.ts @@ -15,7 +15,7 @@ import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { Task, TaskSourceKind, computeLabel } from 'vs/workbench/parts/tasks/common/tasks'; import { ITaskService } from 'vs/workbench/parts/tasks/common/taskService'; -import { ActionBarContributor, ContributableActionProvider } from 'vs/workbench/browser/actionBarRegistry'; +import { ActionBarContributor, ContributableActionProvider } from 'vs/workbench/browser/actions'; export class TaskEntry extends Model.QuickOpenEntry { diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 411e04c6df50b..c588787f5e706 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -66,7 +66,7 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IOutputService, IOutputChannelRegistry, Extensions as OutputExt, IOutputChannel } from 'vs/workbench/parts/output/common/output'; -import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions } from 'vs/workbench/browser/actionBarRegistry'; +import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions } from 'vs/workbench/browser/actions'; import { ITerminalService } from 'vs/workbench/parts/terminal/common/terminal'; diff --git a/src/vs/workbench/test/browser/actionRegistry.test.ts b/src/vs/workbench/test/browser/actionRegistry.test.ts index 8fe4f7c8dd82d..e9605ceacf6aa 100644 --- a/src/vs/workbench/test/browser/actionRegistry.test.ts +++ b/src/vs/workbench/test/browser/actionRegistry.test.ts @@ -10,7 +10,7 @@ import * as Platform from 'vs/platform/platform'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { Extensions, IWorkbenchActionRegistry } from 'vs/workbench/common/actionRegistry'; -import { prepareActions } from 'vs/workbench/browser/actionBarRegistry'; +import { prepareActions } from 'vs/workbench/browser/actions'; import { Action } from 'vs/base/common/actions'; From 7ad4a225a2bd04e04bd8645568ee52f6e10f48f7 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 29 May 2017 18:18:04 +0200 Subject: [PATCH 1277/2747] :lipstick: global action --- .../parts/activitybar/activitybarActions.ts | 125 ++++++++++++------ .../parts/activitybar/activitybarPart.ts | 50 ++----- 2 files changed, 90 insertions(+), 85 deletions(-) diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts index 287ad54470dad..08a7aea55c403 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts @@ -20,28 +20,34 @@ import { ICommandService } from 'vs/platform/commands/common/commands'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ViewletDescriptor } from 'vs/workbench/browser/viewlet'; -import { IActivity } from 'vs/workbench/browser/activity'; +import { IActivity, IGlobalActivity } from 'vs/workbench/browser/activity'; import { dispose } from 'vs/base/common/lifecycle'; import { IViewletService, } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IPartService, Parts } from 'vs/workbench/services/part/common/partService'; import { IThemeService, ITheme, registerThemingParticipant, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; import { ACTIVITY_BAR_BADGE_FOREGROUND, ACTIVITY_BAR_BADGE_BACKGROUND, ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND, ACTIVITY_BAR_FOREGROUND } from 'vs/workbench/common/theme'; import { contrastBorder, activeContrastBorder, focusBorder } from 'vs/platform/theme/common/colorRegistry'; +import { StandardMouseEvent } from "vs/base/browser/mouseEvent"; + +export interface IViewletActivity { + badge: IBadge; + clazz: string; +} export class ActivityAction extends Action { private badge: IBadge; private _onDidChangeBadge = new Emitter(); - get activity(): IActivity { - return this._activity; - } - constructor(private _activity: IActivity) { super(_activity.id, _activity.name, _activity.cssClass); this.badge = null; } + public get activity(): IActivity { + return this._activity; + } + public get onDidChangeBadge(): Event { return this._onDidChangeBadge.event; } @@ -108,14 +114,12 @@ export class ViewletActivityAction extends ActivityAction { } export class ActivityActionItem extends BaseActionItem { - + protected $container: Builder; protected $label: Builder; protected $badge: Builder; - private $badgeContent: Builder; - protected get activity(): IActivity { - return (this._action as ActivityAction).activity; - } + private $badgeContent: Builder; + private mouseUpTimeout: number; constructor( action: ActivityAction, @@ -128,6 +132,10 @@ export class ActivityActionItem extends BaseActionItem { action.onDidChangeBadge(this.handleBadgeChangeEvenet, this, this._callOnDispose); } + protected get activity(): IActivity { + return (this._action as ActivityAction).activity; + } + protected updateStyles(): void { const theme = this.themeService.getTheme(); @@ -156,7 +164,27 @@ export class ActivityActionItem extends BaseActionItem { public render(container: HTMLElement): void { super.render(container); - container.title = this.activity.name; + // Make the container tab-able for keyboard navigation + this.$container = $(container).attr({ + tabIndex: '0', + role: 'button', + title: this.activity.name + }); + + // Try hard to prevent keyboard only focus feedback when using mouse + this.$container.on(DOM.EventType.MOUSE_DOWN, () => { + this.$container.addClass('clicked'); + }); + + this.$container.on(DOM.EventType.MOUSE_UP, () => { + if (this.mouseUpTimeout) { + clearTimeout(this.mouseUpTimeout); + } + + this.mouseUpTimeout = setTimeout(() => { + this.$container.removeClass('clicked'); + }, 800); // delayed to prevent focus feedback from showing on mouse up + }); // Label this.$label = $('a.action-label').appendTo(this.builder); @@ -224,6 +252,11 @@ export class ActivityActionItem extends BaseActionItem { public dispose(): void { super.dispose(); + + if (this.mouseUpTimeout) { + clearTimeout(this.mouseUpTimeout); + } + this.$badge.destroy(); } } @@ -234,14 +267,8 @@ export class ViewletActionItem extends ActivityActionItem { private static toggleViewletPinnedAction: ToggleViewletPinnedAction; private static draggedViewlet: ViewletDescriptor; - private $container: Builder; private _keybinding: string; private cssClass: string; - private mouseUpTimeout: number; - - private get viewlet(): ViewletDescriptor { - return this.action.activity as ViewletDescriptor; - } constructor( private action: ViewletActivityAction, @@ -265,6 +292,10 @@ export class ViewletActionItem extends ActivityActionItem { } } + private get viewlet(): ViewletDescriptor { + return this.action.activity as ViewletDescriptor; + } + private getKeybindingLabel(id: string): string { const kb = this.keybindingService.lookupKeybinding(id); if (kb) { @@ -277,27 +308,6 @@ export class ViewletActionItem extends ActivityActionItem { public render(container: HTMLElement): void { super.render(container); - // Make the container tab-able for keyboard navigation - this.$container = $(container).attr({ - tabIndex: '0', - role: 'button' - }); - - // Try hard to prevent keyboard only focus feedback when using mouse - this.$container.on(DOM.EventType.MOUSE_DOWN, () => { - this.$container.addClass('clicked'); - }); - - this.$container.on(DOM.EventType.MOUSE_UP, () => { - if (this.mouseUpTimeout) { - clearTimeout(this.mouseUpTimeout); - } - - this.mouseUpTimeout = setTimeout(() => { - this.$container.removeClass('clicked'); - }, 800); // delayed to prevent focus feedback from showing on mouse up - }); - this.$container.on('contextmenu', e => { DOM.EventHelper.stop(e, true); @@ -465,10 +475,6 @@ export class ViewletActionItem extends ActivityActionItem { ViewletActionItem.clearDraggedViewlet(); - if (this.mouseUpTimeout) { - clearTimeout(this.mouseUpTimeout); - } - this.$label.destroy(); } } @@ -493,7 +499,6 @@ export class ViewletOverflowActivityAction extends ActivityAction { } export class ViewletOverflowActivityActionItem extends ActivityActionItem { - private name: string; private cssClass: string; private actions: OpenViewletAction[]; @@ -647,6 +652,40 @@ export class ToggleViewletPinnedAction extends Action { } } +export class GlobalActivityAction extends ActivityAction { + + constructor(activity: IGlobalActivity) { + super(activity); + } +} + +export class GlobalActivityActionItem extends ActivityActionItem { + + constructor( + action: GlobalActivityAction, + @IThemeService themeService: IThemeService, + @IContextMenuService protected contextMenuService: IContextMenuService + ) { + super(action, { draggable: false }, themeService); + } + + public onClick(e: MouseEvent): void { + const globalAction = this._action as GlobalActivityAction; + const activity = globalAction.activity as IGlobalActivity; + const actions = activity.getActions(); + + const event = new StandardMouseEvent(e); + event.stopPropagation(); + event.preventDefault(); + + this.contextMenuService.showContextMenu({ + getAnchor: () => ({ x: event.posx, y: event.posy }), + getActions: () => TPromise.as(actions), + onHide: () => dispose(actions) + }); + } +} + registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { // Styling with Outline color (e.g. high contrast theme) diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index 4e773ecab3898..75f4d49aa7056 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -15,11 +15,11 @@ import { Builder, $, Dimension } from 'vs/base/browser/builder'; import { Action } from 'vs/base/common/actions'; import { ActionsOrientation, ActionBar, IActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { ViewletDescriptor } from 'vs/workbench/browser/viewlet'; -import { IGlobalActivity, GlobalActivityExtensions, IGlobalActivityRegistry } from 'vs/workbench/browser/activity'; +import { GlobalActivityExtensions, IGlobalActivityRegistry } from 'vs/workbench/browser/activity'; import { Registry } from 'vs/platform/platform'; import { Part } from 'vs/workbench/browser/part'; import { IViewlet } from 'vs/workbench/common/viewlet'; -import { ToggleViewletPinnedAction, ViewletActivityAction, ActivityAction, ActivityActionItem, ViewletActionItem, ViewletOverflowActivityAction, ViewletOverflowActivityActionItem } from 'vs/workbench/browser/parts/activitybar/activitybarActions'; +import { ToggleViewletPinnedAction, ViewletActivityAction, ActivityAction, GlobalActivityActionItem, ViewletActionItem, ViewletOverflowActivityAction, ViewletOverflowActivityActionItem, GlobalActivityAction, IViewletActivity } from 'vs/workbench/browser/parts/activitybar/activitybarActions'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IActivityBarService, IBadge } from 'vs/workbench/services/activity/common/activityBarService'; import { IPartService, Position as SideBarPosition } from 'vs/workbench/services/part/common/partService'; @@ -35,45 +35,6 @@ import { IThemeService } from 'vs/platform/theme/common/themeService'; import { ACTIVITY_BAR_BACKGROUND, ACTIVITY_BAR_BORDER } from 'vs/workbench/common/theme'; import { contrastBorder } from 'vs/platform/theme/common/colorRegistry'; -interface IViewletActivity { - badge: IBadge; - clazz: string; -} - -class GlobalActivityAction extends ActivityAction { - - constructor(activity: IGlobalActivity) { - super(activity); - } -} - -class GlobalActivityActionItem extends ActivityActionItem { - - constructor( - action: GlobalActivityAction, - @IThemeService themeService: IThemeService, - @IContextMenuService protected contextMenuService: IContextMenuService - ) { - super(action, { draggable: false }, themeService); - } - - onClick(e: MouseEvent): void { - const globalAction = this._action as GlobalActivityAction; - const activity = globalAction.activity as IGlobalActivity; - const actions = activity.getActions(); - - const event = new StandardMouseEvent(e); - event.stopPropagation(); - event.preventDefault(); - - this.contextMenuService.showContextMenu({ - getAnchor: () => ({ x: event.posx, y: event.posy }), - getActions: () => TPromise.as(actions), - onHide: () => dispose(actions) - }); - } -} - export class ActivitybarPart extends Part implements IActivityBarService { private static readonly ACTIVITY_ACTION_HEIGHT = 50; @@ -170,12 +131,12 @@ export class ActivitybarPart extends Part implements IActivityBarService { } const action = this.globalActivityIdToActions[globalActivityId]; - if (!action) { throw illegalArgument('globalActivityId'); } action.setBadge(badge); + return toDisposable(() => action.setBadge(undefined)); } @@ -574,6 +535,11 @@ export class ActivitybarPart extends Part implements IActivityBarService { this.viewletSwitcherBar = null; } + if (this.globalActionBar) { + this.globalActionBar.dispose(); + this.globalActionBar = null; + } + super.dispose(); } From 2d74e461808de1cd10e62dc550108dbb004daf12 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 29 May 2017 18:33:45 +0200 Subject: [PATCH 1278/2747] #26948 Provide none collapsible state --- src/vs/vscode.proposed.d.ts | 5 ++++- src/vs/workbench/parts/views/browser/views.ts | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index cf0218df999bc..a8877a7c25cff 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -71,7 +71,6 @@ declare module 'vscode' { /** * Collapsible state of the tree item. - * Required only when item has children. */ readonly collapsibleState?: TreeItemCollapsibleState; } @@ -80,6 +79,10 @@ declare module 'vscode' { * Collapsible state of the tree item */ export enum TreeItemCollapsibleState { + /** + * Determines an item can be neither collapsed nor expanded. Implies it has no children. + */ + None = 0, /** * Determines an item is collapsed */ diff --git a/src/vs/workbench/parts/views/browser/views.ts b/src/vs/workbench/parts/views/browser/views.ts index 927059f197757..d313003efc2a8 100644 --- a/src/vs/workbench/parts/views/browser/views.ts +++ b/src/vs/workbench/parts/views/browser/views.ts @@ -21,6 +21,7 @@ export class ViewLocation { } export enum TreeItemCollapsibleState { + None = 0, Collapsed = 1, Expanded = 2 } @@ -48,7 +49,7 @@ export interface IViewDescriptor { readonly ctor: IViewConstructorSignature; readonly order?: number; - + } export interface ITreeItem { From 2ef3274358b105209b905a644ad7739cf647499e Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 29 May 2017 18:52:09 +0200 Subject: [PATCH 1279/2747] Documentation for context value in tree item --- src/vs/vscode.proposed.d.ts | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index a8877a7c25cff..aac77423afe83 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -49,7 +49,7 @@ declare module 'vscode' { export interface TreeItem { /** - * Label of the tree item + * A human-readable string describing this item */ readonly label: string; @@ -60,19 +60,34 @@ declare module 'vscode' { /** * The [command](#Command) which should be run when the tree item - * is open in the Source Control viewlet. + * is selected */ readonly command?: Command; /** - * Context value of the tree node + * [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. */ - readonly contextValue?: string; + readonly collapsibleState?: TreeItemCollapsibleState; /** - * Collapsible state of the tree item. + * Context value of the tree item. This can be used to contribute item specific actions in the tree. + * For example, a tree item is given a context value as `folder`. When contribution actions to `view/item/context` + * using `menus` extension point, you can specify context value for key `viewItem` in `when` expression like `viewItem == folder`. + * ``` + * "contributes": { + "menus": { + "view/item/context": [ + { + "command": "extension.deleteFolder", + "when": "viewItem == folder" + } + ] + } + } + * ``` + * This will show action `extension.deleteFolder` only for items with `contextValue` is `folder`. */ - readonly collapsibleState?: TreeItemCollapsibleState; + readonly contextValue?: string; } /** From b4918a7c12e3b9d5b7ad8d4f8168a04c587932c7 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 29 May 2017 18:54:16 +0200 Subject: [PATCH 1280/2747] Fix indentation for example --- src/vs/vscode.proposed.d.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index aac77423afe83..b91a09540506d 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -75,15 +75,15 @@ declare module 'vscode' { * using `menus` extension point, you can specify context value for key `viewItem` in `when` expression like `viewItem == folder`. * ``` * "contributes": { - "menus": { - "view/item/context": [ - { - "command": "extension.deleteFolder", - "when": "viewItem == folder" - } - ] - } - } + * "menus": { + * "view/item/context": [ + * { + * "command": "extension.deleteFolder", + * "when": "viewItem == folder" + * } + * ] + * } + * } * ``` * This will show action `extension.deleteFolder` only for items with `contextValue` is `folder`. */ From 09d2e426196bf64a3b7e4ac78432ac6fe19b4596 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 29 May 2017 19:00:05 +0200 Subject: [PATCH 1281/2747] #26948 Update the doc for view data provider in API --- src/vs/vscode.proposed.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index b91a09540506d..2d7b21802c965 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -14,8 +14,8 @@ declare module 'vscode' { export namespace window { /** - * Register a [TreeDataProvider](#TreeDataProvider) for the registered view `id`. - * @param viewId View id. + * Register a [TreeDataProvider](#TreeDataProvider) for the view contributed using the extension point `views`. + * @param viewId Id of the view contributed using the extension point `views`. * @param treeDataProvider A [TreeDataProvider](#TreeDataProvider) that provides tree data for the view */ export function registerTreeDataProviderForView(viewId: string, treeDataProvider: TreeDataProvider): Disposable; From 9ae89e33030cf232025ede977ca0212c64b8aa55 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 29 May 2017 19:01:14 +0200 Subject: [PATCH 1282/2747] #26948 Fix the TreeItemCollapsibleState ext host type --- src/vs/workbench/api/node/extHostTypes.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index 2912a30ef4251..7548f24f051f4 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1276,6 +1276,7 @@ export enum ProgressLocation { } export enum TreeItemCollapsibleState { + None = 0, Collapsed = 1, Expanded = 2 } From 778c0309390951bc22f1b252265d3fbf30ee1f29 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 29 May 2017 19:23:06 +0200 Subject: [PATCH 1283/2747] format hygiene --- src/vs/workbench/parts/views/browser/views.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/views/browser/views.ts b/src/vs/workbench/parts/views/browser/views.ts index d313003efc2a8..d5a69e9827dc1 100644 --- a/src/vs/workbench/parts/views/browser/views.ts +++ b/src/vs/workbench/parts/views/browser/views.ts @@ -49,7 +49,7 @@ export interface IViewDescriptor { readonly ctor: IViewConstructorSignature; readonly order?: number; - + } export interface ITreeItem { From bc2546f0ac017de1d7238e740f88de4c3967e22c Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 29 May 2017 19:49:11 +0200 Subject: [PATCH 1284/2747] #26948 Update documentation --- src/vs/platform/extensions/common/extensionsRegistry.ts | 2 +- src/vs/workbench/parts/views/browser/treeView.ts | 2 +- src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/platform/extensions/common/extensionsRegistry.ts b/src/vs/platform/extensions/common/extensionsRegistry.ts index 9c7b05edb71fc..7edf4f74960f1 100644 --- a/src/vs/platform/extensions/common/extensionsRegistry.ts +++ b/src/vs/platform/extensions/common/extensionsRegistry.ts @@ -182,7 +182,7 @@ const schema: IJSONSchema = { type: 'array', items: { type: 'string', - defaultSnippets: [{ label: 'onLanguage', body: 'onLanguage:${1:languageId}' }, { label: 'onCommand', body: 'onCommand:${2:commandId}' }, { label: 'onDebug', body: 'onDebug:${3:type}' }, { label: 'workspaceContains', body: 'workspaceContains:${4:fileName}' }], + defaultSnippets: [{ label: 'onLanguage', body: 'onLanguage:${1:languageId}' }, { label: 'onCommand', body: 'onCommand:${2:commandId}' }, { label: 'onDebug', body: 'onDebug:${3:type}' }, { label: 'workspaceContains', body: 'workspaceContains:${4:fileName}' }, { label: 'onView', body: 'onView:${5:viewId}' }], } }, badges: { diff --git a/src/vs/workbench/parts/views/browser/treeView.ts b/src/vs/workbench/parts/views/browser/treeView.ts index cc6c4c38b4e42..d642e54a3a74b 100644 --- a/src/vs/workbench/parts/views/browser/treeView.ts +++ b/src/vs/workbench/parts/views/browser/treeView.ts @@ -421,7 +421,7 @@ class Menus implements IDisposable { } getResourceContextActions(element: ITreeItem): IAction[] { - return this.getActions(MenuId.ViewItemContext, { key: 'item', value: element.contextValue }).secondary; + return this.getActions(MenuId.ViewItemContext, { key: 'viewItem', value: element.contextValue }).secondary; } private getActions(menuId: MenuId, context: { key: string, value: string }): { primary: IAction[]; secondary: IAction[]; } { diff --git a/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts b/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts index da935449c647a..e7cc066c06a21 100644 --- a/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts +++ b/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts @@ -51,7 +51,7 @@ namespace schema { type: 'object', properties: { id: { - description: localize('vscode.extension.contributes.view.id', 'Identifier of the view. Use the same identifier to register a data provider through API.'), + description: localize('vscode.extension.contributes.view.id', 'Identifier of the view. Use this to register a data provider through `vscode.window.registerTreeDataProviderForView` API. Also to trigger activating your extension by registering `onView:${id}` event to `activationEvents`.'), type: 'string' }, name: { @@ -66,7 +66,7 @@ namespace schema { type: 'object', properties: { 'explorer': { - description: localize('views.explorer', "Explorer"), + description: localize('views.explorer', "Explorer View"), type: 'array', items: viewDescriptor } From c44eec97a1e5697936bfa5cab69f6718262f7963 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 29 May 2017 19:51:50 +0200 Subject: [PATCH 1285/2747] #26948 Update doc --- src/vs/vscode.proposed.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 2d7b21802c965..f571826403c3c 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -60,7 +60,7 @@ declare module 'vscode' { /** * The [command](#Command) which should be run when the tree item - * is selected + * is selected. This command is called with the model representing this item as first argument. */ readonly command?: Command; From 862ea061a60647817ed39ab8427788d679f1779e Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 29 May 2017 20:32:43 +0200 Subject: [PATCH 1286/2747] #26948 document view locations in menu entry contributions --- .../actions/electron-browser/menusExtensionPoint.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/vs/platform/actions/electron-browser/menusExtensionPoint.ts b/src/vs/platform/actions/electron-browser/menusExtensionPoint.ts index a9a61d92d571b..0e9b8d4f0040b 100644 --- a/src/vs/platform/actions/electron-browser/menusExtensionPoint.ts +++ b/src/vs/platform/actions/electron-browser/menusExtensionPoint.ts @@ -143,6 +143,16 @@ namespace schema { description: localize('menus.resourceStateContext', "The Source Control resource state context menu"), type: 'array', items: menuItem + }, + 'view/title': { + description: localize('view.viewTitle', "The contributed view title menu"), + type: 'array', + items: menuItem + }, + 'view/item/context': { + description: localize('view.itemContext', "The contributed view item context menu"), + type: 'array', + items: menuItem } } }; From 212e44d89e2000d503c699a0dd45ab05c1429bf2 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 29 May 2017 22:18:54 +0200 Subject: [PATCH 1287/2747] Minor tweaks to how annotation tasks are merged. --- .../workbench/parts/tasks/common/taskConfiguration.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts index a7ccb15f65ee9..862419a7fea80 100644 --- a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts @@ -835,11 +835,12 @@ namespace TaskDescription { if (problemMatchers) { task.problemMatchers = problemMatchers; } - mergeGlobals(task, globals); if (context.isTermnial && isAnnotating(task)) { + mergeGlobalsIntoAnnnotation(task, globals); annotatingTasks.push(task); return; } + mergeGlobals(task, globals); fillDefaults(task); let addTask: boolean = true; if (context.isTermnial && task.command && task.command.name && task.command.type === Tasks.CommandType.Shell && task.command.args && task.command.args.length > 0) { @@ -886,7 +887,10 @@ namespace TaskDescription { } else if (defaultTestTask.rank > -1 && defaultTestTask.rank < 2) { defaultTestTask.task.group = Tasks.TaskGroup.Test; } - return parsedTasks.length === 0 && annotatingTasks.length === 0 ? undefined : { tasks: parsedTasks, annotatingTasks: annotatingTasks }; + return { + tasks: parsedTasks.length > 0 ? parsedTasks : undefined, + annotatingTasks: annotatingTasks.length > 0 ? annotatingTasks : undefined + }; } export function mergeTasks(target: Tasks.Task[], source: Tasks.Task[]): Tasks.Task[] { @@ -942,6 +946,9 @@ namespace TaskDescription { } } + export function mergeGlobalsIntoAnnnotation(task: Tasks.Task, globals: Globals): void { + } + export function fillDefaults(task: Tasks.Task): void { CommandConfiguration.fillDefaults(task.command); if (task.args === void 0 && task.command === void 0) { From c2a17a7929259d3d2643cb3f98478e994a39605b Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 29 May 2017 23:09:07 +0200 Subject: [PATCH 1288/2747] Make dependsOn work with labels --- .../electron-browser/task.contribution.ts | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index c588787f5e706..540ff68d8ca64 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -686,7 +686,7 @@ class TaskService extends EventEmitter implements ITaskService { toExecute = resolver.resolve(task); } else { requested = task.name; - toExecute = resolver.resolve(task._id); + toExecute = task; } if (!toExecute) { throw new TaskError(Severity.Info, nls.localize('TaskServer.noTask', 'Requested task {0} to execute not found.', requested), TaskErrors.TaskNotFound); @@ -738,6 +738,7 @@ class TaskService extends EventEmitter implements ITaskService { private createRunnableTask(sets: TaskSet[], group: TaskGroup): { task: Task; resolver: ITaskResolver } { let uuidMap: IStringDictionary = Object.create(null); + let labelMap: IStringDictionary = Object.create(null); let identifierMap: IStringDictionary = Object.create(null); let workspaceTasks: Task[] = []; @@ -745,6 +746,7 @@ class TaskService extends EventEmitter implements ITaskService { sets.forEach((set) => { set.tasks.forEach((task) => { uuidMap[task._id] = task; + labelMap[computeTaskLabel(task)] = task; identifierMap[task.identifier] = task; if (group && task.group === group) { if (task._source.kind === TaskSourceKind.Workspace) { @@ -757,11 +759,7 @@ class TaskService extends EventEmitter implements ITaskService { }); let resolver: ITaskResolver = { resolve: (id: string) => { - let result = uuidMap[id]; - if (result) { - return result; - } - return identifierMap[id]; + return uuidMap[id] || labelMap[id] || identifierMap[id]; } }; if (workspaceTasks.length > 0) { @@ -791,22 +789,18 @@ class TaskService extends EventEmitter implements ITaskService { } private createResolver(sets: TaskSet[]): ITaskResolver { - let uuidMap: IStringDictionary = Object.create(null); + let labelMap: IStringDictionary = Object.create(null); let identifierMap: IStringDictionary = Object.create(null); sets.forEach((set) => { set.tasks.forEach((task) => { - uuidMap[task._id] = task; + labelMap[computeTaskLabel(task)] = task; identifierMap[task.identifier] = task; }); }); return { resolve: (id: string) => { - let result = uuidMap[id]; - if (result) { - return result; - } - return identifierMap[id]; + return labelMap[id] || identifierMap[id]; } }; } From b608ce126fbbf54ee35ef624288246b29f8cb063 Mon Sep 17 00:00:00 2001 From: Jeremy Loy Date: Mon, 29 May 2017 23:10:50 -0400 Subject: [PATCH 1289/2747] Added darwinHelpBook and darwinHelpName to build process for MacOS --- build/gulpfile.vscode.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index e73e03c311de3..c1501aa6336bd 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -117,6 +117,8 @@ const config = { darwinIcon: 'resources/darwin/code.icns', darwinBundleIdentifier: product.darwinBundleIdentifier, darwinApplicationCategoryType: 'public.app-category.developer-tools', + darwinHelpBookFolder: 'VS Code HelpBook', + darwinHelpBookName: 'VS Code HelpBook', darwinBundleDocumentTypes: [{ name: product.nameLong + ' document', role: 'Editor', From bf1521ab82fe0d540e89e4e6694af60b08b8bf5d Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Sat, 27 May 2017 04:45:04 -0400 Subject: [PATCH 1290/2747] =?UTF-8?q?Fixes=20#27364=20-=20title=20showing?= =?UTF-8?q?=20\u2194=20instead=20of=20=E2=9F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/merge-conflict/src/commandHandler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/merge-conflict/src/commandHandler.ts b/extensions/merge-conflict/src/commandHandler.ts index e35f6f3cf08ad..41982c0630702 100644 --- a/extensions/merge-conflict/src/commandHandler.ts +++ b/extensions/merge-conflict/src/commandHandler.ts @@ -90,7 +90,7 @@ export default class CommandHandler implements vscode.Disposable { range = conflict.incoming.content; const rightUri = leftUri.with({ query: JSON.stringify(range) }); - const title = localize('compareChangesTitle', '{0}: Current changes \u2194 Incoming changes', fileName); + const title = localize('compareChangesTitle', '{0}: Current changes ⟷ Incoming changes', fileName); vscode.commands.executeCommand('vscode.diff', leftUri, rightUri, title); } From e5421e3fe6f5ab13f7bfe6349d19d367746ea90f Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 30 May 2017 08:29:57 +0200 Subject: [PATCH 1291/2747] Move stickiness onto DecorationRenderOptions --- src/vs/editor/common/editorCommon.ts | 2 +- src/vs/vscode.d.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index 7d437e5736b5a..e7e36871bf164 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -1636,7 +1636,6 @@ export function isThemeColor(o): o is ThemeColor { * @internal */ export interface IThemeDecorationRenderOptions { - stickiness?: TrackedRangeStickiness; backgroundColor?: string | ThemeColor; outline?: string; @@ -1688,6 +1687,7 @@ export interface IContentDecorationRenderOptions { */ export interface IDecorationRenderOptions extends IThemeDecorationRenderOptions { isWholeLine?: boolean; + stickiness?: TrackedRangeStickiness; overviewRulerLane?: OverviewRulerLane; light?: IThemeDecorationRenderOptions; diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 53f8ad3ee636b..ca27a99e4ef58 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -750,12 +750,6 @@ declare module 'vscode' { * Represents theme specific rendering styles for a [text editor decoration](#TextEditorDecorationType). */ export interface ThemableDecorationRenderOptions { - /** - * Customize the growing behaviour of the decoration when typing at the edges of the decoration. - * Defaults to TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges - */ - stickiness?: TrackedRangeStickiness; - /** * Background color of the decoration. Use rgba() and define transparent background colors to play well with other decorations. * Alternativly a color from the color registry an be [referenced](#ColorIdentifier). @@ -922,6 +916,12 @@ declare module 'vscode' { */ isWholeLine?: boolean; + /** + * Customize the growing behaviour of the decoration when typing at the edges of the decoration. + * Defaults to TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges + */ + stickiness?: TrackedRangeStickiness; + /** * The position in the overview ruler where the decoration should be rendered. */ From 081fbf2231cb0fed4bddb53816567a766149590a Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 30 May 2017 09:49:31 +0200 Subject: [PATCH 1292/2747] Improve naming and doc comments --- src/vs/editor/common/editorCommon.ts | 1 + src/vs/monaco.d.ts | 1 + src/vs/vscode.d.ts | 30 +++++++++++++------ src/vs/workbench/api/node/extHost.api.impl.ts | 2 +- src/vs/workbench/api/node/extHostTypes.ts | 22 ++++++++++++++ 5 files changed, 46 insertions(+), 10 deletions(-) diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index e7e36871bf164..e5e5ef72371ab 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -926,6 +926,7 @@ export interface ITextModelWithMarkers extends ITextModel { /** * Describes the behaviour of decorations when typing/editing near their edges. + * Note: Please do not edit the values, as they very carefully match `DecorationRangeBehaviour` */ export enum TrackedRangeStickiness { AlwaysGrowsWhenTypingAtEdges = 0, diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 7f3c80b83fa95..2ae279bad8bcc 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -1639,6 +1639,7 @@ declare module monaco.editor { /** * Describes the behaviour of decorations when typing/editing near their edges. + * Note: Please do not edit the values, as they very carefully match `DecorationRangeBehaviour` */ export enum TrackedRangeStickiness { AlwaysGrowsWhenTypingAtEdges = 0, diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index ca27a99e4ef58..c83e51b96dfde 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -701,13 +701,25 @@ declare module 'vscode' { } /** - * Describes the behaviour of decorations when typing/editing near their edges. + * Describes the behaviour of decorations when typing/editing at their edges. */ - export enum TrackedRangeStickiness { - AlwaysGrowsWhenTypingAtEdges = 0, - NeverGrowsWhenTypingAtEdges = 1, - GrowsOnlyWhenTypingBefore = 2, - GrowsOnlyWhenTypingAfter = 3 + export enum DecorationRangeBehaviour { + /** + * The decoration's range will widen when edits occur at the start or end. + */ + OpenOpen = 0, + /** + * The decoration's range will not widen when edits occur at the start of end. + */ + ClosedClosed = 1, + /** + * The decoration's range will widen when edits occur at the start, but not at the end. + */ + OpenClosed = 2, + /** + * The decoration's range will widen when edits occur at the end, but not at the start. + */ + ClosedOpen = 3 } /** @@ -917,10 +929,10 @@ declare module 'vscode' { isWholeLine?: boolean; /** - * Customize the growing behaviour of the decoration when typing at the edges of the decoration. - * Defaults to TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges + * Customize the growing behaviour of the decoration when edits occur at the edges of the decoration's range. + * Defaults to `DecorationRangeBehaviour.OpenOpen`. */ - stickiness?: TrackedRangeStickiness; + rangeBehaviour?: DecorationRangeBehaviour; /** * The position in the overview ruler where the decoration should be rendered. diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 11fda78db64a6..1c7a6687056b3 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -529,7 +529,7 @@ export function createApiFactory( TextEditorLineNumbersStyle: extHostTypes.TextEditorLineNumbersStyle, TextEditorRevealType: extHostTypes.TextEditorRevealType, TextEditorSelectionChangeKind: extHostTypes.TextEditorSelectionChangeKind, - TrackedRangeStickiness: EditorCommon.TrackedRangeStickiness, + DecorationRangeBehaviour: extHostTypes.DecorationRangeBehaviour, Uri: URI, ViewColumn: extHostTypes.ViewColumn, WorkspaceEdit: extHostTypes.WorkspaceEdit, diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index 7548f24f051f4..2e90e54aba437 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -962,6 +962,28 @@ export enum TextEditorSelectionChangeKind { Command = 3 } +/** + * These values match very carefully the values of `TrackedRangeStickiness` + */ +export enum DecorationRangeBehaviour { + /** + * TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges + */ + OpenOpen = 0, + /** + * TrackedRangeStickiness.NeverGrowsWhenTypingAtEdges + */ + ClosedClosed = 1, + /** + * TrackedRangeStickiness.GrowsOnlyWhenTypingBefore + */ + OpenClosed = 2, + /** + * TrackedRangeStickiness.GrowsOnlyWhenTypingAfter + */ + ClosedOpen = 3 +} + export namespace TextEditorSelectionChangeKind { export function fromValue(s: string) { switch (s) { From 47a6a7af618803100c28ea04af5e1f02d8bd6d70 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 30 May 2017 09:59:16 +0200 Subject: [PATCH 1293/2747] light update contribution not for windows --- .../parts/update/electron-browser/update.contribution.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/update/electron-browser/update.contribution.ts b/src/vs/workbench/parts/update/electron-browser/update.contribution.ts index 64bba795487ec..7e8681a56aeba 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.contribution.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.contribution.ts @@ -8,6 +8,7 @@ import * as nls from 'vs/nls'; import 'vs/css!./media/update.contribution'; import { Registry } from 'vs/platform/platform'; +import { isWindows } from 'vs/base/common/platform'; import product from 'vs/platform/node/product'; import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { ReleaseNotesEditor } from 'vs/workbench/parts/update/electron-browser/releaseNotesEditor'; @@ -24,7 +25,7 @@ import { ShowCurrentReleaseNotesAction, ProductContribution, UpdateContribution, Registry.as(WorkbenchExtensions.Workbench) .registerWorkbenchContribution(ProductContribution); -if (product.quality !== 'stable') { +if (product.quality !== 'stable' && !isWindows) { Registry.as(GlobalActivityExtensions) .registerActivity(LightUpdateContribution); } else { From f64bc3f92abd444d38d8c788f45226408eb5a174 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 30 May 2017 11:01:20 +0200 Subject: [PATCH 1294/2747] Prefer the American English spelling behavior --- .../browser/services/codeEditorServiceImpl.ts | 2 +- src/vs/editor/common/editorCommon.ts | 2 +- src/vs/vscode.d.ts | 14 +++++++------- src/vs/workbench/api/node/extHost.api.impl.ts | 2 +- src/vs/workbench/api/node/extHostTypes.ts | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index cad86e56150e1..f19885a132673 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -156,7 +156,7 @@ class DecorationTypeOptionsProvider implements IModelDecorationOptionsProvider { let options = providerArgs.options; this.isWholeLine = Boolean(options.isWholeLine); - this.stickiness = options.stickiness; + this.stickiness = options.rangeBehavior; let lightOverviewRulerColor = options.light && options.light.overviewRulerColor || options.overviewRulerColor; let darkOverviewRulerColor = options.dark && options.dark.overviewRulerColor || options.overviewRulerColor; diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index e5e5ef72371ab..fb5cc8218ac97 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -1688,7 +1688,7 @@ export interface IContentDecorationRenderOptions { */ export interface IDecorationRenderOptions extends IThemeDecorationRenderOptions { isWholeLine?: boolean; - stickiness?: TrackedRangeStickiness; + rangeBehavior?: TrackedRangeStickiness; overviewRulerLane?: OverviewRulerLane; light?: IThemeDecorationRenderOptions; diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index c83e51b96dfde..905765c2aa0d5 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -701,9 +701,9 @@ declare module 'vscode' { } /** - * Describes the behaviour of decorations when typing/editing at their edges. + * Describes the behavior of decorations when typing/editing at their edges. */ - export enum DecorationRangeBehaviour { + export enum DecorationRangeBehavior { /** * The decoration's range will widen when edits occur at the start or end. */ @@ -929,10 +929,10 @@ declare module 'vscode' { isWholeLine?: boolean; /** - * Customize the growing behaviour of the decoration when edits occur at the edges of the decoration's range. - * Defaults to `DecorationRangeBehaviour.OpenOpen`. + * Customize the growing behavior of the decoration when edits occur at the edges of the decoration's range. + * Defaults to `DecorationRangeBehavior.OpenOpen`. */ - rangeBehaviour?: DecorationRangeBehaviour; + rangeBehavior?: DecorationRangeBehavior; /** * The position in the overview ruler where the decoration should be rendered. @@ -1035,7 +1035,7 @@ declare module 'vscode' { * callback executes. * * @param callback A function which can create edits using an [edit-builder](#TextEditorEdit). - * @param options The undo/redo behaviour around this edit. By default, undo stops will be created before and after this edit. + * @param options The undo/redo behavior around this edit. By default, undo stops will be created before and after this edit. * @return A promise that resolves with a value indicating if the edits could be applied. */ edit(callback: (editBuilder: TextEditorEdit) => void, options?: { undoStopBefore: boolean; undoStopAfter: boolean; }): Thenable; @@ -1047,7 +1047,7 @@ declare module 'vscode' { * * @param snippet The snippet to insert in this edit. * @param location Position or range at which to insert the snippet, defaults to the current editor selection or selections. - * @param options The undo/redo behaviour around this edit. By default, undo stops will be created before and after this edit. + * @param options The undo/redo behavior around this edit. By default, undo stops will be created before and after this edit. * @return A promise that resolves with a value indicating if the snippet could be inserted. Note that the promise does not signal * that the snippet is completely filled-in or accepted. */ diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 1c7a6687056b3..eda65776c3274 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -529,7 +529,7 @@ export function createApiFactory( TextEditorLineNumbersStyle: extHostTypes.TextEditorLineNumbersStyle, TextEditorRevealType: extHostTypes.TextEditorRevealType, TextEditorSelectionChangeKind: extHostTypes.TextEditorSelectionChangeKind, - DecorationRangeBehaviour: extHostTypes.DecorationRangeBehaviour, + DecorationRangeBehavior: extHostTypes.DecorationRangeBehavior, Uri: URI, ViewColumn: extHostTypes.ViewColumn, WorkspaceEdit: extHostTypes.WorkspaceEdit, diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index 2e90e54aba437..353765544fd37 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -965,7 +965,7 @@ export enum TextEditorSelectionChangeKind { /** * These values match very carefully the values of `TrackedRangeStickiness` */ -export enum DecorationRangeBehaviour { +export enum DecorationRangeBehavior { /** * TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges */ From afe47dc84467b487ce0079ff72f55e7ef4f7ebca Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 30 May 2017 11:06:29 +0200 Subject: [PATCH 1295/2747] Fix spelling --- src/vs/editor/common/editorCommon.ts | 6 +++--- src/vs/monaco.d.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/common/editorCommon.ts b/src/vs/editor/common/editorCommon.ts index fb5cc8218ac97..ce257401e3ee6 100644 --- a/src/vs/editor/common/editorCommon.ts +++ b/src/vs/editor/common/editorCommon.ts @@ -65,7 +65,7 @@ export interface IModelDecorationOverviewRulerOptions { */ export interface IModelDecorationOptions { /** - * Customize the growing behaviour of the decoration when typing at the edges of the decoration. + * Customize the growing behavior of the decoration when typing at the edges of the decoration. * Defaults to TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges */ stickiness?: TrackedRangeStickiness; @@ -925,8 +925,8 @@ export interface ITextModelWithMarkers extends ITextModel { } /** - * Describes the behaviour of decorations when typing/editing near their edges. - * Note: Please do not edit the values, as they very carefully match `DecorationRangeBehaviour` + * Describes the behavior of decorations when typing/editing near their edges. + * Note: Please do not edit the values, as they very carefully match `DecorationRangeBehavior` */ export enum TrackedRangeStickiness { AlwaysGrowsWhenTypingAtEdges = 0, diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 2ae279bad8bcc..d293d474a24fb 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -1092,7 +1092,7 @@ declare module monaco.editor { */ export interface IModelDecorationOptions { /** - * Customize the growing behaviour of the decoration when typing at the edges of the decoration. + * Customize the growing behavior of the decoration when typing at the edges of the decoration. * Defaults to TrackedRangeStickiness.AlwaysGrowsWhenTypingAtEdges */ stickiness?: TrackedRangeStickiness; @@ -1638,8 +1638,8 @@ declare module monaco.editor { } /** - * Describes the behaviour of decorations when typing/editing near their edges. - * Note: Please do not edit the values, as they very carefully match `DecorationRangeBehaviour` + * Describes the behavior of decorations when typing/editing near their edges. + * Note: Please do not edit the values, as they very carefully match `DecorationRangeBehavior` */ export enum TrackedRangeStickiness { AlwaysGrowsWhenTypingAtEdges = 0, From f58278d1a40fdb2b6b4129925ba68a24b1e083d8 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Tue, 30 May 2017 14:31:30 +0200 Subject: [PATCH 1296/2747] Fixes #27545: Task templates contain deprecated properties --- src/vs/workbench/parts/tasks/common/taskTemplates.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/tasks/common/taskTemplates.ts b/src/vs/workbench/parts/tasks/common/taskTemplates.ts index ca3454752668d..b88527097caf0 100644 --- a/src/vs/workbench/parts/tasks/common/taskTemplates.ts +++ b/src/vs/workbench/parts/tasks/common/taskTemplates.ts @@ -29,7 +29,7 @@ const dotnetBuild: TaskEntry = { '\t\t{', '\t\t\t"taskName": "build",', '\t\t\t"command": "dotnet",', - '\t\t\t"isShellCommand": true,', + '\t\t\t"type": "shell",', '\t\t\t"group": "build",', '\t\t\t"terminal": {', '\t\t\t\t"reveal": "silent"', @@ -87,7 +87,7 @@ const command: TaskEntry = { '\t\t{', '\t\t\t"taskName": "echo",', '\t\t\t"command": "echo Hello",', - '\t\t\t"isShellCommand": true', + '\t\t\t"type": "shell"', '\t\t}', '\t]', '}' @@ -109,13 +109,13 @@ const maven: TaskEntry = { '\t\t{', '\t\t\t"taskName": "verify",', '\t\t\t"command": "mvn -B verify",', - '\t\t\t"isShellCommand": true,', + '\t\t\t"type": "shell",', '\t\t\t"group": "build"', '\t\t},', '\t\t{', '\t\t\t"taskName": "test",', '\t\t\t"command": "mvn -B test",', - '\t\t\t"isShellCommand": true,', + '\t\t\t"type": "shell",', '\t\t\t"group": "test"', '\t\t}', '\t]', From 7f13da53d5c958aab3cc3b47538ff099fef153fb Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 30 May 2017 12:46:58 +0200 Subject: [PATCH 1297/2747] light update: enable for win --- .../parts/update/electron-browser/update.contribution.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/update/electron-browser/update.contribution.ts b/src/vs/workbench/parts/update/electron-browser/update.contribution.ts index 7e8681a56aeba..64bba795487ec 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.contribution.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.contribution.ts @@ -8,7 +8,6 @@ import * as nls from 'vs/nls'; import 'vs/css!./media/update.contribution'; import { Registry } from 'vs/platform/platform'; -import { isWindows } from 'vs/base/common/platform'; import product from 'vs/platform/node/product'; import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { ReleaseNotesEditor } from 'vs/workbench/parts/update/electron-browser/releaseNotesEditor'; @@ -25,7 +24,7 @@ import { ShowCurrentReleaseNotesAction, ProductContribution, UpdateContribution, Registry.as(WorkbenchExtensions.Workbench) .registerWorkbenchContribution(ProductContribution); -if (product.quality !== 'stable' && !isWindows) { +if (product.quality !== 'stable') { Registry.as(GlobalActivityExtensions) .registerActivity(LightUpdateContribution); } else { From 333bebe5e7586a412a48e2231db3a1c1be7e5000 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 30 May 2017 12:51:14 +0200 Subject: [PATCH 1298/2747] light update: use number badge --- src/vs/workbench/parts/update/electron-browser/update.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/update/electron-browser/update.ts b/src/vs/workbench/parts/update/electron-browser/update.ts index c68899b083050..9b77ef4c8fbef 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.ts @@ -15,7 +15,7 @@ import pkg from 'vs/platform/node/package'; import product from 'vs/platform/node/product'; import URI from 'vs/base/common/uri'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { IActivityBarService, TextBadge } from 'vs/workbench/services/activity/common/activityBarService'; +import { IActivityBarService, NumberBadge } from 'vs/workbench/services/activity/common/activityBarService'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { ReleaseNotesInput } from 'vs/workbench/parts/update/electron-browser/releaseNotesInput'; import { IGlobalActivity } from 'vs/workbench/browser/activity'; @@ -297,7 +297,7 @@ export class LightUpdateContribution implements IGlobalActivity { @IActivityBarService activityBarService: IActivityBarService ) { this.updateService.onUpdateReady(() => { - const badge = new TextBadge('\u21e9', () => nls.localize('updateIsReady', "New update available.")); + const badge = new NumberBadge(1, () => nls.localize('updateIsReady', "New update available.")); activityBarService.showGlobalActivity(this.id, badge); }); From 7a7965a93e265d6ae60960f76da5f3209ae11d91 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Tue, 30 May 2017 14:47:40 +0200 Subject: [PATCH 1299/2747] Run over clean extensions directory for data migration tests. Fixes #27537. --- test/smoke/src/areas/common.ts | 14 ++++++++------ test/smoke/src/tests/data-migration.ts | 7 ++++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/test/smoke/src/areas/common.ts b/test/smoke/src/areas/common.ts index 33127905ec65b..96515d7ca49f5 100644 --- a/test/smoke/src/areas/common.ts +++ b/test/smoke/src/areas/common.ts @@ -19,7 +19,7 @@ export class CommonActions { public async getWindowTitle(): Promise { return this.spectron.client.getTitle(); } - + public enter(): Promise { return this.spectron.client.keys(['Enter', 'NULL']); } @@ -34,7 +34,7 @@ export class CommonActions { await this.spectron.wait(); return this.saveOpenedFile(); } - + public async newUntitledFile(): Promise { await this.spectron.command('workbench.action.files.newUntitledFile'); return this.spectron.wait(); @@ -45,12 +45,14 @@ export class CommonActions { } public async getTab(tabName: string, active?: boolean): Promise { + await this.spectron.command('workbench.action.closeMessages'); // close any notification messages that could overlap tabs + let tabSelector = active ? '.tab.active' : 'div'; let el = await this.spectron.client.element(`.tabs-container ${tabSelector}[aria-label="${tabName}, tab"]`); if (el.status === 0) { return el; } - + return undefined; } @@ -118,7 +120,7 @@ export class CommonActions { selector += ' explorer-item'; } selector += '"]'; - + await this.spectron.waitFor(this.spectron.client.doubleClick, selector); return this.spectron.wait(); } @@ -132,7 +134,7 @@ export class CommonActions { } else if (extension === 'md') { return 'md-ext-file-icon markdown-lang-file-icon'; } - + throw new Error('No class defined for this file extension'); } @@ -142,7 +144,7 @@ export class CommonActions { if (Array.isArray(span)) { return span[0]; } - + return span; } catch (e) { return undefined; diff --git a/test/smoke/src/tests/data-migration.ts b/test/smoke/src/tests/data-migration.ts index 4b8e627bcfe63..68c4f698b7e3f 100644 --- a/test/smoke/src/tests/data-migration.ts +++ b/test/smoke/src/tests/data-migration.ts @@ -5,7 +5,7 @@ import * as assert from 'assert'; -import { SpectronApplication, USER_DIR, STABLE_PATH, LATEST_PATH, WORKSPACE_PATH } from "../spectron/application"; +import { SpectronApplication, USER_DIR, STABLE_PATH, LATEST_PATH, WORKSPACE_PATH, EXTENSIONS_DIR } from "../spectron/application"; import { CommonActions } from '../areas/common'; let app: SpectronApplication; @@ -20,11 +20,12 @@ export function testDataMigration() { afterEach(async function () { await app.stop(); - return await common.removeDirectory(USER_DIR) + await common.removeDirectory(USER_DIR); + return await common.removeDirectory(EXTENSIONS_DIR); }); function setupSpectron(context: Mocha.ITestCallbackContext, appPath: string, workspace?: string[]): void { - app = new SpectronApplication(appPath, context.test.fullTitle(), context.test.currentRetry(), workspace, [`--user-data-dir=${USER_DIR}`]); + app = new SpectronApplication(appPath, context.test.fullTitle(), context.test.currentRetry(), workspace, [`--user-data-dir=${USER_DIR}`, `--extensions-dir=${EXTENSIONS_DIR}`]); common = new CommonActions(app); } From 26d85e8ac7f7e2eb646ddf9c171e471e10ef8deb Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Tue, 30 May 2017 16:55:32 +0200 Subject: [PATCH 1300/2747] Toggle full screen for reading out output console due to editor redrawing div elements. --- test/smoke/src/areas/tasks.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/smoke/src/areas/tasks.ts b/test/smoke/src/areas/tasks.ts index e0774854f3ad2..62eaaed92622a 100644 --- a/test/smoke/src/areas/tasks.ts +++ b/test/smoke/src/areas/tasks.ts @@ -25,12 +25,14 @@ export class Tasks { } public async firstOutputLineEndsWith(fileName: string): Promise { + await this.spectron.command('workbench.action.toggleFullScreen'); // toggle full screen to prevent output view to be rendered as wrapped const firstLine = await this.spectron.waitFor(this.spectron.client.getText, `${this.outputViewSelector}>:nth-child(2)`); return firstLine.endsWith(fileName); } - public getOutputResult(): Promise { + public async getOutputResult(): Promise { + await this.spectron.command('workbench.action.toggleFullScreen'); // toggle full screen to prevent output view to be rendered as wrapped return this.spectron.waitFor(this.spectron.client.getText, `${this.outputViewSelector}>:nth-child(5) span.mtk1`); } From 4b995d52ec0b61107e81263f54845b91993cb960 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Tue, 30 May 2017 08:34:00 -0700 Subject: [PATCH 1301/2747] Add null check on extra bag --- .../crashReporter/electron-browser/crashReporterService.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts b/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts index 58cca417c6b3d..0acfd1793ac58 100644 --- a/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts +++ b/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts @@ -81,7 +81,12 @@ export class CrashReporterService implements ICrashReporterService { // Experimental attempt on Mac only for now if (isMacintosh) { const childProcessOptions = clone(this.options); - childProcessOptions.extra.processName = name; + if (childProcessOptions.extra) { + childProcessOptions.extra.processName = name; + } else { + childProcessOptions.extra = { processName: name }; + } + childProcessOptions.crashesDirectory = os.tmpdir(); return childProcessOptions; } From e6217c699a9988a0f2829f68f1643104ce351d47 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 30 May 2017 18:06:16 +0200 Subject: [PATCH 1302/2747] adopt some new color keys in our built in themes --- extensions/theme-abyss/themes/abyss-color-theme.json | 4 ++++ .../theme-kimbie-dark/themes/kimbie-dark-color-theme.json | 1 + extensions/theme-monokai/themes/monokai-color-theme.json | 1 + .../theme-quietlight/themes/quietlight-color-theme.json | 2 ++ extensions/theme-red/themes/Red-color-theme.json | 6 +++++- .../themes/solarized-dark-color-theme.json | 4 ++++ .../themes/solarized-light-color-theme.json | 6 ++++++ .../themes/tomorrow-night-blue-theme.json | 1 + 8 files changed, 24 insertions(+), 1 deletion(-) diff --git a/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json index a67dd83b89d56..5b2c2e1e546a3 100644 --- a/extensions/theme-abyss/themes/abyss-color-theme.json +++ b/extensions/theme-abyss/themes/abyss-color-theme.json @@ -408,6 +408,10 @@ "pickerGroup.border": "#596F99", "pickerGroup.foreground": "#596F99", + // Workbench: Extensions + "extensionButton.prominentBackground": "#5f8b3b", + "extensionButton.prominentHoverBackground": "#5f8b3bbb", + // Workbench: Terminal "terminal.ansiBlack": "#111111", "terminal.ansiRed": "#ff9da4", diff --git a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json index 7de6b3fd42e6b..f9a84a5c5eec4 100644 --- a/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json +++ b/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json @@ -14,6 +14,7 @@ "pickerGroup.foreground": "#e3b583", "pickerGroup.border": "#e3b583", "inputOption.activeBorder": "#a57a4c", + "selection.background": "#84613daa", "editor.selectionBackground": "#84613daa", "editorWidget.background": "#131510", "editorHoverWidget.background": "#221a14", diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index 439bf32d607eb..fa2146e0a84f5 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -17,6 +17,7 @@ "button.background": "#75715E", "editor.background": "#272822", "editor.foreground": "#f8f8f2", + "selection.background": "#ccccc7", "editor.selectionBackground": "#49483e", "editor.lineHighlightBackground": "#3e3d32", "editorCursor.foreground": "#f8f8f0", diff --git a/extensions/theme-quietlight/themes/quietlight-color-theme.json b/extensions/theme-quietlight/themes/quietlight-color-theme.json index 3086021874bfa..5ab654716a7c2 100644 --- a/extensions/theme-quietlight/themes/quietlight-color-theme.json +++ b/extensions/theme-quietlight/themes/quietlight-color-theme.json @@ -461,6 +461,7 @@ "list.activeSelectionBackground": "#c4d9b1", "list.inactiveSelectionBackground": "#d3dbcd", "list.highlightForeground": "#9769dc", + "selection.background": "#C9D0D9", "editor.background": "#F5F5F5", "editorWhitespace.foreground": "#AAAAAA", "editor.lineHighlightBackground": "#E4F6D4", @@ -495,6 +496,7 @@ "inputValidation.warningBorder": "#ffe055", "inputValidation.errorBackground": "#ffeaea", "inputValidation.errorBorder": "#f1897f", + "errorForeground": "#ffeaea", "badge.background": "#705697AA", "progressBar.background": "#705697" } diff --git a/extensions/theme-red/themes/Red-color-theme.json b/extensions/theme-red/themes/Red-color-theme.json index a35bfe0938b6d..94d2c20ae2beb 100644 --- a/extensions/theme-red/themes/Red-color-theme.json +++ b/extensions/theme-red/themes/Red-color-theme.json @@ -11,6 +11,7 @@ "editorGroupHeader.tabsBackground": "#330000", "titleBar.activeBackground": "#770000", "titleBar.inactiveBackground": "#772222", + "selection.background": "#ff777788", // editor "editor.background": "#390000", "editorGroup.border": "#ff666633", @@ -51,7 +52,10 @@ "pickerGroup.foreground": "#cc9999", "pickerGroup.border": "#ff000033", "badge.background": "#cc3333", - "progressBar.background": "#cc3333" + "progressBar.background": "#cc3333", + "errorForeground": "#ffeaea", + "extensionButton.prominentBackground": "#cc3333", + "extensionButton.prominentHoverBackground": "#cc333388" }, "name": "Red" } \ No newline at end of file diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index 10b058c491161..542de82d4c83e 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -301,6 +301,8 @@ // "widget.shadow": "", + "selection.background": "#2AA19899", + "input.background": "#003847", "input.foreground": "#93A1A1", "input.placeholderForeground": "#93A1A1AA", @@ -314,6 +316,8 @@ "inputValidation.errorBackground": "#571b26", "inputValidation.errorBorder": "#a92049", + "errorForeground": "#ffeaea", + "badge.background": "#047aa6", "progressBar.background": "#047aa6", diff --git a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json index cebad7db3b270..cd42bbaa859ed 100644 --- a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -323,6 +323,8 @@ "button.background": "#AC9D57", // "button.foreground": "", + "selection.background": "#CCC4B0", + "list.activeSelectionBackground": "#DFCA88", "list.activeSelectionForeground": "#6C6C6C", "list.focusBackground": "#DFCA8866", @@ -453,6 +455,10 @@ "pickerGroup.border": "#2AA19899", "pickerGroup.foreground": "#2AA19899", + // Extensions + "extensionButton.prominentBackground": "#b58900", + "extensionButton.prominentHoverBackground": "#584c27aa", + // Workbench: Terminal // Colors sourced from the official palette http://ethanschoonover.com/solarized "terminal.ansiBlack": "#262626", diff --git a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json index 319f8be0a61cf..830caf27cb6c4 100644 --- a/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json +++ b/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-theme.json @@ -2,6 +2,7 @@ "type": "dark", "colors": { "focusBorder": "#bbdaff", + "errorForeground": "#a92049", "input.background": "#001733", "dropdown.background": "#001733", "list.focusBackground": "#ffffff60", From 8afd3ffb6591027c1391f2359f1bbc6f092455d4 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Tue, 30 May 2017 21:06:50 +0200 Subject: [PATCH 1303/2747] Fixes #27578: Don't mention VS Code in jsdoc --- src/vs/vscode.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 905765c2aa0d5..79d24b87499d4 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -3577,7 +3577,7 @@ declare module 'vscode' { export interface ProcessOptions { /** * The current working directory of the executed program or shell. - * If omitted VSCode's current workspace root is used. + * If omitted the tools current workspace root is used. */ cwd?: string; @@ -3719,7 +3719,7 @@ declare module 'vscode' { /** * The current working directory of the executed shell. - * If omitted VSCode's current workspace root is used. + * If omitted the tools current workspace root is used. */ cwd?: string; @@ -3732,7 +3732,7 @@ declare module 'vscode' { } | { /** * The current working directory of the executed shell. - * If omitted VSCode's current workspace root is used. + * If omitted the tools current workspace root is used. */ cwd: string; @@ -3745,7 +3745,7 @@ declare module 'vscode' { } | { /** * The current working directory of the executed shell. - * If omitted VSCode's current workspace root is used. + * If omitted the tools current workspace root is used. */ cwd?: string; From 6fb0af28cdd8454439944ac60927232b4dffdc2c Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Tue, 30 May 2017 21:59:20 +0200 Subject: [PATCH 1304/2747] Fixes #27581: Unspecific names: TerminalBehaviour and RevealKind --- src/vs/vscode.d.ts | 34 ++++++++++--------- src/vs/workbench/api/node/extHost.api.impl.ts | 2 +- src/vs/workbench/api/node/extHostTask.ts | 16 ++++----- src/vs/workbench/api/node/extHostTypes.ts | 34 +++++++++---------- 4 files changed, 44 insertions(+), 42 deletions(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 79d24b87499d4..d7cffd9896a14 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -3540,7 +3540,7 @@ declare module 'vscode' { /** * Controls the behaviour of the terminal's visibility. */ - export enum RevealKind { + export enum TaskRevealKind { /** * Always brings the terminal to front if the task is executed. */ @@ -3559,14 +3559,14 @@ declare module 'vscode' { } /** - * Controls terminal specific behaviour. + * Controls terminal specific behavior. */ - export interface TerminalBehaviour { + export interface TaskTerminalBehavior { /** * Controls whether the terminal executing a task is brought to front or not. * Defaults to `RevealKind.Always`. */ - reveal?: RevealKind; + reveal?: TaskRevealKind; /** * Controls whether the command is echoed in the terminal or not. @@ -3574,7 +3574,7 @@ declare module 'vscode' { echo?: boolean; } - export interface ProcessOptions { + export interface ProcessTaskOptions { /** * The current working directory of the executed program or shell. * If omitted the tools current workspace root is used. @@ -3595,7 +3595,8 @@ declare module 'vscode' { */ export const Clean: 'clean'; /** - * The build task group + * The build task group. If a task is part of the build task group + * it can be executed via the run build short cut. */ export const Build: 'build'; /** @@ -3603,7 +3604,8 @@ declare module 'vscode' { */ export const RebuildAll: 'rebuildAll'; /** - * The test task group + * The test task group. If a task is part of the test task group + * it can be executed via the run test short cut. */ export const Test: 'test'; } @@ -3646,7 +3648,7 @@ declare module 'vscode' { * @param options additional options for the started process. * @param problemMatchers the problem matchers to use. */ - constructor(name: string, process: string, args: string[], options: ProcessOptions, problemMatchers?: ProblemMatchers); + constructor(name: string, process: string, args: string[], options: ProcessTaskOptions, problemMatchers?: ProblemMatchers); /** * The task's name @@ -3692,12 +3694,12 @@ declare module 'vscode' { * The process options used when the process is executed. * Defaults to an empty object literal. */ - options: ProcessOptions; + options: ProcessTaskOptions; /** - * The terminal options. Defaults to an empty object literal. + * The terminal behavior. Defaults to an empty object literal. */ - terminal: TerminalBehaviour; + terminal: TaskTerminalBehavior; /** * The problem matchers attached to the task. Defaults to an empty @@ -3706,7 +3708,7 @@ declare module 'vscode' { problemMatchers: string[]; } - export type ShellOptions = { + export type ShellTaskOptions = { /** * The shell executable. */ @@ -3779,7 +3781,7 @@ declare module 'vscode' { * @param options additional options used when creating the shell. * @param problemMatchers the problem matchers to use. */ - constructor(name: string, commandLine: string, options: ShellOptions, problemMatchers?: ProblemMatchers); + constructor(name: string, commandLine: string, options: ShellTaskOptions, problemMatchers?: ProblemMatchers); /** * The task's name @@ -3820,12 +3822,12 @@ declare module 'vscode' { * The shell options used when the shell is executed. Defaults to an * empty object literal. */ - options: ShellOptions; + options: ShellTaskOptions; /** - * The terminal options. Defaults to an empty object literal. + * The terminal behavior. Defaults to an empty object literal. */ - terminal: TerminalBehaviour; + terminal: TaskTerminalBehavior; /** * The problem matchers attached to the task. Defaults to an empty diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index eda65776c3274..1ec2c22afa382 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -537,7 +537,7 @@ export function createApiFactory( TreeItemCollapsibleState: extHostTypes.TreeItemCollapsibleState, ThemeColor: extHostTypes.ThemeColor, // functions - RevealKind: extHostTypes.RevealKind, + TaskRevealKind: extHostTypes.TaskRevealKind, TaskGroup: extHostTypes.TaskGroup, ShellTask: extHostTypes.ShellTask, ProcessTask: extHostTypes.ProcessTask diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index 7508d947d45b0..239aa99dabcd4 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -191,15 +191,15 @@ namespace ProblemMatcher { } */ -namespace RevealKind { - export function from(value: vscode.RevealKind): TaskSystem.RevealKind { +namespace TaskRevealKind { + export function from(value: vscode.TaskRevealKind): TaskSystem.RevealKind { if (value === void 0 || value === null) { return TaskSystem.RevealKind.Always; } switch (value) { - case types.RevealKind.Silent: + case types.TaskRevealKind.Silent: return TaskSystem.RevealKind.Silent; - case types.RevealKind.Never: + case types.TaskRevealKind.Never: return TaskSystem.RevealKind.Never; } return TaskSystem.RevealKind.Always; @@ -207,11 +207,11 @@ namespace RevealKind { } namespace TerminalBehaviour { - export function from(value: vscode.TerminalBehaviour): TaskSystem.TerminalBehavior { + export function from(value: vscode.TaskTerminalBehavior): TaskSystem.TerminalBehavior { if (value === void 0 || value === null) { return { reveal: TaskSystem.RevealKind.Always, echo: false }; } - return { reveal: RevealKind.from(value.reveal), echo: !!value.echo }; + return { reveal: TaskRevealKind.from(value.reveal), echo: !!value.echo }; } } @@ -230,10 +230,10 @@ namespace Strings { } namespace CommandOptions { - function isShellOptions(value: any): value is vscode.ShellOptions { + function isShellOptions(value: any): value is vscode.ShellTaskOptions { return value && typeof value.executable === 'string'; } - export function from(value: vscode.ShellOptions | vscode.ProcessOptions): TaskSystem.CommandOptions { + export function from(value: vscode.ShellTaskOptions | vscode.ProcessTaskOptions): TaskSystem.CommandOptions { if (value === void 0 || value === null) { return undefined; } diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index 353765544fd37..7305e672df600 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1029,7 +1029,7 @@ export enum ApplyToKind { ClosedDocuments = 3 } -export enum RevealKind { +export enum TaskRevealKind { Always = 1, Silent = 2, @@ -1045,7 +1045,7 @@ export class BaseTask { private _isBackground: boolean; private _source: string; private _group: string; - private _terminal: vscode.TerminalBehaviour; + private _terminal: vscode.TaskTerminalBehavior; constructor(name: string, problemMatchers: string[]) { if (typeof name !== 'string') { @@ -1116,11 +1116,11 @@ export class BaseTask { this._group = value; } - get terminal(): vscode.TerminalBehaviour { + get terminal(): vscode.TaskTerminalBehavior { return this._terminal; } - set terminal(value: vscode.TerminalBehaviour) { + set terminal(value: vscode.TaskTerminalBehavior) { if (value === void 0 || value === null) { value = Object.create(null); } @@ -1149,7 +1149,7 @@ namespace ProblemMatcher { */ namespace ShellOptions { - export function is(value: any): value is vscode.ShellOptions { + export function is(value: any): value is vscode.ShellTaskOptions { return value && ((typeof value.executable === 'string') || (typeof value.cwd === 'string') || !!value.env); } } @@ -1184,16 +1184,16 @@ export class ProcessTask extends BaseTask { private _process: string; private _args: string[]; - private _options: vscode.ProcessOptions; + private _options: vscode.ProcessTaskOptions; constructor(name: string, process: string, args?: string[], problemMatchers?: vscode.ProblemMatchers); - constructor(name: string, process: string, args: string[] | undefined, options: vscode.ProcessOptions, problemMatchers?: vscode.ProblemMatchers); - constructor(name: string, process: string, arg3?: string[], arg4?: vscode.ProcessOptions | vscode.ProblemMatchers, arg5?: vscode.ProblemMatchers) { + constructor(name: string, process: string, args: string[] | undefined, options: vscode.ProcessTaskOptions, problemMatchers?: vscode.ProblemMatchers); + constructor(name: string, process: string, arg3?: string[], arg4?: vscode.ProcessTaskOptions | vscode.ProblemMatchers, arg5?: vscode.ProblemMatchers) { if (typeof process !== 'string') { throw illegalArgument('process'); } let args: string[]; - let options: vscode.ProcessOptions; + let options: vscode.ProcessTaskOptions; let problemMatchers: vscode.ProblemMatchers; args = arg3 || []; @@ -1235,11 +1235,11 @@ export class ProcessTask extends BaseTask { this._args = value; } - get options(): vscode.ProcessOptions { + get options(): vscode.ProcessTaskOptions { return this._options; } - set options(value: vscode.ProcessOptions) { + set options(value: vscode.ProcessTaskOptions) { if (value === void 0 || value === null) { value = Object.create(null); } @@ -1250,15 +1250,15 @@ export class ProcessTask extends BaseTask { export class ShellTask extends BaseTask implements vscode.ShellTask { private _commandLine: string; - private _options: vscode.ShellOptions; + private _options: vscode.ShellTaskOptions; constructor(name: string, commandLine: string, problemMatchers?: vscode.ProblemMatchers); - constructor(name: string, commandLine: string, options: vscode.ShellOptions, problemMatchers?: vscode.ProblemMatchers); - constructor(name: string, commandLine: string, optionsOrProblemMatchers?: vscode.ShellOptions | vscode.ProblemMatchers, problemMatchers?: vscode.ProblemMatchers) { + constructor(name: string, commandLine: string, options: vscode.ShellTaskOptions, problemMatchers?: vscode.ProblemMatchers); + constructor(name: string, commandLine: string, optionsOrProblemMatchers?: vscode.ShellTaskOptions | vscode.ProblemMatchers, problemMatchers?: vscode.ProblemMatchers) { if (typeof commandLine !== 'string') { throw illegalArgument('commandLine'); } - let options: vscode.ShellOptions = undefined; + let options: vscode.ShellTaskOptions = undefined; let pm: string[]; if (ShellOptions.is(optionsOrProblemMatchers)) { options = optionsOrProblemMatchers; @@ -1280,11 +1280,11 @@ export class ShellTask extends BaseTask implements vscode.ShellTask { return this._commandLine; } - get options(): vscode.ShellOptions { + get options(): vscode.ShellTaskOptions { return this._options; } - set options(value: vscode.ShellOptions) { + set options(value: vscode.ShellTaskOptions) { if (value === void 0 || value === null) { value = Object.create(null); } From 4bb81e3099a0dbf1f69d3f729d340e90dfb184c4 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Tue, 30 May 2017 22:03:57 +0200 Subject: [PATCH 1305/2747] Fixes #27348: Task should not be drop if identifier is undefined --- src/vs/workbench/api/node/extHostTask.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index 239aa99dabcd4..2306007194cf1 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -294,7 +294,7 @@ namespace Tasks { } function fromSingle(task: vscode.Task, extension: IExtensionDescription, uuidMap: UUIDMap): TaskSystem.Task { - if (typeof task.name !== 'string' || typeof task.identifier !== 'string') { + if (typeof task.name !== 'string') { return undefined; } let command: TaskSystem.CommandConfiguration; From cc6fb7c73452e4e4c405bbeee69dad8c9a950b41 Mon Sep 17 00:00:00 2001 From: cleidigh Date: Tue, 30 May 2017 16:24:56 -0400 Subject: [PATCH 1306/2747] Fix current output drop-down selected --- src/vs/workbench/parts/output/browser/outputActions.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/output/browser/outputActions.ts b/src/vs/workbench/parts/output/browser/outputActions.ts index b7e0927a94b8e..f083d763cbc62 100644 --- a/src/vs/workbench/parts/output/browser/outputActions.ts +++ b/src/vs/workbench/parts/output/browser/outputActions.ts @@ -112,7 +112,10 @@ export class SwitchOutputActionItem extends SelectActionItem { ) { super(null, action, [], 0); - this.toDispose.push(this.outputService.onOutputChannel(() => this.setOptions(this.getOptions(), this.getSelected(undefined)))); + this.toDispose.push(this.outputService.onOutputChannel(() => { + const activeChannelIndex = this.getSelected(this.outputService.getActiveChannel().id); + this.setOptions(this.getOptions(), activeChannelIndex); + })); this.toDispose.push(this.outputService.onActiveOutputChannel(activeChannelId => this.setOptions(this.getOptions(), this.getSelected(activeChannelId)))); this.toDispose.push(attachSelectBoxStyler(this.selectBox, themeService)); From a1fd514fa6c7c5ae6218bd40e6e7a519f3053655 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Tue, 30 May 2017 22:39:34 +0200 Subject: [PATCH 1307/2747] Fixes #27589: Inconsistent use of ProblemMatcher --- src/vs/vscode.d.ts | 35 +++++++++++++---------- src/vs/workbench/api/node/extHostTypes.ts | 14 ++++----- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index d7cffd9896a14..82c239860cd52 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -3610,11 +3610,6 @@ declare module 'vscode' { export const Test: 'test'; } - /** - * The ProblemMatchers type definition. - */ - export type ProblemMatchers = string | string[]; - /** * A task that starts an external process. */ @@ -3625,9 +3620,11 @@ declare module 'vscode' { * * @param name the task's name. Is presented in the user interface. * @param process the process to start. - * @param problemMatchers the problem matchers to use. + * @param problemMatchers the names of problem matchers to use, like '$tsc' + * or '$eslint'. Problem matchers can be contributed by an extension using + * the `problemMatchers` extension point. */ - constructor(name: string, process: string, problemMatchers?: ProblemMatchers); + constructor(name: string, process: string, problemMatchers?: string | string[]); /** * Creates a process task. @@ -3635,9 +3632,11 @@ declare module 'vscode' { * @param name the task's name. Is presented in the user interface. * @param process the process to start. * @param args arguments to be passed to the process. - * @param problemMatchers the problem matchers to use. + * @param problemMatchers the names of problem matchers to use, like '$tsc' + * or '$eslint'. Problem matchers can be contributed by an extension using + * the `problemMatchers` extension point. */ - constructor(name: string, process: string, args: string[], problemMatchers?: ProblemMatchers); + constructor(name: string, process: string, args: string[], problemMatchers?: string | string[]); /** * Creates a process task. @@ -3646,9 +3645,11 @@ declare module 'vscode' { * @param process the process to start. * @param args arguments to be passed to the process. * @param options additional options for the started process. - * @param problemMatchers the problem matchers to use. + * @param problemMatchers the names of problem matchers to use, like '$tsc' + * or '$eslint'. Problem matchers can be contributed by an extension using + * the `problemMatchers` extension point. */ - constructor(name: string, process: string, args: string[], options: ProcessTaskOptions, problemMatchers?: ProblemMatchers); + constructor(name: string, process: string, args: string[], options: ProcessTaskOptions, problemMatchers?: string | string[]); /** * The task's name @@ -3769,9 +3770,11 @@ declare module 'vscode' { * * @param name the task's name. Is presented in the user interface. * @param commandLine the command line to execute. - * @param problemMatchers the problem matchers to use. + * @param problemMatchers the names of problem matchers to use, like '$tsc' + * or '$eslint'. Problem matchers can be contributed by an extension using + * the `problemMatchers` extension point. */ - constructor(name: string, commandLine: string, problemMatchers?: ProblemMatchers); + constructor(name: string, commandLine: string, problemMatchers?: string | string[]); /** * Creates a shell task. @@ -3779,9 +3782,11 @@ declare module 'vscode' { * @param name the task's name. Is presented in the user interface. * @param commandLine the command line to execute. * @param options additional options used when creating the shell. - * @param problemMatchers the problem matchers to use. + * @param problemMatchers the names of problem matchers to use, like '$tsc' + * or '$eslint'. Problem matchers can be contributed by an extension using + * the `problemMatchers` extension point. */ - constructor(name: string, commandLine: string, options: ShellTaskOptions, problemMatchers?: ProblemMatchers); + constructor(name: string, commandLine: string, options: ShellTaskOptions, problemMatchers?: string | string[]); /** * The task's name diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index 7305e672df600..ef7f35e2a7e3c 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1186,15 +1186,15 @@ export class ProcessTask extends BaseTask { private _args: string[]; private _options: vscode.ProcessTaskOptions; - constructor(name: string, process: string, args?: string[], problemMatchers?: vscode.ProblemMatchers); - constructor(name: string, process: string, args: string[] | undefined, options: vscode.ProcessTaskOptions, problemMatchers?: vscode.ProblemMatchers); - constructor(name: string, process: string, arg3?: string[], arg4?: vscode.ProcessTaskOptions | vscode.ProblemMatchers, arg5?: vscode.ProblemMatchers) { + constructor(name: string, process: string, args?: string[], problemMatchers?: string | string[]); + constructor(name: string, process: string, args: string[] | undefined, options: vscode.ProcessTaskOptions, problemMatchers?: string | string[]); + constructor(name: string, process: string, arg3?: string[], arg4?: vscode.ProcessTaskOptions | string | string[], arg5?: string | string[]) { if (typeof process !== 'string') { throw illegalArgument('process'); } let args: string[]; let options: vscode.ProcessTaskOptions; - let problemMatchers: vscode.ProblemMatchers; + let problemMatchers: string | string[]; args = arg3 || []; if (arg4) { @@ -1252,9 +1252,9 @@ export class ShellTask extends BaseTask implements vscode.ShellTask { private _commandLine: string; private _options: vscode.ShellTaskOptions; - constructor(name: string, commandLine: string, problemMatchers?: vscode.ProblemMatchers); - constructor(name: string, commandLine: string, options: vscode.ShellTaskOptions, problemMatchers?: vscode.ProblemMatchers); - constructor(name: string, commandLine: string, optionsOrProblemMatchers?: vscode.ShellTaskOptions | vscode.ProblemMatchers, problemMatchers?: vscode.ProblemMatchers) { + constructor(name: string, commandLine: string, problemMatchers?: string | string[]); + constructor(name: string, commandLine: string, options: vscode.ShellTaskOptions, problemMatchers?: string | string[]); + constructor(name: string, commandLine: string, optionsOrProblemMatchers?: vscode.ShellTaskOptions | string | string[], problemMatchers?: string | string[]) { if (typeof commandLine !== 'string') { throw illegalArgument('commandLine'); } From b0047344d6eef91dbf8fee72c7a9649d504c6f12 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 30 May 2017 14:01:56 -0700 Subject: [PATCH 1308/2747] Fix some issues with dnd to the terminal - \, quote chars and space are now escaped. - Paths from the file system are now properly passed through URI, causing \ to be pasted in correctly. Fixes #27511 --- .../electron-browser/terminalPanel.ts | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 78364b99abf90..a1a746a7bd2c4 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -216,18 +216,19 @@ export class TerminalPanel extends Panel { } // Check if the file was dragged from the tree explorer - const url = e.dataTransfer.getData('URL'); - let filePath = URI.parse(url).path; - - // Check if the file was dragged from the filesystem - if (!filePath && e.dataTransfer.files.length > 0) { - filePath = e.dataTransfer.files[0].path; + let url = e.dataTransfer.getData('URL'); + if (!url && e.dataTransfer.files.length > 0) { + // Check if the file was dragged from the filesystem + url = e.dataTransfer.files[0].path; } - if (filePath) { - const terminal = this._terminalService.getActiveInstance(); - terminal.sendText(this._wrapPathInQuotes(filePath), false); + const filePath = URI.parse(url).path; + if (!filePath) { + return; } + + const terminal = this._terminalService.getActiveInstance(); + terminal.sendText(this._wrapPathInQuotes(filePath), false); } })); } @@ -292,9 +293,19 @@ export class TerminalPanel extends Panel { * Adds quotes to a path if it contains whitespaces */ private _wrapPathInQuotes(path: string) { - if (/\s+/.test(path)) { - return `"${path}"`; + if (platform.isWindows) { + if (/\s+/.test(path)) { + return `"${path}"`; + } + return path; } + const charsToReplace: { a: string, b: string }[] = [ + { a: '\\', b: '\\\\' }, + { a: ' ', b: '\\ ' }, + { a: '\'', b: '\\\'' }, + { a: '"', b: '\\"' } + ]; + charsToReplace.forEach(chars => path = path.replace(chars.a, chars.b)); return path; } } From 1e54bb2bea94d756e8d88d136c4b66cce979aa57 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Tue, 30 May 2017 14:12:03 -0700 Subject: [PATCH 1309/2747] Fixes #27452 Set version, commit in extra bag from the start --- .../electron-browser/crashReporterService.ts | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts b/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts index 0acfd1793ac58..792a867229777 100644 --- a/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts +++ b/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts @@ -35,23 +35,23 @@ export class CrashReporterService implements ICrashReporterService { private startCrashReporter(): void { - // base options + // base options with product info this.options = { companyName: product.crashReporter.companyName, productName: product.crashReporter.productName, - submitURL: this.getSubmitURL() + submitURL: this.getSubmitURL(), + extra: { + vscode_version: pkg.version, + vscode_commit: product.commit + } }; - // mixin telemetry info and product info + // mixin telemetry info this.telemetryService.getTelemetryInfo() .then(info => { - assign(this.options, { - extra: { - vscode_sessionId: info.sessionId, - vscode_version: pkg.version, - vscode_commit: product.commit, - vscode_machineId: info.machineId - } + assign(this.options.extra, { + vscode_sessionId: info.sessionId, + vscode_machineId: info.machineId }); // start crash reporter right here @@ -81,12 +81,7 @@ export class CrashReporterService implements ICrashReporterService { // Experimental attempt on Mac only for now if (isMacintosh) { const childProcessOptions = clone(this.options); - if (childProcessOptions.extra) { - childProcessOptions.extra.processName = name; - } else { - childProcessOptions.extra = { processName: name }; - } - + childProcessOptions.extra.processName = name; childProcessOptions.crashesDirectory = os.tmpdir(); return childProcessOptions; } From 85df66dcd6363d232975ac5abaf3c30b8383840f Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 30 May 2017 14:30:11 -0700 Subject: [PATCH 1310/2747] Style the terminal press any key text Fixes #27398 --- .../parts/terminal/electron-browser/terminalInstance.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 3b32036382612..b236832add42b 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -532,6 +532,8 @@ export class TerminalInstance implements ITerminalInstance { let message = typeof this._shellLaunchConfig.waitOnExit === 'string' ? this._shellLaunchConfig.waitOnExit : nls.localize('terminal.integrated.waitOnExit', 'Press any key to close the terminal'); + // Style the message to make it stand out from the rest of the output + message = `\n\x1b[40;37;1m${message}\x1b[0m`; this._xterm.writeln(message); // Disable all input if the terminal is exiting and listen for next keypress this._xterm.setOption('disableStdin', true); From c58feb3fa53b04ef21a349e83d3bf334f5094ac6 Mon Sep 17 00:00:00 2001 From: Dustin Campbell Date: Tue, 30 May 2017 14:59:32 -0700 Subject: [PATCH 1311/2747] Update to latest C# TextMate grammar --- .../csharp/syntaxes/csharp.tmLanguage.json | 90 +++++++++++++------ 1 file changed, 62 insertions(+), 28 deletions(-) diff --git a/extensions/csharp/syntaxes/csharp.tmLanguage.json b/extensions/csharp/syntaxes/csharp.tmLanguage.json index 3f81563c5bb92..010852c16e7c8 100644 --- a/extensions/csharp/syntaxes/csharp.tmLanguage.json +++ b/extensions/csharp/syntaxes/csharp.tmLanguage.json @@ -4,6 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], + "version": "https://github.com/dotnet/csharp-tmLanguage/commit/9ef19ad34df99e0e5bf3e0a8e8a1733d1f0c4aca", "name": "C#", "scopeName": "source.cs", "fileTypes": [ @@ -314,10 +315,10 @@ "include": "#anonymous-object-creation-expression" }, { - "include": "#member-access-expression" + "include": "#invocation-expression" }, { - "include": "#invocation-expression" + "include": "#member-access-expression" }, { "include": "#element-access-expression" @@ -613,7 +614,7 @@ ] }, "delegate-declaration": { - "begin": "(?x)\n(?:\\b(delegate)\\b)\\s+\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s+\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", + "begin": "(?x)\n(?:\\b(delegate)\\b)\\s+\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", "beginCaptures": { "1": { "name": "keyword.other.delegate.cs" @@ -964,7 +965,7 @@ ] }, "field-declaration": { - "begin": "(?x)\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s+\n(\\g)\\s* # first field name\n(?!=>|==)(?=,|;|=|$)", + "begin": "(?x)\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)\\s* # first field name\n(?!=>|==)(?=,|;|=|$)", "beginCaptures": { "1": { "patterns": [ @@ -998,7 +999,7 @@ ] }, "property-declaration": { - "begin": "(?x)\n(?!.*\\b(?:class|interface|struct|enum|event)\\b)\\s*\n(?\n (?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g)\\s*\n(?=\\{|=>|$)", + "begin": "(?x)\n(?!.*\\b(?:class|interface|struct|enum|event)\\b)\\s*\n(?\n (?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g)\\s*\n(?=\\{|=>|$)", "beginCaptures": { "1": { "patterns": [ @@ -1041,7 +1042,7 @@ ] }, "indexer-declaration": { - "begin": "(?x)\n(?\n (?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?this)\\s*\n(?=\\[)", + "begin": "(?x)\n(?\n (?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?this)\\s*\n(?=\\[)", "beginCaptures": { "1": { "patterns": [ @@ -1084,7 +1085,7 @@ ] }, "event-declaration": { - "begin": "(?x)\n\\b(event)\\b\\s*\n(?\n (?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g(?:\\s*,\\s*\\g)*)\\s*\n(?=\\{|;|$)", + "begin": "(?x)\n\\b(event)\\b\\s*\n(?\n (?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g(?:\\s*,\\s*\\g)*)\\s*\n(?=\\{|;|$)", "beginCaptures": { "1": { "name": "keyword.other.event.cs" @@ -1214,7 +1215,7 @@ ] }, "method-declaration": { - "begin": "(?x)\n(?\n (?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", + "begin": "(?x)\n(?\n (?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", "beginCaptures": { "1": { "patterns": [ @@ -1350,7 +1351,7 @@ ] }, "operator-declaration": { - "begin": "(?x)\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s*\n(?(?:\\b(?:operator)))\\s*\n(?(?:\\+|-|\\*|/|%|&|\\||\\^|\\<\\<|\\>\\>|==|!=|\\>|\\<|\\>=|\\<=|!|~|\\+\\+|--|true|false))\\s*\n(?=\\()", + "begin": "(?x)\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?(?:\\b(?:operator)))\\s*\n(?(?:\\+|-|\\*|/|%|&|\\||\\^|\\<\\<|\\>\\>|==|!=|\\>|\\<|\\>=|\\<=|!|~|\\+\\+|--|true|false))\\s*\n(?=\\()", "beginCaptures": { "1": { "patterns": [ @@ -1383,7 +1384,7 @@ ] }, "conversion-operator-declaration": { - "begin": "(?x)\n(?(?:\\b(?:explicit|implicit)))\\s*\n(?(?:\\b(?:operator)))\\s*\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s*\n(?=\\()", + "begin": "(?x)\n(?(?:\\b(?:explicit|implicit)))\\s*\n(?(?:\\b(?:operator)))\\s*\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\()", "beginCaptures": { "1": { "patterns": [ @@ -1839,7 +1840,7 @@ }, "patterns": [ { - "match": "(?x)\n(?:\n (\\bvar\\b)|\n (?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n)\\s+\n(\\g)\\s+\n\\b(in)\\b", + "match": "(?x)\n(?:\n (\\bvar\\b)|\n (?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g)\\s+\n\\b(in)\\b", "captures": { "1": { "name": "keyword.other.var.cs" @@ -1909,6 +1910,9 @@ }, "end": "(?<=\\})", "patterns": [ + { + "include": "#comment" + }, { "include": "#block" } @@ -1923,6 +1927,9 @@ }, "end": "(?<=\\})", "patterns": [ + { + "include": "#comment" + }, { "include": "#block" } @@ -1952,7 +1959,7 @@ }, "patterns": [ { - "match": "(?x)\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s*\n(?:\\b(\\g)\\b)?", + "match": "(?x)\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?:\\b(\\g)\\b)?", "captures": { "1": { "patterns": [ @@ -1971,6 +1978,9 @@ { "include": "#when-clause" }, + { + "include": "#comment" + }, { "include": "#block" } @@ -1995,6 +2005,9 @@ "patterns": [ { "include": "#expression" + }, + { + "include": "#comment" } ] }, @@ -2109,7 +2122,7 @@ ] }, "local-variable-declaration": { - "begin": "(?x)\n(?:\n (\\bvar\\b)|\n (?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n)\\s+\n(\\g)\\s*\n(?=,|;|=|\\))", + "begin": "(?x)\n(?:\n (\\bvar\\b)|\n (?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g)\\s*\n(?=,|;|=|\\))", "beginCaptures": { "1": { "name": "keyword.other.var.cs" @@ -2143,7 +2156,7 @@ ] }, "local-constant-declaration": { - "begin": "(?x)\n(?\\b(?:const)\\b)\\s*\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s+\n(\\g)\\s*\n(?=,|;|=)", + "begin": "(?x)\n(?\\b(?:const)\\b)\\s*\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)\\s*\n(?=,|;|=)", "beginCaptures": { "1": { "name": "storage.modifier.cs" @@ -2233,7 +2246,7 @@ "include": "#tuple-declaration-deconstruction-element-list" }, { - "include": "#declaration-expression" + "include": "#declaration-expression-tuple" }, { "include": "#punctuation-comma" @@ -2269,7 +2282,7 @@ "include": "#tuple-deconstruction-element-list" }, { - "include": "#declaration-expression" + "include": "#declaration-expression-tuple" }, { "include": "#punctuation-comma" @@ -2284,8 +2297,26 @@ } ] }, - "declaration-expression": { - "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n)\\s+\n\\b(\\g)\\b\\s*\n(?=[,)])", + "declaration-expression-local": { + "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n\\b(\\g)\\b\\s*\n(?=[,)\\]])", + "captures": { + "1": { + "name": "keyword.other.var.cs" + }, + "2": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "name": "entity.name.variable.local.cs" + } + } + }, + "declaration-expression-tuple": { + "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n\\b(\\g)\\b\\s*\n(?=[,)])", "captures": { "1": { "name": "keyword.other.var.cs" @@ -2752,7 +2783,7 @@ "match": "[_[:alpha:]][_[:alnum:]]*" }, "cast-expression": { - "match": "(?x)\n(\\()\\s*\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s*\n(\\))(?=\\s*[_[:alnum:]\\(])", + "match": "(?x)\n(\\()\\s*\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(\\))(?=\\s*[_[:alnum:]\\(])", "captures": { "1": { "name": "punctuation.parenthesis.open.cs" @@ -2770,7 +2801,7 @@ } }, "as-expression": { - "match": "(?x)\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)?", + "match": "(?x)\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?", "captures": { "1": { "name": "keyword.other.as.cs" @@ -2785,7 +2816,7 @@ } }, "is-expression": { - "match": "(?x)\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)?", + "match": "(?x)\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?", "captures": { "1": { "name": "keyword.other.is.cs" @@ -2915,7 +2946,7 @@ ] }, "object-creation-expression-with-parameters": { - "begin": "(?x)\n(new)\\s+\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s*\n(?=\\()", + "begin": "(?x)\n(new)\\s+\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\()", "beginCaptures": { "1": { "name": "keyword.other.new.cs" @@ -2936,7 +2967,7 @@ ] }, "object-creation-expression-with-no-parameters": { - "match": "(?x)\n(new)\\s+\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\\s*\n(?=\\{|$)", + "match": "(?x)\n(new)\\s+\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\{|$)", "captures": { "1": { "name": "keyword.other.new.cs" @@ -2951,7 +2982,7 @@ } }, "array-creation-expression": { - "begin": "(?x)\n\\b(new)\\b\\s*\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)?\\s*\n(?=\\[)", + "begin": "(?x)\n\\b(new)\\b\\s*\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\\s*\n(?=\\[)", "beginCaptures": { "1": { "name": "keyword.other.new.cs" @@ -3150,13 +3181,16 @@ "name": "storage.modifier.cs", "match": "\\b(ref|out)\\b" }, + { + "include": "#declaration-expression-local" + }, { "include": "#expression" } ] }, "query-expression": { - "begin": "(?x)\n\\b(from)\\b\\s*\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)?\n\\b(\\g)\\b\\s*\n\\b(in)\\b\\s*", + "begin": "(?x)\n\\b(from)\\b\\s*\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\n\\b(\\g)\\b\\s*\n\\b(in)\\b\\s*", "beginCaptures": { "1": { "name": "keyword.query.from.cs" @@ -3248,7 +3282,7 @@ ] }, "join-clause": { - "begin": "(?x)\n\\b(join)\\b\\s*\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)?\n\\b(\\g)\\b\\s*\n\\b(in)\\b\\s*", + "begin": "(?x)\n\\b(join)\\b\\s*\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\n\\b(\\g)\\b\\s*\n\\b(in)\\b\\s*", "beginCaptures": { "1": { "name": "keyword.query.join.cs" @@ -3512,7 +3546,7 @@ ] }, "lambda-parameter": { - "match": "(?x)\n(ref|out)?\\s*\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)?\n\\b(\\g)\\b\\s*\n(?=[,)])", + "match": "(?x)\n(ref|out)?\\s*\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\n\\b(\\g)\\b\\s*\n(?=[,)])", "captures": { "1": { "name": "storage.modifier.cs" @@ -3578,7 +3612,7 @@ ] }, "tuple-element": { - "match": "(?x)\n(?\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* # Are there any more names being dotted into?\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )|\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n)\n(?:\\b(?\\g)\\b)?", + "match": "(?x)\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\n(?:\\b(?\\g)\\b)?", "captures": { "1": { "patterns": [ From 60a3e8efd1b3c9b3465f2734f019af03cba4a533 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 30 May 2017 15:26:28 -0700 Subject: [PATCH 1312/2747] Revert "Improve issue template" This reverts commit 85a56e643b0b126a4bd42b5b438e0dfb984e665e. --- issue_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/issue_template.md b/issue_template.md index ad023f7b7c8e9..81a8470fc44a7 100644 --- a/issue_template.md +++ b/issue_template.md @@ -6,4 +6,4 @@ Steps to Reproduce: 1. -1. +2. From e8923e9dccc2573aaa02f3b6d2757656356fa785 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 30 May 2017 15:09:46 -0700 Subject: [PATCH 1313/2747] Pick up ts 2.3.4 --- extensions/npm-shrinkwrap.json | 6 +++--- extensions/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/npm-shrinkwrap.json b/extensions/npm-shrinkwrap.json index 42a40f5d35f37..c7036103d67b3 100644 --- a/extensions/npm-shrinkwrap.json +++ b/extensions/npm-shrinkwrap.json @@ -3,9 +3,9 @@ "version": "0.0.1", "dependencies": { "typescript": { - "version": "2.3.3,", - "from": "typescript@typescript@2.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.3.3.tgz" + "version": "2.3.4,", + "from": "typescript@typescript@2.3.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.3.4.tgz" } } } diff --git a/extensions/package.json b/extensions/package.json index ea392e28559a6..18e2c7dafbc30 100644 --- a/extensions/package.json +++ b/extensions/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "description": "Dependencies shared by all extensions", "dependencies": { - "typescript": "typescript@2.3.3" + "typescript": "typescript@2.3.4" }, "scripts": { "postinstall": "node ./postinstall" From 3f2ed7f43566022b2c4d2ec6d39ff39fdc5b7601 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Tue, 30 May 2017 15:54:31 -0700 Subject: [PATCH 1314/2747] Use existing colors (#27497) --- .../page/electron-browser/welcomePage.ts | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 86dde1dd27dcf..6141d64d0bb6a 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -35,7 +35,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { tildify } from 'vs/base/common/labels'; import { isLinux } from 'vs/base/common/platform'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { registerColor, textLinkForeground, foreground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, textLinkForeground, foreground, descriptionForeground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { getExtraColor } from 'vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils'; used(); @@ -447,20 +447,17 @@ class WelcomePage { // theming -const caption = registerColor('welcomePage.caption', { dark: '#FFFFFFC2', light: '#000000D4', hc: foreground }, localize('welcomePage.caption', 'Caption color on the Welcome page.')); -const detail = registerColor('welcomePage.detail', { dark: '#FFFFFF76', light: '#00000088', hc: foreground }, localize('welcomePage.detail', 'Detail color on the Welcome page.')); - const quickLinkBackground = registerColor('welcomePage.quickLinkBackground', { dark: null, light: null, hc: null }, localize('welcomePage.quickLinkBackground', 'Background color for the quick links on the Welcome page.')); const quickLinkHoverBackground = registerColor('welcomePage.quickLinkHoverBackground', { dark: null, light: null, hc: null }, localize('welcomePage.quickLinkHoverBackground', 'Hover background color for the quick links on the Welcome page.')); registerThemingParticipant((theme, collector) => { - const captionColor = theme.getColor(caption); - if (captionColor) { - collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .caption { color: ${captionColor}; }`); + const foregroundColor = theme.getColor(foreground); + if (foregroundColor) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .caption { color: ${foregroundColor}; }`); } - const detailColor = theme.getColor(detail); - if (detailColor) { - collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .detail { color: ${detailColor}; }`); + const descriptionColor = theme.getColor(descriptionForeground); + if (descriptionColor) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .detail { color: ${descriptionColor}; }`); } const color = getExtraColor(theme, quickLinkBackground, { dark: 'rgba(0, 0, 0, .2)', extra_dark: 'rgba(200, 235, 255, .042)', light: 'rgba(0,0,0,.04)', hc: 'black' }); if (color) { From 91c7fbe2421e679c69a4ce8c58711635a888f905 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 30 May 2017 16:36:03 -0700 Subject: [PATCH 1315/2747] Add npm location setting For #24961 Picks up https://github.com/Microsoft/TypeScript/pull/16084/files Allows users to manually set the npm install location --- extensions/typescript/package.json | 8 ++++++++ extensions/typescript/package.nls.json | 1 + extensions/typescript/src/typescriptService.ts | 4 ++++ extensions/typescript/src/typescriptServiceClient.ts | 12 +++++++++++- 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index 11b75cfc26bfe..27869655d20c6 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -103,6 +103,14 @@ "default": true, "description": "%typescript.check.tscVersion%" }, + "typescript.npm": { + "type": [ + "string", + "null" + ], + "default": null, + "description": "%typescript.npm%" + }, "typescript.check.npmIsInstalled": { "type": "boolean", "default": true, diff --git a/extensions/typescript/package.nls.json b/extensions/typescript/package.nls.json index 0679841532d80..6aab169b6fbbd 100644 --- a/extensions/typescript/package.nls.json +++ b/extensions/typescript/package.nls.json @@ -36,6 +36,7 @@ "typescript.selectTypeScriptVersion.title": "Select TypeScript Version", "jsDocCompletion.enabled": "Enable/disable auto JSDoc comments", "javascript.implicitProjectConfig.checkJs": "Enable/disable semantic checking of JavaScript files. Existing jsconfig.json or tsconfig.json files override this setting. Requires TypeScript >=2.3.1.", + "typescript.npm": "Specifies the path to the NPM install used for automatic typings acquisition. Requires TypeScript >= 2.3.4", "typescript.check.npmIsInstalled": "Check if NPM is installed for automatic typings acquisition", "javascript.nameSuggestions": "Enable/disable including unique names from the file in JavaScript suggestion lists.", "typescript.tsc.autoDetect": "Controls whether auto detection of tsc tasks is on or off." diff --git a/extensions/typescript/src/typescriptService.ts b/extensions/typescript/src/typescriptService.ts index 8b15cc79f7bc0..dd24447e92959 100644 --- a/extensions/typescript/src/typescriptService.ts +++ b/extensions/typescript/src/typescriptService.ts @@ -64,6 +64,10 @@ export class API { public has230Features(): boolean { return semver.gte(this._version, '2.3.0'); } + + public has234Features(): boolean { + return semver.gte(this._version, '2.3.4'); + } } export interface ITypescriptServiceClient { diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 5e22350feb050..d5e718bb34c1d 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -110,6 +110,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private _onReady: { promise: Promise; resolve: () => void; reject: () => void; }; private globalTsdk: string | null; private localTsdk: string | null; + private npmLocation: string | null; private _checkGlobalTSCVersion: boolean; private _experimentalAutoBuild: boolean; private tracer: Tracer; @@ -170,6 +171,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient const configuration = workspace.getConfiguration(); this.globalTsdk = this.extractGlobalTsdk(configuration); this.localTsdk = this.extractLocalTsdk(configuration); + this.npmLocation = configuration.get('typescript.npm', null); this._experimentalAutoBuild = false; // configuration.get('typescript.tsserver.experimentalAutoBuild', false); this._apiVersion = new API('1.0.0'); @@ -183,6 +185,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient let oldglobalTsdk = this.globalTsdk; let oldLocalTsdk = this.localTsdk; let oldCheckJs = this.checkJs; + const oldNpmLocation = this.npmLocation; this.tracer.updateConfiguration(); this.tsServerLogLevel = this.readTsServerLogLevel(); @@ -191,6 +194,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.globalTsdk = this.extractGlobalTsdk(configuration); this.localTsdk = this.extractLocalTsdk(configuration); this.checkJs = this.readCheckJs(); + this.npmLocation = configuration.get('typescript.npm', null); if (this.servicePromise && oldCheckJs !== this.checkJs) { this.setCompilerOptionsForInferredProjects(); @@ -198,7 +202,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient if (this.servicePromise === null && (oldglobalTsdk !== this.globalTsdk || oldLocalTsdk !== this.localTsdk)) { this.startService(); - } else if (this.servicePromise !== null && (this.tsServerLogLevel !== oldLoggingLevel || oldglobalTsdk !== this.globalTsdk || oldLocalTsdk !== this.localTsdk)) { + } else if (this.servicePromise !== null && (this.tsServerLogLevel !== oldLoggingLevel || oldglobalTsdk !== this.globalTsdk || oldLocalTsdk !== this.localTsdk || oldNpmLocation !== this.npmLocation)) { this.restartTsServer(); } })); @@ -478,6 +482,12 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } } + if (this.apiVersion.has234Features()) { + if (this.npmLocation) { + args.push('--npmLocation', `"${this.npmLocation}"`); + } + } + electron.fork(modulePath, args, options, this.logger, (err: any, childProcess: cp.ChildProcess) => { if (err) { this.lastError = err; From 88073e8288d65af77b6f51017e02fdff07649d20 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 30 May 2017 16:51:15 -0700 Subject: [PATCH 1316/2747] Correctly mark typescript.npm as isExecutable --- extensions/typescript/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index 27869655d20c6..879cf4ebc0129 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -109,7 +109,8 @@ "null" ], "default": null, - "description": "%typescript.npm%" + "description": "%typescript.npm%", + "isExecutable": true }, "typescript.check.npmIsInstalled": { "type": "boolean", From f0cb8bf271b85409ca4ebb3491e84458f465687d Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 30 May 2017 16:55:03 -0700 Subject: [PATCH 1317/2747] Remove bit about path from npm warning since it may be confusing. Will update documentation --- extensions/typescript/src/utils/typingsStatus.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/typescript/src/utils/typingsStatus.ts b/extensions/typescript/src/utils/typingsStatus.ts index 44f90ec15c1a9..9bdbd6d107076 100644 --- a/extensions/typescript/src/utils/typingsStatus.ts +++ b/extensions/typescript/src/utils/typingsStatus.ts @@ -106,7 +106,7 @@ export class AtaProgressReporter { window.showWarningMessage( localize( 'typesInstallerInitializationFailed.title', - "Could not install typings files for JavaScript language features. Please ensure that NPM is installed and is in your PATH" + "Could not install typings files for JavaScript language features. Please ensure that NPM is installed" ), { title: localize('typesInstallerInitializationFailed.moreInformation', "More Information"), id: 1 From d4668fce3996fbb784f1fe98926095006349a490 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Tue, 30 May 2017 17:44:30 -0700 Subject: [PATCH 1318/2747] Fixes #27633 and Fixes #27634 --- extensions/emmet/src/editPoint.ts | 4 ++-- .../parts/emmet/electron-browser/actions/editPoints.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/emmet/src/editPoint.ts b/extensions/emmet/src/editPoint.ts index 757dad1b16a7e..e7f468f29c704 100644 --- a/extensions/emmet/src/editPoint.ts +++ b/extensions/emmet/src/editPoint.ts @@ -41,13 +41,13 @@ function prevEditPoint(position: vscode.Position, editor: vscode.TextEditor): vs function findEditPoint(lineNum: number, editor: vscode.TextEditor, position: vscode.Position, direction: string): vscode.Selection { let line = editor.document.lineAt(lineNum); + let lineContent = line.text; if (lineNum !== position.line && line.isEmptyOrWhitespace) { - editor.selection = new vscode.Selection(lineNum, 0, lineNum, 0); + editor.selection = new vscode.Selection(lineNum, lineContent.length, lineNum, lineContent.length); return; } - let lineContent = line.text; if (lineNum === position.line && direction === 'prev') { lineContent = lineContent.substr(0, position.character); } diff --git a/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.ts index d74d9e327718d..d4d1111fe5c92 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.ts @@ -16,7 +16,7 @@ class PreviousEditPointAction extends BasicEmmetEditorAction { super( 'editor.emmet.action.previousEditPoint', nls.localize('previousEditPoint', "Emmet: Previous Edit Point"), - 'Emmet: Previous Edit Point', + 'Emmet: Go to Previous Edit Point', 'prev_edit_point' ); } @@ -28,7 +28,7 @@ class NextEditPointAction extends BasicEmmetEditorAction { super( 'editor.emmet.action.nextEditPoint', nls.localize('nextEditPoint', "Emmet: Next Edit Point"), - 'Emmet: Next Edit Point', + 'Emmet: Go to Next Edit Point', 'next_edit_point' ); } From 1d93668c0e5e8bf91aa70f92c998bd34d548c2e7 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Tue, 30 May 2017 17:57:46 -0700 Subject: [PATCH 1319/2747] Fixes #27630 --- extensions/emmet/src/toggleComment.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/extensions/emmet/src/toggleComment.ts b/extensions/emmet/src/toggleComment.ts index f87bd831209bd..17aabeaca4484 100644 --- a/extensions/emmet/src/toggleComment.ts +++ b/extensions/emmet/src/toggleComment.ts @@ -60,6 +60,9 @@ export function toggleComment() { function toggleCommentHTML(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): [vscode.Range[], vscode.Position, vscode.Position] { let offset = document.offsetAt(selection.start); let nodeToUpdate = getNode(rootNode, offset); + if (!nodeToUpdate) { + return [[], null, null]; + } let rangesToUnComment = getRangesToUnCommentHTML(nodeToUpdate, document); if (nodeToUpdate.type === 'comment') { @@ -101,8 +104,13 @@ function toggleCommentStylesheet(document: vscode.TextDocument, selection: vscod return [rangesToUnComment, null, null]; } + // Find the node that needs to be commented + let nodeToComment = getNode(rootNode, selectionStart, true); + if (!nodeToComment) { + return [[], null, null]; + } + // Uncomment children of current node and then comment the node - let nodeToComment = getNode(rootNode, selectionStart); rangesToUnComment = getRangesToUnCommentStylesheet(rootNode, nodeToComment.start, nodeToComment.end, document, false); let positionForCommentStart = document.positionAt(nodeToComment.start); let positionForCommentEnd = document.positionAt(nodeToComment.end); From 0977276c2b19e38625d30e52cad43a8e4600cc86 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Tue, 30 May 2017 17:58:48 -0700 Subject: [PATCH 1320/2747] Fixes #27623 --- extensions/emmet/src/matchTag.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/emmet/src/matchTag.ts b/extensions/emmet/src/matchTag.ts index e5efc2d8e32b3..a3e22642226e7 100644 --- a/extensions/emmet/src/matchTag.ts +++ b/extensions/emmet/src/matchTag.ts @@ -29,7 +29,7 @@ export function matchTag() { } function getUpdatedSelections(editor: vscode.TextEditor, offset: number, rootNode: Node): vscode.Selection { - let currentNode = getNode(rootNode, offset); + let currentNode = getNode(rootNode, offset, true); // If no closing tag or cursor is between open and close tag, then no-op if (!currentNode.close || (currentNode.open.end < offset && currentNode.close.start > offset)) { From 436789a1eb64a1cad70346fe2e155ba5b6c73846 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Tue, 30 May 2017 18:16:10 -0700 Subject: [PATCH 1321/2747] Fixes #27618 --- extensions/emmet/src/extension.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/emmet/src/extension.ts b/extensions/emmet/src/extension.ts index 15a1bfa4a0336..2fb79bdadd37b 100644 --- a/extensions/emmet/src/extension.ts +++ b/extensions/emmet/src/extension.ts @@ -22,12 +22,12 @@ interface ISupportedLanguageMode { } const SUPPORTED_LANGUAGE_MODES: ISupportedLanguageMode[] = [ - { id: 'html', triggerCharacters: ['!', '.'] }, - { id: 'jade', triggerCharacters: ['!', '.'] }, - { id: 'slim', triggerCharacters: ['!', '.'] }, - { id: 'haml', triggerCharacters: ['!', '.'] }, - { id: 'xml', triggerCharacters: ['.'] }, - { id: 'xsl', triggerCharacters: ['.'] }, + { id: 'html', triggerCharacters: ['!', '.', '}'] }, + { id: 'jade', triggerCharacters: ['!', '.', '}'] }, + { id: 'slim', triggerCharacters: ['!', '.', '}'] }, + { id: 'haml', triggerCharacters: ['!', '.', '}'] }, + { id: 'xml', triggerCharacters: ['.', '}'] }, + { id: 'xsl', triggerCharacters: ['.', '}'] }, { id: 'css', triggerCharacters: [':'] }, { id: 'scss', triggerCharacters: [':'] }, From 3a6eda74ead5b5b041da0bbc18b70218e8c95bba Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Tue, 30 May 2017 18:21:36 -0700 Subject: [PATCH 1322/2747] Fixes #27609 --- extensions/emmet/src/emmetCompletionProvider.ts | 2 +- .../emmet/electron-browser/actions/expandAbbreviation.ts | 2 +- .../parts/emmet/electron-browser/emmet.contribution.ts | 4 ++-- src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/extensions/emmet/src/emmetCompletionProvider.ts b/extensions/emmet/src/emmetCompletionProvider.ts index 9fb7bf46af5bd..8e77e0cec841a 100644 --- a/extensions/emmet/src/emmetCompletionProvider.ts +++ b/extensions/emmet/src/emmetCompletionProvider.ts @@ -15,7 +15,7 @@ export class EmmetCompletionItemProvider implements vscode.CompletionItemProvide public provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Thenable { - if (!vscode.workspace.getConfiguration('emmet')['useModules']) { + if (!vscode.workspace.getConfiguration('emmet')['useNewEmmet']) { return Promise.resolve(null); } diff --git a/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts index 26125b52a0f91..05acd8aa0459e 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts @@ -33,7 +33,7 @@ class ExpandAbbreviationAction extends BasicEmmetEditorAction { EditorContextKeys.hasSingleSelection, EditorContextKeys.tabDoesNotMoveFocus, ContextKeyExpr.has('config.emmet.triggerExpansionOnTab'), - ContextKeyExpr.not('config.emmet.useModules') + ContextKeyExpr.not('config.emmet.useNewEmmet') ) } ); diff --git a/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.ts b/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.ts index 0a177c237f649..e27026f8a0b74 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.ts @@ -60,10 +60,10 @@ configurationRegistry.registerConfiguration({ 'default': null, 'description': nls.localize('emmetExtensionsPath', 'Path to a folder containing emmet profiles, snippets and preferences') }, - 'emmet.useModules': { + 'emmet.useNewEmmet': { 'type': 'boolean', 'default': false, - 'description': nls.localize('emmetUseModules', 'Use the new emmet modules for emmet features than the single emmet library.') + 'description': nls.localize('useNewEmmet', 'Try out the new emmet modules (which will eventually replace the old single emmet library) for all emmet features.') } } }); diff --git a/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts b/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts index c2325f2a22f59..a313f378b211b 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts @@ -31,7 +31,7 @@ interface IEmmetConfiguration { triggerExpansionOnTab: boolean, excludeLanguages: string[], extensionsPath: string, - useModules: boolean + useNewEmmet: boolean }; } @@ -290,7 +290,7 @@ export abstract class EmmetEditorAction extends EditorAction { const commandService = accessor.get(ICommandService); let mappedCommand = this.actionMap[this.id]; - if (mappedCommand && configurationService.getConfiguration().emmet.useModules) { + if (mappedCommand && configurationService.getConfiguration().emmet.useNewEmmet) { return commandService.executeCommand(mappedCommand); } From f6b27b808b73dbfba232ef1cf34dff956aefd02a Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 31 May 2017 07:41:17 +0200 Subject: [PATCH 1323/2747] theming - guard against missing colors --- .../parts/activitybar/activitybarActions.ts | 29 ++++++------ .../browser/parts/panel/panelPart.ts | 46 +++++++++++-------- .../services/message/browser/messageList.ts | 5 +- 3 files changed, 45 insertions(+), 35 deletions(-) diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts index 08a7aea55c403..ab0ec27b42091 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts @@ -731,21 +731,22 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { // Styling without outline color else { const focusBorderColor = theme.getColor(focusBorder); + if (focusBorderColor) { + collector.addRule(` + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active .action-label, + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:focus .action-label, + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:hover .action-label { + opacity: 1; + } - collector.addRule(` - .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active .action-label, - .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:focus .action-label, - .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:hover .action-label { - opacity: 1; - } - - .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item .action-label { - opacity: 0.6; - } + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item .action-label { + opacity: 0.6; + } - .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:focus:before { - border-left-color: ${focusBorderColor}; - } - `); + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:focus:before { + border-left-color: ${focusBorderColor}; + } + `); + } } }); \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index 8f535d23acfb3..1a8f0cf4529bf 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -197,32 +197,38 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { // Title Active const titleActive = theme.getColor(PANEL_ACTIVE_TITLE_FOREGROUND); const titleActiveBorder = theme.getColor(PANEL_ACTIVE_TITLE_BORDER); - collector.addRule(` - .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:hover .action-label, - .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label.checked { - color: ${titleActive}; - border-bottom-color: ${titleActiveBorder}; - } - `); + if (titleActive || titleActiveBorder) { + collector.addRule(` + .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item:hover .action-label, + .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label.checked { + color: ${titleActive}; + border-bottom-color: ${titleActiveBorder}; + } + `); + } // Title Inactive const titleInactive = theme.getColor(PANEL_INACTIVE_TITLE_FOREGROUND); - collector.addRule(` - .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label { - color: ${titleInactive}; - } - `); + if (titleInactive) { + collector.addRule(` + .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label { + color: ${titleInactive}; + } + `); + } // Title focus const focusBorderColor = theme.getColor(focusBorder); - collector.addRule(` - .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label:focus { - color: ${titleActive}; - border-bottom-color: ${focusBorderColor} !important; - border-bottom: 1px solid; - outline: none; - } - `); + if (focusBorderColor) { + collector.addRule(` + .monaco-workbench > .part.panel > .title > .panel-switcher-container > .monaco-action-bar .action-item .action-label:focus { + color: ${titleActive}; + border-bottom-color: ${focusBorderColor} !important; + border-bottom: 1px solid; + outline: none; + } + `); + } // Styling with Outline color (e.g. high contrast theme) const outline = theme.getColor(activeContrastBorder); diff --git a/src/vs/workbench/services/message/browser/messageList.ts b/src/vs/workbench/services/message/browser/messageList.ts index 0afb355a590cd..744b5818055c1 100644 --- a/src/vs/workbench/services/message/browser/messageList.ts +++ b/src/vs/workbench/services/message/browser/messageList.ts @@ -111,7 +111,10 @@ export class MessageList { this.warningBackground = theme.getColor(inputValidationWarningBorder); this.errorBackground = theme.getColor(inputValidationErrorBorder); - collector.addRule(`.global-message-list li.message-list-entry .actions-container .message-action .action-button:hover { background-color: ${theme.getColor(buttonHoverBackground)} !important; }`); + const buttonHoverBackgroundColor = theme.getColor(buttonHoverBackground); + if (buttonHoverBackgroundColor) { + collector.addRule(`.global-message-list li.message-list-entry .actions-container .message-action .action-button:hover { background-color: ${buttonHoverBackgroundColor} !important; }`); + } this.updateStyles(); })); From e424344c8924f381a76b33f19fada89e432209e9 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 30 May 2017 23:37:00 -0700 Subject: [PATCH 1324/2747] Fixes #27420 --- extensions/typescript/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index 879cf4ebc0129..7d5105c3dca38 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -124,7 +124,7 @@ }, "typescript.referencesCodeLens.enabled": { "type": "boolean", - "default": true, + "default": false, "description": "%typescript.referencesCodeLens.enabled%" }, "typescript.implementationsCodeLens.enabled": { From 5dfc0e783e9edcc50a2271c8c315de9e98bd1821 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Tue, 30 May 2017 23:41:42 -0700 Subject: [PATCH 1325/2747] Fixes #27675 --- src/vs/editor/contrib/suggest/browser/media/suggest.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index 7ca54b83969b6..41ac9914b3116 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -16,14 +16,14 @@ .monaco-editor .suggest-widget > .tree, .monaco-editor .suggest-widget > .details { - width: 428px; + width: calc(100% - 2px); border-style: solid; border-width: 1px; } .monaco-editor.hc-black .suggest-widget > .tree, .monaco-editor.hc-black .suggest-widget > .details { - width: 426px; + width: calc(100% - 4px); border-width: 2px; } From 2cc2594934439ffe46ce251ac22ced64012ae872 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Tue, 30 May 2017 23:50:06 -0700 Subject: [PATCH 1326/2747] Fixes #27673 --- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index c5559659a7ffd..e28154b9f425c 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -809,6 +809,9 @@ export class SuggestWidget implements IContentWidget, IDelegate } toggleDetails(): void { + if (!canExpandCompletionItem(this.list.getFocusedElements()[0])) { + return; + } if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, expandSuggestionDocsByDefault)) { this.storageService.store('expandSuggestionDocs', false, StorageScope.GLOBAL); From 396bb476981c2548eb93a99fb0aba9e054b5353f Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Tue, 30 May 2017 23:57:49 -0700 Subject: [PATCH 1327/2747] Fixes #27656 --- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index e28154b9f425c..6cbef7682da21 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -563,8 +563,6 @@ export class SuggestWidget implements IContentWidget, IDelegate if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, expandSuggestionDocsByDefault)) { this.showDetails(); - - this._ariaAlert(this.details.getAriaLabel()); } else { removeClass(this.element, 'docs-side'); } @@ -845,6 +843,8 @@ export class SuggestWidget implements IContentWidget, IDelegate this.adjustDocsPosition(); this.editor.focus(); + + this._ariaAlert(this.details.getAriaLabel()); } private show(): void { From 770fa41896cf87de9479c11e7f1892444e60899b Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 31 May 2017 00:09:30 -0700 Subject: [PATCH 1328/2747] Fixes #27651 --- .../contrib/suggest/browser/suggestWidget.ts | 45 ++++++++++--------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 6cbef7682da21..1ebbe971fac5b 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -694,6 +694,11 @@ export class SuggestWidget implements IContentWidget, IDelegate } else { this.setState(State.Open); } + + // Reset focus border + if (this.detailsBorderColor) { + this.details.element.style.borderColor = this.detailsBorderColor; + } } } @@ -964,29 +969,29 @@ export class SuggestWidget implements IContentWidget, IDelegate } // Fix for #26244 - if (hasClass(this.element, 'list-right')) { - addClass(this.listElement, 'empty-left-border'); - removeClass(this.listElement, 'empty-right-border'); - } else { - addClass(this.listElement, 'empty-right-border'); - removeClass(this.listElement, 'empty-left-border'); - } - - removeClass(this.details.element, 'empty-left-border'); - removeClass(this.details.element, 'empty-right-border'); + // if (hasClass(this.element, 'list-right')) { + // addClass(this.listElement, 'empty-left-border'); + // removeClass(this.listElement, 'empty-right-border'); + // } else { + // addClass(this.listElement, 'empty-right-border'); + // removeClass(this.listElement, 'empty-left-border'); + // } + + // removeClass(this.details.element, 'empty-left-border'); + // removeClass(this.details.element, 'empty-right-border'); return; } else { // Fix for #26244 - if (hasClass(this.element, 'list-right')) { - addClass(this.details.element, 'empty-right-border'); - removeClass(this.details.element, 'empty-left-border'); - } else { - addClass(this.details.element, 'empty-left-border'); - removeClass(this.details.element, 'empty-right-border'); - } - - removeClass(this.listElement, 'empty-right-border'); - removeClass(this.listElement, 'empty-left-border'); + // if (hasClass(this.element, 'list-right')) { + // addClass(this.details.element, 'empty-right-border'); + // removeClass(this.details.element, 'empty-left-border'); + // } else { + // addClass(this.details.element, 'empty-left-border'); + // removeClass(this.details.element, 'empty-right-border'); + // } + + // removeClass(this.listElement, 'empty-right-border'); + // removeClass(this.listElement, 'empty-left-border'); } } From c1d3334fc2eb70b3dd61954561806a890b76ffc4 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 31 May 2017 09:35:07 +0200 Subject: [PATCH 1329/2747] Close any notifications before clicking on the tab. Fixes #27606. --- test/smoke/src/areas/common.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/smoke/src/areas/common.ts b/test/smoke/src/areas/common.ts index 96515d7ca49f5..aaf753bbfda34 100644 --- a/test/smoke/src/areas/common.ts +++ b/test/smoke/src/areas/common.ts @@ -45,7 +45,7 @@ export class CommonActions { } public async getTab(tabName: string, active?: boolean): Promise { - await this.spectron.command('workbench.action.closeMessages'); // close any notification messages that could overlap tabs + await this.closeCurrentNotification(); // close any notification messages that could overlap tabs let tabSelector = active ? '.tab.active' : 'div'; let el = await this.spectron.client.element(`.tabs-container ${tabSelector}[aria-label="${tabName}, tab"]`); @@ -56,7 +56,8 @@ export class CommonActions { return undefined; } - public selectTab(tabName: string): Promise { + public async selectTab(tabName: string): Promise { + await this.closeCurrentNotification(); // close any notification messages that could overlap tabs return this.spectron.client.click(`.tabs-container div[aria-label="${tabName}, tab"]`); } @@ -162,4 +163,8 @@ export class CommonActions { throw new Error(`Failed to remove ${directory} with an error: ${e}`); } } + + private closeCurrentNotification(): Promise { + return this.spectron.command('workbench.action.closeMessages'); + } } \ No newline at end of file From e70d11da0b00465dbc8a6d2107ba7f0feb26d77e Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 31 May 2017 09:38:24 +0200 Subject: [PATCH 1330/2747] Triple equals for keybinding find. --- test/smoke/src/spectron/application.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/smoke/src/spectron/application.ts b/test/smoke/src/spectron/application.ts index 0c8896bcc8d7a..4d64259ae1716 100644 --- a/test/smoke/src/spectron/application.ts +++ b/test/smoke/src/spectron/application.ts @@ -134,7 +134,7 @@ export class SpectronApplication { * @param command command (e.g. 'workbench.action.files.newUntitledFile') */ public command(command: string, capture?: boolean): Promise { - const binding = this.keybindings.find(x => x['command'] == command); + const binding = this.keybindings.find(x => x['command'] === command); const keys: string = binding.key; let keysToPress: string[] = []; From ef85e633e6692376ffc1cf821d0afdf3e22ae304 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 31 May 2017 11:01:36 +0200 Subject: [PATCH 1331/2747] fix windows build on appveyor --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index c18b32095bf3f..49e80fed313b4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,7 +4,7 @@ environment: install: - ps: Install-Product node 7.4.0 x64 - - npm install -g npm --silent + - npm install -g npm@4 --silent - npm install -g gulp mocha --silent build_script: From cc51097a6cc07ea4b558ad905957d6c0e696e015 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 31 May 2017 11:16:20 +0200 Subject: [PATCH 1332/2747] Rename multicursorModifier to multiCursorModifier (#27680) --- src/vs/editor/browser/view/viewController.ts | 4 +-- .../common/config/commonEditorConfig.ts | 4 +-- src/vs/editor/common/config/editorOptions.ts | 32 +++++++++---------- .../browser/clickLinkGesture.ts | 10 +++--- src/vs/editor/contrib/links/browser/links.ts | 6 ++-- src/vs/monaco.d.ts | 6 ++-- 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/vs/editor/browser/view/viewController.ts b/src/vs/editor/browser/view/viewController.ts index 51beeeade2787..1ace89fcdacbe 100644 --- a/src/vs/editor/browser/view/viewController.ts +++ b/src/vs/editor/browser/view/viewController.ts @@ -102,7 +102,7 @@ export class ViewController { } private _hasMulticursorModifier(data: IMouseDispatchData): boolean { - switch (this.configuration.editor.multicursorModifier) { + switch (this.configuration.editor.multiCursorModifier) { case 'altKey': return data.altKey; case 'ctrlKey': @@ -114,7 +114,7 @@ export class ViewController { } private _hasNonMulticursorModifier(data: IMouseDispatchData): boolean { - switch (this.configuration.editor.multicursorModifier) { + switch (this.configuration.editor.multiCursorModifier) { case 'altKey': return data.ctrlKey || data.metaKey; case 'ctrlKey': diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index bf24f6608befd..aff554eab3ae2 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -321,11 +321,11 @@ const editorConfiguration: IConfigurationNode = { 'default': EDITOR_DEFAULTS.viewInfo.scrollbar.mouseWheelScrollSensitivity, 'description': nls.localize('mouseWheelScrollSensitivity', "A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events") }, - 'editor.multicursorModifier': { + 'editor.multiCursorModifier': { 'type': 'string', 'enum': (platform.isMacintosh ? ['cmd', 'alt'] : ['ctrl', 'alt']), 'default': 'alt', - 'description': nls.localize('multicursorModifier', "The modifier to be used to add multiple cursors with the mouse.") + 'description': nls.localize('multiCursorModifier', "The modifier to be used to add multiple cursors with the mouse.") }, 'editor.quickSuggestions': { 'anyOf': [ diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index c6997e43114a3..d90ca4dea9018 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -335,7 +335,7 @@ export interface IEditorOptions { * The modifier to be used to add multiple cursors with the mouse. * Defaults to 'alt' */ - multicursorModifier?: 'cmd' | 'ctrl' | 'alt'; + multiCursorModifier?: 'cmd' | 'ctrl' | 'alt'; /** * Enable quick suggestions (shadow suggestions) * Defaults to true. @@ -788,7 +788,7 @@ export interface IValidatedEditorOptions { readonly dragAndDrop: boolean; readonly emptySelectionClipboard: boolean; readonly useTabStops: boolean; - readonly multicursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; + readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; readonly viewInfo: InternalEditorViewOptions; readonly contribInfo: EditorContribOptions; @@ -809,7 +809,7 @@ export class InternalEditorOptions { * @internal */ readonly accessibilitySupport: platform.AccessibilitySupport; - readonly multicursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; + readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; // ---- cursor options readonly wordSeparators: string; @@ -836,7 +836,7 @@ export class InternalEditorOptions { lineHeight: number; readOnly: boolean; accessibilitySupport: platform.AccessibilitySupport; - multicursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; + multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; wordSeparators: string; autoClosingBrackets: boolean; useTabStops: boolean; @@ -855,7 +855,7 @@ export class InternalEditorOptions { this.lineHeight = source.lineHeight | 0; this.readOnly = source.readOnly; this.accessibilitySupport = source.accessibilitySupport; - this.multicursorModifier = source.multicursorModifier; + this.multiCursorModifier = source.multiCursorModifier; this.wordSeparators = source.wordSeparators; this.autoClosingBrackets = source.autoClosingBrackets; this.useTabStops = source.useTabStops; @@ -880,7 +880,7 @@ export class InternalEditorOptions { && this.lineHeight === other.lineHeight && this.readOnly === other.readOnly && this.accessibilitySupport === other.accessibilitySupport - && this.multicursorModifier === other.multicursorModifier + && this.multiCursorModifier === other.multiCursorModifier && this.wordSeparators === other.wordSeparators && this.autoClosingBrackets === other.autoClosingBrackets && this.useTabStops === other.useTabStops @@ -906,7 +906,7 @@ export class InternalEditorOptions { lineHeight: (this.lineHeight !== newOpts.lineHeight), readOnly: (this.readOnly !== newOpts.readOnly), accessibilitySupport: (this.accessibilitySupport !== newOpts.accessibilitySupport), - multicursorModifier: (this.multicursorModifier !== newOpts.multicursorModifier), + multiCursorModifier: (this.multiCursorModifier !== newOpts.multiCursorModifier), wordSeparators: (this.wordSeparators !== newOpts.wordSeparators), autoClosingBrackets: (this.autoClosingBrackets !== newOpts.autoClosingBrackets), useTabStops: (this.useTabStops !== newOpts.useTabStops), @@ -1244,7 +1244,7 @@ export interface IConfigurationChangedEvent { readonly lineHeight: boolean; readonly readOnly: boolean; readonly accessibilitySupport: boolean; - readonly multicursorModifier: boolean; + readonly multiCursorModifier: boolean; readonly wordSeparators: boolean; readonly autoClosingBrackets: boolean; readonly useTabStops: boolean; @@ -1399,22 +1399,22 @@ export class EditorOptionsValidator { const contribInfo = this._sanitizeContribInfo(opts, defaults.contribInfo); let configuredMulticursorModifier: 'altKey' | 'metaKey' | 'ctrlKey'; - if (typeof opts.multicursorModifier === 'string') { + if (typeof opts.multiCursorModifier === 'string') { if (platform.isMacintosh) { - if (opts.multicursorModifier === 'cmd') { + if (opts.multiCursorModifier === 'cmd') { configuredMulticursorModifier = 'metaKey'; } else { configuredMulticursorModifier = 'altKey'; } } else { - if (opts.multicursorModifier === 'ctrl') { + if (opts.multiCursorModifier === 'ctrl') { configuredMulticursorModifier = 'ctrlKey'; } else { configuredMulticursorModifier = 'altKey'; } } } - const multicursorModifier = _stringSet<'altKey' | 'metaKey' | 'ctrlKey'>(configuredMulticursorModifier, defaults.multicursorModifier, ['altKey', 'metaKey', 'ctrlKey']); + const multiCursorModifier = _stringSet<'altKey' | 'metaKey' | 'ctrlKey'>(configuredMulticursorModifier, defaults.multiCursorModifier, ['altKey', 'metaKey', 'ctrlKey']); return { inDiffEditor: _boolean(opts.inDiffEditor, defaults.inDiffEditor), @@ -1436,7 +1436,7 @@ export class EditorOptionsValidator { dragAndDrop: _boolean(opts.dragAndDrop, defaults.dragAndDrop), emptySelectionClipboard: _boolean(opts.emptySelectionClipboard, defaults.emptySelectionClipboard), useTabStops: _boolean(opts.useTabStops, defaults.useTabStops), - multicursorModifier: multicursorModifier, + multiCursorModifier: multiCursorModifier, viewInfo: viewInfo, contribInfo: contribInfo, }; @@ -1660,7 +1660,7 @@ export class InternalEditorOptionsFactory { dragAndDrop: opts.dragAndDrop, emptySelectionClipboard: opts.emptySelectionClipboard, useTabStops: opts.useTabStops, - multicursorModifier: opts.multicursorModifier, + multiCursorModifier: opts.multiCursorModifier, viewInfo: { extraEditorClassName: opts.viewInfo.extraEditorClassName, @@ -1837,7 +1837,7 @@ export class InternalEditorOptionsFactory { lineHeight: env.fontInfo.lineHeight, readOnly: opts.readOnly, accessibilitySupport: env.accessibilitySupport, - multicursorModifier: opts.multicursorModifier, + multiCursorModifier: opts.multiCursorModifier, wordSeparators: opts.wordSeparators, autoClosingBrackets: opts.autoClosingBrackets, useTabStops: opts.useTabStops, @@ -2056,7 +2056,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { dragAndDrop: true, emptySelectionClipboard: true, useTabStops: true, - multicursorModifier: 'altKey', + multiCursorModifier: 'altKey', viewInfo: { extraEditorClassName: '', diff --git a/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts b/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts index 79d1043cf50d2..c82f9d3fa7f3a 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts @@ -82,8 +82,8 @@ export class ClickLinkOptions { } } -function createOptions(multicursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'): ClickLinkOptions { - if (multicursorModifier === 'altKey') { +function createOptions(multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'): ClickLinkOptions { + if (multiCursorModifier === 'altKey') { if (platform.isMacintosh) { return new ClickLinkOptions(KeyCode.Meta, 'metaKey', KeyCode.Alt, 'altKey'); } @@ -117,14 +117,14 @@ export class ClickLinkGesture extends Disposable { super(); this._editor = editor; - this._opts = createOptions(this._editor.getConfiguration().multicursorModifier); + this._opts = createOptions(this._editor.getConfiguration().multiCursorModifier); this.lastMouseMoveEvent = null; this.hasTriggerKeyOnMouseDown = false; this._register(this._editor.onDidChangeConfiguration((e) => { - if (e.multicursorModifier) { - const newOpts = createOptions(this._editor.getConfiguration().multicursorModifier); + if (e.multiCursorModifier) { + const newOpts = createOptions(this._editor.getConfiguration().multiCursorModifier); if (this._opts.equals(newOpts)) { return; } diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index d25c7a9a3ad26..c50fc2e0c4318 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -199,7 +199,7 @@ class LinkDetector implements editorCommon.IEditorContribution { } private updateDecorations(links: Link[]): void { - const useMetaKey = (this.editor.getConfiguration().multicursorModifier === 'altKey'); + const useMetaKey = (this.editor.getConfiguration().multiCursorModifier === 'altKey'); this.editor.changeDecorations((changeAccessor: editorCommon.IModelDecorationsChangeAccessor) => { var oldDecorations: string[] = []; let keys = Object.keys(this.currentOccurences); @@ -229,7 +229,7 @@ class LinkDetector implements editorCommon.IEditorContribution { } private _onEditorMouseMove(mouseEvent: ClickLinkMouseEvent, withKey?: ClickLinkKeyboardEvent): void { - const useMetaKey = (this.editor.getConfiguration().multicursorModifier === 'altKey'); + const useMetaKey = (this.editor.getConfiguration().multiCursorModifier === 'altKey'); if (this.isEnabled(mouseEvent, withKey)) { this.cleanUpActiveLinkDecoration(); // always remove previous link decoration as their can only be one var occurence = this.getLinkOccurence(mouseEvent.target.position); @@ -245,7 +245,7 @@ class LinkDetector implements editorCommon.IEditorContribution { } private cleanUpActiveLinkDecoration(): void { - const useMetaKey = (this.editor.getConfiguration().multicursorModifier === 'altKey'); + const useMetaKey = (this.editor.getConfiguration().multiCursorModifier === 'altKey'); if (this.activeLinkDecorationId) { var occurence = this.currentOccurences[this.activeLinkDecorationId]; if (occurence) { diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index d293d474a24fb..a6e44bb89c0e1 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2881,7 +2881,7 @@ declare module monaco.editor { * The modifier to be used to add multiple cursors with the mouse. * Defaults to 'alt' */ - multicursorModifier?: 'cmd' | 'ctrl' | 'alt'; + multiCursorModifier?: 'cmd' | 'ctrl' | 'alt'; /** * Enable quick suggestions (shadow suggestions) * Defaults to true. @@ -3263,7 +3263,7 @@ declare module monaco.editor { readonly editorClassName: string; readonly lineHeight: number; readonly readOnly: boolean; - readonly multicursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; + readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; readonly wordSeparators: string; readonly autoClosingBrackets: boolean; readonly useTabStops: boolean; @@ -3395,7 +3395,7 @@ declare module monaco.editor { readonly lineHeight: boolean; readonly readOnly: boolean; readonly accessibilitySupport: boolean; - readonly multicursorModifier: boolean; + readonly multiCursorModifier: boolean; readonly wordSeparators: boolean; readonly autoClosingBrackets: boolean; readonly useTabStops: boolean; From b8356584c681dedca400443c8c2140559a6750fa Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 31 May 2017 11:31:22 +0200 Subject: [PATCH 1333/2747] Fixes #27680: multiCursorModifer can be `ctrlCmd` or `alt` --- .../editor/common/config/commonEditorConfig.ts | 8 ++++++-- src/vs/editor/common/config/editorOptions.ts | 16 ++++------------ src/vs/monaco.d.ts | 2 +- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index aff554eab3ae2..38eb78fc8b9ca 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -323,9 +323,13 @@ const editorConfiguration: IConfigurationNode = { }, 'editor.multiCursorModifier': { 'type': 'string', - 'enum': (platform.isMacintosh ? ['cmd', 'alt'] : ['ctrl', 'alt']), + 'enum': ['ctrlCmd', 'alt'], + 'enumDescriptions': [ + nls.localize('multiCursorModifier.ctrlCmd', "Maps to `Control` on Windows and Linux and to `Command` on OSX."), + nls.localize('multiCursorModifier.alt', "Maps to `Alt` on Windows and Linux and to `Option` on OSX.") + ], 'default': 'alt', - 'description': nls.localize('multiCursorModifier', "The modifier to be used to add multiple cursors with the mouse.") + 'description': nls.localize('multiCursorModifier', "The modifier to be used to add multiple cursors with the mouse. `ctrlCmd` maps to `Control` on Windows and Linux and to `Command` on OSX") }, 'editor.quickSuggestions': { 'anyOf': [ diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index d90ca4dea9018..24ea09ddf3136 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -335,7 +335,7 @@ export interface IEditorOptions { * The modifier to be used to add multiple cursors with the mouse. * Defaults to 'alt' */ - multiCursorModifier?: 'cmd' | 'ctrl' | 'alt'; + multiCursorModifier?: 'ctrlCmd' | 'alt'; /** * Enable quick suggestions (shadow suggestions) * Defaults to true. @@ -1400,18 +1400,10 @@ export class EditorOptionsValidator { let configuredMulticursorModifier: 'altKey' | 'metaKey' | 'ctrlKey'; if (typeof opts.multiCursorModifier === 'string') { - if (platform.isMacintosh) { - if (opts.multiCursorModifier === 'cmd') { - configuredMulticursorModifier = 'metaKey'; - } else { - configuredMulticursorModifier = 'altKey'; - } + if (opts.multiCursorModifier === 'ctrlCmd') { + configuredMulticursorModifier = platform.isMacintosh ? 'metaKey' : 'ctrlKey'; } else { - if (opts.multiCursorModifier === 'ctrl') { - configuredMulticursorModifier = 'ctrlKey'; - } else { - configuredMulticursorModifier = 'altKey'; - } + configuredMulticursorModifier = 'altKey'; } } const multiCursorModifier = _stringSet<'altKey' | 'metaKey' | 'ctrlKey'>(configuredMulticursorModifier, defaults.multiCursorModifier, ['altKey', 'metaKey', 'ctrlKey']); diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index a6e44bb89c0e1..34d430262a68a 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2881,7 +2881,7 @@ declare module monaco.editor { * The modifier to be used to add multiple cursors with the mouse. * Defaults to 'alt' */ - multiCursorModifier?: 'cmd' | 'ctrl' | 'alt'; + multiCursorModifier?: 'ctrlCmd' | 'alt'; /** * Enable quick suggestions (shadow suggestions) * Defaults to true. From 0e1167e1115fcb5771d64f9359078a14f9d8e1a2 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 31 May 2017 11:50:18 +0200 Subject: [PATCH 1334/2747] fix #27710 --- src/vs/vscode.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 82c239860cd52..d7682428116b9 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -3209,7 +3209,7 @@ declare module 'vscode' { } /** - * Denotes a column in the VS Code window. Columns are + * Denotes a column in the editor window. Columns are * used to show editors side by side. */ export enum ViewColumn { @@ -4528,7 +4528,7 @@ declare module 'vscode' { export function createFileSystemWatcher(globPattern: string, ignoreCreateEvents?: boolean, ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean): FileSystemWatcher; /** - * The folder that is open in VS Code. `undefined` when no folder + * The folder that is open in the editor. `undefined` when no folder * has been opened. * * @readonly @@ -5276,7 +5276,7 @@ declare module 'vscode' { * Thenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise, * and others. This API makes no assumption about what promise libary is being used which * enables reusing existing code without migrating to a specific promise implementation. Still, - * we recommend the use of native promises which are available in VS Code. + * we recommend the use of native promises which are available in this editor. */ interface Thenable { /** From e7fd412de4ffe236d87ff7994d5fdcd98e5f742d Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 31 May 2017 12:07:26 +0200 Subject: [PATCH 1335/2747] fix #27541 * return `undefined` when current word or selection is falsy * use editor selection, not snippet selection, when resolving variables --- src/vs/editor/contrib/snippet/browser/snippetSession.ts | 2 +- src/vs/editor/contrib/snippet/browser/snippetVariables.ts | 4 ++-- .../contrib/snippet/test/browser/snippetVariables.test.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index c4fcdaa3e413e..4a5d4cc9e412c 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -253,7 +253,7 @@ export class SnippetSession { const start = snippetSelection.getStartPosition(); const adjustedTemplate = SnippetSession.adjustWhitespace(model, start, this._template); - const snippet = SnippetParser.parse(adjustedTemplate).resolveVariables(new EditorSnippetVariableResolver(model, snippetSelection)); + const snippet = SnippetParser.parse(adjustedTemplate).resolveVariables(new EditorSnippetVariableResolver(model, selection)); // rewrite final-tabstop to some other placeholder because this // snippet sits inside another snippet diff --git a/src/vs/editor/contrib/snippet/browser/snippetVariables.ts b/src/vs/editor/contrib/snippet/browser/snippetVariables.ts index ab345893eacb2..2953ee8bfc3bb 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetVariables.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetVariables.ts @@ -32,7 +32,7 @@ export class EditorSnippetVariableResolver { resolve(name: string): string { if (name === 'SELECTION' || name === 'TM_SELECTED_TEXT') { - return this._model.getValueInRange(this._selection); + return this._model.getValueInRange(this._selection) || undefined; } else if (name === 'TM_CURRENT_LINE') { return this._model.getLineContent(this._selection.positionLineNumber); @@ -42,7 +42,7 @@ export class EditorSnippetVariableResolver { lineNumber: this._selection.positionLineNumber, column: this._selection.positionColumn }); - return info ? info.word : ''; + return info && info.word || undefined; } else if (name === 'TM_LINE_INDEX') { return String(this._selection.positionLineNumber - 1); diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts index fa0bb4034f901..926bb6f424eb1 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetVariables.test.ts @@ -78,12 +78,12 @@ suite('Snippet Variables Resolver', function () { assert.equal(resolver.resolve('TM_LINE_NUMBER'), '1'); resolver = new EditorSnippetVariableResolver(model, new Selection(1, 2, 1, 2)); - assert.equal(resolver.resolve('TM_SELECTED_TEXT'), ''); + assert.equal(resolver.resolve('TM_SELECTED_TEXT'), undefined); assert.equal(resolver.resolve('TM_CURRENT_WORD'), 'this'); resolver = new EditorSnippetVariableResolver(model, new Selection(3, 1, 3, 1)); - assert.equal(resolver.resolve('TM_CURRENT_WORD'), ''); + assert.equal(resolver.resolve('TM_CURRENT_WORD'), undefined); }); From d8135cb714f9eb5093a8a610343c76155f4bf4dd Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 31 May 2017 12:14:46 +0200 Subject: [PATCH 1336/2747] "Check For Updates" -> "Check for Updates" fixes #27532 --- src/vs/code/electron-main/menus.ts | 2 +- src/vs/workbench/parts/update/electron-browser/update.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 249722e754c0b..16f3af28054e5 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -1023,7 +1023,7 @@ export class VSCodeMenu { default: const result = [new MenuItem({ - label: nls.localize('miCheckForUpdates', "Check For Updates..."), click: () => setTimeout(() => { + label: nls.localize('miCheckForUpdates', "Check for Updates..."), click: () => setTimeout(() => { this.reportMenuActionTelemetry('CheckForUpdate'); this.updateService.checkForUpdates(true); }, 0) diff --git a/src/vs/workbench/parts/update/electron-browser/update.ts b/src/vs/workbench/parts/update/electron-browser/update.ts index 9b77ef4c8fbef..e91b43117796c 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.ts @@ -340,7 +340,7 @@ export class LightUpdateContribution implements IGlobalActivity { this.updateService.quitAndInstall()); default: - return new Action('update.check', nls.localize('checkForUpdates', "Check For Updates..."), undefined, this.updateService.state === UpdateState.Idle, () => + return new Action('update.check', nls.localize('checkForUpdates', "Check for Updates..."), undefined, this.updateService.state === UpdateState.Idle, () => this.updateService.checkForUpdates(true)); } } From a1abe1a386e01ab300a3f84de2181621f1068575 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 31 May 2017 12:27:05 +0200 Subject: [PATCH 1337/2747] copy all: remove ansi escape code fixes #27525 --- .../parts/debug/electron-browser/electronDebugActions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.ts b/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.ts index aef048ce10ffd..eae64f5c6c4f7 100644 --- a/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.ts +++ b/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.ts @@ -7,6 +7,7 @@ import * as nls from 'vs/nls'; import { Action } from 'vs/base/common/actions'; import { TPromise } from 'vs/base/common/winjs.base'; import { ITree } from 'vs/base/parts/tree/browser/tree'; +import { removeAnsiEscapeCodes } from 'vs/base/common/strings'; import { Variable } from 'vs/workbench/parts/debug/common/debugModel'; import { IDebugService, IStackFrame } from 'vs/workbench/parts/debug/common/debug'; import { clipboard } from 'electron'; @@ -62,7 +63,7 @@ export class CopyAllAction extends Action { text += navigator.current().toString(); } - clipboard.writeText(text); + clipboard.writeText(removeAnsiEscapeCodes(text)); return TPromise.as(null); } } From 24b543efdfb117e853be224eb7943ae57f93a947 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 30 May 2017 13:01:48 +0200 Subject: [PATCH 1338/2747] Fix #27507 --- src/vs/vscode.proposed.d.ts | 4 ++-- src/vs/workbench/api/node/extHost.api.impl.ts | 4 ++-- src/vs/workbench/api/node/extHostTreeViews.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index f571826403c3c..f6778e6f60b22 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -18,7 +18,7 @@ declare module 'vscode' { * @param viewId Id of the view contributed using the extension point `views`. * @param treeDataProvider A [TreeDataProvider](#TreeDataProvider) that provides tree data for the view */ - export function registerTreeDataProviderForView(viewId: string, treeDataProvider: TreeDataProvider): Disposable; + export function registerTreeDataProvider(viewId: string, treeDataProvider: TreeDataProvider): Disposable; } /** @@ -71,7 +71,7 @@ declare module 'vscode' { /** * Context value of the tree item. This can be used to contribute item specific actions in the tree. - * For example, a tree item is given a context value as `folder`. When contribution actions to `view/item/context` + * For example, a tree item is given a context value as `folder`. When contributing actions to `view/item/context` * using `menus` extension point, you can specify context value for key `viewItem` in `when` expression like `viewItem == folder`. * ``` * "contributes": { diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 1ec2c22afa382..0d14189f2a5e4 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -369,8 +369,8 @@ export function createApiFactory( sampleFunction: proposedApiFunction(extension, () => { return extHostMessageService.showMessage(Severity.Info, 'Hello Proposed Api!', {}, []); }), - registerTreeDataProviderForView: proposedApiFunction(extension, (viewId: string, treeDataProvider: vscode.TreeDataProvider): vscode.Disposable => { - return extHostTreeViews.registerTreeDataProviderForView(viewId, treeDataProvider); + registerTreeDataProvider: proposedApiFunction(extension, (viewId: string, treeDataProvider: vscode.TreeDataProvider): vscode.Disposable => { + return extHostTreeViews.registerTreeDataProvider(viewId, treeDataProvider); }) }; diff --git a/src/vs/workbench/api/node/extHostTreeViews.ts b/src/vs/workbench/api/node/extHostTreeViews.ts index b772b89459347..524c56baa5ab1 100644 --- a/src/vs/workbench/api/node/extHostTreeViews.ts +++ b/src/vs/workbench/api/node/extHostTreeViews.ts @@ -39,7 +39,7 @@ export class ExtHostTreeViews extends ExtHostTreeViewsShape { }); } - registerTreeDataProviderForView(id: string, treeDataProvider: vscode.TreeDataProvider): vscode.Disposable { + registerTreeDataProvider(id: string, treeDataProvider: vscode.TreeDataProvider): vscode.Disposable { const treeView = new ExtHostTreeView(id, treeDataProvider, this._proxy); this.treeViews.set(id, treeView); return { From 18d234745970ab9ae8a9888c5d0ab76d190fb24a Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 30 May 2017 14:06:42 +0200 Subject: [PATCH 1339/2747] Fix #27509 --- src/vs/vscode.proposed.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index f6778e6f60b22..b119500258865 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -31,7 +31,7 @@ declare module 'vscode' { onDidChangeTreeData?: Event; /** - * get [TreeItem](#TreeItem) representation of the `element` + * Get [TreeItem](#TreeItem) representation of the `element` * * @param element The element for which [TreeItem](#TreeItem) representation is asked for. * @return [TreeItem](#TreeItem) representation of the element @@ -39,7 +39,7 @@ declare module 'vscode' { getTreeItem(element: T): TreeItem; /** - * get the children of `element` or root. + * Get the children of `element` or root. * * @param element The element from which the provider gets children for. * @return Children of `element` or root. From 5e6270745037adbe6645900fc412e788bb6bd605 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 30 May 2017 14:09:14 +0200 Subject: [PATCH 1340/2747] Fix #27512 --- src/vs/vscode.proposed.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index b119500258865..ea64b766b66a5 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -44,7 +44,7 @@ declare module 'vscode' { * @param element The element from which the provider gets children for. * @return Children of `element` or root. */ - getChildren(element?: T): T[] | Thenable; + getChildren(element?: T): ProviderResult; } export interface TreeItem { From 9ddbdd0d9ef7793281b0b95ed126fa44ff94dc1a Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 30 May 2017 14:26:53 +0200 Subject: [PATCH 1341/2747] Fix #27530 --- src/vs/workbench/api/node/extHostTreeViews.ts | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/src/vs/workbench/api/node/extHostTreeViews.ts b/src/vs/workbench/api/node/extHostTreeViews.ts index 524c56baa5ab1..f050ea1df7f82 100644 --- a/src/vs/workbench/api/node/extHostTreeViews.ts +++ b/src/vs/workbench/api/node/extHostTreeViews.ts @@ -130,25 +130,32 @@ class ExtHostTreeView extends Disposable { private processAndMapElements(elements: T[]): TPromise { const treeItemsPromises: TPromise[] = []; for (const element of elements) { - if (this.extChildrenElementsMap.has(element)) { - return TPromise.wrapError(localize('treeView.duplicateElement', 'Element {0} is already registered', element)); - } - const treeItem = this.massageTreeItem(this.dataProvider.getTreeItem(element)); - this.itemHandlesMap.set(element, treeItem.handle); - this.extElementsMap.set(treeItem.handle, element); - if (treeItem.collapsibleState === TreeItemCollapsibleState.Expanded) { - treeItemsPromises.push(this.getChildren(treeItem.handle).then(children => { - treeItem.children = children; - return treeItem; - })); - } else { - treeItemsPromises.push(TPromise.as(treeItem)); + if (element) { + if (this.extChildrenElementsMap.has(element)) { + return TPromise.wrapError(localize('treeView.duplicateElement', 'Element {0} is already registered', element)); + } + const treeItem = this.massageTreeItem(this.dataProvider.getTreeItem(element)); + if (treeItem) { + this.itemHandlesMap.set(element, treeItem.handle); + this.extElementsMap.set(treeItem.handle, element); + if (treeItem.collapsibleState === TreeItemCollapsibleState.Expanded) { + treeItemsPromises.push(this.getChildren(treeItem.handle).then(children => { + treeItem.children = children; + return treeItem; + })); + } else { + treeItemsPromises.push(TPromise.as(treeItem)); + } + } } } return TPromise.join(treeItemsPromises); } private massageTreeItem(extensionTreeItem: vscode.TreeItem): TreeItem { + if (!extensionTreeItem) { + return null; + } const icon = this.getLightIconPath(extensionTreeItem); return { handle: ++this._itemHandlePool, From 82eb47c42dc17d495c77600456b8fc6749601c51 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 30 May 2017 15:29:42 +0200 Subject: [PATCH 1342/2747] Fix #27535 --- .../electron-browser/mainThreadTreeViews.ts | 3 +- src/vs/workbench/api/node/extHost.protocol.ts | 20 ++------ src/vs/workbench/api/node/extHostTreeViews.ts | 45 ++++++++--------- .../workbench/parts/views/browser/treeView.ts | 9 ++-- src/vs/workbench/parts/views/browser/views.ts | 37 +------------- src/vs/workbench/parts/views/common/views.ts | 48 +++++++++++++++++++ 6 files changed, 81 insertions(+), 81 deletions(-) create mode 100644 src/vs/workbench/parts/views/common/views.ts diff --git a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts index 186c646eaceda..6d41b483db6d0 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts @@ -9,7 +9,8 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { ExtHostContext, MainThreadTreeViewsShape, ExtHostTreeViewsShape } from '../node/extHost.protocol'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; -import { ViewsRegistry, ITreeViewDataProvider, ITreeItem, TreeItemCollapsibleState } from 'vs/workbench/parts/views/browser/views'; +import { ViewsRegistry } from 'vs/workbench/parts/views/browser/views'; +import { ITreeViewDataProvider, ITreeItem, TreeItemCollapsibleState } from 'vs/workbench/parts/views/common/views'; export class MainThreadTreeViews extends MainThreadTreeViewsShape { diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index b168ae2ddac53..8f6d2c8deb5ba 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -45,6 +45,8 @@ import { IPosition } from 'vs/editor/common/core/position'; import { IRange } from 'vs/editor/common/core/range'; import { ISelection, Selection } from 'vs/editor/common/core/selection'; +import { ITreeItem } from 'vs/workbench/parts/views/common/views'; + export interface IEnvironment { enableProposedApiForAll: boolean; enableProposedApiFor: string | string[]; @@ -194,14 +196,6 @@ export abstract class MainThreadEditorsShape { $getDiffInformation(id: string): TPromise { throw ni(); } } -export interface TreeItem extends vscode.TreeItem { - handle: number; - commandId?: string; - icon?: string; - iconDark?: string; - children?: TreeItem[]; -} - export abstract class MainThreadTreeViewsShape { $registerView(treeViewId: string): void { throw ni(); } $refresh(treeViewId: string, treeItemHandle?: number): void { throw ni(); } @@ -407,15 +401,9 @@ export abstract class ExtHostDocumentsAndEditorsShape { $acceptDocumentsAndEditorsDelta(delta: IDocumentsAndEditorsDelta): void { throw ni(); } } -export type TreeViewCommandArg = { - treeViewId: string, - treeItemHandle: number -}; - export abstract class ExtHostTreeViewsShape { - $getElements(treeViewId: string): TPromise { throw ni(); } - $getChildren(treeViewId: string, treeItemHandle: number): TPromise { throw ni(); } - $restore(treeViewId: string, treeItems: TreeItem[]): TPromise { throw ni(); } + $getElements(treeViewId: string): TPromise { throw ni(); } + $getChildren(treeViewId: string, treeItemHandle: number): TPromise { throw ni(); } } export abstract class ExtHostExtensionServiceShape { diff --git a/src/vs/workbench/api/node/extHostTreeViews.ts b/src/vs/workbench/api/node/extHostTreeViews.ts index f050ea1df7f82..d94eabb4167b3 100644 --- a/src/vs/workbench/api/node/extHostTreeViews.ts +++ b/src/vs/workbench/api/node/extHostTreeViews.ts @@ -10,11 +10,11 @@ import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; import { Disposable } from 'vs/base/common/lifecycle'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { MainContext, ExtHostTreeViewsShape, MainThreadTreeViewsShape, TreeItem, TreeViewCommandArg } from './extHost.protocol'; +import { MainContext, ExtHostTreeViewsShape, MainThreadTreeViewsShape } from './extHost.protocol'; +import { ITreeItem, TreeViewItemHandleArg } from 'vs/workbench/parts/views/common/views'; import { TreeItemCollapsibleState } from './extHostTypes'; -import { ExtHostCommands } from 'vs/workbench/api/node/extHostCommands'; +import { ExtHostCommands, CommandsConverter } from 'vs/workbench/api/node/extHostCommands'; import { asWinJsPromise } from 'vs/base/common/async'; -import * as modes from 'vs/editor/common/modes'; type TreeItemHandle = number; @@ -31,7 +31,7 @@ export class ExtHostTreeViews extends ExtHostTreeViewsShape { this._proxy = threadService.get(MainContext.MainThreadTreeViews); commands.registerArgumentProcessor({ processArgument: arg => { - if (arg && arg.treeViewId && arg.treeItemHandle) { + if (arg && arg.$treeViewId && arg.$treeItemHandle) { return this.convertArgument(arg); } return arg; @@ -40,7 +40,7 @@ export class ExtHostTreeViews extends ExtHostTreeViewsShape { } registerTreeDataProvider(id: string, treeDataProvider: vscode.TreeDataProvider): vscode.Disposable { - const treeView = new ExtHostTreeView(id, treeDataProvider, this._proxy); + const treeView = new ExtHostTreeView(id, treeDataProvider, this._proxy, this.commands.converter); this.treeViews.set(id, treeView); return { dispose: () => { @@ -50,28 +50,25 @@ export class ExtHostTreeViews extends ExtHostTreeViewsShape { }; } - $getElements(treeViewId: string): TPromise { + $getElements(treeViewId: string): TPromise { const treeView = this.treeViews.get(treeViewId); if (!treeView) { - return TPromise.wrapError(localize('treeView.notRegistered', 'No tree view with id \'{0}\' registered.', treeViewId)); + return TPromise.wrapError(localize('treeView.notRegistered', 'No tree view with id \'{0}\' registered.', treeViewId)); } return treeView.getTreeItems(); } - $getChildren(treeViewId: string, treeItemHandle?: number): TPromise { + $getChildren(treeViewId: string, treeItemHandle?: number): TPromise { const treeView = this.treeViews.get(treeViewId); if (!treeView) { - return TPromise.wrapError(localize('treeView.notRegistered', 'No tree view with id \'{0}\' registered.', treeViewId)); + return TPromise.wrapError(localize('treeView.notRegistered', 'No tree view with id \'{0}\' registered.', treeViewId)); } return treeView.getChildren(treeItemHandle); } - private convertArgument(arg: TreeViewCommandArg): any { - const treeView = this.treeViews.get(arg.treeViewId); - if (!treeView) { - return TPromise.wrapError(localize('treeView.notRegistered', 'No tree view with id \'{0}\' registered.', arg.treeViewId)); - } - return treeView.getExtensionElement(arg.treeItemHandle); + private convertArgument(arg: TreeViewItemHandleArg): any { + const treeView = this.treeViews.get(arg.$treeViewId); + return treeView ? treeView.getExtensionElement(arg.$treeItemHandle) : null; } } @@ -83,7 +80,7 @@ class ExtHostTreeView extends Disposable { private itemHandlesMap: Map = new Map(); private extChildrenElementsMap: Map = new Map(); - constructor(private viewId: string, private dataProvider: vscode.TreeDataProvider, private proxy: MainThreadTreeViewsShape) { + constructor(private viewId: string, private dataProvider: vscode.TreeDataProvider, private proxy: MainThreadTreeViewsShape, private commands: CommandsConverter, ) { super(); this.proxy.$registerView(viewId); if (dataProvider.onDidChangeTreeData) { @@ -91,7 +88,7 @@ class ExtHostTreeView extends Disposable { } } - getTreeItems(): TPromise { + getTreeItems(): TPromise { this.extChildrenElementsMap.clear(); this.extElementsMap.clear(); this.itemHandlesMap.clear(); @@ -100,12 +97,12 @@ class ExtHostTreeView extends Disposable { .then(elements => this.processAndMapElements(elements)); } - getChildren(treeItemHandle: TreeItemHandle): TPromise { + getChildren(treeItemHandle: TreeItemHandle): TPromise { let extElement = this.getExtensionElement(treeItemHandle); if (extElement) { this.clearChildren(extElement); } else { - return TPromise.wrapError(localize('treeItem.notFound', 'No tree item with id \'{0}\' found.', treeItemHandle)); + return TPromise.wrapError(localize('treeItem.notFound', 'No tree item with id \'{0}\' found.', treeItemHandle)); } return asWinJsPromise(() => this.dataProvider.getChildren(extElement)) @@ -127,12 +124,12 @@ class ExtHostTreeView extends Disposable { } } - private processAndMapElements(elements: T[]): TPromise { - const treeItemsPromises: TPromise[] = []; + private processAndMapElements(elements: T[]): TPromise { + const treeItemsPromises: TPromise[] = []; for (const element of elements) { if (element) { if (this.extChildrenElementsMap.has(element)) { - return TPromise.wrapError(localize('treeView.duplicateElement', 'Element {0} is already registered', element)); + return TPromise.wrapError(localize('treeView.duplicateElement', 'Element {0} is already registered', element)); } const treeItem = this.massageTreeItem(this.dataProvider.getTreeItem(element)); if (treeItem) { @@ -152,7 +149,7 @@ class ExtHostTreeView extends Disposable { return TPromise.join(treeItemsPromises); } - private massageTreeItem(extensionTreeItem: vscode.TreeItem): TreeItem { + private massageTreeItem(extensionTreeItem: vscode.TreeItem): ITreeItem { if (!extensionTreeItem) { return null; } @@ -160,7 +157,7 @@ class ExtHostTreeView extends Disposable { return { handle: ++this._itemHandlePool, label: extensionTreeItem.label, - commandId: extensionTreeItem.command ? extensionTreeItem.command.command : void 0, + command: extensionTreeItem.command ? this.commands.toInternal(extensionTreeItem.command) : void 0, contextValue: extensionTreeItem.contextValue, icon, iconDark: this.getDarkIconPath(extensionTreeItem) || icon, diff --git a/src/vs/workbench/parts/views/browser/treeView.ts b/src/vs/workbench/parts/views/browser/treeView.ts index d642e54a3a74b..fd8a1387fce34 100644 --- a/src/vs/workbench/parts/views/browser/treeView.ts +++ b/src/vs/workbench/parts/views/browser/treeView.ts @@ -26,7 +26,8 @@ import { IProgressService } from 'vs/platform/progress/common/progress'; import { ITree, IDataSource, IRenderer, ContextMenuEvent } from 'vs/base/parts/tree/browser/tree'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { ActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; -import { ViewsRegistry, ITreeViewDataProvider, IViewOptions, ITreeItem, TreeItemCollapsibleState } from 'vs/workbench/parts/views/browser/views'; +import { ViewsRegistry, IViewOptions } from 'vs/workbench/parts/views/browser/views'; +import { ITreeViewDataProvider, ITreeItem, TreeItemCollapsibleState, TreeViewItemHandleArg } from 'vs/workbench/parts/views/common/views'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { CollapsibleState } from 'vs/base/browser/ui/splitview/splitview'; import { ICommandService } from 'vs/platform/commands/common/commands'; @@ -170,8 +171,8 @@ export class TreeView extends CollapsibleViewletView { private onSelection(): void { const selection: ITreeItem = this.tree.getSelection()[0]; if (selection) { - if (selection.commandId) { - this.commandService.executeCommand(selection.commandId, { treeViewId: this.id, treeItemHandle: selection.handle }); + if (selection.command) { + this.commandService.executeCommand(selection.command.id, ...(selection.command.arguments || [])); } } } @@ -338,7 +339,7 @@ class TreeController extends DefaultController { } }, - getActionsContext: () => ({ treeViewId: this.treeViewId, treeItemHandle: node.handle }), + getActionsContext: () => ({ $treeViewId: this.treeViewId, $treeItemHandle: node.handle }), actionRunner: new MultipleSelectionActionRunner(() => tree.getSelection()) }); diff --git a/src/vs/workbench/parts/views/browser/views.ts b/src/vs/workbench/parts/views/browser/views.ts index d5a69e9827dc1..7aa26d2466bce 100644 --- a/src/vs/workbench/parts/views/browser/views.ts +++ b/src/vs/workbench/parts/views/browser/views.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { TPromise } from 'vs/base/common/winjs.base'; import Event, { Emitter } from 'vs/base/common/event'; import { IActionRunner } from 'vs/base/common/actions'; import { IViewletView as IView } from 'vs/workbench/browser/viewlet'; +import { ITreeViewDataProvider } from 'vs/workbench/parts/views/common/views'; export class ViewLocation { @@ -20,12 +20,6 @@ export class ViewLocation { } } -export enum TreeItemCollapsibleState { - None = 0, - Collapsed = 1, - Expanded = 2 -} - export interface IViewOptions { name: string; actionRunner: IActionRunner; @@ -52,35 +46,6 @@ export interface IViewDescriptor { } -export interface ITreeItem { - - handle: number; - - label: string; - - icon?: string; - - iconDark?: string; - - contextValue?: string; - - commandId?: string; - - children?: ITreeItem[]; - - collapsibleState?: TreeItemCollapsibleState; -} - -export interface ITreeViewDataProvider { - - onDidChange: Event; - - getElements(): TPromise; - - getChildren(element: ITreeItem): TPromise; - -} - export interface IViewsRegistry { readonly onViewsRegistered: Event; diff --git a/src/vs/workbench/parts/views/common/views.ts b/src/vs/workbench/parts/views/common/views.ts new file mode 100644 index 0000000000000..22eac5bfe1bf0 --- /dev/null +++ b/src/vs/workbench/parts/views/common/views.ts @@ -0,0 +1,48 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { TPromise } from 'vs/base/common/winjs.base'; +import Event from 'vs/base/common/event'; +import { Command } from 'vs/editor/common/modes'; + +export type TreeViewItemHandleArg = { + $treeViewId: string, + $treeItemHandle: number +}; + +export enum TreeItemCollapsibleState { + None = 0, + Collapsed = 1, + Expanded = 2 +} + +export interface ITreeItem { + + handle: number; + + label: string; + + icon?: string; + + iconDark?: string; + + contextValue?: string; + + command?: Command; + + children?: ITreeItem[]; + + collapsibleState?: TreeItemCollapsibleState; +} + +export interface ITreeViewDataProvider { + + onDidChange: Event; + + getElements(): TPromise; + + getChildren(element: ITreeItem): TPromise; + +} \ No newline at end of file From e282c64283e64de7277e34f11ef58aa0d9e11220 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 31 May 2017 12:51:00 +0200 Subject: [PATCH 1343/2747] debug actions widget: more precise centering fixes #27566 --- .../workbench/parts/debug/browser/debugActionsWidget.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts index 7afe47c4c782f..44b9db45be34c 100644 --- a/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts +++ b/src/vs/workbench/parts/debug/browser/debugActionsWidget.ts @@ -114,7 +114,8 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi const mouseClickEvent = new StandardMouseEvent(event); if (mouseClickEvent.detail === 2) { // double click on debug bar centers it again #8250 - this.setXCoordinate(0.5 * window.innerWidth); + const widgetWidth = this.$el.getHTMLElement().clientWidth; + this.setXCoordinate(0.5 * window.innerWidth - 0.5 * widgetWidth); this.storePosition(); } }); @@ -172,11 +173,12 @@ export class DebugActionsWidget extends Themable implements IWorkbenchContributi if (!this.isVisible) { return; } + const widgetWidth = this.$el.getHTMLElement().clientWidth; if (x === undefined) { - x = parseFloat(this.storageService.get(DEBUG_ACTIONS_WIDGET_POSITION_KEY, StorageScope.WORKSPACE, '0.5')) * window.innerWidth; + const positionPercentage = this.storageService.get(DEBUG_ACTIONS_WIDGET_POSITION_KEY, StorageScope.WORKSPACE); + x = positionPercentage !== undefined ? parseFloat(positionPercentage) * window.innerWidth : (0.5 * window.innerWidth - 0.5 * widgetWidth); } - const widgetWidth = this.$el.getHTMLElement().clientWidth; x = Math.max(0, Math.min(x, window.innerWidth - widgetWidth)); // do not allow the widget to overflow on the right this.$el.style('left', `${x}px`); } From 9dea8acdc0577cf5566a52fa3587e259caece12a Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 31 May 2017 12:51:29 +0200 Subject: [PATCH 1344/2747] Fix #27529 --- src/vs/vscode.proposed.d.ts | 21 ++++++++++++------- src/vs/workbench/api/node/extHost.api.impl.ts | 1 + src/vs/workbench/api/node/extHostTypes.ts | 11 ++++++++++ 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index ea64b766b66a5..7bc2d68239115 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -47,27 +47,26 @@ declare module 'vscode' { getChildren(element?: T): ProviderResult; } - export interface TreeItem { + export class TreeItem { /** * A human-readable string describing this item */ - readonly label: string; + label: string; /** * The icon path for the tree item */ - readonly iconPath?: string | Uri | { light: string | Uri; dark: string | Uri }; + iconPath?: string | Uri | { light: string | Uri; dark: string | Uri }; /** - * The [command](#Command) which should be run when the tree item - * is selected. This command is called with the model representing this item as first argument. + * The [command](#Command) which should be run when the tree item is selected. */ - readonly command?: Command; + command?: Command; /** * [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. */ - readonly collapsibleState?: TreeItemCollapsibleState; + collapsibleState?: TreeItemCollapsibleState; /** * Context value of the tree item. This can be used to contribute item specific actions in the tree. @@ -87,7 +86,13 @@ declare module 'vscode' { * ``` * This will show action `extension.deleteFolder` only for items with `contextValue` is `folder`. */ - readonly contextValue?: string; + contextValue?: string; + + /** + * @param label A human-readable string describing this item + * @param collapsibleState [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. Default is [TreeItemCollapsibleState.None](#TreeItemCollapsibleState.None) + */ + constructor(label: string, collapsibleState?: TreeItemCollapsibleState); } /** diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 0d14189f2a5e4..a859a1369fe2f 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -535,6 +535,7 @@ export function createApiFactory( WorkspaceEdit: extHostTypes.WorkspaceEdit, ProgressLocation: extHostTypes.ProgressLocation, TreeItemCollapsibleState: extHostTypes.TreeItemCollapsibleState, + TreeItem: extHostTypes.TreeItem, ThemeColor: extHostTypes.ThemeColor, // functions TaskRevealKind: extHostTypes.TaskRevealKind, diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index ef7f35e2a7e3c..e296788726648 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1297,6 +1297,17 @@ export enum ProgressLocation { Window = 10, } +export class TreeItem { + + iconPath?: string | Uri | { light: string | Uri; dark: string | Uri }; + command?: vscode.Command; + contextValue?: string; + + constructor(public label: string, public collapsibleState: vscode.TreeItemCollapsibleState = TreeItemCollapsibleState.None) { + } + +} + export enum TreeItemCollapsibleState { None = 0, Collapsed = 1, From 388f4ff36209fe194a1663aec73bc2563dc6e596 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 31 May 2017 12:57:03 +0200 Subject: [PATCH 1345/2747] Fixes #27720. --- src/vs/workbench/parts/debug/browser/linkDetector.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/browser/linkDetector.ts b/src/vs/workbench/parts/debug/browser/linkDetector.ts index d2fd4efab48df..f79930d072e14 100644 --- a/src/vs/workbench/parts/debug/browser/linkDetector.ts +++ b/src/vs/workbench/parts/debug/browser/linkDetector.ts @@ -48,7 +48,7 @@ export class LinkDetector { let resource: uri = null; try { resource = (match && !strings.startsWith(match[0], 'http')) - && (match[2] || strings.startsWith(match[0], '/') ? uri.file(match[1]) : this.contextService.toResource(match[1])); + && (match[2] || strings.startsWith(match[1], '/') ? uri.file(match[1]) : this.contextService.toResource(match[1])); } catch (e) { } if (!resource) { From b6041fbc206f98726520b5f82b0150ca8e4bd1d8 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 31 May 2017 13:03:27 +0200 Subject: [PATCH 1346/2747] Fixes #27613: symbolic key code names should always get the info message explaining what characters they produce --- .../parts/preferences/browser/keybindingsEditorContribution.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts index d5aaccbae4526..3f560219cfeb9 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts @@ -236,6 +236,9 @@ export class KeybindingEditorDecorationsRenderer extends Disposable { if (!resolvedKeybinding.isWYSIWYG()) { return this._createDecoration(false, resolvedKeybinding.getLabel(), model, value); } + if (/abnt_|oem_/.test(value.value)) { + return this._createDecoration(false, resolvedKeybinding.getLabel(), model, value); + } const expectedUserSettingsLabel = resolvedKeybinding.getUserSettingsLabel(); if (!KeybindingEditorDecorationsRenderer._userSettingsFuzzyEquals(value.value, expectedUserSettingsLabel)) { return this._createDecoration(false, resolvedKeybinding.getLabel(), model, value); From c78ebcb2f48347ed20e8a88852207b49fc7ba3ba Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Wed, 31 May 2017 13:06:37 +0200 Subject: [PATCH 1347/2747] Fixes #27548: Annotation tasks break old 0.1.0 task behaviour --- src/vs/workbench/api/node/extHostTask.ts | 14 ++-- .../parts/tasks/browser/quickOpen.ts | 7 +- .../parts/tasks/common/taskConfiguration.ts | 69 +++++++++++---- src/vs/workbench/parts/tasks/common/tasks.ts | 24 +++--- .../tasks/electron-browser/jsonSchema_v1.ts | 45 ++++++---- .../electron-browser/task.contribution.ts | 84 ++++++++++++------- .../tasks/test/node/configuration.test.ts | 1 + 7 files changed, 155 insertions(+), 89 deletions(-) diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index 2306007194cf1..babbdf49a8a24 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import * as nls from 'vs/nls'; import { TPromise } from 'vs/base/common/winjs.base'; import * as UUID from 'vs/base/common/uuid'; import { asWinJsPromise } from 'vs/base/common/async'; @@ -308,13 +309,16 @@ namespace Tasks { if (command === void 0) { return undefined; } + let source = { + kind: TaskSystem.TaskSourceKind.Extension, + label: typeof task.source === 'string' ? task.source : extension.name, + detail: extension.id + }; + let label = nls.localize('task.label', '{0}: {1}', source.label, task.name); let result: TaskSystem.Task = { _id: uuidMap.getUUID(task.identifier), - _source: { - kind: TaskSystem.TaskSourceKind.Extension, - label: typeof task.source === 'string' ? task.source : extension.name, - detail: extension.id - }, + _source: source, + _label: label, name: task.name, identifier: task.identifier ? task.identifier : `${extension.id}.${task.name}`, group: types.TaskGroup.is(task.group) ? task.group : undefined, diff --git a/src/vs/workbench/parts/tasks/browser/quickOpen.ts b/src/vs/workbench/parts/tasks/browser/quickOpen.ts index e4208bafd3a2e..2b0eb83c769fb 100644 --- a/src/vs/workbench/parts/tasks/browser/quickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/quickOpen.ts @@ -13,21 +13,18 @@ import QuickOpen = require('vs/base/parts/quickopen/common/quickOpen'); import Model = require('vs/base/parts/quickopen/browser/quickOpenModel'); import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; -import { Task, TaskSourceKind, computeLabel } from 'vs/workbench/parts/tasks/common/tasks'; +import { Task, TaskSourceKind } from 'vs/workbench/parts/tasks/common/tasks'; import { ITaskService } from 'vs/workbench/parts/tasks/common/taskService'; import { ActionBarContributor, ContributableActionProvider } from 'vs/workbench/browser/actions'; export class TaskEntry extends Model.QuickOpenEntry { - private _label: string; - constructor(protected taskService: ITaskService, protected _task: Task, highlights: Model.IHighlight[] = []) { super(highlights); - this._label = computeLabel(_task); } public getLabel(): string { - return this._label; + return this.task._label; } public getAriaLabel(): string { diff --git a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts index 862419a7fea80..bf17dd089303a 100644 --- a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts @@ -301,6 +301,11 @@ export interface ExternalTaskRunnerConfiguration extends BaseTaskRunnerConfigura _runner?: string; + /** + * Determines the runner to use + */ + runner?: string; + /** * The config's version number */ @@ -341,7 +346,8 @@ function mergeProperty(target: T, source: T, key: K) { interface ParseContext { problemReporter: IProblemReporter; namedProblemMatchers: IStringDictionary; - isTermnial: boolean; + engine: Tasks.ExecutionEngine; + schemaVersion: Tasks.JsonSchemaVersion; } namespace CommandOptions { @@ -587,7 +593,7 @@ namespace CommandConfiguration { result.options = CommandOptions.from(config.options, context); if (result.options && result.options.shell === void 0 && isShellConfiguration) { result.options.shell = ShellConfiguration.from(config.isShellCommand as ShellConfiguration, context); - if (!context.isTermnial) { + if (context.engine !== Tasks.ExecutionEngine.Terminal) { context.problemReporter.warn(nls.localize('ConfigurationParser.noShell', 'Warning: shell configuration is only supported when executing tasks in the terminal.')); } } @@ -776,6 +782,7 @@ namespace TaskDescription { let annotatingTasks: Tasks.Task[] = []; let defaultBuildTask: { task: Tasks.Task; rank: number; } = { task: undefined, rank: -1 }; let defaultTestTask: { task: Tasks.Task; rank: number; } = { task: undefined, rank: -1 }; + let schema2_0_0: boolean = context.schemaVersion === Tasks.JsonSchemaVersion.V2_0_0; tasks.forEach((externalTask) => { let taskName = externalTask.taskName; if (!taskName) { @@ -792,6 +799,7 @@ namespace TaskDescription { let task: Tasks.Task = { _id: UUID.generateUuid(), _source: source, + _label: taskName, name: taskName, identifier: identifer, command @@ -835,7 +843,7 @@ namespace TaskDescription { if (problemMatchers) { task.problemMatchers = problemMatchers; } - if (context.isTermnial && isAnnotating(task)) { + if (schema2_0_0 && isAnnotating(task)) { mergeGlobalsIntoAnnnotation(task, globals); annotatingTasks.push(task); return; @@ -843,15 +851,15 @@ namespace TaskDescription { mergeGlobals(task, globals); fillDefaults(task); let addTask: boolean = true; - if (context.isTermnial && task.command && task.command.name && task.command.type === Tasks.CommandType.Shell && task.command.args && task.command.args.length > 0) { + if (context.engine === Tasks.ExecutionEngine.Terminal && task.command && task.command.name && task.command.type === Tasks.CommandType.Shell && task.command.args && task.command.args.length > 0) { if (hasUnescapedSpaces(task.command.name) || task.command.args.some(hasUnescapedSpaces)) { context.problemReporter.warn(nls.localize('taskConfiguration.shellArgs', 'Warning: the task \'{0}\' is a shell command and either the command name or one of its arguments has unescaped spaces. To ensure correct command line quoting please merge args into the command.', task.name)); } } - if (context.isTermnial) { + if (schema2_0_0) { if ((task.command === void 0 || task.command.name === void 0) && (task.dependsOn === void 0 || task.dependsOn.length === 0)) { context.problemReporter.error(nls.localize( - 'taskConfiguration.noCommandOrDependsOn', 'Error: the task \'{0}\' neither specifies a command or a dependsOn property. The task will be ignored. Its definition is:\n{1}', + 'taskConfiguration.noCommandOrDependsOn', 'Error: the task \'{0}\' neither specifies a command nor a dependsOn property. The task will be ignored. Its definition is:\n{1}', task.name, JSON.stringify(externalTask, undefined, 4) )); addTask = false; @@ -1094,19 +1102,43 @@ namespace Globals { export namespace ExecutionEngine { export function from(config: ExternalTaskRunnerConfiguration): Tasks.ExecutionEngine { - return isTerminalConfig(config) - ? Tasks.ExecutionEngine.Terminal - : isRunnerConfig(config) - ? Tasks.ExecutionEngine.Process - : Tasks.ExecutionEngine.Unknown; + let runner = config.runner || config._runner; + let result: Tasks.ExecutionEngine; + if (runner) { + switch (runner) { + case 'terminal': + result = Tasks.ExecutionEngine.Terminal; + break; + case 'process': + result = Tasks.ExecutionEngine.Process; + break; + } + } + let schemaVersion = JsonSchemaVersion.from(config); + if (schemaVersion === Tasks.JsonSchemaVersion.V0_1_0) { + return result || Tasks.ExecutionEngine.Process; + } else if (schemaVersion === Tasks.JsonSchemaVersion.V2_0_0) { + return Tasks.ExecutionEngine.Terminal; + } else { + throw new Error('Shouldn\'t happen.'); + } } - function isRunnerConfig(config: ExternalTaskRunnerConfiguration): boolean { - return (!config._runner || config._runner === 'program') && (config.version === '0.1.0' || !config.version); - } +} - function isTerminalConfig(config: ExternalTaskRunnerConfiguration): boolean { - return config._runner === 'terminal' || config.version === '2.0.0'; +export namespace JsonSchemaVersion { + + export function from(config: ExternalTaskRunnerConfiguration): Tasks.JsonSchemaVersion { + let version = config.version; + if (!version) { + return Tasks.JsonSchemaVersion.V2_0_0; + } + switch (version) { + case '0.1.0': + return Tasks.JsonSchemaVersion.V0_1_0; + default: + return Tasks.JsonSchemaVersion.V2_0_0; + } } } @@ -1130,13 +1162,15 @@ class ConfigurationParser { public run(fileConfig: ExternalTaskRunnerConfiguration): ParseResult { let engine = ExecutionEngine.from(fileConfig); + let schemaVersion = JsonSchemaVersion.from(fileConfig); if (engine === Tasks.ExecutionEngine.Terminal) { this.problemReporter.clearOutput(); } let context: ParseContext = { problemReporter: this.problemReporter, namedProblemMatchers: undefined, - isTermnial: engine === Tasks.ExecutionEngine.Terminal + engine, + schemaVersion, }; let taskParseResult = this.createTaskRunnerConfiguration(fileConfig, context); return { @@ -1177,6 +1211,7 @@ class ConfigurationParser { let task: Tasks.Task = { _id: UUID.generateUuid(), _source: TaskDescription.source, + _label: globals.command.name, name: globals.command.name, identifier: globals.command.name, group: Tasks.TaskGroup.Build, diff --git a/src/vs/workbench/parts/tasks/common/tasks.ts b/src/vs/workbench/parts/tasks/common/tasks.ts index b798e6314e5f2..0cc7270b7236e 100644 --- a/src/vs/workbench/parts/tasks/common/tasks.ts +++ b/src/vs/workbench/parts/tasks/common/tasks.ts @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import nls = require('vs/nls'); import * as Types from 'vs/base/common/types'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; @@ -183,6 +182,11 @@ export interface Task { */ _id: string; + /** + * The cached label. + */ + _label: string; + /** * Indicated the source of the task (e.g tasks.json or extension) */ @@ -241,20 +245,16 @@ export interface Task { } export enum ExecutionEngine { - Unknown = 0, - Terminal = 1, - Process = 2 + Process = 1, + Terminal = 2 +} + +export enum JsonSchemaVersion { + V0_1_0 = 1, + V2_0_0 = 2 } export interface TaskSet { tasks: Task[]; extension?: IExtensionDescription; -} - -export function computeLabel(task: Task): string { - if (task._source.kind === TaskSourceKind.Extension) { - return nls.localize('taskEntry.label', '{0}: {1}', task._source.label, task.name); - } else { - return task.name; - } } \ No newline at end of file diff --git a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.ts b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.ts index 24441e1eba082..af5ca29ae2070 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.ts @@ -13,32 +13,41 @@ import commonSchema from './jsonSchemaCommon'; const schema: IJSONSchema = { oneOf: [ { - 'allOf': [ + allOf: [ { - 'type': 'object', - 'required': ['version'], - 'properties': { - 'version': { - 'type': 'string', - 'enum': ['0.1.0'], - 'description': nls.localize('JsonSchema.version', 'The config\'s version number') + type: 'object', + required: ['version'], + properties: { + version: { + type: 'string', + enum: ['0.1.0'], + description: nls.localize('JsonSchema.version', 'The config\'s version number') }, - 'windows': { - '$ref': '#/definitions/taskRunnerConfiguration', - 'description': nls.localize('JsonSchema.windows', 'Windows specific command configuration') + _runner: { + deprecationMessage: nls.localize('JsonSchema._runner', 'The runner has graduated. Use the offical runner property') }, - 'osx': { - '$ref': '#/definitions/taskRunnerConfiguration', - 'description': nls.localize('JsonSchema.mac', 'Mac specific command configuration') + runner: { + type: 'string', + enum: ['process', 'terminal'], + default: 'process', + description: nls.localize('JsonSchema.runner', 'Defines whether the task is executed as a process and the output is shown in the output window or inside the terminal.') }, - 'linux': { - '$ref': '#/definitions/taskRunnerConfiguration', - 'description': nls.localize('JsonSchema.linux', 'Linux specific command configuration') + windows: { + $ref: '#/definitions/taskRunnerConfiguration', + description: nls.localize('JsonSchema.windows', 'Windows specific command configuration') + }, + osx: { + $ref: '#/definitions/taskRunnerConfiguration', + description: nls.localize('JsonSchema.mac', 'Mac specific command configuration') + }, + linux: { + $ref: '#/definitions/taskRunnerConfiguration', + description: nls.localize('JsonSchema.linux', 'Linux specific command configuration') } } }, { - '$ref': '#/definitions/taskRunnerConfiguration' + $ref: '#/definitions/taskRunnerConfiguration' } ] } diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 540ff68d8ca64..f6a16bb6ba81b 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -71,7 +71,7 @@ import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions } from 'vs import { ITerminalService } from 'vs/workbench/parts/terminal/common/terminal'; import { ITaskSystem, ITaskResolver, ITaskSummary, ITaskExecuteResult, TaskExecuteKind, TaskError, TaskErrors, TaskSystemEvents } from 'vs/workbench/parts/tasks/common/taskSystem'; -import { Task, TaskSet, TaskGroup, ExecutionEngine, TaskSourceKind, computeLabel as computeTaskLabel } from 'vs/workbench/parts/tasks/common/tasks'; +import { Task, TaskSet, TaskGroup, ExecutionEngine, TaskSourceKind } from 'vs/workbench/parts/tasks/common/tasks'; import { ITaskService, TaskServiceEvents, ITaskProvider } from 'vs/workbench/parts/tasks/common/taskService'; import { templates as taskTemplates } from 'vs/workbench/parts/tasks/common/taskTemplates'; @@ -455,7 +455,7 @@ interface WorkspaceTaskResult { set: TaskSet; annotatingTasks: { byIdentifier: IStringDictionary; - byName: IStringDictionary; + byLabel: IStringDictionary; }; hasErrors: boolean; } @@ -547,7 +547,7 @@ class TaskService extends EventEmitter implements ITaskService { ? ExecutionEngine.Terminal : this._taskSystem instanceof ProcessTaskSystem ? ExecutionEngine.Process - : ExecutionEngine.Unknown; + : undefined; if (currentExecutionEngine !== this.getExecutionEngine()) { this.messageService.show(Severity.Info, nls.localize('TaskSystem.noHotSwap', 'Changing the task execution engine requires restarting VS Code. The change is ignored.')); } @@ -709,7 +709,7 @@ class TaskService extends EventEmitter implements ITaskService { return TPromise.as(undefined); } let fileConfig = configuration.config; - let customize = { taskName: computeTaskLabel(task), identifier: task.identifier }; + let customize = { taskName: task._label, identifier: task.identifier }; if (!fileConfig) { fileConfig = { version: '2.0.0', @@ -746,7 +746,7 @@ class TaskService extends EventEmitter implements ITaskService { sets.forEach((set) => { set.tasks.forEach((task) => { uuidMap[task._id] = task; - labelMap[computeTaskLabel(task)] = task; + labelMap[task._label] = task; identifierMap[task.identifier] = task; if (group && task.group === group) { if (task._source.kind === TaskSourceKind.Workspace) { @@ -779,6 +779,7 @@ class TaskService extends EventEmitter implements ITaskService { let task: Task = { _id: id, _source: { kind: TaskSourceKind.Generic, label: 'generic' }, + _label: id, name: id, identifier: id, dependsOn: extensionTasks.map(task => task._id), @@ -794,7 +795,7 @@ class TaskService extends EventEmitter implements ITaskService { sets.forEach((set) => { set.tasks.forEach((task) => { - labelMap[computeTaskLabel(task)] = task; + labelMap[task._label] = task; identifierMap[task.identifier] = task; }); }); @@ -922,10 +923,11 @@ class TaskService extends EventEmitter implements ITaskService { for (let set of result) { for (let task of set.tasks) { if (annotatingTasks) { - let annotatingTask = annotatingTasks.byIdentifier[task.identifier] || annotatingTasks.byName[task.name]; + let annotatingTask = annotatingTasks.byIdentifier[task.identifier] || annotatingTasks.byLabel[task._label]; if (annotatingTask) { TaskConfig.mergeTasks(task, annotatingTask); task.name = annotatingTask.name; + task._label = annotatingTask._label; task._source.kind = TaskSourceKind.Workspace; continue; } @@ -936,6 +938,7 @@ class TaskService extends EventEmitter implements ITaskService { TaskConfig.mergeTasks(task, legacyAnnotatingTask); task._source.kind = TaskSourceKind.Workspace; task.name = legacyAnnotatingTask.name; + task._label = legacyAnnotatingTask._label; workspaceTasksToDelete.push(legacyAnnotatingTask); continue; } @@ -1015,29 +1018,36 @@ class TaskService extends EventEmitter implements ITaskService { } if (config) { let engine = TaskConfig.ExecutionEngine.from(config); - if (engine === ExecutionEngine.Process && this.hasDetectorSupport(config)) { - configPromise = new ProcessRunnerDetector(this.fileService, this.contextService, this.configurationResolverService, config).detect(true).then((value): WorkspaceConfigurationResult => { - let hasErrors = this.printStderr(value.stderr); - let detectedConfig = value.config; - if (!detectedConfig) { - return { config, hasErrors }; - } - let result: TaskConfig.ExternalTaskRunnerConfiguration = Objects.clone(config); - let configuredTasks: IStringDictionary = Object.create(null); - if (!result.tasks) { - if (detectedConfig.tasks) { - result.tasks = detectedConfig.tasks; + if (engine === ExecutionEngine.Process) { + if (this.hasDetectorSupport(config)) { + configPromise = new ProcessRunnerDetector(this.fileService, this.contextService, this.configurationResolverService, config).detect(true).then((value): WorkspaceConfigurationResult => { + let hasErrors = this.printStderr(value.stderr); + let detectedConfig = value.config; + if (!detectedConfig) { + return { config, hasErrors }; } - } else { - result.tasks.forEach(task => configuredTasks[task.taskName] = task); - detectedConfig.tasks.forEach((task) => { - if (!configuredTasks[task.taskName]) { - result.tasks.push(task); + let result: TaskConfig.ExternalTaskRunnerConfiguration = Objects.clone(config); + let configuredTasks: IStringDictionary = Object.create(null); + if (!result.tasks) { + if (detectedConfig.tasks) { + result.tasks = detectedConfig.tasks; } - }); - } - return { config: result, hasErrors }; - }); + } else { + result.tasks.forEach(task => configuredTasks[task.taskName] = task); + detectedConfig.tasks.forEach((task) => { + if (!configuredTasks[task.taskName]) { + result.tasks.push(task); + } + }); + } + return { config: result, hasErrors }; + }); + } else { + configPromise = new ProcessRunnerDetector(this.fileService, this.contextService, this.configurationResolverService).detect(true).then((value) => { + let hasErrors = this.printStderr(value.stderr); + return { config: value.config, hasErrors }; + }); + } } else { configPromise = TPromise.as({ config, hasErrors: false }); } @@ -1061,16 +1071,16 @@ class TaskService extends EventEmitter implements ITaskService { problemReporter.fatal(nls.localize('TaskSystem.configurationErrors', 'Error: the provided task configuration has validation errors and can\'t not be used. Please correct the errors first.')); return { set: undefined, annotatingTasks: undefined, hasErrors }; } - let annotatingTasks: { byIdentifier: IStringDictionary; byName: IStringDictionary; }; + let annotatingTasks: { byIdentifier: IStringDictionary; byLabel: IStringDictionary; }; if (parseResult.annotatingTasks && parseResult.annotatingTasks.length > 0) { annotatingTasks = { byIdentifier: Object.create(null), - byName: Object.create(null) + byLabel: Object.create(null) }; for (let task of parseResult.annotatingTasks) { annotatingTasks.byIdentifier[task.identifier] = task; - if (task.name) { - annotatingTasks.byName[task.name] = task; + if (task._label) { + annotatingTasks.byLabel[task._label] = task; } } } @@ -1087,6 +1097,16 @@ class TaskService extends EventEmitter implements ITaskService { return TaskConfig.ExecutionEngine.from(config); } + /* + private getJsonSchemaVersion(): JsonSchemaVersion { + let { config } = this.getConfiguration(); + if (!config) { + return JsonSchemaVersion.V2_0_0; + } + return TaskConfig.JsonSchemaVersion.from(config); + } + */ + private getConfiguration(): { config: TaskConfig.ExternalTaskRunnerConfiguration; hasParseErrors: boolean } { let result = this.configurationService.getConfiguration('tasks'); if (!result) { diff --git a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts index c958d68336b14..bd75eb83f0123 100644 --- a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts +++ b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts @@ -145,6 +145,7 @@ class TaskBuilder { this.result = { _id: name, _source: { kind: Tasks.TaskSourceKind.Workspace, label: 'workspace' }, + _label: name, identifier: name, name: name, command: this.commandBuilder.result, From 83001adc615e261c1d9844c4ad9208f1beef0d79 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Wed, 31 May 2017 13:17:54 +0200 Subject: [PATCH 1348/2747] More work on #27581 --- src/vs/vscode.d.ts | 4 ++-- src/vs/workbench/api/node/extHostTask.ts | 4 ++-- src/vs/workbench/api/node/extHostTypes.ts | 12 +++++----- .../parts/tasks/common/taskConfiguration.ts | 22 +++++++++---------- src/vs/workbench/parts/tasks/common/tasks.ts | 2 +- .../electron-browser/terminalTaskSystem.ts | 12 +++++----- .../parts/tasks/node/processTaskSystem.ts | 4 ++-- .../tasks/test/node/configuration.test.ts | 4 ++-- 8 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index d7682428116b9..4e5e206c8afd4 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -3700,7 +3700,7 @@ declare module 'vscode' { /** * The terminal behavior. Defaults to an empty object literal. */ - terminal: TaskTerminalBehavior; + terminalBehavior: TaskTerminalBehavior; /** * The problem matchers attached to the task. Defaults to an empty @@ -3832,7 +3832,7 @@ declare module 'vscode' { /** * The terminal behavior. Defaults to an empty object literal. */ - terminal: TaskTerminalBehavior; + terminalBehavior: TaskTerminalBehavior; /** * The problem matchers attached to the task. Defaults to an empty diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index babbdf49a8a24..b1febc8eb3dc8 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -338,7 +338,7 @@ namespace Tasks { name: value.process, args: Strings.from(value.args), type: TaskSystem.CommandType.Process, - terminal: TerminalBehaviour.from(value.terminal) + terminalBehavior: TerminalBehaviour.from(value.terminalBehavior) }; if (value.options) { result.options = CommandOptions.from(value.options); @@ -353,7 +353,7 @@ namespace Tasks { let result: TaskSystem.CommandConfiguration = { name: value.commandLine, type: TaskSystem.CommandType.Shell, - terminal: TerminalBehaviour.from(value.terminal) + terminalBehavior: TerminalBehaviour.from(value.terminalBehavior) }; if (value.options) { result.options = CommandOptions.from(value.options); diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index e296788726648..34a86f3e0179f 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1045,7 +1045,7 @@ export class BaseTask { private _isBackground: boolean; private _source: string; private _group: string; - private _terminal: vscode.TaskTerminalBehavior; + private _terminalBehavior: vscode.TaskTerminalBehavior; constructor(name: string, problemMatchers: string[]) { if (typeof name !== 'string') { @@ -1054,7 +1054,7 @@ export class BaseTask { this._name = name; this._problemMatchers = problemMatchers || []; this._isBackground = false; - this._terminal = Object.create(null); + this._terminalBehavior = Object.create(null); } get identifier(): string { @@ -1116,15 +1116,15 @@ export class BaseTask { this._group = value; } - get terminal(): vscode.TaskTerminalBehavior { - return this._terminal; + get terminalBehavior(): vscode.TaskTerminalBehavior { + return this._terminalBehavior; } - set terminal(value: vscode.TaskTerminalBehavior) { + set terminalBehavior(value: vscode.TaskTerminalBehavior) { if (value === void 0 || value === null) { value = Object.create(null); } - this._terminal = value; + this._terminalBehavior = value; } get problemMatchers(): string[] { diff --git a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts index bf17dd089303a..08a0477c753f2 100644 --- a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts @@ -568,7 +568,7 @@ namespace CommandConfiguration { let result: Tasks.CommandConfiguration = { name: undefined, type: undefined, - terminal: undefined + terminalBehavior: undefined }; if (Types.isString(config.command)) { result.name = config.command; @@ -600,7 +600,7 @@ namespace CommandConfiguration { } let terminal = TerminalBehavior.from(config, context); if (terminal) { - result.terminal = terminal; + result.terminalBehavior = terminal; } if (Types.isString(config.taskSelector)) { result.taskSelector = config.taskSelector; @@ -609,12 +609,12 @@ namespace CommandConfiguration { } export function isEmpty(value: Tasks.CommandConfiguration): boolean { - return !value || value.name === void 0 && value.type === void 0 && value.args === void 0 && CommandOptions.isEmpty(value.options) && value.terminal === void 0; + return !value || value.name === void 0 && value.type === void 0 && value.args === void 0 && CommandOptions.isEmpty(value.options) && value.terminalBehavior === void 0; } export function onlyTerminalBehaviour(value: Tasks.CommandConfiguration): boolean { return value && - value.terminal && (value.terminal.echo !== void 0 || value.terminal.reveal !== void 0) && + value.terminalBehavior && (value.terminalBehavior.echo !== void 0 || value.terminalBehavior.reveal !== void 0) && value.name === void 0 && value.type === void 0 && value.args === void 0 && CommandOptions.isEmpty(value.options); } @@ -632,7 +632,7 @@ namespace CommandConfiguration { target.type = source.type; } - target.terminal = TerminalBehavior.merge(target.terminal, source.terminal); + target.terminalBehavior = TerminalBehavior.merge(target.terminalBehavior, source.terminalBehavior); mergeProperty(target, source, 'taskSelector'); if (source.args !== void 0) { if (target.args === void 0) { @@ -652,7 +652,7 @@ namespace CommandConfiguration { if (value.name !== void 0 && value.type === void 0) { value.type = Tasks.CommandType.Process; } - value.terminal = TerminalBehavior.fillDefault(value.terminal); + value.terminalBehavior = TerminalBehavior.fillDefault(value.terminalBehavior); if (value.args === void 0) { value.args = EMPTY_ARRAY; } @@ -669,8 +669,8 @@ namespace CommandConfiguration { if (value.options) { CommandOptions.freeze(value.options); } - if (value.terminal) { - TerminalBehavior.freeze(value.terminal); + if (value.terminalBehavior) { + TerminalBehavior.freeze(value.terminalBehavior); } } } @@ -793,7 +793,7 @@ namespace TaskDescription { let command: Tasks.CommandConfiguration = externalTask.command !== void 0 ? CommandConfiguration.from(externalTask, context) : externalTask.echoCommand !== void 0 - ? { name: undefined, type: undefined, terminal: CommandConfiguration.TerminalBehavior.from(externalTask, context) } + ? { name: undefined, type: undefined, terminalBehavior: CommandConfiguration.TerminalBehavior.from(externalTask, context) } : undefined; let identifer = Types.isString(externalTask.identifier) ? externalTask.identifier : taskName; let task: Tasks.Task = { @@ -940,9 +940,9 @@ namespace TaskDescription { // The globals can have a echo set which would override the local echo // Saves the need of a additional fill method. But might be necessary // at some point. - let oldTerminal = Objects.clone(task.command.terminal); + let oldTerminal = Objects.clone(task.command.terminalBehavior); CommandConfiguration.merge(task.command, globals.command); - task.command.terminal = oldTerminal; + task.command.terminalBehavior = oldTerminal; } } // promptOnClose is inferred from isBackground if available diff --git a/src/vs/workbench/parts/tasks/common/tasks.ts b/src/vs/workbench/parts/tasks/common/tasks.ts index 0cc7270b7236e..ab09f64407853 100644 --- a/src/vs/workbench/parts/tasks/common/tasks.ts +++ b/src/vs/workbench/parts/tasks/common/tasks.ts @@ -141,7 +141,7 @@ export interface CommandConfiguration { /** * Describes how the terminal is supposed to behave. */ - terminal: TerminalBehavior; + terminalBehavior: TerminalBehavior; } export namespace TaskGroup { diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index 04591b40b5595..37cef5b6c85e0 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -134,7 +134,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { public run(task: Task, resolver: ITaskResolver, trigger: string = Triggers.command): ITaskExecuteResult { let terminalData = this.activeTasks[task._id]; if (terminalData && terminalData.promise) { - let reveal = task.command.terminal.reveal; + let reveal = task.command.terminalBehavior.reveal; if (reveal === RevealKind.Always) { terminalData.terminal.setVisible(true); } @@ -289,7 +289,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { this.emit(TaskSystemEvents.Inactive, event); } eventCounter = 0; - let reveal = task.command.terminal.reveal; + let reveal = task.command.terminalBehavior.reveal; if (exitCode && exitCode === 1 && watchingProblemMatcher.numberOfMatches === 0 && reveal !== RevealKind.Never) { this.terminalService.setActiveInstance(terminal); this.terminalService.showPanel(false); @@ -332,7 +332,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { }); } this.terminalService.setActiveInstance(terminal); - if (task.command.terminal.reveal === RevealKind.Always) { + if (task.command.terminalBehavior.reveal === RevealKind.Always) { this.terminalService.showPanel(false); } this.activeTasks[task._id] = { terminal, task, promise }; @@ -369,7 +369,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { let { command, args } = this.resolveCommandAndArgs(task); let terminalName = nls.localize('TerminalTaskSystem.terminalName', 'Task - {0}', task.name); let waitOnExit: boolean | string = false; - if (task.command.terminal.reveal !== RevealKind.Never || !task.isBackground) { + if (task.command.terminalBehavior.reveal !== RevealKind.Never || !task.isBackground) { waitOnExit = nls.localize('reuseTerminal', 'Terminal will be reused by tasks, press any key to close it.'); }; let shellLaunchConfig: IShellLaunchConfig = undefined; @@ -422,7 +422,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { }); shellArgs.push(commandLine); shellLaunchConfig.args = Platform.isWindows ? shellArgs.join(' ') : shellArgs; - if (task.command.terminal.echo) { + if (task.command.terminalBehavior.echo) { shellLaunchConfig.initialText = `> ${commandLine}`; } } else { @@ -436,7 +436,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { args, waitOnExit }; - if (task.command.terminal.echo) { + if (task.command.terminalBehavior.echo) { let getArgsToEcho = (args: string | string[]): string => { if (!args || args.length === 0) { return ''; diff --git a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts index 9f4d55278f5ff..de4bc36b7f51b 100644 --- a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts @@ -179,12 +179,12 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem { this.childProcess = new LineProcess(command, args, commandConfig.type === CommandType.Shell, this.resolveOptions(commandConfig.options)); telemetryEvent.command = this.childProcess.getSanitizedCommand(); // we have no problem matchers defined. So show the output log - let reveal = task.command.terminal.reveal; + let reveal = task.command.terminalBehavior.reveal; if (reveal === RevealKind.Always || (reveal === RevealKind.Silent && task.problemMatchers.length === 0)) { this.showOutput(); } - if (commandConfig.terminal.echo) { + if (commandConfig.terminalBehavior.echo) { let prompt: string = Platform.isWindows ? '>' : '$'; this.log(`running command${prompt} ${command} ${args.join(' ')}`); } diff --git a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts index bd75eb83f0123..27dcb251cd0bd 100644 --- a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts +++ b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts @@ -101,7 +101,7 @@ class CommandConfigurationBuilder { options: { cwd: '${workspaceRoot}' }, - terminal: this.terminalBuilder.result + terminalBehavior: this.terminalBuilder.result }; } @@ -432,7 +432,7 @@ function assertTask(actual: Tasks.Task, expected: Tasks.Task) { function assertCommandConfiguration(actual: Tasks.CommandConfiguration, expected: Tasks.CommandConfiguration) { assert.strictEqual(typeof actual, typeof expected); if (actual && expected) { - assertTerminalBehavior(actual.terminal, expected.terminal); + assertTerminalBehavior(actual.terminalBehavior, expected.terminalBehavior); assert.strictEqual(actual.name, expected.name, 'name'); assert.strictEqual(actual.type, expected.type, 'task type'); assert.deepEqual(actual.args, expected.args, 'args'); From 8d6fd510b8d6ea23ad7e319b8abb129bf3479419 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 31 May 2017 13:28:56 +0200 Subject: [PATCH 1349/2747] Fixes #27459: Test first/last character in match if they are word separators besides the before/after characters --- src/vs/editor/common/model/textModelSearch.ts | 54 +++++++++++++++---- .../test/common/model/textModelSearch.test.ts | 26 +++++++++ 2 files changed, 70 insertions(+), 10 deletions(-) diff --git a/src/vs/editor/common/model/textModelSearch.ts b/src/vs/editor/common/model/textModelSearch.ts index af26593577653..867d52204e5ce 100644 --- a/src/vs/editor/common/model/textModelSearch.ts +++ b/src/vs/editor/common/model/textModelSearch.ts @@ -405,23 +405,57 @@ export class TextModelSearch { } } -function isValidMatch(wordSeparators: WordCharacterClassifier, text: string, textLength: number, matchStartIndex: number, matchLength: number): boolean { +function leftIsWordBounday(wordSeparators: WordCharacterClassifier, text: string, textLength: number, matchStartIndex: number, matchLength: number): boolean { + if (matchStartIndex === 0) { + // Match starts at start of string + return true; + } - if (matchStartIndex - 1 >= 0) { - const charBefore = text.charCodeAt(matchStartIndex - 1); - if (wordSeparators.get(charBefore) === WordCharacterClass.Regular) { - return false; + const charBefore = text.charCodeAt(matchStartIndex - 1); + if (wordSeparators.get(charBefore) !== WordCharacterClass.Regular) { + // The character before the match is a word separator + return true; + } + + if (matchLength > 0) { + const firstCharInMatch = text.charCodeAt(matchStartIndex); + if (wordSeparators.get(firstCharInMatch) !== WordCharacterClass.Regular) { + // The first character inside the match is a word separator + return true; } } - if (matchStartIndex + matchLength < textLength) { - const charAfter = text.charCodeAt(matchStartIndex + matchLength); - if (wordSeparators.get(charAfter) === WordCharacterClass.Regular) { - return false; + return false; +} + +function rightIsWordBounday(wordSeparators: WordCharacterClassifier, text: string, textLength: number, matchStartIndex: number, matchLength: number): boolean { + if (matchStartIndex + matchLength === textLength) { + // Match ends at end of string + return true; + } + + const charAfter = text.charCodeAt(matchStartIndex + matchLength); + if (wordSeparators.get(charAfter) !== WordCharacterClass.Regular) { + // The character after the match is a word separator + return true; + } + + if (matchLength > 0) { + const lastCharInMatch = text.charCodeAt(matchStartIndex + matchLength - 1); + if (wordSeparators.get(lastCharInMatch) !== WordCharacterClass.Regular) { + // The last character in the match is a word separator + return true; } } - return true; + return false; +} + +function isValidMatch(wordSeparators: WordCharacterClassifier, text: string, textLength: number, matchStartIndex: number, matchLength: number): boolean { + return ( + leftIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) + && rightIsWordBounday(wordSeparators, text, textLength, matchStartIndex, matchLength) + ); } class Searcher { diff --git a/src/vs/editor/test/common/model/textModelSearch.test.ts b/src/vs/editor/test/common/model/textModelSearch.test.ts index 274ce45b934bf..df67b81aa49d2 100644 --- a/src/vs/editor/test/common/model/textModelSearch.test.ts +++ b/src/vs/editor/test/common/model/textModelSearch.test.ts @@ -354,6 +354,32 @@ suite('TextModelSearch', () => { ); }); + test('issue #27459: Match whole words regression', () => { + assertFindMatches( + [ + 'this._register(this._textAreaInput.onKeyDown((e: IKeyboardEvent) => {', + ' this._viewController.emitKeyDown(e);', + '}));', + ].join('\n'), + '((e: ', false, false, USUAL_WORD_SEPARATORS, + [ + [1, 45, 1, 50] + ] + ); + }); + + test('issue #27594: Search results disappear', () => { + assertFindMatches( + [ + 'this.server.listen(0);', + ].join('\n'), + 'listen(', false, false, USUAL_WORD_SEPARATORS, + [ + [1, 13, 1, 20] + ] + ); + }); + test('findNextMatch without regex', () => { let model = TextModel.createFromString('line line one\nline two\nthree'); From eb76d7a88f9eef8188db2284afb657966414bb99 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 31 May 2017 13:38:46 +0200 Subject: [PATCH 1350/2747] Fixes #27699: Use default cursor on the screen reader status bar entry --- .../browser/parts/editor/media/editorstatus.css | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/media/editorstatus.css b/src/vs/workbench/browser/parts/editor/media/editorstatus.css index 5d33e7ae6fdcf..b7ff137ac26ac 100644 --- a/src/vs/workbench/browser/parts/editor/media/editorstatus.css +++ b/src/vs/workbench/browser/parts/editor/media/editorstatus.css @@ -12,17 +12,13 @@ .monaco-workbench .editor-statusbar-item > .editor-status-eol, .monaco-workbench .editor-statusbar-item > .editor-status-selection, .monaco-workbench .editor-statusbar-item > .editor-status-indentation, -.monaco-workbench .editor-statusbar-item > .editor-status-metadata { +.monaco-workbench .editor-statusbar-item > .editor-status-metadata, +.monaco-workbench .editor-statusbar-item > .editor-status-tabfocusmode, +.monaco-workbench .editor-statusbar-item > .editor-status-screenreadermode { padding: 0 5px 0 5px; } -.monaco-workbench .editor-statusbar-item > .editor-status-metadata { +.monaco-workbench .editor-statusbar-item > .editor-status-metadata, +.monaco-workbench > .part.statusbar > .statusbar-item > .editor-statusbar-item > a.editor-status-screenreadermode { cursor: default; } - -.monaco-workbench .editor-statusbar-item > .editor-status-tabfocusmode { - padding: 0 5px 0 5px; -} -.monaco-workbench .editor-statusbar-item > .editor-status-screenreadermode { - padding: 0 5px 0 5px; -} \ No newline at end of file From c212aeb70463e0aeea10ef4b706712b186bace4a Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 31 May 2017 14:07:05 +0200 Subject: [PATCH 1351/2747] Fixes #27550: Mention that the editor.multiCursorModifier setting influences Go To Definition and Open Link gestures --- src/vs/editor/common/config/commonEditorConfig.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 38eb78fc8b9ca..7d74da7a72d49 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -329,7 +329,13 @@ const editorConfiguration: IConfigurationNode = { nls.localize('multiCursorModifier.alt', "Maps to `Alt` on Windows and Linux and to `Option` on OSX.") ], 'default': 'alt', - 'description': nls.localize('multiCursorModifier', "The modifier to be used to add multiple cursors with the mouse. `ctrlCmd` maps to `Control` on Windows and Linux and to `Command` on OSX") + 'description': nls.localize({ + key: 'multiCursorModifier', + comment: [ + '- `ctrlCmd` refers to a value the setting can take and should not be localized.', + '- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized.' + ] + }, "The modifier to be used to add multiple cursors with the mouse. `ctrlCmd` maps to `Control` on Windows and Linux and to `Command` on OSX. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier.") }, 'editor.quickSuggestions': { 'anyOf': [ From eade00613f46fdb119def35131d76f4bae262267 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 31 May 2017 14:21:55 +0200 Subject: [PATCH 1352/2747] cancel snippet mode when undo'ing to the 'before' state, fixes #27612 --- .../snippet/browser/snippetController2.ts | 16 ++++++++++++++-- .../test/browser/snippetController2.old.test.ts | 16 ++++++++-------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 4c210d851ac28..96dd960845bfc 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -82,9 +82,9 @@ export class SnippetController2 { private readonly _hasNextTabstop: IContextKey; private readonly _hasPrevTabstop: IContextKey; - // private _snippet: SnippetSession; private _sessions = new SnippetSessions(); private _snippetListener: IDisposable[] = []; + private _modelVersionId: number; constructor( private readonly _editor: ICommonCodeEditor, @@ -122,7 +122,13 @@ export class SnippetController2 { const snippet = new SnippetSession(this._editor, template, overwriteBefore, overwriteAfter); const newLen = this._sessions.add(snippet); - snippet.insert(newLen > 1); + + if (newLen === 1) { + this._modelVersionId = this._editor.getModel().getAlternativeVersionId(); + snippet.insert(false); + } else { + snippet.insert(true); + } if (undoStopAfter) { this._editor.getModel().pushStackElement(); @@ -141,6 +147,12 @@ export class SnippetController2 { return; } + if (this._modelVersionId === this._editor.getModel().getAlternativeVersionId()) { + // undo until the 'before' state happened + // and makes use cancel snippet mode + return this.cancel(); + } + if (!this._sessions.hasPlaceholder) { // don't listen for selection changes and don't // update context keys when the snippet is plain text diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts index 1efa1b1a8c1a8..fc12236bd339f 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.old.test.ts @@ -189,16 +189,16 @@ suite('SnippetController', () => { }); }); - // test('Stops when undoing', () => { - // snippetTest((editor, cursor, codeSnippet, snippetController) => { - // editor.setPosition({ lineNumber: 4, column: 2 }); - // snippetController.run(codeSnippet, 0, 0); + test('Stops when undoing', () => { + snippetTest((editor, cursor, codeSnippet, snippetController) => { + editor.setPosition({ lineNumber: 4, column: 2 }); + snippetController.insert(codeSnippet, 0, 0); - // editor.getModel().undo(); + editor.getModel().undo(); - // assert.equal(snippetController.isInSnippetMode(), false); - // }); - // }); + assert.equal(snippetController.isInSnippetMode(), false); + }); + }); test('Stops when moving cursor outside', () => { snippetTest((editor, cursor, codeSnippet, snippetController) => { From 48631d689f77bab489ba0d9ced197263c5d5447c Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 31 May 2017 14:36:00 +0200 Subject: [PATCH 1353/2747] Breakpoints/Call Stack: clicking on entry with column info jump to that column fixes #27598 --- src/vs/workbench/parts/debug/common/debugModel.ts | 2 +- src/vs/workbench/parts/debug/electron-browser/debugViewer.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index 4b0a76db3205a..e82bdfd5f67a9 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -383,7 +383,7 @@ export class StackFrame implements IStackFrame { description: this.source.origin, options: { preserveFocus, - selection: { startLineNumber: this.range.startLineNumber, startColumn: 1 }, + selection: this.range, revealIfVisible: true, revealInCenterIfOutsideViewport: true, pinned: !preserveFocus diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index ea989342bbb95..e4eb230068f7d 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -1270,7 +1270,7 @@ export class BreakpointsController extends BaseDebugController { endColumn: breakpoint.endColumn } : { startLineNumber: breakpoint.lineNumber, - startColumn: 1 + startColumn: breakpoint.column || 1 }; this.editorService.openEditor({ From 8cf60f346cbd451d04531c2639c21798ed961a5e Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 31 May 2017 14:31:49 +0200 Subject: [PATCH 1354/2747] Fix #27670 --- src/vs/vscode.proposed.d.ts | 2 +- src/vs/workbench/api/node/extHostTreeViews.ts | 33 +++++++++++-------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 7bc2d68239115..2e015db675360 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -36,7 +36,7 @@ declare module 'vscode' { * @param element The element for which [TreeItem](#TreeItem) representation is asked for. * @return [TreeItem](#TreeItem) representation of the element */ - getTreeItem(element: T): TreeItem; + getTreeItem(element: T): TreeItem | Thenable; /** * Get the children of `element` or root. diff --git a/src/vs/workbench/api/node/extHostTreeViews.ts b/src/vs/workbench/api/node/extHostTreeViews.ts index d94eabb4167b3..99e21c10c723a 100644 --- a/src/vs/workbench/api/node/extHostTreeViews.ts +++ b/src/vs/workbench/api/node/extHostTreeViews.ts @@ -125,28 +125,35 @@ class ExtHostTreeView extends Disposable { } private processAndMapElements(elements: T[]): TPromise { - const treeItemsPromises: TPromise[] = []; - for (const element of elements) { - if (element) { - if (this.extChildrenElementsMap.has(element)) { - return TPromise.wrapError(localize('treeView.duplicateElement', 'Element {0} is already registered', element)); - } - const treeItem = this.massageTreeItem(this.dataProvider.getTreeItem(element)); + return TPromise.join( + elements.filter(element => !!element) + .map(element => { + if (this.extChildrenElementsMap.has(element)) { + return TPromise.wrapError(localize('treeView.duplicateElement', 'Element {0} is already registered', element)); + } + return this.resolveElement(element); + })) + .then(treeItems => treeItems.filter(treeItem => !!treeItem)); + } + + private resolveElement(element: T): TPromise { + return asWinJsPromise(() => this.dataProvider.getTreeItem(element)) + .then(extTreeItem => { + const treeItem = this.massageTreeItem(extTreeItem); if (treeItem) { this.itemHandlesMap.set(element, treeItem.handle); this.extElementsMap.set(treeItem.handle, element); if (treeItem.collapsibleState === TreeItemCollapsibleState.Expanded) { - treeItemsPromises.push(this.getChildren(treeItem.handle).then(children => { + return this.getChildren(treeItem.handle).then(children => { treeItem.children = children; return treeItem; - })); + }); } else { - treeItemsPromises.push(TPromise.as(treeItem)); + return treeItem; } } - } - } - return TPromise.join(treeItemsPromises); + return null; + }); } private massageTreeItem(extensionTreeItem: vscode.TreeItem): ITreeItem { From 05fc00ead2bb4f80fc41a82e6b7e1f4720adb1f0 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 31 May 2017 14:59:15 +0200 Subject: [PATCH 1355/2747] debug: toString of OutputNameValueElement do not take name into account if it is not defined fixes #27523 --- src/vs/workbench/parts/debug/common/debugModel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index e82bdfd5f67a9..e036ea1bb0868 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -96,7 +96,7 @@ export class OutputNameValueElement extends AbstractOutputElement implements IEx } public toString(): string { - return `${this.name}: ${this.value}`; + return this.name ? `${this.name}: ${this.value}` : this.value; } } From c4620deadf4240acfc11606e9afb45baaedfefb8 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 31 May 2017 15:04:35 +0200 Subject: [PATCH 1356/2747] debug: save all before sending a custom restart request to be aligned with regular restart fixes #26844 --- src/vs/workbench/parts/debug/electron-browser/debugService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index c54ba326fb556..87f7a74c5c411 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -893,7 +893,7 @@ export class DebugService implements debug.IDebugService { public restartProcess(process: debug.IProcess, restartData?: any): TPromise { if (process.session.capabilities.supportsRestartRequest) { - return process.session.custom('restart', null); + return this.textFileService.saveAll().then(() => process.session.custom('restart', null)); } const focusedProcess = this.viewModel.focusedProcess; const preserveFocus = focusedProcess && process.getId() === focusedProcess.getId(); From 4a38bdc1f577a538e09a1f501e6fc4464e8bac54 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Wed, 31 May 2017 15:16:40 +0200 Subject: [PATCH 1357/2747] First cut of a version converter --- .../parts/tasks/common/taskConfiguration.ts | 82 ++++++++++++++++++- 1 file changed, 80 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts index 08a0477c753f2..f39f7786efa12 100644 --- a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts @@ -989,7 +989,7 @@ namespace TaskDescription { for (let i = 0; i < value.length; i++) { let ch = value.charAt(i); if (ch === ' ') { - if (i === 0 || value.charAt(i) !== '\\') { + if (i === 0 || value.charAt(i - 1) !== '\\') { return true; } } @@ -1236,4 +1236,82 @@ export function parse(configuration: ExternalTaskRunnerConfiguration, logger: IP export function mergeTasks(target: Tasks.Task, source: Tasks.Task): Tasks.Task { return TaskDescription.merge(target, source); -} \ No newline at end of file +} + +/* +class VersionConverter { + constructor(private problemReporter: IProblemReporter) { + } + + public convert(fromConfig: ExternalTaskRunnerConfiguration): ExternalTaskRunnerConfiguration { + let result: ExternalTaskRunnerConfiguration; + result.version = '2.0.0'; + if (Array.isArray(fromConfig.tasks)) { + + } else { + result.tasks = []; + } + + + return result; + } + + private convertGlobalTask(fromConfig: ExternalTaskRunnerConfiguration): TaskDescription { + let command: string = this.getGlobalCommand(fromConfig); + if (!command) { + this.problemReporter.error(nls.localize('Converter.noGlobalName', 'No global command specified. Can\'t convert to 2.0.0 version.')); + return undefined; + } + let result: TaskDescription = { + taskName: command + }; + if (fromConfig.isShellCommand) { + result.type = 'shell'; + } else { + result.type = 'process'; + result.args = fromConfig.args; + } + if (fromConfig.) + + return result; + } + + private getGlobalCommand(fromConfig: ExternalTaskRunnerConfiguration): string { + if (fromConfig.command) { + return fromConfig.command; + } else if (fromConfig.windows && fromConfig.windows.command) { + return fromConfig.windows.command; + } else if (fromConfig.osx && fromConfig.osx.command) { + return fromConfig.osx.command; + } else if (fromConfig.linux && fromConfig.linux.command) { + return fromConfig.linux.command; + } else { + return undefined; + } + } + + private createCommandLine(command: string, args: string[], isWindows: boolean): string { + let result: string[]; + let commandHasSpace = false; + let argHasSpace = false; + if (TaskDescription.hasUnescapedSpaces(command)) { + result.push(`"${command}"`); + commandHasSpace = true; + } else { + result.push(command); + } + if (args) { + for (let arg of args) { + if (TaskDescription.hasUnescapedSpaces(arg)) { + result.push(`"${arg}"`); + argHasSpace= true; + } else { + result.push(arg); + } + } + } + return result.join(' '); + } + +} +*/ \ No newline at end of file From 06d60228fdbe75641998f6e82c6bda981379607b Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 31 May 2017 15:27:50 +0200 Subject: [PATCH 1358/2747] Added description on how to debug smoke test. --- test/smoke/CONTRIBUTING.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/test/smoke/CONTRIBUTING.md b/test/smoke/CONTRIBUTING.md index 8aaef8a7875ee..7b403022778d8 100644 --- a/test/smoke/CONTRIBUTING.md +++ b/test/smoke/CONTRIBUTING.md @@ -11,4 +11,25 @@ To contribute a new smoke test area, add `${area}.ts` file under `./areas`. This has to follow the bot-style approach described in the links mentioned above. Methods should be calling WebDriverIO API through `SpectronClient` class. If there is no existing WebDriverIO method, add it to the class. # Adding new test -To add new test area or test, `main.ts` should be updated. The same instruction-style principle needs to be followed with the called area method names that reflect manual tester's actions. \ No newline at end of file +To add new test area or test, `main.ts` should be updated. The same instruction-style principle needs to be followed with the called area method names that reflect manual tester's actions. + +# Debugging +1. Add the following configuration to launch.json, specifying binaries in `args`: +```json +{ + "type": "node", + "request": "launch", + "name": "Launch Smoke Test", + "program": "${workspaceRoot}/test/smoke/src/main.js", + "cwd": "${workspaceRoot}/test/smoke", + "port": 9999, + "args": [ + "-l", + "path/to/Code.exe" + ], + "outFiles": [ + "${cwd}/out/**/*.js" + ] +}, +``` +2. In main.js add `--debug-brk=9999` argument to the place where `src/mocha-runner.js` is spawned. \ No newline at end of file From 100f70c3fb9353a7c724215f81a59c5e7a1a874b Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 31 May 2017 15:30:00 +0200 Subject: [PATCH 1359/2747] Fixes #27604. --- test/smoke/src/areas/integrated-terminal.ts | 16 ++++++++-------- test/smoke/src/mocha-runner.js | 1 - test/smoke/src/tests/integrated-terminal.ts | 3 +-- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/test/smoke/src/areas/integrated-terminal.ts b/test/smoke/src/areas/integrated-terminal.ts index c41f2946d4d88..4431794546c22 100644 --- a/test/smoke/src/areas/integrated-terminal.ts +++ b/test/smoke/src/areas/integrated-terminal.ts @@ -23,17 +23,17 @@ export class IntegratedTerminal { return this.spectron.command('workbench.action.terminal.toggleTerminal'); } - public async getCommandOutput(command: string): Promise { + public async commandOutputHas(result: string): Promise { const selector = 'div[id="workbench.panel.terminal"] .xterm-rows'; - // Default Powershell terminal adds 3 header rows at the top, whereas bash does not. - let readRow = process.platform === 'win32' ? 5 : 2; - let output: string = await this.spectron.client.getText(`${selector}>:nth-child(${readRow})`); - // If ended up on the wrong line, it could be terminal's restored session (e.g. on OS X) - if (output.trim().endsWith(command)) { - output = await this.spectron.client.getText(`${selector}>:nth-child(${readRow+1})`); // try next line + const rows = await this.spectron.client.elements(`${selector} div`); + for (let i = 0; i < rows.value.length; i++) { + const rowText = await this.spectron.client.getText(`${selector}>:nth-child(${i+1})`); + if (rowText.trim() === result) { + return true; + } } - return output.trim(); // remove many   tags + return false; } } \ No newline at end of file diff --git a/test/smoke/src/mocha-runner.js b/test/smoke/src/mocha-runner.js index 39a91bcdbabc6..fe25e8855449f 100644 --- a/test/smoke/src/mocha-runner.js +++ b/test/smoke/src/mocha-runner.js @@ -5,7 +5,6 @@ var Mocha = require('mocha'); var path = require('path'); -var fs = require('fs'); var mocha = new Mocha({ timeout: 360000, diff --git a/test/smoke/src/tests/integrated-terminal.ts b/test/smoke/src/tests/integrated-terminal.ts index c05a84e0b2af6..4785e47aff6ba 100644 --- a/test/smoke/src/tests/integrated-terminal.ts +++ b/test/smoke/src/tests/integrated-terminal.ts @@ -34,8 +34,7 @@ export function testIntegratedTerminal() { await common.type(command); await common.enter(); await app.wait(); - let output = await terminal.getCommandOutput(command); - assert.equal(output, 'test'); + assert.ok(await terminal.commandOutputHas('test')); }); }); } \ No newline at end of file From 20a33eeb2cdceda1dd56405acc498da5eecb5333 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 31 May 2017 15:41:10 +0200 Subject: [PATCH 1360/2747] output: reveal last line and column, not only line because some users only use append in output and have a long line fixes #26753 --- src/vs/workbench/browser/parts/editor/textResourceEditor.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/textResourceEditor.ts b/src/vs/workbench/browser/parts/editor/textResourceEditor.ts index dda89f7447b1d..764c05766044e 100644 --- a/src/vs/workbench/browser/parts/editor/textResourceEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textResourceEditor.ts @@ -152,7 +152,6 @@ export class TextResourceEditor extends BaseTextEditor { /** * Reveals the last line of this editor if it has a model set. - * If smart reveal is true will only reveal the last line if the line before last is visible #3351 */ public revealLastLine(): void { const codeEditor = this.getControl(); @@ -160,7 +159,7 @@ export class TextResourceEditor extends BaseTextEditor { if (model) { const lastLine = model.getLineCount(); - codeEditor.revealLine(lastLine); + codeEditor.revealPosition({ lineNumber: lastLine, column: model.getLineMaxColumn(lastLine) }); } } From 86110204b284bcf4af1ac50f66028e58658a11df Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 31 May 2017 15:58:59 +0200 Subject: [PATCH 1361/2747] Fix #12744 --- .../configuration-editing/src/extension.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/extensions/configuration-editing/src/extension.ts b/extensions/configuration-editing/src/extension.ts index 92a3075f8b3b1..666e8775a6959 100644 --- a/extensions/configuration-editing/src/extension.ts +++ b/extensions/configuration-editing/src/extension.ts @@ -79,7 +79,15 @@ function registerExtensionsCompletions(): vscode.Disposable { || e.id === 'Microsoft.vscode-markdown' || alreadyEnteredExtensions.indexOf(e.id) > -1 )) - .map(e => newSimpleCompletionItem(e.id, range, undefined, '"' + e.id + '"')); + .map(e => { + const item = new vscode.CompletionItem(e.id); + const insertText = `"${e.id}"`; + item.kind = vscode.CompletionItemKind.Value; + item.insertText = insertText; + item.range = range; + item.filterText = insertText; + return item; + }); } } return []; @@ -87,11 +95,11 @@ function registerExtensionsCompletions(): vscode.Disposable { }); } -function newSimpleCompletionItem(text: string, range: vscode.Range, description?: string, insertText?: string): vscode.CompletionItem { - const item = new vscode.CompletionItem(text); +function newSimpleCompletionItem(label: string, range: vscode.Range, description?: string, insertText?: string): vscode.CompletionItem { + const item = new vscode.CompletionItem(label); item.kind = vscode.CompletionItemKind.Value; item.detail = description; - item.insertText = insertText || text; + item.insertText = insertText || label; item.range = range; return item; From d401c82fad589177f35ac2fcd7ec9e1070221f31 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 31 May 2017 16:12:43 +0200 Subject: [PATCH 1362/2747] Fixes #27490: Improve hover message --- .../browser/keybindingsEditorContribution.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts index 3f560219cfeb9..d4be2ebf38c97 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts @@ -28,7 +28,6 @@ import { ScanCodeBinding } from 'vs/workbench/services/keybinding/common/scanCod import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; const NLS_LAUNCH_MESSAGE = nls.localize('defineKeybinding.start', "Define Keybinding"); -const NLS_KB_LAYOUT_INFO_MESSAGE = nls.localize('defineKeybinding.kbLayoutInfoMessage', "For your current keyboard layout press "); const NLS_KB_LAYOUT_ERROR_MESSAGE = nls.localize('defineKeybinding.kbLayoutErrorMessage', "You won't be able to produce this key combination under your current keyboard layout."); const INTERESTING_FILE = /keybindings\.json$/; @@ -298,8 +297,15 @@ export class KeybindingEditorDecorationsRenderer extends Disposable { overviewRulerColor = 'rgba(250, 100, 100, 0.6)'; } else { // this is the info case - msg = [NLS_KB_LAYOUT_INFO_MESSAGE]; - msg = msg.concat(message); + msg = [ + nls.localize({ + key: 'defineKeybinding.kbLayoutLocalMessage', + comment: [ + 'Please translate maintaining the stars (*) around the placeholder such that it will be rendered in bold.', + 'The placeholder will contain a keyboard combination e.g. Ctrl+Shift+/' + ] + }, "**{0}** for your current keyboard layout.", message) + ]; className = 'keybindingInfo'; beforeContentClassName = 'inlineKeybindingInfo'; overviewRulerColor = 'rgba(100, 100, 250, 0.6)'; From bcdbc335eb000671ce708896f33366bb96f34f30 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 31 May 2017 16:13:49 +0200 Subject: [PATCH 1363/2747] Fix #27747 --- src/vs/vscode.proposed.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 2e015db675360..89aad78d4047a 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -39,10 +39,10 @@ declare module 'vscode' { getTreeItem(element: T): TreeItem | Thenable; /** - * Get the children of `element` or root. + * Get the children of `element` or root if no element (`undefined`) is passed. * - * @param element The element from which the provider gets children for. - * @return Children of `element` or root. + * @param element The element from which the provider gets children. Can be `undefined`. + * @return Children of `element` or root if no element (`undefined`) is passed. */ getChildren(element?: T): ProviderResult; } From 6ba48011f541aa50bdaf31e966bf08f1efde5551 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 31 May 2017 16:18:27 +0200 Subject: [PATCH 1364/2747] debug: tryToAutoFocusStackFrame fixes #25104 --- .../debug/electron-browser/debugService.ts | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 87f7a74c5c411..49b429ed4f46e 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -126,7 +126,8 @@ export class DebugService implements debug.IDebugService { // Some adapters might not respect the number levels in StackTraceRequest and might // return more stackFrames than requested. For those do not send an additional stackTrace request. if (callStack.length <= 1) { - this.model.fetchCallStack(focusedThread).done(undefined, errors.onUnexpectedError); + this.model.fetchCallStack(focusedThread).done(() => + this.tryToAutoFocusStackFrame(focusedThread), errors.onUnexpectedError); } } }, 420); @@ -264,6 +265,25 @@ export class DebugService implements debug.IDebugService { } } + private tryToAutoFocusStackFrame(thread: debug.IThread): TPromise { + const callStack = thread.getCallStack(); + if (!callStack.length || this.viewModel.focusedStackFrame) { + return TPromise.as(null); + } + + // focus first stack frame from top that has source location if no other stack frame is focussed + const stackFrameToFocus = first(callStack, sf => sf.source && sf.source.available, undefined); + if (!stackFrameToFocus) { + return TPromise.as(null); + } + + this.focusStackFrameAndEvaluate(stackFrameToFocus).done(null, errors.onUnexpectedError); + this.windowService.getWindow().focus(); + aria.alert(nls.localize('debuggingPaused', "Debugging paused, reason {0}, {1} {2}", thread.stoppedDetails.reason, stackFrameToFocus.source ? stackFrameToFocus.source.name : '', stackFrameToFocus.range.startLineNumber)); + + return stackFrameToFocus.openInEditor(this.editorService); + } + private registerSessionListeners(process: Process, session: RawDebugSession): void { this.toDisposeOnSessionEnd.get(session.getId()).push(session); this.toDisposeOnSessionEnd.get(session.getId()).push(session.onDidInitialize(event => { @@ -307,18 +327,8 @@ export class DebugService implements debug.IDebugService { // Call fetch call stack twice, the first only return the top stack frame. // Second retrieves the rest of the call stack. For performance reasons #25605 this.model.fetchCallStack(thread).then(() => { - const callStack = thread.getCallStack(); this.callStackScheduler.schedule(); - if (callStack.length > 0 && !this.viewModel.focusedStackFrame) { - // focus first stack frame from top that has source location if no other stack frame is focussed - const stackFrameToFocus = first(callStack, sf => sf.source && sf.source.available, callStack[0]); - this.focusStackFrameAndEvaluate(stackFrameToFocus).done(null, errors.onUnexpectedError); - this.windowService.getWindow().focus(); - aria.alert(nls.localize('debuggingPaused', "Debugging paused, reason {0}, {1} {2}", event.body.reason, stackFrameToFocus.source ? stackFrameToFocus.source.name : '', stackFrameToFocus.range.startLineNumber)); - - return stackFrameToFocus.openInEditor(this.editorService); - } - return undefined; + return this.tryToAutoFocusStackFrame(thread); }); } }, errors.onUnexpectedError); From e98c09c842df5a045f52386246a860c530945d9d Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Wed, 31 May 2017 16:18:42 +0200 Subject: [PATCH 1365/2747] Fixes #27738: Defer switching to Tasks 2.0.0 as the default --- extensions/grunt/package.json | 1 + extensions/gulp/package.json | 1 + extensions/jake/package.json | 1 + extensions/typescript/package.json | 1 + extensions/typescript/src/typings/ref.d.ts | 1 + src/vs/vscode.d.ts | 329 ------------------ src/vs/vscode.proposed.d.ts | 329 ++++++++++++++++++ src/vs/workbench/api/node/extHost.api.impl.ts | 4 +- .../parts/tasks/common/taskConfiguration.ts | 10 +- .../parts/tasks/common/taskTemplates.ts | 218 ++++++++++++ .../tasks/electron-browser/jsonSchema_v2.ts | 12 +- .../electron-browser/task.contribution.ts | 61 +++- 12 files changed, 626 insertions(+), 342 deletions(-) diff --git a/extensions/grunt/package.json b/extensions/grunt/package.json index e8bac905a6945..274d158ab28bd 100644 --- a/extensions/grunt/package.json +++ b/extensions/grunt/package.json @@ -7,6 +7,7 @@ "engines": { "vscode": "*" }, + "enableProposedApi": true, "categories": [ "Other" ], diff --git a/extensions/gulp/package.json b/extensions/gulp/package.json index 5ec491853fef1..6a9845ce00ab7 100644 --- a/extensions/gulp/package.json +++ b/extensions/gulp/package.json @@ -7,6 +7,7 @@ "engines": { "vscode": "*" }, + "enableProposedApi": true, "categories": [ "Other" ], diff --git a/extensions/jake/package.json b/extensions/jake/package.json index ee5a916ade52f..16892a14655ab 100644 --- a/extensions/jake/package.json +++ b/extensions/jake/package.json @@ -7,6 +7,7 @@ "engines": { "vscode": "*" }, + "enableProposedApi": true, "categories": [ "Other" ], diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index 7d5105c3dca38..74700e642b765 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -10,6 +10,7 @@ "engines": { "vscode": "*" }, + "enableProposedApi": true, "dependencies": { "semver": "4.3.6", "vscode-extension-telemetry": "^0.0.7", diff --git a/extensions/typescript/src/typings/ref.d.ts b/extensions/typescript/src/typings/ref.d.ts index bc057c5587839..954bab971e334 100644 --- a/extensions/typescript/src/typings/ref.d.ts +++ b/extensions/typescript/src/typings/ref.d.ts @@ -4,4 +4,5 @@ *--------------------------------------------------------------------------------------------*/ /// +/// /// diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 4e5e206c8afd4..1943316e02624 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -3537,335 +3537,6 @@ declare module 'vscode' { update(key: string, value: any): Thenable; } - /** - * Controls the behaviour of the terminal's visibility. - */ - export enum TaskRevealKind { - /** - * Always brings the terminal to front if the task is executed. - */ - Always = 1, - - /** - * Only brings the terminal to front if a problem is detected executing the task - * (e.g. the task couldn't be started because). - */ - Silent = 2, - - /** - * The terminal never comes to front when the task is executed. - */ - Never = 3 - } - - /** - * Controls terminal specific behavior. - */ - export interface TaskTerminalBehavior { - /** - * Controls whether the terminal executing a task is brought to front or not. - * Defaults to `RevealKind.Always`. - */ - reveal?: TaskRevealKind; - - /** - * Controls whether the command is echoed in the terminal or not. - */ - echo?: boolean; - } - - export interface ProcessTaskOptions { - /** - * The current working directory of the executed program or shell. - * If omitted the tools current workspace root is used. - */ - cwd?: string; - - /** - * The additional environment of the executed program or shell. If omitted - * the parent process' environment is used. If provided it is merged with - * the parent process' environment. - */ - env?: { [key: string]: string }; - } - - export namespace TaskGroup { - /** - * The clean task group - */ - export const Clean: 'clean'; - /** - * The build task group. If a task is part of the build task group - * it can be executed via the run build short cut. - */ - export const Build: 'build'; - /** - * The rebuild all task group - */ - export const RebuildAll: 'rebuildAll'; - /** - * The test task group. If a task is part of the test task group - * it can be executed via the run test short cut. - */ - export const Test: 'test'; - } - - /** - * A task that starts an external process. - */ - export class ProcessTask { - - /** - * Creates a process task. - * - * @param name the task's name. Is presented in the user interface. - * @param process the process to start. - * @param problemMatchers the names of problem matchers to use, like '$tsc' - * or '$eslint'. Problem matchers can be contributed by an extension using - * the `problemMatchers` extension point. - */ - constructor(name: string, process: string, problemMatchers?: string | string[]); - - /** - * Creates a process task. - * - * @param name the task's name. Is presented in the user interface. - * @param process the process to start. - * @param args arguments to be passed to the process. - * @param problemMatchers the names of problem matchers to use, like '$tsc' - * or '$eslint'. Problem matchers can be contributed by an extension using - * the `problemMatchers` extension point. - */ - constructor(name: string, process: string, args: string[], problemMatchers?: string | string[]); - - /** - * Creates a process task. - * - * @param name the task's name. Is presented in the user interface. - * @param process the process to start. - * @param args arguments to be passed to the process. - * @param options additional options for the started process. - * @param problemMatchers the names of problem matchers to use, like '$tsc' - * or '$eslint'. Problem matchers can be contributed by an extension using - * the `problemMatchers` extension point. - */ - constructor(name: string, process: string, args: string[], options: ProcessTaskOptions, problemMatchers?: string | string[]); - - /** - * The task's name - */ - readonly name: string; - - /** - * The task's identifier. If omitted the internal identifier will - * be `${extensionName}:${name}` - */ - identifier: string | undefined; - - /** - * Whether the task is a background task or not. - */ - isBackground: boolean; - - /** - * The process to be executed. - */ - readonly process: string; - - /** - * The arguments passed to the process. Defaults to an empty array. - */ - args: string[]; - - /** - * A human-readable string describing the source of this - * shell task, e.g. 'gulp' or 'npm'. - */ - source: string | undefined; - - /** - * The task group this tasks belongs to. See TaskGroup - * for a predefined set of available groups. - * Defaults to undefined meaning that the task doesn't - * belong to any special group. - */ - group: string | undefined; - - /** - * The process options used when the process is executed. - * Defaults to an empty object literal. - */ - options: ProcessTaskOptions; - - /** - * The terminal behavior. Defaults to an empty object literal. - */ - terminalBehavior: TaskTerminalBehavior; - - /** - * The problem matchers attached to the task. Defaults to an empty - * array. - */ - problemMatchers: string[]; - } - - export type ShellTaskOptions = { - /** - * The shell executable. - */ - executable: string; - - /** - * The arguments to be passed to the shell executable used to run the task. - */ - shellArgs?: string[]; - - /** - * The current working directory of the executed shell. - * If omitted the tools current workspace root is used. - */ - cwd?: string; - - /** - * The additional environment of the executed shell. If omitted - * the parent process' environment is used. If provided it is merged with - * the parent process' environment. - */ - env?: { [key: string]: string }; - } | { - /** - * The current working directory of the executed shell. - * If omitted the tools current workspace root is used. - */ - cwd: string; - - /** - * The additional environment of the executed shell. If omitted - * the parent process' environment is used. If provided it is merged with - * the parent process' environment. - */ - env?: { [key: string]: string }; - } | { - /** - * The current working directory of the executed shell. - * If omitted the tools current workspace root is used. - */ - cwd?: string; - - /** - * The additional environment of the executed shell. If omitted - * the parent process' environment is used. If provided it is merged with - * the parent process' environment. - */ - env: { [key: string]: string }; - }; - - /** - * A task that executes a shell command. - */ - export class ShellTask { - - /** - * Creates a shell task. - * - * @param name the task's name. Is presented in the user interface. - * @param commandLine the command line to execute. - * @param problemMatchers the names of problem matchers to use, like '$tsc' - * or '$eslint'. Problem matchers can be contributed by an extension using - * the `problemMatchers` extension point. - */ - constructor(name: string, commandLine: string, problemMatchers?: string | string[]); - - /** - * Creates a shell task. - * - * @param name the task's name. Is presented in the user interface. - * @param commandLine the command line to execute. - * @param options additional options used when creating the shell. - * @param problemMatchers the names of problem matchers to use, like '$tsc' - * or '$eslint'. Problem matchers can be contributed by an extension using - * the `problemMatchers` extension point. - */ - constructor(name: string, commandLine: string, options: ShellTaskOptions, problemMatchers?: string | string[]); - - /** - * The task's name - */ - readonly name: string; - - /** - * The task's identifier. If omitted the internal identifier will - * be `${extensionName}:${name}` - */ - identifier: string | undefined; - - /** - * Whether the task is a background task or not. - */ - isBackground: boolean; - - /** - * The command line to execute. - */ - readonly commandLine: string; - - /** - * A human-readable string describing the source of this - * shell task, e.g. 'gulp' or 'npm'. - */ - source: string | undefined; - - /** - * The task group this tasks belongs to. See TaskGroup - * for a predefined set of available groups. - * Defaults to undefined meaning that the task doesn't - * belong to any special group. - */ - group: string | undefined; - - /** - * The shell options used when the shell is executed. Defaults to an - * empty object literal. - */ - options: ShellTaskOptions; - - /** - * The terminal behavior. Defaults to an empty object literal. - */ - terminalBehavior: TaskTerminalBehavior; - - /** - * The problem matchers attached to the task. Defaults to an empty - * array. - */ - problemMatchers: string[]; - } - - export type Task = ProcessTask | ShellTask; - - /** - * A task provider allows to add tasks to the task service. - * A task provider is registerd via #workspace.registerTaskProvider. - */ - export interface TaskProvider { - /** - * Provides additional tasks. - * @param token A cancellation token. - * @return a #TaskSet - */ - provideTasks(token: CancellationToken): ProviderResult; - } - - export namespace workspace { - /** - * Register a task provider. - * - * @param provider A task provider. - * @return A [disposable](#Disposable) that unregisters this provider when being disposed. - */ - export function registerTaskProvider(provider: TaskProvider): Disposable; - } - /** * Namespace describing the environment the editor runs in. */ diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 89aad78d4047a..c4ec6306a2565 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -7,6 +7,335 @@ declare module 'vscode' { + /** + * Controls the behaviour of the terminal's visibility. + */ + export enum TaskRevealKind { + /** + * Always brings the terminal to front if the task is executed. + */ + Always = 1, + + /** + * Only brings the terminal to front if a problem is detected executing the task + * (e.g. the task couldn't be started because). + */ + Silent = 2, + + /** + * The terminal never comes to front when the task is executed. + */ + Never = 3 + } + + /** + * Controls terminal specific behavior. + */ + export interface TaskTerminalBehavior { + /** + * Controls whether the terminal executing a task is brought to front or not. + * Defaults to `RevealKind.Always`. + */ + reveal?: TaskRevealKind; + + /** + * Controls whether the command is echoed in the terminal or not. + */ + echo?: boolean; + } + + export interface ProcessTaskOptions { + /** + * The current working directory of the executed program or shell. + * If omitted the tools current workspace root is used. + */ + cwd?: string; + + /** + * The additional environment of the executed program or shell. If omitted + * the parent process' environment is used. If provided it is merged with + * the parent process' environment. + */ + env?: { [key: string]: string }; + } + + export namespace TaskGroup { + /** + * The clean task group + */ + export const Clean: 'clean'; + /** + * The build task group. If a task is part of the build task group + * it can be executed via the run build short cut. + */ + export const Build: 'build'; + /** + * The rebuild all task group + */ + export const RebuildAll: 'rebuildAll'; + /** + * The test task group. If a task is part of the test task group + * it can be executed via the run test short cut. + */ + export const Test: 'test'; + } + + /** + * A task that starts an external process. + */ + export class ProcessTask { + + /** + * Creates a process task. + * + * @param name the task's name. Is presented in the user interface. + * @param process the process to start. + * @param problemMatchers the names of problem matchers to use, like '$tsc' + * or '$eslint'. Problem matchers can be contributed by an extension using + * the `problemMatchers` extension point. + */ + constructor(name: string, process: string, problemMatchers?: string | string[]); + + /** + * Creates a process task. + * + * @param name the task's name. Is presented in the user interface. + * @param process the process to start. + * @param args arguments to be passed to the process. + * @param problemMatchers the names of problem matchers to use, like '$tsc' + * or '$eslint'. Problem matchers can be contributed by an extension using + * the `problemMatchers` extension point. + */ + constructor(name: string, process: string, args: string[], problemMatchers?: string | string[]); + + /** + * Creates a process task. + * + * @param name the task's name. Is presented in the user interface. + * @param process the process to start. + * @param args arguments to be passed to the process. + * @param options additional options for the started process. + * @param problemMatchers the names of problem matchers to use, like '$tsc' + * or '$eslint'. Problem matchers can be contributed by an extension using + * the `problemMatchers` extension point. + */ + constructor(name: string, process: string, args: string[], options: ProcessTaskOptions, problemMatchers?: string | string[]); + + /** + * The task's name + */ + readonly name: string; + + /** + * The task's identifier. If omitted the internal identifier will + * be `${extensionName}:${name}` + */ + identifier: string | undefined; + + /** + * Whether the task is a background task or not. + */ + isBackground: boolean; + + /** + * The process to be executed. + */ + readonly process: string; + + /** + * The arguments passed to the process. Defaults to an empty array. + */ + args: string[]; + + /** + * A human-readable string describing the source of this + * shell task, e.g. 'gulp' or 'npm'. + */ + source: string | undefined; + + /** + * The task group this tasks belongs to. See TaskGroup + * for a predefined set of available groups. + * Defaults to undefined meaning that the task doesn't + * belong to any special group. + */ + group: string | undefined; + + /** + * The process options used when the process is executed. + * Defaults to an empty object literal. + */ + options: ProcessTaskOptions; + + /** + * The terminal behavior. Defaults to an empty object literal. + */ + terminalBehavior: TaskTerminalBehavior; + + /** + * The problem matchers attached to the task. Defaults to an empty + * array. + */ + problemMatchers: string[]; + } + + export type ShellTaskOptions = { + /** + * The shell executable. + */ + executable: string; + + /** + * The arguments to be passed to the shell executable used to run the task. + */ + shellArgs?: string[]; + + /** + * The current working directory of the executed shell. + * If omitted the tools current workspace root is used. + */ + cwd?: string; + + /** + * The additional environment of the executed shell. If omitted + * the parent process' environment is used. If provided it is merged with + * the parent process' environment. + */ + env?: { [key: string]: string }; + } | { + /** + * The current working directory of the executed shell. + * If omitted the tools current workspace root is used. + */ + cwd: string; + + /** + * The additional environment of the executed shell. If omitted + * the parent process' environment is used. If provided it is merged with + * the parent process' environment. + */ + env?: { [key: string]: string }; + } | { + /** + * The current working directory of the executed shell. + * If omitted the tools current workspace root is used. + */ + cwd?: string; + + /** + * The additional environment of the executed shell. If omitted + * the parent process' environment is used. If provided it is merged with + * the parent process' environment. + */ + env: { [key: string]: string }; + }; + + /** + * A task that executes a shell command. + */ + export class ShellTask { + + /** + * Creates a shell task. + * + * @param name the task's name. Is presented in the user interface. + * @param commandLine the command line to execute. + * @param problemMatchers the names of problem matchers to use, like '$tsc' + * or '$eslint'. Problem matchers can be contributed by an extension using + * the `problemMatchers` extension point. + */ + constructor(name: string, commandLine: string, problemMatchers?: string | string[]); + + /** + * Creates a shell task. + * + * @param name the task's name. Is presented in the user interface. + * @param commandLine the command line to execute. + * @param options additional options used when creating the shell. + * @param problemMatchers the names of problem matchers to use, like '$tsc' + * or '$eslint'. Problem matchers can be contributed by an extension using + * the `problemMatchers` extension point. + */ + constructor(name: string, commandLine: string, options: ShellTaskOptions, problemMatchers?: string | string[]); + + /** + * The task's name + */ + readonly name: string; + + /** + * The task's identifier. If omitted the internal identifier will + * be `${extensionName}:${name}` + */ + identifier: string | undefined; + + /** + * Whether the task is a background task or not. + */ + isBackground: boolean; + + /** + * The command line to execute. + */ + readonly commandLine: string; + + /** + * A human-readable string describing the source of this + * shell task, e.g. 'gulp' or 'npm'. + */ + source: string | undefined; + + /** + * The task group this tasks belongs to. See TaskGroup + * for a predefined set of available groups. + * Defaults to undefined meaning that the task doesn't + * belong to any special group. + */ + group: string | undefined; + + /** + * The shell options used when the shell is executed. Defaults to an + * empty object literal. + */ + options: ShellTaskOptions; + + /** + * The terminal behavior. Defaults to an empty object literal. + */ + terminalBehavior: TaskTerminalBehavior; + + /** + * The problem matchers attached to the task. Defaults to an empty + * array. + */ + problemMatchers: string[]; + } + + export type Task = ProcessTask | ShellTask; + + /** + * A task provider allows to add tasks to the task service. + * A task provider is registerd via #workspace.registerTaskProvider. + */ + export interface TaskProvider { + /** + * Provides additional tasks. + * @param token A cancellation token. + * @return a #TaskSet + */ + provideTasks(token: CancellationToken): ProviderResult; + } + + export namespace workspace { + /** + * Register a task provider. + * + * @param provider A task provider. + * @return A [disposable](#Disposable) that unregisters this provider when being disposed. + */ + export function registerTaskProvider(provider: TaskProvider): Disposable; + } + export namespace window { export function sampleFunction(): Thenable; diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index a859a1369fe2f..065f16fc76c49 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -448,9 +448,9 @@ export function createApiFactory( getConfiguration: (section?: string): vscode.WorkspaceConfiguration => { return extHostConfiguration.getConfiguration(section); }, - registerTaskProvider: (provider: vscode.TaskProvider) => { + registerTaskProvider: proposedApiFunction(extension, (provider: vscode.TaskProvider) => { return extHostTask.registerTaskProvider(extension, provider); - } + }) }; class SCM { diff --git a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts index f39f7786efa12..8d7903008c973 100644 --- a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts @@ -1101,6 +1101,8 @@ namespace Globals { export namespace ExecutionEngine { + export const _default: Tasks.ExecutionEngine = Tasks.ExecutionEngine.Process; + export function from(config: ExternalTaskRunnerConfiguration): Tasks.ExecutionEngine { let runner = config.runner || config._runner; let result: Tasks.ExecutionEngine; @@ -1128,16 +1130,20 @@ export namespace ExecutionEngine { export namespace JsonSchemaVersion { + export const _default: Tasks.JsonSchemaVersion = Tasks.JsonSchemaVersion.V0_1_0; + export function from(config: ExternalTaskRunnerConfiguration): Tasks.JsonSchemaVersion { let version = config.version; if (!version) { - return Tasks.JsonSchemaVersion.V2_0_0; + return _default; } switch (version) { case '0.1.0': return Tasks.JsonSchemaVersion.V0_1_0; - default: + case '2.0.0': return Tasks.JsonSchemaVersion.V2_0_0; + default: + return _default; } } } diff --git a/src/vs/workbench/parts/tasks/common/taskTemplates.ts b/src/vs/workbench/parts/tasks/common/taskTemplates.ts index b88527097caf0..461062f19a882 100644 --- a/src/vs/workbench/parts/tasks/common/taskTemplates.ts +++ b/src/vs/workbench/parts/tasks/common/taskTemplates.ts @@ -14,6 +14,7 @@ export interface TaskEntry extends IPickOpenEntry { content: string; } +/* Version 2.0 templates const dotnetBuild: TaskEntry = { id: 'dotnetCore', label: '.NET Core', @@ -127,3 +128,220 @@ export let templates: TaskEntry[] = [dotnetBuild, msbuild, maven].sort((a, b) => return (a.sort || a.label).localeCompare(b.sort || b.label); }); templates.push(command); +*/ + +const gulp: TaskEntry = { + id: 'gulp', + label: 'Gulp', + autoDetect: true, + content: [ + '{', + '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', + '\t// for the documentation about the tasks.json format', + '\t"version": "0.1.0",', + '\t"command": "gulp",', + '\t"isShellCommand": true,', + '\t"args": ["--no-color"],', + '\t"showOutput": "always"', + '}' + ].join('\n') +}; + +const grunt: TaskEntry = { + id: 'grunt', + label: 'Grunt', + autoDetect: true, + content: [ + '{', + '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', + '\t// for the documentation about the tasks.json format', + '\t"version": "0.1.0",', + '\t"command": "grunt",', + '\t"isShellCommand": true,', + '\t"args": ["--no-color"],', + '\t"showOutput": "always"', + '}' + ].join('\n') +}; + +const npm: TaskEntry = { + id: 'npm', + label: 'npm', + sort: 'NPM', + autoDetect: false, + content: [ + '{', + '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', + '\t// for the documentation about the tasks.json format', + '\t"version": "0.1.0",', + '\t"command": "npm",', + '\t"isShellCommand": true,', + '\t"showOutput": "always",', + '\t"suppressTaskName": true,', + '\t"tasks": [', + '\t\t{', + '\t\t\t"taskName": "install",', + '\t\t\t"args": ["install"]', + '\t\t},', + '\t\t{', + '\t\t\t"taskName": "update",', + '\t\t\t"args": ["update"]', + '\t\t},', + '\t\t{', + '\t\t\t"taskName": "test",', + '\t\t\t"args": ["run", "test"]', + '\t\t}', + '\t]', + '}' + ].join('\n') +}; + +const tscConfig: TaskEntry = { + id: 'tsc.config', + label: 'TypeScript - tsconfig.json', + autoDetect: false, + description: nls.localize('tsc.config', 'Compiles a TypeScript project'), + content: [ + '{', + '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', + '\t// for the documentation about the tasks.json format', + '\t"version": "0.1.0",', + '\t"command": "tsc",', + '\t"isShellCommand": true,', + '\t"args": ["-p", "."],', + '\t"showOutput": "silent",', + '\t"problemMatcher": "$tsc"', + '}' + ].join('\n') +}; + +const tscWatch: TaskEntry = { + id: 'tsc.watch', + label: 'TypeScript - Watch Mode', + autoDetect: false, + description: nls.localize('tsc.watch', 'Compiles a TypeScript project in watch mode'), + content: [ + '{', + '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', + '\t// for the documentation about the tasks.json format', + '\t"version": "0.1.0",', + '\t"command": "tsc",', + '\t"isShellCommand": true,', + '\t"args": ["-w", "-p", "."],', + '\t"showOutput": "silent",', + '\t"isBackground": true,', + '\t"problemMatcher": "$tsc-watch"', + '}' + ].join('\n') +}; + +const dotnetBuild: TaskEntry = { + id: 'dotnetCore', + label: '.NET Core', + sort: 'NET Core', + autoDetect: false, + description: nls.localize('dotnetCore', 'Executes .NET Core build command'), + content: [ + '{', + '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', + '\t// for the documentation about the tasks.json format', + '\t"version": "0.1.0",', + '\t"command": "dotnet",', + '\t"isShellCommand": true,', + '\t"args": [],', + '\t"tasks": [', + '\t\t{', + '\t\t\t"taskName": "build",', + '\t\t\t"args": [ ],', + '\t\t\t"isBuildCommand": true,', + '\t\t\t"showOutput": "silent",', + '\t\t\t"problemMatcher": "$msCompile"', + '\t\t}', + '\t]', + '}' + ].join('\n') +}; + +const msbuild: TaskEntry = { + id: 'msbuild', + label: 'MSBuild', + autoDetect: false, + description: nls.localize('msbuild', 'Executes the build target'), + content: [ + '{', + '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', + '\t// for the documentation about the tasks.json format', + '\t"version": "0.1.0",', + '\t"command": "msbuild",', + '\t"args": [', + '\t\t// Ask msbuild to generate full paths for file names.', + '\t\t"/property:GenerateFullPaths=true"', + '\t],', + '\t"taskSelector": "/t:",', + '\t"showOutput": "silent",', + '\t"tasks": [', + '\t\t{', + '\t\t\t"taskName": "build",', + '\t\t\t// Show the output window only if unrecognized errors occur.', + '\t\t\t"showOutput": "silent",', + '\t\t\t// Use the standard MS compiler pattern to detect errors, warnings and infos', + '\t\t\t"problemMatcher": "$msCompile"', + '\t\t}', + '\t]', + '}' + ].join('\n') +}; + +const command: TaskEntry = { + id: 'externalCommand', + label: 'Others', + autoDetect: false, + description: nls.localize('externalCommand', 'Example to run an arbitrary external command'), + content: [ + '{', + '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', + '\t// for the documentation about the tasks.json format', + '\t"version": "0.1.0",', + '\t"command": "echo",', + '\t"isShellCommand": true,', + '\t"args": ["Hello World"],', + '\t"showOutput": "always"', + '}' + ].join('\n') +}; + +const maven: TaskEntry = { + id: 'maven', + label: 'maven', + sort: 'MVN', + autoDetect: false, + description: nls.localize('Maven', 'Executes common maven commands'), + content: [ + '{', + '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', + '\t// for the documentation about the tasks.json format', + '\t"version": "0.1.0",', + '\t"command": "mvn",', + '\t"isShellCommand": true,', + '\t"showOutput": "always",', + '\t"suppressTaskName": true,', + '\t"tasks": [', + '\t\t{', + '\t\t\t"taskName": "verify",', + '\t\t\t"args": ["-B", "verify"],', + '\t\t\t"isBuildCommand": true', + '\t\t},', + '\t\t{', + '\t\t\t"taskName": "test",', + '\t\t\t"args": ["-B", "test"],', + '\t\t\t"isTestCommand": true', + '\t\t}', + '\t]', + '}' + ].join('\n') +}; + +export let templates: TaskEntry[] = [gulp, grunt, tscConfig, tscWatch, dotnetBuild, msbuild, npm, maven].sort((a, b) => { + return (a.sort || a.label).localeCompare(b.sort || b.label); +}); +templates.push(command); diff --git a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts index e12e519fc0283..3a60d35d08892 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts @@ -20,8 +20,8 @@ const shellCommand: IJSONSchema = { { $ref: '#definitions/shellConfiguration' } - ], - deprecationMessage: nls.localize('JsonSchema.tasks.isShellCommand.deprecated', 'The property isShellCommand is deprecated. Use the type property and the shell property in the options instead.') + ] + // deprecationMessage: nls.localize('JsonSchema.tasks.isShellCommand.deprecated', 'The property isShellCommand is deprecated. Use the type property and the shell property in the options instead.') }; const dependsOn: IJSONSchema = { @@ -124,10 +124,10 @@ let definitions = schema.definitions; definitions.commandConfiguration.properties.isShellCommand = Objects.deepClone(shellCommand); definitions.taskDescription.properties.isShellCommand = Objects.deepClone(shellCommand); definitions.taskDescription.properties.dependsOn = dependsOn; -definitions.showOutputType.deprecationMessage = nls.localize('JsonSchema.tasks.showOputput.deprecated', 'The property showOutput is deprecated. Use the terminal property instead.'); -definitions.taskDescription.properties.echoCommand.deprecationMessage = nls.localize('JsonSchema.tasks.echoCommand.deprecated', 'The property echoCommand is deprecated. Use the terminal property instead.'); -definitions.taskDescription.properties.isBuildCommand.deprecationMessage = nls.localize('JsonSchema.tasks.isBuildCommand.deprecated', 'The property isBuildCommand is deprecated. Use the group property instead.'); -definitions.taskDescription.properties.isTestCommand.deprecationMessage = nls.localize('JsonSchema.tasks.isTestCommand.deprecated', 'The property isTestCommand is deprecated. Use the group property instead.'); +// definitions.showOutputType.deprecationMessage = nls.localize('JsonSchema.tasks.showOputput.deprecated', 'The property showOutput is deprecated. Use the terminal property instead.'); +// definitions.taskDescription.properties.echoCommand.deprecationMessage = nls.localize('JsonSchema.tasks.echoCommand.deprecated', 'The property echoCommand is deprecated. Use the terminal property instead.'); +// definitions.taskDescription.properties.isBuildCommand.deprecationMessage = nls.localize('JsonSchema.tasks.isBuildCommand.deprecated', 'The property isBuildCommand is deprecated. Use the group property instead.'); +// definitions.taskDescription.properties.isTestCommand.deprecationMessage = nls.localize('JsonSchema.tasks.isTestCommand.deprecated', 'The property isTestCommand is deprecated. Use the group property instead.'); definitions.taskDescription.properties.identifier = identifier; definitions.taskDescription.properties.type = Objects.deepClone(taskType); definitions.taskDescription.properties.terminal = terminal; diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index f6a16bb6ba81b..317f79f6ef14f 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -119,6 +119,52 @@ abstract class OpenTaskConfigurationAction extends Action { if (!selection) { return undefined; } + let contentPromise: TPromise; + if (selection.autoDetect) { + const outputChannel = this.outputService.getChannel(TaskService.OutputChannelId); + outputChannel.show(true); + outputChannel.append(nls.localize('ConfigureTaskRunnerAction.autoDetecting', 'Auto detecting tasks for {0}', selection.id) + '\n'); + let detector = new ProcessRunnerDetector(this.fileService, this.contextService, this.configurationResolverService); + contentPromise = detector.detect(false, selection.id).then((value) => { + let config = value.config; + if (value.stderr && value.stderr.length > 0) { + value.stderr.forEach((line) => { + outputChannel.append(line + '\n'); + }); + if (config && (!config.tasks || config.tasks.length === 0)) { + this.messageService.show(Severity.Warning, nls.localize('ConfigureTaskRunnerAction.autoDetect', 'Auto detecting the task system failed. Using default template. Consult the task output for details.')); + return selection.content; + } else { + this.messageService.show(Severity.Warning, nls.localize('ConfigureTaskRunnerAction.autoDetectError', 'Auto detecting the task system produced errors. Consult the task output for details.')); + } + } + if (config) { + if (value.stdout && value.stdout.length > 0) { + value.stdout.forEach(line => outputChannel.append(line + '\n')); + } + let content = JSON.stringify(config, null, '\t'); + content = [ + '{', + '\t// See https://go.microsoft.com/fwlink/?LinkId=733558', + '\t// for the documentation about the tasks.json format', + ].join('\n') + content.substr(1); + return content; + } else { + return selection.content; + } + }); + } else { + contentPromise = TPromise.as(selection.content); + } + return contentPromise.then(content => { + let editorConfig = this.configurationService.getConfiguration(); + if (editorConfig.editor.insertSpaces) { + content = content.replace(/(\n)(\t+)/g, (_, s1, s2) => s1 + strings.repeat(' ', s2.length * editorConfig.editor.tabSize)); + } + configFileCreated = true; + return this.fileService.createFile(this.contextService.toResource('.vscode/tasks.json'), content); + }); + /* 2.0 version let content = selection.content; let editorConfig = this.configurationService.getConfiguration(); if (editorConfig.editor.insertSpaces) { @@ -126,6 +172,7 @@ abstract class OpenTaskConfigurationAction extends Action { } configFileCreated = true; return this.fileService.createFile(this.contextService.toResource('.vscode/tasks.json'), content); + */ }); }).then((stat) => { if (!stat) { @@ -1016,8 +1063,9 @@ class TaskService extends EventEmitter implements ITaskService { if (hasParseErrors) { return TPromise.as({ set: undefined, hasErrors: true }); } + let engine = TaskConfig.ExecutionEngine._default; if (config) { - let engine = TaskConfig.ExecutionEngine.from(config); + engine = TaskConfig.ExecutionEngine.from(config); if (engine === ExecutionEngine.Process) { if (this.hasDetectorSupport(config)) { configPromise = new ProcessRunnerDetector(this.fileService, this.contextService, this.configurationResolverService, config).detect(true).then((value): WorkspaceConfigurationResult => { @@ -1052,7 +1100,14 @@ class TaskService extends EventEmitter implements ITaskService { configPromise = TPromise.as({ config, hasErrors: false }); } } else { - configPromise = TPromise.as({ config, hasErrors: false }); + if (engine === ExecutionEngine.Terminal) { + configPromise = TPromise.as({ config, hasErrors: false }); + } else { + configPromise = new ProcessRunnerDetector(this.fileService, this.contextService, this.configurationResolverService).detect(true).then((value) => { + let hasErrors = this.printStderr(value.stderr); + return { config: value.config, hasErrors }; + }); + } } } return configPromise.then((resolved) => { @@ -1092,7 +1147,7 @@ class TaskService extends EventEmitter implements ITaskService { private getExecutionEngine(): ExecutionEngine { let { config } = this.getConfiguration(); if (!config) { - return ExecutionEngine.Terminal; + return ExecutionEngine.Process; } return TaskConfig.ExecutionEngine.from(config); } From d2bb304c86a4e753e609b1998e46024ce6398247 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 31 May 2017 16:26:12 +0200 Subject: [PATCH 1366/2747] Fix #27745 --- src/vs/workbench/parts/views/browser/treeView.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/views/browser/treeView.ts b/src/vs/workbench/parts/views/browser/treeView.ts index fd8a1387fce34..b7c390987668d 100644 --- a/src/vs/workbench/parts/views/browser/treeView.ts +++ b/src/vs/workbench/parts/views/browser/treeView.ts @@ -62,7 +62,7 @@ export class TreeView extends CollapsibleViewletView { this.menus.onDidChangeTitle(() => this.updateActions(), this, this.disposables); this.themeService.onThemeChange(() => this.tree.refresh() /* soft refresh */, this, this.disposables); if (!options.collapsed) { - this.triggerActivation(); + this.activate(); } } @@ -82,14 +82,15 @@ export class TreeView extends CollapsibleViewletView { protected changeState(state: CollapsibleState): void { super.changeState(state); if (state === CollapsibleState.EXPANDED) { - this.triggerActivation(); + this.activate(); } } - private triggerActivation() { + private activate() { if (!this.activated && this.extensionService) { this.extensionService.activateByEvent(`onView:${this.id}`); this.activated = true; + this.setInput(); } } @@ -123,10 +124,6 @@ export class TreeView extends CollapsibleViewletView { return createActionItem(action, this.keybindingService, this.messageService); } - public create(): TPromise { - return this.setInput(); - } - public setVisible(visible: boolean): TPromise { return super.setVisible(visible); } From 2efcddf229d99cfe24d52d6590eb99b332dcf518 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 31 May 2017 16:30:05 +0200 Subject: [PATCH 1367/2747] Extension host crashes on MacOS when crash reporter is disabled (fixes #27735) --- .../electron-browser/crashReporterService.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts b/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts index 792a867229777..59c19df4001c5 100644 --- a/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts +++ b/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts @@ -21,6 +21,7 @@ export class CrashReporterService implements ICrashReporterService { public _serviceBrand: any; private options: Electron.CrashReporterStartOptions; + private isEnabled: boolean; constructor( @ITelemetryService private telemetryService: ITelemetryService, @@ -28,7 +29,9 @@ export class CrashReporterService implements ICrashReporterService { @IConfigurationService configurationService: IConfigurationService ) { const config = configurationService.getConfiguration(TELEMETRY_SECTION_ID); - if (config.enableCrashReporter) { + this.isEnabled = !!config.enableCrashReporter; + + if (this.isEnabled) { this.startCrashReporter(); } } @@ -78,11 +81,12 @@ export class CrashReporterService implements ICrashReporterService { public getChildProcessStartOptions(name: string): Electron.CrashReporterStartOptions { - // Experimental attempt on Mac only for now - if (isMacintosh) { + // Experimental crash reporting support for child processes on Mac only for now + if (this.isEnabled && isMacintosh) { const childProcessOptions = clone(this.options); childProcessOptions.extra.processName = name; childProcessOptions.crashesDirectory = os.tmpdir(); + return childProcessOptions; } From aae395f8b2735ba70edbe350274726c8c6efea49 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 31 May 2017 16:38:10 +0200 Subject: [PATCH 1368/2747] Linux: Ugly flicker in welcome page on first startup. Fixes #27518 --- .../themes/electron-browser/colorThemeData.ts | 9 +++++++ .../electron-browser/workbenchThemeService.ts | 27 +++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts index f182c1494c867..c0ac0c551f4f0 100644 --- a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts +++ b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts @@ -131,6 +131,15 @@ export class ColorThemeData implements IColorTheme { } } +export function createUnloadedTheme(id: string): ColorThemeData { + let themeData = new ColorThemeData(); + themeData.id = id; + themeData.label = ''; + themeData.settingsId = null; + themeData.isLoaded = false; + return themeData; +} + export function fromStorageData(input: string): ColorThemeData { try { let data = JSON.parse(input); diff --git a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts index 4125a7a1ea8ce..2b5eef2d40f14 100644 --- a/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts +++ b/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.ts @@ -27,7 +27,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { IMessageService } from 'vs/platform/message/common/message'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import Severity from 'vs/base/common/severity'; -import { ColorThemeData, fromStorageData, fromExtensionTheme } from './colorThemeData'; +import { ColorThemeData, fromStorageData, fromExtensionTheme, createUnloadedTheme } from './colorThemeData'; import { ITheme, Extensions as ThemingExtensions, IThemingRegistry } from 'vs/platform/theme/common/themeService'; import { editorBackground } from 'vs/platform/theme/common/colorRegistry'; @@ -229,30 +229,21 @@ export class WorkbenchThemeService implements IWorkbenchThemeService { this.updateColorCustomizations(false); + // In order to avoid paint flashing for tokens, because + // themes are loaded asynchronously, we need to initialize + // a color theme document with good defaults until the theme is loaded let themeData = null; let persistedThemeData = this.storageService.get(PERSISTED_THEME_STORAGE_KEY); if (persistedThemeData) { themeData = fromStorageData(persistedThemeData); } - if (themeData !== null) { - themeData.setCustomColors(this.colorCustomizations); - this.updateDynamicCSSRules(themeData); - this.applyTheme(themeData, null, true); - } else { - // In order to avoid paint flashing for tokens, because - // themes are loaded asynchronously, we need to initialize - // a color theme document with good defaults until the theme is loaded + if (!themeData) { let isLightTheme = (Array.prototype.indexOf.call(document.body.classList, 'vs') >= 0); - - let initialTheme = new ColorThemeData(); - initialTheme.id = isLightTheme ? VS_LIGHT_THEME : VS_DARK_THEME; - initialTheme.label = ''; - initialTheme.settingsId = null; - initialTheme.isLoaded = false; - initialTheme.tokenColors = [{ settings: {} }]; - initialTheme.setCustomColors(this.colorCustomizations); - this.currentColorTheme = initialTheme; + themeData = createUnloadedTheme(isLightTheme ? VS_LIGHT_THEME : VS_DARK_THEME); } + themeData.setCustomColors(this.colorCustomizations); + this.updateDynamicCSSRules(themeData); + this.applyTheme(themeData, null, true); themesExtPoint.setHandler((extensions) => { for (let ext of extensions) { From 2b1787d6a6e2aa16d4c067c3a834bcf8ef6da841 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 31 May 2017 16:39:48 +0200 Subject: [PATCH 1369/2747] Provide feedback when check for updates has no updates fixes #27531 --- src/vs/workbench/parts/update/electron-browser/update.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vs/workbench/parts/update/electron-browser/update.ts b/src/vs/workbench/parts/update/electron-browser/update.ts index e91b43117796c..30f7f301ca51e 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.ts @@ -302,6 +302,14 @@ export class LightUpdateContribution implements IGlobalActivity { }); this.updateService.onError(err => messageService.show(severity.Error, err)); + + this.updateService.onUpdateNotAvailable(explicit => { + if (!explicit) { + return; + } + + messageService.show(severity.Info, nls.localize('noUpdatesAvailable', "There are no updates currently available.")); + }); } getActions(): IAction[] { From 171e5c204fefbc6653332e9da18be2a98dd15582 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Wed, 31 May 2017 16:41:58 +0200 Subject: [PATCH 1370/2747] Fixes #27730: Deprecation warnings in our package.json --- .vscode/tasks.json | 2 +- extensions/typescript/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index a52055b963655..4ad8767d06ceb 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -30,7 +30,7 @@ "location": 2, "message": 3 }, - "watching": { + "background": { "beginsPattern": "Starting compilation", "endsPattern": "Finished compilation" } diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index 74700e642b765..eefc7874d37f3 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -479,7 +479,7 @@ "${cwd}" ], "pattern": "$tsc", - "watching": { + "background": { "activeOnStart": true, "beginsPattern": { "regexp": "^\\s*(?:message TS6032:|\\d{1,2}:\\d{1,2}:\\d{1,2}(?: AM| PM)? -) File change detected\\. Starting incremental compilation\\.\\.\\." From 7c7235fc5ba12d5a24e59f87c7d195238291dc5c Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 31 May 2017 16:48:34 +0200 Subject: [PATCH 1371/2747] add update badge as soon as update is availble on linux (since it is never ready on that platform) fixes #27565 --- src/vs/workbench/parts/update/electron-browser/update.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/update/electron-browser/update.ts b/src/vs/workbench/parts/update/electron-browser/update.ts index 30f7f301ca51e..c42a94259bae3 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.ts @@ -296,10 +296,15 @@ export class LightUpdateContribution implements IGlobalActivity { @IWorkbenchEditorService editorService: IWorkbenchEditorService, @IActivityBarService activityBarService: IActivityBarService ) { - this.updateService.onUpdateReady(() => { + const addBadge = () => { const badge = new NumberBadge(1, () => nls.localize('updateIsReady', "New update available.")); activityBarService.showGlobalActivity(this.id, badge); - }); + }; + if (isLinux) { + this.updateService.onUpdateAvailable(() => addBadge()); + } else { + this.updateService.onUpdateReady(() => addBadge()); + } this.updateService.onError(err => messageService.show(severity.Error, err)); From 747922d752ad485f236495e123a29550cb929aaa Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 31 May 2017 16:51:03 +0200 Subject: [PATCH 1372/2747] editorWidget.border color is not respected by all editor widgets Fixes #27514 --- src/vs/platform/theme/common/colorRegistry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 5f3a474f0347f..f0249f32481d8 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -213,7 +213,7 @@ export const editorForeground = registerColor('editor.foreground', { light: '#33 * Editor widgets */ export const editorWidgetBackground = registerColor('editorWidget.background', { dark: '#2D2D30', light: '#EFEFF2', hc: '#0C141F' }, nls.localize('editorWidgetBackground', 'Background color of editor widgets, such as find/replace.')); -export const editorWidgetBorder = registerColor('editorWidget.border', { dark: '#454545', light: '#C8C8C8', hc: contrastBorder }, nls.localize('editorWidgetBorder', 'Border color of the editor widget.')); +export const editorWidgetBorder = registerColor('editorWidget.border', { dark: '#454545', light: '#C8C8C8', hc: contrastBorder }, nls.localize('editorWidgetBorder', 'Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.')); /** From 7655e2fb3269aaf79fbdcebd5699f95083f49f3c Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 31 May 2017 16:51:58 +0200 Subject: [PATCH 1373/2747] Fixes #27491: Show also the US keybinding in the info hover --- .../browser/keybindingsEditorContribution.ts | 45 +++++++++++++------ .../common/windowsKeyboardMapper.ts | 16 +++++++ 2 files changed, 47 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts index d4be2ebf38c97..633268739df8d 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts @@ -26,6 +26,7 @@ import { parseTree, Node } from 'vs/base/common/json'; import { KeybindingIO } from 'vs/workbench/services/keybinding/common/keybindingIO'; import { ScanCodeBinding } from 'vs/workbench/services/keybinding/common/scanCode'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; +import { WindowsNativeResolvedKeybinding } from "vs/workbench/services/keybinding/common/windowsKeyboardMapper"; const NLS_LAUNCH_MESSAGE = nls.localize('defineKeybinding.start', "Define Keybinding"); const NLS_KB_LAYOUT_ERROR_MESSAGE = nls.localize('defineKeybinding.kbLayoutErrorMessage', "You won't be able to produce this key combination under your current keyboard layout."); @@ -229,18 +230,22 @@ export class KeybindingEditorDecorationsRenderer extends Disposable { const resolvedKeybindings = this._keybindingService.resolveUserBinding(value.value); if (resolvedKeybindings.length === 0) { - return this._createDecoration(true, null, model, value); + return this._createDecoration(true, null, null, model, value); } const resolvedKeybinding = resolvedKeybindings[0]; + let usLabel: string = null; + if (resolvedKeybinding instanceof WindowsNativeResolvedKeybinding) { + usLabel = resolvedKeybinding.getUSLabel(); + } if (!resolvedKeybinding.isWYSIWYG()) { - return this._createDecoration(false, resolvedKeybinding.getLabel(), model, value); + return this._createDecoration(false, resolvedKeybinding.getLabel(), usLabel, model, value); } if (/abnt_|oem_/.test(value.value)) { - return this._createDecoration(false, resolvedKeybinding.getLabel(), model, value); + return this._createDecoration(false, resolvedKeybinding.getLabel(), usLabel, model, value); } const expectedUserSettingsLabel = resolvedKeybinding.getUserSettingsLabel(); if (!KeybindingEditorDecorationsRenderer._userSettingsFuzzyEquals(value.value, expectedUserSettingsLabel)) { - return this._createDecoration(false, resolvedKeybinding.getLabel(), model, value); + return this._createDecoration(false, resolvedKeybinding.getLabel(), usLabel, model, value); } return null; } @@ -283,7 +288,7 @@ export class KeybindingEditorDecorationsRenderer extends Disposable { return false; } - private _createDecoration(isError: boolean, message: string, model: editorCommon.IModel, keyNode: Node): editorCommon.IModelDeltaDecoration { + private _createDecoration(isError: boolean, uiLabel: string, usLabel: string, model: editorCommon.IModel, keyNode: Node): editorCommon.IModelDeltaDecoration { let msg: MarkedString[]; let className: string; let beforeContentClassName: string; @@ -297,15 +302,27 @@ export class KeybindingEditorDecorationsRenderer extends Disposable { overviewRulerColor = 'rgba(250, 100, 100, 0.6)'; } else { // this is the info case - msg = [ - nls.localize({ - key: 'defineKeybinding.kbLayoutLocalMessage', - comment: [ - 'Please translate maintaining the stars (*) around the placeholder such that it will be rendered in bold.', - 'The placeholder will contain a keyboard combination e.g. Ctrl+Shift+/' - ] - }, "**{0}** for your current keyboard layout.", message) - ]; + if (usLabel && uiLabel !== usLabel) { + msg = [ + nls.localize({ + key: 'defineKeybinding.kbLayoutLocalAndUSMessage', + comment: [ + 'Please translate maintaining the stars (*) around the placeholders such that they will be rendered in bold.', + 'The placeholders will contain a keyboard combination e.g. Ctrl+Shift+/' + ] + }, "**{0}** for your current keyboard layout (**{1}** for US standard).", uiLabel, usLabel) + ]; + } else { + msg = [ + nls.localize({ + key: 'defineKeybinding.kbLayoutLocalMessage', + comment: [ + 'Please translate maintaining the stars (*) around the placeholder such that it will be rendered in bold.', + 'The placeholder will contain a keyboard combination e.g. Ctrl+Shift+/' + ] + }, "**{0}** for your current keyboard layout.", uiLabel) + ]; + } className = 'keybindingInfo'; beforeContentClassName = 'inlineKeybindingInfo'; overviewRulerColor = 'rgba(100, 100, 250, 0.6)'; diff --git a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts index 3772cc723fbdd..1eeb5b682b5de 100644 --- a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts @@ -107,6 +107,22 @@ export class WindowsNativeResolvedKeybinding extends ResolvedKeybinding { return UILabelProvider.toLabel(this._firstPart, firstPart, this._chordPart, chordPart, OperatingSystem.Windows); } + private _getUSLabelForKeybinding(keybinding: SimpleKeybinding): string { + if (!keybinding) { + return null; + } + if (keybinding.isDuplicateModifierCase()) { + return ''; + } + return KeyCodeUtils.toString(keybinding.keyCode); + } + + public getUSLabel(): string { + let firstPart = this._getUSLabelForKeybinding(this._firstPart); + let chordPart = this._getUSLabelForKeybinding(this._chordPart); + return UILabelProvider.toLabel(this._firstPart, firstPart, this._chordPart, chordPart, OperatingSystem.Windows); + } + private _getAriaLabelForKeybinding(keybinding: SimpleKeybinding): string { if (!keybinding) { return null; From 92ec96d8e9da18938e3f4134a611853ef419d5b2 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 31 May 2017 17:08:49 +0200 Subject: [PATCH 1374/2747] Fixes #27600: Use a typical half-width character width for the new line width --- .../browser/viewParts/lines/viewLines.ts | 39 +++++++++++-------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/src/vs/editor/browser/viewParts/lines/viewLines.ts b/src/vs/editor/browser/viewParts/lines/viewLines.ts index f6bb857221bb5..462a4e5160d19 100644 --- a/src/vs/editor/browser/viewParts/lines/viewLines.ts +++ b/src/vs/editor/browser/viewParts/lines/viewLines.ts @@ -37,10 +37,6 @@ class LastRenderedData { } export class ViewLines extends ViewPart implements IVisibleLinesHost, IViewLines { - /** - * Width to extends a line to render the line feed at the end of the line - */ - private static LINE_FEED_WIDTH = 10; /** * Adds this ammount of pixels to the right of lines (no-one wants to type near the edge of the viewport) */ @@ -53,6 +49,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, // --- config private _lineHeight: number; + private _typicalHalfwidthCharacterWidth: number; private _isViewportWrapping: boolean; private _revealHorizontalRightPadding: number; private _canUseTranslate3d: boolean; @@ -72,15 +69,18 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, this._visibleLines = new VisibleLinesCollection(this); this.domNode = this._visibleLines.domNode; - this._lineHeight = this._context.configuration.editor.lineHeight; - this._isViewportWrapping = this._context.configuration.editor.wrappingInfo.isViewportWrapping; - this._revealHorizontalRightPadding = this._context.configuration.editor.viewInfo.revealHorizontalRightPadding; - this._canUseTranslate3d = this._context.configuration.editor.canUseTranslate3d; - this._viewLineOptions = new ViewLineOptions(this._context.configuration); + const conf = this._context.configuration; + + this._lineHeight = conf.editor.lineHeight; + this._typicalHalfwidthCharacterWidth = conf.editor.fontInfo.typicalHalfwidthCharacterWidth; + this._isViewportWrapping = conf.editor.wrappingInfo.isViewportWrapping; + this._revealHorizontalRightPadding = conf.editor.viewInfo.revealHorizontalRightPadding; + this._canUseTranslate3d = conf.editor.canUseTranslate3d; + this._viewLineOptions = new ViewLineOptions(conf); PartFingerprints.write(this.domNode, PartFingerprint.ViewLines); this.domNode.setClassName('view-lines'); - Configuration.applyFontInfo(this.domNode, this._context.configuration.editor.fontInfo); + Configuration.applyFontInfo(this.domNode, conf.editor.fontInfo); // --- width & height this._maxLineWidth = 0; @@ -118,23 +118,28 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, this._maxLineWidth = 0; } + const conf = this._context.configuration; + if (e.lineHeight) { - this._lineHeight = this._context.configuration.editor.lineHeight; + this._lineHeight = conf.editor.lineHeight; + } + if (e.fontInfo) { + this._typicalHalfwidthCharacterWidth = conf.editor.fontInfo.typicalHalfwidthCharacterWidth; } if (e.wrappingInfo) { - this._isViewportWrapping = this._context.configuration.editor.wrappingInfo.isViewportWrapping; + this._isViewportWrapping = conf.editor.wrappingInfo.isViewportWrapping; } if (e.viewInfo) { - this._revealHorizontalRightPadding = this._context.configuration.editor.viewInfo.revealHorizontalRightPadding; + this._revealHorizontalRightPadding = conf.editor.viewInfo.revealHorizontalRightPadding; } if (e.canUseTranslate3d) { - this._canUseTranslate3d = this._context.configuration.editor.canUseTranslate3d; + this._canUseTranslate3d = conf.editor.canUseTranslate3d; } if (e.fontInfo) { - Configuration.applyFontInfo(this.domNode, this._context.configuration.editor.fontInfo); + Configuration.applyFontInfo(this.domNode, conf.editor.fontInfo); } - let newViewLineOptions = new ViewLineOptions(this._context.configuration); + let newViewLineOptions = new ViewLineOptions(conf); if (!this._viewLineOptions.equals(newViewLineOptions)) { this._viewLineOptions = newViewLineOptions; @@ -321,7 +326,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, nextLineModelLineNumber = this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new Position(lineNumber + 1, 1)).lineNumber; if (currentLineModelLineNumber !== nextLineModelLineNumber) { - visibleRangesForLine[visibleRangesForLine.length - 1].width += ViewLines.LINE_FEED_WIDTH; + visibleRangesForLine[visibleRangesForLine.length - 1].width += this._typicalHalfwidthCharacterWidth; } } From 80050178152f9d2c0b95ef8666566bcd9578ab38 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 31 May 2017 17:17:24 +0200 Subject: [PATCH 1375/2747] start with a failing test, #27543 --- .../test/browser/snippetController2.test.ts | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts index 7a485ac4f6b21..7cccf8ad7fde7 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts @@ -181,4 +181,28 @@ suite('SnippetController2', function () { assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); assertContextKeys(contextKeys, false, false, false); }); + // + // test('Inconsistent tab stop behaviour with recursive snippets and tab / shift tab, #27543', function () { + // const ctrl = new SnippetController2(editor, contextKeys); + // ctrl.insert('1_calize(${1:nl}, \'${2:value}\')$0'); + + // assertContextKeys(contextKeys, true, false, true); + // assertSelections(editor, new Selection(1, 10, 1, 12), new Selection(2, 14, 2, 16)); + + // ctrl.insert('2_calize(${1:nl}, \'${2:value}\')$0'); + + // assertSelections(editor, new Selection(1, 19, 1, 21), new Selection(2, 23, 2, 25)); + + // ctrl.next(); // inner `value` + // assertSelections(editor, new Selection(1, 24, 1, 29), new Selection(2, 28, 2, 33)); + + // ctrl.next(); // inner `$0` + // assertSelections(editor, new Selection(1, 31, 1, 31), new Selection(2, 35, 2, 35)); + + // ctrl.next(); // outer `value` + // assertSelections(editor, new Selection(1, 34, 1, 39), new Selection(2, 38, 2, 43)); + + // ctrl.prev(); // inner `$0` + // assertSelections(editor, new Selection(1, 31, 1, 31), new Selection(2, 35, 2, 35)); + // }); }); From a0968527d5345aad1eaa146e72418355cc636a40 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 31 May 2017 17:25:01 +0200 Subject: [PATCH 1376/2747] error navigation widget should default to editor error color. Fixes #25415 --- src/vs/editor/contrib/gotoError/browser/gotoError.ts | 10 +++++++--- src/vs/platform/theme/common/colorRegistry.ts | 12 ++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/contrib/gotoError/browser/gotoError.ts b/src/vs/editor/contrib/gotoError/browser/gotoError.ts index cf7c165877725..600a3024636e1 100644 --- a/src/vs/editor/contrib/gotoError/browser/gotoError.ts +++ b/src/vs/editor/contrib/gotoError/browser/gotoError.ts @@ -23,12 +23,13 @@ import { editorAction, ServicesAccessor, IActionOptions, EditorAction, EditorCom import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { ZoneWidget } from 'vs/editor/contrib/zoneWidget/browser/zoneWidget'; -import { registerColor } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, oneOf } from 'vs/platform/theme/common/colorRegistry'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; import { Color } from 'vs/base/common/color'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { getAccessibilitySupport } from 'vs/base/browser/browser'; import { AccessibilitySupport } from 'vs/base/common/platform'; +import { editorErrorForeground, editorErrorBorder, editorWarningForeground, editorWarningBorder } from "vs/editor/common/view/editorColorRegistry"; class MarkerModel { @@ -488,6 +489,9 @@ CommonEditorRegistry.registerEditorCommand(new MarkerCommand({ // theming -export const editorMarkerNavigationError = registerColor('editorMarkerNavigationError.background', { dark: '#ff5a5a', light: '#ff5a5a', hc: '#ff5a5a' }, nls.localize('editorMarkerNavigationError', 'Editor marker navigation widget error color.')); -export const editorMarkerNavigationWarning = registerColor('editorMarkerNavigationWarning.background', { dark: '#5aac5a', light: '#5aac5a', hc: '#5aac5a' }, nls.localize('editorMarkerNavigationWarning', 'Editor marker navigation widget warning color.')); +let errorDefault = oneOf(editorErrorForeground, editorErrorBorder); +let warningDefault = oneOf(editorWarningForeground, editorWarningBorder); + +export const editorMarkerNavigationError = registerColor('editorMarkerNavigationError.background', { dark: errorDefault, light: errorDefault, hc: errorDefault }, nls.localize('editorMarkerNavigationError', 'Editor marker navigation widget error color.')); +export const editorMarkerNavigationWarning = registerColor('editorMarkerNavigationWarning.background', { dark: warningDefault, light: warningDefault, hc: warningDefault }, nls.localize('editorMarkerNavigationWarning', 'Editor marker navigation widget warning color.')); export const editorMarkerNavigationBackground = registerColor('editorMarkerNavigation.background', { dark: '#2D2D30', light: Color.white, hc: '#0C141F' }, nls.localize('editorMarkerNavigationBackground', 'Editor marker navigation widget background.')); diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index f0249f32481d8..ffc6c33eb0678 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -304,6 +304,18 @@ export function transparent(colorValue: ColorValue, factor: number): ColorFuncti }; } +export function oneOf(...colorValues: ColorValue[]): ColorFunction { + return (theme) => { + for (let colorValue of colorValues) { + let color = resolveColorValue(colorValue, theme); + if (color) { + return color; + } + } + return null; + }; +} + function lessProminent(colorValue: ColorValue, backgroundColorValue: ColorValue, factor: number, transparency: number): ColorFunction { return (theme) => { let from = resolveColorValue(colorValue, theme); From 179e79839fa0bdebcbfe096fd575efb225a155db Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 31 May 2017 17:34:36 +0200 Subject: [PATCH 1377/2747] Change workspaceContains snippet to use filePattern; add * snippet; (#27663) --- src/vs/platform/extensions/common/extensionsRegistry.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/vs/platform/extensions/common/extensionsRegistry.ts b/src/vs/platform/extensions/common/extensionsRegistry.ts index 7edf4f74960f1..b94a42edc8cbf 100644 --- a/src/vs/platform/extensions/common/extensionsRegistry.ts +++ b/src/vs/platform/extensions/common/extensionsRegistry.ts @@ -182,7 +182,14 @@ const schema: IJSONSchema = { type: 'array', items: { type: 'string', - defaultSnippets: [{ label: 'onLanguage', body: 'onLanguage:${1:languageId}' }, { label: 'onCommand', body: 'onCommand:${2:commandId}' }, { label: 'onDebug', body: 'onDebug:${3:type}' }, { label: 'workspaceContains', body: 'workspaceContains:${4:fileName}' }, { label: 'onView', body: 'onView:${5:viewId}' }], + defaultSnippets: [ + { label: 'onLanguage', body: 'onLanguage:${1:languageId}' }, + { label: 'onCommand', body: 'onCommand:${2:commandId}' }, + { label: 'onDebug', body: 'onDebug:${3:type}' }, + { label: 'workspaceContains', body: 'workspaceContains:${4:filePattern}' }, + { label: 'onView', body: 'onView:${5:viewId}' }, + { label: '*', body: '*' } + ], } }, badges: { From 8132b809de081dbcf4a1a91011d6d1a46127e3a5 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 31 May 2017 08:41:57 -0700 Subject: [PATCH 1378/2747] Reduce number of colors used (#27497) --- .../parts/welcome/overlay/browser/welcomeOverlay.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts b/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts index d5a435aac227d..20c82ff7a7cfc 100644 --- a/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts +++ b/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts @@ -23,7 +23,8 @@ import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/cont import { KeyCode } from 'vs/base/common/keyCodes'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { registerColor, textPreformatForeground } from 'vs/platform/theme/common/colorRegistry'; +import { textPreformatForeground, foreground } from 'vs/platform/theme/common/colorRegistry'; +import { Color } from 'vs/base/common/color'; interface Key { id: string; @@ -238,15 +239,12 @@ Registry.as(Extensions.WorkbenchActions) // theming -const foreground = registerColor('welcomeOverlay.foreground', { dark: '#fff', light: '#000', hc: '#fff' }, localize('welcomeOverlay.foreground', 'Foreground color for the Interface Overview.')); -const background = registerColor('welcomeOverlay.background', { dark: '#00000085', light: '#FFFFFF85', hc: '#00000085' }, localize('welcomeOverlay.background', 'Background color for the Interface Overview.')); - registerThemingParticipant((theme, collector) => { const key = theme.getColor(foreground); if (key) { collector.addRule(`.monaco-workbench > .welcomeOverlay > .key { color: ${key}; }`); } - const backgroundColor = theme.getColor(background); + const backgroundColor = Color.fromHex(theme.type === 'light' ? '#FFFFFF85' : '#00000085'); if (backgroundColor) { collector.addRule(`.monaco-workbench > .welcomeOverlay { background: ${backgroundColor}; }`); } From a1ca777088ff455f7c1c397089db3ad3371b662b Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 31 May 2017 08:42:11 -0700 Subject: [PATCH 1379/2747] Color names (#27497) --- .../welcome/page/electron-browser/welcomePage.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 6141d64d0bb6a..6773da75c3918 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -447,8 +447,8 @@ class WelcomePage { // theming -const quickLinkBackground = registerColor('welcomePage.quickLinkBackground', { dark: null, light: null, hc: null }, localize('welcomePage.quickLinkBackground', 'Background color for the quick links on the Welcome page.')); -const quickLinkHoverBackground = registerColor('welcomePage.quickLinkHoverBackground', { dark: null, light: null, hc: null }, localize('welcomePage.quickLinkHoverBackground', 'Hover background color for the quick links on the Welcome page.')); +const buttonBackground = registerColor('welcomePage.buttonBackground', { dark: null, light: null, hc: null }, localize('welcomePage.buttonBackground', 'Background color for the buttons on the Welcome page.')); +const buttonHoverBackground = registerColor('welcomePage.buttonHoverBackground', { dark: null, light: null, hc: null }, localize('welcomePage.buttonHoverBackground', 'Hover background color for the buttons on the Welcome page.')); registerThemingParticipant((theme, collector) => { const foregroundColor = theme.getColor(foreground); @@ -459,13 +459,13 @@ registerThemingParticipant((theme, collector) => { if (descriptionColor) { collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .detail { color: ${descriptionColor}; }`); } - const color = getExtraColor(theme, quickLinkBackground, { dark: 'rgba(0, 0, 0, .2)', extra_dark: 'rgba(200, 235, 255, .042)', light: 'rgba(0,0,0,.04)', hc: 'black' }); - if (color) { - collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .commands li button { background: ${color}; }`); + const buttonColor = getExtraColor(theme, buttonBackground, { dark: 'rgba(0, 0, 0, .2)', extra_dark: 'rgba(200, 235, 255, .042)', light: 'rgba(0,0,0,.04)', hc: 'black' }); + if (buttonColor) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .commands li button { background: ${buttonColor}; }`); } - const hover = getExtraColor(theme, quickLinkHoverBackground, { dark: 'rgba(200, 235, 255, .072)', extra_dark: 'rgba(200, 235, 255, .072)', light: 'rgba(0,0,0,.10)', hc: null }); - if (hover) { - collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .commands li button:hover { background: ${hover}; }`); + const buttonHoverColor = getExtraColor(theme, buttonHoverBackground, { dark: 'rgba(200, 235, 255, .072)', extra_dark: 'rgba(200, 235, 255, .072)', light: 'rgba(0,0,0,.10)', hc: null }); + if (buttonHoverColor) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .commands li button:hover { background: ${buttonHoverColor}; }`); } const link = theme.getColor(textLinkForeground); if (link) { From ee52cacaf67af9026e50bd998562e1b7bfcb5e56 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 31 May 2017 17:49:25 +0200 Subject: [PATCH 1380/2747] Consistent name for overviewRuler.currentContentForeground. Fixes #27756 --- extensions/merge-conflict/src/mergeDecorator.ts | 4 ++-- src/vs/platform/theme/common/colorRegistry.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts index be9e733a562af..0dd5ad6f6c6a8 100644 --- a/extensions/merge-conflict/src/mergeDecorator.ts +++ b/extensions/merge-conflict/src/mergeDecorator.ts @@ -66,11 +66,11 @@ export default class MergeDectorator implements vscode.Disposable { // Create decorators if (config.enableDecorations || config.enableEditorOverview) { this.decorations['current.content'] = vscode.window.createTextEditorDecorationType( - this.generateBlockRenderOptions('merge.currentContentBackground', 'overviewRuler.currentContentForeground', config) + this.generateBlockRenderOptions('merge.currentContentBackground', 'editorOverviewRuler.currentContentForeground', config) ); this.decorations['incoming.content'] = vscode.window.createTextEditorDecorationType( - this.generateBlockRenderOptions('merge.incomingContentBackground', 'overviewRuler.incomingContentForeground', config) + this.generateBlockRenderOptions('merge.incomingContentBackground', 'editorOverviewRuler.incomingContentForeground', config) ); } diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index ffc6c33eb0678..ce0e3fd190ba1 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -269,8 +269,8 @@ export const mergeCurrentContentBackground = registerColor('merge.currentContent export const mergeIncomingHeaderBackground = registerColor('merge.incomingHeaderBackground', { dark: incomingBaseColor, light: incomingBaseColor, hc: incomingBaseColor }, nls.localize('mergeIncomingHeaderBackground', 'Incoming header background in inline merge-conflict.')); export const mergeIncomingContentBackground = registerColor('merge.incomingContentBackground', { dark: transparent(mergeIncomingHeaderBackground, contentTransparency), light: transparent(mergeIncomingHeaderBackground, contentTransparency), hc: transparent(mergeIncomingHeaderBackground, contentTransparency) }, nls.localize('mergeIncomingContentBackground', 'Incoming content background in inline merge-conflict.')); -export const overviewRulerCurrentContentForeground = registerColor('overviewRuler.currentContentForeground', { dark: transparent(mergeCurrentHeaderBackground, rulerTransparency), light: transparent(mergeCurrentHeaderBackground, rulerTransparency), hc: transparent(mergeCurrentHeaderBackground, rulerTransparency) }, nls.localize('overviewRulerCurrentContentForeground', 'Current overview ruler foreground for inline merge-conflict.')); -export const overviewRulerIncomingContentForeground = registerColor('overviewRuler.incomingContentForeground', { dark: transparent(mergeIncomingHeaderBackground, rulerTransparency), light: transparent(mergeIncomingHeaderBackground, rulerTransparency), hc: transparent(mergeIncomingHeaderBackground, rulerTransparency) }, nls.localize('overviewRulerIncomingContentForeground', 'Incoming overview ruler foreground for inline merge-conflict.')); +export const overviewRulerCurrentContentForeground = registerColor('editorOverviewRuler.currentContentForeground', { dark: transparent(mergeCurrentHeaderBackground, rulerTransparency), light: transparent(mergeCurrentHeaderBackground, rulerTransparency), hc: transparent(mergeCurrentHeaderBackground, rulerTransparency) }, nls.localize('overviewRulerCurrentContentForeground', 'Current overview ruler foreground for inline merge-conflict.')); +export const overviewRulerIncomingContentForeground = registerColor('editorOverviewRuler.incomingContentForeground', { dark: transparent(mergeIncomingHeaderBackground, rulerTransparency), light: transparent(mergeIncomingHeaderBackground, rulerTransparency), hc: transparent(mergeIncomingHeaderBackground, rulerTransparency) }, nls.localize('overviewRulerIncomingContentForeground', 'Incoming overview ruler foreground for inline merge-conflict.')); // ----- color functions From f661def623de1491f1f1ac6c13c2e49d264df8f6 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 31 May 2017 09:02:49 -0700 Subject: [PATCH 1381/2747] Use 'textLink.activeForeground' (fixes #27499) --- .../parts/welcome/page/electron-browser/welcomePage.ts | 7 ++++++- .../walkThrough/electron-browser/walkThroughPart.ts | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 6773da75c3918..6081e05539a7b 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -35,7 +35,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { tildify } from 'vs/base/common/labels'; import { isLinux } from 'vs/base/common/platform'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { registerColor, textLinkForeground, foreground, descriptionForeground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, textLinkForeground, textLinkActiveForeground, foreground, descriptionForeground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { getExtraColor } from 'vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils'; used(); @@ -471,6 +471,11 @@ registerThemingParticipant((theme, collector) => { if (link) { collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage a { color: ${link}; }`); } + const activeLink = theme.getColor(textLinkActiveForeground); + if (activeLink) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage a:hover, + .monaco-workbench > .part.editor > .content .welcomePage a:active { color: ${activeLink}; }`); + } const border = theme.getColor(contrastBorder); if (border) { collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .commands li button { border-color: ${border}; }`); diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index f22fa7e0702e5..28d9042de6cc8 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -38,7 +38,7 @@ import { IPartService } from 'vs/workbench/services/part/common/partService'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { registerColor, textLinkForeground, textPreformatForeground, contrastBorder, textBlockQuoteBackground, textBlockQuoteBorder } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, textLinkForeground, textLinkActiveForeground, textPreformatForeground, contrastBorder, textBlockQuoteBackground, textBlockQuoteBorder } from 'vs/platform/theme/common/colorRegistry'; import { getExtraColor } from 'vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils'; export const WALK_THROUGH_FOCUS = new RawContextKey('interactivePlaygroundFocus', false); @@ -538,6 +538,11 @@ registerThemingParticipant((theme, collector) => { if (link) { collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent a { color: ${link}; }`); } + const activeLink = theme.getColor(textLinkActiveForeground); + if (activeLink) { + collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent a:hover, + .monaco-workbench > .part.editor > .content .walkThroughContent a:active { color: ${activeLink}; }`); + } const shortcut = theme.getColor(textPreformatForeground); if (shortcut) { collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent code, From 9e277b57537fa924632df4b345aea6c82d0221d6 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 31 May 2017 09:15:50 -0700 Subject: [PATCH 1382/2747] Use focus border color (fixes #27501) --- .../parts/welcome/page/electron-browser/welcomePage.ts | 6 +++++- .../welcome/walkThrough/electron-browser/walkThroughPart.ts | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 6081e05539a7b..2c0dda61a4119 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -35,7 +35,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { tildify } from 'vs/base/common/labels'; import { isLinux } from 'vs/base/common/platform'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { registerColor, textLinkForeground, textLinkActiveForeground, foreground, descriptionForeground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, focusBorder, textLinkForeground, textLinkActiveForeground, foreground, descriptionForeground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { getExtraColor } from 'vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils'; used(); @@ -476,6 +476,10 @@ registerThemingParticipant((theme, collector) => { collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage a:hover, .monaco-workbench > .part.editor > .content .welcomePage a:active { color: ${activeLink}; }`); } + const focusColor = theme.getColor(focusBorder); + if (focusColor) { + collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage a:focus { outline-color: ${focusColor}; }`); + } const border = theme.getColor(contrastBorder); if (border) { collector.addRule(`.monaco-workbench > .part.editor > .content .welcomePage .commands li button { border-color: ${border}; }`); diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 28d9042de6cc8..7e2df964f9b0a 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -38,7 +38,7 @@ import { IPartService } from 'vs/workbench/services/part/common/partService'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { registerColor, textLinkForeground, textLinkActiveForeground, textPreformatForeground, contrastBorder, textBlockQuoteBackground, textBlockQuoteBorder } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, focusBorder, textLinkForeground, textLinkActiveForeground, textPreformatForeground, contrastBorder, textBlockQuoteBackground, textBlockQuoteBorder } from 'vs/platform/theme/common/colorRegistry'; import { getExtraColor } from 'vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils'; export const WALK_THROUGH_FOCUS = new RawContextKey('interactivePlaygroundFocus', false); @@ -543,6 +543,10 @@ registerThemingParticipant((theme, collector) => { collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent a:hover, .monaco-workbench > .part.editor > .content .walkThroughContent a:active { color: ${activeLink}; }`); } + const focusColor = theme.getColor(focusBorder); + if (focusColor) { + collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent a:focus { outline-color: ${focusColor}; }`); + } const shortcut = theme.getColor(textPreformatForeground); if (shortcut) { collector.addRule(`.monaco-workbench > .part.editor > .content .walkThroughContent code, From d1dd5d3bdfdf8d9ecc974c728614afe0dd0fd796 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 31 May 2017 09:20:05 -0700 Subject: [PATCH 1383/2747] Turn off minimaps (fixes #27502) --- .../welcome/walkThrough/electron-browser/walkThroughPart.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 7e2df964f9b0a..76a67b79d8e29 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -430,7 +430,7 @@ export class WalkThroughPart extends BaseEditor { overviewRulerLanes: 3, fixedOverflowWidgets: true, lineNumbersMinChars: 1, - minimap: false, + minimap: { enabled: false }, }; } From 498beff5442e844c67febb3e8d297db6bfc96141 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 31 May 2017 18:27:17 +0200 Subject: [PATCH 1384/2747] Add descriptions to the activation events snippets (#27663) --- .../extensions/common/extensionsRegistry.ts | 35 +++++++++++++++---- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/src/vs/platform/extensions/common/extensionsRegistry.ts b/src/vs/platform/extensions/common/extensionsRegistry.ts index b94a42edc8cbf..c950bdc66ff89 100644 --- a/src/vs/platform/extensions/common/extensionsRegistry.ts +++ b/src/vs/platform/extensions/common/extensionsRegistry.ts @@ -183,12 +183,35 @@ const schema: IJSONSchema = { items: { type: 'string', defaultSnippets: [ - { label: 'onLanguage', body: 'onLanguage:${1:languageId}' }, - { label: 'onCommand', body: 'onCommand:${2:commandId}' }, - { label: 'onDebug', body: 'onDebug:${3:type}' }, - { label: 'workspaceContains', body: 'workspaceContains:${4:filePattern}' }, - { label: 'onView', body: 'onView:${5:viewId}' }, - { label: '*', body: '*' } + { + label: 'onLanguage', + description: nls.localize('vscode.extension.activationEvents.onLanguage', 'An activation event emitted whenever a file that resolves to the specified language gets opened.'), + body: 'onLanguage:${1:languageId}' + }, + { + label: 'onCommand', + description: nls.localize('vscode.extension.activationEvents.onCommand', 'An activation event emitted whenever the specified command gets invoked.'), + body: 'onCommand:${2:commandId}' + }, + { + label: 'onDebug', + description: nls.localize('vscode.extension.activationEvents.onDebug', 'An activation event emitted whenever a debug session of the specified type is started.'), + body: 'onDebug:${3:type}' + }, + { + label: 'workspaceContains', + description: nls.localize('vscode.extension.activationEvents.workspaceContains', 'An activation event emitted whenever a folder is opened that contains at least a file matching the specified glob pattern.'), + body: 'workspaceContains:${4:filePattern}' + }, + { + label: 'onView', + body: 'onView:${5:viewId}' + }, + { + label: '*', + description: nls.localize('vscode.extension.activationEvents.star', 'An activation event emitted on VS Code startup. To ensure a great end user experience, please use this activation event in your extension only when no other activation events combination works in your use-case.'), + body: '*' + } ], } }, From a857ee8fb514a35df286879bf40c14970229d0ad Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 31 May 2017 18:31:34 +0200 Subject: [PATCH 1385/2747] Click on menus on explorer title bar collapses the explorer (fixes #27648) --- src/vs/base/browser/ui/dropdown/dropdown.ts | 17 +++++++++++------ .../parts/files/browser/explorerViewlet.ts | 9 +++++++++ .../parts/files/browser/views/explorerView.ts | 2 +- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/vs/base/browser/ui/dropdown/dropdown.ts b/src/vs/base/browser/ui/dropdown/dropdown.ts index f670bf899e456..e078d8ddc2b5e 100644 --- a/src/vs/base/browser/ui/dropdown/dropdown.ts +++ b/src/vs/base/browser/ui/dropdown/dropdown.ts @@ -8,7 +8,7 @@ import 'vs/css!./dropdown'; import { Builder, $ } from 'vs/base/browser/builder'; import { TPromise } from 'vs/base/common/winjs.base'; -import { Gesture, EventType } from 'vs/base/browser/touch'; +import { Gesture, EventType as GestureEventType } from 'vs/base/browser/touch'; import { ActionRunner, IAction } from 'vs/base/common/actions'; import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { EventEmitter } from 'vs/base/common/eventEmitter'; @@ -16,6 +16,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview'; import { IMenuOptions } from 'vs/base/browser/ui/menu/menu'; import { ResolvedKeybinding } from 'vs/base/common/keyCodes'; +import { EventHelper, EventType } from "vs/base/browser/dom"; export interface ILabelRenderer { (container: HTMLElement): IDisposable; @@ -50,11 +51,15 @@ export class BaseDropdown extends ActionRunner { }; } - this.$label.on(['mousedown', EventType.Tap], (e: Event) => { - e.preventDefault(); - e.stopPropagation(); - - this.show(); + this.$label.on([EventType.CLICK, EventType.MOUSE_DOWN, GestureEventType.Tap], (e: Event) => { + EventHelper.stop(e, true); // prevent default click behaviour to trigger + }).on([EventType.MOUSE_DOWN, GestureEventType.Tap], (e: Event) => { + // We want to show the context menu on dropdown so that as a user you can press and hold the + // mouse button, make a choice of action in the menu and release the mouse to trigger that + // action. + // Due to some weird bugs though, we delay showing the menu to unwind event stack + // (see https://github.com/Microsoft/vscode/issues/27648) + setTimeout(() => this.show(), 100); }).appendTo(this.$el); let cleanupFn = labelRenderer(this.$label.getHTMLElement()); diff --git a/src/vs/workbench/parts/files/browser/explorerViewlet.ts b/src/vs/workbench/parts/files/browser/explorerViewlet.ts index 9160ec7459ba7..2500f800ae782 100644 --- a/src/vs/workbench/parts/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/browser/explorerViewlet.ts @@ -99,6 +99,15 @@ export class ExplorerViewlet extends Viewlet { if (this.views.length === 1) { return this.views[0].getActions(); } + + return []; + } + + public getSecondaryActions(): IAction[] { + if (this.views.length === 1) { + return this.views[0].getSecondaryActions(); + } + return []; } diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index cad31f52e9fc8..5b3ec0df63eb7 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -131,7 +131,7 @@ export class ExplorerView extends CollapsibleViewletView { this.tree = this.createViewer($(this.treeContainer)); if (this.toolBar) { - this.toolBar.setActions(prepareActions(this.getActions()), [])(); + this.toolBar.setActions(prepareActions(this.getActions()), this.getSecondaryActions())(); } const onFileIconThemeChange = (fileIconTheme: IFileIconTheme) => { From f1a8632778e4574cf07b3cb162aa998e4a51aebc Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 31 May 2017 09:40:56 -0700 Subject: [PATCH 1386/2747] Fixes #27641 and Fixes #27708 --- .../contrib/suggest/browser/media/suggest.css | 15 ++++++++------- .../contrib/suggest/browser/suggestWidget.ts | 9 +++++---- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index 41ac9914b3116..577af30bea5fe 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -109,7 +109,7 @@ /** Icon styles **/ -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .close, +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close, .monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore { opacity: 0.6; background-position: center center; @@ -118,7 +118,7 @@ cursor: pointer; } -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .close { +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close { background-image: url('./close.svg'); float: right; } @@ -127,7 +127,7 @@ background-image: url('./info.svg'); } -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .close:hover, +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close:hover, .monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore:hover { opacity: 1; } @@ -235,7 +235,7 @@ white-space: pre-wrap; } -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .type { +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .type { flex: 2; overflow: hidden; text-overflow: ellipsis; @@ -244,7 +244,8 @@ margin: 0; } -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > p { +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs, +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header { margin: 0; padding: 4px 5px; } @@ -256,8 +257,8 @@ /* High Contrast and Dark Theming */ -.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .close, -.monaco-editor.hc-black .suggest-widget .details > .monaco-scrollable-element > .body > .close { +.monaco-editor.vs-dark .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close, +.monaco-editor.hc-black .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close { background-image: url('./close-dark.svg'); } diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 1ebbe971fac5b..6d704f5176d78 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -189,6 +189,7 @@ class SuggestionDetails { private close: HTMLElement; private scrollbar: DomScrollableElement; private body: HTMLElement; + private header: HTMLElement; private type: HTMLElement; private docs: HTMLElement; private ariaLabel: string; @@ -211,10 +212,10 @@ class SuggestionDetails { append(this.el, this.scrollbar.getDomNode()); this.disposables.push(this.scrollbar); - this.close = append(this.body, $('span.close')); + this.header = append(this.body, $('.header')); + this.close = append(this.header, $('span.close')); this.close.title = nls.localize('readLess', "Read less...{0}", triggerKeybindingLabel); - this.type = append(this.body, $('p.type')); - + this.type = append(this.header, $('p.type')); this.docs = append(this.body, $('p.docs')); this.ariaLabel = null; @@ -242,7 +243,7 @@ class SuggestionDetails { this.type.innerText = item.suggestion.detail || ''; this.docs.textContent = item.suggestion.documentation; - this.el.style.height = this.type.offsetHeight + this.docs.offsetHeight + 'px'; + this.el.style.height = this.header.offsetHeight + this.docs.offsetHeight + 'px'; this.close.onmousedown = e => { e.preventDefault(); From db41a5fe474fad7b425b6cd22cb42256d77c2747 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 31 May 2017 10:20:03 -0700 Subject: [PATCH 1387/2747] Fixes #27690 Reveal range for the last selection --- extensions/emmet/src/matchTag.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/emmet/src/matchTag.ts b/extensions/emmet/src/matchTag.ts index a3e22642226e7..8037ca97d95b0 100644 --- a/extensions/emmet/src/matchTag.ts +++ b/extensions/emmet/src/matchTag.ts @@ -25,6 +25,7 @@ export function matchTag() { }); if (updatedSelections.length > 0) { editor.selections = updatedSelections; + editor.revealRange(editor.selections[updatedSelections.length - 1]); } } From 89fa243fc9aa731d01bc6254b728efa3cba4c546 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 31 May 2017 10:28:11 -0700 Subject: [PATCH 1388/2747] Hid Git actions from merge conflict (fixes #27563) --- extensions/git/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index 0ea489cc81292..62c735337de40 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -531,7 +531,7 @@ { "command": "git.openFile", "group": "navigation", - "when": "config.git.enabled && scmProvider == git && isInDiffEditor && resourceScheme != extension" + "when": "config.git.enabled && scmProvider == git && isInDiffEditor && resourceScheme != extension && resourceScheme != merge-conflict.conflict-diff" }, { "command": "git.openChange", @@ -541,17 +541,17 @@ { "command": "git.stageSelectedRanges", "group": "2_git@1", - "when": "config.git.enabled && scmProvider == git && isInDiffEditor" + "when": "config.git.enabled && scmProvider == git && isInDiffEditor && resourceScheme != merge-conflict.conflict-diff" }, { "command": "git.unstageSelectedRanges", "group": "2_git@2", - "when": "config.git.enabled && scmProvider == git && isInDiffEditor" + "when": "config.git.enabled && scmProvider == git && isInDiffEditor && resourceScheme != merge-conflict.conflict-diff" }, { "command": "git.revertSelectedRanges", "group": "2_git@3", - "when": "config.git.enabled && scmProvider == git && isInDiffEditor" + "when": "config.git.enabled && scmProvider == git && isInDiffEditor && resourceScheme != merge-conflict.conflict-diff" } ] }, From b431336fde9e5cef026696bf4837a6e9278be85d Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 31 May 2017 10:29:50 -0700 Subject: [PATCH 1389/2747] Fixes #27690 Reveal range for edit point and select item --- extensions/emmet/src/editPoint.ts | 3 ++- extensions/emmet/src/selectItem.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/emmet/src/editPoint.ts b/extensions/emmet/src/editPoint.ts index e7f468f29c704..5338c5012e146 100644 --- a/extensions/emmet/src/editPoint.ts +++ b/extensions/emmet/src/editPoint.ts @@ -15,9 +15,10 @@ export function fetchEditPoint(direction: string): void { let newSelections: vscode.Selection[] = []; editor.selections.forEach(selection => { let updatedSelection = direction === 'next' ? nextEditPoint(selection.anchor, editor) : prevEditPoint(selection.anchor, editor); - newSelections.push(updatedSelection); + newSelections.push(updatedSelection ? updatedSelection : selection); }); editor.selections = newSelections; + editor.revealRange(editor.selections[editor.selections.length - 1]); } function nextEditPoint(position: vscode.Position, editor: vscode.TextEditor): vscode.Selection { diff --git a/extensions/emmet/src/selectItem.ts b/extensions/emmet/src/selectItem.ts index b479c0ca74c19..5ef47062ede0e 100644 --- a/extensions/emmet/src/selectItem.ts +++ b/extensions/emmet/src/selectItem.ts @@ -38,4 +38,5 @@ export function fetchSelectItem(direction: string): void { newSelections.push(updatedSelection ? updatedSelection : selection); }); editor.selections = newSelections; + editor.revealRange(editor.selections[editor.selections.length - 1]); } \ No newline at end of file From 8d9f0f561fb975d94fd9e3f2a460c5e7f7baa1e4 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 31 May 2017 10:36:08 -0700 Subject: [PATCH 1390/2747] Only bold press any key text --- .../parts/terminal/electron-browser/terminalInstance.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index b236832add42b..bb4237e7aad75 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -532,8 +532,8 @@ export class TerminalInstance implements ITerminalInstance { let message = typeof this._shellLaunchConfig.waitOnExit === 'string' ? this._shellLaunchConfig.waitOnExit : nls.localize('terminal.integrated.waitOnExit', 'Press any key to close the terminal'); - // Style the message to make it stand out from the rest of the output - message = `\n\x1b[40;37;1m${message}\x1b[0m`; + // Bold the message and add an extra new line to make it stand out from the rest of the output + message = `\n\x1b[1m${message}\x1b[0m`; this._xterm.writeln(message); // Disable all input if the terminal is exiting and listen for next keypress this._xterm.setOption('disableStdin', true); From 6aa3aca8ccaf2f4c3ebced37cb5b842604745acf Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 31 May 2017 10:35:05 -0700 Subject: [PATCH 1391/2747] Remove extra package.json (fixes #27754) --- extensions/merge-conflict/src/package.json | 722 --------------------- 1 file changed, 722 deletions(-) delete mode 100644 extensions/merge-conflict/src/package.json diff --git a/extensions/merge-conflict/src/package.json b/extensions/merge-conflict/src/package.json deleted file mode 100644 index 2f79e20bf7ffc..0000000000000 --- a/extensions/merge-conflict/src/package.json +++ /dev/null @@ -1,722 +0,0 @@ -{ - "name": "git", - "publisher": "vscode", - "displayName": "git", - "description": "Git", - "version": "0.0.1", - "engines": { - "vscode": "^1.5.0" - }, - "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217", - "enableProposedApi": true, - "categories": [ - "Other" - ], - "activationEvents": [ - "*" - ], - "main": "./out/main", - "scripts": { - "compile": "gulp compile-extension:git", - "watch": "gulp watch-extension:git" - }, - "contributes": { - "commands": [ - { - "command": "git.clone", - "title": "%command.clone%", - "category": "Git" - }, - { - "command": "git.init", - "title": "%command.init%", - "category": "Git" - }, - { - "command": "git.refresh", - "title": "%command.refresh%", - "category": "Git", - "icon": { - "light": "resources/icons/light/refresh.svg", - "dark": "resources/icons/dark/refresh.svg" - } - }, - { - "command": "git.openChange", - "title": "%command.openChange%", - "category": "Git", - "icon": { - "light": "resources/icons/light/open-change.svg", - "dark": "resources/icons/dark/open-change.svg" - } - }, - { - "command": "git.openFile", - "title": "%command.openFile%", - "category": "Git", - "icon": { - "light": "resources/icons/light/open-file.svg", - "dark": "resources/icons/dark/open-file.svg" - } - }, - { - "command": "git.stage", - "title": "%command.stage%", - "category": "Git", - "icon": { - "light": "resources/icons/light/stage.svg", - "dark": "resources/icons/dark/stage.svg" - } - }, - { - "command": "git.stageAll", - "title": "%command.stageAll%", - "category": "Git", - "icon": { - "light": "resources/icons/light/stage.svg", - "dark": "resources/icons/dark/stage.svg" - } - }, - { - "command": "git.stageSelectedRanges", - "title": "%command.stageSelectedRanges%", - "category": "Git" - }, - { - "command": "git.revertSelectedRanges", - "title": "%command.revertSelectedRanges%", - "category": "Git" - }, - { - "command": "git.unstage", - "title": "%command.unstage%", - "category": "Git", - "icon": { - "light": "resources/icons/light/unstage.svg", - "dark": "resources/icons/dark/unstage.svg" - } - }, - { - "command": "git.unstageAll", - "title": "%command.unstageAll%", - "category": "Git", - "icon": { - "light": "resources/icons/light/unstage.svg", - "dark": "resources/icons/dark/unstage.svg" - } - }, - { - "command": "git.unstageSelectedRanges", - "title": "%command.unstageSelectedRanges%", - "category": "Git" - }, - { - "command": "git.clean", - "title": "%command.clean%", - "category": "Git", - "icon": { - "light": "resources/icons/light/clean.svg", - "dark": "resources/icons/dark/clean.svg" - } - }, - { - "command": "git.cleanAll", - "title": "%command.cleanAll%", - "category": "Git", - "icon": { - "light": "resources/icons/light/clean.svg", - "dark": "resources/icons/dark/clean.svg" - } - }, - { - "command": "git.commit", - "title": "%command.commit%", - "category": "Git", - "icon": { - "light": "resources/icons/light/check.svg", - "dark": "resources/icons/dark/check.svg" - } - }, - { - "command": "git.commitStaged", - "title": "%command.commitStaged%", - "category": "Git" - }, - { - "command": "git.commitStagedSigned", - "title": "%command.commitStagedSigned%", - "category": "Git" - }, - { - "command": "git.commitAll", - "title": "%command.commitAll%", - "category": "Git" - }, - { - "command": "git.commitAllSigned", - "title": "%command.commitAllSigned%", - "category": "Git" - }, - { - "command": "git.undoCommit", - "title": "%command.undoCommit%", - "category": "Git" - }, - { - "command": "git.checkout", - "title": "%command.checkout%", - "category": "Git" - }, - { - "command": "git.branch", - "title": "%command.branch%", - "category": "Git" - }, - { - "command": "git.pull", - "title": "%command.pull%", - "category": "Git" - }, - { - "command": "git.pullRebase", - "title": "%command.pullRebase%", - "category": "Git" - }, - { - "command": "git.push", - "title": "%command.push%", - "category": "Git" - }, - { - "command": "git.pushTo", - "title": "%command.pushTo%", - "category": "Git" - }, - { - "command": "git.sync", - "title": "%command.sync%", - "category": "Git" - }, - { - "command": "git.publish", - "title": "%command.publish%", - "category": "Git" - }, - { - "command": "git.showOutput", - "title": "%command.showOutput%", - "category": "Git" - }, - { - "command": "git.merge.accept.all-current", - "title": "Accept all current", - "category": "Git Merge" - }, - { - "category": "Git Merge", - "title": "Accept all incoming", - "command": "git.merge.accept.all-incoming" - }, - { - "category": "Git Merge", - "title": "Accept all both", - "command": "git.merge.accept.all-both" - }, - { - "category": "Git Merge", - "title": "Accept current", - "command": "git.merge.accept.current" - }, - { - "category": "Git Merge", - "title": "Accept incoming", - "command": "git.merge.accept.incoming" - }, - { - "category": "Git Merge", - "title": "Accept selection", - "command": "git.merge.accept.selection" - }, - { - "category": "Git Merge", - "title": "Accept both", - "command": "git.merge.accept.both" - }, - { - "category": "Git Merge", - "title": "Next conflict", - "command": "git.merge.next" - }, - { - "category": "Git Merge", - "title": "Previous conflict", - "command": "git.merge.previous" - }, - { - "category": "Git Merge", - "title": "Compare current conflict", - "command": "git.merge.compare" - } - ], - "keybindings": [ - { - "command": "git.merge.next", - "when": "editorTextFocus", - "key": "alt+m down" - }, - { - "command": "git.merge.previous", - "when": "editorTextFocus", - "key": "alt+m up" - }, - { - "command": "git.merge.accept.selection", - "when": "editorTextFocus", - "key": "alt+m enter" - }, - { - "command": "git.merge.accept.current", - "when": "editorTextFocus", - "key": "alt+m 1" - }, - { - "command": "git.merge.accept.incoming", - "when": "editorTextFocus", - "key": "alt+m 2" - }, - { - "command": "git.merge.accept.both", - "when": "editorTextFocus", - "key": "alt+m 3" - } - ], - "menus": { - "commandPalette": [ - { - "command": "git.clone", - "when": "config.git.enabled" - }, - { - "command": "git.init", - "when": "config.git.enabled && scmProvider == git && gitState == norepo" - }, - { - "command": "git.refresh", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.openFile", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.openChange", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.stage", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.stageAll", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.stageSelectedRanges", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.revertSelectedRanges", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.unstage", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.unstageAll", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.unstageSelectedRanges", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.clean", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.cleanAll", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.commit", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.commitStaged", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.commitStagedSigned", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.commitAll", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.commitAllSigned", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.undoCommit", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.checkout", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.branch", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.pull", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.pullRebase", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.push", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.pushTo", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.sync", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.publish", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.showOutput", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - } - ], - "scm/title": [ - { - "command": "git.init", - "group": "navigation", - "when": "config.git.enabled && scmProvider == git && gitState == norepo" - }, - { - "command": "git.commit", - "group": "navigation", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.refresh", - "group": "navigation", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.sync", - "group": "1_sync", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.pull", - "group": "1_sync", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.pullRebase", - "group": "1_sync", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.push", - "group": "1_sync", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.pushTo", - "group": "1_sync", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.publish", - "group": "2_publish", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.commitStaged", - "group": "3_commit", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.commitStagedSigned", - "group": "3_commit", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.commitAll", - "group": "3_commit", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.commitAllSigned", - "group": "3_commit", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.undoCommit", - "group": "3_commit", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.unstageAll", - "group": "4_stage", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.cleanAll", - "group": "4_stage", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - }, - { - "command": "git.showOutput", - "group": "5_output", - "when": "config.git.enabled && scmProvider == git && gitState == idle" - } - ], - "scm/resourceGroup/context": [ - { - "command": "git.stageAll", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == merge", - "group": "1_modification" - }, - { - "command": "git.stageAll", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == merge", - "group": "inline" - }, - { - "command": "git.unstageAll", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == index", - "group": "1_modification" - }, - { - "command": "git.unstageAll", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == index", - "group": "inline" - }, - { - "command": "git.cleanAll", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", - "group": "1_modification" - }, - { - "command": "git.stageAll", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", - "group": "1_modification" - }, - { - "command": "git.cleanAll", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", - "group": "inline" - }, - { - "command": "git.stageAll", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", - "group": "inline" - } - ], - "scm/resourceState/context": [ - { - "command": "git.stage", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == merge", - "group": "1_modification" - }, - { - "command": "git.stage", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == merge", - "group": "inline" - }, - { - "command": "git.openChange", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == index", - "group": "navigation" - }, - { - "command": "git.openFile", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == index", - "group": "navigation" - }, - { - "command": "git.unstage", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == index", - "group": "1_modification" - }, - { - "command": "git.unstage", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == index", - "group": "inline" - }, - { - "command": "git.openChange", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", - "group": "navigation" - }, - { - "command": "git.openFile", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", - "group": "navigation" - }, - { - "command": "git.stage", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", - "group": "1_modification" - }, - { - "command": "git.clean", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", - "group": "1_modification" - }, - { - "command": "git.clean", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", - "group": "inline" - }, - { - "command": "git.stage", - "when": "config.git.enabled && scmProvider == git && gitState == idle && scmResourceGroup == workingTree", - "group": "inline" - } - ], - "editor/title": [ - { - "command": "git.openFile", - "group": "navigation", - "when": "config.git.enabled && scmProvider == git && isInDiffEditor && resourceScheme != extension" - }, - { - "command": "git.openChange", - "group": "navigation", - "when": "config.git.enabled && scmProvider == git && !isInDiffEditor && resourceScheme != extension" - }, - { - "command": "git.stageSelectedRanges", - "group": "2_git@1", - "when": "config.git.enabled && scmProvider == git && isInDiffEditor" - }, - { - "command": "git.unstageSelectedRanges", - "group": "2_git@2", - "when": "config.git.enabled && scmProvider == git && isInDiffEditor" - }, - { - "command": "git.revertSelectedRanges", - "group": "2_git@3", - "when": "config.git.enabled && scmProvider == git && isInDiffEditor" - } - ] - }, - "configuration": { - "title": "Git", - "properties": { - "git.enabled": { - "type": "boolean", - "description": "%config.enabled%", - "default": true - }, - "git.path": { - "type": [ - "string", - "null" - ], - "description": "%config.path%", - "default": null, - "isExecutable": true - }, - "git.autorefresh": { - "type": "boolean", - "description": "%config.autorefresh%", - "default": true - }, - "git.autofetch": { - "type": "boolean", - "description": "%config.autofetch%", - "default": true - }, - "git.confirmSync": { - "type": "boolean", - "description": "%config.confirmSync%", - "default": true - }, - "git.countBadge": { - "type": "string", - "enum": [ - "all", - "tracked", - "off" - ], - "description": "%config.countBadge%", - "default": "all" - }, - "git.checkoutType": { - "type": "string", - "enum": [ - "all", - "local", - "tags", - "remote" - ], - "description": "%config.checkoutType%", - "default": "all" - }, - "git.ignoreLegacyWarning": { - "type": "boolean", - "description": "%config.ignoreLegacyWarning%", - "default": false - }, - "git.ignoreLimitWarning": { - "type": "boolean", - "description": "%config.ignoreLimitWarning%", - "default": false - }, - "git.defaultCloneDirectory": { - "type": "string", - "default": null, - "description": "%config.defaultCloneDirectory%" - }, - "git.enableSmartCommit": { - "type": "boolean", - "description": "%config.enableSmartCommit%", - "default": false - }, - "git.enableEditorMerge": { - "type": "boolean", - "description": "%config.enableEditorMerge%", - "default": true - } - } - } - }, - "dependencies": { - "iconv-lite": "0.4.15", - "vscode-extension-telemetry": "^0.0.7", - "vscode-nls": "^2.0.1" - }, - "devDependencies": { - "@types/mocha": "^2.2.41", - "@types/node": "^7.0.4", - "mocha": "^3.2.0" - } -} \ No newline at end of file From 005c78dbf07331e621b7a5570e31cd456f7927db Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 31 May 2017 10:39:31 -0700 Subject: [PATCH 1392/2747] Title case (fixes #27569) --- extensions/merge-conflict/package.nls.json | 16 ++++++++-------- .../merge-conflict/src/codelensProvider.ts | 8 ++++---- extensions/merge-conflict/src/commandHandler.ts | 2 +- extensions/merge-conflict/src/mergeDecorator.ts | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/extensions/merge-conflict/package.nls.json b/extensions/merge-conflict/package.nls.json index d991f872b44f3..b2927ca3431c9 100644 --- a/extensions/merge-conflict/package.nls.json +++ b/extensions/merge-conflict/package.nls.json @@ -1,14 +1,14 @@ { "command.category": "Merge Conflict", - "command.accept.all-incoming": "Accept all incoming", - "command.accept.all-both": "Accept all both", - "command.accept.current": "Accept current", - "command.accept.incoming": "Accept incoming", - "command.accept.selection": "Accept selection", + "command.accept.all-incoming": "Accept All Incoming", + "command.accept.all-both": "Accept All Both", + "command.accept.current": "Accept Current", + "command.accept.incoming": "Accept Incoming", + "command.accept.selection": "Accept Selection", "command.accept.both": "Accept Both", - "command.next": "Next conflict", - "command.previous": "Previous conflict", - "command.compare": "Compare current conflict", + "command.next": "Next Conflict", + "command.previous": "Previous Conflict", + "command.compare": "Compare Current Conflict", "config.title": "Merge Conflict", "config.codeLensEnabled": "Enable/disable merge conflict block CodeLens within editor", "config.decoratorsEnabled": "Enable/disable merge conflict decorators within editor" diff --git a/extensions/merge-conflict/src/codelensProvider.ts b/extensions/merge-conflict/src/codelensProvider.ts index 7213594505476..aa7bc6e30e0d8 100644 --- a/extensions/merge-conflict/src/codelensProvider.ts +++ b/extensions/merge-conflict/src/codelensProvider.ts @@ -63,25 +63,25 @@ export default class MergeConflictCodeLensProvider implements vscode.CodeLensPro conflicts.forEach(conflict => { let acceptCurrentCommand: vscode.Command = { command: 'merge-conflict.accept.current', - title: localize('acceptCurrentChange', 'Accept current change'), + title: localize('acceptCurrentChange', 'Accept Current Change'), arguments: ['known-conflict', conflict] }; let acceptIncomingCommand: vscode.Command = { command: 'merge-conflict.accept.incoming', - title: localize('acceptIncomingChange', 'Accept incoming change'), + title: localize('acceptIncomingChange', 'Accept Incoming Change'), arguments: ['known-conflict', conflict] }; let acceptBothCommand: vscode.Command = { command: 'merge-conflict.accept.both', - title: localize('acceptBothChanges', 'Accept both changes'), + title: localize('acceptBothChanges', 'Accept Both Changes'), arguments: ['known-conflict', conflict] }; let diffCommand: vscode.Command = { command: 'merge-conflict.compare', - title: localize('compareChanges', 'Compare changes'), + title: localize('compareChanges', 'Compare Changes'), arguments: [conflict] }; diff --git a/extensions/merge-conflict/src/commandHandler.ts b/extensions/merge-conflict/src/commandHandler.ts index 41982c0630702..fe3dbd67201c4 100644 --- a/extensions/merge-conflict/src/commandHandler.ts +++ b/extensions/merge-conflict/src/commandHandler.ts @@ -90,7 +90,7 @@ export default class CommandHandler implements vscode.Disposable { range = conflict.incoming.content; const rightUri = leftUri.with({ query: JSON.stringify(range) }); - const title = localize('compareChangesTitle', '{0}: Current changes ⟷ Incoming changes', fileName); + const title = localize('compareChangesTitle', '{0}: Current Changes ⟷ Incoming Changes', fileName); vscode.commands.executeCommand('vscode.diff', leftUri, rightUri, title); } diff --git a/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts index 0dd5ad6f6c6a8..d07e7fe5681dd 100644 --- a/extensions/merge-conflict/src/mergeDecorator.ts +++ b/extensions/merge-conflict/src/mergeDecorator.ts @@ -80,7 +80,7 @@ export default class MergeDectorator implements vscode.Disposable { backgroundColor: new vscode.ThemeColor('merge.currentHeaderBackground'), color: new vscode.ThemeColor('editor.foreground'), after: { - contentText: ' ' + localize('currentChange', '(Current change)'), + contentText: ' ' + localize('currentChange', '(Current Change)'), color: new vscode.ThemeColor('descriptionForeground') } }); @@ -95,7 +95,7 @@ export default class MergeDectorator implements vscode.Disposable { color: new vscode.ThemeColor('editor.foreground'), isWholeLine: this.decorationUsesWholeLine, after: { - contentText: ' ' + localize('incomingChange', '(Incoming change)'), + contentText: ' ' + localize('incomingChange', '(Incoming Change)'), color: new vscode.ThemeColor('descriptionForeground') } }); From e0c1e7d2429fa182b14eee4f6944f815e5e573e5 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 31 May 2017 11:06:43 -0700 Subject: [PATCH 1393/2747] Title case (fixes #27569) --- extensions/merge-conflict/src/mergeDecorator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts index d07e7fe5681dd..0dd5ad6f6c6a8 100644 --- a/extensions/merge-conflict/src/mergeDecorator.ts +++ b/extensions/merge-conflict/src/mergeDecorator.ts @@ -80,7 +80,7 @@ export default class MergeDectorator implements vscode.Disposable { backgroundColor: new vscode.ThemeColor('merge.currentHeaderBackground'), color: new vscode.ThemeColor('editor.foreground'), after: { - contentText: ' ' + localize('currentChange', '(Current Change)'), + contentText: ' ' + localize('currentChange', '(Current change)'), color: new vscode.ThemeColor('descriptionForeground') } }); @@ -95,7 +95,7 @@ export default class MergeDectorator implements vscode.Disposable { color: new vscode.ThemeColor('editor.foreground'), isWholeLine: this.decorationUsesWholeLine, after: { - contentText: ' ' + localize('incomingChange', '(Incoming Change)'), + contentText: ' ' + localize('incomingChange', '(Incoming change)'), color: new vscode.ThemeColor('descriptionForeground') } }); From c45f29b2b3694d925bec33d82740937bc99bc1ca Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 31 May 2017 11:13:49 -0700 Subject: [PATCH 1394/2747] Track pending updates per editor (fixes #27570) --- .../merge-conflict/src/mergeDecorator.ts | 70 +++++++++++-------- 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts index 0dd5ad6f6c6a8..868f383f5d87c 100644 --- a/extensions/merge-conflict/src/mergeDecorator.ts +++ b/extensions/merge-conflict/src/mergeDecorator.ts @@ -15,6 +15,7 @@ export default class MergeDectorator implements vscode.Disposable { private config: interfaces.IExtensionConfiguration; private tracker: interfaces.IDocumentMergeConflictTracker; + private updating = new Map(); constructor(private context: vscode.ExtensionContext, trackerService: interfaces.IDocumentMergeConflictTrackerService) { this.tracker = trackerService.createTracker('decorator'); @@ -146,47 +147,54 @@ export default class MergeDectorator implements vscode.Disposable { } // If we have a pending scan from the same origin, exit early. - if (this.tracker.isPending(editor.document)) { + if (this.updating.get(editor)) { return; } - let conflicts = await this.tracker.getConflicts(editor.document); + try { + this.updating.set(editor, true); - if (conflicts.length === 0) { - this.removeDecorations(editor); - return; - } + let conflicts = await this.tracker.getConflicts(editor.document); - // Store decorations keyed by the type of decoration, set decoration wants a "style" - // to go with it, which will match this key (see constructor); - let matchDecorations: { [key: string]: vscode.DecorationOptions[] } = {}; + if (conflicts.length === 0) { + this.removeDecorations(editor); + return; + } - let pushDecoration = (key: string, d: vscode.DecorationOptions) => { - matchDecorations[key] = matchDecorations[key] || []; - matchDecorations[key].push(d); - }; + // Store decorations keyed by the type of decoration, set decoration wants a "style" + // to go with it, which will match this key (see constructor); + let matchDecorations: { [key: string]: vscode.DecorationOptions[] } = {}; - conflicts.forEach(conflict => { - // TODO, this could be more effective, just call getMatchPositions once with a map of decoration to position - pushDecoration('current.content', { range: conflict.current.decoratorContent }); - pushDecoration('incoming.content', { range: conflict.incoming.decoratorContent }); + let pushDecoration = (key: string, d: vscode.DecorationOptions) => { + matchDecorations[key] = matchDecorations[key] || []; + matchDecorations[key].push(d); + }; - if (this.config.enableDecorations) { - pushDecoration('current.header', { range: conflict.current.header }); - pushDecoration('splitter', { range: conflict.splitter }); - pushDecoration('incoming.header', { range: conflict.incoming.header }); - } - }); + conflicts.forEach(conflict => { + // TODO, this could be more effective, just call getMatchPositions once with a map of decoration to position + pushDecoration('current.content', { range: conflict.current.decoratorContent }); + pushDecoration('incoming.content', { range: conflict.incoming.decoratorContent }); - // For each match we've generated, apply the generated decoration with the matching decoration type to the - // editor instance. Keys in both matches and decorations should match. - Object.keys(matchDecorations).forEach(decorationKey => { - let decorationType = this.decorations[decorationKey]; + if (this.config.enableDecorations) { + pushDecoration('current.header', { range: conflict.current.header }); + pushDecoration('splitter', { range: conflict.splitter }); + pushDecoration('incoming.header', { range: conflict.incoming.header }); + } + }); - if (decorationType) { - editor.setDecorations(decorationType, matchDecorations[decorationKey]); - } - }); + // For each match we've generated, apply the generated decoration with the matching decoration type to the + // editor instance. Keys in both matches and decorations should match. + Object.keys(matchDecorations).forEach(decorationKey => { + let decorationType = this.decorations[decorationKey]; + + if (decorationType) { + editor.setDecorations(decorationType, matchDecorations[decorationKey]); + } + }); + + } finally { + this.updating.delete(editor); + } } private removeDecorations(editor: vscode.TextEditor) { From fc2d062f999de5daa90041a1d6591fcc8b662d2c Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 31 May 2017 11:16:06 -0700 Subject: [PATCH 1395/2747] Comment --- extensions/merge-conflict/src/mergeDecorator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts index 868f383f5d87c..19429fc2385f2 100644 --- a/extensions/merge-conflict/src/mergeDecorator.ts +++ b/extensions/merge-conflict/src/mergeDecorator.ts @@ -146,7 +146,7 @@ export default class MergeDectorator implements vscode.Disposable { return; } - // If we have a pending scan from the same origin, exit early. + // If we have a pending scan from the same origin, exit early. (Cannot use this.tracker.isPending() because decorations are per editor.) if (this.updating.get(editor)) { return; } From ab6371af50c5abb988d43f04db3e5e5e93726071 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 31 May 2017 20:25:47 +0200 Subject: [PATCH 1396/2747] Fix #27663 --- src/vs/platform/extensions/common/extensionsRegistry.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/platform/extensions/common/extensionsRegistry.ts b/src/vs/platform/extensions/common/extensionsRegistry.ts index c950bdc66ff89..e1492b5088539 100644 --- a/src/vs/platform/extensions/common/extensionsRegistry.ts +++ b/src/vs/platform/extensions/common/extensionsRegistry.ts @@ -205,7 +205,8 @@ const schema: IJSONSchema = { }, { label: 'onView', - body: 'onView:${5:viewId}' + body: 'onView:${5:viewId}', + description: nls.localize('vscode.extension.activationEvents.onView', 'An activation event emitted whenever the specified view is expanded.'), }, { label: '*', From d23b97b4626845f531befd19690fd8466a6c6e72 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 31 May 2017 20:29:19 +0200 Subject: [PATCH 1397/2747] ExthostTreeView: Check if children are null or undefined --- src/vs/workbench/api/node/extHostTreeViews.ts | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/api/node/extHostTreeViews.ts b/src/vs/workbench/api/node/extHostTreeViews.ts index 99e21c10c723a..452e83b806844 100644 --- a/src/vs/workbench/api/node/extHostTreeViews.ts +++ b/src/vs/workbench/api/node/extHostTreeViews.ts @@ -125,15 +125,18 @@ class ExtHostTreeView extends Disposable { } private processAndMapElements(elements: T[]): TPromise { - return TPromise.join( - elements.filter(element => !!element) - .map(element => { - if (this.extChildrenElementsMap.has(element)) { - return TPromise.wrapError(localize('treeView.duplicateElement', 'Element {0} is already registered', element)); - } - return this.resolveElement(element); - })) - .then(treeItems => treeItems.filter(treeItem => !!treeItem)); + if (elements && elements.length) { + return TPromise.join( + elements.filter(element => !!element) + .map(element => { + if (this.extChildrenElementsMap.has(element)) { + return TPromise.wrapError(localize('treeView.duplicateElement', 'Element {0} is already registered', element)); + } + return this.resolveElement(element); + })) + .then(treeItems => treeItems.filter(treeItem => !!treeItem)); + } + return TPromise.as([]); } private resolveElement(element: T): TPromise { From 0913cd5b89de025df59b8d34153157c6fa5cc9ae Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 31 May 2017 11:33:36 -0700 Subject: [PATCH 1398/2747] Make terminal path dragging more robust Fixes #27511 --- .../electron-browser/terminalPanel.ts | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index a1a746a7bd2c4..c9a9c9a57a146 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -216,19 +216,20 @@ export class TerminalPanel extends Panel { } // Check if the file was dragged from the tree explorer - let url = e.dataTransfer.getData('URL'); - if (!url && e.dataTransfer.files.length > 0) { + let uri = e.dataTransfer.getData('URL'); + if (uri) { + uri = URI.parse(uri).path; + } else if (e.dataTransfer.files.length > 0) { // Check if the file was dragged from the filesystem - url = e.dataTransfer.files[0].path; + uri = URI.file(e.dataTransfer.files[0].path).path; } - const filePath = URI.parse(url).path; - if (!filePath) { + if (!uri) { return; } const terminal = this._terminalService.getActiveInstance(); - terminal.sendText(this._wrapPathInQuotes(filePath), false); + terminal.sendText(this._preparePathForTerminal(uri), false); } })); } @@ -292,20 +293,22 @@ export class TerminalPanel extends Panel { /** * Adds quotes to a path if it contains whitespaces */ - private _wrapPathInQuotes(path: string) { + private _preparePathForTerminal(path: string) { if (platform.isWindows) { if (/\s+/.test(path)) { return `"${path}"`; } return path; } - const charsToReplace: { a: string, b: string }[] = [ - { a: '\\', b: '\\\\' }, - { a: ' ', b: '\\ ' }, - { a: '\'', b: '\\\'' }, - { a: '"', b: '\\"' } - ]; - charsToReplace.forEach(chars => path = path.replace(chars.a, chars.b)); + path = path.replace(/(%5C|\\)/g, '\\\\'); + const charsToEscape = [' ', '\'', '"', '?', ':', ';']; + for (let i = 0; i < path.length; i++) { + const indexOfChar = charsToEscape.indexOf(path.charAt(i)); + if (indexOfChar >= 0) { + path = `${path.substring(0, i)}\\${path.charAt(i)}${path.substring(i + 1)}`; + i++; // Skip char due to escape char being added + } + } return path; } } From 508c7a7d505211897df805b0e750b8692d06d688 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 31 May 2017 20:34:19 +0200 Subject: [PATCH 1399/2747] Improve tree data provider documentation --- src/vs/vscode.proposed.d.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index c4ec6306a2565..6e1ea7f6d9fe1 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -351,11 +351,12 @@ declare module 'vscode' { } /** - * A data provider that provides tree data for a view + * A data provider that provides tree data */ export interface TreeDataProvider { /** * An optional event to signal that an element or root has changed. + * To signal that root has changed, do not pass any argument or pass `undefined` or `null`. */ onDidChangeTreeData?: Event; @@ -368,10 +369,10 @@ declare module 'vscode' { getTreeItem(element: T): TreeItem | Thenable; /** - * Get the children of `element` or root if no element (`undefined`) is passed. + * Get the children of `element` or root if no element is passed. * * @param element The element from which the provider gets children. Can be `undefined`. - * @return Children of `element` or root if no element (`undefined`) is passed. + * @return Children of `element` or root if no element is passed. */ getChildren(element?: T): ProviderResult; } From 00fe73336716dc33b9a39a845cff6a0e099988f0 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 31 May 2017 11:40:55 -0700 Subject: [PATCH 1400/2747] Make sure we decorate all visible editors (fixes #27574) --- extensions/merge-conflict/src/mergeDecorator.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts index 19429fc2385f2..ce25324e25f5b 100644 --- a/extensions/merge-conflict/src/mergeDecorator.ts +++ b/extensions/merge-conflict/src/mergeDecorator.ts @@ -36,9 +36,9 @@ export default class MergeDectorator implements vscode.Disposable { this.applyDecorationsFromEvent(event.document); }, null, this.context.subscriptions); - vscode.window.onDidChangeActiveTextEditor((e) => { - // New editor attempt to apply - this.applyDecorations(e); + vscode.window.onDidChangeVisibleTextEditors((e) => { + // Any of which could be new (not just the active one). + e.forEach(e => this.applyDecorations(e)); }, null, this.context.subscriptions); } From 09ce1ccb2bfbff7290ef4d4edc94120f3013f0ee Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 31 May 2017 11:50:20 -0700 Subject: [PATCH 1401/2747] Make sure we don't apply decorations to disposed editors --- extensions/merge-conflict/src/mergeDecorator.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts index ce25324e25f5b..1b419908847af 100644 --- a/extensions/merge-conflict/src/mergeDecorator.ts +++ b/extensions/merge-conflict/src/mergeDecorator.ts @@ -155,6 +155,9 @@ export default class MergeDectorator implements vscode.Disposable { this.updating.set(editor, true); let conflicts = await this.tracker.getConflicts(editor.document); + if (vscode.window.visibleTextEditors.indexOf(editor) === -1) { + return; + } if (conflicts.length === 0) { this.removeDecorations(editor); From 93b38d1092ec8efe22597a3769780e792f7d4042 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 31 May 2017 20:57:57 +0200 Subject: [PATCH 1402/2747] Fixes #24712: remove code that tries to preserve editor options, but is incorrect --- src/vs/workbench/common/editor.ts | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/src/vs/workbench/common/editor.ts b/src/vs/workbench/common/editor.ts index 3767ac95928ff..d42dd60600241 100644 --- a/src/vs/workbench/common/editor.ts +++ b/src/vs/workbench/common/editor.ts @@ -10,12 +10,11 @@ import * as objects from 'vs/base/common/objects'; import types = require('vs/base/common/types'); import URI from 'vs/base/common/uri'; import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; -import { IEditor, ICommonCodeEditor, IEditorViewState, IModel } from 'vs/editor/common/editorCommon'; +import { IEditor, IEditorViewState, IModel } from 'vs/editor/common/editorCommon'; import { IEditorInput, IEditorModel, IEditorOptions, ITextEditorOptions, IBaseResourceInput, Position, Verbosity } from 'vs/platform/editor/common/editor'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IInstantiationService, IConstructorSignature0 } from 'vs/platform/instantiation/common/instantiation'; import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; -import * as editorOptions from 'vs/editor/common/config/editorOptions'; export const TextCompareEditorVisible = new RawContextKey('textCompareEditorVisible', false); @@ -586,7 +585,6 @@ export class TextEditorOptions extends EditorOptions { private revealInCenterIfOutsideViewport: boolean; private editorViewState: IEditorViewState; - private editorOptions: editorOptions.IEditorOptions; public static from(input: IBaseResourceInput): TextEditorOptions { let options: TextEditorOptions = null; @@ -691,17 +689,6 @@ export class TextEditorOptions extends EditorOptions { // View state options.editorViewState = editor.saveViewState(); - // Selected editor options - const codeEditor = editor; - if (typeof codeEditor.getConfiguration === 'function') { - const config = codeEditor.getConfiguration(); - if (config && config.viewInfo && config.wrappingInfo) { - options.editorOptions = Object.create(null); - options.editorOptions.renderWhitespace = config.viewInfo.renderWhitespace; - options.editorOptions.renderControlCharacters = config.viewInfo.renderControlCharacters; - options.editorOptions.wordWrap = config.wrappingInfo.isViewportWrapping ? 'on' : 'off'; - } - } return options; } @@ -712,11 +699,6 @@ export class TextEditorOptions extends EditorOptions { */ public apply(editor: IEditor): boolean { - // Editor options - if (this.editorOptions) { - editor.updateOptions(this.editorOptions); - } - // View state return this.applyViewState(editor); } From c7f91ca6bc02d657e73db8a02a9bd720c1ec67c8 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 31 May 2017 21:17:41 +0200 Subject: [PATCH 1403/2747] Fixes #27766: Disable wrapping when a screen reader is detected --- src/vs/editor/common/config/editorOptions.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 24ea09ddf3136..b0586e45307e2 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -1760,7 +1760,17 @@ export class InternalEditorOptionsFactory { const wordWrapColumn = opts.wordWrapColumn; const wordWrapMinified = opts.wordWrapMinified; - if (wordWrapMinified && env.isDominatedByLongLines) { + if (env.accessibilitySupport === platform.AccessibilitySupport.Enabled) { + // See https://github.com/Microsoft/vscode/issues/27766 + // Never enable wrapping when a screen reader is attached + // because arrow down etc. will not move the cursor in the way + // a screen reader expects. + bareWrappingInfo = { + isWordWrapMinified: false, + isViewportWrapping: false, + wrappingColumn: -1 + }; + } else if (wordWrapMinified && env.isDominatedByLongLines) { // Force viewport width wrapping if model is dominated by long lines bareWrappingInfo = { isWordWrapMinified: true, From b5a1ecb64cd67d844c046419229c2ba08961c394 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 31 May 2017 12:36:58 -0700 Subject: [PATCH 1404/2747] Fixes #27615 --- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 6d704f5176d78..00c8016932894 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -61,6 +61,9 @@ function matchesColor(text: string) { } function canExpandCompletionItem(item: ICompletionItem) { + if (!item) { + return false; + } const suggestion = item.suggestion; if (suggestion.documentation) { return true; @@ -611,7 +614,8 @@ export class SuggestWidget implements IContentWidget, IDelegate case State.Open: hide(this.messageElement); show(this.listElement); - if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, expandSuggestionDocsByDefault)) { + if (this.storageService.getBoolean('expandSuggestionDocs', StorageScope.GLOBAL, expandSuggestionDocsByDefault) + && canExpandCompletionItem(this.list.getFocusedElements()[0])) { show(this.details.element); this.expandSideOrBelow(); } else { From 11c717ef23a92dda70a4657391ae14a1c45e9ab8 Mon Sep 17 00:00:00 2001 From: Sam El-Husseini Date: Wed, 31 May 2017 13:25:45 -0700 Subject: [PATCH 1405/2747] Avoiding a number of Android IME keyboard issues by turning autocomplete to off in the text area. (monaco-editor) --- src/vs/editor/browser/controller/textAreaHandler.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index e927fcb4ab1a7..ab478c59ad4e4 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -108,6 +108,7 @@ export class TextAreaHandler extends ViewPart { this.textArea.setAttribute('wrap', 'off'); this.textArea.setAttribute('autocorrect', 'off'); this.textArea.setAttribute('autocapitalize', 'off'); + this.textArea.setAttribute('autocomplete', 'off'); this.textArea.setAttribute('spellcheck', 'false'); this.textArea.setAttribute('aria-label', conf.viewInfo.ariaLabel); this.textArea.setAttribute('role', 'textbox'); From aa921aa2915aeb41262f18180f22ba3d0d34888f Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 31 May 2017 13:38:23 -0700 Subject: [PATCH 1406/2747] Check for special URLs (fixes #27603) (#27781) --- extensions/typescript/src/typescriptMain.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 9c20725093204..3938f9888f2ff 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -613,7 +613,7 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { } private findLanguage(file: string): Thenable { - return workspace.openTextDocument(file).then((doc: TextDocument) => { + return workspace.openTextDocument(this.client.asUrl(file)).then((doc: TextDocument) => { for (const language of this.languages) { if (language.handles(file, doc)) { return language; From eb097f89a64d702702b90c46810a1cf46b670739 Mon Sep 17 00:00:00 2001 From: Greg Van Liew Date: Wed, 31 May 2017 13:38:40 -0700 Subject: [PATCH 1407/2747] ATA is Automatic Type Acquisition (#27760) --- extensions/typescript/package.nls.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/typescript/package.nls.json b/extensions/typescript/package.nls.json index 6aab169b6fbbd..374860ba9c4e1 100644 --- a/extensions/typescript/package.nls.json +++ b/extensions/typescript/package.nls.json @@ -36,8 +36,8 @@ "typescript.selectTypeScriptVersion.title": "Select TypeScript Version", "jsDocCompletion.enabled": "Enable/disable auto JSDoc comments", "javascript.implicitProjectConfig.checkJs": "Enable/disable semantic checking of JavaScript files. Existing jsconfig.json or tsconfig.json files override this setting. Requires TypeScript >=2.3.1.", - "typescript.npm": "Specifies the path to the NPM install used for automatic typings acquisition. Requires TypeScript >= 2.3.4", - "typescript.check.npmIsInstalled": "Check if NPM is installed for automatic typings acquisition", + "typescript.npm": "Specifies the path to the NPM install used for Automatic Type Acquisition. Requires TypeScript >= 2.3.4.", + "typescript.check.npmIsInstalled": "Check if NPM is installed for Automatic Type Acquisition.", "javascript.nameSuggestions": "Enable/disable including unique names from the file in JavaScript suggestion lists.", "typescript.tsc.autoDetect": "Controls whether auto detection of tsc tasks is on or off." } From 0b2249b4232697bd12fcd7d70a891f1e069f48ac Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 31 May 2017 13:43:03 -0700 Subject: [PATCH 1408/2747] Fixes #27767 --- extensions/emmet/package.json | 4 ++-- extensions/emmet/src/emmetCompletionProvider.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/emmet/package.json b/extensions/emmet/package.json index 177d7be2cecad..bf96e3d75fd3f 100644 --- a/extensions/emmet/package.json +++ b/extensions/emmet/package.json @@ -35,12 +35,12 @@ "type": "object", "title": "Emmet configuration", "properties": { - "emmet.suggestExpandedAbbreviation": { + "emmet.showExpandedAbbreviation": { "type": "boolean", "default": true, "description": "Shows expanded emmet abbreviations as suggestions" }, - "emmet.suggestAbbreviations": { + "emmet.showAbbreviationSuggestions": { "type": "boolean", "default": true, "description": "Shows possible emmet abbreviations as suggestions" diff --git a/extensions/emmet/src/emmetCompletionProvider.ts b/extensions/emmet/src/emmetCompletionProvider.ts index 8e77e0cec841a..cbd5b750ae22b 100644 --- a/extensions/emmet/src/emmetCompletionProvider.ts +++ b/extensions/emmet/src/emmetCompletionProvider.ts @@ -29,7 +29,7 @@ export class EmmetCompletionItemProvider implements vscode.CompletionItemProvide } function getExpandedAbbreviation(document: vscode.TextDocument, position: vscode.Position): vscode.CompletionItem { - if (!vscode.workspace.getConfiguration('emmet')['suggestExpandedAbbreviation']) { + if (!vscode.workspace.getConfiguration('emmet')['showExpandedAbbreviation']) { return; } let [rangeToReplace, wordToExpand] = extractAbbreviation(position); @@ -72,7 +72,7 @@ function removeTabStops(expandedWord: string): string { return expandedWord.replace(/\$\{\d+\}/g, '').replace(/\$\{\d+:([^\}]+)\}/g, '$1'); } function getAbbreviationSuggestions(syntax: string, prefix: string, skipExactMatch: boolean) { - if (!vscode.workspace.getConfiguration('emmet')['suggestAbbreviations'] || !prefix || isStyleSheet(syntax)) { + if (!vscode.workspace.getConfiguration('emmet')['showAbbreviationSuggestions'] || !prefix || isStyleSheet(syntax)) { return []; } From d7757bd8ee610f1a580080fed404bf039e44f674 Mon Sep 17 00:00:00 2001 From: Ben Stein Date: Wed, 31 May 2017 16:42:11 -0500 Subject: [PATCH 1409/2747] Initial work on #10023. Modified terminalInstance to expose setTitle and fire the onTitleChanged event when it's called. Added workbench.action.terminal.rename contribution from the workbench and the action that fires when it's run. --- .../parts/terminal/common/terminal.ts | 5 +++ .../electron-browser/terminal.contribution.ts | 3 +- .../electron-browser/terminalActions.ts | 30 +++++++++++++++++ .../electron-browser/terminalInstance.ts | 33 +++++++++++++++---- 4 files changed, 64 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/terminal/common/terminal.ts b/src/vs/workbench/parts/terminal/common/terminal.ts index 1093b3ee7e075..502dc642b8abd 100644 --- a/src/vs/workbench/parts/terminal/common/terminal.ts +++ b/src/vs/workbench/parts/terminal/common/terminal.ts @@ -325,4 +325,9 @@ export interface ITerminalInstance { * Experimental: Call to enable onData to be passed over IPC to the extension host. */ enableApiOnData(): void; + + /** + * Sets the title of the terminal instance. + */ + setTitle(title: string): void; } diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index 17e931a643b4b..b502d20a6aa32 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -18,7 +18,7 @@ import { TERMINAL_DEFAULT_SHELL_LINUX, TERMINAL_DEFAULT_SHELL_OSX, TERMINAL_DEFA import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; -import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, FocusTerminalAtIndexAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction, AllowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; +import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, FocusTerminalAtIndexAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction, AllowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand, RenameTerminalAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; import { Registry } from 'vs/platform/platform'; import { ShowAllCommandsAction } from 'vs/workbench/parts/quickopen/browser/commandsHandler'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; @@ -268,5 +268,6 @@ if (platform.isWindows) { } actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(AllowWorkspaceShellTerminalCommand, AllowWorkspaceShellTerminalCommand.ID, AllowWorkspaceShellTerminalCommand.LABEL), 'Terminal: Allow Workspace Shell Configuration', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DisallowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand.ID, DisallowWorkspaceShellTerminalCommand.LABEL), 'Terminal: Disallow Workspace Shell Configuration', category); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(RenameTerminalAction, RenameTerminalAction.ID, RenameTerminalAction.LABEL), 'Terminal: Rename', category); registerColors(); diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts index 3b62f9642edb8..a4e80114abcc3 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts @@ -17,6 +17,7 @@ import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { attachSelectBoxStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; export class ToggleTerminalAction extends TogglePanelAction { @@ -533,3 +534,32 @@ export class DisallowWorkspaceShellTerminalCommand extends Action { return TPromise.as(void 0); } } + +export class RenameTerminalAction extends Action { + + public static ID = 'workbench.action.terminal.rename'; + public static LABEL = nls.localize('workbench.action.terminal.rename', "Rename"); + + constructor( + id: string, label: string, + @IQuickOpenService private quickOpenService: IQuickOpenService, + @ITerminalService private terminalService: ITerminalService + ) { + super(id, label); + } + + public run(): TPromise { + const terminalInstance = this.terminalService.getActiveInstance(); + if (!terminalInstance) { + return TPromise.as(void 0); + } + return this.quickOpenService.input({ + prompt: nls.localize('workbench.action.terminal.rename.prompt', "Enter terminal name"), + }).then(name => { + if (name) { + terminalInstance.setTitle(name); + } + }); + + } +} \ No newline at end of file diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 3b32036382612..98dbc2f265439 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -479,12 +479,13 @@ export class TerminalInstance implements ITerminalInstance { }); if (!shell.name) { // Only listen for process title changes when a name is not provided - this._process.on('message', (message) => { - if (message.type === 'title') { - this._title = message.content ? message.content : ''; - this._onTitleChanged.fire(this._title); - } - }); + this._process.on('message', this._onPtyProcessMessageTitleChanged); + // this._process.on('message', (message) => { + // if (message.type === 'title') { + // this._title = message.content ? message.content : ''; + // this._onTitleChanged.fire(this._title); + // } + // }); } this._process.on('message', (message) => { if (message.type === 'pid') { @@ -561,6 +562,13 @@ export class TerminalInstance implements ITerminalInstance { } } + private _onPtyProcessMessageTitleChanged(message: any): void { + if (message.type === 'title') { + this._title = message.content ? message.content : ''; + this._onTitleChanged.fire(this._title); + } + } + private _attachPressAnyKeyToCloseListener() { this._processDisposables.push(dom.addDisposableListener(this._xterm.textarea, 'keypress', (event: KeyboardEvent) => { this.dispose(); @@ -761,6 +769,19 @@ export class TerminalInstance implements ITerminalInstance { public static setTerminalProcessFactory(factory: ITerminalProcessFactory): void { this._terminalProcessFactory = factory; } + + public setTitle(title: string): void { + const oldTitle = this._title; + if (title !== oldTitle) { + this._title = title; + this._onTitleChanged.fire(title); + } + + // if the title is set via API, unregister the handler that automatically updates the terminal name + if (this._process) { + this._process.removeListener('message', this._onPtyProcessMessageTitleChanged); + } + } } registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { From cc0d24a24adb01d3f759309fa185af76fdbbc816 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 31 May 2017 14:44:37 -0700 Subject: [PATCH 1410/2747] Fix shrinkwrap of ts --- extensions/npm-shrinkwrap.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/npm-shrinkwrap.json b/extensions/npm-shrinkwrap.json index c7036103d67b3..82311e47d811f 100644 --- a/extensions/npm-shrinkwrap.json +++ b/extensions/npm-shrinkwrap.json @@ -3,7 +3,7 @@ "version": "0.0.1", "dependencies": { "typescript": { - "version": "2.3.4,", + "version": "2.3.4", "from": "typescript@typescript@2.3.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.3.4.tgz" } From 717c93ae17963c37758dd0b1178f8a09362c54d8 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 31 May 2017 15:06:51 -0700 Subject: [PATCH 1411/2747] Fix ts shrinkwrap --- extensions/npm-shrinkwrap.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/npm-shrinkwrap.json b/extensions/npm-shrinkwrap.json index 82311e47d811f..278e305e39bd5 100644 --- a/extensions/npm-shrinkwrap.json +++ b/extensions/npm-shrinkwrap.json @@ -4,7 +4,7 @@ "dependencies": { "typescript": { "version": "2.3.4", - "from": "typescript@typescript@2.3.4", + "from": "typescript@2.3.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.3.4.tgz" } } From ca923a5ee127fb35caa5025dc5948ef9ee4db6db Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 31 May 2017 15:16:22 -0700 Subject: [PATCH 1412/2747] Implement oncancel (fixes #27638) --- src/vs/workbench/parts/search/browser/openAnythingHandler.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts index 113adfd286d13..64c2f66afeb31 100644 --- a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts +++ b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts @@ -229,6 +229,10 @@ export class OpenAnythingHandler extends QuickOpenHandler { this.pendingSearch = null; this.messageService.show(Severity.Error, error); }); + }, () => { + resultPromises.forEach(resultPromise => { + resultPromise.cancel(); + }); }); return this.pendingSearch; From b87307ee8d5999ea8ce507a8706817124150ed07 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 31 May 2017 15:18:41 -0700 Subject: [PATCH 1413/2747] Correctly set ts version in package.json --- extensions/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/package.json b/extensions/package.json index 18e2c7dafbc30..180253c59ae45 100644 --- a/extensions/package.json +++ b/extensions/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "description": "Dependencies shared by all extensions", "dependencies": { - "typescript": "typescript@2.3.4" + "typescript": "2.3.4" }, "scripts": { "postinstall": "node ./postinstall" From 06fd9024acbaf7a38a6084ea8d995fe4edbe6403 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 31 May 2017 15:38:22 -0700 Subject: [PATCH 1414/2747] Add info about typescript.npm to warning message Fixes #27707 --- extensions/typescript/src/utils/typingsStatus.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/typescript/src/utils/typingsStatus.ts b/extensions/typescript/src/utils/typingsStatus.ts index 9bdbd6d107076..33c4a85c7d663 100644 --- a/extensions/typescript/src/utils/typingsStatus.ts +++ b/extensions/typescript/src/utils/typingsStatus.ts @@ -106,7 +106,7 @@ export class AtaProgressReporter { window.showWarningMessage( localize( 'typesInstallerInitializationFailed.title', - "Could not install typings files for JavaScript language features. Please ensure that NPM is installed" + "Could not install typings files for JavaScript language features. Please ensure that NPM is installed or configure 'typescript.npm' in your user settings" ), { title: localize('typesInstallerInitializationFailed.moreInformation', "More Information"), id: 1 From eb9de44ec9a053cf9d5dd391cb91372363362472 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Thu, 1 Jun 2017 00:15:16 +0200 Subject: [PATCH 1415/2747] Fixes #27470: Tasks: below tasks.json is not valid although it should be --- src/vs/workbench/api/node/extHostTask.ts | 2 +- .../parts/tasks/common/taskConfiguration.ts | 307 +++++++++++------- src/vs/workbench/parts/tasks/common/tasks.ts | 17 +- .../electron-browser/task.contribution.ts | 5 +- .../electron-browser/terminalTaskSystem.ts | 12 - .../parts/tasks/node/processTaskSystem.ts | 12 - .../tasks/test/node/configuration.test.ts | 230 ++++++++----- 7 files changed, 340 insertions(+), 245 deletions(-) diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index b1febc8eb3dc8..180bc9ffbf380 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -324,7 +324,6 @@ namespace Tasks { group: types.TaskGroup.is(task.group) ? task.group : undefined, command: command, isBackground: !!task.isBackground, - suppressTaskName: true, problemMatchers: task.problemMatchers.slice() }; return result; @@ -338,6 +337,7 @@ namespace Tasks { name: value.process, args: Strings.from(value.args), type: TaskSystem.CommandType.Process, + suppressTaskName: true, terminalBehavior: TerminalBehaviour.from(value.terminalBehavior) }; if (value.options) { diff --git a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts index 8d7903008c973..2419be66ba092 100644 --- a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts @@ -337,12 +337,19 @@ enum ProblemMatcherKind { const EMPTY_ARRAY: any[] = []; Object.freeze(EMPTY_ARRAY); -function mergeProperty(target: T, source: T, key: K) { +function assignProperty(target: T, source: T, key: K) { if (source[key] !== void 0) { target[key] = source[key]; } } +function fillProperty(target: T, source: T, key: K) { + if (target[key] === void 0 && source[key] !== void 0) { + target[key] = source[key]; + } +} + + interface ParseContext { problemReporter: IProblemReporter; namedProblemMatchers: IStringDictionary; @@ -350,6 +357,62 @@ interface ParseContext { schemaVersion: Tasks.JsonSchemaVersion; } +namespace ShellConfiguration { + export function is(value: any): value is ShellConfiguration { + let candidate: ShellConfiguration = value; + return candidate && Types.isString(candidate.executable) && (candidate.args === void 0 || Types.isStringArray(candidate.args)); + } + + export function from(this: void, config: ShellConfiguration, context: ParseContext): Tasks.ShellConfiguration { + if (!is(config)) { + return undefined; + } + let result: ShellConfiguration = { executable: config.executable }; + if (config.args !== void 0) { + result.args = config.args.slice(); + } + return result; + } + + export function isEmpty(value: Tasks.ShellConfiguration): boolean { + return !value || value.executable === void 0 && (value.args === void 0 || value.args.length === 0); + } + + export function assignProperties(target: Tasks.ShellConfiguration, source: Tasks.ShellConfiguration): Tasks.ShellConfiguration { + if (isEmpty(source)) { + return target; + } + if (isEmpty(target)) { + return source; + } + assignProperty(target, source, 'executable'); + assignProperty(target, source, 'args'); + return target; + } + + export function fillProperties(target: Tasks.ShellConfiguration, source: Tasks.ShellConfiguration): Tasks.ShellConfiguration { + if (isEmpty(source)) { + return target; + } + if (isEmpty(target)) { + return source; + } + fillProperty(target, source, 'executable'); + fillProperty(target, source, 'args'); + return target; + } + + export function fillDefaults(value: Tasks.ShellConfiguration): void { + } + + export function freeze(value: Tasks.ShellConfiguration): void { + if (!value) { + return; + } + Object.freeze(value); + } +} + namespace CommandOptions { export function from(this: void, options: CommandOptions, context: ParseContext): Tasks.CommandOptions { let result: Tasks.CommandOptions = {}; @@ -371,23 +434,36 @@ namespace CommandOptions { return !value || value.cwd === void 0 && value.env === void 0 && value.shell === void 0; } - export function merge(target: Tasks.CommandOptions, source: Tasks.CommandOptions): Tasks.CommandOptions { + export function assignProperties(target: Tasks.CommandOptions, source: Tasks.CommandOptions): Tasks.CommandOptions { if (isEmpty(source)) { return target; } if (isEmpty(target)) { return source; } - mergeProperty(target, source, 'cwd'); + assignProperty(target, source, 'cwd'); if (target.env === void 0) { target.env = source.env; } else if (source.env !== void 0) { let env: { [key: string]: string; } = Object.create(null); Object.keys(target.env).forEach(key => env[key] = target.env[key]); - Object.keys(source.env).forEach(key => env[key = source.env[key]]); + Object.keys(source.env).forEach(key => env[key] = source.env[key]); target.env = env; } - target.shell = ShellConfiguration.merge(target.shell, source.shell); + target.shell = ShellConfiguration.assignProperties(target.shell, source.shell); + return target; + } + + export function fillProperties(target: Tasks.CommandOptions, source: Tasks.CommandOptions): Tasks.CommandOptions { + if (isEmpty(source)) { + return target; + } + if (isEmpty(target)) { + return source; + } + fillProperty(target, source, 'cwd'); + fillProperty(target, source, 'env'); + target.shell = ShellConfiguration.fillProperties(target.shell, source.shell); return target; } @@ -414,50 +490,6 @@ namespace CommandOptions { } } -namespace ShellConfiguration { - export function is(value: any): value is ShellConfiguration { - let candidate: ShellConfiguration = value; - return candidate && Types.isString(candidate.executable) && (candidate.args === void 0 || Types.isStringArray(candidate.args)); - } - - export function from(this: void, config: ShellConfiguration, context: ParseContext): Tasks.ShellConfiguration { - if (!is(config)) { - return undefined; - } - let result: ShellConfiguration = { executable: config.executable }; - if (config.args !== void 0) { - result.args = config.args.slice(); - } - return result; - } - - export function isEmpty(value: Tasks.ShellConfiguration): boolean { - return !value || value.executable === void 0 && (value.args === void 0 || value.args.length === 0); - } - - export function merge(target: Tasks.ShellConfiguration, source: Tasks.ShellConfiguration): Tasks.ShellConfiguration { - if (isEmpty(source)) { - return target; - } - if (isEmpty(target)) { - return source; - } - mergeProperty(target, source, 'executable'); - mergeProperty(target, source, 'args'); - return target; - } - - export function fillDefaults(value: Tasks.ShellConfiguration): void { - } - - export function freeze(value: Tasks.ShellConfiguration): void { - if (!value) { - return; - } - Object.freeze(value); - } -} - namespace CommandConfiguration { interface TerminalBehavior { echo?: boolean; @@ -474,6 +506,7 @@ namespace CommandConfiguration { showOutput?: string; terminal?: TerminalBehavior; taskSelector?: string; + suppressTaskName?: boolean; } interface CommandConfiguationShape extends BaseCommandConfiguationShape { @@ -506,15 +539,27 @@ namespace CommandConfiguration { return { echo, reveal }; } - export function merge(target: Tasks.TerminalBehavior, source: Tasks.TerminalBehavior): Tasks.TerminalBehavior { + export function assignProperties(target: Tasks.TerminalBehavior, source: Tasks.TerminalBehavior): Tasks.TerminalBehavior { if (isEmpty(source)) { return target; } if (isEmpty(target)) { return source; } - mergeProperty(target, source, 'echo'); - mergeProperty(target, source, 'reveal'); + assignProperty(target, source, 'echo'); + assignProperty(target, source, 'reveal'); + return target; + } + + export function fillProperties(target: Tasks.TerminalBehavior, source: Tasks.TerminalBehavior): Tasks.TerminalBehavior { + if (isEmpty(source)) { + return target; + } + if (isEmpty(target)) { + return source; + } + fillProperty(target, source, 'echo'); + fillProperty(target, source, 'reveal'); return target; } @@ -541,7 +586,7 @@ namespace CommandConfiguration { Object.freeze(value); } - function isEmpty(this: void, value: Tasks.TerminalBehavior): boolean { + export function isEmpty(this: void, value: Tasks.TerminalBehavior): boolean { return !value || value.echo === void 0 && value.reveal === void 0; } } @@ -558,9 +603,8 @@ namespace CommandConfiguration { osConfig = fromBase(config.linux, context); } if (osConfig) { - result = merge(result, osConfig); + result = assignProperties(result, osConfig); } - fillDefaults(result); return isEmpty(result) ? undefined : result; } @@ -605,11 +649,20 @@ namespace CommandConfiguration { if (Types.isString(config.taskSelector)) { result.taskSelector = config.taskSelector; } + if (Types.isBoolean(config.suppressTaskName)) { + result.suppressTaskName = config.suppressTaskName; + } return isEmpty(result) ? undefined : result; } export function isEmpty(value: Tasks.CommandConfiguration): boolean { - return !value || value.name === void 0 && value.type === void 0 && value.args === void 0 && CommandOptions.isEmpty(value.options) && value.terminalBehavior === void 0; + return !value || value.name === void 0 + && value.type === void 0 + && value.args === void 0 + && value.taskSelector === void 0 + && value.suppressTaskName === void 0 + && CommandOptions.isEmpty(value.options) + && TerminalBehavior.isEmpty(value.terminalBehavior); } export function onlyTerminalBehaviour(value: Tasks.CommandConfiguration): boolean { @@ -618,22 +671,17 @@ namespace CommandConfiguration { value.name === void 0 && value.type === void 0 && value.args === void 0 && CommandOptions.isEmpty(value.options); } - export function merge(target: Tasks.CommandConfiguration, source: Tasks.CommandConfiguration): Tasks.CommandConfiguration { + export function assignProperties(target: Tasks.CommandConfiguration, source: Tasks.CommandConfiguration): Tasks.CommandConfiguration { if (isEmpty(source)) { return target; } if (isEmpty(target)) { return source; } - mergeProperty(target, source, 'name'); - mergeProperty(target, source, 'type'); - // Merge isShellCommand - if (target.type === void 0) { - target.type = source.type; - } - - target.terminalBehavior = TerminalBehavior.merge(target.terminalBehavior, source.terminalBehavior); - mergeProperty(target, source, 'taskSelector'); + assignProperty(target, source, 'name'); + assignProperty(target, source, 'type'); + assignProperty(target, source, 'taskSelector'); + assignProperty(target, source, 'suppressTaskName'); if (source.args !== void 0) { if (target.args === void 0) { target.args = source.args; @@ -641,7 +689,40 @@ namespace CommandConfiguration { target.args = target.args.concat(source.args); } } - target.options = CommandOptions.merge(target.options, source.options); + target.terminalBehavior = TerminalBehavior.assignProperties(target.terminalBehavior, source.terminalBehavior); + target.options = CommandOptions.assignProperties(target.options, source.options); + return target; + } + + export function fillGlobals(target: Tasks.CommandConfiguration, source: Tasks.CommandConfiguration, taskName: string): Tasks.CommandConfiguration { + if (isEmpty(source)) { + return target; + } + target = target || { + name: undefined, + type: undefined, + terminalBehavior: undefined + }; + fillProperty(target, source, 'name'); + fillProperty(target, source, 'type'); + fillProperty(target, source, 'taskSelector'); + fillProperty(target, source, 'suppressTaskName'); + + target.terminalBehavior = TerminalBehavior.fillProperties(target.terminalBehavior, source.terminalBehavior); + target.options = CommandOptions.fillProperties(target.options, source.options); + + let args: string[] = source.args ? source.args.slice() : []; + if (!target.suppressTaskName) { + if (target.taskSelector !== void 0) { + args.push(target.taskSelector + taskName); + } else { + args.push(taskName); + } + } + if (target.args) { + args = args.concat(target.args); + } + target.args = args; return target; } @@ -653,11 +734,14 @@ namespace CommandConfiguration { value.type = Tasks.CommandType.Process; } value.terminalBehavior = TerminalBehavior.fillDefault(value.terminalBehavior); + if (!isEmpty(value)) { + value.options = CommandOptions.fillDefaults(value.options); + } if (value.args === void 0) { value.args = EMPTY_ARRAY; } - if (!isEmpty(value)) { - value.options = CommandOptions.fillDefaults(value.options); + if (value.suppressTaskName === void 0) { + value.suppressTaskName = false; } } @@ -771,7 +855,7 @@ namespace TaskDescription { export let source: Tasks.TaskSource = { kind: Tasks.TaskSourceKind.Workspace, label: 'Workspace', - detail: '.settins\tasks.json' + detail: '.settins\\tasks.json' }; export function from(this: void, tasks: TaskDescription[], globals: Globals, context: ParseContext): TaskParseResult { @@ -790,11 +874,7 @@ namespace TaskDescription { return; } let problemMatchers = ProblemMatcherConverter.from(externalTask.problemMatcher, context); - let command: Tasks.CommandConfiguration = externalTask.command !== void 0 - ? CommandConfiguration.from(externalTask, context) - : externalTask.echoCommand !== void 0 - ? { name: undefined, type: undefined, terminalBehavior: CommandConfiguration.TerminalBehavior.from(externalTask, context) } - : undefined; + let command: Tasks.CommandConfiguration = CommandConfiguration.from(externalTask, context); let identifer = Types.isString(externalTask.identifier) ? externalTask.identifier : taskName; let task: Tasks.Task = { _id: UUID.generateUuid(), @@ -804,9 +884,6 @@ namespace TaskDescription { identifier: identifer, command }; - if (externalTask.command === void 0 && Types.isStringArray(externalTask.args)) { - task.args = externalTask.args.slice(); - } if (externalTask.isWatching !== void 0) { task.isBackground = !!externalTask.isWatching; } @@ -829,9 +906,7 @@ namespace TaskDescription { if (externalTask.command !== void 0) { // if the task has its own command then we suppress the // task name by default. - task.suppressTaskName = true; - } else if (externalTask.suppressTaskName !== void 0) { - task.suppressTaskName = !!externalTask.suppressTaskName; + command.suppressTaskName = true; } if (externalTask.dependsOn !== void 0) { if (Types.isString(externalTask.dependsOn)) { @@ -848,7 +923,7 @@ namespace TaskDescription { annotatingTasks.push(task); return; } - mergeGlobals(task, globals); + fillGlobals(task, globals); fillDefaults(task); let addTask: boolean = true; if (context.engine === Tasks.ExecutionEngine.Terminal && task.command && task.command.name && task.command.type === Tasks.CommandType.Shell && task.command.args && task.command.args.length > 0) { @@ -901,7 +976,7 @@ namespace TaskDescription { }; } - export function mergeTasks(target: Tasks.Task[], source: Tasks.Task[]): Tasks.Task[] { + export function assignTasks(target: Tasks.Task[], source: Tasks.Task[]): Tasks.Task[] { if (source === void 0 || source.length === 0) { return target; } @@ -930,28 +1005,15 @@ namespace TaskDescription { return target; } - export function mergeGlobals(task: Tasks.Task, globals: Globals): void { + export function fillGlobals(task: Tasks.Task, globals: Globals): void { // We only merge a command from a global definition if there is no dependsOn if (task.dependsOn === void 0) { - if (CommandConfiguration.isEmpty(task.command) && !CommandConfiguration.isEmpty(globals.command) && globals.command.name !== void 0) { - task.command = globals.command; - } - if (CommandConfiguration.onlyTerminalBehaviour(task.command)) { - // The globals can have a echo set which would override the local echo - // Saves the need of a additional fill method. But might be necessary - // at some point. - let oldTerminal = Objects.clone(task.command.terminalBehavior); - CommandConfiguration.merge(task.command, globals.command); - task.command.terminalBehavior = oldTerminal; - } + task.command = CommandConfiguration.fillGlobals(task.command, globals.command, task.name); } // promptOnClose is inferred from isBackground if available if (task.promptOnClose === void 0 && task.isBackground === void 0 && globals.promptOnClose !== void 0) { task.promptOnClose = globals.promptOnClose; } - if (task.suppressTaskName === void 0 && globals.suppressTaskName !== void 0) { - task.suppressTaskName = globals.suppressTaskName; - } } export function mergeGlobalsIntoAnnnotation(task: Tasks.Task, globals: Globals): void { @@ -959,12 +1021,6 @@ namespace TaskDescription { export function fillDefaults(task: Tasks.Task): void { CommandConfiguration.fillDefaults(task.command); - if (task.args === void 0 && task.command === void 0) { - task.args = EMPTY_ARRAY; - } - if (task.suppressTaskName === void 0) { - task.suppressTaskName = false; - } if (task.promptOnClose === void 0) { task.promptOnClose = task.isBackground !== void 0 ? !task.isBackground : true; } @@ -1002,7 +1058,7 @@ namespace TaskDescription { return (task.command === void 0 || task.command.name === void 0) && (task.dependsOn === void 0 || task.dependsOn.length === 0); } - export function merge(target: Tasks.Task, source: Tasks.Task): Tasks.Task { + export function assignProperties(target: Tasks.Task, source: Tasks.Task): Tasks.Task { if (!target) { return source; } @@ -1010,14 +1066,12 @@ namespace TaskDescription { return target; } - mergeProperty(target, source, 'group'); - target.command = CommandConfiguration.merge(target.command, source.command); - mergeProperty(target, source, 'suppressTaskName'); - mergeProperty(target, source, 'args'); - mergeProperty(target, source, 'isBackground'); - mergeProperty(target, source, 'promptOnClose'); - mergeProperty(target, source, 'dependsOn'); - mergeProperty(target, source, 'problemMatchers'); + assignProperty(target, source, 'group'); + target.command = CommandConfiguration.assignProperties(target.command, source.command); + assignProperty(target, source, 'isBackground'); + assignProperty(target, source, 'promptOnClose'); + assignProperty(target, source, 'dependsOn'); + assignProperty(target, source, 'problemMatchers'); return target; } } @@ -1041,13 +1095,13 @@ namespace Globals { osGlobals = fromBase(config.linux, context); } if (osGlobals) { - result = Globals.merge(result, osGlobals); + result = Globals.assignProperties(result, osGlobals); } - Globals.fillDefaults(result); let command = CommandConfiguration.from(config, context); if (command) { result.command = command; } + Globals.fillDefaults(result); Globals.freeze(result); return result; } @@ -1067,15 +1121,15 @@ namespace Globals { return !value || value.command === void 0 && value.promptOnClose === void 0 && value.suppressTaskName === void 0; } - export function merge(target: Globals, source: Globals): Globals { + export function assignProperties(target: Globals, source: Globals): Globals { if (isEmpty(source)) { return target; } if (isEmpty(target)) { return source; } - mergeProperty(target, source, 'promptOnClose'); - mergeProperty(target, source, 'suppressTaskName'); + assignProperty(target, source, 'promptOnClose'); + assignProperty(target, source, 'suppressTaskName'); return target; } @@ -1083,6 +1137,7 @@ namespace Globals { if (!value) { return; } + CommandConfiguration.fillDefaults(value.command); if (value.suppressTaskName === void 0) { value.suppressTaskName = false; } @@ -1207,8 +1262,8 @@ class ConfigurationParser { result = TaskDescription.from(fileConfig.tasks, globals, context); } if (globalTasks) { - result.tasks = TaskDescription.mergeTasks(result.tasks, globalTasks.tasks); - result.annotatingTasks = TaskDescription.mergeTasks(result.annotatingTasks, globalTasks.annotatingTasks); + result.tasks = TaskDescription.assignTasks(result.tasks, globalTasks.tasks); + result.annotatingTasks = TaskDescription.assignTasks(result.annotatingTasks, globalTasks.annotatingTasks); } if ((!result.tasks || result.tasks.length === 0) && (globals.command && globals.command.name)) { @@ -1221,12 +1276,16 @@ class ConfigurationParser { name: globals.command.name, identifier: globals.command.name, group: Tasks.TaskGroup.Build, - command: undefined, + command: { + name: undefined, + type: undefined, + terminalBehavior: undefined, + suppressTaskName: true + }, isBackground: isBackground, - suppressTaskName: true, // this must be true since we infer the task from the global data. problemMatchers: matchers }; - TaskDescription.mergeGlobals(task, globals); + TaskDescription.fillGlobals(task, globals); TaskDescription.fillDefaults(task); result.tasks = [task]; } @@ -1241,7 +1300,7 @@ export function parse(configuration: ExternalTaskRunnerConfiguration, logger: IP } export function mergeTasks(target: Tasks.Task, source: Tasks.Task): Tasks.Task { - return TaskDescription.merge(target, source); + return TaskDescription.assignProperties(target, source); } /* diff --git a/src/vs/workbench/parts/tasks/common/tasks.ts b/src/vs/workbench/parts/tasks/common/tasks.ts index ab09f64407853..88dfd56ba739c 100644 --- a/src/vs/workbench/parts/tasks/common/tasks.ts +++ b/src/vs/workbench/parts/tasks/common/tasks.ts @@ -138,6 +138,12 @@ export interface CommandConfiguration { */ taskSelector?: string; + /** + * Whether to suppress the task name when merging global args + * + */ + suppressTaskName?: boolean; + /** * Describes how the terminal is supposed to behave. */ @@ -212,17 +218,6 @@ export interface Task { */ command: CommandConfiguration; - /** - * Suppresses the task name when calling the task using the task runner. - */ - suppressTaskName?: boolean; - - /** - * Additional arguments passed to the command when this target is - * invoked. - */ - args?: string[]; - /** * Whether the task is a background task or not. */ diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 317f79f6ef14f..f14e2e4bbc6c4 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -1091,10 +1091,7 @@ class TaskService extends EventEmitter implements ITaskService { return { config: result, hasErrors }; }); } else { - configPromise = new ProcessRunnerDetector(this.fileService, this.contextService, this.configurationResolverService).detect(true).then((value) => { - let hasErrors = this.printStderr(value.stderr); - return { config: value.config, hasErrors }; - }); + configPromise = TPromise.as({ config, hasErrors: false }); } } else { configPromise = TPromise.as({ config, hasErrors: false }); diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index 37cef5b6c85e0..6dbbc5b93a698 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -503,18 +503,6 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { private resolveCommandAndArgs(task: Task): { command: string, args: string[] } { // First we need to use the command args: let args: string[] = task.command.args ? task.command.args.slice() : []; - // We need to first pass the task name - if (!task.suppressTaskName) { - if (task.command.taskSelector) { - args.push(task.command.taskSelector + task.name); - } else { - args.push(task.name); - } - } - // And then additional arguments - if (task.args) { - args = args.concat(task.args); - } args = this.resolveVariables(args); let command: string = this.resolveVariable(task.command.name); return { command, args }; diff --git a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts index de4bc36b7f51b..0ac2c85e08ffb 100644 --- a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts @@ -162,18 +162,6 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem { } let args: string[] = commandConfig.args ? commandConfig.args.slice() : []; - // We need to first pass the task name - if (!task.suppressTaskName) { - if (commandConfig.taskSelector) { - args.push(commandConfig.taskSelector + task.name); - } else { - args.push(task.name); - } - } - // And then additional arguments - if (task.args) { - args = args.concat(task.args); - } args = this.resolveVariables(args); let command: string = this.resolveVariable(commandConfig.name); this.childProcess = new LineProcess(command, args, commandConfig.type === CommandType.Shell, this.resolveOptions(commandConfig.options)); diff --git a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts index 27dcb251cd0bd..a82a75b6e7c18 100644 --- a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts +++ b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts @@ -56,16 +56,25 @@ class ProblemReporter implements IProblemReporter { class ConfiguationBuilder { public result: Tasks.Task[]; + private builders: TaskBuilder[]; constructor() { this.result = []; + this.builders = []; } public task(name: string, command: string): TaskBuilder { let builder = new TaskBuilder(this, name, command); + this.builders.push(builder); this.result.push(builder.result); return builder; } + + public done(): void { + for (let builder of this.builders) { + builder.done(); + } + } } class TerminalBehaviorBuilder { @@ -85,6 +94,9 @@ class TerminalBehaviorBuilder { this.result.reveal = value; return this; } + + public done(): void { + } } class CommandConfigurationBuilder { @@ -101,7 +113,8 @@ class CommandConfigurationBuilder { options: { cwd: '${workspaceRoot}' }, - terminalBehavior: this.terminalBuilder.result + terminalBehavior: this.terminalBuilder.result, + suppressTaskName: false }; } @@ -130,9 +143,19 @@ class CommandConfigurationBuilder { return this; } + public suppressTaskName(value: boolean): CommandConfigurationBuilder { + this.result.suppressTaskName = value; + return this; + } + public terminal(): TerminalBehaviorBuilder { return this.terminalBuilder; } + + public done(taskName: string): void { + this.result.args = this.result.args.map(arg => arg === '$name' ? taskName : arg); + this.terminalBuilder.done(); + } } class TaskBuilder { @@ -149,7 +172,6 @@ class TaskBuilder { identifier: name, name: name, command: this.commandBuilder.result, - suppressTaskName: false, isBackground: false, promptOnClose: true, problemMatchers: [] @@ -166,16 +188,6 @@ class TaskBuilder { return this; } - public args(value: string[]): TaskBuilder { - this.result.args = value; - return this; - } - - public suppressTaskName(value: boolean): TaskBuilder { - this.result.suppressTaskName = value; - return this; - } - public isBackground(value: boolean): TaskBuilder { this.result.isBackground = value; return this; @@ -195,6 +207,10 @@ class TaskBuilder { public command(): CommandConfigurationBuilder { return this.commandBuilder; } + + public done(): void { + this.commandBuilder.done(this.result.name); + } } class ProblemMatcherBuilder { @@ -323,6 +339,7 @@ function testDefaultProblemMatcher(external: ExternalTaskRunnerConfiguration, re } function testConfiguration(external: ExternalTaskRunnerConfiguration, builder: ConfiguationBuilder): void { + builder.done(); let reporter = new ProblemReporter(); let result = parse(external, reporter); if (reporter.receivedMessage) { @@ -417,7 +434,6 @@ function assertTask(actual: Tasks.Task, expected: Tasks.Task) { assert.ok(actual._id); assert.strictEqual(actual.name, expected.name, 'name'); assertCommandConfiguration(actual.command, expected.command); - assert.strictEqual(actual.suppressTaskName, expected.suppressTaskName, 'suppressTaskName'); assert.strictEqual(actual.isBackground, expected.isBackground, 'isBackground'); assert.strictEqual(actual.promptOnClose, expected.promptOnClose, 'promptOnClose'); assert.strictEqual(typeof actual.problemMatchers, typeof expected.problemMatchers); @@ -435,6 +451,8 @@ function assertCommandConfiguration(actual: Tasks.CommandConfiguration, expected assertTerminalBehavior(actual.terminalBehavior, expected.terminalBehavior); assert.strictEqual(actual.name, expected.name, 'name'); assert.strictEqual(actual.type, expected.type, 'task type'); + assert.strictEqual(actual.suppressTaskName, expected.suppressTaskName, 'suppressTaskName'); + assert.strictEqual(actual.taskSelector, expected.taskSelector, 'taskSelector'); assert.deepEqual(actual.args, expected.args, 'args'); assert.strictEqual(typeof actual.options, typeof expected.options); if (actual.options && expected.options) { @@ -444,7 +462,6 @@ function assertCommandConfiguration(actual: Tasks.CommandConfiguration, expected assert.deepEqual(actual.options.env, expected.options.env, 'env'); } } - assert.strictEqual(actual.taskSelector, expected.taskSelector, 'taskSelector'); } } @@ -518,7 +535,7 @@ suite('Tasks version 0.1.0', () => { let builder = new ConfiguationBuilder(); builder.task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). - suppressTaskName(true); + command().suppressTaskName(true); testConfiguration( { version: '0.1.0', @@ -530,8 +547,7 @@ suite('Tasks version 0.1.0', () => { let builder = new ConfiguationBuilder(); builder.task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). - suppressTaskName(true). - command(). + command().suppressTaskName(true). type(Tasks.CommandType.Shell); testConfiguration( { @@ -547,8 +563,8 @@ suite('Tasks version 0.1.0', () => { builder. task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). - suppressTaskName(true). - command().terminal().reveal(Tasks.RevealKind.Silent); + command().suppressTaskName(true). + terminal().reveal(Tasks.RevealKind.Silent); testConfiguration( { version: '0.1.0', @@ -563,7 +579,7 @@ suite('Tasks version 0.1.0', () => { let builder = new ConfiguationBuilder(); builder.task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). - suppressTaskName(true); + command().suppressTaskName(true); testConfiguration( { version: '0.1.0', @@ -577,9 +593,9 @@ suite('Tasks version 0.1.0', () => { test('tasks: global promptOnClose', () => { let builder = new ConfiguationBuilder(); builder.task('tsc', 'tsc'). - suppressTaskName(true). group(Tasks.TaskGroup.Build). - promptOnClose(false); + promptOnClose(false). + command().suppressTaskName(true); testConfiguration( { version: '0.1.0', @@ -593,10 +609,10 @@ suite('Tasks version 0.1.0', () => { test('tasks: global promptOnClose default watching', () => { let builder = new ConfiguationBuilder(); builder.task('tsc', 'tsc'). - suppressTaskName(true). group(Tasks.TaskGroup.Build). isBackground(true). - promptOnClose(false); + promptOnClose(false). + command().suppressTaskName(true); testConfiguration( { version: '0.1.0', @@ -612,8 +628,8 @@ suite('Tasks version 0.1.0', () => { builder. task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). - suppressTaskName(true). - command().terminal().reveal(Tasks.RevealKind.Never); + command().suppressTaskName(true). + terminal().reveal(Tasks.RevealKind.Never); testConfiguration( { version: '0.1.0', @@ -629,8 +645,8 @@ suite('Tasks version 0.1.0', () => { builder. task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). - suppressTaskName(true). - command().terminal(). + command().suppressTaskName(true). + terminal(). echo(true); testConfiguration( { @@ -647,8 +663,7 @@ suite('Tasks version 0.1.0', () => { builder. task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). - suppressTaskName(true). - command(). + command().suppressTaskName(true). args(['--p']); testConfiguration( { @@ -667,8 +682,7 @@ suite('Tasks version 0.1.0', () => { builder. task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). - suppressTaskName(true). - command(). + command().suppressTaskName(true). options({ cwd: 'myPath' }); @@ -689,8 +703,7 @@ suite('Tasks version 0.1.0', () => { builder. task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). - suppressTaskName(true). - command(). + command().suppressTaskName(true). options({ cwd: '${workspaceRoot}', env: { key: 'value' } }); testConfiguration( { @@ -712,7 +725,7 @@ suite('Tasks version 0.1.0', () => { builder. task(name, name). group(Tasks.TaskGroup.Build). - suppressTaskName(true); + command().suppressTaskName(true); let external: ExternalTaskRunnerConfiguration = { version: '0.1.0', command: 'tsc', @@ -729,8 +742,7 @@ suite('Tasks version 0.1.0', () => { builder. task(name, name). group(Tasks.TaskGroup.Build). - suppressTaskName(true). - command(). + command().suppressTaskName(true). type(Tasks.CommandType.Shell); let external: ExternalTaskRunnerConfiguration = { version: '0.1.0', @@ -749,7 +761,7 @@ suite('Tasks version 0.1.0', () => { builder. task(name, name). group(Tasks.TaskGroup.Build). - suppressTaskName(true); + command().suppressTaskName(true); let external: ExternalTaskRunnerConfiguration = { version: '0.1.0', command: 'tsc', @@ -766,7 +778,7 @@ suite('Tasks version 0.1.0', () => { builder. task(name, name). group(Tasks.TaskGroup.Build). - suppressTaskName(true); + command().suppressTaskName(true); let external: ExternalTaskRunnerConfiguration = { version: '0.1.0', command: 'tsc', @@ -782,8 +794,8 @@ suite('Tasks version 0.1.0', () => { builder. task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). - suppressTaskName(true). - command().terminal().reveal(Platform.isWindows ? Tasks.RevealKind.Always : Tasks.RevealKind.Never); + command().suppressTaskName(true). + terminal().reveal(Platform.isWindows ? Tasks.RevealKind.Always : Tasks.RevealKind.Never); let external: ExternalTaskRunnerConfiguration = { version: '0.1.0', command: 'tsc', @@ -800,8 +812,8 @@ suite('Tasks version 0.1.0', () => { builder. task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). - suppressTaskName(true). - command().terminal(). + command().suppressTaskName(true). + terminal(). echo(Platform.isWindows ? false : true); let external: ExternalTaskRunnerConfiguration = { version: '0.1.0', @@ -843,7 +855,7 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskName', 'tsc'); + builder.task('taskName', 'tsc').command().args(['$name']); testConfiguration(external, builder); }); @@ -859,7 +871,7 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskName', 'tsc').group(Tasks.TaskGroup.Build); + builder.task('taskName', 'tsc').group(Tasks.TaskGroup.Build).command().args(['$name']); testConfiguration(external, builder); }); @@ -874,7 +886,7 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('build', 'tsc').group(Tasks.TaskGroup.Build); + builder.task('build', 'tsc').group(Tasks.TaskGroup.Build).command().args(['$name']); testConfiguration(external, builder); }); @@ -890,7 +902,7 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskName', 'tsc').group(Tasks.TaskGroup.Test); + builder.task('taskName', 'tsc').group(Tasks.TaskGroup.Test).command().args(['$name']); testConfiguration(external, builder); }); @@ -905,7 +917,7 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('test', 'tsc').group(Tasks.TaskGroup.Test); + builder.task('test', 'tsc').group(Tasks.TaskGroup.Test).command().args(['$name']); testConfiguration(external, builder); }); @@ -926,10 +938,10 @@ suite('Tasks version 0.1.0', () => { let builder = new ConfiguationBuilder(); builder.task('test', 'tsc'). group(Tasks.TaskGroup.Test). - args(['--p']). isBackground(true). promptOnClose(false). - command().terminal(). + command().args(['$name', '--p']). + terminal(). echo(true).reveal(Tasks.RevealKind.Never); testConfiguration(external, builder); @@ -950,7 +962,7 @@ suite('Tasks version 0.1.0', () => { let builder = new ConfiguationBuilder(); builder.task('test', 'tsc'). group(Tasks.TaskGroup.Test). - command().terminal(). + command().args(['$name']).terminal(). echo(true).reveal(Tasks.RevealKind.Never); testConfiguration(external, builder); @@ -972,7 +984,9 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskName', 'tsc').problemMatcher().pattern(/abc/); + builder.task('taskName', 'tsc'). + command().args(['$name']).parent. + problemMatcher().pattern(/abc/); testConfiguration(external, builder); }); @@ -992,7 +1006,9 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskName', 'tsc').problemMatcher().pattern(/.*/); + builder.task('taskName', 'tsc'). + command().args(['$name']).parent. + problemMatcher().pattern(/.*/); testConfiguration(external, builder); }); @@ -1016,7 +1032,9 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskName', 'tsc').problemMatcher(). + builder.task('taskName', 'tsc'). + command().args(['$name']).parent. + problemMatcher(). owner('myOwner'). applyTo(ApplyToKind.closedDocuments). severity(Severity.Warning). @@ -1043,7 +1061,9 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskName', 'tsc').problemMatcher(). + builder.task('taskName', 'tsc'). + command().args(['$name']).parent. + problemMatcher(). fileLocation(FileLocationKind.Relative). filePrefix('myPath'). pattern(/abc/); @@ -1071,7 +1091,9 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskName', 'tsc').problemMatcher(). + builder.task('taskName', 'tsc'). + command().args(['$name']).parent. + problemMatcher(). pattern(/abc/).file(10).message(11).location(12).severity(13).code(14); testConfiguration(external, builder); }); @@ -1100,7 +1122,9 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskName', 'tsc').problemMatcher(). + builder.task('taskName', 'tsc'). + command().args(['$name']).parent. + problemMatcher(). pattern(/abc/).file(10).message(11). line(12).character(13).endLine(14).endCharacter(15). severity(16).code(17); @@ -1118,7 +1142,9 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskName', 'tsc').promptOnClose(true); + builder.task('taskName', 'tsc'). + promptOnClose(true). + command().args(['$name']); testConfiguration(external, builder); }); @@ -1134,7 +1160,9 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskName', 'tsc').isBackground(true).promptOnClose(false); + builder.task('taskName', 'tsc'). + isBackground(true).promptOnClose(false). + command().args(['$name']); testConfiguration(external, builder); }); @@ -1150,7 +1178,9 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskName', 'tsc').promptOnClose(false); + builder.task('taskName', 'tsc'). + promptOnClose(false). + command().args(['$name']); testConfiguration(external, builder); }); @@ -1158,7 +1188,7 @@ suite('Tasks version 0.1.0', () => { let external: ExternalTaskRunnerConfiguration = { version: '0.1.0', command: 'tsc', - taskSelector: '/t', + taskSelector: '/t:', tasks: [ { taskName: 'taskName', @@ -1168,7 +1198,8 @@ suite('Tasks version 0.1.0', () => { let builder = new ConfiguationBuilder(); builder.task('taskName', 'tsc'). command(). - taskSelector('/t'); + taskSelector('/t:'). + args(['/t:taskName']); testConfiguration(external, builder); }); @@ -1186,11 +1217,11 @@ suite('Tasks version 0.1.0', () => { }; let builder = new ConfiguationBuilder(); builder.task('taskName', 'tsc'). - suppressTaskName(true); + command().suppressTaskName(true); testConfiguration(external, builder); }); - test('tasks: suppress task name inerit', () => { + test('tasks: suppress task name inherit', () => { let external: ExternalTaskRunnerConfiguration = { version: '0.1.0', command: 'tsc', @@ -1203,7 +1234,7 @@ suite('Tasks version 0.1.0', () => { }; let builder = new ConfiguationBuilder(); builder.task('taskName', 'tsc'). - suppressTaskName(true); + command().suppressTaskName(true); testConfiguration(external, builder); }); @@ -1221,8 +1252,10 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskNameOne', 'tsc'); - builder.task('taskNameTwo', 'tsc'); + builder.task('taskNameOne', 'tsc'). + command().args(['$name']); + builder.task('taskNameTwo', 'tsc'). + command().args(['$name']); testConfiguration(external, builder); }); @@ -1237,7 +1270,7 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskNameOne', 'tsc').suppressTaskName(true); + builder.task('taskNameOne', 'tsc').command().suppressTaskName(true); testConfiguration(external, builder); }); @@ -1256,8 +1289,8 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskNameOne', 'tsc').suppressTaskName(true); - builder.task('taskNameTwo', 'dir').suppressTaskName(true); + builder.task('taskNameOne', 'tsc').command().suppressTaskName(true); + builder.task('taskNameTwo', 'dir').command().suppressTaskName(true); testConfiguration(external, builder); }); @@ -1280,7 +1313,7 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskNameOne', 'tsc').suppressTaskName(true).command(). + builder.task('taskNameOne', 'tsc').command().suppressTaskName(true). type(Tasks.CommandType.Shell).args(['arg']).options({ cwd: 'cwd', env: { env: 'env' } }); testConfiguration(external, builder); }); @@ -1300,7 +1333,7 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskNameOne', name).suppressTaskName(true); + builder.task('taskNameOne', name).command().suppressTaskName(true); testConfiguration(external, builder); }); @@ -1320,7 +1353,7 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('tsc', 'tsc').suppressTaskName(true).command().args(args); + builder.task('tsc', 'tsc').command().suppressTaskName(true).args(args); testConfiguration(external, builder); }); @@ -1340,7 +1373,7 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('tsc', 'tsc').suppressTaskName(true).command().args(args); + builder.task('tsc', 'tsc').command().suppressTaskName(true).args(args); testConfiguration(external, builder); }); @@ -1356,7 +1389,42 @@ suite('Tasks version 0.1.0', () => { ] }; let builder = new ConfiguationBuilder(); - builder.task('taskNameOne', 'tsc').command().type(Tasks.CommandType.Process); + builder.task('taskNameOne', 'tsc').command().type(Tasks.CommandType.Shell).args(['$name']); + testConfiguration(external, builder); + }); + + test('tasks: global and tasks args', () => { + let external: ExternalTaskRunnerConfiguration = { + version: '0.1.0', + command: 'tsc', + args: ['global'], + tasks: [ + { + taskName: 'taskNameOne', + args: ['local'] + } + ] + }; + let builder = new ConfiguationBuilder(); + builder.task('taskNameOne', 'tsc').command().args(['global', '$name', 'local']); + testConfiguration(external, builder); + }); + + test('tasks: global and tasks args with task selector', () => { + let external: ExternalTaskRunnerConfiguration = { + version: '0.1.0', + command: 'tsc', + args: ['global'], + taskSelector: '/t:', + tasks: [ + { + taskName: 'taskNameOne', + args: ['local'] + } + ] + }; + let builder = new ConfiguationBuilder(); + builder.task('taskNameOne', 'tsc').command().taskSelector('/t:').args(['global', '/t:taskNameOne', 'local']); testConfiguration(external, builder); }); }); @@ -1376,9 +1444,9 @@ suite('Tasks version 2.0.0', () => { }; let builder = new ConfiguationBuilder(); builder.task('dir', 'dir'). - suppressTaskName(true). group(Tasks.TaskGroup.Build). - command().type(Tasks.CommandType.Shell); + command().suppressTaskName(true). + type(Tasks.CommandType.Shell); testConfiguration(external, builder); }); @@ -1436,16 +1504,16 @@ suite('Bugs / regression tests', () => { let builder = new ConfiguationBuilder(); if (Platform.isWindows) { builder.task('composeForDebug', 'powershell'). - suppressTaskName(true). + command().suppressTaskName(true). args(['-ExecutionPolicy', 'RemoteSigned', '.\\dockerTask.ps1', '-ComposeForDebug', '-Environment', 'debug']). - command().options({ cwd: '${workspaceRoot}' }). + options({ cwd: '${workspaceRoot}' }). terminal().echo(true).reveal(Tasks.RevealKind.Always); testConfiguration(external, builder); } else if (Platform.isMacintosh) { builder.task('composeForDebug', '/bin/bash'). - suppressTaskName(true). + command().suppressTaskName(true). args(['-c', './dockerTask.sh composeForDebug debug']). - command().options({ cwd: '${workspaceRoot}' }). + options({ cwd: '${workspaceRoot}' }). terminal().reveal(Tasks.RevealKind.Always); testConfiguration(external, builder); } From fbdbd2dda223ecfe43d9524c68935df0897a8fe6 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Wed, 31 May 2017 15:55:26 -0700 Subject: [PATCH 1416/2747] node-debug2@1.13.1 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index e73e03c311de3..942bb3847e38e 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -43,7 +43,7 @@ const nodeModules = ['electron', 'original-fs'] const builtInExtensions = [ { name: 'ms-vscode.node-debug', version: '1.13.7' }, - { name: 'ms-vscode.node-debug2', version: '1.13.0' } + { name: 'ms-vscode.node-debug2', version: '1.13.1' } ]; const vscodeEntryPoints = _.flatten([ From f8c01e91a9f3af4cdaf2d1cc272b6edaf099a6e8 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 31 May 2017 17:31:56 -0700 Subject: [PATCH 1417/2747] Update distro for #24538 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bfc4fed85751e..0c8f77e4dba1b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev", "version": "1.13.0", "electronVersion": "1.6.6", - "distro": "20d9b7ca9af07894c19dbabde24c7c954510fb5b", + "distro": "6a21d9ea82740d478d8b3fb72ec2a63d27b8a29c", "author": { "name": "Microsoft Corporation" }, From 5fe794bdb0fbae757612c611120e9b7180705254 Mon Sep 17 00:00:00 2001 From: Daniel Ye Date: Wed, 31 May 2017 17:40:04 -0700 Subject: [PATCH 1418/2747] 2017-05-31. Merged in translations from transifex. --- .../markdown/out/extension.i18n.json | 4 +++- .../out/codelensProvider.i18n.json | 4 +--- .../out/commandHandler.i18n.json | 1 + .../out/mergeDecorator.i18n.json | 3 ++- .../merge-conflict/package.i18n.json | 8 ++++---- .../out/utils/typingsStatus.i18n.json | 1 - .../extensions/typescript/package.i18n.json | 4 ++-- .../resourceviewer/resourceViewer.i18n.json | 1 + .../src/vs/code/electron-main/menus.i18n.json | 2 +- .../config/commonEditorConfig.i18n.json | 3 +++ .../common/view/editorColorRegistry.i18n.json | 6 +++++- .../browser/accessibility.i18n.json | 6 +++--- .../common/caretOperations.i18n.json | 4 ++-- .../format/browser/formatActions.i18n.json | 8 ++++---- .../browser/goToDeclarationCommands.i18n.json | 19 ++++++++++++++++++- .../browser/goToDeclarationMouse.i18n.json | 4 +++- .../common/linesOperations.i18n.json | 2 +- .../contrib/links/browser/links.i18n.json | 1 + .../common/toggleTabFocusMode.i18n.json | 2 +- .../common/keybindingLabels.i18n.json | 4 ++-- .../theme/common/colorRegistry.i18n.json | 9 +++++++-- .../workbench/api/node/extHostTask.i18n.json | 6 ++++++ .../parts/editor/editorStatus.i18n.json | 1 + .../src/vs/workbench/common/theme.i18n.json | 9 ++++++--- .../electron-browser/workbench.i18n.json | 5 ++++- .../electron-browser/debugService.i18n.json | 2 +- .../statusbarColorProvider.i18n.json | 3 ++- .../browser/extensionsActions.i18n.json | 9 ++++++++- .../extensionsUtils.i18n.json | 2 ++ .../browser/files.contribution.i18n.json | 1 + .../keybindingsEditorContribution.i18n.json | 1 - .../dirtydiffDecorator.i18n.json | 6 +++++- .../electron-browser/TMSnippets.i18n.json | 3 ++- .../parts/tasks/browser/quickOpen.i18n.json | 4 +--- .../tasks/common/taskConfiguration.i18n.json | 3 +-- .../electron-browser/jsonSchema_v2.i18n.json | 9 ++++----- .../electron-browser/welcomePage.i18n.json | 6 ++---- .../out/codelensProvider.i18n.json | 7 +------ .../out/commandHandler.i18n.json | 2 ++ .../merge-conflict/package.i18n.json | 11 ++--------- .../out/utils/typingsStatus.i18n.json | 1 - .../extensions/typescript/package.i18n.json | 5 ++++- .../resourceviewer/resourceViewer.i18n.json | 1 + .../src/vs/code/electron-main/menus.i18n.json | 2 +- .../config/commonEditorConfig.i18n.json | 1 + .../common/view/editorColorRegistry.i18n.json | 6 +++++- ...guageConfigurationExtensionPoint.i18n.json | 2 ++ .../workbench/api/node/extHostTask.i18n.json | 6 ++++++ .../src/vs/workbench/common/theme.i18n.json | 3 --- .../electron-browser/workbench.i18n.json | 5 ++++- .../electron-browser/debugService.i18n.json | 2 +- .../keybindingsEditorContribution.i18n.json | 1 - .../parts/tasks/browser/quickOpen.i18n.json | 4 +--- .../tasks/common/taskConfiguration.i18n.json | 3 +-- .../electron-browser/jsonSchema_v2.i18n.json | 9 ++++----- .../task.contribution.i18n.json | 1 + .../vs_code_welcome_page.i18n.json | 2 ++ .../electron-browser/welcomePage.i18n.json | 3 +-- .../configurationEditingService.i18n.json | 7 ++++++- .../deu/extensions/git/out/commands.i18n.json | 3 +++ i18n/deu/extensions/git/package.i18n.json | 1 + i18n/deu/extensions/jake/out/main.i18n.json | 4 +++- i18n/deu/extensions/jake/package.i18n.json | 4 +++- .../markdown/out/extension.i18n.json | 4 +++- .../out/commandHandler.i18n.json | 5 ++++- .../merge-conflict/package.i18n.json | 6 +++++- i18n/deu/extensions/npm/package.i18n.json | 4 +++- .../out/utils/typingsStatus.i18n.json | 1 - .../extensions/typescript/package.i18n.json | 5 +++-- .../resourceviewer/resourceViewer.i18n.json | 1 + .../src/vs/code/electron-main/menus.i18n.json | 3 ++- .../config/commonEditorConfig.i18n.json | 1 + .../contrib/links/browser/links.i18n.json | 1 + .../suggest/browser/suggestWidget.i18n.json | 1 + .../workbench/api/node/extHostTask.i18n.json | 6 ++++++ .../api/node/extHostTreeViews.i18n.json | 5 ++++- .../src/vs/workbench/common/theme.i18n.json | 3 --- .../electron-browser/workbench.i18n.json | 5 ++++- .../electron-browser/debugService.i18n.json | 2 +- .../electronDebugActions.i18n.json | 1 + .../performance.contribution.i18n.json | 3 ++- .../keybindingsEditorContribution.i18n.json | 1 - .../browser/commandsHandler.i18n.json | 1 + .../tasks/common/taskConfiguration.i18n.json | 3 +-- .../electron-browser/jsonSchema_v2.i18n.json | 9 ++++----- .../vs_code_welcome_page.i18n.json | 3 +++ .../electron-browser/welcomePage.i18n.json | 4 ++++ .../out/codelensProvider.i18n.json | 7 +------ .../out/commandHandler.i18n.json | 1 - .../merge-conflict/package.i18n.json | 8 -------- .../out/utils/typingsStatus.i18n.json | 1 - .../extensions/typescript/package.i18n.json | 1 - .../src/vs/code/electron-main/menus.i18n.json | 2 +- .../theme/common/colorRegistry.i18n.json | 1 - .../workbench/api/node/extHostTask.i18n.json | 6 ++++++ .../src/vs/workbench/common/theme.i18n.json | 3 --- .../electron-browser/workbench.i18n.json | 5 ++++- .../electron-browser/debugService.i18n.json | 2 +- .../keybindingsEditorContribution.i18n.json | 1 - .../parts/tasks/browser/quickOpen.i18n.json | 4 +--- .../tasks/common/taskConfiguration.i18n.json | 3 +-- .../electron-browser/jsonSchema_v2.i18n.json | 9 ++++----- .../electron-browser/welcomePage.i18n.json | 4 +--- .../out/utils/typingsStatus.i18n.json | 1 - .../extensions/typescript/package.i18n.json | 3 +-- .../src/vs/code/electron-main/menus.i18n.json | 2 +- .../workbench/api/node/extHostTask.i18n.json | 6 ++++++ .../src/vs/workbench/common/theme.i18n.json | 3 --- .../electron-browser/workbench.i18n.json | 5 ++++- .../electron-browser/debugService.i18n.json | 2 +- .../keybindingsEditorContribution.i18n.json | 1 - .../tasks/common/taskConfiguration.i18n.json | 3 +-- .../electron-browser/jsonSchema_v2.i18n.json | 9 ++++----- .../ita/extensions/git/out/commands.i18n.json | 3 +++ i18n/ita/extensions/git/package.i18n.json | 1 + i18n/ita/extensions/jake/out/main.i18n.json | 4 +++- i18n/ita/extensions/jake/package.i18n.json | 4 +++- .../markdown/out/extension.i18n.json | 4 +++- .../out/commandHandler.i18n.json | 7 ++++++- .../out/mergeDecorator.i18n.json | 5 ++++- .../merge-conflict/package.i18n.json | 8 +++++++- i18n/ita/extensions/npm/package.i18n.json | 4 +++- .../out/utils/typingsStatus.i18n.json | 1 - .../extensions/typescript/package.i18n.json | 5 +++-- .../resourceviewer/resourceViewer.i18n.json | 1 + .../src/vs/code/electron-main/menus.i18n.json | 2 +- .../config/commonEditorConfig.i18n.json | 3 +++ .../common/view/editorColorRegistry.i18n.json | 6 +++++- .../contrib/links/browser/links.i18n.json | 1 + .../theme/common/colorRegistry.i18n.json | 9 +++++++-- .../workbench/api/node/extHostTask.i18n.json | 6 ++++++ .../src/vs/workbench/common/theme.i18n.json | 3 --- .../electron-browser/workbench.i18n.json | 5 ++++- .../electron-browser/debugService.i18n.json | 2 +- .../performance.contribution.i18n.json | 4 +++- .../keybindingsEditorContribution.i18n.json | 1 - .../scm.contribution.i18n.json | 1 + .../tasks/common/taskConfiguration.i18n.json | 3 +-- .../electron-browser/jsonSchema_v2.i18n.json | 9 ++++----- .../themes.contribution.i18n.json | 1 + .../configurationEditingService.i18n.json | 7 ++++++- .../out/codelensProvider.i18n.json | 4 +--- .../out/commandHandler.i18n.json | 1 + .../out/mergeDecorator.i18n.json | 3 ++- .../merge-conflict/package.i18n.json | 8 ++++---- .../out/utils/typingsStatus.i18n.json | 1 - .../extensions/typescript/package.i18n.json | 4 ++-- .../src/vs/code/electron-main/menus.i18n.json | 2 +- .../config/commonEditorConfig.i18n.json | 3 +++ .../gotoError/browser/gotoError.i18n.json | 3 +-- .../theme/common/colorRegistry.i18n.json | 1 - .../workbench/api/node/extHostTask.i18n.json | 6 ++++++ .../parts/editor/editorStatus.i18n.json | 1 + .../src/vs/workbench/common/theme.i18n.json | 9 ++++++--- .../electron-browser/workbench.i18n.json | 5 ++++- .../electron-browser/debugService.i18n.json | 2 +- .../browser/extensionsActions.i18n.json | 9 ++++++--- .../extensionsUtils.i18n.json | 2 ++ .../keybindingsEditorContribution.i18n.json | 1 - .../dirtydiffDecorator.i18n.json | 6 +++++- .../parts/tasks/browser/quickOpen.i18n.json | 4 +--- .../tasks/common/taskConfiguration.i18n.json | 3 +-- .../electron-browser/jsonSchema_v2.i18n.json | 9 ++++----- .../electron-browser/welcomePage.i18n.json | 4 +--- .../out/utils/typingsStatus.i18n.json | 1 - .../extensions/typescript/package.i18n.json | 3 +-- .../src/vs/code/electron-main/menus.i18n.json | 2 +- .../workbench/api/node/extHostTask.i18n.json | 6 ++++++ .../src/vs/workbench/common/theme.i18n.json | 3 --- .../electron-browser/workbench.i18n.json | 5 ++++- .../electron-browser/debugService.i18n.json | 2 +- .../keybindingsEditorContribution.i18n.json | 1 - .../tasks/common/taskConfiguration.i18n.json | 3 +-- .../electron-browser/jsonSchema_v2.i18n.json | 9 ++++----- .../out/settingsDocumentHelper.i18n.json | 4 ++-- .../out/codelensProvider.i18n.json | 7 +------ .../out/commandHandler.i18n.json | 1 - .../merge-conflict/package.i18n.json | 8 -------- .../out/utils/typingsStatus.i18n.json | 1 - .../extensions/typescript/package.i18n.json | 4 ++-- .../src/vs/code/electron-main/menus.i18n.json | 4 ++-- .../config/commonEditorConfig.i18n.json | 1 - .../theme/common/colorRegistry.i18n.json | 9 +++++++-- .../workbench/api/node/extHostTask.i18n.json | 6 ++++++ .../src/vs/workbench/common/theme.i18n.json | 3 --- .../electron-browser/workbench.i18n.json | 5 ++++- .../electron-browser/debugService.i18n.json | 2 +- .../emmet.contribution.i18n.json | 3 +-- .../extensionsUtils.i18n.json | 1 + .../keybindingsEditorContribution.i18n.json | 1 - .../dirtydiffDecorator.i18n.json | 6 +++++- .../parts/tasks/browser/quickOpen.i18n.json | 4 +--- .../tasks/common/taskConfiguration.i18n.json | 3 +-- .../electron-browser/jsonSchema_v2.i18n.json | 9 ++++----- .../electron-browser/welcomePage.i18n.json | 4 +--- .../out/utils/typingsStatus.i18n.json | 1 - .../extensions/typescript/package.i18n.json | 3 +-- .../src/vs/code/electron-main/menus.i18n.json | 2 +- .../workbench/api/node/extHostTask.i18n.json | 6 ++++++ .../src/vs/workbench/common/theme.i18n.json | 3 --- .../electron-browser/workbench.i18n.json | 5 ++++- .../electron-browser/debugService.i18n.json | 2 +- .../keybindingsEditorContribution.i18n.json | 1 - .../tasks/common/taskConfiguration.i18n.json | 3 +-- .../electron-browser/jsonSchema_v2.i18n.json | 9 ++++----- 205 files changed, 469 insertions(+), 321 deletions(-) create mode 100644 i18n/chs/src/vs/workbench/api/node/extHostTask.i18n.json create mode 100644 i18n/cht/src/vs/workbench/api/node/extHostTask.i18n.json create mode 100644 i18n/deu/src/vs/workbench/api/node/extHostTask.i18n.json create mode 100644 i18n/esn/src/vs/workbench/api/node/extHostTask.i18n.json create mode 100644 i18n/fra/src/vs/workbench/api/node/extHostTask.i18n.json create mode 100644 i18n/ita/src/vs/workbench/api/node/extHostTask.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/api/node/extHostTask.i18n.json create mode 100644 i18n/kor/src/vs/workbench/api/node/extHostTask.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/api/node/extHostTask.i18n.json create mode 100644 i18n/rus/src/vs/workbench/api/node/extHostTask.i18n.json diff --git a/i18n/chs/extensions/markdown/out/extension.i18n.json b/i18n/chs/extensions/markdown/out/extension.i18n.json index 8b6ad71cd4e6d..111330fed75d9 100644 --- a/i18n/chs/extensions/markdown/out/extension.i18n.json +++ b/i18n/chs/extensions/markdown/out/extension.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "onPreviewStyleLoadError": "无法加载“markdown.styles”:{0}" +} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json index 3590523ef879c..8b6ad71cd4e6d 100644 --- a/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "acceptCurrentChange": "采用当前更改" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json index 996cf7276b845..b6f2dae32e960 100644 --- a/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "cursorNotInConflict": "编辑器光标不在合并冲突内", + "cursorOnSplitterRange": "编辑器光标在合并冲突分割线上,请将其移动至“当前”或“传入”区域中", "noConflicts": "没有在此文件中找到合并冲突", "noOtherConflictsInThisFile": "此文件中没有其他合并冲突了" } \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json index feac7a236d88d..6fb9fc93479d3 100644 --- a/i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json +++ b/i18n/chs/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "currentChange": "(当前更改)" + "currentChange": "(当前更改)", + "incomingChange": "(传入的更改)" } \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/package.i18n.json b/i18n/chs/extensions/merge-conflict/package.i18n.json index 82e4bc5846357..7ed47cfef74aa 100644 --- a/i18n/chs/extensions/merge-conflict/package.i18n.json +++ b/i18n/chs/extensions/merge-conflict/package.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "command.category": "合并冲突", - "command.next": "下一个冲突", - "command.previous": "上一个冲突", - "command.compare": "比较当前冲突", - "config.title": "合并冲突" + "command.accept.both": "保留两者", + "config.title": "合并冲突", + "config.codeLensEnabled": "启用/禁用编辑器内合并冲突区域的 CodeLens", + "config.decoratorsEnabled": "启用/禁用编辑器内的合并冲突修饰器" } \ No newline at end of file diff --git a/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json index 01709f2e6d3d3..f6ee369cc4082 100644 --- a/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,7 +5,6 @@ // Do not edit this file. It is machine generated. { "installingPackages": "提取数据以实现更好的 TypeScript IntelliSense", - "typesInstallerInitializationFailed.title": "无法为 JavaScript 语言功能安装 typings 文件。请确认 NPM 已经安装且位于 PATH 中", "typesInstallerInitializationFailed.moreInformation": "详细信息", "typesInstallerInitializationFailed.doNotCheckAgain": "不要再次检查", "typesInstallerInitializationFailed.close": "关闭" diff --git a/i18n/chs/extensions/typescript/package.i18n.json b/i18n/chs/extensions/typescript/package.i18n.json index e9bd0e95be067..e5267352ece10 100644 --- a/i18n/chs/extensions/typescript/package.i18n.json +++ b/i18n/chs/extensions/typescript/package.i18n.json @@ -41,6 +41,6 @@ "typescript.selectTypeScriptVersion.title": "选择 TypeScript 版本", "jsDocCompletion.enabled": "启用/禁用自动 JSDoc 注释", "javascript.implicitProjectConfig.checkJs": "启用/禁用 JavaScript 文件的语义检查。现有的 jsconfig.json 或\n tsconfig.json 文件会覆盖此设置。要求 TypeScript >=2.3.1。", - "typescript.check.npmIsInstalled": "检查是否安装了 NPM 以进行自动 typings 获取", - "javascript.nameSuggestions": "启用/禁用在 JavaScript 建议列表中包含文件中的唯一名称。" + "javascript.nameSuggestions": "启用/禁用在 JavaScript 建议列表中包含文件中的唯一名称。", + "typescript.tsc.autoDetect": "控制自动检测 tsc 任务是否打开。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index 4e5bf82d935ab..883b4c5cbca44 100644 --- a/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/chs/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,6 +6,7 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "图像太大,无法在编辑器中显示。 ", + "resourceOpenExternalButton": "使用外部程序打开图片?", "nativeBinaryError": "文件将不在编辑器中显示,因为它是二进制文件、非常大或使用不支持的文本编码。", "sizeB": "{0} B", "sizeKB": "{0} KB", diff --git a/i18n/chs/src/vs/code/electron-main/menus.i18n.json b/i18n/chs/src/vs/code/electron-main/menus.i18n.json index 4f7e61e056c44..10d2dd072d7de 100644 --- a/i18n/chs/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/chs/src/vs/code/electron-main/menus.i18n.json @@ -153,12 +153,12 @@ "miLicense": "查看许可证(&&L)", "miPrivacyStatement": "隐私声明(&&P)", "miAbout": "关于(&&A)", + "accessibilityOptionsWindowTitle": "辅助功能选项", "miRestartToUpdate": "重启以更新...", "miCheckingForUpdates": "正在检查更新...", "miDownloadUpdate": "下载可用更新", "miDownloadingUpdate": "正在下载更新...", "miInstallingUpdate": "正在安装更新...", - "miCheckForUpdates": "检查更新...", "aboutDetail": "\n版本 {0}\n提交 {1}\n日期 {2}\nShell {3}\n渲染器 {4}\nNode {5}", "okButton": "确定" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json index 5c4e0b1ea13b1..9943fbbaa8ac5 100644 --- a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -23,6 +23,8 @@ "minimap.enabled": "控制是否显示 minimap", "minimap.renderCharacters": "呈现某行上的实际字符(与颜色块相反)", "minimap.maxColumn": "限制最小映射的宽度,尽量多地呈现特定数量的列", + "find.seedSearchStringFromSelection": "控制是否将编辑器的选中内容作为搜索词填入到查找组件", + "find.autoFindInSelection": "控制当编辑器中选中多个字符或多行文字时是否开启“在选定内容中查找”选项 ", "wordWrap.off": "永不换行。", "wordWrap.on": "将在视区宽度处换行。", "wordWrap.wordWrapColumn": "将在 \"editor.wordWrapColumn\" 处换行。", @@ -41,6 +43,7 @@ "formatOnType": "控制编辑器是否应在键入后自动设置行的格式", "formatOnPaste": "控制编辑器是否应自动设置粘贴内容的格式。格式化程序必须可用并且能设置文档中某一范围的格式。", "suggestOnTriggerCharacters": "控制键入触发器字符时是否应自动显示建议", + "acceptSuggestionOnEnter": "控制按“Enter”键是否像按“Tab”键一样接受建议。这能帮助避免“插入新行”和“接受建议”之间的歧义。值为“smart”时表示,仅当文字改变时,按“Enter”键才能接受建议", "acceptSuggestionOnCommitCharacter": "控制是否应在遇到提交字符时接受建议。例如,在 JavaScript 中,分号(\";\")可以为提交字符,可接受建议并键入该字符。", "snippetSuggestions": "控制是否将代码段与其他建议一起显示以及它们的排序方式。", "emptySelectionClipboard": "控制没有选择内容的复制是否复制当前行。", diff --git a/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json index dc0edc0650c54..26da122b2d855 100644 --- a/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/chs/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -16,5 +16,9 @@ "editorBracketMatchBackground": "匹配括号的背景色", "editorBracketMatchBorder": "匹配括号外框颜色", "editorOverviewRulerBorder": "概览标尺边框的颜色。", - "editorGutter": "编辑器导航线的背景色。导航线包括边缘符号和行号。" + "editorGutter": "编辑器导航线的背景色。导航线包括边缘符号和行号。", + "errorForeground": "编辑器中错误波浪线的前景色。", + "errorBorder": "编辑器中错误波浪线的边框颜色。", + "warningForeground": "编辑器中警告波浪线的前景色。", + "warningBorder": "编辑器中警告波浪线的边框颜色。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json b/i18n/chs/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json index 714861ecdf6eb..94299c46f7be8 100644 --- a/i18n/chs/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/accessibility/browser/accessibility.i18n.json @@ -6,10 +6,10 @@ { "introMsg": "感谢试用 VS Code 的辅助功能选项。", "status": "状态:", - "tabFocusModeOnMsg": "在当前编辑器中按 Tab 会将焦点移动到下一个可聚焦的元素。通过按 {0} 切换此行为。", + "tabFocusModeOnMsg": "在当前编辑器中按 Tab 会将焦点移动到下一个可聚焦的元素。按 {0} 来切换此行为。", "tabFocusModeOnMsgNoKb": "在当前编辑器中按 Tab 会将焦点移动到下一个可聚焦的元素。当前无法通过键绑定触发命令 {0}。", - "tabFocusModeOffMsg": "在当前编辑器中按 Tab 将插入制表符。通过按 {0} 切换此行为。", + "tabFocusModeOffMsg": "在当前编辑器中按 Tab 将插入制表符。按 {0} 来切换此行为。", "tabFocusModeOffMsgNoKb": "在当前编辑器中按 Tab 会插入制表符。当前无法通过键绑定触发命令 {0}。", - "outroMsg": "可以通过按 Esc 消除此工具提示并返回到编辑器。", + "outroMsg": "你可以按 Esc 键来消除此提示并返回到编辑器。", "ShowAccessibilityHelpAction": "显示辅助功能帮助" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json b/i18n/chs/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json index 11871e98a8070..3e76231776688 100644 --- a/i18n/chs/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "caret.moveLeft": "将脱字号向左移", - "caret.moveRight": "将脱字号向右移" + "caret.moveLeft": "将插入点左移", + "caret.moveRight": "将插入点右移" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/chs/src/vs/editor/contrib/format/browser/formatActions.i18n.json index d1fd1741e7486..e1cac08643457 100644 --- a/i18n/chs/src/vs/editor/contrib/format/browser/formatActions.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "hint11": "Made 1 formatting edit on line {0}", - "hintn1": "Made {0} formatting edits on line {1}", - "hint1n": "Made 1 formatting edit between lines {0} and {1}", + "hint11": "在第 {0} 行作出1 次格式编辑", + "hintn1": "在第 {1} 行进行了 {0} 次格式编辑", + "hint1n": "第 {0} 行到第 {1} 行间进行了 1 次格式编辑", "hintnn": "Made {0} formatting edits between lines {1} and {2}", "formatDocument.label": "Format Document", - "formatSelection.label": "Format Selection" + "formatSelection.label": "格式化选定代码" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json index 8b6ad71cd4e6d..e788771d2f25a 100644 --- a/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -3,4 +3,21 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "noResultWord": "未找到“{0}”的任何定义", + "generic.noResults": "找不到定义", + "meta.title": " – {0} 定义", + "actions.goToDecl.label": "转到定义", + "actions.goToDeclToSide.label": "打开侧边的定义", + "actions.previewDecl.label": "查看定义", + "goToImplementation.noResultWord": "未找到“{0}”的实现", + "goToImplementation.generic.noResults": "未找到实现", + "meta.implementations.title": "– {0} 个实现", + "actions.goToImplementation.label": "转到实现", + "actions.peekImplementation.label": "速览实现", + "goToTypeDefinition.noResultWord": "未找到“{0}”的类型定义", + "goToTypeDefinition.generic.noResults": "未找到类型定义", + "meta.typeDefinitions.title": " – {0} 个类型定义", + "actions.goToTypeDefinition.label": "转到类型定义", + "actions.peekTypeDefinition.label": "快速查看类型定义" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json index 8b6ad71cd4e6d..ab0b4761cf9a4 100644 --- a/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "multipleResults": "单击显示 {0} 个定义。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json b/i18n/chs/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json index 59c62abf01c5b..346d11b670616 100644 --- a/i18n/chs/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json @@ -18,7 +18,7 @@ "lines.insertAfter": "在下面插入行", "lines.deleteAllLeft": "删除左侧所有内容", "lines.deleteAllRight": "删除右侧所有内容", - "lines.joinLines": "联接行", + "lines.joinLines": "合并行", "editor.transpose": "转置游标处的字符", "editor.transformToUppercase": "转换为大写", "editor.transformToLowercase": "转换为小写" diff --git a/i18n/chs/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/chs/src/vs/editor/contrib/links/browser/links.i18n.json index 345d85ddefa86..9e17ff5092c6a 100644 --- a/i18n/chs/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "Cmd + 单击以跟踪链接", "links.navigate": "Ctrl + 单击以跟踪链接", + "links.navigate.al": "Alt + 单击以访问链接", "invalid.url": "抱歉,无法打开此链接,因为其格式不正确: {0}", "missing.url": "抱歉,无法打开此链接,因为其目标丢失。", "label": "打开链接" diff --git a/i18n/chs/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json b/i18n/chs/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json index a64a607ad878c..897e74dff44a2 100644 --- a/i18n/chs/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "toggle.tabMovesFocus": "切换 Tab 键移动焦点" + "toggle.tabMovesFocus": "切换 Tab 键是否移动焦点" } \ No newline at end of file diff --git a/i18n/chs/src/vs/platform/keybinding/common/keybindingLabels.i18n.json b/i18n/chs/src/vs/platform/keybinding/common/keybindingLabels.i18n.json index 8fa747b0b99bd..0e97d8b37c301 100644 --- a/i18n/chs/src/vs/platform/keybinding/common/keybindingLabels.i18n.json +++ b/i18n/chs/src/vs/platform/keybinding/common/keybindingLabels.i18n.json @@ -8,9 +8,9 @@ "shiftKey": "Shift", "altKey": "Alt", "windowsKey": "Windows", - "ctrlKey.long": "控件", + "ctrlKey.long": "Control", "shiftKey.long": "Shift", "altKey.long": "Alt", - "cmdKey.long": "命令", + "cmdKey.long": "Command", "windowsKey.long": "Windows" } \ No newline at end of file diff --git a/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json index 0af4fc2114c68..37be20d77e940 100644 --- a/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -60,7 +60,6 @@ "editorBackground": "编辑器背景颜色。", "editorForeground": "编辑器默认前景色。", "editorWidgetBackground": "编辑器组件(如查找/替换)背景颜色。", - "editorWidgetBorder": "编辑器小组件的边框颜色。", "editorSelection": "编辑器所选内容的颜色。", "editorInactiveSelection": "非活动编辑器中所选内容的颜色。", "editorSelectionHighlight": "与所选内容具有相同内容的区域颜色。", @@ -74,5 +73,11 @@ "diffEditorInserted": "已插入文本的背景颜色。", "diffEditorRemoved": "被删除文本的背景颜色。", "diffEditorInsertedOutline": "插入的文本的轮廓颜色。", - "diffEditorRemovedOutline": "被删除文本的轮廓颜色。" + "diffEditorRemovedOutline": "被删除文本的轮廓颜色。", + "mergeCurrentHeaderBackground": "内联合并冲突中当前版本区域的标头背景色。", + "mergeCurrentContentBackground": "内联合并冲突中当前版本区域的内容背景色。", + "mergeIncomingHeaderBackground": "内联合并冲突中传入的版本区域的标头背景色。", + "mergeIncomingContentBackground": "内联合并冲突中传入的版本区域的内容背景色。", + "overviewRulerCurrentContentForeground": "内联合并冲突中当前版本区域的概览标尺前景色。", + "overviewRulerIncomingContentForeground": "内联合并冲突中传入的版本区域的概览标尺前景色。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/chs/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 7f7594d784a0a..056d85f4a23af 100644 --- a/i18n/chs/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -11,6 +11,7 @@ "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", "tabFocusModeEnabled": "按 Tab 移动焦点", + "screenReaderDetected": "检测到屏幕阅读器", "disableTabMode": "禁用辅助功能模式", "gotoLine": "转到行", "indentation": "缩进", diff --git a/i18n/chs/src/vs/workbench/common/theme.i18n.json b/i18n/chs/src/vs/workbench/common/theme.i18n.json index 0f3e7eb1bf9de..e130cd7df4d77 100644 --- a/i18n/chs/src/vs/workbench/common/theme.i18n.json +++ b/i18n/chs/src/vs/workbench/common/theme.i18n.json @@ -7,34 +7,37 @@ "tabActiveBackground": "活动选项卡的背景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", "tabInactiveBackground": "非活动选项卡的背景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", "tabBorder": "用于将选项卡彼此分隔开的边框。选项卡是编辑器区域中编辑器的容器。可在一个编辑器组中打开多个选项卡。可以存在多个编辑器组。", - "tabActiveEditorGroupActiveForeground": "活动组中活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", - "tabInactiveEditorGroupActiveForeground": "活动组中非活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", "editorGroupBackground": "编辑器组的背景颜色。编辑器组是编辑器的容器。此颜色在拖动编辑器组时显示。", "tabsContainerBackground": "启用选项卡时编辑器组标题的背景颜色。编辑器组是编辑器的容器。", + "tabsContainerBorder": "选项卡启用时编辑器组标题的边框颜色。编辑器组是编辑器的容器。", "editorGroupHeaderBackground": "禁用选项卡时编辑器组标题的背景颜色。编辑器组是编辑器的容器。", "editorGroupBorder": "将多个编辑器组彼此分隔开的颜色。编辑器组是编辑器的容器。", "editorDragAndDropBackground": "拖动编辑器时的背景颜色。此颜色应有透明度,以便编辑器内容能透过背景。", - "panelBackground": "面板的背景色。面板显示在编辑器区域下方,可包含输出和集成终端等视图。", "panelBorder": "分隔到编辑器的顶部面板边框色。面板显示在编辑器区域下方,可包含输出和集成终端等视图。", "panelActiveTitleForeground": "活动面板的标题颜色。面板显示在编辑器区域下方,并包含输出和集成终端等视图。", "panelInactiveTitleForeground": "非活动面板的标题颜色。面板显示在编辑器区域下方,并包含输出和集成终端等视图。", "panelActiveTitleBorder": "活动面板的边框颜色。面板显示在编辑器区域下方,包含输出和集成终端等视图。", "statusBarForeground": "状态栏前景色。状态栏显示在窗口底部。", "statusBarBackground": "标准状态栏背景色。状态栏显示在窗口底部。", + "statusBarBorder": "状态栏分隔侧边栏和编辑器的边框颜色。状态栏显示在窗口底部。", "statusBarNoFolderBackground": "没有打开文件夹时状态栏的背景色。状态栏显示在窗口底部。", + "statusBarNoFolderForeground": "没有打开文件夹时状态栏的前景色。状态栏显示在窗口底部。", "statusBarItemActiveBackground": "单击时的状态栏项背景色。状态栏显示在窗口底部。", "statusBarItemHoverBackground": "悬停时的状态栏项背景色。状态栏显示在窗口底部。", "statusBarProminentItemBackground": "状态栏突出显示项的背景颜色。突出显示项比状态栏中的其他条目更显眼,表明其重要性更高。状态栏显示在窗口底部。", "statusBarProminentItemHoverBackground": "状态栏突出显示项在悬停时的背景颜色。突出显示项比状态栏中的其他条目更显眼,表明其重要性更高。状态栏显示在窗口底部。", "activityBarBackground": "活动栏背景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "activityBarForeground": "活动栏前景色(例如用于图标)。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", + "activityBarBorder": "活动栏分隔侧边栏的边框颜色。活动栏显示在最左侧或最右侧,并可以切换侧边栏的视图。", "activityBarDragAndDropBackground": "活动栏项在被拖放时的反馈颜色。此颜色应有透明度,以便活动栏条目能透过此颜色。活动栏显示在最左侧或最右侧,并允许在侧边栏视图之间切换。", "activityBarBadgeBackground": "活动通知徽章背景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "activityBarBadgeForeground": "活动通知徽章前景色。活动栏显示在最左侧或最右侧,并允许在侧边栏的视图间切换。", "sideBarBackground": "侧边栏背景色。侧边栏是资源管理器和搜索等视图的容器。", "sideBarForeground": "侧边栏前景色。侧边栏是资源管理器和搜索等视图的容器。", + "sideBarBorder": "侧边栏分隔编辑器的边框颜色。侧边栏包含资源管理器、搜索等视图。", "sideBarTitleForeground": "侧边栏标题前景色。侧边栏是资源管理器和搜索等视图的容器。", "sideBarSectionHeaderBackground": "侧边栏节标题的背景颜色。侧边栏是资源管理器和搜索等视图的容器。", + "sideBarSectionHeaderForeground": "侧边栏节标题的前景色。侧边栏包括资源管理器、搜索等视图。", "titleBarActiveForeground": "窗口处于活动状态时的标题栏前景色。请注意,该颜色当前仅在 macOS 上受支持。", "titleBarInactiveForeground": "窗口处于非活动状态时的标题栏前景色。请注意,该颜色当前仅在 macOS 上受支持。", "titleBarActiveBackground": "窗口处于活动状态时的标题栏背景色。请注意,该颜色当前仅在 macOS 上受支持。", diff --git a/i18n/chs/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/workbench.i18n.json index 8b6ad71cd4e6d..b7d445f6a6a3e 100644 --- a/i18n/chs/src/vs/workbench/electron-browser/workbench.i18n.json +++ b/i18n/chs/src/vs/workbench/electron-browser/workbench.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "developer": "开发者", + "file": "文件" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index f29ac67da10fe..31765f90ced5b 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "仅显示了此对象的基元值。", - "debuggingStarted": "已开始调试。", "debuggingPaused": "已暂停调试,原因 {0},{1} {2}", + "debuggingStarted": "已开始调试。", "debuggingStopped": "已停止调试。", "breakpointAdded": "已添加断点,行 {0}, 文件 {1}", "breakpointRemoved": "已删除断点,行 {0},文件 {1}", diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index 6e5b8b4125520..f5089c0197a26 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "调试程序时状态栏的背景色。状态栏显示在窗口底部" + "statusBarDebuggingBackground": "调试程序时状态栏的背景色。状态栏显示在窗口底部", + "statusBarDebuggingForeground": "调试程序时状态栏的前景色。状态栏显示在窗口底部" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index af246476905c3..38c86c25f8b5c 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,6 +22,8 @@ "disableGloballyAction": "始终", "disableAction": "禁用", "checkForUpdates": "检查更新", + "enableAutoUpdate": "启用自动更新扩展", + "disableAutoUpdate": "禁用自动更新扩展", "updateAll": "更新所有扩展", "reloadAction": "重新加载", "postUpdateTooltip": "重载以更新", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "显示工作区建议的扩展名", "showRecommendedKeymapExtensions": "显示推荐键映射", "showRecommendedKeymapExtensionsShort": "键映射", + "showLanguageExtensions": "显示语言扩展", + "showLanguageExtensionsShort": "语言扩展", "configureWorkspaceRecommendedExtensions": "配置建议的扩展(工作区)", "ConfigureWorkspaceRecommendations.noWorkspace": "建议仅在工作区文件夹上可用。", "OpenExtensionsFile.failed": "无法在 \".vscode\" 文件夹({0})内创建 \"extensions.json\" 文件。", @@ -51,5 +55,8 @@ "disableAll": "禁用所有已安装的扩展", "disableAllWorkspace": "禁用此工作区的所有已安装的扩展", "enableAll": "启用所有已安装的扩展", - "enableAllWorkspace": "启用此工作区的所有已安装的扩展" + "enableAllWorkspace": "启用此工作区的所有已安装的扩展", + "extensionButtonProminentBackground": "扩展中突出操作的按钮背景色(比如 安装按钮)。", + "extensionButtonProminentForeground": "扩展中突出操作的按钮前景色(比如 安装按钮)。", + "extensionButtonProminentHoverBackground": "扩展中突出操作的按钮被悬停时的颜色(比如 安装按钮)。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index a8554464048cd..518bee02115f8 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,8 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "disableOtherKeymapsConfirmation": "禁用其他键映射 ({0}) 以避免键绑定之间的冲突?", "yes": "是", "no": "否", + "betterMergeDisabled": "现已内置 Better Merge 扩展。此扩展已被安装并禁用,且能被卸载。", "uninstall": "卸载", "later": "稍后" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 5813db26a2446..955985888a94b 100644 --- a/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,6 +16,7 @@ "associations": "配置语言的文件关联(如: \"*.extension\": \"html\")。这些关联的优先级高于已安装语言的默认关联。", "encoding": "读取和编写文件时将使用的默认字符集编码。", "autoGuessEncoding": "启用时,会在打开文件时尝试猜测字符集编码", + "eol": "默认行尾字符。使用 \\n 表示 LF,\\r\\n 表示 CRLF。", "trimTrailingWhitespace": "启用后,将在保存文件时剪裁尾随空格。", "insertFinalNewline": "启用后,保存文件时在文件末尾插入一个最终新行。", "files.autoSave.off": "永不自动保存更新后的文件。", diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 3db635ddc246b..1cd8910edd821 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "定义键绑定", - "defineKeybinding.kbLayoutInfoMessage": "对于当前键盘布局,按 ", "defineKeybinding.kbLayoutErrorMessage": "在当前键盘布局下无法生成此组合键。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json index 8b6ad71cd4e6d..bc3bae9c0e521 100644 --- a/i18n/chs/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "editorGutterModifiedBackground": "编辑器导航线中被修改行的背景颜色。", + "editorGutterAddedBackground": "编辑器导航线中已插入行的背景颜色。", + "editorGutterDeletedBackground": "编辑器导航线中被删除行的背景颜色。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 340ee7fc03e11..a667d902bfed1 100644 --- a/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -9,5 +9,6 @@ "vscode.extension.contributes.snippets-path": "代码片段文件的路径。该路径相对于扩展文件夹,通常以 \"./snippets/\" 开头。", "invalid.language": "“contributes.{0}.language”中存在未知的语言。提供的值: {1}", "invalid.path.0": "“contributes.{0}.path”中应为字符串。提供的值: {1}", - "invalid.path.1": "“contributes.{0}.path”({1})应包含在扩展的文件夹({2})内。这可能会使扩展不可移植。" + "invalid.path.1": "“contributes.{0}.path”({1})应包含在扩展的文件夹({2})内。这可能会使扩展不可移植。", + "badVariableUse": "“{0}”代码片段很可能混淆了片段变量和片段占位符。有关详细信息,请访问 https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index 48bcbb508c253..bf5eec2631c96 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0},任务", - "workspace": "来自工作区", - "extension": "来自扩展" + "entryAriaLabel": "{0},任务" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 8490e6b190ad6..0c2209acdb615 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,13 +5,12 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "警告: options.cwd 必须属于字符串类型。正在忽略值 {0}\n", - "ConfigurationParser.noShell": "警告: 仅当在终端中执行任务时支持 shell 配置。", "ConfigurationParser.noargs": "错误: 命令参数必须是字符串数组。提供的值为:\n{0}", + "ConfigurationParser.noShell": "警告: 仅当在终端中执行任务时支持 shell 配置。", "ConfigurationParser.noName": "错误: 声明范围内的问题匹配程序必须具有名称:\n{0}\n", "ConfigurationParser.unknownMatcherKind": "警告: 已定义的问题匹配程序未知。受支持的类型为 string | ProblemMatcher | (string | ProblemMatcher)[]。\n{0}\n", "ConfigurationParser.invalidVaraibleReference": "错误: 无效的 problemMatcher 引用: {0}\n", "ConfigurationParser.noTaskName": "错误: 任务必须提供 taskName 属性。将忽略该任务。\n{0}\n", "taskConfiguration.shellArgs": "警告: 任务“{0}”是 shell 命令,该命令的名称或其中一个参数具有非转义空格。若要确保命令行引用正确,请将参数合并到该命令。", - "taskConfiguration.noCommandOrDependsOn": "错误: 任务“{0}”既不指定命令,也不指定 dependsOn 属性。将忽略该任务。其定义为:\n{1}", "taskConfiguration.noCommand": "错误: 任务“{0}”未定义命令。将忽略该任务。其定义为:\n{1}" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 4106097a93e42..0fc11b1726877 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "JsonSchema.version": "配置的版本号", - "JsonSchema.windows": "Windows 特定的命令配置", - "JsonSchema.mac": "Mac 特定的命令配置", - "JsonSchema.linux": "Linux 特定的命令配置", "JsonSchema.shell": "指定命令是 shell 命令还是外部程序。如果省略,默认值是 false。", "JsonSchema.tasks.dependsOn.string": "此任务依赖的另一任务。", - "JsonSchema.tasks.dependsOn.array": "此任务依赖的其他任务。" + "JsonSchema.tasks.dependsOn.array": "此任务依赖的其他任务。", + "JsonSchema.windows": "Windows 特定的命令配置", + "JsonSchema.mac": "Mac 特定的命令配置", + "JsonSchema.linux": "Linux 特定的命令配置" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 07f438f169e7c..495283f621e0b 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -22,10 +22,8 @@ "welcomePage.installingKeymap": "正在安装 {0} 键盘快捷方式...", "welcomePage.keymapNotFound": "找不到 ID 为 {1} 的 {0} 键盘快捷方式。", "welcome.title": "欢迎使用", - "welcomePage.extensionListSeparator": ",", + "welcomePage.extensionListSeparator": "、", "welcomePage.installedExtension": "{0}(已安装)", "ok": "确定", - "cancel": "取消", - "welcomePage.quickLinkBackground": "欢迎页快速链接的背景颜色。", - "welcomePage.quickLinkHoverBackground": "欢迎页快速链接被悬停时的背景颜色。" + "cancel": "取消" } \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json index fd3fc4ee5125c..8b6ad71cd4e6d 100644 --- a/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,9 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "acceptCurrentChange": "接受當前變更", - "acceptIncomingChange": "接受來源變更", - "acceptBothChanges": "接受兩者變更", - "compareChanges": "比較變更" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json index b72349a9332bb..fe300c53427c3 100644 --- a/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "cursorNotInConflict": "編輯器游標不在衝突合併範圍之內", + "cursorOnSplitterRange": "編輯器游標在衝突合併工具範圍內,請移動至\"當前項目\"或來源項目\"區塊", "noConflicts": "檔案內找不到需要合併衝突項目", "noOtherConflictsInThisFile": "此檔案內沒有其他的衝突合併項目" } \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/package.i18n.json b/i18n/cht/extensions/merge-conflict/package.i18n.json index 1afd0effd3ea1..8546878e4e445 100644 --- a/i18n/cht/extensions/merge-conflict/package.i18n.json +++ b/i18n/cht/extensions/merge-conflict/package.i18n.json @@ -5,15 +5,8 @@ // Do not edit this file. It is machine generated. { "command.category": "合併衝突", - "command.accept.all-incoming": "接受所有來源", - "command.accept.all-both": "接受兩者", - "command.accept.current": "接受當前項目", - "command.accept.incoming": "接受來源", - "command.accept.selection": "接受選取項目", "command.accept.both": "接受兩者", - "command.next": "後一個衝突", - "command.previous": "前一個衝突", - "command.compare": "比較目前衝突", "config.title": "合併衝突", - "config.codeLensEnabled": "啟用/停用 編輯器CodeLens衝突合併 " + "config.codeLensEnabled": "啟用/停用 編輯器CodeLens衝突合併 ", + "config.decoratorsEnabled": "啟用/停用 編輯器衝突合併色彩裝飾" } \ No newline at end of file diff --git a/i18n/cht/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/cht/extensions/typescript/out/utils/typingsStatus.i18n.json index 1c4d07bd74611..4f15ff5fc04f8 100644 --- a/i18n/cht/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/cht/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,7 +5,6 @@ // Do not edit this file. It is machine generated. { "installingPackages": "正在擷取資料以改善 TypeScript IntelliSense", - "typesInstallerInitializationFailed.title": "無法安裝鍵入檔案以取得 JavaScript 語言功能。請確認 NPM 已安裝,且位於您的 PATH", "typesInstallerInitializationFailed.moreInformation": "詳細資訊", "typesInstallerInitializationFailed.doNotCheckAgain": "不要再檢查", "typesInstallerInitializationFailed.close": "關閉" diff --git a/i18n/cht/extensions/typescript/package.i18n.json b/i18n/cht/extensions/typescript/package.i18n.json index 316f057d5a8b1..a9e009d33a4fa 100644 --- a/i18n/cht/extensions/typescript/package.i18n.json +++ b/i18n/cht/extensions/typescript/package.i18n.json @@ -33,10 +33,13 @@ "javascript.validate.enable": "啟用/停用 JavaScript 驗證。", "typescript.goToProjectConfig.title": "移至專案組態", "javascript.goToProjectConfig.title": "移至專案組態", + "javascript.referencesCodeLens.enabled": "在JavaScript檔案啟用/停用 參考CodeLens ", + "typescript.referencesCodeLens.enabled": "在TypeScript檔案啟用/停用CodeLens參考。需要TypeScript>=2.0.6。", "typescript.implementationsCodeLens.enabled": "啟用/停用實作 CodeLens。需要 TypeScript >= 2.2.0。", "typescript.openTsServerLog.title": "開啟 TS 伺服器記錄", + "typescript.restartTsServer": "重新啟動TS伺服器", "typescript.selectTypeScriptVersion.title": "選取 TypeScript 版本", "jsDocCompletion.enabled": "啟用/停用自動 JSDoc 註解", "javascript.implicitProjectConfig.checkJs": "啟用/停用 JavaScript 檔案的語意檢查。現有的 jsconfig.json 或 tsconfig.json 檔案會覆寫此設定。需要 TypeScript >=2.3.1。", - "typescript.check.npmIsInstalled": "檢查是否已安裝 NPM,以取得自動鍵入" + "javascript.nameSuggestions": "從JavaScript推薦表檔案中啟用/停用包含唯一檔名" } \ No newline at end of file diff --git a/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index c01f13f3bcb0d..a88561eebdeaf 100644 --- a/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/cht/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,6 +6,7 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "因為影像太大,所以無法在編輯器中顯示。", + "resourceOpenExternalButton": "要使用外部程式打開影像嗎?", "nativeBinaryError": "檔案為二進位檔、非常大或使用不支援的文字編碼,因此將不會顯示於編輯器中。", "sizeB": "{0}B", "sizeKB": "{0}KB", diff --git a/i18n/cht/src/vs/code/electron-main/menus.i18n.json b/i18n/cht/src/vs/code/electron-main/menus.i18n.json index 5961aa8e7894d..6d87a7b49027d 100644 --- a/i18n/cht/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/cht/src/vs/code/electron-main/menus.i18n.json @@ -149,12 +149,12 @@ "miLicense": "檢視授權(&&L)", "miPrivacyStatement": "隱私權聲明(&&P)", "miAbout": "關於(&&A)", + "accessibilityOptionsWindowTitle": "協助工具選項", "miRestartToUpdate": "重新啟動以更新...", "miCheckingForUpdates": "正在查看是否有更新...", "miDownloadUpdate": "下載可用更新", "miDownloadingUpdate": "正在下載更新...", "miInstallingUpdate": "正在安裝更新...", - "miCheckForUpdates": "查看是否有更新...", "aboutDetail": "\n版本 {0}\n認可 {1}\n日期 {2}\nShell {3}\n轉譯器 {4}\nNode {5}", "okButton": "確定" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json index f06682edb16bb..f1f6f5fa235b5 100644 --- a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "控制字型寬度。", "fontSize": "控制字型大小 (以像素為單位)。", "lineHeight": "控制行高。使用 0 會從 fontSize 計算 lineHeight。", + "letterSpacing": "控制字元間距 (以像素為單位)", "lineNumbers": "控制行號顯示。可能的值有 'on'、'off' 及 'relative'。'relative' 會從目前的資料指標位置顯示行數。", "rulers": "要在其中顯示垂直尺規的資料行", "wordSeparators": "執行文字相關導覽或作業時將作為文字分隔符號的字元", diff --git a/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json index b08c173b1003a..a64950d25e3b8 100644 --- a/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/cht/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -16,5 +16,9 @@ "editorBracketMatchBackground": "成對括號背景色彩", "editorBracketMatchBorder": "成對括號邊框色彩", "editorOverviewRulerBorder": "預覽檢視編輯器尺規的邊框色彩.", - "editorGutter": "編輯器邊框的背景顏色,包含行號與字形圖示的邊框." + "editorGutter": "編輯器邊框的背景顏色,包含行號與字形圖示的邊框.", + "errorForeground": "編輯器內錯誤提示線的前景色彩.", + "errorBorder": "編輯器內錯誤提示線的邊框色彩.", + "warningForeground": "編輯器內警告提示線的前景色彩.", + "warningBorder": "編輯器內警告提示線的邊框色彩." } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/cht/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index 13c0c141c50a6..3c019fc1a1cb4 100644 --- a/i18n/cht/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/cht/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -16,5 +16,7 @@ "schema.autoClosingPairs": "定義成對括弧。輸入左括弧時,即自動插入右括弧。", "schema.autoClosingPairs.notIn": "定義停用自動配對的範圍清單。", "schema.surroundingPairs": "定義可用以括住所選字串的成對括弧。", + "schema.wordPattern.pattern": "使用正規表示式進行文字比對", + "schema.wordPattern.flags": "使用正規表示式標記進行文字比對", "schema.wordPattern.flags.errorMessage": "必須符合樣式 `/^([gimuy]+)$/`" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/cht/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/common/theme.i18n.json b/i18n/cht/src/vs/workbench/common/theme.i18n.json index 72a8d8abb7e4f..ae6c513e6ceb9 100644 --- a/i18n/cht/src/vs/workbench/common/theme.i18n.json +++ b/i18n/cht/src/vs/workbench/common/theme.i18n.json @@ -7,12 +7,9 @@ "tabActiveBackground": "使用中之索引標籤的背景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", "tabInactiveBackground": "非使用中之索引標籤的背景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", "tabBorder": "用以分隔索引標籤彼此的框線。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "tabActiveEditorGroupActiveForeground": "使用中的群組內,使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", - "tabInactiveEditorGroupActiveForeground": "使用中的群組內,非使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", "editorGroupBackground": "編輯器群組的背景色彩。編輯器群組是編輯器的容器。當拖曳編輯器群組時會顯示背景色彩。", "editorGroupHeaderBackground": "當索引標籤禁用的時候編輯器群組標題的背景顏色。編輯器群組是編輯器的容器。", "editorGroupBorder": "用以分隔多個編輯器群組彼此的色彩。編輯器群組是編輯器的容器。", - "panelBackground": "面板的前景色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "panelBorder": "面板頂端用以分隔編輯器的邊框色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "panelActiveTitleForeground": "使用中之面板標題的標題色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "panelInactiveTitleForeground": "非使用中之面板標題的標題色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", diff --git a/i18n/cht/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/workbench.i18n.json index 8b6ad71cd4e6d..2375ce9a84fc6 100644 --- a/i18n/cht/src/vs/workbench/electron-browser/workbench.i18n.json +++ b/i18n/cht/src/vs/workbench/electron-browser/workbench.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "developer": "開發人員", + "file": "檔案" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index c3db57caac680..4ff9fe0b2b99b 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "只會顯示此物件的基本值。", - "debuggingStarted": "偵錯已開始。", "debuggingPaused": "偵錯已暫停,原因 {0},{1} {2}", + "debuggingStarted": "偵錯已開始。", "debuggingStopped": "偵錯已停止。", "breakpointAdded": "已新增中斷點,行 {0},檔案 {1}", "breakpointRemoved": "已移除中斷點,行 {0},檔案 {1}", diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 0d448edf6a5ee..799796b51ffde 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "定義按鍵繫結關係", - "defineKeybinding.kbLayoutInfoMessage": "針對您目前的鍵盤配置,請按 ", "defineKeybinding.kbLayoutErrorMessage": "您無法在目前的鍵盤配置下產生此按鍵組合。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index c9f6c178105a9..e35a088465013 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0},工作", - "workspace": "從工作區", - "extension": "從擴充功能" + "entryAriaLabel": "{0},工作" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 8da7ffbc6c413..e2b27a208b013 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,13 +5,12 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "警告: options.cwd 必須屬於字串類型。即將忽略值 {0}。", - "ConfigurationParser.noShell": "警告: 只有在終端機中執行工作時才支援殼層組態。", "ConfigurationParser.noargs": "錯誤: 命令引數必須是字串陣列。提供的值為:\n{0}", + "ConfigurationParser.noShell": "警告: 只有在終端機中執行工作時才支援殼層組態。", "ConfigurationParser.noName": "錯誤: 宣告範圍中的問題比對器必須有名稱:\n{0}\n", "ConfigurationParser.unknownMatcherKind": "警告: 定義的問題比對器未知。支援的類型為 string | ProblemMatcher | (string | ProblemMatcher)[]。\n{0}\n", "ConfigurationParser.invalidVaraibleReference": "錯誤: problemMatcher 參考無效: {0}\n", "ConfigurationParser.noTaskName": "錯誤: 工作必須提供 taskName 屬性。即將忽略此工作。\n{0}\n", "taskConfiguration.shellArgs": "警告: 工作 '{0}' 是殼層命令,但命令名稱或其中一個引數有的未逸出的空格。若要確保命令列正確引述,請將引數合併到命令中。", - "taskConfiguration.noCommandOrDependsOn": "錯誤: 工作 '{0}' 未指定命令或 dependsOn 屬性。即將略過該工作。其定義為:\n{1}", "taskConfiguration.noCommand": "錯誤: 工作 '{0}' 未定義命令。即將略過該工作。其定義為:\n{1}" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 91d93e19374ef..b24501dac4e20 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "JsonSchema.version": "組態的版本號碼", - "JsonSchema.windows": "Windows 特定命令組態", - "JsonSchema.mac": "Mac 特定命令組態", - "JsonSchema.linux": "Linux 特定命令組態", "JsonSchema.shell": "指定此命令是殼層命令或外部程式。如果省略,預設為 False。", "JsonSchema.tasks.dependsOn.string": "此工作相依的另一個工作。", - "JsonSchema.tasks.dependsOn.array": "此工作相依的其他工作。" + "JsonSchema.tasks.dependsOn.array": "此工作相依的其他工作。", + "JsonSchema.windows": "Windows 特定命令組態", + "JsonSchema.mac": "Mac 特定命令組態", + "JsonSchema.linux": "Linux 特定命令組態" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index f73c9b1e8a6dd..c0537ee4cdfbc 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -18,6 +18,7 @@ "problems": "問題", "manyMarkers": "99+", "tasks": "工作", + "TaskSystem.noHotSwap": "變更工作執行引擎需要重新啟動 VS Code。已略過變更。", "TaskService.noBuildTask": "未定義任何建置工作。請使用 'isBuildCommand' 標記 tasks.json 檔案中的工作。", "TaskService.noTestTask": "未定義任何建置工作。請使用 'isTestCommand' 標記 tasks.json 檔案中的工作。", "TaskServer.noTask": "找不到所要求要執行的工作 {0}。", diff --git a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 9a00f615c32e6..41c9f9e1a0dd2 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -20,8 +20,10 @@ "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "啟動時顯示歡迎頁面", "welcomePage.customize": "自訂", + "welcomePage.installExtensionPacks": "工具與語言", "welcomePage.moreExtensions": "更多", "welcomePage.installKeymapDescription": "安裝鍵盤快速鍵", + "welcomePage.installKeymapExtension": "安裝鍵盤快速鍵{0}與{1}", "welcomePage.others": "其他", "welcomePage.colorTheme": "彩色佈景主題", "welcomePage.colorThemeDescription": "將編輯器及您的程式碼設定成您喜愛的外觀", diff --git a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index dfce04ba61a07..69d1bd41dadcf 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -21,6 +21,5 @@ "welcomePage.extensionListSeparator": ",", "welcomePage.installedExtension": "{0}(已安裝)", "ok": "確定", - "cancel": "取消", - "welcomePage.quickLinkBackground": "起始頁面連結的背景色彩." + "cancel": "取消" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 66d7f136affb3..d1d07b14ebd51 100644 --- a/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -7,5 +7,10 @@ "open": "開啟設定", "close": "關閉", "errorUnknownKey": "無法寫入組態檔 (不明的按鍵)", - "errorInvalidTarget": "無法寫入組態檔 (目標無效)" + "errorInvalidTarget": "無法寫入組態檔 (目標無效)", + "errorNoWorkspaceOpened": "無法寫入設定,因為沒有開啟資料夾,請開啟資料夾後再試一次.", + "errorInvalidConfiguration": "無法寫入設定.請開啟**使用者設定**並修正錯誤/警告後再試一次.", + "errorInvalidConfigurationWorkspace": "無法寫入設定.請開啟**工作區設定**並修正檔案中的錯誤/警告後再試一次.", + "errorConfigurationFileDirty": "無法寫入設定,因為檔案已變更.請儲存**使用者設定**後再試一次", + "errorConfigurationFileDirtyWorkspace": "無法寫入設定,因檔案已變更.請儲存**工作區設定**後再試一次." } \ No newline at end of file diff --git a/i18n/deu/extensions/git/out/commands.i18n.json b/i18n/deu/extensions/git/out/commands.i18n.json index 1a8943807b8ea..b3f20ad87c778 100644 --- a/i18n/deu/extensions/git/out/commands.i18n.json +++ b/i18n/deu/extensions/git/out/commands.i18n.json @@ -26,6 +26,9 @@ "provide commit message": "Geben Sie eine Commit-Nachrichte ein.", "branch name": "Branchname", "provide branch name": "Geben Sie einen Branchnamen an.", + "select branch to delete": "Wählen Sie einen Branch zum Löschen aus", + "confirm force delete branch": "Der Branch '{0}' ist noch nicht vollständig zusammengeführt. Trotzdem löschen?", + "delete branch": "Branch löschen", "no remotes to pull": "In Ihrem Repository wurden keine Remoteelemente für den Pull konfiguriert.", "no remotes to push": "In Ihrem Repository wurden keine Remoteelemente für den Push konfiguriert.", "nobranch": "Wählen Sie ein Branch für den Push zu einem Remoteelement aus.", diff --git a/i18n/deu/extensions/git/package.i18n.json b/i18n/deu/extensions/git/package.i18n.json index 26ab785ffbf18..8383045471459 100644 --- a/i18n/deu/extensions/git/package.i18n.json +++ b/i18n/deu/extensions/git/package.i18n.json @@ -26,6 +26,7 @@ "command.undoCommit": "Letzten Commit rückgängig machen", "command.checkout": "Auschecken an...", "command.branch": "Branch erstellen...", + "command.deleteBranch": "Branch löschen...", "command.pull": "Pull", "command.pullRebase": "Pull (Rebase)", "command.push": "Push", diff --git a/i18n/deu/extensions/jake/out/main.i18n.json b/i18n/deu/extensions/jake/out/main.i18n.json index 8b6ad71cd4e6d..83268c0007181 100644 --- a/i18n/deu/extensions/jake/out/main.i18n.json +++ b/i18n/deu/extensions/jake/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Fehler bei der automatischen Jake-Erkennung. Fehlermeldung: {0}" +} \ No newline at end of file diff --git a/i18n/deu/extensions/jake/package.i18n.json b/i18n/deu/extensions/jake/package.i18n.json index 8b6ad71cd4e6d..6ca3a5549ddf9 100644 --- a/i18n/deu/extensions/jake/package.i18n.json +++ b/i18n/deu/extensions/jake/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.jake.autoDetect": "Steuert, ob die automatische Erkennung von Jake-Tasks aktiviert oder deaktiviert ist. Standardmäßig ist die Funktion aktiviert." +} \ No newline at end of file diff --git a/i18n/deu/extensions/markdown/out/extension.i18n.json b/i18n/deu/extensions/markdown/out/extension.i18n.json index 8b6ad71cd4e6d..490139dcf55e6 100644 --- a/i18n/deu/extensions/markdown/out/extension.i18n.json +++ b/i18n/deu/extensions/markdown/out/extension.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "onPreviewStyleLoadError": "'markdown.styles' konnte nicht geladen werden: {0}" +} \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json index 8b6ad71cd4e6d..f18cf16824649 100644 --- a/i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "noConflicts": "Keine Merge-Konflikte in dieser Datei gefunden", + "noOtherConflictsInThisFile": "Keine weiteren Merge-Konflikte in dieser Datei" +} \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/package.i18n.json b/i18n/deu/extensions/merge-conflict/package.i18n.json index 8b6ad71cd4e6d..0875e460a99e6 100644 --- a/i18n/deu/extensions/merge-conflict/package.i18n.json +++ b/i18n/deu/extensions/merge-conflict/package.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "command.category": "Merge-Konflikt", + "command.accept.both": "Beides akzeptieren", + "config.title": "Merge-Konflikt" +} \ No newline at end of file diff --git a/i18n/deu/extensions/npm/package.i18n.json b/i18n/deu/extensions/npm/package.i18n.json index 8b6ad71cd4e6d..df3491b4c0525 100644 --- a/i18n/deu/extensions/npm/package.i18n.json +++ b/i18n/deu/extensions/npm/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.npm.autoDetect": "Steuert, ob die automatische Erkennung von NPM-Skripts aktiviert oder deaktiviert ist. Standardmäßig ist die Funktion aktiviert." +} \ No newline at end of file diff --git a/i18n/deu/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/deu/extensions/typescript/out/utils/typingsStatus.i18n.json index abc0ee901f85f..6d9362666976d 100644 --- a/i18n/deu/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/deu/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,7 +5,6 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Daten werden zum Optimieren von TypeScript IntelliSense abgerufen", - "typesInstallerInitializationFailed.title": "Typisierungsdateien für JavaScript-Sprachfunktionen konnten nicht installiert werden. Stellen Sie sicher, das NPM installiert ist und sich in Ihrem PFAD befindet.", "typesInstallerInitializationFailed.moreInformation": "Weitere Informationen", "typesInstallerInitializationFailed.doNotCheckAgain": "Nicht erneut überprüfen", "typesInstallerInitializationFailed.close": "Schließen" diff --git a/i18n/deu/extensions/typescript/package.i18n.json b/i18n/deu/extensions/typescript/package.i18n.json index d48740fd4d307..451b77c6fa52e 100644 --- a/i18n/deu/extensions/typescript/package.i18n.json +++ b/i18n/deu/extensions/typescript/package.i18n.json @@ -34,8 +34,9 @@ "typescript.goToProjectConfig.title": "Zur Projektkonfiguration wechseln", "javascript.goToProjectConfig.title": "Zur Projektkonfiguration wechseln", "typescript.implementationsCodeLens.enabled": "Aktiviert oder deaktiviert CodeLens-Implementierungen. Erfordert TypeScript 2.2.0 oder höher.", + "typescript.openTsServerLog.title": "TS Server-Protokolldatei öffnen", + "typescript.restartTsServer": "TS Server neu starten", "typescript.selectTypeScriptVersion.title": "TypeScript-Version wählen", "jsDocCompletion.enabled": "Automatische JSDoc-Kommentare aktivieren/deaktivieren", - "javascript.implicitProjectConfig.checkJs": "Aktiviert/deaktiviert die Semantikprüfung bei JavaScript-Dateien. Diese Einstellung wird von vorhandenen \"jsconfig.json\"- oder \"tsconfig.json\"-Dateien außer Kraft gesetzt. Erfordert TypeScript 2.3.1 oder höher.", - "typescript.check.npmIsInstalled": "Überprüfen, ob NPM für automatische Typerfassung installiert ist" + "javascript.implicitProjectConfig.checkJs": "Aktiviert/deaktiviert die Semantikprüfung bei JavaScript-Dateien. Diese Einstellung wird von vorhandenen \"jsconfig.json\"- oder \"tsconfig.json\"-Dateien außer Kraft gesetzt. Erfordert TypeScript 2.3.1 oder höher." } \ No newline at end of file diff --git a/i18n/deu/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/deu/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index 24c2e906e9053..9b3e7fa3e6ebb 100644 --- a/i18n/deu/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/deu/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,6 +6,7 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "Das Bild ist zu groß für den Editor. ", + "resourceOpenExternalButton": "Bild mit externem Programm öffnen?", "nativeBinaryError": "Die Datei wird nicht im Editor angezeigt, weil sie binär oder sehr groß ist oder eine nicht unterstützte Textcodierung verwendet.", "sizeB": "{0} B", "sizeKB": "{0} KB", diff --git a/i18n/deu/src/vs/code/electron-main/menus.i18n.json b/i18n/deu/src/vs/code/electron-main/menus.i18n.json index 2a26af07f79de..739090b752177 100644 --- a/i18n/deu/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/deu/src/vs/code/electron-main/menus.i18n.json @@ -14,6 +14,7 @@ "mHelp": "&&Hilfe", "miNewWindow": "Neues &&Fenster", "mAbout": "Informationen zu {0}", + "mServices": "Dienste", "mHide": "{0} ausblenden", "mHideOthers": "Andere ausblenden", "mShowAll": "Alle anzeigen", @@ -148,12 +149,12 @@ "miLicense": "&&Lizenz anzeigen", "miPrivacyStatement": "&&Datenschutzerklärung", "miAbout": "&&Info", + "accessibilityOptionsWindowTitle": "Optionen für erleichterte Bedienung", "miRestartToUpdate": "Für Update neu starten...", "miCheckingForUpdates": "Überprüfen auf Updates...", "miDownloadUpdate": "Verfügbares Update herunterladen", "miDownloadingUpdate": "Das Update wird heruntergeladen...", "miInstallingUpdate": "Update wird installiert...", - "miCheckForUpdates": "Auf Updates überprüfen...", "aboutDetail": "\nVersion {0}\nCommit {1}\nDatum {2}\nShell {3}\nRenderer {4}\nNode {5}", "okButton": "OK" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json index a01ec274ece9a..15fd087f170d3 100644 --- a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "Steuert die Schriftbreite.", "fontSize": "Steuert den Schriftgrad in Pixeln.", "lineHeight": "Steuert die Zeilenhöhe. Verwenden Sie 0, um LineHeight aus der FontSize-Angabe zu berechnen.", + "letterSpacing": "Steuert den Zeichenabstand in Pixeln.", "lineNumbers": "Steuert die Anzeige von Zeilennummern. Mögliche Werte sind \"Ein\", \"Aus\" und \"Relativ\". \"Relativ\" zeigt die Zeilenanzahl ab der aktuellen Cursorposition.", "rulers": "Spalten, an denen vertikale Lineale angezeigt werden sollen", "wordSeparators": "Zeichen, die als Worttrennzeichen verwendet werden, wenn wortbezogene Navigationen oder Vorgänge ausgeführt werden.", diff --git a/i18n/deu/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/deu/src/vs/editor/contrib/links/browser/links.i18n.json index 8445991334986..3c582ab348dc5 100644 --- a/i18n/deu/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "BEFEHLSTASTE + Mausklick zum Aufrufen des Links", "links.navigate": "STRG + Mausklick zum Aufrufen des Links", + "links.navigate.al": "ALT + Mausklick zum Aufrufen des Links", "invalid.url": "Fehler beim Öffnen dieses Links, weil er nicht wohlgeformt ist: {0}", "missing.url": "Fehler beim Öffnen dieses Links, weil das Ziel fehlt.", "label": "Link öffnen" diff --git a/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 73686f1e29534..df507c729f972 100644 --- a/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -12,6 +12,7 @@ "readMore": "Mehr anzeigen...{0}", "suggestionWithDetailsAriaLabel": "{0}, Vorschlag, hat Details", "suggestionAriaLabel": "{0}, Vorschlag", + "readLess": "Weniger anzeigen...{0}", "suggestWidget.loading": "Wird geladen...", "suggestWidget.noSuggestions": "Keine Vorschläge.", "suggestionAriaAccepted": "{0}, angenommen", diff --git a/i18n/deu/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/deu/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/deu/src/vs/workbench/api/node/extHostTreeViews.i18n.json index 8b6ad71cd4e6d..83810e505c9f2 100644 --- a/i18n/deu/src/vs/workbench/api/node/extHostTreeViews.i18n.json +++ b/i18n/deu/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "treeItem.notFound": "Kein Tree-Eintrag mit der id '{0}' gefunden.", + "treeView.duplicateElement": "Element {0} ist bereit registriert." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/common/theme.i18n.json b/i18n/deu/src/vs/workbench/common/theme.i18n.json index 825c4c4c37769..52d4cbaf357a2 100644 --- a/i18n/deu/src/vs/workbench/common/theme.i18n.json +++ b/i18n/deu/src/vs/workbench/common/theme.i18n.json @@ -7,12 +7,9 @@ "tabActiveBackground": "Hintergrundfarbe der aktiven Registerkarte. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", "tabInactiveBackground": "Hintergrundfarbe der inaktiven Registerkarte. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", "tabBorder": "Rahmen zum Trennen von Registerkarten. Registerkarten sind die Container für Editoren im Editor-Bereich. In einer Editor-Gruppe können mehrere Registerkarten geöffnet werden. Mehrere Editor-Gruppen sind möglich.", - "tabActiveEditorGroupActiveForeground": "Vordergrundfarbe der aktiven Registerkarte in einer aktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", - "tabInactiveEditorGroupActiveForeground": "Vordergrundfarbe der inaktiven Registerkarte in einer aktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", "editorGroupBackground": "Hintergrundfarbe einer Editor-Gruppe. Editor-Gruppen sind die Container der Editoren. Die Hintergrundfarbe wird beim Ziehen von Editoren angezeigt.", "editorGroupHeaderBackground": "Hintergrundfarbe der Titelüberschrift des Editors, wenn die Registerkarten deaktiviert sind. Editor-Gruppen sind die Container der Editoren.", "editorGroupBorder": "Farbe zum Trennen mehrerer Editor-Gruppen. Editor-Gruppen sind die Container der Editoren.", - "panelBackground": "Hintergrundfarbe des Panels. Panels werden unter dem Editorbereich angezeigt und enthalten Ansichten wie die Ausgabe und das integrierte Terminal.", "panelBorder": "Farbe des oberen Panelrahmens, der das Panel vom Editor abtrennt. Panels werden unter dem Editorbereich angezeigt und enthalten Ansichten wie die Ausgabe und das integrierten Terminal.", "panelActiveTitleForeground": "Titelfarbe für den aktiven Bereich. Bereiche werden unter dem Editorbereich angezeigt und enthalten Ansichten wie Ausgabe und integriertes Terminal.", "panelInactiveTitleForeground": "Titelfarbe für den inaktiven Bereich. Bereiche werden unter dem Editorbereich angezeigt und enthalten Ansichten wie Ausgabe und integriertes Terminal.", diff --git a/i18n/deu/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/workbench.i18n.json index 8b6ad71cd4e6d..db7c9434c92a2 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/workbench.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/workbench.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "developer": "Entwickler", + "file": "Datei" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 68430d7756046..7c044c0e58086 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "Nur primitive Werte werden für dieses Objekt angezeigt.", - "debuggingStarted": "Das Debuggen wurde gestartet.", "debuggingPaused": "Das Debuggen wurde angehalten. Ursache {0}, {1}{2}", + "debuggingStarted": "Das Debuggen wurde gestartet.", "debuggingStopped": "Das Debuggen wurde beendet.", "breakpointAdded": "Der Haltepunkt wurde hinzugefügt. Zeile {0}, Datei \"{1}\".", "breakpointRemoved": "Der Haltepunkt wurde entfernt. Zeile {0}, Datei \"{1}\".", diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index 77b8513319c99..bef42d1efed70 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "Wert kopieren", "copy": "Kopieren", + "copyAll": "Alles kopieren", "copyStackTrace": "Aufrufliste kopieren" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 687359bd4866a..b7e6e1897409c 100644 --- a/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -9,5 +9,6 @@ "prof.message": "Profile wurden erfolgreich erstellt.", "prof.detail": "Erstellen Sie ein Problem, und fügen Sie die folgenden Dateien manuell an:\n{0}", "prof.restartAndFileIssue": "Problem erstellen und neu starten", - "prof.restart": "Neu starten" + "prof.restart": "Neu starten", + "prof.thanks": "Danke für Ihre Hilfe." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 9a66f7f69c7ac..17617151e91f6 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "Tastenbindung definieren", - "defineKeybinding.kbLayoutInfoMessage": "Drücken Sie für Ihr aktuelles Tastaturlayout ", "defineKeybinding.kbLayoutErrorMessage": "Sie können diese Tastenkombination mit Ihrem aktuellen Tastaturlayout nicht generieren." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/deu/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index 9d86b8f724410..37e4e48936217 100644 --- a/i18n/deu/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "Alle Befehle anzeigen", + "showCommands.label": "Befehlspalette...", "entryAriaLabelWithKey": "{0}, {1}, Befehle", "entryAriaLabel": "{0}, Befehle", "canNotRun": "Der Befehl '{0}' kann nicht an dieser Stelle ausgeführt werden.", diff --git a/i18n/deu/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index a72e1281b77a6..bf5de1662ada6 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,13 +5,12 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "Warnung: \"options.cwd\" muss vom Typ \"string\" sein. Der Wert {0} wird ignoriert.\n", - "ConfigurationParser.noShell": "Warnung: Die Shell-Konfiguration wird nur beim Ausführen von Tasks im Terminal unterstützt.", "ConfigurationParser.noargs": "Fehler: Befehlsargumente müssen ein Array aus Zeichenfolgen sein. Angegebener Wert:\n{0}", + "ConfigurationParser.noShell": "Warnung: Die Shell-Konfiguration wird nur beim Ausführen von Tasks im Terminal unterstützt.", "ConfigurationParser.noName": "Fehler: Der Problemabgleich im Deklarationsbereich muss einen Namen besitzen:\n{0}\n", "ConfigurationParser.unknownMatcherKind": "Warnung: Der definierte Problemabgleich ist unbekannt. Die folgenden Typen werden unterstützt: string | ProblemMatcher | (string | ProblemMatcher)[].\n{0}\n", "ConfigurationParser.invalidVaraibleReference": "Fehler: Ungültiger ProblemMatcher-Verweis: {0}\n", "ConfigurationParser.noTaskName": "Fehler: Tasks müssen eine Eigenschaft \"TaskName\" angeben. Der Task wird ignoriert.\n{0}\n", "taskConfiguration.shellArgs": "Warnung: Die Aufgabe \"{0}\" ist ein Shellbefehl, und der Befehlsname oder eines seiner Argumente enthält Leerzeichen ohne Escapezeichen. Führen Sie Argumente im Befehl zusammen, um eine korrekte Angabe der Befehlszeile sicherzustellen.", - "taskConfiguration.noCommandOrDependsOn": "Fehler: Aufgabe \"{0}\" definiert keinen Befehl bzw. keine depondsOn-Eigenschaft. Die Aufgabe wird ignoriert. Die Definition lautet:\n{1}", "taskConfiguration.noCommand": "Fehler: Aufgabe \"{0}\" definiert keinen Befehl. Die Aufgabe wird ignoriert. Die Definition lautet:\n{1}" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index e52c61e82c75a..1363d395b952b 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "JsonSchema.version": "Die Versionsnummer der Konfiguration.", - "JsonSchema.windows": "Windows-spezifische Befehlskonfiguration", - "JsonSchema.mac": "Mac-spezifische Befehlskonfiguration", - "JsonSchema.linux": "Linux-spezifische Befehlskonfiguration", "JsonSchema.shell": "Gibt an, ob der Befehl ein Shellbefehl oder ein externes Programm ist. Wenn keine Angabe erfolgt, ist der Standardwert \"false\".", "JsonSchema.tasks.dependsOn.string": "Eine weitere Aufgabe, von der diese Aufgabe abhängt.", - "JsonSchema.tasks.dependsOn.array": "Die anderen Aufgaben, von denen diese Aufgabe abhängt." + "JsonSchema.tasks.dependsOn.array": "Die anderen Aufgaben, von denen diese Aufgabe abhängt.", + "JsonSchema.windows": "Windows-spezifische Befehlskonfiguration", + "JsonSchema.mac": "Mac-spezifische Befehlskonfiguration", + "JsonSchema.linux": "Linux-spezifische Befehlskonfiguration" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index b167d91d677c3..57931ea4bd6ff 100644 --- a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,6 +11,7 @@ "welcomePage.openFolder": "Ordner öffnen...", "welcomePage.cloneGitRepository": "Git-Repository klonen...", "welcomePage.recent": "Zuletzt verwendet", + "welcomePage.moreRecent": "Weitere Informationen...", "welcomePage.noRecentFolders": "Keine kürzlich verwendeten Ordner", "welcomePage.help": "Hilfe", "welcomePage.introductoryVideos": "Einführungsvideos", @@ -19,10 +20,12 @@ "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Willkommensseite beim Start anzeigen", "welcomePage.customize": "Anpassen", + "welcomePage.moreExtensions": "mehr", "welcomePage.installKeymapDescription": "Tastenkombinationen installieren", "welcomePage.others": "Andere", "welcomePage.colorTheme": "Farbdesign", "welcomePage.colorThemeDescription": "Passen Sie das Aussehen des Editors und Ihres Codes an Ihre Wünsche an.", + "welcomePage.learn": "Lernen", "welcomePage.showCommands": "Alle Befehle suchen und ausführen", "welcomePage.showCommandsDescription": "Über die Einstellungen ({0}) können Sie Befehle schnell suchen und darauf zugreifen.", "welcomePage.interfaceOverview": "Überblick über die Schnittstelle", diff --git a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 5693a1f5b13de..a6f6f26a54aab 100644 --- a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -5,11 +5,15 @@ // Do not edit this file. It is machine generated. { "welcomePage": "Willkommen", + "welcomePage.javaScript": "JavaScript", "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", "welcomePage.vim": "Vim", "welcomePage.sublime": "Sublime", "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "Unterstützung für {0} ist bereits installiert.", "welcomePage.keymapAlreadyInstalled": "Die {0} Tastenkombinationen sind bereits installiert.", "welcomePage.willReloadAfterInstallingKeymap": "Das Fenster wird nach der Installation der {0}-Tastaturbefehle neu geladen.", "welcomePage.installingKeymap": "Die {0}-Tastenkombinationen werden installiert...", diff --git a/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json index 22ca13053b59f..8b6ad71cd4e6d 100644 --- a/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,9 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "acceptCurrentChange": "Aceptar cambio actual", - "acceptIncomingChange": "Aceptar cambio entrante", - "acceptBothChanges": "Aceptar ambos cambios", - "compareChanges": "Comparar cambios" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json index eb8028b1717b2..c3d2c17c302ba 100644 --- a/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json @@ -5,7 +5,6 @@ // Do not edit this file. It is machine generated. { "cursorNotInConflict": "El cursor de edición no se encuentra en un conflicto de fusión", - "compareChangesTitle": "{0}: Cambios actuales \\u2194 Cambios entrantes", "cursorOnSplitterRange": "El cursor del editor está dentro del separador de conflictos de fusión, muévalo al bloque \"actual\" o al \"entrante\" ", "noConflicts": "No se encontraron conflictos en este archivo", "noOtherConflictsInThisFile": "No hay más conflictos en este archivo" diff --git a/i18n/esn/extensions/merge-conflict/package.i18n.json b/i18n/esn/extensions/merge-conflict/package.i18n.json index 880711d45ac89..97bdb64996225 100644 --- a/i18n/esn/extensions/merge-conflict/package.i18n.json +++ b/i18n/esn/extensions/merge-conflict/package.i18n.json @@ -5,15 +5,7 @@ // Do not edit this file. It is machine generated. { "command.category": "Fusionar conflicto", - "command.accept.all-incoming": "Aceptar todos los entrantes", - "command.accept.all-both": "Aceptar todos ambos", - "command.accept.current": "Aceptar actual", - "command.accept.incoming": "Aceptar entrante", - "command.accept.selection": "Aceptar selección", "command.accept.both": "Aceptar ambos", - "command.next": "Siguiente conflicto", - "command.previous": "Conflicto anterior", - "command.compare": "Comparar conflicto actual", "config.title": "Fusionar conflicto", "config.codeLensEnabled": "Habilitar/deshabilitar CodeLens de fusionar bloque de conflictos en el editor", "config.decoratorsEnabled": "Habilitar/deshabilitar decoradores de conflictos de fusión en el editor" diff --git a/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json index f522401a83d6e..0d39c772a73fb 100644 --- a/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,7 +5,6 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Recuperando cambios en los datos para un mejor rendimiento de TypeScript IntelliSense", - "typesInstallerInitializationFailed.title": "No se pudieron instalar los archivos de lenguaje para las características de lenguaje JavaScript. Asegúrese que NPM está instalado y en su ruta de acceso", "typesInstallerInitializationFailed.moreInformation": "Más información", "typesInstallerInitializationFailed.doNotCheckAgain": "No volver a comprobar", "typesInstallerInitializationFailed.close": "Cerrar" diff --git a/i18n/esn/extensions/typescript/package.i18n.json b/i18n/esn/extensions/typescript/package.i18n.json index 4ff6892a0a6e6..3de04eb5b4a60 100644 --- a/i18n/esn/extensions/typescript/package.i18n.json +++ b/i18n/esn/extensions/typescript/package.i18n.json @@ -41,6 +41,5 @@ "typescript.selectTypeScriptVersion.title": "Seleccionar versión de TypeScript", "jsDocCompletion.enabled": "Habilita o deshabilita comentarios automaticos de JSDoc", "javascript.implicitProjectConfig.checkJs": "Habilita/deshabilita la comprobación semántica de los archivos JavaScript. Los archivos jsconfig.json o tsconfig.json reemplazan esta configuración. Se requiere TypeScript >=2.3.1.", - "typescript.check.npmIsInstalled": "Comprueba si NPM esta instalado para recibir adquisiciones automaticas de Typings", "javascript.nameSuggestions": "Habilitar/deshabilitar nombres únicos de la lista de sugerencias en los archivos de JavaScript. " } \ No newline at end of file diff --git a/i18n/esn/src/vs/code/electron-main/menus.i18n.json b/i18n/esn/src/vs/code/electron-main/menus.i18n.json index 44ff7a3f5f133..4b1468558adcd 100644 --- a/i18n/esn/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/esn/src/vs/code/electron-main/menus.i18n.json @@ -153,12 +153,12 @@ "miLicense": "Ver &&licencia", "miPrivacyStatement": "&&Declaración de privacidad", "miAbout": "&&Acerca de", + "accessibilityOptionsWindowTitle": "Opciones de accesibilidad", "miRestartToUpdate": "Reiniciar para actualizar...", "miCheckingForUpdates": "Buscando actualizaciones...", "miDownloadUpdate": "Descargar actualización disponible", "miDownloadingUpdate": "Descargando actualización...", "miInstallingUpdate": "Instalando actualización...", - "miCheckForUpdates": "Buscar actualizaciones...", "aboutDetail": "\nVersión {0}\nConfirmación {1}\nFecha {2}\nShell {3}\nRepresentador {4}\nNode {5}", "okButton": "Aceptar" } \ No newline at end of file diff --git a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json index 889a845a81315..c20c4e2b34f70 100644 --- a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -60,7 +60,6 @@ "editorBackground": "Color de fondo del editor.", "editorForeground": "Color de primer plano predeterminado del editor.", "editorWidgetBackground": "Color de fondo del editor de widgets como buscar/reemplazar", - "editorWidgetBorder": "Color de borde del editor de widget.", "editorSelection": "Color de la selección del editor.", "editorInactiveSelection": "Color de la selección en un editor inactivo.", "editorSelectionHighlight": "Color de las regiones con el mismo contenido que la selección.", diff --git a/i18n/esn/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/esn/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/common/theme.i18n.json b/i18n/esn/src/vs/workbench/common/theme.i18n.json index 40dfe03ebb699..9ae35bba944bd 100644 --- a/i18n/esn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/esn/src/vs/workbench/common/theme.i18n.json @@ -7,14 +7,11 @@ "tabActiveBackground": "Color de fondo de la pestaña activa. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "tabInactiveBackground": "Color de fondo de la pestaña inactiva. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "tabBorder": "Borde para separar las pestañas entre sí. Las pestañas son contenedores de editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", - "tabActiveEditorGroupActiveForeground": "Color de primer plano de la pestaña activa en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", - "tabInactiveEditorGroupActiveForeground": "Color de primer plano de la pestaña inactiva en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "editorGroupBackground": "Color de fondo de un grupo de editores. Los grupos de editores son los contenedores de los editores. El color de fondo se ve cuando se mueven arrastrando los grupos de editores.", "tabsContainerBackground": "Color de fondo del encabezado del título del grupo de editores cuando las fichas están habilitadas. Los grupos de editores son contenedores de editores.", "editorGroupHeaderBackground": "Color de fondo del encabezado del título del grupo de editores cuando las fichas están deshabilitadas. Los grupos de editores son contenedores de editores.", "editorGroupBorder": "Color para separar varios grupos de editores entre sí. Los grupos de editores son los contenedores de los editores.", "editorDragAndDropBackground": "Color de fondo cuando se arrastran los editores. El color debería tener transparencia para que el contenido del editor pueda brillar a su través.", - "panelBackground": "Color de fondo del panel. Los paneles se muestran debajo del área de editores y contienen vistas, como Salida y Terminal integrado.", "panelBorder": "Color del borde superior del panel que lo separa del editor. Los paneles se muestran debajo del área de editores y contienen vistas, como Salida y Terminal integrado.", "panelActiveTitleForeground": "Color del título del panel activo. Los paneles se muestran debajo del área del editor y contienen vistas como Salida y Terminal integrado.", "panelInactiveTitleForeground": "Color del título del panel inactivo. Los paneles se muestran debajo del área del editor y contienen vistas como Salida y Terminal integrado.", diff --git a/i18n/esn/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/workbench.i18n.json index 8b6ad71cd4e6d..24a3d974637a1 100644 --- a/i18n/esn/src/vs/workbench/electron-browser/workbench.i18n.json +++ b/i18n/esn/src/vs/workbench/electron-browser/workbench.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "developer": "Desarrollador", + "file": "Archivo" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 96a50f5d740f8..ce2f816c86847 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "Solo se muestran valores primitivos para este objeto.", - "debuggingStarted": "La depuración se ha iniciado.", "debuggingPaused": "La depuración se ha pausado. Motivo: {0}, {1} {2}", + "debuggingStarted": "La depuración se ha iniciado.", "debuggingStopped": "La depuración se ha detenido.", "breakpointAdded": "Punto de interrupción agregado, línea {0}, archivo {1}", "breakpointRemoved": "Punto de interrupción quitado, línea {0}, archivo {1}", diff --git a/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index cb715f512200f..6c042c0daffdb 100644 --- a/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "Definir enlace de teclado", - "defineKeybinding.kbLayoutInfoMessage": "Para la distribución del teclado actual, presione ", "defineKeybinding.kbLayoutErrorMessage": "La distribución del teclado actual no permite reproducir esta combinación de teclas." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index 30e2262eef7a1..e5995f59713d9 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tareas", - "workspace": "De área de trabajo", - "extension": "De extensiones" + "entryAriaLabel": "{0}, tareas" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 14c75ef21d985..2cc7fa5953567 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,13 +5,12 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "Advertencia: options.cwd debe ser de tipo cadena. Se ignora el valor {0}.", - "ConfigurationParser.noShell": "Advertencia: La configuración del shell solo se admite al ejecutar tareas en el terminal.", "ConfigurationParser.noargs": "Error: Los argumentos de comando deben ser una matriz de cadenas. El valor proporcionado es: {0}", + "ConfigurationParser.noShell": "Advertencia: La configuración del shell solo se admite al ejecutar tareas en el terminal.", "ConfigurationParser.noName": "Error: El buscador de coincidencias de problemas del ámbito de declaración debe tener un nombre: {0}", "ConfigurationParser.unknownMatcherKind": "Advertencia: El buscador de coincidencias de problemas definido se desconoce. Los tipos admitidos son string | ProblemMatcher | (string | ProblemMatcher). {0}", "ConfigurationParser.invalidVaraibleReference": "Error: Referencia a problemMatcher no válida: {0}", "ConfigurationParser.noTaskName": "Error: Las tareas deben proporcionar una propiedad taskName. La tarea se ignorará. {0}", "taskConfiguration.shellArgs": "Advertencia: La tarea \"{0}\" es un comando de shell y su nombre de comando o uno de sus argumentos tiene espacios sin escape. Para asegurarse de que la línea de comandos se cite correctamente, combine mediante fusión los argumentos en el comando.", - "taskConfiguration.noCommandOrDependsOn": "Error: La tarea \"{0}\" no especifica un comando ni una propiedad dependsOn. La tarea se ignorará. Su definición es: {1}", "taskConfiguration.noCommand": "Error: La tarea \"{0}\" no define un comando. La tarea se ignorará. Su definición es: {1}" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 35f7a06e8d6c1..a568620f9fe1e 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "JsonSchema.version": "Número de versión de la configuración", - "JsonSchema.windows": "Configuración de comando específico de Windows", - "JsonSchema.mac": "Configuración de comando específico de Mac", - "JsonSchema.linux": "Configuración de comando específico de Linux", "JsonSchema.shell": "Especifica si el comando es un comando shell o un programa externo. Si se omite, el valor predeterminado es false.", "JsonSchema.tasks.dependsOn.string": "Otra tarea de la que depende esta tarea.", - "JsonSchema.tasks.dependsOn.array": "Las otras tareas de las que depende esta tarea." + "JsonSchema.tasks.dependsOn.array": "Las otras tareas de las que depende esta tarea.", + "JsonSchema.windows": "Configuración de comando específico de Windows", + "JsonSchema.mac": "Configuración de comando específico de Mac", + "JsonSchema.linux": "Configuración de comando específico de Linux" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 57b34bdf736e4..0ada1a16443c4 100644 --- a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -25,7 +25,5 @@ "welcomePage.extensionListSeparator": ", ", "welcomePage.installedExtension": "{0} (instalado)", "ok": "Aceptar", - "cancel": "Cancelar", - "welcomePage.quickLinkBackground": "Color de fondo de los vínculos rápidos en la página principal.", - "welcomePage.quickLinkHoverBackground": "Mantener el puntero sobre el color de fondo para acceder los vínculos rápidos en la página principal." + "cancel": "Cancelar" } \ No newline at end of file diff --git a/i18n/fra/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/fra/extensions/typescript/out/utils/typingsStatus.i18n.json index d9cc787276c71..0b61796218ce7 100644 --- a/i18n/fra/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/fra/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,7 +5,6 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Récupération (fetch) des données pour l'amélioration de TypeScript IntelliSense", - "typesInstallerInitializationFailed.title": "Impossible d'installer des fichiers de typages pour les fonctionnalités du langage JavaScript. Vérifiez que NPM est installé et se trouve dans votre chemin", "typesInstallerInitializationFailed.moreInformation": "Informations", "typesInstallerInitializationFailed.doNotCheckAgain": "Ne plus vérifier", "typesInstallerInitializationFailed.close": "Fermer" diff --git a/i18n/fra/extensions/typescript/package.i18n.json b/i18n/fra/extensions/typescript/package.i18n.json index d60399d9b5bde..d672a75d013d7 100644 --- a/i18n/fra/extensions/typescript/package.i18n.json +++ b/i18n/fra/extensions/typescript/package.i18n.json @@ -36,6 +36,5 @@ "typescript.implementationsCodeLens.enabled": "Activer/désactiver CodeLens dans les implémentations. Nécessite TypeScript >= 2.2.0.", "typescript.selectTypeScriptVersion.title": "Sélectionner la version de TypeScript", "jsDocCompletion.enabled": "Activer/désactiver les commentaires JSDoc automatiques", - "javascript.implicitProjectConfig.checkJs": "Activer/désactiver la vérification sémantique des fichiers JavaScript. Les fichiers jsconfig.json ou tsconfig.json existants remplacent ce paramètre. Nécessite TypeScript >=2.3.1.", - "typescript.check.npmIsInstalled": "Vérifie si NPM est installé pour l'acquisition automatique des typages" + "javascript.implicitProjectConfig.checkJs": "Activer/désactiver la vérification sémantique des fichiers JavaScript. Les fichiers jsconfig.json ou tsconfig.json existants remplacent ce paramètre. Nécessite TypeScript >=2.3.1." } \ No newline at end of file diff --git a/i18n/fra/src/vs/code/electron-main/menus.i18n.json b/i18n/fra/src/vs/code/electron-main/menus.i18n.json index 767d8088cca7d..770b210d7645a 100644 --- a/i18n/fra/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/fra/src/vs/code/electron-main/menus.i18n.json @@ -148,12 +148,12 @@ "miLicense": "Affic&&her la licence", "miPrivacyStatement": "Déc&&laration de confidentialité", "miAbout": "À pr&&opos de", + "accessibilityOptionsWindowTitle": "Options d'accessibilité", "miRestartToUpdate": "Redémarrer pour mettre à jour...", "miCheckingForUpdates": "Recherche des mises à jour...", "miDownloadUpdate": "Télécharger la mise à jour disponible", "miDownloadingUpdate": "Téléchargement de la mise à jour...", "miInstallingUpdate": "Installation de la mise à jour...", - "miCheckForUpdates": "Rechercher les mises à jour...", "aboutDetail": "\nVersion {0}\nValidation {1}\nDate {2}\nInterpréteur de commandes {3}\nConvertisseur {4}\nNode {5}", "okButton": "OK" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/fra/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/common/theme.i18n.json b/i18n/fra/src/vs/workbench/common/theme.i18n.json index 8363fa14b9a09..541ca65cc44ba 100644 --- a/i18n/fra/src/vs/workbench/common/theme.i18n.json +++ b/i18n/fra/src/vs/workbench/common/theme.i18n.json @@ -7,12 +7,9 @@ "tabActiveBackground": "Couleur d'arrière-plan de l'onglet actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", "tabInactiveBackground": "Couleur d'arrière-plan de l'onglet inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", "tabBorder": "Bordure séparant les onglets les uns des autres. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "tabActiveEditorGroupActiveForeground": "Couleur de premier plan de l'onglet actif dans un groupe actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", - "tabInactiveEditorGroupActiveForeground": "Couleur de premier plan de l'onglet inactif dans un groupe actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", "editorGroupBackground": "Couleur d'arrière-plan d'un groupe d'éditeurs. Les groupes d'éditeurs sont les conteneurs des éditeurs. La couleur d'arrière-plan s'affiche pendant le glissement de groupes d'éditeurs.", "editorGroupHeaderBackground": "Couleur d'arrière-plan de l'en-tête du titre du groupe d'éditeurs quand les onglets sont désactivés. Les groupes d'éditeurs sont les conteneurs des éditeurs.", "editorGroupBorder": "Couleur séparant plusieurs groupes d'éditeurs les uns des autres. Les groupes d'éditeurs sont les conteneurs des éditeurs.", - "panelBackground": "Couleur d'arrière-plan du panneau. Les panneaux s'affichent sous la zone d'éditeurs et contiennent des affichages tels que la sortie et le terminal intégré.", "panelBorder": "Couleur de bordure de panneau dans la partie supérieure de séparation de l'éditeur. Les panneaux s'affichent sous la zone d'éditeurs et contiennent des affichages tels que la sortie et le terminal intégré.", "panelActiveTitleForeground": "Couleur du titre du panneau actif. Les panneaux se situent sous la zone de l'éditeur et contiennent des affichages comme la sortie et le terminal intégré.", "panelInactiveTitleForeground": "Couleur du titre du panneau inactif. Les panneaux se situent sous la zone de l'éditeur et contiennent des affichages comme la sortie et le terminal intégré.", diff --git a/i18n/fra/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/workbench.i18n.json index 8b6ad71cd4e6d..771fa003a693f 100644 --- a/i18n/fra/src/vs/workbench/electron-browser/workbench.i18n.json +++ b/i18n/fra/src/vs/workbench/electron-browser/workbench.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "developer": "Développeur", + "file": "Fichier" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 377b069eb131a..afd0c7bd38686 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "Seules les valeurs primitives sont affichées pour cet objet.", - "debuggingStarted": "Débogage démarré.", "debuggingPaused": "Débogage en pause. Raison : {0}, {1} {2}", + "debuggingStarted": "Débogage démarré.", "debuggingStopped": "Débogage arrêté.", "breakpointAdded": "Point d'arrêt ajouté, ligne {0}, fichier {1}", "breakpointRemoved": "Point d'arrêt supprimé, ligne {0}, fichier {1}", diff --git a/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index d147a9a8e3203..0a1d06c06efe6 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "Définir une combinaison de touches", - "defineKeybinding.kbLayoutInfoMessage": "Pour votre disposition actuelle du clavier, appuyez sur ", "defineKeybinding.kbLayoutErrorMessage": "Vous ne pouvez pas produire cette combinaison de touches avec la disposition actuelle du clavier." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index ae9887787513b..5c565fd63896a 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,13 +5,12 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "Warning: options.cwd must be of type string. Ignoring value {0}\n", - "ConfigurationParser.noShell": "Avertissement : La configuration de l'interpréteur de commandes n'est prise en charge que durant l'exécution des tâches dans le terminal.", "ConfigurationParser.noargs": "Erreur : les arguments de commande doivent correspondre à un tableau de chaînes. La valeur fournie est :\n{0}", + "ConfigurationParser.noShell": "Avertissement : La configuration de l'interpréteur de commandes n'est prise en charge que durant l'exécution des tâches dans le terminal.", "ConfigurationParser.noName": "Erreur : le détecteur de problèmes de correspondance dans la portée de déclaration doit avoir un nom :\n{0}\n", "ConfigurationParser.unknownMatcherKind": "Avertissement : le détecteur de problèmes de correspondance défini est inconnu. Les types pris en charge sont string | ProblemMatcher | (string | ProblemMatcher)[].\n{0}\n", "ConfigurationParser.invalidVaraibleReference": "Erreur : référence à problemMatcher non valide : {0}\n", "ConfigurationParser.noTaskName": "Erreur : les tâches doivent fournir une propriété taskName. La tâche va être ignorée.\n{0}\n", "taskConfiguration.shellArgs": "Avertissement : La tâche '{0}' est une commande d'interpréteur de commandes, et le nom de la commande ou l'un de ses arguments contient des espaces non précédés d'un caractère d'échappement. Pour garantir une ligne de commande correcte, fusionnez les arguments dans la commande.", - "taskConfiguration.noCommandOrDependsOn": "Erreur : La tâche '{0}' ne spécifie ni une commande, ni une propriété dependsOn. La tâche va être ignorée. Sa définition est :\n{1}", "taskConfiguration.noCommand": "Erreur : La tâche '{0}' ne définit aucune commande. La tâche va être ignorée. Sa définition est :\n{1}" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 19b06a2f22400..c95ac82e6a87e 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "JsonSchema.version": "Numéro de version de la configuration", - "JsonSchema.windows": "Configuration de commande spécifique à Windows", - "JsonSchema.mac": "Configuration de commande spécifique à Mac", - "JsonSchema.linux": "Configuration de commande spécifique à Linux", "JsonSchema.shell": "Spécifie si la commande est une commande d'interpréteur de commandes ou un programme externe. La valeur par défaut est false, en cas d'omission.", "JsonSchema.tasks.dependsOn.string": "Autre tâche dont cette tâche dépend.", - "JsonSchema.tasks.dependsOn.array": "Autres tâches dont cette tâche dépend." + "JsonSchema.tasks.dependsOn.array": "Autres tâches dont cette tâche dépend.", + "JsonSchema.windows": "Configuration de commande spécifique à Windows", + "JsonSchema.mac": "Configuration de commande spécifique à Mac", + "JsonSchema.linux": "Configuration de commande spécifique à Linux" } \ No newline at end of file diff --git a/i18n/ita/extensions/git/out/commands.i18n.json b/i18n/ita/extensions/git/out/commands.i18n.json index 530bbe4a409b9..1890044ddd33e 100644 --- a/i18n/ita/extensions/git/out/commands.i18n.json +++ b/i18n/ita/extensions/git/out/commands.i18n.json @@ -26,6 +26,9 @@ "provide commit message": "Specificare un messaggio di commit", "branch name": "Nome ramo", "provide branch name": "Specificare un nome di ramo", + "select branch to delete": "Seleziona un ramo da cancellare", + "confirm force delete branch": "Il merge del ramo '{0}' non è completo. Elimina comunque?", + "delete branch": "Elimina ramo", "no remotes to pull": "Il repository non contiene elementi remoti configurati come origini del pull.", "no remotes to push": "Il repository non contiene elementi remoti configurati come destinazione del push.", "nobranch": "Estrarre un ramo per eseguire il push in un elemento remoto.", diff --git a/i18n/ita/extensions/git/package.i18n.json b/i18n/ita/extensions/git/package.i18n.json index 3ba24f908e935..9e1b703cc3db0 100644 --- a/i18n/ita/extensions/git/package.i18n.json +++ b/i18n/ita/extensions/git/package.i18n.json @@ -26,6 +26,7 @@ "command.undoCommit": "Annulla ultimo commit", "command.checkout": "Estrai in...", "command.branch": "Crea ramo...", + "command.deleteBranch": "Elimina ramo...", "command.pull": "Esegui pull", "command.pullRebase": "Esegui pull (Riassegna)", "command.push": "Esegui push", diff --git a/i18n/ita/extensions/jake/out/main.i18n.json b/i18n/ita/extensions/jake/out/main.i18n.json index 8b6ad71cd4e6d..be50361d378e5 100644 --- a/i18n/ita/extensions/jake/out/main.i18n.json +++ b/i18n/ita/extensions/jake/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Rilevamento automatico di Jake non riuscito - errore: {0}" +} \ No newline at end of file diff --git a/i18n/ita/extensions/jake/package.i18n.json b/i18n/ita/extensions/jake/package.i18n.json index 8b6ad71cd4e6d..76d5185d8c347 100644 --- a/i18n/ita/extensions/jake/package.i18n.json +++ b/i18n/ita/extensions/jake/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.jake.autoDetect": "Controlla se la rilevazione automatica delle attività Jake è on/off. L'impostazione predefinita è 'on'." +} \ No newline at end of file diff --git a/i18n/ita/extensions/markdown/out/extension.i18n.json b/i18n/ita/extensions/markdown/out/extension.i18n.json index 8b6ad71cd4e6d..2448cc1f0e072 100644 --- a/i18n/ita/extensions/markdown/out/extension.i18n.json +++ b/i18n/ita/extensions/markdown/out/extension.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "onPreviewStyleLoadError": "Impossibile caricare 'markdown.styles': {0}" +} \ No newline at end of file diff --git a/i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json index 8b6ad71cd4e6d..7d9e71fea3151 100644 --- a/i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "cursorNotInConflict": "Il cursore dell'editor non si trova all'interno di un conflitto merge", + "cursorOnSplitterRange": "Il cursore si trova sulla barra di divisione di merge conflitti, si prega di spostarlo o al blocco \"corrente\" o a quello \"in ricezione\"", + "noConflicts": "Conflitti merge non trovati in questo file", + "noOtherConflictsInThisFile": "Nessun altro conflitto merge trovato in questo file" +} \ No newline at end of file diff --git a/i18n/ita/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/ita/extensions/merge-conflict/out/mergeDecorator.i18n.json index 8b6ad71cd4e6d..ff68382dadc76 100644 --- a/i18n/ita/extensions/merge-conflict/out/mergeDecorator.i18n.json +++ b/i18n/ita/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "currentChange": "(modifica corrente)", + "incomingChange": "(modifica in ingresso)" +} \ No newline at end of file diff --git a/i18n/ita/extensions/merge-conflict/package.i18n.json b/i18n/ita/extensions/merge-conflict/package.i18n.json index 8b6ad71cd4e6d..7d13f05f2b325 100644 --- a/i18n/ita/extensions/merge-conflict/package.i18n.json +++ b/i18n/ita/extensions/merge-conflict/package.i18n.json @@ -3,4 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "command.category": "Esegui merge del conflitto", + "command.accept.both": "Accettare entrambe", + "config.title": "Esegui merge del conflitto", + "config.codeLensEnabled": "Abilita/Disabilita le finestre CodeLens del blocco merge di conflitti all'interno di editor", + "config.decoratorsEnabled": "Abilita/Disabilita gli elementi Decorator sul blocco merge di conflitti all'interno di editor" +} \ No newline at end of file diff --git a/i18n/ita/extensions/npm/package.i18n.json b/i18n/ita/extensions/npm/package.i18n.json index 8b6ad71cd4e6d..3e4c81db38dab 100644 --- a/i18n/ita/extensions/npm/package.i18n.json +++ b/i18n/ita/extensions/npm/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.npm.autoDetect": "Controlla se la rilevazione automatica degli script npm è on/off. L'impostazione predefinita è 'on'." +} \ No newline at end of file diff --git a/i18n/ita/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/ita/extensions/typescript/out/utils/typingsStatus.i18n.json index ede347b577631..4cc0b902ae3ef 100644 --- a/i18n/ita/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/ita/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,7 +5,6 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Recupero dei dati per ottimizzare IntelliSense in TypeScript", - "typesInstallerInitializationFailed.title": "Non è stato possibile installare i file di definizione tipi per le funzionalità del linguaggio JavaScript. Verificare che NPM sia installato e che sia incluso nel PATH", "typesInstallerInitializationFailed.moreInformation": "Altre informazioni", "typesInstallerInitializationFailed.doNotCheckAgain": "Non eseguire più la verifica", "typesInstallerInitializationFailed.close": "Chiudi" diff --git a/i18n/ita/extensions/typescript/package.i18n.json b/i18n/ita/extensions/typescript/package.i18n.json index 36ff2654b3ec4..2b6f87e951f96 100644 --- a/i18n/ita/extensions/typescript/package.i18n.json +++ b/i18n/ita/extensions/typescript/package.i18n.json @@ -37,9 +37,10 @@ "typescript.referencesCodeLens.enabled": "Abilita/disabilita riferimenti CodeLens nei file TypeScript. Richiede TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Abilita/Disabilita le finestre CodeLens per le implementazioni. Richiede una versione di TypeScript uguale o successiva alla 2.2.0.", "typescript.openTsServerLog.title": "Apri il log del server TypeScript", + "typescript.restartTsServer": "Riavvia server TS", "typescript.selectTypeScriptVersion.title": "Seleziona la versione di TypeScript", "jsDocCompletion.enabled": "Abilita/Disabilita commenti automatici JSDoc", "javascript.implicitProjectConfig.checkJs": "Abilita/disabilita il controllo semantico di file JavaScript. File jsconfig.json o tsconfig.json esistenti sovrascrivono su questa impostazione. Richiede TypeScript >= 2.3.1.", - "typescript.check.npmIsInstalled": "Controllare se NPM è installato per l'acquisizione automatica delle definizioni di tipi", - "javascript.nameSuggestions": "Abilita/disabilita l'inclusione di nomi univoci dal file negli elenchi di suggerimento di JavaScript." + "javascript.nameSuggestions": "Abilita/disabilita l'inclusione di nomi univoci dal file negli elenchi di suggerimento di JavaScript.", + "typescript.tsc.autoDetect": "Controlla se la rilevazione automatica di attività tsc è on/off." } \ No newline at end of file diff --git a/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index c64a07b43792a..6e295ef1e2c5c 100644 --- a/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/ita/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,6 +6,7 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "L'immagine è troppo grande per essere visualizzata nell'editor", + "resourceOpenExternalButton": "Aprire immagine utilizzando un programma esterno?", "nativeBinaryError": "Il file non verrà visualizzato nell'editor perché è binario, è molto grande o usa una codifica testo non supportata.", "sizeB": "{0} B", "sizeKB": "{0} KB", diff --git a/i18n/ita/src/vs/code/electron-main/menus.i18n.json b/i18n/ita/src/vs/code/electron-main/menus.i18n.json index 86c52fb5640b5..8956dea0708e1 100644 --- a/i18n/ita/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/ita/src/vs/code/electron-main/menus.i18n.json @@ -148,12 +148,12 @@ "miLicense": "&&Visualizza licenza", "miPrivacyStatement": "&&Informativa sulla privacy", "miAbout": "&&Informazioni su", + "accessibilityOptionsWindowTitle": "Opzioni accessibilità", "miRestartToUpdate": "Riavvia per aggiornare...", "miCheckingForUpdates": "Verifica della disponibilità di aggiornamenti...", "miDownloadUpdate": "Scarica l'aggiornamento disponibile", "miDownloadingUpdate": "Download dell'aggiornamento...", "miInstallingUpdate": "Installazione dell'aggiornamento...", - "miCheckForUpdates": "Verifica disponibilità aggiornamenti...", "aboutDetail": "\nVersione {0}\nCommit {1}\nData {2}\nShell {3}\nRenderer {4}\nNode {5}", "okButton": "OK" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json index 06ec2510c3ae3..b44e9539fe0a0 100644 --- a/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -23,6 +23,8 @@ "minimap.enabled": "Controlla se la mini mappa è visualizzata", "minimap.renderCharacters": "Esegue il rendering dei caratteri effettivi di una riga (in contrapposizione ai blocchi colore)", "minimap.maxColumn": "Limita la larghezza della mini mappa in modo da eseguire il rendering al massimo di un certo numero di colonne", + "find.seedSearchStringFromSelection": "Controlla se inizializzare la stringa di ricerca nel Widget Trova con il testo selezionato nell'editor", + "find.autoFindInSelection": "Controlla se l'impostazione Trova nella selezione è attivata quando vengono selezionati più caratteri o righe di testo nell'editor", "wordWrap.off": "Il wrapping delle righe non viene eseguito.", "wordWrap.on": "Verrà eseguito il wrapping delle righe in base alla larghezza del viewport.", "wordWrap.wordWrapColumn": "Verrà eseguito il wrapping delle righe alla posizione corrispondente a `editor.wordWrapColumn`.", @@ -41,6 +43,7 @@ "formatOnType": "Controlla se l'editor deve formattare automaticamente la riga dopo la digitazione", "formatOnPaste": "Controlla se l'editor deve formattare automaticamente il contenuto incollato. Deve essere disponibile un formattatore che deve essere in grado di formattare un intervallo in un documento.", "suggestOnTriggerCharacters": "Controlla se i suggerimenti devono essere visualizzati automaticamente durante la digitazione dei caratteri trigger", + "acceptSuggestionOnEnter": "Controlla se i suggerimenti devono essere accettati con 'INVIO' in aggiunta a 'TAB'. In questo modo è possibile evitare ambiguità tra l'inserimento di nuove righe e l'accettazione di suggerimenti. Il valore 'smart' indica di accettare un suggerimento con 'INVIO' quando comporta una modifica al testo", "acceptSuggestionOnCommitCharacter": "Controlla se accettare i suggerimenti con i caratteri di commit. Ad esempio, in JavaScript il punto e virgola (';') può essere un carattere di commit che accetta un suggerimento e digita tale carattere.", "snippetSuggestions": "Controlla se i frammenti di codice sono visualizzati con altri suggerimenti e il modo in cui sono ordinati.", "emptySelectionClipboard": "Consente di controllare se, quando si copia senza aver effettuato una selezione, viene copiata la riga corrente.", diff --git a/i18n/ita/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/ita/src/vs/editor/common/view/editorColorRegistry.i18n.json index 48a155767d2a5..1eb8439fa14a6 100644 --- a/i18n/ita/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/ita/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -16,5 +16,9 @@ "editorBracketMatchBackground": "Colore di sfondo delle parentesi corrispondenti", "editorBracketMatchBorder": "Colore delle caselle di parentesi corrispondenti", "editorOverviewRulerBorder": "Colore del bordo del righello delle annotazioni.", - "editorGutter": "Colore di sfondo della barra di navigazione dell'editor. La barra contiene i margini di glifo e i numeri di riga." + "editorGutter": "Colore di sfondo della barra di navigazione dell'editor. La barra contiene i margini di glifo e i numeri di riga.", + "errorForeground": "Colore primo piano degli squiggle di errore nell'editor.", + "errorBorder": "Colore del bordo degli squiggle di errore nell'editor.", + "warningForeground": "Colore primo piano degli squiggle di avviso nell'editor", + "warningBorder": "Colore del bordo degli squggle di avviso nell'editor." } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/ita/src/vs/editor/contrib/links/browser/links.i18n.json index e5d5773a69953..969ff8d55c9b9 100644 --- a/i18n/ita/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "Cmd + clic per seguire il collegamento", "links.navigate": "CTRL + clic per seguire il collegamento", + "links.navigate.al": "Alt + clic per seguire il collegamento", "invalid.url": "Non è stato possibile aprire questo collegamento perché il formato non è valido: {0}", "missing.url": "Non è stato possibile aprire questo collegamento perché manca la destinazione.", "label": "Apri il collegamento" diff --git a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json index e1d1005789b54..4822dfeb81213 100644 --- a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -60,7 +60,6 @@ "editorBackground": "Colore di sfondo dell'editor.", "editorForeground": "Colore primo piano predefinito dell'editor.", "editorWidgetBackground": "Colore di sfondo dei widget dell'editor, ad esempio Trova/Sostituisci.", - "editorWidgetBorder": "Colore del bordo del widget editor.", "editorSelection": "Colore della selezione dell'editor.", "editorInactiveSelection": "Colore della selezione in un editor inattivo.", "editorSelectionHighlight": "Colore delle aree con lo stesso contenuto della selezione.", @@ -74,5 +73,11 @@ "diffEditorInserted": "Colore di sfondo del testo che è stato inserito.", "diffEditorRemoved": "Colore di sfondo del testo che è stato rimosso.", "diffEditorInsertedOutline": "Colore del contorno del testo che è stato inserito.", - "diffEditorRemovedOutline": "Colore del contorno del testo che è stato rimosso." + "diffEditorRemovedOutline": "Colore del contorno del testo che è stato rimosso.", + "mergeCurrentHeaderBackground": "Sfondo intestazione corrente in conflitto di merge in linea.", + "mergeCurrentContentBackground": "Sfondo contenuto corrente in conflitto di merge in linea.", + "mergeIncomingHeaderBackground": "Sfondo intestazione modifica in ingresso in conflitto di merge in linea.", + "mergeIncomingContentBackground": "Sfondo contenuto modifica in ingresso in conflitto di merge in linea.", + "overviewRulerCurrentContentForeground": "Primo piano righello panoramica corrente per conflitto di merge in linea.", + "overviewRulerIncomingContentForeground": "Primo piano righello panoramica modifiche in ingresso per conflitto di merge in linea." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/ita/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/common/theme.i18n.json b/i18n/ita/src/vs/workbench/common/theme.i18n.json index 05253aee2c400..213ebbab5dcd7 100644 --- a/i18n/ita/src/vs/workbench/common/theme.i18n.json +++ b/i18n/ita/src/vs/workbench/common/theme.i18n.json @@ -7,12 +7,9 @@ "tabActiveBackground": "Colore di sfondo delle schede attive. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "tabInactiveBackground": "Colore di sfondo delle schede inattive. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "tabBorder": "Bordo per separare le schede l'una dall'altra. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "tabActiveEditorGroupActiveForeground": "Colore di primo piano delle schede attive in un gruppo attivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", - "tabInactiveEditorGroupActiveForeground": "Colore di primo piano delle schede inattive in un gruppo attivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "editorGroupBackground": "Colore di sfondo di un gruppo di editor. I gruppi di editor sono contenitori di editor. Il colore di sfondo viene visualizzato quando si trascinano i gruppi di editor in un'altra posizione.", "editorGroupHeaderBackground": "Colore di sfondo dell'intestazione del titolo dell'editor quando le schede sono disabilitate. I gruppi di editor sono contenitori di editor.", "editorGroupBorder": "Colore per separare più gruppi di editor l'uno dall'altro. I gruppi di editor sono i contenitori degli editor.", - "panelBackground": "Colore di sfondo dei pannelli. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e del terminale integrato.", "panelBorder": "Colore del bordo dei pannelli nella parte superiore di separazione dall'editor. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e del terminale integrato.", "panelActiveTitleForeground": "Colore del titolo del pannello attivo. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e quella del terminale integrato.", "panelInactiveTitleForeground": "Colore del titolo del pannello inattivo. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e quella del terminale integrato.", diff --git a/i18n/ita/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/workbench.i18n.json index 8b6ad71cd4e6d..8392fa958357c 100644 --- a/i18n/ita/src/vs/workbench/electron-browser/workbench.i18n.json +++ b/i18n/ita/src/vs/workbench/electron-browser/workbench.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "developer": "Sviluppatore", + "file": "File" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index d5422d908c394..e90a97c9394f8 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "Per questo oggetto vengono visualizzati solo i valori primitivi.", - "debuggingStarted": "Il debug è stato avviato.", "debuggingPaused": "Il debug è stato sospeso. Motivo: {0}, {1} {2}", + "debuggingStarted": "Il debug è stato avviato.", "debuggingStopped": "Il debug è stato arrestato.", "breakpointAdded": "Aggiunto un punto di interruzione a riga {0} del file {1}", "breakpointRemoved": "Rimosso un punto di interruzione a riga {0} del file {1}", diff --git a/i18n/ita/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 158ed123e7aca..e72592662b957 100644 --- a/i18n/ita/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -9,5 +9,7 @@ "prof.message": "I profili sono stati creati.", "prof.detail": "Creare un problema e allegare manualmente i file seguenti:\n{0}", "prof.restartAndFileIssue": "Crea problema e riavvia", - "prof.restart": "Riavvia" + "prof.restart": "Riavvia", + "prof.thanks": "Grazie per l'aiuto.", + "prof.detail.restart": "È necessario un riavvio alla fine per continuare a utilizzare '{0}'. Ancora una volta, grazie per il vostro contributo." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 670ffa4c4ac24..9e7b35dce5da6 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "Definisci tasto di scelta rapida", - "defineKeybinding.kbLayoutInfoMessage": "Per il layout di tastiera corrente premere ", "defineKeybinding.kbLayoutErrorMessage": "Non sarà possibile produrre questa combinazione di tasti con il layout di tastiera corrente." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index 44389863a6597..acbf024d405ac 100644 --- a/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "Mostra GIT", + "installAdditionalSCMProviders": "Installa ulteriori provider SCM ...", "source control": "Controllo del codice sorgente", "toggleSCMViewlet": "Mostra Gestione controllo servizi", "view": "Visualizza" diff --git a/i18n/ita/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 8de23c2bbed6d..7a620ff7e5a5c 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,13 +5,12 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "Avviso: options.cwd deve essere di tipo string. Il valore {0} verrà ignorato.\n", - "ConfigurationParser.noShell": "Avviso: la configurazione della shell è supportata solo quando si eseguono attività nel terminale.", "ConfigurationParser.noargs": "Errore: gli argomenti del comando devono essere un array di stringhe. Il valore specificato è:\n{0}", + "ConfigurationParser.noShell": "Avviso: la configurazione della shell è supportata solo quando si eseguono attività nel terminale.", "ConfigurationParser.noName": "Errore: è necessario specificare un nome per il matcher problemi nell'ambito di dichiarazione:\n{0}\n", "ConfigurationParser.unknownMatcherKind": "Avviso: il matcher problemi definito è sconosciuto. I tipi supportati sono string | ProblemMatcher | (string | ProblemMatcher)[].\n{0}\n", "ConfigurationParser.invalidVaraibleReference": "Errore: il riferimento a problemMatcher non è valido: {0}\n", "ConfigurationParser.noTaskName": "Errore: le attività devono specificare una proprietà taskName. L'attività verrà ignorata.\n{0}\n", "taskConfiguration.shellArgs": "Avviso: l'attività '{0}' è un comando della shell e il nome del comando o uno dei relativi argomenti contiene spazi senza codice di escape. Per garantire la corretta indicazione della riga di comando, unire gli argomenti nel comando.", - "taskConfiguration.noCommandOrDependsOn": "Errore: l'attività '{0}' non specifica un comando o una proprietà dependsOn. L'attività verrà ignorata. Definizione dell'attività:\n{1}", "taskConfiguration.noCommand": "Errore: l'attività '{0}' non definisce un comando. L'attività verrà ignorata. Definizione dell'attività:\n{1}" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 248adfe6f6e43..8d0ab5a5a7554 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "JsonSchema.version": "Numero di versione della configurazione", - "JsonSchema.windows": "Configurazione dei comandi specifica di Windows", - "JsonSchema.mac": "Configurazione dei comandi specifica di Mac", - "JsonSchema.linux": "Configurazione dei comandi specifica di Linux", "JsonSchema.shell": "Specifica se il comando è un comando della shell o un programma esterno. Se omesso, viene usato il valore predefinito false.", "JsonSchema.tasks.dependsOn.string": "Altra attività da cui dipende questa attività.", - "JsonSchema.tasks.dependsOn.array": "Altre attività da cui dipende questa attività." + "JsonSchema.tasks.dependsOn.array": "Altre attività da cui dipende questa attività.", + "JsonSchema.windows": "Configurazione dei comandi specifica di Windows", + "JsonSchema.mac": "Configurazione dei comandi specifica di Mac", + "JsonSchema.linux": "Configurazione dei comandi specifica di Linux" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index cf402ad380215..7801fc1c4368e 100644 --- a/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,6 +6,7 @@ { "selectTheme.label": "Tema colori", "installColorThemes": "Installa temi colori aggiuntivi...", + "themes.selectTheme": "Selezionare il Tema colori (tasti su/giù per anteprima)", "selectIconTheme.label": "Tema icona file", "installIconThemes": "Installa temi dell'icona file aggiuntivi...", "noIconThemeLabel": "Nessuno", diff --git a/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 52726bd226cdb..2c3dacb4148e7 100644 --- a/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -6,6 +6,11 @@ { "open": "Apri impostazioni", "close": "Chiudi", + "saveAndRetry": "Salva le impostazioni e riprova", "errorUnknownKey": "Non è possibile scrivere nel file di configurazione. La chiave è sconosciuta", - "errorInvalidTarget": "Non è possibile scrivere nel file di configurazione (destinazione non valida)" + "errorInvalidTarget": "Non è possibile scrivere nel file di configurazione (destinazione non valida)", + "errorNoWorkspaceOpened": "Impossibile scrivere nelle impostazioni perché nessuna cartella è aperta. Si prega di aprire una cartella e riprovare.", + "errorInvalidConfiguration": "Impossibile scrivere nelle impostazioni. Si prega di aprire **Impostazioni utente** per correggere eventuali errori o avvisi nel file e riprovare.", + "errorInvalidConfigurationWorkspace": "Impossibile scrivere in impostazioni. Si prega di aprire **Impostazioni area di lavoro** per correggere eventuali errori o avvisi nel file e riprovare.", + "errorConfigurationFileDirty": "Impossibile scrivere nelle impostazioni perché il file è stato modificato ma non salvato. Si prega di salvare il file **impostazioni utente** e riprovare." } \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json index 104396accee7b..8b6ad71cd4e6d 100644 --- a/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,6 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "compareChanges": "変更の比較" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json index 6c318704912ce..d435e6965b34c 100644 --- a/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "cursorNotInConflict": "エディターのカーソルがマージの競合の範囲内にありません", + "cursorOnSplitterRange": "エディターのカーソルがマージ コンフリクトのスプリッター内にあります。”現在” または \"入力側\" のいずれかのブロックに移動してください", "noConflicts": "このファイルにマージの競合は存在しません", "noOtherConflictsInThisFile": "このファイルに他のマージの競合は存在しません" } \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json index 9da2446076d63..6f8b1654a4d4f 100644 --- a/i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json +++ b/i18n/jpn/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "currentChange": "(現在の変更)" + "currentChange": "(現在の変更)", + "incomingChange": "(入力側の変更)" } \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/package.i18n.json b/i18n/jpn/extensions/merge-conflict/package.i18n.json index 178880dd69d0d..e2adf2620637f 100644 --- a/i18n/jpn/extensions/merge-conflict/package.i18n.json +++ b/i18n/jpn/extensions/merge-conflict/package.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "command.category": "マージの競合", - "command.next": "次の競合", - "command.previous": "前の競合", - "command.compare": "現在の競合を比較", - "config.title": "マージの競合" + "command.accept.both": "両方を取り込む", + "config.title": "マージの競合", + "config.codeLensEnabled": "エディター内のマージ競合ブロックで CodeLens を有効/無効にします", + "config.decoratorsEnabled": "エディター内でマージの競合デコレーターを有効/無効にします。" } \ No newline at end of file diff --git a/i18n/jpn/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/jpn/extensions/typescript/out/utils/typingsStatus.i18n.json index 5696b94039210..3a40c2e29d9d1 100644 --- a/i18n/jpn/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/jpn/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,7 +5,6 @@ // Do not edit this file. It is machine generated. { "installingPackages": "より適した TypeScript IntelliSense に関するデータをフェッチしています", - "typesInstallerInitializationFailed.title": "JavaScript 言語機能のための型定義ファイルをインストールできませんでした。NPM がインストールされ、PATH にあることを確認してください。", "typesInstallerInitializationFailed.moreInformation": "詳細情報", "typesInstallerInitializationFailed.doNotCheckAgain": "今後確認しない", "typesInstallerInitializationFailed.close": "閉じる" diff --git a/i18n/jpn/extensions/typescript/package.i18n.json b/i18n/jpn/extensions/typescript/package.i18n.json index 1ad434c32052d..9f60798218f32 100644 --- a/i18n/jpn/extensions/typescript/package.i18n.json +++ b/i18n/jpn/extensions/typescript/package.i18n.json @@ -41,6 +41,6 @@ "typescript.selectTypeScriptVersion.title": "TypeScript のバージョンの選択", "jsDocCompletion.enabled": " 自動 JSDoc コメントを有効/無効にします", "javascript.implicitProjectConfig.checkJs": "JavaScript ファイルのセマンティック チェックを有効/無効にします。既存の jsconfi.json や tsconfi.json ファイルの設定はこれより優先されます。TypeScript は 2.3.1 以上である必要があります。", - "typescript.check.npmIsInstalled": "型定義の自動取得に NPM がインストールされているかどうかを確認する", - "javascript.nameSuggestions": "JavaScript の候補リスト内でファイルから一意の名前を含むかどうかを有効/無効にします。" + "javascript.nameSuggestions": "JavaScript の候補リスト内でファイルから一意の名前を含むかどうかを有効/無効にします。", + "typescript.tsc.autoDetect": "tsc タスクの自動検出をオンにするかオフにするかを制御します。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/code/electron-main/menus.i18n.json b/i18n/jpn/src/vs/code/electron-main/menus.i18n.json index 79412979d8d7f..541c16a930ca5 100644 --- a/i18n/jpn/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/jpn/src/vs/code/electron-main/menus.i18n.json @@ -153,12 +153,12 @@ "miLicense": "ライセンスの表示(&&L)", "miPrivacyStatement": "プライバシーについて(&&P)", "miAbout": "バージョン情報(&&A)", + "accessibilityOptionsWindowTitle": "ユーザー補助オプション", "miRestartToUpdate": "更新のために再起動します...", "miCheckingForUpdates": "更新を確認しています...", "miDownloadUpdate": "利用可能な更新プログラムをダウンロードします", "miDownloadingUpdate": "更新をダウンロードしています...", "miInstallingUpdate": "更新プログラムをインストールしています...", - "miCheckForUpdates": "更新の確認...", "aboutDetail": "\nバージョン{0}\nコミット{1}\n日付{2}\nシェル{3}\nレンダラー{4}\nNode {5}", "okButton": "OK" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json index 8ce8d297e0025..1fa006e9cb2c9 100644 --- a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -23,6 +23,8 @@ "minimap.enabled": "ミニマップを表示するかどうかを制御します", "minimap.renderCharacters": "行に (カラー ブロックではなく) 実際の文字を表示します", "minimap.maxColumn": "表示するミニマップの最大幅を特定の桁数に制限します", + "find.seedSearchStringFromSelection": "エディターの選択から検索ウィジェット内の検索文字列を与えるかどうかを制御します", + "find.autoFindInSelection": "エディター内で複数の文字もしくは行が選択されているときに選択範囲を検索するフラグを有効にするかどうかを制御します", "wordWrap.off": "行を折り返しません。", "wordWrap.on": "行をビューポートの幅で折り返します。", "wordWrap.wordWrapColumn": "行を 'editor.wordWrapColumn' で折り返します。", @@ -41,6 +43,7 @@ "formatOnType": "エディターで入力後に自動的に行の書式設定を行うかどうかを制御します", "formatOnPaste": "貼り付けた内容がエディターにより自動的にフォーマットされるかどうかを制御します。フォーマッタを使用可能にする必要があります。また、フォーマッタがドキュメント内の範囲をフォーマットできなければなりません。", "suggestOnTriggerCharacters": "トリガー文字の入力時に候補が自動的に表示されるようにするかどうかを制御します", + "acceptSuggestionOnEnter": "'Tab' キーに加えて 'Enter' キーで候補を受け入れるかどうかを制御します。改行の挿入や候補の反映の間であいまいさを解消するのに役立ちます。'smart' 値は文字を変更するときに、Enter キーを押すだけで提案を反映することを意味します。", "acceptSuggestionOnCommitCharacter": "コミット文字で候補を受け入れるかどうかを制御します。たとえば、JavaScript ではセミコロン (';') をコミット文字にして、候補を受け入れてその文字を入力することができます。", "snippetSuggestions": "他の修正候補と一緒にスニペットを表示するかどうか、およびその並び替えの方法を制御します。", "emptySelectionClipboard": "選択範囲を指定しないでコピーする場合に現在の行をコピーするかどうかを制御します。", diff --git a/i18n/jpn/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json b/i18n/jpn/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json index 4fbcbda9f946f..989d71f385ba0 100644 --- a/i18n/jpn/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json @@ -8,6 +8,5 @@ "markerAction.next.label": "次のエラーまたは警告へ移動", "markerAction.previous.label": "前のエラーまたは警告へ移動", "editorMarkerNavigationError": "エディターのマーカー ナビゲーション ウィジェットのエラーの色。", - "editorMarkerNavigationWarning": "エディターのマーカー ナビゲーション ウィジェットの警告の色。", - "editorMarkerNavigationBackground": "エディターのマーカー ナビゲーション ウィジェットの背景。" + "editorMarkerNavigationWarning": "エディターのマーカー ナビゲーション ウィジェットの警告の色。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json index 9872f49057d61..8da89f6115cfe 100644 --- a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -60,7 +60,6 @@ "editorBackground": "エディターの背景色。", "editorForeground": "エディターの既定の前景色。", "editorWidgetBackground": "検索/置換窓など、エディター ウィジェットの背景色。", - "editorWidgetBorder": "エディター ウィジェットの境界線の色。", "editorSelection": "エディターの選択範囲の色。", "editorInactiveSelection": "非アクティブなエディターの選択範囲の色。", "editorSelectionHighlight": "選択範囲と同じコンテンツの領域の色。", diff --git a/i18n/jpn/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/jpn/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/jpn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index ff6068c783714..2b2a554b6dbdb 100644 --- a/i18n/jpn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -11,6 +11,7 @@ "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", "tabFocusModeEnabled": "タブによるフォーカスの移動", + "screenReaderDetected": "スクリーン リーダーが検出されました", "disableTabMode": "アクセシビリティ モードを無効にする", "gotoLine": "行へ移動", "indentation": "インデント", diff --git a/i18n/jpn/src/vs/workbench/common/theme.i18n.json b/i18n/jpn/src/vs/workbench/common/theme.i18n.json index d183c26792491..26f43afd10773 100644 --- a/i18n/jpn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/jpn/src/vs/workbench/common/theme.i18n.json @@ -7,34 +7,37 @@ "tabActiveBackground": "アクティブ タブの背景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", "tabInactiveBackground": "非アクティブ タブの背景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", "tabBorder": "タブ同士を分けるための境界線。タブはエディター領域内にあるエディターのコンテナーです。複数のタブを 1 つのエディター グループで開くことができます。複数のエディター グループがある可能性があります。", - "tabActiveEditorGroupActiveForeground": "アクティブ グループ内のアクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", - "tabInactiveEditorGroupActiveForeground": "アクティブ グループ内の非アクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", "editorGroupBackground": "エディター グループの背景色。エディター グループはエディターのコンテナーです。背景色はエディター グループをドラッグすると表示されます。", "tabsContainerBackground": "タブが有効な場合の エディター グループ タイトル ヘッダーの背景色。エディター グループはエディターのコンテナーです。", + "tabsContainerBorder": "タブが有効な場合の エディター グループ タイトル ヘッダーの境界線色。エディター グループはエディターのコンテナーです。", "editorGroupHeaderBackground": "タブが無効な場合の エディター グループ タイトル ヘッダーの背景色。エディター グループはエディターのコンテナーです。", "editorGroupBorder": "複数のエディター グループを互いに分離するための色。エディター グループはエディターのコンテナーです。", "editorDragAndDropBackground": "エディターの周囲をドラッグしているときの背景色。エディターのコンテンツが最後まで輝くために、色は透過である必要があります。", - "panelBackground": "パネルの背景色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelBorder": "エディターとの区切りを示すパネル上部の罫線の色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelActiveTitleForeground": "アクティブ パネルのタイトルの色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelInactiveTitleForeground": "非アクティブ パネルのタイトルの色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelActiveTitleBorder": "アクティブ パネル タイトルの境界線の色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "statusBarForeground": "ステータス バーの前景色。ステータス バーはウィンドウの下部に表示されます。", "statusBarBackground": "標準ステータス バーの背景色。ステータス バーはウィンドウの下部に表示されます。", + "statusBarBorder": "サイドバーとエディターを隔てるステータス バーの境界線色。ステータス バーはウィンドウの下部に表示されます。", "statusBarNoFolderBackground": "フォルダーが開いていないときのステータス バーの背景色。ステータス バーはウィンドウの下部に表示されます。", + "statusBarNoFolderForeground": "フォルダーが開いていないときのステータス バーの前景色。ステータス バーはウィンドウの下部に表示されます。", "statusBarItemActiveBackground": "クリック時のステータス バーの項目の背景色。ステータス バーはウィンドウの下部に表示されます。", "statusBarItemHoverBackground": "ホバーしたときのステータス バーの項目の背景色。ステータス バーはウィンドウの下部に表示されます。", "statusBarProminentItemBackground": "ステータス バーの重要な項目の背景色。重要な項目は、重要性を示すために他のステータスバーの項目から際立っています。 ステータス バーはウィンドウの下部に表示されます。", "statusBarProminentItemHoverBackground": "ホバーしたときのステータス バーの重要な項目の背景色。重要な項目は、重要性を示すために他のステータスバーの項目から際立っています。 ステータス バーはウィンドウの下部に表示されます。", "activityBarBackground": "アクティビティ バーの背景色。アクティビティ バーは左端または右端に表示され、サイド バーのビューを切り替えることができます。", "activityBarForeground": "アクティビティ バーの前景色 (例: アイコンの色)。アクティビティ バーは左端または右端に表示され、サイド バーのビューを切り替えることができます。", + "activityBarBorder": "サイド バーと隔てるアクティビティ バーの境界線色。アクティビティ バーは左端または右端に表示され、サイド バーのビューを切り替えることができます。", "activityBarDragAndDropBackground": "アクティビティ バーの項目のドラッグ アンド ドロップ フィードバックの色。アクティビティ バーが最後まで輝くために、色は透過である必要があります。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", "activityBarBadgeBackground": "アクティビティ通知バッジの背景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", "activityBarBadgeForeground": "アクティビティ通知バッジの前景色。アクティビティ バーは左端または右端に表示され、サイド バーの表示を切り替えることができます。", "sideBarBackground": "サイド バーの背景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", "sideBarForeground": "サイド バーの前景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", + "sideBarBorder": "エディターとの区切りを示すサイド バーの境界線の色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", "sideBarTitleForeground": "サイド バーのタイトルの前景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", "sideBarSectionHeaderBackground": "サイド バーのセクション ヘッダーの背景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", + "sideBarSectionHeaderForeground": "サイド バーのセクション ヘッダーの前景色。サイド バーは、エクスプローラーや検索などのビューが入るコンテナーです。", "titleBarActiveForeground": "ウィンドウがアクティブな場合のタイトル バーの前景。現在、この色は macOS でのみサポートされているのでご注意ください。", "titleBarInactiveForeground": "ウィンドウが非アクティブな場合のタイトル バーの前景。現在、この色は macOS でのみサポートされているのでご注意ください。", "titleBarActiveBackground": "ウィンドウがアクティブな場合のタイトル バーの背景。現在、この色は macOS でのみサポートされているのでご注意ください。", diff --git a/i18n/jpn/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/workbench.i18n.json index 8b6ad71cd4e6d..bbe34173584ee 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/workbench.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/workbench.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "developer": "開発者", + "file": "ファイル" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index dfffb6e0790da..45728f86746ff 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "このオブジェクトのプリミティブ値のみ表示されます。", - "debuggingStarted": "デバッグは開始されました。", "debuggingPaused": "デバッグは一時停止されました、理由 {0}、{1} {2}", + "debuggingStarted": "デバッグは開始されました。", "debuggingStopped": "デバッグは停止されました。", "breakpointAdded": "ブレークポイントを追加しました。行 {0}、ファイル {1}", "breakpointRemoved": "ブレークポイントを削除しました。行 {0}、ファイル {1}", diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 868785478db0b..51044b7942e95 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -26,13 +26,13 @@ "disableAutoUpdate": "拡張機能の自動更新を無効にする", "updateAll": "すべての拡張機能を更新します", "reloadAction": "再読み込み", - "postUpdateTooltip": "再度読み込んで更新する", + "postUpdateTooltip": "再読み込みして更新する", "postUpdateMessage": "このウィンドウを再度読み込んで、更新済みの拡張機能 '{0}' をアクティブ化しますか?", "postEnableTooltip": "再度読み込んでアクティブにする", "postEnableMessage": "このウィンドウを再度読み込んで、拡張機能 '{0}' をアクティブ化しますか?", "postDisableTooltip": "読み込んで非アクティブ化する", "postDisableMessage": "このウィンドウを再度読み込んで、拡張機能 '{0}' を非アクティブ化しますか?", - "postUninstallTooltip": "読み込んで非アクティブ化する", + "postUninstallTooltip": "再読み込みして非アクティブ化する", "postUninstallMessage": "このウィンドウを再度読み込んで、アンインストール済みの拡張機能 '{0}' を非アクティブ化しますか?", "reload": "ウィンドウの再読み込み(&&R)", "toggleExtensionsViewlet": "拡張機能を表示する", @@ -55,5 +55,8 @@ "disableAll": "インストール済みのすべての拡張機能を無効にする", "disableAllWorkspace": "このワークスペースのインストール済みの拡張機能をすべて無効にする", "enableAll": "インストール済みの拡張機能をすべて有効にする", - "enableAllWorkspace": "このワークスペースのインストール済みの拡張機能をすべて有効にする" + "enableAllWorkspace": "このワークスペースのインストール済みの拡張機能をすべて有効にする", + "extensionButtonProminentBackground": "際立っているアクション拡張機能のボタンの背景色(例: インストールボタン)。", + "extensionButtonProminentForeground": "際立っているアクション拡張機能のボタンの前景色(例: インストールボタン)。", + "extensionButtonProminentHoverBackground": "際立っているアクション拡張機能のボタンのホバー背景色(例: インストールボタン)。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 6fd33bfb0e040..4859dfe81bbb3 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,8 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "disableOtherKeymapsConfirmation": "キーバインド間の競合を回避するために、他のキーマップ ({0}) を無効にしますか?", "yes": "はい", "no": "いいえ", + "betterMergeDisabled": "拡張機能 Better Merge は現在ビルトインです。インストール済みの拡張機能は無効化され、アンインストールできます。", "uninstall": "アンインストール", "later": "後続" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 08cb632b3e777..e556fff23e6e4 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "キー バインドの定義", - "defineKeybinding.kbLayoutInfoMessage": "現在のキーボード レイアウト用に", "defineKeybinding.kbLayoutErrorMessage": "現在のキーボード レイアウトでは、このキーの組み合わせを生成することはできません。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json index 8b6ad71cd4e6d..3902ae7752750 100644 --- a/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "editorGutterModifiedBackground": "編集された行を示すエディター余白の背景色。", + "editorGutterAddedBackground": "追加された行を示すエディター余白の背景色。", + "editorGutterDeletedBackground": "削除された行を示すエディター余白の背景色。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index f7db07a2e2d5c..c0432625724e1 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks", - "workspace": "ワークスペースから", - "extension": "拡張機能から" + "entryAriaLabel": "{0}, tasks" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index c7b8031b6e5c3..fbd42ea691d37 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,13 +5,12 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "警告: options.cwd は、string 型でなければなりません。値 {0} を無視します", - "ConfigurationParser.noShell": "警告: シェル構成がサポートされるのは、ターミナルでタスクを実行している場合のみです。", "ConfigurationParser.noargs": "エラー: コマンド引数は文字列の配列でなければなりません。指定された値:\n{0}", + "ConfigurationParser.noShell": "警告: シェル構成がサポートされるのは、ターミナルでタスクを実行している場合のみです。", "ConfigurationParser.noName": "エラー: 宣言スコープ内の問題マッチャーに次の名前がなければなりません:\n{0}\n", "ConfigurationParser.unknownMatcherKind": "警告: 定義されている問題マッチャーが不明です。サポートされている型は string | ProblemMatcher | (string | ProblemMatcher)[] です。\n{0}\n", "ConfigurationParser.invalidVaraibleReference": "エラー: 正しくない problemMatcher 参照 {0}\n", "ConfigurationParser.noTaskName": "エラー: タスクが taskName プロパティを提供しなければなりません。このタスクは無視されます。\n{0}\n", "taskConfiguration.shellArgs": "警告: タスク '{0}' はシェル コマンドです。コマンド名または引数の 1 つに、エスケープされていないスペースが含まれています。コマンド ラインの引用が正しく解釈されるように、引数をコマンドにマージしてください。", - "taskConfiguration.noCommandOrDependsOn": "エラー: タスク '{0}' は、コマンドも、dependsOn プロパティも指定していません。このタスクは無視されます。定義は次のとおりです:\n{1}", "taskConfiguration.noCommand": "エラー: タスク '{0}' はコマンドを定義していません。このタスクは無視されます。定義は次のとおりです:\n{1}" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index fd5f48dd41517..063435e42d570 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "JsonSchema.version": "構成のバージョン番号", - "JsonSchema.windows": "Windows 固有のコマンド構成", - "JsonSchema.mac": "Mac 固有のコマンド構成", - "JsonSchema.linux": "Linux 固有のコマンド構成", "JsonSchema.shell": "コマンドがシェル コマンドか外部プログラムかを指定します。省略すると、既定は false になります。", "JsonSchema.tasks.dependsOn.string": "このタスクが依存している別のタスク。", - "JsonSchema.tasks.dependsOn.array": "このタスクが依存している他の複数のタスク。" + "JsonSchema.tasks.dependsOn.array": "このタスクが依存している他の複数のタスク。", + "JsonSchema.windows": "Windows 固有のコマンド構成", + "JsonSchema.mac": "Mac 固有のコマンド構成", + "JsonSchema.linux": "Linux 固有のコマンド構成" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index eba406025bbb4..c30717a4d73c5 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -25,7 +25,5 @@ "welcomePage.extensionListSeparator": ",", "welcomePage.installedExtension": "{0} (インストール済み) ", "ok": "OK", - "cancel": "キャンセル", - "welcomePage.quickLinkBackground": "ウェルカム ページのクイック リンクの背景色。", - "welcomePage.quickLinkHoverBackground": "ウェルカム ページのクイック リンクのホバー背景色。" + "cancel": "キャンセル" } \ No newline at end of file diff --git a/i18n/kor/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/kor/extensions/typescript/out/utils/typingsStatus.i18n.json index 07c376496cff1..bba27308a2312 100644 --- a/i18n/kor/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/kor/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,7 +5,6 @@ // Do not edit this file. It is machine generated. { "installingPackages": "TypeScript IntelliSense를 향상하기 위해 데이터를 페치하는 중", - "typesInstallerInitializationFailed.title": "JavaScript 언어 기능에 대해 입력 파일을 설치할 수 없습니다. NPM이 설치되어 있고 PATH에 있는지 확인하세요.", "typesInstallerInitializationFailed.moreInformation": "추가 정보", "typesInstallerInitializationFailed.doNotCheckAgain": "다시 확인 안 함", "typesInstallerInitializationFailed.close": "닫기" diff --git a/i18n/kor/extensions/typescript/package.i18n.json b/i18n/kor/extensions/typescript/package.i18n.json index 4e1ce76b2130f..348ff9b8498ed 100644 --- a/i18n/kor/extensions/typescript/package.i18n.json +++ b/i18n/kor/extensions/typescript/package.i18n.json @@ -36,6 +36,5 @@ "typescript.implementationsCodeLens.enabled": "구현 CodeLens를 사용하거나 사용하지 않도록 설정합니다. TypeScript >= 2.2.0이 필요합니다.", "typescript.selectTypeScriptVersion.title": "TypeScript 버전 선택", "jsDocCompletion.enabled": "자동 JSDoc 주석 사용/사용 안 함", - "javascript.implicitProjectConfig.checkJs": "JavaScript 파일의 의미 체계 검사를 사용/사용하지 않습니다. 기존 jsconfig.json 또는 tsconfig.json 파일은 이 설정을 재정의합니다. TypeScript >=2.3.1이 필요합니다. ", - "typescript.check.npmIsInstalled": "자동 입력 인식에 대해 NPM이 설치되어 있는지 확인" + "javascript.implicitProjectConfig.checkJs": "JavaScript 파일의 의미 체계 검사를 사용/사용하지 않습니다. 기존 jsconfig.json 또는 tsconfig.json 파일은 이 설정을 재정의합니다. TypeScript >=2.3.1이 필요합니다. " } \ No newline at end of file diff --git a/i18n/kor/src/vs/code/electron-main/menus.i18n.json b/i18n/kor/src/vs/code/electron-main/menus.i18n.json index a8faf00b85863..b293d48151749 100644 --- a/i18n/kor/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/kor/src/vs/code/electron-main/menus.i18n.json @@ -148,12 +148,12 @@ "miLicense": "라이선스 보기(&&L)", "miPrivacyStatement": "개인정보처리방침(&&P)", "miAbout": "정보(&&A)", + "accessibilityOptionsWindowTitle": "접근성 옵션", "miRestartToUpdate": "업데이트하기 위해 다시 시작...", "miCheckingForUpdates": "업데이트를 확인하는 중...", "miDownloadUpdate": "사용 가능한 업데이트 다운로드", "miDownloadingUpdate": "업데이트를 다운로드하는 중...", "miInstallingUpdate": "업데이트를 설치하는 중...", - "miCheckForUpdates": "업데이트 확인...", "aboutDetail": "\n버전 {0}\n커밋 {1}\n날짜 {2}\n셸{3}\n렌더러 {4}\nNode {5}", "okButton": "확인" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/kor/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/common/theme.i18n.json b/i18n/kor/src/vs/workbench/common/theme.i18n.json index ca6f547f854be..182ceaa205ece 100644 --- a/i18n/kor/src/vs/workbench/common/theme.i18n.json +++ b/i18n/kor/src/vs/workbench/common/theme.i18n.json @@ -7,12 +7,9 @@ "tabActiveBackground": "활성 탭 배경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", "tabInactiveBackground": "비활성 탭 배경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", "tabBorder": "탭을 서로 구분하기 위한 테두리입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "tabActiveEditorGroupActiveForeground": "활성 그룹의 활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", - "tabInactiveEditorGroupActiveForeground": "활성 그룹의 비활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", "editorGroupBackground": "편집기 그룹의 배경색입니다. 편집기 그룹은 편집기의 컨테이너입니다. 배경색은 편집기 그룹을 끌 때 표시됩니다.", "editorGroupHeaderBackground": "탭을 사용하지 않도록 설정한 경우 편집기 그룹 제목 머리글의 배경색입니다. 편집기 그룹은 편집기의 컨테이너입니다.", "editorGroupBorder": "여러 편집기 그룹을 서로 구분하기 위한 색입니다. 편집기 그룹은 편집기의 컨테이너입니다.", - "panelBackground": "패널 배경색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "panelBorder": "편집기와 구분되는 맨 위의 패널 테두리 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "panelActiveTitleForeground": "활성 패널의 제목 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "panelInactiveTitleForeground": "비활성 패널의 제목 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", diff --git a/i18n/kor/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/workbench.i18n.json index 8b6ad71cd4e6d..de8d40eec3b44 100644 --- a/i18n/kor/src/vs/workbench/electron-browser/workbench.i18n.json +++ b/i18n/kor/src/vs/workbench/electron-browser/workbench.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "developer": "개발자", + "file": "파일" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index d56a0b492cd06..a864dd07491c9 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "이 개체에 대한 기본 값만 표시됩니다.", - "debuggingStarted": "디버그가 시작되었습니다.", "debuggingPaused": "디버그가 일시 중지되었습니다. 이유 {0}, {1} {2}", + "debuggingStarted": "디버그가 시작되었습니다.", "debuggingStopped": "디버그가 중지되었습니다.", "breakpointAdded": "파일 {1}, 줄 {0}에 중단점이 추가되었습니다.", "breakpointRemoved": "파일 {1}, 줄 {0}에서 중단점이 제거되었습니다.", diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index d03c1ba3ba27c..fee497eeb33c7 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "키 바인딩 정의", - "defineKeybinding.kbLayoutInfoMessage": "현재 자판 배열의 경우 다음을 누르세요.", "defineKeybinding.kbLayoutErrorMessage": "현재 자판 배열에서는 이 키 조합을 생성할 수 없습니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index cf0d425f7fd7e..e34db9894efd3 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,13 +5,12 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "경고: options.cwd는 string 형식이어야 합니다. {0} 값을 무시합니다.\n", - "ConfigurationParser.noShell": "경고: 셸 구성은 작업을 터미널에서 실행 중일 때에만 지원됩니다.", "ConfigurationParser.noargs": "오류: 명령 인수는 문자열의 배열이어야 합니다. 제공된 값:\n{0}", + "ConfigurationParser.noShell": "경고: 셸 구성은 작업을 터미널에서 실행 중일 때에만 지원됩니다.", "ConfigurationParser.noName": "오류: 선언 범위 내의 문제 선택기는 이름이 있어야 합니다.\n{0}\n", "ConfigurationParser.unknownMatcherKind": "경고: 정의된 문제 선택기를 알 수 없습니다. 지원되는 형식은 string | ProblemMatcher |(string | ProblemMatcher)[]입니다.\n{0}\n", "ConfigurationParser.invalidVaraibleReference": "오류: 잘못된 problemMatcher 참조: {0}\n", "ConfigurationParser.noTaskName": "오류: 작업에서 taskName 속성을 제공해야 합니다. 이 작업은 무시됩니다.\n{0}\n", "taskConfiguration.shellArgs": "경고: 작업 '{0}'은(는) 셸 명령이며, 명령 이름이나 인수 중 하나에 이스케이프되지 않은 공백이 있습니다. 명령줄 인용을 올바르게 하려면 인수를 명령으로 병합하세요.", - "taskConfiguration.noCommandOrDependsOn": "오류: 작업 '{0}'에서 명령이나 dependsOn 속성을 지정하지 않습니다. 이 작업은 무시됩니다. 해당 작업의 정의는:\n{1}입니다.", "taskConfiguration.noCommand": "오류: 작업 '{0}'에서 명령을 정의하지 않습니다. 이 작업은 무시됩니다. 해당 작업의 정의는\n{1}입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 9ae6b6172e576..13d620361aa03 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "JsonSchema.version": "구성의 버전 번호입니다.", - "JsonSchema.windows": "Windows 특정 명령 구성", - "JsonSchema.mac": "Mac 특정 명령 구성", - "JsonSchema.linux": "Linux 특정 명령 구성", "JsonSchema.shell": "명령이 셸 명령인지 외부 프로그램인지 여부를 지정합니다. 생략하면 기본값 false가 사용됩니다.", "JsonSchema.tasks.dependsOn.string": "이 작업이 종속된 또 다른 작업입니다.", - "JsonSchema.tasks.dependsOn.array": "이 작업이 종속된 다른 여러 작업입니다." + "JsonSchema.tasks.dependsOn.array": "이 작업이 종속된 다른 여러 작업입니다.", + "JsonSchema.windows": "Windows 특정 명령 구성", + "JsonSchema.mac": "Mac 특정 명령 구성", + "JsonSchema.linux": "Linux 특정 명령 구성" } \ No newline at end of file diff --git a/i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json index 74a80b4280d24..3ffec1c5e8759 100644 --- a/i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json +++ b/i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -6,9 +6,9 @@ { "activeEditorShort": "e.g. meuArquivo.txt", "activeEditorMedium": "e.g. minhaPasta/meuArquivo.txt", - "activeEditorLong": "e.g. /Usuarios/Desenvolvimento/meuProjeto/minhaPasta/meuArquivo.txt", + "activeEditorLong": "por exemplo /Usuários/Desenvolvimento/meuProjeto/minhaPasta/meuArquivo/txt", "rootName": "e.g. meuProjeto", - "rootPath": "e.g. /Usuarios/Desenvolvimento/meuProjeto", + "rootPath": "por exemplo /Usuários/desenvolvimento/meuProjeto", "appName": "e.g. VS Code", "dirty": "Um indicador de alteração se o editor ativo foi alterado", "separator": "um separador condicional (' - ') que somente é mostrado quando envolvido por variáveis com valores", diff --git a/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json index dd5a316f1a134..8b6ad71cd4e6d 100644 --- a/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,9 +3,4 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{ - "acceptCurrentChange": "Aceitar a mudança atual", - "acceptIncomingChange": "Aceitar a mudança de entrada", - "acceptBothChanges": "Aceitar ambas alterações", - "compareChanges": "Comparar alteracões" -} \ No newline at end of file +{} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json index ee80b2e19051a..231dd1e64b11b 100644 --- a/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json @@ -5,7 +5,6 @@ // Do not edit this file. It is machine generated. { "cursorNotInConflict": "Cursor do editor não está dentro de um conflito de mesclagem", - "compareChangesTitle": "{0}: Mudanças atuais \\u2194 alterações de entrada ", "cursorOnSplitterRange": "Cursor do editor está dentro do separador de conflitos de mesclagem, por favor mova-o para o bloco \"atual\" ou \"entrada\"", "noConflicts": "Nenhum conflito de mesclagem encontrado neste arquivo", "noOtherConflictsInThisFile": "Não há outros conflitos de mesclagem dentro desse arquivo" diff --git a/i18n/ptb/extensions/merge-conflict/package.i18n.json b/i18n/ptb/extensions/merge-conflict/package.i18n.json index b290f272513db..1ca5029926436 100644 --- a/i18n/ptb/extensions/merge-conflict/package.i18n.json +++ b/i18n/ptb/extensions/merge-conflict/package.i18n.json @@ -5,15 +5,7 @@ // Do not edit this file. It is machine generated. { "command.category": "Conflito de Mesclagem", - "command.accept.all-incoming": "Aceitar todas as novas entradas", - "command.accept.all-both": "Aceitar Ambos", - "command.accept.current": "Aceitar a atual", - "command.accept.incoming": "Aceitar as novas entradas", - "command.accept.selection": "Aceitar a seleção", "command.accept.both": "Aceitar Ambos", - "command.next": "Próximo conflito", - "command.previous": "Conflito anterior", - "command.compare": "Comparar o conflito atual", "config.title": "Mesclar conflitos", "config.codeLensEnabled": "Habilitar/Desabilitar o conflito de mesclagem no bloco CodeLens dentro do editor", "config.decoratorsEnabled": "Habilitar/Desabilitar decoradores de mesclagem de conflitos dentro do editor" diff --git a/i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json index ce050eb3d8ede..4ba4da55a07fb 100644 --- a/i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,7 +5,6 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Buscando dados para melhor IntelliSense do TypeScript", - "typesInstallerInitializationFailed.title": "Não foi possível instalar arquivos de digitação para recursos da linguagem JavaScript. Certifique-se que NPM está instalado e está em seu caminho", "typesInstallerInitializationFailed.moreInformation": "Mais informações", "typesInstallerInitializationFailed.doNotCheckAgain": "Não verificar novamente", "typesInstallerInitializationFailed.close": "Fechar" diff --git a/i18n/ptb/extensions/typescript/package.i18n.json b/i18n/ptb/extensions/typescript/package.i18n.json index 74b4568f8b908..e46048cba4ae4 100644 --- a/i18n/ptb/extensions/typescript/package.i18n.json +++ b/i18n/ptb/extensions/typescript/package.i18n.json @@ -41,6 +41,6 @@ "typescript.selectTypeScriptVersion.title": "Selecionar a versão do JavaScript", "jsDocCompletion.enabled": "Habilitar/Desabilitar comentários JSDoc automáticos.", "javascript.implicitProjectConfig.checkJs": "Habilitar/desabilitar verificação semântica de arquivos JavaScript. Os arquivos existentes jsconfig.json ou tsconfig.json substituem essa configuração. Requer TypeScript > = 2.3.1.", - "typescript.check.npmIsInstalled": "Verificar se NPM está instalado para aquisição automática de digitação", - "javascript.nameSuggestions": "Habilitar/desabilitar incluindo nomes exclusivos do arquivo nas listas de sugestão de JavaScript." + "javascript.nameSuggestions": "Habilitar/desabilitar incluindo nomes exclusivos do arquivo nas listas de sugestão de JavaScript.", + "typescript.tsc.autoDetect": "Controla se a auto-detecção de tarefas tsc estão ligadas ou desligadas." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/electron-main/menus.i18n.json b/i18n/ptb/src/vs/code/electron-main/menus.i18n.json index 85312962c12e7..2a3b275d70d9d 100644 --- a/i18n/ptb/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/ptb/src/vs/code/electron-main/menus.i18n.json @@ -153,12 +153,12 @@ "miLicense": "&&Exibir Licença", "miPrivacyStatement": "&&Política de Privacidade", "miAbout": "&&Sobre", + "accessibilityOptionsWindowTitle": "Opções de Acessibilidade", "miRestartToUpdate": "Reinicie para Atualizar...", "miCheckingForUpdates": "Verificando Atualizações...", "miDownloadUpdate": "Baixar Atualização Disponível", "miDownloadingUpdate": "Baixando Atualização...", "miInstallingUpdate": "Instalando Atualização...", - "miCheckForUpdates": "Verificar Atualizações...", - "aboutDetail": "\\\\nVersão {0}\\\\nConfirmação {1}\\\\nData {2}\\\\nShell {3}\\\\nRenderizador {4}\\\\nNó {5}", + "aboutDetail": "\nVersão {0}\nConfirmação {1}\nData {2}\nShell {3}\nRenderizador {4}\nNó {5}", "okButton": "OK" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json index 32deba05d12ca..7de4c179900d4 100644 --- a/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -33,7 +33,6 @@ "wordWrapColumn": "Controla a coluna de quebra de linha do editor quando editor.wordWrap` é 'wordWrapColumn' ou 'bounded'.", "wrappingIndent": "Controla o recuo de linhas quebradas. Pode ser \"none\", \"same\" ou \"indent\".", "mouseWheelScrollSensitivity": "Um multiplicador a ser usado em \"deltaX\" e \"deltaY\" dos eventos de rolagem do botão de rolagem do mouse", - "multicursorModifier": "O modificador a ser utilizado para adicionar vários cursores com o mouse.", "quickSuggestions.strings": "Habilitar sugestões rápidas dentro de strings.", "quickSuggestions.comments": "Habilitar sugestões rápidas dentro de comentários.", "quickSuggestions.other": "Habilitar sugestões rápidas fora de strings e comentários.", diff --git a/i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json index 64d68304f9806..ca84c495b320f 100644 --- a/i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -60,7 +60,6 @@ "editorBackground": "Cor de plano de fundo do editor.", "editorForeground": "Cor de primeiro plano padrão do editor.", "editorWidgetBackground": "Cor de plano de fundo das ferramentas de edição, como pesquisar/substituir.", - "editorWidgetBorder": "Cor da borda da ferramenta editor.", "editorSelection": "Cor de seleção do editor.", "editorInactiveSelection": "Cor de seleção em um editor inativo.", "editorSelectionHighlight": "Cor de regiões com o mesmo conteúdo da seleção.", @@ -74,5 +73,11 @@ "diffEditorInserted": "Cor de fundo para texto que foi inserido.", "diffEditorRemoved": "Cor de fundo para texto que foi removido.", "diffEditorInsertedOutline": "Cor de contorno para o texto que foi inserido.", - "diffEditorRemovedOutline": "Cor de contorno para o texto que foi removido." + "diffEditorRemovedOutline": "Cor de contorno para o texto que foi removido.", + "mergeCurrentHeaderBackground": "Cor de fundo de cabeçalho atual em conflito de mesclagem em linha.", + "mergeCurrentContentBackground": "Cor de fundo de conteúdo atual em conflito de mesclagem em linha.", + "mergeIncomingHeaderBackground": "Cor de fundo de cabeçalho de entrada em conflito de mesclagem em linha.", + "mergeIncomingContentBackground": "Cor de fundo de conteúdo de entrada em conflito de mesclagem em linha.", + "overviewRulerCurrentContentForeground": "Cor de fundo de régua de visuaização atual em conflito de mesclagem em linha.", + "overviewRulerIncomingContentForeground": "Cor de fundo de régua de visuaização de entrada em conflito de mesclagem em linha." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/ptb/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/common/theme.i18n.json b/i18n/ptb/src/vs/workbench/common/theme.i18n.json index 635ace8d70878..0ba7870155931 100644 --- a/i18n/ptb/src/vs/workbench/common/theme.i18n.json +++ b/i18n/ptb/src/vs/workbench/common/theme.i18n.json @@ -7,15 +7,12 @@ "tabActiveBackground": "Cor de fundo da guia ativa. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", "tabInactiveBackground": "Cor de fundo da guia inativa. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", "tabBorder": "Borda para separar uma guia das outras. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", - "tabActiveEditorGroupActiveForeground": "Cor de primeiro plano da guia ativa em um grupo ativo. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", - "tabInactiveEditorGroupActiveForeground": "Cor de primeiro plano da guia inativa em um grupo ativo. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", "editorGroupBackground": "Cor de fundo de um grupo de editor. Grupos de editor são os recipientes dos editores. A cor de fundo é mostrada ao arrastar o editor de grupos ao redor.", "tabsContainerBackground": "Cor de fundo do cabeçalho do título do grupo de editor quando as guias são habilitadas. Grupos de editor são os recipientes dos editores.", "tabsContainerBorder": "Cor da borda do cabeçalho do título do grupo de editor quando as guias estão habilitadas. Grupos de editor são os recipientes dos editores.", "editorGroupHeaderBackground": "Cor de fundo do título do cabeçalho do grupo de editor quando as guias são desabilitadas. Grupos de editor são os recipientes dos editores.", "editorGroupBorder": "Cor para separar múltiplos grupos de editor de outro. Grupos de editor são os recipientes dos editores.", "editorDragAndDropBackground": "Cor de fundo ao arrastar editores. A cor deve ter transparência para que o conteúdo do editor ainda possa ser visto.", - "panelBackground": "Cor de fundo do painel. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", "panelBorder": "Cor da borda do painel no topo separando do editor. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", "panelActiveTitleForeground": "Cor do título para o painel ativo. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", "panelInactiveTitleForeground": "Cor do título para o painel inativo. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", diff --git a/i18n/ptb/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/workbench.i18n.json index 8b6ad71cd4e6d..46bdaa6720de9 100644 --- a/i18n/ptb/src/vs/workbench/electron-browser/workbench.i18n.json +++ b/i18n/ptb/src/vs/workbench/electron-browser/workbench.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "developer": "Desenvolvedor", + "file": "Arquivo" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 6dc0bc48afb76..de6d591510a0b 100644 --- a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "Apenas valores primitivos são mostrados para este objeto.", - "debuggingStarted": "Depuração Iniciada.", "debuggingPaused": "Depuração pausada, razão {0}, {1} {2}", + "debuggingStarted": "Depuração Iniciada.", "debuggingStopped": "Depuração parada.", "breakpointAdded": "Adicionado ponto de interrupção, linha {0}, arquivo {1}", "breakpointRemoved": "Ponto de interrupção removido, linha {0}, arquivo {1}", diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 7f32e3bf15617..1caebe040f568 100644 --- a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -9,6 +9,5 @@ "emmetPreferences": "Preferências usadas para modificar o comportamento de algumas ações e resolvedores de Emmet.", "emmetSyntaxProfiles": "Definir o perfil para a sintaxe especificada ou usar seu próprio perfil com regras específicas.", "emmetExclude": "Uma matriz de línguagens onde abreviaturas emmet não devem ser expandidas.", - "emmetExtensionsPath": "Caminho para uma pasta contendo perfis emmet, trechos e preferências", - "emmetUseModules": "Use os novos módulos emmet para características emmet ao invés da biblioteca emmet única." + "emmetExtensionsPath": "Caminho para uma pasta contendo perfis emmet, trechos e preferências" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 7e8cde2d602d5..e1aa51729e52b 100644 --- a/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "disableOtherKeymapsConfirmation": "Desabilitar outros mapeamentos de teclado ({0}) para evitar conflitos entre as combinações de teclas?", "yes": "Sim", "no": "Não", "betterMergeDisabled": "A extensão Better Merge agora é intrínseca, a extensão instalada foi desabilitada e pode ser desinstalada.", diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 15fd432f9fa85..a4aa8b55e2f00 100644 --- a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "Definir Keybinding", - "defineKeybinding.kbLayoutInfoMessage": "Para o seu layout de teclado atual pressionar", "defineKeybinding.kbLayoutErrorMessage": "Você não será capaz de produzir esta combinação de teclas sob seu layout de teclado atual." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json index 8b6ad71cd4e6d..1cb8d16e56630 100644 --- a/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "editorGutterModifiedBackground": "Cor de fundo da dobra do editor para as linhas que estão modificadas.", + "editorGutterAddedBackground": "Cor de fundo da dobra do editor para as linhas que estão adicionadas.", + "editorGutterDeletedBackground": "Cor de fundo da dobra do editor para as linhas que estão excluídas." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index be3fefb5d3d84..32bbf24976b3f 100644 --- a/i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tarefas", - "workspace": "Do espaço de trabalho", - "extension": "De extensões" + "entryAriaLabel": "{0}, tarefas" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 2de0b161ac87c..45308919a6ea4 100644 --- a/i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,13 +5,12 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "Aviso: options.cwd deve ser do tipo string. Ignorando valor {0}\n", - "ConfigurationParser.noShell": "Aviso: A configuração do shell somente é suportada quando estiver executando tarefas no terminal.", "ConfigurationParser.noargs": "Erro: Argumentos do comando devem ser uma matriz de strings. Valor informado é:\n{0}", + "ConfigurationParser.noShell": "Aviso: A configuração do shell somente é suportada quando estiver executando tarefas no terminal.", "ConfigurationParser.noName": "Erro: Problem Matcher no escopo declarado deve ter um nome:\n{0}\n", "ConfigurationParser.unknownMatcherKind": "Aviso: a correspondência de problema definido é desconhecido. Tipos suportados são string | ProblemMatcher | (string | ProblemMatcher)[].\n{0}\n", "ConfigurationParser.invalidVaraibleReference": "Erro: ProblemMatcher inválido referência: {0}\n", "ConfigurationParser.noTaskName": "Erro: tarefas devem fornecer uma propriedade taskName. A tarefa será ignorada.\n{0}\n", "taskConfiguration.shellArgs": "Aviso: a tarefa '{0}' é um comando do shell e o nome de comando ou um dos seus argumentos tem espaços sem escape. Para garantir a linha de comando correta por favor mesclar argumentos no comando.", - "taskConfiguration.noCommandOrDependsOn": "Erro: a tarefa '{0}' também não especifica um comando ou uma propriedade dependsOn. A tarefa será ignorada. Sua definição é: {1}", "taskConfiguration.noCommand": "Erro: a tarefa '{0}' não define um comando. A tarefa será ignorada. Sua definição é: {1}" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 3130e474d7e22..9010242ce874c 100644 --- a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "JsonSchema.version": "Número da versão do config", - "JsonSchema.windows": "Configuração de comando específica do Windows", - "JsonSchema.mac": "Configuração de comando específica do Mac", - "JsonSchema.linux": "Configuração de comando específica do Linux", "JsonSchema.shell": "Especifica se o comando é um comando shell ou um programa externo. O padrão é falso se omitido.", "JsonSchema.tasks.dependsOn.string": "Outra tarefa da qual esta tarefa depende.", - "JsonSchema.tasks.dependsOn.array": "A outra tarefa que esta tarefa depende." + "JsonSchema.tasks.dependsOn.array": "A outra tarefa que esta tarefa depende.", + "JsonSchema.windows": "Configuração de comando específica do Windows", + "JsonSchema.mac": "Configuração de comando específica do Mac", + "JsonSchema.linux": "Configuração de comando específica do Linux" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 2975525979495..396a21b1c490f 100644 --- a/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -25,7 +25,5 @@ "welcomePage.extensionListSeparator": ", ", "welcomePage.installedExtension": "{0} (instalado)", "ok": "OK", - "cancel": "Cancelar", - "welcomePage.quickLinkBackground": "Cor de fundo para as ligações rápidas na página de boas-vindas.", - "welcomePage.quickLinkHoverBackground": "Passar sobre a cor de fundo para as ligações rápidas na página de boas-vindas." + "cancel": "Cancelar" } \ No newline at end of file diff --git a/i18n/rus/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/rus/extensions/typescript/out/utils/typingsStatus.i18n.json index 4adb921367a61..506fc2b22fb21 100644 --- a/i18n/rus/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/rus/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,7 +5,6 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Получение данных для повышения эффективности IntelliSense TypeScript", - "typesInstallerInitializationFailed.title": "Не удалось установить файлы типизации для языка JavaScript. Убедитесь, что NPM установлен и путь к нему указан в переменной PATH", "typesInstallerInitializationFailed.moreInformation": "Дополнительные сведения", "typesInstallerInitializationFailed.doNotCheckAgain": "Больше не проверять", "typesInstallerInitializationFailed.close": "Закрыть" diff --git a/i18n/rus/extensions/typescript/package.i18n.json b/i18n/rus/extensions/typescript/package.i18n.json index eefc82f18b2f7..879f5909edefd 100644 --- a/i18n/rus/extensions/typescript/package.i18n.json +++ b/i18n/rus/extensions/typescript/package.i18n.json @@ -36,6 +36,5 @@ "typescript.implementationsCodeLens.enabled": "Включить или отключить CodeLens для реализаций. Требуется TypeScript >= 2.2.0.", "typescript.selectTypeScriptVersion.title": "Выберите версию TypeScript.", "jsDocCompletion.enabled": "Включить или отключить JSDoc коментарии", - "javascript.implicitProjectConfig.checkJs": "Включает/отключает семантическую проверку файлов JavaScript. Этот параметр может переопределяться в файле jsconfig.json или tsconfig.json. Требуется TypeScript 2.3.1 или более поздней версии.", - "typescript.check.npmIsInstalled": "Проверяет, установлен ли NPM для автоматического получения типов" + "javascript.implicitProjectConfig.checkJs": "Включает/отключает семантическую проверку файлов JavaScript. Этот параметр может переопределяться в файле jsconfig.json или tsconfig.json. Требуется TypeScript 2.3.1 или более поздней версии." } \ No newline at end of file diff --git a/i18n/rus/src/vs/code/electron-main/menus.i18n.json b/i18n/rus/src/vs/code/electron-main/menus.i18n.json index 68b593f21180e..edcee11b1f13e 100644 --- a/i18n/rus/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/rus/src/vs/code/electron-main/menus.i18n.json @@ -150,12 +150,12 @@ "miLicense": "Просмотреть &&лицензию", "miPrivacyStatement": "&&Заявление о конфиденциальности", "miAbout": "&&О программе", + "accessibilityOptionsWindowTitle": "Специальные возможности", "miRestartToUpdate": "Перезапустить для обновления...", "miCheckingForUpdates": "Идет проверка наличия обновлений...", "miDownloadUpdate": "Скачать доступное обновление", "miDownloadingUpdate": "Скачивается обновление...", "miInstallingUpdate": "Идет установка обновления...", - "miCheckForUpdates": "Проверить наличие обновлений...", "aboutDetail": "\nВерсия {0}\nФиксация {1}\nДата {2}\nОболочка {3}\nОбработчик {4}\nNode {5}", "okButton": "ОК" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/rus/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/common/theme.i18n.json b/i18n/rus/src/vs/workbench/common/theme.i18n.json index 76b8cda3228df..3939a7804faa4 100644 --- a/i18n/rus/src/vs/workbench/common/theme.i18n.json +++ b/i18n/rus/src/vs/workbench/common/theme.i18n.json @@ -7,12 +7,9 @@ "tabActiveBackground": "Цвет фона активной вкладки. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "tabInactiveBackground": "Цвет фона неактивной вкладки. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "tabBorder": "Граница для разделения вкладок. Вкладки — это контейнеры для редакторов в области редакторов. В одной группе редакторов можно открыть несколько вкладок. Может быть несколько групп редакторов.", - "tabActiveEditorGroupActiveForeground": "Цвет переднего плана активной вкладки в активной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", - "tabInactiveEditorGroupActiveForeground": "Цвет переднего плана неактивной вкладки в активной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "editorGroupBackground": "Цвет фона группы редакторов. Группы редакторов представляют собой контейнеры редакторов. Цвет фона отображается при перетаскивании групп редакторов.", "editorGroupHeaderBackground": "Цвет фона для заголовка группы редакторов, когда вкладки отключены. Группы редакторов представляют собой контейнеры редакторов.", "editorGroupBorder": "Цвет для разделения нескольких групп редакторов. Группы редакторов — это контейнеры редакторов.", - "panelBackground": "Цвет фона панели. Панели показаны под областью редактора и содержат такие представления, как выходные данные и встроенный терминал.", "panelBorder": "Цвет верхней границы панели, отделяющей ее от редактора. Панели показаны под областью редактора и содержат такие представления, как выходные данные и встроенный терминал.", "panelActiveTitleForeground": "Цвет заголовка для активной панели. Панели отображаются под областью редактора и содержат такие представления, как окно вывода и встроенный терминал.", "panelInactiveTitleForeground": "Цвет заголовка для неактивной панели. Панели отображаются под областью редактора и содержат такие представления, как окно вывода и встроенный терминал.", diff --git a/i18n/rus/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/workbench.i18n.json index 8b6ad71cd4e6d..1aca4f5d59c46 100644 --- a/i18n/rus/src/vs/workbench/electron-browser/workbench.i18n.json +++ b/i18n/rus/src/vs/workbench/electron-browser/workbench.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "developer": "Разработчик", + "file": "Файл" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json index 4dceb7811c075..342aae775b878 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "snapshotObj": "Для этого объекта показаны только значения-примитивы.", - "debuggingStarted": "Отладка началась.", "debuggingPaused": "Отладка была приостановлена, причина {0}, {1} {2}", + "debuggingStarted": "Отладка началась.", "debuggingStopped": "Отладка остановилась.", "breakpointAdded": "Добавлена точка останова: строка {0}, файл {1}", "breakpointRemoved": "Удалена точка останова: строка {0}, файл {1}", diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 2798a3b44bd63..92f25868855c7 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,6 +5,5 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "Определить назначение клавиш", - "defineKeybinding.kbLayoutInfoMessage": "Для текущей раскладки клавиатуры нажмите ", "defineKeybinding.kbLayoutErrorMessage": "Вы не сможете нажать это сочетание клавиш в текущей раскладке клавиатуры." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 450789f1e668d..7802fd33b5d7a 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -5,13 +5,12 @@ // Do not edit this file. It is machine generated. { "ConfigurationParser.invalidCWD": "Предупреждение: options.cwd должен иметь тип string. Игнорируется значение {0}\n", - "ConfigurationParser.noShell": "Предупреждение: конфигурация оболочки поддерживается только при выполнении задач в терминале.", "ConfigurationParser.noargs": "Ошибка: аргументы команды должны представлять собой массив строк. Указанное значение:\n{0}", + "ConfigurationParser.noShell": "Предупреждение: конфигурация оболочки поддерживается только при выполнении задач в терминале.", "ConfigurationParser.noName": "Ошибка: сопоставитель проблем в области объявления должен иметь имя:\n{0}\n", "ConfigurationParser.unknownMatcherKind": "Предупреждение: определен неизвестный сопоставитель проблем. Поддерживаемые типы: строка | СопоставительПроблем | (строка | СопоставительПроблем)[].\n{0}\n", "ConfigurationParser.invalidVaraibleReference": "Ошибка: недопустимая ссылка на problemMatcher: {0}\n", "ConfigurationParser.noTaskName": "Ошибка: задачи должны предоставлять свойство taskName. Задача будет проигнорирована.\n{0}\n", "taskConfiguration.shellArgs": "Предупреждение: задача \"{0}\" является командой оболочки, и имя команды или одного из ее аргументов включает пробелы без escape-последовательности. Чтобы обеспечить правильную расстановку кавычек в командной строке, объедините аргументы в команде.", - "taskConfiguration.noCommandOrDependsOn": "Ошибка: задача \"{0}\" не задает команду или свойство dependsOn. Задача будет игнорироваться. Ее определение:\n{1}", "taskConfiguration.noCommand": "Ошибка: задача \"{0}\" не определяет команду. Задача будет игнорироваться. Ее определение:\n{1}" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 881457afe777e..f74df060945e2 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -4,11 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "JsonSchema.version": "Номер версии конфигурации", - "JsonSchema.windows": "Настройка команд Windows", - "JsonSchema.mac": "Настройка команд Mac", - "JsonSchema.linux": "Настройка команд Linux", "JsonSchema.shell": "Указывает, является ли команда командой оболочки или внешней программой. Если опущено, значение по умолчанию — false.", "JsonSchema.tasks.dependsOn.string": "Другая задача, от которой зависит эта задача.", - "JsonSchema.tasks.dependsOn.array": "Другие задачи, от которых зависит эта задача." + "JsonSchema.tasks.dependsOn.array": "Другие задачи, от которых зависит эта задача.", + "JsonSchema.windows": "Настройка команд Windows", + "JsonSchema.mac": "Настройка команд Mac", + "JsonSchema.linux": "Настройка команд Linux" } \ No newline at end of file From c204fe965e1412d541c7dbdb712aa09b60135b7d Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 1 Jun 2017 08:01:24 +0200 Subject: [PATCH 1419/2747] global settings action: trigger on mouse down and space/enter --- .../parts/activitybar/activitybarActions.ts | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts index ab0ec27b42091..7aab7fc7c7d83 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts @@ -28,6 +28,8 @@ import { IThemeService, ITheme, registerThemingParticipant, ICssStyleCollector } import { ACTIVITY_BAR_BADGE_FOREGROUND, ACTIVITY_BAR_BADGE_BACKGROUND, ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND, ACTIVITY_BAR_FOREGROUND } from 'vs/workbench/common/theme'; import { contrastBorder, activeContrastBorder, focusBorder } from 'vs/platform/theme/common/colorRegistry'; import { StandardMouseEvent } from "vs/base/browser/mouseEvent"; +import { KeyCode } from "vs/base/common/keyCodes"; +import { StandardKeyboardEvent } from "vs/base/browser/keyboardEvent"; export interface IViewletActivity { badge: IBadge; @@ -669,17 +671,35 @@ export class GlobalActivityActionItem extends ActivityActionItem { super(action, { draggable: false }, themeService); } - public onClick(e: MouseEvent): void { + public render(container: HTMLElement): void { + super.render(container); + + // Context menus are triggered on mouse down so that an item can be picked + // and executed with releasing the mouse over it + this.$container.on(DOM.EventType.MOUSE_DOWN, (e: MouseEvent) => { + DOM.EventHelper.stop(e, true); + + const event = new StandardMouseEvent(e); + this.showContextMenu({ x: event.posx, y: event.posy }); + }); + + this.$container.on(DOM.EventType.KEY_UP, (e: KeyboardEvent) => { + let event = new StandardKeyboardEvent(e); + if (event.equals(KeyCode.Enter) || event.equals(KeyCode.Space)) { + DOM.EventHelper.stop(e, true); + + this.showContextMenu(this.$container.getHTMLElement()); + } + }); + } + + private showContextMenu(location: HTMLElement | { x: number, y: number }): void { const globalAction = this._action as GlobalActivityAction; const activity = globalAction.activity as IGlobalActivity; const actions = activity.getActions(); - const event = new StandardMouseEvent(e); - event.stopPropagation(); - event.preventDefault(); - this.contextMenuService.showContextMenu({ - getAnchor: () => ({ x: event.posx, y: event.posy }), + getAnchor: () => location, getActions: () => TPromise.as(actions), onHide: () => dispose(actions) }); From 5b473bbe2dd33fe2918814962d70f6929517b802 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Thu, 1 Jun 2017 08:31:44 +0200 Subject: [PATCH 1420/2747] Use customize instead of identifier for customizing tasks --- .../parts/tasks/common/taskConfiguration.ts | 10 ++++++++- src/vs/workbench/parts/tasks/common/tasks.ts | 5 +++++ .../tasks/electron-browser/jsonSchema_v2.ts | 6 +++--- .../electron-browser/task.contribution.ts | 21 +++++++------------ 4 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts index 2419be66ba092..717fa268eab99 100644 --- a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts @@ -105,6 +105,11 @@ export interface TaskDescription extends PlatformTaskDescription { */ identifier?: string; + /** + * The id of the customized task + */ + customize?: string; + /** * Windows specific task configuration */ @@ -903,6 +908,9 @@ namespace TaskDescription { task.group = Tasks.TaskGroup.Test; } } + if (Types.isString(externalTask.customize)) { + task.customize = externalTask.customize; + } if (externalTask.command !== void 0) { // if the task has its own command then we suppress the // task name by default. @@ -1055,7 +1063,7 @@ namespace TaskDescription { } function isAnnotating(task: Tasks.Task): boolean { - return (task.command === void 0 || task.command.name === void 0) && (task.dependsOn === void 0 || task.dependsOn.length === 0); + return task.customize !== void 0 && (task.command === void 0 || task.command.name === void 0); } export function assignProperties(target: Tasks.Task, source: Tasks.Task): Tasks.Task { diff --git a/src/vs/workbench/parts/tasks/common/tasks.ts b/src/vs/workbench/parts/tasks/common/tasks.ts index 88dfd56ba739c..b75a5750e5886 100644 --- a/src/vs/workbench/parts/tasks/common/tasks.ts +++ b/src/vs/workbench/parts/tasks/common/tasks.ts @@ -208,6 +208,11 @@ export interface Task { */ identifier: string; + /** + * The id of the customized task + */ + customize?: string; + /** * the task's group; */ diff --git a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts index 3a60d35d08892..14985496e1815 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts @@ -83,9 +83,9 @@ const version: IJSONSchema = { description: nls.localize('JsonSchema.version', 'The config\'s version number.') }; -const identifier: IJSONSchema = { +const customize: IJSONSchema = { type: 'string', - description: nls.localize('JsonSchema.tasks.identifier', 'A unique identifier of the task.') + description: nls.localize('JsonSchema.tasks.customize', 'The contributed task to be customized.') }; const schema: IJSONSchema = { @@ -128,7 +128,7 @@ definitions.taskDescription.properties.dependsOn = dependsOn; // definitions.taskDescription.properties.echoCommand.deprecationMessage = nls.localize('JsonSchema.tasks.echoCommand.deprecated', 'The property echoCommand is deprecated. Use the terminal property instead.'); // definitions.taskDescription.properties.isBuildCommand.deprecationMessage = nls.localize('JsonSchema.tasks.isBuildCommand.deprecated', 'The property isBuildCommand is deprecated. Use the group property instead.'); // definitions.taskDescription.properties.isTestCommand.deprecationMessage = nls.localize('JsonSchema.tasks.isTestCommand.deprecated', 'The property isTestCommand is deprecated. Use the group property instead.'); -definitions.taskDescription.properties.identifier = identifier; +definitions.taskDescription.properties.customize = customize; definitions.taskDescription.properties.type = Objects.deepClone(taskType); definitions.taskDescription.properties.terminal = terminal; definitions.taskDescription.properties.group = group; diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index f14e2e4bbc6c4..126ca11a1b8d8 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -71,7 +71,7 @@ import { Scope, IActionBarRegistry, Extensions as ActionBarExtensions } from 'vs import { ITerminalService } from 'vs/workbench/parts/terminal/common/terminal'; import { ITaskSystem, ITaskResolver, ITaskSummary, ITaskExecuteResult, TaskExecuteKind, TaskError, TaskErrors, TaskSystemEvents } from 'vs/workbench/parts/tasks/common/taskSystem'; -import { Task, TaskSet, TaskGroup, ExecutionEngine, TaskSourceKind } from 'vs/workbench/parts/tasks/common/tasks'; +import { Task, TaskSet, TaskGroup, ExecutionEngine, JsonSchemaVersion, TaskSourceKind } from 'vs/workbench/parts/tasks/common/tasks'; import { ITaskService, TaskServiceEvents, ITaskProvider } from 'vs/workbench/parts/tasks/common/taskService'; import { templates as taskTemplates } from 'vs/workbench/parts/tasks/common/taskTemplates'; @@ -502,7 +502,6 @@ interface WorkspaceTaskResult { set: TaskSet; annotatingTasks: { byIdentifier: IStringDictionary; - byLabel: IStringDictionary; }; hasErrors: boolean; } @@ -756,7 +755,7 @@ class TaskService extends EventEmitter implements ITaskService { return TPromise.as(undefined); } let fileConfig = configuration.config; - let customize = { taskName: task._label, identifier: task.identifier }; + let customize = { customize: task.identifier, taskName: task._label, problemMatcher: [] }; if (!fileConfig) { fileConfig = { version: '2.0.0', @@ -952,7 +951,7 @@ class TaskService extends EventEmitter implements ITaskService { resolve(result); } }; - if (this.getExecutionEngine() === ExecutionEngine.Terminal && this._providers.size > 0) { + if (this.getJsonSchemaVersion() === JsonSchemaVersion.V2_0_0 && this._providers.size > 0) { this._providers.forEach((provider) => { counter++; provider.provideTasks().done(done, error); @@ -970,7 +969,7 @@ class TaskService extends EventEmitter implements ITaskService { for (let set of result) { for (let task of set.tasks) { if (annotatingTasks) { - let annotatingTask = annotatingTasks.byIdentifier[task.identifier] || annotatingTasks.byLabel[task._label]; + let annotatingTask = annotatingTasks.byIdentifier[task.identifier]; if (annotatingTask) { TaskConfig.mergeTasks(task, annotatingTask); task.name = annotatingTask.name; @@ -1123,17 +1122,13 @@ class TaskService extends EventEmitter implements ITaskService { problemReporter.fatal(nls.localize('TaskSystem.configurationErrors', 'Error: the provided task configuration has validation errors and can\'t not be used. Please correct the errors first.')); return { set: undefined, annotatingTasks: undefined, hasErrors }; } - let annotatingTasks: { byIdentifier: IStringDictionary; byLabel: IStringDictionary; }; + let annotatingTasks: { byIdentifier: IStringDictionary; }; if (parseResult.annotatingTasks && parseResult.annotatingTasks.length > 0) { annotatingTasks = { - byIdentifier: Object.create(null), - byLabel: Object.create(null) + byIdentifier: Object.create(null) }; for (let task of parseResult.annotatingTasks) { - annotatingTasks.byIdentifier[task.identifier] = task; - if (task._label) { - annotatingTasks.byLabel[task._label] = task; - } + annotatingTasks.byIdentifier[task.customize] = task; } } return { set: { tasks: parseResult.tasks }, annotatingTasks: annotatingTasks, hasErrors }; @@ -1149,7 +1144,6 @@ class TaskService extends EventEmitter implements ITaskService { return TaskConfig.ExecutionEngine.from(config); } - /* private getJsonSchemaVersion(): JsonSchemaVersion { let { config } = this.getConfiguration(); if (!config) { @@ -1157,7 +1151,6 @@ class TaskService extends EventEmitter implements ITaskService { } return TaskConfig.JsonSchemaVersion.from(config); } - */ private getConfiguration(): { config: TaskConfig.ExternalTaskRunnerConfiguration; hasParseErrors: boolean } { let result = this.configurationService.getConfiguration('tasks'); From 69ddf8a83e12da26cba57af4cd653d78b5f77a86 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 1 Jun 2017 09:15:19 +0200 Subject: [PATCH 1421/2747] Fixes #27811: Add editor.multicursorModifier to most common editor settings --- .../telemetry/common/telemetryUtils.ts | 108 ++++++++++-------- .../preferences/browser/preferencesService.ts | 5 +- 2 files changed, 64 insertions(+), 49 deletions(-) diff --git a/src/vs/platform/telemetry/common/telemetryUtils.ts b/src/vs/platform/telemetry/common/telemetryUtils.ts index e3370d3d8655a..7ba7db945fef4 100644 --- a/src/vs/platform/telemetry/common/telemetryUtils.ts +++ b/src/vs/platform/telemetry/common/telemetryUtils.ts @@ -190,82 +190,96 @@ export function telemetryURIDescriptor(uri: URI): URIDescriptor { * Only add settings that cannot contain any personal/private information of users (PII). */ const configurationValueWhitelist = [ - 'window.zoomLevel', - 'editor.fontSize', + 'editor.tabCompletion', 'editor.fontFamily', + 'editor.fontWeight', + 'editor.fontSize', + 'editor.lineHeight', + 'editor.letterSpacing', + 'editor.lineNumbers', + 'editor.rulers', + 'editor.wordSeparators', 'editor.tabSize', + 'editor.insertSpaces', + 'editor.detectIndentation', + 'editor.roundedSelection', + 'editor.scrollBeyondLastLine', + 'editor.minimap.enabled', + 'editor.minimap.renderCharacters', + 'editor.minimap.maxColumn', + 'editor.find.seedSearchStringFromSelection', + 'editor.find.autoFindInSelection', + 'editor.wordWrap', + 'editor.wordWrapColumn', + 'editor.wrappingIndent', + 'editor.mouseWheelScrollSensitivity', + 'editor.multiCursorModifier', + 'editor.quickSuggestions', + 'editor.quickSuggestionsDelay', + 'editor.parameterHints', + 'editor.autoClosingBrackets', + 'editor.formatOnType', + 'editor.formatOnPaste', + 'editor.suggestOnTriggerCharacters', + 'editor.acceptSuggestionOnEnter', + 'editor.acceptSuggestionOnCommitCharacter', + 'editor.snippetSuggestions', + 'editor.emptySelectionClipboard', + 'editor.wordBasedSuggestions', + 'editor.suggestFontSize', + 'editor.suggestLineHeight', + 'editor.selectionHighlight', + 'editor.occurrencesHighlight', + 'editor.overviewRulerLanes', + 'editor.overviewRulerBorder', + 'editor.cursorBlinking', + 'editor.cursorStyle', + 'editor.mouseWheelZoom', + 'editor.fontLigatures', + 'editor.hideCursorInOverviewRuler', + 'editor.renderWhitespace', + 'editor.renderControlCharacters', + 'editor.renderIndentGuides', + 'editor.renderLineHighlight', + 'editor.codeLens', + 'editor.folding', + 'editor.showFoldingControls', + 'editor.matchBrackets', + 'editor.glyphMargin', + 'editor.useTabStops', + 'editor.trimAutoWhitespace', + 'editor.stablePeek', + 'editor.dragAndDrop', + 'editor.formatOnSave', + + 'window.zoomLevel', 'files.autoSave', 'files.hotExit', 'typescript.check.tscVersion', - 'editor.renderWhitespace', - 'editor.cursorBlinking', - 'editor.cursorStyle', 'files.associations', 'workbench.statusBar.visible', - 'editor.wordWrap', - 'editor.wordWrapColumn', - 'editor.insertSpaces', - 'editor.renderIndentGuides', 'files.trimTrailingWhitespace', 'git.confirmSync', - 'editor.rulers', 'workbench.sideBar.location', - 'editor.fontLigatures', - 'editor.wordWrap', - 'editor.lineHeight', - 'editor.detectIndentation', - 'editor.formatOnType', - 'editor.formatOnSave', - 'editor.formatOnPaste', - 'editor.dragAndDrop', 'window.openFilesInNewWindow', 'javascript.validate.enable', - 'editor.mouseWheelZoom', - 'editor.fontWeight', - 'editor.scrollBeyondLastLine', - 'editor.lineNumbers', - 'editor.letterSpacing', - 'editor.wrappingIndent', - 'editor.renderControlCharacters', - 'editor.autoClosingBrackets', 'window.reopenFolders', 'extensions.autoUpdate', - 'editor.tabCompletion', 'files.eol', 'explorer.openEditors.visible', 'workbench.editor.enablePreview', 'files.autoSaveDelay', - 'editor.roundedSelection', - 'editor.quickSuggestions', - 'editor.acceptSuggestionOnEnter', - 'editor.acceptSuggestionOnCommitCharacter', 'workbench.editor.showTabs', 'files.encoding', 'files.autoGuessEncoding', - 'editor.quickSuggestionsDelay', - 'editor.snippetSuggestions', - 'editor.selectionHighlight', - 'editor.occurrencesHighlight', - 'editor.glyphMargin', - 'editor.wordSeparators', - 'editor.mouseWheelScrollSensitivity', - 'editor.suggestOnTriggerCharacters', 'git.enabled', 'http.proxyStrictSSL', 'terminal.integrated.fontFamily', - 'editor.overviewRulerLanes', - 'editor.overviewRulerBorder', - 'editor.wordBasedSuggestions', - 'editor.hideCursorInOverviewRuler', - 'editor.trimAutoWhitespace', - 'editor.folding', - 'editor.matchBrackets', 'workbench.editor.enablePreviewFromQuickOpen', 'workbench.editor.swipeToNavigate', 'php.builtInCompletions.enable', 'php.validate.enable', 'php.validate.run', - 'editor.parameterHints', 'workbench.welcome.enabled', ]; diff --git a/src/vs/workbench/parts/preferences/browser/preferencesService.ts b/src/vs/workbench/parts/preferences/browser/preferencesService.ts index 436d010bd463f..bb6d77f0d309c 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesService.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesService.ts @@ -289,15 +289,16 @@ export class PreferencesService extends Disposable implements IPreferencesServic private fetchMostCommonlyUsedSettings(): TPromise { return TPromise.wrap([ - 'editor.fontSize', 'files.autoSave', + 'editor.fontSize', 'editor.fontFamily', 'editor.tabSize', 'editor.renderWhitespace', - 'files.exclude', 'editor.cursorStyle', + 'editor.multiCursorModifier', 'editor.insertSpaces', 'editor.wordWrap', + 'files.exclude', 'files.associations' ]); } From eac49a321b84cb9828430e9dcd3f34243a3480f7 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 1 Jun 2017 09:26:32 +0200 Subject: [PATCH 1422/2747] Git: rename 'Publish' to 'Publish Branch' (fixes #26133) --- extensions/git/package.nls.json | 2 +- extensions/git/src/statusbar.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index e02a5ed2310fa..c34b7166da39c 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -27,7 +27,7 @@ "command.push": "Push", "command.pushTo": "Push to...", "command.sync": "Sync", - "command.publish": "Publish", + "command.publish": "Publish Branch", "command.showOutput": "Show Git Output", "config.enabled": "Whether git is enabled", "config.path": "Path to the git executable", diff --git a/extensions/git/src/statusbar.ts b/extensions/git/src/statusbar.ts index c609d570b9d43..9fe437ccec562 100644 --- a/extensions/git/src/statusbar.ts +++ b/extensions/git/src/statusbar.ts @@ -114,11 +114,11 @@ class SyncStatusBar { text += `${HEAD.behind}↓ ${HEAD.ahead}↑`; } command = 'git.sync'; - tooltip = localize('sync changes', "Synchronize changes"); + tooltip = localize('sync changes', "Synchronize Changes"); } else { icon = '$(cloud-upload)'; command = 'git.publish'; - tooltip = localize('publish changes', "Publish changes"); + tooltip = localize('publish changes', "Publish Changes"); } } else { command = ''; @@ -128,7 +128,7 @@ class SyncStatusBar { if (this.state.isSyncRunning) { icon = '$(sync~spin)'; command = ''; - tooltip = localize('syncing changes', "Synchronizing changes..."); + tooltip = localize('syncing changes', "Synchronizing Changes..."); } return { From b648f36f707cdf9e3b08fb833c2a7345d802383c Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Thu, 1 Jun 2017 09:39:39 +0200 Subject: [PATCH 1423/2747] Fixes #27726: Tasks.json: Provide intellisense for problem matcher --- src/vs/platform/markers/common/problemMatcher.ts | 10 ++++++++++ .../parts/tasks/electron-browser/jsonSchema_v1.ts | 12 ++++++++++++ .../parts/tasks/electron-browser/jsonSchema_v2.ts | 12 ++++++++++++ 3 files changed, 34 insertions(+) diff --git a/src/vs/platform/markers/common/problemMatcher.ts b/src/vs/platform/markers/common/problemMatcher.ts index b42f0f2a90667..055e46fecaa48 100644 --- a/src/vs/platform/markers/common/problemMatcher.ts +++ b/src/vs/platform/markers/common/problemMatcher.ts @@ -1482,6 +1482,8 @@ export interface IProblemMatcherRegistry { onReady(): TPromise; exists(name: string): boolean; get(name: string): ProblemMatcher; + values(): ProblemMatcher[]; + keys(): string[]; } class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry { @@ -1536,6 +1538,14 @@ class ProblemMatcherRegistryImpl implements IProblemMatcherRegistry { delete this.matchers[name]; } + public keys(): string[] { + return Object.keys(this.matchers); + } + + public values(): ProblemMatcher[] { + return Object.keys(this.matchers).map(key => this.matchers[key]); + } + private fillDefaults(): void { this.add('msCompile', { owner: 'msCompile', diff --git a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.ts b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.ts index af5ca29ae2070..a82c294c6c70f 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.ts @@ -8,6 +8,8 @@ import * as nls from 'vs/nls'; import * as Objects from 'vs/base/common/objects'; import { IJSONSchema } from 'vs/base/common/jsonSchema'; +import { ProblemMatcherRegistry } from 'vs/platform/markers/common/problemMatcher'; + import commonSchema from './jsonSchemaCommon'; const schema: IJSONSchema = { @@ -89,4 +91,14 @@ function fixReferences(literal: any) { } fixReferences(schema); +ProblemMatcherRegistry.onReady().then(() => { + try { + let matcherIds = ProblemMatcherRegistry.keys().map(key => '$' + key); + definitions.problemMatcherType1.oneOf[0].enum = matcherIds; + (definitions.problemMatcherType1.oneOf[2].items as IJSONSchema).anyOf[1].enum = matcherIds; + } catch (err) { + console.log('Installing problem matcher ids failed'); + } +}); + export default schema; \ No newline at end of file diff --git a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts index 14985496e1815..f63861f41d7d9 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts @@ -10,6 +10,8 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema'; import commonSchema from './jsonSchemaCommon'; +import { ProblemMatcherRegistry } from 'vs/platform/markers/common/problemMatcher'; + const shellCommand: IJSONSchema = { anyOf: [ { @@ -162,4 +164,14 @@ function fixReferences(literal: any) { } fixReferences(schema); +ProblemMatcherRegistry.onReady().then(() => { + try { + let matcherIds = ProblemMatcherRegistry.keys().map(key => '$' + key); + definitions.problemMatcherType2.oneOf[0].enum = matcherIds; + (definitions.problemMatcherType2.oneOf[2].items as IJSONSchema).anyOf[1].enum = matcherIds; + } catch (err) { + console.log('Installing problem matcher ids failed'); + } +}); + export default schema; \ No newline at end of file From b28e0e3425b1ef6206db83fa2524e35a7cafd981 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 1 Jun 2017 10:38:05 +0200 Subject: [PATCH 1424/2747] Update thirdpartynotices --- ThirdPartyNotices.txt | 184 +++++++++++++++++---------------- extensions/html/OSSREADME.json | 2 +- 2 files changed, 94 insertions(+), 92 deletions(-) diff --git a/ThirdPartyNotices.txt b/ThirdPartyNotices.txt index 49020843ae905..958cac6b8d3df 100644 --- a/ThirdPartyNotices.txt +++ b/ThirdPartyNotices.txt @@ -1,3 +1,5 @@ +===================BEGIN GENERATOR LOG +===================END GENERATOR LOG microsoft-vscode THIRD-PARTY SOFTWARE NOTICES AND INFORMATION @@ -5,64 +7,63 @@ Do Not Translate or Localize This project incorporates components from the projects listed below. The original copyright notices and the licenses under which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise. -1. atom/language-c version 0.51.3 (https://github.com/atom/language-c) +1. atom/language-c (https://github.com/atom/language-c) 2. atom/language-clojure (https://github.com/atom/language-clojure) 3. atom/language-coffee-script (https://github.com/atom/language-coffee-script) 4. atom/language-css (https://github.com/atom/language-css) -5. atom/language-objective-c (https://github.com/atom/language-objective-c) -6. atom/language-sass version 0.52.0 (https://github.com/atom/language-sass) -7. atom/language-xml (https://github.com/atom/language-xml) -8. Benvie/JavaScriptNext.tmLanguage (https://github.com/Benvie/JavaScriptNext.tmLanguage) -9. chjj-marked version 0.3.2 (https://github.com/npmcomponent/chjj-marked) -10. chriskempson/tomorrow-theme (https://github.com/chriskempson/tomorrow-theme) -11. Colorsublime-Themes version 0.1.0 (https://github.com/Colorsublime/Colorsublime-Themes) -12. daaain/Handlebars (https://github.com/daaain/Handlebars) -13. davidrios/jade-tmbundle (https://github.com/davidrios/jade-tmbundle) -14. definitelytyped (https://github.com/DefinitelyTyped/DefinitelyTyped) -15. demyte/language-cshtml (https://github.com/demyte/language-cshtml) -16. dotnet/csharp-tmLanguage version 0.1.0 (https://github.com/dotnet/csharp-tmLanguage) -17. freebroccolo/atom-language-swift (https://github.com/freebroccolo/atom-language-swift) -18. HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/) -19. Ionic documentation version 1.2.4 (https://github.com/driftyco/ionic-site) -20. ionide/ionide-fsgrammar (https://github.com/ionide/ionide-fsgrammar) -21. js-beautify version 1.6.8 (https://github.com/beautify-web/js-beautify) -22. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert) -23. language-docker (https://github.com/moby/moby) -24. language-go version 0.39.0 (https://github.com/atom/language-go) -25. language-less (https://github.com/atom/language-less) -26. language-php (https://github.com/atom/language-php) -27. language-rust version 0.4.9 (https://github.com/zargony/atom-language-rust) -28. MagicStack/MagicPython (https://github.com/MagicStack/MagicPython) -29. Microsoft/TypeScript-TmLanguage version 0.0.1 (https://github.com/Microsoft/TypeScript-TmLanguage) -30. octicons-code version 3.1.0 (https://octicons.github.com) -31. octicons-font version 3.1.0 (https://octicons.github.com) -32. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui) -33. shaders-tmLanguage version 0.1.0 (https://github.com/tgjones/shaders-tmLanguage) -34. string_scorer version 0.1.20 (https://github.com/joshaven/string_score) -35. sublimehq/Packages (https://github.com/sublimehq/Packages) -36. SublimeText/PowerShell (https://github.com/SublimeText/PowerShell) -37. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle) -38. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle) -39. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle) -40. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle) -41. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle) -42. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle) -43. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle) -44. textmate/java.tmbundle (https://github.com/textmate/java.tmbundle) -45. textmate/javadoc.tmbundle (https://github.com/textmate/javadoc.tmbundle) -46. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle) -47. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle) -48. textmate/make.tmbundle (https://github.com/textmate/make.tmbundle) -49. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle) -50. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle) -51. textmate/r.tmbundle (https://github.com/textmate/r.tmbundle) -52. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle) -53. textmate/shellscript.tmbundle (https://github.com/textmate/shellscript.tmbundle) -54. textmate/sql.tmbundle (https://github.com/textmate/sql.tmbundle) -55. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle) -56. typescript-legacy version 1.5 (https://github.com/Microsoft/TypeScript) -57. TypeScript-TmLanguage version 0.1.8 (https://github.com/Microsoft/TypeScript-TmLanguage) -58. vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift) +5. atom/language-java (https://github.com/atom/language-java) +6. atom/language-objective-c (https://github.com/atom/language-objective-c) +7. atom/language-sass version 0.52.0 (https://github.com/atom/language-sass) +8. atom/language-xml (https://github.com/atom/language-xml) +9. Benvie/JavaScriptNext.tmLanguage (https://github.com/Benvie/JavaScriptNext.tmLanguage) +10. chjj-marked version 0.3.2 (https://github.com/npmcomponent/chjj-marked) +11. chriskempson/tomorrow-theme (https://github.com/chriskempson/tomorrow-theme) +12. Colorsublime-Themes version 0.1.0 (https://github.com/Colorsublime/Colorsublime-Themes) +13. daaain/Handlebars (https://github.com/daaain/Handlebars) +14. davidrios/jade-tmbundle (https://github.com/davidrios/jade-tmbundle) +15. definitelytyped (https://github.com/DefinitelyTyped/DefinitelyTyped) +16. demyte/language-cshtml (https://github.com/demyte/language-cshtml) +17. dotnet/csharp-tmLanguage version 0.1.0 (https://github.com/dotnet/csharp-tmLanguage) +18. freebroccolo/atom-language-swift (https://github.com/freebroccolo/atom-language-swift) +19. HTML 5.1 W3C Working Draft version 08 October 2015 (http://www.w3.org/TR/2015/WD-html51-20151008/) +20. Ionic documentation version 1.2.4 (https://github.com/ionic-team/ionic-site) +21. ionide/ionide-fsgrammar (https://github.com/ionide/ionide-fsgrammar) +22. js-beautify version 1.6.8 (https://github.com/beautify-web/js-beautify) +23. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert) +24. language-docker (https://github.com/moby/moby) +25. language-go version 0.39.0 (https://github.com/atom/language-go) +26. language-less (https://github.com/atom/language-less) +27. language-php (https://github.com/atom/language-php) +28. language-rust version 0.4.9 (https://github.com/zargony/atom-language-rust) +29. MagicStack/MagicPython (https://github.com/MagicStack/MagicPython) +30. Microsoft/TypeScript-TmLanguage version 0.0.1 (https://github.com/Microsoft/TypeScript-TmLanguage) +31. octicons-code version 3.1.0 (https://octicons.github.com) +32. octicons-font version 3.1.0 (https://octicons.github.com) +33. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui) +34. shaders-tmLanguage version 0.1.0 (https://github.com/tgjones/shaders-tmLanguage) +35. string_scorer version 0.1.20 (https://github.com/joshaven/string_score) +36. sublimehq/Packages (https://github.com/sublimehq/Packages) +37. SublimeText/PowerShell (https://github.com/SublimeText/PowerShell) +38. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle) +39. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle) +40. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle) +41. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle) +42. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle) +43. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle) +44. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle) +45. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle) +46. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle) +47. textmate/make.tmbundle (https://github.com/textmate/make.tmbundle) +48. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle) +49. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle) +50. textmate/r.tmbundle (https://github.com/textmate/r.tmbundle) +51. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle) +52. textmate/shellscript.tmbundle (https://github.com/textmate/shellscript.tmbundle) +53. textmate/sql.tmbundle (https://github.com/textmate/sql.tmbundle) +54. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle) +55. typescript-legacy version 1.5 (https://github.com/Microsoft/TypeScript) +56. TypeScript-TmLanguage version 0.1.8 (https://github.com/Microsoft/TypeScript-TmLanguage) +57. vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift) %% atom/language-c NOTICES AND INFORMATION BEGIN HERE @@ -246,6 +247,43 @@ suitability for any purpose. ========================================= END OF atom/language-css NOTICES AND INFORMATION +%% atom/language-java NOTICES AND INFORMATION BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2014 GitHub Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +This package was derived from a TextMate bundle located at +https://github.com/textmate/java.tmbundle and distributed under the following +license, located in `README.mdown`: + +Permission to copy, use, modify, sell and distribute this +software is granted. This software is provided "as is" without +express or implied warranty, and with no claim as to its +suitability for any purpose. +========================================= +END OF atom/language-java NOTICES AND INFORMATION + %% atom/language-objective-c NOTICES AND INFORMATION BEGIN HERE ========================================= The MIT License (MIT) @@ -1701,42 +1739,6 @@ to the base-name name of the original file, and an extension of txt, html, or si ========================================= END OF textmate/ini.tmbundle NOTICES AND INFORMATION -%% textmate/java.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) textmate-java.tmbundle project authors - -If not otherwise specified (see below), files in this repository fall under the following license: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF textmate/java.tmbundle NOTICES AND INFORMATION - -%% textmate/javadoc.tmbundle NOTICES AND INFORMATION BEGIN HERE -========================================= -Copyright (c) textmate-javadoc.tmbundle project authors - -If not otherwise specified (see below), files in this repository fall under the following license: - -Permission to copy, use, modify, sell and distribute this -software is granted. This software is provided "as is" without -express or implied warranty, and with no claim as to its -suitability for any purpose. - -An exception is made for files in readable text which contain their own license information, -or files where an accompanying file exists (in the same directory) with a "-license" suffix added -to the base-name name of the original file, and an extension of txt, html, or similar. For example -"tidy" is accompanied by "tidy-license.txt". -========================================= -END OF textmate/javadoc.tmbundle NOTICES AND INFORMATION - %% textmate/javascript.tmbundle NOTICES AND INFORMATION BEGIN HERE ========================================= Copyright (c) textmate-javascript.tmbundle project authors diff --git a/extensions/html/OSSREADME.json b/extensions/html/OSSREADME.json index 238e37e068fcd..473df53afb391 100644 --- a/extensions/html/OSSREADME.json +++ b/extensions/html/OSSREADME.json @@ -50,7 +50,7 @@ "name": "Ionic documentation", "version": "1.2.4", "license": "Apache2", - "repositoryURL": "https://github.com/driftyco/ionic-site", + "repositoryURL": "https://github.com/ionic-team/ionic-site", "licenseDetail": [ "Copyright Drifty Co. http://drifty.com/.", "", From 038703dc84ae9e969e7c7cc6b867b5bacfbc6b19 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 1 Jun 2017 10:35:46 +0200 Subject: [PATCH 1425/2747] renamed and make TextSnippet extend Marker, #27543 --- .../contrib/snippet/browser/snippetParser.ts | 92 ++++++++++++------- .../contrib/snippet/browser/snippetSession.ts | 2 +- .../test/browser/snippetParser.test.ts | 78 +++++++++------- .../emmet/electron-browser/editorAccessor.ts | 8 +- .../snippets/electron-browser/TMSnippets.ts | 10 +- 5 files changed, 113 insertions(+), 77 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetParser.ts b/src/vs/editor/contrib/snippet/browser/snippetParser.ts index 0506b2b187b57..488b53b864bef 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetParser.ts @@ -134,8 +134,19 @@ export abstract class Marker { parent: Marker; - protected _adopt(child: Marker): void { - child.parent = this; + private _children: Marker[] = []; + + set children(marker: Marker[]) { + this._children = []; + for (const m of marker) { + m.parent = this; + this._children.push(m); + } + // Object.freeze(this._children); + } + + get children(): Marker[] { + return this._children; } toString() { @@ -176,15 +187,15 @@ export class Placeholder extends Marker { } } - constructor(public index: string = '', public defaultValue: Marker[]) { + constructor(public index: string = '', children: Marker[]) { super(); - defaultValue.forEach(this._adopt, this); + this.children = children; } get isFinalTabstop() { return this.index === '0'; } toString() { - return Marker.toString(this.defaultValue); + return Marker.toString(this.children); } } @@ -192,9 +203,9 @@ export class Variable extends Marker { resolvedValue: string; - constructor(public name: string = '', public defaultValue: Marker[]) { + constructor(public name: string = '', children: Marker[]) { super(); - defaultValue.forEach(this._adopt, this); + this.children = children; } get isDefined(): boolean { return this.resolvedValue !== undefined; @@ -207,7 +218,7 @@ export class Variable extends Marker { } } toString() { - return this.isDefined ? this.resolvedValue : Marker.toString(this.defaultValue); + return this.isDefined ? this.resolvedValue : Marker.toString(this.children); } } export function walk(marker: Marker[], visitor: (marker: Marker) => boolean): void { @@ -219,36 +230,38 @@ export function walk(marker: Marker[], visitor: (marker: Marker) => boolean): vo break; } if (marker instanceof Placeholder || marker instanceof Variable) { - stack.unshift(...marker.defaultValue); + stack.unshift(...marker.children); } } } -export class TextmateSnippet { +export class TextmateSnippet extends Marker { - readonly marker: Marker[]; - readonly placeholders: Placeholder[]; + private _placeholders: Placeholder[]; constructor(marker: Marker[]) { - this.marker = marker; - this.placeholders = []; - - // fill in placeholders - walk(marker, candidate => { - if (candidate instanceof Placeholder) { - this.placeholders.push(candidate); - } - return true; - }); + super(); + this.children = marker; + } - Object.freeze(this.marker); - Object.freeze(this.placeholders); + get placeholders(): Placeholder[] { + if (!this._placeholders) { + // fill in placeholders + this._placeholders = []; + walk(this.children, candidate => { + if (candidate instanceof Placeholder) { + this.placeholders.push(candidate); + } + return true; + }); + } + return this._placeholders; } offset(marker: Marker): number { let pos = 0; let found = false; - walk(this.marker, candidate => { + walk(this.children, candidate => { if (candidate === marker) { found = true; return false; @@ -263,7 +276,7 @@ export class TextmateSnippet { return pos; } - len(marker: Marker): number { + fullLen(marker: Marker): number { let ret = 0; walk([marker], marker => { ret += marker.len(); @@ -285,22 +298,31 @@ export class TextmateSnippet { } get text() { - return Marker.toString(this.marker); + return Marker.toString(this.children); } resolveVariables(resolver: { resolve(name: string): string }): this { - walk(this.marker, candidate => { + walk(this.children, candidate => { if (candidate instanceof Variable) { candidate.resolvedValue = resolver.resolve(candidate.name); if (candidate.isDefined) { // remove default value from resolved variable - candidate.defaultValue.length = 0; + candidate.children = []; } } return true; }); return this; } + + replace(marker: Marker, others: Marker[]): void { + const { parent } = marker; + const idx = parent.children.indexOf(marker); + const newChildren = parent.children.slice(0); + newChildren.splice(idx, 1, ...others); + parent.children = newChildren; + this._placeholders = undefined; + } } export class SnippetParser { @@ -349,17 +371,17 @@ export class SnippetParser { // fill in default values for repeated placeholders // like `${1:foo}and$1` becomes ${1:foo}and${1:foo} if (!placeholderDefaultValues.has(thisMarker.index)) { - placeholderDefaultValues.set(thisMarker.index, thisMarker.defaultValue); - } else if (thisMarker.defaultValue.length === 0) { - thisMarker.defaultValue = placeholderDefaultValues.get(thisMarker.index).slice(0); + placeholderDefaultValues.set(thisMarker.index, thisMarker.children); + } else if (thisMarker.children.length === 0) { + thisMarker.children = placeholderDefaultValues.get(thisMarker.index).slice(0); } - if (thisMarker.defaultValue.length > 0) { - walk(thisMarker.defaultValue, placeholderDefaultValues); + if (thisMarker.children.length > 0) { + walk(thisMarker.children, placeholderDefaultValues); } } else if (thisMarker instanceof Variable) { - walk(thisMarker.defaultValue, placeholderDefaultValues); + walk(thisMarker.children, placeholderDefaultValues); } else if (i > 0 && thisMarker instanceof Text && marker[i - 1] instanceof Text) { (marker[i - 1]).string += (marker[i]).string; diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index 4a5d4cc9e412c..f319844d5c517 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -65,7 +65,7 @@ export class OneSnippet { // create a decoration for each placeholder for (const placeholder of this._snippet.placeholders) { const placeholderOffset = this._snippet.offset(placeholder); - const placeholderLen = this._snippet.len(placeholder); + const placeholderLen = this._snippet.fullLen(placeholder); const range = Range.fromPositions( model.getPositionAt(this._offset + placeholderOffset), model.getPositionAt(this._offset + placeholderOffset + placeholderLen) diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts index 66e204e9da225..dc697aa740cdb 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts @@ -153,13 +153,13 @@ suite('SnippetParser', () => { assertTextAndMarker('foo${1:bar\\}${2:foo}}', 'foobar}foo', Text, Placeholder); let [, placeholder] = new SnippetParser(true, false).parse('foo${1:bar\\}${2:foo}}'); - let { defaultValue } = (placeholder); + let { children } = (placeholder); assert.equal((placeholder).index, '1'); - assert.ok(defaultValue[0] instanceof Text); - assert.equal(defaultValue[0].toString(), 'bar}'); - assert.ok(defaultValue[1] instanceof Placeholder); - assert.equal(defaultValue[1].toString(), 'foo'); + assert.ok(children[0] instanceof Text); + assert.equal(children[0].toString(), 'bar}'); + assert.ok(children[1] instanceof Placeholder); + assert.equal(children[1].toString(), 'foo'); }); test('Parser, placeholder', () => { @@ -225,17 +225,17 @@ suite('SnippetParser', () => { const placeholder = marker[1]; assert.equal(placeholder, false); assert.equal(placeholder.index, '1'); - assert.equal(placeholder.defaultValue.length, 3); - assert.ok(placeholder.defaultValue[0] instanceof Text); - assert.ok(placeholder.defaultValue[1] instanceof Variable); - assert.ok(placeholder.defaultValue[2] instanceof Text); - assert.equal(placeholder.defaultValue[0].toString(), ' '); - assert.equal(placeholder.defaultValue[1].toString(), ''); - assert.equal(placeholder.defaultValue[2].toString(), ' '); - - const nestedVariable = placeholder.defaultValue[1]; + assert.equal(placeholder.children.length, 3); + assert.ok(placeholder.children[0] instanceof Text); + assert.ok(placeholder.children[1] instanceof Variable); + assert.ok(placeholder.children[2] instanceof Text); + assert.equal(placeholder.children[0].toString(), ' '); + assert.equal(placeholder.children[1].toString(), ''); + assert.equal(placeholder.children[2].toString(), ' '); + + const nestedVariable = placeholder.children[1]; assert.equal(nestedVariable.name, 'TM_SELECTED_TEXT'); - assert.equal(nestedVariable.defaultValue.length, 0); + assert.equal(nestedVariable.children.length, 0); marker = new SnippetParser().parse('$TM_SELECTED_TEXT'); assert.equal(marker.length, 1); @@ -268,13 +268,13 @@ suite('SnippetParser', () => { const [p1, , p2, , p3] = new SnippetParser().parse('{{first}}-{{2:}}-{{second}}-{{1:}}'); assert.equal((p1).index, 'first'); - assert.equal(Marker.toString((p1).defaultValue), 'first'); + assert.equal(Marker.toString((p1).children), 'first'); assert.equal((p2).index, '2'); - assert.equal(Marker.toString((p2).defaultValue), ''); + assert.equal(Marker.toString((p2).children), ''); assert.equal((p3).index, 'second'); - assert.equal(Marker.toString((p3).defaultValue), 'second'); + assert.equal(Marker.toString((p3).children), 'second'); }); test('Parser, default placeholder values', () => { @@ -284,12 +284,12 @@ suite('SnippetParser', () => { const [, p1, , p2] = new SnippetParser().parse('errorContext: `${1:err}`, error:$1'); assert.equal((p1).index, '1'); - assert.equal((p1).defaultValue.length, '1'); - assert.equal(((p1).defaultValue[0]), 'err'); + assert.equal((p1).children.length, '1'); + assert.equal(((p1).children[0]), 'err'); assert.equal((p2).index, '1'); - assert.equal((p2).defaultValue.length, '1'); - assert.equal(((p2).defaultValue[0]), 'err'); + assert.equal((p2).children.length, '1'); + assert.equal(((p2).children[0]), 'err'); }); @@ -309,8 +309,8 @@ suite('SnippetParser', () => { test('marker#len', () => { function assertLen(template: string, ...lengths: number[]): void { - const { marker } = SnippetParser.parse(template); - walk(marker, m => { + const { children } = SnippetParser.parse(template); + walk(children, m => { const expected = lengths.shift(); assert.equal(m.len(), expected); return true; @@ -335,15 +335,15 @@ suite('SnippetParser', () => { assert.equal(first.index, '1'); assert.equal(second.index, '2'); assert.ok(second.parent === first); - assert.ok(first.parent === undefined); + assert.ok(first.parent === snippet); snippet = SnippetParser.parse('${VAR:default${1:value}}$0'); assert.equal(snippet.placeholders.length, 2); [first] = snippet.placeholders; assert.equal(first.index, '1'); - assert.ok(snippet.marker[0] instanceof Variable); - assert.ok(first.parent === snippet.marker[0]); + assert.ok(snippet.children[0] instanceof Variable); + assert.ok(first.parent === snippet.children[0]); }); test('TextmateSnippet#enclosingPlaceholders', function () { @@ -356,13 +356,13 @@ suite('SnippetParser', () => { test('TextmateSnippet#offset', () => { let snippet = SnippetParser.parse('te$1xt'); - assert.equal(snippet.offset(snippet.marker[0]), 0); - assert.equal(snippet.offset(snippet.marker[1]), 2); - assert.equal(snippet.offset(snippet.marker[2]), 2); + assert.equal(snippet.offset(snippet.children[0]), 0); + assert.equal(snippet.offset(snippet.children[1]), 2); + assert.equal(snippet.offset(snippet.children[2]), 2); snippet = SnippetParser.parse('${TM_SELECTED_TEXT:def}'); - assert.equal(snippet.offset(snippet.marker[0]), 0); - assert.equal(snippet.offset((snippet.marker[0]).defaultValue[0]), 0); + assert.equal(snippet.offset(snippet.children[0]), 0); + assert.equal(snippet.offset((snippet.children[0]).children[0]), 0); // forgein marker assert.equal(snippet.offset(new Text('foo')), -1); @@ -386,4 +386,18 @@ suite('SnippetParser', () => { placeholders = snippet.placeholders; assert.equal(placeholders.length, 3); }); + + test('TextmateSnippet#replace', function () { + let snippet = SnippetParser.parse('aaa${1:bbb${2:ccc}}$0'); + + assert.equal(snippet.placeholders.length, 3); + const [, second] = snippet.placeholders; + assert.equal(second.index, '2'); + + let nested = SnippetParser.parse('ddd$1eee$0'); + snippet.replace(second, nested.children); + + assert.equal(snippet.text, 'aaabbbdddeee'); + assert.equal(snippet.placeholders.length, 4); + }); }); diff --git a/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts b/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts index 26f7cf390e7f2..f5e1ca1e52c01 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts @@ -144,14 +144,14 @@ export class EditorAccessor implements emmet.Editor { return SnippetParser.escape(marker.string); } else if (marker instanceof Placeholder) { - if (marker.defaultValue.length > 0) { - return `\${${marker.index}:${marker.defaultValue.map(toSnippetString).join('')}}`; + if (marker.children.length > 0) { + return `\${${marker.index}:${marker.children.map(toSnippetString).join('')}}`; } else { return `\$${marker.index}`; } } else if (marker instanceof Variable) { - if (marker.defaultValue.length > 0) { - return `\${${marker.name}:${marker.defaultValue.map(toSnippetString).join('')}}`; + if (marker.children.length > 0) { + return `\${${marker.name}:${marker.children.map(toSnippetString).join('')}}`; } else { return `\$${marker.name}`; } diff --git a/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts b/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts index dcdfe17498ab2..899bc5a55d89a 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts @@ -169,13 +169,13 @@ function _rewriteBogousVariables(snippet: ISnippet): boolean { return SnippetParser.escape(marker.string); } else if (marker instanceof Placeholder) { - if (marker.defaultValue.length > 0) { - return `\${${marker.index}:${marker.defaultValue.map(fixBogousVariables).join('')}}`; + if (marker.children.length > 0) { + return `\${${marker.index}:${marker.children.map(fixBogousVariables).join('')}}`; } else { return `\$${marker.index}`; } } else if (marker instanceof Variable) { - if (marker.defaultValue.length === 0 && !EditorSnippetVariableResolver.VariableNames[marker.name]) { + if (marker.children.length === 0 && !EditorSnippetVariableResolver.VariableNames[marker.name]) { // a 'variable' without a default value and not being one of our supported // variables is automatically turing into a placeholder. This is to restore // a bug we had before. So `${foo}` becomes `${N:foo}` @@ -183,8 +183,8 @@ function _rewriteBogousVariables(snippet: ISnippet): boolean { placeholders.set(marker.name, index); return `\${${index++}:${marker.name}}`; - } else if (marker.defaultValue.length > 0) { - return `\${${marker.name}:${marker.defaultValue.map(fixBogousVariables).join('')}}`; + } else if (marker.children.length > 0) { + return `\${${marker.name}:${marker.children.map(fixBogousVariables).join('')}}`; } else { return `\$${marker.name}`; } From be76e31cb9113ac36d3469a937bf69319bafbc08 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 1 Jun 2017 10:39:28 +0200 Subject: [PATCH 1426/2747] #26948 Publish tree api --- src/vs/vscode.d.ts | 100 +++++++++++++++++++++++++++++++++++ src/vs/vscode.proposed.d.ts | 102 ------------------------------------ 2 files changed, 100 insertions(+), 102 deletions(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 1943316e02624..b0670a90ba71c 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -4007,6 +4007,106 @@ declare module 'vscode' { * @return A new Terminal. */ export function createTerminal(options: TerminalOptions): Terminal; + + /** + * Register a [TreeDataProvider](#TreeDataProvider) for the view contributed using the extension point `views`. + * @param viewId Id of the view contributed using the extension point `views`. + * @param treeDataProvider A [TreeDataProvider](#TreeDataProvider) that provides tree data for the view + */ + export function registerTreeDataProvider(viewId: string, treeDataProvider: TreeDataProvider): Disposable; + } + + /** + * A data provider that provides tree data + */ + export interface TreeDataProvider { + /** + * An optional event to signal that an element or root has changed. + * To signal that root has changed, do not pass any argument or pass `undefined` or `null`. + */ + onDidChangeTreeData?: Event; + + /** + * Get [TreeItem](#TreeItem) representation of the `element` + * + * @param element The element for which [TreeItem](#TreeItem) representation is asked for. + * @return [TreeItem](#TreeItem) representation of the element + */ + getTreeItem(element: T): TreeItem | Thenable; + + /** + * Get the children of `element` or root if no element is passed. + * + * @param element The element from which the provider gets children. Can be `undefined`. + * @return Children of `element` or root if no element is passed. + */ + getChildren(element?: T): ProviderResult; + } + + export class TreeItem { + /** + * A human-readable string describing this item + */ + label: string; + + /** + * The icon path for the tree item + */ + iconPath?: string | Uri | { light: string | Uri; dark: string | Uri }; + + /** + * The [command](#Command) which should be run when the tree item is selected. + */ + command?: Command; + + /** + * [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. + */ + collapsibleState?: TreeItemCollapsibleState; + + /** + * Context value of the tree item. This can be used to contribute item specific actions in the tree. + * For example, a tree item is given a context value as `folder`. When contributing actions to `view/item/context` + * using `menus` extension point, you can specify context value for key `viewItem` in `when` expression like `viewItem == folder`. + * ``` + * "contributes": { + * "menus": { + * "view/item/context": [ + * { + * "command": "extension.deleteFolder", + * "when": "viewItem == folder" + * } + * ] + * } + * } + * ``` + * This will show action `extension.deleteFolder` only for items with `contextValue` is `folder`. + */ + contextValue?: string; + + /** + * @param label A human-readable string describing this item + * @param collapsibleState [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. Default is [TreeItemCollapsibleState.None](#TreeItemCollapsibleState.None) + */ + constructor(label: string, collapsibleState?: TreeItemCollapsibleState); + } + + /** + * Collapsible state of the tree item + */ + export enum TreeItemCollapsibleState { + /** + * Determines an item can be neither collapsed nor expanded. Implies it has no children. + */ + None = 0, + /** + * Determines an item is collapsed + */ + Collapsed = 1, + /** + * Determines an item is expanded + */ + Expanded = 2 } /** diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 6e1ea7f6d9fe1..bd8dd3dd51e89 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -341,108 +341,6 @@ declare module 'vscode' { export function sampleFunction(): Thenable; } - export namespace window { - /** - * Register a [TreeDataProvider](#TreeDataProvider) for the view contributed using the extension point `views`. - * @param viewId Id of the view contributed using the extension point `views`. - * @param treeDataProvider A [TreeDataProvider](#TreeDataProvider) that provides tree data for the view - */ - export function registerTreeDataProvider(viewId: string, treeDataProvider: TreeDataProvider): Disposable; - } - - /** - * A data provider that provides tree data - */ - export interface TreeDataProvider { - /** - * An optional event to signal that an element or root has changed. - * To signal that root has changed, do not pass any argument or pass `undefined` or `null`. - */ - onDidChangeTreeData?: Event; - - /** - * Get [TreeItem](#TreeItem) representation of the `element` - * - * @param element The element for which [TreeItem](#TreeItem) representation is asked for. - * @return [TreeItem](#TreeItem) representation of the element - */ - getTreeItem(element: T): TreeItem | Thenable; - - /** - * Get the children of `element` or root if no element is passed. - * - * @param element The element from which the provider gets children. Can be `undefined`. - * @return Children of `element` or root if no element is passed. - */ - getChildren(element?: T): ProviderResult; - } - - export class TreeItem { - /** - * A human-readable string describing this item - */ - label: string; - - /** - * The icon path for the tree item - */ - iconPath?: string | Uri | { light: string | Uri; dark: string | Uri }; - - /** - * The [command](#Command) which should be run when the tree item is selected. - */ - command?: Command; - - /** - * [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. - */ - collapsibleState?: TreeItemCollapsibleState; - - /** - * Context value of the tree item. This can be used to contribute item specific actions in the tree. - * For example, a tree item is given a context value as `folder`. When contributing actions to `view/item/context` - * using `menus` extension point, you can specify context value for key `viewItem` in `when` expression like `viewItem == folder`. - * ``` - * "contributes": { - * "menus": { - * "view/item/context": [ - * { - * "command": "extension.deleteFolder", - * "when": "viewItem == folder" - * } - * ] - * } - * } - * ``` - * This will show action `extension.deleteFolder` only for items with `contextValue` is `folder`. - */ - contextValue?: string; - - /** - * @param label A human-readable string describing this item - * @param collapsibleState [TreeItemCollapsibleState](#TreeItemCollapsibleState) of the tree item. Default is [TreeItemCollapsibleState.None](#TreeItemCollapsibleState.None) - */ - constructor(label: string, collapsibleState?: TreeItemCollapsibleState); - } - - /** - * Collapsible state of the tree item - */ - export enum TreeItemCollapsibleState { - /** - * Determines an item can be neither collapsed nor expanded. Implies it has no children. - */ - None = 0, - /** - * Determines an item is collapsed - */ - Collapsed = 1, - /** - * Determines an item is expanded - */ - Expanded = 2 - } - /** * The contiguous set of modified lines in a diff. */ From eeb076cc71bcc358d6ebe830d049a8791d7063cc Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 1 Jun 2017 10:43:15 +0200 Subject: [PATCH 1427/2747] Update distro hash --- ThirdPartyNotices.txt | 4 +--- package.json | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ThirdPartyNotices.txt b/ThirdPartyNotices.txt index 958cac6b8d3df..84e13002af221 100644 --- a/ThirdPartyNotices.txt +++ b/ThirdPartyNotices.txt @@ -1,6 +1,4 @@ -===================BEGIN GENERATOR LOG -===================END GENERATOR LOG -microsoft-vscode +dmicrosoft-vscode THIRD-PARTY SOFTWARE NOTICES AND INFORMATION Do Not Translate or Localize diff --git a/package.json b/package.json index 0c8f77e4dba1b..127d1dfb45786 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev", "version": "1.13.0", "electronVersion": "1.6.6", - "distro": "6a21d9ea82740d478d8b3fb72ec2a63d27b8a29c", + "distro": "cb257c519d1ee526acfd00c0a7adc6b0fa4c18d2", "author": { "name": "Microsoft Corporation" }, From 41463b1b56cec758c7888b65166eb28e2f7ee2a2 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 1 Jun 2017 10:45:50 +0200 Subject: [PATCH 1428/2747] Add pt-BR locale only in non-stable build quality. --- build/gulpfile.vscode.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 942bb3847e38e..7334fd94fce46 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -158,7 +158,10 @@ gulp.task('electron', ['clean-electron'], getElectron(process.arch)); gulp.task('electron-ia32', ['clean-electron'], getElectron('ia32')); gulp.task('electron-x64', ['clean-electron'], getElectron('x64')); -const languages = ['chs', 'cht', 'jpn', 'kor', 'deu', 'fra', 'esn', 'rus', 'ita', 'ptb']; +var languages = ['chs', 'cht', 'jpn', 'kor', 'deu', 'fra', 'esn', 'rus', 'ita']; +if (product.quality !== 'stable') { + languages.concat(['ptb']); +} /** * Compute checksums for some files. From 19aecfd367cb4de1df5683fac5f177cf5116f095 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Thu, 1 Jun 2017 11:12:01 +0200 Subject: [PATCH 1429/2747] Addresses #27672: Task Detection For Gulp --- extensions/grunt/src/main.ts | 19 +++++++++++++++---- extensions/gulp/src/main.ts | 20 ++++++++++++++++---- extensions/jake/src/main.ts | 18 +++++++++++++++--- 3 files changed, 46 insertions(+), 11 deletions(-) diff --git a/extensions/grunt/src/main.ts b/extensions/grunt/src/main.ts index a90eff6c93347..6af05a0d31258 100644 --- a/extensions/grunt/src/main.ts +++ b/extensions/grunt/src/main.ts @@ -73,6 +73,14 @@ function exec(command: string, options: cp.ExecOptions): Promise<{ stdout: strin }); } +let _channel: vscode.OutputChannel; +function getOutputChannel(): vscode.OutputChannel { + if (!_channel) { + _channel = vscode.window.createOutputChannel('Grunt Auto Detection'); + } + return _channel; +} + async function getGruntTasks(): Promise { let workspaceRoot = vscode.workspace.rootPath; let emptyTasks: vscode.Task[] = []; @@ -95,12 +103,11 @@ async function getGruntTasks(): Promise { } let commandLine = `${command} --help --no-color`; - let channel = vscode.window.createOutputChannel('tasks'); try { let { stdout, stderr } = await exec(commandLine, { cwd: workspaceRoot }); if (stderr) { - channel.appendLine(stderr); - channel.show(true); + getOutputChannel().appendLine(stderr); + getOutputChannel().show(true); } let result: vscode.Task[] = []; if (stdout) { @@ -166,11 +173,15 @@ async function getGruntTasks(): Promise { } return result; } catch (err) { + let channel = getOutputChannel(); if (err.stderr) { channel.appendLine(err.stderr); - channel.show(true); + } + if (err.stdout) { + channel.appendLine(err.stdout); } channel.appendLine(localize('execFailed', 'Auto detecting Grunt failed with error: {0}', err.error ? err.error.toString() : 'unknown')); + channel.show(true); return emptyTasks; } } \ No newline at end of file diff --git a/extensions/gulp/src/main.ts b/extensions/gulp/src/main.ts index c75a8ce5d9cc0..1de05aa70d8b9 100644 --- a/extensions/gulp/src/main.ts +++ b/extensions/gulp/src/main.ts @@ -73,6 +73,14 @@ function exec(command: string, options: cp.ExecOptions): Promise<{ stdout: strin }); } +let _channel: vscode.OutputChannel; +function getOutputChannel(): vscode.OutputChannel { + if (!_channel) { + _channel = vscode.window.createOutputChannel('Gulp Auto Detection'); + } + return _channel; +} + async function getGulpTasks(): Promise { let workspaceRoot = vscode.workspace.rootPath; let emptyTasks: vscode.Task[] = []; @@ -98,12 +106,11 @@ async function getGulpTasks(): Promise { } let commandLine = `${gulpCommand} --tasks-simple --no-color`; - let channel = vscode.window.createOutputChannel('tasks'); try { let { stdout, stderr } = await exec(commandLine, { cwd: workspaceRoot }); - if (stderr) { - channel.appendLine(stderr); - channel.show(true); + if (stderr && stderr.length > 0) { + getOutputChannel().appendLine(stderr); + getOutputChannel().show(true); } let result: vscode.Task[] = []; if (stdout) { @@ -137,10 +144,15 @@ async function getGulpTasks(): Promise { } return result; } catch (err) { + let channel = getOutputChannel(); if (err.stderr) { channel.appendLine(err.stderr); } + if (err.stdout) { + channel.appendLine(err.stdout); + } channel.appendLine(localize('execFailed', 'Auto detecting gulp failed with error: {0}', err.error ? err.error.toString() : 'unknown')); + channel.show(true); return emptyTasks; } } \ No newline at end of file diff --git a/extensions/jake/src/main.ts b/extensions/jake/src/main.ts index 25d93a29780f0..eb87180ca783e 100644 --- a/extensions/jake/src/main.ts +++ b/extensions/jake/src/main.ts @@ -73,6 +73,14 @@ function exec(command: string, options: cp.ExecOptions): Promise<{ stdout: strin }); } +let _channel: vscode.OutputChannel; +function getOutputChannel(): vscode.OutputChannel { + if (!_channel) { + _channel = vscode.window.createOutputChannel('Jake Auto Detection'); + } + return _channel; +} + async function getJakeTasks(): Promise { let workspaceRoot = vscode.workspace.rootPath; let emptyTasks: vscode.Task[] = []; @@ -98,12 +106,11 @@ async function getJakeTasks(): Promise { } let commandLine = `${jakeCommand} --tasks`; - let channel = vscode.window.createOutputChannel('tasks'); try { let { stdout, stderr } = await exec(commandLine, { cwd: workspaceRoot }); if (stderr) { - channel.appendLine(stderr); - channel.show(true); + getOutputChannel().appendLine(stderr); + getOutputChannel().show(true); } let result: vscode.Task[] = []; if (stdout) { @@ -142,10 +149,15 @@ async function getJakeTasks(): Promise { } return result; } catch (err) { + let channel = getOutputChannel(); if (err.stderr) { channel.appendLine(err.stderr); } + if (err.stdout) { + channel.appendLine(err.stdout); + } channel.appendLine(localize('execFailed', 'Auto detecting Jake failed with error: {0}', err.error ? err.error.toString() : 'unknown')); + channel.show(true); return emptyTasks; } } \ No newline at end of file From c3d478f336c47ae6de954d5b3f6d3215179d9f02 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 1 Jun 2017 11:31:19 +0200 Subject: [PATCH 1430/2747] fix #27753 --- .../mainThreadExtensionService.ts | 38 ++++++++----------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts b/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts index 14b8d69f5dc5f..43b35d1908ab2 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadExtensionService.ts @@ -89,13 +89,17 @@ export class MainProcessExtensionService extends AbstractExtensionService Date: Thu, 1 Jun 2017 11:36:27 +0200 Subject: [PATCH 1431/2747] don't have unit tests that take multiple seconds fixes #27821 --- .../workbench/parts/output/test/bufferedContent.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/output/test/bufferedContent.test.ts b/src/vs/workbench/parts/output/test/bufferedContent.test.ts index f94f61c9cc036..06a00d45b5b53 100644 --- a/src/vs/workbench/parts/output/test/bufferedContent.test.ts +++ b/src/vs/workbench/parts/output/test/bufferedContent.test.ts @@ -41,19 +41,19 @@ suite('Workbench - Output Buffered Content', () => { bufferedContent.append('first line'); const firstDelta = bufferedContent.getDelta(); let longString = ''; - for (var i = 0; i < 50000; i++) { + for (var i = 0; i < 5000; i++) { bufferedContent.append(i.toString()); longString += i.toString(); } const secondDelta = bufferedContent.getDelta(firstDelta); assert.equal(secondDelta.append, true); - assert.equal(secondDelta.value.substr(secondDelta.value.length - 5), '49999'); + assert.equal(secondDelta.value.substr(secondDelta.value.length - 4), '4999'); longString = longString + longString + longString + longString; bufferedContent.append(longString); bufferedContent.append(longString); const thirdDelta = bufferedContent.getDelta(firstDelta); - assert.equal(!!thirdDelta.append, false); - assert.equal(thirdDelta.value.substr(thirdDelta.value.length - 5), '49999'); + assert.equal(!!thirdDelta.append, true); + assert.equal(thirdDelta.value.substr(thirdDelta.value.length - 4), '4999'); bufferedContent.clear(); assert.equal(bufferedContent.getDelta().value, ''); From af63affc986b51008a70e0440eed7f67bdb87105 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 1 Jun 2017 11:47:34 +0200 Subject: [PATCH 1432/2747] Fixes #27665: Let the search process never inherit `process.execArgv` --- src/vs/base/parts/ipc/node/ipc.cp.ts | 12 ++++++++++++ .../workbench/services/search/node/searchService.ts | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/src/vs/base/parts/ipc/node/ipc.cp.ts b/src/vs/base/parts/ipc/node/ipc.cp.ts index 940c18638fba3..21b1b3f553127 100644 --- a/src/vs/base/parts/ipc/node/ipc.cp.ts +++ b/src/vs/base/parts/ipc/node/ipc.cp.ts @@ -56,6 +56,14 @@ export interface IIPCOptions { */ debugBrk?: number; + /** + * See https://github.com/Microsoft/vscode/issues/27665 + * Allows to pass in fresh execArgv to the forked process such that it doesn't inherit them from `process.execArgv`. + * e.g. Launching the extension host process with `--debug-brk=xxx` and then forking a process from the extension host + * results in the forked process inheriting `--debug-brk=xxx`. + */ + freshExecArgv?: boolean; + /** * Enables our createQueuedSender helper for this Client. Uses a queue when the internal Node.js queue is * full of messages - see notes on that method. @@ -125,6 +133,10 @@ export class Client implements IChannelClient, IDisposable { forkOpts.env = assign(forkOpts.env, this.options.env); } + if (this.options && this.options.freshExecArgv) { + forkOpts.execArgv = []; + } + if (this.options && typeof this.options.debug === 'number') { forkOpts.execArgv = ['--nolazy', '--debug=' + this.options.debug]; } diff --git a/src/vs/workbench/services/search/node/searchService.ts b/src/vs/workbench/services/search/node/searchService.ts index 1c2d62c29d14c..ac68c6c4e285f 100644 --- a/src/vs/workbench/services/search/node/searchService.ts +++ b/src/vs/workbench/services/search/node/searchService.ts @@ -207,6 +207,11 @@ export class DiskSearch { serverName: 'Search', timeout: timeout, args: ['--type=searchService'], + // See https://github.com/Microsoft/vscode/issues/27665 + // Pass in fresh execArgv to the forked process such that it doesn't inherit them from `process.execArgv`. + // e.g. Launching the extension host process with `--debug-brk=xxx` and then forking a process from the extension host + // results in the forked process inheriting `--debug-brk=xxx`. + freshExecArgv: true, env: { AMD_ENTRYPOINT: 'vs/workbench/services/search/node/searchApp', PIPE_LOGGING: 'true', From 16aa259d470cc091888cf848dd666979f68a4cea Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 1 Jun 2017 12:31:50 +0200 Subject: [PATCH 1433/2747] Fixes #27831: The find widget should use aria-hidden when it is hidden --- src/vs/editor/contrib/find/browser/findWidget.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index 409caf8fb7372..de4cbdea3205c 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -402,6 +402,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas setTimeout(() => { dom.addClass(this._domNode, 'visible'); + this._domNode.setAttribute('aria-hidden', 'false'); if (!animate) { dom.addClass(this._domNode, 'noanimation'); setTimeout(() => { @@ -421,6 +422,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._updateButtons(); dom.removeClass(this._domNode, 'visible'); + this._domNode.setAttribute('aria-hidden', 'true'); if (focusTheEditor) { this._codeEditor.focus(); } @@ -812,7 +814,7 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas // Widget this._domNode = document.createElement('div'); this._domNode.className = 'editor-widget find-widget'; - this._domNode.setAttribute('aria-hidden', 'false'); + this._domNode.setAttribute('aria-hidden', 'true'); this._domNode.appendChild(this._toggleReplaceBtn.domNode); this._domNode.appendChild(findPart); From 8f2d12c97e74b22147613f5f52e28ef75deaebff Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 1 Jun 2017 12:42:00 +0200 Subject: [PATCH 1434/2747] Activity bar: active item decoration lost when hovering (fixes #27822) --- .../browser/parts/activitybar/activitybarActions.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts index 7aab7fc7c7d83..ee8df3e9d2727 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts @@ -458,9 +458,9 @@ export class ViewletActionItem extends ActivityActionItem { protected _updateChecked(): void { if (this.getAction().checked) { - this.$container.addClass('active'); + this.$container.addClass('checked'); } else { - this.$container.removeClass('active'); + this.$container.removeClass('checked'); } } @@ -723,7 +723,9 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { } .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active:before, - .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active:hover:before { + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active:hover:before, + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked:before, + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked:hover:before { outline: 1px solid; } @@ -732,6 +734,7 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { } .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active:before, + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked:before, .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:hover:before { opacity: 1; } @@ -742,6 +745,8 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active:before, .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active:hover:before, + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked:before, + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked:hover:before, .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:hover:before { outline-color: ${outline}; } @@ -754,6 +759,7 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { if (focusBorderColor) { collector.addRule(` .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.active .action-label, + .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item.checked .action-label, .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:focus .action-label, .monaco-workbench > .activitybar > .content .monaco-action-bar .action-item:hover .action-label { opacity: 1; From 9496e10c117c89f6f64720887aeb30e841c7a157 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Thu, 1 Jun 2017 12:35:41 +0200 Subject: [PATCH 1435/2747] use final 1.20.0 version of DAP modules --- npm-shrinkwrap.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index d7f219b16383a..3e962373c7d9d 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -410,9 +410,9 @@ "resolved": "git://github.com/jrieken/v8-profiler.git#bc0803a4d4b2150b8a1bbffa80270769007036c2" }, "vscode-debugprotocol": { - "version": "1.19.0", - "from": "vscode-debugprotocol@1.19.0", - "resolved": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.19.0.tgz" + "version": "1.20.0", + "from": "vscode-debugprotocol@1.20.0", + "resolved": "https://registry.npmjs.org/vscode-debugprotocol/-/vscode-debugprotocol-1.20.0.tgz" }, "vscode-ripgrep": { "version": "0.0.12", diff --git a/package.json b/package.json index 127d1dfb45786..f423138397b9f 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "node-pty": "0.6.6", "semver": "4.3.6", "v8-profiler": "jrieken/v8-profiler#vscode", - "vscode-debugprotocol": "1.19.0", + "vscode-debugprotocol": "1.20.0", "vscode-ripgrep": "0.0.12", "vscode-textmate": "^3.1.5", "winreg": "1.2.0", From ab69231014b9a35480a0c88ee665057e57816cc5 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Thu, 1 Jun 2017 12:47:50 +0200 Subject: [PATCH 1436/2747] node-debug@1.13.8 (translations) --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 7334fd94fce46..c9d3cd27a372e 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -42,7 +42,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.13.7' }, + { name: 'ms-vscode.node-debug', version: '1.13.8' }, { name: 'ms-vscode.node-debug2', version: '1.13.1' } ]; From fb4a49b00083e30874bc578bbad730b453f91615 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 1 Jun 2017 12:54:18 +0200 Subject: [PATCH 1437/2747] Target only core languages for the stable build. Ref #27818 --- build/gulpfile.vscode.js | 12 +++++++----- build/lib/i18n.js | 29 ++++++++++++----------------- build/lib/i18n.ts | 29 +++++++++++------------------ build/lib/optimize.js | 3 ++- build/lib/optimize.ts | 7 ++++++- 5 files changed, 38 insertions(+), 42 deletions(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index c9d3cd27a372e..9d5c3ff31fcf5 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -84,6 +84,11 @@ const BUNDLED_FILE_HEADER = [ ' *--------------------------------------------------------*/' ].join('\n'); +var languages = ['chs', 'cht', 'jpn', 'kor', 'deu', 'fra', 'esn', 'rus', 'ita']; +if (product.quality !== 'stable') { + languages = languages.concat(['ptb']); // Add languages requested by the community to non-stable builds +} + gulp.task('clean-optimized-vscode', util.rimraf('out-vscode')); gulp.task('optimize-vscode', ['clean-optimized-vscode', 'compile-build', 'compile-extensions-build'], common.optimizeTask({ entryPoints: vscodeEntryPoints, @@ -91,7 +96,8 @@ gulp.task('optimize-vscode', ['clean-optimized-vscode', 'compile-build', 'compil resources: vscodeResources, loaderConfig: common.loaderConfig(nodeModules), header: BUNDLED_FILE_HEADER, - out: 'out-vscode' + out: 'out-vscode', + languages: languages })); @@ -158,10 +164,6 @@ gulp.task('electron', ['clean-electron'], getElectron(process.arch)); gulp.task('electron-ia32', ['clean-electron'], getElectron('ia32')); gulp.task('electron-x64', ['clean-electron'], getElectron('x64')); -var languages = ['chs', 'cht', 'jpn', 'kor', 'deu', 'fra', 'esn', 'rus', 'ita']; -if (product.quality !== 'stable') { - languages.concat(['ptb']); -} /** * Compute checksums for some files. diff --git a/build/lib/i18n.js b/build/lib/i18n.js index 3f16ccc97f183..4447e34ab6077 100644 --- a/build/lib/i18n.js +++ b/build/lib/i18n.js @@ -1,8 +1,8 @@ -"use strict"; /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var path = require("path"); var fs = require("fs"); @@ -207,17 +207,6 @@ XLF.parse = function (xlfString) { }); }; exports.XLF = XLF; -var vscodeLanguages = [ - 'chs', - 'cht', - 'jpn', - 'kor', - 'deu', - 'fra', - 'esn', - 'rus', - 'ita' -]; var iso639_3_to_2 = { 'chs': 'zh-cn', 'cht': 'zh-tw', @@ -347,7 +336,7 @@ function escapeCharacters(value) { } return result.join(''); } -function processCoreBundleFormat(fileHeader, json, emitter) { +function processCoreBundleFormat(fileHeader, languages, json, emitter) { var keysSection = json.keys; var messageSection = json.messages; var bundleSection = json.bundles; @@ -375,8 +364,14 @@ function processCoreBundleFormat(fileHeader, json, emitter) { }); }); var languageDirectory = path.join(__dirname, '..', '..', 'i18n'); - var languages = sortLanguages(fs.readdirSync(languageDirectory).filter(function (item) { return fs.statSync(path.join(languageDirectory, item)).isDirectory(); })); - languages.forEach(function (language) { + var languageDirs; + if (languageDirs) { + languageDirs = sortLanguages(languages); + } + else { + languageDirs = sortLanguages(fs.readdirSync(languageDirectory).filter(function (item) { return fs.statSync(path.join(languageDirectory, item)).isDirectory(); })); + } + languageDirs.forEach(function (language) { if (!language.iso639_2) { return; } @@ -448,7 +443,7 @@ function processCoreBundleFormat(fileHeader, json, emitter) { var value = statistics[key]; log(key + " has " + value + " untranslated strings."); }); - vscodeLanguages.forEach(function (language) { + languageDirs.forEach(function (language) { var iso639_2 = iso639_3_to_2[language]; if (!iso639_2) { log("\tCouldn't find iso639 2 mapping for language " + language + ". Using default language instead."); @@ -473,7 +468,7 @@ function processNlsFiles(opts) { this.emit('error', "Failed to read component file: " + file.relative); } if (BundledFormat.is(json)) { - processCoreBundleFormat(opts.fileHeader, json, this); + processCoreBundleFormat(opts.fileHeader, opts.languages, json, this); } } this.emit('data', file); diff --git a/build/lib/i18n.ts b/build/lib/i18n.ts index 9667b01fa2fd8..53b46933a806e 100644 --- a/build/lib/i18n.ts +++ b/build/lib/i18n.ts @@ -272,18 +272,6 @@ export class XLF { }; } -const vscodeLanguages: string[] = [ - 'chs', - 'cht', - 'jpn', - 'kor', - 'deu', - 'fra', - 'esn', - 'rus', - 'ita' -]; - const iso639_3_to_2: Map = { 'chs': 'zh-cn', 'cht': 'zh-tw', @@ -420,7 +408,7 @@ function escapeCharacters(value: string): string { return result.join(''); } -function processCoreBundleFormat(fileHeader: string, json: BundledFormat, emitter: any) { +function processCoreBundleFormat(fileHeader: string, languages: string[], json: BundledFormat, emitter: any) { let keysSection = json.keys; let messageSection = json.messages; let bundleSection = json.bundles; @@ -450,8 +438,13 @@ function processCoreBundleFormat(fileHeader: string, json: BundledFormat, emitte }); let languageDirectory = path.join(__dirname, '..', '..', 'i18n'); - let languages = sortLanguages(fs.readdirSync(languageDirectory).filter((item) => fs.statSync(path.join(languageDirectory, item)).isDirectory())); - languages.forEach((language) => { + let languageDirs; + if (languageDirs) { + languageDirs = sortLanguages(languages); + } else { + languageDirs = sortLanguages(fs.readdirSync(languageDirectory).filter((item) => fs.statSync(path.join(languageDirectory, item)).isDirectory())); + } + languageDirs.forEach((language) => { if (!language.iso639_2) { return; } @@ -523,7 +516,7 @@ function processCoreBundleFormat(fileHeader: string, json: BundledFormat, emitte let value = statistics[key]; log(`${key} has ${value} untranslated strings.`); }); - vscodeLanguages.forEach(language => { + languageDirs.forEach(language => { let iso639_2 = iso639_3_to_2[language]; if (!iso639_2) { log(`\tCouldn't find iso639 2 mapping for language ${language}. Using default language instead.`); @@ -536,7 +529,7 @@ function processCoreBundleFormat(fileHeader: string, json: BundledFormat, emitte }); } -export function processNlsFiles(opts: { fileHeader: string; }): ThroughStream { +export function processNlsFiles(opts: { fileHeader: string; languages: string[] }): ThroughStream { return through(function (file: File) { let fileName = path.basename(file.path); if (fileName === 'nls.metadata.json') { @@ -547,7 +540,7 @@ export function processNlsFiles(opts: { fileHeader: string; }): ThroughStream { this.emit('error', `Failed to read component file: ${file.relative}`); } if (BundledFormat.is(json)) { - processCoreBundleFormat(opts.fileHeader, json, this); + processCoreBundleFormat(opts.fileHeader, opts.languages, json, this); } } this.emit('data', file); diff --git a/build/lib/optimize.js b/build/lib/optimize.js index d3bc1ee5c8c14..1957b6dde3c21 100644 --- a/build/lib/optimize.js +++ b/build/lib/optimize.js @@ -163,7 +163,8 @@ function optimizeTask(opts) { includeContent: true })) .pipe(i18n.processNlsFiles({ - fileHeader: bundledFileHeader + fileHeader: bundledFileHeader, + languages: opts.languages })) .pipe(gulp.dest(out)); }; diff --git a/build/lib/optimize.ts b/build/lib/optimize.ts index 9dbaead5f7952..2fb92c5ecdf62 100644 --- a/build/lib/optimize.ts +++ b/build/lib/optimize.ts @@ -158,6 +158,10 @@ export interface IOptimizeTaskOpts { * (out folder name) */ out: string; + /** + * (languages to process) + */ + languages: string[]; } export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStream { const entryPoints = opts.entryPoints; @@ -228,7 +232,8 @@ export function optimizeTask(opts: IOptimizeTaskOpts): () => NodeJS.ReadWriteStr includeContent: true })) .pipe(i18n.processNlsFiles({ - fileHeader: bundledFileHeader + fileHeader: bundledFileHeader, + languages: opts.languages })) .pipe(gulp.dest(out)); }; From 2140cc91b748237fd2e02708706290d57686affe Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 1 Jun 2017 13:13:44 +0200 Subject: [PATCH 1438/2747] Fixes #27551: Add ToggleMultiCursorModifierAction and corresponding menu item --- src/vs/code/electron-main/menus.ts | 24 ++++++++++ .../codeEditor/codeEditor.contribution.ts | 1 + .../toggleMultiCursorModifier.ts | 45 +++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.ts diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 16f3af28054e5..3a5aa4756e552 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -51,6 +51,9 @@ interface IConfiguration extends IFilesConfiguration { visible: boolean; } }; + editor: { + multiCursorModifier: 'ctrlCmd' | 'alt' + }; } class KeybindingsResolver { @@ -153,6 +156,7 @@ export class VSCodeMenu { private static MAX_MENU_RECENT_ENTRIES = 10; private currentAutoSaveSetting: string; + private currentMultiCursorModifierSetting: string; private currentSidebarLocation: 'left' | 'right'; private currentStatusbarVisible: boolean; private currentActivityBarVisible: boolean; @@ -232,6 +236,12 @@ export class VSCodeMenu { updateMenu = true; } + const newMultiCursorModifierSetting = config && config.editor && config.editor.multiCursorModifier; + if (newMultiCursorModifierSetting !== this.currentMultiCursorModifierSetting) { + this.currentMultiCursorModifierSetting = newMultiCursorModifierSetting; + updateMenu = true; + } + const newSidebarLocation = config && config.workbench && config.workbench.sideBar && config.workbench.sideBar.location || 'left'; if (newSidebarLocation !== this.currentSidebarLocation) { this.currentSidebarLocation = newSidebarLocation; @@ -616,6 +626,19 @@ export class VSCodeMenu { } private setSelectionMenu(winLinuxEditMenu: Electron.Menu): void { + let multiCursorModifierLabel: string; + if (this.currentMultiCursorModifierSetting === 'ctrlCmd') { + // The default has been overwritten + multiCursorModifierLabel = nls.localize('miMultiCursorAlt', "Use Alt+Click for Multi-Cursor"); + } else { + multiCursorModifierLabel = ( + isMacintosh + ? nls.localize('miMultiCursorCmd', "Use Cmd+Click for Multi-Cursor") + : nls.localize('miMultiCursorCtrl', "Use Ctrl+Click for Multi-Cursor") + ); + } + + const multicursorModifier = this.createMenuItem(multiCursorModifierLabel, 'workbench.action.toggleMultiCursorModifier'); const insertCursorAbove = this.createMenuItem(nls.localize({ key: 'miInsertCursorAbove', comment: ['&& denotes a mnemonic'] }, "&&Add Cursor Above"), 'editor.action.insertCursorAbove'); const insertCursorBelow = this.createMenuItem(nls.localize({ key: 'miInsertCursorBelow', comment: ['&& denotes a mnemonic'] }, "A&&dd Cursor Below"), 'editor.action.insertCursorBelow'); const insertCursorAtEndOfEachLineSelected = this.createMenuItem(nls.localize({ key: 'miInsertCursorAtEndOfEachLineSelected', comment: ['&& denotes a mnemonic'] }, "Add C&&ursors to Line Ends"), 'editor.action.insertCursorAtEndOfEachLineSelected'); @@ -647,6 +670,7 @@ export class VSCodeMenu { moveLinesUp, moveLinesDown, __separator__(), + multicursorModifier, insertCursorAbove, insertCursorBelow, insertCursorAtEndOfEachLineSelected, diff --git a/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts b/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts index 7e8a05cdce05f..e209510c69442 100644 --- a/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts +++ b/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts @@ -3,6 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import './electron-browser/toggleMultiCursorModifier'; import './electron-browser/toggleRenderControlCharacter'; import './electron-browser/toggleRenderWhitespace'; import './electron-browser/toggleWordWrap'; diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.ts b/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.ts new file mode 100644 index 0000000000000..de0783f35b671 --- /dev/null +++ b/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.ts @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { TPromise } from 'vs/base/common/winjs.base'; +import * as nls from 'vs/nls'; +import { Registry } from 'vs/platform/platform'; +import { Action } from 'vs/base/common/actions'; +import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; +import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; +import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; +import { IConfigurationService } from "vs/platform/configuration/common/configuration"; + +export class ToggleMultiCursorModifierAction extends Action { + + public static ID = 'workbench.action.toggleMultiCursorModifier'; + public static LABEL = nls.localize('toggleLocation', "Toggle Multi-Cursor Modifier"); + + private static multiCursorModifierConfigurationKey = 'editor.multiCursorModifier'; + + constructor( + id: string, + label: string, + @IConfigurationService private configurationService: IConfigurationService, + @IConfigurationEditingService private configurationEditingService: IConfigurationEditingService + ) { + super(id, label); + + this.enabled = !!this.configurationService && !!this.configurationEditingService; + } + + public run(): TPromise { + const editorConf = this.configurationService.getConfiguration<{ multiCursorModifier: 'ctrlCmd' | 'alt' }>('editor'); + const newValue: 'ctrlCmd' | 'alt' = (editorConf.multiCursorModifier === 'ctrlCmd' ? 'alt' : 'ctrlCmd'); + + this.configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { key: ToggleMultiCursorModifierAction.multiCursorModifierConfigurationKey, value: newValue }); + + return TPromise.as(null); + } +} + +const registry = Registry.as(Extensions.WorkbenchActions); +registry.registerWorkbenchAction(new SyncActionDescriptor(ToggleMultiCursorModifierAction, ToggleMultiCursorModifierAction.ID, ToggleMultiCursorModifierAction.LABEL), 'Toggle Multi-Cursor Modifier'); From 229fb9cadc625f32a69125e382c84c91c3c1d73d Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 1 Jun 2017 14:16:53 +0200 Subject: [PATCH 1439/2747] merge snippets, don't stack them, #27543 --- .../snippet/browser/snippetController2.ts | 86 ++-------- .../contrib/snippet/browser/snippetSession.ts | 149 +++++++++++++----- .../test/browser/snippetController2.test.ts | 38 ++--- .../test/browser/snippetParser.test.ts | 29 +++- .../test/browser/snippetSession.test.ts | 30 ++++ 5 files changed, 200 insertions(+), 132 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 96dd960845bfc..86c6c543eecae 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -13,60 +13,6 @@ import { SnippetSession } from './snippetSession'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; -class SnippetSessions { - - private _stack: SnippetSession[] = []; - - add(session: SnippetSession): number { - return this._stack.push(session); - } - - clear(): void { - dispose(this._stack); - this._stack.length = 0; - } - - get empty(): boolean { - return this._stack.length === 0; - } - - get hasPlaceholder(): boolean { - return this._stack.some(s => s.hasPlaceholder); - } - - get isAtFirstPlaceholder(): boolean { - return this._stack.every(s => s.isAtFirstPlaceholder); - } - - get isAtFinalPlaceholder(): boolean { - return !this.empty && this._stack[0].isAtLastPlaceholder; - } - - get isSelectionWithinPlaceholders(): boolean { - return this._stack.some(s => s.isSelectionWithinPlaceholders()); - } - - prev(): void { - for (let i = this._stack.length - 1; i >= 0; i--) { - const snippet = this._stack[i]; - if (!snippet.isAtFirstPlaceholder) { - snippet.prev(); - break; - } - } - } - - next(): void { - for (let i = this._stack.length - 1; i >= 0; i--) { - const snippet = this._stack[i]; - if (!snippet.isAtLastPlaceholder) { - snippet.next(); - break; - } - } - } -} - @commonEditorContribution export class SnippetController2 { @@ -82,7 +28,7 @@ export class SnippetController2 { private readonly _hasNextTabstop: IContextKey; private readonly _hasPrevTabstop: IContextKey; - private _sessions = new SnippetSessions(); + private _session: SnippetSession; private _snippetListener: IDisposable[] = []; private _modelVersionId: number; @@ -99,7 +45,7 @@ export class SnippetController2 { this._inSnippet.reset(); this._hasPrevTabstop.reset(); this._hasNextTabstop.reset(); - this._sessions.clear(); + dispose(this._session); } getId(): string { @@ -120,14 +66,12 @@ export class SnippetController2 { this._editor.getModel().pushStackElement(); } - const snippet = new SnippetSession(this._editor, template, overwriteBefore, overwriteAfter); - const newLen = this._sessions.add(snippet); - - if (newLen === 1) { + if (!this._session) { this._modelVersionId = this._editor.getModel().getAlternativeVersionId(); - snippet.insert(false); + this._session = new SnippetSession(this._editor, template, overwriteBefore, overwriteAfter); + this._session.insert(); } else { - snippet.insert(true); + this._session.merge(template, overwriteBefore, overwriteAfter); } if (undoStopAfter) { @@ -142,7 +86,7 @@ export class SnippetController2 { } private _updateState(): void { - if (this._sessions.empty) { + if (!this._session) { // canceled in the meanwhile return; } @@ -153,19 +97,19 @@ export class SnippetController2 { return this.cancel(); } - if (!this._sessions.hasPlaceholder) { + if (!this._session.hasPlaceholder) { // don't listen for selection changes and don't // update context keys when the snippet is plain text return this.cancel(); } - if (this._sessions.isAtFinalPlaceholder || !this._sessions.isSelectionWithinPlaceholders) { + if (this._session.isAtLastPlaceholder || !this._session.isSelectionWithinPlaceholders()) { return this.cancel(); } this._inSnippet.set(true); - this._hasPrevTabstop.set(!this._sessions.isAtFirstPlaceholder); - this._hasNextTabstop.set(!this._sessions.isAtFinalPlaceholder); + this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder); + this._hasNextTabstop.set(!this._session.isAtLastPlaceholder); } finish(): void { @@ -178,17 +122,19 @@ export class SnippetController2 { this._inSnippet.reset(); this._hasPrevTabstop.reset(); this._hasNextTabstop.reset(); - this._sessions.clear(); dispose(this._snippetListener); + dispose(this._session); + this._session = undefined; + this._modelVersionId = -1; } prev(): void { - this._sessions.prev(); + this._session.prev(); this._updateState(); } next(): void { - this._sessions.next(); + this._session.next(); this._updateState(); } } diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index f319844d5c517..a000690d78678 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -77,14 +77,14 @@ export class OneSnippet { }); } - move(fwd: boolean): Selection[] { + move(fwd: boolean | undefined): Selection[] { this._initDecorations(); - if (fwd && this._placeholderGroupsIdx < this._placeholderGroups.length - 1) { + if (fwd === true && this._placeholderGroupsIdx < this._placeholderGroups.length - 1) { this._placeholderGroupsIdx += 1; - } else if (!fwd && this._placeholderGroupsIdx > 0) { + } else if (fwd === false && this._placeholderGroupsIdx > 0) { this._placeholderGroupsIdx -= 1; } else { @@ -153,6 +153,57 @@ export class OneSnippet { }); return ret; } + + merge(others: OneSnippet[]): void { + + const model = this._editor.getModel(); + + this._editor.changeDecorations(accessor => { + + // For each active placeholder take one snippet and merge it + // in that the placeholder (can be many for `$1foo$1foo`). Because + // everything is sorted by editor selection we can simply remove + // elements from the beginning of the array + for (const placeholder of this._placeholderGroups[this._placeholderGroupsIdx]) { + const nested = others.shift(); + console.assert(!nested._placeholderDecorations); + + // Massage placeholder-indicies of the nested snippet to be + // sorted right after the insertion point. This ensures we move + // through the placeholders in the correct order + for (const nestedPlaceholder of nested._snippet.placeholders) { + if (nestedPlaceholder.isFinalTabstop) { + nestedPlaceholder.index = `${placeholder.index}.${nested._snippet.placeholders.length}`; + } else { + nestedPlaceholder.index = `${placeholder.index}.${nestedPlaceholder.index}`; + } + } + this._snippet.replace(placeholder, nested._snippet.children); + + // Remove the placeholder at which position are inserting + // the snippet and also remove its decoration. + const id = this._placeholderDecorations.get(placeholder); + accessor.removeDecoration(id); + this._placeholderDecorations.delete(placeholder); + + // For each *new* placeholder we create decoration to monitor + // how and if it grows/shrinks. + for (const placeholder of nested._snippet.placeholders) { + const placeholderOffset = nested._snippet.offset(placeholder); + const placeholderLen = nested._snippet.fullLen(placeholder); + const range = Range.fromPositions( + model.getPositionAt(nested._offset + placeholderOffset), + model.getPositionAt(nested._offset + placeholderOffset + placeholderLen) + ); + const handle = accessor.addDecoration(range, OneSnippet._decor.inactive); + this._placeholderDecorations.set(placeholder, handle); + } + } + + // Last, re-create the placeholder groups by sorting placeholders by their index. + this._placeholderGroups = groupBy(this._snippet.placeholders, Placeholder.compareByIndex); + }); + } } export class SnippetSession { @@ -192,41 +243,25 @@ export class SnippetSession { return selection; } - private readonly _editor: ICommonCodeEditor; - private readonly _template: string; - private readonly _overwriteBefore: number; - private readonly _overwriteAfter: number; - private _snippets: OneSnippet[] = []; - - constructor(editor: ICommonCodeEditor, template: string, overwriteBefore: number = 0, overwriteAfter: number = 0) { - this._editor = editor; - this._template = template; - this._overwriteBefore = overwriteBefore; - this._overwriteAfter = overwriteAfter; - } - - dispose(): void { - dispose(this._snippets); - } + static createEditsAndSnippets(editor: ICommonCodeEditor, template: string, overwriteBefore: number, overwriteAfter: number): { edits: IIdentifiedSingleEditOperation[], snippets: OneSnippet[] } { - insert(ignoreFinalTabstops: boolean = false): void { - - const model = this._editor.getModel(); + const model = editor.getModel(); const edits: IIdentifiedSingleEditOperation[] = []; + const snippets: OneSnippet[] = []; let delta = 0; // know what text the overwrite[Before|After] extensions // of the primary curser have selected because only when // secondary selections extend to the same text we can grow them - let firstBeforeText = model.getValueInRange(SnippetSession.adjustSelection(model, this._editor.getSelection(), this._overwriteBefore, 0)); - let firstAfterText = model.getValueInRange(SnippetSession.adjustSelection(model, this._editor.getSelection(), 0, this._overwriteAfter)); + let firstBeforeText = model.getValueInRange(SnippetSession.adjustSelection(model, editor.getSelection(), overwriteBefore, 0)); + let firstAfterText = model.getValueInRange(SnippetSession.adjustSelection(model, editor.getSelection(), 0, overwriteAfter)); // sort selections by their start position but remeber // the original index. that allows you to create correct // offset-based selection logic without changing the // primary selection - const indexedSelection = this._editor.getSelections() + const indexedSelection = editor.getSelections() .map((selection, idx) => ({ selection, idx })) .sort((a, b) => Range.compareRangesUsingStarts(a.selection, b.selection)); @@ -234,8 +269,8 @@ export class SnippetSession { // extend selection with the `overwriteBefore` and `overwriteAfter` and then // compare if this matches the extensions of the primary selection - let extensionBefore = SnippetSession.adjustSelection(model, selection, this._overwriteBefore, 0); - let extensionAfter = SnippetSession.adjustSelection(model, selection, 0, this._overwriteAfter); + let extensionBefore = SnippetSession.adjustSelection(model, selection, overwriteBefore, 0); + let extensionAfter = SnippetSession.adjustSelection(model, selection, 0, overwriteAfter); if (firstBeforeText !== model.getValueInRange(extensionBefore)) { extensionBefore = selection; } @@ -251,20 +286,10 @@ export class SnippetSession { // adjust the template string to match the indentation and // whitespace rules of this insert location (can be different for each cursor) const start = snippetSelection.getStartPosition(); - const adjustedTemplate = SnippetSession.adjustWhitespace(model, start, this._template); + const adjustedTemplate = SnippetSession.adjustWhitespace(model, start, template); const snippet = SnippetParser.parse(adjustedTemplate).resolveVariables(new EditorSnippetVariableResolver(model, selection)); - // rewrite final-tabstop to some other placeholder because this - // snippet sits inside another snippet - if (ignoreFinalTabstops) { - for (const placeholder of snippet.placeholders) { - if (placeholder.isFinalTabstop) { - placeholder.index = String(snippet.placeholders.length); - } - } - } - const offset = model.getOffsetAt(start) + delta; delta += snippet.text.length - model.getValueLengthInRange(snippetSelection); @@ -272,10 +297,36 @@ export class SnippetSession { // that ensures the primiary cursor stays primary despite not being // the one with lowest start position edits[idx] = EditOperation.replaceMove(snippetSelection, snippet.text); - this._snippets[idx] = new OneSnippet(this._editor, snippet, offset); + snippets[idx] = new OneSnippet(editor, snippet, offset); } + return { edits, snippets }; + } + + private readonly _editor: ICommonCodeEditor; + private readonly _template: string; + private readonly _overwriteBefore: number; + private readonly _overwriteAfter: number; + private _snippets: OneSnippet[] = []; + + constructor(editor: ICommonCodeEditor, template: string, overwriteBefore: number = 0, overwriteAfter: number = 0) { + this._editor = editor; + this._template = template; + this._overwriteBefore = overwriteBefore; + this._overwriteAfter = overwriteAfter; + } + + dispose(): void { + dispose(this._snippets); + } + + insert(): void { + + const model = this._editor.getModel(); + // make insert edit and start with first selections + const { edits, snippets } = SnippetSession.createEditsAndSnippets(this._editor, this._template, this._overwriteBefore, this._overwriteAfter); + this._snippets = snippets; this._editor.setSelections(model.pushEditOperations(this._editor.getSelections(), edits, undoEdits => { if (this._snippets[0].hasPlaceholder) { @@ -286,6 +337,24 @@ export class SnippetSession { })); } + merge(template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): void { + const { edits, snippets } = SnippetSession.createEditsAndSnippets(this._editor, template, overwriteBefore, overwriteAfter); + + this._editor.setSelections(this._editor.getModel().pushEditOperations(this._editor.getSelections(), edits, undoEdits => { + + for (const snippet of this._snippets) { + snippet.merge(snippets); + } + console.assert(snippets.length === 0); + + if (this._snippets[0].hasPlaceholder) { + return this._move(undefined); + } else { + return undoEdits.map(edit => Selection.fromPositions(edit.range.getEndPosition())); + } + })); + } + next(): void { const newSelections = this._move(true); this._editor.setSelections(newSelections); @@ -296,7 +365,7 @@ export class SnippetSession { this._editor.setSelections(newSelections); } - private _move(fwd: boolean): Selection[] { + private _move(fwd: boolean | undefined): Selection[] { const selections: Selection[] = []; for (const snippet of this._snippets) { const oneSelection = snippet.move(fwd); diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts index 7cccf8ad7fde7..0074a467414a2 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts @@ -175,34 +175,30 @@ suite('SnippetController2', function () { ctrl.insert('farboo'); assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); - assertContextKeys(contextKeys, true, false, true); - - ctrl.next(); - assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); assertContextKeys(contextKeys, false, false, false); }); - // - // test('Inconsistent tab stop behaviour with recursive snippets and tab / shift tab, #27543', function () { - // const ctrl = new SnippetController2(editor, contextKeys); - // ctrl.insert('1_calize(${1:nl}, \'${2:value}\')$0'); - // assertContextKeys(contextKeys, true, false, true); - // assertSelections(editor, new Selection(1, 10, 1, 12), new Selection(2, 14, 2, 16)); + test('Inconsistent tab stop behaviour with recursive snippets and tab / shift tab, #27543', function () { + const ctrl = new SnippetController2(editor, contextKeys); + ctrl.insert('1_calize(${1:nl}, \'${2:value}\')$0'); + + assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 10, 1, 12), new Selection(2, 14, 2, 16)); - // ctrl.insert('2_calize(${1:nl}, \'${2:value}\')$0'); + ctrl.insert('2_calize(${1:nl}, \'${2:value}\')$0'); - // assertSelections(editor, new Selection(1, 19, 1, 21), new Selection(2, 23, 2, 25)); + assertSelections(editor, new Selection(1, 19, 1, 21), new Selection(2, 23, 2, 25)); - // ctrl.next(); // inner `value` - // assertSelections(editor, new Selection(1, 24, 1, 29), new Selection(2, 28, 2, 33)); + ctrl.next(); // inner `value` + assertSelections(editor, new Selection(1, 24, 1, 29), new Selection(2, 28, 2, 33)); - // ctrl.next(); // inner `$0` - // assertSelections(editor, new Selection(1, 31, 1, 31), new Selection(2, 35, 2, 35)); + ctrl.next(); // inner `$0` + assertSelections(editor, new Selection(1, 31, 1, 31), new Selection(2, 35, 2, 35)); - // ctrl.next(); // outer `value` - // assertSelections(editor, new Selection(1, 34, 1, 39), new Selection(2, 38, 2, 43)); + ctrl.next(); // outer `value` + assertSelections(editor, new Selection(1, 34, 1, 39), new Selection(2, 38, 2, 43)); - // ctrl.prev(); // inner `$0` - // assertSelections(editor, new Selection(1, 31, 1, 31), new Selection(2, 35, 2, 35)); - // }); + ctrl.prev(); // inner `$0` + assertSelections(editor, new Selection(1, 31, 1, 31), new Selection(2, 35, 2, 35)); + }); }); diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts index dc697aa740cdb..2092238acc34b 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts @@ -387,17 +387,44 @@ suite('SnippetParser', () => { assert.equal(placeholders.length, 3); }); - test('TextmateSnippet#replace', function () { + test('TextmateSnippet#replace 1/2', function () { let snippet = SnippetParser.parse('aaa${1:bbb${2:ccc}}$0'); assert.equal(snippet.placeholders.length, 3); const [, second] = snippet.placeholders; assert.equal(second.index, '2'); + const enclosing = snippet.enclosingPlaceholders(second); + assert.equal(enclosing.length, 1); + assert.equal(enclosing[0].index, '1'); + let nested = SnippetParser.parse('ddd$1eee$0'); snippet.replace(second, nested.children); assert.equal(snippet.text, 'aaabbbdddeee'); assert.equal(snippet.placeholders.length, 4); + assert.equal(snippet.placeholders[0].index, '1'); + assert.equal(snippet.placeholders[1].index, '1'); + assert.equal(snippet.placeholders[2].index, '0'); + assert.equal(snippet.placeholders[3].index, '0'); + + const newEnclosing = snippet.enclosingPlaceholders(snippet.placeholders[1]); + assert.ok(newEnclosing[0] === snippet.placeholders[0]); + assert.equal(newEnclosing.length, 1); + assert.equal(newEnclosing[0].index, '1'); + }); + + test('TextmateSnippet#replace 2/2', function () { + let snippet = SnippetParser.parse('aaa${1:bbb${2:ccc}}$0'); + + assert.equal(snippet.placeholders.length, 3); + const [, second] = snippet.placeholders; + assert.equal(second.index, '2'); + + let nested = SnippetParser.parse('dddeee$0'); + snippet.replace(second, nested.children); + + assert.equal(snippet.text, 'aaabbbdddeee'); + assert.equal(snippet.placeholders.length, 3); }); }); diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts index 4691eaad476dd..138d98856b96b 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetSession.test.ts @@ -403,5 +403,35 @@ suite('SnippetSession', function () { assert.equal(model.getValue(), '@line=1function foo() {\n @line=2console.log(a);\n}'); assertSelections(editor, new Selection(1, 8, 1, 8), new Selection(2, 12, 2, 12)); }); + + test('snippets, merge', function () { + editor.setSelection(new Selection(1, 1, 1, 1)); + const session = new SnippetSession(editor, 'This ${1:is ${2:nested}}.$0'); + session.insert(); + session.next(); + assertSelections(editor, new Selection(1, 9, 1, 15)); + + session.merge('really ${1:nested}$0'); + assertSelections(editor, new Selection(1, 16, 1, 22)); + + session.next(); + assertSelections(editor, new Selection(1, 22, 1, 22)); + assert.equal(session.isAtLastPlaceholder, false); + + session.next(); + assert.equal(session.isAtLastPlaceholder, true); + assertSelections(editor, new Selection(1, 23, 1, 23)); + + session.prev(); + editor.trigger('test', 'type', { text: 'AAA' }); + + // back to `really ${1:nested}` + session.prev(); + assertSelections(editor, new Selection(1, 16, 1, 22)); + + // back to `${1:is ...}` which now grew + session.prev(); + assertSelections(editor, new Selection(1, 6, 1, 25)); + }); }); From 186309ab9b30cb540dc47c123b118a3782b17477 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 1 Jun 2017 14:22:16 +0200 Subject: [PATCH 1440/2747] Flicker in minimap. Fixes #27518 --- .../workbench/services/themes/electron-browser/colorThemeData.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts index c0ac0c551f4f0..44d21ea354641 100644 --- a/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts +++ b/src/vs/workbench/services/themes/electron-browser/colorThemeData.ts @@ -137,6 +137,7 @@ export function createUnloadedTheme(id: string): ColorThemeData { themeData.label = ''; themeData.settingsId = null; themeData.isLoaded = false; + themeData.tokenColors = [{ settings: {} }]; return themeData; } From bed537a4166905ef62e341285933aad7d21cedd3 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 1 Jun 2017 14:27:26 +0200 Subject: [PATCH 1441/2747] Added waiting to give enough time for VS Code to type the text in the editor. --- test/smoke/src/tests/data-loss.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/smoke/src/tests/data-loss.ts b/test/smoke/src/tests/data-loss.ts index e1498299e8ee8..0086f6268efb3 100644 --- a/test/smoke/src/tests/data-loss.ts +++ b/test/smoke/src/tests/data-loss.ts @@ -54,13 +54,13 @@ export function testDataLoss() { // create one untitled file await common.newUntitledFile(); - await app.wait(); await common.type(textToType); - + await app.wait(); + // make one dirty file, await common.openFile('readme.md', true); - await app.wait(); await common.type(textToType); + await app.wait(); await app.stop(); await app.start(); From 895deefdf218ca2ce42c8b8ae86f4ed4332dba4b Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 1 Jun 2017 14:29:56 +0200 Subject: [PATCH 1442/2747] Iterate over the language names, rather than objects. --- build/lib/i18n.js | 3 ++- build/lib/i18n.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build/lib/i18n.js b/build/lib/i18n.js index 4447e34ab6077..ed8a75c7bfcbc 100644 --- a/build/lib/i18n.js +++ b/build/lib/i18n.js @@ -443,7 +443,8 @@ function processCoreBundleFormat(fileHeader, languages, json, emitter) { var value = statistics[key]; log(key + " has " + value + " untranslated strings."); }); - languageDirs.forEach(function (language) { + languageDirs.forEach(function (dir) { + var language = dir.name; var iso639_2 = iso639_3_to_2[language]; if (!iso639_2) { log("\tCouldn't find iso639 2 mapping for language " + language + ". Using default language instead."); diff --git a/build/lib/i18n.ts b/build/lib/i18n.ts index 53b46933a806e..23a3d743f0649 100644 --- a/build/lib/i18n.ts +++ b/build/lib/i18n.ts @@ -516,7 +516,8 @@ function processCoreBundleFormat(fileHeader: string, languages: string[], json: let value = statistics[key]; log(`${key} has ${value} untranslated strings.`); }); - languageDirs.forEach(language => { + languageDirs.forEach(dir => { + const language = dir.name; let iso639_2 = iso639_3_to_2[language]; if (!iso639_2) { log(`\tCouldn't find iso639 2 mapping for language ${language}. Using default language instead.`); From 0803f7cef2561781d295a64075803e9242cc574f Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 1 Jun 2017 14:36:29 +0200 Subject: [PATCH 1443/2747] Removed wait from the test. Ref #27841 --- test/smoke/src/tests/data-loss.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/smoke/src/tests/data-loss.ts b/test/smoke/src/tests/data-loss.ts index 0086f6268efb3..495838eb774ee 100644 --- a/test/smoke/src/tests/data-loss.ts +++ b/test/smoke/src/tests/data-loss.ts @@ -55,12 +55,10 @@ export function testDataLoss() { // create one untitled file await common.newUntitledFile(); await common.type(textToType); - await app.wait(); // make one dirty file, await common.openFile('readme.md', true); await common.type(textToType); - await app.wait(); await app.stop(); await app.start(); From 9dc26570166fb3955360ea7514ea9189b6209a6b Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 1 Jun 2017 14:50:26 +0200 Subject: [PATCH 1444/2747] fix double click focus movement when clicking in debug trees fixes #27835 --- src/vs/workbench/parts/debug/electron-browser/debugViewer.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index e4eb230068f7d..fabffd9ca160f 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -251,6 +251,7 @@ export class CallStackController extends BaseDebugController { } if (element instanceof StackFrame) { this.focusStackFrame(element, event, event.detail !== 2); + return true; } return super.onLeftClick(tree, element, event); @@ -1256,6 +1257,7 @@ export class BreakpointsController extends BaseDebugController { } if (element instanceof Breakpoint) { this.openBreakpointSource(element, event, event.detail !== 2); + return true; } return super.onLeftClick(tree, element, event); From f6891b951af7ac152b55639d56de3c0e9501dc07 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Thu, 1 Jun 2017 15:02:12 +0200 Subject: [PATCH 1445/2747] Fixes #27844: Task quick selection needs to filter on label --- src/vs/workbench/parts/tasks/browser/quickOpen.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/tasks/browser/quickOpen.ts b/src/vs/workbench/parts/tasks/browser/quickOpen.ts index 2b0eb83c769fb..3ec4cf961800e 100644 --- a/src/vs/workbench/parts/tasks/browser/quickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/quickOpen.ts @@ -81,7 +81,7 @@ export abstract class QuickOpenHandler extends Quickopen.QuickOpenHandler { return compare; } } - return a.name.localeCompare(b.name); + return a._label.localeCompare(b._label); } if (aKind === TaskSourceKind.Workspace) { return -1; @@ -95,7 +95,7 @@ export abstract class QuickOpenHandler extends Quickopen.QuickOpenHandler { let groupExtension = groupWorkspace; let hadWorkspace = false; for (let task of tasks) { - let highlights = Filters.matchesContiguousSubString(input, task.name); + let highlights = Filters.matchesContiguousSubString(input, task._label); if (!highlights) { continue; } From 724f31f5bc953f7557736ca43076a284624d251b Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 1 Jun 2017 15:03:58 +0200 Subject: [PATCH 1446/2747] [decorators] only inclode border and outline styles if color is set. For #27790. --- .../editor/browser/services/codeEditorServiceImpl.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index f19885a132673..10a48dacbe3c0 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -343,9 +343,10 @@ class DecorationCSSRules { return ''; } let cssTextArr: string[] = []; - this.collectCSSText(opts, ['backgroundColor', 'outline', 'outlineColor', 'outlineStyle', 'outlineWidth'], cssTextArr); - this.collectBorderSettingsCSSText(opts, cssTextArr); - + this.collectCSSText(opts, ['backgroundColor'], cssTextArr); + if (this.collectCSSText(opts, ['outline', 'outlineColor'], cssTextArr)) { + this.collectCSSText(opts, ['outlineStyle', 'outlineWidth'], cssTextArr); + } return cssTextArr.join(''); } @@ -415,10 +416,9 @@ class DecorationCSSRules { return cssTextArr.join(''); } - private static border_rules = ['border', 'borderRadius', 'borderColor', 'borderSpacing', 'borderStyle', 'borderWidth']; - private collectBorderSettingsCSSText(opts: any, cssTextArr: string[]): boolean { - if (this.collectCSSText(opts, DecorationCSSRules.border_rules, cssTextArr)) { + if (this.collectCSSText(opts, ['border', 'borderColor'], cssTextArr)) { + this.collectCSSText(opts, ['borderRadius', 'borderSpacing', 'borderStyle', 'borderWidth'], cssTextArr); cssTextArr.push(strings.format('box-sizing: border-box;')); return true; } From 45e33456d6bdecf70d0e851fb8025d72a1db99a5 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 1 Jun 2017 15:13:31 +0200 Subject: [PATCH 1447/2747] Fixed adding languages only to non-stable build. --- build/gulpfile.vscode.js | 2 +- build/lib/i18n.js | 2 +- build/lib/i18n.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 9d5c3ff31fcf5..954a95afdee0f 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -85,7 +85,7 @@ const BUNDLED_FILE_HEADER = [ ].join('\n'); var languages = ['chs', 'cht', 'jpn', 'kor', 'deu', 'fra', 'esn', 'rus', 'ita']; -if (product.quality !== 'stable') { +if (process.env.VSCODE_QUALITY !== 'stable') { languages = languages.concat(['ptb']); // Add languages requested by the community to non-stable builds } diff --git a/build/lib/i18n.js b/build/lib/i18n.js index ed8a75c7bfcbc..3cf4f78401e72 100644 --- a/build/lib/i18n.js +++ b/build/lib/i18n.js @@ -365,7 +365,7 @@ function processCoreBundleFormat(fileHeader, languages, json, emitter) { }); var languageDirectory = path.join(__dirname, '..', '..', 'i18n'); var languageDirs; - if (languageDirs) { + if (languages) { languageDirs = sortLanguages(languages); } else { diff --git a/build/lib/i18n.ts b/build/lib/i18n.ts index 23a3d743f0649..e4a1029f7fe06 100644 --- a/build/lib/i18n.ts +++ b/build/lib/i18n.ts @@ -439,7 +439,7 @@ function processCoreBundleFormat(fileHeader: string, languages: string[], json: let languageDirectory = path.join(__dirname, '..', '..', 'i18n'); let languageDirs; - if (languageDirs) { + if (languages) { languageDirs = sortLanguages(languages); } else { languageDirs = sortLanguages(fs.readdirSync(languageDirectory).filter((item) => fs.statSync(path.join(languageDirectory, item)).isDirectory())); From c8ad3f5aa633402b2d70b5239b683059b1fada19 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 1 Jun 2017 15:20:29 +0200 Subject: [PATCH 1448/2747] Fixes #27813: Add editor option to forcefully enable/disable accessibility support --- .../common/config/commonEditorConfig.ts | 11 ++++++++ src/vs/editor/common/config/editorOptions.ts | 25 ++++++++++++++++--- src/vs/monaco.d.ts | 5 ++++ 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 7d74da7a72d49..2d54be1a83297 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -551,6 +551,17 @@ const editorConfiguration: IConfigurationNode = { 'default': EDITOR_DEFAULTS.dragAndDrop, 'description': nls.localize('dragAndDrop', "Controls if the editor should allow to move selections via drag and drop.") }, + 'editor.accessibilitySupport': { + 'type': 'string', + 'enum': ['auto', 'on', 'off'], + 'enumDescriptions': [ + nls.localize('accessibilitySupport.auto', "The editor will use platform APIs to detect when a Screen Reader is attached."), + nls.localize('accessibilitySupport.on', "The editor will be permanently optimized for usage with a Screen Reader."), + nls.localize('accessibilitySupport.off', "The editor will never be optimized for usage with a Screen Reader."), + ], + 'default': EDITOR_DEFAULTS.accessibilitySupport, + 'description': nls.localize('accessibilitySupport', "Controls whether the editor should run in a mode where it is optimized for screen readers.") + }, 'diffEditor.renderSideBySide': { 'type': 'boolean', 'default': true, diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index b0586e45307e2..5db649e062c76 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -336,6 +336,11 @@ export interface IEditorOptions { * Defaults to 'alt' */ multiCursorModifier?: 'ctrlCmd' | 'alt'; + /** + * Configure the editor's accessibility support. + * Defaults to 'auto'. It is best to leave this to 'auto'. + */ + accessibilitySupport?: 'auto' | 'off' | 'on'; /** * Enable quick suggestions (shadow suggestions) * Defaults to true. @@ -789,6 +794,7 @@ export interface IValidatedEditorOptions { readonly emptySelectionClipboard: boolean; readonly useTabStops: boolean; readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; + readonly accessibilitySupport: 'auto' | 'off' | 'on'; readonly viewInfo: InternalEditorViewOptions; readonly contribInfo: EditorContribOptions; @@ -1429,6 +1435,7 @@ export class EditorOptionsValidator { emptySelectionClipboard: _boolean(opts.emptySelectionClipboard, defaults.emptySelectionClipboard), useTabStops: _boolean(opts.useTabStops, defaults.useTabStops), multiCursorModifier: multiCursorModifier, + accessibilitySupport: _stringSet<'auto' | 'on' | 'off'>(opts.accessibilitySupport, defaults.accessibilitySupport, ['auto', 'on', 'off']), viewInfo: viewInfo, contribInfo: contribInfo, }; @@ -1653,6 +1660,7 @@ export class InternalEditorOptionsFactory { emptySelectionClipboard: opts.emptySelectionClipboard, useTabStops: opts.useTabStops, multiCursorModifier: opts.multiCursorModifier, + accessibilitySupport: opts.accessibilitySupport, viewInfo: { extraEditorClassName: opts.viewInfo.extraEditorClassName, @@ -1718,9 +1726,19 @@ export class InternalEditorOptionsFactory { public static createInternalEditorOptions(env: IEnvironmentalOptions, _opts: IValidatedEditorOptions) { + let accessibilitySupport: platform.AccessibilitySupport; + if (_opts.accessibilitySupport === 'auto') { + // The editor reads the `accessibilitySupport` from the environment + accessibilitySupport = env.accessibilitySupport; + } else if (_opts.accessibilitySupport === 'on') { + accessibilitySupport = platform.AccessibilitySupport.Enabled; + } else { + accessibilitySupport = platform.AccessibilitySupport.Disabled; + } + // Disable some non critical features to get as best performance as possible // See https://github.com/Microsoft/vscode/issues/26730 - const opts = this._handlePerformanceCritical(_opts, (env.accessibilitySupport === platform.AccessibilitySupport.Enabled)); + const opts = this._handlePerformanceCritical(_opts, (accessibilitySupport === platform.AccessibilitySupport.Enabled)); let lineDecorationsWidth: number; if (typeof opts.lineDecorationsWidth === 'string' && /^\d+(\.\d+)?ch$/.test(opts.lineDecorationsWidth)) { @@ -1760,7 +1778,7 @@ export class InternalEditorOptionsFactory { const wordWrapColumn = opts.wordWrapColumn; const wordWrapMinified = opts.wordWrapMinified; - if (env.accessibilitySupport === platform.AccessibilitySupport.Enabled) { + if (accessibilitySupport === platform.AccessibilitySupport.Enabled) { // See https://github.com/Microsoft/vscode/issues/27766 // Never enable wrapping when a screen reader is attached // because arrow down etc. will not move the cursor in the way @@ -1838,7 +1856,7 @@ export class InternalEditorOptionsFactory { editorClassName: className, lineHeight: env.fontInfo.lineHeight, readOnly: opts.readOnly, - accessibilitySupport: env.accessibilitySupport, + accessibilitySupport: accessibilitySupport, multiCursorModifier: opts.multiCursorModifier, wordSeparators: opts.wordSeparators, autoClosingBrackets: opts.autoClosingBrackets, @@ -2059,6 +2077,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { emptySelectionClipboard: true, useTabStops: true, multiCursorModifier: 'altKey', + accessibilitySupport: 'auto', viewInfo: { extraEditorClassName: '', diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 34d430262a68a..3fad661a07f8d 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2882,6 +2882,11 @@ declare module monaco.editor { * Defaults to 'alt' */ multiCursorModifier?: 'ctrlCmd' | 'alt'; + /** + * Configure the editor's accessibility support. + * Defaults to 'auto'. It is best to leave this to 'auto'. + */ + accessibilitySupport?: 'auto' | 'off' | 'on'; /** * Enable quick suggestions (shadow suggestions) * Defaults to true. From 239ff7d0e030c93d5eadedd6ff764f909d0cd317 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Thu, 1 Jun 2017 15:27:23 +0200 Subject: [PATCH 1449/2747] Fixes #23758: Can start same task twice when adding task to tasks.json in between --- .../parts/tasks/common/taskConfiguration.ts | 70 +++++++++++++++++-- 1 file changed, 66 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts index 717fa268eab99..b89dcfaeca22e 100644 --- a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts @@ -358,6 +358,7 @@ function fillProperty(target: T, source: T, key: K) { interface ParseContext { problemReporter: IProblemReporter; namedProblemMatchers: IStringDictionary; + uuidMap: UUIDMap; engine: Tasks.ExecutionEngine; schemaVersion: Tasks.JsonSchemaVersion; } @@ -882,7 +883,7 @@ namespace TaskDescription { let command: Tasks.CommandConfiguration = CommandConfiguration.from(externalTask, context); let identifer = Types.isString(externalTask.identifier) ? externalTask.identifier : taskName; let task: Tasks.Task = { - _id: UUID.generateUuid(), + _id: context.uuidMap.getUUID(taskName), _source: source, _label: taskName, name: taskName, @@ -1222,11 +1223,65 @@ export interface IProblemReporter extends IProblemReporterBase { clearOutput(): void; } +class UUIDMap { + + private last: IStringDictionary; + private current: IStringDictionary; + + constructor() { + this.current = Object.create(null); + } + + public start(): void { + this.last = this.current; + this.current = Object.create(null); + } + + public getUUID(identifier: string): string { + let lastValue = this.last[identifier]; + let result: string; + if (lastValue !== void 0) { + if (Array.isArray(lastValue)) { + result = lastValue.shift(); + if (lastValue.length === 0) { + delete this.last[identifier]; + } + } else { + result = lastValue; + delete this.last[identifier]; + } + } + if (result === void 0) { + result = UUID.generateUuid(); + } + let currentValue = this.current[identifier]; + if (currentValue === void 0) { + this.current[identifier] = result; + } else { + if (Array.isArray(currentValue)) { + currentValue.push(result); + } else { + let arrayValue: string[] = [currentValue]; + arrayValue.push(result); + this.current[identifier] = arrayValue; + } + } + return result; + } + + public finish(): void { + this.last = undefined; + } +} + class ConfigurationParser { private problemReporter: IProblemReporter; - constructor(problemReporter: IProblemReporter) { + private uuidMap: UUIDMap; + + constructor(problemReporter: IProblemReporter, uuidMap: UUIDMap) { this.problemReporter = problemReporter; + this.uuidMap = uuidMap; } public run(fileConfig: ExternalTaskRunnerConfiguration): ParseResult { @@ -1237,6 +1292,7 @@ class ConfigurationParser { } let context: ParseContext = { problemReporter: this.problemReporter, + uuidMap: this.uuidMap, namedProblemMatchers: undefined, engine, schemaVersion, @@ -1278,7 +1334,7 @@ class ConfigurationParser { let matchers: ProblemMatcher[] = ProblemMatcherConverter.from(fileConfig.problemMatcher, context);; let isBackground = fileConfig.isBackground ? !!fileConfig.isBackground : fileConfig.isWatching ? !!fileConfig.isWatching : undefined; let task: Tasks.Task = { - _id: UUID.generateUuid(), + _id: context.uuidMap.getUUID(globals.command.name), _source: TaskDescription.source, _label: globals.command.name, name: globals.command.name, @@ -1303,8 +1359,14 @@ class ConfigurationParser { } } +let uuidMap: UUIDMap = new UUIDMap(); export function parse(configuration: ExternalTaskRunnerConfiguration, logger: IProblemReporter): ParseResult { - return (new ConfigurationParser(logger)).run(configuration); + try { + uuidMap.start(); + return (new ConfigurationParser(logger, uuidMap)).run(configuration); + } finally { + uuidMap.finish(); + } } export function mergeTasks(target: Tasks.Task, source: Tasks.Task): Tasks.Task { From cb72a7ca99dd987759d9b82ed57129a2374870ad Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 1 Jun 2017 15:38:29 +0200 Subject: [PATCH 1450/2747] add more ouis from VM --- src/vs/base/node/id.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/base/node/id.ts b/src/vs/base/node/id.ts index 082983bea7220..f8b65bfcbc997 100644 --- a/src/vs/base/node/id.ts +++ b/src/vs/base/node/id.ts @@ -35,6 +35,9 @@ export const virtualMachineHint: { value(): number } = new class { this._virtualMachineOUIs.insert('00-05-69', true); this._virtualMachineOUIs.insert('00-03-FF', true); this._virtualMachineOUIs.insert('00-1C-42', true); + this._virtualMachineOUIs.insert('00-16-3E', true); + this._virtualMachineOUIs.insert('08-00-27', true); + } return this._virtualMachineOUIs.findSubstr(mac); } From 56709d135e42bc7342c57031d02ef6c332ac84a5 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 1 Jun 2017 15:39:17 +0200 Subject: [PATCH 1451/2747] Present screen reader status in Alt+F1 info (#27833) --- .../accessibility/browser/accessibility.ts | 40 +++++++++++++++++-- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/contrib/accessibility/browser/accessibility.ts b/src/vs/editor/contrib/accessibility/browser/accessibility.ts index 1294dc7b3065f..b72127b43baeb 100644 --- a/src/vs/editor/contrib/accessibility/browser/accessibility.ts +++ b/src/vs/editor/contrib/accessibility/browser/accessibility.ts @@ -25,6 +25,9 @@ import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { ToggleTabFocusModeAction } from 'vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorWidgetBackground, widgetShadow, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { IConfigurationService } from "vs/platform/configuration/common/configuration"; +import * as editorOptions from 'vs/editor/common/config/editorOptions'; +import * as platform from 'vs/base/common/platform'; const CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE = new RawContextKey('accessibilityHelpWidgetVisible', false); @@ -43,12 +46,13 @@ class AccessibilityHelpController extends Disposable implements IEditorContribut constructor( editor: ICodeEditor, @IContextKeyService contextKeyService: IContextKeyService, - @IKeybindingService keybindingService: IKeybindingService + @IKeybindingService keybindingService: IKeybindingService, + @IConfigurationService configurationService: IConfigurationService ) { super(); this._editor = editor; - this._widget = this._register(new AccessibilityHelpWidget(this._editor, contextKeyService, keybindingService)); + this._widget = this._register(new AccessibilityHelpWidget(this._editor, contextKeyService, keybindingService, configurationService)); } public getId(): string { @@ -72,15 +76,17 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { private _editor: ICodeEditor; private _keybindingService: IKeybindingService; + private _configurationService: IConfigurationService; private _domNode: FastDomNode; private _isVisible: boolean; private _isVisibleKey: IContextKey; - constructor(editor: ICodeEditor, contextKeyService: IContextKeyService, keybindingService: IKeybindingService) { + constructor(editor: ICodeEditor, contextKeyService: IContextKeyService, keybindingService: IKeybindingService, configurationService: IConfigurationService) { super(); this._editor = editor; this._keybindingService = keybindingService; + this._configurationService = configurationService; this._isVisibleKey = CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE.bindTo(contextKeyService); this._domNode = createFastDomNode(document.createElement('div')); @@ -151,6 +157,32 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { text += '\n\n' + nls.localize('status', "Status:"); + const configuredValue = this._configurationService.getConfiguration('editor').accessibilitySupport; + const actualValue = opts.accessibilitySupport; + + switch (configuredValue) { + case 'auto': + switch (actualValue) { + case platform.AccessibilitySupport.Unknown: + // Should never happen in VS Code + text += '\n\n - ' + nls.localize('auto_unknown', "The editor is configured to use platform APIs to detect when a Screen Reader is attached, but the current runtime does not support this."); + break; + case platform.AccessibilitySupport.Enabled: + text += '\n\n - ' + nls.localize('auto_on', "The editor has automatically detected a Screen Reader is attached."); + break; + case platform.AccessibilitySupport.Disabled: + text += '\n\n - ' + nls.localize('auto_off', "The editor is configured to automatically detect when a Screen Reader is attached, which is not the case at this time."); + break; + } + break; + case 'on': + text += '\n\n - ' + nls.localize('configuredOn', "The editor is configured to be permanently optimized for usage with a Screen Reader - you can change this by editing the setting `editor.accessibilitySupport`."); + break; + case 'off': + text += '\n\n - ' + nls.localize('configuredOff', "The editor is configured to never be optimized for usage with a Screen Reader - you can change this by editing the setting `editor.accessibilitySupport`."); + break; + } + const NLS_TAB_FOCUS_MODE_ON = nls.localize('tabFocusModeOnMsg', "Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."); const NLS_TAB_FOCUS_MODE_ON_NO_KB = nls.localize('tabFocusModeOnMsgNoKb', "Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."); const NLS_TAB_FOCUS_MODE_OFF = nls.localize('tabFocusModeOffMsg', "Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."); @@ -162,7 +194,7 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { text += '\n\n - ' + this._descriptionForCommand(ToggleTabFocusModeAction.ID, NLS_TAB_FOCUS_MODE_OFF, NLS_TAB_FOCUS_MODE_OFF_NO_KB); } - text += '\n\n' + nls.localize('outroMsg', "You can dismiss this tooltip and return to the editor by pressing Escape."); + text += '\n\n' + nls.localize('outroMsg', "You can dismiss this tooltip and return to the editor by pressing Escape or Shift-Escape."); this._domNode.domNode.appendChild(renderHtml({ formattedText: text From e4c130c36a2e47820cf534d967aef5213a0a8a89 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 1 Jun 2017 15:50:23 +0200 Subject: [PATCH 1452/2747] Moved contribution section to readme. --- test/smoke/CONTRIBUTING.md | 35 ----------------------------------- test/smoke/README.md | 38 ++++++++++++++++++++++++++++++++++---- 2 files changed, 34 insertions(+), 39 deletions(-) delete mode 100644 test/smoke/CONTRIBUTING.md diff --git a/test/smoke/CONTRIBUTING.md b/test/smoke/CONTRIBUTING.md deleted file mode 100644 index 7b403022778d8..0000000000000 --- a/test/smoke/CONTRIBUTING.md +++ /dev/null @@ -1,35 +0,0 @@ -# Architecture -* `main.js` is used to prepare all smoke test dependencies (fetching key bindings and 'Express' repository, running `npm install` there). -* `mocha-runner.js` launches Mocha programmatically. It is spawned in Node environment from main.js to ensure that it is possible to listen on `stderr`s (primary `process.stderr` is not readable otherwise). This is accomplished because WebDriverIO command deprecation warnings need to be redirected to a separate log. Those warnings are coming from WebDriverIO because ChromeDriver has not migrated from JsonWire to W3C WebDriver protocol. -* `tests.ts` contains the main smoke test suite. It includes all tests separated into mocha `describe()` groups that represent each of the areas of [Smoke Test document](https://github.com/Microsoft/vscode/wiki/Smoke-Test). - -* `./areas/` folder contains a `.ts` file per each area of the document. E.g. `'Search'` area goes under `'search.ts'`. Every area file contains a list of methods with the name that represents the action that can be performed in the corresponding test. This reduces the amount of test suite code and means that if the UI changes, the fix need only be applied in one place. The name of the method reflects the action the tester would do if he would perform the test manually. See [Selenium Page Objects Wiki](https://github.com/SeleniumHQ/selenium/wiki/PageObjects) and [Selenium Bot Style Tests Wiki](https://github.com/SeleniumHQ/selenium/wiki/Bot-Style-Tests) for a good explanation of the implementation. Every smoke test area contains methods that are used in a bot-style approach in `main.ts`. -* `./spectron/` wraps the Spectron, with WebDriverIO API wrapped in `client.ts` and instance of Spectron Application is wrapped in `application.ts`. -* `./scripts/` contains scripts to run the smoke test. - -# Adding new area -To contribute a new smoke test area, add `${area}.ts` file under `./areas`. This has to follow the bot-style approach described in the links mentioned above. Methods should be calling WebDriverIO API through `SpectronClient` class. If there is no existing WebDriverIO method, add it to the class. - -# Adding new test -To add new test area or test, `main.ts` should be updated. The same instruction-style principle needs to be followed with the called area method names that reflect manual tester's actions. - -# Debugging -1. Add the following configuration to launch.json, specifying binaries in `args`: -```json -{ - "type": "node", - "request": "launch", - "name": "Launch Smoke Test", - "program": "${workspaceRoot}/test/smoke/src/main.js", - "cwd": "${workspaceRoot}/test/smoke", - "port": 9999, - "args": [ - "-l", - "path/to/Code.exe" - ], - "outFiles": [ - "${cwd}/out/**/*.js" - ] -}, -``` -2. In main.js add `--debug-brk=9999` argument to the place where `src/mocha-runner.js` is spawned. \ No newline at end of file diff --git a/test/smoke/README.md b/test/smoke/README.md index 501ec51f087d6..2cff1cd8b190e 100644 --- a/test/smoke/README.md +++ b/test/smoke/README.md @@ -1,10 +1,40 @@ # VS Code Smoke Testing -This repository contains the smoke test automation code with Spectron for Visual Studio Code. - The following command is used to run the tests: `npm test -- --latest "path/to/binary"`. If you want to include 'Data Migration' area tests use `npm test -- --latest path/to/binary --stable path/to/currentStable` respectively. -# Contributing +# Architecture +* `main.js` is used to prepare all smoke test dependencies (fetching key bindings and 'Express' repository, running `npm install` there). +* `mocha-runner.js` launches Mocha programmatically. It is spawned in Node environment from main.js to ensure that it is possible to listen on `stderr`s (primary `process.stderr` is not readable otherwise). This is accomplished because WebDriverIO command deprecation warnings need to be redirected to a separate log. Those warnings are coming from WebDriverIO because ChromeDriver has not migrated from JsonWire to W3C WebDriver protocol. +* `test.ts` contains the main smoke test suite calling the tests that are bundled in areas and defined in `./tests/`. It includes all tests separated into mocha `describe()` groups that represent each of the areas of [Smoke Test document](https://github.com/Microsoft/vscode/wiki/Smoke-Test). + +* `./areas/` folder contains a `.ts` file per each area of the document. E.g. `'Search'` area goes under `'search.ts'`. Every area file contains a list of methods with the name that represents the action that can be performed in the corresponding test. This reduces the amount of test suite code and means that if the UI changes, the fix need only be applied in one place. The name of the method reflects the action the tester would do if he would perform the test manually. See [Selenium Page Objects Wiki](https://github.com/SeleniumHQ/selenium/wiki/PageObjects) and [Selenium Bot Style Tests Wiki](https://github.com/SeleniumHQ/selenium/wiki/Bot-Style-Tests) for a good explanation of the implementation. Every smoke test area contains methods that are used in a bot-style approach in `main.ts`. +* `./spectron/` wraps the Spectron, with WebDriverIO API wrapped in `client.ts` and instance of Spectron Application is wrapped in `application.ts`. +* `./scripts/` contains scripts to run the smoke test. + +# Adding new area +To contribute a new smoke test area, add `${area}.ts` file under `./areas/`. All related tests to the area should go to the alike named file under `./tests/` This has to follow the bot-style approach described in the links mentioned above. Methods should be calling WebDriverIO API through `SpectronClient` class. If there is no existing WebDriverIO method, add it to the class. + +# Adding new test +To add new test area or test, `main.ts` should be updated. The same instruction-style principle needs to be followed with the called area method names that reflect manual tester's actions. -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. +# Debugging +1. Add the following configuration to launch.json, specifying binaries in `args`: +```json +{ + "type": "node", + "request": "launch", + "name": "Launch Smoke Test", + "program": "${workspaceRoot}/test/smoke/src/main.js", + "cwd": "${workspaceRoot}/test/smoke", + "port": 9999, + "args": [ + "-l", + "path/to/Code.exe" + ], + "outFiles": [ + "${cwd}/out/**/*.js" + ] +}, +``` +2. In main.js add `--debug-brk=9999` argument to the place where `src/mocha-runner.js` is spawned. \ No newline at end of file From 7533eb39a04140247a36c5b0a2a3474a9a336cd0 Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 1 Jun 2017 15:16:46 +0200 Subject: [PATCH 1453/2747] debug: null guard --- .../workbench/parts/debug/electron-browser/debugService.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 49b429ed4f46e..983d0cac31421 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -278,8 +278,10 @@ export class DebugService implements debug.IDebugService { } this.focusStackFrameAndEvaluate(stackFrameToFocus).done(null, errors.onUnexpectedError); - this.windowService.getWindow().focus(); - aria.alert(nls.localize('debuggingPaused', "Debugging paused, reason {0}, {1} {2}", thread.stoppedDetails.reason, stackFrameToFocus.source ? stackFrameToFocus.source.name : '', stackFrameToFocus.range.startLineNumber)); + if (thread.stoppedDetails) { + this.windowService.getWindow().focus(); + aria.alert(nls.localize('debuggingPaused', "Debugging paused, reason {0}, {1} {2}", thread.stoppedDetails.reason, stackFrameToFocus.source ? stackFrameToFocus.source.name : '', stackFrameToFocus.range.startLineNumber)); + } return stackFrameToFocus.openInEditor(this.editorService); } From 36a00d12c51a8cc4ed45c74bdf7c7b487dab861e Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 1 Jun 2017 16:00:40 +0200 Subject: [PATCH 1454/2747] use more precise ids for stack frames to avoid time era collisions #27694 --- src/vs/workbench/parts/debug/common/debugModel.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index e036ea1bb0868..6d4f7691c3ea9 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -333,13 +333,14 @@ export class StackFrame implements IStackFrame { public frameId: number, public source: Source, public name: string, - public range: IRange + public range: IRange, + private index: number ) { this.scopes = null; } public getId(): string { - return `stackframe:${this.thread.getId()}:${this.frameId}`; + return `stackframe:${this.thread.getId()}:${this.frameId}:${this.index}`; } public getScopes(): TPromise { @@ -462,7 +463,7 @@ export class Thread implements IThread { this.stoppedDetails.totalFrames = response.body.totalFrames; } - return response.body.stackFrames.map((rsf, level) => { + return response.body.stackFrames.map((rsf, index) => { let source = new Source(rsf.source, rsf.source ? rsf.source.presentationHint : rsf.presentationHint); if (this.process.sources.has(source.uri.toString())) { const alreadyCreatedSource = this.process.sources.get(source.uri.toString()); @@ -477,7 +478,7 @@ export class Thread implements IThread { rsf.column, rsf.endLine, rsf.endColumn - )); + ), startFrame + index); }); }, (err: Error) => { if (this.stoppedDetails) { From 9a3e322cd5b626dbfe7f841c6b78b9301b53b4de Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 1 Jun 2017 15:43:57 +0200 Subject: [PATCH 1455/2747] Move accessibility help up to workbench (#27833) --- src/vs/workbench/electron-browser/workbench.main.ts | 1 - src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts | 1 + .../parts/codeEditor/electron-browser}/accessibility.css | 0 .../parts/codeEditor/electron-browser}/accessibility.ts | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename src/vs/{editor/contrib/accessibility/browser => workbench/parts/codeEditor/electron-browser}/accessibility.css (100%) rename src/vs/{editor/contrib/accessibility/browser => workbench/parts/codeEditor/electron-browser}/accessibility.ts (100%) diff --git a/src/vs/workbench/electron-browser/workbench.main.ts b/src/vs/workbench/electron-browser/workbench.main.ts index 0d6c2c4aa0c22..a8fee7959d001 100644 --- a/src/vs/workbench/electron-browser/workbench.main.ts +++ b/src/vs/workbench/electron-browser/workbench.main.ts @@ -10,7 +10,6 @@ import 'vs/base/common/strings'; import 'vs/base/common/errors'; // Editor -import 'vs/editor/contrib/accessibility/browser/accessibility'; import 'vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes'; import 'vs/editor/contrib/selectionClipboard/electron-browser/selectionClipboard'; import 'vs/editor/browser/editor.all'; diff --git a/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts b/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts index e209510c69442..f8b57c7352d11 100644 --- a/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts +++ b/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts @@ -3,6 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import './electron-browser/accessibility'; import './electron-browser/toggleMultiCursorModifier'; import './electron-browser/toggleRenderControlCharacter'; import './electron-browser/toggleRenderWhitespace'; diff --git a/src/vs/editor/contrib/accessibility/browser/accessibility.css b/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.css similarity index 100% rename from src/vs/editor/contrib/accessibility/browser/accessibility.css rename to src/vs/workbench/parts/codeEditor/electron-browser/accessibility.css diff --git a/src/vs/editor/contrib/accessibility/browser/accessibility.ts b/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts similarity index 100% rename from src/vs/editor/contrib/accessibility/browser/accessibility.ts rename to src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts From 989a015e45a4871fb91bf7f23248ed7a77394efd Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 1 Jun 2017 16:02:34 +0200 Subject: [PATCH 1456/2747] Add possibility to turn on `editor.accessibilityOptions` from Alt+F1 (#27833) --- .../electron-browser/accessibility.ts | 52 ++++++++++++++++--- 1 file changed, 45 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts b/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts index b72127b43baeb..c155e0cb65600 100644 --- a/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts +++ b/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts @@ -10,7 +10,7 @@ import * as nls from 'vs/nls'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { Disposable } from 'vs/base/common/lifecycle'; import * as strings from 'vs/base/common/strings'; -import { clearNode } from 'vs/base/browser/dom'; +import * as dom from 'vs/base/browser/dom'; import { renderHtml } from 'vs/base/browser/htmlContentRenderer'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; import { Widget } from 'vs/base/browser/ui/widget'; @@ -28,6 +28,8 @@ import { editorWidgetBackground, widgetShadow, contrastBorder } from 'vs/platfor import { IConfigurationService } from "vs/platform/configuration/common/configuration"; import * as editorOptions from 'vs/editor/common/config/editorOptions'; import * as platform from 'vs/base/common/platform'; +import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; +import { alert } from 'vs/base/browser/ui/aria/aria'; const CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE = new RawContextKey('accessibilityHelpWidgetVisible', false); @@ -47,12 +49,13 @@ class AccessibilityHelpController extends Disposable implements IEditorContribut editor: ICodeEditor, @IContextKeyService contextKeyService: IContextKeyService, @IKeybindingService keybindingService: IKeybindingService, - @IConfigurationService configurationService: IConfigurationService + @IConfigurationService configurationService: IConfigurationService, + @IConfigurationEditingService configurationEditingService: IConfigurationEditingService ) { super(); this._editor = editor; - this._widget = this._register(new AccessibilityHelpWidget(this._editor, contextKeyService, keybindingService, configurationService)); + this._widget = this._register(new AccessibilityHelpWidget(this._editor, contextKeyService, keybindingService, configurationService, configurationEditingService)); } public getId(): string { @@ -77,16 +80,24 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { private _editor: ICodeEditor; private _keybindingService: IKeybindingService; private _configurationService: IConfigurationService; + private _configurationEditingService: IConfigurationEditingService; private _domNode: FastDomNode; private _isVisible: boolean; private _isVisibleKey: IContextKey; - constructor(editor: ICodeEditor, contextKeyService: IContextKeyService, keybindingService: IKeybindingService, configurationService: IConfigurationService) { + constructor( + editor: ICodeEditor, + contextKeyService: IContextKeyService, + keybindingService: IKeybindingService, + configurationService: IConfigurationService, + configurationEditingService: IConfigurationEditingService + ) { super(); this._editor = editor; this._keybindingService = keybindingService; this._configurationService = configurationService; + this._configurationEditingService = configurationEditingService; this._isVisibleKey = CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE.bindTo(contextKeyService); this._domNode = createFastDomNode(document.createElement('div')); @@ -103,6 +114,25 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { this._layout(); } })); + + // Intentionally not configurable! + this._register(dom.addStandardDisposableListener(this._domNode.domNode, 'keydown', (e) => { + if (!this._isVisible) { + return; + } + if (e.equals(KeyMod.CtrlCmd | KeyCode.KEY_E)) { + alert(nls.localize('emergencyConfOn', "Now changing the setting `editor.accessibilitySupport` to 'on'.")); + + this._configurationEditingService.writeConfiguration(ConfigurationTarget.USER, { + key: 'editor.accessibilitySupport', + value: 'on' + }); + + e.preventDefault(); + e.stopPropagation(); + } + })); + this.onblur(this._domNode.domNode, () => { this.hide(); }); @@ -160,6 +190,12 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { const configuredValue = this._configurationService.getConfiguration('editor').accessibilitySupport; const actualValue = opts.accessibilitySupport; + const emergencyTurnOnMessage = ( + platform.isMacintosh + ? nls.localize('changeConfigToOnMac', "To configure the editor to be permanently optimized for usage with a Screen Reader press Command+E now.") + : nls.localize('changeConfigToOnWinLinux', "To configure the editor to be permanently optimized for usage with a Screen Reader press Control+E now.") + ); + switch (configuredValue) { case 'auto': switch (actualValue) { @@ -172,6 +208,7 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { break; case platform.AccessibilitySupport.Disabled: text += '\n\n - ' + nls.localize('auto_off', "The editor is configured to automatically detect when a Screen Reader is attached, which is not the case at this time."); + text += ' ' + emergencyTurnOnMessage; break; } break; @@ -179,7 +216,8 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { text += '\n\n - ' + nls.localize('configuredOn', "The editor is configured to be permanently optimized for usage with a Screen Reader - you can change this by editing the setting `editor.accessibilitySupport`."); break; case 'off': - text += '\n\n - ' + nls.localize('configuredOff', "The editor is configured to never be optimized for usage with a Screen Reader - you can change this by editing the setting `editor.accessibilitySupport`."); + text += '\n\n - ' + nls.localize('configuredOff', "The editor is configured to never be optimized for usage with a Screen Reader."); + text += ' ' + emergencyTurnOnMessage; break; } @@ -194,7 +232,7 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { text += '\n\n - ' + this._descriptionForCommand(ToggleTabFocusModeAction.ID, NLS_TAB_FOCUS_MODE_OFF, NLS_TAB_FOCUS_MODE_OFF_NO_KB); } - text += '\n\n' + nls.localize('outroMsg', "You can dismiss this tooltip and return to the editor by pressing Escape or Shift-Escape."); + text += '\n\n' + nls.localize('outroMsg', "You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."); this._domNode.domNode.appendChild(renderHtml({ formattedText: text @@ -210,7 +248,7 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { this._domNode.setDisplay('none'); this._domNode.setAttribute('aria-hidden', 'true'); this._domNode.domNode.tabIndex = -1; - clearNode(this._domNode.domNode); + dom.clearNode(this._domNode.domNode); this._editor.focus(); } From 5348835ecbee9c8d1582493c3070f20c1b78cee2 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 1 Jun 2017 16:05:38 +0200 Subject: [PATCH 1457/2747] Fixes #27699 --- src/vs/workbench/browser/parts/editor/media/editorstatus.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/parts/editor/media/editorstatus.css b/src/vs/workbench/browser/parts/editor/media/editorstatus.css index b7ff137ac26ac..b4fd4bdd7d21f 100644 --- a/src/vs/workbench/browser/parts/editor/media/editorstatus.css +++ b/src/vs/workbench/browser/parts/editor/media/editorstatus.css @@ -20,5 +20,5 @@ .monaco-workbench .editor-statusbar-item > .editor-status-metadata, .monaco-workbench > .part.statusbar > .statusbar-item > .editor-statusbar-item > a.editor-status-screenreadermode { - cursor: default; + cursor: default !important; } From b00746468d6965c70b87037b2a2f24fe9aa1c3dc Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 1 Jun 2017 16:16:32 +0200 Subject: [PATCH 1458/2747] fix compile errors because who needs them --- .../workbench/parts/debug/test/common/debugViewModel.test.ts | 2 +- src/vs/workbench/parts/debug/test/node/debugModel.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/debug/test/common/debugViewModel.test.ts b/src/vs/workbench/parts/debug/test/common/debugViewModel.test.ts index 872818bd72757..4832d5ca8426a 100644 --- a/src/vs/workbench/parts/debug/test/common/debugViewModel.test.ts +++ b/src/vs/workbench/parts/debug/test/common/debugViewModel.test.ts @@ -25,7 +25,7 @@ suite('Debug - View Model', () => { const mockSession = new MockSession(); const process = new Process({ name: 'mockProcess', type: 'node', request: 'launch' }, mockSession); const thread = new Thread(process, 'myThread', 1); - const frame = new StackFrame(thread, 1, null, 'app.js', { startColumn: 1, startLineNumber: 1, endColumn: undefined, endLineNumber: undefined }); + const frame = new StackFrame(thread, 1, null, 'app.js', { startColumn: 1, startLineNumber: 1, endColumn: undefined, endLineNumber: undefined }, 0); model.setFocusedStackFrame(frame, process); assert.equal(model.focusedStackFrame.getId(), frame.getId()); diff --git a/src/vs/workbench/parts/debug/test/node/debugModel.test.ts b/src/vs/workbench/parts/debug/test/node/debugModel.test.ts index da310a4f6225f..cda10c59ea965 100644 --- a/src/vs/workbench/parts/debug/test/node/debugModel.test.ts +++ b/src/vs/workbench/parts/debug/test/node/debugModel.test.ts @@ -304,7 +304,7 @@ suite('Debug - Model', () => { assert.equal(model.getWatchExpressions().length, 0); const process = new Process({ name: 'mockProcess', type: 'node', request: 'launch' }, rawSession); const thread = new Thread(process, 'mockthread', 1); - const stackFrame = new StackFrame(thread, 1, null, 'app.js', { startLineNumber: 1, startColumn: 1, endLineNumber: undefined, endColumn: undefined }); + const stackFrame = new StackFrame(thread, 1, null, 'app.js', { startLineNumber: 1, startColumn: 1, endLineNumber: undefined, endColumn: undefined }, 0); model.addWatchExpression(process, stackFrame, 'console').done(); model.addWatchExpression(process, stackFrame, 'console').done(); let watchExpressions = model.getWatchExpressions(); @@ -332,7 +332,7 @@ suite('Debug - Model', () => { assert.equal(model.getReplElements().length, 0); const process = new Process({ name: 'mockProcess', type: 'node', request: 'launch' }, rawSession); const thread = new Thread(process, 'mockthread', 1); - const stackFrame = new StackFrame(thread, 1, null, 'app.js', { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 10 }); + const stackFrame = new StackFrame(thread, 1, null, 'app.js', { startLineNumber: 1, startColumn: 1, endLineNumber: 1, endColumn: 10 }, 1); model.addReplExpression(process, stackFrame, 'myVariable').done(); model.addReplExpression(process, stackFrame, 'myVariable').done(); model.addReplExpression(process, stackFrame, 'myVariable').done(); From c0ba6ba60b5bd050c67601cc539fadfcbb30fbec Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 1 Jun 2017 07:26:09 -0700 Subject: [PATCH 1459/2747] Fixes #27773 --- extensions/emmet/src/extension.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/emmet/src/extension.ts b/extensions/emmet/src/extension.ts index 2fb79bdadd37b..620df18dc323e 100644 --- a/extensions/emmet/src/extension.ts +++ b/extensions/emmet/src/extension.ts @@ -43,7 +43,7 @@ export function activate(context: vscode.ExtensionContext) { let completionProvider = new EmmetCompletionItemProvider(); for (let language of SUPPORTED_LANGUAGE_MODES) { - const selector: vscode.DocumentFilter = { language: language.id, scheme: 'file' }; + const selector: vscode.DocumentFilter = { language: language.id }; const provider = vscode.languages.registerCompletionItemProvider(selector, completionProvider, ...language.triggerCharacters); context.subscriptions.push(provider); From caaaed37bd682f14771222def96488ec09a66b63 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 1 Jun 2017 16:37:47 +0200 Subject: [PATCH 1460/2747] Test failures in decorationRenderOptions.test (for #27790) --- src/vs/editor/browser/services/codeEditorServiceImpl.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index 10a48dacbe3c0..eaf57c98d5dea 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -347,6 +347,7 @@ class DecorationCSSRules { if (this.collectCSSText(opts, ['outline', 'outlineColor'], cssTextArr)) { this.collectCSSText(opts, ['outlineStyle', 'outlineWidth'], cssTextArr); } + this.collectBorderSettingsCSSText(opts, cssTextArr); return cssTextArr.join(''); } From 1d61c56f0fa60004a127919fc40025623140bf9f Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 1 Jun 2017 17:00:06 +0200 Subject: [PATCH 1461/2747] add phases to lifecycle service, #27852 --- src/vs/platform/lifecycle/common/lifecycle.ts | 23 +++++++++++++----- src/vs/workbench/electron-browser/shell.ts | 8 +++++-- .../electron-browser/lifecycleService.ts | 24 ++++++++++++++----- .../textfile/common/textFileEditorModel.ts | 4 ++-- .../workbench/test/workbenchTestServices.ts | 11 +++++---- 5 files changed, 50 insertions(+), 20 deletions(-) diff --git a/src/vs/platform/lifecycle/common/lifecycle.ts b/src/vs/platform/lifecycle/common/lifecycle.ts index 1cd1ab93cea11..c3ff228ae9b35 100644 --- a/src/vs/platform/lifecycle/common/lifecycle.ts +++ b/src/vs/platform/lifecycle/common/lifecycle.ts @@ -44,6 +44,12 @@ export enum StartupKind { ReopenedWindow = 4, } +export enum LifecyclePhase { + Starting = 1, + Running = 2, + ShuttingDown = 3 +} + /** * A lifecycle service informs about lifecycle events of the * application, such as shutdown. @@ -58,10 +64,14 @@ export interface ILifecycleService { readonly startupKind: StartupKind; /** - * A flag indicating if the application is in the process of shutting down. This will be true - * before the onWillShutdown event is fired and false if the shutdown is being vetoed. + * A flag indicating in what phase of the lifecycle we currently are. + */ + readonly phase: LifecyclePhase; + + /** + * An event that fire when the lifecycle phase has changed */ - readonly willShutdown: boolean; + readonly onDidChangePhase: Event; /** * Fired before shutdown happens. Allows listeners to veto against the @@ -80,8 +90,9 @@ export interface ILifecycleService { export const NullLifecycleService: ILifecycleService = { _serviceBrand: null, + phase: LifecyclePhase.Running, startupKind: StartupKind.NewWindow, - willShutdown: false, - onWillShutdown: () => ({ dispose() { } }), - onShutdown: (reason) => ({ dispose() { } }) + onDidChangePhase: Event.None, + onWillShutdown: Event.None, + onShutdown: Event.None }; diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 66e974a00c7fe..4647e99bcc8c5 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -59,7 +59,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; -import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; +import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; import { IMarkerService } from 'vs/platform/markers/common/markers'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IMessageService, IChoiceService, Severity } from 'vs/platform/message/common/message'; @@ -132,7 +132,7 @@ export class WorkbenchShell { private windowIPCService: IWindowIPCService; private timerService: ITimerService; private themeService: WorkbenchThemeService; - private lifecycleService: ILifecycleService; + private lifecycleService: LifecycleService; private container: HTMLElement; private toUnbind: IDisposable[]; @@ -235,6 +235,10 @@ export class WorkbenchShell { if ((platform.isLinux || platform.isMacintosh) && process.getuid() === 0) { this.messageService.show(Severity.Warning, nls.localize('runningAsRoot', "It is recommended not to run Code as 'root'.")); } + + // Set lifecycle phase to `Runnning` so that other contributions + // can now do something + this.lifecycleService.phase = LifecyclePhase.Running; } private initServiceCollection(container: HTMLElement): [IInstantiationService, ServiceCollection] { diff --git a/src/vs/workbench/services/lifecycle/electron-browser/lifecycleService.ts b/src/vs/workbench/services/lifecycle/electron-browser/lifecycleService.ts index 3cf631de01a3d..42230c25b9477 100644 --- a/src/vs/workbench/services/lifecycle/electron-browser/lifecycleService.ts +++ b/src/vs/workbench/services/lifecycle/electron-browser/lifecycleService.ts @@ -7,7 +7,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import Severity from 'vs/base/common/severity'; import { toErrorMessage } from 'vs/base/common/errorMessage'; -import { ILifecycleService, ShutdownEvent, ShutdownReason, StartupKind } from 'vs/platform/lifecycle/common/lifecycle'; +import { ILifecycleService, ShutdownEvent, ShutdownReason, StartupKind, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; import { IMessageService } from 'vs/platform/message/common/message'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IWindowIPCService } from 'vs/workbench/services/window/electron-browser/windowService'; @@ -20,11 +20,12 @@ export class LifecycleService implements ILifecycleService { public _serviceBrand: any; + private readonly _onDidChangePhase = new Emitter(); private readonly _onWillShutdown = new Emitter(); private readonly _onShutdown = new Emitter(); private readonly _startupKind: StartupKind; - private _willShutdown: boolean; + private _phase: LifecyclePhase = LifecyclePhase.Starting; constructor( @IMessageService private _messageService: IMessageService, @@ -44,12 +45,23 @@ export class LifecycleService implements ILifecycleService { } } + public get phase(): LifecyclePhase { + return this._phase; + } + + public set phase(value: LifecyclePhase) { + if (this._phase !== value) { + this._phase = value; + this._onDidChangePhase.fire(value); + } + } + public get startupKind(): StartupKind { return this._startupKind; } - public get willShutdown(): boolean { - return this._willShutdown; + public get onDidChangePhase(): Event { + return this._onDidChangePhase.event; } public get onWillShutdown(): Event { @@ -65,14 +77,14 @@ export class LifecycleService implements ILifecycleService { // Main side indicates that window is about to unload, check for vetos ipc.on('vscode:beforeUnload', (event, reply: { okChannel: string, cancelChannel: string, reason: ShutdownReason }) => { - this._willShutdown = true; + this.phase = LifecyclePhase.ShuttingDown; this._storageService.store(LifecycleService._lastShutdownReasonKey, JSON.stringify(reply.reason), StorageScope.WORKSPACE); // trigger onWillShutdown events and veto collecting this.onBeforeUnload(reply.reason).done(veto => { if (veto) { this._storageService.remove(LifecycleService._lastShutdownReasonKey, StorageScope.WORKSPACE); - this._willShutdown = false; // reset this flag since the shutdown has been vetoed! + this.phase = LifecyclePhase.Running; // reset this flag since the shutdown has been vetoed! ipc.send(reply.cancelChannel, windowId); } else { this._onShutdown.fire(reply.reason); diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts index eb3a76b87b1b6..0f23475b17fd5 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts @@ -17,7 +17,7 @@ import paths = require('vs/base/common/paths'); import diagnostics = require('vs/base/common/diagnostics'); import types = require('vs/base/common/types'); import { IMode } from 'vs/editor/common/modes'; -import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; +import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITextFileService, IAutoSaveConfiguration, ModelState, ITextFileEditorModel, IModelSaveOptions, ISaveErrorHandler, ISaveParticipant, StateChange, SaveReason, IRawTextContent } from 'vs/workbench/services/textfile/common/textfiles'; @@ -623,7 +623,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil // We DO NOT run any save participant if we are in the shutdown phase and files are being // saved as a result of that. let saveParticipantPromise = TPromise.as(versionId); - if (TextFileEditorModel.saveParticipant && !this.lifecycleService.willShutdown) { + if (TextFileEditorModel.saveParticipant && this.lifecycleService.phase !== LifecyclePhase.ShuttingDown) { const onCompleteOrError = () => { this.blockModelContentChange = false; diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index a7f4f1ea91844..32f74fe5a2d9b 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -28,7 +28,7 @@ import { IEditorInput, IEditorOptions, Position, Direction, IEditor, IResourceIn import { IUntitledEditorService, UntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IMessageService, IConfirmation } from 'vs/platform/message/common/message'; import { IWorkspace, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { ILifecycleService, ShutdownEvent, ShutdownReason, StartupKind } from 'vs/platform/lifecycle/common/lifecycle'; +import { ILifecycleService, ShutdownEvent, ShutdownReason, StartupKind, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; import { EditorStacksModel } from 'vs/workbench/common/editor/editorStacksModel'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; @@ -857,14 +857,13 @@ export class TestLifecycleService implements ILifecycleService { public _serviceBrand: any; - public willShutdown: boolean; + public phase: LifecyclePhase; public startupKind: StartupKind; + private _onDidChangePhase = new Emitter(); private _onWillShutdown = new Emitter(); private _onShutdown = new Emitter(); - constructor() { - } public fireShutdown(reason = ShutdownReason.QUIT): void { this._onShutdown.fire(reason); @@ -874,6 +873,10 @@ export class TestLifecycleService implements ILifecycleService { this._onWillShutdown.fire(event); } + public get onDidChangePhase(): Event { + return this._onDidChangePhase.event; + } + public get onWillShutdown(): Event { return this._onWillShutdown.event; } From bec63af7ef93dbbf36159f3cffe307c1452b9a18 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 1 Jun 2017 17:21:44 +0200 Subject: [PATCH 1462/2747] startup profiler listens on lifecycle event, #27852 --- src/vs/base/common/event.ts | 11 ++++++++++- src/vs/workbench/electron-browser/shell.ts | 8 ++++---- .../electron-browser/performance.contribution.ts | 12 ++++++++++-- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/vs/base/common/event.ts b/src/vs/base/common/event.ts index a8d793e83ea47..2b68de0c2e37d 100644 --- a/src/vs/base/common/event.ts +++ b/src/vs/base/common/event.ts @@ -257,6 +257,15 @@ export function fromPromise(promise: TPromise): Event { return emitter.event; } +export function toPromise(event: Event): TPromise { + return new TPromise(complete => { + const sub = event(e => { + sub.dispose(); + complete(e); + }); + }); +} + export function delayed(promise: TPromise>): Event { let toCancel: TPromise = null; let listener: IDisposable = null; @@ -511,4 +520,4 @@ export function echo(event: Event, nextTick = false, buffer: T[] = []): Ev }); return emitter.event; -} \ No newline at end of file +} diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 4647e99bcc8c5..e0fb2e384aada 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -179,6 +179,10 @@ export class WorkbenchShell { // start cached data manager instantiationService.createInstance(NodeCachedDataManager); + + // Set lifecycle phase to `Runnning` so that other contributions + // can now do something + this.lifecycleService.phase = LifecyclePhase.Running; } }); @@ -235,10 +239,6 @@ export class WorkbenchShell { if ((platform.isLinux || platform.isMacintosh) && process.getuid() === 0) { this.messageService.show(Severity.Warning, nls.localize('runningAsRoot', "It is recommended not to run Code as 'root'.")); } - - // Set lifecycle phase to `Runnning` so that other contributions - // can now do something - this.lifecycleService.phase = LifecyclePhase.Running; } private initServiceCollection(container: HTMLElement): [IInstantiationService, ServiceCollection] { diff --git a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts index 820590107e2e0..23945bccb6128 100644 --- a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts +++ b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts @@ -10,6 +10,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IMessageService } from 'vs/platform/message/common/message'; +import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { ITimerService } from 'vs/workbench/services/timer/common/timerService'; import { IWindowsService } from 'vs/platform/windows/common/windows'; @@ -20,6 +21,7 @@ import { ReportPerformanceIssueAction } from 'vs/workbench/electron-browser/acti import { TPromise } from 'vs/base/common/winjs.base'; import { join } from 'path'; import { localize } from 'vs/nls'; +import { toPromise, filterEvent } from 'vs/base/common/event'; import { platform, Platform } from 'vs/base/common/platform'; import { readdir, stat } from 'vs/base/node/pfs'; import { release } from 'os'; @@ -149,10 +151,16 @@ class StartupProfiler implements IWorkbenchContribution { @IMessageService private readonly _messageService: IMessageService, @IEnvironmentService private readonly _environmentService: IEnvironmentService, @IInstantiationService private readonly _instantiationService: IInstantiationService, + @ILifecycleService lifecycleService: ILifecycleService, @IExtensionService extensionService: IExtensionService, ) { - - extensionService.onReady().then(() => this._stopProfiling()); + // wait for everything to be ready + TPromise.join([ + extensionService.onReady(), + toPromise(filterEvent(lifecycleService.onDidChangePhase, phase => phase === LifecyclePhase.Running)), + ]).then(() => { + this._stopProfiling(); + }); } getId(): string { From 9bd2d94c51106076c33c5796378850794b0f18ab Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 1 Jun 2017 08:48:12 -0700 Subject: [PATCH 1463/2747] Revert "Implement oncancel (fixes #27638)" This reverts commit ca923a5ee127fb35caa5025dc5948ef9ee4db6db. --- src/vs/workbench/parts/search/browser/openAnythingHandler.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts index 64c2f66afeb31..113adfd286d13 100644 --- a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts +++ b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts @@ -229,10 +229,6 @@ export class OpenAnythingHandler extends QuickOpenHandler { this.pendingSearch = null; this.messageService.show(Severity.Error, error); }); - }, () => { - resultPromises.forEach(resultPromise => { - resultPromise.cancel(); - }); }); return this.pendingSearch; From eef9baf1152868cc9faecfed59c136eed73fd476 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 1 Jun 2017 08:48:22 -0700 Subject: [PATCH 1464/2747] Revert "Update controller, simplify telemetry (#27152)" This reverts commit 66bc0d13fafadbddb5b26a3bc114bdcc29cfd39c. --- .../parts/quickopen/quickOpenController.ts | 19 +++---- .../search/browser/openAnythingHandler.ts | 52 +++++++++++-------- 2 files changed, 37 insertions(+), 34 deletions(-) diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index 32ef0a9c37a55..8c1f65535e0c9 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -774,8 +774,7 @@ export class QuickOpenController extends Component implements IQuickOpenService } // Get results - let addedGroupLabel = false; - const handleResult = (result: IModel, last = false) => { + const handleResult = (result) => { if (this.currentResultToken === currentResultToken) { // now is the time to show the input if we did not have set it before @@ -786,10 +785,10 @@ export class QuickOpenController extends Component implements IQuickOpenService // merge history and default handler results const handlerResults = (result && result.entries) || []; - addedGroupLabel = this.mergeResults(quickOpenModel, handlerResults, !addedGroupLabel ? resolvedHandler.getGroupLabel() : null, last) || addedGroupLabel; + this.mergeResults(quickOpenModel, handlerResults, resolvedHandler.getGroupLabel()); } }; - return resolvedHandler.getResults(value).then(result => handleResult(result, true), undefined, handleResult); + return resolvedHandler.getResults(value).then(handleResult, undefined, handleResult); }); } @@ -846,7 +845,7 @@ export class QuickOpenController extends Component implements IQuickOpenService return results.sort((elementA: EditorHistoryEntry, elementB: EditorHistoryEntry) => QuickOpenEntry.compare(elementA, elementB, normalizedSearchValue)); } - private mergeResults(quickOpenModel: QuickOpenModel, handlerResults: QuickOpenEntry[], groupLabel: string, last: boolean): boolean { + private mergeResults(quickOpenModel: QuickOpenModel, handlerResults: QuickOpenEntry[], groupLabel: string): void { // Remove results already showing by checking for a "resource" property const mapEntryToResource = this.mapEntriesToResource(quickOpenModel); @@ -863,21 +862,17 @@ export class QuickOpenController extends Component implements IQuickOpenService // Show additional handler results below any existing results if (additionalHandlerResults.length > 0) { const autoFocusFirstEntry = (quickOpenModel.getEntries().length === 0); // the user might have selected another entry meanwhile in local history (see https://github.com/Microsoft/vscode/issues/20828) - if (groupLabel) { - const useTopBorder = quickOpenModel.getEntries().length > 0; - additionalHandlerResults[0] = new QuickOpenEntryGroup(additionalHandlerResults[0], groupLabel, useTopBorder); - } + const useTopBorder = quickOpenModel.getEntries().length > 0; + additionalHandlerResults[0] = new QuickOpenEntryGroup(additionalHandlerResults[0], groupLabel, useTopBorder); quickOpenModel.addEntries(additionalHandlerResults); this.quickOpenWidget.refresh(quickOpenModel, { autoFocusFirstEntry }); - return !!groupLabel; } // Otherwise if no results are present (even from histoy) indicate this to the user - else if (quickOpenModel.getEntries().length === 0 && last) { + else if (quickOpenModel.getEntries().length === 0) { quickOpenModel.addEntries([new PlaceholderQuickOpenEntry(nls.localize('noResultsFound1', "No results found"))]); this.quickOpenWidget.refresh(quickOpenModel, { autoFocusFirstEntry: true }); } - return false; } private handleSpecificHandler(handlerDescriptor: QuickOpenHandlerDescriptor, value: string, currentResultToken: string): TPromise { diff --git a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts index 113adfd286d13..7ac06c931f6db 100644 --- a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts +++ b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts @@ -168,7 +168,8 @@ export class OpenAnythingHandler extends QuickOpenHandler { resultPromises.push(this.openSymbolHandler.getResults(searchValue)); } - const handleResult = (result: QuickOpenModel | FileQuickOpenModel) => { + // Join and sort unified + const handleResults = (results: (QuickOpenModel | FileQuickOpenModel)[]) => { this.pendingSearch = null; // If the quick open widget has been closed meanwhile, ignore the result @@ -176,13 +177,16 @@ export class OpenAnythingHandler extends QuickOpenHandler { return new QuickOpenModel(); } - const entries = result.entries; + // Combine file results and symbol results (if any) + const mergedResults: QuickOpenEntry[] = results.reduce((entries: QuickOpenEntry[], model: QuickOpenModel) => { + return entries.concat(model.entries); + }, []); // Sort const unsortedResultTime = Date.now(); const normalizedSearchValue = strings.stripWildcards(searchValue).toLowerCase(); const compare = (elementA: QuickOpenEntry, elementB: QuickOpenEntry) => QuickOpenEntry.compareByScore(elementA, elementB, searchValue, normalizedSearchValue, this.scorerCache); - const viewResults = arrays.top(entries, compare, OpenAnythingHandler.MAX_DISPLAYED_RESULTS); + const viewResults = arrays.top(mergedResults, compare, OpenAnythingHandler.MAX_DISPLAYED_RESULTS); const sortedResultTime = Date.now(); // Apply range and highlights to file entries @@ -195,34 +199,38 @@ export class OpenAnythingHandler extends QuickOpenHandler { } }); - // Telemetry - if (result instanceof FileQuickOpenModel) { - const fileSearchStats = (result).stats; - const duration = new Date().getTime() - startTime; - const data = this.createTimerEventData(startTime, { - searchLength: searchValue.length, - unsortedResultTime, - sortedResultTime, - resultCount: entries.length, - symbols: { fromCache: false }, - files: fileSearchStats - }); - - this.telemetryService.publicLog('openAnything', objects.assign(data, { duration })); + let fileSearchStats: ISearchStats; + for (const result of results) { + if (result instanceof FileQuickOpenModel) { + fileSearchStats = (result).stats; + break; + } } + const duration = new Date().getTime() - startTime; + const data = this.createTimerEventData(startTime, { + searchLength: searchValue.length, + unsortedResultTime, + sortedResultTime, + resultCount: mergedResults.length, + symbols: { fromCache: false }, + files: fileSearchStats + }); + + this.telemetryService.publicLog('openAnything', objects.assign(data, { duration })); + return new QuickOpenModel(viewResults); }; this.pendingSearch = new PPromise((complete, error, progress) => { // When any of the result promises return, forward the result as progress. - const processed = resultPromises.map(resultPromise => + resultPromises.map(resultPromise => { resultPromise.then(result => { - progress(handleResult(result)); - }) - ); + progress(handleResults([result])); + }); + }); // Complete the promise when all promises have completed. - TPromise.join(processed).then(() => { + TPromise.join(resultPromises).then(() => { // We already sent the results via progress. complete(new QuickOpenModel()); }, error => { From 6d54161153df8a9f993805c047ef3a3dff7f74c6 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 1 Jun 2017 08:48:29 -0700 Subject: [PATCH 1465/2747] Revert "Handle progress results in quick open controller (#27152)" This reverts commit dfd358082f4f03d6439e65fb130eb77988ad53ef. --- .../parts/quickopen/quickOpenController.ts | 5 +- src/vs/workbench/browser/quickopen.ts | 4 +- .../search/browser/openAnythingHandler.ts | 47 +++++++------------ 3 files changed, 20 insertions(+), 36 deletions(-) diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index 8c1f65535e0c9..7c8a7df4a140c 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -774,7 +774,7 @@ export class QuickOpenController extends Component implements IQuickOpenService } // Get results - const handleResult = (result) => { + return resolvedHandler.getResults(value).then(result => { if (this.currentResultToken === currentResultToken) { // now is the time to show the input if we did not have set it before @@ -787,8 +787,7 @@ export class QuickOpenController extends Component implements IQuickOpenService const handlerResults = (result && result.entries) || []; this.mergeResults(quickOpenModel, handlerResults, resolvedHandler.getGroupLabel()); } - }; - return resolvedHandler.getResults(value).then(handleResult, undefined, handleResult); + }); }); } diff --git a/src/vs/workbench/browser/quickopen.ts b/src/vs/workbench/browser/quickopen.ts index 551ffbd9808b5..ebb31e7a83392 100644 --- a/src/vs/workbench/browser/quickopen.ts +++ b/src/vs/workbench/browser/quickopen.ts @@ -5,7 +5,7 @@ 'use strict'; import nls = require('vs/nls'); -import { PPromise, TPromise } from 'vs/base/common/winjs.base'; +import { TPromise } from 'vs/base/common/winjs.base'; import * as objects from 'vs/base/common/objects'; import filters = require('vs/base/common/filters'); import arrays = require('vs/base/common/arrays'); @@ -34,7 +34,7 @@ export class QuickOpenHandler { * As such, returning the same model instance across multiple searches will yield best * results in terms of performance when many items are shown. */ - public getResults(searchValue: string): PPromise, IModel> { + public getResults(searchValue: string): TPromise> { return TPromise.as(null); } diff --git a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts index 7ac06c931f6db..cc77586caa21f 100644 --- a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts +++ b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts @@ -7,7 +7,7 @@ import * as arrays from 'vs/base/common/arrays'; import * as objects from 'vs/base/common/objects'; -import { PPromise, TPromise } from 'vs/base/common/winjs.base'; +import { TPromise } from 'vs/base/common/winjs.base'; import nls = require('vs/nls'); import { ThrottledDelayer } from 'vs/base/common/async'; import types = require('vs/base/common/types'); @@ -91,7 +91,7 @@ export class OpenAnythingHandler extends QuickOpenHandler { private openSymbolHandler: OpenSymbolHandler; private openFileHandler: OpenFileHandler; private searchDelayer: ThrottledDelayer; - private pendingSearch: PPromise; + private pendingSearch: TPromise; private isClosed: boolean; private scorerCache: { [key: string]: number }; private includeSymbols: boolean; @@ -135,7 +135,7 @@ export class OpenAnythingHandler extends QuickOpenHandler { }); } - public getResults(searchValue: string): PPromise { + public getResults(searchValue: string): TPromise { const startTime = Date.now(); this.cancelPendingSearch(); @@ -166,21 +166,21 @@ export class OpenAnythingHandler extends QuickOpenHandler { // Symbol Results (unless disabled or a range or absolute path is specified) if (this.includeSymbols && !searchWithRange) { resultPromises.push(this.openSymbolHandler.getResults(searchValue)); + } else { + resultPromises.push(TPromise.as(new QuickOpenModel())); // We need this empty promise because we are using the throttler below! } // Join and sort unified - const handleResults = (results: (QuickOpenModel | FileQuickOpenModel)[]) => { + this.pendingSearch = TPromise.join(resultPromises).then(results => { this.pendingSearch = null; // If the quick open widget has been closed meanwhile, ignore the result if (this.isClosed) { - return new QuickOpenModel(); + return TPromise.as(new QuickOpenModel()); } // Combine file results and symbol results (if any) - const mergedResults: QuickOpenEntry[] = results.reduce((entries: QuickOpenEntry[], model: QuickOpenModel) => { - return entries.concat(model.entries); - }, []); + const mergedResults = [...results[0].entries, ...results[1].entries]; // Sort const unsortedResultTime = Date.now(); @@ -200,11 +200,10 @@ export class OpenAnythingHandler extends QuickOpenHandler { }); let fileSearchStats: ISearchStats; - for (const result of results) { - if (result instanceof FileQuickOpenModel) { - fileSearchStats = (result).stats; - break; - } + if (results[0] instanceof FileQuickOpenModel) { + fileSearchStats = (results[0]).stats; + } else if (results[1] instanceof FileQuickOpenModel) { + fileSearchStats = (results[1]).stats; } const duration = new Date().getTime() - startTime; @@ -219,24 +218,10 @@ export class OpenAnythingHandler extends QuickOpenHandler { this.telemetryService.publicLog('openAnything', objects.assign(data, { duration })); - return new QuickOpenModel(viewResults); - }; - - this.pendingSearch = new PPromise((complete, error, progress) => { - // When any of the result promises return, forward the result as progress. - resultPromises.map(resultPromise => { - resultPromise.then(result => { - progress(handleResults([result])); - }); - }); - // Complete the promise when all promises have completed. - TPromise.join(resultPromises).then(() => { - // We already sent the results via progress. - complete(new QuickOpenModel()); - }, error => { - this.pendingSearch = null; - this.messageService.show(Severity.Error, error); - }); + return TPromise.as(new QuickOpenModel(viewResults)); + }, (error: Error) => { + this.pendingSearch = null; + this.messageService.show(Severity.Error, error); }); return this.pendingSearch; From 529495d64b7c22430e8ca6156a8a4fd6946183a6 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 1 Jun 2017 09:28:35 -0700 Subject: [PATCH 1466/2747] Tools and languages label too long (fixes #27510) --- .../parts/welcome/page/electron-browser/welcomePage.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 2c0dda61a4119..9740e44f97e3a 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -303,7 +303,8 @@ class WelcomePage { list.appendChild(a); const span = document.createElement('span'); - span.innerText = localize('welcomePage.installedExtension', "{0} (installed)", extension.name); + span.innerText = extension.name; + span.title = localize('welcomePage.installedExtension', "{0} support is already installed", extension.name); span.classList.add('enabledExtension'); span.setAttribute('data-extension', extension.id); list.appendChild(span); @@ -342,7 +343,7 @@ class WelcomePage { if (!extension) { return false; } - return this.extensionManagementService.installFromGallery(extension) + return this.extensionManagementService.installFromGallery(extension, false) .then(() => { // TODO: Do this as part of the install to avoid multiple events. return this.extensionEnablementService.setEnablement(extensionSuggestion.id, false); From 90bfb284fa032943f0823f90c360529c77e1e214 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 1 Jun 2017 10:10:25 -0700 Subject: [PATCH 1467/2747] Fix more chars in terminal dnd Fixes #27511 --- .../parts/terminal/electron-browser/terminalPanel.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index c9a9c9a57a146..51ddb07c92b88 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -301,7 +301,9 @@ export class TerminalPanel extends Panel { return path; } path = path.replace(/(%5C|\\)/g, '\\\\'); - const charsToEscape = [' ', '\'', '"', '?', ':', ';']; + const charsToEscape = [ + ' ', '\'', '"', '?', ':', ';', '!', '*', '(', ')', '{', '}', '[', ']' + ]; for (let i = 0; i < path.length; i++) { const indexOfChar = charsToEscape.indexOf(path.charAt(i)); if (indexOfChar >= 0) { From c43cc5f0eb12f2bdcf86351b6fdfaa2ebecfda9e Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 1 Jun 2017 10:10:47 -0700 Subject: [PATCH 1468/2747] Use outlines in high contrast (#27580) --- extensions/merge-conflict/src/mergeDecorator.ts | 9 +++++++++ src/vs/platform/theme/common/colorRegistry.ts | 14 ++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts index 1b419908847af..d30863eca9ae9 100644 --- a/extensions/merge-conflict/src/mergeDecorator.ts +++ b/extensions/merge-conflict/src/mergeDecorator.ts @@ -80,6 +80,9 @@ export default class MergeDectorator implements vscode.Disposable { isWholeLine: this.decorationUsesWholeLine, backgroundColor: new vscode.ThemeColor('merge.currentHeaderBackground'), color: new vscode.ThemeColor('editor.foreground'), + outlineStyle: 'solid', + outlineWidth: '1pt', + outlineColor: new vscode.ThemeColor('merge.border'), after: { contentText: ' ' + localize('currentChange', '(Current change)'), color: new vscode.ThemeColor('descriptionForeground') @@ -88,12 +91,18 @@ export default class MergeDectorator implements vscode.Disposable { this.decorations['splitter'] = vscode.window.createTextEditorDecorationType({ color: new vscode.ThemeColor('editor.foreground'), + outlineStyle: 'solid', + outlineWidth: '1pt', + outlineColor: new vscode.ThemeColor('merge.border'), isWholeLine: this.decorationUsesWholeLine, }); this.decorations['incoming.header'] = vscode.window.createTextEditorDecorationType({ backgroundColor: new vscode.ThemeColor('merge.incomingHeaderBackground'), color: new vscode.ThemeColor('editor.foreground'), + outlineStyle: 'solid', + outlineWidth: '1pt', + outlineColor: new vscode.ThemeColor('merge.border'), isWholeLine: this.decorationUsesWholeLine, after: { contentText: ' ' + localize('incomingChange', '(Incoming change)'), diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index ce0e3fd190ba1..d790e964b0cf8 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -264,13 +264,15 @@ const incomingBaseColor = Color.fromHex('#40A6FF').transparent(headerTransparenc const contentTransparency = 0.4; const rulerTransparency = 1; -export const mergeCurrentHeaderBackground = registerColor('merge.currentHeaderBackground', { dark: currentBaseColor, light: currentBaseColor, hc: currentBaseColor }, nls.localize('mergeCurrentHeaderBackground', 'Current header background in inline merge-conflict.')); -export const mergeCurrentContentBackground = registerColor('merge.currentContentBackground', { dark: transparent(mergeCurrentHeaderBackground, contentTransparency), light: transparent(mergeCurrentHeaderBackground, contentTransparency), hc: transparent(mergeCurrentHeaderBackground, contentTransparency) }, nls.localize('mergeCurrentContentBackground', 'Current content background in inline merge-conflict.')); -export const mergeIncomingHeaderBackground = registerColor('merge.incomingHeaderBackground', { dark: incomingBaseColor, light: incomingBaseColor, hc: incomingBaseColor }, nls.localize('mergeIncomingHeaderBackground', 'Incoming header background in inline merge-conflict.')); -export const mergeIncomingContentBackground = registerColor('merge.incomingContentBackground', { dark: transparent(mergeIncomingHeaderBackground, contentTransparency), light: transparent(mergeIncomingHeaderBackground, contentTransparency), hc: transparent(mergeIncomingHeaderBackground, contentTransparency) }, nls.localize('mergeIncomingContentBackground', 'Incoming content background in inline merge-conflict.')); +export const mergeCurrentHeaderBackground = registerColor('merge.currentHeaderBackground', { dark: currentBaseColor, light: currentBaseColor, hc: null }, nls.localize('mergeCurrentHeaderBackground', 'Current header background in inline merge-conflicts.')); +export const mergeCurrentContentBackground = registerColor('merge.currentContentBackground', { dark: transparent(mergeCurrentHeaderBackground, contentTransparency), light: transparent(mergeCurrentHeaderBackground, contentTransparency), hc: transparent(mergeCurrentHeaderBackground, contentTransparency) }, nls.localize('mergeCurrentContentBackground', 'Current content background in inline merge-conflicts.')); +export const mergeIncomingHeaderBackground = registerColor('merge.incomingHeaderBackground', { dark: incomingBaseColor, light: incomingBaseColor, hc: null }, nls.localize('mergeIncomingHeaderBackground', 'Incoming header background in inline merge-conflicts.')); +export const mergeIncomingContentBackground = registerColor('merge.incomingContentBackground', { dark: transparent(mergeIncomingHeaderBackground, contentTransparency), light: transparent(mergeIncomingHeaderBackground, contentTransparency), hc: transparent(mergeIncomingHeaderBackground, contentTransparency) }, nls.localize('mergeIncomingContentBackground', 'Incoming content background in inline merge-conflicts.')); -export const overviewRulerCurrentContentForeground = registerColor('editorOverviewRuler.currentContentForeground', { dark: transparent(mergeCurrentHeaderBackground, rulerTransparency), light: transparent(mergeCurrentHeaderBackground, rulerTransparency), hc: transparent(mergeCurrentHeaderBackground, rulerTransparency) }, nls.localize('overviewRulerCurrentContentForeground', 'Current overview ruler foreground for inline merge-conflict.')); -export const overviewRulerIncomingContentForeground = registerColor('editorOverviewRuler.incomingContentForeground', { dark: transparent(mergeIncomingHeaderBackground, rulerTransparency), light: transparent(mergeIncomingHeaderBackground, rulerTransparency), hc: transparent(mergeIncomingHeaderBackground, rulerTransparency) }, nls.localize('overviewRulerIncomingContentForeground', 'Incoming overview ruler foreground for inline merge-conflict.')); +export const mergeBorder = registerColor('merge.border', { dark: null, light: null, hc: '#C3DF6F' }, nls.localize('mergeBorder', 'Border color on headers and the splitter in inline merge-conflicts.')); + +export const overviewRulerCurrentContentForeground = registerColor('editorOverviewRuler.currentContentForeground', { dark: transparent(mergeCurrentHeaderBackground, rulerTransparency), light: transparent(mergeCurrentHeaderBackground, rulerTransparency), hc: mergeBorder }, nls.localize('overviewRulerCurrentContentForeground', 'Current overview ruler foreground for inline merge-conflicts.')); +export const overviewRulerIncomingContentForeground = registerColor('editorOverviewRuler.incomingContentForeground', { dark: transparent(mergeIncomingHeaderBackground, rulerTransparency), light: transparent(mergeIncomingHeaderBackground, rulerTransparency), hc: mergeBorder }, nls.localize('overviewRulerIncomingContentForeground', 'Incoming overview ruler foreground for inline merge-conflicts.')); // ----- color functions From 089bd8980b70d035ffce267c823fbdb4484f50e8 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 1 Jun 2017 19:05:14 +0200 Subject: [PATCH 1469/2747] Revert "theming - remove panel.background as we currently do not support it end to end" This reverts commit 3c1f7878b2d3114483d09c5ee8490d3cf27ec0b2. --- extensions/theme-abyss/themes/abyss-color-theme.json | 1 + .../theme-quietlight/themes/quietlight-color-theme.json | 1 + .../themes/solarized-dark-color-theme.json | 1 + .../themes/solarized-light-color-theme.json | 1 + src/vs/workbench/browser/parts/panel/panelPart.ts | 6 +++--- src/vs/workbench/common/theme.ts | 6 ++++++ 6 files changed, 13 insertions(+), 3 deletions(-) diff --git a/extensions/theme-abyss/themes/abyss-color-theme.json b/extensions/theme-abyss/themes/abyss-color-theme.json index 5b2c2e1e546a3..9901ee0d6b862 100644 --- a/extensions/theme-abyss/themes/abyss-color-theme.json +++ b/extensions/theme-abyss/themes/abyss-color-theme.json @@ -375,6 +375,7 @@ // "activityBar.dropBackground": "", // Workbench: Panel + // "panel.background": "", "panel.border": "#2b2b4a", // "panelTitle.activeBorder": "", // "panelTitle.activeForeground": "", diff --git a/extensions/theme-quietlight/themes/quietlight-color-theme.json b/extensions/theme-quietlight/themes/quietlight-color-theme.json index 5ab654716a7c2..e1d9201c6d7f3 100644 --- a/extensions/theme-quietlight/themes/quietlight-color-theme.json +++ b/extensions/theme-quietlight/themes/quietlight-color-theme.json @@ -466,6 +466,7 @@ "editorWhitespace.foreground": "#AAAAAA", "editor.lineHighlightBackground": "#E4F6D4", "editor.selectionBackground": "#C9D0D9", + "panel.background": "#F5F5F5", "sideBar.background": "#F2F2F2", "sideBarSectionHeader.background": "#ede8ef", "editorLineNumber.foreground": "#9DA39A", diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index 542de82d4c83e..04967aae331c3 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -423,6 +423,7 @@ // "activityBarBadge.foreground": "", // Workbench: Panel + // "panel.background": "", "panel.border": "#2b2b4a", // "panelTitle.activeBorder": "", // "panelTitle.activeForeground": "", diff --git a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json index cd42bbaa859ed..ba74b7d038599 100644 --- a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -421,6 +421,7 @@ // "activityBarBadge.foreground": "", // Workbench: Panel + // "panel.background": "", "panel.border": "#DDD6C1", // "panelTitle.activeBorder": "", // "panelTitle.activeForeground": "", diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index 1a8f0cf4529bf..8ad40e000be39 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -25,8 +25,8 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { ActionsOrientation, ActionBar } from 'vs/base/browser/ui/actionbar/actionbar'; import { ClosePanelAction, PanelAction, ToggleMaximizedPanelAction } from 'vs/workbench/browser/parts/panel/panelActions'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; -import { PANEL_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_INACTIVE_TITLE_FOREGROUND, PANEL_ACTIVE_TITLE_BORDER } from 'vs/workbench/common/theme'; -import { activeContrastBorder, focusBorder, contrastBorder, editorBackground } from 'vs/platform/theme/common/colorRegistry'; +import { PANEL_BACKGROUND, PANEL_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_INACTIVE_TITLE_FOREGROUND, PANEL_ACTIVE_TITLE_BORDER } from 'vs/workbench/common/theme'; +import { activeContrastBorder, focusBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; export class PanelPart extends CompositePart implements IPanelService { @@ -101,7 +101,7 @@ export class PanelPart extends CompositePart implements IPanelService { super.updateStyles(); const container = this.getContainer(); - container.style('background-color', this.getColor(editorBackground)); + container.style('background-color', this.getColor(PANEL_BACKGROUND)); const title = this.getTitleArea(); title.style('border-top-color', this.getColor(PANEL_BORDER) || this.getColor(contrastBorder)); diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 3b35554eb6ecd..4297f3a2df2a0 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -96,6 +96,12 @@ export const EDITOR_DRAG_AND_DROP_BACKGROUND = registerColor('editorGroup.dropBa // < --- Panels --- > +export const PANEL_BACKGROUND = registerColor('panel.background', { + dark: editorBackground, + light: editorBackground, + hc: editorBackground +}, nls.localize('panelBackground', "Panel background color. Panels are shown below the editor area and contain views like output and integrated terminal.")); + export const PANEL_BORDER = registerColor('panel.border', { dark: Color.fromHex('#808080').transparent(0.35), light: Color.fromHex('#808080').transparent(0.35), From 3bab8149c03dceacc79c0c37b93395af0e25ec69 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 1 Jun 2017 11:02:38 -0700 Subject: [PATCH 1470/2747] Add margin for outline (fixes #27662) --- .../parts/welcome/page/electron-browser/welcomePage.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css index a3c2fa3e6867e..a87de4ff42152 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.css @@ -136,9 +136,9 @@ margin: 7px 0px; } .monaco-workbench > .part.editor > .content .welcomePage .commands li button { - margin: 0; + margin: 1px; padding: 12px 10px; - width: 100%; + width: calc(100% - 2px); height: 5em; font-size: 1.3em; text-align: left; From 202fd245e39d7895bb24f5e8deea29031c5f921e Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 1 Jun 2017 11:17:05 -0700 Subject: [PATCH 1471/2747] Add aria-label (fixes #27666) --- .../parts/welcome/page/electron-browser/welcomePage.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 9740e44f97e3a..bfa4a4f58d97c 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -224,8 +224,11 @@ class WelcomePage { name = parentFolder; parentFolder = tmp; } + const tildifiedParentFolder = tildify(parentFolder, this.environmentService.userHome); + a.innerText = name; a.title = folder; + a.setAttribute('aria-label', localize('welcomePage.openFolderWithPath', "Open folder {0} with path {1}", name, tildifiedParentFolder)); a.href = 'javascript:void(0)'; a.addEventListener('click', e => { this.telemetryService.publicLog('workbenchActionExecuted', { @@ -241,7 +244,7 @@ class WelcomePage { const span = document.createElement('span'); span.classList.add('path'); span.classList.add('detail'); - span.innerText = tildify(parentFolder, this.environmentService.userHome); + span.innerText = tildifiedParentFolder; span.title = folder; li.appendChild(span); From 6574483b3fe988ba13c31055b0f9ce005114bd11 Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 1 Jun 2017 10:17:00 -0700 Subject: [PATCH 1472/2747] Fix #27505. Make find widget sash 3px. --- src/vs/editor/contrib/find/browser/findWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index de4cbdea3205c..4c5b20bd38ca1 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -1036,7 +1036,7 @@ registerThemingParticipant((theme, collector) => { let border = theme.getColor('panel.border'); if (border) { - collector.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${border}; width: 2px !important; margin-left: -4px;}`); + collector.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${border}; width: 3px !important; margin-left: -4px;}`); } }); From b0990849bb0171cd4e94b28f9d89793e3774f6fb Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 1 Jun 2017 12:36:44 -0700 Subject: [PATCH 1473/2747] Fix #27495. --- .../editor/contrib/find/browser/findWidget.ts | 34 +++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index 4c5b20bd38ca1..91d6b991af3b1 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -411,7 +411,31 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas } }, 0); this._codeEditor.layoutOverlayWidget(this); - this._showViewZone(); + + let adjustEditorScrollTop = true; + if (this._codeEditor.getConfiguration().contribInfo.find.seedSearchStringFromSelection && selection) { + let editorCoords = dom.getDomNodePagePosition(this._codeEditor.getDomNode()); + let startCoords = this._codeEditor.getScrolledVisiblePosition(selection.getStartPosition()); + let startLeft = editorCoords.left + startCoords.left; + let startTop = startCoords.top; + + if (startTop < this._viewZone.heightInPx) { + if (selection.endLineNumber > selection.startLineNumber) { + adjustEditorScrollTop = false; + } + + let leftOfFindWidget = dom.getTopLeftOffset(this._domNode).left; + if (startLeft > leftOfFindWidget) { + adjustEditorScrollTop = false; + } + let endCoords = this._codeEditor.getScrolledVisiblePosition(selection.getEndPosition()); + let endLeft = editorCoords.left + endCoords.left; + if (endLeft > leftOfFindWidget) { + adjustEditorScrollTop = false; + } + } + } + this._showViewZone(adjustEditorScrollTop); } } @@ -454,11 +478,12 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas } this._viewZoneId = accessor.addZone(this._viewZone); + // scroll top adjust to make sure the editor doesn't scroll when adding viewzone at the beginning. this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + this._viewZone.heightInPx); }); } - private _showViewZone() { + private _showViewZone(adjustScroll: boolean = true) { if (!this._isVisible) { return; } @@ -479,7 +504,10 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas this._viewZone.heightInPx = FIND_INPUT_AREA_HEIGHT; } this._viewZoneId = accessor.addZone(this._viewZone); - this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + scrollAdjustment); + + if (adjustScroll) { + this._codeEditor.setScrollTop(this._codeEditor.getScrollTop() + scrollAdjustment); + } }); } From 07bbca9f9a973afb754efdf8deccbd3788d93b65 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 1 Jun 2017 12:43:42 -0700 Subject: [PATCH 1474/2747] Improve screen reader experience on install buttons (fixes #27661) --- .../welcome/page/electron-browser/vs_code_welcome_page.ts | 4 ++-- .../parts/welcome/page/electron-browser/welcomePage.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts index 767ee36747ab1..2fe5fc81aa132 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts @@ -52,11 +52,11 @@ export default () => `

    ${escape(localize('welcomePage.customize', "Customize"))}

      -
    • -
    • diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index bfa4a4f58d97c..204b34b3f63d8 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -295,6 +295,7 @@ class WelcomePage { const a = document.createElement('a'); a.innerText = extension.name; + a.title = extension.isKeymap ? localize('welcomePage.installKeymap', "Install {0} keymap", extension.name) : localize('welcomePage.installExtensionPack', "Install additional support for {0}", extension.name); a.classList.add('installExtension'); a.setAttribute('data-extension', extension.id); a.href = 'javascript:void(0)'; @@ -307,7 +308,7 @@ class WelcomePage { const span = document.createElement('span'); span.innerText = extension.name; - span.title = localize('welcomePage.installedExtension', "{0} support is already installed", extension.name); + span.title = extension.isKeymap ? localize('welcomePage.installedKeymap', "{0} keymap is already installed", extension.name) : localize('welcomePage.installedExtensionPack', "{0} support is already installed", extension.name); span.classList.add('enabledExtension'); span.setAttribute('data-extension', extension.id); list.appendChild(span); From 0346c023f6bb057df1a9ff793cebb5cc5810ac56 Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 1 Jun 2017 13:13:25 -0700 Subject: [PATCH 1475/2747] Fix #27515. --- src/vs/editor/contrib/find/browser/findWidget.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index 91d6b991af3b1..8eadb32492a64 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -236,10 +236,17 @@ export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSas }); })); + this._register(this._codeEditor.onDidScrollChange((e) => { if (e.scrollTopChanged) { this._layoutViewZone(); + return; } + + // for other scroll changes, layout the viewzone in next tick to avoid ruining current rendering. + setTimeout(() => { + this._layoutViewZone(); + }, 0); })); } From cab96c00b2b9a2551fc3f0207cc0bcbd8bcb6a97 Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 1 Jun 2017 13:27:54 -0700 Subject: [PATCH 1476/2747] Fix #26106. This time make it right. --- src/vs/editor/common/viewModel/viewModelDecorations.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/common/viewModel/viewModelDecorations.ts b/src/vs/editor/common/viewModel/viewModelDecorations.ts index 2a04c160d9410..2e631c0948608 100644 --- a/src/vs/editor/common/viewModel/viewModelDecorations.ts +++ b/src/vs/editor/common/viewModel/viewModelDecorations.ts @@ -73,7 +73,7 @@ export class ViewModelDecorations implements IDisposable { let removedDecorations = e.removedDecorations; for (let i = 0, len = removedDecorations.length; i < len; i++) { let removedDecoration = removedDecorations[i]; - if (removedDecoration !== null && removedDecoration !== undefined) { + if (this._decorationsCache !== null && this._decorationsCache !== undefined) { delete this._decorationsCache[removedDecoration]; } } From d3df76f50d7982c8c2fa296c22529d2b85590032 Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 1 Jun 2017 13:33:20 -0700 Subject: [PATCH 1477/2747] Re #26106. Reduce null check. --- src/vs/editor/common/viewModel/viewModelDecorations.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/common/viewModel/viewModelDecorations.ts b/src/vs/editor/common/viewModel/viewModelDecorations.ts index 2e631c0948608..f4311681f8214 100644 --- a/src/vs/editor/common/viewModel/viewModelDecorations.ts +++ b/src/vs/editor/common/viewModel/viewModelDecorations.ts @@ -71,9 +71,9 @@ export class ViewModelDecorations implements IDisposable { } let removedDecorations = e.removedDecorations; - for (let i = 0, len = removedDecorations.length; i < len; i++) { - let removedDecoration = removedDecorations[i]; - if (this._decorationsCache !== null && this._decorationsCache !== undefined) { + if (this._decorationsCache !== null && this._decorationsCache !== undefined) { + for (let i = 0, len = removedDecorations.length; i < len; i++) { + let removedDecoration = removedDecorations[i]; delete this._decorationsCache[removedDecoration]; } } From 86417cea29412b5247650154cad2e9f395b7623b Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 1 Jun 2017 14:24:42 -0700 Subject: [PATCH 1478/2747] Details for extension being installed (fixes #27659) --- .../page/electron-browser/welcomePage.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 204b34b3f63d8..976702e229d79 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -37,6 +37,7 @@ import { isLinux } from 'vs/base/common/platform'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { registerColor, focusBorder, textLinkForeground, textLinkActiveForeground, foreground, descriptionForeground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { getExtraColor } from 'vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils'; +import { IExtensionsWorkbenchService } from 'vs/workbench/parts/extensions/common/extensions'; used(); @@ -125,6 +126,7 @@ const keymapExtensions: ExtensionSuggestion[] = [ interface Strings { installEvent: string; installedEvent: string; + detailsEvent: string; alreadyInstalled: string; reloadAfterInstall: string; @@ -135,16 +137,18 @@ interface Strings { const extensionPackStrings: Strings = { installEvent: 'installExtension', installedEvent: 'installedExtension', + detailsEvent: 'detailsExtension', alreadyInstalled: localize('welcomePage.extensionPackAlreadyInstalled', "Support for {0} is already installed."), - reloadAfterInstall: localize('welcomePage.willReloadAfterInstallingExtensionPack', "The window will reload after installing support for {0}."), - installing: localize('welcomePage.installingExtensionPack', "Installing support for {0}..."), + reloadAfterInstall: localize('welcomePage.willReloadAfterInstallingExtensionPack', "The window will reload after installing additional support for {0}."), + installing: localize('welcomePage.installingExtensionPack', "Installing additional support for {0}..."), extensionNotFound: localize('welcomePage.extensionPackNotFound', "Support for {0} with id {1} could not be found."), }; const keymapStrings: Strings = { installEvent: 'installKeymap', installedEvent: 'installedKeymap', + detailsEvent: 'detailsKeymap', alreadyInstalled: localize('welcomePage.keymapAlreadyInstalled', "The {0} keyboard shortcuts are already installed."), reloadAfterInstall: localize('welcomePage.willReloadAfterInstallingKeymap', "The window will reload after installing the {0} keyboard shortcuts."), @@ -170,6 +174,7 @@ class WelcomePage { @IExtensionGalleryService private extensionGalleryService: IExtensionGalleryService, @IExtensionManagementService private extensionManagementService: IExtensionManagementService, @IExtensionTipsService private tipsService: IExtensionTipsService, + @IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService, @ILifecycleService lifecycleService: ILifecycleService, @IThemeService private themeService: IThemeService, @ITelemetryService private telemetryService: ITelemetryService @@ -403,6 +408,16 @@ class WelcomePage { }); return TPromise.as(true); }), + new Action('details', localize('details', "Details"), null, true, () => { + this.telemetryService.publicLog(strings.detailsEvent, { + from: telemetryFrom, + extensionId: extensionSuggestion.id, + }); + this.extensionsWorkbenchService.queryGallery({ names: [extensionSuggestion.id] }) + .then(result => this.extensionsWorkbenchService.open(result.firstPage[0])) + .then(null, onUnexpectedError); + return TPromise.as(false); + }), new Action('cancel', localize('cancel', "Cancel"), null, true, () => { this.telemetryService.publicLog(strings.installedEvent, { from: telemetryFrom, From 120e1d041d322e7755d932de49ed932899ff6243 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Thu, 1 Jun 2017 23:29:01 +0200 Subject: [PATCH 1479/2747] node-debug@1.13.9 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 954a95afdee0f..a44f3e99bd85f 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -42,7 +42,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.13.8' }, + { name: 'ms-vscode.node-debug', version: '1.13.9' }, { name: 'ms-vscode.node-debug2', version: '1.13.1' } ]; From 148a23aef5135ae3b0e8a380fc4804f84d58933e Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 1 Jun 2017 15:15:48 -0700 Subject: [PATCH 1480/2747] Explicitly specify that typescrip.tnpm should point to the executable --- extensions/typescript/package.nls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/typescript/package.nls.json b/extensions/typescript/package.nls.json index 374860ba9c4e1..c2cf59174963f 100644 --- a/extensions/typescript/package.nls.json +++ b/extensions/typescript/package.nls.json @@ -36,7 +36,7 @@ "typescript.selectTypeScriptVersion.title": "Select TypeScript Version", "jsDocCompletion.enabled": "Enable/disable auto JSDoc comments", "javascript.implicitProjectConfig.checkJs": "Enable/disable semantic checking of JavaScript files. Existing jsconfig.json or tsconfig.json files override this setting. Requires TypeScript >=2.3.1.", - "typescript.npm": "Specifies the path to the NPM install used for Automatic Type Acquisition. Requires TypeScript >= 2.3.4.", + "typescript.npm": "Specifies the path to the NPM executable used for Automatic Type Acquisition. Requires TypeScript >= 2.3.4.", "typescript.check.npmIsInstalled": "Check if NPM is installed for Automatic Type Acquisition.", "javascript.nameSuggestions": "Enable/disable including unique names from the file in JavaScript suggestion lists.", "typescript.tsc.autoDetect": "Controls whether auto detection of tsc tasks is on or off." From b16b4ce42f8a76fbd6649c051decca95faf76d93 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 1 Jun 2017 15:26:48 -0700 Subject: [PATCH 1481/2747] Fixes #27633 --- .../parts/emmet/electron-browser/actions/editPoints.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.ts b/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.ts index d4d1111fe5c92..cd52920c25dbd 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.ts @@ -15,7 +15,7 @@ class PreviousEditPointAction extends BasicEmmetEditorAction { constructor() { super( 'editor.emmet.action.previousEditPoint', - nls.localize('previousEditPoint', "Emmet: Previous Edit Point"), + nls.localize('previousEditPoint', "Emmet: Go to Previous Edit Point"), 'Emmet: Go to Previous Edit Point', 'prev_edit_point' ); @@ -27,7 +27,7 @@ class NextEditPointAction extends BasicEmmetEditorAction { constructor() { super( 'editor.emmet.action.nextEditPoint', - nls.localize('nextEditPoint', "Emmet: Next Edit Point"), + nls.localize('nextEditPoint', "Emmet: Go to Next Edit Point"), 'Emmet: Go to Next Edit Point', 'next_edit_point' ); From 4d4d9cac5f643c386aa76c5b0299829e839d6c39 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 1 Jun 2017 15:31:04 -0700 Subject: [PATCH 1482/2747] Fixes #27316 --- extensions/emmet/src/editPoint.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extensions/emmet/src/editPoint.ts b/extensions/emmet/src/editPoint.ts index 5338c5012e146..2028d3295b3c6 100644 --- a/extensions/emmet/src/editPoint.ts +++ b/extensions/emmet/src/editPoint.ts @@ -45,8 +45,7 @@ function findEditPoint(lineNum: number, editor: vscode.TextEditor, position: vsc let lineContent = line.text; if (lineNum !== position.line && line.isEmptyOrWhitespace) { - editor.selection = new vscode.Selection(lineNum, lineContent.length, lineNum, lineContent.length); - return; + return new vscode.Selection(lineNum, lineContent.length, lineNum, lineContent.length); } if (lineNum === position.line && direction === 'prev') { From d4bbcc63683855c3005f92c1c71a1c597f70512a Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 1 Jun 2017 16:00:22 -0700 Subject: [PATCH 1483/2747] Adapt to "editor.multiCursorModifier" setting (fixes #27884) --- .../editor/vs_code_editor_walkthrough.md | 2 +- .../electron-browser/walkThroughPart.ts | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/vs_code_editor_walkthrough.md b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/vs_code_editor_walkthrough.md index 6dedb7d9978b7..765597aac9a63 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/vs_code_editor_walkthrough.md +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/vs_code_editor_walkthrough.md @@ -16,7 +16,7 @@ The core editor in VS Code is packed with features. This page highlights a numb ### Multi-Cursor Editing Using multiple cursors allows you to edit multiple parts of the document at once, greatly improving your productivity. Try the following actions in the code block below: 1. Box Selection - press any combination of kb(cursorColumnSelectDown), kb(cursorColumnSelectRight), kb(cursorColumnSelectUp), kb(cursorColumnSelectLeft) to select a block of text, you can also press `⇧⌥``Shift+Alt` while selecting text with the mouse. -2. Add a cursor - press kb(editor.action.insertCursorAbove) or kb(editor.action.insertCursorBelow) to add a new cursor above or below, you can also use your mouse with `⌥+Click``Alt+Click` to add a cursor anywhere. +2. Add a cursor - press kb(editor.action.insertCursorAbove) or kb(editor.action.insertCursorBelow) to add a new cursor above or below, you can also use your mouse with +Click to add a cursor anywhere. 3. Create cursors on all occurrences of a string - select one instance of a string e.g. `background-color` and press kb(editor.action.selectHighlights). Now you can replace all instances by simply typing. That is the tip of the iceberg for multi-cursor editing have a look at the `selection menu` and our handy [keyboard reference guide](command:workbench.action.keybindingsReference) for additional actions. diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 76a67b79d8e29..48160e32d1e7a 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -40,6 +40,8 @@ import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { registerColor, focusBorder, textLinkForeground, textLinkActiveForeground, textPreformatForeground, contrastBorder, textBlockQuoteBackground, textBlockQuoteBorder } from 'vs/platform/theme/common/colorRegistry'; import { getExtraColor } from 'vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils'; +import { UILabelProvider } from 'vs/platform/keybinding/common/keybindingLabels'; +import { OS, OperatingSystem } from 'vs/base/common/platform'; export const WALK_THROUGH_FOCUS = new RawContextKey('interactivePlaygroundFocus', false); @@ -406,6 +408,8 @@ export class WalkThroughPart extends BaseEditor { })); }); this.updateSizeClasses(); + this.multiCursorModifier(); + this.contentDisposables.push(this.configurationService.onDidUpdateConfiguration(() => this.multiCursorModifier())); if (input.onReady) { input.onReady(innerContent); } @@ -461,6 +465,19 @@ export class WalkThroughPart extends BaseEditor { }); } + private multiCursorModifier() { + const labels = UILabelProvider.modifierLabels[OS]; + const setting = this.configurationService.lookup('editor.multiCursorModifier'); + const modifier = labels[setting.value === 'ctrlCmd' ? (OS === OperatingSystem.Macintosh ? 'metaKey' : 'ctrlKey') : 'altKey']; + const keys = this.content.querySelectorAll('.multi-cursor-modifier'); + Array.prototype.forEach.call(keys, (key: Element) => { + while (key.firstChild) { + key.removeChild(key.firstChild); + } + key.appendChild(document.createTextNode(modifier)); + }); + } + private saveTextEditorViewState(resource: URI): void { const memento = this.getMemento(this.storageService, Scope.WORKSPACE); let editorViewStateMemento = memento[WALK_THROUGH_EDITOR_VIEW_STATE_PREFERENCE_KEY]; From 02783b149c99cc6e8b7f066d4660cec0d4c361d6 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 1 Jun 2017 16:12:48 -0700 Subject: [PATCH 1484/2747] Use jsx transformations in emmet --- extensions/emmet/src/abbreviationActions.ts | 13 ++++++++----- extensions/emmet/src/emmetCompletionProvider.ts | 3 ++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/extensions/emmet/src/abbreviationActions.ts b/extensions/emmet/src/abbreviationActions.ts index c95bfed321156..6f9bbe78f50d2 100644 --- a/extensions/emmet/src/abbreviationActions.ts +++ b/extensions/emmet/src/abbreviationActions.ts @@ -20,11 +20,13 @@ export function wrapWithAbbreviation() { rangeToReplace = new vscode.Range(rangeToReplace.start.line, 0, rangeToReplace.start.line, editor.document.lineAt(rangeToReplace.start.line).text.length); } let textToReplace = editor.document.getText(rangeToReplace); + let syntax = getSyntax(editor.document); let options = { field: field, - syntax: getSyntax(editor.document), + syntax: syntax, profile: getProfile(getSyntax(editor.document)), - text: textToReplace + text: textToReplace, + addons: syntax === 'jsx' ? { 'jsx': syntax === 'jsx' } : null }; vscode.window.showInputBox({ prompt: 'Enter Abbreviation' }).then(abbr => { @@ -45,11 +47,12 @@ export function expandAbbreviation() { if (rangeToReplace.isEmpty) { [rangeToReplace, abbr] = extractAbbreviation(rangeToReplace.start); } - + let syntax = getSyntax(editor.document); let options = { field: field, - syntax: getSyntax(editor.document), - profile: getProfile(getSyntax(editor.document)) + syntax: syntax, + profile: getProfile(getSyntax(editor.document)), + addons: syntax === 'jsx' ? { 'jsx': true } : null }; let expandedText = expand(abbr, options); diff --git a/extensions/emmet/src/emmetCompletionProvider.ts b/extensions/emmet/src/emmetCompletionProvider.ts index cbd5b750ae22b..9a84da40c31d6 100644 --- a/extensions/emmet/src/emmetCompletionProvider.ts +++ b/extensions/emmet/src/emmetCompletionProvider.ts @@ -40,7 +40,8 @@ function getExpandedAbbreviation(document: vscode.TextDocument, position: vscode let expandedWord = expand(wordToExpand, { field: field, syntax: syntax, - profile: getProfile(syntax) + profile: getProfile(syntax), + addons: syntax === 'jsx' ? { 'jsx': true } : null }); let completionitem = new vscode.CompletionItem(wordToExpand); From d80d55063470aa31f7fe14e856cb56e26656c5b8 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 1 Jun 2017 16:15:25 -0700 Subject: [PATCH 1485/2747] Removing toggleComment from new emmet features as it needs more work --- src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts b/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts index a313f378b211b..e6f0e88243bf5 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts @@ -249,8 +249,7 @@ export abstract class EmmetEditorAction extends EditorAction { 'editor.emmet.action.mergeLines': 'emmet.mergeLines', 'editor.emmet.action.selectPreviousItem': 'emmet.selectPrevItem', 'editor.emmet.action.selectNextItem': 'emmet.selectNextItem', - 'editor.emmet.action.splitJoinTag': 'emmet.splitJoinTag', - 'editor.emmet.action.toggleComment': 'emmet.toggleComment' + 'editor.emmet.action.splitJoinTag': 'emmet.splitJoinTag' }; protected emmetActionName: string; From 2f0ad0af90b2c0a9daa79c4155ac58bc10f4a169 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 1 Jun 2017 16:26:45 -0700 Subject: [PATCH 1486/2747] Cleaning up messag for tsc mismatch warning as part of #27826 --- extensions/typescript/src/features/bufferSyncSupport.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/typescript/src/features/bufferSyncSupport.ts b/extensions/typescript/src/features/bufferSyncSupport.ts index f2b11faebefea..90b989b77a444 100644 --- a/extensions/typescript/src/features/bufferSyncSupport.ts +++ b/extensions/typescript/src/features/bufferSyncSupport.ts @@ -298,7 +298,7 @@ export default class BufferSyncSupport { } if (tscVersion && tscVersion !== this.client.apiVersion.versionString) { window.showInformationMessage( - localize('versionMismatch', 'Version mismatch! global tsc ({0}) != VS Code\'s language service ({1}). Inconsistent compile errors might occur', tscVersion, this.client.apiVersion.versionString), + localize('versionMismatch', 'Using TypeScript ({1}) for editor features. TypeScript ({0}) is installed globally on your machine. Inconsistent compile errors may occur', tscVersion, this.client.apiVersion.versionString), { title: localize('moreInformation', 'More Information'), id: 1 From 786e0984cbc53eaa64fd2706e46c73d87394a268 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 1 Jun 2017 16:46:06 -0700 Subject: [PATCH 1487/2747] Telemetry for expand/collapse suggest docs --- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 00c8016932894..cdd6d6f3e1b0c 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -814,6 +814,7 @@ export class SuggestWidget implements IContentWidget, IDelegate this.details.element.style.borderColor = this.detailsFocusBorderColor; } } + this.telemetryService.publicLog('suggestWidget:toggleDetailsFocus', this.editor.getTelemetryData()); } toggleDetails(): void { @@ -827,13 +828,14 @@ export class SuggestWidget implements IContentWidget, IDelegate removeClass(this.element, 'docs-side'); removeClass(this.element, 'docs-below'); this.editor.layoutContentWidget(this); + this.telemetryService.publicLog('suggestWidget:collapseDetails', this.editor.getTelemetryData()); } else { this.storageService.store('expandSuggestionDocs', true, StorageScope.GLOBAL); - this.expandSideOrBelow(); - this.showDetails(); + this.telemetryService.publicLog('suggestWidget:expandDetails', this.editor.getTelemetryData()); } + } showDetails(): void { From 874bb86c94e608eb6c61c8ff930960a59f510325 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 1 Jun 2017 17:27:02 -0700 Subject: [PATCH 1488/2747] Fixes #27869 --- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index cdd6d6f3e1b0c..3ae8ad6be8c6a 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -831,7 +831,6 @@ export class SuggestWidget implements IContentWidget, IDelegate this.telemetryService.publicLog('suggestWidget:collapseDetails', this.editor.getTelemetryData()); } else { this.storageService.store('expandSuggestionDocs', true, StorageScope.GLOBAL); - this.expandSideOrBelow(); this.showDetails(); this.telemetryService.publicLog('suggestWidget:expandDetails', this.editor.getTelemetryData()); } @@ -842,6 +841,7 @@ export class SuggestWidget implements IContentWidget, IDelegate if (this.state !== State.Open && this.state !== State.Details) { return; } + this.expandSideOrBelow(); show(this.details.element); this.renderDetails(); From df1034a8a4b144a24c44c80ffde0c8cab8fb408d Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 1 Jun 2017 17:27:29 -0700 Subject: [PATCH 1489/2747] Fixes #27610 --- .../contrib/suggest/browser/suggestWidget.ts | 64 +++---------------- 1 file changed, 9 insertions(+), 55 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 3ae8ad6be8c6a..386980d3288a0 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -846,8 +846,8 @@ export class SuggestWidget implements IContentWidget, IDelegate show(this.details.element); this.renderDetails(); - // With docs showing up, list might need adjustments to keep it close to the cursor - this.adjustListPosition(); + // Reset margin-top that was set as Fix for #26416 + this.listElement.style.marginTop = '0px'; // with docs showing up widget width/height may change, so reposition the widget this.editor.layoutContentWidget(this); @@ -939,15 +939,13 @@ export class SuggestWidget implements IContentWidget, IDelegate removeClass(this.element, 'list-right'); } - if (cursorY > widgetY) { - if (!hasClass(this.element, 'widget-above')) { - addClass(this.element, 'widget-above'); - // Since the widget was previously not above the cursor, - // the list needs to be adjusted to keep it close to the cursor - this.adjustListPosition(); - } - } else { - removeClass(this.element, 'widget-above'); + if (hasClass(this.element, 'docs-side') + && cursorY > widgetY + && this.details.element.offsetHeight > this.listElement.offsetHeight) { + + // Fix for #26416 + // Docs is bigger than list and widget is above cursor, apply margin-top so that list appears right above cursor + this.listElement.style.marginTop = `${this.details.element.offsetHeight - this.listElement.offsetHeight}px`; } } @@ -962,50 +960,6 @@ export class SuggestWidget implements IContentWidget, IDelegate } } - private adjustListPosition(): void { - - - if (hasClass(this.element, 'docs-side')) { - - if (this.details.element.offsetHeight > this.listElement.offsetHeight) { - - // Fix for #26416 - // Docs is bigger than list and widget is above cursor, apply margin-top so that list appears right above cursor - if (hasClass(this.element, 'widget-above')) { - this.listElement.style.marginTop = `${this.details.element.offsetHeight - this.listElement.offsetHeight}px`; - } - - // Fix for #26244 - // if (hasClass(this.element, 'list-right')) { - // addClass(this.listElement, 'empty-left-border'); - // removeClass(this.listElement, 'empty-right-border'); - // } else { - // addClass(this.listElement, 'empty-right-border'); - // removeClass(this.listElement, 'empty-left-border'); - // } - - // removeClass(this.details.element, 'empty-left-border'); - // removeClass(this.details.element, 'empty-right-border'); - return; - } else { - // Fix for #26244 - // if (hasClass(this.element, 'list-right')) { - // addClass(this.details.element, 'empty-right-border'); - // removeClass(this.details.element, 'empty-left-border'); - // } else { - // addClass(this.details.element, 'empty-left-border'); - // removeClass(this.details.element, 'empty-right-border'); - // } - - // removeClass(this.listElement, 'empty-right-border'); - // removeClass(this.listElement, 'empty-left-border'); - } - } - - // Reset margin-top that was set as Fix for #26416 - this.listElement.style.marginTop = '0px'; - } - private renderDetails(): void { if (this.state === State.Details || this.state === State.Open) { this.details.render(this.list.getFocusedElements()[0]); From af2752dad442341000b0bf95861b91ecd8263ca0 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 1 Jun 2017 20:32:00 -0700 Subject: [PATCH 1490/2747] Fixes #27876 --- src/vs/editor/contrib/suggest/browser/media/suggest.css | 5 +++-- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 9 ++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index 577af30bea5fe..0fc6559fdf1c8 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -121,6 +121,7 @@ .monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header > .close { background-image: url('./close.svg'); float: right; + margin-right: 5px; } .monaco-editor .suggest-widget .monaco-list .monaco-list-row > .contents > .main > .readMore { @@ -242,10 +243,10 @@ opacity: 0.7; word-break: break-all; margin: 0; + padding: 4px 0 4px 5px; } -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs, -.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .header { +.monaco-editor .suggest-widget .details > .monaco-scrollable-element > .body > .docs { margin: 0; padding: 4px 5px; } diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 386980d3288a0..7bec683cacf88 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -243,9 +243,16 @@ class SuggestionDetails { return; } removeClass(this.el, 'no-docs'); - this.type.innerText = item.suggestion.detail || ''; this.docs.textContent = item.suggestion.documentation; + if (item.suggestion.detail) { + this.type.innerText = item.suggestion.detail; + show(this.type); + } else { + this.type.innerText = ''; + hide(this.type); + } + this.el.style.height = this.header.offsetHeight + this.docs.offsetHeight + 'px'; this.close.onmousedown = e => { From 4ff7fbd861a236b2ee225726559b18dc51b73aff Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 2 Jun 2017 06:56:46 +0200 Subject: [PATCH 1491/2747] theming - apply panel.background to editors in panels --- .../workbench/browser/parts/panel/panelPart.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index 8ad40e000be39..f3334acfe7889 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -26,7 +26,7 @@ import { ActionsOrientation, ActionBar } from 'vs/base/browser/ui/actionbar/acti import { ClosePanelAction, PanelAction, ToggleMaximizedPanelAction } from 'vs/workbench/browser/parts/panel/panelActions'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; import { PANEL_BACKGROUND, PANEL_BORDER, PANEL_ACTIVE_TITLE_FOREGROUND, PANEL_INACTIVE_TITLE_FOREGROUND, PANEL_ACTIVE_TITLE_BORDER } from 'vs/workbench/common/theme'; -import { activeContrastBorder, focusBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { activeContrastBorder, focusBorder, contrastBorder, editorBackground } from 'vs/platform/theme/common/colorRegistry'; export class PanelPart extends CompositePart implements IPanelService { @@ -194,6 +194,20 @@ export class PanelPart extends CompositePart implements IPanelService { registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { + // Panel Background: since panels can host editors, we apply a background rule if the panel background + // color is different from the editor background color. This is a bit of a hack though. The better way + // would be to have a way to push the background color onto each editor widget itself somehow. + const panelBackground = theme.getColor(PANEL_BACKGROUND); + if (panelBackground && panelBackground !== theme.getColor(editorBackground)) { + collector.addRule(` + .monaco-workbench > .part.panel > .content .monaco-editor, + .monaco-workbench > .part.panel > .content .monaco-editor .margin, + .monaco-workbench > .part.panel > .content .monaco-editor .monaco-editor-background { + background-color: ${panelBackground}; + } + `); + } + // Title Active const titleActive = theme.getColor(PANEL_ACTIVE_TITLE_FOREGROUND); const titleActiveBorder = theme.getColor(PANEL_ACTIVE_TITLE_BORDER); From fff2f37662b3848622c36f9a1c14baff992dff6b Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 2 Jun 2017 09:38:20 +0200 Subject: [PATCH 1492/2747] Add a way to open VS Code's Accessibility docs from Alt+F1 (#27833) --- .../electron-browser/accessibility.ts | 46 ++++++++++++------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts b/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts index c155e0cb65600..d5e4278734717 100644 --- a/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts +++ b/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts @@ -14,7 +14,7 @@ import * as dom from 'vs/base/browser/dom'; import { renderHtml } from 'vs/base/browser/htmlContentRenderer'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; import { Widget } from 'vs/base/browser/ui/widget'; -import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; +import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { ICommonCodeEditor, IEditorContribution } from 'vs/editor/common/editorCommon'; @@ -30,6 +30,8 @@ import * as editorOptions from 'vs/editor/common/config/editorOptions'; import * as platform from 'vs/base/common/platform'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { alert } from 'vs/base/browser/ui/aria/aria'; +import { IOpenerService } from "vs/platform/opener/common/opener"; +import URI from "vs/base/common/uri"; const CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE = new RawContextKey('accessibilityHelpWidgetVisible', false); @@ -47,15 +49,12 @@ class AccessibilityHelpController extends Disposable implements IEditorContribut constructor( editor: ICodeEditor, - @IContextKeyService contextKeyService: IContextKeyService, - @IKeybindingService keybindingService: IKeybindingService, - @IConfigurationService configurationService: IConfigurationService, - @IConfigurationEditingService configurationEditingService: IConfigurationEditingService + @IInstantiationService instantiationService: IInstantiationService ) { super(); this._editor = editor; - this._widget = this._register(new AccessibilityHelpWidget(this._editor, contextKeyService, keybindingService, configurationService, configurationEditingService)); + this._widget = this._register(instantiationService.createInstance(AccessibilityHelpWidget, this._editor)); } public getId(): string { @@ -78,27 +77,22 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { private static HEIGHT = 300; private _editor: ICodeEditor; - private _keybindingService: IKeybindingService; - private _configurationService: IConfigurationService; - private _configurationEditingService: IConfigurationEditingService; private _domNode: FastDomNode; private _isVisible: boolean; private _isVisibleKey: IContextKey; constructor( editor: ICodeEditor, - contextKeyService: IContextKeyService, - keybindingService: IKeybindingService, - configurationService: IConfigurationService, - configurationEditingService: IConfigurationEditingService + @IContextKeyService private _contextKeyService: IContextKeyService, + @IKeybindingService private _keybindingService: IKeybindingService, + @IConfigurationService private _configurationService: IConfigurationService, + @IConfigurationEditingService private _configurationEditingService: IConfigurationEditingService, + @IOpenerService private _openerService: IOpenerService ) { super(); this._editor = editor; - this._keybindingService = keybindingService; - this._configurationService = configurationService; - this._configurationEditingService = configurationEditingService; - this._isVisibleKey = CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE.bindTo(contextKeyService); + this._isVisibleKey = CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE.bindTo(this._contextKeyService); this._domNode = createFastDomNode(document.createElement('div')); this._domNode.setClassName('accessibilityHelpWidget'); @@ -120,6 +114,7 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { if (!this._isVisible) { return; } + if (e.equals(KeyMod.CtrlCmd | KeyCode.KEY_E)) { alert(nls.localize('emergencyConfOn', "Now changing the setting `editor.accessibilitySupport` to 'on'.")); @@ -131,6 +126,15 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { e.preventDefault(); e.stopPropagation(); } + + if (e.equals(KeyMod.CtrlCmd | KeyCode.KEY_H)) { + alert(nls.localize('openingDocs', "Now opening the VS Code Accessibility documentation page.")); + + this._openerService.open(URI.parse('https://go.microsoft.com/fwlink/?linkid=851010')); + + e.preventDefault(); + e.stopPropagation(); + } })); this.onblur(this._domNode.domNode, () => { @@ -232,6 +236,14 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { text += '\n\n - ' + this._descriptionForCommand(ToggleTabFocusModeAction.ID, NLS_TAB_FOCUS_MODE_OFF, NLS_TAB_FOCUS_MODE_OFF_NO_KB); } + const openDocMessage = ( + platform.isMacintosh + ? nls.localize('openDocMac', "Press Command+H now to open a browser window with more VS Code information related to Accessibility.") + : nls.localize('openDocWinLinux', "Press Control+H now to open a browser window with more VS Code information related to Accessibility.") + ); + + text += '\n\n' + openDocMessage; + text += '\n\n' + nls.localize('outroMsg', "You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."); this._domNode.domNode.appendChild(renderHtml({ From 496603e40dbe7bec2be0b0a6cce1f9b7f753300c Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 2 Jun 2017 09:40:35 +0200 Subject: [PATCH 1493/2747] fix #27898 --- .../contrib/snippet/browser/snippetParser.ts | 11 ++++----- .../contrib/snippet/browser/snippetSession.ts | 8 +++---- .../test/browser/snippetController2.test.ts | 23 +++++++++++++++++++ 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetParser.ts b/src/vs/editor/contrib/snippet/browser/snippetParser.ts index 488b53b864bef..7cd1fd61b3e1c 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetParser.ts @@ -331,8 +331,8 @@ export class SnippetParser { return value.replace(/\$|}|\\/g, '\\$&'); } - static parse(template: string): TextmateSnippet { - const marker = new SnippetParser(true, false).parse(template, true); + static parse(template: string, enforceFinalTabstop?: boolean): TextmateSnippet { + const marker = new SnippetParser(true, false).parse(template, true, enforceFinalTabstop); return new TextmateSnippet(marker); } @@ -351,7 +351,7 @@ export class SnippetParser { return Marker.toString(this.parse(value)); } - parse(value: string, insertFinalTabstop?: boolean): Marker[] { + parse(value: string, insertFinalTabstop?: boolean, enforceFinalTabstop?: boolean): Marker[] { const marker: Marker[] = []; this._scanner.text(value); @@ -395,9 +395,8 @@ export class SnippetParser { walk(marker, placeholderDefaultValues); if ( - insertFinalTabstop - && placeholderDefaultValues.size > 0 - && !placeholderDefaultValues.has('0') + !placeholderDefaultValues.has('0') && // there is no final tabstop + (insertFinalTabstop && placeholderDefaultValues.size > 0 || enforceFinalTabstop) ) { // the snippet uses placeholders but has no // final tabstop defined -> insert at the end diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index a000690d78678..8f13268453108 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -243,7 +243,7 @@ export class SnippetSession { return selection; } - static createEditsAndSnippets(editor: ICommonCodeEditor, template: string, overwriteBefore: number, overwriteAfter: number): { edits: IIdentifiedSingleEditOperation[], snippets: OneSnippet[] } { + static createEditsAndSnippets(editor: ICommonCodeEditor, template: string, overwriteBefore: number, overwriteAfter: number, enforceFinalTabstop: boolean): { edits: IIdentifiedSingleEditOperation[], snippets: OneSnippet[] } { const model = editor.getModel(); const edits: IIdentifiedSingleEditOperation[] = []; @@ -288,7 +288,7 @@ export class SnippetSession { const start = snippetSelection.getStartPosition(); const adjustedTemplate = SnippetSession.adjustWhitespace(model, start, template); - const snippet = SnippetParser.parse(adjustedTemplate).resolveVariables(new EditorSnippetVariableResolver(model, selection)); + const snippet = SnippetParser.parse(adjustedTemplate, enforceFinalTabstop).resolveVariables(new EditorSnippetVariableResolver(model, selection)); const offset = model.getOffsetAt(start) + delta; delta += snippet.text.length - model.getValueLengthInRange(snippetSelection); @@ -325,7 +325,7 @@ export class SnippetSession { const model = this._editor.getModel(); // make insert edit and start with first selections - const { edits, snippets } = SnippetSession.createEditsAndSnippets(this._editor, this._template, this._overwriteBefore, this._overwriteAfter); + const { edits, snippets } = SnippetSession.createEditsAndSnippets(this._editor, this._template, this._overwriteBefore, this._overwriteAfter, false); this._snippets = snippets; this._editor.setSelections(model.pushEditOperations(this._editor.getSelections(), edits, undoEdits => { @@ -338,7 +338,7 @@ export class SnippetSession { } merge(template: string, overwriteBefore: number = 0, overwriteAfter: number = 0): void { - const { edits, snippets } = SnippetSession.createEditsAndSnippets(this._editor, template, overwriteBefore, overwriteAfter); + const { edits, snippets } = SnippetSession.createEditsAndSnippets(this._editor, template, overwriteBefore, overwriteAfter, true); this._editor.setSelections(this._editor.getModel().pushEditOperations(this._editor.getSelections(), edits, undoEdits => { diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts index 0074a467414a2..2f42a0c9932fb 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts @@ -175,6 +175,29 @@ suite('SnippetController2', function () { ctrl.insert('farboo'); assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + assertContextKeys(contextKeys, true, false, true); + + ctrl.next(); + assertSelections(editor, new Selection(1, 7, 1, 7), new Selection(2, 11, 2, 11)); + assertContextKeys(contextKeys, false, false, false); + }); + + test('Nested snippets without final placeholder jumps to next outer placeholder, #27898', function () { + const ctrl = new SnippetController2(editor, contextKeys); + + ctrl.insert('for(const ${1:element} of ${2:array}) {$0}'); + assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 11, 1, 18), new Selection(2, 15, 2, 22)); + + ctrl.next(); + assertContextKeys(contextKeys, true, true, true); + assertSelections(editor, new Selection(1, 22, 1, 27), new Selection(2, 26, 2, 31)); + + ctrl.insert('document'); + assertContextKeys(contextKeys, true, true, true); + assertSelections(editor, new Selection(1, 30, 1, 30), new Selection(2, 34, 2, 34)); + + ctrl.next(); assertContextKeys(contextKeys, false, false, false); }); From 729c59fd7eac85d72ef4a98d9dfe445e2ac3e6b3 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 2 Jun 2017 09:59:35 +0200 Subject: [PATCH 1494/2747] Make tree data api public --- src/vs/workbench/api/node/extHost.api.impl.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 065f16fc76c49..f6f4099db43c1 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -365,13 +365,13 @@ export function createApiFactory( } return extHostTerminalService.createTerminal(nameOrOptions, shellPath, shellArgs); }, + registerTreeDataProvider(viewId: string, treeDataProvider: vscode.TreeDataProvider): vscode.Disposable { + return extHostTreeViews.registerTreeDataProvider(viewId, treeDataProvider); + }, // proposed API sampleFunction: proposedApiFunction(extension, () => { return extHostMessageService.showMessage(Severity.Info, 'Hello Proposed Api!', {}, []); }), - registerTreeDataProvider: proposedApiFunction(extension, (viewId: string, treeDataProvider: vscode.TreeDataProvider): vscode.Disposable => { - return extHostTreeViews.registerTreeDataProvider(viewId, treeDataProvider); - }) }; // namespace: workspace From 7c46b52166ad31663b8ba7b96262fd459f52078a Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 2 Jun 2017 10:50:21 +0200 Subject: [PATCH 1495/2747] imports style --- src/vs/base/browser/ui/dropdown/dropdown.ts | 2 +- src/vs/editor/contrib/gotoError/browser/gotoError.ts | 2 +- .../browser/parts/activitybar/activitybarActions.ts | 6 +++--- .../parts/codeEditor/electron-browser/accessibility.ts | 6 +++--- .../electron-browser/toggleMultiCursorModifier.ts | 2 +- .../preferences/browser/keybindingsEditorContribution.ts | 2 +- .../crashReporter/electron-browser/crashReporterService.ts | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/vs/base/browser/ui/dropdown/dropdown.ts b/src/vs/base/browser/ui/dropdown/dropdown.ts index e078d8ddc2b5e..b01ac4b60f6fb 100644 --- a/src/vs/base/browser/ui/dropdown/dropdown.ts +++ b/src/vs/base/browser/ui/dropdown/dropdown.ts @@ -16,7 +16,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview'; import { IMenuOptions } from 'vs/base/browser/ui/menu/menu'; import { ResolvedKeybinding } from 'vs/base/common/keyCodes'; -import { EventHelper, EventType } from "vs/base/browser/dom"; +import { EventHelper, EventType } from 'vs/base/browser/dom'; export interface ILabelRenderer { (container: HTMLElement): IDisposable; diff --git a/src/vs/editor/contrib/gotoError/browser/gotoError.ts b/src/vs/editor/contrib/gotoError/browser/gotoError.ts index 600a3024636e1..69792d86b8e51 100644 --- a/src/vs/editor/contrib/gotoError/browser/gotoError.ts +++ b/src/vs/editor/contrib/gotoError/browser/gotoError.ts @@ -29,7 +29,7 @@ import { Color } from 'vs/base/common/color'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { getAccessibilitySupport } from 'vs/base/browser/browser'; import { AccessibilitySupport } from 'vs/base/common/platform'; -import { editorErrorForeground, editorErrorBorder, editorWarningForeground, editorWarningBorder } from "vs/editor/common/view/editorColorRegistry"; +import { editorErrorForeground, editorErrorBorder, editorWarningForeground, editorWarningBorder } from 'vs/editor/common/view/editorColorRegistry'; class MarkerModel { diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts index ee8df3e9d2727..6deb54dcab25a 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts @@ -27,9 +27,9 @@ import { IPartService, Parts } from 'vs/workbench/services/part/common/partServi import { IThemeService, ITheme, registerThemingParticipant, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; import { ACTIVITY_BAR_BADGE_FOREGROUND, ACTIVITY_BAR_BADGE_BACKGROUND, ACTIVITY_BAR_DRAG_AND_DROP_BACKGROUND, ACTIVITY_BAR_FOREGROUND } from 'vs/workbench/common/theme'; import { contrastBorder, activeContrastBorder, focusBorder } from 'vs/platform/theme/common/colorRegistry'; -import { StandardMouseEvent } from "vs/base/browser/mouseEvent"; -import { KeyCode } from "vs/base/common/keyCodes"; -import { StandardKeyboardEvent } from "vs/base/browser/keyboardEvent"; +import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; +import { KeyCode } from 'vs/base/common/keyCodes'; +import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; export interface IViewletActivity { badge: IBadge; diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts b/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts index d5e4278734717..1147eef15c2da 100644 --- a/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts +++ b/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts @@ -25,13 +25,13 @@ import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { ToggleTabFocusModeAction } from 'vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorWidgetBackground, widgetShadow, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; -import { IConfigurationService } from "vs/platform/configuration/common/configuration"; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import * as editorOptions from 'vs/editor/common/config/editorOptions'; import * as platform from 'vs/base/common/platform'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { alert } from 'vs/base/browser/ui/aria/aria'; -import { IOpenerService } from "vs/platform/opener/common/opener"; -import URI from "vs/base/common/uri"; +import { IOpenerService } from 'vs/platform/opener/common/opener'; +import URI from 'vs/base/common/uri'; const CONTEXT_ACCESSIBILITY_WIDGET_VISIBLE = new RawContextKey('accessibilityHelpWidgetVisible', false); diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.ts b/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.ts index de0783f35b671..0efd4f260f817 100644 --- a/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.ts +++ b/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.ts @@ -11,7 +11,7 @@ import { Action } from 'vs/base/common/actions'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; -import { IConfigurationService } from "vs/platform/configuration/common/configuration"; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; export class ToggleMultiCursorModifierAction extends Action { diff --git a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts index 633268739df8d..ed4b39ebc17a8 100644 --- a/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts +++ b/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.ts @@ -26,7 +26,7 @@ import { parseTree, Node } from 'vs/base/common/json'; import { KeybindingIO } from 'vs/workbench/services/keybinding/common/keybindingIO'; import { ScanCodeBinding } from 'vs/workbench/services/keybinding/common/scanCode'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; -import { WindowsNativeResolvedKeybinding } from "vs/workbench/services/keybinding/common/windowsKeyboardMapper"; +import { WindowsNativeResolvedKeybinding } from 'vs/workbench/services/keybinding/common/windowsKeyboardMapper'; const NLS_LAUNCH_MESSAGE = nls.localize('defineKeybinding.start', "Define Keybinding"); const NLS_KB_LAYOUT_ERROR_MESSAGE = nls.localize('defineKeybinding.kbLayoutErrorMessage', "You won't be able to produce this key combination under your current keyboard layout."); diff --git a/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts b/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts index 59c19df4001c5..096c578d77ffc 100644 --- a/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts +++ b/src/vs/workbench/services/crashReporter/electron-browser/crashReporterService.ts @@ -13,8 +13,8 @@ import { crashReporter } from 'electron'; import product from 'vs/platform/node/product'; import pkg from 'vs/platform/node/package'; import * as os from 'os'; -import { ICrashReporterService, TELEMETRY_SECTION_ID, ICrashReporterConfig } from "vs/workbench/services/crashReporter/common/crashReporterService"; -import { isWindows, isMacintosh, isLinux } from "vs/base/common/platform"; +import { ICrashReporterService, TELEMETRY_SECTION_ID, ICrashReporterConfig } from 'vs/workbench/services/crashReporter/common/crashReporterService'; +import { isWindows, isMacintosh, isLinux } from 'vs/base/common/platform'; export class CrashReporterService implements ICrashReporterService { From ca2491d91649fbe32e08e5e6178987ae760ecde5 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 2 Jun 2017 11:08:10 +0200 Subject: [PATCH 1496/2747] Show views in extension editor page --- .../common/extensionManagement.ts | 7 ++--- .../extensions/browser/extensionEditor.ts | 31 +++++++++++++++++-- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/src/vs/platform/extensionManagement/common/extensionManagement.ts b/src/vs/platform/extensionManagement/common/extensionManagement.ts index 8df367a9615f6..e60c845c300bf 100644 --- a/src/vs/platform/extensionManagement/common/extensionManagement.ts +++ b/src/vs/platform/extensionManagement/common/extensionManagement.ts @@ -74,10 +74,9 @@ export interface ITheme { label: string; } -export interface ITreeExplorer { +export interface IView { id: string; - label: string; - icon: string; + name: string; } export interface IExtensionContributions { @@ -91,7 +90,7 @@ export interface IExtensionContributions { menus?: { [context: string]: IMenu[] }; snippets?: ISnippet[]; themes?: ITheme[]; - explorer?: ITreeExplorer; + views?: { [location: string]: IView[] }; } export interface IExtensionManifest { diff --git a/src/vs/workbench/parts/extensions/browser/extensionEditor.ts b/src/vs/workbench/parts/extensions/browser/extensionEditor.ts index 11915ba81c444..9334cdb4f535b 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionEditor.ts @@ -25,7 +25,7 @@ import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IExtensionGalleryService, IExtensionManifest, IKeyBinding } from 'vs/platform/extensionManagement/common/extensionManagement'; +import { IExtensionGalleryService, IExtensionManifest, IKeyBinding, IView } from 'vs/platform/extensionManagement/common/extensionManagement'; import { ResolvedKeybinding } from 'vs/base/common/keyCodes'; import { ExtensionsInput } from 'vs/workbench/parts/extensions/common/extensionsInput'; import { IExtensionsWorkbenchService, IExtensionsViewlet, VIEWLET_ID, IExtension, IExtensionDependencies } from 'vs/workbench/parts/extensions/common/extensions'; @@ -370,7 +370,8 @@ export class ExtensionEditor extends BaseEditor { this.renderLanguages(content, manifest, layout), this.renderThemes(content, manifest, layout), this.renderJSONValidation(content, manifest, layout), - this.renderDebuggers(content, manifest, layout) + this.renderDebuggers(content, manifest, layout), + this.renderViews(content, manifest, layout) ]; const isEmpty = !renders.reduce((v, r) => r || v, false); @@ -495,6 +496,32 @@ export class ExtensionEditor extends BaseEditor { return true; } + private renderViews(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { + const contributes = manifest.contributes; + const contrib = contributes && contributes.views || {}; + + let views = <{ id: string, name: string, location: string }[]>Object.keys(contrib).reduce((result, location) => { + let viewsForLocation: IView[] = contrib[location]; + result.push(...viewsForLocation.map(view => ({ ...view, location }))); + return result; + }, []); + + if (!views.length) { + return false; + } + + const details = $('details', { open: true, ontoggle: onDetailsToggle }, + $('summary', null, localize('views', "Views ({0})", views.length)), + $('table', null, + $('tr', null, $('th', null, localize('view id', "ID")), $('th', null, localize('view name', "Name")), $('th', null, localize('view location', "Where"))), + ...views.map(view => $('tr', null, $('td', null, view.id), $('td', null, view.name), $('td', null, view.location))) + ) + ); + + append(container, details); + return true; + } + private renderThemes(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { const contributes = manifest.contributes; const contrib = contributes && contributes.themes || []; From 891adacb7a2360baead3020e7ba6f450c63642d9 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Fri, 2 Jun 2017 11:16:10 +0200 Subject: [PATCH 1497/2747] Updated instructions to add new area and test --- test/smoke/README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/smoke/README.md b/test/smoke/README.md index 2cff1cd8b190e..947fb43969a39 100644 --- a/test/smoke/README.md +++ b/test/smoke/README.md @@ -10,13 +10,12 @@ If you want to include 'Data Migration' area tests use `npm test -- --latest pa * `./areas/` folder contains a `.ts` file per each area of the document. E.g. `'Search'` area goes under `'search.ts'`. Every area file contains a list of methods with the name that represents the action that can be performed in the corresponding test. This reduces the amount of test suite code and means that if the UI changes, the fix need only be applied in one place. The name of the method reflects the action the tester would do if he would perform the test manually. See [Selenium Page Objects Wiki](https://github.com/SeleniumHQ/selenium/wiki/PageObjects) and [Selenium Bot Style Tests Wiki](https://github.com/SeleniumHQ/selenium/wiki/Bot-Style-Tests) for a good explanation of the implementation. Every smoke test area contains methods that are used in a bot-style approach in `main.ts`. * `./spectron/` wraps the Spectron, with WebDriverIO API wrapped in `client.ts` and instance of Spectron Application is wrapped in `application.ts`. -* `./scripts/` contains scripts to run the smoke test. # Adding new area -To contribute a new smoke test area, add `${area}.ts` file under `./areas/`. All related tests to the area should go to the alike named file under `./tests/` This has to follow the bot-style approach described in the links mentioned above. Methods should be calling WebDriverIO API through `SpectronClient` class. If there is no existing WebDriverIO method, add it to the class. +To contribute a new smoke test area, add `${area}.ts` file under `./areas/`. All related tests to the area should go to the alike named file under `./tests/${area}.ts`. This has to follow the bot-style approach described in the links mentioned above. Methods should be calling WebDriverIO API through `SpectronClient` class. If there is no existing WebDriverIO method, add it to the class. # Adding new test -To add new test area or test, `main.ts` should be updated. The same instruction-style principle needs to be followed with the called area method names that reflect manual tester's actions. +To add new test, `./test/${area}.ts` should be updated. The same instruction-style principle needs to be followed with the called area method names that reflect manual tester's actions. # Debugging 1. Add the following configuration to launch.json, specifying binaries in `args`: @@ -37,4 +36,4 @@ To add new test area or test, `main.ts` should be updated. The same instruction- ] }, ``` -2. In main.js add `--debug-brk=9999` argument to the place where `src/mocha-runner.js` is spawned. \ No newline at end of file +2. In main.js add `--debug-brk=9999` argument to the place where `src/mocha-runner.js` is spawned. From 835be78328a03b492443a83b4faf4fef59c178db Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 2 Jun 2017 11:18:55 +0200 Subject: [PATCH 1498/2747] Have a good aria label when the editor has accessibility disabled (#27833) --- src/vs/editor/common/config/editorOptions.ts | 36 +++++++++----------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 5db649e062c76..2daf0ddac8f2e 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -1634,11 +1634,9 @@ export class EditorOptionsValidator { */ export class InternalEditorOptionsFactory { - private static _handlePerformanceCritical(opts: IValidatedEditorOptions, performanceCritical: boolean): IValidatedEditorOptions { - if (!performanceCritical) { - return opts; - } - + private static _tweakValidatedOptions(opts: IValidatedEditorOptions, accessibilitySupport: platform.AccessibilitySupport): IValidatedEditorOptions { + const accessibilityIsOn = (accessibilitySupport === platform.AccessibilitySupport.Enabled); + const accessibilityIsOff = (accessibilitySupport === platform.AccessibilitySupport.Disabled); return { inDiffEditor: opts.inDiffEditor, wordSeparators: opts.wordSeparators, @@ -1666,14 +1664,14 @@ export class InternalEditorOptionsFactory { extraEditorClassName: opts.viewInfo.extraEditorClassName, disableMonospaceOptimizations: opts.viewInfo.disableMonospaceOptimizations, rulers: opts.viewInfo.rulers, - ariaLabel: opts.viewInfo.ariaLabel, + ariaLabel: (accessibilityIsOff ? nls.localize('accessibilityOffAriaLabel', "The editor is not accessible at this time. Press Alt+F1 for options.") : opts.viewInfo.ariaLabel), renderLineNumbers: opts.viewInfo.renderLineNumbers, renderCustomLineNumbers: opts.viewInfo.renderCustomLineNumbers, renderRelativeLineNumbers: opts.viewInfo.renderRelativeLineNumbers, selectOnLineNumbers: opts.viewInfo.selectOnLineNumbers, glyphMargin: opts.viewInfo.glyphMargin, revealHorizontalRightPadding: opts.viewInfo.revealHorizontalRightPadding, - roundedSelection: false, // DISABLED + roundedSelection: (accessibilityIsOn ? false : opts.viewInfo.roundedSelection), // DISABLED WHEN SCREEN READER IS ATTACHED overviewRulerLanes: opts.viewInfo.overviewRulerLanes, overviewRulerBorder: opts.viewInfo.overviewRulerBorder, cursorBlinking: opts.viewInfo.cursorBlinking, @@ -1682,14 +1680,14 @@ export class InternalEditorOptionsFactory { hideCursorInOverviewRuler: opts.viewInfo.hideCursorInOverviewRuler, scrollBeyondLastLine: opts.viewInfo.scrollBeyondLastLine, stopRenderingLineAfter: opts.viewInfo.stopRenderingLineAfter, - renderWhitespace: 'none', // DISABLED - renderControlCharacters: false, // DISABLED - fontLigatures: false, // DISABLED - renderIndentGuides: false, // DISABLED - renderLineHighlight: 'none', // DISABLED + renderWhitespace: (accessibilityIsOn ? 'none' : opts.viewInfo.renderWhitespace), // DISABLED WHEN SCREEN READER IS ATTACHED + renderControlCharacters: (accessibilityIsOn ? false : opts.viewInfo.renderControlCharacters), // DISABLED WHEN SCREEN READER IS ATTACHED + fontLigatures: (accessibilityIsOn ? false : opts.viewInfo.fontLigatures), // DISABLED WHEN SCREEN READER IS ATTACHED + renderIndentGuides: (accessibilityIsOn ? false : opts.viewInfo.renderIndentGuides), // DISABLED WHEN SCREEN READER IS ATTACHED + renderLineHighlight: (accessibilityIsOn ? 'none' : opts.viewInfo.renderLineHighlight), // DISABLED WHEN SCREEN READER IS ATTACHED scrollbar: opts.viewInfo.scrollbar, minimap: { - enabled: false, // DISABLED + enabled: (accessibilityIsOn ? false : opts.viewInfo.minimap.enabled), // DISABLED WHEN SCREEN READER IS ATTACHED renderCharacters: opts.viewInfo.minimap.renderCharacters, maxColumn: opts.viewInfo.minimap.maxColumn }, @@ -1713,12 +1711,12 @@ export class InternalEditorOptionsFactory { wordBasedSuggestions: opts.contribInfo.wordBasedSuggestions, suggestFontSize: opts.contribInfo.suggestFontSize, suggestLineHeight: opts.contribInfo.suggestLineHeight, - selectionHighlight: false, // DISABLED - occurrencesHighlight: false, // DISABLED - codeLens: false, // DISABLED - folding: false, // DISABLED + selectionHighlight: (accessibilityIsOn ? false : opts.contribInfo.selectionHighlight), // DISABLED WHEN SCREEN READER IS ATTACHED + occurrencesHighlight: (accessibilityIsOn ? false : opts.contribInfo.occurrencesHighlight), // DISABLED WHEN SCREEN READER IS ATTACHED + codeLens: (accessibilityIsOn ? false : opts.contribInfo.codeLens), // DISABLED WHEN SCREEN READER IS ATTACHED + folding: (accessibilityIsOn ? false : opts.contribInfo.folding), // DISABLED WHEN SCREEN READER IS ATTACHED showFoldingControls: opts.contribInfo.showFoldingControls, - matchBrackets: false, // DISABLED + matchBrackets: (accessibilityIsOn ? false : opts.contribInfo.matchBrackets), // DISABLED WHEN SCREEN READER IS ATTACHED find: opts.contribInfo.find } }; @@ -1738,7 +1736,7 @@ export class InternalEditorOptionsFactory { // Disable some non critical features to get as best performance as possible // See https://github.com/Microsoft/vscode/issues/26730 - const opts = this._handlePerformanceCritical(_opts, (accessibilitySupport === platform.AccessibilitySupport.Enabled)); + const opts = this._tweakValidatedOptions(_opts, accessibilitySupport); let lineDecorationsWidth: number; if (typeof opts.lineDecorationsWidth === 'string' && /^\d+(\.\d+)?ch$/.test(opts.lineDecorationsWidth)) { From 309963a2d045d4fceaf29c4cde9be5603a2bcdae Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 2 Jun 2017 11:25:04 +0200 Subject: [PATCH 1499/2747] null guard fixes #27640 --- .../workbench/parts/debug/electron-browser/debugService.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 983d0cac31421..441ac578f43ee 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -506,7 +506,10 @@ export class DebugService implements debug.IDebugService { } const state = this.state; - this.debugState.set(debug.State[state].toLowerCase()); + const stateLabel = debug.State[state]; + if (stateLabel) { + this.debugState.set(stateLabel.toLowerCase()); + } this._onDidChangeState.fire(state); } From 9caf8d7642e3a11e346b0290377c1664cf30ba27 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 2 Jun 2017 11:35:21 +0200 Subject: [PATCH 1500/2747] Have other places respect `editor.accessibilitySupport` (#27833, #27893) --- .../contrib/gotoError/browser/gotoError.ts | 3 +- .../browser/parts/editor/editorStatus.ts | 30 +++++++++++++------ 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/vs/editor/contrib/gotoError/browser/gotoError.ts b/src/vs/editor/contrib/gotoError/browser/gotoError.ts index 69792d86b8e51..d0e1a23068b38 100644 --- a/src/vs/editor/contrib/gotoError/browser/gotoError.ts +++ b/src/vs/editor/contrib/gotoError/browser/gotoError.ts @@ -27,7 +27,6 @@ import { registerColor, oneOf } from 'vs/platform/theme/common/colorRegistry'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; import { Color } from 'vs/base/common/color'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; -import { getAccessibilitySupport } from 'vs/base/browser/browser'; import { AccessibilitySupport } from 'vs/base/common/platform'; import { editorErrorForeground, editorErrorBorder, editorWarningForeground, editorWarningBorder } from 'vs/editor/common/view/editorColorRegistry'; @@ -279,7 +278,7 @@ class MarkerNavigationWidget extends ZoneWidget { public show(where: Position, heightInLines: number): void { super.show(where, heightInLines); - if (getAccessibilitySupport() !== AccessibilitySupport.Disabled) { + if (this.editor.getConfiguration().accessibilitySupport !== AccessibilitySupport.Disabled) { this.focus(); } } diff --git a/src/vs/workbench/browser/parts/editor/editorStatus.ts b/src/vs/workbench/browser/parts/editor/editorStatus.ts index 831f68974712e..d17d44c54d971 100644 --- a/src/vs/workbench/browser/parts/editor/editorStatus.ts +++ b/src/vs/workbench/browser/parts/editor/editorStatus.ts @@ -14,7 +14,6 @@ import paths = require('vs/base/common/paths'); import types = require('vs/base/common/types'); import uri from 'vs/base/common/uri'; import errors = require('vs/base/common/errors'); -import * as browser from 'vs/base/browser/browser'; import { IStatusbarItem } from 'vs/workbench/browser/parts/statusbar/statusbar'; import { Action } from 'vs/base/common/actions'; import { language, LANGUAGE_DEFAULT, AccessibilitySupport } from 'vs/base/common/platform'; @@ -47,6 +46,7 @@ import { ITextFileService } from 'vs/workbench/services/textfile/common/textfile import { getCodeEditor as getEditorWidget } from 'vs/editor/common/services/codeEditorService'; import { IPreferencesService } from 'vs/workbench/parts/preferences/common/preferences'; import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; +import { IConfigurationChangedEvent } from "vs/editor/common/config/editorOptions"; function toEditorWithEncodingSupport(input: IEditorInput): IEncodingSupport { if (input instanceof SideBySideEditorInput) { @@ -329,9 +329,7 @@ export class EditorStatus implements IStatusbarItem { this.untitledEditorService.onDidChangeEncoding(r => this.onResourceEncodingChange(r)), this.textFileService.models.onModelEncodingChanged(e => this.onResourceEncodingChange(e.resource)), TabFocus.onDidChangeTabFocus(e => this.onTabFocusModeChange()), - browser.onDidChangeAccessibilitySupport(() => this.onScreenReaderModeChange()) ); - this.onScreenReaderModeChange(); return combinedDisposable(this.toDispose); } @@ -492,6 +490,7 @@ export class EditorStatus implements IStatusbarItem { const control = getEditorWidget(activeEditor); // Update all states + this.onScreenReaderModeChange(control); this.onSelectionChange(control); this.onModeChange(control); this.onEOLChange(control); @@ -505,6 +504,13 @@ export class EditorStatus implements IStatusbarItem { // Attach new listeners to active editor if (control) { + // Hook Listener for Configuration changes + this.activeEditorListeners.push(control.onDidChangeConfiguration((event: IConfigurationChangedEvent) => { + if (event.accessibilitySupport) { + this.onScreenReaderModeChange(control); + } + })); + // Hook Listener for Selection changes this.activeEditorListeners.push(control.onDidChangeCursorPosition((event: ICursorPositionChangedEvent) => { this.onSelectionChange(control); @@ -595,6 +601,18 @@ export class EditorStatus implements IStatusbarItem { this.updateState(update); } + private onScreenReaderModeChange(editorWidget: ICommonCodeEditor): void { + let screenReaderMode = false; + + // We only support text based editors + if (editorWidget) { + + screenReaderMode = (editorWidget.getConfiguration().accessibilitySupport === AccessibilitySupport.Enabled); + } + + this.updateState({ screenReaderMode: screenReaderMode }); + } + private onSelectionChange(editorWidget: ICommonCodeEditor): void { const info: IEditorSelectionStatus = {}; @@ -685,12 +703,6 @@ export class EditorStatus implements IStatusbarItem { this.updateState(info); } - private onScreenReaderModeChange(): void { - const info: StateDelta = { screenReaderMode: browser.getAccessibilitySupport() === AccessibilitySupport.Enabled }; - - this.updateState(info); - } - private isActiveEditor(e: IBaseEditor): boolean { const activeEditor = this.editorService.getActiveEditor(); From f8c4c5e6f85b10b0c2c0b0f914246083164af979 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 2 Jun 2017 11:41:31 +0200 Subject: [PATCH 1501/2747] fix schema comment, #27090 --- .../parts/snippets/electron-browser/snippets.contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts b/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts index 10a8b9e074d57..2e69a2d456e3c 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts @@ -145,7 +145,7 @@ let schema: IJSONSchema = { 'type': 'string' }, 'body': { - 'description': nls.localize('snippetSchema.json.body', 'The snippet content. Use \'${id}\', \'${id:label}\', \'${1:label}\' for variables and \'$0\', \'$1\' for the cursor positions'), + 'description': nls.localize('snippetSchema.json.body', 'The snippet content. Use \'$1\', \'${1:defaultText}\' to define cursor positions, use \'$0\' for the final cursor position. Insert variable values with \'${varName}\' and \'${varName:defaultText}\', e.g \'This is file: $TM_FILENAME\'.'), 'type': ['string', 'array'], 'items': { 'type': 'string' From ec164303925616b0779e88b51f840989d0cfd6d9 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 2 Jun 2017 11:52:22 +0200 Subject: [PATCH 1502/2747] fix brekpoint selection on click fixes #27835 --- src/vs/workbench/parts/debug/electron-browser/debugViewer.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index fabffd9ca160f..9653e86d58cd0 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -19,6 +19,7 @@ import { IActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { ITree, IAccessibilityProvider, ContextMenuEvent, IDataSource, IRenderer, DRAG_OVER_REJECT, IDragAndDropData, IDragOverReaction, IActionProvider } from 'vs/base/parts/tree/browser/tree'; import { InputBox, IInputValidationOptions } from 'vs/base/browser/ui/inputbox/inputBox'; import { DefaultController, DefaultDragAndDrop, ClickBehavior } from 'vs/base/parts/tree/browser/treeDefaults'; +import { Constants } from 'vs/editor/common/core/uint'; import { IContextViewService, IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; @@ -1272,7 +1273,9 @@ export class BreakpointsController extends BaseDebugController { endColumn: breakpoint.endColumn } : { startLineNumber: breakpoint.lineNumber, - startColumn: breakpoint.column || 1 + startColumn: breakpoint.column || 1, + endLineNumber: breakpoint.lineNumber, + endColumn: breakpoint.column || Constants.MAX_SAFE_SMALL_INTEGER }; this.editorService.openEditor({ From 2602410f20224bac2e72d84a6f2ca2f95e890aa7 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 2 Jun 2017 11:52:59 +0200 Subject: [PATCH 1503/2747] Guide the false-positive case towards the setting (#27893) --- src/vs/workbench/browser/parts/editor/editorStatus.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/parts/editor/editorStatus.ts b/src/vs/workbench/browser/parts/editor/editorStatus.ts index d17d44c54d971..12cf4abfe2ddf 100644 --- a/src/vs/workbench/browser/parts/editor/editorStatus.ts +++ b/src/vs/workbench/browser/parts/editor/editorStatus.ts @@ -226,7 +226,8 @@ const nlsMultiSelection = nls.localize('multiSelection', "{0} selections"); const nlsEOLLF = nls.localize('endOfLineLineFeed', "LF"); const nlsEOLCRLF = nls.localize('endOfLineCarriageReturnLineFeed', "CRLF"); const nlsTabFocusMode = nls.localize('tabFocusModeEnabled', "Tab moves focus"); -const nlsScreenReaderDetected = nls.localize('screenReaderDetected', "Screen reader detected"); +const nlsScreenReaderDetected = nls.localize('screenReaderDetected', "Screen Reader detected"); +const nlsScreenReaderDetectedTitle = nls.localize('screenReaderDetectedExtra', "If you are not using a Screen Reader, please change the setting `editor.accessibilitySupport` to off."); function _setDisplay(el: HTMLElement, desiredValue: string): void { if (el.style.display !== desiredValue) { @@ -282,6 +283,7 @@ export class EditorStatus implements IStatusbarItem { this.screenRedearModeElement = append(this.element, $('a.editor-status-screenreadermode.status-bar-info')); this.screenRedearModeElement.textContent = nlsScreenReaderDetected; + this.screenRedearModeElement.title = nlsScreenReaderDetectedTitle; hide(this.screenRedearModeElement); this.selectionElement = append(this.element, $('a.editor-status-selection')); From 1d65268de82f24b9123acd1fa6074b0acf9cd748 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 2 Jun 2017 11:55:18 +0200 Subject: [PATCH 1504/2747] Improve tooltip (#27893) --- src/vs/workbench/browser/parts/editor/editorStatus.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/parts/editor/editorStatus.ts b/src/vs/workbench/browser/parts/editor/editorStatus.ts index 12cf4abfe2ddf..ee9d12bbcd799 100644 --- a/src/vs/workbench/browser/parts/editor/editorStatus.ts +++ b/src/vs/workbench/browser/parts/editor/editorStatus.ts @@ -227,7 +227,7 @@ const nlsEOLLF = nls.localize('endOfLineLineFeed', "LF"); const nlsEOLCRLF = nls.localize('endOfLineCarriageReturnLineFeed', "CRLF"); const nlsTabFocusMode = nls.localize('tabFocusModeEnabled', "Tab moves focus"); const nlsScreenReaderDetected = nls.localize('screenReaderDetected', "Screen Reader detected"); -const nlsScreenReaderDetectedTitle = nls.localize('screenReaderDetectedExtra', "If you are not using a Screen Reader, please change the setting `editor.accessibilitySupport` to off."); +const nlsScreenReaderDetectedTitle = nls.localize('screenReaderDetectedExtra', "If you are not using a Screen Reader, please change the setting `editor.accessibilitySupport` to \"off\"."); function _setDisplay(el: HTMLElement, desiredValue: string): void { if (el.style.display !== desiredValue) { From 0aec2d6838b5e65cc74c33b853ffbd9fa191d636 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Fri, 2 Jun 2017 12:18:44 +0200 Subject: [PATCH 1505/2747] Fixed selector after eac49a321b84cb9828430e9dcd3f34243a3480f7 change. --- test/smoke/src/areas/git.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/smoke/src/areas/git.ts b/test/smoke/src/areas/git.ts index 58dcd1e9b3e86..9a088d46566f1 100644 --- a/test/smoke/src/areas/git.ts +++ b/test/smoke/src/areas/git.ts @@ -65,6 +65,6 @@ export class Git { } public getOutgoingChanges(): Promise { - return this.spectron.client.getText('a[title="Synchronize changes"]'); + return this.spectron.client.getText('a[title="Synchronize Changes"]'); } } \ No newline at end of file From f977399d58f7b64db35047fafe0c6e59e15f11d5 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 2 Jun 2017 12:28:44 +0200 Subject: [PATCH 1506/2747] fixes #27835 --- src/vs/workbench/parts/debug/electron-browser/debugViewer.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index 9653e86d58cd0..caddb78c3d343 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -1257,6 +1257,7 @@ export class BreakpointsController extends BaseDebugController { return true; } if (element instanceof Breakpoint) { + super.onLeftClick(tree, element, event); this.openBreakpointSource(element, event, event.detail !== 2); return true; } From d4c79504607a17718671a41e88b559bbb5ec0bd0 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 2 Jun 2017 15:27:09 +0200 Subject: [PATCH 1507/2747] don't scan snippets-dir on startup, only re-scan files with changes, #27908 --- .../snippets/electron-browser/TMSnippets.ts | 6 + .../electron-browser/snippetsTracker.ts | 118 +++++------------- 2 files changed, 40 insertions(+), 84 deletions(-) diff --git a/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts b/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts index 899bc5a55d89a..9098d608e8860 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts @@ -94,6 +94,12 @@ export function readAndRegisterSnippets( return readFile(filePath).then(fileContents => { let snippets = parseSnippetFile(fileContents.toString(), extensionName, collector); snippetService.registerSnippets(languageIdentifier.id, snippets, filePath); + }, err => { + if (err && err.code === 'ENOENT') { + snippetService.registerSnippets(languageIdentifier.id, [], filePath); + } else { + throw err; + } }); } diff --git a/src/vs/workbench/parts/snippets/electron-browser/snippetsTracker.ts b/src/vs/workbench/parts/snippets/electron-browser/snippetsTracker.ts index e143e7258ae0f..2ecbc3150fb58 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/snippetsTracker.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/snippetsTracker.ts @@ -5,114 +5,64 @@ 'use strict'; -import workbenchExt = require('vs/workbench/common/contributions'); +import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { join } from 'path'; -import async = require('vs/base/common/async'); -import winjs = require('vs/base/common/winjs.base'); -import { mkdirp, fileExists, readdir } from 'vs/base/node/pfs'; +import { mkdirp, fileExists } from 'vs/base/node/pfs'; import { onUnexpectedError } from 'vs/base/common/errors'; -import lifecycle = require('vs/base/common/lifecycle'); +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { readAndRegisterSnippets } from './TMSnippets'; import { ISnippetsService } from 'vs/workbench/parts/snippets/electron-browser/snippetsService'; -import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; -import { watch, FSWatcher } from 'fs'; +import { watch } from 'fs'; import { IModeService } from 'vs/editor/common/services/modeService'; -export class SnippetsTracker implements workbenchExt.IWorkbenchContribution { - private static FILE_WATCH_DELAY = 200; +export class SnippetsTracker implements IWorkbenchContribution { - private snippetFolder: string; - private toDispose: lifecycle.IDisposable[]; - private watcher: FSWatcher; - private fileWatchDelayer: async.ThrottledDelayer; + private readonly _snippetFolder: string; + private readonly _toDispose: IDisposable[]; constructor( - @ILifecycleService private lifecycleService: ILifecycleService, - @IModeService private modeService: IModeService, - @ISnippetsService private snippetService: ISnippetsService, + @IModeService modeService: IModeService, + @ISnippetsService snippetService: ISnippetsService, @IEnvironmentService environmentService: IEnvironmentService, @IExtensionService extensionService: IExtensionService ) { - this.snippetFolder = join(environmentService.appSettingsHome, 'snippets'); + this._snippetFolder = join(environmentService.appSettingsHome, 'snippets'); + this._toDispose = []; - this.toDispose = []; - this.fileWatchDelayer = new async.ThrottledDelayer(SnippetsTracker.FILE_WATCH_DELAY); + // Whenever a mode is being created check if a snippet file exists + // and iff so read all snippets from it. + this._toDispose.push(modeService.onDidCreateMode(mode => { + const snippetPath = join(this._snippetFolder, `${mode.getId()}.json`); + fileExists(snippetPath) + .then(exists => exists && readAndRegisterSnippets(snippetService, mode.getLanguageIdentifier(), snippetPath)) + .done(undefined, onUnexpectedError); + })); - extensionService.onReady() - .then(() => mkdirp(this.snippetFolder)) - .then(() => this.scanUserSnippets()) - .then(() => this.registerListeners()) - .done(undefined, onUnexpectedError); - } - - private registerListeners(): void { - var scheduler = new async.RunOnceScheduler(() => { - this.scanUserSnippets(); - }, 500); - this.toDispose.push(scheduler); - - try { - this.watcher = watch(this.snippetFolder); // will be persistent but not recursive - this.watcher.on('change', (eventType: string) => { - if (eventType === 'delete') { - this.unregisterListener(); + // Install a FS watcher on the snippet directory and when an + // event occurs update the snippets for that one snippet. + mkdirp(this._snippetFolder).then(() => { + const watcher = watch(this._snippetFolder); + this._toDispose.push({ dispose: () => watcher.close() }); + watcher.on('change', (type, filename) => { + if (typeof filename !== 'string') { return; } - scheduler.schedule(); + extensionService.onReady().then(() => { + const langName = filename.replace(/\.json$/, '').toLowerCase(); + const langId = modeService.getLanguageIdentifier(langName); + return langId && readAndRegisterSnippets(snippetService, langId, join(this._snippetFolder, filename)); + }, onUnexpectedError); }); - } catch (error) { - // the path might not exist anymore, ignore this error and return - } - - this.lifecycleService.onShutdown(this.dispose, this); - } - - private scanUserSnippets(): winjs.Promise { - return readFilesInDir(this.snippetFolder, /\.json$/).then(snippetFiles => { - return winjs.TPromise.join(snippetFiles.map(snippetFile => { - var modeId = snippetFile.replace(/\.json$/, '').toLowerCase(); - var snippetPath = join(this.snippetFolder, snippetFile); - let languageIdentifier = this.modeService.getLanguageIdentifier(modeId); - if (languageIdentifier) { - return readAndRegisterSnippets(this.snippetService, languageIdentifier, snippetPath); - } - return undefined; - })); }); } - private unregisterListener(): void { - if (this.watcher) { - this.watcher.close(); - this.watcher = null; - } - } - - public getId(): string { + getId(): string { return 'vs.snippets.snippetsTracker'; } - public dispose(): void { - this.unregisterListener(); - this.toDispose = lifecycle.dispose(this.toDispose); + dispose(): void { + dispose(this._toDispose); } } - -function readFilesInDir(dirPath: string, namePattern: RegExp = null): winjs.TPromise { - return readdir(dirPath).then((children) => { - return winjs.TPromise.join( - children.map((child) => { - if (namePattern && !namePattern.test(child)) { - return winjs.TPromise.as(null); - } - return fileExists(join(dirPath, child)).then(isFile => { - return isFile ? child : null; - }); - }) - ).then((subdirs) => { - return subdirs.filter(subdir => (subdir !== null)); - }); - }); -} From e10bb6e4fbcc42765eef634234a41c4af4dd5c1b Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Fri, 2 Jun 2017 16:31:55 +0200 Subject: [PATCH 1508/2747] Bump to 1.14 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f423138397b9f..333ee2253b61c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "code-oss-dev", - "version": "1.13.0", + "version": "1.14.0", "electronVersion": "1.6.6", "distro": "cb257c519d1ee526acfd00c0a7adc6b0fa4c18d2", "author": { From fcfdfd8b9050973a6f2c22975ef4f585bde0c776 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Fri, 2 Jun 2017 07:53:16 -0700 Subject: [PATCH 1509/2747] Configure automatic labelling of issues for insiders (#26223) --- .github/insiders.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .github/insiders.yml diff --git a/.github/insiders.yml b/.github/insiders.yml new file mode 100644 index 0000000000000..28192b556e5b9 --- /dev/null +++ b/.github/insiders.yml @@ -0,0 +1,4 @@ +{ + insidersLabel: 'insiders', + perform: true +} \ No newline at end of file From c4081f0d07472090ececc14207e5c33d5dd511ae Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 1 Jun 2017 16:42:18 -0700 Subject: [PATCH 1510/2747] Continue tweaking tsc mismatch message --- extensions/typescript/src/features/bufferSyncSupport.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/typescript/src/features/bufferSyncSupport.ts b/extensions/typescript/src/features/bufferSyncSupport.ts index 90b989b77a444..9cdaf802b2188 100644 --- a/extensions/typescript/src/features/bufferSyncSupport.ts +++ b/extensions/typescript/src/features/bufferSyncSupport.ts @@ -298,7 +298,7 @@ export default class BufferSyncSupport { } if (tscVersion && tscVersion !== this.client.apiVersion.versionString) { window.showInformationMessage( - localize('versionMismatch', 'Using TypeScript ({1}) for editor features. TypeScript ({0}) is installed globally on your machine. Inconsistent compile errors may occur', tscVersion, this.client.apiVersion.versionString), + localize('versionMismatch', 'Using TypeScript ({1}) for editor features. TypeScript ({0}) is installed globally on your machine. Errors in VS Code may differ from TSC errors', tscVersion, this.client.apiVersion.versionString), { title: localize('moreInformation', 'More Information'), id: 1 From fdbdf32717c4f73b3d5be48e13db6fa2473345ec Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 2 Jun 2017 13:37:01 -0700 Subject: [PATCH 1511/2747] Extract typescript service configuration to a class --- .../typescript/src/typescriptServiceClient.ts | 163 ++++++++++-------- 1 file changed, 88 insertions(+), 75 deletions(-) diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index d5e718bb34c1d..5dbe275c7ae1c 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -94,6 +94,68 @@ interface MyMessageItem extends MessageItem { id: MessageAction; } +class TypeScriptServiceConfiguration { + public readonly globalTsdk: string | null; + public readonly localTsdk: string | null; + public readonly npmLocation: string | null; + public readonly tsServerLogLevel: TsServerLogLevel = TsServerLogLevel.Off; + public readonly checkJs: boolean; + + public static loadFromWorkspace(): TypeScriptServiceConfiguration { + return new TypeScriptServiceConfiguration(); + } + + private constructor() { + const configuration = workspace.getConfiguration(); + + this.globalTsdk = TypeScriptServiceConfiguration.extractGlobalTsdk(configuration); + this.localTsdk = TypeScriptServiceConfiguration.extractLocalTsdk(configuration); + this.npmLocation = TypeScriptServiceConfiguration.readNpmLocation(configuration); + this.tsServerLogLevel = TypeScriptServiceConfiguration.readTsServerLogLevel(configuration); + this.checkJs = TypeScriptServiceConfiguration.readCheckJs(configuration); + } + + public isEqualTo(other: TypeScriptServiceConfiguration): boolean { + return this.globalTsdk === other.globalTsdk + && this.localTsdk === other.localTsdk + && this.npmLocation === other.npmLocation + && this.tsServerLogLevel === other.tsServerLogLevel + && this.checkJs === other.checkJs; + } + + private static extractGlobalTsdk(configuration: WorkspaceConfiguration): string | null { + let inspect = configuration.inspect('typescript.tsdk'); + if (inspect && inspect.globalValue && 'string' === typeof inspect.globalValue) { + return inspect.globalValue; + } + if (inspect && inspect.defaultValue && 'string' === typeof inspect.defaultValue) { + return inspect.defaultValue; + } + return null; + } + + private static extractLocalTsdk(configuration: WorkspaceConfiguration): string | null { + let inspect = configuration.inspect('typescript.tsdk'); + if (inspect && inspect.workspaceValue && 'string' === typeof inspect.workspaceValue) { + return inspect.workspaceValue; + } + return null; + } + + private static readTsServerLogLevel(configuration: WorkspaceConfiguration): TsServerLogLevel { + const setting = configuration.get('typescript.tsserver.log', 'off'); + return TsServerLogLevel.fromString(setting); + } + + private static readCheckJs(configuration: WorkspaceConfiguration): boolean { + return configuration.get('javascript.implicitProjectConfig.checkJs', false); + } + + private static readNpmLocation(configuration: WorkspaceConfiguration): string | null { + return configuration.get('typescript.npm', null); + } +} + export default class TypeScriptServiceClient implements ITypescriptServiceClient { private static useWorkspaceTsdkStorageKey = 'typescript.useWorkspaceTsdk'; private static tsdkMigratedStorageKey = 'typescript.tsdkMigrated'; @@ -108,15 +170,12 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private modulePath: string | undefined; private _onReady: { promise: Promise; resolve: () => void; reject: () => void; }; - private globalTsdk: string | null; - private localTsdk: string | null; - private npmLocation: string | null; + private configuration: TypeScriptServiceConfiguration; private _checkGlobalTSCVersion: boolean; private _experimentalAutoBuild: boolean; private tracer: Tracer; private readonly logger: Logger = new Logger(); private tsServerLogFile: string | null = null; - private tsServerLogLevel: TsServerLogLevel = TsServerLogLevel.Off; private servicePromise: Thenable | null; private lastError: Error | null; private reader: Reader; @@ -136,7 +195,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private _apiVersion: API; private telemetryReporter: TelemetryReporter; - private checkJs: boolean; constructor( host: ITypescriptServiceClientHost, @@ -168,42 +226,27 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.requestQueue = []; this.pendingResponses = 0; this.callbacks = Object.create(null); - const configuration = workspace.getConfiguration(); - this.globalTsdk = this.extractGlobalTsdk(configuration); - this.localTsdk = this.extractLocalTsdk(configuration); - this.npmLocation = configuration.get('typescript.npm', null); + this.configuration = TypeScriptServiceConfiguration.loadFromWorkspace(); this._experimentalAutoBuild = false; // configuration.get('typescript.tsserver.experimentalAutoBuild', false); this._apiVersion = new API('1.0.0'); this._checkGlobalTSCVersion = true; this.tracer = new Tracer(this.logger); - this.tsServerLogLevel = this.readTsServerLogLevel(); - this.checkJs = this.readCheckJs(); disposables.push(workspace.onDidChangeConfiguration(() => { - let oldLoggingLevel = this.tsServerLogLevel; - let oldglobalTsdk = this.globalTsdk; - let oldLocalTsdk = this.localTsdk; - let oldCheckJs = this.checkJs; - const oldNpmLocation = this.npmLocation; + const oldConfiguration = this.configuration; + this.configuration = TypeScriptServiceConfiguration.loadFromWorkspace(); this.tracer.updateConfiguration(); - this.tsServerLogLevel = this.readTsServerLogLevel(); - - const configuration = workspace.getConfiguration(); - this.globalTsdk = this.extractGlobalTsdk(configuration); - this.localTsdk = this.extractLocalTsdk(configuration); - this.checkJs = this.readCheckJs(); - this.npmLocation = configuration.get('typescript.npm', null); - if (this.servicePromise && oldCheckJs !== this.checkJs) { - this.setCompilerOptionsForInferredProjects(); - } + if (this.servicePromise) { + if (this.configuration.checkJs !== oldConfiguration.checkJs) { + this.setCompilerOptionsForInferredProjects(); + } - if (this.servicePromise === null && (oldglobalTsdk !== this.globalTsdk || oldLocalTsdk !== this.localTsdk)) { - this.startService(); - } else if (this.servicePromise !== null && (this.tsServerLogLevel !== oldLoggingLevel || oldglobalTsdk !== this.globalTsdk || oldLocalTsdk !== this.localTsdk || oldNpmLocation !== this.npmLocation)) { - this.restartTsServer(); + if (!this.configuration.isEqualTo(oldConfiguration)) { + this.restartTsServer(); + } } })); this.telemetryReporter = new TelemetryReporter(); @@ -213,12 +256,11 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient public restartTsServer(): void { const start = () => { - this.tsServerLogLevel = this.readTsServerLogLevel(); this.servicePromise = this.startService(); return this.servicePromise; }; - if (this.servicePromise !== null) { + if (this.servicePromise) { this.servicePromise = this.servicePromise.then(cp => { if (cp) { cp.kill(); @@ -229,26 +271,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } } - - private extractGlobalTsdk(configuration: WorkspaceConfiguration): string | null { - let inspect = configuration.inspect('typescript.tsdk'); - if (inspect && inspect.globalValue && 'string' === typeof inspect.globalValue) { - return inspect.globalValue; - } - if (inspect && inspect.defaultValue && 'string' === typeof inspect.defaultValue) { - return inspect.defaultValue; - } - return null; - } - - private extractLocalTsdk(configuration: WorkspaceConfiguration): string | null { - let inspect = configuration.inspect('typescript.tsdk'); - if (inspect && inspect.workspaceValue && 'string' === typeof inspect.workspaceValue) { - return inspect.workspaceValue; - } - return null; - } - get onProjectLanguageServiceStateChanged(): Event { return this._onProjectLanguageServiceStateChanged.event; } @@ -265,15 +287,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient return this._onTypesInstallerInitializationFailed.event; } - private readTsServerLogLevel(): TsServerLogLevel { - const setting = workspace.getConfiguration().get('typescript.tsserver.log', 'off'); - return TsServerLogLevel.fromString(setting); - } - - private readCheckJs(): boolean { - return workspace.getConfiguration().get('javascript.implicitProjectConfig.checkJs', false); - } - public get experimentalAutoBuild(): boolean { return this._experimentalAutoBuild; } @@ -333,12 +346,12 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient return null; } - if (this.localTsdk) { + if (this.configuration.localTsdk) { this._checkGlobalTSCVersion = false; - if ((path).isAbsolute(this.localTsdk)) { - return path.join(this.localTsdk, 'tsserver.js'); + if ((path).isAbsolute(this.configuration.localTsdk)) { + return path.join(this.configuration.localTsdk, 'tsserver.js'); } - return path.join(workspace.rootPath, this.localTsdk, 'tsserver.js'); + return path.join(workspace.rootPath, this.configuration.localTsdk, 'tsserver.js'); } const localModulePath = path.join(workspace.rootPath, 'node_modules', 'typescript', 'lib', 'tsserver.js'); @@ -349,12 +362,12 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } private get globalTypescriptPath(): string { - if (this.globalTsdk) { + if (this.configuration.globalTsdk) { this._checkGlobalTSCVersion = false; - if ((path).isAbsolute(this.globalTsdk)) { - return path.join(this.globalTsdk, 'tsserver.js'); + if ((path).isAbsolute(this.configuration.globalTsdk)) { + return path.join(this.configuration.globalTsdk, 'tsserver.js'); } else if (workspace.rootPath) { - return path.join(workspace.rootPath, this.globalTsdk, 'tsserver.js'); + return path.join(workspace.rootPath, this.configuration.globalTsdk, 'tsserver.js'); } } @@ -362,7 +375,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } private hasWorkspaceTsdkSetting(): boolean { - return !!this.localTsdk; + return !!this.configuration.localTsdk; } private startService(resendModels: boolean = false): Thenable { @@ -457,7 +470,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } if (this.apiVersion.has222Features()) { - if (this.tsServerLogLevel !== TsServerLogLevel.Off) { + if (this.configuration.tsServerLogLevel !== TsServerLogLevel.Off) { try { const logDir = fs.mkdtempSync(path.join(os.tmpdir(), `vscode-tsserver-log-`)); this.tsServerLogFile = path.join(logDir, `tsserver.log`); @@ -467,7 +480,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } if (this.tsServerLogFile) { - args.push('--logVerbosity', TsServerLogLevel.toString(this.tsServerLogLevel)); + args.push('--logVerbosity', TsServerLogLevel.toString(this.configuration.tsServerLogLevel)); args.push('--logFile', this.tsServerLogFile); } } @@ -483,8 +496,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } if (this.apiVersion.has234Features()) { - if (this.npmLocation) { - args.push('--npmLocation', `"${this.npmLocation}"`); + if (this.configuration.npmLocation) { + args.push('--npmLocation', `"${this.configuration.npmLocation}"`); } } @@ -649,7 +662,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient .then(() => false); } - if (this.tsServerLogLevel === TsServerLogLevel.Off) { + if (this.configuration.tsServerLogLevel === TsServerLogLevel.Off) { return window.showErrorMessage( localize( 'typescript.openTsServerLog.loggingNotEnabled', From a88d97d63edef71f5a574616a5c045839e25f4ca Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Fri, 2 Jun 2017 14:23:48 -0700 Subject: [PATCH 1512/2747] Title case (#27569) --- extensions/merge-conflict/src/mergeDecorator.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts index d30863eca9ae9..f988eef1fedea 100644 --- a/extensions/merge-conflict/src/mergeDecorator.ts +++ b/extensions/merge-conflict/src/mergeDecorator.ts @@ -84,7 +84,7 @@ export default class MergeDectorator implements vscode.Disposable { outlineWidth: '1pt', outlineColor: new vscode.ThemeColor('merge.border'), after: { - contentText: ' ' + localize('currentChange', '(Current change)'), + contentText: ' ' + localize('currentChange', '(Current Change)'), color: new vscode.ThemeColor('descriptionForeground') } }); @@ -105,7 +105,7 @@ export default class MergeDectorator implements vscode.Disposable { outlineColor: new vscode.ThemeColor('merge.border'), isWholeLine: this.decorationUsesWholeLine, after: { - contentText: ' ' + localize('incomingChange', '(Incoming change)'), + contentText: ' ' + localize('incomingChange', '(Incoming Change)'), color: new vscode.ThemeColor('descriptionForeground') } }); From 6a01ff4870d45ecec8ada0f8e48dc24fcbc0b1b0 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 2 Jun 2017 14:14:10 -0700 Subject: [PATCH 1513/2747] Remove old tscheck migration logic --- extensions/typescript/src/typescriptMain.ts | 5 ++-- .../typescript/src/typescriptServiceClient.ts | 25 +++---------------- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 3938f9888f2ff..197cff2b6ef76 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -94,7 +94,7 @@ export function activate(context: ExtensionContext): void { let clientHost: TypeScriptServiceClientHost | undefined; return () => { if (!clientHost) { - clientHost = new TypeScriptServiceClientHost(standardLanguageDescriptions, context.storagePath, context.globalState, context.workspaceState, plugins); + clientHost = new TypeScriptServiceClientHost(standardLanguageDescriptions, context.storagePath, context.workspaceState, plugins); context.subscriptions.push(clientHost); const host = clientHost; @@ -457,7 +457,6 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { constructor( descriptions: LanguageDescription[], storagePath: string | undefined, - globalState: Memento, workspaceState: Memento, plugins: TypeScriptServerPlugin[] ) { @@ -479,7 +478,7 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { this.versionStatus = new VersionStatus(); this.disposables.push(this.versionStatus); - this.client = new TypeScriptServiceClient(this, storagePath, globalState, workspaceState, this.versionStatus, plugins, this.disposables); + this.client = new TypeScriptServiceClient(this, storagePath, workspaceState, this.versionStatus, plugins, this.disposables); this.languagePerId = Object.create(null); for (const description of descriptions) { const manager = new LanguageProvider(this.client, description); diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 5dbe275c7ae1c..84f35f4f11c8f 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -163,9 +163,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private static readonly WALK_THROUGH_SNIPPET_SCHEME = 'walkThroughSnippet'; private static readonly WALK_THROUGH_SNIPPET_SCHEME_COLON = `${TypeScriptServiceClient.WALK_THROUGH_SNIPPET_SCHEME}:`; - private host: ITypescriptServiceClientHost; - private storagePath: string | undefined; - private globalState: Memento; private pathSeparator: string; private modulePath: string | undefined; @@ -197,18 +194,13 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private telemetryReporter: TelemetryReporter; constructor( - host: ITypescriptServiceClientHost, - storagePath: string | undefined, - globalState: Memento, + private readonly host: ITypescriptServiceClientHost, + private readonly storagePath: string | undefined, private readonly workspaceState: Memento, private readonly versionStatus: VersionStatus, - - private plugins: TypeScriptServerPlugin[], + private readonly plugins: TypeScriptServerPlugin[], disposables: Disposable[] ) { - this.host = host; - this.storagePath = storagePath; - this.globalState = globalState; this.pathSeparator = path.sep; this.lastStart = Date.now(); @@ -400,8 +392,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient return this.getDebugPort().then(debugPort => ({ modulePath, debugPort })); }).then(({ modulePath, debugPort }) => { return this.servicePromise = new Promise((resolve, reject) => { - const tsConfig = workspace.getConfiguration('typescript'); - this.info(`Using tsserver from: ${modulePath}`); if (!fs.existsSync(modulePath)) { window.showWarningMessage(localize('noServerFound', 'The path {0} doesn\'t point to a valid tsserver install. Falling back to bundled TypeScript version.', modulePath ? path.dirname(modulePath) : '')); @@ -426,15 +416,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.versionStatus.showHideStatus(); this.versionStatus.setInfo(label, tooltip); - // This is backwards compatibility code to move the setting from the local - // store into the workspace setting file. - const doGlobalVersionCheckKey: string = 'doGlobalVersionCheck'; - const globalStateValue = this.globalState.get(doGlobalVersionCheckKey, true); - const checkTscVersion = 'check.tscVersion'; - if (!globalStateValue) { - tsConfig.update(checkTscVersion, false, true); - this.globalState.update(doGlobalVersionCheckKey, true); - } this.sequenceNumber = 0; this.requestQueue = []; From fcd65cc862bed7bddfc43f24f938ff62406e9cd4 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 2 Jun 2017 14:33:24 -0700 Subject: [PATCH 1514/2747] Ensure terminal pty is ready before sendText is called Fixes #27939 --- .../electron-browser/terminalInstance.ts | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index bb4237e7aad75..4b70c062ba879 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -31,6 +31,7 @@ import { TerminalLinkHandler } from 'vs/workbench/parts/terminal/electron-browse import { TerminalWidgetManager } from 'vs/workbench/parts/terminal/browser/terminalWidgetManager'; import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; import { scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground } from 'vs/platform/theme/common/colorRegistry'; +import { TPromise } from "vs/base/common/winjs.base"; /** The amount of time to consider terminal errors to be related to the launch */ const LAUNCHING_DURATION = 500; @@ -56,6 +57,7 @@ export class TerminalInstance implements ITerminalInstance { private _hadFocusOnExit: boolean; private _isLaunching: boolean; private _isVisible: boolean; + private _processReady: TPromise; private _isDisposed: boolean; private _onDisposed: Emitter; private _onDataForApi: Emitter<{ instance: ITerminalInstance, data: string }>; @@ -115,6 +117,11 @@ export class TerminalInstance implements ITerminalInstance { this._onProcessIdReady = new Emitter(); this._onTitleChanged = new Emitter(); + // Create a promise that resolves when the pty is ready + this._processReady = new TPromise(c => { + this.onProcessIdReady(() => c(void 0)); + }); + this._initDimensions(); this._createProcess(this._contextService.getWorkspace(), this._shellLaunchConfig); this._createXterm(); @@ -376,13 +383,15 @@ export class TerminalInstance implements ITerminalInstance { } public sendText(text: string, addNewLine: boolean): void { - text = this._sanitizeInput(text); - if (addNewLine && text.substr(text.length - 1) !== '\r') { - text += '\r'; - } - this._process.send({ - event: 'input', - data: text + this._processReady.then(() => { + text = this._sanitizeInput(text); + if (addNewLine && text.substr(text.length - 1) !== '\r') { + text += '\r'; + } + this._process.send({ + event: 'input', + data: text + }); }); } From 6e8b0229b874a1b0a426522e9650ba1d9a8baaf8 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 2 Jun 2017 14:44:44 -0700 Subject: [PATCH 1515/2747] Enforce a minimum for markdown.preview.fontSize Fixes #27797 --- extensions/markdown/src/previewContentProvider.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/markdown/src/previewContentProvider.ts b/extensions/markdown/src/previewContentProvider.ts index caacead613e18..44531e5b62e46 100644 --- a/extensions/markdown/src/previewContentProvider.ts +++ b/extensions/markdown/src/previewContentProvider.ts @@ -76,8 +76,8 @@ class MarkdownPreviewConfig { this.markEditorSelection = !!markdownConfig.get('preview.markEditorSelection', true); this.fontFamily = markdownConfig.get('preview.fontFamily', undefined); - this.fontSize = +markdownConfig.get('preview.fontSize', NaN); - this.lineHeight = +markdownConfig.get('preview.lineHeight', NaN); + this.fontSize = Math.max(8, +markdownConfig.get('preview.fontSize', NaN)); + this.lineHeight = Math.max(0.6, +markdownConfig.get('preview.lineHeight', NaN)); this.styles = markdownConfig.get('styles', []); } @@ -176,8 +176,8 @@ export class MDDocumentContentProvider implements vscode.TextDocumentContentProv return ``; } From c353e6e9b09727ce112bfdced4669a3fd4c184da Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 2 Jun 2017 14:53:10 -0700 Subject: [PATCH 1516/2747] Fix configure ts/jsconfig.json inserting duplicate snippet for unsaved file. Fixes #27793 --- extensions/typescript/src/typescriptMain.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 197cff2b6ef76..e217aa0040096 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -593,7 +593,13 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { }, _ => { return workspace.openTextDocument(configFile.with({ scheme: 'untitled' })) .then(doc => window.showTextDocument(doc, col)) - .then(editor => editor.insertSnippet(new SnippetString('{\n\t$0\n}'))); + .then(editor => { + if (editor.document.getText().length === 0) { + return editor.insertSnippet(new SnippetString('{\n\t$0\n}')) + .then(_ => editor); + } + return editor; + }); }); case ProjectConfigAction.LearnMore: From 0d01d06096ebe77567a2db57feca822e5ac196d0 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Fri, 2 Jun 2017 15:28:40 -0700 Subject: [PATCH 1517/2747] Fixes #27956 --- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 7bec683cacf88..f12fe31c3938b 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -932,6 +932,7 @@ export class SuggestWidget implements IContentWidget, IDelegate } private adjustDocsPosition() { + const lineHeight = this.editor.getConfiguration().fontInfo.lineHeight; const cursorCoords = this.editor.getScrolledVisiblePosition(this.editor.getPosition()); const editorCoords = getDomNodePagePosition(this.editor.getDomNode()); const cursorX = editorCoords.left + cursorCoords.left; @@ -946,8 +947,11 @@ export class SuggestWidget implements IContentWidget, IDelegate removeClass(this.element, 'list-right'); } + // Compare top of the cursor (cursorY - lineheight) with widgetTop to determine if + // margin-top needs to be applied on list to make it appear right above the cursor + // Cannot compare cursorY directly as it may be a few decimals off due to zoooming if (hasClass(this.element, 'docs-side') - && cursorY > widgetY + && cursorY - lineHeight > widgetY && this.details.element.offsetHeight > this.listElement.offsetHeight) { // Fix for #26416 From 85e31cfacb2b8228da1c66877dc39e60b0ab3d99 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Fri, 2 Jun 2017 17:39:35 -0700 Subject: [PATCH 1518/2747] Set maxheight on docs dynamically #27954 --- .../contrib/suggest/browser/media/suggest.css | 1 - .../contrib/suggest/browser/suggestWidget.ts | 15 ++++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index 0fc6559fdf1c8..a154e7c1959f0 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -210,7 +210,6 @@ /** Styles for the docs of the completion item in focus **/ .monaco-editor .suggest-widget .details { - max-height: 216px; display: flex; flex-direction: column; cursor: default; diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index f12fe31c3938b..1c7a97e314b5f 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -34,6 +34,7 @@ import { IStorageService, StorageScope } from 'vs/platform/storage/common/storag const sticky = false; // for development purposes const expandSuggestionDocsByDefault = false; +const maxSuggestionsToShow = 12; interface ISuggestionTemplateData { root: HTMLElement; @@ -852,6 +853,7 @@ export class SuggestWidget implements IContentWidget, IDelegate show(this.details.element); this.renderDetails(); + this.details.element.style.maxHeight = this.maxWidgetHeight + 'px'; // Reset margin-top that was set as Fix for #26416 this.listElement.style.marginTop = '0px'; @@ -909,17 +911,12 @@ export class SuggestWidget implements IContentWidget, IDelegate private updateListHeight(): number { let height = 0; - let maxSuggestionsToShow = 11; if (this.state === State.Empty || this.state === State.Loading) { height = this.unfocusedHeight; } else { - const focus = this.list.getFocusedElements()[0]; - const focusHeight = focus ? this.getHeight(focus) : this.unfocusedHeight; - height = focusHeight; - - const suggestionCount = (this.list.contentHeight - focusHeight) / this.unfocusedHeight; - height += Math.min(suggestionCount, maxSuggestionsToShow) * this.unfocusedHeight; + const suggestionCount = this.list.contentHeight / this.unfocusedHeight; + height = Math.min(suggestionCount, maxSuggestionsToShow) * this.unfocusedHeight; } this.element.style.lineHeight = `${this.unfocusedHeight}px`; @@ -981,8 +978,8 @@ export class SuggestWidget implements IContentWidget, IDelegate // Heights - private get focusHeight(): number { - return this.unfocusedHeight * 2; + private get maxWidgetHeight(): number { + return this.unfocusedHeight * maxSuggestionsToShow; } private get unfocusedHeight(): number { From f05594583bd8aca277d2f9b50658edf1314916d3 Mon Sep 17 00:00:00 2001 From: Chun Hei Ernest Wong Date: Sat, 3 Jun 2017 22:35:16 -0700 Subject: [PATCH 1519/2747] Added editor.urlClickable setting to enable/disable clickable URL --- src/vs/editor/common/config/commonEditorConfig.ts | 5 +++++ src/vs/editor/common/config/editorOptions.ts | 15 ++++++++++++++- src/vs/editor/contrib/links/browser/links.ts | 2 +- src/vs/monaco.d.ts | 6 ++++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 2d54be1a83297..7fddb2add18ac 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -562,6 +562,11 @@ const editorConfiguration: IConfigurationNode = { 'default': EDITOR_DEFAULTS.accessibilitySupport, 'description': nls.localize('accessibilitySupport', "Controls whether the editor should run in a mode where it is optimized for screen readers.") }, + 'editor.urlClickable': { + 'type': 'boolean', + 'default': EDITOR_DEFAULTS.urlClickable, + 'description': nls.localize('urlClickable', "Controls whether the editor should underline any URL and make them clickable through CTRL-Left Click") + }, 'diffEditor.renderSideBySide': { 'type': 'boolean', 'default': true, diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 2daf0ddac8f2e..08009bb9b47d9 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -341,6 +341,11 @@ export interface IEditorOptions { * Defaults to 'auto'. It is best to leave this to 'auto'. */ accessibilitySupport?: 'auto' | 'off' | 'on'; + /** + * Enable underlining URL and make it as a clickable link through CTRL-click + * Defaults to true. + */ + urlClickable?: boolean; /** * Enable quick suggestions (shadow suggestions) * Defaults to true. @@ -795,6 +800,7 @@ export interface IValidatedEditorOptions { readonly useTabStops: boolean; readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; readonly accessibilitySupport: 'auto' | 'off' | 'on'; + readonly urlClickable: boolean; readonly viewInfo: InternalEditorViewOptions; readonly contribInfo: EditorContribOptions; @@ -816,6 +822,7 @@ export class InternalEditorOptions { */ readonly accessibilitySupport: platform.AccessibilitySupport; readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; + readonly urlClickable: boolean; // ---- cursor options readonly wordSeparators: string; @@ -854,6 +861,7 @@ export class InternalEditorOptions { viewInfo: InternalEditorViewOptions; wrappingInfo: EditorWrappingInfo; contribInfo: EditorContribOptions; + urlClickable: boolean; }) { this.canUseTranslate3d = source.canUseTranslate3d; this.pixelRatio = source.pixelRatio; @@ -873,6 +881,7 @@ export class InternalEditorOptions { this.viewInfo = source.viewInfo; this.wrappingInfo = source.wrappingInfo; this.contribInfo = source.contribInfo; + this.urlClickable = source.urlClickable; } /** @@ -1436,6 +1445,7 @@ export class EditorOptionsValidator { useTabStops: _boolean(opts.useTabStops, defaults.useTabStops), multiCursorModifier: multiCursorModifier, accessibilitySupport: _stringSet<'auto' | 'on' | 'off'>(opts.accessibilitySupport, defaults.accessibilitySupport, ['auto', 'on', 'off']), + urlClickable: _boolean(opts.urlClickable, defaults.urlClickable), viewInfo: viewInfo, contribInfo: contribInfo, }; @@ -1659,6 +1669,7 @@ export class InternalEditorOptionsFactory { useTabStops: opts.useTabStops, multiCursorModifier: opts.multiCursorModifier, accessibilitySupport: opts.accessibilitySupport, + urlClickable: opts.urlClickable, viewInfo: { extraEditorClassName: opts.viewInfo.extraEditorClassName, @@ -1866,7 +1877,8 @@ export class InternalEditorOptionsFactory { fontInfo: env.fontInfo, viewInfo: opts.viewInfo, wrappingInfo: wrappingInfo, - contribInfo: opts.contribInfo + contribInfo: opts.contribInfo, + urlClickable: opts.urlClickable }); } } @@ -2076,6 +2088,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { useTabStops: true, multiCursorModifier: 'altKey', accessibilitySupport: 'auto', + urlClickable: true, viewInfo: { extraEditorClassName: '', diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index c50fc2e0c4318..1f6e93fb08e53 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -184,7 +184,7 @@ class LinkDetector implements editorCommon.IEditorContribution { } private beginCompute(): void { - if (!this.editor.getModel()) { + if (!this.editor.getModel() || !this.editor.getConfiguration().urlClickable) { return; } diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 3fad661a07f8d..3c10f80eb6446 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2887,6 +2887,11 @@ declare module monaco.editor { * Defaults to 'auto'. It is best to leave this to 'auto'. */ accessibilitySupport?: 'auto' | 'off' | 'on'; + /** + * Enable underlining URL and make it as a clickable link through CTRL-click + * Defaults to true. + */ + urlClickable?: boolean; /** * Enable quick suggestions (shadow suggestions) * Defaults to true. @@ -3269,6 +3274,7 @@ declare module monaco.editor { readonly lineHeight: number; readonly readOnly: boolean; readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; + readonly urlClickable: boolean; readonly wordSeparators: string; readonly autoClosingBrackets: boolean; readonly useTabStops: boolean; From a1c051a4de6770c99fa77195b3d37dfaa7f72878 Mon Sep 17 00:00:00 2001 From: Chun Hei Ernest Wong Date: Sun, 4 Jun 2017 09:19:21 -0700 Subject: [PATCH 1520/2747] Added urlClickable in equals and createChangeEvent --- src/vs/editor/common/config/editorOptions.ts | 3 +++ src/vs/monaco.d.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 08009bb9b47d9..e2f0285cfd490 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -902,6 +902,7 @@ export class InternalEditorOptions { && this.tabFocusMode === other.tabFocusMode && this.dragAndDrop === other.dragAndDrop && this.emptySelectionClipboard === other.emptySelectionClipboard + && this.urlClickable === other.urlClickable && InternalEditorOptions._equalsLayoutInfo(this.layoutInfo, other.layoutInfo) && this.fontInfo.equals(other.fontInfo) && InternalEditorOptions._equalsViewOptions(this.viewInfo, other.viewInfo) @@ -933,6 +934,7 @@ export class InternalEditorOptions { viewInfo: (!InternalEditorOptions._equalsViewOptions(this.viewInfo, newOpts.viewInfo)), wrappingInfo: (!InternalEditorOptions._equalsWrappingInfo(this.wrappingInfo, newOpts.wrappingInfo)), contribInfo: (!InternalEditorOptions._equalsContribOptions(this.contribInfo, newOpts.contribInfo)), + urlClickable: (this.urlClickable !== newOpts.urlClickable), }; } @@ -1271,6 +1273,7 @@ export interface IConfigurationChangedEvent { readonly viewInfo: boolean; readonly wrappingInfo: boolean; readonly contribInfo: boolean; + readonly urlClickable: boolean; } /** diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 3c10f80eb6446..2670e27c2e678 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -3418,6 +3418,7 @@ declare module monaco.editor { readonly viewInfo: boolean; readonly wrappingInfo: boolean; readonly contribInfo: boolean; + readonly urlClickable: boolean; } /** From acfc6b6ece64cb1d631a2460e68f57d9d68e352a Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Sun, 4 Jun 2017 17:49:32 -0700 Subject: [PATCH 1521/2747] Skip unnecessary |s in extension list for #27987 --- src/vs/workbench/electron-browser/actions.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index 98e0d84f20c1c..552d57bc81f91 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -725,15 +725,16 @@ Steps to Reproduce: return 'none'; } - let tableHeader = `|Extension|Author|Version| -|---|---|---|`; + let tableHeader = `Extension|Author|Version +---|---|---`; const table = extensions.map(e => { - return `|${e.manifest.name}|${e.manifest.publisher}|${e.manifest.version}|`; + return `${e.manifest.name}|${e.manifest.publisher}|${e.manifest.version}`; }).join('\n'); const extensionTable = ` -${tableHeader}\n${table}; +${tableHeader} +${table} `; // 2000 chars is browsers de-facto limit for URLs, 400 chars are allowed for other string parts of the issue URL From 2e618308bfc8181936325903e745af3a6d0070c1 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Sun, 4 Jun 2017 18:18:32 -0700 Subject: [PATCH 1522/2747] Exclude extensions that only contribute themes from the extension list - #27987 --- src/vs/workbench/electron-browser/actions.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index 552d57bc81f91..2d900b8c8f40c 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -6,6 +6,7 @@ 'use strict'; import URI from 'vs/base/common/uri'; +import * as collections from 'vs/base/common/collections'; import { TPromise } from 'vs/base/common/winjs.base'; import { Action } from 'vs/base/common/actions'; import { IWindowIPCService } from 'vs/workbench/services/window/electron-browser/windowService'; @@ -721,8 +722,17 @@ Steps to Reproduce: } private generateExtensionTable(extensions: ILocalExtension[]): string { + const { nonThemes, themes } = collections.groupBy(extensions, ext => { + const manifestKeys = ext.manifest.contributes ? Object.keys(ext.manifest.contributes) : []; + const onlyTheme = !ext.manifest.activationEvents && manifestKeys.length === 1 && manifestKeys[0] === 'themes'; + return onlyTheme ? 'themes' : 'nonThemes'; + }); + + const themeExclusionStr = themes.length ? `\n(${themes.length} theme extensions excluded)` : ''; + extensions = nonThemes; + if (!extensions.length) { - return 'none'; + return 'none' + themeExclusionStr; } let tableHeader = `Extension|Author|Version @@ -735,8 +745,10 @@ Steps to Reproduce: ${tableHeader} ${table} +${themeExclusionStr} `; + // 2000 chars is browsers de-facto limit for URLs, 400 chars are allowed for other string parts of the issue URL // http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers if (encodeURIComponent(extensionTable).length > 1600) { From e3589e9184037ff74150ac25a63ea30c74bcc8e3 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Sun, 4 Jun 2017 18:20:54 -0700 Subject: [PATCH 1523/2747] Truncate publisher name in extension list #27987 --- src/vs/workbench/electron-browser/actions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index 2d900b8c8f40c..81278ea1d19a5 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -735,10 +735,10 @@ Steps to Reproduce: return 'none' + themeExclusionStr; } - let tableHeader = `Extension|Author|Version + let tableHeader = `Extension|Author (truncated)|Version ---|---|---`; const table = extensions.map(e => { - return `${e.manifest.name}|${e.manifest.publisher}|${e.manifest.version}`; + return `${e.manifest.name}|${e.manifest.publisher.substr(0, 3)}|${e.manifest.version}`; }).join('\n'); const extensionTable = ` From fc229891ce561b5a9ea1f78f3771a97f4c159a09 Mon Sep 17 00:00:00 2001 From: Jens Hausdorf Date: Mon, 5 Jun 2017 10:44:16 +0200 Subject: [PATCH 1524/2747] Add `.rhtml` to html extension --- extensions/html/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/html/package.json b/extensions/html/package.json index 7c6e97305a164..c8525093d01d5 100644 --- a/extensions/html/package.json +++ b/extensions/html/package.json @@ -24,6 +24,7 @@ { "id": "html", "extensions": [ + ".rhtml", ".html", ".htm", ".shtml", From e8f7f408dbe7cc5d90376d0799615516db86131a Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Mon, 5 Jun 2017 08:57:47 -0700 Subject: [PATCH 1525/2747] Update node-debug2 for #28020 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index a44f3e99bd85f..2168fbe5bd58d 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -43,7 +43,7 @@ const nodeModules = ['electron', 'original-fs'] const builtInExtensions = [ { name: 'ms-vscode.node-debug', version: '1.13.9' }, - { name: 'ms-vscode.node-debug2', version: '1.13.1' } + { name: 'ms-vscode.node-debug2', version: '1.13.2' } ]; const vscodeEntryPoints = _.flatten([ From 651409ec3c7c4f03e470fbf657473cd5978ee70d Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Mon, 5 Jun 2017 18:18:34 +0200 Subject: [PATCH 1526/2747] node-debug@1.13.10 (translations) --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 2168fbe5bd58d..5b24acb0bd49a 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -42,7 +42,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.13.9' }, + { name: 'ms-vscode.node-debug', version: '1.13.10' }, { name: 'ms-vscode.node-debug2', version: '1.13.2' } ]; From ab1e78ef1f217824c6fe5fda7d80792b4bd7c0a6 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 5 Jun 2017 10:05:50 -0700 Subject: [PATCH 1527/2747] Update js/ts grammar (#27957) --- .../syntaxes/JavaScript.tmLanguage.json | 19 ++++++++----- .../syntaxes/TypeScript.tmLanguage.json | 27 ++++++++++++------- .../syntaxes/TypeScriptReact.tmLanguage.json | 19 ++++++++----- 3 files changed, 43 insertions(+), 22 deletions(-) diff --git a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json index 8856e46770c60..57c071374cc1a 100644 --- a/extensions/javascript/syntaxes/JavaScript.tmLanguage.json +++ b/extensions/javascript/syntaxes/JavaScript.tmLanguage.json @@ -4,6 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3a70fab1b03520774fa236f1f7e7a0939463739f", "name": "JavaScript (with React support)", "scopeName": "source.js", "fileTypes": [ @@ -1560,7 +1561,7 @@ } }, { - "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)", + "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)", "captures": { "1": { "name": "storage.modifier.js" @@ -1569,15 +1570,18 @@ "name": "keyword.operator.rest.js" }, "3": { - "name": "entity.name.function.js" + "name": "entity.name.function.js variable.language.this.js" }, "4": { + "name": "entity.name.function.js" + }, + "5": { "name": "keyword.operator.optional.js" } } }, { - "match": "(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)|((?!\\{)(?=\\S))", "patterns": [ { "include": "#decl-block" diff --git a/extensions/typescript/syntaxes/TypeScript.tmLanguage.json b/extensions/typescript/syntaxes/TypeScript.tmLanguage.json index a4ba918145b76..90c14f0fc991e 100644 --- a/extensions/typescript/syntaxes/TypeScript.tmLanguage.json +++ b/extensions/typescript/syntaxes/TypeScript.tmLanguage.json @@ -4,6 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3a70fab1b03520774fa236f1f7e7a0939463739f", "name": "TypeScript", "scopeName": "source.ts", "fileTypes": [ @@ -1554,7 +1555,7 @@ } }, { - "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)", + "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)", "captures": { "1": { "name": "storage.modifier.ts" @@ -1563,15 +1564,18 @@ "name": "keyword.operator.rest.ts" }, "3": { - "name": "entity.name.function.ts" + "name": "entity.name.function.ts variable.language.this.ts" }, "4": { + "name": "entity.name.function.ts" + }, + "5": { "name": "keyword.operator.optional.ts" } } }, { - "match": "(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?", + "end": "(\\>)\\s*", "endCaptures": { - "0": { + "1": { "name": "meta.brace.angle.ts" } }, @@ -2561,9 +2568,9 @@ "name": "meta.brace.angle.ts" } }, - "end": "\\>", + "end": "(\\>)\\s*", "endCaptures": { - "0": { + "1": { "name": "meta.brace.angle.ts" } }, @@ -2887,7 +2894,7 @@ "name": "storage.type.function.arrow.ts" } }, - "end": "(?<=\\})|((?!\\{)(?=\\S))", + "end": "(?<=\\}|\\S)(?)|((?!\\{)(?=\\S))", "patterns": [ { "include": "#decl-block" diff --git a/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json b/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json index f52b684089e02..78145cde03207 100644 --- a/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json +++ b/extensions/typescript/syntaxes/TypeScriptReact.tmLanguage.json @@ -4,6 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], + "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3a70fab1b03520774fa236f1f7e7a0939463739f", "name": "TypeScriptReact", "scopeName": "source.tsx", "fileTypes": [ @@ -1557,7 +1558,7 @@ } }, { - "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)", + "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)", "captures": { "1": { "name": "storage.modifier.tsx" @@ -1566,15 +1567,18 @@ "name": "keyword.operator.rest.tsx" }, "3": { - "name": "entity.name.function.tsx" + "name": "entity.name.function.tsx variable.language.this.tsx" }, "4": { + "name": "entity.name.function.tsx" + }, + "5": { "name": "keyword.operator.optional.tsx" } } }, { - "match": "(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?)|((?!\\{)(?=\\S))", "patterns": [ { "include": "#decl-block" From 706d52c1aafc14a1e737fae8a3478b3d9268cb5d Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 5 Jun 2017 10:35:57 -0700 Subject: [PATCH 1528/2747] Fix svg links in webview. Fixes #28035 --- src/vs/workbench/parts/html/browser/webview-pre.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/html/browser/webview-pre.js b/src/vs/workbench/parts/html/browser/webview-pre.js index a371b3f33c0cd..0abf15e97f8cd 100644 --- a/src/vs/workbench/parts/html/browser/webview-pre.js +++ b/src/vs/workbench/parts/html/browser/webview-pre.js @@ -47,7 +47,7 @@ /** @type {any} */ var node = event.target; while (node) { - if (node.tagName === "A" && node.href) { + if (node.tagName && node.tagName.toLowerCase() === 'a' && node.href) { var baseElement = event.view.document.getElementsByTagName("base")[0]; if (node.getAttribute("href") === "#") { event.view.scrollTo(0, 0); From 13112461e05790ecdaabc57d64ba3432aaa5bec4 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 31 May 2017 07:42:54 +0200 Subject: [PATCH 1529/2747] Layer-breaker in telemetryUtils (fixes #27141) --- .../telemetry/common/telemetryUtils.ts | 38 +++++++++---------- .../welcomePage.contribution.ts | 16 -------- .../page/electron-browser/welcomePage.ts | 21 +++++++++- 3 files changed, 39 insertions(+), 36 deletions(-) diff --git a/src/vs/platform/telemetry/common/telemetryUtils.ts b/src/vs/platform/telemetry/common/telemetryUtils.ts index 7ba7db945fef4..74b796dc0a815 100644 --- a/src/vs/platform/telemetry/common/telemetryUtils.ts +++ b/src/vs/platform/telemetry/common/telemetryUtils.ts @@ -50,15 +50,15 @@ export function loadExperiments(accessor: ServicesAccessor): ITelemetryExperimen const storageService = accessor.get(IStorageService); const configurationService = accessor.get(IConfigurationService); - updateExperimentsOverrides(configurationService); - configurationService.onDidUpdateConfiguration(e => updateExperimentsOverrides(configurationService)); + updateExperimentsOverrides(configurationService, storageService); + configurationService.onDidUpdateConfiguration(e => updateExperimentsOverrides(configurationService, storageService)); let { showNewUserWatermark, openUntitledFile, enableWelcomePage, mergeQuickLinks, - } = splitExperimentsRandomness(); + } = splitExperimentsRandomness(storageService); const newUserDuration = 24 * 60 * 60 * 1000; const firstSessionDate = storageService.get('telemetry.firstSessionDate'); @@ -73,16 +73,16 @@ export function loadExperiments(accessor: ServicesAccessor): ITelemetryExperimen openUntitledFile, enableWelcomePage, mergeQuickLinks, - }); + }, storageService); } -export function isWelcomePageEnabled() { - const overrides = getExperimentsOverrides(); - return 'enableWelcomePage' in overrides ? overrides.enableWelcomePage : splitExperimentsRandomness().enableWelcomePage; +export function isWelcomePageEnabled(storageService: IStorageService) { + const overrides = getExperimentsOverrides(storageService); + return 'enableWelcomePage' in overrides ? overrides.enableWelcomePage : splitExperimentsRandomness(storageService).enableWelcomePage; } -function applyOverrides(experiments: ITelemetryExperiments): ITelemetryExperiments { - const experimentsConfig = getExperimentsOverrides(); +function applyOverrides(experiments: ITelemetryExperiments, storageService: IStorageService): ITelemetryExperiments { + const experimentsConfig = getExperimentsOverrides(storageService); Object.keys(experiments).forEach(key => { if (key in experimentsConfig) { experiments[key] = experimentsConfig[key]; @@ -91,8 +91,8 @@ function applyOverrides(experiments: ITelemetryExperiments): ITelemetryExperimen return experiments; } -function splitExperimentsRandomness(): ITelemetryExperiments { - const random1 = getExperimentsRandomness(); +function splitExperimentsRandomness(storageService: IStorageService): ITelemetryExperiments { + const random1 = getExperimentsRandomness(storageService); const [random2, showNewUserWatermark] = splitRandom(random1); const [random3, openUntitledFile] = splitRandom(random2); const [random4, mergeQuickLinks] = splitRandom(random3); @@ -105,12 +105,12 @@ function splitExperimentsRandomness(): ITelemetryExperiments { }; } -function getExperimentsRandomness() { +function getExperimentsRandomness(storageService: IStorageService) { const key = StorageService.GLOBAL_PREFIX + 'experiments.randomness'; - let valueString = window.localStorage.getItem(key); + let valueString = storageService.get(key); if (!valueString) { valueString = Math.random().toString(); - window.localStorage.setItem(key, valueString); + storageService.store(key, valueString); } return parseFloat(valueString); @@ -124,17 +124,17 @@ function splitRandom(random: number): [number, boolean] { const experimentsOverridesKey = StorageService.GLOBAL_PREFIX + 'experiments.overrides'; -function getExperimentsOverrides(): ITelemetryExperiments { - const valueString = window.localStorage.getItem(experimentsOverridesKey); +function getExperimentsOverrides(storageService: IStorageService): ITelemetryExperiments { + const valueString = storageService.get(experimentsOverridesKey); return valueString ? JSON.parse(valueString) : {}; } -function updateExperimentsOverrides(configurationService: IConfigurationService) { - const storageOverrides = getExperimentsOverrides(); +function updateExperimentsOverrides(configurationService: IConfigurationService, storageService: IStorageService) { + const storageOverrides = getExperimentsOverrides(storageService); const config: any = configurationService.getConfiguration('telemetry'); const configOverrides = config && config.experiments || {}; if (!objects.equals(storageOverrides, configOverrides)) { - window.localStorage.setItem(experimentsOverridesKey, JSON.stringify(configOverrides)); + storageService.store(experimentsOverridesKey, JSON.stringify(configOverrides)); } } diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.ts index d9be0524ce075..4ca598c511107 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.ts @@ -8,24 +8,8 @@ import { localize } from 'vs/nls'; import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { Registry } from 'vs/platform/platform'; import { WelcomePageContribution, WelcomePageAction } from 'vs/workbench/parts/welcome/page/electron-browser/welcomePage'; -import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; -import { isWelcomePageEnabled } from 'vs/platform/telemetry/common/telemetryUtils'; - -Registry.as(ConfigurationExtensions.Configuration) - .registerConfiguration({ - 'id': 'workbench', - 'order': 7, - 'title': localize('workbenchConfigurationTitle', "Workbench"), - 'properties': { - 'workbench.welcome.enabled': { - 'type': 'boolean', - 'default': isWelcomePageEnabled(), - 'description': localize('welcomePage.enabled', "When enabled, will show the Welcome page on startup.") - }, - } - }); Registry.as(WorkbenchExtensions.Workbench) .registerWorkbenchContribution(WelcomePageContribution); diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts index 976702e229d79..56c00efa87e48 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.ts @@ -38,6 +38,10 @@ import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/com import { registerColor, focusBorder, textLinkForeground, textLinkActiveForeground, foreground, descriptionForeground, contrastBorder, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { getExtraColor } from 'vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils'; import { IExtensionsWorkbenchService } from 'vs/workbench/parts/extensions/common/extensions'; +import { isWelcomePageEnabled } from 'vs/platform/telemetry/common/telemetryUtils'; +import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; +import { IStorageService } from "vs/platform/storage/common/storage"; +import { Registry } from 'vs/platform/platform'; used(); @@ -52,7 +56,8 @@ export class WelcomePageContribution implements IWorkbenchContribution { @IConfigurationService configurationService: IConfigurationService, @IWorkbenchEditorService editorService: IWorkbenchEditorService, @IBackupFileService backupFileService: IBackupFileService, - @ITelemetryService telemetryService: ITelemetryService + @ITelemetryService telemetryService: ITelemetryService, + @IStorageService storageService: IStorageService ) { const enabled = configurationService.lookup(enabledKey).value; if (enabled) { @@ -66,6 +71,20 @@ export class WelcomePageContribution implements IWorkbenchContribution { } }).then(null, onUnexpectedError); } + + Registry.as(ConfigurationExtensions.Configuration) + .registerConfiguration({ + 'id': 'workbench', + 'order': 7, + 'title': localize('workbenchConfigurationTitle', "Workbench"), + 'properties': { + 'workbench.welcome.enabled': { + 'type': 'boolean', + 'default': isWelcomePageEnabled(storageService), + 'description': localize('welcomePage.enabled', "When enabled, will show the Welcome page on startup.") + }, + } + }); } public getId() { From 794b435b27bcf4a92cc0a6345b97821e3c827dcc Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Mon, 5 Jun 2017 14:32:53 -0700 Subject: [PATCH 1530/2747] Include border when setting details height to remove the workaround of setting calc width that caused #28058 --- .../contrib/suggest/browser/media/suggest.css | 30 ++++--------------- .../contrib/suggest/browser/suggestWidget.ts | 8 ++++- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/src/vs/editor/contrib/suggest/browser/media/suggest.css b/src/vs/editor/contrib/suggest/browser/media/suggest.css index a154e7c1959f0..1c3b4374b667d 100644 --- a/src/vs/editor/contrib/suggest/browser/media/suggest.css +++ b/src/vs/editor/contrib/suggest/browser/media/suggest.css @@ -14,16 +14,18 @@ width: 430px; } +.monaco-editor .suggest-widget > .message, .monaco-editor .suggest-widget > .tree, .monaco-editor .suggest-widget > .details { - width: calc(100% - 2px); + width: 100%; border-style: solid; border-width: 1px; + box-sizing: border-box; } +.monaco-editor.hc-black .suggest-widget > .message, .monaco-editor.hc-black .suggest-widget > .tree, .monaco-editor.hc-black .suggest-widget > .details { - width: calc(100% - 4px); border-width: 2px; } @@ -34,12 +36,8 @@ .monaco-editor .suggest-widget.docs-side > .tree, .monaco-editor .suggest-widget.docs-side > .details { - /* subtract 2px for border, and another 2 for the Chromium zoom issue - where the children get slightly bigger width than what is set - which makes the docs go below the list */ - width: calc(50% - 4px); + width: 50%; float: left; - } .monaco-editor .suggest-widget.docs-side.list-right > .tree, @@ -47,28 +45,10 @@ float: right; } -.monaco-editor.hc-black .suggest-widget.docs-side > .tree, -.monaco-editor.hc-black .suggest-widget.docs-side > .details { - width: 326px; -} - -.monaco-editor .suggest-widget.docs-side .empty-left-border { - border-left-width: 0px; -} - -.monaco-editor .suggest-widget.docs-side .empty-right-border { - border-right-width: 0px; -} /* Styles for Message element for when widget is loading or is empty */ .monaco-editor .suggest-widget > .message { padding-left: 22px; - border-style: solid; - border-width: 1px; -} - -.monaco-editor.hc-black .suggest-widget > .message { - border-width: 2px; } /** Styles for the list element **/ diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 1c7a97e314b5f..a3154f2a23dae 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -198,6 +198,7 @@ class SuggestionDetails { private docs: HTMLElement; private ariaLabel: string; private disposables: IDisposable[]; + private borderWidth: number = 1; constructor( container: HTMLElement, @@ -254,7 +255,7 @@ class SuggestionDetails { hide(this.type); } - this.el.style.height = this.header.offsetHeight + this.docs.offsetHeight + 'px'; + this.el.style.height = this.header.offsetHeight + this.docs.offsetHeight + (this.borderWidth * 2) + 'px'; this.close.onmousedown = e => { e.preventDefault(); @@ -300,6 +301,10 @@ class SuggestionDetails { this.scrollUp(80); } + setBorderWidth(width: number): void { + this.borderWidth = width; + } + private configureFont() { const configuration = this.editor.getConfiguration(); const fontFamily = configuration.fontInfo.fontFamily; @@ -507,6 +512,7 @@ export class SuggestWidget implements IContentWidget, IDelegate if (focusBorderColor) { this.detailsFocusBorderColor = focusBorderColor.toString(); } + this.details.setBorderWidth(theme.type === 'hc' ? 2 : 1); } private onListFocus(e: IListEvent): void { From 51b55e8021ef496cabaecc411bbb74207f739fc5 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 5 Jun 2017 15:03:43 -0700 Subject: [PATCH 1531/2747] Stringify Telemetry Fields in the TSExtension Fixes #28065 --- extensions/typescript/src/typescriptServiceClient.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 84f35f4f11c8f..072652eedad15 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -971,8 +971,12 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient let payload = telemetryData.payload; if (payload) { Object.keys(payload).forEach((key) => { - if (payload.hasOwnProperty(key) && is.string(payload[key])) { - properties[key] = payload[key]; + try { + if (payload.hasOwnProperty(key)) { + properties[key] = is.string(payload[key]) ? payload[key] : JSON.stringify(payload[key]); + } + } catch (e) { + // noop } }); } From f5b5966c947a2a432e6ff3427248d8eafece5785 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 5 Jun 2017 16:12:30 -0700 Subject: [PATCH 1532/2747] Mark a few more fields as readonly --- extensions/typescript/src/typescriptServiceClient.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 072652eedad15..d790668427e15 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -185,10 +185,10 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private requestQueue: RequestItem[]; private pendingResponses: number; private callbacks: CallbackMap; - private _onProjectLanguageServiceStateChanged = new EventEmitter(); - private _onDidBeginInstallTypings = new EventEmitter(); - private _onDidEndInstallTypings = new EventEmitter(); - private _onTypesInstallerInitializationFailed = new EventEmitter(); + private readonly _onProjectLanguageServiceStateChanged = new EventEmitter(); + private readonly _onDidBeginInstallTypings = new EventEmitter(); + private readonly _onDidEndInstallTypings = new EventEmitter(); + private readonly _onTypesInstallerInitializationFailed = new EventEmitter(); private _apiVersion: API; private telemetryReporter: TelemetryReporter; From 70e52f186078256e85273bb5736f22b0c56ccf25 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 5 Jun 2017 15:51:52 -0700 Subject: [PATCH 1533/2747] Extract basic request queue to class --- .../typescript/src/typescriptServiceClient.ts | 61 +++++++++++++------ 1 file changed, 43 insertions(+), 18 deletions(-) diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index d790668427e15..1191bb9243a71 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -156,6 +156,42 @@ class TypeScriptServiceConfiguration { } } +class RequestQueue { + private queue: RequestItem[] = []; + private sequenceNumber: number = 0; + + public get length(): number { + return this.queue.length; + } + + public push(item: RequestItem): void { + this.queue.push(item); + } + + public shift(): RequestItem | undefined { + return this.queue.shift(); + } + + public tryCancelPendingRequest(seq: number): boolean { + for (let i = 0; i < this.queue.length; i++) { + if (this.queue[i].request.seq === seq) { + this.queue.splice(i, 1); + return true; + } + } + return false; + } + + public createRequest(command: string, args: any): Proto.Request { + return { + seq: this.sequenceNumber++, + type: 'request', + command: command, + arguments: args + }; + } +} + export default class TypeScriptServiceClient implements ITypescriptServiceClient { private static useWorkspaceTsdkStorageKey = 'typescript.useWorkspaceTsdk'; private static tsdkMigratedStorageKey = 'typescript.tsdkMigrated'; @@ -176,13 +212,12 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private servicePromise: Thenable | null; private lastError: Error | null; private reader: Reader; - private sequenceNumber: number; private firstStart: number; private lastStart: number; private numberRestarts: number; private cancellationPipeName: string | null = null; - private requestQueue: RequestItem[]; + private requestQueue: RequestQueue; private pendingResponses: number; private callbacks: CallbackMap; private readonly _onProjectLanguageServiceStateChanged = new EventEmitter(); @@ -211,11 +246,10 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.servicePromise = null; this.lastError = null; - this.sequenceNumber = 0; this.firstStart = Date.now(); this.numberRestarts = 0; - this.requestQueue = []; + this.requestQueue = new RequestQueue(); this.pendingResponses = 0; this.callbacks = Object.create(null); this.configuration = TypeScriptServiceConfiguration.loadFromWorkspace(); @@ -417,8 +451,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.versionStatus.setInfo(label, tooltip); - this.sequenceNumber = 0; - this.requestQueue = []; + this.requestQueue = new RequestQueue(); this.pendingResponses = 0; this.lastError = null; @@ -839,12 +872,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient token = expectsResultOrToken; } - const request: Proto.Request = { - seq: this.sequenceNumber++, - type: 'request', - command: command, - arguments: args - }; + const request = this.requestQueue.createRequest(command, args); const requestInfo: RequestItem = { request: request, promise: null, @@ -899,12 +927,9 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } private tryCancelRequest(seq: number): boolean { - for (let i = 0; i < this.requestQueue.length; i++) { - if (this.requestQueue[i].request.seq === seq) { - this.requestQueue.splice(i, 1); - this.tracer.logTrace(`TypeScript Service: canceled request with sequence number ${seq}`); - return true; - } + if (this.requestQueue.tryCancelPendingRequest(seq)) { + this.tracer.logTrace(`TypeScript Service: canceled request with sequence number ${seq}`); + return true; } if (this.apiVersion.has222Features() && this.cancellationPipeName) { From 42ede266aa9ce62e258d54e73576642ab684eb43 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 5 Jun 2017 16:32:16 -0700 Subject: [PATCH 1534/2747] Extracting callbackmap to own class --- .../typescript/src/typescriptServiceClient.ts | 60 ++++++++++++------- 1 file changed, 38 insertions(+), 22 deletions(-) diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 1191bb9243a71..4f68a6991fbae 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -32,8 +32,34 @@ interface CallbackItem { start: number; } -interface CallbackMap { - [key: number]: CallbackItem; +class CallbackMap { + private callbacks: Map = new Map(); + public pendingResponses: number = 0; + + public destroy(e: any): void { + for (const callback of this.callbacks.values()) { + callback.e(e); + } + this.callbacks = new Map(); + this.pendingResponses = 0; + } + + public add(seq: number, callback: CallbackItem) { + this.callbacks.set(seq, callback); + ++this.pendingResponses; + } + + public fetch(seq: number): CallbackItem | undefined { + const callback = this.callbacks.get(seq); + this.delete(seq); + return callback; + } + + private delete(seq: number) { + if (this.callbacks.delete(seq)) { + --this.pendingResponses; + } + } } interface RequestItem { @@ -218,8 +244,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private cancellationPipeName: string | null = null; private requestQueue: RequestQueue; - private pendingResponses: number; private callbacks: CallbackMap; + private readonly _onProjectLanguageServiceStateChanged = new EventEmitter(); private readonly _onDidBeginInstallTypings = new EventEmitter(); private readonly _onDidEndInstallTypings = new EventEmitter(); @@ -250,8 +276,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.numberRestarts = 0; this.requestQueue = new RequestQueue(); - this.pendingResponses = 0; - this.callbacks = Object.create(null); + this.callbacks = new CallbackMap(); this.configuration = TypeScriptServiceConfiguration.loadFromWorkspace(); this._experimentalAutoBuild = false; // configuration.get('typescript.tsserver.experimentalAutoBuild', false); @@ -452,7 +477,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.requestQueue = new RequestQueue(); - this.pendingResponses = 0; + this.callbacks = new CallbackMap(); this.lastError = null; try { @@ -787,10 +812,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private serviceExited(restart: boolean): void { this.servicePromise = null; this.tsServerLogFile = null; - Object.keys(this.callbacks).forEach((key) => { - this.callbacks[parseInt(key)].e(new Error('Service died.')); - }); - this.callbacks = Object.create(null); + this.callbacks.destroy(new Error('Service died.')); + this.callbacks = new CallbackMap(); if (restart) { const diff = Date.now() - this.lastStart; this.numberRestarts++; @@ -898,7 +921,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } private sendNextRequests(): void { - while (this.pendingResponses === 0 && this.requestQueue.length > 0) { + while (this.callbacks.pendingResponses === 0 && this.requestQueue.length > 0) { const item = this.requestQueue.shift(); if (item) { this.sendRequest(item); @@ -910,18 +933,15 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient let serverRequest = requestItem.request; this.tracer.traceRequest(serverRequest, !!requestItem.callbacks, this.requestQueue.length); if (requestItem.callbacks) { - this.callbacks[serverRequest.seq] = requestItem.callbacks; - this.pendingResponses++; + this.callbacks.add(serverRequest.seq, requestItem.callbacks); } this.service() .then((childProcess) => { childProcess.stdin.write(JSON.stringify(serverRequest) + '\r\n', 'utf8'); }).then(undefined, err => { - let callback = this.callbacks[serverRequest.seq]; + const callback = this.callbacks.fetch(serverRequest.seq); if (callback) { callback.e(err); - delete this.callbacks[serverRequest.seq]; - this.pendingResponses--; } }); } @@ -940,10 +960,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } catch (e) { // noop } finally { - const p = this.callbacks[seq]; + const p = this.callbacks.fetch(seq); if (p) { - delete this.callbacks[seq]; - this.pendingResponses--; p.e(new Error(`Cancelled Request ${seq}`)); } } @@ -957,11 +975,9 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient try { if (message.type === 'response') { const response: Proto.Response = message as Proto.Response; - const p = this.callbacks[response.request_seq]; + const p = this.callbacks.fetch(response.request_seq); if (p) { this.tracer.traceResponse(response, p.start); - delete this.callbacks[response.request_seq]; - this.pendingResponses--; if (response.success) { p.c(response); } else { From dd361faca8708cba5f1fde705187cdd87040c0b4 Mon Sep 17 00:00:00 2001 From: Jens Hausdorf Date: Tue, 6 Jun 2017 08:25:35 +0200 Subject: [PATCH 1535/2747] fix casing --- src/vs/workbench/browser/parts/editor/editorStatus.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorStatus.ts b/src/vs/workbench/browser/parts/editor/editorStatus.ts index ee9d12bbcd799..f6a52750b63a2 100644 --- a/src/vs/workbench/browser/parts/editor/editorStatus.ts +++ b/src/vs/workbench/browser/parts/editor/editorStatus.ts @@ -225,8 +225,8 @@ const nlsMultiSelectionRange = nls.localize('multiSelectionRange', "{0} selectio const nlsMultiSelection = nls.localize('multiSelection', "{0} selections"); const nlsEOLLF = nls.localize('endOfLineLineFeed', "LF"); const nlsEOLCRLF = nls.localize('endOfLineCarriageReturnLineFeed', "CRLF"); -const nlsTabFocusMode = nls.localize('tabFocusModeEnabled', "Tab moves focus"); -const nlsScreenReaderDetected = nls.localize('screenReaderDetected', "Screen Reader detected"); +const nlsTabFocusMode = nls.localize('tabFocusModeEnabled', "Tab Moves Focus"); +const nlsScreenReaderDetected = nls.localize('screenReaderDetected', "Screen Reader Detected"); const nlsScreenReaderDetectedTitle = nls.localize('screenReaderDetectedExtra', "If you are not using a Screen Reader, please change the setting `editor.accessibilitySupport` to \"off\"."); function _setDisplay(el: HTMLElement, desiredValue: string): void { From 56cf3122bef57dbf52f8702dec5107536694eb8f Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 6 Jun 2017 11:15:36 +0200 Subject: [PATCH 1536/2747] improve window picker (for #25145) --- src/vs/platform/windows/common/windows.ts | 2 +- .../windows/electron-main/windowsService.ts | 12 +- src/vs/workbench/electron-browser/actions.ts | 25 +--- .../electron-browser/main.contribution.ts | 20 ++- .../electron-browser/windowPicker.ts | 120 ++++++++++++++++++ 5 files changed, 153 insertions(+), 26 deletions(-) create mode 100644 src/vs/workbench/electron-browser/windowPicker.ts diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index b4ff59ddacf3b..b85f0b15315fd 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -50,7 +50,7 @@ export interface IWindowsService { openWindow(paths: string[], options?: { forceNewWindow?: boolean, forceReuseWindow?: boolean }): TPromise; openNewWindow(): TPromise; showWindow(windowId: number): TPromise; - getWindows(): TPromise<{ id: number; path: string; title: string; }[]>; + getWindows(): TPromise<{ id: number; path: string; title: string; filename?: string; }[]>; getWindowCount(): TPromise; log(severity: string, ...messages: string[]): TPromise; // TODO@joao: what? diff --git a/src/vs/platform/windows/electron-main/windowsService.ts b/src/vs/platform/windows/electron-main/windowsService.ts index 5cef01c60f54c..096386c0f5e19 100644 --- a/src/vs/platform/windows/electron-main/windowsService.ts +++ b/src/vs/platform/windows/electron-main/windowsService.ts @@ -16,9 +16,8 @@ import Event, { chain } from 'vs/base/common/event'; import { fromEventEmitter } from 'vs/base/node/event'; import { IURLService } from 'vs/platform/url/common/url'; import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; - -// TODO@Joao: remove this dependency, move all implementation to this class -import { OpenContext } from 'vs/code/common/windows'; +import { isMacintosh } from "vs/base/common/platform"; +import { OpenContext } from 'vs/code/common/windows'; // TODO@Joao: remove this dependency, move all implementation to this class import { IWindowsMainService } from 'vs/code/electron-main/windows'; import { ILifecycleService } from "vs/code/electron-main/lifecycle"; @@ -255,7 +254,12 @@ export class WindowsService implements IWindowsService, IDisposable { getWindows(): TPromise<{ id: number; path: string; title: string; }[]> { const windows = this.windowsMainService.getWindows(); - const result = windows.map(w => ({ path: w.openedWorkspacePath, title: w.win.getTitle(), id: w.id })); + const result = windows.map(w => { + const filename = isMacintosh ? w.win.getRepresentedFilename() : void 0; + + return { path: w.openedWorkspacePath, title: w.win.getTitle(), id: w.id, filename }; + }); + return TPromise.as(result); } diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index 98e0d84f20c1c..05eac60720858 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -34,6 +34,8 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IPartService, Parts, Position as SidebarPosition } from 'vs/workbench/services/part/common/partService'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; +import { QuickOpenAction } from "vs/workbench/browser/quickopen"; +import { SWITCH_WINDOWS_PREFIX } from "vs/workbench/electron-browser/windowPicker"; import * as os from 'os'; import { webFrame } from 'electron'; @@ -79,7 +81,7 @@ export class CloseWindowAction extends Action { } } -export class SwitchWindow extends Action { +export class SwitchWindow extends QuickOpenAction { static ID = 'workbench.action.switchWindow'; static LABEL = nls.localize('switchWindow', "Switch Window"); @@ -87,26 +89,9 @@ export class SwitchWindow extends Action { constructor( id: string, label: string, - @IWindowsService private windowsService: IWindowsService, - @IWindowService private windowService: IWindowService, - @IQuickOpenService private quickOpenService: IQuickOpenService + @IQuickOpenService quickOpenService: IQuickOpenService ) { - super(id, label); - } - - run(): TPromise { - const currentWindowId = this.windowService.getCurrentWindowId(); - - return this.windowsService.getWindows().then(workspaces => { - const placeHolder = nls.localize('switchWindowPlaceHolder', "Select a window"); - const picks = workspaces.map(w => ({ - label: w.title, - description: (currentWindowId === w.id) ? nls.localize('current', "Current Window") : void 0, - run: () => this.windowsService.showWindow(w.id) - })); - - this.quickOpenService.pick(picks, { placeHolder }); - }); + super(id, label, SWITCH_WINDOWS_PREFIX, quickOpenService); } } diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts index 53ab7b017601e..7e293e56bbb19 100644 --- a/src/vs/workbench/electron-browser/main.contribution.ts +++ b/src/vs/workbench/electron-browser/main.contribution.ts @@ -18,6 +18,8 @@ import { CloseEditorAction, KeybindingsReferenceAction, OpenDocumentationUrlActi import { MessagesVisibleContext } from 'vs/workbench/electron-browser/workbench'; import { IJSONSchema } from 'vs/base/common/jsonSchema'; import { registerCommands } from 'vs/workbench/electron-browser/commands'; +import { IQuickOpenRegistry, QuickOpenHandlerDescriptor, Extensions as QuickOpenExtensions } from "vs/workbench/browser/quickopen"; +import { SWITCH_WINDOWS_PREFIX } from "vs/workbench/electron-browser/windowPicker"; // Contribute Commands registerCommands(); @@ -80,6 +82,22 @@ const developerCategory = nls.localize('developer', "Developer"); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ShowStartupPerformance, ShowStartupPerformance.ID, ShowStartupPerformance.LABEL), 'Developer: Startup Performance', developerCategory); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleSharedProcessAction, ToggleSharedProcessAction.ID, ToggleSharedProcessAction.LABEL), 'Developer: Toggle Shared Process', developerCategory); +// Window switcher +Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpenHandler( + new QuickOpenHandlerDescriptor( + 'vs/workbench/electron-browser/windowPicker', + 'WindowPicker', + SWITCH_WINDOWS_PREFIX, + [ + { + prefix: SWITCH_WINDOWS_PREFIX, + needsEditor: false, + description: nls.localize('switchBetweenWindows', "Switch between Windows") + } + ] + ) +); + // Configuration: Workbench const configurationRegistry = Registry.as(ConfigurationExtensions.Configuration); @@ -345,4 +363,4 @@ configurationRegistry.registerConfiguration({ 'description': nls.localize('zenMode.restore', "Controls if a window should restore to zen mode if it was exited in zen mode.") } } -}); +}); \ No newline at end of file diff --git a/src/vs/workbench/electron-browser/windowPicker.ts b/src/vs/workbench/electron-browser/windowPicker.ts new file mode 100644 index 0000000000000..05767e25f41dc --- /dev/null +++ b/src/vs/workbench/electron-browser/windowPicker.ts @@ -0,0 +1,120 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { TPromise } from 'vs/base/common/winjs.base'; +import nls = require('vs/nls'); +import URI from 'vs/base/common/uri'; +import errors = require('vs/base/common/errors'); +import { IIconLabelOptions } from 'vs/base/browser/ui/iconLabel/iconLabel'; +import { Mode, IEntryRunContext } from 'vs/base/parts/quickopen/common/quickOpen'; +import { QuickOpenModel, QuickOpenEntry } from 'vs/base/parts/quickopen/browser/quickOpenModel'; +import scorer = require('vs/base/common/scorer'); +import { IModeService } from 'vs/editor/common/services/modeService'; +import { getIconClasses } from 'vs/workbench/browser/labels'; +import { IModelService } from 'vs/editor/common/services/modelService'; +import { QuickOpenHandler } from 'vs/workbench/browser/quickopen'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { IWindowsService, IWindowService } from "vs/platform/windows/common/windows"; +import { stripWildcards } from "vs/base/common/strings"; + +export const SWITCH_WINDOWS_PREFIX = 'windows '; + +export class WindowPickerEntry extends QuickOpenEntry { + + constructor( + private windowId: number, + private label: string, + private resource: URI, + private isCurrentWindow: boolean, + private hasFolderOpened: boolean, + @IWindowsService private windowsService: IWindowsService, + @IModelService private modelService: IModelService, + @IModeService private modeService: IModeService + ) { + super(); + } + + public getLabelOptions(): IIconLabelOptions { + return { + extraClasses: getIconClasses(this.modelService, this.modeService, this.resource, !this.resource && this.hasFolderOpened /* isFolder */) + }; + } + + public getLabel(): string { + return this.label; + } + + public getResource(): URI { + return this.resource; + } + + public getAriaLabel(): string { + return nls.localize('entryAriaLabel', "{0}, window picker", this.getLabel()); + } + + public getDescription(): string { + return this.isCurrentWindow ? nls.localize('current', "Current Window") : void 0; + } + + public run(mode: Mode, context: IEntryRunContext): boolean { + if (mode === Mode.OPEN) { + setTimeout(() => { + // Bug: somehow when not running this code in a timeout, it is not possible to use this picker + // with quick navigate keys (not able to trigger quick navigate once running it once). + this.windowsService.showWindow(this.windowId).done(null, errors.onUnexpectedError); + }); + + return true; + } + + return super.run(mode, context); + } +} + +export class WindowPicker extends QuickOpenHandler { + + constructor( + @IWindowsService private windowsService: IWindowsService, + @IWindowService private windowService: IWindowService, + @IInstantiationService private instantiationService: IInstantiationService + ) { + super(); + } + + public getResults(searchValue: string): TPromise { + searchValue = searchValue.trim(); + + const normalizedSearchValueLowercase = stripWildcards(searchValue).toLowerCase(); + const currentWindowId = this.windowService.getCurrentWindowId(); + + return this.windowsService.getWindows().then(windows => { + let entries = windows.map(win => { + return this.instantiationService.createInstance(WindowPickerEntry, win.id, win.title, win.filename ? URI.file(win.filename) : void 0, currentWindowId === win.id, !!win.path); + }); + + entries = entries.filter(e => { + if (!searchValue) { + return true; + } + + if (!scorer.matches(e.getLabel(), normalizedSearchValueLowercase)) { + return false; + } + + const { labelHighlights, descriptionHighlights } = QuickOpenEntry.highlight(e, searchValue, true /* fuzzy highlight */); + e.setHighlights(labelHighlights, descriptionHighlights); + + return true; + }); + + return new QuickOpenModel(entries); + }); + } + + public getEmptyLabel(searchString: string): string { + return nls.localize('noWindowResults', "No matching opened windows found"); + } +} \ No newline at end of file From 85257c4de65307fd8ddbd8ac50dcbb28540d90a4 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 6 Jun 2017 11:29:15 +0200 Subject: [PATCH 1537/2747] Fix #27955 --- src/vs/workbench/parts/files/browser/explorerViewlet.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/files/browser/explorerViewlet.ts b/src/vs/workbench/parts/files/browser/explorerViewlet.ts index 2500f800ae782..59a054490ff74 100644 --- a/src/vs/workbench/parts/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/browser/explorerViewlet.ts @@ -354,7 +354,9 @@ export class ExplorerViewlet extends Viewlet { return this.emptyView.focusBody(); } - return this.openEditorsView.focus(); + if (this.lastFocusedView) { + return this.lastFocusedView.focus(); + } } private hasSelectionOrFocus(view: IViewletView): boolean { From a7dee48b14207dc92a41105eeed51d73ff8b127a Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 6 Jun 2017 11:32:34 +0200 Subject: [PATCH 1538/2747] tweak menu (for #25145) --- src/vs/code/electron-main/menus.ts | 8 +++++--- src/vs/workbench/electron-browser/actions.ts | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 3a5aa4756e552..dc6c05f0d49c1 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -485,7 +485,7 @@ export class VSCodeMenu { revertFile, closeEditor, closeFolder, - !isMacintosh ? closeWindow : null, + closeWindow, !isMacintosh ? __separator__() : null, !isMacintosh ? exit : null ]).forEach(item => fileMenu.append(item)); @@ -898,12 +898,14 @@ export class VSCodeMenu { private setMacWindowMenu(macWindowMenu: Electron.Menu): void { const minimize = new MenuItem({ label: nls.localize('mMinimize', "Minimize"), role: 'minimize', accelerator: 'Command+M', enabled: this.windowsService.getWindowCount() > 0 }); - const close = new MenuItem({ label: nls.localize('mClose', "Close"), role: 'close', accelerator: 'Command+W', enabled: this.windowsService.getWindowCount() > 0 }); + const zoom = new MenuItem({ label: nls.localize('mZoom', "Zoom"), role: 'zoom', enabled: this.windowsService.getWindowCount() > 0 }); const bringAllToFront = new MenuItem({ label: nls.localize('mBringToFront', "Bring All to Front"), role: 'front', enabled: this.windowsService.getWindowCount() > 0 }); + const switchWindow = this.createMenuItem(nls.localize({ key: 'miSwitchWindow', comment: ['&& denotes a mnemonic'] }, "Switch &&Window..."), 'workbench.action.switchWindow', this.windowsService.getWindowCount() > 0); [ minimize, - close, + zoom, + switchWindow, __separator__(), bringAllToFront ].forEach(item => macWindowMenu.append(item)); diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index 05eac60720858..f538efb3bf3d9 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -84,7 +84,7 @@ export class CloseWindowAction extends Action { export class SwitchWindow extends QuickOpenAction { static ID = 'workbench.action.switchWindow'; - static LABEL = nls.localize('switchWindow', "Switch Window"); + static LABEL = nls.localize('switchWindow', "Switch Window..."); constructor( id: string, From 14adf4bb46f407b325fd07c86fad1e2a076d4425 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 6 Jun 2017 11:44:38 +0200 Subject: [PATCH 1539/2747] always have a representedFilename --- src/vs/code/electron-main/window.ts | 17 +++++++++++++++++ .../windows/electron-main/windowsService.ts | 9 ++------- src/vs/workbench/electron-browser/window.ts | 12 +++++------- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index b4151b960d399..71d26108b0cb4 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -155,6 +155,7 @@ export class VSCodeWindow { private currentMenuBarVisibility: MenuBarVisibility; private currentWindowMode: WindowMode; private toDispose: IDisposable[]; + private representedFilename: string; private whenReadyCallbacks: TValueCallback[]; @@ -311,6 +312,22 @@ export class VSCodeWindow { return this._win; } + public setRepresentedFilename(filename: string): void { + if (platform.isMacintosh) { + this.win.setRepresentedFilename(filename); + } else { + this.representedFilename = filename; + } + } + + public getRepresentedFilename(): string { + if (platform.isMacintosh) { + return this.win.getRepresentedFilename(); + } + + return this.representedFilename; + } + public focus(): void { if (!this._win) { return; diff --git a/src/vs/platform/windows/electron-main/windowsService.ts b/src/vs/platform/windows/electron-main/windowsService.ts index 096386c0f5e19..9d147b623ca07 100644 --- a/src/vs/platform/windows/electron-main/windowsService.ts +++ b/src/vs/platform/windows/electron-main/windowsService.ts @@ -16,7 +16,6 @@ import Event, { chain } from 'vs/base/common/event'; import { fromEventEmitter } from 'vs/base/node/event'; import { IURLService } from 'vs/platform/url/common/url'; import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; -import { isMacintosh } from "vs/base/common/platform"; import { OpenContext } from 'vs/code/common/windows'; // TODO@Joao: remove this dependency, move all implementation to this class import { IWindowsMainService } from 'vs/code/electron-main/windows'; import { ILifecycleService } from "vs/code/electron-main/lifecycle"; @@ -124,7 +123,7 @@ export class WindowsService implements IWindowsService, IDisposable { const vscodeWindow = this.windowsMainService.getWindowById(windowId); if (vscodeWindow) { - vscodeWindow.win.setRepresentedFilename(fileName); + vscodeWindow.setRepresentedFilename(fileName); } return TPromise.as(null); @@ -254,11 +253,7 @@ export class WindowsService implements IWindowsService, IDisposable { getWindows(): TPromise<{ id: number; path: string; title: string; }[]> { const windows = this.windowsMainService.getWindows(); - const result = windows.map(w => { - const filename = isMacintosh ? w.win.getRepresentedFilename() : void 0; - - return { path: w.openedWorkspacePath, title: w.win.getTitle(), id: w.id, filename }; - }); + const result = windows.map(w => ({ path: w.openedWorkspacePath, title: w.win.getTitle(), id: w.id, filename: w.getRepresentedFilename() })); return TPromise.as(result); } diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index e0eb6f23dfe51..a604e215ea54e 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -98,14 +98,12 @@ export class ElectronWindow extends Themable { private registerListeners(): void { - // React to editor input changes (Mac only) - if (platform.platform === platform.Platform.Mac) { - this.editorGroupService.onEditorsChanged(() => { - const file = toResource(this.editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); + // React to editor input changes + this.editorGroupService.onEditorsChanged(() => { + const file = toResource(this.editorService.getActiveEditorInput(), { supportSideBySide: true, filter: 'file' }); - this.titleService.setRepresentedFilename(file ? file.fsPath : ''); - }); - } + this.titleService.setRepresentedFilename(file ? file.fsPath : ''); + }); let draggedExternalResources: URI[]; let dropOverlay: Builder; From 70deb179d4f1044b868133a011d58c0fdc393741 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 6 Jun 2017 11:51:06 +0200 Subject: [PATCH 1540/2747] inputs: open context menu where mouse is --- src/vs/code/electron-main/window.ts | 34 ++++++++++----------- src/vs/workbench/electron-browser/window.ts | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 71d26108b0cb4..9d40c049ad7c1 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -6,7 +6,6 @@ 'use strict'; import * as path from 'path'; -import * as platform from 'vs/base/common/platform'; import * as objects from 'vs/base/common/objects'; import { stopProfiling } from 'vs/base/node/profiler'; import nls = require('vs/nls'); @@ -23,6 +22,7 @@ import { getCommonHTTPHeaders } from 'vs/platform/environment/node/http'; import { IWindowSettings, MenuBarVisibility } from 'vs/platform/windows/common/windows'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { KeyboardLayoutMonitor } from 'vs/code/node/keyboard'; +import { IProcessEnvironment, isLinux, isMacintosh, isWindows } from "vs/base/common/platform"; export interface IWindowState { width?: number; @@ -76,7 +76,7 @@ export interface IWindowConfiguration extends ParsedArgs { appRoot: string; execPath: string; - userEnv: platform.IProcessEnvironment; + userEnv: IProcessEnvironment; /** * The physical keyboard is of ISO type (on OSX). @@ -199,7 +199,7 @@ export class VSCodeWindow { } }; - if (platform.isLinux) { + if (isLinux) { options.icon = path.join(this.environmentService.appRoot, 'resources/linux/code.png'); // Windows and Mac are better off using the embedded icon(s) } @@ -212,7 +212,7 @@ export class VSCodeWindow { } let useCustomTitleStyle = false; - if (platform.isMacintosh && (!windowConfig || !windowConfig.titleBarStyle || windowConfig.titleBarStyle === 'custom')) { + if (isMacintosh && (!windowConfig || !windowConfig.titleBarStyle || windowConfig.titleBarStyle === 'custom')) { const isDev = !this.environmentService.isBuilt || !!config.extensionDevelopmentPath; if (!isDev) { useCustomTitleStyle = true; // not enabled when developing due to https://github.com/electron/electron/issues/3647 @@ -237,7 +237,7 @@ export class VSCodeWindow { } // Set relaunch command - if (platform.isWindows && product.win32AppUserModelId && typeof this._win.setAppDetails === 'function') { + if (isWindows && product.win32AppUserModelId && typeof this._win.setAppDetails === 'function') { this._win.setAppDetails({ appId: product.win32AppUserModelId, relaunchCommand: `"${process.execPath}" -n`, @@ -313,7 +313,7 @@ export class VSCodeWindow { } public setRepresentedFilename(filename: string): void { - if (platform.isMacintosh) { + if (isMacintosh) { this.win.setRepresentedFilename(filename); } else { this.representedFilename = filename; @@ -321,7 +321,7 @@ export class VSCodeWindow { } public getRepresentedFilename(): string { - if (platform.isMacintosh) { + if (isMacintosh) { return this.win.getRepresentedFilename(); } @@ -440,7 +440,7 @@ export class VSCodeWindow { }); // React to HC color scheme changes (Windows) - if (platform.isWindows) { + if (isWindows) { systemPreferences.on('inverted-color-scheme-changed', () => { if (systemPreferences.isInvertedColorScheme()) { this.sendWhenReady('vscode:enterHighContrast'); @@ -477,7 +477,7 @@ export class VSCodeWindow { } // Swipe command support (macOS) - if (platform.isMacintosh) { + if (isMacintosh) { const config = this.configurationService.getConfiguration(); if (config && config.workbench && config.workbench.editor && config.workbench.editor.swipeToNavigate) { this.registerNavigationListenerOn('swipe', 'left', 'right', true); @@ -505,7 +505,7 @@ export class VSCodeWindow { } // Make sure to clear any previous edited state - if (platform.isMacintosh && this._win.isDocumentEdited()) { + if (isMacintosh && this._win.isDocumentEdited()) { this._win.setDocumentEdited(false); } @@ -569,7 +569,7 @@ export class VSCodeWindow { windowConfiguration.fullscreen = this._win.isFullScreen(); // Set Accessibility Config - windowConfiguration.highContrast = platform.isWindows && systemPreferences.isInvertedColorScheme() && (!windowConfig || windowConfig.autoDetectHighContrast); + windowConfiguration.highContrast = isWindows && systemPreferences.isInvertedColorScheme() && (!windowConfig || windowConfig.autoDetectHighContrast); windowConfiguration.accessibilitySupport = app.isAccessibilitySupportEnabled(); // Set Keyboard Config @@ -599,7 +599,7 @@ export class VSCodeWindow { } private getBaseTheme(): string { - if (platform.isWindows && systemPreferences.isInvertedColorScheme()) { + if (isWindows && systemPreferences.isInvertedColorScheme()) { return 'hc-black'; } const theme = this.storageService.getItem(VSCodeWindow.themeStorageKey, 'vs-dark'); @@ -607,14 +607,14 @@ export class VSCodeWindow { } private getBackgroundColor(): string { - if (platform.isWindows && systemPreferences.isInvertedColorScheme()) { + if (isWindows && systemPreferences.isInvertedColorScheme()) { return '#000000'; } let background = this.storageService.getItem(VSCodeWindow.themeBackgroundStorageKey, null); if (!background) { let baseTheme = this.getBaseTheme(); - return baseTheme === 'hc-black' ? '#000000' : (baseTheme === 'vs' ? '#FFFFFF' : (platform.isMacintosh ? '#171717' : '#1E1E1E')); // https://github.com/electron/electron/issues/5150 + return baseTheme === 'hc-black' ? '#000000' : (baseTheme === 'vs' ? '#FFFFFF' : (isMacintosh ? '#171717' : '#1E1E1E')); // https://github.com/electron/electron/issues/5150 } return background; @@ -642,7 +642,7 @@ export class VSCodeWindow { let mode: WindowMode; // get window mode - if (!platform.isMacintosh && this._win.isMaximized()) { + if (!isMacintosh && this._win.isMaximized()) { mode = WindowMode.Maximized; } else { mode = WindowMode.Normal; @@ -800,7 +800,7 @@ export class VSCodeWindow { } public setMenuBarVisibility(visibility: MenuBarVisibility, notify: boolean = true): void { - if (platform.isMacintosh) { + if (isMacintosh) { return; // ignore for macOS platform } @@ -843,7 +843,7 @@ export class VSCodeWindow { public onWindowTitleDoubleClick(): void { // Respect system settings on mac with regards to title click on windows title - if (platform.isMacintosh) { + if (isMacintosh) { const action = systemPreferences.getUserDefault('AppleActionOnDoubleClick', 'string'); switch (action) { case 'Minimize': diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index a604e215ea54e..d76662cdc5bc2 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -335,7 +335,7 @@ export class ElectronWindow extends Themable { e.stopPropagation(); this.contextMenuService.showContextMenu({ - getAnchor: () => target, + getAnchor: () => e, getActions: () => TPromise.as(TextInputActions) }); } From 552c80be2d0236d021021c819bb59a235df5e35b Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 6 Jun 2017 11:54:45 +0200 Subject: [PATCH 1541/2747] Fixes #28064: Use editor's configured line height for textarea's line height --- .../browser/controller/textAreaHandler.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index e927fcb4ab1a7..ec417fd436cc9 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -421,7 +421,24 @@ export class TextAreaHandler extends ViewPart { ta.setFontSize(1); // Chrome does not generate input events in empty textareas that end // up having a line height smaller than 1 screen pixel. - ta.setLineHeight(Math.ceil(Math.max(this._pixelRatio, 1 / this._pixelRatio))); + + // The problem is that I could not find any formula to explain how Chromium converts css px to screen px in the DOM. + // Observed values on a retina screen (by taking screenshots): + // |--------|-----------|------------|------------|-----------| + // | css px | zoomLevel | zoomFactor | pixelRatio | screen px | + // |--------|-----------|------------|------------|-----------| + // | 18 | -8 | 0.2325 | 0.5000 | 8 | + // | 18 | -7 | 0.2790 | 0.5581 | 10 | + // | 18 | -6 | 0.3348 | 0.6697 | 12 | + // | 18 | -5 | 0.4018 | 0.8037 | 14 | + // | 18 | -4 | 0.4822 | 0.9645 | 18 | + // | 18 | -3 | 0.5787 | 1.1574 | 20 | + // | 18 | -2 | 0.6944 | 1.3888 | 26 | + // | 18 | -1 | 0.8333 | 1.6666 | 30 | + // | 18 | 0 | 1.0000 | 2.0000 | 36 | + // |--------|-----------|------------|------------|-----------| + + ta.setLineHeight(this._fontInfo.lineHeight); } ta.setTop(top); From a8c7eaf7d1b759417c5d1b4c0c98b74fe568a0e8 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 6 Jun 2017 11:57:23 +0200 Subject: [PATCH 1542/2747] align command alias with labels --- .../browser/actions/toggleSidebarPosition.ts | 2 +- .../browser/parts/editor/editor.contribution.ts | 8 ++++---- .../workbench/browser/parts/panel/panelActions.ts | 2 +- .../electron-browser/main.contribution.ts | 6 +++--- .../toggleRenderControlCharacter.ts | 2 +- .../debug/electron-browser/debug.contribution.ts | 4 ++-- .../electron-browser/extensions.contribution.ts | 14 +++++++------- .../browser/preferences.contribution.ts | 2 +- .../quickopen/browser/quickopen.contribution.ts | 2 +- .../parts/scm/electron-browser/scm.contribution.ts | 2 +- .../electron-browser/snippets.contribution.ts | 2 +- .../tasks/electron-browser/task.contribution.ts | 2 +- .../electron-browser/terminal.contribution.ts | 2 +- .../update/electron-browser/update.contribution.ts | 2 +- .../welcome/overlay/browser/welcomeOverlay.ts | 2 +- 15 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/vs/workbench/browser/actions/toggleSidebarPosition.ts b/src/vs/workbench/browser/actions/toggleSidebarPosition.ts index 57364bd91882d..63036b94c5ef9 100644 --- a/src/vs/workbench/browser/actions/toggleSidebarPosition.ts +++ b/src/vs/workbench/browser/actions/toggleSidebarPosition.ts @@ -42,4 +42,4 @@ export class ToggleSidebarPositionAction extends Action { } const registry = Registry.as(Extensions.WorkbenchActions); -registry.registerWorkbenchAction(new SyncActionDescriptor(ToggleSidebarPositionAction, ToggleSidebarPositionAction.ID, ToggleSidebarPositionAction.LABEL), 'View: Toggle Side Bar Position', nls.localize('view', "View")); \ No newline at end of file +registry.registerWorkbenchAction(new SyncActionDescriptor(ToggleSidebarPositionAction, ToggleSidebarPositionAction.ID, ToggleSidebarPositionAction.LABEL), 'View: Toggle Side Bar Location', nls.localize('view', "View")); \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts index 7e8aa1bae2b9c..8c6275f0b55b9 100644 --- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts +++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts @@ -315,9 +315,9 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen // Register Editor Actions const category = nls.localize('view', "View"); registry.registerWorkbenchAction(new SyncActionDescriptor(OpenNextEditorInGroup, OpenNextEditorInGroup.ID, OpenNextEditorInGroup.LABEL), 'View: Open Next Editor in Group', category); -registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousEditorInGroup, OpenPreviousEditorInGroup.ID, OpenPreviousEditorInGroup.LABEL), 'View: Open Next Recently Used Editor in Group', category); -registry.registerWorkbenchAction(new SyncActionDescriptor(OpenNextRecentlyUsedEditorAction, OpenNextRecentlyUsedEditorAction.ID, OpenNextRecentlyUsedEditorAction.LABEL), 'View: Open Next Recently Used Editor'); -registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousRecentlyUsedEditorAction, OpenPreviousRecentlyUsedEditorAction.ID, OpenPreviousRecentlyUsedEditorAction.LABEL), 'View: Open Previous Recently Used Editor'); +registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousEditorInGroup, OpenPreviousEditorInGroup.ID, OpenPreviousEditorInGroup.LABEL), 'View: Open Previous Editor in Group', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(OpenNextRecentlyUsedEditorAction, OpenNextRecentlyUsedEditorAction.ID, OpenNextRecentlyUsedEditorAction.LABEL), 'View: Open Next Recently Used Editor', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousRecentlyUsedEditorAction, OpenPreviousRecentlyUsedEditorAction.ID, OpenPreviousRecentlyUsedEditorAction.LABEL), 'View: Open Previous Recently Used Editor', category); registry.registerWorkbenchAction(new SyncActionDescriptor(OpenNextRecentlyUsedEditorInGroupAction, OpenNextRecentlyUsedEditorInGroupAction.ID, OpenNextRecentlyUsedEditorInGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyCode.Tab } }), 'Open Next Recently Used Editor in Group'); registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousRecentlyUsedEditorInGroupAction, OpenPreviousRecentlyUsedEditorInGroupAction.ID, OpenPreviousRecentlyUsedEditorInGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Tab } }), 'Open Previous Recently Used Editor in Group'); registry.registerWorkbenchAction(new SyncActionDescriptor(ShowAllEditorsAction, ShowAllEditorsAction.ID, ShowAllEditorsAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_P), mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Tab } }), 'View: Show All Editors', category); @@ -342,7 +342,7 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(FocusActiveGroupAction registry.registerWorkbenchAction(new SyncActionDescriptor(FocusFirstGroupAction, FocusFirstGroupAction.ID, FocusFirstGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_1 }), 'View: Focus First Editor Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(FocusSecondGroupAction, FocusSecondGroupAction.ID, FocusSecondGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_2 }), 'View: Focus Second Editor Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(FocusThirdGroupAction, FocusThirdGroupAction.ID, FocusThirdGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_3 }), 'View: Focus Third Editor Group', category); -registry.registerWorkbenchAction(new SyncActionDescriptor(FocusLastEditorInStackAction, FocusLastEditorInStackAction.ID, FocusLastEditorInStackAction.LABEL, { primary: KeyMod.Alt | KeyCode.KEY_0, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_0 } }), 'View: Focus Last Editor in Group', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(FocusLastEditorInStackAction, FocusLastEditorInStackAction.ID, FocusLastEditorInStackAction.LABEL, { primary: KeyMod.Alt | KeyCode.KEY_0, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_0 } }), 'View: Open Last Editor in Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(EvenGroupWidthsAction, EvenGroupWidthsAction.ID, EvenGroupWidthsAction.LABEL), 'View: Even Editor Group Widths', category); registry.registerWorkbenchAction(new SyncActionDescriptor(MaximizeGroupAction, MaximizeGroupAction.ID, MaximizeGroupAction.LABEL), 'View: Maximize Editor Group and Hide Sidebar', category); registry.registerWorkbenchAction(new SyncActionDescriptor(MinimizeOtherGroupsAction, MinimizeOtherGroupsAction.ID, MinimizeOtherGroupsAction.LABEL), 'View: Minimize Other Editor Groups', category); diff --git a/src/vs/workbench/browser/parts/panel/panelActions.ts b/src/vs/workbench/browser/parts/panel/panelActions.ts index 8ef9ca2e6db41..fb50f93eb53a6 100644 --- a/src/vs/workbench/browser/parts/panel/panelActions.ts +++ b/src/vs/workbench/browser/parts/panel/panelActions.ts @@ -150,7 +150,7 @@ export class ToggleMaximizedPanelAction extends Action { } const actionRegistry = Registry.as(WorkbenchExtensions.WorkbenchActions); -actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(TogglePanelAction, TogglePanelAction.ID, TogglePanelAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_J }), 'View: Toggle Panel Visibility', nls.localize('view', "View")); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(TogglePanelAction, TogglePanelAction.ID, TogglePanelAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_J }), 'View: Toggle Panel', nls.localize('view', "View")); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusPanelAction, FocusPanelAction.ID, FocusPanelAction.LABEL), 'View: Focus into Panel', nls.localize('view', "View")); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleMaximizedPanelAction, ToggleMaximizedPanelAction.ID, ToggleMaximizedPanelAction.LABEL), 'View: Toggle Maximized Panel', nls.localize('view', "View")); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ClosePanelAction, ClosePanelAction.ID, ClosePanelAction.LABEL), 'View: Close Panel', nls.localize('view', "View")); \ No newline at end of file diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts index 7e293e56bbb19..f53c0ee723b54 100644 --- a/src/vs/workbench/electron-browser/main.contribution.ts +++ b/src/vs/workbench/electron-browser/main.contribution.ts @@ -35,7 +35,7 @@ workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(Switch workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(CloseFolderAction, CloseFolderAction.ID, CloseFolderAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_F) }), 'File: Close Folder', fileCategory); if (!!product.reportIssueUrl) { workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReportIssueAction, ReportIssueAction.ID, ReportIssueAction.LABEL), 'Help: Report Issues', helpCategory); - workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL), 'Help: Report Performance Issues', helpCategory); + workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL), 'Help: Report Performance Issue', helpCategory); } if (KeybindingsReferenceAction.AVAILABLE) { workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(KeybindingsReferenceAction, KeybindingsReferenceAction.ID, KeybindingsReferenceAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_R) }), 'Help: Keyboard Shortcuts Reference', helpCategory); @@ -74,8 +74,8 @@ workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(Naviga workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(NavigateLeftAction, NavigateLeftAction.ID, NavigateLeftAction.LABEL, null), 'View: Move to the View on the Left', viewCategory); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(NavigateRightAction, NavigateRightAction.ID, NavigateRightAction.LABEL, null), 'View: Move to the View on the Right', viewCategory); -workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(IncreaseViewSizeAction, IncreaseViewSizeAction.ID, IncreaseViewSizeAction.LABEL, null), 'View: Increase View Size', viewCategory); -workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(DecreaseViewSizeAction, DecreaseViewSizeAction.ID, DecreaseViewSizeAction.LABEL, null), 'View: Decrease View Size', viewCategory); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(IncreaseViewSizeAction, IncreaseViewSizeAction.ID, IncreaseViewSizeAction.LABEL, null), 'View: Increase Current View Size', viewCategory); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(DecreaseViewSizeAction, DecreaseViewSizeAction.ID, DecreaseViewSizeAction.LABEL, null), 'View: Decrease Current View Size', viewCategory); // Developer related actions const developerCategory = nls.localize('developer', "Developer"); diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.ts b/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.ts index 584821e2d3ada..7428c61dc8783 100644 --- a/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.ts +++ b/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.ts @@ -16,7 +16,7 @@ export class ToggleRenderControlCharacterAction extends EditorAction { super({ id: 'editor.action.toggleRenderControlCharacter', label: nls.localize('toggleRenderControlCharacters', "Toggle Control Characters"), - alias: 'Toggle Render Control Characters', + alias: 'Toggle Control Characters', precondition: null }); } diff --git a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts index 22c7191e5170c..947763e025535 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts @@ -127,9 +127,9 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(RunAction, RunAction.I registry.registerWorkbenchAction(new SyncActionDescriptor(RemoveAllBreakpointsAction, RemoveAllBreakpointsAction.ID, RemoveAllBreakpointsAction.LABEL), 'Debug: Remove All Breakpoints', debugCategory); registry.registerWorkbenchAction(new SyncActionDescriptor(EnableAllBreakpointsAction, EnableAllBreakpointsAction.ID, EnableAllBreakpointsAction.LABEL), 'Debug: Enable All Breakpoints', debugCategory); registry.registerWorkbenchAction(new SyncActionDescriptor(DisableAllBreakpointsAction, DisableAllBreakpointsAction.ID, DisableAllBreakpointsAction.LABEL), 'Debug: Disable All Breakpoints', debugCategory); -registry.registerWorkbenchAction(new SyncActionDescriptor(ClearReplAction, ClearReplAction.ID, ClearReplAction.LABEL), 'Debug: Clear Debug Console', debugCategory); +registry.registerWorkbenchAction(new SyncActionDescriptor(ClearReplAction, ClearReplAction.ID, ClearReplAction.LABEL), 'Debug: Clear Console', debugCategory); registry.registerWorkbenchAction(new SyncActionDescriptor(FocusReplAction, FocusReplAction.ID, FocusReplAction.LABEL), 'Debug: Focus Debug Console', debugCategory); -registry.registerWorkbenchAction(new SyncActionDescriptor(SelectAndStartAction, SelectAndStartAction.ID, SelectAndStartAction.LABEL), 'Debug: Launch Configuration', debugCategory); +registry.registerWorkbenchAction(new SyncActionDescriptor(SelectAndStartAction, SelectAndStartAction.ID, SelectAndStartAction.LABEL), 'Debug: Select and Start Debugging', debugCategory); // Register Quick Open (Registry.as(QuickOpenExtensions.Quickopen)).registerQuickOpenHandler( diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts index 74161d1c27c48..34b56a366bb2a 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts @@ -105,7 +105,7 @@ const openViewletActionDescriptor = new SyncActionDescriptor(OpenExtensionsViewl actionRegistry.registerWorkbenchAction(openViewletActionDescriptor, 'View: Show Extensions', localize('view', "View")); const installActionDescriptor = new SyncActionDescriptor(InstallExtensionsAction, InstallExtensionsAction.ID, InstallExtensionsAction.LABEL); -actionRegistry.registerWorkbenchAction(installActionDescriptor, 'Extensions: Install', ExtensionsLabel); +actionRegistry.registerWorkbenchAction(installActionDescriptor, 'Extensions: Install Extensions', ExtensionsLabel); const listOutdatedActionDescriptor = new SyncActionDescriptor(ShowOutdatedExtensionsAction, ShowOutdatedExtensionsAction.ID, ShowOutdatedExtensionsAction.LABEL); actionRegistry.registerWorkbenchAction(listOutdatedActionDescriptor, 'Extensions: Show Outdated Extensions', ExtensionsLabel); @@ -117,7 +117,7 @@ const keymapRecommendationsActionDescriptor = new SyncActionDescriptor(ShowRecom actionRegistry.registerWorkbenchAction(keymapRecommendationsActionDescriptor, 'Preferences: Keymaps', PreferencesLabel); const languageExtensionsActionDescriptor = new SyncActionDescriptor(ShowLanguageExtensionsAction, ShowLanguageExtensionsAction.ID, ShowLanguageExtensionsAction.SHORT_LABEL); -actionRegistry.registerWorkbenchAction(languageExtensionsActionDescriptor, 'Extensions: Language Extensions', PreferencesLabel); +actionRegistry.registerWorkbenchAction(languageExtensionsActionDescriptor, 'Preferences: Language Extensions', PreferencesLabel); const workspaceRecommendationsActionDescriptor = new SyncActionDescriptor(ShowWorkspaceRecommendedExtensionsAction, ShowWorkspaceRecommendedExtensionsAction.ID, ShowWorkspaceRecommendedExtensionsAction.LABEL); actionRegistry.registerWorkbenchAction(workspaceRecommendationsActionDescriptor, 'Extensions: Show Workspace Recommended Extensions', ExtensionsLabel); @@ -138,22 +138,22 @@ const openExtensionsFolderActionDescriptor = new SyncActionDescriptor(OpenExtens actionRegistry.registerWorkbenchAction(openExtensionsFolderActionDescriptor, 'Extensions: Open Extensions Folder', ExtensionsLabel); const openExtensionsFileActionDescriptor = new SyncActionDescriptor(ConfigureWorkspaceRecommendedExtensionsAction, ConfigureWorkspaceRecommendedExtensionsAction.ID, ConfigureWorkspaceRecommendedExtensionsAction.LABEL); -actionRegistry.registerWorkbenchAction(openExtensionsFileActionDescriptor, 'Extensions: Open Extensions File', ExtensionsLabel); +actionRegistry.registerWorkbenchAction(openExtensionsFileActionDescriptor, 'Extensions: Configure Recommended Extensions (Workspace)', ExtensionsLabel); const installVSIXActionDescriptor = new SyncActionDescriptor(InstallVSIXAction, InstallVSIXAction.ID, InstallVSIXAction.LABEL); actionRegistry.registerWorkbenchAction(installVSIXActionDescriptor, 'Extensions: Install from VSIX...', ExtensionsLabel); const disableAllAction = new SyncActionDescriptor(DisableAllAction, DisableAllAction.ID, DisableAllAction.LABEL); -actionRegistry.registerWorkbenchAction(disableAllAction, 'Extensions: Disable All', ExtensionsLabel); +actionRegistry.registerWorkbenchAction(disableAllAction, 'Extensions: Disable All Installed Extensions', ExtensionsLabel); const disableAllWorkspaceAction = new SyncActionDescriptor(DisableAllWorkpsaceAction, DisableAllWorkpsaceAction.ID, DisableAllWorkpsaceAction.LABEL); -actionRegistry.registerWorkbenchAction(disableAllWorkspaceAction, 'Extensions: Disable All (Workspace)', ExtensionsLabel); +actionRegistry.registerWorkbenchAction(disableAllWorkspaceAction, 'Extensions: Disable All Installed Extensions for this Workspace', ExtensionsLabel); const enableAllAction = new SyncActionDescriptor(EnableAllAction, EnableAllAction.ID, EnableAllAction.LABEL); -actionRegistry.registerWorkbenchAction(enableAllAction, 'Extensions: Enable All', ExtensionsLabel); +actionRegistry.registerWorkbenchAction(enableAllAction, 'Extensions: Enable All Installed Extensions', ExtensionsLabel); const enableAllWorkspaceAction = new SyncActionDescriptor(EnableAllWorkpsaceAction, EnableAllWorkpsaceAction.ID, EnableAllWorkpsaceAction.LABEL); -actionRegistry.registerWorkbenchAction(enableAllWorkspaceAction, 'Extensions: Enable All (Workspace)', ExtensionsLabel); +actionRegistry.registerWorkbenchAction(enableAllWorkspaceAction, 'Extensions: Enable All Installed Extensions for this Workspace', ExtensionsLabel); const checkForUpdatesAction = new SyncActionDescriptor(CheckForUpdatesAction, CheckForUpdatesAction.ID, CheckForUpdatesAction.LABEL); actionRegistry.registerWorkbenchAction(checkForUpdatesAction, `Extensions: Check for Updates`, ExtensionsLabel); diff --git a/src/vs/workbench/parts/preferences/browser/preferences.contribution.ts b/src/vs/workbench/parts/preferences/browser/preferences.contribution.ts index 1c4f38ca6e9ac..872e9a7c1decc 100644 --- a/src/vs/workbench/parts/preferences/browser/preferences.contribution.ts +++ b/src/vs/workbench/parts/preferences/browser/preferences.contribution.ts @@ -166,7 +166,7 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(OpenGlobalSettingsActi registry.registerWorkbenchAction(new SyncActionDescriptor(OpenWorkspaceSettingsAction, OpenWorkspaceSettingsAction.ID, OpenWorkspaceSettingsAction.LABEL), 'Preferences: Open Workspace Settings', category); registry.registerWorkbenchAction(new SyncActionDescriptor(OpenGlobalKeybindingsAction, OpenGlobalKeybindingsAction.ID, OpenGlobalKeybindingsAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_S) }), 'Preferences: Open Keyboard Shortcuts', category); registry.registerWorkbenchAction(new SyncActionDescriptor(OpenGlobalKeybindingsFileAction, OpenGlobalKeybindingsFileAction.ID, OpenGlobalKeybindingsFileAction.LABEL, { primary: null }), 'Preferences: Open Keyboard Shortcuts File', category); -registry.registerWorkbenchAction(new SyncActionDescriptor(ConfigureLanguageBasedSettingsAction, ConfigureLanguageBasedSettingsAction.ID, ConfigureLanguageBasedSettingsAction.LABEL), 'Preferences: Configure Language Specific Settings', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(ConfigureLanguageBasedSettingsAction, ConfigureLanguageBasedSettingsAction.ID, ConfigureLanguageBasedSettingsAction.LABEL), 'Preferences: Configure Language Specific Settings...', category); KeybindingsRegistry.registerCommandAndKeybindingRule({ id: KEYBINDINGS_EDITOR_COMMAND_DEFINE, diff --git a/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts b/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts index 154b5eb08c05d..e659f567dd4e6 100644 --- a/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts +++ b/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts @@ -32,7 +32,7 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(GotoLineAction, GotoLi registry.registerWorkbenchAction(new SyncActionDescriptor(GotoSymbolAction, GotoSymbolAction.ID, GotoSymbolAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_O -}), 'Go to Symbol...'); +}), 'Go to Symbol in File...'); registry.registerWorkbenchAction(new SyncActionDescriptor(OpenViewPickerAction, OpenViewPickerAction.ID, OpenViewPickerAction.LABEL), 'Open View'); registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenViewPickerAction, QuickOpenViewPickerAction.ID, QuickOpenViewPickerAction.LABEL, { diff --git a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts index e4cedd1923c96..045541ba0ea0b 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scm.contribution.ts @@ -101,4 +101,4 @@ Registry.as(WorkbenchActionExtensions.WorkbenchActions ); Registry.as(WorkbenchActionExtensions.WorkbenchActions) - .registerWorkbenchAction(new SyncActionDescriptor(SwitchProvider, SwitchProvider.ID, SwitchProvider.LABEL), 'SCM: Switch Provider', 'SCM'); + .registerWorkbenchAction(new SyncActionDescriptor(SwitchProvider, SwitchProvider.ID, SwitchProvider.LABEL), 'SCM: Switch SCM Provider', 'SCM'); diff --git a/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts b/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts index 2e69a2d456e3c..5abcf73825de1 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.ts @@ -118,7 +118,7 @@ function fileExists(path: string): winjs.TPromise { var preferencesCategory = nls.localize('preferences', "Preferences"); var workbenchActionsRegistry = platform.Registry.as(workbenchActionRegistry.Extensions.WorkbenchActions); -workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenSnippetsAction, OpenSnippetsAction.ID, OpenSnippetsAction.LABEL), 'Preferences: Snippets', preferencesCategory); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenSnippetsAction, OpenSnippetsAction.ID, OpenSnippetsAction.LABEL), 'Preferences: Open User Snippets', preferencesCategory); (platform.Registry.as(workbenchContributions.Extensions.Workbench)).registerWorkbenchContribution( snippetsTracker.SnippetsTracker diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 126ca11a1b8d8..5fea1fd052bb5 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -1368,7 +1368,7 @@ class TaskService extends EventEmitter implements ITaskService { let workbenchActionsRegistry = Registry.as(WorkbenchActionExtensions.WorkbenchActions); -workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ConfigureTaskRunnerAction, ConfigureTaskRunnerAction.ID, ConfigureTaskRunnerAction.TEXT), 'Configure Task Runner', tasksCategory); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ConfigureTaskRunnerAction, ConfigureTaskRunnerAction.ID, ConfigureTaskRunnerAction.TEXT), 'Tasks: Configure Task Runner', tasksCategory); MenuRegistry.addCommand({ id: 'workbench.action.tasks.showLog', title: { value: nls.localize('ShowLogAction.label', "Show Task Log"), original: 'Show Task Log' }, category: { value: tasksCategory, original: 'Tasks' } }); MenuRegistry.addCommand({ id: 'workbench.action.tasks.runTask', title: { value: nls.localize('RunTaskAction.label', "Run Task"), original: 'Run Task' }, category: { value: tasksCategory, original: 'Tasks' } }); diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index 17e931a643b4b..94e7e9a4b5215 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -217,7 +217,7 @@ actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(CreateNewTermina primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_BACKTICK, mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.US_BACKTICK } }), 'Terminal: Create New Integrated Terminal', category); -actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusActiveTerminalAction, FocusActiveTerminalAction.ID, FocusActiveTerminalAction.LABEL), 'Terminal: Focus Active Terminal', category); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusActiveTerminalAction, FocusActiveTerminalAction.ID, FocusActiveTerminalAction.LABEL), 'Terminal: Focus Terminal', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusNextTerminalAction, FocusNextTerminalAction.ID, FocusNextTerminalAction.LABEL), 'Terminal: Focus Next Terminal', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusPreviousTerminalAction, FocusPreviousTerminalAction.ID, FocusPreviousTerminalAction.LABEL), 'Terminal: Focus Previous Terminal', category); for (let i = 1; i < 10; i++) { diff --git a/src/vs/workbench/parts/update/electron-browser/update.contribution.ts b/src/vs/workbench/parts/update/electron-browser/update.contribution.ts index 64bba795487ec..7e9a2bb60d220 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.contribution.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.contribution.ts @@ -44,7 +44,7 @@ Registry.as(EditorExtensions.Editors) .registerEditor(editorDescriptor, [new SyncDescriptor(ReleaseNotesInput)]); Registry.as(ActionExtensions.WorkbenchActions) - .registerWorkbenchAction(new SyncActionDescriptor(ShowCurrentReleaseNotesAction, ShowCurrentReleaseNotesAction.ID, ShowCurrentReleaseNotesAction.LABEL), 'Open Release Notes'); + .registerWorkbenchAction(new SyncActionDescriptor(ShowCurrentReleaseNotesAction, ShowCurrentReleaseNotesAction.ID, ShowCurrentReleaseNotesAction.LABEL), 'Show Release Notes'); // Configuration: Update const configurationRegistry = Registry.as(ConfigurationExtensions.Configuration); diff --git a/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts b/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts index 20c82ff7a7cfc..7d63156d89e1b 100644 --- a/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts +++ b/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.ts @@ -232,7 +232,7 @@ class WelcomeOverlay { } Registry.as(Extensions.WorkbenchActions) - .registerWorkbenchAction(new SyncActionDescriptor(WelcomeOverlayAction, WelcomeOverlayAction.ID, WelcomeOverlayAction.LABEL), 'Help: Show Interface Overview', localize('help', "Help")); + .registerWorkbenchAction(new SyncActionDescriptor(WelcomeOverlayAction, WelcomeOverlayAction.ID, WelcomeOverlayAction.LABEL), 'Help: User Interface Overview', localize('help', "Help")); Registry.as(Extensions.WorkbenchActions) .registerWorkbenchAction(new SyncActionDescriptor(HideWelcomeOverlayAction, HideWelcomeOverlayAction.ID, HideWelcomeOverlayAction.LABEL, { primary: KeyCode.Escape }, OVERLAY_VISIBLE), 'Help: Hide Interface Overview', localize('help', "Help")); From 0c125f9b6133fff011256a6465d086f759a457f1 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 6 Jun 2017 11:58:18 +0200 Subject: [PATCH 1543/2747] tweak path labels with environment --- src/vs/base/common/labels.ts | 12 ------------ .../browser/referencesController.ts | 6 ++++-- .../referenceSearch/browser/referencesWidget.ts | 5 +++-- src/vs/workbench/electron-browser/actions.ts | 12 +++++++----- .../parts/debug/electron-browser/debugViewer.ts | 17 +++++++++++------ .../preferences/browser/preferencesService.ts | 2 +- 6 files changed, 26 insertions(+), 28 deletions(-) diff --git a/src/vs/base/common/labels.ts b/src/vs/base/common/labels.ts index f2aeccb210943..efbe348a613e4 100644 --- a/src/vs/base/common/labels.ts +++ b/src/vs/base/common/labels.ts @@ -29,18 +29,6 @@ export interface IUserHomeProvider { userHome: string; } -export class PathLabelProvider implements ILabelProvider { - private root: string; - - constructor(arg1?: URI | string | IWorkspaceProvider) { - this.root = arg1 && getPath(arg1); - } - - public getLabel(arg1: URI | string | IWorkspaceProvider): string { - return getPathLabel(getPath(arg1), this.root); - } -} - export function getPathLabel(resource: URI | string, basePathProvider?: URI | string | IWorkspaceProvider, userHomeProvider?: IUserHomeProvider): string { const absolutePath = getPath(resource); if (!absolutePath) { diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts index 140a7e3e0e8d4..c92079e556685 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts @@ -28,6 +28,7 @@ import { Range } from 'vs/editor/common/core/range'; import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Position } from 'vs/editor/common/core/position'; +import { IEnvironmentService } from "vs/platform/environment/common/environment"; export const ctxReferenceSearchVisible = new RawContextKey('referenceSearchVisible', false); @@ -66,7 +67,8 @@ export class ReferencesController implements editorCommon.IEditorContribution { @IStorageService private _storageService: IStorageService, @IThemeService private _themeService: IThemeService, @IConfigurationService private _configurationService: IConfigurationService, - @optional(IPeekViewService) private _peekViewService: IPeekViewService + @optional(IPeekViewService) private _peekViewService: IPeekViewService, + @optional(IEnvironmentService) private _environmentService: IEnvironmentService ) { this._editor = editor; this._referenceSearchVisible = ctxReferenceSearchVisible.bindTo(contextKeyService); @@ -107,7 +109,7 @@ export class ReferencesController implements editorCommon.IEditorContribution { })); const storageKey = 'peekViewLayout'; const data = JSON.parse(this._storageService.get(storageKey, undefined, '{}')); - this._widget = new ReferenceWidget(this._editor, data, this._textModelResolverService, this._contextService, this._themeService, this._instantiationService); + this._widget = new ReferenceWidget(this._editor, data, this._textModelResolverService, this._contextService, this._themeService, this._instantiationService, this._environmentService); this._widget.setTitle(nls.localize('labelLoading', "Loading...")); this._widget.show(range); this._disposables.push(this._widget.onDidClose(() => { diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index 959c2bc89399f..2a5de66352aa1 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -539,7 +539,8 @@ export class ReferenceWidget extends PeekViewWidget { private _textModelResolverService: ITextModelResolverService, private _contextService: IWorkspaceContextService, private _themeService: IThemeService, - private _instantiationService: IInstantiationService + private _instantiationService: IInstantiationService, + private _environmentService: IEnvironmentService ) { super(editor, { showFrame: false, showArrow: true, isResizeable: true }); @@ -777,7 +778,7 @@ export class ReferenceWidget extends PeekViewWidget { // Update widget header if (reference.uri.scheme !== Schemas.inMemory) { - this.setTitle(reference.name, getPathLabel(reference.directory, this._contextService)); + this.setTitle(reference.name, getPathLabel(reference.directory, this._contextService, this._environmentService)); } else { this.setTitle(nls.localize('peekView.alternateTitle', "References")); } diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index f538efb3bf3d9..3dde6ba6ca713 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -39,6 +39,7 @@ import { SWITCH_WINDOWS_PREFIX } from "vs/workbench/electron-browser/windowPicke import * as os from 'os'; import { webFrame } from 'electron'; +import { getPathLabel } from "vs/base/common/labels"; // --- actions @@ -580,7 +581,8 @@ export class OpenRecentAction extends Action { @IWindowsService private windowsService: IWindowsService, @IWindowService private windowService: IWindowService, @IQuickOpenService private quickOpenService: IQuickOpenService, - @IWorkspaceContextService private contextService: IWorkspaceContextService + @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IEnvironmentService private environmentService: IEnvironmentService ) { super(id, label); } @@ -591,12 +593,12 @@ export class OpenRecentAction extends Action { } private openRecent(recentFiles: string[], recentFolders: string[]): void { - function toPick(path: string, separator: ISeparator, isFolder: boolean): IFilePickOpenEntry { + function toPick(path: string, separator: ISeparator, isFolder: boolean, environmentService: IEnvironmentService): IFilePickOpenEntry { return { resource: URI.file(path), isFolder, label: paths.basename(path), - description: paths.dirname(path), + description: getPathLabel(paths.dirname(path), null, environmentService), separator, run: context => runPick(path, context) }; @@ -607,8 +609,8 @@ export class OpenRecentAction extends Action { this.windowsService.openWindow([path], { forceNewWindow }); }; - const folderPicks: IFilePickOpenEntry[] = recentFolders.map((p, index) => toPick(p, index === 0 ? { label: nls.localize('folders', "folders") } : void 0, true)); - const filePicks: IFilePickOpenEntry[] = recentFiles.map((p, index) => toPick(p, index === 0 ? { label: nls.localize('files', "files"), border: true } : void 0, false)); + const folderPicks: IFilePickOpenEntry[] = recentFolders.map((p, index) => toPick(p, index === 0 ? { label: nls.localize('folders', "folders") } : void 0, true, this.environmentService)); + const filePicks: IFilePickOpenEntry[] = recentFiles.map((p, index) => toPick(p, index === 0 ? { label: nls.localize('files', "files"), border: true } : void 0, false, this.environmentService)); const hasWorkspace = this.contextService.hasWorkspace(); diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index caddb78c3d343..820660e4f1dfe 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -36,6 +36,7 @@ import { Source } from 'vs/workbench/parts/debug/common/debugSource'; import { once } from 'vs/base/common/functional'; import { attachInputBoxStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { IEnvironmentService } from "vs/platform/environment/common/environment"; const $ = dom.$; const booleanRegex = /^true|false$/i; @@ -179,12 +180,12 @@ function renderRenameBox(debugService: debug.IDebugService, contextViewService: })); } -function getSourceName(source: Source, contextService: IWorkspaceContextService): string { +function getSourceName(source: Source, contextService: IWorkspaceContextService, environmentService?: IEnvironmentService): string { if (source.name) { return source.name; } - return getPathLabel(paths.basename(source.uri.fsPath), contextService); + return getPathLabel(paths.basename(source.uri.fsPath), contextService, environmentService); } export class BaseDebugController extends DefaultController { @@ -427,7 +428,10 @@ export class CallStackRenderer implements IRenderer { private static LOAD_MORE_TEMPLATE_ID = 'loadMore'; private static PROCESS_TEMPLATE_ID = 'process'; - constructor( @IWorkspaceContextService private contextService: IWorkspaceContextService) { + constructor( + @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IEnvironmentService private environmentService: IEnvironmentService + ) { // noop } @@ -549,7 +553,7 @@ export class CallStackRenderer implements IRenderer { } data.label.textContent = stackFrame.name; data.label.title = stackFrame.name; - data.fileName.textContent = getSourceName(stackFrame.source, this.contextService); + data.fileName.textContent = getSourceName(stackFrame.source, this.contextService, this.environmentService); if (stackFrame.range.startLineNumber !== undefined) { data.lineNumber.textContent = `${stackFrame.range.startLineNumber}`; if (stackFrame.range.startColumn) { @@ -1107,7 +1111,8 @@ export class BreakpointsRenderer implements IRenderer { @IWorkspaceContextService private contextService: IWorkspaceContextService, @debug.IDebugService private debugService: debug.IDebugService, @IContextViewService private contextViewService: IContextViewService, - @IThemeService private themeService: IThemeService + @IThemeService private themeService: IThemeService, + @IEnvironmentService private environmentService: IEnvironmentService ) { // noop } @@ -1209,7 +1214,7 @@ export class BreakpointsRenderer implements IRenderer { if (breakpoint.column) { data.lineNumber.textContent += `:${breakpoint.column}`; } - data.filePath.textContent = getPathLabel(paths.dirname(breakpoint.uri.fsPath), this.contextService); + data.filePath.textContent = getPathLabel(paths.dirname(breakpoint.uri.fsPath), this.contextService, this.environmentService); data.checkbox.checked = breakpoint.enabled; const debugActive = this.debugService.state === debug.State.Running || this.debugService.state === debug.State.Stopped || this.debugService.state === debug.State.Initializing; diff --git a/src/vs/workbench/parts/preferences/browser/preferencesService.ts b/src/vs/workbench/parts/preferences/browser/preferencesService.ts index bb6d77f0d309c..6f2fd27c01f9d 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesService.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesService.ts @@ -271,7 +271,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic return this.fileService.resolveContent(resource, { acceptTextOnly: true }).then(null, error => { if ((error).fileOperationResult === FileOperationResult.FILE_NOT_FOUND) { return this.fileService.updateContent(resource, contents).then(null, error => { - return TPromise.wrapError(new Error(nls.localize('fail.createSettings', "Unable to create '{0}' ({1}).", labels.getPathLabel(resource, this.contextService), error))); + return TPromise.wrapError(new Error(nls.localize('fail.createSettings', "Unable to create '{0}' ({1}).", labels.getPathLabel(resource, this.contextService, this.environmentService), error))); }); } From 7df06724b89958cb975da1d9e43ea97807ff277a Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 6 Jun 2017 11:58:49 +0200 Subject: [PATCH 1544/2747] use tildify in more places --- src/vs/code/electron-main/menus.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index dc6c05f0d49c1..4323e8ca2ca0e 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -24,6 +24,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import Event, { Emitter, once } from 'vs/base/common/event'; import { ConfigWatcher } from 'vs/base/node/config'; import { IUserFriendlyKeybinding } from 'vs/platform/keybinding/common/keybinding'; +import { tildify } from "vs/base/common/labels"; interface IKeybinding { id: string; @@ -543,13 +544,8 @@ export class VSCodeMenu { } private createOpenRecentMenuItem(path: string, commandId: string): Electron.MenuItem { - let label = path; - if ((isMacintosh || isLinux) && path.indexOf(this.environmentService.userHome) === 0) { - label = `~${path.substr(this.environmentService.userHome.length)}`; - } - return new MenuItem(this.likeAction(commandId, { - label: this.unmnemonicLabel(label), click: (menuItem, win, event) => { + label: this.unmnemonicLabel(tildify(path, this.environmentService.userHome)), click: (menuItem, win, event) => { const openInNewWindow = this.isOptionClick(event); const success = !!this.windowsService.open({ context: OpenContext.MENU, cli: this.environmentService.args, pathsToOpen: [path], forceNewWindow: openInNewWindow }); if (!success) { From 90b78697adf7a21fb4be9bd5c50e1cf255133fba Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 6 Jun 2017 12:00:42 +0200 Subject: [PATCH 1545/2747] :lipstick: --- src/vs/workbench/electron-browser/actions.ts | 8 ++++---- src/vs/workbench/parts/debug/browser/debugActions.ts | 4 ++-- src/vs/workbench/parts/debug/browser/debugViewlet.ts | 6 +++--- .../parts/debug/electron-browser/debugCommands.ts | 2 +- .../electron-browser/debugConfigurationManager.ts | 6 +++--- .../parts/debug/electron-browser/debugService.ts | 10 +++++----- .../parts/tasks/node/processRunnerDetector.ts | 3 +-- .../services/textfile/common/textFileEditorModel.ts | 2 +- 8 files changed, 20 insertions(+), 21 deletions(-) diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index 3dde6ba6ca713..90bf406fd5753 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -1037,7 +1037,7 @@ export abstract class BaseNavigationAction extends Action { export class NavigateLeftAction extends BaseNavigationAction { public static ID = 'workbench.action.navigateLeft'; - public static LABEL = nls.localize('navigateLeft', "Move to the View on the Left"); + public static LABEL = nls.localize('navigateLeft', "Navigate to the View on the Left"); constructor( id: string, @@ -1087,7 +1087,7 @@ export class NavigateLeftAction extends BaseNavigationAction { export class NavigateRightAction extends BaseNavigationAction { public static ID = 'workbench.action.navigateRight'; - public static LABEL = nls.localize('navigateRight', "Move to the View on the Right"); + public static LABEL = nls.localize('navigateRight', "Navigate to the View on the Right"); constructor( id: string, @@ -1137,7 +1137,7 @@ export class NavigateRightAction extends BaseNavigationAction { export class NavigateUpAction extends BaseNavigationAction { public static ID = 'workbench.action.navigateUp'; - public static LABEL = nls.localize('navigateUp', "Move to the View Above"); + public static LABEL = nls.localize('navigateUp', "Navigate to the View Above"); constructor( id: string, @@ -1168,7 +1168,7 @@ export class NavigateUpAction extends BaseNavigationAction { export class NavigateDownAction extends BaseNavigationAction { public static ID = 'workbench.action.navigateDown'; - public static LABEL = nls.localize('navigateDown', "Move to the View Below"); + public static LABEL = nls.localize('navigateDown', "Navigate to the View Below"); constructor( id: string, diff --git a/src/vs/workbench/parts/debug/browser/debugActions.ts b/src/vs/workbench/parts/debug/browser/debugActions.ts index 6a23b8588cd8a..159cbaf03b870 100644 --- a/src/vs/workbench/parts/debug/browser/debugActions.ts +++ b/src/vs/workbench/parts/debug/browser/debugActions.ts @@ -98,7 +98,7 @@ export class ConfigureAction extends AbstractDebugAction { } public run(event?: any): TPromise { - if (!this.contextService.getWorkspace()) { + if (!this.contextService.hasWorkspace()) { this.messageService.show(severity.Info, nls.localize('noFolderDebugConfig', "Please first open a folder in order to do advanced debug configuration.")); return TPromise.as(null); } @@ -137,7 +137,7 @@ export class StartAction extends AbstractDebugAction { const compound = this.debugService.getConfigurationManager().getCompound(this.debugService.getViewModel().selectedConfigurationName); return state !== State.Initializing && processes.every(p => p.name !== this.debugService.getViewModel().selectedConfigurationName) && (!compound || !compound.configurations || processes.every(p => compound.configurations.indexOf(p.name) === -1)) && - (!this.contextService || !!this.contextService.getWorkspace() || processes.length === 0); + (!this.contextService || this.contextService.hasWorkspace() || processes.length === 0); } } diff --git a/src/vs/workbench/parts/debug/browser/debugViewlet.ts b/src/vs/workbench/parts/debug/browser/debugViewlet.ts index a36d31280224b..07d674a0d16a9 100644 --- a/src/vs/workbench/parts/debug/browser/debugViewlet.ts +++ b/src/vs/workbench/parts/debug/browser/debugViewlet.ts @@ -110,7 +110,7 @@ export class DebugViewlet extends Viewlet { public focus(): void { super.focus(); - if (!this.contextService.getWorkspace()) { + if (!this.contextService.hasWorkspace()) { this.views[0].focusBody(); } @@ -123,7 +123,7 @@ export class DebugViewlet extends Viewlet { if (!this.actions) { this.actions = []; this.actions.push(this.instantiationService.createInstance(StartAction, StartAction.ID, StartAction.LABEL)); - if (this.contextService.getWorkspace()) { + if (this.contextService.hasWorkspace()) { this.actions.push(this.instantiationService.createInstance(ConfigureAction, ConfigureAction.ID, ConfigureAction.LABEL)); } this.actions.push(this.instantiationService.createInstance(ToggleReplAction, ToggleReplAction.ID, ToggleReplAction.LABEL)); @@ -137,7 +137,7 @@ export class DebugViewlet extends Viewlet { } public getActionItem(action: IAction): IActionItem { - if (action.id === StartAction.ID && this.contextService.getWorkspace()) { + if (action.id === StartAction.ID && this.contextService.hasWorkspace()) { this.startDebugActionItem = this.instantiationService.createInstance(StartDebugActionItem, null, action); return this.startDebugActionItem; } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts b/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts index ec6a8673d4f3b..d19a3b4beffb1 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugCommands.ts @@ -199,7 +199,7 @@ export function registerCommands(): void { primary: undefined, handler: (accessor) => { const manager = accessor.get(IDebugService).getConfigurationManager(); - if (!accessor.get(IWorkspaceContextService).getWorkspace()) { + if (!accessor.get(IWorkspaceContextService).hasWorkspace()) { accessor.get(IMessageService).show(severity.Info, nls.localize('noFolderDebugConfig', "Please first open a folder in order to do advanced debug configuration.")); return TPromise.as(null); } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts index 35091fbd8b73a..c8f9bc3ec76eb 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts @@ -272,7 +272,7 @@ export class ConfigurationManager implements debug.IConfigurationManager { } public getCompound(name: string): debug.ICompound { - if (!this.contextService.getWorkspace()) { + if (!this.contextService.hasWorkspace()) { return null; } @@ -302,7 +302,7 @@ export class ConfigurationManager implements debug.IConfigurationManager { } public getConfiguration(name: string): debug.IConfig { - if (!this.contextService.getWorkspace()) { + if (!this.contextService.hasWorkspace()) { return null; } @@ -315,7 +315,7 @@ export class ConfigurationManager implements debug.IConfigurationManager { } public resloveConfiguration(config: debug.IConfig): TPromise { - if (!this.contextService.getWorkspace()) { + if (!this.contextService.hasWorkspace()) { return TPromise.as(config); } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 441ac578f43ee..64bf423dfc10e 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -410,7 +410,7 @@ export class DebugService implements debug.IDebugService { // 'Run without debugging' mode VSCode must terminate the extension host. More details: #3905 const process = this.viewModel.focusedProcess; if (process && session && process.getId() === session.getId() && strings.equalsIgnoreCase(process.configuration.type, 'extensionhost') && this.sessionStates.get(session.getId()) === debug.State.Running && - process && this.contextService.getWorkspace() && process.configuration.noDebug) { + process && this.contextService.hasWorkspace() && process.configuration.noDebug) { this.windowsService.closeExtensionHostWindow(this.contextService.getWorkspace().resource.fsPath); } if (session && session.getId() === event.body.sessionId) { @@ -646,7 +646,7 @@ export class DebugService implements debug.IDebugService { if (commandAndType && commandAndType.command) { const defaultConfig = noDebug ? { noDebug: true } : {}; return this.commandService.executeCommand(commandAndType.command, config || defaultConfig).then((result: StartSessionResult) => { - if (this.contextService.getWorkspace()) { + if (this.contextService.hasWorkspace()) { if (result && result.status === 'initialConfiguration') { return manager.openConfigFile(false, commandAndType.type); } @@ -662,7 +662,7 @@ export class DebugService implements debug.IDebugService { if (config) { return this.createProcess(config); } - if (this.contextService.getWorkspace() && commandAndType) { + if (this.contextService.hasWorkspace() && commandAndType) { return manager.openConfigFile(false, commandAndType.type); } @@ -719,7 +719,7 @@ export class DebugService implements debug.IDebugService { }); }); }, err => { - if (!this.contextService.getWorkspace()) { + if (!this.contextService.hasWorkspace()) { return this.messageService.show(severity.Error, nls.localize('noFolderWorkspaceDebugError', "The active file can not be debugged. Make sure it is saved on disk and that you have a debug extension installed for that file type.")); } @@ -803,7 +803,7 @@ export class DebugService implements debug.IDebugService { this.panelService.openPanel(debug.REPL_ID, false).done(undefined, errors.onUnexpectedError); } - if (!this.viewModel.changedWorkbenchViewState && (this.partService.isVisible(Parts.SIDEBAR_PART) || !this.contextService.getWorkspace())) { + if (!this.viewModel.changedWorkbenchViewState && (this.partService.isVisible(Parts.SIDEBAR_PART) || !this.contextService.hasWorkspace())) { // We only want to change the workbench view state on the first debug session #5738 and if the side bar is not hidden this.viewModel.changedWorkbenchViewState = true; this.viewletService.openViewlet(debug.VIEWLET_ID); diff --git a/src/vs/workbench/parts/tasks/node/processRunnerDetector.ts b/src/vs/workbench/parts/tasks/node/processRunnerDetector.ts index 92c7473515ad6..a280054865ef8 100644 --- a/src/vs/workbench/parts/tasks/node/processRunnerDetector.ts +++ b/src/vs/workbench/parts/tasks/node/processRunnerDetector.ts @@ -155,8 +155,7 @@ export class ProcessRunnerDetector { this.taskConfiguration = config; this._stderr = []; this._stdout = []; - const workspace = this.contextService.getWorkspace(); - this._cwd = workspace ? Paths.normalize(workspace.resource.fsPath, true) : ''; + this._cwd = this.contextService.hasWorkspace() ? Paths.normalize(this.contextService.getWorkspace().resource.fsPath, true) : ''; } public get stderr(): string[] { diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts index 0f23475b17fd5..43631b46cc124 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts @@ -669,7 +669,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil diag(`doSave(${versionId}) - after updateContent()`, this.resource, new Date()); // Telemetry - if ((this.contextService.getWorkspace() && isEqualOrParent(this.resource.fsPath, this.contextService.toResource('.vscode').fsPath)) || + if ((this.contextService.hasWorkspace() && isEqualOrParent(this.resource.fsPath, this.contextService.toResource('.vscode').fsPath)) || this.resource.fsPath === this.environmentService.appSettingsPath) { // Do not log write to user settings.json and .vscode folder as a filePUT event as it ruins our JSON usage data this.telemetryService.publicLog('settingsWritten'); From 0b6b5857fc5fb815960afc44d25085447de2058a Mon Sep 17 00:00:00 2001 From: Anton Vildyaev Date: Tue, 6 Jun 2017 12:06:12 +0200 Subject: [PATCH 1546/2747] Fix funny dot bug (#27966) * Fix funny dot bug * fix comment --- src/vs/base/common/labels.ts | 2 +- src/vs/base/test/common/labels.test.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/base/common/labels.ts b/src/vs/base/common/labels.ts index efbe348a613e4..ce95b07160c5f 100644 --- a/src/vs/base/common/labels.ts +++ b/src/vs/base/common/labels.ts @@ -122,7 +122,7 @@ export function shorten(paths: string[]): string[] { let path = paths[pathIndex]; if (path === '') { - shortenedPaths[pathIndex] = '.'; + shortenedPaths[pathIndex] = `.${nativeSep}`; continue; } diff --git a/src/vs/base/test/common/labels.test.ts b/src/vs/base/test/common/labels.test.ts index 4476a121f250a..650b4ee86a6f4 100644 --- a/src/vs/base/test/common/labels.test.ts +++ b/src/vs/base/test/common/labels.test.ts @@ -57,11 +57,11 @@ suite('Labels', () => { assert.deepEqual(labels.shorten(['a\\b\\c', 'd\\b\\C']), ['…\\c', '…\\C']); // empty or null - assert.deepEqual(labels.shorten(['', null]), ['.', null]); + assert.deepEqual(labels.shorten(['', null]), ['.\\', null]); assert.deepEqual(labels.shorten(['a', 'a\\b', 'a\\b\\c', 'd\\b\\c', 'd\\b']), ['a', 'a\\b', 'a\\b\\c', 'd\\b\\c', 'd\\b']); assert.deepEqual(labels.shorten(['a', 'a\\b', 'b']), ['a', 'a\\b', 'b']); - assert.deepEqual(labels.shorten(['', 'a', 'b', 'b\\c', 'a\\c']), ['.', 'a', 'b', 'b\\c', 'a\\c']); + assert.deepEqual(labels.shorten(['', 'a', 'b', 'b\\c', 'a\\c']), ['.\\', 'a', 'b', 'b\\c', 'a\\c']); assert.deepEqual(labels.shorten(['src\\vs\\workbench\\parts\\execution\\electron-browser', 'src\\vs\\workbench\\parts\\execution\\electron-browser\\something', 'src\\vs\\workbench\\parts\\terminal\\electron-browser']), ['…\\execution\\electron-browser', '…\\something', '…\\terminal\\…']); }); @@ -105,11 +105,11 @@ suite('Labels', () => { assert.deepEqual(labels.shorten(['a/b/c', 'd/b/C']), ['…/c', '…/C']); // empty or null - assert.deepEqual(labels.shorten(['', null]), ['.', null]); + assert.deepEqual(labels.shorten(['', null]), ['./', null]); assert.deepEqual(labels.shorten(['a', 'a/b', 'a/b/c', 'd/b/c', 'd/b']), ['a', 'a/b', 'a/b/c', 'd/b/c', 'd/b']); assert.deepEqual(labels.shorten(['a', 'a/b', 'b']), ['a', 'a/b', 'b']); - assert.deepEqual(labels.shorten(['', 'a', 'b', 'b/c', 'a/c']), ['.', 'a', 'b', 'b/c', 'a/c']); + assert.deepEqual(labels.shorten(['', 'a', 'b', 'b/c', 'a/c']), ['./', 'a', 'b', 'b/c', 'a/c']); }); test('template', function () { From d221a330e92805f4ee162a5264d494b0053b18c0 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 6 Jun 2017 12:06:10 +0200 Subject: [PATCH 1547/2747] debug: fix callstack focus/selection weirdness fixes #28098 --- src/vs/workbench/parts/debug/electron-browser/debugViewer.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index 820660e4f1dfe..210f9e632e794 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -252,6 +252,7 @@ export class CallStackController extends BaseDebugController { return this.showMoreStackFrames(tree, element); } if (element instanceof StackFrame) { + super.onLeftClick(tree, element, event); this.focusStackFrame(element, event, event.detail !== 2); return true; } From 23e0a8a65628d9d293b7a45124b39e1977647955 Mon Sep 17 00:00:00 2001 From: Anton Vildyaev Date: Tue, 6 Jun 2017 12:07:09 +0200 Subject: [PATCH 1548/2747] Next group action should not create new group (#27967) * Next group action should not create new group * Remove unused references --- .../browser/parts/editor/editorActions.ts | 56 ++++++++----------- 1 file changed, 23 insertions(+), 33 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index f7f5e2e9b8382..34a37ea902f3c 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -15,8 +15,7 @@ import { EditorQuickOpenEntry, EditorQuickOpenEntryGroup, IEditorQuickOpenEntry, import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { IPartService } from 'vs/workbench/services/part/common/partService'; -import { Position, IEditor, Direction, IResourceInput, IEditorInput, POSITIONS } from 'vs/platform/editor/common/editor'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { Position, IEditor, Direction, IResourceInput, IEditorInput } from 'vs/platform/editor/common/editor'; import { IHistoryService } from 'vs/workbench/services/history/common/history'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IEditorGroupService, GroupArrangement } from 'vs/workbench/services/group/common/groupService'; @@ -414,19 +413,17 @@ export class FocusPreviousGroup extends Action { return TPromise.as(true); } + const stacks = this.editorGroupService.getStacksModel(); + const groupCount = stacks.groups.length; - // Find the next position to the left/top - let nextPosition: Position = Position.ONE; - if (activeEditor.position === Position.THREE) { - nextPosition = Position.TWO; - } else if (activeEditor.position === Position.ONE) { - // Get the last active position - const lastPosition = this.editorGroupService.getStacksModel().groups.length - 1; - nextPosition = lastPosition; + // Nothing to do if the only group + if (groupCount === 1) { + return TPromise.as(true); } - // Focus next position if provided - this.editorGroupService.focusGroup(nextPosition); + // Nevigate to the previous group or to the last group if the first group is active + const newPositionIndex = (activeEditor.position + groupCount - 1) % groupCount; + this.editorGroupService.focusGroup(newPositionIndex); return TPromise.as(true); } @@ -437,42 +434,35 @@ export class FocusNextGroup extends Action { public static ID = 'workbench.action.focusNextGroup'; public static LABEL = nls.localize('focusNextGroup', "Focus Next Group"); - private navigateActions: Action[]; - constructor( id: string, label: string, - @IWorkbenchEditorService private editorService: IWorkbenchEditorService, - @IInstantiationService instantiationService: IInstantiationService + @IEditorGroupService private editorGroupService: IEditorGroupService, + @IWorkbenchEditorService private editorService: IWorkbenchEditorService ) { super(id, label); - - this.navigateActions = []; - this.navigateActions[Position.ONE] = instantiationService.createInstance(FocusFirstGroupAction, FocusFirstGroupAction.ID, FocusFirstGroupAction.LABEL); - this.navigateActions[Position.TWO] = instantiationService.createInstance(FocusSecondGroupAction, FocusSecondGroupAction.ID, FocusSecondGroupAction.LABEL); - this.navigateActions[Position.THREE] = instantiationService.createInstance(FocusThirdGroupAction, FocusThirdGroupAction.ID, FocusThirdGroupAction.LABEL); } public run(event?: any): TPromise { - // Find the next position to the right/bottom to use - let nextPosition: Position; const activeEditor = this.editorService.getActiveEditor(); - const lastPosition = POSITIONS[POSITIONS.length - 1]; - if (!activeEditor || activeEditor.position === lastPosition) { - nextPosition = Position.ONE; - } else if (activeEditor.position === Position.ONE) { - nextPosition = Position.TWO; - } else if (activeEditor.position === Position.TWO) { - nextPosition = Position.THREE; + if (!activeEditor) { + return TPromise.as(true); } - // Run the action for the target next position - if (typeof nextPosition === 'number' && this.navigateActions[nextPosition]) { - return this.navigateActions[nextPosition].run(event); + const stacks = this.editorGroupService.getStacksModel(); + const groupCount = stacks.groups.length; + + // Nowhere to switch if the only group + if (groupCount === 1) { + return TPromise.as(true); } + // Nevigate to the next group or to the first group if the last group is active + const newPositionIndex = (activeEditor.position + 1) % groupCount; + this.editorGroupService.focusGroup(newPositionIndex); + return TPromise.as(true); } } From 35d1212bff530eab899d035cfa4df11e56ba5b93 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 6 Jun 2017 12:19:31 +0200 Subject: [PATCH 1549/2747] debt - less dependencies to untitlededitorinput --- src/vs/workbench/common/editor/untitledEditorInput.ts | 1 - src/vs/workbench/services/editor/browser/editorService.ts | 5 ++--- .../textmodelResolver/common/textModelResolverService.ts | 5 ++--- .../services/untitled/common/untitledEditorService.ts | 6 ++++-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/common/editor/untitledEditorInput.ts b/src/vs/workbench/common/editor/untitledEditorInput.ts index 753220ec1baf4..09cb75038a996 100644 --- a/src/vs/workbench/common/editor/untitledEditorInput.ts +++ b/src/vs/workbench/common/editor/untitledEditorInput.ts @@ -26,7 +26,6 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' export class UntitledEditorInput extends EditorInput implements IEncodingSupport { public static ID: string = 'workbench.editors.untitledEditorInput'; - public static SCHEMA: string = 'untitled'; private resource: URI; private _hasAssociatedFilePath: boolean; diff --git a/src/vs/workbench/services/editor/browser/editorService.ts b/src/vs/workbench/services/editor/browser/editorService.ts index b7257dd4119ba..7e4d4a52bcb55 100644 --- a/src/vs/workbench/services/editor/browser/editorService.ts +++ b/src/vs/workbench/services/editor/browser/editorService.ts @@ -12,8 +12,7 @@ import { basename, dirname } from 'vs/base/common/paths'; import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor'; import { EditorInput, EditorOptions, TextEditorOptions, IEditorRegistry, Extensions, SideBySideEditorInput, IFileEditorInput, IFileInputFactory } from 'vs/workbench/common/editor'; import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; -import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput'; -import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; +import { IUntitledEditorService, UNTITLED_SCHEMA } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IWorkbenchEditorService, IResourceInputType } from 'vs/workbench/services/editor/common/editorService'; import { IEditorInput, IEditorOptions, ITextEditorOptions, Position, Direction, IEditor, IResourceInput, IResourceDiffInput, IResourceSideBySideInput, IUntitledResourceInput } from 'vs/platform/editor/common/editor'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; @@ -233,7 +232,7 @@ export class WorkbenchEditorService implements IWorkbenchEditorService { // Untitled file support const untitledInput = input; - if (!untitledInput.resource || typeof untitledInput.filePath === 'string' || (untitledInput.resource instanceof URI && untitledInput.resource.scheme === UntitledEditorInput.SCHEMA)) { + if (!untitledInput.resource || typeof untitledInput.filePath === 'string' || (untitledInput.resource instanceof URI && untitledInput.resource.scheme === UNTITLED_SCHEMA)) { return this.untitledEditorService.createOrGet(untitledInput.filePath ? URI.file(untitledInput.filePath) : untitledInput.resource, untitledInput.language, untitledInput.contents); } diff --git a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts index c04739698dc89..e23296a97596e 100644 --- a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts +++ b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts @@ -15,8 +15,7 @@ import { ResourceEditorModel } from 'vs/workbench/common/editor/resourceEditorMo import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import network = require('vs/base/common/network'); import { ITextModelResolverService, ITextModelContentProvider, ITextEditorModel } from 'vs/editor/common/services/resolverService'; -import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; -import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput'; +import { IUntitledEditorService, UNTITLED_SCHEMA } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { TextFileEditorModel } from 'vs/workbench/services/textfile/common/textFileEditorModel'; class ResourceModelCollection extends ReferenceCollection> { @@ -116,7 +115,7 @@ export class TextModelResolverService implements ITextModelResolverService { // Untitled Schema: go through cached input // TODO ImmortalReference is a hack - if (resource.scheme === UntitledEditorInput.SCHEMA) { + if (resource.scheme === UNTITLED_SCHEMA) { return this.untitledEditorService.createOrGet(resource).resolve() .then(model => new ImmortalReference(model)); } diff --git a/src/vs/workbench/services/untitled/common/untitledEditorService.ts b/src/vs/workbench/services/untitled/common/untitledEditorService.ts index e1d7d25bbe658..f0c9de49e3e46 100644 --- a/src/vs/workbench/services/untitled/common/untitledEditorService.ts +++ b/src/vs/workbench/services/untitled/common/untitledEditorService.ts @@ -15,6 +15,8 @@ import { ResourceMap } from 'vs/base/common/map'; export const IUntitledEditorService = createDecorator('untitledEditorService'); +export const UNTITLED_SCHEMA = 'untitled'; + export interface IUntitledEditorService { _serviceBrand: any; @@ -161,7 +163,7 @@ export class UntitledEditorService implements IUntitledEditorService { let hasAssociatedFilePath = false; if (resource) { hasAssociatedFilePath = (resource.scheme === 'file'); - resource = resource.with({ scheme: UntitledEditorInput.SCHEMA }); // ensure we have the right scheme + resource = resource.with({ scheme: UNTITLED_SCHEMA }); // ensure we have the right scheme if (hasAssociatedFilePath) { UntitledEditorService.KNOWN_ASSOCIATED_FILE_PATHS.set(resource, true); // remember for future lookups @@ -183,7 +185,7 @@ export class UntitledEditorService implements IUntitledEditorService { // Create new taking a resource URI that is not already taken let counter = UntitledEditorService.CACHE.size + 1; do { - resource = URI.from({ scheme: UntitledEditorInput.SCHEMA, path: `Untitled-${counter}` }); + resource = URI.from({ scheme: UNTITLED_SCHEMA, path: `Untitled-${counter}` }); counter++; } while (UntitledEditorService.CACHE.has(resource)); } From b0e7f06a76d35da032123340ecea13ad46c623ea Mon Sep 17 00:00:00 2001 From: jens1o Date: Tue, 6 Jun 2017 12:23:10 +0200 Subject: [PATCH 1550/2747] fix some typos --- src/vs/editor/browser/widget/codeEditorWidget.ts | 1 + .../parts/debug/electron-browser/debugService.ts | 4 ++-- .../workbench/parts/debug/electron-browser/debugViews.ts | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index 0749b9d91715e..0c0e7235b567a 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -524,6 +524,7 @@ class CodeEditorWidgetFocusTracker extends Disposable { private _domFocusTracker: dom.IFocusTracker; private _onChange: Emitter = this._register(new Emitter()); + // TODO: Fix name public onChage: Event = this._onChange.event; constructor(domElement: HTMLElement) { diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 64bf423dfc10e..833ad93f8780c 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -172,7 +172,7 @@ export class DebugService implements debug.IDebugService { // attach: PH is ready to be attached to // TODO@Isidor this is a hack to just get any 'extensionHost' session. // Optimally the broadcast would contain the id of the session - // We are only intersted if we have an active debug session for extensionHost + // We are only interested if we have an active debug session for extensionHost const process = this.model.getProcesses().filter(p => strings.equalsIgnoreCase(p.configuration.type, 'extensionhost')).pop(); const session = process ? process.session : null; if (broadcast.channel === EXTENSION_ATTACH_BROADCAST_CHANNEL) { @@ -258,7 +258,7 @@ export class DebugService implements debug.IDebugService { } // flush simple values - // always append a new line for output coming from an extension such that seperate logs go to seperate lines #23695 + // always append a new line for output coming from an extension such that separate logs go to separate lines #23695 if (simpleVals.length) { this.model.appendToRepl(simpleVals.join(' ') + '\n', sev); } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts index f70b82840e57b..d13d9f8cd11d9 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts @@ -64,7 +64,7 @@ export class VariablesView extends CollapsibleViewletView { super(actionRunner, !!settings[VariablesView.MEMENTO], nls.localize('variablesSection', "Variables Section"), messageService, keybindingService, contextMenuService); this.variablesFocusedContext = CONTEXT_VARIABLES_FOCUSED.bindTo(contextKeyService); - // Use schedulre to prevent unnecessary flashing + // Use scheduler to prevent unnecessary flashing this.onFocusStackFrameScheduler = new RunOnceScheduler(() => { // Always clear tree highlight to avoid ending up in a broken state #12203 this.tree.clearHighlight(); @@ -116,7 +116,7 @@ export class VariablesView extends CollapsibleViewletView { this.toolBar.setActions(prepareActions([collapseAction]))(); this.toDispose.push(viewModel.onDidFocusStackFrame(sf => { - // Refresh the tree immediatly if it is not visible. + // Refresh the tree immediately if it is not visible. // Otherwise postpone the refresh until user stops stepping. if (!this.tree.getContentHeight()) { this.onFocusStackFrameScheduler.schedule(0); @@ -281,7 +281,7 @@ export class CallStackView extends CollapsibleViewletView { } // Only show the global pause message if we do not display threads. - // Otherwsie there will be a pause message per thread and there is no need for a global one. + // Otherwise there will be a pause message per thread and there is no need for a global one. if (newTreeInput instanceof Thread && newTreeInput.stoppedDetails) { this.pauseMessageLabel.text(newTreeInput.stoppedDetails.description || nls.localize('debugStopped', "Paused on {0}", newTreeInput.stoppedDetails.reason)); if (newTreeInput.stoppedDetails.text) { @@ -355,7 +355,7 @@ export class CallStackView extends CollapsibleViewletView { private updateTreeSelection(): TPromise { if (!this.tree.getInput()) { - // Tree not initialitized yet + // Tree not initialized yet return TPromise.as(null); } From 0ee66e5d3376b57bafafb880b863e6f132768fbb Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 6 Jun 2017 12:38:40 +0200 Subject: [PATCH 1551/2747] debt - clean up view state for resources/untitled when input gets disposed --- .../parts/editor/textResourceEditor.ts | 47 ++++++++++--------- .../parts/output/browser/outputPanel.ts | 4 +- .../common/editor/editorDiffModel.test.ts | 4 +- 3 files changed, 27 insertions(+), 28 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/textResourceEditor.ts b/src/vs/workbench/browser/parts/editor/textResourceEditor.ts index 764c05766044e..3a2a2b6a9067b 100644 --- a/src/vs/workbench/browser/parts/editor/textResourceEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textResourceEditor.ts @@ -14,16 +14,15 @@ import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorIn import { BaseTextEditorModel } from 'vs/workbench/common/editor/textEditorModel'; import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput'; import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor'; -import URI from 'vs/base/common/uri'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { once } from "vs/base/common/event"; /** * An editor implementation that is capable of showing the contents of resource inputs. Uses @@ -39,20 +38,11 @@ export class TextResourceEditor extends BaseTextEditor { @IStorageService storageService: IStorageService, @IConfigurationService configurationService: IConfigurationService, @IThemeService themeService: IThemeService, - @IUntitledEditorService private untitledEditorService: IUntitledEditorService, @IEditorGroupService editorGroupService: IEditorGroupService, @IModeService modeService: IModeService, @ITextFileService textFileService: ITextFileService ) { super(TextResourceEditor.ID, telemetryService, instantiationService, storageService, configurationService, themeService, modeService, textFileService, editorGroupService); - - this.toUnbind.push(this.untitledEditorService.onDidChangeDirty(e => this.onUntitledDirtyChange(e))); - } - - private onUntitledDirtyChange(resource: URI): void { - if (!this.untitledEditorService.isDirty(resource)) { - this.clearTextEditorViewState([resource.toString()]); // untitled file got reverted, so remove view state - } } public getTitle(): string { @@ -83,7 +73,7 @@ export class TextResourceEditor extends BaseTextEditor { } // Remember view settings if input changes - this.saveTextEditorViewState(oldInput); + this.saveTextEditorViewStateForInput(oldInput); // Different Input (Reload) return input.resolve(true).then((resolvedModel: EditorModel) => { @@ -166,7 +156,7 @@ export class TextResourceEditor extends BaseTextEditor { public clearInput(): void { // Keep editor view state in settings to restore when coming back - this.saveTextEditorViewState(this.input); + this.saveTextEditorViewStateForInput(this.input); // Clear Model this.getControl().setModel(null); @@ -176,22 +166,35 @@ export class TextResourceEditor extends BaseTextEditor { public shutdown(): void { - // Save View State - this.saveTextEditorViewState(this.input); + // Save View State (only for untitled) + if (this.input instanceof UntitledEditorInput) { + this.saveTextEditorViewStateForInput(this.input); + } // Call Super super.shutdown(); } - protected saveTextEditorViewState(input: EditorInput): void; - protected saveTextEditorViewState(key: string): void; - protected saveTextEditorViewState(arg1: EditorInput | string): void { - if (typeof arg1 === 'string') { - return super.saveTextEditorViewState(arg1); + protected saveTextEditorViewStateForInput(input: EditorInput): void { + if (!(input instanceof UntitledEditorInput) && !(input instanceof ResourceEditorInput)) { + return; // only enabled for untitled and resource inputs } - if ((arg1 instanceof UntitledEditorInput || arg1 instanceof ResourceEditorInput) && !arg1.isDisposed()) { - return super.saveTextEditorViewState(arg1.getResource().toString()); + const key = input.getResource().toString(); + + // Clear view state if input is disposed + if (input.isDisposed()) { + super.clearTextEditorViewState([key]); + } + + // Otherwise save it + else { + super.saveTextEditorViewState(key); + + // Make sure to clean up when the input gets disposed + once(input.onDispose)(() => { + super.clearTextEditorViewState([key]); + }); } } } \ No newline at end of file diff --git a/src/vs/workbench/parts/output/browser/outputPanel.ts b/src/vs/workbench/parts/output/browser/outputPanel.ts index 217bb1972c6cc..04cecbc39374e 100644 --- a/src/vs/workbench/parts/output/browser/outputPanel.ts +++ b/src/vs/workbench/parts/output/browser/outputPanel.ts @@ -22,7 +22,6 @@ import { TextResourceEditor } from 'vs/workbench/browser/parts/editor/textResour import { OutputEditors, OUTPUT_PANEL_ID, IOutputService, CONTEXT_IN_OUTPUT } from 'vs/workbench/parts/output/common/output'; import { SwitchOutputAction, SwitchOutputActionItem, ClearOutputAction, ToggleOutputScrollLockAction } from 'vs/workbench/parts/output/browser/outputActions'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; @@ -39,13 +38,12 @@ export class OutputPanel extends TextResourceEditor { @IConfigurationService configurationService: IConfigurationService, @IThemeService themeService: IThemeService, @IOutputService private outputService: IOutputService, - @IUntitledEditorService untitledEditorService: IUntitledEditorService, @IContextKeyService private contextKeyService: IContextKeyService, @IEditorGroupService editorGroupService: IEditorGroupService, @IModeService modeService: IModeService, @ITextFileService textFileService: ITextFileService ) { - super(telemetryService, instantiationService, storageService, configurationService, themeService, untitledEditorService, editorGroupService, modeService, textFileService); + super(telemetryService, instantiationService, storageService, configurationService, themeService, editorGroupService, modeService, textFileService); this.scopedInstantiationService = instantiationService; this.toDispose = []; diff --git a/src/vs/workbench/test/common/editor/editorDiffModel.test.ts b/src/vs/workbench/test/common/editor/editorDiffModel.test.ts index 2db61acaf4ec6..91541187e84d8 100644 --- a/src/vs/workbench/test/common/editor/editorDiffModel.test.ts +++ b/src/vs/workbench/test/common/editor/editorDiffModel.test.ts @@ -16,7 +16,6 @@ import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorIn import URI from 'vs/base/common/uri'; import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; -import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { TestTextFileService, workbenchInstantiationService } from 'vs/workbench/test/workbenchTestServices'; import { TPromise } from "vs/base/common/winjs.base"; import { IModel } from 'vs/editor/common/editorCommon'; @@ -30,8 +29,7 @@ class ServiceAccessor { @ITextModelResolverService public textModelResolverService: ITextModelResolverService, @IModelService public modelService: IModelService, @IModeService public modeService: IModeService, - @ITextFileService public textFileService: TestTextFileService, - @IUntitledEditorService public untitledEditorService: IUntitledEditorService + @ITextFileService public textFileService: TestTextFileService ) { } } From e4d76e67e1648071b364235d969465f79b56f66b Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 6 Jun 2017 12:40:12 +0200 Subject: [PATCH 1552/2747] Fixes #28093: deep clone editor creation options --- src/vs/editor/common/config/commonEditorConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 2d54be1a83297..7c32373ad2fd2 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -76,7 +76,7 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed constructor(options: editorOptions.IEditorOptions) { super(); - this._rawOptions = objects.mixin({}, options || {}); + this._rawOptions = objects.deepClone(options || {}); this._validatedOptions = editorOptions.EditorOptionsValidator.validate(this._rawOptions, EDITOR_DEFAULTS); this.editor = null; this._isDominatedByLongLines = false; From d03b5e954186a51c258afa77aef13b247c3e45c9 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 6 Jun 2017 12:57:46 +0200 Subject: [PATCH 1553/2747] eng - print test failure to renderer console for easy reveal in dev tools --- test/electron/renderer.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/electron/renderer.js b/test/electron/renderer.js index 2142403485169..93fb1472aa9b2 100644 --- a/test/electron/renderer.js +++ b/test/electron/renderer.js @@ -243,11 +243,19 @@ function runTests(opts) { mocha.reporter(IPCReporter); } - mocha.run(() => { + const runner = mocha.run(() => { createCoverageReport(opts).then(() => { ipcRenderer.send('all done'); }); }); + + if (opts.debug) { + runner.on('fail', (test, err) => { + + console.error(test.fullTitle()); + console.error(err.stack); + }); + } }); } From 2497dfe8a9991c48d5b2e6b345c7802fe11fbba1 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 6 Jun 2017 12:59:45 +0200 Subject: [PATCH 1554/2747] debt - remove last bit of old snippet syntax --- .../contrib/snippet/browser/snippetParser.ts | 80 +------------------ .../test/browser/snippetParser.test.ts | 80 ++++--------------- .../emmet/electron-browser/editorAccessor.ts | 2 +- .../snippets/electron-browser/TMSnippets.ts | 2 +- 4 files changed, 22 insertions(+), 142 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetParser.ts b/src/vs/editor/contrib/snippet/browser/snippetParser.ts index 7cd1fd61b3e1c..6cb1be524c454 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetParser.ts @@ -332,20 +332,14 @@ export class SnippetParser { } static parse(template: string, enforceFinalTabstop?: boolean): TextmateSnippet { - const marker = new SnippetParser(true, false).parse(template, true, enforceFinalTabstop); + const marker = new SnippetParser().parse(template, true, enforceFinalTabstop); return new TextmateSnippet(marker); } - private _enableTextMate: boolean; - private _enableInternal: boolean; private _scanner = new Scanner(); private _token: Token; private _prevToken: Token; - constructor(enableTextMate: boolean = true, enableInternal: boolean = true) { - this._enableTextMate = enableTextMate; - this._enableInternal = enableInternal; - } text(value: string): string { return Marker.toString(this.parse(value)); @@ -415,18 +409,10 @@ export class SnippetParser { return false; } - private _return(token: Token): void { - this._prevToken = undefined; - this._token = token; - this._scanner.pos = token.pos + token.len; - } - private _parseAny(marker: Marker[]): boolean { if (this._parseEscaped(marker)) { return true; - } else if (this._enableInternal && this._parseInternal(marker)) { - return true; - } else if (this._enableTextMate && this._parseTM(marker)) { + } else if (this._parseTM(marker)) { return true; } return false; @@ -491,69 +477,9 @@ export class SnippetParser { return false; } - private _parseInternal(marker: Marker[]): boolean { - if (this._accept(TokenType.CurlyOpen)) { - - if (!this._accept(TokenType.CurlyOpen)) { - this._return(this._prevToken); - return false; - } - - // {{name:children}}, {{name}}, {{name:}} - let name: Marker[] = []; - let children: Marker[] = []; - let target = name; - - while (true) { - - if (this._accept(TokenType.Colon)) { - target = children; - continue; - } - - if (this._accept(TokenType.CurlyClose)) { - - if (!this._accept(TokenType.CurlyClose)) { - this._return(this._prevToken); - continue; - } - - if (children !== target) { - // we have not seen the colon which - // means use the ident also as - // default value - children = name; - } - - marker.push(new Placeholder(Marker.toString(name), children)); - return true; - } - - if (this._parseAny(target) || this._parseText(target)) { - continue; - } - - // fallback - if (children.length > 0) { - marker.push(new Text('{{' + Marker.toString(name) + ':')); - marker.push(...children); - } else { - marker.push(new Text('{{')); - marker.push(...name); - } - return true; - } - } - return false; - } - private _parseEscaped(marker: Marker[]): boolean { if (this._accept(TokenType.Backslash)) { - if (// Internal style - (this._enableInternal && (this._accept(TokenType.CurlyOpen) || this._accept(TokenType.CurlyClose) || this._accept(TokenType.Backslash))) - // TextMate style - || (this._enableTextMate && (this._accept(TokenType.Dollar) || this._accept(TokenType.CurlyClose) || this._accept(TokenType.Backslash))) - ) { + if (this._accept(TokenType.Dollar) || this._accept(TokenType.CurlyClose) || this._accept(TokenType.Backslash)) { // just consume them } marker.push(new Text(this._scanner.tokenText(this._prevToken))); diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts index 2092238acc34b..874aadd1c5684 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts @@ -126,23 +126,23 @@ suite('SnippetParser', () => { assertText('\\}', '}'); assertText('\\abc', '\\abc'); assertText('foo${f:\\}}bar', 'foo}bar'); - assertText('\\{', '{'); + assertText('\\{', '\\{'); assertText('I need \\\\\\$', 'I need \\$'); assertText('\\', '\\'); - assertText('\\{{', '{{'); + assertText('\\{{', '\\{{'); assertText('{{', '{{'); assertText('{{dd', '{{dd'); assertText('}}', '}}'); assertText('ff}}', 'ff}}'); assertText('farboo', 'farboo'); - assertText('far{{}}boo', 'farboo'); - assertText('far{{123}}boo', 'far123boo'); - assertText('far\\{{123}}boo', 'far{{123}}boo'); - assertText('far{{id:bern}}boo', 'farbernboo'); - assertText('far{{id:bern {{basel}}}}boo', 'farbern baselboo'); - assertText('far{{id:bern {{id:basel}}}}boo', 'farbern baselboo'); - assertText('far{{id:bern {{id2:basel}}}}boo', 'farbern baselboo'); + assertText('far{{}}boo', 'far{{}}boo'); + assertText('far{{123}}boo', 'far{{123}}boo'); + assertText('far\\{{123}}boo', 'far\\{{123}}boo'); + assertText('far{{id:bern}}boo', 'far{{id:bern}}boo'); + assertText('far{{id:bern {{basel}}}}boo', 'far{{id:bern {{basel}}}}boo'); + assertText('far{{id:bern {{id:basel}}}}boo', 'far{{id:bern {{id:basel}}}}boo'); + assertText('far{{id:bern {{id2:basel}}}}boo', 'far{{id:bern {{id2:basel}}}}boo'); }); @@ -152,7 +152,7 @@ suite('SnippetParser', () => { assertTextAndMarker('foo${1:bar\\}${2:foo}}', 'foobar}foo', Text, Placeholder); - let [, placeholder] = new SnippetParser(true, false).parse('foo${1:bar\\}${2:foo}}'); + let [, placeholder] = new SnippetParser().parse('foo${1:bar\\}${2:foo}}'); let { children } = (placeholder); assert.equal((placeholder).index, '1'); @@ -164,9 +164,9 @@ suite('SnippetParser', () => { test('Parser, placeholder', () => { assertTextAndMarker('farboo', 'farboo', Text); - assertTextAndMarker('far{{}}boo', 'farboo', Text, Placeholder, Text); - assertTextAndMarker('far{{123}}boo', 'far123boo', Text, Placeholder, Text); - assertTextAndMarker('far\\{{123}}boo', 'far{{123}}boo', Text); + assertTextAndMarker('far{{}}boo', 'far{{}}boo', Text); + assertTextAndMarker('far{{123}}boo', 'far{{123}}boo', Text); + assertTextAndMarker('far\\{{123}}boo', 'far\\{{123}}boo', Text); }); test('Parser, literal code', () => { @@ -194,7 +194,7 @@ suite('SnippetParser', () => { }); test('Parser, only textmate', () => { - const p = new SnippetParser(true, false); + const p = new SnippetParser(); assertMarker(p.parse('far{{}}boo'), Text); assertMarker(p.parse('far{{123}}boo'), Text); assertMarker(p.parse('far\\{{123}}boo'), Text); @@ -204,17 +204,6 @@ suite('SnippetParser', () => { assertMarker(p.parse('far\\${123}boo'), Text); }); - test('Parser, only internal', () => { - const p = new SnippetParser(false, true); - assertMarker(p.parse('far{{}}boo'), Text, Placeholder, Text); - assertMarker(p.parse('far{{123}}boo'), Text, Placeholder, Text); - assertMarker(p.parse('far\\{{123}}boo'), Text); - - assertMarker(p.parse('far$0boo'), Text); - assertMarker(p.parse('far${123}boo'), Text); - assertMarker(p.parse('far\\${123}boo'), Text); - }); - test('Parser, real world', () => { let marker = new SnippetParser().parse('console.warn(${1: $TM_SELECTED_TEXT })'); @@ -242,41 +231,6 @@ suite('SnippetParser', () => { assert.ok(marker[0] instanceof Variable); }); - test('Parser, real world, mixed', () => { - - assertTextAndMarker( - 'finished:{{}}, second:{{2:name}}, first:{{1:}}, third:{{3:}}', - 'finished:, second:name, first:, third:', - Text, Placeholder, Text, Placeholder, Text, Placeholder, Text, Placeholder - ); - - - assertTextAndMarker( - 'begin\\{{{1:enumerate}}\\}\n\t{{}}\nend\\{{{1:}}\\}', - 'begin{enumerate}\n\t\nend{enumerate}', - Text, Placeholder, Text, Placeholder, Text, Placeholder, Text - ); - - }); - - test('Parser, default name/value', () => { - assertTextAndMarker( - '{{first}}-{{2:}}-{{second}}-{{1:}}', - 'first--second-', - Placeholder, Text, Placeholder, Text, Placeholder, Text, Placeholder - ); - - const [p1, , p2, , p3] = new SnippetParser().parse('{{first}}-{{2:}}-{{second}}-{{1:}}'); - assert.equal((p1).index, 'first'); - assert.equal(Marker.toString((p1).children), 'first'); - - assert.equal((p2).index, '2'); - assert.equal(Marker.toString((p2).children), ''); - - assert.equal((p3).index, 'second'); - assert.equal(Marker.toString((p3).children), 'second'); - }); - test('Parser, default placeholder values', () => { assertMarker('errorContext: `${1:err}`, error: $1', Text, Placeholder, Text, Placeholder); @@ -294,15 +248,15 @@ suite('SnippetParser', () => { }); test('backspace esapce in TM only, #16212', () => { - const actual = new SnippetParser(true, false).text('Foo \\\\${abc}bar'); + const actual = new SnippetParser().text('Foo \\\\${abc}bar'); assert.equal(actual, 'Foo \\bar'); }); test('colon as variable/placeholder value, #16717', () => { - let actual = new SnippetParser(true, false).text('${TM_SELECTED_TEXT:foo:bar}'); + let actual = new SnippetParser().text('${TM_SELECTED_TEXT:foo:bar}'); assert.equal(actual, 'foo:bar'); - actual = new SnippetParser(true, false).text('${1:foo:bar}'); + actual = new SnippetParser().text('${1:foo:bar}'); assert.equal(actual, 'foo:bar'); }); diff --git a/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts b/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts index f5e1ca1e52c01..66d77c525f996 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts @@ -114,7 +114,7 @@ export class EditorAccessor implements emmet.Editor { // string to string conversion that tries to fix the // snippet in-place - let marker = new SnippetParser(true, false).parse(template); + let marker = new SnippetParser().parse(template); let maxIndex = -Number.MIN_VALUE; // find highest placeholder index diff --git a/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts b/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts index 9098d608e8860..505049bb5f239 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.ts @@ -159,7 +159,7 @@ function parseSnippetFile(snippetFileContent: string, extensionName?: string, co } function _rewriteBogousVariables(snippet: ISnippet): boolean { - const marker = new SnippetParser(true, false).parse(snippet.codeSnippet, false); + const marker = new SnippetParser().parse(snippet.codeSnippet, false); let placeholders = new Map(); let placeholderMax = 0; From b13f7c7aaaa552f6bca362a5c485ee165f6e6eff Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 6 Jun 2017 13:06:50 +0200 Subject: [PATCH 1555/2747] fix #27902 --- .../performance/electron-browser/performance.contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts index 23945bccb6128..2e5916bdde031 100644 --- a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts +++ b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts @@ -192,7 +192,7 @@ class StartupProfiler implements IWorkbenchContribution { const action = this._instantiationService.createInstance(ReportPerformanceIssueAction, ReportPerformanceIssueAction.ID, ReportPerformanceIssueAction.LABEL); TPromise.join([ this._windowsService.showItemInFolder(join(profileStartup.dir, files[0])), - action.run(`:warning: Make sure to **attach** these files: :warning:\n${files.map(file => `-\`${join(profileStartup.dir, file)}\``).join('\n')}`) + action.run(`:warning: Make sure to **attach** these files from your *home*-directory: :warning:\n${files.map(file => `-\`${file}\``).join('\n')}`) ]).then(() => { // keep window stable until restart is selected this._messageService.confirm({ From 772aa2c10fb040fa402537d8bf7e525673d5970c Mon Sep 17 00:00:00 2001 From: campersau Date: Tue, 6 Jun 2017 13:32:10 +0200 Subject: [PATCH 1556/2747] cleanup duplicate semicolons in minimapCharRenderer itroduced in https://github.com/Microsoft/vscode/commit/8f9dc8e220aef53c19ef9dfa7284689e04080a0d#diff-0e25f213bdb14a7f0c59d148e40f02f5R256 and https://github.com/Microsoft/vscode/commit/8faa03f88573dbf4b0f5a5a6b583436319d836a8#diff-0e25f213bdb14a7f0c59d148e40f02f5R256 --- src/vs/editor/common/view/minimapCharRenderer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/common/view/minimapCharRenderer.ts b/src/vs/editor/common/view/minimapCharRenderer.ts index ac1d59a029ff2..cdf67f31294f1 100644 --- a/src/vs/editor/common/view/minimapCharRenderer.ts +++ b/src/vs/editor/common/view/minimapCharRenderer.ts @@ -253,7 +253,7 @@ export class MinimapCharRenderer { const deltaG = color.g - backgroundG; const deltaB = color.b - backgroundB; - const colorR = backgroundR + deltaR * c;; + const colorR = backgroundR + deltaR * c; const colorG = backgroundG + deltaG * c; const colorB = backgroundB + deltaB * c; @@ -325,7 +325,7 @@ export class MinimapCharRenderer { const deltaG = color.g - backgroundG; const deltaB = color.b - backgroundB; - const colorR = backgroundR + deltaR * c;; + const colorR = backgroundR + deltaR * c; const colorG = backgroundG + deltaG * c; const colorB = backgroundB + deltaB * c; From 38743ee0fb484c9cdc8d5399637cce906529a82e Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 6 Jun 2017 14:03:10 +0200 Subject: [PATCH 1557/2747] debug: respect that '[2J' is the ansi escape sequence for clearing the display fixes #27389 --- .../debug/electron-browser/debugService.ts | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 64bf423dfc10e..d11367c4eaeb9 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -225,12 +225,12 @@ export class DebugService implements debug.IDebugService { // flush any existing simple values logged if (simpleVals.length) { - this.model.appendToRepl(simpleVals.join(' '), sev); + this.logToRepl(simpleVals.join(' '), sev); simpleVals = []; } // show object - this.model.appendToRepl(new OutputNameValueElement((a).prototype, a, nls.localize('snapshotObj', "Only primitive values are shown for this object.")), sev); + this.logToRepl(new OutputNameValueElement((a).prototype, a, nls.localize('snapshotObj', "Only primitive values are shown for this object.")), sev); } // string: watch out for % replacement directive @@ -260,7 +260,7 @@ export class DebugService implements debug.IDebugService { // flush simple values // always append a new line for output coming from an extension such that seperate logs go to seperate lines #23695 if (simpleVals.length) { - this.model.appendToRepl(simpleVals.join(' ') + '\n', sev); + this.logToRepl(simpleVals.join(' ') + '\n', sev); } } } @@ -382,11 +382,11 @@ export class DebugService implements debug.IDebugService { children.forEach(child => { // Since we can not display multiple trees in a row, we are displaying these variables one after the other (ignoring their names) child.name = null; - this.model.appendToRepl(child, outputSeverity); + this.logToRepl(child, outputSeverity); }); }); } else if (typeof event.body.output === 'string') { - this.model.appendToRepl(event.body.output, outputSeverity); + this.logToRepl(event.body.output, outputSeverity); } })); @@ -596,8 +596,13 @@ export class DebugService implements debug.IDebugService { this.model.removeReplExpressions(); } - public logToRepl(value: string, sev = severity.Info): void { - this.model.appendToRepl(value, sev); + public logToRepl(value: string | debug.IExpression, sev = severity.Info): void { + if (typeof value === 'string' && '[2J'.localeCompare(value) === 0) { + // [2J is the ansi escape sequence for clearing the display http://ascii-table.com/ansi-escape-sequences.php + this.model.removeReplExpressions(); + } else { + this.model.appendToRepl(value, sev); + } } public addWatchExpression(name: string): TPromise { From f68e7383e2dfe03b1581dfd9cf04fd2f591c92ec Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 6 Jun 2017 14:13:18 +0200 Subject: [PATCH 1558/2747] Do not use object.deepClone on the incoming editor options (#28093) --- src/vs/editor/common/config/commonEditorConfig.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 7c32373ad2fd2..310a51d8538ad 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -76,7 +76,12 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed constructor(options: editorOptions.IEditorOptions) { super(); - this._rawOptions = objects.deepClone(options || {}); + // Do a "deep clone of sorts" on the incoming options + this._rawOptions = objects.mixin({}, options || {}); + this._rawOptions.scrollbar = objects.mixin({}, this._rawOptions.scrollbar || {}); + this._rawOptions.minimap = objects.mixin({}, this._rawOptions.minimap || {}); + this._rawOptions.find = objects.mixin({}, this._rawOptions.find || {}); + this._validatedOptions = editorOptions.EditorOptionsValidator.validate(this._rawOptions, EDITOR_DEFAULTS); this.editor = null; this._isDominatedByLongLines = false; From 60bbed82be56373264dfb827b43197596d363bab Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 6 Jun 2017 14:26:28 +0200 Subject: [PATCH 1559/2747] disable minimap in output fixes #27979 --- src/vs/workbench/parts/output/browser/outputPanel.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/vs/workbench/parts/output/browser/outputPanel.ts b/src/vs/workbench/parts/output/browser/outputPanel.ts index 04cecbc39374e..e2ce6e1e40536 100644 --- a/src/vs/workbench/parts/output/browser/outputPanel.ts +++ b/src/vs/workbench/parts/output/browser/outputPanel.ts @@ -87,6 +87,12 @@ export class OutputPanel extends TextResourceEditor { options.folding = false; options.scrollBeyondLastLine = false; options.renderLineHighlight = 'none'; + options.minimap = { enabled: false }; + + const outputConfig = this.configurationService.getConfiguration('[Log]'); + if (outputConfig && outputConfig['editor.minimap.enabled']) { + options.minimap = { enabled: true }; + } return options; } From b97d6d3bf3033920fa766e1f7b267b4ab6557887 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 6 Jun 2017 14:55:59 +0200 Subject: [PATCH 1560/2747] debug: fix debug console string counter fixes #27856 --- src/vs/workbench/parts/debug/common/debugModel.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index 6d4f7691c3ea9..6c1f022346903 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -939,9 +939,11 @@ export class Model implements IModel { public appendToRepl(output: string | IExpression, severity: severity): void { if (typeof output === 'string') { const previousOutput = this.replElements.length && (this.replElements[this.replElements.length - 1] as OutputElement); - if (previousOutput instanceof OutputElement && severity === previousOutput.severity && previousOutput.value === output && output.trim() && output.length > 1) { + const lastNonEmpty = previousOutput && previousOutput.value.trim() ? previousOutput : this.replElements.length > 1 ? this.replElements[this.replElements.length - 2] : undefined; + + if (lastNonEmpty instanceof OutputElement && severity === lastNonEmpty.severity && lastNonEmpty.value === output.trim() && output.trim() && output.length > 1) { // we got the same output (but not an empty string when trimmed) so we just increment the counter - previousOutput.counter++; + lastNonEmpty.counter++; } else { const toAdd = output.split('\n').map(line => new OutputElement(line, severity)); if (previousOutput instanceof OutputElement && severity === previousOutput.severity && toAdd.length) { From 3ab0ef4d7b8fa6190352467d28f15aff4e7a690f Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 6 Jun 2017 14:48:36 +0200 Subject: [PATCH 1561/2747] :lipstick: --- .../untitled/common/untitledEditorService.ts | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/services/untitled/common/untitledEditorService.ts b/src/vs/workbench/services/untitled/common/untitledEditorService.ts index f0c9de49e3e46..092460d9daceb 100644 --- a/src/vs/workbench/services/untitled/common/untitledEditorService.ts +++ b/src/vs/workbench/services/untitled/common/untitledEditorService.ts @@ -85,8 +85,8 @@ export class UntitledEditorService implements IUntitledEditorService { public _serviceBrand: any; - private static CACHE: ResourceMap = new ResourceMap(); - private static KNOWN_ASSOCIATED_FILE_PATHS: ResourceMap = new ResourceMap(); + private mapResourceToInput = new ResourceMap(); + private mapResourceToAssociatedFilePath = new ResourceMap(); private _onDidChangeContent: Emitter; private _onDidChangeDirty: Emitter; @@ -120,7 +120,7 @@ export class UntitledEditorService implements IUntitledEditorService { } public get(resource: URI): UntitledEditorInput { - return UntitledEditorService.CACHE.get(resource); + return this.mapResourceToInput.get(resource); } public getAll(resources?: URI[]): UntitledEditorInput[] { @@ -128,7 +128,7 @@ export class UntitledEditorService implements IUntitledEditorService { return arrays.coalesce(resources.map(r => this.get(r))); } - return UntitledEditorService.CACHE.values(); + return this.mapResourceToInput.values(); } public revertAll(resources?: URI[], force?: boolean): URI[] { @@ -154,7 +154,7 @@ export class UntitledEditorService implements IUntitledEditorService { } public getDirty(): URI[] { - return UntitledEditorService.CACHE.values() + return this.mapResourceToInput.values() .filter(i => i.isDirty()) .map(i => i.getResource()); } @@ -166,13 +166,13 @@ export class UntitledEditorService implements IUntitledEditorService { resource = resource.with({ scheme: UNTITLED_SCHEMA }); // ensure we have the right scheme if (hasAssociatedFilePath) { - UntitledEditorService.KNOWN_ASSOCIATED_FILE_PATHS.set(resource, true); // remember for future lookups + this.mapResourceToAssociatedFilePath.set(resource, true); // remember for future lookups } } // Return existing instance if asked for it - if (resource && UntitledEditorService.CACHE.has(resource)) { - return UntitledEditorService.CACHE.get(resource); + if (resource && this.mapResourceToInput.has(resource)) { + return this.mapResourceToInput.get(resource); } // Create new otherwise @@ -183,11 +183,11 @@ export class UntitledEditorService implements IUntitledEditorService { if (!resource) { // Create new taking a resource URI that is not already taken - let counter = UntitledEditorService.CACHE.size + 1; + let counter = this.mapResourceToInput.size + 1; do { resource = URI.from({ scheme: UNTITLED_SCHEMA, path: `Untitled-${counter}` }); counter++; - } while (UntitledEditorService.CACHE.has(resource)); + } while (this.mapResourceToInput.has(resource)); } // Look up default language from settings if any @@ -219,8 +219,8 @@ export class UntitledEditorService implements IUntitledEditorService { // Remove from cache on dispose const onceDispose = once(input.onDispose); onceDispose(() => { - UntitledEditorService.CACHE.delete(input.getResource()); - UntitledEditorService.KNOWN_ASSOCIATED_FILE_PATHS.delete(input.getResource()); + this.mapResourceToInput.delete(input.getResource()); + this.mapResourceToAssociatedFilePath.delete(input.getResource()); contentListener.dispose(); dirtyListener.dispose(); encodingListener.dispose(); @@ -228,13 +228,13 @@ export class UntitledEditorService implements IUntitledEditorService { }); // Add to cache - UntitledEditorService.CACHE.set(resource, input); + this.mapResourceToInput.set(resource, input); return input; } public hasAssociatedFilePath(resource: URI): boolean { - return UntitledEditorService.KNOWN_ASSOCIATED_FILE_PATHS.has(resource); + return this.mapResourceToAssociatedFilePath.has(resource); } public dispose(): void { From 7b9679d2bc4597b9ad9f6a668f9630a411fec511 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 6 Jun 2017 14:36:29 +0200 Subject: [PATCH 1562/2747] Add tests for ScrollbarState (#6710) --- .../browser/ui/scrollbar/abstractScrollbar.ts | 7 ++-- .../ui/scrollbar/horizontalScrollbar.ts | 4 ++ .../browser/ui/scrollbar/scrollbarState.ts | 42 ++++++++++++++----- .../browser/ui/scrollbar/verticalScrollbar.ts | 4 ++ src/vs/base/common/scrollable.ts | 14 +++++++ .../ui/scrollbar/scrollbarState.test.ts | 25 +++++++++++ 6 files changed, 81 insertions(+), 15 deletions(-) create mode 100644 src/vs/base/test/browser/ui/scrollbar/scrollbarState.test.ts diff --git a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts index 243d62b86f5d8..d1d8d02d1131a 100644 --- a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts @@ -234,10 +234,6 @@ export abstract class AbstractScrollbar extends Widget { } } - public validateScrollPosition(desiredScrollPosition: number): number { - return this._scrollbarState.validateScrollPosition(desiredScrollPosition); - } - public setDesiredScrollPosition(desiredScrollPosition: number): boolean { desiredScrollPosition = this.validateScrollPosition(desiredScrollPosition); @@ -256,9 +252,12 @@ export abstract class AbstractScrollbar extends Widget { protected abstract _renderDomNode(largeSize: number, smallSize: number): void; protected abstract _updateSlider(sliderSize: number, sliderPosition: number): void; + protected abstract _mouseDownRelativePosition(e: IMouseEvent, domNodePosition: DomUtils.IDomNodePagePosition): number; protected abstract _sliderMousePosition(e: IMouseMoveEventData): number; protected abstract _sliderOrthogonalMousePosition(e: IMouseMoveEventData): number; + protected abstract _getScrollPosition(): number; protected abstract _setScrollPosition(elementScrollPosition: number): void; + public abstract validateScrollPosition(desiredScrollPosition: number): number; } diff --git a/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts b/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts index bb0d255d2dee0..616d185a633f8 100644 --- a/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts @@ -106,4 +106,8 @@ export class HorizontalScrollbar extends AbstractScrollbar { scrollLeft: scrollPosition }); } + + public validateScrollPosition(desiredScrollPosition: number): number { + return this._scrollable.validateScrollLeft(desiredScrollPosition); + } } diff --git a/src/vs/base/browser/ui/scrollbar/scrollbarState.ts b/src/vs/base/browser/ui/scrollbar/scrollbarState.ts index b9b8a99849dcb..c16f442f98eee 100644 --- a/src/vs/base/browser/ui/scrollbar/scrollbarState.ts +++ b/src/vs/base/browser/ui/scrollbar/scrollbarState.ts @@ -11,14 +11,41 @@ const MINIMUM_SLIDER_SIZE = 20; export class ScrollbarState { - // --- immutable - private _scrollbarSize: number; - private _oppositeScrollbarSize: number; - private _arrowSize: number; + /** + * For the vertical scrollbar: the width. + * For the horizontal scrollbar: the height. + */ + private readonly _scrollbarSize: number; + + /** + * For the vertical scrollbar: the height of the pair horizontal scrollbar. + * For the horizontal scrollbar: the width of the pair vertical scrollbar. + */ + private readonly _oppositeScrollbarSize: number; + + /** + * For the vertical scrollbar: the height of the scrollbar's arrows. + * For the horizontal scrollbar: the width of the scrollbar's arrows. + */ + private readonly _arrowSize: number; // --- variables + /** + * For the vertical scrollbar: the viewport height. + * For the horizontal scrollbar: the viewport width. + */ private _visibleSize: number; + + /** + * For the vertical scrollbar: the scroll height. + * For the horizontal scrollbar: the scroll width. + */ private _scrollSize: number; + + /** + * For the vertical scrollbar: the scroll top. + * For the horizontal scrollbar: the scroll left. + */ private _scrollPosition: number; // --- computed variables @@ -178,11 +205,4 @@ export class ScrollbarState { public convertSliderPositionToScrollPosition(desiredSliderPosition: number): number { return desiredSliderPosition / this._computedRatio; } - - public validateScrollPosition(desiredScrollPosition: number): number { - desiredScrollPosition = Math.round(desiredScrollPosition); - desiredScrollPosition = Math.max(desiredScrollPosition, 0); - desiredScrollPosition = Math.min(desiredScrollPosition, this._scrollSize - this._visibleSize); - return desiredScrollPosition; - } } diff --git a/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts b/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts index e7b363ef16e9a..e2bfa6b645fcb 100644 --- a/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts @@ -111,4 +111,8 @@ export class VerticalScrollbar extends AbstractScrollbar { scrollTop: scrollPosition }); } + + public validateScrollPosition(desiredScrollPosition: number): number { + return this._scrollable.validateScrollTop(desiredScrollPosition); + } } diff --git a/src/vs/base/common/scrollable.ts b/src/vs/base/common/scrollable.ts index f7d327627f087..31d821d4ed8ff 100644 --- a/src/vs/base/common/scrollable.ts +++ b/src/vs/base/common/scrollable.ts @@ -154,6 +154,20 @@ export class Scrollable extends Disposable { return this._state; } + public validateScrollTop(desiredScrollTop: number): number { + desiredScrollTop = Math.round(desiredScrollTop); + desiredScrollTop = Math.max(desiredScrollTop, 0); + desiredScrollTop = Math.min(desiredScrollTop, this._state.scrollHeight - this._state.height); + return desiredScrollTop; + } + + public validateScrollLeft(desiredScrollLeft: number): number { + desiredScrollLeft = Math.round(desiredScrollLeft); + desiredScrollLeft = Math.max(desiredScrollLeft, 0); + desiredScrollLeft = Math.min(desiredScrollLeft, this._state.scrollWidth - this._state.width); + return desiredScrollLeft; + } + public updateState(update: INewScrollState): void { const oldState = this._state; const newState = new ScrollState( diff --git a/src/vs/base/test/browser/ui/scrollbar/scrollbarState.test.ts b/src/vs/base/test/browser/ui/scrollbar/scrollbarState.test.ts new file mode 100644 index 0000000000000..99c625ffa282a --- /dev/null +++ b/src/vs/base/test/browser/ui/scrollbar/scrollbarState.test.ts @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import { ScrollbarState } from "vs/base/browser/ui/scrollbar/scrollbarState"; + +suite('ScrollbarState', () => { + test('inflates slider size', () => { + let actual = new ScrollbarState(0, 14, 0); + actual.setVisibleSize(339); + actual.setScrollSize(42423); + actual.setScrollPosition(32787); + + assert.equal(actual.getArrowSize(), 0); + assert.equal(actual.getRectangleLargeSize(), 339); + assert.equal(actual.getRectangleSmallSize(), 14); + assert.equal(actual.isNeeded(), true); + assert.equal(actual.getSliderSize(), 20); + assert.equal(actual.getSliderPosition(), 252); + assert.equal(actual.getSliderCenter(), 262); + }); +}); From 31a42937a4ab6ffe31537626acad9c7c8a72446f Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 6 Jun 2017 15:03:38 +0200 Subject: [PATCH 1563/2747] Move slider position computation into ScrollbarState (#6710) --- .../browser/ui/scrollbar/abstractScrollbar.ts | 25 ++++++++------- .../browser/ui/scrollbar/scrollbarState.ts | 31 ++++++++++++++++++- 2 files changed, 43 insertions(+), 13 deletions(-) diff --git a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts index d1d8d02d1131a..ce1196e6b813a 100644 --- a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts @@ -197,31 +197,32 @@ export abstract class AbstractScrollbar extends Widget { private _onMouseDown(e: IMouseEvent): void { let domNodePosition = DomUtils.getDomNodePagePosition(this.domNode.domNode); - let desiredSliderPosition = this._mouseDownRelativePosition(e, domNodePosition) - this._scrollbarState.getArrowSize() - this._scrollbarState.getSliderSize() / 2; - this.setDesiredScrollPosition(this._scrollbarState.convertSliderPositionToScrollPosition(desiredSliderPosition)); + this.setDesiredScrollPosition(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(e, domNodePosition))); this._sliderMouseDown(e); } private _sliderMouseDown(e: IMouseEvent): void { if (e.leftButton) { - let initialMouseOrthogonalPosition = this._sliderOrthogonalMousePosition(e); - let initialScrollPosition = this._getScrollPosition(); - let draggingDelta = this._sliderMousePosition(e) - this._scrollbarState.getSliderPosition(); + const initialMousePosition = this._sliderMousePosition(e); + const initialMouseOrthogonalPosition = this._sliderOrthogonalMousePosition(e); + const initialScrollbarState = this._scrollbarState.clone(); this.slider.toggleClassName('active', true); this._mouseMoveMonitor.startMonitoring( standardMouseMoveMerger, (mouseMoveData: IStandardMouseMoveEventData) => { - let mouseOrthogonalPosition = this._sliderOrthogonalMousePosition(mouseMoveData); - let mouseOrthogonalDelta = Math.abs(mouseOrthogonalPosition - initialMouseOrthogonalPosition); - // console.log(initialMouseOrthogonalPosition + ' -> ' + mouseOrthogonalPosition + ': ' + mouseOrthogonalDelta); + const mouseOrthogonalPosition = this._sliderOrthogonalMousePosition(mouseMoveData); + const mouseOrthogonalDelta = Math.abs(mouseOrthogonalPosition - initialMouseOrthogonalPosition); + if (Platform.isWindows && mouseOrthogonalDelta > MOUSE_DRAG_RESET_DISTANCE) { // The mouse has wondered away from the scrollbar => reset dragging - this.setDesiredScrollPosition(initialScrollPosition); - } else { - let desiredSliderPosition = this._sliderMousePosition(mouseMoveData) - draggingDelta; - this.setDesiredScrollPosition(this._scrollbarState.convertSliderPositionToScrollPosition(desiredSliderPosition)); + this.setDesiredScrollPosition(initialScrollbarState.getScrollPosition()); + return; } + + const mousePosition = this._sliderMousePosition(mouseMoveData); + const mouseDelta = mousePosition - initialMousePosition; + this.setDesiredScrollPosition(initialScrollbarState.getDesiredScrollPositionFromDelta(mouseDelta)); }, () => { this.slider.toggleClassName('active', false); diff --git a/src/vs/base/browser/ui/scrollbar/scrollbarState.ts b/src/vs/base/browser/ui/scrollbar/scrollbarState.ts index c16f442f98eee..fed253c78f754 100644 --- a/src/vs/base/browser/ui/scrollbar/scrollbarState.ts +++ b/src/vs/base/browser/ui/scrollbar/scrollbarState.ts @@ -92,6 +92,14 @@ export class ScrollbarState { this._refreshComputedValues(); } + public clone(): ScrollbarState { + let r = new ScrollbarState(this._arrowSize, this._scrollbarSize, this._oppositeScrollbarSize); + r.setVisibleSize(this._visibleSize); + r.setScrollSize(this._scrollSize); + r.setScrollPosition(this._scrollPosition); + return r; + } + public setVisibleSize(visibleSize: number): boolean { let iVisibleSize = Math.round(visibleSize); if (this._visibleSize !== iVisibleSize) { @@ -178,6 +186,10 @@ export class ScrollbarState { return this._arrowSize; } + public getScrollPosition(): number { + return this._scrollPosition; + } + public getRectangleLargeSize(): number { return this._computedAvailableSize; } @@ -202,7 +214,24 @@ export class ScrollbarState { return (this._computedSliderPosition + this._computedSliderSize / 2); } - public convertSliderPositionToScrollPosition(desiredSliderPosition: number): number { + private _convertSliderPositionToScrollPosition(desiredSliderPosition: number): number { return desiredSliderPosition / this._computedRatio; } + + /** + * Compute a desired `scrollPosition` such that `offset` ends up in the center of the slider. + * `offset` is based on the same coordinate system as the `sliderPosition`. + */ + public getDesiredScrollPositionFromOffset(offset: number): number { + let desiredSliderPosition = offset - this._arrowSize - this._computedSliderSize / 2; + return this._convertSliderPositionToScrollPosition(desiredSliderPosition); + } + + /** + * Compute a desired `scrollPosition` such that the slider moves by `delta`. + */ + public getDesiredScrollPositionFromDelta(delta: number): number { + let desiredSliderPosition = this._computedSliderPosition + delta; + return this._convertSliderPositionToScrollPosition(desiredSliderPosition); + } } From a25ffe6b55fe26b8e06fdb58757fb3b319bdae4f Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 6 Jun 2017 15:40:13 +0200 Subject: [PATCH 1564/2747] Fixes #6710: Correctly model the case where the slider is artificially inflated in size --- .../browser/ui/scrollbar/scrollbarState.ts | 117 ++++++++---------- .../ui/scrollbar/scrollbarState.test.ts | 17 ++- 2 files changed, 66 insertions(+), 68 deletions(-) diff --git a/src/vs/base/browser/ui/scrollbar/scrollbarState.ts b/src/vs/base/browser/ui/scrollbar/scrollbarState.ts index fed253c78f754..ee2041c3af24e 100644 --- a/src/vs/base/browser/ui/scrollbar/scrollbarState.ts +++ b/src/vs/base/browser/ui/scrollbar/scrollbarState.ts @@ -54,23 +54,13 @@ export class ScrollbarState { * `visibleSize` - `oppositeScrollbarSize` */ private _computedAvailableSize: number; - - /** - * `computedAvailableSize` - 2 * `arrowSize` - */ - private _computedRepresentableSize: number; - /** - * `computedRepresentableSize` / `scrollSize` - */ - private _computedRatio: number; - - /** - * (`scrollSize` > `visibleSize`) + * (`scrollSize` > 0 && `scrollSize` > `visibleSize`) */ private _computedIsNeeded: boolean; private _computedSliderSize: number; + private _computedSliderRatio: number; private _computedSliderPosition: number; constructor(arrowSize: number, scrollbarSize: number, oppositeScrollbarSize: number) { @@ -83,10 +73,9 @@ export class ScrollbarState { this._scrollPosition = 0; this._computedAvailableSize = 0; - this._computedRepresentableSize = 0; - this._computedRatio = 0.1; this._computedIsNeeded = false; this._computedSliderSize = 0; + this._computedSliderRatio = 0; this._computedSliderPosition = 0; this._refreshComputedValues(); @@ -130,56 +119,46 @@ export class ScrollbarState { return false; } - private _refreshComputedValues(): void { - const oppositeScrollbarSize = this._oppositeScrollbarSize; - const arrowSize = this._arrowSize; - const visibleSize = this._visibleSize; - const scrollSize = this._scrollSize; - const scrollPosition = this._scrollPosition; - - let computedAvailableSize = Math.max(0, visibleSize - oppositeScrollbarSize); - let computedRepresentableSize = Math.max(0, computedAvailableSize - 2 * arrowSize); - let computedRatio = scrollSize > 0 ? (computedRepresentableSize / scrollSize) : 0; - let computedIsNeeded = (scrollSize > visibleSize); - - let computedSliderSize: number; - let computedSliderPosition: number; + private static _computeValues(oppositeScrollbarSize: number, arrowSize: number, visibleSize: number, scrollSize: number, scrollPosition: number) { + const computedAvailableSize = Math.max(0, visibleSize - oppositeScrollbarSize); + const computedRepresentableSize = Math.max(0, computedAvailableSize - 2 * arrowSize); + const computedIsNeeded = (scrollSize > 0 && scrollSize > visibleSize); if (!computedIsNeeded) { - computedSliderSize = computedRepresentableSize; - computedSliderPosition = 0; - } else { - computedSliderSize = Math.floor(visibleSize * computedRatio); - computedSliderPosition = Math.floor(scrollPosition * computedRatio); - - if (computedSliderSize < MINIMUM_SLIDER_SIZE) { - // We must artificially increase the size of the slider, since the slider would be too small otherwise - // The effort is to keep the slider centered around the original position, but we must take into - // account the cases when the slider is too close to the top or too close to the bottom - - let sliderArtificialOffset = (MINIMUM_SLIDER_SIZE - computedSliderSize) / 2; - computedSliderSize = MINIMUM_SLIDER_SIZE; - - computedSliderPosition -= sliderArtificialOffset; - - if (computedSliderPosition + computedSliderSize > computedRepresentableSize) { - // Slider is too close to the bottom, so we glue it to the bottom - computedSliderPosition = computedRepresentableSize - computedSliderSize; - } - - if (computedSliderPosition < 0) { - // Slider is too close to the top, so we glue it to the top - computedSliderPosition = 0; - } - } + // There is no need for a slider + return { + computedAvailableSize: Math.round(computedAvailableSize), + computedIsNeeded: computedIsNeeded, + computedSliderSize: Math.round(computedRepresentableSize), + computedSliderRatio: 0, + computedSliderPosition: 0, + }; } - this._computedAvailableSize = Math.round(computedAvailableSize); - this._computedRepresentableSize = Math.round(computedRepresentableSize); - this._computedRatio = computedRatio; - this._computedIsNeeded = computedIsNeeded; - this._computedSliderSize = Math.round(computedSliderSize); - this._computedSliderPosition = Math.round(computedSliderPosition); + // We must artificially increase the size of the slider if needed, since the slider would be too small to grab with the mouse otherwise + const computedSliderSize = Math.round(Math.max(MINIMUM_SLIDER_SIZE, Math.floor(visibleSize * computedRepresentableSize / scrollSize))); + + // The slider can move from 0 to `computedRepresentableSize` - `computedSliderSize` + // in the same way `scrollPosition` can move from 0 to `scrollSize` - `visibleSize`. + const computedSliderRatio = (computedRepresentableSize - computedSliderSize) / (scrollSize - visibleSize); + const computedSliderPosition = (scrollPosition * computedSliderRatio); + + return { + computedAvailableSize: Math.round(computedAvailableSize), + computedIsNeeded: computedIsNeeded, + computedSliderSize: Math.round(computedSliderSize), + computedSliderRatio: computedSliderRatio, + computedSliderPosition: Math.round(computedSliderPosition), + }; + } + + private _refreshComputedValues(): void { + const r = ScrollbarState._computeValues(this._oppositeScrollbarSize, this._arrowSize, this._visibleSize, this._scrollSize, this._scrollPosition); + this._computedAvailableSize = r.computedAvailableSize; + this._computedIsNeeded = r.computedIsNeeded; + this._computedSliderSize = r.computedSliderSize; + this._computedSliderRatio = r.computedSliderRatio; + this._computedSliderPosition = r.computedSliderPosition; } public getArrowSize(): number { @@ -214,24 +193,30 @@ export class ScrollbarState { return (this._computedSliderPosition + this._computedSliderSize / 2); } - private _convertSliderPositionToScrollPosition(desiredSliderPosition: number): number { - return desiredSliderPosition / this._computedRatio; - } - /** * Compute a desired `scrollPosition` such that `offset` ends up in the center of the slider. * `offset` is based on the same coordinate system as the `sliderPosition`. */ public getDesiredScrollPositionFromOffset(offset: number): number { + if (!this._computedIsNeeded) { + // no need for a slider + return 0; + } + let desiredSliderPosition = offset - this._arrowSize - this._computedSliderSize / 2; - return this._convertSliderPositionToScrollPosition(desiredSliderPosition); + return Math.round(desiredSliderPosition / this._computedSliderRatio); } /** * Compute a desired `scrollPosition` such that the slider moves by `delta`. */ public getDesiredScrollPositionFromDelta(delta: number): number { + if (!this._computedIsNeeded) { + // no need for a slider + return 0; + } + let desiredSliderPosition = this._computedSliderPosition + delta; - return this._convertSliderPositionToScrollPosition(desiredSliderPosition); + return Math.round(desiredSliderPosition / this._computedSliderRatio); } } diff --git a/src/vs/base/test/browser/ui/scrollbar/scrollbarState.test.ts b/src/vs/base/test/browser/ui/scrollbar/scrollbarState.test.ts index 99c625ffa282a..719e0be257860 100644 --- a/src/vs/base/test/browser/ui/scrollbar/scrollbarState.test.ts +++ b/src/vs/base/test/browser/ui/scrollbar/scrollbarState.test.ts @@ -15,11 +15,24 @@ suite('ScrollbarState', () => { actual.setScrollPosition(32787); assert.equal(actual.getArrowSize(), 0); + assert.equal(actual.getScrollPosition(), 32787); assert.equal(actual.getRectangleLargeSize(), 339); assert.equal(actual.getRectangleSmallSize(), 14); assert.equal(actual.isNeeded(), true); assert.equal(actual.getSliderSize(), 20); - assert.equal(actual.getSliderPosition(), 252); - assert.equal(actual.getSliderCenter(), 262); + assert.equal(actual.getSliderPosition(), 249); + assert.equal(actual.getSliderCenter(), 259); + + + assert.equal(actual.getDesiredScrollPositionFromOffset(259), 32849); + actual.setScrollPosition(32849); + assert.equal(actual.getArrowSize(), 0); + assert.equal(actual.getScrollPosition(), 32849); + assert.equal(actual.getRectangleLargeSize(), 339); + assert.equal(actual.getRectangleSmallSize(), 14); + assert.equal(actual.isNeeded(), true); + assert.equal(actual.getSliderSize(), 20); + assert.equal(actual.getSliderPosition(), 249); + assert.equal(actual.getSliderCenter(), 259); }); }); From 4cbb97ca2369dfa1a31646d8e1a43ccb3ace9804 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 6 Jun 2017 15:45:47 +0200 Subject: [PATCH 1565/2747] debug: improve hc colors for variables fixes #28014 --- .../parts/debug/browser/media/debug.contribution.css | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/vs/workbench/parts/debug/browser/media/debug.contribution.css b/src/vs/workbench/parts/debug/browser/media/debug.contribution.css index 7c67f7d14b8a2..efafecc857d8e 100644 --- a/src/vs/workbench/parts/debug/browser/media/debug.contribution.css +++ b/src/vs/workbench/parts/debug/browser/media/debug.contribution.css @@ -163,6 +163,18 @@ color: #B5CEA8; } +.hc-black .monaco-workbench .monaco-tree-row:not(.selected) .expression .value.number { + color: #89d185; +} + +.hc-black .monaco-workbench .monaco-tree-row:not(.selected) .expression .value.boolean { + color: #75bdfe; +} + +.hc-black .monaco-workbench .monaco-tree-row:not(.selected) .expression .value.string { + color: #f48771; +} + .vs-dark .monaco-workbench .monaco-tree-row:not(.selected) .expression .value.boolean { color: #4E94CE; } From 0697435ac5ca028b055cac042fd9d97ee63d7d7d Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 6 Jun 2017 15:45:45 +0200 Subject: [PATCH 1566/2747] More tests for ScrollbarState (#6710) --- .../ui/scrollbar/scrollbarState.test.ts | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/vs/base/test/browser/ui/scrollbar/scrollbarState.test.ts b/src/vs/base/test/browser/ui/scrollbar/scrollbarState.test.ts index 719e0be257860..9d10e81ba5f2a 100644 --- a/src/vs/base/test/browser/ui/scrollbar/scrollbarState.test.ts +++ b/src/vs/base/test/browser/ui/scrollbar/scrollbarState.test.ts @@ -35,4 +35,32 @@ suite('ScrollbarState', () => { assert.equal(actual.getSliderPosition(), 249); assert.equal(actual.getSliderCenter(), 259); }); + + test('inflates slider size with arrows', () => { + let actual = new ScrollbarState(12, 14, 0); + actual.setVisibleSize(339); + actual.setScrollSize(42423); + actual.setScrollPosition(32787); + + assert.equal(actual.getArrowSize(), 12); + assert.equal(actual.getScrollPosition(), 32787); + assert.equal(actual.getRectangleLargeSize(), 339); + assert.equal(actual.getRectangleSmallSize(), 14); + assert.equal(actual.isNeeded(), true); + assert.equal(actual.getSliderSize(), 20); + assert.equal(actual.getSliderPosition(), 230); + assert.equal(actual.getSliderCenter(), 240); + + + assert.equal(actual.getDesiredScrollPositionFromOffset(240 + 12), 32811); + actual.setScrollPosition(32811); + assert.equal(actual.getArrowSize(), 12); + assert.equal(actual.getScrollPosition(), 32811); + assert.equal(actual.getRectangleLargeSize(), 339); + assert.equal(actual.getRectangleSmallSize(), 14); + assert.equal(actual.isNeeded(), true); + assert.equal(actual.getSliderSize(), 20); + assert.equal(actual.getSliderPosition(), 230); + assert.equal(actual.getSliderCenter(), 240); + }); }); From d167d92ba11aec0cc4d0bb6d51d86d4322759043 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 6 Jun 2017 16:03:39 +0200 Subject: [PATCH 1567/2747] Fix typo (#28101) --- src/vs/editor/browser/widget/codeEditorWidget.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index 0c0e7235b567a..bfb0cc8ceccaa 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -98,7 +98,7 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito this._themeService = themeService; this._focusTracker = new CodeEditorWidgetFocusTracker(domElement); - this._focusTracker.onChage(() => { + this._focusTracker.onChange(() => { let hasFocus = this._focusTracker.hasFocus(); if (hasFocus) { @@ -524,8 +524,7 @@ class CodeEditorWidgetFocusTracker extends Disposable { private _domFocusTracker: dom.IFocusTracker; private _onChange: Emitter = this._register(new Emitter()); - // TODO: Fix name - public onChage: Event = this._onChange.event; + public onChange: Event = this._onChange.event; constructor(domElement: HTMLElement) { super(); From 97dc70739e6726f2d992e7dd61ba28e5c41de0c7 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 6 Jun 2017 14:40:29 +0200 Subject: [PATCH 1568/2747] debt - remove commented out stuff --- src/vs/base/common/objects.ts | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/src/vs/base/common/objects.ts b/src/vs/base/common/objects.ts index 9a814afa30cd8..d834bfe2ddd13 100644 --- a/src/vs/base/common/objects.ts +++ b/src/vs/base/common/objects.ts @@ -82,40 +82,6 @@ function _cloneAndChange(obj: any, changer: (orig: any) => any, encounteredObjec return obj; } -// DON'T USE THESE FUNCTION UNLESS YOU KNOW HOW CHROME -// WORKS... WE HAVE SEEN VERY WEIRD BEHAVIOUR WITH CHROME >= 37 - -///** -// * Recursively call Object.freeze on object and any properties that are objects. -// */ -//export function deepFreeze(obj:any):void { -// Object.freeze(obj); -// Object.keys(obj).forEach((key) => { -// if(!(typeof obj[key] === 'object') || Object.isFrozen(obj[key])) { -// return; -// } -// -// deepFreeze(obj[key]); -// }); -// if(!Object.isFrozen(obj)) { -// console.log('too warm'); -// } -//} -// -//export function deepSeal(obj:any):void { -// Object.seal(obj); -// Object.keys(obj).forEach((key) => { -// if(!(typeof obj[key] === 'object') || Object.isSealed(obj[key])) { -// return; -// } -// -// deepSeal(obj[key]); -// }); -// if(!Object.isSealed(obj)) { -// console.log('NOT sealed'); -// } -//} - /** * Copies all properties of source into destination. The optional parameter "overwrite" allows to control * if existing properties on the destination should be overwritten or not. Defaults to true (overwrite). From 44da540b4b29d2cb49cae37ddc24415e7a2d1b9b Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 6 Jun 2017 14:56:41 +0200 Subject: [PATCH 1569/2747] fix #27949 --- .../api/node/extHostDocumentsAndEditors.ts | 7 +-- .../api/extHostDocumentsAndEditors.test.ts | 63 +++++++++++++++++++ 2 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts diff --git a/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts b/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts index 164827a79fd36..27baef47f8937 100644 --- a/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts +++ b/src/vs/workbench/api/node/extHostDocumentsAndEditors.ts @@ -98,6 +98,9 @@ export class ExtHostDocumentsAndEditors extends ExtHostDocumentsAndEditorsShape this._activeEditorId = delta.newActiveEditor; } + dispose(removedDocuments); + dispose(removedEditors); + // now that the internal state is complete, fire events if (delta.removedDocuments) { this._onDidRemoveDocuments.fire(removedDocuments); @@ -112,10 +115,6 @@ export class ExtHostDocumentsAndEditors extends ExtHostDocumentsAndEditorsShape if (delta.newActiveEditor !== undefined) { this._onDidChangeActiveTextEditor.fire(this.activeEditor()); } - - // now that the events are out, dispose removed documents and editors - dispose(removedDocuments); - dispose(removedEditors); } getDocument(strUrl: string): ExtHostDocumentData { diff --git a/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts b/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts new file mode 100644 index 0000000000000..fc14d9e5382aa --- /dev/null +++ b/src/vs/workbench/test/electron-browser/api/extHostDocumentsAndEditors.test.ts @@ -0,0 +1,63 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as assert from 'assert'; +import URI from 'vs/base/common/uri'; +import { ExtHostDocumentsAndEditors } from 'vs/workbench/api/node/extHostDocumentsAndEditors'; +import { TPromise } from 'vs/base/common/winjs.base'; + + +suite('ExtHostDocumentsAndEditors', () => { + + let editors: ExtHostDocumentsAndEditors; + + setup(function () { + editors = new ExtHostDocumentsAndEditors({ + _serviceBrand: undefined, + get() { return undefined; }, + set() { } + }); + }); + + test('The value of TextDocument.isClosed is incorrect when a text document is closed, #27949', () => { + + editors.$acceptDocumentsAndEditorsDelta({ + addedDocuments: [{ + EOL: '\n', + isDirty: true, + modeId: 'fooLang', + url: URI.parse('foo:bar'), + versionId: 1, + lines: [ + 'first', + 'second' + ] + }] + }); + + return new TPromise((resolve, reject) => { + + editors.onDidRemoveDocuments(e => { + try { + + for (const data of e) { + assert.equal(data.document.isClosed, true); + } + resolve(undefined); + } catch (e) { + reject(e); + } + }); + + editors.$acceptDocumentsAndEditorsDelta({ + removedDocuments: ['foo:bar'] + }); + + }); + }); + +}); From c664cb83449c87e45072c66216cb3bd40cd9a485 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 6 Jun 2017 19:13:58 +0200 Subject: [PATCH 1570/2747] extract snippet suggest provider, #26275 --- .../electron-browser/snippetsService.ts | 78 +++++++++---------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts b/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts index fdb96d9beaa5c..31b32d88c8a6f 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts @@ -7,7 +7,7 @@ import { localize } from 'vs/nls'; import * as strings from 'vs/base/common/strings'; import { IModel } from 'vs/editor/common/editorCommon'; -import { ISuggestion, LanguageId } from 'vs/editor/common/modes'; +import { ISuggestSupport, ISuggestResult, ISuggestion, LanguageId } from 'vs/editor/common/modes'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { setSnippetSuggestSupport } from 'vs/editor/contrib/suggest/browser/suggest'; @@ -41,19 +41,12 @@ class SnippetsService implements ISnippetsService { _serviceBrand: any; - private static _defaultDetail = localize('detail.userSnippet', "User Snippet"); - - private _snippets = new Map>(); + private readonly _snippets = new Map>(); constructor( - @IModeService private _modeService: IModeService + @IModeService modeService: IModeService ) { - setSnippetSuggestSupport({ - provideCompletionItems: (model, position) => { - const suggestions = this._getSnippetCompletions(model, position); - return { suggestions }; - } - }); + setSnippetSuggestSupport(new SnippetSuggestProvider(modeService, this)); } public registerSnippets(languageId: LanguageId, snippets: ISnippet[], fileName: string): void { @@ -74,33 +67,33 @@ class SnippetsService implements ISnippetsService { }); } } +} - private _getLanguageIdAtPosition(model: IModel, position: Position): LanguageId { - // validate the `languageId` to ensure this is a user - // facing language with a name and the chance to have - // snippets, else fall back to the outer language - model.forceTokenization(position.lineNumber); - let languageId = model.getLanguageIdAtPosition(position.lineNumber, position.column); - let { language } = this._modeService.getLanguageIdentifier(languageId); - if (!this._modeService.getLanguageName(language)) { - languageId = model.getLanguageIdentifier().id; - } - return languageId; +registerSingleton(ISnippetsService, SnippetsService); + +export interface ISimpleModel { + getLineContent(lineNumber: number): string; +} + +class SnippetSuggestProvider implements ISuggestSupport { + + constructor( + @IModeService private _modeService: IModeService, + @ISnippetsService private _snippets: ISnippetsService + ) { + // } - private _getSnippetCompletions(model: IModel, position: Position): ISuggestion[] { - const languageId = this._getLanguageIdAtPosition(model, position); - if (!this._snippets.has(languageId)) { - return undefined; - } + provideCompletionItems(model: IModel, position: Position): ISuggestResult { - const result: ISnippetSuggestion[] = []; + const languageId = this._getLanguageIdAtPosition(model, position); + const suggestions: ISnippetSuggestion[] = []; const word = model.getWordAtPosition(position); const currentWord = word ? word.word.substring(0, position.column - word.startColumn).toLowerCase() : ''; const currentFullWord = getNonWhitespacePrefix(model, position).toLowerCase(); - this.visitSnippets(languageId, s => { + this._snippets.visitSnippets(languageId, s => { const prefixLower = s.prefix.toLowerCase(); let overwriteBefore = 0; @@ -118,11 +111,11 @@ class SnippetsService implements ISnippetsService { } // store in result - result.push({ + suggestions.push({ type: 'snippet', label: s.prefix, get disambiguateLabel() { return localize('snippetSuggest.longLabel', "{0}, {1}", s.prefix, s.name); }, - detail: s.extensionName || SnippetsService._defaultDetail, + detail: s.extensionName || localize('detail.userSnippet', "User Snippet"), documentation: s.description, insertText: s.codeSnippet, sortText: `${s.prefix}-${s.extensionName || ''}`, @@ -136,7 +129,7 @@ class SnippetsService implements ISnippetsService { // dismbiguate suggestions with same labels let lastSuggestion: ISnippetSuggestion; - for (const suggestion of result.sort(SnippetsService._compareSuggestionsByLabel)) { + for (const suggestion of suggestions.sort(SnippetSuggestProvider._compareSuggestionsByLabel)) { if (lastSuggestion && lastSuggestion.label === suggestion.label) { // use the disambiguateLabel instead of the actual label lastSuggestion.label = lastSuggestion.disambiguateLabel; @@ -145,7 +138,20 @@ class SnippetsService implements ISnippetsService { lastSuggestion = suggestion; } - return result; + return { suggestions }; + } + + private _getLanguageIdAtPosition(model: IModel, position: Position): LanguageId { + // validate the `languageId` to ensure this is a user + // facing language with a name and the chance to have + // snippets, else fall back to the outer language + model.forceTokenization(position.lineNumber); + let languageId = model.getLanguageIdAtPosition(position.lineNumber, position.column); + let { language } = this._modeService.getLanguageIdentifier(languageId); + if (!this._modeService.getLanguageName(language)) { + languageId = model.getLanguageIdentifier().id; + } + return languageId; } private static _compareSuggestionsByLabel(a: ISuggestion, b: ISuggestion): number { @@ -153,12 +159,6 @@ class SnippetsService implements ISnippetsService { } } -registerSingleton(ISnippetsService, SnippetsService); - -export interface ISimpleModel { - getLineContent(lineNumber: number): string; -} - export function getNonWhitespacePrefix(model: ISimpleModel, position: Position): string { /** * Do not analyze more characters From d5890e4a161fd87ca204de161ec2e42d7279c9b1 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 6 Jun 2017 13:45:47 -0700 Subject: [PATCH 1571/2747] Fix #28123 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 66932ddcba6c1..4c394e8c62902 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -43,7 +43,7 @@ const nodeModules = ['electron', 'original-fs'] const builtInExtensions = [ { name: 'ms-vscode.node-debug', version: '1.13.10' }, - { name: 'ms-vscode.node-debug2', version: '1.13.2' } + { name: 'ms-vscode.node-debug2', version: '1.13.3' } ]; const vscodeEntryPoints = _.flatten([ From 544d44350b773f7b5aafaa433e44febcce2b089d Mon Sep 17 00:00:00 2001 From: Jens Hausdorf Date: Tue, 6 Jun 2017 22:51:23 +0200 Subject: [PATCH 1572/2747] remove double semicolons (#28110) --- extensions/html/server/src/modes/languageModes.ts | 2 +- src/vs/editor/common/config/fontInfo.ts | 2 +- src/vs/editor/contrib/find/browser/findWidget.ts | 2 +- src/vs/editor/test/common/model/textModelSearch.test.ts | 2 +- src/vs/workbench/api/electron-browser/mainThreadEditor.ts | 2 +- src/vs/workbench/browser/parts/editor/tabsTitleControl.ts | 4 ++-- src/vs/workbench/parts/debug/electron-browser/debugViewer.ts | 4 ++-- .../workbench/parts/debug/electron-browser/rawDebugSession.ts | 2 +- .../parts/preferences/common/keybindingsEditorModel.ts | 2 +- src/vs/workbench/parts/tasks/common/taskConfiguration.ts | 2 +- test/smoke/src/tests/configuration-views.ts | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/extensions/html/server/src/modes/languageModes.ts b/extensions/html/server/src/modes/languageModes.ts index 54349b429d886..59851b10851e7 100644 --- a/extensions/html/server/src/modes/languageModes.ts +++ b/extensions/html/server/src/modes/languageModes.ts @@ -68,7 +68,7 @@ export function getLanguageModes(supportedLanguages: { [languageId: string]: boo } return { getModeAtPosition(document: TextDocument, position: Position): LanguageMode { - let languageId = documentRegions.get(document).getLanguageAtPosition(position);; + let languageId = documentRegions.get(document).getLanguageAtPosition(position); if (languageId) { return modes[languageId]; } diff --git a/src/vs/editor/common/config/fontInfo.ts b/src/vs/editor/common/config/fontInfo.ts index 9ab9a11d2a99a..af6a2d8287372 100644 --- a/src/vs/editor/common/config/fontInfo.ts +++ b/src/vs/editor/common/config/fontInfo.ts @@ -86,7 +86,7 @@ export class BareFontInfo { lineHeight = 8; } - let letterSpacing = safeParseFloat(opts.letterSpacing, 0);; + let letterSpacing = safeParseFloat(opts.letterSpacing, 0); letterSpacing = clamp(letterSpacing, -20, 20); let editorZoomLevelMultiplier = 1 + (EditorZoom.getZoomLevel() * 0.1); diff --git a/src/vs/editor/contrib/find/browser/findWidget.ts b/src/vs/editor/contrib/find/browser/findWidget.ts index 8eadb32492a64..ceecbd9db0caf 100644 --- a/src/vs/editor/contrib/find/browser/findWidget.ts +++ b/src/vs/editor/contrib/find/browser/findWidget.ts @@ -81,7 +81,7 @@ export class FindWidgetViewZone implements IViewZone { } export class FindWidget extends Widget implements IOverlayWidget, IHorizontalSashLayoutProvider { - private static ID = 'editor.contrib.findWidget';; + private static ID = 'editor.contrib.findWidget'; private _codeEditor: ICodeEditor; private _state: FindReplaceState; private _controller: IFindController; diff --git a/src/vs/editor/test/common/model/textModelSearch.test.ts b/src/vs/editor/test/common/model/textModelSearch.test.ts index df67b81aa49d2..97417836da7c4 100644 --- a/src/vs/editor/test/common/model/textModelSearch.test.ts +++ b/src/vs/editor/test/common/model/textModelSearch.test.ts @@ -31,7 +31,7 @@ suite('TextModelSearch', () => { let match = TextModelSearch.findNextMatch(model, searchParams, startPos, false); assert.deepEqual(match, expectedMatches[0], `findNextMatch ${startPos}`); for (let i = 0; i < expectedMatches.length; i++) { - startPos = expectedMatches[i].range.getStartPosition();; + startPos = expectedMatches[i].range.getStartPosition(); match = TextModelSearch.findNextMatch(model, searchParams, startPos, false); assert.deepEqual(match, expectedMatches[i], `findNextMatch ${startPos}`); } diff --git a/src/vs/workbench/api/electron-browser/mainThreadEditor.ts b/src/vs/workbench/api/electron-browser/mainThreadEditor.ts index cd44f6778a1dc..a875e16c35ef2 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadEditor.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadEditor.ts @@ -254,7 +254,7 @@ export class MainThreadTextEditor { break; case TextEditorRevealType.InCenter: this._codeEditor.revealRangeInCenter(range); - break;; + break; case TextEditorRevealType.InCenterIfOutsideViewport: this._codeEditor.revealRangeInCenterIfOutsideViewport(range); break; diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index 759efa00c160f..612f7aff73f41 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -272,8 +272,8 @@ export class TabsTitleControl extends TitleControl { // Container tabContainer.setAttribute('aria-label', `${name}, tab`); tabContainer.title = title; - tabContainer.style.borderLeftColor = (index !== 0) ? (this.getColor(TAB_BORDER) || this.getColor(contrastBorder)) : null;; - tabContainer.style.borderRightColor = (index === editorsOfGroup.length - 1) ? (this.getColor(TAB_BORDER) || this.getColor(contrastBorder)) : null;; + tabContainer.style.borderLeftColor = (index !== 0) ? (this.getColor(TAB_BORDER) || this.getColor(contrastBorder)) : null; + tabContainer.style.borderRightColor = (index === editorsOfGroup.length - 1) ? (this.getColor(TAB_BORDER) || this.getColor(contrastBorder)) : null; tabContainer.style.outlineColor = this.getColor(activeContrastBorder); const tabOptions = this.editorGroupService.getTabOptions(); diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index 210f9e632e794..4125114587786 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -1029,7 +1029,7 @@ export class BreakpointsActionProvider implements IActionProvider { } public hasActions(tree: ITree, element: any): boolean { - return false;; + return false; } public hasSecondaryActions(tree: ITree, element: any): boolean { @@ -1175,7 +1175,7 @@ export class BreakpointsRenderer implements IRenderer { } private renderExceptionBreakpoint(exceptionBreakpoint: debug.IExceptionBreakpoint, data: IBaseBreakpointTemplateData): void { - data.name.textContent = exceptionBreakpoint.label || `${exceptionBreakpoint.filter} exceptions`;; + data.name.textContent = exceptionBreakpoint.label || `${exceptionBreakpoint.filter} exceptions`; data.breakpoint.title = data.name.textContent; data.checkbox.checked = exceptionBreakpoint.enabled; } diff --git a/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts b/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts index 0df197051a3cd..211539a5d4f79 100644 --- a/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts +++ b/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts @@ -278,7 +278,7 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession { return this.send('restartFrame', args).then(response => { this.fireFakeContinued(threadId); return response; - });; + }); } public completions(args: DebugProtocol.CompletionsArguments): TPromise { diff --git a/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts b/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts index 65379a3689fc2..cce68a1ae07aa 100644 --- a/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts +++ b/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts @@ -288,7 +288,7 @@ class KeybindingItemMatches { } private filterAndSort(matches: IMatch[]): IMatch[] { - return distinct(matches, (a => a.start + '.' + a.end)).filter(match => !matches.some(m => !(m.start === match.start && m.end === match.end) && (m.start <= match.start && m.end >= match.end))).sort((a, b) => a.start - b.start);; + return distinct(matches, (a => a.start + '.' + a.end)).filter(match => !matches.some(m => !(m.start === match.start && m.end === match.end) && (m.start <= match.start && m.end >= match.end))).sort((a, b) => a.start - b.start); } private matchesKeybinding(keybinding: ResolvedKeybinding, searchValue: string, words: string[]): KeybindingMatches { diff --git a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts index b89dcfaeca22e..cd6ab3b3382b1 100644 --- a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts @@ -1331,7 +1331,7 @@ class ConfigurationParser { } if ((!result.tasks || result.tasks.length === 0) && (globals.command && globals.command.name)) { - let matchers: ProblemMatcher[] = ProblemMatcherConverter.from(fileConfig.problemMatcher, context);; + let matchers: ProblemMatcher[] = ProblemMatcherConverter.from(fileConfig.problemMatcher, context); let isBackground = fileConfig.isBackground ? !!fileConfig.isBackground : fileConfig.isWatching ? !!fileConfig.isWatching : undefined; let task: Tasks.Task = { _id: context.uuidMap.getUUID(globals.command.name), diff --git a/test/smoke/src/tests/configuration-views.ts b/test/smoke/src/tests/configuration-views.ts index e1241b6bfb5fb..25938ab12063b 100644 --- a/test/smoke/src/tests/configuration-views.ts +++ b/test/smoke/src/tests/configuration-views.ts @@ -47,7 +47,7 @@ export function testConfigViews() { await configView.enterBinding(['Control', 'u', 'NULL']); await common.enter(); let html = await configView.getActivityBar(ActivityBarPosition.RIGHT); - assert.equal(html, undefined);; + assert.equal(html, undefined); await app.wait(); await configView.toggleActivityBarPosition(); html = await configView.getActivityBar(ActivityBarPosition.RIGHT); From a53cce90d3d790607ef36e33c05fa6d688150c31 Mon Sep 17 00:00:00 2001 From: Dustin Campbell Date: Tue, 6 Jun 2017 14:28:34 -0700 Subject: [PATCH 1573/2747] Update C# TextMate grammar with latest fixes from csharp-tmLanguage (#28120) This includes fixes for the following: * C# 7 ref locals and ref returns (https://github.com/dotnet/csharp-tmLanguage/issues/12) * C# 7 throw expressions (https://github.com/dotnet/csharp-tmLanguage/issues/69) --- .../csharp/syntaxes/csharp.tmLanguage.json | 62 ++++++++++++++++--- 1 file changed, 52 insertions(+), 10 deletions(-) diff --git a/extensions/csharp/syntaxes/csharp.tmLanguage.json b/extensions/csharp/syntaxes/csharp.tmLanguage.json index 010852c16e7c8..1567d53273ea6 100644 --- a/extensions/csharp/syntaxes/csharp.tmLanguage.json +++ b/extensions/csharp/syntaxes/csharp.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/dotnet/csharp-tmLanguage/commit/9ef19ad34df99e0e5bf3e0a8e8a1733d1f0c4aca", + "version": "https://github.com/dotnet/csharp-tmLanguage/commit/e7f564b60e08e6d8400d2512918c2ff5ccbf4cec", "name": "C#", "scopeName": "source.cs", "fileTypes": [ @@ -275,6 +275,9 @@ { "include": "#nameof-expression" }, + { + "include": "#throw-expression" + }, { "include": "#interpolated-string" }, @@ -614,7 +617,7 @@ ] }, "delegate-declaration": { - "begin": "(?x)\n(?:\\b(delegate)\\b)\\s+\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", + "begin": "(?x)\n(?:\\b(delegate)\\b)\\s+\n(?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", "beginCaptures": { "1": { "name": "keyword.other.delegate.cs" @@ -999,7 +1002,7 @@ ] }, "property-declaration": { - "begin": "(?x)\n(?!.*\\b(?:class|interface|struct|enum|event)\\b)\\s*\n(?\n (?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g)\\s*\n(?=\\{|=>|$)", + "begin": "(?x)\n(?!.*\\b(?:class|interface|struct|enum|event)\\b)\\s*\n(?\n (?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?\\g)\\s*\n(?=\\{|=>|$)", "beginCaptures": { "1": { "patterns": [ @@ -1042,7 +1045,7 @@ ] }, "indexer-declaration": { - "begin": "(?x)\n(?\n (?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?this)\\s*\n(?=\\[)", + "begin": "(?x)\n(?\n (?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(?this)\\s*\n(?=\\[)", "beginCaptures": { "1": { "patterns": [ @@ -1215,7 +1218,7 @@ ] }, "method-declaration": { - "begin": "(?x)\n(?\n (?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", + "begin": "(?x)\n(?\n (?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?\\g\\s*\\.\\s*)?\n(\\g)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", "beginCaptures": { "1": { "patterns": [ @@ -1351,7 +1354,7 @@ ] }, "operator-declaration": { - "begin": "(?x)\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?(?:\\b(?:operator)))\\s*\n(?(?:\\+|-|\\*|/|%|&|\\||\\^|\\<\\<|\\>\\>|==|!=|\\>|\\<|\\>=|\\<=|!|~|\\+\\+|--|true|false))\\s*\n(?=\\()", + "begin": "(?x)\n(?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?(?:\\b(?:operator)))\\s*\n(?(?:\\+|-|\\*|/|%|&|\\||\\^|\\<\\<|\\>\\>|==|!=|\\>|\\<|\\>=|\\<=|!|~|\\+\\+|--|true|false))\\s*\n(?=\\()", "beginCaptures": { "1": { "patterns": [ @@ -1384,7 +1387,7 @@ ] }, "conversion-operator-declaration": { - "begin": "(?x)\n(?(?:\\b(?:explicit|implicit)))\\s*\n(?(?:\\b(?:operator)))\\s*\n(?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\()", + "begin": "(?x)\n(?(?:\\b(?:explicit|implicit)))\\s*\n(?(?:\\b(?:operator)))\\s*\n(?\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\()", "beginCaptures": { "1": { "patterns": [ @@ -1461,6 +1464,9 @@ }, "end": "(?=[,\\)\\];}])", "patterns": [ + { + "include": "#ref-modifier" + }, { "include": "#expression" } @@ -1475,6 +1481,9 @@ }, "end": "(?=[,\\);}])", "patterns": [ + { + "include": "#ref-modifier" + }, { "include": "#expression" } @@ -1526,6 +1535,9 @@ }, "end": "(?=;)", "patterns": [ + { + "include": "#ref-modifier" + }, { "include": "#expression" } @@ -2122,19 +2134,22 @@ ] }, "local-variable-declaration": { - "begin": "(?x)\n(?:\n (\\bvar\\b)|\n (?\n (?:\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g)\\s*\n(?=,|;|=|\\))", + "begin": "(?x)\n(?:\n (?:(\\bref)\\s+)?(\\bvar\\b)| # ref local\n (?\n (?:\n (?:ref\\s+)? # ref local\n (?:\n (?:(?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (? # identifier + type arguments (if any)\n \\g\\s*\n (?\\s*<(?:[^<>]|\\g)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g)* | # Are there any more names being dotted into?\n (?\\s*\\((?:[^\\(\\)]|\\g)+\\))\n )\n (?:\\s*\\*\\s*)* # pointer suffix?\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g)\\s*\n(?=,|;|=|\\))", "beginCaptures": { "1": { - "name": "keyword.other.var.cs" + "name": "storage.modifier.cs" }, "2": { + "name": "keyword.other.var.cs" + }, + "3": { "patterns": [ { "include": "#type" } ] }, - "7": { + "8": { "name": "entity.name.variable.local.cs" } }, @@ -2405,6 +2420,20 @@ } ] }, + "throw-expression": { + "begin": "(? Date: Tue, 6 Jun 2017 15:50:38 -0700 Subject: [PATCH 1574/2747] Ignore comments when select next/prev. Fixes #27763 --- extensions/emmet/src/selectItem.ts | 5 +- extensions/emmet/src/selectItemHTML.ts | 105 ++++++++++--------- extensions/emmet/src/selectItemStylesheet.ts | 8 +- extensions/emmet/src/util.ts | 7 +- 4 files changed, 69 insertions(+), 56 deletions(-) diff --git a/extensions/emmet/src/selectItem.ts b/extensions/emmet/src/selectItem.ts index 5ef47062ede0e..961f3a0dfa5d4 100644 --- a/extensions/emmet/src/selectItem.ts +++ b/extensions/emmet/src/selectItem.ts @@ -34,7 +34,10 @@ export function fetchSelectItem(direction: string): void { let rootNode: Node = parseContent(editor.document.getText()); let newSelections: vscode.Selection[] = []; editor.selections.forEach(selection => { - let updatedSelection = direction === 'next' ? nextItem(selection, editor, rootNode) : prevItem(selection, editor, rootNode); + const selectionStart = editor.document.offsetAt(selection.isReversed ? selection.active : selection.anchor); + const selectionEnd = editor.document.offsetAt(selection.isReversed ? selection.anchor : selection.active); + + let updatedSelection = direction === 'next' ? nextItem(selectionStart, selectionEnd, editor, rootNode) : prevItem(selectionStart, selectionEnd, editor, rootNode); newSelections.push(updatedSelection ? updatedSelection : selection); }); editor.selections = newSelections; diff --git a/extensions/emmet/src/selectItemHTML.ts b/extensions/emmet/src/selectItemHTML.ts index 2c0be704eadf3..7aad3f9c2a9a7 100644 --- a/extensions/emmet/src/selectItemHTML.ts +++ b/extensions/emmet/src/selectItemHTML.ts @@ -7,90 +7,104 @@ import * as vscode from 'vscode'; import { getNode, getDeepestNode, findNextWord, findPrevWord } from './util'; import Node from '@emmetio/node'; -export function nextItemHTML(selection: vscode.Selection, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { - let offset = editor.document.offsetAt(selection.active); - let currentNode = getNode(rootNode, offset); +export function nextItemHTML(selectionStart: number, selectionEnd: number, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { + let currentNode = getNode(rootNode, selectionEnd); + let nextNode: Node; + + if (currentNode.type !== 'comment') { + // If cursor is in the tag name, select tag + if (selectionEnd < currentNode.open.start + currentNode.name.length) { + return getSelectionFromNode(currentNode, editor.document); + } - // Cursor is in the open tag, look for attributes - if (offset < currentNode.open.end) { - let attrSelection = getNextAttribute(selection, editor.document, currentNode); - if (attrSelection) { - return attrSelection; + // If cursor is in the open tag, look for attributes + if (selectionEnd < currentNode.open.end) { + let attrSelection = getNextAttribute(selectionStart, selectionEnd, editor.document, currentNode); + if (attrSelection) { + return attrSelection; + } } - } - // Get the first child of current node which is right after the cursor - let nextNode = currentNode.firstChild; - while (nextNode && nextNode.start < offset) { - nextNode = nextNode.nextSibling; + // Get the first child of current node which is right after the cursor and is not a comment + nextNode = currentNode.firstChild; + while (nextNode && (nextNode.start < selectionEnd || nextNode.type === 'comment')) { + nextNode = nextNode.nextSibling; + } } - // Get next sibling of current node or the parent + + // Get next sibling of current node which is not a comment. If none is found try the same on the parent while (!nextNode && currentNode) { - nextNode = currentNode.nextSibling; - currentNode = currentNode.parent; + if (currentNode.nextSibling) { + if (currentNode.nextSibling.type !== 'comment') { + nextNode = currentNode.nextSibling; + } else { + currentNode = currentNode.nextSibling; + } + } else { + currentNode = currentNode.parent; + } } return getSelectionFromNode(nextNode, editor.document); } -export function prevItemHTML(selection: vscode.Selection, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { - let offset = editor.document.offsetAt(selection.active); - let currentNode = getNode(rootNode, offset); +export function prevItemHTML(selectionStart: number, selectionEnd: number, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { + let currentNode = getNode(rootNode, selectionStart); let prevNode: Node; - // Cursor is in the open tag after the tag name - if (offset > currentNode.open.start + currentNode.name.length + 1 && offset <= currentNode.open.end) { - prevNode = currentNode; - } + if (currentNode.type !== 'comment' && selectionStart > currentNode.open.start + 1) { - // Cursor is inside the tag - if (!prevNode && offset > currentNode.open.end) { - if (!currentNode.firstChild) { - // No children, so current node should be selected + if (selectionStart < currentNode.open.end || !currentNode.firstChild) { prevNode = currentNode; } else { - // Select the child that appears just before the cursor + // Select the child that appears just before the cursor and is not a comment prevNode = currentNode.firstChild; - while (prevNode.nextSibling && prevNode.nextSibling.end < offset) { + let oldOption: Node; + while (prevNode.nextSibling && prevNode.nextSibling.end < selectionStart) { + if (prevNode && prevNode.type !== 'comment') { + oldOption = prevNode; + } prevNode = prevNode.nextSibling; } - if (prevNode) { - prevNode = getDeepestNode(prevNode); - } + + prevNode = getDeepestNode((prevNode && prevNode.type !== 'comment') ? prevNode : oldOption); } } - if (!prevNode && currentNode.previousSibling) { - prevNode = getDeepestNode(currentNode.previousSibling); - } + // Select previous sibling which is not a comment. If none found, then select parent + while (!prevNode && currentNode) { + if (currentNode.previousSibling) { + if (currentNode.previousSibling.type !== 'comment') { + prevNode = getDeepestNode(currentNode.previousSibling); + } else { + currentNode = currentNode.previousSibling; + } + } else { + prevNode = currentNode.parent; + } - if (!prevNode && currentNode.parent) { - prevNode = currentNode.parent; } - let attrSelection = getPrevAttribute(selection, editor.document, prevNode); + let attrSelection = getPrevAttribute(selectionStart, selectionEnd, editor.document, prevNode); return attrSelection ? attrSelection : getSelectionFromNode(prevNode, editor.document); } function getSelectionFromNode(node: Node, document: vscode.TextDocument): vscode.Selection { if (node && node.open) { let selectionStart = document.positionAt(node.open.start + 1); - let selectionEnd = node.type === 'comment' ? document.positionAt(node.open.end - 1) : selectionStart.translate(0, node.name.length); + let selectionEnd = selectionStart.translate(0, node.name.length); return new vscode.Selection(selectionStart, selectionEnd); } } -function getNextAttribute(selection: vscode.Selection, document: vscode.TextDocument, node: Node): vscode.Selection { +function getNextAttribute(selectionStart: number, selectionEnd: number, document: vscode.TextDocument, node: Node): vscode.Selection { if (!node.attributes || node.attributes.length === 0 || node.type === 'comment') { return; } - let selectionStart = document.offsetAt(selection.anchor); - let selectionEnd = document.offsetAt(selection.active); - for (let i = 0; i < node.attributes.length; i++) { let attr = node.attributes[i]; @@ -136,15 +150,12 @@ function getNextAttribute(selection: vscode.Selection, document: vscode.TextDocu } } -function getPrevAttribute(selection: vscode.Selection, document: vscode.TextDocument, node: Node): vscode.Selection { +function getPrevAttribute(selectionStart: number, selectionEnd: number, document: vscode.TextDocument, node: Node): vscode.Selection { if (!node.attributes || node.attributes.length === 0 || node.type === 'comment') { return; } - let selectionStart = document.offsetAt(selection.anchor); - let selectionEnd = document.offsetAt(selection.active); - for (let i = node.attributes.length - 1; i >= 0; i--) { let attr = node.attributes[i]; diff --git a/extensions/emmet/src/selectItemStylesheet.ts b/extensions/emmet/src/selectItemStylesheet.ts index e3144cbf6662a..0a11f5e5e33b7 100644 --- a/extensions/emmet/src/selectItemStylesheet.ts +++ b/extensions/emmet/src/selectItemStylesheet.ts @@ -7,9 +7,7 @@ import * as vscode from 'vscode'; import { getNode, getDeepestNode, findNextWord, findPrevWord } from './util'; import Node from '@emmetio/node'; -export function nextItemStylesheet(selection: vscode.Selection, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { - let startOffset = editor.document.offsetAt(selection.anchor); - let endOffset = editor.document.offsetAt(selection.active); +export function nextItemStylesheet(startOffset: number, endOffset: number, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { let currentNode = getNode(rootNode, endOffset, true); // Full property is selected, so select full property value next @@ -47,9 +45,7 @@ export function nextItemStylesheet(selection: vscode.Selection, editor: vscode.T } -export function prevItemStylesheet(selection: vscode.Selection, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { - let startOffset = editor.document.offsetAt(selection.anchor); - let endOffset = editor.document.offsetAt(selection.active); +export function prevItemStylesheet(startOffset: number, endOffset: number, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { let currentNode = getNode(rootNode, startOffset); if (!currentNode) { currentNode = rootNode; diff --git a/extensions/emmet/src/util.ts b/extensions/emmet/src/util.ts index 81085e5b6d6dc..d6b80549fdfe2 100644 --- a/extensions/emmet/src/util.ts +++ b/extensions/emmet/src/util.ts @@ -134,8 +134,11 @@ export function getDeepestNode(node: Node): Node { if (!node || !node.children || node.children.length === 0) { return node; } - - return getDeepestNode(node.children[node.children.length - 1]); + for (let i = node.children.length - 1; i >= 0; i--) { + if (node.children[i].type !== 'comment') { + return getDeepestNode(node.children[i]); + } + } } export function findNextWord(propertyValue: string, pos: number): [number, number] { From fbb786088eb0413f26e781fd4c4ad9fb5f7dcec2 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 6 Jun 2017 15:43:43 -0700 Subject: [PATCH 1575/2747] Remove experimental autobuild --- extensions/typescript/package.nls.json | 1 - .../src/features/bufferSyncSupport.ts | 2 +- extensions/typescript/src/typescriptMain.ts | 5 ++--- extensions/typescript/src/typescriptService.ts | 1 - .../typescript/src/typescriptServiceClient.ts | 18 ++---------------- 5 files changed, 5 insertions(+), 22 deletions(-) diff --git a/extensions/typescript/package.nls.json b/extensions/typescript/package.nls.json index c2cf59174963f..d202887540248 100644 --- a/extensions/typescript/package.nls.json +++ b/extensions/typescript/package.nls.json @@ -8,7 +8,6 @@ "typescript.check.tscVersion": "Check if a global install TypeScript compiler (e.g. tsc) differs from the used TypeScript language service.", "typescript.tsserver.log": "Enables logging of the TS server to a file. This log can be used to diagnose TS Server issues. The log may contain file paths, source code, and other potentially sensitive information from your project.", "typescript.tsserver.trace": "Enables tracing of messages sent to the TS server. This trace can be used to diagnose TS Server issues. The trace may contain file paths, source code, and other potentially sensitive information from your project.", - "typescript.tsserver.experimentalAutoBuild": "Enables experimental auto build. Requires 1.9 dev or 2.x tsserver version and a restart of VS Code after changing it.", "typescript.validate.enable": "Enable/disable TypeScript validation.", "typescript.format.enable": "Enable/disable default TypeScript formatter.", "javascript.format.enable": "Enable/disable default JavaScript formatter.", diff --git a/extensions/typescript/src/features/bufferSyncSupport.ts b/extensions/typescript/src/features/bufferSyncSupport.ts index 9cdaf802b2188..216eebde2edb4 100644 --- a/extensions/typescript/src/features/bufferSyncSupport.ts +++ b/extensions/typescript/src/features/bufferSyncSupport.ts @@ -229,7 +229,7 @@ export default class BufferSyncSupport { } public requestDiagnostic(file: string): void { - if (!this._validate || this.client.experimentalAutoBuild) { + if (!this._validate) { return; } diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index e217aa0040096..50d5d4cc9801a 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -94,7 +94,7 @@ export function activate(context: ExtensionContext): void { let clientHost: TypeScriptServiceClientHost | undefined; return () => { if (!clientHost) { - clientHost = new TypeScriptServiceClientHost(standardLanguageDescriptions, context.storagePath, context.workspaceState, plugins); + clientHost = new TypeScriptServiceClientHost(standardLanguageDescriptions, context.workspaceState, plugins); context.subscriptions.push(clientHost); const host = clientHost; @@ -456,7 +456,6 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { constructor( descriptions: LanguageDescription[], - storagePath: string | undefined, workspaceState: Memento, plugins: TypeScriptServerPlugin[] ) { @@ -478,7 +477,7 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { this.versionStatus = new VersionStatus(); this.disposables.push(this.versionStatus); - this.client = new TypeScriptServiceClient(this, storagePath, workspaceState, this.versionStatus, plugins, this.disposables); + this.client = new TypeScriptServiceClient(this, workspaceState, this.versionStatus, plugins, this.disposables); this.languagePerId = Object.create(null); for (const description of descriptions) { const manager = new LanguageProvider(this.client, description); diff --git a/extensions/typescript/src/typescriptService.ts b/extensions/typescript/src/typescriptService.ts index dd24447e92959..f2ad09da59a9b 100644 --- a/extensions/typescript/src/typescriptService.ts +++ b/extensions/typescript/src/typescriptService.ts @@ -85,7 +85,6 @@ export interface ITypescriptServiceClient { logTelemetry(eventName: string, properties?: { [prop: string]: string }): void; - experimentalAutoBuild: boolean; apiVersion: API; checkGlobalTSCVersion: boolean; diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 4f68a6991fbae..ba756961c9b3f 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -20,10 +20,10 @@ import Logger from './utils/logger'; import VersionStatus from './utils/versionStatus'; import * as is from './utils/is'; +import TelemetryReporter from './utils/telemetry'; +import Tracer from './utils/tracer'; import * as nls from 'vscode-nls'; -import TelemetryReporter from "./utils/telemetry"; -import Tracer from "./utils/tracer"; const localize = nls.loadMessageBundle(); interface CallbackItem { @@ -231,7 +231,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private _onReady: { promise: Promise; resolve: () => void; reject: () => void; }; private configuration: TypeScriptServiceConfiguration; private _checkGlobalTSCVersion: boolean; - private _experimentalAutoBuild: boolean; private tracer: Tracer; private readonly logger: Logger = new Logger(); private tsServerLogFile: string | null = null; @@ -256,7 +255,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient constructor( private readonly host: ITypescriptServiceClientHost, - private readonly storagePath: string | undefined, private readonly workspaceState: Memento, private readonly versionStatus: VersionStatus, private readonly plugins: TypeScriptServerPlugin[], @@ -279,7 +277,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.callbacks = new CallbackMap(); this.configuration = TypeScriptServiceConfiguration.loadFromWorkspace(); - this._experimentalAutoBuild = false; // configuration.get('typescript.tsserver.experimentalAutoBuild', false); this._apiVersion = new API('1.0.0'); this._checkGlobalTSCVersion = true; this.tracer = new Tracer(this.logger); @@ -338,10 +335,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient return this._onTypesInstallerInitializationFailed.event; } - public get experimentalAutoBuild(): boolean { - return this._experimentalAutoBuild; - } - public get checkGlobalTSCVersion(): boolean { return this._checkGlobalTSCVersion; } @@ -741,13 +734,6 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient let configureOptions: Proto.ConfigureRequestArguments = { hostInfo: 'vscode' }; - if (this._experimentalAutoBuild && this.storagePath) { - try { - fs.mkdirSync(this.storagePath); - } catch (error) { - } - // configureOptions.autoDiagnostics = true; - } this.execute('configure', configureOptions); this.setCompilerOptionsForInferredProjects(); if (resendModels) { From d808a55641c93f912aa360f79b3f6ba50713cf5c Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 6 Jun 2017 15:46:01 -0700 Subject: [PATCH 1576/2747] Remove buildstatus --- extensions/typescript/src/typescriptMain.ts | 8 ------- .../typescript/src/utils/buildStatus.ts | 21 ------------------- 2 files changed, 29 deletions(-) delete mode 100644 extensions/typescript/src/utils/buildStatus.ts diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 50d5d4cc9801a..be29423812314 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -45,7 +45,6 @@ import TypeScriptTaskProviderManager from './features/taskProvider'; import ImplementationCodeLensProvider from './features/implementationsCodeLensProvider'; -import * as BuildStatus from './utils/buildStatus'; import * as ProjectStatus from './utils/projectStatus'; import TypingsStatus, { AtaProgressReporter } from './utils/typingsStatus'; import VersionStatus from './utils/versionStatus'; @@ -161,8 +160,6 @@ export function activate(context: ExtensionContext): void { break; } } - - BuildStatus.update({ queueLength: 0 }); } @@ -658,11 +655,6 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { } }); } - /* - if (Is.defined(body.queueLength)) { - BuildStatus.update({ queueLength: body.queueLength }); - } - */ } /* internal */ configFileDiagnosticsReceived(event: Proto.ConfigFileDiagnosticEvent): void { diff --git a/extensions/typescript/src/utils/buildStatus.ts b/extensions/typescript/src/utils/buildStatus.ts deleted file mode 100644 index ced56fd43b900..0000000000000 --- a/extensions/typescript/src/utils/buildStatus.ts +++ /dev/null @@ -1,21 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import vscode = require('vscode'); - -const statusItem: vscode.StatusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left, Number.MIN_VALUE); - -export interface BuildInfo { - queueLength: number; -} - -export function update(info: BuildInfo): void { - if (info.queueLength === 0) { - statusItem.hide(); - return; - } - statusItem.text = info.queueLength.toString(); - statusItem.show(); -} \ No newline at end of file From 94cf0f8e78f1d005d15fbb110e3c247ea7c01b53 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 6 Jun 2017 16:03:05 -0700 Subject: [PATCH 1577/2747] Use map for syncedBuffers --- .../src/features/bufferSyncSupport.ts | 48 ++++++++----------- 1 file changed, 19 insertions(+), 29 deletions(-) diff --git a/extensions/typescript/src/features/bufferSyncSupport.ts b/extensions/typescript/src/features/bufferSyncSupport.ts index 216eebde2edb4..7fcf7103e34b5 100644 --- a/extensions/typescript/src/features/bufferSyncSupport.ts +++ b/extensions/typescript/src/features/bufferSyncSupport.ts @@ -104,7 +104,7 @@ export default class BufferSyncSupport { private readonly modeIds: Set; private readonly diagnostics: Diagnostics; private readonly disposables: Disposable[] = []; - private readonly syncedBuffers: ObjectMap; + private readonly syncedBuffers: Map; private pendingDiagnostics: { [key: string]: number; }; private readonly diagnosticDelayer: Delayer; @@ -119,7 +119,7 @@ export default class BufferSyncSupport { this.pendingDiagnostics = Object.create(null); this.diagnosticDelayer = new Delayer(300); - this.syncedBuffers = Object.create(null); + this.syncedBuffers = new Map(); const tsConfig = workspace.getConfiguration('typescript'); this.checkGlobalTSCVersion = client.checkGlobalTSCVersion && this.modeIds.has('typescript') && tsConfig.get(checkTscVersionSettingKey, true); @@ -129,7 +129,6 @@ export default class BufferSyncSupport { workspace.onDidOpenTextDocument(this.onDidOpenTextDocument, this, this.disposables); workspace.onDidCloseTextDocument(this.onDidCloseTextDocument, this, this.disposables); workspace.onDidChangeTextDocument(this.onDidChangeTextDocument, this, this.disposables); - workspace.onDidSaveTextDocument(this.onDidSaveTextDocument, this, this.disposables); workspace.textDocuments.forEach(this.onDidOpenTextDocument, this); } @@ -142,13 +141,13 @@ export default class BufferSyncSupport { } public handles(file: string): boolean { - return !!this.syncedBuffers[file]; + return this.syncedBuffers.has(file); } public reOpenDocuments(): void { - Object.keys(this.syncedBuffers).forEach(key => { - this.syncedBuffers[key].open(); - }); + for (const buffer of this.syncedBuffers.values()) { + buffer.open(); + } } public dispose(): void { @@ -164,13 +163,13 @@ export default class BufferSyncSupport { if (!this.modeIds.has(document.languageId)) { return; } - let resource = document.uri; - let filepath = this.client.normalizePath(resource); + const resource = document.uri; + const filepath = this.client.normalizePath(resource); if (!filepath) { return; } - let syncedBuffer = new SyncedBuffer(document, filepath, this, this.client); - this.syncedBuffers[filepath] = syncedBuffer; + const syncedBuffer = new SyncedBuffer(document, filepath, this, this.client); + this.syncedBuffers.set(filepath, syncedBuffer); syncedBuffer.open(); this.requestDiagnostic(filepath); if (document.languageId === 'typescript' || document.languageId === 'typescriptreact') { @@ -183,12 +182,12 @@ export default class BufferSyncSupport { if (!filepath) { return; } - let syncedBuffer = this.syncedBuffers[filepath]; + const syncedBuffer = this.syncedBuffers.get(filepath); if (!syncedBuffer) { return; } this.diagnostics.delete(filepath); - delete this.syncedBuffers[filepath]; + this.syncedBuffers.delete(filepath); syncedBuffer.close(); if (!fs.existsSync(filepath)) { this.requestAllDiagnostics(); @@ -200,29 +199,20 @@ export default class BufferSyncSupport { if (!filepath) { return; } - let syncedBuffer = this.syncedBuffers[filepath]; + let syncedBuffer = this.syncedBuffers.get(filepath); if (!syncedBuffer) { return; } syncedBuffer.onContentChanged(e.contentChanges); } - private onDidSaveTextDocument(document: TextDocument): void { - let filepath = this.client.normalizePath(document.uri); - if (!filepath) { - return; - } - let syncedBuffer = this.syncedBuffers[filepath]; - if (!syncedBuffer) { - return; - } - } - public requestAllDiagnostics() { if (!this._validate) { return; } - Object.keys(this.syncedBuffers).forEach(filePath => this.pendingDiagnostics[filePath] = Date.now()); + for (const filePath of this.syncedBuffers.keys()) { + this.pendingDiagnostics[filePath] = Date.now(); + } this.diagnosticDelayer.trigger(() => { this.sendPendingDiagnostics(); }, 200); @@ -234,7 +224,7 @@ export default class BufferSyncSupport { } this.pendingDiagnostics[file] = Date.now(); - let buffer = this.syncedBuffers[file]; + const buffer = this.syncedBuffers.get(file); let delay = 300; if (buffer) { let lineCount = buffer.lineCount; @@ -261,11 +251,11 @@ export default class BufferSyncSupport { }); // Add all open TS buffers to the geterr request. They might be visible - Object.keys(this.syncedBuffers).forEach((file) => { + for (const file of this.syncedBuffers.keys()) { if (!this.pendingDiagnostics[file]) { files.push(file); } - }); + } let args: Proto.GeterrRequestArgs = { delay: 0, From 7968d90989e014bc0ef66dc08b6530bedc8ed81d Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 6 Jun 2017 16:13:22 -0700 Subject: [PATCH 1578/2747] Extract dispatch blocks to own functions --- .../typescript/src/typescriptServiceClient.ts | 125 ++++++++++-------- 1 file changed, 67 insertions(+), 58 deletions(-) diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index ba756961c9b3f..7a4581674e143 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -973,64 +973,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } else if (message.type === 'event') { const event: Proto.Event = message; this.tracer.traceEvent(event); - if (event.event === 'syntaxDiag') { - this.host.syntaxDiagnosticsReceived(event as Proto.DiagnosticEvent); - } else if (event.event === 'semanticDiag') { - this.host.semanticDiagnosticsReceived(event as Proto.DiagnosticEvent); - } else if (event.event === 'configFileDiag') { - this.host.configFileDiagnosticsReceived(event as Proto.ConfigFileDiagnosticEvent); - } else if (event.event === 'telemetry') { - let telemetryData = (event as Proto.TelemetryEvent).body; - let properties: ObjectMap = Object.create(null); - switch (telemetryData.telemetryEventName) { - case 'typingsInstalled': - let typingsInstalledPayload: Proto.TypingsInstalledTelemetryEventPayload = (telemetryData.payload as Proto.TypingsInstalledTelemetryEventPayload); - properties['installedPackages'] = typingsInstalledPayload.installedPackages; - - if (is.defined(typingsInstalledPayload.installSuccess)) { - properties['installSuccess'] = typingsInstalledPayload.installSuccess.toString(); - } - if (is.string(typingsInstalledPayload.typingsInstallerVersion)) { - properties['typingsInstallerVersion'] = typingsInstalledPayload.typingsInstallerVersion; - } - break; - default: - let payload = telemetryData.payload; - if (payload) { - Object.keys(payload).forEach((key) => { - try { - if (payload.hasOwnProperty(key)) { - properties[key] = is.string(payload[key]) ? payload[key] : JSON.stringify(payload[key]); - } - } catch (e) { - // noop - } - }); - } - break; - } - this.logTelemetry(telemetryData.telemetryEventName, properties); - } else if (event.event === 'projectLanguageServiceState') { - const data = (event as Proto.ProjectLanguageServiceStateEvent).body; - if (data) { - this._onProjectLanguageServiceStateChanged.fire(data); - } - } else if (event.event === 'beginInstallTypes') { - const data = (event as Proto.BeginInstallTypesEvent).body; - if (data) { - this._onDidBeginInstallTypings.fire(data); - } - } else if (event.event === 'endInstallTypes') { - const data = (event as Proto.EndInstallTypesEvent).body; - if (data) { - this._onDidEndInstallTypings.fire(data); - } - } else if (event.event === 'typesInstallerInitializationFailed') { - const data = (event as Proto.TypesInstallerInitializationFailedEvent).body; - if (data) { - this._onTypesInstallerInitializationFailed.fire(data); - } - } + this.dispatchEvent(event); } else { throw new Error('Unknown message type ' + message.type + ' recevied'); } @@ -1038,4 +981,70 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.sendNextRequests(); } } + + private dispatchEvent(event: Proto.Event) { + if (event.event === 'syntaxDiag') { + this.host.syntaxDiagnosticsReceived(event as Proto.DiagnosticEvent); + } else if (event.event === 'semanticDiag') { + this.host.semanticDiagnosticsReceived(event as Proto.DiagnosticEvent); + } else if (event.event === 'configFileDiag') { + this.host.configFileDiagnosticsReceived(event as Proto.ConfigFileDiagnosticEvent); + } else if (event.event === 'telemetry') { + let telemetryData = (event as Proto.TelemetryEvent).body; + this.dispatchTelemetryEvent(telemetryData); + } else if (event.event === 'projectLanguageServiceState') { + const data = (event as Proto.ProjectLanguageServiceStateEvent).body; + if (data) { + this._onProjectLanguageServiceStateChanged.fire(data); + } + } else if (event.event === 'beginInstallTypes') { + const data = (event as Proto.BeginInstallTypesEvent).body; + if (data) { + this._onDidBeginInstallTypings.fire(data); + } + } else if (event.event === 'endInstallTypes') { + const data = (event as Proto.EndInstallTypesEvent).body; + if (data) { + this._onDidEndInstallTypings.fire(data); + } + } else if (event.event === 'typesInstallerInitializationFailed') { + const data = (event as Proto.TypesInstallerInitializationFailedEvent).body; + if (data) { + this._onTypesInstallerInitializationFailed.fire(data); + } + } + } + + private dispatchTelemetryEvent(telemetryData: Proto.TelemetryEventBody): void { + const properties: ObjectMap = Object.create(null); + switch (telemetryData.telemetryEventName) { + case 'typingsInstalled': + const typingsInstalledPayload: Proto.TypingsInstalledTelemetryEventPayload = (telemetryData.payload as Proto.TypingsInstalledTelemetryEventPayload); + properties['installedPackages'] = typingsInstalledPayload.installedPackages; + + if (is.defined(typingsInstalledPayload.installSuccess)) { + properties['installSuccess'] = typingsInstalledPayload.installSuccess.toString(); + } + if (is.string(typingsInstalledPayload.typingsInstallerVersion)) { + properties['typingsInstallerVersion'] = typingsInstalledPayload.typingsInstallerVersion; + } + break; + + default: + const payload = telemetryData.payload; + if (payload) { + Object.keys(payload).forEach((key) => { + try { + if (payload.hasOwnProperty(key)) { + properties[key] = is.string(payload[key]) ? payload[key] : JSON.stringify(payload[key]); + } + } catch (e) { + // noop + } + }); + } + break; + } + this.logTelemetry(telemetryData.telemetryEventName, properties); + } } \ No newline at end of file From a5c9a7c58c5d253ab691ea2842759ae41a7e2399 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 6 Jun 2017 17:52:58 -0700 Subject: [PATCH 1579/2747] Open config file when configure excludes status bar item is clicked. Fixes #21215 --- .../typescript/src/features/taskProvider.ts | 6 +-- extensions/typescript/src/typescriptMain.ts | 24 ++------- .../typescript/src/typescriptServiceClient.ts | 2 +- .../typescript/src/utils/projectStatus.ts | 54 +++++++------------ extensions/typescript/src/utils/tsconfig.ts | 36 +++++++++++++ .../typescript/src/utils/wireProtocol.ts | 2 +- 6 files changed, 65 insertions(+), 59 deletions(-) create mode 100644 extensions/typescript/src/utils/tsconfig.ts diff --git a/extensions/typescript/src/features/taskProvider.ts b/extensions/typescript/src/features/taskProvider.ts index 9cb0a3a64a8a1..fc15145b65e2d 100644 --- a/extensions/typescript/src/features/taskProvider.ts +++ b/extensions/typescript/src/features/taskProvider.ts @@ -11,8 +11,8 @@ import * as vscode from 'vscode'; import * as Proto from '../protocol'; import TypeScriptServiceClient from '../typescriptServiceClient'; -import TsConfigProvider from "../utils/tsconfigProvider"; - +import TsConfigProvider from '../utils/tsconfigProvider'; +import { isImplicitProjectConfigFile } from '../utils/tsconfig'; const exists = (file: string): Promise => new Promise((resolve, _reject) => { @@ -89,7 +89,7 @@ class TscTaskProvider implements vscode.TaskProvider { } const { configFileName } = res.body; - if (configFileName && configFileName.indexOf('/dev/null/') !== 0) { + if (configFileName && !isImplicitProjectConfigFile(configFileName)) { return [configFileName]; } return []; diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index be29423812314..67e04f4df2eaa 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -8,7 +8,7 @@ * https://github.com/Microsoft/TypeScript-Sublime-Plugin/blob/master/TypeScript%20Indent.tmPreferences * ------------------------------------------------------------------------------------------ */ -import { env, languages, commands, workspace, window, ExtensionContext, Memento, IndentAction, Diagnostic, DiagnosticCollection, Range, Disposable, Uri, MessageItem, TextEditor, DiagnosticSeverity, TextDocument, SnippetString } from 'vscode'; +import { env, languages, commands, workspace, window, ExtensionContext, Memento, IndentAction, Diagnostic, DiagnosticCollection, Range, Disposable, Uri, MessageItem, TextEditor, DiagnosticSeverity, TextDocument } from 'vscode'; // This must be the first statement otherwise modules might got loaded with // the wrong locale. @@ -48,7 +48,8 @@ import ImplementationCodeLensProvider from './features/implementationsCodeLensPr import * as ProjectStatus from './utils/projectStatus'; import TypingsStatus, { AtaProgressReporter } from './utils/typingsStatus'; import VersionStatus from './utils/versionStatus'; -import { getContributedTypeScriptServerPlugins, TypeScriptServerPlugin } from "./utils/plugins"; +import { getContributedTypeScriptServerPlugins, TypeScriptServerPlugin } from './utils/plugins'; +import { openOrCreateConfigFile, isImplicitProjectConfigFile } from './utils/tsconfig'; interface LanguageDescription { id: string; @@ -560,7 +561,7 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { } const { configFileName } = res.body; - if (configFileName && configFileName.indexOf('/dev/null/') !== 0) { + if (configFileName && !isImplicitProjectConfigFile(configFileName)) { return workspace.openTextDocument(configFileName) .then(doc => window.showTextDocument(doc, window.activeTextEditor ? window.activeTextEditor.viewColumn : undefined)); @@ -581,22 +582,7 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { }).then(selected => { switch (selected && selected.id) { case ProjectConfigAction.CreateConfig: - const configFile = Uri.file(path.join(rootPath, isTypeScriptProject ? 'tsconfig.json' : 'jsconfig.json')); - const col = window.activeTextEditor ? window.activeTextEditor.viewColumn : undefined; - return workspace.openTextDocument(configFile) - .then(doc => { - return window.showTextDocument(doc, col); - }, _ => { - return workspace.openTextDocument(configFile.with({ scheme: 'untitled' })) - .then(doc => window.showTextDocument(doc, col)) - .then(editor => { - if (editor.document.getText().length === 0) { - return editor.insertSnippet(new SnippetString('{\n\t$0\n}')) - .then(_ => editor); - } - return editor; - }); - }); + return openOrCreateConfigFile(isTypeScriptProject); case ProjectConfigAction.LearnMore: if (isTypeScriptProject) { diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 7a4581674e143..62b3c53f36932 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -990,7 +990,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } else if (event.event === 'configFileDiag') { this.host.configFileDiagnosticsReceived(event as Proto.ConfigFileDiagnosticEvent); } else if (event.event === 'telemetry') { - let telemetryData = (event as Proto.TelemetryEvent).body; + const telemetryData = (event as Proto.TelemetryEvent).body; this.dispatchTelemetryEvent(telemetryData); } else if (event.event === 'projectLanguageServiceState') { const data = (event as Proto.ProjectLanguageServiceStateEvent).body; diff --git a/extensions/typescript/src/utils/projectStatus.ts b/extensions/typescript/src/utils/projectStatus.ts index 8c9911531eb64..65fa9dd6c2f67 100644 --- a/extensions/typescript/src/utils/projectStatus.ts +++ b/extensions/typescript/src/utils/projectStatus.ts @@ -6,18 +6,15 @@ import * as vscode from 'vscode'; import { ITypescriptServiceClient } from '../typescriptService'; import { loadMessageBundle } from 'vscode-nls'; -import { dirname, join } from 'path'; +import { dirname } from 'path'; +import { openOrCreateConfigFile, isImplicitProjectConfigFile } from './tsconfig'; const localize = loadMessageBundle(); const selector = ['javascript', 'javascriptreact']; -interface Option extends vscode.MessageItem { - execute(): void; -} interface Hint { message: string; - options: Option[]; } interface ProjectHintedMap { @@ -45,29 +42,11 @@ class ExcludeHintItem { this._item.hide(); } - public show(configFileName: string, largeRoots: string, onExecute: () => void) { + public show(largeRoots: string) { this._currentHint = { message: largeRoots.length > 0 ? localize('hintExclude', "To enable project-wide JavaScript/TypeScript language features, exclude folders with many files, like: {0}", largeRoots) - : localize('hintExclude.generic', "To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on."), - options: [{ - title: localize('open', "Configure Excludes"), - execute: () => { - this._client.logTelemetry('js.hintProjectExcludes.accepted'); - onExecute(); - this._item.hide(); - - let configFileUri: vscode.Uri; - if (vscode.workspace.rootPath && dirname(configFileName).indexOf(vscode.workspace.rootPath) === 0) { - configFileUri = vscode.Uri.file(configFileName); - } else { - configFileUri = vscode.Uri.parse('untitled://' + join(vscode.workspace.rootPath || '', 'jsconfig.json')); - } - - return vscode.workspace.openTextDocument(configFileName) - .then(vscode.window.showTextDocument); - } - }] + : localize('hintExclude.generic', "To enable project-wide JavaScript/TypeScript language features, exclude large folders with source files that you do not work on.") }; this._item.tooltip = this._currentHint.message; this._item.text = localize('large.label', "Configure Excludes"); @@ -120,9 +99,8 @@ function createLargeProjectMonitorForProject(item: ExcludeHintItem, client: ITyp if (fileNames.length > fileLimit || res.body.languageServiceDisabled) { let largeRoots = computeLargeRoots(configFileName, fileNames).map(f => `'/${f}/'`).join(', '); - item.show(configFileName, largeRoots, () => { - projectHinted[configFileName] = true; - }); + item.show(largeRoots); + projectHinted[configFileName] = true; } else { item.hide(); } @@ -147,7 +125,17 @@ function createLargeProjectMonitorFromTypeScript(item: ExcludeHintItem, client: if (body.languageServiceEnabled) { item.hide(); } else { - item.show(body.projectName, '', () => { }); + const configFileName = body.projectName; + if (configFileName) { + if (!isImplicitProjectConfigFile(configFileName)) { + vscode.workspace.openTextDocument(configFileName) + .then(vscode.window.showTextDocument); + } else { + openOrCreateConfigFile(configFileName.match(/tsconfig\.?.*\.json/) !== null); + } + } + + item.show(''); } }); } @@ -157,12 +145,8 @@ export function create(client: ITypescriptServiceClient, isOpen: (path: string) let item = new ExcludeHintItem(client); toDispose.push(vscode.commands.registerCommand('js.projectStatus.command', () => { - let { message, options } = item.getCurrentHint(); - return vscode.window.showInformationMessage(message, ...options).then(selection => { - if (selection) { - return selection.execute(); - } - }); + let { message } = item.getCurrentHint(); + return vscode.window.showInformationMessage(message); })); if (client.apiVersion.has213Features()) { diff --git a/extensions/typescript/src/utils/tsconfig.ts b/extensions/typescript/src/utils/tsconfig.ts new file mode 100644 index 0000000000000..afa6b4b97eb07 --- /dev/null +++ b/extensions/typescript/src/utils/tsconfig.ts @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as vscode from 'vscode'; +import * as path from 'path'; + +export function isImplicitProjectConfigFile(configFileName: string) { + return configFileName.indexOf('/dev/null/') === 0; +} + +export function openOrCreateConfigFile( + isTypeScriptProject: boolean +): Thenable { + if (!vscode.workspace.rootPath) { + return Promise.resolve(null); + } + + const configFile = vscode.Uri.file(path.join(vscode.workspace.rootPath, isTypeScriptProject ? 'tsconfig.json' : 'jsconfig.json')); + const col = vscode.window.activeTextEditor ? vscode.window.activeTextEditor.viewColumn : undefined; + return vscode.workspace.openTextDocument(configFile) + .then(doc => { + return vscode.window.showTextDocument(doc, col); + }, _ => { + return vscode.workspace.openTextDocument(configFile.with({ scheme: 'untitled' })) + .then(doc => vscode.window.showTextDocument(doc, col)) + .then(editor => { + if (editor.document.getText().length === 0) { + return editor.insertSnippet(new vscode.SnippetString('{\n\t$0\n}')) + .then(_ => editor); + } + return editor; + }); + }); +} \ No newline at end of file diff --git a/extensions/typescript/src/utils/wireProtocol.ts b/extensions/typescript/src/utils/wireProtocol.ts index ad5d464304d35..799ec78da5239 100644 --- a/extensions/typescript/src/utils/wireProtocol.ts +++ b/extensions/typescript/src/utils/wireProtocol.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import stream = require('stream'); +import * as stream from 'stream'; const DefaultSize: number = 8192; const ContentLength: string = 'Content-Length: '; From 0da90fcc62c44d2ac99ce45c8f0fbd4ac53a95f2 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Tue, 6 Jun 2017 18:17:36 -0700 Subject: [PATCH 1580/2747] toggle comment across html nodes #27629 --- extensions/emmet/src/toggleComment.ts | 30 ++++++++++------ extensions/emmet/src/util.ts | 51 +++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 10 deletions(-) diff --git a/extensions/emmet/src/toggleComment.ts b/extensions/emmet/src/toggleComment.ts index 17aabeaca4484..b26e31ad1e264 100644 --- a/extensions/emmet/src/toggleComment.ts +++ b/extensions/emmet/src/toggleComment.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { getNode, isStyleSheet } from './util'; +import { getNode, isStyleSheet, getNodesInBetween } from './util'; import parse from '@emmetio/html-matcher'; import parseStylesheet from '@emmetio/css-parser'; import Node from '@emmetio/node'; @@ -58,19 +58,29 @@ export function toggleComment() { } function toggleCommentHTML(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): [vscode.Range[], vscode.Position, vscode.Position] { - let offset = document.offsetAt(selection.start); - let nodeToUpdate = getNode(rootNode, offset); - if (!nodeToUpdate) { + const selectionStart = document.offsetAt(selection.isReversed ? selection.active : selection.anchor); + const selectionEnd = document.offsetAt(selection.isReversed ? selection.anchor : selection.active); + + let startNode = getNode(rootNode, selectionStart, true); + let endNode = getNode(rootNode, selectionEnd, true); + + if (!startNode || !endNode) { return [[], null, null]; } - let rangesToUnComment = getRangesToUnCommentHTML(nodeToUpdate, document); - if (nodeToUpdate.type === 'comment') { + let allNodes: Node[] = getNodesInBetween(startNode, endNode); + let rangesToUnComment: vscode.Range[] = []; + + allNodes.forEach(node => { + rangesToUnComment = rangesToUnComment.concat(getRangesToUnCommentHTML(node, document)); + }); + + if (startNode.type === 'comment') { return [rangesToUnComment, null, null]; } - let positionForCommentStart = document.positionAt(nodeToUpdate.start); - let positionForCommentEnd = document.positionAt(nodeToUpdate.end); + let positionForCommentStart = document.positionAt(allNodes[0].start); + let positionForCommentEnd = document.positionAt(allNodes[allNodes.length - 1].end); return [rangesToUnComment, positionForCommentStart, positionForCommentEnd]; } @@ -95,8 +105,8 @@ function getRangesToUnCommentHTML(node: Node, document: vscode.TextDocument): vs function toggleCommentStylesheet(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): [vscode.Range[], vscode.Position, vscode.Position] { - let selectionStart = document.offsetAt(selection.anchor); - let selectionEnd = document.offsetAt(selection.active); + const selectionStart = document.offsetAt(selection.isReversed ? selection.active : selection.anchor); + const selectionEnd = document.offsetAt(selection.isReversed ? selection.anchor : selection.active); // If current node is commented, then uncomment and return let rangesToUnComment = getRangesToUnCommentStylesheet(rootNode, selectionStart, selectionEnd, document, true); diff --git a/extensions/emmet/src/util.ts b/extensions/emmet/src/util.ts index d6b80549fdfe2..bc3f3893e89fa 100644 --- a/extensions/emmet/src/util.ts +++ b/extensions/emmet/src/util.ts @@ -215,4 +215,55 @@ export function findPrevWord(propertyValue: string, pos: number): [number, numbe } return [newSelectionStart, newSelectionEnd]; +} + +export function getNodesInBetween(node1: Node, node2: Node): Node[] { + // Same node + if (sameNodes(node1, node2)) { + return [node1]; + } + + // Same parent + if (sameNodes(node1.parent, node2.parent)) { + return getNextSiblingsTillPosition(node1, node2.end); + } + + // node2 is ancestor of node1 + if (node2.start < node1.start) { + return [node2]; + } + + // node1 is ancestor of node2 + if (node2.start < node1.end) { + return [node1]; + } + + // Get the highest ancestor of node1 that should be commented + while (node1.parent && node1.parent.end < node2.start) { + node1 = node1.parent; + } + + // Get the highest ancestor of node2 that should be commented + while (node2.parent && node2.parent.start > node1.start) { + node2 = node2.parent; + } + + return getNextSiblingsTillPosition(node1, node2.end); +} + +function getNextSiblingsTillPosition(node: Node, position: number): Node[] { + let siblings: Node[] = []; + let currentNode = node; + while (currentNode && currentNode.start < position) { + siblings.push(currentNode); + currentNode = currentNode.nextSibling; + } + return siblings; +} + +export function sameNodes(node1: Node, node2: Node): boolean { + if (!node1 || !node2) { + return false; + } + return node1.start === node2.start && node1.end === node2.end; } \ No newline at end of file From 66212c6328645fbb6cd0433990340e1d1626aa8b Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Tue, 6 Jun 2017 19:17:15 -0700 Subject: [PATCH 1581/2747] toggle comment across css nodes #27629 --- extensions/emmet/src/toggleComment.ts | 50 ++++++++++----------------- 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/extensions/emmet/src/toggleComment.ts b/extensions/emmet/src/toggleComment.ts index b26e31ad1e264..75c0791342d97 100644 --- a/extensions/emmet/src/toggleComment.ts +++ b/extensions/emmet/src/toggleComment.ts @@ -108,45 +108,31 @@ function toggleCommentStylesheet(document: vscode.TextDocument, selection: vscod const selectionStart = document.offsetAt(selection.isReversed ? selection.active : selection.anchor); const selectionEnd = document.offsetAt(selection.isReversed ? selection.anchor : selection.active); - // If current node is commented, then uncomment and return - let rangesToUnComment = getRangesToUnCommentStylesheet(rootNode, selectionStart, selectionEnd, document, true); - if (rangesToUnComment.length > 0) { - return [rangesToUnComment, null, null]; - } - - // Find the node that needs to be commented - let nodeToComment = getNode(rootNode, selectionStart, true); - if (!nodeToComment) { - return [[], null, null]; - } - - // Uncomment children of current node and then comment the node - rangesToUnComment = getRangesToUnCommentStylesheet(rootNode, nodeToComment.start, nodeToComment.end, document, false); - let positionForCommentStart = document.positionAt(nodeToComment.start); - let positionForCommentEnd = document.positionAt(nodeToComment.end); - - return [rangesToUnComment, positionForCommentStart, positionForCommentEnd]; -} + let startNode = getNode(rootNode, selectionStart, true); + let endNode = getNode(rootNode, selectionEnd, true); + let rangesToUnComment: vscode.Range[] = []; -function getRangesToUnCommentStylesheet(rootNode: Node, selectionStart: number, selectionEnd: number, document: vscode.TextDocument, selectionInsideComment: boolean): vscode.Range[] { - if (!rootNode.comments || rootNode.comments.length === 0) { - return []; - } + let isFirstNodeCommented = false; - let rangesToUnComment = []; + // Uncomment the comments that intersect with the selection. rootNode.comments.forEach(comment => { - let foundComment = false; - if (selectionInsideComment) { - foundComment = comment.start <= selectionStart && comment.end >= selectionEnd; - } else { - foundComment = selectionStart <= comment.start && selectionEnd >= comment.end; + let commentStart = document.positionAt(comment.start); + let commentEnd = document.positionAt(comment.end); + + if (!isFirstNodeCommented) { + isFirstNodeCommented = (comment.start <= selectionStart && comment.end >= selectionEnd); } - if (foundComment) { + if (selection.contains(commentStart) || selection.contains(commentEnd) || (comment.start <= selectionStart && comment.end >= selectionEnd)) { rangesToUnComment.push(new vscode.Range(document.positionAt(comment.start), document.positionAt(comment.start + startCommentStylesheet.length))); rangesToUnComment.push(new vscode.Range(document.positionAt(comment.end), document.positionAt(comment.end - endCommentStylesheet.length))); } }); - return rangesToUnComment; -} \ No newline at end of file + let positionForCommentStart = isFirstNodeCommented ? null : document.positionAt(startNode.start); + let positionForCommentEnd = isFirstNodeCommented ? null : document.positionAt(endNode.end); + + return [rangesToUnComment, positionForCommentStart, positionForCommentEnd]; + + +} From 6f0d0c6bcc5d6558aa6813b766f090729b374ed6 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 7 Jun 2017 08:42:49 +0200 Subject: [PATCH 1582/2747] Fixes #21784: Add `editor.minimap.showSlider` to control the minimap's slider visibility --- .../editor/browser/viewParts/minimap/minimap.css | 9 ++++++--- .../editor/browser/viewParts/minimap/minimap.ts | 15 ++++++++++++++- src/vs/editor/common/config/commonEditorConfig.ts | 6 ++++++ src/vs/editor/common/config/editorOptions.ts | 10 ++++++++++ src/vs/monaco.d.ts | 6 ++++++ 5 files changed, 42 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.css b/src/vs/editor/browser/viewParts/minimap/minimap.css index 692577e87bdfb..f3692e7e4dcdb 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.css +++ b/src/vs/editor/browser/viewParts/minimap/minimap.css @@ -3,16 +3,19 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -.monaco-editor .minimap-slider { +/* START cover the case that slider is visible on mouseover */ +.monaco-editor .minimap.slider-mouseover .minimap-slider { opacity: 0; transition: opacity 100ms linear; } -.monaco-editor .minimap:hover .minimap-slider { +.monaco-editor .minimap.slider-mouseover:hover .minimap-slider { opacity: 1; } -.monaco-editor .minimap-slider.active { +.monaco-editor .minimap.slider-mouseover .minimap-slider.active { opacity: 1; } +/* END cover the case that slider is visible on mouseover */ + .monaco-editor .minimap-shadow-hidden { position: absolute; width: 0; diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index 46d8dde55d56e..2e9415eb221c1 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -73,6 +73,8 @@ class MinimapOptions { public readonly renderMinimap: RenderMinimap; + public readonly showSlider: 'always' | 'mouseover'; + public readonly pixelRatio: number; public readonly lineHeight: number; @@ -107,8 +109,10 @@ class MinimapOptions { constructor(configuration: editorCommon.IConfiguration) { const pixelRatio = configuration.editor.pixelRatio; const layoutInfo = configuration.editor.layoutInfo; + const viewInfo = configuration.editor.viewInfo; this.renderMinimap = layoutInfo.renderMinimap | 0; + this.showSlider = viewInfo.minimap.showSlider; this.pixelRatio = pixelRatio; this.lineHeight = configuration.editor.lineHeight; this.minimapWidth = layoutInfo.minimapWidth; @@ -123,6 +127,7 @@ class MinimapOptions { public equals(other: MinimapOptions): boolean { return (this.renderMinimap === other.renderMinimap + && this.showSlider === other.showSlider && this.pixelRatio === other.pixelRatio && this.lineHeight === other.lineHeight && this.minimapWidth === other.minimapWidth @@ -440,7 +445,7 @@ export class Minimap extends ViewPart { this._domNode = createFastDomNode(document.createElement('div')); PartFingerprints.write(this._domNode, PartFingerprint.Minimap); - this._domNode.setClassName('minimap'); + this._domNode.setClassName(this._getMinimapDomNodeClassName()); this._domNode.setPosition('absolute'); this._domNode.setAttribute('role', 'presentation'); this._domNode.setAttribute('aria-hidden', 'true'); @@ -549,6 +554,13 @@ export class Minimap extends ViewPart { super.dispose(); } + private _getMinimapDomNodeClassName(): string { + if (this._options.showSlider === 'always') { + return 'minimap slider-always'; + } + return 'minimap slider-mouseover'; + } + public getDomNode(): FastDomNode { return this._domNode; } @@ -585,6 +597,7 @@ export class Minimap extends ViewPart { this._lastRenderData = null; this._buffers = null; this._applyLayout(); + this._domNode.setClassName(this._getMinimapDomNodeClassName()); return true; } diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 310a51d8538ad..87ecf2fdb3045 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -254,6 +254,12 @@ const editorConfiguration: IConfigurationNode = { 'default': EDITOR_DEFAULTS.viewInfo.minimap.enabled, 'description': nls.localize('minimap.enabled', "Controls if the minimap is shown") }, + 'editor.minimap.showSlider': { + 'type': 'string', + 'enum': ['always', 'mouseover'], + 'default': EDITOR_DEFAULTS.viewInfo.minimap.showSlider, + 'description': nls.localize('minimap.showSlider', "Controls whether the minimap slider is automatically hidden.") + }, 'editor.minimap.renderCharacters': { 'type': 'boolean', 'default': EDITOR_DEFAULTS.viewInfo.minimap.renderCharacters, diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 2daf0ddac8f2e..89378c65bdcf2 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -97,6 +97,11 @@ export interface IEditorMinimapOptions { * Defaults to false. */ enabled?: boolean; + /** + * Control the rendering of the minimap slider. + * Defaults to 'mouseover'. + */ + showSlider?: 'always' | 'mouseover'; /** * Render the actual text on a line (as opposed to color blocks). * Defaults to true. @@ -691,6 +696,7 @@ export interface InternalEditorScrollbarOptions { export interface InternalEditorMinimapOptions { readonly enabled: boolean; + readonly showSlider: 'always' | 'mouseover'; readonly renderCharacters: boolean; readonly maxColumn: number; } @@ -1028,6 +1034,7 @@ export class InternalEditorOptions { private static _equalsMinimapOptions(a: InternalEditorMinimapOptions, b: InternalEditorMinimapOptions): boolean { return ( a.enabled === b.enabled + && a.showSlider === b.showSlider && a.renderCharacters === b.renderCharacters && a.maxColumn === b.maxColumn ); @@ -1474,6 +1481,7 @@ export class EditorOptionsValidator { } return { enabled: _boolean(opts.enabled, defaults.enabled), + showSlider: _stringSet<'always' | 'mouseover'>(opts.showSlider, defaults.showSlider, ['always', 'mouseover']), renderCharacters: _boolean(opts.renderCharacters, defaults.renderCharacters), maxColumn: _clampedInt(opts.maxColumn, defaults.maxColumn, 1, 10000), }; @@ -1689,6 +1697,7 @@ export class InternalEditorOptionsFactory { minimap: { enabled: (accessibilityIsOn ? false : opts.viewInfo.minimap.enabled), // DISABLED WHEN SCREEN READER IS ATTACHED renderCharacters: opts.viewInfo.minimap.renderCharacters, + showSlider: opts.viewInfo.minimap.showSlider, maxColumn: opts.viewInfo.minimap.maxColumn }, fixedOverflowWidgets: opts.viewInfo.fixedOverflowWidgets @@ -2118,6 +2127,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { }, minimap: { enabled: true, + showSlider: 'mouseover', renderCharacters: true, maxColumn: 120 }, diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 3fad661a07f8d..cdb3e52fee3d4 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2655,6 +2655,11 @@ declare module monaco.editor { * Defaults to false. */ enabled?: boolean; + /** + * Control the rendering of the minimap slider. + * Defaults to 'mouseover'. + */ + showSlider?: 'always' | 'mouseover'; /** * Render the actual text on a line (as opposed to color blocks). * Defaults to true. @@ -3177,6 +3182,7 @@ declare module monaco.editor { export interface InternalEditorMinimapOptions { readonly enabled: boolean; + readonly showSlider: 'always' | 'mouseover'; readonly renderCharacters: boolean; readonly maxColumn: number; } From ea1b253767bd52c4667c43e84ac7147cb0b114d4 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 7 Jun 2017 10:03:34 +0200 Subject: [PATCH 1583/2747] debt - improve usage of untitled editor service --- .../electron-browser/mainThreadDocuments.ts | 18 +++-- .../common/editor/untitledEditorInput.ts | 2 +- .../parts/backup/common/backupModelTracker.ts | 5 +- .../parts/backup/common/backupRestorer.ts | 11 +-- .../parts/files/browser/fileActions.ts | 37 ++++++--- .../services/search/node/searchService.ts | 2 +- .../textfile/common/textFileService.ts | 51 ++++++------ .../common/textModelResolverService.ts | 3 +- .../untitled/common/untitledEditorService.ts | 78 +++++++++++++++---- .../test/common/editor/untitledEditor.test.ts | 63 ++++++++++++++- 10 files changed, 196 insertions(+), 74 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts b/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts index 13e61675fa4c3..0734061ff1723 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts @@ -234,15 +234,17 @@ export class MainThreadDocuments extends MainThreadDocumentsShape { }, err => this._doCreateUntitled(asFileUri).then(resource => !!resource)); } - private _doCreateUntitled(uri?: URI, modeId?: string, initialValue?: string): TPromise { - let input = this._untitledEditorService.createOrGet(uri, modeId, initialValue); - return input.resolve(true).then(model => { - if (!this._modelIsSynced[input.getResource().toString()]) { - throw new Error(`expected URI ${input.getResource().toString()} to have come to LIFE`); + private _doCreateUntitled(resource?: URI, modeId?: string, initialValue?: string): TPromise { + return this._untitledEditorService.loadOrCreate({ resource, modeId, initialValue }).then(model => { + const resource = model.getResource(); + + if (!this._modelIsSynced[resource.toString()]) { + throw new Error(`expected URI ${resource.toString()} to have come to LIFE`); } - return this._proxy.$acceptDirtyStateChanged(input.getResource().toString(), true); // mark as dirty - }).then(() => { - return input.getResource(); + + this._proxy.$acceptDirtyStateChanged(resource.toString(), true); // mark as dirty + + return resource; }); } diff --git a/src/vs/workbench/common/editor/untitledEditorInput.ts b/src/vs/workbench/common/editor/untitledEditorInput.ts index 09cb75038a996..0d27f28551257 100644 --- a/src/vs/workbench/common/editor/untitledEditorInput.ts +++ b/src/vs/workbench/common/editor/untitledEditorInput.ts @@ -155,7 +155,7 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport } } - public resolve(refresh?: boolean): TPromise { + public resolve(): TPromise { // Join a model resolve if we have had one before if (this.modelResolve) { diff --git a/src/vs/workbench/parts/backup/common/backupModelTracker.ts b/src/vs/workbench/parts/backup/common/backupModelTracker.ts index c437b4d70f875..fa7bb0e535647 100644 --- a/src/vs/workbench/parts/backup/common/backupModelTracker.ts +++ b/src/vs/workbench/parts/backup/common/backupModelTracker.ts @@ -80,9 +80,8 @@ export class BackupModelTracker implements IWorkbenchContribution { } private onUntitledModelChanged(resource: Uri): void { - const input = this.untitledEditorService.get(resource); - if (input.isDirty()) { - input.resolve().then(model => this.backupFileService.backupResource(resource, model.getValue(), model.getVersionId())).done(null, errors.onUnexpectedError); + if (this.untitledEditorService.isDirty(resource)) { + this.untitledEditorService.loadOrCreate({ resource }).then(model => this.backupFileService.backupResource(resource, model.getValue(), model.getVersionId())).done(null, errors.onUnexpectedError); } else { this.discardBackup(resource); } diff --git a/src/vs/workbench/parts/backup/common/backupRestorer.ts b/src/vs/workbench/parts/backup/common/backupRestorer.ts index 77603e199d9c0..3b64fdda7ad54 100644 --- a/src/vs/workbench/parts/backup/common/backupRestorer.ts +++ b/src/vs/workbench/parts/backup/common/backupRestorer.ts @@ -7,7 +7,7 @@ import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; +import { IUntitledEditorService, UNTITLED_SCHEMA } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { IPartService } from 'vs/workbench/services/part/common/partService'; @@ -17,6 +17,7 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { Position, IResourceInput, IUntitledResourceInput } from 'vs/platform/editor/common/editor'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; +import { Schemas } from "vs/base/common/network"; export class BackupRestorer implements IWorkbenchContribution { @@ -67,10 +68,10 @@ export class BackupRestorer implements IWorkbenchContribution { backups.forEach(backup => { if (stacks.isOpen(backup)) { - if (backup.scheme === 'file') { + if (backup.scheme === Schemas.file) { restorePromises.push(this.textFileService.models.loadOrCreate(backup).then(null, () => unresolved.push(backup))); - } else if (backup.scheme === 'untitled') { - restorePromises.push(this.untitledEditorService.get(backup).resolve().then(null, () => unresolved.push(backup))); + } else if (backup.scheme === UNTITLED_SCHEMA) { + restorePromises.push(this.untitledEditorService.loadOrCreate({ resource: backup }).then(null, () => unresolved.push(backup))); } } else { unresolved.push(backup); @@ -92,7 +93,7 @@ export class BackupRestorer implements IWorkbenchContribution { private resolveInput(resource: URI, index: number, hasOpenedEditors: boolean): IResourceInput | IUntitledResourceInput { const options = { pinned: true, preserveFocus: true, inactive: index > 0 || hasOpenedEditors }; - if (resource.scheme === 'untitled' && !BackupRestorer.UNTITLED_REGEX.test(resource.fsPath)) { + if (resource.scheme === UNTITLED_SCHEMA && !BackupRestorer.UNTITLED_REGEX.test(resource.fsPath)) { // TODO@Ben debt: instead of guessing if an untitled file has an associated file path or not // this information should be provided by the backup service and stored as meta data within return { filePath: resource.fsPath, options }; diff --git a/src/vs/workbench/parts/files/browser/fileActions.ts b/src/vs/workbench/parts/files/browser/fileActions.ts index ede0811523050..98e8c094dddc3 100644 --- a/src/vs/workbench/parts/files/browser/fileActions.ts +++ b/src/vs/workbench/parts/files/browser/fileActions.ts @@ -1354,7 +1354,7 @@ export abstract class BaseSaveFileAction extends BaseActionWithErrorReporting { if (this.isSaveAs() || source.scheme === 'untitled') { let encodingOfSource: string; if (source.scheme === 'untitled') { - encodingOfSource = this.untitledEditorService.get(source).getEncoding(); + encodingOfSource = this.untitledEditorService.getEncoding(source); } else if (source.scheme === 'file') { const textModel = this.textFileService.models.get(source); encodingOfSource = textModel && textModel.getEncoding(); // text model can be null e.g. if this is a binary file! @@ -1494,18 +1494,33 @@ export abstract class BaseSaveAllAction extends BaseActionWithErrorReporting { // Store some properties per untitled file to restore later after save is completed const mapUntitledToProperties: { [resource: string]: { encoding: string; indexInGroups: number[]; activeInGroups: boolean[] } } = Object.create(null); - this.textFileService.getDirty() - .filter(r => r.scheme === 'untitled') // All untitled resources - .map(r => this.untitledEditorService.get(r)) // Mapped to their inputs - .filter(input => !!input) // If possible :) - .forEach(input => { - mapUntitledToProperties[input.getResource().toString()] = { - encoding: input.getEncoding(), - indexInGroups: stacks.groups.map(g => g.indexOf(input)), - activeInGroups: stacks.groups.map(g => g.isActive(input)) - }; + this.untitledEditorService.getDirty().forEach(resource => { + const activeInGroups: boolean[] = []; + const indexInGroups: number[] = []; + const encoding = this.untitledEditorService.getEncoding(resource); + + // For each group + stacks.groups.forEach((group, groupIndex) => { + + // Find out if editor is active in group + const activeEditor = group.activeEditor; + const activeResource = toResource(activeEditor, { supportSideBySide: true }); + activeInGroups[groupIndex] = (activeResource && activeResource.toString() === resource.toString()); + + // Find index of editor in group + indexInGroups[groupIndex] = -1; + group.getEditors().forEach((editor, editorIndex) => { + const editorResource = toResource(editor, { supportSideBySide: true }); + if (editorResource && editorResource.toString() === resource.toString()) { + indexInGroups[groupIndex] = editorIndex; + return; + } + }); }); + mapUntitledToProperties[resource.toString()] = { encoding, indexInGroups, activeInGroups }; + }); + // Save all return this.textFileService.saveAll(this.getSaveAllArguments(context)).then(results => { diff --git a/src/vs/workbench/services/search/node/searchService.ts b/src/vs/workbench/services/search/node/searchService.ts index ac68c6c4e285f..518f269d7b73b 100644 --- a/src/vs/workbench/services/search/node/searchService.ts +++ b/src/vs/workbench/services/search/node/searchService.ts @@ -120,7 +120,7 @@ export class SearchService implements ISearchService { // Support untitled files if (resource.scheme === 'untitled') { - if (!this.untitledEditorService.get(resource)) { + if (!this.untitledEditorService.exists(resource)) { return; } } diff --git a/src/vs/workbench/services/textfile/common/textFileService.ts b/src/vs/workbench/services/textfile/common/textFileService.ts index 96626c1b4d8b7..f8cc7e2f2f822 100644 --- a/src/vs/workbench/services/textfile/common/textFileService.ts +++ b/src/vs/workbench/services/textfile/common/textFileService.ts @@ -24,12 +24,13 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; +import { IUntitledEditorService, UNTITLED_SCHEMA } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { UntitledEditorModel } from 'vs/workbench/common/editor/untitledEditorModel'; import { TextFileEditorModelManager } from 'vs/workbench/services/textfile/common/textFileEditorModelManager'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { ResourceMap } from 'vs/base/common/map'; +import { Schemas } from "vs/base/common/network"; export interface IBackupResult { didBackup: boolean; @@ -222,9 +223,9 @@ export abstract class TextFileService implements ITextFileService { const filesToBackup: ITextFileEditorModel[] = []; const untitledToBackup: URI[] = []; dirtyToBackup.forEach(s => { - if (s.scheme === 'file') { + if (s.scheme === Schemas.file) { filesToBackup.push(textFileEditorModelManager.get(s)); - } else if (s.scheme === 'untitled') { + } else if (s.scheme === UNTITLED_SCHEMA) { untitledToBackup.push(s); } }); @@ -238,9 +239,9 @@ export abstract class TextFileService implements ITextFileService { return TPromise.join(dirtyFileModels.map(model => this.backupFileService.backupResource(model.getResource(), model.getValue(), model.getVersionId()))).then(results => { // Handle untitled resources - const untitledModelPromises = untitledResources.map(untitledResource => this.untitledEditorService.get(untitledResource)) - .filter(untitled => !!untitled) - .map(untitled => untitled.resolve()); + const untitledModelPromises = untitledResources + .filter(untitled => this.untitledEditorService.exists(untitled)) + .map(untitled => this.untitledEditorService.loadOrCreate({ resource: untitled })); return TPromise.join(untitledModelPromises).then(untitledModels => { const untitledBackupPromises = untitledModels.map(model => { @@ -358,12 +359,7 @@ export abstract class TextFileService implements ITextFileService { const dirty = this.getDirtyFileModels(resources).map(m => m.getResource()); // Add untitled ones - if (!resources) { - dirty.push(...this.untitledEditorService.getDirty()); - } else { - const dirtyUntitled = resources.map(r => this.untitledEditorService.get(r)).filter(u => u && u.isDirty()).map(u => u.getResource()); - dirty.push(...dirtyUntitled); - } + dirty.push(...this.untitledEditorService.getDirty(resources)); return dirty; } @@ -382,7 +378,7 @@ export abstract class TextFileService implements ITextFileService { public save(resource: URI, options?: ISaveOptions): TPromise { // Run a forced save if we detect the file is not dirty so that save participants can still run - if (options && options.force && resource.scheme === 'file' && !this.isDirty(resource)) { + if (options && options.force && resource.scheme === Schemas.file && !this.isDirty(resource)) { const model = this._models.get(resource); if (model) { model.save({ force: true, reason: SaveReason.EXPLICIT }).then(() => !model.isDirty()); @@ -408,9 +404,9 @@ export abstract class TextFileService implements ITextFileService { const filesToSave: URI[] = []; const untitledToSave: URI[] = []; toSave.forEach(s => { - if (s.scheme === 'file') { + if (s.scheme === Schemas.file) { filesToSave.push(s); - } else if ((Array.isArray(arg1) || arg1 === true /* includeUntitled */) && s.scheme === 'untitled') { + } else if ((Array.isArray(arg1) || arg1 === true /* includeUntitled */) && s.scheme === UNTITLED_SCHEMA) { untitledToSave.push(s); } }); @@ -426,18 +422,18 @@ export abstract class TextFileService implements ITextFileService { // Preflight for untitled to handle cancellation from the dialog const targetsForUntitled: URI[] = []; for (let i = 0; i < untitledResources.length; i++) { - const untitled = this.untitledEditorService.get(untitledResources[i]); - if (untitled) { + const untitled = untitledResources[i]; + if (this.untitledEditorService.exists(untitled)) { let targetPath: string; // Untitled with associated file path don't need to prompt - if (this.untitledEditorService.hasAssociatedFilePath(untitled.getResource())) { - targetPath = untitled.getResource().fsPath; + if (this.untitledEditorService.hasAssociatedFilePath(untitled)) { + targetPath = untitled.fsPath; } // Otherwise ask user else { - targetPath = this.promptForPath(this.suggestFileName(untitledResources[i])); + targetPath = this.promptForPath(this.suggestFileName(untitled)); if (!targetPath) { return TPromise.as({ results: [...fileResources, ...untitledResources].map(r => { @@ -529,7 +525,7 @@ export abstract class TextFileService implements ITextFileService { // Get to target resource if (!target) { let dialogPath = resource.fsPath; - if (resource.scheme === 'untitled') { + if (resource.scheme === UNTITLED_SCHEMA) { dialogPath = this.suggestFileName(resource); } @@ -556,13 +552,10 @@ export abstract class TextFileService implements ITextFileService { // Retrieve text model from provided resource if any let modelPromise: TPromise = TPromise.as(null); - if (resource.scheme === 'file') { + if (resource.scheme === Schemas.file) { modelPromise = TPromise.as(this._models.get(resource)); - } else if (resource.scheme === 'untitled') { - const untitled = this.untitledEditorService.get(resource); - if (untitled) { - modelPromise = untitled.resolve(); - } + } else if (resource.scheme === UNTITLED_SCHEMA && this.untitledEditorService.exists(resource)) { + modelPromise = this.untitledEditorService.loadOrCreate({ resource }); } return modelPromise.then(model => { @@ -623,10 +616,10 @@ export abstract class TextFileService implements ITextFileService { private suggestFileName(untitledResource: URI): string { const workspace = this.contextService.getWorkspace(); if (workspace) { - return URI.file(paths.join(workspace.resource.fsPath, this.untitledEditorService.get(untitledResource).suggestFileName())).fsPath; + return URI.file(paths.join(workspace.resource.fsPath, this.untitledEditorService.suggestFileName(untitledResource))).fsPath; } - return this.untitledEditorService.get(untitledResource).suggestFileName(); + return this.untitledEditorService.suggestFileName(untitledResource); } public revert(resource: URI, options?: IRevertOptions): TPromise { diff --git a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts index e23296a97596e..f3c7ba8d7a09b 100644 --- a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts +++ b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts @@ -116,8 +116,7 @@ export class TextModelResolverService implements ITextModelResolverService { // Untitled Schema: go through cached input // TODO ImmortalReference is a hack if (resource.scheme === UNTITLED_SCHEMA) { - return this.untitledEditorService.createOrGet(resource).resolve() - .then(model => new ImmortalReference(model)); + return this.untitledEditorService.loadOrCreate({ resource }).then(model => new ImmortalReference(model)); } // InMemory Schema: go through model service cache diff --git a/src/vs/workbench/services/untitled/common/untitledEditorService.ts b/src/vs/workbench/services/untitled/common/untitledEditorService.ts index 092460d9daceb..264aa9275d42f 100644 --- a/src/vs/workbench/services/untitled/common/untitledEditorService.ts +++ b/src/vs/workbench/services/untitled/common/untitledEditorService.ts @@ -12,11 +12,20 @@ import { IFilesConfiguration } from 'vs/platform/files/common/files'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import Event, { Emitter, once } from 'vs/base/common/event'; import { ResourceMap } from 'vs/base/common/map'; +import { TPromise } from "vs/base/common/winjs.base"; +import { UntitledEditorModel } from "vs/workbench/common/editor/untitledEditorModel"; +import { Schemas } from "vs/base/common/network"; export const IUntitledEditorService = createDecorator('untitledEditorService'); export const UNTITLED_SCHEMA = 'untitled'; +export interface IModelLoadOrCreateOptions { + resource?: URI; + modeId?: string; + initialValue?: string; +} + export interface IUntitledEditorService { _serviceBrand: any; @@ -42,19 +51,14 @@ export interface IUntitledEditorService { onDidDisposeModel: Event; /** - * Returns the untitled editor input matching the provided resource. - */ - get(resource: URI): UntitledEditorInput; - - /** - * Returns all untitled editor inputs. + * Returns if an untitled resource with the given URI exists. */ - getAll(resources?: URI[]): UntitledEditorInput[]; + exists(resource: URI): boolean; /** * Returns dirty untitled editors as resource URIs. */ - getDirty(): URI[]; + getDirty(resources?: URI[]): URI[]; /** * Returns true iff the provided resource is dirty. @@ -75,10 +79,29 @@ export interface IUntitledEditorService { */ createOrGet(resource?: URI, modeId?: string, initialValue?: string): UntitledEditorInput; + /** + * Creates a new untitled model with the optional resource URI or returns an existing one + * if the provided resource exists already as untitled model. + * + * It is valid to pass in a file resource. In that case the path will be used as identifier. + * The use case is to be able to create a new file with a specific path with VSCode. + */ + loadOrCreate(options: IModelLoadOrCreateOptions): TPromise; + /** * A check to find out if a untitled resource has a file path associated or not. */ hasAssociatedFilePath(resource: URI): boolean; + + /** + * Suggests a filename for the given untitled resource if it is known. + */ + suggestFileName(resource: URI): string; + + /** + * Get the configured encoding for the given untitled resource if any. + */ + getEncoding(resource: URI): string; } export class UntitledEditorService implements IUntitledEditorService { @@ -119,11 +142,11 @@ export class UntitledEditorService implements IUntitledEditorService { return this._onDidChangeEncoding.event; } - public get(resource: URI): UntitledEditorInput { + protected get(resource: URI): UntitledEditorInput { return this.mapResourceToInput.get(resource); } - public getAll(resources?: URI[]): UntitledEditorInput[] { + protected getAll(resources?: URI[]): UntitledEditorInput[] { if (resources) { return arrays.coalesce(resources.map(r => this.get(r))); } @@ -131,6 +154,10 @@ export class UntitledEditorService implements IUntitledEditorService { return this.mapResourceToInput.values(); } + public exists(resource: URI): boolean { + return this.mapResourceToInput.has(resource); + } + public revertAll(resources?: URI[], force?: boolean): URI[] { const reverted: URI[] = []; @@ -153,16 +180,29 @@ export class UntitledEditorService implements IUntitledEditorService { return input && input.isDirty(); } - public getDirty(): URI[] { - return this.mapResourceToInput.values() + public getDirty(resources?: URI[]): URI[] { + let inputs: UntitledEditorInput[]; + if (resources) { + inputs = resources.map(r => this.get(r)).filter(i => !!i); + } else { + inputs = this.mapResourceToInput.values(); + } + + return inputs .filter(i => i.isDirty()) .map(i => i.getResource()); } + public loadOrCreate(options: IModelLoadOrCreateOptions = Object.create(null)): TPromise { + return this.createOrGet(options.resource, options.modeId, options.initialValue).resolve(); + } + public createOrGet(resource?: URI, modeId?: string, initialValue?: string): UntitledEditorInput { + + // Massage resource if it comes with a file:// scheme let hasAssociatedFilePath = false; if (resource) { - hasAssociatedFilePath = (resource.scheme === 'file'); + hasAssociatedFilePath = (resource.scheme === Schemas.file); resource = resource.with({ scheme: UNTITLED_SCHEMA }); // ensure we have the right scheme if (hasAssociatedFilePath) { @@ -237,6 +277,18 @@ export class UntitledEditorService implements IUntitledEditorService { return this.mapResourceToAssociatedFilePath.has(resource); } + public suggestFileName(resource: URI): string { + const input = this.get(resource); + + return input ? input.suggestFileName() : void 0; + } + + public getEncoding(resource: URI): string { + const input = this.get(resource); + + return input ? input.getEncoding() : void 0; + } + public dispose(): void { this._onDidChangeContent.dispose(); this._onDidChangeDirty.dispose(); diff --git a/src/vs/workbench/test/common/editor/untitledEditor.test.ts b/src/vs/workbench/test/common/editor/untitledEditor.test.ts index c02f5c19483a1..d7ba2043f807d 100644 --- a/src/vs/workbench/test/common/editor/untitledEditor.test.ts +++ b/src/vs/workbench/test/common/editor/untitledEditor.test.ts @@ -16,10 +16,22 @@ import { workbenchInstantiationService } from 'vs/workbench/test/workbenchTestSe import { UntitledEditorModel } from 'vs/workbench/common/editor/untitledEditorModel'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl'; +import { UntitledEditorInput } from "vs/workbench/common/editor/untitledEditorInput"; + +export class TestUntitledEditorService extends UntitledEditorService { + + public get(resource: URI): UntitledEditorInput { + return super.get(resource); + } + + public getAll(resources?: URI[]): UntitledEditorInput[] { + return super.getAll(resources); + } +} class ServiceAccessor { constructor( - @IUntitledEditorService public untitledEditorService: UntitledEditorService, + @IUntitledEditorService public untitledEditorService: TestUntitledEditorService, @IModeService public modeService: ModeServiceImpl, @IConfigurationService public testConfigurationService: TestConfigurationService) { } @@ -47,6 +59,9 @@ suite('Workbench - Untitled Editor', () => { const input1 = service.createOrGet(); assert.equal(input1, service.createOrGet(input1.getResource())); + assert.ok(service.exists(input1.getResource())); + assert.ok(!service.exists(URI.file('testing'))); + const input2 = service.createOrGet(); // get() / getAll() @@ -70,6 +85,8 @@ suite('Workbench - Untitled Editor', () => { assert.ok(service.isDirty(input2.getResource())); assert.equal(service.getDirty()[0].toString(), input2.getResource().toString()); + assert.equal(service.getDirty([input2.getResource()])[0].toString(), input2.getResource().toString()); + assert.equal(service.getDirty([input1.getResource()]).length, 0); service.revertAll(); assert.equal(service.getAll().length, 0); @@ -78,6 +95,8 @@ suite('Workbench - Untitled Editor', () => { input2.dispose(); + assert.ok(!service.exists(input2.getResource())); + done(); }); @@ -113,6 +132,48 @@ suite('Workbench - Untitled Editor', () => { }); }); + test('Untitled via loadOrCreate', function (done) { + const service = accessor.untitledEditorService; + service.loadOrCreate().then(model1 => { + model1.textEditorModel.setValue('foo bar'); + assert.ok(model1.isDirty()); + + model1.textEditorModel.setValue(''); + assert.ok(!model1.isDirty()); + + return service.loadOrCreate({ initialValue: 'Hello World' }).then(model2 => { + assert.equal(model2.getValue(), 'Hello World'); + + const input = service.createOrGet(); + + return service.loadOrCreate({ resource: input.getResource() }).then(model3 => { + assert.equal(model3.getResource().toString(), input.getResource().toString()); + + const file = URI.file(join('C:\\', '/foo/file44.txt')); + return service.loadOrCreate({ resource: file }).then(model4 => { + assert.ok(service.hasAssociatedFilePath(model4.getResource())); + assert.ok(model4.isDirty()); + + model1.dispose(); + model2.dispose(); + model3.dispose(); + model4.dispose(); + input.dispose(); + + done(); + }); + }); + }); + }); + }); + + test('Untitled suggest name', function () { + const service = accessor.untitledEditorService; + const input = service.createOrGet(); + + assert.ok(service.suggestFileName(input.getResource())); + }); + test('Untitled with associated path remains dirty when content gets empty', function (done) { const service = accessor.untitledEditorService; const file = URI.file(join('C:\\', '/foo/file.txt')); From 93ea9d1ca92fdf4b1282882a9c7ca7125ee2b0bd Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 7 Jun 2017 10:03:56 +0200 Subject: [PATCH 1584/2747] more improvements for #25145 --- src/vs/platform/quickOpen/common/quickOpen.ts | 5 + .../parts/quickopen/quickOpenController.ts | 7 +- src/vs/workbench/electron-browser/actions.ts | 178 +++++++++++++++--- .../electron-browser/main.contribution.ts | 24 +-- .../electron-browser/windowPicker.ts | 120 ------------ .../workbench/electron-browser/workbench.ts | 2 +- 6 files changed, 165 insertions(+), 171 deletions(-) delete mode 100644 src/vs/workbench/electron-browser/windowPicker.ts diff --git a/src/vs/platform/quickOpen/common/quickOpen.ts b/src/vs/platform/quickOpen/common/quickOpen.ts index 6cc6781e1909f..160539465d55b 100644 --- a/src/vs/platform/quickOpen/common/quickOpen.ts +++ b/src/vs/platform/quickOpen/common/quickOpen.ts @@ -57,6 +57,11 @@ export interface IPickOptions { * an optional flag to not close the picker on focus lost */ ignoreFocusLost?: boolean; + + /** + * enables quick navigate in the picker to open an element without typing + */ + quickNavigateConfiguration?: IQuickNavigateConfiguration; } export interface IInputOptions { diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index 7c8a7df4a140c..0bf51c9c1d76e 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -73,6 +73,7 @@ interface IInternalPickOptions { matchOnDescription?: boolean; matchOnDetail?: boolean; ignoreFocusLost?: boolean; + quickNavigateConfiguration?: IQuickNavigateConfiguration; onDidType?: (value: string) => any; } @@ -155,8 +156,8 @@ export class QuickOpenController extends Component implements IQuickOpenService this.quickOpenWidget.navigate(next, quickNavigate); } - if (!quickNavigate && this.pickOpenWidget) { - this.pickOpenWidget.navigate(next); // quick-navigate is only supported in quick open, not picker + if (this.pickOpenWidget) { + this.pickOpenWidget.navigate(next, quickNavigate); } } @@ -446,7 +447,7 @@ export class QuickOpenController extends Component implements IQuickOpenService // Set input if (!this.pickOpenWidget.isVisible()) { - this.pickOpenWidget.show(model, { autoFocus }); + this.pickOpenWidget.show(model, { autoFocus, quickNavigateConfiguration: options.quickNavigateConfiguration }); } else { this.pickOpenWidget.setInput(model, autoFocus); } diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index 90bf406fd5753..8848026edc5b1 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -34,8 +34,7 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IPartService, Parts, Position as SidebarPosition } from 'vs/workbench/services/part/common/partService'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; -import { QuickOpenAction } from "vs/workbench/browser/quickopen"; -import { SWITCH_WINDOWS_PREFIX } from "vs/workbench/electron-browser/windowPicker"; +import { IKeybindingService } from "vs/platform/keybinding/common/keybinding"; import * as os from 'os'; import { webFrame } from 'electron'; @@ -82,20 +81,6 @@ export class CloseWindowAction extends Action { } } -export class SwitchWindow extends QuickOpenAction { - - static ID = 'workbench.action.switchWindow'; - static LABEL = nls.localize('switchWindow', "Switch Window..."); - - constructor( - id: string, - label: string, - @IQuickOpenService quickOpenService: IQuickOpenService - ) { - super(id, label, SWITCH_WINDOWS_PREFIX, quickOpenService); - } -} - export class CloseFolderAction extends Action { static ID = 'workbench.action.closeFolder'; @@ -570,29 +555,115 @@ export class ReloadWindowAction extends Action { } } -export class OpenRecentAction extends Action { +export abstract class BaseSwitchWindow extends Action { - public static ID = 'workbench.action.openRecent'; - public static LABEL = nls.localize('openRecent', "Open Recent"); + constructor( + id: string, + label: string, + private windowsService: IWindowsService, + private windowService: IWindowService, + private quickOpenService: IQuickOpenService, + private keybindingService: IKeybindingService + ) { + super(id, label); + } + + protected abstract isQuickNavigate(): boolean; + + public run(): TPromise { + const currentWindowId = this.windowService.getCurrentWindowId(); + + return this.windowsService.getWindows().then(workspaces => { + const placeHolder = nls.localize('switchWindowPlaceHolder', "Select a window to switch to"); + const picks = workspaces.map(win => ({ + resource: win.filename ? URI.file(win.filename) : win.path, + isFolder: !win.filename && !!win.path, + label: win.title, + description: (currentWindowId === win.id) ? nls.localize('current', "Current Window") : void 0, + run: () => { + setTimeout(() => { + // Bug: somehow when not running this code in a timeout, it is not possible to use this picker + // with quick navigate keys (not able to trigger quick navigate once running it once). + this.windowsService.showWindow(win.id).done(null, errors.onUnexpectedError); + }); + } + } as IFilePickOpenEntry)); + + this.quickOpenService.pick(picks, { + autoFocus: { autoFocusFirstEntry: true }, + placeHolder, + quickNavigateConfiguration: this.isQuickNavigate() ? { keybindings: this.keybindingService.lookupKeybindings(this.id) } : void 0 + }); + }); + } +} + +export class SwitchWindow extends BaseSwitchWindow { + + static ID = 'workbench.action.switchWindow'; + static LABEL = nls.localize('switchWindow', "Switch Window..."); constructor( id: string, label: string, - @IWindowsService private windowsService: IWindowsService, - @IWindowService private windowService: IWindowService, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IEnvironmentService private environmentService: IEnvironmentService + @IWindowsService windowsService: IWindowsService, + @IWindowService windowService: IWindowService, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, windowsService, windowService, quickOpenService, keybindingService); + } + + protected isQuickNavigate(): boolean { + return false; + } +} + +export class QuickSwitchWindow extends BaseSwitchWindow { + + static ID = 'workbench.action.quickSwitchWindow'; + static LABEL = nls.localize('quickSwitchWindow', "Quick Switch Window..."); + + constructor( + id: string, + label: string, + @IWindowsService windowsService: IWindowsService, + @IWindowService windowService: IWindowService, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, windowsService, windowService, quickOpenService, keybindingService); + } + + protected isQuickNavigate(): boolean { + return true; + } +} + +export abstract class BaseOpenRecentAction extends Action { + + constructor( + id: string, + label: string, + private windowsService: IWindowsService, + private windowService: IWindowService, + private quickOpenService: IQuickOpenService, + private contextService: IWorkspaceContextService, + private environmentService: IEnvironmentService, + private keybindingService: IKeybindingService ) { super(id, label); } + protected abstract isQuickNavigate(): boolean; + public run(): TPromise { return this.windowService.getRecentlyOpen() .then(({ files, folders }) => this.openRecent(files, folders)); } private openRecent(recentFiles: string[], recentFolders: string[]): void { + function toPick(path: string, separator: ISeparator, isFolder: boolean, environmentService: IEnvironmentService): IFilePickOpenEntry { return { resource: URI.file(path), @@ -600,7 +671,13 @@ export class OpenRecentAction extends Action { label: paths.basename(path), description: getPathLabel(paths.dirname(path), null, environmentService), separator, - run: context => runPick(path, context) + run: context => { + setTimeout(() => { + // Bug: somehow when not running this code in a timeout, it is not possible to use this picker + // with quick navigate keys (not able to trigger quick navigate once running it once). + runPick(path, context); + }); + } }; } @@ -615,13 +692,60 @@ export class OpenRecentAction extends Action { const hasWorkspace = this.contextService.hasWorkspace(); this.quickOpenService.pick(folderPicks.concat(...filePicks), { - autoFocus: { autoFocusFirstEntry: !hasWorkspace, autoFocusSecondEntry: hasWorkspace }, + autoFocus: { autoFocusFirstEntry: !hasWorkspace && !this.isQuickNavigate(), autoFocusSecondEntry: hasWorkspace || this.isQuickNavigate() }, placeHolder: isMacintosh ? nls.localize('openRecentPlaceHolderMac', "Select a path (hold Cmd-key to open in new window)") : nls.localize('openRecentPlaceHolder', "Select a path to open (hold Ctrl-key to open in new window)"), - matchOnDescription: true + matchOnDescription: true, + quickNavigateConfiguration: this.isQuickNavigate() ? { keybindings: this.keybindingService.lookupKeybindings(this.id) } : void 0 }).done(null, errors.onUnexpectedError); } } +export class OpenRecentAction extends BaseOpenRecentAction { + + public static ID = 'workbench.action.openRecent'; + public static LABEL = nls.localize('openRecent', "Open Recent..."); + + constructor( + id: string, + label: string, + @IWindowsService windowsService: IWindowsService, + @IWindowService windowService: IWindowService, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IWorkspaceContextService contextService: IWorkspaceContextService, + @IEnvironmentService environmentService: IEnvironmentService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, windowsService, windowService, quickOpenService, contextService, environmentService, keybindingService); + } + + protected isQuickNavigate(): boolean { + return false; + } +} + +export class QuickOpenRecentAction extends BaseOpenRecentAction { + + public static ID = 'workbench.action.quickOpenRecent'; + public static LABEL = nls.localize('quickOpenRecent', "Quick Open Recent..."); + + constructor( + id: string, + label: string, + @IWindowsService windowsService: IWindowsService, + @IWindowService windowService: IWindowService, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IWorkspaceContextService contextService: IWorkspaceContextService, + @IEnvironmentService environmentService: IEnvironmentService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, windowsService, windowService, quickOpenService, contextService, environmentService, keybindingService); + } + + protected isQuickNavigate(): boolean { + return true; + } +} + export class CloseMessagesAction extends Action { public static ID = 'workbench.action.closeMessages'; diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts index f53c0ee723b54..87feaac6d446c 100644 --- a/src/vs/workbench/electron-browser/main.contribution.ts +++ b/src/vs/workbench/electron-browser/main.contribution.ts @@ -14,12 +14,10 @@ import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'v import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform'; -import { CloseEditorAction, KeybindingsReferenceAction, OpenDocumentationUrlAction, OpenIntroductoryVideosUrlAction, ReportIssueAction, ReportPerformanceIssueAction, ZoomResetAction, ZoomOutAction, ZoomInAction, ToggleFullScreenAction, ToggleMenuBarAction, CloseFolderAction, CloseWindowAction, SwitchWindow, NewWindowAction, CloseMessagesAction, NavigateUpAction, NavigateDownAction, NavigateLeftAction, NavigateRightAction, IncreaseViewSizeAction, DecreaseViewSizeAction, ShowStartupPerformance, ToggleSharedProcessAction } from 'vs/workbench/electron-browser/actions'; +import { CloseEditorAction, KeybindingsReferenceAction, OpenDocumentationUrlAction, OpenIntroductoryVideosUrlAction, ReportIssueAction, ReportPerformanceIssueAction, ZoomResetAction, ZoomOutAction, ZoomInAction, ToggleFullScreenAction, ToggleMenuBarAction, CloseFolderAction, CloseWindowAction, SwitchWindow, NewWindowAction, CloseMessagesAction, NavigateUpAction, NavigateDownAction, NavigateLeftAction, NavigateRightAction, IncreaseViewSizeAction, DecreaseViewSizeAction, ShowStartupPerformance, ToggleSharedProcessAction, QuickSwitchWindow, QuickOpenRecentAction } from 'vs/workbench/electron-browser/actions'; import { MessagesVisibleContext } from 'vs/workbench/electron-browser/workbench'; import { IJSONSchema } from 'vs/base/common/jsonSchema'; import { registerCommands } from 'vs/workbench/electron-browser/commands'; -import { IQuickOpenRegistry, QuickOpenHandlerDescriptor, Extensions as QuickOpenExtensions } from "vs/workbench/browser/quickopen"; -import { SWITCH_WINDOWS_PREFIX } from "vs/workbench/electron-browser/windowPicker"; // Contribute Commands registerCommands(); @@ -31,7 +29,9 @@ const fileCategory = nls.localize('file', "File"); const workbenchActionsRegistry = Registry.as(Extensions.WorkbenchActions); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(NewWindowAction, NewWindowAction.ID, NewWindowAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_N }), 'New Window'); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(CloseWindowAction, CloseWindowAction.ID, CloseWindowAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_W }), 'Close Window'); -workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(SwitchWindow, SwitchWindow.ID, SwitchWindow.LABEL), 'Switch Window'); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(SwitchWindow, SwitchWindow.ID, SwitchWindow.LABEL, { primary: null, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_W } }), 'Switch Window...'); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(QuickSwitchWindow, QuickSwitchWindow.ID, QuickSwitchWindow.LABEL), 'Quick Switch Window...'); +workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenRecentAction, QuickOpenRecentAction.ID, QuickOpenRecentAction.LABEL), 'File: Quick Open Recent...', fileCategory); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(CloseFolderAction, CloseFolderAction.ID, CloseFolderAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_F) }), 'File: Close Folder', fileCategory); if (!!product.reportIssueUrl) { workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReportIssueAction, ReportIssueAction.ID, ReportIssueAction.LABEL), 'Help: Report Issues', helpCategory); @@ -82,22 +82,6 @@ const developerCategory = nls.localize('developer', "Developer"); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ShowStartupPerformance, ShowStartupPerformance.ID, ShowStartupPerformance.LABEL), 'Developer: Startup Performance', developerCategory); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleSharedProcessAction, ToggleSharedProcessAction.ID, ToggleSharedProcessAction.LABEL), 'Developer: Toggle Shared Process', developerCategory); -// Window switcher -Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpenHandler( - new QuickOpenHandlerDescriptor( - 'vs/workbench/electron-browser/windowPicker', - 'WindowPicker', - SWITCH_WINDOWS_PREFIX, - [ - { - prefix: SWITCH_WINDOWS_PREFIX, - needsEditor: false, - description: nls.localize('switchBetweenWindows', "Switch between Windows") - } - ] - ) -); - // Configuration: Workbench const configurationRegistry = Registry.as(ConfigurationExtensions.Configuration); diff --git a/src/vs/workbench/electron-browser/windowPicker.ts b/src/vs/workbench/electron-browser/windowPicker.ts deleted file mode 100644 index 05767e25f41dc..0000000000000 --- a/src/vs/workbench/electron-browser/windowPicker.ts +++ /dev/null @@ -1,120 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import nls = require('vs/nls'); -import URI from 'vs/base/common/uri'; -import errors = require('vs/base/common/errors'); -import { IIconLabelOptions } from 'vs/base/browser/ui/iconLabel/iconLabel'; -import { Mode, IEntryRunContext } from 'vs/base/parts/quickopen/common/quickOpen'; -import { QuickOpenModel, QuickOpenEntry } from 'vs/base/parts/quickopen/browser/quickOpenModel'; -import scorer = require('vs/base/common/scorer'); -import { IModeService } from 'vs/editor/common/services/modeService'; -import { getIconClasses } from 'vs/workbench/browser/labels'; -import { IModelService } from 'vs/editor/common/services/modelService'; -import { QuickOpenHandler } from 'vs/workbench/browser/quickopen'; -import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IWindowsService, IWindowService } from "vs/platform/windows/common/windows"; -import { stripWildcards } from "vs/base/common/strings"; - -export const SWITCH_WINDOWS_PREFIX = 'windows '; - -export class WindowPickerEntry extends QuickOpenEntry { - - constructor( - private windowId: number, - private label: string, - private resource: URI, - private isCurrentWindow: boolean, - private hasFolderOpened: boolean, - @IWindowsService private windowsService: IWindowsService, - @IModelService private modelService: IModelService, - @IModeService private modeService: IModeService - ) { - super(); - } - - public getLabelOptions(): IIconLabelOptions { - return { - extraClasses: getIconClasses(this.modelService, this.modeService, this.resource, !this.resource && this.hasFolderOpened /* isFolder */) - }; - } - - public getLabel(): string { - return this.label; - } - - public getResource(): URI { - return this.resource; - } - - public getAriaLabel(): string { - return nls.localize('entryAriaLabel', "{0}, window picker", this.getLabel()); - } - - public getDescription(): string { - return this.isCurrentWindow ? nls.localize('current', "Current Window") : void 0; - } - - public run(mode: Mode, context: IEntryRunContext): boolean { - if (mode === Mode.OPEN) { - setTimeout(() => { - // Bug: somehow when not running this code in a timeout, it is not possible to use this picker - // with quick navigate keys (not able to trigger quick navigate once running it once). - this.windowsService.showWindow(this.windowId).done(null, errors.onUnexpectedError); - }); - - return true; - } - - return super.run(mode, context); - } -} - -export class WindowPicker extends QuickOpenHandler { - - constructor( - @IWindowsService private windowsService: IWindowsService, - @IWindowService private windowService: IWindowService, - @IInstantiationService private instantiationService: IInstantiationService - ) { - super(); - } - - public getResults(searchValue: string): TPromise { - searchValue = searchValue.trim(); - - const normalizedSearchValueLowercase = stripWildcards(searchValue).toLowerCase(); - const currentWindowId = this.windowService.getCurrentWindowId(); - - return this.windowsService.getWindows().then(windows => { - let entries = windows.map(win => { - return this.instantiationService.createInstance(WindowPickerEntry, win.id, win.title, win.filename ? URI.file(win.filename) : void 0, currentWindowId === win.id, !!win.path); - }); - - entries = entries.filter(e => { - if (!searchValue) { - return true; - } - - if (!scorer.matches(e.getLabel(), normalizedSearchValueLowercase)) { - return false; - } - - const { labelHighlights, descriptionHighlights } = QuickOpenEntry.highlight(e, searchValue, true /* fuzzy highlight */); - e.setHighlights(labelHighlights, descriptionHighlights); - - return true; - }); - - return new QuickOpenModel(entries); - }); - } - - public getEmptyLabel(searchString: string): string { - return nls.localize('noWindowResults', "No matching opened windows found"); - } -} \ No newline at end of file diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index b8c52c3c98468..e475fb5961995 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -390,7 +390,7 @@ export class Workbench implements IPartService { const workbenchActionsRegistry = Registry.as(Extensions.WorkbenchActions); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReloadWindowAction, ReloadWindowAction.ID, ReloadWindowAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyCode.KEY_R } : void 0), 'Reload Window'); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleDevToolsAction, ToggleDevToolsAction.ID, ToggleDevToolsAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_I, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_I } } : void 0), 'Developer: Toggle Developer Tools', localize('developer', "Developer")); - workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenRecentAction, OpenRecentAction.ID, OpenRecentAction.LABEL, { primary: isDeveloping ? null : KeyMod.CtrlCmd | KeyCode.KEY_R, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R } }), 'File: Open Recent', localize('file', "File")); + workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenRecentAction, OpenRecentAction.ID, OpenRecentAction.LABEL, { primary: isDeveloping ? null : KeyMod.CtrlCmd | KeyCode.KEY_R, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R } }), 'File: Open Recent...', localize('file', "File")); } private resolveEditorsToOpen(): TPromise { From f3fa86d0a59af29855ad7bedbd0f460b9a2655c8 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 7 Jun 2017 10:04:36 +0200 Subject: [PATCH 1585/2747] debt - better restore empty workspaces --- .../workbench/browser/parts/editor/editorPart.ts | 4 ++++ src/vs/workbench/electron-browser/actions.ts | 2 +- src/vs/workbench/electron-browser/workbench.ts | 15 ++++++++------- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index be76d1a4ff6db..d667643341674 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -1031,6 +1031,10 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService return this.doOpenEditors(editors, activePosition, ratio); } + public hasEditorsToRestore(): boolean { + return this.stacks.groups.some(g => g.count > 0); + } + public restoreEditors(): TPromise { const editors = this.stacks.groups.map((group, index) => { return { diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index 8848026edc5b1..cad6f26bd2fba 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -692,7 +692,7 @@ export abstract class BaseOpenRecentAction extends Action { const hasWorkspace = this.contextService.hasWorkspace(); this.quickOpenService.pick(folderPicks.concat(...filePicks), { - autoFocus: { autoFocusFirstEntry: !hasWorkspace && !this.isQuickNavigate(), autoFocusSecondEntry: hasWorkspace || this.isQuickNavigate() }, + autoFocus: { autoFocusFirstEntry: !hasWorkspace, autoFocusSecondEntry: hasWorkspace }, placeHolder: isMacintosh ? nls.localize('openRecentPlaceHolderMac', "Select a path (hold Cmd-key to open in new window)") : nls.localize('openRecentPlaceHolder', "Select a path to open (hold Ctrl-key to open in new window)"), matchOnDescription: true, quickNavigateConfiguration: this.isQuickNavigate() ? { keybindings: this.keybindingService.lookupKeybindings(this.id) } : void 0 diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index e475fb5961995..93e8408e0705c 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -426,6 +426,10 @@ export class Workbench implements IPartService { // Empty workbench: some first time users will not have an untiled file; returning users will always have one else if (!this.contextService.hasWorkspace() && this.telemetryService.getExperiments().openUntitledFile && !this.configurationService.lookup('workbench.welcome.enabled').value) { + if (this.editorPart.hasEditorsToRestore()) { + return TPromise.as([]); // do not open any empty untitled file if we have editors to restore + } + return this.backupFileService.hasBackups().then(hasBackups => { if (hasBackups) { return TPromise.as([]); // do not open any empty untitled file if we have backups to restore @@ -562,16 +566,13 @@ export class Workbench implements IPartService { private initSettings(): void { // Sidebar visibility - this.sideBarHidden = this.storageService.getBoolean(Workbench.sidebarHiddenSettingKey, StorageScope.WORKSPACE, false); - if (!this.contextService.hasWorkspace()) { - this.sideBarHidden = true; // we hide sidebar in single-file-mode - } + this.sideBarHidden = this.storageService.getBoolean(Workbench.sidebarHiddenSettingKey, StorageScope.WORKSPACE, !this.contextService.hasWorkspace()); // Panel part visibility const panelRegistry = Registry.as(PanelExtensions.Panels); - this.panelHidden = this.storageService.getBoolean(Workbench.panelHiddenSettingKey, StorageScope.WORKSPACE, true); - if (!this.contextService.hasWorkspace() || !panelRegistry.getDefaultPanelId()) { - this.panelHidden = true; // we hide panel part in single-file-mode or if there is no default panel + this.panelHidden = this.storageService.getBoolean(Workbench.panelHiddenSettingKey, StorageScope.WORKSPACE, !this.contextService.hasWorkspace()); + if (!panelRegistry.getDefaultPanelId()) { + this.panelHidden = true; // we hide panel part if there is no default panel } // Sidebar position From ed1b6da17acae8c641525c7abdd6588285436164 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 7 Jun 2017 10:22:51 +0200 Subject: [PATCH 1586/2747] debug menu: enable all breakpoints fixes #28143 --- src/vs/code/electron-main/menus.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 4323e8ca2ca0e..ca5849620fe18 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -864,6 +864,7 @@ export class VSCodeMenu { breakpointsMenu.append(this.createMenuItem(nls.localize({ key: 'miColumnBreakpoint', comment: ['&& denotes a mnemonic'] }, "C&&olumn Breakpoint"), 'editor.debug.action.toggleColumnBreakpoint')); breakpointsMenu.append(this.createMenuItem(nls.localize({ key: 'miFunctionBreakpoint', comment: ['&& denotes a mnemonic'] }, "&&Function Breakpoint..."), 'workbench.debug.viewlet.action.addFunctionBreakpointAction')); const newBreakpoints = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'miNewBreakpoint', comment: ['&& denotes a mnemonic'] }, "&&New Breakpoint")), submenu: breakpointsMenu }); + const enableAllBreakpoints = this.createMenuItem(nls.localize({ key: 'miEnableAllBreakpoints', comment: ['&& denotes a mnemonic'] }, "Enable All Breakpoints"), 'workbench.debug.viewlet.action.enableAllBreakpoints'); const disableAllBreakpoints = this.createMenuItem(nls.localize({ key: 'miDisableAllBreakpoints', comment: ['&& denotes a mnemonic'] }, "Disable A&&ll Breakpoints"), 'workbench.debug.viewlet.action.disableAllBreakpoints'); const removeAllBreakpoints = this.createMenuItem(nls.localize({ key: 'miRemoveAllBreakpoints', comment: ['&& denotes a mnemonic'] }, "Remove &&All Breakpoints"), 'workbench.debug.viewlet.action.removeAllBreakpoints'); @@ -884,6 +885,7 @@ export class VSCodeMenu { __separator__(), toggleBreakpoint, newBreakpoints, + enableAllBreakpoints, disableAllBreakpoints, removeAllBreakpoints, __separator__(), From 0bbb9c7c447a88e5b76c9c306ef557117b2845b9 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Wed, 7 Jun 2017 10:23:42 +0200 Subject: [PATCH 1587/2747] Fixes #28171: Problem matchers referenced in API will not be resolved correctly --- .../parts/tasks/electron-browser/terminalTaskSystem.ts | 6 +++++- src/vs/workbench/parts/tasks/node/processTaskSystem.ts | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index 6dbbc5b93a698..76a07d3b7a024 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -559,7 +559,11 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { values.forEach((value) => { let matcher: ProblemMatcher; if (Types.isString(value)) { - matcher = ProblemMatcherRegistry.get(value); + if (value[0] === '$') { + matcher = ProblemMatcherRegistry.get(value.substring(1)); + } else { + matcher = ProblemMatcherRegistry.get(value); + } } else { matcher = value; } diff --git a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts index 0ac2c85e08ffb..0db8946a2d29d 100644 --- a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts @@ -333,7 +333,11 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem { values.forEach((value) => { let matcher: ProblemMatcher; if (Types.isString(value)) { - matcher = ProblemMatcherRegistry.get(value); + if (value[0] === '$') { + matcher = ProblemMatcherRegistry.get(value.substring(1)); + } else { + matcher = ProblemMatcherRegistry.get(value); + } } else { matcher = value; } From 32dd1b768414253437c52593380463088798add8 Mon Sep 17 00:00:00 2001 From: Nick Snyder Date: Wed, 7 Jun 2017 01:29:48 -0700 Subject: [PATCH 1588/2747] More explicit typing (#28148) Does not change any behavior --- src/vs/workbench/electron-browser/window.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index d76662cdc5bc2..e193c9391e4f5 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -38,7 +38,7 @@ import { IWorkbenchThemeService, VS_HC_THEME, VS_DARK_THEME } from 'vs/workbench import * as browser from 'vs/base/browser/browser'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; -import { Position, IResourceInput, IUntitledResourceInput } from 'vs/platform/editor/common/editor'; +import { Position, IResourceInput, IUntitledResourceInput, IEditor } from 'vs/platform/editor/common/editor'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { KeyboardMapperFactory } from 'vs/workbench/services/keybinding/electron-browser/keybindingService'; import { Themable, EDITOR_DRAG_AND_DROP_BACKGROUND } from 'vs/workbench/common/theme'; @@ -389,8 +389,9 @@ export class ElectronWindow extends Themable { } } - private openResources(resources: (IResourceInput | IUntitledResourceInput)[], diffMode: boolean): TPromise { - return this.partService.joinCreation().then(() => { + private openResources(resources: (IResourceInput | IUntitledResourceInput)[], diffMode: boolean): TPromise { + return this.partService.joinCreation().then((): TPromise => { + // In diffMode we open 2 resources as diff if (diffMode && resources.length === 2) { From 8526234cbb5678a06b0331b0b01014a2e0c7efc7 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 7 Jun 2017 10:38:23 +0200 Subject: [PATCH 1589/2747] :lipstick: --- src/vs/workbench/parts/files/browser/views/explorerView.ts | 3 +-- src/vs/workbench/parts/files/common/explorerViewModel.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index 5b3ec0df63eb7..d86e3af83925e 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -22,7 +22,6 @@ import { RefreshViewExplorerAction, NewFolderAction, NewFileAction } from 'vs/wo import { FileDragAndDrop, FileFilter, FileSorter, FileController, FileRenderer, FileDataSource, FileViewletState, FileAccessibilityProvider } from 'vs/workbench/parts/files/browser/views/explorerViewer'; import { toResource } from 'vs/workbench/common/editor'; import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; -import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import * as DOM from 'vs/base/browser/dom'; import { CollapseAction, CollapsibleViewletView } from 'vs/workbench/browser/viewlet'; @@ -204,7 +203,7 @@ export class ExplorerView extends CollapsibleViewletView { // Handle closed or untitled file (convince explorer to not reopen any file when getting visible) const activeInput = this.editorService.getActiveEditorInput(); - if (activeInput instanceof UntitledEditorInput || !activeInput) { + if (!activeInput || toResource(activeInput, { supportSideBySide: true, filter: 'untitled' })) { this.settings[ExplorerView.MEMENTO_LAST_ACTIVE_FILE_RESOURCE] = void 0; clearFocus = true; } diff --git a/src/vs/workbench/parts/files/common/explorerViewModel.ts b/src/vs/workbench/parts/files/common/explorerViewModel.ts index 64b3abbe18f79..f7463ababd977 100644 --- a/src/vs/workbench/parts/files/common/explorerViewModel.ts +++ b/src/vs/workbench/parts/files/common/explorerViewModel.ts @@ -8,7 +8,6 @@ import URI from 'vs/base/common/uri'; import paths = require('vs/base/common/paths'); import { IFileStat, isEqual, isParent, isEqualOrParent } from 'vs/platform/files/common/files'; -import { UntitledEditorInput } from 'vs/workbench/common/editor/untitledEditorInput'; import { IEditorInput } from 'vs/platform/editor/common/editor'; import { IEditorGroup, toResource } from 'vs/workbench/common/editor'; import { ResourceMap } from 'vs/base/common/map'; @@ -361,7 +360,7 @@ export class OpenEditor { } public isUntitled(): boolean { - return this.editor instanceof UntitledEditorInput; + return !!toResource(this.editor, { supportSideBySide: true, filter: 'untitled' }); } public isDirty(): boolean { From 573b0577c4518d48413dbaf97d8f46d63d10689f Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 7 Jun 2017 10:59:51 +0200 Subject: [PATCH 1590/2747] TS 2.4 fixes --- src/vs/base/browser/ui/splitview/splitview.ts | 2 +- .../browser/parts/editor/editorPart.ts | 13 ++++----- .../browser/parts/sidebar/sidebarPart.ts | 6 ++-- .../common/editor/diffEditorInput.ts | 2 +- .../common/editor/diffEditorModel.ts | 15 +++++----- .../parts/files/browser/fileCommands.ts | 2 +- .../services/editor/browser/editorService.ts | 6 ++-- .../textfile/common/textFileEditorModel.ts | 28 +++++++++---------- .../services/textfile/common/textfiles.ts | 2 ++ 9 files changed, 38 insertions(+), 38 deletions(-) diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index a328f784bdc03..41415d49b183a 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -102,7 +102,7 @@ export abstract class View extends ee.EventEmitter implements IView { abstract layout(size: number, orientation: Orientation): void; } -export interface IHeaderViewOptions extends IHeaderViewStyles { +export interface IHeaderViewOptions extends IHeaderViewStyles, IViewOptions { headerSize?: number; } diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index d667643341674..c1a20ee5dea1c 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -441,22 +441,18 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService const editorInstantiationService = this.editorGroupsControl.getInstantiationService(position).createChild(new ServiceCollection([IProgressService, progressService])); let loaded = false; - const onInstantiate = (arg: BaseEditor | Error): TPromise => { + const onInstantiate = (arg: BaseEditor): TPromise => { const position = this.stacks.positionOfGroup(group); // might have changed due to a rochade meanwhile loaded = true; delete this.mapEditorInstantiationPromiseToEditor[position][descriptor.getId()]; - if (arg instanceof BaseEditor) { - this.instantiatedEditors[position].push(arg); + this.instantiatedEditors[position].push(arg); - return TPromise.as(arg); - } - - return TPromise.wrapError(arg); + return TPromise.as(arg); }; - const instantiateEditorPromise = editorInstantiationService.createInstance(descriptor).then(onInstantiate, onInstantiate); + const instantiateEditorPromise = editorInstantiationService.createInstance(descriptor).then(onInstantiate); if (!loaded) { this.mapEditorInstantiationPromiseToEditor[position][descriptor.getId()] = instantiateEditorPromise; @@ -464,6 +460,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService return instantiateEditorPromise.then(result => { progressService.dispose(); + return result; }); } diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index 36f23b53283a7..0bdf5e478a007 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -68,11 +68,11 @@ export class SidebarPart extends CompositePart { } public get onDidViewletOpen(): Event { - return this._onDidCompositeOpen.event; + return this._onDidCompositeOpen.event as Event; } public get onDidViewletClose(): Event { - return this._onDidCompositeClose.event; + return this._onDidCompositeClose.event as Event; } public updateStyles(): void { @@ -110,7 +110,7 @@ export class SidebarPart extends CompositePart { } } - return promise.then(() => this.openComposite(id, focus)); + return promise.then(() => this.openComposite(id, focus)) as TPromise; } public getActiveViewlet(): IViewlet { diff --git a/src/vs/workbench/common/editor/diffEditorInput.ts b/src/vs/workbench/common/editor/diffEditorInput.ts index df3376af92127..6d7b5cbfdaea5 100644 --- a/src/vs/workbench/common/editor/diffEditorInput.ts +++ b/src/vs/workbench/common/editor/diffEditorInput.ts @@ -70,7 +70,7 @@ export class DiffEditorInput extends SideBySideEditorInput { private createModel(refresh?: boolean): TPromise { // Join resolve call over two inputs and build diff editor model - return TPromise.join([ + return TPromise.join([ this.originalInput.resolve(refresh), this.modifiedInput.resolve(refresh) ]).then((models) => { diff --git a/src/vs/workbench/common/editor/diffEditorModel.ts b/src/vs/workbench/common/editor/diffEditorModel.ts index e12b560ef53bd..fc13842aa182e 100644 --- a/src/vs/workbench/common/editor/diffEditorModel.ts +++ b/src/vs/workbench/common/editor/diffEditorModel.ts @@ -6,16 +6,17 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { EditorModel } from 'vs/workbench/common/editor'; +import { IEditorModel } from "vs/platform/editor/common/editor"; /** * The base editor model for the diff editor. It is made up of two editor models, the original version * and the modified version. */ export class DiffEditorModel extends EditorModel { - protected _originalModel: EditorModel; - protected _modifiedModel: EditorModel; + protected _originalModel: IEditorModel; + protected _modifiedModel: IEditorModel; - constructor(originalModel: EditorModel, modifiedModel: EditorModel) { + constructor(originalModel: IEditorModel, modifiedModel: IEditorModel) { super(); this._originalModel = originalModel; @@ -23,15 +24,15 @@ export class DiffEditorModel extends EditorModel { } public get originalModel(): EditorModel { - return this._originalModel; + return this._originalModel as EditorModel; } public get modifiedModel(): EditorModel { - return this._modifiedModel; + return this._modifiedModel as EditorModel; } public load(): TPromise { - return TPromise.join([ + return TPromise.join([ this._originalModel.load(), this._modifiedModel.load() ]).then(() => { @@ -40,7 +41,7 @@ export class DiffEditorModel extends EditorModel { } public isResolved(): boolean { - return this._originalModel.isResolved() && this._modifiedModel.isResolved(); + return this.originalModel.isResolved() && this.modifiedModel.isResolved(); } public dispose(): void { diff --git a/src/vs/workbench/parts/files/browser/fileCommands.ts b/src/vs/workbench/parts/files/browser/fileCommands.ts index 5ee9500a35a60..8d0711a0c3d47 100644 --- a/src/vs/workbench/parts/files/browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/browser/fileCommands.ts @@ -154,7 +154,7 @@ function withVisibleExplorer(accessor: ServicesAccessor): TPromise; }; export function withFocussedFilesExplorerViewItem(accessor: ServicesAccessor): TPromise<{ explorer: ExplorerViewlet, tree: ITree, item: FileStat }> { diff --git a/src/vs/workbench/services/editor/browser/editorService.ts b/src/vs/workbench/services/editor/browser/editorService.ts index 7e4d4a52bcb55..afd412d0127b7 100644 --- a/src/vs/workbench/services/editor/browser/editorService.ts +++ b/src/vs/workbench/services/editor/browser/editorService.ts @@ -168,9 +168,9 @@ export class WorkbenchEditorService implements IWorkbenchEditorService { return this.editorPart.openEditors(typedInputs); } - public replaceEditors(editors: { toReplace: IResourceInputType, replaceWith: IResourceInputType }[], position?: Position): TPromise; - public replaceEditors(editors: { toReplace: IEditorInput, replaceWith: IEditorInput, options?: IEditorOptions }[], position?: Position): TPromise; - public replaceEditors(editors: any[], position?: Position): TPromise { + public replaceEditors(editors: { toReplace: IResourceInputType, replaceWith: IResourceInputType }[], position?: Position): TPromise; + public replaceEditors(editors: { toReplace: IEditorInput, replaceWith: IEditorInput, options?: IEditorOptions }[], position?: Position): TPromise; + public replaceEditors(editors: any[], position?: Position): TPromise { const toReplaceInputs = editors.map(editor => this.createInput(editor.toReplace)); const replaceWithInputs = editors.map(editor => this.createInput(editor.replaceWith)); const typedReplacements: { toReplace: IEditorInput, replaceWith: IEditorInput, options?: EditorOptions }[] = editors.map((editor, index) => { diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts index 43631b46cc124..d200639a97533 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts @@ -21,7 +21,7 @@ import { ILifecycleService, LifecyclePhase } from 'vs/platform/lifecycle/common/ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITextFileService, IAutoSaveConfiguration, ModelState, ITextFileEditorModel, IModelSaveOptions, ISaveErrorHandler, ISaveParticipant, StateChange, SaveReason, IRawTextContent } from 'vs/workbench/services/textfile/common/textfiles'; -import { EncodingMode, EditorModel } from 'vs/workbench/common/editor'; +import { EncodingMode } from 'vs/workbench/common/editor'; import { BaseTextEditorModel } from 'vs/workbench/common/editor/textEditorModel'; import { IBackupFileService, BACKUP_FILE_RESOLVE_OPTIONS } from 'vs/workbench/services/backup/common/backup'; import { IFileService, IFileStat, IFileOperationResult, FileOperationResult, IContent, CONTENT_CHANGE_EVENT_BUFFER_DELAY, FileChangesEvent, FileChangeType, isEqualOrParent } from 'vs/platform/files/common/files'; @@ -238,7 +238,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil // Unset flags const undo = this.setDirty(false); - let loadPromise: TPromise; + let loadPromise: TPromise; if (soft) { loadPromise = TPromise.as(this); } else { @@ -258,7 +258,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil }); } - public load(force?: boolean /* bypass any caches and really go to disk */): TPromise { + public load(force?: boolean /* bypass any caches and really go to disk */): TPromise { diag('load() - enter', this.resource, new Date()); // It is very important to not reload the model when the model is dirty. We only want to reload the model from the disk @@ -279,7 +279,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil return this.loadFromFile(force); } - private loadWithBackup(force: boolean): TPromise { + private loadWithBackup(force: boolean): TPromise { return this.backupFileService.loadBackupResource(this.resource).then(backup => { // Make sure meanwhile someone else did not suceed or start loading @@ -306,7 +306,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil }); } - private loadFromFile(force: boolean): TPromise { + private loadFromFile(force: boolean): TPromise { // Decide on etag let etag: string; @@ -322,7 +322,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil .then(content => this.handleLoadSuccess(content), error => this.handleLoadError(error)); } - private handleLoadSuccess(content: IRawTextContent): TPromise { + private handleLoadSuccess(content: IRawTextContent): TPromise { // Clear orphaned state when load was successful this.setOrphaned(false); @@ -330,7 +330,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil return this.loadWithContent(content); } - private handleLoadError(error: IFileOperationResult): TPromise { + private handleLoadError(error: IFileOperationResult): TPromise { const result = error.fileOperationResult; // Apply orphaned state based on error code @@ -340,21 +340,21 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil if (result === FileOperationResult.FILE_NOT_MODIFIED_SINCE) { this.setDirty(false); // Ensure we are not tracking a stale state - return TPromise.as(this); + return TPromise.as(this); } // Ignore when a model has been resolved once and the file was deleted meanwhile. Since // we already have the model loaded, we can return to this state and update the orphaned // flag to indicate that this model has no version on disk anymore. if (this.isResolved() && result === FileOperationResult.FILE_NOT_FOUND) { - return TPromise.as(this); + return TPromise.as(this); } // Otherwise bubble up the error - return TPromise.wrapError(error); + return TPromise.wrapError(error); } - private loadWithContent(content: IRawTextContent | IContent, backup?: URI): TPromise { + private loadWithContent(content: IRawTextContent | IContent, backup?: URI): TPromise { diag('load() - resolved content', this.resource, new Date()); // Telemetry @@ -399,7 +399,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil return this.doCreateTextModel(content.resource, content.value, backup); } - private doUpdateTextModel(value: string | IRawTextSource): TPromise { + private doUpdateTextModel(value: string | IRawTextSource): TPromise { diag('load() - updated text editor model', this.resource, new Date()); this.setDirty(false); // Ensure we are not tracking a stale state @@ -411,10 +411,10 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil this.blockModelContentChange = false; } - return TPromise.as(this); + return TPromise.as(this); } - private doCreateTextModel(resource: URI, value: string | IRawTextSource, backup: URI): TPromise { + private doCreateTextModel(resource: URI, value: string | IRawTextSource, backup: URI): TPromise { diag('load() - created text editor model', this.resource, new Date()); this.createTextEditorModelPromise = this.doLoadBackup(backup).then(backupContent => { diff --git a/src/vs/workbench/services/textfile/common/textfiles.ts b/src/vs/workbench/services/textfile/common/textfiles.ts index d84df51fe0b39..fbedca95ca279 100644 --- a/src/vs/workbench/services/textfile/common/textfiles.ts +++ b/src/vs/workbench/services/textfile/common/textfiles.ts @@ -196,6 +196,8 @@ export interface ITextFileEditorModel extends ITextEditorModel, IEncodingSupport save(options?: IModelSaveOptions): TPromise; + load(): TPromise; + revert(soft?: boolean): TPromise; getValue(): string; From f5e4e4f4246a70d30c32a6047874da2bbb4417e4 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 7 Jun 2017 11:10:22 +0200 Subject: [PATCH 1591/2747] Have the minimap slider be constantly aligned with the scrollbar slider (#21346) --- .../browser/ui/scrollbar/verticalScrollbar.ts | 2 +- src/vs/editor/browser/view/viewImpl.ts | 2 +- .../browser/viewParts/minimap/minimap.ts | 123 ++++++------------ .../browser/viewParts/viewZones/viewZones.ts | 2 +- .../viewLayout/viewLinesViewportData.ts | 15 ++- 5 files changed, 56 insertions(+), 88 deletions(-) diff --git a/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts b/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts index e2bfa6b645fcb..520a7139b485c 100644 --- a/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts @@ -61,7 +61,7 @@ export class VerticalScrollbar extends AbstractScrollbar { } public getVerticalSliderVerticalCenter(): number { - return this._scrollbarState.getSliderCenter(); + return this._scrollbarState.getArrowSize() + this._scrollbarState.getSliderCenter(); } protected _updateSlider(sliderSize: number, sliderPosition: number): void { diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index 2ac56ac277325..222f39fe1f340 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -409,7 +409,7 @@ export class View extends ViewEventHandler { const partialViewportData = this._context.viewLayout.getLinesViewportData(); this._context.model.setViewport(partialViewportData.startLineNumber, partialViewportData.endLineNumber, partialViewportData.centeredLineNumber); - let viewportData = new ViewportData(partialViewportData, this._context.model); + let viewportData = new ViewportData(partialViewportData, this._context.viewLayout.getWhitespaceViewportData(), this._context.model); if (this.viewLines.shouldRender()) { this.viewLines.renderText(viewportData); diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index 2e9415eb221c1..e0cb9cd2cb371 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -166,6 +166,7 @@ class MinimapLayout { viewportStartLineNumber: number, viewportEndLineNumber: number, viewportHeight: number, + viewportContainsWhitespaceGaps: boolean, lineCount: number, scrollbarSliderCenter: number ) { @@ -174,96 +175,57 @@ class MinimapLayout { const minimapLinesFitting = Math.floor(options.canvasInnerHeight / minimapLineHeight); const lineHeight = options.lineHeight; - // Sometimes, the number of rendered lines varies for a constant viewport height. - // The reason is that only parts of the viewportStartLineNumber or viewportEndLineNumber are visible. - // This leads to an apparent tremor in the minimap's slider height. - // We try here to compensate, making the slider slightly incorrect in these cases, but more pleasing to the eye. - let viewportLineCount = viewportEndLineNumber - viewportStartLineNumber + 1; - const expectedViewportLineCount = Math.round(viewportHeight / lineHeight); - if (viewportLineCount > expectedViewportLineCount) { - viewportLineCount = expectedViewportLineCount; + // >>> The minimap slider should be center-aligned with the scrollbar slider. <<< + // >>> The entire minimap is painted around this constraint. <<< + // + // The slider should encompass the visible lines... Mostly. + // + // The visible line count in a viewport can change due to a number of reasons: + // a) with the same viewport width, different scroll positions can result in partial lines being visible: + // e.g. for a line height of 20, and a viewport height of 600 + // * scrollTop = 0 => visible lines are [1, 30] + // * scrollTop = 10 => visible lines are [1, 31] (with lines 1 and 31 partially visible) + // * scrollTop = 20 => visible lines are [2, 31] + // b) whitespace gaps might make their way in the viewport (which results in a decrease in the visible line count) + // c) we could be in the scroll beyond last line case (which also results in a decrease in the visible line count, down to possibly only one line being visible) + // + // It therefore results that the slider height is variable, based on the current viewport. + + + // We must first establish a desirable slider height. + if (viewportContainsWhitespaceGaps) { + // case b) from above: there are whitespace gaps in the viewport. + // In this case, the height of the slider directly reflects the visible line count. + const viewportLineCount = viewportEndLineNumber - viewportStartLineNumber + 1; + this.sliderHeight = Math.floor(viewportLineCount * minimapLineHeight / pixelRatio); + } else { + // The slider has a stable height + const expectedViewportLineCount = viewportHeight / lineHeight; + this.sliderHeight = Math.floor(expectedViewportLineCount * minimapLineHeight / pixelRatio); } if (minimapLinesFitting >= lineCount) { // All lines fit in the minimap => no minimap scrolling + // => the slider cannot be center-aligned with the scrollbar slider this.startLineNumber = 1; this.endLineNumber = lineCount; - } else { - // The desire is to align (centers) the minimap's slider with the scrollbar's slider - - // For a resolved this.startLineNumber, we can compute the minimap's slider's center with the following formula: - // scrollbarSliderCenter = (viewportStartLineNumber - this.startLineNumber + viewportLineCount/2) * minimapLineHeight / pixelRatio; - // => - // scrollbarSliderCenter = (viewportStartLineNumber - this.startLineNumber + viewportLineCount/2) * minimapLineHeight / pixelRatio; - // scrollbarSliderCenter * pixelRatio / minimapLineHeight = viewportStartLineNumber - this.startLineNumber + viewportLineCount/2 - // this.startLineNumber = viewportStartLineNumber + viewportLineCount/2 - scrollbarSliderCenter * pixelRatio / minimapLineHeight - let desiredStartLineNumber = Math.floor(viewportStartLineNumber + viewportLineCount / 2 - scrollbarSliderCenter * pixelRatio / minimapLineHeight); - let desiredEndLineNumber = desiredStartLineNumber + minimapLinesFitting - 1; - - // Aligning the slider's centers can result (correctly) in tremor. - // i.e. scrolling down might result in the startLineNumber going up. - // Avoid this tremor by being consistent w.r.t. the previous computed result - if (lastRenderData) { - const lastLayoutDecision = lastRenderData.renderedLayout; - if (lastLayoutDecision.viewportStartLineNumber <= viewportStartLineNumber) { - // going down => make sure we don't go above our previous decision - if (desiredStartLineNumber < lastLayoutDecision.startLineNumber) { - desiredStartLineNumber = lastLayoutDecision.startLineNumber; - desiredEndLineNumber = desiredStartLineNumber + minimapLinesFitting - 1; - } - } - if (lastLayoutDecision.viewportStartLineNumber >= viewportStartLineNumber) { - // going up => make sure we don't go below our previous decision - if (desiredEndLineNumber > lastLayoutDecision.endLineNumber) { - desiredEndLineNumber = lastLayoutDecision.endLineNumber; - desiredStartLineNumber = desiredEndLineNumber - minimapLinesFitting + 1; - } - } - } - // Aligning the slider's centers is a very good thing, but this would make - // the minimap never scroll all the way to the top or to the bottom of the file. - // We therefore check that the viewport lines are in the minimap viewport. - - // (a) validate on start line number - if (desiredStartLineNumber < 1) { - // must start after 1 - desiredStartLineNumber = 1; - desiredEndLineNumber = desiredStartLineNumber + minimapLinesFitting - 1; - } - if (desiredStartLineNumber > viewportStartLineNumber) { - // must contain the viewport's start line number - desiredStartLineNumber = viewportStartLineNumber; - desiredEndLineNumber = desiredStartLineNumber + minimapLinesFitting - 1; - } - - // (b) validate on end line number - if (desiredEndLineNumber > lineCount) { - // must end before line count - desiredEndLineNumber = lineCount; - desiredStartLineNumber = desiredEndLineNumber - minimapLinesFitting + 1; - } - if (desiredEndLineNumber < viewportEndLineNumber) { - // must contain the viewport's end line number - desiredEndLineNumber = viewportEndLineNumber; - desiredStartLineNumber = desiredEndLineNumber - minimapLinesFitting + 1; - } - - this.startLineNumber = desiredStartLineNumber; - this.endLineNumber = desiredEndLineNumber; - } - - this.sliderTop = Math.floor((viewportStartLineNumber - this.startLineNumber) * minimapLineHeight / pixelRatio); - if (viewportEndLineNumber === lineCount) { - // The last line is in the viewport => try to extend slider height below the painted lines - let desiredSliderHeight = Math.floor(expectedViewportLineCount * minimapLineHeight / pixelRatio); - if (this.sliderTop + desiredSliderHeight > options.minimapHeight) { - this.sliderHeight = options.minimapHeight - this.sliderTop; + if (viewportEndLineNumber === lineCount) { + // case c) from above: we could be in the scroll beyond last line case + this.sliderTop = Math.floor((viewportStartLineNumber - this.startLineNumber) * minimapLineHeight / pixelRatio); } else { - this.sliderHeight = desiredSliderHeight; + const desiredSliderTop = (viewportStartLineNumber - this.startLineNumber) * minimapLineHeight / pixelRatio; + const desiredSliderBottom = (viewportEndLineNumber - this.startLineNumber) * minimapLineHeight / pixelRatio; + const desiredSliderCenter = (desiredSliderTop + desiredSliderBottom) / 2; + this.sliderTop = Math.floor(desiredSliderCenter - this.sliderHeight / 2); } } else { - this.sliderHeight = Math.floor(viewportLineCount * minimapLineHeight / pixelRatio); + // assign sliderTop last to maintain the same field assignment order in both if and else branches + const sliderTop = Math.floor(Math.min(options.minimapHeight - this.sliderHeight, Math.max(0, scrollbarSliderCenter - this.sliderHeight / 2))); + + this.startLineNumber = Math.max(1, Math.floor(viewportStartLineNumber - sliderTop * pixelRatio / minimapLineHeight)); + this.endLineNumber = Math.min(lineCount, this.startLineNumber + minimapLinesFitting - 1); + this.sliderTop = sliderTop; } } } @@ -671,6 +633,7 @@ export class Minimap extends ViewPart { renderingCtx.visibleRange.startLineNumber, renderingCtx.visibleRange.endLineNumber, renderingCtx.viewportHeight, + (renderingCtx.viewportData.whitespaceViewportData.length > 0), this._context.model.getLineCount(), this._editorScrollbar.getVerticalSliderVerticalCenter() ); diff --git a/src/vs/editor/browser/viewParts/viewZones/viewZones.ts b/src/vs/editor/browser/viewParts/viewZones/viewZones.ts index d91430803b3d7..a02489ace2cbd 100644 --- a/src/vs/editor/browser/viewParts/viewZones/viewZones.ts +++ b/src/vs/editor/browser/viewParts/viewZones/viewZones.ts @@ -300,7 +300,7 @@ export class ViewZones extends ViewPart { } public render(ctx: RestrictedRenderingContext): void { - let visibleWhitespaces = this._context.viewLayout.getWhitespaceViewportData(); + const visibleWhitespaces = ctx.viewportData.whitespaceViewportData; let visibleZones: { [id: string]: IViewWhitespaceViewportData; } = {}; let hasVisibleZone = false; diff --git a/src/vs/editor/common/viewLayout/viewLinesViewportData.ts b/src/vs/editor/common/viewLayout/viewLinesViewportData.ts index 6d8a2ec910df6..10f4bee3abdc2 100644 --- a/src/vs/editor/common/viewLayout/viewLinesViewportData.ts +++ b/src/vs/editor/common/viewLayout/viewLinesViewportData.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { ViewLineRenderingData, IViewModel, ViewModelDecoration } from 'vs/editor/common/viewModel/viewModel'; +import { ViewLineRenderingData, IViewModel, ViewModelDecoration, IViewWhitespaceViewportData } from 'vs/editor/common/viewModel/viewModel'; import { Range } from 'vs/editor/common/core/range'; export interface IPartialViewLinesViewportData { @@ -21,8 +21,7 @@ export interface IPartialViewLinesViewportData { */ readonly endLineNumber: number; /** - * relativeVerticalOffset[i] is the gap that must be left between line at - * i - 1 + `startLineNumber` and i + `startLineNumber`. + * relativeVerticalOffset[i] is the `top` position for line at `i` + `startLineNumber`. */ readonly relativeVerticalOffset: number[]; /** @@ -55,8 +54,7 @@ export class ViewportData { public readonly endLineNumber: number; /** - * relativeVerticalOffset[i] is the gap that must be left between line at - * i - 1 + `startLineNumber` and i + `startLineNumber`. + * relativeVerticalOffset[i] is the `top` position for line at `i` + `startLineNumber`. */ public readonly relativeVerticalOffset: number[]; @@ -70,16 +68,23 @@ export class ViewportData { */ public readonly bigNumbersDelta: number; + /** + * Positioning information about gaps whitespace. + */ + public readonly whitespaceViewportData: IViewWhitespaceViewportData[]; + private readonly _model: IViewModel; constructor( partialData: IPartialViewLinesViewportData, + whitespaceViewportData: IViewWhitespaceViewportData[], model: IViewModel ) { this.startLineNumber = partialData.startLineNumber | 0; this.endLineNumber = partialData.endLineNumber | 0; this.relativeVerticalOffset = partialData.relativeVerticalOffset; this.bigNumbersDelta = partialData.bigNumbersDelta | 0; + this.whitespaceViewportData = whitespaceViewportData; this._model = model; From 59c132912a84e985c39ff4ee68cf0fa1c1111ee4 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 7 Jun 2017 12:35:34 +0200 Subject: [PATCH 1592/2747] Added missing workbench parts and services to pull from Transifex. --- build/lib/i18n.js | 5 +++++ build/lib/i18n.ts | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/build/lib/i18n.js b/build/lib/i18n.js index 3cf4f78401e72..e529cde52e1cc 100644 --- a/build/lib/i18n.js +++ b/build/lib/i18n.js @@ -530,22 +530,27 @@ var workbenchResources = [ { name: 'vs/workbench/parts/performance', project: workbenchProject }, { name: 'vs/workbench/parts/preferences', project: workbenchProject }, { name: 'vs/workbench/parts/quickopen', project: workbenchProject }, + { name: 'vs/workbench/parts/relauncher', project: workbenchProject }, { name: 'vs/workbench/parts/scm', project: workbenchProject }, { name: 'vs/workbench/parts/search', project: workbenchProject }, { name: 'vs/workbench/parts/snippets', project: workbenchProject }, + { name: 'vs/workbench/parts/surveys', project: workbenchProject }, { name: 'vs/workbench/parts/tasks', project: workbenchProject }, { name: 'vs/workbench/parts/terminal', project: workbenchProject }, { name: 'vs/workbench/parts/themes', project: workbenchProject }, { name: 'vs/workbench/parts/trust', project: workbenchProject }, { name: 'vs/workbench/parts/update', project: workbenchProject }, + { name: 'vs/workbench/parts/views', project: workbenchProject }, { name: 'vs/workbench/parts/watermark', project: workbenchProject }, { name: 'vs/workbench/parts/welcome', project: workbenchProject }, { name: 'vs/workbench/services/configuration', project: workbenchProject }, + { name: 'vs/workbench/services/crashReporter', project: workbenchProject }, { name: 'vs/workbench/services/editor', project: workbenchProject }, { name: 'vs/workbench/services/files', project: workbenchProject }, { name: 'vs/workbench/services/keybinding', project: workbenchProject }, { name: 'vs/workbench/services/message', project: workbenchProject }, { name: 'vs/workbench/services/mode', project: workbenchProject }, + { name: 'vs/workbench/services/progress', project: workbenchProject }, { name: 'vs/workbench/services/textfile', project: workbenchProject }, { name: 'vs/workbench/services/themes', project: workbenchProject }, { name: 'setup_messages', project: workbenchProject } diff --git a/build/lib/i18n.ts b/build/lib/i18n.ts index e4a1029f7fe06..4cf89dacda0a2 100644 --- a/build/lib/i18n.ts +++ b/build/lib/i18n.ts @@ -607,22 +607,27 @@ const workbenchResources: Resource[] = [ { name: 'vs/workbench/parts/performance', project: workbenchProject }, { name: 'vs/workbench/parts/preferences', project: workbenchProject }, { name: 'vs/workbench/parts/quickopen', project: workbenchProject }, + { name: 'vs/workbench/parts/relauncher', project: workbenchProject }, { name: 'vs/workbench/parts/scm', project: workbenchProject }, { name: 'vs/workbench/parts/search', project: workbenchProject }, { name: 'vs/workbench/parts/snippets', project: workbenchProject }, + { name: 'vs/workbench/parts/surveys', project: workbenchProject }, { name: 'vs/workbench/parts/tasks', project: workbenchProject }, { name: 'vs/workbench/parts/terminal', project: workbenchProject }, { name: 'vs/workbench/parts/themes', project: workbenchProject }, { name: 'vs/workbench/parts/trust', project: workbenchProject }, { name: 'vs/workbench/parts/update', project: workbenchProject }, + { name: 'vs/workbench/parts/views', project: workbenchProject }, { name: 'vs/workbench/parts/watermark', project: workbenchProject }, { name: 'vs/workbench/parts/welcome', project: workbenchProject }, { name: 'vs/workbench/services/configuration', project: workbenchProject }, + { name: 'vs/workbench/services/crashReporter', project: workbenchProject }, { name: 'vs/workbench/services/editor', project: workbenchProject }, { name: 'vs/workbench/services/files', project: workbenchProject }, { name: 'vs/workbench/services/keybinding', project: workbenchProject }, { name: 'vs/workbench/services/message', project: workbenchProject }, { name: 'vs/workbench/services/mode', project: workbenchProject }, + { name: 'vs/workbench/services/progress', project: workbenchProject }, { name: 'vs/workbench/services/textfile', project: workbenchProject }, { name: 'vs/workbench/services/themes', project: workbenchProject }, { name: 'setup_messages', project: workbenchProject } From 1f3721743d5b9664902241d8657ad41fef14dd6e Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 7 Jun 2017 13:04:31 +0200 Subject: [PATCH 1593/2747] Clojure mode for .cljc files. Fixes #27741 --- extensions/clojure/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/clojure/package.json b/extensions/clojure/package.json index 23a065a7fbeb6..b404ef5fb8ae4 100644 --- a/extensions/clojure/package.json +++ b/extensions/clojure/package.json @@ -10,7 +10,7 @@ "languages": [{ "id": "clojure", "aliases": ["Clojure", "clojure"], - "extensions": [".clj", ".cljs", ".cljx", ".clojure", ".edn"], + "extensions": [".clj", ".cljs", ".cljc", ".cljx", ".clojure", ".edn"], "configuration": "./language-configuration.json" }], "grammars": [{ From b83ec1a0e1643a8dc750a75d9b1bd997a142a8e6 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 7 Jun 2017 13:04:59 +0200 Subject: [PATCH 1594/2747] fix #26275 --- src/vs/base/common/strings.ts | 37 ++++++ src/vs/base/test/common/strings.test.ts | 10 ++ .../electron-browser/snippetsService.ts | 123 ++++++++++-------- .../electron-browser/snippetsService.test.ts | 88 +++++++++++++ 4 files changed, 205 insertions(+), 53 deletions(-) create mode 100644 src/vs/workbench/parts/snippets/test/electron-browser/snippetsService.test.ts diff --git a/src/vs/base/common/strings.ts b/src/vs/base/common/strings.ts index 83bbdaf61b055..a106860ac9e8f 100644 --- a/src/vs/base/common/strings.ts +++ b/src/vs/base/common/strings.ts @@ -468,6 +468,43 @@ export function commonSuffixLength(a: string, b: string): number { return len; } +function substrEquals(a: string, aStart: number, aEnd: number, b: string, bStart: number, bEnd: number): boolean { + while (aStart < aEnd && bStart < bEnd) { + if (a[aStart] !== b[bStart]) { + return false; + } + aStart += 1; + bStart += 1; + } + return true; +} + +/** + * Return the overlap between the suffix of `a` and the prefix of `b`. + * For instance `overlap("foobar", "arr, I'm a pirate") === 2`. + */ +export function overlap(a: string, b: string): number { + let aEnd = a.length; + let bEnd = b.length; + let aStart = aEnd - bEnd; + + if (aStart === 0) { + return a === b ? aEnd : 0; + } else if (aStart < 0) { + bEnd += aStart; + aStart = 0; + } + + while (aStart < aEnd && bEnd > 0) { + if (substrEquals(a, aStart, aEnd, b, 0, bEnd)) { + return bEnd; + } + bEnd -= 1; + aStart += 1; + } + return 0; +} + // --- unicode // http://en.wikipedia.org/wiki/Surrogate_pair // Returns the code point starting at a specified index in a string diff --git a/src/vs/base/test/common/strings.test.ts b/src/vs/base/test/common/strings.test.ts index 07d750b0ecda7..813b94abafe06 100644 --- a/src/vs/base/test/common/strings.test.ts +++ b/src/vs/base/test/common/strings.test.ts @@ -93,6 +93,16 @@ suite('Strings', () => { assert.strictEqual(strings.format('Foo {0} Bar. {1}', '(foo)', '.test'), 'Foo (foo) Bar. .test'); }); + test('overlap', function () { + assert.equal(strings.overlap('foobar', 'arr, I am a priate'), 2); + assert.equal(strings.overlap('no', 'overlap'), 1); + assert.equal(strings.overlap('no', '0verlap'), 0); + assert.equal(strings.overlap('nothing', ''), 0); + assert.equal(strings.overlap('', 'nothing'), 0); + assert.equal(strings.overlap('full', 'full'), 4); + assert.equal(strings.overlap('full', 'fulloverlap'), 4); + }); + test('computeLineStarts', function () { function assertLineStart(text: string, ...offsets: number[]): void { const actual = strings.computeLineStarts(text); diff --git a/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts b/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts index 31b32d88c8a6f..43fe76a8ce04d 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts @@ -5,7 +5,6 @@ 'use strict'; import { localize } from 'vs/nls'; -import * as strings from 'vs/base/common/strings'; import { IModel } from 'vs/editor/common/editorCommon'; import { ISuggestSupport, ISuggestResult, ISuggestion, LanguageId } from 'vs/editor/common/modes'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; @@ -13,6 +12,7 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions'; import { setSnippetSuggestSupport } from 'vs/editor/contrib/suggest/browser/suggest'; import { IModeService } from 'vs/editor/common/services/modeService'; import { Position } from 'vs/editor/common/core/position'; +import { overlap, compare, startsWith } from 'vs/base/common/strings'; export const ISnippetsService = createDecorator('snippetService'); @@ -23,6 +23,8 @@ export interface ISnippetsService { registerSnippets(languageId: LanguageId, snippets: ISnippet[], owner: string): void; visitSnippets(languageId: LanguageId, accept: (snippet: ISnippet) => void): void; + + getSnippets(languageId: LanguageId): ISnippet[]; } export interface ISnippet { @@ -33,11 +35,7 @@ export interface ISnippet { extensionName?: string; } -interface ISnippetSuggestion extends ISuggestion { - disambiguateLabel: string; -} - -class SnippetsService implements ISnippetsService { +export class SnippetsService implements ISnippetsService { _serviceBrand: any; @@ -49,14 +47,14 @@ class SnippetsService implements ISnippetsService { setSnippetSuggestSupport(new SnippetSuggestProvider(modeService, this)); } - public registerSnippets(languageId: LanguageId, snippets: ISnippet[], fileName: string): void { + registerSnippets(languageId: LanguageId, snippets: ISnippet[], fileName: string): void { if (!this._snippets.has(languageId)) { this._snippets.set(languageId, new Map()); } this._snippets.get(languageId).set(fileName, snippets); } - public visitSnippets(languageId: LanguageId, accept: (snippet: ISnippet) => boolean): void { + visitSnippets(languageId: LanguageId, accept: (snippet: ISnippet) => boolean): void { const modeSnippets = this._snippets.get(languageId); if (modeSnippets) { modeSnippets.forEach(snippets => { @@ -67,6 +65,17 @@ class SnippetsService implements ISnippetsService { }); } } + + getSnippets(languageId: LanguageId): ISnippet[] { + const modeSnippets = this._snippets.get(languageId); + const ret: ISnippet[] = []; + if (modeSnippets) { + modeSnippets.forEach(snippets => { + ret.push(...snippets); + }); + } + return ret; + } } registerSingleton(ISnippetsService, SnippetsService); @@ -75,7 +84,13 @@ export interface ISimpleModel { getLineContent(lineNumber: number): string; } -class SnippetSuggestProvider implements ISuggestSupport { +interface ISnippetSuggestion { + suggestion: ISuggestion; + snippet: ISnippet; +} + + +export class SnippetSuggestProvider implements ISuggestSupport { constructor( @IModeService private _modeService: IModeService, @@ -87,55 +102,57 @@ class SnippetSuggestProvider implements ISuggestSupport { provideCompletionItems(model: IModel, position: Position): ISuggestResult { const languageId = this._getLanguageIdAtPosition(model, position); - const suggestions: ISnippetSuggestion[] = []; - - const word = model.getWordAtPosition(position); - const currentWord = word ? word.word.substring(0, position.column - word.startColumn).toLowerCase() : ''; - const currentFullWord = getNonWhitespacePrefix(model, position).toLowerCase(); - - this._snippets.visitSnippets(languageId, s => { - const prefixLower = s.prefix.toLowerCase(); - - let overwriteBefore = 0; - if (currentWord.length > 0) { - // there is a word -> the prefix should match that - if (strings.startsWith(prefixLower, currentWord)) { - overwriteBefore = currentWord.length; - } else { - return true; - } + const snippets = this._snippets.getSnippets(languageId); + const items: ISnippetSuggestion[] = []; - } else if (currentFullWord.length > currentWord.length) { - // there is something -> fine if it matches - overwriteBefore = strings.commonPrefixLength(prefixLower, currentFullWord); - } + const lowWordUntil = model.getWordUntilPosition(position).word.toLowerCase(); + const lowLineUntil = model.getLineContent(position.lineNumber).substr(Math.max(0, position.column - 100), position.column - 1).toLowerCase(); - // store in result - suggestions.push({ - type: 'snippet', - label: s.prefix, - get disambiguateLabel() { return localize('snippetSuggest.longLabel', "{0}, {1}", s.prefix, s.name); }, - detail: s.extensionName || localize('detail.userSnippet', "User Snippet"), - documentation: s.description, - insertText: s.codeSnippet, - sortText: `${s.prefix}-${s.extensionName || ''}`, - noAutoAccept: true, - snippetType: 'textmate', - overwriteBefore - }); + for (const snippet of snippets) { + + const lowPrefix = snippet.prefix.toLowerCase(); + let overwriteBefore: number; - return true; - }); + if (lowWordUntil.length > 0 && startsWith(lowPrefix, lowWordUntil)) { + // cheap match on the (none-empty) current word + overwriteBefore = lowWordUntil.length; + + } else if (lowLineUntil.length > 0) { + // compute overlap between snippet and line on text + overwriteBefore = overlap(lowLineUntil, snippet.prefix.toLowerCase()); + } + + if (overwriteBefore !== 0) { + + items.push({ + snippet, + suggestion: { + type: 'snippet', + label: snippet.prefix, + detail: snippet.extensionName || localize('detail.userSnippet', "User Snippet"), + documentation: snippet.description, + insertText: snippet.codeSnippet, + sortText: `${snippet.prefix}-${snippet.extensionName || ''}`, + noAutoAccept: true, + snippetType: 'textmate', + overwriteBefore + } + }); + } + } // dismbiguate suggestions with same labels - let lastSuggestion: ISnippetSuggestion; - for (const suggestion of suggestions.sort(SnippetSuggestProvider._compareSuggestionsByLabel)) { - if (lastSuggestion && lastSuggestion.label === suggestion.label) { + const suggestions: ISuggestion[] = []; + let lastItem: ISnippetSuggestion; + for (const item of items.sort(SnippetSuggestProvider._compareSuggestionsByLabel)) { + if (lastItem && lastItem.suggestion.label === item.suggestion.label) { // use the disambiguateLabel instead of the actual label - lastSuggestion.label = lastSuggestion.disambiguateLabel; - suggestion.label = suggestion.disambiguateLabel; + lastItem.suggestion.label = localize('snippetSuggest.longLabel', "{0}, {1}", lastItem.suggestion.label, lastItem.snippet.name); + item.suggestion.label = localize('snippetSuggest.longLabel', "{0}, {1}", item.suggestion.label, item.snippet.name); } - lastSuggestion = suggestion; + lastItem = item; + + suggestions.push(item.suggestion); } return { suggestions }; @@ -154,8 +171,8 @@ class SnippetSuggestProvider implements ISuggestSupport { return languageId; } - private static _compareSuggestionsByLabel(a: ISuggestion, b: ISuggestion): number { - return strings.compare(a.label, b.label); + private static _compareSuggestionsByLabel(a: ISnippetSuggestion, b: ISnippetSuggestion): number { + return compare(a.suggestion.label, b.suggestion.label); } } diff --git a/src/vs/workbench/parts/snippets/test/electron-browser/snippetsService.test.ts b/src/vs/workbench/parts/snippets/test/electron-browser/snippetsService.test.ts new file mode 100644 index 0000000000000..d9fa6f1b29400 --- /dev/null +++ b/src/vs/workbench/parts/snippets/test/electron-browser/snippetsService.test.ts @@ -0,0 +1,88 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as assert from 'assert'; +import { SnippetsService, ISnippet, SnippetSuggestProvider } from 'vs/workbench/parts/snippets/electron-browser/snippetsService'; +import { Position } from 'vs/editor/common/core/position'; +import { ModesRegistry } from 'vs/editor/common/modes/modesRegistry'; +import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl'; +import { Model } from 'vs/editor/common/model/model'; + +suite('SnippetsService', function () { + + suiteSetup(function () { + ModesRegistry.registerLanguage({ + id: 'fooLang', + extensions: ['.fooLang',] + }); + }); + + let modeService: ModeServiceImpl; + let snippetService: SnippetsService; + + setup(function () { + modeService = new ModeServiceImpl(); + snippetService = new SnippetsService(modeService); + + snippetService.registerSnippets(modeService.getLanguageIdentifier('fooLang').id, [{ + prefix: 'bar', + codeSnippet: 'barCodeSnippet', + name: 'barTest', + description: '' + }, { + prefix: 'bazz', + codeSnippet: 'bazzCodeSnippet', + name: 'bazzTest', + description: '' + }], 'fooFile.json'); + }); + + test('snippet completions - simple', function () { + + const provider = new SnippetSuggestProvider(modeService, snippetService); + const model = Model.createFromString('', undefined, modeService.getLanguageIdentifier('fooLang')); + + const result = provider.provideCompletionItems(model, new Position(1, 1)); + + assert.equal(result.incomplete, undefined); + assert.equal(result.suggestions.length, 2); + }); + + test('snippet completions - with prefix', function () { + + const provider = new SnippetSuggestProvider(modeService, snippetService); + const model = Model.createFromString('bar', undefined, modeService.getLanguageIdentifier('fooLang')); + + const result = provider.provideCompletionItems(model, new Position(1, 4)); + + assert.equal(result.incomplete, undefined); + assert.equal(result.suggestions.length, 1); + assert.equal(result.suggestions[0].label, 'bar'); + assert.equal(result.suggestions[0].insertText, 'barCodeSnippet'); + }); + + test('Cannot use "[{ + prefix: ' Date: Wed, 7 Jun 2017 15:27:50 +0200 Subject: [PATCH 1595/2747] Improve commands picker (#28184) --- .../ui/resourceviewer/resourceViewer.ts | 4 +- src/vs/base/common/filters.ts | 4 +- src/vs/base/common/glob.ts | 4 +- src/vs/base/common/map.ts | 93 ++-- src/vs/base/common/strings.ts | 4 +- .../parts/quickopen/browser/quickOpenModel.ts | 30 ++ .../quickopen/browser/quickOpenWidget.ts | 19 +- .../parts/quickopen/browser/quickopen.css | 12 +- src/vs/base/test/common/map.test.ts | 162 +++++-- .../test/common/instantiationServiceMock.ts | 6 +- src/vs/platform/quickOpen/common/quickOpen.ts | 1 + .../browser/parts/editor/editorPicker.ts | 14 +- .../browser/parts/editor/tabsTitleControl.ts | 6 +- .../parts/quickopen/quickOpenController.ts | 25 +- src/vs/workbench/browser/quickopen.ts | 101 +---- .../electron-browser/main.contribution.ts | 10 + .../node/extensionsWorkbenchService.ts | 2 +- .../parts/markers/common/markersModel.ts | 4 +- .../preferences/browser/preferencesService.ts | 2 +- .../parts/preferences/common/preferences.ts | 2 +- .../preferences/common/preferencesModels.ts | 2 +- .../quickopen/browser/commandsHandler.ts | 423 ++++++++++++------ .../browser/media/commandsHandler.css | 14 - .../browser/quickopen.contribution.ts | 5 +- .../quickopen/browser/viewPickerHandler.ts | 6 +- .../parts/search/common/searchModel.ts | 16 +- 26 files changed, 602 insertions(+), 369 deletions(-) delete mode 100644 src/vs/workbench/parts/quickopen/browser/media/commandsHandler.css diff --git a/src/vs/base/browser/ui/resourceviewer/resourceViewer.ts b/src/vs/base/browser/ui/resourceviewer/resourceViewer.ts index ea437ffc78b6f..4244dc01a59b4 100644 --- a/src/vs/base/browser/ui/resourceviewer/resourceViewer.ts +++ b/src/vs/base/browser/ui/resourceviewer/resourceViewer.ts @@ -13,7 +13,7 @@ import paths = require('vs/base/common/paths'); import { Builder, $ } from 'vs/base/browser/builder'; import DOM = require('vs/base/browser/dom'); import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; -import { BoundedLinkedMap } from 'vs/base/common/map'; +import { BoundedMap } from 'vs/base/common/map'; interface MapExtToMediaMimes { @@ -80,7 +80,7 @@ export interface IResourceDescriptor { // we need to bypass the cache or not. We could always bypass the cache everytime we show the image // however that has very bad impact on memory consumption because each time the image gets shown, // memory grows (see also https://github.com/electron/electron/issues/6275) -const IMAGE_RESOURCE_ETAG_CACHE = new BoundedLinkedMap<{ etag: string, src: string }>(100); +const IMAGE_RESOURCE_ETAG_CACHE = new BoundedMap<{ etag: string, src: string }>(100); function imageSrc(descriptor: IResourceDescriptor): string { const src = descriptor.resource.toString(); diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index d4b186650ccd2..e6404bb6edc5d 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -5,7 +5,7 @@ 'use strict'; import strings = require('vs/base/common/strings'); -import { BoundedLinkedMap } from 'vs/base/common/map'; +import { BoundedMap } from 'vs/base/common/map'; import { CharCode } from 'vs/base/common/charCode'; export interface IFilter { @@ -334,7 +334,7 @@ export enum SubstringMatching { export const fuzzyContiguousFilter = or(matchesPrefix, matchesCamelCase, matchesContiguousSubString); const fuzzySeparateFilter = or(matchesPrefix, matchesCamelCase, matchesSubString); -const fuzzyRegExpCache = new BoundedLinkedMap(10000); // bounded to 10000 elements +const fuzzyRegExpCache = new BoundedMap(10000); // bounded to 10000 elements export function matchesFuzzy(word: string, wordToMatchAgainst: string, enableSeparateSubstringMatching = false): IMatch[] { if (typeof word !== 'string' || typeof wordToMatchAgainst !== 'string') { diff --git a/src/vs/base/common/glob.ts b/src/vs/base/common/glob.ts index 7197d9ed8013c..33da9d6b879ea 100644 --- a/src/vs/base/common/glob.ts +++ b/src/vs/base/common/glob.ts @@ -7,7 +7,7 @@ import arrays = require('vs/base/common/arrays'); import strings = require('vs/base/common/strings'); import paths = require('vs/base/common/paths'); -import { BoundedLinkedMap } from 'vs/base/common/map'; +import { BoundedMap } from 'vs/base/common/map'; import { CharCode } from 'vs/base/common/charCode'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -242,7 +242,7 @@ interface ParsedExpressionPattern { allPaths?: string[]; } -const CACHE = new BoundedLinkedMap(10000); // bounded to 10000 elements +const CACHE = new BoundedMap(10000); // bounded to 10000 elements const FALSE = function () { return false; diff --git a/src/vs/base/common/map.ts b/src/vs/base/common/map.ts index 09c03b971b099..ba7089dd8296e 100644 --- a/src/vs/base/common/map.ts +++ b/src/vs/base/common/map.ts @@ -12,8 +12,6 @@ export interface Key { } export interface Entry { - next?: Entry; - prev?: Entry; key: K; value: T; } @@ -22,7 +20,7 @@ export interface Entry { * A simple map to store value by a key object. Key can be any object that has toString() function to get * string value of the key. */ -export class LinkedMap { +export class SimpleMap { protected map: { [key: string]: Entry }; protected _size: number; @@ -122,22 +120,64 @@ export class LinkedMap { } } +export interface ISerializedBoundedLinkedMap { + entries: { key: string; value: T }[]; +} + +export interface LinkedEntry extends Entry { + next?: LinkedEntry; + prev?: LinkedEntry; +} + /** * A simple Map that optionally allows to set a limit of entries to store. Once the limit is hit, * the cache will remove the entry that was last recently added. Or, if a ratio is provided below 1, * all elements will be removed until the ratio is full filled (e.g. 0.75 to remove 25% of old elements). */ -export class BoundedLinkedMap { - protected map: { [key: string]: Entry }; - private head: Entry; - private tail: Entry; +export class BoundedMap { + protected map: { [key: string]: LinkedEntry }; + + private head: LinkedEntry; + private tail: LinkedEntry; private _size: number; private ratio: number; - constructor(private limit = Number.MAX_VALUE, ratio = 1) { + constructor(private limit = Number.MAX_VALUE, ratio = 1, value?: ISerializedBoundedLinkedMap) { this.map = Object.create(null); this._size = 0; this.ratio = limit * ratio; + + if (value) { + value.entries.forEach(entry => { + this.set(entry.key, entry.value); + }); + } + } + + public setLimit(limit: number): void { + if (limit < 0) { + return; // invalid limit + } + + this.limit = limit; + while (this._size > this.limit) { + this.trim(); + } + } + + public serialize(): ISerializedBoundedLinkedMap { + const serialized: ISerializedBoundedLinkedMap = { entries: [] }; + + let element = this.tail; + while (element) { + serialized.entries.push({ key: element.key, value: element.value }); + if (element === element.next) { + break; // end reached + } + element = element.next; + } + + return serialized; } public get size(): number { @@ -149,7 +189,7 @@ export class BoundedLinkedMap { return false; // already present! } - const entry: Entry = { key, value }; + const entry: LinkedEntry = { key, value }; this.push(entry); if (this._size > this.limit) { @@ -212,7 +252,7 @@ export class BoundedLinkedMap { this.tail = null; } - protected push(entry: Entry): void { + protected push(entry: LinkedEntry): void { if (this.head) { // [A]-[B] = [A]-[B]->[X] entry.prev = this.head; @@ -264,41 +304,14 @@ export class BoundedLinkedMap { // [x]-[B] = [B] this.tail = this.tail.next; - this.tail.prev = null; + if (this.tail) { + this.tail.prev = null; + } } } } } -/** - * A subclass of Map that makes an entry the MRU entry as soon - * as it is being accessed. In combination with the limit for the - * maximum number of elements in the cache, it helps to remove those - * entries from the cache that are LRU. - */ -export class LRUCache extends BoundedLinkedMap { - - constructor(limit: number) { - super(limit); - } - - public get(key: string): T { - - // Upon access of an entry, make it the head of - // the linked map so that it is the MRU element - const entry = this.map[key]; - if (entry) { - this.delete(key); - this.push(entry); - - return entry.value; - } - - - return null; - } -} - // --- trie'ish datastructure class Node { diff --git a/src/vs/base/common/strings.ts b/src/vs/base/common/strings.ts index a106860ac9e8f..1bed21cd31574 100644 --- a/src/vs/base/common/strings.ts +++ b/src/vs/base/common/strings.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { BoundedLinkedMap } from 'vs/base/common/map'; +import { BoundedMap } from 'vs/base/common/map'; import { CharCode } from 'vs/base/common/charCode'; /** @@ -251,7 +251,7 @@ export function regExpLeadsToEndlessLoop(regexp: RegExp): boolean { */ export let canNormalize = typeof (('').normalize) === 'function'; const nonAsciiCharactersPattern = /[^\u0000-\u0080]/; -const normalizedCache = new BoundedLinkedMap(10000); // bounded to 10000 elements +const normalizedCache = new BoundedMap(10000); // bounded to 10000 elements export function normalizeNFC(str: string): string { if (!canNormalize || !str) { return str; diff --git a/src/vs/base/parts/quickopen/browser/quickOpenModel.ts b/src/vs/base/parts/quickopen/browser/quickOpenModel.ts index 06629740fd7cd..7023eed367219 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenModel.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenModel.ts @@ -21,6 +21,9 @@ import { ActionBar, IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { HighlightedLabel } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel'; import DOM = require('vs/base/browser/dom'); import { IQuickOpenStyles } from 'vs/base/parts/quickopen/browser/quickOpenWidget'; +import { KeybindingLabel } from "vs/base/browser/ui/keybindingLabel/keybindingLabel"; +import { OS } from "vs/base/common/platform"; +import { ResolvedKeybinding } from "vs/base/common/keyCodes"; export interface IContext { event: any; @@ -108,6 +111,13 @@ export class QuickOpenEntry { return null; } + /** + * An optional keybinding to show for an entry. + */ + public getKeybinding(): ResolvedKeybinding { + return null; + } + /** * A resource for this entry. Resource URIs can be used to compare different kinds of entries and group * them together. @@ -389,6 +399,7 @@ export interface IQuickOpenEntryTemplateData { label: IconLabel; detail: HighlightedLabel; description: HighlightedLabel; + keybinding: KeybindingLabel; actionBar: ActionBar; } @@ -449,6 +460,12 @@ class Renderer implements IRenderer { DOM.addClass(descriptionContainer, 'quick-open-entry-description'); const description = new HighlightedLabel(descriptionContainer); + // Keybinding + const keybindingContainer = document.createElement('span'); + row1.appendChild(keybindingContainer); + DOM.addClass(keybindingContainer, 'quick-open-entry-keybinding'); + const keybinding = new KeybindingLabel(keybindingContainer, OS); + // Detail const detailContainer = document.createElement('div'); row2.appendChild(detailContainer); @@ -481,6 +498,7 @@ class Renderer implements IRenderer { label, detail, description, + keybinding, group, actionBar }; @@ -508,6 +526,13 @@ class Renderer implements IRenderer { } }); + // Entry group class + if (entry instanceof QuickOpenEntryGroup && entry.getGroupLabel()) { + DOM.addClass(data.container, 'has-group-label'); + } else { + DOM.removeClass(data.container, 'has-group-label'); + } + // Entry group if (entry instanceof QuickOpenEntryGroup) { const group = entry; @@ -547,6 +572,9 @@ class Renderer implements IRenderer { // Description data.description.set(entry.getDescription(), descriptionHighlights || []); data.description.element.title = entry.getDescription(); + + // Keybinding + data.keybinding.set(entry.getKeybinding(), null); } } @@ -558,6 +586,8 @@ class Renderer implements IRenderer { data.entry = null; data.description.dispose(); data.description = null; + data.keybinding.dispose(); + data.keybinding = null; data.detail.dispose(); data.detail = null; data.group = null; diff --git a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts index 5ac4eba897286..54953ca6c8e50 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts @@ -15,7 +15,7 @@ import { IQuickNavigateConfiguration, IAutoFocus, IEntryRunContext, IModel, Mode import { Filter, Renderer, DataSource, IModelProvider, AccessibilityProvider } from 'vs/base/parts/quickopen/browser/quickOpenViewer'; import { Dimension, Builder, $ } from 'vs/base/browser/builder'; import { ISelectionEvent, IFocusEvent, ITree, ContextMenuEvent, IActionProvider, ITreeStyles } from 'vs/base/parts/tree/browser/tree'; -import { InputBox, MessageType, IInputBoxStyles } from 'vs/base/browser/ui/inputbox/inputBox'; +import { InputBox, MessageType, IInputBoxStyles, IRange } from 'vs/base/browser/ui/inputbox/inputBox'; import Severity from 'vs/base/common/severity'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { ProgressBar } from 'vs/base/browser/ui/progressbar/progressbar'; @@ -59,6 +59,7 @@ export interface IQuickOpenStyles extends IInputBoxStyles, ITreeStyles { export interface IShowOptions { quickNavigateConfiguration?: IQuickNavigateConfiguration; autoFocus?: IAutoFocus; + inputSelection?: IRange; } export interface IQuickOpenUsageLogger { @@ -202,8 +203,11 @@ export class QuickOpenWidget implements IModelProvider { this.navigateInTree(keyboardEvent.keyCode, keyboardEvent.shiftKey); - // Position cursor at the end of input to allow right arrow (open in background) to function immediately - this.inputBox.inputElement.selectionStart = this.inputBox.value.length; + // Position cursor at the end of input to allow right arrow (open in background) + // to function immediately unless the user has made a selection + if (this.inputBox.inputElement.selectionStart === this.inputBox.inputElement.selectionEnd) { + this.inputBox.inputElement.selectionStart = this.inputBox.value.length; + } } // Select element on Enter or on Arrow-Right if we are at the end of the input @@ -392,7 +396,9 @@ export class QuickOpenWidget implements IModelProvider { return false; // no modifiers allowed } - return this.inputBox.inputElement.selectionStart === this.inputBox.value.length; // only when cursor is at the end of the input field value + // validate the cursor is at the end of the input, and if not prevent + // opening in the background such as the selection can be changed + return this.inputBox.inputElement.selectionEnd === this.inputBox.value.length; } private onType(): void { @@ -561,6 +567,11 @@ export class QuickOpenWidget implements IModelProvider { this.doShowWithInput(param, options && options.autoFocus ? options.autoFocus : {}); } + // Respect selectAll option + if (options && options.inputSelection && !this.quickNavigateConfiguration) { + this.inputBox.select(options.inputSelection); + } + if (this.callbacks.onShow) { this.callbacks.onShow(); } diff --git a/src/vs/base/parts/quickopen/browser/quickopen.css b/src/vs/base/parts/quickopen/browser/quickopen.css index 84eb7d781fbc2..9173f8121cc9b 100644 --- a/src/vs/base/parts/quickopen/browser/quickopen.css +++ b/src/vs/base/parts/quickopen/browser/quickopen.css @@ -36,7 +36,7 @@ } .quick-open-widget .quick-open-tree { - line-height: 1.8em; + line-height: 22px; } .quick-open-widget .quick-open-tree .monaco-tree-row > .content > .sub-content { @@ -87,6 +87,14 @@ text-overflow: ellipsis; } +.quick-open-widget .quick-open-tree .content.has-group-label .quick-open-entry-keybinding { + margin-right: 8px; +} + +.quick-open-widget .quick-open-tree .quick-open-entry-keybinding .monaco-kbkey { + vertical-align: inherit; +} + .quick-open-widget .quick-open-tree .results-group { margin-right: 18px; } @@ -121,7 +129,7 @@ } .monaco-tree .monaco-tree-row > .content.actions > .primary-action-bar { - line-height: 1em; + line-height: 22px; } .monaco-tree .monaco-tree-row > .content.actions > .primary-action-bar { diff --git a/src/vs/base/test/common/map.test.ts b/src/vs/base/test/common/map.test.ts index 43cbc7b44b944..38998ac5fb8b4 100644 --- a/src/vs/base/test/common/map.test.ts +++ b/src/vs/base/test/common/map.test.ts @@ -5,14 +5,14 @@ 'use strict'; -import { BoundedLinkedMap, LRUCache, LinkedMap, TrieMap, ResourceMap } from 'vs/base/common/map'; +import { BoundedMap, SimpleMap, TrieMap, ResourceMap } from 'vs/base/common/map'; import * as assert from 'assert'; import URI from 'vs/base/common/uri'; suite('Map', () => { - test('LinkedMap - basics', function () { - const map = new LinkedMap(); + test('SimpleMap - basics', function () { + const map = new SimpleMap(); assert.equal(map.size, 0); @@ -72,8 +72,8 @@ suite('Map', () => { assert.equal(res, 'bar'); }); - test('BoundedLinkedMap - basics', function () { - const map = new BoundedLinkedMap(); + test('BoundedMap - basics', function () { + const map = new BoundedMap(); assert.equal(map.size, 0); @@ -133,8 +133,96 @@ suite('Map', () => { assert.equal(res, 'bar'); }); - test('BoundedLinkedMap - bounded', function () { - const map = new BoundedLinkedMap(5); + test('BoundedMap - serialization', function () { + const map = new BoundedMap(5); + + map.set('1', 1); + map.set('2', '2'); + map.set('3', true); + + const obj = Object.create(null); + map.set('4', obj); + + const date = Date.now(); + map.set('5', date); + + const mapClone = new BoundedMap(5, 1, map.serialize()); + + assert.deepEqual(map.serialize(), mapClone.serialize()); + + assert.equal(mapClone.size, 5); + assert.equal(mapClone.get('1'), 1); + assert.equal(mapClone.get('2'), '2'); + assert.equal(mapClone.get('3'), true); + assert.equal(mapClone.get('4'), obj); + assert.equal(mapClone.get('5'), date); + assert.ok(!mapClone.get('6')); + + mapClone.set('6', '6'); + assert.equal(mapClone.size, 5); + assert.ok(!mapClone.get('1')); + }); + + test('BoundedMap - setLimit', function () { + const map = new BoundedMap(5); + + map.set('1', 1); + map.set('2', '2'); + map.set('3', true); + + const obj = Object.create(null); + map.set('4', obj); + + const date = Date.now(); + map.set('5', date); + + assert.equal(map.size, 5); + assert.equal(map.get('1'), 1); + assert.equal(map.get('2'), '2'); + assert.equal(map.get('3'), true); + assert.equal(map.get('4'), obj); + assert.equal(map.get('5'), date); + assert.ok(!map.get('6')); + + map.setLimit(3); + + assert.equal(map.size, 3); + assert.ok(!map.get('1')); + assert.ok(!map.get('2')); + assert.equal(map.get('3'), true); + assert.equal(map.get('4'), obj); + assert.equal(map.get('5'), date); + + map.setLimit(0); + + assert.equal(map.size, 0); + assert.ok(!map.get('3')); + assert.ok(!map.get('4')); + assert.ok(!map.get('5')); + + map.set('6', 6); + + assert.equal(map.size, 0); + assert.ok(!map.get('6')); + + map.setLimit(100); + + map.set('1', 1); + map.set('2', '2'); + map.set('3', true); + map.set('4', obj); + map.set('5', date); + + assert.equal(map.size, 5); + assert.equal(map.get('1'), 1); + assert.equal(map.get('2'), '2'); + assert.equal(map.get('3'), true); + assert.equal(map.get('4'), obj); + assert.equal(map.get('5'), date); + }); + + test('BoundedMap - bounded', function () { + const map = new BoundedMap(5); assert.equal(0, map.size); @@ -202,8 +290,8 @@ suite('Map', () => { assert.equal(map.get('14'), 14); }); - test('BoundedLinkedMap - bounded with ratio', function () { - const map = new BoundedLinkedMap(6, 0.5); + test('BoundedMap - bounded with ratio', function () { + const map = new BoundedMap(6, 0.5); assert.equal(0, map.size); @@ -240,37 +328,47 @@ suite('Map', () => { assert.equal(map.get('10'), 10); }); - test('LRUCache', function () { - const cache = new LRUCache(3); + test('BoundedMap - MRU order', function () { + const map = new BoundedMap(3); - assert.equal(0, cache.size); + function peek(key) { + const res = map.get(key); + if (res) { + map.delete(key); + map.set(key, res); + } - cache.set('1', 1); - cache.set('2', 2); - cache.set('3', 3); + return res; + } - assert.equal(3, cache.size); + assert.equal(0, map.size); - assert.equal(cache.get('1'), 1); - assert.equal(cache.get('2'), 2); - assert.equal(cache.get('3'), 3); + map.set('1', 1); + map.set('2', 2); + map.set('3', 3); - cache.set('4', 4); + assert.equal(3, map.size); - assert.equal(3, cache.size); - assert.equal(cache.get('4'), 4); // this changes MRU order - assert.equal(cache.get('3'), 3); - assert.equal(cache.get('2'), 2); + assert.equal(map.get('1'), 1); + assert.equal(map.get('2'), 2); + assert.equal(map.get('3'), 3); + + map.set('4', 4); + + assert.equal(3, map.size); + assert.equal(peek('4'), 4); // this changes MRU order + assert.equal(peek('3'), 3); + assert.equal(peek('2'), 2); - cache.set('5', 5); - cache.set('6', 6); + map.set('5', 5); + map.set('6', 6); - assert.equal(3, cache.size); - assert.equal(cache.get('2'), 2); - assert.equal(cache.get('5'), 5); - assert.equal(cache.get('6'), 6); - assert.ok(!cache.has('3')); - assert.ok(!cache.has('4')); + assert.equal(3, map.size); + assert.equal(peek('2'), 2); + assert.equal(peek('5'), 5); + assert.equal(peek('6'), 6); + assert.ok(!map.has('3')); + assert.ok(!map.has('4')); }); diff --git a/src/vs/platform/instantiation/test/common/instantiationServiceMock.ts b/src/vs/platform/instantiation/test/common/instantiationServiceMock.ts index c759246ea8f08..717d46e30a1e9 100644 --- a/src/vs/platform/instantiation/test/common/instantiationServiceMock.ts +++ b/src/vs/platform/instantiation/test/common/instantiationServiceMock.ts @@ -8,7 +8,7 @@ import * as sinon from 'sinon'; import { TPromise } from 'vs/base/common/winjs.base'; import * as types from 'vs/base/common/types'; -import { LinkedMap } from 'vs/base/common/map'; +import { SimpleMap } from 'vs/base/common/map'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; @@ -20,12 +20,12 @@ interface IServiceMock { export class TestInstantiationService extends InstantiationService { - private _servciesMap: LinkedMap, any>; + private _servciesMap: SimpleMap, any>; constructor(private _serviceCollection: ServiceCollection = new ServiceCollection()) { super(_serviceCollection); - this._servciesMap = new LinkedMap, any>(); + this._servciesMap = new SimpleMap, any>(); } public get(service: ServiceIdentifier): T { diff --git a/src/vs/platform/quickOpen/common/quickOpen.ts b/src/vs/platform/quickOpen/common/quickOpen.ts index 160539465d55b..6fe5fcc616914 100644 --- a/src/vs/platform/quickOpen/common/quickOpen.ts +++ b/src/vs/platform/quickOpen/common/quickOpen.ts @@ -101,6 +101,7 @@ export interface IInputOptions { export interface IShowOptions { quickNavigateConfiguration?: IQuickNavigateConfiguration; + inputSelection?: { start: number; end: number; }; } export const IQuickOpenService = createDecorator('quickOpenService'); diff --git a/src/vs/workbench/browser/parts/editor/editorPicker.ts b/src/vs/workbench/browser/parts/editor/editorPicker.ts index d1a0d74383df7..4e73f77bb1564 100644 --- a/src/vs/workbench/browser/parts/editor/editorPicker.ts +++ b/src/vs/workbench/browser/parts/editor/editorPicker.ts @@ -12,7 +12,7 @@ import URI from 'vs/base/common/uri'; import errors = require('vs/base/common/errors'); import strings = require('vs/base/common/strings'); import { IIconLabelOptions } from 'vs/base/browser/ui/iconLabel/iconLabel'; -import { IAutoFocus, Mode, IEntryRunContext, IQuickNavigateConfiguration } from 'vs/base/parts/quickopen/common/quickOpen'; +import { IAutoFocus, Mode, IEntryRunContext, IQuickNavigateConfiguration, IModel } from 'vs/base/parts/quickopen/common/quickOpen'; import { QuickOpenModel, QuickOpenEntry, QuickOpenEntryGroup } from 'vs/base/parts/quickopen/browser/quickOpenModel'; import scorer = require('vs/base/common/scorer'); import { IModeService } from 'vs/editor/common/services/modeService'; @@ -185,8 +185,8 @@ export abstract class EditorGroupPicker extends BaseEditorPicker { return nls.localize('noOpenedEditors', "List of opened editors is currently empty in group"); } - public getAutoFocus(searchValue: string, quickNavigateConfiguration: IQuickNavigateConfiguration): IAutoFocus { - if (searchValue || !quickNavigateConfiguration) { + public getAutoFocus(searchValue: string, context: { model: IModel, quickNavigateConfiguration?: IQuickNavigateConfiguration }): IAutoFocus { + if (searchValue || !context.quickNavigateConfiguration) { return { autoFocusFirstEntry: true }; @@ -195,10 +195,10 @@ export abstract class EditorGroupPicker extends BaseEditorPicker { const stacks = this.editorGroupService.getStacksModel(); const group = stacks.groupAt(this.getPosition()); if (!group) { - return super.getAutoFocus(searchValue); + return super.getAutoFocus(searchValue, context); } - const isShiftNavigate = (quickNavigateConfiguration && quickNavigateConfiguration.keybindings.some(k => { + const isShiftNavigate = (context.quickNavigateConfiguration && context.quickNavigateConfiguration.keybindings.some(k => { const [firstPart, chordPart] = k.getParts(); if (chordPart) { return false; @@ -262,13 +262,13 @@ export class AllEditorsPicker extends BaseEditorPicker { return nls.localize('noOpenedEditorsAllGroups', "List of opened editors is currently empty"); } - public getAutoFocus(searchValue: string): IAutoFocus { + public getAutoFocus(searchValue: string, context: { model: IModel, quickNavigateConfiguration?: IQuickNavigateConfiguration }): IAutoFocus { if (searchValue) { return { autoFocusFirstEntry: true }; } - return super.getAutoFocus(searchValue); + return super.getAutoFocus(searchValue, context); } } \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index 612f7aff73f41..c9a96445ccf63 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -36,7 +36,7 @@ import { IDisposable, dispose, combinedDisposable } from 'vs/base/common/lifecyc import { ScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import { extractResources } from 'vs/base/browser/dnd'; -import { LinkedMap } from 'vs/base/common/map'; +import { SimpleMap } from 'vs/base/common/map'; import { DelegatingWorkbenchEditorService } from 'vs/workbench/services/editor/browser/editorService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; @@ -320,8 +320,8 @@ export class TabsTitleControl extends TitleControl { private getUniqueTabLabels(editors: IEditorInput[]): IEditorInputLabel[] { const labels: IEditorInputLabel[] = []; - const mapLabelToDuplicates = new LinkedMap(); - const mapLabelAndDescriptionToDuplicates = new LinkedMap(); + const mapLabelToDuplicates = new SimpleMap(); + const mapLabelAndDescriptionToDuplicates = new SimpleMap(); // Build labels and descriptions for each editor editors.forEach(editor => { diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index 0bf51c9c1d76e..7a7872472ceff 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -36,7 +36,7 @@ import { Component } from 'vs/workbench/common/component'; import Event, { Emitter } from 'vs/base/common/event'; import { IPartService } from 'vs/workbench/services/part/common/partService'; import { KeyMod } from 'vs/base/common/keyCodes'; -import { QuickOpenHandler, QuickOpenHandlerDescriptor, IQuickOpenRegistry, Extensions, EditorQuickOpenEntry } from 'vs/workbench/browser/quickopen'; +import { QuickOpenHandler, QuickOpenHandlerDescriptor, IQuickOpenRegistry, Extensions, EditorQuickOpenEntry, IWorkbenchQuickOpenConfiguration } from 'vs/workbench/browser/quickopen'; import errors = require('vs/base/common/errors'); import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IPickOpenEntry, IFilePickOpenEntry, IInputOptions, IQuickOpenService, IPickOptions, IShowOptions } from 'vs/platform/quickOpen/common/quickOpen'; @@ -55,14 +55,6 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' const HELP_PREFIX = '?'; -interface IWorkbenchQuickOpenConfiguration { - workbench: { - quickOpen: { - closeOnFocusLost: boolean; - } - }; -} - interface IInternalPickOptions { value?: string; valueSelection?: [number, number]; @@ -140,7 +132,7 @@ export class QuickOpenController extends Component implements IQuickOpenService } private updateConfiguration(settings: IWorkbenchQuickOpenConfiguration): void { - this.closeOnFocusLost = settings.workbench.quickOpen.closeOnFocusLost; + this.closeOnFocusLost = settings.workbench && settings.workbench.quickOpen && settings.workbench.quickOpen.closeOnFocusLost; } public get onShow(): Event { @@ -520,6 +512,7 @@ export class QuickOpenController extends Component implements IQuickOpenService public show(prefix?: string, options?: IShowOptions): TPromise { let quickNavigateConfiguration = options ? options.quickNavigateConfiguration : void 0; + let inputSelection = options ? options.inputSelection : void 0; this.previousValue = prefix; @@ -570,7 +563,7 @@ export class QuickOpenController extends Component implements IQuickOpenService // Show quick open with prefix or editor history if (!this.quickOpenWidget.isVisible() || quickNavigateConfiguration) { if (prefix) { - this.quickOpenWidget.show(prefix, { quickNavigateConfiguration }); + this.quickOpenWidget.show(prefix, { quickNavigateConfiguration, inputSelection }); } else { const editorHistory = this.getEditorHistoryWithGroupLabel(); if (editorHistory.getEntries().length < 2) { @@ -585,13 +578,13 @@ export class QuickOpenController extends Component implements IQuickOpenService autoFocus = { autoFocusFirstEntry: visibleEditorCount === 0, autoFocusSecondEntry: visibleEditorCount !== 0 }; } - this.quickOpenWidget.show(editorHistory, { quickNavigateConfiguration, autoFocus }); + this.quickOpenWidget.show(editorHistory, { quickNavigateConfiguration, autoFocus, inputSelection }); } } // Otherwise reset the widget to the prefix that is passed in else { - this.quickOpenWidget.show(prefix || ''); + this.quickOpenWidget.show(prefix || '', { inputSelection }); } return promiseCompletedOnHide; @@ -887,7 +880,7 @@ export class QuickOpenController extends Component implements IQuickOpenService const placeHolderLabel = (typeof canRun === 'string') ? canRun : nls.localize('canNotRunPlaceholder', "This quick open handler can not be used in the current context"); const model = new QuickOpenModel([new PlaceholderQuickOpenEntry(placeHolderLabel)], this.actionProvider); - this.showModel(model, resolvedHandler.getAutoFocus(value, this.quickOpenWidget.getQuickNavigateConfiguration()), resolvedHandler.getAriaLabel()); + this.showModel(model, resolvedHandler.getAutoFocus(value, { model, quickNavigateConfiguration: this.quickOpenWidget.getQuickNavigateConfiguration() }), resolvedHandler.getAriaLabel()); return TPromise.as(null); } @@ -908,9 +901,9 @@ export class QuickOpenController extends Component implements IQuickOpenService if (this.currentResultToken === currentResultToken) { if (!result || !result.entries.length) { const model = new QuickOpenModel([new PlaceholderQuickOpenEntry(resolvedHandler.getEmptyLabel(value))]); - this.showModel(model, resolvedHandler.getAutoFocus(value, this.quickOpenWidget.getQuickNavigateConfiguration()), resolvedHandler.getAriaLabel()); + this.showModel(model, resolvedHandler.getAutoFocus(value, { model, quickNavigateConfiguration: this.quickOpenWidget.getQuickNavigateConfiguration() }), resolvedHandler.getAriaLabel()); } else { - this.showModel(result, resolvedHandler.getAutoFocus(value, this.quickOpenWidget.getQuickNavigateConfiguration()), resolvedHandler.getAriaLabel()); + this.showModel(result, resolvedHandler.getAutoFocus(value, { model: result, quickNavigateConfiguration: this.quickOpenWidget.getQuickNavigateConfiguration() }), resolvedHandler.getAriaLabel()); } } }); diff --git a/src/vs/workbench/browser/quickopen.ts b/src/vs/workbench/browser/quickopen.ts index ebb31e7a83392..152265f629a4e 100644 --- a/src/vs/workbench/browser/quickopen.ts +++ b/src/vs/workbench/browser/quickopen.ts @@ -7,7 +7,6 @@ import nls = require('vs/nls'); import { TPromise } from 'vs/base/common/winjs.base'; import * as objects from 'vs/base/common/objects'; -import filters = require('vs/base/common/filters'); import arrays = require('vs/base/common/arrays'); import strings = require('vs/base/common/strings'); import types = require('vs/base/common/types'); @@ -16,13 +15,25 @@ import { Registry } from 'vs/platform/platform'; import { Action } from 'vs/base/common/actions'; import { KeyMod } from 'vs/base/common/keyCodes'; import { Mode, IEntryRunContext, IAutoFocus, IModel, IQuickNavigateConfiguration } from 'vs/base/parts/quickopen/common/quickOpen'; -import { QuickOpenEntry, IHighlight, QuickOpenEntryGroup, QuickOpenModel } from 'vs/base/parts/quickopen/browser/quickOpenModel'; +import { QuickOpenEntry, IHighlight, QuickOpenEntryGroup } from 'vs/base/parts/quickopen/browser/quickOpenModel'; import { EditorOptions, EditorInput } from 'vs/workbench/common/editor'; import { IResourceInput, IEditorInput, IEditorOptions } from 'vs/platform/editor/common/editor'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { AsyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; +export interface IWorkbenchQuickOpenConfiguration { + workbench: { + quickOpen: { + closeOnFocusLost: boolean; + }, + commandPalette: { + history: number; + preserveInput: boolean; + } + }; +} + export class QuickOpenHandler { /** @@ -71,7 +82,7 @@ export class QuickOpenHandler { * Indicates if the handler wishes the quick open widget to automatically select the first result entry or an entry * based on a specific prefix match. */ - public getAutoFocus(searchValue: string, quickNavigateConfiguration?: IQuickNavigateConfiguration): IAutoFocus { + public getAutoFocus(searchValue: string, context: { model: IModel, quickNavigateConfiguration?: IQuickNavigateConfiguration }): IAutoFocus { return {}; } @@ -341,88 +352,16 @@ export interface ICommandQuickOpenHandlerOptions { defaultCommand?: ICommand; } -export abstract class CommandQuickOpenHandler extends QuickOpenHandler { - +export class QuickOpenAction extends Action { private prefix: string; - private defaultCommand: ICommand; - private commands: { regexp: RegExp; command: ICommand; }[]; constructor( - @IQuickOpenService private quickOpenService: IQuickOpenService, - options: ICommandQuickOpenHandlerOptions + id: string, + label: string, + prefix: string, + @IQuickOpenService private quickOpenService: IQuickOpenService ) { - super(); - - this.prefix = options.prefix; - this.commands = options.commands.map(c => ({ - regexp: new RegExp('^(' + c.aliases.join('|') + ')\\b\\W+'), - command: c - })); - this.defaultCommand = options.defaultCommand || null; - } - - public getResults(input: string): TPromise { - let match: RegExpMatchArray; - let command = arrays.first(this.commands, c => !!(match = input.match(c.regexp))); - let promise: TPromise; - - if (command) { - promise = command.command.getResults(input.substr(match[0].length)); - } else if (this.defaultCommand) { - promise = this.defaultCommand.getResults(input); - } else { - promise = this.getCommands(input); - } - - return promise.then(e => new QuickOpenModel(e)); - } - - private getCommands(input: string): TPromise { - let entries: QuickOpenEntry[] = this.commands - .map(c => ({ command: c.command, highlights: filters.matchesFuzzy(input, c.command.aliases[0]) })) - .filter(({ command, highlights }) => !!highlights || command.aliases.some(a => input === a)) - .map(({ command, highlights }) => new CommandEntry(this.quickOpenService, this.prefix, command, highlights)); - - return TPromise.as(entries); - } - - public getClass(): string { - return null; - } - - public canRun(): boolean { - return true; - } - - public getAutoFocus(input: string): IAutoFocus { - return { autoFocusFirstEntry: true }; - } - - public onClose(canceled: boolean): void { - return; - } - - public getGroupLabel(): string { - return null; - } - - public getEmptyLabel(input: string): string { - let match: RegExpMatchArray; - let command = arrays.first(this.commands, c => !!(match = input.match(c.regexp))); - - if (!command) { - return nls.localize('noCommands', "No commands matching"); - } - - return command.command.getEmptyLabel(input); - } -} - -export class QuickOpenAction extends Action { - private prefix: string; - - constructor(actionId: string, actionLabel: string, prefix: string, @IQuickOpenService private quickOpenService: IQuickOpenService) { - super(actionId, actionLabel); + super(id, label); this.prefix = prefix; this.enabled = !!this.quickOpenService; diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts index 87feaac6d446c..e34a426f1ef01 100644 --- a/src/vs/workbench/electron-browser/main.contribution.ts +++ b/src/vs/workbench/electron-browser/main.contribution.ts @@ -123,6 +123,16 @@ let workbenchProperties: { [path: string]: IJSONSchema; } = { 'description': nls.localize('revealIfOpen', "Controls if an editor is revealed in any of the visible groups if opened. If disabled, an editor will prefer to open in the currently active editor group. If enabled, an already opened editor will be revealed instead of opened again in the currently active editor group. Note that there are some cases where this setting is ignored, e.g. when forcing an editor to open in a specific group or to the side of the currently active group."), 'default': false }, + 'workbench.commandPalette.history': { + 'type': 'number', + 'description': nls.localize('commandHistory', "Controls if the number of recently used commands to keep in history for the command palette. Set to 0 to disable command history."), + 'default': 50 + }, + 'workbench.commandPalette.preserveInput': { + 'type': 'boolean', + 'description': nls.localize('preserveInput', "Controls if the last typed input to the command palette should be restored when opening it the next time."), + 'default': false + }, 'workbench.quickOpen.closeOnFocusLost': { 'type': 'boolean', 'description': nls.localize('closeOnFocusLost', "Controls if Quick Open should close automatically once it loses focus."), diff --git a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts index 9f4f45594c441..395829a94f083 100644 --- a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts +++ b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts @@ -11,7 +11,7 @@ import * as semver from 'semver'; import * as path from 'path'; import Event, { Emitter, chain } from 'vs/base/common/event'; import { index } from 'vs/base/common/arrays'; -import { LinkedMap as Map } from 'vs/base/common/map'; +import { SimpleMap as Map } from 'vs/base/common/map'; import { assign } from 'vs/base/common/objects'; import { ThrottledDelayer } from 'vs/base/common/async'; import { isPromiseCanceledError } from 'vs/base/common/errors'; diff --git a/src/vs/workbench/parts/markers/common/markersModel.ts b/src/vs/workbench/parts/markers/common/markersModel.ts index e87e6f7906ae4..f91644a094344 100644 --- a/src/vs/workbench/parts/markers/common/markersModel.ts +++ b/src/vs/workbench/parts/markers/common/markersModel.ts @@ -125,14 +125,14 @@ export class FilterOptions { export class MarkersModel { - private markersByResource: Map.LinkedMap; + private markersByResource: Map.SimpleMap; private _filteredResources: Resource[]; private _nonFilteredResources: Resource[]; private _filterOptions: FilterOptions; constructor(markers: IMarker[] = []) { - this.markersByResource = new Map.LinkedMap(); + this.markersByResource = new Map.SimpleMap(); this._filterOptions = new FilterOptions(); this.update(markers); } diff --git a/src/vs/workbench/parts/preferences/browser/preferencesService.ts b/src/vs/workbench/parts/preferences/browser/preferencesService.ts index 6f2fd27c01f9d..fa9247c670e47 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesService.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesService.ts @@ -8,7 +8,7 @@ import * as network from 'vs/base/common/network'; import { TPromise } from 'vs/base/common/winjs.base'; import * as nls from 'vs/nls'; import URI from 'vs/base/common/uri'; -import { LinkedMap as Map } from 'vs/base/common/map'; +import { SimpleMap as Map } from 'vs/base/common/map'; import * as labels from 'vs/base/common/labels'; import * as strings from 'vs/base/common/strings'; import { Disposable } from 'vs/base/common/lifecycle'; diff --git a/src/vs/workbench/parts/preferences/common/preferences.ts b/src/vs/workbench/parts/preferences/common/preferences.ts index 5465f7241d5b9..11206bc23a87e 100644 --- a/src/vs/workbench/parts/preferences/common/preferences.ts +++ b/src/vs/workbench/parts/preferences/common/preferences.ts @@ -5,7 +5,7 @@ import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; -import { LinkedMap as Map } from 'vs/base/common/map'; +import { SimpleMap as Map } from 'vs/base/common/map'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IEditor } from 'vs/platform/editor/common/editor'; diff --git a/src/vs/workbench/parts/preferences/common/preferencesModels.ts b/src/vs/workbench/parts/preferences/common/preferencesModels.ts index 26a195614447b..c35903695e273 100644 --- a/src/vs/workbench/parts/preferences/common/preferencesModels.ts +++ b/src/vs/workbench/parts/preferences/common/preferencesModels.ts @@ -6,7 +6,7 @@ import * as nls from 'vs/nls'; import * as strings from 'vs/base/common/strings'; import { assign } from 'vs/base/common/objects'; -import { LinkedMap as Map } from 'vs/base/common/map'; +import { SimpleMap as Map } from 'vs/base/common/map'; import { distinct } from 'vs/base/common/arrays'; import URI from 'vs/base/common/uri'; import { IReference } from 'vs/base/common/lifecycle'; diff --git a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts index 260ab6e1a6431..cf9fd534f85ba 100644 --- a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts @@ -5,21 +5,20 @@ 'use strict'; -import 'vs/css!./media/commandsHandler'; import { TPromise } from 'vs/base/common/winjs.base'; import nls = require('vs/nls'); import arrays = require('vs/base/common/arrays'); import types = require('vs/base/common/types'); import { language, LANGUAGE_DEFAULT } from 'vs/base/common/platform'; -import { IAction, Action } from 'vs/base/common/actions'; +import { Action } from 'vs/base/common/actions'; import { toErrorMessage } from 'vs/base/common/errorMessage'; -import { Mode, IEntryRunContext, IAutoFocus } from 'vs/base/parts/quickopen/common/quickOpen'; -import { QuickOpenEntryGroup, IHighlight, QuickOpenModel } from 'vs/base/parts/quickopen/browser/quickOpenModel'; +import { Mode, IEntryRunContext, IAutoFocus, IModel, IQuickNavigateConfiguration } from 'vs/base/parts/quickopen/common/quickOpen'; +import { QuickOpenEntryGroup, IHighlight, QuickOpenModel, QuickOpenEntry } from 'vs/base/parts/quickopen/browser/quickOpenModel'; import { SyncActionDescriptor, IMenuService, MenuId, MenuItemAction } from 'vs/platform/actions/common/actions'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; import { Registry } from 'vs/platform/platform'; -import { QuickOpenHandler, QuickOpenAction } from 'vs/workbench/browser/quickopen'; +import { QuickOpenHandler, IWorkbenchQuickOpenConfiguration } from 'vs/workbench/browser/quickopen'; import { IEditorAction, IEditor, isCommonCodeEditor, ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { matchesWords, matchesPrefix, matchesContiguousSubString, or } from 'vs/base/common/filters'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; @@ -29,19 +28,149 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { editorAction, EditorAction } from 'vs/editor/common/editorCommonExtensions'; +import { IStorageService } from "vs/platform/storage/common/storage"; +import { ILifecycleService } from "vs/platform/lifecycle/common/lifecycle"; +import { once } from "vs/base/common/event"; +import { BoundedMap, ISerializedBoundedLinkedMap } from "vs/base/common/map"; +import { IConfigurationService } from "vs/platform/configuration/common/configuration"; +import { ResolvedKeybinding } from "vs/base/common/keyCodes"; export const ALL_COMMANDS_PREFIX = '>'; -export const EDITOR_COMMANDS_PREFIX = '$'; -const wordFilter = or(matchesPrefix, matchesWords, matchesContiguousSubString); +let lastCommandPaletteInput: string; +let commandHistory: BoundedMap; +let commandCounter = 1; + +function resolveCommandHistory(configurationService: IConfigurationService): number { + const config = configurationService.getConfiguration(); + + let commandHistory = config.workbench && config.workbench.commandPalette && config.workbench.commandPalette.history; + if (typeof commandHistory !== 'number') { + commandHistory = CommandsHistory.DEFAULT_COMMANDS_HISTORY_LENGTH; + } + + return commandHistory; +} + +class CommandsHistory { + + public static readonly DEFAULT_COMMANDS_HISTORY_LENGTH = 50; + + private static readonly PREF_KEY_CACHE = 'commandPalette.mru.cache'; + private static readonly PREF_KEY_COUNTER = 'commandPalette.mru.counter'; + + private commandHistoryLength: number; + + constructor( + @IStorageService private storageService: IStorageService, + @ILifecycleService private lifecycleService: ILifecycleService, + @IConfigurationService private configurationService: IConfigurationService + ) { + this.updateConfiguration(); + this.load(); + + this.registerListeners(); + } + + private updateConfiguration(): void { + this.commandHistoryLength = resolveCommandHistory(this.configurationService); + + if (commandHistory) { + commandHistory.setLimit(this.commandHistoryLength); + } + } + + private load(): void { + const raw = this.storageService.get(CommandsHistory.PREF_KEY_CACHE); + let deserializedCache: ISerializedBoundedLinkedMap; + if (raw) { + try { + deserializedCache = JSON.parse(raw); + } catch (error) { + // invalid data + } + } + + commandHistory = new BoundedMap(this.commandHistoryLength, 1, deserializedCache); + commandCounter = this.storageService.getInteger(CommandsHistory.PREF_KEY_COUNTER, void 0, commandCounter); + } + + private registerListeners(): void { + this.configurationService.onDidUpdateConfiguration(e => this.updateConfiguration()); + once(this.lifecycleService.onShutdown)(reason => this.save()); + } + + private save(): void { + this.storageService.store(CommandsHistory.PREF_KEY_CACHE, JSON.stringify(commandHistory.serialize())); + this.storageService.store(CommandsHistory.PREF_KEY_COUNTER, commandCounter); + } + + public push(commandId: string): void { -export class ShowAllCommandsAction extends QuickOpenAction { + // make MRU by deleting it first + commandHistory.delete(commandId); + + // set counter to command + commandHistory.set(commandId, commandCounter++); + } + + public get(commandId: string): number { + return commandHistory.get(commandId); + } +} + +export class ShowAllCommandsAction extends Action { public static ID = 'workbench.action.showCommands'; public static LABEL = nls.localize('showTriggerActions', "Show All Commands"); - constructor(actionId: string, actionLabel: string, @IQuickOpenService quickOpenService: IQuickOpenService) { - super(actionId, actionLabel, ALL_COMMANDS_PREFIX, quickOpenService); + constructor( + id: string, + label: string, + @IQuickOpenService private quickOpenService: IQuickOpenService, + @IConfigurationService private configurationService: IConfigurationService + ) { + super(id, label); + } + + public run(context?: any): TPromise { + const config = this.configurationService.getConfiguration(); + const restoreInput = config.workbench && config.workbench.commandPalette && config.workbench.commandPalette.preserveInput === true; + + // Show with last command palette input if any and configured + let value = ALL_COMMANDS_PREFIX; + if (restoreInput && lastCommandPaletteInput) { + value = `${value}${lastCommandPaletteInput}`; + } + + this.quickOpenService.show(value, { inputSelection: lastCommandPaletteInput ? { start: 1 /* after prefix */, end: value.length } : void 0 }); + + return TPromise.as(null); + } +} + +export class ClearCommandHistoryAction extends Action { + + public static ID = 'workbench.action.clearCommandHistory'; + public static LABEL = nls.localize('clearCommandHistory', "Clear Command History"); + + constructor( + id: string, + label: string, + @IStorageService private storageService: IStorageService, + @IConfigurationService private configurationService: IConfigurationService + ) { + super(id, label); + } + + public run(context?: any): TPromise { + const commandHistoryLength = resolveCommandHistory(this.configurationService); + if (commandHistoryLength > 0) { + commandHistory = new BoundedMap(commandHistoryLength); + commandCounter = 1; + } + + return TPromise.as(null); } } @@ -69,39 +198,34 @@ class CommandPaletteEditorAction extends EditorAction { } } -class BaseCommandEntry extends QuickOpenEntryGroup { - private commandId: string; - private keyLabel: string; - private keyAriaLabel: string; - private label: string; +abstract class BaseCommandEntry extends QuickOpenEntryGroup { private description: string; private alias: string; + private labelLowercase: string; + private keybindingAriaLabel: string; constructor( - commandId: string, - keyLabel: string, - keyAriaLabel: string, - label: string, + private commandId: string, + private keybinding: ResolvedKeybinding, + private label: string, alias: string, - labelHighlights: IHighlight[], - aliasHighlights: IHighlight[], + highlights: { label: IHighlight[], alias: IHighlight[] }, + private onBeforeRun: (commandId: string) => void, @IMessageService protected messageService: IMessageService, @ITelemetryService protected telemetryService: ITelemetryService ) { super(); - this.commandId = commandId; - this.keyLabel = keyLabel; - this.keyAriaLabel = keyAriaLabel; - this.label = label; + this.labelLowercase = this.label.toLowerCase(); + this.keybindingAriaLabel = keybinding ? keybinding.getAriaLabel() : void 0; - if (label !== alias) { + if (this.label !== alias) { this.alias = alias; } else { - aliasHighlights = null; + highlights.alias = null; } - this.setHighlights(labelHighlights, null, aliasHighlights); + this.setHighlights(highlights.label, null, highlights.alias); } public getCommandId(): string { @@ -112,6 +236,10 @@ class BaseCommandEntry extends QuickOpenEntryGroup { return this.label; } + public getSortLabel(): string { + return this.labelLowercase; + } + public getDescription(): string { return this.description; } @@ -120,22 +248,22 @@ class BaseCommandEntry extends QuickOpenEntryGroup { this.description = description; } + public getKeybinding(): ResolvedKeybinding { + return this.keybinding; + } + public getDetail(): string { return this.alias; } public getAriaLabel(): string { - if (this.keyAriaLabel) { - return nls.localize('entryAriaLabelWithKey', "{0}, {1}, commands", this.getLabel(), this.keyAriaLabel); + if (this.keybindingAriaLabel) { + return nls.localize('entryAriaLabelWithKey', "{0}, {1}, commands", this.getLabel(), this.keybindingAriaLabel); } return nls.localize('entryAriaLabel', "{0}, commands", this.getLabel()); } - public getGroupLabel(): string { - return this.keyLabel; - } - protected onError(error?: Error): void; protected onError(messagesWithAction?: IMessageWithAction): void; protected onError(arg1?: any): void { @@ -147,15 +275,32 @@ class BaseCommandEntry extends QuickOpenEntryGroup { } } - protected runAction(action: IAction): void { + public run(mode: Mode, context: IEntryRunContext): boolean { + if (mode === Mode.OPEN) { + this.runAction(this.getAction()); + + return true; + } + + return false; + } + + protected abstract getAction(): Action | IEditorAction; + + protected runAction(action: Action | IEditorAction): void { + + // Indicate onBeforeRun + this.onBeforeRun(this.commandId); // Use a timeout to give the quick open widget a chance to close itself first TPromise.timeout(50).done(() => { - if (action && action.enabled) { + if (action && (!(action instanceof Action) || action.enabled)) { try { this.telemetryService.publicLog('workbenchActionExecuted', { id: action.id, from: 'quick open' }); (action.run() || TPromise.as(null)).done(() => { - action.dispose(); + if (action instanceof Action) { + action.dispose(); + } }, err => this.onError(err)); } catch (error) { this.onError(error); @@ -168,138 +313,103 @@ class BaseCommandEntry extends QuickOpenEntryGroup { } class CommandEntry extends BaseCommandEntry { - private actionDescriptor: SyncActionDescriptor; constructor( commandId: string, - keyLabel: string, - keyAriaLabel: string, + keybinding: ResolvedKeybinding, label: string, meta: string, - labelHighlights: IHighlight[], - aliasHighlights: IHighlight[], - actionDescriptor: SyncActionDescriptor, + highlights: { label: IHighlight[], alias: IHighlight[] }, + private actionDescriptor: SyncActionDescriptor, + onBeforeRun: (commandId: string) => void, @IInstantiationService private instantiationService: IInstantiationService, @IMessageService messageService: IMessageService, @ITelemetryService telemetryService: ITelemetryService ) { - super(commandId, keyLabel, keyAriaLabel, label, meta, labelHighlights, aliasHighlights, messageService, telemetryService); - - this.actionDescriptor = actionDescriptor; + super(commandId, keybinding, label, meta, highlights, onBeforeRun, messageService, telemetryService); } - public run(mode: Mode, context: IEntryRunContext): boolean { - if (mode === Mode.OPEN) { - const action = this.instantiationService.createInstance(this.actionDescriptor.syncDescriptor); - this.runAction(action); - - return true; - } - - return false; + protected getAction(): Action | IEditorAction { + return this.instantiationService.createInstance(this.actionDescriptor.syncDescriptor); } } class EditorActionCommandEntry extends BaseCommandEntry { - private action: IEditorAction; constructor( commandId: string, - keyLabel: string, - keyAriaLabel: string, + keybinding: ResolvedKeybinding, label: string, meta: string, - labelHighlights: IHighlight[], - aliasHighlights: IHighlight[], - action: IEditorAction, + highlights: { label: IHighlight[], alias: IHighlight[] }, + private action: IEditorAction, + onBeforeRun: (commandId: string) => void, @IMessageService messageService: IMessageService, @ITelemetryService telemetryService: ITelemetryService ) { - super(commandId, keyLabel, keyAriaLabel, label, meta, labelHighlights, aliasHighlights, messageService, telemetryService); - - this.action = action; + super(commandId, keybinding, label, meta, highlights, onBeforeRun, messageService, telemetryService); } - public run(mode: Mode, context: IEntryRunContext): boolean { - if (mode === Mode.OPEN) { - // Use a timeout to give the quick open widget a chance to close itself first - TPromise.timeout(50).done(() => { - if (this.action) { - try { - this.telemetryService.publicLog('workbenchActionExecuted', { id: this.action.id, from: 'quick open' }); - (this.action.run() || TPromise.as(null)).done(null, err => this.onError(err)); - } catch (error) { - this.onError(error); - } - } else { - this.messageService.show(Severity.Info, nls.localize('actionNotEnabled', "Command '{0}' is not enabled in the current context.", this.getLabel())); - } - }, err => this.onError(err)); - - return true; - } - - return false; + protected getAction(): Action | IEditorAction { + return this.action; } } - class ActionCommandEntry extends BaseCommandEntry { - private action: IAction; constructor( commandId: string, - keyLabel: string, - keyAriaLabel: string, + keybinding: ResolvedKeybinding, label: string, alias: string, - labelHighlights: IHighlight[], - aliasHighlights: IHighlight[], - action: IAction, + highlights: { label: IHighlight[], alias: IHighlight[] }, + private action: Action, + onBeforeRun: (commandId: string) => void, @IMessageService messageService: IMessageService, @ITelemetryService telemetryService: ITelemetryService ) { - super(commandId, keyLabel, keyAriaLabel, label, alias, labelHighlights, aliasHighlights, messageService, telemetryService); - - this.action = action; + super(commandId, keybinding, label, alias, highlights, onBeforeRun, messageService, telemetryService); } - public run(mode: Mode, context: IEntryRunContext): boolean { - if (mode === Mode.OPEN) { - this.runAction(this.action); - - return true; - } - - return false; + protected getAction(): Action | IEditorAction { + return this.action; } } +const wordFilter = or(matchesPrefix, matchesWords, matchesContiguousSubString); + export class CommandsHandler extends QuickOpenHandler { + private lastSearchValue: string; + private commandHistoryEnabled: boolean; + private commandsHistory: CommandsHistory; constructor( @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IInstantiationService private instantiationService: IInstantiationService, @IKeybindingService private keybindingService: IKeybindingService, @IMenuService private menuService: IMenuService, - @IContextKeyService private contextKeyService: IContextKeyService + @IContextKeyService private contextKeyService: IContextKeyService, + @IConfigurationService private configurationService: IConfigurationService ) { super(); + + this.commandsHistory = this.instantiationService.createInstance(CommandsHistory); + + this.configurationService.onDidUpdateConfiguration(e => this.updateConfiguration()); + this.updateConfiguration(); } - protected includeWorkbenchCommands(): boolean { - return true; + private updateConfiguration(): void { + this.commandHistoryEnabled = resolveCommandHistory(this.configurationService) > 0; } public getResults(searchValue: string): TPromise { - searchValue = searchValue.trim(); + this.lastSearchValue = searchValue.trim(); - // Workbench Actions (if prefix asks for all commands) + // Workbench Actions let workbenchEntries: CommandEntry[] = []; - if (this.includeWorkbenchCommands()) { - const workbenchActions = Registry.as(ActionExtensions.WorkbenchActions).getWorkbenchActions(); - workbenchEntries = this.actionDescriptorsToEntries(workbenchActions, searchValue); - } + const workbenchActions = Registry.as(ActionExtensions.WorkbenchActions).getWorkbenchActions(); + workbenchEntries = this.actionDescriptorsToEntries(workbenchActions, searchValue); // Editor Actions const activeEditor = this.editorService.getActiveEditor(); @@ -340,8 +450,41 @@ export class CommandsHandler extends QuickOpenHandler { } }); - // Sort by name - entries = entries.sort((elementA, elementB) => elementA.getLabel().toLowerCase().localeCompare(elementB.getLabel().toLowerCase())); + // Sort by MRU order and fallback to name otherwie + entries = entries.sort((elementA, elementB) => { + const counterA = this.commandsHistory.get(elementA.getCommandId()); + const counterB = this.commandsHistory.get(elementB.getCommandId()); + + if (counterA && counterB) { + return counterA > counterB ? -1 : 1; // use more recently used command before older + } + + if (counterA) { + return -1; // first command was used, so it wins over the non used one + } + + if (counterB) { + return 1; // other command was used so it wins over the command + } + + // both commands were never used, so we sort by name + return elementA.getSortLabel().localeCompare(elementB.getSortLabel()); + }); + + // Introduce group marker border between recently used and others + // only if we have recently used commands in the result set + const firstEntry = entries[0]; + if (firstEntry && this.commandsHistory.get(firstEntry.getCommandId())) { + firstEntry.setGroupLabel(nls.localize('recentlyUsed', "recently used")); + for (let i = 1; i < entries.length; i++) { + const entry = entries[i]; + if (!this.commandsHistory.get(entry.getCommandId())) { + entry.setShowBorder(true); + entry.setGroupLabel(nls.localize('morecCommands', "other commands")); + break; + } + } + } return TPromise.as(new QuickOpenModel(entries)); } @@ -352,10 +495,6 @@ export class CommandsHandler extends QuickOpenHandler { for (let i = 0; i < actionDescriptors.length; i++) { const actionDescriptor = actionDescriptors[i]; - const keybinding = this.keybindingService.lookupKeybinding(actionDescriptor.id); - const keyLabel = keybinding ? keybinding.getLabel() : ''; - const keyAriaLabel = keybinding ? keybinding.getAriaLabel() : ''; - if (actionDescriptor.label) { // Label (with optional category) @@ -369,8 +508,9 @@ export class CommandsHandler extends QuickOpenHandler { const alias = (language !== LANGUAGE_DEFAULT) ? registry.getAlias(actionDescriptor.id) : null; const labelHighlights = wordFilter(searchValue, label); const aliasHighlights = alias ? wordFilter(searchValue, alias) : null; + if (labelHighlights || aliasHighlights) { - entries.push(this.instantiationService.createInstance(CommandEntry, actionDescriptor.id, keyLabel, keyAriaLabel, label, alias, labelHighlights, aliasHighlights, actionDescriptor)); + entries.push(this.instantiationService.createInstance(CommandEntry, actionDescriptor.id, this.keybindingService.lookupKeybinding(actionDescriptor.id), label, alias, { label: labelHighlights, alias: aliasHighlights }, actionDescriptor, id => this.onBeforeRunCommand(id))); } } } @@ -387,19 +527,16 @@ export class CommandsHandler extends QuickOpenHandler { continue; // avoid duplicates } - const keybinding = this.keybindingService.lookupKeybinding(action.id); - const keyLabel = keybinding ? keybinding.getLabel() : ''; - const keyAriaLabel = keybinding ? keybinding.getAriaLabel() : ''; const label = action.label; - if (label) { // Alias for non default languages const alias = (language !== LANGUAGE_DEFAULT) ? action.alias : null; const labelHighlights = wordFilter(searchValue, label); const aliasHighlights = alias ? wordFilter(searchValue, alias) : null; + if (labelHighlights || aliasHighlights) { - entries.push(this.instantiationService.createInstance(EditorActionCommandEntry, action.id, keyLabel, keyAriaLabel, label, alias, labelHighlights, aliasHighlights, action)); + entries.push(this.instantiationService.createInstance(EditorActionCommandEntry, action.id, this.keybindingService.lookupKeybinding(action.id), label, alias, { label: labelHighlights, alias: aliasHighlights }, action, id => this.onBeforeRunCommand(id))); } } } @@ -407,6 +544,15 @@ export class CommandsHandler extends QuickOpenHandler { return entries; } + private onBeforeRunCommand(commandId: string): void { + + // Remember as last command palette input + lastCommandPaletteInput = this.lastSearchValue; + + // Remember in commands history + this.commandsHistory.push(commandId); + } + private menuItemActionsToEntries(actions: MenuItemAction[], searchValue: string): ActionCommandEntry[] { const entries: ActionCommandEntry[] = []; @@ -420,9 +566,7 @@ export class CommandsHandler extends QuickOpenHandler { if (label) { const labelHighlights = wordFilter(searchValue, label); - const keybinding = this.keybindingService.lookupKeybinding(action.item.id); - const keyLabel = keybinding ? keybinding.getLabel() : ''; - const keyAriaLabel = keybinding ? keybinding.getAriaLabel() : ''; + // Add an 'alias' in original language when running in different locale const aliasTitle = (language !== LANGUAGE_DEFAULT && typeof action.item.title !== 'string') ? action.item.title.original : null; const aliasCategory = (language !== LANGUAGE_DEFAULT && category && typeof action.item.category !== 'string') ? action.item.category.original : null; @@ -433,8 +577,9 @@ export class CommandsHandler extends QuickOpenHandler { alias = aliasTitle; } const aliasHighlights = alias ? wordFilter(searchValue, alias) : null; + if (labelHighlights || aliasHighlights) { - entries.push(this.instantiationService.createInstance(ActionCommandEntry, action.id, keyLabel, keyAriaLabel, label, alias, labelHighlights, aliasHighlights, action)); + entries.push(this.instantiationService.createInstance(ActionCommandEntry, action.id, this.keybindingService.lookupKeybinding(action.item.id), label, alias, { label: labelHighlights, alias: aliasHighlights }, action, id => this.onBeforeRunCommand(id))); } } } @@ -442,25 +587,23 @@ export class CommandsHandler extends QuickOpenHandler { return entries; } - public getAutoFocus(searchValue: string): IAutoFocus { + public getAutoFocus(searchValue: string, context: { model: IModel, quickNavigateConfiguration?: IQuickNavigateConfiguration }): IAutoFocus { + let autoFocusPrefixMatch = searchValue.trim(); + + if (autoFocusPrefixMatch && this.commandHistoryEnabled) { + const firstEntry = context.model && context.model.entries[0]; + if (firstEntry instanceof BaseCommandEntry && this.commandsHistory.get(firstEntry.getCommandId())) { + autoFocusPrefixMatch = void 0; // keep focus on MRU element if we have history elements + } + } + return { autoFocusFirstEntry: true, - autoFocusPrefixMatch: searchValue.trim() + autoFocusPrefixMatch }; } - public getClass(): string { - return 'commands-handler'; - } - public getEmptyLabel(searchString: string): string { return nls.localize('noCommandsMatching', "No commands matching"); } -} - -export class EditorCommandsHandler extends CommandsHandler { - - protected includeWorkbenchCommands(): boolean { - return false; - } } \ No newline at end of file diff --git a/src/vs/workbench/parts/quickopen/browser/media/commandsHandler.css b/src/vs/workbench/parts/quickopen/browser/media/commandsHandler.css deleted file mode 100644 index 9d1bfd29f025f..0000000000000 --- a/src/vs/workbench/parts/quickopen/browser/media/commandsHandler.css +++ /dev/null @@ -1,14 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -.quick-open-widget.commands-handler .quick-open-tree .results-group { - opacity: 1; - font-size: 12px; - color: inherit; -} - -.vs-dark .quick-open-widget.commands-handler .quick-open-tree .results-group { - color: inherit; -} \ No newline at end of file diff --git a/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts b/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts index e659f567dd4e6..606e882af9b30 100644 --- a/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts +++ b/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts @@ -13,13 +13,14 @@ import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { GotoSymbolAction, GOTO_SYMBOL_PREFIX, SCOPE_PREFIX } from 'vs/workbench/parts/quickopen/browser/gotoSymbolHandler'; -import { ShowAllCommandsAction, ALL_COMMANDS_PREFIX } from 'vs/workbench/parts/quickopen/browser/commandsHandler'; +import { ShowAllCommandsAction, ALL_COMMANDS_PREFIX, ClearCommandHistoryAction } from 'vs/workbench/parts/quickopen/browser/commandsHandler'; import { GotoLineAction, GOTO_LINE_PREFIX } from 'vs/workbench/parts/quickopen/browser/gotoLineHandler'; import { HELP_PREFIX } from 'vs/workbench/parts/quickopen/browser/helpHandler'; import { VIEW_PICKER_PREFIX, OpenViewPickerAction, QuickOpenViewPickerAction } from 'vs/workbench/parts/quickopen/browser/viewPickerHandler'; // Register Actions -let registry = Registry.as(ActionExtensions.WorkbenchActions); +const registry = Registry.as(ActionExtensions.WorkbenchActions); +registry.registerWorkbenchAction(new SyncActionDescriptor(ClearCommandHistoryAction, ClearCommandHistoryAction.ID, ClearCommandHistoryAction.LABEL), 'Clear Command History'); registry.registerWorkbenchAction(new SyncActionDescriptor(ShowAllCommandsAction, ShowAllCommandsAction.ID, ShowAllCommandsAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_P, secondary: [KeyCode.F1] diff --git a/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.ts b/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.ts index 084ed409ccbf2..5cda2bf9d776b 100644 --- a/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.ts @@ -9,7 +9,7 @@ import nls = require('vs/nls'); import errors = require('vs/base/common/errors'); import strings = require('vs/base/common/strings'); import scorer = require('vs/base/common/scorer'); -import { Mode, IEntryRunContext, IAutoFocus, IQuickNavigateConfiguration } from 'vs/base/parts/quickopen/common/quickOpen'; +import { Mode, IEntryRunContext, IAutoFocus, IQuickNavigateConfiguration, IModel } from 'vs/base/parts/quickopen/common/quickOpen'; import { QuickOpenModel, QuickOpenEntryGroup, QuickOpenEntry } from 'vs/base/parts/quickopen/browser/quickOpenModel'; import { QuickOpenHandler, QuickOpenAction } from 'vs/workbench/browser/quickopen'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; @@ -165,9 +165,9 @@ export class ViewPickerHandler extends QuickOpenHandler { return viewEntries; } - public getAutoFocus(searchValue: string, quickNavigateConfiguration: IQuickNavigateConfiguration): IAutoFocus { + public getAutoFocus(searchValue: string, context: { model: IModel, quickNavigateConfiguration?: IQuickNavigateConfiguration }): IAutoFocus { return { - autoFocusFirstEntry: !!searchValue || !!quickNavigateConfiguration + autoFocusFirstEntry: !!searchValue || !!context.quickNavigateConfiguration }; } } diff --git a/src/vs/workbench/parts/search/common/searchModel.ts b/src/vs/workbench/parts/search/common/searchModel.ts index 114d6657c1a59..f8d357a5a2609 100644 --- a/src/vs/workbench/parts/search/common/searchModel.ts +++ b/src/vs/workbench/parts/search/common/searchModel.ts @@ -11,7 +11,7 @@ import { RunOnceScheduler } from 'vs/base/common/async'; import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; import { TPromise, PPromise } from 'vs/base/common/winjs.base'; import URI from 'vs/base/common/uri'; -import { LinkedMap } from 'vs/base/common/map'; +import { SimpleMap } from 'vs/base/common/map'; import { ArraySet } from 'vs/base/common/set'; import Event, { Emitter, fromPromise, stopwatch, any } from 'vs/base/common/event'; import { ISearchService, ISearchProgressItem, ISearchComplete, ISearchQuery, IPatternInfo, IFileMatch } from 'vs/platform/search/common/search'; @@ -126,7 +126,7 @@ export class FileMatch extends Disposable { private _resource: URI; private _model: IModel; private _modelListener: IDisposable; - private _matches: LinkedMap; + private _matches: SimpleMap; private _removedMatches: ArraySet; private _selectedMatch: Match; @@ -137,7 +137,7 @@ export class FileMatch extends Disposable { @IModelService private modelService: IModelService, @IReplaceService private replaceService: IReplaceService) { super(); this._resource = this.rawMatch.resource; - this._matches = new LinkedMap(); + this._matches = new SimpleMap(); this._removedMatches = new ArraySet(); this._updateScheduler = new RunOnceScheduler(this.updateMatchesForModel.bind(this), 250); @@ -198,7 +198,7 @@ export class FileMatch extends Disposable { if (!this._model) { return; } - this._matches = new LinkedMap(); + this._matches = new SimpleMap(); let matches = this._model .findMatches(this._query.pattern, this._model.getFullModelRange(), this._query.isRegExp, this._query.isCaseSensitive, this._query.isWordMatch ? this._query.wordSeparators : null, false, this._maxResults); @@ -340,8 +340,8 @@ export class SearchResult extends Disposable { private _onChange = this._register(new Emitter()); public onChange: Event = this._onChange.event; - private _fileMatches: LinkedMap; - private _unDisposedFileMatches: LinkedMap; + private _fileMatches: SimpleMap; + private _unDisposedFileMatches: SimpleMap; private _query: IPatternInfo = null; private _maxResults: number; private _showHighlights: boolean; @@ -352,8 +352,8 @@ export class SearchResult extends Disposable { constructor(private _searchModel: SearchModel, @IReplaceService private replaceService: IReplaceService, @ITelemetryService private telemetryService: ITelemetryService, @IInstantiationService private instantiationService: IInstantiationService) { super(); - this._fileMatches = new LinkedMap(); - this._unDisposedFileMatches = new LinkedMap(); + this._fileMatches = new SimpleMap(); + this._unDisposedFileMatches = new SimpleMap(); this._rangeHighlightDecorations = this.instantiationService.createInstance(RangeHighlightDecorations); } From 059f5e473c8e13481be63f2d5643d22f8195fe19 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 7 Jun 2017 15:49:55 +0200 Subject: [PATCH 1596/2747] add "quick open recent" to file menu --- src/vs/code/electron-main/menus.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index ca5849620fe18..fe14d6cf22342 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -538,6 +538,8 @@ export class VSCodeMenu { } if (folders.length || files.length) { + openRecentMenu.append(__separator__()); + openRecentMenu.append(this.createMenuItem(nls.localize({ key: 'miMore', comment: ['&& denotes a mnemonic'] }, "&&More..."), 'workbench.action.openRecent')); openRecentMenu.append(__separator__()); openRecentMenu.append(this.createMenuItem(nls.localize({ key: 'miClearRecentOpen', comment: ['&& denotes a mnemonic'] }, "&&Clear Recent Files"), 'workbench.action.clearRecentFiles')); } From f215700090187f1564e4e421cab381614b6f19be Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 7 Jun 2017 15:29:17 +0200 Subject: [PATCH 1597/2747] fix #28141 --- .../workbench/api/electron-browser/mainThreadQuickOpen.ts | 6 +++--- src/vs/workbench/api/node/extHost.protocol.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadQuickOpen.ts b/src/vs/workbench/api/electron-browser/mainThreadQuickOpen.ts index 8751ff6663895..6475757bb8d27 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadQuickOpen.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadQuickOpen.ts @@ -29,7 +29,7 @@ export class MainThreadQuickOpen extends MainThreadQuickOpenShape { this._quickOpenService = quickOpenService; } - $show(options: IPickOptions): Thenable { + $show(options: IPickOptions): TPromise { const myToken = ++this._token; @@ -59,14 +59,14 @@ export class MainThreadQuickOpen extends MainThreadQuickOpenShape { }); } - $setItems(items: MyQuickPickItems[]): Thenable { + $setItems(items: MyQuickPickItems[]): TPromise { if (this._doSetItems) { this._doSetItems(items); } return undefined; } - $setError(error: Error): Thenable { + $setError(error: Error): TPromise { if (this._doSetError) { this._doSetError(error); } diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 8f6d2c8deb5ba..6d92223c932b3 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -264,9 +264,9 @@ export interface MyQuickPickItems extends IPickOpenEntry { handle: number; } export abstract class MainThreadQuickOpenShape { - $show(options: IPickOptions): Thenable { throw ni(); } - $setItems(items: MyQuickPickItems[]): Thenable { throw ni(); } - $setError(error: Error): Thenable { throw ni(); } + $show(options: IPickOptions): TPromise { throw ni(); } + $setItems(items: MyQuickPickItems[]): TPromise { throw ni(); } + $setError(error: Error): TPromise { throw ni(); } $input(options: vscode.InputBoxOptions, validateInput: boolean): TPromise { throw ni(); } } From 3e7f7fe1b709e438197dd67b30220675cf98c7bd Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 7 Jun 2017 16:00:35 +0200 Subject: [PATCH 1598/2747] fix tests --- src/vs/workbench/electron-browser/workbench.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 93e8408e0705c..ca0524e3014fd 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -570,7 +570,7 @@ export class Workbench implements IPartService { // Panel part visibility const panelRegistry = Registry.as(PanelExtensions.Panels); - this.panelHidden = this.storageService.getBoolean(Workbench.panelHiddenSettingKey, StorageScope.WORKSPACE, !this.contextService.hasWorkspace()); + this.panelHidden = this.storageService.getBoolean(Workbench.panelHiddenSettingKey, StorageScope.WORKSPACE, true); if (!panelRegistry.getDefaultPanelId()) { this.panelHidden = true; // we hide panel part if there is no default panel } From 85a0a67ce54509374bf06693d93b87867bb24885 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 7 Jun 2017 16:12:56 +0200 Subject: [PATCH 1599/2747] fix integration tests --- .../vscode-api-tests/src/editor.test.ts | 6 ++-- extensions/vscode-api-tests/src/utils.ts | 29 ++----------------- .../vscode-api-tests/src/window.test.ts | 12 ++++---- .../vscode-api-tests/src/workspace.test.ts | 4 +-- 4 files changed, 13 insertions(+), 38 deletions(-) diff --git a/extensions/vscode-api-tests/src/editor.test.ts b/extensions/vscode-api-tests/src/editor.test.ts index f39a736a96762..a5d597b4bc0db 100644 --- a/extensions/vscode-api-tests/src/editor.test.ts +++ b/extensions/vscode-api-tests/src/editor.test.ts @@ -7,11 +7,11 @@ import * as assert from 'assert'; import { workspace, window, Position, Range, commands, TextEditor, TextDocument, TextEditorCursorStyle, TextEditorLineNumbersStyle, SnippetString, Selection } from 'vscode'; -import { createRandomFile, deleteFile, cleanUp } from './utils'; +import { createRandomFile, deleteFile, closeAllEditors } from './utils'; suite('editor tests', () => { - teardown(cleanUp); + teardown(closeAllEditors); function withRandomFileEditor(initialContents: string, run: (editor: TextEditor, doc: TextDocument) => Thenable): Thenable { return createRandomFile(initialContents).then(file => { @@ -194,7 +194,7 @@ suite('editor tests', () => { (err) => { assert.ok(true, 'edit with overlapping ranges should fail'); } - ); + ); }); }); }); diff --git a/extensions/vscode-api-tests/src/utils.ts b/extensions/vscode-api-tests/src/utils.ts index d22baa8d55a5c..0d869ed787df7 100644 --- a/extensions/vscode-api-tests/src/utils.ts +++ b/extensions/vscode-api-tests/src/utils.ts @@ -5,7 +5,6 @@ 'use strict'; -import * as assert from 'assert'; import * as vscode from 'vscode'; import * as fs from 'fs'; import * as os from 'os'; @@ -49,31 +48,7 @@ export function deleteFile(file: vscode.Uri): Thenable { }); } -export function cleanUp(): Thenable { - return new Promise((resolve, reject) => { - if (vscode.window.visibleTextEditors.length === 0) { - return resolve(); - } - - const reg = vscode.window.onDidChangeVisibleTextEditors(editors => { - if (editors.length === 0) { - resolve(); - reg.dispose(); - } - }); +export function closeAllEditors(): Thenable { + return vscode.commands.executeCommand('workbench.action.closeAllEditors'); - vscode.commands.executeCommand('workbench.action.closeAllEditors').then(undefined, reject); - - }).then(() => { - assert.equal(vscode.window.visibleTextEditors.length, 0); - assert(!vscode.window.activeTextEditor); - - // TODO: we can't yet make this assertion because when - // the phost creates a document and makes no changes to it, - // the main side doesn't know about it and the phost side - // assumes it exists. Calling closeAllFiles will not - // remove it from textDocuments array. :( - - // assert.equal(vscode.workspace.textDocuments.length, 0); - }); } diff --git a/extensions/vscode-api-tests/src/window.test.ts b/extensions/vscode-api-tests/src/window.test.ts index cb14027e666b6..cf4c0f653e5a3 100644 --- a/extensions/vscode-api-tests/src/window.test.ts +++ b/extensions/vscode-api-tests/src/window.test.ts @@ -8,11 +8,11 @@ import * as assert from 'assert'; import { workspace, window, commands, ViewColumn, TextEditorViewColumnChangeEvent, Uri, Selection, Position, CancellationTokenSource, TextEditorSelectionChangeKind } from 'vscode'; import { join } from 'path'; -import { cleanUp, pathEquals, createRandomFile } from './utils'; +import { closeAllEditors, pathEquals, createRandomFile } from './utils'; suite('window namespace tests', () => { - teardown(cleanUp); + teardown(closeAllEditors); test('editor, active text editor', () => { return workspace.openTextDocument(join(workspace.rootPath || '', './far.js')).then(doc => { @@ -24,10 +24,10 @@ suite('window namespace tests', () => { }); }); - test('editor, UN-active text editor', () => { - assert.equal(window.visibleTextEditors.length, 0); - assert.ok(window.activeTextEditor === undefined); - }); + // test('editor, UN-active text editor', () => { + // assert.equal(window.visibleTextEditors.length, 0); + // assert.ok(window.activeTextEditor === undefined); + // }); test('editor, assign and check view columns', () => { diff --git a/extensions/vscode-api-tests/src/workspace.test.ts b/extensions/vscode-api-tests/src/workspace.test.ts index 54aaa0f796293..acd9e5b4b9926 100644 --- a/extensions/vscode-api-tests/src/workspace.test.ts +++ b/extensions/vscode-api-tests/src/workspace.test.ts @@ -7,13 +7,13 @@ import * as assert from 'assert'; import * as vscode from 'vscode'; -import { createRandomFile, deleteFile, cleanUp, pathEquals } from './utils'; +import { createRandomFile, deleteFile, closeAllEditors, pathEquals } from './utils'; import { join, basename } from 'path'; import * as fs from 'fs'; suite('workspace-namespace', () => { - teardown(cleanUp); + teardown(closeAllEditors); test('textDocuments', () => { From 6df8165d8d523f6256e03abf14c72b99d5b0b53f Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 7 Jun 2017 16:21:53 +0200 Subject: [PATCH 1600/2747] Fixes #21346: Implement a different minimap slider scroll strategy --- src/vs/base/browser/fastDomNode.ts | 8 - .../browser/ui/scrollbar/abstractScrollbar.ts | 93 +++++---- .../ui/scrollbar/horizontalScrollbar.ts | 10 +- .../browser/ui/scrollbar/scrollableElement.ts | 12 +- .../browser/ui/scrollbar/verticalScrollbar.ts | 10 +- src/vs/editor/browser/view/viewImpl.ts | 3 +- .../editorScrollbar/editorScrollbar.ts | 8 +- .../browser/viewParts/minimap/minimap.ts | 177 ++++++++---------- .../editor/browser/widget/codeEditorWidget.ts | 3 +- .../editor/browser/widget/diffEditorWidget.ts | 2 +- 10 files changed, 157 insertions(+), 169 deletions(-) diff --git a/src/vs/base/browser/fastDomNode.ts b/src/vs/base/browser/fastDomNode.ts index ee1dd6cd58f40..edd726ec0a2e9 100644 --- a/src/vs/base/browser/fastDomNode.ts +++ b/src/vs/base/browser/fastDomNode.ts @@ -80,10 +80,6 @@ export abstract class FastDomNode { this.domNode.style.height = this._height + 'px'; } - public getHeight(): number { - return this._height; - } - public unsetHeight(): void { if (this._height === -1) { return; @@ -100,10 +96,6 @@ export abstract class FastDomNode { this.domNode.style.top = this._top + 'px'; } - public getTop(): number { - return this._top; - } - public unsetTop(): void { if (this._top === -1) { return; diff --git a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts index ce1196e6b813a..c7194cbc5c575 100644 --- a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts @@ -6,7 +6,7 @@ import * as Platform from 'vs/base/common/platform'; import * as DomUtils from 'vs/base/browser/dom'; -import { IMouseEvent, StandardMouseEvent, StandardMouseWheelEvent } from 'vs/base/browser/mouseEvent'; +import { IMouseEvent, StandardMouseWheelEvent } from 'vs/base/browser/mouseEvent'; import { GlobalMouseMoveMonitor, IStandardMouseMoveEventData, standardMouseMoveMerger } from 'vs/base/browser/globalMouseMoveMonitor'; import { Widget } from 'vs/base/browser/ui/widget'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; @@ -20,8 +20,7 @@ import { Scrollable, ScrollbarVisibility } from 'vs/base/common/scrollable'; */ const MOUSE_DRAG_RESET_DISTANCE = 140; -export interface IMouseMoveEventData { - leftButton: boolean; +export interface ISimplifiedMouseEvent { posx: number; posy: number; } @@ -102,7 +101,12 @@ export abstract class AbstractScrollbar extends Widget { this.domNode.domNode.appendChild(this.slider.domNode); - this.onmousedown(this.slider.domNode, (e) => this._sliderMouseDown(e)); + this.onmousedown(this.slider.domNode, (e) => { + if (e.leftButton) { + e.preventDefault(); + this._sliderMouseDown(e, () => { /*nothing to do*/ }); + } + }); } // ----------------- Update state @@ -180,59 +184,66 @@ export abstract class AbstractScrollbar extends Widget { this._onMouseDown(e); } - public delegateMouseDown(browserEvent: MouseEvent): void { - let e = new StandardMouseEvent(browserEvent); + public delegateMouseDown(e: IMouseEvent): void { let domTop = this.domNode.domNode.getClientRects()[0].top; let sliderStart = domTop + this._scrollbarState.getSliderPosition(); let sliderStop = domTop + this._scrollbarState.getSliderPosition() + this._scrollbarState.getSliderSize(); let mousePos = this._sliderMousePosition(e); if (sliderStart <= mousePos && mousePos <= sliderStop) { // Act as if it was a mouse down on the slider - this._sliderMouseDown(e); + if (e.leftButton) { + e.preventDefault(); + this._sliderMouseDown(e, () => { /*nothing to do*/ }); + } } else { // Act as if it was a mouse down on the scrollbar this._onMouseDown(e); } } + public delegateSliderMouseDown(e: ISimplifiedMouseEvent, onDragFinished: () => void): void { + this._sliderMouseDown(e, onDragFinished); + } + private _onMouseDown(e: IMouseEvent): void { let domNodePosition = DomUtils.getDomNodePagePosition(this.domNode.domNode); this.setDesiredScrollPosition(this._scrollbarState.getDesiredScrollPositionFromOffset(this._mouseDownRelativePosition(e, domNodePosition))); - this._sliderMouseDown(e); + if (e.leftButton) { + e.preventDefault(); + this._sliderMouseDown(e, () => { /*nothing to do*/ }); + } } - private _sliderMouseDown(e: IMouseEvent): void { - if (e.leftButton) { - const initialMousePosition = this._sliderMousePosition(e); - const initialMouseOrthogonalPosition = this._sliderOrthogonalMousePosition(e); - const initialScrollbarState = this._scrollbarState.clone(); - this.slider.toggleClassName('active', true); - - this._mouseMoveMonitor.startMonitoring( - standardMouseMoveMerger, - (mouseMoveData: IStandardMouseMoveEventData) => { - const mouseOrthogonalPosition = this._sliderOrthogonalMousePosition(mouseMoveData); - const mouseOrthogonalDelta = Math.abs(mouseOrthogonalPosition - initialMouseOrthogonalPosition); - - if (Platform.isWindows && mouseOrthogonalDelta > MOUSE_DRAG_RESET_DISTANCE) { - // The mouse has wondered away from the scrollbar => reset dragging - this.setDesiredScrollPosition(initialScrollbarState.getScrollPosition()); - return; - } - - const mousePosition = this._sliderMousePosition(mouseMoveData); - const mouseDelta = mousePosition - initialMousePosition; - this.setDesiredScrollPosition(initialScrollbarState.getDesiredScrollPositionFromDelta(mouseDelta)); - }, - () => { - this.slider.toggleClassName('active', false); - this._host.onDragEnd(); + private _sliderMouseDown(e: ISimplifiedMouseEvent, onDragFinished: () => void): void { + const initialMousePosition = this._sliderMousePosition(e); + const initialMouseOrthogonalPosition = this._sliderOrthogonalMousePosition(e); + const initialScrollbarState = this._scrollbarState.clone(); + this.slider.toggleClassName('active', true); + + this._mouseMoveMonitor.startMonitoring( + standardMouseMoveMerger, + (mouseMoveData: IStandardMouseMoveEventData) => { + const mouseOrthogonalPosition = this._sliderOrthogonalMousePosition(mouseMoveData); + const mouseOrthogonalDelta = Math.abs(mouseOrthogonalPosition - initialMouseOrthogonalPosition); + + if (Platform.isWindows && mouseOrthogonalDelta > MOUSE_DRAG_RESET_DISTANCE) { + // The mouse has wondered away from the scrollbar => reset dragging + this.setDesiredScrollPosition(initialScrollbarState.getScrollPosition()); + return; } - ); - e.preventDefault(); - this._host.onDragStart(); - } + const mousePosition = this._sliderMousePosition(mouseMoveData); + const mouseDelta = mousePosition - initialMousePosition; + this.setDesiredScrollPosition(initialScrollbarState.getDesiredScrollPositionFromDelta(mouseDelta)); + }, + () => { + this.slider.toggleClassName('active', false); + this._host.onDragEnd(); + onDragFinished(); + } + ); + + this._host.onDragStart(); } public setDesiredScrollPosition(desiredScrollPosition: number): boolean { @@ -254,9 +265,9 @@ export abstract class AbstractScrollbar extends Widget { protected abstract _renderDomNode(largeSize: number, smallSize: number): void; protected abstract _updateSlider(sliderSize: number, sliderPosition: number): void; - protected abstract _mouseDownRelativePosition(e: IMouseEvent, domNodePosition: DomUtils.IDomNodePagePosition): number; - protected abstract _sliderMousePosition(e: IMouseMoveEventData): number; - protected abstract _sliderOrthogonalMousePosition(e: IMouseMoveEventData): number; + protected abstract _mouseDownRelativePosition(e: ISimplifiedMouseEvent, domNodePosition: DomUtils.IDomNodePagePosition): number; + protected abstract _sliderMousePosition(e: ISimplifiedMouseEvent): number; + protected abstract _sliderOrthogonalMousePosition(e: ISimplifiedMouseEvent): number; protected abstract _getScrollPosition(): number; protected abstract _setScrollPosition(elementScrollPosition: number): void; diff --git a/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts b/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts index 616d185a633f8..8e7e678f46fc1 100644 --- a/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { AbstractScrollbar, ScrollbarHost, IMouseMoveEventData } from 'vs/base/browser/ui/scrollbar/abstractScrollbar'; -import { IMouseEvent, StandardMouseWheelEvent } from 'vs/base/browser/mouseEvent'; +import { AbstractScrollbar, ScrollbarHost, ISimplifiedMouseEvent } from 'vs/base/browser/ui/scrollbar/abstractScrollbar'; +import { StandardMouseWheelEvent } from 'vs/base/browser/mouseEvent'; import { IDomNodePagePosition } from 'vs/base/browser/dom'; import { ScrollableElementResolvedOptions } from 'vs/base/browser/ui/scrollbar/scrollableElementOptions'; import { Scrollable, ScrollEvent, ScrollbarVisibility } from 'vs/base/common/scrollable'; @@ -84,15 +84,15 @@ export class HorizontalScrollbar extends AbstractScrollbar { return this._shouldRender; } - protected _mouseDownRelativePosition(e: IMouseEvent, domNodePosition: IDomNodePagePosition): number { + protected _mouseDownRelativePosition(e: ISimplifiedMouseEvent, domNodePosition: IDomNodePagePosition): number { return e.posx - domNodePosition.left; } - protected _sliderMousePosition(e: IMouseMoveEventData): number { + protected _sliderMousePosition(e: ISimplifiedMouseEvent): number { return e.posx; } - protected _sliderOrthogonalMousePosition(e: IMouseMoveEventData): number { + protected _sliderOrthogonalMousePosition(e: ISimplifiedMouseEvent): number { return e.posy; } diff --git a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts index 8e69aa38ffabd..c07026b7f72de 100644 --- a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts +++ b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts @@ -18,7 +18,7 @@ import { Scrollable, ScrollState, ScrollEvent, INewScrollState, ScrollbarVisibil import { Widget } from 'vs/base/browser/ui/widget'; import { TimeoutTimer } from 'vs/base/common/async'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; -import { ScrollbarHost } from 'vs/base/browser/ui/scrollbar/abstractScrollbar'; +import { ScrollbarHost, ISimplifiedMouseEvent } from 'vs/base/browser/ui/scrollbar/abstractScrollbar'; import Event, { Emitter } from 'vs/base/common/event'; const HIDE_TIMEOUT = 500; @@ -141,10 +141,18 @@ export class ScrollableElement extends Widget { * Delegate a mouse down event to the vertical scrollbar. * This is to help with clicking somewhere else and having the scrollbar react. */ - public delegateVerticalScrollbarMouseDown(browserEvent: MouseEvent): void { + public delegateVerticalScrollbarMouseDown(browserEvent: IMouseEvent): void { this._verticalScrollbar.delegateMouseDown(browserEvent); } + /** + * Delegate a mouse down event to the vertical scrollbar (directly to the slider!). + * This is to help with clicking somewhere else and having the scrollbar react. + */ + public delegateSliderMouseDown(e: ISimplifiedMouseEvent, onDragFinished: () => void): void { + this._verticalScrollbar.delegateSliderMouseDown(e, onDragFinished); + } + public getVerticalSliderVerticalCenter(): number { return this._verticalScrollbar.getVerticalSliderVerticalCenter(); } diff --git a/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts b/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts index 520a7139b485c..ce33b4164b414 100644 --- a/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { AbstractScrollbar, ScrollbarHost, IMouseMoveEventData } from 'vs/base/browser/ui/scrollbar/abstractScrollbar'; -import { IMouseEvent, StandardMouseWheelEvent } from 'vs/base/browser/mouseEvent'; +import { AbstractScrollbar, ScrollbarHost, ISimplifiedMouseEvent } from 'vs/base/browser/ui/scrollbar/abstractScrollbar'; +import { StandardMouseWheelEvent } from 'vs/base/browser/mouseEvent'; import { IDomNodePagePosition } from 'vs/base/browser/dom'; import { ScrollableElementResolvedOptions } from 'vs/base/browser/ui/scrollbar/scrollableElementOptions'; import { Scrollable, ScrollEvent, ScrollbarVisibility } from 'vs/base/common/scrollable'; @@ -89,15 +89,15 @@ export class VerticalScrollbar extends AbstractScrollbar { return this._shouldRender; } - protected _mouseDownRelativePosition(e: IMouseEvent, domNodePosition: IDomNodePagePosition): number { + protected _mouseDownRelativePosition(e: ISimplifiedMouseEvent, domNodePosition: IDomNodePagePosition): number { return e.posy - domNodePosition.top; } - protected _sliderMousePosition(e: IMouseMoveEventData): number { + protected _sliderMousePosition(e: ISimplifiedMouseEvent): number { return e.posy; } - protected _sliderOrthogonalMousePosition(e: IMouseMoveEventData): number { + protected _sliderOrthogonalMousePosition(e: ISimplifiedMouseEvent): number { return e.posx; } diff --git a/src/vs/editor/browser/view/viewImpl.ts b/src/vs/editor/browser/view/viewImpl.ts index 222f39fe1f340..9c947e636be32 100644 --- a/src/vs/editor/browser/view/viewImpl.ts +++ b/src/vs/editor/browser/view/viewImpl.ts @@ -49,6 +49,7 @@ import { Minimap } from 'vs/editor/browser/viewParts/minimap/minimap'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { IThemeService, getThemeTypeSelector } from 'vs/platform/theme/common/themeService'; import { Cursor } from 'vs/editor/common/controller/cursor'; +import { IMouseEvent } from "vs/base/browser/mouseEvent"; export interface IContentWidgetData { widget: editorBrowser.IContentWidget; @@ -436,7 +437,7 @@ export class View extends ViewEventHandler { // --- BEGIN CodeEditor helpers - public delegateVerticalScrollbarMouseDown(browserEvent: MouseEvent): void { + public delegateVerticalScrollbarMouseDown(browserEvent: IMouseEvent): void { this._scrollbar.delegateVerticalScrollbarMouseDown(browserEvent); } diff --git a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts index 89aee09559d19..a90d8f52d03a1 100644 --- a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts +++ b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts @@ -14,6 +14,8 @@ import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; import { FastDomNode, createFastDomNode } from 'vs/base/browser/fastDomNode'; import { getThemeTypeSelector } from 'vs/platform/theme/common/themeService'; +import { IMouseEvent } from "vs/base/browser/mouseEvent"; +import { ISimplifiedMouseEvent } from "vs/base/browser/ui/scrollbar/abstractScrollbar"; export class EditorScrollbar extends ViewPart { @@ -110,10 +112,14 @@ export class EditorScrollbar extends ViewPart { return this.scrollbarDomNode; } - public delegateVerticalScrollbarMouseDown(browserEvent: MouseEvent): void { + public delegateVerticalScrollbarMouseDown(browserEvent: IMouseEvent): void { this.scrollbar.delegateVerticalScrollbarMouseDown(browserEvent); } + public delegateSliderMouseDown(e: ISimplifiedMouseEvent, onDragFinished: () => void): void { + this.scrollbar.delegateSliderMouseDown(e, onDragFinished); + } + public getVerticalSliderVerticalCenter(): number { return this.scrollbar.getVerticalSliderVerticalCenter(); } diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index e0cb9cd2cb371..676300944f101 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -142,6 +142,13 @@ class MinimapOptions { class MinimapLayout { + /** + * The given editor scrollTop (input). + */ + public readonly scrollTop: number; + + private readonly _computedSliderRatio: number; + /** * slider dom node top (in CSS px) */ @@ -161,25 +168,45 @@ class MinimapLayout { public readonly endLineNumber: number; constructor( - lastRenderData: RenderData, + scrollTop: number, + computedSliderRatio: number, + sliderTop: number, + sliderHeight: number, + startLineNumber: number, + endLineNumber: number + ) { + this.scrollTop = scrollTop; + this._computedSliderRatio = computedSliderRatio; + this.sliderTop = sliderTop; + this.sliderHeight = sliderHeight; + this.startLineNumber = startLineNumber; + this.endLineNumber = endLineNumber; + } + + /** + * Compute a desired `scrollPosition` such that the slider moves by `delta`. + */ + public getDesiredScrollTopFromDelta(delta: number): number { + let desiredSliderPosition = this.sliderTop + delta; + return Math.round(desiredSliderPosition / this._computedSliderRatio); + } + + public static create( options: MinimapOptions, viewportStartLineNumber: number, viewportEndLineNumber: number, viewportHeight: number, viewportContainsWhitespaceGaps: boolean, lineCount: number, - scrollbarSliderCenter: number - ) { + scrollbarSliderCenter: number, + scrollTop: number, + scrollHeight: number + ): MinimapLayout { const pixelRatio = options.pixelRatio; const minimapLineHeight = getMinimapLineHeight(options.renderMinimap); const minimapLinesFitting = Math.floor(options.canvasInnerHeight / minimapLineHeight); const lineHeight = options.lineHeight; - // >>> The minimap slider should be center-aligned with the scrollbar slider. <<< - // >>> The entire minimap is painted around this constraint. <<< - // - // The slider should encompass the visible lines... Mostly. - // // The visible line count in a viewport can change due to a number of reasons: // a) with the same viewport width, different scroll positions can result in partial lines being visible: // e.g. for a line height of 20, and a viewport height of 600 @@ -188,80 +215,41 @@ class MinimapLayout { // * scrollTop = 20 => visible lines are [2, 31] // b) whitespace gaps might make their way in the viewport (which results in a decrease in the visible line count) // c) we could be in the scroll beyond last line case (which also results in a decrease in the visible line count, down to possibly only one line being visible) - // - // It therefore results that the slider height is variable, based on the current viewport. - // We must first establish a desirable slider height. - if (viewportContainsWhitespaceGaps) { + let sliderHeight: number; + if (viewportContainsWhitespaceGaps && viewportEndLineNumber !== lineCount) { // case b) from above: there are whitespace gaps in the viewport. // In this case, the height of the slider directly reflects the visible line count. const viewportLineCount = viewportEndLineNumber - viewportStartLineNumber + 1; - this.sliderHeight = Math.floor(viewportLineCount * minimapLineHeight / pixelRatio); + sliderHeight = Math.floor(viewportLineCount * minimapLineHeight / pixelRatio); } else { // The slider has a stable height const expectedViewportLineCount = viewportHeight / lineHeight; - this.sliderHeight = Math.floor(expectedViewportLineCount * minimapLineHeight / pixelRatio); + sliderHeight = Math.floor(expectedViewportLineCount * minimapLineHeight / pixelRatio); } + const maxMinimapSliderTop = Math.min(options.minimapHeight - sliderHeight, (lineCount - 1) * minimapLineHeight / pixelRatio); + // The slider can move from 0 to `maxMinimapSliderTop` + // in the same way `scrollTop` can move from 0 to `scrollHeight` - `viewportHeight`. + const computedSliderRatio = (maxMinimapSliderTop) / (scrollHeight - viewportHeight); + const sliderTop = (scrollTop * computedSliderRatio); + if (minimapLinesFitting >= lineCount) { - // All lines fit in the minimap => no minimap scrolling - // => the slider cannot be center-aligned with the scrollbar slider - this.startLineNumber = 1; - this.endLineNumber = lineCount; - - if (viewportEndLineNumber === lineCount) { - // case c) from above: we could be in the scroll beyond last line case - this.sliderTop = Math.floor((viewportStartLineNumber - this.startLineNumber) * minimapLineHeight / pixelRatio); - } else { - const desiredSliderTop = (viewportStartLineNumber - this.startLineNumber) * minimapLineHeight / pixelRatio; - const desiredSliderBottom = (viewportEndLineNumber - this.startLineNumber) * minimapLineHeight / pixelRatio; - const desiredSliderCenter = (desiredSliderTop + desiredSliderBottom) / 2; - this.sliderTop = Math.floor(desiredSliderCenter - this.sliderHeight / 2); - } + // All lines fit in the minimap + const startLineNumber = 1; + const endLineNumber = lineCount; + + return new MinimapLayout(scrollTop, computedSliderRatio, sliderTop, sliderHeight, startLineNumber, endLineNumber); } else { - // assign sliderTop last to maintain the same field assignment order in both if and else branches - const sliderTop = Math.floor(Math.min(options.minimapHeight - this.sliderHeight, Math.max(0, scrollbarSliderCenter - this.sliderHeight / 2))); + const startLineNumber = Math.max(1, Math.floor(viewportStartLineNumber - sliderTop * pixelRatio / minimapLineHeight)); + const endLineNumber = Math.min(lineCount, startLineNumber + minimapLinesFitting - 1); - this.startLineNumber = Math.max(1, Math.floor(viewportStartLineNumber - sliderTop * pixelRatio / minimapLineHeight)); - this.endLineNumber = Math.min(lineCount, this.startLineNumber + minimapLinesFitting - 1); - this.sliderTop = sliderTop; + return new MinimapLayout(scrollTop, computedSliderRatio, sliderTop, sliderHeight, startLineNumber, endLineNumber); } } } -class RenderedLayout { - /** - * editor viewport start line number. - */ - public readonly viewportStartLineNumber: number; - /** - * editor viewport end line number. - */ - public readonly viewportEndLineNumber: number; - - /** - * minimap rendered start line number. - */ - public readonly startLineNumber: number; - /** - * minimap rendered end line number. - */ - public readonly endLineNumber: number; - - constructor( - viewportStartLineNumber: number, - viewportEndLineNumber: number, - startLineNumber: number, - endLineNumber: number - ) { - this.viewportStartLineNumber = viewportStartLineNumber; - this.viewportEndLineNumber = viewportEndLineNumber; - this.startLineNumber = startLineNumber; - this.endLineNumber = endLineNumber; - } -} - class MinimapLine implements ILine { public static INVALID = new MinimapLine(-1); @@ -285,12 +273,12 @@ class RenderData { /** * last rendered layout. */ - public readonly renderedLayout: RenderedLayout; + public readonly renderedLayout: MinimapLayout; private readonly _imageData: ImageData; private readonly _renderedLines: RenderedLinesCollection; constructor( - renderedLayout: RenderedLayout, + renderedLayout: MinimapLayout, imageData: ImageData, lines: MinimapLine[] ) { @@ -461,45 +449,30 @@ export class Minimap extends ViewPart { this._sliderMouseDownListener = dom.addStandardDisposableListener(this._slider.domNode, 'mousedown', (e) => { e.preventDefault(); + if (e.leftButton && this._lastRenderData) { - if (e.leftButton) { + const initialMousePosition = e.posy; const initialMouseOrthogonalPosition = e.posx; - const initialScrollTop = this._context.viewLayout.getScrollTop(); - const initialSliderCenter = (this._slider.getTop() + this._slider.getHeight() / 2); - const draggingDeltaCenter = e.posy - initialSliderCenter; + const initialSliderState = this._lastRenderData.renderedLayout; this._slider.toggleClassName('active', true); this._sliderMouseMoveMonitor.startMonitoring( standardMouseMoveMerger, (mouseMoveData: IStandardMouseMoveEventData) => { - const mouseOrthogonalPosition = mouseMoveData.posx; - const mouseOrthogonalDelta = Math.abs(mouseOrthogonalPosition - initialMouseOrthogonalPosition); - if (platform.isWindows && mouseOrthogonalDelta > MOUSE_DRAG_RESET_DISTANCE) { - // The mouse has wondered away from the slider => reset dragging - this._context.viewLayout.setScrollPosition({ - scrollTop: initialScrollTop - }); - } else { - const pixelRatio = this._options.pixelRatio; - const minimapLineHeight = getMinimapLineHeight(this._options.renderMinimap); - const entireCanvasOuterHeight = this._context.model.getLineCount() * minimapLineHeight / pixelRatio; - const representableHeight = Math.min(entireCanvasOuterHeight, this._options.canvasOuterHeight); - - // Account for the fact that the minimap does not render the extra space below the viewport - let discountScrollHeight = 0; - if (this._context.configuration.editor.viewInfo.scrollBeyondLastLine) { - discountScrollHeight = this._canvas.getHeight() - this._context.configuration.editor.lineHeight; - } - const scrollHeight = this._context.viewLayout.getScrollHeight() - discountScrollHeight; - - const desiredSliderCenter = mouseMoveData.posy - draggingDeltaCenter; - const desiredScrollCenter = desiredSliderCenter * (scrollHeight / representableHeight); - const desiredScrollTop = desiredScrollCenter - this._canvas.getHeight() / 2; + const mouseOrthogonalDelta = Math.abs(mouseMoveData.posx - initialMouseOrthogonalPosition); + if (platform.isWindows && mouseOrthogonalDelta > MOUSE_DRAG_RESET_DISTANCE) { + // The mouse has wondered away from the scrollbar => reset dragging this._context.viewLayout.setScrollPosition({ - scrollTop: desiredScrollTop + scrollTop: initialSliderState.scrollTop }); + return; } + + const mouseDelta = mouseMoveData.posy - initialMousePosition; + this._context.viewLayout.setScrollPosition({ + scrollTop: initialSliderState.getDesiredScrollTopFromDelta(mouseDelta) + }); }, () => { this._slider.toggleClassName('active', false); @@ -627,15 +600,16 @@ export class Minimap extends ViewPart { this._shadow.setClassName('minimap-shadow-visible'); } - const layout = new MinimapLayout( - this._lastRenderData, + const layout = MinimapLayout.create( this._options, renderingCtx.visibleRange.startLineNumber, renderingCtx.visibleRange.endLineNumber, renderingCtx.viewportHeight, (renderingCtx.viewportData.whitespaceViewportData.length > 0), this._context.model.getLineCount(), - this._editorScrollbar.getVerticalSliderVerticalCenter() + this._editorScrollbar.getVerticalSliderVerticalCenter(), + renderingCtx.scrollTop, + renderingCtx.scrollHeight ); this._slider.setTop(layout.sliderTop); this._slider.setHeight(layout.sliderHeight); @@ -684,12 +658,7 @@ export class Minimap extends ViewPart { // Save rendered data for reuse on next frame if possible this._lastRenderData = new RenderData( - new RenderedLayout( - renderingCtx.visibleRange.startLineNumber, - renderingCtx.visibleRange.endLineNumber, - startLineNumber, - endLineNumber - ), + layout, imageData, renderedLines ); diff --git a/src/vs/editor/browser/widget/codeEditorWidget.ts b/src/vs/editor/browser/widget/codeEditorWidget.ts index bfb0cc8ceccaa..dd68b25c24b46 100644 --- a/src/vs/editor/browser/widget/codeEditorWidget.ts +++ b/src/vs/editor/browser/widget/codeEditorWidget.ts @@ -33,6 +33,7 @@ import { CoreEditorCommand } from 'vs/editor/common/controller/coreCommands'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorErrorForeground, editorErrorBorder, editorWarningForeground, editorWarningBorder } from 'vs/editor/common/view/editorColorRegistry'; import { Color } from 'vs/base/common/color'; +import { IMouseEvent } from "vs/base/browser/mouseEvent"; export abstract class CodeEditorWidget extends CommonCodeEditor implements editorBrowser.ICodeEditor { @@ -189,7 +190,7 @@ export abstract class CodeEditorWidget extends CommonCodeEditor implements edito return this.viewModel.coordinatesConverter.convertViewRangeToModelRange(viewRange); } - public delegateVerticalScrollbarMouseDown(browserEvent: MouseEvent): void { + public delegateVerticalScrollbarMouseDown(browserEvent: IMouseEvent): void { if (!this.hasView) { return; } diff --git a/src/vs/editor/browser/widget/diffEditorWidget.ts b/src/vs/editor/browser/widget/diffEditorWidget.ts index 556c843ce1513..362c73834766d 100644 --- a/src/vs/editor/browser/widget/diffEditorWidget.ts +++ b/src/vs/editor/browser/widget/diffEditorWidget.ts @@ -249,7 +249,7 @@ export class DiffEditorWidget extends Disposable implements editorBrowser.IDiffE this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode); - this._register(dom.addDisposableListener(this._overviewDomElement, 'mousedown', (e: MouseEvent) => { + this._register(dom.addStandardDisposableListener(this._overviewDomElement, 'mousedown', (e) => { this.modifiedEditor.delegateVerticalScrollbarMouseDown(e); })); this._containerDomElement.appendChild(this._overviewDomElement); From 39a1330e5ad7c40ccc79fd0208fd9a9666b60fc6 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Wed, 7 Jun 2017 10:38:26 +0200 Subject: [PATCH 1601/2747] Improve terminal default --- src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts index f63861f41d7d9..1e2aadffdb316 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts @@ -46,8 +46,7 @@ const dependsOn: IJSONSchema = { const terminal: IJSONSchema = { type: 'object', default: { - reveal: 'always', - echo: false + reveal: 'always' }, description: nls.localize('JsonSchema.tasks.terminal', 'Describe how the terminal used to execute a task behaves.'), properties: { From 093cd889ef603016862852fa70941087ee00ba9d Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Wed, 7 Jun 2017 13:38:45 +0200 Subject: [PATCH 1602/2747] Reactivate pickers for build and test tasks. --- .../parts/tasks/browser/buildQuickOpen.ts | 58 ++++++++++ .../parts/tasks/browser/testQuickOpen.ts | 58 ++++++++++ .../parts/tasks/common/taskService.ts | 1 + .../electron-browser/task.contribution.ts | 105 +++++++++++++++++- 4 files changed, 218 insertions(+), 4 deletions(-) create mode 100644 src/vs/workbench/parts/tasks/browser/buildQuickOpen.ts create mode 100644 src/vs/workbench/parts/tasks/browser/testQuickOpen.ts diff --git a/src/vs/workbench/parts/tasks/browser/buildQuickOpen.ts b/src/vs/workbench/parts/tasks/browser/buildQuickOpen.ts new file mode 100644 index 0000000000000..28b9db5251407 --- /dev/null +++ b/src/vs/workbench/parts/tasks/browser/buildQuickOpen.ts @@ -0,0 +1,58 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import nls = require('vs/nls'); +import { TPromise } from 'vs/base/common/winjs.base'; +import QuickOpen = require('vs/base/parts/quickopen/common/quickOpen'); +import Model = require('vs/base/parts/quickopen/browser/quickOpenModel'); +import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; + +import { Task, TaskGroup } from 'vs/workbench/parts/tasks/common/tasks'; +import { ITaskService } from 'vs/workbench/parts/tasks/common/taskService'; + +import * as base from './quickOpen'; + +class TaskEntry extends base.TaskEntry { + constructor(taskService: ITaskService, task: Task, highlights: Model.IHighlight[] = []) { + super(taskService, task, highlights); + } + + public run(mode: QuickOpen.Mode, context: Model.IContext): boolean { + if (mode === QuickOpen.Mode.PREVIEW) { + return false; + } + this.taskService.run(this._task); + return true; + } +} + +export class QuickOpenHandler extends base.QuickOpenHandler { + constructor( + @IQuickOpenService quickOpenService: IQuickOpenService, + @ITaskService taskService: ITaskService + ) { + super(quickOpenService, taskService); + } + + public getAriaLabel(): string { + return nls.localize('tasksAriaLabel', "Type the name of a build task"); + } + + protected getTasks(): TPromise { + return this.taskService.getTasksForGroup(TaskGroup.Build); + } + + protected createEntry(taskService: ITaskService, task: Task, highlights: Model.IHighlight[]): base.TaskEntry { + return new TaskEntry(taskService, task, highlights); + } + + public getEmptyLabel(searchString: string): string { + if (searchString.length > 0) { + return nls.localize('noTasksMatching', "No tasks matching"); + } + return nls.localize('noTasksFound', "No build tasks found"); + } +} diff --git a/src/vs/workbench/parts/tasks/browser/testQuickOpen.ts b/src/vs/workbench/parts/tasks/browser/testQuickOpen.ts new file mode 100644 index 0000000000000..96275341b2c7f --- /dev/null +++ b/src/vs/workbench/parts/tasks/browser/testQuickOpen.ts @@ -0,0 +1,58 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import nls = require('vs/nls'); +import { TPromise } from 'vs/base/common/winjs.base'; +import QuickOpen = require('vs/base/parts/quickopen/common/quickOpen'); +import Model = require('vs/base/parts/quickopen/browser/quickOpenModel'); +import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; + +import { Task, TaskGroup } from 'vs/workbench/parts/tasks/common/tasks'; +import { ITaskService } from 'vs/workbench/parts/tasks/common/taskService'; + +import * as base from './quickOpen'; + +class TaskEntry extends base.TaskEntry { + constructor(taskService: ITaskService, task: Task, highlights: Model.IHighlight[] = []) { + super(taskService, task, highlights); + } + + public run(mode: QuickOpen.Mode, context: Model.IContext): boolean { + if (mode === QuickOpen.Mode.PREVIEW) { + return false; + } + this.taskService.run(this._task); + return true; + } +} + +export class QuickOpenHandler extends base.QuickOpenHandler { + constructor( + @IQuickOpenService quickOpenService: IQuickOpenService, + @ITaskService taskService: ITaskService + ) { + super(quickOpenService, taskService); + } + + public getAriaLabel(): string { + return nls.localize('tasksAriaLabel', "Type the name of a test task"); + } + + protected getTasks(): TPromise { + return this.taskService.getTasksForGroup(TaskGroup.Test); + } + + protected createEntry(taskService: ITaskService, task: Task, highlights: Model.IHighlight[]): base.TaskEntry { + return new TaskEntry(taskService, task, highlights); + } + + public getEmptyLabel(searchString: string): string { + if (searchString.length > 0) { + return nls.localize('noTasksMatching', "No tasks matching"); + } + return nls.localize('noTasksFound', "No test tasks found"); + } +} diff --git a/src/vs/workbench/parts/tasks/common/taskService.ts b/src/vs/workbench/parts/tasks/common/taskService.ts index 63b2da0413770..b410569a283d3 100644 --- a/src/vs/workbench/parts/tasks/common/taskService.ts +++ b/src/vs/workbench/parts/tasks/common/taskService.ts @@ -42,6 +42,7 @@ export interface ITaskService extends IEventEmitter { terminate(task: string | Task): TPromise; terminateAll(): TPromise; tasks(): TPromise; + getTasksForGroup(group: string): TPromise; customize(task: Task, openConfig?: boolean): TPromise; diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 5fea1fd052bb5..0619206da2fc6 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -9,6 +9,8 @@ import 'vs/css!./media/task.contribution'; import 'vs/workbench/parts/tasks/browser/taskQuickOpen'; import 'vs/workbench/parts/tasks/browser/terminateQuickOpen'; import 'vs/workbench/parts/tasks/browser/restartQuickOpen'; +import 'vs/workbench/parts/tasks/browser/buildQuickOpen'; +import 'vs/workbench/parts/tasks/browser/testQuickOpen'; import * as nls from 'vs/nls'; @@ -626,7 +628,7 @@ class TaskService extends EventEmitter implements ITaskService { if (!this.canRunCommand()) { return; } - this.build(); + this.runBuildCommand(); }); KeybindingsRegistry.registerKeybindingRule({ @@ -640,7 +642,7 @@ class TaskService extends EventEmitter implements ITaskService { if (!this.canRunCommand()) { return; } - this.runTest(); + this.runTestCommand(); }); } @@ -745,6 +747,33 @@ class TaskService extends EventEmitter implements ITaskService { }); } + public getTasksForGroup(group: string): TPromise { + return this.getTaskSets().then((values) => { + let result: Task[] = []; + for (let value of values) { + for (let task of value.tasks) { + if (task.group === group) { + result.push(task); + } + } + } + return result; + }); + } + + private splitTasks(tasks: Task[]): { configured: Task[], detected: Task[] } { + let configured: Task[] = []; + let detected: Task[] = []; + for (let task of tasks) { + if (task._source.kind === TaskSourceKind.Workspace) { + configured.push(task); + } else { + detected.push(task); + } + } + return { configured, detected }; + } + public customize(task: Task, openConfig: boolean = false): TPromise { if (task._source.kind !== TaskSourceKind.Extension) { return TPromise.as(undefined); @@ -755,7 +784,10 @@ class TaskService extends EventEmitter implements ITaskService { return TPromise.as(undefined); } let fileConfig = configuration.config; - let customize = { customize: task.identifier, taskName: task._label, problemMatcher: [] }; + let customize: TaskConfig.TaskDescription = { customize: task.identifier, taskName: task._label }; + if (task.problemMatchers === void 0) { + customize.problemMatcher = []; + } if (!fileConfig) { fileConfig = { version: '2.0.0', @@ -1188,7 +1220,10 @@ class TaskService extends EventEmitter implements ITaskService { } public inTerminal(): boolean { - return this._taskSystem instanceof TerminalTaskSystem; + if (this._taskSystem) { + return this._taskSystem instanceof TerminalTaskSystem; + } + return this.getExecutionEngine() === ExecutionEngine.Terminal; } private hasDetectorSupport(config: TaskConfig.ExternalTaskRunnerConfiguration): boolean { @@ -1306,6 +1341,50 @@ class TaskService extends EventEmitter implements ITaskService { } } + private runBuildCommand(): void { + if (!this.canRunCommand()) { + return; + } + if (!this.inTerminal()) { + this.build(); + return; + } + this.getTasksForGroup(TaskGroup.Build).then((tasks) => { + let { configured, detected } = this.splitTasks(tasks); + let total = configured.length + detected.length; + if (total === 0) { + return; + } + if (total === 1) { + this.run(configured[0] || detected[0]); + } else { + this.quickOpenService.show('build task '); + } + }); + } + + private runTestCommand(): void { + if (!this.canRunCommand()) { + return; + } + if (!this.inTerminal()) { + this.build(); + return; + } + this.getTasksForGroup(TaskGroup.Test).then((tasks) => { + let { configured, detected } = this.splitTasks(tasks); + let total = configured.length + detected.length; + if (total === 0) { + return; + } + if (total === 1) { + this.run(configured[0] || detected[0]); + } else { + this.quickOpenService.show('test task '); + } + }); + } + private runTerminateCommand(): void { if (!this.canRunCommand()) { return; @@ -1412,6 +1491,24 @@ quickOpenRegistry.registerQuickOpenHandler( ) ); +quickOpenRegistry.registerQuickOpenHandler( + new QuickOpenHandlerDescriptor( + 'vs/workbench/parts/tasks/browser/buildQuickOpen', + 'QuickOpenHandler', + 'build task ', + nls.localize('quickOpen.buildTask', "Build Task") + ) +); + +quickOpenRegistry.registerQuickOpenHandler( + new QuickOpenHandlerDescriptor( + 'vs/workbench/parts/tasks/browser/testQuickOpen', + 'QuickOpenHandler', + 'test task ', + nls.localize('quickOpen.testTask', "Test Task") + ) +); + const actionBarRegistry = Registry.as(ActionBarExtensions.Actionbar); actionBarRegistry.registerActionBarContributor(Scope.VIEWER, QuickOpenActionContributor); From 99b581e073ee6c4306e39569b918c47bd587a31b Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 7 Jun 2017 16:15:34 +0200 Subject: [PATCH 1603/2747] remove unused code --- src/vs/base/common/filters.ts | 23 -------------------- src/vs/base/test/common/filters.perf.test.ts | 1 - 2 files changed, 24 deletions(-) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index e6404bb6edc5d..49e5de0eb5a85 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -358,29 +358,6 @@ export function matchesFuzzy(word: string, wordToMatchAgainst: string, enableSep return enableSeparateSubstringMatching ? fuzzySeparateFilter(word, wordToMatchAgainst) : fuzzyContiguousFilter(word, wordToMatchAgainst); } -export function matchesFuzzy2(pattern: string, word: string): number[] { - - pattern = pattern.toLowerCase(); - word = word.toLowerCase(); - - let matches: number[] = []; - let patternPos = 0; - let wordPos = 0; - while (patternPos < pattern.length && wordPos < word.length) { - if (pattern[patternPos] === word[wordPos]) { - patternPos += 1; - matches.push(wordPos); - } - wordPos += 1; - } - - if (patternPos !== pattern.length) { - return undefined; - } - - return matches; -} - export function createMatches(position: number[]): IMatch[] { let ret: IMatch[] = []; if (!position) { diff --git a/src/vs/base/test/common/filters.perf.test.ts b/src/vs/base/test/common/filters.perf.test.ts index 790e1d3fd678f..079c048239c06 100644 --- a/src/vs/base/test/common/filters.perf.test.ts +++ b/src/vs/base/test/common/filters.perf.test.ts @@ -39,7 +39,6 @@ perfSuite('Performance - fuzzyMatch', function () { perfTest('matchesFuzzy', filters.matchesFuzzy); perfTest('fuzzyContiguousFilter', filters.fuzzyContiguousFilter); - perfTest('matchesFuzzy2', filters.matchesFuzzy2); perfTest('fuzzyScore', filters.fuzzyScore); perfTest('fuzzyScoreGraceful', filters.fuzzyScoreGraceful); From 4b78474e04295ed52fb01c8526404725615b6d58 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 7 Jun 2017 16:40:25 +0200 Subject: [PATCH 1604/2747] prune when total is going bad, fixes #26423 --- src/vs/base/common/filters.ts | 14 +++----------- src/vs/base/test/common/filters.test.ts | 3 +++ 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index 49e5de0eb5a85..67b4e38d2922b 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -474,9 +474,6 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { return undefined; } - // keep track of the maximum score - let maxScore = -1; - for (patternPos = patternStartPos + 1; patternPos <= patternLen; patternPos++) { let lastLowWordChar = ''; @@ -508,9 +505,6 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { } _scores[patternPos][wordPos] = score; - if (score > maxScore) { - maxScore = score; - } let diag = _table[patternPos - 1][wordPos - 1] + (score > 1 ? 1 : score); let top = _table[patternPos - 1][wordPos] + -1; @@ -546,10 +540,6 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { } } - if (maxScore <= 1) { - return undefined; - } - if (_debug) { console.log(printTable(_table, pattern, patternLen, word, wordLen)); console.log(printTable(_arrows, pattern, patternLen, word, wordLen)); @@ -577,7 +567,9 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { function findAllMatches(patternLen: number, patternPos: number, patternStartPos: number, wordPos: number, total: number, matches: number[], bucket: [number, number[]][], lastMatched: boolean): void { - if (bucket.length >= 10) { + if (bucket.length >= 10 || total < -25) { + // stop when having already 10 results, or + // when a potential alignment as already 5 gaps return; } diff --git a/src/vs/base/test/common/filters.test.ts b/src/vs/base/test/common/filters.test.ts index 4753059f57c39..e555d4a08f5b2 100644 --- a/src/vs/base/test/common/filters.test.ts +++ b/src/vs/base/test/common/filters.test.ts @@ -306,6 +306,9 @@ suite('Filters', () => { }); test('fuzzyScore, issue #26423', function () { + + assertMatches('baba', 'abababab', undefined, fuzzyScore); + assertMatches( 'fsfsfs', 'dsafdsafdsafdsafdsafdsafdsafasdfdsa', From 4347674e041026e55f2b34dd750e550e43912d1c Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 7 Jun 2017 16:42:17 +0200 Subject: [PATCH 1605/2747] Fixes Microsoft/monaco-editor#425: Create an aria container dom node as soon as the first editor is instantiated --- src/vs/base/browser/ui/aria/aria.css | 2 +- src/vs/base/browser/ui/aria/aria.ts | 6 +++--- .../browser/standalone/standaloneCodeEditor.ts | 13 +++++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/vs/base/browser/ui/aria/aria.css b/src/vs/base/browser/ui/aria/aria.css index fd795b9af1b0f..75ae8780fe104 100644 --- a/src/vs/base/browser/ui/aria/aria.css +++ b/src/vs/base/browser/ui/aria/aria.css @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -.aria-container { +.monaco-aria-container { position: absolute; /* try to hide from workbench but not from screen readers */ left:-999em; } \ No newline at end of file diff --git a/src/vs/base/browser/ui/aria/aria.ts b/src/vs/base/browser/ui/aria/aria.ts index dd5776ab9f894..ff89cc491727a 100644 --- a/src/vs/base/browser/ui/aria/aria.ts +++ b/src/vs/base/browser/ui/aria/aria.ts @@ -14,10 +14,10 @@ let ariaContainer: Builder; let alertContainer: Builder; let statusContainer: Builder; export function setARIAContainer(parent: HTMLElement) { - ariaContainer = $('.aria-container').appendTo(parent); + ariaContainer = $('.monaco-aria-container').appendTo(parent); - alertContainer = $('.alert').appendTo(ariaContainer).attr({ 'role': 'alert', 'aria-atomic': 'true' }); - statusContainer = $('.status').appendTo(ariaContainer).attr({ 'role': 'status', 'aria-atomic': 'true' }); + alertContainer = $('.monaco-alert').appendTo(ariaContainer).attr({ 'role': 'alert', 'aria-atomic': 'true' }); + statusContainer = $('.monaco-status').appendTo(ariaContainer).attr({ 'role': 'status', 'aria-atomic': 'true' }); } /** diff --git a/src/vs/editor/browser/standalone/standaloneCodeEditor.ts b/src/vs/editor/browser/standalone/standaloneCodeEditor.ts index 2a3a9789ed453..8461009c2a99f 100644 --- a/src/vs/editor/browser/standalone/standaloneCodeEditor.ts +++ b/src/vs/editor/browser/standalone/standaloneCodeEditor.ts @@ -25,6 +25,7 @@ import { InternalEditorAction } from 'vs/editor/common/editorAction'; import { MenuId, MenuRegistry, IMenuItem } from 'vs/platform/actions/common/actions'; import { IDiffEditorOptions, IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IThemeService } from 'vs/platform/theme/common/themeService'; +import * as aria from 'vs/base/browser/ui/aria/aria'; /** * The options to create an editor. @@ -83,6 +84,15 @@ export interface IStandaloneDiffEditor extends IDiffEditor { let LAST_GENERATED_COMMAND_ID = 0; +let ariaDomNodeCreated = false; +function createAriaDomNode() { + if (ariaDomNodeCreated) { + return; + } + ariaDomNodeCreated = true; + aria.setARIAContainer(document.body); +} + /** * A code editor to be used both by the standalone editor and the standalone diff editor. */ @@ -105,6 +115,9 @@ export class StandaloneCodeEditor extends CodeEditor implements IStandaloneCodeE if (keybindingService instanceof StandaloneKeybindingService) { this._standaloneKeybindingService = keybindingService; } + + // Create the ARIA dom node as soon as the first editor is instantiated + createAriaDomNode(); } public addCommand(keybinding: number, handler: ICommandHandler, context: string): string { From 5ca7c3dacb5ac7565d16b24ebdd73137f8965697 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 7 Jun 2017 16:51:04 +0200 Subject: [PATCH 1606/2747] Resolves #27921 --- test/smoke/src/spectron/application.ts | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/test/smoke/src/spectron/application.ts b/test/smoke/src/spectron/application.ts index 4d64259ae1716..b6f5196857e2c 100644 --- a/test/smoke/src/spectron/application.ts +++ b/test/smoke/src/spectron/application.ts @@ -22,19 +22,36 @@ export class SpectronApplication { public client: SpectronClient; private spectron: Application; - private readonly pollTrials = 5; - private readonly pollTimeout = 3; // in secs private keybindings: any[]; private screenshot: Screenshot; + private readonly sampleExtensionsDir: string = 'test_data/sample_extensions_dir'; + private readonly pollTrials = 5; + private readonly pollTimeout = 3; // in secs + constructor(electronPath: string, testName: string, private testRetry: number, args?: string[], chromeDriverArgs?: string[]) { if (!args) { args = []; } + // Prevent 'Getting Started' web page from opening on clean user-data-dir + args.push('--skip-getting-started'); + + // Ensure that running over custom extensions directory, rather than picking up the one that was used by a tester previously + let extensionDirIsSet = false; + for (let arg of args) { + if (arg.startsWith('--extensions-dir')) { + extensionDirIsSet = true; + return; + } + } + if (!extensionDirIsSet) { + args.push(`--extensions-dir=${this.sampleExtensionsDir}`); + } + this.spectron = new Application({ path: electronPath, - args: args.concat(['--skip-getting-started']), // prevent 'Getting Started' web page from opening on clean user-data-dir + args: args, chromeDriverArgs: chromeDriverArgs }); this.screenshot = new Screenshot(this, testName); From e019e2484bc9bbb94b90f4375d788155cbc53519 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 7 Jun 2017 16:51:29 +0200 Subject: [PATCH 1607/2747] filters - simplify findAllMatches --- src/vs/base/common/filters.ts | 34 ++++++++++++------------- src/vs/base/test/common/filters.test.ts | 1 + 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index 67b4e38d2922b..34966eedc7189 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -546,15 +546,16 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { console.log(printTable(_scores, pattern, patternLen, word, wordLen)); } - let bucket: [number, number[]][] = []; - findAllMatches(patternLen, patternLen, patternStartPos, wordLen, 0, [], bucket, false); + _bucket.length = 0; + _patternStartPos = patternStartPos; + _findAllMatches(patternLen, wordLen, 0, [], false); - if (bucket.length === 0) { + if (_bucket.length === 0) { return undefined; } - let topMatch = bucket.shift(); - for (const match of bucket) { + let topMatch = _bucket.shift(); + for (const match of _bucket) { if (!topMatch || topMatch[0] < match[0]) { topMatch = match; } @@ -565,9 +566,12 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { return topMatch; } -function findAllMatches(patternLen: number, patternPos: number, patternStartPos: number, wordPos: number, total: number, matches: number[], bucket: [number, number[]][], lastMatched: boolean): void { +let _bucket: [number, number[]][] = []; +let _patternStartPos: number = 0; - if (bucket.length >= 10 || total < -25) { +function _findAllMatches(patternPos: number, wordPos: number, total: number, matches: number[], lastMatched: boolean): void { + + if (_bucket.length >= 10 || total < -25) { // stop when having already 10 results, or // when a potential alignment as already 5 gaps return; @@ -575,7 +579,7 @@ function findAllMatches(patternLen: number, patternPos: number, patternStartPos: let simpleMatchCount = 0; - while (patternPos > patternStartPos && wordPos > 0) { + while (patternPos > _patternStartPos && wordPos > 0) { let score = _scores[patternPos][wordPos]; let arrow = _arrows[patternPos][wordPos]; @@ -595,11 +599,12 @@ function findAllMatches(patternLen: number, patternPos: number, patternStartPos: if (arrow & Arrow.Left) { // left - findAllMatches( - patternLen, patternPos, patternStartPos, + _findAllMatches( + patternPos, wordPos - 1, matches.length !== 0 ? total - 1 : total, - matches.slice(0), bucket, lastMatched + matches.slice(0), + lastMatched ); } @@ -622,11 +627,6 @@ function findAllMatches(patternLen: number, patternPos: number, patternStartPos: } } - if (matches.length !== patternLen - patternStartPos) { - // doesn't cover whole pattern - return undefined; - } - if (_scores[1][matches[0] + 1] === 1) { // first match is weak return undefined; @@ -634,7 +634,7 @@ function findAllMatches(patternLen: number, patternPos: number, patternStartPos: total -= wordPos >= 3 ? 9 : wordPos * 3; // late start penalty - bucket.push([total, matches]); + _bucket.push([total, matches]); } diff --git a/src/vs/base/test/common/filters.test.ts b/src/vs/base/test/common/filters.test.ts index e555d4a08f5b2..f5c4bb30869d5 100644 --- a/src/vs/base/test/common/filters.test.ts +++ b/src/vs/base/test/common/filters.test.ts @@ -248,6 +248,7 @@ suite('Filters', () => { assertMatches('ccm', 'cacmelCase', '^ca^c^melCase', fuzzyScore); assertMatches('bti', 'the_black_knight', undefined, fuzzyScore); assertMatches('ccm', 'camelCase', undefined, fuzzyScore); + assertMatches('cmcm', 'camelCase', undefined, fuzzyScore); assertMatches('BK', 'the_black_knight', 'the_^black_^knight', fuzzyScore); assertMatches('KeyboardLayout=', 'KeyboardLayout', undefined, fuzzyScore); assertMatches('LLL', 'SVisualLoggerLogsList', 'SVisual^Logger^Logs^List', fuzzyScore); From 96869f57428d8b24a61255b3aba36b2d3f716dc2 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 7 Jun 2017 17:00:08 +0200 Subject: [PATCH 1608/2747] break from the loop instead of returning --- test/smoke/src/spectron/application.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/smoke/src/spectron/application.ts b/test/smoke/src/spectron/application.ts index b6f5196857e2c..64110535615c9 100644 --- a/test/smoke/src/spectron/application.ts +++ b/test/smoke/src/spectron/application.ts @@ -42,7 +42,7 @@ export class SpectronApplication { for (let arg of args) { if (arg.startsWith('--extensions-dir')) { extensionDirIsSet = true; - return; + break; } } if (!extensionDirIsSet) { From 1f1e1ec7c94e656d2fb05a70378fa5fefbb253f5 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 7 Jun 2017 17:07:12 +0200 Subject: [PATCH 1609/2747] Pass the argument to the VS Code executable, instead of a chrome driver. --- test/smoke/src/tests/extensions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/smoke/src/tests/extensions.ts b/test/smoke/src/tests/extensions.ts index 9e563f2f3c104..b4514372569fc 100644 --- a/test/smoke/src/tests/extensions.ts +++ b/test/smoke/src/tests/extensions.ts @@ -24,7 +24,7 @@ export async function testExtensions() { let extensions: Extensions; beforeEach(async function () { - app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH], [`--extensions-dir=${EXTENSIONS_DIR}`]); + app = new SpectronApplication(LATEST_PATH, this.currentTest.fullTitle(), (this.currentTest as any).currentRetry(), [WORKSPACE_PATH, `--extensions-dir=${EXTENSIONS_DIR}`]); common = new CommonActions(app); extensions = new Extensions(app, common); await common.removeDirectory(EXTENSIONS_DIR); From fcf8b2942dee3ad558e24b31c7bcfde3d8b6b544 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 7 Jun 2017 17:11:35 +0200 Subject: [PATCH 1610/2747] Pass extensions-dir as VS Code arg, instead of Chrome Driver one. --- test/smoke/src/tests/data-migration.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/smoke/src/tests/data-migration.ts b/test/smoke/src/tests/data-migration.ts index 68c4f698b7e3f..eee83600838e0 100644 --- a/test/smoke/src/tests/data-migration.ts +++ b/test/smoke/src/tests/data-migration.ts @@ -24,8 +24,13 @@ export function testDataMigration() { return await common.removeDirectory(EXTENSIONS_DIR); }); - function setupSpectron(context: Mocha.ITestCallbackContext, appPath: string, workspace?: string[]): void { - app = new SpectronApplication(appPath, context.test.fullTitle(), context.test.currentRetry(), workspace, [`--user-data-dir=${USER_DIR}`, `--extensions-dir=${EXTENSIONS_DIR}`]); + function setupSpectron(context: Mocha.ITestCallbackContext, appPath: string, args?: string[]): void { + if (!args) { + args = []; + } + args.push(`--extensions-dir=${EXTENSIONS_DIR}`); + + app = new SpectronApplication(appPath, context.test.fullTitle(), context.test.currentRetry(), args, [`--user-data-dir=${USER_DIR}`]); common = new CommonActions(app); } From dfc9961ae1c9efb9c4f76580e56c1f401783374c Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 7 Jun 2017 17:36:10 +0200 Subject: [PATCH 1611/2747] fix #23728 --- .../contrib/snippet/browser/snippetSession.ts | 2 +- .../test/browser/snippetController2.test.ts | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index 8f13268453108..44cfd7cb38827 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -296,7 +296,7 @@ export class SnippetSession { // store snippets with the index of their originating selection. // that ensures the primiary cursor stays primary despite not being // the one with lowest start position - edits[idx] = EditOperation.replaceMove(snippetSelection, snippet.text); + edits[idx] = EditOperation.replace(snippetSelection, snippet.text); snippets[idx] = new OneSnippet(editor, snippet, offset); } diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts index 2f42a0c9932fb..7b55d2061ffda 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetController2.test.ts @@ -224,4 +224,23 @@ suite('SnippetController2', function () { ctrl.prev(); // inner `$0` assertSelections(editor, new Selection(1, 31, 1, 31), new Selection(2, 35, 2, 35)); }); + + test('Snippet tabstop selecting content of previously entered variable only works when separated by space, #23728', function () { + const ctrl = new SnippetController2(editor, contextKeys); + + model.setValue(''); + editor.setSelection(new Selection(1, 1, 1, 1)); + + ctrl.insert('import ${2:${1:module}} from \'${1: module }\'$0'); + + assertContextKeys(contextKeys, true, false, true); + assertSelections(editor, new Selection(1, 8, 1, 14), new Selection(1, 21, 1, 29)); + + ctrl.insert('foo'); + assertSelections(editor, new Selection(1, 11, 1, 11), new Selection(1, 21, 1, 21)); + + ctrl.next(); // ${2:...} + assertSelections(editor, new Selection(1, 8, 1, 11)); + }); + }); From 36e83cc200dd6bfe6e688faf5f9611d5e8f52143 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 7 Jun 2017 17:40:21 +0200 Subject: [PATCH 1612/2747] Fixes Microsoft/monaco-editor#446 --- src/vs/base/browser/ui/actionbar/actionbar.ts | 14 ++++++++++++-- src/vs/base/browser/ui/menu/menu.ts | 3 ++- .../contrib/contextmenu/browser/contextmenu.ts | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/vs/base/browser/ui/actionbar/actionbar.ts b/src/vs/base/browser/ui/actionbar/actionbar.ts index 452b2ece1e530..5ec92db83be9b 100644 --- a/src/vs/base/browser/ui/actionbar/actionbar.ts +++ b/src/vs/base/browser/ui/actionbar/actionbar.ts @@ -218,6 +218,7 @@ export interface IActionItemOptions extends IBaseActionItemOptions { icon?: boolean; label?: boolean; keybinding?: string; + isMenu?: boolean; } export class ActionItem extends BaseActionItem { @@ -239,7 +240,11 @@ export class ActionItem extends BaseActionItem { super.render(container); this.$e = $('a.action-label').appendTo(this.builder); - this.$e.attr({ role: 'button' }); + if (this.options.isMenu) { + this.$e.attr({ role: 'menuitem' }); + } else { + this.$e.attr({ role: 'button' }); + } if (this.options.label && this.options.keybinding) { $('span.keybinding').text(this.options.keybinding).appendTo(this.builder); @@ -343,6 +348,7 @@ export interface IActionBarOptions { actionRunner?: IActionRunner; ariaLabel?: string; animated?: boolean; + isMenu?: boolean; } let defaultOptions: IActionBarOptions = { @@ -458,7 +464,11 @@ export class ActionBar extends EventEmitter implements IActionRunner { this.actionsList = document.createElement('ul'); this.actionsList.className = 'actions-container'; - this.actionsList.setAttribute('role', 'toolbar'); + if (this.options.isMenu) { + this.actionsList.setAttribute('role', 'menubar'); + } else { + this.actionsList.setAttribute('role', 'toolbar'); + } if (this.options.ariaLabel) { this.actionsList.setAttribute('aria-label', this.options.ariaLabel); } diff --git a/src/vs/base/browser/ui/menu/menu.ts b/src/vs/base/browser/ui/menu/menu.ts index 15a214855361d..2130e8803b76d 100644 --- a/src/vs/base/browser/ui/menu/menu.ts +++ b/src/vs/base/browser/ui/menu/menu.ts @@ -36,7 +36,8 @@ export class Menu extends EventEmitter { orientation: ActionsOrientation.VERTICAL, actionItemProvider: options.actionItemProvider, context: options.context, - actionRunner: options.actionRunner + actionRunner: options.actionRunner, + isMenu: true }); this.listener = this.addEmitter(this.actionBar); diff --git a/src/vs/editor/contrib/contextmenu/browser/contextmenu.ts b/src/vs/editor/contrib/contextmenu/browser/contextmenu.ts index a5dbd5818bc80..b389061785acc 100644 --- a/src/vs/editor/contrib/contextmenu/browser/contextmenu.ts +++ b/src/vs/editor/contrib/contextmenu/browser/contextmenu.ts @@ -175,7 +175,7 @@ export class ContextMenuController implements IEditorContribution { getActionItem: (action) => { var keybinding = this._keybindingFor(action); if (keybinding) { - return new ActionItem(action, action, { label: true, keybinding: keybinding.getLabel() }); + return new ActionItem(action, action, { label: true, keybinding: keybinding.getLabel(), isMenu: true }); } var customActionItem = action; From bc72c645731b520d6f5893f92819072dd44298cd Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Wed, 7 Jun 2017 18:32:57 +0200 Subject: [PATCH 1613/2747] Always show group label --- .../workbench/parts/tasks/browser/quickOpen.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/parts/tasks/browser/quickOpen.ts b/src/vs/workbench/parts/tasks/browser/quickOpen.ts index 3ec4cf961800e..c8661e0d52cc6 100644 --- a/src/vs/workbench/parts/tasks/browser/quickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/quickOpen.ts @@ -89,22 +89,20 @@ export abstract class QuickOpenHandler extends Quickopen.QuickOpenHandler { return +1; } }); - let hasWorkspace: boolean = tasks[0]._source.kind === TaskSourceKind.Workspace; - let hasExtension: boolean = tasks[tasks.length - 1]._source.kind === TaskSourceKind.Extension; - let groupWorkspace = hasWorkspace && hasExtension; - let groupExtension = groupWorkspace; - let hadWorkspace = false; + let firstWorkspace: boolean = true; + let firstExtension: boolean = true; + let hadWorkspace: boolean = false; for (let task of tasks) { let highlights = Filters.matchesContiguousSubString(input, task._label); if (!highlights) { continue; } - if (task._source.kind === TaskSourceKind.Workspace && groupWorkspace) { - groupWorkspace = false; + if (task._source.kind === TaskSourceKind.Workspace && firstWorkspace) { + firstWorkspace = false; hadWorkspace = true; entries.push(new TaskGroupEntry(this.createEntry(this.taskService, task, highlights), nls.localize('configured', 'Configured Tasks'), false)); - } else if (task._source.kind === TaskSourceKind.Extension && groupExtension) { - groupExtension = false; + } else if (task._source.kind === TaskSourceKind.Extension && firstExtension) { + firstExtension = false; entries.push(new TaskGroupEntry(this.createEntry(this.taskService, task, highlights), nls.localize('detected', 'Detected Tasks'), hadWorkspace)); } else { entries.push(this.createEntry(this.taskService, task, highlights)); From dd9ebe1d6eed63a29a87a87b887cb78b2205a860 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 7 Jun 2017 10:20:40 -0700 Subject: [PATCH 1614/2747] Fix more TS 2.4 Errors in VS Code codebase (#28144) --- src/vs/base/common/glob.ts | 3 ++- .../contrib/goToDeclaration/browser/goToDeclaration.ts | 2 +- src/vs/editor/contrib/rename/browser/rename.ts | 2 +- .../contrib/wordHighlighter/common/wordHighlighter.ts | 2 +- src/vs/platform/update/electron-main/updateService.ts | 6 +++--- .../workbench/api/electron-browser/mainThreadTreeViews.ts | 4 ++-- .../parts/snippets/electron-browser/snippetsService.ts | 2 +- .../parts/tasks/electron-browser/terminalTaskSystem.ts | 2 +- .../parts/terminal/electron-browser/terminalService.ts | 2 +- 9 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/vs/base/common/glob.ts b/src/vs/base/common/glob.ts index 33da9d6b879ea..8fcd060bf94b3 100644 --- a/src/vs/base/common/glob.ts +++ b/src/vs/base/common/glob.ts @@ -436,7 +436,8 @@ export function parse(arg1: string | IExpression, options: IGlobOptions = {}): a export function parseToAsync(expression: IExpression, options?: IGlobOptions): ParsedExpression { const parsedExpression = parse(expression, options); return (path: string, basename?: string, siblingsFn?: () => TPromise): TPromise => { - return TPromise.as(parsedExpression(path, basename, siblingsFn)); + const result = parsedExpression(path, basename, siblingsFn); + return typeof result === 'string' ? TPromise.as(result) : result; }; } diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts index 61afed811363f..182404712f76c 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclaration.ts @@ -15,7 +15,7 @@ import { CancellationToken } from 'vs/base/common/cancellation'; import { asWinJsPromise } from 'vs/base/common/async'; import { Position } from 'vs/editor/common/core/position'; -function outputResults(promises: TPromise[]) { +function outputResults(promises: TPromise[]) { return TPromise.join(promises).then(allReferences => { let result: Location[] = []; for (let references of allReferences) { diff --git a/src/vs/editor/contrib/rename/browser/rename.ts b/src/vs/editor/contrib/rename/browser/rename.ts index 582e3a2ab4ea5..70fc125ffa5bc 100644 --- a/src/vs/editor/contrib/rename/browser/rename.ts +++ b/src/vs/editor/contrib/rename/browser/rename.ts @@ -38,7 +38,7 @@ export function rename(model: IReadOnlyModel, position: Position, newName: strin let hasResult = false; const factory = supports.map(support => { - return () => { + return (): TPromise => { if (!hasResult) { return asWinJsPromise((token) => { return support.provideRenameEdits(model, position, newName, token); diff --git a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts index 896e593b00577..0aa87cb728251 100644 --- a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts +++ b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts @@ -32,7 +32,7 @@ export function getOccurrencesAtPosition(model: editorCommon.IReadOnlyModel, pos // until someone response with a good result // (good = none empty array) return sequence(orderedByScore.map(provider => { - return () => { + return (): TPromise => { if (!foundResult) { return asWinJsPromise((token) => { return provider.provideDocumentHighlights(model, position, token); diff --git a/src/vs/platform/update/electron-main/updateService.ts b/src/vs/platform/update/electron-main/updateService.ts index aa3f75c6d5140..4db56de6d6427 100644 --- a/src/vs/platform/update/electron-main/updateService.ts +++ b/src/vs/platform/update/electron-main/updateService.ts @@ -44,8 +44,8 @@ export class UpdateService implements IUpdateService { private _onUpdateNotAvailable = new Emitter(); get onUpdateNotAvailable(): Event { return this._onUpdateNotAvailable.event; } - private _onUpdateReady = new Emitter(); - get onUpdateReady(): Event { return this._onUpdateReady.event; } + private _onUpdateReady = new Emitter(); + get onUpdateReady(): Event { return this._onUpdateReady.event; } private _onStateChange = new Emitter(); get onStateChange(): Event { return this._onStateChange.event; } @@ -180,7 +180,7 @@ export class UpdateService implements IUpdateService { this.telemetryService.publicLog('update:available', { explicit, version: update.version, currentVersion: product.commit }); } else { - const data: IUpdate = { + const data: IRawUpdate = { releaseNotes: update.releaseNotes, version: update.version, date: update.date diff --git a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts index 6d41b483db6d0..b429be717105f 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts @@ -40,8 +40,8 @@ type TreeItemHandle = number; class TreeViewDataProvider implements ITreeViewDataProvider { - private _onDidChange: Emitter = new Emitter(); - readonly onDidChange: Event = this._onDidChange.event; + private _onDidChange: Emitter = new Emitter(); + readonly onDidChange: Event = this._onDidChange.event; private childrenMap: Map = new Map(); private itemsMap: Map = new Map(); diff --git a/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts b/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts index 43fe76a8ce04d..8e4f75e32caf7 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts @@ -22,7 +22,7 @@ export interface ISnippetsService { registerSnippets(languageId: LanguageId, snippets: ISnippet[], owner: string): void; - visitSnippets(languageId: LanguageId, accept: (snippet: ISnippet) => void): void; + visitSnippets(languageId: LanguageId, accept: (snippet: ISnippet) => boolean): void; getSnippets(languageId: LanguageId): ISnippet[]; } diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index 76a07d3b7a024..a4bfa6e87e102 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -213,7 +213,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { } if (task.command) { - return TPromise.join(promises).then((summaries): ITaskSummary => { + return TPromise.join(promises).then((summaries): TPromise | ITaskSummary => { for (let summary of summaries) { if (summary.exitCode !== 0) { return { exitCode: summary.exitCode }; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts index 5c3a969a73a85..e731656e46d53 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts @@ -178,7 +178,7 @@ export class TerminalService extends AbstractTerminalService implements ITermina } return this._validateShellPaths(label, potentialPaths); } - return [label, current]; + return [label, current] as [string, string]; }); } From c47b702fa5b4f667cc63e5be9e519d3c9e89b0cb Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 7 Jun 2017 10:03:05 -0700 Subject: [PATCH 1615/2747] Refactoring toggleComment --- extensions/emmet/src/toggleComment.ts | 41 ++++++++++++--------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/extensions/emmet/src/toggleComment.ts b/extensions/emmet/src/toggleComment.ts index 75c0791342d97..1849535420c9a 100644 --- a/extensions/emmet/src/toggleComment.ts +++ b/extensions/emmet/src/toggleComment.ts @@ -43,21 +43,21 @@ export function toggleComment() { editor.edit(editBuilder => { editor.selections.reverse().forEach(selection => { - let [rangesToUnComment, positionForCommentStart, positionForCommentEnd] = toggleCommentInternal(editor.document, selection, rootNode); - rangesToUnComment.forEach(rangeToDelete => { - editBuilder.delete(rangeToDelete); + let [rangesToUnComment, rangeToComment] = toggleCommentInternal(editor.document, selection, rootNode); + rangesToUnComment.forEach((rangeToUnComment: vscode.Range) => { + editBuilder.delete(new vscode.Range(rangeToUnComment.start, rangeToUnComment.start.translate(0, startComment.length))); + editBuilder.delete(new vscode.Range(rangeToUnComment.end.translate(0, -endComment.length), rangeToUnComment.end)); }); - if (positionForCommentStart) { - editBuilder.insert(positionForCommentStart, startComment); - } - if (positionForCommentEnd) { - editBuilder.insert(positionForCommentEnd, endComment); + if (rangeToComment) { + editBuilder.insert(rangeToComment.start, startComment); + editBuilder.insert(rangeToComment.end, endComment); } + }); }); } -function toggleCommentHTML(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): [vscode.Range[], vscode.Position, vscode.Position] { +function toggleCommentHTML(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): [vscode.Range[], vscode.Range] { const selectionStart = document.offsetAt(selection.isReversed ? selection.active : selection.anchor); const selectionEnd = document.offsetAt(selection.isReversed ? selection.anchor : selection.active); @@ -65,7 +65,7 @@ function toggleCommentHTML(document: vscode.TextDocument, selection: vscode.Sele let endNode = getNode(rootNode, selectionEnd, true); if (!startNode || !endNode) { - return [[], null, null]; + return [[], null]; } let allNodes: Node[] = getNodesInBetween(startNode, endNode); @@ -76,12 +76,11 @@ function toggleCommentHTML(document: vscode.TextDocument, selection: vscode.Sele }); if (startNode.type === 'comment') { - return [rangesToUnComment, null, null]; + return [rangesToUnComment, null]; } - let positionForCommentStart = document.positionAt(allNodes[0].start); - let positionForCommentEnd = document.positionAt(allNodes[allNodes.length - 1].end); - return [rangesToUnComment, positionForCommentStart, positionForCommentEnd]; + let rangeToComment = new vscode.Range(document.positionAt(allNodes[0].start), document.positionAt(allNodes[allNodes.length - 1].end)); + return [rangesToUnComment, rangeToComment]; } function getRangesToUnCommentHTML(node: Node, document: vscode.TextDocument): vscode.Range[] { @@ -89,8 +88,7 @@ function getRangesToUnCommentHTML(node: Node, document: vscode.TextDocument): vs // If current node is commented, then uncomment and return if (node.type === 'comment') { - rangesToUnComment.push(new vscode.Range(document.positionAt(node.start), document.positionAt(node.start + startCommentHTML.length))); - rangesToUnComment.push(new vscode.Range(document.positionAt(node.end), document.positionAt(node.end - endCommentHTML.length))); + rangesToUnComment.push(new vscode.Range(document.positionAt(node.start), document.positionAt(node.end))); return rangesToUnComment; } @@ -103,7 +101,7 @@ function getRangesToUnCommentHTML(node: Node, document: vscode.TextDocument): vs return rangesToUnComment; } -function toggleCommentStylesheet(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): [vscode.Range[], vscode.Position, vscode.Position] { +function toggleCommentStylesheet(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): [vscode.Range[], vscode.Range] { const selectionStart = document.offsetAt(selection.isReversed ? selection.active : selection.anchor); const selectionEnd = document.offsetAt(selection.isReversed ? selection.anchor : selection.active); @@ -124,15 +122,12 @@ function toggleCommentStylesheet(document: vscode.TextDocument, selection: vscod } if (selection.contains(commentStart) || selection.contains(commentEnd) || (comment.start <= selectionStart && comment.end >= selectionEnd)) { - rangesToUnComment.push(new vscode.Range(document.positionAt(comment.start), document.positionAt(comment.start + startCommentStylesheet.length))); - rangesToUnComment.push(new vscode.Range(document.positionAt(comment.end), document.positionAt(comment.end - endCommentStylesheet.length))); + rangesToUnComment.push(new vscode.Range(document.positionAt(comment.start), document.positionAt(comment.end))); } }); - let positionForCommentStart = isFirstNodeCommented ? null : document.positionAt(startNode.start); - let positionForCommentEnd = isFirstNodeCommented ? null : document.positionAt(endNode.end); - - return [rangesToUnComment, positionForCommentStart, positionForCommentEnd]; + let rangeToComment = isFirstNodeCommented ? null : new vscode.Range(document.positionAt(startNode.start), document.positionAt(endNode.end)); + return [rangesToUnComment, rangeToComment]; } From fed8544b4f957194b6dc54fd51e16a1179472fb2 Mon Sep 17 00:00:00 2001 From: kieferrm Date: Wed, 7 Jun 2017 10:29:04 -0700 Subject: [PATCH 1616/2747] change formatOnPase default, fixed 28176 --- src/vs/editor/common/config/editorOptions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 89378c65bdcf2..3a16f7e183b50 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -2143,7 +2143,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { parameterHints: true, iconsInSuggestions: true, formatOnType: false, - formatOnPaste: true, + formatOnPaste: false, suggestOnTriggerCharacters: true, acceptSuggestionOnEnter: 'on', acceptSuggestionOnCommitCharacter: true, From cbae4c6e2e8aaf3db1810925df13e21b1b820823 Mon Sep 17 00:00:00 2001 From: cleidigh Date: Wed, 7 Jun 2017 14:15:16 -0400 Subject: [PATCH 1617/2747] Add Debug Output Copy All command --- .../parts/debug/electron-browser/repl.ts | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/vs/workbench/parts/debug/electron-browser/repl.ts b/src/vs/workbench/parts/debug/electron-browser/repl.ts index cf2e3937375e1..60cc87029cdb2 100644 --- a/src/vs/workbench/parts/debug/electron-browser/repl.ts +++ b/src/vs/workbench/parts/debug/electron-browser/repl.ts @@ -43,6 +43,7 @@ import { IListService } from 'vs/platform/list/browser/listService'; import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { clipboard } from 'electron'; const $ = dom.$; @@ -59,6 +60,7 @@ export interface IPrivateReplService { _serviceBrand: any; navigateHistory(previous: boolean): void; acceptReplInput(): void; + copyAllReplOutput(): void; } export class Repl extends Panel implements IPrivateReplService { @@ -230,6 +232,19 @@ export class Repl extends Panel implements IPrivateReplService { this.layout(this.dimension); } + public copyAllReplOutput(): void { + let text = ''; + const navigator = this.tree.getNavigator(); + // skip first navigator element - the root node + while (navigator.next()) { + if (text) { + text += `\n`; + } + text += navigator.current().toString(); + } + clipboard.writeText(text); + } + public layout(dimension: Dimension): void { this.dimension = dimension; if (this.tree) { @@ -375,3 +390,26 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({ primary: KeyCode.RightArrow } })); + +@editorAction +class ReplCopyAllAction extends EditorAction { + + constructor() { + super({ + id: 'repl.action.copyall', + label: nls.localize('actions.repl.copyall', "Debug Copy All"), + alias: 'Debug Copy All', + precondition: debug.CONTEXT_IN_DEBUG_REPL, + kbOpts: { + kbExpr: null, + primary: null, + weight: 50 + } + + }); + } + + public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void | TPromise { + accessor.get(IPrivateReplService).copyAllReplOutput(); + } +} From 6ff1da8d30255afe4ca67ec6813644a2628dee48 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 7 Jun 2017 10:28:39 -0700 Subject: [PATCH 1618/2747] Separate Completion Provider for Emmet Css --- .../emmet/src/emmetCompletionProvider.ts | 141 +++++++++++------- extensions/emmet/src/extension.ts | 26 ++-- 2 files changed, 100 insertions(+), 67 deletions(-) diff --git a/extensions/emmet/src/emmetCompletionProvider.ts b/extensions/emmet/src/emmetCompletionProvider.ts index 9a84da40c31d6..5f1a641eef230 100644 --- a/extensions/emmet/src/emmetCompletionProvider.ts +++ b/extensions/emmet/src/emmetCompletionProvider.ts @@ -6,12 +6,12 @@ import * as vscode from 'vscode'; import { expand, createSnippetsRegistry } from '@emmetio/expand-abbreviation'; -import { getSyntax, isStyleSheet, getProfile, extractAbbreviation } from './util'; +import { getSyntax, getProfile, extractAbbreviation } from './util'; const field = (index, placeholder) => `\${${index}${placeholder ? ':' + placeholder : ''}}`; const snippetCompletionsCache = new Map(); -export class EmmetCompletionItemProvider implements vscode.CompletionItemProvider { +abstract class EmmetCompletionItemProviderBase implements vscode.CompletionItemProvider { public provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Thenable { @@ -20,42 +20,97 @@ export class EmmetCompletionItemProvider implements vscode.CompletionItemProvide } let currentWord = getCurrentWord(document, position); - let expandedAbbr = getExpandedAbbreviation(document, position); - let abbreviationSuggestions = getAbbreviationSuggestions(getSyntax(document), currentWord, (expandedAbbr && currentWord === expandedAbbr.label)); + let expandedAbbr = this.getExpandedAbbreviation(document, position); + let abbreviationSuggestions = this.getAbbreviationSuggestions(getSyntax(document), currentWord, (expandedAbbr && currentWord === expandedAbbr.label)); let completionItems = expandedAbbr ? [expandedAbbr, ...abbreviationSuggestions] : abbreviationSuggestions; return Promise.resolve(new vscode.CompletionList(completionItems, true)); } + + protected getExpandedAbbreviation(document: vscode.TextDocument, position: vscode.Position): vscode.CompletionItem { + if (!vscode.workspace.getConfiguration('emmet')['showExpandedAbbreviation']) { + return; + } + let [rangeToReplace, wordToExpand] = extractAbbreviation(position); + if (!rangeToReplace || !wordToExpand) { + return; + } + let syntax = getSyntax(document); + let expandedWord = expand(wordToExpand, { + field: field, + syntax: syntax, + profile: getProfile(syntax), + addons: syntax === 'jsx' ? { 'jsx': true } : null + }); + + let completionitem = new vscode.CompletionItem(wordToExpand); + completionitem.insertText = new vscode.SnippetString(expandedWord); + completionitem.documentation = removeTabStops(expandedWord); + completionitem.range = rangeToReplace; + completionitem.detail = 'Expand Emmet Abbreviation'; + + + return completionitem; + } + + abstract getAbbreviationSuggestions(syntax: string, prefix: string, skipExactMatch: boolean): vscode.CompletionItem[]; + } -function getExpandedAbbreviation(document: vscode.TextDocument, position: vscode.Position): vscode.CompletionItem { - if (!vscode.workspace.getConfiguration('emmet')['showExpandedAbbreviation']) { - return; +export class EmmetCompletionItemProviderHtml extends EmmetCompletionItemProviderBase { + + protected getExpandedAbbreviation(document: vscode.TextDocument, position: vscode.Position): vscode.CompletionItem { + let completionItem = super.getExpandedAbbreviation(document, position); + + // In non stylesheet like syntax, this extension returns expanded abbr plus posssible abbr completions + // To differentiate between the 2, the former is given CompletionItemKind.Value so that it gets a different icon + completionItem.kind = vscode.CompletionItemKind.Value; + + return completionItem; + } + + getAbbreviationSuggestions(syntax: string, prefix: string, skipExactMatch: boolean) { + if (!vscode.workspace.getConfiguration('emmet')['showAbbreviationSuggestions'] || !prefix) { + return []; + } + + if (!snippetCompletionsCache.has(syntax)) { + let registry = createSnippetsRegistry(syntax); + let completions: vscode.CompletionItem[] = registry.all({ type: 'string' }).map(snippet => { + let expandedWord = expand(snippet.value, { + field: field, + syntax: syntax + }); + + let item = new vscode.CompletionItem(snippet.key); + item.documentation = removeTabStops(expandedWord); + item.detail = 'Complete Emmet Abbreviation'; + item.insertText = snippet.key; + return item; + }); + snippetCompletionsCache.set(syntax, completions); + } + + let snippetCompletions = snippetCompletionsCache.get(syntax); + + snippetCompletions = snippetCompletions.filter(x => x.label.startsWith(prefix) && (!skipExactMatch || x.label !== prefix)); + + return snippetCompletions; + } - let [rangeToReplace, wordToExpand] = extractAbbreviation(position); - if (!rangeToReplace || !wordToExpand) { - return; + + +} + +export class EmmetCompletionItemProviderCss extends EmmetCompletionItemProviderBase { + public provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Thenable { + return super.provideCompletionItems(document, position, token); } - let syntax = getSyntax(document); - let expandedWord = expand(wordToExpand, { - field: field, - syntax: syntax, - profile: getProfile(syntax), - addons: syntax === 'jsx' ? { 'jsx': true } : null - }); - - let completionitem = new vscode.CompletionItem(wordToExpand); - completionitem.insertText = new vscode.SnippetString(expandedWord); - completionitem.documentation = removeTabStops(expandedWord); - completionitem.range = rangeToReplace; - completionitem.detail = 'Expand Emmet Abbreviation'; - - // In non stylesheet like syntax, this extension returns expanded abbr plus posssible abbr completions - // To differentiate between the 2, the former is given CompletionItemKind.Value so that it gets a different icon - if (!isStyleSheet(syntax)) { - completionitem.kind = vscode.CompletionItemKind.Value; + + getAbbreviationSuggestions(syntax: string, prefix: string, skipExactMatch: boolean) { + return []; } - return completionitem; + } function getCurrentWord(document: vscode.TextDocument, position: vscode.Position): string { @@ -72,35 +127,7 @@ function getCurrentWord(document: vscode.TextDocument, position: vscode.Position function removeTabStops(expandedWord: string): string { return expandedWord.replace(/\$\{\d+\}/g, '').replace(/\$\{\d+:([^\}]+)\}/g, '$1'); } -function getAbbreviationSuggestions(syntax: string, prefix: string, skipExactMatch: boolean) { - if (!vscode.workspace.getConfiguration('emmet')['showAbbreviationSuggestions'] || !prefix || isStyleSheet(syntax)) { - return []; - } - - if (!snippetCompletionsCache.has(syntax)) { - let registry = createSnippetsRegistry(syntax); - let completions: vscode.CompletionItem[] = registry.all({ type: 'string' }).map(snippet => { - let expandedWord = expand(snippet.value, { - field: field, - syntax: syntax - }); - - let item = new vscode.CompletionItem(snippet.key); - item.documentation = removeTabStops(expandedWord); - item.detail = 'Complete Emmet Abbreviation'; - item.insertText = snippet.key; - return item; - }); - snippetCompletionsCache.set(syntax, completions); - } - - let snippetCompletions = snippetCompletionsCache.get(syntax); - - snippetCompletions = snippetCompletions.filter(x => x.label.startsWith(prefix) && (!skipExactMatch || x.label !== prefix)); - return snippetCompletions; - -} diff --git a/extensions/emmet/src/extension.ts b/extensions/emmet/src/extension.ts index 620df18dc323e..23f9190743dff 100644 --- a/extensions/emmet/src/extension.ts +++ b/extensions/emmet/src/extension.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { EmmetCompletionItemProvider } from './emmetCompletionProvider'; +import { EmmetCompletionItemProviderHtml, EmmetCompletionItemProviderCss } from './emmetCompletionProvider'; import { expandAbbreviation, wrapWithAbbreviation } from './abbreviationActions'; import { removeTag } from './removeTag'; import { updateTag } from './updateTag'; @@ -21,7 +21,7 @@ interface ISupportedLanguageMode { triggerCharacters: string[]; } -const SUPPORTED_LANGUAGE_MODES: ISupportedLanguageMode[] = [ +const HTML_LANGUAGE_MODES: ISupportedLanguageMode[] = [ { id: 'html', triggerCharacters: ['!', '.', '}'] }, { id: 'jade', triggerCharacters: ['!', '.', '}'] }, { id: 'slim', triggerCharacters: ['!', '.', '}'] }, @@ -29,23 +29,29 @@ const SUPPORTED_LANGUAGE_MODES: ISupportedLanguageMode[] = [ { id: 'xml', triggerCharacters: ['.', '}'] }, { id: 'xsl', triggerCharacters: ['.', '}'] }, + { id: 'javascriptreact', triggerCharacters: ['.'] }, + { id: 'typescriptreact', triggerCharacters: ['.'] } +]; + +const CSS_LANGUAGE_MODES: ISupportedLanguageMode[] = [ { id: 'css', triggerCharacters: [':'] }, { id: 'scss', triggerCharacters: [':'] }, { id: 'sass', triggerCharacters: [':'] }, { id: 'less', triggerCharacters: [':'] }, - { id: 'stylus', triggerCharacters: [':'] }, - - { id: 'javascriptreact', triggerCharacters: ['.'] }, - { id: 'typescriptreact', triggerCharacters: ['.'] } + { id: 'stylus', triggerCharacters: [':'] } ]; export function activate(context: vscode.ExtensionContext) { - let completionProvider = new EmmetCompletionItemProvider(); + let completionProviderHtml = new EmmetCompletionItemProviderHtml(); + let completionProviderCss = new EmmetCompletionItemProviderCss(); - for (let language of SUPPORTED_LANGUAGE_MODES) { - const selector: vscode.DocumentFilter = { language: language.id }; - const provider = vscode.languages.registerCompletionItemProvider(selector, completionProvider, ...language.triggerCharacters); + for (let language of HTML_LANGUAGE_MODES) { + const provider = vscode.languages.registerCompletionItemProvider({ language: language.id }, completionProviderHtml, ...language.triggerCharacters); + context.subscriptions.push(provider); + } + for (let language of CSS_LANGUAGE_MODES) { + const provider = vscode.languages.registerCompletionItemProvider({ language: language.id }, completionProviderCss, ...language.triggerCharacters); context.subscriptions.push(provider); } From 28709b648b77dadf2b760bd112ee14ca6b99cc4b Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 7 Jun 2017 12:42:38 -0700 Subject: [PATCH 1619/2747] Enable new emmet by default, add toggle comment feature --- .../parts/emmet/electron-browser/emmet.contribution.ts | 2 +- src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.ts b/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.ts index e27026f8a0b74..efa85ca249e3e 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.ts @@ -62,7 +62,7 @@ configurationRegistry.registerConfiguration({ }, 'emmet.useNewEmmet': { 'type': 'boolean', - 'default': false, + 'default': true, 'description': nls.localize('useNewEmmet', 'Try out the new emmet modules (which will eventually replace the old single emmet library) for all emmet features.') } } diff --git a/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts b/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts index e6f0e88243bf5..a313f378b211b 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/emmetActions.ts @@ -249,7 +249,8 @@ export abstract class EmmetEditorAction extends EditorAction { 'editor.emmet.action.mergeLines': 'emmet.mergeLines', 'editor.emmet.action.selectPreviousItem': 'emmet.selectPrevItem', 'editor.emmet.action.selectNextItem': 'emmet.selectNextItem', - 'editor.emmet.action.splitJoinTag': 'emmet.splitJoinTag' + 'editor.emmet.action.splitJoinTag': 'emmet.splitJoinTag', + 'editor.emmet.action.toggleComment': 'emmet.toggleComment' }; protected emmetActionName: string; From 61377c23b0a21009a0e05dbec939dc66afbd5f23 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Wed, 7 Jun 2017 12:51:58 -0700 Subject: [PATCH 1620/2747] Fix build error --- extensions/emmet/src/emmetCompletionProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/emmet/src/emmetCompletionProvider.ts b/extensions/emmet/src/emmetCompletionProvider.ts index 5f1a641eef230..acab02d57a578 100644 --- a/extensions/emmet/src/emmetCompletionProvider.ts +++ b/extensions/emmet/src/emmetCompletionProvider.ts @@ -11,7 +11,7 @@ import { getSyntax, getProfile, extractAbbreviation } from './util'; const field = (index, placeholder) => `\${${index}${placeholder ? ':' + placeholder : ''}}`; const snippetCompletionsCache = new Map(); -abstract class EmmetCompletionItemProviderBase implements vscode.CompletionItemProvider { +export abstract class EmmetCompletionItemProviderBase implements vscode.CompletionItemProvider { public provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Thenable { From 69977be4a1bf14256f9bd870207e995552c05144 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 7 Jun 2017 12:55:15 -0700 Subject: [PATCH 1621/2747] Use beta xterm.js build --- npm-shrinkwrap.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 3e962373c7d9d..9d6c80bfb68b5 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -440,9 +440,9 @@ "resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.0.tgz" }, "xterm": { - "version": "2.6.0", - "from": "Tyriar/xterm.js#vscode-release/1.13", - "resolved": "git+https://github.com/Tyriar/xterm.js.git#32c9eac8ee5a958093d126a06c1c06a7cd6052bf" + "version": "2.7.0", + "from": "Tyriar/xterm.js#vscode-release/1.14-beta", + "resolved": "git+https://github.com/Tyriar/xterm.js.git#2697bd2f9560b7ce28cfcd368cd68008276219a0" }, "yauzl": { "version": "2.3.1", diff --git a/package.json b/package.json index 333ee2253b61c..588c630f9af34 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "vscode-ripgrep": "0.0.12", "vscode-textmate": "^3.1.5", "winreg": "1.2.0", - "xterm": "Tyriar/xterm.js#vscode-release/1.13", + "xterm": "Tyriar/xterm.js#vscode-release/1.14-beta", "yauzl": "2.3.1" }, "devDependencies": { From 68f9d22c6ccc8aee617a1cfacd3f0103ca16537a Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 7 Jun 2017 12:55:57 -0700 Subject: [PATCH 1622/2747] Integrate new xterm.js changes --- .../terminal/electron-browser/media/xterm.css | 17 +++++++++++++++++ .../electron-browser/terminalInstance.ts | 18 ++++++++++-------- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css b/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css index 4ee863dbecb2d..a2b453ef22877 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css @@ -6,6 +6,7 @@ .monaco-workbench .panel.integrated-terminal .xterm { position: relative; height: 100%; + user-select: none; } .monaco-workbench .panel.integrated-terminal .xterm:focus { @@ -170,6 +171,22 @@ left: -9999em; } +.monaco-workbench .panel.integrated-terminal .xterm.enable-mouse-events { + /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */ + cursor: default; +} + +.monaco-workbench .panel.integrated-terminal .xterm .xterm-selection { + position: absolute; + left: 0; + bottom: 0; +} + +.monaco-workbench .panel.integrated-terminal .xterm .xterm-selection div { + position: absolute; + background-color: #555; +} + .monaco-workbench .panel.integrated-terminal .xterm .xterm-bold { font-weight: bold; } diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 4b70c062ba879..1db0be29dd7c7 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -31,7 +31,8 @@ import { TerminalLinkHandler } from 'vs/workbench/parts/terminal/electron-browse import { TerminalWidgetManager } from 'vs/workbench/parts/terminal/browser/terminalWidgetManager'; import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; import { scrollbarSliderBackground, scrollbarSliderHoverBackground, scrollbarSliderActiveBackground } from 'vs/platform/theme/common/colorRegistry'; -import { TPromise } from "vs/base/common/winjs.base"; +import { TPromise } from 'vs/base/common/winjs.base'; +import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; /** The amount of time to consider terminal errors to be related to the launch */ const LAUNCHING_DURATION = 500; @@ -99,7 +100,8 @@ export class TerminalInstance implements ITerminalInstance { @IPanelService private _panelService: IPanelService, @IWorkspaceContextService private _contextService: IWorkspaceContextService, @IWorkbenchEditorService private _editorService: IWorkbenchEditorService, - @IInstantiationService private _instantiationService: IInstantiationService + @IInstantiationService private _instantiationService: IInstantiationService, + @IClipboardService private _clipboardService: IClipboardService ) { this._instanceDisposables = []; this._processDisposables = []; @@ -323,14 +325,14 @@ export class TerminalInstance implements ITerminalInstance { } public hasSelection(): boolean { - return !document.getSelection().isCollapsed; + return this._xterm.hasSelection(); } public copySelection(): void { - if (document.activeElement.classList.contains('xterm')) { - document.execCommand('copy'); + if (this.hasSelection()) { + this._clipboardService.writeText(this._xterm.getSelection()); } else { - this._messageService.show(Severity.Warning, nls.localize('terminal.integrated.copySelection.noSelection', 'Cannot copy terminal selection when terminal does not have focus')); + this._messageService.show(Severity.Warning, nls.localize('terminal.integrated.copySelection.noSelection', 'The terminal has no selection to copy')); } } @@ -439,8 +441,8 @@ export class TerminalInstance implements ITerminalInstance { private _refreshSelectionContextKey() { const activePanel = this._panelService.getActivePanel(); - const isFocused = activePanel && activePanel.getId() === TERMINAL_PANEL_ID; - this._terminalHasTextContextKey.set(isFocused && !window.getSelection().isCollapsed); + const isActive = activePanel && activePanel.getId() === TERMINAL_PANEL_ID; + this._terminalHasTextContextKey.set(isActive && this.hasSelection()); } private _sanitizeInput(data: any) { From 50c2bc406e5cbda99a137f2f382c4c84e734439f Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 7 Jun 2017 13:34:12 -0700 Subject: [PATCH 1623/2747] Fix clear selection, add select all command --- npm-shrinkwrap.json | 2 +- .../parts/terminal/common/terminal.ts | 5 +++++ .../electron-browser/terminal.contribution.ts | 14 +++++++++++-- .../electron-browser/terminalActions.ts | 21 +++++++++++++++++++ .../electron-browser/terminalInstance.ts | 6 +++++- 5 files changed, 44 insertions(+), 4 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 9d6c80bfb68b5..91bff39ee52ae 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -442,7 +442,7 @@ "xterm": { "version": "2.7.0", "from": "Tyriar/xterm.js#vscode-release/1.14-beta", - "resolved": "git+https://github.com/Tyriar/xterm.js.git#2697bd2f9560b7ce28cfcd368cd68008276219a0" + "resolved": "git+https://github.com/Tyriar/xterm.js.git#2c61d9c26c0265b8a4ce1542d25dd1258c3e4f5b" }, "yauzl": { "version": "2.3.1", diff --git a/src/vs/workbench/parts/terminal/common/terminal.ts b/src/vs/workbench/parts/terminal/common/terminal.ts index 1093b3ee7e075..e2458c190e7e8 100644 --- a/src/vs/workbench/parts/terminal/common/terminal.ts +++ b/src/vs/workbench/parts/terminal/common/terminal.ts @@ -230,6 +230,11 @@ export interface ITerminalInstance { */ clearSelection(): void; + /** + * Select all text in the terminal. + */ + selectAll(): void; + /** * Focuses the terminal instance. * diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index 94e7e9a4b5215..09af3cb19c61d 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -18,7 +18,7 @@ import { TERMINAL_DEFAULT_SHELL_LINUX, TERMINAL_DEFAULT_SHELL_OSX, TERMINAL_DEFA import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; -import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, FocusTerminalAtIndexAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction, AllowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; +import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, FocusTerminalAtIndexAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction, AllowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand, SelectAllTerminalAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; import { Registry } from 'vs/platform/platform'; import { ShowAllCommandsAction } from 'vs/workbench/parts/quickopen/browser/commandsHandler'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; @@ -185,7 +185,8 @@ configurationRegistry.registerConfiguration({ OpenPreviousRecentlyUsedEditorInGroupAction.ID, FocusFirstGroupAction.ID, FocusSecondGroupAction.ID, - FocusThirdGroupAction.ID + FocusThirdGroupAction.ID, + SelectAllTerminalAction.ID ].sort() } } @@ -229,6 +230,15 @@ actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(TerminalPasteAct // Don't apply to Mac since cmd+v works mac: { primary: null } }, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Paste into Active Terminal', category); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(SelectAllTerminalAction, SelectAllTerminalAction.ID, SelectAllTerminalAction.LABEL, { + // Don't use ctrl+a by default as that would override the common go to start + // of prompt shell binding + primary: null, + // Technically this doesn't need to be here as it will fall back to this + // behavior anyway when handed to xterm.js, having this handled by VS Code + // makes it easier for users to see how it works though. + mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_A } +}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Select All', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(RunSelectedTextInTerminalAction, RunSelectedTextInTerminalAction.ID, RunSelectedTextInTerminalAction.LABEL), 'Terminal: Run Selected Text In Active Terminal', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(RunActiveFileInTerminalAction, RunActiveFileInTerminalAction.ID, RunActiveFileInTerminalAction.LABEL), 'Terminal: Run Active File In Active Terminal', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleTerminalAction, ToggleTerminalAction.ID, ToggleTerminalAction.LABEL, { diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts index 3b62f9642edb8..62780aee350d1 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts @@ -93,6 +93,27 @@ export class CopyTerminalSelectionAction extends Action { } } +export class SelectAllTerminalAction extends Action { + + public static ID = 'workbench.action.terminal.selectAll'; + public static LABEL = nls.localize('workbench.action.terminal.selectAll', "Select All"); + + constructor( + id: string, label: string, + @ITerminalService private terminalService: ITerminalService + ) { + super(id, label); + } + + public run(event?: any): TPromise { + let terminalInstance = this.terminalService.getActiveInstance(); + if (terminalInstance) { + terminalInstance.selectAll(); + } + return TPromise.as(void 0); + } +} + export class CreateNewTerminalAction extends Action { public static ID = 'workbench.action.terminal.new'; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 1db0be29dd7c7..919dd7dbdff23 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -337,7 +337,11 @@ export class TerminalInstance implements ITerminalInstance { } public clearSelection(): void { - window.getSelection().empty(); + this._xterm.clearSelection(); + } + + public selectAll(): void { + this._xterm.selectAll(); } public dispose(): void { From 06dfe10a38e94e48ffd330f833fe9588e66e29dc Mon Sep 17 00:00:00 2001 From: Nick Snyder Date: Tue, 6 Jun 2017 07:47:57 -0700 Subject: [PATCH 1624/2747] Don't hardcode number of result providers Minor refactor. Does not change any logic. --- .../parts/search/browser/openAnythingHandler.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts index cc77586caa21f..a020b745e46fd 100644 --- a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts +++ b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts @@ -166,8 +166,6 @@ export class OpenAnythingHandler extends QuickOpenHandler { // Symbol Results (unless disabled or a range or absolute path is specified) if (this.includeSymbols && !searchWithRange) { resultPromises.push(this.openSymbolHandler.getResults(searchValue)); - } else { - resultPromises.push(TPromise.as(new QuickOpenModel())); // We need this empty promise because we are using the throttler below! } // Join and sort unified @@ -179,8 +177,10 @@ export class OpenAnythingHandler extends QuickOpenHandler { return TPromise.as(new QuickOpenModel()); } - // Combine file results and symbol results (if any) - const mergedResults = [...results[0].entries, ...results[1].entries]; + // Combine results. + const mergedResults: QuickOpenEntry[] = results.reduce((entries: QuickOpenEntry[], model: QuickOpenModel) => { + return entries.concat(model.entries); + }, []); // Sort const unsortedResultTime = Date.now(); @@ -200,10 +200,11 @@ export class OpenAnythingHandler extends QuickOpenHandler { }); let fileSearchStats: ISearchStats; - if (results[0] instanceof FileQuickOpenModel) { - fileSearchStats = (results[0]).stats; - } else if (results[1] instanceof FileQuickOpenModel) { - fileSearchStats = (results[1]).stats; + for (const result of results) { + if (result instanceof FileQuickOpenModel) { + fileSearchStats = (result).stats; + break; + } } const duration = new Date().getTime() - startTime; From 00a276cf8c76eefc5823e78f03dfde0c217e4f4c Mon Sep 17 00:00:00 2001 From: Nick Snyder Date: Wed, 7 Jun 2017 12:01:17 -0700 Subject: [PATCH 1625/2747] filePromise --- .../search/browser/openAnythingHandler.ts | 31 ++++++++----------- 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts index a020b745e46fd..2846c6243d344 100644 --- a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts +++ b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts @@ -161,7 +161,8 @@ export class OpenAnythingHandler extends QuickOpenHandler { const resultPromises: TPromise[] = []; // File Results - resultPromises.push(this.openFileHandler.getResults(searchValue, OpenAnythingHandler.MAX_DISPLAYED_RESULTS)); + const filePromise = this.openFileHandler.getResults(searchValue, OpenAnythingHandler.MAX_DISPLAYED_RESULTS); + resultPromises.push(filePromise); // Symbol Results (unless disabled or a range or absolute path is specified) if (this.includeSymbols && !searchWithRange) { @@ -199,26 +200,20 @@ export class OpenAnythingHandler extends QuickOpenHandler { } }); - let fileSearchStats: ISearchStats; - for (const result of results) { - if (result instanceof FileQuickOpenModel) { - fileSearchStats = (result).stats; - break; - } - } - const duration = new Date().getTime() - startTime; - const data = this.createTimerEventData(startTime, { - searchLength: searchValue.length, - unsortedResultTime, - sortedResultTime, - resultCount: mergedResults.length, - symbols: { fromCache: false }, - files: fileSearchStats + filePromise.then(fileModel => { + const data = this.createTimerEventData(startTime, { + searchLength: searchValue.length, + unsortedResultTime, + sortedResultTime, + resultCount: mergedResults.length, + symbols: { fromCache: false }, + files: fileModel.stats, + }); + + this.telemetryService.publicLog('openAnything', objects.assign(data, { duration })); }); - this.telemetryService.publicLog('openAnything', objects.assign(data, { duration })); - return TPromise.as(new QuickOpenModel(viewResults)); }, (error: Error) => { this.pendingSearch = null; From 61fa6e8f5d94070d6ba868548a7b84e2712c9a38 Mon Sep 17 00:00:00 2001 From: Nick Snyder Date: Wed, 7 Jun 2017 12:02:31 -0700 Subject: [PATCH 1626/2747] Concat instead of reduce --- src/vs/workbench/parts/search/browser/openAnythingHandler.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts index 2846c6243d344..e777cc9311fd5 100644 --- a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts +++ b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts @@ -179,9 +179,7 @@ export class OpenAnythingHandler extends QuickOpenHandler { } // Combine results. - const mergedResults: QuickOpenEntry[] = results.reduce((entries: QuickOpenEntry[], model: QuickOpenModel) => { - return entries.concat(model.entries); - }, []); + const mergedResults = [].concat(...results.map(r => r.entries)); // Sort const unsortedResultTime = Date.now(); From 4fce291653da4dca159bd07fb4039c7532268f71 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Wed, 7 Jun 2017 23:22:45 +0200 Subject: [PATCH 1627/2747] node-debug@1.14.0 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 4c394e8c62902..2aa62f99f336e 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -42,7 +42,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.13.10' }, + { name: 'ms-vscode.node-debug', version: '1.14.0' }, { name: 'ms-vscode.node-debug2', version: '1.13.3' } ]; From a757842135bd3b08c76eeb293c9c43e06c65f2f7 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 7 Jun 2017 14:28:21 -0700 Subject: [PATCH 1628/2747] Simplify logging of TS request errors Fixes #28095 Removes the manual error logging on client requests in favor of doing this automatically in the service client. Also fixes logging of canellation errors --- .../src/features/baseCodeLensProvider.ts | 3 +- .../src/features/completionItemProvider.ts | 6 +-- .../src/features/definitionProviderBase.ts | 3 +- .../src/features/documentHighlightProvider.ts | 3 +- .../src/features/documentSymbolProvider.ts | 7 +--- .../src/features/formattingProvider.ts | 6 +-- .../typescript/src/features/hoverProvider.ts | 3 +- .../src/features/referenceProvider.ts | 3 +- .../typescript/src/features/renameProvider.ts | 3 +- .../src/features/signatureHelpProvider.ts | 3 +- .../src/features/workspaceSymbolProvider.ts | 3 +- .../typescript/src/typescriptService.ts | 2 - .../typescript/src/typescriptServiceClient.ts | 40 ++++++++++--------- 13 files changed, 36 insertions(+), 49 deletions(-) diff --git a/extensions/typescript/src/features/baseCodeLensProvider.ts b/extensions/typescript/src/features/baseCodeLensProvider.ts index 20952150c4b57..84ba69a0a96f2 100644 --- a/extensions/typescript/src/features/baseCodeLensProvider.ts +++ b/extensions/typescript/src/features/baseCodeLensProvider.ts @@ -56,8 +56,7 @@ export abstract class TypeScriptBaseCodeLensProvider implements CodeLensProvider tree.childItems.forEach(item => this.walkNavTree(document, item, null, referenceableSpans)); } return referenceableSpans.map(span => new ReferencesCodeLens(document.uri, filepath, span)); - }, (err: any) => { - this.client.error(`'navtree' request failed with error.`, err); + }, () => { return []; }); } diff --git a/extensions/typescript/src/features/completionItemProvider.ts b/extensions/typescript/src/features/completionItemProvider.ts index 5f0740be10ccf..90a3f56b30ebb 100644 --- a/extensions/typescript/src/features/completionItemProvider.ts +++ b/extensions/typescript/src/features/completionItemProvider.ts @@ -223,8 +223,7 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP } return completionItems; - }, (err) => { - this.client.error(`'completions' request failed with error.`, err); + }, () => { return []; }); } @@ -264,8 +263,7 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP } return item; - }, (err) => { - this.client.error(`'completionEntryDetails' request failed with error.`, err); + }, () => { return item; }); } diff --git a/extensions/typescript/src/features/definitionProviderBase.ts b/extensions/typescript/src/features/definitionProviderBase.ts index b405d28fbaf1f..78768df2fee89 100644 --- a/extensions/typescript/src/features/definitionProviderBase.ts +++ b/extensions/typescript/src/features/definitionProviderBase.ts @@ -40,8 +40,7 @@ export default class TypeScriptDefinitionProviderBase { return new Location(resource, new Range(location.start.line - 1, location.start.offset - 1, location.end.line - 1, location.end.offset - 1)); } }).filter(x => x !== null) as Location[]; - }, (error) => { - this.client.error(`'${definitionType}' request failed with error.`, error); + }, () => { return []; }); } diff --git a/extensions/typescript/src/features/documentHighlightProvider.ts b/extensions/typescript/src/features/documentHighlightProvider.ts index f0140953d923c..15224ca2c2e43 100644 --- a/extensions/typescript/src/features/documentHighlightProvider.ts +++ b/extensions/typescript/src/features/documentHighlightProvider.ts @@ -43,8 +43,7 @@ export default class TypeScriptDocumentHighlightProvider implements DocumentHigh }); } return []; - }, (err) => { - this.client.error(`'occurrences' request failed with error.`, err); + }, () => { return []; }); } diff --git a/extensions/typescript/src/features/documentSymbolProvider.ts b/extensions/typescript/src/features/documentSymbolProvider.ts index aa6a4e5ab7f64..06b3e0983c2a5 100644 --- a/extensions/typescript/src/features/documentSymbolProvider.ts +++ b/extensions/typescript/src/features/documentSymbolProvider.ts @@ -53,8 +53,7 @@ export default class TypeScriptDocumentSymbolProvider implements DocumentSymbolP } } return result; - }, (err) => { - this.client.error(`'navtree' request failed with error.`, err); + }, () => { return []; }); } else { @@ -65,12 +64,10 @@ export default class TypeScriptDocumentSymbolProvider implements DocumentSymbolP response.body.forEach(item => TypeScriptDocumentSymbolProvider.convertNavBar(resource.uri, 0, foldingMap, result, item)); } return result; - }, (err) => { - this.client.error(`'navbar' request failed with error.`, err); + }, () => { return []; }); } - } private static convertNavBar(resource: Uri, indent: number, foldingMap: ObjectMap, bucket: SymbolInformation[], item: Proto.NavigationBarItem, containerLabel?: string): void { diff --git a/extensions/typescript/src/features/formattingProvider.ts b/extensions/typescript/src/features/formattingProvider.ts index 40b5522d0fa19..d368bebbaa608 100644 --- a/extensions/typescript/src/features/formattingProvider.ts +++ b/extensions/typescript/src/features/formattingProvider.ts @@ -136,8 +136,7 @@ export default class TypeScriptFormattingProvider implements DocumentRangeFormat } else { return []; } - }, (err: any) => { - this.client.error(`'format' request failed with error.`, err); + }, () => { return []; }); }); @@ -195,8 +194,7 @@ export default class TypeScriptFormattingProvider implements DocumentRangeFormat } } return result; - }, (err: any) => { - this.client.error(`'formatonkey' request failed with error.`, err); + }, () => { return []; }); }); diff --git a/extensions/typescript/src/features/hoverProvider.ts b/extensions/typescript/src/features/hoverProvider.ts index e726ff1dc3478..a0914aa17306e 100644 --- a/extensions/typescript/src/features/hoverProvider.ts +++ b/extensions/typescript/src/features/hoverProvider.ts @@ -32,8 +32,7 @@ export default class TypeScriptHoverProvider implements HoverProvider { new Range(data.start.line - 1, data.start.offset - 1, data.end.line - 1, data.end.offset - 1)); } return undefined; - }, (err) => { - this.client.error(`'quickinfo' request failed with error.`, err); + }, () => { return null; }); } diff --git a/extensions/typescript/src/features/referenceProvider.ts b/extensions/typescript/src/features/referenceProvider.ts index 47921d128ea8c..9f7ccf9f49ae1 100644 --- a/extensions/typescript/src/features/referenceProvider.ts +++ b/extensions/typescript/src/features/referenceProvider.ts @@ -41,8 +41,7 @@ export default class TypeScriptReferenceSupport implements ReferenceProvider { result.push(location); } return result; - }, (err) => { - this.client.error(`'references' request failed with error.`, err); + }, () => { return []; }); } diff --git a/extensions/typescript/src/features/renameProvider.ts b/extensions/typescript/src/features/renameProvider.ts index 39c85f307a736..450523b4ade59 100644 --- a/extensions/typescript/src/features/renameProvider.ts +++ b/extensions/typescript/src/features/renameProvider.ts @@ -49,8 +49,7 @@ export default class TypeScriptRenameProvider implements RenameProvider { }); }); return result; - }, (err) => { - this.client.error(`'rename' request failed with error.`, err); + }, () => { return null; }); } diff --git a/extensions/typescript/src/features/signatureHelpProvider.ts b/extensions/typescript/src/features/signatureHelpProvider.ts index 0a79487862415..c3f6c86e00186 100644 --- a/extensions/typescript/src/features/signatureHelpProvider.ts +++ b/extensions/typescript/src/features/signatureHelpProvider.ts @@ -64,8 +64,7 @@ export default class TypeScriptSignatureHelpProvider implements SignatureHelpPro }); return result; - }, (err: any) => { - this.client.error(`'signatureHelp' request failed with error.`, err); + }, () => { return null; }); } diff --git a/extensions/typescript/src/features/workspaceSymbolProvider.ts b/extensions/typescript/src/features/workspaceSymbolProvider.ts index 016ac8726b342..fa78077164502 100644 --- a/extensions/typescript/src/features/workspaceSymbolProvider.ts +++ b/extensions/typescript/src/features/workspaceSymbolProvider.ts @@ -77,8 +77,7 @@ export default class TypeScriptWorkspaceSymbolProvider implements WorkspaceSymbo } } return result; - }, (err) => { - this.client.error(`'navto' request failed with error.`, err); + }, () => { return []; }); } diff --git a/extensions/typescript/src/typescriptService.ts b/extensions/typescript/src/typescriptService.ts index f2ad09da59a9b..d18e531b57271 100644 --- a/extensions/typescript/src/typescriptService.ts +++ b/extensions/typescript/src/typescriptService.ts @@ -74,9 +74,7 @@ export interface ITypescriptServiceClient { normalizePath(resource: Uri): string | null; asUrl(filepath: string): Uri; - info(message: string, data?: any): void; warn(message: string, data?: any): void; - error(message: string, data?: any): void; onProjectLanguageServiceStateChanged: Event; onDidBeginInstallTypings: Event; diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 62b3c53f36932..6d60443762633 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -889,14 +889,20 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient }; let result: Promise = Promise.resolve(null); if (expectsResult) { + let wasCancelled = false; result = new Promise((resolve, reject) => { requestInfo.callbacks = { c: resolve, e: reject, start: Date.now() }; if (token) { token.onCancellationRequested(() => { + wasCancelled = true; this.tryCancelRequest(request.seq); - resolve(undefined); }); } + }).catch((err: any) => { + if (!wasCancelled) { + this.error(`'${command}' request failed with error.`, err); + } + throw err; }); } requestInfo.promise = result; @@ -933,28 +939,26 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } private tryCancelRequest(seq: number): boolean { - if (this.requestQueue.tryCancelPendingRequest(seq)) { - this.tracer.logTrace(`TypeScript Service: canceled request with sequence number ${seq}`); - return true; - } + try { + if (this.requestQueue.tryCancelPendingRequest(seq)) { + this.tracer.logTrace(`TypeScript Service: canceled request with sequence number ${seq}`); + return true; + } - if (this.apiVersion.has222Features() && this.cancellationPipeName) { - this.tracer.logTrace(`TypeScript Service: trying to cancel ongoing request with sequence number ${seq}`); - try { + if (this.apiVersion.has222Features() && this.cancellationPipeName) { + this.tracer.logTrace(`TypeScript Service: trying to cancel ongoing request with sequence number ${seq}`); fs.writeFileSync(this.cancellationPipeName + seq, ''); return true; - } catch (e) { - // noop - } finally { - const p = this.callbacks.fetch(seq); - if (p) { - p.e(new Error(`Cancelled Request ${seq}`)); - } } - } - this.tracer.logTrace(`TypeScript Service: tried to cancel request with sequence number ${seq}. But request got already delivered.`); - return false; + this.tracer.logTrace(`TypeScript Service: tried to cancel request with sequence number ${seq}. But request got already delivered.`); + return false; + } finally { + const p = this.callbacks.fetch(seq); + if (p) { + p.e(new Error(`Cancelled Request ${seq}`)); + } + } } private dispatchMessage(message: Proto.Message): void { From 0425eff0f0ade716038413915c942f1784867943 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 7 Jun 2017 23:33:48 +0200 Subject: [PATCH 1629/2747] fixes #28198 --- .../parts/debug/electron-browser/rawDebugSession.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts b/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts index 211539a5d4f79..819af044f0469 100644 --- a/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts +++ b/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts @@ -79,7 +79,7 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession { super(id); this.emittedStopped = false; this.readyForBreakpoints = false; - this.allThreadsContinued = true; + this.allThreadsContinued = false; this.sentPromises = []; this._onDidInitialize = new Emitter(); @@ -197,7 +197,7 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession { this.emittedStopped = true; this._onDidStop.fire(event); } else if (event.event === 'continued') { - this.allThreadsContinued = (event).body.allThreadsContinued = false ? false : true; + this.allThreadsContinued = (event).body.allThreadsContinued === false ? false : true; this._onDidContinued.fire(event); } else if (event.event === 'thread') { this._onDidThread.fire(event); @@ -261,6 +261,7 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession { public continue(args: DebugProtocol.ContinueArguments): TPromise { return this.send('continue', args).then(response => { + this.allThreadsContinued = response && response.body && response.body.allThreadsContinued === false ? false : true; this.fireFakeContinued(args.threadId, this.allThreadsContinued); return response; }); From d173d8ecc1a21a2561f85229bdeb426e867bd3a0 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 7 Jun 2017 14:48:57 -0700 Subject: [PATCH 1630/2747] Add insertSpaceAfterConstructor Formatting Option for TS and JS Fixes #28206 --- extensions/typescript/package.json | 10 +++++ extensions/typescript/package.nls.json | 1 + .../src/features/formattingProvider.ts | 37 ++++++++++--------- 3 files changed, 31 insertions(+), 17 deletions(-) diff --git a/extensions/typescript/package.json b/extensions/typescript/package.json index eefc7874d37f3..e3edc8ce90e6b 100644 --- a/extensions/typescript/package.json +++ b/extensions/typescript/package.json @@ -174,6 +174,11 @@ "default": true, "description": "%format.insertSpaceAfterCommaDelimiter%" }, + "typescript.format.insertSpaceAfterConstructor": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceAfterConstructor%" + }, "typescript.format.insertSpaceAfterSemicolonInForStatements": { "type": "boolean", "default": true, @@ -249,6 +254,11 @@ "default": true, "description": "%format.insertSpaceAfterCommaDelimiter%" }, + "javascript.format.insertSpaceAfterConstructor": { + "type": "boolean", + "default": false, + "description": "%format.insertSpaceAfterConstructor%" + }, "javascript.format.insertSpaceAfterSemicolonInForStatements": { "type": "boolean", "default": true, diff --git a/extensions/typescript/package.nls.json b/extensions/typescript/package.nls.json index d202887540248..9dbfd2d456471 100644 --- a/extensions/typescript/package.nls.json +++ b/extensions/typescript/package.nls.json @@ -12,6 +12,7 @@ "typescript.format.enable": "Enable/disable default TypeScript formatter.", "javascript.format.enable": "Enable/disable default JavaScript formatter.", "format.insertSpaceAfterCommaDelimiter": "Defines space handling after a comma delimiter.", + "format.insertSpaceAfterConstructor": "Defines space handling after the constructor keyword. Requires TypeScript >= 2.3.0.", "format.insertSpaceAfterSemicolonInForStatements": " Defines space handling after a semicolon in a for statement.", "format.insertSpaceBeforeAndAfterBinaryOperators": "Defines space handling after a binary operator.", "format.insertSpaceAfterKeywordsInControlFlowStatements": "Defines space handling after keywords in a control flow statement.", diff --git a/extensions/typescript/src/features/formattingProvider.ts b/extensions/typescript/src/features/formattingProvider.ts index d368bebbaa608..2687d317b2b44 100644 --- a/extensions/typescript/src/features/formattingProvider.ts +++ b/extensions/typescript/src/features/formattingProvider.ts @@ -11,6 +11,7 @@ import { ITypescriptServiceClient } from '../typescriptService'; interface Configuration { enable: boolean; insertSpaceAfterCommaDelimiter: boolean; + insertSpaceAfterConstructor: boolean; insertSpaceAfterSemicolonInForStatements: boolean; insertSpaceBeforeAndAfterBinaryOperators: boolean; insertSpaceAfterKeywordsInControlFlowStatements: boolean; @@ -23,30 +24,29 @@ interface Configuration { insertSpaceBeforeFunctionParenthesis: boolean; placeOpenBraceOnNewLineForFunctions: boolean; placeOpenBraceOnNewLineForControlBlocks: boolean; - - [key: string]: boolean; } namespace Configuration { - export const insertSpaceAfterCommaDelimiter: string = 'insertSpaceAfterCommaDelimiter'; - export const insertSpaceAfterSemicolonInForStatements: string = 'insertSpaceAfterSemicolonInForStatements'; - export const insertSpaceBeforeAndAfterBinaryOperators: string = 'insertSpaceBeforeAndAfterBinaryOperators'; - export const insertSpaceAfterKeywordsInControlFlowStatements: string = 'insertSpaceAfterKeywordsInControlFlowStatements'; - export const insertSpaceAfterFunctionKeywordForAnonymousFunctions: string = 'insertSpaceAfterFunctionKeywordForAnonymousFunctions'; - export const insertSpaceBeforeFunctionParenthesis: string = 'insertSpaceBeforeFunctionParenthesis'; - export const insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: string = 'insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis'; - export const insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: string = 'insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets'; - export const insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: string = 'insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces'; - export const insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: string = 'insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces'; - export const insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: string = 'insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces'; - export const placeOpenBraceOnNewLineForFunctions: string = 'placeOpenBraceOnNewLineForFunctions'; - export const placeOpenBraceOnNewLineForControlBlocks: string = 'placeOpenBraceOnNewLineForControlBlocks'; + export const insertSpaceAfterCommaDelimiter = 'insertSpaceAfterCommaDelimiter'; + export const insertSpaceAfterConstructor = 'insertSpaceAfterConstructor'; + export const insertSpaceAfterSemicolonInForStatements = 'insertSpaceAfterSemicolonInForStatements'; + export const insertSpaceBeforeAndAfterBinaryOperators = 'insertSpaceBeforeAndAfterBinaryOperators'; + export const insertSpaceAfterKeywordsInControlFlowStatements = 'insertSpaceAfterKeywordsInControlFlowStatements'; + export const insertSpaceAfterFunctionKeywordForAnonymousFunctions = 'insertSpaceAfterFunctionKeywordForAnonymousFunctions'; + export const insertSpaceBeforeFunctionParenthesis = 'insertSpaceBeforeFunctionParenthesis'; + export const insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis = 'insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis'; + export const insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets = 'insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets'; + export const insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces = 'insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces'; + export const insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces = 'insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces'; + export const insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces = 'insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces'; + export const placeOpenBraceOnNewLineForFunctions = 'placeOpenBraceOnNewLineForFunctions'; + export const placeOpenBraceOnNewLineForControlBlocks = 'placeOpenBraceOnNewLineForControlBlocks'; export function equals(a: Configuration, b: Configuration): boolean { let keys = Object.keys(a); for (let i = 0; i < keys.length; i++) { let key = keys[i]; - if (a[key] !== b[key]) { + if ((a as any)[key] !== (b as any)[key]) { return false; } } @@ -57,6 +57,7 @@ namespace Configuration { let result: Configuration = Object.create(null); result.enable = true; result.insertSpaceAfterCommaDelimiter = true; + result.insertSpaceAfterConstructor = false; result.insertSpaceAfterSemicolonInForStatements = true; result.insertSpaceBeforeAndAfterBinaryOperators = true; result.insertSpaceAfterKeywordsInControlFlowStatements = true; @@ -213,6 +214,7 @@ export default class TypeScriptFormattingProvider implements DocumentRangeFormat // We can use \n here since the editor normalizes later on to its line endings. newLineCharacter: '\n', insertSpaceAfterCommaDelimiter: this.config.insertSpaceAfterCommaDelimiter, + insertSpaceAfterConstructor: this.config.insertSpaceAfterConstructor, insertSpaceAfterSemicolonInForStatements: this.config.insertSpaceAfterSemicolonInForStatements, insertSpaceBeforeAndAfterBinaryOperators: this.config.insertSpaceBeforeAndAfterBinaryOperators, insertSpaceAfterKeywordsInControlFlowStatements: this.config.insertSpaceAfterKeywordsInControlFlowStatements, @@ -224,7 +226,8 @@ export default class TypeScriptFormattingProvider implements DocumentRangeFormat insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: this.config.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces, insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: this.config.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces, placeOpenBraceOnNewLineForFunctions: this.config.placeOpenBraceOnNewLineForFunctions, - placeOpenBraceOnNewLineForControlBlocks: this.config.placeOpenBraceOnNewLineForControlBlocks + placeOpenBraceOnNewLineForControlBlocks: this.config.placeOpenBraceOnNewLineForControlBlocks, + }; } } From fc2b063fa287ef19ea51bf605ea010eca23fc1b1 Mon Sep 17 00:00:00 2001 From: Yu Zhang <583181285@qq.com> Date: Thu, 8 Jun 2017 05:53:54 +0800 Subject: [PATCH 1631/2747] Default Markdown language configuration (#28172) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🔧 renew Markdown lang config * 🎨 format --- .../markdown/language-configuration.json | 60 +++++++++++-------- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/extensions/markdown/language-configuration.json b/extensions/markdown/language-configuration.json index fd6cd6a14697c..05e33bbdc90de 100644 --- a/extensions/markdown/language-configuration.json +++ b/extensions/markdown/language-configuration.json @@ -8,31 +8,41 @@ }, // symbols used as brackets "brackets": [ - [ - "{", - "}" - ], - [ - "[", - "]" - ], - [ - "(", - ")" - ] + ["{", "}"], + ["[", "]"], + ["(", ")"] ], "autoClosingPairs": [ - [ - "{", - "}" - ], - [ - "[", - "]" - ], - [ - "(", - ")" - ] + { + "open": "{", + "close": "}" + }, + { + "open": "[", + "close": "]" + }, + { + "open": "(", + "close": ")" + }, + { + "open": "<", + "close": ">", + "notIn": [ + "string" + ] + }, + { + "open": "`", + "close": "`", + "notIn": [ + "string" + ] + } + ], + "surroundingPairs": [ + ["(", ")"], + ["[", "]"], + ["`", "`"] ] -} +} \ No newline at end of file From 07645a664feb2912620e727d7d2ab0182d6e99f4 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 7 Jun 2017 15:08:43 -0700 Subject: [PATCH 1632/2747] Restrict markdown preview to markdown files Fixes #28210 Only show the markdown preview commands when you are in a markdown file --- extensions/markdown/package.json | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/extensions/markdown/package.json b/extensions/markdown/package.json index 4ffa3bd6b39f6..15c27055fe0e2 100644 --- a/extensions/markdown/package.json +++ b/extensions/markdown/package.json @@ -16,7 +16,8 @@ "onLanguage:markdown", "onCommand:markdown.showPreview", "onCommand:markdown.showPreviewToSide", - "onCommand:markdown.showSource" + "onCommand:markdown.showSource", + "onCommand:markdown.showPreviewSecuritySelector" ], "contributes": { "languages": [ @@ -79,25 +80,42 @@ "menus": { "editor/title": [ { - "when": "editorLangId == markdown", "command": "markdown.showPreviewToSide", + "when": "editorLangId == markdown", "alt": "markdown.showPreview", "group": "navigation" }, { - "when": "resourceScheme == markdown", "command": "markdown.showSource", + "when": "resourceScheme == markdown", "group": "navigation" }, { - "when": "resourceScheme == markdown", - "command": "markdown.showPreviewSecuritySelector" + "command": "markdown.showPreviewSecuritySelector", + "when": "resourceScheme == markdown" } ], "explorer/context": [ { + "command": "markdown.showPreview", "when": "resourceLangId == markdown", + "group": "navigation" + } + ], + "commandPalette": [ + { "command": "markdown.showPreview", + "when": "editorLangId == markdown", + "group": "navigation" + }, + { + "command": "markdown.showPreviewToSide", + "when": "editorLangId == markdown", + "group": "navigation" + }, + { + "command": "markdown.showSource", + "when": "resourceScheme == markdown", "group": "navigation" } ] @@ -107,13 +125,13 @@ "command": "markdown.showPreview", "key": "shift+ctrl+v", "mac": "shift+cmd+v", - "when": "editorFocus" + "when": "editorLangId == markdown" }, { "command": "markdown.showPreviewToSide", "key": "ctrl+k v", "mac": "cmd+k v", - "when": "editorFocus" + "when": "editorLangId == markdown" } ], "snippets": [ From dca7ae6908908cb1eccbb38b35bcdcdf3e212995 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 7 Jun 2017 15:23:28 -0700 Subject: [PATCH 1633/2747] Monokai: Use tab well color for title bar Fixes #27980 --- extensions/theme-monokai/themes/monokai-color-theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index fa2146e0a84f5..693494c71de9d 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -37,7 +37,7 @@ "panelTitle.activeBorder": "#75715E", "panelTitle.inactiveForeground": "#75715E", "panel.border": "#414339", - "titleBar.activeBackground": "#414339", + "titleBar.activeBackground": "#1e1f1c", "statusBar.background": "#414339", "statusBar.noFolderBackground": "#414339", "statusBar.debuggingBackground": "#75715E", From 9f0ba70700e9c010501aa2f7eec19061ce75f799 Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 8 Jun 2017 00:28:24 +0200 Subject: [PATCH 1634/2747] fixes #28198 --- .../workbench/parts/debug/common/debugModel.ts | 6 +++--- .../parts/debug/electron-browser/debugViewer.ts | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index 6c1f022346903..c68c9be42dba0 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -435,17 +435,17 @@ export class Thread implements IThread { * Only fetches the first stack frame for performance reasons. Calling this method consecutive times * gets the remainder of the call stack. */ - public fetchCallStack(): TPromise { + public fetchCallStack(smartFetch = true): TPromise { if (!this.stopped) { return TPromise.as(null); } - if (!this.fetchPromise) { + if (!this.fetchPromise && smartFetch) { this.fetchPromise = this.getCallStackImpl(0, 1).then(callStack => { this.callStack = callStack || []; }); } else { - this.fetchPromise = this.fetchPromise.then(() => this.getCallStackImpl(this.callStack.length, 20).then(callStackSecondPart => { + this.fetchPromise = (this.fetchPromise || TPromise.as(null)).then(() => this.getCallStackImpl(this.callStack.length, 20).then(callStackSecondPart => { this.callStack = this.callStack.concat(callStackSecondPart); })); } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index 4125114587786..76cb4fb994526 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -355,7 +355,7 @@ export class CallStackDataSource implements IDataSource { public getChildren(tree: ITree, element: any): TPromise { if (element instanceof Thread) { - return TPromise.as(this.getThreadChildren(element)); + return this.getThreadChildren(element); } if (element instanceof Model) { return TPromise.as(element.getProcesses()); @@ -365,25 +365,25 @@ export class CallStackDataSource implements IDataSource { return TPromise.as(process.getAllThreads()); } - private getThreadChildren(thread: Thread): any[] { + private getThreadChildren(thread: Thread): TPromise { const callStack: any[] = thread.getCallStack(); - if (!callStack) { - return []; + if (!callStack || !callStack.length) { + return thread.fetchCallStack(false).then(() => thread.getCallStack()); } if (callStack.length === 1) { // To reduce flashing of the call stack view simply append the stale call stack // once we have the correct data the tree will refresh and we will no longer display it. - return callStack.concat(thread.getStaleCallStack().slice(1)); + return TPromise.as(callStack.concat(thread.getStaleCallStack().slice(1))); } if (thread.stoppedDetails && thread.stoppedDetails.framesErrorMessage) { - return callStack.concat([thread.stoppedDetails.framesErrorMessage]); + return TPromise.as(callStack.concat([thread.stoppedDetails.framesErrorMessage])); } if (thread.stoppedDetails && thread.stoppedDetails.totalFrames > callStack.length && callStack.length > 1) { - return callStack.concat([new ThreadAndProcessIds(thread.process.getId(), thread.threadId)]); + return TPromise.as(callStack.concat([new ThreadAndProcessIds(thread.process.getId(), thread.threadId)])); } - return callStack; + return TPromise.as(callStack); } public getParent(tree: ITree, element: any): TPromise { From 4d020e27eaa6019124ffdc3389aaf51e1e65a0ee Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 8 Jun 2017 00:35:21 +0200 Subject: [PATCH 1635/2747] Revert "fixes #28198" This reverts commit 0425eff0f0ade716038413915c942f1784867943. --- .../parts/debug/electron-browser/rawDebugSession.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts b/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts index 819af044f0469..211539a5d4f79 100644 --- a/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts +++ b/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts @@ -79,7 +79,7 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession { super(id); this.emittedStopped = false; this.readyForBreakpoints = false; - this.allThreadsContinued = false; + this.allThreadsContinued = true; this.sentPromises = []; this._onDidInitialize = new Emitter(); @@ -197,7 +197,7 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession { this.emittedStopped = true; this._onDidStop.fire(event); } else if (event.event === 'continued') { - this.allThreadsContinued = (event).body.allThreadsContinued === false ? false : true; + this.allThreadsContinued = (event).body.allThreadsContinued = false ? false : true; this._onDidContinued.fire(event); } else if (event.event === 'thread') { this._onDidThread.fire(event); @@ -261,7 +261,6 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession { public continue(args: DebugProtocol.ContinueArguments): TPromise { return this.send('continue', args).then(response => { - this.allThreadsContinued = response && response.body && response.body.allThreadsContinued === false ? false : true; this.fireFakeContinued(args.threadId, this.allThreadsContinued); return response; }); From 9ad78cf0c753d82cf35293cf18fdd8701eb147bf Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 8 Jun 2017 00:39:58 +0200 Subject: [PATCH 1636/2747] use tripple equals when comparing --- .../workbench/parts/debug/electron-browser/rawDebugSession.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts b/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts index 211539a5d4f79..d83e1999d5306 100644 --- a/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts +++ b/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts @@ -197,7 +197,7 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession { this.emittedStopped = true; this._onDidStop.fire(event); } else if (event.event === 'continued') { - this.allThreadsContinued = (event).body.allThreadsContinued = false ? false : true; + this.allThreadsContinued = (event).body.allThreadsContinued === false ? false : true; this._onDidContinued.fire(event); } else if (event.event === 'thread') { this._onDidThread.fire(event); From 25458491ebb2b5717df6e363e1c4ed69242ff882 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 7 Jun 2017 15:40:04 -0700 Subject: [PATCH 1637/2747] Remove ` as autoclosing pair in markdown Having ` as an autoclosing pair makes typing fenced code blocks annoying https://github.com/Microsoft/vscode/pull/28172#issuecomment-306944985 --- extensions/markdown/language-configuration.json | 7 ------- 1 file changed, 7 deletions(-) diff --git a/extensions/markdown/language-configuration.json b/extensions/markdown/language-configuration.json index 05e33bbdc90de..6c811c66aa6e9 100644 --- a/extensions/markdown/language-configuration.json +++ b/extensions/markdown/language-configuration.json @@ -31,13 +31,6 @@ "notIn": [ "string" ] - }, - { - "open": "`", - "close": "`", - "notIn": [ - "string" - ] } ], "surroundingPairs": [ From 2af6c114c3a48fd06e86683260483780727ffd0b Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 7 Jun 2017 15:41:41 -0700 Subject: [PATCH 1638/2747] Fix markdown wordwrap for langugae specific settings. Fixes #25357 --- extensions/markdown/src/previewContentProvider.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/extensions/markdown/src/previewContentProvider.ts b/extensions/markdown/src/previewContentProvider.ts index 44531e5b62e46..8f6d925059cdc 100644 --- a/extensions/markdown/src/previewContentProvider.ts +++ b/extensions/markdown/src/previewContentProvider.ts @@ -65,9 +65,14 @@ class MarkdownPreviewConfig { private constructor() { const editorConfig = vscode.workspace.getConfiguration('editor'); const markdownConfig = vscode.workspace.getConfiguration('markdown'); + const markdownEditorConfig = vscode.workspace.getConfiguration('[markdown]'); this.scrollBeyondLastLine = editorConfig.get('scrollBeyondLastLine', false); + this.wordWrap = editorConfig.get('wordWrap', 'off') !== 'off'; + if (markdownEditorConfig && markdownEditorConfig['editor.wordWrap']) { + this.wordWrap = markdownEditorConfig['editor.wordWrap'] !== 'off'; + } this.previewFrontMatter = markdownConfig.get('previewFrontMatter', 'hide'); this.scrollPreviewWithEditorSelection = !!markdownConfig.get('preview.scrollPreviewWithEditorSelection', true); From 5291f831b69640ef901eb9383781e99cc9fa06a5 Mon Sep 17 00:00:00 2001 From: Cristian Date: Thu, 8 Jun 2017 08:20:45 +0300 Subject: [PATCH 1639/2747] #22622 - implemented DomScrollableElement --- src/vs/workbench/parts/debug/electron-browser/debugHover.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index 33e4a4e21e050..96f025bc4bc48 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -21,6 +21,7 @@ import { IDebugService, IExpression, IExpressionContainer } from 'vs/workbench/p import { Expression } from 'vs/workbench/parts/debug/common/debugModel'; import { VariablesRenderer, renderExpressionValue, VariablesDataSource } from 'vs/workbench/parts/debug/electron-browser/debugViewer'; import { IListService } from 'vs/platform/list/browser/listService'; +import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; const $ = dom.$; const MAX_ELEMENTS_SHOWN = 18; @@ -42,6 +43,7 @@ export class DebugHoverWidget implements IContentWidget { private valueContainer: HTMLElement; private stoleFocus: boolean; private toDispose: lifecycle.IDisposable[]; + private scrollbar: DomScrollableElement; constructor( private editor: ICodeEditor, @@ -68,6 +70,7 @@ export class DebugHoverWidget implements IContentWidget { private create(instantiationService: IInstantiationService): void { this.domNode = $('.debug-hover-widget'); this.complexValueContainer = dom.append(this.domNode, $('.complex-value')); + this.scrollbar = new DomScrollableElement(this.complexValueContainer, { canUseTranslate3d: false }); this.complexValueTitle = dom.append(this.complexValueContainer, $('.title')); this.treeContainer = dom.append(this.complexValueContainer, $('.debug-hover-tree')); this.treeContainer.setAttribute('role', 'tree'); @@ -81,6 +84,8 @@ export class DebugHoverWidget implements IContentWidget { ariaLabel: nls.localize('treeAriaLabel', "Debug Hover"), keyboardSupport: false }); + this.toDispose.push(this.scrollbar); + this.domNode.appendChild(this.scrollbar.getDomNode()); this.toDispose.push(this.listService.register(this.tree)); } From efa84ba72503f2ea8e2f3dfe2114c099009431db Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 8 Jun 2017 09:44:29 +0200 Subject: [PATCH 1640/2747] less eager snippet suggestions, #26275 --- .../parts/snippets/electron-browser/snippetsService.ts | 7 +++++-- .../snippets/test/electron-browser/snippetsService.test.ts | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts b/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts index 8e4f75e32caf7..717bdbe35418b 100644 --- a/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts +++ b/src/vs/workbench/parts/snippets/electron-browser/snippetsService.ts @@ -111,18 +111,21 @@ export class SnippetSuggestProvider implements ISuggestSupport { for (const snippet of snippets) { const lowPrefix = snippet.prefix.toLowerCase(); - let overwriteBefore: number; + let overwriteBefore = 0; + let accetSnippet = true; if (lowWordUntil.length > 0 && startsWith(lowPrefix, lowWordUntil)) { // cheap match on the (none-empty) current word overwriteBefore = lowWordUntil.length; + accetSnippet = true; } else if (lowLineUntil.length > 0) { // compute overlap between snippet and line on text overwriteBefore = overlap(lowLineUntil, snippet.prefix.toLowerCase()); + accetSnippet = overwriteBefore > 0 && !model.getWordAtPosition(new Position(position.lineNumber, position.column - overwriteBefore)); } - if (overwriteBefore !== 0) { + if (accetSnippet) { items.push({ snippet, diff --git a/src/vs/workbench/parts/snippets/test/electron-browser/snippetsService.test.ts b/src/vs/workbench/parts/snippets/test/electron-browser/snippetsService.test.ts index d9fa6f1b29400..2cde3b1116d39 100644 --- a/src/vs/workbench/parts/snippets/test/electron-browser/snippetsService.test.ts +++ b/src/vs/workbench/parts/snippets/test/electron-browser/snippetsService.test.ts @@ -84,5 +84,10 @@ suite('SnippetsService', function () { result = provider.provideCompletionItems(model, new Position(1, 4)); assert.equal(result.suggestions.length, 1); model.dispose(); + + model = Model.createFromString('a Date: Thu, 8 Jun 2017 09:45:21 +0200 Subject: [PATCH 1641/2747] dialogs - set type properly --- src/vs/workbench/electron-browser/window.ts | 3 ++- .../parts/extensions/browser/extensionsActions.ts | 2 +- src/vs/workbench/parts/files/browser/fileActions.ts | 9 ++++++--- .../parts/files/browser/views/explorerViewer.ts | 3 ++- src/vs/workbench/parts/search/browser/searchViewlet.ts | 7 ++++--- .../parts/tasks/electron-browser/task.contribution.ts | 6 ++++-- 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index e193c9391e4f5..15bfd13bb2261 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -149,7 +149,8 @@ export class ElectronWindow extends Themable { if (draggedExternalResources.length > 20) { doOpen = this.messageService.confirm({ message: nls.localize('confirmOpen', "Are you sure you want to open {0} folders?", draggedExternalResources.length), - primaryButton: nls.localize({ key: 'confirmOpenButton', comment: ['&& denotes a mnemonic'] }, "&&Open") + primaryButton: nls.localize({ key: 'confirmOpenButton', comment: ['&& denotes a mnemonic'] }, "&&Open"), + type: 'question' }); } diff --git a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts index b922ba26c2516..63de81c9037df 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionsActions.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionsActions.ts @@ -865,7 +865,7 @@ export class ReloadAction extends Action { } run(): TPromise { - if (this.messageService.confirm({ message: this.reloadMessaage, primaryButton: localize('reload', "&&Reload Window") })) { + if (this.messageService.confirm({ message: this.reloadMessaage, type: 'question', primaryButton: localize('reload', "&&Reload Window") })) { return this.windowService.reloadWindow(); } return TPromise.wrap(null); diff --git a/src/vs/workbench/parts/files/browser/fileActions.ts b/src/vs/workbench/parts/files/browser/fileActions.ts index 98e8c094dddc3..378a32e3889d7 100644 --- a/src/vs/workbench/parts/files/browser/fileActions.ts +++ b/src/vs/workbench/parts/files/browser/fileActions.ts @@ -698,13 +698,15 @@ export class BaseDeleteFileAction extends BaseFileAction { confirm = { message: this.element.isDirectory ? nls.localize('confirmMoveTrashMessageFolder', "Are you sure you want to delete '{0}' and its contents?", this.element.name) : nls.localize('confirmMoveTrashMessageFile', "Are you sure you want to delete '{0}'?", this.element.name), detail: isWindows ? nls.localize('undoBin', "You can restore from the recycle bin.") : nls.localize('undoTrash', "You can restore from the trash."), - primaryButton + primaryButton, + type: 'question' }; } else { confirm = { message: this.element.isDirectory ? nls.localize('confirmDeleteMessageFolder', "Are you sure you want to permanently delete '{0}' and its contents?", this.element.name) : nls.localize('confirmDeleteMessageFile', "Are you sure you want to permanently delete '{0}'?", this.element.name), detail: nls.localize('irreversible', "This action is irreversible!"), - primaryButton + primaryButton, + type: 'warning' }; } @@ -823,7 +825,8 @@ export class ImportFileAction extends BaseFileAction { const confirm: IConfirmation = { message: nls.localize('confirmOverwrite', "A file or folder with the same name already exists in the destination folder. Do you want to replace it?"), detail: nls.localize('irreversible', "This action is irreversible!"), - primaryButton: nls.localize({ key: 'replaceButtonLabel', comment: ['&& denotes a mnemonic'] }, "&&Replace") + primaryButton: nls.localize({ key: 'replaceButtonLabel', comment: ['&& denotes a mnemonic'] }, "&&Replace"), + type: 'warning' }; overwrite = this.messageService.confirm(confirm); diff --git a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts index 95f1dc2599cf1..e7ed0556942dd 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts @@ -804,7 +804,8 @@ export class FileDragAndDrop implements IDragAndDrop { const confirm: IConfirmation = { message: nls.localize('confirmOverwriteMessage', "'{0}' already exists in the destination folder. Do you want to replace it?", source.name), detail: nls.localize('irreversible', "This action is irreversible!"), - primaryButton: nls.localize({ key: 'replaceButtonLabel', comment: ['&& denotes a mnemonic'] }, "&&Replace") + primaryButton: nls.localize({ key: 'replaceButtonLabel', comment: ['&& denotes a mnemonic'] }, "&&Replace"), + type: 'warning' }; // Move with overwrite if the user confirms diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index 9fe88c72d579d..94d852b0b3ae9 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -38,7 +38,7 @@ import { IStorageService, StorageScope } from 'vs/platform/storage/common/storag import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { IMessageService } from 'vs/platform/message/common/message'; +import { IMessageService, IConfirmation } from 'vs/platform/message/common/message'; import { IProgressService } from 'vs/platform/progress/common/progress'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; @@ -368,10 +368,11 @@ export class SearchViewlet extends Viewlet { let replaceValue = this.searchWidget.getReplaceValue() || ''; let afterReplaceAllMessage = this.buildAfterReplaceAllMessage(occurrences, fileCount, replaceValue); - let confirmation = { + let confirmation: IConfirmation = { title: nls.localize('replaceAll.confirmation.title', "Replace All"), message: this.buildReplaceAllConfirmationMessage(occurrences, fileCount, replaceValue), - primaryButton: nls.localize('replaceAll.confirm.button', "Replace") + primaryButton: nls.localize('replaceAll.confirm.button', "Replace"), + type: 'question' }; if (this.messageService.confirm(confirmation)) { diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 0619206da2fc6..ee12526316b55 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -1251,7 +1251,8 @@ class TaskService extends EventEmitter implements ITaskService { if (this._taskSystem && this._taskSystem.isActiveSync()) { if (this._taskSystem.canAutoTerminate() || this.messageService.confirm({ message: nls.localize('TaskSystem.runningTask', 'There is a task running. Do you want to terminate it?'), - primaryButton: nls.localize({ key: 'TaskSystem.terminateTask', comment: ['&& denotes a mnemonic'] }, "&&Terminate Task") + primaryButton: nls.localize({ key: 'TaskSystem.terminateTask', comment: ['&& denotes a mnemonic'] }, "&&Terminate Task"), + type: 'question' })) { return this._taskSystem.terminateAll().then((response) => { if (response.success) { @@ -1262,7 +1263,8 @@ class TaskService extends EventEmitter implements ITaskService { } else if (response.code && response.code === TerminateResponseCode.ProcessNotFound) { return !this.messageService.confirm({ message: nls.localize('TaskSystem.noProcess', 'The launched task doesn\'t exist anymore. If the task spawned background processes exiting VS Code might result in orphaned processes. To avoid this start the last background process with a wait flag.'), - primaryButton: nls.localize({ key: 'TaskSystem.exitAnyways', comment: ['&& denotes a mnemonic'] }, "&&Exit Anyways") + primaryButton: nls.localize({ key: 'TaskSystem.exitAnyways', comment: ['&& denotes a mnemonic'] }, "&&Exit Anyways"), + type: 'info' }); } return true; // veto From 4aa3f05d08a16ff967b96343df665b21aaa0396d Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 8 Jun 2017 09:48:37 +0200 Subject: [PATCH 1642/2747] :lipstick: main side --- src/vs/code/{electron-main => common}/log.ts | 3 +- src/vs/code/common/windows.ts | 5 +- src/vs/code/electron-main/app.ts | 9 +- src/vs/code/electron-main/launch.ts | 19 ++-- src/vs/code/electron-main/lifecycle.ts | 4 +- src/vs/code/electron-main/main.ts | 6 +- src/vs/code/electron-main/menus.ts | 2 +- src/vs/code/electron-main/sharedProcess.ts | 17 ++-- src/vs/code/electron-main/window.ts | 96 +++++++++---------- src/vs/code/electron-main/windows.ts | 6 +- src/vs/code/{electron-main => node}/paths.ts | 0 .../code/{electron-main => node}/shellEnv.ts | 2 +- .../code/{electron-main => node}/storage.ts | 6 +- src/vs/code/node/windowsUtils.ts | 12 ++- 14 files changed, 94 insertions(+), 93 deletions(-) rename src/vs/code/{electron-main => common}/log.ts (96%) rename src/vs/code/{electron-main => node}/paths.ts (100%) rename src/vs/code/{electron-main => node}/shellEnv.ts (100%) rename src/vs/code/{electron-main => node}/storage.ts (94%) diff --git a/src/vs/code/electron-main/log.ts b/src/vs/code/common/log.ts similarity index 96% rename from src/vs/code/electron-main/log.ts rename to src/vs/code/common/log.ts index caa630d6ad2e5..c9908624211dd 100644 --- a/src/vs/code/electron-main/log.ts +++ b/src/vs/code/common/log.ts @@ -12,6 +12,7 @@ export const ILogService = createDecorator('logService'); export interface ILogService { _serviceBrand: any; + log(...args: any[]): void; } @@ -22,7 +23,7 @@ export class MainLogService implements ILogService { constructor( @IEnvironmentService private environmentService: IEnvironmentService) { } - log(...args: any[]): void { + public log(...args: any[]): void { if (this.environmentService.verbose) { console.log(`\x1b[93m[main ${new Date().toLocaleTimeString()}]\x1b[0m`, ...args); } diff --git a/src/vs/code/common/windows.ts b/src/vs/code/common/windows.ts index 96ca219e07fb3..43c5fba286488 100644 --- a/src/vs/code/common/windows.ts +++ b/src/vs/code/common/windows.ts @@ -36,7 +36,6 @@ export interface IWindowEventService { } export class ActiveWindowManager implements IDisposable { - private disposables: IDisposable[] = []; private _activeWindowId: number; @@ -49,11 +48,11 @@ export class ActiveWindowManager implements IDisposable { this._activeWindowId = windowId; } - get activeClientId(): string { + public get activeClientId(): string { return `window:${this._activeWindowId}`; } - dispose() { + public dispose() { this.disposables = dispose(this.disposables); } } \ No newline at end of file diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index f15971a75de79..435423de2c286 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -14,7 +14,7 @@ import { WindowsChannel } from 'vs/platform/windows/common/windowsIpc'; import { WindowsService } from 'vs/platform/windows/electron-main/windowsService'; import { ILifecycleService } from 'vs/code/electron-main/lifecycle'; import { VSCodeMenu } from 'vs/code/electron-main/menus'; -import { getShellEnvironment } from 'vs/code/electron-main/shellEnv'; +import { getShellEnvironment } from 'vs/code/node/shellEnv'; import { IUpdateService } from 'vs/platform/update/common/update'; import { UpdateChannel } from 'vs/platform/update/common/updateIpc'; import { UpdateService } from 'vs/platform/update/electron-main/updateService'; @@ -26,8 +26,8 @@ import { LaunchService, LaunchChannel, ILaunchService } from './launch'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; -import { ILogService } from 'vs/code/electron-main/log'; -import { IStorageService } from 'vs/code/electron-main/storage'; +import { ILogService } from 'vs/code/common/log'; +import { IStorageService } from 'vs/code/node/storage'; import { IBackupMainService } from 'vs/platform/backup/common/backup'; import { BackupChannel } from 'vs/platform/backup/common/backupIpc'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -146,8 +146,7 @@ export class VSCodeApplication { // Spawn shared process this.sharedProcess = new SharedProcess(this.environmentService, this.userEnv); this.toDispose.push(this.sharedProcess); - this.sharedProcessClient = this.sharedProcess.whenReady() - .then(() => connect(this.environmentService.sharedIPCHandle, 'main')); + this.sharedProcessClient = this.sharedProcess.whenReady().then(() => connect(this.environmentService.sharedIPCHandle, 'main')); // Services const appInstantiationService = this.initServices(); diff --git a/src/vs/code/electron-main/launch.ts b/src/vs/code/electron-main/launch.ts index e69f31b936381..c8a6347a9de59 100644 --- a/src/vs/code/electron-main/launch.ts +++ b/src/vs/code/electron-main/launch.ts @@ -10,7 +10,7 @@ import { IWindowsMainService } from 'vs/code/electron-main/windows'; import { VSCodeWindow } from 'vs/code/electron-main/window'; import { TPromise } from 'vs/base/common/winjs.base'; import { IChannel } from 'vs/base/parts/ipc/common/ipc'; -import { ILogService } from 'vs/code/electron-main/log'; +import { ILogService } from 'vs/code/common/log'; import { IURLService } from 'vs/platform/url/common/url'; import { IProcessEnvironment } from 'vs/base/common/platform'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; @@ -41,7 +41,7 @@ export class LaunchChannel implements ILaunchChannel { constructor(private service: ILaunchService) { } - call(command: string, arg: any): TPromise { + public call(command: string, arg: any): TPromise { switch (command) { case 'start': const { args, userEnv } = arg as IStartArguments; @@ -50,6 +50,7 @@ export class LaunchChannel implements ILaunchChannel { case 'get-main-process-id': return this.service.getMainProcessId(); } + return undefined; } } @@ -60,11 +61,11 @@ export class LaunchChannelClient implements ILaunchService { constructor(private channel: ILaunchChannel) { } - start(args: ParsedArgs, userEnv: IProcessEnvironment): TPromise { + public start(args: ParsedArgs, userEnv: IProcessEnvironment): TPromise { return this.channel.call('start', { args, userEnv }); } - getMainProcessId(): TPromise { + public getMainProcessId(): TPromise { return this.channel.call('get-main-process-id', null); } } @@ -79,19 +80,20 @@ export class LaunchService implements ILaunchService { @IURLService private urlService: IURLService ) { } - start(args: ParsedArgs, userEnv: IProcessEnvironment): TPromise { + public start(args: ParsedArgs, userEnv: IProcessEnvironment): TPromise { this.logService.log('Received data from other instance: ', args, userEnv); + // Check early for open-url which is handled in URL service const openUrlArg = args['open-url'] || []; const openUrl = typeof openUrlArg === 'string' ? [openUrlArg] : openUrlArg; - const context = !!userEnv['VSCODE_CLI'] ? OpenContext.CLI : OpenContext.DESKTOP; - if (openUrl.length > 0) { openUrl.forEach(url => this.urlService.open(url)); + return TPromise.as(null); } // Otherwise handle in windows service + const context = !!userEnv['VSCODE_CLI'] ? OpenContext.CLI : OpenContext.DESKTOP; let usedWindows: VSCodeWindow[]; if (!!args.extensionDevelopmentPath) { this.windowsService.openExtensionDevelopmentHostWindow({ context, cli: args, userEnv }); @@ -129,8 +131,9 @@ export class LaunchService implements ILaunchService { return TPromise.as(null); } - getMainProcessId(): TPromise { + public getMainProcessId(): TPromise { this.logService.log('Received request for process ID from other instance.'); + return TPromise.as(process.pid); } } \ No newline at end of file diff --git a/src/vs/code/electron-main/lifecycle.ts b/src/vs/code/electron-main/lifecycle.ts index 895f8b056846c..fbeb9a8547227 100644 --- a/src/vs/code/electron-main/lifecycle.ts +++ b/src/vs/code/electron-main/lifecycle.ts @@ -9,8 +9,8 @@ import { ipcMain as ipc, app } from 'electron'; import { TPromise, TValueCallback } from 'vs/base/common/winjs.base'; import { ReadyState, VSCodeWindow } from 'vs/code/electron-main/window'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { ILogService } from 'vs/code/electron-main/log'; -import { IStorageService } from 'vs/code/electron-main/storage'; +import { ILogService } from 'vs/code/common/log'; +import { IStorageService } from 'vs/code/node/storage'; import Event, { Emitter } from 'vs/base/common/event'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts index 8294cc1f22bdb..41bb32a7c013d 100644 --- a/src/vs/code/electron-main/main.ts +++ b/src/vs/code/electron-main/main.ts @@ -10,7 +10,7 @@ import { assign } from 'vs/base/common/objects'; import * as platform from 'vs/base/common/platform'; import { parseMainProcessArgv } from 'vs/platform/environment/node/argv'; import { mkdirp } from 'vs/base/node/pfs'; -import { validatePaths } from 'vs/code/electron-main/paths'; +import { validatePaths } from 'vs/code/node/paths'; import { LifecycleService, ILifecycleService } from 'vs/code/electron-main/lifecycle'; import { Server, serve, connect } from 'vs/base/parts/ipc/node/ipc.net'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -19,8 +19,8 @@ import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiati import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; -import { ILogService, MainLogService } from 'vs/code/electron-main/log'; -import { IStorageService, StorageService } from 'vs/code/electron-main/storage'; +import { ILogService, MainLogService } from 'vs/code/common/log'; +import { IStorageService, StorageService } from 'vs/code/node/storage'; import { IBackupMainService } from 'vs/platform/backup/common/backup'; import { BackupMainService } from 'vs/platform/backup/electron-main/backupMainService'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index fe14d6cf22342..f267b3263725f 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -14,7 +14,7 @@ import { OpenContext } from 'vs/code/common/windows'; import { IWindowsMainService } from 'vs/code/electron-main/windows'; import { VSCodeWindow } from 'vs/code/electron-main/window'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IStorageService } from 'vs/code/electron-main/storage'; +import { IStorageService } from 'vs/code/node/storage'; import { IFilesConfiguration, AutoSaveConfiguration } from 'vs/platform/files/common/files'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IUpdateService, State as UpdateState } from 'vs/platform/update/common/update'; diff --git a/src/vs/code/electron-main/sharedProcess.ts b/src/vs/code/electron-main/sharedProcess.ts index c70ce1239f688..5004700f7eb3b 100644 --- a/src/vs/code/electron-main/sharedProcess.ts +++ b/src/vs/code/electron-main/sharedProcess.ts @@ -14,6 +14,8 @@ import { PromiseSource } from 'vs/base/common/async'; export class SharedProcess { + private spawnPromiseSource: PromiseSource; + private window: Electron.BrowserWindow; private disposables: IDisposable[] = []; @@ -41,6 +43,7 @@ export class SharedProcess { this.disposables.push(toDisposable(() => this.window.removeListener('close', onClose))); this.disposables.push(toDisposable(() => { + // Electron seems to crash on Windows without this setTimeout :| setTimeout(() => { try { @@ -65,8 +68,6 @@ export class SharedProcess { }); } - private spawnPromiseSource: PromiseSource; - constructor( private environmentService: IEnvironmentService, private userEnv: IProcessEnvironment @@ -74,15 +75,15 @@ export class SharedProcess { this.spawnPromiseSource = new PromiseSource(); } - spawn(): void { + public spawn(): void { this.spawnPromiseSource.complete(); } - whenReady(): TPromise { + public whenReady(): TPromise { return this.spawnPromiseSource.value.then(() => this._whenReady); } - toggle(): void { + public toggle(): void { if (this.window.isVisible()) { this.hide(); } else { @@ -90,17 +91,17 @@ export class SharedProcess { } } - show(): void { + public show(): void { this.window.show(); this.window.webContents.openDevTools(); } - hide(): void { + public hide(): void { this.window.webContents.closeDevTools(); this.window.hide(); } - dispose(): void { + public dispose(): void { this.disposables = dispose(this.disposables); } } diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 9d40c049ad7c1..58f27e2a355aa 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -9,11 +9,11 @@ import * as path from 'path'; import * as objects from 'vs/base/common/objects'; import { stopProfiling } from 'vs/base/node/profiler'; import nls = require('vs/nls'); -import { IStorageService } from 'vs/code/electron-main/storage'; +import { IStorageService } from 'vs/code/node/storage'; import { shell, screen, BrowserWindow, systemPreferences, app } from 'electron'; import { TPromise, TValueCallback } from 'vs/base/common/winjs.base'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; -import { ILogService } from 'vs/code/electron-main/log'; +import { ILogService } from 'vs/code/common/log'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IWorkbenchEditorConfiguration } from 'vs/workbench/common/editor'; import { parseArgs } from 'vs/platform/environment/node/argv'; @@ -78,9 +78,6 @@ export interface IWindowConfiguration extends ParsedArgs { userEnv: IProcessEnvironment; - /** - * The physical keyboard is of ISO type (on OSX). - */ isISOKeyboard?: boolean; zoomLevel?: number; @@ -128,12 +125,6 @@ export enum ReadyState { READY } -interface IConfiguration { - window: { - menuBarVisibility: MenuBarVisibility; - }; -} - export class VSCodeWindow { public static themeStorageKey = 'theme'; @@ -153,7 +144,6 @@ export class VSCodeWindow { private _isExtensionTestHost: boolean; private windowState: IWindowState; private currentMenuBarVisibility: MenuBarVisibility; - private currentWindowMode: WindowMode; private toDispose: IDisposable[]; private representedFilename: string; @@ -177,11 +167,27 @@ export class VSCodeWindow { this.whenReadyCallbacks = []; this.toDispose = []; + // create browser window + this.createBrowserWindow(config); + + // respect configured menu bar visibility + this.onConfigurationUpdated(); + + // TODO@joao: hook this up to some initialization routine this causes a race between setting the headers and doing + // a request that needs them. chances are low + this.setCommonHTTPHeaders(); + + // Eventing + this.registerListeners(); + } + + private createBrowserWindow(config: IWindowCreationOptions): void { + // Load window state - this.restoreWindowState(config.state); + this.windowState = this.restoreWindowState(config.state); // in case we are maximized or fullscreen, only show later after the call to maximize/fullscreen (see below) - const isFullscreenOrMaximized = (this.currentWindowMode === WindowMode.Maximized || this.currentWindowMode === WindowMode.Fullscreen); + const isFullscreenOrMaximized = (this.windowState.mode === WindowMode.Maximized || this.windowState.mode === WindowMode.Fullscreen); const options: Electron.BrowserWindowOptions = { width: this.windowState.width, @@ -248,7 +254,7 @@ export class VSCodeWindow { if (isFullscreenOrMaximized) { this._win.maximize(); - if (this.currentWindowMode === WindowMode.Fullscreen) { + if (this.windowState.mode === WindowMode.Fullscreen) { this._win.setFullScreen(true); } @@ -258,16 +264,6 @@ export class VSCodeWindow { } this._lastFocusTime = Date.now(); // since we show directly, we need to set the last focus time too - - // respect configured menu bar visibility - this.onConfigurationUpdated(); - - // TODO@joao: hook this up to some initialization routine this causes a race between setting the headers and doing - // a request that needs them. chances are low - this.setCommonHTTPHeaders(); - - // Eventing - this.registerListeners(); } private setCommonHTTPHeaders(): void { @@ -376,20 +372,6 @@ export class VSCodeWindow { return this._readyState; } - private registerNavigationListenerOn(command: 'swipe' | 'app-command', back: 'left' | 'browser-backward', forward: 'right' | 'browser-forward', acrossEditors: boolean) { - this._win.on(command, (e, cmd) => { - if (this.readyState !== ReadyState.READY) { - return; // window must be ready - } - - if (cmd === back) { - this.send('vscode:runAction', acrossEditors ? 'workbench.action.openPreviousRecentlyUsedEditor' : 'workbench.action.navigateBack'); - } else if (cmd === forward) { - this.send('vscode:runAction', acrossEditors ? 'workbench.action.openNextRecentlyUsedEditor' : 'workbench.action.navigateForward'); - } - }); - } - private registerListeners(): void { // Remember that we loaded @@ -405,7 +387,7 @@ export class VSCodeWindow { // To prevent flashing, we set the window visible after the page has finished to load but before VSCode is loaded if (!this._win.isVisible()) { - if (this.currentWindowMode === WindowMode.Maximized) { + if (this.windowState.mode === WindowMode.Maximized) { this._win.maximize(); } @@ -487,6 +469,20 @@ export class VSCodeWindow { } }; + private registerNavigationListenerOn(command: 'swipe' | 'app-command', back: 'left' | 'browser-backward', forward: 'right' | 'browser-forward', acrossEditors: boolean) { + this._win.on(command, (e, cmd) => { + if (this.readyState !== ReadyState.READY) { + return; // window must be ready + } + + if (cmd === back) { + this.send('vscode:runAction', acrossEditors ? 'workbench.action.openPreviousRecentlyUsedEditor' : 'workbench.action.navigateBack'); + } else if (cmd === forward) { + this.send('vscode:runAction', acrossEditors ? 'workbench.action.openNextRecentlyUsedEditor' : 'workbench.action.navigateForward'); + } + }); + } + public load(config: IWindowConfiguration): void { // If this is the first time the window is loaded, we associate the paths @@ -527,8 +523,7 @@ export class VSCodeWindow { // (--prof-startup) save profile to disk const { profileStartup } = this.environmentService; if (profileStartup) { - stopProfiling(profileStartup.dir, profileStartup.prefix) - .done(undefined, err => console.error(err)); + stopProfiling(profileStartup.dir, profileStartup.prefix).done(undefined, err => console.error(err)); } } @@ -556,7 +551,6 @@ export class VSCodeWindow { } private getUrl(windowConfiguration: IWindowConfiguration): string { - let url = require.toUrl('vs/workbench/electron-browser/bootstrap/index.html'); // Set zoomlevel const windowConfig = this.configurationService.getConfiguration('window'); @@ -593,16 +587,16 @@ export class VSCodeWindow { } } - url += '?config=' + encodeURIComponent(JSON.stringify(config)); - - return url; + return `${require.toUrl('vs/workbench/electron-browser/bootstrap/index.html')}?config=${encodeURIComponent(JSON.stringify(config))}`; } private getBaseTheme(): string { if (isWindows && systemPreferences.isInvertedColorScheme()) { return 'hc-black'; } + const theme = this.storageService.getItem(VSCodeWindow.themeStorageKey, 'vs-dark'); + return theme.split(' ')[0]; } @@ -611,9 +605,10 @@ export class VSCodeWindow { return '#000000'; } - let background = this.storageService.getItem(VSCodeWindow.themeBackgroundStorageKey, null); + const background = this.storageService.getItem(VSCodeWindow.themeBackgroundStorageKey, null); if (!background) { - let baseTheme = this.getBaseTheme(); + const baseTheme = this.getBaseTheme(); + return baseTheme === 'hc-black' ? '#000000' : (baseTheme === 'vs' ? '#FFFFFF' : (isMacintosh ? '#171717' : '#1E1E1E')); // https://github.com/electron/electron/issues/5150 } @@ -668,7 +663,7 @@ export class VSCodeWindow { return state; } - private restoreWindowState(state?: IWindowState): void { + private restoreWindowState(state?: IWindowState): IWindowState { if (state) { try { state = this.validateWindowState(state); @@ -681,8 +676,7 @@ export class VSCodeWindow { state = defaultWindowState(); } - this.windowState = state; - this.currentWindowMode = this.windowState.mode; + return state; } private validateWindowState(state: IWindowState): IWindowState { diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index cc0800f25e6cd..75b6792e95de5 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -15,13 +15,13 @@ import { assign, mixin } from 'vs/base/common/objects'; import { IBackupMainService } from 'vs/platform/backup/common/backup'; import { trim } from 'vs/base/common/strings'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; -import { IStorageService } from 'vs/code/electron-main/storage'; +import { IStorageService } from 'vs/code/node/storage'; import { IPath, VSCodeWindow, IWindowConfiguration, IWindowState as ISingleWindowState, defaultWindowState, WindowMode } from 'vs/code/electron-main/window'; import { ipcMain as ipc, app, screen, BrowserWindow, dialog } from 'electron'; -import { IPathWithLineAndColumn, parseLineAndColumnAware } from 'vs/code/electron-main/paths'; +import { IPathWithLineAndColumn, parseLineAndColumnAware } from 'vs/code/node/paths'; import { ILifecycleService, UnloadReason } from 'vs/code/electron-main/lifecycle'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { ILogService } from 'vs/code/electron-main/log'; +import { ILogService } from 'vs/code/common/log'; import { getPathLabel } from 'vs/base/common/labels'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IWindowSettings } from 'vs/platform/windows/common/windows'; diff --git a/src/vs/code/electron-main/paths.ts b/src/vs/code/node/paths.ts similarity index 100% rename from src/vs/code/electron-main/paths.ts rename to src/vs/code/node/paths.ts diff --git a/src/vs/code/electron-main/shellEnv.ts b/src/vs/code/node/shellEnv.ts similarity index 100% rename from src/vs/code/electron-main/shellEnv.ts rename to src/vs/code/node/shellEnv.ts index 2afa773a34138..92c146fefaeef 100644 --- a/src/vs/code/electron-main/shellEnv.ts +++ b/src/vs/code/node/shellEnv.ts @@ -11,7 +11,6 @@ import { generateUuid } from 'vs/base/common/uuid'; import { TPromise } from 'vs/base/common/winjs.base'; import { isWindows } from 'vs/base/common/platform'; - function getUnixShellEnvironment(): TPromise { const promise = new TPromise((c, e) => { const runAsNode = process.env['ELECTRON_RUN_AS_NODE']; @@ -88,5 +87,6 @@ export function getShellEnvironment(): TPromise { _shellEnv = getUnixShellEnvironment(); } } + return _shellEnv; } diff --git a/src/vs/code/electron-main/storage.ts b/src/vs/code/node/storage.ts similarity index 94% rename from src/vs/code/electron-main/storage.ts rename to src/vs/code/node/storage.ts index d3f1351b6cca4..438a7af5b8d01 100644 --- a/src/vs/code/electron-main/storage.ts +++ b/src/vs/code/node/storage.ts @@ -30,7 +30,7 @@ export class StorageService implements IStorageService { this.dbPath = path.join(environmentService.userDataPath, 'storage.json'); } - getItem(key: string, defaultValue?: T): T { + public getItem(key: string, defaultValue?: T): T { if (!this.database) { this.database = this.load(); } @@ -43,7 +43,7 @@ export class StorageService implements IStorageService { return this.database[key]; } - setItem(key: string, data: any): void { + public setItem(key: string, data: any): void { if (!this.database) { this.database = this.load(); } @@ -59,7 +59,7 @@ export class StorageService implements IStorageService { this.save(); } - removeItem(key: string): void { + public removeItem(key: string): void { if (!this.database) { this.database = this.load(); } diff --git a/src/vs/code/node/windowsUtils.ts b/src/vs/code/node/windowsUtils.ts index 31a4f00b35417..a46c1d96168a4 100644 --- a/src/vs/code/node/windowsUtils.ts +++ b/src/vs/code/node/windowsUtils.ts @@ -43,6 +43,7 @@ export function findBestWindowOrFolder({ win } else if (bestFolder) { return bestFolder; } + return !newWindow ? getLastActiveWindow(windows) : null; } @@ -51,6 +52,7 @@ function findBestWindow(windows: WINDOW[], filePat if (containers.length) { return containers.sort((a, b) => -(a.openedWorkspacePath.length - b.openedWorkspacePath.length))[0]; } + return null; } @@ -60,6 +62,7 @@ function findBestFolder(filePath: string, userHome?: string, vscodeFolder?: stri if (!platform.isLinux) { homeFolder = homeFolder && homeFolder.toLowerCase(); } + let previous = null; try { while (folder !== previous) { @@ -72,22 +75,23 @@ function findBestFolder(filePath: string, userHome?: string, vscodeFolder?: stri } catch (err) { // assume impossible to access } + return null; } function isProjectFolder(folder: string, normalizedUserHome?: string, vscodeFolder = '.vscode') { try { if ((platform.isLinux ? folder : folder.toLowerCase()) === normalizedUserHome) { - // ~/.vscode/extensions is used for extensions - return fs.statSync(path.join(folder, vscodeFolder, 'settings.json')).isFile(); - } else { - return fs.statSync(path.join(folder, vscodeFolder)).isDirectory(); + return fs.statSync(path.join(folder, vscodeFolder, 'settings.json')).isFile(); // ~/.vscode/extensions is used for extensions } + + return fs.statSync(path.join(folder, vscodeFolder)).isDirectory(); } catch (err) { if (!(err && err.code === 'ENOENT')) { throw err; } } + return false; } From f97a4729b244ba7d69ebf6cab26fc52dc2cc8693 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 8 Jun 2017 12:23:04 +0200 Subject: [PATCH 1643/2747] debt - some cleanup on main services --- src/vs/code/common/windows.ts | 21 ------- src/vs/code/electron-main/app.ts | 9 ++- src/vs/code/electron-main/launch.ts | 7 +-- src/vs/code/electron-main/main.ts | 6 +- src/vs/code/electron-main/menus.ts | 4 +- src/vs/code/electron-main/window.ts | 51 ++++++++-------- src/vs/code/electron-main/windows.ts | 11 ++-- src/vs/code/node/windowsUtils.ts | 2 +- src/vs/code/test/node/windowsUtils.test.ts | 2 +- .../lifecycle/electron-main/lifecycleMain.ts} | 36 ++++++------ src/vs/{code => platform/log}/common/log.ts | 0 .../storage}/node/storage.ts | 0 .../update/electron-main/updateService.ts | 2 +- src/vs/platform/windows/common/windows.ts | 58 +++++++++++++++++++ .../windows/electron-main/windowsService.ts | 5 +- 15 files changed, 122 insertions(+), 92 deletions(-) rename src/vs/{code/electron-main/lifecycle.ts => platform/lifecycle/electron-main/lifecycleMain.ts} (85%) rename src/vs/{code => platform/log}/common/log.ts (100%) rename src/vs/{code => platform/storage}/node/storage.ts (100%) diff --git a/src/vs/code/common/windows.ts b/src/vs/code/common/windows.ts index 43c5fba286488..9d1610531c7a6 100644 --- a/src/vs/code/common/windows.ts +++ b/src/vs/code/common/windows.ts @@ -7,27 +7,6 @@ import Event from 'vs/base/common/event'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IWindowsService } from 'vs/platform/windows/common/windows'; -export enum OpenContext { - - // opening when running from the command line - CLI, - - // macOS only: opening from the dock (also when opening files to a running instance from desktop) - DOCK, - - // opening from the main application window - MENU, - - // opening from a file or folder dialog - DIALOG, - - // opening from the OS's UI - DESKTOP, - - // opening through the API - API -} - export interface IWindowEventService { _serviceBrand: any; diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 435423de2c286..bfa18af350991 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -7,12 +7,11 @@ import { app, ipcMain as ipc, BrowserWindow } from 'electron'; import * as platform from 'vs/base/common/platform'; -import { OpenContext } from 'vs/code/common/windows'; import { IWindowsMainService, WindowsManager } from 'vs/code/electron-main/windows'; -import { IWindowsService } from 'vs/platform/windows/common/windows'; +import { IWindowsService, OpenContext } from 'vs/platform/windows/common/windows'; import { WindowsChannel } from 'vs/platform/windows/common/windowsIpc'; import { WindowsService } from 'vs/platform/windows/electron-main/windowsService'; -import { ILifecycleService } from 'vs/code/electron-main/lifecycle'; +import { ILifecycleService } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; import { VSCodeMenu } from 'vs/code/electron-main/menus'; import { getShellEnvironment } from 'vs/code/node/shellEnv'; import { IUpdateService } from 'vs/platform/update/common/update'; @@ -26,8 +25,8 @@ import { LaunchService, LaunchChannel, ILaunchService } from './launch'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; -import { ILogService } from 'vs/code/common/log'; -import { IStorageService } from 'vs/code/node/storage'; +import { ILogService } from 'vs/platform/log/common/log'; +import { IStorageService } from 'vs/platform/storage/node/storage'; import { IBackupMainService } from 'vs/platform/backup/common/backup'; import { BackupChannel } from 'vs/platform/backup/common/backupIpc'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; diff --git a/src/vs/code/electron-main/launch.ts b/src/vs/code/electron-main/launch.ts index c8a6347a9de59..99103a7b5b47f 100644 --- a/src/vs/code/electron-main/launch.ts +++ b/src/vs/code/electron-main/launch.ts @@ -5,17 +5,16 @@ 'use strict'; -import { OpenContext } from 'vs/code/common/windows'; import { IWindowsMainService } from 'vs/code/electron-main/windows'; -import { VSCodeWindow } from 'vs/code/electron-main/window'; import { TPromise } from 'vs/base/common/winjs.base'; import { IChannel } from 'vs/base/parts/ipc/common/ipc'; -import { ILogService } from 'vs/code/common/log'; +import { ILogService } from 'vs/platform/log/common/log'; import { IURLService } from 'vs/platform/url/common/url'; import { IProcessEnvironment } from 'vs/base/common/platform'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { once } from 'vs/base/common/event'; +import { ICodeWindow, OpenContext } from "vs/platform/windows/common/windows"; export const ID = 'launchService'; export const ILaunchService = createDecorator(ID); @@ -94,7 +93,7 @@ export class LaunchService implements ILaunchService { // Otherwise handle in windows service const context = !!userEnv['VSCODE_CLI'] ? OpenContext.CLI : OpenContext.DESKTOP; - let usedWindows: VSCodeWindow[]; + let usedWindows: ICodeWindow[]; if (!!args.extensionDevelopmentPath) { this.windowsService.openExtensionDevelopmentHostWindow({ context, cli: args, userEnv }); } else if (args._.length === 0 && (args['new-window'] || args['unity-launch'])) { diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts index 41bb32a7c013d..4b76c411f8f28 100644 --- a/src/vs/code/electron-main/main.ts +++ b/src/vs/code/electron-main/main.ts @@ -11,7 +11,7 @@ import * as platform from 'vs/base/common/platform'; import { parseMainProcessArgv } from 'vs/platform/environment/node/argv'; import { mkdirp } from 'vs/base/node/pfs'; import { validatePaths } from 'vs/code/node/paths'; -import { LifecycleService, ILifecycleService } from 'vs/code/electron-main/lifecycle'; +import { LifecycleService, ILifecycleService } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; import { Server, serve, connect } from 'vs/base/parts/ipc/node/ipc.net'; import { TPromise } from 'vs/base/common/winjs.base'; import { ILaunchChannel, LaunchChannelClient } from './launch'; @@ -19,8 +19,8 @@ import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiati import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; -import { ILogService, MainLogService } from 'vs/code/common/log'; -import { IStorageService, StorageService } from 'vs/code/node/storage'; +import { ILogService, MainLogService } from 'vs/platform/log/common/log'; +import { IStorageService, StorageService } from 'vs/platform/storage/node/storage'; import { IBackupMainService } from 'vs/platform/backup/common/backup'; import { BackupMainService } from 'vs/platform/backup/electron-main/backupMainService'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index f267b3263725f..559b253ff5548 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -10,11 +10,11 @@ import { isMacintosh, isLinux, isWindows, language } from 'vs/base/common/platfo import * as arrays from 'vs/base/common/arrays'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ipcMain as ipc, app, shell, dialog, Menu, MenuItem, BrowserWindow } from 'electron'; -import { OpenContext } from 'vs/code/common/windows'; +import { OpenContext } from "vs/platform/windows/common/windows"; import { IWindowsMainService } from 'vs/code/electron-main/windows'; import { VSCodeWindow } from 'vs/code/electron-main/window'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IStorageService } from 'vs/code/node/storage'; +import { IStorageService } from 'vs/platform/storage/node/storage'; import { IFilesConfiguration, AutoSaveConfiguration } from 'vs/platform/files/common/files'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IUpdateService, State as UpdateState } from 'vs/platform/update/common/update'; diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 58f27e2a355aa..c4dfa4046ece7 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -9,20 +9,21 @@ import * as path from 'path'; import * as objects from 'vs/base/common/objects'; import { stopProfiling } from 'vs/base/node/profiler'; import nls = require('vs/nls'); -import { IStorageService } from 'vs/code/node/storage'; +import { IStorageService } from 'vs/platform/storage/node/storage'; import { shell, screen, BrowserWindow, systemPreferences, app } from 'electron'; import { TPromise, TValueCallback } from 'vs/base/common/winjs.base'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; -import { ILogService } from 'vs/code/common/log'; +import { ILogService } from 'vs/platform/log/common/log'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IWorkbenchEditorConfiguration } from 'vs/workbench/common/editor'; import { parseArgs } from 'vs/platform/environment/node/argv'; import product from 'vs/platform/node/product'; import { getCommonHTTPHeaders } from 'vs/platform/environment/node/http'; -import { IWindowSettings, MenuBarVisibility } from 'vs/platform/windows/common/windows'; +import { IWindowSettings, MenuBarVisibility, ICodeWindow, ReadyState, IWindowCloseEvent } from 'vs/platform/windows/common/windows'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { KeyboardLayoutMonitor } from 'vs/code/node/keyboard'; import { IProcessEnvironment, isLinux, isMacintosh, isWindows } from "vs/base/common/platform"; +import CommonEvent, { Emitter } from "vs/base/common/event"; export interface IWindowState { width?: number; @@ -102,30 +103,7 @@ export interface IWindowConfiguration extends ParsedArgs { nodeCachedDataDir: string; } -export enum ReadyState { - - /** - * This window has not loaded any HTML yet - */ - NONE, - - /** - * This window is loading HTML - */ - LOADING, - - /** - * This window is navigating to another HTML - */ - NAVIGATING, - - /** - * This window is done loading HTML - */ - READY -} - -export class VSCodeWindow { +export class VSCodeWindow implements ICodeWindow { public static themeStorageKey = 'theme'; public static themeBackgroundStorageKey = 'themeBackground'; @@ -133,6 +111,7 @@ export class VSCodeWindow { private static MIN_WIDTH = 200; private static MIN_HEIGHT = 120; + private _onClose: Emitter; private options: IWindowCreationOptions; private hiddenTitleBarStyle: boolean; private showTimeoutHandle: any; @@ -167,6 +146,9 @@ export class VSCodeWindow { this.whenReadyCallbacks = []; this.toDispose = []; + this._onClose = new Emitter(); + this.toDispose.push(this._onClose); + // create browser window this.createBrowserWindow(config); @@ -181,6 +163,10 @@ export class VSCodeWindow { this.registerListeners(); } + public get onClose(): CommonEvent { + return this._onClose.event; + } + private createBrowserWindow(config: IWindowCreationOptions): void { // Load window state @@ -374,6 +360,11 @@ export class VSCodeWindow { private registerListeners(): void { + // Re-emit close event + this._win.on('close', e => { + this._onClose.fire(e); + }); + // Remember that we loaded this._win.webContents.on('did-finish-load', () => { this._readyState = ReadyState.LOADING; @@ -861,6 +852,12 @@ export class VSCodeWindow { } } + public close(): void { + if (this._win) { + this._win.close(); + } + } + public sendWhenReady(channel: string, ...args: any[]): void { this.ready().then(() => { this.send(channel, ...args); diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 75b6792e95de5..2fb4b7710945e 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -15,20 +15,19 @@ import { assign, mixin } from 'vs/base/common/objects'; import { IBackupMainService } from 'vs/platform/backup/common/backup'; import { trim } from 'vs/base/common/strings'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; -import { IStorageService } from 'vs/code/node/storage'; +import { IStorageService } from 'vs/platform/storage/node/storage'; import { IPath, VSCodeWindow, IWindowConfiguration, IWindowState as ISingleWindowState, defaultWindowState, WindowMode } from 'vs/code/electron-main/window'; import { ipcMain as ipc, app, screen, BrowserWindow, dialog } from 'electron'; import { IPathWithLineAndColumn, parseLineAndColumnAware } from 'vs/code/node/paths'; -import { ILifecycleService, UnloadReason } from 'vs/code/electron-main/lifecycle'; +import { ILifecycleService, UnloadReason } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { ILogService } from 'vs/code/common/log'; +import { ILogService } from 'vs/platform/log/common/log'; import { getPathLabel } from 'vs/base/common/labels'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; -import { IWindowSettings } from 'vs/platform/windows/common/windows'; +import { IWindowSettings, OpenContext } from 'vs/platform/windows/common/windows'; import { getLastActiveWindow, findBestWindowOrFolder } from 'vs/code/node/windowsUtils'; import CommonEvent, { Emitter } from 'vs/base/common/event'; import product from 'vs/platform/node/product'; -import { OpenContext } from 'vs/code/common/windows'; import { ITelemetryService, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; import { isParent, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; import { KeyboardLayoutMonitor } from 'vs/code/node/keyboard'; @@ -253,7 +252,7 @@ export class WindowsManager implements IWindowsMainService { }); // Update our windows state before quitting and before closing windows - this.lifecycleService.onBeforeWindowClose(win => this.onBeforeWindowClose(win)); + this.lifecycleService.onBeforeWindowClose(win => this.onBeforeWindowClose(win as VSCodeWindow)); this.lifecycleService.onBeforeQuit(() => this.onBeforeQuit()); // Keyboard layout changes diff --git a/src/vs/code/node/windowsUtils.ts b/src/vs/code/node/windowsUtils.ts index a46c1d96168a4..2f8407e0a4ebf 100644 --- a/src/vs/code/node/windowsUtils.ts +++ b/src/vs/code/node/windowsUtils.ts @@ -9,7 +9,7 @@ import * as path from 'path'; import * as fs from 'fs'; import * as platform from 'vs/base/common/platform'; import * as paths from 'vs/base/common/paths'; -import { OpenContext } from 'vs/code/common/windows'; +import { OpenContext } from "vs/platform/windows/common/windows"; import { isEqualOrParent } from 'vs/platform/files/common/files'; /** diff --git a/src/vs/code/test/node/windowsUtils.test.ts b/src/vs/code/test/node/windowsUtils.test.ts index 42649abda76c9..e8472fd9ae9c2 100644 --- a/src/vs/code/test/node/windowsUtils.test.ts +++ b/src/vs/code/test/node/windowsUtils.test.ts @@ -7,7 +7,7 @@ import assert = require('assert'); import path = require('path'); import { findBestWindowOrFolder, ISimpleWindow, IBestWindowOrFolderOptions } from 'vs/code/node/windowsUtils'; -import { OpenContext } from 'vs/code/common/windows'; +import { OpenContext } from "vs/platform/windows/common/windows"; const fixturesFolder = require.toUrl('./fixtures'); diff --git a/src/vs/code/electron-main/lifecycle.ts b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts similarity index 85% rename from src/vs/code/electron-main/lifecycle.ts rename to src/vs/platform/lifecycle/electron-main/lifecycleMain.ts index fbeb9a8547227..2dc0242f8cf79 100644 --- a/src/vs/code/electron-main/lifecycle.ts +++ b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts @@ -7,12 +7,12 @@ import { ipcMain as ipc, app } from 'electron'; import { TPromise, TValueCallback } from 'vs/base/common/winjs.base'; -import { ReadyState, VSCodeWindow } from 'vs/code/electron-main/window'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { ILogService } from 'vs/code/common/log'; -import { IStorageService } from 'vs/code/node/storage'; +import { ILogService } from 'vs/platform/log/common/log'; +import { IStorageService } from 'vs/platform/storage/node/storage'; import Event, { Emitter } from 'vs/base/common/event'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { ICodeWindow, ReadyState } from "vs/platform/windows/common/windows"; export const ILifecycleService = createDecorator('lifecycleService'); @@ -43,12 +43,12 @@ export interface ILifecycleService { * is called even when the window prevents the closing. We want an event that truly fires * before the window gets closed for real. */ - onBeforeWindowClose: Event; + onBeforeWindowClose: Event; ready(): void; - registerWindow(vscodeWindow: VSCodeWindow): void; + registerWindow(codeWindow: ICodeWindow): void; - unload(vscodeWindow: VSCodeWindow, reason: UnloadReason): TPromise; + unload(codeWindow: ICodeWindow, reason: UnloadReason): TPromise; relaunch(options?: { addArgs?: string[], removeArgs?: string[] }); @@ -74,8 +74,8 @@ export class LifecycleService implements ILifecycleService { private _onBeforeQuit = new Emitter(); onBeforeQuit: Event = this._onBeforeQuit.event; - private _onBeforeWindowClose = new Emitter(); - onBeforeWindowClose: Event = this._onBeforeWindowClose.event; + private _onBeforeWindowClose = new Emitter(); + onBeforeWindowClose: Event = this._onBeforeWindowClose.event; constructor( @IEnvironmentService private environmentService: IEnvironmentService, @@ -132,11 +132,11 @@ export class LifecycleService implements ILifecycleService { }); } - public registerWindow(vscodeWindow: VSCodeWindow): void { + public registerWindow(codeWindow: ICodeWindow): void { // Window Before Closing: Main -> Renderer - vscodeWindow.win.on('close', (e) => { - const windowId = vscodeWindow.id; + codeWindow.onClose(e => { + const windowId = codeWindow.id; this.logService.log('Lifecycle#window-before-close', windowId); // The window already acknowledged to be closed @@ -150,11 +150,11 @@ export class LifecycleService implements ILifecycleService { // Otherwise prevent unload and handle it from window e.preventDefault(); - this.unload(vscodeWindow, UnloadReason.CLOSE).done(veto => { + this.unload(codeWindow, UnloadReason.CLOSE).done(veto => { if (!veto) { this.windowToCloseRequest[windowId] = true; - this._onBeforeWindowClose.fire(vscodeWindow); - vscodeWindow.win.close(); + this._onBeforeWindowClose.fire(codeWindow); + codeWindow.close(); } else { this.quitRequested = false; delete this.windowToCloseRequest[windowId]; @@ -163,14 +163,14 @@ export class LifecycleService implements ILifecycleService { }); } - public unload(vscodeWindow: VSCodeWindow, reason: UnloadReason): TPromise { + public unload(codeWindow: ICodeWindow, reason: UnloadReason): TPromise { // Always allow to unload a window that is not yet ready - if (vscodeWindow.readyState !== ReadyState.READY) { + if (codeWindow.readyState !== ReadyState.READY) { return TPromise.as(false); } - this.logService.log('Lifecycle#unload()', vscodeWindow.id); + this.logService.log('Lifecycle#unload()', codeWindow.id); return new TPromise((c) => { const oneTimeEventToken = this.oneTimeListenerTokenGenerator++; @@ -193,7 +193,7 @@ export class LifecycleService implements ILifecycleService { c(true); // veto }); - vscodeWindow.send('vscode:beforeUnload', { okChannel, cancelChannel, reason: this.quitRequested ? UnloadReason.QUIT : reason }); + codeWindow.send('vscode:beforeUnload', { okChannel, cancelChannel, reason: this.quitRequested ? UnloadReason.QUIT : reason }); }); } diff --git a/src/vs/code/common/log.ts b/src/vs/platform/log/common/log.ts similarity index 100% rename from src/vs/code/common/log.ts rename to src/vs/platform/log/common/log.ts diff --git a/src/vs/code/node/storage.ts b/src/vs/platform/storage/node/storage.ts similarity index 100% rename from src/vs/code/node/storage.ts rename to src/vs/platform/storage/node/storage.ts diff --git a/src/vs/platform/update/electron-main/updateService.ts b/src/vs/platform/update/electron-main/updateService.ts index 4db56de6d6427..9a106da371812 100644 --- a/src/vs/platform/update/electron-main/updateService.ts +++ b/src/vs/platform/update/electron-main/updateService.ts @@ -16,7 +16,7 @@ import { fromEventEmitter } from 'vs/base/node/event'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { Win32AutoUpdaterImpl } from './auto-updater.win32'; import { LinuxAutoUpdaterImpl } from './auto-updater.linux'; -import { ILifecycleService } from 'vs/code/electron-main/lifecycle'; +import { ILifecycleService } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; import { IRequestService } from 'vs/platform/request/node/request'; import product from 'vs/platform/node/product'; import { TPromise } from 'vs/base/common/winjs.base'; diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index b85f0b15315fd..3ca41ea3f3b1f 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -108,3 +108,61 @@ export interface IWindowSettings { nativeTabs: boolean; enableMenuBarMnemonics: boolean; } + +export interface IWindowCloseEvent { + preventDefault: Function; +} + +export interface ICodeWindow { + id: number; + readyState: ReadyState; + + onClose: Event; + + close(): void; + send(channel: string, ...args: any[]): void; +} + +export enum ReadyState { + + /** + * This window has not loaded any HTML yet + */ + NONE, + + /** + * This window is loading HTML + */ + LOADING, + + /** + * This window is navigating to another HTML + */ + NAVIGATING, + + /** + * This window is done loading HTML + */ + READY +} + +export enum OpenContext { + + // opening when running from the command line + CLI, + + // macOS only: opening from the dock (also when opening files to a running instance from desktop) + DOCK, + + // opening from the main application window + MENU, + + // opening from a file or folder dialog + DIALOG, + + // opening from the OS's UI + DESKTOP, + + // opening through the API + API +} \ No newline at end of file diff --git a/src/vs/platform/windows/electron-main/windowsService.ts b/src/vs/platform/windows/electron-main/windowsService.ts index 9d147b623ca07..28d29556f171a 100644 --- a/src/vs/platform/windows/electron-main/windowsService.ts +++ b/src/vs/platform/windows/electron-main/windowsService.ts @@ -9,16 +9,15 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { assign } from 'vs/base/common/objects'; import URI from 'vs/base/common/uri'; -import { IWindowsService } from 'vs/platform/windows/common/windows'; +import { IWindowsService, OpenContext } from 'vs/platform/windows/common/windows'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { shell, crashReporter, app } from 'electron'; import Event, { chain } from 'vs/base/common/event'; import { fromEventEmitter } from 'vs/base/node/event'; import { IURLService } from 'vs/platform/url/common/url'; import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; -import { OpenContext } from 'vs/code/common/windows'; // TODO@Joao: remove this dependency, move all implementation to this class import { IWindowsMainService } from 'vs/code/electron-main/windows'; -import { ILifecycleService } from "vs/code/electron-main/lifecycle"; +import { ILifecycleService } from "vs/platform/lifecycle/electron-main/lifecycleMain"; export interface ISharedProcess { whenReady(): TPromise; From 129ba23f70e31f226b37be639e2088989956b5fe Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 8 Jun 2017 12:26:32 +0200 Subject: [PATCH 1644/2747] vscodeWindow => codeWindow --- src/vs/code/electron-main/menus.ts | 4 +- src/vs/code/electron-main/window.ts | 16 +-- src/vs/code/electron-main/windows.ts | 134 +++++++++--------- src/vs/code/node/windowsUtils.ts | 2 +- .../windows/electron-main/windowsService.ts | 96 ++++++------- 5 files changed, 126 insertions(+), 126 deletions(-) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 559b253ff5548..50f7191988338 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -12,7 +12,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { ipcMain as ipc, app, shell, dialog, Menu, MenuItem, BrowserWindow } from 'electron'; import { OpenContext } from "vs/platform/windows/common/windows"; import { IWindowsMainService } from 'vs/code/electron-main/windows'; -import { VSCodeWindow } from 'vs/code/electron-main/window'; +import { CodeWindow } from 'vs/code/electron-main/window'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IStorageService } from 'vs/platform/storage/node/storage'; import { IFilesConfiguration, AutoSaveConfiguration } from 'vs/platform/files/common/files'; @@ -129,7 +129,7 @@ class KeybindingsResolver { this.windowsService.onWindowReload(() => this.resolveKeybindings()); } - private resolveKeybindings(win: VSCodeWindow = this.windowsService.getLastActiveWindow()): void { + private resolveKeybindings(win: CodeWindow = this.windowsService.getLastActiveWindow()): void { if (this.commandIds.size && win) { const commandIds = []; this.commandIds.forEach(id => commandIds.push(id)); diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index c4dfa4046ece7..09e16223e154c 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -103,7 +103,7 @@ export interface IWindowConfiguration extends ParsedArgs { nodeCachedDataDir: string; } -export class VSCodeWindow implements ICodeWindow { +export class CodeWindow implements ICodeWindow { public static themeStorageKey = 'theme'; public static themeBackgroundStorageKey = 'themeBackground'; @@ -126,7 +126,7 @@ export class VSCodeWindow implements ICodeWindow { private toDispose: IDisposable[]; private representedFilename: string; - private whenReadyCallbacks: TValueCallback[]; + private whenReadyCallbacks: TValueCallback[]; private currentConfig: IWindowConfiguration; private pendingLoadConfig: IWindowConfiguration; @@ -181,8 +181,8 @@ export class VSCodeWindow implements ICodeWindow { x: this.windowState.x, y: this.windowState.y, backgroundColor: this.getBackgroundColor(), - minWidth: VSCodeWindow.MIN_WIDTH, - minHeight: VSCodeWindow.MIN_HEIGHT, + minWidth: CodeWindow.MIN_WIDTH, + minHeight: CodeWindow.MIN_HEIGHT, show: !isFullscreenOrMaximized, title: product.nameLong, webPreferences: { @@ -343,8 +343,8 @@ export class VSCodeWindow implements ICodeWindow { } } - public ready(): TPromise { - return new TPromise((c) => { + public ready(): TPromise { + return new TPromise((c) => { if (this._readyState === ReadyState.READY) { return c(this); } @@ -586,7 +586,7 @@ export class VSCodeWindow implements ICodeWindow { return 'hc-black'; } - const theme = this.storageService.getItem(VSCodeWindow.themeStorageKey, 'vs-dark'); + const theme = this.storageService.getItem(CodeWindow.themeStorageKey, 'vs-dark'); return theme.split(' ')[0]; } @@ -596,7 +596,7 @@ export class VSCodeWindow implements ICodeWindow { return '#000000'; } - const background = this.storageService.getItem(VSCodeWindow.themeBackgroundStorageKey, null); + const background = this.storageService.getItem(CodeWindow.themeBackgroundStorageKey, null); if (!background) { const baseTheme = this.getBaseTheme(); diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 2fb4b7710945e..e31775df66798 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -16,7 +16,7 @@ import { IBackupMainService } from 'vs/platform/backup/common/backup'; import { trim } from 'vs/base/common/strings'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; import { IStorageService } from 'vs/platform/storage/node/storage'; -import { IPath, VSCodeWindow, IWindowConfiguration, IWindowState as ISingleWindowState, defaultWindowState, WindowMode } from 'vs/code/electron-main/window'; +import { IPath, CodeWindow, IWindowConfiguration, IWindowState as ISingleWindowState, defaultWindowState, WindowMode } from 'vs/code/electron-main/window'; import { ipcMain as ipc, app, screen, BrowserWindow, dialog } from 'electron'; import { IPathWithLineAndColumn, parseLineAndColumnAware } from 'vs/code/node/paths'; import { ILifecycleService, UnloadReason } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; @@ -46,7 +46,7 @@ export interface IOpenConfiguration { forceNewWindow?: boolean; forceReuseWindow?: boolean; forceEmpty?: boolean; - windowToUse?: VSCodeWindow; + windowToUse?: CodeWindow; diffMode?: boolean; initialStartup?: boolean; } @@ -76,7 +76,7 @@ interface INativeOpenDialogOptions { pickFiles?: boolean; path?: string; forceNewWindow?: boolean; - window?: VSCodeWindow; + window?: CodeWindow; } const ReopenFoldersSetting = { @@ -91,7 +91,7 @@ export interface IWindowsMainService { _serviceBrand: any; // events - onWindowReady: CommonEvent; + onWindowReady: CommonEvent; onWindowClose: CommonEvent; onWindowReload: CommonEvent; onPathsOpen: CommonEvent; @@ -99,21 +99,21 @@ export interface IWindowsMainService { // methods ready(initialUserEnv: platform.IProcessEnvironment): void; - reload(win: VSCodeWindow, cli?: ParsedArgs): void; - open(openConfig: IOpenConfiguration): VSCodeWindow[]; + reload(win: CodeWindow, cli?: ParsedArgs): void; + open(openConfig: IOpenConfiguration): CodeWindow[]; openExtensionDevelopmentHostWindow(openConfig: IOpenConfiguration): void; openFileFolderPicker(forceNewWindow?: boolean, data?: ITelemetryData): void; - openFilePicker(forceNewWindow?: boolean, path?: string, window?: VSCodeWindow, data?: ITelemetryData): void; - openFolderPicker(forceNewWindow?: boolean, window?: VSCodeWindow, data?: ITelemetryData): void; - focusLastActive(cli: ParsedArgs, context: OpenContext): VSCodeWindow; - getLastActiveWindow(): VSCodeWindow; - findWindow(workspacePath: string, filePath?: string, extensionDevelopmentPath?: string): VSCodeWindow; + openFilePicker(forceNewWindow?: boolean, path?: string, window?: CodeWindow, data?: ITelemetryData): void; + openFolderPicker(forceNewWindow?: boolean, window?: CodeWindow, data?: ITelemetryData): void; + focusLastActive(cli: ParsedArgs, context: OpenContext): CodeWindow; + getLastActiveWindow(): CodeWindow; + findWindow(workspacePath: string, filePath?: string, extensionDevelopmentPath?: string): CodeWindow; openNewWindow(context: OpenContext): void; sendToFocused(channel: string, ...args: any[]): void; sendToAll(channel: string, payload: any, windowIdsToIgnore?: number[]): void; - getFocusedWindow(): VSCodeWindow; - getWindowById(windowId: number): VSCodeWindow; - getWindows(): VSCodeWindow[]; + getFocusedWindow(): CodeWindow; + getWindowById(windowId: number): CodeWindow; + getWindows(): CodeWindow[]; getWindowCount(): number; addToRecentPathsList(paths: { path: string; isFile?: boolean; }[]): void; getRecentPathsList(workspacePath?: string, filesToOpen?: IPath[]): IRecentPathsList; @@ -134,7 +134,7 @@ export class WindowsManager implements IWindowsMainService { private static workingDirPickerStorageKey = 'pickerWorkingDir'; private static windowsStateStorageKey = 'windowsState'; - private static WINDOWS: VSCodeWindow[] = []; + private static WINDOWS: CodeWindow[] = []; private initialUserEnv: platform.IProcessEnvironment; @@ -144,8 +144,8 @@ export class WindowsManager implements IWindowsMainService { private _onRecentPathsChange = new Emitter(); onRecentPathsChange: CommonEvent = this._onRecentPathsChange.event; - private _onWindowReady = new Emitter(); - onWindowReady: CommonEvent = this._onWindowReady.event; + private _onWindowReady = new Emitter(); + onWindowReady: CommonEvent = this._onWindowReady.event; private _onWindowClose = new Emitter(); onWindowClose: CommonEvent = this._onWindowClose.event; @@ -252,7 +252,7 @@ export class WindowsManager implements IWindowsMainService { }); // Update our windows state before quitting and before closing windows - this.lifecycleService.onBeforeWindowClose(win => this.onBeforeWindowClose(win as VSCodeWindow)); + this.lifecycleService.onBeforeWindowClose(win => this.onBeforeWindowClose(win as CodeWindow)); this.lifecycleService.onBeforeQuit(() => this.onBeforeQuit()); // Keyboard layout changes @@ -310,7 +310,7 @@ export class WindowsManager implements IWindowsMainService { } // See note on #onBeforeQuit() for details how these events are flowing - private onBeforeWindowClose(win: VSCodeWindow): void { + private onBeforeWindowClose(win: CodeWindow): void { if (this.lifecycleService.isQuitRequested()) { return; // during quit, many windows close in parallel so let it be handled in the before-quit handler } @@ -345,11 +345,11 @@ export class WindowsManager implements IWindowsMainService { if (event === 'vscode:changeColorTheme' && typeof payload === 'string') { let data = JSON.parse(payload); - this.storageService.setItem(VSCodeWindow.themeStorageKey, data.id); - this.storageService.setItem(VSCodeWindow.themeBackgroundStorageKey, data.background); + this.storageService.setItem(CodeWindow.themeStorageKey, data.id); + this.storageService.setItem(CodeWindow.themeBackgroundStorageKey, data.background); } } - public reload(win: VSCodeWindow, cli?: ParsedArgs): void { + public reload(win: CodeWindow, cli?: ParsedArgs): void { // Only reload when the window has not vetoed this this.lifecycleService.unload(win, UnloadReason.RELOAD).done(veto => { @@ -362,11 +362,11 @@ export class WindowsManager implements IWindowsMainService { }); } - public open(openConfig: IOpenConfiguration): VSCodeWindow[] { + public open(openConfig: IOpenConfiguration): CodeWindow[] { const windowConfig = this.configurationService.getConfiguration('window'); let iPathsToOpen: IPath[]; - const usedWindows: VSCodeWindow[] = []; + const usedWindows: CodeWindow[] = []; // Find paths from provided paths if any if (openConfig.pathsToOpen && openConfig.pathsToOpen.length > 0) { @@ -471,7 +471,7 @@ export class WindowsManager implements IWindowsMainService { filePath: fileToCheck && fileToCheck.filePath, userHome: this.environmentService.userHome }); - if (windowOrFolder instanceof VSCodeWindow) { + if (windowOrFolder instanceof CodeWindow) { windowOrFolder.focus(); const files = { filesToOpen, filesToCreate, filesToDiff }; // copy to object because they get reset shortly after windowOrFolder.ready().then(readyWindow => { @@ -821,19 +821,19 @@ export class WindowsManager implements IWindowsMainService { return [Object.create(null)]; } - private openInBrowserWindow(configuration: IWindowConfiguration, forceNewWindow?: boolean, windowToUse?: VSCodeWindow, emptyWorkspaceBackupFolder?: string): VSCodeWindow { - let vscodeWindow: VSCodeWindow; + private openInBrowserWindow(configuration: IWindowConfiguration, forceNewWindow?: boolean, windowToUse?: CodeWindow, emptyWorkspaceBackupFolder?: string): CodeWindow { + let codeWindow: CodeWindow; if (!forceNewWindow) { - vscodeWindow = windowToUse || this.getLastActiveWindow(); + codeWindow = windowToUse || this.getLastActiveWindow(); - if (vscodeWindow) { - vscodeWindow.focus(); + if (codeWindow) { + codeWindow.focus(); } } // New window - if (!vscodeWindow) { + if (!codeWindow) { const windowConfig = this.configurationService.getConfiguration('window'); const state = this.getNewWindowState(configuration); @@ -852,7 +852,7 @@ export class WindowsManager implements IWindowsMainService { state.mode = WindowMode.Normal; } - vscodeWindow = new VSCodeWindow({ + codeWindow = new CodeWindow({ state, extensionDevelopmentPath: configuration.extensionDevelopmentPath, isExtensionTestHost: !!configuration.extensionTestsPath @@ -863,17 +863,17 @@ export class WindowsManager implements IWindowsMainService { this.storageService ); - WindowsManager.WINDOWS.push(vscodeWindow); + WindowsManager.WINDOWS.push(codeWindow); // Window Events - vscodeWindow.win.webContents.removeAllListeners('devtools-reload-page'); // remove built in listener so we can handle this on our own - vscodeWindow.win.webContents.on('devtools-reload-page', () => this.reload(vscodeWindow)); - vscodeWindow.win.webContents.on('crashed', () => this.onWindowError(vscodeWindow, WindowError.CRASHED)); - vscodeWindow.win.on('unresponsive', () => this.onWindowError(vscodeWindow, WindowError.UNRESPONSIVE)); - vscodeWindow.win.on('closed', () => this.onWindowClosed(vscodeWindow)); + codeWindow.win.webContents.removeAllListeners('devtools-reload-page'); // remove built in listener so we can handle this on our own + codeWindow.win.webContents.on('devtools-reload-page', () => this.reload(codeWindow)); + codeWindow.win.webContents.on('crashed', () => this.onWindowError(codeWindow, WindowError.CRASHED)); + codeWindow.win.on('unresponsive', () => this.onWindowError(codeWindow, WindowError.UNRESPONSIVE)); + codeWindow.win.on('closed', () => this.onWindowClosed(codeWindow)); // Lifecycle - this.lifecycleService.registerWindow(vscodeWindow); + this.lifecycleService.registerWindow(codeWindow); } // Existing window @@ -881,7 +881,7 @@ export class WindowsManager implements IWindowsMainService { // Some configuration things get inherited if the window is being reused and we are // in extension development host mode. These options are all development related. - const currentWindowConfig = vscodeWindow.config; + const currentWindowConfig = codeWindow.config; if (!configuration.extensionDevelopmentPath && currentWindowConfig && !!currentWindowConfig.extensionDevelopmentPath) { configuration.extensionDevelopmentPath = currentWindowConfig.extensionDevelopmentPath; configuration.verbose = currentWindowConfig.verbose; @@ -892,20 +892,20 @@ export class WindowsManager implements IWindowsMainService { } // Only load when the window has not vetoed this - this.lifecycleService.unload(vscodeWindow, UnloadReason.LOAD).done(veto => { + this.lifecycleService.unload(codeWindow, UnloadReason.LOAD).done(veto => { if (!veto) { // Register window for backups if (!configuration.extensionDevelopmentPath) { - this.backupService.registerWindowForBackupsSync(vscodeWindow.id, !configuration.workspacePath, emptyWorkspaceBackupFolder, configuration.workspacePath); + this.backupService.registerWindowForBackupsSync(codeWindow.id, !configuration.workspacePath, emptyWorkspaceBackupFolder, configuration.workspacePath); } // Load it - vscodeWindow.load(configuration); + codeWindow.load(configuration); } }); - return vscodeWindow; + return codeWindow; } private getNewWindowState(configuration: IWindowConfiguration): INewWindowState { @@ -1016,11 +1016,11 @@ export class WindowsManager implements IWindowsMainService { this.doPickAndOpen({ pickFolders: true, pickFiles: true, forceNewWindow }, 'openFileFolder', data); } - public openFilePicker(forceNewWindow?: boolean, path?: string, window?: VSCodeWindow, data?: ITelemetryData): void { + public openFilePicker(forceNewWindow?: boolean, path?: string, window?: CodeWindow, data?: ITelemetryData): void { this.doPickAndOpen({ pickFiles: true, forceNewWindow, path, window }, 'openFile', data); } - public openFolderPicker(forceNewWindow?: boolean, window?: VSCodeWindow, data?: ITelemetryData): void { + public openFolderPicker(forceNewWindow?: boolean, window?: CodeWindow, data?: ITelemetryData): void { this.doPickAndOpen({ pickFolders: true, forceNewWindow, window }, 'openFolder', data); } @@ -1066,7 +1066,7 @@ export class WindowsManager implements IWindowsMainService { }); } - public focusLastActive(cli: ParsedArgs, context: OpenContext): VSCodeWindow { + public focusLastActive(cli: ParsedArgs, context: OpenContext): CodeWindow { const lastActive = this.getLastActiveWindow(); if (lastActive) { lastActive.focus(); @@ -1080,11 +1080,11 @@ export class WindowsManager implements IWindowsMainService { return res && res[0]; } - public getLastActiveWindow(): VSCodeWindow { + public getLastActiveWindow(): CodeWindow { return getLastActiveWindow(WindowsManager.WINDOWS); } - public findWindow(workspacePath: string, filePath?: string, extensionDevelopmentPath?: string): VSCodeWindow { + public findWindow(workspacePath: string, filePath?: string, extensionDevelopmentPath?: string): CodeWindow { if (WindowsManager.WINDOWS.length) { // Sort the last active window to the front of the array of windows to test @@ -1151,7 +1151,7 @@ export class WindowsManager implements IWindowsMainService { }); } - public getFocusedWindow(): VSCodeWindow { + public getFocusedWindow(): CodeWindow { const win = BrowserWindow.getFocusedWindow(); if (win) { return this.getWindowById(win.id); @@ -1160,7 +1160,7 @@ export class WindowsManager implements IWindowsMainService { return null; } - public getWindowById(windowId: number): VSCodeWindow { + public getWindowById(windowId: number): CodeWindow { const res = WindowsManager.WINDOWS.filter(w => w.id === windowId); if (res && res.length === 1) { return res[0]; @@ -1169,7 +1169,7 @@ export class WindowsManager implements IWindowsMainService { return null; } - public getWindows(): VSCodeWindow[] { + public getWindows(): CodeWindow[] { return WindowsManager.WINDOWS; } @@ -1177,12 +1177,12 @@ export class WindowsManager implements IWindowsMainService { return WindowsManager.WINDOWS.length; } - private onWindowError(vscodeWindow: VSCodeWindow, error: WindowError): void { + private onWindowError(codeWindow: CodeWindow, error: WindowError): void { console.error(error === WindowError.CRASHED ? '[VS Code]: render process crashed!' : '[VS Code]: detected unresponsive'); // Unresponsive if (error === WindowError.UNRESPONSIVE) { - dialog.showMessageBox(vscodeWindow.win, { + dialog.showMessageBox(codeWindow.win, { title: product.nameLong, type: 'warning', buttons: [nls.localize('reopen', "Reopen"), nls.localize('wait', "Keep Waiting"), nls.localize('close', "Close")], @@ -1190,22 +1190,22 @@ export class WindowsManager implements IWindowsMainService { detail: nls.localize('appStalledDetail', "You can reopen or close the window or keep waiting."), noLink: true }, result => { - if (!vscodeWindow.win) { + if (!codeWindow.win) { return; // Return early if the window has been going down already } if (result === 0) { - vscodeWindow.reload(); + codeWindow.reload(); } else if (result === 2) { - this.onBeforeWindowClose(vscodeWindow); // 'close' event will not be fired on destroy(), so run it manually - vscodeWindow.win.destroy(); // make sure to destroy the window as it is unresponsive + this.onBeforeWindowClose(codeWindow); // 'close' event will not be fired on destroy(), so run it manually + codeWindow.win.destroy(); // make sure to destroy the window as it is unresponsive } }); } // Crashed else { - dialog.showMessageBox(vscodeWindow.win, { + dialog.showMessageBox(codeWindow.win, { title: product.nameLong, type: 'warning', buttons: [nls.localize('reopen', "Reopen"), nls.localize('close', "Close")], @@ -1213,21 +1213,21 @@ export class WindowsManager implements IWindowsMainService { detail: nls.localize('appCrashedDetail', "We are sorry for the inconvenience! You can reopen the window to continue where you left off."), noLink: true }, result => { - if (!vscodeWindow.win) { + if (!codeWindow.win) { return; // Return early if the window has been going down already } if (result === 0) { - vscodeWindow.reload(); + codeWindow.reload(); } else if (result === 1) { - this.onBeforeWindowClose(vscodeWindow); // 'close' event will not be fired on destroy(), so run it manually - vscodeWindow.win.destroy(); // make sure to destroy the window as it has crashed + this.onBeforeWindowClose(codeWindow); // 'close' event will not be fired on destroy(), so run it manually + codeWindow.win.destroy(); // make sure to destroy the window as it has crashed } }); } } - private onWindowClosed(win: VSCodeWindow): void { + private onWindowClosed(win: CodeWindow): void { // Tell window win.dispose(); @@ -1306,9 +1306,9 @@ export class WindowsManager implements IWindowsMainService { // If the user selected to exit from an extension development host window, do not quit, but just // close the window unless this is the last window that is opened. - const vscodeWindow = this.getFocusedWindow(); - if (vscodeWindow && vscodeWindow.isExtensionDevelopmentHost && this.getWindowCount() > 1) { - vscodeWindow.win.close(); + const codeWindow = this.getFocusedWindow(); + if (codeWindow && codeWindow.isExtensionDevelopmentHost && this.getWindowCount() > 1) { + codeWindow.win.close(); } // Otherwise: normal quit diff --git a/src/vs/code/node/windowsUtils.ts b/src/vs/code/node/windowsUtils.ts index 2f8407e0a4ebf..27e8ae3fd6335 100644 --- a/src/vs/code/node/windowsUtils.ts +++ b/src/vs/code/node/windowsUtils.ts @@ -13,7 +13,7 @@ import { OpenContext } from "vs/platform/windows/common/windows"; import { isEqualOrParent } from 'vs/platform/files/common/files'; /** - * Exported subset of VSCodeWindow for testing. + * Exported subset of CodeWindow for testing. */ export interface ISimpleWindow { openedWorkspacePath: string; diff --git a/src/vs/platform/windows/electron-main/windowsService.ts b/src/vs/platform/windows/electron-main/windowsService.ts index 28d29556f171a..492ae30fdc04a 100644 --- a/src/vs/platform/windows/electron-main/windowsService.ts +++ b/src/vs/platform/windows/electron-main/windowsService.ts @@ -57,38 +57,38 @@ export class WindowsService implements IWindowsService, IDisposable { } openFolderPicker(windowId: number, forceNewWindow?: boolean, data?: ITelemetryData): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); - this.windowsMainService.openFolderPicker(forceNewWindow, vscodeWindow, data); + const codeWindow = this.windowsMainService.getWindowById(windowId); + this.windowsMainService.openFolderPicker(forceNewWindow, codeWindow, data); return TPromise.as(null); } reloadWindow(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - this.windowsMainService.reload(vscodeWindow); + if (codeWindow) { + this.windowsMainService.reload(codeWindow); } return TPromise.as(null); } openDevTools(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - vscodeWindow.win.webContents.openDevTools(); + if (codeWindow) { + codeWindow.win.webContents.openDevTools(); } return TPromise.as(null); } toggleDevTools(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - const contents = vscodeWindow.win.webContents; - if (vscodeWindow.hasHiddenTitleBarStyle() && !vscodeWindow.win.isFullScreen() && !contents.isDevToolsOpened()) { + if (codeWindow) { + const contents = codeWindow.win.webContents; + if (codeWindow.hasHiddenTitleBarStyle() && !codeWindow.win.isFullScreen() && !contents.isDevToolsOpened()) { contents.openDevTools({ mode: 'undocked' }); // due to https://github.com/electron/electron/issues/3647 } else { contents.toggleDevTools(); @@ -99,30 +99,30 @@ export class WindowsService implements IWindowsService, IDisposable { } closeFolder(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - this.windowsMainService.open({ context: OpenContext.API, cli: this.environmentService.args, forceEmpty: true, windowToUse: vscodeWindow, forceReuseWindow: true }); + if (codeWindow) { + this.windowsMainService.open({ context: OpenContext.API, cli: this.environmentService.args, forceEmpty: true, windowToUse: codeWindow, forceReuseWindow: true }); } return TPromise.as(null); } toggleFullScreen(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - vscodeWindow.toggleFullScreen(); + if (codeWindow) { + codeWindow.toggleFullScreen(); } return TPromise.as(null); } setRepresentedFilename(windowId: number, fileName: string): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - vscodeWindow.setRepresentedFilename(fileName); + if (codeWindow) { + codeWindow.setRepresentedFilename(fileName); } return TPromise.as(null); @@ -146,10 +146,10 @@ export class WindowsService implements IWindowsService, IDisposable { } getRecentlyOpen(windowId: number): TPromise<{ files: string[]; folders: string[]; }> { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - const { files, folders } = this.windowsMainService.getRecentPathsList(vscodeWindow.config.workspacePath, vscodeWindow.config.filesToOpen); + if (codeWindow) { + const { files, folders } = this.windowsMainService.getRecentPathsList(codeWindow.config.workspacePath, codeWindow.config.filesToOpen); return TPromise.as({ files, folders }); } @@ -157,70 +157,70 @@ export class WindowsService implements IWindowsService, IDisposable { } focusWindow(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - vscodeWindow.win.focus(); + if (codeWindow) { + codeWindow.win.focus(); } return TPromise.as(null); } isFocused(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - return TPromise.as(vscodeWindow.win.isFocused()); + if (codeWindow) { + return TPromise.as(codeWindow.win.isFocused()); } return TPromise.as(null); } isMaximized(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - return TPromise.as(vscodeWindow.win.isMaximized()); + if (codeWindow) { + return TPromise.as(codeWindow.win.isMaximized()); } return TPromise.as(null); } maximizeWindow(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - vscodeWindow.win.maximize(); + if (codeWindow) { + codeWindow.win.maximize(); } return TPromise.as(null); } unmaximizeWindow(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - vscodeWindow.win.unmaximize(); + if (codeWindow) { + codeWindow.win.unmaximize(); } return TPromise.as(null); } onWindowTitleDoubleClick(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - vscodeWindow.onWindowTitleDoubleClick(); + if (codeWindow) { + codeWindow.onWindowTitleDoubleClick(); } return TPromise.as(null); } setDocumentEdited(windowId: number, flag: boolean): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow && vscodeWindow.win.isDocumentEdited() !== flag) { - vscodeWindow.win.setDocumentEdited(flag); + if (codeWindow && codeWindow.win.isDocumentEdited() !== flag) { + codeWindow.win.setDocumentEdited(flag); } return TPromise.as(null); @@ -241,10 +241,10 @@ export class WindowsService implements IWindowsService, IDisposable { } showWindow(windowId: number): TPromise { - const vscodeWindow = this.windowsMainService.getWindowById(windowId); + const codeWindow = this.windowsMainService.getWindowById(windowId); - if (vscodeWindow) { - vscodeWindow.win.show(); + if (codeWindow) { + codeWindow.win.show(); } return TPromise.as(null); From c2cb4fc173c5b6a48c9c282878b2d64503002f19 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 8 Jun 2017 12:28:22 +0200 Subject: [PATCH 1645/2747] delete unused code --- src/vs/code/common/windows.ts | 37 ------------------- .../electron-browser/sharedProcessMain.ts | 24 +++++++++++- 2 files changed, 23 insertions(+), 38 deletions(-) delete mode 100644 src/vs/code/common/windows.ts diff --git a/src/vs/code/common/windows.ts b/src/vs/code/common/windows.ts deleted file mode 100644 index 9d1610531c7a6..0000000000000 --- a/src/vs/code/common/windows.ts +++ /dev/null @@ -1,37 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import Event from 'vs/base/common/event'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { IWindowsService } from 'vs/platform/windows/common/windows'; - -export interface IWindowEventService { - _serviceBrand: any; - - onNewWindowOpen: Event; - onWindowFocus: Event; -} - -export class ActiveWindowManager implements IDisposable { - private disposables: IDisposable[] = []; - private _activeWindowId: number; - - constructor( @IWindowsService windowsService: IWindowsService) { - windowsService.onWindowOpen(this.setActiveWindow, this, this.disposables); - windowsService.onWindowFocus(this.setActiveWindow, this, this.disposables); - } - - private setActiveWindow(windowId: number) { - this._activeWindowId = windowId; - } - - public get activeClientId(): string { - return `window:${this._activeWindowId}`; - } - - public dispose() { - this.disposables = dispose(this.disposables); - } -} \ No newline at end of file diff --git a/src/vs/code/electron-browser/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcessMain.ts index 0d2d3221490ef..adaeba1139717 100644 --- a/src/vs/code/electron-browser/sharedProcessMain.ts +++ b/src/vs/code/electron-browser/sharedProcessMain.ts @@ -32,14 +32,36 @@ import { IChoiceService } from 'vs/platform/message/common/message'; import { ChoiceChannelClient } from 'vs/platform/message/common/messageIpc'; import { IWindowsService } from 'vs/platform/windows/common/windows'; import { WindowsChannelClient } from 'vs/platform/windows/common/windowsIpc'; -import { ActiveWindowManager } from 'vs/code/common/windows'; import { ipcRenderer } from 'electron'; +import { IDisposable, dispose } from "vs/base/common/lifecycle"; interface ISharedProcessInitData { sharedIPCHandle: string; args: ParsedArgs; } +class ActiveWindowManager implements IDisposable { + private disposables: IDisposable[] = []; + private _activeWindowId: number; + + constructor( @IWindowsService windowsService: IWindowsService) { + windowsService.onWindowOpen(this.setActiveWindow, this, this.disposables); + windowsService.onWindowFocus(this.setActiveWindow, this, this.disposables); + } + + private setActiveWindow(windowId: number) { + this._activeWindowId = windowId; + } + + public get activeClientId(): string { + return `window:${this._activeWindowId}`; + } + + public dispose() { + this.disposables = dispose(this.disposables); + } +} + const eventPrefix = 'monacoworkbench'; function main(server: Server, initData: ISharedProcessInitData): void { From 0526234210d285746de1a44944a8507d3266d6d1 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 8 Jun 2017 12:33:04 +0200 Subject: [PATCH 1646/2747] more renames --- src/vs/code/electron-main/app.ts | 6 +++--- src/vs/code/electron-main/main.ts | 4 ++-- src/vs/code/electron-main/menus.ts | 6 +++--- src/vs/code/electron-main/window.ts | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index bfa18af350991..6ebb6c1db958b 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -12,7 +12,7 @@ import { IWindowsService, OpenContext } from 'vs/platform/windows/common/windows import { WindowsChannel } from 'vs/platform/windows/common/windowsIpc'; import { WindowsService } from 'vs/platform/windows/electron-main/windowsService'; import { ILifecycleService } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; -import { VSCodeMenu } from 'vs/code/electron-main/menus'; +import { CodeMenu } from 'vs/code/electron-main/menus'; import { getShellEnvironment } from 'vs/code/node/shellEnv'; import { IUpdateService } from 'vs/platform/update/common/update'; import { UpdateChannel } from 'vs/platform/update/common/updateIpc'; @@ -45,7 +45,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ConfigurationService } from 'vs/platform/configuration/node/configurationService'; import { TPromise } from "vs/base/common/winjs.base"; -export class VSCodeApplication { +export class CodeApplication { private toDispose: IDisposable[]; private windowsMainService: IWindowsMainService; @@ -254,7 +254,7 @@ export class VSCodeApplication { } // Install Menu - appInstantiationService.createInstance(VSCodeMenu); + appInstantiationService.createInstance(CodeMenu); // Jump List this.windowsMainService.updateWindowsJumpList(); diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts index 4b76c411f8f28..ebbaaa2ed463c 100644 --- a/src/vs/code/electron-main/main.ts +++ b/src/vs/code/electron-main/main.ts @@ -32,7 +32,7 @@ import { RequestService } from 'vs/platform/request/electron-main/requestService import { IURLService } from 'vs/platform/url/common/url'; import { URLService } from 'vs/platform/url/electron-main/urlService'; import * as fs from 'original-fs'; -import { VSCodeApplication } from "vs/code/electron-main/app"; +import { CodeApplication } from "vs/code/electron-main/app"; function createServices(args: ParsedArgs): IInstantiationService { const services = new ServiceCollection(); @@ -193,7 +193,7 @@ function main() { return instantiationService.invokeFunction(a => createPaths(a.get(IEnvironmentService))) .then(() => instantiationService.invokeFunction(setupIPC)) .then(mainIpcServer => { - const app = instantiationService.createInstance(VSCodeApplication, mainIpcServer, instanceEnv); + const app = instantiationService.createInstance(CodeApplication, mainIpcServer, instanceEnv); app.startup(); }); }).done(null, err => instantiationService.invokeFunction(quit, err)); diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 50f7191988338..a7b91e3360aa0 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -152,7 +152,7 @@ class KeybindingsResolver { const telemetryFrom = 'menu'; -export class VSCodeMenu { +export class CodeMenu { private static MAX_MENU_RECENT_ENTRIES = 10; @@ -523,7 +523,7 @@ export class VSCodeMenu { if (folders.length > 0) { openRecentMenu.append(__separator__()); - for (let i = 0; i < VSCodeMenu.MAX_MENU_RECENT_ENTRIES && i < folders.length; i++) { + for (let i = 0; i < CodeMenu.MAX_MENU_RECENT_ENTRIES && i < folders.length; i++) { openRecentMenu.append(this.createOpenRecentMenuItem(folders[i], 'openRecentFolder')); } } @@ -532,7 +532,7 @@ export class VSCodeMenu { if (files.length > 0) { openRecentMenu.append(__separator__()); - for (let i = 0; i < VSCodeMenu.MAX_MENU_RECENT_ENTRIES && i < files.length; i++) { + for (let i = 0; i < CodeMenu.MAX_MENU_RECENT_ENTRIES && i < files.length; i++) { openRecentMenu.append(this.createOpenRecentMenuItem(files[i], 'openRecentFile')); } } diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 09e16223e154c..1073d3db12972 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -57,10 +57,10 @@ export const defaultWindowState = function (mode = WindowMode.Normal): IWindowSt export interface IPath { - // the workspace spath for a VSCode instance which can be null + // the workspace spath for a Code instance which can be null workspacePath?: string; - // the file path to open within a VSCode instance + // the file path to open within a Code instance filePath?: string; // the line number in the file path to open @@ -69,7 +69,7 @@ export interface IPath { // the column number in the file path to open columnNumber?: number; - // indicator to create the file path in the VSCode instance + // indicator to create the file path in the Code instance createFilePath?: boolean; } @@ -376,7 +376,7 @@ export class CodeWindow implements ICodeWindow { this.pendingLoadConfig = null; } - // To prevent flashing, we set the window visible after the page has finished to load but before VSCode is loaded + // To prevent flashing, we set the window visible after the page has finished to load but before Code is loaded if (!this._win.isVisible()) { if (this.windowState.mode === WindowMode.Maximized) { this._win.maximize(); From 63cdab315235be34ba13e7eca4033f538ea63f36 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 8 Jun 2017 13:17:17 +0200 Subject: [PATCH 1647/2747] debt - extract IWindowsMainService --- src/vs/code/electron-main/app.ts | 4 +- src/vs/code/electron-main/keyboard.ts | 175 ++++++++++++++++++ src/vs/code/electron-main/launch.ts | 4 +- src/vs/code/electron-main/menus.ts | 107 +---------- src/vs/code/electron-main/window.ts | 69 +------ src/vs/code/electron-main/windows.ts | 68 +------ src/vs/code/node/keyboard.ts | 70 ------- .../lifecycle/electron-main/lifecycleMain.ts | 5 +- src/vs/platform/windows/common/windows.ts | 14 -- .../windows/electron-main/windowsService.ts | 135 +++++++++++++- 10 files changed, 324 insertions(+), 327 deletions(-) create mode 100644 src/vs/code/electron-main/keyboard.ts delete mode 100644 src/vs/code/node/keyboard.ts diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 6ebb6c1db958b..9cc2c21765358 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -7,10 +7,10 @@ import { app, ipcMain as ipc, BrowserWindow } from 'electron'; import * as platform from 'vs/base/common/platform'; -import { IWindowsMainService, WindowsManager } from 'vs/code/electron-main/windows'; +import { WindowsManager } from 'vs/code/electron-main/windows'; import { IWindowsService, OpenContext } from 'vs/platform/windows/common/windows'; import { WindowsChannel } from 'vs/platform/windows/common/windowsIpc'; -import { WindowsService } from 'vs/platform/windows/electron-main/windowsService'; +import { WindowsService, IWindowsMainService } from 'vs/platform/windows/electron-main/windowsService'; import { ILifecycleService } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; import { CodeMenu } from 'vs/code/electron-main/menus'; import { getShellEnvironment } from 'vs/code/node/shellEnv'; diff --git a/src/vs/code/electron-main/keyboard.ts b/src/vs/code/electron-main/keyboard.ts new file mode 100644 index 0000000000000..84608f5507dad --- /dev/null +++ b/src/vs/code/electron-main/keyboard.ts @@ -0,0 +1,175 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as nativeKeymap from 'native-keymap'; +import { IDisposable } from 'vs/base/common/lifecycle'; +import { isMacintosh } from 'vs/base/common/platform'; +import { IStorageService } from 'vs/platform/storage/node/storage'; +import Event, { Emitter, once } from 'vs/base/common/event'; +import { ConfigWatcher } from 'vs/base/node/config'; +import { IUserFriendlyKeybinding } from 'vs/platform/keybinding/common/keybinding'; +import { IEnvironmentService } from "vs/platform/environment/common/environment"; +import { IWindowsMainService } from "vs/platform/windows/electron-main/windowsService"; +import { ipcMain as ipc } from 'electron'; + +export class KeyboardLayoutMonitor { + + public static readonly INSTANCE = new KeyboardLayoutMonitor(); + + private _emitter: Emitter; + private _registered: boolean; + private _isISOKeyboard: boolean; + + private constructor() { + this._emitter = new Emitter(); + this._registered = false; + this._isISOKeyboard = this._readIsISOKeyboard(); + } + + public onDidChangeKeyboardLayout(callback: (isISOKeyboard: boolean) => void): IDisposable { + if (!this._registered) { + this._registered = true; + + nativeKeymap.onDidChangeKeyboardLayout(() => { + this._emitter.fire(this._isISOKeyboard); + }); + + if (isMacintosh) { + // See https://github.com/Microsoft/vscode/issues/24153 + // On OSX, on ISO keyboards, Chromium swaps the scan codes + // of IntlBackslash and Backquote. + // + // The C++ methods can give the current keyboard type (ISO or not) + // only after a NSEvent was handled. + // + // We therefore poll. + setInterval(() => { + let newValue = this._readIsISOKeyboard(); + if (this._isISOKeyboard === newValue) { + // no change + return; + } + + this._isISOKeyboard = newValue; + this._emitter.fire(this._isISOKeyboard); + + }, 3000); + } + } + return this._emitter.event(callback); + } + + private _readIsISOKeyboard(): boolean { + if (isMacintosh) { + return nativeKeymap.isISOKeyboard(); + } + return false; + } + + public isISOKeyboard(): boolean { + return this._isISOKeyboard; + } +} + +export interface IKeybinding { + id: string; + label: string; + isNative: boolean; +} + +export class KeybindingsResolver { + + private static lastKnownKeybindingsMapStorageKey = 'lastKnownKeybindings'; + + private commandIds: Set; + private keybindings: { [commandId: string]: IKeybinding }; + private keybindingsWatcher: ConfigWatcher; + + private _onKeybindingsChanged = new Emitter(); + onKeybindingsChanged: Event = this._onKeybindingsChanged.event; + + constructor( + @IStorageService private storageService: IStorageService, + @IEnvironmentService environmentService: IEnvironmentService, + @IWindowsMainService private windowsService: IWindowsMainService + ) { + this.commandIds = new Set(); + this.keybindings = this.storageService.getItem<{ [id: string]: string; }>(KeybindingsResolver.lastKnownKeybindingsMapStorageKey) || Object.create(null); + this.keybindingsWatcher = new ConfigWatcher(environmentService.appKeybindingsPath, { changeBufferDelay: 100 }); + + this.registerListeners(); + } + + private registerListeners(): void { + + // Resolve keybindings when any first window is loaded + const onceOnWindowReady = once(this.windowsService.onWindowReady); + onceOnWindowReady(win => this.resolveKeybindings(win)); + + // Listen to resolved keybindings from window + ipc.on('vscode:keybindingsResolved', (event, rawKeybindings: string) => { + let keybindings: IKeybinding[] = []; + try { + keybindings = JSON.parse(rawKeybindings); + } catch (error) { + // Should not happen + } + + // Fill hash map of resolved keybindings and check for changes + let keybindingsChanged = false; + let keybindingsCount = 0; + const resolvedKeybindings: { [commandId: string]: IKeybinding } = Object.create(null); + keybindings.forEach(keybinding => { + keybindingsCount++; + + resolvedKeybindings[keybinding.id] = keybinding; + + if (!this.keybindings[keybinding.id] || keybinding.label !== this.keybindings[keybinding.id].label) { + keybindingsChanged = true; + } + }); + + // A keybinding might have been unassigned, so we have to account for that too + if (Object.keys(this.keybindings).length !== keybindingsCount) { + keybindingsChanged = true; + } + + if (keybindingsChanged) { + this.keybindings = resolvedKeybindings; + this.storageService.setItem(KeybindingsResolver.lastKnownKeybindingsMapStorageKey, this.keybindings); // keep to restore instantly after restart + + this._onKeybindingsChanged.fire(); + } + }); + + // Resolve keybindings again when keybindings.json changes + this.keybindingsWatcher.onDidUpdateConfiguration(() => this.resolveKeybindings()); + + // Resolve keybindings when window reloads because an installed extension could have an impact + this.windowsService.onWindowReload(() => this.resolveKeybindings()); + } + + private resolveKeybindings(win = this.windowsService.getLastActiveWindow()): void { + if (this.commandIds.size && win) { + const commandIds = []; + this.commandIds.forEach(id => commandIds.push(id)); + win.sendWhenReady('vscode:resolveKeybindings', JSON.stringify(commandIds)); + } + } + + public getKeybinding(commandId: string): IKeybinding { + if (!commandId) { + return void 0; + } + + if (!this.commandIds.has(commandId)) { + this.commandIds.add(commandId); + } + + return this.keybindings[commandId]; + } +} \ No newline at end of file diff --git a/src/vs/code/electron-main/launch.ts b/src/vs/code/electron-main/launch.ts index 99103a7b5b47f..17c9dd0122374 100644 --- a/src/vs/code/electron-main/launch.ts +++ b/src/vs/code/electron-main/launch.ts @@ -5,7 +5,6 @@ 'use strict'; -import { IWindowsMainService } from 'vs/code/electron-main/windows'; import { TPromise } from 'vs/base/common/winjs.base'; import { IChannel } from 'vs/base/parts/ipc/common/ipc'; import { ILogService } from 'vs/platform/log/common/log'; @@ -14,7 +13,8 @@ import { IProcessEnvironment } from 'vs/base/common/platform'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { once } from 'vs/base/common/event'; -import { ICodeWindow, OpenContext } from "vs/platform/windows/common/windows"; +import { OpenContext } from "vs/platform/windows/common/windows"; +import { IWindowsMainService, ICodeWindow } from "vs/platform/windows/electron-main/windowsService"; export const ID = 'launchService'; export const ILaunchService = createDecorator(ID); diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index a7b91e3360aa0..f4a6e1b79a6ce 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -11,26 +11,16 @@ import * as arrays from 'vs/base/common/arrays'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ipcMain as ipc, app, shell, dialog, Menu, MenuItem, BrowserWindow } from 'electron'; import { OpenContext } from "vs/platform/windows/common/windows"; -import { IWindowsMainService } from 'vs/code/electron-main/windows'; -import { CodeWindow } from 'vs/code/electron-main/window'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IStorageService } from 'vs/platform/storage/node/storage'; import { IFilesConfiguration, AutoSaveConfiguration } from 'vs/platform/files/common/files'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IUpdateService, State as UpdateState } from 'vs/platform/update/common/update'; import product from 'vs/platform/node/product'; import { RunOnceScheduler } from 'vs/base/common/async'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import Event, { Emitter, once } from 'vs/base/common/event'; -import { ConfigWatcher } from 'vs/base/node/config'; -import { IUserFriendlyKeybinding } from 'vs/platform/keybinding/common/keybinding'; import { tildify } from "vs/base/common/labels"; - -interface IKeybinding { - id: string; - label: string; - isNative: boolean; -} +import { IWindowsMainService } from "vs/platform/windows/electron-main/windowsService"; +import { KeybindingsResolver } from "vs/code/electron-main/keyboard"; interface IExtensionViewlet { id: string; @@ -57,99 +47,6 @@ interface IConfiguration extends IFilesConfiguration { }; } -class KeybindingsResolver { - - private static lastKnownKeybindingsMapStorageKey = 'lastKnownKeybindings'; - - private commandIds: Set; - private keybindings: { [commandId: string]: IKeybinding }; - private keybindingsWatcher: ConfigWatcher; - - private _onKeybindingsChanged = new Emitter(); - onKeybindingsChanged: Event = this._onKeybindingsChanged.event; - - constructor( - @IStorageService private storageService: IStorageService, - @IEnvironmentService environmentService: IEnvironmentService, - @IWindowsMainService private windowsService: IWindowsMainService - ) { - this.commandIds = new Set(); - this.keybindings = this.storageService.getItem<{ [id: string]: string; }>(KeybindingsResolver.lastKnownKeybindingsMapStorageKey) || Object.create(null); - this.keybindingsWatcher = new ConfigWatcher(environmentService.appKeybindingsPath, { changeBufferDelay: 100 }); - - this.registerListeners(); - } - - private registerListeners(): void { - - // Resolve keybindings when any first window is loaded - const onceOnWindowReady = once(this.windowsService.onWindowReady); - onceOnWindowReady(win => this.resolveKeybindings(win)); - - // Listen to resolved keybindings from window - ipc.on('vscode:keybindingsResolved', (event, rawKeybindings: string) => { - let keybindings: IKeybinding[] = []; - try { - keybindings = JSON.parse(rawKeybindings); - } catch (error) { - // Should not happen - } - - // Fill hash map of resolved keybindings and check for changes - let keybindingsChanged = false; - let keybindingsCount = 0; - const resolvedKeybindings: { [commandId: string]: IKeybinding } = Object.create(null); - keybindings.forEach(keybinding => { - keybindingsCount++; - - resolvedKeybindings[keybinding.id] = keybinding; - - if (!this.keybindings[keybinding.id] || keybinding.label !== this.keybindings[keybinding.id].label) { - keybindingsChanged = true; - } - }); - - // A keybinding might have been unassigned, so we have to account for that too - if (Object.keys(this.keybindings).length !== keybindingsCount) { - keybindingsChanged = true; - } - - if (keybindingsChanged) { - this.keybindings = resolvedKeybindings; - this.storageService.setItem(KeybindingsResolver.lastKnownKeybindingsMapStorageKey, this.keybindings); // keep to restore instantly after restart - - this._onKeybindingsChanged.fire(); - } - }); - - // Resolve keybindings again when keybindings.json changes - this.keybindingsWatcher.onDidUpdateConfiguration(() => this.resolveKeybindings()); - - // Resolve keybindings when window reloads because an installed extension could have an impact - this.windowsService.onWindowReload(() => this.resolveKeybindings()); - } - - private resolveKeybindings(win: CodeWindow = this.windowsService.getLastActiveWindow()): void { - if (this.commandIds.size && win) { - const commandIds = []; - this.commandIds.forEach(id => commandIds.push(id)); - win.sendWhenReady('vscode:resolveKeybindings', JSON.stringify(commandIds)); - } - } - - public getKeybinding(commandId: string): IKeybinding { - if (!commandId) { - return void 0; - } - - if (!this.commandIds.has(commandId)) { - this.commandIds.add(commandId); - } - - return this.keybindings[commandId]; - } -} - const telemetryFrom = 'menu'; export class CodeMenu { diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 1073d3db12972..dc0979736d68a 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -19,11 +19,11 @@ import { IWorkbenchEditorConfiguration } from 'vs/workbench/common/editor'; import { parseArgs } from 'vs/platform/environment/node/argv'; import product from 'vs/platform/node/product'; import { getCommonHTTPHeaders } from 'vs/platform/environment/node/http'; -import { IWindowSettings, MenuBarVisibility, ICodeWindow, ReadyState, IWindowCloseEvent } from 'vs/platform/windows/common/windows'; +import { IWindowSettings, MenuBarVisibility, ReadyState } from 'vs/platform/windows/common/windows'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { KeyboardLayoutMonitor } from 'vs/code/node/keyboard'; -import { IProcessEnvironment, isLinux, isMacintosh, isWindows } from "vs/base/common/platform"; -import CommonEvent, { Emitter } from "vs/base/common/event"; +import { KeyboardLayoutMonitor } from 'vs/code/electron-main/keyboard'; +import { isLinux, isMacintosh, isWindows } from "vs/base/common/platform"; +import { ICodeWindow, IWindowConfiguration } from "vs/platform/windows/electron-main/windowsService"; export interface IWindowState { width?: number; @@ -55,54 +55,6 @@ export const defaultWindowState = function (mode = WindowMode.Normal): IWindowSt }; }; -export interface IPath { - - // the workspace spath for a Code instance which can be null - workspacePath?: string; - - // the file path to open within a Code instance - filePath?: string; - - // the line number in the file path to open - lineNumber?: number; - - // the column number in the file path to open - columnNumber?: number; - - // indicator to create the file path in the Code instance - createFilePath?: boolean; -} - -export interface IWindowConfiguration extends ParsedArgs { - appRoot: string; - execPath: string; - - userEnv: IProcessEnvironment; - - isISOKeyboard?: boolean; - - zoomLevel?: number; - fullscreen?: boolean; - highContrast?: boolean; - baseTheme?: string; - backgroundColor?: string; - accessibilitySupport?: boolean; - - isInitialStartup?: boolean; - - perfStartTime?: number; - perfAppReady?: number; - perfWindowLoadTime?: number; - - workspacePath?: string; - - filesToOpen?: IPath[]; - filesToCreate?: IPath[]; - filesToDiff?: IPath[]; - - nodeCachedDataDir: string; -} - export class CodeWindow implements ICodeWindow { public static themeStorageKey = 'theme'; @@ -111,7 +63,6 @@ export class CodeWindow implements ICodeWindow { private static MIN_WIDTH = 200; private static MIN_HEIGHT = 120; - private _onClose: Emitter; private options: IWindowCreationOptions; private hiddenTitleBarStyle: boolean; private showTimeoutHandle: any; @@ -146,9 +97,6 @@ export class CodeWindow implements ICodeWindow { this.whenReadyCallbacks = []; this.toDispose = []; - this._onClose = new Emitter(); - this.toDispose.push(this._onClose); - // create browser window this.createBrowserWindow(config); @@ -163,10 +111,6 @@ export class CodeWindow implements ICodeWindow { this.registerListeners(); } - public get onClose(): CommonEvent { - return this._onClose.event; - } - private createBrowserWindow(config: IWindowCreationOptions): void { // Load window state @@ -360,11 +304,6 @@ export class CodeWindow implements ICodeWindow { private registerListeners(): void { - // Re-emit close event - this._win.on('close', e => { - this._onClose.fire(e); - }); - // Remember that we loaded this._win.webContents.on('did-finish-load', () => { this._readyState = ReadyState.LOADING; diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index e31775df66798..58ad622a738bd 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -16,41 +16,27 @@ import { IBackupMainService } from 'vs/platform/backup/common/backup'; import { trim } from 'vs/base/common/strings'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; import { IStorageService } from 'vs/platform/storage/node/storage'; -import { IPath, CodeWindow, IWindowConfiguration, IWindowState as ISingleWindowState, defaultWindowState, WindowMode } from 'vs/code/electron-main/window'; +import { CodeWindow, IWindowState as ISingleWindowState, defaultWindowState, WindowMode } from 'vs/code/electron-main/window'; import { ipcMain as ipc, app, screen, BrowserWindow, dialog } from 'electron'; import { IPathWithLineAndColumn, parseLineAndColumnAware } from 'vs/code/node/paths'; import { ILifecycleService, UnloadReason } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ILogService } from 'vs/platform/log/common/log'; import { getPathLabel } from 'vs/base/common/labels'; -import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IWindowSettings, OpenContext } from 'vs/platform/windows/common/windows'; import { getLastActiveWindow, findBestWindowOrFolder } from 'vs/code/node/windowsUtils'; import CommonEvent, { Emitter } from 'vs/base/common/event'; import product from 'vs/platform/node/product'; import { ITelemetryService, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; import { isParent, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; -import { KeyboardLayoutMonitor } from 'vs/code/node/keyboard'; +import { KeyboardLayoutMonitor } from 'vs/code/electron-main/keyboard'; +import { IPath, IWindowsMainService, IOpenConfiguration, IRecentPathsList, IWindowConfiguration } from "vs/platform/windows/electron-main/windowsService"; enum WindowError { UNRESPONSIVE, CRASHED } -export interface IOpenConfiguration { - context: OpenContext; - cli: ParsedArgs; - userEnv?: platform.IProcessEnvironment; - pathsToOpen?: string[]; - preferNewWindow?: boolean; - forceNewWindow?: boolean; - forceReuseWindow?: boolean; - forceEmpty?: boolean; - windowToUse?: CodeWindow; - diffMode?: boolean; - initialStartup?: boolean; -} - interface INewWindowState extends ISingleWindowState { hasDefaultState?: boolean; } @@ -66,11 +52,6 @@ interface IWindowsState { openedFolders: IWindowState[]; } -export interface IRecentPathsList { - folders: string[]; - files: string[]; -} - interface INativeOpenDialogOptions { pickFolders?: boolean; pickFiles?: boolean; @@ -85,45 +66,6 @@ const ReopenFoldersSetting = { NONE: 'none' }; -export const IWindowsMainService = createDecorator('windowsMainService'); - -export interface IWindowsMainService { - _serviceBrand: any; - - // events - onWindowReady: CommonEvent; - onWindowClose: CommonEvent; - onWindowReload: CommonEvent; - onPathsOpen: CommonEvent; - onRecentPathsChange: CommonEvent; - - // methods - ready(initialUserEnv: platform.IProcessEnvironment): void; - reload(win: CodeWindow, cli?: ParsedArgs): void; - open(openConfig: IOpenConfiguration): CodeWindow[]; - openExtensionDevelopmentHostWindow(openConfig: IOpenConfiguration): void; - openFileFolderPicker(forceNewWindow?: boolean, data?: ITelemetryData): void; - openFilePicker(forceNewWindow?: boolean, path?: string, window?: CodeWindow, data?: ITelemetryData): void; - openFolderPicker(forceNewWindow?: boolean, window?: CodeWindow, data?: ITelemetryData): void; - focusLastActive(cli: ParsedArgs, context: OpenContext): CodeWindow; - getLastActiveWindow(): CodeWindow; - findWindow(workspacePath: string, filePath?: string, extensionDevelopmentPath?: string): CodeWindow; - openNewWindow(context: OpenContext): void; - sendToFocused(channel: string, ...args: any[]): void; - sendToAll(channel: string, payload: any, windowIdsToIgnore?: number[]): void; - getFocusedWindow(): CodeWindow; - getWindowById(windowId: number): CodeWindow; - getWindows(): CodeWindow[]; - getWindowCount(): number; - addToRecentPathsList(paths: { path: string; isFile?: boolean; }[]): void; - getRecentPathsList(workspacePath?: string, filesToOpen?: IPath[]): IRecentPathsList; - removeFromRecentPathsList(path: string): void; - removeFromRecentPathsList(paths: string[]): void; - clearRecentPathsList(): void; - updateWindowsJumpList(): void; - quit(): void; -} - export class WindowsManager implements IWindowsMainService { _serviceBrand: any; @@ -527,7 +469,7 @@ export class WindowsManager implements IWindowsMainService { } const configuration = this.toConfiguration(openConfig, folderToOpen, filesToOpen, filesToCreate, filesToDiff); - const browserWindow = this.openInBrowserWindow(configuration, openFolderInNewWindow, openFolderInNewWindow ? void 0 : openConfig.windowToUse); + const browserWindow = this.openInBrowserWindow(configuration, openFolderInNewWindow, openFolderInNewWindow ? void 0 : openConfig.windowToUse as CodeWindow); usedWindows.push(browserWindow); // Reset these because we handled them @@ -559,7 +501,7 @@ export class WindowsManager implements IWindowsMainService { else if (emptyToOpen.length > 0) { emptyToOpen.forEach(() => { const configuration = this.toConfiguration(openConfig); - const browserWindow = this.openInBrowserWindow(configuration, openFolderInNewWindow, openFolderInNewWindow ? void 0 : openConfig.windowToUse); + const browserWindow = this.openInBrowserWindow(configuration, openFolderInNewWindow, openFolderInNewWindow ? void 0 : openConfig.windowToUse as CodeWindow); usedWindows.push(browserWindow); openFolderInNewWindow = true; // any other folders to open must open in new window then diff --git a/src/vs/code/node/keyboard.ts b/src/vs/code/node/keyboard.ts deleted file mode 100644 index 16979fc90c0a8..0000000000000 --- a/src/vs/code/node/keyboard.ts +++ /dev/null @@ -1,70 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import * as nativeKeymap from 'native-keymap'; -import { IDisposable } from 'vs/base/common/lifecycle'; -import { isMacintosh } from 'vs/base/common/platform'; -import { Emitter } from 'vs/base/common/event'; - -export class KeyboardLayoutMonitor { - - public static readonly INSTANCE = new KeyboardLayoutMonitor(); - - private _emitter: Emitter; - private _registered: boolean; - private _isISOKeyboard: boolean; - - private constructor() { - this._emitter = new Emitter(); - this._registered = false; - this._isISOKeyboard = this._readIsISOKeyboard(); - } - - public onDidChangeKeyboardLayout(callback: (isISOKeyboard: boolean) => void): IDisposable { - if (!this._registered) { - this._registered = true; - - nativeKeymap.onDidChangeKeyboardLayout(() => { - this._emitter.fire(this._isISOKeyboard); - }); - - if (isMacintosh) { - // See https://github.com/Microsoft/vscode/issues/24153 - // On OSX, on ISO keyboards, Chromium swaps the scan codes - // of IntlBackslash and Backquote. - // - // The C++ methods can give the current keyboard type (ISO or not) - // only after a NSEvent was handled. - // - // We therefore poll. - setInterval(() => { - let newValue = this._readIsISOKeyboard(); - if (this._isISOKeyboard === newValue) { - // no change - return; - } - - this._isISOKeyboard = newValue; - this._emitter.fire(this._isISOKeyboard); - - }, 3000); - } - } - return this._emitter.event(callback); - } - - private _readIsISOKeyboard(): boolean { - if (isMacintosh) { - return nativeKeymap.isISOKeyboard(); - } - return false; - } - - public isISOKeyboard(): boolean { - return this._isISOKeyboard; - } -} diff --git a/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts index 2dc0242f8cf79..8c65a896d3d00 100644 --- a/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts +++ b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts @@ -12,7 +12,8 @@ import { ILogService } from 'vs/platform/log/common/log'; import { IStorageService } from 'vs/platform/storage/node/storage'; import Event, { Emitter } from 'vs/base/common/event'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; -import { ICodeWindow, ReadyState } from "vs/platform/windows/common/windows"; +import { ReadyState } from "vs/platform/windows/common/windows"; +import { ICodeWindow } from "vs/platform/windows/electron-main/windowsService"; export const ILifecycleService = createDecorator('lifecycleService'); @@ -135,7 +136,7 @@ export class LifecycleService implements ILifecycleService { public registerWindow(codeWindow: ICodeWindow): void { // Window Before Closing: Main -> Renderer - codeWindow.onClose(e => { + codeWindow.win.on('close', e => { const windowId = codeWindow.id; this.logService.log('Lifecycle#window-before-close', windowId); diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index 3ca41ea3f3b1f..844ce3a9aa0e4 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -109,20 +109,6 @@ export interface IWindowSettings { enableMenuBarMnemonics: boolean; } -export interface IWindowCloseEvent { - preventDefault: Function; -} - -export interface ICodeWindow { - id: number; - readyState: ReadyState; - - onClose: Event; - - close(): void; - send(channel: string, ...args: any[]): void; -} - export enum ReadyState { /** diff --git a/src/vs/platform/windows/electron-main/windowsService.ts b/src/vs/platform/windows/electron-main/windowsService.ts index 492ae30fdc04a..4850b5a9a22ba 100644 --- a/src/vs/platform/windows/electron-main/windowsService.ts +++ b/src/vs/platform/windows/electron-main/windowsService.ts @@ -9,21 +9,148 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { assign } from 'vs/base/common/objects'; import URI from 'vs/base/common/uri'; -import { IWindowsService, OpenContext } from 'vs/platform/windows/common/windows'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { IWindowsService, OpenContext, ReadyState } from 'vs/platform/windows/common/windows'; +import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; import { shell, crashReporter, app } from 'electron'; import Event, { chain } from 'vs/base/common/event'; import { fromEventEmitter } from 'vs/base/node/event'; import { IURLService } from 'vs/platform/url/common/url'; import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; -import { IWindowsMainService } from 'vs/code/electron-main/windows'; import { ILifecycleService } from "vs/platform/lifecycle/electron-main/lifecycleMain"; +import { createDecorator } from "vs/platform/instantiation/common/instantiation"; +import { IProcessEnvironment } from "vs/base/common/platform"; + +export interface ICodeWindow { + id: number; + win: Electron.BrowserWindow; + config: IWindowConfiguration; + openedWorkspacePath: string; + + readyState: ReadyState; + + close(): void; + + send(channel: string, ...args: any[]): void; + sendWhenReady(channel: string, ...args: any[]): void; + + toggleFullScreen(): void; + hasHiddenTitleBarStyle(): boolean; + setRepresentedFilename(name: string): void; + getRepresentedFilename(): string; + onWindowTitleDoubleClick(): void; +} + +export interface IWindowConfiguration extends ParsedArgs { + appRoot: string; + execPath: string; + + userEnv: IProcessEnvironment; + + isISOKeyboard?: boolean; + + zoomLevel?: number; + fullscreen?: boolean; + highContrast?: boolean; + baseTheme?: string; + backgroundColor?: string; + accessibilitySupport?: boolean; + + isInitialStartup?: boolean; + + perfStartTime?: number; + perfAppReady?: number; + perfWindowLoadTime?: number; + + workspacePath?: string; + + filesToOpen?: IPath[]; + filesToCreate?: IPath[]; + filesToDiff?: IPath[]; + + nodeCachedDataDir: string; +} export interface ISharedProcess { whenReady(): TPromise; toggle(): void; } +export const IWindowsMainService = createDecorator('windowsMainService'); + +export interface IWindowsMainService { + _serviceBrand: any; + + // events + onWindowReady: Event; + onWindowClose: Event; + onWindowReload: Event; + onPathsOpen: Event; + onRecentPathsChange: Event; + + // methods + ready(initialUserEnv: IProcessEnvironment): void; + reload(win: ICodeWindow, cli?: ParsedArgs): void; + open(openConfig: IOpenConfiguration): ICodeWindow[]; + openExtensionDevelopmentHostWindow(openConfig: IOpenConfiguration): void; + openFileFolderPicker(forceNewWindow?: boolean, data?: ITelemetryData): void; + openFilePicker(forceNewWindow?: boolean, path?: string, window?: ICodeWindow, data?: ITelemetryData): void; + openFolderPicker(forceNewWindow?: boolean, window?: ICodeWindow, data?: ITelemetryData): void; + focusLastActive(cli: ParsedArgs, context: OpenContext): ICodeWindow; + getLastActiveWindow(): ICodeWindow; + findWindow(workspacePath: string, filePath?: string, extensionDevelopmentPath?: string): ICodeWindow; + openNewWindow(context: OpenContext): void; + sendToFocused(channel: string, ...args: any[]): void; + sendToAll(channel: string, payload: any, windowIdsToIgnore?: number[]): void; + getFocusedWindow(): ICodeWindow; + getWindowById(windowId: number): ICodeWindow; + getWindows(): ICodeWindow[]; + getWindowCount(): number; + addToRecentPathsList(paths: { path: string; isFile?: boolean; }[]): void; + getRecentPathsList(workspacePath?: string, filesToOpen?: IPath[]): IRecentPathsList; + removeFromRecentPathsList(path: string): void; + removeFromRecentPathsList(paths: string[]): void; + clearRecentPathsList(): void; + updateWindowsJumpList(): void; + quit(): void; +} + +export interface IPath { + + // the workspace spath for a Code instance which can be null + workspacePath?: string; + + // the file path to open within a Code instance + filePath?: string; + + // the line number in the file path to open + lineNumber?: number; + + // the column number in the file path to open + columnNumber?: number; + + // indicator to create the file path in the Code instance + createFilePath?: boolean; +} + +export interface IOpenConfiguration { + context: OpenContext; + cli: ParsedArgs; + userEnv?: IProcessEnvironment; + pathsToOpen?: string[]; + preferNewWindow?: boolean; + forceNewWindow?: boolean; + forceReuseWindow?: boolean; + forceEmpty?: boolean; + windowToUse?: ICodeWindow; + diffMode?: boolean; + initialStartup?: boolean; +} + +export interface IRecentPathsList { + folders: string[]; + files: string[]; +} + export class WindowsService implements IWindowsService, IDisposable { _serviceBrand: any; @@ -321,4 +448,4 @@ export class WindowsService implements IWindowsService, IDisposable { dispose(): void { this.disposables = dispose(this.disposables); } -} +} \ No newline at end of file From 0fd62676f3fd3da679b0931b78a614ca52c1135f Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 8 Jun 2017 13:19:04 +0200 Subject: [PATCH 1648/2747] Resolves #27922 --- test/smoke/src/main.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/smoke/src/main.js b/test/smoke/src/main.js index ef6d65112e9f3..feedaf304e16c 100644 --- a/test/smoke/src/main.js +++ b/test/smoke/src/main.js @@ -32,12 +32,13 @@ program.on('--help', () => { program.parse(process.argv); if (!program.latest) { - console.error('You must specify the binary to run the smoke test against'); - process.exit(1); + fail('You must specify the binary to run the smoke test against'); } if (!binaryExists(program.latest) || (program.stable && !binaryExists(program.stable))) { - console.error('The file path to electron binary does not exist or permissions do not allow to execute it. Please check the path provided.'); - process.exit(1); + fail('The file path to electron binary does not exist or permissions do not allow to execute it. Please check the path provided.'); +} +if (parseInt(process.version.substr(1)) < 6) { + fail('Please update your Node version to greater than 6 to run the smoke test.'); } // Setting up environment variables @@ -61,6 +62,10 @@ try { throw new Error('Error caught running the smoke test: ' + e); } +function fail(errorMessage) { + console.error(errorMessage); + process.exit(1); +} function runTests() { console.log('Running tests...') From 61a1d9abdc364b2f46df903cb9e955ec0f0d4114 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 8 Jun 2017 14:43:57 +0200 Subject: [PATCH 1649/2747] more docs about doc change event, #28077 --- src/vs/vscode.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index b0670a90ba71c..90bc45c524b51 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -4417,7 +4417,9 @@ declare module 'vscode' { export const onDidCloseTextDocument: Event; /** - * An event that is emitted when a [text document](#TextDocument) is changed. + * An event that is emitted when a [text document](#TextDocument) is changed. This usually happens + * when the [contents](#TextDocument.getText) changes but also when other things like the + * [dirty](TextDocument#isDirty)-state changes. */ export const onDidChangeTextDocument: Event; From 0117f311aa61d1af3018ee0749702dd5e5691738 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 8 Jun 2017 15:00:32 +0200 Subject: [PATCH 1650/2747] make Placeholder#index a number, fixes #28185 --- .../contrib/snippet/browser/snippetParser.ts | 16 ++++++++-------- .../contrib/snippet/browser/snippetSession.ts | 4 ++-- .../snippet/test/browser/snippetParser.test.ts | 8 ++++++++ .../emmet/electron-browser/editorAccessor.ts | 4 ++-- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/vs/editor/contrib/snippet/browser/snippetParser.ts b/src/vs/editor/contrib/snippet/browser/snippetParser.ts index 6cb1be524c454..956fdce23c5a0 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetParser.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetParser.ts @@ -187,12 +187,12 @@ export class Placeholder extends Marker { } } - constructor(public index: string = '', children: Marker[]) { + constructor(public index: number, children: Marker[]) { super(); this.children = children; } get isFinalTabstop() { - return this.index === '0'; + return this.index === 0; } toString() { return Marker.toString(this.children); @@ -356,7 +356,7 @@ export class SnippetParser { // * fill in default for empty placeHolders // * compact sibling Text markers - function walk(marker: Marker[], placeholderDefaultValues: Map) { + function walk(marker: Marker[], placeholderDefaultValues: Map) { for (let i = 0; i < marker.length; i++) { const thisMarker = marker[i]; @@ -385,16 +385,16 @@ export class SnippetParser { } } - const placeholderDefaultValues = new Map(); + const placeholderDefaultValues = new Map(); walk(marker, placeholderDefaultValues); if ( - !placeholderDefaultValues.has('0') && // there is no final tabstop + !placeholderDefaultValues.has(0) && // there is no final tabstop (insertFinalTabstop && placeholderDefaultValues.size > 0 || enforceFinalTabstop) ) { // the snippet uses placeholders but has no // final tabstop defined -> insert at the end - marker.push(new Placeholder('0', [])); + marker.push(new Placeholder(0, [])); } return marker; @@ -433,7 +433,7 @@ export class SnippetParser { if (this._accept(TokenType.VariableName) || this._accept(TokenType.Int)) { // $FOO, $123 const idOrName = this._scanner.tokenText(this._prevToken); - marker.push(/^\d+$/.test(idOrName) ? new Placeholder(idOrName, []) : new Variable(idOrName, [])); + marker.push(/^\d+$/.test(idOrName) ? new Placeholder(Number(idOrName), []) : new Variable(idOrName, [])); return true; } else if (this._accept(TokenType.CurlyOpen)) { @@ -451,7 +451,7 @@ export class SnippetParser { if (this._accept(TokenType.CurlyClose)) { const idOrName = Marker.toString(name); - marker.push(/^\d+$/.test(idOrName) ? new Placeholder(idOrName, children) : new Variable(idOrName, children)); + marker.push(/^\d+$/.test(idOrName) ? new Placeholder(Number(idOrName), children) : new Variable(idOrName, children)); return true; } diff --git a/src/vs/editor/contrib/snippet/browser/snippetSession.ts b/src/vs/editor/contrib/snippet/browser/snippetSession.ts index 44cfd7cb38827..5f9a49a97e659 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetSession.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetSession.ts @@ -173,9 +173,9 @@ export class OneSnippet { // through the placeholders in the correct order for (const nestedPlaceholder of nested._snippet.placeholders) { if (nestedPlaceholder.isFinalTabstop) { - nestedPlaceholder.index = `${placeholder.index}.${nested._snippet.placeholders.length}`; + nestedPlaceholder.index = placeholder.index + (nested._snippet.placeholders.length / 10); } else { - nestedPlaceholder.index = `${placeholder.index}.${nestedPlaceholder.index}`; + nestedPlaceholder.index = placeholder.index + (nestedPlaceholder.index / 10); } } this._snippet.replace(placeholder, nested._snippet.children); diff --git a/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts b/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts index 874aadd1c5684..e49a98baf396b 100644 --- a/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts +++ b/src/vs/editor/contrib/snippet/test/browser/snippetParser.test.ts @@ -381,4 +381,12 @@ suite('SnippetParser', () => { assert.equal(snippet.text, 'aaabbbdddeee'); assert.equal(snippet.placeholders.length, 3); }); + + test('Snippet order for placeholders, #28185', function () { + + const _10 = new Placeholder(10, []); + const _2 = new Placeholder(2, []); + + assert.equal(Placeholder.compareByIndex(_10, _2), 1); + }); }); diff --git a/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts b/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts index 66d77c525f996..dcc5e5ad74da5 100644 --- a/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts +++ b/src/vs/workbench/parts/emmet/electron-browser/editorAccessor.ts @@ -120,7 +120,7 @@ export class EditorAccessor implements emmet.Editor { // find highest placeholder index walk(marker, candidate => { if (candidate instanceof Placeholder) { - let index = Number(candidate.index); + let index = candidate.index; if (index > maxIndex) { maxIndex = index; } @@ -132,7 +132,7 @@ export class EditorAccessor implements emmet.Editor { walk(marker, candidate => { if (candidate instanceof Placeholder) { if (candidate.isFinalTabstop) { - candidate.index = String(++maxIndex); + candidate.index = ++maxIndex; } } return true; From 4a08a066e1eda96c8cb3a4c2c2792880412c0b16 Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 8 Jun 2017 15:32:15 +0200 Subject: [PATCH 1651/2747] debug: better hc color for focused stack frame fixes #28219 --- .../parts/debug/browser/media/debug.contribution.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/parts/debug/browser/media/debug.contribution.css b/src/vs/workbench/parts/debug/browser/media/debug.contribution.css index efafecc857d8e..aa82f5ccf2a9b 100644 --- a/src/vs/workbench/parts/debug/browser/media/debug.contribution.css +++ b/src/vs/workbench/parts/debug/browser/media/debug.contribution.css @@ -246,6 +246,10 @@ /* High Contrast Theming */ +.monaco-editor.hc-black .debug-focused-stack-frame-line { + background: rgba(206, 231, 206, 1); +} + .hc-black .monaco-workbench .monaco-tree-row:not(.selected) .expression .name { color: inherit; } From 97105c24652d786c4b01106472090604aa7cd639 Mon Sep 17 00:00:00 2001 From: Yu <583181285@qq.com> Date: Thu, 8 Jun 2017 21:34:04 +0800 Subject: [PATCH 1652/2747] spaces in block comment (like line comment) --- src/vs/editor/contrib/comment/common/blockCommentCommand.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/contrib/comment/common/blockCommentCommand.ts b/src/vs/editor/contrib/comment/common/blockCommentCommand.ts index ffceef3758fb4..a8a8e54a1bb7c 100644 --- a/src/vs/editor/contrib/comment/common/blockCommentCommand.ts +++ b/src/vs/editor/contrib/comment/common/blockCommentCommand.ts @@ -97,16 +97,16 @@ export class BlockCommentCommand implements editorCommon.ICommand { if (!Range.isEmpty(r)) { // Insert block comment start - res.push(EditOperation.insert(new Position(r.startLineNumber, r.startColumn), startToken)); + res.push(EditOperation.insert(new Position(r.startLineNumber, r.startColumn), startToken + ' ')); // Insert block comment end - res.push(EditOperation.insert(new Position(r.endLineNumber, r.endColumn), endToken)); + res.push(EditOperation.insert(new Position(r.endLineNumber, r.endColumn), ' ' + endToken)); } else { // Insert both continuously res.push(EditOperation.replace(new Range( r.startLineNumber, r.startColumn, r.endLineNumber, r.endColumn - ), startToken + endToken)); + ), startToken + ' ' + endToken)); } return res; From a1f1d6a57994fde51dadaec66d88252d68ffac99 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 8 Jun 2017 15:38:01 +0200 Subject: [PATCH 1653/2747] main - more shuffling around --- .../electron-browser/sharedProcessMain.ts | 2 +- src/vs/code/electron-main/app.ts | 3 +- src/vs/code/electron-main/keyboard.ts | 4 +- src/vs/code/electron-main/launch.ts | 4 +- src/vs/code/electron-main/menus.ts | 6 +- src/vs/code/electron-main/sharedProcess.ts | 3 +- src/vs/code/electron-main/window.ts | 6 +- src/vs/code/electron-main/windows.ts | 4 +- src/vs/code/node/windowsUtils.ts | 2 +- src/vs/code/test/node/windowsUtils.test.ts | 2 +- .../lifecycle/electron-main/lifecycleMain.ts | 2 +- src/vs/platform/windows/common/windows.ts | 76 ++++++++-- .../platform/windows/electron-main/windows.ts | 97 ++++++++++++ .../windows/electron-main/windowsService.ts | 138 +----------------- 14 files changed, 183 insertions(+), 166 deletions(-) create mode 100644 src/vs/platform/windows/electron-main/windows.ts diff --git a/src/vs/code/electron-browser/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcessMain.ts index adaeba1139717..5388d58ef3419 100644 --- a/src/vs/code/electron-browser/sharedProcessMain.ts +++ b/src/vs/code/electron-browser/sharedProcessMain.ts @@ -33,7 +33,7 @@ import { ChoiceChannelClient } from 'vs/platform/message/common/messageIpc'; import { IWindowsService } from 'vs/platform/windows/common/windows'; import { WindowsChannelClient } from 'vs/platform/windows/common/windowsIpc'; import { ipcRenderer } from 'electron'; -import { IDisposable, dispose } from "vs/base/common/lifecycle"; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; interface ISharedProcessInitData { sharedIPCHandle: string; diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 9cc2c21765358..ac163efc5d215 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -10,7 +10,7 @@ import * as platform from 'vs/base/common/platform'; import { WindowsManager } from 'vs/code/electron-main/windows'; import { IWindowsService, OpenContext } from 'vs/platform/windows/common/windows'; import { WindowsChannel } from 'vs/platform/windows/common/windowsIpc'; -import { WindowsService, IWindowsMainService } from 'vs/platform/windows/electron-main/windowsService'; +import { WindowsService } from 'vs/platform/windows/electron-main/windowsService'; import { ILifecycleService } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; import { CodeMenu } from 'vs/code/electron-main/menus'; import { getShellEnvironment } from 'vs/code/node/shellEnv'; @@ -44,6 +44,7 @@ import pkg from 'vs/platform/node/package'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ConfigurationService } from 'vs/platform/configuration/node/configurationService'; import { TPromise } from "vs/base/common/winjs.base"; +import { IWindowsMainService } from "vs/platform/windows/electron-main/windows"; export class CodeApplication { private toDispose: IDisposable[]; diff --git a/src/vs/code/electron-main/keyboard.ts b/src/vs/code/electron-main/keyboard.ts index 84608f5507dad..34b6a905e9c6b 100644 --- a/src/vs/code/electron-main/keyboard.ts +++ b/src/vs/code/electron-main/keyboard.ts @@ -12,9 +12,9 @@ import { IStorageService } from 'vs/platform/storage/node/storage'; import Event, { Emitter, once } from 'vs/base/common/event'; import { ConfigWatcher } from 'vs/base/node/config'; import { IUserFriendlyKeybinding } from 'vs/platform/keybinding/common/keybinding'; -import { IEnvironmentService } from "vs/platform/environment/common/environment"; -import { IWindowsMainService } from "vs/platform/windows/electron-main/windowsService"; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ipcMain as ipc } from 'electron'; +import { IWindowsMainService } from "vs/platform/windows/electron-main/windows"; export class KeyboardLayoutMonitor { diff --git a/src/vs/code/electron-main/launch.ts b/src/vs/code/electron-main/launch.ts index 17c9dd0122374..b3ad62b18fb65 100644 --- a/src/vs/code/electron-main/launch.ts +++ b/src/vs/code/electron-main/launch.ts @@ -13,8 +13,8 @@ import { IProcessEnvironment } from 'vs/base/common/platform'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { once } from 'vs/base/common/event'; -import { OpenContext } from "vs/platform/windows/common/windows"; -import { IWindowsMainService, ICodeWindow } from "vs/platform/windows/electron-main/windowsService"; +import { OpenContext } from 'vs/platform/windows/common/windows'; +import { IWindowsMainService, ICodeWindow } from "vs/platform/windows/electron-main/windows"; export const ID = 'launchService'; export const ILaunchService = createDecorator(ID); diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index f4a6e1b79a6ce..8cc5443972127 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -10,7 +10,7 @@ import { isMacintosh, isLinux, isWindows, language } from 'vs/base/common/platfo import * as arrays from 'vs/base/common/arrays'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ipcMain as ipc, app, shell, dialog, Menu, MenuItem, BrowserWindow } from 'electron'; -import { OpenContext } from "vs/platform/windows/common/windows"; +import { OpenContext } from 'vs/platform/windows/common/windows'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IFilesConfiguration, AutoSaveConfiguration } from 'vs/platform/files/common/files'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; @@ -18,9 +18,9 @@ import { IUpdateService, State as UpdateState } from 'vs/platform/update/common/ import product from 'vs/platform/node/product'; import { RunOnceScheduler } from 'vs/base/common/async'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; -import { tildify } from "vs/base/common/labels"; -import { IWindowsMainService } from "vs/platform/windows/electron-main/windowsService"; +import { tildify } from 'vs/base/common/labels'; import { KeybindingsResolver } from "vs/code/electron-main/keyboard"; +import { IWindowsMainService } from "vs/platform/windows/electron-main/windows"; interface IExtensionViewlet { id: string; diff --git a/src/vs/code/electron-main/sharedProcess.ts b/src/vs/code/electron-main/sharedProcess.ts index 5004700f7eb3b..eb540858c6df3 100644 --- a/src/vs/code/electron-main/sharedProcess.ts +++ b/src/vs/code/electron-main/sharedProcess.ts @@ -11,8 +11,9 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IProcessEnvironment } from 'vs/base/common/platform'; import { BrowserWindow, ipcMain } from 'electron'; import { PromiseSource } from 'vs/base/common/async'; +import { ISharedProcess } from "vs/platform/windows/electron-main/windows"; -export class SharedProcess { +export class SharedProcess implements ISharedProcess { private spawnPromiseSource: PromiseSource; diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index dc0979736d68a..36e059d804e64 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -19,11 +19,11 @@ import { IWorkbenchEditorConfiguration } from 'vs/workbench/common/editor'; import { parseArgs } from 'vs/platform/environment/node/argv'; import product from 'vs/platform/node/product'; import { getCommonHTTPHeaders } from 'vs/platform/environment/node/http'; -import { IWindowSettings, MenuBarVisibility, ReadyState } from 'vs/platform/windows/common/windows'; +import { IWindowSettings, MenuBarVisibility, IWindowConfiguration, ReadyState } from 'vs/platform/windows/common/windows'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { KeyboardLayoutMonitor } from 'vs/code/electron-main/keyboard'; -import { isLinux, isMacintosh, isWindows } from "vs/base/common/platform"; -import { ICodeWindow, IWindowConfiguration } from "vs/platform/windows/electron-main/windowsService"; +import { isLinux, isMacintosh, isWindows } from 'vs/base/common/platform'; +import { ICodeWindow } from "vs/platform/windows/electron-main/windows"; export interface IWindowState { width?: number; diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 58ad622a738bd..8a5535a98986f 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -23,14 +23,14 @@ import { ILifecycleService, UnloadReason } from 'vs/platform/lifecycle/electron- import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ILogService } from 'vs/platform/log/common/log'; import { getPathLabel } from 'vs/base/common/labels'; -import { IWindowSettings, OpenContext } from 'vs/platform/windows/common/windows'; +import { IWindowSettings, OpenContext, IPath, IWindowConfiguration } from 'vs/platform/windows/common/windows'; import { getLastActiveWindow, findBestWindowOrFolder } from 'vs/code/node/windowsUtils'; import CommonEvent, { Emitter } from 'vs/base/common/event'; import product from 'vs/platform/node/product'; import { ITelemetryService, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; import { isParent, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; import { KeyboardLayoutMonitor } from 'vs/code/electron-main/keyboard'; -import { IPath, IWindowsMainService, IOpenConfiguration, IRecentPathsList, IWindowConfiguration } from "vs/platform/windows/electron-main/windowsService"; +import { IWindowsMainService, IOpenConfiguration, IRecentPathsList } from "vs/platform/windows/electron-main/windows"; enum WindowError { UNRESPONSIVE, diff --git a/src/vs/code/node/windowsUtils.ts b/src/vs/code/node/windowsUtils.ts index 27e8ae3fd6335..f7a75f9a85b0d 100644 --- a/src/vs/code/node/windowsUtils.ts +++ b/src/vs/code/node/windowsUtils.ts @@ -9,7 +9,7 @@ import * as path from 'path'; import * as fs from 'fs'; import * as platform from 'vs/base/common/platform'; import * as paths from 'vs/base/common/paths'; -import { OpenContext } from "vs/platform/windows/common/windows"; +import { OpenContext } from 'vs/platform/windows/common/windows'; import { isEqualOrParent } from 'vs/platform/files/common/files'; /** diff --git a/src/vs/code/test/node/windowsUtils.test.ts b/src/vs/code/test/node/windowsUtils.test.ts index e8472fd9ae9c2..026ce3040d1ed 100644 --- a/src/vs/code/test/node/windowsUtils.test.ts +++ b/src/vs/code/test/node/windowsUtils.test.ts @@ -7,7 +7,7 @@ import assert = require('assert'); import path = require('path'); import { findBestWindowOrFolder, ISimpleWindow, IBestWindowOrFolderOptions } from 'vs/code/node/windowsUtils'; -import { OpenContext } from "vs/platform/windows/common/windows"; +import { OpenContext } from 'vs/platform/windows/common/windows'; const fixturesFolder = require.toUrl('./fixtures'); diff --git a/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts index 8c65a896d3d00..d89a243598dca 100644 --- a/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts +++ b/src/vs/platform/lifecycle/electron-main/lifecycleMain.ts @@ -12,8 +12,8 @@ import { ILogService } from 'vs/platform/log/common/log'; import { IStorageService } from 'vs/platform/storage/node/storage'; import Event, { Emitter } from 'vs/base/common/event'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; +import { ICodeWindow } from "vs/platform/windows/electron-main/windows"; import { ReadyState } from "vs/platform/windows/common/windows"; -import { ICodeWindow } from "vs/platform/windows/electron-main/windowsService"; export const ILifecycleService = createDecorator('lifecycleService'); diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index 844ce3a9aa0e4..ac16cd0c60a41 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -9,6 +9,8 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import Event from 'vs/base/common/event'; import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; +import { IProcessEnvironment } from "vs/base/common/platform"; +import { ParsedArgs } from "vs/platform/environment/common/environment"; export const IWindowsService = createDecorator('windowsService'); @@ -109,6 +111,27 @@ export interface IWindowSettings { enableMenuBarMnemonics: boolean; } +export enum OpenContext { + + // opening when running from the command line + CLI, + + // macOS only: opening from the dock (also when opening files to a running instance from desktop) + DOCK, + + // opening from the main application window + MENU, + + // opening from a file or folder dialog + DIALOG, + + // opening from the OS's UI + DESKTOP, + + // opening through the API + API +} + export enum ReadyState { /** @@ -132,23 +155,50 @@ export enum ReadyState { READY } -export enum OpenContext { +export interface IPath { - // opening when running from the command line - CLI, + // the workspace spath for a Code instance which can be null + workspacePath?: string; - // macOS only: opening from the dock (also when opening files to a running instance from desktop) - DOCK, + // the file path to open within a Code instance + filePath?: string; - // opening from the main application window - MENU, + // the line number in the file path to open + lineNumber?: number; - // opening from a file or folder dialog - DIALOG, + // the column number in the file path to open + columnNumber?: number; - // opening from the OS's UI - DESKTOP, + // indicator to create the file path in the Code instance + createFilePath?: boolean; +} - // opening through the API - API +export interface IWindowConfiguration extends ParsedArgs { + appRoot: string; + execPath: string; + + userEnv: IProcessEnvironment; + + isISOKeyboard?: boolean; + + zoomLevel?: number; + fullscreen?: boolean; + highContrast?: boolean; + baseTheme?: string; + backgroundColor?: string; + accessibilitySupport?: boolean; + + isInitialStartup?: boolean; + + perfStartTime?: number; + perfAppReady?: number; + perfWindowLoadTime?: number; + + workspacePath?: string; + + filesToOpen?: IPath[]; + filesToCreate?: IPath[]; + filesToDiff?: IPath[]; + + nodeCachedDataDir: string; } \ No newline at end of file diff --git a/src/vs/platform/windows/electron-main/windows.ts b/src/vs/platform/windows/electron-main/windows.ts new file mode 100644 index 0000000000000..f093d694f0ce5 --- /dev/null +++ b/src/vs/platform/windows/electron-main/windows.ts @@ -0,0 +1,97 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { TPromise } from 'vs/base/common/winjs.base'; +import { OpenContext, IWindowConfiguration, ReadyState, IPath } from 'vs/platform/windows/common/windows'; +import { ParsedArgs } from 'vs/platform/environment/common/environment'; +import Event from 'vs/base/common/event'; +import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; +import { createDecorator } from "vs/platform/instantiation/common/instantiation"; +import { IProcessEnvironment } from "vs/base/common/platform"; + +export interface ICodeWindow { + id: number; + win: Electron.BrowserWindow; + config: IWindowConfiguration; + openedWorkspacePath: string; + + readyState: ReadyState; + + close(): void; + + send(channel: string, ...args: any[]): void; + sendWhenReady(channel: string, ...args: any[]): void; + + toggleFullScreen(): void; + hasHiddenTitleBarStyle(): boolean; + setRepresentedFilename(name: string): void; + getRepresentedFilename(): string; + onWindowTitleDoubleClick(): void; +} + +export const IWindowsMainService = createDecorator('windowsMainService'); + +export interface IWindowsMainService { + _serviceBrand: any; + + // events + onWindowReady: Event; + onWindowClose: Event; + onWindowReload: Event; + onPathsOpen: Event; + onRecentPathsChange: Event; + + // methods + ready(initialUserEnv: IProcessEnvironment): void; + reload(win: ICodeWindow, cli?: ParsedArgs): void; + open(openConfig: IOpenConfiguration): ICodeWindow[]; + openExtensionDevelopmentHostWindow(openConfig: IOpenConfiguration): void; + openFileFolderPicker(forceNewWindow?: boolean, data?: ITelemetryData): void; + openFilePicker(forceNewWindow?: boolean, path?: string, window?: ICodeWindow, data?: ITelemetryData): void; + openFolderPicker(forceNewWindow?: boolean, window?: ICodeWindow, data?: ITelemetryData): void; + focusLastActive(cli: ParsedArgs, context: OpenContext): ICodeWindow; + getLastActiveWindow(): ICodeWindow; + findWindow(workspacePath: string, filePath?: string, extensionDevelopmentPath?: string): ICodeWindow; + openNewWindow(context: OpenContext): void; + sendToFocused(channel: string, ...args: any[]): void; + sendToAll(channel: string, payload: any, windowIdsToIgnore?: number[]): void; + getFocusedWindow(): ICodeWindow; + getWindowById(windowId: number): ICodeWindow; + getWindows(): ICodeWindow[]; + getWindowCount(): number; + addToRecentPathsList(paths: { path: string; isFile?: boolean; }[]): void; + getRecentPathsList(workspacePath?: string, filesToOpen?: IPath[]): IRecentPathsList; + removeFromRecentPathsList(path: string): void; + removeFromRecentPathsList(paths: string[]): void; + clearRecentPathsList(): void; + updateWindowsJumpList(): void; + quit(): void; +} + +export interface IOpenConfiguration { + context: OpenContext; + cli: ParsedArgs; + userEnv?: IProcessEnvironment; + pathsToOpen?: string[]; + preferNewWindow?: boolean; + forceNewWindow?: boolean; + forceReuseWindow?: boolean; + forceEmpty?: boolean; + windowToUse?: ICodeWindow; + diffMode?: boolean; + initialStartup?: boolean; +} + +export interface IRecentPathsList { + folders: string[]; + files: string[]; +} + +export interface ISharedProcess { + whenReady(): TPromise; + toggle(): void; +} \ No newline at end of file diff --git a/src/vs/platform/windows/electron-main/windowsService.ts b/src/vs/platform/windows/electron-main/windowsService.ts index 4850b5a9a22ba..2838717da3278 100644 --- a/src/vs/platform/windows/electron-main/windowsService.ts +++ b/src/vs/platform/windows/electron-main/windowsService.ts @@ -9,147 +9,15 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { assign } from 'vs/base/common/objects'; import URI from 'vs/base/common/uri'; -import { IWindowsService, OpenContext, ReadyState } from 'vs/platform/windows/common/windows'; -import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; +import { IWindowsService, OpenContext } from 'vs/platform/windows/common/windows'; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { shell, crashReporter, app } from 'electron'; import Event, { chain } from 'vs/base/common/event'; import { fromEventEmitter } from 'vs/base/node/event'; import { IURLService } from 'vs/platform/url/common/url'; import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; import { ILifecycleService } from "vs/platform/lifecycle/electron-main/lifecycleMain"; -import { createDecorator } from "vs/platform/instantiation/common/instantiation"; -import { IProcessEnvironment } from "vs/base/common/platform"; - -export interface ICodeWindow { - id: number; - win: Electron.BrowserWindow; - config: IWindowConfiguration; - openedWorkspacePath: string; - - readyState: ReadyState; - - close(): void; - - send(channel: string, ...args: any[]): void; - sendWhenReady(channel: string, ...args: any[]): void; - - toggleFullScreen(): void; - hasHiddenTitleBarStyle(): boolean; - setRepresentedFilename(name: string): void; - getRepresentedFilename(): string; - onWindowTitleDoubleClick(): void; -} - -export interface IWindowConfiguration extends ParsedArgs { - appRoot: string; - execPath: string; - - userEnv: IProcessEnvironment; - - isISOKeyboard?: boolean; - - zoomLevel?: number; - fullscreen?: boolean; - highContrast?: boolean; - baseTheme?: string; - backgroundColor?: string; - accessibilitySupport?: boolean; - - isInitialStartup?: boolean; - - perfStartTime?: number; - perfAppReady?: number; - perfWindowLoadTime?: number; - - workspacePath?: string; - - filesToOpen?: IPath[]; - filesToCreate?: IPath[]; - filesToDiff?: IPath[]; - - nodeCachedDataDir: string; -} - -export interface ISharedProcess { - whenReady(): TPromise; - toggle(): void; -} - -export const IWindowsMainService = createDecorator('windowsMainService'); - -export interface IWindowsMainService { - _serviceBrand: any; - - // events - onWindowReady: Event; - onWindowClose: Event; - onWindowReload: Event; - onPathsOpen: Event; - onRecentPathsChange: Event; - - // methods - ready(initialUserEnv: IProcessEnvironment): void; - reload(win: ICodeWindow, cli?: ParsedArgs): void; - open(openConfig: IOpenConfiguration): ICodeWindow[]; - openExtensionDevelopmentHostWindow(openConfig: IOpenConfiguration): void; - openFileFolderPicker(forceNewWindow?: boolean, data?: ITelemetryData): void; - openFilePicker(forceNewWindow?: boolean, path?: string, window?: ICodeWindow, data?: ITelemetryData): void; - openFolderPicker(forceNewWindow?: boolean, window?: ICodeWindow, data?: ITelemetryData): void; - focusLastActive(cli: ParsedArgs, context: OpenContext): ICodeWindow; - getLastActiveWindow(): ICodeWindow; - findWindow(workspacePath: string, filePath?: string, extensionDevelopmentPath?: string): ICodeWindow; - openNewWindow(context: OpenContext): void; - sendToFocused(channel: string, ...args: any[]): void; - sendToAll(channel: string, payload: any, windowIdsToIgnore?: number[]): void; - getFocusedWindow(): ICodeWindow; - getWindowById(windowId: number): ICodeWindow; - getWindows(): ICodeWindow[]; - getWindowCount(): number; - addToRecentPathsList(paths: { path: string; isFile?: boolean; }[]): void; - getRecentPathsList(workspacePath?: string, filesToOpen?: IPath[]): IRecentPathsList; - removeFromRecentPathsList(path: string): void; - removeFromRecentPathsList(paths: string[]): void; - clearRecentPathsList(): void; - updateWindowsJumpList(): void; - quit(): void; -} - -export interface IPath { - - // the workspace spath for a Code instance which can be null - workspacePath?: string; - - // the file path to open within a Code instance - filePath?: string; - - // the line number in the file path to open - lineNumber?: number; - - // the column number in the file path to open - columnNumber?: number; - - // indicator to create the file path in the Code instance - createFilePath?: boolean; -} - -export interface IOpenConfiguration { - context: OpenContext; - cli: ParsedArgs; - userEnv?: IProcessEnvironment; - pathsToOpen?: string[]; - preferNewWindow?: boolean; - forceNewWindow?: boolean; - forceReuseWindow?: boolean; - forceEmpty?: boolean; - windowToUse?: ICodeWindow; - diffMode?: boolean; - initialStartup?: boolean; -} - -export interface IRecentPathsList { - folders: string[]; - files: string[]; -} +import { IWindowsMainService, ISharedProcess } from "vs/platform/windows/electron-main/windows"; export class WindowsService implements IWindowsService, IDisposable { From b483b517d270190662461cea3aa1e7f191f0f46b Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 8 Jun 2017 17:42:51 +0200 Subject: [PATCH 1654/2747] stop using legacyrenderer, also nuke (newly) unused left-right-widget, #27705 --- .../ui/leftRightWidget/leftRightWidget.css | 15 -- .../ui/leftRightWidget/leftRightWidget.ts | 38 ----- .../browser/referencesWidget.css | 14 +- .../browser/referencesWidget.ts | 155 +++++++++++------- 4 files changed, 106 insertions(+), 116 deletions(-) delete mode 100644 src/vs/base/browser/ui/leftRightWidget/leftRightWidget.css delete mode 100644 src/vs/base/browser/ui/leftRightWidget/leftRightWidget.ts diff --git a/src/vs/base/browser/ui/leftRightWidget/leftRightWidget.css b/src/vs/base/browser/ui/leftRightWidget/leftRightWidget.css deleted file mode 100644 index 346b3ec60a173..0000000000000 --- a/src/vs/base/browser/ui/leftRightWidget/leftRightWidget.css +++ /dev/null @@ -1,15 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -.monaco-left-right-widget > .left { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - display: block; -} - -.monaco-left-right-widget > .right { - float: right; -} diff --git a/src/vs/base/browser/ui/leftRightWidget/leftRightWidget.ts b/src/vs/base/browser/ui/leftRightWidget/leftRightWidget.ts deleted file mode 100644 index 85e960a9ce34c..0000000000000 --- a/src/vs/base/browser/ui/leftRightWidget/leftRightWidget.ts +++ /dev/null @@ -1,38 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import 'vs/css!./leftRightWidget'; -import { Builder, $ } from 'vs/base/browser/builder'; -import { IDisposable } from 'vs/base/common/lifecycle'; - -export interface IRenderer { - (container: HTMLElement): IDisposable; -} - -export class LeftRightWidget { - - private $el: Builder; - private toDispose: IDisposable[]; - - constructor(container: Builder, renderLeftFn: IRenderer, renderRightFn: IRenderer); - constructor(container: HTMLElement, renderLeftFn: IRenderer, renderRightFn: IRenderer); - constructor(container: any, renderLeftFn: IRenderer, renderRightFn: IRenderer) { - this.$el = $('.monaco-left-right-widget').appendTo(container); - - this.toDispose = [ - renderRightFn($('.right').appendTo(this.$el).getHTMLElement()), - renderLeftFn($('span.left').appendTo(this.$el).getHTMLElement()) - ].filter(x => !!x); - } - - public dispose() { - if (this.$el) { - this.$el.destroy(); - this.$el = null; - } - } -} diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.css b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.css index 922f4807e48ee..5b31614155397 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.css +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.css @@ -37,17 +37,21 @@ } .monaco-editor .reference-zone-widget .ref-tree .reference-file { - position: relative; - line-height: 22px; + display: flex; + justify-content: space-between; + align-items: center; } .monaco-editor .reference-zone-widget .monaco-count-badge { - margin-right: 12px; + margin-right: .5em; + height: 15px; + padding: 0 .5em .5em .5em } /* High Contrast Theming */ .monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file { - line-height: 20px; font-weight: bold; -} \ No newline at end of file + display: flex; + justify-content: space-between; +} diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index 2a5de66352aa1..29bc862addee6 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -23,9 +23,8 @@ import { IMouseEvent } from 'vs/base/browser/mouseEvent'; import { GestureEvent } from 'vs/base/browser/touch'; import { CountBadge } from 'vs/base/browser/ui/countBadge/countBadge'; import { FileLabel } from 'vs/base/browser/ui/iconLabel/iconLabel'; -import { LeftRightWidget } from 'vs/base/browser/ui/leftRightWidget/leftRightWidget'; import * as tree from 'vs/base/parts/tree/browser/tree'; -import { DefaultController, LegacyRenderer } from 'vs/base/parts/tree/browser/treeDefaults'; +import { DefaultController } from 'vs/base/parts/tree/browser/treeDefaults'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { IInstantiationService, optional } from 'vs/platform/instantiation/common/instantiation'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; @@ -45,6 +44,7 @@ import { IModelDecorationsChangedEvent } from 'vs/editor/common/model/textModelE import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; +import URI from 'vs/base/common/uri'; class DecorationsManager implements IDisposable { @@ -344,81 +344,120 @@ class Controller extends DefaultController { } } -class Renderer extends LegacyRenderer { - private _contextService: IWorkspaceContextService; - private _themeService: IThemeService; - private _environmentService: IEnvironmentService; +class FileReferencesTemplate { + + readonly file: FileLabel; + readonly badge: CountBadge; + readonly dispose: () => void; constructor( - @IWorkspaceContextService contextService: IWorkspaceContextService, + container: HTMLElement, + @IWorkspaceContextService private _contextService: IWorkspaceContextService, + @optional(IEnvironmentService) private _environmentService: IEnvironmentService, @IThemeService themeService: IThemeService, - @optional(IEnvironmentService) environmentService: IEnvironmentService ) { - super(); - - this._contextService = contextService; - this._themeService = themeService; - this._environmentService = environmentService; - } - - public getHeight(tree: tree.ITree, element: any): number { - return 22; + const parent = document.createElement('div'); + dom.addClass(parent, 'reference-file'); + container.appendChild(parent); + + this.file = new FileLabel(parent, URI.parse('no:file'), this._contextService, this._environmentService); + this.badge = new CountBadge(parent); + const styler = attachBadgeStyler(this.badge, themeService); + this.dispose = () => styler.dispose(); + } + + set(element: FileReferences) { + this.file.setFile(element.uri, this._contextService, this._environmentService); + const len = element.children.length; + this.badge.setCount(len); + if (element.failure) { + this.badge.setTitleFormat(nls.localize('referencesFailre', "Failed to resolve file.")); + } else if (len > 1) { + this.badge.setTitleFormat(nls.localize('referencesCount', "{0} references", len)); + } else { + this.badge.setTitleFormat(nls.localize('referenceCount', "{0} reference", len)); + } } +} - protected render(tree: tree.ITree, element: FileReferences | OneReference, container: HTMLElement): tree.IElementCallback { - - const toDispose: IDisposable[] = []; - dom.clearNode(container); +class OneReferenceTemplate { - if (element instanceof FileReferences) { - const fileReferencesContainer = $('.reference-file'); + readonly before: HTMLSpanElement; + readonly inside: HTMLSpanElement; + readonly after: HTMLSpanElement; - /* tslint:disable:no-unused-expression */ - new LeftRightWidget(fileReferencesContainer, (left: HTMLElement) => { - - const label = new FileLabel(left, element.uri, this._contextService, this._environmentService); - toDispose.push(label); - return null; + constructor(container: HTMLElement) { + const parent = document.createElement('div'); + this.before = document.createElement('span'); + this.inside = document.createElement('span'); + this.after = document.createElement('span'); + dom.addClass(this.inside, 'referenceMatch'); + dom.addClass(parent, 'reference'); + parent.appendChild(this.before); + parent.appendChild(this.inside); + parent.appendChild(this.after); + container.appendChild(parent); + } - }, (right: HTMLElement) => { + set(element: OneReference): void { + const { before, inside, after } = element.parent.preview.preview(element.range); + this.before.innerHTML = strings.escape(before); + this.inside.innerHTML = strings.escape(inside); + this.after.innerHTML = strings.escape(after); + } +} - const len = element.children.length; - const badge = new CountBadge(right, { count: len }); - toDispose.push(attachBadgeStyler(badge, this._themeService)); +class Renderer implements tree.IRenderer { - if (element.failure) { - badge.setTitleFormat(nls.localize('referencesFailre', "Failed to resolve file.")); - } else if (len > 1) { - badge.setTitleFormat(nls.localize('referencesCount', "{0} references", len)); - } else { - badge.setTitleFormat(nls.localize('referenceCount', "{0} reference", len)); - } + private static _ids = { + FileReferences: 'FileReferences', + OneReference: 'OneReference' + }; - return null; - }); - /* tslint:enable:no-unused-expression */ + constructor( + @IWorkspaceContextService private _contextService: IWorkspaceContextService, + @IThemeService private _themeService: IThemeService, + @optional(IEnvironmentService) private _environmentService: IEnvironmentService + ) { + // + } - fileReferencesContainer.appendTo(container); + getHeight(tree: tree.ITree, element: FileReferences | OneReference): number { + return 22; + } + getTemplateId(tree: tree.ITree, element: FileReferences | OneReference): string { + if (element instanceof FileReferences) { + return Renderer._ids.FileReferences; } else if (element instanceof OneReference) { + return Renderer._ids.OneReference; + } + throw element; + } - const preview = element.parent.preview.preview(element.range); - - if (!preview) { - return undefined; - } + renderTemplate(tree: tree.ITree, templateId: string, container: HTMLElement) { + if (templateId === Renderer._ids.FileReferences) { + return new FileReferencesTemplate(container, this._contextService, this._environmentService, this._themeService); + } else if (templateId === Renderer._ids.OneReference) { + return new OneReferenceTemplate(container); + } + throw templateId; + } - $('.reference').innerHtml( - strings.format( - '{0}{1}{2}', - strings.escape(preview.before), - strings.escape(preview.inside), - strings.escape(preview.after))).appendTo(container); + renderElement(tree: tree.ITree, element: FileReferences | OneReference, templateId: string, templateData: any): void { + if (element instanceof FileReferences) { + (templateData).set(element); + } else if (element instanceof OneReference) { + (templateData).set(element); + } else { + throw templateId; } + } - return () => { - dispose(toDispose); - }; + disposeTemplate(tree: tree.ITree, templateId: string, templateData: any): void { + if (templateData instanceof FileReferencesTemplate) { + templateData.dispose(); + } } } From 3f043b2da69a78cb19bed3e59823714be81afd48 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 8 Jun 2017 18:10:45 +0200 Subject: [PATCH 1655/2747] get rid of LegacyRenderer (fixes #27705) --- .../base/parts/tree/browser/treeDefaults.ts | 53 ------------------- src/vs/base/parts/tree/browser/treeImpl.ts | 2 +- 2 files changed, 1 insertion(+), 54 deletions(-) diff --git a/src/vs/base/parts/tree/browser/treeDefaults.ts b/src/vs/base/parts/tree/browser/treeDefaults.ts index 4b0949c9618ab..bc4ccdc1b73f8 100644 --- a/src/vs/base/parts/tree/browser/treeDefaults.ts +++ b/src/vs/base/parts/tree/browser/treeDefaults.ts @@ -16,59 +16,6 @@ import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import _ = require('vs/base/parts/tree/browser/tree'); import { KeyCode, KeyMod, Keybinding, createKeybinding, SimpleKeybinding } from 'vs/base/common/keyCodes'; -export interface ILegacyTemplateData { - root: HTMLElement; - element: any; - previousCleanupFn: _.IElementCallback; -} - -export class LegacyRenderer implements _.IRenderer { - - public getHeight(tree: _.ITree, element: any): number { - return 20; - } - - public getTemplateId(tree: _.ITree, element: any): string { - return 'legacy'; - } - - public renderTemplate(tree: _.ITree, templateId: string, container: HTMLElement): any { - return { - root: container, - element: null, - previousCleanupFn: null - }; - } - - public renderElement(tree: _.ITree, element: any, templateId: string, templateData: ILegacyTemplateData): void { - if (templateData.previousCleanupFn) { - templateData.previousCleanupFn(tree, templateData.element); - } - - while (templateData.root && templateData.root.firstChild) { - templateData.root.removeChild(templateData.root.firstChild); - } - - templateData.element = element; - templateData.previousCleanupFn = this.render(tree, element, templateData.root); - } - - public disposeTemplate(tree: _.ITree, templateId: string, templateData: any): void { - if (templateData.previousCleanupFn) { - templateData.previousCleanupFn(tree, templateData.element); - } - - templateData.root = null; - templateData.element = null; - templateData.previousCleanupFn = null; - } - - protected render(tree: _.ITree, element: any, container: HTMLElement, previousCleanupFn?: _.IElementCallback): _.IElementCallback { - container.textContent = '' + element; - return null; - } -} - export interface IKeyBindingCallback { (tree: _.ITree, event: IKeyboardEvent): void; } diff --git a/src/vs/base/parts/tree/browser/treeImpl.ts b/src/vs/base/parts/tree/browser/treeImpl.ts index ba27e68884795..ea81d203047b8 100644 --- a/src/vs/base/parts/tree/browser/treeImpl.ts +++ b/src/vs/base/parts/tree/browser/treeImpl.ts @@ -41,7 +41,7 @@ export class TreeContext implements _.ITreeContext { } this.dataSource = configuration.dataSource; - this.renderer = configuration.renderer || new TreeDefaults.LegacyRenderer(); + this.renderer = configuration.renderer; this.controller = configuration.controller || new TreeDefaults.DefaultController({ clickBehavior: TreeDefaults.ClickBehavior.ON_MOUSE_UP, keyboardSupport: typeof options.keyboardSupport !== 'boolean' || options.keyboardSupport }); this.dnd = configuration.dnd || new TreeDefaults.DefaultDragAndDrop(); this.filter = configuration.filter || new TreeDefaults.DefaultFilter(); From 278866dca573996b3d4f4988f276885980cce332 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Thu, 8 Jun 2017 10:41:01 -0700 Subject: [PATCH 1656/2747] Configure plugin for labelling issues for new releases --- .github/new_release.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/new_release.yml diff --git a/.github/new_release.yml b/.github/new_release.yml new file mode 100644 index 0000000000000..ae86432733305 --- /dev/null +++ b/.github/new_release.yml @@ -0,0 +1,5 @@ +{ + newReleaseLabel: 'new release', + newReleases: ['1.13'], + perform: true +} \ No newline at end of file From 0fe479a0f833e5fa272f14bf7dbfcd03f97e9cbc Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 9 Jun 2017 12:10:44 -0700 Subject: [PATCH 1657/2747] Fix cmd+a keybinding on mac --- .../parts/terminal/electron-browser/terminal.contribution.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index 09af3cb19c61d..84dc99b921274 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -210,9 +210,7 @@ let actionRegistry = Registry.as(ActionExtensions.Work actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(KillTerminalAction, KillTerminalAction.ID, KillTerminalAction.LABEL), 'Terminal: Kill the Active Terminal Instance', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(CopyTerminalSelectionAction, CopyTerminalSelectionAction.ID, CopyTerminalSelectionAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_C, - linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_C }, - // Don't apply to Mac since cmd+c works - mac: { primary: null } + linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_C } }, ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, KEYBINDING_CONTEXT_TERMINAL_FOCUS)), 'Terminal: Copy Selection', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(CreateNewTerminalAction, CreateNewTerminalAction.ID, CreateNewTerminalAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.US_BACKTICK, From a32c0803778cc346e9424567d38a3bd75ee10315 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 9 Jun 2017 12:34:57 -0700 Subject: [PATCH 1658/2747] Uplevel xterm.js Brings in fix for link duplication --- npm-shrinkwrap.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 91bff39ee52ae..58d2fcc6cde18 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -442,7 +442,7 @@ "xterm": { "version": "2.7.0", "from": "Tyriar/xterm.js#vscode-release/1.14-beta", - "resolved": "git+https://github.com/Tyriar/xterm.js.git#2c61d9c26c0265b8a4ce1542d25dd1258c3e4f5b" + "resolved": "git+https://github.com/Tyriar/xterm.js.git#e6130919622e238221ee9c8806cca8f084cfec2c" }, "yauzl": { "version": "2.3.1", From 979923ad4dc72f99fbef07113b5fab7b34801903 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 8 Jun 2017 14:02:56 -0700 Subject: [PATCH 1659/2747] Remove terminal selection colors --- .../parts/terminal/electron-browser/terminalPanel.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 51ddb07c92b88..7b7869bbe2e40 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -243,13 +243,8 @@ export class TerminalPanel extends Panel { ansiColorIdentifiers.forEach((colorId: ColorIdentifier, index: number) => { if (colorId) { // should not happen, all indices should have a color defined. let color = theme.getColor(colorId); - let rgba = color.transparent(0.996); css += `.monaco-workbench .panel.integrated-terminal .xterm .xterm-color-${index} { color: ${color}; }` + - `.monaco-workbench .panel.integrated-terminal .xterm .xterm-color-${index}::selection,` + - `.monaco-workbench .panel.integrated-terminal .xterm .xterm-color-${index} *::selection { background-color: ${rgba}; }` + - `.monaco-workbench .panel.integrated-terminal .xterm .xterm-bg-color-${index} { background-color: ${color}; }` + - `.monaco-workbench .panel.integrated-terminal .xterm .xterm-bg-color-${index}::selection,` + - `.monaco-workbench .panel.integrated-terminal .xterm .xterm-bg-color-${index} *::selection { color: ${color}; }`; + `.monaco-workbench .panel.integrated-terminal .xterm .xterm-bg-color-${index} { background-color: ${color}; }`; } }); const bgColor = theme.getColor(TERMINAL_BACKGROUND_COLOR); From 4541e70733f110ada8d0b4266bc922565d74950a Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Thu, 8 Jun 2017 23:57:23 +0200 Subject: [PATCH 1660/2747] node-debug@1.14.1 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 2aa62f99f336e..aac30d1a5dc01 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -42,7 +42,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.14.0' }, + { name: 'ms-vscode.node-debug', version: '1.14.1' }, { name: 'ms-vscode.node-debug2', version: '1.13.3' } ]; From 2a580b4d6844dcd7a9ed12fa9c08d4e413e0ad9b Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 9 Jun 2017 08:10:09 +0200 Subject: [PATCH 1661/2747] main - extract service for handling recent paths and jumplist --- src/vs/code/electron-main/app.ts | 8 +- src/vs/code/electron-main/main.ts | 6 +- src/vs/code/electron-main/menus.ts | 10 +- src/vs/code/electron-main/windows.ts | 176 +------------- .../electron-main/historyMainService.ts | 220 ++++++++++++++++++ src/vs/platform/log/common/log.ts | 2 +- .../platform/windows/electron-main/windows.ts | 12 - .../windows/electron-main/windowsService.ts | 12 +- 8 files changed, 249 insertions(+), 197 deletions(-) create mode 100644 src/vs/platform/history/electron-main/historyMainService.ts diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index ac163efc5d215..53f7e77bd3898 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -45,6 +45,7 @@ import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ConfigurationService } from 'vs/platform/configuration/node/configurationService'; import { TPromise } from "vs/base/common/winjs.base"; import { IWindowsMainService } from "vs/platform/windows/electron-main/windows"; +import { IHistoryMainService } from "vs/platform/history/electron-main/historyMainService"; export class CodeApplication { private toDispose: IDisposable[]; @@ -63,7 +64,8 @@ export class CodeApplication { @IEnvironmentService private environmentService: IEnvironmentService, @ILifecycleService private lifecycleService: ILifecycleService, @IConfigurationService private configurationService: ConfigurationService, - @IStorageService private storageService: IStorageService + @IStorageService private storageService: IStorageService, + @IHistoryMainService private historyService: IHistoryMainService ) { this.toDispose = [mainIpcServer, configurationService]; @@ -258,8 +260,8 @@ export class CodeApplication { appInstantiationService.createInstance(CodeMenu); // Jump List - this.windowsMainService.updateWindowsJumpList(); - this.windowsMainService.onRecentPathsChange(() => this.windowsMainService.updateWindowsJumpList()); + this.historyService.updateWindowsJumpList(); + this.historyService.onRecentPathsChange(() => this.historyService.updateWindowsJumpList()); // Start shared process here this.sharedProcess.spawn(); diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts index ebbaaa2ed463c..95b5fbed51b26 100644 --- a/src/vs/code/electron-main/main.ts +++ b/src/vs/code/electron-main/main.ts @@ -19,7 +19,7 @@ import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiati import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; -import { ILogService, MainLogService } from 'vs/platform/log/common/log'; +import { ILogService, LogMainService } from 'vs/platform/log/common/log'; import { IStorageService, StorageService } from 'vs/platform/storage/node/storage'; import { IBackupMainService } from 'vs/platform/backup/common/backup'; import { BackupMainService } from 'vs/platform/backup/electron-main/backupMainService'; @@ -33,12 +33,14 @@ import { IURLService } from 'vs/platform/url/common/url'; import { URLService } from 'vs/platform/url/electron-main/urlService'; import * as fs from 'original-fs'; import { CodeApplication } from "vs/code/electron-main/app"; +import { HistoryMainService, IHistoryMainService } from "vs/platform/history/electron-main/historyMainService"; function createServices(args: ParsedArgs): IInstantiationService { const services = new ServiceCollection(); services.set(IEnvironmentService, new SyncDescriptor(EnvironmentService, args, process.execPath)); - services.set(ILogService, new SyncDescriptor(MainLogService)); + services.set(ILogService, new SyncDescriptor(LogMainService)); + services.set(IHistoryMainService, new SyncDescriptor(HistoryMainService)); services.set(ILifecycleService, new SyncDescriptor(LifecycleService)); services.set(IStorageService, new SyncDescriptor(StorageService)); services.set(IConfigurationService, new SyncDescriptor(ConfigurationService)); diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 8cc5443972127..db805f0637c4b 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -21,6 +21,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { tildify } from 'vs/base/common/labels'; import { KeybindingsResolver } from "vs/code/electron-main/keyboard"; import { IWindowsMainService } from "vs/platform/windows/electron-main/windows"; +import { IHistoryMainService } from "vs/platform/history/electron-main/historyMainService"; interface IExtensionViewlet { id: string; @@ -75,7 +76,8 @@ export class CodeMenu { @IConfigurationService private configurationService: IConfigurationService, @IWindowsMainService private windowsService: IWindowsMainService, @IEnvironmentService private environmentService: IEnvironmentService, - @ITelemetryService private telemetryService: ITelemetryService + @ITelemetryService private telemetryService: ITelemetryService, + @IHistoryMainService private historyService: IHistoryMainService ) { this.extensionViewlets = []; @@ -98,7 +100,7 @@ export class CodeMenu { // Listen to some events from window service this.windowsService.onPathsOpen(paths => this.updateMenu()); - this.windowsService.onRecentPathsChange(paths => this.updateMenu()); + this.historyService.onRecentPathsChange(paths => this.updateMenu()); this.windowsService.onWindowClose(_ => this.onClose(this.windowsService.getWindowCount())); // Listen to extension viewlets @@ -414,7 +416,7 @@ export class CodeMenu { private setOpenRecentMenu(openRecentMenu: Electron.Menu): void { openRecentMenu.append(this.createMenuItem(nls.localize({ key: 'miReopenClosedEditor', comment: ['&& denotes a mnemonic'] }, "&&Reopen Closed Editor"), 'workbench.action.reopenClosedEditor')); - const { folders, files } = this.windowsService.getRecentPathsList(); + const { folders, files } = this.historyService.getRecentPathsList(); // Folders if (folders.length > 0) { @@ -448,7 +450,7 @@ export class CodeMenu { const openInNewWindow = this.isOptionClick(event); const success = !!this.windowsService.open({ context: OpenContext.MENU, cli: this.environmentService.args, pathsToOpen: [path], forceNewWindow: openInNewWindow }); if (!success) { - this.windowsService.removeFromRecentPathsList(path); + this.historyService.removeFromRecentPathsList(path); } } }, false)); diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 8a5535a98986f..7e19e0fe30090 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -13,7 +13,6 @@ import * as types from 'vs/base/common/types'; import * as arrays from 'vs/base/common/arrays'; import { assign, mixin } from 'vs/base/common/objects'; import { IBackupMainService } from 'vs/platform/backup/common/backup'; -import { trim } from 'vs/base/common/strings'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; import { IStorageService } from 'vs/platform/storage/node/storage'; import { CodeWindow, IWindowState as ISingleWindowState, defaultWindowState, WindowMode } from 'vs/code/electron-main/window'; @@ -22,7 +21,6 @@ import { IPathWithLineAndColumn, parseLineAndColumnAware } from 'vs/code/node/pa import { ILifecycleService, UnloadReason } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ILogService } from 'vs/platform/log/common/log'; -import { getPathLabel } from 'vs/base/common/labels'; import { IWindowSettings, OpenContext, IPath, IWindowConfiguration } from 'vs/platform/windows/common/windows'; import { getLastActiveWindow, findBestWindowOrFolder } from 'vs/code/node/windowsUtils'; import CommonEvent, { Emitter } from 'vs/base/common/event'; @@ -30,7 +28,8 @@ import product from 'vs/platform/node/product'; import { ITelemetryService, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; import { isParent, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; import { KeyboardLayoutMonitor } from 'vs/code/electron-main/keyboard'; -import { IWindowsMainService, IOpenConfiguration, IRecentPathsList } from "vs/platform/windows/electron-main/windows"; +import { IWindowsMainService, IOpenConfiguration } from "vs/platform/windows/electron-main/windows"; +import { IHistoryMainService } from "vs/platform/history/electron-main/historyMainService"; enum WindowError { UNRESPONSIVE, @@ -70,9 +69,6 @@ export class WindowsManager implements IWindowsMainService { _serviceBrand: any; - private static MAX_TOTAL_RECENT_ENTRIES = 100; - - private static recentPathsListStorageKey = 'openedPathsList'; private static workingDirPickerStorageKey = 'pickerWorkingDir'; private static windowsStateStorageKey = 'windowsState'; @@ -83,9 +79,6 @@ export class WindowsManager implements IWindowsMainService { private windowsState: IWindowsState; private lastClosedWindowState: IWindowState; - private _onRecentPathsChange = new Emitter(); - onRecentPathsChange: CommonEvent = this._onRecentPathsChange.event; - private _onWindowReady = new Emitter(); onWindowReady: CommonEvent = this._onWindowReady.event; @@ -105,7 +98,8 @@ export class WindowsManager implements IWindowsMainService { @ILifecycleService private lifecycleService: ILifecycleService, @IBackupMainService private backupService: IBackupMainService, @ITelemetryService private telemetryService: ITelemetryService, - @IConfigurationService private configurationService: IConfigurationService + @IConfigurationService private configurationService: IConfigurationService, + @IHistoryMainService private historyService: IHistoryMainService ) { } public ready(initialUserEnv: platform.IProcessEnvironment): void { @@ -521,7 +515,7 @@ export class WindowsManager implements IWindowsMainService { }); if (recentPaths.length) { - this.addToRecentPathsList(recentPaths); + this.historyService.addToRecentPathsList(recentPaths); } } @@ -531,103 +525,7 @@ export class WindowsManager implements IWindowsMainService { return arrays.distinct(usedWindows); } - public addToRecentPathsList(paths: { path: string; isFile?: boolean; }[]): void { - if (!paths || !paths.length) { - return; - } - - const mru = this.getRecentPathsList(); - paths.forEach(p => { - const { path, isFile } = p; - - if (isFile) { - mru.files.unshift(path); - mru.files = arrays.distinct(mru.files, (f) => platform.isLinux ? f : f.toLowerCase()); - } else { - mru.folders.unshift(path); - mru.folders = arrays.distinct(mru.folders, (f) => platform.isLinux ? f : f.toLowerCase()); - } - - // Make sure its bounded - mru.folders = mru.folders.slice(0, WindowsManager.MAX_TOTAL_RECENT_ENTRIES); - mru.files = mru.files.slice(0, WindowsManager.MAX_TOTAL_RECENT_ENTRIES); - }); - - this.storageService.setItem(WindowsManager.recentPathsListStorageKey, mru); - this._onRecentPathsChange.fire(); - } - - public removeFromRecentPathsList(path: string): void; - public removeFromRecentPathsList(paths: string[]): void; - public removeFromRecentPathsList(arg1: any): void { - let paths: string[]; - if (Array.isArray(arg1)) { - paths = arg1; - } else { - paths = [arg1]; - } - - const mru = this.getRecentPathsList(); - let update = false; - - paths.forEach(path => { - let index = mru.files.indexOf(path); - if (index >= 0) { - mru.files.splice(index, 1); - update = true; - } - - index = mru.folders.indexOf(path); - if (index >= 0) { - mru.folders.splice(index, 1); - update = true; - } - }); - - if (update) { - this.storageService.setItem(WindowsManager.recentPathsListStorageKey, mru); - this._onRecentPathsChange.fire(); - } - } - - public clearRecentPathsList(): void { - this.storageService.setItem(WindowsManager.recentPathsListStorageKey, { folders: [], files: [] }); - app.clearRecentDocuments(); - - // Event - this._onRecentPathsChange.fire(); - } - public getRecentPathsList(workspacePath?: string, filesToOpen?: IPath[]): IRecentPathsList { - let files: string[]; - let folders: string[]; - - // Get from storage - const storedRecents = this.storageService.getItem(WindowsManager.recentPathsListStorageKey); - if (storedRecents) { - files = storedRecents.files || []; - folders = storedRecents.folders || []; - } else { - files = []; - folders = []; - } - - // Add currently files to open to the beginning if any - if (filesToOpen) { - files.unshift(...filesToOpen.map(f => f.filePath)); - } - - // Add current workspace path to beginning if set - if (workspacePath) { - folders.unshift(workspacePath); - } - - // Clear those dupes - files = arrays.distinct(files); - folders = arrays.distinct(folders); - - return { files, folders }; - } private getWindowUserEnv(openConfig: IOpenConfiguration): platform.IProcessEnvironment { return assign({}, this.initialUserEnv, openConfig.userEnv || {}); @@ -705,7 +603,7 @@ export class WindowsManager implements IWindowsMainService { { workspacePath: candidate }; } } catch (error) { - this.removeFromRecentPathsList(candidate); // since file does not seem to exist anymore, remove from recent + this.historyService.removeFromRecentPathsList(candidate); // since file does not seem to exist anymore, remove from recent if (ignoreFileNotFound) { return { filePath: candidate, createFilePath: true }; // assume this is a file that does not yet exist @@ -1182,68 +1080,6 @@ export class WindowsManager implements IWindowsMainService { this._onWindowClose.fire(win.id); } - public updateWindowsJumpList(): void { - if (!platform.isWindows) { - return; // only on windows - } - - const jumpList: Electron.JumpListCategory[] = []; - - // Tasks - jumpList.push({ - type: 'tasks', - items: [ - { - type: 'task', - title: nls.localize('newWindow', "New Window"), - description: nls.localize('newWindowDesc', "Opens a new window"), - program: process.execPath, - args: '-n', // force new window - iconPath: process.execPath, - iconIndex: 0 - } - ] - }); - - // Recent Folders - if (this.getRecentPathsList().folders.length > 0) { - - // The user might have meanwhile removed items from the jump list and we have to respect that - // so we need to update our list of recent paths with the choice of the user to not add them again - // Also: Windows will not show our custom category at all if there is any entry which was removed - // by the user! See https://github.com/Microsoft/vscode/issues/15052 - this.removeFromRecentPathsList(app.getJumpListSettings().removedItems.map(r => trim(r.args, '"'))); - - // Add entries - jumpList.push({ - type: 'custom', - name: nls.localize('recentFolders', "Recent Folders"), - items: this.getRecentPathsList().folders.slice(0, 7 /* limit number of entries here */).map(folder => { - return { - type: 'task', - title: path.basename(folder) || folder, // use the base name to show shorter entries in the list - description: nls.localize('folderDesc', "{0} {1}", path.basename(folder), getPathLabel(path.dirname(folder))), - program: process.execPath, - args: `"${folder}"`, // open folder (use quotes to support paths with whitespaces) - iconPath: 'explorer.exe', // simulate folder icon - iconIndex: 0 - }; - }).filter(i => !!i) - }); - } - - // Recent - jumpList.push({ - type: 'recent' // this enables to show files in the "recent" category - }); - - try { - app.setJumpList(jumpList); - } catch (error) { - this.logService.log('#setJumpList', error); // since setJumpList is relatively new API, make sure to guard for errors - } - } - public quit(): void { // If the user selected to exit from an extension development host window, do not quit, but just diff --git a/src/vs/platform/history/electron-main/historyMainService.ts b/src/vs/platform/history/electron-main/historyMainService.ts new file mode 100644 index 0000000000000..31ce2c45c7965 --- /dev/null +++ b/src/vs/platform/history/electron-main/historyMainService.ts @@ -0,0 +1,220 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import * as path from 'path'; +import * as platform from 'vs/base/common/platform'; +import * as nls from 'vs/nls'; +import * as arrays from 'vs/base/common/arrays'; +import { trim } from 'vs/base/common/strings'; +import { IStorageService } from 'vs/platform/storage/node/storage'; +import { app } from 'electron'; +import { ILogService } from 'vs/platform/log/common/log'; +import { getPathLabel } from 'vs/base/common/labels'; +import { IPath } from 'vs/platform/windows/common/windows'; +import CommonEvent, { Emitter } from 'vs/base/common/event'; +import { createDecorator } from "vs/platform/instantiation/common/instantiation"; + +export const IHistoryMainService = createDecorator('historyMainService'); + +export interface IRecentPathsList { + folders: string[]; + files: string[]; +} + +export interface IHistoryMainService { + _serviceBrand: any; + + // events + onRecentPathsChange: CommonEvent; + + // methods + + addToRecentPathsList(paths: { path: string; isFile?: boolean; }[]): void; + getRecentPathsList(workspacePath?: string, filesToOpen?: IPath[]): IRecentPathsList; + removeFromRecentPathsList(path: string): void; + removeFromRecentPathsList(paths: string[]): void; + clearRecentPathsList(): void; + updateWindowsJumpList(): void; +} + +export class HistoryMainService implements IHistoryMainService { + + private static MAX_TOTAL_RECENT_ENTRIES = 100; + + private static recentPathsListStorageKey = 'openedPathsList'; + + _serviceBrand: any; + + private _onRecentPathsChange = new Emitter(); + onRecentPathsChange: CommonEvent = this._onRecentPathsChange.event; + + constructor( + @IStorageService private storageService: IStorageService, + @ILogService private logService: ILogService + ) { + } + + public addToRecentPathsList(paths: { path: string; isFile?: boolean; }[]): void { + if (!paths || !paths.length) { + return; + } + + const mru = this.getRecentPathsList(); + paths.forEach(p => { + const { path, isFile } = p; + + if (isFile) { + mru.files.unshift(path); + mru.files = arrays.distinct(mru.files, (f) => platform.isLinux ? f : f.toLowerCase()); + } else { + mru.folders.unshift(path); + mru.folders = arrays.distinct(mru.folders, (f) => platform.isLinux ? f : f.toLowerCase()); + } + + // Make sure its bounded + mru.folders = mru.folders.slice(0, HistoryMainService.MAX_TOTAL_RECENT_ENTRIES); + mru.files = mru.files.slice(0, HistoryMainService.MAX_TOTAL_RECENT_ENTRIES); + }); + + this.storageService.setItem(HistoryMainService.recentPathsListStorageKey, mru); + this._onRecentPathsChange.fire(); + } + + public removeFromRecentPathsList(path: string): void; + public removeFromRecentPathsList(paths: string[]): void; + public removeFromRecentPathsList(arg1: any): void { + let paths: string[]; + if (Array.isArray(arg1)) { + paths = arg1; + } else { + paths = [arg1]; + } + + const mru = this.getRecentPathsList(); + let update = false; + + paths.forEach(path => { + let index = mru.files.indexOf(path); + if (index >= 0) { + mru.files.splice(index, 1); + update = true; + } + + index = mru.folders.indexOf(path); + if (index >= 0) { + mru.folders.splice(index, 1); + update = true; + } + }); + + if (update) { + this.storageService.setItem(HistoryMainService.recentPathsListStorageKey, mru); + this._onRecentPathsChange.fire(); + } + } + + public clearRecentPathsList(): void { + this.storageService.setItem(HistoryMainService.recentPathsListStorageKey, { folders: [], files: [] }); + app.clearRecentDocuments(); + + // Event + this._onRecentPathsChange.fire(); + } + + public getRecentPathsList(workspacePath?: string, filesToOpen?: IPath[]): IRecentPathsList { + let files: string[]; + let folders: string[]; + + // Get from storage + const storedRecents = this.storageService.getItem(HistoryMainService.recentPathsListStorageKey); + if (storedRecents) { + files = storedRecents.files || []; + folders = storedRecents.folders || []; + } else { + files = []; + folders = []; + } + + // Add currently files to open to the beginning if any + if (filesToOpen) { + files.unshift(...filesToOpen.map(f => f.filePath)); + } + + // Add current workspace path to beginning if set + if (workspacePath) { + folders.unshift(workspacePath); + } + + // Clear those dupes + files = arrays.distinct(files); + folders = arrays.distinct(folders); + + return { files, folders }; + } + + public updateWindowsJumpList(): void { + if (!platform.isWindows) { + return; // only on windows + } + + const jumpList: Electron.JumpListCategory[] = []; + + // Tasks + jumpList.push({ + type: 'tasks', + items: [ + { + type: 'task', + title: nls.localize('newWindow', "New Window"), + description: nls.localize('newWindowDesc', "Opens a new window"), + program: process.execPath, + args: '-n', // force new window + iconPath: process.execPath, + iconIndex: 0 + } + ] + }); + + // Recent Folders + if (this.getRecentPathsList().folders.length > 0) { + + // The user might have meanwhile removed items from the jump list and we have to respect that + // so we need to update our list of recent paths with the choice of the user to not add them again + // Also: Windows will not show our custom category at all if there is any entry which was removed + // by the user! See https://github.com/Microsoft/vscode/issues/15052 + this.removeFromRecentPathsList(app.getJumpListSettings().removedItems.map(r => trim(r.args, '"'))); + + // Add entries + jumpList.push({ + type: 'custom', + name: nls.localize('recentFolders', "Recent Folders"), + items: this.getRecentPathsList().folders.slice(0, 7 /* limit number of entries here */).map(folder => { + return { + type: 'task', + title: path.basename(folder) || folder, // use the base name to show shorter entries in the list + description: nls.localize('folderDesc', "{0} {1}", path.basename(folder), getPathLabel(path.dirname(folder))), + program: process.execPath, + args: `"${folder}"`, // open folder (use quotes to support paths with whitespaces) + iconPath: 'explorer.exe', // simulate folder icon + iconIndex: 0 + }; + }).filter(i => !!i) + }); + } + + // Recent + jumpList.push({ + type: 'recent' // this enables to show files in the "recent" category + }); + + try { + app.setJumpList(jumpList); + } catch (error) { + this.logService.log('#setJumpList', error); // since setJumpList is relatively new API, make sure to guard for errors + } + } +} \ No newline at end of file diff --git a/src/vs/platform/log/common/log.ts b/src/vs/platform/log/common/log.ts index c9908624211dd..51427842fea3d 100644 --- a/src/vs/platform/log/common/log.ts +++ b/src/vs/platform/log/common/log.ts @@ -16,7 +16,7 @@ export interface ILogService { log(...args: any[]): void; } -export class MainLogService implements ILogService { +export class LogMainService implements ILogService { _serviceBrand: any; diff --git a/src/vs/platform/windows/electron-main/windows.ts b/src/vs/platform/windows/electron-main/windows.ts index f093d694f0ce5..50f47d2110445 100644 --- a/src/vs/platform/windows/electron-main/windows.ts +++ b/src/vs/platform/windows/electron-main/windows.ts @@ -43,7 +43,6 @@ export interface IWindowsMainService { onWindowClose: Event; onWindowReload: Event; onPathsOpen: Event; - onRecentPathsChange: Event; // methods ready(initialUserEnv: IProcessEnvironment): void; @@ -63,12 +62,6 @@ export interface IWindowsMainService { getWindowById(windowId: number): ICodeWindow; getWindows(): ICodeWindow[]; getWindowCount(): number; - addToRecentPathsList(paths: { path: string; isFile?: boolean; }[]): void; - getRecentPathsList(workspacePath?: string, filesToOpen?: IPath[]): IRecentPathsList; - removeFromRecentPathsList(path: string): void; - removeFromRecentPathsList(paths: string[]): void; - clearRecentPathsList(): void; - updateWindowsJumpList(): void; quit(): void; } @@ -86,11 +79,6 @@ export interface IOpenConfiguration { initialStartup?: boolean; } -export interface IRecentPathsList { - folders: string[]; - files: string[]; -} - export interface ISharedProcess { whenReady(): TPromise; toggle(): void; diff --git a/src/vs/platform/windows/electron-main/windowsService.ts b/src/vs/platform/windows/electron-main/windowsService.ts index 2838717da3278..f1c49b83feade 100644 --- a/src/vs/platform/windows/electron-main/windowsService.ts +++ b/src/vs/platform/windows/electron-main/windowsService.ts @@ -18,6 +18,7 @@ import { IURLService } from 'vs/platform/url/common/url'; import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; import { ILifecycleService } from "vs/platform/lifecycle/electron-main/lifecycleMain"; import { IWindowsMainService, ISharedProcess } from "vs/platform/windows/electron-main/windows"; +import { IHistoryMainService } from "vs/platform/history/electron-main/historyMainService"; export class WindowsService implements IWindowsService, IDisposable { @@ -33,7 +34,8 @@ export class WindowsService implements IWindowsService, IDisposable { @IWindowsMainService private windowsMainService: IWindowsMainService, @IEnvironmentService private environmentService: IEnvironmentService, @IURLService urlService: IURLService, - @ILifecycleService private lifecycleService: ILifecycleService + @ILifecycleService private lifecycleService: ILifecycleService, + @IHistoryMainService private historyService: IHistoryMainService ) { chain(urlService.onOpenURL) .filter(uri => uri.authority === 'file' && !!uri.path) @@ -124,19 +126,19 @@ export class WindowsService implements IWindowsService, IDisposable { } addToRecentlyOpen(paths: { path: string, isFile?: boolean }[]): TPromise { - this.windowsMainService.addToRecentPathsList(paths); + this.historyService.addToRecentPathsList(paths); return TPromise.as(null); } removeFromRecentlyOpen(paths: string[]): TPromise { - this.windowsMainService.removeFromRecentPathsList(paths); + this.historyService.removeFromRecentPathsList(paths); return TPromise.as(null); } clearRecentPathsList(): TPromise { - this.windowsMainService.clearRecentPathsList(); + this.historyService.clearRecentPathsList(); return TPromise.as(null); } @@ -144,7 +146,7 @@ export class WindowsService implements IWindowsService, IDisposable { const codeWindow = this.windowsMainService.getWindowById(windowId); if (codeWindow) { - const { files, folders } = this.windowsMainService.getRecentPathsList(codeWindow.config.workspacePath, codeWindow.config.filesToOpen); + const { files, folders } = this.historyService.getRecentPathsList(codeWindow.config.workspacePath, codeWindow.config.filesToOpen); return TPromise.as({ files, folders }); } From 2e4f2fb092f27559c3576549a3415d25297d7bf5 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 9 Jun 2017 08:37:24 +0200 Subject: [PATCH 1662/2747] main - move some events into app.ts --- src/vs/code/electron-main/app.ts | 90 ++++++++++++ src/vs/code/electron-main/windows.ts | 207 ++++++++------------------- 2 files changed, 152 insertions(+), 145 deletions(-) diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 53f7e77bd3898..77aa83653c500 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -46,6 +46,10 @@ import { ConfigurationService } from 'vs/platform/configuration/node/configurati import { TPromise } from "vs/base/common/winjs.base"; import { IWindowsMainService } from "vs/platform/windows/electron-main/windows"; import { IHistoryMainService } from "vs/platform/history/electron-main/historyMainService"; +import { isUndefinedOrNull } from "vs/base/common/types"; +import { CodeWindow } from "vs/code/electron-main/window"; +import { isEqual, isParent } from "vs/platform/files/common/files"; +import { KeyboardLayoutMonitor } from "vs/code/electron-main/keyboard"; export class CodeApplication { private toDispose: IDisposable[]; @@ -102,6 +106,51 @@ export class CodeApplication { this.dispose(); }); + app.on('accessibility-support-changed', (event: Event, accessibilitySupportEnabled: boolean) => { + if (this.windowsMainService) { + this.windowsMainService.sendToAll('vscode:accessibilitySupportChanged', accessibilitySupportEnabled); + } + }); + + app.on('activate', (event: Event, hasVisibleWindows: boolean) => { + this.logService.log('App#activate'); + + // Mac only event: open new window when we get activated + if (!hasVisibleWindows && this.windowsMainService) { + this.windowsMainService.openNewWindow(OpenContext.DOCK); + } + }); + + let macOpenFiles: string[] = []; + let runningTimeout: number = null; + app.on('open-file', (event: Event, path: string) => { + this.logService.log('App#open-file: ', path); + event.preventDefault(); + + // Keep in array because more might come! + macOpenFiles.push(path); + + // Clear previous handler if any + if (runningTimeout !== null) { + clearTimeout(runningTimeout); + runningTimeout = null; + } + + // Handle paths delayed in case more are coming! + runningTimeout = setTimeout(() => { + if (this.windowsMainService) { + this.windowsMainService.open({ + context: OpenContext.DOCK /* can also be opening from finder while app is running */, + cli: this.environmentService.args, + pathsToOpen: macOpenFiles, + preferNewWindow: true /* dropping on the dock or opening from finder prefers to open in a new window */ + }); + macOpenFiles = []; + runningTimeout = null; + } + }, 100); + }); + ipc.on('vscode:exit', (event, code: number) => { this.logService.log('IPC#vscode:exit', code); @@ -127,6 +176,47 @@ export class CodeApplication { console.error('Error fetching shell env', err); }); }); + + ipc.on('vscode:broadcast', (event, windowId: number, target: string, broadcast: { channel: string; payload: any; }) => { + if (this.windowsMainService && broadcast.channel && !isUndefinedOrNull(broadcast.payload)) { + this.logService.log('IPC#vscode:broadcast', target, broadcast.channel, broadcast.payload); + + // Handle specific events on main side + this.onBroadcast(broadcast.channel, broadcast.payload); + + // Send to windows + if (target) { + const otherWindowsWithTarget = this.windowsMainService.getWindows().filter(w => w.id !== windowId && typeof w.openedWorkspacePath === 'string'); + const directTargetMatch = otherWindowsWithTarget.filter(w => isEqual(target, w.openedWorkspacePath, !platform.isLinux /* ignorecase */)); + const parentTargetMatch = otherWindowsWithTarget.filter(w => isParent(target, w.openedWorkspacePath, !platform.isLinux /* ignorecase */)); + + const targetWindow = directTargetMatch.length ? directTargetMatch[0] : parentTargetMatch[0]; // prefer direct match over parent match + if (targetWindow) { + targetWindow.send('vscode:broadcast', broadcast); + } + } else { + this.windowsMainService.sendToAll('vscode:broadcast', broadcast, [windowId]); + } + } + }); + + // Keyboard layout changes + KeyboardLayoutMonitor.INSTANCE.onDidChangeKeyboardLayout(isISOKeyboard => { + if (this.windowsMainService) { + this.windowsMainService.sendToAll('vscode:keyboardLayoutChanged', isISOKeyboard); + } + }); + } + + private onBroadcast(event: string, payload: any): void { + + // Theme changes + if (event === 'vscode:changeColorTheme' && typeof payload === 'string') { + let data = JSON.parse(payload); + + this.storageService.setItem(CodeWindow.themeStorageKey, data.id); + this.storageService.setItem(CodeWindow.themeBackgroundStorageKey, data.background); + } } public startup(): void { diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 7e19e0fe30090..c3857975e3049 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -9,7 +9,6 @@ import * as path from 'path'; import * as fs from 'original-fs'; import * as platform from 'vs/base/common/platform'; import * as nls from 'vs/nls'; -import * as types from 'vs/base/common/types'; import * as arrays from 'vs/base/common/arrays'; import { assign, mixin } from 'vs/base/common/objects'; import { IBackupMainService } from 'vs/platform/backup/common/backup'; @@ -26,8 +25,7 @@ import { getLastActiveWindow, findBestWindowOrFolder } from 'vs/code/node/window import CommonEvent, { Emitter } from 'vs/base/common/event'; import product from 'vs/platform/node/product'; import { ITelemetryService, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; -import { isParent, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; -import { KeyboardLayoutMonitor } from 'vs/code/electron-main/keyboard'; +import { isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; import { IWindowsMainService, IOpenConfiguration } from "vs/platform/windows/electron-main/windows"; import { IHistoryMainService } from "vs/platform/history/electron-main/historyMainService"; @@ -100,58 +98,19 @@ export class WindowsManager implements IWindowsMainService { @ITelemetryService private telemetryService: ITelemetryService, @IConfigurationService private configurationService: IConfigurationService, @IHistoryMainService private historyService: IHistoryMainService - ) { } + ) { + this.windowsState = this.storageService.getItem(WindowsManager.windowsStateStorageKey) || { openedFolders: [] }; + } public ready(initialUserEnv: platform.IProcessEnvironment): void { - this.registerListeners(); - this.initialUserEnv = initialUserEnv; - this.windowsState = this.storageService.getItem(WindowsManager.windowsStateStorageKey) || { openedFolders: [] }; + + this.registerListeners(); } private registerListeners(): void { - app.on('accessibility-support-changed', (event: Event, accessibilitySupportEnabled: boolean) => { - this.sendToAll('vscode:accessibilitySupportChanged', accessibilitySupportEnabled); - }); - - app.on('activate', (event: Event, hasVisibleWindows: boolean) => { - this.logService.log('App#activate'); - - // Mac only event: open new window when we get activated - if (!hasVisibleWindows) { - this.openNewWindow(OpenContext.DOCK); - } - }); - - let macOpenFiles: string[] = []; - let runningTimeout: number = null; - app.on('open-file', (event: Event, path: string) => { - this.logService.log('App#open-file: ', path); - event.preventDefault(); - - // Keep in array because more might come! - macOpenFiles.push(path); - - // Clear previous handler if any - if (runningTimeout !== null) { - clearTimeout(runningTimeout); - runningTimeout = null; - } - - // Handle paths delayed in case more are coming! - runningTimeout = setTimeout(() => { - this.open({ - context: OpenContext.DOCK /* can also be opening from finder while app is running */, - cli: this.environmentService.args, - pathsToOpen: macOpenFiles, - preferNewWindow: true /* dropping on the dock or opening from finder prefers to open in a new window */ - }); - macOpenFiles = []; - runningTimeout = null; - }, 100); - }); - + // React to workbench loaded events from windows ipc.on('vscode:workbenchLoaded', (event, windowId: number) => { this.logService.log('IPC#vscode-workbenchLoaded'); @@ -164,35 +123,9 @@ export class WindowsManager implements IWindowsMainService { } }); - ipc.on('vscode:broadcast', (event, windowId: number, target: string, broadcast: { channel: string; payload: any; }) => { - if (broadcast.channel && !types.isUndefinedOrNull(broadcast.payload)) { - this.logService.log('IPC#vscode:broadcast', target, broadcast.channel, broadcast.payload); - - // Handle specific events on main side - this.onBroadcast(broadcast.channel, broadcast.payload); - - // Send to windows - if (target) { - const otherWindowsWithTarget = WindowsManager.WINDOWS.filter(w => w.id !== windowId && typeof w.openedWorkspacePath === 'string'); - const directTargetMatch = otherWindowsWithTarget.filter(w => isEqual(target, w.openedWorkspacePath, !platform.isLinux /* ignorecase */)); - const parentTargetMatch = otherWindowsWithTarget.filter(w => isParent(target, w.openedWorkspacePath, !platform.isLinux /* ignorecase */)); - - const targetWindow = directTargetMatch.length ? directTargetMatch[0] : parentTargetMatch[0]; // prefer direct match over parent match - if (targetWindow) { - targetWindow.send('vscode:broadcast', broadcast); - } - } else { - this.sendToAll('vscode:broadcast', broadcast, [windowId]); - } - } - }); - // Update our windows state before quitting and before closing windows this.lifecycleService.onBeforeWindowClose(win => this.onBeforeWindowClose(win as CodeWindow)); this.lifecycleService.onBeforeQuit(() => this.onBeforeQuit()); - - // Keyboard layout changes - KeyboardLayoutMonitor.INSTANCE.onDidChangeKeyboardLayout(isISOKeyboard => this.sendToAll('vscode:keyboardLayoutChanged', isISOKeyboard)); } // Note that onBeforeQuit() and onBeforeWindowClose() are fired in different order depending on the OS: @@ -275,16 +208,6 @@ export class WindowsManager implements IWindowsMainService { } } - private onBroadcast(event: string, payload: any): void { - - // Theme changes - if (event === 'vscode:changeColorTheme' && typeof payload === 'string') { - - let data = JSON.parse(payload); - this.storageService.setItem(CodeWindow.themeStorageKey, data.id); - this.storageService.setItem(CodeWindow.themeBackgroundStorageKey, data.background); - } - } public reload(win: CodeWindow, cli?: ParsedArgs): void { // Only reload when the window has not vetoed this @@ -525,12 +448,6 @@ export class WindowsManager implements IWindowsMainService { return arrays.distinct(usedWindows); } - - - private getWindowUserEnv(openConfig: IOpenConfiguration): platform.IProcessEnvironment { - return assign({}, this.initialUserEnv, openConfig.userEnv || {}); - } - public openExtensionDevelopmentHostWindow(openConfig: IOpenConfiguration): void { // Reload an existing extension development host window on the same path @@ -568,7 +485,7 @@ export class WindowsManager implements IWindowsMainService { const configuration: IWindowConfiguration = mixin({}, config.cli); // inherit all properties from CLI configuration.appRoot = this.environmentService.appRoot; configuration.execPath = process.execPath; - configuration.userEnv = this.getWindowUserEnv(config); + configuration.userEnv = assign({}, this.initialUserEnv, config.userEnv || {}); configuration.isInitialStartup = config.initialStartup; configuration.workspacePath = workspacePath; configuration.filesToOpen = filesToOpen; @@ -852,60 +769,6 @@ export class WindowsManager implements IWindowsMainService { return state; } - public openFileFolderPicker(forceNewWindow?: boolean, data?: ITelemetryData): void { - this.doPickAndOpen({ pickFolders: true, pickFiles: true, forceNewWindow }, 'openFileFolder', data); - } - - public openFilePicker(forceNewWindow?: boolean, path?: string, window?: CodeWindow, data?: ITelemetryData): void { - this.doPickAndOpen({ pickFiles: true, forceNewWindow, path, window }, 'openFile', data); - } - - public openFolderPicker(forceNewWindow?: boolean, window?: CodeWindow, data?: ITelemetryData): void { - this.doPickAndOpen({ pickFolders: true, forceNewWindow, window }, 'openFolder', data); - } - - private doPickAndOpen(options: INativeOpenDialogOptions, eventName: string, data?: ITelemetryData): void { - this.getFileOrFolderPaths(options, (paths: string[]) => { - const nOfPaths = paths ? paths.length : 0; - if (nOfPaths) { - this.open({ context: OpenContext.DIALOG, cli: this.environmentService.args, pathsToOpen: paths, forceNewWindow: options.forceNewWindow }); - } - this.telemetryService.publicLog(eventName, { - ...data, - outcome: nOfPaths ? 'success' : 'canceled', - nOfPaths - }); - }); - } - - private getFileOrFolderPaths(options: INativeOpenDialogOptions, clb: (paths: string[]) => void): void { - const workingDir = options.path || this.storageService.getItem(WindowsManager.workingDirPickerStorageKey); - const focussedWindow = options.window || this.getFocusedWindow(); - - let pickerProperties: ('openFile' | 'openDirectory' | 'multiSelections' | 'createDirectory')[]; - if (options.pickFiles && options.pickFolders) { - pickerProperties = ['multiSelections', 'openDirectory', 'openFile', 'createDirectory']; - } else { - pickerProperties = ['multiSelections', options.pickFolders ? 'openDirectory' : 'openFile', 'createDirectory']; - } - - dialog.showOpenDialog(focussedWindow && focussedWindow.win, { - defaultPath: workingDir, - properties: pickerProperties - }, paths => { - if (paths && paths.length > 0) { - - // Remember path in storage for next time - this.storageService.setItem(WindowsManager.workingDirPickerStorageKey, path.dirname(paths[0])); - - // Return - clb(paths); - } else { - clb(void (0)); - } - }); - } - public focusLastActive(cli: ParsedArgs, context: OpenContext): CodeWindow { const lastActive = this.getLastActiveWindow(); if (lastActive) { @@ -1080,6 +943,60 @@ export class WindowsManager implements IWindowsMainService { this._onWindowClose.fire(win.id); } + public openFileFolderPicker(forceNewWindow?: boolean, data?: ITelemetryData): void { + this.doPickAndOpen({ pickFolders: true, pickFiles: true, forceNewWindow }, 'openFileFolder', data); + } + + public openFilePicker(forceNewWindow?: boolean, path?: string, window?: CodeWindow, data?: ITelemetryData): void { + this.doPickAndOpen({ pickFiles: true, forceNewWindow, path, window }, 'openFile', data); + } + + public openFolderPicker(forceNewWindow?: boolean, window?: CodeWindow, data?: ITelemetryData): void { + this.doPickAndOpen({ pickFolders: true, forceNewWindow, window }, 'openFolder', data); + } + + private doPickAndOpen(options: INativeOpenDialogOptions, eventName: string, data?: ITelemetryData): void { + this.getFileOrFolderPaths(options, (paths: string[]) => { + const nOfPaths = paths ? paths.length : 0; + if (nOfPaths) { + this.open({ context: OpenContext.DIALOG, cli: this.environmentService.args, pathsToOpen: paths, forceNewWindow: options.forceNewWindow }); + } + this.telemetryService.publicLog(eventName, { + ...data, + outcome: nOfPaths ? 'success' : 'canceled', + nOfPaths + }); + }); + } + + private getFileOrFolderPaths(options: INativeOpenDialogOptions, clb: (paths: string[]) => void): void { + const workingDir = options.path || this.storageService.getItem(WindowsManager.workingDirPickerStorageKey); + const focussedWindow = options.window || this.getFocusedWindow(); + + let pickerProperties: ('openFile' | 'openDirectory' | 'multiSelections' | 'createDirectory')[]; + if (options.pickFiles && options.pickFolders) { + pickerProperties = ['multiSelections', 'openDirectory', 'openFile', 'createDirectory']; + } else { + pickerProperties = ['multiSelections', options.pickFolders ? 'openDirectory' : 'openFile', 'createDirectory']; + } + + dialog.showOpenDialog(focussedWindow && focussedWindow.win, { + defaultPath: workingDir, + properties: pickerProperties + }, paths => { + if (paths && paths.length > 0) { + + // Remember path in storage for next time + this.storageService.setItem(WindowsManager.workingDirPickerStorageKey, path.dirname(paths[0])); + + // Return + clb(paths); + } else { + clb(void (0)); + } + }); + } + public quit(): void { // If the user selected to exit from an extension development host window, do not quit, but just From 16ffd060c4e4160894f1f5781f26b3909fd3247d Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 9 Jun 2017 08:49:47 +0200 Subject: [PATCH 1663/2747] Fixes Microsoft/monaco-editor#388: Validate tokens produced by custom tokenizers --- .../browser/standalone/standaloneLanguages.ts | 43 ++++- .../standalone/standaloneLanguages.test.ts | 178 ++++++++++++++++++ 2 files changed, 214 insertions(+), 7 deletions(-) create mode 100644 src/vs/editor/test/browser/standalone/standaloneLanguages.test.ts diff --git a/src/vs/editor/browser/standalone/standaloneLanguages.ts b/src/vs/editor/browser/standalone/standaloneLanguages.ts index 2e23e5a33ec02..0750a1db0a9db 100644 --- a/src/vs/editor/browser/standalone/standaloneLanguages.ts +++ b/src/vs/editor/browser/standalone/standaloneLanguages.ts @@ -89,9 +89,23 @@ export class TokenizationSupport2Adapter implements modes.ITokenizationSupport { private _toClassicTokens(tokens: IToken[], language: string, offsetDelta: number): Token[] { let result: Token[] = []; + let previousStartIndex: number = 0; for (let i = 0, len = tokens.length; i < len; i++) { - let t = tokens[i]; - result[i] = new Token(t.startIndex + offsetDelta, t.scopes, language); + const t = tokens[i]; + let startIndex = t.startIndex; + + // Prevent issues stemming from a buggy external tokenizer. + if (i === 0) { + // Force first token to start at first index! + startIndex = 0; + } else if (startIndex < previousStartIndex) { + // Force tokens to be after one another! + startIndex = previousStartIndex; + } + + result[i] = new Token(startIndex + offsetDelta, t.scopes, language); + + previousStartIndex = startIndex; } return result; } @@ -112,19 +126,34 @@ export class TokenizationSupport2Adapter implements modes.ITokenizationSupport { } private _toBinaryTokens(tokens: IToken[], offsetDelta: number): Uint32Array { - let languageId = this._languageIdentifier.id; - let tokenTheme = this._standaloneThemeService.getTheme().tokenTheme; + const languageId = this._languageIdentifier.id; + const tokenTheme = this._standaloneThemeService.getTheme().tokenTheme; let result: number[] = [], resultLen = 0; + let previousStartIndex: number = 0; for (let i = 0, len = tokens.length; i < len; i++) { - let t = tokens[i]; - let metadata = tokenTheme.match(languageId, t.scopes); + const t = tokens[i]; + const metadata = tokenTheme.match(languageId, t.scopes); if (resultLen > 0 && result[resultLen - 1] === metadata) { // same metadata continue; } - result[resultLen++] = t.startIndex; + + let startIndex = t.startIndex; + + // Prevent issues stemming from a buggy external tokenizer. + if (i === 0) { + // Force first token to start at first index! + startIndex = 0; + } else if (startIndex < previousStartIndex) { + // Force tokens to be after one another! + startIndex = previousStartIndex; + } + + result[resultLen++] = startIndex + offsetDelta; result[resultLen++] = metadata; + + previousStartIndex = startIndex; } let actualResult = new Uint32Array(resultLen); diff --git a/src/vs/editor/test/browser/standalone/standaloneLanguages.test.ts b/src/vs/editor/test/browser/standalone/standaloneLanguages.test.ts new file mode 100644 index 0000000000000..eed002041d112 --- /dev/null +++ b/src/vs/editor/test/browser/standalone/standaloneLanguages.test.ts @@ -0,0 +1,178 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import { TokenizationSupport2Adapter, TokensProvider, ILineTokens, IToken } from "vs/editor/browser/standalone/standaloneLanguages"; +import { IStandaloneThemeService, IStandaloneThemeData, IStandaloneTheme } from "vs/editor/common/services/standaloneThemeService"; +import Event from 'vs/base/common/event'; +import { ITheme, LIGHT } from "vs/platform/theme/common/themeService"; +import { LanguageIdentifier, LanguageId, IState, MetadataConsts } from "vs/editor/common/modes"; +import { Token } from "vs/editor/common/core/token"; +import { TokenTheme } from "vs/editor/common/modes/supports/tokenization"; +import { ColorIdentifier } from "vs/platform/theme/common/colorRegistry"; +import { Color } from "vs/base/common/color"; + +suite('TokenizationSupport2Adapter', () => { + + const languageIdentifier = new LanguageIdentifier('tttt', LanguageId.PlainText); + const tokenMetadata = (languageIdentifier.id << MetadataConsts.LANGUAGEID_OFFSET); + + class MockTokenTheme extends TokenTheme { + private counter = 0; + constructor() { + super(null, null); + } + public match(languageId: LanguageId, token: string): number { + return ( + ((this.counter++) << MetadataConsts.FOREGROUND_OFFSET) + | (languageId << MetadataConsts.LANGUAGEID_OFFSET) + ) >>> 0; + } + } + + class MockThemeService implements IStandaloneThemeService { + _serviceBrand = null; + public setTheme(themeName: string): string { + throw new Error('Not implemented'); + } + public defineTheme(themeName: string, themeData: IStandaloneThemeData): void { + throw new Error('Not implemented'); + } + public getTheme(): IStandaloneTheme { + return { + tokenTheme: new MockTokenTheme(), + + type: LIGHT, + + getColor: (color: ColorIdentifier, useDefault?: boolean): Color => { + throw new Error('Not implemented'); + }, + + defines: (color: ColorIdentifier): boolean => { + throw new Error('Not implemented'); + } + }; + } + public onThemeChange: Event = null; + } + + class MockState implements IState { + public static INSTANCE = new MockState(); + private constructor() { } + public clone(): IState { + return this; + } + public equals(other: IState): boolean { + return this === other; + } + } + + function testBadTokensProvider(providerTokens: IToken[], offsetDelta: number, expectedClassicTokens: Token[], expectedModernTokens: number[]): void { + + class BadTokensProvider implements TokensProvider { + public getInitialState(): IState { + return MockState.INSTANCE; + } + public tokenize(line: string, state: IState): ILineTokens { + return { + tokens: providerTokens, + endState: MockState.INSTANCE + }; + } + } + + const adapter = new TokenizationSupport2Adapter(new MockThemeService(), languageIdentifier, new BadTokensProvider()); + + const actualClassicTokens = adapter.tokenize('whatever', MockState.INSTANCE, offsetDelta); + assert.deepEqual(actualClassicTokens.tokens, expectedClassicTokens); + + const actualModernTokens = adapter.tokenize2('whatever', MockState.INSTANCE, offsetDelta); + const modernTokens: number[] = []; + for (let i = 0; i < actualModernTokens.tokens.length; i++) { + modernTokens[i] = actualModernTokens.tokens[i]; + } + assert.deepEqual(modernTokens, expectedModernTokens); + } + + test('tokens always start at index 0 (no offset delta)', () => { + testBadTokensProvider( + [ + { startIndex: 7, scopes: 'foo' }, + { startIndex: 0, scopes: 'bar' } + ], + 0, + [ + new Token(0, 'foo', languageIdentifier.language), + new Token(0, 'bar', languageIdentifier.language), + ], + [ + 0, tokenMetadata | (0 << MetadataConsts.FOREGROUND_OFFSET), + 0, tokenMetadata | (1 << MetadataConsts.FOREGROUND_OFFSET) + ] + ); + }); + + test('tokens always start after each other (no offset delta)', () => { + testBadTokensProvider( + [ + { startIndex: 0, scopes: 'foo' }, + { startIndex: 5, scopes: 'bar' }, + { startIndex: 3, scopes: 'foo' }, + ], + 0, + [ + new Token(0, 'foo', languageIdentifier.language), + new Token(5, 'bar', languageIdentifier.language), + new Token(5, 'foo', languageIdentifier.language), + ], + [ + 0, tokenMetadata | (0 << MetadataConsts.FOREGROUND_OFFSET), + 5, tokenMetadata | (1 << MetadataConsts.FOREGROUND_OFFSET), + 5, tokenMetadata | (2 << MetadataConsts.FOREGROUND_OFFSET) + ] + ); + }); + + test('tokens always start at index 0 (with offset delta)', () => { + testBadTokensProvider( + [ + { startIndex: 7, scopes: 'foo' }, + { startIndex: 0, scopes: 'bar' } + ], + 7, + [ + new Token(7, 'foo', languageIdentifier.language), + new Token(7, 'bar', languageIdentifier.language), + ], + [ + 7, tokenMetadata | (0 << MetadataConsts.FOREGROUND_OFFSET), + 7, tokenMetadata | (1 << MetadataConsts.FOREGROUND_OFFSET) + ] + ); + }); + + test('tokens always start after each other (with offset delta)', () => { + testBadTokensProvider( + [ + { startIndex: 0, scopes: 'foo' }, + { startIndex: 5, scopes: 'bar' }, + { startIndex: 3, scopes: 'foo' }, + ], + 7, + [ + new Token(7, 'foo', languageIdentifier.language), + new Token(12, 'bar', languageIdentifier.language), + new Token(12, 'foo', languageIdentifier.language), + ], + [ + 7, tokenMetadata | (0 << MetadataConsts.FOREGROUND_OFFSET), + 12, tokenMetadata | (1 << MetadataConsts.FOREGROUND_OFFSET), + 12, tokenMetadata | (2 << MetadataConsts.FOREGROUND_OFFSET) + ] + ); + }); + +}); \ No newline at end of file From e51b11b5a68efe976cb39fb4a54515603874cc57 Mon Sep 17 00:00:00 2001 From: jens1o Date: Fri, 9 Jun 2017 08:52:59 +0200 Subject: [PATCH 1664/2747] add more settings to gear menu --- src/vs/workbench/parts/update/electron-browser/update.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/workbench/parts/update/electron-browser/update.ts b/src/vs/workbench/parts/update/electron-browser/update.ts index c42a94259bae3..a45dc3b22f2ed 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.ts @@ -282,6 +282,8 @@ export class LightUpdateContribution implements IGlobalActivity { private static readonly showCommandsId = 'workbench.action.showCommands'; private static readonly openSettingsId = 'workbench.action.openGlobalSettings'; private static readonly openKeybindingsId = 'workbench.action.openGlobalKeybindings'; + private static readonly selectIconThemeId = 'workbench.action.selectIconTheme'; + private static readonly selectColorThemeId = 'workbench.action.selectTheme'; get id() { return 'vs.update'; } get name() { return ''; } @@ -324,6 +326,9 @@ export class LightUpdateContribution implements IGlobalActivity { new Action(LightUpdateContribution.openSettingsId, nls.localize('settings', "Settings"), null, true, () => this.commandService.executeCommand(LightUpdateContribution.openSettingsId)), new Action(LightUpdateContribution.openKeybindingsId, nls.localize('keyboardShortcuts', "Keyboard Shortcuts"), null, true, () => this.commandService.executeCommand(LightUpdateContribution.openKeybindingsId)), new Separator(), + new Action(LightUpdateContribution.selectIconThemeId, nls.localize('themes.selectIconTheme', "Select File Icon Theme"), null, true, () => this.commandService.executeCommand(LightUpdateContribution.selectIconThemeId)), + new Action(LightUpdateContribution.selectColorThemeId, nls.localize('selectTheme.label', "Color Theme"), null, true, () => this.commandService.executeCommand(LightUpdateContribution.selectColorThemeId)), + new Separator(), this.getUpdateAction() ]; } From 455a4e65db838cdcc96cb40c847201044130b4f6 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 9 Jun 2017 08:55:19 +0200 Subject: [PATCH 1665/2747] :lipstick: --- src/vs/code/electron-main/windows.ts | 109 +++++++++++++++------------ 1 file changed, 62 insertions(+), 47 deletions(-) diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index c3857975e3049..93a7c4c7120c8 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -49,14 +49,6 @@ interface IWindowsState { openedFolders: IWindowState[]; } -interface INativeOpenDialogOptions { - pickFolders?: boolean; - pickFiles?: boolean; - path?: string; - forceNewWindow?: boolean; - window?: CodeWindow; -} - const ReopenFoldersSetting = { ALL: 'all', ONE: 'one', @@ -67,7 +59,6 @@ export class WindowsManager implements IWindowsMainService { _serviceBrand: any; - private static workingDirPickerStorageKey = 'pickerWorkingDir'; private static windowsStateStorageKey = 'windowsState'; private static WINDOWS: CodeWindow[] = []; @@ -77,6 +68,8 @@ export class WindowsManager implements IWindowsMainService { private windowsState: IWindowsState; private lastClosedWindowState: IWindowState; + private fileDialog: FileDialog; + private _onWindowReady = new Emitter(); onWindowReady: CommonEvent = this._onWindowReady.event; @@ -100,6 +93,7 @@ export class WindowsManager implements IWindowsMainService { @IHistoryMainService private historyService: IHistoryMainService ) { this.windowsState = this.storageService.getItem(WindowsManager.windowsStateStorageKey) || { openedFolders: [] }; + this.fileDialog = new FileDialog(environmentService, telemetryService, storageService, this); } public ready(initialUserEnv: platform.IProcessEnvironment): void { @@ -208,19 +202,6 @@ export class WindowsManager implements IWindowsMainService { } } - public reload(win: CodeWindow, cli?: ParsedArgs): void { - - // Only reload when the window has not vetoed this - this.lifecycleService.unload(win, UnloadReason.RELOAD).done(veto => { - if (!veto) { - win.reload(cli); - - // Emit - this._onWindowReload.fire(win.id); - } - }); - } - public open(openConfig: IOpenConfiguration): CodeWindow[] { const windowConfig = this.configurationService.getConfiguration('window'); @@ -769,6 +750,19 @@ export class WindowsManager implements IWindowsMainService { return state; } + public reload(win: CodeWindow, cli?: ParsedArgs): void { + + // Only reload when the window has not vetoed this + this.lifecycleService.unload(win, UnloadReason.RELOAD).done(veto => { + if (!veto) { + win.reload(cli); + + // Emit + this._onWindowReload.fire(win.id); + } + }); + } + public focusLastActive(cli: ParsedArgs, context: OpenContext): CodeWindow { const lastActive = this.getLastActiveWindow(); if (lastActive) { @@ -944,22 +938,60 @@ export class WindowsManager implements IWindowsMainService { } public openFileFolderPicker(forceNewWindow?: boolean, data?: ITelemetryData): void { - this.doPickAndOpen({ pickFolders: true, pickFiles: true, forceNewWindow }, 'openFileFolder', data); + this.fileDialog.pickAndOpen({ pickFolders: true, pickFiles: true, forceNewWindow }, 'openFileFolder', data); } public openFilePicker(forceNewWindow?: boolean, path?: string, window?: CodeWindow, data?: ITelemetryData): void { - this.doPickAndOpen({ pickFiles: true, forceNewWindow, path, window }, 'openFile', data); + this.fileDialog.pickAndOpen({ pickFiles: true, forceNewWindow, path, window }, 'openFile', data); } public openFolderPicker(forceNewWindow?: boolean, window?: CodeWindow, data?: ITelemetryData): void { - this.doPickAndOpen({ pickFolders: true, forceNewWindow, window }, 'openFolder', data); + this.fileDialog.pickAndOpen({ pickFolders: true, forceNewWindow, window }, 'openFolder', data); + } + + public quit(): void { + + // If the user selected to exit from an extension development host window, do not quit, but just + // close the window unless this is the last window that is opened. + const codeWindow = this.getFocusedWindow(); + if (codeWindow && codeWindow.isExtensionDevelopmentHost && this.getWindowCount() > 1) { + codeWindow.win.close(); + } + + // Otherwise: normal quit + else { + setTimeout(() => { + this.lifecycleService.quit(); + }, 10 /* delay to unwind callback stack (IPC) */); + } } +} + +interface INativeOpenDialogOptions { + pickFolders?: boolean; + pickFiles?: boolean; + path?: string; + forceNewWindow?: boolean; + window?: CodeWindow; +} + +class FileDialog { + + private static workingDirPickerStorageKey = 'pickerWorkingDir'; - private doPickAndOpen(options: INativeOpenDialogOptions, eventName: string, data?: ITelemetryData): void { + constructor( + private environmentService: IEnvironmentService, + private telemetryService: ITelemetryService, + private storageService: IStorageService, + private windowsMainService: IWindowsMainService + ) { + } + + public pickAndOpen(options: INativeOpenDialogOptions, eventName: string, data?: ITelemetryData): void { this.getFileOrFolderPaths(options, (paths: string[]) => { const nOfPaths = paths ? paths.length : 0; if (nOfPaths) { - this.open({ context: OpenContext.DIALOG, cli: this.environmentService.args, pathsToOpen: paths, forceNewWindow: options.forceNewWindow }); + this.windowsMainService.open({ context: OpenContext.DIALOG, cli: this.environmentService.args, pathsToOpen: paths, forceNewWindow: options.forceNewWindow }); } this.telemetryService.publicLog(eventName, { ...data, @@ -970,8 +1002,8 @@ export class WindowsManager implements IWindowsMainService { } private getFileOrFolderPaths(options: INativeOpenDialogOptions, clb: (paths: string[]) => void): void { - const workingDir = options.path || this.storageService.getItem(WindowsManager.workingDirPickerStorageKey); - const focussedWindow = options.window || this.getFocusedWindow(); + const workingDir = options.path || this.storageService.getItem(FileDialog.workingDirPickerStorageKey); + const focussedWindow = options.window || this.windowsMainService.getFocusedWindow(); let pickerProperties: ('openFile' | 'openDirectory' | 'multiSelections' | 'createDirectory')[]; if (options.pickFiles && options.pickFolders) { @@ -987,7 +1019,7 @@ export class WindowsManager implements IWindowsMainService { if (paths && paths.length > 0) { // Remember path in storage for next time - this.storageService.setItem(WindowsManager.workingDirPickerStorageKey, path.dirname(paths[0])); + this.storageService.setItem(FileDialog.workingDirPickerStorageKey, path.dirname(paths[0])); // Return clb(paths); @@ -996,21 +1028,4 @@ export class WindowsManager implements IWindowsMainService { } }); } - - public quit(): void { - - // If the user selected to exit from an extension development host window, do not quit, but just - // close the window unless this is the last window that is opened. - const codeWindow = this.getFocusedWindow(); - if (codeWindow && codeWindow.isExtensionDevelopmentHost && this.getWindowCount() > 1) { - codeWindow.win.close(); - } - - // Otherwise: normal quit - else { - setTimeout(() => { - this.lifecycleService.quit(); - }, 10 /* delay to unwind callback stack (IPC) */); - } - } } \ No newline at end of file From 0a6a94a1e4f72d6df49308e982a957afa7f9ee89 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 9 Jun 2017 10:08:17 +0200 Subject: [PATCH 1666/2747] ref - apply editor font to reference search tree --- .../browser/referencesWidget.ts | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index 29bc862addee6..d40a682c8f88d 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -385,8 +385,9 @@ class OneReferenceTemplate { readonly before: HTMLSpanElement; readonly inside: HTMLSpanElement; readonly after: HTMLSpanElement; + readonly dispose: () => void; - constructor(container: HTMLElement) { + constructor(container: HTMLElement, editor: ICodeEditor) { const parent = document.createElement('div'); this.before = document.createElement('span'); this.inside = document.createElement('span'); @@ -397,6 +398,14 @@ class OneReferenceTemplate { parent.appendChild(this.inside); parent.appendChild(this.after); container.appendChild(parent); + + function applyFontInfo() { + container.style.fontFamily = editor.getConfiguration().fontInfo.fontFamily; + } + + applyFontInfo(); + const reg = editor.onDidChangeConfiguration(e => e.fontInfo && applyFontInfo()); + this.dispose = () => reg.dispose(); } set(element: OneReference): void { @@ -415,9 +424,10 @@ class Renderer implements tree.IRenderer { }; constructor( + private _editor: ICodeEditor, @IWorkspaceContextService private _contextService: IWorkspaceContextService, @IThemeService private _themeService: IThemeService, - @optional(IEnvironmentService) private _environmentService: IEnvironmentService + @optional(IEnvironmentService) private _environmentService: IEnvironmentService, ) { // } @@ -439,7 +449,7 @@ class Renderer implements tree.IRenderer { if (templateId === Renderer._ids.FileReferences) { return new FileReferencesTemplate(container, this._contextService, this._environmentService, this._themeService); } else if (templateId === Renderer._ids.OneReference) { - return new OneReferenceTemplate(container); + return new OneReferenceTemplate(container, this._editor); } throw templateId; } @@ -455,9 +465,7 @@ class Renderer implements tree.IRenderer { } disposeTemplate(tree: tree.ITree, templateId: string, templateData: any): void { - if (templateData instanceof FileReferencesTemplate) { - templateData.dispose(); - } + templateData.dispose(); } } @@ -680,7 +688,7 @@ export class ReferenceWidget extends PeekViewWidget { container.div({ 'class': 'ref-tree inline' }, (div: Builder) => { var config = { dataSource: this._instantiationService.createInstance(DataSource), - renderer: this._instantiationService.createInstance(Renderer), + renderer: this._instantiationService.createInstance(Renderer, this.editor), controller: new Controller(), // TODO@{Joh,Ben} make this work with the embedded tree // accessibilityProvider: new AriaProvider() From 593efb9b89a3746e9623c4c8adadddd299b46562 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 9 Jun 2017 10:26:42 +0200 Subject: [PATCH 1667/2747] Fixes Microsoft/monaco-editor#412: Fix comparison to cover also empty strings --- src/vs/editor/common/modes/monarch/monarchLexer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/common/modes/monarch/monarchLexer.ts b/src/vs/editor/common/modes/monarch/monarchLexer.ts index fd57abca71ab9..bc6f63811383b 100644 --- a/src/vs/editor/common/modes/monarch/monarchLexer.ts +++ b/src/vs/editor/common/modes/monarch/monarchLexer.ts @@ -755,7 +755,7 @@ export class MonarchTokenizer implements modes.ITokenizationSupport { tokensCollector.emit(pos0 + offsetDelta, tokenType); } - if (enteringEmbeddedMode) { + if (enteringEmbeddedMode !== null) { // substitute language alias to known modes to support syntax highlighting let enteringEmbeddedModeId = this._modeService.getModeIdForLanguageName(enteringEmbeddedMode); if (enteringEmbeddedModeId) { From 3e81316eab43552f51de4d563f04acdbb56a1108 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 9 Jun 2017 10:34:35 +0200 Subject: [PATCH 1668/2747] Revert "load main.js while waiting for app.isReady, #17108" This reverts commit 174fafae53ec26bc3dc1216080061449b17fb080. --- src/main.js | 17 +++++++++-------- src/vs/code/electron-main/main.ts | 14 +------------- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/src/main.js b/src/main.js index 9576d766aafc6..9bba0165cd70f 100644 --- a/src/main.js +++ b/src/main.js @@ -227,12 +227,13 @@ var nodeCachedDataDir = getNodeCachedDataDir().then(function (value) { } }); -var nlsConfig = getNLSConfiguration(); -process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig); - -var bootstrap = require('./bootstrap-amd'); -nodeCachedDataDir.then(function () { - bootstrap.bootstrap('vs/code/electron-main/main'); -}, function (err) { - console.error(err); +// Load our code once ready +app.once('ready', function () { + global.perfAppReady = Date.now(); + var nlsConfig = getNLSConfiguration(); + process.env['VSCODE_NLS_CONFIG'] = JSON.stringify(nlsConfig); + + nodeCachedDataDir.then(function () { + require('./bootstrap-amd').bootstrap('vs/code/electron-main/main'); + }, console.error); }); diff --git a/src/vs/code/electron-main/main.ts b/src/vs/code/electron-main/main.ts index 95b5fbed51b26..8af2717ffec1f 100644 --- a/src/vs/code/electron-main/main.ts +++ b/src/vs/code/electron-main/main.ts @@ -201,16 +201,4 @@ function main() { }).done(null, err => instantiationService.invokeFunction(quit, err)); } -// Get going once we are ready -// TODO@Joh,Joao there more more potential here -// we should check for other instances etc while -// waiting for getting ready -if (app.isReady()) { - global.perfAppReady = Date.now(); - main(); -} else { - app.once('ready', () => { - global.perfAppReady = Date.now(); - main(); - }); -} +main(); \ No newline at end of file From 9202b6a922af878e9d8e5e34bf0f5e4be78fe44b Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 6 Jun 2017 11:55:37 +0200 Subject: [PATCH 1669/2747] Debt: Rename views to viewsRegistry --- src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts | 2 +- src/vs/workbench/parts/files/browser/explorerViewlet.ts | 2 +- src/vs/workbench/parts/files/browser/views/emptyView.ts | 2 +- src/vs/workbench/parts/files/browser/views/explorerView.ts | 2 +- src/vs/workbench/parts/views/browser/treeView.ts | 2 +- src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts | 2 +- .../parts/views/browser/{views.ts => viewsRegistry.ts} | 0 7 files changed, 6 insertions(+), 6 deletions(-) rename src/vs/workbench/parts/views/browser/{views.ts => viewsRegistry.ts} (100%) diff --git a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts index b429be717105f..18ea315cca72b 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadTreeViews.ts @@ -9,7 +9,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { ExtHostContext, MainThreadTreeViewsShape, ExtHostTreeViewsShape } from '../node/extHost.protocol'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; -import { ViewsRegistry } from 'vs/workbench/parts/views/browser/views'; +import { ViewsRegistry } from 'vs/workbench/parts/views/browser/viewsRegistry'; import { ITreeViewDataProvider, ITreeItem, TreeItemCollapsibleState } from 'vs/workbench/parts/views/common/views'; export class MainThreadTreeViews extends MainThreadTreeViewsShape { diff --git a/src/vs/workbench/parts/files/browser/explorerViewlet.ts b/src/vs/workbench/parts/files/browser/explorerViewlet.ts index 59a054490ff74..38ae653e1199f 100644 --- a/src/vs/workbench/parts/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/browser/explorerViewlet.ts @@ -32,7 +32,7 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { attachHeaderViewStyler } from 'vs/platform/theme/common/styler'; -import { ViewsRegistry, ViewLocation, IViewDescriptor } from 'vs/workbench/parts/views/browser/views'; +import { ViewsRegistry, ViewLocation, IViewDescriptor } from 'vs/workbench/parts/views/browser/viewsRegistry'; interface IViewState { collapsed: boolean; diff --git a/src/vs/workbench/parts/files/browser/views/emptyView.ts b/src/vs/workbench/parts/files/browser/views/emptyView.ts index de505174be186..5a46c95e1a6f9 100644 --- a/src/vs/workbench/parts/files/browser/views/emptyView.ts +++ b/src/vs/workbench/parts/files/browser/views/emptyView.ts @@ -18,7 +18,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { OpenFolderAction, OpenFileFolderAction } from 'vs/workbench/browser/actions/fileActions'; import { attachButtonStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { IViewOptions } from 'vs/workbench/parts/views/browser/views'; +import { IViewOptions } from 'vs/workbench/parts/views/browser/viewsRegistry'; export class EmptyView extends CollapsibleView { diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index d86e3af83925e..c16abfd280a27 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -42,7 +42,7 @@ import { IWorkbenchThemeService, IFileIconTheme } from 'vs/workbench/services/th import { isLinux } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { attachListStyler } from 'vs/platform/theme/common/styler'; -import { IViewOptions } from 'vs/workbench/parts/views/browser/views'; +import { IViewOptions } from 'vs/workbench/parts/views/browser/viewsRegistry'; export class ExplorerView extends CollapsibleViewletView { diff --git a/src/vs/workbench/parts/views/browser/treeView.ts b/src/vs/workbench/parts/views/browser/treeView.ts index b7c390987668d..3fe6cf31d1379 100644 --- a/src/vs/workbench/parts/views/browser/treeView.ts +++ b/src/vs/workbench/parts/views/browser/treeView.ts @@ -26,7 +26,7 @@ import { IProgressService } from 'vs/platform/progress/common/progress'; import { ITree, IDataSource, IRenderer, ContextMenuEvent } from 'vs/base/parts/tree/browser/tree'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { ActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; -import { ViewsRegistry, IViewOptions } from 'vs/workbench/parts/views/browser/views'; +import { ViewsRegistry, IViewOptions } from 'vs/workbench/parts/views/browser/viewsRegistry'; import { ITreeViewDataProvider, ITreeItem, TreeItemCollapsibleState, TreeViewItemHandleArg } from 'vs/workbench/parts/views/common/views'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { CollapsibleState } from 'vs/base/browser/ui/splitview/splitview'; diff --git a/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts b/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts index e7cc066c06a21..a5f21d877cefd 100644 --- a/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts +++ b/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts @@ -8,7 +8,7 @@ import { localize } from 'vs/nls'; import { forEach } from 'vs/base/common/collections'; import { IJSONSchema } from 'vs/base/common/jsonSchema'; import { ExtensionMessageCollector, ExtensionsRegistry } from 'vs/platform/extensions/common/extensionsRegistry'; -import { ViewLocation, ViewsRegistry } from 'vs/workbench/parts/views/browser/views'; +import { ViewLocation, ViewsRegistry } from 'vs/workbench/parts/views/browser/viewsRegistry'; import { TreeView } from 'vs/workbench/parts/views/browser/treeView'; namespace schema { diff --git a/src/vs/workbench/parts/views/browser/views.ts b/src/vs/workbench/parts/views/browser/viewsRegistry.ts similarity index 100% rename from src/vs/workbench/parts/views/browser/views.ts rename to src/vs/workbench/parts/views/browser/viewsRegistry.ts From ae4472e2114d55cdbb0d6451d89e26401b989471 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 6 Jun 2017 12:48:30 +0200 Subject: [PATCH 1670/2747] Debt: Move viewlet views to views package --- src/vs/workbench/browser/viewlet.ts | 337 +---------------- .../parts/debug/browser/debugViewRegistry.ts | 2 +- .../parts/debug/browser/debugViewlet.ts | 3 +- .../debug/electron-browser/debugViews.ts | 3 +- .../parts/files/browser/explorerViewlet.ts | 3 +- .../parts/files/browser/views/explorerView.ts | 3 +- .../files/browser/views/openEditorsView.ts | 2 +- .../workbench/parts/views/browser/treeView.ts | 2 +- src/vs/workbench/parts/views/browser/views.ts | 344 ++++++++++++++++++ .../parts/views/browser/viewsRegistry.ts | 2 +- 10 files changed, 358 insertions(+), 343 deletions(-) create mode 100644 src/vs/workbench/parts/views/browser/views.ts diff --git a/src/vs/workbench/browser/viewlet.ts b/src/vs/workbench/browser/viewlet.ts index 5f153eee59cbe..d4638f10439d5 100644 --- a/src/vs/workbench/browser/viewlet.ts +++ b/src/vs/workbench/browser/viewlet.ts @@ -8,23 +8,13 @@ import { TPromise } from 'vs/base/common/winjs.base'; import DOM = require('vs/base/browser/dom'); import errors = require('vs/base/common/errors'); import { Registry } from 'vs/platform/platform'; -import { Dimension, Builder, $ } from 'vs/base/browser/builder'; -import { IAction, IActionRunner, Action } from 'vs/base/common/actions'; -import { IActionItem, ActionsOrientation } from 'vs/base/browser/ui/actionbar/actionbar'; +import { Dimension, Builder } from 'vs/base/browser/builder'; +import { Action } from 'vs/base/common/actions'; import { ITree, IFocusEvent, ISelectionEvent } from 'vs/base/parts/tree/browser/tree'; -import { prepareActions } from 'vs/workbench/browser/actions'; -import { ToolBar } from 'vs/base/browser/ui/toolbar/toolbar'; -import { DelayedDragHandler } from 'vs/base/browser/dnd'; -import { dispose, IDisposable } from 'vs/base/common/lifecycle'; -import { CollapsibleView, CollapsibleState, FixedCollapsibleView, IView } from 'vs/base/browser/ui/splitview/splitview'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IViewlet } from 'vs/workbench/common/viewlet'; import { Composite, CompositeDescriptor, CompositeRegistry } from 'vs/workbench/browser/composite'; -import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; -import { IMessageService } from 'vs/platform/message/common/message'; -import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { IThemable } from 'vs/platform/theme/common/styler'; export abstract class Viewlet extends Composite implements IViewlet { @@ -287,327 +277,4 @@ export class CollapseAction extends Action { return TPromise.as(null); }); } -} - -export interface IViewletView extends IView, IThemable { - id?: string; - create(): TPromise; - setVisible(visible: boolean): TPromise; - getActions(): IAction[]; - getSecondaryActions(): IAction[]; - getActionItem(action: IAction): IActionItem; - showHeader(): boolean; - hideHeader(): boolean; - shutdown(): void; - focusBody(): void; - isExpanded(): boolean; - expand(): void; - collapse(): void; -} - -/** - * The AdaptiveCollapsibleViewletView can grow with the content inside dynamically. - */ -export abstract class AdaptiveCollapsibleViewletView extends FixedCollapsibleView implements IViewletView { - protected treeContainer: HTMLElement; - protected tree: ITree; - protected toDispose: IDisposable[]; - protected isVisible: boolean; - protected toolBar: ToolBar; - protected actionRunner: IActionRunner; - protected isDisposed: boolean; - - private dragHandler: DelayedDragHandler; - - constructor( - actionRunner: IActionRunner, - initialBodySize: number, - collapsed: boolean, - private viewName: string, - protected keybindingService: IKeybindingService, - protected contextMenuService: IContextMenuService - ) { - super({ - expandedBodySize: initialBodySize, - initialState: collapsed ? CollapsibleState.COLLAPSED : CollapsibleState.EXPANDED, - ariaHeaderLabel: viewName, - headerSize: 22, - }); - - this.actionRunner = actionRunner; - this.toDispose = []; - } - - protected changeState(state: CollapsibleState): void { - updateTreeVisibility(this.tree, state === CollapsibleState.EXPANDED); - - super.changeState(state); - } - - public create(): TPromise { - return TPromise.as(null); - } - - public renderHeader(container: HTMLElement): void { - - // Tool bar - this.toolBar = new ToolBar($('div.actions').appendTo(container).getHTMLElement(), this.contextMenuService, { - orientation: ActionsOrientation.HORIZONTAL, - actionItemProvider: (action) => this.getActionItem(action), - ariaLabel: nls.localize('viewToolbarAriaLabel', "{0} actions", this.viewName), - getKeyBinding: (action) => this.keybindingService.lookupKeybinding(action.id) - }); - this.toolBar.actionRunner = this.actionRunner; - this.updateActions(); - - // Expand on drag over - this.dragHandler = new DelayedDragHandler(container, () => { - if (!this.isExpanded()) { - this.expand(); - } - }); - } - - protected updateActions(): void { - this.toolBar.setActions(prepareActions(this.getActions()), prepareActions(this.getSecondaryActions()))(); - } - - protected renderViewTree(container: HTMLElement): HTMLElement { - return renderViewTree(container); - } - - public getViewer(): ITree { - return this.tree; - } - - public setVisible(visible: boolean): TPromise { - this.isVisible = visible; - - updateTreeVisibility(this.tree, visible && this.state === CollapsibleState.EXPANDED); - - return TPromise.as(null); - } - - public focusBody(): void { - focus(this.tree); - } - - protected reveal(element: any, relativeTop?: number): TPromise { - return reveal(this.tree, element, relativeTop); - } - - protected layoutBody(size: number): void { - this.treeContainer.style.height = size + 'px'; - this.tree.layout(size); - } - - public getActions(): IAction[] { - return []; - } - - public getSecondaryActions(): IAction[] { - return []; - } - - public getActionItem(action: IAction): IActionItem { - return null; - } - - public shutdown(): void { - // Subclass to implement - } - - public dispose(): void { - this.isDisposed = true; - this.treeContainer = null; - this.tree.dispose(); - - this.dragHandler.dispose(); - - this.toDispose = dispose(this.toDispose); - - if (this.toolBar) { - this.toolBar.dispose(); - } - - super.dispose(); - } -} - -export abstract class CollapsibleViewletView extends CollapsibleView implements IViewletView { - protected treeContainer: HTMLElement; - protected tree: ITree; - protected toDispose: IDisposable[]; - protected isVisible: boolean; - protected toolBar: ToolBar; - protected actionRunner: IActionRunner; - protected isDisposed: boolean; - - private dragHandler: DelayedDragHandler; - - constructor( - actionRunner: IActionRunner, - collapsed: boolean, - private viewName: string, - protected messageService: IMessageService, - protected keybindingService: IKeybindingService, - protected contextMenuService: IContextMenuService, - headerSize?: number, - minimumSize?: number - ) { - super({ - minimumSize: minimumSize === void 0 ? 5 * 22 : minimumSize, - initialState: collapsed ? CollapsibleState.COLLAPSED : CollapsibleState.EXPANDED, - ariaHeaderLabel: viewName, - headerSize - }); - - this.actionRunner = actionRunner; - this.toDispose = []; - } - - protected changeState(state: CollapsibleState): void { - updateTreeVisibility(this.tree, state === CollapsibleState.EXPANDED); - - super.changeState(state); - } - - public create(): TPromise { - return TPromise.as(null); - } - - public renderHeader(container: HTMLElement): void { - - // Tool bar - this.toolBar = new ToolBar($('div.actions').appendTo(container).getHTMLElement(), this.contextMenuService, { - orientation: ActionsOrientation.HORIZONTAL, - actionItemProvider: (action) => this.getActionItem(action), - ariaLabel: nls.localize('viewToolbarAriaLabel', "{0} actions", this.viewName), - getKeyBinding: (action) => this.keybindingService.lookupKeybinding(action.id) - }); - this.toolBar.actionRunner = this.actionRunner; - this.updateActions(); - - // Expand on drag over - this.dragHandler = new DelayedDragHandler(container, () => { - if (!this.isExpanded()) { - this.expand(); - } - }); - } - - protected updateActions(): void { - this.toolBar.setActions(prepareActions(this.getActions()), prepareActions(this.getSecondaryActions()))(); - } - - protected renderViewTree(container: HTMLElement): HTMLElement { - return renderViewTree(container); - } - - public getViewer(): ITree { - return this.tree; - } - - public setVisible(visible: boolean): TPromise { - this.isVisible = visible; - - updateTreeVisibility(this.tree, visible && this.state === CollapsibleState.EXPANDED); - - return TPromise.as(null); - } - - public focusBody(): void { - focus(this.tree); - } - - protected reveal(element: any, relativeTop?: number): TPromise { - return reveal(this.tree, element, relativeTop); - } - - public layoutBody(size: number): void { - this.treeContainer.style.height = size + 'px'; - this.tree.layout(size); - } - - public getActions(): IAction[] { - return []; - } - - public getSecondaryActions(): IAction[] { - return []; - } - - public getActionItem(action: IAction): IActionItem { - return null; - } - - public shutdown(): void { - // Subclass to implement - } - - public dispose(): void { - this.isDisposed = true; - this.treeContainer = null; - this.tree.dispose(); - - if (this.dragHandler) { - this.dragHandler.dispose(); - } - - this.toDispose = dispose(this.toDispose); - - if (this.toolBar) { - this.toolBar.dispose(); - } - - super.dispose(); - } -} - -function renderViewTree(container: HTMLElement): HTMLElement { - const treeContainer = document.createElement('div'); - container.appendChild(treeContainer); - - return treeContainer; -} - -function updateTreeVisibility(tree: ITree, isVisible: boolean): void { - if (!tree) { - return; - } - - if (isVisible) { - $(tree.getHTMLElement()).show(); - } else { - $(tree.getHTMLElement()).hide(); // make sure the tree goes out of the tabindex world by hiding it - } - - if (isVisible) { - tree.onVisible(); - } else { - tree.onHidden(); - } -} - -function focus(tree: ITree): void { - if (!tree) { - return; // return early if viewlet has not yet been created - } - - // Make sure the current selected element is revealed - const selection = tree.getSelection(); - if (selection.length > 0) { - reveal(tree, selection[0], 0.5).done(null, errors.onUnexpectedError); - } - - // Pass Focus to Viewer - tree.DOMFocus(); -} - -function reveal(tree: ITree, element: any, relativeTop?: number): TPromise { - if (!tree) { - return TPromise.as(null); // return early if viewlet has not yet been created - } - - return tree.reveal(element, relativeTop); } \ No newline at end of file diff --git a/src/vs/workbench/parts/debug/browser/debugViewRegistry.ts b/src/vs/workbench/parts/debug/browser/debugViewRegistry.ts index 0a2ae20976071..6aea43a763525 100644 --- a/src/vs/workbench/parts/debug/browser/debugViewRegistry.ts +++ b/src/vs/workbench/parts/debug/browser/debugViewRegistry.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { IActionRunner } from 'vs/base/common/actions'; -import { IViewletView } from 'vs/workbench/browser/viewlet'; +import { IViewletView } from 'vs/workbench/parts/views/browser/views'; // Debug view registration diff --git a/src/vs/workbench/parts/debug/browser/debugViewlet.ts b/src/vs/workbench/parts/debug/browser/debugViewlet.ts index 07d674a0d16a9..df7e198e7b728 100644 --- a/src/vs/workbench/parts/debug/browser/debugViewlet.ts +++ b/src/vs/workbench/parts/debug/browser/debugViewlet.ts @@ -12,7 +12,8 @@ import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; import { SplitView, HeaderView } from 'vs/base/browser/ui/splitview/splitview'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { Scope } from 'vs/workbench/common/memento'; -import { IViewletView, Viewlet } from 'vs/workbench/browser/viewlet'; +import { Viewlet } from 'vs/workbench/browser/viewlet'; +import { IViewletView } from 'vs/workbench/parts/views/browser/views'; import { IDebugService, VIEWLET_ID, State } from 'vs/workbench/parts/debug/common/debug'; import { DebugViewRegistry } from 'vs/workbench/parts/debug/browser/debugViewRegistry'; import { StartAction, ToggleReplAction, ConfigureAction } from 'vs/workbench/parts/debug/browser/debugActions'; diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts index d13d9f8cd11d9..6bb133269d598 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts @@ -16,7 +16,8 @@ import { prepareActions } from 'vs/workbench/browser/actions'; import { IHighlightEvent, ITree } from 'vs/base/parts/tree/browser/tree'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { CollapsibleState } from 'vs/base/browser/ui/splitview/splitview'; -import { CollapsibleViewletView, AdaptiveCollapsibleViewletView, CollapseAction } from 'vs/workbench/browser/viewlet'; +import { CollapseAction } from 'vs/workbench/browser/viewlet'; +import { CollapsibleViewletView, AdaptiveCollapsibleViewletView } from 'vs/workbench/parts/views/browser/views'; import { IDebugService, State, IBreakpoint, IExpression, CONTEXT_BREAKPOINTS_FOCUSED, CONTEXT_WATCH_EXPRESSIONS_FOCUSED, CONTEXT_VARIABLES_FOCUSED } from 'vs/workbench/parts/debug/common/debug'; import { Expression, Variable, ExceptionBreakpoint, FunctionBreakpoint, Thread, StackFrame, Breakpoint, ThreadAndProcessIds } from 'vs/workbench/parts/debug/common/debugModel'; import * as viewer from 'vs/workbench/parts/debug/electron-browser/debugViewer'; diff --git a/src/vs/workbench/parts/files/browser/explorerViewlet.ts b/src/vs/workbench/parts/files/browser/explorerViewlet.ts index 38ae653e1199f..53897c152d69a 100644 --- a/src/vs/workbench/parts/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/browser/explorerViewlet.ts @@ -12,7 +12,8 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { Dimension, Builder } from 'vs/base/browser/builder'; import { Scope } from 'vs/workbench/common/memento'; import { VIEWLET_ID, ExplorerViewletVisibleContext, IFilesConfiguration } from 'vs/workbench/parts/files/common/files'; -import { IViewletView, Viewlet } from 'vs/workbench/browser/viewlet'; +import { Viewlet } from 'vs/workbench/browser/viewlet'; +import { IViewletView } from 'vs/workbench/parts/views/browser/views'; import { SplitView } from 'vs/base/browser/ui/splitview/splitview'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ActionRunner, FileViewletState } from 'vs/workbench/parts/files/browser/views/explorerViewer'; diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index c16abfd280a27..119a886d91e18 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -24,7 +24,8 @@ import { toResource } from 'vs/workbench/common/editor'; import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import * as DOM from 'vs/base/browser/dom'; -import { CollapseAction, CollapsibleViewletView } from 'vs/workbench/browser/viewlet'; +import { CollapseAction } from 'vs/workbench/browser/viewlet'; +import { CollapsibleViewletView } from 'vs/workbench/parts/views/browser/views'; import { FileStat } from 'vs/workbench/parts/files/common/explorerViewModel'; import { IListService } from 'vs/platform/list/browser/listService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts index 3af3b29705705..48d12b9f9527c 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts @@ -19,7 +19,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IEditorStacksModel, IStacksModelChangeEvent, IEditorGroup } from 'vs/workbench/common/editor'; import { SaveAllAction } from 'vs/workbench/parts/files/browser/fileActions'; -import { AdaptiveCollapsibleViewletView } from 'vs/workbench/browser/viewlet'; +import { AdaptiveCollapsibleViewletView } from 'vs/workbench/parts/views/browser/views'; import { IFilesConfiguration, VIEWLET_ID, OpenEditorsFocussedContext, ExplorerFocussedContext } from 'vs/workbench/parts/files/common/files'; import { ITextFileService, AutoSaveMode } from 'vs/workbench/services/textfile/common/textfiles'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; diff --git a/src/vs/workbench/parts/views/browser/treeView.ts b/src/vs/workbench/parts/views/browser/treeView.ts index 3fe6cf31d1379..789a66389d7f6 100644 --- a/src/vs/workbench/parts/views/browser/treeView.ts +++ b/src/vs/workbench/parts/views/browser/treeView.ts @@ -6,7 +6,7 @@ import 'vs/css!./media/views'; import Event, { Emitter } from 'vs/base/common/event'; import { IDisposable, dispose, empty as EmptyDisposable, toDisposable } from 'vs/base/common/lifecycle'; -import { CollapsibleViewletView } from 'vs/workbench/browser/viewlet'; +import { CollapsibleViewletView } from 'vs/workbench/parts/views/browser/views'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { TPromise } from 'vs/base/common/winjs.base'; import * as DOM from 'vs/base/browser/dom'; diff --git a/src/vs/workbench/parts/views/browser/views.ts b/src/vs/workbench/parts/views/browser/views.ts new file mode 100644 index 0000000000000..35453f2b06a2c --- /dev/null +++ b/src/vs/workbench/parts/views/browser/views.ts @@ -0,0 +1,344 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as nls from 'vs/nls'; +import { TPromise } from 'vs/base/common/winjs.base'; +import { IThemable } from 'vs/platform/theme/common/styler'; +import * as errors from 'vs/base/common/errors'; +import { $ } from 'vs/base/browser/builder'; +import { dispose, IDisposable } from 'vs/base/common/lifecycle'; +import { IAction, IActionRunner } from 'vs/base/common/actions'; +import { IActionItem, ActionsOrientation } from 'vs/base/browser/ui/actionbar/actionbar'; +import { prepareActions } from 'vs/workbench/browser/actions'; +import { ITree } from 'vs/base/parts/tree/browser/tree'; +import { DelayedDragHandler } from 'vs/base/browser/dnd'; +import { ToolBar } from 'vs/base/browser/ui/toolbar/toolbar'; +import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; +import { IMessageService } from 'vs/platform/message/common/message'; +import { CollapsibleView, CollapsibleState, FixedCollapsibleView, IView } from 'vs/base/browser/ui/splitview/splitview'; + +export interface IViewletView extends IView, IThemable { + id?: string; + create(): TPromise; + setVisible(visible: boolean): TPromise; + getActions(): IAction[]; + getSecondaryActions(): IAction[]; + getActionItem(action: IAction): IActionItem; + showHeader(): boolean; + hideHeader(): boolean; + shutdown(): void; + focusBody(): void; + isExpanded(): boolean; + expand(): void; + collapse(): void; +} + +/** + * The AdaptiveCollapsibleViewletView can grow with the content inside dynamically. + */ +export abstract class AdaptiveCollapsibleViewletView extends FixedCollapsibleView implements IViewletView { + protected treeContainer: HTMLElement; + protected tree: ITree; + protected toDispose: IDisposable[]; + protected isVisible: boolean; + protected toolBar: ToolBar; + protected actionRunner: IActionRunner; + protected isDisposed: boolean; + + private dragHandler: DelayedDragHandler; + + constructor( + actionRunner: IActionRunner, + initialBodySize: number, + collapsed: boolean, + private viewName: string, + protected keybindingService: IKeybindingService, + protected contextMenuService: IContextMenuService + ) { + super({ + expandedBodySize: initialBodySize, + initialState: collapsed ? CollapsibleState.COLLAPSED : CollapsibleState.EXPANDED, + ariaHeaderLabel: viewName, + headerSize: 22, + }); + + this.actionRunner = actionRunner; + this.toDispose = []; + } + + protected changeState(state: CollapsibleState): void { + updateTreeVisibility(this.tree, state === CollapsibleState.EXPANDED); + + super.changeState(state); + } + + public create(): TPromise { + return TPromise.as(null); + } + + public renderHeader(container: HTMLElement): void { + + // Tool bar + this.toolBar = new ToolBar($('div.actions').appendTo(container).getHTMLElement(), this.contextMenuService, { + orientation: ActionsOrientation.HORIZONTAL, + actionItemProvider: (action) => this.getActionItem(action), + ariaLabel: nls.localize('viewToolbarAriaLabel', "{0} actions", this.viewName), + getKeyBinding: (action) => this.keybindingService.lookupKeybinding(action.id) + }); + this.toolBar.actionRunner = this.actionRunner; + this.updateActions(); + + // Expand on drag over + this.dragHandler = new DelayedDragHandler(container, () => { + if (!this.isExpanded()) { + this.expand(); + } + }); + } + + protected updateActions(): void { + this.toolBar.setActions(prepareActions(this.getActions()), prepareActions(this.getSecondaryActions()))(); + } + + protected renderViewTree(container: HTMLElement): HTMLElement { + return renderViewTree(container); + } + + public getViewer(): ITree { + return this.tree; + } + + public setVisible(visible: boolean): TPromise { + this.isVisible = visible; + + updateTreeVisibility(this.tree, visible && this.state === CollapsibleState.EXPANDED); + + return TPromise.as(null); + } + + public focusBody(): void { + focus(this.tree); + } + + protected reveal(element: any, relativeTop?: number): TPromise { + return reveal(this.tree, element, relativeTop); + } + + protected layoutBody(size: number): void { + this.treeContainer.style.height = size + 'px'; + this.tree.layout(size); + } + + public getActions(): IAction[] { + return []; + } + + public getSecondaryActions(): IAction[] { + return []; + } + + public getActionItem(action: IAction): IActionItem { + return null; + } + + public shutdown(): void { + // Subclass to implement + } + + public dispose(): void { + this.isDisposed = true; + this.treeContainer = null; + this.tree.dispose(); + + this.dragHandler.dispose(); + + this.toDispose = dispose(this.toDispose); + + if (this.toolBar) { + this.toolBar.dispose(); + } + + super.dispose(); + } +} + +export abstract class CollapsibleViewletView extends CollapsibleView implements IViewletView { + protected treeContainer: HTMLElement; + protected tree: ITree; + protected toDispose: IDisposable[]; + protected isVisible: boolean; + protected toolBar: ToolBar; + protected actionRunner: IActionRunner; + protected isDisposed: boolean; + + private dragHandler: DelayedDragHandler; + + constructor( + actionRunner: IActionRunner, + collapsed: boolean, + private viewName: string, + protected messageService: IMessageService, + protected keybindingService: IKeybindingService, + protected contextMenuService: IContextMenuService, + headerSize?: number, + minimumSize?: number + ) { + super({ + minimumSize: minimumSize === void 0 ? 5 * 22 : minimumSize, + initialState: collapsed ? CollapsibleState.COLLAPSED : CollapsibleState.EXPANDED, + ariaHeaderLabel: viewName, + headerSize + }); + + this.actionRunner = actionRunner; + this.toDispose = []; + } + + protected changeState(state: CollapsibleState): void { + updateTreeVisibility(this.tree, state === CollapsibleState.EXPANDED); + + super.changeState(state); + } + + public create(): TPromise { + return TPromise.as(null); + } + + public renderHeader(container: HTMLElement): void { + + // Tool bar + this.toolBar = new ToolBar($('div.actions').appendTo(container).getHTMLElement(), this.contextMenuService, { + orientation: ActionsOrientation.HORIZONTAL, + actionItemProvider: (action) => this.getActionItem(action), + ariaLabel: nls.localize('viewToolbarAriaLabel', "{0} actions", this.viewName), + getKeyBinding: (action) => this.keybindingService.lookupKeybinding(action.id) + }); + this.toolBar.actionRunner = this.actionRunner; + this.updateActions(); + + // Expand on drag over + this.dragHandler = new DelayedDragHandler(container, () => { + if (!this.isExpanded()) { + this.expand(); + } + }); + } + + protected updateActions(): void { + this.toolBar.setActions(prepareActions(this.getActions()), prepareActions(this.getSecondaryActions()))(); + } + + protected renderViewTree(container: HTMLElement): HTMLElement { + return renderViewTree(container); + } + + public getViewer(): ITree { + return this.tree; + } + + public setVisible(visible: boolean): TPromise { + this.isVisible = visible; + + updateTreeVisibility(this.tree, visible && this.state === CollapsibleState.EXPANDED); + + return TPromise.as(null); + } + + public focusBody(): void { + focus(this.tree); + } + + protected reveal(element: any, relativeTop?: number): TPromise { + return reveal(this.tree, element, relativeTop); + } + + public layoutBody(size: number): void { + this.treeContainer.style.height = size + 'px'; + this.tree.layout(size); + } + + public getActions(): IAction[] { + return []; + } + + public getSecondaryActions(): IAction[] { + return []; + } + + public getActionItem(action: IAction): IActionItem { + return null; + } + + public shutdown(): void { + // Subclass to implement + } + + public dispose(): void { + this.isDisposed = true; + this.treeContainer = null; + this.tree.dispose(); + + if (this.dragHandler) { + this.dragHandler.dispose(); + } + + this.toDispose = dispose(this.toDispose); + + if (this.toolBar) { + this.toolBar.dispose(); + } + + super.dispose(); + } +} + +function updateTreeVisibility(tree: ITree, isVisible: boolean): void { + if (!tree) { + return; + } + + if (isVisible) { + $(tree.getHTMLElement()).show(); + } else { + $(tree.getHTMLElement()).hide(); // make sure the tree goes out of the tabindex world by hiding it + } + + if (isVisible) { + tree.onVisible(); + } else { + tree.onHidden(); + } +} + +function focus(tree: ITree): void { + if (!tree) { + return; // return early if viewlet has not yet been created + } + + // Make sure the current selected element is revealed + const selection = tree.getSelection(); + if (selection.length > 0) { + reveal(tree, selection[0], 0.5).done(null, errors.onUnexpectedError); + } + + // Pass Focus to Viewer + tree.DOMFocus(); +} + +function renderViewTree(container: HTMLElement): HTMLElement { + const treeContainer = document.createElement('div'); + container.appendChild(treeContainer); + + return treeContainer; +} + +function reveal(tree: ITree, element: any, relativeTop?: number): TPromise { + if (!tree) { + return TPromise.as(null); // return early if viewlet has not yet been created + } + + return tree.reveal(element, relativeTop); +} \ No newline at end of file diff --git a/src/vs/workbench/parts/views/browser/viewsRegistry.ts b/src/vs/workbench/parts/views/browser/viewsRegistry.ts index 7aa26d2466bce..a335db36aada0 100644 --- a/src/vs/workbench/parts/views/browser/viewsRegistry.ts +++ b/src/vs/workbench/parts/views/browser/viewsRegistry.ts @@ -5,7 +5,7 @@ import Event, { Emitter } from 'vs/base/common/event'; import { IActionRunner } from 'vs/base/common/actions'; -import { IViewletView as IView } from 'vs/workbench/browser/viewlet'; +import { IViewletView as IView } from 'vs/workbench/parts/views/browser/views'; import { ITreeViewDataProvider } from 'vs/workbench/parts/views/common/views'; export class ViewLocation { From 3ef002b0d569d1bc8962842e49ec0cd624ba3341 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 6 Jun 2017 22:21:22 +0200 Subject: [PATCH 1671/2747] Debt: Composed views viewlet - Implement a viewlet composed of views - Adopt Explorer viewlet to extend Composed views viewlet --- .../parts/files/browser/explorerViewlet.ts | 400 +++++------------- .../parts/files/browser/views/emptyView.ts | 28 +- .../parts/files/browser/views/explorerView.ts | 17 +- .../files/browser/views/openEditorsView.ts | 20 +- src/vs/workbench/parts/views/browser/views.ts | 218 +++++++++- .../parts/views/browser/viewsRegistry.ts | 15 + 6 files changed, 357 insertions(+), 341 deletions(-) diff --git a/src/vs/workbench/parts/files/browser/explorerViewlet.ts b/src/vs/workbench/parts/files/browser/explorerViewlet.ts index 53897c152d69a..1e97d5703b513 100644 --- a/src/vs/workbench/parts/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/browser/explorerViewlet.ts @@ -6,21 +6,19 @@ 'use strict'; import 'vs/css!./media/explorerviewlet'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { IAction, IActionRunner } from 'vs/base/common/actions'; +import { IActionRunner } from 'vs/base/common/actions'; import { TPromise } from 'vs/base/common/winjs.base'; -import { Dimension, Builder } from 'vs/base/browser/builder'; +import * as DOM from 'vs/base/browser/dom'; +import { Builder } from 'vs/base/browser/builder'; import { Scope } from 'vs/workbench/common/memento'; import { VIEWLET_ID, ExplorerViewletVisibleContext, IFilesConfiguration } from 'vs/workbench/parts/files/common/files'; -import { Viewlet } from 'vs/workbench/browser/viewlet'; -import { IViewletView } from 'vs/workbench/parts/views/browser/views'; -import { SplitView } from 'vs/base/browser/ui/splitview/splitview'; +import { ComposedViewsViewlet, IViewletView } from 'vs/workbench/parts/views/browser/views'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ActionRunner, FileViewletState } from 'vs/workbench/parts/files/browser/views/explorerViewer'; -import { ExplorerView } from 'vs/workbench/parts/files/browser/views/explorerView'; +import { ExplorerView, IExplorerViewOptions } from 'vs/workbench/parts/files/browser/views/explorerView'; import { EmptyView } from 'vs/workbench/parts/files/browser/views/emptyView'; import { OpenEditorsView } from 'vs/workbench/parts/files/browser/views/openEditorsView'; -import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; +import { IStorageService } from 'vs/platform/storage/common/storage'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; @@ -32,233 +30,105 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { attachHeaderViewStyler } from 'vs/platform/theme/common/styler'; -import { ViewsRegistry, ViewLocation, IViewDescriptor } from 'vs/workbench/parts/views/browser/viewsRegistry'; +import { ViewsRegistry, ViewLocation, IViewDescriptor, IViewOptions } from 'vs/workbench/parts/views/browser/viewsRegistry'; -interface IViewState { - collapsed: boolean; - size: number; -} - -export class ExplorerViewlet extends Viewlet { +export class ExplorerViewlet extends ComposedViewsViewlet { private static EXPLORER_VIEWS_STATE = 'workbench.explorer.views.state'; - private viewletContainer: Builder; - private splitView: SplitView; - private views: IViewletView[]; - - private explorerView: ExplorerView; - private openEditorsView: OpenEditorsView; - private emptyView: EmptyView; - - private openEditorsVisible: boolean; - private lastFocusedView: IViewletView; - private focusListener: IDisposable; - private delayEditorOpeningInOpenedEditors: boolean; - private viewletSettings: any; private viewletState: FileViewletState; - private dimension: Dimension; - private viewletVisibleContextKey: IContextKey; - private disposables: IDisposable[] = []; constructor( @ITelemetryService telemetryService: ITelemetryService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IStorageService private storageService: IStorageService, + @IWorkspaceContextService protected contextService: IWorkspaceContextService, + @IStorageService protected storageService: IStorageService, @IEditorGroupService private editorGroupService: IEditorGroupService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IConfigurationService private configurationService: IConfigurationService, - @IInstantiationService private instantiationService: IInstantiationService, + @IInstantiationService protected instantiationService: IInstantiationService, @IContextKeyService contextKeyService: IContextKeyService, @IThemeService themeService: IThemeService ) { - super(VIEWLET_ID, telemetryService, themeService); - - this.views = []; + super(VIEWLET_ID, ViewLocation.Explorer, ExplorerViewlet.EXPLORER_VIEWS_STATE, telemetryService, storageService, instantiationService, themeService, contextService); this.viewletState = new FileViewletState(); - this.viewletVisibleContextKey = ExplorerViewletVisibleContext.bindTo(contextKeyService); - this.viewletSettings = this.getMemento(storageService, Scope.WORKSPACE); + this.viewletVisibleContextKey = ExplorerViewletVisibleContext.bindTo(contextKeyService); - this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(e.config), this, this.disposables); - ViewsRegistry.onViewsRegistered(viewDescriptors => this.addCustomViews(viewDescriptors.filter(viewDescriptor => ViewLocation.Explorer === viewDescriptor.location), true), this, this.disposables); + this.registerViews(); + this._register(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated())); } public create(parent: Builder): TPromise { - super.create(parent); - - this.viewletContainer = parent.div().addClass('explorer-viewlet'); - - return this.render(); - } - - public getActions(): IAction[] { - if (this.views.length === 1) { - return this.views[0].getActions(); - } - - return []; + return super.create(parent).then(() => DOM.addClass(this.viewletContainer, 'explorer-viewlet')); } - public getSecondaryActions(): IAction[] { - if (this.views.length === 1) { - return this.views[0].getSecondaryActions(); - } - - return []; - } - - private render(): TPromise { - const config = this.configurationService.getConfiguration(); - - // No need to delay if preview is disabled - this.delayEditorOpeningInOpenedEditors = !!config.workbench.editor.enablePreview; - - // Open editors view should always be visible in no folder workspace. - this.openEditorsVisible = !this.contextService.hasWorkspace() || config.explorer.openEditors.visible !== 0; - - this.views = []; - this.viewletContainer.clearChildren(); - - this.splitView = new SplitView(this.viewletContainer.getHTMLElement()); - - // Track focus - this.focusListener = this.splitView.onFocus((view: IViewletView) => { - this.lastFocusedView = view; - }); - - const customViews = ViewsRegistry.getViews(ViewLocation.Explorer); - - if (this.openEditorsVisible) { - // Open editors view - this.openEditorsView = this.instantiationService.createInstance(OpenEditorsView, this.getActionRunner(), this.viewletSettings); - this.views.push(this.openEditorsView); + private registerViews(): void { + let viewDescriptors = []; + if (this.isOpenEditorsVisible()) { + viewDescriptors.push(this.createOpenEditorsViewDescriptor()); } - - const viewsState = JSON.parse(this.storageService.get(ExplorerViewlet.EXPLORER_VIEWS_STATE, this.contextService.hasWorkspace() ? StorageScope.WORKSPACE : StorageScope.GLOBAL, '{}')); - - // Explorer view - this.views.push(this.createExplorerOrEmptyView(viewsState)); - - // custom views - for (const view of customViews) { - this.addCustomView(view, viewsState[view.id], -1); - } - - for (let i = 0; i < this.views.length; i++) { - const view = this.views[i]; - attachHeaderViewStyler(view, this.themeService, { noContrastBorder: i === 0 }); - this.splitView.addView(view, viewsState[view.id] ? (viewsState[view.id]).size : void 0); + if (this.contextService.hasWorkspace()) { + viewDescriptors.push(this.createExplorerViewDescriptor()); + } else { + viewDescriptors.push(this.createEmptyViewDescriptor()); } - this.lastFocusedView = this.explorerView; - - return TPromise.join(this.views.map(view => view.create())).then(() => void 0).then(() => { - this.onViewsUpdated(); - return this.setVisible(this.isVisible()).then(() => this.focus()); // Focus the viewlet since that triggers a rerender. - }); + ViewsRegistry.registerViews(viewDescriptors); } - private updateOpenEditorsView(): void { - if (!this.splitView) { - return; - } - - if (this.openEditorsVisible) { - this.openEditorsView = this.instantiationService.createInstance(OpenEditorsView, this.getActionRunner(), this.viewletSettings); - this.views.unshift(this.openEditorsView); - this.splitView.addView(this.openEditorsView, undefined, 0); - this.openEditorsView.create().then(() => { - if (this.views.length === 2) { - this.views[1].showHeader(); - } - if (this.dimension) { - this.layout(this.dimension); - } - // Update title area since the title actions have changed. - this.updateTitleArea(); - }); - } else { - this.views.shift(); - this.splitView.removeView(this.openEditorsView); - this.openEditorsView.dispose(); - this.openEditorsView = null; - this.onViewsUpdated(); - } + private createOpenEditorsViewDescriptor(): IViewDescriptor { + return { + id: OpenEditorsView.ID, + name: '', + location: ViewLocation.Explorer, + ctor: OpenEditorsView, + order: 0 + }; } - private addCustomViews(viewDescriptors: IViewDescriptor[], end: boolean): void { - if (!this.splitView || !viewDescriptors.length) { - return; - } - const views = []; - - const registered = ViewsRegistry.getViews(ViewLocation.Explorer); - const viewsState = JSON.parse(this.storageService.get(ExplorerViewlet.EXPLORER_VIEWS_STATE, this.contextService.hasWorkspace() ? StorageScope.WORKSPACE : StorageScope.GLOBAL, '{}')); - for (const viewDescriptor of viewDescriptors) { - let index = end ? -1 : this.openEditorsView ? registered.indexOf(viewDescriptor) + 2 : registered.indexOf(viewDescriptor) + 1; - const view = this.addCustomView(viewDescriptor, viewsState[viewDescriptor.id], index); - views.push(view); - attachHeaderViewStyler(view, this.themeService); - this.splitView.addView(view, viewsState[view.id] ? (viewsState[view.id]).size : void 0, end ? void 0 : index); - } - - TPromise.join(views.map(view => view.create())).then(() => void 0).then(() => { - this.onViewsUpdated(); - }); + private createEmptyViewDescriptor(): IViewDescriptor { + return { + id: EmptyView.ID, + name: '', + location: ViewLocation.Explorer, + ctor: EmptyView, + order: 1 + }; } - private addCustomView(viewDescriptor: IViewDescriptor, viewState: IViewState, index: number): IViewletView { - const view = this.instantiationService.createInstance(viewDescriptor.ctor, viewDescriptor.id, { - name: viewDescriptor.name, - actionRunner: this.getActionRunner(), - collapsed: viewState ? viewState.collapsed : true - }); - if (index !== -1) { - this.views.splice(index, 0, view); - } else { - this.views.push(view); - } - return view; + private createExplorerViewDescriptor(): IViewDescriptor { + return { + id: ExplorerView.ID, + name: '', + location: ViewLocation.Explorer, + ctor: ExplorerView, + order: 1 + }; } - private onViewsUpdated(): void { - if (this.views.length > 1) { - this.views[0].showHeader(); + private onConfigurationUpdated(): void { + let openEditorsViewDescriptor = ViewsRegistry.getViews(ViewLocation.Explorer).filter(viewDescriptor => viewDescriptor.id === OpenEditorsView.ID)[0]; + let isOpenEditorsVisible = this.isOpenEditorsVisible(); + if (isOpenEditorsVisible) { + if (!openEditorsViewDescriptor) { + ViewsRegistry.registerViews([this.createOpenEditorsViewDescriptor()]); + } } else { - this.views[0].hideHeader(); - if (!this.views[0].isExpanded()) { - this.views[0].expand(); + if (openEditorsViewDescriptor) { + ViewsRegistry.deregisterViews([OpenEditorsView.ID], ViewLocation.Explorer); } } - - if (this.dimension) { - this.layout(this.dimension); - } - - // Update title area since the title actions have changed. - this.updateTitleArea(); } - private onConfigurationUpdated(config: IFilesConfiguration): void { - // Open editors view should always be visible in no folder workspace. - const openEditorsVisible = !this.contextService.hasWorkspace() || config.explorer.openEditors.visible !== 0; - if (this.openEditorsVisible !== openEditorsVisible) { - this.openEditorsVisible = openEditorsVisible; - this.updateOpenEditorsView(); - } + private isOpenEditorsVisible(): boolean { + return !this.contextService.hasWorkspace() || (this.configurationService.getConfiguration()).explorer.openEditors.visible !== 0; } - private createExplorerOrEmptyView(viewsState: any): IViewletView { - let explorerOrEmptyView: ExplorerView | EmptyView; - - // With a Workspace - if (this.contextService.hasWorkspace()) { - + protected createView(viewDescriptor: IViewDescriptor, options: IViewOptions): IViewletView { + if (viewDescriptor.id === ExplorerView.ID) { // Create a delegating editor service for the explorer to be able to delay the refresh in the opened // editors view above. This is a workaround for being able to double click on a file to make it pinned // without causing the animation in the opened editors view to kick in and change scroll position. @@ -266,21 +136,28 @@ export class ExplorerViewlet extends Viewlet { // a new entry in the opened editors view. const delegatingEditorService = this.instantiationService.createInstance(DelegatingWorkbenchEditorService); delegatingEditorService.setEditorOpenHandler((input: EditorInput, options?: EditorOptions, arg3?: any) => { - if (this.openEditorsView) { + let openEditorsView = this.getOpenEditorsView(); + if (openEditorsView) { let delay = 0; - if (this.delayEditorOpeningInOpenedEditors && (arg3 === false /* not side by side */ || typeof arg3 !== 'number' /* no explicit position */)) { + + const config = this.configurationService.getConfiguration(); + // No need to delay if preview is disabled + const delayEditorOpeningInOpenedEditors = !!config.workbench.editor.enablePreview; + + if (delayEditorOpeningInOpenedEditors && (arg3 === false /* not side by side */ || typeof arg3 !== 'number' /* no explicit position */)) { const activeGroup = this.editorGroupService.getStacksModel().activeGroup; if (!activeGroup || !activeGroup.previewEditor) { delay = 250; // a new editor entry is likely because there is either no group or no preview in group } } - this.openEditorsView.setStructuralRefreshDelay(delay); + openEditorsView.setStructuralRefreshDelay(delay); } const onSuccessOrError = (editor?: BaseEditor) => { - if (this.openEditorsView) { - this.openEditorsView.setStructuralRefreshDelay(0); + let openEditorsView = this.getOpenEditorsView(); + if (openEditorsView) { + openEditorsView.setStructuralRefreshDelay(0); } return editor; @@ -290,74 +167,62 @@ export class ExplorerViewlet extends Viewlet { }); const explorerInstantiator = this.instantiationService.createChild(new ServiceCollection([IWorkbenchEditorService, delegatingEditorService])); - this.explorerView = explorerOrEmptyView = explorerInstantiator.createInstance(ExplorerView, this.viewletState, { - collapsed: viewsState[ExplorerView.ID] ? (viewsState[ExplorerView.ID]).collapsed : false, - actionRunner: this.getActionRunner() - }, this.viewletSettings, void 0); - } - - // No workspace - else { - this.emptyView = explorerOrEmptyView = this.instantiationService.createInstance(EmptyView, { - collapsed: viewsState[EmptyView.ID] ? (viewsState[EmptyView.ID]).collapsed : false, - actionRunner: this.getActionRunner() - }); + return explorerInstantiator.createInstance(ExplorerView, viewDescriptor.id, { ...options, settings: this.viewletSettings, viewletState: this.viewletState }); } - - return explorerOrEmptyView; + return super.createView(viewDescriptor, options); } public getExplorerView(): ExplorerView { - return this.explorerView; + return this.getView(ExplorerView.ID); } public getOpenEditorsView(): OpenEditorsView { - return this.openEditorsView; + return this.getView(OpenEditorsView.ID); + } + + public getEmptyView(): EmptyView { + return this.getView(EmptyView.ID); } public setVisible(visible: boolean): TPromise { this.viewletVisibleContextKey.set(visible); - - return super.setVisible(visible).then(() => { - return TPromise.join(this.views.map((view) => view.setVisible(visible))).then(() => void 0); - }); + return super.setVisible(visible); } public focus(): void { - super.focus(); - const hasOpenedEditors = !!this.editorGroupService.getStacksModel().activeGroup; + let openEditorsView = this.getOpenEditorsView(); if (this.lastFocusedView && this.lastFocusedView.isExpanded() && this.hasSelectionOrFocus(this.lastFocusedView)) { - if (this.lastFocusedView !== this.openEditorsView || hasOpenedEditors) { + if (this.lastFocusedView !== openEditorsView || hasOpenedEditors) { this.lastFocusedView.focusBody(); return; } } - if (this.hasSelectionOrFocus(this.openEditorsView) && hasOpenedEditors) { - return this.openEditorsView.focusBody(); + if (this.hasSelectionOrFocus(openEditorsView) && hasOpenedEditors) { + return openEditorsView.focusBody(); } - if (this.hasSelectionOrFocus(this.explorerView)) { - return this.explorerView.focusBody(); + let explorerView = this.getExplorerView(); + if (this.hasSelectionOrFocus(explorerView)) { + return explorerView.focusBody(); } - if (this.openEditorsView && this.openEditorsView.isExpanded() && hasOpenedEditors) { - return this.openEditorsView.focusBody(); // we have entries in the opened editors view to focus on + if (openEditorsView && openEditorsView.isExpanded() && hasOpenedEditors) { + return openEditorsView.focusBody(); // we have entries in the opened editors view to focus on } - if (this.explorerView && this.explorerView.isExpanded()) { - return this.explorerView.focusBody(); + if (explorerView && explorerView.isExpanded()) { + return explorerView.focusBody(); } - if (this.emptyView && this.emptyView.isExpanded()) { - return this.emptyView.focusBody(); + let emptyView = this.getEmptyView(); + if (emptyView && emptyView.isExpanded()) { + return emptyView.focusBody(); } - if (this.lastFocusedView) { - return this.lastFocusedView.focus(); - } + super.focus(); } private hasSelectionOrFocus(view: IViewletView): boolean { @@ -382,83 +247,14 @@ export class ExplorerViewlet extends Viewlet { return false; } - public layout(dimension: Dimension): void { - this.dimension = dimension; - this.splitView.layout(dimension.height); - } - public getActionRunner(): IActionRunner { if (!this.actionRunner) { this.actionRunner = new ActionRunner(this.viewletState); } - return this.actionRunner; } public getViewletState(): FileViewletState { return this.viewletState; } - - public getOptimalWidth(): number { - const additionalMargin = 16; - const openedEditorsViewWidth = this.openEditorsView ? this.openEditorsView.getOptimalWidth() : 0; - const explorerView = this.getExplorerView(); - const explorerViewWidth = explorerView ? explorerView.getOptimalWidth() : 0; - const optimalWidth = Math.max(openedEditorsViewWidth, explorerViewWidth); - - return optimalWidth + additionalMargin; - } - - public shutdown(): void { - this.saveViewsState(); - this.views.forEach((view) => view.shutdown()); - super.shutdown(); - } - - private saveViewsState(): void { - const viewletState = this.views.reduce((result, view) => { - result[view.id] = this.getViewState(view); - return result; - }, {}); - this.storageService.store(ExplorerViewlet.EXPLORER_VIEWS_STATE, JSON.stringify(viewletState), this.contextService.hasWorkspace() ? StorageScope.WORKSPACE : StorageScope.GLOBAL); - } - - private getViewState(view: IViewletView): IViewState { - return { - collapsed: !view.isExpanded(), - size: view.size > 0 ? view.size : void 0 - }; - } - - public dispose(): void { - - for (const view of this.views) { - view.dispose(); - } - - if (this.splitView) { - this.splitView = null; - } - - if (this.explorerView) { - this.explorerView = null; - } - - if (this.openEditorsView) { - this.openEditorsView = null; - } - - if (this.emptyView) { - this.emptyView = null; - } - - if (this.focusListener) { - this.focusListener.dispose(); - this.focusListener = null; - } - - this.disposables = dispose(this.disposables); - - super.dispose(); - } } \ No newline at end of file diff --git a/src/vs/workbench/parts/files/browser/views/emptyView.ts b/src/vs/workbench/parts/files/browser/views/emptyView.ts index 5a46c95e1a6f9..eb02a3b108706 100644 --- a/src/vs/workbench/parts/files/browser/views/emptyView.ts +++ b/src/vs/workbench/parts/files/browser/views/emptyView.ts @@ -9,36 +9,36 @@ import * as errors from 'vs/base/common/errors'; import env = require('vs/base/common/platform'); import DOM = require('vs/base/browser/dom'); import { TPromise } from 'vs/base/common/winjs.base'; -import { IActionRunner, IAction } from 'vs/base/common/actions'; +import { IAction } from 'vs/base/common/actions'; import { Button } from 'vs/base/browser/ui/button/button'; import { $ } from 'vs/base/browser/builder'; import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; -import { CollapsibleView, CollapsibleState } from 'vs/base/browser/ui/splitview/splitview'; +import { CollapsibleViewletView } from 'vs/workbench/parts/views/browser/views'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { OpenFolderAction, OpenFileFolderAction } from 'vs/workbench/browser/actions/fileActions'; import { attachButtonStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IViewOptions } from 'vs/workbench/parts/views/browser/viewsRegistry'; +import { IMessageService } from 'vs/platform/message/common/message'; +import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; -export class EmptyView extends CollapsibleView { +export class EmptyView extends CollapsibleViewletView { public static ID: string = 'workbench.explorer.emptyView'; - public readonly id: string = EmptyView.ID; - private openFolderButton: Button; - private actionRunner: IActionRunner; + constructor( + readonly id: string, options: IViewOptions, @IThemeService private themeService: IThemeService, - @IInstantiationService private instantiationService: IInstantiationService + @IInstantiationService private instantiationService: IInstantiationService, + @IMessageService messageService: IMessageService, + @IKeybindingService keybindingService: IKeybindingService, + @IContextMenuService contextMenuService: IContextMenuService ) { - super({ - minimumSize: 5 * 22, - ariaHeaderLabel: nls.localize('explorerSection', "Files Explorer Section"), - initialState: options.collapsed ? CollapsibleState.COLLAPSED : CollapsibleState.EXPANDED - }); - this.actionRunner = options.actionRunner; + super(options.actionRunner, options.collapsed, nls.localize('explorerSection', "Files Explorer Section"), messageService, keybindingService, contextMenuService, void 0, 5 * 22); } public renderHeader(container: HTMLElement): void { @@ -69,7 +69,7 @@ export class EmptyView extends CollapsibleView { }); } - protected layoutBody(size: number): void { + layoutBody(size: number): void { // no-op } diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index 119a886d91e18..80bd2369b6496 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -45,6 +45,11 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IViewOptions } from 'vs/workbench/parts/views/browser/viewsRegistry'; +export interface IExplorerViewOptions extends IViewOptions { + settings: any; + viewletState: FileViewletState; +} + export class ExplorerView extends CollapsibleViewletView { public static ID: string = 'workbench.explorer.fileView'; @@ -79,10 +84,8 @@ export class ExplorerView extends CollapsibleViewletView { private settings: any; constructor( - viewletState: FileViewletState, - options: IViewOptions, - settings: any, - headerSize: number, + id: string, + options: IExplorerViewOptions, @IMessageService messageService: IMessageService, @IContextMenuService contextMenuService: IContextMenuService, @IInstantiationService private instantiationService: IInstantiationService, @@ -99,10 +102,10 @@ export class ExplorerView extends CollapsibleViewletView { @IWorkbenchThemeService private themeService: IWorkbenchThemeService, @IEnvironmentService private environmentService: IEnvironmentService ) { - super(options.actionRunner, options.collapsed, nls.localize('explorerSection', "Files Explorer Section"), messageService, keybindingService, contextMenuService, headerSize); + super(options.actionRunner, options.collapsed, nls.localize('explorerSection', "Files Explorer Section"), messageService, keybindingService, contextMenuService); - this.settings = settings; - this.viewletState = viewletState; + this.settings = options.settings; + this.viewletState = options.viewletState; this.actionRunner = options.actionRunner; this.autoReveal = true; diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts index 48d12b9f9527c..cc78b196c58e0 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts @@ -7,9 +7,8 @@ import nls = require('vs/nls'); import errors = require('vs/base/common/errors'); import { RunOnceScheduler } from 'vs/base/common/async'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IAction, IActionRunner } from 'vs/base/common/actions'; +import { IAction } from 'vs/base/common/actions'; import dom = require('vs/base/browser/dom'); -import { CollapsibleState } from 'vs/base/browser/ui/splitview/splitview'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { IItemCollapseEvent } from 'vs/base/parts/tree/browser/treeModel'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; @@ -34,18 +33,16 @@ import { EditorGroup } from 'vs/workbench/common/editor/editorStacksModel'; import { attachListStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { badgeBackground, badgeForeground, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; +import { IViewOptions } from 'vs/workbench/parts/views/browser/viewsRegistry'; const $ = dom.$; export class OpenEditorsView extends AdaptiveCollapsibleViewletView { - private static MEMENTO_COLLAPSED = 'openEditors.memento.collapsed'; private static DEFAULT_VISIBLE_OPEN_EDITORS = 9; private static DEFAULT_DYNAMIC_HEIGHT = true; + static ID = 'workbench.explorer.openEditorsView'; - readonly id: string = 'workbench.explorer.openEditorsView'; - - private settings: any; private visibleOpenEditors: number; private dynamicHeight: boolean; @@ -59,7 +56,7 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView { private openEditorsFocussedContext: IContextKey; private explorerFocussedContext: IContextKey; - constructor(actionRunner: IActionRunner, settings: any, + constructor(readonly id: string, options: IViewOptions, @IInstantiationService private instantiationService: IInstantiationService, @IContextMenuService contextMenuService: IContextMenuService, @ITextFileService private textFileService: ITextFileService, @@ -72,9 +69,8 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView { @IViewletService private viewletService: IViewletService, @IThemeService private themeService: IThemeService ) { - super(actionRunner, OpenEditorsView.computeExpandedBodySize(editorGroupService.getStacksModel()), !!settings[OpenEditorsView.MEMENTO_COLLAPSED], nls.localize({ key: 'openEditosrSection', comment: ['Open is an adjective'] }, "Open Editors Section"), keybindingService, contextMenuService); + super(options.actionRunner, OpenEditorsView.computeExpandedBodySize(editorGroupService.getStacksModel()), options.collapsed, nls.localize({ key: 'openEditosrSection', comment: ['Open is an adjective'] }, "Open Editors Section"), keybindingService, contextMenuService); - this.settings = settings; this.model = editorGroupService.getStacksModel(); this.openEditorsFocussedContext = OpenEditorsFocussedContext.bindTo(contextKeyService); @@ -326,10 +322,4 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView { return dom.getLargestChildWidth(parentNode, childNodes); } - - public shutdown(): void { - this.settings[OpenEditorsView.MEMENTO_COLLAPSED] = (this.state === CollapsibleState.COLLAPSED); - - super.shutdown(); - } } diff --git a/src/vs/workbench/parts/views/browser/views.ts b/src/vs/workbench/parts/views/browser/views.ts index 35453f2b06a2c..179d898bc3da4 100644 --- a/src/vs/workbench/parts/views/browser/views.ts +++ b/src/vs/workbench/parts/views/browser/views.ts @@ -5,20 +5,28 @@ import * as nls from 'vs/nls'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IThemable } from 'vs/platform/theme/common/styler'; +import { IThemable, attachHeaderViewStyler } from 'vs/platform/theme/common/styler'; import * as errors from 'vs/base/common/errors'; -import { $ } from 'vs/base/browser/builder'; +import * as DOM from 'vs/base/browser/dom'; +import { $, Dimension, Builder } from 'vs/base/browser/builder'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { IAction, IActionRunner } from 'vs/base/common/actions'; import { IActionItem, ActionsOrientation } from 'vs/base/browser/ui/actionbar/actionbar'; import { prepareActions } from 'vs/workbench/browser/actions'; +import { Viewlet } from 'vs/workbench/browser/viewlet'; import { ITree } from 'vs/base/parts/tree/browser/tree'; import { DelayedDragHandler } from 'vs/base/browser/dnd'; import { ToolBar } from 'vs/base/browser/ui/toolbar/toolbar'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IMessageService } from 'vs/platform/message/common/message'; -import { CollapsibleView, CollapsibleState, FixedCollapsibleView, IView } from 'vs/base/browser/ui/splitview/splitview'; +import { CollapsibleView, CollapsibleState, FixedCollapsibleView, IView, SplitView } from 'vs/base/browser/ui/splitview/splitview'; +import { ViewsRegistry, ViewLocation, IViewDescriptor, IViewOptions } from 'vs/workbench/parts/views/browser/viewsRegistry'; +import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; +import { IThemeService } from 'vs/platform/theme/common/themeService'; +import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; +import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; export interface IViewletView extends IView, IThemable { id?: string; @@ -34,6 +42,7 @@ export interface IViewletView extends IView, IThemable { isExpanded(): boolean; expand(): void; collapse(): void; + getOptimalWidth(): number; } /** @@ -148,6 +157,10 @@ export abstract class AdaptiveCollapsibleViewletView extends FixedCollapsibleVie // Subclass to implement } + public getOptimalWidth(): number { + return 0; + } + public dispose(): void { this.isDisposed = true; this.treeContainer = null; @@ -276,6 +289,10 @@ export abstract class CollapsibleViewletView extends CollapsibleView implements // Subclass to implement } + public getOptimalWidth(): number { + return 0; + } + public dispose(): void { this.isDisposed = true; this.treeContainer = null; @@ -341,4 +358,199 @@ function reveal(tree: ITree, element: any, relativeTop?: number): TPromise } return tree.reveal(element, relativeTop); +} + +export interface IViewState { + collapsed: boolean; + size: number; +} + +export class ComposedViewsViewlet extends Viewlet { + + protected viewletContainer: HTMLElement; + protected lastFocusedView: IViewletView; + + private splitView: SplitView; + private views: IViewletView[]; + private dimension: Dimension; + + private readonly viewsStates: Map; + + constructor( + id: string, + private location: ViewLocation, + private viewletStateStorageId: string, + @ITelemetryService telemetryService: ITelemetryService, + @IStorageService protected storageService: IStorageService, + @IInstantiationService protected instantiationService: IInstantiationService, + @IThemeService themeService: IThemeService, + @IWorkspaceContextService protected contextService: IWorkspaceContextService + ) { + super(id, telemetryService, themeService); + + this.views = []; + this.viewsStates = this.loadViewsStates(); + + this._register(ViewsRegistry.onViewsRegistered(viewDescriptors => this.createViews(viewDescriptors.filter(viewDescriptor => ViewLocation.Explorer === viewDescriptor.location)))); + this._register(ViewsRegistry.onViewsDeregistered(viewDescriptors => this.removeViews(viewDescriptors.filter(viewDescriptor => ViewLocation.Explorer === viewDescriptor.location)))); + } + + public create(parent: Builder): TPromise { + super.create(parent); + + this.viewletContainer = DOM.append(parent.getHTMLElement(), DOM.$('')); + this.splitView = this._register(new SplitView(this.viewletContainer)); + this._register(this.splitView.onFocus((view: IViewletView) => this.lastFocusedView = view)); + + const views = ViewsRegistry.getViews(ViewLocation.Explorer); + return this.createViews(views) + .then(() => this.lastFocusedView = this.views[0]) + .then(() => this.setVisible(this.isVisible())) + .then(() => this.focus()); + } + + public getActions(): IAction[] { + if (this.views.length === 1) { + return this.views[0].getActions(); + } + return []; + } + + public getSecondaryActions(): IAction[] { + if (this.views.length === 1) { + return this.views[0].getSecondaryActions(); + } + return []; + } + + private createViews(viewDescriptors: IViewDescriptor[]): TPromise { + if (!this.splitView || !viewDescriptors.length) { + return TPromise.as(null); + } + + const views = []; + const sorted = ViewsRegistry.getViews(this.location).sort((a, b) => { + if (b.order === void 0 || b.order === null) { + return -1; + } + if (a.order === void 0 || a.order === null) { + return 1; + } + return a.order - b.order; + }); + for (const viewDescriptor of viewDescriptors) { + let viewState = this.viewsStates.get(viewDescriptor.id); + let index = sorted.indexOf(viewDescriptor); + const view = this.createView(viewDescriptor, { + name: viewDescriptor.name, + actionRunner: this.getActionRunner(), + collapsed: viewState ? viewState.collapsed : true + }); + if (index !== -1) { + this.views.splice(index, 0, view); + } else { + this.views.push(view); + } + views.push(view); + attachHeaderViewStyler(view, this.themeService); + this.splitView.addView(view, viewState ? viewState.size : void 0, index); + } + + return TPromise.join(views.map(view => view.create())) + .then(() => this.onViewsUpdated()); + } + + + private removeViews(viewDescriptors: IViewDescriptor[]): void { + if (!this.splitView || !viewDescriptors.length) { + return; + } + + for (const viewDescriptor of viewDescriptors) { + let view = this.getView(viewDescriptor.id); + if (view) { + this.views.splice(this.views.indexOf(view), 1); + this.splitView.removeView(view); + } + } + + this.onViewsUpdated(); + } + + private onViewsUpdated(): void { + if (this.views.length === 1) { + this.views[0].hideHeader(); + if (!this.views[0].isExpanded()) { + this.views[0].expand(); + } + } else { + for (const view of this.views) { + view.showHeader(); + } + } + + if (this.dimension) { + this.layout(this.dimension); + } + + // Update title area since the title actions have changed. + this.updateTitleArea(); + } + + public setVisible(visible: boolean): TPromise { + return super.setVisible(visible) + .then(() => TPromise.join(this.views.map((view) => view.setVisible(visible)))) + .then(() => void 0); + } + + public focus(): void { + super.focus(); + if (this.lastFocusedView) { + this.lastFocusedView.focus(); + } + } + + public layout(dimension: Dimension): void { + this.dimension = dimension; + this.splitView.layout(dimension.height); + } + + public getOptimalWidth(): number { + const additionalMargin = 16; + const optimalWidth = Math.max(...this.views.map(view => view.getOptimalWidth() || 0)); + return optimalWidth + additionalMargin; + } + + public shutdown(): void { + this.saveViewsStates(); + this.views.forEach((view) => view.shutdown()); + super.shutdown(); + } + + protected saveViewsStates(): void { + const viewletState = this.views.reduce((result, view) => { + result[view.id] = { + collapsed: !view.isExpanded(), + size: view.size > 0 ? view.size : void 0 + }; + return result; + }, {}); + this.storageService.store(this.viewletStateStorageId, JSON.stringify(viewletState), this.contextService.hasWorkspace() ? StorageScope.WORKSPACE : StorageScope.GLOBAL); + } + + protected loadViewsStates(): Map { + const viewsStates = JSON.parse(this.storageService.get(this.viewletStateStorageId, this.contextService.hasWorkspace() ? StorageScope.WORKSPACE : StorageScope.GLOBAL, '{}')); + return Object.keys(viewsStates).reduce((result, id) => { + result.set(id, viewsStates[id]); + return result; + }, new Map()); + } + + protected createView(viewDescriptor: IViewDescriptor, options: IViewOptions): IViewletView { + return this.instantiationService.createInstance(viewDescriptor.ctor, viewDescriptor.id, options); + } + + protected getView(id: string): IViewletView { + return this.views.filter(view => view.id === id)[0]; + } } \ No newline at end of file diff --git a/src/vs/workbench/parts/views/browser/viewsRegistry.ts b/src/vs/workbench/parts/views/browser/viewsRegistry.ts index a335db36aada0..ac12eb4be5bc8 100644 --- a/src/vs/workbench/parts/views/browser/viewsRegistry.ts +++ b/src/vs/workbench/parts/views/browser/viewsRegistry.ts @@ -50,10 +50,14 @@ export interface IViewsRegistry { readonly onViewsRegistered: Event; + readonly onViewsDeregistered: Event; + readonly onTreeViewDataProviderRegistered: Event; registerViews(views: IViewDescriptor[]): void; + deregisterViews(ids: string[], location: ViewLocation): void; + registerTreeViewDataProvider(id: string, factory: ITreeViewDataProvider): void; getViews(loc: ViewLocation): IViewDescriptor[]; @@ -67,6 +71,9 @@ export const ViewsRegistry: IViewsRegistry = new class { private _onViewsRegistered: Emitter = new Emitter(); readonly onViewsRegistered: Event = this._onViewsRegistered.event; + private _onViewsDeregistered: Emitter = new Emitter(); + readonly onViewsDeregistered: Event = this._onViewsDeregistered.event; + private _onTreeViewDataProviderRegistered: Emitter = new Emitter(); readonly onTreeViewDataProviderRegistered: Event = this._onTreeViewDataProviderRegistered.event; @@ -87,6 +94,14 @@ export const ViewsRegistry: IViewsRegistry = new class { } } + deregisterViews(ids: string[], location: ViewLocation): void { + const viewsToDeregister = this._views.get(location).filter(view => ids.indexOf(view.id) !== -1); + if (viewsToDeregister.length) { + this._views.set(location, this._views.get(location).filter(view => ids.indexOf(view.id) === -1)); + } + this._onViewsDeregistered.fire(viewsToDeregister); + } + registerTreeViewDataProvider(id: string, factory: ITreeViewDataProvider) { if (!this.isViewRegistered(id)) { // TODO: throw error From ed5bc914fc584307f7d75fc730908b4596db17ac Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 6 Jun 2017 22:37:11 +0200 Subject: [PATCH 1672/2747] Debt: Use viewlet view settings --- .../workbench/parts/files/browser/explorerViewlet.ts | 11 ++++------- .../parts/files/browser/views/explorerView.ts | 8 +++----- src/vs/workbench/parts/views/browser/views.ts | 12 ++++++++++-- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/parts/files/browser/explorerViewlet.ts b/src/vs/workbench/parts/files/browser/explorerViewlet.ts index 1e97d5703b513..87a26e07bfbac 100644 --- a/src/vs/workbench/parts/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/browser/explorerViewlet.ts @@ -10,9 +10,8 @@ import { IActionRunner } from 'vs/base/common/actions'; import { TPromise } from 'vs/base/common/winjs.base'; import * as DOM from 'vs/base/browser/dom'; import { Builder } from 'vs/base/browser/builder'; -import { Scope } from 'vs/workbench/common/memento'; import { VIEWLET_ID, ExplorerViewletVisibleContext, IFilesConfiguration } from 'vs/workbench/parts/files/common/files'; -import { ComposedViewsViewlet, IViewletView } from 'vs/workbench/parts/views/browser/views'; +import { ComposedViewsViewlet, IViewletView, IViewletViewOptions } from 'vs/workbench/parts/views/browser/views'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ActionRunner, FileViewletState } from 'vs/workbench/parts/files/browser/views/explorerViewer'; import { ExplorerView, IExplorerViewOptions } from 'vs/workbench/parts/files/browser/views/explorerView'; @@ -30,13 +29,12 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { ViewsRegistry, ViewLocation, IViewDescriptor, IViewOptions } from 'vs/workbench/parts/views/browser/viewsRegistry'; +import { ViewsRegistry, ViewLocation, IViewDescriptor } from 'vs/workbench/parts/views/browser/viewsRegistry'; export class ExplorerViewlet extends ComposedViewsViewlet { private static EXPLORER_VIEWS_STATE = 'workbench.explorer.views.state'; - private viewletSettings: any; private viewletState: FileViewletState; private viewletVisibleContextKey: IContextKey; @@ -54,7 +52,6 @@ export class ExplorerViewlet extends ComposedViewsViewlet { super(VIEWLET_ID, ViewLocation.Explorer, ExplorerViewlet.EXPLORER_VIEWS_STATE, telemetryService, storageService, instantiationService, themeService, contextService); this.viewletState = new FileViewletState(); - this.viewletSettings = this.getMemento(storageService, Scope.WORKSPACE); this.viewletVisibleContextKey = ExplorerViewletVisibleContext.bindTo(contextKeyService); this.registerViews(); @@ -127,7 +124,7 @@ export class ExplorerViewlet extends ComposedViewsViewlet { return !this.contextService.hasWorkspace() || (this.configurationService.getConfiguration()).explorer.openEditors.visible !== 0; } - protected createView(viewDescriptor: IViewDescriptor, options: IViewOptions): IViewletView { + protected createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): IViewletView { if (viewDescriptor.id === ExplorerView.ID) { // Create a delegating editor service for the explorer to be able to delay the refresh in the opened // editors view above. This is a workaround for being able to double click on a file to make it pinned @@ -167,7 +164,7 @@ export class ExplorerViewlet extends ComposedViewsViewlet { }); const explorerInstantiator = this.instantiationService.createChild(new ServiceCollection([IWorkbenchEditorService, delegatingEditorService])); - return explorerInstantiator.createInstance(ExplorerView, viewDescriptor.id, { ...options, settings: this.viewletSettings, viewletState: this.viewletState }); + return explorerInstantiator.createInstance(ExplorerView, viewDescriptor.id, { ...options, viewletState: this.viewletState }); } return super.createView(viewDescriptor, options); } diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index 80bd2369b6496..b43a82cb081cb 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -25,7 +25,7 @@ import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import * as DOM from 'vs/base/browser/dom'; import { CollapseAction } from 'vs/workbench/browser/viewlet'; -import { CollapsibleViewletView } from 'vs/workbench/parts/views/browser/views'; +import { CollapsibleViewletView, IViewletViewOptions } from 'vs/workbench/parts/views/browser/views'; import { FileStat } from 'vs/workbench/parts/files/common/explorerViewModel'; import { IListService } from 'vs/platform/list/browser/listService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; @@ -43,10 +43,8 @@ import { IWorkbenchThemeService, IFileIconTheme } from 'vs/workbench/services/th import { isLinux } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { attachListStyler } from 'vs/platform/theme/common/styler'; -import { IViewOptions } from 'vs/workbench/parts/views/browser/viewsRegistry'; -export interface IExplorerViewOptions extends IViewOptions { - settings: any; +export interface IExplorerViewOptions extends IViewletViewOptions { viewletState: FileViewletState; } @@ -104,7 +102,7 @@ export class ExplorerView extends CollapsibleViewletView { ) { super(options.actionRunner, options.collapsed, nls.localize('explorerSection', "Files Explorer Section"), messageService, keybindingService, contextMenuService); - this.settings = options.settings; + this.settings = options.viewletSettings; this.viewletState = options.viewletState; this.actionRunner = options.actionRunner; this.autoReveal = true; diff --git a/src/vs/workbench/parts/views/browser/views.ts b/src/vs/workbench/parts/views/browser/views.ts index 179d898bc3da4..01aa578329c4f 100644 --- a/src/vs/workbench/parts/views/browser/views.ts +++ b/src/vs/workbench/parts/views/browser/views.ts @@ -9,6 +9,7 @@ import { IThemable, attachHeaderViewStyler } from 'vs/platform/theme/common/styl import * as errors from 'vs/base/common/errors'; import * as DOM from 'vs/base/browser/dom'; import { $, Dimension, Builder } from 'vs/base/browser/builder'; +import { Scope } from 'vs/workbench/common/memento'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { IAction, IActionRunner } from 'vs/base/common/actions'; import { IActionItem, ActionsOrientation } from 'vs/base/browser/ui/actionbar/actionbar'; @@ -28,6 +29,10 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +export interface IViewletViewOptions extends IViewOptions { + viewletSettings: any; +} + export interface IViewletView extends IView, IThemable { id?: string; create(): TPromise; @@ -373,6 +378,7 @@ export class ComposedViewsViewlet extends Viewlet { private splitView: SplitView; private views: IViewletView[]; private dimension: Dimension; + private viewletSettings: any; private readonly viewsStates: Map; @@ -389,6 +395,7 @@ export class ComposedViewsViewlet extends Viewlet { super(id, telemetryService, themeService); this.views = []; + this.viewletSettings = this.getMemento(storageService, Scope.WORKSPACE); this.viewsStates = this.loadViewsStates(); this._register(ViewsRegistry.onViewsRegistered(viewDescriptors => this.createViews(viewDescriptors.filter(viewDescriptor => ViewLocation.Explorer === viewDescriptor.location)))); @@ -444,7 +451,8 @@ export class ComposedViewsViewlet extends Viewlet { const view = this.createView(viewDescriptor, { name: viewDescriptor.name, actionRunner: this.getActionRunner(), - collapsed: viewState ? viewState.collapsed : true + collapsed: viewState ? viewState.collapsed : true, + viewletSettings: this.viewletSettings }); if (index !== -1) { this.views.splice(index, 0, view); @@ -546,7 +554,7 @@ export class ComposedViewsViewlet extends Viewlet { }, new Map()); } - protected createView(viewDescriptor: IViewDescriptor, options: IViewOptions): IViewletView { + protected createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): IViewletView { return this.instantiationService.createInstance(viewDescriptor.ctor, viewDescriptor.id, options); } From 9acebf6374b4e886d0290bd1cb672c2f37374d6e Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 9 Jun 2017 10:52:22 +0200 Subject: [PATCH 1673/2747] #27823 - Debt reduction. Clean up views. - Implement Composed views viewlet - Adopt explorer debug viewlet to composed views viewlet --- src/vs/base/browser/ui/splitview/splitview.ts | 100 ++-- .../parts/debug/browser/debugViewRegistry.ts | 37 -- .../parts/debug/browser/debugViewlet.ts | 116 +---- .../electron-browser/debug.contribution.ts | 10 +- .../debug/electron-browser/debugViews.ts | 59 +-- .../parts/files/browser/explorerViewlet.ts | 10 +- .../parts/files/browser/views/emptyView.ts | 13 +- .../parts/files/browser/views/explorerView.ts | 10 +- .../files/browser/views/openEditorsView.ts | 19 +- .../workbench/parts/views/browser/treeView.ts | 47 +- src/vs/workbench/parts/views/browser/views.ts | 429 ++++++++---------- .../views/browser/viewsExtensionPoint.ts | 15 +- .../parts/views/browser/viewsRegistry.ts | 20 +- 13 files changed, 361 insertions(+), 524 deletions(-) delete mode 100644 src/vs/workbench/parts/debug/browser/debugViewRegistry.ts diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 41415d49b183a..31710fb348938 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -9,7 +9,6 @@ import 'vs/css!./splitview'; import lifecycle = require('vs/base/common/lifecycle'); import ee = require('vs/base/common/eventEmitter'); import types = require('vs/base/common/types'); -import objects = require('vs/base/common/objects'); import dom = require('vs/base/browser/dom'); import numbers = require('vs/base/common/numbers'); import sash = require('vs/base/browser/ui/sash/sash'); @@ -240,10 +239,9 @@ export abstract class HeaderView extends View { } export interface ICollapsibleViewOptions { - ariaHeaderLabel?: string; - fixedSize?: number; - minimumSize?: number; - headerSize?: number; + sizing: ViewSizing; + ariaHeaderLabel: string; + bodySize?: number; initialState?: CollapsibleState; } @@ -260,14 +258,43 @@ export abstract class AbstractCollapsibleView extends HeaderView { private headerClickListener: lifecycle.IDisposable; private headerKeyListener: lifecycle.IDisposable; private focusTracker: dom.IFocusTracker; + private _bodySize: number; + private _previousSize: number = null; + private readonly viewSizing: ViewSizing; constructor(opts: ICollapsibleViewOptions) { super(opts); + this.viewSizing = opts.sizing; + this.ariaHeaderLabel = opts.ariaHeaderLabel; - this.ariaHeaderLabel = opts && opts.ariaHeaderLabel; + this.setBodySize(types.isUndefined(opts.bodySize) ? 22 : opts.bodySize); this.changeState(types.isUndefined(opts.initialState) ? CollapsibleState.EXPANDED : opts.initialState); } + get previousSize(): number { + return this._previousSize; + } + + setBodySize(bodySize: number) { + this._bodySize = bodySize; + this.updateSize(); + } + + private updateSize() { + if (this.viewSizing === ViewSizing.Fixed) { + this.setFixed(this.state === CollapsibleState.EXPANDED ? this._bodySize + this.headerSize : this.headerSize); + } else { + this._minimumSize = this._bodySize + this.headerSize; + this._previousSize = !this.previousSize || this._previousSize < this._minimumSize ? this._minimumSize : this._previousSize; + if (this.state === CollapsibleState.EXPANDED) { + this.setFlexible(this._previousSize || this._minimumSize); + } else { + this._previousSize = this.size || this._minimumSize; + this.setFixed(this.headerSize); + } + } + } + render(container: HTMLElement, orientation: Orientation): void { super.render(container, orientation); @@ -377,6 +404,7 @@ export abstract class AbstractCollapsibleView extends HeaderView { } this.layoutHeader(); + this.updateSize(); } dispose(): void { @@ -399,55 +427,6 @@ export abstract class AbstractCollapsibleView extends HeaderView { } } -export abstract class CollapsibleView extends AbstractCollapsibleView { - - private previousSize: number; - - constructor(opts: ICollapsibleViewOptions) { - super(opts); - this.previousSize = null; - } - - protected changeState(state: CollapsibleState): void { - super.changeState(state); - - if (state === CollapsibleState.EXPANDED) { - this.setFlexible(this.previousSize || this._minimumSize); - } else { - this.previousSize = this.size; - this.setFixed(); - } - } -} - -export interface IFixedCollapsibleViewOptions extends ICollapsibleViewOptions { - expandedBodySize?: number; -} - -export abstract class FixedCollapsibleView extends AbstractCollapsibleView { - - private _expandedBodySize: number; - - constructor(opts: IFixedCollapsibleViewOptions) { - super(objects.mixin({ sizing: ViewSizing.Fixed }, opts)); - this._expandedBodySize = types.isUndefined(opts.expandedBodySize) ? 22 : opts.expandedBodySize; - } - - get fixedSize(): number { return this.state === CollapsibleState.EXPANDED ? this.expandedSize : this.headerSize; } - private get expandedSize(): number { return this.expandedBodySize + this.headerSize; } - - get expandedBodySize(): number { return this._expandedBodySize; } - set expandedBodySize(size: number) { - this._expandedBodySize = size; - this.setFixed(this.fixedSize); - } - - protected changeState(state: CollapsibleState): void { - super.changeState(state); - this.setFixed(this.fixedSize); - } -} - class PlainView extends View { render() { } focus() { } @@ -555,7 +534,7 @@ export class SplitView implements } /** - * Reset size to null. This will layout newly added viees to initial weights. + * Reset size to null. This will layout newly added views to initial weights. */ this.size = null; @@ -599,6 +578,14 @@ export class SplitView implements this.viewFocusNextListeners.splice(index, 0, view.addListener('focusNext', () => index < this.views.length && this.views[index + 1].focus())); } + updateWeight(view: IView, weight: number) { + let index = this.views.indexOf(view); + if (index < 0) { + return; + } + this.initialWeights[index] = weight; + } + removeView(view: IView): void { let index = this.views.indexOf(view); @@ -606,6 +593,7 @@ export class SplitView implements return; } + this.size = null; let deadView = new DeadView(view); this.views[index] = deadView; this.onViewChange(deadView, 0); diff --git a/src/vs/workbench/parts/debug/browser/debugViewRegistry.ts b/src/vs/workbench/parts/debug/browser/debugViewRegistry.ts deleted file mode 100644 index 6aea43a763525..0000000000000 --- a/src/vs/workbench/parts/debug/browser/debugViewRegistry.ts +++ /dev/null @@ -1,37 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { IActionRunner } from 'vs/base/common/actions'; -import { IViewletView } from 'vs/workbench/parts/views/browser/views'; - -// Debug view registration - -export interface IDebugViewConstructorSignature { - new (actionRunner: IActionRunner, viewletSetings: any, ...services: { _serviceBrand: any; }[]): IViewletView; -} - -export interface IDebugViewRegistry { - registerDebugView(view: IDebugViewConstructorSignature, order: number, weight: number): void; - getDebugViews(): { view: IDebugViewConstructorSignature, weight: number }[]; -} - -class DebugViewRegistryImpl implements IDebugViewRegistry { - private debugViews: { view: IDebugViewConstructorSignature, order: number, weight: number }[]; - - constructor() { - this.debugViews = []; - } - - public registerDebugView(view: IDebugViewConstructorSignature, order: number, weight: number): void { - this.debugViews.push({ view, order, weight }); - } - - public getDebugViews(): { view: IDebugViewConstructorSignature, weight: number }[] { - return this.debugViews.sort((first, second) => first.order - second.order) - .map(viewWithOrder => ({ view: viewWithOrder.view, weight: viewWithOrder.weight })); - } -} - -export const DebugViewRegistry = new DebugViewRegistryImpl(); diff --git a/src/vs/workbench/parts/debug/browser/debugViewlet.ts b/src/vs/workbench/parts/debug/browser/debugViewlet.ts index df7e198e7b728..a6af553167360 100644 --- a/src/vs/workbench/parts/debug/browser/debugViewlet.ts +++ b/src/vs/workbench/parts/debug/browser/debugViewlet.ts @@ -4,108 +4,49 @@ *--------------------------------------------------------------------------------------------*/ import 'vs/css!./media/debugViewlet'; -import { Builder, Dimension } from 'vs/base/browser/builder'; +import { Builder } from 'vs/base/browser/builder'; +import * as DOM from 'vs/base/browser/dom'; import { TPromise } from 'vs/base/common/winjs.base'; -import * as lifecycle from 'vs/base/common/lifecycle'; import { IAction } from 'vs/base/common/actions'; import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; -import { SplitView, HeaderView } from 'vs/base/browser/ui/splitview/splitview'; -import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; -import { Scope } from 'vs/workbench/common/memento'; -import { Viewlet } from 'vs/workbench/browser/viewlet'; -import { IViewletView } from 'vs/workbench/parts/views/browser/views'; +import { ComposedViewsViewlet } from 'vs/workbench/parts/views/browser/views'; import { IDebugService, VIEWLET_ID, State } from 'vs/workbench/parts/debug/common/debug'; -import { DebugViewRegistry } from 'vs/workbench/parts/debug/browser/debugViewRegistry'; import { StartAction, ToggleReplAction, ConfigureAction } from 'vs/workbench/parts/debug/browser/debugActions'; import { StartDebugActionItem } from 'vs/workbench/parts/debug/browser/debugActionItems'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IProgressService, IProgressRunner } from 'vs/platform/progress/common/progress'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; +import { IStorageService } from 'vs/platform/storage/common/storage'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { attachHeaderViewStyler } from 'vs/platform/theme/common/styler'; +import { ViewLocation } from 'vs/workbench/parts/views/browser/viewsRegistry'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; -const DEBUG_VIEWS_WEIGHTS = 'debug.viewsweights'; +export class DebugViewlet extends ComposedViewsViewlet { -export class DebugViewlet extends Viewlet { - - private toDispose: lifecycle.IDisposable[]; private actions: IAction[]; private startDebugActionItem: StartDebugActionItem; private progressRunner: IProgressRunner; - private viewletSettings: any; - - private $el: Builder; - private splitView: SplitView; - private views: IViewletView[]; constructor( @ITelemetryService telemetryService: ITelemetryService, @IProgressService private progressService: IProgressService, @IDebugService private debugService: IDebugService, - @IInstantiationService private instantiationService: IInstantiationService, - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IStorageService private storageService: IStorageService, - @ILifecycleService lifecycleService: ILifecycleService, - @IThemeService themeService: IThemeService + @IInstantiationService instantiationService: IInstantiationService, + @IWorkspaceContextService contextService: IWorkspaceContextService, + @IStorageService storageService: IStorageService, + @IThemeService themeService: IThemeService, + @IContextKeyService contextKeyService: IContextKeyService ) { - super(VIEWLET_ID, telemetryService, themeService); + super(VIEWLET_ID, ViewLocation.Debug, `${VIEWLET_ID}.state`, telemetryService, storageService, instantiationService, themeService, contextService, contextKeyService); this.progressRunner = null; - this.viewletSettings = this.getMemento(storageService, Scope.WORKSPACE); - this.toDispose = []; - this.views = []; - this.toDispose.push(this.debugService.onDidChangeState(state => { - this.onDebugServiceStateChange(state); - })); - lifecycleService.onShutdown(this.store, this); - } - - // viewlet - - public create(parent: Builder): TPromise { - super.create(parent); - this.$el = parent.div().addClass('debug-viewlet'); - - const actionRunner = this.getActionRunner(); - const registeredViews = DebugViewRegistry.getDebugViews(); - this.views = registeredViews.map(viewConstructor => this.instantiationService.createInstance( - viewConstructor.view, - actionRunner, - this.viewletSettings) - ); - - this.views.forEach((view, index) => { - if (view instanceof HeaderView) { - attachHeaderViewStyler(view, this.themeService, { noContrastBorder: index === 0 }); - } - }); - - this.splitView = new SplitView(this.$el.getHTMLElement()); - this.toDispose.push(this.splitView); - let weights: number[] = JSON.parse(this.storageService.get(DEBUG_VIEWS_WEIGHTS, StorageScope.WORKSPACE, '[]')); - if (!weights.length) { - weights = registeredViews.map(v => v.weight); - } - - for (let i = 0; i < this.views.length; i++) { - this.splitView.addView(this.views[i], Math.max(weights[i], 1)); - } - - return TPromise.as(null); - } - public setVisible(visible: boolean): TPromise { - return super.setVisible(visible).then(() => { - return TPromise.join(this.views.map(view => view.setVisible(visible))); - }); + this._register(this.debugService.onDidChangeState(state => this.onDebugServiceStateChange(state))); } - public layout(dimension: Dimension): void { - if (this.splitView) { - this.splitView.layout(dimension.height); - } + public create(parent: Builder): TPromise { + return super.create(parent).then(() => DOM.addClass(this.viewletContainer, 'debug-viewlet')); } public focus(): void { @@ -127,16 +68,16 @@ export class DebugViewlet extends Viewlet { if (this.contextService.hasWorkspace()) { this.actions.push(this.instantiationService.createInstance(ConfigureAction, ConfigureAction.ID, ConfigureAction.LABEL)); } - this.actions.push(this.instantiationService.createInstance(ToggleReplAction, ToggleReplAction.ID, ToggleReplAction.LABEL)); - - this.actions.forEach(a => { - this.toDispose.push(a); - }); + this.actions.push(this._register(this.instantiationService.createInstance(ToggleReplAction, ToggleReplAction.ID, ToggleReplAction.LABEL))); } return this.actions; } + public getSecondaryActions(): IAction[] { + return []; + } + public getActionItem(action: IAction): IActionItem { if (action.id === StartAction.ID && this.contextService.hasWorkspace()) { this.startDebugActionItem = this.instantiationService.createInstance(StartDebugActionItem, null, action); @@ -157,19 +98,4 @@ export class DebugViewlet extends Viewlet { this.progressRunner = null; } } - - private store(): void { - this.storageService.store(DEBUG_VIEWS_WEIGHTS, JSON.stringify(this.views.map(view => view.size)), StorageScope.WORKSPACE); - } - - public dispose(): void { - this.toDispose = lifecycle.dispose(this.toDispose); - - super.dispose(); - } - - public shutdown(): void { - this.views.forEach(v => v.shutdown()); - super.shutdown(); - } } diff --git a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts index 947763e025535..368615a85a9b3 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts @@ -15,7 +15,6 @@ import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'v import { IWorkbenchActionRegistry, Extensions as WorkbenchActionRegistryExtensions } from 'vs/workbench/common/actionRegistry'; import { ToggleViewletAction, Extensions as ViewletExtensions, ViewletRegistry, ViewletDescriptor } from 'vs/workbench/browser/viewlet'; import { TogglePanelAction, Extensions as PanelExtensions, PanelRegistry, PanelDescriptor } from 'vs/workbench/browser/panel'; -import { DebugViewRegistry } from 'vs/workbench/parts/debug/browser/debugViewRegistry'; import { VariablesView, WatchExpressionsView, CallStackView, BreakpointsView } from 'vs/workbench/parts/debug/electron-browser/debugViews'; import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions'; import { IDebugService, VIEWLET_ID, REPL_ID, CONTEXT_NOT_IN_DEBUG_MODE, CONTEXT_IN_DEBUG_MODE, INTERNAL_CONSOLE_OPTIONS_SCHEMA } from 'vs/workbench/parts/debug/common/debug'; @@ -35,6 +34,7 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import * as debugCommands from 'vs/workbench/parts/debug/electron-browser/debugCommands'; import { IQuickOpenRegistry, Extensions as QuickOpenExtensions, QuickOpenHandlerDescriptor } from 'vs/workbench/browser/quickopen'; import { StatusBarColorProvider } from 'vs/workbench/parts/debug/electron-browser/statusbarColorProvider'; +import { ViewLocation, ViewsRegistry } from 'vs/workbench/parts/views/browser/viewsRegistry'; class OpenDebugViewletAction extends ToggleViewletAction { public static ID = VIEWLET_ID; @@ -94,10 +94,10 @@ Registry.as(PanelExtensions.Panels).registerPanel(new PanelDescri Registry.as(PanelExtensions.Panels).setDefaultPanelId(REPL_ID); // Register default debug views -DebugViewRegistry.registerDebugView(VariablesView, 10, 40); -DebugViewRegistry.registerDebugView(WatchExpressionsView, 20, 10); -DebugViewRegistry.registerDebugView(CallStackView, 30, 30); -DebugViewRegistry.registerDebugView(BreakpointsView, 40, 20); +ViewsRegistry.registerViews([{ id: 'workbench.debug.variablesView', name: '', ctor: VariablesView, order: 10, size: 40, location: ViewLocation.Debug }]); +ViewsRegistry.registerViews([{ id: 'workbench.debug.watchExpressionsView', name: '', ctor: WatchExpressionsView, order: 20, size: 10, location: ViewLocation.Debug }]); +ViewsRegistry.registerViews([{ id: 'workbench.debug.callStackView', name: '', ctor: CallStackView, order: 30, size: 30, location: ViewLocation.Debug }]); +ViewsRegistry.registerViews([{ id: 'workbench.debug.breakPointsView', name: '', ctor: BreakpointsView, order: 40, size: 20, location: ViewLocation.Debug }]); // register action to open viewlet const registry = Registry.as(WorkbenchActionRegistryExtensions.WorkbenchActions); diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts index 6bb133269d598..f6c919a997a3a 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViews.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViews.ts @@ -11,13 +11,13 @@ import * as builder from 'vs/base/browser/builder'; import { TPromise } from 'vs/base/common/winjs.base'; import * as errors from 'vs/base/common/errors'; import { EventType } from 'vs/base/common/events'; -import { IActionRunner, IAction } from 'vs/base/common/actions'; +import { IAction } from 'vs/base/common/actions'; import { prepareActions } from 'vs/workbench/browser/actions'; import { IHighlightEvent, ITree } from 'vs/base/parts/tree/browser/tree'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; -import { CollapsibleState } from 'vs/base/browser/ui/splitview/splitview'; +import { CollapsibleState, ViewSizing } from 'vs/base/browser/ui/splitview/splitview'; import { CollapseAction } from 'vs/workbench/browser/viewlet'; -import { CollapsibleViewletView, AdaptiveCollapsibleViewletView } from 'vs/workbench/parts/views/browser/views'; +import { CollapsibleView, IViewletViewOptions } from 'vs/workbench/parts/views/browser/views'; import { IDebugService, State, IBreakpoint, IExpression, CONTEXT_BREAKPOINTS_FOCUSED, CONTEXT_WATCH_EXPRESSIONS_FOCUSED, CONTEXT_VARIABLES_FOCUSED } from 'vs/workbench/parts/debug/common/debug'; import { Expression, Variable, ExceptionBreakpoint, FunctionBreakpoint, Thread, StackFrame, Breakpoint, ThreadAndProcessIds } from 'vs/workbench/parts/debug/common/debugModel'; import * as viewer from 'vs/workbench/parts/debug/electron-browser/debugViewer'; @@ -26,7 +26,6 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { MenuId } from 'vs/platform/actions/common/actions'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IMessageService } from 'vs/platform/message/common/message'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IListService } from 'vs/platform/list/browser/listService'; @@ -43,16 +42,15 @@ function renderViewTree(container: HTMLElement): HTMLElement { const $ = builder.$; const twistiePixels = 20; -export class VariablesView extends CollapsibleViewletView { +export class VariablesView extends CollapsibleView { private static MEMENTO = 'variablesview.memento'; private onFocusStackFrameScheduler: RunOnceScheduler; private variablesFocusedContext: IContextKey; + private settings: any; constructor( - actionRunner: IActionRunner, - private settings: any, - @IMessageService messageService: IMessageService, + options: IViewletViewOptions, @IContextMenuService contextMenuService: IContextMenuService, @ITelemetryService private telemetryService: ITelemetryService, @IDebugService private debugService: IDebugService, @@ -62,8 +60,9 @@ export class VariablesView extends CollapsibleViewletView { @IListService private listService: IListService, @IThemeService private themeService: IThemeService ) { - super(actionRunner, !!settings[VariablesView.MEMENTO], nls.localize('variablesSection', "Variables Section"), messageService, keybindingService, contextMenuService); + super({ ...options, sizing: ViewSizing.Flexible, ariaHeaderLabel: nls.localize('variablesSection', "Variables Section") }, keybindingService, contextMenuService); + this.settings = options.viewletSettings; this.variablesFocusedContext = CONTEXT_VARIABLES_FOCUSED.bindTo(contextKeyService); // Use scheduler to prevent unnecessary flashing this.onFocusStackFrameScheduler = new RunOnceScheduler(() => { @@ -151,17 +150,16 @@ export class VariablesView extends CollapsibleViewletView { } } -export class WatchExpressionsView extends CollapsibleViewletView { +export class WatchExpressionsView extends CollapsibleView { private static MEMENTO = 'watchexpressionsview.memento'; private onWatchExpressionsUpdatedScheduler: RunOnceScheduler; private toReveal: IExpression; private watchExpressionsFocusedContext: IContextKey; + private settings: any; constructor( - actionRunner: IActionRunner, - private settings: any, - @IMessageService messageService: IMessageService, + options: IViewletViewOptions, @IContextMenuService contextMenuService: IContextMenuService, @IDebugService private debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService, @@ -170,7 +168,8 @@ export class WatchExpressionsView extends CollapsibleViewletView { @IListService private listService: IListService, @IThemeService private themeService: IThemeService ) { - super(actionRunner, !!settings[WatchExpressionsView.MEMENTO], nls.localize('expressionsSection', "Expressions Section"), messageService, keybindingService, contextMenuService); + super({ ...options, ariaHeaderLabel: nls.localize('expressionsSection', "Expressions Section"), sizing: ViewSizing.Flexible }, keybindingService, contextMenuService); + this.settings = options.viewletSettings; this.toDispose.push(this.debugService.getModel().onDidChangeWatchExpressions(we => { // only expand when a new watch expression is added. @@ -250,17 +249,16 @@ export class WatchExpressionsView extends CollapsibleViewletView { } } -export class CallStackView extends CollapsibleViewletView { +export class CallStackView extends CollapsibleView { private static MEMENTO = 'callstackview.memento'; private pauseMessage: builder.Builder; private pauseMessageLabel: builder.Builder; private onCallStackChangeScheduler: RunOnceScheduler; + private settings: any; constructor( - actionRunner: IActionRunner, - private settings: any, - @IMessageService messageService: IMessageService, + options: IViewletViewOptions, @IContextMenuService contextMenuService: IContextMenuService, @ITelemetryService private telemetryService: ITelemetryService, @IDebugService private debugService: IDebugService, @@ -269,7 +267,8 @@ export class CallStackView extends CollapsibleViewletView { @IListService private listService: IListService, @IThemeService private themeService: IThemeService ) { - super(actionRunner, !!settings[CallStackView.MEMENTO], nls.localize('callstackSection', "Call Stack Section"), messageService, keybindingService, contextMenuService); + super({ ...options, ariaHeaderLabel: nls.localize('callstackSection', "Call Stack Section"), sizing: ViewSizing.Flexible }, keybindingService, contextMenuService); + this.settings = options.viewletSettings; // Create scheduler to prevent unnecessary flashing of tree when reacting to changes this.onCallStackChangeScheduler = new RunOnceScheduler(() => { @@ -385,15 +384,15 @@ export class CallStackView extends CollapsibleViewletView { } } -export class BreakpointsView extends AdaptiveCollapsibleViewletView { +export class BreakpointsView extends CollapsibleView { private static MAX_VISIBLE_FILES = 9; private static MEMENTO = 'breakopintsview.memento'; private breakpointsFocusedContext: IContextKey; + private settings: any; constructor( - actionRunner: IActionRunner, - private settings: any, + options: IViewletViewOptions, @IContextMenuService contextMenuService: IContextMenuService, @IDebugService private debugService: IDebugService, @IKeybindingService keybindingService: IKeybindingService, @@ -402,10 +401,14 @@ export class BreakpointsView extends AdaptiveCollapsibleViewletView { @IListService private listService: IListService, @IThemeService private themeService: IThemeService ) { - super(actionRunner, BreakpointsView.getExpandedBodySize( - debugService.getModel().getBreakpoints().length + debugService.getModel().getFunctionBreakpoints().length + debugService.getModel().getExceptionBreakpoints().length), - !!settings[BreakpointsView.MEMENTO], nls.localize('breakpointsSection', "Breakpoints Section"), keybindingService, contextMenuService); - + super({ + ...options, + ariaHeaderLabel: nls.localize('breakpointsSection', "Breakpoints Section"), + sizing: ViewSizing.Fixed, initialBodySize: BreakpointsView.getExpandedBodySize( + debugService.getModel().getBreakpoints().length + debugService.getModel().getFunctionBreakpoints().length + debugService.getModel().getExceptionBreakpoints().length) + }, keybindingService, contextMenuService); + + this.settings = options.viewletSettings; this.breakpointsFocusedContext = CONTEXT_BREAKPOINTS_FOCUSED.bindTo(contextKeyService); this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(() => this.onBreakpointsChange())); } @@ -503,8 +506,8 @@ export class BreakpointsView extends AdaptiveCollapsibleViewletView { private onBreakpointsChange(): void { const model = this.debugService.getModel(); - this.expandedBodySize = BreakpointsView.getExpandedBodySize( - model.getBreakpoints().length + model.getExceptionBreakpoints().length + model.getFunctionBreakpoints().length); + this.setBodySize(BreakpointsView.getExpandedBodySize( + model.getBreakpoints().length + model.getExceptionBreakpoints().length + model.getFunctionBreakpoints().length)); if (this.tree) { this.tree.refresh(); diff --git a/src/vs/workbench/parts/files/browser/explorerViewlet.ts b/src/vs/workbench/parts/files/browser/explorerViewlet.ts index 87a26e07bfbac..eaea1615ad2da 100644 --- a/src/vs/workbench/parts/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/browser/explorerViewlet.ts @@ -11,7 +11,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import * as DOM from 'vs/base/browser/dom'; import { Builder } from 'vs/base/browser/builder'; import { VIEWLET_ID, ExplorerViewletVisibleContext, IFilesConfiguration } from 'vs/workbench/parts/files/common/files'; -import { ComposedViewsViewlet, IViewletView, IViewletViewOptions } from 'vs/workbench/parts/views/browser/views'; +import { ComposedViewsViewlet, IView, IViewletViewOptions } from 'vs/workbench/parts/views/browser/views'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ActionRunner, FileViewletState } from 'vs/workbench/parts/files/browser/views/explorerViewer'; import { ExplorerView, IExplorerViewOptions } from 'vs/workbench/parts/files/browser/views/explorerView'; @@ -49,7 +49,7 @@ export class ExplorerViewlet extends ComposedViewsViewlet { @IContextKeyService contextKeyService: IContextKeyService, @IThemeService themeService: IThemeService ) { - super(VIEWLET_ID, ViewLocation.Explorer, ExplorerViewlet.EXPLORER_VIEWS_STATE, telemetryService, storageService, instantiationService, themeService, contextService); + super(VIEWLET_ID, ViewLocation.Explorer, ExplorerViewlet.EXPLORER_VIEWS_STATE, telemetryService, storageService, instantiationService, themeService, contextService, contextKeyService); this.viewletState = new FileViewletState(); this.viewletVisibleContextKey = ExplorerViewletVisibleContext.bindTo(contextKeyService); @@ -124,7 +124,7 @@ export class ExplorerViewlet extends ComposedViewsViewlet { return !this.contextService.hasWorkspace() || (this.configurationService.getConfiguration()).explorer.openEditors.visible !== 0; } - protected createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): IViewletView { + protected createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): IView { if (viewDescriptor.id === ExplorerView.ID) { // Create a delegating editor service for the explorer to be able to delay the refresh in the opened // editors view above. This is a workaround for being able to double click on a file to make it pinned @@ -164,7 +164,7 @@ export class ExplorerViewlet extends ComposedViewsViewlet { }); const explorerInstantiator = this.instantiationService.createChild(new ServiceCollection([IWorkbenchEditorService, delegatingEditorService])); - return explorerInstantiator.createInstance(ExplorerView, viewDescriptor.id, { ...options, viewletState: this.viewletState }); + return explorerInstantiator.createInstance(ExplorerView, { ...options, viewletState: this.viewletState }); } return super.createView(viewDescriptor, options); } @@ -222,7 +222,7 @@ export class ExplorerViewlet extends ComposedViewsViewlet { super.focus(); } - private hasSelectionOrFocus(view: IViewletView): boolean { + private hasSelectionOrFocus(view: IView): boolean { if (!view) { return false; } diff --git a/src/vs/workbench/parts/files/browser/views/emptyView.ts b/src/vs/workbench/parts/files/browser/views/emptyView.ts index eb02a3b108706..7cecda136e6cf 100644 --- a/src/vs/workbench/parts/files/browser/views/emptyView.ts +++ b/src/vs/workbench/parts/files/browser/views/emptyView.ts @@ -13,32 +13,29 @@ import { IAction } from 'vs/base/common/actions'; import { Button } from 'vs/base/browser/ui/button/button'; import { $ } from 'vs/base/browser/builder'; import { IActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; -import { CollapsibleViewletView } from 'vs/workbench/parts/views/browser/views'; +import { CollapsibleView, IViewletViewOptions } from 'vs/workbench/parts/views/browser/views'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { OpenFolderAction, OpenFileFolderAction } from 'vs/workbench/browser/actions/fileActions'; import { attachButtonStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { IViewOptions } from 'vs/workbench/parts/views/browser/viewsRegistry'; -import { IMessageService } from 'vs/platform/message/common/message'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; +import { ViewSizing } from 'vs/base/browser/ui/splitview/splitview'; -export class EmptyView extends CollapsibleViewletView { +export class EmptyView extends CollapsibleView { public static ID: string = 'workbench.explorer.emptyView'; private openFolderButton: Button; constructor( - readonly id: string, - options: IViewOptions, + options: IViewletViewOptions, @IThemeService private themeService: IThemeService, @IInstantiationService private instantiationService: IInstantiationService, - @IMessageService messageService: IMessageService, @IKeybindingService keybindingService: IKeybindingService, @IContextMenuService contextMenuService: IContextMenuService ) { - super(options.actionRunner, options.collapsed, nls.localize('explorerSection', "Files Explorer Section"), messageService, keybindingService, contextMenuService, void 0, 5 * 22); + super({ ...options, ariaHeaderLabel: nls.localize('explorerSection', "Files Explorer Section"), sizing: ViewSizing.Flexible }, keybindingService, contextMenuService); } public renderHeader(container: HTMLElement): void { diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index b43a82cb081cb..c9372420e0656 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -25,7 +25,7 @@ import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import * as DOM from 'vs/base/browser/dom'; import { CollapseAction } from 'vs/workbench/browser/viewlet'; -import { CollapsibleViewletView, IViewletViewOptions } from 'vs/workbench/parts/views/browser/views'; +import { CollapsibleView, IViewletViewOptions } from 'vs/workbench/parts/views/browser/views'; import { FileStat } from 'vs/workbench/parts/files/common/explorerViewModel'; import { IListService } from 'vs/platform/list/browser/listService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; @@ -43,12 +43,13 @@ import { IWorkbenchThemeService, IFileIconTheme } from 'vs/workbench/services/th import { isLinux } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { attachListStyler } from 'vs/platform/theme/common/styler'; +import { ViewSizing } from 'vs/base/browser/ui/splitview/splitview'; export interface IExplorerViewOptions extends IViewletViewOptions { viewletState: FileViewletState; } -export class ExplorerView extends CollapsibleViewletView { +export class ExplorerView extends CollapsibleView { public static ID: string = 'workbench.explorer.fileView'; private static EXPLORER_FILE_CHANGES_REACT_DELAY = 500; // delay in ms to react to file changes to give our internal events a chance to react first @@ -82,9 +83,8 @@ export class ExplorerView extends CollapsibleViewletView { private settings: any; constructor( - id: string, options: IExplorerViewOptions, - @IMessageService messageService: IMessageService, + @IMessageService private messageService: IMessageService, @IContextMenuService contextMenuService: IContextMenuService, @IInstantiationService private instantiationService: IInstantiationService, @IEditorGroupService private editorGroupService: IEditorGroupService, @@ -100,7 +100,7 @@ export class ExplorerView extends CollapsibleViewletView { @IWorkbenchThemeService private themeService: IWorkbenchThemeService, @IEnvironmentService private environmentService: IEnvironmentService ) { - super(options.actionRunner, options.collapsed, nls.localize('explorerSection', "Files Explorer Section"), messageService, keybindingService, contextMenuService); + super({ ...options, ariaHeaderLabel: nls.localize('explorerSection', "Files Explorer Section"), sizing: ViewSizing.Flexible }, keybindingService, contextMenuService); this.settings = options.viewletSettings; this.viewletState = options.viewletState; diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts index cc78b196c58e0..d15bc3aef0084 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts @@ -18,7 +18,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IEditorStacksModel, IStacksModelChangeEvent, IEditorGroup } from 'vs/workbench/common/editor'; import { SaveAllAction } from 'vs/workbench/parts/files/browser/fileActions'; -import { AdaptiveCollapsibleViewletView } from 'vs/workbench/parts/views/browser/views'; +import { CollapsibleView, IViewletViewOptions } from 'vs/workbench/parts/views/browser/views'; import { IFilesConfiguration, VIEWLET_ID, OpenEditorsFocussedContext, ExplorerFocussedContext } from 'vs/workbench/parts/files/common/files'; import { ITextFileService, AutoSaveMode } from 'vs/workbench/services/textfile/common/textfiles'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; @@ -33,11 +33,11 @@ import { EditorGroup } from 'vs/workbench/common/editor/editorStacksModel'; import { attachListStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { badgeBackground, badgeForeground, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; -import { IViewOptions } from 'vs/workbench/parts/views/browser/viewsRegistry'; +import { ViewSizing } from 'vs/base/browser/ui/splitview/splitview'; const $ = dom.$; -export class OpenEditorsView extends AdaptiveCollapsibleViewletView { +export class OpenEditorsView extends CollapsibleView { private static DEFAULT_VISIBLE_OPEN_EDITORS = 9; private static DEFAULT_DYNAMIC_HEIGHT = true; @@ -56,7 +56,7 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView { private openEditorsFocussedContext: IContextKey; private explorerFocussedContext: IContextKey; - constructor(readonly id: string, options: IViewOptions, + constructor(options: IViewletViewOptions, @IInstantiationService private instantiationService: IInstantiationService, @IContextMenuService contextMenuService: IContextMenuService, @ITextFileService private textFileService: ITextFileService, @@ -69,7 +69,12 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView { @IViewletService private viewletService: IViewletService, @IThemeService private themeService: IThemeService ) { - super(options.actionRunner, OpenEditorsView.computeExpandedBodySize(editorGroupService.getStacksModel()), options.collapsed, nls.localize({ key: 'openEditosrSection', comment: ['Open is an adjective'] }, "Open Editors Section"), keybindingService, contextMenuService); + super({ + ...options, + ariaHeaderLabel: nls.localize({ key: 'openEditosrSection', comment: ['Open is an adjective'] }, "Open Editors Section"), + sizing: ViewSizing.Fixed, + initialBodySize: OpenEditorsView.computeExpandedBodySize(editorGroupService.getStacksModel()) + }, keybindingService, contextMenuService); this.model = editorGroupService.getStacksModel(); @@ -223,7 +228,7 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView { private structuralTreeUpdate(): void { // View size - this.expandedBodySize = this.getExpandedBodySize(this.model); + this.setBodySize(this.getExpandedBodySize(this.model)); // Show groups only if there is more than 1 group const treeInput = this.model.groups.length === 1 ? this.model.groups[0] : this.model; // TODO@Isidor temporary workaround due to a partial tree refresh issue @@ -277,7 +282,7 @@ export class OpenEditorsView extends AdaptiveCollapsibleViewletView { } // Adjust expanded body size - this.expandedBodySize = this.getExpandedBodySize(this.model); + this.setBodySize(this.getExpandedBodySize(this.model)); } private updateDirtyIndicator(): void { diff --git a/src/vs/workbench/parts/views/browser/treeView.ts b/src/vs/workbench/parts/views/browser/treeView.ts index 789a66389d7f6..fd5eb54fed129 100644 --- a/src/vs/workbench/parts/views/browser/treeView.ts +++ b/src/vs/workbench/parts/views/browser/treeView.ts @@ -6,7 +6,6 @@ import 'vs/css!./media/views'; import Event, { Emitter } from 'vs/base/common/event'; import { IDisposable, dispose, empty as EmptyDisposable, toDisposable } from 'vs/base/common/lifecycle'; -import { CollapsibleViewletView } from 'vs/workbench/parts/views/browser/views'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { TPromise } from 'vs/base/common/winjs.base'; import * as DOM from 'vs/base/browser/dom'; @@ -26,13 +25,14 @@ import { IProgressService } from 'vs/platform/progress/common/progress'; import { ITree, IDataSource, IRenderer, ContextMenuEvent } from 'vs/base/parts/tree/browser/tree'; import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { ActionItem } from 'vs/base/browser/ui/actionbar/actionbar'; -import { ViewsRegistry, IViewOptions } from 'vs/workbench/parts/views/browser/viewsRegistry'; +import { ViewsRegistry } from 'vs/workbench/parts/views/browser/viewsRegistry'; import { ITreeViewDataProvider, ITreeItem, TreeItemCollapsibleState, TreeViewItemHandleArg } from 'vs/workbench/parts/views/common/views'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; -import { CollapsibleState } from 'vs/base/browser/ui/splitview/splitview'; +import { CollapsibleState, ViewSizing } from 'vs/base/browser/ui/splitview/splitview'; +import { CollapsibleView, IViewletViewOptions } from 'vs/workbench/parts/views/browser/views'; import { ICommandService } from 'vs/platform/commands/common/commands'; -export class TreeView extends CollapsibleViewletView { +export class TreeView extends CollapsibleView { private menus: Menus; private viewFocusContext: IContextKey; @@ -44,9 +44,8 @@ export class TreeView extends CollapsibleViewletView { private disposables: IDisposable[] = []; constructor( - readonly id: string, - private options: IViewOptions, - @IMessageService messageService: IMessageService, + private options: IViewletViewOptions, + @IMessageService private messageService: IMessageService, @IKeybindingService keybindingService: IKeybindingService, @IContextMenuService contextMenuService: IContextMenuService, @IInstantiationService private instantiationService: IInstantiationService, @@ -56,7 +55,7 @@ export class TreeView extends CollapsibleViewletView { @IExtensionService private extensionService: IExtensionService, @ICommandService private commandService: ICommandService ) { - super(options.actionRunner, options.collapsed, options.name, messageService, keybindingService, contextMenuService); + super({ ...options, ariaHeaderLabel: options.name, sizing: ViewSizing.Flexible, collapsed: options.collapsed === void 0 ? true : options.collapsed }, keybindingService, contextMenuService); this.menus = this.instantiationService.createInstance(Menus, this.id); this.viewFocusContext = this.contextKeyService.createKey(this.id, void 0); this.menus.onDidChangeTitle(() => this.updateActions(), this, this.disposables); @@ -128,21 +127,27 @@ export class TreeView extends CollapsibleViewletView { return super.setVisible(visible); } - public setInput(): TPromise { - if (this.listenToDataProvider()) { - this.treeInputPromise = this.tree.setInput(new Root()); - return this.treeInputPromise; - } - this.treeInputPromise = new TPromise((c, e) => { - this.dataProviderRegisteredListener = ViewsRegistry.onTreeViewDataProviderRegistered(id => { - if (this.id === id) { - if (this.listenToDataProvider()) { - this.tree.setInput(new Root()).then(() => c(null)); - this.dataProviderRegisteredListener.dispose(); + public create(): TPromise { + return super.create().then(() => this.setInput()); + } + + private setInput(): TPromise { + if (this.tree && !this.treeInputPromise) { + if (this.listenToDataProvider()) { + this.treeInputPromise = this.tree.setInput(new Root()); + return this.treeInputPromise; + } + this.treeInputPromise = new TPromise((c, e) => { + this.dataProviderRegisteredListener = ViewsRegistry.onTreeViewDataProviderRegistered(id => { + if (this.id === id) { + if (this.listenToDataProvider()) { + this.tree.setInput(new Root()).then(() => c(null)); + this.dataProviderRegisteredListener.dispose(); + } } - } + }); }); - }); + } return TPromise.as(null); } diff --git a/src/vs/workbench/parts/views/browser/views.ts b/src/vs/workbench/parts/views/browser/views.ts index 01aa578329c4f..382e14ed69506 100644 --- a/src/vs/workbench/parts/views/browser/views.ts +++ b/src/vs/workbench/parts/views/browser/views.ts @@ -20,170 +20,77 @@ import { DelayedDragHandler } from 'vs/base/browser/dnd'; import { ToolBar } from 'vs/base/browser/ui/toolbar/toolbar'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; -import { IMessageService } from 'vs/platform/message/common/message'; -import { CollapsibleView, CollapsibleState, FixedCollapsibleView, IView, SplitView } from 'vs/base/browser/ui/splitview/splitview'; -import { ViewsRegistry, ViewLocation, IViewDescriptor, IViewOptions } from 'vs/workbench/parts/views/browser/viewsRegistry'; +import { AbstractCollapsibleView, CollapsibleState, IView as IBaseView, SplitView, ViewSizing } from 'vs/base/browser/ui/splitview/splitview'; +import { ViewsRegistry, ViewLocation, IViewDescriptor } from 'vs/workbench/parts/views/browser/viewsRegistry'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; -export interface IViewletViewOptions extends IViewOptions { - viewletSettings: any; -} +export interface IViewOptions { -export interface IViewletView extends IView, IThemable { - id?: string; - create(): TPromise; - setVisible(visible: boolean): TPromise; - getActions(): IAction[]; - getSecondaryActions(): IAction[]; - getActionItem(action: IAction): IActionItem; - showHeader(): boolean; - hideHeader(): boolean; - shutdown(): void; - focusBody(): void; - isExpanded(): boolean; - expand(): void; - collapse(): void; - getOptimalWidth(): number; -} + id: string; -/** - * The AdaptiveCollapsibleViewletView can grow with the content inside dynamically. - */ -export abstract class AdaptiveCollapsibleViewletView extends FixedCollapsibleView implements IViewletView { - protected treeContainer: HTMLElement; - protected tree: ITree; - protected toDispose: IDisposable[]; - protected isVisible: boolean; - protected toolBar: ToolBar; - protected actionRunner: IActionRunner; - protected isDisposed: boolean; + name: string; - private dragHandler: DelayedDragHandler; + actionRunner: IActionRunner; - constructor( - actionRunner: IActionRunner, - initialBodySize: number, - collapsed: boolean, - private viewName: string, - protected keybindingService: IKeybindingService, - protected contextMenuService: IContextMenuService - ) { - super({ - expandedBodySize: initialBodySize, - initialState: collapsed ? CollapsibleState.COLLAPSED : CollapsibleState.EXPANDED, - ariaHeaderLabel: viewName, - headerSize: 22, - }); - - this.actionRunner = actionRunner; - this.toDispose = []; - } + collapsed: boolean; - protected changeState(state: CollapsibleState): void { - updateTreeVisibility(this.tree, state === CollapsibleState.EXPANDED); +} - super.changeState(state); - } +export interface IViewConstructorSignature { - public create(): TPromise { - return TPromise.as(null); - } + new (options: IViewOptions, ...services: { _serviceBrand: any; }[]): IView; - public renderHeader(container: HTMLElement): void { +} - // Tool bar - this.toolBar = new ToolBar($('div.actions').appendTo(container).getHTMLElement(), this.contextMenuService, { - orientation: ActionsOrientation.HORIZONTAL, - actionItemProvider: (action) => this.getActionItem(action), - ariaLabel: nls.localize('viewToolbarAriaLabel', "{0} actions", this.viewName), - getKeyBinding: (action) => this.keybindingService.lookupKeybinding(action.id) - }); - this.toolBar.actionRunner = this.actionRunner; - this.updateActions(); +export interface IView extends IBaseView, IThemable { - // Expand on drag over - this.dragHandler = new DelayedDragHandler(container, () => { - if (!this.isExpanded()) { - this.expand(); - } - }); - } + id: string; - protected updateActions(): void { - this.toolBar.setActions(prepareActions(this.getActions()), prepareActions(this.getSecondaryActions()))(); - } + create(): TPromise; - protected renderViewTree(container: HTMLElement): HTMLElement { - return renderViewTree(container); - } + setVisible(visible: boolean): TPromise; - public getViewer(): ITree { - return this.tree; - } + getActions(): IAction[]; - public setVisible(visible: boolean): TPromise { - this.isVisible = visible; + getSecondaryActions(): IAction[]; - updateTreeVisibility(this.tree, visible && this.state === CollapsibleState.EXPANDED); + getActionItem(action: IAction): IActionItem; - return TPromise.as(null); - } + showHeader(): boolean; - public focusBody(): void { - focus(this.tree); - } + hideHeader(): boolean; - protected reveal(element: any, relativeTop?: number): TPromise { - return reveal(this.tree, element, relativeTop); - } + focusBody(): void; - protected layoutBody(size: number): void { - this.treeContainer.style.height = size + 'px'; - this.tree.layout(size); - } + isExpanded(): boolean; - public getActions(): IAction[] { - return []; - } + expand(): void; - public getSecondaryActions(): IAction[] { - return []; - } + collapse(): void; - public getActionItem(action: IAction): IActionItem { - return null; - } + getOptimalWidth(): number; - public shutdown(): void { - // Subclass to implement - } + shutdown(): void; +} - public getOptimalWidth(): number { - return 0; - } +export interface ICollapsibleViewOptions extends IViewOptions { - public dispose(): void { - this.isDisposed = true; - this.treeContainer = null; - this.tree.dispose(); + sizing: ViewSizing; - this.dragHandler.dispose(); + initialBodySize?: number; - this.toDispose = dispose(this.toDispose); +} - if (this.toolBar) { - this.toolBar.dispose(); - } +export abstract class CollapsibleView extends AbstractCollapsibleView implements IView { - super.dispose(); - } -} + readonly id: string; -export abstract class CollapsibleViewletView extends CollapsibleView implements IViewletView { + protected viewName: string; protected treeContainer: HTMLElement; protected tree: ITree; protected toDispose: IDisposable[]; @@ -195,28 +102,25 @@ export abstract class CollapsibleViewletView extends CollapsibleView implements private dragHandler: DelayedDragHandler; constructor( - actionRunner: IActionRunner, - collapsed: boolean, - private viewName: string, - protected messageService: IMessageService, + options: ICollapsibleViewOptions, protected keybindingService: IKeybindingService, - protected contextMenuService: IContextMenuService, - headerSize?: number, - minimumSize?: number + protected contextMenuService: IContextMenuService ) { super({ - minimumSize: minimumSize === void 0 ? 5 * 22 : minimumSize, - initialState: collapsed ? CollapsibleState.COLLAPSED : CollapsibleState.EXPANDED, - ariaHeaderLabel: viewName, - headerSize + ariaHeaderLabel: options.name, + sizing: options.sizing, + bodySize: options.initialBodySize ? options.initialBodySize : 4 * 22, + initialState: options.collapsed ? CollapsibleState.COLLAPSED : CollapsibleState.EXPANDED, }); - this.actionRunner = actionRunner; + this.id = options.id; + this.viewName = options.name; + this.actionRunner = options.actionRunner; this.toDispose = []; } protected changeState(state: CollapsibleState): void { - updateTreeVisibility(this.tree, state === CollapsibleState.EXPANDED); + this.updateTreeVisibility(this.tree, state === CollapsibleState.EXPANDED); super.changeState(state); } @@ -250,7 +154,10 @@ export abstract class CollapsibleViewletView extends CollapsibleView implements } protected renderViewTree(container: HTMLElement): HTMLElement { - return renderViewTree(container); + const treeContainer = document.createElement('div'); + container.appendChild(treeContainer); + + return treeContainer; } public getViewer(): ITree { @@ -258,19 +165,24 @@ export abstract class CollapsibleViewletView extends CollapsibleView implements } public setVisible(visible: boolean): TPromise { - this.isVisible = visible; - - updateTreeVisibility(this.tree, visible && this.state === CollapsibleState.EXPANDED); + if (this.isVisible !== visible) { + this.isVisible = visible; + this.updateTreeVisibility(this.tree, visible && this.state === CollapsibleState.EXPANDED); + } return TPromise.as(null); } public focusBody(): void { - focus(this.tree); + this.focusTree(); } protected reveal(element: any, relativeTop?: number): TPromise { - return reveal(this.tree, element, relativeTop); + if (!this.tree) { + return TPromise.as(null); // return early if viewlet has not yet been created + } + + return this.tree.reveal(element, relativeTop); } public layoutBody(size: number): void { @@ -315,68 +227,61 @@ export abstract class CollapsibleViewletView extends CollapsibleView implements super.dispose(); } -} -function updateTreeVisibility(tree: ITree, isVisible: boolean): void { - if (!tree) { - return; - } + private updateTreeVisibility(tree: ITree, isVisible: boolean): void { + if (!tree) { + return; + } - if (isVisible) { - $(tree.getHTMLElement()).show(); - } else { - $(tree.getHTMLElement()).hide(); // make sure the tree goes out of the tabindex world by hiding it - } + if (isVisible) { + $(tree.getHTMLElement()).show(); + } else { + $(tree.getHTMLElement()).hide(); // make sure the tree goes out of the tabindex world by hiding it + } - if (isVisible) { - tree.onVisible(); - } else { - tree.onHidden(); + if (isVisible) { + tree.onVisible(); + } else { + tree.onHidden(); + } } -} -function focus(tree: ITree): void { - if (!tree) { - return; // return early if viewlet has not yet been created - } + private focusTree(): void { + if (!this.tree) { + return; // return early if viewlet has not yet been created + } - // Make sure the current selected element is revealed - const selection = tree.getSelection(); - if (selection.length > 0) { - reveal(tree, selection[0], 0.5).done(null, errors.onUnexpectedError); - } + // Make sure the current selected element is revealed + const selection = this.tree.getSelection(); + if (selection.length > 0) { + this.reveal(selection[0], 0.5).done(null, errors.onUnexpectedError); + } - // Pass Focus to Viewer - tree.DOMFocus(); + // Pass Focus to Viewer + this.tree.DOMFocus(); + } } -function renderViewTree(container: HTMLElement): HTMLElement { - const treeContainer = document.createElement('div'); - container.appendChild(treeContainer); - - return treeContainer; -} +export interface IViewletViewOptions extends IViewOptions { -function reveal(tree: ITree, element: any, relativeTop?: number): TPromise { - if (!tree) { - return TPromise.as(null); // return early if viewlet has not yet been created - } + viewletSettings: any; - return tree.reveal(element, relativeTop); } export interface IViewState { + collapsed: boolean; + size: number; } export class ComposedViewsViewlet extends Viewlet { protected viewletContainer: HTMLElement; - protected lastFocusedView: IViewletView; + protected lastFocusedView: IView; private splitView: SplitView; - private views: IViewletView[]; + protected views: IView[]; private dimension: Dimension; private viewletSettings: any; @@ -390,7 +295,8 @@ export class ComposedViewsViewlet extends Viewlet { @IStorageService protected storageService: IStorageService, @IInstantiationService protected instantiationService: IInstantiationService, @IThemeService themeService: IThemeService, - @IWorkspaceContextService protected contextService: IWorkspaceContextService + @IWorkspaceContextService protected contextService: IWorkspaceContextService, + @IContextKeyService protected contextKeyService: IContextKeyService ) { super(id, telemetryService, themeService); @@ -398,8 +304,9 @@ export class ComposedViewsViewlet extends Viewlet { this.viewletSettings = this.getMemento(storageService, Scope.WORKSPACE); this.viewsStates = this.loadViewsStates(); - this._register(ViewsRegistry.onViewsRegistered(viewDescriptors => this.createViews(viewDescriptors.filter(viewDescriptor => ViewLocation.Explorer === viewDescriptor.location)))); - this._register(ViewsRegistry.onViewsDeregistered(viewDescriptors => this.removeViews(viewDescriptors.filter(viewDescriptor => ViewLocation.Explorer === viewDescriptor.location)))); + this._register(ViewsRegistry.onViewsRegistered(viewDescriptors => this.addViews(viewDescriptors.filter(viewDescriptor => this.location === viewDescriptor.location)))); + this._register(ViewsRegistry.onViewsDeregistered(viewDescriptors => this.updateViews([], viewDescriptors.filter(viewDescriptor => this.location === viewDescriptor.location)))); + this._register(contextKeyService.onDidChangeContext(keys => this.onContextChanged(keys))); } public create(parent: Builder): TPromise { @@ -407,13 +314,13 @@ export class ComposedViewsViewlet extends Viewlet { this.viewletContainer = DOM.append(parent.getHTMLElement(), DOM.$('')); this.splitView = this._register(new SplitView(this.viewletContainer)); - this._register(this.splitView.onFocus((view: IViewletView) => this.lastFocusedView = view)); + this._register(this.splitView.onFocus((view: IView) => this.lastFocusedView = view)); - const views = ViewsRegistry.getViews(ViewLocation.Explorer); - return this.createViews(views) - .then(() => this.lastFocusedView = this.views[0]) - .then(() => this.setVisible(this.isVisible())) - .then(() => this.focus()); + return this.addViews(ViewsRegistry.getViews(this.location)) + .then(() => { + this.lastFocusedView = this.views[0]; + this.focus(); + }); } public getActions(): IAction[] { @@ -430,62 +337,70 @@ export class ComposedViewsViewlet extends Viewlet { return []; } - private createViews(viewDescriptors: IViewDescriptor[]): TPromise { - if (!this.splitView || !viewDescriptors.length) { + private addViews(viewDescriptors: IViewDescriptor[]): TPromise { + viewDescriptors = viewDescriptors.filter(viewDescriptor => this.contextKeyService.contextMatchesRules(viewDescriptor.when)); + return this.updateViews(viewDescriptors, []); + } + + private updateViews(toAdd: IViewDescriptor[], toRemove: IViewDescriptor[]): TPromise { + if (!this.splitView || (!toAdd.length && !toRemove.length)) { return TPromise.as(null); } - const views = []; - const sorted = ViewsRegistry.getViews(this.location).sort((a, b) => { - if (b.order === void 0 || b.order === null) { - return -1; + for (const view of this.views) { + let viewState = this.viewsStates.get(view.id); + if (!viewState || view.size !== viewState.size || !view.isExpanded() !== viewState.collapsed) { + viewState = this.getViewState(view); + this.viewsStates.set(view.id, viewState); + this.splitView.updateWeight(view, viewState.size); } - if (a.order === void 0 || a.order === null) { - return 1; + } + + if (toRemove.length) { + for (const viewDescriptor of toRemove) { + let view = this.getView(viewDescriptor.id); + if (view) { + this.views.splice(this.views.indexOf(view), 1); + this.splitView.removeView(view); + } } - return a.order - b.order; - }); - for (const viewDescriptor of viewDescriptors) { + } + + const toCreate = []; + const viewsInOrder = ViewsRegistry.getViews(this.location) + .filter(viewDescriptor => this.contextKeyService.contextMatchesRules(viewDescriptor.when)) + .sort((a, b) => { + if (b.order === void 0 || b.order === null) { + return -1; + } + if (a.order === void 0 || a.order === null) { + return 1; + } + return a.order - b.order; + }); + + for (const viewDescriptor of toAdd) { let viewState = this.viewsStates.get(viewDescriptor.id); - let index = sorted.indexOf(viewDescriptor); + let index = viewsInOrder.indexOf(viewDescriptor); const view = this.createView(viewDescriptor, { + id: viewDescriptor.id, name: viewDescriptor.name, actionRunner: this.getActionRunner(), - collapsed: viewState ? viewState.collapsed : true, + collapsed: viewState ? viewState.collapsed : void 0, viewletSettings: this.viewletSettings }); - if (index !== -1) { - this.views.splice(index, 0, view); - } else { - this.views.push(view); - } - views.push(view); + toCreate.push(view); + + this.views.splice(index, 0, view); attachHeaderViewStyler(view, this.themeService); - this.splitView.addView(view, viewState ? viewState.size : void 0, index); + this.splitView.addView(view, viewState && viewState.size ? Math.max(viewState.size, 1) : viewDescriptor.size, index); } - return TPromise.join(views.map(view => view.create())) + return TPromise.join(toCreate.map(view => view.create())) .then(() => this.onViewsUpdated()); } - - private removeViews(viewDescriptors: IViewDescriptor[]): void { - if (!this.splitView || !viewDescriptors.length) { - return; - } - - for (const viewDescriptor of viewDescriptors) { - let view = this.getView(viewDescriptor.id); - if (view) { - this.views.splice(this.views.indexOf(view), 1); - this.splitView.removeView(view); - } - } - - this.onViewsUpdated(); - } - - private onViewsUpdated(): void { + private onViewsUpdated(): TPromise { if (this.views.length === 1) { this.views[0].hideHeader(); if (!this.views[0].isExpanded()) { @@ -503,6 +418,28 @@ export class ComposedViewsViewlet extends Viewlet { // Update title area since the title actions have changed. this.updateTitleArea(); + + return this.setVisible(this.isVisible()); + } + + private onContextChanged(keys: string[]): void { + let viewsToCreate: IViewDescriptor[] = []; + let viewsToRemove: IViewDescriptor[] = []; + + for (const viewDescriptor of ViewsRegistry.getViews(this.location)) { + const view = this.getView(viewDescriptor.id); + if (this.contextKeyService.contextMatchesRules(viewDescriptor.when)) { + if (!view) { + viewsToCreate.push(viewDescriptor); + } + } else { + if (view) { + viewsToRemove.push(viewDescriptor); + } + } + } + + this.updateViews(viewsToCreate, viewsToRemove); } public setVisible(visible: boolean): TPromise { @@ -521,6 +458,10 @@ export class ComposedViewsViewlet extends Viewlet { public layout(dimension: Dimension): void { this.dimension = dimension; this.splitView.layout(dimension.height); + for (const view of this.views) { + let viewState = this.getViewState(view); + this.viewsStates.set(view.id, viewState); + } } public getOptimalWidth(): number { @@ -537,10 +478,7 @@ export class ComposedViewsViewlet extends Viewlet { protected saveViewsStates(): void { const viewletState = this.views.reduce((result, view) => { - result[view.id] = { - collapsed: !view.isExpanded(), - size: view.size > 0 ? view.size : void 0 - }; + result[view.id] = this.getViewState(view); return result; }, {}); this.storageService.store(this.viewletStateStorageId, JSON.stringify(viewletState), this.contextService.hasWorkspace() ? StorageScope.WORKSPACE : StorageScope.GLOBAL); @@ -554,11 +492,20 @@ export class ComposedViewsViewlet extends Viewlet { }, new Map()); } - protected createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): IViewletView { - return this.instantiationService.createInstance(viewDescriptor.ctor, viewDescriptor.id, options); + protected createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): IView { + return this.instantiationService.createInstance(viewDescriptor.ctor, options); } - protected getView(id: string): IViewletView { + protected getView(id: string): IView { return this.views.filter(view => view.id === id)[0]; } + + private getViewState(view: IView): IViewState { + const collapsed = !view.isExpanded(); + const size = collapsed && view instanceof CollapsibleView ? view.previousSize : view.size; + return { + collapsed, + size: size && size > 0 ? size : void 0 + }; + } } \ No newline at end of file diff --git a/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts b/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts index a5f21d877cefd..30715762ea638 100644 --- a/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts +++ b/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts @@ -10,6 +10,7 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema'; import { ExtensionMessageCollector, ExtensionsRegistry } from 'vs/platform/extensions/common/extensionsRegistry'; import { ViewLocation, ViewsRegistry } from 'vs/workbench/parts/views/browser/viewsRegistry'; import { TreeView } from 'vs/workbench/parts/views/browser/treeView'; +import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; namespace schema { @@ -18,6 +19,7 @@ namespace schema { export interface IUserFriendlyViewDescriptor { id: string; name: string; + when?: string; } export function parseLocation(value: string): ViewLocation { @@ -42,6 +44,10 @@ namespace schema { collector.error(localize('requirestring', "property `{0}` is mandatory and must be of type `string`", 'label')); return false; } + if (descriptor.when && typeof descriptor.when !== 'string') { + collector.error(localize('optstring', "property `{0}` can be omitted or must be of type `string`", 'when')); + return false; + } } return true; @@ -57,7 +63,11 @@ namespace schema { name: { description: localize('vscode.extension.contributes.view.name', 'The human-readable name of the view. Will be shown'), type: 'string' - } + }, + when: { + description: localize('vscode.extension.contributes.view.when', 'Condition which must be true to show this view'), + type: 'string' + }, } }; @@ -93,7 +103,8 @@ ExtensionsRegistry.registerExtensionPoint<{ [loc: string]: schema.IUserFriendlyV id: item.id, name: item.name, ctor: TreeView, - location + location, + when: ContextKeyExpr.deserialize(item.when) })); ViewsRegistry.registerViews(viewDescriptors); }); diff --git a/src/vs/workbench/parts/views/browser/viewsRegistry.ts b/src/vs/workbench/parts/views/browser/viewsRegistry.ts index ac12eb4be5bc8..f129e6038899e 100644 --- a/src/vs/workbench/parts/views/browser/viewsRegistry.ts +++ b/src/vs/workbench/parts/views/browser/viewsRegistry.ts @@ -4,13 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import Event, { Emitter } from 'vs/base/common/event'; -import { IActionRunner } from 'vs/base/common/actions'; -import { IViewletView as IView } from 'vs/workbench/parts/views/browser/views'; +import { IViewConstructorSignature } from 'vs/workbench/parts/views/browser/views'; import { ITreeViewDataProvider } from 'vs/workbench/parts/views/common/views'; +import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; export class ViewLocation { static readonly Explorer = new ViewLocation('explorer'); + static readonly Debug = new ViewLocation('debug'); constructor(private _id: string) { } @@ -20,18 +21,6 @@ export class ViewLocation { } } -export interface IViewOptions { - name: string; - actionRunner: IActionRunner; - collapsed: boolean; -} - -export interface IViewConstructorSignature { - - new (id: string, options: IViewOptions, ...services: { _serviceBrand: any; }[]): IView; - -} - export interface IViewDescriptor { readonly id: string; @@ -42,8 +31,11 @@ export interface IViewDescriptor { readonly ctor: IViewConstructorSignature; + readonly when?: ContextKeyExpr; + readonly order?: number; + readonly size?: number; } export interface IViewsRegistry { From 2792c5cd97c44b9e299008a62a071ed54bc9cc06 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 9 Jun 2017 11:10:18 +0200 Subject: [PATCH 1674/2747] multiroot - send telemetry event when workspace#rootPath is accessed --- src/vs/workbench/api/node/extHost.api.impl.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index f6f4099db43c1..9ae487ec77b8d 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -377,6 +377,10 @@ export function createApiFactory( // namespace: workspace const workspace: typeof vscode.workspace = { get rootPath() { + telemetryService.publicLog('api-getter', { + name: 'workspace#rootPath', + extension: extension.id + }); return extHostWorkspace.getPath(); }, set rootPath(value) { From 6122faea48beed0319efa1e3dd295404fe7bf3d0 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 9 Jun 2017 11:15:21 +0200 Subject: [PATCH 1675/2747] debt - remove "over-api", align styles --- src/vs/workbench/api/node/extHost.api.impl.ts | 26 ++++--------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 9ae487ec77b8d..cef1654dca7b9 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { Emitter, mapEvent } from 'vs/base/common/event'; +import { Emitter } from 'vs/base/common/event'; import { TrieMap } from 'vs/base/common/map'; import { score } from 'vs/editor/common/modes/languageSelector'; import * as Platform from 'vs/base/common/platform'; @@ -457,24 +457,11 @@ export function createApiFactory( }) }; - class SCM { - - get activeSourceControl() { - return extHostSCM.activeProvider; - } - - get onDidChangeActiveSourceControl() { - return extHostSCM.onDidChangeActiveProvider; - } - + // namespace: scm + const scm: typeof vscode.scm = { get inputBox() { return extHostSCM.inputBox; - } - - get onDidAcceptInputValue() { - return mapEvent(extHostSCM.inputBox.onDidAccept, () => extHostSCM.inputBox); - } - + }, createSourceControl(id: string, label: string) { telemetryService.publicLog('registerSCMProvider', { extensionId: extension.id, @@ -484,10 +471,7 @@ export function createApiFactory( return extHostSCM.createSourceControl(id, label); } - } - - // namespace: scm - const scm: typeof vscode.scm = new SCM(); + }; return { version: pkg.version, From 7a9a71c716ef7942a936aaaccdf0b87cf66ec347 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 9 Jun 2017 12:10:45 +0200 Subject: [PATCH 1676/2747] :lipstick: windows main --- src/vs/code/electron-main/windows.ts | 365 ++++++++++++++++----------- 1 file changed, 214 insertions(+), 151 deletions(-) diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 93a7c4c7120c8..754a63af36dfe 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -7,7 +7,6 @@ import * as path from 'path'; import * as fs from 'original-fs'; -import * as platform from 'vs/base/common/platform'; import * as nls from 'vs/nls'; import * as arrays from 'vs/base/common/arrays'; import { assign, mixin } from 'vs/base/common/objects'; @@ -28,6 +27,7 @@ import { ITelemetryService, ITelemetryData } from 'vs/platform/telemetry/common/ import { isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; import { IWindowsMainService, IOpenConfiguration } from "vs/platform/windows/electron-main/windows"; import { IHistoryMainService } from "vs/platform/history/electron-main/historyMainService"; +import { IProcessEnvironment, isLinux, isMacintosh } from "vs/base/common/platform"; enum WindowError { UNRESPONSIVE, @@ -55,6 +55,23 @@ const ReopenFoldersSetting = { NONE: 'none' }; +interface IOpenBrowserWindowOptions { + userEnv?: IProcessEnvironment; + cli?: ParsedArgs; + workspacePath?: string; + + initialStartup?: boolean; + + filesToOpen?: IPath[]; + filesToCreate?: IPath[]; + filesToDiff?: IPath[]; + + forceNewWindow?: boolean; + windowToUse?: CodeWindow; + + emptyWorkspaceBackupFolder?: string; +} + export class WindowsManager implements IWindowsMainService { _serviceBrand: any; @@ -63,7 +80,7 @@ export class WindowsManager implements IWindowsMainService { private static WINDOWS: CodeWindow[] = []; - private initialUserEnv: platform.IProcessEnvironment; + private initialUserEnv: IProcessEnvironment; private windowsState: IWindowsState; private lastClosedWindowState: IWindowState; @@ -96,7 +113,7 @@ export class WindowsManager implements IWindowsMainService { this.fileDialog = new FileDialog(environmentService, telemetryService, storageService, this); } - public ready(initialUserEnv: platform.IProcessEnvironment): void { + public ready(initialUserEnv: IProcessEnvironment): void { this.initialUserEnv = initialUserEnv; this.registerListeners(); @@ -187,7 +204,7 @@ export class WindowsManager implements IWindowsMainService { // Any non extension host window with same workspace else if (!win.isExtensionDevelopmentHost && !!win.openedWorkspacePath) { this.windowsState.openedFolders.forEach(o => { - if (isEqual(o.workspacePath, win.openedWorkspacePath, !platform.isLinux /* ignorecase */)) { + if (isEqual(o.workspacePath, win.openedWorkspacePath, !isLinux /* ignorecase */)) { o.uiState = state.uiState; } }); @@ -203,67 +220,23 @@ export class WindowsManager implements IWindowsMainService { } public open(openConfig: IOpenConfiguration): CodeWindow[] { - const windowConfig = this.configurationService.getConfiguration('window'); - - let iPathsToOpen: IPath[]; - const usedWindows: CodeWindow[] = []; - // Find paths from provided paths if any - if (openConfig.pathsToOpen && openConfig.pathsToOpen.length > 0) { - iPathsToOpen = openConfig.pathsToOpen.map(pathToOpen => { - const iPath = this.toIPath(pathToOpen, false, openConfig.cli && openConfig.cli.goto); - - // Warn if the requested path to open does not exist - if (!iPath) { - const options: Electron.ShowMessageBoxOptions = { - title: product.nameLong, - type: 'info', - buttons: [nls.localize('ok', "OK")], - message: nls.localize('pathNotExistTitle', "Path does not exist"), - detail: nls.localize('pathNotExistDetail', "The path '{0}' does not seem to exist anymore on disk.", pathToOpen), - noLink: true - }; - - const activeWindow = BrowserWindow.getFocusedWindow(); - if (activeWindow) { - dialog.showMessageBox(activeWindow, options); - } else { - dialog.showMessageBox(options); - } - } - - return iPath; - }); - - // get rid of nulls - iPathsToOpen = arrays.coalesce(iPathsToOpen); - - if (iPathsToOpen.length === 0) { - return null; // indicate to outside that open failed - } + // Find paths to open from config + const pathsToOpen = this.getPathsToOpen(openConfig); + if (!pathsToOpen) { + return null; // indicate to outside that open failed } - // Check for force empty - else if (openConfig.forceEmpty) { - iPathsToOpen = [Object.create(null)]; - } - - // Otherwise infer from command line arguments - else { - const ignoreFileNotFound = openConfig.cli._.length > 0; // we assume the user wants to create this file from command line - iPathsToOpen = this.cliToPaths(openConfig.cli, ignoreFileNotFound); - } - - let foldersToOpen = arrays.distinct(iPathsToOpen.filter(iPath => iPath.workspacePath && !iPath.filePath).map(iPath => iPath.workspacePath), folder => platform.isLinux ? folder : folder.toLowerCase()); // prevent duplicates + let foldersToOpen = arrays.distinct(pathsToOpen.filter(iPath => iPath.workspacePath && !iPath.filePath).map(iPath => iPath.workspacePath), folder => isLinux ? folder : folder.toLowerCase()); // prevent duplicates let foldersToRestore = (openConfig.initialStartup && !openConfig.cli.extensionDevelopmentPath) ? this.backupService.getWorkspaceBackupPaths() : []; let filesToOpen: IPath[] = []; let filesToDiff: IPath[] = []; - let emptyToOpen = iPathsToOpen.filter(iPath => !iPath.workspacePath && !iPath.filePath); + let emptyToOpen = pathsToOpen.filter(iPath => !iPath.workspacePath && !iPath.filePath); let emptyToRestore = (openConfig.initialStartup && !openConfig.cli.extensionDevelopmentPath) ? this.backupService.getEmptyWorkspaceBackupPaths() : []; - let filesToCreate = iPathsToOpen.filter(iPath => !!iPath.filePath && iPath.createFilePath); + let filesToCreate = pathsToOpen.filter(iPath => !!iPath.filePath && iPath.createFilePath); // Diff mode needs special care - const candidates = iPathsToOpen.filter(iPath => !!iPath.filePath && !iPath.createFilePath); + const candidates = pathsToOpen.filter(iPath => !!iPath.filePath && !iPath.createFilePath); if (openConfig.diffMode) { if (candidates.length === 2) { filesToDiff = candidates; @@ -279,12 +252,14 @@ export class WindowsManager implements IWindowsMainService { } // let the user settings override how folders are open in a new window or same window unless we are forced + const windowConfig = this.configurationService.getConfiguration('window'); let openFolderInNewWindow = (openConfig.preferNewWindow || openConfig.forceNewWindow) && !openConfig.forceReuseWindow; if (!openConfig.forceNewWindow && !openConfig.forceReuseWindow && windowConfig && (windowConfig.openFoldersInNewWindow === 'on' || windowConfig.openFoldersInNewWindow === 'off')) { openFolderInNewWindow = (windowConfig.openFoldersInNewWindow === 'on'); } // Handle files to open/diff or to create when we dont open a folder and we do not restore any folder/untitled from hot-exit + const usedWindows: CodeWindow[] = []; if (!foldersToOpen.length && !foldersToRestore.length && !emptyToRestore.length && (filesToOpen.length > 0 || filesToCreate.length > 0 || filesToDiff.length > 0)) { // let the user settings override how files are open in a new window or same window unless we are forced (not for extension development though) @@ -323,8 +298,16 @@ export class WindowsManager implements IWindowsMainService { // Otherwise open instance with files else { - const configuration = this.toConfiguration(openConfig, windowOrFolder, filesToOpen, filesToCreate, filesToDiff); - const browserWindow = this.openInBrowserWindow(configuration, true /* new window */); + const browserWindow = this.openInBrowserWindow({ + userEnv: openConfig.userEnv, + cli: openConfig.cli, + initialStartup: openConfig.initialStartup, + workspacePath: windowOrFolder, + filesToOpen, + filesToCreate, + filesToDiff, + forceNewWindow: true + }); usedWindows.push(browserWindow); openFolderInNewWindow = true; // any other folders to open must open in new window then @@ -337,7 +320,7 @@ export class WindowsManager implements IWindowsMainService { } // Handle folders to open (instructed and to restore) - let allFoldersToOpen = arrays.distinct([...foldersToOpen, ...foldersToRestore], folder => platform.isLinux ? folder : folder.toLowerCase()); // prevent duplicates + let allFoldersToOpen = arrays.distinct([...foldersToOpen, ...foldersToRestore], folder => isLinux ? folder : folder.toLowerCase()); // prevent duplicates if (allFoldersToOpen.length > 0) { // Check for existing instances @@ -362,12 +345,21 @@ export class WindowsManager implements IWindowsMainService { // Open remaining ones allFoldersToOpen.forEach(folderToOpen => { - if (windowsOnWorkspacePath.some(win => isEqual(win.openedWorkspacePath, folderToOpen, !platform.isLinux /* ignorecase */))) { + if (windowsOnWorkspacePath.some(win => isEqual(win.openedWorkspacePath, folderToOpen, !isLinux /* ignorecase */))) { return; // ignore folders that are already open } - const configuration = this.toConfiguration(openConfig, folderToOpen, filesToOpen, filesToCreate, filesToDiff); - const browserWindow = this.openInBrowserWindow(configuration, openFolderInNewWindow, openFolderInNewWindow ? void 0 : openConfig.windowToUse as CodeWindow); + const browserWindow = this.openInBrowserWindow({ + userEnv: openConfig.userEnv, + cli: openConfig.cli, + initialStartup: openConfig.initialStartup, + workspacePath: folderToOpen, + filesToOpen, + filesToCreate, + filesToDiff, + forceNewWindow: openFolderInNewWindow, + windowToUse: openFolderInNewWindow ? void 0 : openConfig.windowToUse as CodeWindow + }); usedWindows.push(browserWindow); // Reset these because we handled them @@ -382,8 +374,16 @@ export class WindowsManager implements IWindowsMainService { // Handle empty if (emptyToRestore.length > 0) { emptyToRestore.forEach(emptyWorkspaceBackupFolder => { - const configuration = this.toConfiguration(openConfig, void 0, filesToOpen, filesToCreate, filesToDiff); - const browserWindow = this.openInBrowserWindow(configuration, true /* new window */, null, emptyWorkspaceBackupFolder); + const browserWindow = this.openInBrowserWindow({ + userEnv: openConfig.userEnv, + cli: openConfig.cli, + initialStartup: openConfig.initialStartup, + filesToOpen, + filesToCreate, + filesToDiff, + forceNewWindow: true, + emptyWorkspaceBackupFolder + }); usedWindows.push(browserWindow); // Reset these because we handled them @@ -398,8 +398,13 @@ export class WindowsManager implements IWindowsMainService { // Only open empty if no empty workspaces were restored else if (emptyToOpen.length > 0) { emptyToOpen.forEach(() => { - const configuration = this.toConfiguration(openConfig); - const browserWindow = this.openInBrowserWindow(configuration, openFolderInNewWindow, openFolderInNewWindow ? void 0 : openConfig.windowToUse as CodeWindow); + const browserWindow = this.openInBrowserWindow({ + userEnv: openConfig.userEnv, + cli: openConfig.cli, + initialStartup: openConfig.initialStartup, + forceNewWindow: openFolderInNewWindow, + windowToUse: openFolderInNewWindow ? void 0 : openConfig.windowToUse as CodeWindow + }); usedWindows.push(browserWindow); openFolderInNewWindow = true; // any other folders to open must open in new window then @@ -411,7 +416,7 @@ export class WindowsManager implements IWindowsMainService { if (!usedWindows.some(w => w.isExtensionDevelopmentHost) && !openConfig.cli.diff) { const recentPaths: { path: string; isFile?: boolean; }[] = []; - iPathsToOpen.forEach(iPath => { + pathsToOpen.forEach(iPath => { if (iPath.filePath || iPath.workspacePath) { app.addRecentDocument(iPath.filePath || iPath.workspacePath); recentPaths.push({ path: iPath.filePath || iPath.workspacePath, isFile: !!iPath.filePath }); @@ -424,57 +429,117 @@ export class WindowsManager implements IWindowsMainService { } // Emit events - this._onPathsOpen.fire(iPathsToOpen); + this._onPathsOpen.fire(pathsToOpen); return arrays.distinct(usedWindows); } - public openExtensionDevelopmentHostWindow(openConfig: IOpenConfiguration): void { + private getPathsToOpen(openConfig: IOpenConfiguration): IPath[] { + let iPathsToOpen: IPath[]; - // Reload an existing extension development host window on the same path - // We currently do not allow more than one extension development window - // on the same extension path. - let res = WindowsManager.WINDOWS.filter(w => w.config && isEqual(w.config.extensionDevelopmentPath, openConfig.cli.extensionDevelopmentPath, !platform.isLinux /* ignorecase */)); - if (res && res.length === 1) { - this.reload(res[0], openConfig.cli); - res[0].focus(); // make sure it gets focus and is restored + // Find paths from provided paths if any + if (openConfig.pathsToOpen && openConfig.pathsToOpen.length > 0) { + iPathsToOpen = openConfig.pathsToOpen.map(pathToOpen => { + const iPath = this.toIPath(pathToOpen, false, openConfig.cli && openConfig.cli.goto); - return; - } + // Warn if the requested path to open does not exist + if (!iPath) { + const options: Electron.ShowMessageBoxOptions = { + title: product.nameLong, + type: 'info', + buttons: [nls.localize('ok', "OK")], + message: nls.localize('pathNotExistTitle', "Path does not exist"), + detail: nls.localize('pathNotExistDetail', "The path '{0}' does not seem to exist anymore on disk.", pathToOpen), + noLink: true + }; - // Fill in previously opened workspace unless an explicit path is provided and we are not unit testing - if (openConfig.cli._.length === 0 && !openConfig.cli.extensionTestsPath) { - const workspaceToOpen = this.windowsState.lastPluginDevelopmentHostWindow && this.windowsState.lastPluginDevelopmentHostWindow.workspacePath; - if (workspaceToOpen) { - openConfig.cli._ = [workspaceToOpen]; + const activeWindow = BrowserWindow.getFocusedWindow(); + if (activeWindow) { + dialog.showMessageBox(activeWindow, options); + } else { + dialog.showMessageBox(options); + } + } + + return iPath; + }); + + // get rid of nulls + iPathsToOpen = arrays.coalesce(iPathsToOpen); + + if (iPathsToOpen.length === 0) { + return null; // indicate to outside that open failed } } - // Make sure we are not asked to open a path that is already opened - if (openConfig.cli._.length > 0) { - res = WindowsManager.WINDOWS.filter(w => w.openedWorkspacePath && openConfig.cli._.indexOf(w.openedWorkspacePath) >= 0); - if (res.length) { - openConfig.cli._ = []; - } + // Check for force empty + else if (openConfig.forceEmpty) { + iPathsToOpen = [Object.create(null)]; } - // Open it - this.open({ context: openConfig.context, cli: openConfig.cli, forceNewWindow: true, forceEmpty: openConfig.cli._.length === 0, userEnv: openConfig.userEnv }); + // Otherwise infer from command line arguments + else if (openConfig.cli._.length > 0) { + iPathsToOpen = this.doExtractPathsFromCLI(openConfig.cli); + } + + // Finally check for paths from previous session + else { + iPathsToOpen = this.doExtractPathsFromLastSession(); + } + + return iPathsToOpen; } - private toConfiguration(config: IOpenConfiguration, workspacePath?: string, filesToOpen?: IPath[], filesToCreate?: IPath[], filesToDiff?: IPath[]): IWindowConfiguration { - const configuration: IWindowConfiguration = mixin({}, config.cli); // inherit all properties from CLI - configuration.appRoot = this.environmentService.appRoot; - configuration.execPath = process.execPath; - configuration.userEnv = assign({}, this.initialUserEnv, config.userEnv || {}); - configuration.isInitialStartup = config.initialStartup; - configuration.workspacePath = workspacePath; - configuration.filesToOpen = filesToOpen; - configuration.filesToCreate = filesToCreate; - configuration.filesToDiff = filesToDiff; - configuration.nodeCachedDataDir = this.environmentService.nodeCachedDataDir; + private doExtractPathsFromCLI(cli: ParsedArgs): IPath[] { + const candidates: string[] = cli._; + + const iPaths = candidates.map(candidate => this.toIPath(candidate, true /* ignoreFileNotFound */, cli.goto)).filter(path => !!path); + if (iPaths.length > 0) { + return iPaths; + } + + // No path provided, return empty to open empty + return [Object.create(null)]; + } + + private doExtractPathsFromLastSession(): IPath[] { + const candidates: string[] = []; + + let reopenFolders: string; + if (this.lifecycleService.wasRestarted) { + reopenFolders = ReopenFoldersSetting.ALL; // always reopen all folders when an update was applied + } else { + const windowConfig = this.configurationService.getConfiguration('window'); + reopenFolders = (windowConfig && windowConfig.reopenFolders) || ReopenFoldersSetting.ONE; + } + + const lastActiveFolder = this.windowsState.lastActiveWindow && this.windowsState.lastActiveWindow.workspacePath; + + // Restore all + if (reopenFolders === ReopenFoldersSetting.ALL) { + const lastOpenedFolders = this.windowsState.openedFolders.map(o => o.workspacePath); + + // If we have a last active folder, move it to the end + if (lastActiveFolder) { + lastOpenedFolders.splice(lastOpenedFolders.indexOf(lastActiveFolder), 1); + lastOpenedFolders.push(lastActiveFolder); + } + + candidates.push(...lastOpenedFolders); + } + + // Restore last active + else if (lastActiveFolder && (reopenFolders === ReopenFoldersSetting.ONE || reopenFolders !== ReopenFoldersSetting.NONE)) { + candidates.push(lastActiveFolder); + } + + const iPaths = candidates.map(candidate => this.toIPath(candidate)).filter(path => !!path); + if (iPaths.length > 0) { + return iPaths; + } - return configuration; + // No path provided, return empty to open empty + return [Object.create(null)]; } private toIPath(anyPath: string, ignoreFileNotFound?: boolean, gotoLineMode?: boolean): IPath { @@ -511,59 +576,57 @@ export class WindowsManager implements IWindowsMainService { return null; } - private cliToPaths(cli: ParsedArgs, ignoreFileNotFound?: boolean): IPath[] { - - // Check for pass in candidate or last opened path - let candidates: string[] = []; - if (cli._.length > 0) { - candidates = cli._; - } - - // No path argument, check settings for what to do now - else { - let reopenFolders: string; - if (this.lifecycleService.wasRestarted) { - reopenFolders = ReopenFoldersSetting.ALL; // always reopen all folders when an update was applied - } else { - const windowConfig = this.configurationService.getConfiguration('window'); - reopenFolders = (windowConfig && windowConfig.reopenFolders) || ReopenFoldersSetting.ONE; - } - - const lastActiveFolder = this.windowsState.lastActiveWindow && this.windowsState.lastActiveWindow.workspacePath; - - // Restore all - if (reopenFolders === ReopenFoldersSetting.ALL) { - const lastOpenedFolders = this.windowsState.openedFolders.map(o => o.workspacePath); + public openExtensionDevelopmentHostWindow(openConfig: IOpenConfiguration): void { - // If we have a last active folder, move it to the end - if (lastActiveFolder) { - lastOpenedFolders.splice(lastOpenedFolders.indexOf(lastActiveFolder), 1); - lastOpenedFolders.push(lastActiveFolder); - } + // Reload an existing extension development host window on the same path + // We currently do not allow more than one extension development window + // on the same extension path. + let res = WindowsManager.WINDOWS.filter(w => w.config && isEqual(w.config.extensionDevelopmentPath, openConfig.cli.extensionDevelopmentPath, !isLinux /* ignorecase */)); + if (res && res.length === 1) { + this.reload(res[0], openConfig.cli); + res[0].focus(); // make sure it gets focus and is restored - candidates.push(...lastOpenedFolders); - } + return; + } - // Restore last active - else if (lastActiveFolder && (reopenFolders === ReopenFoldersSetting.ONE || reopenFolders !== ReopenFoldersSetting.NONE)) { - candidates.push(lastActiveFolder); + // Fill in previously opened workspace unless an explicit path is provided and we are not unit testing + if (openConfig.cli._.length === 0 && !openConfig.cli.extensionTestsPath) { + const workspaceToOpen = this.windowsState.lastPluginDevelopmentHostWindow && this.windowsState.lastPluginDevelopmentHostWindow.workspacePath; + if (workspaceToOpen) { + openConfig.cli._ = [workspaceToOpen]; } } - const iPaths = candidates.map(candidate => this.toIPath(candidate, ignoreFileNotFound, cli.goto)).filter(path => !!path); - if (iPaths.length > 0) { - return iPaths; + // Make sure we are not asked to open a path that is already opened + if (openConfig.cli._.length > 0) { + res = WindowsManager.WINDOWS.filter(w => w.openedWorkspacePath && openConfig.cli._.indexOf(w.openedWorkspacePath) >= 0); + if (res.length) { + openConfig.cli._ = []; + } } - // No path provided, return empty to open empty - return [Object.create(null)]; + // Open it + this.open({ context: openConfig.context, cli: openConfig.cli, forceNewWindow: true, forceEmpty: openConfig.cli._.length === 0, userEnv: openConfig.userEnv }); } - private openInBrowserWindow(configuration: IWindowConfiguration, forceNewWindow?: boolean, windowToUse?: CodeWindow, emptyWorkspaceBackupFolder?: string): CodeWindow { + private openInBrowserWindow(options: IOpenBrowserWindowOptions): CodeWindow { + + // Build IWindowConfiguration from config and options + const configuration: IWindowConfiguration = mixin({}, options.cli); // inherit all properties from CLI + configuration.appRoot = this.environmentService.appRoot; + configuration.execPath = process.execPath; + configuration.userEnv = assign({}, this.initialUserEnv, options.userEnv || {}); + configuration.isInitialStartup = options.initialStartup; + configuration.workspacePath = options.workspacePath; + configuration.filesToOpen = options.filesToOpen; + configuration.filesToCreate = options.filesToCreate; + configuration.filesToDiff = options.filesToDiff; + configuration.nodeCachedDataDir = this.environmentService.nodeCachedDataDir; + let codeWindow: CodeWindow; - if (!forceNewWindow) { - codeWindow = windowToUse || this.getLastActiveWindow(); + if (!options.forceNewWindow) { + codeWindow = options.windowToUse || this.getLastActiveWindow(); if (codeWindow) { codeWindow.focus(); @@ -635,7 +698,7 @@ export class WindowsManager implements IWindowsMainService { // Register window for backups if (!configuration.extensionDevelopmentPath) { - this.backupService.registerWindowForBackupsSync(codeWindow.id, !configuration.workspacePath, emptyWorkspaceBackupFolder, configuration.workspacePath); + this.backupService.registerWindowForBackupsSync(codeWindow.id, !configuration.workspacePath, options.emptyWorkspaceBackupFolder, configuration.workspacePath); } // Load it @@ -655,7 +718,7 @@ export class WindowsManager implements IWindowsMainService { // Known Folder - load from stored settings if any if (configuration.workspacePath) { - const stateForWorkspace = this.windowsState.openedFolders.filter(o => isEqual(o.workspacePath, configuration.workspacePath, !platform.isLinux /* ignorecase */)).map(o => o.uiState); + const stateForWorkspace = this.windowsState.openedFolders.filter(o => isEqual(o.workspacePath, configuration.workspacePath, !isLinux /* ignorecase */)).map(o => o.uiState); if (stateForWorkspace.length) { return stateForWorkspace[0]; } @@ -685,7 +748,7 @@ export class WindowsManager implements IWindowsMainService { else { // on mac there is 1 menu per window so we need to use the monitor where the cursor currently is - if (platform.isMacintosh) { + if (isMacintosh) { const cursorPoint = screen.getCursorScreenPoint(); displayToUse = screen.getDisplayNearestPoint(cursorPoint); } @@ -796,22 +859,22 @@ export class WindowsManager implements IWindowsMainService { const res = windowsToTest.filter(w => { // match on workspace - if (typeof w.openedWorkspacePath === 'string' && (isEqual(w.openedWorkspacePath, workspacePath, !platform.isLinux /* ignorecase */))) { + if (typeof w.openedWorkspacePath === 'string' && (isEqual(w.openedWorkspacePath, workspacePath, !isLinux /* ignorecase */))) { return true; } // match on file - if (typeof w.openedFilePath === 'string' && isEqual(w.openedFilePath, filePath, !platform.isLinux /* ignorecase */)) { + if (typeof w.openedFilePath === 'string' && isEqual(w.openedFilePath, filePath, !isLinux /* ignorecase */)) { return true; } // match on file path - if (typeof w.openedWorkspacePath === 'string' && filePath && isEqualOrParent(filePath, w.openedWorkspacePath, !platform.isLinux /* ignorecase */)) { + if (typeof w.openedWorkspacePath === 'string' && filePath && isEqualOrParent(filePath, w.openedWorkspacePath, !isLinux /* ignorecase */)) { return true; } // match on extension development path - if (typeof extensionDevelopmentPath === 'string' && isEqual(w.extensionDevelopmentPath, extensionDevelopmentPath, !platform.isLinux /* ignorecase */)) { + if (typeof extensionDevelopmentPath === 'string' && isEqual(w.extensionDevelopmentPath, extensionDevelopmentPath, !isLinux /* ignorecase */)) { return true; } From 8bd339f185dbe0133859c497052d1abbdc60a814 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 9 Jun 2017 12:29:14 +0200 Subject: [PATCH 1677/2747] :lipstick: --- src/vs/code/electron-main/windows.ts | 63 +++++++++++-------- .../electron-main/historyMainService.ts | 13 ++-- 2 files changed, 45 insertions(+), 31 deletions(-) diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 754a63af36dfe..743776829a765 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -14,7 +14,7 @@ import { IBackupMainService } from 'vs/platform/backup/common/backup'; import { IEnvironmentService, ParsedArgs } from 'vs/platform/environment/common/environment'; import { IStorageService } from 'vs/platform/storage/node/storage'; import { CodeWindow, IWindowState as ISingleWindowState, defaultWindowState, WindowMode } from 'vs/code/electron-main/window'; -import { ipcMain as ipc, app, screen, BrowserWindow, dialog } from 'electron'; +import { ipcMain as ipc, screen, BrowserWindow, dialog } from 'electron'; import { IPathWithLineAndColumn, parseLineAndColumnAware } from 'vs/code/node/paths'; import { ILifecycleService, UnloadReason } from 'vs/platform/lifecycle/electron-main/lifecycleMain'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; @@ -231,15 +231,15 @@ export class WindowsManager implements IWindowsMainService { let foldersToRestore = (openConfig.initialStartup && !openConfig.cli.extensionDevelopmentPath) ? this.backupService.getWorkspaceBackupPaths() : []; let filesToOpen: IPath[] = []; let filesToDiff: IPath[] = []; + let filesToCreate = pathsToOpen.filter(iPath => !!iPath.filePath && iPath.createFilePath); let emptyToOpen = pathsToOpen.filter(iPath => !iPath.workspacePath && !iPath.filePath); let emptyToRestore = (openConfig.initialStartup && !openConfig.cli.extensionDevelopmentPath) ? this.backupService.getEmptyWorkspaceBackupPaths() : []; - let filesToCreate = pathsToOpen.filter(iPath => !!iPath.filePath && iPath.createFilePath); // Diff mode needs special care - const candidates = pathsToOpen.filter(iPath => !!iPath.filePath && !iPath.createFilePath); + const filesToOpenCandidates = pathsToOpen.filter(iPath => !!iPath.filePath && !iPath.createFilePath); if (openConfig.diffMode) { - if (candidates.length === 2) { - filesToDiff = candidates; + if (filesToOpenCandidates.length === 2) { + filesToDiff = filesToOpenCandidates; } else { emptyToOpen = [Object.create(null)]; // improper use of diffMode, open empty } @@ -248,34 +248,16 @@ export class WindowsManager implements IWindowsMainService { foldersToRestore = []; // diff is always in empty workspace filesToCreate = []; // diff ignores other files that do not exist } else { - filesToOpen = candidates; + filesToOpen = filesToOpenCandidates; } - // let the user settings override how folders are open in a new window or same window unless we are forced - const windowConfig = this.configurationService.getConfiguration('window'); - let openFolderInNewWindow = (openConfig.preferNewWindow || openConfig.forceNewWindow) && !openConfig.forceReuseWindow; - if (!openConfig.forceNewWindow && !openConfig.forceReuseWindow && windowConfig && (windowConfig.openFoldersInNewWindow === 'on' || windowConfig.openFoldersInNewWindow === 'off')) { - openFolderInNewWindow = (windowConfig.openFoldersInNewWindow === 'on'); - } + // Settings can decide if files/folders open in new window or not + let { openFolderInNewWindow, openFilesInNewWindow } = this.shouldOpenNewWindow(openConfig); // Handle files to open/diff or to create when we dont open a folder and we do not restore any folder/untitled from hot-exit const usedWindows: CodeWindow[] = []; if (!foldersToOpen.length && !foldersToRestore.length && !emptyToRestore.length && (filesToOpen.length > 0 || filesToCreate.length > 0 || filesToDiff.length > 0)) { - // let the user settings override how files are open in a new window or same window unless we are forced (not for extension development though) - let openFilesInNewWindow: boolean; - if (openConfig.forceNewWindow || openConfig.forceReuseWindow) { - openFilesInNewWindow = openConfig.forceNewWindow && !openConfig.forceReuseWindow; - } else { - if (openConfig.context === OpenContext.DOCK) { - openFilesInNewWindow = true; // only on macOS do we allow to open files in a new window if this is triggered via DOCK context - } - - if (!openConfig.cli.extensionDevelopmentPath && windowConfig && (windowConfig.openFilesInNewWindow === 'on' || windowConfig.openFilesInNewWindow === 'off')) { - openFilesInNewWindow = (windowConfig.openFilesInNewWindow === 'on'); - } - } - // Open Files in last instance if any and flag tells us so const fileToCheck = filesToOpen[0] || filesToCreate[0] || filesToDiff[0]; const windowOrFolder = findBestWindowOrFolder({ @@ -286,6 +268,7 @@ export class WindowsManager implements IWindowsMainService { filePath: fileToCheck && fileToCheck.filePath, userHome: this.environmentService.userHome }); + if (windowOrFolder instanceof CodeWindow) { windowOrFolder.focus(); const files = { filesToOpen, filesToCreate, filesToDiff }; // copy to object because they get reset shortly after @@ -328,6 +311,7 @@ export class WindowsManager implements IWindowsMainService { if (windowsOnWorkspacePath.length > 0) { const browserWindow = windowsOnWorkspacePath[0]; browserWindow.focus(); // just focus one of them + const files = { filesToOpen, filesToCreate, filesToDiff }; // copy to object because they get reset shortly after browserWindow.ready().then(readyWindow => { readyWindow.send('vscode:openFiles', files); @@ -418,7 +402,6 @@ export class WindowsManager implements IWindowsMainService { pathsToOpen.forEach(iPath => { if (iPath.filePath || iPath.workspacePath) { - app.addRecentDocument(iPath.filePath || iPath.workspacePath); recentPaths.push({ path: iPath.filePath || iPath.workspacePath, isFile: !!iPath.filePath }); } }); @@ -576,6 +559,32 @@ export class WindowsManager implements IWindowsMainService { return null; } + private shouldOpenNewWindow(openConfig: IOpenConfiguration): { openFolderInNewWindow: boolean; openFilesInNewWindow: boolean; } { + + // let the user settings override how folders are open in a new window or same window unless we are forced + const windowConfig = this.configurationService.getConfiguration('window'); + let openFolderInNewWindow = (openConfig.preferNewWindow || openConfig.forceNewWindow) && !openConfig.forceReuseWindow; + if (!openConfig.forceNewWindow && !openConfig.forceReuseWindow && windowConfig && (windowConfig.openFoldersInNewWindow === 'on' || windowConfig.openFoldersInNewWindow === 'off')) { + openFolderInNewWindow = (windowConfig.openFoldersInNewWindow === 'on'); + } + + // let the user settings override how files are open in a new window or same window unless we are forced (not for extension development though) + let openFilesInNewWindow: boolean; + if (openConfig.forceNewWindow || openConfig.forceReuseWindow) { + openFilesInNewWindow = openConfig.forceNewWindow && !openConfig.forceReuseWindow; + } else { + if (openConfig.context === OpenContext.DOCK) { + openFilesInNewWindow = true; // only on macOS do we allow to open files in a new window if this is triggered via DOCK context + } + + if (!openConfig.cli.extensionDevelopmentPath && windowConfig && (windowConfig.openFilesInNewWindow === 'on' || windowConfig.openFilesInNewWindow === 'off')) { + openFilesInNewWindow = (windowConfig.openFilesInNewWindow === 'on'); + } + } + + return { openFolderInNewWindow, openFilesInNewWindow }; + } + public openExtensionDevelopmentHostWindow(openConfig: IOpenConfiguration): void { // Reload an existing extension development host window on the same path diff --git a/src/vs/platform/history/electron-main/historyMainService.ts b/src/vs/platform/history/electron-main/historyMainService.ts index 31ce2c45c7965..568b27917e7f5 100644 --- a/src/vs/platform/history/electron-main/historyMainService.ts +++ b/src/vs/platform/history/electron-main/historyMainService.ts @@ -6,7 +6,6 @@ 'use strict'; import * as path from 'path'; -import * as platform from 'vs/base/common/platform'; import * as nls from 'vs/nls'; import * as arrays from 'vs/base/common/arrays'; import { trim } from 'vs/base/common/strings'; @@ -17,6 +16,7 @@ import { getPathLabel } from 'vs/base/common/labels'; import { IPath } from 'vs/platform/windows/common/windows'; import CommonEvent, { Emitter } from 'vs/base/common/event'; import { createDecorator } from "vs/platform/instantiation/common/instantiation"; +import { isWindows, isMacintosh, isLinux } from "vs/base/common/platform"; export const IHistoryMainService = createDecorator('historyMainService'); @@ -69,15 +69,20 @@ export class HistoryMainService implements IHistoryMainService { if (isFile) { mru.files.unshift(path); - mru.files = arrays.distinct(mru.files, (f) => platform.isLinux ? f : f.toLowerCase()); + mru.files = arrays.distinct(mru.files, (f) => isLinux ? f : f.toLowerCase()); } else { mru.folders.unshift(path); - mru.folders = arrays.distinct(mru.folders, (f) => platform.isLinux ? f : f.toLowerCase()); + mru.folders = arrays.distinct(mru.folders, (f) => isLinux ? f : f.toLowerCase()); } // Make sure its bounded mru.folders = mru.folders.slice(0, HistoryMainService.MAX_TOTAL_RECENT_ENTRIES); mru.files = mru.files.slice(0, HistoryMainService.MAX_TOTAL_RECENT_ENTRIES); + + // Add to recent documents (Windows/macOS only) + if (isMacintosh || isWindows) { + app.addRecentDocument(path); + } }); this.storageService.setItem(HistoryMainService.recentPathsListStorageKey, mru); @@ -157,7 +162,7 @@ export class HistoryMainService implements IHistoryMainService { } public updateWindowsJumpList(): void { - if (!platform.isWindows) { + if (!isWindows) { return; // only on windows } From 29ed566e4b71280ad742cf9fe4e85f4f5f85ec9d Mon Sep 17 00:00:00 2001 From: jens1o Date: Fri, 9 Jun 2017 12:57:42 +0200 Subject: [PATCH 1678/2747] fix ordering and rename select icon theme --- src/vs/workbench/parts/update/electron-browser/update.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/update/electron-browser/update.ts b/src/vs/workbench/parts/update/electron-browser/update.ts index a45dc3b22f2ed..26deadbcb105b 100644 --- a/src/vs/workbench/parts/update/electron-browser/update.ts +++ b/src/vs/workbench/parts/update/electron-browser/update.ts @@ -282,8 +282,8 @@ export class LightUpdateContribution implements IGlobalActivity { private static readonly showCommandsId = 'workbench.action.showCommands'; private static readonly openSettingsId = 'workbench.action.openGlobalSettings'; private static readonly openKeybindingsId = 'workbench.action.openGlobalKeybindings'; - private static readonly selectIconThemeId = 'workbench.action.selectIconTheme'; private static readonly selectColorThemeId = 'workbench.action.selectTheme'; + private static readonly selectIconThemeId = 'workbench.action.selectIconTheme'; get id() { return 'vs.update'; } get name() { return ''; } @@ -326,8 +326,8 @@ export class LightUpdateContribution implements IGlobalActivity { new Action(LightUpdateContribution.openSettingsId, nls.localize('settings', "Settings"), null, true, () => this.commandService.executeCommand(LightUpdateContribution.openSettingsId)), new Action(LightUpdateContribution.openKeybindingsId, nls.localize('keyboardShortcuts', "Keyboard Shortcuts"), null, true, () => this.commandService.executeCommand(LightUpdateContribution.openKeybindingsId)), new Separator(), - new Action(LightUpdateContribution.selectIconThemeId, nls.localize('themes.selectIconTheme', "Select File Icon Theme"), null, true, () => this.commandService.executeCommand(LightUpdateContribution.selectIconThemeId)), new Action(LightUpdateContribution.selectColorThemeId, nls.localize('selectTheme.label', "Color Theme"), null, true, () => this.commandService.executeCommand(LightUpdateContribution.selectColorThemeId)), + new Action(LightUpdateContribution.selectIconThemeId, nls.localize('themes.selectIconTheme.label', "File Icon Theme"), null, true, () => this.commandService.executeCommand(LightUpdateContribution.selectIconThemeId)), new Separator(), this.getUpdateAction() ]; From 6c0d720cdf0bb4a00b13acec63dee1ed867ffd6f Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Fri, 9 Jun 2017 14:43:30 +0200 Subject: [PATCH 1679/2747] Resolves #28336 --- build/lib/i18n.js | 62 +------ build/lib/i18n.resources.json | 190 ++++++++++++++++++++++ build/lib/i18n.ts | 61 +------ build/lib/tslint/translationRemindRule.js | 72 ++++++++ build/lib/tslint/translationRemindRule.ts | 67 ++++++++ tslint.json | 3 +- 6 files changed, 340 insertions(+), 115 deletions(-) create mode 100644 build/lib/i18n.resources.json create mode 100644 build/lib/tslint/translationRemindRule.js create mode 100644 build/lib/tslint/translationRemindRule.ts diff --git a/build/lib/i18n.js b/build/lib/i18n.js index e529cde52e1cc..6d60d08d87cd5 100644 --- a/build/lib/i18n.js +++ b/build/lib/i18n.js @@ -1,8 +1,8 @@ +"use strict"; /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var path = require("path"); var fs = require("fs"); @@ -501,60 +501,6 @@ function prepareXlfFiles(projectName, extensionName) { } exports.prepareXlfFiles = prepareXlfFiles; var editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench', extensionsProject = 'vscode-extensions', setupProject = 'vscode-setup'; -/** - * Ensure to update those arrays when new resources are pushed to Transifex. - * Used because Transifex does not have API method to pull all project resources. - */ -var editorResources = [ - { name: 'vs/platform', project: editorProject }, - { name: 'vs/editor/contrib', project: editorProject }, - { name: 'vs/editor', project: editorProject }, - { name: 'vs/base', project: editorProject } -]; -var workbenchResources = [ - { name: 'vs/code', project: workbenchProject }, - { name: 'vs/workbench', project: workbenchProject }, - { name: 'vs/workbench/parts/cli', project: workbenchProject }, - { name: 'vs/workbench/parts/codeEditor', project: workbenchProject }, - { name: 'vs/workbench/parts/debug', project: workbenchProject }, - { name: 'vs/workbench/parts/emmet', project: workbenchProject }, - { name: 'vs/workbench/parts/execution', project: workbenchProject }, - { name: 'vs/workbench/parts/explorers', project: workbenchProject }, - { name: 'vs/workbench/parts/extensions', project: workbenchProject }, - { name: 'vs/workbench/parts/feedback', project: workbenchProject }, - { name: 'vs/workbench/parts/files', project: workbenchProject }, - { name: 'vs/workbench/parts/html', project: workbenchProject }, - { name: 'vs/workbench/parts/markers', project: workbenchProject }, - { name: 'vs/workbench/parts/nps', project: workbenchProject }, - { name: 'vs/workbench/parts/output', project: workbenchProject }, - { name: 'vs/workbench/parts/performance', project: workbenchProject }, - { name: 'vs/workbench/parts/preferences', project: workbenchProject }, - { name: 'vs/workbench/parts/quickopen', project: workbenchProject }, - { name: 'vs/workbench/parts/relauncher', project: workbenchProject }, - { name: 'vs/workbench/parts/scm', project: workbenchProject }, - { name: 'vs/workbench/parts/search', project: workbenchProject }, - { name: 'vs/workbench/parts/snippets', project: workbenchProject }, - { name: 'vs/workbench/parts/surveys', project: workbenchProject }, - { name: 'vs/workbench/parts/tasks', project: workbenchProject }, - { name: 'vs/workbench/parts/terminal', project: workbenchProject }, - { name: 'vs/workbench/parts/themes', project: workbenchProject }, - { name: 'vs/workbench/parts/trust', project: workbenchProject }, - { name: 'vs/workbench/parts/update', project: workbenchProject }, - { name: 'vs/workbench/parts/views', project: workbenchProject }, - { name: 'vs/workbench/parts/watermark', project: workbenchProject }, - { name: 'vs/workbench/parts/welcome', project: workbenchProject }, - { name: 'vs/workbench/services/configuration', project: workbenchProject }, - { name: 'vs/workbench/services/crashReporter', project: workbenchProject }, - { name: 'vs/workbench/services/editor', project: workbenchProject }, - { name: 'vs/workbench/services/files', project: workbenchProject }, - { name: 'vs/workbench/services/keybinding', project: workbenchProject }, - { name: 'vs/workbench/services/message', project: workbenchProject }, - { name: 'vs/workbench/services/mode', project: workbenchProject }, - { name: 'vs/workbench/services/progress', project: workbenchProject }, - { name: 'vs/workbench/services/textfile', project: workbenchProject }, - { name: 'vs/workbench/services/themes', project: workbenchProject }, - { name: 'setup_messages', project: workbenchProject } -]; function getResource(sourceFile) { var resource; if (/^vs\/platform/.test(sourceFile)) { @@ -825,10 +771,12 @@ function updateResource(project, slug, xlfFile, apiHostname, credentials) { function obtainProjectResources(projectName) { var resources = []; if (projectName === editorProject) { - resources = editorResources; + var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + resources = JSON.parse(json).editor; } else if (projectName === workbenchProject) { - resources = workbenchResources; + var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + resources = JSON.parse(json).workbench; } else if (projectName === extensionsProject) { var extensionsToLocalize = glob.sync('./extensions/**/*.nls.json').map(function (extension) { return extension.split('/')[2]; }); diff --git a/build/lib/i18n.resources.json b/build/lib/i18n.resources.json new file mode 100644 index 0000000000000..f3c4a3f9bfbf6 --- /dev/null +++ b/build/lib/i18n.resources.json @@ -0,0 +1,190 @@ +{ + "editor": [ + { + "name": "vs/platform", + "project": "vscode-editor" + }, + { + "name": "vs/editor/contrib", + "project": "vscode-editor" + }, + { + "name": "vs/editor", + "project": "vscode-editor" + }, + { + "name": "vs/base", + "project": "vscode-editor" + } + ], + "workbench": [ + { + "name": "vs/code", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/cli", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/codeEditor", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/debug", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/emmet", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/execution", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/explorers", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/extensions", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/feedback", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/files", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/html", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/markers", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/nps", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/output", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/performance", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/preferences", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/quickopen", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/relauncher", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/scm", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/search", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/snippets", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/surveys", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/tasks", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/terminal", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/themes", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/trust", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/update", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/views", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/watermark", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/parts/welcome", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/configuration", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/crashReporter", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/editor", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/files", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/keybinding", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/message", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/mode", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/progress", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/textfile", + "project": "vscode-workbench" + }, + { + "name": "vs/workbench/services/themes", + "project": "vscode-workbench" + }, + { + "name": "setup_messages", + "project": "vscode-workbench" + } + ] +} \ No newline at end of file diff --git a/build/lib/i18n.ts b/build/lib/i18n.ts index 4cf89dacda0a2..815e599116bbc 100644 --- a/build/lib/i18n.ts +++ b/build/lib/i18n.ts @@ -578,61 +578,6 @@ const editorProject: string = 'vscode-editor', extensionsProject: string = 'vscode-extensions', setupProject: string = 'vscode-setup'; -/** - * Ensure to update those arrays when new resources are pushed to Transifex. - * Used because Transifex does not have API method to pull all project resources. - */ -const editorResources: Resource[] = [ - { name: 'vs/platform', project: editorProject }, - { name: 'vs/editor/contrib', project: editorProject }, - { name: 'vs/editor', project: editorProject }, - { name: 'vs/base', project: editorProject } -]; -const workbenchResources: Resource[] = [ - { name: 'vs/code', project: workbenchProject }, - { name: 'vs/workbench', project: workbenchProject }, - { name: 'vs/workbench/parts/cli', project: workbenchProject }, - { name: 'vs/workbench/parts/codeEditor', project: workbenchProject }, - { name: 'vs/workbench/parts/debug', project: workbenchProject }, - { name: 'vs/workbench/parts/emmet', project: workbenchProject }, - { name: 'vs/workbench/parts/execution', project: workbenchProject }, - { name: 'vs/workbench/parts/explorers', project: workbenchProject }, - { name: 'vs/workbench/parts/extensions', project: workbenchProject }, - { name: 'vs/workbench/parts/feedback', project: workbenchProject }, - { name: 'vs/workbench/parts/files', project: workbenchProject }, - { name: 'vs/workbench/parts/html', project: workbenchProject }, - { name: 'vs/workbench/parts/markers', project: workbenchProject }, - { name: 'vs/workbench/parts/nps', project: workbenchProject }, - { name: 'vs/workbench/parts/output', project: workbenchProject }, - { name: 'vs/workbench/parts/performance', project: workbenchProject }, - { name: 'vs/workbench/parts/preferences', project: workbenchProject }, - { name: 'vs/workbench/parts/quickopen', project: workbenchProject }, - { name: 'vs/workbench/parts/relauncher', project: workbenchProject }, - { name: 'vs/workbench/parts/scm', project: workbenchProject }, - { name: 'vs/workbench/parts/search', project: workbenchProject }, - { name: 'vs/workbench/parts/snippets', project: workbenchProject }, - { name: 'vs/workbench/parts/surveys', project: workbenchProject }, - { name: 'vs/workbench/parts/tasks', project: workbenchProject }, - { name: 'vs/workbench/parts/terminal', project: workbenchProject }, - { name: 'vs/workbench/parts/themes', project: workbenchProject }, - { name: 'vs/workbench/parts/trust', project: workbenchProject }, - { name: 'vs/workbench/parts/update', project: workbenchProject }, - { name: 'vs/workbench/parts/views', project: workbenchProject }, - { name: 'vs/workbench/parts/watermark', project: workbenchProject }, - { name: 'vs/workbench/parts/welcome', project: workbenchProject }, - { name: 'vs/workbench/services/configuration', project: workbenchProject }, - { name: 'vs/workbench/services/crashReporter', project: workbenchProject }, - { name: 'vs/workbench/services/editor', project: workbenchProject }, - { name: 'vs/workbench/services/files', project: workbenchProject }, - { name: 'vs/workbench/services/keybinding', project: workbenchProject }, - { name: 'vs/workbench/services/message', project: workbenchProject }, - { name: 'vs/workbench/services/mode', project: workbenchProject }, - { name: 'vs/workbench/services/progress', project: workbenchProject }, - { name: 'vs/workbench/services/textfile', project: workbenchProject }, - { name: 'vs/workbench/services/themes', project: workbenchProject }, - { name: 'setup_messages', project: workbenchProject } -]; - export function getResource(sourceFile: string): Resource { let resource: string; @@ -923,9 +868,11 @@ function obtainProjectResources(projectName: string): Resource[] { let resources: Resource[] = []; if (projectName === editorProject) { - resources = editorResources; + const json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + resources = JSON.parse(json).editor; } else if (projectName === workbenchProject) { - resources = workbenchResources; + const json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + resources = JSON.parse(json).workbench; } else if (projectName === extensionsProject) { let extensionsToLocalize: string[] = glob.sync('./extensions/**/*.nls.json').map(extension => extension.split('/')[2]); let resourcesToPull: string[] = []; diff --git a/build/lib/tslint/translationRemindRule.js b/build/lib/tslint/translationRemindRule.js new file mode 100644 index 0000000000000..8db41098be53e --- /dev/null +++ b/build/lib/tslint/translationRemindRule.js @@ -0,0 +1,72 @@ +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +exports.__esModule = true; +var Lint = require("tslint"); +var fs = require("fs"); +var Rule = (function (_super) { + __extends(Rule, _super); + function Rule() { + return _super !== null && _super.apply(this, arguments) || this; + } + Rule.prototype.apply = function (sourceFile) { + return this.applyWithWalker(new TranslationRemindRuleWalker(sourceFile, this.getOptions())); + }; + return Rule; +}(Lint.Rules.AbstractRule)); +exports.Rule = Rule; +var TranslationRemindRuleWalker = (function (_super) { + __extends(TranslationRemindRuleWalker, _super); + function TranslationRemindRuleWalker(file, opts) { + return _super.call(this, file, opts) || this; + } + TranslationRemindRuleWalker.prototype.visitImportDeclaration = function (node) { + var declaration = node.moduleSpecifier.getText(); + if (declaration !== "'" + TranslationRemindRuleWalker.NLS_MODULE + "'") { + return; + } + this.visitImportLikeDeclaration(node); + }; + TranslationRemindRuleWalker.prototype.visitImportEqualsDeclaration = function (node) { + var reference = node.moduleReference.getText(); + if (reference !== "require('" + TranslationRemindRuleWalker.NLS_MODULE + "')") { + return; + } + this.visitImportLikeDeclaration(node); + }; + TranslationRemindRuleWalker.prototype.visitImportLikeDeclaration = function (node) { + var currentFile = node.getSourceFile().fileName; + var matchService = currentFile.match(/vs\/workbench\/services\/\w+/); + var matchPart = currentFile.match(/vs\/workbench\/parts\/\w+/); + if (!matchService && !matchPart) { + return; + } + var resource = matchService ? matchService[0] : matchPart[0]; + var resourceDefined = false; + var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + var workbenchResources = JSON.parse(json).workbench; + workbenchResources.forEach(function (existingResource) { + if (existingResource.name === resource) { + resourceDefined = true; + return; + } + }); + if (!resourceDefined) { + this.addFailureAtNode(node, "Please add '" + resource + "' to ./builds/lib/i18n.resources.json file to use translations here."); + } + }; + return TranslationRemindRuleWalker; +}(Lint.RuleWalker)); +TranslationRemindRuleWalker.NLS_MODULE = 'vs/nls'; diff --git a/build/lib/tslint/translationRemindRule.ts b/build/lib/tslint/translationRemindRule.ts new file mode 100644 index 0000000000000..b33025a3536c3 --- /dev/null +++ b/build/lib/tslint/translationRemindRule.ts @@ -0,0 +1,67 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as ts from 'typescript'; +import * as Lint from 'tslint'; +import * as fs from 'fs'; + +export class Rule extends Lint.Rules.AbstractRule { + public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { + return this.applyWithWalker(new TranslationRemindRuleWalker(sourceFile, this.getOptions())); + } +} + +class TranslationRemindRuleWalker extends Lint.RuleWalker { + + private static NLS_MODULE: string = 'vs/nls'; + + constructor(file: ts.SourceFile, opts: Lint.IOptions) { + super(file, opts); + } + + protected visitImportDeclaration(node: ts.ImportDeclaration): void { + const declaration = node.moduleSpecifier.getText(); + if (declaration !== `'${TranslationRemindRuleWalker.NLS_MODULE}'`) { + return; + } + + this.visitImportLikeDeclaration(node); + } + + protected visitImportEqualsDeclaration(node: ts.ImportEqualsDeclaration): void { + const reference = node.moduleReference.getText(); + if (reference !== `require('${TranslationRemindRuleWalker.NLS_MODULE}')`) { + return; + } + + this.visitImportLikeDeclaration(node); + } + + private visitImportLikeDeclaration(node: ts.ImportDeclaration | ts.ImportEqualsDeclaration) { + const currentFile = node.getSourceFile().fileName; + const matchService = currentFile.match(/vs\/workbench\/services\/\w+/); + const matchPart = currentFile.match(/vs\/workbench\/parts\/\w+/); + if (!matchService && !matchPart) { + return; + } + + const resource = matchService ? matchService[0] : matchPart[0]; + let resourceDefined = false; + + const json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + const workbenchResources = JSON.parse(json).workbench; + + workbenchResources.forEach(existingResource => { + if (existingResource.name === resource) { + resourceDefined = true; + return; + } + }); + + if (!resourceDefined) { + this.addFailureAtNode(node, `Please add '${resource}' to ./builds/lib/i18n.resources.json file to use translations here.`); + } + } +} diff --git a/tslint.json b/tslint.json index b61b70ab04611..84c20b3d478ae 100644 --- a/tslint.json +++ b/tslint.json @@ -69,6 +69,7 @@ "extensions", "smoke" ] - ] + ], + "translation-remind": true } } \ No newline at end of file From 8e89400791a16d71badf2eea6e4bd0bdd3dc0bcd Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 9 Jun 2017 15:19:48 +0200 Subject: [PATCH 1680/2747] debug: on restart only read out the launch.json if it was changed #28175 --- .../debug/electron-browser/debugService.ts | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 4a81f9be62db5..24fa55d339a9a 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -81,6 +81,7 @@ export class DebugService implements debug.IDebugService { private debugState: IContextKey; private breakpointsToSendOnResourceSaved: Set; private callStackScheduler: RunOnceScheduler; + private launchJsonChanged: boolean; constructor( @IStorageService private storageService: IStorageService, @@ -628,6 +629,7 @@ export class DebugService implements debug.IDebugService { if (this.model.getProcesses().length === 0) { this.removeReplExpressions(); } + this.launchJsonChanged = false; const manager = this.getConfigurationManager(); configName = configName || this.viewModel.selectedConfigurationName; const config = manager.getConfiguration(configName); @@ -921,15 +923,19 @@ export class DebugService implements debug.IDebugService { return process.session.disconnect(true).then(() => new TPromise((c, e) => { setTimeout(() => { - // Read the configuration again if a launch.json exists, if not just use the inmemory configuration #19366 - const config = this.configurationManager.getConfiguration(process.configuration.name); - if (config) { - // Take the type from the process since the debug extension might overwrite it #21316 - config.type = process.configuration.type; - config.noDebug = process.configuration.noDebug; - config.__restart = restartData; + // Read the configuration again if a launch.json has been changed, if not just use the inmemory configuration + let config = process.configuration; + if (this.launchJsonChanged) { + this.launchJsonChanged = false; + config = this.configurationManager.getConfiguration(process.configuration.name) || process.configuration; + if (config) { + // Take the type from the process since the debug extension might overwrite it #21316 + config.type = process.configuration.type; + config.noDebug = process.configuration.noDebug; + config.__restart = restartData; + } } - this.createProcess(config || process.configuration).then(() => c(null), err => e(err)); + this.createProcess(config).then(() => c(null), err => e(err)); }, 300); }) ).then(() => { @@ -1115,6 +1121,9 @@ export class DebugService implements debug.IDebugService { this.breakpointsToSendOnResourceSaved.delete(event.resource.toString()); this.sendBreakpoints(event.resource, true).done(null, errors.onUnexpectedError); } + if (event.resource.toString().indexOf('.vscode/launch.json') >= 0) { + this.launchJsonChanged = true; + } }); } From 8283f95ce1bdefeb5184bd239cae3e294ed1672a Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 9 Jun 2017 15:21:10 +0200 Subject: [PATCH 1681/2747] Fixes Microsoft/monaco-editor#443 --- src/vs/editor/common/commands/shiftCommand.ts | 30 +++++++++++++- src/vs/editor/common/model/modelLine.ts | 6 +-- .../test/common/commands/shiftCommand.test.ts | 40 ++++++++++++++----- .../test/common/controller/cursor.test.ts | 27 +++++++++++++ 4 files changed, 89 insertions(+), 14 deletions(-) diff --git a/src/vs/editor/common/commands/shiftCommand.ts b/src/vs/editor/common/commands/shiftCommand.ts index 77a59b0238533..209e93d7fcb5e 100644 --- a/src/vs/editor/common/commands/shiftCommand.ts +++ b/src/vs/editor/common/commands/shiftCommand.ts @@ -7,7 +7,7 @@ import * as strings from 'vs/base/common/strings'; import { CursorColumns } from 'vs/editor/common/controller/cursorCommon'; import { Range } from 'vs/editor/common/core/range'; -import { Selection } from 'vs/editor/common/core/selection'; +import { Selection, SelectionDirection } from 'vs/editor/common/core/selection'; import { ICommand, ICursorStateComputerData, IEditOperationBuilder, ITokenizedModel } from 'vs/editor/common/editorCommon'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { CharCode } from 'vs/base/common/charCode'; @@ -45,11 +45,13 @@ export class ShiftCommand implements ICommand { private _selection: Selection; private _selectionId: string; private _useLastEditRangeForCursorEndPosition: boolean; + private _selectionStartColumnStaysPut: boolean; constructor(range: Selection, opts: IShiftCommandOpts) { this._opts = opts; this._selection = range; this._useLastEditRangeForCursorEndPosition = false; + this._selectionStartColumnStaysPut = false; } private _addEditOperation(builder: IEditOperationBuilder, range: Range, text: string) { @@ -156,6 +158,10 @@ export class ShiftCommand implements ICommand { } this._addEditOperation(builder, new Range(lineNumber, 1, lineNumber, indentationEndIndex + 1), indents[desiredIndentCount]); + if (lineNumber === startLine) { + // Force the startColumn to stay put because we're inserting after it + this._selectionStartColumnStaysPut = (this._selection.startColumn <= indentationEndIndex + 1); + } } } else { @@ -197,6 +203,10 @@ export class ShiftCommand implements ICommand { this._addEditOperation(builder, new Range(lineNumber, 1, lineNumber, indentationEndIndex + 1), ''); } else { this._addEditOperation(builder, new Range(lineNumber, 1, lineNumber, 1), oneIndent); + if (lineNumber === startLine) { + // Force the startColumn to stay put because we're inserting after it + this._selectionStartColumnStaysPut = (this._selection.startColumn === 1); + } } } } @@ -209,6 +219,22 @@ export class ShiftCommand implements ICommand { let lastOp = helper.getInverseEditOperations()[0]; return new Selection(lastOp.range.endLineNumber, lastOp.range.endColumn, lastOp.range.endLineNumber, lastOp.range.endColumn); } - return helper.getTrackedSelection(this._selectionId); + const result = helper.getTrackedSelection(this._selectionId); + + if (this._selectionStartColumnStaysPut) { + // The selection start should not move + let initialStartColumn = this._selection.startColumn; + let resultStartColumn = result.startColumn; + if (resultStartColumn <= initialStartColumn) { + return result; + } + + if (result.getDirection() === SelectionDirection.LTR) { + return new Selection(result.startLineNumber, initialStartColumn, result.endLineNumber, result.endColumn); + } + return new Selection(result.endLineNumber, result.endColumn, result.startLineNumber, initialStartColumn); + } + + return result; } } diff --git a/src/vs/editor/common/model/modelLine.ts b/src/vs/editor/common/model/modelLine.ts index 2d64bc4dec51f..b2d1b3eeea09a 100644 --- a/src/vs/editor/common/model/modelLine.ts +++ b/src/vs/editor/common/model/modelLine.ts @@ -416,11 +416,11 @@ export class ModelLine { // var markers = this._markers; - // var printMarker = (m:ILineMarker) => { + // var printMarker = (m:LineMarker) => { // if (m.stickToPreviousCharacter) { - // return '|' + m.column; + // return '|' + m.position.column; // } - // return m.column + '|'; + // return m.position.column + '|'; // }; // return '[' + markers.map(printMarker).join(', ') + ']'; // } diff --git a/src/vs/editor/test/common/commands/shiftCommand.test.ts b/src/vs/editor/test/common/commands/shiftCommand.test.ts index 0ea6691e168ad..5a2b2ad63750f 100644 --- a/src/vs/editor/test/common/commands/shiftCommand.test.ts +++ b/src/vs/editor/test/common/commands/shiftCommand.test.ts @@ -107,7 +107,7 @@ suite('Editor Commands - ShiftCommand', () => { '', '123' ], - new Selection(1, 2, 1, 2) + new Selection(1, 1, 1, 2) ); }); @@ -130,7 +130,7 @@ suite('Editor Commands - ShiftCommand', () => { '', '123' ], - new Selection(1, 4, 1, 2) + new Selection(1, 4, 1, 1) ); }); @@ -153,7 +153,7 @@ suite('Editor Commands - ShiftCommand', () => { '', '123' ], - new Selection(1, 2, 1, 4) + new Selection(1, 1, 1, 4) ); }); @@ -176,7 +176,7 @@ suite('Editor Commands - ShiftCommand', () => { '', '123' ], - new Selection(1, 2, 2, 1) + new Selection(1, 1, 2, 1) ); }); @@ -199,7 +199,7 @@ suite('Editor Commands - ShiftCommand', () => { '', '123' ], - new Selection(1, 2, 2, 1) + new Selection(1, 1, 2, 1) ); testShiftCommand( @@ -312,7 +312,7 @@ suite('Editor Commands - ShiftCommand', () => { '', '\t123' ], - new Selection(1, 2, 5, 3) + new Selection(1, 1, 5, 3) ); testShiftCommand( @@ -333,7 +333,7 @@ suite('Editor Commands - ShiftCommand', () => { '\t', '123' ], - new Selection(4, 2, 5, 1) + new Selection(4, 1, 5, 1) ); }); @@ -538,7 +538,7 @@ suite('Editor Commands - ShiftCommand', () => { '', '\t123' ], - new Selection(1, 2, 5, 5) + new Selection(1, 1, 5, 5) ); }); @@ -703,7 +703,7 @@ suite('Editor Commands - ShiftCommand', () => { ' eleven | 11', '', ], - new Selection(1, 5, 13, 1) + new Selection(1, 1, 13, 1) ); }); @@ -839,6 +839,28 @@ suite('Editor Commands - ShiftCommand', () => { ); }); + test('issue Microsoft/monaco-editor#443: Indentation of a single row deletes selected text in some cases', () => { + testCommand( + [ + 'Hello world!', + 'another line' + ], + null, + new Selection(1, 1, 1, 13), + (sel) => new ShiftCommand(sel, { + isUnshift: false, + tabSize: 4, + oneIndent: '\t', + useTabStops: true + }), + [ + '\tHello world!', + 'another line' + ], + new Selection(1, 1, 1, 14) + ); + }); + test('bug #16815:Shift+Tab doesn\'t go back to tabstop', () => { var repeatStr = (str: string, cnt: number): string => { diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index b3d15acc035b9..f2456100aa348 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -1131,6 +1131,33 @@ class IndentRulesMode extends MockMode { } suite('Editor Controller - Regression tests', () => { + + test('issue Microsoft/monaco-editor#443: Indentation of a single row deletes selected text in some cases', () => { + let model = Model.createFromString( + [ + 'Hello world!', + 'another line' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: false, + tabSize: 4, + trimAutoWhitespace: false + }, + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { + cursor.setSelections('test', [new Selection(1, 1, 1, 13)]); + + // Check that indenting maintains the selection start at column 1 + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); + assert.deepEqual(cursor.getSelection(), new Selection(1, 1, 1, 14)); + }); + + model.dispose(); + }); + test('Bug 9121: Auto indent + undo + redo is funky', () => { let model = Model.createFromString( [ From 5c66337d6d0c75b918437c31fbeb40f7ee8e556f Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 9 Jun 2017 15:35:12 +0200 Subject: [PATCH 1682/2747] Fix stubbing window.onerror --- .../electron-browser/telemetryService.test.ts | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts b/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts index 0f6157ba5e6c0..9a49dfd7b38b5 100644 --- a/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts +++ b/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts @@ -263,7 +263,8 @@ suite('TelemetryService', () => { // })); test('Handle global errors', sinon.test(function () { - let errorStub = this.stub(window, 'onerror'); + let errorStub = sinon.stub(); + window.onerror = errorStub; let testAppender = new TestTelemetryAppender(); let service = new TelemetryService({ appender: testAppender }, undefined); @@ -289,7 +290,8 @@ suite('TelemetryService', () => { })); test('Uncaught Error Telemetry removes PII from filename', sinon.test(function () { - let errorStub = this.stub(window, 'onerror'); + let errorStub = sinon.stub(); + window.onerror = errorStub; let settings = new ErrorTestingSettings(); let testAppender = new TestTelemetryAppender(); let service = new TelemetryService({ appender: testAppender }, undefined); @@ -347,7 +349,8 @@ suite('TelemetryService', () => { })); test('Uncaught Error Telemetry removes PII', sinon.test(function () { - let errorStub = this.stub(window, 'onerror'); + let errorStub = sinon.stub(); + window.onerror = errorStub; let settings = new ErrorTestingSettings(); let testAppender = new TestTelemetryAppender(); let service = new TelemetryService({ appender: testAppender }, undefined); @@ -407,7 +410,8 @@ suite('TelemetryService', () => { })); test('Uncaught Error Telemetry removes PII but preserves Code file path', sinon.test(function () { - let errorStub = this.stub(window, 'onerror'); + let errorStub = sinon.stub(); + window.onerror = errorStub; let settings = new ErrorTestingSettings(); let testAppender = new TestTelemetryAppender(); let service = new TelemetryService({ appender: testAppender }, undefined); @@ -469,7 +473,8 @@ suite('TelemetryService', () => { })); test('Uncaught Error Telemetry removes PII but preserves Code file path when PIIPath is configured', sinon.test(function () { - let errorStub = this.stub(window, 'onerror'); + let errorStub = sinon.stub(); + window.onerror = errorStub; let settings = new ErrorTestingSettings(); let testAppender = new TestTelemetryAppender(); let service = new TelemetryService({ appender: testAppender, piiPaths: [settings.personalInfo + '/resources/app/'] }, undefined); @@ -531,7 +536,8 @@ suite('TelemetryService', () => { })); test('Uncaught Error Telemetry removes PII but preserves Missing Model error message', sinon.test(function () { - let errorStub = this.stub(window, 'onerror'); + let errorStub = sinon.stub(); + window.onerror = errorStub; let settings = new ErrorTestingSettings(); let testAppender = new TestTelemetryAppender(); let service = new TelemetryService({ appender: testAppender }, undefined); @@ -598,7 +604,8 @@ suite('TelemetryService', () => { Errors.setUnexpectedErrorHandler(() => { }); try { - let errorStub = this.stub(window, 'onerror'); + let errorStub = sinon.stub(); + window.onerror = errorStub; let settings = new ErrorTestingSettings(); let testAppender = new TestTelemetryAppender(); let service = new TelemetryService({ appender: testAppender }, undefined); From efe00425488162b40a9cf6f5b8e6a58c8db0c98f Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 9 Jun 2017 15:39:06 +0200 Subject: [PATCH 1683/2747] debug: fix ts 2.4 errors fixes #28134 --- .../workbench/parts/debug/test/common/mockDebug.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/parts/debug/test/common/mockDebug.ts b/src/vs/workbench/parts/debug/test/common/mockDebug.ts index c2f725b82c152..55b41b025e644 100644 --- a/src/vs/workbench/parts/debug/test/common/mockDebug.ts +++ b/src/vs/workbench/parts/debug/test/common/mockDebug.ts @@ -114,6 +114,11 @@ export class MockSession implements debug.ISession { public stackTrace(args: DebugProtocol.StackTraceArguments): TPromise { return TPromise.as({ + seq: 1, + type: 'response', + request_seq: 1, + success: true, + command: 'stackTrace', body: { stackFrames: [{ id: 1, @@ -126,12 +131,7 @@ export class MockSession implements debug.ISession { } public exceptionInfo(args: DebugProtocol.ExceptionInfoArguments): TPromise { - return TPromise.as({ - body: { - exceptionId: 'mockExceptionId', - breakMode: 'unhandled' - } - }); + return TPromise.as(null); } public attach(args: DebugProtocol.AttachRequestArguments): TPromise { From 8284c17202a5740dc132b31de0a35820b300a5a0 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Fri, 9 Jun 2017 15:57:58 +0200 Subject: [PATCH 1684/2747] Fixes #28351: Tasks executed in the terminal should always echo the executed command --- .../parts/tasks/common/taskConfiguration.ts | 22 +++++++++---------- .../electron-browser/terminalTaskSystem.ts | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts index cd6ab3b3382b1..71be98158a333 100644 --- a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts @@ -569,7 +569,7 @@ namespace CommandConfiguration { return target; } - export function fillDefault(value: Tasks.TerminalBehavior): Tasks.TerminalBehavior { + export function fillDefault(value: Tasks.TerminalBehavior, context: ParseContext): Tasks.TerminalBehavior { if (value && Object.isFrozen(value)) { return value; } @@ -577,7 +577,7 @@ namespace CommandConfiguration { return { echo: false, reveal: Tasks.RevealKind.Always }; } if (value.echo === void 0) { - value.echo = false; + value.echo = context.engine === Tasks.ExecutionEngine.Terminal ? true : false; } if (value.reveal === void 0) { value.reveal = Tasks.RevealKind.Always; @@ -732,14 +732,14 @@ namespace CommandConfiguration { return target; } - export function fillDefaults(value: Tasks.CommandConfiguration): void { + export function fillDefaults(value: Tasks.CommandConfiguration, context: ParseContext): void { if (!value || Object.isFrozen(value)) { return; } if (value.name !== void 0 && value.type === void 0) { value.type = Tasks.CommandType.Process; } - value.terminalBehavior = TerminalBehavior.fillDefault(value.terminalBehavior); + value.terminalBehavior = TerminalBehavior.fillDefault(value.terminalBehavior, context); if (!isEmpty(value)) { value.options = CommandOptions.fillDefaults(value.options); } @@ -933,7 +933,7 @@ namespace TaskDescription { return; } fillGlobals(task, globals); - fillDefaults(task); + fillDefaults(task, context); let addTask: boolean = true; if (context.engine === Tasks.ExecutionEngine.Terminal && task.command && task.command.name && task.command.type === Tasks.CommandType.Shell && task.command.args && task.command.args.length > 0) { if (hasUnescapedSpaces(task.command.name) || task.command.args.some(hasUnescapedSpaces)) { @@ -1028,8 +1028,8 @@ namespace TaskDescription { export function mergeGlobalsIntoAnnnotation(task: Tasks.Task, globals: Globals): void { } - export function fillDefaults(task: Tasks.Task): void { - CommandConfiguration.fillDefaults(task.command); + export function fillDefaults(task: Tasks.Task, context: ParseContext): void { + CommandConfiguration.fillDefaults(task.command, context); if (task.promptOnClose === void 0) { task.promptOnClose = task.isBackground !== void 0 ? !task.isBackground : true; } @@ -1110,7 +1110,7 @@ namespace Globals { if (command) { result.command = command; } - Globals.fillDefaults(result); + Globals.fillDefaults(result, context); Globals.freeze(result); return result; } @@ -1142,11 +1142,11 @@ namespace Globals { return target; } - export function fillDefaults(value: Globals): void { + export function fillDefaults(value: Globals, context: ParseContext): void { if (!value) { return; } - CommandConfiguration.fillDefaults(value.command); + CommandConfiguration.fillDefaults(value.command, context); if (value.suppressTaskName === void 0) { value.suppressTaskName = false; } @@ -1350,7 +1350,7 @@ class ConfigurationParser { problemMatchers: matchers }; TaskDescription.fillGlobals(task, globals); - TaskDescription.fillDefaults(task); + TaskDescription.fillDefaults(task, context); result.tasks = [task]; } result.tasks = result.tasks || []; diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index a4bfa6e87e102..31727dae1e085 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -423,7 +423,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { shellArgs.push(commandLine); shellLaunchConfig.args = Platform.isWindows ? shellArgs.join(' ') : shellArgs; if (task.command.terminalBehavior.echo) { - shellLaunchConfig.initialText = `> ${commandLine}`; + shellLaunchConfig.initialText = `\x1b[4mExecuting task: ${commandLine}\x1b[0m\n`; } } else { let cwd = options && options.cwd ? options.cwd : process.cwd(); @@ -446,7 +446,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { } return args.join(' '); }; - shellLaunchConfig.initialText = `> ${shellLaunchConfig.executable} ${getArgsToEcho(shellLaunchConfig.args)}`; + shellLaunchConfig.initialText = `Executing task: ${shellLaunchConfig.executable} ${getArgsToEcho(shellLaunchConfig.args)}\n`; } } if (options.cwd) { From d0a64636e06e1b6afb4bb68c9e1ae2aeeaec2917 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 9 Jun 2017 16:12:08 +0200 Subject: [PATCH 1685/2747] perf - ask less often to profile --- .../performance/electron-browser/performance.contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts index 2e5916bdde031..17e170677050a 100644 --- a/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts +++ b/src/vs/workbench/parts/performance/electron-browser/performance.contribution.ts @@ -107,7 +107,7 @@ class ProfilingHint implements IWorkbenchContribution { // Ignore virtual machines and only ask users // to profile with a certain propability - if (virtualMachineHint.value() >= .5 || Math.ceil(Math.random() * 50) !== 1) { + if (virtualMachineHint.value() >= .5 || Math.ceil(Math.random() * 1000) !== 1) { return; } From 441bfc3a0e3a5b52db041c4f1402fc3d8d72d183 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 9 Jun 2017 16:12:24 +0200 Subject: [PATCH 1686/2747] Fixes Microsoft/monaco-editor#439 --- src/vs/base/browser/ui/menu/menu.css | 1 - .../browser/standalone/media/standalone-tokens.css | 13 +++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/vs/base/browser/ui/menu/menu.css b/src/vs/base/browser/ui/menu/menu.css index 291f08b6ade64..a7ea384d8882f 100644 --- a/src/vs/base/browser/ui/menu/menu.css +++ b/src/vs/base/browser/ui/menu/menu.css @@ -51,7 +51,6 @@ display: inline-block; -ms-flex: 2 1 auto; flex: 2 1 auto; - opacity: 0.7; padding: 0.8em 1em; line-height: 1.1em; font-size: 12px; diff --git a/src/vs/editor/browser/standalone/media/standalone-tokens.css b/src/vs/editor/browser/standalone/media/standalone-tokens.css index 8c3ae996849a3..de07f233940b1 100644 --- a/src/vs/editor/browser/standalone/media/standalone-tokens.css +++ b/src/vs/editor/browser/standalone/media/standalone-tokens.css @@ -9,8 +9,17 @@ font-family: system-ui, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; } -.monaco-menu .monaco-action-bar.vertical .action-item [tabindex="0"]:focus { - color: deepskyblue; +.monaco-menu .monaco-action-bar.vertical .action-item .action-label:focus { + color: #0059AC; + stroke-width: 1.2px; + text-shadow: 0px 0px 0.15px #0059AC; +} + +.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-item .action-label:focus, +.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-item .action-label:focus { + color: #ACDDFF; + stroke-width: 1.2px; + text-shadow: 0px 0px 0.15px #ACDDFF; } .monaco-editor-hover p { From 6bdcfaa5fdd6f87a6cd3feec9169ecbc3aa81784 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Fri, 9 Jun 2017 16:15:52 +0200 Subject: [PATCH 1687/2747] Added Hungarian and Turkish to Insiders. Resolves #28062 and #27608. --- build/gulpfile.vscode.js | 6 +- build/lib/i18n.js | 1997 +++++++++++++++++++------------------- build/lib/i18n.ts | 4 +- 3 files changed, 1006 insertions(+), 1001 deletions(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index aac30d1a5dc01..82c1c5cb6708e 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -86,7 +86,7 @@ const BUNDLED_FILE_HEADER = [ var languages = ['chs', 'cht', 'jpn', 'kor', 'deu', 'fra', 'esn', 'rus', 'ita']; if (process.env.VSCODE_QUALITY !== 'stable') { - languages = languages.concat(['ptb']); // Add languages requested by the community to non-stable builds + languages = languages.concat(['ptb', 'hun', 'trk']); // Add languages requested by the community to non-stable builds } gulp.task('clean-optimized-vscode', util.rimraf('out-vscode')); @@ -369,7 +369,9 @@ const vscodeLanguages = [ 'es', 'ru', 'it', - 'pt-br' + 'pt-br', + 'hu', + 'tr' ]; const setupDefaultLanguages = [ 'zh-hans', diff --git a/build/lib/i18n.js b/build/lib/i18n.js index 6d60d08d87cd5..5aeb3966003dc 100644 --- a/build/lib/i18n.js +++ b/build/lib/i18n.js @@ -1,998 +1,999 @@ -"use strict"; -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -Object.defineProperty(exports, "__esModule", { value: true }); -var path = require("path"); -var fs = require("fs"); -var event_stream_1 = require("event-stream"); -var File = require("vinyl"); -var Is = require("is"); -var xml2js = require("xml2js"); -var glob = require("glob"); -var http = require("http"); -var util = require('gulp-util'); -var iconv = require('iconv-lite'); -function log(message) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } - util.log.apply(util, [util.colors.green('[i18n]'), message].concat(rest)); -} -var LocalizeInfo; -(function (LocalizeInfo) { - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.string(candidate.key) && (Is.undef(candidate.comment) || (Is.array(candidate.comment) && candidate.comment.every(function (element) { return Is.string(element); }))); - } - LocalizeInfo.is = is; -})(LocalizeInfo || (LocalizeInfo = {})); -var BundledFormat; -(function (BundledFormat) { - function is(value) { - if (Is.undef(value)) { - return false; - } - var candidate = value; - var length = Object.keys(value).length; - return length === 3 && Is.defined(candidate.keys) && Is.defined(candidate.messages) && Is.defined(candidate.bundles); - } - BundledFormat.is = is; -})(BundledFormat || (BundledFormat = {})); -var PackageJsonFormat; -(function (PackageJsonFormat) { - function is(value) { - if (Is.undef(value) || !Is.object(value)) { - return false; - } - return Object.keys(value).every(function (key) { - var element = value[key]; - return Is.string(element) || (Is.object(element) && Is.defined(element.message) && Is.defined(element.comment)); - }); - } - PackageJsonFormat.is = is; -})(PackageJsonFormat || (PackageJsonFormat = {})); -var ModuleJsonFormat; -(function (ModuleJsonFormat) { - function is(value) { - var candidate = value; - return Is.defined(candidate) - && Is.array(candidate.messages) && candidate.messages.every(function (message) { return Is.string(message); }) - && Is.array(candidate.keys) && candidate.keys.every(function (key) { return Is.string(key) || LocalizeInfo.is(key); }); - } - ModuleJsonFormat.is = is; -})(ModuleJsonFormat || (ModuleJsonFormat = {})); -var Line = (function () { - function Line(indent) { - if (indent === void 0) { indent = 0; } - this.indent = indent; - this.buffer = []; - if (indent > 0) { - this.buffer.push(new Array(indent + 1).join(' ')); - } - } - Line.prototype.append = function (value) { - this.buffer.push(value); - return this; - }; - Line.prototype.toString = function () { - return this.buffer.join(''); - }; - return Line; -}()); -exports.Line = Line; -var TextModel = (function () { - function TextModel(contents) { - this._lines = contents.split(/\r\n|\r|\n/); - } - Object.defineProperty(TextModel.prototype, "lines", { - get: function () { - return this._lines; - }, - enumerable: true, - configurable: true - }); - return TextModel; -}()); -var XLF = (function () { - function XLF(project) { - this.project = project; - this.buffer = []; - this.files = Object.create(null); - } - XLF.prototype.toString = function () { - this.appendHeader(); - for (var file in this.files) { - this.appendNewLine("", 2); - for (var _i = 0, _a = this.files[file]; _i < _a.length; _i++) { - var item = _a[_i]; - this.addStringItem(item); - } - this.appendNewLine('', 2); - } - this.appendFooter(); - return this.buffer.join('\r\n'); - }; - XLF.prototype.addFile = function (original, keys, messages) { - this.files[original] = []; - var existingKeys = []; - for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { - var key = keys_1[_i]; - // Ignore duplicate keys because Transifex does not populate those with translated values. - if (existingKeys.indexOf(key) !== -1) { - continue; - } - existingKeys.push(key); - var message = encodeEntities(messages[keys.indexOf(key)]); - var comment = undefined; - // Check if the message contains description (if so, it becomes an object type in JSON) - if (Is.string(key)) { - this.files[original].push({ id: key, message: message, comment: comment }); - } - else { - if (key['comment'] && key['comment'].length > 0) { - comment = key['comment'].map(function (comment) { return encodeEntities(comment); }).join('\r\n'); - } - this.files[original].push({ id: key['key'], message: message, comment: comment }); - } - } - }; - XLF.prototype.addStringItem = function (item) { - if (!item.id || !item.message) { - throw new Error('No item ID or value specified.'); - } - this.appendNewLine("", 4); - this.appendNewLine("" + item.message + "", 6); - if (item.comment) { - this.appendNewLine("" + item.comment + "", 6); - } - this.appendNewLine('', 4); - }; - XLF.prototype.appendHeader = function () { - this.appendNewLine('', 0); - this.appendNewLine('', 0); - }; - XLF.prototype.appendFooter = function () { - this.appendNewLine('', 0); - }; - XLF.prototype.appendNewLine = function (content, indent) { - var line = new Line(indent); - line.append(content); - this.buffer.push(line.toString()); - }; - return XLF; -}()); -XLF.parse = function (xlfString) { - return new Promise(function (resolve, reject) { - var parser = new xml2js.Parser(); - var files = []; - parser.parseString(xlfString, function (err, result) { - if (err) { - reject("Failed to parse XLIFF string. " + err); - } - var fileNodes = result['xliff']['file']; - if (!fileNodes) { - reject('XLIFF file does not contain "xliff" or "file" node(s) required for parsing.'); - } - fileNodes.forEach(function (file) { - var originalFilePath = file.$.original; - if (!originalFilePath) { - reject('XLIFF file node does not contain original attribute to determine the original location of the resource file.'); - } - var language = file.$['target-language'].toLowerCase(); - if (!language) { - reject('XLIFF file node does not contain target-language attribute to determine translated language.'); - } - var messages = {}; - var transUnits = file.body[0]['trans-unit']; - transUnits.forEach(function (unit) { - var key = unit.$.id; - if (!unit.target) { - return; // No translation available - } - var val = unit.target.toString(); - if (key && val) { - messages[key] = decodeEntities(val); - } - else { - reject('XLIFF file does not contain full localization data. ID or target translation for one of the trans-unit nodes is not present.'); - } - }); - files.push({ messages: messages, originalFilePath: originalFilePath, language: language }); - }); - resolve(files); - }); - }); -}; -exports.XLF = XLF; -var iso639_3_to_2 = { - 'chs': 'zh-cn', - 'cht': 'zh-tw', - 'csy': 'cs-cz', - 'deu': 'de', - 'enu': 'en', - 'esn': 'es', - 'fra': 'fr', - 'hun': 'hu', - 'ita': 'it', - 'jpn': 'ja', - 'kor': 'ko', - 'nld': 'nl', - 'plk': 'pl', - 'ptb': 'pt-br', - 'ptg': 'pt', - 'rus': 'ru', - 'sve': 'sv-se', - 'trk': 'tr' -}; -/** - * Used to map Transifex to VS Code language code representation. - */ -var iso639_2_to_3 = { - 'zh-hans': 'chs', - 'zh-hant': 'cht', - 'cs-cz': 'csy', - 'de': 'deu', - 'en': 'enu', - 'es': 'esn', - 'fr': 'fra', - 'hu': 'hun', - 'it': 'ita', - 'ja': 'jpn', - 'ko': 'kor', - 'nl': 'nld', - 'pl': 'plk', - 'pt-br': 'ptb', - 'pt': 'ptg', - 'ru': 'rus', - 'sv-se': 'sve', - 'tr': 'trk' -}; -function sortLanguages(directoryNames) { - return directoryNames.map(function (dirName) { - var lower = dirName.toLowerCase(); - return { - name: lower, - iso639_2: iso639_3_to_2[lower] - }; - }).sort(function (a, b) { - if (!a.iso639_2 && !b.iso639_2) { - return 0; - } - if (!a.iso639_2) { - return -1; - } - if (!b.iso639_2) { - return 1; - } - return a.iso639_2 < b.iso639_2 ? -1 : (a.iso639_2 > b.iso639_2 ? 1 : 0); - }); -} -function stripComments(content) { - /** - * First capturing group matches double quoted string - * Second matches single quotes string - * Third matches block comments - * Fourth matches line comments - */ - var regexp = /("(?:[^\\\"]*(?:\\.)?)*")|('(?:[^\\\']*(?:\\.)?)*')|(\/\*(?:\r?\n|.)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g; - var result = content.replace(regexp, function (match, m1, m2, m3, m4) { - // Only one of m1, m2, m3, m4 matches - if (m3) { - // A block comment. Replace with nothing - return ''; - } - else if (m4) { - // A line comment. If it ends in \r?\n then keep it. - var length_1 = m4.length; - if (length_1 > 2 && m4[length_1 - 1] === '\n') { - return m4[length_1 - 2] === '\r' ? '\r\n' : '\n'; - } - else { - return ''; - } - } - else { - // We match a string - return match; - } - }); - return result; -} -function escapeCharacters(value) { - var result = []; - for (var i = 0; i < value.length; i++) { - var ch = value.charAt(i); - switch (ch) { - case '\'': - result.push('\\\''); - break; - case '"': - result.push('\\"'); - break; - case '\\': - result.push('\\\\'); - break; - case '\n': - result.push('\\n'); - break; - case '\r': - result.push('\\r'); - break; - case '\t': - result.push('\\t'); - break; - case '\b': - result.push('\\b'); - break; - case '\f': - result.push('\\f'); - break; - default: - result.push(ch); - } - } - return result.join(''); -} -function processCoreBundleFormat(fileHeader, languages, json, emitter) { - var keysSection = json.keys; - var messageSection = json.messages; - var bundleSection = json.bundles; - var statistics = Object.create(null); - var total = 0; - var defaultMessages = Object.create(null); - var modules = Object.keys(keysSection); - modules.forEach(function (module) { - var keys = keysSection[module]; - var messages = messageSection[module]; - if (!messages || keys.length !== messages.length) { - emitter.emit('error', "Message for module " + module + " corrupted. Mismatch in number of keys and messages."); - return; - } - var messageMap = Object.create(null); - defaultMessages[module] = messageMap; - keys.map(function (key, i) { - total++; - if (Is.string(key)) { - messageMap[key] = messages[i]; - } - else { - messageMap[key.key] = messages[i]; - } - }); - }); - var languageDirectory = path.join(__dirname, '..', '..', 'i18n'); - var languageDirs; - if (languages) { - languageDirs = sortLanguages(languages); - } - else { - languageDirs = sortLanguages(fs.readdirSync(languageDirectory).filter(function (item) { return fs.statSync(path.join(languageDirectory, item)).isDirectory(); })); - } - languageDirs.forEach(function (language) { - if (!language.iso639_2) { - return; - } - if (process.env['VSCODE_BUILD_VERBOSE']) { - log("Generating nls bundles for: " + language.iso639_2); - } - statistics[language.iso639_2] = 0; - var localizedModules = Object.create(null); - var cwd = path.join(languageDirectory, language.name, 'src'); - modules.forEach(function (module) { - var order = keysSection[module]; - var i18nFile = path.join(cwd, module) + '.i18n.json'; - var messages = null; - if (fs.existsSync(i18nFile)) { - var content = stripComments(fs.readFileSync(i18nFile, 'utf8')); - messages = JSON.parse(content); - } - else { - if (process.env['VSCODE_BUILD_VERBOSE']) { - log("No localized messages found for module " + module + ". Using default messages."); - } - messages = defaultMessages[module]; - statistics[language.iso639_2] = statistics[language.iso639_2] + Object.keys(messages).length; - } - var localizedMessages = []; - order.forEach(function (keyInfo) { - var key = null; - if (Is.string(keyInfo)) { - key = keyInfo; - } - else { - key = keyInfo.key; - } - var message = messages[key]; - if (!message) { - if (process.env['VSCODE_BUILD_VERBOSE']) { - log("No localized message found for key " + key + " in module " + module + ". Using default message."); - } - message = defaultMessages[module][key]; - statistics[language.iso639_2] = statistics[language.iso639_2] + 1; - } - localizedMessages.push(message); - }); - localizedModules[module] = localizedMessages; - }); - Object.keys(bundleSection).forEach(function (bundle) { - var modules = bundleSection[bundle]; - var contents = [ - fileHeader, - "define(\"" + bundle + ".nls." + language.iso639_2 + "\", {" - ]; - modules.forEach(function (module, index) { - contents.push("\t\"" + module + "\": ["); - var messages = localizedModules[module]; - if (!messages) { - emitter.emit('error', "Didn't find messages for module " + module + "."); - return; - } - messages.forEach(function (message, index) { - contents.push("\t\t\"" + escapeCharacters(message) + (index < messages.length ? '",' : '"')); - }); - contents.push(index < modules.length - 1 ? '\t],' : '\t]'); - }); - contents.push('});'); - emitter.emit('data', new File({ path: bundle + '.nls.' + language.iso639_2 + '.js', contents: new Buffer(contents.join('\n'), 'utf-8') })); - }); - }); - Object.keys(statistics).forEach(function (key) { - var value = statistics[key]; - log(key + " has " + value + " untranslated strings."); - }); - languageDirs.forEach(function (dir) { - var language = dir.name; - var iso639_2 = iso639_3_to_2[language]; - if (!iso639_2) { - log("\tCouldn't find iso639 2 mapping for language " + language + ". Using default language instead."); - } - else { - var stats = statistics[iso639_2]; - if (Is.undef(stats)) { - log("\tNo translations found for language " + language + ". Using default language instead."); - } - } - }); -} -function processNlsFiles(opts) { - return event_stream_1.through(function (file) { - var fileName = path.basename(file.path); - if (fileName === 'nls.metadata.json') { - var json = null; - if (file.isBuffer()) { - json = JSON.parse(file.contents.toString('utf8')); - } - else { - this.emit('error', "Failed to read component file: " + file.relative); - } - if (BundledFormat.is(json)) { - processCoreBundleFormat(opts.fileHeader, opts.languages, json, this); - } - } - this.emit('data', file); - }); -} -exports.processNlsFiles = processNlsFiles; -function prepareXlfFiles(projectName, extensionName) { - return event_stream_1.through(function (file) { - if (!file.isBuffer()) { - throw new Error("Failed to read component file: " + file.relative); - } - var extension = path.extname(file.path); - if (extension === '.json') { - var json = JSON.parse(file.contents.toString('utf8')); - if (BundledFormat.is(json)) { - importBundleJson(file, json, this); - } - else if (PackageJsonFormat.is(json) || ModuleJsonFormat.is(json)) { - importModuleOrPackageJson(file, json, projectName, this, extensionName); - } - else { - throw new Error("JSON format cannot be deduced for " + file.relative + "."); - } - } - else if (extension === '.isl') { - importIsl(file, this); - } - }); -} -exports.prepareXlfFiles = prepareXlfFiles; -var editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench', extensionsProject = 'vscode-extensions', setupProject = 'vscode-setup'; -function getResource(sourceFile) { - var resource; - if (/^vs\/platform/.test(sourceFile)) { - return { name: 'vs/platform', project: editorProject }; - } - else if (/^vs\/editor\/contrib/.test(sourceFile)) { - return { name: 'vs/editor/contrib', project: editorProject }; - } - else if (/^vs\/editor/.test(sourceFile)) { - return { name: 'vs/editor', project: editorProject }; - } - else if (/^vs\/base/.test(sourceFile)) { - return { name: 'vs/base', project: editorProject }; - } - else if (/^vs\/code/.test(sourceFile)) { - return { name: 'vs/code', project: workbenchProject }; - } - else if (/^vs\/workbench\/parts/.test(sourceFile)) { - resource = sourceFile.split('/', 4).join('/'); - return { name: resource, project: workbenchProject }; - } - else if (/^vs\/workbench\/services/.test(sourceFile)) { - resource = sourceFile.split('/', 4).join('/'); - return { name: resource, project: workbenchProject }; - } - else if (/^vs\/workbench/.test(sourceFile)) { - return { name: 'vs/workbench', project: workbenchProject }; - } - throw new Error("Could not identify the XLF bundle for " + sourceFile); -} -exports.getResource = getResource; -function importBundleJson(file, json, stream) { - var bundleXlfs = Object.create(null); - for (var source in json.keys) { - var projectResource = getResource(source); - var resource = projectResource.name; - var project = projectResource.project; - var keys = json.keys[source]; - var messages = json.messages[source]; - if (keys.length !== messages.length) { - throw new Error("There is a mismatch between keys and messages in " + file.relative); - } - var xlf = bundleXlfs[resource] ? bundleXlfs[resource] : bundleXlfs[resource] = new XLF(project); - xlf.addFile('src/' + source, keys, messages); - } - for (var resource in bundleXlfs) { - var newFilePath = bundleXlfs[resource].project + "/" + resource.replace(/\//g, '_') + ".xlf"; - var xlfFile = new File({ path: newFilePath, contents: new Buffer(bundleXlfs[resource].toString(), 'utf-8') }); - stream.emit('data', xlfFile); - } -} -// Keeps existing XLF instances and a state of how many files were already processed for faster file emission -var extensions = Object.create(null); -function importModuleOrPackageJson(file, json, projectName, stream, extensionName) { - if (ModuleJsonFormat.is(json) && json['keys'].length !== json['messages'].length) { - throw new Error("There is a mismatch between keys and messages in " + file.relative); - } - // Prepare the source path for attribute in XLF & extract messages from JSON - var formattedSourcePath = file.relative.replace(/\\/g, '/'); - var messages = Object.keys(json).map(function (key) { return json[key].toString(); }); - // Stores the amount of localization files to be transformed to XLF before the emission - var localizationFilesCount, originalFilePath; - // If preparing XLF for external extension, then use different glob pattern and source path - if (extensionName) { - localizationFilesCount = glob.sync('**/*.nls.json').length; - originalFilePath = "" + formattedSourcePath.substr(0, formattedSourcePath.length - '.nls.json'.length); - } - else { - // Used for vscode/extensions folder - extensionName = formattedSourcePath.split('/')[0]; - localizationFilesCount = glob.sync("./extensions/" + extensionName + "/**/*.nls.json").length; - originalFilePath = "extensions/" + formattedSourcePath.substr(0, formattedSourcePath.length - '.nls.json'.length); - } - var extension = extensions[extensionName] ? - extensions[extensionName] : extensions[extensionName] = { xlf: new XLF(projectName), processed: 0 }; - if (ModuleJsonFormat.is(json)) { - extension.xlf.addFile(originalFilePath, json['keys'], json['messages']); - } - else { - extension.xlf.addFile(originalFilePath, Object.keys(json), messages); - } - // Check if XLF is populated with file nodes to emit it - if (++extensions[extensionName].processed === localizationFilesCount) { - var newFilePath = path.join(projectName, extensionName + '.xlf'); - var xlfFile = new File({ path: newFilePath, contents: new Buffer(extension.xlf.toString(), 'utf-8') }); - stream.emit('data', xlfFile); - } -} -function importIsl(file, stream) { - var projectName, resourceFile; - if (path.basename(file.path) === 'Default.isl') { - projectName = setupProject; - resourceFile = 'setup_default.xlf'; - } - else { - projectName = workbenchProject; - resourceFile = 'setup_messages.xlf'; - } - var xlf = new XLF(projectName), keys = [], messages = []; - var model = new TextModel(file.contents.toString()); - var inMessageSection = false; - model.lines.forEach(function (line) { - if (line.length === 0) { - return; - } - var firstChar = line.charAt(0); - switch (firstChar) { - case ';': - // Comment line; - return; - case '[': - inMessageSection = '[Messages]' === line || '[CustomMessages]' === line; - return; - } - if (!inMessageSection) { - return; - } - var sections = line.split('='); - if (sections.length !== 2) { - throw new Error("Badly formatted message found: " + line); - } - else { - var key = sections[0]; - var value = sections[1]; - if (key.length > 0 && value.length > 0) { - keys.push(key); - messages.push(value); - } - } - }); - var originalPath = file.path.substring(file.cwd.length + 1, file.path.split('.')[0].length).replace(/\\/g, '/'); - xlf.addFile(originalPath, keys, messages); - // Emit only upon all ISL files combined into single XLF instance - var newFilePath = path.join(projectName, resourceFile); - var xlfFile = new File({ path: newFilePath, contents: new Buffer(xlf.toString(), 'utf-8') }); - stream.emit('data', xlfFile); -} -function pushXlfFiles(apiHostname, username, password) { - var tryGetPromises = []; - var updateCreatePromises = []; - return event_stream_1.through(function (file) { - var project = path.dirname(file.relative); - var fileName = path.basename(file.path); - var slug = fileName.substr(0, fileName.length - '.xlf'.length); - var credentials = username + ":" + password; - // Check if resource already exists, if not, then create it. - var promise = tryGetResource(project, slug, apiHostname, credentials); - tryGetPromises.push(promise); - promise.then(function (exists) { - if (exists) { - promise = updateResource(project, slug, file, apiHostname, credentials); - } - else { - promise = createResource(project, slug, file, apiHostname, credentials); - } - updateCreatePromises.push(promise); - }); - }, function () { - var _this = this; - // End the pipe only after all the communication with Transifex API happened - Promise.all(tryGetPromises).then(function () { - Promise.all(updateCreatePromises).then(function () { - _this.emit('end'); - }).catch(function (reason) { throw new Error(reason); }); - }).catch(function (reason) { throw new Error(reason); }); - }); -} -exports.pushXlfFiles = pushXlfFiles; -function tryGetResource(project, slug, apiHostname, credentials) { - return new Promise(function (resolve, reject) { - var options = { - hostname: apiHostname, - path: "/api/2/project/" + project + "/resource/" + slug + "/?details", - auth: credentials, - method: 'GET' - }; - var request = http.request(options, function (response) { - if (response.statusCode === 404) { - resolve(false); - } - else if (response.statusCode === 200) { - resolve(true); - } - else { - reject("Failed to query resource " + project + "/" + slug + ". Response: " + response.statusCode + " " + response.statusMessage); - } - }); - request.on('error', function (err) { - reject("Failed to get " + project + "/" + slug + " on Transifex: " + err); - }); - request.end(); - }); -} -function createResource(project, slug, xlfFile, apiHostname, credentials) { - return new Promise(function (resolve, reject) { - var data = JSON.stringify({ - 'content': xlfFile.contents.toString(), - 'name': slug, - 'slug': slug, - 'i18n_type': 'XLIFF' - }); - var options = { - hostname: apiHostname, - path: "/api/2/project/" + project + "/resources", - headers: { - 'Content-Type': 'application/json', - 'Content-Length': Buffer.byteLength(data) - }, - auth: credentials, - method: 'POST' - }; - var request = http.request(options, function (res) { - if (res.statusCode === 201) { - log("Resource " + project + "/" + slug + " successfully created on Transifex."); - } - else { - reject("Something went wrong in the request creating " + slug + " in " + project + ". " + res.statusCode); - } - }); - request.on('error', function (err) { - reject("Failed to create " + project + "/" + slug + " on Transifex: " + err); - }); - request.write(data); - request.end(); - }); -} -/** - * The following link provides information about how Transifex handles updates of a resource file: - * https://dev.befoolish.co/tx-docs/public/projects/updating-content#what-happens-when-you-update-files - */ -function updateResource(project, slug, xlfFile, apiHostname, credentials) { - return new Promise(function (resolve, reject) { - var data = JSON.stringify({ content: xlfFile.contents.toString() }); - var options = { - hostname: apiHostname, - path: "/api/2/project/" + project + "/resource/" + slug + "/content", - headers: { - 'Content-Type': 'application/json', - 'Content-Length': Buffer.byteLength(data) - }, - auth: credentials, - method: 'PUT' - }; - var request = http.request(options, function (res) { - if (res.statusCode === 200) { - res.setEncoding('utf8'); - var responseBuffer_1 = ''; - res.on('data', function (chunk) { - responseBuffer_1 += chunk; - }); - res.on('end', function () { - var response = JSON.parse(responseBuffer_1); - log("Resource " + project + "/" + slug + " successfully updated on Transifex. Strings added: " + response.strings_added + ", updated: " + response.strings_added + ", deleted: " + response.strings_added); - resolve(); - }); - } - else { - reject("Something went wrong in the request updating " + slug + " in " + project + ". " + res.statusCode); - } - }); - request.on('error', function (err) { - reject("Failed to update " + project + "/" + slug + " on Transifex: " + err); - }); - request.write(data); - request.end(); - }); -} -function obtainProjectResources(projectName) { - var resources = []; - if (projectName === editorProject) { - var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); - resources = JSON.parse(json).editor; - } - else if (projectName === workbenchProject) { - var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); - resources = JSON.parse(json).workbench; - } - else if (projectName === extensionsProject) { - var extensionsToLocalize = glob.sync('./extensions/**/*.nls.json').map(function (extension) { return extension.split('/')[2]; }); - var resourcesToPull_1 = []; - extensionsToLocalize.forEach(function (extension) { - if (resourcesToPull_1.indexOf(extension) === -1) { - resourcesToPull_1.push(extension); - resources.push({ name: extension, project: projectName }); - } - }); - } - else if (projectName === setupProject) { - resources.push({ name: 'setup_default', project: setupProject }); - } - return resources; -} -function pullXlfFiles(projectName, apiHostname, username, password, languages, resources) { - if (!resources) { - resources = obtainProjectResources(projectName); - } - if (!resources) { - throw new Error('Transifex projects and resources must be defined to be able to pull translations from Transifex.'); - } - var credentials = username + ":" + password; - var expectedTranslationsCount = languages.length * resources.length; - var translationsRetrieved = 0, called = false; - return event_stream_1.readable(function (count, callback) { - // Mark end of stream when all resources were retrieved - if (translationsRetrieved === expectedTranslationsCount) { - return this.emit('end'); - } - if (!called) { - called = true; - var stream_1 = this; - // Retrieve XLF files from main projects - languages.map(function (language) { - resources.map(function (resource) { - retrieveResource(language, resource, apiHostname, credentials).then(function (file) { - stream_1.emit('data', file); - translationsRetrieved++; - }).catch(function (error) { throw new Error(error); }); - }); - }); - } - callback(); - }); -} -exports.pullXlfFiles = pullXlfFiles; -function retrieveResource(language, resource, apiHostname, credentials) { - return new Promise(function (resolve, reject) { - var slug = resource.name.replace(/\//g, '_'); - var project = resource.project; - var iso639 = language.toLowerCase(); - var options = { - hostname: apiHostname, - path: "/api/2/project/" + project + "/resource/" + slug + "/translation/" + iso639 + "?file&mode=onlyreviewed", - auth: credentials, - method: 'GET' - }; - var request = http.request(options, function (res) { - var xlfBuffer = []; - res.on('data', function (chunk) { return xlfBuffer.push(chunk); }); - res.on('end', function () { - if (res.statusCode === 200) { - resolve(new File({ contents: Buffer.concat(xlfBuffer), path: project + "/" + iso639_2_to_3[language] + "/" + slug + ".xlf" })); - } - reject(slug + " in " + project + " returned no data. Response code: " + res.statusCode + "."); - }); - }); - request.on('error', function (err) { - reject("Failed to query resource " + slug + " with the following error: " + err); - }); - request.end(); - }); -} -function prepareJsonFiles() { - var parsePromises = []; - return event_stream_1.through(function (xlf) { - var stream = this; - var parsePromise = XLF.parse(xlf.contents.toString()); - parsePromises.push(parsePromise); - parsePromise.then(function (resolvedFiles) { - resolvedFiles.forEach(function (file) { - var messages = file.messages, translatedFile; - // ISL file path always starts with 'build/' - if (/^build\//.test(file.originalFilePath)) { - var defaultLanguages = { 'zh-hans': true, 'zh-hant': true, 'ko': true }; - if (path.basename(file.originalFilePath) === 'Default' && !defaultLanguages[file.language]) { - return; - } - translatedFile = createIslFile('..', file.originalFilePath, messages, iso639_2_to_3[file.language]); - } - else { - translatedFile = createI18nFile(iso639_2_to_3[file.language], file.originalFilePath, messages); - } - stream.emit('data', translatedFile); - }); - }, function (rejectReason) { - throw new Error("XLF parsing error: " + rejectReason); - }); - }, function () { - var _this = this; - Promise.all(parsePromises) - .then(function () { _this.emit('end'); }) - .catch(function (reason) { throw new Error(reason); }); - }); -} -exports.prepareJsonFiles = prepareJsonFiles; -function createI18nFile(base, originalFilePath, messages) { - var content = [ - '/*---------------------------------------------------------------------------------------------', - ' * Copyright (c) Microsoft Corporation. All rights reserved.', - ' * Licensed under the MIT License. See License.txt in the project root for license information.', - ' *--------------------------------------------------------------------------------------------*/', - '// Do not edit this file. It is machine generated.' - ].join('\n') + '\n' + JSON.stringify(messages, null, '\t').replace(/\r\n/g, '\n'); - return new File({ - path: path.join(base, originalFilePath + '.i18n.json'), - contents: new Buffer(content, 'utf8') - }); -} -var languageNames = { - 'chs': 'Simplified Chinese', - 'cht': 'Traditional Chinese', - 'kor': 'Korean' -}; -var languageIds = { - 'chs': '$0804', - 'cht': '$0404', - 'kor': '$0412' -}; -var encodings = { - 'chs': 'CP936', - 'cht': 'CP950', - 'jpn': 'CP932', - 'kor': 'CP949', - 'deu': 'CP1252', - 'fra': 'CP1252', - 'esn': 'CP1252', - 'rus': 'CP1251', - 'ita': 'CP1252', - 'ptb': 'CP1252' -}; -function createIslFile(base, originalFilePath, messages, language) { - var content = []; - var originalContent; - if (path.basename(originalFilePath) === 'Default') { - originalContent = new TextModel(fs.readFileSync(originalFilePath + '.isl', 'utf8')); - } - else { - originalContent = new TextModel(fs.readFileSync(originalFilePath + '.en.isl', 'utf8')); - } - originalContent.lines.forEach(function (line) { - if (line.length > 0) { - var firstChar = line.charAt(0); - if (firstChar === '[' || firstChar === ';') { - if (line === '; *** Inno Setup version 5.5.3+ English messages ***') { - content.push("; *** Inno Setup version 5.5.3+ " + languageNames[language] + " messages ***"); - } - else { - content.push(line); - } - } - else { - var sections = line.split('='); - var key = sections[0]; - var translated = line; - if (key) { - if (key === 'LanguageName') { - translated = key + "=" + languageNames[language]; - } - else if (key === 'LanguageID') { - translated = key + "=" + languageIds[language]; - } - else if (key === 'LanguageCodePage') { - translated = key + "=" + encodings[language].substr(2); - } - else { - var translatedMessage = messages[key]; - if (translatedMessage) { - translated = key + "=" + translatedMessage; - } - } - } - content.push(translated); - } - } - }); - var tag = iso639_3_to_2[language]; - var basename = path.basename(originalFilePath); - var filePath = path.join(base, path.dirname(originalFilePath), basename) + "." + tag + ".isl"; - return new File({ - path: filePath, - contents: iconv.encode(new Buffer(content.join('\r\n'), 'utf8'), encodings[language]) - }); -} -function encodeEntities(value) { - var result = []; - for (var i = 0; i < value.length; i++) { - var ch = value[i]; - switch (ch) { - case '<': - result.push('<'); - break; - case '>': - result.push('>'); - break; - case '&': - result.push('&'); - break; - default: - result.push(ch); - } - } - return result.join(''); -} -function decodeEntities(value) { - return value.replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&'); -} +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +exports.__esModule = true; +var path = require("path"); +var fs = require("fs"); +var event_stream_1 = require("event-stream"); +var File = require("vinyl"); +var Is = require("is"); +var xml2js = require("xml2js"); +var glob = require("glob"); +var http = require("http"); +var util = require('gulp-util'); +var iconv = require('iconv-lite'); +function log(message) { + var rest = []; + for (var _i = 1; _i < arguments.length; _i++) { + rest[_i - 1] = arguments[_i]; + } + util.log.apply(util, [util.colors.green('[i18n]'), message].concat(rest)); +} +var LocalizeInfo; +(function (LocalizeInfo) { + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.key) && (Is.undef(candidate.comment) || (Is.array(candidate.comment) && candidate.comment.every(function (element) { return Is.string(element); }))); + } + LocalizeInfo.is = is; +})(LocalizeInfo || (LocalizeInfo = {})); +var BundledFormat; +(function (BundledFormat) { + function is(value) { + if (Is.undef(value)) { + return false; + } + var candidate = value; + var length = Object.keys(value).length; + return length === 3 && Is.defined(candidate.keys) && Is.defined(candidate.messages) && Is.defined(candidate.bundles); + } + BundledFormat.is = is; +})(BundledFormat || (BundledFormat = {})); +var PackageJsonFormat; +(function (PackageJsonFormat) { + function is(value) { + if (Is.undef(value) || !Is.object(value)) { + return false; + } + return Object.keys(value).every(function (key) { + var element = value[key]; + return Is.string(element) || (Is.object(element) && Is.defined(element.message) && Is.defined(element.comment)); + }); + } + PackageJsonFormat.is = is; +})(PackageJsonFormat || (PackageJsonFormat = {})); +var ModuleJsonFormat; +(function (ModuleJsonFormat) { + function is(value) { + var candidate = value; + return Is.defined(candidate) + && Is.array(candidate.messages) && candidate.messages.every(function (message) { return Is.string(message); }) + && Is.array(candidate.keys) && candidate.keys.every(function (key) { return Is.string(key) || LocalizeInfo.is(key); }); + } + ModuleJsonFormat.is = is; +})(ModuleJsonFormat || (ModuleJsonFormat = {})); +var Line = (function () { + function Line(indent) { + if (indent === void 0) { indent = 0; } + this.indent = indent; + this.buffer = []; + if (indent > 0) { + this.buffer.push(new Array(indent + 1).join(' ')); + } + } + Line.prototype.append = function (value) { + this.buffer.push(value); + return this; + }; + Line.prototype.toString = function () { + return this.buffer.join(''); + }; + return Line; +}()); +exports.Line = Line; +var TextModel = (function () { + function TextModel(contents) { + this._lines = contents.split(/\r\n|\r|\n/); + } + Object.defineProperty(TextModel.prototype, "lines", { + get: function () { + return this._lines; + }, + enumerable: true, + configurable: true + }); + return TextModel; +}()); +var XLF = (function () { + function XLF(project) { + this.project = project; + this.buffer = []; + this.files = Object.create(null); + } + XLF.prototype.toString = function () { + this.appendHeader(); + for (var file in this.files) { + this.appendNewLine("", 2); + for (var _i = 0, _a = this.files[file]; _i < _a.length; _i++) { + var item = _a[_i]; + this.addStringItem(item); + } + this.appendNewLine('', 2); + } + this.appendFooter(); + return this.buffer.join('\r\n'); + }; + XLF.prototype.addFile = function (original, keys, messages) { + this.files[original] = []; + var existingKeys = []; + for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { + var key = keys_1[_i]; + // Ignore duplicate keys because Transifex does not populate those with translated values. + if (existingKeys.indexOf(key) !== -1) { + continue; + } + existingKeys.push(key); + var message = encodeEntities(messages[keys.indexOf(key)]); + var comment = undefined; + // Check if the message contains description (if so, it becomes an object type in JSON) + if (Is.string(key)) { + this.files[original].push({ id: key, message: message, comment: comment }); + } + else { + if (key['comment'] && key['comment'].length > 0) { + comment = key['comment'].map(function (comment) { return encodeEntities(comment); }).join('\r\n'); + } + this.files[original].push({ id: key['key'], message: message, comment: comment }); + } + } + }; + XLF.prototype.addStringItem = function (item) { + if (!item.id || !item.message) { + throw new Error('No item ID or value specified.'); + } + this.appendNewLine("", 4); + this.appendNewLine("" + item.message + "", 6); + if (item.comment) { + this.appendNewLine("" + item.comment + "", 6); + } + this.appendNewLine('', 4); + }; + XLF.prototype.appendHeader = function () { + this.appendNewLine('', 0); + this.appendNewLine('', 0); + }; + XLF.prototype.appendFooter = function () { + this.appendNewLine('', 0); + }; + XLF.prototype.appendNewLine = function (content, indent) { + var line = new Line(indent); + line.append(content); + this.buffer.push(line.toString()); + }; + return XLF; +}()); +XLF.parse = function (xlfString) { + return new Promise(function (resolve, reject) { + var parser = new xml2js.Parser(); + var files = []; + parser.parseString(xlfString, function (err, result) { + if (err) { + reject("Failed to parse XLIFF string. " + err); + } + var fileNodes = result['xliff']['file']; + if (!fileNodes) { + reject('XLIFF file does not contain "xliff" or "file" node(s) required for parsing.'); + } + fileNodes.forEach(function (file) { + var originalFilePath = file.$.original; + if (!originalFilePath) { + reject('XLIFF file node does not contain original attribute to determine the original location of the resource file.'); + } + var language = file.$['target-language'].toLowerCase(); + if (!language) { + reject('XLIFF file node does not contain target-language attribute to determine translated language.'); + } + var messages = {}; + var transUnits = file.body[0]['trans-unit']; + transUnits.forEach(function (unit) { + var key = unit.$.id; + if (!unit.target) { + return; // No translation available + } + var val = unit.target.toString(); + if (key && val) { + messages[key] = decodeEntities(val); + } + else { + reject('XLIFF file does not contain full localization data. ID or target translation for one of the trans-unit nodes is not present.'); + } + }); + files.push({ messages: messages, originalFilePath: originalFilePath, language: language }); + }); + resolve(files); + }); + }); +}; +exports.XLF = XLF; +var iso639_3_to_2 = { + 'chs': 'zh-cn', + 'cht': 'zh-tw', + 'csy': 'cs-cz', + 'deu': 'de', + 'enu': 'en', + 'esn': 'es', + 'fra': 'fr', + 'hun': 'hu', + 'ita': 'it', + 'jpn': 'ja', + 'kor': 'ko', + 'nld': 'nl', + 'plk': 'pl', + 'ptb': 'pt-br', + 'ptg': 'pt', + 'rus': 'ru', + 'sve': 'sv-se', + 'trk': 'tr' +}; +/** + * Used to map Transifex to VS Code language code representation. + */ +var iso639_2_to_3 = { + 'zh-hans': 'chs', + 'zh-hant': 'cht', + 'cs-cz': 'csy', + 'de': 'deu', + 'en': 'enu', + 'es': 'esn', + 'fr': 'fra', + 'hu': 'hun', + 'it': 'ita', + 'ja': 'jpn', + 'ko': 'kor', + 'nl': 'nld', + 'pl': 'plk', + 'pt-br': 'ptb', + 'pt': 'ptg', + 'ru': 'rus', + 'sv-se': 'sve', + 'tr': 'trk' +}; +function sortLanguages(directoryNames) { + return directoryNames.map(function (dirName) { + var lower = dirName.toLowerCase(); + return { + name: lower, + iso639_2: iso639_3_to_2[lower] + }; + }).sort(function (a, b) { + if (!a.iso639_2 && !b.iso639_2) { + return 0; + } + if (!a.iso639_2) { + return -1; + } + if (!b.iso639_2) { + return 1; + } + return a.iso639_2 < b.iso639_2 ? -1 : (a.iso639_2 > b.iso639_2 ? 1 : 0); + }); +} +function stripComments(content) { + /** + * First capturing group matches double quoted string + * Second matches single quotes string + * Third matches block comments + * Fourth matches line comments + */ + var regexp = /("(?:[^\\\"]*(?:\\.)?)*")|('(?:[^\\\']*(?:\\.)?)*')|(\/\*(?:\r?\n|.)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g; + var result = content.replace(regexp, function (match, m1, m2, m3, m4) { + // Only one of m1, m2, m3, m4 matches + if (m3) { + // A block comment. Replace with nothing + return ''; + } + else if (m4) { + // A line comment. If it ends in \r?\n then keep it. + var length_1 = m4.length; + if (length_1 > 2 && m4[length_1 - 1] === '\n') { + return m4[length_1 - 2] === '\r' ? '\r\n' : '\n'; + } + else { + return ''; + } + } + else { + // We match a string + return match; + } + }); + return result; +} +function escapeCharacters(value) { + var result = []; + for (var i = 0; i < value.length; i++) { + var ch = value.charAt(i); + switch (ch) { + case '\'': + result.push('\\\''); + break; + case '"': + result.push('\\"'); + break; + case '\\': + result.push('\\\\'); + break; + case '\n': + result.push('\\n'); + break; + case '\r': + result.push('\\r'); + break; + case '\t': + result.push('\\t'); + break; + case '\b': + result.push('\\b'); + break; + case '\f': + result.push('\\f'); + break; + default: + result.push(ch); + } + } + return result.join(''); +} +function processCoreBundleFormat(fileHeader, languages, json, emitter) { + var keysSection = json.keys; + var messageSection = json.messages; + var bundleSection = json.bundles; + var statistics = Object.create(null); + var total = 0; + var defaultMessages = Object.create(null); + var modules = Object.keys(keysSection); + modules.forEach(function (module) { + var keys = keysSection[module]; + var messages = messageSection[module]; + if (!messages || keys.length !== messages.length) { + emitter.emit('error', "Message for module " + module + " corrupted. Mismatch in number of keys and messages."); + return; + } + var messageMap = Object.create(null); + defaultMessages[module] = messageMap; + keys.map(function (key, i) { + total++; + if (Is.string(key)) { + messageMap[key] = messages[i]; + } + else { + messageMap[key.key] = messages[i]; + } + }); + }); + var languageDirectory = path.join(__dirname, '..', '..', 'i18n'); + var languageDirs; + if (languages) { + languageDirs = sortLanguages(languages); + } + else { + languageDirs = sortLanguages(fs.readdirSync(languageDirectory).filter(function (item) { return fs.statSync(path.join(languageDirectory, item)).isDirectory(); })); + } + languageDirs.forEach(function (language) { + if (!language.iso639_2) { + return; + } + if (process.env['VSCODE_BUILD_VERBOSE']) { + log("Generating nls bundles for: " + language.iso639_2); + } + statistics[language.iso639_2] = 0; + var localizedModules = Object.create(null); + var cwd = path.join(languageDirectory, language.name, 'src'); + modules.forEach(function (module) { + var order = keysSection[module]; + var i18nFile = path.join(cwd, module) + '.i18n.json'; + var messages = null; + if (fs.existsSync(i18nFile)) { + var content = stripComments(fs.readFileSync(i18nFile, 'utf8')); + messages = JSON.parse(content); + } + else { + if (process.env['VSCODE_BUILD_VERBOSE']) { + log("No localized messages found for module " + module + ". Using default messages."); + } + messages = defaultMessages[module]; + statistics[language.iso639_2] = statistics[language.iso639_2] + Object.keys(messages).length; + } + var localizedMessages = []; + order.forEach(function (keyInfo) { + var key = null; + if (Is.string(keyInfo)) { + key = keyInfo; + } + else { + key = keyInfo.key; + } + var message = messages[key]; + if (!message) { + if (process.env['VSCODE_BUILD_VERBOSE']) { + log("No localized message found for key " + key + " in module " + module + ". Using default message."); + } + message = defaultMessages[module][key]; + statistics[language.iso639_2] = statistics[language.iso639_2] + 1; + } + localizedMessages.push(message); + }); + localizedModules[module] = localizedMessages; + }); + Object.keys(bundleSection).forEach(function (bundle) { + var modules = bundleSection[bundle]; + var contents = [ + fileHeader, + "define(\"" + bundle + ".nls." + language.iso639_2 + "\", {" + ]; + modules.forEach(function (module, index) { + contents.push("\t\"" + module + "\": ["); + var messages = localizedModules[module]; + if (!messages) { + emitter.emit('error', "Didn't find messages for module " + module + "."); + return; + } + messages.forEach(function (message, index) { + contents.push("\t\t\"" + escapeCharacters(message) + (index < messages.length ? '",' : '"')); + }); + contents.push(index < modules.length - 1 ? '\t],' : '\t]'); + }); + contents.push('});'); + emitter.emit('data', new File({ path: bundle + '.nls.' + language.iso639_2 + '.js', contents: new Buffer(contents.join('\n'), 'utf-8') })); + }); + }); + Object.keys(statistics).forEach(function (key) { + var value = statistics[key]; + log(key + " has " + value + " untranslated strings."); + }); + languageDirs.forEach(function (dir) { + var language = dir.name; + var iso639_2 = iso639_3_to_2[language]; + if (!iso639_2) { + log("\tCouldn't find iso639 2 mapping for language " + language + ". Using default language instead."); + } + else { + var stats = statistics[iso639_2]; + if (Is.undef(stats)) { + log("\tNo translations found for language " + language + ". Using default language instead."); + } + } + }); +} +function processNlsFiles(opts) { + return event_stream_1.through(function (file) { + var fileName = path.basename(file.path); + if (fileName === 'nls.metadata.json') { + var json = null; + if (file.isBuffer()) { + json = JSON.parse(file.contents.toString('utf8')); + } + else { + this.emit('error', "Failed to read component file: " + file.relative); + } + if (BundledFormat.is(json)) { + processCoreBundleFormat(opts.fileHeader, opts.languages, json, this); + } + } + this.emit('data', file); + }); +} +exports.processNlsFiles = processNlsFiles; +function prepareXlfFiles(projectName, extensionName) { + return event_stream_1.through(function (file) { + if (!file.isBuffer()) { + throw new Error("Failed to read component file: " + file.relative); + } + var extension = path.extname(file.path); + if (extension === '.json') { + var json = JSON.parse(file.contents.toString('utf8')); + if (BundledFormat.is(json)) { + importBundleJson(file, json, this); + } + else if (PackageJsonFormat.is(json) || ModuleJsonFormat.is(json)) { + importModuleOrPackageJson(file, json, projectName, this, extensionName); + } + else { + throw new Error("JSON format cannot be deduced for " + file.relative + "."); + } + } + else if (extension === '.isl') { + importIsl(file, this); + } + }); +} +exports.prepareXlfFiles = prepareXlfFiles; +var editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench', extensionsProject = 'vscode-extensions', setupProject = 'vscode-setup'; +function getResource(sourceFile) { + var resource; + if (/^vs\/platform/.test(sourceFile)) { + return { name: 'vs/platform', project: editorProject }; + } + else if (/^vs\/editor\/contrib/.test(sourceFile)) { + return { name: 'vs/editor/contrib', project: editorProject }; + } + else if (/^vs\/editor/.test(sourceFile)) { + return { name: 'vs/editor', project: editorProject }; + } + else if (/^vs\/base/.test(sourceFile)) { + return { name: 'vs/base', project: editorProject }; + } + else if (/^vs\/code/.test(sourceFile)) { + return { name: 'vs/code', project: workbenchProject }; + } + else if (/^vs\/workbench\/parts/.test(sourceFile)) { + resource = sourceFile.split('/', 4).join('/'); + return { name: resource, project: workbenchProject }; + } + else if (/^vs\/workbench\/services/.test(sourceFile)) { + resource = sourceFile.split('/', 4).join('/'); + return { name: resource, project: workbenchProject }; + } + else if (/^vs\/workbench/.test(sourceFile)) { + return { name: 'vs/workbench', project: workbenchProject }; + } + throw new Error("Could not identify the XLF bundle for " + sourceFile); +} +exports.getResource = getResource; +function importBundleJson(file, json, stream) { + var bundleXlfs = Object.create(null); + for (var source in json.keys) { + var projectResource = getResource(source); + var resource = projectResource.name; + var project = projectResource.project; + var keys = json.keys[source]; + var messages = json.messages[source]; + if (keys.length !== messages.length) { + throw new Error("There is a mismatch between keys and messages in " + file.relative); + } + var xlf = bundleXlfs[resource] ? bundleXlfs[resource] : bundleXlfs[resource] = new XLF(project); + xlf.addFile('src/' + source, keys, messages); + } + for (var resource in bundleXlfs) { + var newFilePath = bundleXlfs[resource].project + "/" + resource.replace(/\//g, '_') + ".xlf"; + var xlfFile = new File({ path: newFilePath, contents: new Buffer(bundleXlfs[resource].toString(), 'utf-8') }); + stream.emit('data', xlfFile); + } +} +// Keeps existing XLF instances and a state of how many files were already processed for faster file emission +var extensions = Object.create(null); +function importModuleOrPackageJson(file, json, projectName, stream, extensionName) { + if (ModuleJsonFormat.is(json) && json['keys'].length !== json['messages'].length) { + throw new Error("There is a mismatch between keys and messages in " + file.relative); + } + // Prepare the source path for attribute in XLF & extract messages from JSON + var formattedSourcePath = file.relative.replace(/\\/g, '/'); + var messages = Object.keys(json).map(function (key) { return json[key].toString(); }); + // Stores the amount of localization files to be transformed to XLF before the emission + var localizationFilesCount, originalFilePath; + // If preparing XLF for external extension, then use different glob pattern and source path + if (extensionName) { + localizationFilesCount = glob.sync('**/*.nls.json').length; + originalFilePath = "" + formattedSourcePath.substr(0, formattedSourcePath.length - '.nls.json'.length); + } + else { + // Used for vscode/extensions folder + extensionName = formattedSourcePath.split('/')[0]; + localizationFilesCount = glob.sync("./extensions/" + extensionName + "/**/*.nls.json").length; + originalFilePath = "extensions/" + formattedSourcePath.substr(0, formattedSourcePath.length - '.nls.json'.length); + } + var extension = extensions[extensionName] ? + extensions[extensionName] : extensions[extensionName] = { xlf: new XLF(projectName), processed: 0 }; + if (ModuleJsonFormat.is(json)) { + extension.xlf.addFile(originalFilePath, json['keys'], json['messages']); + } + else { + extension.xlf.addFile(originalFilePath, Object.keys(json), messages); + } + // Check if XLF is populated with file nodes to emit it + if (++extensions[extensionName].processed === localizationFilesCount) { + var newFilePath = path.join(projectName, extensionName + '.xlf'); + var xlfFile = new File({ path: newFilePath, contents: new Buffer(extension.xlf.toString(), 'utf-8') }); + stream.emit('data', xlfFile); + } +} +function importIsl(file, stream) { + var projectName, resourceFile; + if (path.basename(file.path) === 'Default.isl') { + projectName = setupProject; + resourceFile = 'setup_default.xlf'; + } + else { + projectName = workbenchProject; + resourceFile = 'setup_messages.xlf'; + } + var xlf = new XLF(projectName), keys = [], messages = []; + var model = new TextModel(file.contents.toString()); + var inMessageSection = false; + model.lines.forEach(function (line) { + if (line.length === 0) { + return; + } + var firstChar = line.charAt(0); + switch (firstChar) { + case ';': + // Comment line; + return; + case '[': + inMessageSection = '[Messages]' === line || '[CustomMessages]' === line; + return; + } + if (!inMessageSection) { + return; + } + var sections = line.split('='); + if (sections.length !== 2) { + throw new Error("Badly formatted message found: " + line); + } + else { + var key = sections[0]; + var value = sections[1]; + if (key.length > 0 && value.length > 0) { + keys.push(key); + messages.push(value); + } + } + }); + var originalPath = file.path.substring(file.cwd.length + 1, file.path.split('.')[0].length).replace(/\\/g, '/'); + xlf.addFile(originalPath, keys, messages); + // Emit only upon all ISL files combined into single XLF instance + var newFilePath = path.join(projectName, resourceFile); + var xlfFile = new File({ path: newFilePath, contents: new Buffer(xlf.toString(), 'utf-8') }); + stream.emit('data', xlfFile); +} +function pushXlfFiles(apiHostname, username, password) { + var tryGetPromises = []; + var updateCreatePromises = []; + return event_stream_1.through(function (file) { + var project = path.dirname(file.relative); + var fileName = path.basename(file.path); + var slug = fileName.substr(0, fileName.length - '.xlf'.length); + var credentials = username + ":" + password; + // Check if resource already exists, if not, then create it. + var promise = tryGetResource(project, slug, apiHostname, credentials); + tryGetPromises.push(promise); + promise.then(function (exists) { + if (exists) { + promise = updateResource(project, slug, file, apiHostname, credentials); + } + else { + promise = createResource(project, slug, file, apiHostname, credentials); + } + updateCreatePromises.push(promise); + }); + }, function () { + var _this = this; + // End the pipe only after all the communication with Transifex API happened + Promise.all(tryGetPromises).then(function () { + Promise.all(updateCreatePromises).then(function () { + _this.emit('end'); + })["catch"](function (reason) { throw new Error(reason); }); + })["catch"](function (reason) { throw new Error(reason); }); + }); +} +exports.pushXlfFiles = pushXlfFiles; +function tryGetResource(project, slug, apiHostname, credentials) { + return new Promise(function (resolve, reject) { + var options = { + hostname: apiHostname, + path: "/api/2/project/" + project + "/resource/" + slug + "/?details", + auth: credentials, + method: 'GET' + }; + var request = http.request(options, function (response) { + if (response.statusCode === 404) { + resolve(false); + } + else if (response.statusCode === 200) { + resolve(true); + } + else { + reject("Failed to query resource " + project + "/" + slug + ". Response: " + response.statusCode + " " + response.statusMessage); + } + }); + request.on('error', function (err) { + reject("Failed to get " + project + "/" + slug + " on Transifex: " + err); + }); + request.end(); + }); +} +function createResource(project, slug, xlfFile, apiHostname, credentials) { + return new Promise(function (resolve, reject) { + var data = JSON.stringify({ + 'content': xlfFile.contents.toString(), + 'name': slug, + 'slug': slug, + 'i18n_type': 'XLIFF' + }); + var options = { + hostname: apiHostname, + path: "/api/2/project/" + project + "/resources", + headers: { + 'Content-Type': 'application/json', + 'Content-Length': Buffer.byteLength(data) + }, + auth: credentials, + method: 'POST' + }; + var request = http.request(options, function (res) { + if (res.statusCode === 201) { + log("Resource " + project + "/" + slug + " successfully created on Transifex."); + } + else { + reject("Something went wrong in the request creating " + slug + " in " + project + ". " + res.statusCode); + } + }); + request.on('error', function (err) { + reject("Failed to create " + project + "/" + slug + " on Transifex: " + err); + }); + request.write(data); + request.end(); + }); +} +/** + * The following link provides information about how Transifex handles updates of a resource file: + * https://dev.befoolish.co/tx-docs/public/projects/updating-content#what-happens-when-you-update-files + */ +function updateResource(project, slug, xlfFile, apiHostname, credentials) { + return new Promise(function (resolve, reject) { + var data = JSON.stringify({ content: xlfFile.contents.toString() }); + var options = { + hostname: apiHostname, + path: "/api/2/project/" + project + "/resource/" + slug + "/content", + headers: { + 'Content-Type': 'application/json', + 'Content-Length': Buffer.byteLength(data) + }, + auth: credentials, + method: 'PUT' + }; + var request = http.request(options, function (res) { + if (res.statusCode === 200) { + res.setEncoding('utf8'); + var responseBuffer_1 = ''; + res.on('data', function (chunk) { + responseBuffer_1 += chunk; + }); + res.on('end', function () { + var response = JSON.parse(responseBuffer_1); + log("Resource " + project + "/" + slug + " successfully updated on Transifex. Strings added: " + response.strings_added + ", updated: " + response.strings_added + ", deleted: " + response.strings_added); + resolve(); + }); + } + else { + reject("Something went wrong in the request updating " + slug + " in " + project + ". " + res.statusCode); + } + }); + request.on('error', function (err) { + reject("Failed to update " + project + "/" + slug + " on Transifex: " + err); + }); + request.write(data); + request.end(); + }); +} +function obtainProjectResources(projectName) { + var resources = []; + if (projectName === editorProject) { + var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + resources = JSON.parse(json).editor; + } + else if (projectName === workbenchProject) { + var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + resources = JSON.parse(json).workbench; + } + else if (projectName === extensionsProject) { + var extensionsToLocalize = glob.sync('./extensions/**/*.nls.json').map(function (extension) { return extension.split('/')[2]; }); + var resourcesToPull_1 = []; + extensionsToLocalize.forEach(function (extension) { + if (resourcesToPull_1.indexOf(extension) === -1) { + resourcesToPull_1.push(extension); + resources.push({ name: extension, project: projectName }); + } + }); + } + else if (projectName === setupProject) { + resources.push({ name: 'setup_default', project: setupProject }); + } + return resources; +} +function pullXlfFiles(projectName, apiHostname, username, password, languages, resources) { + if (!resources) { + resources = obtainProjectResources(projectName); + } + if (!resources) { + throw new Error('Transifex projects and resources must be defined to be able to pull translations from Transifex.'); + } + var credentials = username + ":" + password; + var expectedTranslationsCount = languages.length * resources.length; + var translationsRetrieved = 0, called = false; + return event_stream_1.readable(function (count, callback) { + // Mark end of stream when all resources were retrieved + if (translationsRetrieved === expectedTranslationsCount) { + return this.emit('end'); + } + if (!called) { + called = true; + var stream_1 = this; + // Retrieve XLF files from main projects + languages.map(function (language) { + resources.map(function (resource) { + retrieveResource(language, resource, apiHostname, credentials).then(function (file) { + stream_1.emit('data', file); + translationsRetrieved++; + })["catch"](function (error) { throw new Error(error); }); + }); + }); + } + callback(); + }); +} +exports.pullXlfFiles = pullXlfFiles; +function retrieveResource(language, resource, apiHostname, credentials) { + return new Promise(function (resolve, reject) { + var slug = resource.name.replace(/\//g, '_'); + var project = resource.project; + var iso639 = language.toLowerCase(); + var options = { + hostname: apiHostname, + path: "/api/2/project/" + project + "/resource/" + slug + "/translation/" + iso639 + "?file&mode=onlyreviewed", + auth: credentials, + method: 'GET' + }; + var request = http.request(options, function (res) { + var xlfBuffer = []; + res.on('data', function (chunk) { return xlfBuffer.push(chunk); }); + res.on('end', function () { + if (res.statusCode === 200) { + resolve(new File({ contents: Buffer.concat(xlfBuffer), path: project + "/" + iso639_2_to_3[language] + "/" + slug + ".xlf" })); + } + reject(slug + " in " + project + " returned no data. Response code: " + res.statusCode + "."); + }); + }); + request.on('error', function (err) { + reject("Failed to query resource " + slug + " with the following error: " + err); + }); + request.end(); + }); +} +function prepareJsonFiles() { + var parsePromises = []; + return event_stream_1.through(function (xlf) { + var stream = this; + var parsePromise = XLF.parse(xlf.contents.toString()); + parsePromises.push(parsePromise); + parsePromise.then(function (resolvedFiles) { + resolvedFiles.forEach(function (file) { + var messages = file.messages, translatedFile; + // ISL file path always starts with 'build/' + if (/^build\//.test(file.originalFilePath)) { + var defaultLanguages = { 'zh-hans': true, 'zh-hant': true, 'ko': true }; + if (path.basename(file.originalFilePath) === 'Default' && !defaultLanguages[file.language]) { + return; + } + translatedFile = createIslFile('..', file.originalFilePath, messages, iso639_2_to_3[file.language]); + } + else { + translatedFile = createI18nFile(iso639_2_to_3[file.language], file.originalFilePath, messages); + } + stream.emit('data', translatedFile); + }); + }, function (rejectReason) { + throw new Error("XLF parsing error: " + rejectReason); + }); + }, function () { + var _this = this; + Promise.all(parsePromises) + .then(function () { _this.emit('end'); })["catch"](function (reason) { throw new Error(reason); }); + }); +} +exports.prepareJsonFiles = prepareJsonFiles; +function createI18nFile(base, originalFilePath, messages) { + var content = [ + '/*---------------------------------------------------------------------------------------------', + ' * Copyright (c) Microsoft Corporation. All rights reserved.', + ' * Licensed under the MIT License. See License.txt in the project root for license information.', + ' *--------------------------------------------------------------------------------------------*/', + '// Do not edit this file. It is machine generated.' + ].join('\n') + '\n' + JSON.stringify(messages, null, '\t').replace(/\r\n/g, '\n'); + return new File({ + path: path.join(base, originalFilePath + '.i18n.json'), + contents: new Buffer(content, 'utf8') + }); +} +var languageNames = { + 'chs': 'Simplified Chinese', + 'cht': 'Traditional Chinese', + 'kor': 'Korean' +}; +var languageIds = { + 'chs': '$0804', + 'cht': '$0404', + 'kor': '$0412' +}; +var encodings = { + 'chs': 'CP936', + 'cht': 'CP950', + 'jpn': 'CP932', + 'kor': 'CP949', + 'deu': 'CP1252', + 'fra': 'CP1252', + 'esn': 'CP1252', + 'rus': 'CP1251', + 'ita': 'CP1252', + 'ptb': 'CP1252', + 'hun': 'CP1250', + 'trk': 'CP1254' +}; +function createIslFile(base, originalFilePath, messages, language) { + var content = []; + var originalContent; + if (path.basename(originalFilePath) === 'Default') { + originalContent = new TextModel(fs.readFileSync(originalFilePath + '.isl', 'utf8')); + } + else { + originalContent = new TextModel(fs.readFileSync(originalFilePath + '.en.isl', 'utf8')); + } + originalContent.lines.forEach(function (line) { + if (line.length > 0) { + var firstChar = line.charAt(0); + if (firstChar === '[' || firstChar === ';') { + if (line === '; *** Inno Setup version 5.5.3+ English messages ***') { + content.push("; *** Inno Setup version 5.5.3+ " + languageNames[language] + " messages ***"); + } + else { + content.push(line); + } + } + else { + var sections = line.split('='); + var key = sections[0]; + var translated = line; + if (key) { + if (key === 'LanguageName') { + translated = key + "=" + languageNames[language]; + } + else if (key === 'LanguageID') { + translated = key + "=" + languageIds[language]; + } + else if (key === 'LanguageCodePage') { + translated = key + "=" + encodings[language].substr(2); + } + else { + var translatedMessage = messages[key]; + if (translatedMessage) { + translated = key + "=" + translatedMessage; + } + } + } + content.push(translated); + } + } + }); + var tag = iso639_3_to_2[language]; + var basename = path.basename(originalFilePath); + var filePath = path.join(base, path.dirname(originalFilePath), basename) + "." + tag + ".isl"; + return new File({ + path: filePath, + contents: iconv.encode(new Buffer(content.join('\r\n'), 'utf8'), encodings[language]) + }); +} +function encodeEntities(value) { + var result = []; + for (var i = 0; i < value.length; i++) { + var ch = value[i]; + switch (ch) { + case '<': + result.push('<'); + break; + case '>': + result.push('>'); + break; + case '&': + result.push('&'); + break; + default: + result.push(ch); + } + } + return result.join(''); +} +function decodeEntities(value) { + return value.replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&'); +} diff --git a/build/lib/i18n.ts b/build/lib/i18n.ts index 815e599116bbc..2d2724a4147ec 100644 --- a/build/lib/i18n.ts +++ b/build/lib/i18n.ts @@ -1032,7 +1032,9 @@ const encodings: Map = { 'esn': 'CP1252', 'rus': 'CP1251', 'ita': 'CP1252', - 'ptb': 'CP1252' + 'ptb': 'CP1252', + 'hun': 'CP1250', + 'trk': 'CP1254' }; function createIslFile(base: string, originalFilePath: string, messages: Map, language: string): File { From 2bdc580183ae60c98daa430ba81e73b2a9132986 Mon Sep 17 00:00:00 2001 From: cleidigh Date: Fri, 9 Jun 2017 12:08:51 -0400 Subject: [PATCH 1688/2747] Tweak label and alias --- .../workbench/parts/debug/electron-browser/repl.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/repl.ts b/src/vs/workbench/parts/debug/electron-browser/repl.ts index 60cc87029cdb2..60e8853fd3f22 100644 --- a/src/vs/workbench/parts/debug/electron-browser/repl.ts +++ b/src/vs/workbench/parts/debug/electron-browser/repl.ts @@ -392,20 +392,14 @@ CommonEditorRegistry.registerEditorCommand(new SuggestCommand({ })); @editorAction -class ReplCopyAllAction extends EditorAction { +export class ReplCopyAllAction extends EditorAction { constructor() { super({ id: 'repl.action.copyall', - label: nls.localize('actions.repl.copyall', "Debug Copy All"), - alias: 'Debug Copy All', + label: nls.localize('actions.repl.copyall', "Debug: Console Copy All"), + alias: 'Debug Console Copy All', precondition: debug.CONTEXT_IN_DEBUG_REPL, - kbOpts: { - kbExpr: null, - primary: null, - weight: 50 - } - }); } From 6697161ea77b6b11f7cca834838b327481e00616 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 9 Jun 2017 18:10:22 +0200 Subject: [PATCH 1689/2747] :lipstick: storage service --- .../platform/storage/common/storageService.ts | 35 ++++++++----------- .../telemetry/common/telemetryUtils.ts | 7 ++-- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/src/vs/platform/storage/common/storageService.ts b/src/vs/platform/storage/common/storageService.ts index d447bd0d18fd7..1fca3d8262b0f 100644 --- a/src/vs/platform/storage/common/storageService.ts +++ b/src/vs/platform/storage/common/storageService.ts @@ -8,7 +8,8 @@ import types = require('vs/base/common/types'); import errors = require('vs/base/common/errors'); import strings = require('vs/base/common/strings'); import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; -import { IWorkspaceContextService, IWorkspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import URI from "vs/base/common/uri"; // Browser localStorage interface export interface IStorage { @@ -25,8 +26,8 @@ export class StorageService implements IStorageService { public _serviceBrand: any; private static COMMON_PREFIX = 'storage://'; - /*private*/ static GLOBAL_PREFIX = StorageService.COMMON_PREFIX + 'global/'; - private static WORKSPACE_PREFIX = StorageService.COMMON_PREFIX + 'workspace/'; + private static GLOBAL_PREFIX = `${StorageService.COMMON_PREFIX}global/`; + private static WORKSPACE_PREFIX = `${StorageService.COMMON_PREFIX}workspace/`; private static WORKSPACE_IDENTIFIER = 'workspaceIdentifier'; private static NO_WORKSPACE_IDENTIFIER = '__$noWorkspace__'; @@ -40,38 +41,33 @@ export class StorageService implements IStorageService { workspaceStorage: IStorage, @IWorkspaceContextService contextService: IWorkspaceContextService ) { - const workspace = contextService.getWorkspace(); - this.globalStorage = globalStorage; this.workspaceStorage = workspaceStorage || globalStorage; // Calculate workspace storage key - this.workspaceKey = this.getWorkspaceKey(workspace); + const workspace = contextService.getWorkspace(); + this.workspaceKey = this.getWorkspaceKey(workspace ? workspace.resource : void 0); // Make sure to delete all workspace storage if the workspace has been recreated meanwhile - const workspaceUniqueId: number = workspace ? workspace.uid : void 0; - if (types.isNumber(workspaceUniqueId)) { - this.cleanupWorkspaceScope(workspaceUniqueId, workspace.name); + if (workspace && types.isNumber(workspace.uid)) { + this.cleanupWorkspaceScope(workspace.uid, workspace.name); } } - private getWorkspaceKey(workspace?: IWorkspace): string { - let workspaceUri: string = null; - if (workspace && workspace.resource) { - workspaceUri = workspace.resource.toString(); + private getWorkspaceKey(workspaceId?: URI): string { + if (!workspaceId) { + return StorageService.NO_WORKSPACE_IDENTIFIER; } - return workspaceUri ? this.calculateWorkspaceKey(workspaceUri) : StorageService.NO_WORKSPACE_IDENTIFIER; - } + const workspaceIdStr = workspaceId.toString(); - private calculateWorkspaceKey(workspaceUrl: string): string { const root = 'file:///'; - const index = workspaceUrl.indexOf(root); + const index = workspaceIdStr.indexOf(root); if (index === 0) { - return strings.rtrim(workspaceUrl.substr(root.length), '/') + '/'; + return `${strings.rtrim(workspaceIdStr.substr(root.length), '/')}/`; } - return workspaceUrl; + return workspaceIdStr; } private cleanupWorkspaceScope(workspaceId: number, workspaceName: string): void { @@ -199,7 +195,6 @@ export class StorageService implements IStorageService { } } -// In-Memory Local Storage Implementation export class InMemoryLocalStorage implements IStorage { private store: { [key: string]: string; }; diff --git a/src/vs/platform/telemetry/common/telemetryUtils.ts b/src/vs/platform/telemetry/common/telemetryUtils.ts index 74b796dc0a815..0637bd49c3389 100644 --- a/src/vs/platform/telemetry/common/telemetryUtils.ts +++ b/src/vs/platform/telemetry/common/telemetryUtils.ts @@ -16,7 +16,6 @@ import { IStorageService } from 'vs/platform/storage/common/storage'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ITelemetryService, ITelemetryExperiments, ITelemetryInfo, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; -import { StorageService } from 'vs/platform/storage/common/storageService'; import * as objects from 'vs/base/common/objects'; export const defaultExperiments: ITelemetryExperiments = { @@ -105,8 +104,10 @@ function splitExperimentsRandomness(storageService: IStorageService): ITelemetry }; } +const GLOBAL_PREFIX = `storage://global/`; // TODO@Christoph debt, why do you need to know? just use the storageservice? + function getExperimentsRandomness(storageService: IStorageService) { - const key = StorageService.GLOBAL_PREFIX + 'experiments.randomness'; + const key = GLOBAL_PREFIX + 'experiments.randomness'; let valueString = storageService.get(key); if (!valueString) { valueString = Math.random().toString(); @@ -122,7 +123,7 @@ function splitRandom(random: number): [number, boolean] { return [scaled - i, i === 1]; } -const experimentsOverridesKey = StorageService.GLOBAL_PREFIX + 'experiments.overrides'; +const experimentsOverridesKey = GLOBAL_PREFIX + 'experiments.overrides'; function getExperimentsOverrides(storageService: IStorageService): ITelemetryExperiments { const valueString = storageService.get(experimentsOverridesKey); From 11c9c5bd333bae461bb224301a7824343774881b Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 9 Jun 2017 18:10:38 +0200 Subject: [PATCH 1690/2747] check in compiled js --- build/lib/i18n.js | 1999 +++++++++++---------- build/lib/tslint/translationRemindRule.js | 144 +- 2 files changed, 1072 insertions(+), 1071 deletions(-) diff --git a/build/lib/i18n.js b/build/lib/i18n.js index 5aeb3966003dc..1ade4703c61e4 100644 --- a/build/lib/i18n.js +++ b/build/lib/i18n.js @@ -1,999 +1,1000 @@ -"use strict"; -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -exports.__esModule = true; -var path = require("path"); -var fs = require("fs"); -var event_stream_1 = require("event-stream"); -var File = require("vinyl"); -var Is = require("is"); -var xml2js = require("xml2js"); -var glob = require("glob"); -var http = require("http"); -var util = require('gulp-util'); -var iconv = require('iconv-lite'); -function log(message) { - var rest = []; - for (var _i = 1; _i < arguments.length; _i++) { - rest[_i - 1] = arguments[_i]; - } - util.log.apply(util, [util.colors.green('[i18n]'), message].concat(rest)); -} -var LocalizeInfo; -(function (LocalizeInfo) { - function is(value) { - var candidate = value; - return Is.defined(candidate) && Is.string(candidate.key) && (Is.undef(candidate.comment) || (Is.array(candidate.comment) && candidate.comment.every(function (element) { return Is.string(element); }))); - } - LocalizeInfo.is = is; -})(LocalizeInfo || (LocalizeInfo = {})); -var BundledFormat; -(function (BundledFormat) { - function is(value) { - if (Is.undef(value)) { - return false; - } - var candidate = value; - var length = Object.keys(value).length; - return length === 3 && Is.defined(candidate.keys) && Is.defined(candidate.messages) && Is.defined(candidate.bundles); - } - BundledFormat.is = is; -})(BundledFormat || (BundledFormat = {})); -var PackageJsonFormat; -(function (PackageJsonFormat) { - function is(value) { - if (Is.undef(value) || !Is.object(value)) { - return false; - } - return Object.keys(value).every(function (key) { - var element = value[key]; - return Is.string(element) || (Is.object(element) && Is.defined(element.message) && Is.defined(element.comment)); - }); - } - PackageJsonFormat.is = is; -})(PackageJsonFormat || (PackageJsonFormat = {})); -var ModuleJsonFormat; -(function (ModuleJsonFormat) { - function is(value) { - var candidate = value; - return Is.defined(candidate) - && Is.array(candidate.messages) && candidate.messages.every(function (message) { return Is.string(message); }) - && Is.array(candidate.keys) && candidate.keys.every(function (key) { return Is.string(key) || LocalizeInfo.is(key); }); - } - ModuleJsonFormat.is = is; -})(ModuleJsonFormat || (ModuleJsonFormat = {})); -var Line = (function () { - function Line(indent) { - if (indent === void 0) { indent = 0; } - this.indent = indent; - this.buffer = []; - if (indent > 0) { - this.buffer.push(new Array(indent + 1).join(' ')); - } - } - Line.prototype.append = function (value) { - this.buffer.push(value); - return this; - }; - Line.prototype.toString = function () { - return this.buffer.join(''); - }; - return Line; -}()); -exports.Line = Line; -var TextModel = (function () { - function TextModel(contents) { - this._lines = contents.split(/\r\n|\r|\n/); - } - Object.defineProperty(TextModel.prototype, "lines", { - get: function () { - return this._lines; - }, - enumerable: true, - configurable: true - }); - return TextModel; -}()); -var XLF = (function () { - function XLF(project) { - this.project = project; - this.buffer = []; - this.files = Object.create(null); - } - XLF.prototype.toString = function () { - this.appendHeader(); - for (var file in this.files) { - this.appendNewLine("", 2); - for (var _i = 0, _a = this.files[file]; _i < _a.length; _i++) { - var item = _a[_i]; - this.addStringItem(item); - } - this.appendNewLine('', 2); - } - this.appendFooter(); - return this.buffer.join('\r\n'); - }; - XLF.prototype.addFile = function (original, keys, messages) { - this.files[original] = []; - var existingKeys = []; - for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { - var key = keys_1[_i]; - // Ignore duplicate keys because Transifex does not populate those with translated values. - if (existingKeys.indexOf(key) !== -1) { - continue; - } - existingKeys.push(key); - var message = encodeEntities(messages[keys.indexOf(key)]); - var comment = undefined; - // Check if the message contains description (if so, it becomes an object type in JSON) - if (Is.string(key)) { - this.files[original].push({ id: key, message: message, comment: comment }); - } - else { - if (key['comment'] && key['comment'].length > 0) { - comment = key['comment'].map(function (comment) { return encodeEntities(comment); }).join('\r\n'); - } - this.files[original].push({ id: key['key'], message: message, comment: comment }); - } - } - }; - XLF.prototype.addStringItem = function (item) { - if (!item.id || !item.message) { - throw new Error('No item ID or value specified.'); - } - this.appendNewLine("", 4); - this.appendNewLine("" + item.message + "", 6); - if (item.comment) { - this.appendNewLine("" + item.comment + "", 6); - } - this.appendNewLine('', 4); - }; - XLF.prototype.appendHeader = function () { - this.appendNewLine('', 0); - this.appendNewLine('', 0); - }; - XLF.prototype.appendFooter = function () { - this.appendNewLine('', 0); - }; - XLF.prototype.appendNewLine = function (content, indent) { - var line = new Line(indent); - line.append(content); - this.buffer.push(line.toString()); - }; - return XLF; -}()); -XLF.parse = function (xlfString) { - return new Promise(function (resolve, reject) { - var parser = new xml2js.Parser(); - var files = []; - parser.parseString(xlfString, function (err, result) { - if (err) { - reject("Failed to parse XLIFF string. " + err); - } - var fileNodes = result['xliff']['file']; - if (!fileNodes) { - reject('XLIFF file does not contain "xliff" or "file" node(s) required for parsing.'); - } - fileNodes.forEach(function (file) { - var originalFilePath = file.$.original; - if (!originalFilePath) { - reject('XLIFF file node does not contain original attribute to determine the original location of the resource file.'); - } - var language = file.$['target-language'].toLowerCase(); - if (!language) { - reject('XLIFF file node does not contain target-language attribute to determine translated language.'); - } - var messages = {}; - var transUnits = file.body[0]['trans-unit']; - transUnits.forEach(function (unit) { - var key = unit.$.id; - if (!unit.target) { - return; // No translation available - } - var val = unit.target.toString(); - if (key && val) { - messages[key] = decodeEntities(val); - } - else { - reject('XLIFF file does not contain full localization data. ID or target translation for one of the trans-unit nodes is not present.'); - } - }); - files.push({ messages: messages, originalFilePath: originalFilePath, language: language }); - }); - resolve(files); - }); - }); -}; -exports.XLF = XLF; -var iso639_3_to_2 = { - 'chs': 'zh-cn', - 'cht': 'zh-tw', - 'csy': 'cs-cz', - 'deu': 'de', - 'enu': 'en', - 'esn': 'es', - 'fra': 'fr', - 'hun': 'hu', - 'ita': 'it', - 'jpn': 'ja', - 'kor': 'ko', - 'nld': 'nl', - 'plk': 'pl', - 'ptb': 'pt-br', - 'ptg': 'pt', - 'rus': 'ru', - 'sve': 'sv-se', - 'trk': 'tr' -}; -/** - * Used to map Transifex to VS Code language code representation. - */ -var iso639_2_to_3 = { - 'zh-hans': 'chs', - 'zh-hant': 'cht', - 'cs-cz': 'csy', - 'de': 'deu', - 'en': 'enu', - 'es': 'esn', - 'fr': 'fra', - 'hu': 'hun', - 'it': 'ita', - 'ja': 'jpn', - 'ko': 'kor', - 'nl': 'nld', - 'pl': 'plk', - 'pt-br': 'ptb', - 'pt': 'ptg', - 'ru': 'rus', - 'sv-se': 'sve', - 'tr': 'trk' -}; -function sortLanguages(directoryNames) { - return directoryNames.map(function (dirName) { - var lower = dirName.toLowerCase(); - return { - name: lower, - iso639_2: iso639_3_to_2[lower] - }; - }).sort(function (a, b) { - if (!a.iso639_2 && !b.iso639_2) { - return 0; - } - if (!a.iso639_2) { - return -1; - } - if (!b.iso639_2) { - return 1; - } - return a.iso639_2 < b.iso639_2 ? -1 : (a.iso639_2 > b.iso639_2 ? 1 : 0); - }); -} -function stripComments(content) { - /** - * First capturing group matches double quoted string - * Second matches single quotes string - * Third matches block comments - * Fourth matches line comments - */ - var regexp = /("(?:[^\\\"]*(?:\\.)?)*")|('(?:[^\\\']*(?:\\.)?)*')|(\/\*(?:\r?\n|.)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g; - var result = content.replace(regexp, function (match, m1, m2, m3, m4) { - // Only one of m1, m2, m3, m4 matches - if (m3) { - // A block comment. Replace with nothing - return ''; - } - else if (m4) { - // A line comment. If it ends in \r?\n then keep it. - var length_1 = m4.length; - if (length_1 > 2 && m4[length_1 - 1] === '\n') { - return m4[length_1 - 2] === '\r' ? '\r\n' : '\n'; - } - else { - return ''; - } - } - else { - // We match a string - return match; - } - }); - return result; -} -function escapeCharacters(value) { - var result = []; - for (var i = 0; i < value.length; i++) { - var ch = value.charAt(i); - switch (ch) { - case '\'': - result.push('\\\''); - break; - case '"': - result.push('\\"'); - break; - case '\\': - result.push('\\\\'); - break; - case '\n': - result.push('\\n'); - break; - case '\r': - result.push('\\r'); - break; - case '\t': - result.push('\\t'); - break; - case '\b': - result.push('\\b'); - break; - case '\f': - result.push('\\f'); - break; - default: - result.push(ch); - } - } - return result.join(''); -} -function processCoreBundleFormat(fileHeader, languages, json, emitter) { - var keysSection = json.keys; - var messageSection = json.messages; - var bundleSection = json.bundles; - var statistics = Object.create(null); - var total = 0; - var defaultMessages = Object.create(null); - var modules = Object.keys(keysSection); - modules.forEach(function (module) { - var keys = keysSection[module]; - var messages = messageSection[module]; - if (!messages || keys.length !== messages.length) { - emitter.emit('error', "Message for module " + module + " corrupted. Mismatch in number of keys and messages."); - return; - } - var messageMap = Object.create(null); - defaultMessages[module] = messageMap; - keys.map(function (key, i) { - total++; - if (Is.string(key)) { - messageMap[key] = messages[i]; - } - else { - messageMap[key.key] = messages[i]; - } - }); - }); - var languageDirectory = path.join(__dirname, '..', '..', 'i18n'); - var languageDirs; - if (languages) { - languageDirs = sortLanguages(languages); - } - else { - languageDirs = sortLanguages(fs.readdirSync(languageDirectory).filter(function (item) { return fs.statSync(path.join(languageDirectory, item)).isDirectory(); })); - } - languageDirs.forEach(function (language) { - if (!language.iso639_2) { - return; - } - if (process.env['VSCODE_BUILD_VERBOSE']) { - log("Generating nls bundles for: " + language.iso639_2); - } - statistics[language.iso639_2] = 0; - var localizedModules = Object.create(null); - var cwd = path.join(languageDirectory, language.name, 'src'); - modules.forEach(function (module) { - var order = keysSection[module]; - var i18nFile = path.join(cwd, module) + '.i18n.json'; - var messages = null; - if (fs.existsSync(i18nFile)) { - var content = stripComments(fs.readFileSync(i18nFile, 'utf8')); - messages = JSON.parse(content); - } - else { - if (process.env['VSCODE_BUILD_VERBOSE']) { - log("No localized messages found for module " + module + ". Using default messages."); - } - messages = defaultMessages[module]; - statistics[language.iso639_2] = statistics[language.iso639_2] + Object.keys(messages).length; - } - var localizedMessages = []; - order.forEach(function (keyInfo) { - var key = null; - if (Is.string(keyInfo)) { - key = keyInfo; - } - else { - key = keyInfo.key; - } - var message = messages[key]; - if (!message) { - if (process.env['VSCODE_BUILD_VERBOSE']) { - log("No localized message found for key " + key + " in module " + module + ". Using default message."); - } - message = defaultMessages[module][key]; - statistics[language.iso639_2] = statistics[language.iso639_2] + 1; - } - localizedMessages.push(message); - }); - localizedModules[module] = localizedMessages; - }); - Object.keys(bundleSection).forEach(function (bundle) { - var modules = bundleSection[bundle]; - var contents = [ - fileHeader, - "define(\"" + bundle + ".nls." + language.iso639_2 + "\", {" - ]; - modules.forEach(function (module, index) { - contents.push("\t\"" + module + "\": ["); - var messages = localizedModules[module]; - if (!messages) { - emitter.emit('error', "Didn't find messages for module " + module + "."); - return; - } - messages.forEach(function (message, index) { - contents.push("\t\t\"" + escapeCharacters(message) + (index < messages.length ? '",' : '"')); - }); - contents.push(index < modules.length - 1 ? '\t],' : '\t]'); - }); - contents.push('});'); - emitter.emit('data', new File({ path: bundle + '.nls.' + language.iso639_2 + '.js', contents: new Buffer(contents.join('\n'), 'utf-8') })); - }); - }); - Object.keys(statistics).forEach(function (key) { - var value = statistics[key]; - log(key + " has " + value + " untranslated strings."); - }); - languageDirs.forEach(function (dir) { - var language = dir.name; - var iso639_2 = iso639_3_to_2[language]; - if (!iso639_2) { - log("\tCouldn't find iso639 2 mapping for language " + language + ". Using default language instead."); - } - else { - var stats = statistics[iso639_2]; - if (Is.undef(stats)) { - log("\tNo translations found for language " + language + ". Using default language instead."); - } - } - }); -} -function processNlsFiles(opts) { - return event_stream_1.through(function (file) { - var fileName = path.basename(file.path); - if (fileName === 'nls.metadata.json') { - var json = null; - if (file.isBuffer()) { - json = JSON.parse(file.contents.toString('utf8')); - } - else { - this.emit('error', "Failed to read component file: " + file.relative); - } - if (BundledFormat.is(json)) { - processCoreBundleFormat(opts.fileHeader, opts.languages, json, this); - } - } - this.emit('data', file); - }); -} -exports.processNlsFiles = processNlsFiles; -function prepareXlfFiles(projectName, extensionName) { - return event_stream_1.through(function (file) { - if (!file.isBuffer()) { - throw new Error("Failed to read component file: " + file.relative); - } - var extension = path.extname(file.path); - if (extension === '.json') { - var json = JSON.parse(file.contents.toString('utf8')); - if (BundledFormat.is(json)) { - importBundleJson(file, json, this); - } - else if (PackageJsonFormat.is(json) || ModuleJsonFormat.is(json)) { - importModuleOrPackageJson(file, json, projectName, this, extensionName); - } - else { - throw new Error("JSON format cannot be deduced for " + file.relative + "."); - } - } - else if (extension === '.isl') { - importIsl(file, this); - } - }); -} -exports.prepareXlfFiles = prepareXlfFiles; -var editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench', extensionsProject = 'vscode-extensions', setupProject = 'vscode-setup'; -function getResource(sourceFile) { - var resource; - if (/^vs\/platform/.test(sourceFile)) { - return { name: 'vs/platform', project: editorProject }; - } - else if (/^vs\/editor\/contrib/.test(sourceFile)) { - return { name: 'vs/editor/contrib', project: editorProject }; - } - else if (/^vs\/editor/.test(sourceFile)) { - return { name: 'vs/editor', project: editorProject }; - } - else if (/^vs\/base/.test(sourceFile)) { - return { name: 'vs/base', project: editorProject }; - } - else if (/^vs\/code/.test(sourceFile)) { - return { name: 'vs/code', project: workbenchProject }; - } - else if (/^vs\/workbench\/parts/.test(sourceFile)) { - resource = sourceFile.split('/', 4).join('/'); - return { name: resource, project: workbenchProject }; - } - else if (/^vs\/workbench\/services/.test(sourceFile)) { - resource = sourceFile.split('/', 4).join('/'); - return { name: resource, project: workbenchProject }; - } - else if (/^vs\/workbench/.test(sourceFile)) { - return { name: 'vs/workbench', project: workbenchProject }; - } - throw new Error("Could not identify the XLF bundle for " + sourceFile); -} -exports.getResource = getResource; -function importBundleJson(file, json, stream) { - var bundleXlfs = Object.create(null); - for (var source in json.keys) { - var projectResource = getResource(source); - var resource = projectResource.name; - var project = projectResource.project; - var keys = json.keys[source]; - var messages = json.messages[source]; - if (keys.length !== messages.length) { - throw new Error("There is a mismatch between keys and messages in " + file.relative); - } - var xlf = bundleXlfs[resource] ? bundleXlfs[resource] : bundleXlfs[resource] = new XLF(project); - xlf.addFile('src/' + source, keys, messages); - } - for (var resource in bundleXlfs) { - var newFilePath = bundleXlfs[resource].project + "/" + resource.replace(/\//g, '_') + ".xlf"; - var xlfFile = new File({ path: newFilePath, contents: new Buffer(bundleXlfs[resource].toString(), 'utf-8') }); - stream.emit('data', xlfFile); - } -} -// Keeps existing XLF instances and a state of how many files were already processed for faster file emission -var extensions = Object.create(null); -function importModuleOrPackageJson(file, json, projectName, stream, extensionName) { - if (ModuleJsonFormat.is(json) && json['keys'].length !== json['messages'].length) { - throw new Error("There is a mismatch between keys and messages in " + file.relative); - } - // Prepare the source path for attribute in XLF & extract messages from JSON - var formattedSourcePath = file.relative.replace(/\\/g, '/'); - var messages = Object.keys(json).map(function (key) { return json[key].toString(); }); - // Stores the amount of localization files to be transformed to XLF before the emission - var localizationFilesCount, originalFilePath; - // If preparing XLF for external extension, then use different glob pattern and source path - if (extensionName) { - localizationFilesCount = glob.sync('**/*.nls.json').length; - originalFilePath = "" + formattedSourcePath.substr(0, formattedSourcePath.length - '.nls.json'.length); - } - else { - // Used for vscode/extensions folder - extensionName = formattedSourcePath.split('/')[0]; - localizationFilesCount = glob.sync("./extensions/" + extensionName + "/**/*.nls.json").length; - originalFilePath = "extensions/" + formattedSourcePath.substr(0, formattedSourcePath.length - '.nls.json'.length); - } - var extension = extensions[extensionName] ? - extensions[extensionName] : extensions[extensionName] = { xlf: new XLF(projectName), processed: 0 }; - if (ModuleJsonFormat.is(json)) { - extension.xlf.addFile(originalFilePath, json['keys'], json['messages']); - } - else { - extension.xlf.addFile(originalFilePath, Object.keys(json), messages); - } - // Check if XLF is populated with file nodes to emit it - if (++extensions[extensionName].processed === localizationFilesCount) { - var newFilePath = path.join(projectName, extensionName + '.xlf'); - var xlfFile = new File({ path: newFilePath, contents: new Buffer(extension.xlf.toString(), 'utf-8') }); - stream.emit('data', xlfFile); - } -} -function importIsl(file, stream) { - var projectName, resourceFile; - if (path.basename(file.path) === 'Default.isl') { - projectName = setupProject; - resourceFile = 'setup_default.xlf'; - } - else { - projectName = workbenchProject; - resourceFile = 'setup_messages.xlf'; - } - var xlf = new XLF(projectName), keys = [], messages = []; - var model = new TextModel(file.contents.toString()); - var inMessageSection = false; - model.lines.forEach(function (line) { - if (line.length === 0) { - return; - } - var firstChar = line.charAt(0); - switch (firstChar) { - case ';': - // Comment line; - return; - case '[': - inMessageSection = '[Messages]' === line || '[CustomMessages]' === line; - return; - } - if (!inMessageSection) { - return; - } - var sections = line.split('='); - if (sections.length !== 2) { - throw new Error("Badly formatted message found: " + line); - } - else { - var key = sections[0]; - var value = sections[1]; - if (key.length > 0 && value.length > 0) { - keys.push(key); - messages.push(value); - } - } - }); - var originalPath = file.path.substring(file.cwd.length + 1, file.path.split('.')[0].length).replace(/\\/g, '/'); - xlf.addFile(originalPath, keys, messages); - // Emit only upon all ISL files combined into single XLF instance - var newFilePath = path.join(projectName, resourceFile); - var xlfFile = new File({ path: newFilePath, contents: new Buffer(xlf.toString(), 'utf-8') }); - stream.emit('data', xlfFile); -} -function pushXlfFiles(apiHostname, username, password) { - var tryGetPromises = []; - var updateCreatePromises = []; - return event_stream_1.through(function (file) { - var project = path.dirname(file.relative); - var fileName = path.basename(file.path); - var slug = fileName.substr(0, fileName.length - '.xlf'.length); - var credentials = username + ":" + password; - // Check if resource already exists, if not, then create it. - var promise = tryGetResource(project, slug, apiHostname, credentials); - tryGetPromises.push(promise); - promise.then(function (exists) { - if (exists) { - promise = updateResource(project, slug, file, apiHostname, credentials); - } - else { - promise = createResource(project, slug, file, apiHostname, credentials); - } - updateCreatePromises.push(promise); - }); - }, function () { - var _this = this; - // End the pipe only after all the communication with Transifex API happened - Promise.all(tryGetPromises).then(function () { - Promise.all(updateCreatePromises).then(function () { - _this.emit('end'); - })["catch"](function (reason) { throw new Error(reason); }); - })["catch"](function (reason) { throw new Error(reason); }); - }); -} -exports.pushXlfFiles = pushXlfFiles; -function tryGetResource(project, slug, apiHostname, credentials) { - return new Promise(function (resolve, reject) { - var options = { - hostname: apiHostname, - path: "/api/2/project/" + project + "/resource/" + slug + "/?details", - auth: credentials, - method: 'GET' - }; - var request = http.request(options, function (response) { - if (response.statusCode === 404) { - resolve(false); - } - else if (response.statusCode === 200) { - resolve(true); - } - else { - reject("Failed to query resource " + project + "/" + slug + ". Response: " + response.statusCode + " " + response.statusMessage); - } - }); - request.on('error', function (err) { - reject("Failed to get " + project + "/" + slug + " on Transifex: " + err); - }); - request.end(); - }); -} -function createResource(project, slug, xlfFile, apiHostname, credentials) { - return new Promise(function (resolve, reject) { - var data = JSON.stringify({ - 'content': xlfFile.contents.toString(), - 'name': slug, - 'slug': slug, - 'i18n_type': 'XLIFF' - }); - var options = { - hostname: apiHostname, - path: "/api/2/project/" + project + "/resources", - headers: { - 'Content-Type': 'application/json', - 'Content-Length': Buffer.byteLength(data) - }, - auth: credentials, - method: 'POST' - }; - var request = http.request(options, function (res) { - if (res.statusCode === 201) { - log("Resource " + project + "/" + slug + " successfully created on Transifex."); - } - else { - reject("Something went wrong in the request creating " + slug + " in " + project + ". " + res.statusCode); - } - }); - request.on('error', function (err) { - reject("Failed to create " + project + "/" + slug + " on Transifex: " + err); - }); - request.write(data); - request.end(); - }); -} -/** - * The following link provides information about how Transifex handles updates of a resource file: - * https://dev.befoolish.co/tx-docs/public/projects/updating-content#what-happens-when-you-update-files - */ -function updateResource(project, slug, xlfFile, apiHostname, credentials) { - return new Promise(function (resolve, reject) { - var data = JSON.stringify({ content: xlfFile.contents.toString() }); - var options = { - hostname: apiHostname, - path: "/api/2/project/" + project + "/resource/" + slug + "/content", - headers: { - 'Content-Type': 'application/json', - 'Content-Length': Buffer.byteLength(data) - }, - auth: credentials, - method: 'PUT' - }; - var request = http.request(options, function (res) { - if (res.statusCode === 200) { - res.setEncoding('utf8'); - var responseBuffer_1 = ''; - res.on('data', function (chunk) { - responseBuffer_1 += chunk; - }); - res.on('end', function () { - var response = JSON.parse(responseBuffer_1); - log("Resource " + project + "/" + slug + " successfully updated on Transifex. Strings added: " + response.strings_added + ", updated: " + response.strings_added + ", deleted: " + response.strings_added); - resolve(); - }); - } - else { - reject("Something went wrong in the request updating " + slug + " in " + project + ". " + res.statusCode); - } - }); - request.on('error', function (err) { - reject("Failed to update " + project + "/" + slug + " on Transifex: " + err); - }); - request.write(data); - request.end(); - }); -} -function obtainProjectResources(projectName) { - var resources = []; - if (projectName === editorProject) { - var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); - resources = JSON.parse(json).editor; - } - else if (projectName === workbenchProject) { - var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); - resources = JSON.parse(json).workbench; - } - else if (projectName === extensionsProject) { - var extensionsToLocalize = glob.sync('./extensions/**/*.nls.json').map(function (extension) { return extension.split('/')[2]; }); - var resourcesToPull_1 = []; - extensionsToLocalize.forEach(function (extension) { - if (resourcesToPull_1.indexOf(extension) === -1) { - resourcesToPull_1.push(extension); - resources.push({ name: extension, project: projectName }); - } - }); - } - else if (projectName === setupProject) { - resources.push({ name: 'setup_default', project: setupProject }); - } - return resources; -} -function pullXlfFiles(projectName, apiHostname, username, password, languages, resources) { - if (!resources) { - resources = obtainProjectResources(projectName); - } - if (!resources) { - throw new Error('Transifex projects and resources must be defined to be able to pull translations from Transifex.'); - } - var credentials = username + ":" + password; - var expectedTranslationsCount = languages.length * resources.length; - var translationsRetrieved = 0, called = false; - return event_stream_1.readable(function (count, callback) { - // Mark end of stream when all resources were retrieved - if (translationsRetrieved === expectedTranslationsCount) { - return this.emit('end'); - } - if (!called) { - called = true; - var stream_1 = this; - // Retrieve XLF files from main projects - languages.map(function (language) { - resources.map(function (resource) { - retrieveResource(language, resource, apiHostname, credentials).then(function (file) { - stream_1.emit('data', file); - translationsRetrieved++; - })["catch"](function (error) { throw new Error(error); }); - }); - }); - } - callback(); - }); -} -exports.pullXlfFiles = pullXlfFiles; -function retrieveResource(language, resource, apiHostname, credentials) { - return new Promise(function (resolve, reject) { - var slug = resource.name.replace(/\//g, '_'); - var project = resource.project; - var iso639 = language.toLowerCase(); - var options = { - hostname: apiHostname, - path: "/api/2/project/" + project + "/resource/" + slug + "/translation/" + iso639 + "?file&mode=onlyreviewed", - auth: credentials, - method: 'GET' - }; - var request = http.request(options, function (res) { - var xlfBuffer = []; - res.on('data', function (chunk) { return xlfBuffer.push(chunk); }); - res.on('end', function () { - if (res.statusCode === 200) { - resolve(new File({ contents: Buffer.concat(xlfBuffer), path: project + "/" + iso639_2_to_3[language] + "/" + slug + ".xlf" })); - } - reject(slug + " in " + project + " returned no data. Response code: " + res.statusCode + "."); - }); - }); - request.on('error', function (err) { - reject("Failed to query resource " + slug + " with the following error: " + err); - }); - request.end(); - }); -} -function prepareJsonFiles() { - var parsePromises = []; - return event_stream_1.through(function (xlf) { - var stream = this; - var parsePromise = XLF.parse(xlf.contents.toString()); - parsePromises.push(parsePromise); - parsePromise.then(function (resolvedFiles) { - resolvedFiles.forEach(function (file) { - var messages = file.messages, translatedFile; - // ISL file path always starts with 'build/' - if (/^build\//.test(file.originalFilePath)) { - var defaultLanguages = { 'zh-hans': true, 'zh-hant': true, 'ko': true }; - if (path.basename(file.originalFilePath) === 'Default' && !defaultLanguages[file.language]) { - return; - } - translatedFile = createIslFile('..', file.originalFilePath, messages, iso639_2_to_3[file.language]); - } - else { - translatedFile = createI18nFile(iso639_2_to_3[file.language], file.originalFilePath, messages); - } - stream.emit('data', translatedFile); - }); - }, function (rejectReason) { - throw new Error("XLF parsing error: " + rejectReason); - }); - }, function () { - var _this = this; - Promise.all(parsePromises) - .then(function () { _this.emit('end'); })["catch"](function (reason) { throw new Error(reason); }); - }); -} -exports.prepareJsonFiles = prepareJsonFiles; -function createI18nFile(base, originalFilePath, messages) { - var content = [ - '/*---------------------------------------------------------------------------------------------', - ' * Copyright (c) Microsoft Corporation. All rights reserved.', - ' * Licensed under the MIT License. See License.txt in the project root for license information.', - ' *--------------------------------------------------------------------------------------------*/', - '// Do not edit this file. It is machine generated.' - ].join('\n') + '\n' + JSON.stringify(messages, null, '\t').replace(/\r\n/g, '\n'); - return new File({ - path: path.join(base, originalFilePath + '.i18n.json'), - contents: new Buffer(content, 'utf8') - }); -} -var languageNames = { - 'chs': 'Simplified Chinese', - 'cht': 'Traditional Chinese', - 'kor': 'Korean' -}; -var languageIds = { - 'chs': '$0804', - 'cht': '$0404', - 'kor': '$0412' -}; -var encodings = { - 'chs': 'CP936', - 'cht': 'CP950', - 'jpn': 'CP932', - 'kor': 'CP949', - 'deu': 'CP1252', - 'fra': 'CP1252', - 'esn': 'CP1252', - 'rus': 'CP1251', - 'ita': 'CP1252', - 'ptb': 'CP1252', - 'hun': 'CP1250', - 'trk': 'CP1254' -}; -function createIslFile(base, originalFilePath, messages, language) { - var content = []; - var originalContent; - if (path.basename(originalFilePath) === 'Default') { - originalContent = new TextModel(fs.readFileSync(originalFilePath + '.isl', 'utf8')); - } - else { - originalContent = new TextModel(fs.readFileSync(originalFilePath + '.en.isl', 'utf8')); - } - originalContent.lines.forEach(function (line) { - if (line.length > 0) { - var firstChar = line.charAt(0); - if (firstChar === '[' || firstChar === ';') { - if (line === '; *** Inno Setup version 5.5.3+ English messages ***') { - content.push("; *** Inno Setup version 5.5.3+ " + languageNames[language] + " messages ***"); - } - else { - content.push(line); - } - } - else { - var sections = line.split('='); - var key = sections[0]; - var translated = line; - if (key) { - if (key === 'LanguageName') { - translated = key + "=" + languageNames[language]; - } - else if (key === 'LanguageID') { - translated = key + "=" + languageIds[language]; - } - else if (key === 'LanguageCodePage') { - translated = key + "=" + encodings[language].substr(2); - } - else { - var translatedMessage = messages[key]; - if (translatedMessage) { - translated = key + "=" + translatedMessage; - } - } - } - content.push(translated); - } - } - }); - var tag = iso639_3_to_2[language]; - var basename = path.basename(originalFilePath); - var filePath = path.join(base, path.dirname(originalFilePath), basename) + "." + tag + ".isl"; - return new File({ - path: filePath, - contents: iconv.encode(new Buffer(content.join('\r\n'), 'utf8'), encodings[language]) - }); -} -function encodeEntities(value) { - var result = []; - for (var i = 0; i < value.length; i++) { - var ch = value[i]; - switch (ch) { - case '<': - result.push('<'); - break; - case '>': - result.push('>'); - break; - case '&': - result.push('&'); - break; - default: - result.push(ch); - } - } - return result.join(''); -} -function decodeEntities(value) { - return value.replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&'); -} +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +Object.defineProperty(exports, "__esModule", { value: true }); +var path = require("path"); +var fs = require("fs"); +var event_stream_1 = require("event-stream"); +var File = require("vinyl"); +var Is = require("is"); +var xml2js = require("xml2js"); +var glob = require("glob"); +var http = require("http"); +var util = require('gulp-util'); +var iconv = require('iconv-lite'); +function log(message) { + var rest = []; + for (var _i = 1; _i < arguments.length; _i++) { + rest[_i - 1] = arguments[_i]; + } + util.log.apply(util, [util.colors.green('[i18n]'), message].concat(rest)); +} +var LocalizeInfo; +(function (LocalizeInfo) { + function is(value) { + var candidate = value; + return Is.defined(candidate) && Is.string(candidate.key) && (Is.undef(candidate.comment) || (Is.array(candidate.comment) && candidate.comment.every(function (element) { return Is.string(element); }))); + } + LocalizeInfo.is = is; +})(LocalizeInfo || (LocalizeInfo = {})); +var BundledFormat; +(function (BundledFormat) { + function is(value) { + if (Is.undef(value)) { + return false; + } + var candidate = value; + var length = Object.keys(value).length; + return length === 3 && Is.defined(candidate.keys) && Is.defined(candidate.messages) && Is.defined(candidate.bundles); + } + BundledFormat.is = is; +})(BundledFormat || (BundledFormat = {})); +var PackageJsonFormat; +(function (PackageJsonFormat) { + function is(value) { + if (Is.undef(value) || !Is.object(value)) { + return false; + } + return Object.keys(value).every(function (key) { + var element = value[key]; + return Is.string(element) || (Is.object(element) && Is.defined(element.message) && Is.defined(element.comment)); + }); + } + PackageJsonFormat.is = is; +})(PackageJsonFormat || (PackageJsonFormat = {})); +var ModuleJsonFormat; +(function (ModuleJsonFormat) { + function is(value) { + var candidate = value; + return Is.defined(candidate) + && Is.array(candidate.messages) && candidate.messages.every(function (message) { return Is.string(message); }) + && Is.array(candidate.keys) && candidate.keys.every(function (key) { return Is.string(key) || LocalizeInfo.is(key); }); + } + ModuleJsonFormat.is = is; +})(ModuleJsonFormat || (ModuleJsonFormat = {})); +var Line = (function () { + function Line(indent) { + if (indent === void 0) { indent = 0; } + this.indent = indent; + this.buffer = []; + if (indent > 0) { + this.buffer.push(new Array(indent + 1).join(' ')); + } + } + Line.prototype.append = function (value) { + this.buffer.push(value); + return this; + }; + Line.prototype.toString = function () { + return this.buffer.join(''); + }; + return Line; +}()); +exports.Line = Line; +var TextModel = (function () { + function TextModel(contents) { + this._lines = contents.split(/\r\n|\r|\n/); + } + Object.defineProperty(TextModel.prototype, "lines", { + get: function () { + return this._lines; + }, + enumerable: true, + configurable: true + }); + return TextModel; +}()); +var XLF = (function () { + function XLF(project) { + this.project = project; + this.buffer = []; + this.files = Object.create(null); + } + XLF.prototype.toString = function () { + this.appendHeader(); + for (var file in this.files) { + this.appendNewLine("", 2); + for (var _i = 0, _a = this.files[file]; _i < _a.length; _i++) { + var item = _a[_i]; + this.addStringItem(item); + } + this.appendNewLine('', 2); + } + this.appendFooter(); + return this.buffer.join('\r\n'); + }; + XLF.prototype.addFile = function (original, keys, messages) { + this.files[original] = []; + var existingKeys = []; + for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { + var key = keys_1[_i]; + // Ignore duplicate keys because Transifex does not populate those with translated values. + if (existingKeys.indexOf(key) !== -1) { + continue; + } + existingKeys.push(key); + var message = encodeEntities(messages[keys.indexOf(key)]); + var comment = undefined; + // Check if the message contains description (if so, it becomes an object type in JSON) + if (Is.string(key)) { + this.files[original].push({ id: key, message: message, comment: comment }); + } + else { + if (key['comment'] && key['comment'].length > 0) { + comment = key['comment'].map(function (comment) { return encodeEntities(comment); }).join('\r\n'); + } + this.files[original].push({ id: key['key'], message: message, comment: comment }); + } + } + }; + XLF.prototype.addStringItem = function (item) { + if (!item.id || !item.message) { + throw new Error('No item ID or value specified.'); + } + this.appendNewLine("", 4); + this.appendNewLine("" + item.message + "", 6); + if (item.comment) { + this.appendNewLine("" + item.comment + "", 6); + } + this.appendNewLine('', 4); + }; + XLF.prototype.appendHeader = function () { + this.appendNewLine('', 0); + this.appendNewLine('', 0); + }; + XLF.prototype.appendFooter = function () { + this.appendNewLine('', 0); + }; + XLF.prototype.appendNewLine = function (content, indent) { + var line = new Line(indent); + line.append(content); + this.buffer.push(line.toString()); + }; + return XLF; +}()); +XLF.parse = function (xlfString) { + return new Promise(function (resolve, reject) { + var parser = new xml2js.Parser(); + var files = []; + parser.parseString(xlfString, function (err, result) { + if (err) { + reject("Failed to parse XLIFF string. " + err); + } + var fileNodes = result['xliff']['file']; + if (!fileNodes) { + reject('XLIFF file does not contain "xliff" or "file" node(s) required for parsing.'); + } + fileNodes.forEach(function (file) { + var originalFilePath = file.$.original; + if (!originalFilePath) { + reject('XLIFF file node does not contain original attribute to determine the original location of the resource file.'); + } + var language = file.$['target-language'].toLowerCase(); + if (!language) { + reject('XLIFF file node does not contain target-language attribute to determine translated language.'); + } + var messages = {}; + var transUnits = file.body[0]['trans-unit']; + transUnits.forEach(function (unit) { + var key = unit.$.id; + if (!unit.target) { + return; // No translation available + } + var val = unit.target.toString(); + if (key && val) { + messages[key] = decodeEntities(val); + } + else { + reject('XLIFF file does not contain full localization data. ID or target translation for one of the trans-unit nodes is not present.'); + } + }); + files.push({ messages: messages, originalFilePath: originalFilePath, language: language }); + }); + resolve(files); + }); + }); +}; +exports.XLF = XLF; +var iso639_3_to_2 = { + 'chs': 'zh-cn', + 'cht': 'zh-tw', + 'csy': 'cs-cz', + 'deu': 'de', + 'enu': 'en', + 'esn': 'es', + 'fra': 'fr', + 'hun': 'hu', + 'ita': 'it', + 'jpn': 'ja', + 'kor': 'ko', + 'nld': 'nl', + 'plk': 'pl', + 'ptb': 'pt-br', + 'ptg': 'pt', + 'rus': 'ru', + 'sve': 'sv-se', + 'trk': 'tr' +}; +/** + * Used to map Transifex to VS Code language code representation. + */ +var iso639_2_to_3 = { + 'zh-hans': 'chs', + 'zh-hant': 'cht', + 'cs-cz': 'csy', + 'de': 'deu', + 'en': 'enu', + 'es': 'esn', + 'fr': 'fra', + 'hu': 'hun', + 'it': 'ita', + 'ja': 'jpn', + 'ko': 'kor', + 'nl': 'nld', + 'pl': 'plk', + 'pt-br': 'ptb', + 'pt': 'ptg', + 'ru': 'rus', + 'sv-se': 'sve', + 'tr': 'trk' +}; +function sortLanguages(directoryNames) { + return directoryNames.map(function (dirName) { + var lower = dirName.toLowerCase(); + return { + name: lower, + iso639_2: iso639_3_to_2[lower] + }; + }).sort(function (a, b) { + if (!a.iso639_2 && !b.iso639_2) { + return 0; + } + if (!a.iso639_2) { + return -1; + } + if (!b.iso639_2) { + return 1; + } + return a.iso639_2 < b.iso639_2 ? -1 : (a.iso639_2 > b.iso639_2 ? 1 : 0); + }); +} +function stripComments(content) { + /** + * First capturing group matches double quoted string + * Second matches single quotes string + * Third matches block comments + * Fourth matches line comments + */ + var regexp = /("(?:[^\\\"]*(?:\\.)?)*")|('(?:[^\\\']*(?:\\.)?)*')|(\/\*(?:\r?\n|.)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))/g; + var result = content.replace(regexp, function (match, m1, m2, m3, m4) { + // Only one of m1, m2, m3, m4 matches + if (m3) { + // A block comment. Replace with nothing + return ''; + } + else if (m4) { + // A line comment. If it ends in \r?\n then keep it. + var length_1 = m4.length; + if (length_1 > 2 && m4[length_1 - 1] === '\n') { + return m4[length_1 - 2] === '\r' ? '\r\n' : '\n'; + } + else { + return ''; + } + } + else { + // We match a string + return match; + } + }); + return result; +} +function escapeCharacters(value) { + var result = []; + for (var i = 0; i < value.length; i++) { + var ch = value.charAt(i); + switch (ch) { + case '\'': + result.push('\\\''); + break; + case '"': + result.push('\\"'); + break; + case '\\': + result.push('\\\\'); + break; + case '\n': + result.push('\\n'); + break; + case '\r': + result.push('\\r'); + break; + case '\t': + result.push('\\t'); + break; + case '\b': + result.push('\\b'); + break; + case '\f': + result.push('\\f'); + break; + default: + result.push(ch); + } + } + return result.join(''); +} +function processCoreBundleFormat(fileHeader, languages, json, emitter) { + var keysSection = json.keys; + var messageSection = json.messages; + var bundleSection = json.bundles; + var statistics = Object.create(null); + var total = 0; + var defaultMessages = Object.create(null); + var modules = Object.keys(keysSection); + modules.forEach(function (module) { + var keys = keysSection[module]; + var messages = messageSection[module]; + if (!messages || keys.length !== messages.length) { + emitter.emit('error', "Message for module " + module + " corrupted. Mismatch in number of keys and messages."); + return; + } + var messageMap = Object.create(null); + defaultMessages[module] = messageMap; + keys.map(function (key, i) { + total++; + if (Is.string(key)) { + messageMap[key] = messages[i]; + } + else { + messageMap[key.key] = messages[i]; + } + }); + }); + var languageDirectory = path.join(__dirname, '..', '..', 'i18n'); + var languageDirs; + if (languages) { + languageDirs = sortLanguages(languages); + } + else { + languageDirs = sortLanguages(fs.readdirSync(languageDirectory).filter(function (item) { return fs.statSync(path.join(languageDirectory, item)).isDirectory(); })); + } + languageDirs.forEach(function (language) { + if (!language.iso639_2) { + return; + } + if (process.env['VSCODE_BUILD_VERBOSE']) { + log("Generating nls bundles for: " + language.iso639_2); + } + statistics[language.iso639_2] = 0; + var localizedModules = Object.create(null); + var cwd = path.join(languageDirectory, language.name, 'src'); + modules.forEach(function (module) { + var order = keysSection[module]; + var i18nFile = path.join(cwd, module) + '.i18n.json'; + var messages = null; + if (fs.existsSync(i18nFile)) { + var content = stripComments(fs.readFileSync(i18nFile, 'utf8')); + messages = JSON.parse(content); + } + else { + if (process.env['VSCODE_BUILD_VERBOSE']) { + log("No localized messages found for module " + module + ". Using default messages."); + } + messages = defaultMessages[module]; + statistics[language.iso639_2] = statistics[language.iso639_2] + Object.keys(messages).length; + } + var localizedMessages = []; + order.forEach(function (keyInfo) { + var key = null; + if (Is.string(keyInfo)) { + key = keyInfo; + } + else { + key = keyInfo.key; + } + var message = messages[key]; + if (!message) { + if (process.env['VSCODE_BUILD_VERBOSE']) { + log("No localized message found for key " + key + " in module " + module + ". Using default message."); + } + message = defaultMessages[module][key]; + statistics[language.iso639_2] = statistics[language.iso639_2] + 1; + } + localizedMessages.push(message); + }); + localizedModules[module] = localizedMessages; + }); + Object.keys(bundleSection).forEach(function (bundle) { + var modules = bundleSection[bundle]; + var contents = [ + fileHeader, + "define(\"" + bundle + ".nls." + language.iso639_2 + "\", {" + ]; + modules.forEach(function (module, index) { + contents.push("\t\"" + module + "\": ["); + var messages = localizedModules[module]; + if (!messages) { + emitter.emit('error', "Didn't find messages for module " + module + "."); + return; + } + messages.forEach(function (message, index) { + contents.push("\t\t\"" + escapeCharacters(message) + (index < messages.length ? '",' : '"')); + }); + contents.push(index < modules.length - 1 ? '\t],' : '\t]'); + }); + contents.push('});'); + emitter.emit('data', new File({ path: bundle + '.nls.' + language.iso639_2 + '.js', contents: new Buffer(contents.join('\n'), 'utf-8') })); + }); + }); + Object.keys(statistics).forEach(function (key) { + var value = statistics[key]; + log(key + " has " + value + " untranslated strings."); + }); + languageDirs.forEach(function (dir) { + var language = dir.name; + var iso639_2 = iso639_3_to_2[language]; + if (!iso639_2) { + log("\tCouldn't find iso639 2 mapping for language " + language + ". Using default language instead."); + } + else { + var stats = statistics[iso639_2]; + if (Is.undef(stats)) { + log("\tNo translations found for language " + language + ". Using default language instead."); + } + } + }); +} +function processNlsFiles(opts) { + return event_stream_1.through(function (file) { + var fileName = path.basename(file.path); + if (fileName === 'nls.metadata.json') { + var json = null; + if (file.isBuffer()) { + json = JSON.parse(file.contents.toString('utf8')); + } + else { + this.emit('error', "Failed to read component file: " + file.relative); + } + if (BundledFormat.is(json)) { + processCoreBundleFormat(opts.fileHeader, opts.languages, json, this); + } + } + this.emit('data', file); + }); +} +exports.processNlsFiles = processNlsFiles; +function prepareXlfFiles(projectName, extensionName) { + return event_stream_1.through(function (file) { + if (!file.isBuffer()) { + throw new Error("Failed to read component file: " + file.relative); + } + var extension = path.extname(file.path); + if (extension === '.json') { + var json = JSON.parse(file.contents.toString('utf8')); + if (BundledFormat.is(json)) { + importBundleJson(file, json, this); + } + else if (PackageJsonFormat.is(json) || ModuleJsonFormat.is(json)) { + importModuleOrPackageJson(file, json, projectName, this, extensionName); + } + else { + throw new Error("JSON format cannot be deduced for " + file.relative + "."); + } + } + else if (extension === '.isl') { + importIsl(file, this); + } + }); +} +exports.prepareXlfFiles = prepareXlfFiles; +var editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench', extensionsProject = 'vscode-extensions', setupProject = 'vscode-setup'; +function getResource(sourceFile) { + var resource; + if (/^vs\/platform/.test(sourceFile)) { + return { name: 'vs/platform', project: editorProject }; + } + else if (/^vs\/editor\/contrib/.test(sourceFile)) { + return { name: 'vs/editor/contrib', project: editorProject }; + } + else if (/^vs\/editor/.test(sourceFile)) { + return { name: 'vs/editor', project: editorProject }; + } + else if (/^vs\/base/.test(sourceFile)) { + return { name: 'vs/base', project: editorProject }; + } + else if (/^vs\/code/.test(sourceFile)) { + return { name: 'vs/code', project: workbenchProject }; + } + else if (/^vs\/workbench\/parts/.test(sourceFile)) { + resource = sourceFile.split('/', 4).join('/'); + return { name: resource, project: workbenchProject }; + } + else if (/^vs\/workbench\/services/.test(sourceFile)) { + resource = sourceFile.split('/', 4).join('/'); + return { name: resource, project: workbenchProject }; + } + else if (/^vs\/workbench/.test(sourceFile)) { + return { name: 'vs/workbench', project: workbenchProject }; + } + throw new Error("Could not identify the XLF bundle for " + sourceFile); +} +exports.getResource = getResource; +function importBundleJson(file, json, stream) { + var bundleXlfs = Object.create(null); + for (var source in json.keys) { + var projectResource = getResource(source); + var resource = projectResource.name; + var project = projectResource.project; + var keys = json.keys[source]; + var messages = json.messages[source]; + if (keys.length !== messages.length) { + throw new Error("There is a mismatch between keys and messages in " + file.relative); + } + var xlf = bundleXlfs[resource] ? bundleXlfs[resource] : bundleXlfs[resource] = new XLF(project); + xlf.addFile('src/' + source, keys, messages); + } + for (var resource in bundleXlfs) { + var newFilePath = bundleXlfs[resource].project + "/" + resource.replace(/\//g, '_') + ".xlf"; + var xlfFile = new File({ path: newFilePath, contents: new Buffer(bundleXlfs[resource].toString(), 'utf-8') }); + stream.emit('data', xlfFile); + } +} +// Keeps existing XLF instances and a state of how many files were already processed for faster file emission +var extensions = Object.create(null); +function importModuleOrPackageJson(file, json, projectName, stream, extensionName) { + if (ModuleJsonFormat.is(json) && json['keys'].length !== json['messages'].length) { + throw new Error("There is a mismatch between keys and messages in " + file.relative); + } + // Prepare the source path for attribute in XLF & extract messages from JSON + var formattedSourcePath = file.relative.replace(/\\/g, '/'); + var messages = Object.keys(json).map(function (key) { return json[key].toString(); }); + // Stores the amount of localization files to be transformed to XLF before the emission + var localizationFilesCount, originalFilePath; + // If preparing XLF for external extension, then use different glob pattern and source path + if (extensionName) { + localizationFilesCount = glob.sync('**/*.nls.json').length; + originalFilePath = "" + formattedSourcePath.substr(0, formattedSourcePath.length - '.nls.json'.length); + } + else { + // Used for vscode/extensions folder + extensionName = formattedSourcePath.split('/')[0]; + localizationFilesCount = glob.sync("./extensions/" + extensionName + "/**/*.nls.json").length; + originalFilePath = "extensions/" + formattedSourcePath.substr(0, formattedSourcePath.length - '.nls.json'.length); + } + var extension = extensions[extensionName] ? + extensions[extensionName] : extensions[extensionName] = { xlf: new XLF(projectName), processed: 0 }; + if (ModuleJsonFormat.is(json)) { + extension.xlf.addFile(originalFilePath, json['keys'], json['messages']); + } + else { + extension.xlf.addFile(originalFilePath, Object.keys(json), messages); + } + // Check if XLF is populated with file nodes to emit it + if (++extensions[extensionName].processed === localizationFilesCount) { + var newFilePath = path.join(projectName, extensionName + '.xlf'); + var xlfFile = new File({ path: newFilePath, contents: new Buffer(extension.xlf.toString(), 'utf-8') }); + stream.emit('data', xlfFile); + } +} +function importIsl(file, stream) { + var projectName, resourceFile; + if (path.basename(file.path) === 'Default.isl') { + projectName = setupProject; + resourceFile = 'setup_default.xlf'; + } + else { + projectName = workbenchProject; + resourceFile = 'setup_messages.xlf'; + } + var xlf = new XLF(projectName), keys = [], messages = []; + var model = new TextModel(file.contents.toString()); + var inMessageSection = false; + model.lines.forEach(function (line) { + if (line.length === 0) { + return; + } + var firstChar = line.charAt(0); + switch (firstChar) { + case ';': + // Comment line; + return; + case '[': + inMessageSection = '[Messages]' === line || '[CustomMessages]' === line; + return; + } + if (!inMessageSection) { + return; + } + var sections = line.split('='); + if (sections.length !== 2) { + throw new Error("Badly formatted message found: " + line); + } + else { + var key = sections[0]; + var value = sections[1]; + if (key.length > 0 && value.length > 0) { + keys.push(key); + messages.push(value); + } + } + }); + var originalPath = file.path.substring(file.cwd.length + 1, file.path.split('.')[0].length).replace(/\\/g, '/'); + xlf.addFile(originalPath, keys, messages); + // Emit only upon all ISL files combined into single XLF instance + var newFilePath = path.join(projectName, resourceFile); + var xlfFile = new File({ path: newFilePath, contents: new Buffer(xlf.toString(), 'utf-8') }); + stream.emit('data', xlfFile); +} +function pushXlfFiles(apiHostname, username, password) { + var tryGetPromises = []; + var updateCreatePromises = []; + return event_stream_1.through(function (file) { + var project = path.dirname(file.relative); + var fileName = path.basename(file.path); + var slug = fileName.substr(0, fileName.length - '.xlf'.length); + var credentials = username + ":" + password; + // Check if resource already exists, if not, then create it. + var promise = tryGetResource(project, slug, apiHostname, credentials); + tryGetPromises.push(promise); + promise.then(function (exists) { + if (exists) { + promise = updateResource(project, slug, file, apiHostname, credentials); + } + else { + promise = createResource(project, slug, file, apiHostname, credentials); + } + updateCreatePromises.push(promise); + }); + }, function () { + var _this = this; + // End the pipe only after all the communication with Transifex API happened + Promise.all(tryGetPromises).then(function () { + Promise.all(updateCreatePromises).then(function () { + _this.emit('end'); + }).catch(function (reason) { throw new Error(reason); }); + }).catch(function (reason) { throw new Error(reason); }); + }); +} +exports.pushXlfFiles = pushXlfFiles; +function tryGetResource(project, slug, apiHostname, credentials) { + return new Promise(function (resolve, reject) { + var options = { + hostname: apiHostname, + path: "/api/2/project/" + project + "/resource/" + slug + "/?details", + auth: credentials, + method: 'GET' + }; + var request = http.request(options, function (response) { + if (response.statusCode === 404) { + resolve(false); + } + else if (response.statusCode === 200) { + resolve(true); + } + else { + reject("Failed to query resource " + project + "/" + slug + ". Response: " + response.statusCode + " " + response.statusMessage); + } + }); + request.on('error', function (err) { + reject("Failed to get " + project + "/" + slug + " on Transifex: " + err); + }); + request.end(); + }); +} +function createResource(project, slug, xlfFile, apiHostname, credentials) { + return new Promise(function (resolve, reject) { + var data = JSON.stringify({ + 'content': xlfFile.contents.toString(), + 'name': slug, + 'slug': slug, + 'i18n_type': 'XLIFF' + }); + var options = { + hostname: apiHostname, + path: "/api/2/project/" + project + "/resources", + headers: { + 'Content-Type': 'application/json', + 'Content-Length': Buffer.byteLength(data) + }, + auth: credentials, + method: 'POST' + }; + var request = http.request(options, function (res) { + if (res.statusCode === 201) { + log("Resource " + project + "/" + slug + " successfully created on Transifex."); + } + else { + reject("Something went wrong in the request creating " + slug + " in " + project + ". " + res.statusCode); + } + }); + request.on('error', function (err) { + reject("Failed to create " + project + "/" + slug + " on Transifex: " + err); + }); + request.write(data); + request.end(); + }); +} +/** + * The following link provides information about how Transifex handles updates of a resource file: + * https://dev.befoolish.co/tx-docs/public/projects/updating-content#what-happens-when-you-update-files + */ +function updateResource(project, slug, xlfFile, apiHostname, credentials) { + return new Promise(function (resolve, reject) { + var data = JSON.stringify({ content: xlfFile.contents.toString() }); + var options = { + hostname: apiHostname, + path: "/api/2/project/" + project + "/resource/" + slug + "/content", + headers: { + 'Content-Type': 'application/json', + 'Content-Length': Buffer.byteLength(data) + }, + auth: credentials, + method: 'PUT' + }; + var request = http.request(options, function (res) { + if (res.statusCode === 200) { + res.setEncoding('utf8'); + var responseBuffer_1 = ''; + res.on('data', function (chunk) { + responseBuffer_1 += chunk; + }); + res.on('end', function () { + var response = JSON.parse(responseBuffer_1); + log("Resource " + project + "/" + slug + " successfully updated on Transifex. Strings added: " + response.strings_added + ", updated: " + response.strings_added + ", deleted: " + response.strings_added); + resolve(); + }); + } + else { + reject("Something went wrong in the request updating " + slug + " in " + project + ". " + res.statusCode); + } + }); + request.on('error', function (err) { + reject("Failed to update " + project + "/" + slug + " on Transifex: " + err); + }); + request.write(data); + request.end(); + }); +} +function obtainProjectResources(projectName) { + var resources = []; + if (projectName === editorProject) { + var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + resources = JSON.parse(json).editor; + } + else if (projectName === workbenchProject) { + var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + resources = JSON.parse(json).workbench; + } + else if (projectName === extensionsProject) { + var extensionsToLocalize = glob.sync('./extensions/**/*.nls.json').map(function (extension) { return extension.split('/')[2]; }); + var resourcesToPull_1 = []; + extensionsToLocalize.forEach(function (extension) { + if (resourcesToPull_1.indexOf(extension) === -1) { + resourcesToPull_1.push(extension); + resources.push({ name: extension, project: projectName }); + } + }); + } + else if (projectName === setupProject) { + resources.push({ name: 'setup_default', project: setupProject }); + } + return resources; +} +function pullXlfFiles(projectName, apiHostname, username, password, languages, resources) { + if (!resources) { + resources = obtainProjectResources(projectName); + } + if (!resources) { + throw new Error('Transifex projects and resources must be defined to be able to pull translations from Transifex.'); + } + var credentials = username + ":" + password; + var expectedTranslationsCount = languages.length * resources.length; + var translationsRetrieved = 0, called = false; + return event_stream_1.readable(function (count, callback) { + // Mark end of stream when all resources were retrieved + if (translationsRetrieved === expectedTranslationsCount) { + return this.emit('end'); + } + if (!called) { + called = true; + var stream_1 = this; + // Retrieve XLF files from main projects + languages.map(function (language) { + resources.map(function (resource) { + retrieveResource(language, resource, apiHostname, credentials).then(function (file) { + stream_1.emit('data', file); + translationsRetrieved++; + }).catch(function (error) { throw new Error(error); }); + }); + }); + } + callback(); + }); +} +exports.pullXlfFiles = pullXlfFiles; +function retrieveResource(language, resource, apiHostname, credentials) { + return new Promise(function (resolve, reject) { + var slug = resource.name.replace(/\//g, '_'); + var project = resource.project; + var iso639 = language.toLowerCase(); + var options = { + hostname: apiHostname, + path: "/api/2/project/" + project + "/resource/" + slug + "/translation/" + iso639 + "?file&mode=onlyreviewed", + auth: credentials, + method: 'GET' + }; + var request = http.request(options, function (res) { + var xlfBuffer = []; + res.on('data', function (chunk) { return xlfBuffer.push(chunk); }); + res.on('end', function () { + if (res.statusCode === 200) { + resolve(new File({ contents: Buffer.concat(xlfBuffer), path: project + "/" + iso639_2_to_3[language] + "/" + slug + ".xlf" })); + } + reject(slug + " in " + project + " returned no data. Response code: " + res.statusCode + "."); + }); + }); + request.on('error', function (err) { + reject("Failed to query resource " + slug + " with the following error: " + err); + }); + request.end(); + }); +} +function prepareJsonFiles() { + var parsePromises = []; + return event_stream_1.through(function (xlf) { + var stream = this; + var parsePromise = XLF.parse(xlf.contents.toString()); + parsePromises.push(parsePromise); + parsePromise.then(function (resolvedFiles) { + resolvedFiles.forEach(function (file) { + var messages = file.messages, translatedFile; + // ISL file path always starts with 'build/' + if (/^build\//.test(file.originalFilePath)) { + var defaultLanguages = { 'zh-hans': true, 'zh-hant': true, 'ko': true }; + if (path.basename(file.originalFilePath) === 'Default' && !defaultLanguages[file.language]) { + return; + } + translatedFile = createIslFile('..', file.originalFilePath, messages, iso639_2_to_3[file.language]); + } + else { + translatedFile = createI18nFile(iso639_2_to_3[file.language], file.originalFilePath, messages); + } + stream.emit('data', translatedFile); + }); + }, function (rejectReason) { + throw new Error("XLF parsing error: " + rejectReason); + }); + }, function () { + var _this = this; + Promise.all(parsePromises) + .then(function () { _this.emit('end'); }) + .catch(function (reason) { throw new Error(reason); }); + }); +} +exports.prepareJsonFiles = prepareJsonFiles; +function createI18nFile(base, originalFilePath, messages) { + var content = [ + '/*---------------------------------------------------------------------------------------------', + ' * Copyright (c) Microsoft Corporation. All rights reserved.', + ' * Licensed under the MIT License. See License.txt in the project root for license information.', + ' *--------------------------------------------------------------------------------------------*/', + '// Do not edit this file. It is machine generated.' + ].join('\n') + '\n' + JSON.stringify(messages, null, '\t').replace(/\r\n/g, '\n'); + return new File({ + path: path.join(base, originalFilePath + '.i18n.json'), + contents: new Buffer(content, 'utf8') + }); +} +var languageNames = { + 'chs': 'Simplified Chinese', + 'cht': 'Traditional Chinese', + 'kor': 'Korean' +}; +var languageIds = { + 'chs': '$0804', + 'cht': '$0404', + 'kor': '$0412' +}; +var encodings = { + 'chs': 'CP936', + 'cht': 'CP950', + 'jpn': 'CP932', + 'kor': 'CP949', + 'deu': 'CP1252', + 'fra': 'CP1252', + 'esn': 'CP1252', + 'rus': 'CP1251', + 'ita': 'CP1252', + 'ptb': 'CP1252', + 'hun': 'CP1250', + 'trk': 'CP1254' +}; +function createIslFile(base, originalFilePath, messages, language) { + var content = []; + var originalContent; + if (path.basename(originalFilePath) === 'Default') { + originalContent = new TextModel(fs.readFileSync(originalFilePath + '.isl', 'utf8')); + } + else { + originalContent = new TextModel(fs.readFileSync(originalFilePath + '.en.isl', 'utf8')); + } + originalContent.lines.forEach(function (line) { + if (line.length > 0) { + var firstChar = line.charAt(0); + if (firstChar === '[' || firstChar === ';') { + if (line === '; *** Inno Setup version 5.5.3+ English messages ***') { + content.push("; *** Inno Setup version 5.5.3+ " + languageNames[language] + " messages ***"); + } + else { + content.push(line); + } + } + else { + var sections = line.split('='); + var key = sections[0]; + var translated = line; + if (key) { + if (key === 'LanguageName') { + translated = key + "=" + languageNames[language]; + } + else if (key === 'LanguageID') { + translated = key + "=" + languageIds[language]; + } + else if (key === 'LanguageCodePage') { + translated = key + "=" + encodings[language].substr(2); + } + else { + var translatedMessage = messages[key]; + if (translatedMessage) { + translated = key + "=" + translatedMessage; + } + } + } + content.push(translated); + } + } + }); + var tag = iso639_3_to_2[language]; + var basename = path.basename(originalFilePath); + var filePath = path.join(base, path.dirname(originalFilePath), basename) + "." + tag + ".isl"; + return new File({ + path: filePath, + contents: iconv.encode(new Buffer(content.join('\r\n'), 'utf8'), encodings[language]) + }); +} +function encodeEntities(value) { + var result = []; + for (var i = 0; i < value.length; i++) { + var ch = value[i]; + switch (ch) { + case '<': + result.push('<'); + break; + case '>': + result.push('>'); + break; + case '&': + result.push('&'); + break; + default: + result.push(ch); + } + } + return result.join(''); +} +function decodeEntities(value) { + return value.replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&'); +} diff --git a/build/lib/tslint/translationRemindRule.js b/build/lib/tslint/translationRemindRule.js index 8db41098be53e..53e6929d8e6de 100644 --- a/build/lib/tslint/translationRemindRule.js +++ b/build/lib/tslint/translationRemindRule.js @@ -1,72 +1,72 @@ -"use strict"; -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Lint = require("tslint"); -var fs = require("fs"); -var Rule = (function (_super) { - __extends(Rule, _super); - function Rule() { - return _super !== null && _super.apply(this, arguments) || this; - } - Rule.prototype.apply = function (sourceFile) { - return this.applyWithWalker(new TranslationRemindRuleWalker(sourceFile, this.getOptions())); - }; - return Rule; -}(Lint.Rules.AbstractRule)); -exports.Rule = Rule; -var TranslationRemindRuleWalker = (function (_super) { - __extends(TranslationRemindRuleWalker, _super); - function TranslationRemindRuleWalker(file, opts) { - return _super.call(this, file, opts) || this; - } - TranslationRemindRuleWalker.prototype.visitImportDeclaration = function (node) { - var declaration = node.moduleSpecifier.getText(); - if (declaration !== "'" + TranslationRemindRuleWalker.NLS_MODULE + "'") { - return; - } - this.visitImportLikeDeclaration(node); - }; - TranslationRemindRuleWalker.prototype.visitImportEqualsDeclaration = function (node) { - var reference = node.moduleReference.getText(); - if (reference !== "require('" + TranslationRemindRuleWalker.NLS_MODULE + "')") { - return; - } - this.visitImportLikeDeclaration(node); - }; - TranslationRemindRuleWalker.prototype.visitImportLikeDeclaration = function (node) { - var currentFile = node.getSourceFile().fileName; - var matchService = currentFile.match(/vs\/workbench\/services\/\w+/); - var matchPart = currentFile.match(/vs\/workbench\/parts\/\w+/); - if (!matchService && !matchPart) { - return; - } - var resource = matchService ? matchService[0] : matchPart[0]; - var resourceDefined = false; - var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); - var workbenchResources = JSON.parse(json).workbench; - workbenchResources.forEach(function (existingResource) { - if (existingResource.name === resource) { - resourceDefined = true; - return; - } - }); - if (!resourceDefined) { - this.addFailureAtNode(node, "Please add '" + resource + "' to ./builds/lib/i18n.resources.json file to use translations here."); - } - }; - return TranslationRemindRuleWalker; -}(Lint.RuleWalker)); -TranslationRemindRuleWalker.NLS_MODULE = 'vs/nls'; +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Lint = require("tslint"); +var fs = require("fs"); +var Rule = (function (_super) { + __extends(Rule, _super); + function Rule() { + return _super !== null && _super.apply(this, arguments) || this; + } + Rule.prototype.apply = function (sourceFile) { + return this.applyWithWalker(new TranslationRemindRuleWalker(sourceFile, this.getOptions())); + }; + return Rule; +}(Lint.Rules.AbstractRule)); +exports.Rule = Rule; +var TranslationRemindRuleWalker = (function (_super) { + __extends(TranslationRemindRuleWalker, _super); + function TranslationRemindRuleWalker(file, opts) { + return _super.call(this, file, opts) || this; + } + TranslationRemindRuleWalker.prototype.visitImportDeclaration = function (node) { + var declaration = node.moduleSpecifier.getText(); + if (declaration !== "'" + TranslationRemindRuleWalker.NLS_MODULE + "'") { + return; + } + this.visitImportLikeDeclaration(node); + }; + TranslationRemindRuleWalker.prototype.visitImportEqualsDeclaration = function (node) { + var reference = node.moduleReference.getText(); + if (reference !== "require('" + TranslationRemindRuleWalker.NLS_MODULE + "')") { + return; + } + this.visitImportLikeDeclaration(node); + }; + TranslationRemindRuleWalker.prototype.visitImportLikeDeclaration = function (node) { + var currentFile = node.getSourceFile().fileName; + var matchService = currentFile.match(/vs\/workbench\/services\/\w+/); + var matchPart = currentFile.match(/vs\/workbench\/parts\/\w+/); + if (!matchService && !matchPart) { + return; + } + var resource = matchService ? matchService[0] : matchPart[0]; + var resourceDefined = false; + var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + var workbenchResources = JSON.parse(json).workbench; + workbenchResources.forEach(function (existingResource) { + if (existingResource.name === resource) { + resourceDefined = true; + return; + } + }); + if (!resourceDefined) { + this.addFailureAtNode(node, "Please add '" + resource + "' to ./builds/lib/i18n.resources.json file to use translations here."); + } + }; + return TranslationRemindRuleWalker; +}(Lint.RuleWalker)); +TranslationRemindRuleWalker.NLS_MODULE = 'vs/nls'; From c5e3c8f1083e1372a4942419000bbda74fb4fe27 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 9 Jun 2017 18:22:17 +0200 Subject: [PATCH 1691/2747] Untitled: picked encoding is not restored after restart (fixes #28364) --- src/vs/platform/editor/common/editor.ts | 5 +++++ .../parts/editor/editor.contribution.ts | 7 +++++-- .../common/editor/untitledEditorInput.ts | 20 +++++++++---------- .../common/editor/untitledEditorModel.ts | 11 +++------- .../files/common/editors/fileEditorInput.ts | 9 ++------- .../services/editor/browser/editorService.ts | 2 +- .../untitled/common/untitledEditorService.ts | 13 ++++++------ 7 files changed, 32 insertions(+), 35 deletions(-) diff --git a/src/vs/platform/editor/common/editor.ts b/src/vs/platform/editor/common/editor.ts index 81dc32ec8bc88..9beffac6e9cde 100644 --- a/src/vs/platform/editor/common/editor.ts +++ b/src/vs/platform/editor/common/editor.ts @@ -90,6 +90,11 @@ export interface IUntitledResourceInput extends IBaseResourceInput { * Optional contents of the untitled resource. */ contents?: string; + + /** + * Optional encoding of the untitled resource. + */ + encoding?: string; } export interface IResourceDiffInput extends IBaseResourceInput { diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts index 8c6275f0b55b9..cd4bc5a15ea72 100644 --- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts +++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts @@ -93,6 +93,7 @@ interface ISerializedUntitledEditorInput { resource: string; resourceJSON: any; modeId: string; + encoding: string; } // Register Editor Input Factory @@ -118,7 +119,8 @@ class UntitledEditorInputFactory implements IEditorInputFactory { const serialized: ISerializedUntitledEditorInput = { resource: resource.toString(), // Keep for backwards compatibility resourceJSON: resource.toJSON(), - modeId: untitledEditorInput.getModeId() + modeId: untitledEditorInput.getModeId(), + encoding: untitledEditorInput.getEncoding() }; return JSON.stringify(serialized); @@ -130,8 +132,9 @@ class UntitledEditorInputFactory implements IEditorInputFactory { const resource = !!deserialized.resourceJSON ? URI.revive(deserialized.resourceJSON) : URI.parse(deserialized.resource); const filePath = resource.scheme === 'file' ? resource.fsPath : void 0; const language = deserialized.modeId; + const encoding = deserialized.encoding; - return accessor.get(IWorkbenchEditorService).createInput({ resource, filePath, language }) as UntitledEditorInput; + return accessor.get(IWorkbenchEditorService).createInput({ resource, filePath, language, encoding }) as UntitledEditorInput; }); } } diff --git a/src/vs/workbench/common/editor/untitledEditorInput.ts b/src/vs/workbench/common/editor/untitledEditorInput.ts index 0d27f28551257..081b9bd7df419 100644 --- a/src/vs/workbench/common/editor/untitledEditorInput.ts +++ b/src/vs/workbench/common/editor/untitledEditorInput.ts @@ -27,10 +27,7 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport public static ID: string = 'workbench.editors.untitledEditorInput'; - private resource: URI; private _hasAssociatedFilePath: boolean; - private initialValue: string; - private modeId: string; private cachedModel: UntitledEditorModel; private modelResolve: TPromise; @@ -40,10 +37,11 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport private toUnbind: IDisposable[]; constructor( - resource: URI, + private resource: URI, hasAssociatedFilePath: boolean, - modeId: string, - initialValue: string, + private modeId: string, + private initialValue: string, + private preferredEncoding: string, @IInstantiationService private instantiationService: IInstantiationService, @IWorkspaceContextService private contextService: IWorkspaceContextService, @ITextFileService private textFileService: ITextFileService, @@ -51,11 +49,9 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport ) { super(); - this.resource = resource; - this.initialValue = initialValue; this._hasAssociatedFilePath = hasAssociatedFilePath; - this.modeId = modeId; this.toUnbind = []; + this._onDidModelChangeContent = new Emitter(); this._onDidModelChangeEncoding = new Emitter(); } @@ -146,10 +142,12 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport return this.cachedModel.getEncoding(); } - return null; + return this.preferredEncoding; } public setEncoding(encoding: string, mode: EncodingMode /* ignored, we only have Encode */): void { + this.preferredEncoding = encoding; + if (this.cachedModel) { this.cachedModel.setEncoding(encoding); } @@ -170,7 +168,7 @@ export class UntitledEditorInput extends EditorInput implements IEncodingSupport } private createModel(): UntitledEditorModel { - const model = this.instantiationService.createInstance(UntitledEditorModel, this.modeId, this.resource, this.hasAssociatedFilePath, this.initialValue); + const model = this.instantiationService.createInstance(UntitledEditorModel, this.modeId, this.resource, this.hasAssociatedFilePath, this.initialValue, this.preferredEncoding); // re-emit some events from the model this.toUnbind.push(model.onDidChangeContent(() => this._onDidModelChangeContent.fire())); diff --git a/src/vs/workbench/common/editor/untitledEditorModel.ts b/src/vs/workbench/common/editor/untitledEditorModel.ts index bd0bb5300b1b0..65e8c973201d6 100644 --- a/src/vs/workbench/common/editor/untitledEditorModel.ts +++ b/src/vs/workbench/common/editor/untitledEditorModel.ts @@ -38,16 +38,13 @@ export class UntitledEditorModel extends BaseTextEditorModel implements IEncodin private contentChangeEventScheduler: RunOnceScheduler; private configuredEncoding: string; - private preferredEncoding: string; - - private hasAssociatedFilePath: boolean; - private initialValue: string; constructor( private modeId: string, private resource: URI, - hasAssociatedFilePath: boolean, - initialValue: string, + private hasAssociatedFilePath: boolean, + private initialValue: string, + private preferredEncoding: string, @IModeService modeService: IModeService, @IModelService modelService: IModelService, @IBackupFileService private backupFileService: IBackupFileService, @@ -56,8 +53,6 @@ export class UntitledEditorModel extends BaseTextEditorModel implements IEncodin ) { super(modelService, modeService); - this.hasAssociatedFilePath = hasAssociatedFilePath; - this.initialValue = initialValue; this.dirty = false; this.versionId = 0; diff --git a/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts b/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts index 2409a85a81138..d2b5a8b9235b0 100644 --- a/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts +++ b/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts @@ -27,8 +27,6 @@ import { ITextModelResolverService } from 'vs/editor/common/services/resolverSer * A file editor input is the input type for the file editor of file system resources. */ export class FileEditorInput extends EditorInput implements IFileEditorInput { - private resource: URI; - private preferredEncoding: string; private forceOpenAsBinary: boolean; private textModelReference: TPromise>; @@ -46,8 +44,8 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput { * An editor input who's contents are retrieved from file services. */ constructor( - resource: URI, - preferredEncoding: string, + private resource: URI, + private preferredEncoding: string, @IInstantiationService private instantiationService: IInstantiationService, @IWorkspaceContextService private contextService: IWorkspaceContextService, @ITextFileService private textFileService: ITextFileService, @@ -58,9 +56,6 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput { this.toUnbind = []; - this.resource = resource; - this.preferredEncoding = preferredEncoding; - this.registerListeners(); } diff --git a/src/vs/workbench/services/editor/browser/editorService.ts b/src/vs/workbench/services/editor/browser/editorService.ts index afd412d0127b7..e8b52c75a1e7f 100644 --- a/src/vs/workbench/services/editor/browser/editorService.ts +++ b/src/vs/workbench/services/editor/browser/editorService.ts @@ -233,7 +233,7 @@ export class WorkbenchEditorService implements IWorkbenchEditorService { // Untitled file support const untitledInput = input; if (!untitledInput.resource || typeof untitledInput.filePath === 'string' || (untitledInput.resource instanceof URI && untitledInput.resource.scheme === UNTITLED_SCHEMA)) { - return this.untitledEditorService.createOrGet(untitledInput.filePath ? URI.file(untitledInput.filePath) : untitledInput.resource, untitledInput.language, untitledInput.contents); + return this.untitledEditorService.createOrGet(untitledInput.filePath ? URI.file(untitledInput.filePath) : untitledInput.resource, untitledInput.language, untitledInput.contents, untitledInput.encoding); } const resourceInput = input; diff --git a/src/vs/workbench/services/untitled/common/untitledEditorService.ts b/src/vs/workbench/services/untitled/common/untitledEditorService.ts index 264aa9275d42f..89d3f6f43051b 100644 --- a/src/vs/workbench/services/untitled/common/untitledEditorService.ts +++ b/src/vs/workbench/services/untitled/common/untitledEditorService.ts @@ -24,6 +24,7 @@ export interface IModelLoadOrCreateOptions { resource?: URI; modeId?: string; initialValue?: string; + encoding?: string; } export interface IUntitledEditorService { @@ -77,7 +78,7 @@ export interface IUntitledEditorService { * It is valid to pass in a file resource. In that case the path will be used as identifier. * The use case is to be able to create a new file with a specific path with VSCode. */ - createOrGet(resource?: URI, modeId?: string, initialValue?: string): UntitledEditorInput; + createOrGet(resource?: URI, modeId?: string, initialValue?: string, encoding?: string): UntitledEditorInput; /** * Creates a new untitled model with the optional resource URI or returns an existing one @@ -194,10 +195,10 @@ export class UntitledEditorService implements IUntitledEditorService { } public loadOrCreate(options: IModelLoadOrCreateOptions = Object.create(null)): TPromise { - return this.createOrGet(options.resource, options.modeId, options.initialValue).resolve(); + return this.createOrGet(options.resource, options.modeId, options.initialValue, options.encoding).resolve(); } - public createOrGet(resource?: URI, modeId?: string, initialValue?: string): UntitledEditorInput { + public createOrGet(resource?: URI, modeId?: string, initialValue?: string, encoding?: string): UntitledEditorInput { // Massage resource if it comes with a file:// scheme let hasAssociatedFilePath = false; @@ -216,10 +217,10 @@ export class UntitledEditorService implements IUntitledEditorService { } // Create new otherwise - return this.doCreate(resource, hasAssociatedFilePath, modeId, initialValue); + return this.doCreate(resource, hasAssociatedFilePath, modeId, initialValue, encoding); } - private doCreate(resource?: URI, hasAssociatedFilePath?: boolean, modeId?: string, initialValue?: string): UntitledEditorInput { + private doCreate(resource?: URI, hasAssociatedFilePath?: boolean, modeId?: string, initialValue?: string, encoding?: string): UntitledEditorInput { if (!resource) { // Create new taking a resource URI that is not already taken @@ -238,7 +239,7 @@ export class UntitledEditorService implements IUntitledEditorService { } } - const input = this.instantiationService.createInstance(UntitledEditorInput, resource, hasAssociatedFilePath, modeId, initialValue); + const input = this.instantiationService.createInstance(UntitledEditorInput, resource, hasAssociatedFilePath, modeId, initialValue, encoding); const contentListener = input.onDidModelChangeContent(() => { this._onDidChangeContent.fire(resource); From 7925fce1312a653b1c4389cd44a31436c0330972 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 9 Jun 2017 11:38:39 -0700 Subject: [PATCH 1692/2747] Fixes #28293 --- src/vs/base/common/glob.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/common/glob.ts b/src/vs/base/common/glob.ts index 8fcd060bf94b3..fd6a973da8d47 100644 --- a/src/vs/base/common/glob.ts +++ b/src/vs/base/common/glob.ts @@ -437,7 +437,7 @@ export function parseToAsync(expression: IExpression, options?: IGlobOptions): P const parsedExpression = parse(expression, options); return (path: string, basename?: string, siblingsFn?: () => TPromise): TPromise => { const result = parsedExpression(path, basename, siblingsFn); - return typeof result === 'string' ? TPromise.as(result) : result; + return result instanceof TPromise ? result : TPromise.as(result); }; } From 1777366530dd13dcbd4081cb690a21a4d329e903 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 9 Jun 2017 12:16:39 -0700 Subject: [PATCH 1693/2747] Uplevel xterm.js Fixes #26038 --- npm-shrinkwrap.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 3e962373c7d9d..2306ffaedb5a3 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -442,7 +442,7 @@ "xterm": { "version": "2.6.0", "from": "Tyriar/xterm.js#vscode-release/1.13", - "resolved": "git+https://github.com/Tyriar/xterm.js.git#32c9eac8ee5a958093d126a06c1c06a7cd6052bf" + "resolved": "git+https://github.com/Tyriar/xterm.js.git#55e0399c1b3ccf06c5d677bf7945b9b2d598fc16" }, "yauzl": { "version": "2.3.1", From 43abcc20b3b47e1153e116ee98636a6ec9c3a68d Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Fri, 9 Jun 2017 22:26:56 +0200 Subject: [PATCH 1694/2747] Fixes #28379: Run Task should be sorted using MRU list --- src/vs/base/common/linkedMap.ts | 306 ++++++++++++++++++ .../parts/tasks/browser/quickOpen.ts | 56 ++-- .../parts/tasks/common/taskService.ts | 2 + .../electron-browser/task.contribution.ts | 41 ++- 4 files changed, 376 insertions(+), 29 deletions(-) create mode 100644 src/vs/base/common/linkedMap.ts diff --git a/src/vs/base/common/linkedMap.ts b/src/vs/base/common/linkedMap.ts new file mode 100644 index 0000000000000..65eaa0e6c85e9 --- /dev/null +++ b/src/vs/base/common/linkedMap.ts @@ -0,0 +1,306 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +interface Item { + previous: Item | undefined; + next: Item | undefined; + key: K; + value: V; +} + +export namespace Touch { + export const None: 0 = 0; + export const First: 1 = 1; + export const Last: 2 = 2; +} + +export type Touch = 0 | 1 | 2; + +export class LinkedMap { + + private _map: Map>; + private _head: Item | undefined; + private _tail: Item | undefined; + private _size: number; + + constructor() { + this._map = new Map>(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + } + + public clear(): void { + this._map.clear(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + } + + public isEmpty(): boolean { + return !this._head && !this._tail; + } + + public get size(): number { + return this._size; + } + + public has(key: K): boolean { + return this._map.has(key); + } + + public get(key: K): V | undefined { + const item = this._map.get(key); + if (!item) { + return undefined; + } + return item.value; + } + + public set(key: K, value: V, touch: Touch = Touch.None): void { + let item = this._map.get(key); + if (item) { + item.value = value; + if (touch !== Touch.None) { + this.touch(item, touch); + } + } else { + item = { key, value, next: undefined, previous: undefined }; + switch (touch) { + case Touch.None: + this.addItemLast(item); + break; + case Touch.First: + this.addItemFirst(item); + break; + case Touch.Last: + this.addItemLast(item); + break; + default: + this.addItemLast(item); + break; + } + this._map.set(key, item); + this._size++; + } + } + + public delete(key: K): boolean { + const item = this._map.get(key); + if (!item) { + return false; + } + this._map.delete(key); + this.removeItem(item); + this._size--; + return true; + } + + public shift(): V | undefined { + if (!this._head && !this._tail) { + return undefined; + } + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + const item = this._head; + this._map.delete(item.key); + this.removeItem(item); + this._size--; + return item.value; + } + + public forEach(callbackfn: (value: V, key: K, map: LinkedMap) => void, thisArg?: any): void { + let current = this._head; + while (current) { + if (thisArg) { + callbackfn.bind(thisArg)(current.value, current.key, this); + } else { + callbackfn(current.value, current.key, this); + } + current = current.next; + } + } + + public forEachReverse(callbackfn: (value: V, key: K, map: LinkedMap) => void, thisArg?: any): void { + let current = this._tail; + while (current) { + if (thisArg) { + callbackfn.bind(thisArg)(current.value, current.key, this); + } else { + callbackfn(current.value, current.key, this); + } + current = current.previous; + } + } + + public values(): V[] { + let result: V[] = []; + let current = this._head; + while (current) { + result.push(current.value); + current = current.next; + } + return result; + } + + public keys(): K[] { + let result: K[] = []; + let current = this._head; + while (current) { + result.push(current.key); + current = current.next; + } + return result; + } + + /* VS Code / Monaco editor runs on es5 which has no Symbol.iterator + public keys(): IterableIterator { + let current = this._head; + let iterator: IterableIterator = { + [Symbol.iterator]() { + return iterator; + }, + next():IteratorResult { + if (current) { + let result = { value: current.key, done: false }; + current = current.next; + return result; + } else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + + public values(): IterableIterator { + let current = this._head; + let iterator: IterableIterator = { + [Symbol.iterator]() { + return iterator; + }, + next():IteratorResult { + if (current) { + let result = { value: current.value, done: false }; + current = current.next; + return result; + } else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + */ + + private addItemFirst(item: Item): void { + // First time Insert + if (!this._head && !this._tail) { + this._tail = item; + } else if (!this._head) { + throw new Error('Invalid list'); + } else { + item.next = this._head; + this._head.previous = item; + } + this._head = item; + } + + private addItemLast(item: Item): void { + // First time Insert + if (!this._head && !this._tail) { + this._head = item; + } else if (!this._tail) { + throw new Error('Invalid list'); + } else { + item.previous = this._tail; + this._tail.next = item; + } + this._tail = item; + } + + private removeItem(item: Item): void { + if (item === this._head && item === this._tail) { + this._head = undefined; + this._tail = undefined; + } + else if (item === this._head) { + this._head = item.next; + } + else if (item === this._tail) { + this._tail = item.previous; + } + else { + const next = item.next; + const previous = item.previous; + if (!next || !previous) { + throw new Error('Invalid list'); + } + next.previous = previous; + previous.next = next; + } + } + + private touch(item: Item, touch: Touch): void { + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + if ((touch !== Touch.First && touch !== Touch.Last)) { + return; + } + + if (touch === Touch.First) { + if (item === this._head) { + return; + } + + const next = item.next; + const previous = item.previous; + + // Unlink the item + if (item === this._tail) { + // previous must be defined since item was not head but is tail + // So there are more than on item in the map + previous!.next = undefined; + this._tail = previous; + } + else { + // Both next and previous are not undefined since item was neither head nor tail. + next!.previous = previous; + previous!.next = next; + } + + // Insert the node at head + item.previous = undefined; + item.next = this._head; + this._head.previous = item; + this._head = item; + } else if (touch === Touch.Last) { + if (item === this._tail) { + return; + } + + const next = item.next; + const previous = item.previous; + + // Unlink the item. + if (item === this._head) { + // next must be defined since item was not tail but is head + // So there are more than on item in the map + next!.previous = undefined; + this._head = next; + } else { + // Both next and previous are not undefined since item was neither head nor tail. + next!.previous = previous; + previous!.next = next; + } + item.next = undefined; + item.previous = this._tail; + this._tail.next = item; + this._tail = item; + } + } +} \ No newline at end of file diff --git a/src/vs/workbench/parts/tasks/browser/quickOpen.ts b/src/vs/workbench/parts/tasks/browser/quickOpen.ts index c8661e0d52cc6..9368b61de9a07 100644 --- a/src/vs/workbench/parts/tasks/browser/quickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/quickOpen.ts @@ -8,6 +8,8 @@ import nls = require('vs/nls'); import Filters = require('vs/base/common/filters'); import { TPromise } from 'vs/base/common/winjs.base'; import { Action, IAction } from 'vs/base/common/actions'; +import { IStringDictionary } from 'vs/base/common/collections'; + import Quickopen = require('vs/workbench/browser/quickopen'); import QuickOpen = require('vs/base/parts/quickopen/common/quickOpen'); import Model = require('vs/base/parts/quickopen/browser/quickOpenModel'); @@ -49,7 +51,7 @@ export abstract class QuickOpenHandler extends Quickopen.QuickOpenHandler { constructor( protected quickOpenService: IQuickOpenService, - protected taskService: ITaskService, + protected taskService: ITaskService ) { super(); @@ -71,39 +73,39 @@ export abstract class QuickOpenHandler extends Quickopen.QuickOpenHandler { if (tasks.length === 0) { return new Model.QuickOpenModel(entries); } - tasks = tasks.sort((a, b) => { - let aKind = a._source.kind; - let bKind = b._source.kind; - if (aKind === bKind) { - if (aKind === TaskSourceKind.Extension) { - let compare = a._source.label.localeCompare(b._source.label); - if (compare !== 0) { - return compare; - } - } - return a._label.localeCompare(b._label); - } - if (aKind === TaskSourceKind.Workspace) { - return -1; - } else { - return +1; + let recentlyUsedTasks = this.taskService.getRecentlyUsedTasks(); + let recent: Task[] = []; + let others: Task[] = []; + let taskMap: IStringDictionary = Object.create(null); + tasks.forEach(task => taskMap[task.identifier] = task); + recentlyUsedTasks.keys().forEach(key => { + let task = taskMap[key]; + if (task) { + recent.push(task); } }); - let firstWorkspace: boolean = true; - let firstExtension: boolean = true; - let hadWorkspace: boolean = false; for (let task of tasks) { + if (!recentlyUsedTasks.has(task.identifier)) { + others.push(task); + } + } + others = others.sort((a, b) => a._source.label.localeCompare(b._source.label)); + let sortedTasks = recent.concat(others); + let recentlyUsed: boolean = recentlyUsedTasks.has(tasks[0].identifier); + let otherTasks: boolean = !recentlyUsedTasks.has(tasks[tasks.length - 1].identifier); + let hasRecentlyUsed: boolean = false; + for (let task of sortedTasks) { let highlights = Filters.matchesContiguousSubString(input, task._label); if (!highlights) { continue; } - if (task._source.kind === TaskSourceKind.Workspace && firstWorkspace) { - firstWorkspace = false; - hadWorkspace = true; - entries.push(new TaskGroupEntry(this.createEntry(this.taskService, task, highlights), nls.localize('configured', 'Configured Tasks'), false)); - } else if (task._source.kind === TaskSourceKind.Extension && firstExtension) { - firstExtension = false; - entries.push(new TaskGroupEntry(this.createEntry(this.taskService, task, highlights), nls.localize('detected', 'Detected Tasks'), hadWorkspace)); + if (recentlyUsed) { + recentlyUsed = false; + hasRecentlyUsed = true; + entries.push(new TaskGroupEntry(this.createEntry(this.taskService, task, highlights), nls.localize('recentlyUsed', 'recently used'), false)); + } else if (!recentlyUsedTasks.has(task.identifier) && otherTasks) { + otherTasks = false; + entries.push(new TaskGroupEntry(this.createEntry(this.taskService, task, highlights), nls.localize('other tasks', 'other tasks'), hasRecentlyUsed)); } else { entries.push(this.createEntry(this.taskService, task, highlights)); } diff --git a/src/vs/workbench/parts/tasks/common/taskService.ts b/src/vs/workbench/parts/tasks/common/taskService.ts index b410569a283d3..89ab0e6d57cba 100644 --- a/src/vs/workbench/parts/tasks/common/taskService.ts +++ b/src/vs/workbench/parts/tasks/common/taskService.ts @@ -8,6 +8,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { Action } from 'vs/base/common/actions'; import { IEventEmitter } from 'vs/base/common/eventEmitter'; import { TerminateResponse } from 'vs/base/common/processes'; +import { LinkedMap } from 'vs/base/common/linkedMap'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { Task, TaskSet } from 'vs/workbench/parts/tasks/common/tasks'; import { ITaskSummary, TaskEvent, TaskType } from 'vs/workbench/parts/tasks/common/taskSystem'; @@ -43,6 +44,7 @@ export interface ITaskService extends IEventEmitter { terminateAll(): TPromise; tasks(): TPromise; getTasksForGroup(group: string): TPromise; + getRecentlyUsedTasks(): LinkedMap; customize(task: Task, openConfig?: boolean): TPromise; diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index ee12526316b55..10b8f78aba5ea 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -29,6 +29,7 @@ import { TerminateResponse, TerminateResponseCode } from 'vs/base/common/process import * as strings from 'vs/base/common/strings'; import { ValidationStatus, ValidationState } from 'vs/base/common/parsers'; import * as UUID from 'vs/base/common/uuid'; +import { LinkedMap, Touch } from 'vs/base/common/linkedMap'; import { Registry } from 'vs/platform/platform'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; @@ -45,7 +46,7 @@ import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { ProblemMatcherRegistry } from 'vs/platform/markers/common/problemMatcher'; - +import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IModeService } from 'vs/editor/common/services/modeService'; import { IModelService } from 'vs/editor/common/services/modelService'; @@ -516,6 +517,7 @@ interface WorkspaceConfigurationResult { class TaskService extends EventEmitter implements ITaskService { // private static autoDetectTelemetryName: string = 'taskServer.autoDetect'; + private static RecentlyUsedTasks_Key = 'workbench.tasks.recentlyUsedTasks'; public _serviceBrand: any; public static SERVICE_ID: string = 'taskService'; @@ -544,6 +546,7 @@ class TaskService extends EventEmitter implements ITaskService { private _taskSystem: ITaskSystem; private _taskSystemListeners: IDisposable[]; + private _recentlyUsedTasks: LinkedMap; private _outputChannel: IOutputChannel; @@ -559,7 +562,8 @@ class TaskService extends EventEmitter implements ITaskService { @IEnvironmentService private environmentService: IEnvironmentService, @IConfigurationResolverService private configurationResolverService: IConfigurationResolverService, @ITerminalService private terminalService: ITerminalService, - @IWorkbenchEditorService private workbenchEditorService: IWorkbenchEditorService + @IWorkbenchEditorService private workbenchEditorService: IWorkbenchEditorService, + @IStorageService private storageService: IStorageService ) { super(); @@ -689,6 +693,37 @@ class TaskService extends EventEmitter implements ITaskService { return TPromise.as(this._taskSystem.getActiveTasks()); } + public getRecentlyUsedTasks(): LinkedMap { + if (this._recentlyUsedTasks) { + return this._recentlyUsedTasks; + } + this._recentlyUsedTasks = new LinkedMap(); + let storageValue = this.storageService.get(TaskService.RecentlyUsedTasks_Key, StorageScope.WORKSPACE); + if (storageValue) { + try { + let values: string[] = JSON.parse(storageValue); + if (Array.isArray(values)) { + for (let value of values) { + this._recentlyUsedTasks.set(value, value); + } + } + } catch (error) { + // Ignore. We use the empty result + } + } + return this._recentlyUsedTasks; + } + + private saveRecentlyUsedTasks(): void { + if (!this._recentlyUsedTasks) { + return; + } + let values = this._recentlyUsedTasks.values(); + if (values.length > 30) { + values = values.slice(0, 30); + } + this.storageService.store(TaskService.RecentlyUsedTasks_Key, JSON.stringify(values), StorageScope.WORKSPACE); + } public build(): TPromise { return this.getTaskSets().then((values) => { @@ -896,6 +931,7 @@ class TaskService extends EventEmitter implements ITaskService { throw new TaskError(Severity.Warning, nls.localize('TaskSystem.active', 'There is already a task running. Terminate it first before executing another task.'), TaskErrors.RunningTask); } } + this.getRecentlyUsedTasks().set(task.identifier, task.identifier, Touch.First); return executeResult.promise; }); }); @@ -1248,6 +1284,7 @@ class TaskService extends EventEmitter implements ITaskService { } public beforeShutdown(): boolean | TPromise { + this.saveRecentlyUsedTasks(); if (this._taskSystem && this._taskSystem.isActiveSync()) { if (this._taskSystem.canAutoTerminate() || this.messageService.confirm({ message: nls.localize('TaskSystem.runningTask', 'There is a task running. Do you want to terminate it?'), From dd7277720b217a46eb6b9e21e3b9bbfd48f1bb7e Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 9 Jun 2017 14:05:57 -0700 Subject: [PATCH 1695/2747] Uplevel xterm.js --- npm-shrinkwrap.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 58d2fcc6cde18..01a089f82644a 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -441,8 +441,8 @@ }, "xterm": { "version": "2.7.0", - "from": "Tyriar/xterm.js#vscode-release/1.14-beta", - "resolved": "git+https://github.com/Tyriar/xterm.js.git#e6130919622e238221ee9c8806cca8f084cfec2c" + "from": "Tyriar/xterm.js#vscode-release/1.14", + "resolved": "git+https://github.com/Tyriar/xterm.js.git#1d7007669dec1f60e5878aa102a36473d8cbd97f" }, "yauzl": { "version": "2.3.1", diff --git a/package.json b/package.json index 588c630f9af34..09d83d51cb262 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "vscode-ripgrep": "0.0.12", "vscode-textmate": "^3.1.5", "winreg": "1.2.0", - "xterm": "Tyriar/xterm.js#vscode-release/1.14-beta", + "xterm": "Tyriar/xterm.js#vscode-release/1.14", "yauzl": "2.3.1" }, "devDependencies": { From 32566fd1f1959de84a98be06fcfcd397ad729ead Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 9 Jun 2017 14:54:31 -0700 Subject: [PATCH 1696/2747] Add scss and pug to markdown fenced codeblock syntax highlighting Fixes #28382 --- extensions/markdown/syntaxes/gulpfile.js | 4 +- .../markdown/syntaxes/markdown.tmLanguage | 57 ++++++++++++++++++- .../syntaxes/markdown.tmLanguage.base | 4 +- 3 files changed, 61 insertions(+), 4 deletions(-) diff --git a/extensions/markdown/syntaxes/gulpfile.js b/extensions/markdown/syntaxes/gulpfile.js index a01ff06499cb9..15545e82502a0 100644 --- a/extensions/markdown/syntaxes/gulpfile.js +++ b/extensions/markdown/syntaxes/gulpfile.js @@ -32,13 +32,15 @@ const languages = [ { name: 'git_rebase', identifiers: ['git-rebase-todo'], source: 'text.git-rebase' }, { name: 'go', identifiers: ['go', 'golang'], source: 'source.go' }, { name: 'groovy', identifiers: ['groovy', 'gvy'], source: 'source.groovy' }, - { name: 'jade', identifiers: ['jade'], source: 'text.jade' }, + { name: 'jade', identifiers: ['jade', 'pug'], source: 'text.jade' }, { name: 'js', identifiers: ['js', 'jsx', 'javascript', 'es6', 'mjs'], source: 'source.js' }, { name: 'js_regexp', identifiers: ['regexp'], source: 'source.js.regexp' }, { name: 'json', identifiers: ['json', 'sublime-settings', 'sublime-menu', 'sublime-keymap', 'sublime-mousemap', 'sublime-theme', 'sublime-build', 'sublime-project', 'sublime-completions'], source: 'source.json' }, { name: 'less', identifiers: ['less'], source: 'source.css.less' }, { name: 'objc', identifiers: ['objectivec', 'objective-c', 'mm', 'objc', 'obj-c', 'm', 'h'], source: 'source.objc' }, + { name: 'scss', identifiers: ['scss'], source: 'source.css.scss' }, + { name: 'perl6', identifiers: ['perl6', 'p6', 'pl6', 'pm6', 'nqp'], source: 'source.perl.6' }, { name: 'powershell', identifiers: ['powershell', 'ps1', 'psm1', 'psd1'], source: 'source.powershell' }, { name: 'python', identifiers: ['python', 'py', 'py3', 'rpy', 'pyw', 'cpy', 'SConstruct', 'Sconstruct', 'sconstruct', 'SConscript', 'gyp', 'gypi'], source: 'source.python' }, diff --git a/extensions/markdown/syntaxes/markdown.tmLanguage b/extensions/markdown/syntaxes/markdown.tmLanguage index 38d1292f7e4c1..d9ac2a0ba6c44 100644 --- a/extensions/markdown/syntaxes/markdown.tmLanguage +++ b/extensions/markdown/syntaxes/markdown.tmLanguage @@ -174,6 +174,10 @@ include #fenced_code_block_objc + + include + #fenced_code_block_scss + include #fenced_code_block_perl6 @@ -1914,7 +1918,7 @@ fenced_code_block_jade begin - (^|\G)(\s*)([`~]{3,})\s*((jade)(\s+[^`~]*)?$) + (^|\G)(\s*)([`~]{3,})\s*((jade|pug)(\s+[^`~]*)?$) name markup.fenced_code.block.markdown end @@ -2217,6 +2221,57 @@ + fenced_code_block_scss + + begin + (^|\G)(\s*)([`~]{3,})\s*((scss)(\s+[^`~]*)?$) + name + markup.fenced_code.block.markdown + end + (^|\G)(\2|\s{0,3})(\3)\s*$ + beginCaptures + + 3 + + name + punctuation.definition.markdown + + 5 + + name + fenced_code.block.language + + 6 + + name + fenced_code.block.language.attributes + + + endCaptures + + 3 + + name + punctuation.definition.markdown + + + patterns + + + begin + (^|\G)(\s*)(.*) + while + (^|\G)(?!\s*([`~]{3,})\s*$) + patterns + + + include + source.css.scss + + + + + fenced_code_block_perl6 begin diff --git a/extensions/markdown/syntaxes/markdown.tmLanguage.base b/extensions/markdown/syntaxes/markdown.tmLanguage.base index 6a8868a260bfb..7c5a5558a18c0 100644 --- a/extensions/markdown/syntaxes/markdown.tmLanguage.base +++ b/extensions/markdown/syntaxes/markdown.tmLanguage.base @@ -416,7 +416,7 @@ name markup.fenced_code.block.markdown begin - (^|\G)(\s*)([`~]{3,})\s*(?=[^`~]*)?$ + (^|\G)(\s*)([`~]{3,})\s*(?=([^`~]*)?$) end (^|\G)(\2|\s{0,3})(\3)\s*$ beginCaptures @@ -1118,7 +1118,7 @@ match - (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)([^\]]*+)(\]) + (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])(\[)([^\]]*+)(\]) name meta.link.reference.markdown From 3b8a3ca25e5ed631c6a786792ac85cc817b09891 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 9 Jun 2017 15:17:14 -0700 Subject: [PATCH 1697/2747] Enable contextisolation in webviews --- src/vs/workbench/parts/html/browser/webview.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/html/browser/webview.ts b/src/vs/workbench/parts/html/browser/webview.ts index b8d6922a84476..38005084ab2e2 100644 --- a/src/vs/workbench/parts/html/browser/webview.ts +++ b/src/vs/workbench/parts/html/browser/webview.ts @@ -21,7 +21,6 @@ declare interface WebviewElement extends HTMLElement { autoSize: 'on'; preload: string; contextIsolation: boolean; - send(channel: string, ...args: any[]); openDevTools(): any; } @@ -70,6 +69,7 @@ export default class Webview { this._webview.setAttribute('disableblinkfeatures', 'Auxclick'); this._webview.setAttribute('disableguestresize', ''); + this._webview.setAttribute('webpreferences', 'contextIsolation=yes'); this._webview.preload = require.toUrl('./webview-pre.js'); this._webview.src = require.toUrl('./webview.html'); From a50f22517ca4f8b00267d868495c89d1dac7d1d8 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Fri, 9 Jun 2017 15:23:35 -0700 Subject: [PATCH 1698/2747] Check for null/undefined before assigning kind --- extensions/emmet/src/emmetCompletionProvider.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/extensions/emmet/src/emmetCompletionProvider.ts b/extensions/emmet/src/emmetCompletionProvider.ts index acab02d57a578..84d762988d253 100644 --- a/extensions/emmet/src/emmetCompletionProvider.ts +++ b/extensions/emmet/src/emmetCompletionProvider.ts @@ -62,9 +62,12 @@ export class EmmetCompletionItemProviderHtml extends EmmetCompletionItemProvider protected getExpandedAbbreviation(document: vscode.TextDocument, position: vscode.Position): vscode.CompletionItem { let completionItem = super.getExpandedAbbreviation(document, position); - // In non stylesheet like syntax, this extension returns expanded abbr plus posssible abbr completions - // To differentiate between the 2, the former is given CompletionItemKind.Value so that it gets a different icon - completionItem.kind = vscode.CompletionItemKind.Value; + if (completionItem) { + // In non stylesheet like syntax, this extension returns expanded abbr plus posssible abbr completions + // To differentiate between the 2, the former is given CompletionItemKind.Value so that it gets a different icon + completionItem.kind = vscode.CompletionItemKind.Value; + } + return completionItem; } From 8702fba6f12b76dab8c1f661952c2ffcefd9abf3 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 9 Jun 2017 15:57:55 -0700 Subject: [PATCH 1699/2747] Apply terminal.foreground to the terminal cursor too Fixes #28389 --- .../terminal/electron-browser/media/xterm.css | 48 +------------------ .../electron-browser/terminalPanel.ts | 9 +++- 2 files changed, 10 insertions(+), 47 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css b/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css index 4ee863dbecb2d..4b6de38e73913 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css @@ -55,33 +55,10 @@ text-decoration: none; } -.monaco-workbench .panel.integrated-terminal .xterm:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar).focus .reverse-video, -.monaco-workbench .panel.integrated-terminal .xterm:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar):focus .reverse-video { color: #CCC; } -.vs-dark .monaco-workbench .panel.integrated-terminal .xterm:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar).focus .reverse-video, -.vs-dark .monaco-workbench .panel.integrated-terminal .xterm:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar):focus .reverse-video { color: #1e1e1e; } -.hc-black .monaco-workbench .panel.integrated-terminal .xterm:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar).focus .reverse-video, -.hc-black .monaco-workbench .panel.integrated-terminal .xterm:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar):focus .reverse-video { color: #000; } - -.monaco-workbench .panel.integrated-terminal .xterm:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar).focus .terminal-cursor, -.monaco-workbench .panel.integrated-terminal .xterm:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar):focus .terminal-cursor { background-color: #333; } -.vs-dark .monaco-workbench .panel.integrated-terminal .xterm:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar).focus .terminal-cursor, -.vs-dark .monaco-workbench .panel.integrated-terminal .xterm:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar):focus .terminal-cursor { background-color: #CCC; } -.hc-black .monaco-workbench .panel.integrated-terminal .xterm:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar).focus .terminal-cursor, -.hc-black .monaco-workbench .panel.integrated-terminal .xterm:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar):focus .terminal-cursor { background-color: #FFF; } - .monaco-workbench .panel.integrated-terminal .xterm:not(.focus):not(:focus) .terminal-cursor { background-color: transparent; - outline: 1px solid #333; - outline-offset: -1px; -} -.vs-dark .monaco-workbench .panel.integrated-terminal .xterm:not(.focus):not(:focus) .terminal-cursor { - background-color: transparent; - outline: 1px solid #CCC; - outline-offset: -1px; -} -.hc-black .monaco-workbench .panel.integrated-terminal .xterm:not(.focus):not(:focus) .terminal-cursor { - background-color: transparent; - outline: 1px solid #FFF; + outline-width: 1px; + outline-style: solid; outline-offset: -1px; } @@ -100,15 +77,6 @@ content: ""; display: block; position: absolute; - background-color: #333; -} -.vs-dark .monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-bar .terminal-cursor::before, -.vs-dark .monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-underline .terminal-cursor::before { - background-color: #CCC; -} -.hc-black .monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-bar .terminal-cursor::before, -.hc-black .monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-underline .terminal-cursor::before { - background-color: #fff; } .monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-bar .terminal-cursor::before { top: 0; @@ -126,18 +94,6 @@ .monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-underline.focus.xterm-cursor-blink.xterm-cursor-blink-on .terminal-cursor::before { background-color: transparent !important; } -.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-bar.focus.xterm-cursor-blink .terminal-cursor::before, -.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-underline.focus.xterm-cursor-blink .terminal-cursor::before { - background-color: #333; -} -.vs-dark .monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-bar.focus.xterm-cursor-blink .terminal-cursor::before, -.vs-dark .monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-underline.focus.xterm-cursor-blink .terminal-cursor::before { - background-color: #ccc; -} -.hc-black .monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-bar.focus.xterm-cursor-blink .terminal-cursor::before, -.hc-black .monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-underline.focus.xterm-cursor-blink .terminal-cursor::before { - background-color: #fff; -} .monaco-workbench .panel.integrated-terminal .xterm .xterm-viewport { overflow-y: scroll; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 51ddb07c92b88..c3e600af19dda 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -258,7 +258,14 @@ export class TerminalPanel extends Panel { } const fgColor = theme.getColor(TERMINAL_FOREGROUND_COLOR); if (fgColor) { - css += `.monaco-workbench .panel.integrated-terminal .xterm { color: ${fgColor}; }`; + css += `.monaco-workbench .panel.integrated-terminal .xterm { color: ${fgColor}; }` + + `.monaco-workbench .panel.integrated-terminal .xterm:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar).focus .terminal-cursor,` + + `.monaco-workbench .panel.integrated-terminal .xterm:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar):focus .terminal-cursor { background-color: ${fgColor} }` + + `.monaco-workbench .panel.integrated-terminal .xterm:not(.focus):not(:focus) .terminal-cursor { outline-color: ${fgColor}; }` + + `.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-bar .terminal-cursor::before,` + + `.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-underline .terminal-cursor::before { background-color: ${fgColor}; }` + + `.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-bar.focus.xterm-cursor-blink .terminal-cursor::before,` + + `.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-underline.focus.xterm-cursor-blink .terminal-cursor::before { background-color: ${fgColor}; }`; } this._themeStyleElement.innerHTML = css; From dea0e91074fea2f421120429d51bb363211827e5 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 9 Jun 2017 16:11:02 -0700 Subject: [PATCH 1700/2747] Use selection.background for the terminal The new selection model in xterm.js doesn't allow inverting colors right now so piggyback on selection.background. Ideally the terminal would have its own selection key since it has a terminal.background, but this is hopefully just temporary until selection color inverting is done upstream. --- src/vs/platform/theme/common/colorRegistry.ts | 2 +- .../terminal/electron-browser/media/xterm.css | 19 +------------------ .../electron-browser/terminalPanel.ts | 8 +++++++- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index d790e964b0cf8..2cd9b78d5ec6c 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -137,7 +137,7 @@ export const focusBorder = registerColor('focusBorder', { dark: Color.fromHex('# export const contrastBorder = registerColor('contrastBorder', { light: null, dark: null, hc: '#6FC3DF' }, nls.localize('contrastBorder', "An extra border around elements to separate them from others for greater contrast.")); export const activeContrastBorder = registerColor('contrastActiveBorder', { light: null, dark: null, hc: focusBorder }, nls.localize('activeContrastBorder', "An extra border around active elements to separate them from others for greater contrast.")); -export const selectionBackground = registerColor('selection.background', { light: null, dark: null, hc: null }, nls.localize('selectionBackground', "The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor and the terminal.")); +export const selectionBackground = registerColor('selection.background', { light: null, dark: null, hc: null }, nls.localize('selectionBackground', "The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.")); // ------ text colors diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css b/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css index e30500606de78..fe96994dcc95e 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css @@ -140,7 +140,7 @@ .monaco-workbench .panel.integrated-terminal .xterm .xterm-selection div { position: absolute; - background-color: #555; + opacity: 0.5; } .monaco-workbench .panel.integrated-terminal .xterm .xterm-bold { @@ -174,23 +174,6 @@ display: block; } -/* Base selection colors */ - -.monaco-workbench .panel.integrated-terminal .xterm ::selection { - color: #FFF; - background-color: rgba(51, 51, 51, 0.996); -} - -.vs-dark .monaco-workbench .panel.integrated-terminal .xterm ::selection { - color: #1e1e1e; - background-color: rgba(204, 204, 204, 0.996); -} - -.hc-black .monaco-workbench .panel.integrated-terminal .xterm ::selection { - color: #000; - background-color: rgba(255, 255, 255, 0.996); -} - /* Terminal colors 16-255 */ .monaco-workbench .panel.integrated-terminal .xterm .xterm-color-16 { diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 1a7238730c130..dc7558d33e91c 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -16,7 +16,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ITerminalService, ITerminalFont, TERMINAL_PANEL_ID } from 'vs/workbench/parts/terminal/common/terminal'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; import { ansiColorIdentifiers, TERMINAL_BACKGROUND_COLOR, TERMINAL_FOREGROUND_COLOR } from './terminalColorRegistry'; -import { ColorIdentifier } from 'vs/platform/theme/common/colorRegistry'; +import { ColorIdentifier, selectionBackground } from 'vs/platform/theme/common/colorRegistry'; import { KillTerminalAction, CreateNewTerminalAction, SwitchTerminalInstanceAction, SwitchTerminalInstanceActionItem, CopyTerminalSelectionAction, TerminalPasteAction, ClearTerminalAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; import { Panel } from 'vs/workbench/browser/panel'; import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; @@ -262,6 +262,12 @@ export class TerminalPanel extends Panel { `.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-bar.focus.xterm-cursor-blink .terminal-cursor::before,` + `.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-underline.focus.xterm-cursor-blink .terminal-cursor::before { background-color: ${fgColor}; }`; } + // Use selection.background as the terminal selection, this is temporary + // until proper color inverting is implemented to ensure contrast. + const selectionColor = theme.getColor(selectionBackground); + if (selectionColor) { + css += `.monaco-workbench .panel.integrated-terminal .xterm .xterm-selection div { background-color: ${selectionColor}; }`; + } this._themeStyleElement.innerHTML = css; } From ebecfa501bf8d6e353cd971628b05cf5c223fa45 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 9 Jun 2017 15:19:11 -0700 Subject: [PATCH 1701/2747] Disable http resources in releasenotes --- .../parts/update/electron-browser/releaseNotesEditor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts b/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts index 7f9174f7ca6a1..c6e9a5015f084 100644 --- a/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts +++ b/src/vs/workbench/parts/update/electron-browser/releaseNotesEditor.ts @@ -27,7 +27,7 @@ function renderBody(body: string): string { - + ${body} From 922c99876fee6fb4c2e658d08045f00e7f84a785 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 9 Jun 2017 16:31:15 -0700 Subject: [PATCH 1702/2747] Update parameter hint setting desc https://github.com/Microsoft/vscode/issues/28380 --- src/vs/editor/common/config/commonEditorConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 87ecf2fdb3045..0dc60d8d6fbe6 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -386,7 +386,7 @@ const editorConfiguration: IConfigurationNode = { 'editor.parameterHints': { 'type': 'boolean', 'default': EDITOR_DEFAULTS.contribInfo.parameterHints, - 'description': nls.localize('parameterHints', "Enables parameter hints") + 'description': nls.localize('parameterHints', "Enables pop-up that shows parameter documentation and type information as you type") }, 'editor.autoClosingBrackets': { 'type': 'boolean', From c348bfb1056122f98580ad6e1e11ae344dd77d71 Mon Sep 17 00:00:00 2001 From: Cristian Date: Sat, 10 Jun 2017 12:16:33 +0300 Subject: [PATCH 1703/2747] #22622 - final version --- .../parts/debug/electron-browser/debugHover.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index 96f025bc4bc48..ec04f7078bd08 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -22,6 +22,7 @@ import { Expression } from 'vs/workbench/parts/debug/common/debugModel'; import { VariablesRenderer, renderExpressionValue, VariablesDataSource } from 'vs/workbench/parts/debug/electron-browser/debugViewer'; import { IListService } from 'vs/platform/list/browser/listService'; import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; +import { ScrollbarVisibility } from 'vs/base/common/scrollable'; const $ = dom.$; const MAX_ELEMENTS_SHOWN = 18; @@ -55,9 +56,12 @@ export class DebugHoverWidget implements IContentWidget { this.create(instantiationService); this.registerListeners(); - this.valueContainer = dom.append(this.domNode, $('.value')); + this.valueContainer = $('.value'); this.valueContainer.tabIndex = 0; this.valueContainer.setAttribute('role', 'tooltip'); + this.scrollbar = new DomScrollableElement(this.valueContainer, { canUseTranslate3d: false, horizontal: ScrollbarVisibility.Auto, vertical: ScrollbarVisibility.Auto }); + this.domNode.appendChild(this.scrollbar.getDomNode()); + this.toDispose.push(this.scrollbar); this._isVisible = false; this.showAtPosition = null; @@ -70,7 +74,6 @@ export class DebugHoverWidget implements IContentWidget { private create(instantiationService: IInstantiationService): void { this.domNode = $('.debug-hover-widget'); this.complexValueContainer = dom.append(this.domNode, $('.complex-value')); - this.scrollbar = new DomScrollableElement(this.complexValueContainer, { canUseTranslate3d: false }); this.complexValueTitle = dom.append(this.complexValueContainer, $('.title')); this.treeContainer = dom.append(this.complexValueContainer, $('.debug-hover-tree')); this.treeContainer.setAttribute('role', 'tree'); @@ -84,8 +87,6 @@ export class DebugHoverWidget implements IContentWidget { ariaLabel: nls.localize('treeAriaLabel', "Debug Hover"), keyboardSupport: false }); - this.toDispose.push(this.scrollbar); - this.domNode.appendChild(this.scrollbar.getDomNode()); this.toDispose.push(this.listService.register(this.tree)); } @@ -242,6 +243,7 @@ export class DebugHoverWidget implements IContentWidget { showChanged: false, preserveWhitespace: true }); + this.scrollbar.scanDomNode(); this.valueContainer.title = ''; this.editor.layoutContentWidget(this); if (focus) { From 33e339e9fc2e6b4a4d9b8b6d9973362f8542467f Mon Sep 17 00:00:00 2001 From: Ben Stein Date: Sun, 11 Jun 2017 09:08:26 -0700 Subject: [PATCH 1704/2747] Added deregistration for title change check on the terminal message event. --- .../electron-browser/terminalInstance.ts | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 98dbc2f265439..8dd4c361f1394 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -59,6 +59,7 @@ export class TerminalInstance implements ITerminalInstance { private _isDisposed: boolean; private _onDisposed: Emitter; private _onDataForApi: Emitter<{ instance: ITerminalInstance, data: string }>; + private _onMessageTitleCheck: (message: any) => void; private _onProcessIdReady: Emitter; private _onTitleChanged: Emitter; private _process: cp.ChildProcess; @@ -479,13 +480,13 @@ export class TerminalInstance implements ITerminalInstance { }); if (!shell.name) { // Only listen for process title changes when a name is not provided - this._process.on('message', this._onPtyProcessMessageTitleChanged); - // this._process.on('message', (message) => { - // if (message.type === 'title') { - // this._title = message.content ? message.content : ''; - // this._onTitleChanged.fire(this._title); - // } - // }); + this._onMessageTitleCheck = (message) => { + if (message.type === 'title') { + this._title = message.content ? message.content : ''; + this._onTitleChanged.fire(this._title); + } + }; + this._process.on('message', this._onMessageTitleCheck); } this._process.on('message', (message) => { if (message.type === 'pid') { @@ -562,13 +563,6 @@ export class TerminalInstance implements ITerminalInstance { } } - private _onPtyProcessMessageTitleChanged(message: any): void { - if (message.type === 'title') { - this._title = message.content ? message.content : ''; - this._onTitleChanged.fire(this._title); - } - } - private _attachPressAnyKeyToCloseListener() { this._processDisposables.push(dom.addDisposableListener(this._xterm.textarea, 'keypress', (event: KeyboardEvent) => { this.dispose(); @@ -779,7 +773,7 @@ export class TerminalInstance implements ITerminalInstance { // if the title is set via API, unregister the handler that automatically updates the terminal name if (this._process) { - this._process.removeListener('message', this._onPtyProcessMessageTitleChanged); + this._process.removeListener('message', this._onMessageTitleCheck); } } } From d57c6a1b38eded15d56c01bf41d53d7baf24eb4f Mon Sep 17 00:00:00 2001 From: Ben Stein Date: Sun, 11 Jun 2017 10:54:03 -0700 Subject: [PATCH 1705/2747] Added missing newline. --- .../parts/terminal/electron-browser/terminalActions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts index 3a66f07057d59..1c7a798b747e3 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts @@ -583,4 +583,4 @@ export class RenameTerminalAction extends Action { }); } -} \ No newline at end of file +} From 1cc8f3cefbde0b4608fe866e44aa7f3ccc242203 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 11 Jun 2017 20:36:47 -0700 Subject: [PATCH 1706/2747] Ensure pty gets resize event on layout Fixes #28138 --- .../electron-browser/terminalInstance.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 919dd7dbdff23..98e87b96aae67 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -761,13 +761,15 @@ export class TerminalInstance implements ITerminalInstance { this._xterm.resize(this._cols, this._rows); this._xterm.element.style.width = terminalWidth + 'px'; } - if (this._process.connected) { - this._process.send({ - event: 'resize', - cols: this._cols, - rows: this._rows - }); - } + this._processReady.then(() => { + if (this._process) { + this._process.send({ + event: 'resize', + cols: this._cols, + rows: this._rows + }); + } + }); } public enableApiOnData(): void { From bdc326b9fd716e5c619fac84c82e567633b09308 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 12 Jun 2017 07:53:55 +0200 Subject: [PATCH 1707/2747] Fix #25780: Remove ArraySet and move to native Set --- src/vs/base/common/history.ts | 27 +++++++++---- src/vs/base/common/set.ts | 38 ------------------- .../parts/markers/browser/markersPanel.ts | 13 +++---- .../parts/search/common/searchModel.ts | 9 ++--- .../telemetry/common/workspaceStats.ts | 10 +++-- 5 files changed, 35 insertions(+), 62 deletions(-) delete mode 100644 src/vs/base/common/set.ts diff --git a/src/vs/base/common/history.ts b/src/vs/base/common/history.ts index 22e921b8d7792..82099d63c3090 100644 --- a/src/vs/base/common/history.ts +++ b/src/vs/base/common/history.ts @@ -3,28 +3,27 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ArraySet } from 'vs/base/common/set'; import { INavigator, ArrayNavigator } from 'vs/base/common/iterator'; export class HistoryNavigator implements INavigator { - private _history: ArraySet; + private _history: Set; private _limit: number; private _navigator: ArrayNavigator; constructor(history: T[] = [], limit: number = 10) { - this._history = new ArraySet(history); + this._initialize(history); this._limit = limit; this._onChange(); } public add(t: T) { - this._history.set(t); + this._history.add(t); this._onChange(); } public addIfNotPresent(t: T) { - if (!this._history.contains(t)) { + if (!this._history.has(t)) { this.add(t); } } @@ -63,15 +62,27 @@ export class HistoryNavigator implements INavigator { private _onChange() { this._reduceToLimit(); - this._navigator = new ArrayNavigator(this._history.elements); + this._navigator = new ArrayNavigator(this._elements); this._navigator.last(); } private _reduceToLimit() { - let data = this._history.elements; + let data = this._elements; if (data.length > this._limit) { - this._history = new ArraySet(data.slice(data.length - this._limit)); + this._initialize(data.slice(data.length - this._limit)); } } + private _initialize(history: T[]): void { + this._history = new Set(); + for (const entry of history) { + this._history.add(entry); + } + } + + private get _elements(): T[] { + const elements: T[] = []; + this._history.forEach(e => elements.push(e)); + return elements; + } } \ No newline at end of file diff --git a/src/vs/base/common/set.ts b/src/vs/base/common/set.ts deleted file mode 100644 index 245bf7480f89d..0000000000000 --- a/src/vs/base/common/set.ts +++ /dev/null @@ -1,38 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -export class ArraySet { - - private _elements: T[]; - - constructor(elements: T[] = []) { - this._elements = elements.slice(); - } - - get size(): number { - return this._elements.length; - } - - set(element: T): void { - this.unset(element); - this._elements.push(element); - } - - contains(element: T): boolean { - return this._elements.indexOf(element) > -1; - } - - unset(element: T): void { - const index = this._elements.indexOf(element); - - if (index > -1) { - this._elements.splice(index, 1); - } - } - - get elements(): T[] { - return this._elements.slice(); - } -} \ No newline at end of file diff --git a/src/vs/workbench/parts/markers/browser/markersPanel.ts b/src/vs/workbench/parts/markers/browser/markersPanel.ts index f771f5dcaf903..3916e12564046 100644 --- a/src/vs/workbench/parts/markers/browser/markersPanel.ts +++ b/src/vs/workbench/parts/markers/browser/markersPanel.ts @@ -6,7 +6,6 @@ import 'vs/css!./media/markers'; import * as errors from 'vs/base/common/errors'; -import * as Set from 'vs/base/common/set'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; import { Delayer } from 'vs/base/common/async'; @@ -53,7 +52,7 @@ export class MarkersPanel extends Panel { private hasToAutoReveal: boolean; private tree: Tree.ITree; - private autoExpanded: Set.ArraySet; + private autoExpanded: Set; private rangeHighlightDecorations: RangeHighlightDecorations; private actions: IAction[]; @@ -81,7 +80,7 @@ export class MarkersPanel extends Panel { super(Constants.MARKERS_PANEL_ID, telemetryService, themeService); this.toDispose = []; this.delayedRefresh = new Delayer(500); - this.autoExpanded = new Set.ArraySet(); + this.autoExpanded = new Set(); this.markerFocusContextKey = Constants.MarkerFocusContextKey.bindTo(contextKeyService); } @@ -188,7 +187,7 @@ export class MarkersPanel extends Panel { public updateFilter(filter: string) { this.markersModel.update(new FilterOptions(filter)); - this.autoExpanded = new Set.ArraySet(); + this.autoExpanded = new Set(); this.refreshPanel(); this.autoReveal(); } @@ -304,7 +303,7 @@ export class MarkersPanel extends Panel { bulkUpdater.done(); for (const resource of resources) { if (!this.markersModel.hasResource(resource)) { - this.autoExpanded.unset(resource.toString()); + this.autoExpanded.delete(resource.toString()); } } } @@ -326,9 +325,9 @@ export class MarkersPanel extends Panel { private autoExpand(): void { for (const resource of this.markersModel.filteredResources) { const resourceUri = resource.uri.toString(); - if (!this.autoExpanded.contains(resourceUri)) { + if (!this.autoExpanded.has(resourceUri)) { this.tree.expand(resource).done(null, errors.onUnexpectedError); - this.autoExpanded.set(resourceUri); + this.autoExpanded.add(resourceUri); } } } diff --git a/src/vs/workbench/parts/search/common/searchModel.ts b/src/vs/workbench/parts/search/common/searchModel.ts index f8d357a5a2609..2a9c614592802 100644 --- a/src/vs/workbench/parts/search/common/searchModel.ts +++ b/src/vs/workbench/parts/search/common/searchModel.ts @@ -12,7 +12,6 @@ import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; import { TPromise, PPromise } from 'vs/base/common/winjs.base'; import URI from 'vs/base/common/uri'; import { SimpleMap } from 'vs/base/common/map'; -import { ArraySet } from 'vs/base/common/set'; import Event, { Emitter, fromPromise, stopwatch, any } from 'vs/base/common/event'; import { ISearchService, ISearchProgressItem, ISearchComplete, ISearchQuery, IPatternInfo, IFileMatch } from 'vs/platform/search/common/search'; import { ReplacePattern } from 'vs/platform/search/common/replace'; @@ -127,7 +126,7 @@ export class FileMatch extends Disposable { private _model: IModel; private _modelListener: IDisposable; private _matches: SimpleMap; - private _removedMatches: ArraySet; + private _removedMatches: Set; private _selectedMatch: Match; private _updateScheduler: RunOnceScheduler; @@ -138,7 +137,7 @@ export class FileMatch extends Disposable { super(); this._resource = this.rawMatch.resource; this._matches = new SimpleMap(); - this._removedMatches = new ArraySet(); + this._removedMatches = new Set(); this._updateScheduler = new RunOnceScheduler(this.updateMatchesForModel.bind(this), 250); this.createMatches(); @@ -222,7 +221,7 @@ export class FileMatch extends Disposable { private updateMatches(matches: FindMatch[], modelChange: boolean) { matches.forEach(m => { let match = new Match(this, this._model.getLineContent(m.range.startLineNumber), m.range.startLineNumber - 1, m.range.startColumn - 1, m.range.endColumn - m.range.startColumn); - if (!this._removedMatches.contains(match.id())) { + if (!this._removedMatches.has(match.id())) { this.add(match); if (this.isMatchSelected(match)) { this._selectedMatch = match; @@ -263,7 +262,7 @@ export class FileMatch extends Disposable { public remove(match: Match): void { this.removeMatch(match); - this._removedMatches.set(match.id()); + this._removedMatches.add(match.id()); this._onChange.fire(false); } diff --git a/src/vs/workbench/services/telemetry/common/workspaceStats.ts b/src/vs/workbench/services/telemetry/common/workspaceStats.ts index 725b76e72ad01..6fd83f56c5387 100644 --- a/src/vs/workbench/services/telemetry/common/workspaceStats.ts +++ b/src/vs/workbench/services/telemetry/common/workspaceStats.ts @@ -8,7 +8,6 @@ import winjs = require('vs/base/common/winjs.base'); import errors = require('vs/base/common/errors'); import URI from 'vs/base/common/uri'; -import { ArraySet } from 'vs/base/common/set'; import { IFileService } from 'vs/platform/files/common/files'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; @@ -60,12 +59,12 @@ function extractDomain(url: string): string { } export function getDomainsOfRemotes(text: string, whitelist: string[]): string[] { - let domains = new ArraySet(); + let domains = new Set(); let match: RegExpExecArray; while (match = RemoteMatcher.exec(text)) { let domain = extractDomain(match[1]); if (domain) { - domains.set(domain); + domains.add(domain); } } @@ -74,7 +73,10 @@ export function getDomainsOfRemotes(text: string, whitelist: string[]): string[] return map; }, Object.create(null)); - return domains.elements + const elements: string[] = []; + domains.forEach(e => elements.push(e)); + + return elements .map(key => whitemap[key] ? key : key.replace(AnyButDot, 'a')); } From 25b4b172e402a86657104581acc1c925fd4e3cf2 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 12 Jun 2017 08:16:05 +0200 Subject: [PATCH 1708/2747] extract more functionality into IWorkspace --- .../browser/standalone/standaloneServices.ts | 8 +-- src/vs/platform/workspace/common/workspace.ts | 60 ++++++++++++++----- .../workspace/test/common/testWorkspace.ts | 12 ++-- src/vs/workbench/electron-browser/main.ts | 20 +++---- src/vs/workbench/node/extensionHostMain.ts | 11 +++- .../terminalLinkHandler.test.ts | 9 ++- .../node/configurationService.ts | 19 +++--- .../node/configurationEditingService.test.ts | 10 ++-- .../test/node/configurationService.test.ts | 22 +++---- .../quickopen.perf.integrationTest.ts | 4 +- .../textsearch.perf.integrationTest.ts | 4 +- 11 files changed, 108 insertions(+), 71 deletions(-) diff --git a/src/vs/editor/browser/standalone/standaloneServices.ts b/src/vs/editor/browser/standalone/standaloneServices.ts index 550b5294605dd..68e9623baf121 100644 --- a/src/vs/editor/browser/standalone/standaloneServices.ts +++ b/src/vs/editor/browser/standalone/standaloneServices.ts @@ -22,7 +22,7 @@ import { IMessageService } from 'vs/platform/message/common/message'; import { IProgressService } from 'vs/platform/progress/common/progress'; import { IStorageService, NullStorageService } from 'vs/platform/storage/common/storage'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; import { EditorWorkerServiceImpl } from 'vs/editor/common/services/editorWorkerServiceImpl'; @@ -115,9 +115,9 @@ export module StaticServices { export const instantiationService = define(IInstantiationService, () => new InstantiationService(_serviceCollection, true)); - export const contextService = define(IWorkspaceContextService, () => new WorkspaceContextService({ - resource: URI.from({ scheme: 'inmemory', authority: 'model', path: '/' }) - })); + export const contextService = define(IWorkspaceContextService, () => new WorkspaceContextService(new Workspace( + URI.from({ scheme: 'inmemory', authority: 'model', path: '/' }) + ))); export const telemetryService = define(ITelemetryService, () => new StandaloneTelemetryService()); diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index 1218ddd4da827..eae7c42e20c43 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -65,27 +65,26 @@ export interface IWorkspace { name?: string; } -export class WorkspaceContextService implements IWorkspaceContextService { - - public _serviceBrand: any; +export class Workspace implements IWorkspace { - private workspace: IWorkspace; + constructor(private _resource: URI, private _uid?: number, private _name?: string) { + } - constructor(workspace: IWorkspace) { - this.workspace = workspace; + public get resource(): URI { + return this._resource; } - public getWorkspace(): IWorkspace { - return this.workspace; + public get uid(): number { + return this._uid; } - public hasWorkspace(): boolean { - return !!this.workspace; + public get name(): string { + return this._name; } public isInsideWorkspace(resource: URI): boolean { - if (resource && this.workspace) { - return isEqualOrParent(resource.fsPath, this.workspace.resource.fsPath, !isLinux /* ignorecase */); + if (resource) { + return isEqualOrParent(resource.fsPath, this._resource.fsPath, !isLinux /* ignorecase */); } return false; @@ -93,17 +92,48 @@ export class WorkspaceContextService implements IWorkspaceContextService { public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { if (this.isInsideWorkspace(resource)) { - return paths.normalize(paths.relative(this.workspace.resource.fsPath, resource.fsPath), toOSPath); + return paths.normalize(paths.relative(this._resource.fsPath, resource.fsPath), toOSPath); } return null; } public toResource(workspaceRelativePath: string): URI { - if (typeof workspaceRelativePath === 'string' && this.workspace) { - return URI.file(paths.join(this.workspace.resource.fsPath, workspaceRelativePath)); + if (typeof workspaceRelativePath === 'string') { + return URI.file(paths.join(this._resource.fsPath, workspaceRelativePath)); } return null; } +} + +export class WorkspaceContextService implements IWorkspaceContextService { + + public _serviceBrand: any; + + private workspace: Workspace; + + constructor(workspace?: Workspace) { + this.workspace = workspace; + } + + public getWorkspace(): IWorkspace { + return this.workspace; + } + + public hasWorkspace(): boolean { + return !!this.workspace; + } + + public isInsideWorkspace(resource: URI): boolean { + return this.workspace ? this.workspace.isInsideWorkspace(resource) : false; + } + + public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { + return this.workspace ? this.workspace.toWorkspaceRelativePath(resource, toOSPath) : null; + } + + public toResource(workspaceRelativePath: string): URI { + return this.workspace ? this.workspace.toResource(workspaceRelativePath) : null; + } } \ No newline at end of file diff --git a/src/vs/platform/workspace/test/common/testWorkspace.ts b/src/vs/platform/workspace/test/common/testWorkspace.ts index 237d85295236c..18926c9330dac 100644 --- a/src/vs/platform/workspace/test/common/testWorkspace.ts +++ b/src/vs/platform/workspace/test/common/testWorkspace.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IWorkspace } from 'vs/platform/workspace/common/workspace'; +import { Workspace } from 'vs/platform/workspace/common/workspace'; import URI from 'vs/base/common/uri'; -export const TestWorkspace: IWorkspace = { - resource: URI.file('C:\\testWorkspace'), - name: 'Test Workspace', - uid: Date.now() -}; +export const TestWorkspace = new Workspace( + URI.file('C:\\testWorkspace'), + Date.now(), + 'Test Workspace' +); diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index b20a6fd422ae3..b8bfbe51ce6df 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -18,7 +18,7 @@ import paths = require('vs/base/common/paths'); import uri from 'vs/base/common/uri'; import strings = require('vs/base/common/strings'); import { IResourceInput } from 'vs/platform/editor/common/editor'; -import { IWorkspace, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configurationService'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; import { realpath, stat } from 'vs/base/node/pfs'; @@ -116,7 +116,7 @@ function toInputs(paths: IPath[], isUntitledFile?: boolean): IResourceInput[] { }); } -function getWorkspace(workspacePath: string): TPromise { +function getWorkspace(workspacePath: string): TPromise { if (!workspacePath) { return TPromise.as(null); } @@ -135,23 +135,23 @@ function getWorkspace(workspacePath: string): TPromise { const folderName = path.basename(realWorkspacePath) || realWorkspacePath; return stat(realWorkspacePath).then(folderStat => { - return { - 'resource': workspaceResource, - 'name': folderName, - 'uid': platform.isLinux ? folderStat.ino : folderStat.birthtime.getTime() // On Linux, birthtime is ctime, so we cannot use it! We use the ino instead! - }; + return new Workspace( + workspaceResource, + platform.isLinux ? folderStat.ino : folderStat.birthtime.getTime(), + folderName // On Linux, birthtime is ctime, so we cannot use it! We use the ino instead! + ); }); - }, (error) => { + }, error => { errors.onUnexpectedError(error); return null; // treat invalid paths as empty workspace }); } -function openWorkbench(environment: IWindowConfiguration, workspace: IWorkspace, options: IOptions): TPromise { +function openWorkbench(environment: IWindowConfiguration, workspace: Workspace, options: IOptions): TPromise { const environmentService = new EnvironmentService(environment, environment.execPath); const contextService = new WorkspaceContextService(workspace); - const configurationService = new WorkspaceConfigurationService(contextService, environmentService); + const configurationService = new WorkspaceConfigurationService(environmentService, workspace); const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !contextService.hasWorkspace()); // Since the configuration service is one of the core services that is used in so many places, we initialize it diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index fd41b0c29fe16..abb6f76e6c87f 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -15,7 +15,7 @@ import { ExtHostThreadService } from 'vs/workbench/services/thread/common/extHos import { QueryType, ISearchQuery } from 'vs/platform/search/common/search'; import { DiskSearch } from 'vs/workbench/services/search/node/searchService'; import { RemoteTelemetryService } from 'vs/workbench/api/node/extHostTelemetry'; -import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { IInitData, IEnvironment, MainContext } from 'vs/workbench/api/node/extHost.protocol'; import * as errors from 'vs/base/common/errors'; @@ -43,7 +43,14 @@ export class ExtensionHostMain { constructor(remoteCom: IRemoteCom, initData: IInitData) { // services this._environment = initData.environment; - this._contextService = new WorkspaceContextService(initData.contextService.workspace); + + const workspaceRaw = initData.contextService.workspace; + let workspace: Workspace; + if (workspaceRaw) { + workspace = new Workspace(workspaceRaw.resource, workspaceRaw.uid, workspaceRaw.name); + } + this._contextService = new WorkspaceContextService(workspace); + const threadService = new ExtHostThreadService(remoteCom); const telemetryService = new RemoteTelemetryService('pluginHostTelemetry', threadService); this._extensionService = new ExtHostExtensionService(initData, threadService, telemetryService, this._contextService); diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts index a491d6153d174..d61de282fd475 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts @@ -8,7 +8,7 @@ import * as assert from 'assert'; import { Platform } from 'vs/base/common/platform'; import { TerminalLinkHandler, LineColumnInfo } from 'vs/workbench/parts/terminal/electron-browser/terminalLinkHandler'; -import { IWorkspace, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import URI from 'vs/base/common/uri'; import * as strings from 'vs/base/common/strings'; import * as path from 'path'; @@ -44,10 +44,9 @@ interface LinkFormatInfo { column?: string; } -class TestWorkspace implements IWorkspace { - resource: URI; - constructor(basePath: string) { - this.resource = new TestURI(basePath); +class TestWorkspace extends Workspace { + constructor(private basePath: string) { + super(new TestURI(basePath)); } } diff --git a/src/vs/workbench/services/configuration/node/configurationService.ts b/src/vs/workbench/services/configuration/node/configurationService.ts index b0537b9a12ce2..9ea368f587bc5 100644 --- a/src/vs/workbench/services/configuration/node/configurationService.ts +++ b/src/vs/workbench/services/configuration/node/configurationService.ts @@ -12,7 +12,6 @@ import extfs = require('vs/base/node/extfs'); import objects = require('vs/base/common/objects'); import { RunOnceScheduler } from 'vs/base/common/async'; import collections = require('vs/base/common/collections'); -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; import { readFile } from 'vs/base/node/pfs'; @@ -24,7 +23,7 @@ import { ConfigurationService as BaseConfigurationService } from 'vs/platform/co import { IWorkspaceConfigurationValues, IWorkspaceConfigurationService, IWorkspaceConfigurationValue, WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME, WORKSPACE_STANDALONE_CONFIGURATIONS, WORKSPACE_CONFIG_DEFAULT_PATH } from 'vs/workbench/services/configuration/common/configuration'; import { FileChangeType, FileChangesEvent, isEqual } from 'vs/platform/files/common/files'; import Event, { Emitter } from 'vs/base/common/event'; - +import { Workspace } from "vs/platform/workspace/common/workspace"; interface IStat { resource: uri; @@ -62,8 +61,8 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private reloadConfigurationScheduler: RunOnceScheduler; constructor( - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IEnvironmentService environmentService: IEnvironmentService, + private environmentService: IEnvironmentService, + private workspace?: Workspace, private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME ) { super(); @@ -216,13 +215,13 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private loadWorkspaceConfigFiles(): TPromise<{ [relativeWorkspacePath: string]: IConfigModel }> { // Return early if we don't have a workspace - if (!this.contextService.hasWorkspace()) { + if (!this.workspace) { return TPromise.as(Object.create(null)); } // once: when invoked for the first time we fetch json files that contribute settings if (!this.bulkFetchFromWorkspacePromise) { - this.bulkFetchFromWorkspacePromise = resolveStat(this.contextService.toResource(this.workspaceSettingsRootFolder)).then(stat => { + this.bulkFetchFromWorkspacePromise = resolveStat(this.workspace.toResource(this.workspaceSettingsRootFolder)).then(stat => { if (!stat.isDirectory) { return TPromise.as([]); } @@ -233,11 +232,11 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp return false; // only JSON files } - return this.isWorkspaceConfigurationFile(this.contextService.toWorkspaceRelativePath(stat.resource)); // only workspace config files + return this.isWorkspaceConfigurationFile(this.workspace.toWorkspaceRelativePath(stat.resource)); // only workspace config files }).map(stat => stat.resource)); }, err => [] /* never fail this call */) .then((contents: IContent[]) => { - contents.forEach(content => this.workspaceFilePathToConfiguration[this.contextService.toWorkspaceRelativePath(content.resource)] = TPromise.as(this.createConfigModel(content))); + contents.forEach(content => this.workspaceFilePathToConfiguration[this.workspace.toWorkspaceRelativePath(content.resource)] = TPromise.as(this.createConfigModel(content))); }, errors.onUnexpectedError); } @@ -259,7 +258,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp continue; // only JSON files or the actual settings folder } - const workspacePath = this.contextService.toWorkspaceRelativePath(resource); + const workspacePath = this.workspace.toWorkspaceRelativePath(resource); if (!workspacePath) { continue; // event is not inside workspace } @@ -295,7 +294,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } private createConfigModel(content: IContent): IConfigModel { - const path = this.contextService.toWorkspaceRelativePath(content.resource); + const path = this.workspace.toWorkspaceRelativePath(content.resource); if (path === WORKSPACE_CONFIG_DEFAULT_PATH) { return new WorkspaceSettingsConfigModel(content.value, content.resource.toString()); } else { diff --git a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts index a444ccfb9cfca..df423a3c094e0 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts @@ -15,7 +15,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { Registry } from 'vs/platform/platform'; import { ParsedArgs, IEnvironmentService } from 'vs/platform/environment/common/environment'; import { parseArgs } from 'vs/platform/environment/node/argv'; -import { WorkspaceContextService, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { WorkspaceContextService, IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import extfs = require('vs/base/node/extfs'); import { TestTextFileService, TestEditorGroupService, TestLifecycleService, TestBackupFileService } from 'vs/workbench/test/workbenchTestServices'; @@ -113,9 +113,11 @@ suite('ConfigurationEditingService', () => { clearServices(); instantiationService = new TestInstantiationService(); - instantiationService.stub(IEnvironmentService, new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile)); - instantiationService.stub(IWorkspaceContextService, new WorkspaceContextService(noWorkspace ? null : { resource: URI.file(workspaceDir) })); - const configurationService = instantiationService.createInstance(WorkspaceConfigurationService); + const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); + instantiationService.stub(IEnvironmentService, environmentService); + const workspace = noWorkspace ? null : new Workspace(URI.file(workspaceDir)); + instantiationService.stub(IWorkspaceContextService, new WorkspaceContextService(workspace)); + const configurationService = new WorkspaceConfigurationService(environmentService, workspace); instantiationService.stub(IConfigurationService, configurationService); instantiationService.stub(ILifecycleService, new TestLifecycleService()); instantiationService.stub(IEditorGroupService, new TestEditorGroupService()); diff --git a/src/vs/workbench/services/configuration/test/node/configurationService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationService.test.ts index 3d202425b4ad7..c61238061d7f4 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationService.test.ts @@ -13,7 +13,7 @@ import * as sinon from 'sinon'; import { TPromise } from 'vs/base/common/winjs.base'; import { Registry } from 'vs/platform/platform'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; -import { WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { Workspace } from 'vs/platform/workspace/common/workspace'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import { parseArgs } from 'vs/platform/environment/node/argv'; import extfs = require('vs/base/node/extfs'); @@ -47,9 +47,9 @@ suite('WorkspaceConfigurationService - Node', () => { } function createService(workspaceDir: string, globalSettingsFile: string): TPromise { - const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); + const workspace = new Workspace(URI.file(workspaceDir)); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); - const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); + const service = new WorkspaceConfigurationService(environmentService, workspace); return service.initialize().then(() => service); } @@ -204,9 +204,9 @@ suite('WorkspaceConfigurationService - Node', () => { test('workspace change triggers event', (done: () => void) => { createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { - const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); + const workspace = new Workspace(URI.file(workspaceDir)); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); - const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); + const service = new WorkspaceConfigurationService(environmentService, workspace); return service.initialize().then(() => { service.onDidUpdateConfiguration(event => { @@ -230,9 +230,9 @@ suite('WorkspaceConfigurationService - Node', () => { test('workspace reload should triggers event if content changed', (done: () => void) => { createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { - const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); + const workspace = new Workspace(URI.file(workspaceDir)); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); - const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); + const service = new WorkspaceConfigurationService(environmentService, workspace); return service.initialize().then(() => { const settingsFile = path.join(workspaceDir, '.vscode', 'settings.json'); @@ -255,9 +255,9 @@ suite('WorkspaceConfigurationService - Node', () => { test('workspace reload should not trigger event if nothing changed', (done: () => void) => { createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { - const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); + const workspace = new Workspace(URI.file(workspaceDir)); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); - const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); + const service = new WorkspaceConfigurationService(environmentService, workspace); return service.initialize().then(() => { const settingsFile = path.join(workspaceDir, '.vscode', 'settings.json'); @@ -280,9 +280,9 @@ suite('WorkspaceConfigurationService - Node', () => { test('workspace reload should not trigger event if there is no model', (done: () => void) => { createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { - const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); + const workspace = new Workspace(URI.file(workspaceDir)); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); - const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); + const service = new WorkspaceConfigurationService(environmentService, workspace); return service.initialize().then(() => { const target = sinon.stub(); diff --git a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts index ad4fdee36f5f3..dfd2576d1d4f2 100644 --- a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts @@ -7,7 +7,7 @@ import 'vs/workbench/parts/search/browser/search.contribution'; // load contributions import * as assert from 'assert'; -import { WorkspaceContextService, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { WorkspaceContextService, IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { createSyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ISearchService } from 'vs/platform/search/common/search'; @@ -73,7 +73,7 @@ suite('QuickOpen performance (integration)', () => { [ITelemetryService, telemetryService], [IConfigurationService, new SimpleConfigurationService()], [IModelService, new ModelServiceImpl(null, configurationService)], - [IWorkspaceContextService, new WorkspaceContextService({ resource: URI.file(testWorkspacePath) })], + [IWorkspaceContextService, new WorkspaceContextService(new Workspace(URI.file(testWorkspacePath)))], [IWorkbenchEditorService, new TestEditorService()], [IEditorGroupService, new TestEditorGroupService()], [IEnvironmentService, TestEnvironmentService], diff --git a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts index 861ff47567753..7d1bb6b1139e0 100644 --- a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts @@ -8,7 +8,7 @@ import 'vs/workbench/parts/search/browser/search.contribution'; // load contributions import * as assert from 'assert'; import * as fs from 'fs'; -import { WorkspaceContextService, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { WorkspaceContextService, IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { createSyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ISearchService, IQueryOptions } from 'vs/platform/search/common/search'; @@ -62,7 +62,7 @@ suite('TextSearch performance (integration)', () => { [ITelemetryService, telemetryService], [IConfigurationService, new SimpleConfigurationService()], [IModelService, new ModelServiceImpl(null, configurationService)], - [IWorkspaceContextService, new WorkspaceContextService({ resource: URI.file(testWorkspacePath) })], + [IWorkspaceContextService, new WorkspaceContextService(new Workspace(URI.file(testWorkspacePath)))], [IWorkbenchEditorService, new TestEditorService()], [IEditorGroupService, new TestEditorGroupService()], [IEnvironmentService, TestEnvironmentService], From 54f46520d4a3d37fd9246b4fb11e10c5b27ce5d9 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Mon, 12 Jun 2017 09:30:18 +0200 Subject: [PATCH 1709/2747] Added try/catch not to break on file not found error for 'resources to pull from Transifex' file. --- build/lib/tslint/translationRemindRule.js | 151 +++++++++++----------- build/lib/tslint/translationRemindRule.ts | 8 +- 2 files changed, 86 insertions(+), 73 deletions(-) diff --git a/build/lib/tslint/translationRemindRule.js b/build/lib/tslint/translationRemindRule.js index 53e6929d8e6de..90ba94aa5f4bb 100644 --- a/build/lib/tslint/translationRemindRule.js +++ b/build/lib/tslint/translationRemindRule.js @@ -1,72 +1,79 @@ -"use strict"; -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var Lint = require("tslint"); -var fs = require("fs"); -var Rule = (function (_super) { - __extends(Rule, _super); - function Rule() { - return _super !== null && _super.apply(this, arguments) || this; - } - Rule.prototype.apply = function (sourceFile) { - return this.applyWithWalker(new TranslationRemindRuleWalker(sourceFile, this.getOptions())); - }; - return Rule; -}(Lint.Rules.AbstractRule)); -exports.Rule = Rule; -var TranslationRemindRuleWalker = (function (_super) { - __extends(TranslationRemindRuleWalker, _super); - function TranslationRemindRuleWalker(file, opts) { - return _super.call(this, file, opts) || this; - } - TranslationRemindRuleWalker.prototype.visitImportDeclaration = function (node) { - var declaration = node.moduleSpecifier.getText(); - if (declaration !== "'" + TranslationRemindRuleWalker.NLS_MODULE + "'") { - return; - } - this.visitImportLikeDeclaration(node); - }; - TranslationRemindRuleWalker.prototype.visitImportEqualsDeclaration = function (node) { - var reference = node.moduleReference.getText(); - if (reference !== "require('" + TranslationRemindRuleWalker.NLS_MODULE + "')") { - return; - } - this.visitImportLikeDeclaration(node); - }; - TranslationRemindRuleWalker.prototype.visitImportLikeDeclaration = function (node) { - var currentFile = node.getSourceFile().fileName; - var matchService = currentFile.match(/vs\/workbench\/services\/\w+/); - var matchPart = currentFile.match(/vs\/workbench\/parts\/\w+/); - if (!matchService && !matchPart) { - return; - } - var resource = matchService ? matchService[0] : matchPart[0]; - var resourceDefined = false; - var json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); - var workbenchResources = JSON.parse(json).workbench; - workbenchResources.forEach(function (existingResource) { - if (existingResource.name === resource) { - resourceDefined = true; - return; - } - }); - if (!resourceDefined) { - this.addFailureAtNode(node, "Please add '" + resource + "' to ./builds/lib/i18n.resources.json file to use translations here."); - } - }; - return TranslationRemindRuleWalker; -}(Lint.RuleWalker)); -TranslationRemindRuleWalker.NLS_MODULE = 'vs/nls'; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +exports.__esModule = true; +var Lint = require("tslint"); +var fs = require("fs"); +var Rule = (function (_super) { + __extends(Rule, _super); + function Rule() { + return _super !== null && _super.apply(this, arguments) || this; + } + Rule.prototype.apply = function (sourceFile) { + return this.applyWithWalker(new TranslationRemindRuleWalker(sourceFile, this.getOptions())); + }; + return Rule; +}(Lint.Rules.AbstractRule)); +exports.Rule = Rule; +var TranslationRemindRuleWalker = (function (_super) { + __extends(TranslationRemindRuleWalker, _super); + function TranslationRemindRuleWalker(file, opts) { + return _super.call(this, file, opts) || this; + } + TranslationRemindRuleWalker.prototype.visitImportDeclaration = function (node) { + var declaration = node.moduleSpecifier.getText(); + if (declaration !== "'" + TranslationRemindRuleWalker.NLS_MODULE + "'") { + return; + } + this.visitImportLikeDeclaration(node); + }; + TranslationRemindRuleWalker.prototype.visitImportEqualsDeclaration = function (node) { + var reference = node.moduleReference.getText(); + if (reference !== "require('" + TranslationRemindRuleWalker.NLS_MODULE + "')") { + return; + } + this.visitImportLikeDeclaration(node); + }; + TranslationRemindRuleWalker.prototype.visitImportLikeDeclaration = function (node) { + var currentFile = node.getSourceFile().fileName; + var matchService = currentFile.match(/vs\/workbench\/services\/\w+/); + var matchPart = currentFile.match(/vs\/workbench\/parts\/\w+/); + if (!matchService && !matchPart) { + return; + } + var resource = matchService ? matchService[0] : matchPart[0]; + var resourceDefined = false; + var json; + try { + json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + } + catch (e) { + console.error('[translation-remind rule]: File with resources to pull from Transifex was not found. Aborting translation resource check for newly defined workbench part/service.'); + return; + } + var workbenchResources = JSON.parse(json).workbench; + workbenchResources.forEach(function (existingResource) { + if (existingResource.name === resource) { + resourceDefined = true; + return; + } + }); + if (!resourceDefined) { + this.addFailureAtNode(node, "Please add '" + resource + "' to ./builds/lib/i18n.resources.json file to use translations here."); + } + }; + return TranslationRemindRuleWalker; +}(Lint.RuleWalker)); +TranslationRemindRuleWalker.NLS_MODULE = 'vs/nls'; diff --git a/build/lib/tslint/translationRemindRule.ts b/build/lib/tslint/translationRemindRule.ts index b33025a3536c3..6bc2a191619e5 100644 --- a/build/lib/tslint/translationRemindRule.ts +++ b/build/lib/tslint/translationRemindRule.ts @@ -50,7 +50,13 @@ class TranslationRemindRuleWalker extends Lint.RuleWalker { const resource = matchService ? matchService[0] : matchPart[0]; let resourceDefined = false; - const json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + let json; + try { + json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + } catch (e) { + console.error('[translation-remind rule]: File with resources to pull from Transifex was not found. Aborting translation resource check for newly defined workbench part/service.'); + return; + } const workbenchResources = JSON.parse(json).workbench; workbenchResources.forEach(existingResource => { From 7a927e308f12cbd9f505a37d8c15b2e0c7c372ae Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 12 Jun 2017 10:23:57 +0200 Subject: [PATCH 1710/2747] Move LinkedMap into map.ts --- src/vs/base/common/linkedMap.ts | 306 ------------------ src/vs/base/common/map.ts | 304 +++++++++++++++++ .../parts/tasks/common/taskService.ts | 2 +- .../electron-browser/task.contribution.ts | 2 +- 4 files changed, 306 insertions(+), 308 deletions(-) delete mode 100644 src/vs/base/common/linkedMap.ts diff --git a/src/vs/base/common/linkedMap.ts b/src/vs/base/common/linkedMap.ts deleted file mode 100644 index 65eaa0e6c85e9..0000000000000 --- a/src/vs/base/common/linkedMap.ts +++ /dev/null @@ -1,306 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -interface Item { - previous: Item | undefined; - next: Item | undefined; - key: K; - value: V; -} - -export namespace Touch { - export const None: 0 = 0; - export const First: 1 = 1; - export const Last: 2 = 2; -} - -export type Touch = 0 | 1 | 2; - -export class LinkedMap { - - private _map: Map>; - private _head: Item | undefined; - private _tail: Item | undefined; - private _size: number; - - constructor() { - this._map = new Map>(); - this._head = undefined; - this._tail = undefined; - this._size = 0; - } - - public clear(): void { - this._map.clear(); - this._head = undefined; - this._tail = undefined; - this._size = 0; - } - - public isEmpty(): boolean { - return !this._head && !this._tail; - } - - public get size(): number { - return this._size; - } - - public has(key: K): boolean { - return this._map.has(key); - } - - public get(key: K): V | undefined { - const item = this._map.get(key); - if (!item) { - return undefined; - } - return item.value; - } - - public set(key: K, value: V, touch: Touch = Touch.None): void { - let item = this._map.get(key); - if (item) { - item.value = value; - if (touch !== Touch.None) { - this.touch(item, touch); - } - } else { - item = { key, value, next: undefined, previous: undefined }; - switch (touch) { - case Touch.None: - this.addItemLast(item); - break; - case Touch.First: - this.addItemFirst(item); - break; - case Touch.Last: - this.addItemLast(item); - break; - default: - this.addItemLast(item); - break; - } - this._map.set(key, item); - this._size++; - } - } - - public delete(key: K): boolean { - const item = this._map.get(key); - if (!item) { - return false; - } - this._map.delete(key); - this.removeItem(item); - this._size--; - return true; - } - - public shift(): V | undefined { - if (!this._head && !this._tail) { - return undefined; - } - if (!this._head || !this._tail) { - throw new Error('Invalid list'); - } - const item = this._head; - this._map.delete(item.key); - this.removeItem(item); - this._size--; - return item.value; - } - - public forEach(callbackfn: (value: V, key: K, map: LinkedMap) => void, thisArg?: any): void { - let current = this._head; - while (current) { - if (thisArg) { - callbackfn.bind(thisArg)(current.value, current.key, this); - } else { - callbackfn(current.value, current.key, this); - } - current = current.next; - } - } - - public forEachReverse(callbackfn: (value: V, key: K, map: LinkedMap) => void, thisArg?: any): void { - let current = this._tail; - while (current) { - if (thisArg) { - callbackfn.bind(thisArg)(current.value, current.key, this); - } else { - callbackfn(current.value, current.key, this); - } - current = current.previous; - } - } - - public values(): V[] { - let result: V[] = []; - let current = this._head; - while (current) { - result.push(current.value); - current = current.next; - } - return result; - } - - public keys(): K[] { - let result: K[] = []; - let current = this._head; - while (current) { - result.push(current.key); - current = current.next; - } - return result; - } - - /* VS Code / Monaco editor runs on es5 which has no Symbol.iterator - public keys(): IterableIterator { - let current = this._head; - let iterator: IterableIterator = { - [Symbol.iterator]() { - return iterator; - }, - next():IteratorResult { - if (current) { - let result = { value: current.key, done: false }; - current = current.next; - return result; - } else { - return { value: undefined, done: true }; - } - } - }; - return iterator; - } - - public values(): IterableIterator { - let current = this._head; - let iterator: IterableIterator = { - [Symbol.iterator]() { - return iterator; - }, - next():IteratorResult { - if (current) { - let result = { value: current.value, done: false }; - current = current.next; - return result; - } else { - return { value: undefined, done: true }; - } - } - }; - return iterator; - } - */ - - private addItemFirst(item: Item): void { - // First time Insert - if (!this._head && !this._tail) { - this._tail = item; - } else if (!this._head) { - throw new Error('Invalid list'); - } else { - item.next = this._head; - this._head.previous = item; - } - this._head = item; - } - - private addItemLast(item: Item): void { - // First time Insert - if (!this._head && !this._tail) { - this._head = item; - } else if (!this._tail) { - throw new Error('Invalid list'); - } else { - item.previous = this._tail; - this._tail.next = item; - } - this._tail = item; - } - - private removeItem(item: Item): void { - if (item === this._head && item === this._tail) { - this._head = undefined; - this._tail = undefined; - } - else if (item === this._head) { - this._head = item.next; - } - else if (item === this._tail) { - this._tail = item.previous; - } - else { - const next = item.next; - const previous = item.previous; - if (!next || !previous) { - throw new Error('Invalid list'); - } - next.previous = previous; - previous.next = next; - } - } - - private touch(item: Item, touch: Touch): void { - if (!this._head || !this._tail) { - throw new Error('Invalid list'); - } - if ((touch !== Touch.First && touch !== Touch.Last)) { - return; - } - - if (touch === Touch.First) { - if (item === this._head) { - return; - } - - const next = item.next; - const previous = item.previous; - - // Unlink the item - if (item === this._tail) { - // previous must be defined since item was not head but is tail - // So there are more than on item in the map - previous!.next = undefined; - this._tail = previous; - } - else { - // Both next and previous are not undefined since item was neither head nor tail. - next!.previous = previous; - previous!.next = next; - } - - // Insert the node at head - item.previous = undefined; - item.next = this._head; - this._head.previous = item; - this._head = item; - } else if (touch === Touch.Last) { - if (item === this._tail) { - return; - } - - const next = item.next; - const previous = item.previous; - - // Unlink the item. - if (item === this._head) { - // next must be defined since item was not tail but is head - // So there are more than on item in the map - next!.previous = undefined; - this._head = next; - } else { - // Both next and previous are not undefined since item was neither head nor tail. - next!.previous = previous; - previous!.next = next; - } - item.next = undefined; - item.previous = this._tail; - this._tail.next = item; - this._tail = item; - } - } -} \ No newline at end of file diff --git a/src/vs/base/common/map.ts b/src/vs/base/common/map.ts index ba7089dd8296e..48357176b8a81 100644 --- a/src/vs/base/common/map.ts +++ b/src/vs/base/common/map.ts @@ -469,4 +469,308 @@ export class ResourceMap { return key; } +} + +// We should fold BoundedMap and LinkedMap. See https://github.com/Microsoft/vscode/issues/28496 + +interface Item { + previous: Item | undefined; + next: Item | undefined; + key: K; + value: V; +} + +export namespace Touch { + export const None: 0 = 0; + export const First: 1 = 1; + export const Last: 2 = 2; +} + +export type Touch = 0 | 1 | 2; + +export class LinkedMap { + + private _map: Map>; + private _head: Item | undefined; + private _tail: Item | undefined; + private _size: number; + + constructor() { + this._map = new Map>(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + } + + public clear(): void { + this._map.clear(); + this._head = undefined; + this._tail = undefined; + this._size = 0; + } + + public isEmpty(): boolean { + return !this._head && !this._tail; + } + + public get size(): number { + return this._size; + } + + public has(key: K): boolean { + return this._map.has(key); + } + + public get(key: K): V | undefined { + const item = this._map.get(key); + if (!item) { + return undefined; + } + return item.value; + } + + public set(key: K, value: V, touch: Touch = Touch.None): void { + let item = this._map.get(key); + if (item) { + item.value = value; + if (touch !== Touch.None) { + this.touch(item, touch); + } + } else { + item = { key, value, next: undefined, previous: undefined }; + switch (touch) { + case Touch.None: + this.addItemLast(item); + break; + case Touch.First: + this.addItemFirst(item); + break; + case Touch.Last: + this.addItemLast(item); + break; + default: + this.addItemLast(item); + break; + } + this._map.set(key, item); + this._size++; + } + } + + public delete(key: K): boolean { + const item = this._map.get(key); + if (!item) { + return false; + } + this._map.delete(key); + this.removeItem(item); + this._size--; + return true; + } + + public shift(): V | undefined { + if (!this._head && !this._tail) { + return undefined; + } + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + const item = this._head; + this._map.delete(item.key); + this.removeItem(item); + this._size--; + return item.value; + } + + public forEach(callbackfn: (value: V, key: K, map: LinkedMap) => void, thisArg?: any): void { + let current = this._head; + while (current) { + if (thisArg) { + callbackfn.bind(thisArg)(current.value, current.key, this); + } else { + callbackfn(current.value, current.key, this); + } + current = current.next; + } + } + + public forEachReverse(callbackfn: (value: V, key: K, map: LinkedMap) => void, thisArg?: any): void { + let current = this._tail; + while (current) { + if (thisArg) { + callbackfn.bind(thisArg)(current.value, current.key, this); + } else { + callbackfn(current.value, current.key, this); + } + current = current.previous; + } + } + + public values(): V[] { + let result: V[] = []; + let current = this._head; + while (current) { + result.push(current.value); + current = current.next; + } + return result; + } + + public keys(): K[] { + let result: K[] = []; + let current = this._head; + while (current) { + result.push(current.key); + current = current.next; + } + return result; + } + + /* VS Code / Monaco editor runs on es5 which has no Symbol.iterator + public keys(): IterableIterator { + let current = this._head; + let iterator: IterableIterator = { + [Symbol.iterator]() { + return iterator; + }, + next():IteratorResult { + if (current) { + let result = { value: current.key, done: false }; + current = current.next; + return result; + } else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + + public values(): IterableIterator { + let current = this._head; + let iterator: IterableIterator = { + [Symbol.iterator]() { + return iterator; + }, + next():IteratorResult { + if (current) { + let result = { value: current.value, done: false }; + current = current.next; + return result; + } else { + return { value: undefined, done: true }; + } + } + }; + return iterator; + } + */ + + private addItemFirst(item: Item): void { + // First time Insert + if (!this._head && !this._tail) { + this._tail = item; + } else if (!this._head) { + throw new Error('Invalid list'); + } else { + item.next = this._head; + this._head.previous = item; + } + this._head = item; + } + + private addItemLast(item: Item): void { + // First time Insert + if (!this._head && !this._tail) { + this._head = item; + } else if (!this._tail) { + throw new Error('Invalid list'); + } else { + item.previous = this._tail; + this._tail.next = item; + } + this._tail = item; + } + + private removeItem(item: Item): void { + if (item === this._head && item === this._tail) { + this._head = undefined; + this._tail = undefined; + } + else if (item === this._head) { + this._head = item.next; + } + else if (item === this._tail) { + this._tail = item.previous; + } + else { + const next = item.next; + const previous = item.previous; + if (!next || !previous) { + throw new Error('Invalid list'); + } + next.previous = previous; + previous.next = next; + } + } + + private touch(item: Item, touch: Touch): void { + if (!this._head || !this._tail) { + throw new Error('Invalid list'); + } + if ((touch !== Touch.First && touch !== Touch.Last)) { + return; + } + + if (touch === Touch.First) { + if (item === this._head) { + return; + } + + const next = item.next; + const previous = item.previous; + + // Unlink the item + if (item === this._tail) { + // previous must be defined since item was not head but is tail + // So there are more than on item in the map + previous!.next = undefined; + this._tail = previous; + } + else { + // Both next and previous are not undefined since item was neither head nor tail. + next!.previous = previous; + previous!.next = next; + } + + // Insert the node at head + item.previous = undefined; + item.next = this._head; + this._head.previous = item; + this._head = item; + } else if (touch === Touch.Last) { + if (item === this._tail) { + return; + } + + const next = item.next; + const previous = item.previous; + + // Unlink the item. + if (item === this._head) { + // next must be defined since item was not tail but is head + // So there are more than on item in the map + next!.previous = undefined; + this._head = next; + } else { + // Both next and previous are not undefined since item was neither head nor tail. + next!.previous = previous; + previous!.next = next; + } + item.next = undefined; + item.previous = this._tail; + this._tail.next = item; + this._tail = item; + } + } } \ No newline at end of file diff --git a/src/vs/workbench/parts/tasks/common/taskService.ts b/src/vs/workbench/parts/tasks/common/taskService.ts index 89ab0e6d57cba..c235adc1e73bc 100644 --- a/src/vs/workbench/parts/tasks/common/taskService.ts +++ b/src/vs/workbench/parts/tasks/common/taskService.ts @@ -8,7 +8,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { Action } from 'vs/base/common/actions'; import { IEventEmitter } from 'vs/base/common/eventEmitter'; import { TerminateResponse } from 'vs/base/common/processes'; -import { LinkedMap } from 'vs/base/common/linkedMap'; +import { LinkedMap } from 'vs/base/common/map'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { Task, TaskSet } from 'vs/workbench/parts/tasks/common/tasks'; import { ITaskSummary, TaskEvent, TaskType } from 'vs/workbench/parts/tasks/common/taskSystem'; diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 10b8f78aba5ea..905ed31a99299 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -29,7 +29,7 @@ import { TerminateResponse, TerminateResponseCode } from 'vs/base/common/process import * as strings from 'vs/base/common/strings'; import { ValidationStatus, ValidationState } from 'vs/base/common/parsers'; import * as UUID from 'vs/base/common/uuid'; -import { LinkedMap, Touch } from 'vs/base/common/linkedMap'; +import { LinkedMap, Touch } from 'vs/base/common/map'; import { Registry } from 'vs/platform/platform'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; From 9754a2107d4cdde92f88e87e5929814ec4b86991 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 12 Jun 2017 10:37:44 +0200 Subject: [PATCH 1711/2747] Revert "extract more functionality into IWorkspace" This reverts commit 25b4b172e402a86657104581acc1c925fd4e3cf2. --- .../browser/standalone/standaloneServices.ts | 8 +-- src/vs/platform/workspace/common/workspace.ts | 60 +++++-------------- .../workspace/test/common/testWorkspace.ts | 12 ++-- src/vs/workbench/electron-browser/main.ts | 20 +++---- src/vs/workbench/node/extensionHostMain.ts | 11 +--- .../terminalLinkHandler.test.ts | 9 +-- .../node/configurationService.ts | 19 +++--- .../node/configurationEditingService.test.ts | 10 ++-- .../test/node/configurationService.test.ts | 22 +++---- .../quickopen.perf.integrationTest.ts | 4 +- .../textsearch.perf.integrationTest.ts | 4 +- 11 files changed, 71 insertions(+), 108 deletions(-) diff --git a/src/vs/editor/browser/standalone/standaloneServices.ts b/src/vs/editor/browser/standalone/standaloneServices.ts index 68e9623baf121..550b5294605dd 100644 --- a/src/vs/editor/browser/standalone/standaloneServices.ts +++ b/src/vs/editor/browser/standalone/standaloneServices.ts @@ -22,7 +22,7 @@ import { IMessageService } from 'vs/platform/message/common/message'; import { IProgressService } from 'vs/platform/progress/common/progress'; import { IStorageService, NullStorageService } from 'vs/platform/storage/common/storage'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IWorkspaceContextService, WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; import { EditorWorkerServiceImpl } from 'vs/editor/common/services/editorWorkerServiceImpl'; @@ -115,9 +115,9 @@ export module StaticServices { export const instantiationService = define(IInstantiationService, () => new InstantiationService(_serviceCollection, true)); - export const contextService = define(IWorkspaceContextService, () => new WorkspaceContextService(new Workspace( - URI.from({ scheme: 'inmemory', authority: 'model', path: '/' }) - ))); + export const contextService = define(IWorkspaceContextService, () => new WorkspaceContextService({ + resource: URI.from({ scheme: 'inmemory', authority: 'model', path: '/' }) + })); export const telemetryService = define(ITelemetryService, () => new StandaloneTelemetryService()); diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index eae7c42e20c43..1218ddd4da827 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -65,26 +65,27 @@ export interface IWorkspace { name?: string; } -export class Workspace implements IWorkspace { +export class WorkspaceContextService implements IWorkspaceContextService { - constructor(private _resource: URI, private _uid?: number, private _name?: string) { - } + public _serviceBrand: any; - public get resource(): URI { - return this._resource; + private workspace: IWorkspace; + + constructor(workspace: IWorkspace) { + this.workspace = workspace; } - public get uid(): number { - return this._uid; + public getWorkspace(): IWorkspace { + return this.workspace; } - public get name(): string { - return this._name; + public hasWorkspace(): boolean { + return !!this.workspace; } public isInsideWorkspace(resource: URI): boolean { - if (resource) { - return isEqualOrParent(resource.fsPath, this._resource.fsPath, !isLinux /* ignorecase */); + if (resource && this.workspace) { + return isEqualOrParent(resource.fsPath, this.workspace.resource.fsPath, !isLinux /* ignorecase */); } return false; @@ -92,48 +93,17 @@ export class Workspace implements IWorkspace { public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { if (this.isInsideWorkspace(resource)) { - return paths.normalize(paths.relative(this._resource.fsPath, resource.fsPath), toOSPath); + return paths.normalize(paths.relative(this.workspace.resource.fsPath, resource.fsPath), toOSPath); } return null; } public toResource(workspaceRelativePath: string): URI { - if (typeof workspaceRelativePath === 'string') { - return URI.file(paths.join(this._resource.fsPath, workspaceRelativePath)); + if (typeof workspaceRelativePath === 'string' && this.workspace) { + return URI.file(paths.join(this.workspace.resource.fsPath, workspaceRelativePath)); } return null; } -} - -export class WorkspaceContextService implements IWorkspaceContextService { - - public _serviceBrand: any; - - private workspace: Workspace; - - constructor(workspace?: Workspace) { - this.workspace = workspace; - } - - public getWorkspace(): IWorkspace { - return this.workspace; - } - - public hasWorkspace(): boolean { - return !!this.workspace; - } - - public isInsideWorkspace(resource: URI): boolean { - return this.workspace ? this.workspace.isInsideWorkspace(resource) : false; - } - - public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { - return this.workspace ? this.workspace.toWorkspaceRelativePath(resource, toOSPath) : null; - } - - public toResource(workspaceRelativePath: string): URI { - return this.workspace ? this.workspace.toResource(workspaceRelativePath) : null; - } } \ No newline at end of file diff --git a/src/vs/platform/workspace/test/common/testWorkspace.ts b/src/vs/platform/workspace/test/common/testWorkspace.ts index 18926c9330dac..237d85295236c 100644 --- a/src/vs/platform/workspace/test/common/testWorkspace.ts +++ b/src/vs/platform/workspace/test/common/testWorkspace.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Workspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspace } from 'vs/platform/workspace/common/workspace'; import URI from 'vs/base/common/uri'; -export const TestWorkspace = new Workspace( - URI.file('C:\\testWorkspace'), - Date.now(), - 'Test Workspace' -); +export const TestWorkspace: IWorkspace = { + resource: URI.file('C:\\testWorkspace'), + name: 'Test Workspace', + uid: Date.now() +}; diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index b8bfbe51ce6df..b20a6fd422ae3 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -18,7 +18,7 @@ import paths = require('vs/base/common/paths'); import uri from 'vs/base/common/uri'; import strings = require('vs/base/common/strings'); import { IResourceInput } from 'vs/platform/editor/common/editor'; -import { WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspace, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configurationService'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; import { realpath, stat } from 'vs/base/node/pfs'; @@ -116,7 +116,7 @@ function toInputs(paths: IPath[], isUntitledFile?: boolean): IResourceInput[] { }); } -function getWorkspace(workspacePath: string): TPromise { +function getWorkspace(workspacePath: string): TPromise { if (!workspacePath) { return TPromise.as(null); } @@ -135,23 +135,23 @@ function getWorkspace(workspacePath: string): TPromise { const folderName = path.basename(realWorkspacePath) || realWorkspacePath; return stat(realWorkspacePath).then(folderStat => { - return new Workspace( - workspaceResource, - platform.isLinux ? folderStat.ino : folderStat.birthtime.getTime(), - folderName // On Linux, birthtime is ctime, so we cannot use it! We use the ino instead! - ); + return { + 'resource': workspaceResource, + 'name': folderName, + 'uid': platform.isLinux ? folderStat.ino : folderStat.birthtime.getTime() // On Linux, birthtime is ctime, so we cannot use it! We use the ino instead! + }; }); - }, error => { + }, (error) => { errors.onUnexpectedError(error); return null; // treat invalid paths as empty workspace }); } -function openWorkbench(environment: IWindowConfiguration, workspace: Workspace, options: IOptions): TPromise { +function openWorkbench(environment: IWindowConfiguration, workspace: IWorkspace, options: IOptions): TPromise { const environmentService = new EnvironmentService(environment, environment.execPath); const contextService = new WorkspaceContextService(workspace); - const configurationService = new WorkspaceConfigurationService(environmentService, workspace); + const configurationService = new WorkspaceConfigurationService(contextService, environmentService); const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !contextService.hasWorkspace()); // Since the configuration service is one of the core services that is used in so many places, we initialize it diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index abb6f76e6c87f..fd41b0c29fe16 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -15,7 +15,7 @@ import { ExtHostThreadService } from 'vs/workbench/services/thread/common/extHos import { QueryType, ISearchQuery } from 'vs/platform/search/common/search'; import { DiskSearch } from 'vs/workbench/services/search/node/searchService'; import { RemoteTelemetryService } from 'vs/workbench/api/node/extHostTelemetry'; -import { IWorkspaceContextService, WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IInitData, IEnvironment, MainContext } from 'vs/workbench/api/node/extHost.protocol'; import * as errors from 'vs/base/common/errors'; @@ -43,14 +43,7 @@ export class ExtensionHostMain { constructor(remoteCom: IRemoteCom, initData: IInitData) { // services this._environment = initData.environment; - - const workspaceRaw = initData.contextService.workspace; - let workspace: Workspace; - if (workspaceRaw) { - workspace = new Workspace(workspaceRaw.resource, workspaceRaw.uid, workspaceRaw.name); - } - this._contextService = new WorkspaceContextService(workspace); - + this._contextService = new WorkspaceContextService(initData.contextService.workspace); const threadService = new ExtHostThreadService(remoteCom); const telemetryService = new RemoteTelemetryService('pluginHostTelemetry', threadService); this._extensionService = new ExtHostExtensionService(initData, threadService, telemetryService, this._contextService); diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts index d61de282fd475..a491d6153d174 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts @@ -8,7 +8,7 @@ import * as assert from 'assert'; import { Platform } from 'vs/base/common/platform'; import { TerminalLinkHandler, LineColumnInfo } from 'vs/workbench/parts/terminal/electron-browser/terminalLinkHandler'; -import { WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspace, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import URI from 'vs/base/common/uri'; import * as strings from 'vs/base/common/strings'; import * as path from 'path'; @@ -44,9 +44,10 @@ interface LinkFormatInfo { column?: string; } -class TestWorkspace extends Workspace { - constructor(private basePath: string) { - super(new TestURI(basePath)); +class TestWorkspace implements IWorkspace { + resource: URI; + constructor(basePath: string) { + this.resource = new TestURI(basePath); } } diff --git a/src/vs/workbench/services/configuration/node/configurationService.ts b/src/vs/workbench/services/configuration/node/configurationService.ts index 9ea368f587bc5..b0537b9a12ce2 100644 --- a/src/vs/workbench/services/configuration/node/configurationService.ts +++ b/src/vs/workbench/services/configuration/node/configurationService.ts @@ -12,6 +12,7 @@ import extfs = require('vs/base/node/extfs'); import objects = require('vs/base/common/objects'); import { RunOnceScheduler } from 'vs/base/common/async'; import collections = require('vs/base/common/collections'); +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; import { readFile } from 'vs/base/node/pfs'; @@ -23,7 +24,7 @@ import { ConfigurationService as BaseConfigurationService } from 'vs/platform/co import { IWorkspaceConfigurationValues, IWorkspaceConfigurationService, IWorkspaceConfigurationValue, WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME, WORKSPACE_STANDALONE_CONFIGURATIONS, WORKSPACE_CONFIG_DEFAULT_PATH } from 'vs/workbench/services/configuration/common/configuration'; import { FileChangeType, FileChangesEvent, isEqual } from 'vs/platform/files/common/files'; import Event, { Emitter } from 'vs/base/common/event'; -import { Workspace } from "vs/platform/workspace/common/workspace"; + interface IStat { resource: uri; @@ -61,8 +62,8 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private reloadConfigurationScheduler: RunOnceScheduler; constructor( - private environmentService: IEnvironmentService, - private workspace?: Workspace, + @IWorkspaceContextService private contextService: IWorkspaceContextService, + @IEnvironmentService environmentService: IEnvironmentService, private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME ) { super(); @@ -215,13 +216,13 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private loadWorkspaceConfigFiles(): TPromise<{ [relativeWorkspacePath: string]: IConfigModel }> { // Return early if we don't have a workspace - if (!this.workspace) { + if (!this.contextService.hasWorkspace()) { return TPromise.as(Object.create(null)); } // once: when invoked for the first time we fetch json files that contribute settings if (!this.bulkFetchFromWorkspacePromise) { - this.bulkFetchFromWorkspacePromise = resolveStat(this.workspace.toResource(this.workspaceSettingsRootFolder)).then(stat => { + this.bulkFetchFromWorkspacePromise = resolveStat(this.contextService.toResource(this.workspaceSettingsRootFolder)).then(stat => { if (!stat.isDirectory) { return TPromise.as([]); } @@ -232,11 +233,11 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp return false; // only JSON files } - return this.isWorkspaceConfigurationFile(this.workspace.toWorkspaceRelativePath(stat.resource)); // only workspace config files + return this.isWorkspaceConfigurationFile(this.contextService.toWorkspaceRelativePath(stat.resource)); // only workspace config files }).map(stat => stat.resource)); }, err => [] /* never fail this call */) .then((contents: IContent[]) => { - contents.forEach(content => this.workspaceFilePathToConfiguration[this.workspace.toWorkspaceRelativePath(content.resource)] = TPromise.as(this.createConfigModel(content))); + contents.forEach(content => this.workspaceFilePathToConfiguration[this.contextService.toWorkspaceRelativePath(content.resource)] = TPromise.as(this.createConfigModel(content))); }, errors.onUnexpectedError); } @@ -258,7 +259,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp continue; // only JSON files or the actual settings folder } - const workspacePath = this.workspace.toWorkspaceRelativePath(resource); + const workspacePath = this.contextService.toWorkspaceRelativePath(resource); if (!workspacePath) { continue; // event is not inside workspace } @@ -294,7 +295,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } private createConfigModel(content: IContent): IConfigModel { - const path = this.workspace.toWorkspaceRelativePath(content.resource); + const path = this.contextService.toWorkspaceRelativePath(content.resource); if (path === WORKSPACE_CONFIG_DEFAULT_PATH) { return new WorkspaceSettingsConfigModel(content.value, content.resource.toString()); } else { diff --git a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts index df423a3c094e0..a444ccfb9cfca 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts @@ -15,7 +15,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { Registry } from 'vs/platform/platform'; import { ParsedArgs, IEnvironmentService } from 'vs/platform/environment/common/environment'; import { parseArgs } from 'vs/platform/environment/node/argv'; -import { WorkspaceContextService, IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; +import { WorkspaceContextService, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import extfs = require('vs/base/node/extfs'); import { TestTextFileService, TestEditorGroupService, TestLifecycleService, TestBackupFileService } from 'vs/workbench/test/workbenchTestServices'; @@ -113,11 +113,9 @@ suite('ConfigurationEditingService', () => { clearServices(); instantiationService = new TestInstantiationService(); - const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); - instantiationService.stub(IEnvironmentService, environmentService); - const workspace = noWorkspace ? null : new Workspace(URI.file(workspaceDir)); - instantiationService.stub(IWorkspaceContextService, new WorkspaceContextService(workspace)); - const configurationService = new WorkspaceConfigurationService(environmentService, workspace); + instantiationService.stub(IEnvironmentService, new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile)); + instantiationService.stub(IWorkspaceContextService, new WorkspaceContextService(noWorkspace ? null : { resource: URI.file(workspaceDir) })); + const configurationService = instantiationService.createInstance(WorkspaceConfigurationService); instantiationService.stub(IConfigurationService, configurationService); instantiationService.stub(ILifecycleService, new TestLifecycleService()); instantiationService.stub(IEditorGroupService, new TestEditorGroupService()); diff --git a/src/vs/workbench/services/configuration/test/node/configurationService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationService.test.ts index c61238061d7f4..3d202425b4ad7 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationService.test.ts @@ -13,7 +13,7 @@ import * as sinon from 'sinon'; import { TPromise } from 'vs/base/common/winjs.base'; import { Registry } from 'vs/platform/platform'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; -import { Workspace } from 'vs/platform/workspace/common/workspace'; +import { WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import { parseArgs } from 'vs/platform/environment/node/argv'; import extfs = require('vs/base/node/extfs'); @@ -47,9 +47,9 @@ suite('WorkspaceConfigurationService - Node', () => { } function createService(workspaceDir: string, globalSettingsFile: string): TPromise { - const workspace = new Workspace(URI.file(workspaceDir)); + const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); - const service = new WorkspaceConfigurationService(environmentService, workspace); + const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); return service.initialize().then(() => service); } @@ -204,9 +204,9 @@ suite('WorkspaceConfigurationService - Node', () => { test('workspace change triggers event', (done: () => void) => { createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { - const workspace = new Workspace(URI.file(workspaceDir)); + const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); - const service = new WorkspaceConfigurationService(environmentService, workspace); + const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); return service.initialize().then(() => { service.onDidUpdateConfiguration(event => { @@ -230,9 +230,9 @@ suite('WorkspaceConfigurationService - Node', () => { test('workspace reload should triggers event if content changed', (done: () => void) => { createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { - const workspace = new Workspace(URI.file(workspaceDir)); + const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); - const service = new WorkspaceConfigurationService(environmentService, workspace); + const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); return service.initialize().then(() => { const settingsFile = path.join(workspaceDir, '.vscode', 'settings.json'); @@ -255,9 +255,9 @@ suite('WorkspaceConfigurationService - Node', () => { test('workspace reload should not trigger event if nothing changed', (done: () => void) => { createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { - const workspace = new Workspace(URI.file(workspaceDir)); + const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); - const service = new WorkspaceConfigurationService(environmentService, workspace); + const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); return service.initialize().then(() => { const settingsFile = path.join(workspaceDir, '.vscode', 'settings.json'); @@ -280,9 +280,9 @@ suite('WorkspaceConfigurationService - Node', () => { test('workspace reload should not trigger event if there is no model', (done: () => void) => { createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { - const workspace = new Workspace(URI.file(workspaceDir)); + const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); - const service = new WorkspaceConfigurationService(environmentService, workspace); + const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); return service.initialize().then(() => { const target = sinon.stub(); diff --git a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts index dfd2576d1d4f2..ad4fdee36f5f3 100644 --- a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts @@ -7,7 +7,7 @@ import 'vs/workbench/parts/search/browser/search.contribution'; // load contributions import * as assert from 'assert'; -import { WorkspaceContextService, IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; +import { WorkspaceContextService, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { createSyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ISearchService } from 'vs/platform/search/common/search'; @@ -73,7 +73,7 @@ suite('QuickOpen performance (integration)', () => { [ITelemetryService, telemetryService], [IConfigurationService, new SimpleConfigurationService()], [IModelService, new ModelServiceImpl(null, configurationService)], - [IWorkspaceContextService, new WorkspaceContextService(new Workspace(URI.file(testWorkspacePath)))], + [IWorkspaceContextService, new WorkspaceContextService({ resource: URI.file(testWorkspacePath) })], [IWorkbenchEditorService, new TestEditorService()], [IEditorGroupService, new TestEditorGroupService()], [IEnvironmentService, TestEnvironmentService], diff --git a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts index 7d1bb6b1139e0..861ff47567753 100644 --- a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts @@ -8,7 +8,7 @@ import 'vs/workbench/parts/search/browser/search.contribution'; // load contributions import * as assert from 'assert'; import * as fs from 'fs'; -import { WorkspaceContextService, IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; +import { WorkspaceContextService, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { createSyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ISearchService, IQueryOptions } from 'vs/platform/search/common/search'; @@ -62,7 +62,7 @@ suite('TextSearch performance (integration)', () => { [ITelemetryService, telemetryService], [IConfigurationService, new SimpleConfigurationService()], [IModelService, new ModelServiceImpl(null, configurationService)], - [IWorkspaceContextService, new WorkspaceContextService(new Workspace(URI.file(testWorkspacePath)))], + [IWorkspaceContextService, new WorkspaceContextService({ resource: URI.file(testWorkspacePath) })], [IWorkbenchEditorService, new TestEditorService()], [IEditorGroupService, new TestEditorGroupService()], [IEnvironmentService, TestEnvironmentService], From dabe5d0cc4c037e71c7f586a0a8f3b3c75fe9d3e Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 12 Jun 2017 10:51:34 +0200 Subject: [PATCH 1712/2747] extract more functionality into IWorkspace --- .../browser/standalone/standaloneServices.ts | 8 +-- src/vs/platform/workspace/common/workspace.ts | 64 ++++++++++++++----- .../workspace/test/common/testWorkspace.ts | 12 ++-- src/vs/workbench/electron-browser/main.ts | 20 +++--- src/vs/workbench/node/extensionHostMain.ts | 11 +++- .../terminalLinkHandler.test.ts | 9 ++- .../node/configurationService.ts | 19 +++--- .../node/configurationEditingService.test.ts | 10 +-- .../test/node/configurationService.test.ts | 22 +++---- .../quickopen.perf.integrationTest.ts | 4 +- .../textsearch.perf.integrationTest.ts | 4 +- 11 files changed, 112 insertions(+), 71 deletions(-) diff --git a/src/vs/editor/browser/standalone/standaloneServices.ts b/src/vs/editor/browser/standalone/standaloneServices.ts index 550b5294605dd..68e9623baf121 100644 --- a/src/vs/editor/browser/standalone/standaloneServices.ts +++ b/src/vs/editor/browser/standalone/standaloneServices.ts @@ -22,7 +22,7 @@ import { IMessageService } from 'vs/platform/message/common/message'; import { IProgressService } from 'vs/platform/progress/common/progress'; import { IStorageService, NullStorageService } from 'vs/platform/storage/common/storage'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; import { EditorWorkerServiceImpl } from 'vs/editor/common/services/editorWorkerServiceImpl'; @@ -115,9 +115,9 @@ export module StaticServices { export const instantiationService = define(IInstantiationService, () => new InstantiationService(_serviceCollection, true)); - export const contextService = define(IWorkspaceContextService, () => new WorkspaceContextService({ - resource: URI.from({ scheme: 'inmemory', authority: 'model', path: '/' }) - })); + export const contextService = define(IWorkspaceContextService, () => new WorkspaceContextService(new Workspace( + URI.from({ scheme: 'inmemory', authority: 'model', path: '/' }) + ))); export const telemetryService = define(ITelemetryService, () => new StandaloneTelemetryService()); diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index 1218ddd4da827..a1a0480997dc5 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -65,27 +65,26 @@ export interface IWorkspace { name?: string; } -export class WorkspaceContextService implements IWorkspaceContextService { - - public _serviceBrand: any; +export class Workspace implements IWorkspace { - private workspace: IWorkspace; + constructor(private _resource: URI, private _uid?: number, private _name?: string) { + } - constructor(workspace: IWorkspace) { - this.workspace = workspace; + public get resource(): URI { + return this._resource; } - public getWorkspace(): IWorkspace { - return this.workspace; + public get uid(): number { + return this._uid; } - public hasWorkspace(): boolean { - return !!this.workspace; + public get name(): string { + return this._name; } public isInsideWorkspace(resource: URI): boolean { - if (resource && this.workspace) { - return isEqualOrParent(resource.fsPath, this.workspace.resource.fsPath, !isLinux /* ignorecase */); + if (resource) { + return isEqualOrParent(resource.fsPath, this._resource.fsPath, !isLinux /* ignorecase */); } return false; @@ -93,17 +92,52 @@ export class WorkspaceContextService implements IWorkspaceContextService { public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { if (this.isInsideWorkspace(resource)) { - return paths.normalize(paths.relative(this.workspace.resource.fsPath, resource.fsPath), toOSPath); + return paths.normalize(paths.relative(this._resource.fsPath, resource.fsPath), toOSPath); } return null; } public toResource(workspaceRelativePath: string): URI { - if (typeof workspaceRelativePath === 'string' && this.workspace) { - return URI.file(paths.join(this.workspace.resource.fsPath, workspaceRelativePath)); + if (typeof workspaceRelativePath === 'string') { + return URI.file(paths.join(this._resource.fsPath, workspaceRelativePath)); } return null; } + + public toJSON() { + return { resource: this._resource, uid: this._uid, name: this._name }; + } +} + +export class WorkspaceContextService implements IWorkspaceContextService { + + public _serviceBrand: any; + + private workspace: Workspace; + + constructor(workspace?: Workspace) { + this.workspace = workspace; + } + + public getWorkspace(): IWorkspace { + return this.workspace; + } + + public hasWorkspace(): boolean { + return !!this.workspace; + } + + public isInsideWorkspace(resource: URI): boolean { + return this.workspace ? this.workspace.isInsideWorkspace(resource) : false; + } + + public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { + return this.workspace ? this.workspace.toWorkspaceRelativePath(resource, toOSPath) : null; + } + + public toResource(workspaceRelativePath: string): URI { + return this.workspace ? this.workspace.toResource(workspaceRelativePath) : null; + } } \ No newline at end of file diff --git a/src/vs/platform/workspace/test/common/testWorkspace.ts b/src/vs/platform/workspace/test/common/testWorkspace.ts index 237d85295236c..18926c9330dac 100644 --- a/src/vs/platform/workspace/test/common/testWorkspace.ts +++ b/src/vs/platform/workspace/test/common/testWorkspace.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IWorkspace } from 'vs/platform/workspace/common/workspace'; +import { Workspace } from 'vs/platform/workspace/common/workspace'; import URI from 'vs/base/common/uri'; -export const TestWorkspace: IWorkspace = { - resource: URI.file('C:\\testWorkspace'), - name: 'Test Workspace', - uid: Date.now() -}; +export const TestWorkspace = new Workspace( + URI.file('C:\\testWorkspace'), + Date.now(), + 'Test Workspace' +); diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index b20a6fd422ae3..b8bfbe51ce6df 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -18,7 +18,7 @@ import paths = require('vs/base/common/paths'); import uri from 'vs/base/common/uri'; import strings = require('vs/base/common/strings'); import { IResourceInput } from 'vs/platform/editor/common/editor'; -import { IWorkspace, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configurationService'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; import { realpath, stat } from 'vs/base/node/pfs'; @@ -116,7 +116,7 @@ function toInputs(paths: IPath[], isUntitledFile?: boolean): IResourceInput[] { }); } -function getWorkspace(workspacePath: string): TPromise { +function getWorkspace(workspacePath: string): TPromise { if (!workspacePath) { return TPromise.as(null); } @@ -135,23 +135,23 @@ function getWorkspace(workspacePath: string): TPromise { const folderName = path.basename(realWorkspacePath) || realWorkspacePath; return stat(realWorkspacePath).then(folderStat => { - return { - 'resource': workspaceResource, - 'name': folderName, - 'uid': platform.isLinux ? folderStat.ino : folderStat.birthtime.getTime() // On Linux, birthtime is ctime, so we cannot use it! We use the ino instead! - }; + return new Workspace( + workspaceResource, + platform.isLinux ? folderStat.ino : folderStat.birthtime.getTime(), + folderName // On Linux, birthtime is ctime, so we cannot use it! We use the ino instead! + ); }); - }, (error) => { + }, error => { errors.onUnexpectedError(error); return null; // treat invalid paths as empty workspace }); } -function openWorkbench(environment: IWindowConfiguration, workspace: IWorkspace, options: IOptions): TPromise { +function openWorkbench(environment: IWindowConfiguration, workspace: Workspace, options: IOptions): TPromise { const environmentService = new EnvironmentService(environment, environment.execPath); const contextService = new WorkspaceContextService(workspace); - const configurationService = new WorkspaceConfigurationService(contextService, environmentService); + const configurationService = new WorkspaceConfigurationService(environmentService, workspace); const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !contextService.hasWorkspace()); // Since the configuration service is one of the core services that is used in so many places, we initialize it diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index fd41b0c29fe16..abb6f76e6c87f 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -15,7 +15,7 @@ import { ExtHostThreadService } from 'vs/workbench/services/thread/common/extHos import { QueryType, ISearchQuery } from 'vs/platform/search/common/search'; import { DiskSearch } from 'vs/workbench/services/search/node/searchService'; import { RemoteTelemetryService } from 'vs/workbench/api/node/extHostTelemetry'; -import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { IInitData, IEnvironment, MainContext } from 'vs/workbench/api/node/extHost.protocol'; import * as errors from 'vs/base/common/errors'; @@ -43,7 +43,14 @@ export class ExtensionHostMain { constructor(remoteCom: IRemoteCom, initData: IInitData) { // services this._environment = initData.environment; - this._contextService = new WorkspaceContextService(initData.contextService.workspace); + + const workspaceRaw = initData.contextService.workspace; + let workspace: Workspace; + if (workspaceRaw) { + workspace = new Workspace(workspaceRaw.resource, workspaceRaw.uid, workspaceRaw.name); + } + this._contextService = new WorkspaceContextService(workspace); + const threadService = new ExtHostThreadService(remoteCom); const telemetryService = new RemoteTelemetryService('pluginHostTelemetry', threadService); this._extensionService = new ExtHostExtensionService(initData, threadService, telemetryService, this._contextService); diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts index a491d6153d174..d61de282fd475 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts @@ -8,7 +8,7 @@ import * as assert from 'assert'; import { Platform } from 'vs/base/common/platform'; import { TerminalLinkHandler, LineColumnInfo } from 'vs/workbench/parts/terminal/electron-browser/terminalLinkHandler'; -import { IWorkspace, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import URI from 'vs/base/common/uri'; import * as strings from 'vs/base/common/strings'; import * as path from 'path'; @@ -44,10 +44,9 @@ interface LinkFormatInfo { column?: string; } -class TestWorkspace implements IWorkspace { - resource: URI; - constructor(basePath: string) { - this.resource = new TestURI(basePath); +class TestWorkspace extends Workspace { + constructor(private basePath: string) { + super(new TestURI(basePath)); } } diff --git a/src/vs/workbench/services/configuration/node/configurationService.ts b/src/vs/workbench/services/configuration/node/configurationService.ts index b0537b9a12ce2..9ea368f587bc5 100644 --- a/src/vs/workbench/services/configuration/node/configurationService.ts +++ b/src/vs/workbench/services/configuration/node/configurationService.ts @@ -12,7 +12,6 @@ import extfs = require('vs/base/node/extfs'); import objects = require('vs/base/common/objects'); import { RunOnceScheduler } from 'vs/base/common/async'; import collections = require('vs/base/common/collections'); -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; import { readFile } from 'vs/base/node/pfs'; @@ -24,7 +23,7 @@ import { ConfigurationService as BaseConfigurationService } from 'vs/platform/co import { IWorkspaceConfigurationValues, IWorkspaceConfigurationService, IWorkspaceConfigurationValue, WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME, WORKSPACE_STANDALONE_CONFIGURATIONS, WORKSPACE_CONFIG_DEFAULT_PATH } from 'vs/workbench/services/configuration/common/configuration'; import { FileChangeType, FileChangesEvent, isEqual } from 'vs/platform/files/common/files'; import Event, { Emitter } from 'vs/base/common/event'; - +import { Workspace } from "vs/platform/workspace/common/workspace"; interface IStat { resource: uri; @@ -62,8 +61,8 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private reloadConfigurationScheduler: RunOnceScheduler; constructor( - @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IEnvironmentService environmentService: IEnvironmentService, + private environmentService: IEnvironmentService, + private workspace?: Workspace, private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME ) { super(); @@ -216,13 +215,13 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private loadWorkspaceConfigFiles(): TPromise<{ [relativeWorkspacePath: string]: IConfigModel }> { // Return early if we don't have a workspace - if (!this.contextService.hasWorkspace()) { + if (!this.workspace) { return TPromise.as(Object.create(null)); } // once: when invoked for the first time we fetch json files that contribute settings if (!this.bulkFetchFromWorkspacePromise) { - this.bulkFetchFromWorkspacePromise = resolveStat(this.contextService.toResource(this.workspaceSettingsRootFolder)).then(stat => { + this.bulkFetchFromWorkspacePromise = resolveStat(this.workspace.toResource(this.workspaceSettingsRootFolder)).then(stat => { if (!stat.isDirectory) { return TPromise.as([]); } @@ -233,11 +232,11 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp return false; // only JSON files } - return this.isWorkspaceConfigurationFile(this.contextService.toWorkspaceRelativePath(stat.resource)); // only workspace config files + return this.isWorkspaceConfigurationFile(this.workspace.toWorkspaceRelativePath(stat.resource)); // only workspace config files }).map(stat => stat.resource)); }, err => [] /* never fail this call */) .then((contents: IContent[]) => { - contents.forEach(content => this.workspaceFilePathToConfiguration[this.contextService.toWorkspaceRelativePath(content.resource)] = TPromise.as(this.createConfigModel(content))); + contents.forEach(content => this.workspaceFilePathToConfiguration[this.workspace.toWorkspaceRelativePath(content.resource)] = TPromise.as(this.createConfigModel(content))); }, errors.onUnexpectedError); } @@ -259,7 +258,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp continue; // only JSON files or the actual settings folder } - const workspacePath = this.contextService.toWorkspaceRelativePath(resource); + const workspacePath = this.workspace.toWorkspaceRelativePath(resource); if (!workspacePath) { continue; // event is not inside workspace } @@ -295,7 +294,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } private createConfigModel(content: IContent): IConfigModel { - const path = this.contextService.toWorkspaceRelativePath(content.resource); + const path = this.workspace.toWorkspaceRelativePath(content.resource); if (path === WORKSPACE_CONFIG_DEFAULT_PATH) { return new WorkspaceSettingsConfigModel(content.value, content.resource.toString()); } else { diff --git a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts index a444ccfb9cfca..df423a3c094e0 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts @@ -15,7 +15,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { Registry } from 'vs/platform/platform'; import { ParsedArgs, IEnvironmentService } from 'vs/platform/environment/common/environment'; import { parseArgs } from 'vs/platform/environment/node/argv'; -import { WorkspaceContextService, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { WorkspaceContextService, IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import extfs = require('vs/base/node/extfs'); import { TestTextFileService, TestEditorGroupService, TestLifecycleService, TestBackupFileService } from 'vs/workbench/test/workbenchTestServices'; @@ -113,9 +113,11 @@ suite('ConfigurationEditingService', () => { clearServices(); instantiationService = new TestInstantiationService(); - instantiationService.stub(IEnvironmentService, new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile)); - instantiationService.stub(IWorkspaceContextService, new WorkspaceContextService(noWorkspace ? null : { resource: URI.file(workspaceDir) })); - const configurationService = instantiationService.createInstance(WorkspaceConfigurationService); + const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); + instantiationService.stub(IEnvironmentService, environmentService); + const workspace = noWorkspace ? null : new Workspace(URI.file(workspaceDir)); + instantiationService.stub(IWorkspaceContextService, new WorkspaceContextService(workspace)); + const configurationService = new WorkspaceConfigurationService(environmentService, workspace); instantiationService.stub(IConfigurationService, configurationService); instantiationService.stub(ILifecycleService, new TestLifecycleService()); instantiationService.stub(IEditorGroupService, new TestEditorGroupService()); diff --git a/src/vs/workbench/services/configuration/test/node/configurationService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationService.test.ts index 3d202425b4ad7..c61238061d7f4 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationService.test.ts @@ -13,7 +13,7 @@ import * as sinon from 'sinon'; import { TPromise } from 'vs/base/common/winjs.base'; import { Registry } from 'vs/platform/platform'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; -import { WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { Workspace } from 'vs/platform/workspace/common/workspace'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import { parseArgs } from 'vs/platform/environment/node/argv'; import extfs = require('vs/base/node/extfs'); @@ -47,9 +47,9 @@ suite('WorkspaceConfigurationService - Node', () => { } function createService(workspaceDir: string, globalSettingsFile: string): TPromise { - const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); + const workspace = new Workspace(URI.file(workspaceDir)); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); - const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); + const service = new WorkspaceConfigurationService(environmentService, workspace); return service.initialize().then(() => service); } @@ -204,9 +204,9 @@ suite('WorkspaceConfigurationService - Node', () => { test('workspace change triggers event', (done: () => void) => { createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { - const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); + const workspace = new Workspace(URI.file(workspaceDir)); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); - const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); + const service = new WorkspaceConfigurationService(environmentService, workspace); return service.initialize().then(() => { service.onDidUpdateConfiguration(event => { @@ -230,9 +230,9 @@ suite('WorkspaceConfigurationService - Node', () => { test('workspace reload should triggers event if content changed', (done: () => void) => { createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { - const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); + const workspace = new Workspace(URI.file(workspaceDir)); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); - const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); + const service = new WorkspaceConfigurationService(environmentService, workspace); return service.initialize().then(() => { const settingsFile = path.join(workspaceDir, '.vscode', 'settings.json'); @@ -255,9 +255,9 @@ suite('WorkspaceConfigurationService - Node', () => { test('workspace reload should not trigger event if nothing changed', (done: () => void) => { createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { - const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); + const workspace = new Workspace(URI.file(workspaceDir)); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); - const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); + const service = new WorkspaceConfigurationService(environmentService, workspace); return service.initialize().then(() => { const settingsFile = path.join(workspaceDir, '.vscode', 'settings.json'); @@ -280,9 +280,9 @@ suite('WorkspaceConfigurationService - Node', () => { test('workspace reload should not trigger event if there is no model', (done: () => void) => { createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { - const workspaceContextService = new WorkspaceContextService({ resource: URI.file(workspaceDir) }); + const workspace = new Workspace(URI.file(workspaceDir)); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); - const service = new WorkspaceConfigurationService(workspaceContextService, environmentService); + const service = new WorkspaceConfigurationService(environmentService, workspace); return service.initialize().then(() => { const target = sinon.stub(); diff --git a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts index ad4fdee36f5f3..dfd2576d1d4f2 100644 --- a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts @@ -7,7 +7,7 @@ import 'vs/workbench/parts/search/browser/search.contribution'; // load contributions import * as assert from 'assert'; -import { WorkspaceContextService, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { WorkspaceContextService, IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { createSyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ISearchService } from 'vs/platform/search/common/search'; @@ -73,7 +73,7 @@ suite('QuickOpen performance (integration)', () => { [ITelemetryService, telemetryService], [IConfigurationService, new SimpleConfigurationService()], [IModelService, new ModelServiceImpl(null, configurationService)], - [IWorkspaceContextService, new WorkspaceContextService({ resource: URI.file(testWorkspacePath) })], + [IWorkspaceContextService, new WorkspaceContextService(new Workspace(URI.file(testWorkspacePath)))], [IWorkbenchEditorService, new TestEditorService()], [IEditorGroupService, new TestEditorGroupService()], [IEnvironmentService, TestEnvironmentService], diff --git a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts index 861ff47567753..7d1bb6b1139e0 100644 --- a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts @@ -8,7 +8,7 @@ import 'vs/workbench/parts/search/browser/search.contribution'; // load contributions import * as assert from 'assert'; import * as fs from 'fs'; -import { WorkspaceContextService, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { WorkspaceContextService, IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { createSyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ISearchService, IQueryOptions } from 'vs/platform/search/common/search'; @@ -62,7 +62,7 @@ suite('TextSearch performance (integration)', () => { [ITelemetryService, telemetryService], [IConfigurationService, new SimpleConfigurationService()], [IModelService, new ModelServiceImpl(null, configurationService)], - [IWorkspaceContextService, new WorkspaceContextService({ resource: URI.file(testWorkspacePath) })], + [IWorkspaceContextService, new WorkspaceContextService(new Workspace(URI.file(testWorkspacePath)))], [IWorkbenchEditorService, new TestEditorService()], [IEditorGroupService, new TestEditorGroupService()], [IEnvironmentService, TestEnvironmentService], From 9363c783d3ebf233a3d22228bc438c841bdcb3da Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 12 Jun 2017 11:10:16 +0200 Subject: [PATCH 1713/2747] Tweak #28351 --- .../parts/tasks/electron-browser/terminalTaskSystem.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index 31727dae1e085..5ea02159fffa1 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -423,7 +423,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { shellArgs.push(commandLine); shellLaunchConfig.args = Platform.isWindows ? shellArgs.join(' ') : shellArgs; if (task.command.terminalBehavior.echo) { - shellLaunchConfig.initialText = `\x1b[4mExecuting task: ${commandLine}\x1b[0m\n`; + shellLaunchConfig.initialText = `\x1b[1m>Executing task: ${commandLine}<\x1b[0m\n`; } } else { let cwd = options && options.cwd ? options.cwd : process.cwd(); @@ -446,7 +446,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { } return args.join(' '); }; - shellLaunchConfig.initialText = `Executing task: ${shellLaunchConfig.executable} ${getArgsToEcho(shellLaunchConfig.args)}\n`; + shellLaunchConfig.initialText = `\x1b[1m>Executing task: ${shellLaunchConfig.executable} ${getArgsToEcho(shellLaunchConfig.args)}<\x1b[0m\n`; } } if (options.cwd) { From 720cbadf293f4e932e14f932c64e666e15fa020d Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 12 Jun 2017 12:02:45 +0200 Subject: [PATCH 1714/2747] Implement correct silent bahviour for terminal task runner. --- .../parts/tasks/electron-browser/terminalTaskSystem.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index 5ea02159fffa1..b22d2788cb335 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -332,7 +332,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { }); } this.terminalService.setActiveInstance(terminal); - if (task.command.terminalBehavior.reveal === RevealKind.Always) { + if (task.command.terminalBehavior.reveal === RevealKind.Always || (task.command.terminalBehavior.reveal === RevealKind.Silent && task.problemMatchers.length === 0)) { this.terminalService.showPanel(false); } this.activeTasks[task._id] = { terminal, task, promise }; From 240cf011a18b037a1929cace7bf5a3086aac6dbe Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 12 Jun 2017 12:38:08 +0200 Subject: [PATCH 1715/2747] VS code icons is distorted when invoked from the command line (fixes #28345) --- src/main.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main.js b/src/main.js index 9bba0165cd70f..492179610a3bd 100644 --- a/src/main.js +++ b/src/main.js @@ -19,9 +19,7 @@ if (process.argv.indexOf('--prof-startup') >= 0) { if (process.env.LC_ALL) { process.env.LC_ALL = 'C'; } -if (process.env.LC_NUMERIC) { - process.env.LC_NUMERIC = 'C'; -} +process.env.LC_NUMERIC = 'C'; // Perf measurements global.perfStartTime = Date.now(); From 00a24d5c82baa300ce8aa2f7c7780655d11070cf Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 12 Jun 2017 12:40:58 +0200 Subject: [PATCH 1716/2747] workspace - wire in some new apis to get at folders --- .../browser/standalone/standaloneServices.ts | 7 +- src/vs/platform/workspace/common/workspace.ts | 86 ++++++++++++++++++- .../electron-browser/main.contribution.ts | 29 +++++++ src/vs/workbench/electron-browser/main.ts | 2 +- src/vs/workbench/node/extensionHostMain.ts | 3 +- .../extensionsActions.test.ts | 3 +- .../extensionsWorkbenchService.test.ts | 3 +- .../terminalLinkHandler.test.ts | 7 +- .../node/nullConfigurationService.ts | 44 ++++++++++ .../node/configurationEditingService.test.ts | 2 +- src/vs/workbench/test/browser/part.test.ts | 3 +- src/vs/workbench/test/common/memento.test.ts | 3 +- .../quickopen.perf.integrationTest.ts | 4 +- .../textsearch.perf.integrationTest.ts | 4 +- .../workbench/test/workbenchTestServices.ts | 11 +++ 15 files changed, 191 insertions(+), 20 deletions(-) create mode 100644 src/vs/workbench/services/configuration/node/nullConfigurationService.ts diff --git a/src/vs/editor/browser/standalone/standaloneServices.ts b/src/vs/editor/browser/standalone/standaloneServices.ts index 68e9623baf121..456290afa8d8f 100644 --- a/src/vs/editor/browser/standalone/standaloneServices.ts +++ b/src/vs/editor/browser/standalone/standaloneServices.ts @@ -115,14 +115,15 @@ export module StaticServices { export const instantiationService = define(IInstantiationService, () => new InstantiationService(_serviceCollection, true)); - export const contextService = define(IWorkspaceContextService, () => new WorkspaceContextService(new Workspace( + const configurationServiceImpl = new SimpleConfigurationService(); + export const configurationService = define(IConfigurationService, () => configurationServiceImpl); + + export const contextService = define(IWorkspaceContextService, () => new WorkspaceContextService(configurationServiceImpl, new Workspace( URI.from({ scheme: 'inmemory', authority: 'model', path: '/' }) ))); export const telemetryService = define(ITelemetryService, () => new StandaloneTelemetryService()); - export const configurationService = define(IConfigurationService, () => new SimpleConfigurationService()); - export const messageService = define(IMessageService, () => new SimpleMessageService()); export const markerService = define(IMarkerService, () => new MarkerService()); diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index a1a0480997dc5..8e0747fa8de92 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -9,6 +9,11 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' import paths = require('vs/base/common/paths'); import { isEqualOrParent } from 'vs/platform/files/common/files'; import { isLinux } from 'vs/base/common/platform'; +import Event, { Emitter } from 'vs/base/common/event'; +import { IConfigurationService } from "vs/platform/configuration/common/configuration"; +import { IDisposable, dispose } from "vs/base/common/lifecycle"; +import { distinct, equals } from "vs/base/common/arrays"; +import { Schemas } from "vs/base/common/network"; export const IWorkspaceContextService = createDecorator('contextService'); @@ -42,6 +47,12 @@ export interface IWorkspaceContextService { * Given a workspace relative path, returns the resource with the absolute path. */ toResource: (workspaceRelativePath: string) => URI; + + /** + * TODO@Ben multiroot + */ + getFolders(): URI[]; + onDidChangeFolders: Event; } export interface IWorkspace { @@ -111,14 +122,79 @@ export class Workspace implements IWorkspace { } } +type IWorkspaceConfiguration = { path: string; folders: string[]; }[]; + export class WorkspaceContextService implements IWorkspaceContextService { public _serviceBrand: any; - private workspace: Workspace; + private _onDidChangeFolders: Emitter; + private folders: URI[]; + private toDispose: IDisposable[]; + + constructor(private configurationService: IConfigurationService, private workspace?: Workspace) { + this.toDispose = []; + + this._onDidChangeFolders = new Emitter(); + this.toDispose.push(this._onDidChangeFolders); + + this.folders = workspace ? [workspace.resource] : []; + + this.resolveAdditionalFolders(); + + this.registerListeners(); + } + + private registerListeners(): void { + this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onDidUpdateConfiguration())); + } + + private onDidUpdateConfiguration(): void { + this.resolveAdditionalFolders(true); + } + + private resolveAdditionalFolders(notify?: boolean): void { + if (!this.workspace) { + return; // no additional folders for empty workspaces + } + + // Resovled configured folders for workspace + let configuredFolders: URI[] = [this.workspace.resource]; + const config = this.configurationService.getConfiguration('workspace'); + if (Array.isArray(config)) { + for (let i = 0; i < config.length; i++) { + const targetWorkspace = config[i]; + if (targetWorkspace.path === this.workspace.resource.toString()) { + const additionalFolders = targetWorkspace.folders + .map(f => URI.parse(f)) + .filter(r => r.scheme === Schemas.file); // only support files for now + + configuredFolders.push(...additionalFolders); + + break; + } + } + } + + // Remove duplicates + configuredFolders = distinct(configuredFolders, r => r.toString()); + + // Find changes + const changed = !equals(this.folders, configuredFolders, (r1, r2) => r1.toString() === r2.toString()); + + this.folders = configuredFolders; - constructor(workspace?: Workspace) { - this.workspace = workspace; + if (notify && changed) { + this._onDidChangeFolders.fire(configuredFolders); + } + } + + public get onDidChangeFolders(): Event { + return this._onDidChangeFolders && this._onDidChangeFolders.event; //TODO@Sandeep sinon is a pita + } + + public getFolders(): URI[] { + return this.folders; } public getWorkspace(): IWorkspace { @@ -140,4 +216,8 @@ export class WorkspaceContextService implements IWorkspaceContextService { public toResource(workspaceRelativePath: string): URI { return this.workspace ? this.workspace.toResource(workspaceRelativePath) : null; } + + public dispose(): void { + dispose(this.toDispose); + } } \ No newline at end of file diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts index e34a426f1ef01..2cbc72f32ecee 100644 --- a/src/vs/workbench/electron-browser/main.contribution.ts +++ b/src/vs/workbench/electron-browser/main.contribution.ts @@ -357,4 +357,33 @@ configurationRegistry.registerConfiguration({ 'description': nls.localize('zenMode.restore', "Controls if a window should restore to zen mode if it was exited in zen mode.") } } +}); + +// Configuration: Workspace +configurationRegistry.registerConfiguration({ + 'id': 'workspace', + 'order': 10000, + 'title': nls.localize('workspaceConfigurationTitle', "Workspace"), + 'type': 'object', + 'properties': { + 'workspace': { + 'type': 'array', + 'title': nls.localize('workspaces.title', "Folder configuration of the workspace"), + 'items': { + 'required': ['path'], + 'type': 'object', + 'defaultSnippets': [{ 'body': { 'path': '$1', 'folders': ['$2'] } }], + 'properties': { + 'path': { + 'type': 'string', + 'description': nls.localize('workspaces.path', "Path of the folder to configure folders for"), + }, + 'folders': { + 'description': nls.localize('workspaces.additionalFolders', "Folders of this workspace"), + 'type': 'array' + } + } + } + } + } }); \ No newline at end of file diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index b8bfbe51ce6df..4afe4e06bf4a6 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -150,8 +150,8 @@ function getWorkspace(workspacePath: string): TPromise { function openWorkbench(environment: IWindowConfiguration, workspace: Workspace, options: IOptions): TPromise { const environmentService = new EnvironmentService(environment, environment.execPath); - const contextService = new WorkspaceContextService(workspace); const configurationService = new WorkspaceConfigurationService(environmentService, workspace); + const contextService = new WorkspaceContextService(configurationService, workspace); const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !contextService.hasWorkspace()); // Since the configuration service is one of the core services that is used in so many places, we initialize it diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index abb6f76e6c87f..6d38c79e651b7 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -18,6 +18,7 @@ import { RemoteTelemetryService } from 'vs/workbench/api/node/extHostTelemetry'; import { IWorkspaceContextService, WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { IInitData, IEnvironment, MainContext } from 'vs/workbench/api/node/extHost.protocol'; import * as errors from 'vs/base/common/errors'; +import { NullConfigurationService } from "vs/workbench/services/configuration/node/nullConfigurationService"; const nativeExit = process.exit.bind(process); process.exit = function () { @@ -49,7 +50,7 @@ export class ExtensionHostMain { if (workspaceRaw) { workspace = new Workspace(workspaceRaw.resource, workspaceRaw.uid, workspaceRaw.name); } - this._contextService = new WorkspaceContextService(workspace); + this._contextService = new WorkspaceContextService(new NullConfigurationService(), workspace); //TODO@Ben implement for exthost const threadService = new ExtHostThreadService(remoteCom); const telemetryService = new RemoteTelemetryService('pluginHostTelemetry', threadService); diff --git a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts index 0f50eb3a0e55c..084d5a3ad71cd 100644 --- a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts @@ -31,6 +31,7 @@ import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { TestConfigurationService } from "vs/platform/configuration/test/common/testConfigurationService"; suite('ExtensionsActions Test', () => { @@ -52,7 +53,7 @@ suite('ExtensionsActions Test', () => { instantiationService.stub(IURLService, { onOpenURL: new Emitter().event }); instantiationService.stub(ITelemetryService, NullTelemetryService); - instantiationService.set(IWorkspaceContextService, new WorkspaceContextService(TestWorkspace)); + instantiationService.set(IWorkspaceContextService, new WorkspaceContextService(new TestConfigurationService(), TestWorkspace)); instantiationService.stub(IConfigurationService, { onDidUpdateConfiguration: () => { }, getConfiguration: () => ({}) }); instantiationService.stub(IExtensionGalleryService, ExtensionGalleryService); diff --git a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsWorkbenchService.test.ts b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsWorkbenchService.test.ts index d42837e340ece..15ba37559d77b 100644 --- a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsWorkbenchService.test.ts +++ b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsWorkbenchService.test.ts @@ -32,6 +32,7 @@ import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/w import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; import { IChoiceService } from 'vs/platform/message/common/message'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { TestConfigurationService } from "vs/platform/configuration/test/common/testConfigurationService"; suite('ExtensionsWorkbenchService Test', () => { @@ -55,7 +56,7 @@ suite('ExtensionsWorkbenchService Test', () => { instantiationService.stub(IExtensionGalleryService, ExtensionGalleryService); - instantiationService.set(IWorkspaceContextService, new WorkspaceContextService(TestWorkspace)); + instantiationService.set(IWorkspaceContextService, new WorkspaceContextService(new TestConfigurationService(), TestWorkspace)); instantiationService.stub(IConfigurationService, { onDidUpdateConfiguration: () => { }, getConfiguration: () => ({}) }); instantiationService.stub(IExtensionManagementService, ExtensionManagementService); diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts index d61de282fd475..3670f2a79f989 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts @@ -13,6 +13,7 @@ import URI from 'vs/base/common/uri'; import * as strings from 'vs/base/common/strings'; import * as path from 'path'; import * as sinon from 'sinon'; +import { TestConfigurationService } from "vs/platform/configuration/test/common/testConfigurationService"; class TestTerminalLinkHandler extends TerminalLinkHandler { public get localLinkRegex(): RegExp { @@ -175,7 +176,7 @@ suite('Workbench - TerminalLinkHandler', () => { suite('preprocessPath', () => { test('Windows', () => { const linkHandler = new TestTerminalLinkHandler(new TestXterm(), Platform.Windows, null, null, - new WorkspaceContextService(new TestWorkspace('C:\\base'))); + new WorkspaceContextService(new TestConfigurationService(), new TestWorkspace('C:\\base'))); let stub = sinon.stub(path, 'join', function (arg1, arg2) { return arg1 + '\\' + arg2; @@ -189,7 +190,7 @@ suite('Workbench - TerminalLinkHandler', () => { test('Linux', () => { const linkHandler = new TestTerminalLinkHandler(new TestXterm(), Platform.Linux, null, null, - new WorkspaceContextService(new TestWorkspace('/base'))); + new WorkspaceContextService(new TestConfigurationService(), new TestWorkspace('/base'))); let stub = sinon.stub(path, 'join', function (arg1, arg2) { return arg1 + '/' + arg2; @@ -202,7 +203,7 @@ suite('Workbench - TerminalLinkHandler', () => { }); test('No Workspace', () => { - const linkHandler = new TestTerminalLinkHandler(new TestXterm(), Platform.Linux, null, null, new WorkspaceContextService(null)); + const linkHandler = new TestTerminalLinkHandler(new TestXterm(), Platform.Linux, null, null, new WorkspaceContextService(new TestConfigurationService())); assert.equal(linkHandler.preprocessPath('./src/file1'), null); assert.equal(linkHandler.preprocessPath('src/file2'), null); diff --git a/src/vs/workbench/services/configuration/node/nullConfigurationService.ts b/src/vs/workbench/services/configuration/node/nullConfigurationService.ts new file mode 100644 index 0000000000000..c38b5b29b2e54 --- /dev/null +++ b/src/vs/workbench/services/configuration/node/nullConfigurationService.ts @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, getConfigurationValue, IConfigurationKeys } from "vs/platform/configuration/common/configuration"; +import Event, { Emitter } from 'vs/base/common/event'; +import { TPromise } from "vs/base/common/winjs.base"; + +export class NullConfigurationService implements IConfigurationService { + + _serviceBrand: any; + + private _onDidUpdateConfiguration = new Emitter(); + public onDidUpdateConfiguration: Event = this._onDidUpdateConfiguration.event; + + private _config: any; + + constructor() { + this._config = Object.create(null); + } + + public getConfiguration(section?: any): T { + return this._config; + } + + public reloadConfiguration(section?: string): TPromise { + return TPromise.as(this.getConfiguration(section)); + } + + public lookup(key: string): IConfigurationValue { + return { + value: getConfigurationValue(this.getConfiguration(), key), + default: getConfigurationValue(this.getConfiguration(), key), + user: getConfigurationValue(this.getConfiguration(), key) + }; + } + + public keys(): IConfigurationKeys { + return { default: [], user: [] }; + } +} \ No newline at end of file diff --git a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts index df423a3c094e0..86e267938fe54 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts @@ -116,8 +116,8 @@ suite('ConfigurationEditingService', () => { const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); instantiationService.stub(IEnvironmentService, environmentService); const workspace = noWorkspace ? null : new Workspace(URI.file(workspaceDir)); - instantiationService.stub(IWorkspaceContextService, new WorkspaceContextService(workspace)); const configurationService = new WorkspaceConfigurationService(environmentService, workspace); + instantiationService.stub(IWorkspaceContextService, new WorkspaceContextService(configurationService, workspace)); instantiationService.stub(IConfigurationService, configurationService); instantiationService.stub(ILifecycleService, new TestLifecycleService()); instantiationService.stub(IEditorGroupService, new TestEditorGroupService()); diff --git a/src/vs/workbench/test/browser/part.test.ts b/src/vs/workbench/test/browser/part.test.ts index a8a3179063493..0d4d0f1418faa 100644 --- a/src/vs/workbench/test/browser/part.test.ts +++ b/src/vs/workbench/test/browser/part.test.ts @@ -14,6 +14,7 @@ import { IStorageService } from 'vs/platform/storage/common/storage'; import { StorageService, InMemoryLocalStorage } from 'vs/platform/storage/common/storageService'; import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; import { TestThemeService } from 'vs/workbench/test/workbenchTestServices'; +import { TestConfigurationService } from "vs/platform/configuration/test/common/testConfigurationService"; class MyPart extends Part { @@ -91,7 +92,7 @@ suite('Workbench Part', () => { fixture = document.createElement('div'); fixture.id = fixtureId; document.body.appendChild(fixture); - context = new WorkspaceContextService(TestWorkspace); + context = new WorkspaceContextService(new TestConfigurationService(), TestWorkspace); storage = new StorageService(new InMemoryLocalStorage(), null, context); }); diff --git a/src/vs/workbench/test/common/memento.test.ts b/src/vs/workbench/test/common/memento.test.ts index 796ef72d8dd93..c8d988af45974 100644 --- a/src/vs/workbench/test/common/memento.test.ts +++ b/src/vs/workbench/test/common/memento.test.ts @@ -11,13 +11,14 @@ import { StorageScope } from 'vs/platform/storage/common/storage'; import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; import { Memento, Scope } from 'vs/workbench/common/memento'; import { StorageService, InMemoryLocalStorage } from 'vs/platform/storage/common/storageService'; +import { TestConfigurationService } from "vs/platform/configuration/test/common/testConfigurationService"; suite('Workbench Memento', () => { let context; let storage; setup(() => { - context = new WorkspaceContextService(TestWorkspace); + context = new WorkspaceContextService(new TestConfigurationService(), TestWorkspace); storage = new StorageService(new InMemoryLocalStorage(), null, context); }); diff --git a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts index dfd2576d1d4f2..26a08ffd11b01 100644 --- a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts @@ -71,9 +71,9 @@ suite('QuickOpen performance (integration)', () => { const configurationService = new SimpleConfigurationService(); const instantiationService = new InstantiationService(new ServiceCollection( [ITelemetryService, telemetryService], - [IConfigurationService, new SimpleConfigurationService()], + [IConfigurationService, configurationService], [IModelService, new ModelServiceImpl(null, configurationService)], - [IWorkspaceContextService, new WorkspaceContextService(new Workspace(URI.file(testWorkspacePath)))], + [IWorkspaceContextService, new WorkspaceContextService(configurationService, new Workspace(URI.file(testWorkspacePath)))], [IWorkbenchEditorService, new TestEditorService()], [IEditorGroupService, new TestEditorGroupService()], [IEnvironmentService, TestEnvironmentService], diff --git a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts index 7d1bb6b1139e0..64f77fcc9c975 100644 --- a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts @@ -60,9 +60,9 @@ suite('TextSearch performance (integration)', () => { const configurationService = new SimpleConfigurationService(); const instantiationService = new InstantiationService(new ServiceCollection( [ITelemetryService, telemetryService], - [IConfigurationService, new SimpleConfigurationService()], + [IConfigurationService, configurationService], [IModelService, new ModelServiceImpl(null, configurationService)], - [IWorkspaceContextService, new WorkspaceContextService(new Workspace(URI.file(testWorkspacePath)))], + [IWorkspaceContextService, new WorkspaceContextService(configurationService, new Workspace(URI.file(testWorkspacePath)))], [IWorkbenchEditorService, new TestEditorService()], [IEditorGroupService, new TestEditorGroupService()], [IEnvironmentService, TestEnvironmentService], diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 32f74fe5a2d9b..0928c71276d3c 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -66,9 +66,20 @@ export class TestContextService implements IWorkspaceContextService { private workspace: any; private options: any; + private _onDidChangeFolders: Emitter; + constructor(workspace: any = TestWorkspace, options: any = null) { this.workspace = workspace; this.options = options || Object.create(null); + this._onDidChangeFolders = new Emitter(); + } + + public get onDidChangeFolders(): Event { + return this._onDidChangeFolders.event; + } + + public getFolders(): URI[] { + return this.workspace ? [this.workspace.resource] : []; } public hasWorkspace(): boolean { From 3194060001a3a1b11858dc6bbfeacae5f0953bf0 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 12 Jun 2017 12:46:14 +0200 Subject: [PATCH 1717/2747] debt - prevent accidentical exposing of APIs by being too relaxed --- src/vs/workbench/api/node/extHost.api.impl.ts | 51 +++---------------- 1 file changed, 8 insertions(+), 43 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index cef1654dca7b9..b9b4746182f71 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -65,33 +65,6 @@ function proposedApiFunction(extension: IExtensionDescription, fn: T): T { } } -function proposed(extension: IExtensionDescription): Function { - return (target: any, key: string, descriptor: any) => { - let fnKey: string = null; - let fn: Function = null; - - if (typeof descriptor.value === 'function') { - fnKey = 'value'; - fn = descriptor.value; - } else if (typeof descriptor.get === 'function') { - fnKey = 'get'; - fn = descriptor.get; - } - - if (!fn) { - throw new Error('not supported'); - } - - if (extension.enableProposedApi) { - return; - } - - descriptor[fnKey] = () => { - throw new Error(`${extension.id} cannot access proposed api`); - }; - }; -} - /** * This method instantiates and returns the extension API surface */ @@ -153,12 +126,11 @@ export function createApiFactory( } } - class Commands { - + // namespace: commands + const commands: typeof vscode.commands = { registerCommand(id: string, command: (...args: any[]) => T | Thenable, thisArgs?: any): vscode.Disposable { return extHostCommands.registerCommand(id, command, thisArgs); - } - + }, registerTextEditorCommand(id: string, callback: (textEditor: vscode.TextEditor, edit: vscode.TextEditorEdit, ...args: any[]) => void, thisArg?: any): vscode.Disposable { return extHostCommands.registerCommand(id, (...args: any[]) => { let activeTextEditor = extHostEditors.getActiveTextEditor(); @@ -179,10 +151,8 @@ export function createApiFactory( console.warn('An error occured while running command ' + id, err); }); }); - } - - @proposed(extension) - registerDiffInformationCommand(id: string, callback: (diff: vscode.LineChange[], ...args: any[]) => any, thisArg?: any): vscode.Disposable { + }, + registerDiffInformationCommand: proposedApiFunction(extension, (id: string, callback: (diff: vscode.LineChange[], ...args: any[]) => any, thisArg?: any): vscode.Disposable => { return extHostCommands.registerCommand(id, async (...args: any[]) => { let activeTextEditor = extHostEditors.getActiveTextEditor(); if (!activeTextEditor) { @@ -193,19 +163,14 @@ export function createApiFactory( const diff = await extHostEditors.getDiffInformation(activeTextEditor.id); callback.apply(thisArg, [diff, ...args]); }); - } - + }), executeCommand(id: string, ...args: any[]): Thenable { return extHostCommands.executeCommand(id, ...args); - } - + }, getCommands(filterInternal: boolean = false): Thenable { return extHostCommands.getCommands(filterInternal); } - } - - // namespace: commands - const commands: typeof vscode.commands = new Commands(); + }; // namespace: env const env: typeof vscode.env = Object.freeze({ From 7f54c775f3199f42ff5f4db51f0b65e9d1072fb4 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 12 Jun 2017 12:59:38 +0200 Subject: [PATCH 1718/2747] debt: Replace custom Map object with Native Map --- src/vs/base/common/map.ts | 116 ++---------------- src/vs/base/test/common/map.test.ts | 63 +--------- .../test/common/instantiationServiceMock.ts | 5 +- .../browser/parts/editor/tabsTitleControl.ts | 13 +- .../node/extensionsWorkbenchService.ts | 1 - .../parts/markers/common/markersModel.ts | 38 +++--- .../browser/preferencesRenderers.ts | 3 +- .../preferences/browser/preferencesService.ts | 6 +- .../parts/preferences/common/preferences.ts | 1 - .../preferences/common/preferencesModels.ts | 1 - .../parts/search/common/searchModel.ts | 20 +-- 11 files changed, 54 insertions(+), 213 deletions(-) diff --git a/src/vs/base/common/map.ts b/src/vs/base/common/map.ts index 48357176b8a81..9e7d7dc8d7362 100644 --- a/src/vs/base/common/map.ts +++ b/src/vs/base/common/map.ts @@ -16,108 +16,19 @@ export interface Entry { value: T; } -/** - * A simple map to store value by a key object. Key can be any object that has toString() function to get - * string value of the key. - */ -export class SimpleMap { - - protected map: { [key: string]: Entry }; - protected _size: number; - - constructor() { - this.map = Object.create(null); - this._size = 0; - } - - public get size(): number { - return this._size; - } - - public get(k: K): T { - const value = this.peek(k); - - return value ? value : null; - } - - public getOrSet(k: K, t: T): T { - const res = this.get(k); - if (res) { - return res; - } - - this.set(k, t); - - return t; - } - - public keys(): K[] { - const keys: K[] = []; - for (let key in this.map) { - keys.push(this.map[key].key); - } - return keys; - } - - public values(): T[] { - const values: T[] = []; - for (let key in this.map) { - values.push(this.map[key].value); - } - return values; - } - - public entries(): Entry[] { - const entries: Entry[] = []; - for (let key in this.map) { - entries.push(this.map[key]); - } - return entries; - } - - public set(k: K, t: T): boolean { - if (this.get(k)) { - return false; // already present! - } - - this.push(k, t); - - return true; - } - - public delete(k: K): T { - let value: T = this.get(k); - if (value) { - this.pop(k); - return value; - } - return null; - } - - public has(k: K): boolean { - return !!this.get(k); - } - - public clear(): void { - this.map = Object.create(null); - this._size = 0; - } - - protected push(key: K, value: T): void { - const entry: Entry = { key, value }; - this.map[key.toString()] = entry; - this._size++; - } - - protected pop(k: K): void { - delete this.map[k.toString()]; - this._size--; - } +export function values(map: Map): V[] { + const result: V[] = []; + map.forEach(value => result.push(value)); + return result; +} - protected peek(k: K): T { - const entry = this.map[k.toString()]; - return entry ? entry.value : null; +export function getOrSet(map: Map, key: K, value: V): V { + let result = map.get(key); + if (result === void 0) { + result = value; + map.set(key, result); } + return result; } export interface ISerializedBoundedLinkedMap { @@ -455,10 +366,7 @@ export class ResourceMap { } public values(): T[] { - const values: T[] = []; - this.map.forEach(value => values.push(value)); - - return values; + return values(this.map); } private toKey(resource: URI): string { diff --git a/src/vs/base/test/common/map.test.ts b/src/vs/base/test/common/map.test.ts index 38998ac5fb8b4..58c8413ba8406 100644 --- a/src/vs/base/test/common/map.test.ts +++ b/src/vs/base/test/common/map.test.ts @@ -5,73 +5,12 @@ 'use strict'; -import { BoundedMap, SimpleMap, TrieMap, ResourceMap } from 'vs/base/common/map'; +import { BoundedMap, TrieMap, ResourceMap } from 'vs/base/common/map'; import * as assert from 'assert'; import URI from 'vs/base/common/uri'; suite('Map', () => { - test('SimpleMap - basics', function () { - const map = new SimpleMap(); - - assert.equal(map.size, 0); - - map.set('1', 1); - map.set('2', '2'); - map.set('3', true); - - const obj = Object.create(null); - map.set('4', obj); - - const date = Date.now(); - map.set('5', date); - - assert.equal(map.size, 5); - assert.equal(map.get('1'), 1); - assert.equal(map.get('2'), '2'); - assert.equal(map.get('3'), true); - assert.equal(map.get('4'), obj); - assert.equal(map.get('5'), date); - assert.ok(!map.get('6')); - - map.delete('6'); - assert.equal(map.size, 5); - assert.equal(map.delete('1'), 1); - assert.equal(map.delete('2'), '2'); - assert.equal(map.delete('3'), true); - assert.equal(map.delete('4'), obj); - assert.equal(map.delete('5'), date); - - assert.equal(map.size, 0); - assert.ok(!map.get('5')); - assert.ok(!map.get('4')); - assert.ok(!map.get('3')); - assert.ok(!map.get('2')); - assert.ok(!map.get('1')); - - map.set('1', 1); - map.set('2', '2'); - assert.ok(map.set('3', true)); // adding an element returns true - assert.ok(!map.set('3', true)); // adding it again returns false - - assert.ok(map.has('1')); - assert.equal(map.get('1'), 1); - assert.equal(map.get('2'), '2'); - assert.equal(map.get('3'), true); - - map.clear(); - - assert.equal(map.size, 0); - assert.ok(!map.get('1')); - assert.ok(!map.get('2')); - assert.ok(!map.get('3')); - assert.ok(!map.has('1')); - - const res = map.getOrSet('foo', 'bar'); - assert.equal(map.get('foo'), res); - assert.equal(res, 'bar'); - }); - test('BoundedMap - basics', function () { const map = new BoundedMap(); diff --git a/src/vs/platform/instantiation/test/common/instantiationServiceMock.ts b/src/vs/platform/instantiation/test/common/instantiationServiceMock.ts index 717d46e30a1e9..68c03f70da497 100644 --- a/src/vs/platform/instantiation/test/common/instantiationServiceMock.ts +++ b/src/vs/platform/instantiation/test/common/instantiationServiceMock.ts @@ -8,7 +8,6 @@ import * as sinon from 'sinon'; import { TPromise } from 'vs/base/common/winjs.base'; import * as types from 'vs/base/common/types'; -import { SimpleMap } from 'vs/base/common/map'; import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; @@ -20,12 +19,12 @@ interface IServiceMock { export class TestInstantiationService extends InstantiationService { - private _servciesMap: SimpleMap, any>; + private _servciesMap: Map, any>; constructor(private _serviceCollection: ServiceCollection = new ServiceCollection()) { super(_serviceCollection); - this._servciesMap = new SimpleMap, any>(); + this._servciesMap = new Map, any>(); } public get(service: ServiceIdentifier): T { diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index c9a96445ccf63..1793a9c4a17e2 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -36,7 +36,7 @@ import { IDisposable, dispose, combinedDisposable } from 'vs/base/common/lifecyc import { ScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import { extractResources } from 'vs/base/browser/dnd'; -import { SimpleMap } from 'vs/base/common/map'; +import { getOrSet } from 'vs/base/common/map'; import { DelegatingWorkbenchEditorService } from 'vs/workbench/services/editor/browser/editorService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { IThemeService, registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService'; @@ -320,8 +320,8 @@ export class TabsTitleControl extends TitleControl { private getUniqueTabLabels(editors: IEditorInput[]): IEditorInputLabel[] { const labels: IEditorInputLabel[] = []; - const mapLabelToDuplicates = new SimpleMap(); - const mapLabelAndDescriptionToDuplicates = new SimpleMap(); + const mapLabelToDuplicates = new Map(); + const mapLabelAndDescriptionToDuplicates = new Map(); // Build labels and descriptions for each editor editors.forEach(editor => { @@ -334,16 +334,15 @@ export class TabsTitleControl extends TitleControl { }; labels.push(item); - mapLabelToDuplicates.getOrSet(item.name, []).push(item); + getOrSet(mapLabelToDuplicates, item.name, []).push(item); if (typeof description === 'string') { - mapLabelAndDescriptionToDuplicates.getOrSet(`${item.name}${item.description}`, []).push(item); + getOrSet(mapLabelAndDescriptionToDuplicates, `${item.name}${item.description}`, []).push(item); } }); // Mark duplicates and shorten their descriptions - const labelDuplicates = mapLabelToDuplicates.values(); - labelDuplicates.forEach(duplicates => { + mapLabelToDuplicates.forEach(duplicates => { if (duplicates.length > 1) { duplicates = duplicates.filter(d => { // we could have items with equal label and description. in that case it does not make much diff --git a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts index 395829a94f083..26ce06d363423 100644 --- a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts +++ b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts @@ -11,7 +11,6 @@ import * as semver from 'semver'; import * as path from 'path'; import Event, { Emitter, chain } from 'vs/base/common/event'; import { index } from 'vs/base/common/arrays'; -import { SimpleMap as Map } from 'vs/base/common/map'; import { assign } from 'vs/base/common/objects'; import { ThrottledDelayer } from 'vs/base/common/async'; import { isPromiseCanceledError } from 'vs/base/common/errors'; diff --git a/src/vs/workbench/parts/markers/common/markersModel.ts b/src/vs/workbench/parts/markers/common/markersModel.ts index f91644a094344..be69523c4d220 100644 --- a/src/vs/workbench/parts/markers/common/markersModel.ts +++ b/src/vs/workbench/parts/markers/common/markersModel.ts @@ -6,7 +6,6 @@ import * as paths from 'vs/base/common/paths'; import * as types from 'vs/base/common/types'; -import * as Map from 'vs/base/common/map'; import Severity from 'vs/base/common/severity'; import URI from 'vs/base/common/uri'; import { Range, IRange } from 'vs/editor/common/core/range'; @@ -125,14 +124,14 @@ export class FilterOptions { export class MarkersModel { - private markersByResource: Map.SimpleMap; + private markersByResource: Map; private _filteredResources: Resource[]; private _nonFilteredResources: Resource[]; private _filterOptions: FilterOptions; constructor(markers: IMarker[] = []) { - this.markersByResource = new Map.SimpleMap(); + this.markersByResource = new Map(); this._filterOptions = new FilterOptions(); this.update(markers); } @@ -154,7 +153,7 @@ export class MarkersModel { } public hasResource(resource: URI): boolean { - return this.markersByResource.has(resource); + return this.markersByResource.has(resource.toString()); } public get nonFilteredResources(): Resource[] { @@ -198,48 +197,47 @@ export class MarkersModel { private refreshResources(): void { this._nonFilteredResources = []; this._filteredResources = []; - for (const entry of this.markersByResource.entries()) { - const filteredResource = this.toFilteredResource(entry); + this.markersByResource.forEach((values, uri) => { + const filteredResource = this.toFilteredResource(URI.parse(uri), values); if (filteredResource.markers.length) { this._filteredResources.push(filteredResource); } else { this._nonFilteredResources.push(filteredResource); } - } + }); } private updateResource(resourceUri: URI, markers: IMarker[]) { - if (this.markersByResource.has(resourceUri)) { - this.markersByResource.delete(resourceUri); + if (this.markersByResource.has(resourceUri.toString())) { + this.markersByResource.delete(resourceUri.toString()); } if (markers.length > 0) { - this.markersByResource.set(resourceUri, markers); + this.markersByResource.set(resourceUri.toString(), markers); } } private updateMarkers(markers: IMarker[]) { markers.forEach((marker: IMarker) => { let uri: URI = marker.resource; - let markers: IMarker[] = this.markersByResource.get(uri); + let markers: IMarker[] = this.markersByResource.get(uri.toString()); if (!markers) { markers = []; - this.markersByResource.set(uri, markers); + this.markersByResource.set(uri.toString(), markers); } markers.push(marker); }); } - private toFilteredResource(entry: Map.Entry) { + private toFilteredResource(uri: URI, values: IMarker[]) { let markers: Marker[] = []; - for (let i = 0; i < entry.value.length; i++) { - const m = entry.value[i]; - const uri = entry.key.toString(); - if (entry.key.scheme !== Schemas.walkThrough && entry.key.scheme !== Schemas.walkThroughSnippet && (!this._filterOptions.hasFilters() || this.filterMarker(m))) { - markers.push(this.toMarker(m, i, uri)); + for (let i = 0; i < values.length; i++) { + const m = values[i]; + if (uri.scheme !== Schemas.walkThrough && uri.scheme !== Schemas.walkThroughSnippet && (!this._filterOptions.hasFilters() || this.filterMarker(m))) { + markers.push(this.toMarker(m, i, uri.toString())); } } - const matches = this._filterOptions.hasFilters() ? FilterOptions._filter(this._filterOptions.filter, paths.basename(entry.key.fsPath)) : []; - return new Resource(entry.key, markers, this.getStatistics(entry.value), matches || []); + const matches = this._filterOptions.hasFilters() ? FilterOptions._filter(this._filterOptions.filter, paths.basename(uri.fsPath)) : []; + return new Resource(uri, markers, this.getStatistics(values), matches || []); } private toMarker(marker: IMarker, index: number, uri: string): Marker { diff --git a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts index 81941633f5dc7..c5b7c37de3df5 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesRenderers.ts @@ -8,6 +8,7 @@ import * as nls from 'vs/nls'; import { Delayer } from 'vs/base/common/async'; import { Disposable, IDisposable, dispose } from 'vs/base/common/lifecycle'; import { flatten, distinct } from 'vs/base/common/arrays'; +import { values } from 'vs/base/common/map'; import { ArrayNavigator, INavigator } from 'vs/base/common/iterator'; import { IAction } from 'vs/base/common/actions'; import { IJSONSchema } from 'vs/base/common/jsonSchema'; @@ -465,7 +466,7 @@ export class FilteredMatchesRenderer extends Disposable implements HiddenAreasPr if (result) { this.hiddenAreas = this.computeHiddenRanges(result.filteredGroups, result.allGroups, model); this.editor.changeDecorations(changeAccessor => { - this.decorationIds = changeAccessor.deltaDecorations(this.decorationIds, flatten(result.matches.values()).map(match => this.createDecoration(match, model))); + this.decorationIds = changeAccessor.deltaDecorations(this.decorationIds, flatten(values(result.matches)).map(match => this.createDecoration(match, model))); }); } } diff --git a/src/vs/workbench/parts/preferences/browser/preferencesService.ts b/src/vs/workbench/parts/preferences/browser/preferencesService.ts index fa9247c670e47..7c7461d4a698d 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesService.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesService.ts @@ -8,7 +8,7 @@ import * as network from 'vs/base/common/network'; import { TPromise } from 'vs/base/common/winjs.base'; import * as nls from 'vs/nls'; import URI from 'vs/base/common/uri'; -import { SimpleMap as Map } from 'vs/base/common/map'; +import { ResourceMap } from 'vs/base/common/map'; import * as labels from 'vs/base/common/labels'; import * as strings from 'vs/base/common/strings'; import { Disposable } from 'vs/base/common/lifecycle'; @@ -52,7 +52,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic _serviceBrand: any; // TODO:@sandy merge these models into editor inputs by extending resource editor model - private defaultPreferencesEditorModels: Map>>; + private defaultPreferencesEditorModels: ResourceMap>>; private lastOpenedSettingsInput: PreferencesEditorInput = null; constructor( @@ -74,7 +74,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic @IModelService private modelService: IModelService ) { super(); - this.defaultPreferencesEditorModels = new Map>>(); + this.defaultPreferencesEditorModels = new ResourceMap>>(); this.editorGroupService.onEditorsChanged(() => { const activeEditorInput = this.editorService.getActiveEditorInput(); if (activeEditorInput instanceof PreferencesEditorInput) { diff --git a/src/vs/workbench/parts/preferences/common/preferences.ts b/src/vs/workbench/parts/preferences/common/preferences.ts index 11206bc23a87e..44b0ee1fcd98f 100644 --- a/src/vs/workbench/parts/preferences/common/preferences.ts +++ b/src/vs/workbench/parts/preferences/common/preferences.ts @@ -5,7 +5,6 @@ import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; -import { SimpleMap as Map } from 'vs/base/common/map'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { RawContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IEditor } from 'vs/platform/editor/common/editor'; diff --git a/src/vs/workbench/parts/preferences/common/preferencesModels.ts b/src/vs/workbench/parts/preferences/common/preferencesModels.ts index c35903695e273..280187fab46d1 100644 --- a/src/vs/workbench/parts/preferences/common/preferencesModels.ts +++ b/src/vs/workbench/parts/preferences/common/preferencesModels.ts @@ -6,7 +6,6 @@ import * as nls from 'vs/nls'; import * as strings from 'vs/base/common/strings'; import { assign } from 'vs/base/common/objects'; -import { SimpleMap as Map } from 'vs/base/common/map'; import { distinct } from 'vs/base/common/arrays'; import URI from 'vs/base/common/uri'; import { IReference } from 'vs/base/common/lifecycle'; diff --git a/src/vs/workbench/parts/search/common/searchModel.ts b/src/vs/workbench/parts/search/common/searchModel.ts index 2a9c614592802..48ed4a14de60a 100644 --- a/src/vs/workbench/parts/search/common/searchModel.ts +++ b/src/vs/workbench/parts/search/common/searchModel.ts @@ -11,7 +11,7 @@ import { RunOnceScheduler } from 'vs/base/common/async'; import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; import { TPromise, PPromise } from 'vs/base/common/winjs.base'; import URI from 'vs/base/common/uri'; -import { SimpleMap } from 'vs/base/common/map'; +import { values, ResourceMap } from 'vs/base/common/map'; import Event, { Emitter, fromPromise, stopwatch, any } from 'vs/base/common/event'; import { ISearchService, ISearchProgressItem, ISearchComplete, ISearchQuery, IPatternInfo, IFileMatch } from 'vs/platform/search/common/search'; import { ReplacePattern } from 'vs/platform/search/common/replace'; @@ -125,7 +125,7 @@ export class FileMatch extends Disposable { private _resource: URI; private _model: IModel; private _modelListener: IDisposable; - private _matches: SimpleMap; + private _matches: Map; private _removedMatches: Set; private _selectedMatch: Match; @@ -136,7 +136,7 @@ export class FileMatch extends Disposable { @IModelService private modelService: IModelService, @IReplaceService private replaceService: IReplaceService) { super(); this._resource = this.rawMatch.resource; - this._matches = new SimpleMap(); + this._matches = new Map(); this._removedMatches = new Set(); this._updateScheduler = new RunOnceScheduler(this.updateMatchesForModel.bind(this), 250); @@ -197,7 +197,7 @@ export class FileMatch extends Disposable { if (!this._model) { return; } - this._matches = new SimpleMap(); + this._matches = new Map(); let matches = this._model .findMatches(this._query.pattern, this._model.getFullModelRange(), this._query.isRegExp, this._query.isCaseSensitive, this._query.isWordMatch ? this._query.wordSeparators : null, false, this._maxResults); @@ -211,7 +211,7 @@ export class FileMatch extends Disposable { endLineNumber: lineNumber, endColumn: this._model.getLineMaxColumn(lineNumber) }; - const oldMatches = this._matches.values().filter(match => match.range().startLineNumber === lineNumber); + const oldMatches = values(this._matches).filter(match => match.range().startLineNumber === lineNumber); oldMatches.forEach(match => this._matches.delete(match.id())); const matches = this._model.findMatches(this._query.pattern, range, this._query.isRegExp, this._query.isCaseSensitive, this._query.isWordMatch ? this._query.wordSeparators : null, false, this._maxResults); @@ -257,7 +257,7 @@ export class FileMatch extends Disposable { } public matches(): Match[] { - return this._matches.values(); + return values(this._matches); } public remove(match: Match): void { @@ -339,8 +339,8 @@ export class SearchResult extends Disposable { private _onChange = this._register(new Emitter()); public onChange: Event = this._onChange.event; - private _fileMatches: SimpleMap; - private _unDisposedFileMatches: SimpleMap; + private _fileMatches: ResourceMap; + private _unDisposedFileMatches: ResourceMap; private _query: IPatternInfo = null; private _maxResults: number; private _showHighlights: boolean; @@ -351,8 +351,8 @@ export class SearchResult extends Disposable { constructor(private _searchModel: SearchModel, @IReplaceService private replaceService: IReplaceService, @ITelemetryService private telemetryService: ITelemetryService, @IInstantiationService private instantiationService: IInstantiationService) { super(); - this._fileMatches = new SimpleMap(); - this._unDisposedFileMatches = new SimpleMap(); + this._fileMatches = new ResourceMap(); + this._unDisposedFileMatches = new ResourceMap(); this._rangeHighlightDecorations = this.instantiationService.createInstance(RangeHighlightDecorations); } From e26bdefbde037ab69857922398f80995bd933d12 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 12 Jun 2017 13:05:17 +0200 Subject: [PATCH 1719/2747] Fix #28129 --- .../workbench/parts/preferences/browser/preferencesService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/preferences/browser/preferencesService.ts b/src/vs/workbench/parts/preferences/browser/preferencesService.ts index 7c7461d4a698d..3cd438f300f03 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesService.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesService.ts @@ -229,7 +229,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic const resource = this.getEditableSettingsURI(configurationTarget); const editableSettingsEmptyContent = this.getEmptyEditableSettingsContent(configurationTarget); return this.createIfNotExists(resource, editableSettingsEmptyContent) - .then(() => this.editorService.createInput({ resource })); + .then(() => this.editorService.createInput({ resource })); } private createEditableSettingsEditorModel(configurationTarget: ConfigurationTarget): TPromise { From 2de8e6550d9f82785af63f57cb0a9f8222b17015 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 12 Jun 2017 13:06:20 +0200 Subject: [PATCH 1720/2747] fix npe in config service --- .../services/configuration/node/configurationService.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/workbench/services/configuration/node/configurationService.ts b/src/vs/workbench/services/configuration/node/configurationService.ts index 9ea368f587bc5..7001b1bb00df3 100644 --- a/src/vs/workbench/services/configuration/node/configurationService.ts +++ b/src/vs/workbench/services/configuration/node/configurationService.ts @@ -246,6 +246,10 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } public handleWorkspaceFileEvents(event: FileChangesEvent): void { + if (!this.workspace) { + return; // only enabled when we have a known workspace + } + const events = event.changes; let affectedByChanges = false; @@ -303,6 +307,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp return new ScopedConfigModel(content.value, content.resource.toString(), matches[1]); } } + return new ConfigModel(null); } From 9d81318248189c1f034868af0147ef9fd9e053c2 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 12 Jun 2017 13:16:22 +0200 Subject: [PATCH 1721/2747] #27458 Move fileResultsNavigation to files namespace --- .../{ => parts/files}/browser/fileResultsNavigation.ts | 0 src/vs/workbench/parts/markers/browser/markersPanel.ts | 2 +- src/vs/workbench/parts/search/browser/searchViewlet.ts | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename src/vs/workbench/{ => parts/files}/browser/fileResultsNavigation.ts (100%) diff --git a/src/vs/workbench/browser/fileResultsNavigation.ts b/src/vs/workbench/parts/files/browser/fileResultsNavigation.ts similarity index 100% rename from src/vs/workbench/browser/fileResultsNavigation.ts rename to src/vs/workbench/parts/files/browser/fileResultsNavigation.ts diff --git a/src/vs/workbench/parts/markers/browser/markersPanel.ts b/src/vs/workbench/parts/markers/browser/markersPanel.ts index 3916e12564046..53c9bfdff055d 100644 --- a/src/vs/workbench/parts/markers/browser/markersPanel.ts +++ b/src/vs/workbench/parts/markers/browser/markersPanel.ts @@ -36,7 +36,7 @@ import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/c import { IListService } from 'vs/platform/list/browser/listService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { ICommonCodeEditor } from 'vs/editor/common/editorCommon'; -import FileResultsNavigation from 'vs/workbench/browser/fileResultsNavigation'; +import FileResultsNavigation from 'vs/workbench/parts/files/browser/fileResultsNavigation'; import { debounceEvent } from 'vs/base/common/event'; import { attachListStyler } from 'vs/platform/theme/common/styler'; diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index 94d852b0b3ae9..f42a3d96708f2 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -56,7 +56,7 @@ import * as Constants from 'vs/workbench/parts/search/common/constants'; import { IListService } from 'vs/platform/list/browser/listService'; import { IThemeService, ITheme, ICssStyleCollector, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorFindMatchHighlight, diffInserted, diffRemoved, diffInsertedOutline, diffRemovedOutline, activeContrastBorder } from 'vs/platform/theme/common/colorRegistry'; -import FileResultsNavigation from 'vs/workbench/browser/fileResultsNavigation'; +import FileResultsNavigation from 'vs/workbench/parts/files/browser/fileResultsNavigation'; import { attachListStyler } from 'vs/platform/theme/common/styler'; import { IOutputService } from 'vs/workbench/parts/output/common/output'; import { Color } from 'vs/base/common/color'; From 2c85446dc85f8eaf96e101a78abd062a4094d7cd Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 12 Jun 2017 14:38:15 +0200 Subject: [PATCH 1722/2747] Fixes #28308: Use role="dialog" combined with role="document" in Alt+F1 widget --- .../electron-browser/accessibility.ts | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts b/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts index 1147eef15c2da..d586fa34b3836 100644 --- a/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts +++ b/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.ts @@ -78,6 +78,7 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { private _editor: ICodeEditor; private _domNode: FastDomNode; + private _contentDomNode: FastDomNode; private _isVisible: boolean; private _isVisibleKey: IContextKey; @@ -99,8 +100,13 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { this._domNode.setWidth(AccessibilityHelpWidget.WIDTH); this._domNode.setHeight(AccessibilityHelpWidget.HEIGHT); this._domNode.setDisplay('none'); - this._domNode.setAttribute('role', 'tooltip'); + this._domNode.setAttribute('role', 'dialog'); this._domNode.setAttribute('aria-hidden', 'true'); + + this._contentDomNode = createFastDomNode(document.createElement('div')); + this._contentDomNode.setAttribute('role', 'document'); + this._domNode.appendChild(this._contentDomNode); + this._isVisible = false; this._register(this._editor.onDidLayoutChange(() => { @@ -110,7 +116,7 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { })); // Intentionally not configurable! - this._register(dom.addStandardDisposableListener(this._domNode.domNode, 'keydown', (e) => { + this._register(dom.addStandardDisposableListener(this._contentDomNode.domNode, 'keydown', (e) => { if (!this._isVisible) { return; } @@ -137,7 +143,7 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { } })); - this.onblur(this._domNode.domNode, () => { + this.onblur(this._contentDomNode.domNode, () => { this.hide(); }); @@ -172,9 +178,9 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { this._layout(); this._domNode.setDisplay('block'); this._domNode.setAttribute('aria-hidden', 'false'); - this._domNode.domNode.tabIndex = 0; + this._contentDomNode.domNode.tabIndex = 0; this._buildContent(); - this._domNode.domNode.focus(); + this._contentDomNode.domNode.focus(); } private _descriptionForCommand(commandId: string, msg: string, noKbMsg: string): string { @@ -246,7 +252,7 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { text += '\n\n' + nls.localize('outroMsg', "You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."); - this._domNode.domNode.appendChild(renderHtml({ + this._contentDomNode.domNode.appendChild(renderHtml({ formattedText: text })); } @@ -259,8 +265,8 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget { this._isVisibleKey.reset(); this._domNode.setDisplay('none'); this._domNode.setAttribute('aria-hidden', 'true'); - this._domNode.domNode.tabIndex = -1; - dom.clearNode(this._domNode.domNode); + this._contentDomNode.domNode.tabIndex = -1; + dom.clearNode(this._contentDomNode.domNode); this._editor.focus(); } From 5af0b38b91a969b6ffe401de645387c3ccd96a6f Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Mon, 12 Jun 2017 15:01:13 +0200 Subject: [PATCH 1723/2747] Fixes #27740: Tasks: Unclear property descriptions in tasks.json --- src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts index 1e2aadffdb316..554f6a9bc3958 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts @@ -48,7 +48,7 @@ const terminal: IJSONSchema = { default: { reveal: 'always' }, - description: nls.localize('JsonSchema.tasks.terminal', 'Describe how the terminal used to execute a task behaves.'), + description: nls.localize('JsonSchema.tasks.terminal', 'Configures the terminal that is used to execute the task.'), properties: { echo: { type: 'boolean', From def13c6d788648100648830b4864b31264e41669 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 12 Jun 2017 15:29:31 +0200 Subject: [PATCH 1724/2747] better workspace format --- src/vs/platform/workspace/common/workspace.ts | 22 ++++++------- .../electron-browser/main.contribution.ts | 32 +++++++++---------- 2 files changed, 25 insertions(+), 29 deletions(-) diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index 8e0747fa8de92..848ecb6b3220c 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -122,7 +122,7 @@ export class Workspace implements IWorkspace { } } -type IWorkspaceConfiguration = { path: string; folders: string[]; }[]; +type IWorkspaceConfiguration = { [rootFolder: string]: { folders: string[]; } }; export class WorkspaceContextService implements IWorkspaceContextService { @@ -161,18 +161,14 @@ export class WorkspaceContextService implements IWorkspaceContextService { // Resovled configured folders for workspace let configuredFolders: URI[] = [this.workspace.resource]; const config = this.configurationService.getConfiguration('workspace'); - if (Array.isArray(config)) { - for (let i = 0; i < config.length; i++) { - const targetWorkspace = config[i]; - if (targetWorkspace.path === this.workspace.resource.toString()) { - const additionalFolders = targetWorkspace.folders - .map(f => URI.parse(f)) - .filter(r => r.scheme === Schemas.file); // only support files for now - - configuredFolders.push(...additionalFolders); - - break; - } + if (config) { + const workspaceConfig = config[this.workspace.resource.toString()]; + if (workspaceConfig) { + const additionalFolders = workspaceConfig.folders + .map(f => URI.parse(f)) + .filter(r => r.scheme === Schemas.file); // only support files for now + + configuredFolders.push(...additionalFolders); } } diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts index 2cbc72f32ecee..380b33dc7e8ab 100644 --- a/src/vs/workbench/electron-browser/main.contribution.ts +++ b/src/vs/workbench/electron-browser/main.contribution.ts @@ -360,29 +360,29 @@ configurationRegistry.registerConfiguration({ }); // Configuration: Workspace -configurationRegistry.registerConfiguration({ +configurationRegistry.registerConfiguration({ 'id': 'workspace', 'order': 10000, 'title': nls.localize('workspaceConfigurationTitle', "Workspace"), 'type': 'object', 'properties': { 'workspace': { - 'type': 'array', - 'title': nls.localize('workspaces.title', "Folder configuration of the workspace"), - 'items': { - 'required': ['path'], - 'type': 'object', - 'defaultSnippets': [{ 'body': { 'path': '$1', 'folders': ['$2'] } }], - 'properties': { - 'path': { - 'type': 'string', - 'description': nls.localize('workspaces.path', "Path of the folder to configure folders for"), - }, - 'folders': { - 'description': nls.localize('workspaces.additionalFolders', "Folders of this workspace"), - 'type': 'array' + 'type': 'object', + 'description': nls.localize('workspaces.title', "Folder configuration of the workspace"), + 'additionalProperties': { + 'anyOf': [{ + 'type': 'object', + 'description': nls.localize('files.exclude.boolean', "The glob pattern to match file paths against. Set to true or false to enable or disable the pattern."), + 'properties': { + 'folders': { + 'description': nls.localize('workspaces.additionalFolders', "Folders of this workspace"), + 'type': 'array', + 'items': { + 'type': 'string' + } + } } - } + }] } } } From 7c1c21c15870d56b1bbc8dcccda9cb2f56f428df Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 12 Jun 2017 15:39:39 +0200 Subject: [PATCH 1725/2747] start with a step back and use IWorkspace where needed, nuke workspace context service from ext host, #28526 --- src/vs/workbench/api/node/extHost.api.impl.ts | 4 +-- src/vs/workbench/api/node/extHost.protocol.ts | 4 +-- .../api/node/extHostExtensionService.ts | 25 ++++++++----------- .../electron-browser/extensionHost.ts | 4 +-- src/vs/workbench/node/extensionHostMain.ts | 24 ++++++------------ 5 files changed, 21 insertions(+), 40 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index b9b4746182f71..810e4cf1f8231 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -41,7 +41,6 @@ import EditorCommon = require('vs/editor/common/editorCommon'); import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; import { ExtHostExtensionService } from 'vs/workbench/api/node/extHostExtensionService'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { CancellationTokenSource } from 'vs/base/common/cancellation'; import * as vscode from 'vscode'; @@ -72,7 +71,6 @@ export function createApiFactory( initData: IInitData, threadService: IThreadService, extensionService: ExtHostExtensionService, - contextService: IWorkspaceContextService, telemetryService: ITelemetryService ): IExtensionApiFactory { @@ -101,7 +99,7 @@ export function createApiFactory( const extHostStatusBar = new ExtHostStatusBar(threadService); const extHostProgress = new ExtHostProgress(threadService.get(MainContext.MainThreadProgress)); const extHostOutputService = new ExtHostOutputService(threadService); - const workspacePath = contextService.hasWorkspace() ? contextService.getWorkspace().resource.fsPath : undefined; + const workspacePath = initData.workspace ? initData.workspace.resource.fsPath : undefined; const extHostWorkspace = new ExtHostWorkspace(threadService, workspacePath); const extHostLanguages = new ExtHostLanguages(threadService); diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 6d92223c932b3..e68efd0e51372 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -60,9 +60,7 @@ export interface IEnvironment { export interface IInitData { parentPid: number; environment: IEnvironment; - contextService: { - workspace: IWorkspace; - }; + workspace: IWorkspace; extensions: IExtensionDescription[]; configuration: IWorkspaceConfigurationValues; telemetryInfo: ITelemetryInfo; diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index ae75796c7e288..aeb68c62edad1 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -15,7 +15,7 @@ import { ExtHostStorage } from 'vs/workbench/api/node/extHostStorage'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { createApiFactory, initializeExtensionApi } from 'vs/workbench/api/node/extHost.api.impl'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IWorkspace } from 'vs/platform/workspace/common/workspace'; import { MainContext, MainProcessExtensionServiceShape, IEnvironment, IInitData } from './extHost.protocol'; import { createHash } from 'crypto'; @@ -103,14 +103,14 @@ class ExtensionMemento implements IExtensionMemento { class ExtensionStoragePath { - private readonly _contextService: IWorkspaceContextService; + private readonly _workspace: IWorkspace; private readonly _environment: IEnvironment; private readonly _ready: TPromise; private _value: string; - constructor(contextService: IWorkspaceContextService, environment: IEnvironment) { - this._contextService = contextService; + constructor(workspace: IWorkspace, environment: IEnvironment) { + this._workspace = workspace; this._environment = environment; this._ready = this._getOrCreateWorkspaceStoragePath().then(value => this._value = value); } @@ -127,16 +127,13 @@ class ExtensionStoragePath { } private _getOrCreateWorkspaceStoragePath(): TPromise { - - const workspace = this._contextService.getWorkspace(); - - if (!workspace) { + if (!this._workspace) { return TPromise.as(undefined); } const storageName = createHash('md5') - .update(workspace.resource.fsPath) - .update(workspace.uid ? workspace.uid.toString() : '') + .update(this._workspace.resource.fsPath) + .update(this._workspace.uid ? this._workspace.uid.toString() : '') .digest('hex'); const storagePath = join(this._environment.appSettingsHome, 'workspaceStorage', storageName); @@ -171,23 +168,21 @@ export class ExtHostExtensionService extends AbstractExtensionService this._triggerOnReady()); } diff --git a/src/vs/workbench/electron-browser/extensionHost.ts b/src/vs/workbench/electron-browser/extensionHost.ts index 2431281d98e96..6b99c054bb769 100644 --- a/src/vs/workbench/electron-browser/extensionHost.ts +++ b/src/vs/workbench/electron-browser/extensionHost.ts @@ -259,9 +259,7 @@ export class ExtensionHostProcessWorker { enableProposedApiForAll: !this.environmentService.isBuilt || (!!this.environmentService.extensionDevelopmentPath && product.nameLong.indexOf('Insiders') >= 0), enableProposedApiFor: this.environmentService.args['enable-proposed-api'] || [] }, - contextService: { - workspace: this.contextService.getWorkspace() - }, + workspace: this.contextService.getWorkspace(), extensions: extensionDescriptions, configuration: this.configurationService.values(), telemetryInfo diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index 6d38c79e651b7..7f4aa8b0094d8 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -15,10 +15,9 @@ import { ExtHostThreadService } from 'vs/workbench/services/thread/common/extHos import { QueryType, ISearchQuery } from 'vs/platform/search/common/search'; import { DiskSearch } from 'vs/workbench/services/search/node/searchService'; import { RemoteTelemetryService } from 'vs/workbench/api/node/extHostTelemetry'; -import { IWorkspaceContextService, WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { IInitData, IEnvironment, MainContext } from 'vs/workbench/api/node/extHost.protocol'; import * as errors from 'vs/base/common/errors'; -import { NullConfigurationService } from "vs/workbench/services/configuration/node/nullConfigurationService"; +import { IWorkspace } from "vs/platform/workspace/common/workspace"; const nativeExit = process.exit.bind(process); process.exit = function () { @@ -36,25 +35,19 @@ interface ITestRunner { export class ExtensionHostMain { private _isTerminating: boolean = false; - private _contextService: IWorkspaceContextService; private _diskSearch: DiskSearch; + private _workspace: IWorkspace; private _environment: IEnvironment; private _extensionService: ExtHostExtensionService; constructor(remoteCom: IRemoteCom, initData: IInitData) { - // services this._environment = initData.environment; + this._workspace = initData.workspace; - const workspaceRaw = initData.contextService.workspace; - let workspace: Workspace; - if (workspaceRaw) { - workspace = new Workspace(workspaceRaw.resource, workspaceRaw.uid, workspaceRaw.name); - } - this._contextService = new WorkspaceContextService(new NullConfigurationService(), workspace); //TODO@Ben implement for exthost - + // services const threadService = new ExtHostThreadService(remoteCom); const telemetryService = new RemoteTelemetryService('pluginHostTelemetry', threadService); - this._extensionService = new ExtHostExtensionService(initData, threadService, telemetryService, this._contextService); + this._extensionService = new ExtHostExtensionService(initData, threadService, telemetryService); // Error forwarding const mainThreadErrors = threadService.get(MainContext.MainThreadErrors); @@ -108,12 +101,11 @@ export class ExtensionHostMain { } private handleWorkspaceContainsEagerExtensions(): TPromise { - let workspace = this._contextService.getWorkspace(); - if (!workspace || !workspace.resource) { + if (!this._workspace || !this._workspace.resource) { return TPromise.as(null); } - const folderPath = workspace.resource.fsPath; + const folderPath = this._workspace.resource.fsPath; const desiredFilesMap: { [filename: string]: boolean; @@ -143,7 +135,7 @@ export class ExtensionHostMain { } const query: ISearchQuery = { - folderResources: [workspace.resource], + folderResources: [this._workspace.resource], type: QueryType.File, maxResults: 1, includePattern: { [p]: true } From a65a1ba8c620558e3e1c3c878d914f028c1ba80e Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 12 Jun 2017 15:50:50 +0200 Subject: [PATCH 1726/2747] Fixes Microsoft/monaco-editor#453: trigger gotoLine action contiuously emit errors --- src/vs/base/parts/quickopen/browser/quickOpenWidget.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts index 54953ca6c8e50..3cf4a81e4c54e 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts @@ -99,6 +99,7 @@ export class QuickOpenWidget implements IModelProvider { private static MAX_WIDTH = 600; // Max total width of quick open widget private static MAX_ITEMS_HEIGHT = 20 * 22; // Max height of item list below input field + private isDisposed: boolean; private options: IQuickOpenOptions; private builder: Builder; private tree: ITree; @@ -123,6 +124,7 @@ export class QuickOpenWidget implements IModelProvider { private renderer: Renderer; constructor(container: HTMLElement, callbacks: IQuickOpenCallbacks, options: IQuickOpenOptions, usageLogger?: IQuickOpenUsageLogger) { + this.isDisposed = false; this.toUnbind = []; this.container = container; this.callbacks = callbacks; @@ -944,6 +946,9 @@ export class QuickOpenWidget implements IModelProvider { if (!this.isLoosingFocus) { return; } + if (this.isDisposed) { + return; + } const veto = this.callbacks.onFocusLost && this.callbacks.onFocusLost(); if (!veto) { @@ -953,6 +958,7 @@ export class QuickOpenWidget implements IModelProvider { } public dispose(): void { + this.isDisposed = true; this.toUnbind = dispose(this.toUnbind); this.progressBar.dispose(); From 24fbd1f5d2ee7615c62c6e175929ddf360007176 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 12 Jun 2017 16:05:12 +0200 Subject: [PATCH 1727/2747] add $acceptWorkspaceData to push new info about open folders, #28526 --- .../electron-browser/mainThreadWorkspace.ts | 46 ++++++++++--------- src/vs/workbench/api/node/extHost.api.impl.ts | 3 +- src/vs/workbench/api/node/extHost.protocol.ts | 7 ++- src/vs/workbench/api/node/extHostWorkspace.ts | 18 ++++++-- .../api/extHostWorkspace.test.ts | 5 +- 5 files changed, 49 insertions(+), 30 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts index 707349e5a9379..8cd8b7c62e1a3 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts @@ -13,39 +13,41 @@ import { ITextFileService } from 'vs/workbench/services/textfile/common/textfile import { ICommonCodeEditor, isCommonCodeEditor } from 'vs/editor/common/editorCommon'; import { bulkEdit, IResourceEdit } from 'vs/editor/common/services/bulkEdit'; import { TPromise } from 'vs/base/common/winjs.base'; -import { Uri } from 'vscode'; -import { MainThreadWorkspaceShape } from '../node/extHost.protocol'; +import { MainThreadWorkspaceShape, ExtHostWorkspaceShape, ExtHostContext } from '../node/extHost.protocol'; import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; import { IFileService } from 'vs/platform/files/common/files'; +import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; +import { IDisposable } from 'vs/base/common/lifecycle'; + export class MainThreadWorkspace extends MainThreadWorkspaceShape { - private _activeSearches: { [id: number]: TPromise } = Object.create(null); - private _searchService: ISearchService; - private _contextService: IWorkspaceContextService; - private _textFileService: ITextFileService; - private _editorService: IWorkbenchEditorService; - private _textModelResolverService: ITextModelResolverService; - private _fileService: IFileService; + private readonly _toDispose: IDisposable[] = []; + private readonly _activeSearches: { [id: number]: TPromise } = Object.create(null); + private readonly _proxy: ExtHostWorkspaceShape; constructor( - @ISearchService searchService: ISearchService, - @IWorkspaceContextService contextService: IWorkspaceContextService, - @ITextFileService textFileService: ITextFileService, - @IWorkbenchEditorService editorService: IWorkbenchEditorService, - @ITextModelResolverService textModelResolverService: ITextModelResolverService, - @IFileService fileService: IFileService + @ISearchService private readonly _searchService: ISearchService, + @IWorkspaceContextService private readonly _contextService: IWorkspaceContextService, + @ITextFileService private readonly _textFileService: ITextFileService, + @IWorkbenchEditorService private readonly _editorService: IWorkbenchEditorService, + @ITextModelResolverService private readonly _textModelResolverService: ITextModelResolverService, + @IFileService private readonly _fileService: IFileService, + @IThreadService threadService: IThreadService ) { super(); + this._proxy = threadService.get(ExtHostContext.ExtHostWorkspace); + this._contextService.onDidChangeFolders(this._onDidChangeWorkspace, this, this._toDispose); + } + + // --- workspace --- - this._searchService = searchService; - this._contextService = contextService; - this._textFileService = textFileService; - this._editorService = editorService; - this._fileService = fileService; - this._textModelResolverService = textModelResolverService; + private _onDidChangeWorkspace(folders: URI[]): void { + this._proxy.$acceptWorkspaceData(folders); } + // --- search --- + $startSearch(include: string, exclude: string, maxResults: number, requestId: number): Thenable { const workspace = this._contextService.getWorkspace(); if (!workspace) { @@ -84,6 +86,8 @@ export class MainThreadWorkspace extends MainThreadWorkspaceShape { return undefined; } + // --- save & edit resources --- + $saveAll(includeUntitled?: boolean): Thenable { return this._textFileService.saveAll(includeUntitled).then(result => { return result.results.every(each => each.success === true); diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 810e4cf1f8231..b450e6538e630 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -91,6 +91,7 @@ export function createApiFactory( const extHostTerminalService = col.define(ExtHostContext.ExtHostTerminalService).set(new ExtHostTerminalService(threadService)); const extHostSCM = col.define(ExtHostContext.ExtHostSCM).set(new ExtHostSCM(threadService, extHostCommands)); const extHostTask = col.define(ExtHostContext.ExtHostTask).set(new ExtHostTask(threadService)); + const extHostWorkspace = col.define(ExtHostContext.ExtHostWorkspace).set(new ExtHostWorkspace(threadService, initData.workspace && [initData.workspace.resource])); col.define(ExtHostContext.ExtHostExtensionService).set(extensionService); col.finish(false, threadService); @@ -99,8 +100,6 @@ export function createApiFactory( const extHostStatusBar = new ExtHostStatusBar(threadService); const extHostProgress = new ExtHostProgress(threadService.get(MainContext.MainThreadProgress)); const extHostOutputService = new ExtHostOutputService(threadService); - const workspacePath = initData.workspace ? initData.workspace.resource.fsPath : undefined; - const extHostWorkspace = new ExtHostWorkspace(threadService, workspacePath); const extHostLanguages = new ExtHostLanguages(threadService); // Register API-ish commands diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index e68efd0e51372..393e50579ff2f 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -404,6 +404,10 @@ export abstract class ExtHostTreeViewsShape { $getChildren(treeViewId: string, treeItemHandle: number): TPromise { throw ni(); } } +export abstract class ExtHostWorkspaceShape { + $acceptWorkspaceData(folders: URI[]): void { throw ni(); } +} + export abstract class ExtHostExtensionServiceShape { $activateExtension(extensionDescription: IExtensionDescription): TPromise { throw ni(); } } @@ -524,5 +528,6 @@ export const ExtHostContext = { ExtHostExtensionService: createExtId('ExtHostExtensionService', ExtHostExtensionServiceShape), ExtHostTerminalService: createExtId('ExtHostTerminalService', ExtHostTerminalServiceShape), ExtHostSCM: createExtId('ExtHostSCM', ExtHostSCMShape), - ExtHostTask: createExtId('ExtHostTask', ExtHostTaskShape) + ExtHostTask: createExtId('ExtHostTask', ExtHostTaskShape), + ExtHostWorkspace: createExtId('ExtHostWorkspace', ExtHostWorkspaceShape), }; diff --git a/src/vs/workbench/api/node/extHostWorkspace.ts b/src/vs/workbench/api/node/extHostWorkspace.ts index 38024197279d4..c56bf79591bca 100644 --- a/src/vs/workbench/api/node/extHostWorkspace.ts +++ b/src/vs/workbench/api/node/extHostWorkspace.ts @@ -6,26 +6,30 @@ import URI from 'vs/base/common/uri'; import { normalize } from 'vs/base/common/paths'; +import { isFalsyOrEmpty } from 'vs/base/common/arrays'; import { relative } from 'path'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { IResourceEdit } from 'vs/editor/common/services/bulkEdit'; import { TPromise } from 'vs/base/common/winjs.base'; import { fromRange, EndOfLine } from 'vs/workbench/api/node/extHostTypeConverters'; -import { MainContext, MainThreadWorkspaceShape } from './extHost.protocol'; +import { ExtHostWorkspaceShape, MainContext, MainThreadWorkspaceShape } from './extHost.protocol'; import * as vscode from 'vscode'; -export class ExtHostWorkspace { +export class ExtHostWorkspace extends ExtHostWorkspaceShape { private static _requestIdPool = 0; private _proxy: MainThreadWorkspaceShape; private _workspacePath: string; - constructor(threadService: IThreadService, workspacePath: string) { + constructor(threadService: IThreadService, folders: URI[]) { + super(); this._proxy = threadService.get(MainContext.MainThreadWorkspace); - this._workspacePath = workspacePath; + this._workspacePath = isFalsyOrEmpty(folders) ? undefined : folders[0].fsPath; } + // --- workspace --- + getPath(): string { return this._workspacePath; } @@ -55,6 +59,12 @@ export class ExtHostWorkspace { return normalize(result); } + $acceptWorkspaceData(folders: URI[]): void { + // todo@joh do something, align with ctor URI[] vs IWorkspace + } + + // --- search --- + findFiles(include: string, exclude: string, maxResults?: number, token?: vscode.CancellationToken): Thenable { const requestId = ExtHostWorkspace._requestIdPool++; const result = this._proxy.$startSearch(include, exclude, maxResults, requestId); diff --git a/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts b/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts index a6aee8f4070ef..413e9f14fb251 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts @@ -6,6 +6,7 @@ 'use strict'; import * as assert from 'assert'; +import URI from 'vs/base/common/uri'; import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; import { TestThreadService } from './testThreadService'; @@ -13,7 +14,7 @@ suite('ExtHostWorkspace', function () { test('asRelativePath', function () { - const ws = new ExtHostWorkspace(new TestThreadService(), '/Coding/Applications/NewsWoWBot'); + const ws = new ExtHostWorkspace(new TestThreadService(), [URI.file('/Coding/Applications/NewsWoWBot')]); assert.equal(ws.getRelativePath('/Coding/Applications/NewsWoWBot/bernd/das/brot'), 'bernd/das/brot'); assert.equal(ws.getRelativePath('/Apps/DartPubCache/hosted/pub.dartlang.org/convert-2.0.1/lib/src/hex.dart'), @@ -26,7 +27,7 @@ suite('ExtHostWorkspace', function () { test('asRelativePath, same paths, #11402', function () { const root = '/home/aeschli/workspaces/samples/docker'; const input = '/home/aeschli/workspaces/samples/docker'; - const ws = new ExtHostWorkspace(new TestThreadService(), root); + const ws = new ExtHostWorkspace(new TestThreadService(), [URI.file(root)]); assert.equal(ws.getRelativePath(input), input); From f6adea0241a50c5a5518e6ee46f9fe329afe1c7c Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Mon, 12 Jun 2017 16:38:19 +0200 Subject: [PATCH 1728/2747] Possible bug where method is not invoked (fixes #28527) --- src/vs/base/parts/quickopen/browser/quickOpenWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts index 3cf4a81e4c54e..7a4cbcf5a2d2f 100644 --- a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts +++ b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts @@ -420,7 +420,7 @@ export class QuickOpenWidget implements IModelProvider { } public navigate(next: boolean, quickNavigate?: IQuickNavigateConfiguration): void { - if (this.isVisible) { + if (this.isVisible()) { // Transition into quick navigate mode if not yet done if (!this.quickNavigateConfiguration && quickNavigate) { From 9a4a9a4021e0daae03ba83a7bec302a7e7c381ce Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Mon, 12 Jun 2017 16:41:40 +0200 Subject: [PATCH 1729/2747] make asRelativePath work with multiple root folders, #28526 --- src/vs/workbench/api/node/extHostWorkspace.ts | 26 +++++++++++-------- .../api/extHostWorkspace.test.ts | 13 ++++++++++ 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/api/node/extHostWorkspace.ts b/src/vs/workbench/api/node/extHostWorkspace.ts index c56bf79591bca..7ec394f69139a 100644 --- a/src/vs/workbench/api/node/extHostWorkspace.ts +++ b/src/vs/workbench/api/node/extHostWorkspace.ts @@ -19,19 +19,19 @@ export class ExtHostWorkspace extends ExtHostWorkspaceShape { private static _requestIdPool = 0; - private _proxy: MainThreadWorkspaceShape; - private _workspacePath: string; + private readonly _proxy: MainThreadWorkspaceShape; + private _workspaceFolders: URI[]; constructor(threadService: IThreadService, folders: URI[]) { super(); this._proxy = threadService.get(MainContext.MainThreadWorkspace); - this._workspacePath = isFalsyOrEmpty(folders) ? undefined : folders[0].fsPath; + this._workspaceFolders = folders; } // --- workspace --- getPath(): string { - return this._workspacePath; + return isFalsyOrEmpty(this._workspaceFolders) ? undefined : this._workspaceFolders[0].fsPath; } getRelativePath(pathOrUri: string | vscode.Uri): string { @@ -47,20 +47,24 @@ export class ExtHostWorkspace extends ExtHostWorkspaceShape { return path; } - if (!this._workspacePath) { + if (isFalsyOrEmpty(this._workspaceFolders)) { return normalize(path); } - let result = relative(this._workspacePath, path); - if (!result || result.indexOf('..') === 0) { - return normalize(path); + for (const { fsPath } of this._workspaceFolders) { + let result = relative(fsPath, path); + if (!result || result.indexOf('..') === 0) { + continue; + } + return normalize(result); } - return normalize(result); + return normalize(path); } - $acceptWorkspaceData(folders: URI[]): void { - // todo@joh do something, align with ctor URI[] vs IWorkspace + $acceptWorkspaceData(workspaceFolders: URI[]): void { + //TODO@joh equality-check, emit event etc. + this._workspaceFolders = workspaceFolders; } // --- search --- diff --git a/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts b/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts index 413e9f14fb251..36430d52357bc 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts @@ -22,6 +22,7 @@ suite('ExtHostWorkspace', function () { assert.equal(ws.getRelativePath(''), ''); assert.equal(ws.getRelativePath('/foo/bar'), '/foo/bar'); + assert.equal(ws.getRelativePath('in/out'), 'in/out'); }); test('asRelativePath, same paths, #11402', function () { @@ -33,6 +34,18 @@ suite('ExtHostWorkspace', function () { const input2 = '/home/aeschli/workspaces/samples/docker/a.file'; assert.equal(ws.getRelativePath(input2), 'a.file'); + }); + + test('asRelativePath, no workspace', function () { + const ws = new ExtHostWorkspace(new TestThreadService(), null); + assert.equal(ws.getRelativePath(''), ''); + assert.equal(ws.getRelativePath('/foo/bar'), '/foo/bar'); + }); + test('asRelativePath, multiple folders', function () { + const ws = new ExtHostWorkspace(new TestThreadService(), [URI.file('/Coding/One'), URI.file('/Coding/Two')]); + assert.equal(ws.getRelativePath('/Coding/One/file.txt'), 'file.txt'); + assert.equal(ws.getRelativePath('/Coding/Two/files/out.txt'), 'files/out.txt'); + assert.equal(ws.getRelativePath('/Coding/Two2/files/out.txt'), '/Coding/Two2/files/out.txt'); }); }); From 10e4c1508ba687511a5a97e4e516a717465b68a0 Mon Sep 17 00:00:00 2001 From: isidor Date: Mon, 12 Jun 2017 16:58:02 +0200 Subject: [PATCH 1730/2747] minor copy all polish #28197 --- .../workbench/parts/debug/electron-browser/repl.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/repl.ts b/src/vs/workbench/parts/debug/electron-browser/repl.ts index 758f67e4571ac..505ce6118de85 100644 --- a/src/vs/workbench/parts/debug/electron-browser/repl.ts +++ b/src/vs/workbench/parts/debug/electron-browser/repl.ts @@ -60,7 +60,7 @@ export interface IPrivateReplService { _serviceBrand: any; navigateHistory(previous: boolean): void; acceptReplInput(): void; - copyAllReplOutput(): void; + getVisibleContent(): string; } export class Repl extends Panel implements IPrivateReplService { @@ -232,7 +232,7 @@ export class Repl extends Panel implements IPrivateReplService { this.layout(this.dimension); } - public copyAllReplOutput(): void { + public getVisibleContent(): string { let text = ''; const navigator = this.tree.getNavigator(); // skip first navigator element - the root node @@ -242,7 +242,8 @@ export class Repl extends Panel implements IPrivateReplService { } text += navigator.current().toString(); } - clipboard.writeText(text); + + return text; } public layout(dimension: Dimension): void { @@ -399,14 +400,14 @@ export class ReplCopyAllAction extends EditorAction { constructor() { super({ - id: 'repl.action.copyall', - label: nls.localize('actions.repl.copyall', "Debug: Console Copy All"), + id: 'repl.action.copyAll', + label: nls.localize('actions.repl.copyAll', "Debug: Console Copy All"), alias: 'Debug Console Copy All', precondition: debug.CONTEXT_IN_DEBUG_REPL, }); } public run(accessor: ServicesAccessor, editor: ICommonCodeEditor): void | TPromise { - accessor.get(IPrivateReplService).copyAllReplOutput(); + clipboard.writeText(accessor.get(IPrivateReplService).getVisibleContent()); } } From 149e1a9e1585732ed339da427843f5d3fc8ab6ac Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 12 Jun 2017 17:23:22 +0200 Subject: [PATCH 1731/2747] #28538 Clean up onDidChangeFolders event --- src/vs/platform/workspace/common/workspace.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index 848ecb6b3220c..ef64497ddb4b5 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -128,7 +128,9 @@ export class WorkspaceContextService implements IWorkspaceContextService { public _serviceBrand: any; - private _onDidChangeFolders: Emitter; + private readonly _onDidChangeFolders: Emitter = new Emitter(); + public readonly onDidChangeFolders: Event = this._onDidChangeFolders.event; + private folders: URI[]; private toDispose: IDisposable[]; @@ -185,10 +187,6 @@ export class WorkspaceContextService implements IWorkspaceContextService { } } - public get onDidChangeFolders(): Event { - return this._onDidChangeFolders && this._onDidChangeFolders.event; //TODO@Sandeep sinon is a pita - } - public getFolders(): URI[] { return this.folders; } From bf198359e67d71214d5f1bf2c95e499896f3f593 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Mon, 12 Jun 2017 17:38:49 +0200 Subject: [PATCH 1732/2747] #28538 Do not initialize event again --- src/vs/platform/workspace/common/workspace.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index ef64497ddb4b5..b74d8fd31d91e 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -137,7 +137,6 @@ export class WorkspaceContextService implements IWorkspaceContextService { constructor(private configurationService: IConfigurationService, private workspace?: Workspace) { this.toDispose = []; - this._onDidChangeFolders = new Emitter(); this.toDispose.push(this._onDidChangeFolders); this.folders = workspace ? [workspace.resource] : []; From b46e2e0b7bdb7178d602f2d71fe1f4a1210ca0dd Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 12 Jun 2017 11:31:28 -0700 Subject: [PATCH 1733/2747] Add defaults for terminal selection These will be fallen back to when selection.background isn't defined. Fixes #28554 --- .../parts/terminal/electron-browser/media/xterm.css | 7 +++++++ .../parts/terminal/electron-browser/terminalPanel.ts | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css b/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css index fe96994dcc95e..66487fab2141f 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css @@ -141,6 +141,13 @@ .monaco-workbench .panel.integrated-terminal .xterm .xterm-selection div { position: absolute; opacity: 0.5; + background-color: #808080; +} +.vs-dark .monaco-workbench .panel.integrated-terminal .xterm .xterm-selection div { + background-color: #808080; +} +.hc-black .monaco-workbench .panel.integrated-terminal .xterm .xterm-selection div { + background-color: #FFF; } .monaco-workbench .panel.integrated-terminal .xterm .xterm-bold { diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index dc7558d33e91c..3dae4ebd1bd90 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -266,7 +266,9 @@ export class TerminalPanel extends Panel { // until proper color inverting is implemented to ensure contrast. const selectionColor = theme.getColor(selectionBackground); if (selectionColor) { - css += `.monaco-workbench .panel.integrated-terminal .xterm .xterm-selection div { background-color: ${selectionColor}; }`; + // selection.background is set to null when not defined by the + // theme, as such it's default values are defined in CSS. + css += `.monaco-workbench .panel.integrated-terminal .xterm .xterm-selection div { background-color: ${selectionColor} !important; }`; } this._themeStyleElement.innerHTML = css; From a2e856de8e3a955a33076ea22372600abd56785f Mon Sep 17 00:00:00 2001 From: t-amqi Date: Mon, 12 Jun 2017 11:44:01 -0700 Subject: [PATCH 1734/2747] Add entry for tasks in menu --- src/vs/code/electron-main/menus.ts | 2 ++ .../quickopen/browser/commandsHandler.ts | 25 +++++++++++++++++++ .../browser/quickopen.contribution.ts | 6 ++++- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index db805f0637c4b..849b873cb9c97 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -586,6 +586,7 @@ export class CodeMenu { const output = this.createMenuItem(nls.localize({ key: 'miToggleOutput', comment: ['&& denotes a mnemonic'] }, "&&Output"), 'workbench.action.output.toggleOutput'); const debugConsole = this.createMenuItem(nls.localize({ key: 'miToggleDebugConsole', comment: ['&& denotes a mnemonic'] }, "De&&bug Console"), 'workbench.debug.action.toggleRepl'); const integratedTerminal = this.createMenuItem(nls.localize({ key: 'miToggleIntegratedTerminal', comment: ['&& denotes a mnemonic'] }, "&&Integrated Terminal"), 'workbench.action.terminal.toggleTerminal'); + const taskMenu = this.createMenuItem(nls.localize({ key: 'miShowTask', comment: ['&& denotes a mnemonic'] }, "&&Show Tasks"), 'workbench.action.showTasks'); const problems = this.createMenuItem(nls.localize({ key: 'miMarker', comment: ['&& denotes a mnemonic'] }, "&&Problems"), 'workbench.actions.view.problems'); let additionalViewlets: Electron.MenuItem; @@ -657,6 +658,7 @@ export class CodeMenu { problems, debugConsole, integratedTerminal, + taskMenu, __separator__(), fullscreen, toggleZenMode, diff --git a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts index cf9fd534f85ba..aee3eb1b14094 100644 --- a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts @@ -149,6 +149,31 @@ export class ShowAllCommandsAction extends Action { } } +export class ShowTasksAction extends Action { + + public static ID = 'workbench.action.showTasks'; + public static LABEL = nls.localize('showTasks', "Show Task Menu"); + + constructor( + id: string, + label: string, + @IQuickOpenService private quickOpenService: IQuickOpenService, + @IConfigurationService private configurationService: IConfigurationService + ) { + super(id, label); + } + + public run(context?: any): TPromise { + let value = ALL_COMMANDS_PREFIX; + let taskStr = 'tasks'; + value = `${value}${taskStr}`; + + this.quickOpenService.show(value); + + return TPromise.as(null); + } +} + export class ClearCommandHistoryAction extends Action { public static ID = 'workbench.action.clearCommandHistory'; diff --git a/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts b/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts index 606e882af9b30..d70aae56491a2 100644 --- a/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts +++ b/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts @@ -13,7 +13,7 @@ import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { GotoSymbolAction, GOTO_SYMBOL_PREFIX, SCOPE_PREFIX } from 'vs/workbench/parts/quickopen/browser/gotoSymbolHandler'; -import { ShowAllCommandsAction, ALL_COMMANDS_PREFIX, ClearCommandHistoryAction } from 'vs/workbench/parts/quickopen/browser/commandsHandler'; +import { ShowAllCommandsAction, ALL_COMMANDS_PREFIX, ClearCommandHistoryAction, ShowTasksAction } from 'vs/workbench/parts/quickopen/browser/commandsHandler'; import { GotoLineAction, GOTO_LINE_PREFIX } from 'vs/workbench/parts/quickopen/browser/gotoLineHandler'; import { HELP_PREFIX } from 'vs/workbench/parts/quickopen/browser/helpHandler'; import { VIEW_PICKER_PREFIX, OpenViewPickerAction, QuickOpenViewPickerAction } from 'vs/workbench/parts/quickopen/browser/viewPickerHandler'; @@ -40,6 +40,10 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenViewPickerAct primary: KeyMod.CtrlCmd | KeyCode.KEY_Q, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_Q }, linux: { primary: null } }), 'Quick Open View'); +registry.registerWorkbenchAction(new SyncActionDescriptor(ShowTasksAction, ShowTasksAction.ID, ShowTasksAction.LABEL, { + primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_T +}), 'Show Task Menu'); + // Register Quick Open Handler Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpenHandler( From 7e9dc4a54b2c3217b4372ed23c6059c8d8d5e11f Mon Sep 17 00:00:00 2001 From: t-amqi Date: Mon, 12 Jun 2017 14:12:03 -0700 Subject: [PATCH 1735/2747] Fix tasks menu syntax --- src/vs/code/electron-main/menus.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 849b873cb9c97..e9cec735992a3 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -586,7 +586,7 @@ export class CodeMenu { const output = this.createMenuItem(nls.localize({ key: 'miToggleOutput', comment: ['&& denotes a mnemonic'] }, "&&Output"), 'workbench.action.output.toggleOutput'); const debugConsole = this.createMenuItem(nls.localize({ key: 'miToggleDebugConsole', comment: ['&& denotes a mnemonic'] }, "De&&bug Console"), 'workbench.debug.action.toggleRepl'); const integratedTerminal = this.createMenuItem(nls.localize({ key: 'miToggleIntegratedTerminal', comment: ['&& denotes a mnemonic'] }, "&&Integrated Terminal"), 'workbench.action.terminal.toggleTerminal'); - const taskMenu = this.createMenuItem(nls.localize({ key: 'miShowTask', comment: ['&& denotes a mnemonic'] }, "&&Show Tasks"), 'workbench.action.showTasks'); + const taskMenu = this.createMenuItem(nls.localize({ key: 'miShowTask', comment: ['&& denotes a mnemonic'] }, "&&Show Tasks..."), 'workbench.action.showTasks'); const problems = this.createMenuItem(nls.localize({ key: 'miMarker', comment: ['&& denotes a mnemonic'] }, "&&Problems"), 'workbench.actions.view.problems'); let additionalViewlets: Electron.MenuItem; From 78250b41d2ce7c288e226d47e86d6bd8f1eee597 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 12 Jun 2017 14:32:48 -0700 Subject: [PATCH 1736/2747] node-pty@0.6.8 Fixes #23396 --- npm-shrinkwrap.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 01a089f82644a..7b76d1c9edbf3 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -338,9 +338,9 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz" }, "node-pty": { - "version": "0.6.6", - "from": "node-pty@0.6.6", - "resolved": "https://registry.npmjs.org/node-pty/-/node-pty-0.6.6.tgz", + "version": "0.6.8", + "from": "node-pty@0.6.8", + "resolved": "https://registry.npmjs.org/node-pty/-/node-pty-0.6.8.tgz", "dependencies": { "nan": { "version": "2.5.0", diff --git a/package.json b/package.json index 09d83d51cb262..6536cecc87a9d 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "jschardet": "^1.4.2", "minimist": "1.2.0", "native-keymap": "1.2.4", - "node-pty": "0.6.6", + "node-pty": "0.6.8", "semver": "4.3.6", "v8-profiler": "jrieken/v8-profiler#vscode", "vscode-debugprotocol": "1.20.0", From f243ff904b987b311d76e1f91ea7fbe5008e761b Mon Sep 17 00:00:00 2001 From: t-amqi Date: Mon, 12 Jun 2017 14:41:08 -0700 Subject: [PATCH 1737/2747] Add memento for running a task --- .../parts/tasks/electron-browser/task.contribution.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 905ed31a99299..349ce3fe297ef 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -610,6 +610,9 @@ class TaskService extends EventEmitter implements ITaskService { private registerCommands(): void { CommandsRegistry.registerCommand('workbench.action.tasks.runTask', (accessor, arg) => { + if (!this.storageService.get('userRanTask', StorageScope.GLOBAL)) { + this.storageService.store('userRanTask', true, StorageScope.GLOBAL); + } this.runTaskCommand(accessor, arg); }); From 3c52b5ae39c74232085ebaf44af4fce121720961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatriz=20Magalh=C3=A3es?= Date: Mon, 12 Jun 2017 23:05:57 +0100 Subject: [PATCH 1738/2747] fixed misspelled occurrences and occurred --- .../lib/tslint/noUnexternalizedStringsRule.ts | 20 +- build/lib/typescript/typescriptServices.js | 524 +++++++++--------- src/typings/electron.d.ts | 2 +- src/vs/base/common/errorMessage.ts | 2 +- src/vs/base/common/marked/raw.marked.js | 2 +- .../editor/browser/controller/mouseHandler.ts | 2 +- .../browser/standalone/standaloneLanguages.ts | 2 +- .../common/controller/cursorTypeOperations.ts | 2 +- .../contrib/find/common/findController.ts | 10 +- .../find/test/common/findController.test.ts | 2 +- src/vs/editor/contrib/links/browser/links.ts | 62 +-- .../wordHighlighter/common/wordHighlighter.ts | 4 +- src/vs/monaco.d.ts | 2 +- src/vs/platform/files/common/files.ts | 2 +- src/vs/platform/search/common/replace.ts | 2 +- src/vs/workbench/api/node/extHost.api.impl.ts | 2 +- .../node/configurationResolverService.ts | 2 +- 17 files changed, 322 insertions(+), 322 deletions(-) diff --git a/build/lib/tslint/noUnexternalizedStringsRule.ts b/build/lib/tslint/noUnexternalizedStringsRule.ts index d7a2d8ca10015..cbe457c5be5ca 100644 --- a/build/lib/tslint/noUnexternalizedStringsRule.ts +++ b/build/lib/tslint/noUnexternalizedStringsRule.ts @@ -82,10 +82,10 @@ class NoUnexternalizedStringsRuleWalker extends Lint.RuleWalker { protected visitSourceFile(node: ts.SourceFile): void { super.visitSourceFile(node); Object.keys(this.usedKeys).forEach(key => { - let occurences = this.usedKeys[key]; - if (occurences.length > 1) { - occurences.forEach(occurence => { - this.addFailure((this.createFailure(occurence.key.getStart(), occurence.key.getWidth(), `Duplicate key ${occurence.key.getText()} with different message value.`))); + let occurrences = this.usedKeys[key]; + if (occurrences.length > 1) { + occurrences.forEach(occurrence => { + this.addFailure((this.createFailure(occurrence.key.getStart(), occurrence.key.getWidth(), `Duplicate key ${occurrence.key.getText()} with different message value.`))); }); } }); @@ -157,17 +157,17 @@ class NoUnexternalizedStringsRuleWalker extends Lint.RuleWalker { private recordKey(keyNode: ts.StringLiteral, messageNode: ts.Node) { let text = keyNode.getText(); - let occurences: KeyMessagePair[] = this.usedKeys[text]; - if (!occurences) { - occurences = []; - this.usedKeys[text] = occurences; + let occurrences: KeyMessagePair[] = this.usedKeys[text]; + if (!occurrences) { + occurrences = []; + this.usedKeys[text] = occurrences; } if (messageNode) { - if (occurences.some(pair => pair.message ? pair.message.getText() === messageNode.getText() : false)) { + if (occurrences.some(pair => pair.message ? pair.message.getText() === messageNode.getText() : false)) { return; } } - occurences.push({ key: keyNode, message: messageNode }); + occurrences.push({ key: keyNode, message: messageNode }); } private findDescribingParent(node: ts.Node): { callInfo?: { callExpression: ts.CallExpression, argIndex: number }, ignoreUsage?: boolean; } { diff --git a/build/lib/typescript/typescriptServices.js b/build/lib/typescript/typescriptServices.js index 349ff6ad391a5..6cf24f63bf153 100644 --- a/build/lib/typescript/typescriptServices.js +++ b/build/lib/typescript/typescriptServices.js @@ -485,7 +485,7 @@ var ts; SymbolFlags[SymbolFlags["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor"; SymbolFlags[SymbolFlags["Export"] = 7340032] = "Export"; /* @internal */ - // The set of things we consider semantically classifiable. Used to speed up the LS during + // The set of things we consider semantically classifiable. Used to speed up the LS during // classification. SymbolFlags[SymbolFlags["Classifiable"] = 788448] = "Classifiable"; })(ts.SymbolFlags || (ts.SymbolFlags = {})); @@ -1274,19 +1274,19 @@ var ts; ts.getNormalizedPathFromPathComponents = getNormalizedPathFromPathComponents; function getNormalizedPathComponentsOfUrl(url) { // Get root length of http://www.website.com/folder1/foler2/ - // In this example the root is: http://www.website.com/ + // In this example the root is: http://www.website.com/ // normalized path components should be ["http://www.website.com/", "folder1", "folder2"] var urlLength = url.length; // Initial root length is http:// part var rootLength = url.indexOf("://") + "://".length; while (rootLength < urlLength) { - // Consume all immediate slashes in the protocol + // Consume all immediate slashes in the protocol // eg.initial rootlength is just file:// but it needs to consume another "/" in file:/// if (url.charCodeAt(rootLength) === 47 /* slash */) { rootLength++; } else { - // non slash character means we continue proceeding to next component of root search + // non slash character means we continue proceeding to next component of root search break; } } @@ -1297,15 +1297,15 @@ var ts; // Find the index of "/" after website.com so the root can be http://www.website.com/ (from existing http://) var indexOfNextSlash = url.indexOf(ts.directorySeparator, rootLength); if (indexOfNextSlash !== -1) { - // Found the "/" after the website.com so the root is length of http://www.website.com/ + // Found the "/" after the website.com so the root is length of http://www.website.com/ // and get components afetr the root normally like any other folder components rootLength = indexOfNextSlash + 1; return normalizedPathComponents(url, rootLength); } else { - // Can't find the host assume the rest of the string as component + // Can't find the host assume the rest of the string as component // but make sure we append "/" to it as root is not joined using "/" - // eg. if url passed in was http://website.com we want to use root as [http://website.com/] + // eg. if url passed in was http://website.com we want to use root as [http://website.com/] // so that other path manipulations will be correct and it can be merged with relative paths correctly return [url + ts.directorySeparator]; } @@ -2580,7 +2580,7 @@ var ts; function computeLineAndCharacterOfPosition(lineStarts, position) { var lineNumber = ts.binarySearch(lineStarts, position); if (lineNumber < 0) { - // If the actual position was not found, + // If the actual position was not found, // the binary search returns the negative value of the next line start // e.g. if the line starts at [5, 10, 23, 80] and the position requested was 20 // then the search will return -2 @@ -2623,8 +2623,8 @@ var ts; // \u000D Carriage Return // \u2028 Line separator // \u2029 Paragraph separator - // Only the characters in Table 3 are treated as line terminators. Other new line or line - // breaking characters are treated as white space but not as line terminators. + // Only the characters in Table 3 are treated as line terminators. Other new line or line + // breaking characters are treated as white space but not as line terminators. return ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */ || ch === 8232 /* lineSeparator */ || @@ -2702,7 +2702,7 @@ var ts; } } ts.skipTrivia = skipTrivia; - // All conflict markers consist of the same character repeated seven times. If it is + // All conflict markers consist of the same character repeated seven times. If it is // a <<<<<<< or >>>>>>> marker then it is also followd by a space. var mergeConflictMarkerLength = "<<<<<<<".length; function isConflictMarkerTrivia(text, pos) { @@ -2747,12 +2747,12 @@ var ts; } return pos; } - // Extract comments from the given source text starting at the given position. If trailing is - // false, whitespace is skipped until the first line break and comments between that location - // and the next token are returned.If trailing is true, comments occurring between the given - // position and the next line break are returned.The return value is an array containing a - // TextRange for each comment. Single-line comment ranges include the beginning '//' characters - // but not the ending line break. Multi - line comment ranges include the beginning '/* and + // Extract comments from the given source text starting at the given position. If trailing is + // false, whitespace is skipped until the first line break and comments between that location + // and the next token are returned.If trailing is true, comments occurring between the given + // position and the next line break are returned.The return value is an array containing a + // TextRange for each comment. Single-line comment ranges include the beginning '//' characters + // but not the ending line break. Multi - line comment ranges include the beginning '/* and // ending '*/' characters.The return value is undefined if no comments were found. function getCommentRanges(text, pos, trailing) { var result; @@ -3699,7 +3699,7 @@ var ts; })(ts.ModuleInstanceState || (ts.ModuleInstanceState = {})); var ModuleInstanceState = ts.ModuleInstanceState; function getModuleInstanceState(node) { - // A module is uninstantiated if it contains only + // A module is uninstantiated if it contains only // 1. interface declarations, type alias declarations if (node.kind === 205 /* InterfaceDeclaration */ || node.kind === 206 /* TypeAliasDeclaration */) { return 0 /* NonInstantiated */; @@ -3739,7 +3739,7 @@ var ts; ts.getModuleInstanceState = getModuleInstanceState; var ContainerFlags; (function (ContainerFlags) { - // The current node is not a container, and no container manipulation should happen before + // The current node is not a container, and no container manipulation should happen before // recursing into it. ContainerFlags[ContainerFlags["None"] = 0] = "None"; // The current node is a container. It should be set as the current container (and block- @@ -3844,13 +3844,13 @@ var ts; if (name !== undefined) { // Check and see if the symbol table already has a symbol with this name. If not, // create a new symbol with this name and add it to the table. Note that we don't - // give the new symbol any flags *yet*. This ensures that it will not conflict + // give the new symbol any flags *yet*. This ensures that it will not conflict // witht he 'excludes' flags we pass in. // // If we do get an existing symbol, see if it conflicts with the new symbol we're // creating. For example, a 'var' symbol and a 'class' symbol will conflict within - // the same symbol table. If we have a conflict, report the issue on each - // declaration we have for this symbol, and then create a new symbol for this + // the same symbol table. If we have a conflict, report the issue on each + // declaration we have for this symbol, and then create a new symbol for this // declaration. // // If we created a new symbol, either because we didn't have a symbol with this name @@ -3904,7 +3904,7 @@ var ts; // ExportType, or ExportContainer flag, and an associated export symbol with all the correct flags set // on it. There are 2 main reasons: // - // 1. We treat locals and exports of the same name as mutually exclusive within a container. + // 1. We treat locals and exports of the same name as mutually exclusive within a container. // That means the binder will issue a Duplicate Identifier error if you mix locals and exports // with the same name in the same container. // TODO: Make this a more specific error and decouple it from the exclusion logic. @@ -3925,11 +3925,11 @@ var ts; } } } - // All container nodes are kept on a linked list in declaration order. This list is used by - // the getLocalNameOfContainer function in the type checker to validate that the local name + // All container nodes are kept on a linked list in declaration order. This list is used by + // the getLocalNameOfContainer function in the type checker to validate that the local name // used for a container is unique. function bindChildren(node) { - // Before we recurse into a node's chilren, we first save the existing parent, container + // Before we recurse into a node's chilren, we first save the existing parent, container // and block-container. Then after we pop out of processing the children, we restore // these saved values. var saveParent = parent; @@ -3943,9 +3943,9 @@ var ts; // may contain locals, we proactively initialize the .locals field. We do this because // it's highly likely that the .locals will be needed to place some child in (for example, // a parameter, or variable declaration). - // + // // However, we do not proactively create the .locals for block-containers because it's - // totally normal and common for block-containers to never actually have a block-scoped + // totally normal and common for block-containers to never actually have a block-scoped // variable in them. We don't want to end up allocating an object for every 'block' we // run into when most of them won't be necessary. // @@ -4005,7 +4005,7 @@ var ts; return 2 /* IsBlockScopedContainer */; case 182 /* Block */: // do not treat blocks directly inside a function as a block-scoped-container. - // Locals that reside in this block should go to the function locals. Othewise 'x' + // Locals that reside in this block should go to the function locals. Othewise 'x' // would not appear to be a redeclaration of a block scoped local in the following // example: // @@ -4018,7 +4018,7 @@ var ts; // the block, then there would be no collision. // // By not creating a new block-scoped-container here, we ensure that both 'var x' - // and 'let x' go into the Function-container's locals, and we do get a collision + // and 'let x' go into the Function-container's locals, and we do get a collision // conflict. return ts.isFunctionLike(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */; } @@ -4150,8 +4150,8 @@ var ts; // For a given function symbol "<...>(...) => T" we want to generate a symbol identical // to the one we would get for: { <...>(...): T } // - // We do that by making an anonymous type literal symbol, and then setting the function - // symbol as its sole member. To the rest of the system, this symbol will be indistinguishable + // We do that by making an anonymous type literal symbol, and then setting the function + // symbol as its sole member. To the rest of the system, this symbol will be indistinguishable // from an actual type literal symbol you would have gotten had you used the long form. var symbol = createSymbol(131072 /* Signature */, getDeclarationName(node)); addDeclarationToSymbol(symbol, node, 131072 /* Signature */); @@ -4192,17 +4192,17 @@ var ts; function bind(node) { node.parent = parent; // First we bind declaration nodes to a symbol if possible. We'll both create a symbol - // and then potentially add the symbol to an appropriate symbol table. Possible + // and then potentially add the symbol to an appropriate symbol table. Possible // destination symbol tables are: - // + // // 1) The 'exports' table of the current container's symbol. // 2) The 'members' table of the current container's symbol. // 3) The 'locals' table of the current container. // - // However, not all symbols will end up in any of these tables. 'Anonymous' symbols + // However, not all symbols will end up in any of these tables. 'Anonymous' symbols // (like TypeLiterals for example) will not be put in any table. bindWorker(node); - // Then we recurse into the children of the node to bind them as well. For certain + // Then we recurse into the children of the node to bind them as well. For certain // symbols we do specialized work when we recurse. For example, we'll keep track of // the current 'container' node when it changes. This helps us know which symbol table // a local should go into for example. @@ -4324,9 +4324,9 @@ var ts; } var symbol = node.symbol; // TypeScript 1.0 spec (April 2014): 8.4 - // Every class automatically contains a static property member named 'prototype', the + // Every class automatically contains a static property member named 'prototype', the // type of which is an instantiation of the class type with type Any supplied as a type - // argument for each type parameter. It is an error to explicitly declare a static + // argument for each type parameter. It is an error to explicitly declare a static // property member with the name 'prototype'. // // Note: we check for this here because this class may be merging into a module. The @@ -4376,7 +4376,7 @@ var ts; else { declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107455 /* ParameterExcludes */); } - // If this is a property-parameter, then also declare the property symbol into the + // If this is a property-parameter, then also declare the property symbol into the // containing class. if (node.flags & 112 /* AccessibilityModifier */ && node.parent.kind === 137 /* Constructor */ && @@ -4456,7 +4456,7 @@ var ts; // b) any of it's children reported that it had an error. var thisNodeOrAnySubNodesHasError = ((node.parserContextFlags & 32 /* ThisNodeHasError */) !== 0) || ts.forEachChild(node, containsParseError); - // If so, mark ourselves accordingly. + // If so, mark ourselves accordingly. if (thisNodeOrAnySubNodesHasError) { node.parserContextFlags |= 128 /* ThisNodeOrAnySubNodesHasError */; } @@ -4491,13 +4491,13 @@ var ts; ts.getStartPosOfNode = getStartPosOfNode; // Returns true if this node is missing from the actual source code. 'missing' is different // from 'undefined/defined'. When a node is undefined (which can happen for optional nodes - // in the tree), it is definitel missing. HOwever, a node may be defined, but still be + // in the tree), it is definitel missing. HOwever, a node may be defined, but still be // missing. This happens whenever the parser knows it needs to parse something, but can't // get anything in the source code that it expects at that location. For example: // // let a: ; // - // Here, the Type in the Type-Annotation is not-optional (as there is a colon in the source + // Here, the Type in the Type-Annotation is not-optional (as there is a colon in the source // code). So the parser will attempt to parse out a type, and will create an actual node. // However, this node will be 'missing' in the sense that no actual source-code/tokens are // contained within it. @@ -4568,7 +4568,7 @@ var ts; isCatchClauseVariableDeclaration(declaration); } ts.isBlockOrCatchScoped = isBlockOrCatchScoped; - // Gets the nearest enclosing block scope container that has the provided node + // Gets the nearest enclosing block scope container that has the provided node // as a descendant, that is not the provided node. function getEnclosingBlockScopeContainer(node) { var current = node.parent; @@ -4662,7 +4662,7 @@ var ts; break; } if (errorNode === undefined) { - // If we don't have a better node, then just set the error on the first token of + // If we don't have a better node, then just set the error on the first token of // construct. return getSpanOfTokenAtPosition(sourceFile, node.pos); } @@ -4690,10 +4690,10 @@ var ts; } return node; } - // Returns the node flags for this node and all relevant parent nodes. This is done so that + // Returns the node flags for this node and all relevant parent nodes. This is done so that // nodes like variable declarations and binding elements can returned a view of their flags // that includes the modifiers from their container. i.e. flags like export/declare aren't - // stored on the variable declaration directly, but on the containing variable statement + // stored on the variable declaration directly, but on the containing variable statement // (if it has one). Similarly, flags for let/const are store on the variable declaration // list. By calling this function, all those flags are combined so that the client can treat // the node as if it actually had those flags. @@ -4994,7 +4994,7 @@ var ts; node = node.parent; break; case 132 /* Decorator */: - // Decorators are always applied outside of the body of a class or method. + // Decorators are always applied outside of the body of a class or method. if (node.parent.kind === 131 /* Parameter */ && isClassElement(node.parent.parent)) { // If the decorator's parent is a Parameter, we resolve the this container from // the grandparent class declaration. @@ -5050,7 +5050,7 @@ var ts; node = node.parent; break; case 132 /* Decorator */: - // Decorators are always applied outside of the body of a class or method. + // Decorators are always applied outside of the body of a class or method. if (node.parent.kind === 131 /* Parameter */ && isClassElement(node.parent.parent)) { // If the decorator's parent is a Parameter, we resolve the this container from // the grandparent class declaration. @@ -5326,7 +5326,7 @@ var ts; ts.getJSDocTemplateTag = getJSDocTemplateTag; function getCorrespondingJSDocParameterTag(parameter) { if (parameter.name && parameter.name.kind === 65 /* Identifier */) { - // If it's a parameter, see if the parent has a jsdoc comment with an @param + // If it's a parameter, see if the parent has a jsdoc comment with an @param // annotation. var parameterName = parameter.name.text; var docComment = parameter.parent.jsDocComment; @@ -6361,17 +6361,17 @@ var ts; // // 0 10 20 30 40 50 60 70 80 90 100 // ------------------------------------------------------------------------------------------------------- - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- + // | / + // | /---- + // T1 | /---- + // | /---- + // | /---- // ------------------------------------------------------------------------------------------------------- - // | \ - // | \ - // T2 | \ - // | \ - // | \ + // | \ + // | \ + // T2 | \ + // | \ + // | \ // ------------------------------------------------------------------------------------------------------- // // Merging these turns out to not be too difficult. First, determining the new start of the change is trivial @@ -6379,17 +6379,17 @@ var ts; // // 0 10 20 30 40 50 60 70 80 90 100 // ------------------------------------------------------------*------------------------------------------ - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- + // | / + // | /---- + // T1 | /---- + // | /---- + // | /---- // ----------------------------------------$-------------------$------------------------------------------ - // . | \ - // . | \ - // T2 . | \ - // . | \ - // . | \ + // . | \ + // . | \ + // T2 . | \ + // . | \ + // . | \ // ----------------------------------------------------------------------*-------------------------------- // // (Note the dots represent the newly inferrred start. @@ -6400,22 +6400,22 @@ var ts; // // 0 10 20 30 40 50 60 70 80 90 100 // --------------------------------------------------------------------------------*---------------------- - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- + // | / + // | /---- + // T1 | /---- + // | /---- + // | /---- // ------------------------------------------------------------$------------------------------------------ - // . | \ - // . | \ - // T2 . | \ - // . | \ - // . | \ + // . | \ + // . | \ + // T2 . | \ + // . | \ + // . | \ // ----------------------------------------------------------------------*-------------------------------- // // In other words (in this case), we're recognizing that the second edit happened after where the first edit // ended with a delta of 20 characters (60 - 40). Thus, if we go back in time to where the first edit started - // that's the same as if we started at char 80 instead of 60. + // that's the same as if we started at char 80 instead of 60. // // As it so happens, the same logic applies if the second edit precedes the first edit. In that case rahter // than pusing the first edit forward to match the second, we'll push the second edit forward to match the @@ -6425,7 +6425,7 @@ var ts; // semantics: { { start: 10, length: 70 }, newLength: 60 } // // The math then works out as follows. - // If we have { oldStart1, oldEnd1, newEnd1 } and { oldStart2, oldEnd2, newEnd2 } then we can compute the + // If we have { oldStart1, oldEnd1, newEnd1 } and { oldStart2, oldEnd2, newEnd2 } then we can compute the // final result like so: // // { @@ -6995,7 +6995,7 @@ var ts; if (setParentNodes) { fixupParentReferences(sourceFile); } - // If this is a javascript file, proactively see if we can get JSDoc comments for + // If this is a javascript file, proactively see if we can get JSDoc comments for // relevant nodes in the file. We'll use these to provide typing informaion if they're // available. if (ts.isJavaScript(fileName)) { @@ -7537,7 +7537,7 @@ var ts; // if we see "extends {}" then only treat the {} as what we're extending (and not // the class body) if we have: // - // extends {} { + // extends {} { // extends {}, // extends {} extends // extends {} implements @@ -9280,7 +9280,7 @@ var ts; expression = finishNode(propertyAccess); continue; } - // when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName + // when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName if (!inDecoratorContext() && parseOptional(18 /* OpenBracketToken */)) { var indexedAccess = createNode(159 /* ElementAccessExpression */, expression.pos); indexedAccess.expression = expression; @@ -9388,7 +9388,7 @@ var ts; case 23 /* CommaToken */: // foo, case 14 /* OpenBraceToken */: // foo { // We don't want to treat these as type arguments. Otherwise we'll parse this - // as an invocation expression. Instead, we want to parse out the expression + // as an invocation expression. Instead, we want to parse out the expression // in isolation from the type arguments. default: // Anything else treat as an expression. @@ -9560,7 +9560,7 @@ var ts; function parseFunctionBlock(allowYield, ignoreMissingOpenBrace, diagnosticMessage) { var savedYieldContext = inYieldContext(); setYieldContext(allowYield); - // We may be in a [Decorator] context when parsing a function expression or + // We may be in a [Decorator] context when parsing a function expression or // arrow function. The body of the function is not in [Decorator] context. var saveDecoratorContext = inDecoratorContext(); if (saveDecoratorContext) { @@ -10011,7 +10011,7 @@ var ts; default: if (decorators) { // We reached this point because we encountered decorators and/or modifiers and assumed a declaration - // would follow. For recovery and error reporting purposes, return an incomplete declaration. + // would follow. For recovery and error reporting purposes, return an incomplete declaration. var node = createMissingNode(221 /* MissingDeclaration */, true, ts.Diagnostics.Declaration_expected); node.pos = fullStart; node.decorators = decorators; @@ -10366,8 +10366,8 @@ var ts; } function parseClassExpression() { return parseClassDeclarationOrExpression( - /*fullStart*/ scanner.getStartPos(), - /*decorators*/ undefined, + /*fullStart*/ scanner.getStartPos(), + /*decorators*/ undefined, /*modifiers*/ undefined, 177 /* ClassExpression */); } function parseClassDeclaration(fullStart, decorators, modifiers) { @@ -11125,8 +11125,8 @@ var ts; ts.Debug.assert(end <= content.length); var tags; var pos; - // NOTE(cyrusn): This is essentially a handwritten scanner for JSDocComments. I - // considered using an actual Scanner, but this would complicate things. The + // NOTE(cyrusn): This is essentially a handwritten scanner for JSDocComments. I + // considered using an actual Scanner, but this would complicate things. The // scanner would need to know it was in a Doc Comment. Otherwise, it would then // produce comments *inside* the doc comment. In the end it was just easier to // write a simple scanner rather than go that route. @@ -12274,7 +12274,7 @@ var ts; } break; case 132 /* Decorator */: - // Decorators are resolved at the class declaration. Resolving at the parameter + // Decorators are resolved at the class declaration. Resolving at the parameter // or member would result in looking up locals in the method. // // function y() {} @@ -13690,7 +13690,7 @@ var ts; case 151 /* UnionType */: case 152 /* ParenthesizedType */: return isDeclarationVisible(node.parent); - // Default binding, import specifier and namespace import is visible + // Default binding, import specifier and namespace import is visible // only on demand so by default it is not visible case 213 /* ImportClause */: case 214 /* NamespaceImport */: @@ -17000,7 +17000,7 @@ var ts; if (assumeTrue) { // Assumed result is true. If check was not for a primitive type, remove all primitive types if (!typeInfo) { - return removeTypesFromUnionType(type, 258 /* StringLike */ | 132 /* NumberLike */ | 8 /* Boolean */ | 2097152 /* ESSymbol */, + return removeTypesFromUnionType(type, 258 /* StringLike */ | 132 /* NumberLike */ | 8 /* Boolean */ | 2097152 /* ESSymbol */, /*isOfTypeKind*/ true, false); } // Check was for a primitive type, return that primitive type if it is a subtype @@ -17737,7 +17737,7 @@ var ts; // c is represented in the tree as a spread element in an array literal. // But c really functions as a rest element, and its purpose is to provide // a contextual type for the right hand side of the assignment. Therefore, - // instead of calling checkExpression on "...c", which will give an error + // instead of calling checkExpression on "...c", which will give an error // if c is not iterable/array-like, we need to act as if we are trying to // get the contextual element type from it. So we do something similar to // getContextualTypeForElementExpression, which will crucially not error @@ -18641,7 +18641,7 @@ var ts; // We exclude union types because we may have a union of function types that happen to have // no common signatures. if (isTypeAny(funcType) || (!callSignatures.length && !constructSignatures.length && !(funcType.flags & 16384 /* Union */) && isTypeAssignableTo(funcType, globalFunctionType))) { - // The unknownType indicates that an error already occured (and was reported). No + // The unknownType indicates that an error already occurred (and was reported). No // need to report another error in this case. if (funcType !== unknownType && node.typeArguments) { error(node, ts.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); @@ -20415,7 +20415,7 @@ var ts; /** Checks a type reference node as an expression. */ function checkTypeNodeAsExpression(node) { // When we are emitting type metadata for decorators, we need to try to check the type - // as if it were an expression so that we can emit the type in a value position when we + // as if it were an expression so that we can emit the type in a value position when we // serialize the type metadata. if (node && node.kind === 144 /* TypeReference */) { var type = getTypeFromTypeNode(node); @@ -20911,7 +20911,7 @@ var ts; } else { var leftType = checkExpression(varExpr); - checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_of_statement, + checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_of_statement, /*constantVariableMessage*/ ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant); // iteratedType will be undefined if the rightType was missing properties/signatures // required to get its iteratedType (like [Symbol.iterator] or next). This may be @@ -21945,7 +21945,7 @@ var ts; error(node.name, ts.Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); } } - // if the module merges with a class declaration in the same lexical scope, + // if the module merges with a class declaration in the same lexical scope, // we need to track this to ensure the correct emit. var mergedClass = ts.getDeclarationOfKind(symbol, 204 /* ClassDeclaration */); if (mergedClass && @@ -22605,7 +22605,7 @@ var ts; return getSymbolOfNode(entityName.parent); } if (entityName.parent.kind === 217 /* ExportAssignment */) { - return resolveEntityName(entityName, + return resolveEntityName(entityName, /*all meanings*/ 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */ | 8388608 /* Alias */); } if (entityName.kind !== 158 /* PropertyAccessExpression */) { @@ -23074,7 +23074,7 @@ var ts; // * The serialized type of an AccessorDeclaration is the serialized type of the return type annotation of its getter or parameter type annotation of its setter. // * The serialized type of any other FunctionLikeDeclaration is "Function". // * The serialized type of any other node is "void 0". - // + // // For rules on serializing type annotations, see `serializeTypeNode`. switch (node.kind) { case 204 /* ClassDeclaration */: return "Function"; @@ -23094,7 +23094,7 @@ var ts; // // * If the declaration is a class, the parameters of the first constructor with a body are used. // * If the declaration is function-like and has a body, the parameters of the function are used. - // + // // For the rules on serializing the type of each parameter declaration, see `serializeTypeOfDeclaration`. if (node) { var valueDeclaration; @@ -23162,7 +23162,7 @@ var ts; } function getReferencedValueSymbol(reference) { return getNodeLinks(reference).resolvedSymbol || - resolveName(reference, reference.text, 107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */, + resolveName(reference, reference.text, 107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */, /*nodeNotFoundMessage*/ undefined, undefined); } function getReferencedValueDeclaration(reference) { @@ -24494,7 +24494,7 @@ var ts; // we would write alias foo declaration when we visit it since it would now be marked as visible if (moduleElementEmitInfo) { if (moduleElementEmitInfo.node.kind === 212 /* ImportDeclaration */) { - // we have to create asynchronous output only after we have collected complete information + // we have to create asynchronous output only after we have collected complete information // because it is possible to enable multiple bindings as asynchronously visible moduleElementEmitInfo.isVisible = true; } @@ -24633,7 +24633,7 @@ var ts; return emitEntityName(type); } function emitEntityName(entityName) { - var visibilityResult = resolver.isEntityNameVisible(entityName, + var visibilityResult = resolver.isEntityNameVisible(entityName, // Aliases can be written asynchronously so use correct enclosing declaration entityName.parent.kind === 211 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration); handleSymbolAccessibilityError(visibilityResult); @@ -24845,7 +24845,7 @@ var ts; } } function writeImportEqualsDeclaration(node) { - // note usage of writer. methods instead of aliases created, just to make sure we are using + // note usage of writer. methods instead of aliases created, just to make sure we are using // correct writer especially to handle asynchronous alias writing emitJsDocComments(node); if (node.flags & 1 /* Export */) { @@ -24884,7 +24884,7 @@ var ts; } function writeImportDeclaration(node) { if (!node.importClause && !(node.flags & 1 /* Export */)) { - // do not write non-exported import declarations that don't have import clauses + // do not write non-exported import declarations that don't have import clauses return; } emitJsDocComments(node); @@ -25723,7 +25723,7 @@ var ts; : ts.shouldEmitToOwnFile(referencedFile, compilerOptions) ? ts.getOwnEmitOutputFilePath(referencedFile, host, ".d.ts") // Own output file so get the .d.ts file : ts.removeFileExtension(compilerOptions.out) + ".d.ts"; // Global out file - declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(jsFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, + declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(jsFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); referencePathsOutput += "/// " + newLine; } @@ -26191,7 +26191,7 @@ var ts; // If sourceroot option: Use the relative path corresponding to the common directory path // otherwise source locations relative to map file location var sourcesDirectoryPath = compilerOptions.sourceRoot ? host.getCommonSourceDirectory() : sourceMapDir; - sourceMapData.sourceMapSources.push(ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, node.fileName, host.getCurrentDirectory(), host.getCanonicalFileName, + sourceMapData.sourceMapSources.push(ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, node.fileName, host.getCurrentDirectory(), host.getCanonicalFileName, /*isAbsolutePathAnUrl*/ true)); sourceMapSourceIndex = sourceMapData.sourceMapSources.length - 1; // The one that can be used from program to get the actual source file @@ -26342,7 +26342,7 @@ var ts; if (!ts.isRootedDiskPath(sourceMapDir) && !ts.isUrl(sourceMapDir)) { // The relative paths are relative to the common directory sourceMapDir = ts.combinePaths(host.getCommonSourceDirectory(), sourceMapDir); - sourceMapData.jsSourceMappingURL = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizePath(jsFilePath)), ts.combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL), host.getCurrentDirectory(), host.getCanonicalFileName, + sourceMapData.jsSourceMappingURL = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizePath(jsFilePath)), ts.combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL), host.getCurrentDirectory(), host.getCanonicalFileName, /*isAbsolutePathAnUrl*/ true); } else { @@ -26759,7 +26759,7 @@ var ts; } else if (node.kind === 129 /* ComputedPropertyName */) { // if this is a decorated computed property, we will need to capture the result - // of the property expression so that we can apply decorators later. This is to ensure + // of the property expression so that we can apply decorators later. This is to ensure // we don't introduce unintended side effects: // // class C { @@ -27059,7 +27059,7 @@ var ts; write("]"); } else { - emitListWithSpread(elements, true, (node.flags & 512 /* MultiLine */) !== 0, + emitListWithSpread(elements, true, (node.flags & 512 /* MultiLine */) !== 0, /*trailingComma*/ elements.hasTrailingComma, true); } } @@ -27326,8 +27326,8 @@ var ts; } return false; } - // Returns 'true' if the code was actually indented, false otherwise. - // If the code is not indented, an optional valueToWriteWhenNotIndenting will be + // Returns 'true' if the code was actually indented, false otherwise. + // If the code is not indented, an optional valueToWriteWhenNotIndenting will be // emitted instead. function indentIfOnDifferentLines(parent, node1, node2, valueToWriteWhenNotIndenting) { var realNodesAreOnDifferentLines = !ts.nodeIsSynthesized(parent) && !nodeEndIsOnSameLineAsNodeStart(node1, node2); @@ -27706,7 +27706,7 @@ var ts; emit(node.whenFalse); decreaseIndentIf(indentedBeforeColon, indentedAfterColon); } - // Helper function to decrease the indent if we previously indented. Allows multiple + // Helper function to decrease the indent if we previously indented. Allows multiple // previous indent values to be considered at a time. This also allows caller to just // call this once, passing in all their appropriate indent values, instead of needing // to call this helper function multiple times. @@ -28748,7 +28748,7 @@ var ts; emitSignatureParameters(node); } if (!node.body) { - // There can be no body when there are parse errors. Just emit an empty block + // There can be no body when there are parse errors. Just emit an empty block // in that case. write(" { }"); } @@ -28776,7 +28776,7 @@ var ts; emitDownLevelExpressionFunctionBody(node, body); return; } - // For es6 and higher we can emit the expression as is. However, in the case + // For es6 and higher we can emit the expression as is. However, in the case // where the expression might end up looking like a block when emitted, we'll // also wrap it in parentheses first. For example if you have: a => {} // then we need to generate: a => ({}) @@ -29253,9 +29253,9 @@ var ts; } } // If the class has static properties, and it's a class expression, then we'll need - // to specialize the emit a bit. for a class expression of the form: + // to specialize the emit a bit. for a class expression of the form: // - // class C { static a = 1; static b = 2; ... } + // class C { static a = 1; static b = 2; ... } // // We'll emit: // @@ -29517,7 +29517,7 @@ var ts; // // The emit for a method is: // - // Object.defineProperty(C.prototype, "method", + // Object.defineProperty(C.prototype, "method", // __decorate([ // dec, // __param(0, dec2), @@ -29525,10 +29525,10 @@ var ts; // __metadata("design:paramtypes", [Object]), // __metadata("design:returntype", void 0) // ], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); - // + // // The emit for an accessor is: // - // Object.defineProperty(C.prototype, "accessor", + // Object.defineProperty(C.prototype, "accessor", // __decorate([ // dec // ], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); @@ -29610,7 +29610,7 @@ var ts; } function shouldEmitTypeMetadata(node) { // This method determines whether to emit the "design:type" metadata based on the node's kind. - // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata + // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata // compiler option is set. switch (node.kind) { case 136 /* MethodDeclaration */: @@ -29623,7 +29623,7 @@ var ts; } function shouldEmitReturnTypeMetadata(node) { // This method determines whether to emit the "design:returntype" metadata based on the node's kind. - // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata + // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata // compiler option is set. switch (node.kind) { case 136 /* MethodDeclaration */: @@ -29633,7 +29633,7 @@ var ts; } function shouldEmitParamTypesMetadata(node) { // This method determines whether to emit the "design:paramtypes" metadata based on the node's kind. - // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata + // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata // compiler option is set. switch (node.kind) { case 204 /* ClassDeclaration */: @@ -30386,7 +30386,7 @@ var ts; } function writeExportedName(node) { // do not record default exports - // they are local to module and never overwritten (explicitly skipped) by star export + // they are local to module and never overwritten (explicitly skipped) by star export if (node.kind !== 65 /* Identifier */ && node.flags & 256 /* Default */) { return; } @@ -30408,7 +30408,7 @@ var ts; } } function processTopLevelVariableAndFunctionDeclarations(node) { - // per ES6 spec: + // per ES6 spec: // 15.2.1.16.4 ModuleDeclarationInstantiation() Concrete Method // - var declarations are initialized to undefined - 14.a.ii // - function/generator declarations are instantiated - 16.a.iv @@ -30540,7 +30540,7 @@ var ts; // hoist variable if // - it is not block scoped // - it is top level block scoped - // if block scoped variables are nested in some another block then + // if block scoped variables are nested in some another block then // no other functions can use them except ones that are defined at least in the same block return (ts.getCombinedNodeFlags(node) & 12288 /* BlockScoped */) === 0 || ts.getEnclosingBlockScopeContainer(node).kind === 230 /* SourceFile */; @@ -30724,10 +30724,10 @@ var ts; // System modules has the following shape // System.register(['dep-1', ... 'dep-n'], function(exports) {/* module body function */}) // 'exports' here is a function 'exports(name: string, value: T): T' that is used to publish exported values. - // 'exports' returns its 'value' argument so in most cases expressions + // 'exports' returns its 'value' argument so in most cases expressions // that mutate exported values can be rewritten as: - // expr -> exports('name', expr). - // The only exception in this rule is postfix unary operators, + // expr -> exports('name', expr). + // The only exception in this rule is postfix unary operators, // see comment to 'emitPostfixUnaryExpression' for more details ts.Debug.assert(!exportFunctionForFile); // make sure that name of 'exports' function does not conflict with existing identifiers @@ -30769,8 +30769,8 @@ var ts; // factory function. var unaliasedModuleNames = []; // names of modules with no corresponding parameters in // factory function. - var importAliasNames = []; // names of the parameters in the factory function; these - // parameters need to match the indexes of the corresponding + var importAliasNames = []; // names of the parameters in the factory function; these + // parameters need to match the indexes of the corresponding // module names in aliasedModuleNames. // Fill in amd-dependency tags for (var _a = 0, _b = node.amdDependencies; _a < _b.length; _a++) { @@ -30863,7 +30863,7 @@ var ts; emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); emitTempDeclarations(true); - // Emit exportDefault if it exists will happen as part + // Emit exportDefault if it exists will happen as part // or normal statement emit. } function emitExportEquals(emitAsReturn) { @@ -30993,7 +30993,7 @@ var ts; // emitting the module as well. return shouldEmitEnumDeclaration(node); } - // If this is the expression body of an arrow function that we're down-leveling, + // If this is the expression body of an arrow function that we're down-leveling, // then we don't want to emit comments when we emit the body. It will have already // been taken care of when we emitted the 'return' statement for the function // expression body. @@ -31719,7 +31719,7 @@ var ts; } else if (node.kind === 208 /* ModuleDeclaration */ && node.name.kind === 8 /* StringLiteral */ && (node.flags & 2 /* Ambient */ || ts.isDeclarationFile(file))) { // TypeScript 1.0 spec (April 2014): 12.1.6 - // An AmbientExternalModuleDeclaration declares an external module. + // An AmbientExternalModuleDeclaration declares an external module. // This type of declaration is permitted only in the global module. // The StringLiteral must specify a top - level external module name. // Relative external module names are not permitted @@ -31730,7 +31730,7 @@ var ts; var moduleName = nameLiteral.text; if (moduleName) { // TypeScript 1.0 spec (April 2014): 12.1.6 - // An ExternalImportDeclaration in anAmbientExternalModuleDeclaration may reference other external modules + // An ExternalImportDeclaration in anAmbientExternalModuleDeclaration may reference other external modules // only through top - level external module names. Relative external module names are not permitted. var searchName = ts.normalizePath(ts.combinePaths(basePath, moduleName)); ts.forEach(ts.supportedExtensions, function (extension) { return findModuleSourceFile(searchName + extension, nameLiteral); }); @@ -31848,7 +31848,7 @@ var ts; } } else if (firstExternalModuleSourceFile && languageVersion < 2 /* ES6 */ && !options.module) { - // We cannot use createDiagnosticFromNode because nodes do not have parents yet + // We cannot use createDiagnosticFromNode because nodes do not have parents yet var span = ts.getErrorSpanForNode(firstExternalModuleSourceFile, firstExternalModuleSourceFile.externalModuleIndicator); diagnostics.add(ts.createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, ts.Diagnostics.Cannot_compile_modules_unless_the_module_flag_is_provided)); } @@ -31871,7 +31871,7 @@ var ts; commonSourceDirectory = computeCommonSourceDirectory(files); } if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== ts.directorySeparator) { - // Make sure directory path ends with directory separator so this string can directly + // Make sure directory path ends with directory separator so this string can directly // used to replace with "" to get the relative path of the source file and the relative path doesn't // start with / making it rooted path commonSourceDirectory += ts.directorySeparator; @@ -32477,14 +32477,14 @@ var ts; function getNavigateToItems(program, cancellationToken, searchValue, maxResultCount) { var patternMatcher = ts.createPatternMatcher(searchValue); var rawItems = []; - // Search the declarations in all files and output matched NavigateToItem into array of NavigateToItem[] + // Search the declarations in all files and output matched NavigateToItem into array of NavigateToItem[] ts.forEach(program.getSourceFiles(), function (sourceFile) { cancellationToken.throwIfCancellationRequested(); var nameToDeclarations = sourceFile.getNamedDeclarations(); for (var name_27 in nameToDeclarations) { var declarations = ts.getProperty(nameToDeclarations, name_27); if (declarations) { - // First do a quick check to see if the name of the declaration matches the + // First do a quick check to see if the name of the declaration matches the // last portion of the (possibly) dotted name they're searching for. var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_27); if (!matches) { @@ -32492,7 +32492,7 @@ var ts; } for (var _i = 0; _i < declarations.length; _i++) { var declaration = declarations[_i]; - // It was a match! If the pattern has dots in it, then also see if the + // It was a match! If the pattern has dots in it, then also see if the // declaration container matches as well. if (patternMatcher.patternContainsDots) { var containers = getContainers(declaration); @@ -32794,8 +32794,8 @@ var ts; } function isTopLevelFunctionDeclaration(functionDeclaration) { if (functionDeclaration.kind === 203 /* FunctionDeclaration */) { - // A function declaration is 'top level' if it contains any function declarations - // within it. + // A function declaration is 'top level' if it contains any function declarations + // within it. if (functionDeclaration.body && functionDeclaration.body.kind === 182 /* Block */) { // Proper function declarations can only have identifier names if (ts.forEach(functionDeclaration.body.statements, function (s) { return s.kind === 203 /* FunctionDeclaration */ && !isEmpty(s.name.text); })) { @@ -33076,8 +33076,8 @@ var ts; } function createPatternMatcher(pattern) { // We'll often see the same candidate string many times when searching (For example, when - // we see the name of a module that is used everywhere, or the name of an overload). As - // such, we cache the information we compute about the candidate for the life of this + // we see the name of a module that is used everywhere, or the name of an overload). As + // such, we cache the information we compute about the candidate for the life of this // pattern matcher so we don't have to compute it multiple times. var stringToWordSpans = {}; pattern = pattern.trim(); @@ -33160,7 +33160,7 @@ var ts; if (index > 0) { // c) If the part is entirely lowercase, then check if it is contained anywhere in the // candidate in a case insensitive manner. If so, return that there was a substring - // match. + // match. // // Note: We only have a substring match if the lowercase part is prefix match of some // word part. That way we don't match something like 'Class' when the user types 'a'. @@ -33169,7 +33169,7 @@ var ts; for (var _i = 0; _i < wordSpans.length; _i++) { var span = wordSpans[_i]; if (partStartsWith(candidate, span, chunk.text, true)) { - return createPatternMatch(PatternMatchKind.substring, punctuationStripped, + return createPatternMatch(PatternMatchKind.substring, punctuationStripped, /*isCaseSensitive:*/ partStartsWith(candidate, span, chunk.text, false)); } } @@ -33200,8 +33200,8 @@ var ts; if (isLowercase) { // f) Is the pattern a substring of the candidate starting on one of the candidate's word boundaries? // We could check every character boundary start of the candidate for the pattern. However, that's - // an m * n operation in the wost case. Instead, find the first instance of the pattern - // substring, and see if it starts on a capital letter. It seems unlikely that the user will try to + // an m * n operation in the wost case. Instead, find the first instance of the pattern + // substring, and see if it starts on a capital letter. It seems unlikely that the user will try to // filter the list based on a substring that starts on a capital letter and also with a lowercase one. // (Pattern: fogbar, Candidate: quuxfogbarFogBar). if (chunk.text.length < candidate.length) { @@ -33253,7 +33253,7 @@ var ts; // // c) If the word is entirely lowercase, then check if it is contained anywhere in the // candidate in a case insensitive manner. If so, return that there was a substring - // match. + // match. // // Note: We only have a substring match if the lowercase part is prefix match of // some word part. That way we don't match something like 'Class' when the user @@ -33267,7 +33267,7 @@ var ts; // e) If the word was not entirely lowercase, then attempt a camel cased match as // well. // - // f) The word is all lower case. Is it a case insensitive substring of the candidate starting + // f) The word is all lower case. Is it a case insensitive substring of the candidate starting // on a part boundary of the candidate? // // Only if all words have some sort of match is the pattern considered matched. @@ -33317,7 +33317,7 @@ var ts; // Note: we may have more pattern parts than candidate parts. This is because multiple // pattern parts may match a candidate part. For example "SiUI" against "SimpleUI". // We'll have 3 pattern parts Si/U/I against two candidate parts Simple/UI. However, U - // and I will both match in UI. + // and I will both match in UI. var currentCandidate = 0; var currentChunkSpan = 0; var firstMatch = undefined; @@ -33346,13 +33346,13 @@ var ts; // Consider the case of matching SiUI against SimpleUIElement. The candidate parts // will be Simple/UI/Element, and the pattern parts will be Si/U/I. We'll match 'Si' // against 'Simple' first. Then we'll match 'U' against 'UI'. However, we want to - // still keep matching pattern parts against that candidate part. + // still keep matching pattern parts against that candidate part. for (; currentChunkSpan < chunkCharacterSpans.length; currentChunkSpan++) { var chunkCharacterSpan = chunkCharacterSpans[currentChunkSpan]; if (gotOneMatchThisCandidate) { // We've already gotten one pattern part match in this candidate. We will // only continue trying to consumer pattern parts if the last part and this - // part are both upper case. + // part are both upper case. if (!isUpperCaseLetter(chunk.text.charCodeAt(chunkCharacterSpans[currentChunkSpan - 1].start)) || !isUpperCaseLetter(chunk.text.charCodeAt(chunkCharacterSpans[currentChunkSpan].start))) { break; @@ -33384,9 +33384,9 @@ var ts; ts.createPatternMatcher = createPatternMatcher; // Helper function to compare two matches to determine which is better. Matches are first // ordered by kind (so all prefix matches always beat all substring matches). Then, if the - // match is a camel case match, the relative weights of the match are used to determine - // which is better (with a greater weight being better). Then if the match is of the same - // type, then a case sensitive match is considered better than an insensitive one. + // match is a camel case match, the relative weights of the match are used to determine + // which is better (with a greater weight being better). Then if the match is of the same + // type, then a case sensitive match is considered better than an insensitive one. function patternMatchCompareTo(match1, match2) { return compareType(match1, match2) || compareCamelCase(match1, match2) || @@ -33436,7 +33436,7 @@ var ts; if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 2 /* Latest */)) { return false; } - // TODO: find a way to determine this for any unicode characters in a + // TODO: find a way to determine this for any unicode characters in a // non-allocating manner. var str = String.fromCharCode(ch); return str === str.toUpperCase(); @@ -33449,7 +33449,7 @@ var ts; if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 2 /* Latest */)) { return false; } - // TODO: find a way to determine this for any unicode characters in a + // TODO: find a way to determine this for any unicode characters in a // non-allocating manner. var str = String.fromCharCode(ch); return str === str.toLowerCase(); @@ -33498,7 +33498,7 @@ var ts; if (ch < 127 /* maxAsciiCharacter */) { return ch; } - // TODO: find a way to compute this for any unicode characters in a + // TODO: find a way to compute this for any unicode characters in a // non-allocating manner. return String.fromCharCode(ch).toLowerCase().charCodeAt(0); } @@ -33649,7 +33649,7 @@ var ts; var currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index)); // See if the casing indicates we're starting a new word. Note: if we're breaking on // words, then just seeing an upper case character isn't enough. Instead, it has to - // be uppercase and the previous character can't be uppercase. + // be uppercase and the previous character can't be uppercase. // // For example, breaking "AddMetadata" on words would make: Add Metadata // @@ -33673,9 +33673,9 @@ var ts; var SignatureHelp; (function (SignatureHelp) { // A partially written generic type expression is not guaranteed to have the correct syntax tree. the expression could be parsed as less than/greater than expression or a comma expression - // or some other combination depending on what the user has typed so far. For the purposes of signature help we need to consider any location after "<" as a possible generic type reference. - // To do this, the method will back parse the expression starting at the position required. it will try to parse the current expression as a generic type expression, if it did succeed it - // will return the generic identifier that started the expression (e.g. "foo" in "foo'. So, in the case where the last child is a comma, we increase the // arg count by one to compensate. // - // Note: this subtlety only applies to the last comma. If you had "Foo(a,," then - // we'll have: 'a' '' '' + // Note: this subtlety only applies to the last comma. If you had "Foo(a,," then + // we'll have: 'a' '' '' // That will give us 2 non-commas. We then add one for the last comma, givin us an // arg count of 3. var listChildren = argumentsList.getChildren(); @@ -34524,7 +34524,7 @@ var ts; var children = n.getChildren(); for (var _i = 0; _i < children.length; _i++) { var child = children[_i]; - var shouldDiveInChildNode = + var shouldDiveInChildNode = // previous token is enclosed somewhere in the child (child.pos <= previousToken.pos && child.end > previousToken.end) || // previous token ends exactly at the beginning of child @@ -34569,7 +34569,7 @@ var ts; } } ts.Debug.assert(startNode !== undefined || n.kind === 230 /* SourceFile */); - // Here we know that none of child token nodes embrace the position, + // Here we know that none of child token nodes embrace the position, // the only known case is when position is at the end of the file. // Try to find the rightmost token in the file without filtering. // Namely we are skipping the check: 'position < node.end' @@ -35031,9 +35031,9 @@ var ts; var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); return startPos < endPos && current !== 1 /* EndOfFileToken */ && !ts.isTrivia(current); } - // when containing node in the tree is token + // when containing node in the tree is token // but its kind differs from the kind that was returned by the scanner, - // then kind needs to be fixed. This might happen in cases + // then kind needs to be fixed. This might happen in cases // when parser interprets token differently, i.e keyword treated as identifier function fixTokenKind(tokenInfo, container) { if (ts.isToken(container) && tokenInfo.token.kind !== container.kind) { @@ -35555,17 +35555,17 @@ var ts; Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) { //// This check is mainly used inside SpaceBeforeOpenBraceInControl and SpaceBeforeOpenBraceInFunction. //// - //// Ex: + //// Ex: //// if (1) { .... //// * ) and { are on the same line so apply the rule. Here we don't care whether it's same or multi block context //// - //// Ex: + //// Ex: //// if (1) //// { ... } //// * ) and { are on differnet lines. We only need to format if the block is multiline context. So in this case we don't format. //// //// Ex: - //// if (1) + //// if (1) //// { ... //// } //// * ) and { are on differnet lines. We only need to format if the block is multiline context. So in this case we format. @@ -35841,9 +35841,9 @@ var ts; //// 4- Context rules with any token combination //// 5- Non-context rules with specific token combination //// 6- Non-context rules with any token combination - //// + //// //// The member rulesInsertionIndexBitmap is used to describe the number of rules - //// in each sub-bucket (above) hence can be used to know the index of where to insert + //// in each sub-bucket (above) hence can be used to know the index of where to insert //// the next rule. It's a bitmap which contains 6 different sections each is given 5 bits. //// //// Example: @@ -36037,7 +36037,7 @@ var ts; /// /// /// -/// +/// /// /* @internal */ var ts; @@ -36191,9 +36191,9 @@ var ts; } function findOutermostParent(position, expectedTokenKind, sourceFile) { var precedingToken = ts.findPrecedingToken(position, sourceFile); - // when it is claimed that trigger character was typed at given position + // when it is claimed that trigger character was typed at given position // we verify that there is a token with a matching kind whose end is equal to position (because the character was just typed). - // If this condition is not hold - then trigger character was typed in some other context, + // If this condition is not hold - then trigger character was typed in some other context, // i.e.in comment and thus should not trigger autoformatting if (!precedingToken || precedingToken.kind !== expectedTokenKind || @@ -36202,12 +36202,12 @@ var ts; } // walk up and search for the parent node that ends at the same position with precedingToken. // for cases like this - // + // // let x = 1; // while (true) { - // } + // } // after typing close curly in while statement we want to reformat just the while statement. - // However if we just walk upwards searching for the parent that has the same end value - + // However if we just walk upwards searching for the parent that has the same end value - // we'll end up with the whole source file. isListElement allows to stop on the list element level var current = precedingToken; while (current && @@ -36272,7 +36272,7 @@ var ts; // 'index' tracks the index of the most recent error that was checked. while (true) { if (index >= sorted.length) { - // all errors in the range were already checked -> no error in specified range + // all errors in the range were already checked -> no error in specified range return false; } var error = sorted[index]; @@ -36400,9 +36400,9 @@ var ts; var indentation = inheritedIndentation; if (indentation === -1 /* Unknown */) { if (isSomeBlock(node.kind)) { - // blocks should be indented in + // blocks should be indented in // - other blocks - // - source file + // - source file // - switch\default clauses if (isSomeBlock(parent.kind) || parent.kind === 230 /* SourceFile */ || @@ -36523,12 +36523,12 @@ var ts; // a useful observations when tracking context node // / // [a] - // / | \ + // / | \ // [b] [c] [d] - // node 'a' is a context node for nodes 'b', 'c', 'd' + // node 'a' is a context node for nodes 'b', 'c', 'd' // except for the leftmost leaf token in [b] - in this case context node ('e') is located somewhere above 'a' // this rule can be applied recursively to child nodes of 'a'. - // + // // context node is set to parent node value after processing every child node // context node is set to parent of the token after processing every token var childContextNode = contextNode; @@ -36630,7 +36630,7 @@ var ts; var tokenInfo = formattingScanner.readTokenInfo(parent); // consume the list end token only if it is still belong to the parent // there might be the case when current token matches end token but does not considered as one - // function (x: function) <-- + // function (x: function) <-- // without this check close paren will be interpreted as list end token for function expression which is wrong if (tokenInfo.token.kind === listEndToken && ts.rangeContainsRange(parent, tokenInfo.token)) { // consume list end token @@ -36747,7 +36747,7 @@ var ts; applyRuleEdits(rule, previousItem, previousStartLine, currentItem, currentStartLine); if (rule.Operation.Action & (2 /* Space */ | 8 /* Delete */) && currentStartLine !== previousStartLine) { lineAdded = false; - // Handle the case where the next line is moved to be the end of this line. + // Handle the case where the next line is moved to be the end of this line. // In this case we don't indent the next line in the next pass. if (currentParent.getStart(sourceFile) === currentItem.pos) { dynamicIndentation.recomputeIndentation(false); @@ -36755,7 +36755,7 @@ var ts; } else if (rule.Operation.Action & 4 /* NewLine */ && currentStartLine === previousStartLine) { lineAdded = true; - // Handle the case where token2 is moved to the new line. + // Handle the case where token2 is moved to the new line. // In this case we indent token2 in the next pass but we set // sameLineIndent flag to notify the indenter that the indentation is within the line. if (currentParent.getStart(sourceFile) === currentItem.pos) { @@ -37573,10 +37573,10 @@ var ts; var jsDocCommentParts = []; ts.forEach(declarations, function (declaration, indexOfDeclaration) { // Make sure we are collecting doc comment from declaration once, - // In case of union property there might be same declaration multiple times + // In case of union property there might be same declaration multiple times // which only varies in type parameter // Eg. let a: Array | Array; a.length - // The property length will have two declarations of property length coming + // The property length will have two declarations of property length coming // from Array - Array and Array if (ts.indexOf(declarations, declaration) === indexOfDeclaration) { var sourceFileOfDeclaration = ts.getSourceFileOfNode(declaration); @@ -37611,7 +37611,7 @@ var ts; return ts.map(ts.getJsDocComments(node, sourceFile), function (jsDocComment) { return { pos: jsDocComment.pos + "/*".length, - end: jsDocComment.end - "*/".length // Trim off comment end indicator + end: jsDocComment.end - "*/".length // Trim off comment end indicator }; }); } @@ -37713,7 +37713,7 @@ var ts; if (isParamTag(pos, end, sourceFile)) { var blankLineCount = 0; var recordedParamTag = false; - // Consume leading spaces + // Consume leading spaces pos = consumeWhiteSpaces(pos + paramTag.length); if (pos >= end) { break; @@ -37763,7 +37763,7 @@ var ts; var firstLineParamHelpStringPos = pos; while (pos < end) { var ch = sourceFile.text.charCodeAt(pos); - // at line break, set this comment line text and go to next line + // at line break, set this comment line text and go to next line if (ts.isLineBreak(ch)) { if (paramHelpString) { pushDocCommentLineText(paramDocComments, paramHelpString, blankLineCount); @@ -37816,7 +37816,7 @@ var ts; if (paramHelpStringMargin === undefined) { paramHelpStringMargin = sourceFile.getLineAndCharacterOfPosition(firstLineParamHelpStringPos).character; } - // Now consume white spaces max + // Now consume white spaces max var startOfLinePos = pos; pos = consumeWhiteSpacesOnTheLine(pos, end, sourceFile, paramHelpStringMargin); if (pos >= end) { @@ -37886,8 +37886,8 @@ var ts; }; SignatureObject.prototype.getDocumentationComment = function () { if (this.documentationComment === undefined) { - this.documentationComment = this.declaration ? getJsDocCommentsFromDeclarations([this.declaration], - /*name*/ undefined, + this.documentationComment = this.declaration ? getJsDocCommentsFromDeclarations([this.declaration], + /*name*/ undefined, /*canUseParsedParamTagComments*/ false) : []; } return this.documentationComment; @@ -38294,8 +38294,8 @@ var ts; return CancellationTokenObject; })(); ts.CancellationTokenObject = CancellationTokenObject; - // Cache host information about scrip Should be refreshed - // at each language service public entry point, since we don't know when + // Cache host information about scrip Should be refreshed + // at each language service public entry point, since we don't know when // set of scripts handled by the host changes. var HostCache = (function () { function HostCache(host, getCanonicalFileName) { @@ -38408,7 +38408,7 @@ var ts; options.isolatedModules = true; // Filename can be non-ts file. options.allowNonTsExtensions = true; - // We are not returning a sourceFile for lib file when asked by the program, + // We are not returning a sourceFile for lib file when asked by the program, // so pass --noLib to avoid reporting a file not found error. options.noLib = true; // We are not doing a full typecheck, we are not resolving the whole context, @@ -38461,7 +38461,7 @@ var ts; ts.createLanguageServiceSourceFile = createLanguageServiceSourceFile; ts.disableIncrementalParsing = false; function updateLanguageServiceSourceFile(sourceFile, scriptSnapshot, version, textChangeRange, aggressiveChecks) { - // If we were given a text change range, and our version or open-ness changed, then + // If we were given a text change range, and our version or open-ness changed, then // incrementally parse this file. if (textChangeRange) { if (version !== sourceFile.version) { @@ -38565,7 +38565,7 @@ var ts; bucket.set(fileName, entry); } else { - // We have an entry for this file. However, it may be for a different version of + // We have an entry for this file. However, it may be for a different version of // the script snapshot. If so, update it appropriately. Otherwise, we can just // return it as is. if (entry.sourceFile.version !== version) { @@ -39020,10 +39020,10 @@ var ts; if (programUpToDate()) { return; } - // IMPORTANT - It is critical from this moment onward that we do not check + // IMPORTANT - It is critical from this moment onward that we do not check // cancellation tokens. We are about to mutate source files from a previous program // instance. If we cancel midway through, we may end up in an inconsistent state where - // the program points to old source files that have been invalidated because of + // the program points to old source files that have been invalidated because of // incremental parsing. var oldSettings = program && program.getCompilerOptions(); var newSettings = hostCache.compilationSettings(); @@ -39039,7 +39039,7 @@ var ts; writeFile: function (fileName, data, writeByteOrderMark) { }, getCurrentDirectory: function () { return host.getCurrentDirectory(); } }); - // Release any files we have acquired in the old program but are + // Release any files we have acquired in the old program but are // not part of the new program. if (program) { var oldSourceFiles = program.getSourceFiles(); @@ -39055,7 +39055,7 @@ var ts; // It needs to be cleared to allow all collected snapshots to be released hostCache = undefined; program = newProgram; - // Make sure all the nodes in the program are both bound, and have their parent + // Make sure all the nodes in the program are both bound, and have their parent // pointers set property. program.getTypeChecker(); return; @@ -39075,7 +39075,7 @@ var ts; // Check if the old program had this file already var oldSourceFile = program && program.getSourceFile(fileName); if (oldSourceFile) { - // We already had a source file for this file name. Go to the registry to + // We already had a source file for this file name. Go to the registry to // ensure that we get the right up to date version of it. We need this to // address the following 'race'. Specifically, say we have the following: // @@ -39086,15 +39086,15 @@ var ts; // LS2 // // Each LS has a reference to file 'foo.ts' at version 1. LS2 then updates - // it's version of 'foo.ts' to version 2. This will cause LS2 and the - // DocumentRegistry to have version 2 of the document. HOwever, LS1 will + // it's version of 'foo.ts' to version 2. This will cause LS2 and the + // DocumentRegistry to have version 2 of the document. HOwever, LS1 will // have version 1. And *importantly* this source file will be *corrupt*. // The act of creating version 2 of the file irrevocably damages the version // 1 file. // // So, later when we call into LS1, we need to make sure that it doesn't use // it's source file any more, and instead defers to DocumentRegistry to get - // either version 1, version 2 (or some other version) depending on what the + // either version 1, version 2 (or some other version) depending on what the // host says should be used. return documentRegistry.updateDocument(fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version); } @@ -39153,7 +39153,7 @@ var ts; synchronizeHostData(); var targetSourceFile = getValidSourceFile(fileName); // For JavaScript files, we don't want to report the normal typescript semantic errors. - // Instead, we just report errors for using TypeScript-only constructs from within a + // Instead, we just report errors for using TypeScript-only constructs from within a // JavaScript file. if (ts.isJavaScript(fileName)) { return getJavaScriptSemanticDiagnostics(targetSourceFile); @@ -39398,8 +39398,8 @@ var ts; log("Returning an empty list because completion was requested in an invalid position."); return undefined; } - // Find the node where completion is requested on, in the case of a completion after - // a dot, it is the member access expression other wise, it is a request for all + // Find the node where completion is requested on, in the case of a completion after + // a dot, it is the member access expression other wise, it is a request for all // visible symbols in the scope, and the node is the current location. var node = currentToken; var isRightOfDot = false; @@ -39463,7 +39463,7 @@ var ts; } } if (isJavaScriptFile && type.flags & 16384 /* Union */) { - // In javascript files, for union types, we don't just get the members that + // In javascript files, for union types, we don't just get the members that // the individual types have in common, we also include all the members that // each individual type has. This is because we're going to add all identifiers // anyways. So we might as well elevate the members that were at least part @@ -39522,10 +39522,10 @@ var ts; // aggregating completion candidates. This is achieved in 'getScopeNode' // by finding the first node that encompasses a position, accounting for whether a node // is "complete" to decide whether a position belongs to the node. - // + // // However, at the end of an identifier, we are interested in the scope of the identifier // itself, but fall outside of the identifier. For instance: - // + // // xyz => x$ // // the cursor is outside of both the 'x' and the arrow function 'xyz => x', @@ -39574,7 +39574,7 @@ var ts; } function showCompletionsInImportsClause(node) { if (node) { - // import {| + // import {| // import {a,| if (node.kind === 14 /* OpenBraceToken */ || node.kind === 23 /* CommaToken */) { return node.parent.kind === 215 /* NamedImports */; @@ -39860,17 +39860,17 @@ var ts; return entries; } function createCompletionEntry(symbol, location) { - // Try to get a valid display name for this symbol, if we could not find one, then ignore it. + // Try to get a valid display name for this symbol, if we could not find one, then ignore it. // We would like to only show things that can be added after a dot, so for instance numeric properties can // not be accessed with a dot (a.1 <- invalid) var displayName = getCompletionEntryDisplayNameForSymbol(symbol, program.getCompilerOptions().target, true); if (!displayName) { return undefined; } - // TODO(drosen): Right now we just permit *all* semantic meanings when calling - // 'getSymbolKind' which is permissible given that it is backwards compatible; but + // TODO(drosen): Right now we just permit *all* semantic meanings when calling + // 'getSymbolKind' which is permissible given that it is backwards compatible; but // really we should consider passing the meaning for the node so that we don't report - // that a suggestion for a value is an interface. We COULD also just do what + // that a suggestion for a value is an interface. We COULD also just do what // 'getSymbolModifiers' does, which is to use the first declaration. // Use a 'sortText' of 0' so that all symbol completion entries come before any other // entries (like JavaScript identifier entries). @@ -39910,8 +39910,8 @@ var ts; var symbols = completionData.symbols, location_2 = completionData.location; // Find the symbol with the matching entry name. var target = program.getCompilerOptions().target; - // We don't need to perform character checks here because we're only comparing the - // name against 'entryName' (which is known to be good), not building a new + // We don't need to perform character checks here because we're only comparing the + // name against 'entryName' (which is known to be good), not building a new // completion entry. var symbol = ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(s, target, false) === entryName ? s : undefined; }); if (symbol) { @@ -40005,7 +40005,7 @@ var ts; ts.Debug.assert(!!(rootSymbolFlags & 8192 /* Method */)); }); if (!unionPropertyKind) { - // If this was union of all methods, + // If this was union of all methods, //make sure it has call signatures before we can label it as method var typeOfUnionProperty = typeChecker.getTypeOfSymbolAtLocation(symbol, location); if (typeOfUnionProperty.getCallSignatures().length) { @@ -40068,7 +40068,7 @@ var ts; var useConstructSignatures = callExpression.kind === 161 /* NewExpression */ || callExpression.expression.kind === 91 /* SuperKeyword */; var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (!ts.contains(allSignatures, signature.target || signature)) { - // Get the first signature if there + // Get the first signature if there signature = allSignatures.length ? allSignatures[0] : undefined; } if (signature) { @@ -40411,7 +40411,7 @@ var ts; var containerName = containerSymbol ? typeChecker.symbolToString(containerSymbol, node) : ""; if (!tryAddConstructSignature(symbol, node, symbolKind, symbolName, containerName, result) && !tryAddCallSignature(symbol, node, symbolKind, symbolName, containerName, result)) { - // Just add all the declarations. + // Just add all the declarations. ts.forEach(declarations, function (declaration) { result.push(createDefinitionInfo(declaration, symbolKind, symbolName, containerName)); }); @@ -40506,7 +40506,7 @@ var ts; } // Because name in short-hand property assignment has two different meanings: property name and property value, // using go-to-definition at such position should go to the variable declaration of the property value rather than - // go to the declaration of the property name (in this case stay at the same position). However, if go-to-definition + // go to the declaration of the property name (in this case stay at the same position). However, if go-to-definition // is performed at the location of property access, we would like to go to definition of the property in the short-hand // assignment. This case and others are handled by the following code. if (node.parent.kind === 228 /* ShorthandPropertyAssignment */) { @@ -40557,7 +40557,7 @@ var ts; var results = getOccurrencesAtPositionCore(fileName, position); if (results) { var sourceFile = getCanonicalFileName(ts.normalizeSlashes(fileName)); - // Get occurrences only supports reporting occurrences for the file queried. So + // Get occurrences only supports reporting occurrences for the file queried. So // filter down to that list. results = ts.filter(results, function (r) { return getCanonicalFileName(ts.normalizeSlashes(r.fileName)) === sourceFile; }); } @@ -40677,7 +40677,7 @@ var ts; case 66 /* BreakKeyword */: case 71 /* ContinueKeyword */: if (hasKind(node.parent, 193 /* BreakStatement */) || hasKind(node.parent, 192 /* ContinueStatement */)) { - return getBreakOrContinueStatementOccurences(node.parent); + return getBreakOrContinueStatementOccurrences(node.parent); } break; case 82 /* ForKeyword */: @@ -40942,7 +40942,7 @@ var ts; }); return ts.map(keywords, getHighlightSpanForNode); } - function getBreakOrContinueStatementOccurences(breakOrContinueStatement) { + function getBreakOrContinueStatementOccurrences(breakOrContinueStatement) { var owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { @@ -41329,12 +41329,12 @@ var ts; // If we are past the end, stop looking if (position > end) break; - // We found a match. Make sure it's not part of a larger word (i.e. the char + // We found a match. Make sure it's not part of a larger word (i.e. the char // before and after it have to be a non-identifier char). var endPosition = position + symbolNameLength; if ((position === 0 || !ts.isIdentifierPart(text.charCodeAt(position - 1), 2 /* Latest */)) && (endPosition === sourceLength || !ts.isIdentifierPart(text.charCodeAt(endPosition), 2 /* Latest */))) { - // Found a real match. Keep searching. + // Found a real match. Keep searching. positions.push(position); } position = text.indexOf(symbolName, position + symbolNameLength + 1); @@ -41405,7 +41405,7 @@ var ts; cancellationToken.throwIfCancellationRequested(); var referenceLocation = ts.getTouchingPropertyName(sourceFile, position); if (!isValidReferencePosition(referenceLocation, searchText)) { - // This wasn't the start of a token. Check to see if it might be a + // This wasn't the start of a token. Check to see if it might be a // match in a comment or string if that's what the caller is asking // for. if ((findInStrings && isInString(position)) || @@ -41697,7 +41697,7 @@ var ts; return aliasedSymbol; } } - // If the reference location is in an object literal, try to get the contextual type for the + // If the reference location is in an object literal, try to get the contextual type for the // object literal, lookup the property symbol in the contextual type, and use this symbol to // compare to our searchSymbol if (isNameOfPropertyAssignment(referenceLocation)) { @@ -41712,7 +41712,7 @@ var ts; if (searchSymbols.indexOf(rootSymbol) >= 0) { return rootSymbol; } - // Finally, try all properties with the same name in any type the containing type extended or implemented, and + // Finally, try all properties with the same name in any type the containing type extended or implemented, and // see if any is in the list if (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */)) { var result_3 = []; @@ -42009,7 +42009,7 @@ var ts; } else if (isNameOfModuleDeclaration(nodeForStartPos)) { // If this is name of a module declarations, check if this is right side of dotted module name - // If parent of the module declaration which is parent of this node is module declaration and its body is the module declaration that this node is name of + // If parent of the module declaration which is parent of this node is module declaration and its body is the module declaration that this node is name of // Then this name is name from dotted module if (nodeForStartPos.parent.parent.kind === 208 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { @@ -42227,7 +42227,7 @@ var ts; for (var _i = 0, _a = docComment.tags; _i < _a.length; _i++) { var tag = _a[_i]; // As we walk through each tag, classify the portion of text from the end of - // the last tag (or the start of the entire doc comment) as 'comment'. + // the last tag (or the start of the entire doc comment) as 'comment'. if (tag.pos !== pos) { pushCommentRange(pos, tag.pos - pos); } @@ -42279,7 +42279,7 @@ var ts; } } function classifyDisabledMergeCode(text, start, end) { - // Classify the line that the ======= marker is on as a comment. Then just lex + // Classify the line that the ======= marker is on as a comment. Then just lex // all further tokens and add them to the result. for (var i = start; i < end; i++) { if (ts.isLineBreak(text.charCodeAt(i))) { @@ -42310,7 +42310,7 @@ var ts; } } } - // for accurate classification, the actual token should be passed in. however, for + // for accurate classification, the actual token should be passed in. however, for // cases like 'disabled merge code' classification, we just get the token kind and // classify based on that instead. function classifyTokenType(tokenKind, token) { @@ -42495,11 +42495,11 @@ var ts; return []; } function getTodoComments(fileName, descriptors) { - // Note: while getting todo comments seems like a syntactic operation, we actually + // Note: while getting todo comments seems like a syntactic operation, we actually // treat it as a semantic operation here. This is because we expect our host to call // this on every single file. If we treat this syntactically, then that will cause // us to populate and throw away the tree in our syntax tree cache for each file. By - // treating this as a semantic operation, we can access any tree without throwing + // treating this as a semantic operation, we can access any tree without throwing // anything away. synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); @@ -42523,7 +42523,7 @@ var ts; // 0) The full match for the entire regexp. // 1) The preamble to the message portion. // 2) The message portion. - // 3...N) The descriptor that was matched - by index. 'undefined' for each + // 3...N) The descriptor that was matched - by index. 'undefined' for each // descriptor that didn't match. an actual value if it did match. // // i.e. 'undefined' in position 3 above means TODO(jason) didn't match. @@ -42545,7 +42545,7 @@ var ts; } } ts.Debug.assert(descriptor !== undefined); - // We don't want to match something like 'TODOBY', so we make sure a non + // We don't want to match something like 'TODOBY', so we make sure a non // letter/digit follows the match. if (isLetterOrDigit(fileContents.charCodeAt(matchPosition + descriptor.text.length))) { continue; @@ -42590,10 +42590,10 @@ var ts; // (?:(TODO\(jason\))|(HACK)) // // Note that the outermost group is *not* a capture group, but the innermost groups - // *are* capture groups. By capturing the inner literals we can determine after + // *are* capture groups. By capturing the inner literals we can determine after // matching which descriptor we are dealing with. var literals = "(?:" + ts.map(descriptors, function (d) { return "(" + escapeRegExp(d.text) + ")"; }).join("|") + ")"; - // After matching a descriptor literal, the following regexp matches the rest of the + // After matching a descriptor literal, the following regexp matches the rest of the // text up to the end of the line (or */). var endOfLineOrEndOfComment = /(?:$|\*\/)/.source; var messageRemainder = /(?:.*?)/.source; @@ -42753,7 +42753,7 @@ var ts; var scanner = ts.createScanner(2 /* Latest */, false); /// We do not have a full parser support to know when we should parse a regex or not /// If we consider every slash token to be a regex, we could be missing cases like "1/2/3", where - /// we have a series of divide operator. this list allows us to be more accurate by ruling out + /// we have a series of divide operator. this list allows us to be more accurate by ruling out /// locations where a regexp cannot exist. var noRegexTable = []; noRegexTable[65 /* Identifier */] = true; @@ -42796,7 +42796,7 @@ var ts; keyword2 === 122 /* SetKeyword */ || keyword2 === 114 /* ConstructorKeyword */ || keyword2 === 109 /* StaticKeyword */) { - // Allow things like "public get", "public constructor" and "public static". + // Allow things like "public get", "public constructor" and "public static". // These are all legal. return true; } @@ -42913,12 +42913,12 @@ var ts; // token. So the classification will go back to being an identifier. The moment the user // types again, number will become a keyword, then an identifier, etc. etc. // - // To try to avoid this problem, we avoid classifying contextual keywords as keywords + // To try to avoid this problem, we avoid classifying contextual keywords as keywords // when the user is potentially typing something generic. We just can't do a good enough // job at the lexical level, and so well leave it up to the syntactic classifier to make // the determination. // - // In order to determine if the user is potentially typing something generic, we use a + // In order to determine if the user is potentially typing something generic, we use a // weak heuristic where we track < and > tokens. It's a weak heuristic, but should // work well enough in practice. var angleBracketStack = 0; @@ -42934,7 +42934,7 @@ var ts; token = 65 /* Identifier */; } else if (isKeyword(lastNonTriviaToken) && isKeyword(token) && !canFollow(lastNonTriviaToken, token)) { - // We have two keywords in a row. Only treat the second as a keyword if + // We have two keywords in a row. Only treat the second as a keyword if // it's a sequence that could legally occur in the language. Otherwise // treat it as an identifier. This way, if someone writes "private var" // we recognize that 'var' is actually an identifier here. @@ -42942,7 +42942,7 @@ var ts; } else if (lastNonTriviaToken === 65 /* Identifier */ && token === 24 /* LessThanToken */) { - // Could be the start of something generic. Keep track of that by bumping + // Could be the start of something generic. Keep track of that by bumping // up the current count of generic contexts we may be in. angleBracketStack++; } @@ -42957,7 +42957,7 @@ var ts; token === 113 /* BooleanKeyword */ || token === 124 /* SymbolKeyword */) { if (angleBracketStack > 0 && !syntacticClassifierAbsent) { - // If it looks like we're could be in something generic, don't classify this + // If it looks like we're could be in something generic, don't classify this // as a keyword. We may just get overwritten by the syntactic classifier, // causing a noisy experience for the user. token = 65 /* Identifier */; @@ -43052,8 +43052,8 @@ var ts; return; } if (start === 0 && offset > 0) { - // We're classifying the first token, and this was a case where we prepended - // text. We should consider the start of this token to be at the start of + // We're classifying the first token, and this was a case where we prepended + // text. We should consider the start of this token to be at the start of // the original text. start += offset; } @@ -43200,7 +43200,7 @@ var ts; } initializeServices(); })(ts || (ts = {})); -// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. +// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// /* @internal */ @@ -43221,8 +43221,8 @@ var ts; if (sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getStart()).line > lineOfPosition) { // Get previous token if the token is returned starts on new line // eg: let x =10; |--- cursor is here - // let y = 10; - // token at position will return let keyword on second line as the token but we would like to use + // let y = 10; + // token at position will return let keyword on second line as the token but we would like to use // token on same line if trailing trivia (comments or white spaces on same line) part of the last token on that line tokenAtLocation = ts.findPrecedingToken(tokenAtLocation.pos, sourceFile); // Its a blank line diff --git a/src/typings/electron.d.ts b/src/typings/electron.d.ts index 05aab3a81619f..156e175b1d501 100644 --- a/src/typings/electron.d.ts +++ b/src/typings/electron.d.ts @@ -584,7 +584,7 @@ declare namespace Electron { /** * ok - Nothing went wrong. - * error - One or more errors occured, enable runtime logging to figure out the likely cause. + * error - One or more errors occurred, enable runtime logging to figure out the likely cause. * invalidSeparatorError - An attempt was made to add a separator to a custom category in the Jump List. * Separators are only allowed in the standard Tasks category. * fileTypeRegistrationError - An attempt was made to add a file link to the Jump List diff --git a/src/vs/base/common/errorMessage.ts b/src/vs/base/common/errorMessage.ts index 9f5ed7fda90d0..3c882cba2299c 100644 --- a/src/vs/base/common/errorMessage.ts +++ b/src/vs/base/common/errorMessage.ts @@ -165,7 +165,7 @@ function detectSystemErrorMessage(exception: any): string { // See https://nodejs.org/api/errors.html#errors_class_system_error if (typeof exception.code === 'string' && typeof exception.errno === 'number' && typeof exception.syscall === 'string') { - return nls.localize('nodeExceptionMessage', "A system error occured ({0})", exception.message); + return nls.localize('nodeExceptionMessage', "A system error occurred ({0})", exception.message); } return exception.message; diff --git a/src/vs/base/common/marked/raw.marked.js b/src/vs/base/common/marked/raw.marked.js index ce02369727acb..589c066b34e8d 100644 --- a/src/vs/base/common/marked/raw.marked.js +++ b/src/vs/base/common/marked/raw.marked.js @@ -1213,7 +1213,7 @@ function marked(src, opt, callback) { } catch (e) { e.message += '\nPlease report this to https://github.com/chjj/marked.'; if ((opt || marked.defaults).silent) { - return '

      An error occured:

      '
      +      return '

      An error occurred:

      '
               + escape(e.message + '', true)
               + '
      '; } diff --git a/src/vs/editor/browser/controller/mouseHandler.ts b/src/vs/editor/browser/controller/mouseHandler.ts index cc44acdd62d3f..60ff6e4d650c5 100644 --- a/src/vs/editor/browser/controller/mouseHandler.ts +++ b/src/vs/editor/browser/controller/mouseHandler.ts @@ -185,7 +185,7 @@ export class MouseHandler extends ViewEventHandler { } let actualMouseMoveTime = e.timestamp; if (actualMouseMoveTime < this.lastMouseLeaveTime) { - // Due to throttling, this event occured before the mouse left the editor, therefore ignore it. + // Due to throttling, this event occurred before the mouse left the editor, therefore ignore it. return; } diff --git a/src/vs/editor/browser/standalone/standaloneLanguages.ts b/src/vs/editor/browser/standalone/standaloneLanguages.ts index 0750a1db0a9db..654a43b5f0e0c 100644 --- a/src/vs/editor/browser/standalone/standaloneLanguages.ts +++ b/src/vs/editor/browser/standalone/standaloneLanguages.ts @@ -290,7 +290,7 @@ export function registerDocumentSymbolProvider(languageId: string, provider: mod } /** - * Register a document highlight provider (used by e.g. highlight occurences). + * Register a document highlight provider (used by e.g. highlight occurrences). */ export function registerDocumentHighlightProvider(languageId: string, provider: modes.DocumentHighlightProvider): IDisposable { return modes.DocumentHighlightProviderRegistry.register(languageId, provider); diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index 6abac0a543e8a..7793fe670ce2c 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -239,7 +239,7 @@ export class TypeOperations { const selection = selections[i]; if (!selection.isEmpty()) { // looks like https://github.com/Microsoft/vscode/issues/2773 - // where a cursor operation occured before a canceled composition + // where a cursor operation occurred before a canceled composition // => ignore composition commands[i] = null; continue; diff --git a/src/vs/editor/contrib/find/common/findController.ts b/src/vs/editor/contrib/find/common/findController.ts index a5dae70a8dcdf..b1195ab30f407 100644 --- a/src/vs/editor/contrib/find/common/findController.ts +++ b/src/vs/editor/contrib/find/common/findController.ts @@ -862,7 +862,7 @@ export class SelectHighlightsAction extends AbstractSelectHighlightsAction { constructor() { super({ id: 'editor.action.selectHighlights', - label: nls.localize('selectAllOccurencesOfFindMatch', "Select All Occurrences of Find Match"), + label: nls.localize('selectAllOccurrencesOfFindMatch', "Select All Occurrences of Find Match"), alias: 'Select All Occurrences of Find Match', precondition: null, kbOpts: { @@ -1005,10 +1005,10 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd return null; } - const hasFindOccurences = DocumentHighlightProviderRegistry.has(model); + const hasFindOccurrences = DocumentHighlightProviderRegistry.has(model); if (r.currentMatch) { // This is an empty selection - if (hasFindOccurences) { + if (hasFindOccurrences) { // Do not interfere with semantic word highlighting in the no selection case return null; } @@ -1070,7 +1070,7 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd } const model = this.editor.getModel(); - const hasFindOccurences = DocumentHighlightProviderRegistry.has(model); + const hasFindOccurrences = DocumentHighlightProviderRegistry.has(model); let allMatches = model.findMatches(this.state.searchText, true, false, this.state.matchCase, this.state.wordSeparators, false).map(m => m.range); allMatches.sort(Range.compareRangesUsingStarts); @@ -1108,7 +1108,7 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd return { range: r, // Show in overviewRuler only if model has no semantic highlighting - options: (hasFindOccurences ? SelectionHighlighter._SELECTION_HIGHLIGHT : SelectionHighlighter._SELECTION_HIGHLIGHT_OVERVIEW) + options: (hasFindOccurrences ? SelectionHighlighter._SELECTION_HIGHLIGHT : SelectionHighlighter._SELECTION_HIGHLIGHT_OVERVIEW) }; }); diff --git a/src/vs/editor/contrib/find/test/common/findController.test.ts b/src/vs/editor/contrib/find/test/common/findController.test.ts index aa2fb4de23db8..20559f5713bb1 100644 --- a/src/vs/editor/contrib/find/test/common/findController.test.ts +++ b/src/vs/editor/contrib/find/test/common/findController.test.ts @@ -215,7 +215,7 @@ suite('FindController', () => { }); }); - test('issue #5400: "Select All Occurences of Find Match" does not select all if find uses regex', () => { + test('issue #5400: "Select All Occurrences of Find Match" does not select all if find uses regex', () => { withMockCodeEditor([ 'something', 'someething', diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index c50fc2e0c4318..0e82f55cca308 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -58,7 +58,7 @@ const decoration = { }), }; -class LinkOccurence { +class LinkOccurrence { public static decoration(link: Link, useMetaKey: boolean): editorCommon.IModelDeltaDecoration { return { @@ -68,7 +68,7 @@ class LinkOccurence { endLineNumber: link.range.endLineNumber, endColumn: link.range.endColumn }, - options: LinkOccurence._getOptions(useMetaKey, false) + options: LinkOccurrence._getOptions(useMetaKey, false) }; } @@ -88,11 +88,11 @@ class LinkOccurence { } public activate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor, useMetaKey: boolean): void { - changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(useMetaKey, true)); + changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurrence._getOptions(useMetaKey, true)); } public deactivate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor, useMetaKey: boolean): void { - changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(useMetaKey, false)); + changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurrence._getOptions(useMetaKey, false)); } } @@ -115,7 +115,7 @@ class LinkDetector implements editorCommon.IEditorContribution { private openerService: IOpenerService; private messageService: IMessageService; private editorWorkerService: IEditorWorkerService; - private currentOccurences: { [decorationId: string]: LinkOccurence; }; + private currentOccurrences: { [decorationId: string]: LinkOccurrence; }; constructor( editor: ICodeEditor, @@ -148,7 +148,7 @@ class LinkDetector implements editorCommon.IEditorContribution { this.timeoutPromise = null; this.computePromise = null; - this.currentOccurences = {}; + this.currentOccurrences = {}; this.activeLinkDecorationId = null; this.beginCompute(); } @@ -162,7 +162,7 @@ class LinkDetector implements editorCommon.IEditorContribution { } private onModelChanged(): void { - this.currentOccurences = {}; + this.currentOccurrences = {}; this.activeLinkDecorationId = null; this.stop(); this.beginCompute(); @@ -202,10 +202,10 @@ class LinkDetector implements editorCommon.IEditorContribution { const useMetaKey = (this.editor.getConfiguration().multiCursorModifier === 'altKey'); this.editor.changeDecorations((changeAccessor: editorCommon.IModelDecorationsChangeAccessor) => { var oldDecorations: string[] = []; - let keys = Object.keys(this.currentOccurences); + let keys = Object.keys(this.currentOccurrences); for (let i = 0, len = keys.length; i < len; i++) { let decorationId = keys[i]; - let occurance = this.currentOccurences[decorationId]; + let occurance = this.currentOccurrences[decorationId]; oldDecorations.push(occurance.decorationId); } @@ -213,17 +213,17 @@ class LinkDetector implements editorCommon.IEditorContribution { if (links) { // Not sure why this is sometimes null for (var i = 0; i < links.length; i++) { - newDecorations.push(LinkOccurence.decoration(links[i], useMetaKey)); + newDecorations.push(LinkOccurrence.decoration(links[i], useMetaKey)); } } var decorations = changeAccessor.deltaDecorations(oldDecorations, newDecorations); - this.currentOccurences = {}; + this.currentOccurrences = {}; this.activeLinkDecorationId = null; for (let i = 0, len = decorations.length; i < len; i++) { - var occurance = new LinkOccurence(links[i], decorations[i]); - this.currentOccurences[occurance.decorationId] = occurance; + var occurance = new LinkOccurrence(links[i], decorations[i]); + this.currentOccurrences[occurance.decorationId] = occurance; } }); } @@ -232,11 +232,11 @@ class LinkDetector implements editorCommon.IEditorContribution { const useMetaKey = (this.editor.getConfiguration().multiCursorModifier === 'altKey'); if (this.isEnabled(mouseEvent, withKey)) { this.cleanUpActiveLinkDecoration(); // always remove previous link decoration as their can only be one - var occurence = this.getLinkOccurence(mouseEvent.target.position); - if (occurence) { + var occurrence = this.getLinkOccurrence(mouseEvent.target.position); + if (occurrence) { this.editor.changeDecorations((changeAccessor) => { - occurence.activate(changeAccessor, useMetaKey); - this.activeLinkDecorationId = occurence.decorationId; + occurrence.activate(changeAccessor, useMetaKey); + this.activeLinkDecorationId = occurrence.decorationId; }); } } else { @@ -247,10 +247,10 @@ class LinkDetector implements editorCommon.IEditorContribution { private cleanUpActiveLinkDecoration(): void { const useMetaKey = (this.editor.getConfiguration().multiCursorModifier === 'altKey'); if (this.activeLinkDecorationId) { - var occurence = this.currentOccurences[this.activeLinkDecorationId]; - if (occurence) { + var occurrence = this.currentOccurrences[this.activeLinkDecorationId]; + if (occurrence) { this.editor.changeDecorations((changeAccessor) => { - occurence.deactivate(changeAccessor, useMetaKey); + occurrence.deactivate(changeAccessor, useMetaKey); }); } @@ -262,20 +262,20 @@ class LinkDetector implements editorCommon.IEditorContribution { if (!this.isEnabled(mouseEvent)) { return; } - var occurence = this.getLinkOccurence(mouseEvent.target.position); - if (!occurence) { + var occurrence = this.getLinkOccurrence(mouseEvent.target.position); + if (!occurrence) { return; } - this.openLinkOccurence(occurence, mouseEvent.hasSideBySideModifier); + this.openLinkOccurrence(occurrence, mouseEvent.hasSideBySideModifier); } - public openLinkOccurence(occurence: LinkOccurence, openToSide: boolean): void { + public openLinkOccurrence(occurrence: LinkOccurrence, openToSide: boolean): void { if (!this.openerService) { return; } - const { link } = occurence; + const { link } = occurrence; link.resolve().then(uri => { // open the uri @@ -293,7 +293,7 @@ class LinkDetector implements editorCommon.IEditorContribution { }).done(null, onUnexpectedError); } - public getLinkOccurence(position: Position): LinkOccurence { + public getLinkOccurrence(position: Position): LinkOccurrence { var decorations = this.editor.getModel().getDecorationsInRange({ startLineNumber: position.lineNumber, startColumn: position.column, @@ -303,9 +303,9 @@ class LinkDetector implements editorCommon.IEditorContribution { for (var i = 0; i < decorations.length; i++) { var decoration = decorations[i]; - var currentOccurence = this.currentOccurences[decoration.id]; - if (currentOccurence) { - return currentOccurence; + var currentOccurrence = this.currentOccurrences[decoration.id]; + if (currentOccurrence) { + return currentOccurrence; } } @@ -354,9 +354,9 @@ class OpenLinkAction extends EditorAction { return; } - let link = linkDetector.getLinkOccurence(editor.getPosition()); + let link = linkDetector.getLinkOccurrence(editor.getPosition()); if (link) { - linkDetector.openLinkOccurence(link, false); + linkDetector.openLinkOccurrence(link, false); } } } diff --git a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts index 0aa87cb728251..52b6d50d1511c 100644 --- a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts +++ b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts @@ -188,8 +188,8 @@ class WordHighlighter { } // All the effort below is trying to achieve this: - // - when cursor is moved to a word, trigger immediately a findOccurences request - // - 250ms later after the last cursor move event, render the occurences + // - when cursor is moved to a word, trigger immediately a findOccurrences request + // - 250ms later after the last cursor move event, render the occurrences // - no flickering! var currentWordRange = new Range(lineNumber, word.startColumn, lineNumber, word.endColumn); diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index cdb3e52fee3d4..1f0ec636fd9a5 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -3954,7 +3954,7 @@ declare module monaco.languages { export function registerDocumentSymbolProvider(languageId: string, provider: DocumentSymbolProvider): IDisposable; /** - * Register a document highlight provider (used by e.g. highlight occurences). + * Register a document highlight provider (used by e.g. highlight occurrences). */ export function registerDocumentHighlightProvider(languageId: string, provider: DocumentHighlightProvider): IDisposable; diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index 94d4d0295ddf9..099b40f2dbf25 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -191,7 +191,7 @@ export enum FileChangeType { export interface IFileChange { /** - * The type of change that occured to the file. + * The type of change that occurred to the file. */ type: FileChangeType; diff --git a/src/vs/platform/search/common/replace.ts b/src/vs/platform/search/common/replace.ts index e57e23c103435..647b5d51a0d11 100644 --- a/src/vs/platform/search/common/replace.ts +++ b/src/vs/platform/search/common/replace.ts @@ -175,7 +175,7 @@ export class ReplacePattern { } if (substrFrom === 0) { - // no replacement occured + // no replacement occurred return; } diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index b450e6538e630..0066f0146f619 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -145,7 +145,7 @@ export function createApiFactory( console.warn('Edits from command ' + id + ' were not applied.'); } }, (err) => { - console.warn('An error occured while running command ' + id, err); + console.warn('An error occurred while running command ' + id, err); }); }); }, diff --git a/src/vs/workbench/services/configurationResolver/node/configurationResolverService.ts b/src/vs/workbench/services/configurationResolver/node/configurationResolverService.ts index 3caa6312379fd..7dcd63979b092 100644 --- a/src/vs/workbench/services/configurationResolver/node/configurationResolverService.ts +++ b/src/vs/workbench/services/configurationResolver/node/configurationResolverService.ts @@ -214,7 +214,7 @@ export class ConfigurationResolverService implements IConfigurationResolverServi } // We need a map from interactive variables to keys because we only want to trigger an command once per key - - // even though it might occure multiple times in configuration #7026. + // even though it might occur multiple times in configuration #7026. const interactiveVariablesToSubstitutes: { [interactiveVariable: string]: { object: any, key: string }[] } = {}; const findInteractiveVariables = (object: any) => { Object.keys(object).forEach(key => { From 354042ac2ac6f2efffa43f6fa5bf6ac49335ebf5 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 12 Jun 2017 15:27:13 -0700 Subject: [PATCH 1739/2747] :lipstick: --- .../electron-browser/terminalActions.ts | 1 - .../electron-browser/terminalInstance.ts | 19 ++++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts index 1c7a798b747e3..6ead524b144dd 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts @@ -581,6 +581,5 @@ export class RenameTerminalAction extends Action { terminalInstance.setTitle(name); } }); - } } diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 2909a27648329..abf9d69364d9e 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -62,7 +62,6 @@ export class TerminalInstance implements ITerminalInstance { private _isDisposed: boolean; private _onDisposed: Emitter; private _onDataForApi: Emitter<{ instance: ITerminalInstance, data: string }>; - private _onMessageTitleCheck: (message: any) => void; private _onProcessIdReady: Emitter; private _onTitleChanged: Emitter; private _process: cp.ChildProcess; @@ -77,6 +76,7 @@ export class TerminalInstance implements ITerminalInstance { private _terminalHasTextContextKey: IContextKey; private _cols: number; private _rows: number; + private _messageTitleListener: (message: { type: string, content: string }) => void; private _widgetManager: TerminalWidgetManager; private _linkHandler: TerminalLinkHandler; @@ -495,13 +495,13 @@ export class TerminalInstance implements ITerminalInstance { }); if (!shell.name) { // Only listen for process title changes when a name is not provided - this._onMessageTitleCheck = (message) => { + this._messageTitleListener = (message) => { if (message.type === 'title') { this._title = message.content ? message.content : ''; this._onTitleChanged.fire(this._title); } }; - this._process.on('message', this._onMessageTitleCheck); + this._process.on('message', this._messageTitleListener); } this._process.on('message', (message) => { if (message.type === 'pid') { @@ -782,15 +782,16 @@ export class TerminalInstance implements ITerminalInstance { } public setTitle(title: string): void { - const oldTitle = this._title; - if (title !== oldTitle) { - this._title = title; + const didTitleChange = title !== this._title; + if (didTitleChange) { this._onTitleChanged.fire(title); } - // if the title is set via API, unregister the handler that automatically updates the terminal name - if (this._process) { - this._process.removeListener('message', this._onMessageTitleCheck); + // If the title was not set by the API, unregister the handler that + // automatically updates the terminal name + if (this._process && this._messageTitleListener) { + this._process.removeListener('message', this._messageTitleListener); + this._messageTitleListener = null; } } } From 01fa0b83e90bd454ada93e4a0cb439db474c5ac2 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 12 Jun 2017 15:27:37 -0700 Subject: [PATCH 1740/2747] Fixing cancellation errors for TS. Fixes #28501 --- extensions/typescript/src/typescriptServiceClient.ts | 8 ++++++-- extensions/typescript/src/utils/electron.ts | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 6d60443762633..0afd4d6d4913e 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -497,7 +497,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient args.push('--enableTelemetry'); } if (this.apiVersion.has222Features()) { - this.cancellationPipeName = electron.getPipeName(`tscancellation-${electron.makeRandomHexString(20)}`); + this.cancellationPipeName = electron.getTempFile(`tscancellation-${electron.makeRandomHexString(20)}`); args.push('--cancellationPipeName', this.cancellationPipeName + '*'); } @@ -947,7 +947,11 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient if (this.apiVersion.has222Features() && this.cancellationPipeName) { this.tracer.logTrace(`TypeScript Service: trying to cancel ongoing request with sequence number ${seq}`); - fs.writeFileSync(this.cancellationPipeName + seq, ''); + try { + fs.writeFileSync(this.cancellationPipeName + seq, ''); + } catch (e) { + // noop + } return true; } diff --git a/extensions/typescript/src/utils/electron.ts b/extensions/typescript/src/utils/electron.ts index 4418ca51dbd36..46ad56c464abb 100644 --- a/extensions/typescript/src/utils/electron.ts +++ b/extensions/typescript/src/utils/electron.ts @@ -27,8 +27,7 @@ export function makeRandomHexString(length: number): string { function generatePipeName(): string { return getPipeName(makeRandomHexString(40)); } - -export function getPipeName(name: string): string { +function getPipeName(name: string): string { const fullName = 'vscode-' + name; if (process.platform === 'win32') { return '\\\\.\\pipe\\' + fullName + '-sock'; @@ -38,6 +37,11 @@ export function getPipeName(name: string): string { return path.join(os.tmpdir(), fullName + '.sock'); } +export function getTempFile(name: string): string { + const fullName = 'vscode-' + name; + return path.join(os.tmpdir(), fullName + '.sock'); +} + function generatePatchedEnv(env: any, stdInPipeName: string, stdOutPipeName: string, stdErrPipeName: string): any { // Set the two unique pipe names and the electron flag as process env From 66eddd98fa38ee1bd66ad8f12ef35e9ff1c7d409 Mon Sep 17 00:00:00 2001 From: t-amqi Date: Mon, 12 Jun 2017 15:52:45 -0700 Subject: [PATCH 1741/2747] Address review changes --- src/vs/code/electron-main/menus.ts | 2 +- src/vs/workbench/parts/quickopen/browser/commandsHandler.ts | 5 +---- .../parts/quickopen/browser/quickopen.contribution.ts | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index e9cec735992a3..fe2206f6a363d 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -586,7 +586,7 @@ export class CodeMenu { const output = this.createMenuItem(nls.localize({ key: 'miToggleOutput', comment: ['&& denotes a mnemonic'] }, "&&Output"), 'workbench.action.output.toggleOutput'); const debugConsole = this.createMenuItem(nls.localize({ key: 'miToggleDebugConsole', comment: ['&& denotes a mnemonic'] }, "De&&bug Console"), 'workbench.debug.action.toggleRepl'); const integratedTerminal = this.createMenuItem(nls.localize({ key: 'miToggleIntegratedTerminal', comment: ['&& denotes a mnemonic'] }, "&&Integrated Terminal"), 'workbench.action.terminal.toggleTerminal'); - const taskMenu = this.createMenuItem(nls.localize({ key: 'miShowTask', comment: ['&& denotes a mnemonic'] }, "&&Show Tasks..."), 'workbench.action.showTasks'); + const taskMenu = this.createMenuItem(nls.localize({ key: 'miShowTask', comment: ['&& denotes a mnemonic'] }, "Show Tas&&ks..."), 'workbench.action.showTasks'); const problems = this.createMenuItem(nls.localize({ key: 'miMarker', comment: ['&& denotes a mnemonic'] }, "&&Problems"), 'workbench.actions.view.problems'); let additionalViewlets: Electron.MenuItem; diff --git a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts index aee3eb1b14094..21076a5084e09 100644 --- a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts @@ -164,10 +164,7 @@ export class ShowTasksAction extends Action { } public run(context?: any): TPromise { - let value = ALL_COMMANDS_PREFIX; - let taskStr = 'tasks'; - value = `${value}${taskStr}`; - + const value = `${ALL_COMMANDS_PREFIX}tasks`; this.quickOpenService.show(value); return TPromise.as(null); diff --git a/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts b/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts index d70aae56491a2..e46b5cd843234 100644 --- a/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts +++ b/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts @@ -41,7 +41,7 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenViewPickerAct }), 'Quick Open View'); registry.registerWorkbenchAction(new SyncActionDescriptor(ShowTasksAction, ShowTasksAction.ID, ShowTasksAction.LABEL, { - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_T + primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_T }), 'Show Task Menu'); // Register Quick Open Handler From 1c522e434945ed97aab8031c50015ccec8f774d8 Mon Sep 17 00:00:00 2001 From: t-amqi Date: Mon, 12 Jun 2017 16:16:35 -0700 Subject: [PATCH 1742/2747] Found better place for memento --- .../parts/tasks/electron-browser/task.contribution.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 349ce3fe297ef..881c338f4c75a 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -610,9 +610,6 @@ class TaskService extends EventEmitter implements ITaskService { private registerCommands(): void { CommandsRegistry.registerCommand('workbench.action.tasks.runTask', (accessor, arg) => { - if (!this.storageService.get('userRanTask', StorageScope.GLOBAL)) { - this.storageService.store('userRanTask', true, StorageScope.GLOBAL); - } this.runTaskCommand(accessor, arg); }); @@ -923,6 +920,9 @@ class TaskService extends EventEmitter implements ITaskService { } private executeTask(task: Task, resolver: ITaskResolver): TPromise { + if (!this.storageService.get('userRanTask', StorageScope.GLOBAL)) { + this.storageService.store('userRanTask', true, StorageScope.GLOBAL); + } return ProblemMatcherRegistry.onReady().then(() => { return this.textFileService.saveAll().then((value) => { // make sure all dirty files are saved let executeResult = this.getTaskSystem().run(task, resolver); From fe8ea995bd766177574b704df1c723ad55237b8e Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 12 Jun 2017 16:15:50 -0700 Subject: [PATCH 1743/2747] Cleaning up html renderer --- src/vs/base/browser/htmlContentRenderer.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/base/browser/htmlContentRenderer.ts b/src/vs/base/browser/htmlContentRenderer.ts index 638afe7f41f96..2b6cc38e2b0f9 100644 --- a/src/vs/base/browser/htmlContentRenderer.ts +++ b/src/vs/base/browser/htmlContentRenderer.ts @@ -134,6 +134,9 @@ function _renderHtml(content: IHTMLContentElement, options: RenderOptions = {}): } title = removeMarkdownEscapes(title); href = removeMarkdownEscapes(href); + if (href && !href.match(/^http:|https:|file:|mailto:/i)) { + return text; + } return `${text}`; }; renderer.paragraph = (text): string => { From 762ea4d2898d579a6183ac916c0b5efb319c13ae Mon Sep 17 00:00:00 2001 From: t-amqi Date: Mon, 12 Jun 2017 16:56:53 -0700 Subject: [PATCH 1744/2747] Addresses changes --- .../parts/tasks/electron-browser/task.contribution.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 881c338f4c75a..f4d4872c6d975 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -518,6 +518,7 @@ class TaskService extends EventEmitter implements ITaskService { // private static autoDetectTelemetryName: string = 'taskServer.autoDetect'; private static RecentlyUsedTasks_Key = 'workbench.tasks.recentlyUsedTasks'; + private static RanTaskBefore_Key = 'workbench.tasks.ranTaskBefore'; public _serviceBrand: any; public static SERVICE_ID: string = 'taskService'; @@ -920,8 +921,8 @@ class TaskService extends EventEmitter implements ITaskService { } private executeTask(task: Task, resolver: ITaskResolver): TPromise { - if (!this.storageService.get('userRanTask', StorageScope.GLOBAL)) { - this.storageService.store('userRanTask', true, StorageScope.GLOBAL); + if (!this.storageService.get(TaskService.RanTaskBefore_Key, StorageScope.GLOBAL)) { + this.storageService.store(TaskService.RanTaskBefore_Key, true, StorageScope.GLOBAL); } return ProblemMatcherRegistry.onReady().then(() => { return this.textFileService.saveAll().then((value) => { // make sure all dirty files are saved From d52e5881115c1b1d3de223ae2f13aac181ac1710 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 12 Jun 2017 17:11:15 -0700 Subject: [PATCH 1745/2747] Fix reloading TSServer not updating diagnostics Fixes #25412 --- .../typescript/src/features/bufferSyncSupport.ts | 12 +++++++----- extensions/typescript/src/typescriptMain.ts | 4 ++++ extensions/typescript/src/typescriptService.ts | 2 ++ extensions/typescript/src/typescriptServiceClient.ts | 12 ++++++++++-- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/extensions/typescript/src/features/bufferSyncSupport.ts b/extensions/typescript/src/features/bufferSyncSupport.ts index 7fcf7103e34b5..05dbefb4a1a99 100644 --- a/extensions/typescript/src/features/bufferSyncSupport.ts +++ b/extensions/typescript/src/features/bufferSyncSupport.ts @@ -257,11 +257,13 @@ export default class BufferSyncSupport { } } - let args: Proto.GeterrRequestArgs = { - delay: 0, - files: files - }; - this.client.execute('geterr', args, false); + if (files.length) { + const args: Proto.GeterrRequestArgs = { + delay: 0, + files: files + }; + this.client.execute('geterr', args, false); + } this.pendingDiagnostics = Object.create(null); } diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 67e04f4df2eaa..9f0eed23e1794 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -507,6 +507,10 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { this.languagePerId[description.id] = manager; } }); + + this.client.onTsServerStarted(() => { + this.triggerAllDiagnostics(); + }); } public dispose(): void { diff --git a/extensions/typescript/src/typescriptService.ts b/extensions/typescript/src/typescriptService.ts index d18e531b57271..1b545fef0ace8 100644 --- a/extensions/typescript/src/typescriptService.ts +++ b/extensions/typescript/src/typescriptService.ts @@ -76,6 +76,8 @@ export interface ITypescriptServiceClient { warn(message: string, data?: any): void; + onTsServerStarted: Event; + onProjectLanguageServiceStateChanged: Event; onDidBeginInstallTypings: Event; onDidEndInstallTypings: Event; diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 0afd4d6d4913e..212d7cb3b13c5 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -245,6 +245,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private requestQueue: RequestQueue; private callbacks: CallbackMap; + private readonly _onTsServerStarted = new EventEmitter(); private readonly _onProjectLanguageServiceStateChanged = new EventEmitter(); private readonly _onDidBeginInstallTypings = new EventEmitter(); private readonly _onDidEndInstallTypings = new EventEmitter(); @@ -319,6 +320,10 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } } + get onTsServerStarted(): Event { + return this._onTsServerStarted.event; + } + get onProjectLanguageServiceStateChanged(): Event { return this._onProjectLanguageServiceStateChanged.event; } @@ -572,6 +577,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this._onReady.resolve(); resolve(childProcess); + this._onTsServerStarted.fire(); + this.serviceStarted(resendModels); }); } catch (error) { @@ -922,7 +929,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient } private sendRequest(requestItem: RequestItem): void { - let serverRequest = requestItem.request; + const serverRequest = requestItem.request; this.tracer.traceRequest(serverRequest, !!requestItem.callbacks, this.requestQueue.length); if (requestItem.callbacks) { this.callbacks.add(serverRequest.seq, requestItem.callbacks); @@ -930,7 +937,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.service() .then((childProcess) => { childProcess.stdin.write(JSON.stringify(serverRequest) + '\r\n', 'utf8'); - }).then(undefined, err => { + }) + .then(undefined, err => { const callback = this.callbacks.fetch(serverRequest.seq); if (callback) { callback.e(err); From 8959af85808c469ec3e09929b1b29728f9b93dd2 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 12 Jun 2017 17:16:55 -0700 Subject: [PATCH 1746/2747] Use real map for languagePerId --- extensions/typescript/src/typescriptMain.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 9f0eed23e1794..085e48bb40b63 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -448,7 +448,7 @@ class LanguageProvider { class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { private client: TypeScriptServiceClient; private languages: LanguageProvider[] = []; - private languagePerId: ObjectMap; + private languagePerId: Map; private readonly disposables: Disposable[] = []; private readonly versionStatus: VersionStatus; @@ -476,12 +476,12 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { this.disposables.push(this.versionStatus); this.client = new TypeScriptServiceClient(this, workspaceState, this.versionStatus, plugins, this.disposables); - this.languagePerId = Object.create(null); + this.languagePerId = new Map(); for (const description of descriptions) { const manager = new LanguageProvider(this.client, description); this.languages.push(manager); this.disposables.push(manager); - this.languagePerId[description.id] = manager; + this.languagePerId.set(description.id, manager); } this.client.onReady().then(() => { @@ -504,7 +504,7 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { const manager = new LanguageProvider(this.client, description); this.languages.push(manager); this.disposables.push(manager); - this.languagePerId[description.id] = manager; + this.languagePerId.set(description.id, manager); } }); @@ -615,13 +615,17 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost { } private triggerAllDiagnostics() { - Object.keys(this.languagePerId).forEach(key => this.languagePerId[key].triggerAllDiagnostics()); + for (const language of this.languagePerId.values()) { + language.triggerAllDiagnostics(); + } } /* internal */ populateService(): void { // See https://github.com/Microsoft/TypeScript/issues/5530 - workspace.saveAll(false).then(_ => { - Object.keys(this.languagePerId).forEach(key => this.languagePerId[key].reInitialize()); + workspace.saveAll(false).then(() => { + for (const language of this.languagePerId.values()) { + language.reInitialize(); + } }); } From ab528897935b0957249e90d69e5985870673fd4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kate=20Mih=C3=A1likov=C3=A1?= Date: Tue, 13 Jun 2017 02:18:10 +0200 Subject: [PATCH 1747/2747] Handle diff3-style merge correctly (#27405) --- .../merge-conflict/src/commandHandler.ts | 19 ++++++++--- .../src/documentMergeConflict.ts | 2 ++ extensions/merge-conflict/src/interfaces.ts | 1 + .../merge-conflict/src/mergeConflictParser.ts | 33 ++++++++++++++++--- .../merge-conflict/src/mergeDecorator.ts | 18 ++++++++++ 5 files changed, 63 insertions(+), 10 deletions(-) diff --git a/extensions/merge-conflict/src/commandHandler.ts b/extensions/merge-conflict/src/commandHandler.ts index fe3dbd67201c4..26bab72285ebe 100644 --- a/extensions/merge-conflict/src/commandHandler.ts +++ b/extensions/merge-conflict/src/commandHandler.ts @@ -111,18 +111,27 @@ export default class CommandHandler implements vscode.Disposable { } let typeToAccept: interfaces.CommitType; + let tokenAfterCurrentBlock: vscode.Range = conflict.splitter; + + if (conflict.commonAncestors.length > 0) { + tokenAfterCurrentBlock = conflict.commonAncestors[0].header; + } // Figure out if the cursor is in current or incoming, we do this by seeing if - // the active position is before or after the range of the splitter. We can - // use this trick as the previous check in findConflictByActiveSelection will - // ensure it's within the conflict range, so we don't falsely identify "current" - // or "incoming" if outside of a conflict range. - if (editor.selection.active.isBefore(conflict.splitter.start)) { + // the active position is before or after the range of the splitter or common + // ancesors marker. We can use this trick as the previous check in + // findConflictByActiveSelection will ensure it's within the conflict range, so + // we don't falsely identify "current" or "incoming" if outside of a conflict range. + if (editor.selection.active.isBefore(tokenAfterCurrentBlock.start)) { typeToAccept = interfaces.CommitType.Current; } else if (editor.selection.active.isAfter(conflict.splitter.end)) { typeToAccept = interfaces.CommitType.Incoming; } + else if (editor.selection.active.isBefore(conflict.splitter.start)) { + vscode.window.showWarningMessage(localize('cursorOnCommonAncestorsRange', 'Editor cursor is within the common ancestors block, please move it to either the "current" or "incoming" block')); + return; + } else { vscode.window.showWarningMessage(localize('cursorOnSplitterRange', 'Editor cursor is within the merge conflict splitter, please move it to either the "current" or "incoming" block')); return; diff --git a/extensions/merge-conflict/src/documentMergeConflict.ts b/extensions/merge-conflict/src/documentMergeConflict.ts index 221ee8f36bcb1..f1714c981632b 100644 --- a/extensions/merge-conflict/src/documentMergeConflict.ts +++ b/extensions/merge-conflict/src/documentMergeConflict.ts @@ -10,12 +10,14 @@ export class DocumentMergeConflict implements interfaces.IDocumentMergeConflict public range: vscode.Range; public current: interfaces.IMergeRegion; public incoming: interfaces.IMergeRegion; + public commonAncestors: interfaces.IMergeRegion[]; public splitter: vscode.Range; constructor(document: vscode.TextDocument, descriptor: interfaces.IDocumentMergeConflictDescriptor) { this.range = descriptor.range; this.current = descriptor.current; this.incoming = descriptor.incoming; + this.commonAncestors = descriptor.commonAncestors; this.splitter = descriptor.splitter; } diff --git a/extensions/merge-conflict/src/interfaces.ts b/extensions/merge-conflict/src/interfaces.ts index 9d411befaba44..70519b72b1f11 100644 --- a/extensions/merge-conflict/src/interfaces.ts +++ b/extensions/merge-conflict/src/interfaces.ts @@ -32,6 +32,7 @@ export interface IDocumentMergeConflictDescriptor { range: vscode.Range; current: IMergeRegion; incoming: IMergeRegion; + commonAncestors: IMergeRegion[]; splitter: vscode.Range; } diff --git a/extensions/merge-conflict/src/mergeConflictParser.ts b/extensions/merge-conflict/src/mergeConflictParser.ts index fa316a0701c1a..24c37ae88de1a 100644 --- a/extensions/merge-conflict/src/mergeConflictParser.ts +++ b/extensions/merge-conflict/src/mergeConflictParser.ts @@ -7,11 +7,13 @@ import * as interfaces from './interfaces'; import { DocumentMergeConflict } from './documentMergeConflict'; const startHeaderMarker = '<<<<<<< '; +const commonAncestorsMarker = '||||||| '; const splitterMarker = '======='; const endFooterMarker = '>>>>>>> '; interface IScanMergedConflict { startHeader: vscode.TextLine; + commonAncestors: vscode.TextLine[]; splitter?: vscode.TextLine; endFooter?: vscode.TextLine; } @@ -49,10 +51,14 @@ export class MergeConflictParser { } // Create a new conflict starting at this line - currentConflict = { startHeader: line }; + currentConflict = { startHeader: line, commonAncestors: [] }; + } + // Are we within a conflict block and is this a common ancestors marker? ||||||| + else if (currentConflict && !currentConflict.splitter && line.text.startsWith(commonAncestorsMarker)) { + currentConflict.commonAncestors.push(line); } // Are we within a conflict block and is this a splitter? ======= - else if (currentConflict && line.text.startsWith(splitterMarker)) { + else if (currentConflict && !currentConflict.splitter && line.text.startsWith(splitterMarker)) { currentConflict.splitter = line; } // Are we withon a conflict block and is this a footer? >>>>>>> @@ -84,6 +90,8 @@ export class MergeConflictParser { return null; } + let tokenAfterCurrentBlock: vscode.TextLine = scanned.commonAncestors[0] || scanned.splitter; + // Assume that descriptor.current.header, descriptor.incoming.header and descriptor.spliiter // have valid ranges, fill in content and total ranges from these parts. // NOTE: We need to shift the decortator range back one character so the splitter does not end up with @@ -94,13 +102,28 @@ export class MergeConflictParser { header: scanned.startHeader.range, decoratorContent: new vscode.Range( scanned.startHeader.rangeIncludingLineBreak.end, - MergeConflictParser.shiftBackOneCharacter(document, scanned.splitter.range.start)), - // Current content is range between header (shifted for linebreak) and splitter start + MergeConflictParser.shiftBackOneCharacter(document, tokenAfterCurrentBlock.range.start)), + // Current content is range between header (shifted for linebreak) and splitter or common ancestors mark start content: new vscode.Range( scanned.startHeader.rangeIncludingLineBreak.end, - scanned.splitter.range.start), + tokenAfterCurrentBlock.range.start), name: scanned.startHeader.text.substring(startHeaderMarker.length) }, + commonAncestors: scanned.commonAncestors.map((currentTokenLine, index, commonAncestors) => { + let nextTokenLine = commonAncestors[index + 1] || scanned.splitter; + return { + header: currentTokenLine.range, + decoratorContent: new vscode.Range( + currentTokenLine.rangeIncludingLineBreak.end, + MergeConflictParser.shiftBackOneCharacter(document, nextTokenLine.range.start)), + // Each common ancestors block is range between one common ancestors token + // (shifted for linebreak) and start of next common ancestors token or splitter + content: new vscode.Range( + currentTokenLine.rangeIncludingLineBreak.end, + nextTokenLine.range.start), + name: currentTokenLine.text.substring(commonAncestorsMarker.length) + }; + }), splitter: scanned.splitter.range, incoming: { header: scanned.endFooter.range, diff --git a/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts index f988eef1fedea..24e81970846a4 100644 --- a/extensions/merge-conflict/src/mergeDecorator.ts +++ b/extensions/merge-conflict/src/mergeDecorator.ts @@ -73,6 +73,11 @@ export default class MergeDectorator implements vscode.Disposable { this.decorations['incoming.content'] = vscode.window.createTextEditorDecorationType( this.generateBlockRenderOptions('merge.incomingContentBackground', 'editorOverviewRuler.incomingContentForeground', config) ); + + this.decorations['commonAncestors.content'] = vscode.window.createTextEditorDecorationType({ + color: new vscode.ThemeColor('editor.foreground'), + isWholeLine: this.decorationUsesWholeLine, + }); } if (config.enableDecorations) { @@ -89,6 +94,11 @@ export default class MergeDectorator implements vscode.Disposable { } }); + this.decorations['commonAncestors.header'] = vscode.window.createTextEditorDecorationType({ + color: new vscode.ThemeColor('editor.foreground'), + isWholeLine: this.decorationUsesWholeLine, + }); + this.decorations['splitter'] = vscode.window.createTextEditorDecorationType({ color: new vscode.ThemeColor('editor.foreground'), outlineStyle: 'solid', @@ -187,10 +197,18 @@ export default class MergeDectorator implements vscode.Disposable { pushDecoration('current.content', { range: conflict.current.decoratorContent }); pushDecoration('incoming.content', { range: conflict.incoming.decoratorContent }); + conflict.commonAncestors.forEach(commonAncestorsRegion => { + pushDecoration('commonAncestors.content', { range: commonAncestorsRegion.decoratorContent }); + }); + if (this.config.enableDecorations) { pushDecoration('current.header', { range: conflict.current.header }); pushDecoration('splitter', { range: conflict.splitter }); pushDecoration('incoming.header', { range: conflict.incoming.header }); + + conflict.commonAncestors.forEach(commonAncestorsRegion => { + pushDecoration('commonAncestors.header', { range: commonAncestorsRegion.header }); + }); } }); From 996af4d965f4b9b3862cd7c02e28509f346bf0eb Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Mon, 12 Jun 2017 17:16:38 -0700 Subject: [PATCH 1748/2747] Workbench colors (#28507) --- extensions/merge-conflict/src/mergeDecorator.ts | 13 ++++++++----- src/vs/platform/theme/common/colorRegistry.ts | 4 ++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/extensions/merge-conflict/src/mergeDecorator.ts b/extensions/merge-conflict/src/mergeDecorator.ts index 24e81970846a4..c3fa2e08e0867 100644 --- a/extensions/merge-conflict/src/mergeDecorator.ts +++ b/extensions/merge-conflict/src/mergeDecorator.ts @@ -74,10 +74,9 @@ export default class MergeDectorator implements vscode.Disposable { this.generateBlockRenderOptions('merge.incomingContentBackground', 'editorOverviewRuler.incomingContentForeground', config) ); - this.decorations['commonAncestors.content'] = vscode.window.createTextEditorDecorationType({ - color: new vscode.ThemeColor('editor.foreground'), - isWholeLine: this.decorationUsesWholeLine, - }); + this.decorations['commonAncestors.content'] = vscode.window.createTextEditorDecorationType( + this.generateBlockRenderOptions('merge.commonContentBackground', 'editorOverviewRuler.commonContentForeground', config) + ); } if (config.enableDecorations) { @@ -95,8 +94,12 @@ export default class MergeDectorator implements vscode.Disposable { }); this.decorations['commonAncestors.header'] = vscode.window.createTextEditorDecorationType({ - color: new vscode.ThemeColor('editor.foreground'), isWholeLine: this.decorationUsesWholeLine, + backgroundColor: new vscode.ThemeColor('merge.commonHeaderBackground'), + color: new vscode.ThemeColor('editor.foreground'), + outlineStyle: 'solid', + outlineWidth: '1pt', + outlineColor: new vscode.ThemeColor('merge.border') }); this.decorations['splitter'] = vscode.window.createTextEditorDecorationType({ diff --git a/src/vs/platform/theme/common/colorRegistry.ts b/src/vs/platform/theme/common/colorRegistry.ts index 2cd9b78d5ec6c..02ffee0c4231b 100644 --- a/src/vs/platform/theme/common/colorRegistry.ts +++ b/src/vs/platform/theme/common/colorRegistry.ts @@ -261,6 +261,7 @@ export const diffRemovedOutline = registerColor('diffEditor.removedTextBorder', const headerTransparency = 0.5; const currentBaseColor = Color.fromHex('#40C8AE').transparent(headerTransparency); const incomingBaseColor = Color.fromHex('#40A6FF').transparent(headerTransparency); +const commonBaseColor = Color.fromHex('#606060').transparent(0.4); const contentTransparency = 0.4; const rulerTransparency = 1; @@ -268,11 +269,14 @@ export const mergeCurrentHeaderBackground = registerColor('merge.currentHeaderBa export const mergeCurrentContentBackground = registerColor('merge.currentContentBackground', { dark: transparent(mergeCurrentHeaderBackground, contentTransparency), light: transparent(mergeCurrentHeaderBackground, contentTransparency), hc: transparent(mergeCurrentHeaderBackground, contentTransparency) }, nls.localize('mergeCurrentContentBackground', 'Current content background in inline merge-conflicts.')); export const mergeIncomingHeaderBackground = registerColor('merge.incomingHeaderBackground', { dark: incomingBaseColor, light: incomingBaseColor, hc: null }, nls.localize('mergeIncomingHeaderBackground', 'Incoming header background in inline merge-conflicts.')); export const mergeIncomingContentBackground = registerColor('merge.incomingContentBackground', { dark: transparent(mergeIncomingHeaderBackground, contentTransparency), light: transparent(mergeIncomingHeaderBackground, contentTransparency), hc: transparent(mergeIncomingHeaderBackground, contentTransparency) }, nls.localize('mergeIncomingContentBackground', 'Incoming content background in inline merge-conflicts.')); +export const mergeCommonHeaderBackground = registerColor('merge.commonHeaderBackground', { dark: commonBaseColor, light: commonBaseColor, hc: null }, nls.localize('mergeCommonHeaderBackground', 'Common ancestor header background in inline merge-conflicts.')); +export const mergeCommonContentBackground = registerColor('merge.commonContentBackground', { dark: transparent(mergeCommonHeaderBackground, contentTransparency), light: transparent(mergeCommonHeaderBackground, contentTransparency), hc: transparent(mergeCommonHeaderBackground, contentTransparency) }, nls.localize('mergeCommonContentBackground', 'Common ancester content background in inline merge-conflicts.')); export const mergeBorder = registerColor('merge.border', { dark: null, light: null, hc: '#C3DF6F' }, nls.localize('mergeBorder', 'Border color on headers and the splitter in inline merge-conflicts.')); export const overviewRulerCurrentContentForeground = registerColor('editorOverviewRuler.currentContentForeground', { dark: transparent(mergeCurrentHeaderBackground, rulerTransparency), light: transparent(mergeCurrentHeaderBackground, rulerTransparency), hc: mergeBorder }, nls.localize('overviewRulerCurrentContentForeground', 'Current overview ruler foreground for inline merge-conflicts.')); export const overviewRulerIncomingContentForeground = registerColor('editorOverviewRuler.incomingContentForeground', { dark: transparent(mergeIncomingHeaderBackground, rulerTransparency), light: transparent(mergeIncomingHeaderBackground, rulerTransparency), hc: mergeBorder }, nls.localize('overviewRulerIncomingContentForeground', 'Incoming overview ruler foreground for inline merge-conflicts.')); +export const overviewRulerCommonContentForeground = registerColor('editorOverviewRuler.commonContentForeground', { dark: transparent(mergeCommonHeaderBackground, rulerTransparency), light: transparent(mergeCommonHeaderBackground, rulerTransparency), hc: mergeBorder }, nls.localize('overviewRulerCommonContentForeground', 'Common ancestor overview ruler foreground for inline merge-conflicts.')); // ----- color functions From bbcd10ae1a959c1681469533321fa418da7cd9db Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Mon, 12 Jun 2017 17:28:48 -0700 Subject: [PATCH 1749/2747] Use async in TS documentSymbolProvider --- .../src/features/documentSymbolProvider.ts | 28 ++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/extensions/typescript/src/features/documentSymbolProvider.ts b/extensions/typescript/src/features/documentSymbolProvider.ts index 06b3e0983c2a5..9fbaf64fc8055 100644 --- a/extensions/typescript/src/features/documentSymbolProvider.ts +++ b/extensions/typescript/src/features/documentSymbolProvider.ts @@ -33,18 +33,19 @@ export default class TypeScriptDocumentSymbolProvider implements DocumentSymbolP public constructor( private client: ITypescriptServiceClient) { } - public provideDocumentSymbols(resource: TextDocument, token: CancellationToken): Promise { + public async provideDocumentSymbols(resource: TextDocument, token: CancellationToken): Promise { const filepath = this.client.normalizePath(resource.uri); if (!filepath) { - return Promise.resolve([]); + return []; } const args: Proto.FileRequestArgs = { file: filepath }; - if (this.client.apiVersion.has206Features()) { - return this.client.execute('navtree', args, token).then((response) => { - const result: SymbolInformation[] = []; + try { + const result: SymbolInformation[] = []; + if (this.client.apiVersion.has206Features()) { + const response = await this.client.execute('navtree', args, token); if (response.body) { // The root represents the file. Ignore this when showing in the UI let tree = response.body; @@ -52,21 +53,16 @@ export default class TypeScriptDocumentSymbolProvider implements DocumentSymbolP tree.childItems.forEach(item => TypeScriptDocumentSymbolProvider.convertNavTree(resource.uri, result, item)); } } - return result; - }, () => { - return []; - }); - } else { - return this.client.execute('navbar', args, token).then((response) => { - const result: SymbolInformation[] = []; + } else { + const response = await this.client.execute('navbar', args, token); if (response.body) { let foldingMap: ObjectMap = Object.create(null); response.body.forEach(item => TypeScriptDocumentSymbolProvider.convertNavBar(resource.uri, 0, foldingMap, result, item)); } - return result; - }, () => { - return []; - }); + } + return result; + } catch (e) { + return []; } } From 4ffa2539dae42db2ac230f15181f5b83f74c1229 Mon Sep 17 00:00:00 2001 From: Ramya Rao Date: Mon, 12 Jun 2017 22:20:59 -0700 Subject: [PATCH 1750/2747] shrinkwrap, OSSREADME for emmet (#28570) --- extensions/emmet/OSSREADME.json | 118 +++++++++++ extensions/emmet/npm-shrinkwrap.json | 286 +++++++++++++++++++++++++++ 2 files changed, 404 insertions(+) create mode 100644 extensions/emmet/OSSREADME.json create mode 100644 extensions/emmet/npm-shrinkwrap.json diff --git a/extensions/emmet/OSSREADME.json b/extensions/emmet/OSSREADME.json new file mode 100644 index 0000000000000..926f46f6fbdc1 --- /dev/null +++ b/extensions/emmet/OSSREADME.json @@ -0,0 +1,118 @@ +[ + { + "name": "@emmetio/expand-abbreviation", + "license": "MIT", + "version": "0.5.7", + "repositoryURL": "https://github.com/emmetio/expand-abbreviation", + "licenseDetail": [ + "MIT License", + "", + "Copyright (c) 2017 Emmet.io", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy", + "of this software and associated documentation files (the \"Software\"), to deal", + "in the Software without restriction, including without limitation the rights", + "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", + "copies of the Software, and to permit persons to whom the Software is", + "furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in all", + "copies or substantial portions of the Software.", + "", + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", + "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", + "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", + "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", + "SOFTWARE." + ] + }, + { + "name": "@emmetio/css-parser", + "license": "MIT", + "version": "0.3.0", + "repositoryURL": "https://github.com/emmetio/css-parser", + "licenseDetail": [ + "MIT License", + "", + "Copyright (c) 2017 Emmet.io", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy", + "of this software and associated documentation files (the \"Software\"), to deal", + "in the Software without restriction, including without limitation the rights", + "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", + "copies of the Software, and to permit persons to whom the Software is", + "furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in all", + "copies or substantial portions of the Software.", + "", + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", + "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", + "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", + "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", + "SOFTWARE." + ] + }, + { + "name": "@emmetio/extract-abbreviation", + "license": "MIT", + "version": "0.1.2", + "repositoryURL": "https://github.com/emmetio/extract-abbreviation", + "licenseDetail": [ + "MIT License", + "", + "Copyright (c) 2017 Emmet.io", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy", + "of this software and associated documentation files (the \"Software\"), to deal", + "in the Software without restriction, including without limitation the rights", + "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", + "copies of the Software, and to permit persons to whom the Software is", + "furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in all", + "copies or substantial portions of the Software.", + "", + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", + "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", + "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", + "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", + "SOFTWARE." + ] + }, + { + "name": "@emmetio/html-matcher", + "license": "MIT", + "version": "0.3.2", + "repositoryURL": "https://github.com/emmetio/html-matcher", + "licenseDetail": [ + "MIT License", + "", + "Copyright (c) 2017 Emmet.io", + "", + "Permission is hereby granted, free of charge, to any person obtaining a copy", + "of this software and associated documentation files (the \"Software\"), to deal", + "in the Software without restriction, including without limitation the rights", + "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", + "copies of the Software, and to permit persons to whom the Software is", + "furnished to do so, subject to the following conditions:", + "", + "The above copyright notice and this permission notice shall be included in all", + "copies or substantial portions of the Software.", + "", + "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", + "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", + "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", + "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", + "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", + "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", + "SOFTWARE." + ] + } +] \ No newline at end of file diff --git a/extensions/emmet/npm-shrinkwrap.json b/extensions/emmet/npm-shrinkwrap.json new file mode 100644 index 0000000000000..20736e323b98f --- /dev/null +++ b/extensions/emmet/npm-shrinkwrap.json @@ -0,0 +1,286 @@ +{ + "name": "emmet", + "version": "0.0.1", + "dependencies": { + "@emmetio/abbreviation": { + "version": "0.6.1", + "from": "@emmetio/abbreviation@>=0.6.1 <0.7.0", + "resolved": "https://registry.npmjs.org/@emmetio/abbreviation/-/abbreviation-0.6.1.tgz" + }, + "@emmetio/css-abbreviation": { + "version": "0.3.1", + "from": "@emmetio/css-abbreviation@>=0.3.1 <0.4.0", + "resolved": "https://registry.npmjs.org/@emmetio/css-abbreviation/-/css-abbreviation-0.3.1.tgz" + }, + "@emmetio/css-parser": { + "version": "0.3.0", + "from": "@emmetio/css-parser@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/@emmetio/css-parser/-/css-parser-0.3.0.tgz" + }, + "@emmetio/css-snippets-resolver": { + "version": "0.2.5", + "from": "@emmetio/css-snippets-resolver@>=0.2.5 <0.3.0", + "resolved": "https://registry.npmjs.org/@emmetio/css-snippets-resolver/-/css-snippets-resolver-0.2.5.tgz" + }, + "@emmetio/expand-abbreviation": { + "version": "0.5.7", + "from": "@emmetio/expand-abbreviation@>=0.5.4 <0.6.0", + "resolved": "https://registry.npmjs.org/@emmetio/expand-abbreviation/-/expand-abbreviation-0.5.7.tgz" + }, + "@emmetio/extract-abbreviation": { + "version": "0.1.2", + "from": "@emmetio/extract-abbreviation@>=0.1.1 <0.2.0", + "resolved": "https://registry.npmjs.org/@emmetio/extract-abbreviation/-/extract-abbreviation-0.1.2.tgz" + }, + "@emmetio/field-parser": { + "version": "0.3.0", + "from": "@emmetio/field-parser@>=0.3.0 <0.4.0", + "resolved": "https://registry.npmjs.org/@emmetio/field-parser/-/field-parser-0.3.0.tgz" + }, + "@emmetio/html-matcher": { + "version": "0.3.2", + "from": "@emmetio/html-matcher@>=0.3.1 <0.4.0", + "resolved": "https://registry.npmjs.org/@emmetio/html-matcher/-/html-matcher-0.3.2.tgz" + }, + "@emmetio/html-snippets-resolver": { + "version": "0.1.4", + "from": "@emmetio/html-snippets-resolver@>=0.1.4 <0.2.0", + "resolved": "https://registry.npmjs.org/@emmetio/html-snippets-resolver/-/html-snippets-resolver-0.1.4.tgz" + }, + "@emmetio/html-transform": { + "version": "0.3.2", + "from": "@emmetio/html-transform@>=0.3.2 <0.4.0", + "resolved": "https://registry.npmjs.org/@emmetio/html-transform/-/html-transform-0.3.2.tgz" + }, + "@emmetio/implicit-tag": { + "version": "1.0.0", + "from": "@emmetio/implicit-tag@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/@emmetio/implicit-tag/-/implicit-tag-1.0.0.tgz" + }, + "@emmetio/lorem": { + "version": "1.0.1", + "from": "@emmetio/lorem@>=1.0.1 <2.0.0", + "resolved": "https://registry.npmjs.org/@emmetio/lorem/-/lorem-1.0.1.tgz" + }, + "@emmetio/markup-formatters": { + "version": "0.3.3", + "from": "@emmetio/markup-formatters@>=0.3.3 <0.4.0", + "resolved": "https://registry.npmjs.org/@emmetio/markup-formatters/-/markup-formatters-0.3.3.tgz" + }, + "@emmetio/node": { + "version": "0.1.2", + "from": "@emmetio/node@>=0.1.2 <0.2.0", + "resolved": "https://registry.npmjs.org/@emmetio/node/-/node-0.1.2.tgz" + }, + "@emmetio/output-profile": { + "version": "0.1.5", + "from": "@emmetio/output-profile@>=0.1.5 <0.2.0", + "resolved": "https://registry.npmjs.org/@emmetio/output-profile/-/output-profile-0.1.5.tgz" + }, + "@emmetio/output-renderer": { + "version": "0.1.1", + "from": "@emmetio/output-renderer@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/@emmetio/output-renderer/-/output-renderer-0.1.1.tgz" + }, + "@emmetio/snippets": { + "version": "0.2.3", + "from": "@emmetio/snippets@>=0.2.3 <0.3.0", + "resolved": "https://registry.npmjs.org/@emmetio/snippets/-/snippets-0.2.3.tgz" + }, + "@emmetio/snippets-registry": { + "version": "0.3.1", + "from": "@emmetio/snippets-registry@>=0.3.1 <0.4.0", + "resolved": "https://registry.npmjs.org/@emmetio/snippets-registry/-/snippets-registry-0.3.1.tgz" + }, + "@emmetio/stream-reader": { + "version": "2.2.0", + "from": "@emmetio/stream-reader@>=2.2.0 <3.0.0", + "resolved": "https://registry.npmjs.org/@emmetio/stream-reader/-/stream-reader-2.2.0.tgz" + }, + "@emmetio/stream-reader-utils": { + "version": "0.1.0", + "from": "@emmetio/stream-reader-utils@>=0.1.0 <0.2.0", + "resolved": "https://registry.npmjs.org/@emmetio/stream-reader-utils/-/stream-reader-utils-0.1.0.tgz" + }, + "@emmetio/stylesheet-formatters": { + "version": "0.1.2", + "from": "@emmetio/stylesheet-formatters@>=0.1.2 <0.2.0", + "resolved": "https://registry.npmjs.org/@emmetio/stylesheet-formatters/-/stylesheet-formatters-0.1.2.tgz" + }, + "@emmetio/variable-resolver": { + "version": "0.2.1", + "from": "@emmetio/variable-resolver@>=0.2.1 <0.3.0", + "resolved": "https://registry.npmjs.org/@emmetio/variable-resolver/-/variable-resolver-0.2.1.tgz" + }, + "balanced-match": { + "version": "1.0.0", + "from": "balanced-match@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" + }, + "brace-expansion": { + "version": "1.1.8", + "from": "brace-expansion@>=1.1.7 <2.0.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz" + }, + "browser-stdout": { + "version": "1.3.0", + "from": "browser-stdout@1.3.0", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz" + }, + "commander": { + "version": "2.9.0", + "from": "commander@2.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz" + }, + "concat-map": { + "version": "0.0.1", + "from": "concat-map@0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + }, + "debug": { + "version": "2.6.0", + "from": "debug@2.6.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.0.tgz" + }, + "diff": { + "version": "3.2.0", + "from": "diff@3.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.2.0.tgz" + }, + "escape-string-regexp": { + "version": "1.0.5", + "from": "escape-string-regexp@1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" + }, + "fs.realpath": { + "version": "1.0.0", + "from": "fs.realpath@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + }, + "glob": { + "version": "7.1.1", + "from": "glob@7.1.1", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz" + }, + "graceful-readlink": { + "version": "1.0.1", + "from": "graceful-readlink@>=1.0.0", + "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz" + }, + "growl": { + "version": "1.9.2", + "from": "growl@1.9.2", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.9.2.tgz" + }, + "has-flag": { + "version": "1.0.0", + "from": "has-flag@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz" + }, + "inflight": { + "version": "1.0.6", + "from": "inflight@>=1.0.4 <2.0.0", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + }, + "inherits": { + "version": "2.0.3", + "from": "inherits@>=2.0.0 <3.0.0", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "json3": { + "version": "3.3.2", + "from": "json3@3.3.2", + "resolved": "https://registry.npmjs.org/json3/-/json3-3.3.2.tgz" + }, + "lodash._baseassign": { + "version": "3.2.0", + "from": "lodash._baseassign@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz" + }, + "lodash._basecopy": { + "version": "3.0.1", + "from": "lodash._basecopy@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz" + }, + "lodash._basecreate": { + "version": "3.0.3", + "from": "lodash._basecreate@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz" + }, + "lodash._getnative": { + "version": "3.9.1", + "from": "lodash._getnative@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz" + }, + "lodash._isiterateecall": { + "version": "3.0.9", + "from": "lodash._isiterateecall@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz" + }, + "lodash.create": { + "version": "3.1.1", + "from": "lodash.create@3.1.1", + "resolved": "https://registry.npmjs.org/lodash.create/-/lodash.create-3.1.1.tgz" + }, + "lodash.isarguments": { + "version": "3.1.0", + "from": "lodash.isarguments@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz" + }, + "lodash.isarray": { + "version": "3.0.4", + "from": "lodash.isarray@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz" + }, + "lodash.keys": { + "version": "3.1.2", + "from": "lodash.keys@>=3.0.0 <4.0.0", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz" + }, + "minimatch": { + "version": "3.0.4", + "from": "minimatch@>=3.0.2 <4.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz" + }, + "minimist": { + "version": "0.0.8", + "from": "minimist@0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" + }, + "mkdirp": { + "version": "0.5.1", + "from": "mkdirp@0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz" + }, + "mocha": { + "version": "3.4.2", + "from": "mocha@>=3.4.1 <4.0.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-3.4.2.tgz" + }, + "ms": { + "version": "0.7.2", + "from": "ms@0.7.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.2.tgz" + }, + "once": { + "version": "1.4.0", + "from": "once@>=1.3.0 <2.0.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + }, + "path-is-absolute": { + "version": "1.0.1", + "from": "path-is-absolute@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + }, + "supports-color": { + "version": "3.1.2", + "from": "supports-color@3.1.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.1.2.tgz" + }, + "wrappy": { + "version": "1.0.2", + "from": "wrappy@>=1.0.0 <2.0.0", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + } + } +} From 60a069504012d390c8b0c42af457098fd236458e Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 13 Jun 2017 07:49:05 +0200 Subject: [PATCH 1751/2747] Hot exit: set backupPath as configuration to windows (#28350) --- src/vs/code/electron-main/app.ts | 6 --- src/vs/code/electron-main/windows.ts | 3 +- src/vs/platform/backup/common/backup.ts | 12 +----- src/vs/platform/backup/common/backupIpc.ts | 38 ------------------- .../backup/electron-main/backupMainService.ts | 15 ++------ .../electron-main/backupMainService.test.ts | 27 ------------- src/vs/platform/windows/common/windows.ts | 16 ++++++-- src/vs/workbench/electron-browser/common.ts | 22 ----------- src/vs/workbench/electron-browser/main.ts | 29 ++------------ src/vs/workbench/electron-browser/shell.ts | 13 +++---- src/vs/workbench/electron-browser/window.ts | 3 +- .../workbench/electron-browser/workbench.ts | 10 +++-- .../relauncher.contribution.ts | 3 +- .../services/backup/node/backupFileService.ts | 22 +++-------- .../backup/test/backupFileService.test.ts | 10 +---- 15 files changed, 43 insertions(+), 186 deletions(-) delete mode 100644 src/vs/platform/backup/common/backupIpc.ts delete mode 100644 src/vs/workbench/electron-browser/common.ts diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 77aa83653c500..9d09792a65bf0 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -27,8 +27,6 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { ILogService } from 'vs/platform/log/common/log'; import { IStorageService } from 'vs/platform/storage/node/storage'; -import { IBackupMainService } from 'vs/platform/backup/common/backup'; -import { BackupChannel } from 'vs/platform/backup/common/backupIpc'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IURLService } from 'vs/platform/url/common/url'; @@ -304,10 +302,6 @@ export class CodeApplication { const urlChannel = appInstantiationService.createInstance(URLChannel, urlService); this.electronIpcServer.registerChannel('url', urlChannel); - const backupService = accessor.get(IBackupMainService); - const backupChannel = appInstantiationService.createInstance(BackupChannel, backupService); - this.electronIpcServer.registerChannel('backup', backupChannel); - const windowsService = accessor.get(IWindowsService); const windowsChannel = new WindowsChannel(windowsService); this.electronIpcServer.registerChannel('windows', windowsChannel); diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 743776829a765..537b279af9322 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -707,7 +707,8 @@ export class WindowsManager implements IWindowsMainService { // Register window for backups if (!configuration.extensionDevelopmentPath) { - this.backupService.registerWindowForBackupsSync(codeWindow.id, !configuration.workspacePath, options.emptyWorkspaceBackupFolder, configuration.workspacePath); + const backupPath = this.backupService.registerWindowForBackupsSync(codeWindow.id, !configuration.workspacePath, options.emptyWorkspaceBackupFolder, configuration.workspacePath); + configuration.backupPath = backupPath; } // Load it diff --git a/src/vs/platform/backup/common/backup.ts b/src/vs/platform/backup/common/backup.ts index 9a53670387fc9..dcc3eec908ce4 100644 --- a/src/vs/platform/backup/common/backup.ts +++ b/src/vs/platform/backup/common/backup.ts @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; -import { TPromise } from 'vs/base/common/winjs.base'; export interface IBackupWorkspacesFormat { folderWorkspaces: string[]; @@ -12,19 +11,12 @@ export interface IBackupWorkspacesFormat { } export const IBackupMainService = createDecorator('backupMainService'); -export const IBackupService = createDecorator('backupService'); -export interface IBackupMainService extends IBackupService { +export interface IBackupMainService { _serviceBrand: any; getWorkspaceBackupPaths(): string[]; getEmptyWorkspaceBackupPaths(): string[]; - registerWindowForBackupsSync(windowId: number, isEmptyWorkspace: boolean, backupFolder?: string, workspacePath?: string): void; -} - -export interface IBackupService { - _serviceBrand: any; - - getBackupPath(windowId: number): TPromise; + registerWindowForBackupsSync(windowId: number, isEmptyWorkspace: boolean, backupFolder?: string, workspacePath?: string): string; } \ No newline at end of file diff --git a/src/vs/platform/backup/common/backupIpc.ts b/src/vs/platform/backup/common/backupIpc.ts deleted file mode 100644 index 0fdfdb86824fc..0000000000000 --- a/src/vs/platform/backup/common/backupIpc.ts +++ /dev/null @@ -1,38 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import { IChannel } from 'vs/base/parts/ipc/common/ipc'; -import { IBackupService } from './backup'; - -export interface IBackupChannel extends IChannel { - call(command: 'getBackupPath', arg: [number]): TPromise; - call(command: string, arg?: any): TPromise; -} - -export class BackupChannel implements IBackupChannel { - - constructor(private service: IBackupService) { } - - call(command: string, arg?: any): TPromise { - switch (command) { - case 'getBackupPath': return this.service.getBackupPath(arg); - } - return undefined; - } -} - -export class BackupChannelClient implements IBackupService { - - _serviceBrand: any; - - constructor(private channel: IBackupChannel) { } - - getBackupPath(windowId: number): TPromise { - return this.channel.call('getBackupPath', windowId); - } -} \ No newline at end of file diff --git a/src/vs/platform/backup/electron-main/backupMainService.ts b/src/vs/platform/backup/electron-main/backupMainService.ts index a5c984ca5ed8a..59f9d014a8c69 100644 --- a/src/vs/platform/backup/electron-main/backupMainService.ts +++ b/src/vs/platform/backup/electron-main/backupMainService.ts @@ -13,7 +13,6 @@ import { IBackupWorkspacesFormat, IBackupMainService } from 'vs/platform/backup/ import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IFilesConfiguration, HotExitConfiguration } from 'vs/platform/files/common/files'; -import { TPromise } from 'vs/base/common/winjs.base'; export class BackupMainService implements IBackupMainService { @@ -23,7 +22,6 @@ export class BackupMainService implements IBackupMainService { protected workspacesJsonPath: string; private backups: IBackupWorkspacesFormat; - private mapWindowToBackupFolder: { [windowId: number]: string; }; constructor( @IEnvironmentService environmentService: IEnvironmentService, @@ -31,7 +29,6 @@ export class BackupMainService implements IBackupMainService { ) { this.backupHome = environmentService.backupHome; this.workspacesJsonPath = environmentService.backupWorkspacesPath; - this.mapWindowToBackupFolder = Object.create(null); this.loadSync(); } @@ -50,22 +47,16 @@ export class BackupMainService implements IBackupMainService { return this.backups.emptyWorkspaces.slice(0); // return a copy } - public getBackupPath(windowId: number): TPromise { - if (!this.mapWindowToBackupFolder[windowId]) { - throw new Error(`Unknown backup workspace for window ${windowId}`); - } - - return TPromise.as(path.join(this.backupHome, this.mapWindowToBackupFolder[windowId])); - } + public registerWindowForBackupsSync(windowId: number, isEmptyWorkspace: boolean, backupFolder?: string, workspacePath?: string): string { - public registerWindowForBackupsSync(windowId: number, isEmptyWorkspace: boolean, backupFolder?: string, workspacePath?: string): void { // Generate a new folder if this is a new empty workspace if (isEmptyWorkspace && !backupFolder) { backupFolder = this.getRandomEmptyWorkspaceId(); } - this.mapWindowToBackupFolder[windowId] = isEmptyWorkspace ? backupFolder : this.getWorkspaceHash(workspacePath); this.pushBackupPathsSync(isEmptyWorkspace ? backupFolder : workspacePath, isEmptyWorkspace); + + return path.join(this.backupHome, isEmptyWorkspace ? backupFolder : this.getWorkspaceHash(workspacePath)); } private pushBackupPathsSync(workspaceIdentifier: string, isEmptyWorkspace: boolean): string { diff --git a/src/vs/platform/backup/test/electron-main/backupMainService.test.ts b/src/vs/platform/backup/test/electron-main/backupMainService.test.ts index 179a648ba0b0b..9519702d03e81 100644 --- a/src/vs/platform/backup/test/electron-main/backupMainService.test.ts +++ b/src/vs/platform/backup/test/electron-main/backupMainService.test.ts @@ -336,33 +336,6 @@ suite('BackupMainService', () => { }); }); - suite('getBackupPath', () => { - test('should return the window\'s correct path', done => { - service.registerWindowForBackupsSync(1, false, null, fooFile.fsPath); - service.registerWindowForBackupsSync(2, true, 'test'); - service.getBackupPath(1).then(window1Path => { - assert.equal(window1Path, service.toBackupPath(fooFile.fsPath)); - service.getBackupPath(2).then(window2Path => { - assert.equal(window2Path, path.join(backupHome, 'test')); - done(); - }); - }); - }); - - test('should override stale window paths with new paths', done => { - service.registerWindowForBackupsSync(1, false, null, fooFile.fsPath); - service.registerWindowForBackupsSync(1, false, null, barFile.fsPath); - service.getBackupPath(1).then(windowPath => { - assert.equal(windowPath, service.toBackupPath(barFile.fsPath)); - done(); - }); - }); - - test('should throw when the window is not registered', () => { - assert.throws(() => service.getBackupPath(1)); - }); - }); - suite('mixed path casing', () => { test('should handle case insensitive paths properly (registerWindowForBackupsSync)', done => { service.registerWindowForBackupsSync(1, false, null, fooFile.fsPath); diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index ac16cd0c60a41..4cb6db0cac35f 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -97,6 +97,10 @@ export interface IWindowService { export type MenuBarVisibility = 'default' | 'visible' | 'toggle' | 'hidden'; +export interface IWindowConfiguration { + window: IWindowSettings; +} + export interface IWindowSettings { openFilesInNewWindow: 'on' | 'off' | 'default'; openFoldersInNewWindow: 'on' | 'off' | 'default'; @@ -173,7 +177,13 @@ export interface IPath { createFilePath?: boolean; } -export interface IWindowConfiguration extends ParsedArgs { +export interface IOpenFileRequest { + filesToOpen?: IPath[]; + filesToCreate?: IPath[]; + filesToDiff?: IPath[]; +} + +export interface IWindowConfiguration extends ParsedArgs, IOpenFileRequest { appRoot: string; execPath: string; @@ -196,9 +206,7 @@ export interface IWindowConfiguration extends ParsedArgs { workspacePath?: string; - filesToOpen?: IPath[]; - filesToCreate?: IPath[]; - filesToDiff?: IPath[]; + backupPath?: string; nodeCachedDataDir: string; } \ No newline at end of file diff --git a/src/vs/workbench/electron-browser/common.ts b/src/vs/workbench/electron-browser/common.ts deleted file mode 100644 index 9ddf433eeed20..0000000000000 --- a/src/vs/workbench/electron-browser/common.ts +++ /dev/null @@ -1,22 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { IWindowSettings } from 'vs/platform/windows/common/windows'; - -export interface IPath { - filePath: string; - lineNumber?: number; - columnNumber?: number; -} - -export interface IOpenFileRequest { - filesToOpen?: IPath[]; - filesToCreate?: IPath[]; - filesToDiff?: IPath[]; -} - -export interface IWindowConfiguration { - window: IWindowSettings; -} \ No newline at end of file diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index 4afe4e06bf4a6..69ca40fed63fd 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -20,41 +20,20 @@ import strings = require('vs/base/common/strings'); import { IResourceInput } from 'vs/platform/editor/common/editor'; import { WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configurationService'; -import { ParsedArgs } from 'vs/platform/environment/common/environment'; import { realpath, stat } from 'vs/base/node/pfs'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import path = require('path'); import gracefulFs = require('graceful-fs'); -import { IPath, IOpenFileRequest } from 'vs/workbench/electron-browser/common'; import { IInitData } from 'vs/workbench/services/timer/common/timerService'; import { TimerService } from 'vs/workbench/services/timer/node/timerService'; import { KeyboardMapperFactory } from "vs/workbench/services/keybinding/electron-browser/keybindingService"; +import { IWindowConfiguration, IPath } from "vs/platform/windows/common/windows"; import { webFrame } from 'electron'; import fs = require('fs'); gracefulFs.gracefulify(fs); // enable gracefulFs -export interface IWindowConfiguration extends ParsedArgs, IOpenFileRequest { - - /** - * The physical keyboard is of ISO type (on OSX). - */ - isISOKeyboard?: boolean; - - accessibilitySupport?: boolean; - - appRoot: string; - execPath: string; - - userEnv: any; /* vs/code/electron-main/env/IProcessEnvironment*/ - - workspacePath?: string; - - zoomLevel?: number; - fullscreen?: boolean; -} - export function startup(configuration: IWindowConfiguration): TPromise { // Ensure others can listen to zoom level changes @@ -148,8 +127,8 @@ function getWorkspace(workspacePath: string): TPromise { }); } -function openWorkbench(environment: IWindowConfiguration, workspace: Workspace, options: IOptions): TPromise { - const environmentService = new EnvironmentService(environment, environment.execPath); +function openWorkbench(configuration: IWindowConfiguration, workspace: Workspace, options: IOptions): TPromise { + const environmentService = new EnvironmentService(configuration, configuration.execPath); const configurationService = new WorkspaceConfigurationService(environmentService, workspace); const contextService = new WorkspaceContextService(configurationService, workspace); const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !contextService.hasWorkspace()); @@ -169,7 +148,7 @@ function openWorkbench(environment: IWindowConfiguration, workspace: Workspace, contextService, environmentService, timerService - }, options); + }, configuration, options); shell.open(); // Inform user about loading issues from the loader diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index e0fb2e384aada..cce0d8cf30061 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -33,7 +33,7 @@ import { resolveWorkbenchCommonProperties, getOrCreateMachineId } from 'vs/platf import { machineIdIpcChannel } from 'vs/platform/telemetry/node/commonProperties'; import { WorkspaceStats } from 'vs/workbench/services/telemetry/common/workspaceStats'; import { IWindowIPCService, WindowIPCService } from 'vs/workbench/services/window/electron-browser/windowService'; -import { IWindowsService, IWindowService } from 'vs/platform/windows/common/windows'; +import { IWindowsService, IWindowService, IWindowConfiguration } from 'vs/platform/windows/common/windows'; import { WindowsChannelClient } from 'vs/platform/windows/common/windowsIpc'; import { WindowService } from 'vs/platform/windows/electron-browser/windowService'; import { MessageService } from 'vs/workbench/services/message/electron-browser/messageService'; @@ -86,8 +86,6 @@ import { UpdateChannelClient } from 'vs/platform/update/common/updateIpc'; import { IUpdateService } from 'vs/platform/update/common/update'; import { URLChannelClient } from 'vs/platform/url/common/urlIpc'; import { IURLService } from 'vs/platform/url/common/url'; -import { IBackupService } from 'vs/platform/backup/common/backup'; -import { BackupChannelClient } from 'vs/platform/backup/common/backupIpc'; import { ExtensionHostProcessWorker } from 'vs/workbench/electron-browser/extensionHost'; import { ITimerService } from 'vs/workbench/services/timer/common/timerService'; import { remote, ipcRenderer as ipc } from 'electron'; @@ -141,12 +139,14 @@ export class WorkbenchShell { private content: HTMLElement; private contentsContainer: Builder; + private configuration: IWindowConfiguration; private options: IOptions; private workbench: Workbench; - constructor(container: HTMLElement, services: ICoreServices, options: IOptions) { + constructor(container: HTMLElement, services: ICoreServices, configuration: IWindowConfiguration, options: IOptions) { this.container = container; + this.configuration = configuration; this.options = options; this.contextService = services.contextService; @@ -170,7 +170,7 @@ export class WorkbenchShell { const [instantiationService, serviceCollection] = this.initServiceCollection(parent.getHTMLElement()); // Workbench - this.workbench = instantiationService.createInstance(Workbench, parent.getHTMLElement(), workbenchContainer.getHTMLElement(), this.options, serviceCollection); + this.workbench = instantiationService.createInstance(Workbench, parent.getHTMLElement(), workbenchContainer.getHTMLElement(), this.configuration, this.options, serviceCollection); this.workbench.startup({ onWorkbenchStarted: (info: IWorkbenchStartedInfo) => { @@ -386,9 +386,6 @@ export class WorkbenchShell { const urlChannel = mainProcessClient.getChannel('url'); serviceCollection.set(IURLService, new SyncDescriptor(URLChannelClient, urlChannel, this.windowIPCService.getWindowId())); - const backupChannel = mainProcessClient.getChannel('backup'); - serviceCollection.set(IBackupService, new SyncDescriptor(BackupChannelClient, backupChannel)); - return [instantiationService, serviceCollection]; } diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index 15bfd13bb2261..d164d68516192 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -26,12 +26,11 @@ import { IWorkbenchEditorService, IResourceInputType } from 'vs/workbench/servic import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { IMessageService } from 'vs/platform/message/common/message'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; -import { IWindowsService, IWindowService, IWindowSettings } from 'vs/platform/windows/common/windows'; +import { IWindowsService, IWindowService, IWindowSettings, IWindowConfiguration, IPath, IOpenFileRequest } from 'vs/platform/windows/common/windows'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IWindowIPCService } from 'vs/workbench/services/window/electron-browser/windowService'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { IPath, IOpenFileRequest, IWindowConfiguration } from 'vs/workbench/electron-browser/common'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { ITitleService } from 'vs/workbench/services/title/common/titleService'; import { IWorkbenchThemeService, VS_HC_THEME, VS_DARK_THEME } from 'vs/workbench/services/themes/common/workbenchThemeService'; diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index ca0524e3014fd..a6dd942610213 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -83,7 +83,7 @@ import { TextModelResolverService } from 'vs/workbench/services/textmodelResolve import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { ILifecycleService, ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle'; -import { IWindowService } from 'vs/platform/windows/common/windows'; +import { IWindowService, IWindowConfiguration as IWindowSettings, IWindowConfiguration } from 'vs/platform/windows/common/windows'; import { IMessageService } from 'vs/platform/message/common/message'; import { IStatusbarService } from 'vs/platform/statusbar/common/statusbar'; import { IMenuService, SyncActionDescriptor } from 'vs/platform/actions/common/actions'; @@ -91,7 +91,6 @@ import { MenuService } from 'vs/platform/actions/common/menuService'; import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IWindowConfiguration } from 'vs/workbench/electron-browser/common'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; import { OpenRecentAction, ToggleDevToolsAction, ReloadWindowAction } from "vs/workbench/electron-browser/actions"; import { KeyMod } from 'vs/base/common/keyCodes'; @@ -104,6 +103,7 @@ export const NoEditorsVisibleContext: ContextKeyExpr = EditorsVisibleContext.toN interface WorkbenchParams { options: IOptions; + configuration: IWindowConfiguration; serviceCollection: ServiceCollection; } @@ -204,6 +204,7 @@ export class Workbench implements IPartService { constructor( parent: HTMLElement, container: HTMLElement, + configuration: IWindowConfiguration, options: IOptions, serviceCollection: ServiceCollection, @IInstantiationService private instantiationService: IInstantiationService, @@ -221,6 +222,7 @@ export class Workbench implements IPartService { this.workbenchParams = { options, + configuration, serviceCollection }; @@ -522,7 +524,7 @@ export class Workbench implements IPartService { serviceCollection.set(IHistoryService, new SyncDescriptor(HistoryService)); // Backup File Service - this.backupFileService = this.instantiationService.createInstance(BackupFileService); + this.backupFileService = this.instantiationService.createInstance(BackupFileService, this.workbenchParams.configuration.backupPath); serviceCollection.set(IBackupFileService, this.backupFileService); // Text File Service @@ -685,7 +687,7 @@ export class Workbench implements IPartService { return null; // not enabled when developing due to https://github.com/electron/electron/issues/3647 } - const windowConfig = this.configurationService.getConfiguration(); + const windowConfig = this.configurationService.getConfiguration(); if (windowConfig && windowConfig.window) { const useNativeTabs = windowConfig.window.nativeTabs; if (useNativeTabs) { diff --git a/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts b/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts index a4a4b1b9f8c00..5e82b8c104e7b 100644 --- a/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts +++ b/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts @@ -10,9 +10,8 @@ import { IWorkbenchContributionsRegistry, IWorkbenchContribution, Extensions as import { Registry } from 'vs/platform/platform'; import { IMessageService } from 'vs/platform/message/common/message'; import { IPreferencesService } from 'vs/workbench/parts/preferences/common/preferences'; -import { IWindowsService, IWindowService } from 'vs/platform/windows/common/windows'; +import { IWindowsService, IWindowService, IWindowConfiguration } from 'vs/platform/windows/common/windows'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IWindowConfiguration } from "vs/workbench/electron-browser/common"; import { localize } from 'vs/nls'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; diff --git a/src/vs/workbench/services/backup/node/backupFileService.ts b/src/vs/workbench/services/backup/node/backupFileService.ts index 8b1e2b5cd2365..223bddc599fc2 100644 --- a/src/vs/workbench/services/backup/node/backupFileService.ts +++ b/src/vs/workbench/services/backup/node/backupFileService.ts @@ -12,12 +12,9 @@ import pfs = require('vs/base/node/pfs'); import Uri from 'vs/base/common/uri'; import { Queue } from 'vs/base/common/async'; import { IBackupFileService, BACKUP_FILE_UPDATE_OPTIONS } from 'vs/workbench/services/backup/common/backup'; -import { IBackupService } from 'vs/platform/backup/common/backup'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IFileService } from 'vs/platform/files/common/files'; import { TPromise } from 'vs/base/common/winjs.base'; import { readToMatchingString } from 'vs/base/node/stream'; -import { IWindowService } from 'vs/platform/windows/common/windows'; import { TextSource, IRawTextSource } from 'vs/editor/common/model/textSource'; import { DefaultEndOfLine } from 'vs/editor/common/editorCommon'; @@ -96,7 +93,6 @@ export class BackupFileService implements IBackupFileService { private static readonly META_MARKER = '\n'; private isShuttingDown: boolean; - private backupWorkspacePath: string; private ready: TPromise; /** * Ensure IO operations on individual files are performed in order, this could otherwise lead @@ -105,32 +101,26 @@ export class BackupFileService implements IBackupFileService { private ioOperationQueues: { [path: string]: Queue }; constructor( - @IEnvironmentService private environmentService: IEnvironmentService, - @IFileService private fileService: IFileService, - @IWindowService windowService: IWindowService, - @IBackupService private backupService: IBackupService + private backupWorkspacePath: string, + @IFileService private fileService: IFileService ) { this.isShuttingDown = false; - this.ready = this.init(windowService.getCurrentWindowId()); this.ioOperationQueues = {}; + this.ready = this.init(); } private get backupEnabled(): boolean { - return !this.environmentService.isExtensionDevelopment; // Hot exit is disabled when doing extension development + return !!this.backupWorkspacePath; // Hot exit requires a backup path } - private init(windowId: number): TPromise { + private init(): TPromise { const model = new BackupFilesModel(); if (!this.backupEnabled) { return TPromise.as(model); } - return this.backupService.getBackupPath(windowId).then(backupPath => { - this.backupWorkspacePath = backupPath; - - return model.resolve(this.backupWorkspacePath); - }); + return model.resolve(this.backupWorkspacePath); } public hasBackups(): TPromise { diff --git a/src/vs/workbench/services/backup/test/backupFileService.test.ts b/src/vs/workbench/services/backup/test/backupFileService.test.ts index 0c5c56ed14efc..838f9333945bd 100644 --- a/src/vs/workbench/services/backup/test/backupFileService.test.ts +++ b/src/vs/workbench/services/backup/test/backupFileService.test.ts @@ -17,10 +17,7 @@ import Uri from 'vs/base/common/uri'; import { BackupFileService, BackupFilesModel } from 'vs/workbench/services/backup/node/backupFileService'; import { FileService } from 'vs/workbench/services/files/node/fileService'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; -import { IBackupService } from 'vs/platform/backup/common/backup'; import { parseArgs } from 'vs/platform/environment/node/argv'; -import { TPromise } from 'vs/base/common/winjs.base'; -import { TestWindowService } from 'vs/workbench/test/workbenchTestServices'; import { RawTextSource } from 'vs/editor/common/model/textSource'; class TestEnvironmentService extends EnvironmentService { @@ -51,13 +48,8 @@ const untitledBackupPath = path.join(workspaceBackupPath, 'untitled', crypto.cre class TestBackupFileService extends BackupFileService { constructor(workspace: Uri, backupHome: string, workspacesJsonPath: string) { const fileService = new FileService(workspace.fsPath, { disableWatcher: true }); - const environmentService = new TestEnvironmentService(backupHome, workspacesJsonPath); - const backupService: IBackupService = { - _serviceBrand: null, - getBackupPath: () => TPromise.as(workspaceBackupPath) - }; - super(environmentService, fileService, new TestWindowService(), backupService); + super(workspaceBackupPath, fileService); } public getBackupResource(resource: Uri, legacyMacWindowsFormat?: boolean): Uri { From 03bb0adf982f54dea6a63b757b10658baf042a1a Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 13 Jun 2017 08:24:57 +0200 Subject: [PATCH 1752/2747] Remember all UI state even for empty windows (fixes #207) (#28580) --- src/vs/code/electron-main/launch.ts | 2 +- src/vs/code/electron-main/menus.ts | 2 +- src/vs/code/electron-main/window.ts | 8 +- src/vs/code/electron-main/windows.ts | 380 +++++++++++------- .../platform/storage/common/storageService.ts | 30 +- .../storage/test/storageService.test.ts | 12 +- .../telemetry/common/telemetryUtils.ts | 1 + .../electron-browser/commonProperties.test.ts | 2 +- src/vs/platform/windows/common/windows.ts | 9 +- .../workbench/browser/parts/compositePart.ts | 10 +- .../browser/parts/editor/editorPart.ts | 6 +- .../browser/parts/panel/panelPart.ts | 1 + .../browser/parts/sidebar/sidebarPart.ts | 1 + .../common/editor/editorStacksModel.ts | 6 +- .../electron-browser/main.contribution.ts | 13 +- src/vs/workbench/electron-browser/shell.ts | 17 +- .../workbench/electron-browser/workbench.ts | 31 +- .../parts/backup/common/backupModelTracker.ts | 4 +- .../parts/backup/common/backupRestorer.ts | 8 +- .../debug/electron-browser/debugService.ts | 39 +- .../parts/debug/electron-browser/repl.ts | 7 +- .../parts/files/browser/files.contribution.ts | 2 +- .../parts/files/browser/views/explorerView.ts | 11 +- .../parts/search/browser/searchViewlet.ts | 8 +- .../services/backup/common/backup.ts | 5 + .../services/backup/node/backupFileService.ts | 2 +- src/vs/workbench/test/browser/part.test.ts | 2 +- src/vs/workbench/test/common/memento.test.ts | 2 +- .../workbench/test/workbenchTestServices.ts | 4 +- 29 files changed, 416 insertions(+), 209 deletions(-) diff --git a/src/vs/code/electron-main/launch.ts b/src/vs/code/electron-main/launch.ts index b3ad62b18fb65..14128133e0626 100644 --- a/src/vs/code/electron-main/launch.ts +++ b/src/vs/code/electron-main/launch.ts @@ -114,7 +114,7 @@ export class LaunchService implements ILaunchService { // If the other instance is waiting to be killed, we hook up a window listener if one window // is being used and only then resolve the startup promise which will kill this second instance - if (args.wait && usedWindows && usedWindows.length === 1 && usedWindows[0]) { + if (args.wait && usedWindows.length === 1 && usedWindows[0]) { const windowId = usedWindows[0].id; return new TPromise((c, e) => { diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index fe2206f6a363d..a2193ec6244f8 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -448,7 +448,7 @@ export class CodeMenu { return new MenuItem(this.likeAction(commandId, { label: this.unmnemonicLabel(tildify(path, this.environmentService.userHome)), click: (menuItem, win, event) => { const openInNewWindow = this.isOptionClick(event); - const success = !!this.windowsService.open({ context: OpenContext.MENU, cli: this.environmentService.args, pathsToOpen: [path], forceNewWindow: openInNewWindow }); + const success = this.windowsService.open({ context: OpenContext.MENU, cli: this.environmentService.args, pathsToOpen: [path], forceNewWindow: openInNewWindow }).length > 0; if (!success) { this.historyService.removeFromRecentPathsList(path); } diff --git a/src/vs/code/electron-main/window.ts b/src/vs/code/electron-main/window.ts index 36e059d804e64..94c907dd4cc3a 100644 --- a/src/vs/code/electron-main/window.ts +++ b/src/vs/code/electron-main/window.ts @@ -271,11 +271,15 @@ export class CodeWindow implements ICodeWindow { } public get openedWorkspacePath(): string { - return this.currentConfig.workspacePath; + return this.currentConfig ? this.currentConfig.workspacePath : void 0; + } + + public get backupPath(): string { + return this.currentConfig ? this.currentConfig.backupPath : void 0; } public get openedFilePath(): string { - return this.currentConfig.filesToOpen && this.currentConfig.filesToOpen[0] && this.currentConfig.filesToOpen[0].filePath; + return this.currentConfig && this.currentConfig.filesToOpen && this.currentConfig.filesToOpen[0] && this.currentConfig.filesToOpen[0].filePath; } public setReady(): void { diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 537b279af9322..f05f08784a81a 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -40,20 +40,18 @@ interface INewWindowState extends ISingleWindowState { interface IWindowState { workspacePath?: string; + backupPath: string; uiState: ISingleWindowState; } interface IWindowsState { lastActiveWindow?: IWindowState; lastPluginDevelopmentHostWindow?: IWindowState; - openedFolders: IWindowState[]; + openedWindows: IWindowState[]; + openedFolders?: IWindowState[]; // TODO@Ben deprecated } -const ReopenFoldersSetting = { - ALL: 'all', - ONE: 'one', - NONE: 'none' -}; +type RestoreWindowsSetting = 'all' | 'folders' | 'one' | 'none'; interface IOpenBrowserWindowOptions { userEnv?: IProcessEnvironment; @@ -72,6 +70,18 @@ interface IOpenBrowserWindowOptions { emptyWorkspaceBackupFolder?: string; } +interface IWindowToOpen extends IPath { + + // the workspace spath for a Code instance to open + workspacePath?: string; + + // the backup spath for a Code instance to use + backupPath?: string; + + // indicator to create the file path in the Code instance + createFilePath?: boolean; +} + export class WindowsManager implements IWindowsMainService { _serviceBrand: any; @@ -109,7 +119,16 @@ export class WindowsManager implements IWindowsMainService { @IConfigurationService private configurationService: IConfigurationService, @IHistoryMainService private historyService: IHistoryMainService ) { - this.windowsState = this.storageService.getItem(WindowsManager.windowsStateStorageKey) || { openedFolders: [] }; + this.windowsState = this.storageService.getItem(WindowsManager.windowsStateStorageKey) || { openedWindows: [] }; + + // TODO@Ben migration from previous openedFolders to new openedWindows property + if (Array.isArray(this.windowsState.openedFolders) && this.windowsState.openedFolders.length > 0) { + this.windowsState.openedWindows = this.windowsState.openedFolders; + this.windowsState.openedFolders = void 0; + } else if (!this.windowsState.openedWindows) { + this.windowsState.openedWindows = []; + } + this.fileDialog = new FileDialog(environmentService, telemetryService, storageService, this); } @@ -148,7 +167,8 @@ export class WindowsManager implements IWindowsMainService { // and then onBeforeWindowClose(). private onBeforeQuit(): void { const currentWindowsState: IWindowsState = { - openedFolders: [], + openedWindows: [], + openedFolders: [], // TODO@Ben migration so that old clients do not fail over data (prevents NPEs) lastPluginDevelopmentHostWindow: this.windowsState.lastPluginDevelopmentHostWindow, lastActiveWindow: this.lastClosedWindowState }; @@ -161,26 +181,27 @@ export class WindowsManager implements IWindowsMainService { } if (activeWindow) { - currentWindowsState.lastActiveWindow = { workspacePath: activeWindow.openedWorkspacePath, uiState: activeWindow.serializeWindowState() }; + currentWindowsState.lastActiveWindow = { workspacePath: activeWindow.openedWorkspacePath, uiState: activeWindow.serializeWindowState(), backupPath: activeWindow.backupPath }; } } // 2.) Find extension host window const extensionHostWindow = WindowsManager.WINDOWS.filter(w => w.isExtensionDevelopmentHost && !w.isExtensionTestHost)[0]; if (extensionHostWindow) { - currentWindowsState.lastPluginDevelopmentHostWindow = { workspacePath: extensionHostWindow.openedWorkspacePath, uiState: extensionHostWindow.serializeWindowState() }; + currentWindowsState.lastPluginDevelopmentHostWindow = { workspacePath: extensionHostWindow.openedWorkspacePath, uiState: extensionHostWindow.serializeWindowState(), backupPath: extensionHostWindow.backupPath }; } - // 3.) All windows with opened folders for N >= 2 to support reopenFolders: all or for auto update + // 3.) All windows (except extension host) for N >= 2 to support restoreWindows: all or for auto update // // Carefull here: asking a window for its window state after it has been closed returns bogus values (width: 0, height: 0) // so if we ever want to persist the UI state of the last closed window (window count === 1), it has // to come from the stored lastClosedWindowState on Win/Linux at least if (this.getWindowCount() > 1) { - currentWindowsState.openedFolders = WindowsManager.WINDOWS.filter(w => !!w.openedWorkspacePath && !w.isExtensionDevelopmentHost).map(w => { + currentWindowsState.openedWindows = WindowsManager.WINDOWS.filter(w => !w.isExtensionDevelopmentHost).map(w => { return { workspacePath: w.openedWorkspacePath, - uiState: w.serializeWindowState() + uiState: w.serializeWindowState(), + backupPath: w.backupPath }; }); } @@ -196,14 +217,14 @@ export class WindowsManager implements IWindowsMainService { } // On Window close, update our stored UI state of this window - const state: IWindowState = { workspacePath: win.openedWorkspacePath, uiState: win.serializeWindowState() }; + const state: IWindowState = { workspacePath: win.openedWorkspacePath, uiState: win.serializeWindowState(), backupPath: win.backupPath }; if (win.isExtensionDevelopmentHost && !win.isExtensionTestHost) { this.windowsState.lastPluginDevelopmentHostWindow = state; // do not let test run window state overwrite our extension development state } // Any non extension host window with same workspace else if (!win.isExtensionDevelopmentHost && !!win.openedWorkspacePath) { - this.windowsState.openedFolders.forEach(o => { + this.windowsState.openedWindows.forEach(o => { if (isEqual(o.workspacePath, win.openedWorkspacePath, !isLinux /* ignorecase */)) { o.uiState = state.uiState; } @@ -220,37 +241,79 @@ export class WindowsManager implements IWindowsMainService { } public open(openConfig: IOpenConfiguration): CodeWindow[] { + const windowsToOpen = this.getWindowsToOpen(openConfig); - // Find paths to open from config - const pathsToOpen = this.getPathsToOpen(openConfig); - if (!pathsToOpen) { - return null; // indicate to outside that open failed + // + // These are windows to open to show either folders or files (including diffing files or creating them) + // + const foldersToOpen = arrays.distinct(windowsToOpen.filter(win => win.workspacePath && !win.filePath).map(win => win.workspacePath), folder => isLinux ? folder : folder.toLowerCase()); // prevent duplicates + const emptyToOpen = windowsToOpen.filter(win => !win.workspacePath && !win.filePath && !win.backupPath).length; + + let filesToOpen = windowsToOpen.filter(path => !!path.filePath && !path.createFilePath); + let filesToCreate = windowsToOpen.filter(path => !!path.filePath && path.createFilePath); + let filesToDiff: IPath[]; + if (openConfig.diffMode && filesToOpen.length === 2) { + filesToDiff = filesToOpen; + filesToOpen = []; + filesToCreate = []; // diff ignores other files that do not exist + } else { + filesToDiff = []; } - let foldersToOpen = arrays.distinct(pathsToOpen.filter(iPath => iPath.workspacePath && !iPath.filePath).map(iPath => iPath.workspacePath), folder => isLinux ? folder : folder.toLowerCase()); // prevent duplicates - let foldersToRestore = (openConfig.initialStartup && !openConfig.cli.extensionDevelopmentPath) ? this.backupService.getWorkspaceBackupPaths() : []; - let filesToOpen: IPath[] = []; - let filesToDiff: IPath[] = []; - let filesToCreate = pathsToOpen.filter(iPath => !!iPath.filePath && iPath.createFilePath); - let emptyToOpen = pathsToOpen.filter(iPath => !iPath.workspacePath && !iPath.filePath); - let emptyToRestore = (openConfig.initialStartup && !openConfig.cli.extensionDevelopmentPath) ? this.backupService.getEmptyWorkspaceBackupPaths() : []; - - // Diff mode needs special care - const filesToOpenCandidates = pathsToOpen.filter(iPath => !!iPath.filePath && !iPath.createFilePath); - if (openConfig.diffMode) { - if (filesToOpenCandidates.length === 2) { - filesToDiff = filesToOpenCandidates; - } else { - emptyToOpen = [Object.create(null)]; // improper use of diffMode, open empty + // + // These are windows to restore because of hot-exit + // + const hotExitRestore = (openConfig.initialStartup && !openConfig.cli.extensionDevelopmentPath); + const foldersToRestore = hotExitRestore ? this.backupService.getWorkspaceBackupPaths() : []; + const emptyToRestore = hotExitRestore ? this.backupService.getEmptyWorkspaceBackupPaths() : []; + emptyToRestore.push(...windowsToOpen.filter(w => !w.workspacePath && w.backupPath).map(w => path.basename(w.backupPath))); // add empty windows with backupPath + + // Open based on config + const usedWindows = this.doOpen(openConfig, foldersToOpen, foldersToRestore, emptyToRestore, emptyToOpen, filesToOpen, filesToCreate, filesToDiff); + + // Make sure the last active window gets focus if we opened multiple + if (usedWindows.length > 1 && this.windowsState.lastActiveWindow) { + let lastActiveWindw = usedWindows.filter(w => w.backupPath === this.windowsState.lastActiveWindow.backupPath); + if (lastActiveWindw.length) { + lastActiveWindw[0].focus(); } + } - foldersToOpen = []; // diff is always in empty workspace - foldersToRestore = []; // diff is always in empty workspace - filesToCreate = []; // diff ignores other files that do not exist - } else { - filesToOpen = filesToOpenCandidates; + // Remember in recent document list (unless this opens for extension development) + // Also do not add paths when files are opened for diffing, only if opened individually + if (!usedWindows.some(w => w.isExtensionDevelopmentHost) && !openConfig.cli.diff) { + const recentPaths: { path: string; isFile?: boolean; }[] = []; + + windowsToOpen.forEach(win => { + if (win.filePath || win.workspacePath) { + recentPaths.push({ path: win.filePath || win.workspacePath, isFile: !!win.filePath }); + } + }); + + if (recentPaths.length) { + this.historyService.addToRecentPathsList(recentPaths); + } } + // Emit events + if (windowsToOpen.length) { + this._onPathsOpen.fire(windowsToOpen); + } + + return usedWindows; + } + + private doOpen( + openConfig: IOpenConfiguration, + foldersToOpen: string[], + foldersToRestore: string[], + emptyToRestore: string[], + emptyToOpen: number, + filesToOpen: IPath[], + filesToCreate: IPath[], + filesToDiff: IPath[] + ) { + // Settings can decide if files/folders open in new window or not let { openFolderInNewWindow, openFilesInNewWindow } = this.shouldOpenNewWindow(openConfig); @@ -380,8 +443,8 @@ export class WindowsManager implements IWindowsMainService { } // Only open empty if no empty workspaces were restored - else if (emptyToOpen.length > 0) { - emptyToOpen.forEach(() => { + else if (emptyToOpen > 0) { + for (let i = 0; i < emptyToOpen; i++) { const browserWindow = this.openInBrowserWindow({ userEnv: openConfig.userEnv, cli: openConfig.cli, @@ -392,140 +455,167 @@ export class WindowsManager implements IWindowsMainService { usedWindows.push(browserWindow); openFolderInNewWindow = true; // any other folders to open must open in new window then - }); - } - - // Remember in recent document list (unless this opens for extension development) - // Also do not add paths when files are opened for diffing, only if opened individually - if (!usedWindows.some(w => w.isExtensionDevelopmentHost) && !openConfig.cli.diff) { - const recentPaths: { path: string; isFile?: boolean; }[] = []; - - pathsToOpen.forEach(iPath => { - if (iPath.filePath || iPath.workspacePath) { - recentPaths.push({ path: iPath.filePath || iPath.workspacePath, isFile: !!iPath.filePath }); - } - }); - - if (recentPaths.length) { - this.historyService.addToRecentPathsList(recentPaths); } } - // Emit events - this._onPathsOpen.fire(pathsToOpen); - return arrays.distinct(usedWindows); } - private getPathsToOpen(openConfig: IOpenConfiguration): IPath[] { - let iPathsToOpen: IPath[]; + private getWindowsToOpen(openConfig: IOpenConfiguration): IWindowToOpen[] { + let windowsToOpen: IWindowToOpen[]; - // Find paths from provided paths if any + // Extract paths: from API if (openConfig.pathsToOpen && openConfig.pathsToOpen.length > 0) { - iPathsToOpen = openConfig.pathsToOpen.map(pathToOpen => { - const iPath = this.toIPath(pathToOpen, false, openConfig.cli && openConfig.cli.goto); - - // Warn if the requested path to open does not exist - if (!iPath) { - const options: Electron.ShowMessageBoxOptions = { - title: product.nameLong, - type: 'info', - buttons: [nls.localize('ok', "OK")], - message: nls.localize('pathNotExistTitle', "Path does not exist"), - detail: nls.localize('pathNotExistDetail', "The path '{0}' does not seem to exist anymore on disk.", pathToOpen), - noLink: true - }; - - const activeWindow = BrowserWindow.getFocusedWindow(); - if (activeWindow) { - dialog.showMessageBox(activeWindow, options); - } else { - dialog.showMessageBox(options); - } - } - - return iPath; - }); - - // get rid of nulls - iPathsToOpen = arrays.coalesce(iPathsToOpen); - - if (iPathsToOpen.length === 0) { - return null; // indicate to outside that open failed - } + windowsToOpen = this.doExtractPathsFromAPI(openConfig.pathsToOpen, openConfig.cli && openConfig.cli.goto); } // Check for force empty else if (openConfig.forceEmpty) { - iPathsToOpen = [Object.create(null)]; + windowsToOpen = [Object.create(null)]; } - // Otherwise infer from command line arguments + // Extract paths: from CLI else if (openConfig.cli._.length > 0) { - iPathsToOpen = this.doExtractPathsFromCLI(openConfig.cli); + windowsToOpen = this.doExtractPathsFromCLI(openConfig.cli); } - // Finally check for paths from previous session + // Extract windows: from previous session else { - iPathsToOpen = this.doExtractPathsFromLastSession(); + windowsToOpen = this.doGetWindowsFromLastSession(); } - return iPathsToOpen; + return windowsToOpen; } - private doExtractPathsFromCLI(cli: ParsedArgs): IPath[] { - const candidates: string[] = cli._; + private doExtractPathsFromAPI(paths: string[], gotoLineMode: boolean): IPath[] { + let pathsToOpen = paths.map(pathToOpen => { + const path = this.parsePath(pathToOpen, false, gotoLineMode); + + // Warn if the requested path to open does not exist + if (!path) { + const options: Electron.ShowMessageBoxOptions = { + title: product.nameLong, + type: 'info', + buttons: [nls.localize('ok', "OK")], + message: nls.localize('pathNotExistTitle', "Path does not exist"), + detail: nls.localize('pathNotExistDetail', "The path '{0}' does not seem to exist anymore on disk.", pathToOpen), + noLink: true + }; + + const activeWindow = BrowserWindow.getFocusedWindow(); + if (activeWindow) { + dialog.showMessageBox(activeWindow, options); + } else { + dialog.showMessageBox(options); + } + } - const iPaths = candidates.map(candidate => this.toIPath(candidate, true /* ignoreFileNotFound */, cli.goto)).filter(path => !!path); - if (iPaths.length > 0) { - return iPaths; + return path; + }); + + // get rid of nulls + pathsToOpen = arrays.coalesce(pathsToOpen); + + return pathsToOpen; + } + + private doExtractPathsFromCLI(cli: ParsedArgs): IPath[] { + const pathsToOpen = cli._.map(candidate => this.parsePath(candidate, true /* ignoreFileNotFound */, cli.goto)).filter(path => !!path); + if (pathsToOpen.length > 0) { + return pathsToOpen; } // No path provided, return empty to open empty return [Object.create(null)]; } - private doExtractPathsFromLastSession(): IPath[] { - const candidates: string[] = []; + private doGetWindowsFromLastSession(): IWindowToOpen[] { + const restoreWindows = this.getRestoreWindowsSetting(); + const lastActiveWindow = this.windowsState.lastActiveWindow; - let reopenFolders: string; - if (this.lifecycleService.wasRestarted) { - reopenFolders = ReopenFoldersSetting.ALL; // always reopen all folders when an update was applied - } else { - const windowConfig = this.configurationService.getConfiguration('window'); - reopenFolders = (windowConfig && windowConfig.reopenFolders) || ReopenFoldersSetting.ONE; - } + switch (restoreWindows) { - const lastActiveFolder = this.windowsState.lastActiveWindow && this.windowsState.lastActiveWindow.workspacePath; + // none: we always open an empty window + case 'none': + return [Object.create(null)]; - // Restore all - if (reopenFolders === ReopenFoldersSetting.ALL) { - const lastOpenedFolders = this.windowsState.openedFolders.map(o => o.workspacePath); + // one: restore last opened folder or empty window + case 'one': + if (lastActiveWindow) { - // If we have a last active folder, move it to the end - if (lastActiveFolder) { - lastOpenedFolders.splice(lastOpenedFolders.indexOf(lastActiveFolder), 1); - lastOpenedFolders.push(lastActiveFolder); - } + // return folder path if it is valid + const folder = lastActiveWindow.workspacePath; + if (folder) { + const validatedFolderPath = this.parsePath(folder); + if (validatedFolderPath) { + return [validatedFolderPath]; + } + } - candidates.push(...lastOpenedFolders); - } + // otherwise use backup path to restore empty windows + else if (lastActiveWindow.backupPath) { + return [{ backupPath: lastActiveWindow.backupPath }]; + } + } + break; + + // all: restore all windows + // folders: restore last opened folders only + case 'all': + case 'folders': + + // Windows with Folders + const lastOpenedFolders = this.windowsState.openedWindows.filter(w => !!w.workspacePath).map(o => o.workspacePath); + const lastActiveFolder = lastActiveWindow && lastActiveWindow.workspacePath; + if (lastActiveFolder) { + lastOpenedFolders.push(lastActiveFolder); + } - // Restore last active - else if (lastActiveFolder && (reopenFolders === ReopenFoldersSetting.ONE || reopenFolders !== ReopenFoldersSetting.NONE)) { - candidates.push(lastActiveFolder); - } + const windowsToOpen = lastOpenedFolders.map(candidate => this.parsePath(candidate)).filter(path => !!path); - const iPaths = candidates.map(candidate => this.toIPath(candidate)).filter(path => !!path); - if (iPaths.length > 0) { - return iPaths; + // Windows that were Empty + if (restoreWindows === 'all') { + const lastOpenedEmpty = this.windowsState.openedWindows.filter(w => !w.workspacePath && w.backupPath).map(w => w.backupPath); + const lastActiveEmpty = lastActiveWindow && !lastActiveWindow.workspacePath && lastActiveWindow.backupPath; + if (lastActiveEmpty) { + lastOpenedEmpty.push(lastActiveEmpty); + } + + windowsToOpen.push(...lastOpenedEmpty.map(backupPath => ({ backupPath }))); + } + + if (windowsToOpen.length > 0) { + return windowsToOpen; + } + + break; } - // No path provided, return empty to open empty + // Always fallback to empty window return [Object.create(null)]; } - private toIPath(anyPath: string, ignoreFileNotFound?: boolean, gotoLineMode?: boolean): IPath { + private getRestoreWindowsSetting(): RestoreWindowsSetting { + let restoreWindows: RestoreWindowsSetting; + if (this.lifecycleService.wasRestarted) { + restoreWindows = 'all'; // always reopen all windows when an update was applied + } else { + const windowConfig = this.configurationService.getConfiguration('window'); + restoreWindows = (windowConfig && windowConfig.restoreWindows) as RestoreWindowsSetting; + + if (windowConfig && windowConfig.restoreWindows === 'one' /* default */ && windowConfig.reopenFolders) { + restoreWindows = windowConfig.reopenFolders; // TODO@Ben migration + } + + if (['all', 'folders', 'one', 'none'].indexOf(restoreWindows) === -1) { + restoreWindows = 'one'; + } + } + + return restoreWindows; + } + + private parsePath(anyPath: string, ignoreFileNotFound?: boolean, gotoLineMode?: boolean): IWindowToOpen { if (!anyPath) { return null; } @@ -632,6 +722,14 @@ export class WindowsManager implements IWindowsMainService { configuration.filesToDiff = options.filesToDiff; configuration.nodeCachedDataDir = this.environmentService.nodeCachedDataDir; + // if we know the backup folder upfront (for empty workspaces to restore), we can set it + // directly here which helps for restoring UI state associated with that window. + // For all other cases we first call into registerWindowForBackupsSync() to set it before + // loading the window. + if (options.emptyWorkspaceBackupFolder) { + configuration.backupPath = path.join(this.environmentService.backupHome, options.emptyWorkspaceBackupFolder); + } + let codeWindow: CodeWindow; if (!options.forceNewWindow) { @@ -728,7 +826,15 @@ export class WindowsManager implements IWindowsMainService { // Known Folder - load from stored settings if any if (configuration.workspacePath) { - const stateForWorkspace = this.windowsState.openedFolders.filter(o => isEqual(o.workspacePath, configuration.workspacePath, !isLinux /* ignorecase */)).map(o => o.uiState); + const stateForWorkspace = this.windowsState.openedWindows.filter(o => isEqual(o.workspacePath, configuration.workspacePath, !isLinux /* ignorecase */)).map(o => o.uiState); + if (stateForWorkspace.length) { + return stateForWorkspace[0]; + } + } + + // Empty workspace with backups + else if (configuration.backupPath) { + const stateForWorkspace = this.windowsState.openedWindows.filter(o => o.backupPath === configuration.backupPath).map(o => o.uiState); if (stateForWorkspace.length) { return stateForWorkspace[0]; } @@ -845,9 +951,7 @@ export class WindowsManager implements IWindowsMainService { } // No window - open new empty one - const res = this.open({ context, cli, forceEmpty: true }); - - return res && res[0]; + return this.open({ context, cli, forceEmpty: true })[0]; } public getLastActiveWindow(): CodeWindow { diff --git a/src/vs/platform/storage/common/storageService.ts b/src/vs/platform/storage/common/storageService.ts index 1fca3d8262b0f..82952ee5dbdf0 100644 --- a/src/vs/platform/storage/common/storageService.ts +++ b/src/vs/platform/storage/common/storageService.ts @@ -8,7 +8,6 @@ import types = require('vs/base/common/types'); import errors = require('vs/base/common/errors'); import strings = require('vs/base/common/strings'); import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; -import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import URI from "vs/base/common/uri"; // Browser localStorage interface @@ -21,6 +20,12 @@ export interface IStorage { removeItem(key: string): void; } +export interface IWorkspaceStorageIdentifier { + resource: URI; + uid?: number; + name?: string; +} + export class StorageService implements IStorageService { public _serviceBrand: any; @@ -39,18 +44,18 @@ export class StorageService implements IStorageService { constructor( globalStorage: IStorage, workspaceStorage: IStorage, - @IWorkspaceContextService contextService: IWorkspaceContextService + workspaceIdentifier?: IWorkspaceStorageIdentifier ) { this.globalStorage = globalStorage; this.workspaceStorage = workspaceStorage || globalStorage; // Calculate workspace storage key - const workspace = contextService.getWorkspace(); - this.workspaceKey = this.getWorkspaceKey(workspace ? workspace.resource : void 0); + this.workspaceKey = this.getWorkspaceKey(workspaceIdentifier ? workspaceIdentifier.resource : void 0); // Make sure to delete all workspace storage if the workspace has been recreated meanwhile - if (workspace && types.isNumber(workspace.uid)) { - this.cleanupWorkspaceScope(workspace.uid, workspace.name); + // which is only possible if a UID property is provided that we can check on + if (workspaceIdentifier && types.isNumber(workspaceIdentifier.uid)) { + this.cleanupWorkspaceScope(workspaceIdentifier.uid, workspaceIdentifier.name); } } @@ -59,15 +64,16 @@ export class StorageService implements IStorageService { return StorageService.NO_WORKSPACE_IDENTIFIER; } - const workspaceIdStr = workspaceId.toString(); + let workspaceIdStr = workspaceId.toString(); - const root = 'file:///'; - const index = workspaceIdStr.indexOf(root); - if (index === 0) { - return `${strings.rtrim(workspaceIdStr.substr(root.length), '/')}/`; + // Special case file:// URIs: strip protocol from key to produce shorter key + const fileProtocol = 'file:///'; + if (workspaceIdStr.indexOf(fileProtocol) === 0) { + workspaceIdStr = workspaceIdStr.substr(fileProtocol.length); } - return workspaceIdStr; + // Always end with "/" + return `${strings.rtrim(workspaceIdStr, '/')}/`; } private cleanupWorkspaceScope(workspaceId: number, workspaceName: string): void { diff --git a/src/vs/platform/storage/test/storageService.test.ts b/src/vs/platform/storage/test/storageService.test.ts index 2765ef994c130..ed156bfabc731 100644 --- a/src/vs/platform/storage/test/storageService.test.ts +++ b/src/vs/platform/storage/test/storageService.test.ts @@ -24,7 +24,7 @@ suite('Workbench StorageSevice', () => { }); test('Swap Data with undefined default value', () => { - let s = new StorageService(new InMemoryLocalStorage(), null, contextService); + let s = new StorageService(new InMemoryLocalStorage(), null, contextService.getWorkspace()); s.swap('Monaco.IDE.Core.Storage.Test.swap', 'foobar', 'barfoo'); assert.strictEqual('foobar', s.get('Monaco.IDE.Core.Storage.Test.swap')); @@ -35,7 +35,7 @@ suite('Workbench StorageSevice', () => { }); test('Remove Data', () => { - let s = new StorageService(new InMemoryLocalStorage(), null, contextService); + let s = new StorageService(new InMemoryLocalStorage(), null, contextService.getWorkspace()); s.store('Monaco.IDE.Core.Storage.Test.remove', 'foobar'); assert.strictEqual('foobar', s.get('Monaco.IDE.Core.Storage.Test.remove')); @@ -44,7 +44,7 @@ suite('Workbench StorageSevice', () => { }); test('Get Data, Integer, Boolean', () => { - let s = new StorageService(new InMemoryLocalStorage(), null, contextService); + let s = new StorageService(new InMemoryLocalStorage(), null, contextService.getWorkspace()); assert.strictEqual(s.get('Monaco.IDE.Core.Storage.Test.get', StorageScope.GLOBAL, 'foobar'), 'foobar'); assert.strictEqual(s.get('Monaco.IDE.Core.Storage.Test.get', StorageScope.GLOBAL, ''), ''); @@ -78,14 +78,14 @@ suite('Workbench StorageSevice', () => { test('StorageSevice cleans up when workspace changes', () => { let storageImpl = new InMemoryLocalStorage(); - let s = new StorageService(storageImpl, null, contextService); + let s = new StorageService(storageImpl, null, contextService.getWorkspace()); s.store('key1', 'foobar'); s.store('key2', 'something'); s.store('wkey1', 'foo', StorageScope.WORKSPACE); s.store('wkey2', 'foo2', StorageScope.WORKSPACE); - s = new StorageService(storageImpl, null, contextService); + s = new StorageService(storageImpl, null, contextService.getWorkspace()); assert.strictEqual(s.get('key1', StorageScope.GLOBAL), 'foobar'); assert.strictEqual(s.get('key1', StorageScope.WORKSPACE, null), null); @@ -97,7 +97,7 @@ suite('Workbench StorageSevice', () => { let ws: any = clone(TestWorkspace); ws.uid = new Date().getTime() + 100; instantiationService.stub(IWorkspaceContextService, 'getWorkspace', ws); - s = new StorageService(storageImpl, null, contextService); + s = new StorageService(storageImpl, null, contextService.getWorkspace()); assert.strictEqual(s.get('key1', StorageScope.GLOBAL), 'foobar'); assert.strictEqual(s.get('key1', StorageScope.WORKSPACE, null), null); diff --git a/src/vs/platform/telemetry/common/telemetryUtils.ts b/src/vs/platform/telemetry/common/telemetryUtils.ts index 0637bd49c3389..516a0320f0ae5 100644 --- a/src/vs/platform/telemetry/common/telemetryUtils.ts +++ b/src/vs/platform/telemetry/common/telemetryUtils.ts @@ -265,6 +265,7 @@ const configurationValueWhitelist = [ 'window.openFilesInNewWindow', 'javascript.validate.enable', 'window.reopenFolders', + 'window.restoreWindows', 'extensions.autoUpdate', 'files.eol', 'explorer.openEditors.visible', diff --git a/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts b/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts index 54bd6cb56184b..61a93db8637b0 100644 --- a/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts +++ b/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts @@ -22,7 +22,7 @@ suite('Telemetry - common properties', function () { let instantiationService = new TestInstantiationService(); let contextService = instantiationService.stub(IWorkspaceContextService, WorkspaceContextService); instantiationService.stub(IWorkspaceContextService, 'getWorkspace', TestWorkspace); - storageService = new StorageService(new InMemoryLocalStorage(), null, contextService); + storageService = new StorageService(new InMemoryLocalStorage(), null, contextService.getWorkspace()); }); test('default', function () { diff --git a/src/vs/platform/windows/common/windows.ts b/src/vs/platform/windows/common/windows.ts index 4cb6db0cac35f..9c5a90e9c0cfc 100644 --- a/src/vs/platform/windows/common/windows.ts +++ b/src/vs/platform/windows/common/windows.ts @@ -104,7 +104,8 @@ export interface IWindowConfiguration { export interface IWindowSettings { openFilesInNewWindow: 'on' | 'off' | 'default'; openFoldersInNewWindow: 'on' | 'off' | 'default'; - reopenFolders: 'all' | 'one' | 'none'; + restoreWindows: 'all' | 'folders' | 'one' | 'none'; + reopenFolders: 'all' | 'one' | 'none'; // TODO@Ben deprecated restoreFullscreen: boolean; zoomLevel: number; titleBarStyle: 'native' | 'custom'; @@ -161,9 +162,6 @@ export enum ReadyState { export interface IPath { - // the workspace spath for a Code instance which can be null - workspacePath?: string; - // the file path to open within a Code instance filePath?: string; @@ -172,9 +170,6 @@ export interface IPath { // the column number in the file path to open columnNumber?: number; - - // indicator to create the file path in the Code instance - createFilePath?: boolean; } export interface IOpenFileRequest { diff --git a/src/vs/workbench/browser/parts/compositePart.ts b/src/vs/workbench/browser/parts/compositePart.ts index dea7bce19b3e7..8800ba124fc9c 100644 --- a/src/vs/workbench/browser/parts/compositePart.ts +++ b/src/vs/workbench/browser/parts/compositePart.ts @@ -80,6 +80,7 @@ export abstract class CompositePart extends Part { themeService: IThemeService, private registry: CompositeRegistry, private activeCompositeSettingsKey: string, + private defaultCompositeId: string, private nameForTelemetry: string, private compositeCSSClass: string, private actionContributionScope: string, @@ -96,7 +97,7 @@ export abstract class CompositePart extends Part { this.activeComposite = null; this.instantiatedComposites = []; this.compositeLoaderPromises = {}; - this.lastActiveCompositeId = storageService.get(activeCompositeSettingsKey, StorageScope.WORKSPACE); + this.lastActiveCompositeId = storageService.get(activeCompositeSettingsKey, StorageScope.WORKSPACE, this.defaultCompositeId); } protected openComposite(id: string, focus?: boolean): TPromise { @@ -221,7 +222,12 @@ export abstract class CompositePart extends Part { this.activeComposite = composite; // Store in preferences - this.storageService.store(this.activeCompositeSettingsKey, this.activeComposite.getId(), StorageScope.WORKSPACE); + const id = this.activeComposite.getId(); + if (id !== this.defaultCompositeId) { + this.storageService.store(this.activeCompositeSettingsKey, id, StorageScope.WORKSPACE); + } else { + this.storageService.remove(this.activeCompositeSettingsKey, StorageScope.WORKSPACE); + } // Remember this.lastActiveCompositeId = this.activeComposite.getId(); diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index c1a20ee5dea1c..f0db5dc5baf37 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -1250,7 +1250,11 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService // Persist UI State const editorState: IEditorPartUIState = { ratio: this.editorGroupsControl.getRatio(), groupOrientation: this.editorGroupsControl.getGroupOrientation() }; - this.memento[EditorPart.EDITOR_PART_UI_STATE_STORAGE_KEY] = editorState; + if (editorState.ratio.length || editorState.groupOrientation !== 'vertical') { + this.memento[EditorPart.EDITOR_PART_UI_STATE_STORAGE_KEY] = editorState; + } else { + delete this.memento[EditorPart.EDITOR_PART_UI_STATE_STORAGE_KEY]; + } // Unload all Instantiated Editors for (let i = 0; i < this.instantiatedEditors.length; i++) { diff --git a/src/vs/workbench/browser/parts/panel/panelPart.ts b/src/vs/workbench/browser/parts/panel/panelPart.ts index f3334acfe7889..a5a9f981b4238 100644 --- a/src/vs/workbench/browser/parts/panel/panelPart.ts +++ b/src/vs/workbench/browser/parts/panel/panelPart.ts @@ -61,6 +61,7 @@ export class PanelPart extends CompositePart implements IPanelService { themeService, Registry.as(PanelExtensions.Panels), PanelPart.activePanelSettingsKey, + Registry.as(PanelExtensions.Panels).getDefaultPanelId(), 'panel', 'panel', Scope.PANEL, diff --git a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts index 0bdf5e478a007..2e68646b26ecd 100644 --- a/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts +++ b/src/vs/workbench/browser/parts/sidebar/sidebarPart.ts @@ -58,6 +58,7 @@ export class SidebarPart extends CompositePart { themeService, Registry.as(ViewletExtensions.Viewlets), SidebarPart.activeViewletSettingsKey, + Registry.as(ViewletExtensions.Viewlets).getDefaultViewletId(), 'sideBar', 'viewlet', Scope.VIEWLET, diff --git a/src/vs/workbench/common/editor/editorStacksModel.ts b/src/vs/workbench/common/editor/editorStacksModel.ts index c61412c99f808..c6bd0d5602b20 100644 --- a/src/vs/workbench/common/editor/editorStacksModel.ts +++ b/src/vs/workbench/common/editor/editorStacksModel.ts @@ -1064,7 +1064,11 @@ export class EditorStacksModel implements IEditorStacksModel { private save(): void { const serialized = this.serialize(); - this.storageService.store(EditorStacksModel.STORAGE_KEY, JSON.stringify(serialized), StorageScope.WORKSPACE); + if (serialized.groups.length) { + this.storageService.store(EditorStacksModel.STORAGE_KEY, JSON.stringify(serialized), StorageScope.WORKSPACE); + } else { + this.storageService.remove(EditorStacksModel.STORAGE_KEY, StorageScope.WORKSPACE); + } } private serialize(): ISerializedEditorStacksModel { diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts index 380b33dc7e8ab..1f362b099dbe5 100644 --- a/src/vs/workbench/electron-browser/main.contribution.ts +++ b/src/vs/workbench/electron-browser/main.contribution.ts @@ -221,16 +221,17 @@ Note that there can still be cases where this setting is ignored (e.g. when usin Note that there can still be cases where this setting is ignored (e.g. when using the -new-window or -reuse-window command line option).` ) }, - 'window.reopenFolders': { + 'window.restoreWindows': { 'type': 'string', - 'enum': ['none', 'one', 'all'], + 'enum': ['all', 'folders', 'one', 'none'], 'enumDescriptions': [ - nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.reopenFolders.none' }, "Never reopen a folder."), - nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.reopenFolders.one' }, "Reopen the last active folder."), - nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.reopenFolders.all' }, "Reopen all folders of the last session."), + nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.reopenFolders.all' }, "Reopen all windows."), + nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.reopenFolders.folders' }, "Reopen all folders. Empty windows will not be restored."), + nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.reopenFolders.one' }, "Reopen the last active window."), + nls.localize({ comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'], key: 'window.reopenFolders.none' }, "Never reopen a window. Always start with an empty one.") ], 'default': 'one', - 'description': nls.localize('reopenFolders', "Controls how folders are being reopened after a restart. Select 'none' to never reopen a folder, 'one' to reopen the last folder you worked on or 'all' to reopen all folders of your last session.") + 'description': nls.localize('restoreWindows', "Controls how windows are being reopened after a restart. Select 'none' to always start with an empty window, 'one' to reopen the last window you worked on, 'folders' to reopen all folders you had opened or 'all' to reopen all windows of your last session.") }, 'window.restoreFullscreen': { 'type': 'boolean', diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index cce0d8cf30061..00becc599ff09 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -89,6 +89,8 @@ import { IURLService } from 'vs/platform/url/common/url'; import { ExtensionHostProcessWorker } from 'vs/workbench/electron-browser/extensionHost'; import { ITimerService } from 'vs/workbench/services/timer/common/timerService'; import { remote, ipcRenderer as ipc } from 'electron'; +import URI from "vs/base/common/uri"; +import { basename } from "path"; import { ITextMateService } from 'vs/editor/node/textMate/textMateService'; import { MainProcessTextMateSyntax } from 'vs/editor/electron-browser/textMate/TMSyntax'; import { BareFontInfo } from 'vs/editor/common/config/fontInfo'; @@ -272,8 +274,19 @@ export class WorkbenchShell { .done(client => client.registerChannel('choice', instantiationService.createInstance(ChoiceChannel))); // Storage Sevice - const disableWorkspaceStorage = this.environmentService.extensionTestsPath || (!this.contextService.hasWorkspace() && !this.environmentService.isExtensionDevelopment); // without workspace or in any extension test, we use inMemory storage unless we develop an extension where we want to preserve state - this.storageService = instantiationService.createInstance(StorageService, window.localStorage, disableWorkspaceStorage ? inMemoryLocalStorageInstance : window.localStorage); + let workspaceIdentifier = this.contextService.getWorkspace(); + if (!workspaceIdentifier && !!this.configuration.backupPath) { + // if we do not have a workspace open, we need to find another identifier for the window to store + // workspace UI state. if we have a backup path in the configuration we can use that because this + // will be a unique identifier per window that is stable between restarts as long as there are + // dirty files in the workspace. + // We use basename() to produce a short identifier, we do not need the full path. We use a custom + // scheme so that we can later distinguish these identifiers from the workspace one. + workspaceIdentifier = { resource: URI.from({ path: basename(this.configuration.backupPath), scheme: 'empty' }) }; + } + const disableStorage = !!this.environmentService.extensionTestsPath; // never keep any state when running extension tests! + const storage = disableStorage ? inMemoryLocalStorageInstance : window.localStorage; + this.storageService = new StorageService(storage, storage, workspaceIdentifier); serviceCollection.set(IStorageService, this.storageService); // Warm up font cache information before building up too many dom elements diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index a6dd942610213..d5b3f3bd621d7 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -751,15 +751,21 @@ export class Workbench implements IPartService { // If sidebar becomes visible, show last active Viewlet or default viewlet else if (!hidden && !this.sidebarPart.getActiveViewlet()) { - const viewletToOpen = this.sidebarPart.getLastActiveViewletId() || this.viewletService.getDefaultViewletId(); + const viewletToOpen = this.sidebarPart.getLastActiveViewletId(); if (viewletToOpen) { promise = this.sidebarPart.openViewlet(viewletToOpen, true); } } return promise.then(() => { + // Remember in settings - this.storageService.store(Workbench.sidebarHiddenSettingKey, hidden ? 'true' : 'false', StorageScope.WORKSPACE); + const defaultHidden = !this.contextService.hasWorkspace(); + if (hidden !== defaultHidden) { + this.storageService.store(Workbench.sidebarHiddenSettingKey, hidden ? 'true' : 'false', StorageScope.WORKSPACE); + } else { + this.storageService.remove(Workbench.sidebarHiddenSettingKey, StorageScope.WORKSPACE); + } // Layout if (!skipLayout) { @@ -778,8 +784,8 @@ export class Workbench implements IPartService { this.workbench.removeClass('nopanel'); } - let promise = TPromise.as(null); // If panel part becomes hidden, also hide the current active panel if any + let promise = TPromise.as(null); if (hidden && this.panelPart.getActivePanel()) { promise = this.panelPart.hideActivePanel().then(() => { // Pass Focus to Editor if Panel part is now hidden @@ -792,16 +798,20 @@ export class Workbench implements IPartService { // If panel part becomes visible, show last active panel or default panel else if (!hidden && !this.panelPart.getActivePanel()) { - const registry = Registry.as(PanelExtensions.Panels); - const panelToOpen = this.panelPart.getLastActivePanelId() || registry.getDefaultPanelId(); + const panelToOpen = this.panelPart.getLastActivePanelId(); if (panelToOpen) { promise = this.panelPart.openPanel(panelToOpen, true); } } return promise.then(() => { + // Remember in settings - this.storageService.store(Workbench.panelHiddenSettingKey, hidden ? 'true' : 'false', StorageScope.WORKSPACE); + if (!hidden) { + this.storageService.store(Workbench.panelHiddenSettingKey, 'false', StorageScope.WORKSPACE); + } else { + this.storageService.remove(Workbench.panelHiddenSettingKey, StorageScope.WORKSPACE); + } // Layout if (!skipLayout) { @@ -871,9 +881,14 @@ export class Workbench implements IPartService { this.storageService.store(Workbench.sidebarRestoreSettingKey, 'true', StorageScope.WORKSPACE); } - const zenConfig = this.configurationService.getConfiguration('zenMode'); // Preserve zen mode only on reload. Real quit gets out of zen mode so novice users do not get stuck in zen mode. - this.storageService.store(Workbench.zenModeActiveSettingKey, (zenConfig.restore || reason === ShutdownReason.RELOAD) && this.zenMode.active, StorageScope.WORKSPACE); + const zenConfig = this.configurationService.getConfiguration('zenMode'); + const zenModeActive = (zenConfig.restore || reason === ShutdownReason.RELOAD) && this.zenMode.active; + if (zenModeActive) { + this.storageService.store(Workbench.zenModeActiveSettingKey, true, StorageScope.WORKSPACE); + } else { + this.storageService.remove(Workbench.zenModeActiveSettingKey, StorageScope.WORKSPACE); + } // Pass shutdown on to each participant this.toShutdown.forEach(s => s.shutdown()); diff --git a/src/vs/workbench/parts/backup/common/backupModelTracker.ts b/src/vs/workbench/parts/backup/common/backupModelTracker.ts index fa7bb0e535647..71f7fd5d0dde4 100644 --- a/src/vs/workbench/parts/backup/common/backupModelTracker.ts +++ b/src/vs/workbench/parts/backup/common/backupModelTracker.ts @@ -11,7 +11,6 @@ import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ITextFileService, TextFileModelChangeEvent, StateChange } from 'vs/workbench/services/textfile/common/textfiles'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IFilesConfiguration, AutoSaveConfiguration, CONTENT_CHANGE_EVENT_BUFFER_DELAY } from 'vs/platform/files/common/files'; @@ -29,7 +28,6 @@ export class BackupModelTracker implements IWorkbenchContribution { @IBackupFileService private backupFileService: IBackupFileService, @ITextFileService private textFileService: ITextFileService, @IUntitledEditorService private untitledEditorService: IUntitledEditorService, - @IEnvironmentService private environmentService: IEnvironmentService, @IConfigurationService private configurationService: IConfigurationService ) { this.toDispose = []; @@ -38,7 +36,7 @@ export class BackupModelTracker implements IWorkbenchContribution { } private registerListeners() { - if (this.environmentService.isExtensionDevelopment) { + if (!this.backupFileService.backupEnabled) { return; } diff --git a/src/vs/workbench/parts/backup/common/backupRestorer.ts b/src/vs/workbench/parts/backup/common/backupRestorer.ts index 3b64fdda7ad54..a20f365912db4 100644 --- a/src/vs/workbench/parts/backup/common/backupRestorer.ts +++ b/src/vs/workbench/parts/backup/common/backupRestorer.ts @@ -8,7 +8,6 @@ import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; import { IUntitledEditorService, UNTITLED_SCHEMA } from 'vs/workbench/services/untitled/common/untitledEditorService'; -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { IPartService } from 'vs/workbench/services/part/common/partService'; import errors = require('vs/base/common/errors'); @@ -25,7 +24,6 @@ export class BackupRestorer implements IWorkbenchContribution { constructor( @IUntitledEditorService private untitledEditorService: IUntitledEditorService, - @IEnvironmentService private environmentService: IEnvironmentService, @IPartService private partService: IPartService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IBackupFileService private backupFileService: IBackupFileService, @@ -36,7 +34,7 @@ export class BackupRestorer implements IWorkbenchContribution { } private restoreBackups(): void { - if (!this.environmentService.isExtensionDevelopment) { + if (this.backupFileService.backupEnabled) { this.partService.joinCreation().then(() => { this.doRestoreBackups().done(null, errors.onUnexpectedError); }); @@ -55,7 +53,8 @@ export class BackupRestorer implements IWorkbenchContribution { if (unresolved.length > 0) { return this.doOpenEditors(unresolved).then(() => this.doResolveOpenedBackups(unresolved)); } - return undefined; + + return void 0; }); }); } @@ -102,7 +101,6 @@ export class BackupRestorer implements IWorkbenchContribution { return { resource, options }; } - public getId(): string { return 'vs.backup.backupRestorer'; } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 24fa55d339a9a..aa3fd1b98f80e 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -1128,12 +1128,41 @@ export class DebugService implements debug.IDebugService { } private store(): void { - this.storageService.store(DEBUG_BREAKPOINTS_KEY, JSON.stringify(this.model.getBreakpoints()), StorageScope.WORKSPACE); - this.storageService.store(DEBUG_BREAKPOINTS_ACTIVATED_KEY, this.model.areBreakpointsActivated() ? 'true' : 'false', StorageScope.WORKSPACE); - this.storageService.store(DEBUG_FUNCTION_BREAKPOINTS_KEY, JSON.stringify(this.model.getFunctionBreakpoints()), StorageScope.WORKSPACE); - this.storageService.store(DEBUG_EXCEPTION_BREAKPOINTS_KEY, JSON.stringify(this.model.getExceptionBreakpoints()), StorageScope.WORKSPACE); + const breakpoints = this.model.getBreakpoints(); + if (breakpoints.length) { + this.storageService.store(DEBUG_BREAKPOINTS_KEY, JSON.stringify(breakpoints), StorageScope.WORKSPACE); + } else { + this.storageService.remove(DEBUG_BREAKPOINTS_KEY, StorageScope.WORKSPACE); + } + + if (!this.model.areBreakpointsActivated()) { + this.storageService.store(DEBUG_BREAKPOINTS_ACTIVATED_KEY, 'false', StorageScope.WORKSPACE); + } else { + this.storageService.remove(DEBUG_BREAKPOINTS_ACTIVATED_KEY, StorageScope.WORKSPACE); + } + + const functionBreakpoints = this.model.getFunctionBreakpoints(); + if (functionBreakpoints.length) { + this.storageService.store(DEBUG_FUNCTION_BREAKPOINTS_KEY, JSON.stringify(functionBreakpoints), StorageScope.WORKSPACE); + } else { + this.storageService.remove(DEBUG_FUNCTION_BREAKPOINTS_KEY, StorageScope.WORKSPACE); + } + + const exceptionBreakpoints = this.model.getExceptionBreakpoints(); + if (exceptionBreakpoints.length) { + this.storageService.store(DEBUG_EXCEPTION_BREAKPOINTS_KEY, JSON.stringify(exceptionBreakpoints), StorageScope.WORKSPACE); + } else { + this.storageService.remove(DEBUG_EXCEPTION_BREAKPOINTS_KEY, StorageScope.WORKSPACE); + } + this.storageService.store(DEBUG_SELECTED_CONFIG_NAME_KEY, this.viewModel.selectedConfigurationName, StorageScope.WORKSPACE); - this.storageService.store(DEBUG_WATCH_EXPRESSIONS_KEY, JSON.stringify(this.model.getWatchExpressions().map(we => ({ name: we.name, id: we.getId() }))), StorageScope.WORKSPACE); + + const watchExpressions = this.model.getWatchExpressions(); + if (watchExpressions.length) { + this.storageService.store(DEBUG_WATCH_EXPRESSIONS_KEY, JSON.stringify(watchExpressions.map(we => ({ name: we.name, id: we.getId() }))), StorageScope.WORKSPACE); + } else { + this.storageService.remove(DEBUG_WATCH_EXPRESSIONS_KEY, StorageScope.WORKSPACE); + } } public dispose(): void { diff --git a/src/vs/workbench/parts/debug/electron-browser/repl.ts b/src/vs/workbench/parts/debug/electron-browser/repl.ts index 505ce6118de85..5823a900518f4 100644 --- a/src/vs/workbench/parts/debug/electron-browser/repl.ts +++ b/src/vs/workbench/parts/debug/electron-browser/repl.ts @@ -278,7 +278,12 @@ export class Repl extends Panel implements IPrivateReplService { } public shutdown(): void { - this.storageService.store(HISTORY_STORAGE_KEY, JSON.stringify(Repl.HISTORY.save()), StorageScope.WORKSPACE); + const replHistory = Repl.HISTORY.save(); + if (replHistory.length) { + this.storageService.store(HISTORY_STORAGE_KEY, JSON.stringify(replHistory), StorageScope.WORKSPACE); + } else { + this.storageService.remove(HISTORY_STORAGE_KEY, StorageScope.WORKSPACE); + } } private getReplInputOptions(): IEditorOptions { diff --git a/src/vs/workbench/parts/files/browser/files.contribution.ts b/src/vs/workbench/parts/files/browser/files.contribution.ts index 3e19dc5ed9d82..6d5cba5b6159e 100644 --- a/src/vs/workbench/parts/files/browser/files.contribution.ts +++ b/src/vs/workbench/parts/files/browser/files.contribution.ts @@ -271,7 +271,7 @@ configurationRegistry.registerConfiguration({ 'enumDescriptions': [ nls.localize('hotExit.off', 'Disable hot exit.'), nls.localize('hotExit.onExit', 'Hot exit will be triggered when the application is closed, that is when the last window is closed on Windows/Linux or when the workbench.action.quit command is triggered (command palette, keybinding, menu). All windows with backups will be restored upon next launch.'), - nls.localize('hotExit.onExitAndWindowClose', 'Hot exit will be triggered when the application is closed, that is when the last window is closed on Windows/Linux or when the workbench.action.quit command is triggered (command palette, keybinding, menu), and also for any window with a folder opened regardless of whether it\'s the last window. All windows without folders opened will be restored upon next launch. To restore folder windows as they were before shutdown set "window.reopenFolders" to "all".') + nls.localize('hotExit.onExitAndWindowClose', 'Hot exit will be triggered when the application is closed, that is when the last window is closed on Windows/Linux or when the workbench.action.quit command is triggered (command palette, keybinding, menu), and also for any window with a folder opened regardless of whether it\'s the last window. All windows without folders opened will be restored upon next launch. To restore folder windows as they were before shutdown set "window.restoreWindows" to "all".') ], 'description': nls.localize('hotExit', "Controls whether unsaved files are remembered between sessions, allowing the save prompt when exiting the editor to be skipped.", HotExitConfiguration.ON_EXIT, HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE) }, diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index c9372420e0656..d1df344969adf 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -854,7 +854,16 @@ export class ExplorerView extends CollapsibleView { .filter((e: FileStat) => e.resource.toString() !== this.contextService.getWorkspace().resource.toString()) .map((e: FileStat) => e.resource.toString()); - this.settings[ExplorerView.MEMENTO_EXPANDED_FOLDER_RESOURCES] = expanded; + if (expanded.length) { + this.settings[ExplorerView.MEMENTO_EXPANDED_FOLDER_RESOURCES] = expanded; + } else { + delete this.settings[ExplorerView.MEMENTO_EXPANDED_FOLDER_RESOURCES]; + } + } + + // Clean up last focussed if not set + if (!this.settings[ExplorerView.MEMENTO_LAST_ACTIVE_FILE_RESOURCE]) { + delete this.settings[ExplorerView.MEMENTO_LAST_ACTIVE_FILE_RESOURCE]; } super.shutdown(); diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index f42a3d96708f2..c02312985bf76 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -334,7 +334,13 @@ export class SearchViewlet extends Viewlet { private onReplaceToggled(): void { this.layout(this.size); - this.storageService.store(SearchViewlet.SHOW_REPLACE_STORAGE_KEY, this.searchAndReplaceWidget.isReplaceShown(), StorageScope.WORKSPACE); + + const isReplaceShown = this.searchAndReplaceWidget.isReplaceShown(); + if (!isReplaceShown) { + this.storageService.store(SearchViewlet.SHOW_REPLACE_STORAGE_KEY, false, StorageScope.WORKSPACE); + } else { + this.storageService.remove(SearchViewlet.SHOW_REPLACE_STORAGE_KEY); + } } private onSearchResultsChanged(event?: IChangeEvent): TPromise { diff --git a/src/vs/workbench/services/backup/common/backup.ts b/src/vs/workbench/services/backup/common/backup.ts index f725e45008791..c43688b8b486b 100644 --- a/src/vs/workbench/services/backup/common/backup.ts +++ b/src/vs/workbench/services/backup/common/backup.ts @@ -22,6 +22,11 @@ export const BACKUP_FILE_UPDATE_OPTIONS: IUpdateContentOptions = { encoding: 'ut export interface IBackupFileService { _serviceBrand: any; + /** + * If backups are enabled. + */ + backupEnabled: boolean; + /** * Finds out if there are any backups stored. */ diff --git a/src/vs/workbench/services/backup/node/backupFileService.ts b/src/vs/workbench/services/backup/node/backupFileService.ts index 223bddc599fc2..b7c27aeca1045 100644 --- a/src/vs/workbench/services/backup/node/backupFileService.ts +++ b/src/vs/workbench/services/backup/node/backupFileService.ts @@ -109,7 +109,7 @@ export class BackupFileService implements IBackupFileService { this.ready = this.init(); } - private get backupEnabled(): boolean { + public get backupEnabled(): boolean { return !!this.backupWorkspacePath; // Hot exit requires a backup path } diff --git a/src/vs/workbench/test/browser/part.test.ts b/src/vs/workbench/test/browser/part.test.ts index 0d4d0f1418faa..37277b67a78f8 100644 --- a/src/vs/workbench/test/browser/part.test.ts +++ b/src/vs/workbench/test/browser/part.test.ts @@ -93,7 +93,7 @@ suite('Workbench Part', () => { fixture.id = fixtureId; document.body.appendChild(fixture); context = new WorkspaceContextService(new TestConfigurationService(), TestWorkspace); - storage = new StorageService(new InMemoryLocalStorage(), null, context); + storage = new StorageService(new InMemoryLocalStorage(), null, context.getWorkspace()); }); teardown(() => { diff --git a/src/vs/workbench/test/common/memento.test.ts b/src/vs/workbench/test/common/memento.test.ts index c8d988af45974..c21ce5f90360b 100644 --- a/src/vs/workbench/test/common/memento.test.ts +++ b/src/vs/workbench/test/common/memento.test.ts @@ -19,7 +19,7 @@ suite('Workbench Memento', () => { setup(() => { context = new WorkspaceContextService(new TestConfigurationService(), TestWorkspace); - storage = new StorageService(new InMemoryLocalStorage(), null, context); + storage = new StorageService(new InMemoryLocalStorage(), null, context.getWorkspace()); }); test('Loading and Saving Memento with Scopes', () => { diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 0928c71276d3c..1473649308196 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -353,7 +353,7 @@ export class TestStorageService extends EventEmitter implements IStorageService super(); let context = new TestContextService(); - this.storage = new StorageService(new InMemoryLocalStorage(), null, context); + this.storage = new StorageService(new InMemoryLocalStorage(), null, context.getWorkspace()); } store(key: string, value: any, scope: StorageScope = StorageScope.GLOBAL): void { @@ -728,6 +728,8 @@ export class TestFileService implements IFileService { export class TestBackupFileService implements IBackupFileService { public _serviceBrand: any; + public backupEnabled: boolean; + public hasBackups(): TPromise { return TPromise.as(false); } From 87e691c9cc9fec32e993e80d942240332bd8ffb7 Mon Sep 17 00:00:00 2001 From: Hasan Ali Date: Tue, 13 Jun 2017 07:26:28 +0100 Subject: [PATCH 1753/2747] Add options to theme notification buttons and badges (#28471) --- src/vs/workbench/common/theme.ts | 56 ++++++++++++++++++- .../services/message/browser/messageList.ts | 29 +++++++--- 2 files changed, 75 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/common/theme.ts b/src/vs/workbench/common/theme.ts index 4297f3a2df2a0..072582f273ea1 100644 --- a/src/vs/workbench/common/theme.ts +++ b/src/vs/workbench/common/theme.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import nls = require('vs/nls'); -import { registerColor, editorBackground, contrastBorder, transparent, badgeForeground, badgeBackground } from 'vs/platform/theme/common/colorRegistry'; +import { registerColor, editorBackground, contrastBorder, transparent, badgeForeground, badgeBackground, lighten, darken } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable, Disposable, dispose } from 'vs/base/common/lifecycle'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; import { Color } from 'vs/base/common/color'; @@ -306,6 +306,60 @@ export const NOTIFICATIONS_BACKGROUND = registerColor('notification.background', hc: '#000000' }, nls.localize('notificationsBackground', "Notifications background color. Notifications slide in from the top of the window.")); +export const NOTIFICATIONS_BUTTON_BACKGROUND = registerColor('notification.buttonBackground', { + dark: '#0E639C', + light: '#007ACC', + hc: null +}, nls.localize('notificationsButtonBackground', "Notifications button background color. Notifications slide in from the top of the window.")); + +export const NOTIFICATIONS_BUTTON_HOVER_BACKGROUND = registerColor('notification.buttonHoverBackground', { + dark: lighten(NOTIFICATIONS_BUTTON_BACKGROUND, 0.2), + light: darken(NOTIFICATIONS_BUTTON_BACKGROUND, 0.2), + hc: null +}, nls.localize('notificationsButtonHoverBackground', "Notifications button background color when hovering. Notifications slide in from the top of the window.")); + +export const NOTIFICATIONS_BUTTON_FOREGROUND = registerColor('notification.buttonForeground', { + dark: Color.white, + light: Color.white, + hc: Color.white +}, nls.localize('notificationsButtonForeground', "Notifications button foreground color. Notifications slide in from the top of the window.")); + +export const NOTIFICATIONS_INFO_BACKGROUND = registerColor('notification.infoBackground', { + dark: '#007acc', + light: '#007acc', + hc: contrastBorder +}, nls.localize('notificationsInfoBackground', "Notifications info background color. Notifications slide in from the top of the window.")); + +export const NOTIFICATIONS_INFO_FOREGROUND = registerColor('notification.infoForeground', { + dark: NOTIFICATIONS_FOREGROUND, + light: NOTIFICATIONS_FOREGROUND, + hc: null +}, nls.localize('notificationsInfoForeground', "Notifications info foreground color. Notifications slide in from the top of the window.")); + +export const NOTIFICATIONS_WARNING_BACKGROUND = registerColor('notification.warningBackground', { + dark: '#B89500', + light: '#B89500', + hc: contrastBorder +}, nls.localize('notificationsWarningBackground', "Notifications warning background color. Notifications slide in from the top of the window.")); + +export const NOTIFICATIONS_WARNING_FOREGROUND = registerColor('notification.warningForeground', { + dark: NOTIFICATIONS_FOREGROUND, + light: NOTIFICATIONS_FOREGROUND, + hc: null +}, nls.localize('notificationsWarningForeground', "Notifications warning foreground color. Notifications slide in from the top of the window.")); + +export const NOTIFICATIONS_ERROR_BACKGROUND = registerColor('notification.errorBackground', { + dark: '#BE1100', + light: '#BE1100', + hc: contrastBorder +}, nls.localize('notificationsErrorBackground', "Notifications error background color. Notifications slide in from the top of the window.")); + +export const NOTIFICATIONS_ERROR_FOREGROUND = registerColor('notification.errorForeground', { + dark: NOTIFICATIONS_FOREGROUND, + light: NOTIFICATIONS_FOREGROUND, + hc: null +}, nls.localize('notificationsErrorForeground', "Notifications error foreground color. Notifications slide in from the top of the window.")); + /** * Base class for all themable workbench components. */ diff --git a/src/vs/workbench/services/message/browser/messageList.ts b/src/vs/workbench/services/message/browser/messageList.ts index 744b5818055c1..55e51942ce217 100644 --- a/src/vs/workbench/services/message/browser/messageList.ts +++ b/src/vs/workbench/services/message/browser/messageList.ts @@ -19,10 +19,10 @@ import { Action } from 'vs/base/common/actions'; import htmlRenderer = require('vs/base/browser/htmlContentRenderer'); import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyCode } from 'vs/base/common/keyCodes'; -import { NOTIFICATIONS_FOREGROUND, NOTIFICATIONS_BACKGROUND } from 'vs/workbench/common/theme'; +import { NOTIFICATIONS_FOREGROUND, NOTIFICATIONS_BACKGROUND, NOTIFICATIONS_BUTTON_BACKGROUND, NOTIFICATIONS_BUTTON_HOVER_BACKGROUND, NOTIFICATIONS_BUTTON_FOREGROUND, NOTIFICATIONS_INFO_BACKGROUND, NOTIFICATIONS_WARNING_BACKGROUND, NOTIFICATIONS_ERROR_BACKGROUND, NOTIFICATIONS_INFO_FOREGROUND, NOTIFICATIONS_WARNING_FOREGROUND, NOTIFICATIONS_ERROR_FOREGROUND } from 'vs/workbench/common/theme'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { contrastBorder, buttonBackground, buttonHoverBackground, widgetShadow, inputValidationErrorBorder, inputValidationWarningBorder, inputValidationInfoBorder } from 'vs/platform/theme/common/colorRegistry'; +import { contrastBorder, widgetShadow } from 'vs/platform/theme/common/colorRegistry'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { Color } from 'vs/base/common/color'; @@ -77,9 +77,13 @@ export class MessageList { private widgetShadow = Color.fromHex('#000000'); private outlineBorder: Color; private buttonBackground = Color.fromHex('#0E639C'); + private buttonForeground = this.foreground; private infoBackground = Color.fromHex('#007ACC'); + private infoForeground = this.foreground; private warningBackground = Color.fromHex('#B89500'); + private warningForeground = this.foreground; private errorBackground = Color.fromHex('#BE1100'); + private errorForeground = this.foreground; constructor( container: HTMLElement, @@ -106,12 +110,16 @@ export class MessageList { this.foreground = theme.getColor(NOTIFICATIONS_FOREGROUND); this.widgetShadow = theme.getColor(widgetShadow); this.outlineBorder = theme.getColor(contrastBorder); - this.buttonBackground = theme.getColor(buttonBackground); - this.infoBackground = theme.getColor(inputValidationInfoBorder); - this.warningBackground = theme.getColor(inputValidationWarningBorder); - this.errorBackground = theme.getColor(inputValidationErrorBorder); - - const buttonHoverBackgroundColor = theme.getColor(buttonHoverBackground); + this.buttonBackground = theme.getColor(NOTIFICATIONS_BUTTON_BACKGROUND); + this.buttonForeground = theme.getColor(NOTIFICATIONS_BUTTON_FOREGROUND); + this.infoBackground = theme.getColor(NOTIFICATIONS_INFO_BACKGROUND); + this.infoForeground = theme.getColor(NOTIFICATIONS_INFO_FOREGROUND); + this.warningBackground = theme.getColor(NOTIFICATIONS_WARNING_BACKGROUND); + this.warningForeground = theme.getColor(NOTIFICATIONS_WARNING_FOREGROUND); + this.errorBackground = theme.getColor(NOTIFICATIONS_ERROR_BACKGROUND); + this.errorForeground = theme.getColor(NOTIFICATIONS_ERROR_FOREGROUND); + + const buttonHoverBackgroundColor = theme.getColor(NOTIFICATIONS_BUTTON_HOVER_BACKGROUND); if (buttonHoverBackgroundColor) { collector.addRule(`.global-message-list li.message-list-entry .actions-container .message-action .action-button:hover { background-color: ${buttonHoverBackgroundColor} !important; }`); } @@ -281,6 +289,7 @@ export class MessageList { div.a({ class: 'action-button', tabindex: '0', role: 'button' }) .style('border-color', this.outlineBorder ? this.outlineBorder.toString() : null) .style('background-color', this.buttonBackground ? this.buttonBackground.toString() : null) + .style('color', this.buttonForeground ? this.buttonForeground.toString() : null) .text(action.label) .on([DOM.EventType.CLICK, DOM.EventType.KEY_DOWN], e => { if (e instanceof KeyboardEvent) { @@ -317,9 +326,11 @@ export class MessageList { const sev = message.severity; const label = (sev === Severity.Error) ? nls.localize('error', "Error") : (sev === Severity.Warning) ? nls.localize('warning', "Warn") : nls.localize('info', "Info"); const color = (sev === Severity.Error) ? this.errorBackground : (sev === Severity.Warning) ? this.warningBackground : this.infoBackground; + const foregroundColor = (sev === Severity.Error) ? this.errorForeground : (sev === Severity.Warning) ? this.warningForeground : this.infoForeground; const sevLabel = $().span({ class: `message-left-side severity ${sev === Severity.Error ? 'app-error' : sev === Severity.Warning ? 'app-warning' : 'app-info'}`, text: label }); sevLabel.style('border-color', this.outlineBorder ? this.outlineBorder.toString() : null); sevLabel.style('background-color', color ? color.toString() : null); + sevLabel.style('color', foregroundColor ? foregroundColor.toString() : null); sevLabel.appendTo(div); // Error message @@ -469,4 +480,4 @@ export class MessageList { public dispose(): void { this.toDispose = dispose(this.toDispose); } -} \ No newline at end of file +} From 37a797067c708c1f566c256c68832324fe30b029 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 13 Jun 2017 08:51:30 +0200 Subject: [PATCH 1754/2747] hot exit: prevent duplicate empty windows from opening --- src/vs/code/electron-main/windows.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index f05f08784a81a..12a7337fb3d65 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -265,8 +265,9 @@ export class WindowsManager implements IWindowsMainService { // const hotExitRestore = (openConfig.initialStartup && !openConfig.cli.extensionDevelopmentPath); const foldersToRestore = hotExitRestore ? this.backupService.getWorkspaceBackupPaths() : []; - const emptyToRestore = hotExitRestore ? this.backupService.getEmptyWorkspaceBackupPaths() : []; + let emptyToRestore = hotExitRestore ? this.backupService.getEmptyWorkspaceBackupPaths() : []; emptyToRestore.push(...windowsToOpen.filter(w => !w.workspacePath && w.backupPath).map(w => path.basename(w.backupPath))); // add empty windows with backupPath + emptyToRestore = arrays.distinct(emptyToRestore); // prevent duplicates // Open based on config const usedWindows = this.doOpen(openConfig, foldersToOpen, foldersToRestore, emptyToRestore, emptyToOpen, filesToOpen, filesToCreate, filesToDiff); From ba9a4314e1e25cbd135a6f0d5ea855e8f437d104 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Tue, 13 Jun 2017 09:33:16 +0200 Subject: [PATCH 1755/2747] Resolves #27903 --- .../debug/electron-browser/debugEditorContribution.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts index 95e12911dcfe5..72c5ac93ee9cf 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts @@ -356,8 +356,13 @@ export class DebugEditorContribution implements IDebugEditorContribution { // Toggles exception widget based on the state of the current editor model and debug stack frame const model = this.editor.getModel(); const focusedSf = this.debugService.getViewModel().focusedStackFrame; - const callStack = focusedSf ? focusedSf.thread.getCallStack() : null; - if (!model || !focusedSf || !callStack || callStack.length === 0) { + if (!model || !focusedSf || !focusedSf.source || !focusedSf.source.available) { + this.closeExceptionWidget(); + return; + } + + const callStack = focusedSf.thread.getCallStack(); + if (!callStack || callStack.length === 0) { this.closeExceptionWidget(); return; } From 631e0a74eece2f5b7829c2723b5249683a5af00d Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Tue, 13 Jun 2017 10:18:16 +0200 Subject: [PATCH 1756/2747] Adding correct command to open git viewlet as it was changed. --- test/smoke/src/areas/git.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/smoke/src/areas/git.ts b/test/smoke/src/areas/git.ts index 9a088d46566f1..807b6cf50ffae 100644 --- a/test/smoke/src/areas/git.ts +++ b/test/smoke/src/areas/git.ts @@ -14,7 +14,7 @@ export class Git { } public openGitViewlet(): Promise { - return this.spectron.command('workbench.view.git'); + return this.spectron.command('workbench.view.scm'); } public getScmIconChanges(): Promise { From 24c9b0992502302491763f25cf126fe91e9c165b Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Tue, 13 Jun 2017 10:34:03 +0200 Subject: [PATCH 1757/2747] Fail the test if the key binding was not found. --- test/smoke/src/spectron/application.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/smoke/src/spectron/application.ts b/test/smoke/src/spectron/application.ts index 64110535615c9..76443e8ec10a4 100644 --- a/test/smoke/src/spectron/application.ts +++ b/test/smoke/src/spectron/application.ts @@ -152,6 +152,10 @@ export class SpectronApplication { */ public command(command: string, capture?: boolean): Promise { const binding = this.keybindings.find(x => x['command'] === command); + if (!binding) { + throw new Error(`Key binding for ${command} was not found`); + } + const keys: string = binding.key; let keysToPress: string[] = []; From 7ce9ddee07f711692e329617969c18a66e485b24 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 13 Jun 2017 11:14:24 +0200 Subject: [PATCH 1758/2747] debug: make sure to fetch the remainder of the callstack for the same thread fixes #28536 --- .../parts/debug/electron-browser/debugService.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index aa3fd1b98f80e..0f363b2090844 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -82,6 +82,7 @@ export class DebugService implements debug.IDebugService { private breakpointsToSendOnResourceSaved: Set; private callStackScheduler: RunOnceScheduler; private launchJsonChanged: boolean; + private threadToFetch: debug.IThread; constructor( @IStorageService private storageService: IStorageService, @@ -121,14 +122,13 @@ export class DebugService implements debug.IDebugService { this.toDispose.push(this.model); this.viewModel = new ViewModel(this.storageService.get(DEBUG_SELECTED_CONFIG_NAME_KEY, StorageScope.WORKSPACE, null)); this.callStackScheduler = new RunOnceScheduler(() => { - const focusedThread = this.viewModel.focusedThread; - if (focusedThread) { - const callStack = focusedThread.getCallStack(); + if (this.threadToFetch) { + const callStack = this.threadToFetch.getCallStack(); // Some adapters might not respect the number levels in StackTraceRequest and might // return more stackFrames than requested. For those do not send an additional stackTrace request. if (callStack.length <= 1) { - this.model.fetchCallStack(focusedThread).done(() => - this.tryToAutoFocusStackFrame(focusedThread), errors.onUnexpectedError); + this.model.fetchCallStack(this.threadToFetch).done(() => + this.tryToAutoFocusStackFrame(this.threadToFetch), errors.onUnexpectedError); } } }, 420); @@ -330,6 +330,7 @@ export class DebugService implements debug.IDebugService { // Call fetch call stack twice, the first only return the top stack frame. // Second retrieves the rest of the call stack. For performance reasons #25605 this.model.fetchCallStack(thread).then(() => { + this.threadToFetch = thread; this.callStackScheduler.schedule(); return this.tryToAutoFocusStackFrame(thread); }); From 40498b093e3cd94412909a2aee48aa6843ccf788 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 13 Jun 2017 11:15:21 +0200 Subject: [PATCH 1759/2747] missing compilation --- build/lib/tslint/translationRemindRule.js | 158 +++++++++++----------- 1 file changed, 79 insertions(+), 79 deletions(-) diff --git a/build/lib/tslint/translationRemindRule.js b/build/lib/tslint/translationRemindRule.js index 90ba94aa5f4bb..d0ed1a024038d 100644 --- a/build/lib/tslint/translationRemindRule.js +++ b/build/lib/tslint/translationRemindRule.js @@ -1,79 +1,79 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -"use strict"; -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -exports.__esModule = true; -var Lint = require("tslint"); -var fs = require("fs"); -var Rule = (function (_super) { - __extends(Rule, _super); - function Rule() { - return _super !== null && _super.apply(this, arguments) || this; - } - Rule.prototype.apply = function (sourceFile) { - return this.applyWithWalker(new TranslationRemindRuleWalker(sourceFile, this.getOptions())); - }; - return Rule; -}(Lint.Rules.AbstractRule)); -exports.Rule = Rule; -var TranslationRemindRuleWalker = (function (_super) { - __extends(TranslationRemindRuleWalker, _super); - function TranslationRemindRuleWalker(file, opts) { - return _super.call(this, file, opts) || this; - } - TranslationRemindRuleWalker.prototype.visitImportDeclaration = function (node) { - var declaration = node.moduleSpecifier.getText(); - if (declaration !== "'" + TranslationRemindRuleWalker.NLS_MODULE + "'") { - return; - } - this.visitImportLikeDeclaration(node); - }; - TranslationRemindRuleWalker.prototype.visitImportEqualsDeclaration = function (node) { - var reference = node.moduleReference.getText(); - if (reference !== "require('" + TranslationRemindRuleWalker.NLS_MODULE + "')") { - return; - } - this.visitImportLikeDeclaration(node); - }; - TranslationRemindRuleWalker.prototype.visitImportLikeDeclaration = function (node) { - var currentFile = node.getSourceFile().fileName; - var matchService = currentFile.match(/vs\/workbench\/services\/\w+/); - var matchPart = currentFile.match(/vs\/workbench\/parts\/\w+/); - if (!matchService && !matchPart) { - return; - } - var resource = matchService ? matchService[0] : matchPart[0]; - var resourceDefined = false; - var json; - try { - json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); - } - catch (e) { - console.error('[translation-remind rule]: File with resources to pull from Transifex was not found. Aborting translation resource check for newly defined workbench part/service.'); - return; - } - var workbenchResources = JSON.parse(json).workbench; - workbenchResources.forEach(function (existingResource) { - if (existingResource.name === resource) { - resourceDefined = true; - return; - } - }); - if (!resourceDefined) { - this.addFailureAtNode(node, "Please add '" + resource + "' to ./builds/lib/i18n.resources.json file to use translations here."); - } - }; - return TranslationRemindRuleWalker; -}(Lint.RuleWalker)); -TranslationRemindRuleWalker.NLS_MODULE = 'vs/nls'; +"use strict"; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var Lint = require("tslint"); +var fs = require("fs"); +var Rule = (function (_super) { + __extends(Rule, _super); + function Rule() { + return _super !== null && _super.apply(this, arguments) || this; + } + Rule.prototype.apply = function (sourceFile) { + return this.applyWithWalker(new TranslationRemindRuleWalker(sourceFile, this.getOptions())); + }; + return Rule; +}(Lint.Rules.AbstractRule)); +exports.Rule = Rule; +var TranslationRemindRuleWalker = (function (_super) { + __extends(TranslationRemindRuleWalker, _super); + function TranslationRemindRuleWalker(file, opts) { + return _super.call(this, file, opts) || this; + } + TranslationRemindRuleWalker.prototype.visitImportDeclaration = function (node) { + var declaration = node.moduleSpecifier.getText(); + if (declaration !== "'" + TranslationRemindRuleWalker.NLS_MODULE + "'") { + return; + } + this.visitImportLikeDeclaration(node); + }; + TranslationRemindRuleWalker.prototype.visitImportEqualsDeclaration = function (node) { + var reference = node.moduleReference.getText(); + if (reference !== "require('" + TranslationRemindRuleWalker.NLS_MODULE + "')") { + return; + } + this.visitImportLikeDeclaration(node); + }; + TranslationRemindRuleWalker.prototype.visitImportLikeDeclaration = function (node) { + var currentFile = node.getSourceFile().fileName; + var matchService = currentFile.match(/vs\/workbench\/services\/\w+/); + var matchPart = currentFile.match(/vs\/workbench\/parts\/\w+/); + if (!matchService && !matchPart) { + return; + } + var resource = matchService ? matchService[0] : matchPart[0]; + var resourceDefined = false; + var json; + try { + json = fs.readFileSync('./build/lib/i18n.resources.json', 'utf8'); + } + catch (e) { + console.error('[translation-remind rule]: File with resources to pull from Transifex was not found. Aborting translation resource check for newly defined workbench part/service.'); + return; + } + var workbenchResources = JSON.parse(json).workbench; + workbenchResources.forEach(function (existingResource) { + if (existingResource.name === resource) { + resourceDefined = true; + return; + } + }); + if (!resourceDefined) { + this.addFailureAtNode(node, "Please add '" + resource + "' to ./builds/lib/i18n.resources.json file to use translations here."); + } + }; + return TranslationRemindRuleWalker; +}(Lint.RuleWalker)); +TranslationRemindRuleWalker.NLS_MODULE = 'vs/nls'; From 3d3167ace71701c63da04f7e2905f83401af10fa Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 13 Jun 2017 11:23:05 +0200 Subject: [PATCH 1760/2747] fix typo --- src/vs/workbench/parts/debug/common/debugModel.ts | 4 ++-- src/vs/workbench/parts/debug/common/debugSource.ts | 2 +- .../workbench/parts/debug/electron-browser/debugViewer.ts | 6 +++--- .../workbench/parts/debug/test/common/debugSource.test.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index c68c9be42dba0..702ada257dfb8 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -467,7 +467,7 @@ export class Thread implements IThread { let source = new Source(rsf.source, rsf.source ? rsf.source.presentationHint : rsf.presentationHint); if (this.process.sources.has(source.uri.toString())) { const alreadyCreatedSource = this.process.sources.get(source.uri.toString()); - alreadyCreatedSource.presenationHint = source.presenationHint; + alreadyCreatedSource.presentationHint = source.presentationHint; source = alreadyCreatedSource; } else { this.process.sources.set(source.uri.toString(), source); @@ -1039,7 +1039,7 @@ export class Model implements IModel { public deemphasizeSource(uri: uri): void { this.processes.forEach(p => { if (p.sources.has(uri.toString())) { - p.sources.get(uri.toString()).presenationHint = 'deemphasize'; + p.sources.get(uri.toString()).presentationHint = 'deemphasize'; } }); this._onDidChangeCallStack.fire(); diff --git a/src/vs/workbench/parts/debug/common/debugSource.ts b/src/vs/workbench/parts/debug/common/debugSource.ts index 103ec1d9ec8eb..042c9e8d1b7ec 100644 --- a/src/vs/workbench/parts/debug/common/debugSource.ts +++ b/src/vs/workbench/parts/debug/common/debugSource.ts @@ -13,7 +13,7 @@ export class Source { public uri: uri; - constructor(public raw: DebugProtocol.Source, public presenationHint: string) { + constructor(public raw: DebugProtocol.Source, public presentationHint: string) { if (!raw) { this.raw = { name: UNKNOWN_SOURCE_LABEL }; } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index 76cb4fb994526..b7bd340b8531a 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -544,9 +544,9 @@ export class CallStackRenderer implements IRenderer { } private renderStackFrame(stackFrame: debug.IStackFrame, data: IStackFrameTemplateData): void { - dom.toggleClass(data.stackFrame, 'disabled', stackFrame.source.presenationHint === 'deemphasize'); - dom.toggleClass(data.stackFrame, 'label', stackFrame.source.presenationHint === 'label'); - dom.toggleClass(data.stackFrame, 'subtle', stackFrame.source.presenationHint === 'subtle'); + dom.toggleClass(data.stackFrame, 'disabled', stackFrame.source.presentationHint === 'deemphasize'); + dom.toggleClass(data.stackFrame, 'label', stackFrame.source.presentationHint === 'label'); + dom.toggleClass(data.stackFrame, 'subtle', stackFrame.source.presentationHint === 'subtle'); data.file.title = stackFrame.source.raw.path || stackFrame.source.name; if (stackFrame.source.raw.origin) { diff --git a/src/vs/workbench/parts/debug/test/common/debugSource.test.ts b/src/vs/workbench/parts/debug/test/common/debugSource.test.ts index 43606a43d155b..faace16575a2c 100644 --- a/src/vs/workbench/parts/debug/test/common/debugSource.test.ts +++ b/src/vs/workbench/parts/debug/test/common/debugSource.test.ts @@ -17,7 +17,7 @@ suite('Debug - Source', () => { }; const source = new Source(rawSource, 'label'); - assert.equal(source.presenationHint, 'label'); + assert.equal(source.presentationHint, 'label'); assert.equal(source.name, rawSource.name); assert.equal(source.inMemory, false); assert.equal(source.reference, rawSource.sourceReference); @@ -31,7 +31,7 @@ suite('Debug - Source', () => { }; const source = new Source(rawSource, 'deemphasize'); - assert.equal(source.presenationHint, 'deemphasize'); + assert.equal(source.presentationHint, 'deemphasize'); assert.equal(source.name, rawSource.name); assert.equal(source.inMemory, true); assert.equal(source.reference, rawSource.sourceReference); From 4a97494d871f65880e0f1abffbba963240c52800 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 13 Jun 2017 11:53:07 +0200 Subject: [PATCH 1761/2747] Keybindings in quick open aren't vertically aligned (fixes #28602) --- src/vs/base/parts/quickopen/browser/quickopen.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/parts/quickopen/browser/quickopen.css b/src/vs/base/parts/quickopen/browser/quickopen.css index 9173f8121cc9b..dfe35cceb0bdf 100644 --- a/src/vs/base/parts/quickopen/browser/quickopen.css +++ b/src/vs/base/parts/quickopen/browser/quickopen.css @@ -92,7 +92,7 @@ } .quick-open-widget .quick-open-tree .quick-open-entry-keybinding .monaco-kbkey { - vertical-align: inherit; + vertical-align: text-bottom; } .quick-open-widget .quick-open-tree .results-group { From bf6952b96d7409dfaf7d0883d4cd1f3286e0078f Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 13 Jun 2017 12:36:43 +0200 Subject: [PATCH 1762/2747] Rename `editor.urlClickable` to `editor.links` --- .../common/config/commonEditorConfig.ts | 6 ++-- src/vs/editor/common/config/editorOptions.ts | 30 ++++++++----------- src/vs/editor/contrib/links/browser/links.ts | 2 +- src/vs/monaco.d.ts | 13 ++++---- 4 files changed, 22 insertions(+), 29 deletions(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 7fddb2add18ac..570624127601d 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -562,10 +562,10 @@ const editorConfiguration: IConfigurationNode = { 'default': EDITOR_DEFAULTS.accessibilitySupport, 'description': nls.localize('accessibilitySupport', "Controls whether the editor should run in a mode where it is optimized for screen readers.") }, - 'editor.urlClickable': { + 'editor.links': { 'type': 'boolean', - 'default': EDITOR_DEFAULTS.urlClickable, - 'description': nls.localize('urlClickable', "Controls whether the editor should underline any URL and make them clickable through CTRL-Left Click") + 'default': EDITOR_DEFAULTS.contribInfo.links, + 'description': nls.localize('links', "Controls whether the editor should detect links and make them clickable") }, 'diffEditor.renderSideBySide': { 'type': 'boolean', diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index e2f0285cfd490..d32c4b258d4a0 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -321,6 +321,11 @@ export interface IEditorOptions { * Defaults to true. */ hover?: boolean; + /** + * Enable detecting links and making them clickable. + * Defaults to true. + */ + links?: boolean; /** * Enable custom contextmenu. * Defaults to true. @@ -341,11 +346,6 @@ export interface IEditorOptions { * Defaults to 'auto'. It is best to leave this to 'auto'. */ accessibilitySupport?: 'auto' | 'off' | 'on'; - /** - * Enable underlining URL and make it as a clickable link through CTRL-click - * Defaults to true. - */ - urlClickable?: boolean; /** * Enable quick suggestions (shadow suggestions) * Defaults to true. @@ -750,6 +750,7 @@ export interface InternalEditorViewOptions { export interface EditorContribOptions { readonly selectionClipboard: boolean; readonly hover: boolean; + readonly links: boolean; readonly contextmenu: boolean; readonly quickSuggestions: boolean | { other: boolean, comments: boolean, strings: boolean }; readonly quickSuggestionsDelay: number; @@ -800,7 +801,6 @@ export interface IValidatedEditorOptions { readonly useTabStops: boolean; readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; readonly accessibilitySupport: 'auto' | 'off' | 'on'; - readonly urlClickable: boolean; readonly viewInfo: InternalEditorViewOptions; readonly contribInfo: EditorContribOptions; @@ -822,7 +822,6 @@ export class InternalEditorOptions { */ readonly accessibilitySupport: platform.AccessibilitySupport; readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; - readonly urlClickable: boolean; // ---- cursor options readonly wordSeparators: string; @@ -861,7 +860,6 @@ export class InternalEditorOptions { viewInfo: InternalEditorViewOptions; wrappingInfo: EditorWrappingInfo; contribInfo: EditorContribOptions; - urlClickable: boolean; }) { this.canUseTranslate3d = source.canUseTranslate3d; this.pixelRatio = source.pixelRatio; @@ -881,7 +879,6 @@ export class InternalEditorOptions { this.viewInfo = source.viewInfo; this.wrappingInfo = source.wrappingInfo; this.contribInfo = source.contribInfo; - this.urlClickable = source.urlClickable; } /** @@ -902,7 +899,6 @@ export class InternalEditorOptions { && this.tabFocusMode === other.tabFocusMode && this.dragAndDrop === other.dragAndDrop && this.emptySelectionClipboard === other.emptySelectionClipboard - && this.urlClickable === other.urlClickable && InternalEditorOptions._equalsLayoutInfo(this.layoutInfo, other.layoutInfo) && this.fontInfo.equals(other.fontInfo) && InternalEditorOptions._equalsViewOptions(this.viewInfo, other.viewInfo) @@ -933,8 +929,7 @@ export class InternalEditorOptions { fontInfo: (!this.fontInfo.equals(newOpts.fontInfo)), viewInfo: (!InternalEditorOptions._equalsViewOptions(this.viewInfo, newOpts.viewInfo)), wrappingInfo: (!InternalEditorOptions._equalsWrappingInfo(this.wrappingInfo, newOpts.wrappingInfo)), - contribInfo: (!InternalEditorOptions._equalsContribOptions(this.contribInfo, newOpts.contribInfo)), - urlClickable: (this.urlClickable !== newOpts.urlClickable), + contribInfo: (!InternalEditorOptions._equalsContribOptions(this.contribInfo, newOpts.contribInfo)) }; } @@ -1091,6 +1086,7 @@ export class InternalEditorOptions { return ( a.selectionClipboard === b.selectionClipboard && a.hover === b.hover + && a.links === b.links && a.contextmenu === b.contextmenu && InternalEditorOptions._equalsQuickSuggestions(a.quickSuggestions, b.quickSuggestions) && a.quickSuggestionsDelay === b.quickSuggestionsDelay @@ -1273,7 +1269,6 @@ export interface IConfigurationChangedEvent { readonly viewInfo: boolean; readonly wrappingInfo: boolean; readonly contribInfo: boolean; - readonly urlClickable: boolean; } /** @@ -1448,7 +1443,6 @@ export class EditorOptionsValidator { useTabStops: _boolean(opts.useTabStops, defaults.useTabStops), multiCursorModifier: multiCursorModifier, accessibilitySupport: _stringSet<'auto' | 'on' | 'off'>(opts.accessibilitySupport, defaults.accessibilitySupport, ['auto', 'on', 'off']), - urlClickable: _boolean(opts.urlClickable, defaults.urlClickable), viewInfo: viewInfo, contribInfo: contribInfo, }; @@ -1617,6 +1611,7 @@ export class EditorOptionsValidator { return { selectionClipboard: _boolean(opts.selectionClipboard, defaults.selectionClipboard), hover: _boolean(opts.hover, defaults.hover), + links: _boolean(opts.links, defaults.links), contextmenu: _boolean(opts.contextmenu, defaults.contextmenu), quickSuggestions: quickSuggestions, quickSuggestionsDelay: _clampedInt(opts.quickSuggestionsDelay, defaults.quickSuggestionsDelay, Constants.MIN_SAFE_SMALL_INTEGER, Constants.MAX_SAFE_SMALL_INTEGER), @@ -1672,7 +1667,6 @@ export class InternalEditorOptionsFactory { useTabStops: opts.useTabStops, multiCursorModifier: opts.multiCursorModifier, accessibilitySupport: opts.accessibilitySupport, - urlClickable: opts.urlClickable, viewInfo: { extraEditorClassName: opts.viewInfo.extraEditorClassName, @@ -1711,6 +1705,7 @@ export class InternalEditorOptionsFactory { contribInfo: { selectionClipboard: opts.contribInfo.selectionClipboard, hover: opts.contribInfo.hover, + links: (accessibilityIsOn ? false : opts.contribInfo.links), // DISABLED WHEN SCREEN READER IS ATTACHED contextmenu: opts.contribInfo.contextmenu, quickSuggestions: opts.contribInfo.quickSuggestions, quickSuggestionsDelay: opts.contribInfo.quickSuggestionsDelay, @@ -1880,8 +1875,7 @@ export class InternalEditorOptionsFactory { fontInfo: env.fontInfo, viewInfo: opts.viewInfo, wrappingInfo: wrappingInfo, - contribInfo: opts.contribInfo, - urlClickable: opts.urlClickable + contribInfo: opts.contribInfo }); } } @@ -2091,7 +2085,6 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { useTabStops: true, multiCursorModifier: 'altKey', accessibilitySupport: 'auto', - urlClickable: true, viewInfo: { extraEditorClassName: '', @@ -2143,6 +2136,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { contribInfo: { selectionClipboard: true, hover: true, + links: true, contextmenu: true, quickSuggestions: { other: true, comments: false, strings: false }, quickSuggestionsDelay: 10, diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index 1f6e93fb08e53..04ebb1a926b69 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -184,7 +184,7 @@ class LinkDetector implements editorCommon.IEditorContribution { } private beginCompute(): void { - if (!this.editor.getModel() || !this.editor.getConfiguration().urlClickable) { + if (!this.editor.getModel() || !this.editor.getConfiguration().contribInfo.links) { return; } diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 2670e27c2e678..e9ab788674ab0 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2867,6 +2867,11 @@ declare module monaco.editor { * Defaults to true. */ hover?: boolean; + /** + * Enable detecting links and making them clickable. + * Defaults to true. + */ + links?: boolean; /** * Enable custom contextmenu. * Defaults to true. @@ -2887,11 +2892,6 @@ declare module monaco.editor { * Defaults to 'auto'. It is best to leave this to 'auto'. */ accessibilitySupport?: 'auto' | 'off' | 'on'; - /** - * Enable underlining URL and make it as a clickable link through CTRL-click - * Defaults to true. - */ - urlClickable?: boolean; /** * Enable quick suggestions (shadow suggestions) * Defaults to true. @@ -3236,6 +3236,7 @@ declare module monaco.editor { export interface EditorContribOptions { readonly selectionClipboard: boolean; readonly hover: boolean; + readonly links: boolean; readonly contextmenu: boolean; readonly quickSuggestions: boolean | { other: boolean; @@ -3274,7 +3275,6 @@ declare module monaco.editor { readonly lineHeight: number; readonly readOnly: boolean; readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; - readonly urlClickable: boolean; readonly wordSeparators: string; readonly autoClosingBrackets: boolean; readonly useTabStops: boolean; @@ -3418,7 +3418,6 @@ declare module monaco.editor { readonly viewInfo: boolean; readonly wrappingInfo: boolean; readonly contribInfo: boolean; - readonly urlClickable: boolean; } /** From b9204f6eefa4ff4fa469b33726d68eae8f425cc4 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Tue, 13 Jun 2017 12:44:50 +0200 Subject: [PATCH 1763/2747] Corrected necessary dependencies to match only minor versions #27537 --- test/smoke/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/smoke/package.json b/test/smoke/package.json index eb58965b87c87..292850b6a0e2d 100644 --- a/test/smoke/package.json +++ b/test/smoke/package.json @@ -11,10 +11,10 @@ "@types/mocha": "^2.2.41", "@types/node": "^6.0.70", "@types/webdriverio": "^4.6.1", - "@types/electron": "^1.4.37", + "@types/electron": "~1.4.37", "@types/rimraf": "^0.0.28", "mocha": "^3.2.0", - "spectron": "^3.6.4", + "spectron": "~3.6.4", "typescript": "^2.2.2", "rimraf": "^2.6.1", "commander": "^2.9.0", From 401a54a4247f9dcd8eb38ca625b30408360cd59f Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 13 Jun 2017 12:47:56 +0200 Subject: [PATCH 1764/2747] React to changing the `editor.links` option --- src/vs/editor/contrib/links/browser/links.ts | 21 +++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index 04ebb1a926b69..7b566b860beab 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -108,6 +108,7 @@ class LinkDetector implements editorCommon.IEditorContribution { static RECOMPUTE_TIME = 1000; // ms private editor: ICodeEditor; + private enabled: boolean; private listenersToRemove: IDisposable[]; private timeoutPromise: TPromise; private computePromise: TPromise; @@ -141,6 +142,24 @@ class LinkDetector implements editorCommon.IEditorContribution { this.cleanUpActiveLinkDecoration(); })); + this.enabled = editor.getConfiguration().contribInfo.links; + this.listenersToRemove.push(editor.onDidChangeConfiguration((e) => { + let enabled = editor.getConfiguration().contribInfo.links; + if (this.enabled === enabled) { + // No change in our configuration option + return; + } + this.enabled = enabled; + + // Remove any links (for the getting disabled case) + this.updateDecorations([]); + + // Stop any computation (for the getting disabled case) + this.stop(); + + // Start computing (for the getting enabled case) + this.beginCompute(); + })); this.listenersToRemove.push(editor.onDidChangeModelContent((e) => this.onChange())); this.listenersToRemove.push(editor.onDidChangeModel((e) => this.onModelChanged())); this.listenersToRemove.push(editor.onDidChangeModelLanguage((e) => this.onModelModeChanged())); @@ -184,7 +203,7 @@ class LinkDetector implements editorCommon.IEditorContribution { } private beginCompute(): void { - if (!this.editor.getModel() || !this.editor.getConfiguration().contribInfo.links) { + if (!this.editor.getModel() || !this.enabled) { return; } From 0a203b9983836860fd2fa839629ea67ea0dd8818 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 13 Jun 2017 10:33:20 +0200 Subject: [PATCH 1765/2747] #28538 Merge WorkspaceContextService and WorkspaceConfigurationService into a single service implementation --- src/vs/workbench/electron-browser/main.ts | 15 +- .../services/workspace/node/workspace.ts | 413 ++++++++++++++++++ 2 files changed, 420 insertions(+), 8 deletions(-) create mode 100644 src/vs/workbench/services/workspace/node/workspace.ts diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index 69ca40fed63fd..26d301a6ded2a 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -18,8 +18,8 @@ import paths = require('vs/base/common/paths'); import uri from 'vs/base/common/uri'; import strings = require('vs/base/common/strings'); import { IResourceInput } from 'vs/platform/editor/common/editor'; -import { WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; -import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configurationService'; +import { Workspace } from 'vs/platform/workspace/common/workspace'; +import { WorkspaceService } from 'vs/workbench/services/configuration/node/configuration'; import { realpath, stat } from 'vs/base/node/pfs'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import path = require('path'); @@ -129,13 +129,12 @@ function getWorkspace(workspacePath: string): TPromise { function openWorkbench(configuration: IWindowConfiguration, workspace: Workspace, options: IOptions): TPromise { const environmentService = new EnvironmentService(configuration, configuration.execPath); - const configurationService = new WorkspaceConfigurationService(environmentService, workspace); - const contextService = new WorkspaceContextService(configurationService, workspace); - const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !contextService.hasWorkspace()); + const workspaceService = new WorkspaceService(environmentService, workspace); + const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !workspaceService.hasWorkspace()); // Since the configuration service is one of the core services that is used in so many places, we initialize it // right before startup of the workbench shell to have its data ready for consumers - return configurationService.initialize().then(() => { + return workspaceService.initialize().then(() => { timerService.beforeDOMContentLoaded = Date.now(); return domContentLoaded().then(() => { @@ -144,8 +143,8 @@ function openWorkbench(configuration: IWindowConfiguration, workspace: Workspace // Open Shell timerService.beforeWorkbenchOpen = Date.now(); const shell = new WorkbenchShell(document.body, { - configurationService, - contextService, + contextService: workspaceService, + configurationService: workspaceService, environmentService, timerService }, configuration, options); diff --git a/src/vs/workbench/services/workspace/node/workspace.ts b/src/vs/workbench/services/workspace/node/workspace.ts new file mode 100644 index 0000000000000..85f411d715c9f --- /dev/null +++ b/src/vs/workbench/services/workspace/node/workspace.ts @@ -0,0 +1,413 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import URI from 'vs/base/common/uri'; +import * as paths from 'vs/base/common/paths'; +import { TPromise } from 'vs/base/common/winjs.base'; +import Event, { Emitter } from 'vs/base/common/event'; +import { distinct, equals } from "vs/base/common/arrays"; +import * as objects from 'vs/base/common/objects'; +import * as errors from 'vs/base/common/errors'; +import * as collections from 'vs/base/common/collections'; +import { Disposable } from "vs/base/common/lifecycle"; +import { Schemas } from "vs/base/common/network"; +import { RunOnceScheduler } from 'vs/base/common/async'; +import { readFile } from 'vs/base/node/pfs'; +import * as extfs from 'vs/base/node/extfs'; +import { IWorkspaceContextService, Workspace, IWorkspace } from "vs/platform/workspace/common/workspace"; +import { IEnvironmentService } from 'vs/platform/environment/common/environment'; +import { FileChangeType, FileChangesEvent, isEqual } from 'vs/platform/files/common/files'; +import { ConfigModel } from 'vs/platform/configuration/common/model'; +import { ScopedConfigModel, WorkspaceConfigModel, WorkspaceSettingsConfigModel } from 'vs/workbench/services/configuration/common/configurationModels'; +import { IConfigurationServiceEvent, ConfigurationSource, getConfigurationValue, IConfigModel, IConfigurationOptions } from 'vs/platform/configuration/common/configuration'; +import { IWorkspaceConfigurationValues, IWorkspaceConfigurationService, IWorkspaceConfigurationValue, WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME, WORKSPACE_STANDALONE_CONFIGURATIONS, WORKSPACE_CONFIG_DEFAULT_PATH } from 'vs/workbench/services/configuration/common/configuration'; +import { ConfigurationService as GlobalConfigurationService } from 'vs/platform/configuration/node/configurationService'; + +interface IStat { + resource: URI; + isDirectory?: boolean; + children?: { resource: URI; }[]; +} + +interface IContent { + resource: URI; + value: string; +} + +interface IWorkspaceConfiguration { + workspace: T; + consolidated: any; +} + +type IWorkspaceFoldersConfiguration = { [rootFolder: string]: { folders: string[]; } }; + +export class WorkspaceService extends Disposable implements IWorkspaceContextService, IWorkspaceConfigurationService { + + private static RELOAD_CONFIGURATION_DELAY = 50; + + public _serviceBrand: any; + + private readonly _onDidChangeFolders: Emitter = this._register(new Emitter()); + public readonly onDidChangeFolders: Event = this._onDidChangeFolders.event; + + private readonly _onDidUpdateConfiguration: Emitter = this._register(new Emitter()); + public readonly onDidUpdateConfiguration: Event = this._onDidUpdateConfiguration.event; + + private baseConfigurationService: GlobalConfigurationService; + + private cachedConfig: ConfigModel; + private cachedWorkspaceConfig: WorkspaceConfigModel; + + private bulkFetchFromWorkspacePromise: TPromise; + private workspaceFilePathToConfiguration: { [relativeWorkspacePath: string]: TPromise> }; + private reloadConfigurationScheduler: RunOnceScheduler; + + private folders: URI[]; + + constructor(private environmentService: IEnvironmentService, private workspace?: Workspace, private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME) { + super(); + + this.folders = workspace ? [workspace.resource] : []; + + this.workspaceFilePathToConfiguration = Object.create(null); + this.cachedConfig = new ConfigModel(null); + this.cachedWorkspaceConfig = new WorkspaceConfigModel(new WorkspaceSettingsConfigModel(null), []); + + this.baseConfigurationService = this._register(new GlobalConfigurationService(environmentService)); + this.reloadConfigurationScheduler = this._register(new RunOnceScheduler(() => this.doLoadConfiguration() + .then(config => this._onDidUpdateConfiguration.fire({ + config: config.consolidated, + source: ConfigurationSource.Workspace, + sourceConfig: config.workspace + })) + .done(null, errors.onUnexpectedError), WorkspaceService.RELOAD_CONFIGURATION_DELAY)); + + this._register(this.baseConfigurationService.onDidUpdateConfiguration(e => this.onBaseConfigurationChanged(e))); + this._register(this.onDidUpdateConfiguration(e => this.resolveAdditionalFolders(true))); + } + + private resolveAdditionalFolders(notify?: boolean): void { + if (!this.workspace) { + return; // no additional folders for empty workspaces + } + + // Resovled configured folders for workspace + let configuredFolders: URI[] = [this.workspace.resource]; + const config = this.getConfiguration('workspace'); + if (config) { + const workspaceConfig = config[this.workspace.resource.toString()]; + if (workspaceConfig) { + const additionalFolders = workspaceConfig.folders + .map(f => URI.parse(f)) + .filter(r => r.scheme === Schemas.file); // only support files for now + + configuredFolders.push(...additionalFolders); + } + } + + // Remove duplicates + configuredFolders = distinct(configuredFolders, r => r.toString()); + + // Find changes + const changed = !equals(this.folders, configuredFolders, (r1, r2) => r1.toString() === r2.toString()); + + this.folders = configuredFolders; + + if (notify && changed) { + this._onDidChangeFolders.fire(configuredFolders); + } + } + + public getFolders(): URI[] { + return this.folders; + } + + public getWorkspace(): IWorkspace { + return this.workspace; + } + + public hasWorkspace(): boolean { + return !!this.workspace; + } + + public isInsideWorkspace(resource: URI): boolean { + return this.workspace ? this.workspace.isInsideWorkspace(resource) : false; + } + + public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { + return this.workspace ? this.workspace.toWorkspaceRelativePath(resource, toOSPath) : null; + } + + public toResource(workspaceRelativePath: string): URI { + return this.workspace ? this.workspace.toResource(workspaceRelativePath) : null; + } + + private onBaseConfigurationChanged(event: IConfigurationServiceEvent): void { + if (event.source === ConfigurationSource.Default) { + this.cachedWorkspaceConfig.update(); + } + + // update cached config when base config changes + const configModel = >this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify) + .merge(this.cachedWorkspaceConfig); // workspace configured values + + // emit this as update to listeners if changed + if (!objects.equals(this.cachedConfig.contents, configModel.contents)) { + this.cachedConfig = configModel; + this._onDidUpdateConfiguration.fire({ + config: this.cachedConfig.contents, + source: event.source, + sourceConfig: event.sourceConfig + }); + } + } + + public initialize(): TPromise { + return this.doLoadConfiguration().then(() => null); + } + + public getConfiguration(section?: string): C + public getConfiguration(options?: IConfigurationOptions): C + public getConfiguration(arg?: any): C { + const options = this.toOptions(arg); + const configModel = options.overrideIdentifier ? this.cachedConfig.configWithOverrides(options.overrideIdentifier) : this.cachedConfig; + return options.section ? configModel.getContentsFor(options.section) : configModel.contents; + } + + public lookup(key: string, overrideIdentifier?: string): IWorkspaceConfigurationValue { + const configurationValue = this.baseConfigurationService.lookup(key, overrideIdentifier); + return { + default: configurationValue.default, + user: configurationValue.user, + workspace: objects.clone(getConfigurationValue(overrideIdentifier ? this.cachedWorkspaceConfig.configWithOverrides(overrideIdentifier).contents : this.cachedWorkspaceConfig.contents, key)), + value: objects.clone(getConfigurationValue(overrideIdentifier ? this.cachedConfig.configWithOverrides(overrideIdentifier).contents : this.cachedConfig.contents, key)) + }; + } + + public keys() { + const keys = this.baseConfigurationService.keys(); + + return { + default: keys.default, + user: keys.user, + workspace: this.cachedWorkspaceConfig.keys + }; + } + + public values(): IWorkspaceConfigurationValues { + const result: IWorkspaceConfigurationValues = Object.create(null); + const keyset = this.keys(); + const keys = [...keyset.workspace, ...keyset.user, ...keyset.default].sort(); + + let lastKey: string; + for (const key of keys) { + if (key !== lastKey) { + lastKey = key; + result[key] = this.lookup(key); + } + } + + return result; + } + + public reloadConfiguration(section?: string): TPromise { + + // Reset caches to ensure we are hitting the disk + this.bulkFetchFromWorkspacePromise = null; + this.workspaceFilePathToConfiguration = Object.create(null); + + // Load configuration + return this.baseConfigurationService.reloadConfiguration().then(() => { + const current = this.cachedConfig; + return this.doLoadConfiguration().then(configuration => { + // emit this as update to listeners if changed + if (!objects.equals(current, this.cachedConfig)) { + this._onDidUpdateConfiguration.fire({ + config: configuration.consolidated, + source: ConfigurationSource.Workspace, + sourceConfig: configuration.workspace + }); + } + return section ? configuration.consolidated[section] : configuration.consolidated; + }); + }); + } + + private toOptions(arg: any): IConfigurationOptions { + if (typeof arg === 'string') { + return { section: arg }; + } + if (typeof arg === 'object') { + return arg; + } + return {}; + } + + private doLoadConfiguration(): TPromise> { + + // Load workspace locals + return this.loadWorkspaceConfigFiles().then(workspaceConfigFiles => { + + // Consolidate (support *.json files in the workspace settings folder) + const workspaceSettingsConfig = >workspaceConfigFiles[WORKSPACE_CONFIG_DEFAULT_PATH] || new WorkspaceSettingsConfigModel(null); + const otherConfigModels = Object.keys(workspaceConfigFiles).filter(key => key !== WORKSPACE_CONFIG_DEFAULT_PATH).map(key => >workspaceConfigFiles[key]); + this.cachedWorkspaceConfig = new WorkspaceConfigModel(workspaceSettingsConfig, otherConfigModels); + + // Override base (global < user) with workspace locals (global < user < workspace) + this.cachedConfig = >this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify) + .merge(this.cachedWorkspaceConfig); // workspace configured values + + return { + consolidated: this.cachedConfig.contents, + workspace: this.cachedWorkspaceConfig.contents + }; + }); + } + + private loadWorkspaceConfigFiles(): TPromise<{ [relativeWorkspacePath: string]: IConfigModel }> { + + // Return early if we don't have a workspace + if (!this.workspace) { + return TPromise.as(Object.create(null)); + } + + // once: when invoked for the first time we fetch json files that contribute settings + if (!this.bulkFetchFromWorkspacePromise) { + this.bulkFetchFromWorkspacePromise = resolveStat(this.workspace.toResource(this.workspaceSettingsRootFolder)).then(stat => { + if (!stat.isDirectory) { + return TPromise.as([]); + } + + return resolveContents(stat.children.filter(stat => { + const isJson = paths.extname(stat.resource.fsPath) === '.json'; + if (!isJson) { + return false; // only JSON files + } + + return this.isWorkspaceConfigurationFile(this.workspace.toWorkspaceRelativePath(stat.resource)); // only workspace config files + }).map(stat => stat.resource)); + }, err => [] /* never fail this call */) + .then((contents: IContent[]) => { + contents.forEach(content => this.workspaceFilePathToConfiguration[this.workspace.toWorkspaceRelativePath(content.resource)] = TPromise.as(this.createConfigModel(content))); + }, errors.onUnexpectedError); + } + + // on change: join on *all* configuration file promises so that we can merge them into a single configuration object. this + // happens whenever a config file changes, is deleted, or added + return this.bulkFetchFromWorkspacePromise.then(() => TPromise.join(this.workspaceFilePathToConfiguration)); + } + + public handleWorkspaceFileEvents(event: FileChangesEvent): void { + if (!this.workspace) { + return; // only enabled when we have a known workspace + } + + const events = event.changes; + let affectedByChanges = false; + + // Find changes that affect workspace configuration files + for (let i = 0, len = events.length; i < len; i++) { + const resource = events[i].resource; + const isJson = paths.extname(resource.fsPath) === '.json'; + const isDeletedSettingsFolder = (events[i].type === FileChangeType.DELETED && isEqual(paths.basename(resource.fsPath), this.workspaceSettingsRootFolder)); + if (!isJson && !isDeletedSettingsFolder) { + continue; // only JSON files or the actual settings folder + } + + const workspacePath = this.workspace.toWorkspaceRelativePath(resource); + if (!workspacePath) { + continue; // event is not inside workspace + } + + // Handle case where ".vscode" got deleted + if (workspacePath === this.workspaceSettingsRootFolder && events[i].type === FileChangeType.DELETED) { + this.workspaceFilePathToConfiguration = Object.create(null); + affectedByChanges = true; + } + + // only valid workspace config files + if (!this.isWorkspaceConfigurationFile(workspacePath)) { + continue; + } + + // insert 'fetch-promises' for add and update events and + // remove promises for delete events + switch (events[i].type) { + case FileChangeType.DELETED: + affectedByChanges = collections.remove(this.workspaceFilePathToConfiguration, workspacePath); + break; + case FileChangeType.UPDATED: + case FileChangeType.ADDED: + this.workspaceFilePathToConfiguration[workspacePath] = resolveContent(resource).then(content => this.createConfigModel(content), errors.onUnexpectedError); + affectedByChanges = true; + } + } + + // trigger reload of the configuration if we are affected by changes + if (affectedByChanges && !this.reloadConfigurationScheduler.isScheduled()) { + this.reloadConfigurationScheduler.schedule(); + } + } + + private createConfigModel(content: IContent): IConfigModel { + const path = this.workspace.toWorkspaceRelativePath(content.resource); + if (path === WORKSPACE_CONFIG_DEFAULT_PATH) { + return new WorkspaceSettingsConfigModel(content.value, content.resource.toString()); + } else { + const matches = /\/([^\.]*)*\.json/.exec(path); + if (matches && matches[1]) { + return new ScopedConfigModel(content.value, content.resource.toString(), matches[1]); + } + } + + return new ConfigModel(null); + } + + private isWorkspaceConfigurationFile(workspaceRelativePath: string): boolean { + return [WORKSPACE_CONFIG_DEFAULT_PATH, WORKSPACE_STANDALONE_CONFIGURATIONS.launch, WORKSPACE_STANDALONE_CONFIGURATIONS.tasks].some(p => p === workspaceRelativePath); + } + + public getUnsupportedWorkspaceKeys(): string[] { + return this.cachedWorkspaceConfig.workspaceSettingsConfig.unsupportedKeys; + } + +} + +// node.hs helper functions + +function resolveContents(resources: URI[]): TPromise { + const contents: IContent[] = []; + + return TPromise.join(resources.map(resource => { + return resolveContent(resource).then(content => { + contents.push(content); + }); + })).then(() => contents); +} + +function resolveContent(resource: URI): TPromise { + return readFile(resource.fsPath).then(contents => ({ resource, value: contents.toString() })); +} + +function resolveStat(resource: URI): TPromise { + return new TPromise((c, e) => { + extfs.readdir(resource.fsPath, (error, children) => { + if (error) { + if ((error).code === 'ENOTDIR') { + c({ resource }); + } else { + e(error); + } + } else { + c({ + resource, + isDirectory: true, + children: children.map(child => { return { resource: URI.file(paths.join(resource.fsPath, child)) }; }) + }); + } + }); + }); +} \ No newline at end of file From 1e74972fe2e7d51daea0b9f08bef03889bd9320c Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 13 Jun 2017 11:51:48 +0200 Subject: [PATCH 1766/2747] #28538 Remove existing workspace context service - Create a simple workspace context service for standalone editor - Use the test context service for tests --- .../browser/standalone/simpleServices.ts | 39 ++++++++ .../browser/standalone/standaloneServices.ts | 6 +- .../common/extensionEnablementService.test.ts | 7 +- .../storage/test/storageService.test.ts | 13 +-- .../electron-browser/commonProperties.test.ts | 8 +- src/vs/platform/workspace/common/workspace.ts | 99 +------------------ .../extensionsActions.test.ts | 7 +- .../extensionsWorkbenchService.test.ts | 7 +- .../terminalLinkHandler.test.ts | 10 +- .../node/configurationEditingService.test.ts | 14 +-- src/vs/workbench/test/browser/part.test.ts | 8 +- src/vs/workbench/test/common/memento.test.ts | 8 +- .../quickopen.perf.integrationTest.ts | 7 +- .../textsearch.perf.integrationTest.ts | 6 +- 14 files changed, 82 insertions(+), 157 deletions(-) diff --git a/src/vs/editor/browser/standalone/simpleServices.ts b/src/vs/editor/browser/standalone/simpleServices.ts index f9c2a8fc51e6d..3b01a330dbfaf 100644 --- a/src/vs/editor/browser/standalone/simpleServices.ts +++ b/src/vs/editor/browser/standalone/simpleServices.ts @@ -17,6 +17,7 @@ import { KeybindingResolver } from 'vs/platform/keybinding/common/keybindingReso import { IKeybindingEvent, KeybindingSource, IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding'; import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IConfirmation, IMessageService } from 'vs/platform/message/common/message'; +import { IWorkspaceContextService, Workspace, IWorkspace } from 'vs/platform/workspace/common/workspace'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { ICodeEditor, IDiffEditor } from 'vs/editor/browser/editorBrowser'; import { Selection } from 'vs/editor/common/core/selection'; @@ -489,3 +490,41 @@ export class StandaloneTelemetryService implements ITelemetryService { return null; } } + +export class SimpleWorkspaceContextService implements IWorkspaceContextService { + + public _serviceBrand: any; + + private readonly _onDidChangeFolders: Emitter = new Emitter(); + public readonly onDidChangeFolders: Event = this._onDidChangeFolders.event; + + private readonly folders: URI[]; + + constructor(private workspace?: Workspace) { + this.folders = workspace ? [workspace.resource] : []; + } + + public getFolders(): URI[] { + return this.folders; + } + + public getWorkspace(): IWorkspace { + return this.workspace; + } + + public hasWorkspace(): boolean { + return !!this.workspace; + } + + public isInsideWorkspace(resource: URI): boolean { + return this.workspace ? this.workspace.isInsideWorkspace(resource) : false; + } + + public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { + return this.workspace ? this.workspace.toWorkspaceRelativePath(resource, toOSPath) : null; + } + + public toResource(workspaceRelativePath: string): URI { + return this.workspace ? this.workspace.toResource(workspaceRelativePath) : null; + } +} \ No newline at end of file diff --git a/src/vs/editor/browser/standalone/standaloneServices.ts b/src/vs/editor/browser/standalone/standaloneServices.ts index 456290afa8d8f..0a50de37e9e60 100644 --- a/src/vs/editor/browser/standalone/standaloneServices.ts +++ b/src/vs/editor/browser/standalone/standaloneServices.ts @@ -22,7 +22,7 @@ import { IMessageService } from 'vs/platform/message/common/message'; import { IProgressService } from 'vs/platform/progress/common/progress'; import { IStorageService, NullStorageService } from 'vs/platform/storage/common/storage'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IWorkspaceContextService, WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; import { EditorWorkerServiceImpl } from 'vs/editor/common/services/editorWorkerServiceImpl'; @@ -34,7 +34,7 @@ import { CodeEditorServiceImpl } from 'vs/editor/browser/services/codeEditorServ import { SimpleConfigurationService, SimpleMenuService, SimpleMessageService, SimpleProgressService, StandaloneCommandService, StandaloneKeybindingService, - StandaloneTelemetryService + StandaloneTelemetryService, SimpleWorkspaceContextService } from 'vs/editor/browser/standalone/simpleServices'; import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyService'; import { IMenuService } from 'vs/platform/actions/common/actions'; @@ -118,7 +118,7 @@ export module StaticServices { const configurationServiceImpl = new SimpleConfigurationService(); export const configurationService = define(IConfigurationService, () => configurationServiceImpl); - export const contextService = define(IWorkspaceContextService, () => new WorkspaceContextService(configurationServiceImpl, new Workspace( + export const contextService = define(IWorkspaceContextService, () => new SimpleWorkspaceContextService(new Workspace( URI.from({ scheme: 'inmemory', authority: 'model', path: '/' }) ))); diff --git a/src/vs/platform/extensionManagement/test/common/extensionEnablementService.test.ts b/src/vs/platform/extensionManagement/test/common/extensionEnablementService.test.ts index 3ea2261d14af7..01c5ab208cd2f 100644 --- a/src/vs/platform/extensionManagement/test/common/extensionEnablementService.test.ts +++ b/src/vs/platform/extensionManagement/test/common/extensionEnablementService.test.ts @@ -12,17 +12,16 @@ import { TestInstantiationService } from 'vs/platform/instantiation/test/common/ import { Emitter } from 'vs/base/common/event'; import { StorageService, InMemoryLocalStorage } from 'vs/platform/storage/common/storageService'; import { IStorageService } from 'vs/platform/storage/common/storage'; -import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { TestContextService } from 'vs/workbench/test/workbenchTestServices'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; function storageService(instantiationService: TestInstantiationService): IStorageService { let service = instantiationService.get(IStorageService); if (!service) { let workspaceContextService = instantiationService.get(IWorkspaceContextService); if (!workspaceContextService) { - workspaceContextService = instantiationService.stub(IWorkspaceContextService, WorkspaceContextService); - instantiationService.stub(IWorkspaceContextService, 'getWorkspace', TestWorkspace); + workspaceContextService = instantiationService.stub(IWorkspaceContextService, new TestContextService()); } service = instantiationService.stub(IStorageService, instantiationService.createInstance(StorageService, new InMemoryLocalStorage(), new InMemoryLocalStorage())); } diff --git a/src/vs/platform/storage/test/storageService.test.ts b/src/vs/platform/storage/test/storageService.test.ts index ed156bfabc731..2be5dff0a16f5 100644 --- a/src/vs/platform/storage/test/storageService.test.ts +++ b/src/vs/platform/storage/test/storageService.test.ts @@ -6,11 +6,11 @@ 'use strict'; import * as assert from 'assert'; -import { clone } from 'vs/base/common/objects'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; import { StorageScope } from 'vs/platform/storage/common/storage'; -import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { StorageService, InMemoryLocalStorage } from 'vs/platform/storage/common/storageService'; +import { TestContextService } from 'vs/workbench/test/workbenchTestServices'; import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; suite('Workbench StorageSevice', () => { @@ -19,8 +19,7 @@ suite('Workbench StorageSevice', () => { setup(() => { instantiationService = new TestInstantiationService(); - contextService = instantiationService.stub(IWorkspaceContextService, WorkspaceContextService); - instantiationService.stub(IWorkspaceContextService, 'getWorkspace', TestWorkspace); + contextService = instantiationService.stub(IWorkspaceContextService, new TestContextService()); }); test('Swap Data with undefined default value', () => { @@ -94,10 +93,8 @@ suite('Workbench StorageSevice', () => { assert.strictEqual(s.get('wkey1', StorageScope.WORKSPACE), 'foo'); assert.strictEqual(s.get('wkey2', StorageScope.WORKSPACE), 'foo2'); - let ws: any = clone(TestWorkspace); - ws.uid = new Date().getTime() + 100; - instantiationService.stub(IWorkspaceContextService, 'getWorkspace', ws); - s = new StorageService(storageImpl, null, contextService.getWorkspace()); + let ws: any = new Workspace(TestWorkspace.resource, new Date().getTime() + 100, TestWorkspace.name); + s = new StorageService(storageImpl, null, ws); assert.strictEqual(s.get('key1', StorageScope.GLOBAL), 'foobar'); assert.strictEqual(s.get('key1', StorageScope.WORKSPACE, null), null); diff --git a/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts b/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts index 61a93db8637b0..a5c00cac8c80a 100644 --- a/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts +++ b/src/vs/platform/telemetry/test/electron-browser/commonProperties.test.ts @@ -6,12 +6,11 @@ import * as assert from 'assert'; import { TPromise } from 'vs/base/common/winjs.base'; -import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; import { resolveWorkbenchCommonProperties } from 'vs/platform/telemetry/node/workbenchCommonProperties'; -import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { StorageService, InMemoryLocalStorage } from 'vs/platform/storage/common/storageService'; import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; + suite('Telemetry - common properties', function () { const commit = void 0; @@ -19,10 +18,7 @@ suite('Telemetry - common properties', function () { let storageService; setup(() => { - let instantiationService = new TestInstantiationService(); - let contextService = instantiationService.stub(IWorkspaceContextService, WorkspaceContextService); - instantiationService.stub(IWorkspaceContextService, 'getWorkspace', TestWorkspace); - storageService = new StorageService(new InMemoryLocalStorage(), null, contextService.getWorkspace()); + storageService = new StorageService(new InMemoryLocalStorage(), null, TestWorkspace); }); test('default', function () { diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index b74d8fd31d91e..a1ccdac3e62f3 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -9,11 +9,7 @@ import { createDecorator } from 'vs/platform/instantiation/common/instantiation' import paths = require('vs/base/common/paths'); import { isEqualOrParent } from 'vs/platform/files/common/files'; import { isLinux } from 'vs/base/common/platform'; -import Event, { Emitter } from 'vs/base/common/event'; -import { IConfigurationService } from "vs/platform/configuration/common/configuration"; -import { IDisposable, dispose } from "vs/base/common/lifecycle"; -import { distinct, equals } from "vs/base/common/arrays"; -import { Schemas } from "vs/base/common/network"; +import Event from 'vs/base/common/event'; export const IWorkspaceContextService = createDecorator('contextService'); @@ -120,97 +116,4 @@ export class Workspace implements IWorkspace { public toJSON() { return { resource: this._resource, uid: this._uid, name: this._name }; } -} - -type IWorkspaceConfiguration = { [rootFolder: string]: { folders: string[]; } }; - -export class WorkspaceContextService implements IWorkspaceContextService { - - public _serviceBrand: any; - - private readonly _onDidChangeFolders: Emitter = new Emitter(); - public readonly onDidChangeFolders: Event = this._onDidChangeFolders.event; - - private folders: URI[]; - private toDispose: IDisposable[]; - - constructor(private configurationService: IConfigurationService, private workspace?: Workspace) { - this.toDispose = []; - - this.toDispose.push(this._onDidChangeFolders); - - this.folders = workspace ? [workspace.resource] : []; - - this.resolveAdditionalFolders(); - - this.registerListeners(); - } - - private registerListeners(): void { - this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onDidUpdateConfiguration())); - } - - private onDidUpdateConfiguration(): void { - this.resolveAdditionalFolders(true); - } - - private resolveAdditionalFolders(notify?: boolean): void { - if (!this.workspace) { - return; // no additional folders for empty workspaces - } - - // Resovled configured folders for workspace - let configuredFolders: URI[] = [this.workspace.resource]; - const config = this.configurationService.getConfiguration('workspace'); - if (config) { - const workspaceConfig = config[this.workspace.resource.toString()]; - if (workspaceConfig) { - const additionalFolders = workspaceConfig.folders - .map(f => URI.parse(f)) - .filter(r => r.scheme === Schemas.file); // only support files for now - - configuredFolders.push(...additionalFolders); - } - } - - // Remove duplicates - configuredFolders = distinct(configuredFolders, r => r.toString()); - - // Find changes - const changed = !equals(this.folders, configuredFolders, (r1, r2) => r1.toString() === r2.toString()); - - this.folders = configuredFolders; - - if (notify && changed) { - this._onDidChangeFolders.fire(configuredFolders); - } - } - - public getFolders(): URI[] { - return this.folders; - } - - public getWorkspace(): IWorkspace { - return this.workspace; - } - - public hasWorkspace(): boolean { - return !!this.workspace; - } - - public isInsideWorkspace(resource: URI): boolean { - return this.workspace ? this.workspace.isInsideWorkspace(resource) : false; - } - - public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { - return this.workspace ? this.workspace.toWorkspaceRelativePath(resource, toOSPath) : null; - } - - public toResource(workspaceRelativePath: string): URI { - return this.workspace ? this.workspace.toResource(workspaceRelativePath) : null; - } - - public dispose(): void { - dispose(this.toDispose); - } } \ No newline at end of file diff --git a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts index 084d5a3ad71cd..405be3a135fd6 100644 --- a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts +++ b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsActions.test.ts @@ -28,10 +28,9 @@ import { IPager } from 'vs/base/common/paging'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; -import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { TestContextService } from 'vs/workbench/test/workbenchTestServices'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { TestConfigurationService } from "vs/platform/configuration/test/common/testConfigurationService"; suite('ExtensionsActions Test', () => { @@ -53,7 +52,7 @@ suite('ExtensionsActions Test', () => { instantiationService.stub(IURLService, { onOpenURL: new Emitter().event }); instantiationService.stub(ITelemetryService, NullTelemetryService); - instantiationService.set(IWorkspaceContextService, new WorkspaceContextService(new TestConfigurationService(), TestWorkspace)); + instantiationService.stub(IWorkspaceContextService, new TestContextService()); instantiationService.stub(IConfigurationService, { onDidUpdateConfiguration: () => { }, getConfiguration: () => ({}) }); instantiationService.stub(IExtensionGalleryService, ExtensionGalleryService); diff --git a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsWorkbenchService.test.ts b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsWorkbenchService.test.ts index 15ba37559d77b..3cfe083cd1690 100644 --- a/src/vs/workbench/parts/extensions/test/electron-browser/extensionsWorkbenchService.test.ts +++ b/src/vs/workbench/parts/extensions/test/electron-browser/extensionsWorkbenchService.test.ts @@ -28,11 +28,10 @@ import Event, { Emitter } from 'vs/base/common/event'; import { IPager } from 'vs/base/common/paging'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { NullTelemetryService } from 'vs/platform/telemetry/common/telemetryUtils'; -import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { TestContextService } from 'vs/workbench/test/workbenchTestServices'; import { IChoiceService } from 'vs/platform/message/common/message'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { TestConfigurationService } from "vs/platform/configuration/test/common/testConfigurationService"; suite('ExtensionsWorkbenchService Test', () => { @@ -56,7 +55,7 @@ suite('ExtensionsWorkbenchService Test', () => { instantiationService.stub(IExtensionGalleryService, ExtensionGalleryService); - instantiationService.set(IWorkspaceContextService, new WorkspaceContextService(new TestConfigurationService(), TestWorkspace)); + instantiationService.stub(IWorkspaceContextService, new TestContextService()); instantiationService.stub(IConfigurationService, { onDidUpdateConfiguration: () => { }, getConfiguration: () => ({}) }); instantiationService.stub(IExtensionManagementService, ExtensionManagementService); diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts index 3670f2a79f989..1c6a4f13b7986 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts @@ -8,12 +8,12 @@ import * as assert from 'assert'; import { Platform } from 'vs/base/common/platform'; import { TerminalLinkHandler, LineColumnInfo } from 'vs/workbench/parts/terminal/electron-browser/terminalLinkHandler'; -import { WorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; +import { Workspace } from 'vs/platform/workspace/common/workspace'; +import { TestContextService } from 'vs/workbench/test/workbenchTestServices'; import URI from 'vs/base/common/uri'; import * as strings from 'vs/base/common/strings'; import * as path from 'path'; import * as sinon from 'sinon'; -import { TestConfigurationService } from "vs/platform/configuration/test/common/testConfigurationService"; class TestTerminalLinkHandler extends TerminalLinkHandler { public get localLinkRegex(): RegExp { @@ -176,7 +176,7 @@ suite('Workbench - TerminalLinkHandler', () => { suite('preprocessPath', () => { test('Windows', () => { const linkHandler = new TestTerminalLinkHandler(new TestXterm(), Platform.Windows, null, null, - new WorkspaceContextService(new TestConfigurationService(), new TestWorkspace('C:\\base'))); + new TestContextService(new TestWorkspace('C:\\base'))); let stub = sinon.stub(path, 'join', function (arg1, arg2) { return arg1 + '\\' + arg2; @@ -190,7 +190,7 @@ suite('Workbench - TerminalLinkHandler', () => { test('Linux', () => { const linkHandler = new TestTerminalLinkHandler(new TestXterm(), Platform.Linux, null, null, - new WorkspaceContextService(new TestConfigurationService(), new TestWorkspace('/base'))); + new TestContextService(new TestWorkspace('/base'))); let stub = sinon.stub(path, 'join', function (arg1, arg2) { return arg1 + '/' + arg2; @@ -203,7 +203,7 @@ suite('Workbench - TerminalLinkHandler', () => { }); test('No Workspace', () => { - const linkHandler = new TestTerminalLinkHandler(new TestXterm(), Platform.Linux, null, null, new WorkspaceContextService(new TestConfigurationService())); + const linkHandler = new TestTerminalLinkHandler(new TestXterm(), Platform.Linux, null, null, new TestContextService(null)); assert.equal(linkHandler.preprocessPath('./src/file1'), null); assert.equal(linkHandler.preprocessPath('src/file2'), null); diff --git a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts index 86e267938fe54..7e7eb3de7afee 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts @@ -15,13 +15,13 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { Registry } from 'vs/platform/platform'; import { ParsedArgs, IEnvironmentService } from 'vs/platform/environment/common/environment'; import { parseArgs } from 'vs/platform/environment/node/argv'; -import { WorkspaceContextService, IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import extfs = require('vs/base/node/extfs'); import { TestTextFileService, TestEditorGroupService, TestLifecycleService, TestBackupFileService } from 'vs/workbench/test/workbenchTestServices'; import uuid = require('vs/base/common/uuid'); import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; -import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configurationService'; +import { WorkspaceService } from 'vs/workbench/services/workspace/node/workspace'; import URI from 'vs/base/common/uri'; import { FileService } from 'vs/workbench/services/files/node/fileService'; import { ConfigurationEditingService } from 'vs/workbench/services/configuration/node/configurationEditingService'; @@ -116,9 +116,9 @@ suite('ConfigurationEditingService', () => { const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); instantiationService.stub(IEnvironmentService, environmentService); const workspace = noWorkspace ? null : new Workspace(URI.file(workspaceDir)); - const configurationService = new WorkspaceConfigurationService(environmentService, workspace); - instantiationService.stub(IWorkspaceContextService, new WorkspaceContextService(configurationService, workspace)); - instantiationService.stub(IConfigurationService, configurationService); + const workspaceService = new WorkspaceService(environmentService, workspace); + instantiationService.stub(IWorkspaceContextService, workspaceService); + instantiationService.stub(IConfigurationService, workspaceService); instantiationService.stub(ILifecycleService, new TestLifecycleService()); instantiationService.stub(IEditorGroupService, new TestEditorGroupService()); instantiationService.stub(ITelemetryService, NullTelemetryService); @@ -140,7 +140,7 @@ suite('ConfigurationEditingService', () => { }); testObject = instantiationService.createInstance(ConfigurationEditingService); - return configurationService.initialize(); + return workspaceService.initialize(); } teardown(() => { @@ -150,7 +150,7 @@ suite('ConfigurationEditingService', () => { function clearServices(): void { if (instantiationService) { - const configuraitonService = instantiationService.get(IConfigurationService); + const configuraitonService = instantiationService.get(IConfigurationService); if (configuraitonService) { configuraitonService.dispose(); } diff --git a/src/vs/workbench/test/browser/part.test.ts b/src/vs/workbench/test/browser/part.test.ts index 37277b67a78f8..6aeb1db693b1b 100644 --- a/src/vs/workbench/test/browser/part.test.ts +++ b/src/vs/workbench/test/browser/part.test.ts @@ -9,12 +9,10 @@ import * as assert from 'assert'; import { Build, Builder } from 'vs/base/browser/builder'; import { Part } from 'vs/workbench/browser/part'; import * as Types from 'vs/base/common/types'; -import { IWorkspaceContextService, WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { StorageService, InMemoryLocalStorage } from 'vs/platform/storage/common/storageService'; -import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; import { TestThemeService } from 'vs/workbench/test/workbenchTestServices'; -import { TestConfigurationService } from "vs/platform/configuration/test/common/testConfigurationService"; +import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; class MyPart extends Part { @@ -85,15 +83,13 @@ class MyPart3 extends Part { suite('Workbench Part', () => { let fixture: HTMLElement; let fixtureId = 'workbench-part-fixture'; - let context: IWorkspaceContextService; let storage: IStorageService; setup(() => { fixture = document.createElement('div'); fixture.id = fixtureId; document.body.appendChild(fixture); - context = new WorkspaceContextService(new TestConfigurationService(), TestWorkspace); - storage = new StorageService(new InMemoryLocalStorage(), null, context.getWorkspace()); + storage = new StorageService(new InMemoryLocalStorage(), null, TestWorkspace); }); teardown(() => { diff --git a/src/vs/workbench/test/common/memento.test.ts b/src/vs/workbench/test/common/memento.test.ts index c21ce5f90360b..78edf69863cad 100644 --- a/src/vs/workbench/test/common/memento.test.ts +++ b/src/vs/workbench/test/common/memento.test.ts @@ -6,20 +6,18 @@ 'use strict'; import * as assert from 'assert'; -import { WorkspaceContextService } from 'vs/platform/workspace/common/workspace'; + import { StorageScope } from 'vs/platform/storage/common/storage'; -import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; import { Memento, Scope } from 'vs/workbench/common/memento'; import { StorageService, InMemoryLocalStorage } from 'vs/platform/storage/common/storageService'; -import { TestConfigurationService } from "vs/platform/configuration/test/common/testConfigurationService"; +import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; suite('Workbench Memento', () => { let context; let storage; setup(() => { - context = new WorkspaceContextService(new TestConfigurationService(), TestWorkspace); - storage = new StorageService(new InMemoryLocalStorage(), null, context.getWorkspace()); + storage = new StorageService(new InMemoryLocalStorage(), null, TestWorkspace); }); test('Loading and Saving Memento with Scopes', () => { diff --git a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts index 26a08ffd11b01..c0c8221a118fe 100644 --- a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts @@ -7,7 +7,7 @@ import 'vs/workbench/parts/search/browser/search.contribution'; // load contributions import * as assert from 'assert'; -import { WorkspaceContextService, IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { createSyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ISearchService } from 'vs/platform/search/common/search'; @@ -21,7 +21,7 @@ import { QuickOpenHandler, IQuickOpenRegistry, Extensions } from 'vs/workbench/b import { Registry } from 'vs/platform/platform'; import { SearchService } from 'vs/workbench/services/search/node/searchService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; -import { TestEnvironmentService, TestEditorService, TestEditorGroupService } from 'vs/workbench/test/workbenchTestServices'; +import { TestEnvironmentService, TestEditorService, TestEditorGroupService, TestContextService } from 'vs/workbench/test/workbenchTestServices'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { TPromise } from 'vs/base/common/winjs.base'; import URI from 'vs/base/common/uri'; @@ -31,7 +31,6 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl'; import { IModelService } from 'vs/editor/common/services/modelService'; - namespace Timer { export interface ITimerEvent { id: number; @@ -73,7 +72,7 @@ suite('QuickOpen performance (integration)', () => { [ITelemetryService, telemetryService], [IConfigurationService, configurationService], [IModelService, new ModelServiceImpl(null, configurationService)], - [IWorkspaceContextService, new WorkspaceContextService(configurationService, new Workspace(URI.file(testWorkspacePath)))], + [IWorkspaceContextService, new TestContextService(new Workspace(URI.file(testWorkspacePath)))], [IWorkbenchEditorService, new TestEditorService()], [IEditorGroupService, new TestEditorGroupService()], [IEnvironmentService, TestEnvironmentService], diff --git a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts index 64f77fcc9c975..cda4052f987f8 100644 --- a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts @@ -8,7 +8,7 @@ import 'vs/workbench/parts/search/browser/search.contribution'; // load contributions import * as assert from 'assert'; import * as fs from 'fs'; -import { WorkspaceContextService, IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; import { createSyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ISearchService, IQueryOptions } from 'vs/platform/search/common/search'; @@ -20,7 +20,7 @@ import * as minimist from 'minimist'; import * as path from 'path'; import { SearchService } from 'vs/workbench/services/search/node/searchService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; -import { TestEnvironmentService, TestEditorService, TestEditorGroupService } from 'vs/workbench/test/workbenchTestServices'; +import { TestEnvironmentService, TestEditorService, TestEditorGroupService, TestContextService } from 'vs/workbench/test/workbenchTestServices'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { TPromise } from 'vs/base/common/winjs.base'; import URI from 'vs/base/common/uri'; @@ -62,7 +62,7 @@ suite('TextSearch performance (integration)', () => { [ITelemetryService, telemetryService], [IConfigurationService, configurationService], [IModelService, new ModelServiceImpl(null, configurationService)], - [IWorkspaceContextService, new WorkspaceContextService(configurationService, new Workspace(URI.file(testWorkspacePath)))], + [IWorkspaceContextService, new TestContextService(new Workspace(URI.file(testWorkspacePath)))], [IWorkbenchEditorService, new TestEditorService()], [IEditorGroupService, new TestEditorGroupService()], [IEnvironmentService, TestEnvironmentService], From 2e2addebf7b8a4ec73b6d451fea6ef8095012ceb Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 13 Jun 2017 12:40:25 +0200 Subject: [PATCH 1767/2747] #28538 Remove existing workspace configuration service. Update tests. --- src/vs/workbench/electron-browser/main.ts | 12 +- .../workbench/electron-browser/workbench.ts | 2 +- .../node/configuration.ts} | 4 +- .../node/configurationService.ts | 357 ------------------ .../node/nullConfigurationService.ts | 44 --- ...nService.test.ts => configuration.test.ts} | 2 +- .../node/configurationEditingService.test.ts | 6 +- 7 files changed, 13 insertions(+), 414 deletions(-) rename src/vs/workbench/services/{workspace/node/workspace.ts => configuration/node/configuration.ts} (98%) delete mode 100644 src/vs/workbench/services/configuration/node/configurationService.ts delete mode 100644 src/vs/workbench/services/configuration/node/nullConfigurationService.ts rename src/vs/workbench/services/configuration/test/node/{configurationService.test.ts => configuration.test.ts} (99%) diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index 26d301a6ded2a..cf9c5e45db704 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -19,7 +19,7 @@ import uri from 'vs/base/common/uri'; import strings = require('vs/base/common/strings'); import { IResourceInput } from 'vs/platform/editor/common/editor'; import { Workspace } from 'vs/platform/workspace/common/workspace'; -import { WorkspaceService } from 'vs/workbench/services/configuration/node/configuration'; +import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configuration'; import { realpath, stat } from 'vs/base/node/pfs'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import path = require('path'); @@ -129,12 +129,12 @@ function getWorkspace(workspacePath: string): TPromise { function openWorkbench(configuration: IWindowConfiguration, workspace: Workspace, options: IOptions): TPromise { const environmentService = new EnvironmentService(configuration, configuration.execPath); - const workspaceService = new WorkspaceService(environmentService, workspace); - const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !workspaceService.hasWorkspace()); + const workspaceConfigurationService = new WorkspaceConfigurationService(environmentService, workspace); + const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !workspaceConfigurationService.hasWorkspace()); // Since the configuration service is one of the core services that is used in so many places, we initialize it // right before startup of the workbench shell to have its data ready for consumers - return workspaceService.initialize().then(() => { + return workspaceConfigurationService.initialize().then(() => { timerService.beforeDOMContentLoaded = Date.now(); return domContentLoaded().then(() => { @@ -143,8 +143,8 @@ function openWorkbench(configuration: IWindowConfiguration, workspace: Workspace // Open Shell timerService.beforeWorkbenchOpen = Date.now(); const shell = new WorkbenchShell(document.body, { - contextService: workspaceService, - configurationService: workspaceService, + contextService: workspaceConfigurationService, + configurationService: workspaceConfigurationService, environmentService, timerService }, configuration, options); diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index d5b3f3bd621d7..a8afe425a0396 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -47,7 +47,7 @@ import { IStorageService, StorageScope } from 'vs/platform/storage/common/storag import { ContextMenuService } from 'vs/workbench/services/contextview/electron-browser/contextmenuService'; import { WorkbenchKeybindingService } from 'vs/workbench/services/keybinding/electron-browser/keybindingService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configurationService'; +import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configuration'; import { IConfigurationEditingService } from 'vs/workbench/services/configuration/common/configurationEditing'; import { ConfigurationEditingService } from 'vs/workbench/services/configuration/node/configurationEditingService'; import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyService'; diff --git a/src/vs/workbench/services/workspace/node/workspace.ts b/src/vs/workbench/services/configuration/node/configuration.ts similarity index 98% rename from src/vs/workbench/services/workspace/node/workspace.ts rename to src/vs/workbench/services/configuration/node/configuration.ts index 85f411d715c9f..4f0baaf5ba0ff 100644 --- a/src/vs/workbench/services/workspace/node/workspace.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -44,7 +44,7 @@ interface IWorkspaceConfiguration { type IWorkspaceFoldersConfiguration = { [rootFolder: string]: { folders: string[]; } }; -export class WorkspaceService extends Disposable implements IWorkspaceContextService, IWorkspaceConfigurationService { +export class WorkspaceConfigurationService extends Disposable implements IWorkspaceContextService, IWorkspaceConfigurationService { private static RELOAD_CONFIGURATION_DELAY = 50; @@ -83,7 +83,7 @@ export class WorkspaceService extends Disposable implements IWorkspaceContextSer source: ConfigurationSource.Workspace, sourceConfig: config.workspace })) - .done(null, errors.onUnexpectedError), WorkspaceService.RELOAD_CONFIGURATION_DELAY)); + .done(null, errors.onUnexpectedError), WorkspaceConfigurationService.RELOAD_CONFIGURATION_DELAY)); this._register(this.baseConfigurationService.onDidUpdateConfiguration(e => this.onBaseConfigurationChanged(e))); this._register(this.onDidUpdateConfiguration(e => this.resolveAdditionalFolders(true))); diff --git a/src/vs/workbench/services/configuration/node/configurationService.ts b/src/vs/workbench/services/configuration/node/configurationService.ts deleted file mode 100644 index 7001b1bb00df3..0000000000000 --- a/src/vs/workbench/services/configuration/node/configurationService.ts +++ /dev/null @@ -1,357 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { TPromise } from 'vs/base/common/winjs.base'; -import uri from 'vs/base/common/uri'; -import paths = require('vs/base/common/paths'); -import extfs = require('vs/base/node/extfs'); -import objects = require('vs/base/common/objects'); -import { RunOnceScheduler } from 'vs/base/common/async'; -import collections = require('vs/base/common/collections'); -import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { IDisposable, Disposable } from 'vs/base/common/lifecycle'; -import { readFile } from 'vs/base/node/pfs'; -import errors = require('vs/base/common/errors'); -import { ScopedConfigModel, WorkspaceConfigModel, WorkspaceSettingsConfigModel } from 'vs/workbench/services/configuration/common/configurationModels'; -import { IConfigurationServiceEvent, ConfigurationSource, getConfigurationValue, IConfigModel, IConfigurationOptions } from 'vs/platform/configuration/common/configuration'; -import { ConfigModel } from 'vs/platform/configuration/common/model'; -import { ConfigurationService as BaseConfigurationService } from 'vs/platform/configuration/node/configurationService'; -import { IWorkspaceConfigurationValues, IWorkspaceConfigurationService, IWorkspaceConfigurationValue, WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME, WORKSPACE_STANDALONE_CONFIGURATIONS, WORKSPACE_CONFIG_DEFAULT_PATH } from 'vs/workbench/services/configuration/common/configuration'; -import { FileChangeType, FileChangesEvent, isEqual } from 'vs/platform/files/common/files'; -import Event, { Emitter } from 'vs/base/common/event'; -import { Workspace } from "vs/platform/workspace/common/workspace"; - -interface IStat { - resource: uri; - isDirectory?: boolean; - children?: { resource: uri; }[]; -} - -interface IContent { - resource: uri; - value: string; -} - -interface IWorkspaceConfiguration { - workspace: T; - consolidated: any; -} - -/** - * Wraps around the basic configuration service and adds knowledge about workspace settings. - */ -export class WorkspaceConfigurationService extends Disposable implements IWorkspaceConfigurationService, IDisposable { - - public _serviceBrand: any; - - private static RELOAD_CONFIGURATION_DELAY = 50; - - private _onDidUpdateConfiguration: Emitter; - private baseConfigurationService: BaseConfigurationService; - - private cachedConfig: ConfigModel; - private cachedWorkspaceConfig: WorkspaceConfigModel; - - private bulkFetchFromWorkspacePromise: TPromise; - private workspaceFilePathToConfiguration: { [relativeWorkspacePath: string]: TPromise> }; - private reloadConfigurationScheduler: RunOnceScheduler; - - constructor( - private environmentService: IEnvironmentService, - private workspace?: Workspace, - private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME - ) { - super(); - this.workspaceFilePathToConfiguration = Object.create(null); - - this.cachedConfig = new ConfigModel(null); - this.cachedWorkspaceConfig = new WorkspaceConfigModel(new WorkspaceSettingsConfigModel(null), []); - - this._onDidUpdateConfiguration = this._register(new Emitter()); - - this.baseConfigurationService = this._register(new BaseConfigurationService(environmentService)); - - this.reloadConfigurationScheduler = this._register(new RunOnceScheduler(() => this.doLoadConfiguration() - .then(config => this._onDidUpdateConfiguration.fire({ - config: config.consolidated, - source: ConfigurationSource.Workspace, - sourceConfig: config.workspace - })) - .done(null, errors.onUnexpectedError), WorkspaceConfigurationService.RELOAD_CONFIGURATION_DELAY)); - - this._register(this.baseConfigurationService.onDidUpdateConfiguration(e => this.onBaseConfigurationChanged(e))); - } - - get onDidUpdateConfiguration(): Event { - return this._onDidUpdateConfiguration.event; - } - - private onBaseConfigurationChanged(event: IConfigurationServiceEvent): void { - if (event.source === ConfigurationSource.Default) { - this.cachedWorkspaceConfig.update(); - } - - // update cached config when base config changes - const configModel = >this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify) - .merge(this.cachedWorkspaceConfig); // workspace configured values - - // emit this as update to listeners if changed - if (!objects.equals(this.cachedConfig.contents, configModel.contents)) { - this.cachedConfig = configModel; - this._onDidUpdateConfiguration.fire({ - config: this.cachedConfig.contents, - source: event.source, - sourceConfig: event.sourceConfig - }); - } - } - - public initialize(): TPromise { - return this.doLoadConfiguration().then(() => null); - } - - public getConfiguration(section?: string): C - public getConfiguration(options?: IConfigurationOptions): C - public getConfiguration(arg?: any): C { - const options = this.toOptions(arg); - const configModel = options.overrideIdentifier ? this.cachedConfig.configWithOverrides(options.overrideIdentifier) : this.cachedConfig; - return options.section ? configModel.getContentsFor(options.section) : configModel.contents; - } - - public lookup(key: string, overrideIdentifier?: string): IWorkspaceConfigurationValue { - const configurationValue = this.baseConfigurationService.lookup(key, overrideIdentifier); - return { - default: configurationValue.default, - user: configurationValue.user, - workspace: objects.clone(getConfigurationValue(overrideIdentifier ? this.cachedWorkspaceConfig.configWithOverrides(overrideIdentifier).contents : this.cachedWorkspaceConfig.contents, key)), - value: objects.clone(getConfigurationValue(overrideIdentifier ? this.cachedConfig.configWithOverrides(overrideIdentifier).contents : this.cachedConfig.contents, key)) - }; - } - - public keys() { - const keys = this.baseConfigurationService.keys(); - - return { - default: keys.default, - user: keys.user, - workspace: this.cachedWorkspaceConfig.keys - }; - } - - public values(): IWorkspaceConfigurationValues { - const result: IWorkspaceConfigurationValues = Object.create(null); - const keyset = this.keys(); - const keys = [...keyset.workspace, ...keyset.user, ...keyset.default].sort(); - - let lastKey: string; - for (const key of keys) { - if (key !== lastKey) { - lastKey = key; - result[key] = this.lookup(key); - } - } - - return result; - } - - public reloadConfiguration(section?: string): TPromise { - - // Reset caches to ensure we are hitting the disk - this.bulkFetchFromWorkspacePromise = null; - this.workspaceFilePathToConfiguration = Object.create(null); - - // Load configuration - return this.baseConfigurationService.reloadConfiguration().then(() => { - const current = this.cachedConfig; - return this.doLoadConfiguration().then(configuration => { - // emit this as update to listeners if changed - if (!objects.equals(current, this.cachedConfig)) { - this._onDidUpdateConfiguration.fire({ - config: configuration.consolidated, - source: ConfigurationSource.Workspace, - sourceConfig: configuration.workspace - }); - } - return section ? configuration.consolidated[section] : configuration.consolidated; - }); - }); - } - - private toOptions(arg: any): IConfigurationOptions { - if (typeof arg === 'string') { - return { section: arg }; - } - if (typeof arg === 'object') { - return arg; - } - return {}; - } - - private doLoadConfiguration(): TPromise> { - - // Load workspace locals - return this.loadWorkspaceConfigFiles().then(workspaceConfigFiles => { - - // Consolidate (support *.json files in the workspace settings folder) - const workspaceSettingsConfig = >workspaceConfigFiles[WORKSPACE_CONFIG_DEFAULT_PATH] || new WorkspaceSettingsConfigModel(null); - const otherConfigModels = Object.keys(workspaceConfigFiles).filter(key => key !== WORKSPACE_CONFIG_DEFAULT_PATH).map(key => >workspaceConfigFiles[key]); - this.cachedWorkspaceConfig = new WorkspaceConfigModel(workspaceSettingsConfig, otherConfigModels); - - // Override base (global < user) with workspace locals (global < user < workspace) - this.cachedConfig = >this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify) - .merge(this.cachedWorkspaceConfig); // workspace configured values - - return { - consolidated: this.cachedConfig.contents, - workspace: this.cachedWorkspaceConfig.contents - }; - }); - } - - private loadWorkspaceConfigFiles(): TPromise<{ [relativeWorkspacePath: string]: IConfigModel }> { - - // Return early if we don't have a workspace - if (!this.workspace) { - return TPromise.as(Object.create(null)); - } - - // once: when invoked for the first time we fetch json files that contribute settings - if (!this.bulkFetchFromWorkspacePromise) { - this.bulkFetchFromWorkspacePromise = resolveStat(this.workspace.toResource(this.workspaceSettingsRootFolder)).then(stat => { - if (!stat.isDirectory) { - return TPromise.as([]); - } - - return resolveContents(stat.children.filter(stat => { - const isJson = paths.extname(stat.resource.fsPath) === '.json'; - if (!isJson) { - return false; // only JSON files - } - - return this.isWorkspaceConfigurationFile(this.workspace.toWorkspaceRelativePath(stat.resource)); // only workspace config files - }).map(stat => stat.resource)); - }, err => [] /* never fail this call */) - .then((contents: IContent[]) => { - contents.forEach(content => this.workspaceFilePathToConfiguration[this.workspace.toWorkspaceRelativePath(content.resource)] = TPromise.as(this.createConfigModel(content))); - }, errors.onUnexpectedError); - } - - // on change: join on *all* configuration file promises so that we can merge them into a single configuration object. this - // happens whenever a config file changes, is deleted, or added - return this.bulkFetchFromWorkspacePromise.then(() => TPromise.join(this.workspaceFilePathToConfiguration)); - } - - public handleWorkspaceFileEvents(event: FileChangesEvent): void { - if (!this.workspace) { - return; // only enabled when we have a known workspace - } - - const events = event.changes; - let affectedByChanges = false; - - // Find changes that affect workspace configuration files - for (let i = 0, len = events.length; i < len; i++) { - const resource = events[i].resource; - const isJson = paths.extname(resource.fsPath) === '.json'; - const isDeletedSettingsFolder = (events[i].type === FileChangeType.DELETED && isEqual(paths.basename(resource.fsPath), this.workspaceSettingsRootFolder)); - if (!isJson && !isDeletedSettingsFolder) { - continue; // only JSON files or the actual settings folder - } - - const workspacePath = this.workspace.toWorkspaceRelativePath(resource); - if (!workspacePath) { - continue; // event is not inside workspace - } - - // Handle case where ".vscode" got deleted - if (workspacePath === this.workspaceSettingsRootFolder && events[i].type === FileChangeType.DELETED) { - this.workspaceFilePathToConfiguration = Object.create(null); - affectedByChanges = true; - } - - // only valid workspace config files - if (!this.isWorkspaceConfigurationFile(workspacePath)) { - continue; - } - - // insert 'fetch-promises' for add and update events and - // remove promises for delete events - switch (events[i].type) { - case FileChangeType.DELETED: - affectedByChanges = collections.remove(this.workspaceFilePathToConfiguration, workspacePath); - break; - case FileChangeType.UPDATED: - case FileChangeType.ADDED: - this.workspaceFilePathToConfiguration[workspacePath] = resolveContent(resource).then(content => this.createConfigModel(content), errors.onUnexpectedError); - affectedByChanges = true; - } - } - - // trigger reload of the configuration if we are affected by changes - if (affectedByChanges && !this.reloadConfigurationScheduler.isScheduled()) { - this.reloadConfigurationScheduler.schedule(); - } - } - - private createConfigModel(content: IContent): IConfigModel { - const path = this.workspace.toWorkspaceRelativePath(content.resource); - if (path === WORKSPACE_CONFIG_DEFAULT_PATH) { - return new WorkspaceSettingsConfigModel(content.value, content.resource.toString()); - } else { - const matches = /\/([^\.]*)*\.json/.exec(path); - if (matches && matches[1]) { - return new ScopedConfigModel(content.value, content.resource.toString(), matches[1]); - } - } - - return new ConfigModel(null); - } - - private isWorkspaceConfigurationFile(workspaceRelativePath: string): boolean { - return [WORKSPACE_CONFIG_DEFAULT_PATH, WORKSPACE_STANDALONE_CONFIGURATIONS.launch, WORKSPACE_STANDALONE_CONFIGURATIONS.tasks].some(p => p === workspaceRelativePath); - } - - public getUnsupportedWorkspaceKeys(): string[] { - return this.cachedWorkspaceConfig.workspaceSettingsConfig.unsupportedKeys; - } -} - -// node.hs helper functions - -function resolveContents(resources: uri[]): TPromise { - const contents: IContent[] = []; - - return TPromise.join(resources.map(resource => { - return resolveContent(resource).then(content => { - contents.push(content); - }); - })).then(() => contents); -} - -function resolveContent(resource: uri): TPromise { - return readFile(resource.fsPath).then(contents => ({ resource, value: contents.toString() })); -} - -function resolveStat(resource: uri): TPromise { - return new TPromise((c, e) => { - extfs.readdir(resource.fsPath, (error, children) => { - if (error) { - if ((error).code === 'ENOTDIR') { - c({ resource }); - } else { - e(error); - } - } else { - c({ - resource, - isDirectory: true, - children: children.map(child => { return { resource: uri.file(paths.join(resource.fsPath, child)) }; }) - }); - } - }); - }); -} \ No newline at end of file diff --git a/src/vs/workbench/services/configuration/node/nullConfigurationService.ts b/src/vs/workbench/services/configuration/node/nullConfigurationService.ts deleted file mode 100644 index c38b5b29b2e54..0000000000000 --- a/src/vs/workbench/services/configuration/node/nullConfigurationService.ts +++ /dev/null @@ -1,44 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, getConfigurationValue, IConfigurationKeys } from "vs/platform/configuration/common/configuration"; -import Event, { Emitter } from 'vs/base/common/event'; -import { TPromise } from "vs/base/common/winjs.base"; - -export class NullConfigurationService implements IConfigurationService { - - _serviceBrand: any; - - private _onDidUpdateConfiguration = new Emitter(); - public onDidUpdateConfiguration: Event = this._onDidUpdateConfiguration.event; - - private _config: any; - - constructor() { - this._config = Object.create(null); - } - - public getConfiguration(section?: any): T { - return this._config; - } - - public reloadConfiguration(section?: string): TPromise { - return TPromise.as(this.getConfiguration(section)); - } - - public lookup(key: string): IConfigurationValue { - return { - value: getConfigurationValue(this.getConfiguration(), key), - default: getConfigurationValue(this.getConfiguration(), key), - user: getConfigurationValue(this.getConfiguration(), key) - }; - } - - public keys(): IConfigurationKeys { - return { default: [], user: [] }; - } -} \ No newline at end of file diff --git a/src/vs/workbench/services/configuration/test/node/configurationService.test.ts b/src/vs/workbench/services/configuration/test/node/configuration.test.ts similarity index 99% rename from src/vs/workbench/services/configuration/test/node/configurationService.test.ts rename to src/vs/workbench/services/configuration/test/node/configuration.test.ts index c61238061d7f4..d7de49aba3207 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configuration.test.ts @@ -19,7 +19,7 @@ import { parseArgs } from 'vs/platform/environment/node/argv'; import extfs = require('vs/base/node/extfs'); import uuid = require('vs/base/common/uuid'); import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; -import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configurationService'; +import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configuration'; import URI from 'vs/base/common/uri'; import { FileChangeType, FileChangesEvent } from 'vs/platform/files/common/files'; diff --git a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts index 7e7eb3de7afee..dfba23f324a7f 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts @@ -21,7 +21,7 @@ import extfs = require('vs/base/node/extfs'); import { TestTextFileService, TestEditorGroupService, TestLifecycleService, TestBackupFileService } from 'vs/workbench/test/workbenchTestServices'; import uuid = require('vs/base/common/uuid'); import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; -import { WorkspaceService } from 'vs/workbench/services/workspace/node/workspace'; +import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configuration'; import URI from 'vs/base/common/uri'; import { FileService } from 'vs/workbench/services/files/node/fileService'; import { ConfigurationEditingService } from 'vs/workbench/services/configuration/node/configurationEditingService'; @@ -116,7 +116,7 @@ suite('ConfigurationEditingService', () => { const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); instantiationService.stub(IEnvironmentService, environmentService); const workspace = noWorkspace ? null : new Workspace(URI.file(workspaceDir)); - const workspaceService = new WorkspaceService(environmentService, workspace); + const workspaceService = new WorkspaceConfigurationService(environmentService, workspace); instantiationService.stub(IWorkspaceContextService, workspaceService); instantiationService.stub(IConfigurationService, workspaceService); instantiationService.stub(ILifecycleService, new TestLifecycleService()); @@ -150,7 +150,7 @@ suite('ConfigurationEditingService', () => { function clearServices(): void { if (instantiationService) { - const configuraitonService = instantiationService.get(IConfigurationService); + const configuraitonService = instantiationService.get(IConfigurationService); if (configuraitonService) { configuraitonService.dispose(); } From d9feff655e4947d3d5ae5692a59c8f7b9e44405d Mon Sep 17 00:00:00 2001 From: Yu <583181285@qq.com> Date: Tue, 13 Jun 2017 19:49:36 +0800 Subject: [PATCH 1768/2747] =?UTF-8?q?=F0=9F=92=9A=20fix=20tests=20for=20bl?= =?UTF-8?q?ock=20comment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/common/blockCommentCommand.test.ts | 34 +++++++++---------- .../test/common/lineCommentCommand.test.ts | 24 ++++++------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/vs/editor/contrib/comment/test/common/blockCommentCommand.test.ts b/src/vs/editor/contrib/comment/test/common/blockCommentCommand.test.ts index 8f8f2cae11807..1bd3597b7ac7d 100644 --- a/src/vs/editor/contrib/comment/test/common/blockCommentCommand.test.ts +++ b/src/vs/editor/contrib/comment/test/common/blockCommentCommand.test.ts @@ -28,13 +28,13 @@ suite('Editor Contrib - Block Comment Command', () => { ], new Selection(1, 3, 1, 3), [ - 'fi<00>rst', + 'fi<0 0>rst', '\tsecond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 5, 1, 5) + new Selection(1, 6, 1, 6) ); }); @@ -49,13 +49,13 @@ suite('Editor Contrib - Block Comment Command', () => { ], new Selection(2, 1, 1, 1), [ - '<0first', - '0>\tsecond line', + '<0 first', + ' 0>\tsecond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 3, 2, 1) + new Selection(1, 4, 2, 1) ); }); @@ -70,13 +70,13 @@ suite('Editor Contrib - Block Comment Command', () => { ], new Selection(1, 6, 1, 1), [ - '<0first0>', + '<0 first 0>', '\tsecond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 3, 1, 8) + new Selection(1, 4, 1, 9) ); testBlockCommentCommand( @@ -110,13 +110,13 @@ suite('Editor Contrib - Block Comment Command', () => { ], new Selection(1, 6, 1, 3), [ - 'fi<0rst0>', + 'fi<0 rst 0>', '\tsecond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 5, 1, 8) + new Selection(1, 6, 1, 9) ); }); @@ -131,13 +131,13 @@ suite('Editor Contrib - Block Comment Command', () => { ], new Selection(1, 6, 1, 3), [ - 'fi<0rst0>', + 'fi<0 rst 0>', '\tsecond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 5, 1, 8) + new Selection(1, 6, 1, 9) ); testBlockCommentCommand( @@ -171,13 +171,13 @@ suite('Editor Contrib - Block Comment Command', () => { ], new Selection(2, 4, 1, 1), [ - '<0first', - '\tse0>cond line', + '<0 first', + '\tse 0>cond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 3, 2, 4) + new Selection(1, 4, 2, 4) ); }); @@ -192,13 +192,13 @@ suite('Editor Contrib - Block Comment Command', () => { ], new Selection(2, 4, 1, 1), [ - '<0first', - '\tse0>cond line', + '<0 first', + '\tse 0>cond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 3, 2, 4) + new Selection(1, 4, 2, 4) ); testBlockCommentCommand( diff --git a/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts b/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts index 64d900f1dd7fb..098872864e5ab 100644 --- a/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts +++ b/src/vs/editor/contrib/comment/test/common/lineCommentCommand.test.ts @@ -544,13 +544,13 @@ suite('Editor Contrib - Line Comment As Block Comment', () => { ], new Selection(1, 1, 1, 1), [ - '(first)', + '( first )', '\tsecond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 2, 1, 2) + new Selection(1, 3, 1, 3) ); }); @@ -586,13 +586,13 @@ suite('Editor Contrib - Line Comment As Block Comment', () => { ], new Selection(1, 1, 1, 1), [ - '(first)', + '( first )', '\tsecond line', 'third line', 'fourth line', 'fifth' ], - new Selection(1, 2, 1, 2) + new Selection(1, 3, 1, 3) ); }); @@ -607,13 +607,13 @@ suite('Editor Contrib - Line Comment As Block Comment', () => { ], new Selection(3, 2, 1, 3), [ - '(first', + '( first', '\tsecond line', - 'third line)', + 'third line )', 'fourth line', 'fifth' ], - new Selection(1, 4, 3, 2) + new Selection(1, 5, 3, 2) ); testLineCommentCommand( @@ -655,7 +655,7 @@ suite('Editor Contrib - Line Comment As Block Comment 2', () => { ], new Selection(1, 1, 1, 1), [ - '\t\t', + '\t\t', '\t\tsecond line', '\tthird line', 'fourth line', @@ -809,8 +809,8 @@ suite('Editor Contrib - Line Comment As Block Comment 2', () => { ], new Selection(1, 1, 3, 1), [ - ' ', + ' ', '' ], new Selection(1, 1, 3, 1) @@ -927,13 +927,13 @@ suite('Editor Contrib - Line Comment in mixed modes', () => { [ 'import React from \'react\';', 'const Loader = () => (', - ' {/*
      */}', + ' {/*
      */}', ' Loading...', '
      ', ');', 'export default Loader;' ], - new Selection(3, 7, 3, 7), + new Selection(3, 8, 3, 8), ); }); From 91a0e04417cabaeda04bc20891d58ae338179f66 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 13 Jun 2017 14:25:03 +0200 Subject: [PATCH 1769/2747] Fix #28476 --- src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts b/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts index 30715762ea638..769d2e9326dce 100644 --- a/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts +++ b/src/vs/workbench/parts/views/browser/viewsExtensionPoint.ts @@ -41,7 +41,7 @@ namespace schema { return false; } if (typeof descriptor.name !== 'string') { - collector.error(localize('requirestring', "property `{0}` is mandatory and must be of type `string`", 'label')); + collector.error(localize('requirestring', "property `{0}` is mandatory and must be of type `string`", 'name')); return false; } if (descriptor.when && typeof descriptor.when !== 'string') { From 15564d7403e87b8688f0095c262a0d5c0a0d4267 Mon Sep 17 00:00:00 2001 From: Yu <583181285@qq.com> Date: Tue, 13 Jun 2017 20:29:26 +0800 Subject: [PATCH 1770/2747] =?UTF-8?q?=F0=9F=92=9A=20fix=20cursor=20pos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/vs/editor/contrib/comment/common/blockCommentCommand.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/comment/common/blockCommentCommand.ts b/src/vs/editor/contrib/comment/common/blockCommentCommand.ts index a8a8e54a1bb7c..d123d1f9d580d 100644 --- a/src/vs/editor/contrib/comment/common/blockCommentCommand.ts +++ b/src/vs/editor/contrib/comment/common/blockCommentCommand.ts @@ -145,7 +145,7 @@ export class BlockCommentCommand implements editorCommon.ICommand { ); } else { var srcRange = inverseEditOperations[0].range; - var deltaColumn = this._usedEndToken ? -this._usedEndToken.length : 0; + var deltaColumn = this._usedEndToken ? -this._usedEndToken.length - 1 : 0; // minus 1 space before endToken return new Selection( srcRange.endLineNumber, srcRange.endColumn + deltaColumn, From 3a192e94d8cfecf8e0d59ba8ad738d09c57f8725 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Tue, 13 Jun 2017 14:55:38 +0200 Subject: [PATCH 1771/2747] Taking the top most available stack frame for exception widget. Resolves #27903 --- .../electron-browser/debugEditorContribution.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts index 72c5ac93ee9cf..e33c15a909f9c 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts @@ -356,19 +356,25 @@ export class DebugEditorContribution implements IDebugEditorContribution { // Toggles exception widget based on the state of the current editor model and debug stack frame const model = this.editor.getModel(); const focusedSf = this.debugService.getViewModel().focusedStackFrame; - if (!model || !focusedSf || !focusedSf.source || !focusedSf.source.available) { + const callStack = focusedSf ? focusedSf.thread.getCallStack() : null; + if (!model || !focusedSf || !callStack || callStack.length === 0) { this.closeExceptionWidget(); return; } - const callStack = focusedSf.thread.getCallStack(); - if (!callStack || callStack.length === 0) { + // First call stack frame that is available is the frame where exception has been thrown + let exceptionSf; + for (let sf of callStack) { + if (sf.source && sf.source.available) { + exceptionSf = sf; + break; + } + } + if (!exceptionSf) { this.closeExceptionWidget(); return; } - // First call stack frame is the frame where exception has been thrown - const exceptionSf = callStack[0]; const sameUri = exceptionSf.source.uri.toString() === model.uri.toString(); if (this.exceptionWidget && !sameUri) { this.closeExceptionWidget(); From 09ad6343e1639774100c7b5c94bdc6fcfb393e53 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 13 Jun 2017 15:03:21 +0200 Subject: [PATCH 1772/2747] :lipstick: --- .../workbench/parts/views/browser/treeView.ts | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/parts/views/browser/treeView.ts b/src/vs/workbench/parts/views/browser/treeView.ts index fd5eb54fed129..b31b3f71a235f 100644 --- a/src/vs/workbench/parts/views/browser/treeView.ts +++ b/src/vs/workbench/parts/views/browser/treeView.ts @@ -132,21 +132,24 @@ export class TreeView extends CollapsibleView { } private setInput(): TPromise { - if (this.tree && !this.treeInputPromise) { - if (this.listenToDataProvider()) { - this.treeInputPromise = this.tree.setInput(new Root()); - return this.treeInputPromise; + if (this.tree) { + if (!this.treeInputPromise) { + if (this.listenToDataProvider()) { + this.treeInputPromise = this.tree.setInput(new Root()); + } else { + this.treeInputPromise = new TPromise((c, e) => { + this.dataProviderRegisteredListener = ViewsRegistry.onTreeViewDataProviderRegistered(id => { + if (this.id === id) { + if (this.listenToDataProvider()) { + this.tree.setInput(new Root()).then(() => c(null)); + this.dataProviderRegisteredListener.dispose(); + } + } + }); + }); + } } - this.treeInputPromise = new TPromise((c, e) => { - this.dataProviderRegisteredListener = ViewsRegistry.onTreeViewDataProviderRegistered(id => { - if (this.id === id) { - if (this.listenToDataProvider()) { - this.tree.setInput(new Root()).then(() => c(null)); - this.dataProviderRegisteredListener.dispose(); - } - } - }); - }); + return this.treeInputPromise; } return TPromise.as(null); } From 083fc590df8065d035682bf212eb907a2f683073 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Tue, 13 Jun 2017 15:28:26 +0200 Subject: [PATCH 1773/2747] refactor tfs darwin builds --- build/tfs/darwin/build.sh | 23 ++--------------------- build/tfs/darwin/release.sh | 26 ++++++++++++++++++++++++++ build/tfs/darwin/smoketest.sh | 27 +++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 21 deletions(-) create mode 100755 build/tfs/darwin/release.sh create mode 100755 build/tfs/darwin/smoketest.sh diff --git a/build/tfs/darwin/build.sh b/build/tfs/darwin/build.sh index 1f569cf74f25b..6397b310dca98 100755 --- a/build/tfs/darwin/build.sh +++ b/build/tfs/darwin/build.sh @@ -30,24 +30,5 @@ step "Run unit tests" \ step "Run integration tests" \ ./scripts/test-integration.sh -(cd $BUILD_SOURCESDIRECTORY/build/tfs/common && \ - step "Install build dependencies" \ - npm i) - -REPO=`pwd` -ZIP=$REPO/../VSCode-darwin-selfsigned.zip -UNSIGNEDZIP=$REPO/../VSCode-darwin-unsigned.zip -BUILD=$REPO/../VSCode-darwin -PACKAGEJSON=`ls $BUILD/*.app/Contents/Resources/app/package.json` -VERSION=`node -p "require(\"$PACKAGEJSON\").version"` - -rm -rf $UNSIGNEDZIP -(cd $BUILD && \ - step "Create unsigned archive" \ - zip -r -X -y $UNSIGNEDZIP *) - -step "Upload unsigned archive" \ - node build/tfs/common/publish.js --upload-only $VSCODE_QUALITY darwin archive-unsigned VSCode-darwin-$VSCODE_QUALITY-unsigned.zip $VERSION false $UNSIGNEDZIP - -step "Sign build" \ - node build/tfs/common/enqueue.js $VSCODE_QUALITY \ No newline at end of file +step "Publish release" \ + ./build/tfs/darwin/release.sh \ No newline at end of file diff --git a/build/tfs/darwin/release.sh b/build/tfs/darwin/release.sh new file mode 100755 index 0000000000000..24ed4c30a78b5 --- /dev/null +++ b/build/tfs/darwin/release.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +. ./scripts/env.sh +. ./build/tfs/common/common.sh + +(cd $BUILD_SOURCESDIRECTORY/build/tfs/common && \ + step "Install build dependencies" \ + npm i) + +REPO=`pwd` +ZIP=$REPO/../VSCode-darwin-selfsigned.zip +UNSIGNEDZIP=$REPO/../VSCode-darwin-unsigned.zip +BUILD=$REPO/../VSCode-darwin +PACKAGEJSON=`ls $BUILD/*.app/Contents/Resources/app/package.json` +VERSION=`node -p "require(\"$PACKAGEJSON\").version"` + +rm -rf $UNSIGNEDZIP +(cd $BUILD && \ + step "Create unsigned archive" \ + zip -r -X -y $UNSIGNEDZIP *) + +step "Upload unsigned archive" \ + node build/tfs/common/publish.js --upload-only $VSCODE_QUALITY darwin archive-unsigned VSCode-darwin-$VSCODE_QUALITY-unsigned.zip $VERSION false $UNSIGNEDZIP + +step "Sign build" \ + node build/tfs/common/enqueue.js $VSCODE_QUALITY \ No newline at end of file diff --git a/build/tfs/darwin/smoketest.sh b/build/tfs/darwin/smoketest.sh new file mode 100755 index 0000000000000..ae756d8ca3545 --- /dev/null +++ b/build/tfs/darwin/smoketest.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +. ./scripts/env.sh +. ./build/tfs/common/common.sh + +export VSCODE_MIXIN_PASSWORD="$1" +VSO_PAT="$2" + +echo "machine monacotools.visualstudio.com password $VSO_PAT" > ~/.netrc + +step "Install dependencies" \ + npm install + +step "Mix in repository from vscode-distro" \ + npm run gulp -- mixin + +step "Install distro dependencies" \ + node build/tfs/common/installDistro.js + +step "Build minified & upload source maps" \ + npm run gulp -- --max_old_space_size=4096 vscode-darwin-min + +step "Run unit tests" \ + ./scripts/test.sh --build --reporter dot + +step "Run integration tests" \ + ./scripts/test-integration.sh \ No newline at end of file From a401fee1823b0c701957f0a19bb1c9bc55da4f6b Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Tue, 13 Jun 2017 15:29:23 +0200 Subject: [PATCH 1774/2747] Fixes #28502: Channel closed error --- .../electron-browser/terminalInstance.ts | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index ab25e4dc0df0a..44a6c047dffec 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -533,6 +533,7 @@ export class TerminalInstance implements ITerminalInstance { } this._isExiting = true; + this._process = null; let exitCodeMessage: string; if (exitCode) { exitCodeMessage = nls.localize('terminal.integrated.exitedWithCode', 'The terminal process terminated with exit code: {0}', exitCode); @@ -765,11 +766,19 @@ export class TerminalInstance implements ITerminalInstance { } this._processReady.then(() => { if (this._process) { - this._process.send({ - event: 'resize', - cols: this._cols, - rows: this._rows - }); + // The child process could aready be terminated + try { + this._process.send({ + event: 'resize', + cols: this._cols, + rows: this._rows + }); + } catch (error) { + // We tried to write to a closed pipe / channel. + if (error.code !== 'EPIPE' && error.code !== 'ERR_IPC_CHANNEL_CLOSED') { + throw (error); + } + } } }); } From 44fc473b58da4944de714a3269c50a3444c6559a Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 13 Jun 2017 15:24:37 +0200 Subject: [PATCH 1775/2747] :lipstick: --- src/vs/workbench/parts/views/browser/treeView.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/views/browser/treeView.ts b/src/vs/workbench/parts/views/browser/treeView.ts index b31b3f71a235f..4f226a0a81a9c 100644 --- a/src/vs/workbench/parts/views/browser/treeView.ts +++ b/src/vs/workbench/parts/views/browser/treeView.ts @@ -76,6 +76,7 @@ export class TreeView extends CollapsibleView { DOM.addClass(this.treeContainer, 'tree-explorer-viewlet-tree-view'); this.tree = this.createViewer($(this.treeContainer)); + this.setInput(); } protected changeState(state: CollapsibleState): void { @@ -127,10 +128,6 @@ export class TreeView extends CollapsibleView { return super.setVisible(visible); } - public create(): TPromise { - return super.create().then(() => this.setInput()); - } - private setInput(): TPromise { if (this.tree) { if (!this.treeInputPromise) { From 337ded059ae5140b86caf07e67ce92a41a8e6581 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 13 Jun 2017 16:00:36 +0200 Subject: [PATCH 1776/2747] rename ITextModelResolverService to ITextModelService, #10547 --- src/vs/editor/browser/standalone/simpleServices.ts | 6 +++--- src/vs/editor/browser/standalone/standaloneEditor.ts | 6 +++--- src/vs/editor/common/services/bulkEdit.ts | 10 +++++----- src/vs/editor/common/services/resolverService.ts | 6 +++--- .../goToDeclaration/browser/goToDeclarationMouse.ts | 4 ++-- .../referenceSearch/browser/referencesController.ts | 4 ++-- .../contrib/referenceSearch/browser/referencesModel.ts | 4 ++-- .../referenceSearch/browser/referencesWidget.ts | 6 +++--- src/vs/editor/contrib/rename/browser/rename.ts | 4 ++-- .../api/electron-browser/mainThreadDocuments.ts | 6 +++--- .../api/electron-browser/mainThreadWorkspace.ts | 4 ++-- src/vs/workbench/common/editor/resourceEditorInput.ts | 4 ++-- src/vs/workbench/electron-browser/workbench.ts | 4 ++-- .../parts/debug/browser/debugContentProvider.ts | 4 ++-- .../workbench/parts/files/browser/saveErrorHandler.ts | 10 +++++----- .../parts/files/common/editors/fileEditorInput.ts | 6 +++--- .../workbench/parts/html/browser/html.contribution.ts | 4 ++-- src/vs/workbench/parts/html/browser/htmlPreviewPart.ts | 4 ++-- .../workbench/parts/output/browser/outputServices.ts | 6 +++--- .../parts/preferences/browser/preferencesEditor.ts | 4 ++-- .../parts/preferences/browser/preferencesService.ts | 6 +++--- .../preferences/common/preferencesContentProvider.ts | 6 +++--- .../parts/scm/electron-browser/dirtydiffDecorator.ts | 6 +++--- .../workbench/parts/search/browser/replaceService.ts | 8 ++++---- .../walkThrough/node/walkThroughContentProvider.ts | 8 ++++---- .../parts/welcome/walkThrough/node/walkThroughInput.ts | 4 ++-- .../configuration/node/configurationEditingService.ts | 6 +++--- .../test/node/configurationEditingService.test.ts | 6 +++--- .../services/keybinding/common/keybindingEditing.ts | 6 +++--- .../services/keybinding/test/keybindingEditing.test.ts | 6 +++--- .../common/textModelResolverService.ts | 6 +++--- .../test/textModelResolverService.test.ts | 6 +++--- .../test/common/editor/editorDiffModel.test.ts | 6 +++--- src/vs/workbench/test/workbenchTestServices.ts | 4 ++-- 34 files changed, 95 insertions(+), 95 deletions(-) diff --git a/src/vs/editor/browser/standalone/simpleServices.ts b/src/vs/editor/browser/standalone/simpleServices.ts index 3b01a330dbfaf..e380ac9bd3921 100644 --- a/src/vs/editor/browser/standalone/simpleServices.ts +++ b/src/vs/editor/browser/standalone/simpleServices.ts @@ -25,7 +25,7 @@ import Event, { Emitter } from 'vs/base/common/event'; import { getDefaultValues as getDefaultConfiguration } from 'vs/platform/configuration/common/model'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IProgressService, IProgressRunner } from 'vs/platform/progress/common/progress'; -import { ITextModelResolverService, ITextModelContentProvider, ITextEditorModel } from 'vs/editor/common/services/resolverService'; +import { ITextModelService, ITextModelContentProvider, ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { IDisposable, IReference, ImmortalReference, combinedDisposable } from 'vs/base/common/lifecycle'; import * as dom from 'vs/base/browser/dom'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; @@ -173,7 +173,7 @@ export class SimpleEditorService implements IEditorService { } } -export class SimpleEditorModelResolverService implements ITextModelResolverService { +export class SimpleEditorModelResolverService implements ITextModelService { public _serviceBrand: any; private editor: SimpleEditor; @@ -527,4 +527,4 @@ export class SimpleWorkspaceContextService implements IWorkspaceContextService { public toResource(workspaceRelativePath: string): URI { return this.workspace ? this.workspace.toResource(workspaceRelativePath) : null; } -} \ No newline at end of file +} diff --git a/src/vs/editor/browser/standalone/standaloneEditor.ts b/src/vs/editor/browser/standalone/standaloneEditor.ts index 776016912c41f..d5648359b2a22 100644 --- a/src/vs/editor/browser/standalone/standaloneEditor.ts +++ b/src/vs/editor/browser/standalone/standaloneEditor.ts @@ -29,7 +29,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { NULL_STATE, nullTokenize } from 'vs/editor/common/modes/nullMode'; import { IStandaloneThemeData, IStandaloneThemeService } from 'vs/editor/common/services/standaloneThemeService'; import { Token } from 'vs/editor/common/core/token'; @@ -55,9 +55,9 @@ function withAllStandaloneServices(domElement: H } let simpleEditorModelResolverService: SimpleEditorModelResolverService = null; - if (!services.has(ITextModelResolverService)) { + if (!services.has(ITextModelService)) { simpleEditorModelResolverService = new SimpleEditorModelResolverService(); - services.set(ITextModelResolverService, simpleEditorModelResolverService); + services.set(ITextModelService, simpleEditorModelResolverService); } if (!services.has(IOpenerService)) { diff --git a/src/vs/editor/common/services/bulkEdit.ts b/src/vs/editor/common/services/bulkEdit.ts index e847eafc91147..9916d05ad03b0 100644 --- a/src/vs/editor/common/services/bulkEdit.ts +++ b/src/vs/editor/common/services/bulkEdit.ts @@ -10,7 +10,7 @@ import { IStringDictionary, forEach, values, groupBy, size } from 'vs/base/commo import { IDisposable, dispose, IReference } from 'vs/base/common/lifecycle'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; -import { ITextModelResolverService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; +import { ITextModelService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { IFileService, IFileChange } from 'vs/platform/files/common/files'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Range, IRange } from 'vs/editor/common/core/range'; @@ -183,7 +183,7 @@ class SourceModelEditTask extends EditTask { class BulkEditModel implements IDisposable { - private _textModelResolverService: ITextModelResolverService; + private _textModelResolverService: ITextModelService; private _numberOfResourcesToModify: number = 0; private _numberOfChanges: number = 0; private _edits: IStringDictionary = Object.create(null); @@ -192,7 +192,7 @@ class BulkEditModel implements IDisposable { private _sourceSelections: Selection[]; private _sourceModelTask: SourceModelEditTask; - constructor(textModelResolverService: ITextModelResolverService, sourceModel: URI, sourceSelections: Selection[], edits: IResourceEdit[], private progress: IProgressRunner = null) { + constructor(textModelResolverService: ITextModelService, sourceModel: URI, sourceSelections: Selection[], edits: IResourceEdit[], private progress: IProgressRunner = null) { this._textModelResolverService = textModelResolverService; this._sourceModel = sourceModel; this._sourceSelections = sourceSelections; @@ -293,14 +293,14 @@ export interface BulkEdit { ariaMessage(): string; } -export function bulkEdit(textModelResolverService: ITextModelResolverService, editor: ICommonCodeEditor, edits: IResourceEdit[], fileService?: IFileService, progress: IProgressRunner = null): TPromise { +export function bulkEdit(textModelResolverService: ITextModelService, editor: ICommonCodeEditor, edits: IResourceEdit[], fileService?: IFileService, progress: IProgressRunner = null): TPromise { let bulk = createBulkEdit(textModelResolverService, editor, fileService); bulk.add(edits); bulk.progress(progress); return bulk.finish(); } -export function createBulkEdit(textModelResolverService: ITextModelResolverService, editor?: ICommonCodeEditor, fileService?: IFileService): BulkEdit { +export function createBulkEdit(textModelResolverService: ITextModelService, editor?: ICommonCodeEditor, fileService?: IFileService): BulkEdit { let all: IResourceEdit[] = []; let recording = new ChangeRecorder(fileService).start(); diff --git a/src/vs/editor/common/services/resolverService.ts b/src/vs/editor/common/services/resolverService.ts index aacd94b9622b4..f476280d339c5 100644 --- a/src/vs/editor/common/services/resolverService.ts +++ b/src/vs/editor/common/services/resolverService.ts @@ -11,9 +11,9 @@ import { IModel } from 'vs/editor/common/editorCommon'; import { IEditorModel } from 'vs/platform/editor/common/editor'; import { IDisposable, IReference } from 'vs/base/common/lifecycle'; -export const ITextModelResolverService = createDecorator('textModelResolverService'); +export const ITextModelService = createDecorator('textModelService'); -export interface ITextModelResolverService { +export interface ITextModelService { _serviceBrand: any; /** @@ -42,4 +42,4 @@ export interface ITextEditorModel extends IEditorModel { * Provides access to the underlying IModel. */ textEditorModel: IModel; -} \ No newline at end of file +} diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts index 124e4229c3dfb..6a8718e202b4c 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.ts @@ -19,7 +19,7 @@ import { ICodeEditor, IMouseTarget, MouseTargetType } from 'vs/editor/browser/ed import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { getDefinitionsAtPosition } from './goToDeclaration'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; import { EditorState, CodeEditorStateFlag } from 'vs/editor/common/core/editorState'; @@ -40,7 +40,7 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC constructor( editor: ICodeEditor, - @ITextModelResolverService private textModelResolverService: ITextModelResolverService, + @ITextModelService private textModelResolverService: ITextModelService, @IModeService private modeService: IModeService ) { this.toUnhook = []; diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts index c92079e556685..abc2506e57548 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesController.ts @@ -25,7 +25,7 @@ import { IPeekViewService } from 'vs/editor/contrib/zoneWidget/browser/peekViewW import { ReferencesModel, OneReference } from './referencesModel'; import { ReferenceWidget, LayoutData } from './referencesWidget'; import { Range } from 'vs/editor/common/core/range'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Position } from 'vs/editor/common/core/position'; import { IEnvironmentService } from "vs/platform/environment/common/environment"; @@ -59,7 +59,7 @@ export class ReferencesController implements editorCommon.IEditorContribution { editor: ICodeEditor, @IContextKeyService contextKeyService: IContextKeyService, @IEditorService private _editorService: IEditorService, - @ITextModelResolverService private _textModelResolverService: ITextModelResolverService, + @ITextModelService private _textModelResolverService: ITextModelService, @ITelemetryService private _telemetryService: ITelemetryService, @IMessageService private _messageService: IMessageService, @IInstantiationService private _instantiationService: IInstantiationService, diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesModel.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesModel.ts index b0660173eb5c6..4ddacbe921633 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesModel.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesModel.ts @@ -15,7 +15,7 @@ import { defaultGenerator } from 'vs/base/common/idGenerator'; import { TPromise } from 'vs/base/common/winjs.base'; import { Range, IRange } from 'vs/editor/common/core/range'; import { Location } from 'vs/editor/common/modes'; -import { ITextModelResolverService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; +import { ITextModelService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { Position } from 'vs/editor/common/core/position'; export class OneReference { @@ -160,7 +160,7 @@ export class FileReferences implements IDisposable { } } - public resolve(textModelResolverService: ITextModelResolverService): TPromise { + public resolve(textModelResolverService: ITextModelService): TPromise { if (this._resolved) { return TPromise.as(this); diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index d40a682c8f88d..7ad1761a1b98e 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -36,7 +36,7 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { EmbeddedCodeEditorWidget } from 'vs/editor/browser/widget/embeddedCodeEditorWidget'; import { PeekViewWidget, IPeekViewService } from 'vs/editor/contrib/zoneWidget/browser/peekViewWidget'; import { FileReferences, OneReference, ReferencesModel } from './referencesModel'; -import { ITextModelResolverService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; +import { ITextModelService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { registerColor, activeContrastBorder, contrastBorder } from 'vs/platform/theme/common/colorRegistry'; import { registerThemingParticipant, ITheme, IThemeService } from 'vs/platform/theme/common/themeService'; import { attachListStyler, attachBadgeStyler } from 'vs/platform/theme/common/styler'; @@ -166,7 +166,7 @@ class DecorationsManager implements IDisposable { class DataSource implements tree.IDataSource { constructor( - @ITextModelResolverService private _textModelResolverService: ITextModelResolverService + @ITextModelService private _textModelResolverService: ITextModelService ) { // } @@ -583,7 +583,7 @@ export class ReferenceWidget extends PeekViewWidget { constructor( editor: ICodeEditor, public layoutData: LayoutData, - private _textModelResolverService: ITextModelResolverService, + private _textModelResolverService: ITextModelService, private _contextService: IWorkspaceContextService, private _themeService: IThemeService, private _instantiationService: IInstantiationService, diff --git a/src/vs/editor/contrib/rename/browser/rename.ts b/src/vs/editor/contrib/rename/browser/rename.ts index 70fc125ffa5bc..92284675cbeb0 100644 --- a/src/vs/editor/contrib/rename/browser/rename.ts +++ b/src/vs/editor/contrib/rename/browser/rename.ts @@ -21,7 +21,7 @@ import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { BulkEdit, createBulkEdit } from 'vs/editor/common/services/bulkEdit'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import RenameInputField from './renameInputField'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { optional } from 'vs/platform/instantiation/common/instantiation'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { sequence, asWinJsPromise } from 'vs/base/common/async'; @@ -99,7 +99,7 @@ class RenameController implements IEditorContribution { constructor( private editor: ICodeEditor, @IMessageService private _messageService: IMessageService, - @ITextModelResolverService private _textModelResolverService: ITextModelResolverService, + @ITextModelService private _textModelResolverService: ITextModelService, @IProgressService private _progressService: IProgressService, @IContextKeyService contextKeyService: IContextKeyService, @IThemeService themeService: IThemeService, diff --git a/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts b/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts index 0734061ff1723..83476253ea540 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDocuments.ts @@ -16,7 +16,7 @@ import { IModeService } from 'vs/editor/common/services/modeService'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ExtHostContext, MainThreadDocumentsShape, ExtHostDocumentsShape } from '../node/extHost.protocol'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { ITextSource } from 'vs/editor/common/model/textSource'; import { MainThreadDocumentsAndEditors } from './mainThreadDocumentsAndEditors'; @@ -71,7 +71,7 @@ export class MainThreadDocuments extends MainThreadDocumentsShape { private _modelService: IModelService; private _modeService: IModeService; - private _textModelResolverService: ITextModelResolverService; + private _textModelResolverService: ITextModelService; private _textFileService: ITextFileService; private _codeEditorService: ICodeEditorService; private _fileService: IFileService; @@ -93,7 +93,7 @@ export class MainThreadDocuments extends MainThreadDocumentsShape { @ITextFileService textFileService: ITextFileService, @ICodeEditorService codeEditorService: ICodeEditorService, @IFileService fileService: IFileService, - @ITextModelResolverService textModelResolverService: ITextModelResolverService, + @ITextModelService textModelResolverService: ITextModelService, @IUntitledEditorService untitledEditorService: IUntitledEditorService, @IEditorGroupService editorGroupService: IEditorGroupService ) { diff --git a/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts index 8cd8b7c62e1a3..f7cd4fb7e91cd 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts @@ -14,7 +14,7 @@ import { ICommonCodeEditor, isCommonCodeEditor } from 'vs/editor/common/editorCo import { bulkEdit, IResourceEdit } from 'vs/editor/common/services/bulkEdit'; import { TPromise } from 'vs/base/common/winjs.base'; import { MainThreadWorkspaceShape, ExtHostWorkspaceShape, ExtHostContext } from '../node/extHost.protocol'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { IFileService } from 'vs/platform/files/common/files'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { IDisposable } from 'vs/base/common/lifecycle'; @@ -31,7 +31,7 @@ export class MainThreadWorkspace extends MainThreadWorkspaceShape { @IWorkspaceContextService private readonly _contextService: IWorkspaceContextService, @ITextFileService private readonly _textFileService: ITextFileService, @IWorkbenchEditorService private readonly _editorService: IWorkbenchEditorService, - @ITextModelResolverService private readonly _textModelResolverService: ITextModelResolverService, + @ITextModelService private readonly _textModelResolverService: ITextModelService, @IFileService private readonly _fileService: IFileService, @IThreadService threadService: IThreadService ) { diff --git a/src/vs/workbench/common/editor/resourceEditorInput.ts b/src/vs/workbench/common/editor/resourceEditorInput.ts index b99b12ecd05e9..0f41e0edc5c77 100644 --- a/src/vs/workbench/common/editor/resourceEditorInput.ts +++ b/src/vs/workbench/common/editor/resourceEditorInput.ts @@ -9,7 +9,7 @@ import { EditorInput, ITextEditorModel } from 'vs/workbench/common/editor'; import URI from 'vs/base/common/uri'; import { IReference } from 'vs/base/common/lifecycle'; import { telemetryURIDescriptor } from 'vs/platform/telemetry/common/telemetryUtils'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { ResourceEditorModel } from 'vs/workbench/common/editor/resourceEditorModel'; /** @@ -29,7 +29,7 @@ export class ResourceEditorInput extends EditorInput { name: string, description: string, resource: URI, - @ITextModelResolverService private textModelResolverService: ITextModelResolverService + @ITextModelService private textModelResolverService: ITextModelService ) { super(); diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index a8afe425a0396..3256b4b5152fa 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -80,7 +80,7 @@ import { SCMService } from 'vs/workbench/services/scm/common/scmService'; import { IProgressService2 } from 'vs/platform/progress/common/progress'; import { ProgressService2 } from 'vs/workbench/services/progress/browser/progressService2'; import { TextModelResolverService } from 'vs/workbench/services/textmodelResolver/common/textModelResolverService'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; import { ILifecycleService, ShutdownReason } from 'vs/platform/lifecycle/common/lifecycle'; import { IWindowService, IWindowConfiguration as IWindowSettings, IWindowConfiguration } from 'vs/platform/windows/common/windows'; @@ -534,7 +534,7 @@ export class Workbench implements IPartService { serviceCollection.set(ISCMService, new SyncDescriptor(SCMService)); // Text Model Resolver Service - serviceCollection.set(ITextModelResolverService, new SyncDescriptor(TextModelResolverService)); + serviceCollection.set(ITextModelService, new SyncDescriptor(TextModelResolverService)); // Configuration Editing this.configurationEditingService = this.instantiationService.createInstance(ConfigurationEditingService); diff --git a/src/vs/workbench/parts/debug/browser/debugContentProvider.ts b/src/vs/workbench/parts/debug/browser/debugContentProvider.ts index 0ad6436765e0a..7bb2d9ee15b04 100644 --- a/src/vs/workbench/parts/debug/browser/debugContentProvider.ts +++ b/src/vs/workbench/parts/debug/browser/debugContentProvider.ts @@ -10,14 +10,14 @@ import { guessMimeTypes, MIME_TEXT } from 'vs/base/common/mime'; import { IModel } from 'vs/editor/common/editorCommon'; import { IModelService } from 'vs/editor/common/services/modelService'; import { IModeService } from 'vs/editor/common/services/modeService'; -import { ITextModelResolverService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; +import { ITextModelService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { DEBUG_SCHEME, IDebugService } from 'vs/workbench/parts/debug/common/debug'; export class DebugContentProvider implements IWorkbenchContribution, ITextModelContentProvider { constructor( - @ITextModelResolverService textModelResolverService: ITextModelResolverService, + @ITextModelService textModelResolverService: ITextModelService, @IDebugService private debugService: IDebugService, @IModelService private modelService: IModelService, @IModeService private modeService: IModeService diff --git a/src/vs/workbench/parts/files/browser/saveErrorHandler.ts b/src/vs/workbench/parts/files/browser/saveErrorHandler.ts index dca5ccb26c186..a4e45da21d89d 100644 --- a/src/vs/workbench/parts/files/browser/saveErrorHandler.ts +++ b/src/vs/workbench/parts/files/browser/saveErrorHandler.ts @@ -23,7 +23,7 @@ import { IModelService } from 'vs/editor/common/services/modelService'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { TextFileEditorModel } from 'vs/workbench/services/textfile/common/textFileEditorModel'; -import { ITextModelResolverService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; +import { ITextModelService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; import { IModel } from 'vs/editor/common/editorCommon'; import { ResourceMap } from 'vs/base/common/map'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; @@ -43,7 +43,7 @@ export class SaveErrorHandler implements ISaveErrorHandler, IWorkbenchContributi constructor( @IMessageService private messageService: IMessageService, @ITextFileService private textFileService: ITextFileService, - @ITextModelResolverService private textModelResolverService: ITextModelResolverService, + @ITextModelService private textModelResolverService: ITextModelService, @IModelService private modelService: IModelService, @IModeService private modeService: IModeService, @IInstantiationService private instantiationService: IInstantiationService, @@ -240,7 +240,7 @@ class ResolveSaveConflictMessage implements IMessageWithAction { export const acceptLocalChangesCommand = (accessor: ServicesAccessor, resource: URI) => { const editorService = accessor.get(IWorkbenchEditorService); - const resolverService = accessor.get(ITextModelResolverService); + const resolverService = accessor.get(ITextModelService); const editor = editorService.getActiveEditor(); const input = editor.input; @@ -275,7 +275,7 @@ export const acceptLocalChangesCommand = (accessor: ServicesAccessor, resource: export const revertLocalChangesCommand = (accessor: ServicesAccessor, resource: URI) => { const editorService = accessor.get(IWorkbenchEditorService); - const resolverService = accessor.get(ITextModelResolverService); + const resolverService = accessor.get(ITextModelService); const editor = editorService.getActiveEditor(); const input = editor.input; @@ -298,4 +298,4 @@ export const revertLocalChangesCommand = (accessor: ServicesAccessor, resource: }); }); }); -}; \ No newline at end of file +}; diff --git a/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts b/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts index d2b5a8b9235b0..2de842849508a 100644 --- a/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts +++ b/src/vs/workbench/parts/files/common/editors/fileEditorInput.ts @@ -21,7 +21,7 @@ import { IDisposable, dispose, IReference } from 'vs/base/common/lifecycle'; import { telemetryURIDescriptor } from 'vs/platform/telemetry/common/telemetryUtils'; import { Verbosity } from 'vs/platform/editor/common/editor'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; /** * A file editor input is the input type for the file editor of file system resources. @@ -50,7 +50,7 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput { @IWorkspaceContextService private contextService: IWorkspaceContextService, @ITextFileService private textFileService: ITextFileService, @IEnvironmentService private environmentService: IEnvironmentService, - @ITextModelResolverService private textModelResolverService: ITextModelResolverService + @ITextModelService private textModelResolverService: ITextModelService ) { super(); @@ -267,4 +267,4 @@ export class FileEditorInput extends EditorInput implements IFileEditorInput { return false; } -} \ No newline at end of file +} diff --git a/src/vs/workbench/parts/html/browser/html.contribution.ts b/src/vs/workbench/parts/html/browser/html.contribution.ts index 70120e9682b38..f41e225ce17d8 100644 --- a/src/vs/workbench/parts/html/browser/html.contribution.ts +++ b/src/vs/workbench/parts/html/browser/html.contribution.ts @@ -19,7 +19,7 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { isCommonCodeEditor, ICommonCodeEditor } from 'vs/editor/common/editorCommon'; import { HtmlZoneController } from './htmlEditorZone'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; // --- Register Editor (Registry.as(EditorExtensions.Editors)).registerEditor(new EditorDescriptor(HtmlPreviewPart.ID, @@ -60,7 +60,7 @@ CommandsRegistry.registerCommand('_workbench.htmlZone', function (accessor: Serv return undefined; } - const textModelResolverService = accessor.get(ITextModelResolverService); + const textModelResolverService = accessor.get(ITextModelService); return textModelResolverService.createModelReference(params.resource).then(ref => { const model = ref.object; diff --git a/src/vs/workbench/parts/html/browser/htmlPreviewPart.ts b/src/vs/workbench/parts/html/browser/htmlPreviewPart.ts index 038c8c4cd991f..43775d62aba45 100644 --- a/src/vs/workbench/parts/html/browser/htmlPreviewPart.ts +++ b/src/vs/workbench/parts/html/browser/htmlPreviewPart.ts @@ -19,7 +19,7 @@ import { BaseTextEditorModel } from 'vs/workbench/common/editor/textEditorModel' import { HtmlInput } from 'vs/workbench/parts/html/common/htmlInput'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IOpenerService } from 'vs/platform/opener/common/opener'; -import { ITextModelResolverService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; +import { ITextModelService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { Parts, IPartService } from 'vs/workbench/services/part/common/partService'; import Webview from './webview'; @@ -48,7 +48,7 @@ export class HtmlPreviewPart extends WebviewEditor { constructor( @ITelemetryService telemetryService: ITelemetryService, - @ITextModelResolverService private textModelResolverService: ITextModelResolverService, + @ITextModelService private textModelResolverService: ITextModelService, @IThemeService themeService: IThemeService, @IOpenerService private openerService: IOpenerService, @IWorkspaceContextService contextService: IWorkspaceContextService, diff --git a/src/vs/workbench/parts/output/browser/outputServices.ts b/src/vs/workbench/parts/output/browser/outputServices.ts index bd5efe6484c15..11a347463090c 100644 --- a/src/vs/workbench/parts/output/browser/outputServices.ts +++ b/src/vs/workbench/parts/output/browser/outputServices.ts @@ -20,7 +20,7 @@ import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IModelService } from 'vs/editor/common/services/modelService'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { OutputLinkProvider } from 'vs/workbench/parts/output/common/outputLinkProvider'; -import { ITextModelResolverService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; +import { ITextModelService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; import { IModel } from 'vs/editor/common/editorCommon'; import { IModeService } from 'vs/editor/common/services/modeService'; import { RunOnceScheduler } from 'vs/base/common/async'; @@ -101,7 +101,7 @@ export class OutputService implements IOutputService { @IPanelService private panelService: IPanelService, @IWorkspaceContextService contextService: IWorkspaceContextService, @IModelService modelService: IModelService, - @ITextModelResolverService textModelResolverService: ITextModelResolverService + @ITextModelService textModelResolverService: ITextModelService ) { this._onOutput = new Emitter(); this._onOutputChannel = new Emitter(); @@ -380,4 +380,4 @@ class OutputContentProvider implements ITextModelContentProvider { public dispose(): void { this.toDispose = dispose(this.toDispose); } -} \ No newline at end of file +} diff --git a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts index ca535cf3de0b0..1b47bac1970bf 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts @@ -38,7 +38,7 @@ import { IModeService } from 'vs/editor/common/services/modeService'; import { IStorageService } from 'vs/platform/storage/common/storage'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { VSash } from 'vs/base/browser/ui/sash/sash'; @@ -71,7 +71,7 @@ export class PreferencesEditorInput extends SideBySideEditorInput { export class DefaultPreferencesEditorInput extends ResourceEditorInput { public static ID = 'workbench.editorinputs.defaultpreferences'; constructor(defaultSettingsResource: URI, - @ITextModelResolverService textModelResolverService: ITextModelResolverService + @ITextModelService textModelResolverService: ITextModelService ) { super(nls.localize('settingsEditorName', "Default Settings"), '', defaultSettingsResource, textModelResolverService); } diff --git a/src/vs/workbench/parts/preferences/browser/preferencesService.ts b/src/vs/workbench/parts/preferences/browser/preferencesService.ts index 3cd438f300f03..05b44bc620dbb 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesService.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesService.ts @@ -31,7 +31,7 @@ import { SettingsEditorModel, DefaultSettingsEditorModel, DefaultKeybindingsEdit import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { DefaultPreferencesEditorInput, PreferencesEditorInput } from 'vs/workbench/parts/preferences/browser/preferencesEditor'; import { KeybindingsEditorInput } from 'vs/workbench/parts/preferences/browser/keybindingsEditor'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { getCodeEditor } from 'vs/editor/common/services/codeEditorService'; import { EditOperation } from 'vs/editor/common/core/editOperation'; import { Position, IPosition } from 'vs/editor/common/core/position'; @@ -67,7 +67,7 @@ export class PreferencesService extends Disposable implements IPreferencesServic @IStorageService private storageService: IStorageService, @IEnvironmentService private environmentService: IEnvironmentService, @ITelemetryService private telemetryService: ITelemetryService, - @ITextModelResolverService private textModelResolverService: ITextModelResolverService, + @ITextModelService private textModelResolverService: ITextModelService, @IConfigurationEditingService private configurationEditingService: IConfigurationEditingService, @IExtensionService private extensionService: IExtensionService, @IKeybindingService keybindingService: IKeybindingService, @@ -347,4 +347,4 @@ export class PreferencesService extends Disposable implements IPreferencesServic this.defaultPreferencesEditorModels.clear(); super.dispose(); } -} \ No newline at end of file +} diff --git a/src/vs/workbench/parts/preferences/common/preferencesContentProvider.ts b/src/vs/workbench/parts/preferences/common/preferencesContentProvider.ts index a9c27604d3351..53b0b7d239bd8 100644 --- a/src/vs/workbench/parts/preferences/common/preferencesContentProvider.ts +++ b/src/vs/workbench/parts/preferences/common/preferencesContentProvider.ts @@ -12,7 +12,7 @@ import { IModel } from 'vs/editor/common/editorCommon'; import JSONContributionRegistry = require('vs/platform/jsonschemas/common/jsonContributionRegistry'); import { Registry } from 'vs/platform/platform'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { IPreferencesService } from 'vs/workbench/parts/preferences/common/preferences'; const schemaRegistry = Registry.as(JSONContributionRegistry.Extensions.JSONContribution); @@ -21,7 +21,7 @@ export class PreferencesContentProvider implements IWorkbenchContribution { constructor( @IModelService private modelService: IModelService, - @ITextModelResolverService private textModelResolverService: ITextModelResolverService, + @ITextModelService private textModelResolverService: ITextModelService, @IPreferencesService private preferencesService: IPreferencesService, @IModeService private modeService: IModeService ) { @@ -60,4 +60,4 @@ export class PreferencesContentProvider implements IWorkbenchContribution { } }); } -} \ No newline at end of file +} diff --git a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts index 8561d451305f7..32b3d1689d286 100644 --- a/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts +++ b/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts @@ -15,7 +15,7 @@ import * as widget from 'vs/editor/browser/codeEditor'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IMessageService } from 'vs/platform/message/common/message'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IModelService } from 'vs/editor/common/services/modelService'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; @@ -74,7 +74,7 @@ class DirtyDiffModelDecorator { @IEditorWorkerService private editorWorkerService: IEditorWorkerService, @IWorkbenchEditorService private editorService: IWorkbenchEditorService, @IWorkspaceContextService private contextService: IWorkspaceContextService, - @ITextModelResolverService private textModelResolverService: ITextModelResolverService + @ITextModelService private textModelResolverService: ITextModelService ) { this.decorations = []; this.diffDelayer = new ThrottledDelayer(200); @@ -310,4 +310,4 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => { } `); } -}); \ No newline at end of file +}); diff --git a/src/vs/workbench/parts/search/browser/replaceService.ts b/src/vs/workbench/parts/search/browser/replaceService.ts index 4fb0b6372c3f2..f94c704efdfa4 100644 --- a/src/vs/workbench/parts/search/browser/replaceService.ts +++ b/src/vs/workbench/parts/search/browser/replaceService.ts @@ -19,7 +19,7 @@ import { BulkEdit, IResourceEdit, createBulkEdit } from 'vs/editor/common/servic import { IProgressRunner } from 'vs/platform/progress/common/progress'; import { IDiffEditor } from 'vs/editor/browser/editorBrowser'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { ITextModelResolverService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; +import { ITextModelService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; import { IWorkbenchContribution } from 'vs/workbench/common/contributions'; import { IModel } from 'vs/editor/common/editorCommon'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; @@ -39,7 +39,7 @@ export class ReplacePreviewContentProvider implements ITextModelContentProvider, constructor( @IInstantiationService private instantiationService: IInstantiationService, - @ITextModelResolverService private textModelResolverService: ITextModelResolverService + @ITextModelService private textModelResolverService: ITextModelService ) { this.textModelResolverService.registerTextModelContentProvider(network.Schemas.internal, this); } @@ -60,7 +60,7 @@ class ReplacePreviewModel extends Disposable { constructor( @IModelService private modelService: IModelService, @IModeService private modeService: IModeService, - @ITextModelResolverService private textModelResolverService: ITextModelResolverService, + @ITextModelService private textModelResolverService: ITextModelService, @IReplaceService private replaceService: IReplaceService, @ISearchWorkbenchService private searchWorkbenchService: ISearchWorkbenchService ) { @@ -100,7 +100,7 @@ export class ReplaceService implements IReplaceService { @IFileService private fileService: IFileService, @IEditorService private editorService: IWorkbenchEditorService, @IInstantiationService private instantiationService: IInstantiationService, - @ITextModelResolverService private textModelResolverService: ITextModelResolverService, + @ITextModelService private textModelResolverService: ITextModelService, @ISearchWorkbenchService private searchWorkbenchService: ISearchWorkbenchService ) { } diff --git a/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughContentProvider.ts b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughContentProvider.ts index 426918e274c89..2fff2ba3f7160 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughContentProvider.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughContentProvider.ts @@ -7,7 +7,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import URI from 'vs/base/common/uri'; -import { ITextModelResolverService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; +import { ITextModelService, ITextModelContentProvider } from 'vs/editor/common/services/resolverService'; import { IModelService } from 'vs/editor/common/services/modelService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IModel } from 'vs/editor/common/editorCommon'; @@ -20,7 +20,7 @@ import { IRawTextSource } from 'vs/editor/common/model/textSource'; export class WalkThroughContentProvider implements ITextModelContentProvider, IWorkbenchContribution { constructor( - @ITextModelResolverService private textModelResolverService: ITextModelResolverService, + @ITextModelService private textModelResolverService: ITextModelService, @ITextFileService private textFileService: ITextFileService, @IModeService private modeService: IModeService, @IModelService private modelService: IModelService, @@ -59,7 +59,7 @@ export class WalkThroughContentProvider implements ITextModelContentProvider, IW export class WalkThroughSnippetContentProvider implements ITextModelContentProvider, IWorkbenchContribution { constructor( - @ITextModelResolverService private textModelResolverService: ITextModelResolverService, + @ITextModelService private textModelResolverService: ITextModelService, @ITextFileService private textFileService: ITextFileService, @IModeService private modeService: IModeService, @IModelService private modelService: IModelService, @@ -102,4 +102,4 @@ export class WalkThroughSnippetContentProvider implements ITextModelContentProvi public getId(): string { return 'vs.walkThroughSnippetContentProvider'; } -} \ No newline at end of file +} diff --git a/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts index 9a86c171ae6ac..889fdc162ed07 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/node/walkThroughInput.ts @@ -10,7 +10,7 @@ import { EditorInput, EditorModel, ITextEditorModel } from 'vs/workbench/common/ import URI from 'vs/base/common/uri'; import { IReference, IDisposable, dispose } from 'vs/base/common/lifecycle'; import { telemetryURIDescriptor } from 'vs/platform/telemetry/common/telemetryUtils'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { marked } from 'vs/base/common/marked/marked'; import { Schemas } from 'vs/base/common/network'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; @@ -60,7 +60,7 @@ export class WalkThroughInput extends EditorInput { public readonly onReady: (container: HTMLElement) => void, @ITelemetryService private telemetryService: ITelemetryService, @ILifecycleService lifecycleService: ILifecycleService, - @ITextModelResolverService private textModelResolverService: ITextModelResolverService + @ITextModelService private textModelResolverService: ITextModelService ) { super(); this.disposables.push(lifecycleService.onShutdown(e => this.disposeTelemetry(e))); diff --git a/src/vs/workbench/services/configuration/node/configurationEditingService.ts b/src/vs/workbench/services/configuration/node/configurationEditingService.ts index a2ace0b1b2cf6..7d8534f874763 100644 --- a/src/vs/workbench/services/configuration/node/configurationEditingService.ts +++ b/src/vs/workbench/services/configuration/node/configurationEditingService.ts @@ -27,7 +27,7 @@ import { keyFromOverrideIdentifier } from 'vs/platform/configuration/common/mode import { WORKSPACE_CONFIG_DEFAULT_PATH, WORKSPACE_STANDALONE_CONFIGURATIONS } from 'vs/workbench/services/configuration/common/configuration'; import { IFileService } from 'vs/platform/files/common/files'; import { IConfigurationEditingService, ConfigurationEditingErrorCode, IConfigurationEditingError, ConfigurationTarget, IConfigurationValue, IConfigurationEditingOptions } from 'vs/workbench/services/configuration/common/configurationEditing'; -import { ITextModelResolverService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; +import { ITextModelService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { OVERRIDE_PROPERTY_PATTERN } from 'vs/platform/configuration/common/configurationRegistry'; import { IChoiceService, IMessageService, Severity } from 'vs/platform/message/common/message'; import { ICommandService } from 'vs/platform/commands/common/commands'; @@ -57,7 +57,7 @@ export class ConfigurationEditingService implements IConfigurationEditingService @IWorkspaceContextService private contextService: IWorkspaceContextService, @IEnvironmentService private environmentService: IEnvironmentService, @IFileService private fileService: IFileService, - @ITextModelResolverService private textModelResolverService: ITextModelResolverService, + @ITextModelService private textModelResolverService: ITextModelService, @ITextFileService private textFileService: ITextFileService, @IChoiceService private choiceService: IChoiceService, @IMessageService private messageService: IMessageService, @@ -285,4 +285,4 @@ export class ConfigurationEditingService implements IConfigurationEditingService return { key: config.key, value: config.value, overrideIdentifier: config.overrideIdentifier, resource: this.contextService.toResource(WORKSPACE_CONFIG_DEFAULT_PATH) }; } -} \ No newline at end of file +} diff --git a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts index dfba23f324a7f..9ce0d3b7fd540 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts @@ -37,7 +37,7 @@ import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { TextModelResolverService } from 'vs/workbench/services/textmodelResolver/common/textModelResolverService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl'; @@ -128,7 +128,7 @@ suite('ConfigurationEditingService', () => { instantiationService.stub(IUntitledEditorService, instantiationService.createInstance(UntitledEditorService)); instantiationService.stub(ITextFileService, instantiationService.createInstance(TestTextFileService)); - instantiationService.stub(ITextModelResolverService, instantiationService.createInstance(TextModelResolverService)); + instantiationService.stub(ITextModelService, instantiationService.createInstance(TextModelResolverService)); instantiationService.stub(IBackupFileService, new TestBackupFileService()); choiceService = instantiationService.stub(IChoiceService, { choose: (severity, message, options, cancelId): TPromise => { @@ -311,4 +311,4 @@ suite('ConfigurationEditingService', () => { assert.equal(parsed['tasks'][0]['taskName'], 'myTask'); }); }); -}); \ No newline at end of file +}); diff --git a/src/vs/workbench/services/keybinding/common/keybindingEditing.ts b/src/vs/workbench/services/keybinding/common/keybindingEditing.ts index 6e0ad503e6bc0..abfa76b0210d7 100644 --- a/src/vs/workbench/services/keybinding/common/keybindingEditing.ts +++ b/src/vs/workbench/services/keybinding/common/keybindingEditing.ts @@ -20,7 +20,7 @@ import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { IUserFriendlyKeybinding } from 'vs/platform/keybinding/common/keybinding'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { ITextModelResolverService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; +import { ITextModelService, ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IFileService } from 'vs/platform/files/common/files'; import { createDecorator, ServiceIdentifier } from 'vs/platform/instantiation/common/instantiation'; @@ -48,7 +48,7 @@ export class KeybindingsEditingService extends Disposable implements IKeybinding private resource: URI = URI.file(this.environmentService.appKeybindingsPath); constructor( - @ITextModelResolverService private textModelResolverService: ITextModelResolverService, + @ITextModelService private textModelResolverService: ITextModelService, @ITextFileService private textFileService: ITextFileService, @IFileService private fileService: IFileService, @IConfigurationService private configurationService: IConfigurationService, @@ -262,4 +262,4 @@ export class KeybindingsEditingService extends Disposable implements IKeybinding private getEmptyContent(EOL: string): string { return '// ' + localize('emptyKeybindingsHeader', "Place your key bindings in this file to overwrite the defaults") + EOL + '[]'; } -} \ No newline at end of file +} diff --git a/src/vs/workbench/services/keybinding/test/keybindingEditing.test.ts b/src/vs/workbench/services/keybinding/test/keybindingEditing.test.ts index cc4495e14e945..dc64fc81dfd00 100644 --- a/src/vs/workbench/services/keybinding/test/keybindingEditing.test.ts +++ b/src/vs/workbench/services/keybinding/test/keybindingEditing.test.ts @@ -31,7 +31,7 @@ import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { TextModelResolverService } from 'vs/workbench/services/textmodelResolver/common/textModelResolverService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl'; @@ -76,7 +76,7 @@ suite('Keybindings Editing', () => { instantiationService.stub(IFileService, new FileService(testDir, { disableWatcher: true })); instantiationService.stub(IUntitledEditorService, instantiationService.createInstance(UntitledEditorService)); instantiationService.stub(ITextFileService, instantiationService.createInstance(TestTextFileService)); - instantiationService.stub(ITextModelResolverService, instantiationService.createInstance(TextModelResolverService)); + instantiationService.stub(ITextModelService, instantiationService.createInstance(TextModelResolverService)); instantiationService.stub(IBackupFileService, new TestBackupFileService()); testObject = instantiationService.createInstance(KeybindingsEditingService); @@ -226,4 +226,4 @@ suite('Keybindings Editing', () => { return new ResolvedKeybindingItem(keybinding ? new USLayoutResolvedKeybinding(keybinding, OS) : null, command || 'some command', null, when ? ContextKeyExpr.deserialize(when) : null, isDefault === void 0 ? true : isDefault); } -}); \ No newline at end of file +}); diff --git a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts index f3c7ba8d7a09b..f8f9997921225 100644 --- a/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts +++ b/src/vs/workbench/services/textmodelResolver/common/textModelResolverService.ts @@ -14,7 +14,7 @@ import { IModelService } from 'vs/editor/common/services/modelService'; import { ResourceEditorModel } from 'vs/workbench/common/editor/resourceEditorModel'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import network = require('vs/base/common/network'); -import { ITextModelResolverService, ITextModelContentProvider, ITextEditorModel } from 'vs/editor/common/services/resolverService'; +import { ITextModelService, ITextModelContentProvider, ITextEditorModel } from 'vs/editor/common/services/resolverService'; import { IUntitledEditorService, UNTITLED_SCHEMA } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { TextFileEditorModel } from 'vs/workbench/services/textfile/common/textFileEditorModel'; @@ -92,7 +92,7 @@ class ResourceModelCollection extends ReferenceCollection { disposable.dispose(); }); -}); \ No newline at end of file +}); diff --git a/src/vs/workbench/test/common/editor/editorDiffModel.test.ts b/src/vs/workbench/test/common/editor/editorDiffModel.test.ts index 91541187e84d8..b2e26b3ec576a 100644 --- a/src/vs/workbench/test/common/editor/editorDiffModel.test.ts +++ b/src/vs/workbench/test/common/editor/editorDiffModel.test.ts @@ -14,7 +14,7 @@ import { IModelService } from 'vs/editor/common/services/modelService'; import { IModeService } from 'vs/editor/common/services/modeService'; import { ResourceEditorInput } from 'vs/workbench/common/editor/resourceEditorInput'; import URI from 'vs/base/common/uri'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { TestTextFileService, workbenchInstantiationService } from 'vs/workbench/test/workbenchTestServices'; import { TPromise } from "vs/base/common/winjs.base"; @@ -26,7 +26,7 @@ class MyTextEditorModel extends BaseTextEditorModel { } class ServiceAccessor { constructor( - @ITextModelResolverService public textModelResolverService: ITextModelResolverService, + @ITextModelService public textModelResolverService: ITextModelService, @IModelService public modelService: IModelService, @IModeService public modeService: IModeService, @ITextFileService public textFileService: TestTextFileService @@ -81,4 +81,4 @@ suite('Workbench - EditorModel', () => { done(); }); }); -}); \ No newline at end of file +}); diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 1473649308196..c280cd4c97935 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -23,7 +23,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IPartService, Parts } from 'vs/workbench/services/part/common/partService'; import { TextModelResolverService } from 'vs/workbench/services/textmodelResolver/common/textModelResolverService'; -import { ITextModelResolverService } from 'vs/editor/common/services/resolverService'; +import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { IEditorInput, IEditorOptions, Position, Direction, IEditor, IResourceInput } from 'vs/platform/editor/common/editor'; import { IUntitledEditorService, UntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IMessageService, IConfirmation } from 'vs/platform/message/common/message'; @@ -223,7 +223,7 @@ export function workbenchInstantiationService(): IInstantiationService { instantiationService.stub(IUntitledEditorService, instantiationService.createInstance(UntitledEditorService)); instantiationService.stub(IWindowsService, new TestWindowsService()); instantiationService.stub(ITextFileService, instantiationService.createInstance(TestTextFileService)); - instantiationService.stub(ITextModelResolverService, instantiationService.createInstance(TextModelResolverService)); + instantiationService.stub(ITextModelService, instantiationService.createInstance(TextModelResolverService)); instantiationService.stub(IEnvironmentService, TestEnvironmentService); instantiationService.stub(IThemeService, new TestThemeService()); From 4f26974fdd1f00e22e82c407306a2c77716b1dd8 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Tue, 13 Jun 2017 16:00:17 +0200 Subject: [PATCH 1777/2747] First cut of #23752: Task dialog switches to output view --- src/vs/workbench/parts/tasks/common/taskSystem.ts | 1 + .../tasks/electron-browser/task.contribution.ts | 12 ++++++++++-- .../tasks/electron-browser/terminalTaskSystem.ts | 9 +++++++++ .../workbench/parts/tasks/node/processTaskSystem.ts | 4 ++++ 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/tasks/common/taskSystem.ts b/src/vs/workbench/parts/tasks/common/taskSystem.ts index 30e51e8a2e33d..b61a8fbc86344 100644 --- a/src/vs/workbench/parts/tasks/common/taskSystem.ts +++ b/src/vs/workbench/parts/tasks/common/taskSystem.ts @@ -100,6 +100,7 @@ export interface ITaskResolver { export interface ITaskSystem extends IEventEmitter { run(task: Task, resolver: ITaskResolver): ITaskExecuteResult; + show(task: Task, forceFocus?: boolean): void; isActive(): TPromise; isActiveSync(): boolean; getActiveTasks(): Task[]; diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index f4d4872c6d975..529b36f8f0c3e 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -444,6 +444,9 @@ class NullTaskSystem extends EventEmitter implements ITaskSystem { promise: TPromise.as({}) }; } + public show(task: Task, forceFocus: boolean = false): void { + return; + } public isActive(): TPromise { return TPromise.as(false); } @@ -929,8 +932,13 @@ class TaskService extends EventEmitter implements ITaskService { let executeResult = this.getTaskSystem().run(task, resolver); if (executeResult.kind === TaskExecuteKind.Active) { let active = executeResult.active; - if (active.same && active.background) { - this.messageService.show(Severity.Info, nls.localize('TaskSystem.activeSame', 'The task is already active and in watch mode. To terminate the task use `F1 > terminate task`')); + if (active.same) { + if (active.background) { + this.messageService.show(Severity.Info, nls.localize('TaskSystem.activeSame.background', 'The task is already active and in background mode. To terminate the task use `F1 > terminate task`')); + } else { + this.getTaskSystem().show(task, true); + // this.messageService.show(Severity.Info, nls.localize('TaskSystem.activeSame.noBackground', 'The task is already active. To terminate the task use `F1 > terminate task`')); + } } else { throw new TaskError(Severity.Warning, nls.localize('TaskSystem.active', 'There is already a task running. Terminate it first before executing another task.'), TaskErrors.RunningTask); } diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index b22d2788cb335..3bdec71f2ec29 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -156,6 +156,15 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { } } + public show(task: Task, forceFocus: boolean = false): void { + let terminalData = this.activeTasks[task._id]; + if (terminalData === void 0) { + return; + } + this.terminalService.setActiveInstance(terminalData.terminal); + this.terminalService.showPanel(forceFocus); + } + public isActive(): TPromise { return TPromise.as(this.isActiveSync()); } diff --git a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts index 0db8946a2d29d..c6e4d70add928 100644 --- a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts @@ -89,6 +89,10 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem { return this.executeTask(task); } + public show(task: Task, forceFocus: boolean = false): void { + this.outputChannel.show(!focus); + } + public hasErrors(value: boolean): void { this.errorsShown = !value; } From ac4bc6116eb7d8819bedbfca39d4dbfb95cf2eb7 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Tue, 13 Jun 2017 16:03:05 +0200 Subject: [PATCH 1778/2747] Code tidy up. --- .../debug/electron-browser/debugEditorContribution.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts index e33c15a909f9c..4870b63347007 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts @@ -38,6 +38,7 @@ import { IListService } from 'vs/platform/list/browser/listService'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { Position } from 'vs/editor/common/core/position'; import { CoreEditingCommands } from 'vs/editor/common/controller/coreCommands'; +import { first } from 'vs/base/common/arrays'; const HOVER_DELAY = 300; const LAUNCH_JSON_REGEX = /launch\.json$/; @@ -363,13 +364,7 @@ export class DebugEditorContribution implements IDebugEditorContribution { } // First call stack frame that is available is the frame where exception has been thrown - let exceptionSf; - for (let sf of callStack) { - if (sf.source && sf.source.available) { - exceptionSf = sf; - break; - } - } + const exceptionSf = first(callStack, sf => sf.source && sf.source.available, undefined); if (!exceptionSf) { this.closeExceptionWidget(); return; From cfd4a2087ead99d320dd6857998471cb59ceedb5 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 13 Jun 2017 16:46:45 +0200 Subject: [PATCH 1779/2747] debt - remove boilerplate code --- src/vs/base/common/lifecycle.ts | 16 ---------------- .../referenceSearch/browser/referencesWidget.ts | 10 +++++----- .../contrib/zoneWidget/browser/zoneWidget.ts | 14 +++++++------- src/vs/workbench/electron-browser/shell.ts | 16 ++++++++-------- .../parts/debug/browser/exceptionWidget.ts | 6 +++--- 5 files changed, 23 insertions(+), 39 deletions(-) diff --git a/src/vs/base/common/lifecycle.ts b/src/vs/base/common/lifecycle.ts index 1a17d2a524f56..b392ef7768c2c 100644 --- a/src/vs/base/common/lifecycle.ts +++ b/src/vs/base/common/lifecycle.ts @@ -62,22 +62,6 @@ export abstract class Disposable implements IDisposable { } } -export class Disposables extends Disposable { - - public add(e: T): T; - public add(...elements: IDisposable[]): void; - public add(arg: T | T[]): T { - if (!Array.isArray(arg)) { - return this._register(arg); - } else { - for (let element of arg) { - return this._register(element); - } - return undefined; - } - } -} - export class OneDisposable implements IDisposable { private _value: IDisposable; diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index 7ad1761a1b98e..a0603d8f948b2 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -10,7 +10,7 @@ import { alert } from 'vs/base/browser/ui/aria/aria'; import { onUnexpectedError } from 'vs/base/common/errors'; import { getPathLabel } from 'vs/base/common/labels'; import Event, { Emitter } from 'vs/base/common/event'; -import { IDisposable, dispose, Disposables, IReference } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose, IReference } from 'vs/base/common/lifecycle'; import { Schemas } from 'vs/base/common/network'; import * as strings from 'vs/base/common/strings'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -484,7 +484,7 @@ class AriaProvider implements tree.IAccessibilityProvider { class VSash { - private _disposables = new Disposables(); + private _disposables: IDisposable[] = []; private _sash: Sash; private _ratio: number; private _height: number; @@ -501,11 +501,11 @@ class VSash { // compute the current widget clientX postion since // the sash works with clientX when dragging let clientX: number; - this._disposables.add(this._sash.addListener('start', (e: ISashEvent) => { + this._disposables.push(this._sash.addListener('start', (e: ISashEvent) => { clientX = e.startX - (this._width * this.ratio); })); - this._disposables.add(this._sash.addListener('change', (e: ISashEvent) => { + this._disposables.push(this._sash.addListener('change', (e: ISashEvent) => { // compute the new position of the sash and from that // compute the new ratio that we are using let newLeft = e.currentX - clientX; @@ -520,7 +520,7 @@ class VSash { dispose() { this._sash.dispose(); this._onDidChangePercentages.dispose(); - this._disposables.dispose(); + dispose(this._disposables); } get onDidChangePercentages() { diff --git a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts index dc599a468bfbf..4764ae690e52e 100644 --- a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts +++ b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts @@ -6,7 +6,7 @@ 'use strict'; import 'vs/css!./zoneWidget'; -import { Disposables } from 'vs/base/common/lifecycle'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { Widget } from 'vs/base/browser/ui/widget'; import * as objects from 'vs/base/common/objects'; import * as dom from 'vs/base/browser/dom'; @@ -109,7 +109,7 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout private _positionMarkerId: string[] = []; protected _viewZone: ViewZoneDelegate = null; - protected _disposables = new Disposables(); + protected _disposables: IDisposable[] = []; public container: HTMLElement = null; public domNode: HTMLElement; @@ -128,7 +128,7 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout this.domNode.setAttribute('role', 'presentation'); } - this._disposables.add(this.editor.onDidLayoutChange((info: EditorLayoutInfo) => { + this._disposables.push(this.editor.onDidLayoutChange((info: EditorLayoutInfo) => { const width = this._getWidth(info); this.domNode.style.width = width + 'px'; this._onWidth(width); @@ -137,7 +137,7 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout public dispose(): void { - this._disposables.dispose(); + dispose(this._disposables); if (this._overlayWidget) { this.editor.removeOverlayWidget(this._overlayWidget); @@ -392,7 +392,7 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout } let data: { startY: number; heightInLines: number; }; - this._disposables.add(this._resizeSash.addListener('start', (e: ISashEvent) => { + this._disposables.push(this._resizeSash.addListener('start', (e: ISashEvent) => { if (this._viewZone) { data = { startY: e.startY, @@ -401,11 +401,11 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout } })); - this._disposables.add(this._resizeSash.addListener('end', () => { + this._disposables.push(this._resizeSash.addListener('end', () => { data = undefined; })); - this._disposables.add(this._resizeSash.addListener('change', (evt: ISashEvent) => { + this._disposables.push(this._resizeSash.addListener('change', (evt: ISashEvent) => { if (data) { let lineDelta = (evt.currentY - data.startY) / this.editor.getConfiguration().lineHeight; let roundedLineDelta = lineDelta < 0 ? Math.ceil(lineDelta) : Math.floor(lineDelta); diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 00becc599ff09..141b3285c0a6d 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -13,7 +13,7 @@ import * as platform from 'vs/base/common/platform'; import { Dimension, Builder, $ } from 'vs/base/browser/builder'; import dom = require('vs/base/browser/dom'); import aria = require('vs/base/browser/ui/aria/aria'); -import { dispose, IDisposable, Disposables } from 'vs/base/common/lifecycle'; +import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import errors = require('vs/base/common/errors'); import { toErrorMessage } from 'vs/base/common/errorMessage'; import product from 'vs/platform/node/product'; @@ -244,7 +244,7 @@ export class WorkbenchShell { } private initServiceCollection(container: HTMLElement): [IInstantiationService, ServiceCollection] { - const disposables = new Disposables(); + const disposables: IDisposable[] = []; const serviceCollection = new ServiceCollection(); serviceCollection.set(IWorkspaceContextService, this.contextService); @@ -259,7 +259,7 @@ export class WorkbenchShell { serviceCollection.set(IWindowIPCService, this.windowIPCService); const mainProcessClient = new ElectronIPCClient(String(`window${currentWindow.id}`)); - disposables.add(mainProcessClient); + disposables.push(mainProcessClient); const windowsChannel = mainProcessClient.getChannel('windows'); this.windowsService = new WindowsChannelClient(windowsChannel); @@ -319,14 +319,14 @@ export class WorkbenchShell { : TelemetryService.IDLE_START_EVENT_NAME )); - disposables.add(telemetryService, errorTelemetry, listener, idleMonitor); + disposables.push(telemetryService, errorTelemetry, listener, idleMonitor); } else { NullTelemetryService._experiments = instantiationService.invokeFunction(loadExperiments); this.telemetryService = NullTelemetryService; } serviceCollection.set(ITelemetryService, this.telemetryService); - disposables.add(configurationTelemetry(this.telemetryService, this.configurationService)); + disposables.push(configurationTelemetry(this.telemetryService, this.configurationService)); let crashReporterService = NullCrashReporterService; if (product.crashReporter && product.hockeyApp) { @@ -339,10 +339,10 @@ export class WorkbenchShell { serviceCollection.set(IChoiceService, this.messageService); const lifecycleService = instantiationService.createInstance(LifecycleService); - this.toUnbind.push(lifecycleService.onShutdown(reason => disposables.dispose())); + this.toUnbind.push(lifecycleService.onShutdown(reason => dispose(disposables))); this.toUnbind.push(lifecycleService.onShutdown(reason => saveFontInfo(this.storageService))); serviceCollection.set(ILifecycleService, lifecycleService); - disposables.add(lifecycleTelemetry(this.telemetryService, lifecycleService)); + disposables.push(lifecycleTelemetry(this.telemetryService, lifecycleService)); this.lifecycleService = lifecycleService; const extensionManagementChannel = getDelayedChannel(sharedProcess.then(c => c.getChannel('extensions'))); @@ -350,7 +350,7 @@ export class WorkbenchShell { const extensionEnablementService = instantiationService.createInstance(ExtensionEnablementService); serviceCollection.set(IExtensionEnablementService, extensionEnablementService); - disposables.add(extensionEnablementService); + disposables.push(extensionEnablementService); const extensionHostProcessWorker = instantiationService.createInstance(ExtensionHostProcessWorker); this.threadService = instantiationService.createInstance(MainThreadService, extensionHostProcessWorker.messagingProtocol); diff --git a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts index 70004ffb52630..3719a86393b25 100644 --- a/src/vs/workbench/parts/debug/browser/exceptionWidget.ts +++ b/src/vs/workbench/parts/debug/browser/exceptionWidget.ts @@ -38,13 +38,13 @@ export class ExceptionWidget extends ZoneWidget { this._backgroundColor = Color.white; this._applyTheme(themeService.getTheme()); - this._disposables.add(themeService.onThemeChange(this._applyTheme.bind(this))); + this._disposables.push(themeService.onThemeChange(this._applyTheme.bind(this))); this.create(); const onDidLayoutChangeScheduler = new RunOnceScheduler(() => this._doLayout(undefined, undefined), 50); - this._disposables.add(this.editor.onDidLayoutChange(() => onDidLayoutChangeScheduler.schedule())); - this._disposables.add(onDidLayoutChangeScheduler); + this._disposables.push(this.editor.onDidLayoutChange(() => onDidLayoutChangeScheduler.schedule())); + this._disposables.push(onDidLayoutChangeScheduler); } private _applyTheme(theme: ITheme): void { From cf06cc073986ed34b06e8f144b978976cbf5c35f Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 13 Jun 2017 16:51:03 +0200 Subject: [PATCH 1780/2747] debt - simplify stuff --- src/vs/base/common/lifecycle.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vs/base/common/lifecycle.ts b/src/vs/base/common/lifecycle.ts index b392ef7768c2c..2600d72e9ef36 100644 --- a/src/vs/base/common/lifecycle.ts +++ b/src/vs/base/common/lifecycle.ts @@ -41,7 +41,13 @@ export function combinedDisposable(disposables: IDisposable[]): IDisposable { } export function toDisposable(...fns: (() => void)[]): IDisposable { - return combinedDisposable(fns.map(fn => ({ dispose: fn }))); + return { + dispose() { + for (const fn of fns) { + fn(); + } + } + }; } export abstract class Disposable implements IDisposable { From 97d8f90657204315794da82ec344d7b3785b405d Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 13 Jun 2017 17:01:42 +0200 Subject: [PATCH 1781/2747] debug: have a scheduler per thread fixes #28536 --- .../parts/debug/common/debugModel.ts | 38 ++++++++++++------- .../debug/electron-browser/debugService.ts | 16 -------- .../debug/electron-browser/debugViewer.ts | 4 +- 3 files changed, 27 insertions(+), 31 deletions(-) diff --git a/src/vs/workbench/parts/debug/common/debugModel.ts b/src/vs/workbench/parts/debug/common/debugModel.ts index 702ada257dfb8..23f762661b4dc 100644 --- a/src/vs/workbench/parts/debug/common/debugModel.ts +++ b/src/vs/workbench/parts/debug/common/debugModel.ts @@ -9,6 +9,8 @@ import { TPromise } from 'vs/base/common/winjs.base'; import * as lifecycle from 'vs/base/common/lifecycle'; import Event, { Emitter } from 'vs/base/common/event'; import { generateUuid } from 'vs/base/common/uuid'; +import * as errors from 'vs/base/common/errors'; +import { RunOnceScheduler } from 'vs/base/common/async'; import { clone } from 'vs/base/common/objects'; import severity from 'vs/base/common/severity'; import { isObject, isString } from 'vs/base/common/types'; @@ -435,22 +437,14 @@ export class Thread implements IThread { * Only fetches the first stack frame for performance reasons. Calling this method consecutive times * gets the remainder of the call stack. */ - public fetchCallStack(smartFetch = true): TPromise { + public fetchCallStack(levels = 20): TPromise { if (!this.stopped) { return TPromise.as(null); } - if (!this.fetchPromise && smartFetch) { - this.fetchPromise = this.getCallStackImpl(0, 1).then(callStack => { - this.callStack = callStack || []; - }); - } else { - this.fetchPromise = (this.fetchPromise || TPromise.as(null)).then(() => this.getCallStackImpl(this.callStack.length, 20).then(callStackSecondPart => { - this.callStack = this.callStack.concat(callStackSecondPart); - })); - } - - return this.fetchPromise; + return this.getCallStackImpl(this.callStack.length, levels).then(callStack => { + this.callStack = this.callStack.concat(callStack || []); + }); } private getCallStackImpl(startFrame: number, levels: number): TPromise { @@ -738,6 +732,7 @@ export class Model implements IModel { private processes: Process[]; private toDispose: lifecycle.IDisposable[]; private replElements: IReplElement[]; + private schedulers = new Map(); private _onDidChangeBreakpoints: Emitter; private _onDidChangeCallStack: Emitter; private _onDidChangeWatchExpressions: Emitter; @@ -805,6 +800,9 @@ export class Model implements IModel { public clearThreads(id: string, removeThreads: boolean, reference: number = undefined): void { const process = this.processes.filter(p => p.getId() === id).pop(); + this.schedulers.forEach(scheduler => scheduler.dispose()); + this.schedulers.clear(); + if (process) { process.clearThreads(removeThreads, reference); this._onDidChangeCallStack.fire(); @@ -812,7 +810,21 @@ export class Model implements IModel { } public fetchCallStack(thread: IThread): TPromise { - return (thread).fetchCallStack().then(() => { + return (thread).fetchCallStack(1).then(() => { + if (!this.schedulers.has(thread.getId())) { + this.schedulers.set(thread.getId(), new RunOnceScheduler(() => { + const callStack = thread.getCallStack(); + // Some adapters might not respect the number levels in StackTraceRequest and might + // return more stackFrames than requested. For those do not send an additional stackTrace request. + if (callStack.length <= 1) { + (thread).fetchCallStack(19).done(() => { + this._onDidChangeCallStack.fire(); + }, errors.onUnexpectedError); + } + }, 420)); + } + + this.schedulers.get(thread.getId()).schedule(); this._onDidChangeCallStack.fire(); }); } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 0f363b2090844..40c3ce62b0515 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -7,7 +7,6 @@ import * as nls from 'vs/nls'; import * as lifecycle from 'vs/base/common/lifecycle'; import Event, { Emitter } from 'vs/base/common/event'; import * as paths from 'vs/base/common/paths'; -import { RunOnceScheduler } from 'vs/base/common/async'; import * as strings from 'vs/base/common/strings'; import { generateUuid } from 'vs/base/common/uuid'; import uri from 'vs/base/common/uri'; @@ -80,9 +79,7 @@ export class DebugService implements debug.IDebugService { private debugType: IContextKey; private debugState: IContextKey; private breakpointsToSendOnResourceSaved: Set; - private callStackScheduler: RunOnceScheduler; private launchJsonChanged: boolean; - private threadToFetch: debug.IThread; constructor( @IStorageService private storageService: IStorageService, @@ -121,17 +118,6 @@ export class DebugService implements debug.IDebugService { this.loadExceptionBreakpoints(), this.loadWatchExpressions()); this.toDispose.push(this.model); this.viewModel = new ViewModel(this.storageService.get(DEBUG_SELECTED_CONFIG_NAME_KEY, StorageScope.WORKSPACE, null)); - this.callStackScheduler = new RunOnceScheduler(() => { - if (this.threadToFetch) { - const callStack = this.threadToFetch.getCallStack(); - // Some adapters might not respect the number levels in StackTraceRequest and might - // return more stackFrames than requested. For those do not send an additional stackTrace request. - if (callStack.length <= 1) { - this.model.fetchCallStack(this.threadToFetch).done(() => - this.tryToAutoFocusStackFrame(this.threadToFetch), errors.onUnexpectedError); - } - } - }, 420); this.registerListeners(lifecycleService); } @@ -330,8 +316,6 @@ export class DebugService implements debug.IDebugService { // Call fetch call stack twice, the first only return the top stack frame. // Second retrieves the rest of the call stack. For performance reasons #25605 this.model.fetchCallStack(thread).then(() => { - this.threadToFetch = thread; - this.callStackScheduler.schedule(); return this.tryToAutoFocusStackFrame(thread); }); } diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index b7bd340b8531a..81b08439bd25e 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -366,9 +366,9 @@ export class CallStackDataSource implements IDataSource { } private getThreadChildren(thread: Thread): TPromise { - const callStack: any[] = thread.getCallStack(); + let callStack: any[] = thread.getCallStack(); if (!callStack || !callStack.length) { - return thread.fetchCallStack(false).then(() => thread.getCallStack()); + thread.fetchCallStack().then(() => callStack = thread.getCallStack()); } if (callStack.length === 1) { // To reduce flashing of the call stack view simply append the stale call stack From b5acc69cbf1bdbc3329b01eef2ba9fa61b9c21f8 Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 13 Jun 2017 17:17:03 +0200 Subject: [PATCH 1782/2747] explorerViewModel.ts -> explorerModel.ts --- .../workbench/parts/files/browser/fileActions.contribution.ts | 2 +- src/vs/workbench/parts/files/browser/fileActions.ts | 2 +- src/vs/workbench/parts/files/browser/fileCommands.ts | 2 +- src/vs/workbench/parts/files/browser/views/explorerView.ts | 2 +- src/vs/workbench/parts/files/browser/views/explorerViewer.ts | 2 +- src/vs/workbench/parts/files/browser/views/openEditorsView.ts | 2 +- src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts | 2 +- .../files/common/{explorerViewModel.ts => explorerModel.ts} | 0 src/vs/workbench/parts/files/common/files.ts | 2 +- .../parts/files/test/browser/explorerViewModel.test.ts | 2 +- 10 files changed, 9 insertions(+), 9 deletions(-) rename src/vs/workbench/parts/files/common/{explorerViewModel.ts => explorerModel.ts} (100%) diff --git a/src/vs/workbench/parts/files/browser/fileActions.contribution.ts b/src/vs/workbench/parts/files/browser/fileActions.contribution.ts index 6f04409b592b7..96e2e177e295f 100644 --- a/src/vs/workbench/parts/files/browser/fileActions.contribution.ts +++ b/src/vs/workbench/parts/files/browser/fileActions.contribution.ts @@ -17,7 +17,7 @@ import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/wor import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { FileStat } from 'vs/workbench/parts/files/common/explorerViewModel'; +import { FileStat } from 'vs/workbench/parts/files/common/explorerModel'; import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; import { OpenFolderAction, OpenFileFolderAction } from 'vs/workbench/browser/actions/fileActions'; import { copyFocusedFilesExplorerViewItem, revealInOSFocusedFilesExplorerItem, openFocusedExplorerItemSideBySideCommand, copyPathOfFocusedExplorerItem, copyPathCommand, revealInExplorerCommand, revealInOSCommand, openFolderPickerCommand, openWindowCommand, openFileInNewWindowCommand, deleteFocusedFilesExplorerViewItemCommand, moveFocusedFilesExplorerViewItemToTrashCommand, renameFocusedFilesExplorerViewItemCommand } from 'vs/workbench/parts/files/browser/fileCommands'; diff --git a/src/vs/workbench/parts/files/browser/fileActions.ts b/src/vs/workbench/parts/files/browser/fileActions.ts index 378a32e3889d7..8415914e7f083 100644 --- a/src/vs/workbench/parts/files/browser/fileActions.ts +++ b/src/vs/workbench/parts/files/browser/fileActions.ts @@ -27,7 +27,7 @@ import labels = require('vs/base/common/labels'); import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; import { IFileService, IFileStat, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; import { toResource, IEditorIdentifier, EditorInput } from 'vs/workbench/common/editor'; -import { FileStat, NewStatPlaceholder } from 'vs/workbench/parts/files/common/explorerViewModel'; +import { FileStat, NewStatPlaceholder } from 'vs/workbench/parts/files/common/explorerModel'; import { ExplorerView } from 'vs/workbench/parts/files/browser/views/explorerView'; import { ExplorerViewlet } from 'vs/workbench/parts/files/browser/explorerViewlet'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; diff --git a/src/vs/workbench/parts/files/browser/fileCommands.ts b/src/vs/workbench/parts/files/browser/fileCommands.ts index 8d0711a0c3d47..121cf168855f6 100644 --- a/src/vs/workbench/parts/files/browser/fileCommands.ts +++ b/src/vs/workbench/parts/files/browser/fileCommands.ts @@ -18,7 +18,7 @@ import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ExplorerViewlet } from 'vs/workbench/parts/files/browser/explorerViewlet'; import { VIEWLET_ID, explorerItemToFileResource } from 'vs/workbench/parts/files/common/files'; -import { FileStat, OpenEditor } from 'vs/workbench/parts/files/common/explorerViewModel'; +import { FileStat, OpenEditor } from 'vs/workbench/parts/files/common/explorerModel'; import errors = require('vs/base/common/errors'); import { ITree } from 'vs/base/parts/tree/browser/tree'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index d1df344969adf..a2c1f5fd485be 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -26,7 +26,7 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer import * as DOM from 'vs/base/browser/dom'; import { CollapseAction } from 'vs/workbench/browser/viewlet'; import { CollapsibleView, IViewletViewOptions } from 'vs/workbench/parts/views/browser/views'; -import { FileStat } from 'vs/workbench/parts/files/common/explorerViewModel'; +import { FileStat } from 'vs/workbench/parts/files/common/explorerModel'; import { IListService } from 'vs/platform/list/browser/listService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IPartService } from 'vs/workbench/services/part/common/partService'; diff --git a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts index e7ed0556942dd..2464c18f1fcbf 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts @@ -31,7 +31,7 @@ import { DuplicateFileAction, ImportFileAction, IEditableData, IFileViewletState import { IDataSource, ITree, IAccessibilityProvider, IRenderer, ContextMenuEvent, ISorter, IFilter, IDragAndDrop, IDragAndDropData, IDragOverReaction, DRAG_OVER_ACCEPT_BUBBLE_DOWN, DRAG_OVER_ACCEPT_BUBBLE_DOWN_COPY, DRAG_OVER_ACCEPT_BUBBLE_UP, DRAG_OVER_ACCEPT_BUBBLE_UP_COPY, DRAG_OVER_REJECT } from 'vs/base/parts/tree/browser/tree'; import { DesktopDragAndDropData, ExternalElementsDragAndDropData } from 'vs/base/parts/tree/browser/treeDnd'; import { ClickBehavior, DefaultController } from 'vs/base/parts/tree/browser/treeDefaults'; -import { FileStat, NewStatPlaceholder } from 'vs/workbench/parts/files/common/explorerViewModel'; +import { FileStat, NewStatPlaceholder } from 'vs/workbench/parts/files/common/explorerModel'; import { DragMouseEvent, IMouseEvent } from 'vs/base/browser/mouseEvent'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IPartService } from 'vs/workbench/services/part/common/partService'; diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts index d15bc3aef0084..f2fc598953aa6 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts @@ -22,7 +22,7 @@ import { CollapsibleView, IViewletViewOptions } from 'vs/workbench/parts/views/b import { IFilesConfiguration, VIEWLET_ID, OpenEditorsFocussedContext, ExplorerFocussedContext } from 'vs/workbench/parts/files/common/files'; import { ITextFileService, AutoSaveMode } from 'vs/workbench/services/textfile/common/textfiles'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; -import { OpenEditor } from 'vs/workbench/parts/files/common/explorerViewModel'; +import { OpenEditor } from 'vs/workbench/parts/files/common/explorerModel'; import { Renderer, DataSource, Controller, AccessibilityProvider, ActionProvider, DragAndDrop } from 'vs/workbench/parts/files/browser/views/openEditorsViewer'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { CloseAllEditorsAction } from 'vs/workbench/browser/parts/editor/editorActions'; diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts b/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts index f275bfd30a52e..959e8c13aeb39 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts @@ -22,7 +22,7 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IEditorGroup, IEditorStacksModel } from 'vs/workbench/common/editor'; -import { OpenEditor } from 'vs/workbench/parts/files/common/explorerViewModel'; +import { OpenEditor } from 'vs/workbench/parts/files/common/explorerModel'; import { ContributableActionProvider } from 'vs/workbench/browser/actions'; import { explorerItemToFileResource } from 'vs/workbench/parts/files/common/files'; import { ITextFileService, AutoSaveMode } from 'vs/workbench/services/textfile/common/textfiles'; diff --git a/src/vs/workbench/parts/files/common/explorerViewModel.ts b/src/vs/workbench/parts/files/common/explorerModel.ts similarity index 100% rename from src/vs/workbench/parts/files/common/explorerViewModel.ts rename to src/vs/workbench/parts/files/common/explorerModel.ts diff --git a/src/vs/workbench/parts/files/common/files.ts b/src/vs/workbench/parts/files/common/files.ts index dc8cd834b61fc..f391f8497fa55 100644 --- a/src/vs/workbench/parts/files/common/files.ts +++ b/src/vs/workbench/parts/files/common/files.ts @@ -8,7 +8,7 @@ import URI from 'vs/base/common/uri'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IWorkbenchEditorConfiguration } from 'vs/workbench/common/editor'; import { IFilesConfiguration } from 'vs/platform/files/common/files'; -import { FileStat, OpenEditor } from 'vs/workbench/parts/files/common/explorerViewModel'; +import { FileStat, OpenEditor } from 'vs/workbench/parts/files/common/explorerModel'; import { ContextKeyExpr, RawContextKey } from 'vs/platform/contextkey/common/contextkey'; /** diff --git a/src/vs/workbench/parts/files/test/browser/explorerViewModel.test.ts b/src/vs/workbench/parts/files/test/browser/explorerViewModel.test.ts index 92b2fdd10a302..4343b05fac301 100644 --- a/src/vs/workbench/parts/files/test/browser/explorerViewModel.test.ts +++ b/src/vs/workbench/parts/files/test/browser/explorerViewModel.test.ts @@ -11,7 +11,7 @@ import { isLinux, isWindows } from 'vs/base/common/platform'; import URI from 'vs/base/common/uri'; import { join } from 'vs/base/common/paths'; import { validateFileName } from 'vs/workbench/parts/files/browser/fileActions'; -import { FileStat } from 'vs/workbench/parts/files/common/explorerViewModel'; +import { FileStat } from 'vs/workbench/parts/files/common/explorerModel'; function createStat(path, name, isFolder, hasChildren, size, mtime) { return new FileStat(toResource(path), isFolder, hasChildren, name, mtime); From 5e70c18433df0bcdd8e3e99728a91c0952ee7ecf Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 13 Jun 2017 11:05:04 -0700 Subject: [PATCH 1783/2747] Uplevel xterm.js Fixes #23142 Fixes #28609 --- npm-shrinkwrap.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 7b76d1c9edbf3..a1d1223cab244 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -442,7 +442,7 @@ "xterm": { "version": "2.7.0", "from": "Tyriar/xterm.js#vscode-release/1.14", - "resolved": "git+https://github.com/Tyriar/xterm.js.git#1d7007669dec1f60e5878aa102a36473d8cbd97f" + "resolved": "git+https://github.com/Tyriar/xterm.js.git#7d3640ad17fbf69f1a1c776b6d08969e1da32875" }, "yauzl": { "version": "2.3.1", From bede3ce9cea769179cfc8144cf004566c851fb95 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 13 Jun 2017 11:08:55 -0700 Subject: [PATCH 1784/2747] Fix rename terminal action --- .../parts/terminal/electron-browser/terminalInstance.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 44a6c047dffec..fea2eb3d2b092 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -794,6 +794,7 @@ export class TerminalInstance implements ITerminalInstance { public setTitle(title: string): void { const didTitleChange = title !== this._title; + this._title = title; if (didTitleChange) { this._onTitleChanged.fire(title); } From 314ebc778cda5483cbdd29a831b50663267f6f2b Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 13 Jun 2017 11:20:38 -0700 Subject: [PATCH 1785/2747] Adding some validation --- src/vs/code/electron-main/app.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 9d09792a65bf0..8effa87307f18 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -48,6 +48,7 @@ import { isUndefinedOrNull } from "vs/base/common/types"; import { CodeWindow } from "vs/code/electron-main/window"; import { isEqual, isParent } from "vs/platform/files/common/files"; import { KeyboardLayoutMonitor } from "vs/code/electron-main/keyboard"; +import URI from 'vs/base/common/uri'; export class CodeApplication { private toDispose: IDisposable[]; @@ -119,6 +120,23 @@ export class CodeApplication { } }); + const isValidWebviewSource = (source: string) => + !source || (source.toLowerCase() as any).startsWith(URI.file(this.environmentService.appRoot.toLowerCase()).toString()); + + app.on('web-contents-created', (event, contents) => { + contents.on('will-attach-webview', (event, webPreferences, params) => { + delete webPreferences.preload; + webPreferences.nodeIntegration = false; + + // Verify URLs being loaded + if (isValidWebviewSource(params.src) && isValidWebviewSource(webPreferences.preloadURL)) { + return; + } + // Otherwise prevent loading + event.preventDefault(); + }); + }); + let macOpenFiles: string[] = []; let runningTimeout: number = null; app.on('open-file', (event: Event, path: string) => { From c6b610cd00b26a785d811eaf594058ae72f86849 Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Tue, 13 Jun 2017 11:22:38 -0700 Subject: [PATCH 1786/2747] Only label upcoming recovery build --- .github/new_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/new_release.yml b/.github/new_release.yml index ae86432733305..dd0810063298b 100644 --- a/.github/new_release.yml +++ b/.github/new_release.yml @@ -1,5 +1,5 @@ { newReleaseLabel: 'new release', - newReleases: ['1.13'], + newReleases: ['1.13.1'], perform: true } \ No newline at end of file From 4c2b9a6917af708af7661d28ce33547f6f7038e3 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 13 Jun 2017 11:30:22 -0700 Subject: [PATCH 1787/2747] Fix solarized terminal colors Fixes #28288 --- .../themes/solarized-dark-color-theme.json | 32 +++++++++---------- .../themes/solarized-light-color-theme.json | 32 +++++++++---------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index 04967aae331c3..f21572d1c1198 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -459,21 +459,21 @@ // Workbench: Terminal // Colors sourced from the official palette http://ethanschoonover.com/solarized - "terminal.ansiBlack": "#262626", - "terminal.ansiBlue": "#0087ff", - "terminal.ansiBrightBlack": "#1c1c1c", - "terminal.ansiBrightBlue": "#808080", - "terminal.ansiBrightCyan": "#808080", - "terminal.ansiBrightGreen": "#585858", - "terminal.ansiBrightMagenta": "#5f5faf", - "terminal.ansiBrightRed": "#d75f00", - "terminal.ansiBrightWhite": "#808080", - "terminal.ansiBrightYellow": "#626262", - "terminal.ansiCyan": "#00afaf", - "terminal.ansiGreen": "#5f8700", - "terminal.ansiMagenta": "#af005f", - "terminal.ansiRed": "#d70000", - "terminal.ansiWhite": "#808080", - "terminal.ansiYellow": "#af8700" + "terminal.ansiBlack": "#073642", + "terminal.ansiRed": "#dc322f", + "terminal.ansiGreen": "#859900", + "terminal.ansiYellow": "#b58900", + "terminal.ansiBlue": "#268bd2", + "terminal.ansiMagenta": "#d33682", + "terminal.ansiCyan": "#2aa198", + "terminal.ansiWhite": "#eee8d5", + "terminal.ansiBrightBlack": "#002b36", + "terminal.ansiBrightRed": "#cb4b16", + "terminal.ansiBrightGreen": "#586e75", + "terminal.ansiBrightYellow": "#657b83", + "terminal.ansiBrightBlue": "#839496", + "terminal.ansiBrightMagenta": "#6c71c4", + "terminal.ansiBrightCyan": "#93a1a1", + "terminal.ansiBrightWhite": "#fdf6e3" } } \ No newline at end of file diff --git a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json index ba74b7d038599..184144621204f 100644 --- a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -462,21 +462,21 @@ // Workbench: Terminal // Colors sourced from the official palette http://ethanschoonover.com/solarized - "terminal.ansiBlack": "#262626", - "terminal.ansiBlue": "#0087ff", - "terminal.ansiBrightBlack": "#1c1c1c", - "terminal.ansiBrightBlue": "#808080", - "terminal.ansiBrightCyan": "#808080", - "terminal.ansiBrightGreen": "#585858", - "terminal.ansiBrightMagenta": "#5f5faf", - "terminal.ansiBrightRed": "#d75f00", - "terminal.ansiBrightWhite": "#808080", - "terminal.ansiBrightYellow": "#626262", - "terminal.ansiCyan": "#00afaf", - "terminal.ansiGreen": "#5f8700", - "terminal.ansiMagenta": "#af005f", - "terminal.ansiRed": "#d70000", - "terminal.ansiWhite": "#808080", - "terminal.ansiYellow": "#af8700" + "terminal.ansiBlack": "#073642", + "terminal.ansiRed": "#dc322f", + "terminal.ansiGreen": "#859900", + "terminal.ansiYellow": "#b58900", + "terminal.ansiBlue": "#268bd2", + "terminal.ansiMagenta": "#d33682", + "terminal.ansiCyan": "#2aa198", + "terminal.ansiWhite": "#eee8d5", + "terminal.ansiBrightBlack": "#002b36", + "terminal.ansiBrightRed": "#cb4b16", + "terminal.ansiBrightGreen": "#586e75", + "terminal.ansiBrightYellow": "#657b83", + "terminal.ansiBrightBlue": "#839496", + "terminal.ansiBrightMagenta": "#6c71c4", + "terminal.ansiBrightCyan": "#93a1a1", + "terminal.ansiBrightWhite": "#fdf6e3" } } \ No newline at end of file From 9f99d4ea35a9ff34a5a3667c01ecd8a1c4e6dd36 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Tue, 13 Jun 2017 14:19:22 -0700 Subject: [PATCH 1788/2747] Update OSSREADME to have only modules that dont have a explicit license file --- extensions/emmet/OSSREADME.json | 119 ++------------------------------ 1 file changed, 5 insertions(+), 114 deletions(-) diff --git a/extensions/emmet/OSSREADME.json b/extensions/emmet/OSSREADME.json index 926f46f6fbdc1..09831f14f1704 100644 --- a/extensions/emmet/OSSREADME.json +++ b/extensions/emmet/OSSREADME.json @@ -1,118 +1,9 @@ [ { - "name": "@emmetio/expand-abbreviation", - "license": "MIT", - "version": "0.5.7", - "repositoryURL": "https://github.com/emmetio/expand-abbreviation", - "licenseDetail": [ - "MIT License", - "", - "Copyright (c) 2017 Emmet.io", - "", - "Permission is hereby granted, free of charge, to any person obtaining a copy", - "of this software and associated documentation files (the \"Software\"), to deal", - "in the Software without restriction, including without limitation the rights", - "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", - "copies of the Software, and to permit persons to whom the Software is", - "furnished to do so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in all", - "copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", - "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", - "SOFTWARE." - ] - }, - { - "name": "@emmetio/css-parser", - "license": "MIT", - "version": "0.3.0", - "repositoryURL": "https://github.com/emmetio/css-parser", - "licenseDetail": [ - "MIT License", - "", - "Copyright (c) 2017 Emmet.io", - "", - "Permission is hereby granted, free of charge, to any person obtaining a copy", - "of this software and associated documentation files (the \"Software\"), to deal", - "in the Software without restriction, including without limitation the rights", - "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", - "copies of the Software, and to permit persons to whom the Software is", - "furnished to do so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in all", - "copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", - "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", - "SOFTWARE." - ] - }, - { - "name": "@emmetio/extract-abbreviation", - "license": "MIT", - "version": "0.1.2", - "repositoryURL": "https://github.com/emmetio/extract-abbreviation", - "licenseDetail": [ - "MIT License", - "", - "Copyright (c) 2017 Emmet.io", - "", - "Permission is hereby granted, free of charge, to any person obtaining a copy", - "of this software and associated documentation files (the \"Software\"), to deal", - "in the Software without restriction, including without limitation the rights", - "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", - "copies of the Software, and to permit persons to whom the Software is", - "furnished to do so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in all", - "copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", - "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", - "SOFTWARE." - ] - }, - { - "name": "@emmetio/html-matcher", - "license": "MIT", - "version": "0.3.2", - "repositoryURL": "https://github.com/emmetio/html-matcher", - "licenseDetail": [ - "MIT License", - "", - "Copyright (c) 2017 Emmet.io", - "", - "Permission is hereby granted, free of charge, to any person obtaining a copy", - "of this software and associated documentation files (the \"Software\"), to deal", - "in the Software without restriction, including without limitation the rights", - "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", - "copies of the Software, and to permit persons to whom the Software is", - "furnished to do so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in all", - "copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", - "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", - "SOFTWARE." - ] + "name": "browser-stdout", + "version": "1.3.0", + "isLicense": true, + "repositoryURL": "https://github.com/kumavis/browser-stdout", + "license": "ISC" } ] \ No newline at end of file From 732824c35467b7d625421d3dc048bb1bbe99377e Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Tue, 13 Jun 2017 15:45:20 -0700 Subject: [PATCH 1789/2747] Fixing TSServer Restart Happening Twice Fixes #27817 **Bug** When triggering a manual TSServer restart, we currently start a new instance than immediatly kill it and start another new instance of the service. This is caused by the current handler for proces crashes not knowing that it should not restart the service for manual restarts. **Fix** Make sure kill doesn't automatically try to start up another instance of the TS Server when we manually restart the server --- extensions/typescript/src/typescriptServiceClient.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 212d7cb3b13c5..e2bcf481277b4 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -240,6 +240,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private firstStart: number; private lastStart: number; private numberRestarts: number; + private isRestarting: boolean = false; + private cancellationPipeName: string | null = null; private requestQueue: RequestQueue; @@ -305,13 +307,14 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient public restartTsServer(): void { const start = () => { - this.servicePromise = this.startService(); + this.servicePromise = this.startService(true); return this.servicePromise; }; if (this.servicePromise) { this.servicePromise = this.servicePromise.then(cp => { if (cp) { + this.isRestarting = true; cp.kill(); } }).then(start); @@ -352,7 +355,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient return this._onReady.promise; } - public info(message: string, data?: any): void { + private info(message: string, data?: any): void { this.logger.info(message, data); } @@ -360,7 +363,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.logger.warn(message, data); } - public error(message: string, data?: any): void { + private error(message: string, data?: any): void { this.logger.error(message, data); } @@ -567,7 +570,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient if (this.tsServerLogFile) { this.info(`TSServer log file: ${this.tsServerLogFile}`); } - this.serviceExited(true); + this.serviceExited(!this.isRestarting); + this.isRestarting = false; }); this.reader = new Reader( From fda3ed38449fea27b97698ad0950c2870bf6afaa Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Tue, 13 Jun 2017 20:27:32 -0700 Subject: [PATCH 1790/2747] Fix terminalFocus context key after select all from cmd palette Fixes #28679 --- .../parts/terminal/electron-browser/terminalInstance.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index fea2eb3d2b092..b03ee074b1e03 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -342,6 +342,8 @@ export class TerminalInstance implements ITerminalInstance { } public selectAll(): void { + // Focus here to ensure the terminal context key is set + this._xterm.focus(); this._xterm.selectAll(); } From ce7982b6814d468bf785cbbedc2e6b19d1f08474 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 14 Jun 2017 07:48:47 +0200 Subject: [PATCH 1791/2747] introduce and use extfs.realpath --- src/vs/base/node/extfs.ts | 50 +++++++++++++++++-- src/vs/base/node/pfs.ts | 2 +- src/vs/base/test/node/extfs/extfs.test.ts | 40 +++++++++++++-- src/vs/code/node/paths.ts | 4 +- .../watcher/unix/chokidarWatcherService.ts | 4 +- 5 files changed, 87 insertions(+), 13 deletions(-) diff --git a/src/vs/base/node/extfs.ts b/src/vs/base/node/extfs.ts index ef8680f062a44..ecffac0980deb 100644 --- a/src/vs/base/node/extfs.ts +++ b/src/vs/base/node/extfs.ts @@ -374,13 +374,13 @@ export function writeFileAndFlush(path: string, data: string | NodeBuffer, optio /** * Copied from: https://github.com/Microsoft/vscode-node-debug/blob/master/src/node/pathUtilities.ts#L83 * - * Given an absolute, normalized, and existing file path 'realpath' returns the exact path that the file has on disk. + * Given an absolute, normalized, and existing file path 'realcase' returns the exact path that the file has on disk. * On a case insensitive file system, the returned path might differ from the original path by character casing. * On a case sensitive file system, the returned path will always be identical to the original path. * In case of errors, null is returned. But you cannot use this function to verify that a path exists. - * realpathSync does not handle '..' or '.' path segments and it does not take the locale into account. + * realcaseSync does not handle '..' or '.' path segments and it does not take the locale into account. */ -export function realpathSync(path: string): string { +export function realcaseSync(path: string): string { const dir = paths.dirname(path); if (path === dir) { // end recursion return path; @@ -392,7 +392,7 @@ export function realpathSync(path: string): string { const found = entries.filter(e => e.toLowerCase() === name); // use a case insensitive search if (found.length === 1) { // on a case sensitive filesystem we cannot determine here, whether the file exists or not, hence we need the 'file exists' precondition - const prefix = realpathSync(dir); // recurse + const prefix = realcaseSync(dir); // recurse if (prefix) { return paths.join(prefix, found[0]); } @@ -400,7 +400,7 @@ export function realpathSync(path: string): string { // must be a case sensitive $filesystem const ix = found.indexOf(name); if (ix >= 0) { // case sensitive - const prefix = realpathSync(dir); // recurse + const prefix = realcaseSync(dir); // recurse if (prefix) { return paths.join(prefix, found[ix]); } @@ -411,4 +411,44 @@ export function realpathSync(path: string): string { } return null; +} + +export function realpathSync(path: string): string { + try { + return fs.realpathSync(path); + } catch (error) { + + // We hit an error calling fs.realpathSync(). Since fs.realpathSync() is doing some path normalization + // we now do a similar normalization and then try again if we can access the path with read + // permissions at least. If that succeeds, we return that path. + // fs.realpath() is resolving symlinks and that can fail in certain cases. The workaround is + // to not resolve links but to simply see if the path is read accessible or not. + const normalizedPath = normalizePath(path); + fs.accessSync(normalizedPath, fs.constants.R_OK); // throws in case of an error + + return normalizedPath; + } +} + +export function realpath(path: string, callback: (error: Error, realpath: string) => void): void { + return fs.realpath(path, (error, realpath) => { + if (!error) { + return callback(null, realpath); + } + + // We hit an error calling fs.realpath(). Since fs.realpath() is doing some path normalization + // we now do a similar normalization and then try again if we can access the path with read + // permissions at least. If that succeeds, we return that path. + // fs.realpath() is resolving symlinks and that can fail in certain cases. The workaround is + // to not resolve links but to simply see if the path is read accessible or not. + const normalizedPath = normalizePath(path); + + return fs.access(normalizedPath, fs.constants.R_OK, error => { + return callback(error, normalizedPath); + }); + }); +} + +function normalizePath(path: string): string { + return strings.rtrim(paths.normalize(path), paths.sep); } \ No newline at end of file diff --git a/src/vs/base/node/pfs.ts b/src/vs/base/node/pfs.ts index 9ff23afdfa17b..3d8e180843975 100644 --- a/src/vs/base/node/pfs.ts +++ b/src/vs/base/node/pfs.ts @@ -72,7 +72,7 @@ export function rimraf(path: string): TPromise { } export function realpath(path: string): TPromise { - return nfcall(fs.realpath, path, null); + return nfcall(extfs.realpath, path); } export function stat(path: string): TPromise { diff --git a/src/vs/base/test/node/extfs/extfs.test.ts b/src/vs/base/test/node/extfs/extfs.test.ts index 1eda91cea9d4f..ca184afd097f5 100644 --- a/src/vs/base/test/node/extfs/extfs.test.ts +++ b/src/vs/base/test/node/extfs/extfs.test.ts @@ -203,7 +203,7 @@ suite('Extfs', () => { }); }); - test('realpath', (done) => { + test('realcase', (done) => { const id = uuid.generateUuid(); const parentDir = path.join(os.tmpdir(), 'vsctests', id); const newDir = path.join(parentDir, 'extfs', id); @@ -213,7 +213,7 @@ suite('Extfs', () => { // assume case insensitive file system if (process.platform === 'win32' || process.platform === 'darwin') { const upper = newDir.toUpperCase(); - const real = extfs.realpathSync(upper); + const real = extfs.realcaseSync(upper); if (real) { // can be null in case of permission errors assert.notEqual(real, upper); @@ -224,11 +224,45 @@ suite('Extfs', () => { // linux, unix, etc. -> assume case sensitive file system else { - const real = extfs.realpathSync(newDir); + const real = extfs.realcaseSync(newDir); assert.equal(real, newDir); } extfs.del(parentDir, os.tmpdir(), () => { }, done); }); }); + + test('realpath', (done) => { + const id = uuid.generateUuid(); + const parentDir = path.join(os.tmpdir(), 'vsctests', id); + const newDir = path.join(parentDir, 'extfs', id); + + extfs.mkdirp(newDir, 493, (error) => { + + extfs.realpath(newDir, (error, realpath) => { + assert.ok(realpath); + assert.ok(!error); + + extfs.del(parentDir, os.tmpdir(), () => { }, done); + }); + }); + }); + + test('realpathSync', (done) => { + const id = uuid.generateUuid(); + const parentDir = path.join(os.tmpdir(), 'vsctests', id); + const newDir = path.join(parentDir, 'extfs', id); + + extfs.mkdirp(newDir, 493, (error) => { + let realpath: string; + try { + realpath = extfs.realpathSync(newDir); + } catch (error) { + assert.ok(!error); + } + assert.ok(realpath); + + extfs.del(parentDir, os.tmpdir(), () => { }, done); + }); + }); }); \ No newline at end of file diff --git a/src/vs/code/node/paths.ts b/src/vs/code/node/paths.ts index 8ad9d19591031..1436632f935f9 100644 --- a/src/vs/code/node/paths.ts +++ b/src/vs/code/node/paths.ts @@ -5,7 +5,6 @@ 'use strict'; -import * as fs from 'original-fs'; import * as path from 'path'; import * as arrays from 'vs/base/common/arrays'; import * as strings from 'vs/base/common/strings'; @@ -13,6 +12,7 @@ import * as paths from 'vs/base/common/paths'; import * as platform from 'vs/base/common/platform'; import * as types from 'vs/base/common/types'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; +import { realpathSync } from "vs/base/node/extfs"; export function validatePaths(args: ParsedArgs): ParsedArgs { @@ -43,7 +43,7 @@ function doValidatePaths(args: string[], gotoLineMode?: boolean): string[] { let realPath: string; try { - realPath = fs.realpathSync(pathCandidate); + realPath = realpathSync(pathCandidate); } catch (error) { // in case of an error, assume the user wants to create this file // if the path is relative, we join it to the cwd diff --git a/src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts b/src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts index 63a17ea995d4e..3dc0a747c60fe 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts @@ -15,7 +15,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { FileChangeType } from 'vs/platform/files/common/files'; import { ThrottledDelayer } from 'vs/base/common/async'; import strings = require('vs/base/common/strings'); -import { realpathSync } from 'vs/base/node/extfs'; +import { realcaseSync } from 'vs/base/node/extfs'; import { isMacintosh } from 'vs/base/common/platform'; import watcher = require('vs/workbench/services/files/node/watcher/common'); import { IWatcherRequest, IWatcherService } from './watcher'; @@ -43,7 +43,7 @@ export class ChokidarWatcherService implements IWatcherService { // so we have to find the real casing of the path and do some path massaging to fix this // see https://github.com/paulmillr/chokidar/issues/418 const originalBasePath = request.basePath; - const realBasePath = isMacintosh ? (realpathSync(originalBasePath) || originalBasePath) : originalBasePath; + const realBasePath = isMacintosh ? (realcaseSync(originalBasePath) || originalBasePath) : originalBasePath; const realBasePathLength = realBasePath.length; const realBasePathDiffers = (originalBasePath !== realBasePath); From f601ee83a669d05426fb1aae781275a76caba95f Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 14 Jun 2017 09:39:57 +0200 Subject: [PATCH 1792/2747] debug: source should be regarded as not available if presentationHint === `deemphasize` --- src/vs/workbench/parts/debug/common/debugSource.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/common/debugSource.ts b/src/vs/workbench/parts/debug/common/debugSource.ts index 042c9e8d1b7ec..18d8149f874bd 100644 --- a/src/vs/workbench/parts/debug/common/debugSource.ts +++ b/src/vs/workbench/parts/debug/common/debugSource.ts @@ -34,7 +34,7 @@ export class Source { } public get available() { - return this.raw.name !== UNKNOWN_SOURCE_LABEL; + return this.raw.name !== UNKNOWN_SOURCE_LABEL && this.presentationHint !== 'deemphasize'; } public get inMemory() { From 6af7ef854e38c2b4a5ace7df267094afeef75778 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 14 Jun 2017 09:43:24 +0200 Subject: [PATCH 1793/2747] merge master --- .github/new_release.yml | 2 +- extensions/emmet/OSSREADME.json | 119 +----------------- .../themes/solarized-dark-color-theme.json | 32 ++--- .../themes/solarized-light-color-theme.json | 32 ++--- .../typescript/src/typescriptServiceClient.ts | 12 +- npm-shrinkwrap.json | 2 +- src/vs/base/node/extfs.ts | 50 +++++++- src/vs/base/node/pfs.ts | 2 +- src/vs/base/test/node/extfs/extfs.test.ts | 40 +++++- src/vs/code/electron-main/app.ts | 18 +++ src/vs/code/node/paths.ts | 4 +- src/vs/workbench/electron-browser/actions.ts | 23 +++- .../parts/debug/common/debugSource.ts | 2 +- .../electron-browser/terminalInstance.ts | 3 + .../watcher/unix/chokidarWatcherService.ts | 4 +- 15 files changed, 174 insertions(+), 171 deletions(-) diff --git a/.github/new_release.yml b/.github/new_release.yml index ae86432733305..dd0810063298b 100644 --- a/.github/new_release.yml +++ b/.github/new_release.yml @@ -1,5 +1,5 @@ { newReleaseLabel: 'new release', - newReleases: ['1.13'], + newReleases: ['1.13.1'], perform: true } \ No newline at end of file diff --git a/extensions/emmet/OSSREADME.json b/extensions/emmet/OSSREADME.json index 926f46f6fbdc1..09831f14f1704 100644 --- a/extensions/emmet/OSSREADME.json +++ b/extensions/emmet/OSSREADME.json @@ -1,118 +1,9 @@ [ { - "name": "@emmetio/expand-abbreviation", - "license": "MIT", - "version": "0.5.7", - "repositoryURL": "https://github.com/emmetio/expand-abbreviation", - "licenseDetail": [ - "MIT License", - "", - "Copyright (c) 2017 Emmet.io", - "", - "Permission is hereby granted, free of charge, to any person obtaining a copy", - "of this software and associated documentation files (the \"Software\"), to deal", - "in the Software without restriction, including without limitation the rights", - "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", - "copies of the Software, and to permit persons to whom the Software is", - "furnished to do so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in all", - "copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", - "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", - "SOFTWARE." - ] - }, - { - "name": "@emmetio/css-parser", - "license": "MIT", - "version": "0.3.0", - "repositoryURL": "https://github.com/emmetio/css-parser", - "licenseDetail": [ - "MIT License", - "", - "Copyright (c) 2017 Emmet.io", - "", - "Permission is hereby granted, free of charge, to any person obtaining a copy", - "of this software and associated documentation files (the \"Software\"), to deal", - "in the Software without restriction, including without limitation the rights", - "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", - "copies of the Software, and to permit persons to whom the Software is", - "furnished to do so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in all", - "copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", - "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", - "SOFTWARE." - ] - }, - { - "name": "@emmetio/extract-abbreviation", - "license": "MIT", - "version": "0.1.2", - "repositoryURL": "https://github.com/emmetio/extract-abbreviation", - "licenseDetail": [ - "MIT License", - "", - "Copyright (c) 2017 Emmet.io", - "", - "Permission is hereby granted, free of charge, to any person obtaining a copy", - "of this software and associated documentation files (the \"Software\"), to deal", - "in the Software without restriction, including without limitation the rights", - "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", - "copies of the Software, and to permit persons to whom the Software is", - "furnished to do so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in all", - "copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", - "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", - "SOFTWARE." - ] - }, - { - "name": "@emmetio/html-matcher", - "license": "MIT", - "version": "0.3.2", - "repositoryURL": "https://github.com/emmetio/html-matcher", - "licenseDetail": [ - "MIT License", - "", - "Copyright (c) 2017 Emmet.io", - "", - "Permission is hereby granted, free of charge, to any person obtaining a copy", - "of this software and associated documentation files (the \"Software\"), to deal", - "in the Software without restriction, including without limitation the rights", - "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell", - "copies of the Software, and to permit persons to whom the Software is", - "furnished to do so, subject to the following conditions:", - "", - "The above copyright notice and this permission notice shall be included in all", - "copies or substantial portions of the Software.", - "", - "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR", - "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,", - "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE", - "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER", - "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,", - "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE", - "SOFTWARE." - ] + "name": "browser-stdout", + "version": "1.3.0", + "isLicense": true, + "repositoryURL": "https://github.com/kumavis/browser-stdout", + "license": "ISC" } ] \ No newline at end of file diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index 04967aae331c3..f21572d1c1198 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -459,21 +459,21 @@ // Workbench: Terminal // Colors sourced from the official palette http://ethanschoonover.com/solarized - "terminal.ansiBlack": "#262626", - "terminal.ansiBlue": "#0087ff", - "terminal.ansiBrightBlack": "#1c1c1c", - "terminal.ansiBrightBlue": "#808080", - "terminal.ansiBrightCyan": "#808080", - "terminal.ansiBrightGreen": "#585858", - "terminal.ansiBrightMagenta": "#5f5faf", - "terminal.ansiBrightRed": "#d75f00", - "terminal.ansiBrightWhite": "#808080", - "terminal.ansiBrightYellow": "#626262", - "terminal.ansiCyan": "#00afaf", - "terminal.ansiGreen": "#5f8700", - "terminal.ansiMagenta": "#af005f", - "terminal.ansiRed": "#d70000", - "terminal.ansiWhite": "#808080", - "terminal.ansiYellow": "#af8700" + "terminal.ansiBlack": "#073642", + "terminal.ansiRed": "#dc322f", + "terminal.ansiGreen": "#859900", + "terminal.ansiYellow": "#b58900", + "terminal.ansiBlue": "#268bd2", + "terminal.ansiMagenta": "#d33682", + "terminal.ansiCyan": "#2aa198", + "terminal.ansiWhite": "#eee8d5", + "terminal.ansiBrightBlack": "#002b36", + "terminal.ansiBrightRed": "#cb4b16", + "terminal.ansiBrightGreen": "#586e75", + "terminal.ansiBrightYellow": "#657b83", + "terminal.ansiBrightBlue": "#839496", + "terminal.ansiBrightMagenta": "#6c71c4", + "terminal.ansiBrightCyan": "#93a1a1", + "terminal.ansiBrightWhite": "#fdf6e3" } } \ No newline at end of file diff --git a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json index ba74b7d038599..184144621204f 100644 --- a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -462,21 +462,21 @@ // Workbench: Terminal // Colors sourced from the official palette http://ethanschoonover.com/solarized - "terminal.ansiBlack": "#262626", - "terminal.ansiBlue": "#0087ff", - "terminal.ansiBrightBlack": "#1c1c1c", - "terminal.ansiBrightBlue": "#808080", - "terminal.ansiBrightCyan": "#808080", - "terminal.ansiBrightGreen": "#585858", - "terminal.ansiBrightMagenta": "#5f5faf", - "terminal.ansiBrightRed": "#d75f00", - "terminal.ansiBrightWhite": "#808080", - "terminal.ansiBrightYellow": "#626262", - "terminal.ansiCyan": "#00afaf", - "terminal.ansiGreen": "#5f8700", - "terminal.ansiMagenta": "#af005f", - "terminal.ansiRed": "#d70000", - "terminal.ansiWhite": "#808080", - "terminal.ansiYellow": "#af8700" + "terminal.ansiBlack": "#073642", + "terminal.ansiRed": "#dc322f", + "terminal.ansiGreen": "#859900", + "terminal.ansiYellow": "#b58900", + "terminal.ansiBlue": "#268bd2", + "terminal.ansiMagenta": "#d33682", + "terminal.ansiCyan": "#2aa198", + "terminal.ansiWhite": "#eee8d5", + "terminal.ansiBrightBlack": "#002b36", + "terminal.ansiBrightRed": "#cb4b16", + "terminal.ansiBrightGreen": "#586e75", + "terminal.ansiBrightYellow": "#657b83", + "terminal.ansiBrightBlue": "#839496", + "terminal.ansiBrightMagenta": "#6c71c4", + "terminal.ansiBrightCyan": "#93a1a1", + "terminal.ansiBrightWhite": "#fdf6e3" } } \ No newline at end of file diff --git a/extensions/typescript/src/typescriptServiceClient.ts b/extensions/typescript/src/typescriptServiceClient.ts index 212d7cb3b13c5..e2bcf481277b4 100644 --- a/extensions/typescript/src/typescriptServiceClient.ts +++ b/extensions/typescript/src/typescriptServiceClient.ts @@ -240,6 +240,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient private firstStart: number; private lastStart: number; private numberRestarts: number; + private isRestarting: boolean = false; + private cancellationPipeName: string | null = null; private requestQueue: RequestQueue; @@ -305,13 +307,14 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient public restartTsServer(): void { const start = () => { - this.servicePromise = this.startService(); + this.servicePromise = this.startService(true); return this.servicePromise; }; if (this.servicePromise) { this.servicePromise = this.servicePromise.then(cp => { if (cp) { + this.isRestarting = true; cp.kill(); } }).then(start); @@ -352,7 +355,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient return this._onReady.promise; } - public info(message: string, data?: any): void { + private info(message: string, data?: any): void { this.logger.info(message, data); } @@ -360,7 +363,7 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient this.logger.warn(message, data); } - public error(message: string, data?: any): void { + private error(message: string, data?: any): void { this.logger.error(message, data); } @@ -567,7 +570,8 @@ export default class TypeScriptServiceClient implements ITypescriptServiceClient if (this.tsServerLogFile) { this.info(`TSServer log file: ${this.tsServerLogFile}`); } - this.serviceExited(true); + this.serviceExited(!this.isRestarting); + this.isRestarting = false; }); this.reader = new Reader( diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 7b76d1c9edbf3..a1d1223cab244 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -442,7 +442,7 @@ "xterm": { "version": "2.7.0", "from": "Tyriar/xterm.js#vscode-release/1.14", - "resolved": "git+https://github.com/Tyriar/xterm.js.git#1d7007669dec1f60e5878aa102a36473d8cbd97f" + "resolved": "git+https://github.com/Tyriar/xterm.js.git#7d3640ad17fbf69f1a1c776b6d08969e1da32875" }, "yauzl": { "version": "2.3.1", diff --git a/src/vs/base/node/extfs.ts b/src/vs/base/node/extfs.ts index ef8680f062a44..ecffac0980deb 100644 --- a/src/vs/base/node/extfs.ts +++ b/src/vs/base/node/extfs.ts @@ -374,13 +374,13 @@ export function writeFileAndFlush(path: string, data: string | NodeBuffer, optio /** * Copied from: https://github.com/Microsoft/vscode-node-debug/blob/master/src/node/pathUtilities.ts#L83 * - * Given an absolute, normalized, and existing file path 'realpath' returns the exact path that the file has on disk. + * Given an absolute, normalized, and existing file path 'realcase' returns the exact path that the file has on disk. * On a case insensitive file system, the returned path might differ from the original path by character casing. * On a case sensitive file system, the returned path will always be identical to the original path. * In case of errors, null is returned. But you cannot use this function to verify that a path exists. - * realpathSync does not handle '..' or '.' path segments and it does not take the locale into account. + * realcaseSync does not handle '..' or '.' path segments and it does not take the locale into account. */ -export function realpathSync(path: string): string { +export function realcaseSync(path: string): string { const dir = paths.dirname(path); if (path === dir) { // end recursion return path; @@ -392,7 +392,7 @@ export function realpathSync(path: string): string { const found = entries.filter(e => e.toLowerCase() === name); // use a case insensitive search if (found.length === 1) { // on a case sensitive filesystem we cannot determine here, whether the file exists or not, hence we need the 'file exists' precondition - const prefix = realpathSync(dir); // recurse + const prefix = realcaseSync(dir); // recurse if (prefix) { return paths.join(prefix, found[0]); } @@ -400,7 +400,7 @@ export function realpathSync(path: string): string { // must be a case sensitive $filesystem const ix = found.indexOf(name); if (ix >= 0) { // case sensitive - const prefix = realpathSync(dir); // recurse + const prefix = realcaseSync(dir); // recurse if (prefix) { return paths.join(prefix, found[ix]); } @@ -411,4 +411,44 @@ export function realpathSync(path: string): string { } return null; +} + +export function realpathSync(path: string): string { + try { + return fs.realpathSync(path); + } catch (error) { + + // We hit an error calling fs.realpathSync(). Since fs.realpathSync() is doing some path normalization + // we now do a similar normalization and then try again if we can access the path with read + // permissions at least. If that succeeds, we return that path. + // fs.realpath() is resolving symlinks and that can fail in certain cases. The workaround is + // to not resolve links but to simply see if the path is read accessible or not. + const normalizedPath = normalizePath(path); + fs.accessSync(normalizedPath, fs.constants.R_OK); // throws in case of an error + + return normalizedPath; + } +} + +export function realpath(path: string, callback: (error: Error, realpath: string) => void): void { + return fs.realpath(path, (error, realpath) => { + if (!error) { + return callback(null, realpath); + } + + // We hit an error calling fs.realpath(). Since fs.realpath() is doing some path normalization + // we now do a similar normalization and then try again if we can access the path with read + // permissions at least. If that succeeds, we return that path. + // fs.realpath() is resolving symlinks and that can fail in certain cases. The workaround is + // to not resolve links but to simply see if the path is read accessible or not. + const normalizedPath = normalizePath(path); + + return fs.access(normalizedPath, fs.constants.R_OK, error => { + return callback(error, normalizedPath); + }); + }); +} + +function normalizePath(path: string): string { + return strings.rtrim(paths.normalize(path), paths.sep); } \ No newline at end of file diff --git a/src/vs/base/node/pfs.ts b/src/vs/base/node/pfs.ts index 9ff23afdfa17b..3d8e180843975 100644 --- a/src/vs/base/node/pfs.ts +++ b/src/vs/base/node/pfs.ts @@ -72,7 +72,7 @@ export function rimraf(path: string): TPromise { } export function realpath(path: string): TPromise { - return nfcall(fs.realpath, path, null); + return nfcall(extfs.realpath, path); } export function stat(path: string): TPromise { diff --git a/src/vs/base/test/node/extfs/extfs.test.ts b/src/vs/base/test/node/extfs/extfs.test.ts index 1eda91cea9d4f..ca184afd097f5 100644 --- a/src/vs/base/test/node/extfs/extfs.test.ts +++ b/src/vs/base/test/node/extfs/extfs.test.ts @@ -203,7 +203,7 @@ suite('Extfs', () => { }); }); - test('realpath', (done) => { + test('realcase', (done) => { const id = uuid.generateUuid(); const parentDir = path.join(os.tmpdir(), 'vsctests', id); const newDir = path.join(parentDir, 'extfs', id); @@ -213,7 +213,7 @@ suite('Extfs', () => { // assume case insensitive file system if (process.platform === 'win32' || process.platform === 'darwin') { const upper = newDir.toUpperCase(); - const real = extfs.realpathSync(upper); + const real = extfs.realcaseSync(upper); if (real) { // can be null in case of permission errors assert.notEqual(real, upper); @@ -224,11 +224,45 @@ suite('Extfs', () => { // linux, unix, etc. -> assume case sensitive file system else { - const real = extfs.realpathSync(newDir); + const real = extfs.realcaseSync(newDir); assert.equal(real, newDir); } extfs.del(parentDir, os.tmpdir(), () => { }, done); }); }); + + test('realpath', (done) => { + const id = uuid.generateUuid(); + const parentDir = path.join(os.tmpdir(), 'vsctests', id); + const newDir = path.join(parentDir, 'extfs', id); + + extfs.mkdirp(newDir, 493, (error) => { + + extfs.realpath(newDir, (error, realpath) => { + assert.ok(realpath); + assert.ok(!error); + + extfs.del(parentDir, os.tmpdir(), () => { }, done); + }); + }); + }); + + test('realpathSync', (done) => { + const id = uuid.generateUuid(); + const parentDir = path.join(os.tmpdir(), 'vsctests', id); + const newDir = path.join(parentDir, 'extfs', id); + + extfs.mkdirp(newDir, 493, (error) => { + let realpath: string; + try { + realpath = extfs.realpathSync(newDir); + } catch (error) { + assert.ok(!error); + } + assert.ok(realpath); + + extfs.del(parentDir, os.tmpdir(), () => { }, done); + }); + }); }); \ No newline at end of file diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 9d09792a65bf0..8effa87307f18 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -48,6 +48,7 @@ import { isUndefinedOrNull } from "vs/base/common/types"; import { CodeWindow } from "vs/code/electron-main/window"; import { isEqual, isParent } from "vs/platform/files/common/files"; import { KeyboardLayoutMonitor } from "vs/code/electron-main/keyboard"; +import URI from 'vs/base/common/uri'; export class CodeApplication { private toDispose: IDisposable[]; @@ -119,6 +120,23 @@ export class CodeApplication { } }); + const isValidWebviewSource = (source: string) => + !source || (source.toLowerCase() as any).startsWith(URI.file(this.environmentService.appRoot.toLowerCase()).toString()); + + app.on('web-contents-created', (event, contents) => { + contents.on('will-attach-webview', (event, webPreferences, params) => { + delete webPreferences.preload; + webPreferences.nodeIntegration = false; + + // Verify URLs being loaded + if (isValidWebviewSource(params.src) && isValidWebviewSource(webPreferences.preloadURL)) { + return; + } + // Otherwise prevent loading + event.preventDefault(); + }); + }); + let macOpenFiles: string[] = []; let runningTimeout: number = null; app.on('open-file', (event: Event, path: string) => { diff --git a/src/vs/code/node/paths.ts b/src/vs/code/node/paths.ts index 8ad9d19591031..1436632f935f9 100644 --- a/src/vs/code/node/paths.ts +++ b/src/vs/code/node/paths.ts @@ -5,7 +5,6 @@ 'use strict'; -import * as fs from 'original-fs'; import * as path from 'path'; import * as arrays from 'vs/base/common/arrays'; import * as strings from 'vs/base/common/strings'; @@ -13,6 +12,7 @@ import * as paths from 'vs/base/common/paths'; import * as platform from 'vs/base/common/platform'; import * as types from 'vs/base/common/types'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; +import { realpathSync } from "vs/base/node/extfs"; export function validatePaths(args: ParsedArgs): ParsedArgs { @@ -43,7 +43,7 @@ function doValidatePaths(args: string[], gotoLineMode?: boolean): string[] { let realPath: string; try { - realPath = fs.realpathSync(pathCandidate); + realPath = realpathSync(pathCandidate); } catch (error) { // in case of an error, assume the user wants to create this file // if the path is relative, we join it to the cwd diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index cad6f26bd2fba..ef63d8a7cf6c0 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -6,6 +6,7 @@ 'use strict'; import URI from 'vs/base/common/uri'; +import * as collections from 'vs/base/common/collections'; import { TPromise } from 'vs/base/common/winjs.base'; import { Action } from 'vs/base/common/actions'; import { IWindowIPCService } from 'vs/workbench/services/window/electron-browser/windowService'; @@ -832,21 +833,33 @@ Steps to Reproduce: } private generateExtensionTable(extensions: ILocalExtension[]): string { + const { nonThemes, themes } = collections.groupBy(extensions, ext => { + const manifestKeys = ext.manifest.contributes ? Object.keys(ext.manifest.contributes) : []; + const onlyTheme = !ext.manifest.activationEvents && manifestKeys.length === 1 && manifestKeys[0] === 'themes'; + return onlyTheme ? 'themes' : 'nonThemes'; + }); + + const themeExclusionStr = themes.length ? `\n(${themes.length} theme extensions excluded)` : ''; + extensions = nonThemes; + if (!extensions.length) { - return 'none'; + return 'none' + themeExclusionStr; } - let tableHeader = `|Extension|Author|Version| -|---|---|---|`; + let tableHeader = `Extension|Author (truncated)|Version +---|---|---`; const table = extensions.map(e => { - return `|${e.manifest.name}|${e.manifest.publisher}|${e.manifest.version}|`; + return `${e.manifest.name}|${e.manifest.publisher.substr(0, 3)}|${e.manifest.version}`; }).join('\n'); const extensionTable = ` -${tableHeader}\n${table}; +${tableHeader} +${table} +${themeExclusionStr} `; + // 2000 chars is browsers de-facto limit for URLs, 400 chars are allowed for other string parts of the issue URL // http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers if (encodeURIComponent(extensionTable).length > 1600) { diff --git a/src/vs/workbench/parts/debug/common/debugSource.ts b/src/vs/workbench/parts/debug/common/debugSource.ts index 042c9e8d1b7ec..18d8149f874bd 100644 --- a/src/vs/workbench/parts/debug/common/debugSource.ts +++ b/src/vs/workbench/parts/debug/common/debugSource.ts @@ -34,7 +34,7 @@ export class Source { } public get available() { - return this.raw.name !== UNKNOWN_SOURCE_LABEL; + return this.raw.name !== UNKNOWN_SOURCE_LABEL && this.presentationHint !== 'deemphasize'; } public get inMemory() { diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 44a6c047dffec..b03ee074b1e03 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -342,6 +342,8 @@ export class TerminalInstance implements ITerminalInstance { } public selectAll(): void { + // Focus here to ensure the terminal context key is set + this._xterm.focus(); this._xterm.selectAll(); } @@ -794,6 +796,7 @@ export class TerminalInstance implements ITerminalInstance { public setTitle(title: string): void { const didTitleChange = title !== this._title; + this._title = title; if (didTitleChange) { this._onTitleChanged.fire(title); } diff --git a/src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts b/src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts index 63a17ea995d4e..3dc0a747c60fe 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/unix/chokidarWatcherService.ts @@ -15,7 +15,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { FileChangeType } from 'vs/platform/files/common/files'; import { ThrottledDelayer } from 'vs/base/common/async'; import strings = require('vs/base/common/strings'); -import { realpathSync } from 'vs/base/node/extfs'; +import { realcaseSync } from 'vs/base/node/extfs'; import { isMacintosh } from 'vs/base/common/platform'; import watcher = require('vs/workbench/services/files/node/watcher/common'); import { IWatcherRequest, IWatcherService } from './watcher'; @@ -43,7 +43,7 @@ export class ChokidarWatcherService implements IWatcherService { // so we have to find the real casing of the path and do some path massaging to fix this // see https://github.com/paulmillr/chokidar/issues/418 const originalBasePath = request.basePath; - const realBasePath = isMacintosh ? (realpathSync(originalBasePath) || originalBasePath) : originalBasePath; + const realBasePath = isMacintosh ? (realcaseSync(originalBasePath) || originalBasePath) : originalBasePath; const realBasePathLength = realBasePath.length; const realBasePathDiffers = (originalBasePath !== realBasePath); From 07b50d906ee75ef48b9f9de47d20f4913d11e736 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 14 Jun 2017 09:43:48 +0200 Subject: [PATCH 1794/2747] explorerViewModel.test -> explorerModel.test --- .../browser/{explorerViewModel.test.ts => explorerModel.test.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/vs/workbench/parts/files/test/browser/{explorerViewModel.test.ts => explorerModel.test.ts} (100%) diff --git a/src/vs/workbench/parts/files/test/browser/explorerViewModel.test.ts b/src/vs/workbench/parts/files/test/browser/explorerModel.test.ts similarity index 100% rename from src/vs/workbench/parts/files/test/browser/explorerViewModel.test.ts rename to src/vs/workbench/parts/files/test/browser/explorerModel.test.ts From a3ea17e7d87686b35e22a7dc983fd8c21988e9d6 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Tue, 13 Jun 2017 16:02:53 +0200 Subject: [PATCH 1795/2747] Do not paint minimap unless a line inside it has changed --- .../browser/viewParts/minimap/minimap.ts | 41 ++++++++++++++++--- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index 676300944f101..1358242f40642 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -614,10 +614,41 @@ export class Minimap extends ViewPart { this._slider.setTop(layout.sliderTop); this._slider.setHeight(layout.sliderHeight); + this._lastRenderData = this.renderLines(layout); + } + + private renderLines(layout: MinimapLayout): RenderData { + const renderMinimap = this._options.renderMinimap; const startLineNumber = layout.startLineNumber; const endLineNumber = layout.endLineNumber; const minimapLineHeight = getMinimapLineHeight(renderMinimap); + // Check if nothing changed w.r.t. lines from last frame + if (this._lastRenderData) { + const _lastData = this._lastRenderData._get(); + const lastStartLineNumber = _lastData.rendLineNumberStart; + const lastLines = _lastData.lines; + const lastLinesLength = lastLines.length; + + let linesNeedPainting = false; + for (let lineNumber = startLineNumber; lineNumber <= endLineNumber; lineNumber++) { + const lastLineIndex = lineNumber - lastStartLineNumber; + const source_dy = (lastLineIndex >= 0 && lastLineIndex < lastLinesLength ? lastLines[lastLineIndex].dy : -1); + + if (source_dy === -1) { + linesNeedPainting = true; + break; + } + } + + if (!linesNeedPainting) { + // Nice!! Nothing changed from last frame + return new RenderData(layout, _lastData.imageData, _lastData.lines); + } + } + + // Oh well!! We need to repaint some lines... + const imageData = this._getBuffer(); // Render untouched lines by using last rendered data. @@ -656,16 +687,16 @@ export class Minimap extends ViewPart { dy += minimapLineHeight; } + // Finally, paint to the canvas + const ctx = this._canvas.domNode.getContext('2d'); + ctx.putImageData(imageData, 0, 0); + // Save rendered data for reuse on next frame if possible - this._lastRenderData = new RenderData( + return new RenderData( layout, imageData, renderedLines ); - - // Finally, paint to the canvas - const ctx = this._canvas.domNode.getContext('2d'); - ctx.putImageData(imageData, 0, 0); } private static _renderUntouchedLines( From 9f482b34502fded5b5c0df3af951b909192fb92a Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 14 Jun 2017 07:47:43 +0200 Subject: [PATCH 1796/2747] Hint GPU layers for editor sliders --- src/vs/base/browser/dom.ts | 5 +++++ src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts | 1 + src/vs/editor/browser/viewParts/minimap/minimap.ts | 1 + 3 files changed, 7 insertions(+) diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts index 228550b57afe7..2915bcb44bb07 100644 --- a/src/vs/base/browser/dom.ts +++ b/src/vs/base/browser/dom.ts @@ -1041,3 +1041,8 @@ export function domContentLoaded(): TPromise { } }); } + +export function hintGPULayer(target: HTMLElement): void { + // This is to hint browsers that this dom node is suited to live in its own layer (e.g. sliders, etc.) + (target.style).willChange = 'transform'; +} diff --git a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts index c7194cbc5c575..7a8743cb62a27 100644 --- a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts @@ -170,6 +170,7 @@ export abstract class AbstractScrollbar extends Widget { this.domNode.setTransform('translate3d(0px, 0px, 0px)'); } else { this.domNode.setTransform(''); + DomUtils.hintGPULayer(this.domNode.domNode); } this._renderDomNode(this._scrollbarState.getRectangleLargeSize(), this._scrollbarState.getRectangleSmallSize()); diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index 1358242f40642..70cb44e1523cb 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -413,6 +413,7 @@ export class Minimap extends ViewPart { this._slider = createFastDomNode(document.createElement('div')); this._slider.setPosition('absolute'); this._slider.setClassName('minimap-slider'); + dom.hintGPULayer(this._slider.domNode); this._domNode.appendChild(this._slider); this._tokensColorTracker = MinimapTokensColorTracker.getInstance(); From 10f05818b9342ede40900738b115aaa9b5e06f47 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 14 Jun 2017 10:08:06 +0200 Subject: [PATCH 1797/2747] Added smoke test step. --- build/tfs/darwin/smoketest.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build/tfs/darwin/smoketest.sh b/build/tfs/darwin/smoketest.sh index ae756d8ca3545..18da9dabf382b 100755 --- a/build/tfs/darwin/smoketest.sh +++ b/build/tfs/darwin/smoketest.sh @@ -24,4 +24,11 @@ step "Run unit tests" \ ./scripts/test.sh --build --reporter dot step "Run integration tests" \ - ./scripts/test-integration.sh \ No newline at end of file + ./scripts/test-integration.sh + +step "Run smoke test" \ + pushd test/smoke + npm install + npm run compile + node src/main.js --latest "$AGENT_BUILDDIRECTORY/VSCode-darwin/Visual Studio Code - Insiders.app/Contents/MacOS/Electron" + popd \ No newline at end of file From 723bc3b3a74b8fe528648bfd4b665045bef12da0 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 14 Jun 2017 10:14:46 +0200 Subject: [PATCH 1798/2747] fix some typescript@next compilation errors related to #28151 --- src/vs/workbench/api/node/extHost.api.impl.ts | 2 +- src/vs/workbench/api/node/extHostSCM.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index b450e6538e630..9f3ed92538c46 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -408,7 +408,7 @@ export function createApiFactory( onWillSaveTextDocument: (listener, thisArgs?, disposables?) => { return extHostDocumentSaveParticipant.onWillSaveTextDocumentEvent(listener, thisArgs, disposables); }, - onDidChangeConfiguration: (listener: () => any, thisArgs?: any, disposables?: extHostTypes.Disposable[]) => { + onDidChangeConfiguration: (listener: (_: any) => any, thisArgs?: any, disposables?: extHostTypes.Disposable[]) => { return extHostConfiguration.onDidChangeConfiguration(listener, thisArgs, disposables); }, getConfiguration: (section?: string): vscode.WorkspaceConfiguration => { diff --git a/src/vs/workbench/api/node/extHostSCM.ts b/src/vs/workbench/api/node/extHostSCM.ts index 9d40839b17791..8a87e5126c07f 100644 --- a/src/vs/workbench/api/node/extHostSCM.ts +++ b/src/vs/workbench/api/node/extHostSCM.ts @@ -316,14 +316,14 @@ export class ExtHostSCM { return sourceControl; } - $provideOriginalResource(sourceControlHandle: number, uri: URI): TPromise { + $provideOriginalResource(sourceControlHandle: number, uri: URI): TPromise { const sourceControl = this._sourceControls.get(sourceControlHandle); if (!sourceControl || !sourceControl.quickDiffProvider) { return TPromise.as(null); } - return asWinJsPromise(token => sourceControl.quickDiffProvider.provideOriginalResource(uri, token)); + return asWinJsPromise(token => URI.parse(sourceControl.quickDiffProvider.provideOriginalResource(uri, token).toString())); } $onActiveSourceControlChange(handle: number): TPromise { From b33113d484d2f06c5fc60d0045a8a3929399d105 Mon Sep 17 00:00:00 2001 From: Nick Snyder Date: Wed, 14 Jun 2017 01:26:31 -0700 Subject: [PATCH 1799/2747] Only update viewlet switcher if it has already been rendered (#28568) --- .../workbench/browser/parts/activitybar/activitybarPart.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts index 75f4d49aa7056..e24e7c1dc4a4d 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts @@ -293,6 +293,11 @@ export class ActivitybarPart extends Part implements IActivityBarService { } private updateViewletSwitcher() { + if (!this.viewletSwitcherBar) { + // We have not been rendered yet so there is nothing to update. + return; + } + let viewletsToShow = this.getPinnedViewlets(); // Always show the active viewlet even if it is marked to be hidden From a7d864df4cfe3e18e16dfd3d5d5d54d1eb4fbc17 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 14 Jun 2017 10:45:06 +0200 Subject: [PATCH 1800/2747] #28538 Introduce IWorkspace2 in IWorkspaceContextService --- .../browser/standalone/simpleServices.ts | 10 +++- src/vs/platform/workspace/common/workspace.ts | 34 ++++++++--- .../electron-browser/mainThreadWorkspace.ts | 2 +- .../configuration/node/configuration.ts | 60 ++++++++++++------- .../workbench/test/workbenchTestServices.ts | 14 +++-- 5 files changed, 82 insertions(+), 38 deletions(-) diff --git a/src/vs/editor/browser/standalone/simpleServices.ts b/src/vs/editor/browser/standalone/simpleServices.ts index e380ac9bd3921..c063ec34f7bbe 100644 --- a/src/vs/editor/browser/standalone/simpleServices.ts +++ b/src/vs/editor/browser/standalone/simpleServices.ts @@ -17,7 +17,7 @@ import { KeybindingResolver } from 'vs/platform/keybinding/common/keybindingReso import { IKeybindingEvent, KeybindingSource, IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding'; import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IConfirmation, IMessageService } from 'vs/platform/message/common/message'; -import { IWorkspaceContextService, Workspace, IWorkspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, Workspace, IWorkspace, IWorkspace2 } from 'vs/platform/workspace/common/workspace'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { ICodeEditor, IDiffEditor } from 'vs/editor/browser/editorBrowser'; import { Selection } from 'vs/editor/common/core/selection'; @@ -495,8 +495,8 @@ export class SimpleWorkspaceContextService implements IWorkspaceContextService { public _serviceBrand: any; - private readonly _onDidChangeFolders: Emitter = new Emitter(); - public readonly onDidChangeFolders: Event = this._onDidChangeFolders.event; + private readonly _onDidChangeWorkspaceRoots: Emitter = new Emitter(); + public readonly onDidChangeWorkspaceRoots: Event = this._onDidChangeWorkspaceRoots.event; private readonly folders: URI[]; @@ -512,6 +512,10 @@ export class SimpleWorkspaceContextService implements IWorkspaceContextService { return this.workspace; } + public getWorkspace2(): IWorkspace2 { + return this.workspace ? { id: `${this.workspace.uid}`, roots: [this.workspace.resource] } : void 0; + } + public hasWorkspace(): boolean { return !!this.workspace; } diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index a1ccdac3e62f3..8e1b08ed1437c 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -27,6 +27,17 @@ export interface IWorkspaceContextService { */ getWorkspace(): IWorkspace; + /** + * Provides access to the workspace object the platform is running with. This may be null if the workbench was opened + * without workspace (empty); + */ + getWorkspace2(): IWorkspace2; + + /** + * An event which fires on workspace roots change. + */ + onDidChangeWorkspaceRoots: Event; + /** * Returns iff the provided resource is inside the workspace or not. */ @@ -44,11 +55,6 @@ export interface IWorkspaceContextService { */ toResource: (workspaceRelativePath: string) => URI; - /** - * TODO@Ben multiroot - */ - getFolders(): URI[]; - onDidChangeFolders: Event; } export interface IWorkspace { @@ -72,6 +78,20 @@ export interface IWorkspace { name?: string; } +export interface IWorkspace2 { + + /** + * the unique identifier of the workspace. + */ + readonly id: string; + + /** + * Mutliple roots in this workspace. First entry is master and never changes. + */ + readonly roots: URI[]; + +} + export class Workspace implements IWorkspace { constructor(private _resource: URI, private _uid?: number, private _name?: string) { @@ -105,9 +125,9 @@ export class Workspace implements IWorkspace { return null; } - public toResource(workspaceRelativePath: string): URI { + public toResource(workspaceRelativePath: string, root?: URI): URI { if (typeof workspaceRelativePath === 'string') { - return URI.file(paths.join(this._resource.fsPath, workspaceRelativePath)); + return URI.file(paths.join(root ? root.fsPath : this._resource.fsPath, workspaceRelativePath)); } return null; diff --git a/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts index f7cd4fb7e91cd..f6fc31c91ef67 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts @@ -37,7 +37,7 @@ export class MainThreadWorkspace extends MainThreadWorkspaceShape { ) { super(); this._proxy = threadService.get(ExtHostContext.ExtHostWorkspace); - this._contextService.onDidChangeFolders(this._onDidChangeWorkspace, this, this._toDispose); + this._contextService.onDidChangeWorkspaceRoots(this._onDidChangeWorkspace, this, this._toDispose); } // --- workspace --- diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index 4f0baaf5ba0ff..f449677e86595 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -17,7 +17,7 @@ import { Schemas } from "vs/base/common/network"; import { RunOnceScheduler } from 'vs/base/common/async'; import { readFile } from 'vs/base/node/pfs'; import * as extfs from 'vs/base/node/extfs'; -import { IWorkspaceContextService, Workspace, IWorkspace } from "vs/platform/workspace/common/workspace"; +import { IWorkspaceContextService, IWorkspace2, Workspace as SingleRootWorkspace, IWorkspace } from "vs/platform/workspace/common/workspace"; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { FileChangeType, FileChangesEvent, isEqual } from 'vs/platform/files/common/files'; import { ConfigModel } from 'vs/platform/configuration/common/model'; @@ -44,14 +44,29 @@ interface IWorkspaceConfiguration { type IWorkspaceFoldersConfiguration = { [rootFolder: string]: { folders: string[]; } }; +class Workspace implements IWorkspace2 { + + constructor(readonly id: string, private _roots: URI[]) { + } + + get roots(): URI[] { + return this._roots; + } + + setRoots(roots: URI[]): void { + this._roots = roots; + } + +} + export class WorkspaceConfigurationService extends Disposable implements IWorkspaceContextService, IWorkspaceConfigurationService { private static RELOAD_CONFIGURATION_DELAY = 50; public _serviceBrand: any; - private readonly _onDidChangeFolders: Emitter = this._register(new Emitter()); - public readonly onDidChangeFolders: Event = this._onDidChangeFolders.event; + private readonly _onDidChangeWorkspaceRoots: Emitter = this._register(new Emitter()); + public readonly onDidChangeWorkspaceRoots: Event = this._onDidChangeWorkspaceRoots.event; private readonly _onDidUpdateConfiguration: Emitter = this._register(new Emitter()); public readonly onDidUpdateConfiguration: Event = this._onDidUpdateConfiguration.event; @@ -65,12 +80,12 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private workspaceFilePathToConfiguration: { [relativeWorkspacePath: string]: TPromise> }; private reloadConfigurationScheduler: RunOnceScheduler; - private folders: URI[]; + private readonly workspace: Workspace; - constructor(private environmentService: IEnvironmentService, private workspace?: Workspace, private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME) { + constructor(private environmentService: IEnvironmentService, private singleRootWorkspace?: SingleRootWorkspace, private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME) { super(); - this.folders = workspace ? [workspace.resource] : []; + this.workspace = singleRootWorkspace ? new Workspace(`${singleRootWorkspace.uid}`, [singleRootWorkspace.resource]) : null; this.workspaceFilePathToConfiguration = Object.create(null); this.cachedConfig = new ConfigModel(null); @@ -95,10 +110,11 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } // Resovled configured folders for workspace - let configuredFolders: URI[] = [this.workspace.resource]; + let [master] = this.workspace.roots; + let configuredFolders: URI[] = [master]; const config = this.getConfiguration('workspace'); if (config) { - const workspaceConfig = config[this.workspace.resource.toString()]; + const workspaceConfig = config[master.toString()]; if (workspaceConfig) { const additionalFolders = workspaceConfig.folders .map(f => URI.parse(f)) @@ -112,20 +128,20 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp configuredFolders = distinct(configuredFolders, r => r.toString()); // Find changes - const changed = !equals(this.folders, configuredFolders, (r1, r2) => r1.toString() === r2.toString()); + const changed = !equals(this.workspace.roots, configuredFolders, (r1, r2) => r1.toString() === r2.toString()); - this.folders = configuredFolders; + this.workspace.setRoots(configuredFolders); if (notify && changed) { - this._onDidChangeFolders.fire(configuredFolders); + this._onDidChangeWorkspaceRoots.fire(configuredFolders); } } - public getFolders(): URI[] { - return this.folders; + public getWorkspace(): IWorkspace { + return this.singleRootWorkspace; } - public getWorkspace(): IWorkspace { + public getWorkspace2(): IWorkspace2 { return this.workspace; } @@ -134,15 +150,15 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } public isInsideWorkspace(resource: URI): boolean { - return this.workspace ? this.workspace.isInsideWorkspace(resource) : false; + return this.workspace ? this.singleRootWorkspace.isInsideWorkspace(resource) : false; } public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { - return this.workspace ? this.workspace.toWorkspaceRelativePath(resource, toOSPath) : null; + return this.workspace ? this.singleRootWorkspace.toWorkspaceRelativePath(resource, toOSPath) : null; } public toResource(workspaceRelativePath: string): URI { - return this.workspace ? this.workspace.toResource(workspaceRelativePath) : null; + return this.workspace ? this.singleRootWorkspace.toResource(workspaceRelativePath) : null; } private onBaseConfigurationChanged(event: IConfigurationServiceEvent): void { @@ -276,7 +292,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp // once: when invoked for the first time we fetch json files that contribute settings if (!this.bulkFetchFromWorkspacePromise) { - this.bulkFetchFromWorkspacePromise = resolveStat(this.workspace.toResource(this.workspaceSettingsRootFolder)).then(stat => { + this.bulkFetchFromWorkspacePromise = resolveStat(this.toResource(this.workspaceSettingsRootFolder)).then(stat => { if (!stat.isDirectory) { return TPromise.as([]); } @@ -287,11 +303,11 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp return false; // only JSON files } - return this.isWorkspaceConfigurationFile(this.workspace.toWorkspaceRelativePath(stat.resource)); // only workspace config files + return this.isWorkspaceConfigurationFile(this.toWorkspaceRelativePath(stat.resource)); // only workspace config files }).map(stat => stat.resource)); }, err => [] /* never fail this call */) .then((contents: IContent[]) => { - contents.forEach(content => this.workspaceFilePathToConfiguration[this.workspace.toWorkspaceRelativePath(content.resource)] = TPromise.as(this.createConfigModel(content))); + contents.forEach(content => this.workspaceFilePathToConfiguration[this.toWorkspaceRelativePath(content.resource)] = TPromise.as(this.createConfigModel(content))); }, errors.onUnexpectedError); } @@ -317,7 +333,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp continue; // only JSON files or the actual settings folder } - const workspacePath = this.workspace.toWorkspaceRelativePath(resource); + const workspacePath = this.toWorkspaceRelativePath(resource); if (!workspacePath) { continue; // event is not inside workspace } @@ -353,7 +369,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } private createConfigModel(content: IContent): IConfigModel { - const path = this.workspace.toWorkspaceRelativePath(content.resource); + const path = this.toWorkspaceRelativePath(content.resource); if (path === WORKSPACE_CONFIG_DEFAULT_PATH) { return new WorkspaceSettingsConfigModel(content.value, content.resource.toString()); } else { diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index c280cd4c97935..dc3c013b40461 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -27,7 +27,7 @@ import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { IEditorInput, IEditorOptions, Position, Direction, IEditor, IResourceInput } from 'vs/platform/editor/common/editor'; import { IUntitledEditorService, UntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IMessageService, IConfirmation } from 'vs/platform/message/common/message'; -import { IWorkspace, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { IWorkspace, IWorkspaceContextService, IWorkspace2 } from 'vs/platform/workspace/common/workspace'; import { ILifecycleService, ShutdownEvent, ShutdownReason, StartupKind, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; import { EditorStacksModel } from 'vs/workbench/common/editor/editorStacksModel'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; @@ -66,16 +66,16 @@ export class TestContextService implements IWorkspaceContextService { private workspace: any; private options: any; - private _onDidChangeFolders: Emitter; + private _onDidChangeWorkspaceRoots: Emitter; constructor(workspace: any = TestWorkspace, options: any = null) { this.workspace = workspace; this.options = options || Object.create(null); - this._onDidChangeFolders = new Emitter(); + this._onDidChangeWorkspaceRoots = new Emitter(); } - public get onDidChangeFolders(): Event { - return this._onDidChangeFolders.event; + public get onDidChangeWorkspaceRoots(): Event { + return this._onDidChangeWorkspaceRoots.event; } public getFolders(): URI[] { @@ -90,6 +90,10 @@ export class TestContextService implements IWorkspaceContextService { return this.workspace; } + public getWorkspace2(): IWorkspace2 { + return this.workspace ? { id: `${this.workspace.uid}`, roots: [this.workspace.resource] } : void 0; + } + public setWorkspace(workspace: any): void { this.workspace = workspace; } From 8d2f5a1075d74d6023e6a8c2c2daa2fd41887a2c Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 14 Jun 2017 10:56:05 +0200 Subject: [PATCH 1801/2747] Refactor tfs linux builds to suit smoke test. --- build/tfs/linux/build.sh | 83 +--------------------------------- build/tfs/linux/release.sh | 86 ++++++++++++++++++++++++++++++++++++ build/tfs/linux/smoketest.sh | 35 +++++++++++++++ 3 files changed, 123 insertions(+), 81 deletions(-) create mode 100644 build/tfs/linux/release.sh create mode 100644 build/tfs/linux/smoketest.sh diff --git a/build/tfs/linux/build.sh b/build/tfs/linux/build.sh index 7e50e47c05d84..e6ba3dd80426e 100755 --- a/build/tfs/linux/build.sh +++ b/build/tfs/linux/build.sh @@ -32,84 +32,5 @@ step "Build minified" \ step "Run unit tests" \ ./scripts/test.sh --xvfb --build --reporter dot -step "Build Debian package" \ - npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-deb" - -step "Build RPM package" \ - npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-rpm" - -(cd $BUILD_SOURCESDIRECTORY/build/tfs/common && \ - step "Install build dependencies" \ - npm install --unsafe-perm) - -# Variables -PLATFORM_LINUX="linux-$ARCH" -PLATFORM_DEB="linux-deb-$ARCH" -PLATFORM_RPM="linux-rpm-$ARCH" -[[ "$ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64" -[[ "$ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64" -REPO="`pwd`" -ROOT="$REPO/.." -BUILDNAME="VSCode-$PLATFORM_LINUX" -BUILD="$ROOT/$BUILDNAME" -BUILD_VERSION="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/code-[a-z]*_//g' -e 's/\.deb$//g')" -[ -z "$VSCODE_QUALITY" ] && TARBALL_FILENAME="code-$BUILD_VERSION.tar.gz" || TARBALL_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.tar.gz" -TARBALL_PATH="$ROOT/$TARBALL_FILENAME" -PACKAGEJSON="$BUILD/resources/app/package.json" -VERSION=$(node -p "require(\"$PACKAGEJSON\").version") - -rm -rf $ROOT/code-*.tar.* -(cd $ROOT && \ - step "Create tar.gz archive" \ - tar -czvf $TARBALL_PATH $BUILDNAME) - -step "Publish tar.gz archive" \ - node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_LINUX archive-unsigned $TARBALL_FILENAME $VERSION true $TARBALL_PATH - -DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)" -DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME" - -step "Publish Debian package" \ - node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_DEB package $DEB_FILENAME $VERSION true $DEB_PATH - -RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)" -RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME" - -step "Publish RPM package" \ - node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_RPM package $RPM_FILENAME $VERSION true $RPM_PATH - -if [ -z "$VSCODE_QUALITY" ]; then - echo "VSCODE_QUALITY is not set, skipping repo package publish" -else - if [ "$BUILD_SOURCEBRANCH" = "master" ] || [ "$BUILD_SOURCEBRANCH" = "refs/heads/master" ]; then - if [[ $BUILD_QUEUEDBY = *"Project Collection Service Accounts"* || $BUILD_QUEUEDBY = *"Microsoft.VisualStudio.Services.TFS"* ]]; then - # Get necessary information - pushd $REPO && COMMIT_HASH=$(git rev-parse HEAD) && popd - PACKAGE_NAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/_.*//g')" - DEB_URL="https://az764295.vo.msecnd.net/$VSCODE_QUALITY/$COMMIT_HASH/$DEB_FILENAME" - RPM_URL="https://az764295.vo.msecnd.net/$VSCODE_QUALITY/$COMMIT_HASH/$RPM_FILENAME" - PACKAGE_VERSION="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/code-[a-z]*_//g' -e 's/\_.*$//g')" - # Write config files needed by API, use eval to force environment variable expansion - DIRNAME=$(dirname $(readlink -f $0)) - pushd $DIRNAME - # Submit to apt repo - if [ "$DEB_ARCH" = "amd64" ]; then - eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"username\": \"$LINUX_REPO_USERNAME\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > apt-config.json - eval echo '{ \"name\": \"$PACKAGE_NAME\", \"version\": \"$PACKAGE_VERSION\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"sourceUrl\": \"$DEB_URL\" }' > apt-addpkg.json - echo "Submitting apt-addpkg.json:" - cat apt-addpkg.json - - step "Publish to repositories" \ - ./repoapi_client.sh -config apt-config.json -addpkg apt-addpkg.json - fi - # Submit to yum repo (disabled as it's manual until signing is automated) - # eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"username\": \"$LINUX_REPO_USERNAME\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > yum-config.json - # eval echo '{ \"name\": \"$PACKAGE_NAME\", \"version\": \"$PACKAGE_VERSION\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"sourceUrl\": \"$RPM_URL\" }' > yum-addpkg.json - # echo "Submitting yum-addpkg.json:" - # cat yum-addpkg.json - # ./repoapi_client.sh -config yum-config.json -addpkg yum-addpkg.json - popd - echo "To check repo publish status run ./repoapi_client.sh -config config.json -check " - fi - fi -fi +step "Publish release" \ + ./build/tfs/linux/release.sh \ No newline at end of file diff --git a/build/tfs/linux/release.sh b/build/tfs/linux/release.sh new file mode 100644 index 0000000000000..500622a47d4fd --- /dev/null +++ b/build/tfs/linux/release.sh @@ -0,0 +1,86 @@ +#!/bin/sh + +. ./scripts/env.sh +. ./build/tfs/common/common.sh + +step "Build Debian package" \ + npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-deb" + +step "Build RPM package" \ + npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-rpm" + +(cd $BUILD_SOURCESDIRECTORY/build/tfs/common && \ + step "Install build dependencies" \ + npm install --unsafe-perm) + +# Variables +PLATFORM_LINUX="linux-$ARCH" +PLATFORM_DEB="linux-deb-$ARCH" +PLATFORM_RPM="linux-rpm-$ARCH" +[[ "$ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64" +[[ "$ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64" +REPO="`pwd`" +ROOT="$REPO/.." +BUILDNAME="VSCode-$PLATFORM_LINUX" +BUILD="$ROOT/$BUILDNAME" +BUILD_VERSION="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/code-[a-z]*_//g' -e 's/\.deb$//g')" +[ -z "$VSCODE_QUALITY" ] && TARBALL_FILENAME="code-$BUILD_VERSION.tar.gz" || TARBALL_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.tar.gz" +TARBALL_PATH="$ROOT/$TARBALL_FILENAME" +PACKAGEJSON="$BUILD/resources/app/package.json" +VERSION=$(node -p "require(\"$PACKAGEJSON\").version") + +rm -rf $ROOT/code-*.tar.* +(cd $ROOT && \ + step "Create tar.gz archive" \ + tar -czvf $TARBALL_PATH $BUILDNAME) + +step "Publish tar.gz archive" \ + node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_LINUX archive-unsigned $TARBALL_FILENAME $VERSION true $TARBALL_PATH + +DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)" +DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME" + +step "Publish Debian package" \ + node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_DEB package $DEB_FILENAME $VERSION true $DEB_PATH + +RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)" +RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME" + +step "Publish RPM package" \ + node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_RPM package $RPM_FILENAME $VERSION true $RPM_PATH + +if [ -z "$VSCODE_QUALITY" ]; then + echo "VSCODE_QUALITY is not set, skipping repo package publish" +else + if [ "$BUILD_SOURCEBRANCH" = "master" ] || [ "$BUILD_SOURCEBRANCH" = "refs/heads/master" ]; then + if [[ $BUILD_QUEUEDBY = *"Project Collection Service Accounts"* || $BUILD_QUEUEDBY = *"Microsoft.VisualStudio.Services.TFS"* ]]; then + # Get necessary information + pushd $REPO && COMMIT_HASH=$(git rev-parse HEAD) && popd + PACKAGE_NAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/_.*//g')" + DEB_URL="https://az764295.vo.msecnd.net/$VSCODE_QUALITY/$COMMIT_HASH/$DEB_FILENAME" + RPM_URL="https://az764295.vo.msecnd.net/$VSCODE_QUALITY/$COMMIT_HASH/$RPM_FILENAME" + PACKAGE_VERSION="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/code-[a-z]*_//g' -e 's/\_.*$//g')" + # Write config files needed by API, use eval to force environment variable expansion + DIRNAME=$(dirname $(readlink -f $0)) + pushd $DIRNAME + # Submit to apt repo + if [ "$DEB_ARCH" = "amd64" ]; then + eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"username\": \"$LINUX_REPO_USERNAME\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > apt-config.json + eval echo '{ \"name\": \"$PACKAGE_NAME\", \"version\": \"$PACKAGE_VERSION\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"sourceUrl\": \"$DEB_URL\" }' > apt-addpkg.json + echo "Submitting apt-addpkg.json:" + cat apt-addpkg.json + + step "Publish to repositories" \ + ./repoapi_client.sh -config apt-config.json -addpkg apt-addpkg.json + fi + # Submit to yum repo (disabled as it's manual until signing is automated) + # eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"username\": \"$LINUX_REPO_USERNAME\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > yum-config.json + # eval echo '{ \"name\": \"$PACKAGE_NAME\", \"version\": \"$PACKAGE_VERSION\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"sourceUrl\": \"$RPM_URL\" }' > yum-addpkg.json + # echo "Submitting yum-addpkg.json:" + # cat yum-addpkg.json + # ./repoapi_client.sh -config yum-config.json -addpkg yum-addpkg.json + popd + echo "To check repo publish status run ./repoapi_client.sh -config config.json -check " + fi + fi +fi diff --git a/build/tfs/linux/smoketest.sh b/build/tfs/linux/smoketest.sh new file mode 100644 index 0000000000000..5edac58188e84 --- /dev/null +++ b/build/tfs/linux/smoketest.sh @@ -0,0 +1,35 @@ +#!/bin/bash +set -e + +. ./scripts/env.sh +. ./build/tfs/common/common.sh + +export ARCH="$1" +VSO_PAT="$2" + +echo "machine monacotools.visualstudio.com password $VSO_PAT" > ~/.netrc + +step "Install dependencies" \ + npm install --arch=$ARCH --unsafe-perm + +step "Mix in repository from vscode-distro" \ + npm run gulp -- mixin + +step "Get Electron" \ + npm run gulp -- "electron-$ARCH" + +step "Install distro dependencies" \ + node build/tfs/common/installDistro.js --arch=$ARCH + +step "Build minified" \ + npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-min" + +step "Run unit tests" \ + ./scripts/test.sh --xvfb --build --reporter dot + +step "Run smoke test" \ + pushd test/smoke + npm install + npm run compile + node src/main.js --latest "$AGENT_BUILDDIRECTORY/VSCode-linux-ia32/code-insiders" + popd \ No newline at end of file From fd094e3b3043862c4ff3bc6ad9118cae49631856 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 14 Jun 2017 10:57:50 +0200 Subject: [PATCH 1802/2747] Added necessary mixin password arg. --- build/tfs/linux/smoketest.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/tfs/linux/smoketest.sh b/build/tfs/linux/smoketest.sh index 5edac58188e84..aff1074d3731d 100644 --- a/build/tfs/linux/smoketest.sh +++ b/build/tfs/linux/smoketest.sh @@ -5,7 +5,8 @@ set -e . ./build/tfs/common/common.sh export ARCH="$1" -VSO_PAT="$2" +export VSCODE_MIXIN_PASSWORD="$2" +VSO_PAT="$3" echo "machine monacotools.visualstudio.com password $VSO_PAT" > ~/.netrc From 40e9bf650ea9b39bf720f7ad17ada96b6b3718f5 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 14 Jun 2017 11:10:46 +0200 Subject: [PATCH 1803/2747] Added smoke test build script for Windows. --- build/tfs/win32/smoketest.ps1 | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 build/tfs/win32/smoketest.ps1 diff --git a/build/tfs/win32/smoketest.ps1 b/build/tfs/win32/smoketest.ps1 new file mode 100644 index 0000000000000..7658bbbd86630 --- /dev/null +++ b/build/tfs/win32/smoketest.ps1 @@ -0,0 +1,54 @@ +Param( + [string]$arch, + [string]$mixinPassword, + [string]$vsoPAT +) + +. .\scripts\env.ps1 +. .\build\tfs\win32\lib.ps1 + +# Create a _netrc file to download distro dependencies +# In order to get _netrc to work, we need a HOME variable setup +$env:HOME=$env:USERPROFILE +"machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII + +# Set the right architecture +$env:npm_config_arch="$arch" + +step "Install dependencies" { + exec { & npm install } +} + +$env:VSCODE_MIXIN_PASSWORD = $mixinPassword +step "Mix in repository from vscode-distro" { + exec { & npm run gulp -- mixin } +} + +step "Get Electron" { + exec { & npm run gulp -- "electron-$global:arch" } +} + +step "Install distro dependencies" { + exec { & node build\tfs\common\installDistro.js } +} + +step "Build minified" { + exec { & npm run gulp -- --max_old_space_size=4096 "vscode-win32-$global:arch-min" } +} + +step "Run unit tests" { + exec { & .\scripts\test.bat --build --reporter dot } +} + +# step "Run integration tests" { +# exec { & .\scripts\test-integration.bat } +# } + +step "Run smoke test" { + exec { & Push-Location test\smoke } + exec { & npm install; npm run compile } + exec { & node src/main.js --latest "$AGENT_BUILDDIRECTORY\VSCode-win32-$arch\Code - Insiders.exe" } + exec { & Pop-Location } +} + +done \ No newline at end of file From 340ef7fac2294f7bc6873c8270ce04422dcce9e6 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 14 Jun 2017 11:16:44 +0200 Subject: [PATCH 1804/2747] chmod +x --- build/tfs/linux/release.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 build/tfs/linux/release.sh diff --git a/build/tfs/linux/release.sh b/build/tfs/linux/release.sh old mode 100644 new mode 100755 From 181c346a4fe5c99a8510a8a1fed57489ee18a859 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 14 Jun 2017 11:40:41 +0200 Subject: [PATCH 1805/2747] Updated win32 smoketest variable references. --- build/tfs/win32/smoketest.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tfs/win32/smoketest.ps1 b/build/tfs/win32/smoketest.ps1 index 7658bbbd86630..8a3a2dcfcb8a8 100644 --- a/build/tfs/win32/smoketest.ps1 +++ b/build/tfs/win32/smoketest.ps1 @@ -47,7 +47,7 @@ step "Run unit tests" { step "Run smoke test" { exec { & Push-Location test\smoke } exec { & npm install; npm run compile } - exec { & node src/main.js --latest "$AGENT_BUILDDIRECTORY\VSCode-win32-$arch\Code - Insiders.exe" } + exec { & node src/main.js --latest "$env:AGENT_BUILDDIRECTORY\VSCode-win32-$global:arch\Code - Insiders.exe" } exec { & Pop-Location } } From cae242f7145a5584bb8b8579f70e38168e1bb7c5 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 14 Jun 2017 12:00:39 +0200 Subject: [PATCH 1806/2747] fix linux build? --- build/tfs/linux/release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/tfs/linux/release.sh b/build/tfs/linux/release.sh index 500622a47d4fd..40d68aee73fc1 100755 --- a/build/tfs/linux/release.sh +++ b/build/tfs/linux/release.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash . ./scripts/env.sh . ./build/tfs/common/common.sh @@ -32,7 +32,7 @@ VERSION=$(node -p "require(\"$PACKAGEJSON\").version") rm -rf $ROOT/code-*.tar.* (cd $ROOT && \ step "Create tar.gz archive" \ - tar -czvf $TARBALL_PATH $BUILDNAME) + tar -czf $TARBALL_PATH $BUILDNAME) step "Publish tar.gz archive" \ node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_LINUX archive-unsigned $TARBALL_FILENAME $VERSION true $TARBALL_PATH From f8eb2fa3b85da6f1949887c757d916ebaa8e3094 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 14 Jun 2017 12:21:16 +0200 Subject: [PATCH 1807/2747] adopt IWorkspace2, implement proper workspaceContains, #28526 --- .../electron-browser/mainThreadWorkspace.ts | 4 ++-- src/vs/workbench/api/node/extHost.api.impl.ts | 2 +- src/vs/workbench/api/node/extHost.protocol.ts | 10 ++++++--- .../api/node/extHostExtensionService.ts | 13 ++++++------ src/vs/workbench/api/node/extHostWorkspace.ts | 19 +++++++++-------- .../electron-browser/extensionHost.ts | 4 ++-- src/vs/workbench/node/extensionHostMain.ts | 21 ++++++++++++------- .../configuration/node/configuration.ts | 19 +++++++---------- .../api/extHostWorkspace.test.ts | 6 +++--- 9 files changed, 52 insertions(+), 46 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts index f6fc31c91ef67..1cde185a17de0 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts @@ -42,8 +42,8 @@ export class MainThreadWorkspace extends MainThreadWorkspaceShape { // --- workspace --- - private _onDidChangeWorkspace(folders: URI[]): void { - this._proxy.$acceptWorkspaceData(folders); + private _onDidChangeWorkspace(): void { + this._proxy.$acceptWorkspaceData(this._contextService.getWorkspace2()); } // --- search --- diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 9f3ed92538c46..a77a4b4e1ca3d 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -91,7 +91,7 @@ export function createApiFactory( const extHostTerminalService = col.define(ExtHostContext.ExtHostTerminalService).set(new ExtHostTerminalService(threadService)); const extHostSCM = col.define(ExtHostContext.ExtHostSCM).set(new ExtHostSCM(threadService, extHostCommands)); const extHostTask = col.define(ExtHostContext.ExtHostTask).set(new ExtHostTask(threadService)); - const extHostWorkspace = col.define(ExtHostContext.ExtHostWorkspace).set(new ExtHostWorkspace(threadService, initData.workspace && [initData.workspace.resource])); + const extHostWorkspace = col.define(ExtHostContext.ExtHostWorkspace).set(new ExtHostWorkspace(threadService, initData.workspace)); col.define(ExtHostContext.ExtHostExtensionService).set(extensionService); col.finish(false, threadService); diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 393e50579ff2f..c7f432d81bbbc 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -22,7 +22,6 @@ import { IExtensionDescription } from 'vs/platform/extensions/common/extensions' import { StatusbarAlignment as MainThreadStatusBarAlignment } from 'vs/platform/statusbar/common/statusbar'; import { ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry'; import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; -import { IWorkspace } from 'vs/platform/workspace/common/workspace'; import { IProgressOptions, IProgressStep } from 'vs/platform/progress/common/progress'; import * as editorCommon from 'vs/editor/common/editorCommon'; @@ -57,10 +56,15 @@ export interface IEnvironment { extensionTestsPath: string; } +export interface IWorkspaceData { + id: string; + roots: URI[]; +} + export interface IInitData { parentPid: number; environment: IEnvironment; - workspace: IWorkspace; + workspace: IWorkspaceData; extensions: IExtensionDescription[]; configuration: IWorkspaceConfigurationValues; telemetryInfo: ITelemetryInfo; @@ -405,7 +409,7 @@ export abstract class ExtHostTreeViewsShape { } export abstract class ExtHostWorkspaceShape { - $acceptWorkspaceData(folders: URI[]): void { throw ni(); } + $acceptWorkspaceData(workspace: IWorkspaceData): void { throw ni(); } } export abstract class ExtHostExtensionServiceShape { diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index aeb68c62edad1..67acd239b0269 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -15,8 +15,7 @@ import { ExtHostStorage } from 'vs/workbench/api/node/extHostStorage'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { createApiFactory, initializeExtensionApi } from 'vs/workbench/api/node/extHost.api.impl'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { IWorkspace } from 'vs/platform/workspace/common/workspace'; -import { MainContext, MainProcessExtensionServiceShape, IEnvironment, IInitData } from './extHost.protocol'; +import { MainContext, MainProcessExtensionServiceShape, IWorkspaceData, IEnvironment, IInitData } from './extHost.protocol'; import { createHash } from 'crypto'; const hasOwnProperty = Object.hasOwnProperty; @@ -103,13 +102,13 @@ class ExtensionMemento implements IExtensionMemento { class ExtensionStoragePath { - private readonly _workspace: IWorkspace; + private readonly _workspace: IWorkspaceData; private readonly _environment: IEnvironment; private readonly _ready: TPromise; private _value: string; - constructor(workspace: IWorkspace, environment: IEnvironment) { + constructor(workspace: IWorkspaceData, environment: IEnvironment) { this._workspace = workspace; this._environment = environment; this._ready = this._getOrCreateWorkspaceStoragePath().then(value => this._value = value); @@ -130,10 +129,10 @@ class ExtensionStoragePath { if (!this._workspace) { return TPromise.as(undefined); } - + // TODO@joh what to do with multiple roots? const storageName = createHash('md5') - .update(this._workspace.resource.fsPath) - .update(this._workspace.uid ? this._workspace.uid.toString() : '') + .update(this._workspace.roots[0].fsPath) + .update(this._workspace.id || '') .digest('hex'); const storagePath = join(this._environment.appSettingsHome, 'workspaceStorage', storageName); diff --git a/src/vs/workbench/api/node/extHostWorkspace.ts b/src/vs/workbench/api/node/extHostWorkspace.ts index 7ec394f69139a..dff559112b7d1 100644 --- a/src/vs/workbench/api/node/extHostWorkspace.ts +++ b/src/vs/workbench/api/node/extHostWorkspace.ts @@ -12,7 +12,7 @@ import { IThreadService } from 'vs/workbench/services/thread/common/threadServic import { IResourceEdit } from 'vs/editor/common/services/bulkEdit'; import { TPromise } from 'vs/base/common/winjs.base'; import { fromRange, EndOfLine } from 'vs/workbench/api/node/extHostTypeConverters'; -import { ExtHostWorkspaceShape, MainContext, MainThreadWorkspaceShape } from './extHost.protocol'; +import { IWorkspaceData, ExtHostWorkspaceShape, MainContext, MainThreadWorkspaceShape } from './extHost.protocol'; import * as vscode from 'vscode'; export class ExtHostWorkspace extends ExtHostWorkspaceShape { @@ -20,18 +20,19 @@ export class ExtHostWorkspace extends ExtHostWorkspaceShape { private static _requestIdPool = 0; private readonly _proxy: MainThreadWorkspaceShape; - private _workspaceFolders: URI[]; + private _workspace: IWorkspaceData; - constructor(threadService: IThreadService, folders: URI[]) { + constructor(threadService: IThreadService, workspace: IWorkspaceData) { super(); this._proxy = threadService.get(MainContext.MainThreadWorkspace); - this._workspaceFolders = folders; + this._workspace = workspace; } // --- workspace --- getPath(): string { - return isFalsyOrEmpty(this._workspaceFolders) ? undefined : this._workspaceFolders[0].fsPath; + // TODO@Joh handle roots.length > 1 case + return this._workspace ? this._workspace.roots[0].fsPath : undefined; } getRelativePath(pathOrUri: string | vscode.Uri): string { @@ -47,11 +48,11 @@ export class ExtHostWorkspace extends ExtHostWorkspaceShape { return path; } - if (isFalsyOrEmpty(this._workspaceFolders)) { + if (!this._workspace || isFalsyOrEmpty(this._workspace.roots)) { return normalize(path); } - for (const { fsPath } of this._workspaceFolders) { + for (const { fsPath } of this._workspace.roots) { let result = relative(fsPath, path); if (!result || result.indexOf('..') === 0) { continue; @@ -62,9 +63,9 @@ export class ExtHostWorkspace extends ExtHostWorkspaceShape { return normalize(path); } - $acceptWorkspaceData(workspaceFolders: URI[]): void { + $acceptWorkspaceData(workspace: IWorkspaceData): void { //TODO@joh equality-check, emit event etc. - this._workspaceFolders = workspaceFolders; + this._workspace = workspace; } // --- search --- diff --git a/src/vs/workbench/electron-browser/extensionHost.ts b/src/vs/workbench/electron-browser/extensionHost.ts index 6b99c054bb769..fdf5531f05fa0 100644 --- a/src/vs/workbench/electron-browser/extensionHost.ts +++ b/src/vs/workbench/electron-browser/extensionHost.ts @@ -29,7 +29,7 @@ import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; import { generateRandomPipeName, Protocol } from 'vs/base/parts/ipc/node/ipc.net'; import { createServer, Server } from 'net'; import Event, { Emitter } from 'vs/base/common/event'; -import { IInitData } from 'vs/workbench/api/node/extHost.protocol'; +import { IInitData, IWorkspaceData } from 'vs/workbench/api/node/extHost.protocol'; import { MainProcessExtensionService } from 'vs/workbench/api/electron-browser/mainThreadExtensionService'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; import { ICrashReporterService } from 'vs/workbench/services/crashReporter/common/crashReporterService'; @@ -259,7 +259,7 @@ export class ExtensionHostProcessWorker { enableProposedApiForAll: !this.environmentService.isBuilt || (!!this.environmentService.extensionDevelopmentPath && product.nameLong.indexOf('Insiders') >= 0), enableProposedApiFor: this.environmentService.args['enable-proposed-api'] || [] }, - workspace: this.contextService.getWorkspace(), + workspace: this.contextService.getWorkspace2(), extensions: extensionDescriptions, configuration: this.configurationService.values(), telemetryInfo diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index 7f4aa8b0094d8..5c361eb9b0664 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -15,9 +15,8 @@ import { ExtHostThreadService } from 'vs/workbench/services/thread/common/extHos import { QueryType, ISearchQuery } from 'vs/platform/search/common/search'; import { DiskSearch } from 'vs/workbench/services/search/node/searchService'; import { RemoteTelemetryService } from 'vs/workbench/api/node/extHostTelemetry'; -import { IInitData, IEnvironment, MainContext } from 'vs/workbench/api/node/extHost.protocol'; +import { IInitData, IEnvironment, IWorkspaceData, MainContext } from 'vs/workbench/api/node/extHost.protocol'; import * as errors from 'vs/base/common/errors'; -import { IWorkspace } from "vs/platform/workspace/common/workspace"; const nativeExit = process.exit.bind(process); process.exit = function () { @@ -36,7 +35,7 @@ export class ExtensionHostMain { private _isTerminating: boolean = false; private _diskSearch: DiskSearch; - private _workspace: IWorkspace; + private _workspace: IWorkspaceData; private _environment: IEnvironment; private _extensionService: ExtHostExtensionService; @@ -101,11 +100,10 @@ export class ExtensionHostMain { } private handleWorkspaceContainsEagerExtensions(): TPromise { - if (!this._workspace || !this._workspace.resource) { + if (!this._workspace || this._workspace.roots.length === 0) { return TPromise.as(null); } - const folderPath = this._workspace.resource.fsPath; const desiredFilesMap: { [filename: string]: boolean; @@ -135,7 +133,7 @@ export class ExtensionHostMain { } const query: ISearchQuery = { - folderResources: [this._workspace.resource], + folderResources: this._workspace.roots, type: QueryType.File, maxResults: 1, includePattern: { [p]: true } @@ -143,7 +141,16 @@ export class ExtensionHostMain { return this._diskSearch.search(query).then(result => result.results.length ? p : undefined); } else { - return pfs.exists(join(folderPath, p)).then(exists => exists ? p : undefined); + // find exact path + return new TPromise(async resolve => { + for (const { fsPath } of this._workspace.roots) { + if (await pfs.exists(join(fsPath, p))) { + resolve(p); + return; + } + } + resolve(undefined); + }); } }); diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index f449677e86595..318ffc68d598f 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -46,17 +46,12 @@ type IWorkspaceFoldersConfiguration = { [rootFolder: string]: { folders: string[ class Workspace implements IWorkspace2 { - constructor(readonly id: string, private _roots: URI[]) { + constructor( + public readonly id: string, + public roots: URI[] + ) { + // } - - get roots(): URI[] { - return this._roots; - } - - setRoots(roots: URI[]): void { - this._roots = roots; - } - } export class WorkspaceConfigurationService extends Disposable implements IWorkspaceContextService, IWorkspaceConfigurationService { @@ -130,7 +125,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp // Find changes const changed = !equals(this.workspace.roots, configuredFolders, (r1, r2) => r1.toString() === r2.toString()); - this.workspace.setRoots(configuredFolders); + this.workspace.roots = configuredFolders; if (notify && changed) { this._onDidChangeWorkspaceRoots.fire(configuredFolders); @@ -426,4 +421,4 @@ function resolveStat(resource: URI): TPromise { } }); }); -} \ No newline at end of file +} diff --git a/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts b/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts index 36430d52357bc..c66640c2bd7eb 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts @@ -14,7 +14,7 @@ suite('ExtHostWorkspace', function () { test('asRelativePath', function () { - const ws = new ExtHostWorkspace(new TestThreadService(), [URI.file('/Coding/Applications/NewsWoWBot')]); + const ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', roots: [URI.file('/Coding/Applications/NewsWoWBot')] }); assert.equal(ws.getRelativePath('/Coding/Applications/NewsWoWBot/bernd/das/brot'), 'bernd/das/brot'); assert.equal(ws.getRelativePath('/Apps/DartPubCache/hosted/pub.dartlang.org/convert-2.0.1/lib/src/hex.dart'), @@ -28,7 +28,7 @@ suite('ExtHostWorkspace', function () { test('asRelativePath, same paths, #11402', function () { const root = '/home/aeschli/workspaces/samples/docker'; const input = '/home/aeschli/workspaces/samples/docker'; - const ws = new ExtHostWorkspace(new TestThreadService(), [URI.file(root)]); + const ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', roots: [URI.file(root)] }); assert.equal(ws.getRelativePath(input), input); @@ -43,7 +43,7 @@ suite('ExtHostWorkspace', function () { }); test('asRelativePath, multiple folders', function () { - const ws = new ExtHostWorkspace(new TestThreadService(), [URI.file('/Coding/One'), URI.file('/Coding/Two')]); + const ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', roots: [URI.file('/Coding/One'), URI.file('/Coding/Two')] }); assert.equal(ws.getRelativePath('/Coding/One/file.txt'), 'file.txt'); assert.equal(ws.getRelativePath('/Coding/Two/files/out.txt'), 'files/out.txt'); assert.equal(ws.getRelativePath('/Coding/Two2/files/out.txt'), '/Coding/Two2/files/out.txt'); From 5000246497bb4f0266299335b40ac4b49d77e237 Mon Sep 17 00:00:00 2001 From: Cristian Hosu Date: Wed, 14 Jun 2017 13:30:26 +0300 Subject: [PATCH 1808/2747] #22622 - removed ScollbarVisibility reference --- src/vs/workbench/parts/debug/electron-browser/debugHover.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index 58f65f88f016b..946fe4db9390e 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -22,7 +22,6 @@ import { Expression } from 'vs/workbench/parts/debug/common/debugModel'; import { VariablesRenderer, renderExpressionValue, VariablesDataSource } from 'vs/workbench/parts/debug/electron-browser/debugViewer'; import { IListService } from 'vs/platform/list/browser/listService'; import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; -import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import { attachListStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { editorHoverBackground, editorHoverBorder } from 'vs/platform/theme/common/colorRegistry'; @@ -63,7 +62,7 @@ export class DebugHoverWidget implements IContentWidget { this.valueContainer = $('.value'); this.valueContainer.tabIndex = 0; this.valueContainer.setAttribute('role', 'tooltip'); - this.scrollbar = new DomScrollableElement(this.valueContainer, { canUseTranslate3d: false, horizontal: ScrollbarVisibility.Auto, vertical: ScrollbarVisibility.Auto }); + this.scrollbar = new DomScrollableElement(this.valueContainer, { canUseTranslate3d: false }); this.domNode.appendChild(this.scrollbar.getDomNode()); this.toDispose.push(this.scrollbar); From 6b0b56e34552224f90a47d2cecc888c282061bfc Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 14 Jun 2017 12:50:21 +0200 Subject: [PATCH 1809/2747] first read basename, then full filepath --- .../contrib/referenceSearch/browser/referencesModel.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesModel.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesModel.ts index 4ddacbe921633..06821595584e1 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesModel.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesModel.ts @@ -66,7 +66,7 @@ export class OneReference { public getAriaMessage(): string { return localize( 'aria.oneReference', "symbol in {0} on line {1} at column {2}", - this.uri.fsPath, this.range.startLineNumber, this.range.startColumn + basename(this.uri.fsPath), this.range.startLineNumber, this.range.startColumn ); } } @@ -154,9 +154,9 @@ export class FileReferences implements IDisposable { getAriaMessage(): string { const len = this.children.length; if (len === 1) { - return localize('aria.fileReferences.1', "1 symbol in {0}", this.uri.fsPath); + return localize('aria.fileReferences.1', "1 symbol in {0}, full path {1}", basename(this.uri.fsPath), this.uri.fsPath); } else { - return localize('aria.fileReferences.N', "{0} symbols in {1}", len, this.uri.fsPath); + return localize('aria.fileReferences.N', "{0} symbols in {1}, full path {2}", len, basename(this.uri.fsPath), this.uri.fsPath); } } From 5b6f2fa6013f4be14e9d620205d28ea54c33d650 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 14 Jun 2017 14:06:42 +0200 Subject: [PATCH 1810/2747] Added explanation where to look for test data. --- test/smoke/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/smoke/README.md b/test/smoke/README.md index 947fb43969a39..1c9df539b8e40 100644 --- a/test/smoke/README.md +++ b/test/smoke/README.md @@ -11,6 +11,9 @@ If you want to include 'Data Migration' area tests use `npm test -- --latest pa * `./areas/` folder contains a `.ts` file per each area of the document. E.g. `'Search'` area goes under `'search.ts'`. Every area file contains a list of methods with the name that represents the action that can be performed in the corresponding test. This reduces the amount of test suite code and means that if the UI changes, the fix need only be applied in one place. The name of the method reflects the action the tester would do if he would perform the test manually. See [Selenium Page Objects Wiki](https://github.com/SeleniumHQ/selenium/wiki/PageObjects) and [Selenium Bot Style Tests Wiki](https://github.com/SeleniumHQ/selenium/wiki/Bot-Style-Tests) for a good explanation of the implementation. Every smoke test area contains methods that are used in a bot-style approach in `main.ts`. * `./spectron/` wraps the Spectron, with WebDriverIO API wrapped in `client.ts` and instance of Spectron Application is wrapped in `application.ts`. +* `./test_data/` folder contains temporary data used by smoke test (cloned express repository, temporary user-data-dir/extensions-dir). +* `./test_data/screenshots` has action screenshots captured by a smoke test when performing actions during runtime. Screenshots are split in folders per each test. + # Adding new area To contribute a new smoke test area, add `${area}.ts` file under `./areas/`. All related tests to the area should go to the alike named file under `./tests/${area}.ts`. This has to follow the bot-style approach described in the links mentioned above. Methods should be calling WebDriverIO API through `SpectronClient` class. If there is no existing WebDriverIO method, add it to the class. From a2107d103a77307c3317a320cfbb94f6ec7a76f7 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 14 Jun 2017 15:12:23 +0200 Subject: [PATCH 1811/2747] remove aria.alert, bring back aria-provider, set isAccessible #17245 --- .../referenceSearch/browser/referencesWidget.ts | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index a0603d8f948b2..955ce894d6026 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -6,7 +6,6 @@ import 'vs/css!./referencesWidget'; import * as nls from 'vs/nls'; -import { alert } from 'vs/base/browser/ui/aria/aria'; import { onUnexpectedError } from 'vs/base/common/errors'; import { getPathLabel } from 'vs/base/common/labels'; import Event, { Emitter } from 'vs/base/common/event'; @@ -589,7 +588,7 @@ export class ReferenceWidget extends PeekViewWidget { private _instantiationService: IInstantiationService, private _environmentService: IEnvironmentService ) { - super(editor, { showFrame: false, showArrow: true, isResizeable: true }); + super(editor, { showFrame: false, showArrow: true, isResizeable: true, isAccessible: true }); this._applyTheme(_themeService.getTheme()); this._callOnDispose.push(_themeService.onThemeChange(this._applyTheme.bind(this))); @@ -690,8 +689,7 @@ export class ReferenceWidget extends PeekViewWidget { dataSource: this._instantiationService.createInstance(DataSource), renderer: this._instantiationService.createInstance(Renderer, this.editor), controller: new Controller(), - // TODO@{Joh,Ben} make this work with the embedded tree - // accessibilityProvider: new AriaProvider() + accessibilityProvider: new AriaProvider() }; var options = { @@ -763,17 +761,6 @@ export class ReferenceWidget extends PeekViewWidget { // listen on model changes this._disposeOnNewModel.push(this._model.onDidChangeReferenceRange(reference => this._tree.refresh(reference))); - // listen on selection and focus - this._disposeOnNewModel.push(this._tree.addListener(Controller.Events.FOCUSED, (element) => { - if (element instanceof OneReference) { - this._revealReference(element); - this._onDidSelectReference.fire({ element, kind: 'show', source: 'tree' }); - } - if (element instanceof OneReference || element instanceof FileReferences) { - const msg = element.getAriaMessage(); - alert(msg); - } - })); this._disposeOnNewModel.push(this._tree.addListener(Controller.Events.SELECTED, (element: any) => { if (element instanceof OneReference) { this._onDidSelectReference.fire({ element, kind: 'goto', source: 'tree' }); From 09e22b8542070f492ffd87add72a7e8a64b56ed0 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 14 Jun 2017 15:16:25 +0200 Subject: [PATCH 1812/2747] fixes #27367 --- extensions/git/src/commands.ts | 6 +++--- extensions/git/src/git.ts | 8 ++------ extensions/git/src/model.ts | 21 ++++++++++++++++----- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index eed354dd8a4f1..127544276ab13 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -774,7 +774,7 @@ export class CommandCenter { return; } - await this.model.pull(true); + await this.model.pullWithRebase(); } @command('git.push') @@ -812,7 +812,7 @@ export class CommandCenter { return; } - this.model.push(pick.label, branchName); + this.model.pushTo(pick.label, branchName); } @command('git.sync') @@ -860,7 +860,7 @@ export class CommandCenter { return; } - await this.model.push(choice, branchName, { setUpstream: true }); + await this.model.pushTo(choice, branchName, true); } @command('git.showOutput') diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 9ef482def9318..ad023efdf6ea7 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -21,10 +21,6 @@ export interface IGit { version: string; } -export interface PushOptions { - setUpstream?: boolean; -} - export interface IFileStatus { x: string; y: string; @@ -762,10 +758,10 @@ export class Repository { } } - async push(remote?: string, name?: string, options?: PushOptions): Promise { + async push(remote?: string, name?: string, setUpstream: boolean = false): Promise { const args = ['push']; - if (options && options.setUpstream) { + if (setUpstream) { args.push('-u'); } diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index aba4a4251d621..56479c7121c93 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -6,7 +6,7 @@ 'use strict'; import { Uri, Command, EventEmitter, Event, SourceControlResourceState, SourceControlResourceDecorations, Disposable, ProgressLocation, window, workspace } from 'vscode'; -import { Git, Repository, Ref, Branch, Remote, PushOptions, Commit, GitErrorCodes } from './git'; +import { Git, Repository, Ref, Branch, Remote, Commit, GitErrorCodes } from './git'; import { anyEvent, eventToPromise, filterEvent, EmptyDisposable, combinedDisposable, dispose } from './util'; import { memoize, throttle, debounce } from './decorators'; import * as path from 'path'; @@ -479,12 +479,23 @@ export class Model implements Disposable { } } - async pull(rebase?: boolean): Promise { - await this.run(Operation.Pull, () => this.repository.pull(rebase)); + @throttle + async pull(): Promise { + await this.run(Operation.Pull, () => this.repository.pull()); + } + + @throttle + async pullWithRebase(): Promise { + await this.run(Operation.Pull, () => this.repository.pull(true)); + } + + @throttle + async push(): Promise { + await this.run(Operation.Push, () => this.repository.push()); } - async push(remote?: string, name?: string, options?: PushOptions): Promise { - await this.run(Operation.Push, () => this.repository.push(remote, name, options)); + async pushTo(remote?: string, name?: string, setUpstream: boolean = false): Promise { + await this.run(Operation.Push, () => this.repository.push(remote, name, setUpstream)); } @throttle From e7f7f423a5fe3680fba6bed5f5e2b78d99037f4b Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 14 Jun 2017 15:07:17 +0200 Subject: [PATCH 1813/2747] Border color not working. Fixes #28377 --- src/vs/editor/browser/services/codeEditorServiceImpl.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index eaf57c98d5dea..f36e32b73fa3c 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -344,9 +344,7 @@ class DecorationCSSRules { } let cssTextArr: string[] = []; this.collectCSSText(opts, ['backgroundColor'], cssTextArr); - if (this.collectCSSText(opts, ['outline', 'outlineColor'], cssTextArr)) { - this.collectCSSText(opts, ['outlineStyle', 'outlineWidth'], cssTextArr); - } + this.collectCSSText(opts, ['outline', 'outlineColor', 'outlineStyle', 'outlineWidth'], cssTextArr); this.collectBorderSettingsCSSText(opts, cssTextArr); return cssTextArr.join(''); } @@ -418,8 +416,7 @@ class DecorationCSSRules { } private collectBorderSettingsCSSText(opts: any, cssTextArr: string[]): boolean { - if (this.collectCSSText(opts, ['border', 'borderColor'], cssTextArr)) { - this.collectCSSText(opts, ['borderRadius', 'borderSpacing', 'borderStyle', 'borderWidth'], cssTextArr); + if (this.collectCSSText(opts, ['border', 'borderColor', 'borderRadius', 'borderSpacing', 'borderStyle', 'borderWidth'], cssTextArr)) { cssTextArr.push(strings.format('box-sizing: border-box;')); return true; } @@ -444,7 +441,7 @@ class DecorationCSSRules { if (color) { return color.toString(); } - return void 0; + return 'transparent'; } return value; } From 555900bee9058d9aca528ffefb1fb5ea70890434 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 14 Jun 2017 15:48:52 +0200 Subject: [PATCH 1814/2747] tfs: call xvfb-run in linux smoke test --- build/tfs/linux/smoketest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tfs/linux/smoketest.sh b/build/tfs/linux/smoketest.sh index aff1074d3731d..70ceb3e9d7ac5 100644 --- a/build/tfs/linux/smoketest.sh +++ b/build/tfs/linux/smoketest.sh @@ -32,5 +32,5 @@ step "Run smoke test" \ pushd test/smoke npm install npm run compile - node src/main.js --latest "$AGENT_BUILDDIRECTORY/VSCode-linux-ia32/code-insiders" + xvfb-run -a node src/main.js --latest "$AGENT_BUILDDIRECTORY/VSCode-linux-ia32/code-insiders" popd \ No newline at end of file From 3bf3f69a08209bedac44dffdc05a720e16e7fefd Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 14 Jun 2017 15:53:13 +0200 Subject: [PATCH 1815/2747] multiroot - get rid of workspace.uid (only used for local storage) --- .../browser/standalone/simpleServices.ts | 5 +- .../platform/storage/common/storageService.ts | 15 +-- .../storage/test/storageService.test.ts | 7 +- src/vs/platform/workspace/common/workspace.ts | 15 +-- .../workspace/test/common/testWorkspace.ts | 1 - src/vs/workbench/electron-browser/main.ts | 125 +++++++++++------- src/vs/workbench/electron-browser/shell.ts | 22 +-- .../configuration/node/configuration.ts | 2 +- .../workbench/test/workbenchTestServices.ts | 5 +- 9 files changed, 101 insertions(+), 96 deletions(-) diff --git a/src/vs/editor/browser/standalone/simpleServices.ts b/src/vs/editor/browser/standalone/simpleServices.ts index c063ec34f7bbe..7d6d9ca4fa26d 100644 --- a/src/vs/editor/browser/standalone/simpleServices.ts +++ b/src/vs/editor/browser/standalone/simpleServices.ts @@ -37,6 +37,7 @@ import { ResolvedKeybinding, Keybinding, createKeybinding, SimpleKeybinding } fr import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKeybindingItem'; import { OS } from 'vs/base/common/platform'; import { IRange } from 'vs/editor/common/core/range'; +import { generateUuid } from "vs/base/common/uuid"; export class SimpleEditor implements IEditor { @@ -499,9 +500,11 @@ export class SimpleWorkspaceContextService implements IWorkspaceContextService { public readonly onDidChangeWorkspaceRoots: Event = this._onDidChangeWorkspaceRoots.event; private readonly folders: URI[]; + private readonly id: string; constructor(private workspace?: Workspace) { this.folders = workspace ? [workspace.resource] : []; + this.id = generateUuid(); } public getFolders(): URI[] { @@ -513,7 +516,7 @@ export class SimpleWorkspaceContextService implements IWorkspaceContextService { } public getWorkspace2(): IWorkspace2 { - return this.workspace ? { id: `${this.workspace.uid}`, roots: [this.workspace.resource] } : void 0; + return this.workspace ? { id: `${this.id}`, roots: [this.workspace.resource] } : void 0; } public hasWorkspace(): boolean { diff --git a/src/vs/platform/storage/common/storageService.ts b/src/vs/platform/storage/common/storageService.ts index 82952ee5dbdf0..83049e9736f7f 100644 --- a/src/vs/platform/storage/common/storageService.ts +++ b/src/vs/platform/storage/common/storageService.ts @@ -23,7 +23,6 @@ export interface IStorage { export interface IWorkspaceStorageIdentifier { resource: URI; uid?: number; - name?: string; } export class StorageService implements IStorageService { @@ -55,7 +54,7 @@ export class StorageService implements IStorageService { // Make sure to delete all workspace storage if the workspace has been recreated meanwhile // which is only possible if a UID property is provided that we can check on if (workspaceIdentifier && types.isNumber(workspaceIdentifier.uid)) { - this.cleanupWorkspaceScope(workspaceIdentifier.uid, workspaceIdentifier.name); + this.cleanupWorkspaceScope(workspaceIdentifier.uid); } } @@ -76,13 +75,13 @@ export class StorageService implements IStorageService { return `${strings.rtrim(workspaceIdStr, '/')}/`; } - private cleanupWorkspaceScope(workspaceId: number, workspaceName: string): void { + private cleanupWorkspaceScope(workspaceUid: number): void { // Get stored identifier from storage const id = this.getInteger(StorageService.WORKSPACE_IDENTIFIER, StorageScope.WORKSPACE); // If identifier differs, assume the workspace got recreated and thus clean all storage for this workspace - if (types.isNumber(id) && workspaceId !== id) { + if (types.isNumber(id) && workspaceUid !== id) { const keyPrefix = this.toStorageKey('', StorageScope.WORKSPACE); const toDelete: string[] = []; const length = this.workspaceStorage.length; @@ -99,10 +98,6 @@ export class StorageService implements IStorageService { } } - if (toDelete.length > 0) { - console.warn('Clearing previous version of local storage for workspace ', workspaceName); - } - // Run the delete toDelete.forEach((keyToDelete) => { this.workspaceStorage.removeItem(keyToDelete); @@ -110,8 +105,8 @@ export class StorageService implements IStorageService { } // Store workspace identifier now - if (workspaceId !== id) { - this.store(StorageService.WORKSPACE_IDENTIFIER, workspaceId, StorageScope.WORKSPACE); + if (workspaceUid !== id) { + this.store(StorageService.WORKSPACE_IDENTIFIER, workspaceUid, StorageScope.WORKSPACE); } } diff --git a/src/vs/platform/storage/test/storageService.test.ts b/src/vs/platform/storage/test/storageService.test.ts index 2be5dff0a16f5..2978c54f13428 100644 --- a/src/vs/platform/storage/test/storageService.test.ts +++ b/src/vs/platform/storage/test/storageService.test.ts @@ -77,7 +77,9 @@ suite('Workbench StorageSevice', () => { test('StorageSevice cleans up when workspace changes', () => { let storageImpl = new InMemoryLocalStorage(); - let s = new StorageService(storageImpl, null, contextService.getWorkspace()); + let ws = contextService.getWorkspace(); + ws.uid = new Date().getTime(); + let s = new StorageService(storageImpl, null, ws); s.store('key1', 'foobar'); s.store('key2', 'something'); @@ -93,7 +95,8 @@ suite('Workbench StorageSevice', () => { assert.strictEqual(s.get('wkey1', StorageScope.WORKSPACE), 'foo'); assert.strictEqual(s.get('wkey2', StorageScope.WORKSPACE), 'foo2'); - let ws: any = new Workspace(TestWorkspace.resource, new Date().getTime() + 100, TestWorkspace.name); + ws = new Workspace(TestWorkspace.resource, TestWorkspace.name); + ws.uid = new Date().getTime() + 100; s = new StorageService(storageImpl, null, ws); assert.strictEqual(s.get('key1', StorageScope.GLOBAL), 'foobar'); diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index 8e1b08ed1437c..b133e6aea4e51 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -65,13 +65,6 @@ export interface IWorkspace { */ resource: URI; - /** - * the unique identifier of the workspace. if the workspace is deleted and recreated - * the identifier also changes. this makes the uid more unique compared to the id which - * is just derived from the workspace name. - */ - uid?: number; - /** * the name of the workspace */ @@ -94,17 +87,13 @@ export interface IWorkspace2 { export class Workspace implements IWorkspace { - constructor(private _resource: URI, private _uid?: number, private _name?: string) { + constructor(private _resource: URI, private _name?: string) { } public get resource(): URI { return this._resource; } - public get uid(): number { - return this._uid; - } - public get name(): string { return this._name; } @@ -134,6 +123,6 @@ export class Workspace implements IWorkspace { } public toJSON() { - return { resource: this._resource, uid: this._uid, name: this._name }; + return { resource: this._resource, name: this._name }; } } \ No newline at end of file diff --git a/src/vs/platform/workspace/test/common/testWorkspace.ts b/src/vs/platform/workspace/test/common/testWorkspace.ts index 18926c9330dac..4400e7544ea18 100644 --- a/src/vs/platform/workspace/test/common/testWorkspace.ts +++ b/src/vs/platform/workspace/test/common/testWorkspace.ts @@ -8,6 +8,5 @@ import URI from 'vs/base/common/uri'; export const TestWorkspace = new Workspace( URI.file('C:\\testWorkspace'), - Date.now(), 'Test Workspace' ); diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index cf9c5e45db704..cf8ae033c6d8a 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -28,6 +28,9 @@ import { IInitData } from 'vs/workbench/services/timer/common/timerService'; import { TimerService } from 'vs/workbench/services/timer/node/timerService'; import { KeyboardMapperFactory } from "vs/workbench/services/keybinding/electron-browser/keybindingService"; import { IWindowConfiguration, IPath } from "vs/platform/windows/common/windows"; +import { IStorageService } from "vs/platform/storage/common/storage"; +import { IEnvironmentService } from "vs/platform/environment/common/environment"; +import { StorageService, inMemoryLocalStorageInstance, IWorkspaceStorageIdentifier } from "vs/platform/storage/common/storageService"; import { webFrame } from 'electron'; @@ -62,12 +65,8 @@ export function startup(configuration: IWindowConfiguration): TPromise { filesToDiff }; - // Resolve workspace - return getWorkspace(configuration.workspacePath).then(workspace => { - - // Open workbench - return openWorkbench(configuration, workspace, shellOptions); - }); + // Open workbench + return openWorkbench(configuration, shellOptions); } function toInputs(paths: IPath[], isUntitledFile?: boolean): IResourceInput[] { @@ -95,12 +94,53 @@ function toInputs(paths: IPath[], isUntitledFile?: boolean): IResourceInput[] { }); } -function getWorkspace(workspacePath: string): TPromise { - if (!workspacePath) { +function openWorkbench(configuration: IWindowConfiguration, options: IOptions): TPromise { + return getWorkspace(configuration).then(workspace => { + const environmentService = new EnvironmentService(configuration, configuration.execPath); + const workspaceConfigurationService = new WorkspaceConfigurationService(environmentService, workspace); + const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !workspaceConfigurationService.hasWorkspace()); + + return createStorageService(configuration, environmentService).then(storageService => { + + // Since the configuration service is one of the core services that is used in so many places, we initialize it + // right before startup of the workbench shell to have its data ready for consumers + return workspaceConfigurationService.initialize().then(() => { + timerService.beforeDOMContentLoaded = Date.now(); + + return domContentLoaded().then(() => { + timerService.afterDOMContentLoaded = Date.now(); + + // Open Shell + timerService.beforeWorkbenchOpen = Date.now(); + const shell = new WorkbenchShell(document.body, { + contextService: workspaceConfigurationService, + configurationService: workspaceConfigurationService, + environmentService, + timerService, + storageService + }, configuration, options); + shell.open(); + + // Inform user about loading issues from the loader + (self).require.config({ + onError: (err: any) => { + if (err.errorCode === 'load') { + shell.onUnexpectedError(loaderError(err)); + } + } + }); + }); + }); + }); + }); +} + +function getWorkspace(configuration: IWindowConfiguration): TPromise { + if (!configuration.workspacePath) { return TPromise.as(null); } - return realpath(workspacePath).then(realWorkspacePath => { + return realpath(configuration.workspacePath).then(realWorkspacePath => { // for some weird reason, node adds a trailing slash to UNC paths // we never ever want trailing slashes as our workspace path unless @@ -110,16 +150,13 @@ function getWorkspace(workspacePath: string): TPromise { realWorkspacePath = strings.rtrim(realWorkspacePath, paths.nativeSep); } + // update config + configuration.workspacePath = realWorkspacePath; + const workspaceResource = uri.file(realWorkspacePath); const folderName = path.basename(realWorkspacePath) || realWorkspacePath; - return stat(realWorkspacePath).then(folderStat => { - return new Workspace( - workspaceResource, - platform.isLinux ? folderStat.ino : folderStat.birthtime.getTime(), - folderName // On Linux, birthtime is ctime, so we cannot use it! We use the ino instead! - ); - }); + return new Workspace(workspaceResource, folderName); }, error => { errors.onUnexpectedError(error); @@ -127,38 +164,30 @@ function getWorkspace(workspacePath: string): TPromise { }); } -function openWorkbench(configuration: IWindowConfiguration, workspace: Workspace, options: IOptions): TPromise { - const environmentService = new EnvironmentService(configuration, configuration.execPath); - const workspaceConfigurationService = new WorkspaceConfigurationService(environmentService, workspace); - const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !workspaceConfigurationService.hasWorkspace()); - - // Since the configuration service is one of the core services that is used in so many places, we initialize it - // right before startup of the workbench shell to have its data ready for consumers - return workspaceConfigurationService.initialize().then(() => { - timerService.beforeDOMContentLoaded = Date.now(); - - return domContentLoaded().then(() => { - timerService.afterDOMContentLoaded = Date.now(); - - // Open Shell - timerService.beforeWorkbenchOpen = Date.now(); - const shell = new WorkbenchShell(document.body, { - contextService: workspaceConfigurationService, - configurationService: workspaceConfigurationService, - environmentService, - timerService - }, configuration, options); - shell.open(); - - // Inform user about loading issues from the loader - (self).require.config({ - onError: (err: any) => { - if (err.errorCode === 'load') { - shell.onUnexpectedError(loaderError(err)); - } - } - }); - }); +function createStorageService(configuration: IWindowConfiguration, environmentService: IEnvironmentService): TPromise { + let workspaceStatPromise: TPromise = TPromise.as(null); + if (configuration.workspacePath) { + workspaceStatPromise = stat(configuration.workspacePath); + } + + return workspaceStatPromise.then(stat => { + let id: IWorkspaceStorageIdentifier; + if (stat) { + id = { resource: uri.file(configuration.workspacePath), uid: platform.isLinux ? stat.ino : stat.birthtime.getTime() }; + } else if (configuration.backupPath) { + // if we do not have a workspace open, we need to find another identifier for the window to store + // workspace UI state. if we have a backup path in the configuration we can use that because this + // will be a unique identifier per window that is stable between restarts as long as there are + // dirty files in the workspace. + // We use basename() to produce a short identifier, we do not need the full path. We use a custom + // scheme so that we can later distinguish these identifiers from the workspace one. + id = { resource: uri.from({ path: path.basename(configuration.backupPath), scheme: 'empty' }) }; + } + + const disableStorage = !!environmentService.extensionTestsPath; // never keep any state when running extension tests! + const storage = disableStorage ? inMemoryLocalStorageInstance : window.localStorage; + + return new StorageService(storage, storage, id); }); } diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 141b3285c0a6d..015cc5f7bbdfd 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -21,7 +21,6 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import pkg from 'vs/platform/node/package'; import { ContextViewService } from 'vs/platform/contextview/browser/contextViewService'; import { Workbench, IWorkbenchStartedInfo } from 'vs/workbench/electron-browser/workbench'; -import { StorageService, inMemoryLocalStorageInstance } from 'vs/platform/storage/common/storageService'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { NullTelemetryService, configurationTelemetry, loadExperiments, lifecycleTelemetry } from 'vs/platform/telemetry/common/telemetryUtils'; import { ITelemetryAppenderChannel, TelemetryAppenderClient } from 'vs/platform/telemetry/common/telemetryIpc'; @@ -89,8 +88,6 @@ import { IURLService } from 'vs/platform/url/common/url'; import { ExtensionHostProcessWorker } from 'vs/workbench/electron-browser/extensionHost'; import { ITimerService } from 'vs/workbench/services/timer/common/timerService'; import { remote, ipcRenderer as ipc } from 'electron'; -import URI from "vs/base/common/uri"; -import { basename } from "path"; import { ITextMateService } from 'vs/editor/node/textMate/textMateService'; import { MainProcessTextMateSyntax } from 'vs/editor/electron-browser/textMate/TMSyntax'; import { BareFontInfo } from 'vs/editor/common/config/fontInfo'; @@ -110,6 +107,7 @@ export interface ICoreServices { configurationService: IConfigurationService; environmentService: IEnvironmentService; timerService: ITimerService; + storageService: IStorageService; } const currentWindow = remote.getCurrentWindow(); @@ -155,6 +153,7 @@ export class WorkbenchShell { this.configurationService = services.configurationService; this.environmentService = services.environmentService; this.timerService = services.timerService; + this.storageService = services.storageService; this.toUnbind = []; this.previousErrorTime = 0; @@ -251,6 +250,7 @@ export class WorkbenchShell { serviceCollection.set(IConfigurationService, this.configurationService); serviceCollection.set(IEnvironmentService, this.environmentService); serviceCollection.set(ITimerService, this.timerService); + serviceCollection.set(IStorageService, this.storageService); const instantiationService: IInstantiationService = new InstantiationService(serviceCollection, true); @@ -273,22 +273,6 @@ export class WorkbenchShell { sharedProcess .done(client => client.registerChannel('choice', instantiationService.createInstance(ChoiceChannel))); - // Storage Sevice - let workspaceIdentifier = this.contextService.getWorkspace(); - if (!workspaceIdentifier && !!this.configuration.backupPath) { - // if we do not have a workspace open, we need to find another identifier for the window to store - // workspace UI state. if we have a backup path in the configuration we can use that because this - // will be a unique identifier per window that is stable between restarts as long as there are - // dirty files in the workspace. - // We use basename() to produce a short identifier, we do not need the full path. We use a custom - // scheme so that we can later distinguish these identifiers from the workspace one. - workspaceIdentifier = { resource: URI.from({ path: basename(this.configuration.backupPath), scheme: 'empty' }) }; - } - const disableStorage = !!this.environmentService.extensionTestsPath; // never keep any state when running extension tests! - const storage = disableStorage ? inMemoryLocalStorageInstance : window.localStorage; - this.storageService = new StorageService(storage, storage, workspaceIdentifier); - serviceCollection.set(IStorageService, this.storageService); - // Warm up font cache information before building up too many dom elements restoreFontInfo(this.storageService); readFontInfo(BareFontInfo.createFromRawSettings(this.configurationService.getConfiguration('editor'), browser.getZoomLevel())); diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index 318ffc68d598f..27661ffa4cb3f 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -80,7 +80,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp constructor(private environmentService: IEnvironmentService, private singleRootWorkspace?: SingleRootWorkspace, private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME) { super(); - this.workspace = singleRootWorkspace ? new Workspace(`${singleRootWorkspace.uid}`, [singleRootWorkspace.resource]) : null; + this.workspace = singleRootWorkspace ? new Workspace(singleRootWorkspace.resource.toString(), [singleRootWorkspace.resource]) : null; this.workspaceFilePathToConfiguration = Object.create(null); this.cachedConfig = new ConfigModel(null); diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index dc3c013b40461..d38d290f46371 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -53,6 +53,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { IThemeService, ITheme, DARK } from 'vs/platform/theme/common/themeService'; import { Color } from 'vs/base/common/color'; import { isLinux } from 'vs/base/common/platform'; +import { generateUuid } from "vs/base/common/uuid"; export function createFileInput(instantiationService: IInstantiationService, resource: URI): FileEditorInput { return instantiationService.createInstance(FileEditorInput, resource, void 0); @@ -64,12 +65,14 @@ export class TestContextService implements IWorkspaceContextService { public _serviceBrand: any; private workspace: any; + private id: string; private options: any; private _onDidChangeWorkspaceRoots: Emitter; constructor(workspace: any = TestWorkspace, options: any = null) { this.workspace = workspace; + this.id = generateUuid(); this.options = options || Object.create(null); this._onDidChangeWorkspaceRoots = new Emitter(); } @@ -91,7 +94,7 @@ export class TestContextService implements IWorkspaceContextService { } public getWorkspace2(): IWorkspace2 { - return this.workspace ? { id: `${this.workspace.uid}`, roots: [this.workspace.resource] } : void 0; + return this.workspace ? { id: this.id, roots: [this.workspace.resource] } : void 0; } public setWorkspace(workspace: any): void { From 004cad592d7ac8ab2dc77bb7f39c4a829759df83 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 14 Jun 2017 15:56:06 +0200 Subject: [PATCH 1816/2747] also don't alert when command finished, #17245 --- .../contrib/referenceSearch/browser/referenceSearch.ts | 7 +------ src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts | 3 ++- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts b/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts index 6249277425f0f..805cdb2bddc4b 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts @@ -5,7 +5,6 @@ 'use strict'; import * as nls from 'vs/nls'; -import { alert } from 'vs/base/browser/ui/aria/aria'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -85,11 +84,7 @@ export class ReferenceAction extends EditorAction { } let range = editor.getSelection(); let model = editor.getModel(); - let references = provideReferences(model, range.getStartPosition()).then(references => { - const model = new ReferencesModel(references); - alert(model.getAriaMessage()); - return model; - }); + let references = provideReferences(model, range.getStartPosition()).then(references => new ReferencesModel(references)); controller.toggleWidget(range, references, defaultReferenceSearchOptions); } } diff --git a/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts b/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts index 97a76078bba10..45e8d7a3e5697 100644 --- a/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts +++ b/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts @@ -169,6 +169,7 @@ export abstract class PeekViewWidget extends ZoneWidget implements IPeekViewServ public setTitle(primaryHeading: string, secondaryHeading?: string): void { $(this._primaryHeading).safeInnerHtml(primaryHeading); + this._primaryHeading.setAttribute('aria-label', primaryHeading); if (secondaryHeading) { $(this._secondaryHeading).safeInnerHtml(secondaryHeading); } else { @@ -212,4 +213,4 @@ export abstract class PeekViewWidget extends ZoneWidget implements IPeekViewServ protected _doLayoutBody(heightInPixel: number, widthInPixel: number): void { this._bodyElement.style.height = strings.format('{0}px', heightInPixel); } -} \ No newline at end of file +} From 38f89523141b60e34911594b7da3d1a8a4eff1e9 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 14 Jun 2017 15:24:33 +0200 Subject: [PATCH 1817/2747] Do not use translate3d in scrollbars, use will-change for scrollbar sliders instead (Microsoft/monaco-editor#426) --- .../browser/ui/scrollbar/abstractScrollbar.ts | 17 +---------------- .../browser/ui/scrollbar/horizontalScrollbar.ts | 9 +-------- .../browser/ui/scrollbar/scrollableElement.ts | 5 ----- .../ui/scrollbar/scrollableElementOptions.ts | 6 ------ .../browser/ui/scrollbar/verticalScrollbar.ts | 9 +-------- .../editorScrollbar/editorScrollbar.ts | 4 +--- 6 files changed, 4 insertions(+), 46 deletions(-) diff --git a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts index 7a8743cb62a27..2798c774222fd 100644 --- a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts @@ -32,7 +32,6 @@ export interface ScrollbarHost { } export interface AbstractScrollbarOptions { - canUseTranslate3d: boolean; lazyRender: boolean; host: ScrollbarHost; scrollbarState: ScrollbarState; @@ -43,7 +42,6 @@ export interface AbstractScrollbarOptions { export abstract class AbstractScrollbar extends Widget { - protected _canUseTranslate3d: boolean; protected _host: ScrollbarHost; protected _scrollable: Scrollable; private _lazyRender: boolean; @@ -58,7 +56,6 @@ export abstract class AbstractScrollbar extends Widget { constructor(opts: AbstractScrollbarOptions) { super(); - this._canUseTranslate3d = opts.canUseTranslate3d; this._lazyRender = opts.lazyRender; this._host = opts.host; this._scrollable = opts.scrollable; @@ -98,6 +95,7 @@ export abstract class AbstractScrollbar extends Widget { this.slider.setLeft(left); this.slider.setWidth(width); this.slider.setHeight(height); + DomUtils.hintGPULayer(this.slider.domNode); this.domNode.domNode.appendChild(this.slider.domNode); @@ -111,11 +109,6 @@ export abstract class AbstractScrollbar extends Widget { // ----------------- Update state - public setCanUseTranslate3d(canUseTranslate3d: boolean): boolean { - this._canUseTranslate3d = canUseTranslate3d; - return true; - } - protected _onElementSize(visibleSize: number): boolean { if (this._scrollbarState.setVisibleSize(visibleSize)) { this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()); @@ -165,14 +158,6 @@ export abstract class AbstractScrollbar extends Widget { } this._shouldRender = false; - if (this._canUseTranslate3d) { - // Put the scrollbar in its own layer - this.domNode.setTransform('translate3d(0px, 0px, 0px)'); - } else { - this.domNode.setTransform(''); - DomUtils.hintGPULayer(this.domNode.domNode); - } - this._renderDomNode(this._scrollbarState.getRectangleLargeSize(), this._scrollbarState.getRectangleSmallSize()); this._updateSlider(this._scrollbarState.getSliderSize(), this._scrollbarState.getArrowSize() + this._scrollbarState.getSliderPosition()); } diff --git a/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts b/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts index 8e7e678f46fc1..f6da6af6bc36c 100644 --- a/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts @@ -16,7 +16,6 @@ export class HorizontalScrollbar extends AbstractScrollbar { constructor(scrollable: Scrollable, options: ScrollableElementResolvedOptions, host: ScrollbarHost) { super({ - canUseTranslate3d: options.canUseTranslate3d, lazyRender: options.lazyRender, host: host, scrollbarState: new ScrollbarState( @@ -61,13 +60,7 @@ export class HorizontalScrollbar extends AbstractScrollbar { protected _updateSlider(sliderSize: number, sliderPosition: number): void { this.slider.setWidth(sliderSize); - if (this._canUseTranslate3d) { - this.slider.setTransform('translate3d(' + sliderPosition + 'px, 0px, 0px)'); - this.slider.setLeft(0); - } else { - this.slider.setTransform(''); - this.slider.setLeft(sliderPosition); - } + this.slider.setLeft(sliderPosition); } protected _renderDomNode(largeSize: number, smallSize: number): void { diff --git a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts index c07026b7f72de..7bb7da0f01e48 100644 --- a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts +++ b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts @@ -6,7 +6,6 @@ import 'vs/css!./media/scrollbars'; -import * as Browser from 'vs/base/browser/browser'; import * as DomUtils from 'vs/base/browser/dom'; import * as Platform from 'vs/base/common/platform'; import { StandardMouseWheelEvent, IMouseEvent } from 'vs/base/browser/mouseEvent'; @@ -188,9 +187,6 @@ export class ScrollableElement extends Widget { this._options.mouseWheelScrollSensitivity = massagedOptions.mouseWheelScrollSensitivity; this._setListeningToMouseWheel(this._options.handleMouseWheel); - this._shouldRender = this._horizontalScrollbar.setCanUseTranslate3d(massagedOptions.canUseTranslate3d) || this._shouldRender; - this._shouldRender = this._verticalScrollbar.setCanUseTranslate3d(massagedOptions.canUseTranslate3d) || this._shouldRender; - if (!this._options.lazyRender) { this._render(); } @@ -409,7 +405,6 @@ export class DomScrollableElement extends ScrollableElement { function resolveOptions(opts: ScrollableElementCreationOptions): ScrollableElementResolvedOptions { let result: ScrollableElementResolvedOptions = { - canUseTranslate3d: opts.canUseTranslate3d && Browser.supportsTranslate3d, lazyRender: (typeof opts.lazyRender !== 'undefined' ? opts.lazyRender : false), className: (typeof opts.className !== 'undefined' ? opts.className : ''), useShadows: (typeof opts.useShadows !== 'undefined' ? opts.useShadows : true), diff --git a/src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts b/src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts index 032e637d5b51e..5485e4eb84b5a 100644 --- a/src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts +++ b/src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts @@ -7,10 +7,6 @@ import { ScrollbarVisibility } from 'vs/base/common/scrollable'; export interface ScrollableElementCreationOptions { - /** - * Allow scrollbar rendering to use translate3d. - */ - canUseTranslate3d: boolean; /** * The scrollable element should not do any DOM mutations until renderNow() is called. * Defaults to false. @@ -105,13 +101,11 @@ export interface ScrollableElementCreationOptions { } export interface ScrollableElementChangeOptions { - canUseTranslate3d: boolean; handleMouseWheel?: boolean; mouseWheelScrollSensitivity?: number; } export interface ScrollableElementResolvedOptions { - canUseTranslate3d: boolean; lazyRender: boolean; className: string; useShadows: boolean; diff --git a/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts b/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts index ce33b4164b414..94a6130d90e4d 100644 --- a/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts @@ -16,7 +16,6 @@ export class VerticalScrollbar extends AbstractScrollbar { constructor(scrollable: Scrollable, options: ScrollableElementResolvedOptions, host: ScrollbarHost) { super({ - canUseTranslate3d: options.canUseTranslate3d, lazyRender: options.lazyRender, host: host, scrollbarState: new ScrollbarState( @@ -66,13 +65,7 @@ export class VerticalScrollbar extends AbstractScrollbar { protected _updateSlider(sliderSize: number, sliderPosition: number): void { this.slider.setHeight(sliderSize); - if (this._canUseTranslate3d) { - this.slider.setTransform('translate3d(0px, ' + sliderPosition + 'px, 0px)'); - this.slider.setTop(0); - } else { - this.slider.setTransform(''); - this.slider.setTop(sliderPosition); - } + this.slider.setTop(sliderPosition); } protected _renderDomNode(largeSize: number, smallSize: number): void { diff --git a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts index a90d8f52d03a1..8ceb2845eb333 100644 --- a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts +++ b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts @@ -34,7 +34,6 @@ export class EditorScrollbar extends ViewPart { const configScrollbarOpts = editor.viewInfo.scrollbar; let scrollbarOptions: ScrollableElementCreationOptions = { - canUseTranslate3d: editor.canUseTranslate3d, listenOnDomNode: viewDomNode.domNode, className: 'editor-scrollable' + ' ' + getThemeTypeSelector(context.theme.type), useShadows: false, @@ -127,10 +126,9 @@ export class EditorScrollbar extends ViewPart { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - if (e.viewInfo || e.canUseTranslate3d) { + if (e.viewInfo) { const editor = this._context.configuration.editor; let newOpts: ScrollableElementChangeOptions = { - canUseTranslate3d: editor.canUseTranslate3d, handleMouseWheel: editor.viewInfo.scrollbar.handleMouseWheel, mouseWheelScrollSensitivity: editor.viewInfo.scrollbar.mouseWheelScrollSensitivity }; From fc6f092223296841ca13f66456d76efe31d32ddd Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 14 Jun 2017 15:31:38 +0200 Subject: [PATCH 1818/2747] Do not use translate3d in overview ruler, use will-change instead (Microsoft/monaco-editor#426) --- .../overviewRuler/decorationsOverviewRuler.ts | 5 ----- .../viewParts/overviewRuler/overviewRuler.ts | 5 ----- .../overviewRuler/overviewRulerImpl.ts | 18 +++--------------- 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts index 46c6d71d94139..3c4f0a6c3ab65 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts @@ -46,7 +46,6 @@ export class DecorationsOverviewRuler extends ViewPart { 'decorationsOverviewRuler', this._context.viewLayout.getScrollHeight(), this._context.configuration.editor.lineHeight, - this._context.configuration.editor.canUseTranslate3d, this._context.configuration.editor.pixelRatio, DecorationsOverviewRuler.MIN_DECORATION_HEIGHT, DecorationsOverviewRuler.MAX_DECORATION_HEIGHT, @@ -101,10 +100,6 @@ export class DecorationsOverviewRuler extends ViewPart { this._overviewRuler.setLineHeight(this._context.configuration.editor.lineHeight, false); } - if (e.canUseTranslate3d) { - this._overviewRuler.setCanUseTranslate3d(this._context.configuration.editor.canUseTranslate3d, false); - } - if (e.pixelRatio) { this._overviewRuler.setPixelRatio(this._context.configuration.editor.pixelRatio, false); } diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts index 65c793de87657..bb2b4ee58cea8 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts @@ -25,7 +25,6 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { cssClassName, this._context.viewLayout.getScrollHeight(), this._context.configuration.editor.lineHeight, - this._context.configuration.editor.canUseTranslate3d, this._context.configuration.editor.pixelRatio, minimumHeight, maximumHeight, @@ -48,10 +47,6 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { this._overviewRuler.setLineHeight(this._context.configuration.editor.lineHeight, true); } - if (e.canUseTranslate3d) { - this._overviewRuler.setCanUseTranslate3d(this._context.configuration.editor.canUseTranslate3d, true); - } - if (e.pixelRatio) { this._overviewRuler.setPixelRatio(this._context.configuration.editor.pixelRatio, true); } diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts index 617a850a1d711..51434ac58383b 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts @@ -10,6 +10,7 @@ import { OverviewZoneManager, ColorZone, OverviewRulerZone } from 'vs/editor/com import { Color } from 'vs/base/common/color'; import { OverviewRulerPosition } from 'vs/editor/common/config/editorOptions'; import { ThemeType, LIGHT } from 'vs/platform/theme/common/themeService'; +import * as dom from 'vs/base/browser/dom'; export class OverviewRulerImpl { @@ -17,12 +18,11 @@ export class OverviewRulerImpl { private _domNode: FastDomNode; private _lanesCount: number; private _zoneManager: OverviewZoneManager; - private _canUseTranslate3d: boolean; private _background: Color; constructor( canvasLeftOffset: number, cssClassName: string, scrollHeight: number, lineHeight: number, - canUseTranslate3d: boolean, pixelRatio: number, minimumHeight: number, maximumHeight: number, + pixelRatio: number, minimumHeight: number, maximumHeight: number, getVerticalOffsetForLine: (lineNumber: number) => number ) { this._canvasLeftOffset = canvasLeftOffset; @@ -31,10 +31,10 @@ export class OverviewRulerImpl { this._domNode.setClassName(cssClassName); this._domNode.setPosition('absolute'); + dom.hintGPULayer(this._domNode.domNode); this._lanesCount = 3; - this._canUseTranslate3d = canUseTranslate3d; this._background = null; this._zoneManager = new OverviewZoneManager(getVerticalOffsetForLine); @@ -127,13 +127,6 @@ export class OverviewRulerImpl { } } - public setCanUseTranslate3d(canUseTranslate3d: boolean, render: boolean): void { - this._canUseTranslate3d = canUseTranslate3d; - if (render) { - this.render(true); - } - } - public setPixelRatio(pixelRatio: number, render: boolean): void { this._zoneManager.setPixelRatio(pixelRatio); this._domNode.setWidth(this._zoneManager.getDOMWidth()); @@ -156,11 +149,6 @@ export class OverviewRulerImpl { if (this._zoneManager.getOuterHeight() === 0) { return false; } - if (this._canUseTranslate3d) { - this._domNode.setTransform('translate3d(0px, 0px, 0px)'); - } else { - this._domNode.setTransform(''); - } const width = this._zoneManager.getCanvasWidth(); const height = this._zoneManager.getCanvasHeight(); From 50b9dfef31fd8ae3a58bf07fd6e055feeba3c3d4 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 14 Jun 2017 15:41:14 +0200 Subject: [PATCH 1819/2747] canUseTranslate3d is no longer a ScrollableElement option --- src/vs/base/browser/ui/list/listView.ts | 1 - src/vs/base/parts/tree/browser/treeView.ts | 1 - src/vs/editor/contrib/hover/browser/hoverWidgets.ts | 2 +- .../contrib/parameterHints/browser/parameterHintsWidget.ts | 2 +- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 2 +- src/vs/workbench/browser/parts/editor/binaryEditor.ts | 2 +- src/vs/workbench/browser/parts/editor/tabsTitleControl.ts | 1 - src/vs/workbench/parts/extensions/browser/extensionEditor.ts | 4 ++-- .../welcome/walkThrough/electron-browser/walkThroughPart.ts | 1 - 9 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/vs/base/browser/ui/list/listView.ts b/src/vs/base/browser/ui/list/listView.ts index 91d89a81e55e0..497bf624a0c26 100644 --- a/src/vs/base/browser/ui/list/listView.ts +++ b/src/vs/base/browser/ui/list/listView.ts @@ -81,7 +81,6 @@ export class ListView implements IDisposable { this.gesture = new Gesture(this.rowsContainer); this.scrollableElement = new ScrollableElement(this.rowsContainer, { - canUseTranslate3d: false, alwaysConsumeMouseWheel: true, horizontal: ScrollbarVisibility.Hidden, vertical: ScrollbarVisibility.Auto, diff --git a/src/vs/base/parts/tree/browser/treeView.ts b/src/vs/base/parts/tree/browser/treeView.ts index fbbef901f5458..b424249e1eb6c 100644 --- a/src/vs/base/parts/tree/browser/treeView.ts +++ b/src/vs/base/parts/tree/browser/treeView.ts @@ -460,7 +460,6 @@ export class TreeView extends HeightMap { this.wrapper = document.createElement('div'); this.wrapper.className = 'monaco-tree-wrapper'; this.scrollableElement = new ScrollableElement(this.wrapper, { - canUseTranslate3d: false, alwaysConsumeMouseWheel: true, horizontal: ScrollbarVisibility.Hidden, vertical: (typeof context.options.verticalScrollMode !== 'undefined' ? context.options.verticalScrollMode : ScrollbarVisibility.Auto), diff --git a/src/vs/editor/contrib/hover/browser/hoverWidgets.ts b/src/vs/editor/contrib/hover/browser/hoverWidgets.ts index bc42fb4935aa2..eacdbf64f4e91 100644 --- a/src/vs/editor/contrib/hover/browser/hoverWidgets.ts +++ b/src/vs/editor/contrib/hover/browser/hoverWidgets.ts @@ -51,7 +51,7 @@ export class ContentHoverWidget extends Widget implements editorBrowser.IContent this._domNode = document.createElement('div'); this._domNode.className = 'monaco-editor-hover-content'; - this.scrollbar = new DomScrollableElement(this._domNode, { canUseTranslate3d: false }); + this.scrollbar = new DomScrollableElement(this._domNode, {}); this.disposables.push(this.scrollbar); this._containerDomNode.appendChild(this.scrollbar.getDomNode()); diff --git a/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts b/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts index a9fec25edf6c1..7c4e88e035efa 100644 --- a/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts +++ b/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts @@ -221,7 +221,7 @@ export class ParameterHintsWidget implements IContentWidget, IDisposable { this.overloads = dom.append(wrapper, $('.overloads')); const body = $('.body'); - this.scrollbar = new DomScrollableElement(body, { canUseTranslate3d: false }); + this.scrollbar = new DomScrollableElement(body, {}); this.disposables.push(this.scrollbar); wrapper.appendChild(this.scrollbar.getDomNode()); diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index a3154f2a23dae..5ab85e8bf03a9 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -213,7 +213,7 @@ class SuggestionDetails { this.body = $('.body'); - this.scrollbar = new DomScrollableElement(this.body, { canUseTranslate3d: false }); + this.scrollbar = new DomScrollableElement(this.body, {}); append(this.el, this.scrollbar.getDomNode()); this.disposables.push(this.scrollbar); diff --git a/src/vs/workbench/browser/parts/editor/binaryEditor.ts b/src/vs/workbench/browser/parts/editor/binaryEditor.ts index f2e1ec0cde694..08ce253c8dbdd 100644 --- a/src/vs/workbench/browser/parts/editor/binaryEditor.ts +++ b/src/vs/workbench/browser/parts/editor/binaryEditor.ts @@ -59,7 +59,7 @@ export abstract class BaseBinaryResourceEditor extends BaseEditor { this.binaryContainer.tabindex(0); // enable focus support from the editor part (do not remove) // Custom Scrollbars - this.scrollbar = new DomScrollableElement(binaryContainerElement, { canUseTranslate3d: false, horizontal: ScrollbarVisibility.Auto, vertical: ScrollbarVisibility.Auto }); + this.scrollbar = new DomScrollableElement(binaryContainerElement, { horizontal: ScrollbarVisibility.Auto, vertical: ScrollbarVisibility.Auto }); parent.getHTMLElement().appendChild(this.scrollbar.getDomNode()); } diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index 1793a9c4a17e2..b735e56fe40f0 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -152,7 +152,6 @@ export class TabsTitleControl extends TitleControl { vertical: ScrollbarVisibility.Hidden, scrollYToX: true, useShadows: false, - canUseTranslate3d: false, horizontalScrollbarSize: 3 }); diff --git a/src/vs/workbench/parts/extensions/browser/extensionEditor.ts b/src/vs/workbench/parts/extensions/browser/extensionEditor.ts index 9334cdb4f535b..84274e3c76e6c 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionEditor.ts @@ -358,7 +358,7 @@ export class ExtensionEditor extends BaseEditor { return this.loadContents(() => this.extensionManifest.get() .then(manifest => { const content = $('div', { class: 'subcontent' }); - const scrollableContent = new DomScrollableElement(content, { canUseTranslate3d: false }); + const scrollableContent = new DomScrollableElement(content, {}); const layout = () => scrollableContent.scanDomNode(); const removeLayoutParticipant = arrays.insert(this.layoutParticipants, { layout }); @@ -396,7 +396,7 @@ export class ExtensionEditor extends BaseEditor { return this.loadContents(() => { return this.extensionDependencies.get().then(extensionDependencies => { const content = $('div', { class: 'subcontent' }); - const scrollableContent = new DomScrollableElement(content, { canUseTranslate3d: false }); + const scrollableContent = new DomScrollableElement(content, {}); append(this.content, scrollableContent.getDomNode()); this.contentDisposables.push(scrollableContent); diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 48160e32d1e7a..1187473c057f9 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -121,7 +121,6 @@ export class WalkThroughPart extends BaseEditor { this.content.style.outlineStyle = 'none'; this.scrollbar = new DomScrollableElement(this.content, { - canUseTranslate3d: false, horizontal: ScrollbarVisibility.Auto, vertical: ScrollbarVisibility.Auto }); From 8e7e6e1f65046dd1ce7ee616f0309cc2cebe149e Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 14 Jun 2017 16:01:17 +0200 Subject: [PATCH 1820/2747] Use will-change to hint browser layers for the lines content and the margin layers instead of using translate3d ((Microsoft/monaco-editor#426)) --- src/vs/base/browser/dom.ts | 5 --- src/vs/base/browser/fastDomNode.ts | 41 ++++--------------- .../browser/ui/scrollbar/abstractScrollbar.ts | 2 +- src/vs/editor/browser/config/configuration.ts | 1 - .../browser/viewParts/lines/viewLines.ts | 21 ++++------ .../editor/browser/viewParts/margin/margin.ts | 18 +++----- .../browser/viewParts/minimap/minimap.ts | 2 +- .../overviewRuler/overviewRulerImpl.ts | 3 +- .../common/config/commonEditorConfig.ts | 2 - src/vs/editor/common/config/editorOptions.ts | 28 ++++++------- src/vs/editor/common/view/viewEvents.ts | 4 +- .../common/config/commonEditorConfig.test.ts | 1 - .../test/common/mocks/testConfiguration.ts | 1 - src/vs/monaco.d.ts | 9 ++-- 14 files changed, 45 insertions(+), 93 deletions(-) diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts index 2915bcb44bb07..228550b57afe7 100644 --- a/src/vs/base/browser/dom.ts +++ b/src/vs/base/browser/dom.ts @@ -1041,8 +1041,3 @@ export function domContentLoaded(): TPromise { } }); } - -export function hintGPULayer(target: HTMLElement): void { - // This is to hint browsers that this dom node is suited to live in its own layer (e.g. sliders, etc.) - (target.style).willChange = 'transform'; -} diff --git a/src/vs/base/browser/fastDomNode.ts b/src/vs/base/browser/fastDomNode.ts index edd726ec0a2e9..695b48141e761 100644 --- a/src/vs/base/browser/fastDomNode.ts +++ b/src/vs/base/browser/fastDomNode.ts @@ -6,7 +6,7 @@ import * as dom from 'vs/base/browser/dom'; -export abstract class FastDomNode { +export class FastDomNode { public readonly domNode: T; private _maxWidth: number; @@ -25,7 +25,7 @@ export abstract class FastDomNode { private _display: string; private _position: string; private _visibility: string; - private _transform: string; + private _layerHint: boolean; constructor(domNode: T) { this.domNode = domNode; @@ -45,7 +45,7 @@ export abstract class FastDomNode { this._display = ''; this._position = ''; this._visibility = ''; - this._transform = ''; + this._layerHint = false; } public setMaxWidth(maxWidth: number): void { @@ -215,16 +215,14 @@ export abstract class FastDomNode { this.domNode.style.visibility = this._visibility; } - public setTransform(transform: string): void { - if (this._transform === transform) { + public setLayerHinting(layerHint: boolean): void { + if (this._layerHint === layerHint) { return; } - this._transform = transform; - this._setTransform(this.domNode, this._transform); + this._layerHint = layerHint; + (this.domNode.style).willChange = this._layerHint ? 'transform' : 'auto'; } - protected abstract _setTransform(domNode: T, transform: string): void; - public setAttribute(name: string, value: string): void { this.domNode.setAttribute(name, value); } @@ -250,29 +248,6 @@ export abstract class FastDomNode { } } -class WebKitFastDomNode extends FastDomNode { - protected _setTransform(domNode: T, transform: string): void { - (domNode.style).webkitTransform = transform; - } -} - -class StandardFastDomNode extends FastDomNode { - protected _setTransform(domNode: T, transform: string): void { - domNode.style.transform = transform; - } -} - -let useWebKitFastDomNode = false; -(function () { - let testDomNode = document.createElement('div'); - if (typeof (testDomNode.style).webkitTransform !== 'undefined') { - useWebKitFastDomNode = true; - } -})(); export function createFastDomNode(domNode: T): FastDomNode { - if (useWebKitFastDomNode) { - return new WebKitFastDomNode(domNode); - } else { - return new StandardFastDomNode(domNode); - } + return new FastDomNode(domNode); } diff --git a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts index 2798c774222fd..5d326d59eb4ce 100644 --- a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts @@ -95,7 +95,7 @@ export abstract class AbstractScrollbar extends Widget { this.slider.setLeft(left); this.slider.setWidth(width); this.slider.setHeight(height); - DomUtils.hintGPULayer(this.slider.domNode); + this.slider.setLayerHinting(true); this.domNode.domNode.appendChild(this.slider.domNode); diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts index 960faa7b1e624..0a7787b49260b 100644 --- a/src/vs/editor/browser/config/configuration.ts +++ b/src/vs/editor/browser/config/configuration.ts @@ -351,7 +351,6 @@ export class Configuration extends CommonEditorConfiguration { extraEditorClassName: this._getExtraEditorClassName(), outerWidth: this._elementSizeObserver.getWidth(), outerHeight: this._elementSizeObserver.getHeight(), - canUseTranslate3d: browser.canUseTranslate3d(), emptySelectionClipboard: browser.isWebKit, pixelRatio: browser.getPixelRatio(), zoomLevel: browser.getZoomLevel(), diff --git a/src/vs/editor/browser/viewParts/lines/viewLines.ts b/src/vs/editor/browser/viewParts/lines/viewLines.ts index 462a4e5160d19..6998bc6a8ea0d 100644 --- a/src/vs/editor/browser/viewParts/lines/viewLines.ts +++ b/src/vs/editor/browser/viewParts/lines/viewLines.ts @@ -52,7 +52,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, private _typicalHalfwidthCharacterWidth: number; private _isViewportWrapping: boolean; private _revealHorizontalRightPadding: number; - private _canUseTranslate3d: boolean; + private _canUseLayerHinting: boolean; private _viewLineOptions: ViewLineOptions; // --- width @@ -75,7 +75,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, this._typicalHalfwidthCharacterWidth = conf.editor.fontInfo.typicalHalfwidthCharacterWidth; this._isViewportWrapping = conf.editor.wrappingInfo.isViewportWrapping; this._revealHorizontalRightPadding = conf.editor.viewInfo.revealHorizontalRightPadding; - this._canUseTranslate3d = conf.editor.canUseTranslate3d; + this._canUseLayerHinting = conf.editor.canUseLayerHinting; this._viewLineOptions = new ViewLineOptions(conf); PartFingerprints.write(this.domNode, PartFingerprint.ViewLines); @@ -132,8 +132,8 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, if (e.viewInfo) { this._revealHorizontalRightPadding = conf.editor.viewInfo.revealHorizontalRightPadding; } - if (e.canUseTranslate3d) { - this._canUseTranslate3d = conf.editor.canUseTranslate3d; + if (e.canUseLayerHinting) { + this._canUseLayerHinting = conf.editor.canUseLayerHinting; } if (e.fontInfo) { Configuration.applyFontInfo(this.domNode, conf.editor.fontInfo); @@ -443,17 +443,10 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, } // (3) handle scrolling + this._linesContent.setLayerHinting(this._canUseLayerHinting); const adjustedScrollTop = this._context.viewLayout.getScrollTop() - viewportData.bigNumbersDelta; - if (this._canUseTranslate3d) { - let transform = 'translate3d(' + -this._context.viewLayout.getScrollLeft() + 'px, ' + -adjustedScrollTop + 'px, 0px)'; - this._linesContent.setTransform(transform); - this._linesContent.setTop(0); - this._linesContent.setLeft(0); - } else { - this._linesContent.setTransform(''); - this._linesContent.setTop(-adjustedScrollTop); - this._linesContent.setLeft(-this._context.viewLayout.getScrollLeft()); - } + this._linesContent.setTop(-adjustedScrollTop); + this._linesContent.setLeft(-this._context.viewLayout.getScrollLeft()); // Update max line width (not so important, it is just so the horizontal scrollbar doesn't get too small) this._asyncUpdateLineWidths.schedule(); diff --git a/src/vs/editor/browser/viewParts/margin/margin.ts b/src/vs/editor/browser/viewParts/margin/margin.ts index 35fcf1563b937..bd3fc8b97a67e 100644 --- a/src/vs/editor/browser/viewParts/margin/margin.ts +++ b/src/vs/editor/browser/viewParts/margin/margin.ts @@ -16,7 +16,7 @@ export class Margin extends ViewPart { public static CLASS_NAME = 'glyph-margin'; private _domNode: FastDomNode; - private _canUseTranslate3d: boolean; + private _canUseLayerHinting: boolean; private _contentLeft: number; private _glyphMarginLeft: number; private _glyphMarginWidth: number; @@ -24,7 +24,7 @@ export class Margin extends ViewPart { constructor(context: ViewContext) { super(context); - this._canUseTranslate3d = this._context.configuration.editor.canUseTranslate3d; + this._canUseLayerHinting = this._context.configuration.editor.canUseLayerHinting; this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; this._glyphMarginLeft = this._context.configuration.editor.layoutInfo.glyphMarginLeft; this._glyphMarginWidth = this._context.configuration.editor.layoutInfo.glyphMarginWidth; @@ -57,8 +57,8 @@ export class Margin extends ViewPart { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - if (e.canUseTranslate3d) { - this._canUseTranslate3d = this._context.configuration.editor.canUseTranslate3d; + if (e.canUseLayerHinting) { + this._canUseLayerHinting = this._context.configuration.editor.canUseLayerHinting; } if (e.layoutInfo) { @@ -80,15 +80,9 @@ export class Margin extends ViewPart { } public render(ctx: RestrictedRenderingContext): void { + this._domNode.setLayerHinting(this._canUseLayerHinting); const adjustedScrollTop = ctx.scrollTop - ctx.bigNumbersDelta; - if (this._canUseTranslate3d) { - let transform = 'translate3d(0px, ' + -adjustedScrollTop + 'px, 0px)'; - this._domNode.setTransform(transform); - this._domNode.setTop(0); - } else { - this._domNode.setTransform(''); - this._domNode.setTop(-adjustedScrollTop); - } + this._domNode.setTop(-adjustedScrollTop); let height = Math.min(ctx.scrollHeight, 1000000); this._domNode.setHeight(height); diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index 70cb44e1523cb..98609ffbbcd9c 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -413,7 +413,7 @@ export class Minimap extends ViewPart { this._slider = createFastDomNode(document.createElement('div')); this._slider.setPosition('absolute'); this._slider.setClassName('minimap-slider'); - dom.hintGPULayer(this._slider.domNode); + this._slider.setLayerHinting(true); this._domNode.appendChild(this._slider); this._tokensColorTracker = MinimapTokensColorTracker.getInstance(); diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts index 51434ac58383b..2e6a03a39d836 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts @@ -10,7 +10,6 @@ import { OverviewZoneManager, ColorZone, OverviewRulerZone } from 'vs/editor/com import { Color } from 'vs/base/common/color'; import { OverviewRulerPosition } from 'vs/editor/common/config/editorOptions'; import { ThemeType, LIGHT } from 'vs/platform/theme/common/themeService'; -import * as dom from 'vs/base/browser/dom'; export class OverviewRulerImpl { @@ -31,7 +30,7 @@ export class OverviewRulerImpl { this._domNode.setClassName(cssClassName); this._domNode.setPosition('absolute'); - dom.hintGPULayer(this._domNode.domNode); + this._domNode.setLayerHinting(true); this._lanesCount = 3; diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 553a17222995f..9dc377162fd62 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -55,7 +55,6 @@ export interface IEnvConfiguration { extraEditorClassName: string; outerWidth: number; outerHeight: number; - canUseTranslate3d: boolean; emptySelectionClipboard: boolean; pixelRatio: number; zoomLevel: number; @@ -125,7 +124,6 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed extraEditorClassName: partialEnv.extraEditorClassName, isDominatedByLongLines: this._isDominatedByLongLines, lineNumbersDigitCount: this._lineNumbersDigitCount, - canUseTranslate3d: partialEnv.canUseTranslate3d, emptySelectionClipboard: partialEnv.emptySelectionClipboard, pixelRatio: partialEnv.pixelRatio, tabFocusMode: TabFocus.getTabFocusMode(), diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 82e3f1994b6d1..9835b48bc22a5 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -246,10 +246,11 @@ export interface IEditorOptions { */ fontLigatures?: boolean; /** - * Disable the use of `translate3d`. + * Disable the use of `will-change` for the editor margin and lines layers. + * The usage of `will-change` acts as a hint for browsers to create an extra layer. * Defaults to false. */ - disableTranslate3d?: boolean; + disableLayerHinting?: boolean; /** * Disable the optimizations for monospace fonts. * Defaults to false. @@ -792,7 +793,7 @@ export interface IValidatedEditorOptions { readonly lineDecorationsWidth: number | string; readonly readOnly: boolean; readonly mouseStyle: 'text' | 'default' | 'copy'; - readonly disableTranslate3d: boolean; + readonly disableLayerHinting: boolean; readonly automaticLayout: boolean; readonly wordWrap: 'off' | 'on' | 'wordWrapColumn' | 'bounded'; readonly wordWrapColumn: number; @@ -818,7 +819,7 @@ export interface IValidatedEditorOptions { export class InternalEditorOptions { readonly _internalEditorOptionsBrand: void; - readonly canUseTranslate3d: boolean; + readonly canUseLayerHinting: boolean; readonly pixelRatio: number; readonly editorClassName: string; readonly lineHeight: number; @@ -848,7 +849,7 @@ export class InternalEditorOptions { * @internal */ constructor(source: { - canUseTranslate3d: boolean; + canUseLayerHinting: boolean; pixelRatio: number; editorClassName: string; lineHeight: number; @@ -867,7 +868,7 @@ export class InternalEditorOptions { wrappingInfo: EditorWrappingInfo; contribInfo: EditorContribOptions; }) { - this.canUseTranslate3d = source.canUseTranslate3d; + this.canUseLayerHinting = source.canUseLayerHinting; this.pixelRatio = source.pixelRatio; this.editorClassName = source.editorClassName; this.lineHeight = source.lineHeight | 0; @@ -892,7 +893,7 @@ export class InternalEditorOptions { */ public equals(other: InternalEditorOptions): boolean { return ( - this.canUseTranslate3d === other.canUseTranslate3d + this.canUseLayerHinting === other.canUseLayerHinting && this.pixelRatio === other.pixelRatio && this.editorClassName === other.editorClassName && this.lineHeight === other.lineHeight @@ -918,7 +919,7 @@ export class InternalEditorOptions { */ public createChangeEvent(newOpts: InternalEditorOptions): IConfigurationChangedEvent { return { - canUseTranslate3d: (this.canUseTranslate3d !== newOpts.canUseTranslate3d), + canUseLayerHinting: (this.canUseLayerHinting !== newOpts.canUseLayerHinting), pixelRatio: (this.pixelRatio !== newOpts.pixelRatio), editorClassName: (this.editorClassName !== newOpts.editorClassName), lineHeight: (this.lineHeight !== newOpts.lineHeight), @@ -1258,7 +1259,7 @@ export interface EditorLayoutInfo { * An event describing that the configuration of the editor has changed. */ export interface IConfigurationChangedEvent { - readonly canUseTranslate3d: boolean; + readonly canUseLayerHinting: boolean; readonly pixelRatio: boolean; readonly editorClassName: boolean; readonly lineHeight: boolean; @@ -1288,7 +1289,6 @@ export interface IEnvironmentalOptions { readonly extraEditorClassName: string; readonly isDominatedByLongLines: boolean; readonly lineNumbersDigitCount: number; - readonly canUseTranslate3d: boolean; readonly emptySelectionClipboard: boolean; readonly pixelRatio: number; readonly tabFocusMode: boolean; @@ -1435,7 +1435,7 @@ export class EditorOptionsValidator { lineDecorationsWidth: (typeof opts.lineDecorationsWidth === 'undefined' ? defaults.lineDecorationsWidth : opts.lineDecorationsWidth), readOnly: _boolean(opts.readOnly, defaults.readOnly), mouseStyle: _stringSet<'text' | 'default' | 'copy'>(opts.mouseStyle, defaults.mouseStyle, ['text', 'default', 'copy']), - disableTranslate3d: _boolean(opts.disableTranslate3d, defaults.disableTranslate3d), + disableLayerHinting: _boolean(opts.disableLayerHinting, defaults.disableLayerHinting), automaticLayout: _boolean(opts.automaticLayout, defaults.automaticLayout), wordWrap: wordWrap, wordWrapColumn: _clampedInt(opts.wordWrapColumn, defaults.wordWrapColumn, 1, Constants.MAX_SAFE_SMALL_INTEGER), @@ -1660,7 +1660,7 @@ export class InternalEditorOptionsFactory { lineDecorationsWidth: opts.lineDecorationsWidth, readOnly: opts.readOnly, mouseStyle: opts.mouseStyle, - disableTranslate3d: opts.disableTranslate3d, + disableLayerHinting: opts.disableLayerHinting, automaticLayout: opts.automaticLayout, wordWrap: opts.wordWrap, wordWrapColumn: opts.wordWrapColumn, @@ -1867,7 +1867,7 @@ export class InternalEditorOptionsFactory { } return new InternalEditorOptions({ - canUseTranslate3d: opts.disableTranslate3d ? false : env.canUseTranslate3d, + canUseLayerHinting: opts.disableLayerHinting ? false : true, pixelRatio: env.pixelRatio, editorClassName: className, lineHeight: env.fontInfo.lineHeight, @@ -2079,7 +2079,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { lineDecorationsWidth: 10, readOnly: false, mouseStyle: 'text', - disableTranslate3d: false, + disableLayerHinting: false, automaticLayout: false, wordWrap: 'off', wordWrapColumn: 80, diff --git a/src/vs/editor/common/view/viewEvents.ts b/src/vs/editor/common/view/viewEvents.ts index 72fc6b41fbe18..b4a6e4bbf28df 100644 --- a/src/vs/editor/common/view/viewEvents.ts +++ b/src/vs/editor/common/view/viewEvents.ts @@ -33,7 +33,7 @@ export class ViewConfigurationChangedEvent { public readonly type = ViewEventType.ViewConfigurationChanged; - public readonly canUseTranslate3d: boolean; + public readonly canUseLayerHinting: boolean; public readonly pixelRatio: boolean; public readonly editorClassName: boolean; public readonly lineHeight: boolean; @@ -46,7 +46,7 @@ export class ViewConfigurationChangedEvent { public readonly wrappingInfo: boolean; constructor(source: IConfigurationChangedEvent) { - this.canUseTranslate3d = source.canUseTranslate3d; + this.canUseLayerHinting = source.canUseLayerHinting; this.pixelRatio = source.pixelRatio; this.editorClassName = source.editorClassName; this.lineHeight = source.lineHeight; diff --git a/src/vs/editor/test/common/config/commonEditorConfig.test.ts b/src/vs/editor/test/common/config/commonEditorConfig.test.ts index 2e2f47b16aab6..4d5da6aec320a 100644 --- a/src/vs/editor/test/common/config/commonEditorConfig.test.ts +++ b/src/vs/editor/test/common/config/commonEditorConfig.test.ts @@ -59,7 +59,6 @@ suite('Common Editor Config', () => { extraEditorClassName: '', outerWidth: 1000, outerHeight: 100, - canUseTranslate3d: true, emptySelectionClipboard: true, pixelRatio: 1, zoomLevel: 0, diff --git a/src/vs/editor/test/common/mocks/testConfiguration.ts b/src/vs/editor/test/common/mocks/testConfiguration.ts index a8778a6f05503..b94830a845649 100644 --- a/src/vs/editor/test/common/mocks/testConfiguration.ts +++ b/src/vs/editor/test/common/mocks/testConfiguration.ts @@ -21,7 +21,6 @@ export class TestConfiguration extends CommonEditorConfiguration { extraEditorClassName: '', outerWidth: 100, outerHeight: 100, - canUseTranslate3d: true, emptySelectionClipboard: true, pixelRatio: 1, zoomLevel: 0, diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 0b34c6869aa78..25272570d5d83 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2793,10 +2793,11 @@ declare module monaco.editor { */ fontLigatures?: boolean; /** - * Disable the use of `translate3d`. + * Disable the use of `will-change` for the editor margin and lines layers. + * The usage of `will-change` acts as a hint for browsers to create an extra layer. * Defaults to false. */ - disableTranslate3d?: boolean; + disableLayerHinting?: boolean; /** * Disable the optimizations for monospace fonts. * Defaults to false. @@ -3275,7 +3276,7 @@ declare module monaco.editor { */ export class InternalEditorOptions { readonly _internalEditorOptionsBrand: void; - readonly canUseTranslate3d: boolean; + readonly canUseLayerHinting: boolean; readonly pixelRatio: number; readonly editorClassName: string; readonly lineHeight: number; @@ -3406,7 +3407,7 @@ declare module monaco.editor { * An event describing that the configuration of the editor has changed. */ export interface IConfigurationChangedEvent { - readonly canUseTranslate3d: boolean; + readonly canUseLayerHinting: boolean; readonly pixelRatio: boolean; readonly editorClassName: boolean; readonly lineHeight: boolean; From f33628287d1c87e39706f6c0fb9b281d873da748 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Wed, 14 Jun 2017 16:04:51 +0200 Subject: [PATCH 1821/2747] Removed integration and unit tests from smoke test. --- build/tfs/darwin/smoketest.sh | 6 ------ build/tfs/linux/smoketest.sh | 3 --- build/tfs/win32/smoketest.ps1 | 8 -------- 3 files changed, 17 deletions(-) diff --git a/build/tfs/darwin/smoketest.sh b/build/tfs/darwin/smoketest.sh index 18da9dabf382b..60e1863f08d17 100755 --- a/build/tfs/darwin/smoketest.sh +++ b/build/tfs/darwin/smoketest.sh @@ -20,12 +20,6 @@ step "Install distro dependencies" \ step "Build minified & upload source maps" \ npm run gulp -- --max_old_space_size=4096 vscode-darwin-min -step "Run unit tests" \ - ./scripts/test.sh --build --reporter dot - -step "Run integration tests" \ - ./scripts/test-integration.sh - step "Run smoke test" \ pushd test/smoke npm install diff --git a/build/tfs/linux/smoketest.sh b/build/tfs/linux/smoketest.sh index 70ceb3e9d7ac5..327d55b66d974 100644 --- a/build/tfs/linux/smoketest.sh +++ b/build/tfs/linux/smoketest.sh @@ -25,9 +25,6 @@ step "Install distro dependencies" \ step "Build minified" \ npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-min" -step "Run unit tests" \ - ./scripts/test.sh --xvfb --build --reporter dot - step "Run smoke test" \ pushd test/smoke npm install diff --git a/build/tfs/win32/smoketest.ps1 b/build/tfs/win32/smoketest.ps1 index 8a3a2dcfcb8a8..e7737a9f8955a 100644 --- a/build/tfs/win32/smoketest.ps1 +++ b/build/tfs/win32/smoketest.ps1 @@ -36,14 +36,6 @@ step "Build minified" { exec { & npm run gulp -- --max_old_space_size=4096 "vscode-win32-$global:arch-min" } } -step "Run unit tests" { - exec { & .\scripts\test.bat --build --reporter dot } -} - -# step "Run integration tests" { -# exec { & .\scripts\test-integration.bat } -# } - step "Run smoke test" { exec { & Push-Location test\smoke } exec { & npm install; npm run compile } From 850c83918b90013cd091f47eafec8de1cdbda563 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 14 Jun 2017 16:13:13 +0200 Subject: [PATCH 1822/2747] Fix bad pull rebase --- src/vs/workbench/parts/debug/electron-browser/debugHover.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index 946fe4db9390e..6948d29a257bf 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -62,7 +62,7 @@ export class DebugHoverWidget implements IContentWidget { this.valueContainer = $('.value'); this.valueContainer.tabIndex = 0; this.valueContainer.setAttribute('role', 'tooltip'); - this.scrollbar = new DomScrollableElement(this.valueContainer, { canUseTranslate3d: false }); + this.scrollbar = new DomScrollableElement(this.valueContainer, {}); this.domNode.appendChild(this.scrollbar.getDomNode()); this.toDispose.push(this.scrollbar); From 79282cda3e64a32d9538de917a0f20d0975099f3 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Wed, 14 Jun 2017 15:33:27 +0200 Subject: [PATCH 1823/2747] #28538 Create a configuration model that can retrieve and merge contents --- .../configuration/common/configuration.ts | 79 ++++++++++-- src/vs/platform/configuration/common/model.ts | 117 ++++-------------- .../node/configurationService.ts | 26 ++-- .../test/common/configuration.test.ts | 79 ++++++++++++ .../configuration/test/common/model.test.ts | 61 ++++----- .../common/configurationModels.ts | 8 +- .../configuration/node/configuration.ts | 25 ++-- 7 files changed, 222 insertions(+), 173 deletions(-) create mode 100644 src/vs/platform/configuration/test/common/configuration.test.ts diff --git a/src/vs/platform/configuration/common/configuration.ts b/src/vs/platform/configuration/common/configuration.ts index 7292988c11b18..0aec692a2d83a 100644 --- a/src/vs/platform/configuration/common/configuration.ts +++ b/src/vs/platform/configuration/common/configuration.ts @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { TPromise } from 'vs/base/common/winjs.base'; +import * as arrays from 'vs/base/common/arrays'; +import * as types from 'vs/base/common/types'; +import * as objects from 'vs/base/common/objects'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import Event from 'vs/base/common/event'; @@ -101,18 +104,76 @@ export function getConfigurationValue(config: any, settingPath: string, defau return typeof result === 'undefined' ? defaultValue : result; } -export interface IConfigModel { - contents: T; - overrides: IOverrides[]; - keys: string[]; - errors: any[]; - - merge(other: IConfigModel, overwrite?: boolean): IConfigModel; - getContentsFor(section: string): V; - configWithOverrides(identifier: string, section?: string): IConfigModel; +export function merge(base: any, add: any, overwrite: boolean): void { + Object.keys(add).forEach(key => { + if (key in base) { + if (types.isObject(base[key]) && types.isObject(add[key])) { + merge(base[key], add[key], overwrite); + } else if (overwrite) { + base[key] = add[key]; + } + } else { + base[key] = add[key]; + } + }); } export interface IOverrides { contents: T; identifiers: string[]; } + +export class Configuration { + + protected _keys: string[] = []; + + constructor(protected _contents: T = {}, protected _overrides: IOverrides[] = []) { + } + + public get contents(): T { + return this._contents; + } + + public get keys(): string[] { + return this._keys; + } + + public getContentsFor(section: string): V { + return objects.clone(this.contents[section]); + } + + public override(identifier: string): Configuration { + const result = new Configuration(); + const contents = objects.clone(this.contents); + if (this._overrides) { + for (const override of this._overrides) { + if (override.identifiers.indexOf(identifier) !== -1) { + merge(contents, override.contents, true); + } + } + } + result._contents = contents; + return result; + } + + public merge(other: Configuration, overwrite: boolean = true): Configuration { + const mergedModel = new Configuration(); + this.doMerge(mergedModel, this, overwrite); + this.doMerge(mergedModel, other, overwrite); + return mergedModel; + } + + protected doMerge(source: Configuration, target: Configuration, overwrite: boolean = true) { + merge(source.contents, objects.clone(target.contents), overwrite); + const overrides = objects.clone(source._overrides); + for (const override of target._overrides) { + const [sourceOverride] = overrides.filter(o => arrays.equals(o.identifiers, override.identifiers)); + if (sourceOverride) { + merge(sourceOverride.contents, override.contents, overwrite); + } else { + overrides.push(override); + } + } + source._overrides = overrides; + } +} \ No newline at end of file diff --git a/src/vs/platform/configuration/common/model.ts b/src/vs/platform/configuration/common/model.ts index cfbc368d83acd..bbc843ffa3a7c 100644 --- a/src/vs/platform/configuration/common/model.ts +++ b/src/vs/platform/configuration/common/model.ts @@ -5,12 +5,9 @@ 'use strict'; import { Registry } from 'vs/platform/platform'; -import * as types from 'vs/base/common/types'; import * as json from 'vs/base/common/json'; -import * as objects from 'vs/base/common/objects'; -import * as arrays from 'vs/base/common/arrays'; import { IConfigurationRegistry, Extensions, OVERRIDE_PROPERTY_PATTERN } from 'vs/platform/configuration/common/configurationRegistry'; -import { IConfigModel, IOverrides } from 'vs/platform/configuration/common/configuration'; +import { Configuration, IOverrides } from 'vs/platform/configuration/common/configuration'; export function getDefaultValues(): any { const valueTreeRoot: any = Object.create(null); @@ -68,92 +65,45 @@ export function getConfigurationKeys(): string[] { return Object.keys(properties); } -export function merge(base: any, add: any, overwrite: boolean): void { - Object.keys(add).forEach(key => { - if (key in base) { - if (types.isObject(base[key]) && types.isObject(add[key])) { - merge(base[key], add[key], overwrite); - } else if (overwrite) { - base[key] = add[key]; - } - } else { - base[key] = add[key]; - } - }); +export class DefaultConfiguration extends Configuration { + + constructor() { + super(getDefaultValues()); + this._keys = getConfigurationKeys(); + this._overrides = Object.keys(this._contents) + .filter(key => OVERRIDE_PROPERTY_PATTERN.test(key)) + .map(key => { + return >{ + identifiers: [overrideIdentifierFromKey(key).trim()], + contents: toValuesTree(this._contents[key], message => console.error(`Conflict in default settings file: ${message}`)) + }; + }); + } + + public get keys(): string[] { + return this._keys; + } } interface Overrides extends IOverrides { raw: any; } -export class ConfigModel implements IConfigModel { +export class CustomConfiguration extends Configuration { - protected _contents: T = {}; - protected _overrides: IOverrides[] = []; - protected _keys: string[] = []; protected _parseErrors: any[] = []; constructor(content: string = '', private name: string = '') { + super(); if (content) { this.update(content); } } - public get contents(): T { - return this._contents; - } - - public get overrides(): IOverrides[] { - return this._overrides; - } - - public get keys(): string[] { - return this._keys; - } - public get errors(): any[] { return this._parseErrors; } - public merge(other: IConfigModel, overwrite: boolean = true): ConfigModel { - const mergedModel = new ConfigModel(null); - this.doMerge(mergedModel, this, overwrite); - this.doMerge(mergedModel, other, overwrite); - return mergedModel; - } - - protected doMerge(source: ConfigModel, target: IConfigModel, overwrite: boolean = true) { - merge(source.contents, objects.clone(target.contents), overwrite); - const overrides = objects.clone(source.overrides); - for (const override of target.overrides) { - const [sourceOverride] = overrides.filter(o => arrays.equals(o.identifiers, override.identifiers)); - if (sourceOverride) { - merge(sourceOverride.contents, override.contents, overwrite); - } else { - overrides.push(override); - } - } - source._overrides = overrides; - } - - public getContentsFor(section: string): V { - return objects.clone(this.contents[section]); - } - - public configWithOverrides(identifier: string): ConfigModel { - const result = new ConfigModel(null); - const contents = objects.clone(this.contents); - if (this.overrides) { - for (const override of this.overrides) { - if (override.identifiers.indexOf(identifier) !== -1) { - merge(contents, override.contents, true); - } - } - } - result._contents = contents; - return result; - } - public update(content: string): void { let parsed: T = {}; let overrides: Overrides[] = []; @@ -243,31 +193,6 @@ export class ConfigModel implements IConfigModel { } } -export class DefaultConfigModel extends ConfigModel { - - constructor() { - super(null); - this.update(); - } - - public get keys(): string[] { - return this._keys; - } - - public update(): void { - this._contents = getDefaultValues(); // defaults coming from contributions to registries - this._keys = getConfigurationKeys(); - this._overrides = Object.keys(this._contents) - .filter(key => OVERRIDE_PROPERTY_PATTERN.test(key)) - .map(key => { - return >{ - identifiers: [overrideIdentifierFromKey(key).trim()], - contents: toValuesTree(this._contents[key], message => console.error(`Conflict in default settings file: ${message}`)) - }; - }); - } -} - export function overrideIdentifierFromKey(key: string): string { return key.substring(1, key.length - 1); } diff --git a/src/vs/platform/configuration/node/configurationService.ts b/src/vs/platform/configuration/node/configurationService.ts index ea7164b96a148..3f7a1e9c22cf1 100644 --- a/src/vs/platform/configuration/node/configurationService.ts +++ b/src/vs/platform/configuration/node/configurationService.ts @@ -10,15 +10,15 @@ import { ConfigWatcher } from 'vs/base/node/config'; import { Registry } from 'vs/platform/platform'; import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; import { IDisposable, toDisposable, Disposable } from 'vs/base/common/lifecycle'; -import { ConfigurationSource, IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, getConfigurationValue, IConfigurationKeys, IConfigModel, IConfigurationOptions } from 'vs/platform/configuration/common/configuration'; -import { ConfigModel, DefaultConfigModel } from 'vs/platform/configuration/common/model'; +import { ConfigurationSource, IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, getConfigurationValue, IConfigurationKeys, Configuration, IConfigurationOptions } from 'vs/platform/configuration/common/configuration'; +import { CustomConfiguration, DefaultConfiguration } from 'vs/platform/configuration/common/model'; import Event, { Emitter } from 'vs/base/common/event'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; export interface ICache { - defaults: IConfigModel; - user: IConfigModel; - consolidated: IConfigModel; + defaults: Configuration; + user: Configuration; + consolidated: Configuration; } export class ConfigurationService extends Disposable implements IConfigurationService, IDisposable { @@ -26,7 +26,7 @@ export class ConfigurationService extends Disposable implements IConfiguratio _serviceBrand: any; private cache: ICache; - private userConfigModelWatcher: ConfigWatcher>; + private userConfigModelWatcher: ConfigWatcher>; private _onDidUpdateConfiguration: Emitter = this._register(new Emitter()); public readonly onDidUpdateConfiguration: Event = this._onDidUpdateConfiguration.event; @@ -37,8 +37,8 @@ export class ConfigurationService extends Disposable implements IConfiguratio super(); this.userConfigModelWatcher = new ConfigWatcher(environmentService.appSettingsPath, { - changeBufferDelay: 300, defaultConfig: new ConfigModel(null, environmentService.appSettingsPath), parse: (content: string, parseErrors: any[]) => { - const userConfigModel = new ConfigModel(content, environmentService.appSettingsPath); + changeBufferDelay: 300, defaultConfig: new CustomConfiguration(null, environmentService.appSettingsPath), parse: (content: string, parseErrors: any[]) => { + const userConfigModel = new CustomConfiguration(content, environmentService.appSettingsPath); parseErrors = [...userConfigModel.errors]; return userConfigModel; } @@ -77,7 +77,7 @@ export class ConfigurationService extends Disposable implements IConfiguratio public getConfiguration(arg?: any): C { const options = this.toOptions(arg); const cache = this.getCache(); - const configModel = options.overrideIdentifier ? cache.consolidated.configWithOverrides(options.overrideIdentifier) : cache.consolidated; + const configModel = options.overrideIdentifier ? cache.consolidated.override(options.overrideIdentifier) : cache.consolidated; return options.section ? configModel.getContentsFor(options.section) : configModel.contents; } @@ -86,9 +86,9 @@ export class ConfigurationService extends Disposable implements IConfiguratio // make sure to clone the configuration so that the receiver does not tamper with the values return { - default: objects.clone(getConfigurationValue(overrideIdentifier ? cache.defaults.configWithOverrides(overrideIdentifier).contents : cache.defaults.contents, key)), - user: objects.clone(getConfigurationValue(overrideIdentifier ? cache.user.configWithOverrides(overrideIdentifier).contents : cache.user.contents, key)), - value: objects.clone(getConfigurationValue(overrideIdentifier ? cache.consolidated.configWithOverrides(overrideIdentifier).contents : cache.consolidated.contents, key)) + default: objects.clone(getConfigurationValue(overrideIdentifier ? cache.defaults.override(overrideIdentifier).contents : cache.defaults.contents, key)), + user: objects.clone(getConfigurationValue(overrideIdentifier ? cache.user.override(overrideIdentifier).contents : cache.user.contents, key)), + value: objects.clone(getConfigurationValue(overrideIdentifier ? cache.consolidated.override(overrideIdentifier).contents : cache.consolidated.contents, key)) }; } @@ -116,7 +116,7 @@ export class ConfigurationService extends Disposable implements IConfiguratio } private consolidateConfigurations(): ICache { - const defaults = new DefaultConfigModel(); + const defaults = new DefaultConfiguration(); const user = this.userConfigModelWatcher.getConfig(); const consolidated = defaults.merge(user); return { defaults, user, consolidated }; diff --git a/src/vs/platform/configuration/test/common/configuration.test.ts b/src/vs/platform/configuration/test/common/configuration.test.ts new file mode 100644 index 0000000000000..69552e758fb35 --- /dev/null +++ b/src/vs/platform/configuration/test/common/configuration.test.ts @@ -0,0 +1,79 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import { Configuration, merge } from 'vs/platform/configuration/common/configuration'; +import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; +import { Registry } from 'vs/platform/platform'; + +suite('Configuration', () => { + + suiteSetup(() => { + Registry.as(Extensions.Configuration).registerConfiguration({ + 'id': 'a', + 'order': 1, + 'title': 'a', + 'type': 'object', + 'properties': { + 'a': { + 'description': 'a', + 'type': 'boolean', + 'default': true, + 'overridable': true + } + } + }); + }); + + test('simple merge', () => { + let base = { 'a': 1, 'b': 2 }; + merge(base, { 'a': 3, 'c': 4 }, true); + assert.deepEqual(base, { 'a': 3, 'b': 2, 'c': 4 }); + base = { 'a': 1, 'b': 2 }; + merge(base, { 'a': 3, 'c': 4 }, false); + assert.deepEqual(base, { 'a': 1, 'b': 2, 'c': 4 }); + }); + + test('Recursive merge', () => { + const base = { 'a': { 'b': 1 } }; + merge(base, { 'a': { 'b': 2 } }, true); + assert.deepEqual(base, { 'a': { 'b': 2 } }); + }); + + test('simple merge using configuration', () => { + let base = new Configuration({ 'a': 1, 'b': 2 }); + let add = new Configuration({ 'a': 3, 'c': 4 }); + let result = base.merge(add); + assert.deepEqual(result.contents, { 'a': 3, 'b': 2, 'c': 4 }); + }); + + test('Recursive merge using config models', () => { + let base = new Configuration({ 'a': { 'b': 1 } }); + let add = new Configuration({ 'a': { 'b': 2 } }); + let result = base.merge(add); + assert.deepEqual(result.contents, { 'a': { 'b': 2 } }); + }); + + test('Test contents while getting an existing property', () => { + let testObject = new Configuration({ 'a': 1 }); + assert.deepEqual(testObject.getContentsFor('a'), 1); + + testObject = new Configuration({ 'a': { 'b': 1 } }); + assert.deepEqual(testObject.getContentsFor('a'), { 'b': 1 }); + }); + + test('Test contents are undefined for non existing properties', () => { + const testObject = new Configuration({ awesome: true }); + + assert.deepEqual(testObject.getContentsFor('unknownproperty'), undefined); + }); + + test('Test override gives all content merged with overrides', () => { + const testObject = new Configuration({ 'a': 1, 'c': 1 }, [{ identifiers: ['b'], contents: { 'a': 2 } }]); + + assert.deepEqual(testObject.override('b').contents, { 'a': 2, 'c': 1 }); + }); +}); \ No newline at end of file diff --git a/src/vs/platform/configuration/test/common/model.test.ts b/src/vs/platform/configuration/test/common/model.test.ts index db7edc4c0d751..e2f3bb6e99720 100644 --- a/src/vs/platform/configuration/test/common/model.test.ts +++ b/src/vs/platform/configuration/test/common/model.test.ts @@ -5,11 +5,11 @@ 'use strict'; import * as assert from 'assert'; -import * as model from 'vs/platform/configuration/common/model'; +import { CustomConfiguration, DefaultConfiguration } from 'vs/platform/configuration/common/model'; import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; import { Registry } from 'vs/platform/platform'; -suite('ConfigurationService - Model', () => { +suite('Configuration', () => { suiteSetup(() => { Registry.as(Extensions.Configuration).registerConfiguration({ @@ -28,62 +28,47 @@ suite('ConfigurationService - Model', () => { }); }); - test('simple merge', () => { - let base = { 'a': 1, 'b': 2 }; - model.merge(base, { 'a': 3, 'c': 4 }, true); - assert.deepEqual(base, { 'a': 3, 'b': 2, 'c': 4 }); - base = { 'a': 1, 'b': 2 }; - model.merge(base, { 'a': 3, 'c': 4 }, false); - assert.deepEqual(base, { 'a': 1, 'b': 2, 'c': 4 }); - }); - - test('Recursive merge', () => { - const base = { 'a': { 'b': 1 } }; - model.merge(base, { 'a': { 'b': 2 } }, true); - assert.deepEqual(base, { 'a': { 'b': 2 } }); - }); - test('simple merge using models', () => { - let base = new model.ConfigModel(JSON.stringify({ 'a': 1, 'b': 2 })); - let add = new model.ConfigModel(JSON.stringify({ 'a': 3, 'c': 4 })); + let base = new CustomConfiguration(JSON.stringify({ 'a': 1, 'b': 2 })); + let add = new CustomConfiguration(JSON.stringify({ 'a': 3, 'c': 4 })); let result = base.merge(add); assert.deepEqual(result.contents, { 'a': 3, 'b': 2, 'c': 4 }); }); test('simple merge with an undefined contents', () => { - let base = new model.ConfigModel(JSON.stringify({ 'a': 1, 'b': 2 })); - let add = new model.ConfigModel(null); + let base = new CustomConfiguration(JSON.stringify({ 'a': 1, 'b': 2 })); + let add = new CustomConfiguration(null); let result = base.merge(add); assert.deepEqual(result.contents, { 'a': 1, 'b': 2 }); - base = new model.ConfigModel(null); - add = new model.ConfigModel(JSON.stringify({ 'a': 1, 'b': 2 })); + base = new CustomConfiguration(null); + add = new CustomConfiguration(JSON.stringify({ 'a': 1, 'b': 2 })); result = base.merge(add); assert.deepEqual(result.contents, { 'a': 1, 'b': 2 }); - base = new model.ConfigModel(null); - add = new model.ConfigModel(null); + base = new CustomConfiguration(null); + add = new CustomConfiguration(null); result = base.merge(add); assert.deepEqual(result.contents, {}); }); test('Recursive merge using config models', () => { - let base = new model.ConfigModel(JSON.stringify({ 'a': { 'b': 1 } })); - let add = new model.ConfigModel(JSON.stringify({ 'a': { 'b': 2 } })); + let base = new CustomConfiguration(JSON.stringify({ 'a': { 'b': 1 } })); + let add = new CustomConfiguration(JSON.stringify({ 'a': { 'b': 2 } })); let result = base.merge(add); assert.deepEqual(result.contents, { 'a': { 'b': 2 } }); }); test('Test contents while getting an existing property', () => { - let testObject = new model.ConfigModel(JSON.stringify({ 'a': 1 })); + let testObject = new CustomConfiguration(JSON.stringify({ 'a': 1 })); assert.deepEqual(testObject.getContentsFor('a'), 1); - testObject = new model.ConfigModel(JSON.stringify({ 'a': { 'b': 1 } })); + testObject = new CustomConfiguration(JSON.stringify({ 'a': { 'b': 1 } })); assert.deepEqual(testObject.getContentsFor('a'), { 'b': 1 }); }); test('Test contents are undefined for non existing properties', () => { - const testObject = new model.ConfigModel(JSON.stringify({ + const testObject = new CustomConfiguration(JSON.stringify({ awesome: true })); @@ -91,25 +76,25 @@ suite('ConfigurationService - Model', () => { }); test('Test contents are undefined for undefined config', () => { - const testObject = new model.ConfigModel(null); + const testObject = new CustomConfiguration(null); assert.deepEqual(testObject.getContentsFor('unknownproperty'), undefined); }); test('Test configWithOverrides gives all content merged with overrides', () => { - const testObject = new model.ConfigModel(JSON.stringify({ 'a': 1, 'c': 1, '[b]': { 'a': 2 } })); + const testObject = new CustomConfiguration(JSON.stringify({ 'a': 1, 'c': 1, '[b]': { 'a': 2 } })); - assert.deepEqual(testObject.configWithOverrides('b').contents, { 'a': 2, 'c': 1, '[b]': { 'a': 2 } }); + assert.deepEqual(testObject.override('b').contents, { 'a': 2, 'c': 1, '[b]': { 'a': 2 } }); }); test('Test configWithOverrides gives empty contents', () => { - const testObject = new model.ConfigModel(null); + const testObject = new CustomConfiguration(null); - assert.deepEqual(testObject.configWithOverrides('b').contents, {}); + assert.deepEqual(testObject.override('b').contents, {}); }); test('Test update with empty data', () => { - const testObject = new model.ConfigModel(); + const testObject = new CustomConfiguration(); testObject.update(''); assert.deepEqual(testObject.contents, {}); @@ -140,7 +125,7 @@ suite('ConfigurationService - Model', () => { } } }); - assert.equal(true, new model.DefaultConfigModel().getContentsFor('a')); + assert.equal(true, new DefaultConfiguration().getContentsFor('a')); }); test('Test registering the language property', () => { @@ -157,7 +142,7 @@ suite('ConfigurationService - Model', () => { } } }); - assert.equal(undefined, new model.DefaultConfigModel().getContentsFor('[a]')); + assert.equal(undefined, new DefaultConfiguration().getContentsFor('[a]')); }); }); \ No newline at end of file diff --git a/src/vs/workbench/services/configuration/common/configurationModels.ts b/src/vs/workbench/services/configuration/common/configurationModels.ts index 10f1fb17a9d02..d6ad817c30e69 100644 --- a/src/vs/workbench/services/configuration/common/configurationModels.ts +++ b/src/vs/workbench/services/configuration/common/configurationModels.ts @@ -4,12 +4,12 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { ConfigModel } from 'vs/platform/configuration/common/model'; +import { CustomConfiguration } from 'vs/platform/configuration/common/model'; import { WORKSPACE_STANDALONE_CONFIGURATIONS } from 'vs/workbench/services/configuration/common/configuration'; import { Registry } from 'vs/platform/platform'; import { IConfigurationRegistry, IConfigurationPropertySchema, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; -export class ScopedConfigModel extends ConfigModel { +export class ScopedConfigModel extends CustomConfiguration { constructor(content: string, name: string, public readonly scope: string) { super(null, name); @@ -25,7 +25,7 @@ export class ScopedConfigModel extends ConfigModel { } -export class WorkspaceSettingsConfigModel extends ConfigModel { +export class WorkspaceSettingsConfigModel extends CustomConfiguration { private _raw: T; private _unsupportedKeys: string[]; @@ -62,7 +62,7 @@ export class WorkspaceSettingsConfigModel extends ConfigModel { } } -export class WorkspaceConfigModel extends ConfigModel { +export class WorkspaceConfigModel extends CustomConfiguration { constructor(public readonly workspaceSettingsConfig: WorkspaceSettingsConfigModel, private scopedConfigs: ScopedConfigModel[]) { super(); diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index 27661ffa4cb3f..cb06494acb227 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -20,9 +20,8 @@ import * as extfs from 'vs/base/node/extfs'; import { IWorkspaceContextService, IWorkspace2, Workspace as SingleRootWorkspace, IWorkspace } from "vs/platform/workspace/common/workspace"; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { FileChangeType, FileChangesEvent, isEqual } from 'vs/platform/files/common/files'; -import { ConfigModel } from 'vs/platform/configuration/common/model'; import { ScopedConfigModel, WorkspaceConfigModel, WorkspaceSettingsConfigModel } from 'vs/workbench/services/configuration/common/configurationModels'; -import { IConfigurationServiceEvent, ConfigurationSource, getConfigurationValue, IConfigModel, IConfigurationOptions } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationServiceEvent, ConfigurationSource, getConfigurationValue, IConfigurationOptions, Configuration } from 'vs/platform/configuration/common/configuration'; import { IWorkspaceConfigurationValues, IWorkspaceConfigurationService, IWorkspaceConfigurationValue, WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME, WORKSPACE_STANDALONE_CONFIGURATIONS, WORKSPACE_CONFIG_DEFAULT_PATH } from 'vs/workbench/services/configuration/common/configuration'; import { ConfigurationService as GlobalConfigurationService } from 'vs/platform/configuration/node/configurationService'; @@ -68,11 +67,11 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private baseConfigurationService: GlobalConfigurationService; - private cachedConfig: ConfigModel; + private cachedConfig: Configuration; private cachedWorkspaceConfig: WorkspaceConfigModel; private bulkFetchFromWorkspacePromise: TPromise; - private workspaceFilePathToConfiguration: { [relativeWorkspacePath: string]: TPromise> }; + private workspaceFilePathToConfiguration: { [relativeWorkspacePath: string]: TPromise> }; private reloadConfigurationScheduler: RunOnceScheduler; private readonly workspace: Workspace; @@ -83,7 +82,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp this.workspace = singleRootWorkspace ? new Workspace(singleRootWorkspace.resource.toString(), [singleRootWorkspace.resource]) : null; this.workspaceFilePathToConfiguration = Object.create(null); - this.cachedConfig = new ConfigModel(null); + this.cachedConfig = new Configuration(); this.cachedWorkspaceConfig = new WorkspaceConfigModel(new WorkspaceSettingsConfigModel(null), []); this.baseConfigurationService = this._register(new GlobalConfigurationService(environmentService)); @@ -162,7 +161,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } // update cached config when base config changes - const configModel = >this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify) + const configModel = >this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify) .merge(this.cachedWorkspaceConfig); // workspace configured values // emit this as update to listeners if changed @@ -184,7 +183,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp public getConfiguration(options?: IConfigurationOptions): C public getConfiguration(arg?: any): C { const options = this.toOptions(arg); - const configModel = options.overrideIdentifier ? this.cachedConfig.configWithOverrides(options.overrideIdentifier) : this.cachedConfig; + const configModel = options.overrideIdentifier ? this.cachedConfig.override(options.overrideIdentifier) : this.cachedConfig; return options.section ? configModel.getContentsFor(options.section) : configModel.contents; } @@ -193,8 +192,8 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp return { default: configurationValue.default, user: configurationValue.user, - workspace: objects.clone(getConfigurationValue(overrideIdentifier ? this.cachedWorkspaceConfig.configWithOverrides(overrideIdentifier).contents : this.cachedWorkspaceConfig.contents, key)), - value: objects.clone(getConfigurationValue(overrideIdentifier ? this.cachedConfig.configWithOverrides(overrideIdentifier).contents : this.cachedConfig.contents, key)) + workspace: objects.clone(getConfigurationValue(overrideIdentifier ? this.cachedWorkspaceConfig.override(overrideIdentifier).contents : this.cachedWorkspaceConfig.contents, key)), + value: objects.clone(getConfigurationValue(overrideIdentifier ? this.cachedConfig.override(overrideIdentifier).contents : this.cachedConfig.contents, key)) }; } @@ -268,7 +267,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp this.cachedWorkspaceConfig = new WorkspaceConfigModel(workspaceSettingsConfig, otherConfigModels); // Override base (global < user) with workspace locals (global < user < workspace) - this.cachedConfig = >this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify) + this.cachedConfig = >this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify) .merge(this.cachedWorkspaceConfig); // workspace configured values return { @@ -278,7 +277,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp }); } - private loadWorkspaceConfigFiles(): TPromise<{ [relativeWorkspacePath: string]: IConfigModel }> { + private loadWorkspaceConfigFiles(): TPromise<{ [relativeWorkspacePath: string]: Configuration }> { // Return early if we don't have a workspace if (!this.workspace) { @@ -363,7 +362,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } } - private createConfigModel(content: IContent): IConfigModel { + private createConfigModel(content: IContent): Configuration { const path = this.toWorkspaceRelativePath(content.resource); if (path === WORKSPACE_CONFIG_DEFAULT_PATH) { return new WorkspaceSettingsConfigModel(content.value, content.resource.toString()); @@ -374,7 +373,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } } - return new ConfigModel(null); + return new Configuration(); } private isWorkspaceConfigurationFile(workspaceRelativePath: string): boolean { From a807a515bb9bcc0ff06a6d277f219d325c60e5f7 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 14 Jun 2017 16:32:00 +0200 Subject: [PATCH 1824/2747] fixes #26642 --- extensions/git/src/model.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index 56479c7121c93..4b2cf90035049 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -597,12 +597,13 @@ export class Model implements Disposable { const repositoryRoot = await this._git.getRepositoryRoot(this.workspaceRoot.fsPath); this.repository = this._git.open(repositoryRoot); - const onGitChange = filterEvent(this.onWorkspaceChange, uri => /\/\.git\//.test(uri.fsPath)); - const onRelevantGitChange = filterEvent(onGitChange, uri => !/\/\.git\/index\.lock$/.test(uri.fsPath)); + const onGitChange = filterEvent(this.onWorkspaceChange, uri => /\/\.git\//.test(uri.path)); + const onRelevantGitChange = filterEvent(onGitChange, uri => !/\/\.git\/index\.lock$/.test(uri.path)); + onRelevantGitChange(this.onFSChange, this, disposables); onRelevantGitChange(this._onDidChangeRepository.fire, this._onDidChangeRepository, disposables); - const onNonGitChange = filterEvent(this.onWorkspaceChange, uri => !/\/\.git\//.test(uri.fsPath)); + const onNonGitChange = filterEvent(this.onWorkspaceChange, uri => !/\/\.git\//.test(uri.path)); onNonGitChange(this.onFSChange, this, disposables); this.repositoryDisposable = combinedDisposable(disposables); From e8d9cb2fd679f39e065e34ed49cccd0e1238dc85 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 14 Jun 2017 16:32:56 +0200 Subject: [PATCH 1825/2747] Fixes #9634: Set rulers width with a value that maximizez the likelihood that all rulers are rendered with equal screen width --- src/vs/base/browser/dom.ts | 13 +++++++++++++ src/vs/editor/browser/viewParts/rulers/rulers.css | 1 - src/vs/editor/browser/viewParts/rulers/rulers.ts | 4 +++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts index 228550b57afe7..d0dfb1d885ced 100644 --- a/src/vs/base/browser/dom.ts +++ b/src/vs/base/browser/dom.ts @@ -1041,3 +1041,16 @@ export function domContentLoaded(): TPromise { } }); } + +/** + * Find a value usable for a dom node size such that the likelihood that it would be + * displayed with constant screen pixels size is as high as possible. + * + * e.g. We would desire for the cursors to be 2px (CSS px) wide. Under a devicePixelRatio + * of 1.25, the cursor will be 2.5 screen pixels wide. Depending on how the dom node aligns/"snaps" + * with the screen pixels, it will sometimes be rendered with 2 screen pixels, and sometimes with 3 screen pixels. + */ +export function computeScreenAwareSize(cssPx: number): number { + const screenPx = window.devicePixelRatio * cssPx; + return Math.max(1, Math.floor(screenPx)) / window.devicePixelRatio; +} diff --git a/src/vs/editor/browser/viewParts/rulers/rulers.css b/src/vs/editor/browser/viewParts/rulers/rulers.css index 3012d205f67d2..d3d2d26ec95a3 100644 --- a/src/vs/editor/browser/viewParts/rulers/rulers.css +++ b/src/vs/editor/browser/viewParts/rulers/rulers.css @@ -5,6 +5,5 @@ .monaco-editor .view-ruler { position: absolute; - width: 1px; top: 0; } \ No newline at end of file diff --git a/src/vs/editor/browser/viewParts/rulers/rulers.ts b/src/vs/editor/browser/viewParts/rulers/rulers.ts index 852eb07fb2c6a..6a5e95b0b8cd0 100644 --- a/src/vs/editor/browser/viewParts/rulers/rulers.ts +++ b/src/vs/editor/browser/viewParts/rulers/rulers.ts @@ -13,6 +13,7 @@ import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/v import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorRuler } from 'vs/editor/common/view/editorColorRegistry'; +import * as dom from 'vs/base/browser/dom'; export class Rulers extends ViewPart { @@ -69,11 +70,12 @@ export class Rulers extends ViewPart { } if (currentCount < desiredCount) { - // Add more rulers + const rulerWidth = dom.computeScreenAwareSize(1); let addCount = desiredCount - currentCount; while (addCount > 0) { let node = createFastDomNode(document.createElement('div')); node.setClassName('view-ruler'); + node.setWidth(rulerWidth); this.domNode.appendChild(node); this._renderedRulers.push(node); addCount--; From b275782509b8444c71e75273878b4703059e70d8 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 14 Jun 2017 16:38:33 +0200 Subject: [PATCH 1826/2747] fileService.resolveFiles --- src/vs/platform/files/common/files.ts | 5 +++++ .../workbench/services/files/electron-browser/fileService.ts | 4 ++++ src/vs/workbench/services/files/node/fileService.ts | 4 ++++ src/vs/workbench/test/workbenchTestServices.ts | 4 ++++ 4 files changed, 17 insertions(+) diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index 94d4d0295ddf9..93cbdb6f3f90d 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -43,6 +43,11 @@ export interface IFileService { */ resolveFile(resource: URI, options?: IResolveFileOptions): TPromise; + /** + * Same as resolveFile but supports resolving mulitple resources in parallel. + */ + resolveFiles(toResolve: { resource: URI, options?: IResolveFileOptions }[]): TPromise; + /** *Finds out if a file identified by the resource exists. */ diff --git a/src/vs/workbench/services/files/electron-browser/fileService.ts b/src/vs/workbench/services/files/electron-browser/fileService.ts index 0fba07f5e29ef..bca7ac11986ce 100644 --- a/src/vs/workbench/services/files/electron-browser/fileService.ts +++ b/src/vs/workbench/services/files/electron-browser/fileService.ts @@ -186,6 +186,10 @@ export class FileService implements IFileService { return this.raw.resolveFile(resource, options); } + public resolveFiles(toResolve: { resource: uri, options?: IResolveFileOptions }[]): TPromise { + return this.raw.resolveFiles(toResolve); + } + public existsFile(resource: uri): TPromise { return this.raw.existsFile(resource); } diff --git a/src/vs/workbench/services/files/node/fileService.ts b/src/vs/workbench/services/files/node/fileService.ts index a00926d40bb52..a0e9e75e967e6 100644 --- a/src/vs/workbench/services/files/node/fileService.ts +++ b/src/vs/workbench/services/files/node/fileService.ts @@ -157,6 +157,10 @@ export class FileService implements IFileService { return this.resolve(resource, options); } + public resolveFiles(toResolve: { resource: uri, options?: IResolveFileOptions }[]): TPromise { + return TPromise.join(toResolve.map(resourceAndOptions => this.resolve(resourceAndOptions.resource, resourceAndOptions.options))); + } + public existsFile(resource: uri): TPromise { return this.resolveFile(resource).then(() => true, () => false); } diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index dc3c013b40461..3b299beef00fe 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -625,6 +625,10 @@ export class TestFileService implements IFileService { }); } + resolveFiles(toResolve: { resource: URI, options?: IResolveFileOptions }[]): TPromise { + return TPromise.join(toResolve.map(resourceAndOption => this.resolveFile(resourceAndOption.resource, resourceAndOption.options))); + } + existsFile(resource: URI): TPromise { return TPromise.as(null); } From cf82d0c894f813fdf93da910ecab4f90a76aa716 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Wed, 14 Jun 2017 16:42:13 +0200 Subject: [PATCH 1827/2747] Fixes #28542: Set indent guides and cursors width with values that maximize the likelihood that all are rendered with equal screen width --- .../editor/browser/viewParts/indentGuides/indentGuides.css | 1 - src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts | 4 +++- src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.css b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.css index 7cd5f89fd9f0c..45992137d1820 100644 --- a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.css +++ b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.css @@ -9,5 +9,4 @@ */ .monaco-editor .lines-content .cigr { position: absolute; - width: 1px; } diff --git a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts index 5b3a301abc036..caa4f1449a889 100644 --- a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts +++ b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts @@ -12,6 +12,7 @@ import { RenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorIndentGuides } from 'vs/editor/common/view/editorColorRegistry'; +import * as dom from 'vs/base/browser/dom'; export class IndentGuidesOverlay extends DynamicViewOverlay { @@ -85,6 +86,7 @@ export class IndentGuidesOverlay extends DynamicViewOverlay { const tabSize = this._context.model.getTabSize(); const tabWidth = tabSize * this._spaceWidth; const lineHeight = this._lineHeight; + const indentGuideWidth = dom.computeScreenAwareSize(1); let output: string[] = []; for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) { @@ -94,7 +96,7 @@ export class IndentGuidesOverlay extends DynamicViewOverlay { let result = ''; let left = 0; for (let i = 0; i < indent; i++) { - result += `
      `; + result += `
      `; left += tabWidth; } diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts index babe35b4178ae..5288f92d7ea0c 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts @@ -12,6 +12,7 @@ import { Configuration } from 'vs/editor/browser/config/configuration'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import * as dom from 'vs/base/browser/dom'; export interface IViewCursorRenderData { domNode: HTMLElement; @@ -137,9 +138,9 @@ export class ViewCursor { } let width: number; if (this._cursorStyle === TextEditorCursorStyle.Line) { - width = 2; + width = dom.computeScreenAwareSize(2); } else { - width = 1; + width = dom.computeScreenAwareSize(1); } const top = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta; return new ViewCursorRenderData(top, visibleRange.left, width, ''); From 5de63ca0e29d7e32297b2de3e0ea860c99940f78 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 14 Jun 2017 16:41:12 +0200 Subject: [PATCH 1828/2747] explorerModel: Model --- .../parts/files/common/explorerModel.ts | 45 ++++++++++++++++++- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/files/common/explorerModel.ts b/src/vs/workbench/parts/files/common/explorerModel.ts index f7463ababd977..7dfe1c667fa62 100644 --- a/src/vs/workbench/parts/files/common/explorerModel.ts +++ b/src/vs/workbench/parts/files/common/explorerModel.ts @@ -7,11 +7,12 @@ import URI from 'vs/base/common/uri'; import paths = require('vs/base/common/paths'); +import { ResourceMap } from 'vs/base/common/map'; +import { isLinux } from 'vs/base/common/platform'; import { IFileStat, isEqual, isParent, isEqualOrParent } from 'vs/platform/files/common/files'; import { IEditorInput } from 'vs/platform/editor/common/editor'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IEditorGroup, toResource } from 'vs/workbench/common/editor'; -import { ResourceMap } from 'vs/base/common/map'; -import { isLinux } from 'vs/base/common/platform'; export enum StatType { FILE, @@ -19,6 +20,46 @@ export enum StatType { ANY } +export class Model { + + private _roots: FileStat[]; + + constructor( @IWorkspaceContextService private contextService: IWorkspaceContextService) { + const setRoots = () => this._roots = this.contextService.getWorkspace2().roots.map(uri => new FileStat(uri)); + this.contextService.onDidChangeWorkspaceRoots(() => setRoots()); + setRoots(); + } + + public get roots(): FileStat[] { + return this._roots; + } + + /** + * Returns a child stat from this stat that matches with the provided path. + * Starts matching from the first root. + * Will return "null" in case the child does not exist. + */ + public findAll(resource: URI): FileStat[] { + return this.roots.map(root => root.find(resource)).filter(stat => !!stat); + } + + public findFirst(resource: URI): FileStat { + for (let root of this.roots) { + const result = root.find(resource); + if (result) { + return result; + } + } + + return null; + } + + public rootForResource(resource: URI): FileStat { + // TODO@Isidor temporary until we have a utility method for this + return this.roots[0]; + } +} + export class FileStat implements IFileStat { public resource: URI; public name: string; From 27272d8cb8e5c3f299c102163f42affae7ed2663 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 14 Jun 2017 16:53:55 +0200 Subject: [PATCH 1829/2747] fix decoration render option test failure --- .../test/browser/services/decorationRenderOptions.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts index d68266803a77a..00132c93923ac 100644 --- a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts +++ b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts @@ -67,7 +67,7 @@ suite('Decoration Render Options', () => { var s = new CodeEditorServiceImpl(themeService, styleSheet); s.registerDecorationType('example', options); var sheet = readStyleSheet(styleSheet); - assert.equal(sheet, '.monaco-editor .ced-example-0 { background-color: rgb(255, 0, 0); }'); + assert.equal(sheet, '.monaco-editor .ced-example-0 { background-color: rgb(255, 0, 0); border-color: transparent; box-sizing: border-box; }'); colors = { editorBackground: '#EE0000', From 1e76d7a07fecc8b88bdd7938acf61ccbc52d7981 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 14 Jun 2017 17:03:53 +0200 Subject: [PATCH 1830/2747] explorerViewer: take into account the model when getting children --- .../files/browser/views/explorerViewer.ts | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts index 2464c18f1fcbf..04f7f093da897 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts @@ -31,7 +31,7 @@ import { DuplicateFileAction, ImportFileAction, IEditableData, IFileViewletState import { IDataSource, ITree, IAccessibilityProvider, IRenderer, ContextMenuEvent, ISorter, IFilter, IDragAndDrop, IDragAndDropData, IDragOverReaction, DRAG_OVER_ACCEPT_BUBBLE_DOWN, DRAG_OVER_ACCEPT_BUBBLE_DOWN_COPY, DRAG_OVER_ACCEPT_BUBBLE_UP, DRAG_OVER_ACCEPT_BUBBLE_UP_COPY, DRAG_OVER_REJECT } from 'vs/base/parts/tree/browser/tree'; import { DesktopDragAndDropData, ExternalElementsDragAndDropData } from 'vs/base/parts/tree/browser/treeDnd'; import { ClickBehavior, DefaultController } from 'vs/base/parts/tree/browser/treeDefaults'; -import { FileStat, NewStatPlaceholder } from 'vs/workbench/parts/files/common/explorerModel'; +import { FileStat, NewStatPlaceholder, Model } from 'vs/workbench/parts/files/common/explorerModel'; import { DragMouseEvent, IMouseEvent } from 'vs/base/browser/mouseEvent'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IPartService } from 'vs/workbench/services/part/common/partService'; @@ -51,6 +51,16 @@ import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { attachInputBoxStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; +// Multiple of the same folder in the explorer - id needs to get more complex, add index for the parent +// check context menu actions +// special context menu actions for root +// more checks might be needed for drag n drop +// step2: deleting one of the root folders +// Resolve me all the expansion state in one go +// revealing an element might be tricky if it is in two workspaces, in that case just reveal the first to not break. Not a common scenario + +// files.exclude, for each of the roots ask the configurations service for files.exclude + export class FileDataSource implements IDataSource { constructor( @IProgressService private progressService: IProgressService, @@ -61,14 +71,18 @@ export class FileDataSource implements IDataSource { ) { } public getId(tree: ITree, stat: FileStat): string { - return stat.getId(); + // TODO@Isidor take the id of the root into account + return `:${stat.getId()}`; } - public hasChildren(tree: ITree, stat: FileStat): boolean { - return stat.isDirectory; + public hasChildren(tree: ITree, stat: FileStat | Model): boolean { + return stat instanceof Model || (stat instanceof FileStat && stat.isDirectory); } - public getChildren(tree: ITree, stat: FileStat): TPromise { + public getChildren(tree: ITree, stat: FileStat | Model): TPromise { + if (stat instanceof Model) { + return TPromise.as(stat.roots); + } // Return early if stat is already resolved if (stat.isDirectoryResolved) { @@ -110,8 +124,8 @@ export class FileDataSource implements IDataSource { } // Return if root reached - const workspace = this.contextService.getWorkspace(); - if (workspace && stat.resource.toString() === workspace.resource.toString()) { + const workspace = this.contextService.getWorkspace2(); + if (workspace && workspace.roots.filter(root => root.toString() === stat.resource.toString())) { return TPromise.as(null); } @@ -558,6 +572,7 @@ export class FileFilter implements IFilter { const excludesConfig = (configuration && configuration.files && configuration.files.exclude) || Object.create(null); const needsRefresh = !objects.equals(this.hiddenExpression, excludesConfig); + // This needs to be per folder this.hiddenExpression = objects.clone(excludesConfig); // do not keep the config, as it gets mutated under our hoods return needsRefresh; From c3e8d3a3231e1a6766be1f9c573b64d9eed0ae49 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 14 Jun 2017 17:17:58 +0200 Subject: [PATCH 1831/2747] explorerView: use isCreated to minimize use of root --- .../parts/files/browser/views/explorerView.ts | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index a2c1f5fd485be..0a5dd614e82f6 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -14,6 +14,7 @@ import labels = require('vs/base/common/labels'); import paths = require('vs/base/common/paths'); import { Action, IAction } from 'vs/base/common/actions'; import { prepareActions } from 'vs/workbench/browser/actions'; +import { memoize } from 'vs/base/common/decorators'; import { ITree } from 'vs/base/parts/tree/browser/tree'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { IFilesConfiguration, ExplorerFolderContext, FilesExplorerFocussedContext, ExplorerFocussedContext } from 'vs/workbench/parts/files/common/files'; @@ -26,7 +27,7 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer import * as DOM from 'vs/base/browser/dom'; import { CollapseAction } from 'vs/workbench/browser/viewlet'; import { CollapsibleView, IViewletViewOptions } from 'vs/workbench/parts/views/browser/views'; -import { FileStat } from 'vs/workbench/parts/files/common/explorerModel'; +import { FileStat, Model } from 'vs/workbench/parts/files/common/explorerModel'; import { IListService } from 'vs/platform/list/browser/listService'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IPartService } from 'vs/workbench/services/part/common/partService'; @@ -300,7 +301,7 @@ export class ExplorerView extends CollapsibleView { lastActiveFileResource = URI.parse(this.settings[ExplorerView.MEMENTO_LAST_ACTIVE_FILE_RESOURCE]); } - if (lastActiveFileResource && this.root && this.root.find(lastActiveFileResource)) { + if (lastActiveFileResource && this.isCreated && this.root.find(lastActiveFileResource)) { this.editorService.openEditor({ resource: lastActiveFileResource, options: { revealIfVisible: true } }).done(null, errors.onUnexpectedError); return refreshPromise; @@ -338,6 +339,15 @@ export class ExplorerView extends CollapsibleView { return this.explorerViewer ? (this.explorerViewer.getInput()) : null; } + private get isCreated(): boolean { + return this.explorerViewer && this.explorerViewer.getInput(); + } + + @memoize + private get model(): Model { + return this.instantiationService.createInstance(Model); + } + public createViewer(container: Builder): ITree { const dataSource = this.instantiationService.createInstance(FileDataSource); const renderer = this.instantiationService.createInstance(FileRenderer, this.viewletState); @@ -405,7 +415,7 @@ export class ExplorerView extends CollapsibleView { } private onFileOperation(e: FileOperationEvent): void { - if (!this.root) { + if (!this.isCreated) { return; // ignore if not yet created } @@ -561,7 +571,7 @@ export class ExplorerView extends CollapsibleView { const added = e.getAdded(); const deleted = e.getDeleted(); - if (!this.root) { + if (!this.isCreated) { return false; } @@ -681,7 +691,7 @@ export class ExplorerView extends CollapsibleView { } // First time refresh: Receive target through active editor input or selection and also include settings from previous session - if (!this.root) { + if (!this.isCreated) { const activeFile = this.getActiveFile(); if (activeFile) { targetsToResolve.push(activeFile); @@ -706,7 +716,7 @@ export class ExplorerView extends CollapsibleView { const modelStat = FileStat.create(stat, options.resolveTo); // First time refresh: The stat becomes the input of the viewer - if (!this.root) { + if (!this.isCreated) { explorerPromise = this.explorerViewer.setInput(modelStat).then(() => { // Make sure to expand all folders that where expanded in the previous session @@ -778,7 +788,7 @@ export class ExplorerView extends CollapsibleView { } // First try to get the stat object from the input to avoid a roundtrip - if (!this.root) { + if (!this.isCreated) { return TPromise.as(null); } @@ -849,7 +859,7 @@ export class ExplorerView extends CollapsibleView { public shutdown(): void { // Keep list of expanded folders to restore on next load - if (this.root) { + if (this.isCreated) { const expanded = this.explorerViewer.getExpandedElements() .filter((e: FileStat) => e.resource.toString() !== this.contextService.getWorkspace().resource.toString()) .map((e: FileStat) => e.resource.toString()); From 21a2765e44c7f915b5d2c1e03748bcccde0d74ec Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 14 Jun 2017 17:19:48 +0200 Subject: [PATCH 1832/2747] [json] update service (for #28010) --- extensions/json/server/npm-shrinkwrap.json | 4 ++-- extensions/json/server/package.json | 2 +- .../test/browser/services/decorationRenderOptions.test.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/json/server/npm-shrinkwrap.json b/extensions/json/server/npm-shrinkwrap.json index d199f7b2a0fb2..ae1d50bd68926 100644 --- a/extensions/json/server/npm-shrinkwrap.json +++ b/extensions/json/server/npm-shrinkwrap.json @@ -43,9 +43,9 @@ "resolved": "https://registry.npmjs.org/request-light/-/request-light-0.2.1.tgz" }, "vscode-json-languageservice": { - "version": "2.0.9", + "version": "2.0.10", "from": "vscode-json-languageservice@next", - "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-2.0.9.tgz" + "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-2.0.10.tgz" }, "vscode-jsonrpc": { "version": "3.1.0-alpha.1", diff --git a/extensions/json/server/package.json b/extensions/json/server/package.json index 6c643c0f542db..2897fd255dbef 100644 --- a/extensions/json/server/package.json +++ b/extensions/json/server/package.json @@ -10,7 +10,7 @@ "dependencies": { "jsonc-parser": "^0.4.2", "request-light": "^0.2.1", - "vscode-json-languageservice": "^2.0.9", + "vscode-json-languageservice": "^2.0.10", "vscode-languageserver": "^3.1.0-alpha.1", "vscode-nls": "^2.0.2" }, diff --git a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts index 00132c93923ac..8194b3badcc2c 100644 --- a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts +++ b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts @@ -67,7 +67,7 @@ suite('Decoration Render Options', () => { var s = new CodeEditorServiceImpl(themeService, styleSheet); s.registerDecorationType('example', options); var sheet = readStyleSheet(styleSheet); - assert.equal(sheet, '.monaco-editor .ced-example-0 { background-color: rgb(255, 0, 0); border-color: transparent; box-sizing: border-box; }'); + assert.equal(sheet, '.monaco-editor .ced-example-0 { background-color: rgb(255, 0, 0); bordcer-color: transparent; box-sizing: border-box; }'); colors = { editorBackground: '#EE0000', From 24090b6a46973762e9253a72829ca1efc757157d Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Wed, 14 Jun 2017 17:31:58 +0200 Subject: [PATCH 1833/2747] Fix typo --- .../test/browser/services/decorationRenderOptions.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts index 8194b3badcc2c..00132c93923ac 100644 --- a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts +++ b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts @@ -67,7 +67,7 @@ suite('Decoration Render Options', () => { var s = new CodeEditorServiceImpl(themeService, styleSheet); s.registerDecorationType('example', options); var sheet = readStyleSheet(styleSheet); - assert.equal(sheet, '.monaco-editor .ced-example-0 { background-color: rgb(255, 0, 0); bordcer-color: transparent; box-sizing: border-box; }'); + assert.equal(sheet, '.monaco-editor .ced-example-0 { background-color: rgb(255, 0, 0); border-color: transparent; box-sizing: border-box; }'); colors = { editorBackground: '#EE0000', From 8a4016440b7a74af9a9bebdc05d0af597bce6918 Mon Sep 17 00:00:00 2001 From: isidor Date: Wed, 14 Jun 2017 17:36:34 +0200 Subject: [PATCH 1834/2747] explorerView: reduce use of root more --- .../parts/files/browser/views/explorerView.ts | 51 +++++++++---------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index 0a5dd614e82f6..acc79c9117332 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -301,7 +301,7 @@ export class ExplorerView extends CollapsibleView { lastActiveFileResource = URI.parse(this.settings[ExplorerView.MEMENTO_LAST_ACTIVE_FILE_RESOURCE]); } - if (lastActiveFileResource && this.isCreated && this.root.find(lastActiveFileResource)) { + if (lastActiveFileResource && this.isCreated && this.model.findFirst(lastActiveFileResource)) { this.editorService.openEditor({ resource: lastActiveFileResource, options: { revealIfVisible: true } }).done(null, errors.onUnexpectedError); return refreshPromise; @@ -420,25 +420,24 @@ export class ExplorerView extends CollapsibleView { } let modelElement: FileStat; - let parent: FileStat; + let parents: FileStat[]; let parentResource: URI; - let parentElement: FileStat; // Add if (e.operation === FileOperation.CREATE || e.operation === FileOperation.IMPORT || e.operation === FileOperation.COPY) { const addedElement = e.target; parentResource = URI.file(paths.dirname(addedElement.resource.fsPath)); - parentElement = this.root.find(parentResource); + parents = this.model.findAll(parentResource); - if (parentElement) { + if (parents.length) { // Add the new file to its parent (Model) const childElement = FileStat.create(addedElement); - parentElement.removeChild(childElement); // make sure to remove any previous version of the file if any - parentElement.addChild(childElement); + parents[0].removeChild(childElement); // make sure to remove any previous version of the file if any + parents[0].addChild(childElement); // Refresh the Parent (View) - this.explorerViewer.refresh(parentElement).then(() => { + this.explorerViewer.refresh(parents).then(() => { return this.reveal(childElement, 0.5).then(() => { // Focus new element @@ -465,16 +464,16 @@ export class ExplorerView extends CollapsibleView { // Handle Rename if (oldParentResource && newParentResource && oldParentResource.toString() === newParentResource.toString()) { - modelElement = this.root.find(oldResource); + modelElement = this.model.findFirst(oldResource); if (modelElement) { // Rename File (Model) modelElement.rename(newElement); // Update Parent (View) - parent = modelElement.parent; - if (parent) { - this.explorerViewer.refresh(parent).done(() => { + parents = this.model.findAll(modelElement.parent.resource); + if (parents.length) { + this.explorerViewer.refresh(parents).done(() => { // Select in Viewer if set if (restoreFocus) { @@ -487,21 +486,21 @@ export class ExplorerView extends CollapsibleView { // Handle Move else if (oldParentResource && newParentResource) { - const oldParent = this.root.find(oldParentResource); - const newParent = this.root.find(newParentResource); - modelElement = this.root.find(oldResource); + const oldParents = this.model.findAll(oldParentResource); + const newParents = this.model.findAll(newParentResource); + modelElement = this.model.findFirst(oldResource); - if (oldParent && newParent && modelElement) { + if (oldParents.length && newParents.length && modelElement) { // Move in Model - modelElement.move(newParent, (callback: () => void) => { + modelElement.move(newParents[0], (callback: () => void) => { // Update old parent - this.explorerViewer.refresh(oldParent, true).done(callback, errors.onUnexpectedError); + this.explorerViewer.refresh(oldParents, true).done(callback, errors.onUnexpectedError); }, () => { // Update new parent - this.explorerViewer.refresh(newParent, true).done(() => this.explorerViewer.expand(newParent), errors.onUnexpectedError); + this.explorerViewer.refresh(newParents, true).done(() => this.explorerViewer.expand(newParents[0]), errors.onUnexpectedError); }); } } @@ -509,16 +508,16 @@ export class ExplorerView extends CollapsibleView { // Delete else if (e.operation === FileOperation.DELETE) { - modelElement = this.root.find(e.resource); + modelElement = this.model.findFirst(e.resource); if (modelElement && modelElement.parent) { - parent = modelElement.parent; + parents = this.model.findAll(modelElement.parent.resource); // Remove Element from Parent (Model) - parent.removeChild(modelElement); + parents[0].removeChild(modelElement); // Refresh Parent (View) const restoreFocus = this.explorerViewer.isDOMFocused(); - this.explorerViewer.refresh(parent).done(() => { + this.explorerViewer.refresh(parents).done(() => { // Ensure viewer has keyboard focus if event originates from viewer if (restoreFocus) { @@ -592,8 +591,8 @@ export class ExplorerView extends CollapsibleView { } // Compute if parent is visible and added file not yet part of it - const parentStat = this.root.find(URI.file(parent)); - if (parentStat && parentStat.isDirectoryResolved && !this.root.find(change.resource)) { + const parentStat = this.model.findFirst(URI.file(parent)); + if (parentStat && parentStat.isDirectoryResolved && !this.model.findFirst(change.resource)) { return true; } @@ -610,7 +609,7 @@ export class ExplorerView extends CollapsibleView { continue; // out of workspace file } - if (this.root.find(del.resource)) { + if (this.model.findFirst(del.resource)) { return true; } } From 476504aecfe2eada6f00e969e7dcb72f09a5be8e Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 14 Jun 2017 18:41:25 +0200 Subject: [PATCH 1835/2747] Text disappeared after update to 1.13 [Bug] (fixes #28619) --- extensions/markdown/package.json | 2 +- src/vs/editor/browser/standalone/media/standalone-tokens.css | 2 +- src/vs/workbench/electron-browser/media/shell.css | 2 +- .../workbench/parts/terminal/electron-browser/media/widgets.css | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/markdown/package.json b/extensions/markdown/package.json index 15c27055fe0e2..cbcb63c5531a5 100644 --- a/extensions/markdown/package.json +++ b/extensions/markdown/package.json @@ -161,7 +161,7 @@ }, "markdown.preview.fontFamily": { "type": "string", - "default": "system-ui, 'Segoe WPC', 'Segoe UI', 'HelveticaNeue-Light', 'Ubuntu', 'Droid Sans', sans-serif", + "default": "-apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', 'HelveticaNeue-Light', 'Ubuntu', 'Droid Sans', sans-serif", "description": "%markdown.preview.fontFamily.desc%" }, "markdown.preview.fontSize": { diff --git a/src/vs/editor/browser/standalone/media/standalone-tokens.css b/src/vs/editor/browser/standalone/media/standalone-tokens.css index de07f233940b1..b815c5e181c48 100644 --- a/src/vs/editor/browser/standalone/media/standalone-tokens.css +++ b/src/vs/editor/browser/standalone/media/standalone-tokens.css @@ -6,7 +6,7 @@ /* Default standalone editor font */ .monaco-editor { - font-family: system-ui, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; + font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; } .monaco-menu .monaco-action-bar.vertical .action-item .action-label:focus { diff --git a/src/vs/workbench/electron-browser/media/shell.css b/src/vs/workbench/electron-browser/media/shell.css index 5696fc87867aa..f734da27292c9 100644 --- a/src/vs/workbench/electron-browser/media/shell.css +++ b/src/vs/workbench/electron-browser/media/shell.css @@ -15,7 +15,7 @@ /* Font Families (with CJK support) */ -.monaco-shell { font-family: system-ui, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; } +.monaco-shell { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; } .monaco-shell:lang(zh-Hans) { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Noto Sans", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; } .monaco-shell:lang(zh-Hant) { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Noto Sans", "Microsoft Jhenghei", "PingFang TC", "Source Han Sans TC", "Source Han Sans", "Source Han Sans TW", sans-serif; } .monaco-shell:lang(ja) { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Noto Sans", "Meiryo", "Hiragino Kaku Gothic Pro", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", "Sazanami Gothic", "IPA Gothic", sans-serif; } diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/widgets.css b/src/vs/workbench/parts/terminal/electron-browser/media/widgets.css index 2549ad7016355..10751297b5954 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/widgets.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/widgets.css @@ -12,7 +12,7 @@ } .monaco-workbench .terminal-message-widget { - font-family: system-ui, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; + font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; font-size: 14px; line-height: 19px; padding: 4px 5px; From d639a81baa76ae912e6a2b48fc7e3849ff4661ed Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 14 Jun 2017 19:08:19 +0200 Subject: [PATCH 1836/2747] The unsaved (dot) indicator doesn't update when file is opened from the source code diff section (fixes #28515) --- .../common/editor/editorStacksModel.ts | 28 ++++++++++++++++--- .../test/browser/editorStacksModel.test.ts | 18 ++++++++++++ 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/common/editor/editorStacksModel.ts b/src/vs/workbench/common/editor/editorStacksModel.ts index c6bd0d5602b20..48f7308f2a314 100644 --- a/src/vs/workbench/common/editor/editorStacksModel.ts +++ b/src/vs/workbench/common/editor/editorStacksModel.ts @@ -277,8 +277,7 @@ export class EditorGroup implements IEditorGroup { targetIndex--; // accomodate for the fact that the preview editor closes } - this.closeEditor(this.preview, !makeActive); // optimization to prevent multiple setActive() in one call - this.splice(targetIndex, false, editor); + this.replaceEditor(this.preview, editor, targetIndex, !makeActive); } this.preview = editor; @@ -345,10 +344,31 @@ export class EditorGroup implements IEditorGroup { })); } + public replaceEditor(toReplace: EditorInput, replaceWidth: EditorInput, replaceIndex:number, openNext = true): void { + const event = this.doCloseEditor(toReplace, openNext); // optimization to prevent multiple setActive() in one call + + // We want to first add the new editor into our model before emitting the close event because + // firing the close event can trigger a dispose on the same editor that is now being added. + // This can lead into opening a disposed editor which is not what we want. + this.splice(replaceIndex, false, replaceWidth); + + if (event) { + this.fireEvent(this._onEditorClosed, event, true); + } + } + public closeEditor(editor: EditorInput, openNext = true): void { + const event = this.doCloseEditor(editor, openNext); + + if (event) { + this.fireEvent(this._onEditorClosed, event, true); + } + } + + private doCloseEditor(editor: EditorInput, openNext = true): EditorCloseEvent { const index = this.indexOf(editor); if (index === -1) { - return; // not found + return null; // not found } // Active Editor closed @@ -376,7 +396,7 @@ export class EditorGroup implements IEditorGroup { this.splice(index, true); // Event - this.fireEvent(this._onEditorClosed, { editor, pinned, index, group: this }, true); + return { editor, pinned, index, group: this }; } public closeEditors(except: EditorInput, direction?: Direction): void { diff --git a/src/vs/workbench/test/browser/editorStacksModel.test.ts b/src/vs/workbench/test/browser/editorStacksModel.test.ts index 8d96c2e5c807e..3df007262ae2f 100644 --- a/src/vs/workbench/test/browser/editorStacksModel.test.ts +++ b/src/vs/workbench/test/browser/editorStacksModel.test.ts @@ -1764,6 +1764,24 @@ suite('Editor Stacks Model', () => { assert.equal(input1.isDisposed(), false); }); + test('Stack - Multiple Editors - Editor Not Disposed after Closing when opening Modified side (Diff Editor)', function () { + const model = create(); + + const group1 = model.openGroup('group1'); + + const input1 = input(); + const input2 = input(); + + const diffInput = new DiffEditorInput('name', 'description', input1, input2); + + group1.openEditor(diffInput, { pinned: false, active: true }); + group1.openEditor(input1, { pinned: false, active: true }); + + assert.equal(diffInput.isDisposed(), true); + assert.equal(input2.isDisposed(), true); + assert.equal(input1.isDisposed(), false); + }); + test('Stack - Multiple Editors - Editor Disposed on Close (same input, files)', function () { const model = create(); From 555df42805abcd9074de87aa532d860341508dfb Mon Sep 17 00:00:00 2001 From: t-amqi Date: Wed, 14 Jun 2017 12:01:28 -0700 Subject: [PATCH 1837/2747] Add task entry to top-level menu --- src/vs/code/electron-main/menus.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index a2193ec6244f8..7c7cde56a1598 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -263,6 +263,11 @@ export class CodeMenu { const helpMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mHelp', comment: ['&& denotes a mnemonic'] }, "&&Help")), submenu: helpMenu, role: 'help' }); this.setHelpMenu(helpMenu); + // Tasks + const taskMenu = new Menu(); + const taskMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mTask', comment: ['&& denotes a mnemonic'] }, "&&Tasks")), submenu: taskMenu }); + this.setTaskMenu(taskMenu); + // Menu Structure if (macApplicationMenuItem) { menubar.append(macApplicationMenuItem); @@ -274,6 +279,7 @@ export class CodeMenu { menubar.append(viewMenuItem); menubar.append(gotoMenuItem); menubar.append(debugMenuItem); + menubar.append(taskMenuItem); if (macWindowMenuItem) { menubar.append(macWindowMenuItem); @@ -901,6 +907,24 @@ export class CodeMenu { } } + private setTaskMenu(taskMenu: Electron.Menu): void { + const runTask = this.createMenuItem(nls.localize({ key: 'miRunTask', comment: ['&& denotes a mnemonic'] }, "&&Run Task..."), 'workbench.action.tasks.runTask'); + const restartTask = this.createMenuItem(nls.localize({ key: 'miRestartTask', comment: ['&& denotes a mnemonic'] }, "R&&estart Task"), 'workbench.action.tasks.restartTask'); + const terminateTask = this.createMenuItem(nls.localize({ key: 'miTerminateTask', comment: ['&& denotes a mnemonic'] }, "&&Terminate Task"), 'workbench.action.tasks.terminate'); + const buildTask = this.createMenuItem(nls.localize({ key: 'miBuildTask', comment: ['&& denotes a mnemonic'] }, "&&Build Task"), 'workbench.action.tasks.build'); + const testTask = this.createMenuItem(nls.localize({ key: 'miTestTask', comment: ['&& denotes a mnemonic'] }, "Test T&&ask"), 'workbench.action.tasks.test'); + const showTaskLog = this.createMenuItem(nls.localize({ key: 'miShowTaskLog', comment: ['&& denotes a mnemonic'] }, "&&Show Task Log"), 'workbench.action.tasks.showLog'); + + [ + showTaskLog, + runTask, + restartTask, + terminateTask, + buildTask, + testTask + ].forEach(item => taskMenu.append(item)); + } + private openAccessibilityOptions(): void { let win = new BrowserWindow({ alwaysOnTop: true, From bd0101a9ff45d5ec40f8544d4d81926ad6fc5a95 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 14 Jun 2017 21:18:39 +0200 Subject: [PATCH 1838/2747] hygiene --- src/vs/workbench/common/editor/editorStacksModel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/common/editor/editorStacksModel.ts b/src/vs/workbench/common/editor/editorStacksModel.ts index 48f7308f2a314..dd41ad0eb1e50 100644 --- a/src/vs/workbench/common/editor/editorStacksModel.ts +++ b/src/vs/workbench/common/editor/editorStacksModel.ts @@ -344,7 +344,7 @@ export class EditorGroup implements IEditorGroup { })); } - public replaceEditor(toReplace: EditorInput, replaceWidth: EditorInput, replaceIndex:number, openNext = true): void { + public replaceEditor(toReplace: EditorInput, replaceWidth: EditorInput, replaceIndex: number, openNext = true): void { const event = this.doCloseEditor(toReplace, openNext); // optimization to prevent multiple setActive() in one call // We want to first add the new editor into our model before emitting the close event because From 6802b7d4d41e2695b21ad53d8544371022937950 Mon Sep 17 00:00:00 2001 From: t-amqi Date: Wed, 14 Jun 2017 12:52:17 -0700 Subject: [PATCH 1839/2747] Remove #28565 --- src/vs/code/electron-main/menus.ts | 2 -- .../quickopen/browser/commandsHandler.ts | 22 ------------------- .../browser/quickopen.contribution.ts | 6 +---- 3 files changed, 1 insertion(+), 29 deletions(-) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 7c7cde56a1598..8679eabeeefb6 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -592,7 +592,6 @@ export class CodeMenu { const output = this.createMenuItem(nls.localize({ key: 'miToggleOutput', comment: ['&& denotes a mnemonic'] }, "&&Output"), 'workbench.action.output.toggleOutput'); const debugConsole = this.createMenuItem(nls.localize({ key: 'miToggleDebugConsole', comment: ['&& denotes a mnemonic'] }, "De&&bug Console"), 'workbench.debug.action.toggleRepl'); const integratedTerminal = this.createMenuItem(nls.localize({ key: 'miToggleIntegratedTerminal', comment: ['&& denotes a mnemonic'] }, "&&Integrated Terminal"), 'workbench.action.terminal.toggleTerminal'); - const taskMenu = this.createMenuItem(nls.localize({ key: 'miShowTask', comment: ['&& denotes a mnemonic'] }, "Show Tas&&ks..."), 'workbench.action.showTasks'); const problems = this.createMenuItem(nls.localize({ key: 'miMarker', comment: ['&& denotes a mnemonic'] }, "&&Problems"), 'workbench.actions.view.problems'); let additionalViewlets: Electron.MenuItem; @@ -664,7 +663,6 @@ export class CodeMenu { problems, debugConsole, integratedTerminal, - taskMenu, __separator__(), fullscreen, toggleZenMode, diff --git a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts index 21076a5084e09..cf9fd534f85ba 100644 --- a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts @@ -149,28 +149,6 @@ export class ShowAllCommandsAction extends Action { } } -export class ShowTasksAction extends Action { - - public static ID = 'workbench.action.showTasks'; - public static LABEL = nls.localize('showTasks', "Show Task Menu"); - - constructor( - id: string, - label: string, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IConfigurationService private configurationService: IConfigurationService - ) { - super(id, label); - } - - public run(context?: any): TPromise { - const value = `${ALL_COMMANDS_PREFIX}tasks`; - this.quickOpenService.show(value); - - return TPromise.as(null); - } -} - export class ClearCommandHistoryAction extends Action { public static ID = 'workbench.action.clearCommandHistory'; diff --git a/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts b/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts index e46b5cd843234..606e882af9b30 100644 --- a/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts +++ b/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts @@ -13,7 +13,7 @@ import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { GotoSymbolAction, GOTO_SYMBOL_PREFIX, SCOPE_PREFIX } from 'vs/workbench/parts/quickopen/browser/gotoSymbolHandler'; -import { ShowAllCommandsAction, ALL_COMMANDS_PREFIX, ClearCommandHistoryAction, ShowTasksAction } from 'vs/workbench/parts/quickopen/browser/commandsHandler'; +import { ShowAllCommandsAction, ALL_COMMANDS_PREFIX, ClearCommandHistoryAction } from 'vs/workbench/parts/quickopen/browser/commandsHandler'; import { GotoLineAction, GOTO_LINE_PREFIX } from 'vs/workbench/parts/quickopen/browser/gotoLineHandler'; import { HELP_PREFIX } from 'vs/workbench/parts/quickopen/browser/helpHandler'; import { VIEW_PICKER_PREFIX, OpenViewPickerAction, QuickOpenViewPickerAction } from 'vs/workbench/parts/quickopen/browser/viewPickerHandler'; @@ -40,10 +40,6 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenViewPickerAct primary: KeyMod.CtrlCmd | KeyCode.KEY_Q, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_Q }, linux: { primary: null } }), 'Quick Open View'); -registry.registerWorkbenchAction(new SyncActionDescriptor(ShowTasksAction, ShowTasksAction.ID, ShowTasksAction.LABEL, { - primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_T -}), 'Show Task Menu'); - // Register Quick Open Handler Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpenHandler( From f0e428ac8f74feae028953bb099f11af1e7ddf8d Mon Sep 17 00:00:00 2001 From: Christof Marti Date: Wed, 14 Jun 2017 13:37:50 -0700 Subject: [PATCH 1840/2747] Configure copying to test repo --- .github/copycat.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .github/copycat.yml diff --git a/.github/copycat.yml b/.github/copycat.yml new file mode 100644 index 0000000000000..eccccc16b007d --- /dev/null +++ b/.github/copycat.yml @@ -0,0 +1,5 @@ +{ + perform: true, + target_owner: 'chrmarti', + target_repo: 'testissues' +} \ No newline at end of file From 2ebf3751e45378db505889760409864bb29507c3 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 14 Jun 2017 14:01:01 -0700 Subject: [PATCH 1841/2747] Initial nsfw prototype --- npm-shrinkwrap.json | 5 ++++ package.json | 1 + src/typings/nsfw.d.ts | 10 ++++++++ .../node/watcher/nsfw/nsfwWatcherService.ts | 23 +++++++++++++++++++ .../files/node/watcher/unix/watcherApp.ts | 4 ++-- 5 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 src/typings/nsfw.d.ts create mode 100644 src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index a1d1223cab244..4c28065065dec 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -302,6 +302,11 @@ "from": "normalize-path@>=2.0.1 <3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz" }, + "nsfw": { + "version": "1.0.15", + "from": "nsfw@1.0.15", + "resolved": "https://registry.npmjs.org/nsfw/-/nsfw-1.0.15.tgz" + }, "object.omit": { "version": "2.0.0", "from": "object.omit@>=2.0.0 <3.0.0", diff --git a/package.json b/package.json index 6536cecc87a9d..858436f3391f5 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "minimist": "1.2.0", "native-keymap": "1.2.4", "node-pty": "0.6.8", + "nsfw": "1.0.15", "semver": "4.3.6", "v8-profiler": "jrieken/v8-profiler#vscode", "vscode-debugprotocol": "1.20.0", diff --git a/src/typings/nsfw.d.ts b/src/typings/nsfw.d.ts new file mode 100644 index 0000000000000..8d80f6710b461 --- /dev/null +++ b/src/typings/nsfw.d.ts @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +declare module 'nsfw' { + function init(dir: string, ...args: any[]); + + export = init; +} diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts new file mode 100644 index 0000000000000..94462f18a4032 --- /dev/null +++ b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import nsfw = require('nsfw'); +import { IWatcherService, IWatcherRequest } from 'vs/workbench/services/files/node/watcher/unix/watcher'; +import { TPromise } from "vs/base/common/winjs.base"; + +export class NsfwWatcherService implements IWatcherService { + public watch(request: IWatcherRequest): TPromise { + console.log('nsfw ' + nsfw); + console.log('basePath ' + request.basePath); + return new TPromise((c, e, p) => { + nsfw(request.basePath, events => { + console.log(events); + p(events); + }).then(watcher => { + return watcher.start(); + }); + }); + } +} diff --git a/src/vs/workbench/services/files/node/watcher/unix/watcherApp.ts b/src/vs/workbench/services/files/node/watcher/unix/watcherApp.ts index 7c91d6c73e3fd..6f0942f996e9f 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/watcherApp.ts +++ b/src/vs/workbench/services/files/node/watcher/unix/watcherApp.ts @@ -6,9 +6,9 @@ import { Server } from 'vs/base/parts/ipc/node/ipc.cp'; import { WatcherChannel } from 'vs/workbench/services/files/node/watcher/unix/watcherIpc'; -import { ChokidarWatcherService } from 'vs/workbench/services/files/node/watcher/unix/chokidarWatcherService'; +import { NsfwWatcherService } from 'vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService'; const server = new Server(); -const service = new ChokidarWatcherService(); +const service = new NsfwWatcherService(); const channel = new WatcherChannel(service); server.registerChannel('watcher', channel); \ No newline at end of file From db82543ad9e061d7e2ef452563eef720bc7a3f29 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 14 Jun 2017 14:28:52 -0700 Subject: [PATCH 1842/2747] Uplevel xterm.js Fixes some bugs and adds the new find API --- npm-shrinkwrap.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index a1d1223cab244..4705b55d2da57 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -442,7 +442,7 @@ "xterm": { "version": "2.7.0", "from": "Tyriar/xterm.js#vscode-release/1.14", - "resolved": "git+https://github.com/Tyriar/xterm.js.git#7d3640ad17fbf69f1a1c776b6d08969e1da32875" + "resolved": "git+https://github.com/Tyriar/xterm.js.git#e6fe120ecf93e552573be45867ae03c880319e11" }, "yauzl": { "version": "2.3.1", From 5c39083a4cb514505bf9ec465502b4d49c958537 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 14 Jun 2017 15:22:31 -0700 Subject: [PATCH 1843/2747] Highlight this in Monokai (#28748) Fixes #28682 --- .../themes/dimmed-monokai-color-theme.json | 32 +++++++++---------- .../themes/monokai-color-theme.json | 7 ++++ 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json index 68aeef661f009..a0994a3ff9a66 100644 --- a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json +++ b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json @@ -191,7 +191,7 @@ }, { "name": "Class Variable", - "scope": "variable.other, variable.js, punctuation.separator.variable", + "scope": "variable.js, punctuation.separator.variable", "settings": { "fontStyle": "\n \t\t\t", "foreground": "#6089B4" @@ -229,14 +229,6 @@ "foreground": "#6089B4" } }, - { - "name": "Function Call", - "scope": "meta.function-call", - "settings": { - "fontStyle": "\n \t\t\t", - "foreground": "#0080FF" - } - }, { "name": "Function Object", "scope": "meta.function-call.object", @@ -245,14 +237,6 @@ "foreground": "#9872A2" } }, - { - "name": "Function Call Variable", - "scope": "variable.other.property", - "settings": { - "fontStyle": "\n \t\t\t", - "foreground": "#9872A2" - } - }, { "name": "Keyword Control", "scope": "keyword.control", @@ -550,6 +534,20 @@ "settings": { "foreground": "#b267e6" } + }, + { + "name": "this.self", + "scope": "variable.language", + "settings": { + "foreground": "#c7444a" + } + }, + { + "name": "this.self", + "scope": "variable.language", + "settings": { + "foreground": "#c7444a" + } } ] } \ No newline at end of file diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index 693494c71de9d..c8182750c5cc7 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -378,6 +378,13 @@ "settings": { "foreground": "#b267e6" } + }, + { + "name": "this.self", + "scope": "variable.language", + "settings": { + "foreground": "#FD971F" + } } ] } \ No newline at end of file From 0b27a58395b7f7f2b70489e1fe24a973599fc8a7 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 14 Jun 2017 15:41:01 -0700 Subject: [PATCH 1844/2747] Fix #28749 - Webviews not opening on windows --- src/vs/code/electron-main/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 8effa87307f18..a9adcc1e33ae3 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -121,7 +121,7 @@ export class CodeApplication { }); const isValidWebviewSource = (source: string) => - !source || (source.toLowerCase() as any).startsWith(URI.file(this.environmentService.appRoot.toLowerCase()).toString()); + !source || (URI.parse(source.toLowerCase()).toString() as any).startsWith(URI.file(this.environmentService.appRoot.toLowerCase()).toString()); app.on('web-contents-created', (event, contents) => { contents.on('will-attach-webview', (event, webPreferences, params) => { From e727ec56577cca70d3b93b843c08975f79f764ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatriz=20Magalha=CC=83es?= Date: Wed, 14 Jun 2017 23:44:39 +0100 Subject: [PATCH 1845/2747] Undo changes to files that shouldn't be modified --- build/lib/typescript/typescriptServices.js | 524 ++++++++++----------- src/typings/electron.d.ts | 2 +- 2 files changed, 263 insertions(+), 263 deletions(-) diff --git a/build/lib/typescript/typescriptServices.js b/build/lib/typescript/typescriptServices.js index 6cf24f63bf153..349ff6ad391a5 100644 --- a/build/lib/typescript/typescriptServices.js +++ b/build/lib/typescript/typescriptServices.js @@ -485,7 +485,7 @@ var ts; SymbolFlags[SymbolFlags["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor"; SymbolFlags[SymbolFlags["Export"] = 7340032] = "Export"; /* @internal */ - // The set of things we consider semantically classifiable. Used to speed up the LS during + // The set of things we consider semantically classifiable. Used to speed up the LS during // classification. SymbolFlags[SymbolFlags["Classifiable"] = 788448] = "Classifiable"; })(ts.SymbolFlags || (ts.SymbolFlags = {})); @@ -1274,19 +1274,19 @@ var ts; ts.getNormalizedPathFromPathComponents = getNormalizedPathFromPathComponents; function getNormalizedPathComponentsOfUrl(url) { // Get root length of http://www.website.com/folder1/foler2/ - // In this example the root is: http://www.website.com/ + // In this example the root is: http://www.website.com/ // normalized path components should be ["http://www.website.com/", "folder1", "folder2"] var urlLength = url.length; // Initial root length is http:// part var rootLength = url.indexOf("://") + "://".length; while (rootLength < urlLength) { - // Consume all immediate slashes in the protocol + // Consume all immediate slashes in the protocol // eg.initial rootlength is just file:// but it needs to consume another "/" in file:/// if (url.charCodeAt(rootLength) === 47 /* slash */) { rootLength++; } else { - // non slash character means we continue proceeding to next component of root search + // non slash character means we continue proceeding to next component of root search break; } } @@ -1297,15 +1297,15 @@ var ts; // Find the index of "/" after website.com so the root can be http://www.website.com/ (from existing http://) var indexOfNextSlash = url.indexOf(ts.directorySeparator, rootLength); if (indexOfNextSlash !== -1) { - // Found the "/" after the website.com so the root is length of http://www.website.com/ + // Found the "/" after the website.com so the root is length of http://www.website.com/ // and get components afetr the root normally like any other folder components rootLength = indexOfNextSlash + 1; return normalizedPathComponents(url, rootLength); } else { - // Can't find the host assume the rest of the string as component + // Can't find the host assume the rest of the string as component // but make sure we append "/" to it as root is not joined using "/" - // eg. if url passed in was http://website.com we want to use root as [http://website.com/] + // eg. if url passed in was http://website.com we want to use root as [http://website.com/] // so that other path manipulations will be correct and it can be merged with relative paths correctly return [url + ts.directorySeparator]; } @@ -2580,7 +2580,7 @@ var ts; function computeLineAndCharacterOfPosition(lineStarts, position) { var lineNumber = ts.binarySearch(lineStarts, position); if (lineNumber < 0) { - // If the actual position was not found, + // If the actual position was not found, // the binary search returns the negative value of the next line start // e.g. if the line starts at [5, 10, 23, 80] and the position requested was 20 // then the search will return -2 @@ -2623,8 +2623,8 @@ var ts; // \u000D Carriage Return // \u2028 Line separator // \u2029 Paragraph separator - // Only the characters in Table 3 are treated as line terminators. Other new line or line - // breaking characters are treated as white space but not as line terminators. + // Only the characters in Table 3 are treated as line terminators. Other new line or line + // breaking characters are treated as white space but not as line terminators. return ch === 10 /* lineFeed */ || ch === 13 /* carriageReturn */ || ch === 8232 /* lineSeparator */ || @@ -2702,7 +2702,7 @@ var ts; } } ts.skipTrivia = skipTrivia; - // All conflict markers consist of the same character repeated seven times. If it is + // All conflict markers consist of the same character repeated seven times. If it is // a <<<<<<< or >>>>>>> marker then it is also followd by a space. var mergeConflictMarkerLength = "<<<<<<<".length; function isConflictMarkerTrivia(text, pos) { @@ -2747,12 +2747,12 @@ var ts; } return pos; } - // Extract comments from the given source text starting at the given position. If trailing is - // false, whitespace is skipped until the first line break and comments between that location - // and the next token are returned.If trailing is true, comments occurring between the given - // position and the next line break are returned.The return value is an array containing a - // TextRange for each comment. Single-line comment ranges include the beginning '//' characters - // but not the ending line break. Multi - line comment ranges include the beginning '/* and + // Extract comments from the given source text starting at the given position. If trailing is + // false, whitespace is skipped until the first line break and comments between that location + // and the next token are returned.If trailing is true, comments occurring between the given + // position and the next line break are returned.The return value is an array containing a + // TextRange for each comment. Single-line comment ranges include the beginning '//' characters + // but not the ending line break. Multi - line comment ranges include the beginning '/* and // ending '*/' characters.The return value is undefined if no comments were found. function getCommentRanges(text, pos, trailing) { var result; @@ -3699,7 +3699,7 @@ var ts; })(ts.ModuleInstanceState || (ts.ModuleInstanceState = {})); var ModuleInstanceState = ts.ModuleInstanceState; function getModuleInstanceState(node) { - // A module is uninstantiated if it contains only + // A module is uninstantiated if it contains only // 1. interface declarations, type alias declarations if (node.kind === 205 /* InterfaceDeclaration */ || node.kind === 206 /* TypeAliasDeclaration */) { return 0 /* NonInstantiated */; @@ -3739,7 +3739,7 @@ var ts; ts.getModuleInstanceState = getModuleInstanceState; var ContainerFlags; (function (ContainerFlags) { - // The current node is not a container, and no container manipulation should happen before + // The current node is not a container, and no container manipulation should happen before // recursing into it. ContainerFlags[ContainerFlags["None"] = 0] = "None"; // The current node is a container. It should be set as the current container (and block- @@ -3844,13 +3844,13 @@ var ts; if (name !== undefined) { // Check and see if the symbol table already has a symbol with this name. If not, // create a new symbol with this name and add it to the table. Note that we don't - // give the new symbol any flags *yet*. This ensures that it will not conflict + // give the new symbol any flags *yet*. This ensures that it will not conflict // witht he 'excludes' flags we pass in. // // If we do get an existing symbol, see if it conflicts with the new symbol we're // creating. For example, a 'var' symbol and a 'class' symbol will conflict within - // the same symbol table. If we have a conflict, report the issue on each - // declaration we have for this symbol, and then create a new symbol for this + // the same symbol table. If we have a conflict, report the issue on each + // declaration we have for this symbol, and then create a new symbol for this // declaration. // // If we created a new symbol, either because we didn't have a symbol with this name @@ -3904,7 +3904,7 @@ var ts; // ExportType, or ExportContainer flag, and an associated export symbol with all the correct flags set // on it. There are 2 main reasons: // - // 1. We treat locals and exports of the same name as mutually exclusive within a container. + // 1. We treat locals and exports of the same name as mutually exclusive within a container. // That means the binder will issue a Duplicate Identifier error if you mix locals and exports // with the same name in the same container. // TODO: Make this a more specific error and decouple it from the exclusion logic. @@ -3925,11 +3925,11 @@ var ts; } } } - // All container nodes are kept on a linked list in declaration order. This list is used by - // the getLocalNameOfContainer function in the type checker to validate that the local name + // All container nodes are kept on a linked list in declaration order. This list is used by + // the getLocalNameOfContainer function in the type checker to validate that the local name // used for a container is unique. function bindChildren(node) { - // Before we recurse into a node's chilren, we first save the existing parent, container + // Before we recurse into a node's chilren, we first save the existing parent, container // and block-container. Then after we pop out of processing the children, we restore // these saved values. var saveParent = parent; @@ -3943,9 +3943,9 @@ var ts; // may contain locals, we proactively initialize the .locals field. We do this because // it's highly likely that the .locals will be needed to place some child in (for example, // a parameter, or variable declaration). - // + // // However, we do not proactively create the .locals for block-containers because it's - // totally normal and common for block-containers to never actually have a block-scoped + // totally normal and common for block-containers to never actually have a block-scoped // variable in them. We don't want to end up allocating an object for every 'block' we // run into when most of them won't be necessary. // @@ -4005,7 +4005,7 @@ var ts; return 2 /* IsBlockScopedContainer */; case 182 /* Block */: // do not treat blocks directly inside a function as a block-scoped-container. - // Locals that reside in this block should go to the function locals. Othewise 'x' + // Locals that reside in this block should go to the function locals. Othewise 'x' // would not appear to be a redeclaration of a block scoped local in the following // example: // @@ -4018,7 +4018,7 @@ var ts; // the block, then there would be no collision. // // By not creating a new block-scoped-container here, we ensure that both 'var x' - // and 'let x' go into the Function-container's locals, and we do get a collision + // and 'let x' go into the Function-container's locals, and we do get a collision // conflict. return ts.isFunctionLike(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */; } @@ -4150,8 +4150,8 @@ var ts; // For a given function symbol "<...>(...) => T" we want to generate a symbol identical // to the one we would get for: { <...>(...): T } // - // We do that by making an anonymous type literal symbol, and then setting the function - // symbol as its sole member. To the rest of the system, this symbol will be indistinguishable + // We do that by making an anonymous type literal symbol, and then setting the function + // symbol as its sole member. To the rest of the system, this symbol will be indistinguishable // from an actual type literal symbol you would have gotten had you used the long form. var symbol = createSymbol(131072 /* Signature */, getDeclarationName(node)); addDeclarationToSymbol(symbol, node, 131072 /* Signature */); @@ -4192,17 +4192,17 @@ var ts; function bind(node) { node.parent = parent; // First we bind declaration nodes to a symbol if possible. We'll both create a symbol - // and then potentially add the symbol to an appropriate symbol table. Possible + // and then potentially add the symbol to an appropriate symbol table. Possible // destination symbol tables are: - // + // // 1) The 'exports' table of the current container's symbol. // 2) The 'members' table of the current container's symbol. // 3) The 'locals' table of the current container. // - // However, not all symbols will end up in any of these tables. 'Anonymous' symbols + // However, not all symbols will end up in any of these tables. 'Anonymous' symbols // (like TypeLiterals for example) will not be put in any table. bindWorker(node); - // Then we recurse into the children of the node to bind them as well. For certain + // Then we recurse into the children of the node to bind them as well. For certain // symbols we do specialized work when we recurse. For example, we'll keep track of // the current 'container' node when it changes. This helps us know which symbol table // a local should go into for example. @@ -4324,9 +4324,9 @@ var ts; } var symbol = node.symbol; // TypeScript 1.0 spec (April 2014): 8.4 - // Every class automatically contains a static property member named 'prototype', the + // Every class automatically contains a static property member named 'prototype', the // type of which is an instantiation of the class type with type Any supplied as a type - // argument for each type parameter. It is an error to explicitly declare a static + // argument for each type parameter. It is an error to explicitly declare a static // property member with the name 'prototype'. // // Note: we check for this here because this class may be merging into a module. The @@ -4376,7 +4376,7 @@ var ts; else { declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107455 /* ParameterExcludes */); } - // If this is a property-parameter, then also declare the property symbol into the + // If this is a property-parameter, then also declare the property symbol into the // containing class. if (node.flags & 112 /* AccessibilityModifier */ && node.parent.kind === 137 /* Constructor */ && @@ -4456,7 +4456,7 @@ var ts; // b) any of it's children reported that it had an error. var thisNodeOrAnySubNodesHasError = ((node.parserContextFlags & 32 /* ThisNodeHasError */) !== 0) || ts.forEachChild(node, containsParseError); - // If so, mark ourselves accordingly. + // If so, mark ourselves accordingly. if (thisNodeOrAnySubNodesHasError) { node.parserContextFlags |= 128 /* ThisNodeOrAnySubNodesHasError */; } @@ -4491,13 +4491,13 @@ var ts; ts.getStartPosOfNode = getStartPosOfNode; // Returns true if this node is missing from the actual source code. 'missing' is different // from 'undefined/defined'. When a node is undefined (which can happen for optional nodes - // in the tree), it is definitel missing. HOwever, a node may be defined, but still be + // in the tree), it is definitel missing. HOwever, a node may be defined, but still be // missing. This happens whenever the parser knows it needs to parse something, but can't // get anything in the source code that it expects at that location. For example: // // let a: ; // - // Here, the Type in the Type-Annotation is not-optional (as there is a colon in the source + // Here, the Type in the Type-Annotation is not-optional (as there is a colon in the source // code). So the parser will attempt to parse out a type, and will create an actual node. // However, this node will be 'missing' in the sense that no actual source-code/tokens are // contained within it. @@ -4568,7 +4568,7 @@ var ts; isCatchClauseVariableDeclaration(declaration); } ts.isBlockOrCatchScoped = isBlockOrCatchScoped; - // Gets the nearest enclosing block scope container that has the provided node + // Gets the nearest enclosing block scope container that has the provided node // as a descendant, that is not the provided node. function getEnclosingBlockScopeContainer(node) { var current = node.parent; @@ -4662,7 +4662,7 @@ var ts; break; } if (errorNode === undefined) { - // If we don't have a better node, then just set the error on the first token of + // If we don't have a better node, then just set the error on the first token of // construct. return getSpanOfTokenAtPosition(sourceFile, node.pos); } @@ -4690,10 +4690,10 @@ var ts; } return node; } - // Returns the node flags for this node and all relevant parent nodes. This is done so that + // Returns the node flags for this node and all relevant parent nodes. This is done so that // nodes like variable declarations and binding elements can returned a view of their flags // that includes the modifiers from their container. i.e. flags like export/declare aren't - // stored on the variable declaration directly, but on the containing variable statement + // stored on the variable declaration directly, but on the containing variable statement // (if it has one). Similarly, flags for let/const are store on the variable declaration // list. By calling this function, all those flags are combined so that the client can treat // the node as if it actually had those flags. @@ -4994,7 +4994,7 @@ var ts; node = node.parent; break; case 132 /* Decorator */: - // Decorators are always applied outside of the body of a class or method. + // Decorators are always applied outside of the body of a class or method. if (node.parent.kind === 131 /* Parameter */ && isClassElement(node.parent.parent)) { // If the decorator's parent is a Parameter, we resolve the this container from // the grandparent class declaration. @@ -5050,7 +5050,7 @@ var ts; node = node.parent; break; case 132 /* Decorator */: - // Decorators are always applied outside of the body of a class or method. + // Decorators are always applied outside of the body of a class or method. if (node.parent.kind === 131 /* Parameter */ && isClassElement(node.parent.parent)) { // If the decorator's parent is a Parameter, we resolve the this container from // the grandparent class declaration. @@ -5326,7 +5326,7 @@ var ts; ts.getJSDocTemplateTag = getJSDocTemplateTag; function getCorrespondingJSDocParameterTag(parameter) { if (parameter.name && parameter.name.kind === 65 /* Identifier */) { - // If it's a parameter, see if the parent has a jsdoc comment with an @param + // If it's a parameter, see if the parent has a jsdoc comment with an @param // annotation. var parameterName = parameter.name.text; var docComment = parameter.parent.jsDocComment; @@ -6361,17 +6361,17 @@ var ts; // // 0 10 20 30 40 50 60 70 80 90 100 // ------------------------------------------------------------------------------------------------------- - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- + // | / + // | /---- + // T1 | /---- + // | /---- + // | /---- // ------------------------------------------------------------------------------------------------------- - // | \ - // | \ - // T2 | \ - // | \ - // | \ + // | \ + // | \ + // T2 | \ + // | \ + // | \ // ------------------------------------------------------------------------------------------------------- // // Merging these turns out to not be too difficult. First, determining the new start of the change is trivial @@ -6379,17 +6379,17 @@ var ts; // // 0 10 20 30 40 50 60 70 80 90 100 // ------------------------------------------------------------*------------------------------------------ - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- + // | / + // | /---- + // T1 | /---- + // | /---- + // | /---- // ----------------------------------------$-------------------$------------------------------------------ - // . | \ - // . | \ - // T2 . | \ - // . | \ - // . | \ + // . | \ + // . | \ + // T2 . | \ + // . | \ + // . | \ // ----------------------------------------------------------------------*-------------------------------- // // (Note the dots represent the newly inferrred start. @@ -6400,22 +6400,22 @@ var ts; // // 0 10 20 30 40 50 60 70 80 90 100 // --------------------------------------------------------------------------------*---------------------- - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- + // | / + // | /---- + // T1 | /---- + // | /---- + // | /---- // ------------------------------------------------------------$------------------------------------------ - // . | \ - // . | \ - // T2 . | \ - // . | \ - // . | \ + // . | \ + // . | \ + // T2 . | \ + // . | \ + // . | \ // ----------------------------------------------------------------------*-------------------------------- // // In other words (in this case), we're recognizing that the second edit happened after where the first edit // ended with a delta of 20 characters (60 - 40). Thus, if we go back in time to where the first edit started - // that's the same as if we started at char 80 instead of 60. + // that's the same as if we started at char 80 instead of 60. // // As it so happens, the same logic applies if the second edit precedes the first edit. In that case rahter // than pusing the first edit forward to match the second, we'll push the second edit forward to match the @@ -6425,7 +6425,7 @@ var ts; // semantics: { { start: 10, length: 70 }, newLength: 60 } // // The math then works out as follows. - // If we have { oldStart1, oldEnd1, newEnd1 } and { oldStart2, oldEnd2, newEnd2 } then we can compute the + // If we have { oldStart1, oldEnd1, newEnd1 } and { oldStart2, oldEnd2, newEnd2 } then we can compute the // final result like so: // // { @@ -6995,7 +6995,7 @@ var ts; if (setParentNodes) { fixupParentReferences(sourceFile); } - // If this is a javascript file, proactively see if we can get JSDoc comments for + // If this is a javascript file, proactively see if we can get JSDoc comments for // relevant nodes in the file. We'll use these to provide typing informaion if they're // available. if (ts.isJavaScript(fileName)) { @@ -7537,7 +7537,7 @@ var ts; // if we see "extends {}" then only treat the {} as what we're extending (and not // the class body) if we have: // - // extends {} { + // extends {} { // extends {}, // extends {} extends // extends {} implements @@ -9280,7 +9280,7 @@ var ts; expression = finishNode(propertyAccess); continue; } - // when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName + // when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName if (!inDecoratorContext() && parseOptional(18 /* OpenBracketToken */)) { var indexedAccess = createNode(159 /* ElementAccessExpression */, expression.pos); indexedAccess.expression = expression; @@ -9388,7 +9388,7 @@ var ts; case 23 /* CommaToken */: // foo, case 14 /* OpenBraceToken */: // foo { // We don't want to treat these as type arguments. Otherwise we'll parse this - // as an invocation expression. Instead, we want to parse out the expression + // as an invocation expression. Instead, we want to parse out the expression // in isolation from the type arguments. default: // Anything else treat as an expression. @@ -9560,7 +9560,7 @@ var ts; function parseFunctionBlock(allowYield, ignoreMissingOpenBrace, diagnosticMessage) { var savedYieldContext = inYieldContext(); setYieldContext(allowYield); - // We may be in a [Decorator] context when parsing a function expression or + // We may be in a [Decorator] context when parsing a function expression or // arrow function. The body of the function is not in [Decorator] context. var saveDecoratorContext = inDecoratorContext(); if (saveDecoratorContext) { @@ -10011,7 +10011,7 @@ var ts; default: if (decorators) { // We reached this point because we encountered decorators and/or modifiers and assumed a declaration - // would follow. For recovery and error reporting purposes, return an incomplete declaration. + // would follow. For recovery and error reporting purposes, return an incomplete declaration. var node = createMissingNode(221 /* MissingDeclaration */, true, ts.Diagnostics.Declaration_expected); node.pos = fullStart; node.decorators = decorators; @@ -10366,8 +10366,8 @@ var ts; } function parseClassExpression() { return parseClassDeclarationOrExpression( - /*fullStart*/ scanner.getStartPos(), - /*decorators*/ undefined, + /*fullStart*/ scanner.getStartPos(), + /*decorators*/ undefined, /*modifiers*/ undefined, 177 /* ClassExpression */); } function parseClassDeclaration(fullStart, decorators, modifiers) { @@ -11125,8 +11125,8 @@ var ts; ts.Debug.assert(end <= content.length); var tags; var pos; - // NOTE(cyrusn): This is essentially a handwritten scanner for JSDocComments. I - // considered using an actual Scanner, but this would complicate things. The + // NOTE(cyrusn): This is essentially a handwritten scanner for JSDocComments. I + // considered using an actual Scanner, but this would complicate things. The // scanner would need to know it was in a Doc Comment. Otherwise, it would then // produce comments *inside* the doc comment. In the end it was just easier to // write a simple scanner rather than go that route. @@ -12274,7 +12274,7 @@ var ts; } break; case 132 /* Decorator */: - // Decorators are resolved at the class declaration. Resolving at the parameter + // Decorators are resolved at the class declaration. Resolving at the parameter // or member would result in looking up locals in the method. // // function y() {} @@ -13690,7 +13690,7 @@ var ts; case 151 /* UnionType */: case 152 /* ParenthesizedType */: return isDeclarationVisible(node.parent); - // Default binding, import specifier and namespace import is visible + // Default binding, import specifier and namespace import is visible // only on demand so by default it is not visible case 213 /* ImportClause */: case 214 /* NamespaceImport */: @@ -17000,7 +17000,7 @@ var ts; if (assumeTrue) { // Assumed result is true. If check was not for a primitive type, remove all primitive types if (!typeInfo) { - return removeTypesFromUnionType(type, 258 /* StringLike */ | 132 /* NumberLike */ | 8 /* Boolean */ | 2097152 /* ESSymbol */, + return removeTypesFromUnionType(type, 258 /* StringLike */ | 132 /* NumberLike */ | 8 /* Boolean */ | 2097152 /* ESSymbol */, /*isOfTypeKind*/ true, false); } // Check was for a primitive type, return that primitive type if it is a subtype @@ -17737,7 +17737,7 @@ var ts; // c is represented in the tree as a spread element in an array literal. // But c really functions as a rest element, and its purpose is to provide // a contextual type for the right hand side of the assignment. Therefore, - // instead of calling checkExpression on "...c", which will give an error + // instead of calling checkExpression on "...c", which will give an error // if c is not iterable/array-like, we need to act as if we are trying to // get the contextual element type from it. So we do something similar to // getContextualTypeForElementExpression, which will crucially not error @@ -18641,7 +18641,7 @@ var ts; // We exclude union types because we may have a union of function types that happen to have // no common signatures. if (isTypeAny(funcType) || (!callSignatures.length && !constructSignatures.length && !(funcType.flags & 16384 /* Union */) && isTypeAssignableTo(funcType, globalFunctionType))) { - // The unknownType indicates that an error already occurred (and was reported). No + // The unknownType indicates that an error already occured (and was reported). No // need to report another error in this case. if (funcType !== unknownType && node.typeArguments) { error(node, ts.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); @@ -20415,7 +20415,7 @@ var ts; /** Checks a type reference node as an expression. */ function checkTypeNodeAsExpression(node) { // When we are emitting type metadata for decorators, we need to try to check the type - // as if it were an expression so that we can emit the type in a value position when we + // as if it were an expression so that we can emit the type in a value position when we // serialize the type metadata. if (node && node.kind === 144 /* TypeReference */) { var type = getTypeFromTypeNode(node); @@ -20911,7 +20911,7 @@ var ts; } else { var leftType = checkExpression(varExpr); - checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_of_statement, + checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_of_statement, /*constantVariableMessage*/ ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant); // iteratedType will be undefined if the rightType was missing properties/signatures // required to get its iteratedType (like [Symbol.iterator] or next). This may be @@ -21945,7 +21945,7 @@ var ts; error(node.name, ts.Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); } } - // if the module merges with a class declaration in the same lexical scope, + // if the module merges with a class declaration in the same lexical scope, // we need to track this to ensure the correct emit. var mergedClass = ts.getDeclarationOfKind(symbol, 204 /* ClassDeclaration */); if (mergedClass && @@ -22605,7 +22605,7 @@ var ts; return getSymbolOfNode(entityName.parent); } if (entityName.parent.kind === 217 /* ExportAssignment */) { - return resolveEntityName(entityName, + return resolveEntityName(entityName, /*all meanings*/ 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */ | 8388608 /* Alias */); } if (entityName.kind !== 158 /* PropertyAccessExpression */) { @@ -23074,7 +23074,7 @@ var ts; // * The serialized type of an AccessorDeclaration is the serialized type of the return type annotation of its getter or parameter type annotation of its setter. // * The serialized type of any other FunctionLikeDeclaration is "Function". // * The serialized type of any other node is "void 0". - // + // // For rules on serializing type annotations, see `serializeTypeNode`. switch (node.kind) { case 204 /* ClassDeclaration */: return "Function"; @@ -23094,7 +23094,7 @@ var ts; // // * If the declaration is a class, the parameters of the first constructor with a body are used. // * If the declaration is function-like and has a body, the parameters of the function are used. - // + // // For the rules on serializing the type of each parameter declaration, see `serializeTypeOfDeclaration`. if (node) { var valueDeclaration; @@ -23162,7 +23162,7 @@ var ts; } function getReferencedValueSymbol(reference) { return getNodeLinks(reference).resolvedSymbol || - resolveName(reference, reference.text, 107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */, + resolveName(reference, reference.text, 107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */, /*nodeNotFoundMessage*/ undefined, undefined); } function getReferencedValueDeclaration(reference) { @@ -24494,7 +24494,7 @@ var ts; // we would write alias foo declaration when we visit it since it would now be marked as visible if (moduleElementEmitInfo) { if (moduleElementEmitInfo.node.kind === 212 /* ImportDeclaration */) { - // we have to create asynchronous output only after we have collected complete information + // we have to create asynchronous output only after we have collected complete information // because it is possible to enable multiple bindings as asynchronously visible moduleElementEmitInfo.isVisible = true; } @@ -24633,7 +24633,7 @@ var ts; return emitEntityName(type); } function emitEntityName(entityName) { - var visibilityResult = resolver.isEntityNameVisible(entityName, + var visibilityResult = resolver.isEntityNameVisible(entityName, // Aliases can be written asynchronously so use correct enclosing declaration entityName.parent.kind === 211 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration); handleSymbolAccessibilityError(visibilityResult); @@ -24845,7 +24845,7 @@ var ts; } } function writeImportEqualsDeclaration(node) { - // note usage of writer. methods instead of aliases created, just to make sure we are using + // note usage of writer. methods instead of aliases created, just to make sure we are using // correct writer especially to handle asynchronous alias writing emitJsDocComments(node); if (node.flags & 1 /* Export */) { @@ -24884,7 +24884,7 @@ var ts; } function writeImportDeclaration(node) { if (!node.importClause && !(node.flags & 1 /* Export */)) { - // do not write non-exported import declarations that don't have import clauses + // do not write non-exported import declarations that don't have import clauses return; } emitJsDocComments(node); @@ -25723,7 +25723,7 @@ var ts; : ts.shouldEmitToOwnFile(referencedFile, compilerOptions) ? ts.getOwnEmitOutputFilePath(referencedFile, host, ".d.ts") // Own output file so get the .d.ts file : ts.removeFileExtension(compilerOptions.out) + ".d.ts"; // Global out file - declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(jsFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, + declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(jsFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); referencePathsOutput += "/// " + newLine; } @@ -26191,7 +26191,7 @@ var ts; // If sourceroot option: Use the relative path corresponding to the common directory path // otherwise source locations relative to map file location var sourcesDirectoryPath = compilerOptions.sourceRoot ? host.getCommonSourceDirectory() : sourceMapDir; - sourceMapData.sourceMapSources.push(ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, node.fileName, host.getCurrentDirectory(), host.getCanonicalFileName, + sourceMapData.sourceMapSources.push(ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, node.fileName, host.getCurrentDirectory(), host.getCanonicalFileName, /*isAbsolutePathAnUrl*/ true)); sourceMapSourceIndex = sourceMapData.sourceMapSources.length - 1; // The one that can be used from program to get the actual source file @@ -26342,7 +26342,7 @@ var ts; if (!ts.isRootedDiskPath(sourceMapDir) && !ts.isUrl(sourceMapDir)) { // The relative paths are relative to the common directory sourceMapDir = ts.combinePaths(host.getCommonSourceDirectory(), sourceMapDir); - sourceMapData.jsSourceMappingURL = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizePath(jsFilePath)), ts.combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL), host.getCurrentDirectory(), host.getCanonicalFileName, + sourceMapData.jsSourceMappingURL = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizePath(jsFilePath)), ts.combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL), host.getCurrentDirectory(), host.getCanonicalFileName, /*isAbsolutePathAnUrl*/ true); } else { @@ -26759,7 +26759,7 @@ var ts; } else if (node.kind === 129 /* ComputedPropertyName */) { // if this is a decorated computed property, we will need to capture the result - // of the property expression so that we can apply decorators later. This is to ensure + // of the property expression so that we can apply decorators later. This is to ensure // we don't introduce unintended side effects: // // class C { @@ -27059,7 +27059,7 @@ var ts; write("]"); } else { - emitListWithSpread(elements, true, (node.flags & 512 /* MultiLine */) !== 0, + emitListWithSpread(elements, true, (node.flags & 512 /* MultiLine */) !== 0, /*trailingComma*/ elements.hasTrailingComma, true); } } @@ -27326,8 +27326,8 @@ var ts; } return false; } - // Returns 'true' if the code was actually indented, false otherwise. - // If the code is not indented, an optional valueToWriteWhenNotIndenting will be + // Returns 'true' if the code was actually indented, false otherwise. + // If the code is not indented, an optional valueToWriteWhenNotIndenting will be // emitted instead. function indentIfOnDifferentLines(parent, node1, node2, valueToWriteWhenNotIndenting) { var realNodesAreOnDifferentLines = !ts.nodeIsSynthesized(parent) && !nodeEndIsOnSameLineAsNodeStart(node1, node2); @@ -27706,7 +27706,7 @@ var ts; emit(node.whenFalse); decreaseIndentIf(indentedBeforeColon, indentedAfterColon); } - // Helper function to decrease the indent if we previously indented. Allows multiple + // Helper function to decrease the indent if we previously indented. Allows multiple // previous indent values to be considered at a time. This also allows caller to just // call this once, passing in all their appropriate indent values, instead of needing // to call this helper function multiple times. @@ -28748,7 +28748,7 @@ var ts; emitSignatureParameters(node); } if (!node.body) { - // There can be no body when there are parse errors. Just emit an empty block + // There can be no body when there are parse errors. Just emit an empty block // in that case. write(" { }"); } @@ -28776,7 +28776,7 @@ var ts; emitDownLevelExpressionFunctionBody(node, body); return; } - // For es6 and higher we can emit the expression as is. However, in the case + // For es6 and higher we can emit the expression as is. However, in the case // where the expression might end up looking like a block when emitted, we'll // also wrap it in parentheses first. For example if you have: a => {} // then we need to generate: a => ({}) @@ -29253,9 +29253,9 @@ var ts; } } // If the class has static properties, and it's a class expression, then we'll need - // to specialize the emit a bit. for a class expression of the form: + // to specialize the emit a bit. for a class expression of the form: // - // class C { static a = 1; static b = 2; ... } + // class C { static a = 1; static b = 2; ... } // // We'll emit: // @@ -29517,7 +29517,7 @@ var ts; // // The emit for a method is: // - // Object.defineProperty(C.prototype, "method", + // Object.defineProperty(C.prototype, "method", // __decorate([ // dec, // __param(0, dec2), @@ -29525,10 +29525,10 @@ var ts; // __metadata("design:paramtypes", [Object]), // __metadata("design:returntype", void 0) // ], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); - // + // // The emit for an accessor is: // - // Object.defineProperty(C.prototype, "accessor", + // Object.defineProperty(C.prototype, "accessor", // __decorate([ // dec // ], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); @@ -29610,7 +29610,7 @@ var ts; } function shouldEmitTypeMetadata(node) { // This method determines whether to emit the "design:type" metadata based on the node's kind. - // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata + // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata // compiler option is set. switch (node.kind) { case 136 /* MethodDeclaration */: @@ -29623,7 +29623,7 @@ var ts; } function shouldEmitReturnTypeMetadata(node) { // This method determines whether to emit the "design:returntype" metadata based on the node's kind. - // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata + // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata // compiler option is set. switch (node.kind) { case 136 /* MethodDeclaration */: @@ -29633,7 +29633,7 @@ var ts; } function shouldEmitParamTypesMetadata(node) { // This method determines whether to emit the "design:paramtypes" metadata based on the node's kind. - // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata + // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata // compiler option is set. switch (node.kind) { case 204 /* ClassDeclaration */: @@ -30386,7 +30386,7 @@ var ts; } function writeExportedName(node) { // do not record default exports - // they are local to module and never overwritten (explicitly skipped) by star export + // they are local to module and never overwritten (explicitly skipped) by star export if (node.kind !== 65 /* Identifier */ && node.flags & 256 /* Default */) { return; } @@ -30408,7 +30408,7 @@ var ts; } } function processTopLevelVariableAndFunctionDeclarations(node) { - // per ES6 spec: + // per ES6 spec: // 15.2.1.16.4 ModuleDeclarationInstantiation() Concrete Method // - var declarations are initialized to undefined - 14.a.ii // - function/generator declarations are instantiated - 16.a.iv @@ -30540,7 +30540,7 @@ var ts; // hoist variable if // - it is not block scoped // - it is top level block scoped - // if block scoped variables are nested in some another block then + // if block scoped variables are nested in some another block then // no other functions can use them except ones that are defined at least in the same block return (ts.getCombinedNodeFlags(node) & 12288 /* BlockScoped */) === 0 || ts.getEnclosingBlockScopeContainer(node).kind === 230 /* SourceFile */; @@ -30724,10 +30724,10 @@ var ts; // System modules has the following shape // System.register(['dep-1', ... 'dep-n'], function(exports) {/* module body function */}) // 'exports' here is a function 'exports(name: string, value: T): T' that is used to publish exported values. - // 'exports' returns its 'value' argument so in most cases expressions + // 'exports' returns its 'value' argument so in most cases expressions // that mutate exported values can be rewritten as: - // expr -> exports('name', expr). - // The only exception in this rule is postfix unary operators, + // expr -> exports('name', expr). + // The only exception in this rule is postfix unary operators, // see comment to 'emitPostfixUnaryExpression' for more details ts.Debug.assert(!exportFunctionForFile); // make sure that name of 'exports' function does not conflict with existing identifiers @@ -30769,8 +30769,8 @@ var ts; // factory function. var unaliasedModuleNames = []; // names of modules with no corresponding parameters in // factory function. - var importAliasNames = []; // names of the parameters in the factory function; these - // parameters need to match the indexes of the corresponding + var importAliasNames = []; // names of the parameters in the factory function; these + // parameters need to match the indexes of the corresponding // module names in aliasedModuleNames. // Fill in amd-dependency tags for (var _a = 0, _b = node.amdDependencies; _a < _b.length; _a++) { @@ -30863,7 +30863,7 @@ var ts; emitCaptureThisForNodeIfNecessary(node); emitLinesStartingAt(node.statements, startIndex); emitTempDeclarations(true); - // Emit exportDefault if it exists will happen as part + // Emit exportDefault if it exists will happen as part // or normal statement emit. } function emitExportEquals(emitAsReturn) { @@ -30993,7 +30993,7 @@ var ts; // emitting the module as well. return shouldEmitEnumDeclaration(node); } - // If this is the expression body of an arrow function that we're down-leveling, + // If this is the expression body of an arrow function that we're down-leveling, // then we don't want to emit comments when we emit the body. It will have already // been taken care of when we emitted the 'return' statement for the function // expression body. @@ -31719,7 +31719,7 @@ var ts; } else if (node.kind === 208 /* ModuleDeclaration */ && node.name.kind === 8 /* StringLiteral */ && (node.flags & 2 /* Ambient */ || ts.isDeclarationFile(file))) { // TypeScript 1.0 spec (April 2014): 12.1.6 - // An AmbientExternalModuleDeclaration declares an external module. + // An AmbientExternalModuleDeclaration declares an external module. // This type of declaration is permitted only in the global module. // The StringLiteral must specify a top - level external module name. // Relative external module names are not permitted @@ -31730,7 +31730,7 @@ var ts; var moduleName = nameLiteral.text; if (moduleName) { // TypeScript 1.0 spec (April 2014): 12.1.6 - // An ExternalImportDeclaration in anAmbientExternalModuleDeclaration may reference other external modules + // An ExternalImportDeclaration in anAmbientExternalModuleDeclaration may reference other external modules // only through top - level external module names. Relative external module names are not permitted. var searchName = ts.normalizePath(ts.combinePaths(basePath, moduleName)); ts.forEach(ts.supportedExtensions, function (extension) { return findModuleSourceFile(searchName + extension, nameLiteral); }); @@ -31848,7 +31848,7 @@ var ts; } } else if (firstExternalModuleSourceFile && languageVersion < 2 /* ES6 */ && !options.module) { - // We cannot use createDiagnosticFromNode because nodes do not have parents yet + // We cannot use createDiagnosticFromNode because nodes do not have parents yet var span = ts.getErrorSpanForNode(firstExternalModuleSourceFile, firstExternalModuleSourceFile.externalModuleIndicator); diagnostics.add(ts.createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, ts.Diagnostics.Cannot_compile_modules_unless_the_module_flag_is_provided)); } @@ -31871,7 +31871,7 @@ var ts; commonSourceDirectory = computeCommonSourceDirectory(files); } if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== ts.directorySeparator) { - // Make sure directory path ends with directory separator so this string can directly + // Make sure directory path ends with directory separator so this string can directly // used to replace with "" to get the relative path of the source file and the relative path doesn't // start with / making it rooted path commonSourceDirectory += ts.directorySeparator; @@ -32477,14 +32477,14 @@ var ts; function getNavigateToItems(program, cancellationToken, searchValue, maxResultCount) { var patternMatcher = ts.createPatternMatcher(searchValue); var rawItems = []; - // Search the declarations in all files and output matched NavigateToItem into array of NavigateToItem[] + // Search the declarations in all files and output matched NavigateToItem into array of NavigateToItem[] ts.forEach(program.getSourceFiles(), function (sourceFile) { cancellationToken.throwIfCancellationRequested(); var nameToDeclarations = sourceFile.getNamedDeclarations(); for (var name_27 in nameToDeclarations) { var declarations = ts.getProperty(nameToDeclarations, name_27); if (declarations) { - // First do a quick check to see if the name of the declaration matches the + // First do a quick check to see if the name of the declaration matches the // last portion of the (possibly) dotted name they're searching for. var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_27); if (!matches) { @@ -32492,7 +32492,7 @@ var ts; } for (var _i = 0; _i < declarations.length; _i++) { var declaration = declarations[_i]; - // It was a match! If the pattern has dots in it, then also see if the + // It was a match! If the pattern has dots in it, then also see if the // declaration container matches as well. if (patternMatcher.patternContainsDots) { var containers = getContainers(declaration); @@ -32794,8 +32794,8 @@ var ts; } function isTopLevelFunctionDeclaration(functionDeclaration) { if (functionDeclaration.kind === 203 /* FunctionDeclaration */) { - // A function declaration is 'top level' if it contains any function declarations - // within it. + // A function declaration is 'top level' if it contains any function declarations + // within it. if (functionDeclaration.body && functionDeclaration.body.kind === 182 /* Block */) { // Proper function declarations can only have identifier names if (ts.forEach(functionDeclaration.body.statements, function (s) { return s.kind === 203 /* FunctionDeclaration */ && !isEmpty(s.name.text); })) { @@ -33076,8 +33076,8 @@ var ts; } function createPatternMatcher(pattern) { // We'll often see the same candidate string many times when searching (For example, when - // we see the name of a module that is used everywhere, or the name of an overload). As - // such, we cache the information we compute about the candidate for the life of this + // we see the name of a module that is used everywhere, or the name of an overload). As + // such, we cache the information we compute about the candidate for the life of this // pattern matcher so we don't have to compute it multiple times. var stringToWordSpans = {}; pattern = pattern.trim(); @@ -33160,7 +33160,7 @@ var ts; if (index > 0) { // c) If the part is entirely lowercase, then check if it is contained anywhere in the // candidate in a case insensitive manner. If so, return that there was a substring - // match. + // match. // // Note: We only have a substring match if the lowercase part is prefix match of some // word part. That way we don't match something like 'Class' when the user types 'a'. @@ -33169,7 +33169,7 @@ var ts; for (var _i = 0; _i < wordSpans.length; _i++) { var span = wordSpans[_i]; if (partStartsWith(candidate, span, chunk.text, true)) { - return createPatternMatch(PatternMatchKind.substring, punctuationStripped, + return createPatternMatch(PatternMatchKind.substring, punctuationStripped, /*isCaseSensitive:*/ partStartsWith(candidate, span, chunk.text, false)); } } @@ -33200,8 +33200,8 @@ var ts; if (isLowercase) { // f) Is the pattern a substring of the candidate starting on one of the candidate's word boundaries? // We could check every character boundary start of the candidate for the pattern. However, that's - // an m * n operation in the wost case. Instead, find the first instance of the pattern - // substring, and see if it starts on a capital letter. It seems unlikely that the user will try to + // an m * n operation in the wost case. Instead, find the first instance of the pattern + // substring, and see if it starts on a capital letter. It seems unlikely that the user will try to // filter the list based on a substring that starts on a capital letter and also with a lowercase one. // (Pattern: fogbar, Candidate: quuxfogbarFogBar). if (chunk.text.length < candidate.length) { @@ -33253,7 +33253,7 @@ var ts; // // c) If the word is entirely lowercase, then check if it is contained anywhere in the // candidate in a case insensitive manner. If so, return that there was a substring - // match. + // match. // // Note: We only have a substring match if the lowercase part is prefix match of // some word part. That way we don't match something like 'Class' when the user @@ -33267,7 +33267,7 @@ var ts; // e) If the word was not entirely lowercase, then attempt a camel cased match as // well. // - // f) The word is all lower case. Is it a case insensitive substring of the candidate starting + // f) The word is all lower case. Is it a case insensitive substring of the candidate starting // on a part boundary of the candidate? // // Only if all words have some sort of match is the pattern considered matched. @@ -33317,7 +33317,7 @@ var ts; // Note: we may have more pattern parts than candidate parts. This is because multiple // pattern parts may match a candidate part. For example "SiUI" against "SimpleUI". // We'll have 3 pattern parts Si/U/I against two candidate parts Simple/UI. However, U - // and I will both match in UI. + // and I will both match in UI. var currentCandidate = 0; var currentChunkSpan = 0; var firstMatch = undefined; @@ -33346,13 +33346,13 @@ var ts; // Consider the case of matching SiUI against SimpleUIElement. The candidate parts // will be Simple/UI/Element, and the pattern parts will be Si/U/I. We'll match 'Si' // against 'Simple' first. Then we'll match 'U' against 'UI'. However, we want to - // still keep matching pattern parts against that candidate part. + // still keep matching pattern parts against that candidate part. for (; currentChunkSpan < chunkCharacterSpans.length; currentChunkSpan++) { var chunkCharacterSpan = chunkCharacterSpans[currentChunkSpan]; if (gotOneMatchThisCandidate) { // We've already gotten one pattern part match in this candidate. We will // only continue trying to consumer pattern parts if the last part and this - // part are both upper case. + // part are both upper case. if (!isUpperCaseLetter(chunk.text.charCodeAt(chunkCharacterSpans[currentChunkSpan - 1].start)) || !isUpperCaseLetter(chunk.text.charCodeAt(chunkCharacterSpans[currentChunkSpan].start))) { break; @@ -33384,9 +33384,9 @@ var ts; ts.createPatternMatcher = createPatternMatcher; // Helper function to compare two matches to determine which is better. Matches are first // ordered by kind (so all prefix matches always beat all substring matches). Then, if the - // match is a camel case match, the relative weights of the match are used to determine - // which is better (with a greater weight being better). Then if the match is of the same - // type, then a case sensitive match is considered better than an insensitive one. + // match is a camel case match, the relative weights of the match are used to determine + // which is better (with a greater weight being better). Then if the match is of the same + // type, then a case sensitive match is considered better than an insensitive one. function patternMatchCompareTo(match1, match2) { return compareType(match1, match2) || compareCamelCase(match1, match2) || @@ -33436,7 +33436,7 @@ var ts; if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 2 /* Latest */)) { return false; } - // TODO: find a way to determine this for any unicode characters in a + // TODO: find a way to determine this for any unicode characters in a // non-allocating manner. var str = String.fromCharCode(ch); return str === str.toUpperCase(); @@ -33449,7 +33449,7 @@ var ts; if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 2 /* Latest */)) { return false; } - // TODO: find a way to determine this for any unicode characters in a + // TODO: find a way to determine this for any unicode characters in a // non-allocating manner. var str = String.fromCharCode(ch); return str === str.toLowerCase(); @@ -33498,7 +33498,7 @@ var ts; if (ch < 127 /* maxAsciiCharacter */) { return ch; } - // TODO: find a way to compute this for any unicode characters in a + // TODO: find a way to compute this for any unicode characters in a // non-allocating manner. return String.fromCharCode(ch).toLowerCase().charCodeAt(0); } @@ -33649,7 +33649,7 @@ var ts; var currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index)); // See if the casing indicates we're starting a new word. Note: if we're breaking on // words, then just seeing an upper case character isn't enough. Instead, it has to - // be uppercase and the previous character can't be uppercase. + // be uppercase and the previous character can't be uppercase. // // For example, breaking "AddMetadata" on words would make: Add Metadata // @@ -33673,9 +33673,9 @@ var ts; var SignatureHelp; (function (SignatureHelp) { // A partially written generic type expression is not guaranteed to have the correct syntax tree. the expression could be parsed as less than/greater than expression or a comma expression - // or some other combination depending on what the user has typed so far. For the purposes of signature help we need to consider any location after "<" as a possible generic type reference. - // To do this, the method will back parse the expression starting at the position required. it will try to parse the current expression as a generic type expression, if it did succeed it - // will return the generic identifier that started the expression (e.g. "foo" in "foo'. So, in the case where the last child is a comma, we increase the // arg count by one to compensate. // - // Note: this subtlety only applies to the last comma. If you had "Foo(a,," then - // we'll have: 'a' '' '' + // Note: this subtlety only applies to the last comma. If you had "Foo(a,," then + // we'll have: 'a' '' '' // That will give us 2 non-commas. We then add one for the last comma, givin us an // arg count of 3. var listChildren = argumentsList.getChildren(); @@ -34524,7 +34524,7 @@ var ts; var children = n.getChildren(); for (var _i = 0; _i < children.length; _i++) { var child = children[_i]; - var shouldDiveInChildNode = + var shouldDiveInChildNode = // previous token is enclosed somewhere in the child (child.pos <= previousToken.pos && child.end > previousToken.end) || // previous token ends exactly at the beginning of child @@ -34569,7 +34569,7 @@ var ts; } } ts.Debug.assert(startNode !== undefined || n.kind === 230 /* SourceFile */); - // Here we know that none of child token nodes embrace the position, + // Here we know that none of child token nodes embrace the position, // the only known case is when position is at the end of the file. // Try to find the rightmost token in the file without filtering. // Namely we are skipping the check: 'position < node.end' @@ -35031,9 +35031,9 @@ var ts; var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); return startPos < endPos && current !== 1 /* EndOfFileToken */ && !ts.isTrivia(current); } - // when containing node in the tree is token + // when containing node in the tree is token // but its kind differs from the kind that was returned by the scanner, - // then kind needs to be fixed. This might happen in cases + // then kind needs to be fixed. This might happen in cases // when parser interprets token differently, i.e keyword treated as identifier function fixTokenKind(tokenInfo, container) { if (ts.isToken(container) && tokenInfo.token.kind !== container.kind) { @@ -35555,17 +35555,17 @@ var ts; Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) { //// This check is mainly used inside SpaceBeforeOpenBraceInControl and SpaceBeforeOpenBraceInFunction. //// - //// Ex: + //// Ex: //// if (1) { .... //// * ) and { are on the same line so apply the rule. Here we don't care whether it's same or multi block context //// - //// Ex: + //// Ex: //// if (1) //// { ... } //// * ) and { are on differnet lines. We only need to format if the block is multiline context. So in this case we don't format. //// //// Ex: - //// if (1) + //// if (1) //// { ... //// } //// * ) and { are on differnet lines. We only need to format if the block is multiline context. So in this case we format. @@ -35841,9 +35841,9 @@ var ts; //// 4- Context rules with any token combination //// 5- Non-context rules with specific token combination //// 6- Non-context rules with any token combination - //// + //// //// The member rulesInsertionIndexBitmap is used to describe the number of rules - //// in each sub-bucket (above) hence can be used to know the index of where to insert + //// in each sub-bucket (above) hence can be used to know the index of where to insert //// the next rule. It's a bitmap which contains 6 different sections each is given 5 bits. //// //// Example: @@ -36037,7 +36037,7 @@ var ts; /// /// /// -/// +/// /// /* @internal */ var ts; @@ -36191,9 +36191,9 @@ var ts; } function findOutermostParent(position, expectedTokenKind, sourceFile) { var precedingToken = ts.findPrecedingToken(position, sourceFile); - // when it is claimed that trigger character was typed at given position + // when it is claimed that trigger character was typed at given position // we verify that there is a token with a matching kind whose end is equal to position (because the character was just typed). - // If this condition is not hold - then trigger character was typed in some other context, + // If this condition is not hold - then trigger character was typed in some other context, // i.e.in comment and thus should not trigger autoformatting if (!precedingToken || precedingToken.kind !== expectedTokenKind || @@ -36202,12 +36202,12 @@ var ts; } // walk up and search for the parent node that ends at the same position with precedingToken. // for cases like this - // + // // let x = 1; // while (true) { - // } + // } // after typing close curly in while statement we want to reformat just the while statement. - // However if we just walk upwards searching for the parent that has the same end value - + // However if we just walk upwards searching for the parent that has the same end value - // we'll end up with the whole source file. isListElement allows to stop on the list element level var current = precedingToken; while (current && @@ -36272,7 +36272,7 @@ var ts; // 'index' tracks the index of the most recent error that was checked. while (true) { if (index >= sorted.length) { - // all errors in the range were already checked -> no error in specified range + // all errors in the range were already checked -> no error in specified range return false; } var error = sorted[index]; @@ -36400,9 +36400,9 @@ var ts; var indentation = inheritedIndentation; if (indentation === -1 /* Unknown */) { if (isSomeBlock(node.kind)) { - // blocks should be indented in + // blocks should be indented in // - other blocks - // - source file + // - source file // - switch\default clauses if (isSomeBlock(parent.kind) || parent.kind === 230 /* SourceFile */ || @@ -36523,12 +36523,12 @@ var ts; // a useful observations when tracking context node // / // [a] - // / | \ + // / | \ // [b] [c] [d] - // node 'a' is a context node for nodes 'b', 'c', 'd' + // node 'a' is a context node for nodes 'b', 'c', 'd' // except for the leftmost leaf token in [b] - in this case context node ('e') is located somewhere above 'a' // this rule can be applied recursively to child nodes of 'a'. - // + // // context node is set to parent node value after processing every child node // context node is set to parent of the token after processing every token var childContextNode = contextNode; @@ -36630,7 +36630,7 @@ var ts; var tokenInfo = formattingScanner.readTokenInfo(parent); // consume the list end token only if it is still belong to the parent // there might be the case when current token matches end token but does not considered as one - // function (x: function) <-- + // function (x: function) <-- // without this check close paren will be interpreted as list end token for function expression which is wrong if (tokenInfo.token.kind === listEndToken && ts.rangeContainsRange(parent, tokenInfo.token)) { // consume list end token @@ -36747,7 +36747,7 @@ var ts; applyRuleEdits(rule, previousItem, previousStartLine, currentItem, currentStartLine); if (rule.Operation.Action & (2 /* Space */ | 8 /* Delete */) && currentStartLine !== previousStartLine) { lineAdded = false; - // Handle the case where the next line is moved to be the end of this line. + // Handle the case where the next line is moved to be the end of this line. // In this case we don't indent the next line in the next pass. if (currentParent.getStart(sourceFile) === currentItem.pos) { dynamicIndentation.recomputeIndentation(false); @@ -36755,7 +36755,7 @@ var ts; } else if (rule.Operation.Action & 4 /* NewLine */ && currentStartLine === previousStartLine) { lineAdded = true; - // Handle the case where token2 is moved to the new line. + // Handle the case where token2 is moved to the new line. // In this case we indent token2 in the next pass but we set // sameLineIndent flag to notify the indenter that the indentation is within the line. if (currentParent.getStart(sourceFile) === currentItem.pos) { @@ -37573,10 +37573,10 @@ var ts; var jsDocCommentParts = []; ts.forEach(declarations, function (declaration, indexOfDeclaration) { // Make sure we are collecting doc comment from declaration once, - // In case of union property there might be same declaration multiple times + // In case of union property there might be same declaration multiple times // which only varies in type parameter // Eg. let a: Array | Array; a.length - // The property length will have two declarations of property length coming + // The property length will have two declarations of property length coming // from Array - Array and Array if (ts.indexOf(declarations, declaration) === indexOfDeclaration) { var sourceFileOfDeclaration = ts.getSourceFileOfNode(declaration); @@ -37611,7 +37611,7 @@ var ts; return ts.map(ts.getJsDocComments(node, sourceFile), function (jsDocComment) { return { pos: jsDocComment.pos + "/*".length, - end: jsDocComment.end - "*/".length // Trim off comment end indicator + end: jsDocComment.end - "*/".length // Trim off comment end indicator }; }); } @@ -37713,7 +37713,7 @@ var ts; if (isParamTag(pos, end, sourceFile)) { var blankLineCount = 0; var recordedParamTag = false; - // Consume leading spaces + // Consume leading spaces pos = consumeWhiteSpaces(pos + paramTag.length); if (pos >= end) { break; @@ -37763,7 +37763,7 @@ var ts; var firstLineParamHelpStringPos = pos; while (pos < end) { var ch = sourceFile.text.charCodeAt(pos); - // at line break, set this comment line text and go to next line + // at line break, set this comment line text and go to next line if (ts.isLineBreak(ch)) { if (paramHelpString) { pushDocCommentLineText(paramDocComments, paramHelpString, blankLineCount); @@ -37816,7 +37816,7 @@ var ts; if (paramHelpStringMargin === undefined) { paramHelpStringMargin = sourceFile.getLineAndCharacterOfPosition(firstLineParamHelpStringPos).character; } - // Now consume white spaces max + // Now consume white spaces max var startOfLinePos = pos; pos = consumeWhiteSpacesOnTheLine(pos, end, sourceFile, paramHelpStringMargin); if (pos >= end) { @@ -37886,8 +37886,8 @@ var ts; }; SignatureObject.prototype.getDocumentationComment = function () { if (this.documentationComment === undefined) { - this.documentationComment = this.declaration ? getJsDocCommentsFromDeclarations([this.declaration], - /*name*/ undefined, + this.documentationComment = this.declaration ? getJsDocCommentsFromDeclarations([this.declaration], + /*name*/ undefined, /*canUseParsedParamTagComments*/ false) : []; } return this.documentationComment; @@ -38294,8 +38294,8 @@ var ts; return CancellationTokenObject; })(); ts.CancellationTokenObject = CancellationTokenObject; - // Cache host information about scrip Should be refreshed - // at each language service public entry point, since we don't know when + // Cache host information about scrip Should be refreshed + // at each language service public entry point, since we don't know when // set of scripts handled by the host changes. var HostCache = (function () { function HostCache(host, getCanonicalFileName) { @@ -38408,7 +38408,7 @@ var ts; options.isolatedModules = true; // Filename can be non-ts file. options.allowNonTsExtensions = true; - // We are not returning a sourceFile for lib file when asked by the program, + // We are not returning a sourceFile for lib file when asked by the program, // so pass --noLib to avoid reporting a file not found error. options.noLib = true; // We are not doing a full typecheck, we are not resolving the whole context, @@ -38461,7 +38461,7 @@ var ts; ts.createLanguageServiceSourceFile = createLanguageServiceSourceFile; ts.disableIncrementalParsing = false; function updateLanguageServiceSourceFile(sourceFile, scriptSnapshot, version, textChangeRange, aggressiveChecks) { - // If we were given a text change range, and our version or open-ness changed, then + // If we were given a text change range, and our version or open-ness changed, then // incrementally parse this file. if (textChangeRange) { if (version !== sourceFile.version) { @@ -38565,7 +38565,7 @@ var ts; bucket.set(fileName, entry); } else { - // We have an entry for this file. However, it may be for a different version of + // We have an entry for this file. However, it may be for a different version of // the script snapshot. If so, update it appropriately. Otherwise, we can just // return it as is. if (entry.sourceFile.version !== version) { @@ -39020,10 +39020,10 @@ var ts; if (programUpToDate()) { return; } - // IMPORTANT - It is critical from this moment onward that we do not check + // IMPORTANT - It is critical from this moment onward that we do not check // cancellation tokens. We are about to mutate source files from a previous program // instance. If we cancel midway through, we may end up in an inconsistent state where - // the program points to old source files that have been invalidated because of + // the program points to old source files that have been invalidated because of // incremental parsing. var oldSettings = program && program.getCompilerOptions(); var newSettings = hostCache.compilationSettings(); @@ -39039,7 +39039,7 @@ var ts; writeFile: function (fileName, data, writeByteOrderMark) { }, getCurrentDirectory: function () { return host.getCurrentDirectory(); } }); - // Release any files we have acquired in the old program but are + // Release any files we have acquired in the old program but are // not part of the new program. if (program) { var oldSourceFiles = program.getSourceFiles(); @@ -39055,7 +39055,7 @@ var ts; // It needs to be cleared to allow all collected snapshots to be released hostCache = undefined; program = newProgram; - // Make sure all the nodes in the program are both bound, and have their parent + // Make sure all the nodes in the program are both bound, and have their parent // pointers set property. program.getTypeChecker(); return; @@ -39075,7 +39075,7 @@ var ts; // Check if the old program had this file already var oldSourceFile = program && program.getSourceFile(fileName); if (oldSourceFile) { - // We already had a source file for this file name. Go to the registry to + // We already had a source file for this file name. Go to the registry to // ensure that we get the right up to date version of it. We need this to // address the following 'race'. Specifically, say we have the following: // @@ -39086,15 +39086,15 @@ var ts; // LS2 // // Each LS has a reference to file 'foo.ts' at version 1. LS2 then updates - // it's version of 'foo.ts' to version 2. This will cause LS2 and the - // DocumentRegistry to have version 2 of the document. HOwever, LS1 will + // it's version of 'foo.ts' to version 2. This will cause LS2 and the + // DocumentRegistry to have version 2 of the document. HOwever, LS1 will // have version 1. And *importantly* this source file will be *corrupt*. // The act of creating version 2 of the file irrevocably damages the version // 1 file. // // So, later when we call into LS1, we need to make sure that it doesn't use // it's source file any more, and instead defers to DocumentRegistry to get - // either version 1, version 2 (or some other version) depending on what the + // either version 1, version 2 (or some other version) depending on what the // host says should be used. return documentRegistry.updateDocument(fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version); } @@ -39153,7 +39153,7 @@ var ts; synchronizeHostData(); var targetSourceFile = getValidSourceFile(fileName); // For JavaScript files, we don't want to report the normal typescript semantic errors. - // Instead, we just report errors for using TypeScript-only constructs from within a + // Instead, we just report errors for using TypeScript-only constructs from within a // JavaScript file. if (ts.isJavaScript(fileName)) { return getJavaScriptSemanticDiagnostics(targetSourceFile); @@ -39398,8 +39398,8 @@ var ts; log("Returning an empty list because completion was requested in an invalid position."); return undefined; } - // Find the node where completion is requested on, in the case of a completion after - // a dot, it is the member access expression other wise, it is a request for all + // Find the node where completion is requested on, in the case of a completion after + // a dot, it is the member access expression other wise, it is a request for all // visible symbols in the scope, and the node is the current location. var node = currentToken; var isRightOfDot = false; @@ -39463,7 +39463,7 @@ var ts; } } if (isJavaScriptFile && type.flags & 16384 /* Union */) { - // In javascript files, for union types, we don't just get the members that + // In javascript files, for union types, we don't just get the members that // the individual types have in common, we also include all the members that // each individual type has. This is because we're going to add all identifiers // anyways. So we might as well elevate the members that were at least part @@ -39522,10 +39522,10 @@ var ts; // aggregating completion candidates. This is achieved in 'getScopeNode' // by finding the first node that encompasses a position, accounting for whether a node // is "complete" to decide whether a position belongs to the node. - // + // // However, at the end of an identifier, we are interested in the scope of the identifier // itself, but fall outside of the identifier. For instance: - // + // // xyz => x$ // // the cursor is outside of both the 'x' and the arrow function 'xyz => x', @@ -39574,7 +39574,7 @@ var ts; } function showCompletionsInImportsClause(node) { if (node) { - // import {| + // import {| // import {a,| if (node.kind === 14 /* OpenBraceToken */ || node.kind === 23 /* CommaToken */) { return node.parent.kind === 215 /* NamedImports */; @@ -39860,17 +39860,17 @@ var ts; return entries; } function createCompletionEntry(symbol, location) { - // Try to get a valid display name for this symbol, if we could not find one, then ignore it. + // Try to get a valid display name for this symbol, if we could not find one, then ignore it. // We would like to only show things that can be added after a dot, so for instance numeric properties can // not be accessed with a dot (a.1 <- invalid) var displayName = getCompletionEntryDisplayNameForSymbol(symbol, program.getCompilerOptions().target, true); if (!displayName) { return undefined; } - // TODO(drosen): Right now we just permit *all* semantic meanings when calling - // 'getSymbolKind' which is permissible given that it is backwards compatible; but + // TODO(drosen): Right now we just permit *all* semantic meanings when calling + // 'getSymbolKind' which is permissible given that it is backwards compatible; but // really we should consider passing the meaning for the node so that we don't report - // that a suggestion for a value is an interface. We COULD also just do what + // that a suggestion for a value is an interface. We COULD also just do what // 'getSymbolModifiers' does, which is to use the first declaration. // Use a 'sortText' of 0' so that all symbol completion entries come before any other // entries (like JavaScript identifier entries). @@ -39910,8 +39910,8 @@ var ts; var symbols = completionData.symbols, location_2 = completionData.location; // Find the symbol with the matching entry name. var target = program.getCompilerOptions().target; - // We don't need to perform character checks here because we're only comparing the - // name against 'entryName' (which is known to be good), not building a new + // We don't need to perform character checks here because we're only comparing the + // name against 'entryName' (which is known to be good), not building a new // completion entry. var symbol = ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(s, target, false) === entryName ? s : undefined; }); if (symbol) { @@ -40005,7 +40005,7 @@ var ts; ts.Debug.assert(!!(rootSymbolFlags & 8192 /* Method */)); }); if (!unionPropertyKind) { - // If this was union of all methods, + // If this was union of all methods, //make sure it has call signatures before we can label it as method var typeOfUnionProperty = typeChecker.getTypeOfSymbolAtLocation(symbol, location); if (typeOfUnionProperty.getCallSignatures().length) { @@ -40068,7 +40068,7 @@ var ts; var useConstructSignatures = callExpression.kind === 161 /* NewExpression */ || callExpression.expression.kind === 91 /* SuperKeyword */; var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); if (!ts.contains(allSignatures, signature.target || signature)) { - // Get the first signature if there + // Get the first signature if there signature = allSignatures.length ? allSignatures[0] : undefined; } if (signature) { @@ -40411,7 +40411,7 @@ var ts; var containerName = containerSymbol ? typeChecker.symbolToString(containerSymbol, node) : ""; if (!tryAddConstructSignature(symbol, node, symbolKind, symbolName, containerName, result) && !tryAddCallSignature(symbol, node, symbolKind, symbolName, containerName, result)) { - // Just add all the declarations. + // Just add all the declarations. ts.forEach(declarations, function (declaration) { result.push(createDefinitionInfo(declaration, symbolKind, symbolName, containerName)); }); @@ -40506,7 +40506,7 @@ var ts; } // Because name in short-hand property assignment has two different meanings: property name and property value, // using go-to-definition at such position should go to the variable declaration of the property value rather than - // go to the declaration of the property name (in this case stay at the same position). However, if go-to-definition + // go to the declaration of the property name (in this case stay at the same position). However, if go-to-definition // is performed at the location of property access, we would like to go to definition of the property in the short-hand // assignment. This case and others are handled by the following code. if (node.parent.kind === 228 /* ShorthandPropertyAssignment */) { @@ -40557,7 +40557,7 @@ var ts; var results = getOccurrencesAtPositionCore(fileName, position); if (results) { var sourceFile = getCanonicalFileName(ts.normalizeSlashes(fileName)); - // Get occurrences only supports reporting occurrences for the file queried. So + // Get occurrences only supports reporting occurrences for the file queried. So // filter down to that list. results = ts.filter(results, function (r) { return getCanonicalFileName(ts.normalizeSlashes(r.fileName)) === sourceFile; }); } @@ -40677,7 +40677,7 @@ var ts; case 66 /* BreakKeyword */: case 71 /* ContinueKeyword */: if (hasKind(node.parent, 193 /* BreakStatement */) || hasKind(node.parent, 192 /* ContinueStatement */)) { - return getBreakOrContinueStatementOccurrences(node.parent); + return getBreakOrContinueStatementOccurences(node.parent); } break; case 82 /* ForKeyword */: @@ -40942,7 +40942,7 @@ var ts; }); return ts.map(keywords, getHighlightSpanForNode); } - function getBreakOrContinueStatementOccurrences(breakOrContinueStatement) { + function getBreakOrContinueStatementOccurences(breakOrContinueStatement) { var owner = getBreakOrContinueOwner(breakOrContinueStatement); if (owner) { switch (owner.kind) { @@ -41329,12 +41329,12 @@ var ts; // If we are past the end, stop looking if (position > end) break; - // We found a match. Make sure it's not part of a larger word (i.e. the char + // We found a match. Make sure it's not part of a larger word (i.e. the char // before and after it have to be a non-identifier char). var endPosition = position + symbolNameLength; if ((position === 0 || !ts.isIdentifierPart(text.charCodeAt(position - 1), 2 /* Latest */)) && (endPosition === sourceLength || !ts.isIdentifierPart(text.charCodeAt(endPosition), 2 /* Latest */))) { - // Found a real match. Keep searching. + // Found a real match. Keep searching. positions.push(position); } position = text.indexOf(symbolName, position + symbolNameLength + 1); @@ -41405,7 +41405,7 @@ var ts; cancellationToken.throwIfCancellationRequested(); var referenceLocation = ts.getTouchingPropertyName(sourceFile, position); if (!isValidReferencePosition(referenceLocation, searchText)) { - // This wasn't the start of a token. Check to see if it might be a + // This wasn't the start of a token. Check to see if it might be a // match in a comment or string if that's what the caller is asking // for. if ((findInStrings && isInString(position)) || @@ -41697,7 +41697,7 @@ var ts; return aliasedSymbol; } } - // If the reference location is in an object literal, try to get the contextual type for the + // If the reference location is in an object literal, try to get the contextual type for the // object literal, lookup the property symbol in the contextual type, and use this symbol to // compare to our searchSymbol if (isNameOfPropertyAssignment(referenceLocation)) { @@ -41712,7 +41712,7 @@ var ts; if (searchSymbols.indexOf(rootSymbol) >= 0) { return rootSymbol; } - // Finally, try all properties with the same name in any type the containing type extended or implemented, and + // Finally, try all properties with the same name in any type the containing type extended or implemented, and // see if any is in the list if (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */)) { var result_3 = []; @@ -42009,7 +42009,7 @@ var ts; } else if (isNameOfModuleDeclaration(nodeForStartPos)) { // If this is name of a module declarations, check if this is right side of dotted module name - // If parent of the module declaration which is parent of this node is module declaration and its body is the module declaration that this node is name of + // If parent of the module declaration which is parent of this node is module declaration and its body is the module declaration that this node is name of // Then this name is name from dotted module if (nodeForStartPos.parent.parent.kind === 208 /* ModuleDeclaration */ && nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { @@ -42227,7 +42227,7 @@ var ts; for (var _i = 0, _a = docComment.tags; _i < _a.length; _i++) { var tag = _a[_i]; // As we walk through each tag, classify the portion of text from the end of - // the last tag (or the start of the entire doc comment) as 'comment'. + // the last tag (or the start of the entire doc comment) as 'comment'. if (tag.pos !== pos) { pushCommentRange(pos, tag.pos - pos); } @@ -42279,7 +42279,7 @@ var ts; } } function classifyDisabledMergeCode(text, start, end) { - // Classify the line that the ======= marker is on as a comment. Then just lex + // Classify the line that the ======= marker is on as a comment. Then just lex // all further tokens and add them to the result. for (var i = start; i < end; i++) { if (ts.isLineBreak(text.charCodeAt(i))) { @@ -42310,7 +42310,7 @@ var ts; } } } - // for accurate classification, the actual token should be passed in. however, for + // for accurate classification, the actual token should be passed in. however, for // cases like 'disabled merge code' classification, we just get the token kind and // classify based on that instead. function classifyTokenType(tokenKind, token) { @@ -42495,11 +42495,11 @@ var ts; return []; } function getTodoComments(fileName, descriptors) { - // Note: while getting todo comments seems like a syntactic operation, we actually + // Note: while getting todo comments seems like a syntactic operation, we actually // treat it as a semantic operation here. This is because we expect our host to call // this on every single file. If we treat this syntactically, then that will cause // us to populate and throw away the tree in our syntax tree cache for each file. By - // treating this as a semantic operation, we can access any tree without throwing + // treating this as a semantic operation, we can access any tree without throwing // anything away. synchronizeHostData(); var sourceFile = getValidSourceFile(fileName); @@ -42523,7 +42523,7 @@ var ts; // 0) The full match for the entire regexp. // 1) The preamble to the message portion. // 2) The message portion. - // 3...N) The descriptor that was matched - by index. 'undefined' for each + // 3...N) The descriptor that was matched - by index. 'undefined' for each // descriptor that didn't match. an actual value if it did match. // // i.e. 'undefined' in position 3 above means TODO(jason) didn't match. @@ -42545,7 +42545,7 @@ var ts; } } ts.Debug.assert(descriptor !== undefined); - // We don't want to match something like 'TODOBY', so we make sure a non + // We don't want to match something like 'TODOBY', so we make sure a non // letter/digit follows the match. if (isLetterOrDigit(fileContents.charCodeAt(matchPosition + descriptor.text.length))) { continue; @@ -42590,10 +42590,10 @@ var ts; // (?:(TODO\(jason\))|(HACK)) // // Note that the outermost group is *not* a capture group, but the innermost groups - // *are* capture groups. By capturing the inner literals we can determine after + // *are* capture groups. By capturing the inner literals we can determine after // matching which descriptor we are dealing with. var literals = "(?:" + ts.map(descriptors, function (d) { return "(" + escapeRegExp(d.text) + ")"; }).join("|") + ")"; - // After matching a descriptor literal, the following regexp matches the rest of the + // After matching a descriptor literal, the following regexp matches the rest of the // text up to the end of the line (or */). var endOfLineOrEndOfComment = /(?:$|\*\/)/.source; var messageRemainder = /(?:.*?)/.source; @@ -42753,7 +42753,7 @@ var ts; var scanner = ts.createScanner(2 /* Latest */, false); /// We do not have a full parser support to know when we should parse a regex or not /// If we consider every slash token to be a regex, we could be missing cases like "1/2/3", where - /// we have a series of divide operator. this list allows us to be more accurate by ruling out + /// we have a series of divide operator. this list allows us to be more accurate by ruling out /// locations where a regexp cannot exist. var noRegexTable = []; noRegexTable[65 /* Identifier */] = true; @@ -42796,7 +42796,7 @@ var ts; keyword2 === 122 /* SetKeyword */ || keyword2 === 114 /* ConstructorKeyword */ || keyword2 === 109 /* StaticKeyword */) { - // Allow things like "public get", "public constructor" and "public static". + // Allow things like "public get", "public constructor" and "public static". // These are all legal. return true; } @@ -42913,12 +42913,12 @@ var ts; // token. So the classification will go back to being an identifier. The moment the user // types again, number will become a keyword, then an identifier, etc. etc. // - // To try to avoid this problem, we avoid classifying contextual keywords as keywords + // To try to avoid this problem, we avoid classifying contextual keywords as keywords // when the user is potentially typing something generic. We just can't do a good enough // job at the lexical level, and so well leave it up to the syntactic classifier to make // the determination. // - // In order to determine if the user is potentially typing something generic, we use a + // In order to determine if the user is potentially typing something generic, we use a // weak heuristic where we track < and > tokens. It's a weak heuristic, but should // work well enough in practice. var angleBracketStack = 0; @@ -42934,7 +42934,7 @@ var ts; token = 65 /* Identifier */; } else if (isKeyword(lastNonTriviaToken) && isKeyword(token) && !canFollow(lastNonTriviaToken, token)) { - // We have two keywords in a row. Only treat the second as a keyword if + // We have two keywords in a row. Only treat the second as a keyword if // it's a sequence that could legally occur in the language. Otherwise // treat it as an identifier. This way, if someone writes "private var" // we recognize that 'var' is actually an identifier here. @@ -42942,7 +42942,7 @@ var ts; } else if (lastNonTriviaToken === 65 /* Identifier */ && token === 24 /* LessThanToken */) { - // Could be the start of something generic. Keep track of that by bumping + // Could be the start of something generic. Keep track of that by bumping // up the current count of generic contexts we may be in. angleBracketStack++; } @@ -42957,7 +42957,7 @@ var ts; token === 113 /* BooleanKeyword */ || token === 124 /* SymbolKeyword */) { if (angleBracketStack > 0 && !syntacticClassifierAbsent) { - // If it looks like we're could be in something generic, don't classify this + // If it looks like we're could be in something generic, don't classify this // as a keyword. We may just get overwritten by the syntactic classifier, // causing a noisy experience for the user. token = 65 /* Identifier */; @@ -43052,8 +43052,8 @@ var ts; return; } if (start === 0 && offset > 0) { - // We're classifying the first token, and this was a case where we prepended - // text. We should consider the start of this token to be at the start of + // We're classifying the first token, and this was a case where we prepended + // text. We should consider the start of this token to be at the start of // the original text. start += offset; } @@ -43200,7 +43200,7 @@ var ts; } initializeServices(); })(ts || (ts = {})); -// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. +// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. // See LICENSE.txt in the project root for complete license information. /// /* @internal */ @@ -43221,8 +43221,8 @@ var ts; if (sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getStart()).line > lineOfPosition) { // Get previous token if the token is returned starts on new line // eg: let x =10; |--- cursor is here - // let y = 10; - // token at position will return let keyword on second line as the token but we would like to use + // let y = 10; + // token at position will return let keyword on second line as the token but we would like to use // token on same line if trailing trivia (comments or white spaces on same line) part of the last token on that line tokenAtLocation = ts.findPrecedingToken(tokenAtLocation.pos, sourceFile); // Its a blank line diff --git a/src/typings/electron.d.ts b/src/typings/electron.d.ts index 156e175b1d501..05aab3a81619f 100644 --- a/src/typings/electron.d.ts +++ b/src/typings/electron.d.ts @@ -584,7 +584,7 @@ declare namespace Electron { /** * ok - Nothing went wrong. - * error - One or more errors occurred, enable runtime logging to figure out the likely cause. + * error - One or more errors occured, enable runtime logging to figure out the likely cause. * invalidSeparatorError - An attempt was made to add a separator to a custom category in the Jump List. * Separators are only allowed in the standard Tasks category. * fileTypeRegistrationError - An attempt was made to add a file link to the Jump List From 50879b0da3fbd85fa16b1bfeb68f3a330fb4413e Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 14 Jun 2017 15:56:01 -0700 Subject: [PATCH 1846/2747] Get nsfw file watcher sending events back --- .../node/watcher/nsfw/nsfwWatcherService.ts | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts index 94462f18a4032..5b963bdc34887 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts @@ -6,6 +6,16 @@ import nsfw = require('nsfw'); import { IWatcherService, IWatcherRequest } from 'vs/workbench/services/files/node/watcher/unix/watcher'; import { TPromise } from "vs/base/common/winjs.base"; +import watcher = require('vs/workbench/services/files/node/watcher/common'); +import * as path from 'path'; + +const nsfwEventActionToRawChangeType = { + 0: 1, // Created + 1: 2, // Deleted + 2: 0, // Modified + // TODO: handle rename event type + 3: null // Rename +}; export class NsfwWatcherService implements IWatcherService { public watch(request: IWatcherRequest): TPromise { @@ -13,11 +23,32 @@ export class NsfwWatcherService implements IWatcherService { console.log('basePath ' + request.basePath); return new TPromise((c, e, p) => { nsfw(request.basePath, events => { - console.log(events); - p(events); + if (request.verboseLogging) { + console.log('raw events start'); + events.forEach(e => console.log(e)); + console.log('raw events end'); + } + const convertedEvents = events.map(e => this._mapNsfwEventToRawFileChange(e)).filter(e => !!e); + // TODO: Utilize fileEventDelayer and watcher.normalize + p(convertedEvents); }).then(watcher => { return watcher.start(); }); }); } + + private _mapNsfwEventToRawFileChange(nsfwEvent: any): watcher.IRawFileChange { + // TODO: Handle other event types (directory change?) + if (!nsfwEvent.directory || !nsfwEvent.file) { + return null; + } + const event: watcher.IRawFileChange = { + type: nsfwEventActionToRawChangeType[nsfwEvent.action], + path: path.join(nsfwEvent.directory, nsfwEvent.file) + }; + if (!event.type) { + return null; + } + return event; + } } From 3fb0d0256a10d329197249a54087986f7a2bf6e4 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 14 Jun 2017 16:28:31 -0700 Subject: [PATCH 1847/2747] Update marked version Fixes Microsoft/vscode-internalbacklog#40 --- src/vs/base/common/marked/OSSREADME.json | 2 +- src/vs/base/common/marked/raw.marked.js | 67 ++++++++++++++---------- 2 files changed, 40 insertions(+), 29 deletions(-) diff --git a/src/vs/base/common/marked/OSSREADME.json b/src/vs/base/common/marked/OSSREADME.json index 5fc985980a476..5bfc34a583baa 100644 --- a/src/vs/base/common/marked/OSSREADME.json +++ b/src/vs/base/common/marked/OSSREADME.json @@ -3,6 +3,6 @@ [{ "name": "chjj-marked", "repositoryURL": "https://github.com/npmcomponent/chjj-marked", - "version": "0.3.2", + "version": "0.3.6", "license": "MIT" }] diff --git a/src/vs/base/common/marked/raw.marked.js b/src/vs/base/common/marked/raw.marked.js index ce02369727acb..5b3f6940d0020 100644 --- a/src/vs/base/common/marked/raw.marked.js +++ b/src/vs/base/common/marked/raw.marked.js @@ -1,4 +1,3 @@ - /** * marked - a markdown parser * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) @@ -78,8 +77,9 @@ block.normal = merge({}, block); */ block.gfm = merge({}, block.normal, { - fences: /^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/, - paragraph: /^/ + fences: /^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/, + paragraph: /^/, + heading: /^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/ }); block.gfm.paragraph = replace(block.paragraph) @@ -191,7 +191,7 @@ Lexer.prototype.token = function(src, top, bq) { this.tokens.push({ type: 'code', lang: cap[2], - text: cap[3] + text: cap[3] || '' }); continue; } @@ -362,7 +362,8 @@ Lexer.prototype.token = function(src, top, bq) { type: this.options.sanitize ? 'paragraph' : 'html', - pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style', + pre: !this.options.sanitizer + && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'), text: cap[0] }); continue; @@ -457,7 +458,7 @@ var inline = { reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/, nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/, strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/, - em: /^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/, + em: /^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/, code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/, br: /^ {2,}\n(?!\s*$)/, del: noop, @@ -609,8 +610,10 @@ InlineLexer.prototype.output = function(src) { } src = src.substring(cap[0].length); out += this.options.sanitize - ? escape(cap[0]) - : cap[0]; + ? this.options.sanitizer + ? this.options.sanitizer(cap[0]) + : escape(cap[0]) + : cap[0] continue; } @@ -681,7 +684,7 @@ InlineLexer.prototype.output = function(src) { // text if (cap = this.rules.text.exec(src)) { src = src.substring(cap[0].length); - out += escape(this.smartypants(cap[0])); + out += this.renderer.text(escape(this.smartypants(cap[0]))); continue; } @@ -710,24 +713,24 @@ InlineLexer.prototype.outputLink = function(cap, link) { /** * Smartypants Transformations */ -// TODO MonacoChange: Our build fails over the following lines if they are not commented out + InlineLexer.prototype.smartypants = function(text) { - return text; -// if (!this.options.smartypants) return text; -// return text -// // em-dashes -// .replace(/--/g, '\u2014') -// // opening singles -// .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') -// // closing singles & apostrophes -// .replace(/'/g, '\u2019') -// // opening doubles -// .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') -// // closing doubles -// .replace(/"/g, '\u201d') -// // ellipses -// .replace(/\.{3}/g, '\u2026'); -// END MonacoChange + if (!this.options.smartypants) return text; + return text + // em-dashes + .replace(/---/g, '\u2014') + // en-dashes + .replace(/--/g, '\u2013') + // opening singles + .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') + // closing singles & apostrophes + .replace(/'/g, '\u2019') + // opening doubles + .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') + // closing doubles + .replace(/"/g, '\u201d') + // ellipses + .replace(/\.{3}/g, '\u2026'); }; /** @@ -735,6 +738,7 @@ InlineLexer.prototype.smartypants = function(text) { */ InlineLexer.prototype.mangle = function(text) { + if (!this.options.mangle) return text; var out = '' , l = text.length , i = 0 @@ -873,7 +877,7 @@ Renderer.prototype.link = function(href, title, text) { } catch (e) { return ''; } - if (prot.indexOf('javascript:') === 0) { + if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) { return ''; } } @@ -894,6 +898,10 @@ Renderer.prototype.image = function(href, title, text) { return out; }; +Renderer.prototype.text = function(text) { + return text; +}; + /** * Parsing & Compiling */ @@ -1088,7 +1096,8 @@ function escape(html, encode) { } function unescape(html) { - return html.replace(/&([#\w]+);/g, function(_, n) { + // explicitly match decimal, hex, and named HTML entities + return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g, function(_, n) { n = n.toLowerCase(); if (n === 'colon') return ':'; if (n.charAt(0) === '#') { @@ -1237,6 +1246,8 @@ marked.defaults = { breaks: false, pedantic: false, sanitize: false, + sanitizer: null, + mangle: true, smartLists: false, silent: false, highlight: null, From 29ee3244fd27023bb4c0ce3ca886ff09e14f9f26 Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 14 Jun 2017 17:04:38 -0700 Subject: [PATCH 1848/2747] Find Widget in Terminal --- .../parts/terminal/common/terminal.ts | 17 ++ .../parts/terminal/common/terminalService.ts | 9 +- .../electron-browser/media/close-dark.svg | 1 + .../terminal/electron-browser/media/close.svg | 1 + .../electron-browser/media/next-inverse.svg | 5 + .../terminal/electron-browser/media/next.svg | 5 + .../media/previous-inverse.svg | 5 + .../electron-browser/media/previous.svg | 5 + .../electron-browser/media/terminal.css | 72 ++++++ .../electron-browser/terminal.contribution.ts | 12 +- .../electron-browser/terminalActions.ts | 34 +++ .../electron-browser/terminalFindWidget.ts | 221 ++++++++++++++++++ .../electron-browser/terminalInstance.ts | 8 + .../electron-browser/terminalPanel.ts | 18 +- .../electron-browser/terminalService.ts | 21 +- 15 files changed, 426 insertions(+), 8 deletions(-) create mode 100644 src/vs/workbench/parts/terminal/electron-browser/media/close-dark.svg create mode 100644 src/vs/workbench/parts/terminal/electron-browser/media/close.svg create mode 100644 src/vs/workbench/parts/terminal/electron-browser/media/next-inverse.svg create mode 100644 src/vs/workbench/parts/terminal/electron-browser/media/next.svg create mode 100644 src/vs/workbench/parts/terminal/electron-browser/media/previous-inverse.svg create mode 100644 src/vs/workbench/parts/terminal/electron-browser/media/previous.svg create mode 100644 src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.ts diff --git a/src/vs/workbench/parts/terminal/common/terminal.ts b/src/vs/workbench/parts/terminal/common/terminal.ts index 116c8854a77e2..34cf3aaac1dee 100644 --- a/src/vs/workbench/parts/terminal/common/terminal.ts +++ b/src/vs/workbench/parts/terminal/common/terminal.ts @@ -27,6 +27,11 @@ export const KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED = new RawContextKey('terminalFindWidgetVisible', undefined); +/** A context key that is set when the find widget in integrated terminal is not visible. */ +export const KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_NOT_VISIBLE: ContextKeyExpr = KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE.toNegated(); + export const IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY = 'terminal.integrated.isWorkspaceShellAllowed'; export const NEVER_SUGGEST_SELECT_WINDOWS_SHELL_STORAGE_KEY = 'terminal.integrated.neverSuggestSelectWindowsShell'; @@ -147,6 +152,8 @@ export interface ITerminalService { showPanel(focus?: boolean): TPromise; hidePanel(): void; + focusFindWidget(): TPromise; + hideFindWidget(): void; setContainers(panelContainer: HTMLElement, terminalContainer: HTMLElement): void; updateConfig(): void; selectDefaultWindowsShell(): TPromise; @@ -235,6 +242,16 @@ export interface ITerminalInstance { */ selectAll(): void; + /** + * Find the next instance of the term + */ + findNext(term: string): boolean; + + /** + * Find the previous instance of the term + */ + findPrevious(term: string): boolean; + /** * Focuses the terminal instance. * diff --git a/src/vs/workbench/parts/terminal/common/terminalService.ts b/src/vs/workbench/parts/terminal/common/terminalService.ts index 7dbb40a3233c7..5362507941f69 100644 --- a/src/vs/workbench/parts/terminal/common/terminalService.ts +++ b/src/vs/workbench/parts/terminal/common/terminalService.ts @@ -10,7 +10,7 @@ import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IPartService } from 'vs/workbench/services/part/common/partService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { ITerminalService, ITerminalInstance, IShellLaunchConfig, ITerminalConfigHelper, KEYBINDING_CONTEXT_TERMINAL_FOCUS, TERMINAL_PANEL_ID } from 'vs/workbench/parts/terminal/common/terminal'; +import { ITerminalService, ITerminalInstance, IShellLaunchConfig, ITerminalConfigHelper, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE, TERMINAL_PANEL_ID } from 'vs/workbench/parts/terminal/common/terminal'; import { TPromise } from 'vs/base/common/winjs.base'; export abstract class TerminalService implements ITerminalService { @@ -18,6 +18,7 @@ export abstract class TerminalService implements ITerminalService { protected _isShuttingDown: boolean; protected _terminalFocusContextKey: IContextKey; + protected _findWidgetVisible: IContextKey; protected _terminalContainer: HTMLElement; protected _onInstancesChanged: Emitter; protected _onInstanceDisposed: Emitter; @@ -43,7 +44,7 @@ export abstract class TerminalService implements ITerminalService { constructor( @IContextKeyService private _contextKeyService: IContextKeyService, @IConfigurationService private _configurationService: IConfigurationService, - @IPanelService private _panelService: IPanelService, + @IPanelService protected _panelService: IPanelService, @IPartService private _partService: IPartService, @ILifecycleService lifecycleService: ILifecycleService ) { @@ -61,6 +62,7 @@ export abstract class TerminalService implements ITerminalService { this._configurationService.onDidUpdateConfiguration(() => this.updateConfig()); lifecycleService.onWillShutdown(event => event.veto(this._onWillShutdown())); this._terminalFocusContextKey = KEYBINDING_CONTEXT_TERMINAL_FOCUS.bindTo(this._contextKeyService); + this._findWidgetVisible = KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE.bindTo(this._contextKeyService); this.onInstanceDisposed((terminalInstance) => { this._removeInstance(terminalInstance); }); } @@ -200,6 +202,9 @@ export abstract class TerminalService implements ITerminalService { } } + public abstract focusFindWidget(): TPromise; + public abstract hideFindWidget(): void; + private _getIndexFromId(terminalId: number): number { let terminalIndex = -1; this.terminalInstances.forEach((terminalInstance, i) => { diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/close-dark.svg b/src/vs/workbench/parts/terminal/electron-browser/media/close-dark.svg new file mode 100644 index 0000000000000..751e89b3b0215 --- /dev/null +++ b/src/vs/workbench/parts/terminal/electron-browser/media/close-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/close.svg b/src/vs/workbench/parts/terminal/electron-browser/media/close.svg new file mode 100644 index 0000000000000..fde34404d4eb8 --- /dev/null +++ b/src/vs/workbench/parts/terminal/electron-browser/media/close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/next-inverse.svg b/src/vs/workbench/parts/terminal/electron-browser/media/next-inverse.svg new file mode 100644 index 0000000000000..7498a498bb652 --- /dev/null +++ b/src/vs/workbench/parts/terminal/electron-browser/media/next-inverse.svg @@ -0,0 +1,5 @@ + + + diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/next.svg b/src/vs/workbench/parts/terminal/electron-browser/media/next.svg new file mode 100644 index 0000000000000..4b176879f90af --- /dev/null +++ b/src/vs/workbench/parts/terminal/electron-browser/media/next.svg @@ -0,0 +1,5 @@ + + + diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/previous-inverse.svg b/src/vs/workbench/parts/terminal/electron-browser/media/previous-inverse.svg new file mode 100644 index 0000000000000..0aabf393d9c2f --- /dev/null +++ b/src/vs/workbench/parts/terminal/electron-browser/media/previous-inverse.svg @@ -0,0 +1,5 @@ + + + diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/previous.svg b/src/vs/workbench/parts/terminal/electron-browser/media/previous.svg new file mode 100644 index 0000000000000..f7acf0acbd999 --- /dev/null +++ b/src/vs/workbench/parts/terminal/electron-browser/media/previous.svg @@ -0,0 +1,5 @@ + + + diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css b/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css index f2cc6747e2c4d..0b6570ccef9d3 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css @@ -78,3 +78,75 @@ .hc-black .monaco-workbench.mac .panel.integrated-terminal .xterm-rows { cursor: -webkit-image-set(url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=') 1x, url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC') 2x) 5 8, text; } + +.monaco-workbench .panel.integrated-terminal .find-part { + position: absolute; + top: -40px; + right: 28px; + display: none; + padding: 4px; + align-items: center; + + -webkit-transition: top 200ms linear; + -o-transition: top 200ms linear; + -moz-transition: top 200ms linear; + -ms-transition: top 200ms linear; + transition: top 200ms linear; +} + +.monaco-workbench .panel.integrated-terminal .find-part.visible { + top: 0; + display: flex; +} + +/* Temporarily we don't show match numbers */ +.monaco-workbench .panel.integrated-terminal .find-part .monaco-findInput .controls { + display: none; +} +.monaco-workbench .panel.integrated-terminal .find-part .monaco-findInput .monaco-inputbox .wrapper .input { + width: 100% !important; +} + +.monaco-workbench .panel.integrated-terminal .find-part .button { + min-width: 20px; + width: 20px; + height: 20px; + display: flex; + flex: initial; + margin-left: 3px; + background-position: center center; + background-repeat: no-repeat; + cursor: pointer; +} + +.monaco-workbench .panel.integrated-terminal .find-part .button.previous { + background-image: url('previous.svg'); +} + +.monaco-workbench .panel.integrated-terminal .find-part .button.next { + background-image: url('next.svg'); +} + +.monaco-workbench .panel.integrated-terminal .find-part .button.close-fw { + background-image: url('close.svg'); +} + +.hc-black .monaco-workbench .panel.integrated-terminal .find-part .button.previous, +.vs-dark .monaco-workbench .panel.integrated-terminal .find-part .button.previous { + background-image: url('previous-inverse.svg'); +} + +.hc-black .monaco-workbench .panel.integrated-terminal .find-part .button.next, +.vs-dark .monaco-workbench .panel.integrated-terminal .find-part .button.next { + background-image: url('next-inverse.svg'); +} + +.hc-black .monaco-workbench .panel.integrated-terminal .find-part .button.close-fw, +.vs-dark .monaco-workbench .panel.integrated-terminal .find-part .button.close-fw { + background-image: url('close-dark.svg'); +} + +monaco-workbench .panel.integrated-terminal .find-part .button.disabled { + opacity: 0.3; + cursor: default; +} \ No newline at end of file diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index 3dafb84e0b549..b58c93b8e2291 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -13,12 +13,12 @@ import * as panel from 'vs/workbench/browser/panel'; import * as platform from 'vs/base/common/platform'; import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; import { GlobalQuickOpenAction } from 'vs/workbench/browser/parts/quickopen/quickopen.contribution'; -import { ITerminalService, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, TERMINAL_PANEL_ID, TERMINAL_DEFAULT_RIGHT_CLICK_COPY_PASTE, TerminalCursorStyle } from 'vs/workbench/parts/terminal/common/terminal'; +import { ITerminalService, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, TERMINAL_PANEL_ID, TERMINAL_DEFAULT_RIGHT_CLICK_COPY_PASTE, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE, TerminalCursorStyle } from 'vs/workbench/parts/terminal/common/terminal'; import { TERMINAL_DEFAULT_SHELL_LINUX, TERMINAL_DEFAULT_SHELL_OSX, TERMINAL_DEFAULT_SHELL_WINDOWS } from 'vs/workbench/parts/terminal/electron-browser/terminal'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; -import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, FocusTerminalAtIndexAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction, AllowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand, RenameTerminalAction, SelectAllTerminalAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; +import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, FocusTerminalAtIndexAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction, AllowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand, RenameTerminalAction, SelectAllTerminalAction, FocusTerminalFindWidgetAction, HideTerminalFindWidgetAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; import { Registry } from 'vs/platform/platform'; import { ShowAllCommandsAction } from 'vs/workbench/parts/quickopen/browser/commandsHandler'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; @@ -277,5 +277,11 @@ if (platform.isWindows) { actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(AllowWorkspaceShellTerminalCommand, AllowWorkspaceShellTerminalCommand.ID, AllowWorkspaceShellTerminalCommand.LABEL), 'Terminal: Allow Workspace Shell Configuration', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DisallowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand.ID, DisallowWorkspaceShellTerminalCommand.LABEL), 'Terminal: Disallow Workspace Shell Configuration', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(RenameTerminalAction, RenameTerminalAction.ID, RenameTerminalAction.LABEL), 'Terminal: Rename', category); - +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusTerminalFindWidgetAction, FocusTerminalFindWidgetAction.ID, FocusTerminalFindWidgetAction.LABEL, { + primary: KeyMod.WinCtrl | KeyCode.Shift | KeyCode.KEY_F, + mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_F } +}), 'Terminal: Focus Find Widget', nls.localize('Terminal: Focus Find Widget', category)); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(HideTerminalFindWidgetAction, HideTerminalFindWidgetAction.ID, HideTerminalFindWidgetAction.LABEL, { + primary: KeyCode.Escape +}, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE), 'Terminal: Focus Find Widget', nls.localize('Terminal: Focus Find Widget', category)); registerColors(); diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts index 6ead524b144dd..0d3a3a0b17c49 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts @@ -583,3 +583,37 @@ export class RenameTerminalAction extends Action { }); } } + +export class FocusTerminalFindWidgetAction extends Action { + + public static ID = 'workbench.action.terminal.focusFindWidget'; + public static LABEL = nls.localize('workbench.action.terminal.focusFindWidget', "Focus Find Widget"); + + constructor( + id: string, label: string, + @ITerminalService private terminalService: ITerminalService + ) { + super(id, label); + } + + public run(): TPromise { + return this.terminalService.focusFindWidget(); + } +} + +export class HideTerminalFindWidgetAction extends Action { + + public static ID = 'workbench.action.terminal.hideFindWidget'; + public static LABEL = nls.localize('workbench.action.terminal.hideFindWidget', "Hide Find Widget"); + + constructor( + id: string, label: string, + @ITerminalService private terminalService: ITerminalService + ) { + super(id, label); + } + + public run(): TPromise { + return TPromise.as(this.terminalService.hideFindWidget()); + } +} diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.ts new file mode 100644 index 0000000000000..7e38eeec1673d --- /dev/null +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.ts @@ -0,0 +1,221 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as nls from 'vs/nls'; +import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { Widget } from 'vs/base/browser/ui/widget'; +import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; +import * as dom from 'vs/base/browser/dom'; +import { FindInput } from 'vs/base/browser/ui/findinput/findInput'; +import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; +import { ITerminalService } from 'vs/workbench/parts/terminal/common/terminal'; +import { registerThemingParticipant, ITheme } from 'vs/platform/theme/common/themeService'; +import { inputBackground, inputActiveOptionBorder, inputForeground, inputBorder, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationErrorBackground, inputValidationErrorBorder, editorWidgetBackground, widgetShadow } from 'vs/platform/theme/common/colorRegistry'; + +interface IButtonOpts { + label: string; + className: string; + onTrigger: () => void; + onKeyDown: (e: IKeyboardEvent) => void; +} + +class SimpleButton extends Widget { + + private _opts: IButtonOpts; + private _domNode: HTMLElement; + + constructor(opts: IButtonOpts) { + super(); + this._opts = opts; + + this._domNode = document.createElement('div'); + this._domNode.title = this._opts.label; + this._domNode.tabIndex = 0; + this._domNode.className = 'button ' + this._opts.className; + this._domNode.setAttribute('role', 'button'); + this._domNode.setAttribute('aria-label', this._opts.label); + + this.onclick(this._domNode, (e) => { + this._opts.onTrigger(); + e.preventDefault(); + }); + this.onkeydown(this._domNode, (e) => { + if (e.equals(KeyCode.Space) || e.equals(KeyCode.Enter)) { + this._opts.onTrigger(); + e.preventDefault(); + return; + } + this._opts.onKeyDown(e); + }); + } + + public get domNode(): HTMLElement { + return this._domNode; + } + + public isEnabled(): boolean { + return (this._domNode.tabIndex >= 0); + } + + public focus(): void { + this._domNode.focus(); + } + + public setEnabled(enabled: boolean): void { + dom.toggleClass(this._domNode, 'disabled', !enabled); + this._domNode.setAttribute('aria-disabled', String(!enabled)); + this._domNode.tabIndex = enabled ? 0 : -1; + } + + public toggleClass(className: string, shouldHaveIt: boolean): void { + dom.toggleClass(this._domNode, className, shouldHaveIt); + } +} + +const NLS_FIND_INPUT_LABEL = nls.localize('label.find', "Find"); +const NLS_FIND_INPUT_PLACEHOLDER = nls.localize('placeholder.find', "Find"); +const NLS_PREVIOUS_MATCH_BTN_LABEL = nls.localize('label.previousMatchButton', "Previous match"); +const NLS_NEXT_MATCH_BTN_LABEL = nls.localize('label.nextMatchButton', "Next match"); +const NLS_CLOSE_BTN_LABEL = nls.localize('label.closeButton', "Close"); + +export class TerminalFindWidget extends Widget { + private _findInput: FindInput; + private _domNode: HTMLElement; + private _isVisible: boolean; + + constructor( + @IContextViewService private _contextViewService: IContextViewService, + @ITerminalService private _terminalService: ITerminalService + ) { + super(); + this._findInput = this._register(new FindInput(null, this._contextViewService, { + width: 155, + label: NLS_FIND_INPUT_LABEL, + placeholder: NLS_FIND_INPUT_PLACEHOLDER, + })); + + let find = (previous) => { + let val = this._findInput.getValue(); + let instance = this._terminalService.getActiveInstance(); + if (instance !== null) { + if (previous) { + instance.findPrevious(val); + } else { + instance.findNext(val); + } + } + }; + + this._register(this._findInput.onKeyDown((e) => { + if (e.equals(KeyCode.Enter)) { + find(false); + e.preventDefault(); + return; + } + + if (e.equals(KeyMod.Shift | KeyCode.Enter)) { + find(true); + e.preventDefault(); + return; + } + })); + + let prevBtn = new SimpleButton({ + label: NLS_PREVIOUS_MATCH_BTN_LABEL, + className: 'previous', + onTrigger: () => { + find(true); + }, + onKeyDown: (e) => { } + }); + + let nextBtn = new SimpleButton({ + label: NLS_NEXT_MATCH_BTN_LABEL, + className: 'next', + onTrigger: () => { + find(false); + }, + onKeyDown: (e) => { } + }); + + let closeBtn = new SimpleButton({ + label: NLS_CLOSE_BTN_LABEL, + className: 'close-fw', + onTrigger: () => { + this.hide(); + }, + onKeyDown: (e) => { } + }); + + this._domNode = document.createElement('div'); + this._domNode.className = 'find-part'; + this._domNode.appendChild(this._findInput.domNode); + this._domNode.appendChild(prevBtn.domNode); + this._domNode.appendChild(nextBtn.domNode); + this._domNode.appendChild(closeBtn.domNode); + + this._register(dom.addDisposableListener(this._domNode, 'click', (event) => { + event.stopPropagation(); + })); + } + + public updateTheme(theme?: ITheme): void { + let inputStyles = { + inputActiveOptionBorder: theme.getColor(inputActiveOptionBorder), + inputBackground: theme.getColor(inputBackground), + inputForeground: theme.getColor(inputForeground), + inputBorder: theme.getColor(inputBorder), + inputValidationInfoBackground: theme.getColor(inputValidationInfoBackground), + inputValidationInfoBorder: theme.getColor(inputValidationInfoBorder), + inputValidationWarningBackground: theme.getColor(inputValidationWarningBackground), + inputValidationWarningBorder: theme.getColor(inputValidationWarningBorder), + inputValidationErrorBackground: theme.getColor(inputValidationErrorBackground), + inputValidationErrorBorder: theme.getColor(inputValidationErrorBorder) + }; + this._findInput.style(inputStyles); + } + + public getDomNode(): HTMLElement { + return this._domNode; + } + + public reveal(): void { + if (!this._isVisible) { + this._isVisible = true; + + setTimeout(() => { + dom.addClass(this._domNode, 'visible'); + this._domNode.setAttribute('aria-hidden', 'false'); + dom.addClass(this._domNode, 'noanimation'); + setTimeout(() => { + dom.removeClass(this._domNode, 'noanimation'); + this._findInput.select(); + }, 200); + }, 0); + } + } + + public hide(): void { + if (this._isVisible) { + this._isVisible = false; + + dom.removeClass(this._domNode, 'visible'); + this._domNode.setAttribute('aria-hidden', 'true'); + } + } +} + +// theming +registerThemingParticipant((theme, collector) => { + const findWidgetBGColor = theme.getColor(editorWidgetBackground); + if (findWidgetBGColor) { + collector.addRule(`.monaco-workbench .panel.integrated-terminal .find-part { background-color: ${findWidgetBGColor} !important; }`); + } + + let widgetShadowColor = theme.getColor(widgetShadow); + if (widgetShadowColor) { + collector.addRule(`.monaco-workbench .panel.integrated-terminal .find-part { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); + } +}); \ No newline at end of file diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index b03ee074b1e03..54989b2c49634 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -347,6 +347,14 @@ export class TerminalInstance implements ITerminalInstance { this._xterm.selectAll(); } + public findNext(term: string): boolean { + return this._xterm.findNext(term); + } + + public findPrevious(term: string): boolean { + return this._xterm.findPrevious(term); + } + public dispose(): void { if (this._linkHandler) { this._linkHandler.dispose(); diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 3dae4ebd1bd90..ee9222682125f 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -10,11 +10,12 @@ import { Action, IAction } from 'vs/base/common/actions'; import { Builder, Dimension } from 'vs/base/browser/builder'; import { IActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; +import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ITerminalService, ITerminalFont, TERMINAL_PANEL_ID } from 'vs/workbench/parts/terminal/common/terminal'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; +import { TerminalFindWidget } from './terminalFindWidget'; import { ansiColorIdentifiers, TERMINAL_BACKGROUND_COLOR, TERMINAL_FOREGROUND_COLOR } from './terminalColorRegistry'; import { ColorIdentifier, selectionBackground } from 'vs/platform/theme/common/colorRegistry'; import { KillTerminalAction, CreateNewTerminalAction, SwitchTerminalInstanceAction, SwitchTerminalInstanceActionItem, CopyTerminalSelectionAction, TerminalPasteAction, ClearTerminalAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; @@ -34,10 +35,12 @@ export class TerminalPanel extends Panel { private _parentDomElement: HTMLElement; private _terminalContainer: HTMLElement; private _themeStyleElement: HTMLElement; + private _findWidget: TerminalFindWidget; constructor( @IConfigurationService private _configurationService: IConfigurationService, @IContextMenuService private _contextMenuService: IContextMenuService, + @IContextViewService private _contextViewService: IContextViewService, @IInstantiationService private _instantiationService: IInstantiationService, @ITerminalService private _terminalService: ITerminalService, @IThemeService protected themeService: IThemeService, @@ -55,9 +58,13 @@ export class TerminalPanel extends Panel { this._terminalContainer = document.createElement('div'); dom.addClass(this._terminalContainer, 'terminal-outer-container'); + + this._findWidget = new TerminalFindWidget(this._contextViewService, this._terminalService); + this._parentDomElement.appendChild(this._themeStyleElement); this._parentDomElement.appendChild(this._fontStyleElement); this._parentDomElement.appendChild(this._terminalContainer); + this._parentDomElement.appendChild(this._findWidget.getDomNode()); this._attachEventListeners(); @@ -149,6 +156,14 @@ export class TerminalPanel extends Panel { } } + public focusFindWidget() { + this._findWidget.reveal(); + } + + public hideFindWidget() { + this._findWidget.hide(); + } + private _attachEventListeners(): void { this._register(dom.addDisposableListener(this._parentDomElement, 'mousedown', (event: MouseEvent) => { if (this._terminalService.terminalInstances.length === 0) { @@ -272,6 +287,7 @@ export class TerminalPanel extends Panel { } this._themeStyleElement.innerHTML = css; + this._findWidget.updateTheme(theme); } private _updateFont(): void { diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts index e731656e46d53..5ce3dc18e9bfc 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts @@ -16,7 +16,7 @@ import { IWindowIPCService } from 'vs/workbench/services/window/electron-browser import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { IQuickOpenService, IPickOpenEntry, IPickOptions } from 'vs/platform/quickOpen/common/quickOpen'; -import { ITerminalInstance, ITerminalService, IShellLaunchConfig, ITerminalConfigHelper, NEVER_SUGGEST_SELECT_WINDOWS_SHELL_STORAGE_KEY } from 'vs/workbench/parts/terminal/common/terminal'; +import { ITerminalInstance, ITerminalService, IShellLaunchConfig, ITerminalConfigHelper, NEVER_SUGGEST_SELECT_WINDOWS_SHELL_STORAGE_KEY, TERMINAL_PANEL_ID } from 'vs/workbench/parts/terminal/common/terminal'; import { TerminalService as AbstractTerminalService } from 'vs/workbench/parts/terminal/common/terminalService'; import { TerminalConfigHelper } from 'vs/workbench/parts/terminal/electron-browser/terminalConfigHelper'; import { TerminalInstance } from 'vs/workbench/parts/terminal/electron-browser/terminalInstance'; @@ -25,10 +25,10 @@ import { IChoiceService } from 'vs/platform/message/common/message'; import { Severity } from 'vs/editor/common/standalone/standaloneBase'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { TERMINAL_DEFAULT_SHELL_WINDOWS } from "vs/workbench/parts/terminal/electron-browser/terminal"; +import { TerminalPanel } from "vs/workbench/parts/terminal/electron-browser/terminalPanel"; export class TerminalService extends AbstractTerminalService implements ITerminalService { private _configHelper: TerminalConfigHelper; - public get configHelper(): ITerminalConfigHelper { return this._configHelper; }; constructor( @@ -69,6 +69,23 @@ export class TerminalService extends AbstractTerminalService implements ITermina return terminalInstance; } + public focusFindWidget(): TPromise { + return this.showPanel(false).then(() => { + let panel = this._panelService.getActivePanel() as TerminalPanel; + panel.focusFindWidget(); + this._findWidgetVisible.set(true); + }); + } + + public hideFindWidget(): void { + const panel = this._panelService.getActivePanel() as TerminalPanel; + if (panel && panel.getId() === TERMINAL_PANEL_ID) { + panel.hideFindWidget(); + this._findWidgetVisible.reset(); + panel.focus(); + } + } + private _suggestShellChange(wasNewTerminalAction?: boolean): void { // Only suggest on Windows since $SHELL works great for macOS/Linux if (!platform.isWindows) { From f37c1346b470acb4f0fdc859568203efe81ee261 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 14 Jun 2017 17:06:49 -0700 Subject: [PATCH 1849/2747] Use map for buffer sync support pending responses --- .../typescript/src/features/bufferSyncSupport.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/extensions/typescript/src/features/bufferSyncSupport.ts b/extensions/typescript/src/features/bufferSyncSupport.ts index 05dbefb4a1a99..64c8eea9a4080 100644 --- a/extensions/typescript/src/features/bufferSyncSupport.ts +++ b/extensions/typescript/src/features/bufferSyncSupport.ts @@ -106,7 +106,7 @@ export default class BufferSyncSupport { private readonly disposables: Disposable[] = []; private readonly syncedBuffers: Map; - private pendingDiagnostics: { [key: string]: number; }; + private pendingDiagnostics = new Map(); private readonly diagnosticDelayer: Delayer; private checkGlobalTSCVersion: boolean; @@ -116,7 +116,6 @@ export default class BufferSyncSupport { this.diagnostics = diagnostics; this._validate = validate; - this.pendingDiagnostics = Object.create(null); this.diagnosticDelayer = new Delayer(300); this.syncedBuffers = new Map(); @@ -211,7 +210,7 @@ export default class BufferSyncSupport { return; } for (const filePath of this.syncedBuffers.keys()) { - this.pendingDiagnostics[filePath] = Date.now(); + this.pendingDiagnostics.set(filePath, Date.now()); } this.diagnosticDelayer.trigger(() => { this.sendPendingDiagnostics(); @@ -223,7 +222,7 @@ export default class BufferSyncSupport { return; } - this.pendingDiagnostics[file] = Date.now(); + this.pendingDiagnostics.set(file, Date.now()); const buffer = this.syncedBuffers.get(file); let delay = 300; if (buffer) { @@ -239,10 +238,10 @@ export default class BufferSyncSupport { if (!this._validate) { return; } - let files = Object.keys(this.pendingDiagnostics).map((key) => { + let files = Array.from(this.pendingDiagnostics.entries()).map(([key, value]) => { return { file: key, - time: this.pendingDiagnostics[key] + time: value }; }).sort((a, b) => { return a.time - b.time; @@ -252,7 +251,7 @@ export default class BufferSyncSupport { // Add all open TS buffers to the geterr request. They might be visible for (const file of this.syncedBuffers.keys()) { - if (!this.pendingDiagnostics[file]) { + if (!this.pendingDiagnostics.get(file)) { files.push(file); } } @@ -264,7 +263,7 @@ export default class BufferSyncSupport { }; this.client.execute('geterr', args, false); } - this.pendingDiagnostics = Object.create(null); + this.pendingDiagnostics.clear(); } private checkTSCVersion() { From 25056e6e53b8df1b45648e79e935bbc7b007884f Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 14 Jun 2017 17:10:40 -0700 Subject: [PATCH 1850/2747] Terminal Find Widget context --- .../parts/terminal/electron-browser/terminal.contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index b58c93b8e2291..bfc005a7fc177 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -280,7 +280,7 @@ actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(RenameTerminalAc actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusTerminalFindWidgetAction, FocusTerminalFindWidgetAction.ID, FocusTerminalFindWidgetAction.LABEL, { primary: KeyMod.WinCtrl | KeyCode.Shift | KeyCode.KEY_F, mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_F } -}), 'Terminal: Focus Find Widget', nls.localize('Terminal: Focus Find Widget', category)); +}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Focus Find Widget', nls.localize('Terminal: Focus Find Widget', category)); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(HideTerminalFindWidgetAction, HideTerminalFindWidgetAction.ID, HideTerminalFindWidgetAction.LABEL, { primary: KeyCode.Escape }, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE), 'Terminal: Focus Find Widget', nls.localize('Terminal: Focus Find Widget', category)); From e27de3300a99ea2fc65235b38778253a4de286ce Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Wed, 14 Jun 2017 18:43:01 -0700 Subject: [PATCH 1851/2747] node-debug2@1.14.0 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 7d48e3a93d8ce..e4e7211aaefd4 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -43,7 +43,7 @@ const nodeModules = ['electron', 'original-fs'] const builtInExtensions = [ { name: 'ms-vscode.node-debug', version: '1.14.1' }, - { name: 'ms-vscode.node-debug2', version: '1.13.3' } + { name: 'ms-vscode.node-debug2', version: '1.14.0' } ]; const vscodeEntryPoints = _.flatten([ From 081289866e73300bbce4d506a8d57b9dda8dd3b5 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 14 Jun 2017 19:42:44 -0700 Subject: [PATCH 1852/2747] Fix category error and keybindings --- .../electron-browser/terminal.contribution.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index bfc005a7fc177..85fa218b5981f 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -186,7 +186,9 @@ configurationRegistry.registerConfiguration({ FocusFirstGroupAction.ID, FocusSecondGroupAction.ID, FocusThirdGroupAction.ID, - SelectAllTerminalAction.ID + SelectAllTerminalAction.ID, + FocusTerminalFindWidgetAction.ID, + HideTerminalFindWidgetAction.ID ].sort() } } @@ -278,10 +280,9 @@ actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(AllowWorkspaceSh actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DisallowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand.ID, DisallowWorkspaceShellTerminalCommand.LABEL), 'Terminal: Disallow Workspace Shell Configuration', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(RenameTerminalAction, RenameTerminalAction.ID, RenameTerminalAction.LABEL), 'Terminal: Rename', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusTerminalFindWidgetAction, FocusTerminalFindWidgetAction.ID, FocusTerminalFindWidgetAction.LABEL, { - primary: KeyMod.WinCtrl | KeyCode.Shift | KeyCode.KEY_F, - mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_F } -}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Focus Find Widget', nls.localize('Terminal: Focus Find Widget', category)); + primary: KeyMod.CtrlCmd | KeyCode.KEY_F +}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Focus Find Widget', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(HideTerminalFindWidgetAction, HideTerminalFindWidgetAction.ID, HideTerminalFindWidgetAction.LABEL, { primary: KeyCode.Escape -}, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE), 'Terminal: Focus Find Widget', nls.localize('Terminal: Focus Find Widget', category)); +}, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE), 'Terminal: Focus Find Widget', category); registerColors(); From c89a5f66c646dd8c1f6d1692d90390660c765e62 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 14 Jun 2017 20:03:59 -0700 Subject: [PATCH 1853/2747] Focus terminal find on ctrl+f when it's visible and terminal is focused --- .../electron-browser/terminalFindWidget.ts | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.ts index 7e38eeec1673d..8e8493811b879 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.ts @@ -182,19 +182,22 @@ export class TerminalFindWidget extends Widget { } public reveal(): void { - if (!this._isVisible) { - this._isVisible = true; + if (this._isVisible) { + this._findInput.select(); + return; + } + this._isVisible = true; + + setTimeout(() => { + dom.addClass(this._domNode, 'visible'); + this._domNode.setAttribute('aria-hidden', 'false'); + dom.addClass(this._domNode, 'noanimation'); setTimeout(() => { - dom.addClass(this._domNode, 'visible'); - this._domNode.setAttribute('aria-hidden', 'false'); - dom.addClass(this._domNode, 'noanimation'); - setTimeout(() => { - dom.removeClass(this._domNode, 'noanimation'); - this._findInput.select(); - }, 200); - }, 0); - } + dom.removeClass(this._domNode, 'noanimation'); + this._findInput.select(); + }, 200); + }, 0); } public hide(): void { From 6d5b99633b6c6636ac851bd40cd32da44072bfb5 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 15 Jun 2017 08:14:50 +0200 Subject: [PATCH 1854/2747] fix #28781 --- src/vs/workbench/api/node/extHostSCM.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/api/node/extHostSCM.ts b/src/vs/workbench/api/node/extHostSCM.ts index 8a87e5126c07f..76c7078dda986 100644 --- a/src/vs/workbench/api/node/extHostSCM.ts +++ b/src/vs/workbench/api/node/extHostSCM.ts @@ -323,7 +323,10 @@ export class ExtHostSCM { return TPromise.as(null); } - return asWinJsPromise(token => URI.parse(sourceControl.quickDiffProvider.provideOriginalResource(uri, token).toString())); + return asWinJsPromise(token => { + const result = sourceControl.quickDiffProvider.provideOriginalResource(uri, token); + return result && URI.parse(result.toString()); + }); } $onActiveSourceControlChange(handle: number): TPromise { From ce1082248522c017d535c8a3b9386444090c9369 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 15 Jun 2017 08:21:04 +0200 Subject: [PATCH 1855/2747] Introduce a new keybinding context per quick open for quick navigate (fixes #28462) (#28784) --- src/vs/platform/quickOpen/common/quickOpen.ts | 5 + .../parts/editor/editor.contribution.ts | 39 +++- .../parts/quickopen/quickOpenController.ts | 50 ++++- .../parts/quickopen/quickopen.contribution.ts | 175 ++++-------------- .../browser/parts/quickopen/quickopen.ts | 132 +++++++++++++ src/vs/workbench/browser/quickopen.ts | 11 +- src/vs/workbench/electron-browser/actions.ts | 4 + .../electron-browser/workbench.main.ts | 1 + .../workbench/electron-browser/workbench.ts | 26 ++- .../electron-browser/debug.contribution.ts | 1 + .../extensions.contribution.ts | 2 + .../browser/quickopen.contribution.ts | 41 +++- .../search/browser/search.contribution.ts | 4 +- .../electron-browser/task.contribution.ts | 6 + .../electron-browser/terminal.contribution.ts | 2 +- .../watermark/electron-browser/watermark.ts | 2 +- .../workbench/test/browser/quickopen.test.ts | 3 +- 17 files changed, 344 insertions(+), 160 deletions(-) create mode 100644 src/vs/workbench/browser/parts/quickopen/quickopen.ts diff --git a/src/vs/platform/quickOpen/common/quickOpen.ts b/src/vs/platform/quickOpen/common/quickOpen.ts index 6fe5fcc616914..2ce7f0a3691d4 100644 --- a/src/vs/platform/quickOpen/common/quickOpen.ts +++ b/src/vs/platform/quickOpen/common/quickOpen.ts @@ -62,6 +62,11 @@ export interface IPickOptions { * enables quick navigate in the picker to open an element without typing */ quickNavigateConfiguration?: IQuickNavigateConfiguration; + + /** + * a context key to set when this picker is active + */ + contextKey?: string; } export interface IInputOptions { diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts index cd4bc5a15ea72..373bccf0f4ead 100644 --- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts +++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts @@ -36,6 +36,9 @@ import { } from 'vs/workbench/browser/parts/editor/editorActions'; import * as editorCommands from 'vs/workbench/browser/parts/editor/editorCommands'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { getQuickNavigateHandler, inQuickOpenContext } from "vs/workbench/browser/parts/quickopen/quickopen"; +import { KeybindingsRegistry } from "vs/platform/keybinding/common/keybindingsRegistry"; +import { ContextKeyExpr } from "vs/platform/contextkey/common/contextkey"; // Register String Editor Registry.as(EditorExtensions.Editors).registerEditor( @@ -257,11 +260,15 @@ export class QuickOpenActionContributor extends ActionBarContributor { const actionBarRegistry = Registry.as(ActionBarExtensions.Actionbar); actionBarRegistry.registerActionBarContributor(Scope.VIEWER, QuickOpenActionContributor); +const editorPickerContextKey = 'inEditorsPicker'; +const editorPickerContext = ContextKeyExpr.and(inQuickOpenContext, ContextKeyExpr.has(editorPickerContextKey)); + Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpenHandler( new QuickOpenHandlerDescriptor( 'vs/workbench/browser/parts/editor/editorPicker', 'GroupOnePicker', NAVIGATE_IN_GROUP_ONE_PREFIX, + editorPickerContextKey, [ { prefix: NAVIGATE_IN_GROUP_ONE_PREFIX, @@ -287,6 +294,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/browser/parts/editor/editorPicker', 'GroupTwoPicker', NAVIGATE_IN_GROUP_TWO_PREFIX, + editorPickerContextKey, [] ) ); @@ -296,6 +304,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/browser/parts/editor/editorPicker', 'GroupThreePicker', NAVIGATE_IN_GROUP_THREE_PREFIX, + editorPickerContextKey, [] ) ); @@ -305,6 +314,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/browser/parts/editor/editorPicker', 'AllEditorsPicker', NAVIGATE_ALL_EDITORS_GROUP_PREFIX, + editorPickerContextKey, [ { prefix: NAVIGATE_ALL_EDITORS_GROUP_PREFIX, @@ -321,8 +331,6 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(OpenNextEditorInGroup, registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousEditorInGroup, OpenPreviousEditorInGroup.ID, OpenPreviousEditorInGroup.LABEL), 'View: Open Previous Editor in Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(OpenNextRecentlyUsedEditorAction, OpenNextRecentlyUsedEditorAction.ID, OpenNextRecentlyUsedEditorAction.LABEL), 'View: Open Next Recently Used Editor', category); registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousRecentlyUsedEditorAction, OpenPreviousRecentlyUsedEditorAction.ID, OpenPreviousRecentlyUsedEditorAction.LABEL), 'View: Open Previous Recently Used Editor', category); -registry.registerWorkbenchAction(new SyncActionDescriptor(OpenNextRecentlyUsedEditorInGroupAction, OpenNextRecentlyUsedEditorInGroupAction.ID, OpenNextRecentlyUsedEditorInGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyCode.Tab } }), 'Open Next Recently Used Editor in Group'); -registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousRecentlyUsedEditorInGroupAction, OpenPreviousRecentlyUsedEditorInGroupAction.ID, OpenPreviousRecentlyUsedEditorInGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Tab } }), 'Open Previous Recently Used Editor in Group'); registry.registerWorkbenchAction(new SyncActionDescriptor(ShowAllEditorsAction, ShowAllEditorsAction.ID, ShowAllEditorsAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_P), mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Tab } }), 'View: Show All Editors', category); registry.registerWorkbenchAction(new SyncActionDescriptor(ShowEditorsInGroupOneAction, ShowEditorsInGroupOneAction.ID, ShowEditorsInGroupOneAction.LABEL), 'View: Show Editors in First Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(ShowEditorsInGroupTwoAction, ShowEditorsInGroupTwoAction.ID, ShowEditorsInGroupTwoAction.LABEL), 'View: Show Editors in Second Group', category); @@ -363,5 +371,32 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousEditorFrom registry.registerWorkbenchAction(new SyncActionDescriptor(ClearEditorHistoryAction, ClearEditorHistoryAction.ID, ClearEditorHistoryAction.LABEL), 'Clear Editor History'); registry.registerWorkbenchAction(new SyncActionDescriptor(RevertAndCloseEditorAction, RevertAndCloseEditorAction.ID, RevertAndCloseEditorAction.LABEL), 'View: Revert and Close Editor', category); +// Register Editor Picker Actions including quick navigate support +const openNextEditorKeybinding = { primary: KeyMod.CtrlCmd | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyCode.Tab } }; +const openPreviousEditorKeybinding = { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Tab } }; +registry.registerWorkbenchAction(new SyncActionDescriptor(OpenNextRecentlyUsedEditorInGroupAction, OpenNextRecentlyUsedEditorInGroupAction.ID, OpenNextRecentlyUsedEditorInGroupAction.LABEL, openNextEditorKeybinding), 'Open Next Recently Used Editor in Group'); +registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousRecentlyUsedEditorInGroupAction, OpenPreviousRecentlyUsedEditorInGroupAction.ID, OpenPreviousRecentlyUsedEditorInGroupAction.LABEL, openPreviousEditorKeybinding), 'Open Previous Recently Used Editor in Group'); + +const quickOpenNavigateNextInEditorPickerId = 'workbench.action.quickOpenNavigateNextInEditorPicker'; +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigateNextInEditorPickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigateNextInEditorPickerId, true), + when: editorPickerContext, + primary: openNextEditorKeybinding.primary, + mac: openNextEditorKeybinding.mac +}); + +const quickOpenNavigatePreviousInEditorPickerId = 'workbench.action.quickOpenNavigatePreviousInEditorPicker'; +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigatePreviousInEditorPickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigatePreviousInEditorPickerId, false), + when: editorPickerContext, + primary: openPreviousEditorKeybinding.primary, + mac: openPreviousEditorKeybinding.mac +}); + + // Editor Commands editorCommands.setup(); \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index 7a7872472ceff..b8da38bc82202 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -56,6 +56,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' const HELP_PREFIX = '?'; interface IInternalPickOptions { + contextKey?: string; value?: string; valueSelection?: [number, number]; placeHolder?: string; @@ -84,6 +85,7 @@ export class QuickOpenController extends Component implements IQuickOpenService private pickOpenWidget: QuickOpenWidget; private layoutDimensions: Dimension; private mapResolvedHandlersToPrefix: { [prefix: string]: TPromise; }; + private mapContextKeyToContext: { [id: string]: IContextKey; }; private handlerOnOpenCalled: { [prefix: string]: boolean; }; private currentResultToken: string; private currentPickerToken: string; @@ -100,7 +102,7 @@ export class QuickOpenController extends Component implements IQuickOpenService @IMessageService private messageService: IMessageService, @ITelemetryService private telemetryService: ITelemetryService, @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IContextKeyService contextKeyService: IContextKeyService, + @IContextKeyService private contextKeyService: IContextKeyService, @IConfigurationService private configurationService: IConfigurationService, @IHistoryService private historyService: IHistoryService, @IInstantiationService private instantiationService: IInstantiationService, @@ -112,6 +114,7 @@ export class QuickOpenController extends Component implements IQuickOpenService this.mapResolvedHandlersToPrefix = {}; this.handlerOnOpenCalled = {}; + this.mapContextKeyToContext = {}; this.promisesToCompleteOnHide = []; @@ -268,6 +271,9 @@ export class QuickOpenController extends Component implements IQuickOpenService const currentPickerToken = defaultGenerator.nextId(); this.currentPickerToken = currentPickerToken; + // Update context + this.setQuickOpenContextKey(options.contextKey); + // Create upon first open if (!this.pickOpenWidget) { this.pickOpenWidget = new QuickOpenWidget( @@ -578,6 +584,10 @@ export class QuickOpenController extends Component implements IQuickOpenService autoFocus = { autoFocusFirstEntry: visibleEditorCount === 0, autoFocusSecondEntry: visibleEditorCount !== 0 }; } + // Update context + const registry = Registry.as(Extensions.Quickopen); + this.setQuickOpenContextKey(registry.getDefaultQuickOpenHandler().contextKey); + this.quickOpenWidget.show(editorHistory, { quickNavigateConfiguration, autoFocus, inputSelection }); } } @@ -625,8 +635,8 @@ export class QuickOpenController extends Component implements IQuickOpenService const promise = this.mapResolvedHandlersToPrefix[prefix]; promise.then(handler => { this.handlerOnOpenCalled[prefix] = false; - // Don't check if onOpen was called to preserve old behaviour for now - handler.onClose(reason === HideReason.CANCELED); + + handler.onClose(reason === HideReason.CANCELED); // Don't check if onOpen was called to preserve old behaviour for now }); } } @@ -641,10 +651,39 @@ export class QuickOpenController extends Component implements IQuickOpenService this.restoreFocus(); // focus back to editor unless user clicked somewhere else } + // Reset context keys this.inQuickOpenMode.reset(); + this.resetQuickOpenContextKeys(); + + // Events this.emitQuickOpenVisibilityChange(false); } + private resetQuickOpenContextKeys(): void { + Object.keys(this.mapContextKeyToContext).forEach(k => this.mapContextKeyToContext[k].reset()); + } + + private setQuickOpenContextKey(id?: string): void { + let key: IContextKey; + if (id) { + key = this.mapContextKeyToContext[id]; + if (!key) { + key = new RawContextKey(id, false).bindTo(this.contextKeyService); + this.mapContextKeyToContext[id] = key; + } + } + + if (key && key.get()) { + return; // already active context + } + + this.resetQuickOpenContextKeys(); + + if (key) { + key.set(true); + } + } + private hasHandler(prefix: string): boolean { return !!Registry.as(Extensions.Quickopen).getQuickOpenHandler(prefix); } @@ -677,6 +716,7 @@ export class QuickOpenController extends Component implements IQuickOpenService const handlerDescriptor = registry.getQuickOpenHandler(value); const defaultHandlerDescriptor = registry.getDefaultQuickOpenHandler(); const instantProgress = handlerDescriptor && handlerDescriptor.instantProgress; + const contextKey = handlerDescriptor ? handlerDescriptor.contextKey : defaultHandlerDescriptor.contextKey; // Use a generated token to avoid race conditions from long running promises const currentResultToken = defaultGenerator.nextId(); @@ -690,6 +730,9 @@ export class QuickOpenController extends Component implements IQuickOpenService // Reset Extra Class this.quickOpenWidget.setExtraClass(null); + // Update context + this.setQuickOpenContextKey(contextKey); + // Remove leading and trailing whitespace const trimmedValue = strings.trim(value); @@ -701,6 +744,7 @@ export class QuickOpenController extends Component implements IQuickOpenService .done(null, errors.onUnexpectedError); this.quickOpenWidget.setInput(this.getEditorHistoryWithGroupLabel(), { autoFocusFirstEntry: true }); + return; } diff --git a/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.ts b/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.ts index 6d696c729c08a..e263e028e106a 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.ts @@ -5,121 +5,13 @@ 'use strict'; import { Registry } from 'vs/platform/platform'; -import { TPromise } from 'vs/base/common/winjs.base'; -import nls = require('vs/nls'); -import { Action } from 'vs/base/common/actions'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; -import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; -import { KeybindingsRegistry, IKeybindings } from 'vs/platform/keybinding/common/keybindingsRegistry'; +import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { RemoveFromEditorHistoryAction } from 'vs/workbench/browser/parts/quickopen/quickOpenController'; - -export class GlobalQuickOpenAction extends Action { - - public static ID = 'workbench.action.quickOpen'; - public static LABEL = nls.localize('quickOpen', "Go to File..."); - - constructor(id: string, label: string, @IQuickOpenService private quickOpenService: IQuickOpenService) { - super(id, label); - - this.order = 100; // Allow other actions to position before or after - this.class = 'quickopen'; - } - - public run(): TPromise { - this.quickOpenService.show(null); - - return TPromise.as(true); - } -} - -export class BaseQuickOpenNavigateAction extends Action { - - constructor( - id: string, - label: string, - private next: boolean, - private quickNavigate: boolean, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IKeybindingService private keybindingService: IKeybindingService - ) { - super(id, label); - } - - public run(event?: any): TPromise { - const keys = this.keybindingService.lookupKeybindings(this.id); - const quickNavigate = this.quickNavigate ? { keybindings: keys } : void 0; - - this.quickOpenService.navigate(this.next, quickNavigate); - - return TPromise.as(true); - } -} - -export class QuickOpenNavigateNextAction extends BaseQuickOpenNavigateAction { - - public static ID = 'workbench.action.quickOpenNavigateNext'; - public static LABEL = nls.localize('quickNavigateNext', "Navigate Next in Quick Open"); - - constructor( - id: string, - label: string, - @IQuickOpenService quickOpenService: IQuickOpenService, - @IKeybindingService keybindingService: IKeybindingService - ) { - super(id, label, true, true, quickOpenService, keybindingService); - } -} - -export class QuickOpenNavigatePreviousAction extends BaseQuickOpenNavigateAction { - - public static ID = 'workbench.action.quickOpenNavigatePrevious'; - public static LABEL = nls.localize('quickNavigatePrevious', "Navigate Previous in Quick Open"); - - constructor( - id: string, - label: string, - @IQuickOpenService quickOpenService: IQuickOpenService, - @IKeybindingService keybindingService: IKeybindingService - ) { - super(id, label, false, true, quickOpenService, keybindingService); - } -} - -export class QuickOpenSelectNextAction extends BaseQuickOpenNavigateAction { - - public static ID = 'workbench.action.quickOpenSelectNext'; - public static LABEL = nls.localize('quickSelectNext', "Select Next in Quick Open"); - - constructor( - id: string, - label: string, - @IQuickOpenService quickOpenService: IQuickOpenService, - @IKeybindingService keybindingService: IKeybindingService - ) { - super(id, label, true, false, quickOpenService, keybindingService); - } -} - -export class QuickOpenSelectPreviousAction extends BaseQuickOpenNavigateAction { - - public static ID = 'workbench.action.quickOpenSelectPrevious'; - public static LABEL = nls.localize('quickSelectPrevious', "Select Previous in Quick Open"); - - constructor( - id: string, - label: string, - @IQuickOpenService quickOpenService: IQuickOpenService, - @IKeybindingService keybindingService: IKeybindingService - ) { - super(id, label, false, false, quickOpenService, keybindingService); - } -} - -const inQuickOpenContext = ContextKeyExpr.has('inQuickOpen'); +import { GlobalQuickOpenAction, QuickOpenSelectNextAction, QuickOpenSelectPreviousAction, inQuickOpenContext, getQuickNavigateHandler, QuickOpenNavigateNextAction, QuickOpenNavigatePreviousAction, defaultQuickOpenContext } from "vs/workbench/browser/parts/quickopen/quickopen"; KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'workbench.action.closeQuickOpen', @@ -154,41 +46,38 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ } }); -function navigateKeybinding(shift: boolean): IKeybindings { - if (!shift) { - return { - primary: KeyMod.CtrlCmd | KeyCode.Tab, - secondary: [KeyMod.CtrlCmd | KeyCode.KEY_Q, KeyMod.CtrlCmd | KeyCode.KEY_E, KeyMod.CtrlCmd | KeyCode.KEY_P], - mac: { - primary: KeyMod.WinCtrl | KeyCode.Tab, - secondary: [KeyMod.WinCtrl | KeyCode.KEY_Q, KeyMod.CtrlCmd | KeyCode.KEY_P] - }, - linux: { - primary: KeyMod.CtrlCmd | KeyCode.Tab, - secondary: [KeyMod.CtrlCmd | KeyCode.KEY_E, KeyMod.CtrlCmd | KeyCode.KEY_P] - } - }; - } - - return { - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Tab, - secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_Q, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_E, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_P], - mac: { - primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Tab, - secondary: [KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_Q, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_P] - }, - linux: { - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Tab, - secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_E, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_P] - } - }; -} - const registry = Registry.as(ActionExtensions.WorkbenchActions); -registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalQuickOpenAction, GlobalQuickOpenAction.ID, GlobalQuickOpenAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_P, secondary: [KeyMod.CtrlCmd | KeyCode.KEY_E], mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_P, secondary: null } }), 'Go to File...'); -registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenNavigateNextAction, QuickOpenNavigateNextAction.ID, QuickOpenNavigateNextAction.LABEL, navigateKeybinding(false), inQuickOpenContext, KeybindingsRegistry.WEIGHT.workbenchContrib(50)), 'Navigate Next in Quick Open'); -registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenNavigatePreviousAction, QuickOpenNavigatePreviousAction.ID, QuickOpenNavigatePreviousAction.LABEL, navigateKeybinding(true), inQuickOpenContext, KeybindingsRegistry.WEIGHT.workbenchContrib(50)), 'Navigate Previous in Quick Open'); +const globalQuickOpenKeybinding = { primary: KeyMod.CtrlCmd | KeyCode.KEY_P, secondary: [KeyMod.CtrlCmd | KeyCode.KEY_E], mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_P, secondary: null } }; + +registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalQuickOpenAction, GlobalQuickOpenAction.ID, GlobalQuickOpenAction.LABEL, globalQuickOpenKeybinding), 'Go to File...'); registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenSelectNextAction, QuickOpenSelectNextAction.ID, QuickOpenSelectNextAction.LABEL, { primary: null, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_N } }, inQuickOpenContext, KeybindingsRegistry.WEIGHT.workbenchContrib(50)), 'Select Next in Quick Open'); registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenSelectPreviousAction, QuickOpenSelectPreviousAction.ID, QuickOpenSelectPreviousAction.LABEL, { primary: null, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_P } }, inQuickOpenContext, KeybindingsRegistry.WEIGHT.workbenchContrib(50)), 'Select Previous in Quick Open'); +registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenNavigateNextAction, QuickOpenNavigateNextAction.ID, QuickOpenNavigateNextAction.LABEL), 'Navigate Next in Quick Open'); +registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenNavigatePreviousAction, QuickOpenNavigatePreviousAction.ID, QuickOpenNavigatePreviousAction.LABEL), 'Navigate Previous in Quick Open'); registry.registerWorkbenchAction(new SyncActionDescriptor(RemoveFromEditorHistoryAction, RemoveFromEditorHistoryAction.ID, RemoveFromEditorHistoryAction.LABEL), 'Remove From History'); + +const quickOpenNavigateNextInFilePickerId = 'workbench.action.quickOpenNavigateNextInFilePicker'; +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigateNextInFilePickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigateNextInFilePickerId, true), + when: defaultQuickOpenContext, + primary: globalQuickOpenKeybinding.primary, + secondary: globalQuickOpenKeybinding.secondary, + mac: globalQuickOpenKeybinding.mac +}); + +const quickOpenNavigatePreviousInFilePickerId = 'workbench.action.quickOpenNavigatePreviousInFilePicker'; +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigatePreviousInFilePickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigatePreviousInFilePickerId, false), + when: defaultQuickOpenContext, + primary: globalQuickOpenKeybinding.primary | KeyMod.Shift, + secondary: [globalQuickOpenKeybinding.secondary[0] | KeyMod.Shift], + mac: { + primary: globalQuickOpenKeybinding.mac.primary | KeyMod.Shift, + secondary: null + } +}); \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/quickopen/quickopen.ts b/src/vs/workbench/browser/parts/quickopen/quickopen.ts new file mode 100644 index 0000000000000..be16c8f57b2dd --- /dev/null +++ b/src/vs/workbench/browser/parts/quickopen/quickopen.ts @@ -0,0 +1,132 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { TPromise } from 'vs/base/common/winjs.base'; +import nls = require('vs/nls'); +import { Action } from 'vs/base/common/actions'; +import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; +import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { ContextKeyExpr } from "vs/platform/contextkey/common/contextkey"; +import { ICommandHandler } from "vs/platform/commands/common/commands"; + +export const inQuickOpenContext = ContextKeyExpr.has('inQuickOpen'); +export const defaultQuickOpenContextKey = 'inFilesPicker'; +export const defaultQuickOpenContext = ContextKeyExpr.and(inQuickOpenContext, ContextKeyExpr.has(defaultQuickOpenContextKey)); + +export class GlobalQuickOpenAction extends Action { + + public static ID = 'workbench.action.quickOpen'; + public static LABEL = nls.localize('quickOpen', "Go to File..."); + + constructor(id: string, label: string, @IQuickOpenService private quickOpenService: IQuickOpenService) { + super(id, label); + + this.order = 100; // Allow other actions to position before or after + this.class = 'quickopen'; + } + + public run(): TPromise { + this.quickOpenService.show(null); + + return TPromise.as(true); + } +} + +export class BaseQuickOpenNavigateAction extends Action { + + constructor( + id: string, + label: string, + private next: boolean, + private quickNavigate: boolean, + @IQuickOpenService private quickOpenService: IQuickOpenService, + @IKeybindingService private keybindingService: IKeybindingService + ) { + super(id, label); + } + + public run(event?: any): TPromise { + const keys = this.keybindingService.lookupKeybindings(this.id); + const quickNavigate = this.quickNavigate ? { keybindings: keys } : void 0; + + this.quickOpenService.navigate(this.next, quickNavigate); + + return TPromise.as(true); + } +} + +export function getQuickNavigateHandler(id: string, next?: boolean): ICommandHandler { + return accessor => { + const keybindingService = accessor.get(IKeybindingService); + const quickOpenService = accessor.get(IQuickOpenService); + + const keys = keybindingService.lookupKeybindings(id); + const quickNavigate = { keybindings: keys }; + + quickOpenService.navigate(next, quickNavigate); + }; +} + +export class QuickOpenNavigateNextAction extends BaseQuickOpenNavigateAction { + + public static ID = 'workbench.action.quickOpenNavigateNext'; + public static LABEL = nls.localize('quickNavigateNext', "Navigate Next in Quick Open"); + + constructor( + id: string, + label: string, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, true, true, quickOpenService, keybindingService); + } +} + +export class QuickOpenNavigatePreviousAction extends BaseQuickOpenNavigateAction { + + public static ID = 'workbench.action.quickOpenNavigatePrevious'; + public static LABEL = nls.localize('quickNavigatePrevious', "Navigate Previous in Quick Open"); + + constructor( + id: string, + label: string, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, false, true, quickOpenService, keybindingService); + } +} + +export class QuickOpenSelectNextAction extends BaseQuickOpenNavigateAction { + + public static ID = 'workbench.action.quickOpenSelectNext'; + public static LABEL = nls.localize('quickSelectNext', "Select Next in Quick Open"); + + constructor( + id: string, + label: string, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, true, false, quickOpenService, keybindingService); + } +} + +export class QuickOpenSelectPreviousAction extends BaseQuickOpenNavigateAction { + + public static ID = 'workbench.action.quickOpenSelectPrevious'; + public static LABEL = nls.localize('quickSelectPrevious', "Select Previous in Quick Open"); + + constructor( + id: string, + label: string, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, false, false, quickOpenService, keybindingService); + } +} \ No newline at end of file diff --git a/src/vs/workbench/browser/quickopen.ts b/src/vs/workbench/browser/quickopen.ts index 152265f629a4e..62941ff5712db 100644 --- a/src/vs/workbench/browser/quickopen.ts +++ b/src/vs/workbench/browser/quickopen.ts @@ -131,18 +131,21 @@ export interface QuickOpenHandlerHelpEntry { export class QuickOpenHandlerDescriptor extends AsyncDescriptor { public prefix: string; public description: string; + public contextKey: string; public isDefault: boolean; public helpEntries: QuickOpenHandlerHelpEntry[]; public instantProgress: boolean; + private id: string; - constructor(moduleId: string, ctorName: string, prefix: string, description: string, instantProgress?: boolean); - constructor(moduleId: string, ctorName: string, prefix: string, helpEntries: QuickOpenHandlerHelpEntry[], instantProgress?: boolean); - constructor(moduleId: string, ctorName: string, prefix: string, param: any, instantProgress: boolean = false) { + constructor(moduleId: string, ctorName: string, prefix: string, contextKey: string, description: string, instantProgress?: boolean); + constructor(moduleId: string, ctorName: string, prefix: string, contextKey: string, helpEntries: QuickOpenHandlerHelpEntry[], instantProgress?: boolean); + constructor(moduleId: string, ctorName: string, prefix: string, contextKey: string, param: any, instantProgress: boolean = false) { super(moduleId, ctorName); - this.prefix = prefix; this.id = moduleId + ctorName; + this.prefix = prefix; + this.contextKey = contextKey; this.instantProgress = instantProgress; if (types.isString(param)) { diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index ef63d8a7cf6c0..3f8b05dab1f2a 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -591,6 +591,7 @@ export abstract class BaseSwitchWindow extends Action { } as IFilePickOpenEntry)); this.quickOpenService.pick(picks, { + contextKey: 'inWindowsPicker', autoFocus: { autoFocusFirstEntry: true }, placeHolder, quickNavigateConfiguration: this.isQuickNavigate() ? { keybindings: this.keybindingService.lookupKeybindings(this.id) } : void 0 @@ -641,6 +642,8 @@ export class QuickSwitchWindow extends BaseSwitchWindow { } } +export const inRecentFilesPickerContextKey = 'inRecentFilesPicker'; + export abstract class BaseOpenRecentAction extends Action { constructor( @@ -693,6 +696,7 @@ export abstract class BaseOpenRecentAction extends Action { const hasWorkspace = this.contextService.hasWorkspace(); this.quickOpenService.pick(folderPicks.concat(...filePicks), { + contextKey: inRecentFilesPickerContextKey, autoFocus: { autoFocusFirstEntry: !hasWorkspace, autoFocusSecondEntry: hasWorkspace }, placeHolder: isMacintosh ? nls.localize('openRecentPlaceHolderMac', "Select a path (hold Cmd-key to open in new window)") : nls.localize('openRecentPlaceHolder', "Select a path to open (hold Ctrl-key to open in new window)"), matchOnDescription: true, diff --git a/src/vs/workbench/electron-browser/workbench.main.ts b/src/vs/workbench/electron-browser/workbench.main.ts index a8fee7959d001..d68ce2e3acf20 100644 --- a/src/vs/workbench/electron-browser/workbench.main.ts +++ b/src/vs/workbench/electron-browser/workbench.main.ts @@ -31,6 +31,7 @@ import 'vs/workbench/parts/preferences/browser/preferences.contribution'; import 'vs/workbench/parts/preferences/browser/keybindingsEditorContribution'; import 'vs/workbench/browser/actions/configureLocale'; +import 'vs/workbench/browser/parts/quickopen/quickopen.contribution'; import 'vs/workbench/parts/quickopen/browser/quickopen.contribution'; import 'vs/workbench/browser/parts/editor/editorPicker'; diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 3256b4b5152fa..277811b7aacfd 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -92,9 +92,11 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; -import { OpenRecentAction, ToggleDevToolsAction, ReloadWindowAction } from "vs/workbench/electron-browser/actions"; +import { OpenRecentAction, ToggleDevToolsAction, ReloadWindowAction, inRecentFilesPickerContextKey } from "vs/workbench/electron-browser/actions"; import { KeyMod } from 'vs/base/common/keyCodes'; import { KeyCode } from 'vs/editor/common/standalone/standaloneBase'; +import { KeybindingsRegistry } from "vs/platform/keybinding/common/keybindingsRegistry"; +import { getQuickNavigateHandler, inQuickOpenContext } from "vs/workbench/browser/parts/quickopen/quickopen"; export const MessagesVisibleContext = new RawContextKey('globalMessageVisible', false); export const EditorsVisibleContext = new RawContextKey('editorIsOpen', false); @@ -393,6 +395,28 @@ export class Workbench implements IPartService { workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReloadWindowAction, ReloadWindowAction.ID, ReloadWindowAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyCode.KEY_R } : void 0), 'Reload Window'); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleDevToolsAction, ToggleDevToolsAction.ID, ToggleDevToolsAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_I, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_I } } : void 0), 'Developer: Toggle Developer Tools', localize('developer', "Developer")); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenRecentAction, OpenRecentAction.ID, OpenRecentAction.LABEL, { primary: isDeveloping ? null : KeyMod.CtrlCmd | KeyCode.KEY_R, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R } }), 'File: Open Recent...', localize('file', "File")); + + const recentFilesPickerContext = ContextKeyExpr.and(inQuickOpenContext, ContextKeyExpr.has(inRecentFilesPickerContextKey)); + + const quickOpenNavigateNextInRecentFilesPickerId = 'workbench.action.quickOpenNavigateNextInRecentFilesPicker'; + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigateNextInRecentFilesPickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigateNextInRecentFilesPickerId, true), + when: recentFilesPickerContext, + primary: KeyMod.CtrlCmd | KeyCode.KEY_R, + mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R } + }); + + const quickOpenNavigatePreviousInRecentFilesPicker = 'workbench.action.quickOpenNavigatePreviousInRecentFilesPicker'; + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigatePreviousInRecentFilesPicker, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigatePreviousInRecentFilesPicker, false), + when: recentFilesPickerContext, + primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_R, + mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_R } + }); } private resolveEditorsToOpen(): TPromise { diff --git a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts index 368615a85a9b3..c8c0e1831dd47 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts @@ -137,6 +137,7 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(SelectAndStartAction, 'vs/workbench/parts/debug/browser/debugQuickOpen', 'DebugQuickOpenHandler', 'debug ', + 'inLaunchConfigurationsPicker', nls.localize('debugCommands', "Debug Configuration") ) ); diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts index 34b56a366bb2a..e286fc06d0569 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts @@ -59,6 +59,7 @@ Registry.as(Extensions.Quickopen).registerQuickOpenHandler( 'vs/workbench/parts/extensions/browser/extensionsQuickOpen', 'ExtensionsHandler', 'ext ', + null, localize('extensionsCommands', "Manage Extensions"), true ) @@ -69,6 +70,7 @@ Registry.as(Extensions.Quickopen).registerQuickOpenHandler( 'vs/workbench/parts/extensions/browser/extensionsQuickOpen', 'GalleryExtensionsHandler', 'ext install ', + null, localize('galleryExtensionsCommands', "Install Gallery Extensions"), true ) diff --git a/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts b/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts index 606e882af9b30..23c643f7d2b01 100644 --- a/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts +++ b/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts @@ -17,6 +17,9 @@ import { ShowAllCommandsAction, ALL_COMMANDS_PREFIX, ClearCommandHistoryAction } import { GotoLineAction, GOTO_LINE_PREFIX } from 'vs/workbench/parts/quickopen/browser/gotoLineHandler'; import { HELP_PREFIX } from 'vs/workbench/parts/quickopen/browser/helpHandler'; import { VIEW_PICKER_PREFIX, OpenViewPickerAction, QuickOpenViewPickerAction } from 'vs/workbench/parts/quickopen/browser/viewPickerHandler'; +import { inQuickOpenContext, getQuickNavigateHandler } from "vs/workbench/browser/parts/quickopen/quickopen"; +import { ContextKeyExpr } from "vs/platform/contextkey/common/contextkey"; +import { KeybindingsRegistry } from "vs/platform/keybinding/common/keybindingsRegistry"; // Register Actions const registry = Registry.as(ActionExtensions.WorkbenchActions); @@ -35,10 +38,37 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(GotoSymbolAction, Goto primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_O }), 'Go to Symbol in File...'); +const inViewsPickerContextKey = 'inViewsPicker'; +const inViewsPickerContext = ContextKeyExpr.and(inQuickOpenContext, ContextKeyExpr.has(inViewsPickerContextKey)); + +const viewPickerKeybinding = { primary: KeyMod.CtrlCmd | KeyCode.KEY_Q, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_Q }, linux: { primary: null } }; + registry.registerWorkbenchAction(new SyncActionDescriptor(OpenViewPickerAction, OpenViewPickerAction.ID, OpenViewPickerAction.LABEL), 'Open View'); -registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenViewPickerAction, QuickOpenViewPickerAction.ID, QuickOpenViewPickerAction.LABEL, { - primary: KeyMod.CtrlCmd | KeyCode.KEY_Q, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_Q }, linux: { primary: null } -}), 'Quick Open View'); +registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenViewPickerAction, QuickOpenViewPickerAction.ID, QuickOpenViewPickerAction.LABEL, viewPickerKeybinding), 'Quick Open View'); + +const quickOpenNavigateNextInViewPickerId = 'workbench.action.quickOpenNavigateNextInViewPicker'; +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigateNextInViewPickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigateNextInViewPickerId, true), + when: inViewsPickerContext, + primary: viewPickerKeybinding.primary, + linux: viewPickerKeybinding.linux, + mac: viewPickerKeybinding.mac +}); + +const quickOpenNavigatePreviousInViewPickerId = 'workbench.action.quickOpenNavigatePreviousInViewPicker'; +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigatePreviousInViewPickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigatePreviousInViewPickerId, false), + when: inViewsPickerContext, + primary: viewPickerKeybinding.primary | KeyMod.Shift, + linux: viewPickerKeybinding.linux, + mac: { + primary: viewPickerKeybinding.mac.primary | KeyMod.Shift + } +}); // Register Quick Open Handler @@ -47,6 +77,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/parts/quickopen/browser/commandsHandler', 'CommandsHandler', ALL_COMMANDS_PREFIX, + 'inCommandsPicker', nls.localize('commandsHandlerDescriptionDefault', "Show and Run Commands") ) ); @@ -56,6 +87,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/parts/quickopen/browser/gotoLineHandler', 'GotoLineHandler', GOTO_LINE_PREFIX, + null, [ { prefix: GOTO_LINE_PREFIX, @@ -71,6 +103,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/parts/quickopen/browser/gotoSymbolHandler', 'GotoSymbolHandler', GOTO_SYMBOL_PREFIX, + 'inFileSymbolsPicker', [ { prefix: GOTO_SYMBOL_PREFIX, @@ -91,6 +124,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/parts/quickopen/browser/helpHandler', 'HelpHandler', HELP_PREFIX, + null, nls.localize('helpDescription', "Show Help") ) ); @@ -100,6 +134,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/parts/quickopen/browser/viewPickerHandler', 'ViewPickerHandler', VIEW_PICKER_PREFIX, + inViewsPickerContextKey, [ { prefix: VIEW_PICKER_PREFIX, diff --git a/src/vs/workbench/parts/search/browser/search.contribution.ts b/src/vs/workbench/parts/search/browser/search.contribution.ts index a03f6572e09ec..b4d892ab72149 100644 --- a/src/vs/workbench/parts/search/browser/search.contribution.ts +++ b/src/vs/workbench/parts/search/browser/search.contribution.ts @@ -35,8 +35,8 @@ import { ISearchWorkbenchService, SearchWorkbenchService } from 'vs/workbench/pa import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { SearchViewlet } from 'vs/workbench/parts/search/browser/searchViewlet'; import { ListFocusContext } from 'vs/platform/list/browser/listService'; - import { IOutputChannelRegistry, Extensions as OutputExt } from 'vs/workbench/parts/output/common/output'; +import { defaultQuickOpenContextKey } from "vs/workbench/browser/parts/quickopen/quickopen"; registerSingleton(ISearchWorkbenchService, SearchWorkbenchService); replaceContributions(); @@ -274,6 +274,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerDefaultQu 'vs/workbench/parts/search/browser/openAnythingHandler', 'OpenAnythingHandler', '', + defaultQuickOpenContextKey, nls.localize('openAnythingHandlerDescription', "Go to File") ) ); @@ -283,6 +284,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/parts/search/browser/openAnythingHandler', 'OpenSymbolHandler', ALL_SYMBOLS_PREFIX, + 'inWorkspaceSymbolsPicker', [ { prefix: ALL_SYMBOLS_PREFIX, diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 529b36f8f0c3e..a5a53dae147c0 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -1514,12 +1514,14 @@ registerSingleton(ITaskService, TaskService); // Register Quick Open const quickOpenRegistry = (Registry.as(QuickOpenExtensions.Quickopen)); +const tasksPickerContextKey = 'inTasksPicker'; quickOpenRegistry.registerQuickOpenHandler( new QuickOpenHandlerDescriptor( 'vs/workbench/parts/tasks/browser/taskQuickOpen', 'QuickOpenHandler', 'task ', + tasksPickerContextKey, nls.localize('quickOpen.task', "Run Task") ) ); @@ -1529,6 +1531,7 @@ quickOpenRegistry.registerQuickOpenHandler( 'vs/workbench/parts/tasks/browser/terminateQuickOpen', 'QuickOpenHandler', 'terminate task ', + tasksPickerContextKey, nls.localize('quickOpen.terminateTask', "Terminate Task") ) ); @@ -1538,6 +1541,7 @@ quickOpenRegistry.registerQuickOpenHandler( 'vs/workbench/parts/tasks/browser/restartQuickOpen', 'QuickOpenHandler', 'restart task ', + tasksPickerContextKey, nls.localize('quickOpen.restartTask', "Restart Task") ) ); @@ -1547,6 +1551,7 @@ quickOpenRegistry.registerQuickOpenHandler( 'vs/workbench/parts/tasks/browser/buildQuickOpen', 'QuickOpenHandler', 'build task ', + tasksPickerContextKey, nls.localize('quickOpen.buildTask', "Build Task") ) ); @@ -1556,6 +1561,7 @@ quickOpenRegistry.registerQuickOpenHandler( 'vs/workbench/parts/tasks/browser/testQuickOpen', 'QuickOpenHandler', 'test task ', + tasksPickerContextKey, nls.localize('quickOpen.testTask', "Test Task") ) ); diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index 85fa218b5981f..b12e4812b9b22 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -12,7 +12,7 @@ import * as nls from 'vs/nls'; import * as panel from 'vs/workbench/browser/panel'; import * as platform from 'vs/base/common/platform'; import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; -import { GlobalQuickOpenAction } from 'vs/workbench/browser/parts/quickopen/quickopen.contribution'; +import { GlobalQuickOpenAction } from 'vs/workbench/browser/parts/quickopen/quickopen'; import { ITerminalService, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, TERMINAL_PANEL_ID, TERMINAL_DEFAULT_RIGHT_CLICK_COPY_PASTE, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE, TerminalCursorStyle } from 'vs/workbench/parts/terminal/common/terminal'; import { TERMINAL_DEFAULT_SHELL_LINUX, TERMINAL_DEFAULT_SHELL_OSX, TERMINAL_DEFAULT_SHELL_WINDOWS } from 'vs/workbench/parts/terminal/electron-browser/terminal'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; diff --git a/src/vs/workbench/parts/watermark/electron-browser/watermark.ts b/src/vs/workbench/parts/watermark/electron-browser/watermark.ts index a6e55adf5c8d4..c28efbc3fc683 100644 --- a/src/vs/workbench/parts/watermark/electron-browser/watermark.ts +++ b/src/vs/workbench/parts/watermark/electron-browser/watermark.ts @@ -18,7 +18,7 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { GlobalQuickOpenAction } from 'vs/workbench/browser/parts/quickopen/quickopen.contribution'; +import { GlobalQuickOpenAction } from 'vs/workbench/browser/parts/quickopen/quickopen'; import { KeybindingsReferenceAction, OpenRecentAction } from 'vs/workbench/electron-browser/actions'; import { ShowRecommendedKeymapExtensionsAction } from 'vs/workbench/parts/extensions/browser/extensionsActions'; import { GlobalNewUntitledFileAction, OpenFileAction } from 'vs/workbench/parts/files/browser/fileActions'; diff --git a/src/vs/workbench/test/browser/quickopen.test.ts b/src/vs/workbench/test/browser/quickopen.test.ts index caee483e75ece..17baa336943eb 100644 --- a/src/vs/workbench/test/browser/quickopen.test.ts +++ b/src/vs/workbench/test/browser/quickopen.test.ts @@ -67,7 +67,8 @@ suite('Workbench QuickOpen', () => { 'test', 'TestHandler', ',', - 'Handler' + 'Handler', + null ); registry.registerQuickOpenHandler(handler); From 079ad467d5d2564c6ff42ab9f9949e6d4ca5ec84 Mon Sep 17 00:00:00 2001 From: Soney Mathew Date: Thu, 15 Jun 2017 16:21:56 +1000 Subject: [PATCH 1856/2747] Provide a command to close all unchanged files (#25692) --- .../parts/editor/editor.contribution.ts | 3 +- .../browser/parts/editor/editorActions.ts | 28 +++++++++++++++++++ .../browser/parts/editor/titleControl.ts | 7 ++++- .../files/browser/views/openEditorsViewer.ts | 5 +++- 4 files changed, 40 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts index 373bccf0f4ead..4f7181fbe5966 100644 --- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts +++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts @@ -30,7 +30,7 @@ import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; import { CloseEditorsInGroupAction, CloseEditorsInOtherGroupsAction, CloseAllEditorsAction, MoveGroupLeftAction, MoveGroupRightAction, SplitEditorAction, JoinTwoGroupsAction, KeepEditorAction, CloseOtherEditorsInGroupAction, OpenToSideAction, RevertAndCloseEditorAction, NavigateBetweenGroupsAction, FocusActiveGroupAction, FocusFirstGroupAction, FocusSecondGroupAction, FocusThirdGroupAction, EvenGroupWidthsAction, MaximizeGroupAction, MinimizeOtherGroupsAction, FocusPreviousGroup, FocusNextGroup, ShowEditorsInGroupOneAction, - toEditorQuickOpenEntry, CloseLeftEditorsInGroupAction, CloseRightEditorsInGroupAction, OpenNextEditor, OpenPreviousEditor, NavigateBackwardsAction, NavigateForwardAction, ReopenClosedEditorAction, OpenPreviousRecentlyUsedEditorInGroupAction, NAVIGATE_IN_GROUP_ONE_PREFIX, + toEditorQuickOpenEntry, CloseLeftEditorsInGroupAction, CloseRightEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction, OpenNextEditor, OpenPreviousEditor, NavigateBackwardsAction, NavigateForwardAction, ReopenClosedEditorAction, OpenPreviousRecentlyUsedEditorInGroupAction, NAVIGATE_IN_GROUP_ONE_PREFIX, OpenPreviousEditorFromHistoryAction, ShowAllEditorsAction, NAVIGATE_ALL_EDITORS_GROUP_PREFIX, ClearEditorHistoryAction, ShowEditorsInGroupTwoAction, MoveEditorRightInGroupAction, OpenNextEditorInGroup, OpenPreviousEditorInGroup, OpenNextRecentlyUsedEditorAction, OpenPreviousRecentlyUsedEditorAction, NAVIGATE_IN_GROUP_TWO_PREFIX, ShowEditorsInGroupThreeAction, NAVIGATE_IN_GROUP_THREE_PREFIX, FocusLastEditorInStackAction, OpenNextRecentlyUsedEditorInGroupAction, MoveEditorToPreviousGroupAction, MoveEditorToNextGroupAction, MoveEditorLeftInGroupAction, ClearRecentFilesAction } from 'vs/workbench/browser/parts/editor/editorActions'; @@ -343,6 +343,7 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(KeepEditorAction, Keep registry.registerWorkbenchAction(new SyncActionDescriptor(CloseAllEditorsAction, CloseAllEditorsAction.ID, CloseAllEditorsAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_W) }), 'View: Close All Editors', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseLeftEditorsInGroupAction, CloseLeftEditorsInGroupAction.ID, CloseLeftEditorsInGroupAction.LABEL), 'View: Close Editors to the Left', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseRightEditorsInGroupAction, CloseRightEditorsInGroupAction.ID, CloseRightEditorsInGroupAction.LABEL), 'View: Close Editors to the Right', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, CloseUnmodifiedEditorsInGroupAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_U) }), 'View: Close Unmodified Editors', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, CloseEditorsInGroupAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_W) }), 'View: Close All Editors in Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseOtherEditorsInGroupAction, CloseOtherEditorsInGroupAction.ID, CloseOtherEditorsInGroupAction.LABEL, { primary: null, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_T } }), 'View: Close Other Editors', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseEditorsInOtherGroupsAction, CloseEditorsInOtherGroupsAction.ID, CloseEditorsInOtherGroupsAction.LABEL), 'View: Close Editors in Other Groups', category); diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index 34a37ea902f3c..3df24392886d8 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -691,6 +691,34 @@ export class CloseAllEditorsAction extends Action { } } +export class CloseUnmodifiedEditorsInGroupAction extends Action { + + public static ID = 'workbench.action.closeUnmodifiedEditors'; + public static LABEL = nls.localize('closeUnmodifiedEditors', "Close Unmodified Editors in Group"); + + constructor( + id: string, + label: string, + @IEditorGroupService private editorGroupService: IEditorGroupService, + @IWorkbenchEditorService private editorService: IWorkbenchEditorService + ) { + super(id, label); + } + + public run(context?: IEditorContext): TPromise { + const activeGroup = this.editorGroupService.getStacksModel().activeGroup; + const groupId = context && context.group ? context.group.id : activeGroup ? activeGroup.id : null; + if (groupId !== null) { + const stacks = this.editorGroupService.getStacksModel(); + const group = stacks.getGroup(groupId); + group.getEditors().filter(e => !e.isDirty()).forEach(e => this.editorService.closeEditor(stacks.positionOfGroup(group), e)); + return TPromise.as(null); + } + + return TPromise.as(false); + } +} + export class CloseEditorsInOtherGroupsAction extends Action { public static ID = 'workbench.action.closeEditorsInOtherGroups'; diff --git a/src/vs/workbench/browser/parts/editor/titleControl.ts b/src/vs/workbench/browser/parts/editor/titleControl.ts index 12c13c861ed7d..a2a66110f4cca 100644 --- a/src/vs/workbench/browser/parts/editor/titleControl.ts +++ b/src/vs/workbench/browser/parts/editor/titleControl.ts @@ -32,7 +32,7 @@ import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ResolvedKeybinding } from 'vs/base/common/keyCodes'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; -import { CloseEditorsInGroupAction, SplitEditorAction, CloseEditorAction, KeepEditorAction, CloseOtherEditorsInGroupAction, CloseRightEditorsInGroupAction, ShowEditorsInGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; +import { CloseEditorsInGroupAction, SplitEditorAction, CloseEditorAction, KeepEditorAction, CloseOtherEditorsInGroupAction, CloseRightEditorsInGroupAction, ShowEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { createActionItem, fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; import { IMenuService, MenuId, IMenu, ExecuteCommandAction } from 'vs/platform/actions/common/actions'; @@ -71,6 +71,7 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl protected pinEditorAction: KeepEditorAction; protected closeOtherEditorsAction: CloseOtherEditorsInGroupAction; protected closeRightEditorsAction: CloseRightEditorsInGroupAction; + protected closeUnmodifiedEditorsInGroupAction: CloseUnmodifiedEditorsInGroupAction; protected closeEditorsInGroupAction: CloseEditorsInGroupAction; protected splitEditorAction: SplitEditorAction; protected showEditorsInGroupAction: ShowEditorsInGroupAction; @@ -228,6 +229,7 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl this.closeOtherEditorsAction = services.createInstance(CloseOtherEditorsInGroupAction, CloseOtherEditorsInGroupAction.ID, nls.localize('closeOthers', "Close Others")); this.closeRightEditorsAction = services.createInstance(CloseRightEditorsInGroupAction, CloseRightEditorsInGroupAction.ID, nls.localize('closeRight', "Close to the Right")); this.closeEditorsInGroupAction = services.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, nls.localize('closeAll', "Close All")); + this.closeUnmodifiedEditorsInGroupAction = services.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, nls.localize('closeAllUnmodified', "Close Unmodified")); this.pinEditorAction = services.createInstance(KeepEditorAction, KeepEditorAction.ID, nls.localize('keepOpen', "Keep Open")); this.showEditorsInGroupAction = services.createInstance(ShowEditorsInGroupAction, ShowEditorsInGroupAction.ID, nls.localize('showOpenedEditors', "Show Opened Editors")); this.splitEditorAction = services.createInstance(SplitEditorAction, SplitEditorAction.ID, SplitEditorAction.LABEL); @@ -355,6 +357,7 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl } secondaryEditorActions.push(this.showEditorsInGroupAction); secondaryEditorActions.push(new Separator()); + secondaryEditorActions.push(this.closeUnmodifiedEditorsInGroupAction); secondaryEditorActions.push(this.closeEditorsInGroupAction); } @@ -440,6 +443,7 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl actions.push(this.closeRightEditorsAction); } + actions.push(this.closeUnmodifiedEditorsInGroupAction); actions.push(this.closeEditorsInGroupAction); if (tabOptions.previewEditors) { @@ -461,6 +465,7 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl this.showEditorsInGroupAction, this.closeEditorAction, this.closeRightEditorsAction, + this.closeUnmodifiedEditorsInGroupAction, this.closeOtherEditorsAction, this.closeEditorsInGroupAction, this.pinEditorAction diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts b/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts index f275bfd30a52e..20c36a3af7317 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts @@ -30,7 +30,7 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import { EditorStacksModel, EditorGroup } from 'vs/workbench/common/editor/editorStacksModel'; import { SaveFileAction, RevertFileAction, SaveFileAsAction, OpenToSideAction, SelectResourceForCompareAction, CompareResourcesAction, SaveAllInGroupAction } from 'vs/workbench/parts/files/browser/fileActions'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; -import { CloseOtherEditorsInGroupAction, CloseEditorAction, CloseEditorsInGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; +import { CloseOtherEditorsInGroupAction, CloseEditorAction, CloseEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; const $ = dom.$; @@ -332,6 +332,7 @@ export class ActionProvider extends ContributableActionProvider { return [ saveAllAction, + this.instantiationService.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, CloseUnmodifiedEditorsInGroupAction.LABEL), this.instantiationService.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, CloseEditorsInGroupAction.LABEL) ]; } @@ -350,6 +351,7 @@ export class ActionProvider extends ContributableActionProvider { result.push(new Separator()); } + result.push(this.instantiationService.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, nls.localize('closeAllUnmodified', "Close Unmodified"))); result.push(this.instantiationService.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, nls.localize('closeAll', "Close All"))); } else { const openEditor = element; @@ -406,6 +408,7 @@ export class ActionProvider extends ContributableActionProvider { const closeOtherEditorsInGroupAction = this.instantiationService.createInstance(CloseOtherEditorsInGroupAction, CloseOtherEditorsInGroupAction.ID, nls.localize('closeOthers', "Close Others")); closeOtherEditorsInGroupAction.enabled = openEditor.editorGroup.count > 1; result.push(closeOtherEditorsInGroupAction); + result.push(this.instantiationService.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, nls.localize('closeAllUnmodified', "Close Unmodified"))); result.push(this.instantiationService.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, nls.localize('closeAll', "Close All"))); } From c1562a5ebb4a072367bf528b23db3a8c91e46c7b Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 15 Jun 2017 08:49:08 +0200 Subject: [PATCH 1857/2747] fix windows zip --- build/gulpfile.vscode.win32.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js index a4ebd283ee00d..4ac842af71b1d 100644 --- a/build/gulpfile.vscode.win32.js +++ b/build/gulpfile.vscode.win32.js @@ -70,9 +70,9 @@ gulp.task('vscode-win32-x64-setup', ['clean-vscode-win32-x64-setup'], buildWin32 function archiveWin32Setup(arch) { return cb => { - const args = ['a', '-tzip', zipPath(arch), buildPath(arch), '-r']; + const args = ['a', '-tzip', zipPath(arch), '.', '-r']; - cp.spawn(_7z, args, { stdio: 'inherit' }) + cp.spawn(_7z, args, { stdio: 'inherit', cwd: buildPath(arch) }) .on('error', cb) .on('exit', () => cb(null)); }; From f63d0f56eb1188a880c9a1ad830ece1c8d0d2408 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 15 Jun 2017 08:59:05 +0200 Subject: [PATCH 1858/2747] :lipstick: --- .../parts/editor/editor.contribution.ts | 2 +- .../browser/parts/editor/editorActions.ts | 25 ++++---- .../browser/parts/editor/editorPart.ts | 60 +++++++++++++++---- .../services/editor/browser/editorService.ts | 6 +- .../services/editor/common/editorService.ts | 2 +- .../editor/test/browser/editorService.test.ts | 2 +- .../workbench/test/workbenchTestServices.ts | 2 +- 7 files changed, 70 insertions(+), 29 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts index 4f7181fbe5966..f9d294310384e 100644 --- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts +++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts @@ -343,7 +343,7 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(KeepEditorAction, Keep registry.registerWorkbenchAction(new SyncActionDescriptor(CloseAllEditorsAction, CloseAllEditorsAction.ID, CloseAllEditorsAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_W) }), 'View: Close All Editors', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseLeftEditorsInGroupAction, CloseLeftEditorsInGroupAction.ID, CloseLeftEditorsInGroupAction.LABEL), 'View: Close Editors to the Left', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseRightEditorsInGroupAction, CloseRightEditorsInGroupAction.ID, CloseRightEditorsInGroupAction.LABEL), 'View: Close Editors to the Right', category); -registry.registerWorkbenchAction(new SyncActionDescriptor(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, CloseUnmodifiedEditorsInGroupAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_U) }), 'View: Close Unmodified Editors', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, CloseUnmodifiedEditorsInGroupAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_U) }), 'View: Close Unmodified Editors in Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, CloseEditorsInGroupAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_W) }), 'View: Close All Editors in Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseOtherEditorsInGroupAction, CloseOtherEditorsInGroupAction.ID, CloseOtherEditorsInGroupAction.LABEL, { primary: null, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_T } }), 'View: Close Other Editors', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseEditorsInOtherGroupsAction, CloseEditorsInOtherGroupsAction.ID, CloseEditorsInOtherGroupsAction.LABEL), 'View: Close Editors in Other Groups', category); diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index 3df24392886d8..29cf34bc07c99 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -617,7 +617,7 @@ export class CloseLeftEditorsInGroupAction extends Action { public run(context?: IEditorContext): TPromise { const editor = getTarget(this.editorService, this.groupService, context); if (editor) { - return this.editorService.closeEditors(editor.position, editor.input, Direction.LEFT); + return this.editorService.closeEditors(editor.position, { except: editor.input, direction: Direction.LEFT }); } return TPromise.as(false); @@ -641,7 +641,7 @@ export class CloseRightEditorsInGroupAction extends Action { public run(context?: IEditorContext): TPromise { const editor = getTarget(this.editorService, this.groupService, context); if (editor) { - return this.editorService.closeEditors(editor.position, editor.input, Direction.RIGHT); + return this.editorService.closeEditors(editor.position, { except: editor.input, direction: Direction.RIGHT }); } return TPromise.as(false); @@ -706,13 +706,18 @@ export class CloseUnmodifiedEditorsInGroupAction extends Action { } public run(context?: IEditorContext): TPromise { - const activeGroup = this.editorGroupService.getStacksModel().activeGroup; - const groupId = context && context.group ? context.group.id : activeGroup ? activeGroup.id : null; - if (groupId !== null) { - const stacks = this.editorGroupService.getStacksModel(); - const group = stacks.getGroup(groupId); - group.getEditors().filter(e => !e.isDirty()).forEach(e => this.editorService.closeEditor(stacks.positionOfGroup(group), e)); - return TPromise.as(null); + let position = context ? this.editorGroupService.getStacksModel().positionOfGroup(context.group) : null; + + // If position is not passed in take the position of the active editor. + if (typeof position !== 'number') { + const active = this.editorService.getActiveEditor(); + if (active) { + position = active.position; + } + } + + if (typeof position === 'number') { + return this.editorService.closeEditors(position, { unmodifiedOnly: true }); } return TPromise.as(false); @@ -776,7 +781,7 @@ export class CloseOtherEditorsInGroupAction extends Action { } if (typeof position === 'number' && input) { - return this.editorService.closeEditors(position, input); + return this.editorService.closeEditors(position, { except: input }); } return TPromise.as(false); diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index f0db5dc5baf37..18a865ad5fcf9 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -665,18 +665,23 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService }); } - public closeEditors(position: Position, except?: EditorInput, direction?: Direction): TPromise { + public closeEditors(position: Position, filter: { except?: EditorInput, direction?: Direction, unmodifiedOnly?: boolean } = Object.create(null)): TPromise { const group = this.stacks.groupAt(position); if (!group) { return TPromise.as(null); } + let editors = group.getEditors(); + if (filter.unmodifiedOnly) { + editors = editors.filter(e => !e.isDirty()); + } + // Check for dirty and veto let editorsToClose: EditorInput[]; - if (types.isUndefinedOrNull(direction)) { - editorsToClose = group.getEditors().filter(e => !except || !e.matches(except)); + if (types.isUndefinedOrNull(filter.direction)) { + editorsToClose = editors.filter(e => !filter.except || !e.matches(filter.except)); } else { - editorsToClose = (direction === Direction.LEFT) ? group.getEditors().slice(0, group.indexOf(except)) : group.getEditors().slice(group.indexOf(except) + 1); + editorsToClose = (filter.direction === Direction.LEFT) ? editors.slice(0, group.indexOf(filter.except)) : editors.slice(group.indexOf(filter.except) + 1); } return this.handleDirty(editorsToClose.map(editor => { return { group, editor }; }), true /* ignore if opened in other group */).then(veto => { @@ -684,14 +689,26 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService return; } - this.doCloseEditors(group, except, direction); + this.doCloseEditors(group, filter); }); } - private doCloseEditors(group: EditorGroup, except?: EditorInput, direction?: Direction): void { + private doCloseEditors(group: EditorGroup, filter: { except?: EditorInput, direction?: Direction, unmodifiedOnly?: boolean } = Object.create(null)): void { + + // Close all editors if there is no editor to except and + // we either are not only closing unmodified editors or + // there are no dirty editors. + let closeAllEditors = false; + if (!filter.except) { + if (!filter.unmodifiedOnly) { + closeAllEditors = true; + } else { + closeAllEditors = !group.getEditors().some(e => e.isDirty()); + } + } // Close all editors in group - if (!except) { + if (closeAllEditors) { // Update stacks model: remove all non active editors first to prevent opening the next editor in group group.closeEditors(group.activeEditor); @@ -700,23 +717,42 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService this.doCloseActiveEditor(group); } + // Close unmodified editors in group + else if (filter.unmodifiedOnly) { + + // We can just close all unmodified editors around the currently active dirty one + if (group.activeEditor.isDirty()) { + group.getEditors().filter(editor => !editor.isDirty() && !editor.matches(filter.except)).forEach(editor => this.doCloseInactiveEditor(group, editor)); + } + + // Active editor is also a candidate to close, thus we make the first dirty editor + // active and then close the other ones + else { + const firstDirtyEditor = group.getEditors().filter(editor => editor.isDirty())[0]; + + this.openEditor(firstDirtyEditor, null, this.stacks.positionOfGroup(group)).done(() => { + this.doCloseEditors(group, filter); + }, errors.onUnexpectedError); + } + } + // Close all editors in group except active one - else if (except.matches(group.activeEditor)) { + else if (filter.except && filter.except.matches(group.activeEditor)) { // Update stacks model: close non active editors supporting the direction - group.closeEditors(group.activeEditor, direction); + group.closeEditors(group.activeEditor, filter.direction); } // Finally: we are asked to close editors around a non-active editor // Thus we make the non-active one active and then close the others else { - this.openEditor(except, null, this.stacks.positionOfGroup(group)).done(() => { + this.openEditor(filter.except, null, this.stacks.positionOfGroup(group)).done(() => { // since the opening might have failed, we have to check again for the active editor // being the expected one, otherwise we end up in an endless loop trying to open the // editor - if (except.matches(group.activeEditor)) { - this.doCloseEditors(group, except, direction); + if (filter.except.matches(group.activeEditor)) { + this.doCloseEditors(group, filter); } }, errors.onUnexpectedError); } diff --git a/src/vs/workbench/services/editor/browser/editorService.ts b/src/vs/workbench/services/editor/browser/editorService.ts index e8b52c75a1e7f..3e32edce31d85 100644 --- a/src/vs/workbench/services/editor/browser/editorService.ts +++ b/src/vs/workbench/services/editor/browser/editorService.ts @@ -30,7 +30,7 @@ export interface IEditorPart { openEditors(editors: { input: IEditorInput, position: Position, options?: IEditorOptions | ITextEditorOptions }[]): TPromise; replaceEditors(editors: { toReplace: IEditorInput, replaceWith: IEditorInput, options?: IEditorOptions | ITextEditorOptions }[], position?: Position): TPromise; closeEditor(position: Position, input: IEditorInput): TPromise; - closeEditors(position: Position, except?: IEditorInput, direction?: Direction): TPromise; + closeEditors(position: Position, filter?: { except?: IEditorInput, direction?: Direction, unmodifiedOnly?: boolean }): TPromise; closeAllEditors(except?: Position): TPromise; getActiveEditor(): BaseEditor; getVisibleEditors(): IEditor[]; @@ -194,8 +194,8 @@ export class WorkbenchEditorService implements IWorkbenchEditorService { return this.editorPart.closeEditor(position, input); } - public closeEditors(position: Position, except?: IEditorInput, direction?: Direction): TPromise { - return this.editorPart.closeEditors(position, except, direction); + public closeEditors(position: Position, filter?: { except?: IEditorInput, direction?: Direction, unmodifiedOnly?: boolean }): TPromise { + return this.editorPart.closeEditors(position, filter); } public closeAllEditors(except?: Position): TPromise { diff --git a/src/vs/workbench/services/editor/common/editorService.ts b/src/vs/workbench/services/editor/common/editorService.ts index abedce481a032..5381c9de4e793 100644 --- a/src/vs/workbench/services/editor/common/editorService.ts +++ b/src/vs/workbench/services/editor/common/editorService.ts @@ -80,7 +80,7 @@ export interface IWorkbenchEditorService extends IEditorService { * will not be closed. The direction can be used in that case to control if all other editors should get closed, * or towards a specific direction. */ - closeEditors(position: Position, except?: IEditorInput, direction?: Direction): TPromise; + closeEditors(position: Position, filter?: { except?: IEditorInput, direction?: Direction, unmodifiedOnly?: boolean }): TPromise; /** * Closes all editors across all groups. The optional position allows to keep one group alive. diff --git a/src/vs/workbench/services/editor/test/browser/editorService.test.ts b/src/vs/workbench/services/editor/test/browser/editorService.test.ts index 4dd5a44fe16df..1c3c11e3c102b 100644 --- a/src/vs/workbench/services/editor/test/browser/editorService.test.ts +++ b/src/vs/workbench/services/editor/test/browser/editorService.test.ts @@ -51,7 +51,7 @@ class TestEditorPart implements IEditorPart { return TPromise.as([]); } - public closeEditors(position: Position, except?: EditorInput, direction?: Direction): TPromise { + public closeEditors(position: Position, filter?: { except?: EditorInput, direction?: Direction, unmodifiedOnly?: boolean }): TPromise { return TPromise.as(null); } diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index d38d290f46371..372f2d1f49417 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -525,7 +525,7 @@ export class TestEditorService implements IWorkbenchEditorService { return TPromise.as([]); } - public closeEditors(position: Position, except?: IEditorInput, direction?: Direction): TPromise { + public closeEditors(position: Position, filter?: { except?: IEditorInput, direction?: Direction, unmodifiedOnly?: boolean }): TPromise { return TPromise.as(null); } From 0e582fc66deb49307efc8a8b6e260f024e31e330 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 15 Jun 2017 09:24:01 +0200 Subject: [PATCH 1859/2747] multi root: workspace name --- .../browser/standalone/simpleServices.ts | 2 +- src/vs/platform/workspace/common/workspace.ts | 5 ++++ .../configuration/node/configuration.ts | 24 +++++++++++++++++-- .../workbench/test/workbenchTestServices.ts | 2 +- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/browser/standalone/simpleServices.ts b/src/vs/editor/browser/standalone/simpleServices.ts index 7d6d9ca4fa26d..a177a093718ad 100644 --- a/src/vs/editor/browser/standalone/simpleServices.ts +++ b/src/vs/editor/browser/standalone/simpleServices.ts @@ -516,7 +516,7 @@ export class SimpleWorkspaceContextService implements IWorkspaceContextService { } public getWorkspace2(): IWorkspace2 { - return this.workspace ? { id: `${this.id}`, roots: [this.workspace.resource] } : void 0; + return this.workspace ? { id: `${this.id}`, roots: [this.workspace.resource], name: this.workspace.resource.fsPath } : void 0; } public hasWorkspace(): boolean { diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index b133e6aea4e51..7abd76ad14ca2 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -78,6 +78,11 @@ export interface IWorkspace2 { */ readonly id: string; + /** + * the name of the workspace. + */ + readonly name: string; + /** * Mutliple roots in this workspace. First entry is master and never changes. */ diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index cb06494acb227..4c62132f61db9 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -24,6 +24,8 @@ import { ScopedConfigModel, WorkspaceConfigModel, WorkspaceSettingsConfigModel } import { IConfigurationServiceEvent, ConfigurationSource, getConfigurationValue, IConfigurationOptions, Configuration } from 'vs/platform/configuration/common/configuration'; import { IWorkspaceConfigurationValues, IWorkspaceConfigurationService, IWorkspaceConfigurationValue, WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME, WORKSPACE_STANDALONE_CONFIGURATIONS, WORKSPACE_CONFIG_DEFAULT_PATH } from 'vs/workbench/services/configuration/common/configuration'; import { ConfigurationService as GlobalConfigurationService } from 'vs/platform/configuration/node/configurationService'; +import { createHash } from "crypto"; +import { basename } from "path"; interface IStat { resource: URI; @@ -44,13 +46,31 @@ interface IWorkspaceConfiguration { type IWorkspaceFoldersConfiguration = { [rootFolder: string]: { folders: string[]; } }; class Workspace implements IWorkspace2 { + private _name: string; constructor( public readonly id: string, - public roots: URI[] + private _roots: URI[] ) { // } + + public set roots(roots: URI[]) { + this._roots = roots; + this._name = null; // will be recomputed based on roots next time accessed + } + + public get roots(): URI[] { + return this._roots; + } + + public get name(): string { + if (!this._name) { + this._name = this.roots.map(root => basename(root.fsPath)).join(', '); + } + + return this._name; + } } export class WorkspaceConfigurationService extends Disposable implements IWorkspaceContextService, IWorkspaceConfigurationService { @@ -79,7 +99,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp constructor(private environmentService: IEnvironmentService, private singleRootWorkspace?: SingleRootWorkspace, private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME) { super(); - this.workspace = singleRootWorkspace ? new Workspace(singleRootWorkspace.resource.toString(), [singleRootWorkspace.resource]) : null; + this.workspace = singleRootWorkspace ? new Workspace(createHash('md5').update(singleRootWorkspace.resource.toString()).digest('hex'), [singleRootWorkspace.resource]) : null; // TODO@Ben for now use the first root folder as id, but revisit this later this.workspaceFilePathToConfiguration = Object.create(null); this.cachedConfig = new Configuration(); diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 372f2d1f49417..2ddd8120752f2 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -94,7 +94,7 @@ export class TestContextService implements IWorkspaceContextService { } public getWorkspace2(): IWorkspace2 { - return this.workspace ? { id: this.id, roots: [this.workspace.resource] } : void 0; + return this.workspace ? { id: this.id, roots: [this.workspace.resource], name: this.workspace.resource.fsPath } : void 0; } public setWorkspace(workspace: any): void { From e5e00d71d6803f2b96b46feba603d482e1c5a80d Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 15 Jun 2017 09:51:40 +0200 Subject: [PATCH 1860/2747] Run smoke test build in higher screen resolution. --- build/tfs/linux/smoketest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tfs/linux/smoketest.sh b/build/tfs/linux/smoketest.sh index 327d55b66d974..33344082253fe 100644 --- a/build/tfs/linux/smoketest.sh +++ b/build/tfs/linux/smoketest.sh @@ -29,5 +29,5 @@ step "Run smoke test" \ pushd test/smoke npm install npm run compile - xvfb-run -a node src/main.js --latest "$AGENT_BUILDDIRECTORY/VSCode-linux-ia32/code-insiders" + xvfb-run -a -s="-screen 0 1024x768x8" node src/main.js --latest "$AGENT_BUILDDIRECTORY/VSCode-linux-ia32/code-insiders" popd \ No newline at end of file From 293deaeb097a02e04faeb89316802dadd69ad732 Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 15 Jun 2017 10:30:04 +0200 Subject: [PATCH 1861/2747] fixes #28740 --- .../parts/debug/electron-browser/debugService.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 40c3ce62b0515..a79f53cadd6c6 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -912,14 +912,12 @@ export class DebugService implements debug.IDebugService { let config = process.configuration; if (this.launchJsonChanged) { this.launchJsonChanged = false; - config = this.configurationManager.getConfiguration(process.configuration.name) || process.configuration; - if (config) { - // Take the type from the process since the debug extension might overwrite it #21316 - config.type = process.configuration.type; - config.noDebug = process.configuration.noDebug; - config.__restart = restartData; - } + config = this.configurationManager.getConfiguration(process.configuration.name) || config; + // Take the type from the process since the debug extension might overwrite it #21316 + config.type = process.configuration.type; + config.noDebug = process.configuration.noDebug; } + config.__restart = restartData; this.createProcess(config).then(() => c(null), err => e(err)); }, 300); }) From dd2cd5fc5821aaa4786b6fcb115246d52c5cd14c Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 15 Jun 2017 10:31:27 +0200 Subject: [PATCH 1862/2747] merge master --- .github/copycat.yml | 5 + build/gulpfile.vscode.js | 4 +- build/gulpfile.vscode.win32.js | 4 +- .../lib/tslint/noUnexternalizedStringsRule.ts | 20 +- build/tfs/darwin/smoketest.sh | 6 - build/tfs/linux/build.sh | 83 +------ build/tfs/linux/release.sh | 86 +++++++ build/tfs/linux/smoketest.sh | 33 +++ build/tfs/win32/smoketest.ps1 | 46 ++++ extensions/git/src/commands.ts | 6 +- extensions/git/src/git.ts | 8 +- extensions/git/src/model.ts | 28 ++- extensions/json/server/npm-shrinkwrap.json | 4 +- extensions/json/server/package.json | 2 +- extensions/markdown/package.json | 2 +- .../themes/dimmed-monokai-color-theme.json | 32 ++- .../themes/monokai-color-theme.json | 7 + .../src/features/bufferSyncSupport.ts | 15 +- npm-shrinkwrap.json | 2 +- src/vs/base/browser/dom.ts | 14 +- src/vs/base/browser/fastDomNode.ts | 41 +--- src/vs/base/browser/ui/list/listView.ts | 1 - .../browser/ui/scrollbar/abstractScrollbar.ts | 17 +- .../ui/scrollbar/horizontalScrollbar.ts | 9 +- .../browser/ui/scrollbar/scrollableElement.ts | 5 - .../ui/scrollbar/scrollableElementOptions.ts | 6 - .../browser/ui/scrollbar/verticalScrollbar.ts | 9 +- src/vs/base/common/errorMessage.ts | 2 +- src/vs/base/common/marked/OSSREADME.json | 2 +- src/vs/base/common/marked/raw.marked.js | 69 +++--- src/vs/base/parts/tree/browser/treeView.ts | 1 - src/vs/code/electron-main/app.ts | 2 +- src/vs/code/electron-main/menus.ts | 26 +- src/vs/editor/browser/config/configuration.ts | 1 - .../editor/browser/controller/mouseHandler.ts | 2 +- .../browser/services/codeEditorServiceImpl.ts | 9 +- .../standalone/media/standalone-tokens.css | 2 +- .../browser/standalone/simpleServices.ts | 5 +- .../browser/standalone/standaloneLanguages.ts | 2 +- .../editorScrollbar/editorScrollbar.ts | 4 +- .../viewParts/indentGuides/indentGuides.css | 1 - .../viewParts/indentGuides/indentGuides.ts | 4 +- .../browser/viewParts/lines/viewLines.ts | 21 +- .../editor/browser/viewParts/margin/margin.ts | 18 +- .../browser/viewParts/minimap/minimap.ts | 2 +- .../overviewRuler/decorationsOverviewRuler.ts | 5 - .../viewParts/overviewRuler/overviewRuler.ts | 5 - .../overviewRuler/overviewRulerImpl.ts | 17 +- .../browser/viewParts/rulers/rulers.css | 1 - .../editor/browser/viewParts/rulers/rulers.ts | 4 +- .../viewParts/viewCursors/viewCursor.ts | 5 +- .../common/config/commonEditorConfig.ts | 2 - src/vs/editor/common/config/editorOptions.ts | 28 +-- .../common/controller/cursorTypeOperations.ts | 2 +- src/vs/editor/common/view/viewEvents.ts | 4 +- .../contrib/find/common/findController.ts | 10 +- .../find/test/common/findController.test.ts | 2 +- .../contrib/hover/browser/hoverWidgets.ts | 2 +- src/vs/editor/contrib/links/browser/links.ts | 62 ++--- .../browser/parameterHintsWidget.ts | 2 +- .../browser/referenceSearch.ts | 7 +- .../browser/referencesModel.ts | 6 +- .../browser/referencesWidget.ts | 17 +- .../contrib/suggest/browser/suggestWidget.ts | 2 +- .../wordHighlighter/common/wordHighlighter.ts | 4 +- .../zoneWidget/browser/peekViewWidget.ts | 3 +- .../services/decorationRenderOptions.test.ts | 2 +- .../common/config/commonEditorConfig.test.ts | 1 - .../test/common/mocks/testConfiguration.ts | 1 - src/vs/monaco.d.ts | 11 +- .../configuration/common/configuration.ts | 79 +++++- src/vs/platform/configuration/common/model.ts | 117 ++------- .../node/configurationService.ts | 26 +- .../test/common/configuration.test.ts | 79 ++++++ .../configuration/test/common/model.test.ts | 61 ++--- src/vs/platform/files/common/files.ts | 2 +- src/vs/platform/quickOpen/common/quickOpen.ts | 5 + src/vs/platform/search/common/replace.ts | 2 +- .../platform/storage/common/storageService.ts | 15 +- .../storage/test/storageService.test.ts | 7 +- src/vs/platform/workspace/common/workspace.ts | 20 +- .../workspace/test/common/testWorkspace.ts | 1 - .../electron-browser/mainThreadWorkspace.ts | 4 +- src/vs/workbench/api/node/extHost.api.impl.ts | 4 +- src/vs/workbench/api/node/extHost.protocol.ts | 10 +- .../api/node/extHostExtensionService.ts | 13 +- src/vs/workbench/api/node/extHostSCM.ts | 5 +- src/vs/workbench/api/node/extHostWorkspace.ts | 19 +- .../browser/parts/editor/binaryEditor.ts | 2 +- .../parts/editor/editor.contribution.ts | 42 +++- .../browser/parts/editor/editorActions.ts | 39 ++- .../browser/parts/editor/editorPart.ts | 60 ++++- .../browser/parts/editor/tabsTitleControl.ts | 1 - .../browser/parts/editor/titleControl.ts | 7 +- .../parts/quickopen/quickOpenController.ts | 50 +++- .../parts/quickopen/quickopen.contribution.ts | 175 +++----------- .../browser/parts/quickopen/quickopen.ts | 132 +++++++++++ src/vs/workbench/browser/quickopen.ts | 11 +- .../common/editor/editorStacksModel.ts | 28 ++- src/vs/workbench/electron-browser/actions.ts | 4 + .../electron-browser/extensionHost.ts | 4 +- src/vs/workbench/electron-browser/main.ts | 125 ++++++---- .../electron-browser/media/shell.css | 2 +- src/vs/workbench/electron-browser/shell.ts | 22 +- .../electron-browser/workbench.main.ts | 1 + .../workbench/electron-browser/workbench.ts | 26 +- src/vs/workbench/node/extensionHostMain.ts | 21 +- .../parts/debug/browser/media/debugHover.css | 4 +- .../electron-browser/debug.contribution.ts | 1 + .../debug/electron-browser/debugHover.ts | 10 +- .../debug/electron-browser/debugService.ts | 12 +- .../extensions/browser/extensionEditor.ts | 4 +- .../extensions.contribution.ts | 2 + .../files/browser/views/openEditorsViewer.ts | 5 +- .../quickopen/browser/commandsHandler.ts | 22 -- .../browser/quickopen.contribution.ts | 45 +++- .../search/browser/search.contribution.ts | 4 +- .../electron-browser/task.contribution.ts | 6 + .../parts/terminal/common/terminal.ts | 17 ++ .../parts/terminal/common/terminalService.ts | 9 +- .../electron-browser/media/close-dark.svg | 1 + .../terminal/electron-browser/media/close.svg | 1 + .../electron-browser/media/next-inverse.svg | 5 + .../terminal/electron-browser/media/next.svg | 5 + .../media/previous-inverse.svg | 5 + .../electron-browser/media/previous.svg | 5 + .../electron-browser/media/terminal.css | 72 ++++++ .../electron-browser/media/widgets.css | 2 +- .../electron-browser/terminal.contribution.ts | 17 +- .../electron-browser/terminalActions.ts | 34 +++ .../electron-browser/terminalFindWidget.ts | 224 ++++++++++++++++++ .../electron-browser/terminalInstance.ts | 8 + .../electron-browser/terminalPanel.ts | 18 +- .../electron-browser/terminalService.ts | 21 +- .../watermark/electron-browser/watermark.ts | 2 +- .../electron-browser/walkThroughPart.ts | 1 - .../common/configurationModels.ts | 8 +- .../configuration/node/configuration.ts | 56 +++-- .../node/configurationResolverService.ts | 2 +- .../services/editor/browser/editorService.ts | 6 +- .../services/editor/common/editorService.ts | 2 +- .../editor/test/browser/editorService.test.ts | 2 +- .../test/browser/editorStacksModel.test.ts | 18 ++ .../workbench/test/browser/quickopen.test.ts | 3 +- .../api/extHostWorkspace.test.ts | 6 +- .../workbench/test/workbenchTestServices.ts | 7 +- test/smoke/README.md | 3 + 147 files changed, 1786 insertions(+), 983 deletions(-) create mode 100644 .github/copycat.yml create mode 100755 build/tfs/linux/release.sh create mode 100644 build/tfs/linux/smoketest.sh create mode 100644 build/tfs/win32/smoketest.ps1 create mode 100644 src/vs/platform/configuration/test/common/configuration.test.ts create mode 100644 src/vs/workbench/browser/parts/quickopen/quickopen.ts create mode 100644 src/vs/workbench/parts/terminal/electron-browser/media/close-dark.svg create mode 100644 src/vs/workbench/parts/terminal/electron-browser/media/close.svg create mode 100644 src/vs/workbench/parts/terminal/electron-browser/media/next-inverse.svg create mode 100644 src/vs/workbench/parts/terminal/electron-browser/media/next.svg create mode 100644 src/vs/workbench/parts/terminal/electron-browser/media/previous-inverse.svg create mode 100644 src/vs/workbench/parts/terminal/electron-browser/media/previous.svg create mode 100644 src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.ts diff --git a/.github/copycat.yml b/.github/copycat.yml new file mode 100644 index 0000000000000..eccccc16b007d --- /dev/null +++ b/.github/copycat.yml @@ -0,0 +1,5 @@ +{ + perform: true, + target_owner: 'chrmarti', + target_repo: 'testissues' +} \ No newline at end of file diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 82c1c5cb6708e..e4e7211aaefd4 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -43,7 +43,7 @@ const nodeModules = ['electron', 'original-fs'] const builtInExtensions = [ { name: 'ms-vscode.node-debug', version: '1.14.1' }, - { name: 'ms-vscode.node-debug2', version: '1.13.3' } + { name: 'ms-vscode.node-debug2', version: '1.14.0' } ]; const vscodeEntryPoints = _.flatten([ @@ -123,6 +123,8 @@ const config = { darwinIcon: 'resources/darwin/code.icns', darwinBundleIdentifier: product.darwinBundleIdentifier, darwinApplicationCategoryType: 'public.app-category.developer-tools', + darwinHelpBookFolder: 'VS Code HelpBook', + darwinHelpBookName: 'VS Code HelpBook', darwinBundleDocumentTypes: [{ name: product.nameLong + ' document', role: 'Editor', diff --git a/build/gulpfile.vscode.win32.js b/build/gulpfile.vscode.win32.js index a4ebd283ee00d..4ac842af71b1d 100644 --- a/build/gulpfile.vscode.win32.js +++ b/build/gulpfile.vscode.win32.js @@ -70,9 +70,9 @@ gulp.task('vscode-win32-x64-setup', ['clean-vscode-win32-x64-setup'], buildWin32 function archiveWin32Setup(arch) { return cb => { - const args = ['a', '-tzip', zipPath(arch), buildPath(arch), '-r']; + const args = ['a', '-tzip', zipPath(arch), '.', '-r']; - cp.spawn(_7z, args, { stdio: 'inherit' }) + cp.spawn(_7z, args, { stdio: 'inherit', cwd: buildPath(arch) }) .on('error', cb) .on('exit', () => cb(null)); }; diff --git a/build/lib/tslint/noUnexternalizedStringsRule.ts b/build/lib/tslint/noUnexternalizedStringsRule.ts index d7a2d8ca10015..cbe457c5be5ca 100644 --- a/build/lib/tslint/noUnexternalizedStringsRule.ts +++ b/build/lib/tslint/noUnexternalizedStringsRule.ts @@ -82,10 +82,10 @@ class NoUnexternalizedStringsRuleWalker extends Lint.RuleWalker { protected visitSourceFile(node: ts.SourceFile): void { super.visitSourceFile(node); Object.keys(this.usedKeys).forEach(key => { - let occurences = this.usedKeys[key]; - if (occurences.length > 1) { - occurences.forEach(occurence => { - this.addFailure((this.createFailure(occurence.key.getStart(), occurence.key.getWidth(), `Duplicate key ${occurence.key.getText()} with different message value.`))); + let occurrences = this.usedKeys[key]; + if (occurrences.length > 1) { + occurrences.forEach(occurrence => { + this.addFailure((this.createFailure(occurrence.key.getStart(), occurrence.key.getWidth(), `Duplicate key ${occurrence.key.getText()} with different message value.`))); }); } }); @@ -157,17 +157,17 @@ class NoUnexternalizedStringsRuleWalker extends Lint.RuleWalker { private recordKey(keyNode: ts.StringLiteral, messageNode: ts.Node) { let text = keyNode.getText(); - let occurences: KeyMessagePair[] = this.usedKeys[text]; - if (!occurences) { - occurences = []; - this.usedKeys[text] = occurences; + let occurrences: KeyMessagePair[] = this.usedKeys[text]; + if (!occurrences) { + occurrences = []; + this.usedKeys[text] = occurrences; } if (messageNode) { - if (occurences.some(pair => pair.message ? pair.message.getText() === messageNode.getText() : false)) { + if (occurrences.some(pair => pair.message ? pair.message.getText() === messageNode.getText() : false)) { return; } } - occurences.push({ key: keyNode, message: messageNode }); + occurrences.push({ key: keyNode, message: messageNode }); } private findDescribingParent(node: ts.Node): { callInfo?: { callExpression: ts.CallExpression, argIndex: number }, ignoreUsage?: boolean; } { diff --git a/build/tfs/darwin/smoketest.sh b/build/tfs/darwin/smoketest.sh index 18da9dabf382b..60e1863f08d17 100755 --- a/build/tfs/darwin/smoketest.sh +++ b/build/tfs/darwin/smoketest.sh @@ -20,12 +20,6 @@ step "Install distro dependencies" \ step "Build minified & upload source maps" \ npm run gulp -- --max_old_space_size=4096 vscode-darwin-min -step "Run unit tests" \ - ./scripts/test.sh --build --reporter dot - -step "Run integration tests" \ - ./scripts/test-integration.sh - step "Run smoke test" \ pushd test/smoke npm install diff --git a/build/tfs/linux/build.sh b/build/tfs/linux/build.sh index 7e50e47c05d84..e6ba3dd80426e 100755 --- a/build/tfs/linux/build.sh +++ b/build/tfs/linux/build.sh @@ -32,84 +32,5 @@ step "Build minified" \ step "Run unit tests" \ ./scripts/test.sh --xvfb --build --reporter dot -step "Build Debian package" \ - npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-deb" - -step "Build RPM package" \ - npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-rpm" - -(cd $BUILD_SOURCESDIRECTORY/build/tfs/common && \ - step "Install build dependencies" \ - npm install --unsafe-perm) - -# Variables -PLATFORM_LINUX="linux-$ARCH" -PLATFORM_DEB="linux-deb-$ARCH" -PLATFORM_RPM="linux-rpm-$ARCH" -[[ "$ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64" -[[ "$ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64" -REPO="`pwd`" -ROOT="$REPO/.." -BUILDNAME="VSCode-$PLATFORM_LINUX" -BUILD="$ROOT/$BUILDNAME" -BUILD_VERSION="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/code-[a-z]*_//g' -e 's/\.deb$//g')" -[ -z "$VSCODE_QUALITY" ] && TARBALL_FILENAME="code-$BUILD_VERSION.tar.gz" || TARBALL_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.tar.gz" -TARBALL_PATH="$ROOT/$TARBALL_FILENAME" -PACKAGEJSON="$BUILD/resources/app/package.json" -VERSION=$(node -p "require(\"$PACKAGEJSON\").version") - -rm -rf $ROOT/code-*.tar.* -(cd $ROOT && \ - step "Create tar.gz archive" \ - tar -czvf $TARBALL_PATH $BUILDNAME) - -step "Publish tar.gz archive" \ - node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_LINUX archive-unsigned $TARBALL_FILENAME $VERSION true $TARBALL_PATH - -DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)" -DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME" - -step "Publish Debian package" \ - node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_DEB package $DEB_FILENAME $VERSION true $DEB_PATH - -RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)" -RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME" - -step "Publish RPM package" \ - node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_RPM package $RPM_FILENAME $VERSION true $RPM_PATH - -if [ -z "$VSCODE_QUALITY" ]; then - echo "VSCODE_QUALITY is not set, skipping repo package publish" -else - if [ "$BUILD_SOURCEBRANCH" = "master" ] || [ "$BUILD_SOURCEBRANCH" = "refs/heads/master" ]; then - if [[ $BUILD_QUEUEDBY = *"Project Collection Service Accounts"* || $BUILD_QUEUEDBY = *"Microsoft.VisualStudio.Services.TFS"* ]]; then - # Get necessary information - pushd $REPO && COMMIT_HASH=$(git rev-parse HEAD) && popd - PACKAGE_NAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/_.*//g')" - DEB_URL="https://az764295.vo.msecnd.net/$VSCODE_QUALITY/$COMMIT_HASH/$DEB_FILENAME" - RPM_URL="https://az764295.vo.msecnd.net/$VSCODE_QUALITY/$COMMIT_HASH/$RPM_FILENAME" - PACKAGE_VERSION="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/code-[a-z]*_//g' -e 's/\_.*$//g')" - # Write config files needed by API, use eval to force environment variable expansion - DIRNAME=$(dirname $(readlink -f $0)) - pushd $DIRNAME - # Submit to apt repo - if [ "$DEB_ARCH" = "amd64" ]; then - eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"username\": \"$LINUX_REPO_USERNAME\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > apt-config.json - eval echo '{ \"name\": \"$PACKAGE_NAME\", \"version\": \"$PACKAGE_VERSION\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"sourceUrl\": \"$DEB_URL\" }' > apt-addpkg.json - echo "Submitting apt-addpkg.json:" - cat apt-addpkg.json - - step "Publish to repositories" \ - ./repoapi_client.sh -config apt-config.json -addpkg apt-addpkg.json - fi - # Submit to yum repo (disabled as it's manual until signing is automated) - # eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"username\": \"$LINUX_REPO_USERNAME\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > yum-config.json - # eval echo '{ \"name\": \"$PACKAGE_NAME\", \"version\": \"$PACKAGE_VERSION\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"sourceUrl\": \"$RPM_URL\" }' > yum-addpkg.json - # echo "Submitting yum-addpkg.json:" - # cat yum-addpkg.json - # ./repoapi_client.sh -config yum-config.json -addpkg yum-addpkg.json - popd - echo "To check repo publish status run ./repoapi_client.sh -config config.json -check " - fi - fi -fi +step "Publish release" \ + ./build/tfs/linux/release.sh \ No newline at end of file diff --git a/build/tfs/linux/release.sh b/build/tfs/linux/release.sh new file mode 100755 index 0000000000000..40d68aee73fc1 --- /dev/null +++ b/build/tfs/linux/release.sh @@ -0,0 +1,86 @@ +#!/bin/bash + +. ./scripts/env.sh +. ./build/tfs/common/common.sh + +step "Build Debian package" \ + npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-deb" + +step "Build RPM package" \ + npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-build-rpm" + +(cd $BUILD_SOURCESDIRECTORY/build/tfs/common && \ + step "Install build dependencies" \ + npm install --unsafe-perm) + +# Variables +PLATFORM_LINUX="linux-$ARCH" +PLATFORM_DEB="linux-deb-$ARCH" +PLATFORM_RPM="linux-rpm-$ARCH" +[[ "$ARCH" == "ia32" ]] && DEB_ARCH="i386" || DEB_ARCH="amd64" +[[ "$ARCH" == "ia32" ]] && RPM_ARCH="i386" || RPM_ARCH="x86_64" +REPO="`pwd`" +ROOT="$REPO/.." +BUILDNAME="VSCode-$PLATFORM_LINUX" +BUILD="$ROOT/$BUILDNAME" +BUILD_VERSION="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/code-[a-z]*_//g' -e 's/\.deb$//g')" +[ -z "$VSCODE_QUALITY" ] && TARBALL_FILENAME="code-$BUILD_VERSION.tar.gz" || TARBALL_FILENAME="code-$VSCODE_QUALITY-$BUILD_VERSION.tar.gz" +TARBALL_PATH="$ROOT/$TARBALL_FILENAME" +PACKAGEJSON="$BUILD/resources/app/package.json" +VERSION=$(node -p "require(\"$PACKAGEJSON\").version") + +rm -rf $ROOT/code-*.tar.* +(cd $ROOT && \ + step "Create tar.gz archive" \ + tar -czf $TARBALL_PATH $BUILDNAME) + +step "Publish tar.gz archive" \ + node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_LINUX archive-unsigned $TARBALL_FILENAME $VERSION true $TARBALL_PATH + +DEB_FILENAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/)" +DEB_PATH="$REPO/.build/linux/deb/$DEB_ARCH/deb/$DEB_FILENAME" + +step "Publish Debian package" \ + node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_DEB package $DEB_FILENAME $VERSION true $DEB_PATH + +RPM_FILENAME="$(ls $REPO/.build/linux/rpm/$RPM_ARCH/ | grep .rpm)" +RPM_PATH="$REPO/.build/linux/rpm/$RPM_ARCH/$RPM_FILENAME" + +step "Publish RPM package" \ + node build/tfs/common/publish.js $VSCODE_QUALITY $PLATFORM_RPM package $RPM_FILENAME $VERSION true $RPM_PATH + +if [ -z "$VSCODE_QUALITY" ]; then + echo "VSCODE_QUALITY is not set, skipping repo package publish" +else + if [ "$BUILD_SOURCEBRANCH" = "master" ] || [ "$BUILD_SOURCEBRANCH" = "refs/heads/master" ]; then + if [[ $BUILD_QUEUEDBY = *"Project Collection Service Accounts"* || $BUILD_QUEUEDBY = *"Microsoft.VisualStudio.Services.TFS"* ]]; then + # Get necessary information + pushd $REPO && COMMIT_HASH=$(git rev-parse HEAD) && popd + PACKAGE_NAME="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/_.*//g')" + DEB_URL="https://az764295.vo.msecnd.net/$VSCODE_QUALITY/$COMMIT_HASH/$DEB_FILENAME" + RPM_URL="https://az764295.vo.msecnd.net/$VSCODE_QUALITY/$COMMIT_HASH/$RPM_FILENAME" + PACKAGE_VERSION="$(ls $REPO/.build/linux/deb/$DEB_ARCH/deb/ | sed -e 's/code-[a-z]*_//g' -e 's/\_.*$//g')" + # Write config files needed by API, use eval to force environment variable expansion + DIRNAME=$(dirname $(readlink -f $0)) + pushd $DIRNAME + # Submit to apt repo + if [ "$DEB_ARCH" = "amd64" ]; then + eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"username\": \"$LINUX_REPO_USERNAME\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > apt-config.json + eval echo '{ \"name\": \"$PACKAGE_NAME\", \"version\": \"$PACKAGE_VERSION\", \"repositoryId\": \"58a4adf642421134a1a48d1a\", \"sourceUrl\": \"$DEB_URL\" }' > apt-addpkg.json + echo "Submitting apt-addpkg.json:" + cat apt-addpkg.json + + step "Publish to repositories" \ + ./repoapi_client.sh -config apt-config.json -addpkg apt-addpkg.json + fi + # Submit to yum repo (disabled as it's manual until signing is automated) + # eval echo '{ \"server\": \"azure-apt-cat.cloudapp.net\", \"protocol\": \"https\", \"port\": \"443\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"username\": \"$LINUX_REPO_USERNAME\", \"password\": \"$LINUX_REPO_PASSWORD\" }' > yum-config.json + # eval echo '{ \"name\": \"$PACKAGE_NAME\", \"version\": \"$PACKAGE_VERSION\", \"repositoryId\": \"58a4ae3542421134a1a48d1b\", \"sourceUrl\": \"$RPM_URL\" }' > yum-addpkg.json + # echo "Submitting yum-addpkg.json:" + # cat yum-addpkg.json + # ./repoapi_client.sh -config yum-config.json -addpkg yum-addpkg.json + popd + echo "To check repo publish status run ./repoapi_client.sh -config config.json -check " + fi + fi +fi diff --git a/build/tfs/linux/smoketest.sh b/build/tfs/linux/smoketest.sh new file mode 100644 index 0000000000000..33344082253fe --- /dev/null +++ b/build/tfs/linux/smoketest.sh @@ -0,0 +1,33 @@ +#!/bin/bash +set -e + +. ./scripts/env.sh +. ./build/tfs/common/common.sh + +export ARCH="$1" +export VSCODE_MIXIN_PASSWORD="$2" +VSO_PAT="$3" + +echo "machine monacotools.visualstudio.com password $VSO_PAT" > ~/.netrc + +step "Install dependencies" \ + npm install --arch=$ARCH --unsafe-perm + +step "Mix in repository from vscode-distro" \ + npm run gulp -- mixin + +step "Get Electron" \ + npm run gulp -- "electron-$ARCH" + +step "Install distro dependencies" \ + node build/tfs/common/installDistro.js --arch=$ARCH + +step "Build minified" \ + npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-min" + +step "Run smoke test" \ + pushd test/smoke + npm install + npm run compile + xvfb-run -a -s="-screen 0 1024x768x8" node src/main.js --latest "$AGENT_BUILDDIRECTORY/VSCode-linux-ia32/code-insiders" + popd \ No newline at end of file diff --git a/build/tfs/win32/smoketest.ps1 b/build/tfs/win32/smoketest.ps1 new file mode 100644 index 0000000000000..e7737a9f8955a --- /dev/null +++ b/build/tfs/win32/smoketest.ps1 @@ -0,0 +1,46 @@ +Param( + [string]$arch, + [string]$mixinPassword, + [string]$vsoPAT +) + +. .\scripts\env.ps1 +. .\build\tfs\win32\lib.ps1 + +# Create a _netrc file to download distro dependencies +# In order to get _netrc to work, we need a HOME variable setup +$env:HOME=$env:USERPROFILE +"machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII + +# Set the right architecture +$env:npm_config_arch="$arch" + +step "Install dependencies" { + exec { & npm install } +} + +$env:VSCODE_MIXIN_PASSWORD = $mixinPassword +step "Mix in repository from vscode-distro" { + exec { & npm run gulp -- mixin } +} + +step "Get Electron" { + exec { & npm run gulp -- "electron-$global:arch" } +} + +step "Install distro dependencies" { + exec { & node build\tfs\common\installDistro.js } +} + +step "Build minified" { + exec { & npm run gulp -- --max_old_space_size=4096 "vscode-win32-$global:arch-min" } +} + +step "Run smoke test" { + exec { & Push-Location test\smoke } + exec { & npm install; npm run compile } + exec { & node src/main.js --latest "$env:AGENT_BUILDDIRECTORY\VSCode-win32-$global:arch\Code - Insiders.exe" } + exec { & Pop-Location } +} + +done \ No newline at end of file diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index eed354dd8a4f1..127544276ab13 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -774,7 +774,7 @@ export class CommandCenter { return; } - await this.model.pull(true); + await this.model.pullWithRebase(); } @command('git.push') @@ -812,7 +812,7 @@ export class CommandCenter { return; } - this.model.push(pick.label, branchName); + this.model.pushTo(pick.label, branchName); } @command('git.sync') @@ -860,7 +860,7 @@ export class CommandCenter { return; } - await this.model.push(choice, branchName, { setUpstream: true }); + await this.model.pushTo(choice, branchName, true); } @command('git.showOutput') diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 9ef482def9318..ad023efdf6ea7 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -21,10 +21,6 @@ export interface IGit { version: string; } -export interface PushOptions { - setUpstream?: boolean; -} - export interface IFileStatus { x: string; y: string; @@ -762,10 +758,10 @@ export class Repository { } } - async push(remote?: string, name?: string, options?: PushOptions): Promise { + async push(remote?: string, name?: string, setUpstream: boolean = false): Promise { const args = ['push']; - if (options && options.setUpstream) { + if (setUpstream) { args.push('-u'); } diff --git a/extensions/git/src/model.ts b/extensions/git/src/model.ts index aba4a4251d621..4b2cf90035049 100644 --- a/extensions/git/src/model.ts +++ b/extensions/git/src/model.ts @@ -6,7 +6,7 @@ 'use strict'; import { Uri, Command, EventEmitter, Event, SourceControlResourceState, SourceControlResourceDecorations, Disposable, ProgressLocation, window, workspace } from 'vscode'; -import { Git, Repository, Ref, Branch, Remote, PushOptions, Commit, GitErrorCodes } from './git'; +import { Git, Repository, Ref, Branch, Remote, Commit, GitErrorCodes } from './git'; import { anyEvent, eventToPromise, filterEvent, EmptyDisposable, combinedDisposable, dispose } from './util'; import { memoize, throttle, debounce } from './decorators'; import * as path from 'path'; @@ -479,12 +479,23 @@ export class Model implements Disposable { } } - async pull(rebase?: boolean): Promise { - await this.run(Operation.Pull, () => this.repository.pull(rebase)); + @throttle + async pull(): Promise { + await this.run(Operation.Pull, () => this.repository.pull()); + } + + @throttle + async pullWithRebase(): Promise { + await this.run(Operation.Pull, () => this.repository.pull(true)); } - async push(remote?: string, name?: string, options?: PushOptions): Promise { - await this.run(Operation.Push, () => this.repository.push(remote, name, options)); + @throttle + async push(): Promise { + await this.run(Operation.Push, () => this.repository.push()); + } + + async pushTo(remote?: string, name?: string, setUpstream: boolean = false): Promise { + await this.run(Operation.Push, () => this.repository.push(remote, name, setUpstream)); } @throttle @@ -586,12 +597,13 @@ export class Model implements Disposable { const repositoryRoot = await this._git.getRepositoryRoot(this.workspaceRoot.fsPath); this.repository = this._git.open(repositoryRoot); - const onGitChange = filterEvent(this.onWorkspaceChange, uri => /\/\.git\//.test(uri.fsPath)); - const onRelevantGitChange = filterEvent(onGitChange, uri => !/\/\.git\/index\.lock$/.test(uri.fsPath)); + const onGitChange = filterEvent(this.onWorkspaceChange, uri => /\/\.git\//.test(uri.path)); + const onRelevantGitChange = filterEvent(onGitChange, uri => !/\/\.git\/index\.lock$/.test(uri.path)); + onRelevantGitChange(this.onFSChange, this, disposables); onRelevantGitChange(this._onDidChangeRepository.fire, this._onDidChangeRepository, disposables); - const onNonGitChange = filterEvent(this.onWorkspaceChange, uri => !/\/\.git\//.test(uri.fsPath)); + const onNonGitChange = filterEvent(this.onWorkspaceChange, uri => !/\/\.git\//.test(uri.path)); onNonGitChange(this.onFSChange, this, disposables); this.repositoryDisposable = combinedDisposable(disposables); diff --git a/extensions/json/server/npm-shrinkwrap.json b/extensions/json/server/npm-shrinkwrap.json index d199f7b2a0fb2..ae1d50bd68926 100644 --- a/extensions/json/server/npm-shrinkwrap.json +++ b/extensions/json/server/npm-shrinkwrap.json @@ -43,9 +43,9 @@ "resolved": "https://registry.npmjs.org/request-light/-/request-light-0.2.1.tgz" }, "vscode-json-languageservice": { - "version": "2.0.9", + "version": "2.0.10", "from": "vscode-json-languageservice@next", - "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-2.0.9.tgz" + "resolved": "https://registry.npmjs.org/vscode-json-languageservice/-/vscode-json-languageservice-2.0.10.tgz" }, "vscode-jsonrpc": { "version": "3.1.0-alpha.1", diff --git a/extensions/json/server/package.json b/extensions/json/server/package.json index 6c643c0f542db..2897fd255dbef 100644 --- a/extensions/json/server/package.json +++ b/extensions/json/server/package.json @@ -10,7 +10,7 @@ "dependencies": { "jsonc-parser": "^0.4.2", "request-light": "^0.2.1", - "vscode-json-languageservice": "^2.0.9", + "vscode-json-languageservice": "^2.0.10", "vscode-languageserver": "^3.1.0-alpha.1", "vscode-nls": "^2.0.2" }, diff --git a/extensions/markdown/package.json b/extensions/markdown/package.json index 15c27055fe0e2..cbcb63c5531a5 100644 --- a/extensions/markdown/package.json +++ b/extensions/markdown/package.json @@ -161,7 +161,7 @@ }, "markdown.preview.fontFamily": { "type": "string", - "default": "system-ui, 'Segoe WPC', 'Segoe UI', 'HelveticaNeue-Light', 'Ubuntu', 'Droid Sans', sans-serif", + "default": "-apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', 'HelveticaNeue-Light', 'Ubuntu', 'Droid Sans', sans-serif", "description": "%markdown.preview.fontFamily.desc%" }, "markdown.preview.fontSize": { diff --git a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json index 68aeef661f009..a0994a3ff9a66 100644 --- a/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json +++ b/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json @@ -191,7 +191,7 @@ }, { "name": "Class Variable", - "scope": "variable.other, variable.js, punctuation.separator.variable", + "scope": "variable.js, punctuation.separator.variable", "settings": { "fontStyle": "\n \t\t\t", "foreground": "#6089B4" @@ -229,14 +229,6 @@ "foreground": "#6089B4" } }, - { - "name": "Function Call", - "scope": "meta.function-call", - "settings": { - "fontStyle": "\n \t\t\t", - "foreground": "#0080FF" - } - }, { "name": "Function Object", "scope": "meta.function-call.object", @@ -245,14 +237,6 @@ "foreground": "#9872A2" } }, - { - "name": "Function Call Variable", - "scope": "variable.other.property", - "settings": { - "fontStyle": "\n \t\t\t", - "foreground": "#9872A2" - } - }, { "name": "Keyword Control", "scope": "keyword.control", @@ -550,6 +534,20 @@ "settings": { "foreground": "#b267e6" } + }, + { + "name": "this.self", + "scope": "variable.language", + "settings": { + "foreground": "#c7444a" + } + }, + { + "name": "this.self", + "scope": "variable.language", + "settings": { + "foreground": "#c7444a" + } } ] } \ No newline at end of file diff --git a/extensions/theme-monokai/themes/monokai-color-theme.json b/extensions/theme-monokai/themes/monokai-color-theme.json index 693494c71de9d..c8182750c5cc7 100644 --- a/extensions/theme-monokai/themes/monokai-color-theme.json +++ b/extensions/theme-monokai/themes/monokai-color-theme.json @@ -378,6 +378,13 @@ "settings": { "foreground": "#b267e6" } + }, + { + "name": "this.self", + "scope": "variable.language", + "settings": { + "foreground": "#FD971F" + } } ] } \ No newline at end of file diff --git a/extensions/typescript/src/features/bufferSyncSupport.ts b/extensions/typescript/src/features/bufferSyncSupport.ts index 05dbefb4a1a99..64c8eea9a4080 100644 --- a/extensions/typescript/src/features/bufferSyncSupport.ts +++ b/extensions/typescript/src/features/bufferSyncSupport.ts @@ -106,7 +106,7 @@ export default class BufferSyncSupport { private readonly disposables: Disposable[] = []; private readonly syncedBuffers: Map; - private pendingDiagnostics: { [key: string]: number; }; + private pendingDiagnostics = new Map(); private readonly diagnosticDelayer: Delayer; private checkGlobalTSCVersion: boolean; @@ -116,7 +116,6 @@ export default class BufferSyncSupport { this.diagnostics = diagnostics; this._validate = validate; - this.pendingDiagnostics = Object.create(null); this.diagnosticDelayer = new Delayer(300); this.syncedBuffers = new Map(); @@ -211,7 +210,7 @@ export default class BufferSyncSupport { return; } for (const filePath of this.syncedBuffers.keys()) { - this.pendingDiagnostics[filePath] = Date.now(); + this.pendingDiagnostics.set(filePath, Date.now()); } this.diagnosticDelayer.trigger(() => { this.sendPendingDiagnostics(); @@ -223,7 +222,7 @@ export default class BufferSyncSupport { return; } - this.pendingDiagnostics[file] = Date.now(); + this.pendingDiagnostics.set(file, Date.now()); const buffer = this.syncedBuffers.get(file); let delay = 300; if (buffer) { @@ -239,10 +238,10 @@ export default class BufferSyncSupport { if (!this._validate) { return; } - let files = Object.keys(this.pendingDiagnostics).map((key) => { + let files = Array.from(this.pendingDiagnostics.entries()).map(([key, value]) => { return { file: key, - time: this.pendingDiagnostics[key] + time: value }; }).sort((a, b) => { return a.time - b.time; @@ -252,7 +251,7 @@ export default class BufferSyncSupport { // Add all open TS buffers to the geterr request. They might be visible for (const file of this.syncedBuffers.keys()) { - if (!this.pendingDiagnostics[file]) { + if (!this.pendingDiagnostics.get(file)) { files.push(file); } } @@ -264,7 +263,7 @@ export default class BufferSyncSupport { }; this.client.execute('geterr', args, false); } - this.pendingDiagnostics = Object.create(null); + this.pendingDiagnostics.clear(); } private checkTSCVersion() { diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index a1d1223cab244..4705b55d2da57 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -442,7 +442,7 @@ "xterm": { "version": "2.7.0", "from": "Tyriar/xterm.js#vscode-release/1.14", - "resolved": "git+https://github.com/Tyriar/xterm.js.git#7d3640ad17fbf69f1a1c776b6d08969e1da32875" + "resolved": "git+https://github.com/Tyriar/xterm.js.git#e6fe120ecf93e552573be45867ae03c880319e11" }, "yauzl": { "version": "2.3.1", diff --git a/src/vs/base/browser/dom.ts b/src/vs/base/browser/dom.ts index 2915bcb44bb07..d0dfb1d885ced 100644 --- a/src/vs/base/browser/dom.ts +++ b/src/vs/base/browser/dom.ts @@ -1042,7 +1042,15 @@ export function domContentLoaded(): TPromise { }); } -export function hintGPULayer(target: HTMLElement): void { - // This is to hint browsers that this dom node is suited to live in its own layer (e.g. sliders, etc.) - (target.style).willChange = 'transform'; +/** + * Find a value usable for a dom node size such that the likelihood that it would be + * displayed with constant screen pixels size is as high as possible. + * + * e.g. We would desire for the cursors to be 2px (CSS px) wide. Under a devicePixelRatio + * of 1.25, the cursor will be 2.5 screen pixels wide. Depending on how the dom node aligns/"snaps" + * with the screen pixels, it will sometimes be rendered with 2 screen pixels, and sometimes with 3 screen pixels. + */ +export function computeScreenAwareSize(cssPx: number): number { + const screenPx = window.devicePixelRatio * cssPx; + return Math.max(1, Math.floor(screenPx)) / window.devicePixelRatio; } diff --git a/src/vs/base/browser/fastDomNode.ts b/src/vs/base/browser/fastDomNode.ts index edd726ec0a2e9..695b48141e761 100644 --- a/src/vs/base/browser/fastDomNode.ts +++ b/src/vs/base/browser/fastDomNode.ts @@ -6,7 +6,7 @@ import * as dom from 'vs/base/browser/dom'; -export abstract class FastDomNode { +export class FastDomNode { public readonly domNode: T; private _maxWidth: number; @@ -25,7 +25,7 @@ export abstract class FastDomNode { private _display: string; private _position: string; private _visibility: string; - private _transform: string; + private _layerHint: boolean; constructor(domNode: T) { this.domNode = domNode; @@ -45,7 +45,7 @@ export abstract class FastDomNode { this._display = ''; this._position = ''; this._visibility = ''; - this._transform = ''; + this._layerHint = false; } public setMaxWidth(maxWidth: number): void { @@ -215,16 +215,14 @@ export abstract class FastDomNode { this.domNode.style.visibility = this._visibility; } - public setTransform(transform: string): void { - if (this._transform === transform) { + public setLayerHinting(layerHint: boolean): void { + if (this._layerHint === layerHint) { return; } - this._transform = transform; - this._setTransform(this.domNode, this._transform); + this._layerHint = layerHint; + (this.domNode.style).willChange = this._layerHint ? 'transform' : 'auto'; } - protected abstract _setTransform(domNode: T, transform: string): void; - public setAttribute(name: string, value: string): void { this.domNode.setAttribute(name, value); } @@ -250,29 +248,6 @@ export abstract class FastDomNode { } } -class WebKitFastDomNode extends FastDomNode { - protected _setTransform(domNode: T, transform: string): void { - (domNode.style).webkitTransform = transform; - } -} - -class StandardFastDomNode extends FastDomNode { - protected _setTransform(domNode: T, transform: string): void { - domNode.style.transform = transform; - } -} - -let useWebKitFastDomNode = false; -(function () { - let testDomNode = document.createElement('div'); - if (typeof (testDomNode.style).webkitTransform !== 'undefined') { - useWebKitFastDomNode = true; - } -})(); export function createFastDomNode(domNode: T): FastDomNode { - if (useWebKitFastDomNode) { - return new WebKitFastDomNode(domNode); - } else { - return new StandardFastDomNode(domNode); - } + return new FastDomNode(domNode); } diff --git a/src/vs/base/browser/ui/list/listView.ts b/src/vs/base/browser/ui/list/listView.ts index 91d89a81e55e0..497bf624a0c26 100644 --- a/src/vs/base/browser/ui/list/listView.ts +++ b/src/vs/base/browser/ui/list/listView.ts @@ -81,7 +81,6 @@ export class ListView implements IDisposable { this.gesture = new Gesture(this.rowsContainer); this.scrollableElement = new ScrollableElement(this.rowsContainer, { - canUseTranslate3d: false, alwaysConsumeMouseWheel: true, horizontal: ScrollbarVisibility.Hidden, vertical: ScrollbarVisibility.Auto, diff --git a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts index 7a8743cb62a27..5d326d59eb4ce 100644 --- a/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/abstractScrollbar.ts @@ -32,7 +32,6 @@ export interface ScrollbarHost { } export interface AbstractScrollbarOptions { - canUseTranslate3d: boolean; lazyRender: boolean; host: ScrollbarHost; scrollbarState: ScrollbarState; @@ -43,7 +42,6 @@ export interface AbstractScrollbarOptions { export abstract class AbstractScrollbar extends Widget { - protected _canUseTranslate3d: boolean; protected _host: ScrollbarHost; protected _scrollable: Scrollable; private _lazyRender: boolean; @@ -58,7 +56,6 @@ export abstract class AbstractScrollbar extends Widget { constructor(opts: AbstractScrollbarOptions) { super(); - this._canUseTranslate3d = opts.canUseTranslate3d; this._lazyRender = opts.lazyRender; this._host = opts.host; this._scrollable = opts.scrollable; @@ -98,6 +95,7 @@ export abstract class AbstractScrollbar extends Widget { this.slider.setLeft(left); this.slider.setWidth(width); this.slider.setHeight(height); + this.slider.setLayerHinting(true); this.domNode.domNode.appendChild(this.slider.domNode); @@ -111,11 +109,6 @@ export abstract class AbstractScrollbar extends Widget { // ----------------- Update state - public setCanUseTranslate3d(canUseTranslate3d: boolean): boolean { - this._canUseTranslate3d = canUseTranslate3d; - return true; - } - protected _onElementSize(visibleSize: number): boolean { if (this._scrollbarState.setVisibleSize(visibleSize)) { this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()); @@ -165,14 +158,6 @@ export abstract class AbstractScrollbar extends Widget { } this._shouldRender = false; - if (this._canUseTranslate3d) { - // Put the scrollbar in its own layer - this.domNode.setTransform('translate3d(0px, 0px, 0px)'); - } else { - this.domNode.setTransform(''); - DomUtils.hintGPULayer(this.domNode.domNode); - } - this._renderDomNode(this._scrollbarState.getRectangleLargeSize(), this._scrollbarState.getRectangleSmallSize()); this._updateSlider(this._scrollbarState.getSliderSize(), this._scrollbarState.getArrowSize() + this._scrollbarState.getSliderPosition()); } diff --git a/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts b/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts index 8e7e678f46fc1..f6da6af6bc36c 100644 --- a/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/horizontalScrollbar.ts @@ -16,7 +16,6 @@ export class HorizontalScrollbar extends AbstractScrollbar { constructor(scrollable: Scrollable, options: ScrollableElementResolvedOptions, host: ScrollbarHost) { super({ - canUseTranslate3d: options.canUseTranslate3d, lazyRender: options.lazyRender, host: host, scrollbarState: new ScrollbarState( @@ -61,13 +60,7 @@ export class HorizontalScrollbar extends AbstractScrollbar { protected _updateSlider(sliderSize: number, sliderPosition: number): void { this.slider.setWidth(sliderSize); - if (this._canUseTranslate3d) { - this.slider.setTransform('translate3d(' + sliderPosition + 'px, 0px, 0px)'); - this.slider.setLeft(0); - } else { - this.slider.setTransform(''); - this.slider.setLeft(sliderPosition); - } + this.slider.setLeft(sliderPosition); } protected _renderDomNode(largeSize: number, smallSize: number): void { diff --git a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts index c07026b7f72de..7bb7da0f01e48 100644 --- a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts +++ b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts @@ -6,7 +6,6 @@ import 'vs/css!./media/scrollbars'; -import * as Browser from 'vs/base/browser/browser'; import * as DomUtils from 'vs/base/browser/dom'; import * as Platform from 'vs/base/common/platform'; import { StandardMouseWheelEvent, IMouseEvent } from 'vs/base/browser/mouseEvent'; @@ -188,9 +187,6 @@ export class ScrollableElement extends Widget { this._options.mouseWheelScrollSensitivity = massagedOptions.mouseWheelScrollSensitivity; this._setListeningToMouseWheel(this._options.handleMouseWheel); - this._shouldRender = this._horizontalScrollbar.setCanUseTranslate3d(massagedOptions.canUseTranslate3d) || this._shouldRender; - this._shouldRender = this._verticalScrollbar.setCanUseTranslate3d(massagedOptions.canUseTranslate3d) || this._shouldRender; - if (!this._options.lazyRender) { this._render(); } @@ -409,7 +405,6 @@ export class DomScrollableElement extends ScrollableElement { function resolveOptions(opts: ScrollableElementCreationOptions): ScrollableElementResolvedOptions { let result: ScrollableElementResolvedOptions = { - canUseTranslate3d: opts.canUseTranslate3d && Browser.supportsTranslate3d, lazyRender: (typeof opts.lazyRender !== 'undefined' ? opts.lazyRender : false), className: (typeof opts.className !== 'undefined' ? opts.className : ''), useShadows: (typeof opts.useShadows !== 'undefined' ? opts.useShadows : true), diff --git a/src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts b/src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts index 032e637d5b51e..5485e4eb84b5a 100644 --- a/src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts +++ b/src/vs/base/browser/ui/scrollbar/scrollableElementOptions.ts @@ -7,10 +7,6 @@ import { ScrollbarVisibility } from 'vs/base/common/scrollable'; export interface ScrollableElementCreationOptions { - /** - * Allow scrollbar rendering to use translate3d. - */ - canUseTranslate3d: boolean; /** * The scrollable element should not do any DOM mutations until renderNow() is called. * Defaults to false. @@ -105,13 +101,11 @@ export interface ScrollableElementCreationOptions { } export interface ScrollableElementChangeOptions { - canUseTranslate3d: boolean; handleMouseWheel?: boolean; mouseWheelScrollSensitivity?: number; } export interface ScrollableElementResolvedOptions { - canUseTranslate3d: boolean; lazyRender: boolean; className: string; useShadows: boolean; diff --git a/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts b/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts index ce33b4164b414..94a6130d90e4d 100644 --- a/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts +++ b/src/vs/base/browser/ui/scrollbar/verticalScrollbar.ts @@ -16,7 +16,6 @@ export class VerticalScrollbar extends AbstractScrollbar { constructor(scrollable: Scrollable, options: ScrollableElementResolvedOptions, host: ScrollbarHost) { super({ - canUseTranslate3d: options.canUseTranslate3d, lazyRender: options.lazyRender, host: host, scrollbarState: new ScrollbarState( @@ -66,13 +65,7 @@ export class VerticalScrollbar extends AbstractScrollbar { protected _updateSlider(sliderSize: number, sliderPosition: number): void { this.slider.setHeight(sliderSize); - if (this._canUseTranslate3d) { - this.slider.setTransform('translate3d(0px, ' + sliderPosition + 'px, 0px)'); - this.slider.setTop(0); - } else { - this.slider.setTransform(''); - this.slider.setTop(sliderPosition); - } + this.slider.setTop(sliderPosition); } protected _renderDomNode(largeSize: number, smallSize: number): void { diff --git a/src/vs/base/common/errorMessage.ts b/src/vs/base/common/errorMessage.ts index 9f5ed7fda90d0..3c882cba2299c 100644 --- a/src/vs/base/common/errorMessage.ts +++ b/src/vs/base/common/errorMessage.ts @@ -165,7 +165,7 @@ function detectSystemErrorMessage(exception: any): string { // See https://nodejs.org/api/errors.html#errors_class_system_error if (typeof exception.code === 'string' && typeof exception.errno === 'number' && typeof exception.syscall === 'string') { - return nls.localize('nodeExceptionMessage', "A system error occured ({0})", exception.message); + return nls.localize('nodeExceptionMessage', "A system error occurred ({0})", exception.message); } return exception.message; diff --git a/src/vs/base/common/marked/OSSREADME.json b/src/vs/base/common/marked/OSSREADME.json index 5fc985980a476..5bfc34a583baa 100644 --- a/src/vs/base/common/marked/OSSREADME.json +++ b/src/vs/base/common/marked/OSSREADME.json @@ -3,6 +3,6 @@ [{ "name": "chjj-marked", "repositoryURL": "https://github.com/npmcomponent/chjj-marked", - "version": "0.3.2", + "version": "0.3.6", "license": "MIT" }] diff --git a/src/vs/base/common/marked/raw.marked.js b/src/vs/base/common/marked/raw.marked.js index ce02369727acb..0ee6a3b1e6a60 100644 --- a/src/vs/base/common/marked/raw.marked.js +++ b/src/vs/base/common/marked/raw.marked.js @@ -1,4 +1,3 @@ - /** * marked - a markdown parser * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed) @@ -78,8 +77,9 @@ block.normal = merge({}, block); */ block.gfm = merge({}, block.normal, { - fences: /^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/, - paragraph: /^/ + fences: /^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/, + paragraph: /^/, + heading: /^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/ }); block.gfm.paragraph = replace(block.paragraph) @@ -191,7 +191,7 @@ Lexer.prototype.token = function(src, top, bq) { this.tokens.push({ type: 'code', lang: cap[2], - text: cap[3] + text: cap[3] || '' }); continue; } @@ -362,7 +362,8 @@ Lexer.prototype.token = function(src, top, bq) { type: this.options.sanitize ? 'paragraph' : 'html', - pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style', + pre: !this.options.sanitizer + && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'), text: cap[0] }); continue; @@ -457,7 +458,7 @@ var inline = { reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/, nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/, strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/, - em: /^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/, + em: /^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/, code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/, br: /^ {2,}\n(?!\s*$)/, del: noop, @@ -609,8 +610,10 @@ InlineLexer.prototype.output = function(src) { } src = src.substring(cap[0].length); out += this.options.sanitize - ? escape(cap[0]) - : cap[0]; + ? this.options.sanitizer + ? this.options.sanitizer(cap[0]) + : escape(cap[0]) + : cap[0] continue; } @@ -681,7 +684,7 @@ InlineLexer.prototype.output = function(src) { // text if (cap = this.rules.text.exec(src)) { src = src.substring(cap[0].length); - out += escape(this.smartypants(cap[0])); + out += this.renderer.text(escape(this.smartypants(cap[0]))); continue; } @@ -710,24 +713,24 @@ InlineLexer.prototype.outputLink = function(cap, link) { /** * Smartypants Transformations */ -// TODO MonacoChange: Our build fails over the following lines if they are not commented out + InlineLexer.prototype.smartypants = function(text) { - return text; -// if (!this.options.smartypants) return text; -// return text -// // em-dashes -// .replace(/--/g, '\u2014') -// // opening singles -// .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') -// // closing singles & apostrophes -// .replace(/'/g, '\u2019') -// // opening doubles -// .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') -// // closing doubles -// .replace(/"/g, '\u201d') -// // ellipses -// .replace(/\.{3}/g, '\u2026'); -// END MonacoChange + if (!this.options.smartypants) return text; + return text + // em-dashes + .replace(/---/g, '\u2014') + // en-dashes + .replace(/--/g, '\u2013') + // opening singles + .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018') + // closing singles & apostrophes + .replace(/'/g, '\u2019') + // opening doubles + .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c') + // closing doubles + .replace(/"/g, '\u201d') + // ellipses + .replace(/\.{3}/g, '\u2026'); }; /** @@ -735,6 +738,7 @@ InlineLexer.prototype.smartypants = function(text) { */ InlineLexer.prototype.mangle = function(text) { + if (!this.options.mangle) return text; var out = '' , l = text.length , i = 0 @@ -873,7 +877,7 @@ Renderer.prototype.link = function(href, title, text) { } catch (e) { return ''; } - if (prot.indexOf('javascript:') === 0) { + if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) { return ''; } } @@ -894,6 +898,10 @@ Renderer.prototype.image = function(href, title, text) { return out; }; +Renderer.prototype.text = function(text) { + return text; +}; + /** * Parsing & Compiling */ @@ -1088,7 +1096,8 @@ function escape(html, encode) { } function unescape(html) { - return html.replace(/&([#\w]+);/g, function(_, n) { + // explicitly match decimal, hex, and named HTML entities + return html.replace(/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/g, function(_, n) { n = n.toLowerCase(); if (n === 'colon') return ':'; if (n.charAt(0) === '#') { @@ -1213,7 +1222,7 @@ function marked(src, opt, callback) { } catch (e) { e.message += '\nPlease report this to https://github.com/chjj/marked.'; if ((opt || marked.defaults).silent) { - return '

      An error occured:

      '
      +      return '

      An error occurred:

      '
               + escape(e.message + '', true)
               + '
      '; } @@ -1237,6 +1246,8 @@ marked.defaults = { breaks: false, pedantic: false, sanitize: false, + sanitizer: null, + mangle: true, smartLists: false, silent: false, highlight: null, diff --git a/src/vs/base/parts/tree/browser/treeView.ts b/src/vs/base/parts/tree/browser/treeView.ts index fbbef901f5458..b424249e1eb6c 100644 --- a/src/vs/base/parts/tree/browser/treeView.ts +++ b/src/vs/base/parts/tree/browser/treeView.ts @@ -460,7 +460,6 @@ export class TreeView extends HeightMap { this.wrapper = document.createElement('div'); this.wrapper.className = 'monaco-tree-wrapper'; this.scrollableElement = new ScrollableElement(this.wrapper, { - canUseTranslate3d: false, alwaysConsumeMouseWheel: true, horizontal: ScrollbarVisibility.Hidden, vertical: (typeof context.options.verticalScrollMode !== 'undefined' ? context.options.verticalScrollMode : ScrollbarVisibility.Auto), diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index 8effa87307f18..a9adcc1e33ae3 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -121,7 +121,7 @@ export class CodeApplication { }); const isValidWebviewSource = (source: string) => - !source || (source.toLowerCase() as any).startsWith(URI.file(this.environmentService.appRoot.toLowerCase()).toString()); + !source || (URI.parse(source.toLowerCase()).toString() as any).startsWith(URI.file(this.environmentService.appRoot.toLowerCase()).toString()); app.on('web-contents-created', (event, contents) => { contents.on('will-attach-webview', (event, webPreferences, params) => { diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index a2193ec6244f8..8679eabeeefb6 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -263,6 +263,11 @@ export class CodeMenu { const helpMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mHelp', comment: ['&& denotes a mnemonic'] }, "&&Help")), submenu: helpMenu, role: 'help' }); this.setHelpMenu(helpMenu); + // Tasks + const taskMenu = new Menu(); + const taskMenuItem = new MenuItem({ label: this.mnemonicLabel(nls.localize({ key: 'mTask', comment: ['&& denotes a mnemonic'] }, "&&Tasks")), submenu: taskMenu }); + this.setTaskMenu(taskMenu); + // Menu Structure if (macApplicationMenuItem) { menubar.append(macApplicationMenuItem); @@ -274,6 +279,7 @@ export class CodeMenu { menubar.append(viewMenuItem); menubar.append(gotoMenuItem); menubar.append(debugMenuItem); + menubar.append(taskMenuItem); if (macWindowMenuItem) { menubar.append(macWindowMenuItem); @@ -586,7 +592,6 @@ export class CodeMenu { const output = this.createMenuItem(nls.localize({ key: 'miToggleOutput', comment: ['&& denotes a mnemonic'] }, "&&Output"), 'workbench.action.output.toggleOutput'); const debugConsole = this.createMenuItem(nls.localize({ key: 'miToggleDebugConsole', comment: ['&& denotes a mnemonic'] }, "De&&bug Console"), 'workbench.debug.action.toggleRepl'); const integratedTerminal = this.createMenuItem(nls.localize({ key: 'miToggleIntegratedTerminal', comment: ['&& denotes a mnemonic'] }, "&&Integrated Terminal"), 'workbench.action.terminal.toggleTerminal'); - const taskMenu = this.createMenuItem(nls.localize({ key: 'miShowTask', comment: ['&& denotes a mnemonic'] }, "Show Tas&&ks..."), 'workbench.action.showTasks'); const problems = this.createMenuItem(nls.localize({ key: 'miMarker', comment: ['&& denotes a mnemonic'] }, "&&Problems"), 'workbench.actions.view.problems'); let additionalViewlets: Electron.MenuItem; @@ -658,7 +663,6 @@ export class CodeMenu { problems, debugConsole, integratedTerminal, - taskMenu, __separator__(), fullscreen, toggleZenMode, @@ -901,6 +905,24 @@ export class CodeMenu { } } + private setTaskMenu(taskMenu: Electron.Menu): void { + const runTask = this.createMenuItem(nls.localize({ key: 'miRunTask', comment: ['&& denotes a mnemonic'] }, "&&Run Task..."), 'workbench.action.tasks.runTask'); + const restartTask = this.createMenuItem(nls.localize({ key: 'miRestartTask', comment: ['&& denotes a mnemonic'] }, "R&&estart Task"), 'workbench.action.tasks.restartTask'); + const terminateTask = this.createMenuItem(nls.localize({ key: 'miTerminateTask', comment: ['&& denotes a mnemonic'] }, "&&Terminate Task"), 'workbench.action.tasks.terminate'); + const buildTask = this.createMenuItem(nls.localize({ key: 'miBuildTask', comment: ['&& denotes a mnemonic'] }, "&&Build Task"), 'workbench.action.tasks.build'); + const testTask = this.createMenuItem(nls.localize({ key: 'miTestTask', comment: ['&& denotes a mnemonic'] }, "Test T&&ask"), 'workbench.action.tasks.test'); + const showTaskLog = this.createMenuItem(nls.localize({ key: 'miShowTaskLog', comment: ['&& denotes a mnemonic'] }, "&&Show Task Log"), 'workbench.action.tasks.showLog'); + + [ + showTaskLog, + runTask, + restartTask, + terminateTask, + buildTask, + testTask + ].forEach(item => taskMenu.append(item)); + } + private openAccessibilityOptions(): void { let win = new BrowserWindow({ alwaysOnTop: true, diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts index 960faa7b1e624..0a7787b49260b 100644 --- a/src/vs/editor/browser/config/configuration.ts +++ b/src/vs/editor/browser/config/configuration.ts @@ -351,7 +351,6 @@ export class Configuration extends CommonEditorConfiguration { extraEditorClassName: this._getExtraEditorClassName(), outerWidth: this._elementSizeObserver.getWidth(), outerHeight: this._elementSizeObserver.getHeight(), - canUseTranslate3d: browser.canUseTranslate3d(), emptySelectionClipboard: browser.isWebKit, pixelRatio: browser.getPixelRatio(), zoomLevel: browser.getZoomLevel(), diff --git a/src/vs/editor/browser/controller/mouseHandler.ts b/src/vs/editor/browser/controller/mouseHandler.ts index cc44acdd62d3f..60ff6e4d650c5 100644 --- a/src/vs/editor/browser/controller/mouseHandler.ts +++ b/src/vs/editor/browser/controller/mouseHandler.ts @@ -185,7 +185,7 @@ export class MouseHandler extends ViewEventHandler { } let actualMouseMoveTime = e.timestamp; if (actualMouseMoveTime < this.lastMouseLeaveTime) { - // Due to throttling, this event occured before the mouse left the editor, therefore ignore it. + // Due to throttling, this event occurred before the mouse left the editor, therefore ignore it. return; } diff --git a/src/vs/editor/browser/services/codeEditorServiceImpl.ts b/src/vs/editor/browser/services/codeEditorServiceImpl.ts index eaf57c98d5dea..f36e32b73fa3c 100644 --- a/src/vs/editor/browser/services/codeEditorServiceImpl.ts +++ b/src/vs/editor/browser/services/codeEditorServiceImpl.ts @@ -344,9 +344,7 @@ class DecorationCSSRules { } let cssTextArr: string[] = []; this.collectCSSText(opts, ['backgroundColor'], cssTextArr); - if (this.collectCSSText(opts, ['outline', 'outlineColor'], cssTextArr)) { - this.collectCSSText(opts, ['outlineStyle', 'outlineWidth'], cssTextArr); - } + this.collectCSSText(opts, ['outline', 'outlineColor', 'outlineStyle', 'outlineWidth'], cssTextArr); this.collectBorderSettingsCSSText(opts, cssTextArr); return cssTextArr.join(''); } @@ -418,8 +416,7 @@ class DecorationCSSRules { } private collectBorderSettingsCSSText(opts: any, cssTextArr: string[]): boolean { - if (this.collectCSSText(opts, ['border', 'borderColor'], cssTextArr)) { - this.collectCSSText(opts, ['borderRadius', 'borderSpacing', 'borderStyle', 'borderWidth'], cssTextArr); + if (this.collectCSSText(opts, ['border', 'borderColor', 'borderRadius', 'borderSpacing', 'borderStyle', 'borderWidth'], cssTextArr)) { cssTextArr.push(strings.format('box-sizing: border-box;')); return true; } @@ -444,7 +441,7 @@ class DecorationCSSRules { if (color) { return color.toString(); } - return void 0; + return 'transparent'; } return value; } diff --git a/src/vs/editor/browser/standalone/media/standalone-tokens.css b/src/vs/editor/browser/standalone/media/standalone-tokens.css index de07f233940b1..b815c5e181c48 100644 --- a/src/vs/editor/browser/standalone/media/standalone-tokens.css +++ b/src/vs/editor/browser/standalone/media/standalone-tokens.css @@ -6,7 +6,7 @@ /* Default standalone editor font */ .monaco-editor { - font-family: system-ui, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; + font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; } .monaco-menu .monaco-action-bar.vertical .action-item .action-label:focus { diff --git a/src/vs/editor/browser/standalone/simpleServices.ts b/src/vs/editor/browser/standalone/simpleServices.ts index c063ec34f7bbe..a177a093718ad 100644 --- a/src/vs/editor/browser/standalone/simpleServices.ts +++ b/src/vs/editor/browser/standalone/simpleServices.ts @@ -37,6 +37,7 @@ import { ResolvedKeybinding, Keybinding, createKeybinding, SimpleKeybinding } fr import { ResolvedKeybindingItem } from 'vs/platform/keybinding/common/resolvedKeybindingItem'; import { OS } from 'vs/base/common/platform'; import { IRange } from 'vs/editor/common/core/range'; +import { generateUuid } from "vs/base/common/uuid"; export class SimpleEditor implements IEditor { @@ -499,9 +500,11 @@ export class SimpleWorkspaceContextService implements IWorkspaceContextService { public readonly onDidChangeWorkspaceRoots: Event = this._onDidChangeWorkspaceRoots.event; private readonly folders: URI[]; + private readonly id: string; constructor(private workspace?: Workspace) { this.folders = workspace ? [workspace.resource] : []; + this.id = generateUuid(); } public getFolders(): URI[] { @@ -513,7 +516,7 @@ export class SimpleWorkspaceContextService implements IWorkspaceContextService { } public getWorkspace2(): IWorkspace2 { - return this.workspace ? { id: `${this.workspace.uid}`, roots: [this.workspace.resource] } : void 0; + return this.workspace ? { id: `${this.id}`, roots: [this.workspace.resource], name: this.workspace.resource.fsPath } : void 0; } public hasWorkspace(): boolean { diff --git a/src/vs/editor/browser/standalone/standaloneLanguages.ts b/src/vs/editor/browser/standalone/standaloneLanguages.ts index 0750a1db0a9db..654a43b5f0e0c 100644 --- a/src/vs/editor/browser/standalone/standaloneLanguages.ts +++ b/src/vs/editor/browser/standalone/standaloneLanguages.ts @@ -290,7 +290,7 @@ export function registerDocumentSymbolProvider(languageId: string, provider: mod } /** - * Register a document highlight provider (used by e.g. highlight occurences). + * Register a document highlight provider (used by e.g. highlight occurrences). */ export function registerDocumentHighlightProvider(languageId: string, provider: modes.DocumentHighlightProvider): IDisposable { return modes.DocumentHighlightProviderRegistry.register(languageId, provider); diff --git a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts index a90d8f52d03a1..8ceb2845eb333 100644 --- a/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts +++ b/src/vs/editor/browser/viewParts/editorScrollbar/editorScrollbar.ts @@ -34,7 +34,6 @@ export class EditorScrollbar extends ViewPart { const configScrollbarOpts = editor.viewInfo.scrollbar; let scrollbarOptions: ScrollableElementCreationOptions = { - canUseTranslate3d: editor.canUseTranslate3d, listenOnDomNode: viewDomNode.domNode, className: 'editor-scrollable' + ' ' + getThemeTypeSelector(context.theme.type), useShadows: false, @@ -127,10 +126,9 @@ export class EditorScrollbar extends ViewPart { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - if (e.viewInfo || e.canUseTranslate3d) { + if (e.viewInfo) { const editor = this._context.configuration.editor; let newOpts: ScrollableElementChangeOptions = { - canUseTranslate3d: editor.canUseTranslate3d, handleMouseWheel: editor.viewInfo.scrollbar.handleMouseWheel, mouseWheelScrollSensitivity: editor.viewInfo.scrollbar.mouseWheelScrollSensitivity }; diff --git a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.css b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.css index 7cd5f89fd9f0c..45992137d1820 100644 --- a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.css +++ b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.css @@ -9,5 +9,4 @@ */ .monaco-editor .lines-content .cigr { position: absolute; - width: 1px; } diff --git a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts index 5b3a301abc036..caa4f1449a889 100644 --- a/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts +++ b/src/vs/editor/browser/viewParts/indentGuides/indentGuides.ts @@ -12,6 +12,7 @@ import { RenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorIndentGuides } from 'vs/editor/common/view/editorColorRegistry'; +import * as dom from 'vs/base/browser/dom'; export class IndentGuidesOverlay extends DynamicViewOverlay { @@ -85,6 +86,7 @@ export class IndentGuidesOverlay extends DynamicViewOverlay { const tabSize = this._context.model.getTabSize(); const tabWidth = tabSize * this._spaceWidth; const lineHeight = this._lineHeight; + const indentGuideWidth = dom.computeScreenAwareSize(1); let output: string[] = []; for (let lineNumber = visibleStartLineNumber; lineNumber <= visibleEndLineNumber; lineNumber++) { @@ -94,7 +96,7 @@ export class IndentGuidesOverlay extends DynamicViewOverlay { let result = ''; let left = 0; for (let i = 0; i < indent; i++) { - result += `
      `; + result += `
      `; left += tabWidth; } diff --git a/src/vs/editor/browser/viewParts/lines/viewLines.ts b/src/vs/editor/browser/viewParts/lines/viewLines.ts index 462a4e5160d19..6998bc6a8ea0d 100644 --- a/src/vs/editor/browser/viewParts/lines/viewLines.ts +++ b/src/vs/editor/browser/viewParts/lines/viewLines.ts @@ -52,7 +52,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, private _typicalHalfwidthCharacterWidth: number; private _isViewportWrapping: boolean; private _revealHorizontalRightPadding: number; - private _canUseTranslate3d: boolean; + private _canUseLayerHinting: boolean; private _viewLineOptions: ViewLineOptions; // --- width @@ -75,7 +75,7 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, this._typicalHalfwidthCharacterWidth = conf.editor.fontInfo.typicalHalfwidthCharacterWidth; this._isViewportWrapping = conf.editor.wrappingInfo.isViewportWrapping; this._revealHorizontalRightPadding = conf.editor.viewInfo.revealHorizontalRightPadding; - this._canUseTranslate3d = conf.editor.canUseTranslate3d; + this._canUseLayerHinting = conf.editor.canUseLayerHinting; this._viewLineOptions = new ViewLineOptions(conf); PartFingerprints.write(this.domNode, PartFingerprint.ViewLines); @@ -132,8 +132,8 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, if (e.viewInfo) { this._revealHorizontalRightPadding = conf.editor.viewInfo.revealHorizontalRightPadding; } - if (e.canUseTranslate3d) { - this._canUseTranslate3d = conf.editor.canUseTranslate3d; + if (e.canUseLayerHinting) { + this._canUseLayerHinting = conf.editor.canUseLayerHinting; } if (e.fontInfo) { Configuration.applyFontInfo(this.domNode, conf.editor.fontInfo); @@ -443,17 +443,10 @@ export class ViewLines extends ViewPart implements IVisibleLinesHost, } // (3) handle scrolling + this._linesContent.setLayerHinting(this._canUseLayerHinting); const adjustedScrollTop = this._context.viewLayout.getScrollTop() - viewportData.bigNumbersDelta; - if (this._canUseTranslate3d) { - let transform = 'translate3d(' + -this._context.viewLayout.getScrollLeft() + 'px, ' + -adjustedScrollTop + 'px, 0px)'; - this._linesContent.setTransform(transform); - this._linesContent.setTop(0); - this._linesContent.setLeft(0); - } else { - this._linesContent.setTransform(''); - this._linesContent.setTop(-adjustedScrollTop); - this._linesContent.setLeft(-this._context.viewLayout.getScrollLeft()); - } + this._linesContent.setTop(-adjustedScrollTop); + this._linesContent.setLeft(-this._context.viewLayout.getScrollLeft()); // Update max line width (not so important, it is just so the horizontal scrollbar doesn't get too small) this._asyncUpdateLineWidths.schedule(); diff --git a/src/vs/editor/browser/viewParts/margin/margin.ts b/src/vs/editor/browser/viewParts/margin/margin.ts index 35fcf1563b937..bd3fc8b97a67e 100644 --- a/src/vs/editor/browser/viewParts/margin/margin.ts +++ b/src/vs/editor/browser/viewParts/margin/margin.ts @@ -16,7 +16,7 @@ export class Margin extends ViewPart { public static CLASS_NAME = 'glyph-margin'; private _domNode: FastDomNode; - private _canUseTranslate3d: boolean; + private _canUseLayerHinting: boolean; private _contentLeft: number; private _glyphMarginLeft: number; private _glyphMarginWidth: number; @@ -24,7 +24,7 @@ export class Margin extends ViewPart { constructor(context: ViewContext) { super(context); - this._canUseTranslate3d = this._context.configuration.editor.canUseTranslate3d; + this._canUseLayerHinting = this._context.configuration.editor.canUseLayerHinting; this._contentLeft = this._context.configuration.editor.layoutInfo.contentLeft; this._glyphMarginLeft = this._context.configuration.editor.layoutInfo.glyphMarginLeft; this._glyphMarginWidth = this._context.configuration.editor.layoutInfo.glyphMarginWidth; @@ -57,8 +57,8 @@ export class Margin extends ViewPart { // --- begin event handlers public onConfigurationChanged(e: viewEvents.ViewConfigurationChangedEvent): boolean { - if (e.canUseTranslate3d) { - this._canUseTranslate3d = this._context.configuration.editor.canUseTranslate3d; + if (e.canUseLayerHinting) { + this._canUseLayerHinting = this._context.configuration.editor.canUseLayerHinting; } if (e.layoutInfo) { @@ -80,15 +80,9 @@ export class Margin extends ViewPart { } public render(ctx: RestrictedRenderingContext): void { + this._domNode.setLayerHinting(this._canUseLayerHinting); const adjustedScrollTop = ctx.scrollTop - ctx.bigNumbersDelta; - if (this._canUseTranslate3d) { - let transform = 'translate3d(0px, ' + -adjustedScrollTop + 'px, 0px)'; - this._domNode.setTransform(transform); - this._domNode.setTop(0); - } else { - this._domNode.setTransform(''); - this._domNode.setTop(-adjustedScrollTop); - } + this._domNode.setTop(-adjustedScrollTop); let height = Math.min(ctx.scrollHeight, 1000000); this._domNode.setHeight(height); diff --git a/src/vs/editor/browser/viewParts/minimap/minimap.ts b/src/vs/editor/browser/viewParts/minimap/minimap.ts index 70cb44e1523cb..98609ffbbcd9c 100644 --- a/src/vs/editor/browser/viewParts/minimap/minimap.ts +++ b/src/vs/editor/browser/viewParts/minimap/minimap.ts @@ -413,7 +413,7 @@ export class Minimap extends ViewPart { this._slider = createFastDomNode(document.createElement('div')); this._slider.setPosition('absolute'); this._slider.setClassName('minimap-slider'); - dom.hintGPULayer(this._slider.domNode); + this._slider.setLayerHinting(true); this._domNode.appendChild(this._slider); this._tokensColorTracker = MinimapTokensColorTracker.getInstance(); diff --git a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts index 46c6d71d94139..3c4f0a6c3ab65 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts @@ -46,7 +46,6 @@ export class DecorationsOverviewRuler extends ViewPart { 'decorationsOverviewRuler', this._context.viewLayout.getScrollHeight(), this._context.configuration.editor.lineHeight, - this._context.configuration.editor.canUseTranslate3d, this._context.configuration.editor.pixelRatio, DecorationsOverviewRuler.MIN_DECORATION_HEIGHT, DecorationsOverviewRuler.MAX_DECORATION_HEIGHT, @@ -101,10 +100,6 @@ export class DecorationsOverviewRuler extends ViewPart { this._overviewRuler.setLineHeight(this._context.configuration.editor.lineHeight, false); } - if (e.canUseTranslate3d) { - this._overviewRuler.setCanUseTranslate3d(this._context.configuration.editor.canUseTranslate3d, false); - } - if (e.pixelRatio) { this._overviewRuler.setPixelRatio(this._context.configuration.editor.pixelRatio, false); } diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts index 65c793de87657..bb2b4ee58cea8 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts @@ -25,7 +25,6 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { cssClassName, this._context.viewLayout.getScrollHeight(), this._context.configuration.editor.lineHeight, - this._context.configuration.editor.canUseTranslate3d, this._context.configuration.editor.pixelRatio, minimumHeight, maximumHeight, @@ -48,10 +47,6 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler { this._overviewRuler.setLineHeight(this._context.configuration.editor.lineHeight, true); } - if (e.canUseTranslate3d) { - this._overviewRuler.setCanUseTranslate3d(this._context.configuration.editor.canUseTranslate3d, true); - } - if (e.pixelRatio) { this._overviewRuler.setPixelRatio(this._context.configuration.editor.pixelRatio, true); } diff --git a/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts b/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts index 617a850a1d711..2e6a03a39d836 100644 --- a/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts +++ b/src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts @@ -17,12 +17,11 @@ export class OverviewRulerImpl { private _domNode: FastDomNode; private _lanesCount: number; private _zoneManager: OverviewZoneManager; - private _canUseTranslate3d: boolean; private _background: Color; constructor( canvasLeftOffset: number, cssClassName: string, scrollHeight: number, lineHeight: number, - canUseTranslate3d: boolean, pixelRatio: number, minimumHeight: number, maximumHeight: number, + pixelRatio: number, minimumHeight: number, maximumHeight: number, getVerticalOffsetForLine: (lineNumber: number) => number ) { this._canvasLeftOffset = canvasLeftOffset; @@ -31,10 +30,10 @@ export class OverviewRulerImpl { this._domNode.setClassName(cssClassName); this._domNode.setPosition('absolute'); + this._domNode.setLayerHinting(true); this._lanesCount = 3; - this._canUseTranslate3d = canUseTranslate3d; this._background = null; this._zoneManager = new OverviewZoneManager(getVerticalOffsetForLine); @@ -127,13 +126,6 @@ export class OverviewRulerImpl { } } - public setCanUseTranslate3d(canUseTranslate3d: boolean, render: boolean): void { - this._canUseTranslate3d = canUseTranslate3d; - if (render) { - this.render(true); - } - } - public setPixelRatio(pixelRatio: number, render: boolean): void { this._zoneManager.setPixelRatio(pixelRatio); this._domNode.setWidth(this._zoneManager.getDOMWidth()); @@ -156,11 +148,6 @@ export class OverviewRulerImpl { if (this._zoneManager.getOuterHeight() === 0) { return false; } - if (this._canUseTranslate3d) { - this._domNode.setTransform('translate3d(0px, 0px, 0px)'); - } else { - this._domNode.setTransform(''); - } const width = this._zoneManager.getCanvasWidth(); const height = this._zoneManager.getCanvasHeight(); diff --git a/src/vs/editor/browser/viewParts/rulers/rulers.css b/src/vs/editor/browser/viewParts/rulers/rulers.css index 3012d205f67d2..d3d2d26ec95a3 100644 --- a/src/vs/editor/browser/viewParts/rulers/rulers.css +++ b/src/vs/editor/browser/viewParts/rulers/rulers.css @@ -5,6 +5,5 @@ .monaco-editor .view-ruler { position: absolute; - width: 1px; top: 0; } \ No newline at end of file diff --git a/src/vs/editor/browser/viewParts/rulers/rulers.ts b/src/vs/editor/browser/viewParts/rulers/rulers.ts index 852eb07fb2c6a..6a5e95b0b8cd0 100644 --- a/src/vs/editor/browser/viewParts/rulers/rulers.ts +++ b/src/vs/editor/browser/viewParts/rulers/rulers.ts @@ -13,6 +13,7 @@ import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/v import * as viewEvents from 'vs/editor/common/view/viewEvents'; import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { editorRuler } from 'vs/editor/common/view/editorColorRegistry'; +import * as dom from 'vs/base/browser/dom'; export class Rulers extends ViewPart { @@ -69,11 +70,12 @@ export class Rulers extends ViewPart { } if (currentCount < desiredCount) { - // Add more rulers + const rulerWidth = dom.computeScreenAwareSize(1); let addCount = desiredCount - currentCount; while (addCount > 0) { let node = createFastDomNode(document.createElement('div')); node.setClassName('view-ruler'); + node.setWidth(rulerWidth); this.domNode.appendChild(node); this._renderedRulers.push(node); addCount--; diff --git a/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts b/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts index babe35b4178ae..5288f92d7ea0c 100644 --- a/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts +++ b/src/vs/editor/browser/viewParts/viewCursors/viewCursor.ts @@ -12,6 +12,7 @@ import { Configuration } from 'vs/editor/browser/config/configuration'; import { ViewContext } from 'vs/editor/common/view/viewContext'; import { RenderingContext, RestrictedRenderingContext } from 'vs/editor/common/view/renderingContext'; import * as viewEvents from 'vs/editor/common/view/viewEvents'; +import * as dom from 'vs/base/browser/dom'; export interface IViewCursorRenderData { domNode: HTMLElement; @@ -137,9 +138,9 @@ export class ViewCursor { } let width: number; if (this._cursorStyle === TextEditorCursorStyle.Line) { - width = 2; + width = dom.computeScreenAwareSize(2); } else { - width = 1; + width = dom.computeScreenAwareSize(1); } const top = ctx.getVerticalOffsetForLineNumber(this._position.lineNumber) - ctx.bigNumbersDelta; return new ViewCursorRenderData(top, visibleRange.left, width, ''); diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 553a17222995f..9dc377162fd62 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -55,7 +55,6 @@ export interface IEnvConfiguration { extraEditorClassName: string; outerWidth: number; outerHeight: number; - canUseTranslate3d: boolean; emptySelectionClipboard: boolean; pixelRatio: number; zoomLevel: number; @@ -125,7 +124,6 @@ export abstract class CommonEditorConfiguration extends Disposable implements ed extraEditorClassName: partialEnv.extraEditorClassName, isDominatedByLongLines: this._isDominatedByLongLines, lineNumbersDigitCount: this._lineNumbersDigitCount, - canUseTranslate3d: partialEnv.canUseTranslate3d, emptySelectionClipboard: partialEnv.emptySelectionClipboard, pixelRatio: partialEnv.pixelRatio, tabFocusMode: TabFocus.getTabFocusMode(), diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 82e3f1994b6d1..9835b48bc22a5 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -246,10 +246,11 @@ export interface IEditorOptions { */ fontLigatures?: boolean; /** - * Disable the use of `translate3d`. + * Disable the use of `will-change` for the editor margin and lines layers. + * The usage of `will-change` acts as a hint for browsers to create an extra layer. * Defaults to false. */ - disableTranslate3d?: boolean; + disableLayerHinting?: boolean; /** * Disable the optimizations for monospace fonts. * Defaults to false. @@ -792,7 +793,7 @@ export interface IValidatedEditorOptions { readonly lineDecorationsWidth: number | string; readonly readOnly: boolean; readonly mouseStyle: 'text' | 'default' | 'copy'; - readonly disableTranslate3d: boolean; + readonly disableLayerHinting: boolean; readonly automaticLayout: boolean; readonly wordWrap: 'off' | 'on' | 'wordWrapColumn' | 'bounded'; readonly wordWrapColumn: number; @@ -818,7 +819,7 @@ export interface IValidatedEditorOptions { export class InternalEditorOptions { readonly _internalEditorOptionsBrand: void; - readonly canUseTranslate3d: boolean; + readonly canUseLayerHinting: boolean; readonly pixelRatio: number; readonly editorClassName: string; readonly lineHeight: number; @@ -848,7 +849,7 @@ export class InternalEditorOptions { * @internal */ constructor(source: { - canUseTranslate3d: boolean; + canUseLayerHinting: boolean; pixelRatio: number; editorClassName: string; lineHeight: number; @@ -867,7 +868,7 @@ export class InternalEditorOptions { wrappingInfo: EditorWrappingInfo; contribInfo: EditorContribOptions; }) { - this.canUseTranslate3d = source.canUseTranslate3d; + this.canUseLayerHinting = source.canUseLayerHinting; this.pixelRatio = source.pixelRatio; this.editorClassName = source.editorClassName; this.lineHeight = source.lineHeight | 0; @@ -892,7 +893,7 @@ export class InternalEditorOptions { */ public equals(other: InternalEditorOptions): boolean { return ( - this.canUseTranslate3d === other.canUseTranslate3d + this.canUseLayerHinting === other.canUseLayerHinting && this.pixelRatio === other.pixelRatio && this.editorClassName === other.editorClassName && this.lineHeight === other.lineHeight @@ -918,7 +919,7 @@ export class InternalEditorOptions { */ public createChangeEvent(newOpts: InternalEditorOptions): IConfigurationChangedEvent { return { - canUseTranslate3d: (this.canUseTranslate3d !== newOpts.canUseTranslate3d), + canUseLayerHinting: (this.canUseLayerHinting !== newOpts.canUseLayerHinting), pixelRatio: (this.pixelRatio !== newOpts.pixelRatio), editorClassName: (this.editorClassName !== newOpts.editorClassName), lineHeight: (this.lineHeight !== newOpts.lineHeight), @@ -1258,7 +1259,7 @@ export interface EditorLayoutInfo { * An event describing that the configuration of the editor has changed. */ export interface IConfigurationChangedEvent { - readonly canUseTranslate3d: boolean; + readonly canUseLayerHinting: boolean; readonly pixelRatio: boolean; readonly editorClassName: boolean; readonly lineHeight: boolean; @@ -1288,7 +1289,6 @@ export interface IEnvironmentalOptions { readonly extraEditorClassName: string; readonly isDominatedByLongLines: boolean; readonly lineNumbersDigitCount: number; - readonly canUseTranslate3d: boolean; readonly emptySelectionClipboard: boolean; readonly pixelRatio: number; readonly tabFocusMode: boolean; @@ -1435,7 +1435,7 @@ export class EditorOptionsValidator { lineDecorationsWidth: (typeof opts.lineDecorationsWidth === 'undefined' ? defaults.lineDecorationsWidth : opts.lineDecorationsWidth), readOnly: _boolean(opts.readOnly, defaults.readOnly), mouseStyle: _stringSet<'text' | 'default' | 'copy'>(opts.mouseStyle, defaults.mouseStyle, ['text', 'default', 'copy']), - disableTranslate3d: _boolean(opts.disableTranslate3d, defaults.disableTranslate3d), + disableLayerHinting: _boolean(opts.disableLayerHinting, defaults.disableLayerHinting), automaticLayout: _boolean(opts.automaticLayout, defaults.automaticLayout), wordWrap: wordWrap, wordWrapColumn: _clampedInt(opts.wordWrapColumn, defaults.wordWrapColumn, 1, Constants.MAX_SAFE_SMALL_INTEGER), @@ -1660,7 +1660,7 @@ export class InternalEditorOptionsFactory { lineDecorationsWidth: opts.lineDecorationsWidth, readOnly: opts.readOnly, mouseStyle: opts.mouseStyle, - disableTranslate3d: opts.disableTranslate3d, + disableLayerHinting: opts.disableLayerHinting, automaticLayout: opts.automaticLayout, wordWrap: opts.wordWrap, wordWrapColumn: opts.wordWrapColumn, @@ -1867,7 +1867,7 @@ export class InternalEditorOptionsFactory { } return new InternalEditorOptions({ - canUseTranslate3d: opts.disableTranslate3d ? false : env.canUseTranslate3d, + canUseLayerHinting: opts.disableLayerHinting ? false : true, pixelRatio: env.pixelRatio, editorClassName: className, lineHeight: env.fontInfo.lineHeight, @@ -2079,7 +2079,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { lineDecorationsWidth: 10, readOnly: false, mouseStyle: 'text', - disableTranslate3d: false, + disableLayerHinting: false, automaticLayout: false, wordWrap: 'off', wordWrapColumn: 80, diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index 6abac0a543e8a..7793fe670ce2c 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -239,7 +239,7 @@ export class TypeOperations { const selection = selections[i]; if (!selection.isEmpty()) { // looks like https://github.com/Microsoft/vscode/issues/2773 - // where a cursor operation occured before a canceled composition + // where a cursor operation occurred before a canceled composition // => ignore composition commands[i] = null; continue; diff --git a/src/vs/editor/common/view/viewEvents.ts b/src/vs/editor/common/view/viewEvents.ts index 72fc6b41fbe18..b4a6e4bbf28df 100644 --- a/src/vs/editor/common/view/viewEvents.ts +++ b/src/vs/editor/common/view/viewEvents.ts @@ -33,7 +33,7 @@ export class ViewConfigurationChangedEvent { public readonly type = ViewEventType.ViewConfigurationChanged; - public readonly canUseTranslate3d: boolean; + public readonly canUseLayerHinting: boolean; public readonly pixelRatio: boolean; public readonly editorClassName: boolean; public readonly lineHeight: boolean; @@ -46,7 +46,7 @@ export class ViewConfigurationChangedEvent { public readonly wrappingInfo: boolean; constructor(source: IConfigurationChangedEvent) { - this.canUseTranslate3d = source.canUseTranslate3d; + this.canUseLayerHinting = source.canUseLayerHinting; this.pixelRatio = source.pixelRatio; this.editorClassName = source.editorClassName; this.lineHeight = source.lineHeight; diff --git a/src/vs/editor/contrib/find/common/findController.ts b/src/vs/editor/contrib/find/common/findController.ts index a5dae70a8dcdf..b1195ab30f407 100644 --- a/src/vs/editor/contrib/find/common/findController.ts +++ b/src/vs/editor/contrib/find/common/findController.ts @@ -862,7 +862,7 @@ export class SelectHighlightsAction extends AbstractSelectHighlightsAction { constructor() { super({ id: 'editor.action.selectHighlights', - label: nls.localize('selectAllOccurencesOfFindMatch', "Select All Occurrences of Find Match"), + label: nls.localize('selectAllOccurrencesOfFindMatch', "Select All Occurrences of Find Match"), alias: 'Select All Occurrences of Find Match', precondition: null, kbOpts: { @@ -1005,10 +1005,10 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd return null; } - const hasFindOccurences = DocumentHighlightProviderRegistry.has(model); + const hasFindOccurrences = DocumentHighlightProviderRegistry.has(model); if (r.currentMatch) { // This is an empty selection - if (hasFindOccurences) { + if (hasFindOccurrences) { // Do not interfere with semantic word highlighting in the no selection case return null; } @@ -1070,7 +1070,7 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd } const model = this.editor.getModel(); - const hasFindOccurences = DocumentHighlightProviderRegistry.has(model); + const hasFindOccurrences = DocumentHighlightProviderRegistry.has(model); let allMatches = model.findMatches(this.state.searchText, true, false, this.state.matchCase, this.state.wordSeparators, false).map(m => m.range); allMatches.sort(Range.compareRangesUsingStarts); @@ -1108,7 +1108,7 @@ export class SelectionHighlighter extends Disposable implements editorCommon.IEd return { range: r, // Show in overviewRuler only if model has no semantic highlighting - options: (hasFindOccurences ? SelectionHighlighter._SELECTION_HIGHLIGHT : SelectionHighlighter._SELECTION_HIGHLIGHT_OVERVIEW) + options: (hasFindOccurrences ? SelectionHighlighter._SELECTION_HIGHLIGHT : SelectionHighlighter._SELECTION_HIGHLIGHT_OVERVIEW) }; }); diff --git a/src/vs/editor/contrib/find/test/common/findController.test.ts b/src/vs/editor/contrib/find/test/common/findController.test.ts index aa2fb4de23db8..20559f5713bb1 100644 --- a/src/vs/editor/contrib/find/test/common/findController.test.ts +++ b/src/vs/editor/contrib/find/test/common/findController.test.ts @@ -215,7 +215,7 @@ suite('FindController', () => { }); }); - test('issue #5400: "Select All Occurences of Find Match" does not select all if find uses regex', () => { + test('issue #5400: "Select All Occurrences of Find Match" does not select all if find uses regex', () => { withMockCodeEditor([ 'something', 'someething', diff --git a/src/vs/editor/contrib/hover/browser/hoverWidgets.ts b/src/vs/editor/contrib/hover/browser/hoverWidgets.ts index bc42fb4935aa2..eacdbf64f4e91 100644 --- a/src/vs/editor/contrib/hover/browser/hoverWidgets.ts +++ b/src/vs/editor/contrib/hover/browser/hoverWidgets.ts @@ -51,7 +51,7 @@ export class ContentHoverWidget extends Widget implements editorBrowser.IContent this._domNode = document.createElement('div'); this._domNode.className = 'monaco-editor-hover-content'; - this.scrollbar = new DomScrollableElement(this._domNode, { canUseTranslate3d: false }); + this.scrollbar = new DomScrollableElement(this._domNode, {}); this.disposables.push(this.scrollbar); this._containerDomNode.appendChild(this.scrollbar.getDomNode()); diff --git a/src/vs/editor/contrib/links/browser/links.ts b/src/vs/editor/contrib/links/browser/links.ts index 7b566b860beab..e3ab8e404c8e3 100644 --- a/src/vs/editor/contrib/links/browser/links.ts +++ b/src/vs/editor/contrib/links/browser/links.ts @@ -58,7 +58,7 @@ const decoration = { }), }; -class LinkOccurence { +class LinkOccurrence { public static decoration(link: Link, useMetaKey: boolean): editorCommon.IModelDeltaDecoration { return { @@ -68,7 +68,7 @@ class LinkOccurence { endLineNumber: link.range.endLineNumber, endColumn: link.range.endColumn }, - options: LinkOccurence._getOptions(useMetaKey, false) + options: LinkOccurrence._getOptions(useMetaKey, false) }; } @@ -88,11 +88,11 @@ class LinkOccurence { } public activate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor, useMetaKey: boolean): void { - changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(useMetaKey, true)); + changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurrence._getOptions(useMetaKey, true)); } public deactivate(changeAccessor: editorCommon.IModelDecorationsChangeAccessor, useMetaKey: boolean): void { - changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurence._getOptions(useMetaKey, false)); + changeAccessor.changeDecorationOptions(this.decorationId, LinkOccurrence._getOptions(useMetaKey, false)); } } @@ -116,7 +116,7 @@ class LinkDetector implements editorCommon.IEditorContribution { private openerService: IOpenerService; private messageService: IMessageService; private editorWorkerService: IEditorWorkerService; - private currentOccurences: { [decorationId: string]: LinkOccurence; }; + private currentOccurrences: { [decorationId: string]: LinkOccurrence; }; constructor( editor: ICodeEditor, @@ -167,7 +167,7 @@ class LinkDetector implements editorCommon.IEditorContribution { this.timeoutPromise = null; this.computePromise = null; - this.currentOccurences = {}; + this.currentOccurrences = {}; this.activeLinkDecorationId = null; this.beginCompute(); } @@ -181,7 +181,7 @@ class LinkDetector implements editorCommon.IEditorContribution { } private onModelChanged(): void { - this.currentOccurences = {}; + this.currentOccurrences = {}; this.activeLinkDecorationId = null; this.stop(); this.beginCompute(); @@ -221,10 +221,10 @@ class LinkDetector implements editorCommon.IEditorContribution { const useMetaKey = (this.editor.getConfiguration().multiCursorModifier === 'altKey'); this.editor.changeDecorations((changeAccessor: editorCommon.IModelDecorationsChangeAccessor) => { var oldDecorations: string[] = []; - let keys = Object.keys(this.currentOccurences); + let keys = Object.keys(this.currentOccurrences); for (let i = 0, len = keys.length; i < len; i++) { let decorationId = keys[i]; - let occurance = this.currentOccurences[decorationId]; + let occurance = this.currentOccurrences[decorationId]; oldDecorations.push(occurance.decorationId); } @@ -232,17 +232,17 @@ class LinkDetector implements editorCommon.IEditorContribution { if (links) { // Not sure why this is sometimes null for (var i = 0; i < links.length; i++) { - newDecorations.push(LinkOccurence.decoration(links[i], useMetaKey)); + newDecorations.push(LinkOccurrence.decoration(links[i], useMetaKey)); } } var decorations = changeAccessor.deltaDecorations(oldDecorations, newDecorations); - this.currentOccurences = {}; + this.currentOccurrences = {}; this.activeLinkDecorationId = null; for (let i = 0, len = decorations.length; i < len; i++) { - var occurance = new LinkOccurence(links[i], decorations[i]); - this.currentOccurences[occurance.decorationId] = occurance; + var occurance = new LinkOccurrence(links[i], decorations[i]); + this.currentOccurrences[occurance.decorationId] = occurance; } }); } @@ -251,11 +251,11 @@ class LinkDetector implements editorCommon.IEditorContribution { const useMetaKey = (this.editor.getConfiguration().multiCursorModifier === 'altKey'); if (this.isEnabled(mouseEvent, withKey)) { this.cleanUpActiveLinkDecoration(); // always remove previous link decoration as their can only be one - var occurence = this.getLinkOccurence(mouseEvent.target.position); - if (occurence) { + var occurrence = this.getLinkOccurrence(mouseEvent.target.position); + if (occurrence) { this.editor.changeDecorations((changeAccessor) => { - occurence.activate(changeAccessor, useMetaKey); - this.activeLinkDecorationId = occurence.decorationId; + occurrence.activate(changeAccessor, useMetaKey); + this.activeLinkDecorationId = occurrence.decorationId; }); } } else { @@ -266,10 +266,10 @@ class LinkDetector implements editorCommon.IEditorContribution { private cleanUpActiveLinkDecoration(): void { const useMetaKey = (this.editor.getConfiguration().multiCursorModifier === 'altKey'); if (this.activeLinkDecorationId) { - var occurence = this.currentOccurences[this.activeLinkDecorationId]; - if (occurence) { + var occurrence = this.currentOccurrences[this.activeLinkDecorationId]; + if (occurrence) { this.editor.changeDecorations((changeAccessor) => { - occurence.deactivate(changeAccessor, useMetaKey); + occurrence.deactivate(changeAccessor, useMetaKey); }); } @@ -281,20 +281,20 @@ class LinkDetector implements editorCommon.IEditorContribution { if (!this.isEnabled(mouseEvent)) { return; } - var occurence = this.getLinkOccurence(mouseEvent.target.position); - if (!occurence) { + var occurrence = this.getLinkOccurrence(mouseEvent.target.position); + if (!occurrence) { return; } - this.openLinkOccurence(occurence, mouseEvent.hasSideBySideModifier); + this.openLinkOccurrence(occurrence, mouseEvent.hasSideBySideModifier); } - public openLinkOccurence(occurence: LinkOccurence, openToSide: boolean): void { + public openLinkOccurrence(occurrence: LinkOccurrence, openToSide: boolean): void { if (!this.openerService) { return; } - const { link } = occurence; + const { link } = occurrence; link.resolve().then(uri => { // open the uri @@ -312,7 +312,7 @@ class LinkDetector implements editorCommon.IEditorContribution { }).done(null, onUnexpectedError); } - public getLinkOccurence(position: Position): LinkOccurence { + public getLinkOccurrence(position: Position): LinkOccurrence { var decorations = this.editor.getModel().getDecorationsInRange({ startLineNumber: position.lineNumber, startColumn: position.column, @@ -322,9 +322,9 @@ class LinkDetector implements editorCommon.IEditorContribution { for (var i = 0; i < decorations.length; i++) { var decoration = decorations[i]; - var currentOccurence = this.currentOccurences[decoration.id]; - if (currentOccurence) { - return currentOccurence; + var currentOccurrence = this.currentOccurrences[decoration.id]; + if (currentOccurrence) { + return currentOccurrence; } } @@ -373,9 +373,9 @@ class OpenLinkAction extends EditorAction { return; } - let link = linkDetector.getLinkOccurence(editor.getPosition()); + let link = linkDetector.getLinkOccurrence(editor.getPosition()); if (link) { - linkDetector.openLinkOccurence(link, false); + linkDetector.openLinkOccurrence(link, false); } } } diff --git a/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts b/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts index a9fec25edf6c1..7c4e88e035efa 100644 --- a/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts +++ b/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts @@ -221,7 +221,7 @@ export class ParameterHintsWidget implements IContentWidget, IDisposable { this.overloads = dom.append(wrapper, $('.overloads')); const body = $('.body'); - this.scrollbar = new DomScrollableElement(body, { canUseTranslate3d: false }); + this.scrollbar = new DomScrollableElement(body, {}); this.disposables.push(this.scrollbar); wrapper.appendChild(this.scrollbar.getDomNode()); diff --git a/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts b/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts index 6249277425f0f..805cdb2bddc4b 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.ts @@ -5,7 +5,6 @@ 'use strict'; import * as nls from 'vs/nls'; -import { alert } from 'vs/base/browser/ui/aria/aria'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -85,11 +84,7 @@ export class ReferenceAction extends EditorAction { } let range = editor.getSelection(); let model = editor.getModel(); - let references = provideReferences(model, range.getStartPosition()).then(references => { - const model = new ReferencesModel(references); - alert(model.getAriaMessage()); - return model; - }); + let references = provideReferences(model, range.getStartPosition()).then(references => new ReferencesModel(references)); controller.toggleWidget(range, references, defaultReferenceSearchOptions); } } diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesModel.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesModel.ts index 4ddacbe921633..06821595584e1 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesModel.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesModel.ts @@ -66,7 +66,7 @@ export class OneReference { public getAriaMessage(): string { return localize( 'aria.oneReference', "symbol in {0} on line {1} at column {2}", - this.uri.fsPath, this.range.startLineNumber, this.range.startColumn + basename(this.uri.fsPath), this.range.startLineNumber, this.range.startColumn ); } } @@ -154,9 +154,9 @@ export class FileReferences implements IDisposable { getAriaMessage(): string { const len = this.children.length; if (len === 1) { - return localize('aria.fileReferences.1', "1 symbol in {0}", this.uri.fsPath); + return localize('aria.fileReferences.1', "1 symbol in {0}, full path {1}", basename(this.uri.fsPath), this.uri.fsPath); } else { - return localize('aria.fileReferences.N', "{0} symbols in {1}", len, this.uri.fsPath); + return localize('aria.fileReferences.N', "{0} symbols in {1}, full path {2}", len, basename(this.uri.fsPath), this.uri.fsPath); } } diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index a0603d8f948b2..955ce894d6026 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -6,7 +6,6 @@ import 'vs/css!./referencesWidget'; import * as nls from 'vs/nls'; -import { alert } from 'vs/base/browser/ui/aria/aria'; import { onUnexpectedError } from 'vs/base/common/errors'; import { getPathLabel } from 'vs/base/common/labels'; import Event, { Emitter } from 'vs/base/common/event'; @@ -589,7 +588,7 @@ export class ReferenceWidget extends PeekViewWidget { private _instantiationService: IInstantiationService, private _environmentService: IEnvironmentService ) { - super(editor, { showFrame: false, showArrow: true, isResizeable: true }); + super(editor, { showFrame: false, showArrow: true, isResizeable: true, isAccessible: true }); this._applyTheme(_themeService.getTheme()); this._callOnDispose.push(_themeService.onThemeChange(this._applyTheme.bind(this))); @@ -690,8 +689,7 @@ export class ReferenceWidget extends PeekViewWidget { dataSource: this._instantiationService.createInstance(DataSource), renderer: this._instantiationService.createInstance(Renderer, this.editor), controller: new Controller(), - // TODO@{Joh,Ben} make this work with the embedded tree - // accessibilityProvider: new AriaProvider() + accessibilityProvider: new AriaProvider() }; var options = { @@ -763,17 +761,6 @@ export class ReferenceWidget extends PeekViewWidget { // listen on model changes this._disposeOnNewModel.push(this._model.onDidChangeReferenceRange(reference => this._tree.refresh(reference))); - // listen on selection and focus - this._disposeOnNewModel.push(this._tree.addListener(Controller.Events.FOCUSED, (element) => { - if (element instanceof OneReference) { - this._revealReference(element); - this._onDidSelectReference.fire({ element, kind: 'show', source: 'tree' }); - } - if (element instanceof OneReference || element instanceof FileReferences) { - const msg = element.getAriaMessage(); - alert(msg); - } - })); this._disposeOnNewModel.push(this._tree.addListener(Controller.Events.SELECTED, (element: any) => { if (element instanceof OneReference) { this._onDidSelectReference.fire({ element, kind: 'goto', source: 'tree' }); diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index a3154f2a23dae..5ab85e8bf03a9 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -213,7 +213,7 @@ class SuggestionDetails { this.body = $('.body'); - this.scrollbar = new DomScrollableElement(this.body, { canUseTranslate3d: false }); + this.scrollbar = new DomScrollableElement(this.body, {}); append(this.el, this.scrollbar.getDomNode()); this.disposables.push(this.scrollbar); diff --git a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts index 0aa87cb728251..52b6d50d1511c 100644 --- a/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts +++ b/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.ts @@ -188,8 +188,8 @@ class WordHighlighter { } // All the effort below is trying to achieve this: - // - when cursor is moved to a word, trigger immediately a findOccurences request - // - 250ms later after the last cursor move event, render the occurences + // - when cursor is moved to a word, trigger immediately a findOccurrences request + // - 250ms later after the last cursor move event, render the occurrences // - no flickering! var currentWordRange = new Range(lineNumber, word.startColumn, lineNumber, word.endColumn); diff --git a/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts b/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts index 97a76078bba10..45e8d7a3e5697 100644 --- a/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts +++ b/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.ts @@ -169,6 +169,7 @@ export abstract class PeekViewWidget extends ZoneWidget implements IPeekViewServ public setTitle(primaryHeading: string, secondaryHeading?: string): void { $(this._primaryHeading).safeInnerHtml(primaryHeading); + this._primaryHeading.setAttribute('aria-label', primaryHeading); if (secondaryHeading) { $(this._secondaryHeading).safeInnerHtml(secondaryHeading); } else { @@ -212,4 +213,4 @@ export abstract class PeekViewWidget extends ZoneWidget implements IPeekViewServ protected _doLayoutBody(heightInPixel: number, widthInPixel: number): void { this._bodyElement.style.height = strings.format('{0}px', heightInPixel); } -} \ No newline at end of file +} diff --git a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts index d68266803a77a..00132c93923ac 100644 --- a/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts +++ b/src/vs/editor/test/browser/services/decorationRenderOptions.test.ts @@ -67,7 +67,7 @@ suite('Decoration Render Options', () => { var s = new CodeEditorServiceImpl(themeService, styleSheet); s.registerDecorationType('example', options); var sheet = readStyleSheet(styleSheet); - assert.equal(sheet, '.monaco-editor .ced-example-0 { background-color: rgb(255, 0, 0); }'); + assert.equal(sheet, '.monaco-editor .ced-example-0 { background-color: rgb(255, 0, 0); border-color: transparent; box-sizing: border-box; }'); colors = { editorBackground: '#EE0000', diff --git a/src/vs/editor/test/common/config/commonEditorConfig.test.ts b/src/vs/editor/test/common/config/commonEditorConfig.test.ts index 2e2f47b16aab6..4d5da6aec320a 100644 --- a/src/vs/editor/test/common/config/commonEditorConfig.test.ts +++ b/src/vs/editor/test/common/config/commonEditorConfig.test.ts @@ -59,7 +59,6 @@ suite('Common Editor Config', () => { extraEditorClassName: '', outerWidth: 1000, outerHeight: 100, - canUseTranslate3d: true, emptySelectionClipboard: true, pixelRatio: 1, zoomLevel: 0, diff --git a/src/vs/editor/test/common/mocks/testConfiguration.ts b/src/vs/editor/test/common/mocks/testConfiguration.ts index a8778a6f05503..b94830a845649 100644 --- a/src/vs/editor/test/common/mocks/testConfiguration.ts +++ b/src/vs/editor/test/common/mocks/testConfiguration.ts @@ -21,7 +21,6 @@ export class TestConfiguration extends CommonEditorConfiguration { extraEditorClassName: '', outerWidth: 100, outerHeight: 100, - canUseTranslate3d: true, emptySelectionClipboard: true, pixelRatio: 1, zoomLevel: 0, diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 0b34c6869aa78..5dddf0d0f3d32 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2793,10 +2793,11 @@ declare module monaco.editor { */ fontLigatures?: boolean; /** - * Disable the use of `translate3d`. + * Disable the use of `will-change` for the editor margin and lines layers. + * The usage of `will-change` acts as a hint for browsers to create an extra layer. * Defaults to false. */ - disableTranslate3d?: boolean; + disableLayerHinting?: boolean; /** * Disable the optimizations for monospace fonts. * Defaults to false. @@ -3275,7 +3276,7 @@ declare module monaco.editor { */ export class InternalEditorOptions { readonly _internalEditorOptionsBrand: void; - readonly canUseTranslate3d: boolean; + readonly canUseLayerHinting: boolean; readonly pixelRatio: number; readonly editorClassName: string; readonly lineHeight: number; @@ -3406,7 +3407,7 @@ declare module monaco.editor { * An event describing that the configuration of the editor has changed. */ export interface IConfigurationChangedEvent { - readonly canUseTranslate3d: boolean; + readonly canUseLayerHinting: boolean; readonly pixelRatio: boolean; readonly editorClassName: boolean; readonly lineHeight: boolean; @@ -3960,7 +3961,7 @@ declare module monaco.languages { export function registerDocumentSymbolProvider(languageId: string, provider: DocumentSymbolProvider): IDisposable; /** - * Register a document highlight provider (used by e.g. highlight occurences). + * Register a document highlight provider (used by e.g. highlight occurrences). */ export function registerDocumentHighlightProvider(languageId: string, provider: DocumentHighlightProvider): IDisposable; diff --git a/src/vs/platform/configuration/common/configuration.ts b/src/vs/platform/configuration/common/configuration.ts index 7292988c11b18..0aec692a2d83a 100644 --- a/src/vs/platform/configuration/common/configuration.ts +++ b/src/vs/platform/configuration/common/configuration.ts @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { TPromise } from 'vs/base/common/winjs.base'; +import * as arrays from 'vs/base/common/arrays'; +import * as types from 'vs/base/common/types'; +import * as objects from 'vs/base/common/objects'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import Event from 'vs/base/common/event'; @@ -101,18 +104,76 @@ export function getConfigurationValue(config: any, settingPath: string, defau return typeof result === 'undefined' ? defaultValue : result; } -export interface IConfigModel { - contents: T; - overrides: IOverrides[]; - keys: string[]; - errors: any[]; - - merge(other: IConfigModel, overwrite?: boolean): IConfigModel; - getContentsFor(section: string): V; - configWithOverrides(identifier: string, section?: string): IConfigModel; +export function merge(base: any, add: any, overwrite: boolean): void { + Object.keys(add).forEach(key => { + if (key in base) { + if (types.isObject(base[key]) && types.isObject(add[key])) { + merge(base[key], add[key], overwrite); + } else if (overwrite) { + base[key] = add[key]; + } + } else { + base[key] = add[key]; + } + }); } export interface IOverrides { contents: T; identifiers: string[]; } + +export class Configuration { + + protected _keys: string[] = []; + + constructor(protected _contents: T = {}, protected _overrides: IOverrides[] = []) { + } + + public get contents(): T { + return this._contents; + } + + public get keys(): string[] { + return this._keys; + } + + public getContentsFor(section: string): V { + return objects.clone(this.contents[section]); + } + + public override(identifier: string): Configuration { + const result = new Configuration(); + const contents = objects.clone(this.contents); + if (this._overrides) { + for (const override of this._overrides) { + if (override.identifiers.indexOf(identifier) !== -1) { + merge(contents, override.contents, true); + } + } + } + result._contents = contents; + return result; + } + + public merge(other: Configuration, overwrite: boolean = true): Configuration { + const mergedModel = new Configuration(); + this.doMerge(mergedModel, this, overwrite); + this.doMerge(mergedModel, other, overwrite); + return mergedModel; + } + + protected doMerge(source: Configuration, target: Configuration, overwrite: boolean = true) { + merge(source.contents, objects.clone(target.contents), overwrite); + const overrides = objects.clone(source._overrides); + for (const override of target._overrides) { + const [sourceOverride] = overrides.filter(o => arrays.equals(o.identifiers, override.identifiers)); + if (sourceOverride) { + merge(sourceOverride.contents, override.contents, overwrite); + } else { + overrides.push(override); + } + } + source._overrides = overrides; + } +} \ No newline at end of file diff --git a/src/vs/platform/configuration/common/model.ts b/src/vs/platform/configuration/common/model.ts index cfbc368d83acd..bbc843ffa3a7c 100644 --- a/src/vs/platform/configuration/common/model.ts +++ b/src/vs/platform/configuration/common/model.ts @@ -5,12 +5,9 @@ 'use strict'; import { Registry } from 'vs/platform/platform'; -import * as types from 'vs/base/common/types'; import * as json from 'vs/base/common/json'; -import * as objects from 'vs/base/common/objects'; -import * as arrays from 'vs/base/common/arrays'; import { IConfigurationRegistry, Extensions, OVERRIDE_PROPERTY_PATTERN } from 'vs/platform/configuration/common/configurationRegistry'; -import { IConfigModel, IOverrides } from 'vs/platform/configuration/common/configuration'; +import { Configuration, IOverrides } from 'vs/platform/configuration/common/configuration'; export function getDefaultValues(): any { const valueTreeRoot: any = Object.create(null); @@ -68,92 +65,45 @@ export function getConfigurationKeys(): string[] { return Object.keys(properties); } -export function merge(base: any, add: any, overwrite: boolean): void { - Object.keys(add).forEach(key => { - if (key in base) { - if (types.isObject(base[key]) && types.isObject(add[key])) { - merge(base[key], add[key], overwrite); - } else if (overwrite) { - base[key] = add[key]; - } - } else { - base[key] = add[key]; - } - }); +export class DefaultConfiguration extends Configuration { + + constructor() { + super(getDefaultValues()); + this._keys = getConfigurationKeys(); + this._overrides = Object.keys(this._contents) + .filter(key => OVERRIDE_PROPERTY_PATTERN.test(key)) + .map(key => { + return >{ + identifiers: [overrideIdentifierFromKey(key).trim()], + contents: toValuesTree(this._contents[key], message => console.error(`Conflict in default settings file: ${message}`)) + }; + }); + } + + public get keys(): string[] { + return this._keys; + } } interface Overrides extends IOverrides { raw: any; } -export class ConfigModel implements IConfigModel { +export class CustomConfiguration extends Configuration { - protected _contents: T = {}; - protected _overrides: IOverrides[] = []; - protected _keys: string[] = []; protected _parseErrors: any[] = []; constructor(content: string = '', private name: string = '') { + super(); if (content) { this.update(content); } } - public get contents(): T { - return this._contents; - } - - public get overrides(): IOverrides[] { - return this._overrides; - } - - public get keys(): string[] { - return this._keys; - } - public get errors(): any[] { return this._parseErrors; } - public merge(other: IConfigModel, overwrite: boolean = true): ConfigModel { - const mergedModel = new ConfigModel(null); - this.doMerge(mergedModel, this, overwrite); - this.doMerge(mergedModel, other, overwrite); - return mergedModel; - } - - protected doMerge(source: ConfigModel, target: IConfigModel, overwrite: boolean = true) { - merge(source.contents, objects.clone(target.contents), overwrite); - const overrides = objects.clone(source.overrides); - for (const override of target.overrides) { - const [sourceOverride] = overrides.filter(o => arrays.equals(o.identifiers, override.identifiers)); - if (sourceOverride) { - merge(sourceOverride.contents, override.contents, overwrite); - } else { - overrides.push(override); - } - } - source._overrides = overrides; - } - - public getContentsFor(section: string): V { - return objects.clone(this.contents[section]); - } - - public configWithOverrides(identifier: string): ConfigModel { - const result = new ConfigModel(null); - const contents = objects.clone(this.contents); - if (this.overrides) { - for (const override of this.overrides) { - if (override.identifiers.indexOf(identifier) !== -1) { - merge(contents, override.contents, true); - } - } - } - result._contents = contents; - return result; - } - public update(content: string): void { let parsed: T = {}; let overrides: Overrides[] = []; @@ -243,31 +193,6 @@ export class ConfigModel implements IConfigModel { } } -export class DefaultConfigModel extends ConfigModel { - - constructor() { - super(null); - this.update(); - } - - public get keys(): string[] { - return this._keys; - } - - public update(): void { - this._contents = getDefaultValues(); // defaults coming from contributions to registries - this._keys = getConfigurationKeys(); - this._overrides = Object.keys(this._contents) - .filter(key => OVERRIDE_PROPERTY_PATTERN.test(key)) - .map(key => { - return >{ - identifiers: [overrideIdentifierFromKey(key).trim()], - contents: toValuesTree(this._contents[key], message => console.error(`Conflict in default settings file: ${message}`)) - }; - }); - } -} - export function overrideIdentifierFromKey(key: string): string { return key.substring(1, key.length - 1); } diff --git a/src/vs/platform/configuration/node/configurationService.ts b/src/vs/platform/configuration/node/configurationService.ts index ea7164b96a148..3f7a1e9c22cf1 100644 --- a/src/vs/platform/configuration/node/configurationService.ts +++ b/src/vs/platform/configuration/node/configurationService.ts @@ -10,15 +10,15 @@ import { ConfigWatcher } from 'vs/base/node/config'; import { Registry } from 'vs/platform/platform'; import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; import { IDisposable, toDisposable, Disposable } from 'vs/base/common/lifecycle'; -import { ConfigurationSource, IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, getConfigurationValue, IConfigurationKeys, IConfigModel, IConfigurationOptions } from 'vs/platform/configuration/common/configuration'; -import { ConfigModel, DefaultConfigModel } from 'vs/platform/configuration/common/model'; +import { ConfigurationSource, IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, getConfigurationValue, IConfigurationKeys, Configuration, IConfigurationOptions } from 'vs/platform/configuration/common/configuration'; +import { CustomConfiguration, DefaultConfiguration } from 'vs/platform/configuration/common/model'; import Event, { Emitter } from 'vs/base/common/event'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; export interface ICache { - defaults: IConfigModel; - user: IConfigModel; - consolidated: IConfigModel; + defaults: Configuration; + user: Configuration; + consolidated: Configuration; } export class ConfigurationService extends Disposable implements IConfigurationService, IDisposable { @@ -26,7 +26,7 @@ export class ConfigurationService extends Disposable implements IConfiguratio _serviceBrand: any; private cache: ICache; - private userConfigModelWatcher: ConfigWatcher>; + private userConfigModelWatcher: ConfigWatcher>; private _onDidUpdateConfiguration: Emitter = this._register(new Emitter()); public readonly onDidUpdateConfiguration: Event = this._onDidUpdateConfiguration.event; @@ -37,8 +37,8 @@ export class ConfigurationService extends Disposable implements IConfiguratio super(); this.userConfigModelWatcher = new ConfigWatcher(environmentService.appSettingsPath, { - changeBufferDelay: 300, defaultConfig: new ConfigModel(null, environmentService.appSettingsPath), parse: (content: string, parseErrors: any[]) => { - const userConfigModel = new ConfigModel(content, environmentService.appSettingsPath); + changeBufferDelay: 300, defaultConfig: new CustomConfiguration(null, environmentService.appSettingsPath), parse: (content: string, parseErrors: any[]) => { + const userConfigModel = new CustomConfiguration(content, environmentService.appSettingsPath); parseErrors = [...userConfigModel.errors]; return userConfigModel; } @@ -77,7 +77,7 @@ export class ConfigurationService extends Disposable implements IConfiguratio public getConfiguration(arg?: any): C { const options = this.toOptions(arg); const cache = this.getCache(); - const configModel = options.overrideIdentifier ? cache.consolidated.configWithOverrides(options.overrideIdentifier) : cache.consolidated; + const configModel = options.overrideIdentifier ? cache.consolidated.override(options.overrideIdentifier) : cache.consolidated; return options.section ? configModel.getContentsFor(options.section) : configModel.contents; } @@ -86,9 +86,9 @@ export class ConfigurationService extends Disposable implements IConfiguratio // make sure to clone the configuration so that the receiver does not tamper with the values return { - default: objects.clone(getConfigurationValue(overrideIdentifier ? cache.defaults.configWithOverrides(overrideIdentifier).contents : cache.defaults.contents, key)), - user: objects.clone(getConfigurationValue(overrideIdentifier ? cache.user.configWithOverrides(overrideIdentifier).contents : cache.user.contents, key)), - value: objects.clone(getConfigurationValue(overrideIdentifier ? cache.consolidated.configWithOverrides(overrideIdentifier).contents : cache.consolidated.contents, key)) + default: objects.clone(getConfigurationValue(overrideIdentifier ? cache.defaults.override(overrideIdentifier).contents : cache.defaults.contents, key)), + user: objects.clone(getConfigurationValue(overrideIdentifier ? cache.user.override(overrideIdentifier).contents : cache.user.contents, key)), + value: objects.clone(getConfigurationValue(overrideIdentifier ? cache.consolidated.override(overrideIdentifier).contents : cache.consolidated.contents, key)) }; } @@ -116,7 +116,7 @@ export class ConfigurationService extends Disposable implements IConfiguratio } private consolidateConfigurations(): ICache { - const defaults = new DefaultConfigModel(); + const defaults = new DefaultConfiguration(); const user = this.userConfigModelWatcher.getConfig(); const consolidated = defaults.merge(user); return { defaults, user, consolidated }; diff --git a/src/vs/platform/configuration/test/common/configuration.test.ts b/src/vs/platform/configuration/test/common/configuration.test.ts new file mode 100644 index 0000000000000..69552e758fb35 --- /dev/null +++ b/src/vs/platform/configuration/test/common/configuration.test.ts @@ -0,0 +1,79 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as assert from 'assert'; +import { Configuration, merge } from 'vs/platform/configuration/common/configuration'; +import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; +import { Registry } from 'vs/platform/platform'; + +suite('Configuration', () => { + + suiteSetup(() => { + Registry.as(Extensions.Configuration).registerConfiguration({ + 'id': 'a', + 'order': 1, + 'title': 'a', + 'type': 'object', + 'properties': { + 'a': { + 'description': 'a', + 'type': 'boolean', + 'default': true, + 'overridable': true + } + } + }); + }); + + test('simple merge', () => { + let base = { 'a': 1, 'b': 2 }; + merge(base, { 'a': 3, 'c': 4 }, true); + assert.deepEqual(base, { 'a': 3, 'b': 2, 'c': 4 }); + base = { 'a': 1, 'b': 2 }; + merge(base, { 'a': 3, 'c': 4 }, false); + assert.deepEqual(base, { 'a': 1, 'b': 2, 'c': 4 }); + }); + + test('Recursive merge', () => { + const base = { 'a': { 'b': 1 } }; + merge(base, { 'a': { 'b': 2 } }, true); + assert.deepEqual(base, { 'a': { 'b': 2 } }); + }); + + test('simple merge using configuration', () => { + let base = new Configuration({ 'a': 1, 'b': 2 }); + let add = new Configuration({ 'a': 3, 'c': 4 }); + let result = base.merge(add); + assert.deepEqual(result.contents, { 'a': 3, 'b': 2, 'c': 4 }); + }); + + test('Recursive merge using config models', () => { + let base = new Configuration({ 'a': { 'b': 1 } }); + let add = new Configuration({ 'a': { 'b': 2 } }); + let result = base.merge(add); + assert.deepEqual(result.contents, { 'a': { 'b': 2 } }); + }); + + test('Test contents while getting an existing property', () => { + let testObject = new Configuration({ 'a': 1 }); + assert.deepEqual(testObject.getContentsFor('a'), 1); + + testObject = new Configuration({ 'a': { 'b': 1 } }); + assert.deepEqual(testObject.getContentsFor('a'), { 'b': 1 }); + }); + + test('Test contents are undefined for non existing properties', () => { + const testObject = new Configuration({ awesome: true }); + + assert.deepEqual(testObject.getContentsFor('unknownproperty'), undefined); + }); + + test('Test override gives all content merged with overrides', () => { + const testObject = new Configuration({ 'a': 1, 'c': 1 }, [{ identifiers: ['b'], contents: { 'a': 2 } }]); + + assert.deepEqual(testObject.override('b').contents, { 'a': 2, 'c': 1 }); + }); +}); \ No newline at end of file diff --git a/src/vs/platform/configuration/test/common/model.test.ts b/src/vs/platform/configuration/test/common/model.test.ts index db7edc4c0d751..e2f3bb6e99720 100644 --- a/src/vs/platform/configuration/test/common/model.test.ts +++ b/src/vs/platform/configuration/test/common/model.test.ts @@ -5,11 +5,11 @@ 'use strict'; import * as assert from 'assert'; -import * as model from 'vs/platform/configuration/common/model'; +import { CustomConfiguration, DefaultConfiguration } from 'vs/platform/configuration/common/model'; import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; import { Registry } from 'vs/platform/platform'; -suite('ConfigurationService - Model', () => { +suite('Configuration', () => { suiteSetup(() => { Registry.as(Extensions.Configuration).registerConfiguration({ @@ -28,62 +28,47 @@ suite('ConfigurationService - Model', () => { }); }); - test('simple merge', () => { - let base = { 'a': 1, 'b': 2 }; - model.merge(base, { 'a': 3, 'c': 4 }, true); - assert.deepEqual(base, { 'a': 3, 'b': 2, 'c': 4 }); - base = { 'a': 1, 'b': 2 }; - model.merge(base, { 'a': 3, 'c': 4 }, false); - assert.deepEqual(base, { 'a': 1, 'b': 2, 'c': 4 }); - }); - - test('Recursive merge', () => { - const base = { 'a': { 'b': 1 } }; - model.merge(base, { 'a': { 'b': 2 } }, true); - assert.deepEqual(base, { 'a': { 'b': 2 } }); - }); - test('simple merge using models', () => { - let base = new model.ConfigModel(JSON.stringify({ 'a': 1, 'b': 2 })); - let add = new model.ConfigModel(JSON.stringify({ 'a': 3, 'c': 4 })); + let base = new CustomConfiguration(JSON.stringify({ 'a': 1, 'b': 2 })); + let add = new CustomConfiguration(JSON.stringify({ 'a': 3, 'c': 4 })); let result = base.merge(add); assert.deepEqual(result.contents, { 'a': 3, 'b': 2, 'c': 4 }); }); test('simple merge with an undefined contents', () => { - let base = new model.ConfigModel(JSON.stringify({ 'a': 1, 'b': 2 })); - let add = new model.ConfigModel(null); + let base = new CustomConfiguration(JSON.stringify({ 'a': 1, 'b': 2 })); + let add = new CustomConfiguration(null); let result = base.merge(add); assert.deepEqual(result.contents, { 'a': 1, 'b': 2 }); - base = new model.ConfigModel(null); - add = new model.ConfigModel(JSON.stringify({ 'a': 1, 'b': 2 })); + base = new CustomConfiguration(null); + add = new CustomConfiguration(JSON.stringify({ 'a': 1, 'b': 2 })); result = base.merge(add); assert.deepEqual(result.contents, { 'a': 1, 'b': 2 }); - base = new model.ConfigModel(null); - add = new model.ConfigModel(null); + base = new CustomConfiguration(null); + add = new CustomConfiguration(null); result = base.merge(add); assert.deepEqual(result.contents, {}); }); test('Recursive merge using config models', () => { - let base = new model.ConfigModel(JSON.stringify({ 'a': { 'b': 1 } })); - let add = new model.ConfigModel(JSON.stringify({ 'a': { 'b': 2 } })); + let base = new CustomConfiguration(JSON.stringify({ 'a': { 'b': 1 } })); + let add = new CustomConfiguration(JSON.stringify({ 'a': { 'b': 2 } })); let result = base.merge(add); assert.deepEqual(result.contents, { 'a': { 'b': 2 } }); }); test('Test contents while getting an existing property', () => { - let testObject = new model.ConfigModel(JSON.stringify({ 'a': 1 })); + let testObject = new CustomConfiguration(JSON.stringify({ 'a': 1 })); assert.deepEqual(testObject.getContentsFor('a'), 1); - testObject = new model.ConfigModel(JSON.stringify({ 'a': { 'b': 1 } })); + testObject = new CustomConfiguration(JSON.stringify({ 'a': { 'b': 1 } })); assert.deepEqual(testObject.getContentsFor('a'), { 'b': 1 }); }); test('Test contents are undefined for non existing properties', () => { - const testObject = new model.ConfigModel(JSON.stringify({ + const testObject = new CustomConfiguration(JSON.stringify({ awesome: true })); @@ -91,25 +76,25 @@ suite('ConfigurationService - Model', () => { }); test('Test contents are undefined for undefined config', () => { - const testObject = new model.ConfigModel(null); + const testObject = new CustomConfiguration(null); assert.deepEqual(testObject.getContentsFor('unknownproperty'), undefined); }); test('Test configWithOverrides gives all content merged with overrides', () => { - const testObject = new model.ConfigModel(JSON.stringify({ 'a': 1, 'c': 1, '[b]': { 'a': 2 } })); + const testObject = new CustomConfiguration(JSON.stringify({ 'a': 1, 'c': 1, '[b]': { 'a': 2 } })); - assert.deepEqual(testObject.configWithOverrides('b').contents, { 'a': 2, 'c': 1, '[b]': { 'a': 2 } }); + assert.deepEqual(testObject.override('b').contents, { 'a': 2, 'c': 1, '[b]': { 'a': 2 } }); }); test('Test configWithOverrides gives empty contents', () => { - const testObject = new model.ConfigModel(null); + const testObject = new CustomConfiguration(null); - assert.deepEqual(testObject.configWithOverrides('b').contents, {}); + assert.deepEqual(testObject.override('b').contents, {}); }); test('Test update with empty data', () => { - const testObject = new model.ConfigModel(); + const testObject = new CustomConfiguration(); testObject.update(''); assert.deepEqual(testObject.contents, {}); @@ -140,7 +125,7 @@ suite('ConfigurationService - Model', () => { } } }); - assert.equal(true, new model.DefaultConfigModel().getContentsFor('a')); + assert.equal(true, new DefaultConfiguration().getContentsFor('a')); }); test('Test registering the language property', () => { @@ -157,7 +142,7 @@ suite('ConfigurationService - Model', () => { } } }); - assert.equal(undefined, new model.DefaultConfigModel().getContentsFor('[a]')); + assert.equal(undefined, new DefaultConfiguration().getContentsFor('[a]')); }); }); \ No newline at end of file diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index 93cbdb6f3f90d..f37c6349d88c2 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -196,7 +196,7 @@ export enum FileChangeType { export interface IFileChange { /** - * The type of change that occured to the file. + * The type of change that occurred to the file. */ type: FileChangeType; diff --git a/src/vs/platform/quickOpen/common/quickOpen.ts b/src/vs/platform/quickOpen/common/quickOpen.ts index 6fe5fcc616914..2ce7f0a3691d4 100644 --- a/src/vs/platform/quickOpen/common/quickOpen.ts +++ b/src/vs/platform/quickOpen/common/quickOpen.ts @@ -62,6 +62,11 @@ export interface IPickOptions { * enables quick navigate in the picker to open an element without typing */ quickNavigateConfiguration?: IQuickNavigateConfiguration; + + /** + * a context key to set when this picker is active + */ + contextKey?: string; } export interface IInputOptions { diff --git a/src/vs/platform/search/common/replace.ts b/src/vs/platform/search/common/replace.ts index e57e23c103435..647b5d51a0d11 100644 --- a/src/vs/platform/search/common/replace.ts +++ b/src/vs/platform/search/common/replace.ts @@ -175,7 +175,7 @@ export class ReplacePattern { } if (substrFrom === 0) { - // no replacement occured + // no replacement occurred return; } diff --git a/src/vs/platform/storage/common/storageService.ts b/src/vs/platform/storage/common/storageService.ts index 82952ee5dbdf0..83049e9736f7f 100644 --- a/src/vs/platform/storage/common/storageService.ts +++ b/src/vs/platform/storage/common/storageService.ts @@ -23,7 +23,6 @@ export interface IStorage { export interface IWorkspaceStorageIdentifier { resource: URI; uid?: number; - name?: string; } export class StorageService implements IStorageService { @@ -55,7 +54,7 @@ export class StorageService implements IStorageService { // Make sure to delete all workspace storage if the workspace has been recreated meanwhile // which is only possible if a UID property is provided that we can check on if (workspaceIdentifier && types.isNumber(workspaceIdentifier.uid)) { - this.cleanupWorkspaceScope(workspaceIdentifier.uid, workspaceIdentifier.name); + this.cleanupWorkspaceScope(workspaceIdentifier.uid); } } @@ -76,13 +75,13 @@ export class StorageService implements IStorageService { return `${strings.rtrim(workspaceIdStr, '/')}/`; } - private cleanupWorkspaceScope(workspaceId: number, workspaceName: string): void { + private cleanupWorkspaceScope(workspaceUid: number): void { // Get stored identifier from storage const id = this.getInteger(StorageService.WORKSPACE_IDENTIFIER, StorageScope.WORKSPACE); // If identifier differs, assume the workspace got recreated and thus clean all storage for this workspace - if (types.isNumber(id) && workspaceId !== id) { + if (types.isNumber(id) && workspaceUid !== id) { const keyPrefix = this.toStorageKey('', StorageScope.WORKSPACE); const toDelete: string[] = []; const length = this.workspaceStorage.length; @@ -99,10 +98,6 @@ export class StorageService implements IStorageService { } } - if (toDelete.length > 0) { - console.warn('Clearing previous version of local storage for workspace ', workspaceName); - } - // Run the delete toDelete.forEach((keyToDelete) => { this.workspaceStorage.removeItem(keyToDelete); @@ -110,8 +105,8 @@ export class StorageService implements IStorageService { } // Store workspace identifier now - if (workspaceId !== id) { - this.store(StorageService.WORKSPACE_IDENTIFIER, workspaceId, StorageScope.WORKSPACE); + if (workspaceUid !== id) { + this.store(StorageService.WORKSPACE_IDENTIFIER, workspaceUid, StorageScope.WORKSPACE); } } diff --git a/src/vs/platform/storage/test/storageService.test.ts b/src/vs/platform/storage/test/storageService.test.ts index 2be5dff0a16f5..2978c54f13428 100644 --- a/src/vs/platform/storage/test/storageService.test.ts +++ b/src/vs/platform/storage/test/storageService.test.ts @@ -77,7 +77,9 @@ suite('Workbench StorageSevice', () => { test('StorageSevice cleans up when workspace changes', () => { let storageImpl = new InMemoryLocalStorage(); - let s = new StorageService(storageImpl, null, contextService.getWorkspace()); + let ws = contextService.getWorkspace(); + ws.uid = new Date().getTime(); + let s = new StorageService(storageImpl, null, ws); s.store('key1', 'foobar'); s.store('key2', 'something'); @@ -93,7 +95,8 @@ suite('Workbench StorageSevice', () => { assert.strictEqual(s.get('wkey1', StorageScope.WORKSPACE), 'foo'); assert.strictEqual(s.get('wkey2', StorageScope.WORKSPACE), 'foo2'); - let ws: any = new Workspace(TestWorkspace.resource, new Date().getTime() + 100, TestWorkspace.name); + ws = new Workspace(TestWorkspace.resource, TestWorkspace.name); + ws.uid = new Date().getTime() + 100; s = new StorageService(storageImpl, null, ws); assert.strictEqual(s.get('key1', StorageScope.GLOBAL), 'foobar'); diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index 8e1b08ed1437c..7abd76ad14ca2 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -65,13 +65,6 @@ export interface IWorkspace { */ resource: URI; - /** - * the unique identifier of the workspace. if the workspace is deleted and recreated - * the identifier also changes. this makes the uid more unique compared to the id which - * is just derived from the workspace name. - */ - uid?: number; - /** * the name of the workspace */ @@ -85,6 +78,11 @@ export interface IWorkspace2 { */ readonly id: string; + /** + * the name of the workspace. + */ + readonly name: string; + /** * Mutliple roots in this workspace. First entry is master and never changes. */ @@ -94,17 +92,13 @@ export interface IWorkspace2 { export class Workspace implements IWorkspace { - constructor(private _resource: URI, private _uid?: number, private _name?: string) { + constructor(private _resource: URI, private _name?: string) { } public get resource(): URI { return this._resource; } - public get uid(): number { - return this._uid; - } - public get name(): string { return this._name; } @@ -134,6 +128,6 @@ export class Workspace implements IWorkspace { } public toJSON() { - return { resource: this._resource, uid: this._uid, name: this._name }; + return { resource: this._resource, name: this._name }; } } \ No newline at end of file diff --git a/src/vs/platform/workspace/test/common/testWorkspace.ts b/src/vs/platform/workspace/test/common/testWorkspace.ts index 18926c9330dac..4400e7544ea18 100644 --- a/src/vs/platform/workspace/test/common/testWorkspace.ts +++ b/src/vs/platform/workspace/test/common/testWorkspace.ts @@ -8,6 +8,5 @@ import URI from 'vs/base/common/uri'; export const TestWorkspace = new Workspace( URI.file('C:\\testWorkspace'), - Date.now(), 'Test Workspace' ); diff --git a/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts index f6fc31c91ef67..1cde185a17de0 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadWorkspace.ts @@ -42,8 +42,8 @@ export class MainThreadWorkspace extends MainThreadWorkspaceShape { // --- workspace --- - private _onDidChangeWorkspace(folders: URI[]): void { - this._proxy.$acceptWorkspaceData(folders); + private _onDidChangeWorkspace(): void { + this._proxy.$acceptWorkspaceData(this._contextService.getWorkspace2()); } // --- search --- diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 9f3ed92538c46..7808ff172bbd6 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -91,7 +91,7 @@ export function createApiFactory( const extHostTerminalService = col.define(ExtHostContext.ExtHostTerminalService).set(new ExtHostTerminalService(threadService)); const extHostSCM = col.define(ExtHostContext.ExtHostSCM).set(new ExtHostSCM(threadService, extHostCommands)); const extHostTask = col.define(ExtHostContext.ExtHostTask).set(new ExtHostTask(threadService)); - const extHostWorkspace = col.define(ExtHostContext.ExtHostWorkspace).set(new ExtHostWorkspace(threadService, initData.workspace && [initData.workspace.resource])); + const extHostWorkspace = col.define(ExtHostContext.ExtHostWorkspace).set(new ExtHostWorkspace(threadService, initData.workspace)); col.define(ExtHostContext.ExtHostExtensionService).set(extensionService); col.finish(false, threadService); @@ -145,7 +145,7 @@ export function createApiFactory( console.warn('Edits from command ' + id + ' were not applied.'); } }, (err) => { - console.warn('An error occured while running command ' + id, err); + console.warn('An error occurred while running command ' + id, err); }); }); }, diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 393e50579ff2f..c7f432d81bbbc 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -22,7 +22,6 @@ import { IExtensionDescription } from 'vs/platform/extensions/common/extensions' import { StatusbarAlignment as MainThreadStatusBarAlignment } from 'vs/platform/statusbar/common/statusbar'; import { ITelemetryInfo } from 'vs/platform/telemetry/common/telemetry'; import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands'; -import { IWorkspace } from 'vs/platform/workspace/common/workspace'; import { IProgressOptions, IProgressStep } from 'vs/platform/progress/common/progress'; import * as editorCommon from 'vs/editor/common/editorCommon'; @@ -57,10 +56,15 @@ export interface IEnvironment { extensionTestsPath: string; } +export interface IWorkspaceData { + id: string; + roots: URI[]; +} + export interface IInitData { parentPid: number; environment: IEnvironment; - workspace: IWorkspace; + workspace: IWorkspaceData; extensions: IExtensionDescription[]; configuration: IWorkspaceConfigurationValues; telemetryInfo: ITelemetryInfo; @@ -405,7 +409,7 @@ export abstract class ExtHostTreeViewsShape { } export abstract class ExtHostWorkspaceShape { - $acceptWorkspaceData(folders: URI[]): void { throw ni(); } + $acceptWorkspaceData(workspace: IWorkspaceData): void { throw ni(); } } export abstract class ExtHostExtensionServiceShape { diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index aeb68c62edad1..67acd239b0269 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -15,8 +15,7 @@ import { ExtHostStorage } from 'vs/workbench/api/node/extHostStorage'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { createApiFactory, initializeExtensionApi } from 'vs/workbench/api/node/extHost.api.impl'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; -import { IWorkspace } from 'vs/platform/workspace/common/workspace'; -import { MainContext, MainProcessExtensionServiceShape, IEnvironment, IInitData } from './extHost.protocol'; +import { MainContext, MainProcessExtensionServiceShape, IWorkspaceData, IEnvironment, IInitData } from './extHost.protocol'; import { createHash } from 'crypto'; const hasOwnProperty = Object.hasOwnProperty; @@ -103,13 +102,13 @@ class ExtensionMemento implements IExtensionMemento { class ExtensionStoragePath { - private readonly _workspace: IWorkspace; + private readonly _workspace: IWorkspaceData; private readonly _environment: IEnvironment; private readonly _ready: TPromise; private _value: string; - constructor(workspace: IWorkspace, environment: IEnvironment) { + constructor(workspace: IWorkspaceData, environment: IEnvironment) { this._workspace = workspace; this._environment = environment; this._ready = this._getOrCreateWorkspaceStoragePath().then(value => this._value = value); @@ -130,10 +129,10 @@ class ExtensionStoragePath { if (!this._workspace) { return TPromise.as(undefined); } - + // TODO@joh what to do with multiple roots? const storageName = createHash('md5') - .update(this._workspace.resource.fsPath) - .update(this._workspace.uid ? this._workspace.uid.toString() : '') + .update(this._workspace.roots[0].fsPath) + .update(this._workspace.id || '') .digest('hex'); const storagePath = join(this._environment.appSettingsHome, 'workspaceStorage', storageName); diff --git a/src/vs/workbench/api/node/extHostSCM.ts b/src/vs/workbench/api/node/extHostSCM.ts index 8a87e5126c07f..76c7078dda986 100644 --- a/src/vs/workbench/api/node/extHostSCM.ts +++ b/src/vs/workbench/api/node/extHostSCM.ts @@ -323,7 +323,10 @@ export class ExtHostSCM { return TPromise.as(null); } - return asWinJsPromise(token => URI.parse(sourceControl.quickDiffProvider.provideOriginalResource(uri, token).toString())); + return asWinJsPromise(token => { + const result = sourceControl.quickDiffProvider.provideOriginalResource(uri, token); + return result && URI.parse(result.toString()); + }); } $onActiveSourceControlChange(handle: number): TPromise { diff --git a/src/vs/workbench/api/node/extHostWorkspace.ts b/src/vs/workbench/api/node/extHostWorkspace.ts index 7ec394f69139a..dff559112b7d1 100644 --- a/src/vs/workbench/api/node/extHostWorkspace.ts +++ b/src/vs/workbench/api/node/extHostWorkspace.ts @@ -12,7 +12,7 @@ import { IThreadService } from 'vs/workbench/services/thread/common/threadServic import { IResourceEdit } from 'vs/editor/common/services/bulkEdit'; import { TPromise } from 'vs/base/common/winjs.base'; import { fromRange, EndOfLine } from 'vs/workbench/api/node/extHostTypeConverters'; -import { ExtHostWorkspaceShape, MainContext, MainThreadWorkspaceShape } from './extHost.protocol'; +import { IWorkspaceData, ExtHostWorkspaceShape, MainContext, MainThreadWorkspaceShape } from './extHost.protocol'; import * as vscode from 'vscode'; export class ExtHostWorkspace extends ExtHostWorkspaceShape { @@ -20,18 +20,19 @@ export class ExtHostWorkspace extends ExtHostWorkspaceShape { private static _requestIdPool = 0; private readonly _proxy: MainThreadWorkspaceShape; - private _workspaceFolders: URI[]; + private _workspace: IWorkspaceData; - constructor(threadService: IThreadService, folders: URI[]) { + constructor(threadService: IThreadService, workspace: IWorkspaceData) { super(); this._proxy = threadService.get(MainContext.MainThreadWorkspace); - this._workspaceFolders = folders; + this._workspace = workspace; } // --- workspace --- getPath(): string { - return isFalsyOrEmpty(this._workspaceFolders) ? undefined : this._workspaceFolders[0].fsPath; + // TODO@Joh handle roots.length > 1 case + return this._workspace ? this._workspace.roots[0].fsPath : undefined; } getRelativePath(pathOrUri: string | vscode.Uri): string { @@ -47,11 +48,11 @@ export class ExtHostWorkspace extends ExtHostWorkspaceShape { return path; } - if (isFalsyOrEmpty(this._workspaceFolders)) { + if (!this._workspace || isFalsyOrEmpty(this._workspace.roots)) { return normalize(path); } - for (const { fsPath } of this._workspaceFolders) { + for (const { fsPath } of this._workspace.roots) { let result = relative(fsPath, path); if (!result || result.indexOf('..') === 0) { continue; @@ -62,9 +63,9 @@ export class ExtHostWorkspace extends ExtHostWorkspaceShape { return normalize(path); } - $acceptWorkspaceData(workspaceFolders: URI[]): void { + $acceptWorkspaceData(workspace: IWorkspaceData): void { //TODO@joh equality-check, emit event etc. - this._workspaceFolders = workspaceFolders; + this._workspace = workspace; } // --- search --- diff --git a/src/vs/workbench/browser/parts/editor/binaryEditor.ts b/src/vs/workbench/browser/parts/editor/binaryEditor.ts index f2e1ec0cde694..08ce253c8dbdd 100644 --- a/src/vs/workbench/browser/parts/editor/binaryEditor.ts +++ b/src/vs/workbench/browser/parts/editor/binaryEditor.ts @@ -59,7 +59,7 @@ export abstract class BaseBinaryResourceEditor extends BaseEditor { this.binaryContainer.tabindex(0); // enable focus support from the editor part (do not remove) // Custom Scrollbars - this.scrollbar = new DomScrollableElement(binaryContainerElement, { canUseTranslate3d: false, horizontal: ScrollbarVisibility.Auto, vertical: ScrollbarVisibility.Auto }); + this.scrollbar = new DomScrollableElement(binaryContainerElement, { horizontal: ScrollbarVisibility.Auto, vertical: ScrollbarVisibility.Auto }); parent.getHTMLElement().appendChild(this.scrollbar.getDomNode()); } diff --git a/src/vs/workbench/browser/parts/editor/editor.contribution.ts b/src/vs/workbench/browser/parts/editor/editor.contribution.ts index cd4bc5a15ea72..f9d294310384e 100644 --- a/src/vs/workbench/browser/parts/editor/editor.contribution.ts +++ b/src/vs/workbench/browser/parts/editor/editor.contribution.ts @@ -30,12 +30,15 @@ import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes'; import { CloseEditorsInGroupAction, CloseEditorsInOtherGroupsAction, CloseAllEditorsAction, MoveGroupLeftAction, MoveGroupRightAction, SplitEditorAction, JoinTwoGroupsAction, KeepEditorAction, CloseOtherEditorsInGroupAction, OpenToSideAction, RevertAndCloseEditorAction, NavigateBetweenGroupsAction, FocusActiveGroupAction, FocusFirstGroupAction, FocusSecondGroupAction, FocusThirdGroupAction, EvenGroupWidthsAction, MaximizeGroupAction, MinimizeOtherGroupsAction, FocusPreviousGroup, FocusNextGroup, ShowEditorsInGroupOneAction, - toEditorQuickOpenEntry, CloseLeftEditorsInGroupAction, CloseRightEditorsInGroupAction, OpenNextEditor, OpenPreviousEditor, NavigateBackwardsAction, NavigateForwardAction, ReopenClosedEditorAction, OpenPreviousRecentlyUsedEditorInGroupAction, NAVIGATE_IN_GROUP_ONE_PREFIX, + toEditorQuickOpenEntry, CloseLeftEditorsInGroupAction, CloseRightEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction, OpenNextEditor, OpenPreviousEditor, NavigateBackwardsAction, NavigateForwardAction, ReopenClosedEditorAction, OpenPreviousRecentlyUsedEditorInGroupAction, NAVIGATE_IN_GROUP_ONE_PREFIX, OpenPreviousEditorFromHistoryAction, ShowAllEditorsAction, NAVIGATE_ALL_EDITORS_GROUP_PREFIX, ClearEditorHistoryAction, ShowEditorsInGroupTwoAction, MoveEditorRightInGroupAction, OpenNextEditorInGroup, OpenPreviousEditorInGroup, OpenNextRecentlyUsedEditorAction, OpenPreviousRecentlyUsedEditorAction, NAVIGATE_IN_GROUP_TWO_PREFIX, ShowEditorsInGroupThreeAction, NAVIGATE_IN_GROUP_THREE_PREFIX, FocusLastEditorInStackAction, OpenNextRecentlyUsedEditorInGroupAction, MoveEditorToPreviousGroupAction, MoveEditorToNextGroupAction, MoveEditorLeftInGroupAction, ClearRecentFilesAction } from 'vs/workbench/browser/parts/editor/editorActions'; import * as editorCommands from 'vs/workbench/browser/parts/editor/editorCommands'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { getQuickNavigateHandler, inQuickOpenContext } from "vs/workbench/browser/parts/quickopen/quickopen"; +import { KeybindingsRegistry } from "vs/platform/keybinding/common/keybindingsRegistry"; +import { ContextKeyExpr } from "vs/platform/contextkey/common/contextkey"; // Register String Editor Registry.as(EditorExtensions.Editors).registerEditor( @@ -257,11 +260,15 @@ export class QuickOpenActionContributor extends ActionBarContributor { const actionBarRegistry = Registry.as(ActionBarExtensions.Actionbar); actionBarRegistry.registerActionBarContributor(Scope.VIEWER, QuickOpenActionContributor); +const editorPickerContextKey = 'inEditorsPicker'; +const editorPickerContext = ContextKeyExpr.and(inQuickOpenContext, ContextKeyExpr.has(editorPickerContextKey)); + Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpenHandler( new QuickOpenHandlerDescriptor( 'vs/workbench/browser/parts/editor/editorPicker', 'GroupOnePicker', NAVIGATE_IN_GROUP_ONE_PREFIX, + editorPickerContextKey, [ { prefix: NAVIGATE_IN_GROUP_ONE_PREFIX, @@ -287,6 +294,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/browser/parts/editor/editorPicker', 'GroupTwoPicker', NAVIGATE_IN_GROUP_TWO_PREFIX, + editorPickerContextKey, [] ) ); @@ -296,6 +304,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/browser/parts/editor/editorPicker', 'GroupThreePicker', NAVIGATE_IN_GROUP_THREE_PREFIX, + editorPickerContextKey, [] ) ); @@ -305,6 +314,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/browser/parts/editor/editorPicker', 'AllEditorsPicker', NAVIGATE_ALL_EDITORS_GROUP_PREFIX, + editorPickerContextKey, [ { prefix: NAVIGATE_ALL_EDITORS_GROUP_PREFIX, @@ -321,8 +331,6 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(OpenNextEditorInGroup, registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousEditorInGroup, OpenPreviousEditorInGroup.ID, OpenPreviousEditorInGroup.LABEL), 'View: Open Previous Editor in Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(OpenNextRecentlyUsedEditorAction, OpenNextRecentlyUsedEditorAction.ID, OpenNextRecentlyUsedEditorAction.LABEL), 'View: Open Next Recently Used Editor', category); registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousRecentlyUsedEditorAction, OpenPreviousRecentlyUsedEditorAction.ID, OpenPreviousRecentlyUsedEditorAction.LABEL), 'View: Open Previous Recently Used Editor', category); -registry.registerWorkbenchAction(new SyncActionDescriptor(OpenNextRecentlyUsedEditorInGroupAction, OpenNextRecentlyUsedEditorInGroupAction.ID, OpenNextRecentlyUsedEditorInGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyCode.Tab } }), 'Open Next Recently Used Editor in Group'); -registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousRecentlyUsedEditorInGroupAction, OpenPreviousRecentlyUsedEditorInGroupAction.ID, OpenPreviousRecentlyUsedEditorInGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Tab } }), 'Open Previous Recently Used Editor in Group'); registry.registerWorkbenchAction(new SyncActionDescriptor(ShowAllEditorsAction, ShowAllEditorsAction.ID, ShowAllEditorsAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_P), mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Tab } }), 'View: Show All Editors', category); registry.registerWorkbenchAction(new SyncActionDescriptor(ShowEditorsInGroupOneAction, ShowEditorsInGroupOneAction.ID, ShowEditorsInGroupOneAction.LABEL), 'View: Show Editors in First Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(ShowEditorsInGroupTwoAction, ShowEditorsInGroupTwoAction.ID, ShowEditorsInGroupTwoAction.LABEL), 'View: Show Editors in Second Group', category); @@ -335,6 +343,7 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(KeepEditorAction, Keep registry.registerWorkbenchAction(new SyncActionDescriptor(CloseAllEditorsAction, CloseAllEditorsAction.ID, CloseAllEditorsAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_W) }), 'View: Close All Editors', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseLeftEditorsInGroupAction, CloseLeftEditorsInGroupAction.ID, CloseLeftEditorsInGroupAction.LABEL), 'View: Close Editors to the Left', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseRightEditorsInGroupAction, CloseRightEditorsInGroupAction.ID, CloseRightEditorsInGroupAction.LABEL), 'View: Close Editors to the Right', category); +registry.registerWorkbenchAction(new SyncActionDescriptor(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, CloseUnmodifiedEditorsInGroupAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_U) }), 'View: Close Unmodified Editors in Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, CloseEditorsInGroupAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_W) }), 'View: Close All Editors in Group', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseOtherEditorsInGroupAction, CloseOtherEditorsInGroupAction.ID, CloseOtherEditorsInGroupAction.LABEL, { primary: null, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_T } }), 'View: Close Other Editors', category); registry.registerWorkbenchAction(new SyncActionDescriptor(CloseEditorsInOtherGroupsAction, CloseEditorsInOtherGroupsAction.ID, CloseEditorsInOtherGroupsAction.LABEL), 'View: Close Editors in Other Groups', category); @@ -363,5 +372,32 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousEditorFrom registry.registerWorkbenchAction(new SyncActionDescriptor(ClearEditorHistoryAction, ClearEditorHistoryAction.ID, ClearEditorHistoryAction.LABEL), 'Clear Editor History'); registry.registerWorkbenchAction(new SyncActionDescriptor(RevertAndCloseEditorAction, RevertAndCloseEditorAction.ID, RevertAndCloseEditorAction.LABEL), 'View: Revert and Close Editor', category); +// Register Editor Picker Actions including quick navigate support +const openNextEditorKeybinding = { primary: KeyMod.CtrlCmd | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyCode.Tab } }; +const openPreviousEditorKeybinding = { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Tab } }; +registry.registerWorkbenchAction(new SyncActionDescriptor(OpenNextRecentlyUsedEditorInGroupAction, OpenNextRecentlyUsedEditorInGroupAction.ID, OpenNextRecentlyUsedEditorInGroupAction.LABEL, openNextEditorKeybinding), 'Open Next Recently Used Editor in Group'); +registry.registerWorkbenchAction(new SyncActionDescriptor(OpenPreviousRecentlyUsedEditorInGroupAction, OpenPreviousRecentlyUsedEditorInGroupAction.ID, OpenPreviousRecentlyUsedEditorInGroupAction.LABEL, openPreviousEditorKeybinding), 'Open Previous Recently Used Editor in Group'); + +const quickOpenNavigateNextInEditorPickerId = 'workbench.action.quickOpenNavigateNextInEditorPicker'; +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigateNextInEditorPickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigateNextInEditorPickerId, true), + when: editorPickerContext, + primary: openNextEditorKeybinding.primary, + mac: openNextEditorKeybinding.mac +}); + +const quickOpenNavigatePreviousInEditorPickerId = 'workbench.action.quickOpenNavigatePreviousInEditorPicker'; +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigatePreviousInEditorPickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigatePreviousInEditorPickerId, false), + when: editorPickerContext, + primary: openPreviousEditorKeybinding.primary, + mac: openPreviousEditorKeybinding.mac +}); + + // Editor Commands editorCommands.setup(); \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index 34a37ea902f3c..29cf34bc07c99 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -617,7 +617,7 @@ export class CloseLeftEditorsInGroupAction extends Action { public run(context?: IEditorContext): TPromise { const editor = getTarget(this.editorService, this.groupService, context); if (editor) { - return this.editorService.closeEditors(editor.position, editor.input, Direction.LEFT); + return this.editorService.closeEditors(editor.position, { except: editor.input, direction: Direction.LEFT }); } return TPromise.as(false); @@ -641,7 +641,7 @@ export class CloseRightEditorsInGroupAction extends Action { public run(context?: IEditorContext): TPromise { const editor = getTarget(this.editorService, this.groupService, context); if (editor) { - return this.editorService.closeEditors(editor.position, editor.input, Direction.RIGHT); + return this.editorService.closeEditors(editor.position, { except: editor.input, direction: Direction.RIGHT }); } return TPromise.as(false); @@ -691,6 +691,39 @@ export class CloseAllEditorsAction extends Action { } } +export class CloseUnmodifiedEditorsInGroupAction extends Action { + + public static ID = 'workbench.action.closeUnmodifiedEditors'; + public static LABEL = nls.localize('closeUnmodifiedEditors', "Close Unmodified Editors in Group"); + + constructor( + id: string, + label: string, + @IEditorGroupService private editorGroupService: IEditorGroupService, + @IWorkbenchEditorService private editorService: IWorkbenchEditorService + ) { + super(id, label); + } + + public run(context?: IEditorContext): TPromise { + let position = context ? this.editorGroupService.getStacksModel().positionOfGroup(context.group) : null; + + // If position is not passed in take the position of the active editor. + if (typeof position !== 'number') { + const active = this.editorService.getActiveEditor(); + if (active) { + position = active.position; + } + } + + if (typeof position === 'number') { + return this.editorService.closeEditors(position, { unmodifiedOnly: true }); + } + + return TPromise.as(false); + } +} + export class CloseEditorsInOtherGroupsAction extends Action { public static ID = 'workbench.action.closeEditorsInOtherGroups'; @@ -748,7 +781,7 @@ export class CloseOtherEditorsInGroupAction extends Action { } if (typeof position === 'number' && input) { - return this.editorService.closeEditors(position, input); + return this.editorService.closeEditors(position, { except: input }); } return TPromise.as(false); diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index f0db5dc5baf37..18a865ad5fcf9 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -665,18 +665,23 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService }); } - public closeEditors(position: Position, except?: EditorInput, direction?: Direction): TPromise { + public closeEditors(position: Position, filter: { except?: EditorInput, direction?: Direction, unmodifiedOnly?: boolean } = Object.create(null)): TPromise { const group = this.stacks.groupAt(position); if (!group) { return TPromise.as(null); } + let editors = group.getEditors(); + if (filter.unmodifiedOnly) { + editors = editors.filter(e => !e.isDirty()); + } + // Check for dirty and veto let editorsToClose: EditorInput[]; - if (types.isUndefinedOrNull(direction)) { - editorsToClose = group.getEditors().filter(e => !except || !e.matches(except)); + if (types.isUndefinedOrNull(filter.direction)) { + editorsToClose = editors.filter(e => !filter.except || !e.matches(filter.except)); } else { - editorsToClose = (direction === Direction.LEFT) ? group.getEditors().slice(0, group.indexOf(except)) : group.getEditors().slice(group.indexOf(except) + 1); + editorsToClose = (filter.direction === Direction.LEFT) ? editors.slice(0, group.indexOf(filter.except)) : editors.slice(group.indexOf(filter.except) + 1); } return this.handleDirty(editorsToClose.map(editor => { return { group, editor }; }), true /* ignore if opened in other group */).then(veto => { @@ -684,14 +689,26 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService return; } - this.doCloseEditors(group, except, direction); + this.doCloseEditors(group, filter); }); } - private doCloseEditors(group: EditorGroup, except?: EditorInput, direction?: Direction): void { + private doCloseEditors(group: EditorGroup, filter: { except?: EditorInput, direction?: Direction, unmodifiedOnly?: boolean } = Object.create(null)): void { + + // Close all editors if there is no editor to except and + // we either are not only closing unmodified editors or + // there are no dirty editors. + let closeAllEditors = false; + if (!filter.except) { + if (!filter.unmodifiedOnly) { + closeAllEditors = true; + } else { + closeAllEditors = !group.getEditors().some(e => e.isDirty()); + } + } // Close all editors in group - if (!except) { + if (closeAllEditors) { // Update stacks model: remove all non active editors first to prevent opening the next editor in group group.closeEditors(group.activeEditor); @@ -700,23 +717,42 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService this.doCloseActiveEditor(group); } + // Close unmodified editors in group + else if (filter.unmodifiedOnly) { + + // We can just close all unmodified editors around the currently active dirty one + if (group.activeEditor.isDirty()) { + group.getEditors().filter(editor => !editor.isDirty() && !editor.matches(filter.except)).forEach(editor => this.doCloseInactiveEditor(group, editor)); + } + + // Active editor is also a candidate to close, thus we make the first dirty editor + // active and then close the other ones + else { + const firstDirtyEditor = group.getEditors().filter(editor => editor.isDirty())[0]; + + this.openEditor(firstDirtyEditor, null, this.stacks.positionOfGroup(group)).done(() => { + this.doCloseEditors(group, filter); + }, errors.onUnexpectedError); + } + } + // Close all editors in group except active one - else if (except.matches(group.activeEditor)) { + else if (filter.except && filter.except.matches(group.activeEditor)) { // Update stacks model: close non active editors supporting the direction - group.closeEditors(group.activeEditor, direction); + group.closeEditors(group.activeEditor, filter.direction); } // Finally: we are asked to close editors around a non-active editor // Thus we make the non-active one active and then close the others else { - this.openEditor(except, null, this.stacks.positionOfGroup(group)).done(() => { + this.openEditor(filter.except, null, this.stacks.positionOfGroup(group)).done(() => { // since the opening might have failed, we have to check again for the active editor // being the expected one, otherwise we end up in an endless loop trying to open the // editor - if (except.matches(group.activeEditor)) { - this.doCloseEditors(group, except, direction); + if (filter.except.matches(group.activeEditor)) { + this.doCloseEditors(group, filter); } }, errors.onUnexpectedError); } diff --git a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts index 1793a9c4a17e2..b735e56fe40f0 100644 --- a/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts +++ b/src/vs/workbench/browser/parts/editor/tabsTitleControl.ts @@ -152,7 +152,6 @@ export class TabsTitleControl extends TitleControl { vertical: ScrollbarVisibility.Hidden, scrollYToX: true, useShadows: false, - canUseTranslate3d: false, horizontalScrollbarSize: 3 }); diff --git a/src/vs/workbench/browser/parts/editor/titleControl.ts b/src/vs/workbench/browser/parts/editor/titleControl.ts index 12c13c861ed7d..a2a66110f4cca 100644 --- a/src/vs/workbench/browser/parts/editor/titleControl.ts +++ b/src/vs/workbench/browser/parts/editor/titleControl.ts @@ -32,7 +32,7 @@ import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { ResolvedKeybinding } from 'vs/base/common/keyCodes'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; -import { CloseEditorsInGroupAction, SplitEditorAction, CloseEditorAction, KeepEditorAction, CloseOtherEditorsInGroupAction, CloseRightEditorsInGroupAction, ShowEditorsInGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; +import { CloseEditorsInGroupAction, SplitEditorAction, CloseEditorAction, KeepEditorAction, CloseOtherEditorsInGroupAction, CloseRightEditorsInGroupAction, ShowEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { createActionItem, fillInActions } from 'vs/platform/actions/browser/menuItemActionItem'; import { IMenuService, MenuId, IMenu, ExecuteCommandAction } from 'vs/platform/actions/common/actions'; @@ -71,6 +71,7 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl protected pinEditorAction: KeepEditorAction; protected closeOtherEditorsAction: CloseOtherEditorsInGroupAction; protected closeRightEditorsAction: CloseRightEditorsInGroupAction; + protected closeUnmodifiedEditorsInGroupAction: CloseUnmodifiedEditorsInGroupAction; protected closeEditorsInGroupAction: CloseEditorsInGroupAction; protected splitEditorAction: SplitEditorAction; protected showEditorsInGroupAction: ShowEditorsInGroupAction; @@ -228,6 +229,7 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl this.closeOtherEditorsAction = services.createInstance(CloseOtherEditorsInGroupAction, CloseOtherEditorsInGroupAction.ID, nls.localize('closeOthers', "Close Others")); this.closeRightEditorsAction = services.createInstance(CloseRightEditorsInGroupAction, CloseRightEditorsInGroupAction.ID, nls.localize('closeRight', "Close to the Right")); this.closeEditorsInGroupAction = services.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, nls.localize('closeAll', "Close All")); + this.closeUnmodifiedEditorsInGroupAction = services.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, nls.localize('closeAllUnmodified', "Close Unmodified")); this.pinEditorAction = services.createInstance(KeepEditorAction, KeepEditorAction.ID, nls.localize('keepOpen', "Keep Open")); this.showEditorsInGroupAction = services.createInstance(ShowEditorsInGroupAction, ShowEditorsInGroupAction.ID, nls.localize('showOpenedEditors', "Show Opened Editors")); this.splitEditorAction = services.createInstance(SplitEditorAction, SplitEditorAction.ID, SplitEditorAction.LABEL); @@ -355,6 +357,7 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl } secondaryEditorActions.push(this.showEditorsInGroupAction); secondaryEditorActions.push(new Separator()); + secondaryEditorActions.push(this.closeUnmodifiedEditorsInGroupAction); secondaryEditorActions.push(this.closeEditorsInGroupAction); } @@ -440,6 +443,7 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl actions.push(this.closeRightEditorsAction); } + actions.push(this.closeUnmodifiedEditorsInGroupAction); actions.push(this.closeEditorsInGroupAction); if (tabOptions.previewEditors) { @@ -461,6 +465,7 @@ export abstract class TitleControl extends Themable implements ITitleAreaControl this.showEditorsInGroupAction, this.closeEditorAction, this.closeRightEditorsAction, + this.closeUnmodifiedEditorsInGroupAction, this.closeOtherEditorsAction, this.closeEditorsInGroupAction, this.pinEditorAction diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index 7a7872472ceff..b8da38bc82202 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -56,6 +56,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' const HELP_PREFIX = '?'; interface IInternalPickOptions { + contextKey?: string; value?: string; valueSelection?: [number, number]; placeHolder?: string; @@ -84,6 +85,7 @@ export class QuickOpenController extends Component implements IQuickOpenService private pickOpenWidget: QuickOpenWidget; private layoutDimensions: Dimension; private mapResolvedHandlersToPrefix: { [prefix: string]: TPromise; }; + private mapContextKeyToContext: { [id: string]: IContextKey; }; private handlerOnOpenCalled: { [prefix: string]: boolean; }; private currentResultToken: string; private currentPickerToken: string; @@ -100,7 +102,7 @@ export class QuickOpenController extends Component implements IQuickOpenService @IMessageService private messageService: IMessageService, @ITelemetryService private telemetryService: ITelemetryService, @IWorkspaceContextService private contextService: IWorkspaceContextService, - @IContextKeyService contextKeyService: IContextKeyService, + @IContextKeyService private contextKeyService: IContextKeyService, @IConfigurationService private configurationService: IConfigurationService, @IHistoryService private historyService: IHistoryService, @IInstantiationService private instantiationService: IInstantiationService, @@ -112,6 +114,7 @@ export class QuickOpenController extends Component implements IQuickOpenService this.mapResolvedHandlersToPrefix = {}; this.handlerOnOpenCalled = {}; + this.mapContextKeyToContext = {}; this.promisesToCompleteOnHide = []; @@ -268,6 +271,9 @@ export class QuickOpenController extends Component implements IQuickOpenService const currentPickerToken = defaultGenerator.nextId(); this.currentPickerToken = currentPickerToken; + // Update context + this.setQuickOpenContextKey(options.contextKey); + // Create upon first open if (!this.pickOpenWidget) { this.pickOpenWidget = new QuickOpenWidget( @@ -578,6 +584,10 @@ export class QuickOpenController extends Component implements IQuickOpenService autoFocus = { autoFocusFirstEntry: visibleEditorCount === 0, autoFocusSecondEntry: visibleEditorCount !== 0 }; } + // Update context + const registry = Registry.as(Extensions.Quickopen); + this.setQuickOpenContextKey(registry.getDefaultQuickOpenHandler().contextKey); + this.quickOpenWidget.show(editorHistory, { quickNavigateConfiguration, autoFocus, inputSelection }); } } @@ -625,8 +635,8 @@ export class QuickOpenController extends Component implements IQuickOpenService const promise = this.mapResolvedHandlersToPrefix[prefix]; promise.then(handler => { this.handlerOnOpenCalled[prefix] = false; - // Don't check if onOpen was called to preserve old behaviour for now - handler.onClose(reason === HideReason.CANCELED); + + handler.onClose(reason === HideReason.CANCELED); // Don't check if onOpen was called to preserve old behaviour for now }); } } @@ -641,10 +651,39 @@ export class QuickOpenController extends Component implements IQuickOpenService this.restoreFocus(); // focus back to editor unless user clicked somewhere else } + // Reset context keys this.inQuickOpenMode.reset(); + this.resetQuickOpenContextKeys(); + + // Events this.emitQuickOpenVisibilityChange(false); } + private resetQuickOpenContextKeys(): void { + Object.keys(this.mapContextKeyToContext).forEach(k => this.mapContextKeyToContext[k].reset()); + } + + private setQuickOpenContextKey(id?: string): void { + let key: IContextKey; + if (id) { + key = this.mapContextKeyToContext[id]; + if (!key) { + key = new RawContextKey(id, false).bindTo(this.contextKeyService); + this.mapContextKeyToContext[id] = key; + } + } + + if (key && key.get()) { + return; // already active context + } + + this.resetQuickOpenContextKeys(); + + if (key) { + key.set(true); + } + } + private hasHandler(prefix: string): boolean { return !!Registry.as(Extensions.Quickopen).getQuickOpenHandler(prefix); } @@ -677,6 +716,7 @@ export class QuickOpenController extends Component implements IQuickOpenService const handlerDescriptor = registry.getQuickOpenHandler(value); const defaultHandlerDescriptor = registry.getDefaultQuickOpenHandler(); const instantProgress = handlerDescriptor && handlerDescriptor.instantProgress; + const contextKey = handlerDescriptor ? handlerDescriptor.contextKey : defaultHandlerDescriptor.contextKey; // Use a generated token to avoid race conditions from long running promises const currentResultToken = defaultGenerator.nextId(); @@ -690,6 +730,9 @@ export class QuickOpenController extends Component implements IQuickOpenService // Reset Extra Class this.quickOpenWidget.setExtraClass(null); + // Update context + this.setQuickOpenContextKey(contextKey); + // Remove leading and trailing whitespace const trimmedValue = strings.trim(value); @@ -701,6 +744,7 @@ export class QuickOpenController extends Component implements IQuickOpenService .done(null, errors.onUnexpectedError); this.quickOpenWidget.setInput(this.getEditorHistoryWithGroupLabel(), { autoFocusFirstEntry: true }); + return; } diff --git a/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.ts b/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.ts index 6d696c729c08a..e263e028e106a 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickopen.contribution.ts @@ -5,121 +5,13 @@ 'use strict'; import { Registry } from 'vs/platform/platform'; -import { TPromise } from 'vs/base/common/winjs.base'; -import nls = require('vs/nls'); -import { Action } from 'vs/base/common/actions'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; -import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; -import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; -import { KeybindingsRegistry, IKeybindings } from 'vs/platform/keybinding/common/keybindingsRegistry'; +import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { RemoveFromEditorHistoryAction } from 'vs/workbench/browser/parts/quickopen/quickOpenController'; - -export class GlobalQuickOpenAction extends Action { - - public static ID = 'workbench.action.quickOpen'; - public static LABEL = nls.localize('quickOpen', "Go to File..."); - - constructor(id: string, label: string, @IQuickOpenService private quickOpenService: IQuickOpenService) { - super(id, label); - - this.order = 100; // Allow other actions to position before or after - this.class = 'quickopen'; - } - - public run(): TPromise { - this.quickOpenService.show(null); - - return TPromise.as(true); - } -} - -export class BaseQuickOpenNavigateAction extends Action { - - constructor( - id: string, - label: string, - private next: boolean, - private quickNavigate: boolean, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IKeybindingService private keybindingService: IKeybindingService - ) { - super(id, label); - } - - public run(event?: any): TPromise { - const keys = this.keybindingService.lookupKeybindings(this.id); - const quickNavigate = this.quickNavigate ? { keybindings: keys } : void 0; - - this.quickOpenService.navigate(this.next, quickNavigate); - - return TPromise.as(true); - } -} - -export class QuickOpenNavigateNextAction extends BaseQuickOpenNavigateAction { - - public static ID = 'workbench.action.quickOpenNavigateNext'; - public static LABEL = nls.localize('quickNavigateNext', "Navigate Next in Quick Open"); - - constructor( - id: string, - label: string, - @IQuickOpenService quickOpenService: IQuickOpenService, - @IKeybindingService keybindingService: IKeybindingService - ) { - super(id, label, true, true, quickOpenService, keybindingService); - } -} - -export class QuickOpenNavigatePreviousAction extends BaseQuickOpenNavigateAction { - - public static ID = 'workbench.action.quickOpenNavigatePrevious'; - public static LABEL = nls.localize('quickNavigatePrevious', "Navigate Previous in Quick Open"); - - constructor( - id: string, - label: string, - @IQuickOpenService quickOpenService: IQuickOpenService, - @IKeybindingService keybindingService: IKeybindingService - ) { - super(id, label, false, true, quickOpenService, keybindingService); - } -} - -export class QuickOpenSelectNextAction extends BaseQuickOpenNavigateAction { - - public static ID = 'workbench.action.quickOpenSelectNext'; - public static LABEL = nls.localize('quickSelectNext', "Select Next in Quick Open"); - - constructor( - id: string, - label: string, - @IQuickOpenService quickOpenService: IQuickOpenService, - @IKeybindingService keybindingService: IKeybindingService - ) { - super(id, label, true, false, quickOpenService, keybindingService); - } -} - -export class QuickOpenSelectPreviousAction extends BaseQuickOpenNavigateAction { - - public static ID = 'workbench.action.quickOpenSelectPrevious'; - public static LABEL = nls.localize('quickSelectPrevious', "Select Previous in Quick Open"); - - constructor( - id: string, - label: string, - @IQuickOpenService quickOpenService: IQuickOpenService, - @IKeybindingService keybindingService: IKeybindingService - ) { - super(id, label, false, false, quickOpenService, keybindingService); - } -} - -const inQuickOpenContext = ContextKeyExpr.has('inQuickOpen'); +import { GlobalQuickOpenAction, QuickOpenSelectNextAction, QuickOpenSelectPreviousAction, inQuickOpenContext, getQuickNavigateHandler, QuickOpenNavigateNextAction, QuickOpenNavigatePreviousAction, defaultQuickOpenContext } from "vs/workbench/browser/parts/quickopen/quickopen"; KeybindingsRegistry.registerCommandAndKeybindingRule({ id: 'workbench.action.closeQuickOpen', @@ -154,41 +46,38 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({ } }); -function navigateKeybinding(shift: boolean): IKeybindings { - if (!shift) { - return { - primary: KeyMod.CtrlCmd | KeyCode.Tab, - secondary: [KeyMod.CtrlCmd | KeyCode.KEY_Q, KeyMod.CtrlCmd | KeyCode.KEY_E, KeyMod.CtrlCmd | KeyCode.KEY_P], - mac: { - primary: KeyMod.WinCtrl | KeyCode.Tab, - secondary: [KeyMod.WinCtrl | KeyCode.KEY_Q, KeyMod.CtrlCmd | KeyCode.KEY_P] - }, - linux: { - primary: KeyMod.CtrlCmd | KeyCode.Tab, - secondary: [KeyMod.CtrlCmd | KeyCode.KEY_E, KeyMod.CtrlCmd | KeyCode.KEY_P] - } - }; - } - - return { - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Tab, - secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_Q, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_E, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_P], - mac: { - primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Tab, - secondary: [KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_Q, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_P] - }, - linux: { - primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Tab, - secondary: [KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_E, KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_P] - } - }; -} - const registry = Registry.as(ActionExtensions.WorkbenchActions); -registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalQuickOpenAction, GlobalQuickOpenAction.ID, GlobalQuickOpenAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_P, secondary: [KeyMod.CtrlCmd | KeyCode.KEY_E], mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_P, secondary: null } }), 'Go to File...'); -registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenNavigateNextAction, QuickOpenNavigateNextAction.ID, QuickOpenNavigateNextAction.LABEL, navigateKeybinding(false), inQuickOpenContext, KeybindingsRegistry.WEIGHT.workbenchContrib(50)), 'Navigate Next in Quick Open'); -registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenNavigatePreviousAction, QuickOpenNavigatePreviousAction.ID, QuickOpenNavigatePreviousAction.LABEL, navigateKeybinding(true), inQuickOpenContext, KeybindingsRegistry.WEIGHT.workbenchContrib(50)), 'Navigate Previous in Quick Open'); +const globalQuickOpenKeybinding = { primary: KeyMod.CtrlCmd | KeyCode.KEY_P, secondary: [KeyMod.CtrlCmd | KeyCode.KEY_E], mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_P, secondary: null } }; + +registry.registerWorkbenchAction(new SyncActionDescriptor(GlobalQuickOpenAction, GlobalQuickOpenAction.ID, GlobalQuickOpenAction.LABEL, globalQuickOpenKeybinding), 'Go to File...'); registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenSelectNextAction, QuickOpenSelectNextAction.ID, QuickOpenSelectNextAction.LABEL, { primary: null, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_N } }, inQuickOpenContext, KeybindingsRegistry.WEIGHT.workbenchContrib(50)), 'Select Next in Quick Open'); registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenSelectPreviousAction, QuickOpenSelectPreviousAction.ID, QuickOpenSelectPreviousAction.LABEL, { primary: null, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_P } }, inQuickOpenContext, KeybindingsRegistry.WEIGHT.workbenchContrib(50)), 'Select Previous in Quick Open'); +registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenNavigateNextAction, QuickOpenNavigateNextAction.ID, QuickOpenNavigateNextAction.LABEL), 'Navigate Next in Quick Open'); +registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenNavigatePreviousAction, QuickOpenNavigatePreviousAction.ID, QuickOpenNavigatePreviousAction.LABEL), 'Navigate Previous in Quick Open'); registry.registerWorkbenchAction(new SyncActionDescriptor(RemoveFromEditorHistoryAction, RemoveFromEditorHistoryAction.ID, RemoveFromEditorHistoryAction.LABEL), 'Remove From History'); + +const quickOpenNavigateNextInFilePickerId = 'workbench.action.quickOpenNavigateNextInFilePicker'; +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigateNextInFilePickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigateNextInFilePickerId, true), + when: defaultQuickOpenContext, + primary: globalQuickOpenKeybinding.primary, + secondary: globalQuickOpenKeybinding.secondary, + mac: globalQuickOpenKeybinding.mac +}); + +const quickOpenNavigatePreviousInFilePickerId = 'workbench.action.quickOpenNavigatePreviousInFilePicker'; +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigatePreviousInFilePickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigatePreviousInFilePickerId, false), + when: defaultQuickOpenContext, + primary: globalQuickOpenKeybinding.primary | KeyMod.Shift, + secondary: [globalQuickOpenKeybinding.secondary[0] | KeyMod.Shift], + mac: { + primary: globalQuickOpenKeybinding.mac.primary | KeyMod.Shift, + secondary: null + } +}); \ No newline at end of file diff --git a/src/vs/workbench/browser/parts/quickopen/quickopen.ts b/src/vs/workbench/browser/parts/quickopen/quickopen.ts new file mode 100644 index 0000000000000..be16c8f57b2dd --- /dev/null +++ b/src/vs/workbench/browser/parts/quickopen/quickopen.ts @@ -0,0 +1,132 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { TPromise } from 'vs/base/common/winjs.base'; +import nls = require('vs/nls'); +import { Action } from 'vs/base/common/actions'; +import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; +import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; +import { ContextKeyExpr } from "vs/platform/contextkey/common/contextkey"; +import { ICommandHandler } from "vs/platform/commands/common/commands"; + +export const inQuickOpenContext = ContextKeyExpr.has('inQuickOpen'); +export const defaultQuickOpenContextKey = 'inFilesPicker'; +export const defaultQuickOpenContext = ContextKeyExpr.and(inQuickOpenContext, ContextKeyExpr.has(defaultQuickOpenContextKey)); + +export class GlobalQuickOpenAction extends Action { + + public static ID = 'workbench.action.quickOpen'; + public static LABEL = nls.localize('quickOpen', "Go to File..."); + + constructor(id: string, label: string, @IQuickOpenService private quickOpenService: IQuickOpenService) { + super(id, label); + + this.order = 100; // Allow other actions to position before or after + this.class = 'quickopen'; + } + + public run(): TPromise { + this.quickOpenService.show(null); + + return TPromise.as(true); + } +} + +export class BaseQuickOpenNavigateAction extends Action { + + constructor( + id: string, + label: string, + private next: boolean, + private quickNavigate: boolean, + @IQuickOpenService private quickOpenService: IQuickOpenService, + @IKeybindingService private keybindingService: IKeybindingService + ) { + super(id, label); + } + + public run(event?: any): TPromise { + const keys = this.keybindingService.lookupKeybindings(this.id); + const quickNavigate = this.quickNavigate ? { keybindings: keys } : void 0; + + this.quickOpenService.navigate(this.next, quickNavigate); + + return TPromise.as(true); + } +} + +export function getQuickNavigateHandler(id: string, next?: boolean): ICommandHandler { + return accessor => { + const keybindingService = accessor.get(IKeybindingService); + const quickOpenService = accessor.get(IQuickOpenService); + + const keys = keybindingService.lookupKeybindings(id); + const quickNavigate = { keybindings: keys }; + + quickOpenService.navigate(next, quickNavigate); + }; +} + +export class QuickOpenNavigateNextAction extends BaseQuickOpenNavigateAction { + + public static ID = 'workbench.action.quickOpenNavigateNext'; + public static LABEL = nls.localize('quickNavigateNext', "Navigate Next in Quick Open"); + + constructor( + id: string, + label: string, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, true, true, quickOpenService, keybindingService); + } +} + +export class QuickOpenNavigatePreviousAction extends BaseQuickOpenNavigateAction { + + public static ID = 'workbench.action.quickOpenNavigatePrevious'; + public static LABEL = nls.localize('quickNavigatePrevious', "Navigate Previous in Quick Open"); + + constructor( + id: string, + label: string, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, false, true, quickOpenService, keybindingService); + } +} + +export class QuickOpenSelectNextAction extends BaseQuickOpenNavigateAction { + + public static ID = 'workbench.action.quickOpenSelectNext'; + public static LABEL = nls.localize('quickSelectNext', "Select Next in Quick Open"); + + constructor( + id: string, + label: string, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, true, false, quickOpenService, keybindingService); + } +} + +export class QuickOpenSelectPreviousAction extends BaseQuickOpenNavigateAction { + + public static ID = 'workbench.action.quickOpenSelectPrevious'; + public static LABEL = nls.localize('quickSelectPrevious', "Select Previous in Quick Open"); + + constructor( + id: string, + label: string, + @IQuickOpenService quickOpenService: IQuickOpenService, + @IKeybindingService keybindingService: IKeybindingService + ) { + super(id, label, false, false, quickOpenService, keybindingService); + } +} \ No newline at end of file diff --git a/src/vs/workbench/browser/quickopen.ts b/src/vs/workbench/browser/quickopen.ts index 152265f629a4e..62941ff5712db 100644 --- a/src/vs/workbench/browser/quickopen.ts +++ b/src/vs/workbench/browser/quickopen.ts @@ -131,18 +131,21 @@ export interface QuickOpenHandlerHelpEntry { export class QuickOpenHandlerDescriptor extends AsyncDescriptor { public prefix: string; public description: string; + public contextKey: string; public isDefault: boolean; public helpEntries: QuickOpenHandlerHelpEntry[]; public instantProgress: boolean; + private id: string; - constructor(moduleId: string, ctorName: string, prefix: string, description: string, instantProgress?: boolean); - constructor(moduleId: string, ctorName: string, prefix: string, helpEntries: QuickOpenHandlerHelpEntry[], instantProgress?: boolean); - constructor(moduleId: string, ctorName: string, prefix: string, param: any, instantProgress: boolean = false) { + constructor(moduleId: string, ctorName: string, prefix: string, contextKey: string, description: string, instantProgress?: boolean); + constructor(moduleId: string, ctorName: string, prefix: string, contextKey: string, helpEntries: QuickOpenHandlerHelpEntry[], instantProgress?: boolean); + constructor(moduleId: string, ctorName: string, prefix: string, contextKey: string, param: any, instantProgress: boolean = false) { super(moduleId, ctorName); - this.prefix = prefix; this.id = moduleId + ctorName; + this.prefix = prefix; + this.contextKey = contextKey; this.instantProgress = instantProgress; if (types.isString(param)) { diff --git a/src/vs/workbench/common/editor/editorStacksModel.ts b/src/vs/workbench/common/editor/editorStacksModel.ts index c6bd0d5602b20..dd41ad0eb1e50 100644 --- a/src/vs/workbench/common/editor/editorStacksModel.ts +++ b/src/vs/workbench/common/editor/editorStacksModel.ts @@ -277,8 +277,7 @@ export class EditorGroup implements IEditorGroup { targetIndex--; // accomodate for the fact that the preview editor closes } - this.closeEditor(this.preview, !makeActive); // optimization to prevent multiple setActive() in one call - this.splice(targetIndex, false, editor); + this.replaceEditor(this.preview, editor, targetIndex, !makeActive); } this.preview = editor; @@ -345,10 +344,31 @@ export class EditorGroup implements IEditorGroup { })); } + public replaceEditor(toReplace: EditorInput, replaceWidth: EditorInput, replaceIndex: number, openNext = true): void { + const event = this.doCloseEditor(toReplace, openNext); // optimization to prevent multiple setActive() in one call + + // We want to first add the new editor into our model before emitting the close event because + // firing the close event can trigger a dispose on the same editor that is now being added. + // This can lead into opening a disposed editor which is not what we want. + this.splice(replaceIndex, false, replaceWidth); + + if (event) { + this.fireEvent(this._onEditorClosed, event, true); + } + } + public closeEditor(editor: EditorInput, openNext = true): void { + const event = this.doCloseEditor(editor, openNext); + + if (event) { + this.fireEvent(this._onEditorClosed, event, true); + } + } + + private doCloseEditor(editor: EditorInput, openNext = true): EditorCloseEvent { const index = this.indexOf(editor); if (index === -1) { - return; // not found + return null; // not found } // Active Editor closed @@ -376,7 +396,7 @@ export class EditorGroup implements IEditorGroup { this.splice(index, true); // Event - this.fireEvent(this._onEditorClosed, { editor, pinned, index, group: this }, true); + return { editor, pinned, index, group: this }; } public closeEditors(except: EditorInput, direction?: Direction): void { diff --git a/src/vs/workbench/electron-browser/actions.ts b/src/vs/workbench/electron-browser/actions.ts index ef63d8a7cf6c0..3f8b05dab1f2a 100644 --- a/src/vs/workbench/electron-browser/actions.ts +++ b/src/vs/workbench/electron-browser/actions.ts @@ -591,6 +591,7 @@ export abstract class BaseSwitchWindow extends Action { } as IFilePickOpenEntry)); this.quickOpenService.pick(picks, { + contextKey: 'inWindowsPicker', autoFocus: { autoFocusFirstEntry: true }, placeHolder, quickNavigateConfiguration: this.isQuickNavigate() ? { keybindings: this.keybindingService.lookupKeybindings(this.id) } : void 0 @@ -641,6 +642,8 @@ export class QuickSwitchWindow extends BaseSwitchWindow { } } +export const inRecentFilesPickerContextKey = 'inRecentFilesPicker'; + export abstract class BaseOpenRecentAction extends Action { constructor( @@ -693,6 +696,7 @@ export abstract class BaseOpenRecentAction extends Action { const hasWorkspace = this.contextService.hasWorkspace(); this.quickOpenService.pick(folderPicks.concat(...filePicks), { + contextKey: inRecentFilesPickerContextKey, autoFocus: { autoFocusFirstEntry: !hasWorkspace, autoFocusSecondEntry: hasWorkspace }, placeHolder: isMacintosh ? nls.localize('openRecentPlaceHolderMac', "Select a path (hold Cmd-key to open in new window)") : nls.localize('openRecentPlaceHolder', "Select a path to open (hold Ctrl-key to open in new window)"), matchOnDescription: true, diff --git a/src/vs/workbench/electron-browser/extensionHost.ts b/src/vs/workbench/electron-browser/extensionHost.ts index 6b99c054bb769..fdf5531f05fa0 100644 --- a/src/vs/workbench/electron-browser/extensionHost.ts +++ b/src/vs/workbench/electron-browser/extensionHost.ts @@ -29,7 +29,7 @@ import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; import { generateRandomPipeName, Protocol } from 'vs/base/parts/ipc/node/ipc.net'; import { createServer, Server } from 'net'; import Event, { Emitter } from 'vs/base/common/event'; -import { IInitData } from 'vs/workbench/api/node/extHost.protocol'; +import { IInitData, IWorkspaceData } from 'vs/workbench/api/node/extHost.protocol'; import { MainProcessExtensionService } from 'vs/workbench/api/electron-browser/mainThreadExtensionService'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; import { ICrashReporterService } from 'vs/workbench/services/crashReporter/common/crashReporterService'; @@ -259,7 +259,7 @@ export class ExtensionHostProcessWorker { enableProposedApiForAll: !this.environmentService.isBuilt || (!!this.environmentService.extensionDevelopmentPath && product.nameLong.indexOf('Insiders') >= 0), enableProposedApiFor: this.environmentService.args['enable-proposed-api'] || [] }, - workspace: this.contextService.getWorkspace(), + workspace: this.contextService.getWorkspace2(), extensions: extensionDescriptions, configuration: this.configurationService.values(), telemetryInfo diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index cf9c5e45db704..cf8ae033c6d8a 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -28,6 +28,9 @@ import { IInitData } from 'vs/workbench/services/timer/common/timerService'; import { TimerService } from 'vs/workbench/services/timer/node/timerService'; import { KeyboardMapperFactory } from "vs/workbench/services/keybinding/electron-browser/keybindingService"; import { IWindowConfiguration, IPath } from "vs/platform/windows/common/windows"; +import { IStorageService } from "vs/platform/storage/common/storage"; +import { IEnvironmentService } from "vs/platform/environment/common/environment"; +import { StorageService, inMemoryLocalStorageInstance, IWorkspaceStorageIdentifier } from "vs/platform/storage/common/storageService"; import { webFrame } from 'electron'; @@ -62,12 +65,8 @@ export function startup(configuration: IWindowConfiguration): TPromise { filesToDiff }; - // Resolve workspace - return getWorkspace(configuration.workspacePath).then(workspace => { - - // Open workbench - return openWorkbench(configuration, workspace, shellOptions); - }); + // Open workbench + return openWorkbench(configuration, shellOptions); } function toInputs(paths: IPath[], isUntitledFile?: boolean): IResourceInput[] { @@ -95,12 +94,53 @@ function toInputs(paths: IPath[], isUntitledFile?: boolean): IResourceInput[] { }); } -function getWorkspace(workspacePath: string): TPromise { - if (!workspacePath) { +function openWorkbench(configuration: IWindowConfiguration, options: IOptions): TPromise { + return getWorkspace(configuration).then(workspace => { + const environmentService = new EnvironmentService(configuration, configuration.execPath); + const workspaceConfigurationService = new WorkspaceConfigurationService(environmentService, workspace); + const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !workspaceConfigurationService.hasWorkspace()); + + return createStorageService(configuration, environmentService).then(storageService => { + + // Since the configuration service is one of the core services that is used in so many places, we initialize it + // right before startup of the workbench shell to have its data ready for consumers + return workspaceConfigurationService.initialize().then(() => { + timerService.beforeDOMContentLoaded = Date.now(); + + return domContentLoaded().then(() => { + timerService.afterDOMContentLoaded = Date.now(); + + // Open Shell + timerService.beforeWorkbenchOpen = Date.now(); + const shell = new WorkbenchShell(document.body, { + contextService: workspaceConfigurationService, + configurationService: workspaceConfigurationService, + environmentService, + timerService, + storageService + }, configuration, options); + shell.open(); + + // Inform user about loading issues from the loader + (self).require.config({ + onError: (err: any) => { + if (err.errorCode === 'load') { + shell.onUnexpectedError(loaderError(err)); + } + } + }); + }); + }); + }); + }); +} + +function getWorkspace(configuration: IWindowConfiguration): TPromise { + if (!configuration.workspacePath) { return TPromise.as(null); } - return realpath(workspacePath).then(realWorkspacePath => { + return realpath(configuration.workspacePath).then(realWorkspacePath => { // for some weird reason, node adds a trailing slash to UNC paths // we never ever want trailing slashes as our workspace path unless @@ -110,16 +150,13 @@ function getWorkspace(workspacePath: string): TPromise { realWorkspacePath = strings.rtrim(realWorkspacePath, paths.nativeSep); } + // update config + configuration.workspacePath = realWorkspacePath; + const workspaceResource = uri.file(realWorkspacePath); const folderName = path.basename(realWorkspacePath) || realWorkspacePath; - return stat(realWorkspacePath).then(folderStat => { - return new Workspace( - workspaceResource, - platform.isLinux ? folderStat.ino : folderStat.birthtime.getTime(), - folderName // On Linux, birthtime is ctime, so we cannot use it! We use the ino instead! - ); - }); + return new Workspace(workspaceResource, folderName); }, error => { errors.onUnexpectedError(error); @@ -127,38 +164,30 @@ function getWorkspace(workspacePath: string): TPromise { }); } -function openWorkbench(configuration: IWindowConfiguration, workspace: Workspace, options: IOptions): TPromise { - const environmentService = new EnvironmentService(configuration, configuration.execPath); - const workspaceConfigurationService = new WorkspaceConfigurationService(environmentService, workspace); - const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !workspaceConfigurationService.hasWorkspace()); - - // Since the configuration service is one of the core services that is used in so many places, we initialize it - // right before startup of the workbench shell to have its data ready for consumers - return workspaceConfigurationService.initialize().then(() => { - timerService.beforeDOMContentLoaded = Date.now(); - - return domContentLoaded().then(() => { - timerService.afterDOMContentLoaded = Date.now(); - - // Open Shell - timerService.beforeWorkbenchOpen = Date.now(); - const shell = new WorkbenchShell(document.body, { - contextService: workspaceConfigurationService, - configurationService: workspaceConfigurationService, - environmentService, - timerService - }, configuration, options); - shell.open(); - - // Inform user about loading issues from the loader - (self).require.config({ - onError: (err: any) => { - if (err.errorCode === 'load') { - shell.onUnexpectedError(loaderError(err)); - } - } - }); - }); +function createStorageService(configuration: IWindowConfiguration, environmentService: IEnvironmentService): TPromise { + let workspaceStatPromise: TPromise = TPromise.as(null); + if (configuration.workspacePath) { + workspaceStatPromise = stat(configuration.workspacePath); + } + + return workspaceStatPromise.then(stat => { + let id: IWorkspaceStorageIdentifier; + if (stat) { + id = { resource: uri.file(configuration.workspacePath), uid: platform.isLinux ? stat.ino : stat.birthtime.getTime() }; + } else if (configuration.backupPath) { + // if we do not have a workspace open, we need to find another identifier for the window to store + // workspace UI state. if we have a backup path in the configuration we can use that because this + // will be a unique identifier per window that is stable between restarts as long as there are + // dirty files in the workspace. + // We use basename() to produce a short identifier, we do not need the full path. We use a custom + // scheme so that we can later distinguish these identifiers from the workspace one. + id = { resource: uri.from({ path: path.basename(configuration.backupPath), scheme: 'empty' }) }; + } + + const disableStorage = !!environmentService.extensionTestsPath; // never keep any state when running extension tests! + const storage = disableStorage ? inMemoryLocalStorageInstance : window.localStorage; + + return new StorageService(storage, storage, id); }); } diff --git a/src/vs/workbench/electron-browser/media/shell.css b/src/vs/workbench/electron-browser/media/shell.css index 5696fc87867aa..f734da27292c9 100644 --- a/src/vs/workbench/electron-browser/media/shell.css +++ b/src/vs/workbench/electron-browser/media/shell.css @@ -15,7 +15,7 @@ /* Font Families (with CJK support) */ -.monaco-shell { font-family: system-ui, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; } +.monaco-shell { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; } .monaco-shell:lang(zh-Hans) { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Noto Sans", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; } .monaco-shell:lang(zh-Hant) { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Noto Sans", "Microsoft Jhenghei", "PingFang TC", "Source Han Sans TC", "Source Han Sans", "Source Han Sans TW", sans-serif; } .monaco-shell:lang(ja) { font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Noto Sans", "Meiryo", "Hiragino Kaku Gothic Pro", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", "Sazanami Gothic", "IPA Gothic", sans-serif; } diff --git a/src/vs/workbench/electron-browser/shell.ts b/src/vs/workbench/electron-browser/shell.ts index 141b3285c0a6d..015cc5f7bbdfd 100644 --- a/src/vs/workbench/electron-browser/shell.ts +++ b/src/vs/workbench/electron-browser/shell.ts @@ -21,7 +21,6 @@ import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import pkg from 'vs/platform/node/package'; import { ContextViewService } from 'vs/platform/contextview/browser/contextViewService'; import { Workbench, IWorkbenchStartedInfo } from 'vs/workbench/electron-browser/workbench'; -import { StorageService, inMemoryLocalStorageInstance } from 'vs/platform/storage/common/storageService'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { NullTelemetryService, configurationTelemetry, loadExperiments, lifecycleTelemetry } from 'vs/platform/telemetry/common/telemetryUtils'; import { ITelemetryAppenderChannel, TelemetryAppenderClient } from 'vs/platform/telemetry/common/telemetryIpc'; @@ -89,8 +88,6 @@ import { IURLService } from 'vs/platform/url/common/url'; import { ExtensionHostProcessWorker } from 'vs/workbench/electron-browser/extensionHost'; import { ITimerService } from 'vs/workbench/services/timer/common/timerService'; import { remote, ipcRenderer as ipc } from 'electron'; -import URI from "vs/base/common/uri"; -import { basename } from "path"; import { ITextMateService } from 'vs/editor/node/textMate/textMateService'; import { MainProcessTextMateSyntax } from 'vs/editor/electron-browser/textMate/TMSyntax'; import { BareFontInfo } from 'vs/editor/common/config/fontInfo'; @@ -110,6 +107,7 @@ export interface ICoreServices { configurationService: IConfigurationService; environmentService: IEnvironmentService; timerService: ITimerService; + storageService: IStorageService; } const currentWindow = remote.getCurrentWindow(); @@ -155,6 +153,7 @@ export class WorkbenchShell { this.configurationService = services.configurationService; this.environmentService = services.environmentService; this.timerService = services.timerService; + this.storageService = services.storageService; this.toUnbind = []; this.previousErrorTime = 0; @@ -251,6 +250,7 @@ export class WorkbenchShell { serviceCollection.set(IConfigurationService, this.configurationService); serviceCollection.set(IEnvironmentService, this.environmentService); serviceCollection.set(ITimerService, this.timerService); + serviceCollection.set(IStorageService, this.storageService); const instantiationService: IInstantiationService = new InstantiationService(serviceCollection, true); @@ -273,22 +273,6 @@ export class WorkbenchShell { sharedProcess .done(client => client.registerChannel('choice', instantiationService.createInstance(ChoiceChannel))); - // Storage Sevice - let workspaceIdentifier = this.contextService.getWorkspace(); - if (!workspaceIdentifier && !!this.configuration.backupPath) { - // if we do not have a workspace open, we need to find another identifier for the window to store - // workspace UI state. if we have a backup path in the configuration we can use that because this - // will be a unique identifier per window that is stable between restarts as long as there are - // dirty files in the workspace. - // We use basename() to produce a short identifier, we do not need the full path. We use a custom - // scheme so that we can later distinguish these identifiers from the workspace one. - workspaceIdentifier = { resource: URI.from({ path: basename(this.configuration.backupPath), scheme: 'empty' }) }; - } - const disableStorage = !!this.environmentService.extensionTestsPath; // never keep any state when running extension tests! - const storage = disableStorage ? inMemoryLocalStorageInstance : window.localStorage; - this.storageService = new StorageService(storage, storage, workspaceIdentifier); - serviceCollection.set(IStorageService, this.storageService); - // Warm up font cache information before building up too many dom elements restoreFontInfo(this.storageService); readFontInfo(BareFontInfo.createFromRawSettings(this.configurationService.getConfiguration('editor'), browser.getZoomLevel())); diff --git a/src/vs/workbench/electron-browser/workbench.main.ts b/src/vs/workbench/electron-browser/workbench.main.ts index a8fee7959d001..d68ce2e3acf20 100644 --- a/src/vs/workbench/electron-browser/workbench.main.ts +++ b/src/vs/workbench/electron-browser/workbench.main.ts @@ -31,6 +31,7 @@ import 'vs/workbench/parts/preferences/browser/preferences.contribution'; import 'vs/workbench/parts/preferences/browser/keybindingsEditorContribution'; import 'vs/workbench/browser/actions/configureLocale'; +import 'vs/workbench/browser/parts/quickopen/quickopen.contribution'; import 'vs/workbench/parts/quickopen/browser/quickopen.contribution'; import 'vs/workbench/browser/parts/editor/editorPicker'; diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 3256b4b5152fa..277811b7aacfd 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -92,9 +92,11 @@ import { IContextMenuService } from 'vs/platform/contextview/browser/contextView import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWorkbenchActionRegistry, Extensions } from 'vs/workbench/common/actionRegistry'; -import { OpenRecentAction, ToggleDevToolsAction, ReloadWindowAction } from "vs/workbench/electron-browser/actions"; +import { OpenRecentAction, ToggleDevToolsAction, ReloadWindowAction, inRecentFilesPickerContextKey } from "vs/workbench/electron-browser/actions"; import { KeyMod } from 'vs/base/common/keyCodes'; import { KeyCode } from 'vs/editor/common/standalone/standaloneBase'; +import { KeybindingsRegistry } from "vs/platform/keybinding/common/keybindingsRegistry"; +import { getQuickNavigateHandler, inQuickOpenContext } from "vs/workbench/browser/parts/quickopen/quickopen"; export const MessagesVisibleContext = new RawContextKey('globalMessageVisible', false); export const EditorsVisibleContext = new RawContextKey('editorIsOpen', false); @@ -393,6 +395,28 @@ export class Workbench implements IPartService { workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ReloadWindowAction, ReloadWindowAction.ID, ReloadWindowAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyCode.KEY_R } : void 0), 'Reload Window'); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(ToggleDevToolsAction, ToggleDevToolsAction.ID, ToggleDevToolsAction.LABEL, isDeveloping ? { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_I, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_I } } : void 0), 'Developer: Toggle Developer Tools', localize('developer', "Developer")); workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(OpenRecentAction, OpenRecentAction.ID, OpenRecentAction.LABEL, { primary: isDeveloping ? null : KeyMod.CtrlCmd | KeyCode.KEY_R, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R } }), 'File: Open Recent...', localize('file', "File")); + + const recentFilesPickerContext = ContextKeyExpr.and(inQuickOpenContext, ContextKeyExpr.has(inRecentFilesPickerContextKey)); + + const quickOpenNavigateNextInRecentFilesPickerId = 'workbench.action.quickOpenNavigateNextInRecentFilesPicker'; + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigateNextInRecentFilesPickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigateNextInRecentFilesPickerId, true), + when: recentFilesPickerContext, + primary: KeyMod.CtrlCmd | KeyCode.KEY_R, + mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R } + }); + + const quickOpenNavigatePreviousInRecentFilesPicker = 'workbench.action.quickOpenNavigatePreviousInRecentFilesPicker'; + KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigatePreviousInRecentFilesPicker, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigatePreviousInRecentFilesPicker, false), + when: recentFilesPickerContext, + primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_R, + mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_R } + }); } private resolveEditorsToOpen(): TPromise { diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index 7f4aa8b0094d8..5c361eb9b0664 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -15,9 +15,8 @@ import { ExtHostThreadService } from 'vs/workbench/services/thread/common/extHos import { QueryType, ISearchQuery } from 'vs/platform/search/common/search'; import { DiskSearch } from 'vs/workbench/services/search/node/searchService'; import { RemoteTelemetryService } from 'vs/workbench/api/node/extHostTelemetry'; -import { IInitData, IEnvironment, MainContext } from 'vs/workbench/api/node/extHost.protocol'; +import { IInitData, IEnvironment, IWorkspaceData, MainContext } from 'vs/workbench/api/node/extHost.protocol'; import * as errors from 'vs/base/common/errors'; -import { IWorkspace } from "vs/platform/workspace/common/workspace"; const nativeExit = process.exit.bind(process); process.exit = function () { @@ -36,7 +35,7 @@ export class ExtensionHostMain { private _isTerminating: boolean = false; private _diskSearch: DiskSearch; - private _workspace: IWorkspace; + private _workspace: IWorkspaceData; private _environment: IEnvironment; private _extensionService: ExtHostExtensionService; @@ -101,11 +100,10 @@ export class ExtensionHostMain { } private handleWorkspaceContainsEagerExtensions(): TPromise { - if (!this._workspace || !this._workspace.resource) { + if (!this._workspace || this._workspace.roots.length === 0) { return TPromise.as(null); } - const folderPath = this._workspace.resource.fsPath; const desiredFilesMap: { [filename: string]: boolean; @@ -135,7 +133,7 @@ export class ExtensionHostMain { } const query: ISearchQuery = { - folderResources: [this._workspace.resource], + folderResources: this._workspace.roots, type: QueryType.File, maxResults: 1, includePattern: { [p]: true } @@ -143,7 +141,16 @@ export class ExtensionHostMain { return this._diskSearch.search(query).then(result => result.results.length ? p : undefined); } else { - return pfs.exists(join(folderPath, p)).then(exists => exists ? p : undefined); + // find exact path + return new TPromise(async resolve => { + for (const { fsPath } of this._workspace.roots) { + if (await pfs.exists(join(fsPath, p))) { + resolve(p); + return; + } + } + resolve(undefined); + }); } }); diff --git a/src/vs/workbench/parts/debug/browser/media/debugHover.css b/src/vs/workbench/parts/debug/browser/media/debugHover.css index a734651beab4d..6dd157e94495f 100644 --- a/src/vs/workbench/parts/debug/browser/media/debugHover.css +++ b/src/vs/workbench/parts/debug/browser/media/debugHover.css @@ -26,7 +26,7 @@ word-break: normal; text-overflow: ellipsis; height: 18px; - overflow: hidden; + overflow: auto; border-bottom: 1px solid rgba(128, 128, 128, 0.35); } @@ -64,6 +64,8 @@ .monaco-editor .debug-hover-widget .value { white-space: pre-wrap; color: rgba(108, 108, 108, 0.8); + overflow: auto; + max-height: 500px; } .monaco-editor .debug-hover-widget .error { diff --git a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts index 368615a85a9b3..c8c0e1831dd47 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts @@ -137,6 +137,7 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(SelectAndStartAction, 'vs/workbench/parts/debug/browser/debugQuickOpen', 'DebugQuickOpenHandler', 'debug ', + 'inLaunchConfigurationsPicker', nls.localize('debugCommands', "Debug Configuration") ) ); diff --git a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts index ce54f235ae5f2..6948d29a257bf 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugHover.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugHover.ts @@ -21,13 +21,13 @@ import { IDebugService, IExpression, IExpressionContainer } from 'vs/workbench/p import { Expression } from 'vs/workbench/parts/debug/common/debugModel'; import { VariablesRenderer, renderExpressionValue, VariablesDataSource } from 'vs/workbench/parts/debug/electron-browser/debugViewer'; import { IListService } from 'vs/platform/list/browser/listService'; +import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; import { attachListStyler, attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { editorHoverBackground, editorHoverBorder } from 'vs/platform/theme/common/colorRegistry'; const $ = dom.$; const MAX_ELEMENTS_SHOWN = 18; -const MAX_VALUE_RENDER_LENGTH_IN_HOVER = 4096; export class DebugHoverWidget implements IContentWidget { @@ -46,6 +46,7 @@ export class DebugHoverWidget implements IContentWidget { private valueContainer: HTMLElement; private stoleFocus: boolean; private toDispose: lifecycle.IDisposable[]; + private scrollbar: DomScrollableElement; constructor( private editor: ICodeEditor, @@ -58,9 +59,12 @@ export class DebugHoverWidget implements IContentWidget { this.create(instantiationService); this.registerListeners(); - this.valueContainer = dom.append(this.domNode, $('.value')); + this.valueContainer = $('.value'); this.valueContainer.tabIndex = 0; this.valueContainer.setAttribute('role', 'tooltip'); + this.scrollbar = new DomScrollableElement(this.valueContainer, {}); + this.domNode.appendChild(this.scrollbar.getDomNode()); + this.toDispose.push(this.scrollbar); this._isVisible = false; this.showAtPosition = null; @@ -249,9 +253,9 @@ export class DebugHoverWidget implements IContentWidget { this.valueContainer.hidden = false; renderExpressionValue(expression, this.valueContainer, { showChanged: false, - maxValueLength: MAX_VALUE_RENDER_LENGTH_IN_HOVER, preserveWhitespace: true }); + this.scrollbar.scanDomNode(); this.valueContainer.title = ''; this.editor.layoutContentWidget(this); if (focus) { diff --git a/src/vs/workbench/parts/debug/electron-browser/debugService.ts b/src/vs/workbench/parts/debug/electron-browser/debugService.ts index 40c3ce62b0515..a79f53cadd6c6 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugService.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugService.ts @@ -912,14 +912,12 @@ export class DebugService implements debug.IDebugService { let config = process.configuration; if (this.launchJsonChanged) { this.launchJsonChanged = false; - config = this.configurationManager.getConfiguration(process.configuration.name) || process.configuration; - if (config) { - // Take the type from the process since the debug extension might overwrite it #21316 - config.type = process.configuration.type; - config.noDebug = process.configuration.noDebug; - config.__restart = restartData; - } + config = this.configurationManager.getConfiguration(process.configuration.name) || config; + // Take the type from the process since the debug extension might overwrite it #21316 + config.type = process.configuration.type; + config.noDebug = process.configuration.noDebug; } + config.__restart = restartData; this.createProcess(config).then(() => c(null), err => e(err)); }, 300); }) diff --git a/src/vs/workbench/parts/extensions/browser/extensionEditor.ts b/src/vs/workbench/parts/extensions/browser/extensionEditor.ts index 9334cdb4f535b..84274e3c76e6c 100644 --- a/src/vs/workbench/parts/extensions/browser/extensionEditor.ts +++ b/src/vs/workbench/parts/extensions/browser/extensionEditor.ts @@ -358,7 +358,7 @@ export class ExtensionEditor extends BaseEditor { return this.loadContents(() => this.extensionManifest.get() .then(manifest => { const content = $('div', { class: 'subcontent' }); - const scrollableContent = new DomScrollableElement(content, { canUseTranslate3d: false }); + const scrollableContent = new DomScrollableElement(content, {}); const layout = () => scrollableContent.scanDomNode(); const removeLayoutParticipant = arrays.insert(this.layoutParticipants, { layout }); @@ -396,7 +396,7 @@ export class ExtensionEditor extends BaseEditor { return this.loadContents(() => { return this.extensionDependencies.get().then(extensionDependencies => { const content = $('div', { class: 'subcontent' }); - const scrollableContent = new DomScrollableElement(content, { canUseTranslate3d: false }); + const scrollableContent = new DomScrollableElement(content, {}); append(this.content, scrollableContent.getDomNode()); this.contentDisposables.push(scrollableContent); diff --git a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts index 34b56a366bb2a..e286fc06d0569 100644 --- a/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts +++ b/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.ts @@ -59,6 +59,7 @@ Registry.as(Extensions.Quickopen).registerQuickOpenHandler( 'vs/workbench/parts/extensions/browser/extensionsQuickOpen', 'ExtensionsHandler', 'ext ', + null, localize('extensionsCommands', "Manage Extensions"), true ) @@ -69,6 +70,7 @@ Registry.as(Extensions.Quickopen).registerQuickOpenHandler( 'vs/workbench/parts/extensions/browser/extensionsQuickOpen', 'GalleryExtensionsHandler', 'ext install ', + null, localize('galleryExtensionsCommands', "Install Gallery Extensions"), true ) diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts b/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts index 959e8c13aeb39..432e5922ac3c0 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsViewer.ts @@ -30,7 +30,7 @@ import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/edi import { EditorStacksModel, EditorGroup } from 'vs/workbench/common/editor/editorStacksModel'; import { SaveFileAction, RevertFileAction, SaveFileAsAction, OpenToSideAction, SelectResourceForCompareAction, CompareResourcesAction, SaveAllInGroupAction } from 'vs/workbench/parts/files/browser/fileActions'; import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; -import { CloseOtherEditorsInGroupAction, CloseEditorAction, CloseEditorsInGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; +import { CloseOtherEditorsInGroupAction, CloseEditorAction, CloseEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; const $ = dom.$; @@ -332,6 +332,7 @@ export class ActionProvider extends ContributableActionProvider { return [ saveAllAction, + this.instantiationService.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, CloseUnmodifiedEditorsInGroupAction.LABEL), this.instantiationService.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, CloseEditorsInGroupAction.LABEL) ]; } @@ -350,6 +351,7 @@ export class ActionProvider extends ContributableActionProvider { result.push(new Separator()); } + result.push(this.instantiationService.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, nls.localize('closeAllUnmodified', "Close Unmodified"))); result.push(this.instantiationService.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, nls.localize('closeAll', "Close All"))); } else { const openEditor = element; @@ -406,6 +408,7 @@ export class ActionProvider extends ContributableActionProvider { const closeOtherEditorsInGroupAction = this.instantiationService.createInstance(CloseOtherEditorsInGroupAction, CloseOtherEditorsInGroupAction.ID, nls.localize('closeOthers', "Close Others")); closeOtherEditorsInGroupAction.enabled = openEditor.editorGroup.count > 1; result.push(closeOtherEditorsInGroupAction); + result.push(this.instantiationService.createInstance(CloseUnmodifiedEditorsInGroupAction, CloseUnmodifiedEditorsInGroupAction.ID, nls.localize('closeAllUnmodified', "Close Unmodified"))); result.push(this.instantiationService.createInstance(CloseEditorsInGroupAction, CloseEditorsInGroupAction.ID, nls.localize('closeAll', "Close All"))); } diff --git a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts index 21076a5084e09..cf9fd534f85ba 100644 --- a/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts +++ b/src/vs/workbench/parts/quickopen/browser/commandsHandler.ts @@ -149,28 +149,6 @@ export class ShowAllCommandsAction extends Action { } } -export class ShowTasksAction extends Action { - - public static ID = 'workbench.action.showTasks'; - public static LABEL = nls.localize('showTasks', "Show Task Menu"); - - constructor( - id: string, - label: string, - @IQuickOpenService private quickOpenService: IQuickOpenService, - @IConfigurationService private configurationService: IConfigurationService - ) { - super(id, label); - } - - public run(context?: any): TPromise { - const value = `${ALL_COMMANDS_PREFIX}tasks`; - this.quickOpenService.show(value); - - return TPromise.as(null); - } -} - export class ClearCommandHistoryAction extends Action { public static ID = 'workbench.action.clearCommandHistory'; diff --git a/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts b/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts index e46b5cd843234..23c643f7d2b01 100644 --- a/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts +++ b/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.ts @@ -13,10 +13,13 @@ import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; import { KeyMod, KeyCode } from 'vs/base/common/keyCodes'; import { GotoSymbolAction, GOTO_SYMBOL_PREFIX, SCOPE_PREFIX } from 'vs/workbench/parts/quickopen/browser/gotoSymbolHandler'; -import { ShowAllCommandsAction, ALL_COMMANDS_PREFIX, ClearCommandHistoryAction, ShowTasksAction } from 'vs/workbench/parts/quickopen/browser/commandsHandler'; +import { ShowAllCommandsAction, ALL_COMMANDS_PREFIX, ClearCommandHistoryAction } from 'vs/workbench/parts/quickopen/browser/commandsHandler'; import { GotoLineAction, GOTO_LINE_PREFIX } from 'vs/workbench/parts/quickopen/browser/gotoLineHandler'; import { HELP_PREFIX } from 'vs/workbench/parts/quickopen/browser/helpHandler'; import { VIEW_PICKER_PREFIX, OpenViewPickerAction, QuickOpenViewPickerAction } from 'vs/workbench/parts/quickopen/browser/viewPickerHandler'; +import { inQuickOpenContext, getQuickNavigateHandler } from "vs/workbench/browser/parts/quickopen/quickopen"; +import { ContextKeyExpr } from "vs/platform/contextkey/common/contextkey"; +import { KeybindingsRegistry } from "vs/platform/keybinding/common/keybindingsRegistry"; // Register Actions const registry = Registry.as(ActionExtensions.WorkbenchActions); @@ -35,14 +38,37 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(GotoSymbolAction, Goto primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_O }), 'Go to Symbol in File...'); +const inViewsPickerContextKey = 'inViewsPicker'; +const inViewsPickerContext = ContextKeyExpr.and(inQuickOpenContext, ContextKeyExpr.has(inViewsPickerContextKey)); + +const viewPickerKeybinding = { primary: KeyMod.CtrlCmd | KeyCode.KEY_Q, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_Q }, linux: { primary: null } }; + registry.registerWorkbenchAction(new SyncActionDescriptor(OpenViewPickerAction, OpenViewPickerAction.ID, OpenViewPickerAction.LABEL), 'Open View'); -registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenViewPickerAction, QuickOpenViewPickerAction.ID, QuickOpenViewPickerAction.LABEL, { - primary: KeyMod.CtrlCmd | KeyCode.KEY_Q, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_Q }, linux: { primary: null } -}), 'Quick Open View'); +registry.registerWorkbenchAction(new SyncActionDescriptor(QuickOpenViewPickerAction, QuickOpenViewPickerAction.ID, QuickOpenViewPickerAction.LABEL, viewPickerKeybinding), 'Quick Open View'); + +const quickOpenNavigateNextInViewPickerId = 'workbench.action.quickOpenNavigateNextInViewPicker'; +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigateNextInViewPickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigateNextInViewPickerId, true), + when: inViewsPickerContext, + primary: viewPickerKeybinding.primary, + linux: viewPickerKeybinding.linux, + mac: viewPickerKeybinding.mac +}); -registry.registerWorkbenchAction(new SyncActionDescriptor(ShowTasksAction, ShowTasksAction.ID, ShowTasksAction.LABEL, { - primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_T -}), 'Show Task Menu'); +const quickOpenNavigatePreviousInViewPickerId = 'workbench.action.quickOpenNavigatePreviousInViewPicker'; +KeybindingsRegistry.registerCommandAndKeybindingRule({ + id: quickOpenNavigatePreviousInViewPickerId, + weight: KeybindingsRegistry.WEIGHT.workbenchContrib(50), + handler: getQuickNavigateHandler(quickOpenNavigatePreviousInViewPickerId, false), + when: inViewsPickerContext, + primary: viewPickerKeybinding.primary | KeyMod.Shift, + linux: viewPickerKeybinding.linux, + mac: { + primary: viewPickerKeybinding.mac.primary | KeyMod.Shift + } +}); // Register Quick Open Handler @@ -51,6 +77,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/parts/quickopen/browser/commandsHandler', 'CommandsHandler', ALL_COMMANDS_PREFIX, + 'inCommandsPicker', nls.localize('commandsHandlerDescriptionDefault', "Show and Run Commands") ) ); @@ -60,6 +87,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/parts/quickopen/browser/gotoLineHandler', 'GotoLineHandler', GOTO_LINE_PREFIX, + null, [ { prefix: GOTO_LINE_PREFIX, @@ -75,6 +103,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/parts/quickopen/browser/gotoSymbolHandler', 'GotoSymbolHandler', GOTO_SYMBOL_PREFIX, + 'inFileSymbolsPicker', [ { prefix: GOTO_SYMBOL_PREFIX, @@ -95,6 +124,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/parts/quickopen/browser/helpHandler', 'HelpHandler', HELP_PREFIX, + null, nls.localize('helpDescription', "Show Help") ) ); @@ -104,6 +134,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/parts/quickopen/browser/viewPickerHandler', 'ViewPickerHandler', VIEW_PICKER_PREFIX, + inViewsPickerContextKey, [ { prefix: VIEW_PICKER_PREFIX, diff --git a/src/vs/workbench/parts/search/browser/search.contribution.ts b/src/vs/workbench/parts/search/browser/search.contribution.ts index a03f6572e09ec..b4d892ab72149 100644 --- a/src/vs/workbench/parts/search/browser/search.contribution.ts +++ b/src/vs/workbench/parts/search/browser/search.contribution.ts @@ -35,8 +35,8 @@ import { ISearchWorkbenchService, SearchWorkbenchService } from 'vs/workbench/pa import { CommandsRegistry } from 'vs/platform/commands/common/commands'; import { SearchViewlet } from 'vs/workbench/parts/search/browser/searchViewlet'; import { ListFocusContext } from 'vs/platform/list/browser/listService'; - import { IOutputChannelRegistry, Extensions as OutputExt } from 'vs/workbench/parts/output/common/output'; +import { defaultQuickOpenContextKey } from "vs/workbench/browser/parts/quickopen/quickopen"; registerSingleton(ISearchWorkbenchService, SearchWorkbenchService); replaceContributions(); @@ -274,6 +274,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerDefaultQu 'vs/workbench/parts/search/browser/openAnythingHandler', 'OpenAnythingHandler', '', + defaultQuickOpenContextKey, nls.localize('openAnythingHandlerDescription', "Go to File") ) ); @@ -283,6 +284,7 @@ Registry.as(QuickOpenExtensions.Quickopen).registerQuickOpen 'vs/workbench/parts/search/browser/openAnythingHandler', 'OpenSymbolHandler', ALL_SYMBOLS_PREFIX, + 'inWorkspaceSymbolsPicker', [ { prefix: ALL_SYMBOLS_PREFIX, diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index 529b36f8f0c3e..a5a53dae147c0 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -1514,12 +1514,14 @@ registerSingleton(ITaskService, TaskService); // Register Quick Open const quickOpenRegistry = (Registry.as(QuickOpenExtensions.Quickopen)); +const tasksPickerContextKey = 'inTasksPicker'; quickOpenRegistry.registerQuickOpenHandler( new QuickOpenHandlerDescriptor( 'vs/workbench/parts/tasks/browser/taskQuickOpen', 'QuickOpenHandler', 'task ', + tasksPickerContextKey, nls.localize('quickOpen.task', "Run Task") ) ); @@ -1529,6 +1531,7 @@ quickOpenRegistry.registerQuickOpenHandler( 'vs/workbench/parts/tasks/browser/terminateQuickOpen', 'QuickOpenHandler', 'terminate task ', + tasksPickerContextKey, nls.localize('quickOpen.terminateTask', "Terminate Task") ) ); @@ -1538,6 +1541,7 @@ quickOpenRegistry.registerQuickOpenHandler( 'vs/workbench/parts/tasks/browser/restartQuickOpen', 'QuickOpenHandler', 'restart task ', + tasksPickerContextKey, nls.localize('quickOpen.restartTask', "Restart Task") ) ); @@ -1547,6 +1551,7 @@ quickOpenRegistry.registerQuickOpenHandler( 'vs/workbench/parts/tasks/browser/buildQuickOpen', 'QuickOpenHandler', 'build task ', + tasksPickerContextKey, nls.localize('quickOpen.buildTask', "Build Task") ) ); @@ -1556,6 +1561,7 @@ quickOpenRegistry.registerQuickOpenHandler( 'vs/workbench/parts/tasks/browser/testQuickOpen', 'QuickOpenHandler', 'test task ', + tasksPickerContextKey, nls.localize('quickOpen.testTask', "Test Task") ) ); diff --git a/src/vs/workbench/parts/terminal/common/terminal.ts b/src/vs/workbench/parts/terminal/common/terminal.ts index 116c8854a77e2..34cf3aaac1dee 100644 --- a/src/vs/workbench/parts/terminal/common/terminal.ts +++ b/src/vs/workbench/parts/terminal/common/terminal.ts @@ -27,6 +27,11 @@ export const KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED = new RawContextKey('terminalFindWidgetVisible', undefined); +/** A context key that is set when the find widget in integrated terminal is not visible. */ +export const KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_NOT_VISIBLE: ContextKeyExpr = KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE.toNegated(); + export const IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY = 'terminal.integrated.isWorkspaceShellAllowed'; export const NEVER_SUGGEST_SELECT_WINDOWS_SHELL_STORAGE_KEY = 'terminal.integrated.neverSuggestSelectWindowsShell'; @@ -147,6 +152,8 @@ export interface ITerminalService { showPanel(focus?: boolean): TPromise; hidePanel(): void; + focusFindWidget(): TPromise; + hideFindWidget(): void; setContainers(panelContainer: HTMLElement, terminalContainer: HTMLElement): void; updateConfig(): void; selectDefaultWindowsShell(): TPromise; @@ -235,6 +242,16 @@ export interface ITerminalInstance { */ selectAll(): void; + /** + * Find the next instance of the term + */ + findNext(term: string): boolean; + + /** + * Find the previous instance of the term + */ + findPrevious(term: string): boolean; + /** * Focuses the terminal instance. * diff --git a/src/vs/workbench/parts/terminal/common/terminalService.ts b/src/vs/workbench/parts/terminal/common/terminalService.ts index 7dbb40a3233c7..5362507941f69 100644 --- a/src/vs/workbench/parts/terminal/common/terminalService.ts +++ b/src/vs/workbench/parts/terminal/common/terminalService.ts @@ -10,7 +10,7 @@ import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IPartService } from 'vs/workbench/services/part/common/partService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { ITerminalService, ITerminalInstance, IShellLaunchConfig, ITerminalConfigHelper, KEYBINDING_CONTEXT_TERMINAL_FOCUS, TERMINAL_PANEL_ID } from 'vs/workbench/parts/terminal/common/terminal'; +import { ITerminalService, ITerminalInstance, IShellLaunchConfig, ITerminalConfigHelper, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE, TERMINAL_PANEL_ID } from 'vs/workbench/parts/terminal/common/terminal'; import { TPromise } from 'vs/base/common/winjs.base'; export abstract class TerminalService implements ITerminalService { @@ -18,6 +18,7 @@ export abstract class TerminalService implements ITerminalService { protected _isShuttingDown: boolean; protected _terminalFocusContextKey: IContextKey; + protected _findWidgetVisible: IContextKey; protected _terminalContainer: HTMLElement; protected _onInstancesChanged: Emitter; protected _onInstanceDisposed: Emitter; @@ -43,7 +44,7 @@ export abstract class TerminalService implements ITerminalService { constructor( @IContextKeyService private _contextKeyService: IContextKeyService, @IConfigurationService private _configurationService: IConfigurationService, - @IPanelService private _panelService: IPanelService, + @IPanelService protected _panelService: IPanelService, @IPartService private _partService: IPartService, @ILifecycleService lifecycleService: ILifecycleService ) { @@ -61,6 +62,7 @@ export abstract class TerminalService implements ITerminalService { this._configurationService.onDidUpdateConfiguration(() => this.updateConfig()); lifecycleService.onWillShutdown(event => event.veto(this._onWillShutdown())); this._terminalFocusContextKey = KEYBINDING_CONTEXT_TERMINAL_FOCUS.bindTo(this._contextKeyService); + this._findWidgetVisible = KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE.bindTo(this._contextKeyService); this.onInstanceDisposed((terminalInstance) => { this._removeInstance(terminalInstance); }); } @@ -200,6 +202,9 @@ export abstract class TerminalService implements ITerminalService { } } + public abstract focusFindWidget(): TPromise; + public abstract hideFindWidget(): void; + private _getIndexFromId(terminalId: number): number { let terminalIndex = -1; this.terminalInstances.forEach((terminalInstance, i) => { diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/close-dark.svg b/src/vs/workbench/parts/terminal/electron-browser/media/close-dark.svg new file mode 100644 index 0000000000000..751e89b3b0215 --- /dev/null +++ b/src/vs/workbench/parts/terminal/electron-browser/media/close-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/close.svg b/src/vs/workbench/parts/terminal/electron-browser/media/close.svg new file mode 100644 index 0000000000000..fde34404d4eb8 --- /dev/null +++ b/src/vs/workbench/parts/terminal/electron-browser/media/close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/next-inverse.svg b/src/vs/workbench/parts/terminal/electron-browser/media/next-inverse.svg new file mode 100644 index 0000000000000..7498a498bb652 --- /dev/null +++ b/src/vs/workbench/parts/terminal/electron-browser/media/next-inverse.svg @@ -0,0 +1,5 @@ + + + diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/next.svg b/src/vs/workbench/parts/terminal/electron-browser/media/next.svg new file mode 100644 index 0000000000000..4b176879f90af --- /dev/null +++ b/src/vs/workbench/parts/terminal/electron-browser/media/next.svg @@ -0,0 +1,5 @@ + + + diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/previous-inverse.svg b/src/vs/workbench/parts/terminal/electron-browser/media/previous-inverse.svg new file mode 100644 index 0000000000000..0aabf393d9c2f --- /dev/null +++ b/src/vs/workbench/parts/terminal/electron-browser/media/previous-inverse.svg @@ -0,0 +1,5 @@ + + + diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/previous.svg b/src/vs/workbench/parts/terminal/electron-browser/media/previous.svg new file mode 100644 index 0000000000000..f7acf0acbd999 --- /dev/null +++ b/src/vs/workbench/parts/terminal/electron-browser/media/previous.svg @@ -0,0 +1,5 @@ + + + diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css b/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css index f2cc6747e2c4d..0b6570ccef9d3 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/terminal.css @@ -78,3 +78,75 @@ .hc-black .monaco-workbench.mac .panel.integrated-terminal .xterm-rows { cursor: -webkit-image-set(url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=') 1x, url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC') 2x) 5 8, text; } + +.monaco-workbench .panel.integrated-terminal .find-part { + position: absolute; + top: -40px; + right: 28px; + display: none; + padding: 4px; + align-items: center; + + -webkit-transition: top 200ms linear; + -o-transition: top 200ms linear; + -moz-transition: top 200ms linear; + -ms-transition: top 200ms linear; + transition: top 200ms linear; +} + +.monaco-workbench .panel.integrated-terminal .find-part.visible { + top: 0; + display: flex; +} + +/* Temporarily we don't show match numbers */ +.monaco-workbench .panel.integrated-terminal .find-part .monaco-findInput .controls { + display: none; +} +.monaco-workbench .panel.integrated-terminal .find-part .monaco-findInput .monaco-inputbox .wrapper .input { + width: 100% !important; +} + +.monaco-workbench .panel.integrated-terminal .find-part .button { + min-width: 20px; + width: 20px; + height: 20px; + display: flex; + flex: initial; + margin-left: 3px; + background-position: center center; + background-repeat: no-repeat; + cursor: pointer; +} + +.monaco-workbench .panel.integrated-terminal .find-part .button.previous { + background-image: url('previous.svg'); +} + +.monaco-workbench .panel.integrated-terminal .find-part .button.next { + background-image: url('next.svg'); +} + +.monaco-workbench .panel.integrated-terminal .find-part .button.close-fw { + background-image: url('close.svg'); +} + +.hc-black .monaco-workbench .panel.integrated-terminal .find-part .button.previous, +.vs-dark .monaco-workbench .panel.integrated-terminal .find-part .button.previous { + background-image: url('previous-inverse.svg'); +} + +.hc-black .monaco-workbench .panel.integrated-terminal .find-part .button.next, +.vs-dark .monaco-workbench .panel.integrated-terminal .find-part .button.next { + background-image: url('next-inverse.svg'); +} + +.hc-black .monaco-workbench .panel.integrated-terminal .find-part .button.close-fw, +.vs-dark .monaco-workbench .panel.integrated-terminal .find-part .button.close-fw { + background-image: url('close-dark.svg'); +} + +monaco-workbench .panel.integrated-terminal .find-part .button.disabled { + opacity: 0.3; + cursor: default; +} \ No newline at end of file diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/widgets.css b/src/vs/workbench/parts/terminal/electron-browser/media/widgets.css index 2549ad7016355..10751297b5954 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/widgets.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/widgets.css @@ -12,7 +12,7 @@ } .monaco-workbench .terminal-message-widget { - font-family: system-ui, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; + font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", "Ubuntu", "Droid Sans", sans-serif; font-size: 14px; line-height: 19px; padding: 4px 5px; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index 3dafb84e0b549..b12e4812b9b22 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -12,13 +12,13 @@ import * as nls from 'vs/nls'; import * as panel from 'vs/workbench/browser/panel'; import * as platform from 'vs/base/common/platform'; import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; -import { GlobalQuickOpenAction } from 'vs/workbench/browser/parts/quickopen/quickopen.contribution'; -import { ITerminalService, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, TERMINAL_PANEL_ID, TERMINAL_DEFAULT_RIGHT_CLICK_COPY_PASTE, TerminalCursorStyle } from 'vs/workbench/parts/terminal/common/terminal'; +import { GlobalQuickOpenAction } from 'vs/workbench/browser/parts/quickopen/quickopen'; +import { ITerminalService, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, TERMINAL_PANEL_ID, TERMINAL_DEFAULT_RIGHT_CLICK_COPY_PASTE, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE, TerminalCursorStyle } from 'vs/workbench/parts/terminal/common/terminal'; import { TERMINAL_DEFAULT_SHELL_LINUX, TERMINAL_DEFAULT_SHELL_OSX, TERMINAL_DEFAULT_SHELL_WINDOWS } from 'vs/workbench/parts/terminal/electron-browser/terminal'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; -import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, FocusTerminalAtIndexAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction, AllowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand, RenameTerminalAction, SelectAllTerminalAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; +import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, FocusActiveTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, FocusTerminalAtIndexAction, SelectDefaultShellWindowsTerminalAction, RunSelectedTextInTerminalAction, RunActiveFileInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction, AllowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand, RenameTerminalAction, SelectAllTerminalAction, FocusTerminalFindWidgetAction, HideTerminalFindWidgetAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; import { Registry } from 'vs/platform/platform'; import { ShowAllCommandsAction } from 'vs/workbench/parts/quickopen/browser/commandsHandler'; import { SyncActionDescriptor } from 'vs/platform/actions/common/actions'; @@ -186,7 +186,9 @@ configurationRegistry.registerConfiguration({ FocusFirstGroupAction.ID, FocusSecondGroupAction.ID, FocusThirdGroupAction.ID, - SelectAllTerminalAction.ID + SelectAllTerminalAction.ID, + FocusTerminalFindWidgetAction.ID, + HideTerminalFindWidgetAction.ID ].sort() } } @@ -277,5 +279,10 @@ if (platform.isWindows) { actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(AllowWorkspaceShellTerminalCommand, AllowWorkspaceShellTerminalCommand.ID, AllowWorkspaceShellTerminalCommand.LABEL), 'Terminal: Allow Workspace Shell Configuration', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DisallowWorkspaceShellTerminalCommand, DisallowWorkspaceShellTerminalCommand.ID, DisallowWorkspaceShellTerminalCommand.LABEL), 'Terminal: Disallow Workspace Shell Configuration', category); actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(RenameTerminalAction, RenameTerminalAction.ID, RenameTerminalAction.LABEL), 'Terminal: Rename', category); - +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(FocusTerminalFindWidgetAction, FocusTerminalFindWidgetAction.ID, FocusTerminalFindWidgetAction.LABEL, { + primary: KeyMod.CtrlCmd | KeyCode.KEY_F +}, KEYBINDING_CONTEXT_TERMINAL_FOCUS), 'Terminal: Focus Find Widget', category); +actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(HideTerminalFindWidgetAction, HideTerminalFindWidgetAction.ID, HideTerminalFindWidgetAction.LABEL, { + primary: KeyCode.Escape +}, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE), 'Terminal: Focus Find Widget', category); registerColors(); diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts index 6ead524b144dd..0d3a3a0b17c49 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts @@ -583,3 +583,37 @@ export class RenameTerminalAction extends Action { }); } } + +export class FocusTerminalFindWidgetAction extends Action { + + public static ID = 'workbench.action.terminal.focusFindWidget'; + public static LABEL = nls.localize('workbench.action.terminal.focusFindWidget', "Focus Find Widget"); + + constructor( + id: string, label: string, + @ITerminalService private terminalService: ITerminalService + ) { + super(id, label); + } + + public run(): TPromise { + return this.terminalService.focusFindWidget(); + } +} + +export class HideTerminalFindWidgetAction extends Action { + + public static ID = 'workbench.action.terminal.hideFindWidget'; + public static LABEL = nls.localize('workbench.action.terminal.hideFindWidget', "Hide Find Widget"); + + constructor( + id: string, label: string, + @ITerminalService private terminalService: ITerminalService + ) { + super(id, label); + } + + public run(): TPromise { + return TPromise.as(this.terminalService.hideFindWidget()); + } +} diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.ts new file mode 100644 index 0000000000000..8e8493811b879 --- /dev/null +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.ts @@ -0,0 +1,224 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as nls from 'vs/nls'; +import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; +import { Widget } from 'vs/base/browser/ui/widget'; +import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; +import * as dom from 'vs/base/browser/dom'; +import { FindInput } from 'vs/base/browser/ui/findinput/findInput'; +import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; +import { ITerminalService } from 'vs/workbench/parts/terminal/common/terminal'; +import { registerThemingParticipant, ITheme } from 'vs/platform/theme/common/themeService'; +import { inputBackground, inputActiveOptionBorder, inputForeground, inputBorder, inputValidationInfoBackground, inputValidationInfoBorder, inputValidationWarningBackground, inputValidationWarningBorder, inputValidationErrorBackground, inputValidationErrorBorder, editorWidgetBackground, widgetShadow } from 'vs/platform/theme/common/colorRegistry'; + +interface IButtonOpts { + label: string; + className: string; + onTrigger: () => void; + onKeyDown: (e: IKeyboardEvent) => void; +} + +class SimpleButton extends Widget { + + private _opts: IButtonOpts; + private _domNode: HTMLElement; + + constructor(opts: IButtonOpts) { + super(); + this._opts = opts; + + this._domNode = document.createElement('div'); + this._domNode.title = this._opts.label; + this._domNode.tabIndex = 0; + this._domNode.className = 'button ' + this._opts.className; + this._domNode.setAttribute('role', 'button'); + this._domNode.setAttribute('aria-label', this._opts.label); + + this.onclick(this._domNode, (e) => { + this._opts.onTrigger(); + e.preventDefault(); + }); + this.onkeydown(this._domNode, (e) => { + if (e.equals(KeyCode.Space) || e.equals(KeyCode.Enter)) { + this._opts.onTrigger(); + e.preventDefault(); + return; + } + this._opts.onKeyDown(e); + }); + } + + public get domNode(): HTMLElement { + return this._domNode; + } + + public isEnabled(): boolean { + return (this._domNode.tabIndex >= 0); + } + + public focus(): void { + this._domNode.focus(); + } + + public setEnabled(enabled: boolean): void { + dom.toggleClass(this._domNode, 'disabled', !enabled); + this._domNode.setAttribute('aria-disabled', String(!enabled)); + this._domNode.tabIndex = enabled ? 0 : -1; + } + + public toggleClass(className: string, shouldHaveIt: boolean): void { + dom.toggleClass(this._domNode, className, shouldHaveIt); + } +} + +const NLS_FIND_INPUT_LABEL = nls.localize('label.find', "Find"); +const NLS_FIND_INPUT_PLACEHOLDER = nls.localize('placeholder.find', "Find"); +const NLS_PREVIOUS_MATCH_BTN_LABEL = nls.localize('label.previousMatchButton', "Previous match"); +const NLS_NEXT_MATCH_BTN_LABEL = nls.localize('label.nextMatchButton', "Next match"); +const NLS_CLOSE_BTN_LABEL = nls.localize('label.closeButton', "Close"); + +export class TerminalFindWidget extends Widget { + private _findInput: FindInput; + private _domNode: HTMLElement; + private _isVisible: boolean; + + constructor( + @IContextViewService private _contextViewService: IContextViewService, + @ITerminalService private _terminalService: ITerminalService + ) { + super(); + this._findInput = this._register(new FindInput(null, this._contextViewService, { + width: 155, + label: NLS_FIND_INPUT_LABEL, + placeholder: NLS_FIND_INPUT_PLACEHOLDER, + })); + + let find = (previous) => { + let val = this._findInput.getValue(); + let instance = this._terminalService.getActiveInstance(); + if (instance !== null) { + if (previous) { + instance.findPrevious(val); + } else { + instance.findNext(val); + } + } + }; + + this._register(this._findInput.onKeyDown((e) => { + if (e.equals(KeyCode.Enter)) { + find(false); + e.preventDefault(); + return; + } + + if (e.equals(KeyMod.Shift | KeyCode.Enter)) { + find(true); + e.preventDefault(); + return; + } + })); + + let prevBtn = new SimpleButton({ + label: NLS_PREVIOUS_MATCH_BTN_LABEL, + className: 'previous', + onTrigger: () => { + find(true); + }, + onKeyDown: (e) => { } + }); + + let nextBtn = new SimpleButton({ + label: NLS_NEXT_MATCH_BTN_LABEL, + className: 'next', + onTrigger: () => { + find(false); + }, + onKeyDown: (e) => { } + }); + + let closeBtn = new SimpleButton({ + label: NLS_CLOSE_BTN_LABEL, + className: 'close-fw', + onTrigger: () => { + this.hide(); + }, + onKeyDown: (e) => { } + }); + + this._domNode = document.createElement('div'); + this._domNode.className = 'find-part'; + this._domNode.appendChild(this._findInput.domNode); + this._domNode.appendChild(prevBtn.domNode); + this._domNode.appendChild(nextBtn.domNode); + this._domNode.appendChild(closeBtn.domNode); + + this._register(dom.addDisposableListener(this._domNode, 'click', (event) => { + event.stopPropagation(); + })); + } + + public updateTheme(theme?: ITheme): void { + let inputStyles = { + inputActiveOptionBorder: theme.getColor(inputActiveOptionBorder), + inputBackground: theme.getColor(inputBackground), + inputForeground: theme.getColor(inputForeground), + inputBorder: theme.getColor(inputBorder), + inputValidationInfoBackground: theme.getColor(inputValidationInfoBackground), + inputValidationInfoBorder: theme.getColor(inputValidationInfoBorder), + inputValidationWarningBackground: theme.getColor(inputValidationWarningBackground), + inputValidationWarningBorder: theme.getColor(inputValidationWarningBorder), + inputValidationErrorBackground: theme.getColor(inputValidationErrorBackground), + inputValidationErrorBorder: theme.getColor(inputValidationErrorBorder) + }; + this._findInput.style(inputStyles); + } + + public getDomNode(): HTMLElement { + return this._domNode; + } + + public reveal(): void { + if (this._isVisible) { + this._findInput.select(); + return; + } + + this._isVisible = true; + + setTimeout(() => { + dom.addClass(this._domNode, 'visible'); + this._domNode.setAttribute('aria-hidden', 'false'); + dom.addClass(this._domNode, 'noanimation'); + setTimeout(() => { + dom.removeClass(this._domNode, 'noanimation'); + this._findInput.select(); + }, 200); + }, 0); + } + + public hide(): void { + if (this._isVisible) { + this._isVisible = false; + + dom.removeClass(this._domNode, 'visible'); + this._domNode.setAttribute('aria-hidden', 'true'); + } + } +} + +// theming +registerThemingParticipant((theme, collector) => { + const findWidgetBGColor = theme.getColor(editorWidgetBackground); + if (findWidgetBGColor) { + collector.addRule(`.monaco-workbench .panel.integrated-terminal .find-part { background-color: ${findWidgetBGColor} !important; }`); + } + + let widgetShadowColor = theme.getColor(widgetShadow); + if (widgetShadowColor) { + collector.addRule(`.monaco-workbench .panel.integrated-terminal .find-part { box-shadow: 0 2px 8px ${widgetShadowColor}; }`); + } +}); \ No newline at end of file diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index b03ee074b1e03..54989b2c49634 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -347,6 +347,14 @@ export class TerminalInstance implements ITerminalInstance { this._xterm.selectAll(); } + public findNext(term: string): boolean { + return this._xterm.findNext(term); + } + + public findPrevious(term: string): boolean { + return this._xterm.findPrevious(term); + } + public dispose(): void { if (this._linkHandler) { this._linkHandler.dispose(); diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 3dae4ebd1bd90..ee9222682125f 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -10,11 +10,12 @@ import { Action, IAction } from 'vs/base/common/actions'; import { Builder, Dimension } from 'vs/base/browser/builder'; import { IActionItem, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; +import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ITerminalService, ITerminalFont, TERMINAL_PANEL_ID } from 'vs/workbench/parts/terminal/common/terminal'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; +import { TerminalFindWidget } from './terminalFindWidget'; import { ansiColorIdentifiers, TERMINAL_BACKGROUND_COLOR, TERMINAL_FOREGROUND_COLOR } from './terminalColorRegistry'; import { ColorIdentifier, selectionBackground } from 'vs/platform/theme/common/colorRegistry'; import { KillTerminalAction, CreateNewTerminalAction, SwitchTerminalInstanceAction, SwitchTerminalInstanceActionItem, CopyTerminalSelectionAction, TerminalPasteAction, ClearTerminalAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; @@ -34,10 +35,12 @@ export class TerminalPanel extends Panel { private _parentDomElement: HTMLElement; private _terminalContainer: HTMLElement; private _themeStyleElement: HTMLElement; + private _findWidget: TerminalFindWidget; constructor( @IConfigurationService private _configurationService: IConfigurationService, @IContextMenuService private _contextMenuService: IContextMenuService, + @IContextViewService private _contextViewService: IContextViewService, @IInstantiationService private _instantiationService: IInstantiationService, @ITerminalService private _terminalService: ITerminalService, @IThemeService protected themeService: IThemeService, @@ -55,9 +58,13 @@ export class TerminalPanel extends Panel { this._terminalContainer = document.createElement('div'); dom.addClass(this._terminalContainer, 'terminal-outer-container'); + + this._findWidget = new TerminalFindWidget(this._contextViewService, this._terminalService); + this._parentDomElement.appendChild(this._themeStyleElement); this._parentDomElement.appendChild(this._fontStyleElement); this._parentDomElement.appendChild(this._terminalContainer); + this._parentDomElement.appendChild(this._findWidget.getDomNode()); this._attachEventListeners(); @@ -149,6 +156,14 @@ export class TerminalPanel extends Panel { } } + public focusFindWidget() { + this._findWidget.reveal(); + } + + public hideFindWidget() { + this._findWidget.hide(); + } + private _attachEventListeners(): void { this._register(dom.addDisposableListener(this._parentDomElement, 'mousedown', (event: MouseEvent) => { if (this._terminalService.terminalInstances.length === 0) { @@ -272,6 +287,7 @@ export class TerminalPanel extends Panel { } this._themeStyleElement.innerHTML = css; + this._findWidget.updateTheme(theme); } private _updateFont(): void { diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts index e731656e46d53..5ce3dc18e9bfc 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalService.ts @@ -16,7 +16,7 @@ import { IWindowIPCService } from 'vs/workbench/services/window/electron-browser import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IConfigurationEditingService, ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; import { IQuickOpenService, IPickOpenEntry, IPickOptions } from 'vs/platform/quickOpen/common/quickOpen'; -import { ITerminalInstance, ITerminalService, IShellLaunchConfig, ITerminalConfigHelper, NEVER_SUGGEST_SELECT_WINDOWS_SHELL_STORAGE_KEY } from 'vs/workbench/parts/terminal/common/terminal'; +import { ITerminalInstance, ITerminalService, IShellLaunchConfig, ITerminalConfigHelper, NEVER_SUGGEST_SELECT_WINDOWS_SHELL_STORAGE_KEY, TERMINAL_PANEL_ID } from 'vs/workbench/parts/terminal/common/terminal'; import { TerminalService as AbstractTerminalService } from 'vs/workbench/parts/terminal/common/terminalService'; import { TerminalConfigHelper } from 'vs/workbench/parts/terminal/electron-browser/terminalConfigHelper'; import { TerminalInstance } from 'vs/workbench/parts/terminal/electron-browser/terminalInstance'; @@ -25,10 +25,10 @@ import { IChoiceService } from 'vs/platform/message/common/message'; import { Severity } from 'vs/editor/common/standalone/standaloneBase'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { TERMINAL_DEFAULT_SHELL_WINDOWS } from "vs/workbench/parts/terminal/electron-browser/terminal"; +import { TerminalPanel } from "vs/workbench/parts/terminal/electron-browser/terminalPanel"; export class TerminalService extends AbstractTerminalService implements ITerminalService { private _configHelper: TerminalConfigHelper; - public get configHelper(): ITerminalConfigHelper { return this._configHelper; }; constructor( @@ -69,6 +69,23 @@ export class TerminalService extends AbstractTerminalService implements ITermina return terminalInstance; } + public focusFindWidget(): TPromise { + return this.showPanel(false).then(() => { + let panel = this._panelService.getActivePanel() as TerminalPanel; + panel.focusFindWidget(); + this._findWidgetVisible.set(true); + }); + } + + public hideFindWidget(): void { + const panel = this._panelService.getActivePanel() as TerminalPanel; + if (panel && panel.getId() === TERMINAL_PANEL_ID) { + panel.hideFindWidget(); + this._findWidgetVisible.reset(); + panel.focus(); + } + } + private _suggestShellChange(wasNewTerminalAction?: boolean): void { // Only suggest on Windows since $SHELL works great for macOS/Linux if (!platform.isWindows) { diff --git a/src/vs/workbench/parts/watermark/electron-browser/watermark.ts b/src/vs/workbench/parts/watermark/electron-browser/watermark.ts index a6e55adf5c8d4..c28efbc3fc683 100644 --- a/src/vs/workbench/parts/watermark/electron-browser/watermark.ts +++ b/src/vs/workbench/parts/watermark/electron-browser/watermark.ts @@ -18,7 +18,7 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; -import { GlobalQuickOpenAction } from 'vs/workbench/browser/parts/quickopen/quickopen.contribution'; +import { GlobalQuickOpenAction } from 'vs/workbench/browser/parts/quickopen/quickopen'; import { KeybindingsReferenceAction, OpenRecentAction } from 'vs/workbench/electron-browser/actions'; import { ShowRecommendedKeymapExtensionsAction } from 'vs/workbench/parts/extensions/browser/extensionsActions'; import { GlobalNewUntitledFileAction, OpenFileAction } from 'vs/workbench/parts/files/browser/fileActions'; diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 48160e32d1e7a..1187473c057f9 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -121,7 +121,6 @@ export class WalkThroughPart extends BaseEditor { this.content.style.outlineStyle = 'none'; this.scrollbar = new DomScrollableElement(this.content, { - canUseTranslate3d: false, horizontal: ScrollbarVisibility.Auto, vertical: ScrollbarVisibility.Auto }); diff --git a/src/vs/workbench/services/configuration/common/configurationModels.ts b/src/vs/workbench/services/configuration/common/configurationModels.ts index 10f1fb17a9d02..d6ad817c30e69 100644 --- a/src/vs/workbench/services/configuration/common/configurationModels.ts +++ b/src/vs/workbench/services/configuration/common/configurationModels.ts @@ -4,12 +4,12 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { ConfigModel } from 'vs/platform/configuration/common/model'; +import { CustomConfiguration } from 'vs/platform/configuration/common/model'; import { WORKSPACE_STANDALONE_CONFIGURATIONS } from 'vs/workbench/services/configuration/common/configuration'; import { Registry } from 'vs/platform/platform'; import { IConfigurationRegistry, IConfigurationPropertySchema, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; -export class ScopedConfigModel extends ConfigModel { +export class ScopedConfigModel extends CustomConfiguration { constructor(content: string, name: string, public readonly scope: string) { super(null, name); @@ -25,7 +25,7 @@ export class ScopedConfigModel extends ConfigModel { } -export class WorkspaceSettingsConfigModel extends ConfigModel { +export class WorkspaceSettingsConfigModel extends CustomConfiguration { private _raw: T; private _unsupportedKeys: string[]; @@ -62,7 +62,7 @@ export class WorkspaceSettingsConfigModel extends ConfigModel { } } -export class WorkspaceConfigModel extends ConfigModel { +export class WorkspaceConfigModel extends CustomConfiguration { constructor(public readonly workspaceSettingsConfig: WorkspaceSettingsConfigModel, private scopedConfigs: ScopedConfigModel[]) { super(); diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index f449677e86595..4c62132f61db9 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -20,11 +20,12 @@ import * as extfs from 'vs/base/node/extfs'; import { IWorkspaceContextService, IWorkspace2, Workspace as SingleRootWorkspace, IWorkspace } from "vs/platform/workspace/common/workspace"; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { FileChangeType, FileChangesEvent, isEqual } from 'vs/platform/files/common/files'; -import { ConfigModel } from 'vs/platform/configuration/common/model'; import { ScopedConfigModel, WorkspaceConfigModel, WorkspaceSettingsConfigModel } from 'vs/workbench/services/configuration/common/configurationModels'; -import { IConfigurationServiceEvent, ConfigurationSource, getConfigurationValue, IConfigModel, IConfigurationOptions } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationServiceEvent, ConfigurationSource, getConfigurationValue, IConfigurationOptions, Configuration } from 'vs/platform/configuration/common/configuration'; import { IWorkspaceConfigurationValues, IWorkspaceConfigurationService, IWorkspaceConfigurationValue, WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME, WORKSPACE_STANDALONE_CONFIGURATIONS, WORKSPACE_CONFIG_DEFAULT_PATH } from 'vs/workbench/services/configuration/common/configuration'; import { ConfigurationService as GlobalConfigurationService } from 'vs/platform/configuration/node/configurationService'; +import { createHash } from "crypto"; +import { basename } from "path"; interface IStat { resource: URI; @@ -45,18 +46,31 @@ interface IWorkspaceConfiguration { type IWorkspaceFoldersConfiguration = { [rootFolder: string]: { folders: string[]; } }; class Workspace implements IWorkspace2 { + private _name: string; - constructor(readonly id: string, private _roots: URI[]) { + constructor( + public readonly id: string, + private _roots: URI[] + ) { + // } - get roots(): URI[] { - return this._roots; + public set roots(roots: URI[]) { + this._roots = roots; + this._name = null; // will be recomputed based on roots next time accessed } - setRoots(roots: URI[]): void { - this._roots = roots; + public get roots(): URI[] { + return this._roots; } + public get name(): string { + if (!this._name) { + this._name = this.roots.map(root => basename(root.fsPath)).join(', '); + } + + return this._name; + } } export class WorkspaceConfigurationService extends Disposable implements IWorkspaceContextService, IWorkspaceConfigurationService { @@ -73,11 +87,11 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private baseConfigurationService: GlobalConfigurationService; - private cachedConfig: ConfigModel; + private cachedConfig: Configuration; private cachedWorkspaceConfig: WorkspaceConfigModel; private bulkFetchFromWorkspacePromise: TPromise; - private workspaceFilePathToConfiguration: { [relativeWorkspacePath: string]: TPromise> }; + private workspaceFilePathToConfiguration: { [relativeWorkspacePath: string]: TPromise> }; private reloadConfigurationScheduler: RunOnceScheduler; private readonly workspace: Workspace; @@ -85,10 +99,10 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp constructor(private environmentService: IEnvironmentService, private singleRootWorkspace?: SingleRootWorkspace, private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME) { super(); - this.workspace = singleRootWorkspace ? new Workspace(`${singleRootWorkspace.uid}`, [singleRootWorkspace.resource]) : null; + this.workspace = singleRootWorkspace ? new Workspace(createHash('md5').update(singleRootWorkspace.resource.toString()).digest('hex'), [singleRootWorkspace.resource]) : null; // TODO@Ben for now use the first root folder as id, but revisit this later this.workspaceFilePathToConfiguration = Object.create(null); - this.cachedConfig = new ConfigModel(null); + this.cachedConfig = new Configuration(); this.cachedWorkspaceConfig = new WorkspaceConfigModel(new WorkspaceSettingsConfigModel(null), []); this.baseConfigurationService = this._register(new GlobalConfigurationService(environmentService)); @@ -130,7 +144,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp // Find changes const changed = !equals(this.workspace.roots, configuredFolders, (r1, r2) => r1.toString() === r2.toString()); - this.workspace.setRoots(configuredFolders); + this.workspace.roots = configuredFolders; if (notify && changed) { this._onDidChangeWorkspaceRoots.fire(configuredFolders); @@ -167,7 +181,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } // update cached config when base config changes - const configModel = >this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify) + const configModel = >this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify) .merge(this.cachedWorkspaceConfig); // workspace configured values // emit this as update to listeners if changed @@ -189,7 +203,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp public getConfiguration(options?: IConfigurationOptions): C public getConfiguration(arg?: any): C { const options = this.toOptions(arg); - const configModel = options.overrideIdentifier ? this.cachedConfig.configWithOverrides(options.overrideIdentifier) : this.cachedConfig; + const configModel = options.overrideIdentifier ? this.cachedConfig.override(options.overrideIdentifier) : this.cachedConfig; return options.section ? configModel.getContentsFor(options.section) : configModel.contents; } @@ -198,8 +212,8 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp return { default: configurationValue.default, user: configurationValue.user, - workspace: objects.clone(getConfigurationValue(overrideIdentifier ? this.cachedWorkspaceConfig.configWithOverrides(overrideIdentifier).contents : this.cachedWorkspaceConfig.contents, key)), - value: objects.clone(getConfigurationValue(overrideIdentifier ? this.cachedConfig.configWithOverrides(overrideIdentifier).contents : this.cachedConfig.contents, key)) + workspace: objects.clone(getConfigurationValue(overrideIdentifier ? this.cachedWorkspaceConfig.override(overrideIdentifier).contents : this.cachedWorkspaceConfig.contents, key)), + value: objects.clone(getConfigurationValue(overrideIdentifier ? this.cachedConfig.override(overrideIdentifier).contents : this.cachedConfig.contents, key)) }; } @@ -273,7 +287,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp this.cachedWorkspaceConfig = new WorkspaceConfigModel(workspaceSettingsConfig, otherConfigModels); // Override base (global < user) with workspace locals (global < user < workspace) - this.cachedConfig = >this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify) + this.cachedConfig = >this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify) .merge(this.cachedWorkspaceConfig); // workspace configured values return { @@ -283,7 +297,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp }); } - private loadWorkspaceConfigFiles(): TPromise<{ [relativeWorkspacePath: string]: IConfigModel }> { + private loadWorkspaceConfigFiles(): TPromise<{ [relativeWorkspacePath: string]: Configuration }> { // Return early if we don't have a workspace if (!this.workspace) { @@ -368,7 +382,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } } - private createConfigModel(content: IContent): IConfigModel { + private createConfigModel(content: IContent): Configuration { const path = this.toWorkspaceRelativePath(content.resource); if (path === WORKSPACE_CONFIG_DEFAULT_PATH) { return new WorkspaceSettingsConfigModel(content.value, content.resource.toString()); @@ -379,7 +393,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } } - return new ConfigModel(null); + return new Configuration(); } private isWorkspaceConfigurationFile(workspaceRelativePath: string): boolean { @@ -426,4 +440,4 @@ function resolveStat(resource: URI): TPromise { } }); }); -} \ No newline at end of file +} diff --git a/src/vs/workbench/services/configurationResolver/node/configurationResolverService.ts b/src/vs/workbench/services/configurationResolver/node/configurationResolverService.ts index 3caa6312379fd..7dcd63979b092 100644 --- a/src/vs/workbench/services/configurationResolver/node/configurationResolverService.ts +++ b/src/vs/workbench/services/configurationResolver/node/configurationResolverService.ts @@ -214,7 +214,7 @@ export class ConfigurationResolverService implements IConfigurationResolverServi } // We need a map from interactive variables to keys because we only want to trigger an command once per key - - // even though it might occure multiple times in configuration #7026. + // even though it might occur multiple times in configuration #7026. const interactiveVariablesToSubstitutes: { [interactiveVariable: string]: { object: any, key: string }[] } = {}; const findInteractiveVariables = (object: any) => { Object.keys(object).forEach(key => { diff --git a/src/vs/workbench/services/editor/browser/editorService.ts b/src/vs/workbench/services/editor/browser/editorService.ts index e8b52c75a1e7f..3e32edce31d85 100644 --- a/src/vs/workbench/services/editor/browser/editorService.ts +++ b/src/vs/workbench/services/editor/browser/editorService.ts @@ -30,7 +30,7 @@ export interface IEditorPart { openEditors(editors: { input: IEditorInput, position: Position, options?: IEditorOptions | ITextEditorOptions }[]): TPromise; replaceEditors(editors: { toReplace: IEditorInput, replaceWith: IEditorInput, options?: IEditorOptions | ITextEditorOptions }[], position?: Position): TPromise; closeEditor(position: Position, input: IEditorInput): TPromise; - closeEditors(position: Position, except?: IEditorInput, direction?: Direction): TPromise; + closeEditors(position: Position, filter?: { except?: IEditorInput, direction?: Direction, unmodifiedOnly?: boolean }): TPromise; closeAllEditors(except?: Position): TPromise; getActiveEditor(): BaseEditor; getVisibleEditors(): IEditor[]; @@ -194,8 +194,8 @@ export class WorkbenchEditorService implements IWorkbenchEditorService { return this.editorPart.closeEditor(position, input); } - public closeEditors(position: Position, except?: IEditorInput, direction?: Direction): TPromise { - return this.editorPart.closeEditors(position, except, direction); + public closeEditors(position: Position, filter?: { except?: IEditorInput, direction?: Direction, unmodifiedOnly?: boolean }): TPromise { + return this.editorPart.closeEditors(position, filter); } public closeAllEditors(except?: Position): TPromise { diff --git a/src/vs/workbench/services/editor/common/editorService.ts b/src/vs/workbench/services/editor/common/editorService.ts index abedce481a032..5381c9de4e793 100644 --- a/src/vs/workbench/services/editor/common/editorService.ts +++ b/src/vs/workbench/services/editor/common/editorService.ts @@ -80,7 +80,7 @@ export interface IWorkbenchEditorService extends IEditorService { * will not be closed. The direction can be used in that case to control if all other editors should get closed, * or towards a specific direction. */ - closeEditors(position: Position, except?: IEditorInput, direction?: Direction): TPromise; + closeEditors(position: Position, filter?: { except?: IEditorInput, direction?: Direction, unmodifiedOnly?: boolean }): TPromise; /** * Closes all editors across all groups. The optional position allows to keep one group alive. diff --git a/src/vs/workbench/services/editor/test/browser/editorService.test.ts b/src/vs/workbench/services/editor/test/browser/editorService.test.ts index 4dd5a44fe16df..1c3c11e3c102b 100644 --- a/src/vs/workbench/services/editor/test/browser/editorService.test.ts +++ b/src/vs/workbench/services/editor/test/browser/editorService.test.ts @@ -51,7 +51,7 @@ class TestEditorPart implements IEditorPart { return TPromise.as([]); } - public closeEditors(position: Position, except?: EditorInput, direction?: Direction): TPromise { + public closeEditors(position: Position, filter?: { except?: EditorInput, direction?: Direction, unmodifiedOnly?: boolean }): TPromise { return TPromise.as(null); } diff --git a/src/vs/workbench/test/browser/editorStacksModel.test.ts b/src/vs/workbench/test/browser/editorStacksModel.test.ts index 8d96c2e5c807e..3df007262ae2f 100644 --- a/src/vs/workbench/test/browser/editorStacksModel.test.ts +++ b/src/vs/workbench/test/browser/editorStacksModel.test.ts @@ -1764,6 +1764,24 @@ suite('Editor Stacks Model', () => { assert.equal(input1.isDisposed(), false); }); + test('Stack - Multiple Editors - Editor Not Disposed after Closing when opening Modified side (Diff Editor)', function () { + const model = create(); + + const group1 = model.openGroup('group1'); + + const input1 = input(); + const input2 = input(); + + const diffInput = new DiffEditorInput('name', 'description', input1, input2); + + group1.openEditor(diffInput, { pinned: false, active: true }); + group1.openEditor(input1, { pinned: false, active: true }); + + assert.equal(diffInput.isDisposed(), true); + assert.equal(input2.isDisposed(), true); + assert.equal(input1.isDisposed(), false); + }); + test('Stack - Multiple Editors - Editor Disposed on Close (same input, files)', function () { const model = create(); diff --git a/src/vs/workbench/test/browser/quickopen.test.ts b/src/vs/workbench/test/browser/quickopen.test.ts index caee483e75ece..17baa336943eb 100644 --- a/src/vs/workbench/test/browser/quickopen.test.ts +++ b/src/vs/workbench/test/browser/quickopen.test.ts @@ -67,7 +67,8 @@ suite('Workbench QuickOpen', () => { 'test', 'TestHandler', ',', - 'Handler' + 'Handler', + null ); registry.registerQuickOpenHandler(handler); diff --git a/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts b/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts index 36430d52357bc..c66640c2bd7eb 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts @@ -14,7 +14,7 @@ suite('ExtHostWorkspace', function () { test('asRelativePath', function () { - const ws = new ExtHostWorkspace(new TestThreadService(), [URI.file('/Coding/Applications/NewsWoWBot')]); + const ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', roots: [URI.file('/Coding/Applications/NewsWoWBot')] }); assert.equal(ws.getRelativePath('/Coding/Applications/NewsWoWBot/bernd/das/brot'), 'bernd/das/brot'); assert.equal(ws.getRelativePath('/Apps/DartPubCache/hosted/pub.dartlang.org/convert-2.0.1/lib/src/hex.dart'), @@ -28,7 +28,7 @@ suite('ExtHostWorkspace', function () { test('asRelativePath, same paths, #11402', function () { const root = '/home/aeschli/workspaces/samples/docker'; const input = '/home/aeschli/workspaces/samples/docker'; - const ws = new ExtHostWorkspace(new TestThreadService(), [URI.file(root)]); + const ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', roots: [URI.file(root)] }); assert.equal(ws.getRelativePath(input), input); @@ -43,7 +43,7 @@ suite('ExtHostWorkspace', function () { }); test('asRelativePath, multiple folders', function () { - const ws = new ExtHostWorkspace(new TestThreadService(), [URI.file('/Coding/One'), URI.file('/Coding/Two')]); + const ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', roots: [URI.file('/Coding/One'), URI.file('/Coding/Two')] }); assert.equal(ws.getRelativePath('/Coding/One/file.txt'), 'file.txt'); assert.equal(ws.getRelativePath('/Coding/Two/files/out.txt'), 'files/out.txt'); assert.equal(ws.getRelativePath('/Coding/Two2/files/out.txt'), '/Coding/Two2/files/out.txt'); diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 3b299beef00fe..6cf8c61f13c4c 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -53,6 +53,7 @@ import { IEnvironmentService } from 'vs/platform/environment/common/environment' import { IThemeService, ITheme, DARK } from 'vs/platform/theme/common/themeService'; import { Color } from 'vs/base/common/color'; import { isLinux } from 'vs/base/common/platform'; +import { generateUuid } from "vs/base/common/uuid"; export function createFileInput(instantiationService: IInstantiationService, resource: URI): FileEditorInput { return instantiationService.createInstance(FileEditorInput, resource, void 0); @@ -64,12 +65,14 @@ export class TestContextService implements IWorkspaceContextService { public _serviceBrand: any; private workspace: any; + private id: string; private options: any; private _onDidChangeWorkspaceRoots: Emitter; constructor(workspace: any = TestWorkspace, options: any = null) { this.workspace = workspace; + this.id = generateUuid(); this.options = options || Object.create(null); this._onDidChangeWorkspaceRoots = new Emitter(); } @@ -91,7 +94,7 @@ export class TestContextService implements IWorkspaceContextService { } public getWorkspace2(): IWorkspace2 { - return this.workspace ? { id: `${this.workspace.uid}`, roots: [this.workspace.resource] } : void 0; + return this.workspace ? { id: this.id, roots: [this.workspace.resource], name: this.workspace.resource.fsPath } : void 0; } public setWorkspace(workspace: any): void { @@ -522,7 +525,7 @@ export class TestEditorService implements IWorkbenchEditorService { return TPromise.as([]); } - public closeEditors(position: Position, except?: IEditorInput, direction?: Direction): TPromise { + public closeEditors(position: Position, filter?: { except?: IEditorInput, direction?: Direction, unmodifiedOnly?: boolean }): TPromise { return TPromise.as(null); } diff --git a/test/smoke/README.md b/test/smoke/README.md index 947fb43969a39..1c9df539b8e40 100644 --- a/test/smoke/README.md +++ b/test/smoke/README.md @@ -11,6 +11,9 @@ If you want to include 'Data Migration' area tests use `npm test -- --latest pa * `./areas/` folder contains a `.ts` file per each area of the document. E.g. `'Search'` area goes under `'search.ts'`. Every area file contains a list of methods with the name that represents the action that can be performed in the corresponding test. This reduces the amount of test suite code and means that if the UI changes, the fix need only be applied in one place. The name of the method reflects the action the tester would do if he would perform the test manually. See [Selenium Page Objects Wiki](https://github.com/SeleniumHQ/selenium/wiki/PageObjects) and [Selenium Bot Style Tests Wiki](https://github.com/SeleniumHQ/selenium/wiki/Bot-Style-Tests) for a good explanation of the implementation. Every smoke test area contains methods that are used in a bot-style approach in `main.ts`. * `./spectron/` wraps the Spectron, with WebDriverIO API wrapped in `client.ts` and instance of Spectron Application is wrapped in `application.ts`. +* `./test_data/` folder contains temporary data used by smoke test (cloned express repository, temporary user-data-dir/extensions-dir). +* `./test_data/screenshots` has action screenshots captured by a smoke test when performing actions during runtime. Screenshots are split in folders per each test. + # Adding new area To contribute a new smoke test area, add `${area}.ts` file under `./areas/`. All related tests to the area should go to the alike named file under `./tests/${area}.ts`. This has to follow the bot-style approach described in the links mentioned above. Methods should be calling WebDriverIO API through `SpectronClient` class. If there is no existing WebDriverIO method, add it to the class. From 3c0bb6678d81fdc06658b2523986d2f41b428b81 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 15 Jun 2017 10:57:04 +0200 Subject: [PATCH 1863/2747] fix tests --- src/vs/workbench/services/configuration/node/configuration.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index 4c62132f61db9..eae962acc3acd 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -71,6 +71,10 @@ class Workspace implements IWorkspace2 { return this._name; } + + public toJSON(): IWorkspace2 { + return { id: this.id, roots: this.roots, name: this.name }; + } } export class WorkspaceConfigurationService extends Disposable implements IWorkspaceContextService, IWorkspaceConfigurationService { From b46e41cb36558a1d33d6445bfa422f4dc537d4c8 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 15 Jun 2017 10:57:14 +0200 Subject: [PATCH 1864/2747] Pass screen resolution argument correctly. --- build/tfs/linux/smoketest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/tfs/linux/smoketest.sh b/build/tfs/linux/smoketest.sh index 33344082253fe..54f18db177415 100644 --- a/build/tfs/linux/smoketest.sh +++ b/build/tfs/linux/smoketest.sh @@ -29,5 +29,5 @@ step "Run smoke test" \ pushd test/smoke npm install npm run compile - xvfb-run -a -s="-screen 0 1024x768x8" node src/main.js --latest "$AGENT_BUILDDIRECTORY/VSCode-linux-ia32/code-insiders" + xvfb-run -a -s "-screen 0 1024x768x8" node src/main.js --latest "$AGENT_BUILDDIRECTORY/VSCode-linux-ia32/code-insiders" popd \ No newline at end of file From 03c919724f2b537d4948a063a4d8512696c9a32b Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 15 Jun 2017 10:59:10 +0200 Subject: [PATCH 1865/2747] explorerView: header area, also update on change workspace roots --- src/vs/workbench/parts/files/browser/views/explorerView.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index acc79c9117332..7366bde969705 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -120,7 +120,12 @@ export class ExplorerView extends CollapsibleView { public renderHeader(container: HTMLElement): void { const titleDiv = $('div.title').appendTo(container); - $('span').text(this.contextService.getWorkspace().name).title(labels.getPathLabel(this.contextService.getWorkspace().resource.fsPath, void 0, this.environmentService)).appendTo(titleDiv); + const setHeader = () => { + const title = this.contextService.getWorkspace2().roots.map(root => labels.getPathLabel(root.fsPath, void 0, this.environmentService)).join(); + $('span').text(this.contextService.getWorkspace2().name).title(title).appendTo(titleDiv); + }; + this.toDispose.push(this.contextService.onDidChangeWorkspaceRoots(() => setHeader())); + setHeader(); super.renderHeader(container); } From 836d40adbf949216e855da25c38cfa5c7d05026f Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 15 Jun 2017 11:27:09 +0200 Subject: [PATCH 1866/2747] Correct screenshotting logic. --- test/smoke/src/helpers/screenshot.ts | 8 +++---- test/smoke/src/spectron/client.ts | 36 ++++++++++++++-------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/test/smoke/src/helpers/screenshot.ts b/test/smoke/src/helpers/screenshot.ts index 649c38493e4fc..d6a0b61370a9a 100644 --- a/test/smoke/src/helpers/screenshot.ts +++ b/test/smoke/src/helpers/screenshot.ts @@ -20,20 +20,20 @@ export class Screenshot { this.createFolder(this.testPath); } - public capture(): Promise { + public async capture(): Promise { return new Promise(async (res, rej) => { const image: Electron.NativeImage = await this.spectron.app.browserWindow.capturePage(); fs.writeFile(`${this.testPath}/${this.index}.png`, image, (err) => { if (err) { rej(err); } + this.index++; + res(); }); - this.index++; - res(); }); } - private createFolder(name: string) { + private createFolder(name: string): void { name.split('/').forEach((folderName, i, fullPath) => { const folder = fullPath.slice(0, i + 1).join('/'); if (!fs.existsSync(folder)) { diff --git a/test/smoke/src/spectron/client.ts b/test/smoke/src/spectron/client.ts index 6a9003199dcca..93a4ef8deea3b 100644 --- a/test/smoke/src/spectron/client.ts +++ b/test/smoke/src/spectron/client.ts @@ -7,7 +7,7 @@ import { Application } from 'spectron'; import { Screenshot } from '../helpers/screenshot'; /** - * Abstracts the Spectron's WebdriverIO managed client property on the created Application instances. + * Abstracts the Spectron's WebdriverIO managed client property on the created Application instances. */ export class SpectronClient { @@ -20,77 +20,77 @@ export class SpectronClient { } public async keys(keys: string[] | string, capture: boolean = true): Promise { - await this.execute(capture); + await this.screenshot(capture); return this.spectron.client.keys(keys); } public async getText(selector: string, capture: boolean = true): Promise { - await this.execute(capture); + await this.screenshot(capture); return this.spectron.client.getText(selector); } public async getHTML(selector: string, capture: boolean = true): Promise { - await this.execute(capture); + await this.screenshot(capture); return this.spectron.client.getHTML(selector); } public async click(selector: string, capture: boolean = true): Promise { - await this.execute(capture); + await this.screenshot(capture); return this.spectron.client.click(selector); } public async doubleClick(selector: string, capture: boolean = true): Promise { - await this.execute(capture); + await this.screenshot(capture); return this.spectron.client.doubleClick(selector); } public async leftClick(selector: string, xoffset: number, yoffset: number, capture: boolean = true): Promise { - await this.execute(capture); + await this.screenshot(capture); return this.spectron.client.leftClick(selector, xoffset, yoffset); } public async rightClick(selector: string, capture: boolean = true): Promise { - await this.execute(capture); + await this.screenshot(capture); return this.spectron.client.rightClick(selector); } public async moveToObject(selector: string, capture: boolean = true): Promise { - await this.execute(capture); + await this.screenshot(capture); return this.spectron.client.moveToObject(selector); } public async setValue(selector: string, text: string, capture: boolean = true): Promise { - await this.execute(capture); + await this.screenshot(capture); return this.spectron.client.setValue(selector, text); } public async elements(selector: string, capture: boolean = true): Promise { - await this.execute(capture); + await this.screenshot(capture); return this.spectron.client.elements(selector); } public async element(selector: string, capture: boolean = true): Promise { - await this.execute(capture); + await this.screenshot(capture); return this.spectron.client.element(selector); } public async dragAndDrop(sourceElem: string, destinationElem: string, capture: boolean = true): Promise { - await this.execute(capture); + await this.screenshot(capture); return this.spectron.client.dragAndDrop(sourceElem, destinationElem); } public async selectByValue(selector: string, value: string, capture: boolean = true): Promise { - await this.execute(capture); + await this.screenshot(capture); return this.spectron.client.selectByValue(selector, value); } public async getValue(selector: string, capture: boolean = true): Promise { - await this.execute(capture); + await this.screenshot(capture); return this.spectron.client.getValue(selector); } public async getAttribute(selector: string, attribute: string, capture: boolean = true): Promise { - await this.execute(capture); + await this.screenshot(capture); return Promise.resolve(this.spectron.client.getAttribute(selector, attribute)); } @@ -107,7 +107,7 @@ export class SpectronClient { } public async isVisible(selector: string, capture: boolean = true): Promise { - await this.execute(capture); + await this.screenshot(capture); return this.spectron.client.isVisible(selector); } @@ -115,7 +115,7 @@ export class SpectronClient { return this.spectron.client.getTitle(); } - private async execute(capture: boolean): Promise { + private async screenshot(capture: boolean): Promise { if (capture) { try { await this.shot.capture(); From 06966cae58e9c4885016f155c4e950f3e425a312 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 15 Jun 2017 11:45:59 +0200 Subject: [PATCH 1867/2747] log exthost output --- .../electron-browser/extensionHost.ts | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/electron-browser/extensionHost.ts b/src/vs/workbench/electron-browser/extensionHost.ts index fdf5531f05fa0..7cccc708393b4 100644 --- a/src/vs/workbench/electron-browser/extensionHost.ts +++ b/src/vs/workbench/electron-browser/extensionHost.ts @@ -28,7 +28,8 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'; import { generateRandomPipeName, Protocol } from 'vs/base/parts/ipc/node/ipc.net'; import { createServer, Server } from 'net'; -import Event, { Emitter } from 'vs/base/common/event'; +import Event, { Emitter, debounceEvent, mapEvent, any } from 'vs/base/common/event'; +import { fromEventEmitter } from 'vs/base/node/event'; import { IInitData, IWorkspaceData } from 'vs/workbench/api/node/extHost.protocol'; import { MainProcessExtensionService } from 'vs/workbench/api/electron-browser/mainThreadExtensionService'; import { IWorkspaceConfigurationService } from 'vs/workbench/services/configuration/common/configuration'; @@ -130,7 +131,8 @@ export class ExtensionHostProcessWorker { detached: !!isWindows, execArgv: port ? ['--nolazy', (this.isExtensionDevelopmentDebugBrk ? '--debug-brk=' : '--debug=') + port] - : undefined + : undefined, + silent: true }; const crashReporterOptions = this.crashReporterService.getChildProcessStartOptions('extensionHost'); @@ -141,6 +143,29 @@ export class ExtensionHostProcessWorker { // Run Extension Host as fork of current process this.extensionHostProcess = fork(URI.parse(require.toUrl('bootstrap')).fsPath, ['--type=extensionHost'], opts); + type Output = { data: string, format: string[] }; + + this.extensionHostProcess.stdout.setEncoding('utf8'); + this.extensionHostProcess.stderr.setEncoding('utf8'); + const onStdout = fromEventEmitter(this.extensionHostProcess.stdout, 'data'); + const onStderr = fromEventEmitter(this.extensionHostProcess.stderr, 'data'); + const onOutput = any( + mapEvent(onStdout, o => ({ data: `%c${o}`, format: [''] })), + mapEvent(onStderr, o => ({ data: `%c${o}`, format: ['color: red'] })) + ); + + const onDebouncedOutput = debounceEvent(onOutput, (r, o) => { + return r + ? { data: r.data + o.data, format: [...r.format, ...o.format] } + : { data: o.data, format: o.format }; + }, 300); + + onDebouncedOutput(data => { + console.group('Extension Host'); + console.log(data.data, ...data.format); + console.groupEnd(); + }); + // Support logging from extension host this.extensionHostProcess.on('message', msg => { if (msg && (msg).type === '__$console') { From 078fa6d3dacb829130f4ee5213a177100cf669f2 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 15 Jun 2017 11:46:45 +0200 Subject: [PATCH 1868/2747] Converted mocha-runner to TS, indicated to exit smoke test on mocha tests termination. --- test/smoke/src/main.js | 2 +- .../smoke/src/{mocha-runner.js => mocha-runner.ts} | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) rename test/smoke/src/{mocha-runner.js => mocha-runner.ts} (65%) diff --git a/test/smoke/src/main.js b/test/smoke/src/main.js index feedaf304e16c..acf9db502d213 100644 --- a/test/smoke/src/main.js +++ b/test/smoke/src/main.js @@ -71,7 +71,7 @@ function runTests() { console.log('Running tests...') const spawn = require('child_process').spawn; var proc = spawn(process.execPath, [ - 'src/mocha-runner.js' + 'out/mocha-runner.js' ]); proc.stdout.on('data', data => { console.log(data.toString()); diff --git a/test/smoke/src/mocha-runner.js b/test/smoke/src/mocha-runner.ts similarity index 65% rename from test/smoke/src/mocha-runner.js rename to test/smoke/src/mocha-runner.ts index fe25e8855449f..62171a6dbc24d 100644 --- a/test/smoke/src/mocha-runner.js +++ b/test/smoke/src/mocha-runner.ts @@ -3,19 +3,17 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -var Mocha = require('mocha'); -var path = require('path'); +const MochaTest = require('mocha'); +const path = require('path'); -var mocha = new Mocha({ +const mochaTest = new MochaTest({ timeout: 360000, retries: 2, slow: 50000, useColors: true }); -mocha.addFile(path.join(process.cwd(), 'out/test.js')); -mocha.run((failures) => { - process.on('exit', () => { - process.exit(failures); - }); +mochaTest.addFile(path.join(process.cwd(), 'out/test.js')); +mochaTest.run((failures) => { + process.exit(failures); }); \ No newline at end of file From fd1a43076bd979422779cd725ff1d6ffc2357794 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 15 Jun 2017 10:42:49 +0200 Subject: [PATCH 1869/2747] let->const --- .../editor/common/model/editableTextModel.ts | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/vs/editor/common/model/editableTextModel.ts b/src/vs/editor/common/model/editableTextModel.ts index 265d8486fa990..0252783678647 100644 --- a/src/vs/editor/common/model/editableTextModel.ts +++ b/src/vs/editor/common/model/editableTextModel.ts @@ -475,7 +475,7 @@ export class EditableTextModel extends TextModelWithDecorations implements edito let contentChanges: textModelEvents.IModelContentChange[] = []; let lineEditsQueue: IIdentifiedLineEdit[] = []; - let queueLineEdit = (lineEdit: IIdentifiedLineEdit) => { + const queueLineEdit = (lineEdit: IIdentifiedLineEdit) => { if (lineEdit.startColumn === lineEdit.endColumn && lineEdit.text.length === 0) { // empty edit => ignore it return; @@ -483,7 +483,7 @@ export class EditableTextModel extends TextModelWithDecorations implements edito lineEditsQueue.push(lineEdit); }; - let flushLineEdits = () => { + const flushLineEdits = () => { if (lineEditsQueue.length === 0) { return; } @@ -495,7 +495,7 @@ export class EditableTextModel extends TextModelWithDecorations implements edito let currentLineNumberStart = 0; for (let i = 1, len = lineEditsQueue.length; i < len; i++) { - let lineNumber = lineEditsQueue[i].lineNumber; + const lineNumber = lineEditsQueue[i].lineNumber; if (lineNumber === currentLineNumber) { continue; @@ -533,7 +533,7 @@ export class EditableTextModel extends TextModelWithDecorations implements edito let totalLinesCountDelta = 0; for (let i = 0, len = operations.length; i < len; i++) { - let op = operations[i]; + const op = operations[i]; // console.log(); // console.log('-------------------'); @@ -541,26 +541,26 @@ export class EditableTextModel extends TextModelWithDecorations implements edito // console.log('op: ', op); // console.log('<<<\n' + this._lines.map(l => l.text).join('\n') + '\n>>>'); - let startLineNumber = op.range.startLineNumber; - let startColumn = op.range.startColumn; - let endLineNumber = op.range.endLineNumber; - let endColumn = op.range.endColumn; + const startLineNumber = op.range.startLineNumber; + const startColumn = op.range.startColumn; + const endLineNumber = op.range.endLineNumber; + const endColumn = op.range.endColumn; if (startLineNumber === endLineNumber && startColumn === endColumn && (!op.lines || op.lines.length === 0)) { // no-op continue; } - let deletingLinesCnt = endLineNumber - startLineNumber; - let insertingLinesCnt = (op.lines ? op.lines.length - 1 : 0); - let editingLinesCnt = Math.min(deletingLinesCnt, insertingLinesCnt); + const deletingLinesCnt = endLineNumber - startLineNumber; + const insertingLinesCnt = (op.lines ? op.lines.length - 1 : 0); + const editingLinesCnt = Math.min(deletingLinesCnt, insertingLinesCnt); totalLinesCountDelta += (insertingLinesCnt - deletingLinesCnt); // Iterating descending to overlap with previous op // in case there are common lines being edited in both for (let j = editingLinesCnt; j >= 0; j--) { - let editLineNumber = startLineNumber + j; + const editLineNumber = startLineNumber + j; queueLineEdit({ lineNumber: editLineNumber, @@ -577,18 +577,18 @@ export class EditableTextModel extends TextModelWithDecorations implements edito // Flush any pending line edits flushLineEdits(); - let spliceStartLineNumber = startLineNumber + editingLinesCnt; - let spliceStartColumn = this.getLineMaxColumn(spliceStartLineNumber); + const spliceStartLineNumber = startLineNumber + editingLinesCnt; + const spliceStartColumn = this.getLineMaxColumn(spliceStartLineNumber); let endLineRemains = this._lines[endLineNumber - 1].split(markersTracker, endColumn, false, tabSize); this._invalidateLine(spliceStartLineNumber - 1); - let spliceCnt = endLineNumber - spliceStartLineNumber; + const spliceCnt = endLineNumber - spliceStartLineNumber; // Collect all these markers let markersOnDeletedLines: LineMarker[] = []; for (let j = 0; j < spliceCnt; j++) { - let deleteLineIndex = spliceStartLineNumber + j; + const deleteLineIndex = spliceStartLineNumber + j; markersOnDeletedLines = markersOnDeletedLines.concat(this._lines[deleteLineIndex].deleteLine()); } @@ -606,7 +606,7 @@ export class EditableTextModel extends TextModelWithDecorations implements edito } // Update deleted markers - let deletedMarkersPosition = new Position(spliceStartLineNumber, spliceStartColumn); + const deletedMarkersPosition = new Position(spliceStartLineNumber, spliceStartColumn); for (let j = 0, lenJ = markersOnDeletedLines.length; j < lenJ; j++) { markersOnDeletedLines[j].updatePosition(markersTracker, deletedMarkersPosition); } @@ -627,7 +627,7 @@ export class EditableTextModel extends TextModelWithDecorations implements edito // Flush any pending line edits flushLineEdits(); - let spliceLineNumber = startLineNumber + editingLinesCnt; + const spliceLineNumber = startLineNumber + editingLinesCnt; let spliceColumn = (spliceLineNumber === startLineNumber ? startColumn : 1); if (op.lines) { spliceColumn += op.lines[editingLinesCnt].length; From f65fd0ad9cfbd31effddfa439218c298d8ec434a Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 15 Jun 2017 11:52:19 +0200 Subject: [PATCH 1870/2747] Fixes Microsoft/monaco-editor#351: Do not use splice in a loop --- src/vs/base/common/arrays.ts | 10 ++++++++++ src/vs/editor/common/model/editableTextModel.ts | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/vs/base/common/arrays.ts b/src/vs/base/common/arrays.ts index ce2d4100429eb..72416376659fd 100644 --- a/src/vs/base/common/arrays.ts +++ b/src/vs/base/common/arrays.ts @@ -317,3 +317,13 @@ export function insert(array: T[], element: T): () => void { } }; } + +/** + * Insert `insertArr` inside `taget` at `insertIndex`. + * Please don't touch unless you understand https://jsperf.com/inserting-an-array-within-an-array + */ +export function arrayInsert(target: T[], insertIndex: number, insertArr: T[]): T[] { + const before = target.slice(0, insertIndex); + const after = target.slice(insertIndex); + return before.concat(insertArr, after); +} diff --git a/src/vs/editor/common/model/editableTextModel.ts b/src/vs/editor/common/model/editableTextModel.ts index 0252783678647..cbc963424da01 100644 --- a/src/vs/editor/common/model/editableTextModel.ts +++ b/src/vs/editor/common/model/editableTextModel.ts @@ -10,6 +10,7 @@ import { EditStack } from 'vs/editor/common/model/editStack'; import { ILineEdit, LineMarker, ModelLine, MarkersTracker } from 'vs/editor/common/model/modelLine'; import { TextModelWithDecorations, ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; import * as strings from 'vs/base/common/strings'; +import * as arrays from 'vs/base/common/arrays'; import { Selection } from 'vs/editor/common/core/selection'; import { Position } from 'vs/editor/common/core/position'; import { IDisposable } from 'vs/base/common/lifecycle'; @@ -645,14 +646,16 @@ export class EditableTextModel extends TextModelWithDecorations implements edito this._invalidateLine(spliceLineNumber - 1); // Lines in the middle + let newLines: ModelLine[] = []; let newLinesContent: string[] = []; let newLinesLengths = new Uint32Array(insertingLinesCnt - editingLinesCnt); for (let j = editingLinesCnt + 1; j <= insertingLinesCnt; j++) { let newLineNumber = startLineNumber + j; - this._lines.splice(newLineNumber - 1, 0, new ModelLine(newLineNumber, op.lines[j], tabSize)); + newLines.push(new ModelLine(newLineNumber, op.lines[j], tabSize)); newLinesContent.push(op.lines[j]); newLinesLengths[j - editingLinesCnt - 1] = op.lines[j].length + this._EOL.length; } + this._lines = arrays.arrayInsert(this._lines, startLineNumber + editingLinesCnt, newLines); newLinesContent[newLinesContent.length - 1] += leftoverLine.text; if (this._lineStarts) { // update prefix sum From ac08540b9459062599e946bdbf1e96d121ce0998 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Thu, 15 Jun 2017 11:57:58 +0200 Subject: [PATCH 1871/2747] node-debug@1.14.2 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index e4e7211aaefd4..1af153e1e81c2 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -42,7 +42,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.14.1' }, + { name: 'ms-vscode.node-debug', version: '1.14.2' }, { name: 'ms-vscode.node-debug2', version: '1.14.0' } ]; From 6fdfe2f055cc3d842c2cbd0c595e227a1df81c46 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 15 Jun 2017 10:40:45 +0200 Subject: [PATCH 1872/2747] fix ts 2.4.1 compile errors in workbench/api --- .../electron-browser/mainThreadDocumentsAndEditors.ts | 11 ++++------- src/vs/workbench/api/node/extHost.api.impl.ts | 4 ++-- src/vs/workbench/api/node/extHost.protocol.ts | 4 ++-- src/vs/workbench/api/node/extHostCommands.ts | 2 +- src/vs/workbench/api/node/extHostMessageService.ts | 4 +++- src/vs/workbench/api/node/extHostQuickOpen.ts | 4 +++- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts b/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts index 974d8a45c7091..a6be9198dd5c6 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadDocumentsAndEditors.ts @@ -10,7 +10,7 @@ import { compare } from 'vs/base/common/strings'; import { delta } from 'vs/base/common/arrays'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; -import Event, { Emitter, any } from 'vs/base/common/event'; +import Event, { Emitter } from 'vs/base/common/event'; import { ExtHostContext, ExtHostDocumentsAndEditorsShape, IModelAddedData, ITextEditorAddData, IDocumentsAndEditorsDelta } from '../node/extHost.protocol'; import { MainThreadTextEditor } from './mainThreadEditor'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; @@ -127,12 +127,9 @@ class MainThreadDocumentAndEditorStateComputer { } private _onDidAddEditor(e: ICommonCodeEditor): void { - const listener = any( - e.onDidChangeModel, - e.onDidFocusEditor, - e.onDidBlurEditor - )(this._updateState, this); - this._toDisposeOnEditorRemove.set(e.getId(), listener); + this._toDisposeOnEditorRemove.set(e.getId(), e.onDidChangeModel(() => this._updateState())); + this._toDisposeOnEditorRemove.set(e.getId(), e.onDidFocusEditor(() => this._updateState())); + this._toDisposeOnEditorRemove.set(e.getId(), e.onDidBlurEditor(() => this._updateState())); this._updateState(); } diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 7808ff172bbd6..92943aa15205d 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -129,7 +129,7 @@ export function createApiFactory( return extHostCommands.registerCommand(id, command, thisArgs); }, registerTextEditorCommand(id: string, callback: (textEditor: vscode.TextEditor, edit: vscode.TextEditorEdit, ...args: any[]) => void, thisArg?: any): vscode.Disposable { - return extHostCommands.registerCommand(id, (...args: any[]) => { + return extHostCommands.registerCommand(id, (...args: any[]): any => { let activeTextEditor = extHostEditors.getActiveTextEditor(); if (!activeTextEditor) { console.warn('Cannot execute ' + id + ' because there is no active text editor.'); @@ -313,7 +313,7 @@ export function createApiFactory( }, withScmProgress(task: (progress: vscode.Progress) => Thenable) { console.warn(`[Deprecation Warning] function 'withScmProgress' is deprecated and should no longer be used. Use 'withProgress' instead.`); - return extHostProgress.withProgress(extension, { location: extHostTypes.ProgressLocation.SourceControl }, task); + return extHostProgress.withProgress(extension, { location: extHostTypes.ProgressLocation.SourceControl }, (progress, token) => task({ report(n: number) { /*noop*/ } })); }, withProgress(options: vscode.ProgressOptions, task: (progress: vscode.Progress<{ message?: string; percentage?: number }>) => Thenable) { return extHostProgress.withProgress(extension, options, task); diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index c7f432d81bbbc..20cf8960029fb 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -84,9 +84,9 @@ export class InstanceCollection { public define(id: ProxyIdentifier): InstanceSetter { let that = this; return new class { - set(value: T) { + set(value: T): R { that._set(id, value); - return value; + return value; } }; } diff --git a/src/vs/workbench/api/node/extHostCommands.ts b/src/vs/workbench/api/node/extHostCommands.ts index 2095dac3b4aec..e9c3afe662b64 100644 --- a/src/vs/workbench/api/node/extHostCommands.ts +++ b/src/vs/workbench/api/node/extHostCommands.ts @@ -218,7 +218,7 @@ export class CommandsConverter { } } - private _executeConvertedCommand(...args: any[]) { + private _executeConvertedCommand(...args: any[]): Thenable { const actualCmd = this._heap.get(args[0]); return this._commands.executeCommand(actualCmd.command, ...actualCmd.arguments); } diff --git a/src/vs/workbench/api/node/extHostMessageService.ts b/src/vs/workbench/api/node/extHostMessageService.ts index 32572895213d2..31d5cbdcd225c 100644 --- a/src/vs/workbench/api/node/extHostMessageService.ts +++ b/src/vs/workbench/api/node/extHostMessageService.ts @@ -31,7 +31,9 @@ export class ExtHostMessageService { this._proxy = threadService.get(MainContext.MainThreadMessageService); } - showMessage(severity: Severity, message: string, optionsOrFirstItem: vscode.MessageOptions | string | vscode.MessageItem, rest: (string | vscode.MessageItem)[]): Thenable { + showMessage(severity: Severity, message: string, optionsOrFirstItem: vscode.MessageOptions | string, rest: string[]): Thenable; + showMessage(severity: Severity, message: string, optionsOrFirstItem: vscode.MessageOptions | vscode.MessageItem, rest: vscode.MessageItem[]): Thenable; + showMessage(severity: Severity, message: string, optionsOrFirstItem: vscode.MessageOptions | string | vscode.MessageItem, rest: (string | vscode.MessageItem)[]): Thenable { const { options, items } = parseMessageArguments(optionsOrFirstItem, rest); const commands: { title: string; isCloseAffordance: boolean; handle: number; }[] = []; diff --git a/src/vs/workbench/api/node/extHostQuickOpen.ts b/src/vs/workbench/api/node/extHostQuickOpen.ts index 05cab704c0f14..183dcd1d7bc5d 100644 --- a/src/vs/workbench/api/node/extHostQuickOpen.ts +++ b/src/vs/workbench/api/node/extHostQuickOpen.ts @@ -24,7 +24,9 @@ export class ExtHostQuickOpen extends ExtHostQuickOpenShape { this._proxy = threadService.get(MainContext.MainThreadQuickOpen); } - showQuickPick(itemsOrItemsPromise: Item[] | Thenable, options?: QuickPickOptions, token: CancellationToken = CancellationToken.None): Thenable { + showQuickPick(itemsOrItemsPromise: string[] | Thenable, options?: QuickPickOptions, token?: CancellationToken): Thenable; + showQuickPick(itemsOrItemsPromise: QuickPickItem[] | Thenable, options?: QuickPickOptions, token?: CancellationToken): Thenable; + showQuickPick(itemsOrItemsPromise: Item[] | Thenable, options?: QuickPickOptions, token: CancellationToken = CancellationToken.None): Thenable { // clear state from last invocation this._onDidSelectItem = undefined; From c80efd221b7f2f86e84433070ff220adedbac933 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 15 Jun 2017 11:59:11 +0200 Subject: [PATCH 1873/2747] debt - fix more ts 2.4.1 compile issues --- src/typings/node.d.ts | 33 ++++++++++--------- src/vs/base/common/event.ts | 4 +-- src/vs/base/node/extfs.ts | 2 +- .../browser/goToDeclarationCommands.ts | 2 +- .../browser/messageController.ts | 13 +++----- .../electron-browser/menusExtensionPoint.ts | 28 ++++++++-------- .../progress/browser/progressService2.ts | 2 +- .../api/extHostCommands.test.ts | 4 +-- 8 files changed, 43 insertions(+), 45 deletions(-) diff --git a/src/typings/node.d.ts b/src/typings/node.d.ts index aa5953d8f15fd..8c33c5a8412b5 100644 --- a/src/typings/node.d.ts +++ b/src/typings/node.d.ts @@ -88,10 +88,10 @@ interface NodeModule { // Same as module.exports declare var exports: any; declare var SlowBuffer: { - new (str: string, encoding?: string): Buffer; - new (size: number): Buffer; - new (size: Uint8Array): Buffer; - new (array: any[]): Buffer; + new(str: string, encoding?: string): Buffer; + new(size: number): Buffer; + new(size: Uint8Array): Buffer; + new(array: any[]): Buffer; prototype: Buffer; isBuffer(obj: any): boolean; byteLength(string: string, encoding?: string): number; @@ -115,19 +115,19 @@ declare var Buffer: { * @param str String to store in buffer. * @param encoding encoding to use, optional. Default is 'utf8' */ - new (str: string, encoding?: string): Buffer; + new(str: string, encoding?: string): Buffer; /** * Allocates a new buffer of {size} octets. * * @param size count of octets to allocate. */ - new (size: number): Buffer; + new(size: number): Buffer; /** * Allocates a new buffer containing the given {array} of octets. * * @param array The octets to store. */ - new (array: Uint8Array): Buffer; + new(array: Uint8Array): Buffer; /** * Produces a Buffer backed by the same allocated memory as * the given {ArrayBuffer}. @@ -135,19 +135,19 @@ declare var Buffer: { * * @param arrayBuffer The ArrayBuffer with which to share memory. */ - new (arrayBuffer: ArrayBuffer): Buffer; + new(arrayBuffer: ArrayBuffer): Buffer; /** * Allocates a new buffer containing the given {array} of octets. * * @param array The octets to store. */ - new (array: any[]): Buffer; + new(array: any[]): Buffer; /** * Copies the passed {buffer} data onto a new {Buffer} instance. * * @param buffer The buffer to copy. */ - new (buffer: Buffer): Buffer; + new(buffer: Buffer): Buffer; prototype: Buffer; /** * Allocates a new Buffer using an {array} of octets. @@ -250,7 +250,7 @@ declare var Buffer: { declare namespace NodeJS { export var Console: { prototype: Console; - new (stdout: WritableStream, stderr?: WritableStream): Console; + new(stdout: WritableStream, stderr?: WritableStream): Console; } export interface ErrnoException extends Error { @@ -1324,7 +1324,7 @@ declare module "https" { } export var Agent: { - new (options?: AgentOptions): Agent; + new(options?: AgentOptions): Agent; }; export interface Server extends tls.Server { } export function createServer(options: ServerOptions, requestListener?: Function): Server; @@ -1959,7 +1959,7 @@ declare module "net" { } export var Socket: { - new (options?: { fd?: string; type?: string; allowHalfOpen?: boolean; }): Socket; + new(options?: { fd?: string; type?: string; allowHalfOpen?: boolean; }): Socket; }; export interface ListenOptions { @@ -2464,6 +2464,7 @@ declare module "fs" { */ export function readFileSync(filename: string, options?: { flag?: string; }): Buffer; export function writeFile(filename: string | number, data: any, callback?: (err: NodeJS.ErrnoException) => void): void; + export function writeFile(filename: string | number, data: any, options: string, callback?: (err: NodeJS.ErrnoException) => void): void; export function writeFile(filename: string | number, data: any, options: { encoding?: string; mode?: number; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; export function writeFile(filename: string | number, data: any, options: { encoding?: string; mode?: string; flag?: string; }, callback?: (err: NodeJS.ErrnoException) => void): void; export function writeFileSync(filename: string, data: any, options?: { encoding?: string; mode?: number; flag?: string; }): void; @@ -2780,7 +2781,7 @@ declare module "string_decoder" { end(buffer?: Buffer): string; } export var StringDecoder: { - new (encoding?: string): NodeStringDecoder; + new(encoding?: string): NodeStringDecoder; }; } @@ -3184,7 +3185,7 @@ declare module "crypto" { verifySpkac(spkac: Buffer): boolean; } export var Certificate: { - new (): Certificate; + new(): Certificate; (): Certificate; } @@ -4128,6 +4129,6 @@ declare module "_debugger" { } export var Client: { - new (): ClientInstance + new(): ClientInstance } } diff --git a/src/vs/base/common/event.ts b/src/vs/base/common/event.ts index 2b68de0c2e37d..adbac3e577601 100644 --- a/src/vs/base/common/event.ts +++ b/src/vs/base/common/event.ts @@ -409,11 +409,11 @@ class ChainableEvent implements IChainableEvent { constructor(private _event: Event) { } - map(fn) { + map(fn: (i: T) => O): IChainableEvent { return new ChainableEvent(mapEvent(this._event, fn)); } - filter(fn) { + filter(fn: (e: T) => boolean): IChainableEvent { return new ChainableEvent(filterEvent(this._event, fn)); } diff --git a/src/vs/base/node/extfs.ts b/src/vs/base/node/extfs.ts index ecffac0980deb..6b99256462b6a 100644 --- a/src/vs/base/node/extfs.ts +++ b/src/vs/base/node/extfs.ts @@ -451,4 +451,4 @@ export function realpath(path: string, callback: (error: Error, realpath: string function normalizePath(path: string): string { return strings.rtrim(paths.normalize(path), paths.sep); -} \ No newline at end of file +} diff --git a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.ts b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.ts index 7db3d8f0c5a3a..0115099afdc79 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.ts @@ -149,7 +149,7 @@ export class DefinitionAction extends EditorAction { revealIfVisible: !sideBySide } }, sideBySide).then(editor => { - return editor && editor.getControl(); + return editor && editor.getControl(); }); } diff --git a/src/vs/editor/contrib/goToDeclaration/browser/messageController.ts b/src/vs/editor/contrib/goToDeclaration/browser/messageController.ts index d54532548279a..4951c14ec8c8f 100644 --- a/src/vs/editor/contrib/goToDeclaration/browser/messageController.ts +++ b/src/vs/editor/contrib/goToDeclaration/browser/messageController.ts @@ -6,7 +6,6 @@ 'use strict'; import 'vs/css!./messageController'; -import { any } from 'vs/base/common/event'; import { setDisposableTimeout } from 'vs/base/common/async'; import { KeyCode } from 'vs/base/common/keyCodes'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; @@ -62,12 +61,10 @@ export class MessageController { this._messageWidget = new MessageWidget(this._editor, position, message); // close on blur, cursor, model change, dispose - this._messageListeners.push(any( - this._editor.onDidBlurEditorText, - this._editor.onDidChangeCursorPosition, - this._editor.onDidDispose, - this._editor.onDidChangeModel - )(this.closeMessage, this)); + this._messageListeners.push(this._editor.onDidBlurEditorText(() => this.closeMessage())); + this._messageListeners.push(this._editor.onDidChangeCursorPosition(() => this.closeMessage())); + this._messageListeners.push(this._editor.onDidDispose(() => this.closeMessage())); + this._messageListeners.push(this._editor.onDidChangeModel(() => this.closeMessage())); // close after 3s this._messageListeners.push(setDisposableTimeout(() => this.closeMessage(), 3000)); @@ -184,4 +181,4 @@ registerThemingParticipant((theme, collector) => { if (background) { collector.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${background}; }`); } -}); \ No newline at end of file +}); diff --git a/src/vs/platform/actions/electron-browser/menusExtensionPoint.ts b/src/vs/platform/actions/electron-browser/menusExtensionPoint.ts index 0e9b8d4f0040b..401e489ee0f1a 100644 --- a/src/vs/platform/actions/electron-browser/menusExtensionPoint.ts +++ b/src/vs/platform/actions/electron-browser/menusExtensionPoint.ts @@ -234,22 +234,22 @@ namespace schema { }, icon: { description: localize('vscode.extension.contributes.commandType.icon', '(Optional) Icon which is used to represent the command in the UI. Either a file path or a themable configuration'), - anyOf: [ - 'string', - { - type: 'object', - properties: { - light: { - description: localize('vscode.extension.contributes.commandType.icon.light', 'Icon path when a light theme is used'), - type: 'string' - }, - dark: { - description: localize('vscode.extension.contributes.commandType.icon.dark', 'Icon path when a dark theme is used'), - type: 'string' - } + anyOf: [{ + type: 'string' + }, + { + type: 'object', + properties: { + light: { + description: localize('vscode.extension.contributes.commandType.icon.light', 'Icon path when a light theme is used'), + type: 'string' + }, + dark: { + description: localize('vscode.extension.contributes.commandType.icon.dark', 'Icon path when a dark theme is used'), + type: 'string' } } - ] + }] } } }; diff --git a/src/vs/workbench/services/progress/browser/progressService2.ts b/src/vs/workbench/services/progress/browser/progressService2.ts index 583d16c913d49..7f55c70b15e77 100644 --- a/src/vs/workbench/services/progress/browser/progressService2.ts +++ b/src/vs/workbench/services/progress/browser/progressService2.ts @@ -129,7 +129,7 @@ export class ProgressService2 implements IProgressService2 { } } - private _withViewletProgress(viewletId: string, task: (progress: IProgress) => TPromise): void { + private _withViewletProgress(viewletId: string, task: (progress: IProgress<{ message?: string, percentage?: number }>) => TPromise): void { const promise = task(emptyProgress); diff --git a/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts b/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts index 447581c40b033..9e4fb57d0191c 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostCommands.test.ts @@ -29,7 +29,7 @@ suite('ExtHostCommands', function () { }; const commands = new ExtHostCommands(OneGetThreadService(shape), undefined); - commands.registerCommand('foo', () => { }).dispose(); + commands.registerCommand('foo', (): any => { }).dispose(); assert.equal(lastUnregister, 'foo'); assert.equal(CommandsRegistry.getCommand('foo'), undefined); @@ -50,7 +50,7 @@ suite('ExtHostCommands', function () { }; const commands = new ExtHostCommands(OneGetThreadService(shape), undefined); - const reg = commands.registerCommand('foo', () => { }); + const reg = commands.registerCommand('foo', (): any => { }); reg.dispose(); reg.dispose(); reg.dispose(); From 47794539771b5e755fe1886466af6ea0b64eece3 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 15 Jun 2017 12:52:54 +0200 Subject: [PATCH 1874/2747] Expose require to Spectron if running smoke test. --- src/vs/workbench/electron-browser/bootstrap/index.js | 4 ++++ test/smoke/src/main.js | 1 + 2 files changed, 5 insertions(+) diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index c01da62847a48..a094c0daba598 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -12,6 +12,10 @@ if (window.location.search.indexOf('prof-startup') >= 0) { profiler.startProfiling('renderer', true); } +if (process.env.SMOKE_TEST) { + window.electronRequire = require; // if smoke test, expose require to Spectron to access the core Electron APIs +} + /*global window,document,define*/ const startTimer = require('../../../base/node/startupTimers').startTimer; diff --git a/test/smoke/src/main.js b/test/smoke/src/main.js index acf9db502d213..d9136eed60073 100644 --- a/test/smoke/src/main.js +++ b/test/smoke/src/main.js @@ -42,6 +42,7 @@ if (parseInt(process.version.substr(1)) < 6) { } // Setting up environment variables +process.env.SMOKE_TEST = 'true'; process.env.VSCODE_LATEST_PATH = program.latest; if (program.stable) process.env.VSCODE_STABLE_PATH = program.stable; process.env.SMOKETEST_REPO = testRepoLocalDir; From 937caced3b0fa017c5b0023380c68973946fef7c Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 15 Jun 2017 13:01:04 +0200 Subject: [PATCH 1875/2747] Missing indication of requireName added as a follow up on 47794539771b5e755fe1886466af6ea0b64eece3. --- test/smoke/src/spectron/application.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/smoke/src/spectron/application.ts b/test/smoke/src/spectron/application.ts index 76443e8ec10a4..03cc56070d4ab 100644 --- a/test/smoke/src/spectron/application.ts +++ b/test/smoke/src/spectron/application.ts @@ -52,7 +52,8 @@ export class SpectronApplication { this.spectron = new Application({ path: electronPath, args: args, - chromeDriverArgs: chromeDriverArgs + chromeDriverArgs: chromeDriverArgs, + requireName: 'electronRequire' }); this.screenshot = new Screenshot(this, testName); this.client = new SpectronClient(this.spectron, this.screenshot); From 9ca12f681f8017de0c0255caac5d5fe3cfb150bb Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 15 Jun 2017 13:28:24 +0200 Subject: [PATCH 1876/2747] #28538 Support settings for multi root workspace - Refactor configuration services to read settings from multiple folders - Implement merging strategy for multi root workspace settings - Implement a configuration model that can be reused across layers - Implement getRoot API in workspace context service --- src/vs/base/common/map.ts | 21 +- .../browser/standalone/simpleServices.ts | 9 +- .../configuration/common/configuration.ts | 121 +++++- src/vs/platform/configuration/common/model.ts | 6 +- .../node/configurationService.ts | 60 +-- .../test/common/configuration.test.ts | 18 +- .../configuration/test/common/model.test.ts | 40 +- .../test/common/testConfigurationService.ts | 6 +- .../electron-browser/telemetryService.test.ts | 5 +- src/vs/platform/workspace/common/workspace.ts | 6 + .../browser/parts/editor/textEditor.ts | 23 +- .../terminalConfigHelper.test.ts | 5 +- .../common/configurationModels.ts | 10 +- .../configuration/node/configuration.ts | 389 ++++++++++++------ .../test/common/configurationModels.test.ts | 28 +- .../node/configurationResolverService.test.ts | 4 +- .../workbench/test/workbenchTestServices.ts | 6 +- 17 files changed, 515 insertions(+), 242 deletions(-) diff --git a/src/vs/base/common/map.ts b/src/vs/base/common/map.ts index 9e7d7dc8d7362..9b5804ee96f21 100644 --- a/src/vs/base/common/map.ts +++ b/src/vs/base/common/map.ts @@ -22,6 +22,12 @@ export function values(map: Map): V[] { return result; } +export function keys(map: Map): K[] { + const result: K[] = []; + map.forEach((value, key) => result.push(key)); + return result; +} + export function getOrSet(map: Map, key: K, value: V): V { let result = map.get(key); if (result === void 0) { @@ -331,7 +337,8 @@ export class TrieMap { } export class ResourceMap { - private map: Map; + + protected map: Map; constructor(private ignoreCase?: boolean) { this.map = new Map(); @@ -379,6 +386,18 @@ export class ResourceMap { } } +export class StrictResourceMap extends ResourceMap { + + constructor() { + super(); + } + + public keys(): URI[] { + return keys(this.map).map(key => URI.parse(key)); + } + +} + // We should fold BoundedMap and LinkedMap. See https://github.com/Microsoft/vscode/issues/28496 interface Item { diff --git a/src/vs/editor/browser/standalone/simpleServices.ts b/src/vs/editor/browser/standalone/simpleServices.ts index a177a093718ad..da2acd51c1f5e 100644 --- a/src/vs/editor/browser/standalone/simpleServices.ts +++ b/src/vs/editor/browser/standalone/simpleServices.ts @@ -450,12 +450,13 @@ export class SimpleConfigurationService implements IConfigurationService { return { value: getConfigurationValue(this.getConfiguration(), key), default: getConfigurationValue(this.getConfiguration(), key), - user: getConfigurationValue(this.getConfiguration(), key) + user: getConfigurationValue(this.getConfiguration(), key), + workspace: void 0 }; } public keys(): IConfigurationKeys { - return { default: [], user: [] }; + return { default: [], user: [], workspace: [] }; } } @@ -519,6 +520,10 @@ export class SimpleWorkspaceContextService implements IWorkspaceContextService { return this.workspace ? { id: `${this.id}`, roots: [this.workspace.resource], name: this.workspace.resource.fsPath } : void 0; } + public getRoot(resource: URI): URI { + return this.isInsideWorkspace(resource) ? this.workspace.resource : null; + } + public hasWorkspace(): boolean { return !!this.workspace; } diff --git a/src/vs/platform/configuration/common/configuration.ts b/src/vs/platform/configuration/common/configuration.ts index 0aec692a2d83a..b3baea8370caf 100644 --- a/src/vs/platform/configuration/common/configuration.ts +++ b/src/vs/platform/configuration/common/configuration.ts @@ -7,6 +7,8 @@ import { TPromise } from 'vs/base/common/winjs.base'; import * as arrays from 'vs/base/common/arrays'; import * as types from 'vs/base/common/types'; import * as objects from 'vs/base/common/objects'; +import URI from 'vs/base/common/uri'; +import { StrictResourceMap } from 'vs/base/common/map'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import Event from 'vs/base/common/event'; @@ -14,9 +16,12 @@ export const IConfigurationService = createDecorator('con export interface IConfigurationOptions { overrideIdentifier?: string; + resource?: URI; section?: string; } +export type IConfigurationValues = { [key: string]: IConfigurationValue }; + export interface IConfigurationService { _serviceBrand: any; @@ -59,6 +64,7 @@ export enum ConfigurationSource { export interface IConfigurationServiceEvent { /** + * TODO: Remove this * The full configuration. */ config: any; @@ -67,6 +73,7 @@ export interface IConfigurationServiceEvent { */ source: ConfigurationSource; /** + * TODO: Remove this * The part of the configuration contributed by the source of this event. */ sourceConfig: any; @@ -76,11 +83,13 @@ export interface IConfigurationValue { value: T; default: T; user: T; + workspace: T; } export interface IConfigurationKeys { default: string[]; user: string[]; + workspace: string[]; } /** @@ -123,7 +132,7 @@ export interface IOverrides { identifiers: string[]; } -export class Configuration { +export class ConfigurationModel { protected _keys: string[] = []; @@ -142,8 +151,8 @@ export class Configuration { return objects.clone(this.contents[section]); } - public override(identifier: string): Configuration { - const result = new Configuration(); + public override(identifier: string): ConfigurationModel { + const result = new ConfigurationModel(); const contents = objects.clone(this.contents); if (this._overrides) { for (const override of this._overrides) { @@ -156,14 +165,14 @@ export class Configuration { return result; } - public merge(other: Configuration, overwrite: boolean = true): Configuration { - const mergedModel = new Configuration(); + public merge(other: ConfigurationModel, overwrite: boolean = true): ConfigurationModel { + const mergedModel = new ConfigurationModel(); this.doMerge(mergedModel, this, overwrite); this.doMerge(mergedModel, other, overwrite); return mergedModel; } - protected doMerge(source: Configuration, target: Configuration, overwrite: boolean = true) { + protected doMerge(source: ConfigurationModel, target: ConfigurationModel, overwrite: boolean = true) { merge(source.contents, objects.clone(target.contents), overwrite); const overrides = objects.clone(source._overrides); for (const override of target._overrides) { @@ -176,4 +185,104 @@ export class Configuration { } source._overrides = overrides; } +} + +export class Configuration { + + private _global: ConfigurationModel; + private _workspace: ConfigurationModel; + protected _foldersConsolidated: StrictResourceMap>; + + constructor(protected _defaults: ConfigurationModel, protected _user: ConfigurationModel, protected folders: StrictResourceMap> = new StrictResourceMap>(), protected workspaceUri?: URI) { + this.merge(); + } + + get defaults(): ConfigurationModel { + return this._defaults; + } + + get user(): ConfigurationModel { + return this._user; + } + + get workspace(): ConfigurationModel { + return this._workspace; + } + + protected merge(): void { + this._global = this._workspace = new ConfigurationModel().merge(this._defaults).merge(this._user); + this._foldersConsolidated = new StrictResourceMap>(); + for (const folder of this.folders.keys()) { + this.mergeFolder(folder); + } + } + + protected mergeFolder(folder: URI) { + if (this.workspaceUri && this.workspaceUri.fsPath === folder.fsPath) { + this._workspace = new ConfigurationModel().merge(this._global).merge(this.folders.get(this.workspaceUri)); + this._foldersConsolidated.set(folder, this._workspace); + } else { + this._foldersConsolidated.set(folder, new ConfigurationModel().merge(this._workspace).merge(this.folders.get(folder))); + } + } + + getValue(options: IConfigurationOptions = {}): C { + const configModel = this.getConfigurationModel(options); + return options.section ? configModel.getContentsFor(options.section) : configModel.contents; + } + + lookup(key: string, overrideIdentifier?: string): IConfigurationValue { + // make sure to clone the configuration so that the receiver does not tamper with the values + return { + default: objects.clone(getConfigurationValue(overrideIdentifier ? this._defaults.override(overrideIdentifier).contents : this._defaults.contents, key)), + user: objects.clone(getConfigurationValue(overrideIdentifier ? this._user.override(overrideIdentifier).contents : this._user.contents, key)), + workspace: objects.clone(this.workspaceUri ? getConfigurationValue(overrideIdentifier ? this.folders.get(this.workspaceUri).override(overrideIdentifier).contents : this.folders.get(this.workspaceUri).contents, key) : void 0), + value: objects.clone(getConfigurationValue(overrideIdentifier ? this._workspace.override(overrideIdentifier).contents : this._workspace.contents, key)) + }; + } + + keys(): IConfigurationKeys { + return { + default: this._defaults.keys, + user: this._user.keys, + workspace: this.workspaceUri ? this.folders.get(this.workspaceUri).keys : [] + }; + } + + values(): IConfigurationValues { + const result = Object.create(null); + const keyset = this.keys(); + const keys = [...keyset.workspace, ...keyset.user, ...keyset.default].sort(); + + let lastKey: string; + for (const key of keys) { + if (key !== lastKey) { + lastKey = key; + result[key] = this.lookup(key); + } + } + + return result; + } + + values2(): Map> { + const result: Map> = new Map>(); + const keyset = this.keys(); + const keys = [...keyset.workspace, ...keyset.user, ...keyset.default].sort(); + + let lastKey: string; + for (const key of keys) { + if (key !== lastKey) { + lastKey = key; + result.set(key, this.lookup(key)); + } + } + + return result; + } + + private getConfigurationModel(options: IConfigurationOptions): ConfigurationModel { + let configurationModel = (options.resource ? this._foldersConsolidated.get(options.resource) : this._workspace) || new ConfigurationModel(); + return options.overrideIdentifier ? configurationModel.override(options.overrideIdentifier) : configurationModel; + } } \ No newline at end of file diff --git a/src/vs/platform/configuration/common/model.ts b/src/vs/platform/configuration/common/model.ts index bbc843ffa3a7c..4b60767383d69 100644 --- a/src/vs/platform/configuration/common/model.ts +++ b/src/vs/platform/configuration/common/model.ts @@ -7,7 +7,7 @@ import { Registry } from 'vs/platform/platform'; import * as json from 'vs/base/common/json'; import { IConfigurationRegistry, Extensions, OVERRIDE_PROPERTY_PATTERN } from 'vs/platform/configuration/common/configurationRegistry'; -import { Configuration, IOverrides } from 'vs/platform/configuration/common/configuration'; +import { ConfigurationModel, IOverrides } from 'vs/platform/configuration/common/configuration'; export function getDefaultValues(): any { const valueTreeRoot: any = Object.create(null); @@ -65,7 +65,7 @@ export function getConfigurationKeys(): string[] { return Object.keys(properties); } -export class DefaultConfiguration extends Configuration { +export class DefaultConfigurationModel extends ConfigurationModel { constructor() { super(getDefaultValues()); @@ -89,7 +89,7 @@ interface Overrides extends IOverrides { raw: any; } -export class CustomConfiguration extends Configuration { +export class CustomConfigurationModel extends ConfigurationModel { protected _parseErrors: any[] = []; diff --git a/src/vs/platform/configuration/node/configurationService.ts b/src/vs/platform/configuration/node/configurationService.ts index 3f7a1e9c22cf1..76ad820e19609 100644 --- a/src/vs/platform/configuration/node/configurationService.ts +++ b/src/vs/platform/configuration/node/configurationService.ts @@ -5,28 +5,21 @@ 'use strict'; import { TPromise } from 'vs/base/common/winjs.base'; -import * as objects from 'vs/base/common/objects'; import { ConfigWatcher } from 'vs/base/node/config'; import { Registry } from 'vs/platform/platform'; import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; import { IDisposable, toDisposable, Disposable } from 'vs/base/common/lifecycle'; -import { ConfigurationSource, IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, getConfigurationValue, IConfigurationKeys, Configuration, IConfigurationOptions } from 'vs/platform/configuration/common/configuration'; -import { CustomConfiguration, DefaultConfiguration } from 'vs/platform/configuration/common/model'; +import { ConfigurationSource, IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, IConfigurationKeys, ConfigurationModel, IConfigurationOptions, Configuration } from 'vs/platform/configuration/common/configuration'; +import { CustomConfigurationModel, DefaultConfigurationModel } from 'vs/platform/configuration/common/model'; import Event, { Emitter } from 'vs/base/common/event'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -export interface ICache { - defaults: Configuration; - user: Configuration; - consolidated: Configuration; -} - export class ConfigurationService extends Disposable implements IConfigurationService, IDisposable { _serviceBrand: any; - private cache: ICache; - private userConfigModelWatcher: ConfigWatcher>; + private _configuration: Configuration; + private userConfigModelWatcher: ConfigWatcher>; private _onDidUpdateConfiguration: Emitter = this._register(new Emitter()); public readonly onDidUpdateConfiguration: Event = this._onDidUpdateConfiguration.event; @@ -37,8 +30,8 @@ export class ConfigurationService extends Disposable implements IConfiguratio super(); this.userConfigModelWatcher = new ConfigWatcher(environmentService.appSettingsPath, { - changeBufferDelay: 300, defaultConfig: new CustomConfiguration(null, environmentService.appSettingsPath), parse: (content: string, parseErrors: any[]) => { - const userConfigModel = new CustomConfiguration(content, environmentService.appSettingsPath); + changeBufferDelay: 300, defaultConfig: new CustomConfigurationModel(null, environmentService.appSettingsPath), parse: (content: string, parseErrors: any[]) => { + const userConfigModel = new CustomConfigurationModel(content, environmentService.appSettingsPath); parseErrors = [...userConfigModel.errors]; return userConfigModel; } @@ -51,9 +44,9 @@ export class ConfigurationService extends Disposable implements IConfiguratio } private onConfigurationChange(source: ConfigurationSource): void { - this.cache = void 0; // reset our caches + this.reset(); // reset our caches - const cache = this.getCache(); + const cache = this.getConfiguration2(); this._onDidUpdateConfiguration.fire({ config: this.getConfiguration(), @@ -65,8 +58,7 @@ export class ConfigurationService extends Disposable implements IConfiguratio public reloadConfiguration(section?: string): TPromise { return new TPromise(c => { this.userConfigModelWatcher.reload(() => { - this.cache = void 0; // reset our caches - + this.reset(); // reset our caches c(this.getConfiguration(section)); }); }); @@ -75,34 +67,23 @@ export class ConfigurationService extends Disposable implements IConfiguratio public getConfiguration(section?: string): C public getConfiguration(options?: IConfigurationOptions): C public getConfiguration(arg?: any): C { - const options = this.toOptions(arg); - const cache = this.getCache(); - const configModel = options.overrideIdentifier ? cache.consolidated.override(options.overrideIdentifier) : cache.consolidated; - return options.section ? configModel.getContentsFor(options.section) : configModel.contents; + return this.getConfiguration2().getValue(this.toOptions(arg)); } public lookup(key: string, overrideIdentifier?: string): IConfigurationValue { - const cache = this.getCache(); - - // make sure to clone the configuration so that the receiver does not tamper with the values - return { - default: objects.clone(getConfigurationValue(overrideIdentifier ? cache.defaults.override(overrideIdentifier).contents : cache.defaults.contents, key)), - user: objects.clone(getConfigurationValue(overrideIdentifier ? cache.user.override(overrideIdentifier).contents : cache.user.contents, key)), - value: objects.clone(getConfigurationValue(overrideIdentifier ? cache.consolidated.override(overrideIdentifier).contents : cache.consolidated.contents, key)) - }; + return this.getConfiguration2().lookup(key, overrideIdentifier); } public keys(): IConfigurationKeys { - const cache = this.getCache(); + return this.getConfiguration2().keys(); + } - return { - default: cache.defaults.keys, - user: cache.user.keys - }; + public getConfiguration2(): Configuration { + return this._configuration || (this._configuration = this.consolidateConfigurations()); } - public getCache(): ICache { - return this.cache || (this.cache = this.consolidateConfigurations()); + private reset(): void { + this._configuration = this.consolidateConfigurations(); } private toOptions(arg: any): IConfigurationOptions { @@ -115,10 +96,9 @@ export class ConfigurationService extends Disposable implements IConfiguratio return {}; } - private consolidateConfigurations(): ICache { - const defaults = new DefaultConfiguration(); + private consolidateConfigurations(): Configuration { + const defaults = new DefaultConfigurationModel(); const user = this.userConfigModelWatcher.getConfig(); - const consolidated = defaults.merge(user); - return { defaults, user, consolidated }; + return new Configuration(defaults, user); } } \ No newline at end of file diff --git a/src/vs/platform/configuration/test/common/configuration.test.ts b/src/vs/platform/configuration/test/common/configuration.test.ts index 69552e758fb35..e2163cfd88f51 100644 --- a/src/vs/platform/configuration/test/common/configuration.test.ts +++ b/src/vs/platform/configuration/test/common/configuration.test.ts @@ -5,7 +5,7 @@ 'use strict'; import * as assert from 'assert'; -import { Configuration, merge } from 'vs/platform/configuration/common/configuration'; +import { ConfigurationModel, merge } from 'vs/platform/configuration/common/configuration'; import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; import { Registry } from 'vs/platform/platform'; @@ -44,35 +44,35 @@ suite('Configuration', () => { }); test('simple merge using configuration', () => { - let base = new Configuration({ 'a': 1, 'b': 2 }); - let add = new Configuration({ 'a': 3, 'c': 4 }); + let base = new ConfigurationModel({ 'a': 1, 'b': 2 }); + let add = new ConfigurationModel({ 'a': 3, 'c': 4 }); let result = base.merge(add); assert.deepEqual(result.contents, { 'a': 3, 'b': 2, 'c': 4 }); }); test('Recursive merge using config models', () => { - let base = new Configuration({ 'a': { 'b': 1 } }); - let add = new Configuration({ 'a': { 'b': 2 } }); + let base = new ConfigurationModel({ 'a': { 'b': 1 } }); + let add = new ConfigurationModel({ 'a': { 'b': 2 } }); let result = base.merge(add); assert.deepEqual(result.contents, { 'a': { 'b': 2 } }); }); test('Test contents while getting an existing property', () => { - let testObject = new Configuration({ 'a': 1 }); + let testObject = new ConfigurationModel({ 'a': 1 }); assert.deepEqual(testObject.getContentsFor('a'), 1); - testObject = new Configuration({ 'a': { 'b': 1 } }); + testObject = new ConfigurationModel({ 'a': { 'b': 1 } }); assert.deepEqual(testObject.getContentsFor('a'), { 'b': 1 }); }); test('Test contents are undefined for non existing properties', () => { - const testObject = new Configuration({ awesome: true }); + const testObject = new ConfigurationModel({ awesome: true }); assert.deepEqual(testObject.getContentsFor('unknownproperty'), undefined); }); test('Test override gives all content merged with overrides', () => { - const testObject = new Configuration({ 'a': 1, 'c': 1 }, [{ identifiers: ['b'], contents: { 'a': 2 } }]); + const testObject = new ConfigurationModel({ 'a': 1, 'c': 1 }, [{ identifiers: ['b'], contents: { 'a': 2 } }]); assert.deepEqual(testObject.override('b').contents, { 'a': 2, 'c': 1 }); }); diff --git a/src/vs/platform/configuration/test/common/model.test.ts b/src/vs/platform/configuration/test/common/model.test.ts index e2f3bb6e99720..86ac706b3f0e5 100644 --- a/src/vs/platform/configuration/test/common/model.test.ts +++ b/src/vs/platform/configuration/test/common/model.test.ts @@ -5,7 +5,7 @@ 'use strict'; import * as assert from 'assert'; -import { CustomConfiguration, DefaultConfiguration } from 'vs/platform/configuration/common/model'; +import { CustomConfigurationModel, DefaultConfigurationModel } from 'vs/platform/configuration/common/model'; import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; import { Registry } from 'vs/platform/platform'; @@ -29,46 +29,46 @@ suite('Configuration', () => { }); test('simple merge using models', () => { - let base = new CustomConfiguration(JSON.stringify({ 'a': 1, 'b': 2 })); - let add = new CustomConfiguration(JSON.stringify({ 'a': 3, 'c': 4 })); + let base = new CustomConfigurationModel(JSON.stringify({ 'a': 1, 'b': 2 })); + let add = new CustomConfigurationModel(JSON.stringify({ 'a': 3, 'c': 4 })); let result = base.merge(add); assert.deepEqual(result.contents, { 'a': 3, 'b': 2, 'c': 4 }); }); test('simple merge with an undefined contents', () => { - let base = new CustomConfiguration(JSON.stringify({ 'a': 1, 'b': 2 })); - let add = new CustomConfiguration(null); + let base = new CustomConfigurationModel(JSON.stringify({ 'a': 1, 'b': 2 })); + let add = new CustomConfigurationModel(null); let result = base.merge(add); assert.deepEqual(result.contents, { 'a': 1, 'b': 2 }); - base = new CustomConfiguration(null); - add = new CustomConfiguration(JSON.stringify({ 'a': 1, 'b': 2 })); + base = new CustomConfigurationModel(null); + add = new CustomConfigurationModel(JSON.stringify({ 'a': 1, 'b': 2 })); result = base.merge(add); assert.deepEqual(result.contents, { 'a': 1, 'b': 2 }); - base = new CustomConfiguration(null); - add = new CustomConfiguration(null); + base = new CustomConfigurationModel(null); + add = new CustomConfigurationModel(null); result = base.merge(add); assert.deepEqual(result.contents, {}); }); test('Recursive merge using config models', () => { - let base = new CustomConfiguration(JSON.stringify({ 'a': { 'b': 1 } })); - let add = new CustomConfiguration(JSON.stringify({ 'a': { 'b': 2 } })); + let base = new CustomConfigurationModel(JSON.stringify({ 'a': { 'b': 1 } })); + let add = new CustomConfigurationModel(JSON.stringify({ 'a': { 'b': 2 } })); let result = base.merge(add); assert.deepEqual(result.contents, { 'a': { 'b': 2 } }); }); test('Test contents while getting an existing property', () => { - let testObject = new CustomConfiguration(JSON.stringify({ 'a': 1 })); + let testObject = new CustomConfigurationModel(JSON.stringify({ 'a': 1 })); assert.deepEqual(testObject.getContentsFor('a'), 1); - testObject = new CustomConfiguration(JSON.stringify({ 'a': { 'b': 1 } })); + testObject = new CustomConfigurationModel(JSON.stringify({ 'a': { 'b': 1 } })); assert.deepEqual(testObject.getContentsFor('a'), { 'b': 1 }); }); test('Test contents are undefined for non existing properties', () => { - const testObject = new CustomConfiguration(JSON.stringify({ + const testObject = new CustomConfigurationModel(JSON.stringify({ awesome: true })); @@ -76,25 +76,25 @@ suite('Configuration', () => { }); test('Test contents are undefined for undefined config', () => { - const testObject = new CustomConfiguration(null); + const testObject = new CustomConfigurationModel(null); assert.deepEqual(testObject.getContentsFor('unknownproperty'), undefined); }); test('Test configWithOverrides gives all content merged with overrides', () => { - const testObject = new CustomConfiguration(JSON.stringify({ 'a': 1, 'c': 1, '[b]': { 'a': 2 } })); + const testObject = new CustomConfigurationModel(JSON.stringify({ 'a': 1, 'c': 1, '[b]': { 'a': 2 } })); assert.deepEqual(testObject.override('b').contents, { 'a': 2, 'c': 1, '[b]': { 'a': 2 } }); }); test('Test configWithOverrides gives empty contents', () => { - const testObject = new CustomConfiguration(null); + const testObject = new CustomConfigurationModel(null); assert.deepEqual(testObject.override('b').contents, {}); }); test('Test update with empty data', () => { - const testObject = new CustomConfiguration(); + const testObject = new CustomConfigurationModel(); testObject.update(''); assert.deepEqual(testObject.contents, {}); @@ -125,7 +125,7 @@ suite('Configuration', () => { } } }); - assert.equal(true, new DefaultConfiguration().getContentsFor('a')); + assert.equal(true, new DefaultConfigurationModel().getContentsFor('a')); }); test('Test registering the language property', () => { @@ -142,7 +142,7 @@ suite('Configuration', () => { } } }); - assert.equal(undefined, new DefaultConfiguration().getContentsFor('[a]')); + assert.equal(undefined, new DefaultConfigurationModel().getContentsFor('[a]')); }); }); \ No newline at end of file diff --git a/src/vs/platform/configuration/test/common/testConfigurationService.ts b/src/vs/platform/configuration/test/common/testConfigurationService.ts index 9af8629a5bb29..06be8aa2346b5 100644 --- a/src/vs/platform/configuration/test/common/testConfigurationService.ts +++ b/src/vs/platform/configuration/test/common/testConfigurationService.ts @@ -36,14 +36,16 @@ export class TestConfigurationService extends EventEmitter implements IConfigura return { value: getConfigurationValue(this.getConfiguration(), key), default: getConfigurationValue(this.getConfiguration(), key), - user: getConfigurationValue(this.getConfiguration(), key) + user: getConfigurationValue(this.getConfiguration(), key), + workspace: null }; } public keys(): IConfigurationKeys { return { default: getConfigurationKeys(), - user: Object.keys(this.configuration) + user: Object.keys(this.configuration), + workspace: [] }; } } diff --git a/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts b/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts index 9a49dfd7b38b5..814428897c6a4 100644 --- a/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts +++ b/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts @@ -688,10 +688,11 @@ suite('TelemetryService', () => { return { value: getConfigurationValue(this.getConfiguration(), key), default: getConfigurationValue(this.getConfiguration(), key), - user: getConfigurationValue(this.getConfiguration(), key) + user: getConfigurationValue(this.getConfiguration(), key), + workspace: null, }; }, - keys() { return { default: [], user: [] }; }, + keys() { return { default: [], user: [], workspace: [] }; }, onDidUpdateConfiguration: emitter.event }); diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index 7abd76ad14ca2..ab469fc3e8a5a 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -38,6 +38,12 @@ export interface IWorkspaceContextService { */ onDidChangeWorkspaceRoots: Event; + /** + * Returns the root for the given resource from the workspace. + * Can be null if there is no workspace or the resource is not inside the workspace. + */ + getRoot(resource: URI): URI; + /** * Returns iff the provided resource is inside the workspace or not. */ diff --git a/src/vs/workbench/browser/parts/editor/textEditor.ts b/src/vs/workbench/browser/parts/editor/textEditor.ts index d9cb5e09200d6..129428cd75032 100644 --- a/src/vs/workbench/browser/parts/editor/textEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textEditor.ts @@ -7,6 +7,7 @@ import nls = require('vs/nls'); import { TPromise } from 'vs/base/common/winjs.base'; +import URI from 'vs/base/common/uri'; import { Dimension, Builder } from 'vs/base/browser/builder'; import objects = require('vs/base/common/objects'); import types = require('vs/base/common/types'); @@ -116,9 +117,9 @@ export abstract class BaseTextEditor extends BaseEditor { protected getConfigurationOverrides(): IEditorOptions { const overrides = {}; - const language = this.getLanguage(); - if (language) { - objects.assign(overrides, this.configurationService.getConfiguration({ overrideIdentifier: language, section: 'editor' })); + const resource = this.getResource(); + if (resource) { + objects.assign(overrides, this.configurationService.getConfiguration({ /*resource: this.getResource(), */overrideIdentifier: this.getLanguage(), section: 'editor' })); } objects.assign(overrides, { @@ -326,6 +327,22 @@ export abstract class BaseTextEditor extends BaseEditor { return null; } + protected getResource(): URI { + const codeEditor = getCodeEditor(this); + if (codeEditor) { + const model = codeEditor.getModel(); + if (model) { + return model.uri; + } + } + + if (this.input) { + return toResource(this.input); + } + + return null; + } + protected abstract getAriaLabel(): string; public dispose(): void { diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts index 2e0b9c5831d14..80da83ff48995 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts @@ -15,11 +15,12 @@ import { EDITOR_FONT_DEFAULTS } from 'vs/editor/common/config/editorOptions'; class MockConfigurationService implements IConfigurationService { public _serviceBrand: any; + public serviceId = IConfigurationService; public constructor(private configuration: any = {}) { } public reloadConfiguration(section?: string): TPromise { return TPromise.as(this.getConfiguration()); } - public lookup(key: string) { return { value: getConfigurationValue(this.getConfiguration(), key), default: getConfigurationValue(this.getConfiguration(), key), user: getConfigurationValue(this.getConfiguration(), key) }; } + public lookup(key: string) { return { value: getConfigurationValue(this.getConfiguration(), key), default: getConfigurationValue(this.getConfiguration(), key), user: getConfigurationValue(this.getConfiguration(), key), workspace: void 0 }; } + public keys() { return { default: [], user: [], workspace: [] }; } public getConfiguration(): any { return this.configuration; } - public keys() { return { default: [], user: [] }; } public onDidUpdateConfiguration() { return { dispose() { } }; } } diff --git a/src/vs/workbench/services/configuration/common/configurationModels.ts b/src/vs/workbench/services/configuration/common/configurationModels.ts index d6ad817c30e69..cd3ee0e33881a 100644 --- a/src/vs/workbench/services/configuration/common/configurationModels.ts +++ b/src/vs/workbench/services/configuration/common/configurationModels.ts @@ -4,12 +4,12 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import { CustomConfiguration } from 'vs/platform/configuration/common/model'; +import { CustomConfigurationModel } from 'vs/platform/configuration/common/model'; import { WORKSPACE_STANDALONE_CONFIGURATIONS } from 'vs/workbench/services/configuration/common/configuration'; import { Registry } from 'vs/platform/platform'; import { IConfigurationRegistry, IConfigurationPropertySchema, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; -export class ScopedConfigModel extends CustomConfiguration { +export class ScopedConfigurationModel extends CustomConfigurationModel { constructor(content: string, name: string, public readonly scope: string) { super(null, name); @@ -25,7 +25,7 @@ export class ScopedConfigModel extends CustomConfiguration { } -export class WorkspaceSettingsConfigModel extends CustomConfiguration { +export class FolderSettingsModel extends CustomConfigurationModel { private _raw: T; private _unsupportedKeys: string[]; @@ -62,9 +62,9 @@ export class WorkspaceSettingsConfigModel extends CustomConfiguration { } } -export class WorkspaceConfigModel extends CustomConfiguration { +export class FolderConfigurationModel extends CustomConfigurationModel { - constructor(public readonly workspaceSettingsConfig: WorkspaceSettingsConfigModel, private scopedConfigs: ScopedConfigModel[]) { + constructor(public readonly workspaceSettingsConfig: FolderSettingsModel, private scopedConfigs: ScopedConfigurationModel[]) { super(); this.consolidate(); } diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index eae962acc3acd..fb935685395e4 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -8,6 +8,7 @@ import URI from 'vs/base/common/uri'; import * as paths from 'vs/base/common/paths'; import { TPromise } from 'vs/base/common/winjs.base'; import Event, { Emitter } from 'vs/base/common/event'; +import { StrictResourceMap, TrieMap } from 'vs/base/common/map'; import { distinct, equals } from "vs/base/common/arrays"; import * as objects from 'vs/base/common/objects'; import * as errors from 'vs/base/common/errors'; @@ -18,11 +19,13 @@ import { RunOnceScheduler } from 'vs/base/common/async'; import { readFile } from 'vs/base/node/pfs'; import * as extfs from 'vs/base/node/extfs'; import { IWorkspaceContextService, IWorkspace2, Workspace as SingleRootWorkspace, IWorkspace } from "vs/platform/workspace/common/workspace"; +import { FileChangeType, FileChangesEvent, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; +import { isLinux } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; -import { FileChangeType, FileChangesEvent, isEqual } from 'vs/platform/files/common/files'; -import { ScopedConfigModel, WorkspaceConfigModel, WorkspaceSettingsConfigModel } from 'vs/workbench/services/configuration/common/configurationModels'; -import { IConfigurationServiceEvent, ConfigurationSource, getConfigurationValue, IConfigurationOptions, Configuration } from 'vs/platform/configuration/common/configuration'; -import { IWorkspaceConfigurationValues, IWorkspaceConfigurationService, IWorkspaceConfigurationValue, WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME, WORKSPACE_STANDALONE_CONFIGURATIONS, WORKSPACE_CONFIG_DEFAULT_PATH } from 'vs/workbench/services/configuration/common/configuration'; +import { CustomConfigurationModel } from 'vs/platform/configuration/common/model'; +import { ScopedConfigurationModel, FolderConfigurationModel, FolderSettingsModel } from 'vs/workbench/services/configuration/common/configurationModels'; +import { IConfigurationServiceEvent, ConfigurationSource, IConfigurationKeys, IConfigurationValue, ConfigurationModel, IConfigurationOptions, Configuration as BaseConfiguration } from 'vs/platform/configuration/common/configuration'; +import { IWorkspaceConfigurationService, WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME, WORKSPACE_STANDALONE_CONFIGURATIONS, WORKSPACE_CONFIG_DEFAULT_PATH, IWorkspaceConfigurationValues } from 'vs/workbench/services/configuration/common/configuration'; import { ConfigurationService as GlobalConfigurationService } from 'vs/platform/configuration/node/configurationService'; import { createHash } from "crypto"; import { basename } from "path"; @@ -79,8 +82,6 @@ class Workspace implements IWorkspace2 { export class WorkspaceConfigurationService extends Disposable implements IWorkspaceContextService, IWorkspaceConfigurationService { - private static RELOAD_CONFIGURATION_DELAY = 50; - public _serviceBrand: any; private readonly _onDidChangeWorkspaceRoots: Emitter = this._register(new Emitter()); @@ -91,35 +92,27 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private baseConfigurationService: GlobalConfigurationService; - private cachedConfig: Configuration; - private cachedWorkspaceConfig: WorkspaceConfigModel; - - private bulkFetchFromWorkspacePromise: TPromise; - private workspaceFilePathToConfiguration: { [relativeWorkspacePath: string]: TPromise> }; - private reloadConfigurationScheduler: RunOnceScheduler; + private cachedFolderConfigs: StrictResourceMap>; private readonly workspace: Workspace; + private rootsTrieMap: TrieMap = new TrieMap(TrieMap.PathSplitter); + private _configuration: Configuration; constructor(private environmentService: IEnvironmentService, private singleRootWorkspace?: SingleRootWorkspace, private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME) { super(); this.workspace = singleRootWorkspace ? new Workspace(createHash('md5').update(singleRootWorkspace.resource.toString()).digest('hex'), [singleRootWorkspace.resource]) : null; // TODO@Ben for now use the first root folder as id, but revisit this later - - this.workspaceFilePathToConfiguration = Object.create(null); - this.cachedConfig = new Configuration(); - this.cachedWorkspaceConfig = new WorkspaceConfigModel(new WorkspaceSettingsConfigModel(null), []); + this.rootsTrieMap = new TrieMap(TrieMap.PathSplitter); + if (this.workspace) { + this.rootsTrieMap.insert(this.workspace.roots[0].fsPath, this.workspace.roots[0]); + } + this._register(this.onDidUpdateConfiguration(e => this.resolveAdditionalFolders(true))); this.baseConfigurationService = this._register(new GlobalConfigurationService(environmentService)); - this.reloadConfigurationScheduler = this._register(new RunOnceScheduler(() => this.doLoadConfiguration() - .then(config => this._onDidUpdateConfiguration.fire({ - config: config.consolidated, - source: ConfigurationSource.Workspace, - sourceConfig: config.workspace - })) - .done(null, errors.onUnexpectedError), WorkspaceConfigurationService.RELOAD_CONFIGURATION_DELAY)); - this._register(this.baseConfigurationService.onDidUpdateConfiguration(e => this.onBaseConfigurationChanged(e))); - this._register(this.onDidUpdateConfiguration(e => this.resolveAdditionalFolders(true))); + this._register(this.onDidChangeWorkspaceRoots(e => this.onRootsChanged())); + + this.initCaches(); } private resolveAdditionalFolders(notify?: boolean): void { @@ -150,8 +143,15 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp this.workspace.roots = configuredFolders; - if (notify && changed) { - this._onDidChangeWorkspaceRoots.fire(configuredFolders); + if (changed) { + this.rootsTrieMap = new TrieMap(TrieMap.PathSplitter); + for (const folder of this.workspace.roots) { + this.rootsTrieMap.insert(folder.fsPath, folder); + } + + if (notify) { + this._onDidChangeWorkspaceRoots.fire(configuredFolders); + } } } @@ -167,6 +167,14 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp return !!this.workspace; } + public getRoot(resource: URI): URI { + return this.rootsTrieMap.findSubstr(resource.fsPath); + } + + private get workspaceUri(): URI { + return this.workspace ? this.workspace.roots[0] : null; + } + public isInsideWorkspace(resource: URI): boolean { return this.workspace ? this.singleRootWorkspace.isInsideWorkspace(resource) : false; } @@ -179,94 +187,121 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp return this.workspace ? this.singleRootWorkspace.toResource(workspaceRelativePath) : null; } - private onBaseConfigurationChanged(event: IConfigurationServiceEvent): void { - if (event.source === ConfigurationSource.Default) { - this.cachedWorkspaceConfig.update(); - } - - // update cached config when base config changes - const configModel = >this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify) - .merge(this.cachedWorkspaceConfig); // workspace configured values - - // emit this as update to listeners if changed - if (!objects.equals(this.cachedConfig.contents, configModel.contents)) { - this.cachedConfig = configModel; - this._onDidUpdateConfiguration.fire({ - config: this.cachedConfig.contents, - source: event.source, - sourceConfig: event.sourceConfig - }); - } - } - - public initialize(): TPromise { - return this.doLoadConfiguration().then(() => null); + public get configuration(): BaseConfiguration { + return this._configuration; } public getConfiguration(section?: string): C public getConfiguration(options?: IConfigurationOptions): C public getConfiguration(arg?: any): C { - const options = this.toOptions(arg); - const configModel = options.overrideIdentifier ? this.cachedConfig.override(options.overrideIdentifier) : this.cachedConfig; - return options.section ? configModel.getContentsFor(options.section) : configModel.contents; + return this._configuration.getValue(this.toOptions(arg)); } - public lookup(key: string, overrideIdentifier?: string): IWorkspaceConfigurationValue { - const configurationValue = this.baseConfigurationService.lookup(key, overrideIdentifier); - return { - default: configurationValue.default, - user: configurationValue.user, - workspace: objects.clone(getConfigurationValue(overrideIdentifier ? this.cachedWorkspaceConfig.override(overrideIdentifier).contents : this.cachedWorkspaceConfig.contents, key)), - value: objects.clone(getConfigurationValue(overrideIdentifier ? this.cachedConfig.override(overrideIdentifier).contents : this.cachedConfig.contents, key)) - }; + public lookup(key: string, overrideIdentifier?: string): IConfigurationValue { + return this._configuration.lookup(key, overrideIdentifier); } - public keys() { - const keys = this.baseConfigurationService.keys(); + public keys(): IConfigurationKeys { + return this._configuration.keys(); + } - return { - default: keys.default, - user: keys.user, - workspace: this.cachedWorkspaceConfig.keys - }; + public values(): IWorkspaceConfigurationValues { + return this._configuration.values(); } - public values(): IWorkspaceConfigurationValues { - const result: IWorkspaceConfigurationValues = Object.create(null); - const keyset = this.keys(); - const keys = [...keyset.workspace, ...keyset.user, ...keyset.default].sort(); + public getUnsupportedWorkspaceKeys(): string[] { + return this.workspace ? this._configuration.getFolderConfigurationModel(this.workspace.roots[0]).workspaceSettingsConfig.unsupportedKeys : []; + } - let lastKey: string; - for (const key of keys) { - if (key !== lastKey) { - lastKey = key; - result[key] = this.lookup(key); - } + public reloadConfiguration(section?: string): TPromise { + const current = this._configuration; + + return this.baseConfigurationService.reloadConfiguration() + .then(() => this.initialize()) // Reinitialize to ensure we are hitting the disk + .then(() => !this._configuration.equals(current)) // Check if the configuration is changed + .then(changed => changed ? this.trigger() : void 0) // Trigger event if changed + .then(() => this.getConfiguration(section)); + } + + public handleWorkspaceFileEvents(event: FileChangesEvent): void { + if (this.workspace) { + TPromise.join(this.workspace.roots.map(folder => this.cachedFolderConfigs.get(folder).handleWorkspaceFileEvents(event))) // handle file event for each folder + .then(folderConfigurations => + folderConfigurations.map((configuration, index) => ({ configuration, folder: this.workspace.roots[index] })) + .filter(folderConfiguration => !!folderConfiguration.configuration) // Filter folders which are not impacted by events + .map(folderConfiguration => this._configuration.updateFolderConfiguration(folderConfiguration.folder, folderConfiguration.configuration)) // Update the configuration of impacted folders + .reduce((result, value) => result || value, false)) // Check if the effective configuration of folder is changed + .then(changed => changed ? this.trigger() : void 0); // Trigger event if changed } + } - return result; + public initialize(): TPromise { + this.initCaches(); + return this.doInitialize(this.workspace ? this.workspace.roots : []); } - public reloadConfiguration(section?: string): TPromise { + private onRootsChanged(): void { + if (!this.workspace) { + return; + } - // Reset caches to ensure we are hitting the disk - this.bulkFetchFromWorkspacePromise = null; - this.workspaceFilePathToConfiguration = Object.create(null); + let configurationChanged = false; - // Load configuration - return this.baseConfigurationService.reloadConfiguration().then(() => { - const current = this.cachedConfig; - return this.doLoadConfiguration().then(configuration => { - // emit this as update to listeners if changed - if (!objects.equals(current, this.cachedConfig)) { - this._onDidUpdateConfiguration.fire({ - config: configuration.consolidated, - source: ConfigurationSource.Workspace, - sourceConfig: configuration.workspace - }); + // Remove the configurations of deleted folders + for (const key of this.cachedFolderConfigs.keys()) { + if (!this.workspace.roots.filter(folder => folder.toString() === key.toString())[0]) { + this.cachedFolderConfigs.delete(key); + if (this._configuration.deleteFolderConfiguration(key)) { + configurationChanged = true; } - return section ? configuration.consolidated[section] : configuration.consolidated; - }); + } + } + + // Initialize the newly added folders + const toInitialize = this.workspace.roots.filter(folder => !this.cachedFolderConfigs.has(folder)); + if (toInitialize.length) { + this.initCachesForFolders(toInitialize); + this.doInitialize(toInitialize) + .then(changed => configurationChanged || changed) + .then(changed => changed ? this.trigger() : void 0); + } + } + + private initCaches(): void { + this.cachedFolderConfigs = new StrictResourceMap>(); + this._configuration = new Configuration(this.baseConfigurationService.getConfiguration2(), new StrictResourceMap>(), this.workspaceUri); + this.initCachesForFolders(this.workspace ? this.workspace.roots : []); + } + + private initCachesForFolders(folders: URI[]): void { + for (const folder of folders) { + this.cachedFolderConfigs.set(folder, new FolderConfiguration(folder, this.workspaceSettingsRootFolder, this.workspace)); + } + } + + private doInitialize(folders: URI[]): TPromise { + return TPromise.join(folders.map(folder => this.cachedFolderConfigs.get(folder).loadConfiguration() + .then(configuration => this._configuration.updateFolderConfiguration(folder, configuration)))) + .then(changed => changed.reduce((result, value) => result || value, false)); + } + + private onBaseConfigurationChanged(event: IConfigurationServiceEvent): void { + if (event.source === ConfigurationSource.Default) { + if (this.workspace) { + this.workspace.roots.forEach(folder => this._configuration.getFolderConfigurationModel(folder).update()); + } + } + + if (this._configuration.updateBaseConfiguration(this.baseConfigurationService.getConfiguration2())) { + this.trigger(event); + } + } + + private trigger(baseEvent?: IConfigurationServiceEvent): void { + this._onDidUpdateConfiguration.fire({ + config: this.getConfiguration(), + source: baseEvent ? baseEvent.source : ConfigurationSource.Workspace, + sourceConfig: baseEvent ? baseEvent.sourceConfig : this._configuration.getFolderConfigurationModel(this.workspace.roots[0]).contents }); } @@ -279,38 +314,43 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } return {}; } +} - private doLoadConfiguration(): TPromise> { +class FolderConfiguration extends Disposable { - // Load workspace locals - return this.loadWorkspaceConfigFiles().then(workspaceConfigFiles => { + private static RELOAD_CONFIGURATION_DELAY = 50; - // Consolidate (support *.json files in the workspace settings folder) - const workspaceSettingsConfig = >workspaceConfigFiles[WORKSPACE_CONFIG_DEFAULT_PATH] || new WorkspaceSettingsConfigModel(null); - const otherConfigModels = Object.keys(workspaceConfigFiles).filter(key => key !== WORKSPACE_CONFIG_DEFAULT_PATH).map(key => >workspaceConfigFiles[key]); - this.cachedWorkspaceConfig = new WorkspaceConfigModel(workspaceSettingsConfig, otherConfigModels); - - // Override base (global < user) with workspace locals (global < user < workspace) - this.cachedConfig = >this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify) - .merge(this.cachedWorkspaceConfig); // workspace configured values - - return { - consolidated: this.cachedConfig.contents, - workspace: this.cachedWorkspaceConfig.contents - }; - }); - } + private bulkFetchFromWorkspacePromise: TPromise; + private workspaceFilePathToConfiguration: { [relativeWorkspacePath: string]: TPromise> }; + + private reloadConfigurationScheduler: RunOnceScheduler; + private reloadConfigurationEventEmitter: Emitter> = new Emitter>(); + + constructor(private folder: URI, private configFolderRelativePath: string, private workspace: Workspace) { + super(); - private loadWorkspaceConfigFiles(): TPromise<{ [relativeWorkspacePath: string]: Configuration }> { + this.workspaceFilePathToConfiguration = Object.create(null); + this.reloadConfigurationScheduler = this._register(new RunOnceScheduler(() => this.loadConfiguration().then(configuration => this.reloadConfigurationEventEmitter.fire(configuration), errors.onUnexpectedError), FolderConfiguration.RELOAD_CONFIGURATION_DELAY)); + } - // Return early if we don't have a workspace + loadConfiguration(): TPromise> { if (!this.workspace) { - return TPromise.as(Object.create(null)); + return TPromise.wrap(new FolderConfigurationModel(new FolderSettingsModel(null), [])); } + // Load workspace locals + return this.loadWorkspaceConfigFiles().then(workspaceConfigFiles => { + // Consolidate (support *.json files in the workspace settings folder) + const workspaceSettingsConfig = >workspaceConfigFiles[WORKSPACE_CONFIG_DEFAULT_PATH] || new FolderSettingsModel(null); + const otherConfigModels = Object.keys(workspaceConfigFiles).filter(key => key !== WORKSPACE_CONFIG_DEFAULT_PATH).map(key => >workspaceConfigFiles[key]); + return new FolderConfigurationModel(workspaceSettingsConfig, otherConfigModels); + }); + } + + private loadWorkspaceConfigFiles(): TPromise<{ [relativeWorkspacePath: string]: ConfigurationModel }> { // once: when invoked for the first time we fetch json files that contribute settings if (!this.bulkFetchFromWorkspacePromise) { - this.bulkFetchFromWorkspacePromise = resolveStat(this.toResource(this.workspaceSettingsRootFolder)).then(stat => { + this.bulkFetchFromWorkspacePromise = resolveStat(this.toResource(this.configFolderRelativePath)).then(stat => { if (!stat.isDirectory) { return TPromise.as([]); } @@ -334,9 +374,9 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp return this.bulkFetchFromWorkspacePromise.then(() => TPromise.join(this.workspaceFilePathToConfiguration)); } - public handleWorkspaceFileEvents(event: FileChangesEvent): void { + public handleWorkspaceFileEvents(event: FileChangesEvent): TPromise> { if (!this.workspace) { - return; // only enabled when we have a known workspace + return TPromise.wrap(null); } const events = event.changes; @@ -346,7 +386,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp for (let i = 0, len = events.length; i < len; i++) { const resource = events[i].resource; const isJson = paths.extname(resource.fsPath) === '.json'; - const isDeletedSettingsFolder = (events[i].type === FileChangeType.DELETED && isEqual(paths.basename(resource.fsPath), this.workspaceSettingsRootFolder)); + const isDeletedSettingsFolder = (events[i].type === FileChangeType.DELETED && isEqual(paths.basename(resource.fsPath), this.configFolderRelativePath)); if (!isJson && !isDeletedSettingsFolder) { continue; // only JSON files or the actual settings folder } @@ -357,7 +397,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } // Handle case where ".vscode" got deleted - if (workspacePath === this.workspaceSettingsRootFolder && events[i].type === FileChangeType.DELETED) { + if (workspacePath === this.configFolderRelativePath && events[i].type === FileChangeType.DELETED) { this.workspaceFilePathToConfiguration = Object.create(null); affectedByChanges = true; } @@ -380,34 +420,63 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } } - // trigger reload of the configuration if we are affected by changes - if (affectedByChanges && !this.reloadConfigurationScheduler.isScheduled()) { - this.reloadConfigurationScheduler.schedule(); + if (!affectedByChanges) { + return TPromise.as(null); } + + return new TPromise((c, e) => { + let disposable = this.reloadConfigurationEventEmitter.event(configuration => { + disposable.dispose(); + c(configuration); + }); + // trigger reload of the configuration if we are affected by changes + if (!this.reloadConfigurationScheduler.isScheduled()) { + this.reloadConfigurationScheduler.schedule(); + } + }); } - private createConfigModel(content: IContent): Configuration { + private createConfigModel(content: IContent): ConfigurationModel { const path = this.toWorkspaceRelativePath(content.resource); if (path === WORKSPACE_CONFIG_DEFAULT_PATH) { - return new WorkspaceSettingsConfigModel(content.value, content.resource.toString()); + return new FolderSettingsModel(content.value, content.resource.toString()); } else { const matches = /\/([^\.]*)*\.json/.exec(path); if (matches && matches[1]) { - return new ScopedConfigModel(content.value, content.resource.toString(), matches[1]); + return new ScopedConfigurationModel(content.value, content.resource.toString(), matches[1]); } } - return new Configuration(); + return new CustomConfigurationModel(null); } private isWorkspaceConfigurationFile(workspaceRelativePath: string): boolean { return [WORKSPACE_CONFIG_DEFAULT_PATH, WORKSPACE_STANDALONE_CONFIGURATIONS.launch, WORKSPACE_STANDALONE_CONFIGURATIONS.tasks].some(p => p === workspaceRelativePath); } - public getUnsupportedWorkspaceKeys(): string[] { - return this.cachedWorkspaceConfig.workspaceSettingsConfig.unsupportedKeys; + private toResource(workspaceRelativePath: string): URI { + if (typeof workspaceRelativePath === 'string') { + return URI.file(paths.join(this.folder.fsPath, workspaceRelativePath)); + } + + return null; + } + + private isInsideWorkspace(resource: URI): boolean { + if (resource) { + return isEqualOrParent(resource.fsPath, this.folder.fsPath, !isLinux /* ignorecase */); + } + + return false; } + private toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { + if (this.isInsideWorkspace(resource)) { + return paths.normalize(paths.relative(this.folder.fsPath, resource.fsPath), toOSPath); + } + + return null; + } } // node.hs helper functions @@ -445,3 +514,63 @@ function resolveStat(resource: URI): TPromise { }); }); } + +class Configuration extends BaseConfiguration { + + constructor(private _baseConfiguration: BaseConfiguration, protected folders: StrictResourceMap>, workspaceUri: URI) { + super(_baseConfiguration.defaults, _baseConfiguration.user, folders, workspaceUri); + } + + updateBaseConfiguration(baseConfiguration: BaseConfiguration): boolean { + const current = new Configuration(this._baseConfiguration, this.folders, this.workspaceUri); + + this._defaults = baseConfiguration.defaults; + this._user = baseConfiguration.user; + this.merge(); + + return !this.equals(current); + } + + updateFolderConfiguration(resource: URI, configuration: FolderConfigurationModel): boolean { + this.folders.set(resource, configuration); + const current = this.getValue({ resource }); + this.mergeFolder(resource); + return !objects.equals(current, this.getValue({ resource })); + } + + deleteFolderConfiguration(folder: URI): boolean { + if (this.workspaceUri && this.workspaceUri.fsPath === folder.fsPath) { + // Do not remove workspace configuration + return false; + } + + this.folders.delete(folder); + return this._foldersConsolidated.delete(folder); + } + + getFolderConfigurationModel(folder: URI): FolderConfigurationModel { + return >this.folders.get(folder); + } + + equals(other: any): boolean { + if (!other || !(other instanceof Configuration)) { + return false; + } + + if (!objects.equals(this.getValue(), other.getValue())) { + return false; + } + + if (this._foldersConsolidated.size !== other._foldersConsolidated.size) { + return false; + } + + for (const resource of this._foldersConsolidated.keys()) { + if (!objects.equals(this.getValue({ resource }), other.getValue({ resource }))) { + return false; + } + } + + return true; + } +} \ No newline at end of file diff --git a/src/vs/workbench/services/configuration/test/common/configurationModels.test.ts b/src/vs/workbench/services/configuration/test/common/configurationModels.test.ts index 4e6ff132c7ec9..2609ca32cef5e 100644 --- a/src/vs/workbench/services/configuration/test/common/configurationModels.test.ts +++ b/src/vs/workbench/services/configuration/test/common/configurationModels.test.ts @@ -5,26 +5,26 @@ 'use strict'; import * as assert from 'assert'; -import { WorkspaceConfigModel, ScopedConfigModel, WorkspaceSettingsConfigModel } from 'vs/workbench/services/configuration/common/configurationModels'; +import { FolderConfigurationModel, ScopedConfigurationModel, FolderSettingsModel } from 'vs/workbench/services/configuration/common/configurationModels'; suite('ConfigurationService - Model', () => { test('Test scoped configs are undefined', () => { - const settingsConfig = new WorkspaceSettingsConfigModel(JSON.stringify({ + const settingsConfig = new FolderSettingsModel(JSON.stringify({ awesome: true })); - const testObject = new WorkspaceConfigModel(settingsConfig, []); + const testObject = new FolderConfigurationModel(settingsConfig, []); assert.equal(testObject.getContentsFor('task'), undefined); }); test('Test consolidate (settings and tasks)', () => { - const settingsConfig = new WorkspaceSettingsConfigModel(JSON.stringify({ + const settingsConfig = new FolderSettingsModel(JSON.stringify({ awesome: true })); - const tasksConfig = new ScopedConfigModel(JSON.stringify({ + const tasksConfig = new ScopedConfigurationModel(JSON.stringify({ awesome: false }), '', 'tasks'); @@ -35,15 +35,15 @@ suite('ConfigurationService - Model', () => { } }; - assert.deepEqual(new WorkspaceConfigModel(settingsConfig, [tasksConfig]).contents, expected); + assert.deepEqual(new FolderConfigurationModel(settingsConfig, [tasksConfig]).contents, expected); }); test('Test consolidate (settings and launch)', () => { - const settingsConfig = new WorkspaceSettingsConfigModel(JSON.stringify({ + const settingsConfig = new FolderSettingsModel(JSON.stringify({ awesome: true })); - const launchConfig = new ScopedConfigModel(JSON.stringify({ + const launchConfig = new ScopedConfigurationModel(JSON.stringify({ awesome: false }), '', 'launch'); @@ -54,11 +54,11 @@ suite('ConfigurationService - Model', () => { } }; - assert.deepEqual(new WorkspaceConfigModel(settingsConfig, [launchConfig]).contents, expected); + assert.deepEqual(new FolderConfigurationModel(settingsConfig, [launchConfig]).contents, expected); }); test('Test consolidate (settings and launch and tasks) - launch/tasks wins over settings file', () => { - const settingsConfig = new WorkspaceSettingsConfigModel(JSON.stringify({ + const settingsConfig = new FolderSettingsModel(JSON.stringify({ awesome: true, launch: { launchConfig: 'defined', @@ -70,11 +70,11 @@ suite('ConfigurationService - Model', () => { } })); - const tasksConfig = new ScopedConfigModel(JSON.stringify({ + const tasksConfig = new ScopedConfigurationModel(JSON.stringify({ taskConfig: 'overwritten', }), '', 'tasks'); - const launchConfig = new ScopedConfigModel(JSON.stringify({ + const launchConfig = new ScopedConfigurationModel(JSON.stringify({ launchConfig: 'overwritten', }), '', 'launch'); @@ -90,7 +90,7 @@ suite('ConfigurationService - Model', () => { } }; - assert.deepEqual(new WorkspaceConfigModel(settingsConfig, [launchConfig, tasksConfig]).contents, expected); - assert.deepEqual(new WorkspaceConfigModel(settingsConfig, [tasksConfig, launchConfig]).contents, expected); + assert.deepEqual(new FolderConfigurationModel(settingsConfig, [launchConfig, tasksConfig]).contents, expected); + assert.deepEqual(new FolderConfigurationModel(settingsConfig, [tasksConfig, launchConfig]).contents, expected); }); }); \ No newline at end of file diff --git a/src/vs/workbench/services/configurationResolver/test/node/configurationResolverService.test.ts b/src/vs/workbench/services/configurationResolver/test/node/configurationResolverService.test.ts index 2bf018a34736f..df5b6f68b63fa 100644 --- a/src/vs/workbench/services/configurationResolver/test/node/configurationResolverService.test.ts +++ b/src/vs/workbench/services/configurationResolver/test/node/configurationResolverService.test.ts @@ -340,8 +340,8 @@ class MockConfigurationService implements IConfigurationService { public serviceId = IConfigurationService; public constructor(private configuration: any = {}) { } public reloadConfiguration(section?: string): TPromise { return TPromise.as(this.getConfiguration()); } - public lookup(key: string) { return { value: getConfigurationValue(this.getConfiguration(), key), default: getConfigurationValue(this.getConfiguration(), key), user: getConfigurationValue(this.getConfiguration(), key) }; } - public keys() { return { default: [], user: [] }; } + public lookup(key: string) { return { value: getConfigurationValue(this.getConfiguration(), key), default: getConfigurationValue(this.getConfiguration(), key), user: getConfigurationValue(this.getConfiguration(), key), workspace: void 0 }; } + public keys() { return { default: [], user: [], workspace: [] }; } public getConfiguration(): any { return this.configuration; } public onDidUpdateConfiguration() { return { dispose() { } }; } } diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 2ddd8120752f2..fed3804bdff8b 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -64,7 +64,7 @@ export const TestEnvironmentService = new EnvironmentService(parseArgs(process.a export class TestContextService implements IWorkspaceContextService { public _serviceBrand: any; - private workspace: any; + private workspace: IWorkspace; private id: string; private options: any; @@ -97,6 +97,10 @@ export class TestContextService implements IWorkspaceContextService { return this.workspace ? { id: this.id, roots: [this.workspace.resource], name: this.workspace.resource.fsPath } : void 0; } + public getRoot(resource: URI): URI { + return this.isInsideWorkspace(resource) ? this.workspace.resource : null; + } + public setWorkspace(workspace: any): void { this.workspace = workspace; } From f4eda002f1f9a9dd969432951f3c1ad97f2853a5 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 15 Jun 2017 13:06:32 +0200 Subject: [PATCH 1877/2747] :lipstick: --- src/vs/base/common/filters.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index 34966eedc7189..ebf1af9fe90a5 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -554,9 +554,10 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { return undefined; } - let topMatch = _bucket.shift(); - for (const match of _bucket) { - if (!topMatch || topMatch[0] < match[0]) { + let topMatch = _bucket[0]; + for (let i = 1; i < _bucket.length; i++) { + let match = _bucket[i]; + if (topMatch[0] < match[0]) { topMatch = match; } } From 77bdf51137c1f584e7358a03aedaeeec1d338ad0 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 15 Jun 2017 14:33:35 +0200 Subject: [PATCH 1878/2747] test --- src/vs/base/test/common/filters.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/base/test/common/filters.test.ts b/src/vs/base/test/common/filters.test.ts index f5c4bb30869d5..b055bddefb299 100644 --- a/src/vs/base/test/common/filters.test.ts +++ b/src/vs/base/test/common/filters.test.ts @@ -397,6 +397,10 @@ suite('Filters', () => { assertTopScore(fuzzyScore, 'title', 1, 'files.trimTrailingWhitespace', 'window.title'); }); + // test('Unexpected suggestion scoring, #28791', function () { + // assertTopScore(fuzzyScore, '_lines', 1, '_lineStarts', '_lines'); + // }); + test('nextTypoPermutation', function () { function assertTypos(pattern: string, ...variants: string[]) { From a248e3362276f4f29a2e3f3c1858a7a67f4562bc Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 15 Jun 2017 15:00:43 +0200 Subject: [PATCH 1879/2747] fix #28791 --- src/vs/base/common/filters.ts | 11 ++++++++--- src/vs/base/test/common/filters.test.ts | 8 +++++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index ebf1af9fe90a5..684c17cc5561f 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -463,6 +463,9 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { let patternPos = patternStartPos; let wordPos = 0; + // Run a simple check if the characters of pattern occur + // (in order) at all in word. If that isn't the case we + // stop because no match will be possible while (patternPos < patternLen && wordPos < wordLen) { if (lowPattern[patternPos] === lowWord[wordPos]) { patternPos += 1; @@ -470,10 +473,10 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { wordPos += 1; } if (patternPos !== patternLen) { - // no simple matches found -> return early return undefined; } + // There will be a mach, fill in tables for (patternPos = patternStartPos + 1; patternPos <= patternLen; patternPos++) { let lastLowWordChar = ''; @@ -483,20 +486,22 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { let score = -1; let lowWordChar = lowWord[wordPos - 1]; if (lowPattern[patternPos - 1] === lowWordChar) { - - if (wordPos === 1) { + if (wordPos === (patternPos - patternStartPos)) { + // common prefix: `foobar <-> foobaz` if (pattern[patternPos - 1] === word[wordPos - 1]) { score = 7; } else { score = 5; } } else if (lowWordChar !== word[wordPos - 1]) { + // hitting upper-case: `foo <-> forOthers` if (pattern[patternPos - 1] === word[wordPos - 1]) { score = 7; } else { score = 5; } } else if (_seps[lastLowWordChar]) { + // post separator: `foo <-> bar_foo` score = 5; } else { diff --git a/src/vs/base/test/common/filters.test.ts b/src/vs/base/test/common/filters.test.ts index b055bddefb299..663c7cccf3d84 100644 --- a/src/vs/base/test/common/filters.test.ts +++ b/src/vs/base/test/common/filters.test.ts @@ -397,9 +397,11 @@ suite('Filters', () => { assertTopScore(fuzzyScore, 'title', 1, 'files.trimTrailingWhitespace', 'window.title'); }); - // test('Unexpected suggestion scoring, #28791', function () { - // assertTopScore(fuzzyScore, '_lines', 1, '_lineStarts', '_lines'); - // }); + test('Unexpected suggestion scoring, #28791', function () { + assertTopScore(fuzzyScore, '_lines', 1, '_lineStarts', '_lines'); + assertTopScore(fuzzyScore, '_lines', 1, '_lineS', '_lines'); + assertTopScore(fuzzyScore, '_lineS', 0, '_lineS', '_lines'); + }); test('nextTypoPermutation', function () { From 73dad2ebb9ee82fd40d358fbdf39e1403ced342e Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 15 Jun 2017 15:27:02 +0200 Subject: [PATCH 1880/2747] multi root - stable workspace.id --- .../storage/test/storageService.test.ts | 2 +- src/vs/platform/workspace/common/workspace.ts | 19 +-- .../workspace/test/common/testWorkspace.ts | 2 +- src/vs/workbench/api/node/extHost.protocol.ts | 1 + .../api/node/extHostExtensionService.ts | 7 +- src/vs/workbench/electron-browser/main.ts | 108 ++++++++---------- src/vs/workbench/node/extensionHostMain.ts | 1 - .../electron-browser/terminalInstance.test.ts | 10 +- .../configuration/node/configuration.ts | 10 +- .../api/extHostWorkspace.test.ts | 6 +- 10 files changed, 82 insertions(+), 84 deletions(-) diff --git a/src/vs/platform/storage/test/storageService.test.ts b/src/vs/platform/storage/test/storageService.test.ts index 2978c54f13428..2893d767a27ac 100644 --- a/src/vs/platform/storage/test/storageService.test.ts +++ b/src/vs/platform/storage/test/storageService.test.ts @@ -95,7 +95,7 @@ suite('Workbench StorageSevice', () => { assert.strictEqual(s.get('wkey1', StorageScope.WORKSPACE), 'foo'); assert.strictEqual(s.get('wkey2', StorageScope.WORKSPACE), 'foo2'); - ws = new Workspace(TestWorkspace.resource, TestWorkspace.name); + ws = new Workspace(TestWorkspace.resource, Date.now()); ws.uid = new Date().getTime() + 100; s = new StorageService(storageImpl, null, ws); diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index ab469fc3e8a5a..e5670d0fa6cb9 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -60,7 +60,6 @@ export interface IWorkspaceContextService { * Given a workspace relative path, returns the resource with the absolute path. */ toResource: (workspaceRelativePath: string) => URI; - } export interface IWorkspace { @@ -71,6 +70,11 @@ export interface IWorkspace { */ resource: URI; + /** + * the creation date of the workspace if known. + */ + ctime: number; + /** * the name of the workspace */ @@ -93,12 +97,13 @@ export interface IWorkspace2 { * Mutliple roots in this workspace. First entry is master and never changes. */ readonly roots: URI[]; - } export class Workspace implements IWorkspace { + private _name: string; - constructor(private _resource: URI, private _name?: string) { + constructor(private _resource: URI, private _ctime?: number) { + this._name = paths.basename(this._resource.fsPath) || this._resource.fsPath; } public get resource(): URI { @@ -109,6 +114,10 @@ export class Workspace implements IWorkspace { return this._name; } + public get ctime(): number { + return this._ctime; + } + public isInsideWorkspace(resource: URI): boolean { if (resource) { return isEqualOrParent(resource.fsPath, this._resource.fsPath, !isLinux /* ignorecase */); @@ -132,8 +141,4 @@ export class Workspace implements IWorkspace { return null; } - - public toJSON() { - return { resource: this._resource, name: this._name }; - } } \ No newline at end of file diff --git a/src/vs/platform/workspace/test/common/testWorkspace.ts b/src/vs/platform/workspace/test/common/testWorkspace.ts index 4400e7544ea18..8933555a37612 100644 --- a/src/vs/platform/workspace/test/common/testWorkspace.ts +++ b/src/vs/platform/workspace/test/common/testWorkspace.ts @@ -8,5 +8,5 @@ import URI from 'vs/base/common/uri'; export const TestWorkspace = new Workspace( URI.file('C:\\testWorkspace'), - 'Test Workspace' + Date.now() ); diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 20cf8960029fb..9cb2b395ee614 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -58,6 +58,7 @@ export interface IEnvironment { export interface IWorkspaceData { id: string; + name: string; roots: URI[]; } diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index 67acd239b0269..ff5a189ebb75c 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -16,7 +16,6 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { createApiFactory, initializeExtensionApi } from 'vs/workbench/api/node/extHost.api.impl'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { MainContext, MainProcessExtensionServiceShape, IWorkspaceData, IEnvironment, IInitData } from './extHost.protocol'; -import { createHash } from 'crypto'; const hasOwnProperty = Object.hasOwnProperty; @@ -130,11 +129,7 @@ class ExtensionStoragePath { return TPromise.as(undefined); } // TODO@joh what to do with multiple roots? - const storageName = createHash('md5') - .update(this._workspace.roots[0].fsPath) - .update(this._workspace.id || '') - .digest('hex'); - + const storageName = this._workspace.id; const storagePath = join(this._environment.appSettingsHome, 'workspaceStorage', storageName); return dirExists(storagePath).then(exists => { diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index cf8ae033c6d8a..dd2f096321ff2 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -18,7 +18,7 @@ import paths = require('vs/base/common/paths'); import uri from 'vs/base/common/uri'; import strings = require('vs/base/common/strings'); import { IResourceInput } from 'vs/platform/editor/common/editor'; -import { Workspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspace, Workspace } from "vs/platform/workspace/common/workspace"; import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configuration'; import { realpath, stat } from 'vs/base/node/pfs'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; @@ -95,47 +95,45 @@ function toInputs(paths: IPath[], isUntitledFile?: boolean): IResourceInput[] { } function openWorkbench(configuration: IWindowConfiguration, options: IOptions): TPromise { - return getWorkspace(configuration).then(workspace => { + return resolveWorkspace(configuration).then(workspace => { const environmentService = new EnvironmentService(configuration, configuration.execPath); const workspaceConfigurationService = new WorkspaceConfigurationService(environmentService, workspace); const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !workspaceConfigurationService.hasWorkspace()); - - return createStorageService(configuration, environmentService).then(storageService => { - - // Since the configuration service is one of the core services that is used in so many places, we initialize it - // right before startup of the workbench shell to have its data ready for consumers - return workspaceConfigurationService.initialize().then(() => { - timerService.beforeDOMContentLoaded = Date.now(); - - return domContentLoaded().then(() => { - timerService.afterDOMContentLoaded = Date.now(); - - // Open Shell - timerService.beforeWorkbenchOpen = Date.now(); - const shell = new WorkbenchShell(document.body, { - contextService: workspaceConfigurationService, - configurationService: workspaceConfigurationService, - environmentService, - timerService, - storageService - }, configuration, options); - shell.open(); - - // Inform user about loading issues from the loader - (self).require.config({ - onError: (err: any) => { - if (err.errorCode === 'load') { - shell.onUnexpectedError(loaderError(err)); - } + const storageService = createStorageService(workspace, configuration, environmentService); + + // Since the configuration service is one of the core services that is used in so many places, we initialize it + // right before startup of the workbench shell to have its data ready for consumers + return workspaceConfigurationService.initialize().then(() => { + timerService.beforeDOMContentLoaded = Date.now(); + + return domContentLoaded().then(() => { + timerService.afterDOMContentLoaded = Date.now(); + + // Open Shell + timerService.beforeWorkbenchOpen = Date.now(); + const shell = new WorkbenchShell(document.body, { + contextService: workspaceConfigurationService, + configurationService: workspaceConfigurationService, + environmentService, + timerService, + storageService + }, configuration, options); + shell.open(); + + // Inform user about loading issues from the loader + (self).require.config({ + onError: (err: any) => { + if (err.errorCode === 'load') { + shell.onUnexpectedError(loaderError(err)); } - }); + } }); }); }); }); } -function getWorkspace(configuration: IWindowConfiguration): TPromise { +function resolveWorkspace(configuration: IWindowConfiguration): TPromise { if (!configuration.workspacePath) { return TPromise.as(null); } @@ -153,10 +151,11 @@ function getWorkspace(configuration: IWindowConfiguration): TPromise // update config configuration.workspacePath = realWorkspacePath; - const workspaceResource = uri.file(realWorkspacePath); - const folderName = path.basename(realWorkspacePath) || realWorkspacePath; - - return new Workspace(workspaceResource, folderName); + // resolve ctime of workspace + return stat(realWorkspacePath).then(folderStat => new Workspace( + uri.file(realWorkspacePath), + platform.isLinux ? folderStat.ino : folderStat.birthtime.getTime() // On Linux, birthtime is ctime, so we cannot use it! We use the ino instead! + )); }, error => { errors.onUnexpectedError(error); @@ -164,31 +163,24 @@ function getWorkspace(configuration: IWindowConfiguration): TPromise }); } -function createStorageService(configuration: IWindowConfiguration, environmentService: IEnvironmentService): TPromise { - let workspaceStatPromise: TPromise = TPromise.as(null); - if (configuration.workspacePath) { - workspaceStatPromise = stat(configuration.workspacePath); +function createStorageService(workspace: IWorkspace, configuration: IWindowConfiguration, environmentService: IEnvironmentService): IStorageService { + let id: IWorkspaceStorageIdentifier; + if (workspace) { + id = { resource: workspace.resource, uid: workspace.ctime }; + } else if (configuration.backupPath) { + // if we do not have a workspace open, we need to find another identifier for the window to store + // workspace UI state. if we have a backup path in the configuration we can use that because this + // will be a unique identifier per window that is stable between restarts as long as there are + // dirty files in the workspace. + // We use basename() to produce a short identifier, we do not need the full path. We use a custom + // scheme so that we can later distinguish these identifiers from the workspace one. + id = { resource: uri.from({ path: path.basename(configuration.backupPath), scheme: 'empty' }) }; } - return workspaceStatPromise.then(stat => { - let id: IWorkspaceStorageIdentifier; - if (stat) { - id = { resource: uri.file(configuration.workspacePath), uid: platform.isLinux ? stat.ino : stat.birthtime.getTime() }; - } else if (configuration.backupPath) { - // if we do not have a workspace open, we need to find another identifier for the window to store - // workspace UI state. if we have a backup path in the configuration we can use that because this - // will be a unique identifier per window that is stable between restarts as long as there are - // dirty files in the workspace. - // We use basename() to produce a short identifier, we do not need the full path. We use a custom - // scheme so that we can later distinguish these identifiers from the workspace one. - id = { resource: uri.from({ path: path.basename(configuration.backupPath), scheme: 'empty' }) }; - } + const disableStorage = !!environmentService.extensionTestsPath; // never keep any state when running extension tests! + const storage = disableStorage ? inMemoryLocalStorageInstance : window.localStorage; - const disableStorage = !!environmentService.extensionTestsPath; // never keep any state when running extension tests! - const storage = disableStorage ? inMemoryLocalStorageInstance : window.localStorage; - - return new StorageService(storage, storage, id); - }); + return new StorageService(storage, storage, id); } function loaderError(err: Error): Error { diff --git a/src/vs/workbench/node/extensionHostMain.ts b/src/vs/workbench/node/extensionHostMain.ts index 5c361eb9b0664..3cd60b367ecc6 100644 --- a/src/vs/workbench/node/extensionHostMain.ts +++ b/src/vs/workbench/node/extensionHostMain.ts @@ -104,7 +104,6 @@ export class ExtensionHostMain { return TPromise.as(null); } - const desiredFilesMap: { [filename: string]: boolean; } = {}; diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalInstance.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalInstance.test.ts index 0542ce7f90238..df83db52ee2a2 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalInstance.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalInstance.test.ts @@ -107,7 +107,7 @@ suite('Workbench - TerminalInstance', () => { }); test('should use to the workspace if it exists', () => { - assertPathsMatch(instance._getCwd({ executable: null, args: [] }, { resource: Uri.file('/foo') }), '/foo'); + assertPathsMatch(instance._getCwd({ executable: null, args: [] }, { resource: Uri.file('/foo'), ctime: Date.now() }), '/foo'); }); test('should use an absolute custom cwd as is', () => { @@ -117,11 +117,11 @@ suite('Workbench - TerminalInstance', () => { test('should normalize a relative custom cwd against the workspace path', () => { configHelper.config.cwd = 'foo'; - assertPathsMatch(instance._getCwd({ executable: null, args: [] }, { resource: Uri.file('/bar') }), '/bar/foo'); + assertPathsMatch(instance._getCwd({ executable: null, args: [] }, { resource: Uri.file('/bar'), ctime: Date.now() }), '/bar/foo'); configHelper.config.cwd = './foo'; - assertPathsMatch(instance._getCwd({ executable: null, args: [] }, { resource: Uri.file('/bar') }), '/bar/foo'); + assertPathsMatch(instance._getCwd({ executable: null, args: [] }, { resource: Uri.file('/bar'), ctime: Date.now() }), '/bar/foo'); configHelper.config.cwd = '../foo'; - assertPathsMatch(instance._getCwd({ executable: null, args: [] }, { resource: Uri.file('/bar') }, ), '/foo'); + assertPathsMatch(instance._getCwd({ executable: null, args: [] }, { resource: Uri.file('/bar'), ctime: Date.now() }, ), '/foo'); }); test('should fall back for relative a custom cwd that doesn\'t have a workspace', () => { @@ -135,7 +135,7 @@ suite('Workbench - TerminalInstance', () => { test('should ignore custom cwd when told to ignore', () => { configHelper.config.cwd = '/foo'; - assertPathsMatch(instance._getCwd({ executable: null, args: [], ignoreConfigurationCwd: true }, { resource: Uri.file('/bar') }), '/bar'); + assertPathsMatch(instance._getCwd({ executable: null, args: [], ignoreConfigurationCwd: true }, { resource: Uri.file('/bar'), ctime: Date.now() }), '/bar'); }); }); }); \ No newline at end of file diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index fb935685395e4..a2ba71e00b7f2 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -69,7 +69,7 @@ class Workspace implements IWorkspace2 { public get name(): string { if (!this._name) { - this._name = this.roots.map(root => basename(root.fsPath)).join(', '); + this._name = this.roots.map(root => basename(root.fsPath) || root.fsPath).join(', '); } return this._name; @@ -101,7 +101,13 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp constructor(private environmentService: IEnvironmentService, private singleRootWorkspace?: SingleRootWorkspace, private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME) { super(); - this.workspace = singleRootWorkspace ? new Workspace(createHash('md5').update(singleRootWorkspace.resource.toString()).digest('hex'), [singleRootWorkspace.resource]) : null; // TODO@Ben for now use the first root folder as id, but revisit this later + if (singleRootWorkspace) { + const workspaceId = createHash('md5').update(singleRootWorkspace.resource.fsPath).update(singleRootWorkspace.ctime ? String(singleRootWorkspace.ctime) : '').digest('hex'); + this.workspace = new Workspace(workspaceId, [singleRootWorkspace.resource]); + } else { + this.workspace = null; + } + this.rootsTrieMap = new TrieMap(TrieMap.PathSplitter); if (this.workspace) { this.rootsTrieMap.insert(this.workspace.roots[0].fsPath, this.workspace.roots[0]); diff --git a/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts b/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts index c66640c2bd7eb..da0cc1a86a615 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostWorkspace.test.ts @@ -14,7 +14,7 @@ suite('ExtHostWorkspace', function () { test('asRelativePath', function () { - const ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', roots: [URI.file('/Coding/Applications/NewsWoWBot')] }); + const ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', roots: [URI.file('/Coding/Applications/NewsWoWBot')], name: 'Test' }); assert.equal(ws.getRelativePath('/Coding/Applications/NewsWoWBot/bernd/das/brot'), 'bernd/das/brot'); assert.equal(ws.getRelativePath('/Apps/DartPubCache/hosted/pub.dartlang.org/convert-2.0.1/lib/src/hex.dart'), @@ -28,7 +28,7 @@ suite('ExtHostWorkspace', function () { test('asRelativePath, same paths, #11402', function () { const root = '/home/aeschli/workspaces/samples/docker'; const input = '/home/aeschli/workspaces/samples/docker'; - const ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', roots: [URI.file(root)] }); + const ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', roots: [URI.file(root)], name: 'Test' }); assert.equal(ws.getRelativePath(input), input); @@ -43,7 +43,7 @@ suite('ExtHostWorkspace', function () { }); test('asRelativePath, multiple folders', function () { - const ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', roots: [URI.file('/Coding/One'), URI.file('/Coding/Two')] }); + const ws = new ExtHostWorkspace(new TestThreadService(), { id: 'foo', roots: [URI.file('/Coding/One'), URI.file('/Coding/Two')], name: 'Test' }); assert.equal(ws.getRelativePath('/Coding/One/file.txt'), 'file.txt'); assert.equal(ws.getRelativePath('/Coding/Two/files/out.txt'), 'files/out.txt'); assert.equal(ws.getRelativePath('/Coding/Two2/files/out.txt'), '/Coding/Two2/files/out.txt'); From 6c502802f350eaf7675e5604e337c7a173ee88f2 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 15 Jun 2017 15:36:16 +0200 Subject: [PATCH 1881/2747] :lipstick: --- src/vs/workbench/electron-browser/main.ts | 14 ++++++------- .../configuration/node/configuration.ts | 20 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index dd2f096321ff2..c01173bccc28a 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -18,7 +18,7 @@ import paths = require('vs/base/common/paths'); import uri from 'vs/base/common/uri'; import strings = require('vs/base/common/strings'); import { IResourceInput } from 'vs/platform/editor/common/editor'; -import { IWorkspace, Workspace } from "vs/platform/workspace/common/workspace"; +import { Workspace as LegacyWorkspace } from "vs/platform/workspace/common/workspace"; import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configuration'; import { realpath, stat } from 'vs/base/node/pfs'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; @@ -95,11 +95,11 @@ function toInputs(paths: IPath[], isUntitledFile?: boolean): IResourceInput[] { } function openWorkbench(configuration: IWindowConfiguration, options: IOptions): TPromise { - return resolveWorkspace(configuration).then(workspace => { + return resolveLegacyWorkspace(configuration).then(legacyWorkspace => { const environmentService = new EnvironmentService(configuration, configuration.execPath); - const workspaceConfigurationService = new WorkspaceConfigurationService(environmentService, workspace); + const workspaceConfigurationService = new WorkspaceConfigurationService(environmentService, legacyWorkspace); const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !workspaceConfigurationService.hasWorkspace()); - const storageService = createStorageService(workspace, configuration, environmentService); + const storageService = createStorageService(legacyWorkspace, configuration, environmentService); // Since the configuration service is one of the core services that is used in so many places, we initialize it // right before startup of the workbench shell to have its data ready for consumers @@ -133,7 +133,7 @@ function openWorkbench(configuration: IWindowConfiguration, options: IOptions): }); } -function resolveWorkspace(configuration: IWindowConfiguration): TPromise { +function resolveLegacyWorkspace(configuration: IWindowConfiguration): TPromise { if (!configuration.workspacePath) { return TPromise.as(null); } @@ -152,7 +152,7 @@ function resolveWorkspace(configuration: IWindowConfiguration): TPromise new Workspace( + return stat(realWorkspacePath).then(folderStat => new LegacyWorkspace( uri.file(realWorkspacePath), platform.isLinux ? folderStat.ino : folderStat.birthtime.getTime() // On Linux, birthtime is ctime, so we cannot use it! We use the ino instead! )); @@ -163,7 +163,7 @@ function resolveWorkspace(configuration: IWindowConfiguration): TPromise = new TrieMap(TrieMap.PathSplitter); private _configuration: Configuration; - constructor(private environmentService: IEnvironmentService, private singleRootWorkspace?: SingleRootWorkspace, private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME) { + constructor(private environmentService: IEnvironmentService, private legacyWorkspace?: LegacyWorkspace, private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME) { super(); - if (singleRootWorkspace) { - const workspaceId = createHash('md5').update(singleRootWorkspace.resource.fsPath).update(singleRootWorkspace.ctime ? String(singleRootWorkspace.ctime) : '').digest('hex'); - this.workspace = new Workspace(workspaceId, [singleRootWorkspace.resource]); + if (legacyWorkspace) { + const workspaceId = createHash('md5').update(legacyWorkspace.resource.fsPath).update(legacyWorkspace.ctime ? String(legacyWorkspace.ctime) : '').digest('hex'); + this.workspace = new Workspace(workspaceId, [legacyWorkspace.resource]); } else { this.workspace = null; } @@ -161,8 +161,8 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } } - public getWorkspace(): IWorkspace { - return this.singleRootWorkspace; + public getWorkspace(): ILegacyWorkspace { + return this.legacyWorkspace; } public getWorkspace2(): IWorkspace2 { @@ -182,15 +182,15 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } public isInsideWorkspace(resource: URI): boolean { - return this.workspace ? this.singleRootWorkspace.isInsideWorkspace(resource) : false; + return this.workspace ? this.legacyWorkspace.isInsideWorkspace(resource) : false; } public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { - return this.workspace ? this.singleRootWorkspace.toWorkspaceRelativePath(resource, toOSPath) : null; + return this.workspace ? this.legacyWorkspace.toWorkspaceRelativePath(resource, toOSPath) : null; } public toResource(workspaceRelativePath: string): URI { - return this.workspace ? this.singleRootWorkspace.toResource(workspaceRelativePath) : null; + return this.workspace ? this.legacyWorkspace.toResource(workspaceRelativePath) : null; } public get configuration(): BaseConfiguration { From 6dd96307893f57bc2385cb236589d7a7509bf8e7 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 15 Jun 2017 15:51:18 +0200 Subject: [PATCH 1882/2747] fix #28213 --- src/vs/workbench/browser/parts/quickopen/quickOpenController.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index b8da38bc82202..47e8f16d80e10 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -195,6 +195,7 @@ export class QuickOpenController extends Component implements IQuickOpenService currentDecoration = !!message ? Severity.Error : void 0; const newPick = message || defaultMessage; if (newPick !== currentPick) { + options.valueSelection = [lastValue.length, lastValue.length]; currentPick = newPick; resolve(new TPromise(init)); } From 6a1366de98bc18b973b67454111b17d2a4961e88 Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 15 Jun 2017 16:02:54 +0200 Subject: [PATCH 1883/2747] explorerView: remove use of root fully --- .../parts/files/browser/views/explorerView.ts | 77 ++++++++++--------- .../parts/files/common/explorerModel.ts | 13 ++-- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index 7366bde969705..bc207163e9c82 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -340,10 +340,6 @@ export class ExplorerView extends CollapsibleView { return toResource(input, { supportSideBySide: true, filter: 'file' }); } - private get root(): FileStat { - return this.explorerViewer ? (this.explorerViewer.getInput()) : null; - } - private get isCreated(): boolean { return this.explorerViewer && this.explorerViewer.getInput(); } @@ -687,7 +683,11 @@ export class ExplorerView extends CollapsibleView { } private doRefresh(): TPromise { - const targetsToResolve: URI[] = []; + const targetsToResolve: { root: FileStat, resource: URI, options: { resolveTo: URI[] } }[] = []; + this.model.roots.forEach(root => { + const rootAndTargets = { root, resource: root.resource, options: { resolveTo: [] } }; + targetsToResolve.push(rootAndTargets); + }); let targetsToExpand: URI[] = []; if (this.settings[ExplorerView.MEMENTO_EXPANDED_FOLDER_RESOURCES]) { @@ -698,48 +698,50 @@ export class ExplorerView extends CollapsibleView { if (!this.isCreated) { const activeFile = this.getActiveFile(); if (activeFile) { - targetsToResolve.push(activeFile); + const root = this.contextService.getRoot(activeFile); + if (root) { + const found = targetsToResolve.filter(t => t.root.resource.toString() === root.toString()).pop(); + found.options.resolveTo.push(activeFile); + } } - if (targetsToExpand.length) { - targetsToResolve.push(...targetsToExpand); - } + targetsToExpand.forEach(toExpand => { + const root = this.contextService.getRoot(toExpand); + if (root) { + const found = targetsToResolve.filter(ttr => ttr.resource.toString() === root.toString()).pop(); + found.options.resolveTo.push(toExpand); + } + }); } // Subsequent refresh: Receive targets through expanded folders in tree else { - this.getResolvedDirectories(this.root, targetsToResolve); + targetsToResolve.forEach(t => { + this.getResolvedDirectories(t.root, t.options.resolveTo); + }); } // Load Root Stat with given target path configured - const options: IResolveFileOptions = { resolveTo: targetsToResolve }; - const promise = this.fileService.resolveFile(this.contextService.getWorkspace().resource, options).then(stat => { - let explorerPromise: TPromise; - + const promise = this.fileService.resolveFiles(targetsToResolve).then(stats => { // Convert to model - const modelStat = FileStat.create(stat, options.resolveTo); - - // First time refresh: The stat becomes the input of the viewer - if (!this.isCreated) { - explorerPromise = this.explorerViewer.setInput(modelStat).then(() => { - - // Make sure to expand all folders that where expanded in the previous session - if (targetsToExpand) { - return this.explorerViewer.expandAll(targetsToExpand.map(expand => this.root.find(expand))); - } + const modelStats = stats.map((stat, index) => FileStat.create(stat, targetsToResolve[index].options.resolveTo)); + // Subsequent refresh: Merge stat into our local model and refresh tree + modelStats.forEach((modelStat, index) => FileStat.mergeLocalWithDisk(modelStat, this.model.roots[index])); - return TPromise.as(null); - }); + if (this.isCreated) { + return this.explorerViewer.refresh(); } - // Subsequent refresh: Merge stat into our local model and refresh tree - else { - FileStat.mergeLocalWithDisk(modelStat, this.root); + // First time refresh: The stat becomes the input of the viewer + return this.explorerViewer.setInput(this.model).then(() => { - explorerPromise = this.explorerViewer.refresh(this.root); - } + // Make sure to expand all folders that where expanded in the previous session + if (targetsToExpand) { + return this.explorerViewer.expandAll(targetsToExpand.map(expand => this.model.findFirst(expand))); + } - return explorerPromise; + return TPromise.as(null); + }); }, (e: any) => TPromise.wrapError(e)); this.progressService.showWhile(promise, this.partService.isCreated() ? 800 : 3200 /* less ugly initial startup */); @@ -796,23 +798,24 @@ export class ExplorerView extends CollapsibleView { return TPromise.as(null); } - const fileStat = this.root.find(resource); + const fileStat = this.model.findFirst(resource); if (fileStat) { return this.doSelect(fileStat, reveal); } // Stat needs to be resolved first and then revealed const options: IResolveFileOptions = { resolveTo: [resource] }; - return this.fileService.resolveFile(this.contextService.getWorkspace().resource, options).then(stat => { + const rootUri = this.contextService.getRoot(resource); + return this.fileService.resolveFile(rootUri, options).then(stat => { // Convert to model const modelStat = FileStat.create(stat, options.resolveTo); - + const root = this.model.roots.filter(r => r.resource.toString() === rootUri.toString()).pop(); // Update Input with disk Stat - FileStat.mergeLocalWithDisk(modelStat, this.root); + FileStat.mergeLocalWithDisk(modelStat, root); // Select and Reveal - return this.explorerViewer.refresh(this.root).then(() => this.doSelect(this.root.find(resource), reveal)); + return this.explorerViewer.refresh(root).then(() => this.doSelect(root.find(resource), reveal)); }, (e: any) => this.messageService.show(Severity.Error, e)); } diff --git a/src/vs/workbench/parts/files/common/explorerModel.ts b/src/vs/workbench/parts/files/common/explorerModel.ts index 7dfe1c667fa62..6edd5279360c9 100644 --- a/src/vs/workbench/parts/files/common/explorerModel.ts +++ b/src/vs/workbench/parts/files/common/explorerModel.ts @@ -53,11 +53,6 @@ export class Model { return null; } - - public rootForResource(resource: URI): FileStat { - // TODO@Isidor temporary until we have a utility method for this - return this.roots[0]; - } } export class FileStat implements IFileStat { @@ -148,9 +143,11 @@ export class FileStat implements IFileStat { // Map resource => stat const oldLocalChildren = new ResourceMap(); - local.children.forEach((localChild: FileStat) => { - oldLocalChildren.set(localChild.resource, localChild); - }); + if (local.children) { + local.children.forEach((localChild: FileStat) => { + oldLocalChildren.set(localChild.resource, localChild); + }); + } // Clear current children local.children = []; From 2e474545c225d8f616b1209a8ec16c766724f8b2 Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 15 Jun 2017 16:03:12 +0200 Subject: [PATCH 1884/2747] explorerViewer: steps towards multi root --- .../parts/files/browser/views/explorerViewer.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts index 04f7f093da897..39890cff44e18 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts @@ -70,9 +70,12 @@ export class FileDataSource implements IDataSource { @IWorkspaceContextService private contextService: IWorkspaceContextService ) { } - public getId(tree: ITree, stat: FileStat): string { - // TODO@Isidor take the id of the root into account - return `:${stat.getId()}`; + public getId(tree: ITree, stat: FileStat | Model): string { + if (stat instanceof Model) { + return 'model'; + } + + return `${this.contextService.getRoot(stat.resource).toString()}:${stat.getId()}`; } public hasChildren(tree: ITree, stat: FileStat | Model): boolean { @@ -418,7 +421,7 @@ export class FileController extends DefaultController { this.state = state; } - public onLeftClick(tree: ITree, stat: FileStat, event: IMouseEvent, origin: string = 'mouse'): boolean { + public onLeftClick(tree: ITree, stat: FileStat | Model, event: IMouseEvent, origin: string = 'mouse'): boolean { const payload = { origin: origin }; const isDoubleClick = (origin === 'mouse' && event.detail === 2); @@ -435,8 +438,7 @@ export class FileController extends DefaultController { } // Handle root - const workspace = this.contextService.getWorkspace(); - if (workspace && stat.resource.toString() === workspace.resource.toString()) { + if (stat instanceof Model) { tree.clearFocus(payload); tree.clearSelection(payload); From 972b9a12f3ed1ad6b74d8848944f02b868a28cd5 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 15 Jun 2017 16:05:14 +0200 Subject: [PATCH 1885/2747] fix #28789 --- .../contrib/referenceSearch/browser/referencesWidget.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts index 955ce894d6026..bcdefd9311815 100644 --- a/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts +++ b/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.ts @@ -761,6 +761,14 @@ export class ReferenceWidget extends PeekViewWidget { // listen on model changes this._disposeOnNewModel.push(this._model.onDidChangeReferenceRange(reference => this._tree.refresh(reference))); + // listen on selection and focus + this._disposeOnNewModel.push(this._tree.addListener(Controller.Events.FOCUSED, (element) => { + if (element instanceof OneReference) { + this._revealReference(element); + this._onDidSelectReference.fire({ element, kind: 'show', source: 'tree' }); + } + })); + this._disposeOnNewModel.push(this._tree.addListener(Controller.Events.SELECTED, (element: any) => { if (element instanceof OneReference) { this._onDidSelectReference.fire({ element, kind: 'goto', source: 'tree' }); From 33cdd8d152be5b04c3ed6acc2e9478ac9997f8ab Mon Sep 17 00:00:00 2001 From: isidor Date: Thu, 15 Jun 2017 16:05:15 +0200 Subject: [PATCH 1886/2747] show roots in explorer only when there is more than 1 root --- src/vs/workbench/parts/files/browser/views/explorerView.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index bc207163e9c82..a0003873dda3a 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -733,7 +733,8 @@ export class ExplorerView extends CollapsibleView { } // First time refresh: The stat becomes the input of the viewer - return this.explorerViewer.setInput(this.model).then(() => { + // Display roots only when there is more than 1 root + return this.explorerViewer.setInput(this.model.roots.length === 1 ? this.model.roots[0] : this.model).then(() => { // Make sure to expand all folders that where expanded in the previous session if (targetsToExpand) { From 23c631879af3d1f5af33edda2d738618d95850e1 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Thu, 15 Jun 2017 16:04:42 +0200 Subject: [PATCH 1887/2747] Add support to focus terminal and to control terminal instance reuse --- src/vs/vscode.proposed.d.ts | 32 ++ src/vs/workbench/api/node/extHost.api.impl.ts | 1 + src/vs/workbench/api/node/extHostTask.ts | 25 +- src/vs/workbench/api/node/extHostTypes.ts | 8 + .../parts/tasks/browser/buildQuickOpen.ts | 15 +- .../parts/tasks/browser/quickOpen.ts | 57 ++-- .../parts/tasks/browser/restartQuickOpen.ts | 8 +- .../parts/tasks/browser/taskQuickOpen.ts | 15 +- .../parts/tasks/browser/terminateQuickOpen.ts | 8 +- .../parts/tasks/browser/testQuickOpen.ts | 15 +- .../parts/tasks/common/taskConfiguration.ts | 306 +++++++++++------- .../parts/tasks/common/taskSystem.ts | 1 - src/vs/workbench/parts/tasks/common/tasks.ts | 44 +++ .../electron-browser/task.contribution.ts | 8 +- .../electron-browser/terminalTaskSystem.ts | 21 +- .../parts/tasks/node/processTaskSystem.ts | 4 - .../tasks/test/node/configuration.test.ts | 15 +- 17 files changed, 389 insertions(+), 194 deletions(-) diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index bd8dd3dd51e89..29bde57d31838 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -28,6 +28,28 @@ declare module 'vscode' { Never = 3 } + /** + * Controls how the task channel is used between tasks + */ + export enum TaskInstanceKind { + + /** + * Shares a channel with other tasks. This is the default. + */ + Shared = 1, + + /** + * Uses the same task channel for every run if possible. The task channel is not + * shared with other tasks. + */ + Same = 2, + + /** + * Creates a new task channel whenever that task is executed + */ + New = 3 + } + /** * Controls terminal specific behavior. */ @@ -42,6 +64,16 @@ declare module 'vscode' { * Controls whether the command is echoed in the terminal or not. */ echo?: boolean; + + /** + * Controls whether the task pane takes focus when the task is executed + */ + focus?: boolean; + + /** + * Controls in which pane the task is executed. + */ + instance?: TaskInstanceKind; } export interface ProcessTaskOptions { diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 92943aa15205d..4b1429aa2948c 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -489,6 +489,7 @@ export function createApiFactory( ThemeColor: extHostTypes.ThemeColor, // functions TaskRevealKind: extHostTypes.TaskRevealKind, + TaskInstanceKind: extHostTypes.TaskInstanceKind, TaskGroup: extHostTypes.TaskGroup, ShellTask: extHostTypes.ShellTask, ProcessTask: extHostTypes.ProcessTask diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index 180bc9ffbf380..28721295f7df1 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -207,12 +207,33 @@ namespace TaskRevealKind { } } +namespace TaskInstanceKind { + export function from(value: vscode.TaskInstanceKind): TaskSystem.InstanceKind { + if (value === void 0 || value === null) { + return TaskSystem.InstanceKind.Shared; + } + switch (value) { + case types.TaskInstanceKind.Same: + return TaskSystem.InstanceKind.Same; + case types.TaskInstanceKind.New: + return TaskSystem.InstanceKind.New; + default: + return TaskSystem.InstanceKind.Shared; + } + } +} + namespace TerminalBehaviour { export function from(value: vscode.TaskTerminalBehavior): TaskSystem.TerminalBehavior { if (value === void 0 || value === null) { - return { reveal: TaskSystem.RevealKind.Always, echo: false }; + return { reveal: TaskSystem.RevealKind.Always, echo: true, focus: false, instance: TaskSystem.InstanceKind.Shared }; } - return { reveal: TaskRevealKind.from(value.reveal), echo: !!value.echo }; + return { + reveal: TaskRevealKind.from(value.reveal), + echo: value.echo === void 0 ? true : !!value.echo, + focus: !!value.focus, + instance: TaskInstanceKind.from(value.instance) + }; } } diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index 34a86f3e0179f..5b60f3cff85b3 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1037,6 +1037,14 @@ export enum TaskRevealKind { Never = 3 } +export enum TaskInstanceKind { + Shared = 1, + + Same = 2, + + New = 3 +} + export class BaseTask { private _name: string; diff --git a/src/vs/workbench/parts/tasks/browser/buildQuickOpen.ts b/src/vs/workbench/parts/tasks/browser/buildQuickOpen.ts index 28b9db5251407..0ef0d65fb3e0f 100644 --- a/src/vs/workbench/parts/tasks/browser/buildQuickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/buildQuickOpen.ts @@ -16,15 +16,20 @@ import { ITaskService } from 'vs/workbench/parts/tasks/common/taskService'; import * as base from './quickOpen'; class TaskEntry extends base.TaskEntry { - constructor(taskService: ITaskService, task: Task, highlights: Model.IHighlight[] = []) { - super(taskService, task, highlights); + constructor(taskService: ITaskService, quickOpenService: IQuickOpenService, task: Task, highlights: Model.IHighlight[] = []) { + super(taskService, quickOpenService, task, highlights); } public run(mode: QuickOpen.Mode, context: Model.IContext): boolean { if (mode === QuickOpen.Mode.PREVIEW) { return false; } - this.taskService.run(this._task); + let task = this._task; + this.taskService.run(task); + if (task.command.terminalBehavior.focus) { + this.quickOpenService.close(); + return false; + } return true; } } @@ -45,8 +50,8 @@ export class QuickOpenHandler extends base.QuickOpenHandler { return this.taskService.getTasksForGroup(TaskGroup.Build); } - protected createEntry(taskService: ITaskService, task: Task, highlights: Model.IHighlight[]): base.TaskEntry { - return new TaskEntry(taskService, task, highlights); + protected createEntry(task: Task, highlights: Model.IHighlight[]): base.TaskEntry { + return new TaskEntry(this.taskService, this.quickOpenService, task, highlights); } public getEmptyLabel(searchString: string): string { diff --git a/src/vs/workbench/parts/tasks/browser/quickOpen.ts b/src/vs/workbench/parts/tasks/browser/quickOpen.ts index 9368b61de9a07..35b7a68008025 100644 --- a/src/vs/workbench/parts/tasks/browser/quickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/quickOpen.ts @@ -21,7 +21,7 @@ import { ActionBarContributor, ContributableActionProvider } from 'vs/workbench/ export class TaskEntry extends Model.QuickOpenEntry { - constructor(protected taskService: ITaskService, protected _task: Task, highlights: Model.IHighlight[] = []) { + constructor(protected taskService: ITaskService, protected quickOpenService: IQuickOpenService, protected _task: Task, highlights: Model.IHighlight[] = []) { super(highlights); } @@ -75,7 +75,8 @@ export abstract class QuickOpenHandler extends Quickopen.QuickOpenHandler { } let recentlyUsedTasks = this.taskService.getRecentlyUsedTasks(); let recent: Task[] = []; - let others: Task[] = []; + let configured: Task[] = []; + let detected: Task[] = []; let taskMap: IStringDictionary = Object.create(null); tasks.forEach(task => taskMap[task.identifier] = task); recentlyUsedTasks.keys().forEach(key => { @@ -86,37 +87,43 @@ export abstract class QuickOpenHandler extends Quickopen.QuickOpenHandler { }); for (let task of tasks) { if (!recentlyUsedTasks.has(task.identifier)) { - others.push(task); - } - } - others = others.sort((a, b) => a._source.label.localeCompare(b._source.label)); - let sortedTasks = recent.concat(others); - let recentlyUsed: boolean = recentlyUsedTasks.has(tasks[0].identifier); - let otherTasks: boolean = !recentlyUsedTasks.has(tasks[tasks.length - 1].identifier); - let hasRecentlyUsed: boolean = false; - for (let task of sortedTasks) { - let highlights = Filters.matchesContiguousSubString(input, task._label); - if (!highlights) { - continue; - } - if (recentlyUsed) { - recentlyUsed = false; - hasRecentlyUsed = true; - entries.push(new TaskGroupEntry(this.createEntry(this.taskService, task, highlights), nls.localize('recentlyUsed', 'recently used'), false)); - } else if (!recentlyUsedTasks.has(task.identifier) && otherTasks) { - otherTasks = false; - entries.push(new TaskGroupEntry(this.createEntry(this.taskService, task, highlights), nls.localize('other tasks', 'other tasks'), hasRecentlyUsed)); - } else { - entries.push(this.createEntry(this.taskService, task, highlights)); + if (task._source.kind === TaskSourceKind.Workspace) { + configured.push(task); + } else { + detected.push(task); + } } } + let hasRecentlyUsed: boolean = recent.length > 0; + this.fillEntries(entries, input, recent, nls.localize('recentlyUsed', 'recently used tasks')); + configured = configured.sort((a, b) => a._label.localeCompare(b._label)); + let hasConfigured = configured.length > 0; + this.fillEntries(entries, input, configured, nls.localize('configured', 'configured tasks'), hasRecentlyUsed); + detected = detected.sort((a, b) => a._label.localeCompare(b._label)); + this.fillEntries(entries, input, detected, nls.localize('detected', 'detected tasks'), hasRecentlyUsed || hasConfigured); return new Model.QuickOpenModel(entries, new ContributableActionProvider()); }); } + private fillEntries(entries: Model.QuickOpenEntry[], input: string, tasks: Task[], groupLabel: string, withBorder: boolean = false) { + let first = true; + for (let task of tasks) { + let highlights = Filters.matchesContiguousSubString(input, task._label); + if (!highlights) { + continue; + } + if (first) { + first = false; + entries.push(new TaskGroupEntry(this.createEntry(task, highlights), groupLabel, withBorder)); + } else { + entries.push(this.createEntry(task, highlights)); + } + } + } + protected abstract getTasks(): TPromise; - protected abstract createEntry(taskService: ITaskService, task: Task, highlights: Model.IHighlight[]): TaskEntry; + protected abstract createEntry(task: Task, highlights: Model.IHighlight[]): TaskEntry; public getAutoFocus(input: string): QuickOpen.IAutoFocus { return { diff --git a/src/vs/workbench/parts/tasks/browser/restartQuickOpen.ts b/src/vs/workbench/parts/tasks/browser/restartQuickOpen.ts index 95d4d2bd5dd90..eeda397124354 100644 --- a/src/vs/workbench/parts/tasks/browser/restartQuickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/restartQuickOpen.ts @@ -16,8 +16,8 @@ import { ITaskService } from 'vs/workbench/parts/tasks/common/taskService'; import * as base from './quickOpen'; class TaskEntry extends base.TaskEntry { - constructor(taskService: ITaskService, task: Task, highlights: Model.IHighlight[] = []) { - super(taskService, task, highlights); + constructor(taskService: ITaskService, quickOpenService: IQuickOpenService, task: Task, highlights: Model.IHighlight[] = []) { + super(taskService, quickOpenService, task, highlights); } public run(mode: QuickOpen.Mode, context: Model.IContext): boolean { @@ -45,8 +45,8 @@ export class QuickOpenHandler extends base.QuickOpenHandler { return this.taskService.getActiveTasks(); } - protected createEntry(taskService: ITaskService, task: Task, highlights: Model.IHighlight[]): base.TaskEntry { - return new TaskEntry(taskService, task, highlights); + protected createEntry(task: Task, highlights: Model.IHighlight[]): base.TaskEntry { + return new TaskEntry(this.taskService, this.quickOpenService, task, highlights); } public getEmptyLabel(searchString: string): string { diff --git a/src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts b/src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts index b6939d7a77ce8..544826907d491 100644 --- a/src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts @@ -18,15 +18,20 @@ import { IExtensionService } from 'vs/platform/extensions/common/extensions'; import * as base from './quickOpen'; class TaskEntry extends base.TaskEntry { - constructor(taskService: ITaskService, task: Task, highlights: Model.IHighlight[] = []) { - super(taskService, task, highlights); + constructor(taskService: ITaskService, quickOpenService: IQuickOpenService, task: Task, highlights: Model.IHighlight[] = []) { + super(taskService, quickOpenService, task, highlights); } public run(mode: QuickOpen.Mode, context: Model.IContext): boolean { if (mode === QuickOpen.Mode.PREVIEW) { return false; } - this.taskService.run(this._task); + let task = this._task; + this.taskService.run(task); + if (task.command.terminalBehavior.focus) { + this.quickOpenService.close(); + return false; + } return true; } } @@ -53,8 +58,8 @@ export class QuickOpenHandler extends base.QuickOpenHandler { }); } - protected createEntry(taskService: ITaskService, task: Task, highlights: Model.IHighlight[]): base.TaskEntry { - return new TaskEntry(taskService, task, highlights); + protected createEntry(task: Task, highlights: Model.IHighlight[]): base.TaskEntry { + return new TaskEntry(this.taskService, this.quickOpenService, task, highlights); } public getEmptyLabel(searchString: string): string { diff --git a/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.ts b/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.ts index 80fc424f5d083..5317d3789003e 100644 --- a/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.ts @@ -16,8 +16,8 @@ import { ITaskService } from 'vs/workbench/parts/tasks/common/taskService'; import * as base from './quickOpen'; class TaskEntry extends base.TaskEntry { - constructor(taskService: ITaskService, task: Task, highlights: Model.IHighlight[] = []) { - super(taskService, task, highlights); + constructor(taskService: ITaskService, quickOpenService: IQuickOpenService, task: Task, highlights: Model.IHighlight[] = []) { + super(taskService, quickOpenService, task, highlights); } public run(mode: QuickOpen.Mode, context: Model.IContext): boolean { @@ -45,8 +45,8 @@ export class QuickOpenHandler extends base.QuickOpenHandler { return this.taskService.getActiveTasks(); } - protected createEntry(taskService: ITaskService, task: Task, highlights: Model.IHighlight[]): base.TaskEntry { - return new TaskEntry(taskService, task, highlights); + protected createEntry(task: Task, highlights: Model.IHighlight[]): base.TaskEntry { + return new TaskEntry(this.taskService, this.quickOpenService, task, highlights); } public getEmptyLabel(searchString: string): string { diff --git a/src/vs/workbench/parts/tasks/browser/testQuickOpen.ts b/src/vs/workbench/parts/tasks/browser/testQuickOpen.ts index 96275341b2c7f..ff9b506b36ec5 100644 --- a/src/vs/workbench/parts/tasks/browser/testQuickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/testQuickOpen.ts @@ -16,15 +16,20 @@ import { ITaskService } from 'vs/workbench/parts/tasks/common/taskService'; import * as base from './quickOpen'; class TaskEntry extends base.TaskEntry { - constructor(taskService: ITaskService, task: Task, highlights: Model.IHighlight[] = []) { - super(taskService, task, highlights); + constructor(taskService: ITaskService, quickOpenService: IQuickOpenService, task: Task, highlights: Model.IHighlight[] = []) { + super(taskService, quickOpenService, task, highlights); } public run(mode: QuickOpen.Mode, context: Model.IContext): boolean { if (mode === QuickOpen.Mode.PREVIEW) { return false; } - this.taskService.run(this._task); + let task = this._task; + this.taskService.run(task); + if (task.command.terminalBehavior.focus) { + this.quickOpenService.close(); + return false; + } return true; } } @@ -45,8 +50,8 @@ export class QuickOpenHandler extends base.QuickOpenHandler { return this.taskService.getTasksForGroup(TaskGroup.Test); } - protected createEntry(taskService: ITaskService, task: Task, highlights: Model.IHighlight[]): base.TaskEntry { - return new TaskEntry(taskService, task, highlights); + protected createEntry(task: Task, highlights: Model.IHighlight[]): base.TaskEntry { + return new TaskEntry(this.taskService, this.quickOpenService, task, highlights); } public getEmptyLabel(searchString: string): string { diff --git a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts index 71be98158a333..9b07f84f16fa9 100644 --- a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts @@ -355,6 +355,134 @@ function fillProperty(target: T, source: T, key: K) { } +interface ParserType { + isEmpty(value: T): boolean; + assignProperties(target: T, source: T): T; + fillProperties(target: T, source: T): T; + fillDefaults(value: T, context: ParseContext): T; + freeze(value: T): Readonly; +} + +interface MetaData { + property: keyof T; + type?: ParserType; +} + + +function _isEmpty(this: void, value: T, properties: MetaData[]): boolean { + if (value === void 0 || value === null) { + return true; + } + for (let meta of properties) { + let property = value[meta.property]; + if (property !== void 0 && property !== null) { + if (meta.type !== void 0 && !meta.type.isEmpty(property)) { + return false; + } else if (!Array.isArray(property) || property.length > 0) { + return false; + } + } + } + return true; +} + +function _assignProperties(this: void, target: T, source: T, properties: MetaData[]): T { + if (_isEmpty(source, properties)) { + return target; + } + if (_isEmpty(target, properties)) { + return source; + } + for (let meta of properties) { + let property = meta.property; + let value: any; + if (meta.type !== void 0) { + value = meta.type.assignProperties(target[property], source[property]); + } else { + value = source[property]; + } + if (value !== void 0 && value !== null) { + target[property] = value; + } + } + return target; +} + +function _fillProperties(this: void, target: T, source: T, properties: MetaData[]): T { + if (_isEmpty(source, properties)) { + return target; + } + if (_isEmpty(target, properties)) { + return source; + } + for (let meta of properties) { + let property = meta.property; + if (target[property] !== void 0) { + continue; + } + let value: any; + if (meta.type) { + value = meta.type.fillProperties(target[property], source[property]); + } else { + value = source[property]; + } + + if (value !== void 0 && value !== null) { + target[property] = value; + } + } + return target; +} + +function _fillDefaults(this: void, target: T, defaults: T, properties: MetaData[], context: ParseContext): T { + if (target && Object.isFrozen(target)) { + return target; + } + if (target === void 0 || target === null) { + if (defaults !== void 0 && defaults !== null) { + return Objects.deepClone(defaults); + } else { + return undefined; + } + } + for (let meta of properties) { + let property = meta.property; + if (target[property] !== void 0) { + continue; + } + let value: any; + if (meta.type) { + value = meta.type.fillDefaults(target[property], context); + } else { + value = defaults[property]; + } + + if (value !== void 0 && value !== null) { + target[property] = value; + } + } + return target; +} + +function _freeze(this: void, target: T, properties: MetaData[]): Readonly { + if (target === void 0 || target === null) { + return undefined; + } + if (Object.isFrozen(target)) { + return target; + } + for (let meta of properties) { + if (meta.type) { + let value = target[meta.property]; + if (value) { + meta.type.freeze(value); + } + } + } + Object.freeze(target); + return target; +} + interface ParseContext { problemReporter: IProblemReporter; namedProblemMatchers: IStringDictionary; @@ -363,7 +491,11 @@ interface ParseContext { schemaVersion: Tasks.JsonSchemaVersion; } + namespace ShellConfiguration { + + const properties: MetaData[] = [{ property: 'executable' }, { property: 'args' }]; + export function is(value: any): value is ShellConfiguration { let candidate: ShellConfiguration = value; return candidate && Types.isString(candidate.executable) && (candidate.args === void 0 || Types.isStringArray(candidate.args)); @@ -380,46 +512,35 @@ namespace ShellConfiguration { return result; } - export function isEmpty(value: Tasks.ShellConfiguration): boolean { - return !value || value.executable === void 0 && (value.args === void 0 || value.args.length === 0); + export function isEmpty(this: void, value: Tasks.ShellConfiguration): boolean { + return _isEmpty(value, properties); } - export function assignProperties(target: Tasks.ShellConfiguration, source: Tasks.ShellConfiguration): Tasks.ShellConfiguration { - if (isEmpty(source)) { - return target; - } - if (isEmpty(target)) { - return source; - } - assignProperty(target, source, 'executable'); - assignProperty(target, source, 'args'); - return target; + export function assignProperties(this: void, target: Tasks.ShellConfiguration, source: Tasks.ShellConfiguration): Tasks.ShellConfiguration { + return _assignProperties(target, source, properties); } - export function fillProperties(target: Tasks.ShellConfiguration, source: Tasks.ShellConfiguration): Tasks.ShellConfiguration { - if (isEmpty(source)) { - return target; - } - if (isEmpty(target)) { - return source; - } - fillProperty(target, source, 'executable'); - fillProperty(target, source, 'args'); - return target; + export function fillProperties(this: void, target: Tasks.ShellConfiguration, source: Tasks.ShellConfiguration): Tasks.ShellConfiguration { + return _fillProperties(target, source, properties); } - export function fillDefaults(value: Tasks.ShellConfiguration): void { + export function fillDefaults(this: void, value: Tasks.ShellConfiguration, context: ParseContext): Tasks.ShellConfiguration { + return value; } - export function freeze(value: Tasks.ShellConfiguration): void { + export function freeze(this: void, value: Tasks.ShellConfiguration): Readonly { if (!value) { - return; + return undefined; } - Object.freeze(value); + return Object.freeze(value); } } namespace CommandOptions { + + const properties: MetaData[] = [{ property: 'cwd' }, { property: 'env' }, { property: 'shell', type: ShellConfiguration }]; + const defaults: CommandOptions = { cwd: '${workspaceRoot}' }; + export function from(this: void, options: CommandOptions, context: ParseContext): Tasks.CommandOptions { let result: Tasks.CommandOptions = {}; if (options.cwd !== void 0) { @@ -437,7 +558,7 @@ namespace CommandOptions { } export function isEmpty(value: Tasks.CommandOptions): boolean { - return !value || value.cwd === void 0 && value.env === void 0 && value.shell === void 0; + return _isEmpty(value, properties); } export function assignProperties(target: Tasks.CommandOptions, source: Tasks.CommandOptions): Tasks.CommandOptions { @@ -461,45 +582,25 @@ namespace CommandOptions { } export function fillProperties(target: Tasks.CommandOptions, source: Tasks.CommandOptions): Tasks.CommandOptions { - if (isEmpty(source)) { - return target; - } - if (isEmpty(target)) { - return source; - } - fillProperty(target, source, 'cwd'); - fillProperty(target, source, 'env'); - target.shell = ShellConfiguration.fillProperties(target.shell, source.shell); - return target; + return _fillProperties(target, source, properties); } - export function fillDefaults(value: Tasks.CommandOptions): Tasks.CommandOptions { - if (value && Object.isFrozen(value)) { - return value; - } - if (value === void 0) { - value = {}; - } - if (value.cwd === void 0) { - value.cwd = '${workspaceRoot}'; - } - ShellConfiguration.fillDefaults(value.shell); - return value; + export function fillDefaults(value: Tasks.CommandOptions, context: ParseContext): Tasks.CommandOptions { + return _fillDefaults(value, defaults, properties, context); } - export function freeze(value: Tasks.CommandOptions): void { - Object.freeze(value); - if (value.env) { - Object.freeze(value.env); - } - ShellConfiguration.freeze(value.shell); + export function freeze(value: Tasks.CommandOptions): Readonly { + return _freeze(value, properties); } } namespace CommandConfiguration { + interface TerminalBehavior { echo?: boolean; reveal?: string; + focus?: boolean; + instance?: string; } interface BaseCommandConfiguationShape { @@ -522,9 +623,13 @@ namespace CommandConfiguration { } export namespace TerminalBehavior { + const properties: MetaData[] = [{ property: 'echo' }, { property: 'reveal' }, { property: 'focus' }, { property: 'instance' }]; + export function from(this: void, config: BaseCommandConfiguationShape, context: ParseContext): Tasks.TerminalBehavior { - let echo: boolean = undefined; - let reveal: Tasks.RevealKind = undefined; + let echo: boolean; + let reveal: Tasks.RevealKind; + let focus: boolean; + let instance: Tasks.InstanceKind; if (Types.isBoolean(config.echoCommand)) { echo = config.echoCommand; } @@ -538,65 +643,47 @@ namespace CommandConfiguration { if (Types.isString(config.terminal.reveal)) { reveal = Tasks.RevealKind.fromString(config.terminal.reveal); } + if (Types.isBoolean(config.terminal.focus)) { + focus = config.terminal.focus; + } + if (Types.isString(config.terminal.instance)) { + instance = Tasks.InstanceKind.fromString(config.terminal.instance); + } } - if (echo === void 0 && reveal === void 0) { + if (echo === void 0 && reveal === void 0 && focus === void 0 && instance === void 0) { return undefined; } - return { echo, reveal }; + return { echo, reveal, focus, instance }; } export function assignProperties(target: Tasks.TerminalBehavior, source: Tasks.TerminalBehavior): Tasks.TerminalBehavior { - if (isEmpty(source)) { - return target; - } - if (isEmpty(target)) { - return source; - } - assignProperty(target, source, 'echo'); - assignProperty(target, source, 'reveal'); - return target; + return _assignProperties(target, source, properties); } export function fillProperties(target: Tasks.TerminalBehavior, source: Tasks.TerminalBehavior): Tasks.TerminalBehavior { - if (isEmpty(source)) { - return target; - } - if (isEmpty(target)) { - return source; - } - fillProperty(target, source, 'echo'); - fillProperty(target, source, 'reveal'); - return target; + return _fillProperties(target, source, properties); } - export function fillDefault(value: Tasks.TerminalBehavior, context: ParseContext): Tasks.TerminalBehavior { - if (value && Object.isFrozen(value)) { - return value; - } - if (value === void 0) { - return { echo: false, reveal: Tasks.RevealKind.Always }; - } - if (value.echo === void 0) { - value.echo = context.engine === Tasks.ExecutionEngine.Terminal ? true : false; - } - if (value.reveal === void 0) { - value.reveal = Tasks.RevealKind.Always; - } - return value; + export function fillDefaults(value: Tasks.TerminalBehavior, context: ParseContext): Tasks.TerminalBehavior { + let defaultEcho = context.engine === Tasks.ExecutionEngine.Terminal ? true : false; + return _fillDefaults(value, { echo: defaultEcho, reveal: Tasks.RevealKind.Always, focus: false, instance: Tasks.InstanceKind.Shared }, properties, context); } - export function freeze(value: Tasks.TerminalBehavior): void { - if (value === void 0) { - return; - } - Object.freeze(value); + export function freeze(value: Tasks.TerminalBehavior): Readonly { + return _freeze(value, properties); } export function isEmpty(this: void, value: Tasks.TerminalBehavior): boolean { - return !value || value.echo === void 0 && value.reveal === void 0; + return _isEmpty(value, properties); } } + const properties: MetaData[] = [ + { property: 'type' }, { property: 'name' }, { property: 'options', type: CommandOptions }, + { property: 'args' }, { property: 'taskSelector' }, { property: 'suppressTaskName' }, + { property: 'terminalBehavior', type: TerminalBehavior } + ]; + export function from(this: void, config: CommandConfiguationShape, context: ParseContext): Tasks.CommandConfiguration { let result: Tasks.CommandConfiguration = fromBase(config, context); @@ -662,13 +749,7 @@ namespace CommandConfiguration { } export function isEmpty(value: Tasks.CommandConfiguration): boolean { - return !value || value.name === void 0 - && value.type === void 0 - && value.args === void 0 - && value.taskSelector === void 0 - && value.suppressTaskName === void 0 - && CommandOptions.isEmpty(value.options) - && TerminalBehavior.isEmpty(value.terminalBehavior); + return _isEmpty(value, properties); } export function onlyTerminalBehaviour(value: Tasks.CommandConfiguration): boolean { @@ -739,9 +820,9 @@ namespace CommandConfiguration { if (value.name !== void 0 && value.type === void 0) { value.type = Tasks.CommandType.Process; } - value.terminalBehavior = TerminalBehavior.fillDefault(value.terminalBehavior, context); + value.terminalBehavior = TerminalBehavior.fillDefaults(value.terminalBehavior, context); if (!isEmpty(value)) { - value.options = CommandOptions.fillDefaults(value.options); + value.options = CommandOptions.fillDefaults(value.options, context); } if (value.args === void 0) { value.args = EMPTY_ARRAY; @@ -751,17 +832,8 @@ namespace CommandConfiguration { } } - export function freeze(value: Tasks.CommandConfiguration): void { - Object.freeze(value); - if (value.args) { - Object.freeze(value.args); - } - if (value.options) { - CommandOptions.freeze(value.options); - } - if (value.terminalBehavior) { - TerminalBehavior.freeze(value.terminalBehavior); - } + export function freeze(value: Tasks.CommandConfiguration): Readonly { + return _freeze(value, properties); } } diff --git a/src/vs/workbench/parts/tasks/common/taskSystem.ts b/src/vs/workbench/parts/tasks/common/taskSystem.ts index b61a8fbc86344..30e51e8a2e33d 100644 --- a/src/vs/workbench/parts/tasks/common/taskSystem.ts +++ b/src/vs/workbench/parts/tasks/common/taskSystem.ts @@ -100,7 +100,6 @@ export interface ITaskResolver { export interface ITaskSystem extends IEventEmitter { run(task: Task, resolver: ITaskResolver): ITaskExecuteResult; - show(task: Task, forceFocus?: boolean): void; isActive(): TPromise; isActiveSync(): boolean; getActiveTasks(): Task[]; diff --git a/src/vs/workbench/parts/tasks/common/tasks.ts b/src/vs/workbench/parts/tasks/common/tasks.ts index b75a5750e5886..ca4b93f542279 100644 --- a/src/vs/workbench/parts/tasks/common/tasks.ts +++ b/src/vs/workbench/parts/tasks/common/tasks.ts @@ -80,6 +80,40 @@ export namespace RevealKind { } } +export enum InstanceKind { + + /** + * Shares a terminal with other tasks. This is the default. + */ + Shared = 1, + + /** + * Uses the same terminal for every run if possible. The terminal is not + * shared with other tasks. + */ + Same = 2, + + /** + * Creates a new terminal whenever that task is executed + */ + New = 3 +} + +export namespace InstanceKind { + export function fromString(value: string): InstanceKind { + switch (value.toLowerCase()) { + case 'shared': + return InstanceKind.Shared; + case 'same': + return InstanceKind.Same; + case 'new': + return InstanceKind.New; + default: + return InstanceKind.Shared; + } + } +} + export interface TerminalBehavior { /** * Controls whether the terminal executing a task is brought to front or not. @@ -91,6 +125,16 @@ export interface TerminalBehavior { * Controls whether the executed command is printed to the output window or terminal as well. */ echo: boolean; + + /** + * Controls whether the terminal is focus when this task is executed + */ + focus: boolean; + + /** + * Controls whether the task runs in a new terminal + */ + instance: InstanceKind; } export enum CommandType { diff --git a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts index a5a53dae147c0..305ccdd5a4cfb 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts @@ -444,9 +444,6 @@ class NullTaskSystem extends EventEmitter implements ITaskSystem { promise: TPromise.as({}) }; } - public show(task: Task, forceFocus: boolean = false): void { - return; - } public isActive(): TPromise { return TPromise.as(false); } @@ -930,20 +927,19 @@ class TaskService extends EventEmitter implements ITaskService { return ProblemMatcherRegistry.onReady().then(() => { return this.textFileService.saveAll().then((value) => { // make sure all dirty files are saved let executeResult = this.getTaskSystem().run(task, resolver); + this.getRecentlyUsedTasks().set(task.identifier, task.identifier, Touch.First); if (executeResult.kind === TaskExecuteKind.Active) { let active = executeResult.active; if (active.same) { if (active.background) { this.messageService.show(Severity.Info, nls.localize('TaskSystem.activeSame.background', 'The task is already active and in background mode. To terminate the task use `F1 > terminate task`')); } else { - this.getTaskSystem().show(task, true); - // this.messageService.show(Severity.Info, nls.localize('TaskSystem.activeSame.noBackground', 'The task is already active. To terminate the task use `F1 > terminate task`')); + this.messageService.show(Severity.Info, nls.localize('TaskSystem.activeSame.noBackground', 'The task is already active. To terminate the task use `F1 > terminate task`')); } } else { throw new TaskError(Severity.Warning, nls.localize('TaskSystem.active', 'There is already a task running. Terminate it first before executing another task.'), TaskErrors.RunningTask); } } - this.getRecentlyUsedTasks().set(task.identifier, task.identifier, Touch.First); return executeResult.promise; }); }); diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index 3bdec71f2ec29..8f43026ea2186 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -135,8 +135,10 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { let terminalData = this.activeTasks[task._id]; if (terminalData && terminalData.promise) { let reveal = task.command.terminalBehavior.reveal; - if (reveal === RevealKind.Always) { - terminalData.terminal.setVisible(true); + let focus = task.command.terminalBehavior.focus; + if (reveal === RevealKind.Always || focus) { + this.terminalService.setActiveInstance(terminalData.terminal); + this.terminalService.showPanel(focus); } return { kind: TaskExecuteKind.Active, active: { same: true, background: task.isBackground }, promise: terminalData.promise }; } @@ -156,15 +158,6 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { } } - public show(task: Task, forceFocus: boolean = false): void { - let terminalData = this.activeTasks[task._id]; - if (terminalData === void 0) { - return; - } - this.terminalService.setActiveInstance(terminalData.terminal); - this.terminalService.showPanel(forceFocus); - } - public isActive(): TPromise { return TPromise.as(this.isActiveSync()); } @@ -342,7 +335,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { } this.terminalService.setActiveInstance(terminal); if (task.command.terminalBehavior.reveal === RevealKind.Always || (task.command.terminalBehavior.reveal === RevealKind.Silent && task.problemMatchers.length === 0)) { - this.terminalService.showPanel(false); + this.terminalService.showPanel(task.command.terminalBehavior.focus); } this.activeTasks[task._id] = { terminal, task, promise }; return promise.then((summary) => { @@ -432,7 +425,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { shellArgs.push(commandLine); shellLaunchConfig.args = Platform.isWindows ? shellArgs.join(' ') : shellArgs; if (task.command.terminalBehavior.echo) { - shellLaunchConfig.initialText = `\x1b[1m>Executing task: ${commandLine}<\x1b[0m\n`; + shellLaunchConfig.initialText = `\x1b[1m> Executing task: ${commandLine} <\x1b[0m\n`; } } else { let cwd = options && options.cwd ? options.cwd : process.cwd(); @@ -455,7 +448,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { } return args.join(' '); }; - shellLaunchConfig.initialText = `\x1b[1m>Executing task: ${shellLaunchConfig.executable} ${getArgsToEcho(shellLaunchConfig.args)}<\x1b[0m\n`; + shellLaunchConfig.initialText = `\x1b[1m> Executing task: ${shellLaunchConfig.executable} ${getArgsToEcho(shellLaunchConfig.args)} <\x1b[0m\n`; } } if (options.cwd) { diff --git a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts index c6e4d70add928..0db8946a2d29d 100644 --- a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts @@ -89,10 +89,6 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem { return this.executeTask(task); } - public show(task: Task, forceFocus: boolean = false): void { - this.outputChannel.show(!focus); - } - public hasErrors(value: boolean): void { this.errorsShown = !value; } diff --git a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts index a82a75b6e7c18..2d60a06a14605 100644 --- a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts +++ b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts @@ -82,7 +82,7 @@ class TerminalBehaviorBuilder { public result: Tasks.TerminalBehavior; constructor(public parent: CommandConfigurationBuilder) { - this.result = { echo: false, reveal: Tasks.RevealKind.Always }; + this.result = { echo: false, reveal: Tasks.RevealKind.Always, focus: false, instance: Tasks.InstanceKind.Shared }; } public echo(value: boolean): TerminalBehaviorBuilder { @@ -95,6 +95,16 @@ class TerminalBehaviorBuilder { return this; } + public focus(value: boolean): TerminalBehaviorBuilder { + this.result.focus = value; + return this; + } + + public instance(value: Tasks.InstanceKind): TerminalBehaviorBuilder { + this.result.instance = value; + return this; + } + public done(): void { } } @@ -1446,7 +1456,8 @@ suite('Tasks version 2.0.0', () => { builder.task('dir', 'dir'). group(Tasks.TaskGroup.Build). command().suppressTaskName(true). - type(Tasks.CommandType.Shell); + type(Tasks.CommandType.Shell). + terminal().echo(true); testConfiguration(external, builder); }); From 63dd1ec2c4a6998acf70b4b6b749633c13c819e7 Mon Sep 17 00:00:00 2001 From: Ishan Arora Date: Thu, 15 Jun 2017 18:34:48 +0530 Subject: [PATCH 1888/2747] fixes #22593 --- src/vs/platform/environment/node/environmentService.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vs/platform/environment/node/environmentService.ts b/src/vs/platform/environment/node/environmentService.ts index 34a82d9d57185..2a93543b82f03 100644 --- a/src/vs/platform/environment/node/environmentService.ts +++ b/src/vs/platform/environment/node/environmentService.ts @@ -30,6 +30,9 @@ function getUniqueUserId(): string { } function getNixIPCHandle(userDataPath: string, type: string): string { + if (process.env['XDG_RUNTIME_DIR']) { + return path.join(process.env['XDG_RUNTIME_DIR'], `${pkg.name}-${pkg.version}-${type}.sock`); + } return path.join(userDataPath, `${pkg.version}-${type}.sock`); } From ea25ce0583fe6c4c4c66f30e05527c8f09222445 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 15 Jun 2017 16:23:07 +0200 Subject: [PATCH 1889/2747] multi root - implement isInsideWorkspace properly --- .../browser/standalone/simpleServices.ts | 34 +++++++++---------- .../browser/standalone/standaloneServices.ts | 7 ++-- src/vs/platform/workspace/common/workspace.ts | 16 ++++----- src/vs/workbench/electron-browser/main.ts | 2 +- .../configuration/node/configuration.ts | 18 +++++----- 5 files changed, 36 insertions(+), 41 deletions(-) diff --git a/src/vs/editor/browser/standalone/simpleServices.ts b/src/vs/editor/browser/standalone/simpleServices.ts index da2acd51c1f5e..92970b62b40ae 100644 --- a/src/vs/editor/browser/standalone/simpleServices.ts +++ b/src/vs/editor/browser/standalone/simpleServices.ts @@ -17,7 +17,7 @@ import { KeybindingResolver } from 'vs/platform/keybinding/common/keybindingReso import { IKeybindingEvent, KeybindingSource, IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding'; import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IConfirmation, IMessageService } from 'vs/platform/message/common/message'; -import { IWorkspaceContextService, Workspace, IWorkspace, IWorkspace2 } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, IWorkspace as ILegacyWorkspace, IWorkspace2 } from 'vs/platform/workspace/common/workspace'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { ICodeEditor, IDiffEditor } from 'vs/editor/browser/editorBrowser'; import { Selection } from 'vs/editor/common/core/selection'; @@ -497,46 +497,44 @@ export class SimpleWorkspaceContextService implements IWorkspaceContextService { public _serviceBrand: any; + private static SCHEME: 'inmemory'; + private readonly _onDidChangeWorkspaceRoots: Emitter = new Emitter(); public readonly onDidChangeWorkspaceRoots: Event = this._onDidChangeWorkspaceRoots.event; - private readonly folders: URI[]; - private readonly id: string; - - constructor(private workspace?: Workspace) { - this.folders = workspace ? [workspace.resource] : []; - this.id = generateUuid(); - } + private readonly legacyWorkspace: ILegacyWorkspace; + private readonly workspace: IWorkspace2; - public getFolders(): URI[] { - return this.folders; + constructor() { + this.legacyWorkspace = { resource: URI.from({ scheme: SimpleWorkspaceContextService.SCHEME, authority: 'model', path: '/' }), ctime: Date.now() }; + this.workspace = { id: generateUuid(), roots: [this.legacyWorkspace.resource], name: this.legacyWorkspace.resource.fsPath }; } - public getWorkspace(): IWorkspace { - return this.workspace; + public getWorkspace(): ILegacyWorkspace { + return this.legacyWorkspace; } public getWorkspace2(): IWorkspace2 { - return this.workspace ? { id: `${this.id}`, roots: [this.workspace.resource], name: this.workspace.resource.fsPath } : void 0; + return this.workspace; } public getRoot(resource: URI): URI { - return this.isInsideWorkspace(resource) ? this.workspace.resource : null; + return resource && resource.scheme === SimpleWorkspaceContextService.SCHEME ? this.workspace.roots[0] : void 0; } public hasWorkspace(): boolean { - return !!this.workspace; + return true; } public isInsideWorkspace(resource: URI): boolean { - return this.workspace ? this.workspace.isInsideWorkspace(resource) : false; + return resource && resource.scheme === SimpleWorkspaceContextService.SCHEME; } public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { - return this.workspace ? this.workspace.toWorkspaceRelativePath(resource, toOSPath) : null; + return resource.fsPath; } public toResource(workspaceRelativePath: string): URI { - return this.workspace ? this.workspace.toResource(workspaceRelativePath) : null; + return URI.file(workspaceRelativePath); } } diff --git a/src/vs/editor/browser/standalone/standaloneServices.ts b/src/vs/editor/browser/standalone/standaloneServices.ts index 0a50de37e9e60..212273a8e6c0c 100644 --- a/src/vs/editor/browser/standalone/standaloneServices.ts +++ b/src/vs/editor/browser/standalone/standaloneServices.ts @@ -5,7 +5,6 @@ 'use strict'; import { Disposable } from 'vs/base/common/lifecycle'; -import URI from 'vs/base/common/uri'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { ContextMenuService } from 'vs/platform/contextview/browser/contextMenuService'; import { IContextMenuService, IContextViewService } from 'vs/platform/contextview/browser/contextView'; @@ -22,7 +21,7 @@ import { IMessageService } from 'vs/platform/message/common/message'; import { IProgressService } from 'vs/platform/progress/common/progress'; import { IStorageService, NullStorageService } from 'vs/platform/storage/common/storage'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; -import { IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ICodeEditorService } from 'vs/editor/common/services/codeEditorService'; import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerService'; import { EditorWorkerServiceImpl } from 'vs/editor/common/services/editorWorkerServiceImpl'; @@ -118,9 +117,7 @@ export module StaticServices { const configurationServiceImpl = new SimpleConfigurationService(); export const configurationService = define(IConfigurationService, () => configurationServiceImpl); - export const contextService = define(IWorkspaceContextService, () => new SimpleWorkspaceContextService(new Workspace( - URI.from({ scheme: 'inmemory', authority: 'model', path: '/' }) - ))); + export const contextService = define(IWorkspaceContextService, () => new SimpleWorkspaceContextService()); export const telemetryService = define(ITelemetryService, () => new StandaloneTelemetryService()); diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index e5670d0fa6cb9..d6bfd45a2433a 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -118,20 +118,20 @@ export class Workspace implements IWorkspace { return this._ctime; } - public isInsideWorkspace(resource: URI): boolean { - if (resource) { - return isEqualOrParent(resource.fsPath, this._resource.fsPath, !isLinux /* ignorecase */); + public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { + if (this.contains(resource)) { + return paths.normalize(paths.relative(this._resource.fsPath, resource.fsPath), toOSPath); } - return false; + return null; } - public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { - if (this.isInsideWorkspace(resource)) { - return paths.normalize(paths.relative(this._resource.fsPath, resource.fsPath), toOSPath); + private contains(resource: URI): boolean { + if (resource) { + return isEqualOrParent(resource.fsPath, this._resource.fsPath, !isLinux /* ignorecase */); } - return null; + return false; } public toResource(workspaceRelativePath: string, root?: URI): URI { diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index c01173bccc28a..c447bf78692a9 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -98,7 +98,7 @@ function openWorkbench(configuration: IWindowConfiguration, options: IOptions): return resolveLegacyWorkspace(configuration).then(legacyWorkspace => { const environmentService = new EnvironmentService(configuration, configuration.execPath); const workspaceConfigurationService = new WorkspaceConfigurationService(environmentService, legacyWorkspace); - const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !workspaceConfigurationService.hasWorkspace()); + const timerService = new TimerService((window).MonacoEnvironment.timers as IInitData, !!legacyWorkspace); const storageService = createStorageService(legacyWorkspace, configuration, environmentService); // Since the configuration service is one of the core services that is used in so many places, we initialize it diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index 8e7eee19fe9cb..5478bcbe53998 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -182,7 +182,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } public isInsideWorkspace(resource: URI): boolean { - return this.workspace ? this.legacyWorkspace.isInsideWorkspace(resource) : false; + return !!this.getRoot(resource); } public toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { @@ -468,20 +468,20 @@ class FolderConfiguration extends Disposable { return null; } - private isInsideWorkspace(resource: URI): boolean { - if (resource) { - return isEqualOrParent(resource.fsPath, this.folder.fsPath, !isLinux /* ignorecase */); + private toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { + if (this.contains(resource)) { + return paths.normalize(paths.relative(this.folder.fsPath, resource.fsPath), toOSPath); } - return false; + return null; } - private toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { - if (this.isInsideWorkspace(resource)) { - return paths.normalize(paths.relative(this.folder.fsPath, resource.fsPath), toOSPath); + private contains(resource: URI): boolean { + if (resource) { + return isEqualOrParent(resource.fsPath, this.folder.fsPath, !isLinux /* ignorecase */); } - return null; + return false; } } From 7563843dfec8c6ed14dc9832d351f674f2549c68 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Thu, 15 Jun 2017 16:36:21 +0200 Subject: [PATCH 1890/2747] show Developer Tools action in case of ext host crash --- .../electron-browser/extensionHost.ts | 33 +++++++++++++------ 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/electron-browser/extensionHost.ts b/src/vs/workbench/electron-browser/extensionHost.ts index 7cccc708393b4..0e29ffee23698 100644 --- a/src/vs/workbench/electron-browser/extensionHost.ts +++ b/src/vs/workbench/electron-browser/extensionHost.ts @@ -11,11 +11,12 @@ import { stringify } from 'vs/base/common/marshalling'; import * as objects from 'vs/base/common/objects'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; +import { Action } from 'vs/base/common/actions'; import { isWindows } from 'vs/base/common/platform'; import { findFreePort } from 'vs/base/node/ports'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { ILifecycleService, ShutdownEvent } from 'vs/platform/lifecycle/common/lifecycle'; -import { IWindowsService } from 'vs/platform/windows/common/windows'; +import { IWindowsService, IWindowService } from 'vs/platform/windows/common/windows'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IWindowIPCService } from 'vs/workbench/services/window/electron-browser/windowService'; @@ -89,7 +90,8 @@ export class ExtensionHostProcessWorker { @IWorkspaceContextService private contextService: IWorkspaceContextService, @IMessageService private messageService: IMessageService, @IWindowsService private windowsService: IWindowsService, - @IWindowIPCService private windowService: IWindowIPCService, + @IWindowService private windowService: IWindowService, + @IWindowIPCService private windowIpcService: IWindowIPCService, @ILifecycleService lifecycleService: ILifecycleService, @IInstantiationService private instantiationService: IInstantiationService, @IEnvironmentService private environmentService: IEnvironmentService, @@ -120,7 +122,7 @@ export class ExtensionHostProcessWorker { AMD_ENTRYPOINT: 'vs/workbench/node/extensionHostProcess', PIPE_LOGGING: 'true', VERBOSE_LOGGING: true, - VSCODE_WINDOW_ID: String(this.windowService.getWindowId()), + VSCODE_WINDOW_ID: String(this.windowIpcService.getWindowId()), VSCODE_IPC_HOOK_EXTHOST: hook, ELECTRON_NO_ASAR: '1' }), @@ -143,8 +145,8 @@ export class ExtensionHostProcessWorker { // Run Extension Host as fork of current process this.extensionHostProcess = fork(URI.parse(require.toUrl('bootstrap')).fsPath, ['--type=extensionHost'], opts); + // Catch all output coming from the extension host process type Output = { data: string, format: string[] }; - this.extensionHostProcess.stdout.setEncoding('utf8'); this.extensionHostProcess.stderr.setEncoding('utf8'); const onStdout = fromEventEmitter(this.extensionHostProcess.stdout, 'data'); @@ -154,12 +156,14 @@ export class ExtensionHostProcessWorker { mapEvent(onStderr, o => ({ data: `%c${o}`, format: ['color: red'] })) ); + // Debounce all output, so we can render it in the Chrome console as a group const onDebouncedOutput = debounceEvent(onOutput, (r, o) => { return r ? { data: r.data + o.data, format: [...r.format, ...o.format] } : { data: o.data, format: o.format }; - }, 300); + }, 100); + // Print out extension host output onDebouncedOutput(data => { console.group('Extension Host'); console.log(data.data, ...data.format); @@ -181,7 +185,7 @@ export class ExtensionHostProcessWorker { // Notify debugger that we are ready to attach to the process if we run a development extension if (this.isExtensionDevelopmentHost && port) { - this.windowService.broadcast({ + this.windowIpcService.broadcast({ channel: EXTENSION_ATTACH_BROADCAST_CHANNEL, payload: { port } }, this.environmentService.extensionDevelopmentPath /* target */); @@ -323,7 +327,7 @@ export class ExtensionHostProcessWorker { // Broadcast to other windows if we are in development mode else if (!this.environmentService.isBuilt || this.isExtensionDevelopmentHost) { - this.windowService.broadcast({ + this.windowIpcService.broadcast({ channel: EXTENSION_LOG_BROADCAST_CHANNEL, payload: logEntry }, this.environmentService.extensionDevelopmentPath /* target */); @@ -348,16 +352,25 @@ export class ExtensionHostProcessWorker { // Unexpected termination if (!this.isExtensionDevelopmentHost) { + const openDevTools = new Action('openDevTools', nls.localize('devTools', "Developer Tools"), '', true, async (): TPromise => { + await this.windowService.openDevTools(); + return false; + }); + this.messageService.show(Severity.Error, { message: nls.localize('extensionHostProcess.crash', "Extension host terminated unexpectedly. Please reload the window to recover."), - actions: [this.instantiationService.createInstance(ReloadWindowAction, ReloadWindowAction.ID, ReloadWindowAction.LABEL)] + actions: [ + openDevTools, + this.instantiationService.createInstance(ReloadWindowAction, ReloadWindowAction.ID, ReloadWindowAction.LABEL) + ] }); + console.error('Extension host terminated unexpectedly. Code: ', code, ' Signal: ', signal); } // Expected development extension termination: When the extension host goes down we also shutdown the window else if (!this.isExtensionDevelopmentTestFromCli) { - this.windowService.getWindow().close(); + this.windowIpcService.getWindow().close(); } // When CLI testing make sure to exit with proper exit code @@ -381,7 +394,7 @@ export class ExtensionHostProcessWorker { // If the extension development host was started without debugger attached we need // to communicate this back to the main side to terminate the debug session if (this.isExtensionDevelopmentHost && !this.isExtensionDevelopmentTestFromCli && !this.isExtensionDevelopmentDebug) { - this.windowService.broadcast({ + this.windowIpcService.broadcast({ channel: EXTENSION_TERMINATE_BROADCAST_CHANNEL, payload: true }, this.environmentService.extensionDevelopmentPath /* target */); From e57d3958c483b055dacb018088275df9e0c241a5 Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 15 Jun 2017 16:46:24 +0200 Subject: [PATCH 1891/2747] Corrected spelling mistakes. --- .../lib/tslint/noUnexternalizedStringsRule.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/build/lib/tslint/noUnexternalizedStringsRule.js b/build/lib/tslint/noUnexternalizedStringsRule.js index db189931465f5..d6edfc0570a73 100644 --- a/build/lib/tslint/noUnexternalizedStringsRule.js +++ b/build/lib/tslint/noUnexternalizedStringsRule.js @@ -70,10 +70,10 @@ var NoUnexternalizedStringsRuleWalker = (function (_super) { var _this = this; _super.prototype.visitSourceFile.call(this, node); Object.keys(this.usedKeys).forEach(function (key) { - var occurences = _this.usedKeys[key]; - if (occurences.length > 1) { - occurences.forEach(function (occurence) { - _this.addFailure((_this.createFailure(occurence.key.getStart(), occurence.key.getWidth(), "Duplicate key " + occurence.key.getText() + " with different message value."))); + var occurrences = _this.usedKeys[key]; + if (occurrences.length > 1) { + occurrences.forEach(function (occurrence) { + _this.addFailure((_this.createFailure(occurrence.key.getStart(), occurrence.key.getWidth(), "Duplicate key " + occurrence.key.getText() + " with different message value."))); }); } }); @@ -140,17 +140,17 @@ var NoUnexternalizedStringsRuleWalker = (function (_super) { }; NoUnexternalizedStringsRuleWalker.prototype.recordKey = function (keyNode, messageNode) { var text = keyNode.getText(); - var occurences = this.usedKeys[text]; - if (!occurences) { - occurences = []; - this.usedKeys[text] = occurences; + var occurrences = this.usedKeys[text]; + if (!occurrences) { + occurrences = []; + this.usedKeys[text] = occurrences; } if (messageNode) { - if (occurences.some(function (pair) { return pair.message ? pair.message.getText() === messageNode.getText() : false; })) { + if (occurrences.some(function (pair) { return pair.message ? pair.message.getText() === messageNode.getText() : false; })) { return; } } - occurences.push({ key: keyNode, message: messageNode }); + occurrences.push({ key: keyNode, message: messageNode }); }; NoUnexternalizedStringsRuleWalker.prototype.findDescribingParent = function (node) { var parent; From e4601b2af0fa0efd4937329e492b01bc5607686a Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 15 Jun 2017 16:47:27 +0200 Subject: [PATCH 1892/2747] Simplified element waiting code. --- test/smoke/src/spectron/application.ts | 43 ++++++++++---------------- 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/test/smoke/src/spectron/application.ts b/test/smoke/src/spectron/application.ts index 03cc56070d4ab..73e555ffb966a 100644 --- a/test/smoke/src/spectron/application.ts +++ b/test/smoke/src/spectron/application.ts @@ -82,7 +82,7 @@ export class SpectronApplication { } public waitFor(func: (...args: any[]) => any, args: any): Promise { - return this.callClientAPI(func, args, 0); + return this.callClientAPI(func, args); } public wait(): Promise { @@ -110,39 +110,28 @@ export class SpectronApplication { }); } - private callClientAPI(func: (...args: any[]) => Promise, args: any, trial: number): Promise { - if (trial > this.pollTrials) { - return Promise.reject(`Could not retrieve the element in ${this.testRetry * this.pollTrials * this.pollTimeout} seconds.`); - } - + private callClientAPI(func: (...args: any[]) => Promise, args: any): Promise { + let trial = 1; return new Promise(async (res, rej) => { - let resolved = false, capture = false; + while (true) { + if (trial > this.pollTrials) { + rej(`Could not retrieve the element in ${this.testRetry * this.pollTrials * this.pollTimeout} seconds.`); + break; + } - const tryCall = async (resolve: any, reject: any): Promise => { - await this.wait(); + let result; try { - const result = await this.callClientAPI(func, args, ++trial); - res(result); - } catch (error) { - rej(error); - } - } + result = await func.call(this.client, args); + } catch (e) {} - try { - const result = await func.call(this.client, args, capture); - if (!resolved && result === '') { - resolved = true; - await tryCall(res, rej); - } else if (!resolved) { - resolved = true; + if (result && result !== '') { await this.screenshot.capture(); res(result); + break; } - } catch (e) { - if (!resolved) { - resolved = true; - await tryCall(res, rej); - } + + this.wait(); + trial++; } }); } From 8f9e27396cb01c82151225758e41201f3751e3dd Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Thu, 15 Jun 2017 16:49:15 +0200 Subject: [PATCH 1893/2747] Removed exposure of require as it led to not working Spectron. --- src/vs/workbench/electron-browser/bootstrap/index.js | 4 ---- test/smoke/src/main.js | 1 - test/smoke/src/spectron/application.ts | 3 +-- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/vs/workbench/electron-browser/bootstrap/index.js b/src/vs/workbench/electron-browser/bootstrap/index.js index a094c0daba598..c01da62847a48 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.js +++ b/src/vs/workbench/electron-browser/bootstrap/index.js @@ -12,10 +12,6 @@ if (window.location.search.indexOf('prof-startup') >= 0) { profiler.startProfiling('renderer', true); } -if (process.env.SMOKE_TEST) { - window.electronRequire = require; // if smoke test, expose require to Spectron to access the core Electron APIs -} - /*global window,document,define*/ const startTimer = require('../../../base/node/startupTimers').startTimer; diff --git a/test/smoke/src/main.js b/test/smoke/src/main.js index d9136eed60073..acf9db502d213 100644 --- a/test/smoke/src/main.js +++ b/test/smoke/src/main.js @@ -42,7 +42,6 @@ if (parseInt(process.version.substr(1)) < 6) { } // Setting up environment variables -process.env.SMOKE_TEST = 'true'; process.env.VSCODE_LATEST_PATH = program.latest; if (program.stable) process.env.VSCODE_STABLE_PATH = program.stable; process.env.SMOKETEST_REPO = testRepoLocalDir; diff --git a/test/smoke/src/spectron/application.ts b/test/smoke/src/spectron/application.ts index 73e555ffb966a..8ccdc2f782c92 100644 --- a/test/smoke/src/spectron/application.ts +++ b/test/smoke/src/spectron/application.ts @@ -52,8 +52,7 @@ export class SpectronApplication { this.spectron = new Application({ path: electronPath, args: args, - chromeDriverArgs: chromeDriverArgs, - requireName: 'electronRequire' + chromeDriverArgs: chromeDriverArgs }); this.screenshot = new Screenshot(this, testName); this.client = new SpectronClient(this.spectron, this.screenshot); From 43cedf1f6d864a6ba208f6806f28f2838fc70dff Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 15 Jun 2017 16:48:16 +0200 Subject: [PATCH 1894/2747] :lipstick: --- .../api/node/extHostExtensionService.ts | 1 - .../configuration/node/configuration.ts | 20 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index ff5a189ebb75c..d75347f83dc9e 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -128,7 +128,6 @@ class ExtensionStoragePath { if (!this._workspace) { return TPromise.as(undefined); } - // TODO@joh what to do with multiple roots? const storageName = this._workspace.id; const storagePath = join(this._environment.appSettingsHome, 'workspaceStorage', storageName); diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index 5478bcbe53998..c1617034e6287 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -367,11 +367,11 @@ class FolderConfiguration extends Disposable { return false; // only JSON files } - return this.isWorkspaceConfigurationFile(this.toWorkspaceRelativePath(stat.resource)); // only workspace config files + return this.isWorkspaceConfigurationFile(this.toFolderRelativePath(stat.resource)); // only workspace config files }).map(stat => stat.resource)); }, err => [] /* never fail this call */) .then((contents: IContent[]) => { - contents.forEach(content => this.workspaceFilePathToConfiguration[this.toWorkspaceRelativePath(content.resource)] = TPromise.as(this.createConfigModel(content))); + contents.forEach(content => this.workspaceFilePathToConfiguration[this.toFolderRelativePath(content.resource)] = TPromise.as(this.createConfigModel(content))); }, errors.onUnexpectedError); } @@ -397,7 +397,7 @@ class FolderConfiguration extends Disposable { continue; // only JSON files or the actual settings folder } - const workspacePath = this.toWorkspaceRelativePath(resource); + const workspacePath = this.toFolderRelativePath(resource); if (!workspacePath) { continue; // event is not inside workspace } @@ -443,7 +443,7 @@ class FolderConfiguration extends Disposable { } private createConfigModel(content: IContent): ConfigurationModel { - const path = this.toWorkspaceRelativePath(content.resource); + const path = this.toFolderRelativePath(content.resource); if (path === WORKSPACE_CONFIG_DEFAULT_PATH) { return new FolderSettingsModel(content.value, content.resource.toString()); } else { @@ -456,19 +456,19 @@ class FolderConfiguration extends Disposable { return new CustomConfigurationModel(null); } - private isWorkspaceConfigurationFile(workspaceRelativePath: string): boolean { - return [WORKSPACE_CONFIG_DEFAULT_PATH, WORKSPACE_STANDALONE_CONFIGURATIONS.launch, WORKSPACE_STANDALONE_CONFIGURATIONS.tasks].some(p => p === workspaceRelativePath); + private isWorkspaceConfigurationFile(folderRelativePath: string): boolean { + return [WORKSPACE_CONFIG_DEFAULT_PATH, WORKSPACE_STANDALONE_CONFIGURATIONS.launch, WORKSPACE_STANDALONE_CONFIGURATIONS.tasks].some(p => p === folderRelativePath); } - private toResource(workspaceRelativePath: string): URI { - if (typeof workspaceRelativePath === 'string') { - return URI.file(paths.join(this.folder.fsPath, workspaceRelativePath)); + private toResource(folderRelativePath: string): URI { + if (typeof folderRelativePath === 'string') { + return URI.file(paths.join(this.folder.fsPath, folderRelativePath)); } return null; } - private toWorkspaceRelativePath(resource: URI, toOSPath?: boolean): string { + private toFolderRelativePath(resource: URI, toOSPath?: boolean): string { if (this.contains(resource)) { return paths.normalize(paths.relative(this.folder.fsPath, resource.fsPath), toOSPath); } From 0398ed29003d0fdff39b90347022d389ceaded3a Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 15 Jun 2017 17:00:01 +0200 Subject: [PATCH 1895/2747] increase timeout of search integration tests (for #28794) --- .../test/node/textSearch.integrationTest.ts | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/vs/workbench/services/search/test/node/textSearch.integrationTest.ts b/src/vs/workbench/services/search/test/node/textSearch.integrationTest.ts index c5946648d15f6..896b6c3cb4151 100644 --- a/src/vs/workbench/services/search/test/node/textSearch.integrationTest.ts +++ b/src/vs/workbench/services/search/test/node/textSearch.integrationTest.ts @@ -85,6 +85,8 @@ function doSearchTest(config: IRawSearch, expectedResultCount: number, done) { suite('Search-integration', () => { test('Text: GameOfLife', function (done: () => void) { + this.timeout(1000 * 60); // increase timeout for this one test + let config = { rootFolders: rootfolders(), filePattern: '*.js', @@ -95,6 +97,8 @@ suite('Search-integration', () => { }); test('Text: GameOfLife (RegExp)', function (done: () => void) { + this.timeout(1000 * 60); // increase timeout for this one test + let config = { rootFolders: rootfolders(), filePattern: '*.js', @@ -105,6 +109,8 @@ suite('Search-integration', () => { }); test('Text: GameOfLife (RegExp to EOL)', function (done: () => void) { + this.timeout(1000 * 60); // increase timeout for this one test + let config = { rootFolders: rootfolders(), filePattern: '*.js', @@ -115,6 +121,8 @@ suite('Search-integration', () => { }); test('Text: GameOfLife (Word Match, Case Sensitive)', function (done: () => void) { + this.timeout(1000 * 60); // increase timeout for this one test + let config = { rootFolders: rootfolders(), filePattern: '*.js', @@ -125,6 +133,8 @@ suite('Search-integration', () => { }); test('Text: GameOfLife (Word Match, Spaces)', function (done: () => void) { + this.timeout(1000 * 60); // increase timeout for this one test + let config = { rootFolders: rootfolders(), filePattern: '*.js', @@ -135,6 +145,8 @@ suite('Search-integration', () => { }); test('Text: GameOfLife (Word Match, Punctuation and Spaces)', function (done: () => void) { + this.timeout(1000 * 60); // increase timeout for this one test + let config = { rootFolders: rootfolders(), filePattern: '*.js', @@ -145,6 +157,8 @@ suite('Search-integration', () => { }); test('Text: Helvetica (UTF 16)', function (done: () => void) { + this.timeout(1000 * 60); // increase timeout for this one test + let config = { rootFolders: rootfolders(), filePattern: '*.css', @@ -155,6 +169,8 @@ suite('Search-integration', () => { }); test('Text: e', function (done: () => void) { + this.timeout(1000 * 60); // increase timeout for this one test + let config = { rootFolders: rootfolders(), filePattern: '*.*', @@ -165,6 +181,8 @@ suite('Search-integration', () => { }); test('Text: e (with excludes)', function (done: () => void) { + this.timeout(1000 * 60); // increase timeout for this one test + let config: any = { rootFolders: rootfolders(), filePattern: '*.*', @@ -176,6 +194,8 @@ suite('Search-integration', () => { }); test('Text: e (with includes)', function (done: () => void) { + this.timeout(1000 * 60); // increase timeout for this one test + let config: any = { rootFolders: rootfolders(), filePattern: '*.*', @@ -187,6 +207,8 @@ suite('Search-integration', () => { }); test('Text: e (with includes and exclude)', function (done: () => void) { + this.timeout(1000 * 60); // increase timeout for this one test + let config: any = { rootFolders: rootfolders(), filePattern: '*.*', @@ -199,6 +221,8 @@ suite('Search-integration', () => { }); test('Text: a (capped)', function (done: () => void) { + this.timeout(1000 * 60); // increase timeout for this one test + const maxResults = 520; let config = { rootFolders: rootfolders(), @@ -215,6 +239,8 @@ suite('Search-integration', () => { }); test('Text: a (no results)', function (done: () => void) { + this.timeout(1000 * 60); // increase timeout for this one test + let config = { rootFolders: rootfolders(), filePattern: '*.*', @@ -225,6 +251,8 @@ suite('Search-integration', () => { }); test('Text: -size', function (done: () => void) { + this.timeout(1000 * 60); // increase timeout for this one test + let config = { rootFolders: rootfolders(), filePattern: '*.css', From 63b4da631e796af65c6c66a3bbe2a0f06615a126 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 15 Jun 2017 17:03:18 +0200 Subject: [PATCH 1896/2747] :lipstick: #28526 --- src/vs/workbench/api/node/extHostWorkspace.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/api/node/extHostWorkspace.ts b/src/vs/workbench/api/node/extHostWorkspace.ts index dff559112b7d1..e222fb03816c6 100644 --- a/src/vs/workbench/api/node/extHostWorkspace.ts +++ b/src/vs/workbench/api/node/extHostWorkspace.ts @@ -5,6 +5,7 @@ 'use strict'; import URI from 'vs/base/common/uri'; +import Event, { Emitter } from 'vs/base/common/event'; import { normalize } from 'vs/base/common/paths'; import { isFalsyOrEmpty } from 'vs/base/common/arrays'; import { relative } from 'path'; @@ -19,9 +20,12 @@ export class ExtHostWorkspace extends ExtHostWorkspaceShape { private static _requestIdPool = 0; + private readonly _onDidChangeWorkspace = new Emitter(); private readonly _proxy: MainThreadWorkspaceShape; private _workspace: IWorkspaceData; + readonly onDidChangeWorkspace: Event = this._onDidChangeWorkspace.event; + constructor(threadService: IThreadService, workspace: IWorkspaceData) { super(); this._proxy = threadService.get(MainContext.MainThreadWorkspace); @@ -31,7 +35,9 @@ export class ExtHostWorkspace extends ExtHostWorkspaceShape { // --- workspace --- getPath(): string { - // TODO@Joh handle roots.length > 1 case + // this is legacy from the days before having + // multi-root and we keep it only alive if there + // is just one workspace folder. return this._workspace ? this._workspace.roots[0].fsPath : undefined; } @@ -64,8 +70,8 @@ export class ExtHostWorkspace extends ExtHostWorkspaceShape { } $acceptWorkspaceData(workspace: IWorkspaceData): void { - //TODO@joh equality-check, emit event etc. this._workspace = workspace; + this._onDidChangeWorkspace.fire(this); } // --- search --- From 22dd958b33a26e40a8013d0b303f817314f22b39 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 15 Jun 2017 18:15:31 +0200 Subject: [PATCH 1897/2747] #28538 Remove configurationEvent.config property --- src/vs/code/electron-main/menus.ts | 2 +- .../configuration/common/configuration.ts | 6 ------ .../configuration/node/configurationService.ts | 1 - .../contextkey/browser/contextKeyService.ts | 2 +- src/vs/platform/request/node/requestService.ts | 8 ++------ .../workbench/browser/parts/editor/editorPart.ts | 2 +- .../workbench/browser/parts/editor/textEditor.ts | 2 +- .../parts/quickopen/quickOpenController.ts | 2 +- .../workbench/common/editor/editorStacksModel.ts | 2 +- .../common/editor/untitledEditorModel.ts | 2 +- src/vs/workbench/electron-browser/window.ts | 2 +- .../parts/backup/common/backupModelTracker.ts | 2 +- .../parts/files/browser/files.contribution.ts | 2 +- .../parts/files/browser/views/explorerView.ts | 2 +- .../parts/files/browser/views/explorerViewer.ts | 2 +- .../parts/files/browser/views/openEditorsView.ts | 2 +- .../files/common/editors/fileEditorTracker.ts | 2 +- .../parts/markers/browser/markersPanel.ts | 2 +- .../electron-browser/relauncher.contribution.ts | 2 +- .../parts/search/browser/openAnythingHandler.ts | 2 +- .../parts/search/browser/searchViewlet.ts | 2 +- .../services/configuration/node/configuration.ts | 16 ++++++---------- .../test/node/configuration.test.ts | 2 +- .../files/electron-browser/fileService.ts | 2 +- .../services/mode/common/workbenchModeService.ts | 2 +- .../services/textfile/common/textFileService.ts | 2 +- 26 files changed, 30 insertions(+), 45 deletions(-) diff --git a/src/vs/code/electron-main/menus.ts b/src/vs/code/electron-main/menus.ts index 8679eabeeefb6..da1ca7c05bbad 100644 --- a/src/vs/code/electron-main/menus.ts +++ b/src/vs/code/electron-main/menus.ts @@ -119,7 +119,7 @@ export class CodeMenu { }); // Update when auto save config changes - this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(e.config, true /* update menu if changed */)); + this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(this.configurationService.getConfiguration(), true /* update menu if changed */)); // Listen to update service this.updateService.onStateChange(() => this.updateMenu()); diff --git a/src/vs/platform/configuration/common/configuration.ts b/src/vs/platform/configuration/common/configuration.ts index b3baea8370caf..988c167e791b2 100644 --- a/src/vs/platform/configuration/common/configuration.ts +++ b/src/vs/platform/configuration/common/configuration.ts @@ -63,17 +63,11 @@ export enum ConfigurationSource { } export interface IConfigurationServiceEvent { - /** - * TODO: Remove this - * The full configuration. - */ - config: any; /** * The type of source that triggered this event. */ source: ConfigurationSource; /** - * TODO: Remove this * The part of the configuration contributed by the source of this event. */ sourceConfig: any; diff --git a/src/vs/platform/configuration/node/configurationService.ts b/src/vs/platform/configuration/node/configurationService.ts index 76ad820e19609..c89737df2a23e 100644 --- a/src/vs/platform/configuration/node/configurationService.ts +++ b/src/vs/platform/configuration/node/configurationService.ts @@ -49,7 +49,6 @@ export class ConfigurationService extends Disposable implements IConfiguratio const cache = this.getConfiguration2(); this._onDidUpdateConfiguration.fire({ - config: this.getConfiguration(), source, sourceConfig: source === ConfigurationSource.Default ? cache.defaults.contents : cache.user.contents }); diff --git a/src/vs/platform/contextkey/browser/contextKeyService.ts b/src/vs/platform/contextkey/browser/contextKeyService.ts index 45d993851a4d8..325e8cf9680f4 100644 --- a/src/vs/platform/contextkey/browser/contextKeyService.ts +++ b/src/vs/platform/contextkey/browser/contextKeyService.ts @@ -58,7 +58,7 @@ class ConfigAwareContextValuesContainer extends Context { super(id, null); this._emitter = emitter; - this._subscription = configurationService.onDidUpdateConfiguration(e => this._updateConfigurationContext(e.config)); + this._subscription = configurationService.onDidUpdateConfiguration(e => this._updateConfigurationContext(configurationService.getConfiguration())); this._updateConfigurationContext(configurationService.getConfiguration()); } diff --git a/src/vs/platform/request/node/requestService.ts b/src/vs/platform/request/node/requestService.ts index ac91d258b24d6..23033fbe4f036 100644 --- a/src/vs/platform/request/node/requestService.ts +++ b/src/vs/platform/request/node/requestService.ts @@ -10,7 +10,7 @@ import { assign } from 'vs/base/common/objects'; import { IRequestOptions, IRequestContext, IRequestFunction, request } from 'vs/base/node/request'; import { getProxyAgent } from 'vs/base/node/proxy'; import { IRequestService, IHTTPConfiguration } from 'vs/platform/request/node/request'; -import { IConfigurationService, IConfigurationServiceEvent } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; /** * This service exposes the `request` API, while using the global @@ -29,11 +29,7 @@ export class RequestService implements IRequestService { @IConfigurationService configurationService: IConfigurationService ) { this.configure(configurationService.getConfiguration()); - configurationService.onDidUpdateConfiguration(this.onDidUpdateConfiguration, this, this.disposables); - } - - private onDidUpdateConfiguration(e: IConfigurationServiceEvent) { - this.configure(e.config); + configurationService.onDidUpdateConfiguration(() => this.configure(configurationService.getConfiguration()), this, this.disposables); } private configure(config: IHTTPConfiguration) { diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index 18a865ad5fcf9..7c4fdc9653b3f 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -182,7 +182,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService this.toUnbind.push(this.stacks.onEditorClosed(event => this.onEditorClosed(event))); this.toUnbind.push(this.stacks.onGroupOpened(event => this.onEditorGroupOpenedOrClosed())); this.toUnbind.push(this.stacks.onGroupClosed(event => this.onEditorGroupOpenedOrClosed())); - this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(e.config))); + this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(this.configurationService.getConfiguration()))); } private onEditorGroupOpenedOrClosed(): void { diff --git a/src/vs/workbench/browser/parts/editor/textEditor.ts b/src/vs/workbench/browser/parts/editor/textEditor.ts index 129428cd75032..c926a9d2e1715 100644 --- a/src/vs/workbench/browser/parts/editor/textEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textEditor.ts @@ -66,7 +66,7 @@ export abstract class BaseTextEditor extends BaseEditor { ) { super(id, telemetryService, themeService); - this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.handleConfigurationChangeEvent(e.config))); + this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.handleConfigurationChangeEvent(this.configurationService.getConfiguration()))); } protected get instantiationService(): IInstantiationService { diff --git a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts index 47e8f16d80e10..445c1325b40a1 100644 --- a/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts +++ b/src/vs/workbench/browser/parts/quickopen/quickOpenController.ts @@ -129,7 +129,7 @@ export class QuickOpenController extends Component implements IQuickOpenService } private registerListeners(): void { - this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.updateConfiguration(e.config))); + this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.updateConfiguration(this.configurationService.getConfiguration()))); this.toUnbind.push(this.partService.onTitleBarVisibilityChange(() => this.positionQuickOpenWidget())); this.toUnbind.push(browser.onDidChangeZoomLevel(() => this.positionQuickOpenWidget())); } diff --git a/src/vs/workbench/common/editor/editorStacksModel.ts b/src/vs/workbench/common/editor/editorStacksModel.ts index dd41ad0eb1e50..a771fa7544395 100644 --- a/src/vs/workbench/common/editor/editorStacksModel.ts +++ b/src/vs/workbench/common/editor/editorStacksModel.ts @@ -110,7 +110,7 @@ export class EditorGroup implements IEditorGroup { } private registerListeners(): void { - this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(e.config))); + this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(this.configurationService.getConfiguration()))); } private onConfigurationUpdated(config: IWorkbenchEditorConfiguration): void { diff --git a/src/vs/workbench/common/editor/untitledEditorModel.ts b/src/vs/workbench/common/editor/untitledEditorModel.ts index 65e8c973201d6..9a3d2afdee206 100644 --- a/src/vs/workbench/common/editor/untitledEditorModel.ts +++ b/src/vs/workbench/common/editor/untitledEditorModel.ts @@ -88,7 +88,7 @@ export class UntitledEditorModel extends BaseTextEditorModel implements IEncodin private registerListeners(): void { // Config Changes - this.configurationChangeListener = this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationChange(e.config)); + this.configurationChangeListener = this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationChange(this.configurationService.getConfiguration())); } private onConfigurationChange(configuration: IFilesConfiguration): void { diff --git a/src/vs/workbench/electron-browser/window.ts b/src/vs/workbench/electron-browser/window.ts index d164d68516192..c92fb29c10970 100644 --- a/src/vs/workbench/electron-browser/window.ts +++ b/src/vs/workbench/electron-browser/window.ts @@ -302,7 +302,7 @@ export class ElectronWindow extends Themable { // Configuration changes let previousConfiguredZoomLevel: number; this.configurationService.onDidUpdateConfiguration(e => { - const windowConfig: IWindowConfiguration = e.config; + const windowConfig: IWindowConfiguration = this.configurationService.getConfiguration(); let newZoomLevel = 0; if (windowConfig.window && typeof windowConfig.window.zoomLevel === 'number') { diff --git a/src/vs/workbench/parts/backup/common/backupModelTracker.ts b/src/vs/workbench/parts/backup/common/backupModelTracker.ts index 71f7fd5d0dde4..787897cd389bc 100644 --- a/src/vs/workbench/parts/backup/common/backupModelTracker.ts +++ b/src/vs/workbench/parts/backup/common/backupModelTracker.ts @@ -50,7 +50,7 @@ export class BackupModelTracker implements IWorkbenchContribution { this.toDispose.push(this.untitledEditorService.onDidDisposeModel((e) => this.discardBackup(e))); // Listen to config changes - this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationChange(e.config))); + this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationChange(this.configurationService.getConfiguration()))); } private onConfigurationChange(configuration: IFilesConfiguration): void { diff --git a/src/vs/workbench/parts/files/browser/files.contribution.ts b/src/vs/workbench/parts/files/browser/files.contribution.ts index 6d5cba5b6159e..4c4c811c26c70 100644 --- a/src/vs/workbench/parts/files/browser/files.contribution.ts +++ b/src/vs/workbench/parts/files/browser/files.contribution.ts @@ -122,7 +122,7 @@ class FileEditorInputFactory implements IEditorInputFactory { } private registerListeners(): void { - this.configurationService.onDidUpdateConfiguration(e => this.onConfiguration(e.config)); + this.configurationService.onDidUpdateConfiguration(e => this.onConfiguration(this.configurationService.getConfiguration())); } private onConfiguration(config: IFilesConfiguration): void { diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index d1df344969adf..37d52b0f58e58 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -173,7 +173,7 @@ export class ExplorerView extends CollapsibleView { this.toDispose.push(this.editorGroupService.onEditorsChanged(() => this.onEditorsChanged())); // Also handle configuration updates - this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(e.config, true))); + this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(this.configurationService.getConfiguration(), true))); }); } diff --git a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts index e7ed0556942dd..e46282959a51c 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts @@ -611,7 +611,7 @@ export class FileDragAndDrop implements IDragAndDrop { } private registerListeners(): void { - this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(e.config))); + this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(this.configurationService.getConfiguration()))); } private onConfigurationUpdated(config: IFilesConfiguration): void { diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts index d15bc3aef0084..10c10b7736f0e 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts @@ -186,7 +186,7 @@ export class OpenEditorsView extends CollapsibleView { this.toDispose.push(this.model.onModelChanged(e => this.onEditorStacksModelChanged(e))); // Also handle configuration updates - this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(e.config))); + this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(this.configurationService.getConfiguration()))); // Handle dirty counter this.toDispose.push(this.untitledEditorService.onDidChangeDirty(e => this.updateDirtyIndicator())); diff --git a/src/vs/workbench/parts/files/common/editors/fileEditorTracker.ts b/src/vs/workbench/parts/files/common/editors/fileEditorTracker.ts index 1ea7c0e745298..b87ea5f7ab6bb 100644 --- a/src/vs/workbench/parts/files/common/editors/fileEditorTracker.ts +++ b/src/vs/workbench/parts/files/common/editors/fileEditorTracker.ts @@ -62,7 +62,7 @@ export class FileEditorTracker implements IWorkbenchContribution { this.lifecycleService.onShutdown(this.dispose, this); // Configuration - this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(e.config))); + this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(this.configurationService.getConfiguration()))); } private onConfigurationUpdated(configuration: IWorkbenchEditorConfiguration): void { diff --git a/src/vs/workbench/parts/markers/browser/markersPanel.ts b/src/vs/workbench/parts/markers/browser/markersPanel.ts index 53c9bfdff055d..8df5bac927a9a 100644 --- a/src/vs/workbench/parts/markers/browser/markersPanel.ts +++ b/src/vs/workbench/parts/markers/browser/markersPanel.ts @@ -249,7 +249,7 @@ export class MarkersPanel extends Panel { } private createListeners(): void { - this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationsUpdated(e.config))); + this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationsUpdated(this.configurationService.getConfiguration()))); this.toDispose.push(this.markerService.onMarkerChanged(this.onMarkerChanged, this)); this.toDispose.push(this.editorGroupService.onEditorsChanged(this.onEditorsChanged, this)); this.toDispose.push(this.tree.addListener('selection', () => this.onSelected())); diff --git a/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts b/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts index 5e82b8c104e7b..fe3a1d254763b 100644 --- a/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts +++ b/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.ts @@ -43,7 +43,7 @@ export class SettingsChangeRelauncher implements IWorkbenchContribution { } private registerListeners(): void { - this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationChange(e.config, true))); + this.toDispose.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationChange(this.configurationService.getConfiguration(), true))); } private onConfigurationChange(config: IConfiguration, notify: boolean): void { diff --git a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts index e777cc9311fd5..8c79b5fa0ead1 100644 --- a/src/vs/workbench/parts/search/browser/openAnythingHandler.ts +++ b/src/vs/workbench/parts/search/browser/openAnythingHandler.ts @@ -116,7 +116,7 @@ export class OpenAnythingHandler extends QuickOpenHandler { } private registerListeners(): void { - this.configurationService.onDidUpdateConfiguration(e => this.updateHandlers(e.config)); + this.configurationService.onDidUpdateConfiguration(e => this.updateHandlers(this.configurationService.getConfiguration())); } private updateHandlers(configuration: IWorkbenchSearchConfiguration): void { diff --git a/src/vs/workbench/parts/search/browser/searchViewlet.ts b/src/vs/workbench/parts/search/browser/searchViewlet.ts index c02312985bf76..2f6f1b584710d 100644 --- a/src/vs/workbench/parts/search/browser/searchViewlet.ts +++ b/src/vs/workbench/parts/search/browser/searchViewlet.ts @@ -139,7 +139,7 @@ export class SearchViewlet extends Viewlet { this.toUnbind.push(this.fileService.onFileChanges(e => this.onFilesChanged(e))); this.toUnbind.push(this.untitledEditorService.onDidChangeDirty(e => this.onUntitledDidChangeDirty(e))); - this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(e.config))); + this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated(this.configurationService.getConfiguration()))); this.selectCurrentMatchEmitter = new Emitter(); debounceEvent(this.selectCurrentMatchEmitter.event, (l, e) => e, 100, /*leading=*/true) diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index c1617034e6287..03d8207072766 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -225,7 +225,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp return this.baseConfigurationService.reloadConfiguration() .then(() => this.initialize()) // Reinitialize to ensure we are hitting the disk .then(() => !this._configuration.equals(current)) // Check if the configuration is changed - .then(changed => changed ? this.trigger() : void 0) // Trigger event if changed + .then(changed => changed ? this.trigger(ConfigurationSource.Workspace, ) : void 0) // Trigger event if changed .then(() => this.getConfiguration(section)); } @@ -237,7 +237,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp .filter(folderConfiguration => !!folderConfiguration.configuration) // Filter folders which are not impacted by events .map(folderConfiguration => this._configuration.updateFolderConfiguration(folderConfiguration.folder, folderConfiguration.configuration)) // Update the configuration of impacted folders .reduce((result, value) => result || value, false)) // Check if the effective configuration of folder is changed - .then(changed => changed ? this.trigger() : void 0); // Trigger event if changed + .then(changed => changed ? this.trigger(ConfigurationSource.Workspace) : void 0); // Trigger event if changed } } @@ -269,7 +269,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp this.initCachesForFolders(toInitialize); this.doInitialize(toInitialize) .then(changed => configurationChanged || changed) - .then(changed => changed ? this.trigger() : void 0); + .then(changed => changed ? this.trigger(ConfigurationSource.Workspace) : void 0); } } @@ -299,16 +299,12 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } if (this._configuration.updateBaseConfiguration(this.baseConfigurationService.getConfiguration2())) { - this.trigger(event); + this.trigger(event.source, event.sourceConfig); } } - private trigger(baseEvent?: IConfigurationServiceEvent): void { - this._onDidUpdateConfiguration.fire({ - config: this.getConfiguration(), - source: baseEvent ? baseEvent.source : ConfigurationSource.Workspace, - sourceConfig: baseEvent ? baseEvent.sourceConfig : this._configuration.getFolderConfigurationModel(this.workspace.roots[0]).contents - }); + private trigger(source: ConfigurationSource, sourceConfig: any = this._configuration.getFolderConfigurationModel(this.workspace.roots[0]).contents): void { + this._onDidUpdateConfiguration.fire({ source, sourceConfig }); } private toOptions(arg: any): IConfigurationOptions { diff --git a/src/vs/workbench/services/configuration/test/node/configuration.test.ts b/src/vs/workbench/services/configuration/test/node/configuration.test.ts index d7de49aba3207..6a2ec1f6cd169 100644 --- a/src/vs/workbench/services/configuration/test/node/configuration.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configuration.test.ts @@ -212,7 +212,7 @@ suite('WorkspaceConfigurationService - Node', () => { service.onDidUpdateConfiguration(event => { const config = service.getConfiguration<{ testworkbench: { editor: { icons: boolean } } }>(); assert.equal(config.testworkbench.editor.icons, true); - assert.equal(event.config.testworkbench.editor.icons, true); + assert.equal(service.getConfiguration().testworkbench.editor.icons, true); service.dispose(); diff --git a/src/vs/workbench/services/files/electron-browser/fileService.ts b/src/vs/workbench/services/files/electron-browser/fileService.ts index 0fba07f5e29ef..4686db922fd72 100644 --- a/src/vs/workbench/services/files/electron-browser/fileService.ts +++ b/src/vs/workbench/services/files/electron-browser/fileService.ts @@ -134,7 +134,7 @@ export class FileService implements IFileService { this.toUnbind.push(this.raw.onAfterOperation(e => this._onAfterOperation.fire(e))); // Config changes - this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationChange(e.config))); + this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationChange(this.configurationService.getConfiguration()))); // Editor changing this.toUnbind.push(this.editorGroupService.onEditorsChanged(() => this.onEditorsChanged())); diff --git a/src/vs/workbench/services/mode/common/workbenchModeService.ts b/src/vs/workbench/services/mode/common/workbenchModeService.ts index fc65de33c9190..f5a138519f6bd 100644 --- a/src/vs/workbench/services/mode/common/workbenchModeService.ts +++ b/src/vs/workbench/services/mode/common/workbenchModeService.ts @@ -63,7 +63,7 @@ export class WorkbenchModeServiceImpl extends ModeServiceImpl { }); - this._configurationService.onDidUpdateConfiguration(e => this.onConfigurationChange(e.config)); + this._configurationService.onDidUpdateConfiguration(e => this.onConfigurationChange(this._configurationService.getConfiguration())); this.onDidCreateMode((mode) => { this._extensionService.activateByEvent(`onLanguage:${mode.getId()}`).done(null, onUnexpectedError); diff --git a/src/vs/workbench/services/textfile/common/textFileService.ts b/src/vs/workbench/services/textfile/common/textFileService.ts index f8cc7e2f2f822..515c976f07e60 100644 --- a/src/vs/workbench/services/textfile/common/textFileService.ts +++ b/src/vs/workbench/services/textfile/common/textFileService.ts @@ -117,7 +117,7 @@ export abstract class TextFileService implements ITextFileService { this.lifecycleService.onShutdown(this.dispose, this); // Configuration changes - this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationChange(e.config))); + this.toUnbind.push(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationChange(this.configurationService.getConfiguration()))); } private beforeShutdown(reason: ShutdownReason): boolean | TPromise { From be5fa397a53b12abb1ffb4ad36a867af944976e4 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 15 Jun 2017 17:19:41 +0200 Subject: [PATCH 1898/2747] :lipstick: --- src/vs/base/common/filters.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index 684c17cc5561f..d476d8ecce58c 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -621,9 +621,20 @@ function _findAllMatches(patternPos: number, wordPos: number, total: number, mat matches.unshift(wordPos); lastMatched = true; + // count simple matches and boost a row of + // simple matches when they yield in a + // strong match. if (score === 1) { simpleMatchCount += 1; + + if (patternPos === _patternStartPos) { + // when the first match is a weak + // match we discard it + return undefined; + } + } else { + // boost total += 1 + (simpleMatchCount * (score - 1)); simpleMatchCount = 0; } @@ -633,11 +644,6 @@ function _findAllMatches(patternPos: number, wordPos: number, total: number, mat } } - if (_scores[1][matches[0] + 1] === 1) { - // first match is weak - return undefined; - } - total -= wordPos >= 3 ? 9 : wordPos * 3; // late start penalty _bucket.push([total, matches]); From 528682cd60d4564203cff441f33da65b06525801 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 15 Jun 2017 18:45:31 +0200 Subject: [PATCH 1899/2747] avoid slice-calls, avoid searching for best result when you know it, #18682 --- src/vs/base/common/filters.ts | 78 +++++++++++++++++++++++++++-------- 1 file changed, 60 insertions(+), 18 deletions(-) diff --git a/src/vs/base/common/filters.ts b/src/vs/base/common/filters.ts index d476d8ecce58c..eafc2d5f6b1f7 100644 --- a/src/vs/base/common/filters.ts +++ b/src/vs/base/common/filters.ts @@ -551,31 +551,26 @@ export function fuzzyScore(pattern: string, word: string): [number, number[]] { console.log(printTable(_scores, pattern, patternLen, word, wordLen)); } + // _bucket is an array of [PrefixArray] we use to keep + // track of scores and matches. After calling `_findAllMatches` + // the best match (if available) is the first item in the array _bucket.length = 0; + _topScore = -100; _patternStartPos = patternStartPos; - _findAllMatches(patternLen, wordLen, 0, [], false); + _findAllMatches(patternLen, wordLen, 0, new LazyArray(), false); if (_bucket.length === 0) { return undefined; } - let topMatch = _bucket[0]; - for (let i = 1; i < _bucket.length; i++) { - let match = _bucket[i]; - if (topMatch[0] < match[0]) { - topMatch = match; - } - } - if (_debug) { - console.log(`${pattern} & ${word} => ${topMatch[0]} points for ${topMatch[1]}`); - } - return topMatch; + return [_topScore, _bucket[0].toArray()]; } -let _bucket: [number, number[]][] = []; +let _bucket: LazyArray[] = []; +let _topScore: number = 0; let _patternStartPos: number = 0; -function _findAllMatches(patternPos: number, wordPos: number, total: number, matches: number[], lastMatched: boolean): void { +function _findAllMatches(patternPos: number, wordPos: number, total: number, matches: LazyArray, lastMatched: boolean): void { if (_bucket.length >= 10 || total < -25) { // stop when having already 10 results, or @@ -595,7 +590,7 @@ function _findAllMatches(patternPos: number, wordPos: number, total: number, mat wordPos -= 1; if (lastMatched) { total -= 5; // new gap penalty - } else if (matches.length !== 0) { + } else if (!matches.isEmpty()) { total -= 1; // gap penalty after first match } lastMatched = false; @@ -608,8 +603,8 @@ function _findAllMatches(patternPos: number, wordPos: number, total: number, mat _findAllMatches( patternPos, wordPos - 1, - matches.length !== 0 ? total - 1 : total, - matches.slice(0), + !matches.isEmpty() ? total - 1 : total, // gap penalty after first match + matches.slice(), lastMatched ); } @@ -646,9 +641,56 @@ function _findAllMatches(patternPos: number, wordPos: number, total: number, mat total -= wordPos >= 3 ? 9 : wordPos * 3; // late start penalty - _bucket.push([total, matches]); + // dynamically keep track of the current top score + // and insert the current best score at head, the rest at tail + if (total > _topScore) { + _topScore = total; + _bucket.unshift(matches); + } else { + _bucket.push(matches); + } } +class LazyArray { + + private _parent: LazyArray; + private _parentLen: number; + private _data: number[]; + + isEmpty(): boolean { + return !this._data && (!this._parent || this._parent.isEmpty()); + } + + unshift(n: number) { + if (!this._data) { + this._data = [n]; + } else { + this._data.unshift(n); + } + } + + slice(): LazyArray { + const ret = new LazyArray(); + ret._parent = this; + ret._parentLen = this._data ? this._data.length : 0; + return ret; + } + + toArray(): number[] { + if (!this._data) { + return this._parent.toArray(); + } + const bucket: number[][] = []; + let element = this; + while (element) { + if (element._parent && element._parent._data) { + bucket.push(element._parent._data.slice(element._parent._data.length - element._parentLen)); + } + element = element._parent; + } + return Array.prototype.concat.apply(this._data, bucket); + } +} export function nextTypoPermutation(pattern: string, patternPos: number) { From 500c7ff845227a29e729ffa8fe23e8e62cd51c67 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Thu, 15 Jun 2017 10:17:54 -0700 Subject: [PATCH 1900/2747] Convert nsfw rename events to delete and create events --- .../node/watcher/nsfw/nsfwWatcherService.ts | 36 ++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts index 5b963bdc34887..717db358dfb32 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts @@ -28,7 +28,16 @@ export class NsfwWatcherService implements IWatcherService { events.forEach(e => console.log(e)); console.log('raw events end'); } - const convertedEvents = events.map(e => this._mapNsfwEventToRawFileChange(e)).filter(e => !!e); + const convertedEvents: watcher.IRawFileChange[] = []; + events.forEach(e => { + const c = this._mapNsfwEventToRawFileChanges(e); + if (c && c.length) { + c.forEach(c1 => convertedEvents.push(c1)); + } + }); + if (request.verboseLogging) { + console.log('converted events', convertedEvents); + } // TODO: Utilize fileEventDelayer and watcher.normalize p(convertedEvents); }).then(watcher => { @@ -37,18 +46,29 @@ export class NsfwWatcherService implements IWatcherService { }); } - private _mapNsfwEventToRawFileChange(nsfwEvent: any): watcher.IRawFileChange { + private _mapNsfwEventToRawFileChanges(nsfwEvent: any): watcher.IRawFileChange[] { // TODO: Handle other event types (directory change?) + + + // Convert a rename event to a delete and a create + if (nsfwEvent.action === 3) { + console.log('rename', nsfwEvent); + return [ + { type: 2, path: path.join(nsfwEvent.directory, nsfwEvent.oldFile) }, // Delete + { type: 1, path: path.join(nsfwEvent.directory, nsfwEvent.newFile) } // Create + ]; + } + if (!nsfwEvent.directory || !nsfwEvent.file) { - return null; + throw new Error('unhandled case'); + // return null; } + const p = path.join(nsfwEvent.directory, nsfwEvent.file); + const event: watcher.IRawFileChange = { type: nsfwEventActionToRawChangeType[nsfwEvent.action], - path: path.join(nsfwEvent.directory, nsfwEvent.file) + path: p }; - if (!event.type) { - return null; - } - return event; + return [event]; } } From 324cd2ac55f2b99b0b5d500cdea40f732246c30d Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 15 Jun 2017 10:21:43 -0700 Subject: [PATCH 1901/2747] Remove Unused Html Content Renderer Extensibility (#28760) * Remove Unused Html Content Renderer Extensibility Removes a few options from the html content renderer that are currently not used * Fix messageList --- src/vs/base/browser/htmlContentRenderer.ts | 55 +------------------ src/vs/base/browser/ui/inputbox/inputBox.ts | 2 +- src/vs/base/common/htmlContent.ts | 12 +--- src/vs/base/test/browser/htmlContent.test.ts | 35 +----------- .../test/keyboardMapperTestUtils.ts | 8 +-- .../services/message/browser/messageList.ts | 2 +- 6 files changed, 11 insertions(+), 103 deletions(-) diff --git a/src/vs/base/browser/htmlContentRenderer.ts b/src/vs/base/browser/htmlContentRenderer.ts index 2b6cc38e2b0f9..c4991d7701546 100644 --- a/src/vs/base/browser/htmlContentRenderer.ts +++ b/src/vs/base/browser/htmlContentRenderer.ts @@ -33,7 +33,7 @@ export function renderMarkedString(markedString: MarkedString, options: RenderOp */ export function renderHtml(content: RenderableContent, options: RenderOptions = {}): Node { if (typeof content === 'string') { - return _renderHtml({ isText: true, text: content }, options); + return document.createTextNode(content); } else if (Array.isArray(content)) { return _renderHtml({ children: content }, options); } else if (content) { @@ -46,11 +46,7 @@ function _renderHtml(content: IHTMLContentElement, options: RenderOptions = {}): let { codeBlockRenderer, actionCallback } = options; - if (content.isText) { - return document.createTextNode(content.text); - } - - var tagName = getSafeTagName(content.tagName) || 'div'; + var tagName = content.inline ? 'span' : 'div'; var element = document.createElement(tagName); if (content.className) { @@ -59,14 +55,6 @@ function _renderHtml(content: IHTMLContentElement, options: RenderOptions = {}): if (content.text) { element.textContent = content.text; } - if (content.style) { - element.setAttribute('style', content.style); - } - if (content.customStyle) { - Object.keys(content.customStyle).forEach((key) => { - element.style[key] = content.customStyle[key]; - }); - } if (content.children) { content.children.forEach((child) => { element.appendChild(renderHtml(child, options)); @@ -191,45 +179,6 @@ function _renderHtml(content: IHTMLContentElement, options: RenderOptions = {}): return element; } -var SAFE_TAG_NAMES = { - a: true, - b: true, - blockquote: true, - code: true, - del: true, - dd: true, - div: true, - dl: true, - dt: true, - em: true, - h1h2h3i: true, - img: true, - kbd: true, - li: true, - ol: true, - p: true, - pre: true, - s: true, - span: true, - sup: true, - sub: true, - strong: true, - strike: true, - ul: true, - br: true, - hr: true, -}; - -function getSafeTagName(tagName: string): string { - if (!tagName) { - return null; - } - if (SAFE_TAG_NAMES.hasOwnProperty(tagName)) { - return tagName; - } - return null; -} - // --- formatted string parsing class StringStream { diff --git a/src/vs/base/browser/ui/inputbox/inputBox.ts b/src/vs/base/browser/ui/inputbox/inputBox.ts index 87f6428e526d6..69ebed4e84558 100644 --- a/src/vs/base/browser/ui/inputbox/inputBox.ts +++ b/src/vs/base/browser/ui/inputbox/inputBox.ts @@ -382,7 +382,7 @@ export class InputBox extends Widget { layout(); let renderOptions: IHTMLContentElement = { - tagName: 'span', + inline: true, className: 'monaco-inputbox-message', }; diff --git a/src/vs/base/common/htmlContent.ts b/src/vs/base/common/htmlContent.ts index 8dcc73fc332de..da68a1f771997 100644 --- a/src/vs/base/common/htmlContent.ts +++ b/src/vs/base/common/htmlContent.ts @@ -85,12 +85,8 @@ export interface IHTMLContentElement { formattedText?: string; text?: string; className?: string; - style?: string; - customStyle?: any; - tagName?: string; + inline?: boolean; children?: IHTMLContentElement[]; - isText?: boolean; - role?: string; markdown?: string; code?: IHTMLContentElementCode; } @@ -113,11 +109,7 @@ function htmlContentElementEqual(a: IHTMLContentElement, b: IHTMLContentElement) a.formattedText === b.formattedText && a.text === b.text && a.className === b.className - && a.style === b.style - && a.customStyle === b.customStyle - && a.tagName === b.tagName - && a.isText === b.isText - && a.role === b.role + && a.inline === b.inline && a.markdown === b.markdown && htmlContentElementCodeEqual(a.code, b.code) && htmlContentElementArrEquals(a.children, b.children) diff --git a/src/vs/base/test/browser/htmlContent.test.ts b/src/vs/base/test/browser/htmlContent.test.ts index eaa12a6ba26a4..59caefa1d2e5c 100644 --- a/src/vs/base/test/browser/htmlContent.test.ts +++ b/src/vs/base/test/browser/htmlContent.test.ts @@ -10,25 +10,10 @@ import { renderHtml } from 'vs/base/browser/htmlContentRenderer'; suite('HtmlContent', () => { test('render text', () => { - var result = renderHtml({ - text: 'testing', - isText: true - }); + var result = renderHtml('testing'); assert.strictEqual(result.nodeType, document.TEXT_NODE); }); - test('cannot render script tag', function () { - var host = document.createElement('div'); - document.body.appendChild(host); - host.appendChild(renderHtml({ - tagName: 'script', - text: 'alert(\'owned -- injected script tag via htmlContent!\')' - })); - assert(true); - document.body.removeChild(host); - }); - - test('render simple element', () => { var result: HTMLElement = renderHtml({ text: 'testing' @@ -47,24 +32,6 @@ suite('HtmlContent', () => { assert.strictEqual(result.className, 'testClass'); }); - test('render element with style', () => { - var result: HTMLElement = renderHtml({ - text: 'testing', - style: 'width: 100px;' - }); - assert.strictEqual(result.getAttribute('style'), 'width: 100px;'); - }); - - test('render element with custom style', () => { - var result: HTMLElement = renderHtml({ - text: 'testing', - customStyle: { - 'width': '100px' - } - }); - assert.strictEqual(result.style.width, '100px'); - }); - test('render element with children', () => { var result: HTMLElement = renderHtml({ className: 'parent', diff --git a/src/vs/workbench/services/keybinding/test/keyboardMapperTestUtils.ts b/src/vs/workbench/services/keybinding/test/keyboardMapperTestUtils.ts index d79895b63f017..25b6f08b17d46 100644 --- a/src/vs/workbench/services/keybinding/test/keyboardMapperTestUtils.ts +++ b/src/vs/workbench/services/keybinding/test/keyboardMapperTestUtils.ts @@ -56,16 +56,16 @@ function _htmlPieces(pieces: string[], OS: OperatingSystem): IHTMLContentElement let children: IHTMLContentElement[] = []; for (let i = 0, len = pieces.length; i < len; i++) { if (i !== 0 && OS !== OperatingSystem.Macintosh) { - children.push({ tagName: 'span', text: '+' }); + children.push({ inline: true, text: '+' }); } - children.push({ tagName: 'span', className: 'monaco-kbkey', text: pieces[i] }); + children.push({ inline: true, className: 'monaco-kbkey', text: pieces[i] }); } return children; } export function simpleHTMLLabel(pieces: string[], OS: OperatingSystem): IHTMLContentElement { return { - tagName: 'span', + inline: true, className: 'monaco-kb', children: _htmlPieces(pieces, OS) }; @@ -73,7 +73,7 @@ export function simpleHTMLLabel(pieces: string[], OS: OperatingSystem): IHTMLCon export function chordHTMLLabel(firstPart: string[], chordPart: string[], OS: OperatingSystem): IHTMLContentElement { return { - tagName: 'span', + inline: true, className: 'monaco-kb', children: [].concat( _htmlPieces(firstPart, OS), diff --git a/src/vs/workbench/services/message/browser/messageList.ts b/src/vs/workbench/services/message/browser/messageList.ts index 55e51942ce217..6379dbe8d2b91 100644 --- a/src/vs/workbench/services/message/browser/messageList.ts +++ b/src/vs/workbench/services/message/browser/messageList.ts @@ -335,7 +335,7 @@ export class MessageList { // Error message const messageContentElement = htmlRenderer.renderHtml({ - tagName: 'span', + inline: true, className: 'message-left-side', formattedText: text }); From 6cc63cdf15c625337d935e979d9493d0cb401dae Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 15 Jun 2017 11:10:00 -0700 Subject: [PATCH 1902/2747] Use stream reader for TextDocument for more efficient parsing --- extensions/emmet/package.json | 2 +- extensions/emmet/src/balance.ts | 42 +++-- extensions/emmet/src/bufferStream.ts | 187 +++++++++++++++++++ extensions/emmet/src/matchTag.ts | 21 +-- extensions/emmet/src/mergeLines.ts | 11 +- extensions/emmet/src/removeTag.ts | 3 +- extensions/emmet/src/selectItem.ts | 7 +- extensions/emmet/src/selectItemHTML.ts | 74 ++++---- extensions/emmet/src/selectItemStylesheet.ts | 51 ++--- extensions/emmet/src/splitJoinTag.ts | 18 +- extensions/emmet/src/toggleComment.ts | 29 ++- extensions/emmet/src/updateTag.ts | 12 +- extensions/emmet/src/util.ts | 42 ++--- 13 files changed, 346 insertions(+), 153 deletions(-) create mode 100644 extensions/emmet/src/bufferStream.ts diff --git a/extensions/emmet/package.json b/extensions/emmet/package.json index bf96e3d75fd3f..719d8a9d17fc1 100644 --- a/extensions/emmet/package.json +++ b/extensions/emmet/package.json @@ -5,7 +5,7 @@ "version": "0.0.1", "publisher": "vscode", "engines": { - "vscode": "^1.10.0" + "vscode": "^1.13.0" }, "categories": [ "Other" diff --git a/extensions/emmet/src/balance.ts b/extensions/emmet/src/balance.ts index 02dd4c902d155..e7428bf35095f 100644 --- a/extensions/emmet/src/balance.ts +++ b/extensions/emmet/src/balance.ts @@ -4,9 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { getNode, getNodeOuterSelection, getNodeInnerSelection, isStyleSheet } from './util'; +import { getNode, isStyleSheet } from './util'; import parse from '@emmetio/html-matcher'; import Node from '@emmetio/node'; +import { DocumentStreamReader } from './bufferStream'; export function balanceOut() { balance(true); @@ -27,14 +28,12 @@ function balance(out: boolean) { } let getRangeFunction = out ? getRangeToBalanceOut : getRangeToBalanceIn; - let rootNode: Node = parse(editor.document.getText()); + let rootNode: Node = parse(new DocumentStreamReader(editor.document)); let newSelections: vscode.Selection[] = []; editor.selections.forEach(selection => { let range = getRangeFunction(editor.document, selection, rootNode); - if (range) { - newSelections.push(range); - } + newSelections.push(range ? range : selection); }); editor.selection = newSelections[0]; @@ -42,11 +41,16 @@ function balance(out: boolean) { } function getRangeToBalanceOut(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): vscode.Selection { - let offset = document.offsetAt(selection.start); - let nodeToBalance = getNode(rootNode, offset); + let nodeToBalance = getNode(rootNode, selection.start); + if (!nodeToBalance) { + return; + } + if (!nodeToBalance.close) { + return new vscode.Selection(nodeToBalance.start, nodeToBalance.end); + } - let innerSelection = getNodeInnerSelection(document, nodeToBalance); - let outerSelection = getNodeOuterSelection(document, nodeToBalance); + let innerSelection = new vscode.Selection(nodeToBalance.open.end, nodeToBalance.close.start); + let outerSelection = new vscode.Selection(nodeToBalance.start, nodeToBalance.end); if (innerSelection.contains(selection) && !innerSelection.isEqual(selection)) { return innerSelection; @@ -58,18 +62,26 @@ function getRangeToBalanceOut(document: vscode.TextDocument, selection: vscode.S } function getRangeToBalanceIn(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): vscode.Selection { - let offset = document.offsetAt(selection.start); - let nodeToBalance: Node = getNode(rootNode, offset); + let nodeToBalance: Node = getNode(rootNode, selection.start, true); + + if (!nodeToBalance) { + return; + } if (!nodeToBalance.firstChild) { - return selection; + if (nodeToBalance.close) { + return new vscode.Selection(nodeToBalance.open.end, nodeToBalance.close.start); + } + return; } - if (nodeToBalance.firstChild.start === offset && nodeToBalance.firstChild.end === document.offsetAt(selection.end)) { - return getNodeInnerSelection(document, nodeToBalance.firstChild); + if (selection.start.isEqual(nodeToBalance.firstChild.start) + && selection.end.isEqual(nodeToBalance.firstChild.end) + && nodeToBalance.firstChild.close) { + return new vscode.Selection(nodeToBalance.firstChild.open.end, nodeToBalance.firstChild.close.start); } - return new vscode.Selection(document.positionAt(nodeToBalance.firstChild.start), document.positionAt(nodeToBalance.firstChild.end)); + return new vscode.Selection(nodeToBalance.firstChild.start, nodeToBalance.firstChild.end); } diff --git a/extensions/emmet/src/bufferStream.ts b/extensions/emmet/src/bufferStream.ts new file mode 100644 index 0000000000000..923c7d04d0df4 --- /dev/null +++ b/extensions/emmet/src/bufferStream.ts @@ -0,0 +1,187 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { TextDocument, Position, Range, EndOfLine } from 'vscode'; + +/** + * A stream reader for VSCode's `TextDocument` + * Based on @emmetio/stream-reader and @emmetio/atom-plugin + */ +export class DocumentStreamReader { + private document: TextDocument; + private start: Position; + private _eof: Position; + private pos: Position; + private _eol: string; + + /** + * @param {TextDocument} buffer + * @param {Position} pos + * @param {Range} limit + */ + constructor(document: TextDocument, pos?: Position, limit?: Range) { + + this.document = document; + this.start = this.pos = pos ? pos : new Position(0, 0); + this._eof = limit ? limit.end : new Position(this.document.lineCount - 1, this._lineLength(this.document.lineCount - 1)); + this._eol = this.document.eol === EndOfLine.LF ? '\n' : '\r\n'; + } + + /** + * Returns true only if the stream is at the end of the file. + * @returns {Boolean} + */ + eof() { + return this.pos.isAfterOrEqual(this._eof); + } + + /** + * Creates a new stream instance which is limited to given range for given document + * @param {Position} start + * @param {Position} end + * @return {DocumentStreamReader} + */ + limit(start, end) { + return new DocumentStreamReader(this.document, start, new Range(start, end)); + } + + /** + * Returns the next character code in the stream without advancing it. + * Will return NaN at the end of the file. + * @returns {Number} + */ + peek() { + if (this.eof()) { + return NaN; + } + const line = this.document.lineAt(this.pos.line).text; + return this.pos.character < line.length ? line.charCodeAt(this.pos.character) : this._eol.charCodeAt(this.pos.character - line.length); + } + + /** + * Returns the next character in the stream and advances it. + * Also returns NaN when no more characters are available. + * @returns {Number} + */ + next() { + if (this.eof()) { + return NaN; + } + + const line = this.document.lineAt(this.pos.line).text; + let code: number; + if (this.pos.character < line.length) { + code = line.charCodeAt(this.pos.character); + this.pos = this.pos.translate(0, 1); + } else { + code = this._eol.charCodeAt(this.pos.character - line.length); + this.pos = new Position(this.pos.line + 1, 0); + } + + if (this.eof()) { + // restrict pos to eof, if in case it got moved beyond eof + this.pos = new Position(this._eof.line, this._eof.character); + } + + return code; + } + + /** + * Backs up the stream n characters. Backing it up further than the + * start of the current token will cause things to break, so be careful. + * @param {Number} n + */ + backUp(n) { + let row = this.pos.line; + let column = this.pos.character; + column -= (n || 1); + + while (row >= 0 && column < 0) { + row--; + column += this._lineLength(row); + } + + this.pos = row < 0 || column < 0 + ? new Position(0, 0) + : new Position(row, column); + + return this.peek(); + } + + /** + * Get the string between the start of the current token and the + * current stream position. + * @returns {String} + */ + current() { + return this.substring(this.start, this.pos); + } + + /** + * Returns contents for given range + * @param {Position} from + * @param {Position} to + * @return {String} + */ + substring(from, to) { + return this.document.getText(new Range(from, to)); + } + + /** + * Creates error object with current stream state + * @param {String} message + * @return {Error} + */ + error(message) { + const err = new Error(`${message} at row ${this.pos.line}, column ${this.pos.character}`); + + return err; + } + + /** + * Returns line length of given row, including line ending + * @param {Number} row + * @return {Number} + */ + _lineLength(row) { + if (row === this.document.lineCount - 1) { + return this.document.lineAt(row).text.length; + } + return this.document.lineAt(row).text.length + this._eol.length; + } + + /** + * `match` can be a character code or a function that takes a character code + * and returns a boolean. If the next character in the stream 'matches' + * the given argument, it is consumed and returned. + * Otherwise, `false` is returned. + * @param {Number|Function} match + * @returns {Boolean} + */ + eat(match) { + const ch = this.peek(); + const ok = typeof match === 'function' ? match(ch) : ch === match; + + if (ok) { + this.next(); + } + + return ok; + } + + /** + * Repeatedly calls eat with the given argument, until it + * fails. Returns true if any characters were eaten. + * @param {Object} match + * @returns {Boolean} + */ + eatWhile(match) { + const start = this.pos; + while (!this.eof() && this.eat(match)) { } + return !this.pos.isEqual(start); + } +} diff --git a/extensions/emmet/src/matchTag.ts b/extensions/emmet/src/matchTag.ts index 8037ca97d95b0..af72138240c6f 100644 --- a/extensions/emmet/src/matchTag.ts +++ b/extensions/emmet/src/matchTag.ts @@ -7,6 +7,7 @@ import * as vscode from 'vscode'; import { getNode } from './util'; import parse from '@emmetio/html-matcher'; import Node from '@emmetio/node'; +import { DocumentStreamReader } from './bufferStream'; export function matchTag() { let editor = vscode.window.activeTextEditor; @@ -15,10 +16,10 @@ export function matchTag() { return; } - let rootNode: Node = parse(editor.document.getText()); + let rootNode: Node = parse(new DocumentStreamReader(editor.document)); let updatedSelections = []; editor.selections.forEach(selection => { - let updatedSelection = getUpdatedSelections(editor, editor.document.offsetAt(selection.start), rootNode); + let updatedSelection = getUpdatedSelections(editor, selection.start, rootNode); if (updatedSelection) { updatedSelections.push(updatedSelection); } @@ -29,22 +30,16 @@ export function matchTag() { } } -function getUpdatedSelections(editor: vscode.TextEditor, offset: number, rootNode: Node): vscode.Selection { - let currentNode = getNode(rootNode, offset, true); +function getUpdatedSelections(editor: vscode.TextEditor, position: vscode.Position, rootNode: Node): vscode.Selection { + let currentNode = getNode(rootNode, position, true); // If no closing tag or cursor is between open and close tag, then no-op - if (!currentNode.close || (currentNode.open.end < offset && currentNode.close.start > offset)) { + if (!currentNode.close || (position.isAfter(currentNode.open.end) && position.isBefore(currentNode.close.start))) { return; } - if (offset <= currentNode.open.end) { - let matchingPosition = editor.document.positionAt(currentNode.close.start); - return new vscode.Selection(matchingPosition, matchingPosition); - } else { - let matchingPosition = editor.document.positionAt(currentNode.open.start); - return new vscode.Selection(matchingPosition, matchingPosition); - } - + let finalPosition = position.isBeforeOrEqual(currentNode.open.end) ? currentNode.close.start : currentNode.open.start; + return new vscode.Selection(finalPosition, finalPosition); } diff --git a/extensions/emmet/src/mergeLines.ts b/extensions/emmet/src/mergeLines.ts index fd63a2d36d44a..6d01107cfe033 100644 --- a/extensions/emmet/src/mergeLines.ts +++ b/extensions/emmet/src/mergeLines.ts @@ -7,6 +7,7 @@ import * as vscode from 'vscode'; import { isStyleSheet, getNode } from './util'; import parse from '@emmetio/html-matcher'; import Node from '@emmetio/node'; +import { DocumentStreamReader } from './bufferStream'; export function mergeLines() { let editor = vscode.window.activeTextEditor; @@ -18,7 +19,7 @@ export function mergeLines() { return; } - let rootNode: Node = parse(editor.document.getText()); + let rootNode: Node = parse(new DocumentStreamReader(editor.document)); editor.edit(editBuilder => { editor.selections.reverse().forEach(selection => { @@ -33,13 +34,13 @@ function getRangesToReplace(document: vscode.TextDocument, selection: vscode.Sel let endNodeToUpdate: Node; if (selection.isEmpty) { - startNodeToUpdate = endNodeToUpdate = getNode(rootNode, document.offsetAt(selection.start)); + startNodeToUpdate = endNodeToUpdate = getNode(rootNode, selection.start); } else { - startNodeToUpdate = getNode(rootNode, document.offsetAt(selection.start), true); - endNodeToUpdate = getNode(rootNode, document.offsetAt(selection.end), true); + startNodeToUpdate = getNode(rootNode, selection.start, true); + endNodeToUpdate = getNode(rootNode, selection.end, true); } - let rangeToReplace = new vscode.Range(document.positionAt(startNodeToUpdate.start), document.positionAt(endNodeToUpdate.end)); + let rangeToReplace = new vscode.Range(startNodeToUpdate.start, endNodeToUpdate.end); let textToReplaceWith = document.getText(rangeToReplace).replace(/\r\n|\n/g, '').replace(/>\s*<'); return [rangeToReplace, textToReplaceWith]; diff --git a/extensions/emmet/src/removeTag.ts b/extensions/emmet/src/removeTag.ts index 600557fd7a118..1987fba5066f4 100644 --- a/extensions/emmet/src/removeTag.ts +++ b/extensions/emmet/src/removeTag.ts @@ -31,8 +31,7 @@ export function removeTag() { } function getRangeToRemove(editor: vscode.TextEditor, selection: vscode.Selection, indentInSpaces: string): vscode.Range[] { - let offset = editor.document.offsetAt(selection.start); - let [openRange, closeRange] = getOpenCloseRange(editor.document, offset); + let [openRange, closeRange] = getOpenCloseRange(editor.document, selection.start); if (!openRange.contains(selection.start) && !closeRange.contains(selection.start)) { return []; } diff --git a/extensions/emmet/src/selectItem.ts b/extensions/emmet/src/selectItem.ts index 961f3a0dfa5d4..3280627a63ac6 100644 --- a/extensions/emmet/src/selectItem.ts +++ b/extensions/emmet/src/selectItem.ts @@ -10,6 +10,7 @@ import { nextItemStylesheet, prevItemStylesheet } from './selectItemStylesheet'; import parseStylesheet from '@emmetio/css-parser'; import parse from '@emmetio/html-matcher'; import Node from '@emmetio/node'; +import { DocumentStreamReader } from './bufferStream'; export function fetchSelectItem(direction: string): void { let editor = vscode.window.activeTextEditor; @@ -31,11 +32,11 @@ export function fetchSelectItem(direction: string): void { parseContent = parse; } - let rootNode: Node = parseContent(editor.document.getText()); + let rootNode: Node = parseContent(new DocumentStreamReader(editor.document)); let newSelections: vscode.Selection[] = []; editor.selections.forEach(selection => { - const selectionStart = editor.document.offsetAt(selection.isReversed ? selection.active : selection.anchor); - const selectionEnd = editor.document.offsetAt(selection.isReversed ? selection.anchor : selection.active); + const selectionStart = selection.isReversed ? selection.active : selection.anchor; + const selectionEnd = selection.isReversed ? selection.anchor : selection.active; let updatedSelection = direction === 'next' ? nextItem(selectionStart, selectionEnd, editor, rootNode) : prevItem(selectionStart, selectionEnd, editor, rootNode); newSelections.push(updatedSelection ? updatedSelection : selection); diff --git a/extensions/emmet/src/selectItemHTML.ts b/extensions/emmet/src/selectItemHTML.ts index 7aad3f9c2a9a7..7dcd14b740c74 100644 --- a/extensions/emmet/src/selectItemHTML.ts +++ b/extensions/emmet/src/selectItemHTML.ts @@ -7,18 +7,18 @@ import * as vscode from 'vscode'; import { getNode, getDeepestNode, findNextWord, findPrevWord } from './util'; import Node from '@emmetio/node'; -export function nextItemHTML(selectionStart: number, selectionEnd: number, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { +export function nextItemHTML(selectionStart: vscode.Position, selectionEnd: vscode.Position, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { let currentNode = getNode(rootNode, selectionEnd); let nextNode: Node; if (currentNode.type !== 'comment') { // If cursor is in the tag name, select tag - if (selectionEnd < currentNode.open.start + currentNode.name.length) { + if (selectionEnd.translate(0, -currentNode.name.length).isBefore(currentNode.open.start)) { return getSelectionFromNode(currentNode, editor.document); } // If cursor is in the open tag, look for attributes - if (selectionEnd < currentNode.open.end) { + if (selectionEnd.isBefore(currentNode.open.end)) { let attrSelection = getNextAttribute(selectionStart, selectionEnd, editor.document, currentNode); if (attrSelection) { return attrSelection; @@ -27,7 +27,7 @@ export function nextItemHTML(selectionStart: number, selectionEnd: number, edito // Get the first child of current node which is right after the cursor and is not a comment nextNode = currentNode.firstChild; - while (nextNode && (nextNode.start < selectionEnd || nextNode.type === 'comment')) { + while (nextNode && (selectionEnd.isAfterOrEqual(nextNode.start) || nextNode.type === 'comment')) { nextNode = nextNode.nextSibling; } } @@ -49,19 +49,19 @@ export function nextItemHTML(selectionStart: number, selectionEnd: number, edito return getSelectionFromNode(nextNode, editor.document); } -export function prevItemHTML(selectionStart: number, selectionEnd: number, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { +export function prevItemHTML(selectionStart: vscode.Position, selectionEnd: vscode.Position, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { let currentNode = getNode(rootNode, selectionStart); let prevNode: Node; - if (currentNode.type !== 'comment' && selectionStart > currentNode.open.start + 1) { + if (currentNode.type !== 'comment' && selectionStart.translate(0, -1).isAfter(currentNode.open.start)) { - if (selectionStart < currentNode.open.end || !currentNode.firstChild) { + if (selectionStart.isBefore(currentNode.open.end) || !currentNode.firstChild) { prevNode = currentNode; } else { // Select the child that appears just before the cursor and is not a comment prevNode = currentNode.firstChild; let oldOption: Node; - while (prevNode.nextSibling && prevNode.nextSibling.end < selectionStart) { + while (prevNode.nextSibling && selectionStart.isAfterOrEqual(prevNode.nextSibling.end)) { if (prevNode && prevNode.type !== 'comment') { oldOption = prevNode; } @@ -92,14 +92,14 @@ export function prevItemHTML(selectionStart: number, selectionEnd: number, edito function getSelectionFromNode(node: Node, document: vscode.TextDocument): vscode.Selection { if (node && node.open) { - let selectionStart = document.positionAt(node.open.start + 1); + let selectionStart = (node.open.start).translate(0, 1); let selectionEnd = selectionStart.translate(0, node.name.length); return new vscode.Selection(selectionStart, selectionEnd); } } -function getNextAttribute(selectionStart: number, selectionEnd: number, document: vscode.TextDocument, node: Node): vscode.Selection { +function getNextAttribute(selectionStart: vscode.Position, selectionEnd: vscode.Position, document: vscode.TextDocument, node: Node): vscode.Selection { if (!node.attributes || node.attributes.length === 0 || node.type === 'comment') { return; @@ -108,19 +108,19 @@ function getNextAttribute(selectionStart: number, selectionEnd: number, document for (let i = 0; i < node.attributes.length; i++) { let attr = node.attributes[i]; - if (selectionEnd < attr.start) { + if (selectionEnd.isBefore(attr.start)) { // select full attr - return new vscode.Selection(document.positionAt(attr.start), document.positionAt(attr.end)); + return new vscode.Selection(attr.start, attr.end); } - if (attr.value.start === attr.value.end) { + if ((attr.value.start).isEqual(attr.value.end)) { // No attr value to select continue; } - if ((selectionStart === attr.start && selectionEnd === attr.end) || selectionEnd < attr.value.start) { + if ((selectionStart.isEqual(attr.start) && selectionEnd.isEqual(attr.end)) || selectionEnd.isBefore(attr.value.start)) { // cursor is in attr name, so select full attr value - return new vscode.Selection(document.positionAt(attr.value.start), document.positionAt(attr.value.end)); + return new vscode.Selection(attr.value.start, attr.value.end); } // Fetch the next word in the attr value @@ -131,26 +131,26 @@ function getNextAttribute(selectionStart: number, selectionEnd: number, document } let pos = undefined; - if (selectionStart === attr.value.start && selectionEnd === attr.value.end) { + if (selectionStart.isEqual(attr.value.start) && selectionEnd.isEqual(attr.value.end)) { pos = -1; } - if (pos === undefined && selectionEnd < attr.end) { - pos = selectionEnd - attr.value.start - 1; + if (pos === undefined && selectionEnd.isBefore(attr.end)) { + pos = selectionEnd.character - attr.value.start.character - 1; } if (pos !== undefined) { - let [newSelectionStart, newSelectionEnd] = findNextWord(attr.value.toString(), pos); - if (newSelectionStart >= 0 && newSelectionEnd >= 0) { - newSelectionStart += attr.value.start; - newSelectionEnd += attr.value.start; - return new vscode.Selection(document.positionAt(newSelectionStart), document.positionAt(newSelectionEnd)); + let [newSelectionStartOffset, newSelectionEndOffset] = findNextWord(attr.value.toString(), pos); + if (newSelectionStartOffset >= 0 && newSelectionEndOffset >= 0) { + const newSelectionStart = (attr.value.start).translate(0, newSelectionStartOffset); + const newSelectionEnd = (attr.value.start).translate(0, newSelectionEndOffset); + return new vscode.Selection(newSelectionStart, newSelectionEnd); } } } } -function getPrevAttribute(selectionStart: number, selectionEnd: number, document: vscode.TextDocument, node: Node): vscode.Selection { +function getPrevAttribute(selectionStart: vscode.Position, selectionEnd: vscode.Position, document: vscode.TextDocument, node: Node): vscode.Selection { if (!node.attributes || node.attributes.length === 0 || node.type === 'comment') { return; @@ -159,32 +159,32 @@ function getPrevAttribute(selectionStart: number, selectionEnd: number, document for (let i = node.attributes.length - 1; i >= 0; i--) { let attr = node.attributes[i]; - if (selectionStart <= attr.start) { + if (selectionStart.isBeforeOrEqual(attr.start)) { continue; } - if (attr.value.start === attr.value.end || selectionStart < attr.value.start) { + if ((attr.value.start).isEqual(attr.value.end) || selectionStart.isBefore(attr.value.start)) { // select full attr - return new vscode.Selection(document.positionAt(attr.start), document.positionAt(attr.end)); + return new vscode.Selection(attr.start, attr.end); } - if (selectionStart === attr.value.start) { - if (selectionEnd >= attr.value.end) { + if (selectionStart.isEqual(attr.value.start)) { + if (selectionEnd.isAfterOrEqual(attr.value.end)) { // select full attr - return new vscode.Selection(document.positionAt(attr.start), document.positionAt(attr.end)); + return new vscode.Selection(attr.start, attr.end); } // select attr value - return new vscode.Selection(document.positionAt(attr.value.start), document.positionAt(attr.value.end)); + return new vscode.Selection(attr.value.start, attr.value.end); } // Fetch the prev word in the attr value - let pos = selectionStart > attr.value.end ? attr.value.toString().length : selectionStart - attr.value.start; - let [newSelectionStart, newSelectionEnd] = findPrevWord(attr.value.toString(), pos); - if (newSelectionStart >= 0 && newSelectionEnd >= 0) { - newSelectionStart += attr.value.start; - newSelectionEnd += attr.value.start; - return new vscode.Selection(document.positionAt(newSelectionStart), document.positionAt(newSelectionEnd)); + let pos = selectionStart.isAfter(attr.value.end) ? attr.value.toString().length : selectionStart.character - attr.value.start.character; + let [newSelectionStartOffset, newSelectionEndOffset] = findPrevWord(attr.value.toString(), pos); + if (newSelectionStartOffset >= 0 && newSelectionEndOffset >= 0) { + const newSelectionStart = (attr.value.start).translate(0, newSelectionStartOffset); + const newSelectionEnd = (attr.value.start).translate(0, newSelectionEndOffset); + return new vscode.Selection(newSelectionStart, newSelectionEnd); } diff --git a/extensions/emmet/src/selectItemStylesheet.ts b/extensions/emmet/src/selectItemStylesheet.ts index 0a11f5e5e33b7..a40cb9d07369b 100644 --- a/extensions/emmet/src/selectItemStylesheet.ts +++ b/extensions/emmet/src/selectItemStylesheet.ts @@ -7,16 +7,19 @@ import * as vscode from 'vscode'; import { getNode, getDeepestNode, findNextWord, findPrevWord } from './util'; import Node from '@emmetio/node'; -export function nextItemStylesheet(startOffset: number, endOffset: number, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { +export function nextItemStylesheet(startOffset: vscode.Position, endOffset: vscode.Position, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { let currentNode = getNode(rootNode, endOffset, true); + if (!currentNode) { + currentNode = rootNode; + } // Full property is selected, so select full property value next - if (currentNode.type === 'property' && startOffset === currentNode.start && endOffset === currentNode.end) { + if (currentNode.type === 'property' && startOffset.isEqual(currentNode.start) && endOffset.isEqual(currentNode.end)) { return getSelectionFromProperty(currentNode, editor.document, startOffset, endOffset, true, 'next'); } // Part or whole of propertyValue is selected, so select the next word in the propertyValue - if (currentNode.type === 'property' && startOffset >= currentNode.valueToken.start && endOffset <= currentNode.valueToken.end) { + if (currentNode.type === 'property' && startOffset.isAfterOrEqual(currentNode.valueToken.start) && endOffset.isBeforeOrEqual(currentNode.valueToken.end)) { let singlePropertyValue = getSelectionFromProperty(currentNode, editor.document, startOffset, endOffset, false, 'next'); if (singlePropertyValue) { return singlePropertyValue; @@ -24,14 +27,14 @@ export function nextItemStylesheet(startOffset: number, endOffset: number, edito } // Cursor is in the selector or in a property - if ((currentNode.type === 'rule' && endOffset < currentNode.selectorToken.end) - || (currentNode.type === 'property' && endOffset < currentNode.valueToken.end)) { + if ((currentNode.type === 'rule' && endOffset.isBefore(currentNode.selectorToken.end)) + || (currentNode.type === 'property' && endOffset.isBefore(currentNode.valueToken.end))) { return getSelectionFromNode(currentNode, editor.document); } // Get the first child of current node which is right after the cursor let nextNode = currentNode.firstChild; - while (nextNode && endOffset >= nextNode.end) { + while (nextNode && endOffset.isAfterOrEqual(nextNode.end)) { nextNode = nextNode.nextSibling; } @@ -45,32 +48,32 @@ export function nextItemStylesheet(startOffset: number, endOffset: number, edito } -export function prevItemStylesheet(startOffset: number, endOffset: number, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { +export function prevItemStylesheet(startOffset: vscode.Position, endOffset: vscode.Position, editor: vscode.TextEditor, rootNode: Node): vscode.Selection { let currentNode = getNode(rootNode, startOffset); if (!currentNode) { currentNode = rootNode; } // Full property value is selected, so select the whole property next - if (currentNode.type === 'property' && startOffset === currentNode.valueToken.start && endOffset === currentNode.valueToken.end) { + if (currentNode.type === 'property' && startOffset.isEqual(currentNode.valueToken.start) && endOffset.isEqual(currentNode.valueToken.end)) { return getSelectionFromNode(currentNode, editor.document); } // Part of propertyValue is selected, so select the prev word in the propertyValue - if (currentNode.type === 'property' && startOffset >= currentNode.valueToken.start && endOffset <= currentNode.valueToken.end) { + if (currentNode.type === 'property' && startOffset.isAfterOrEqual(currentNode.valueToken.start) && endOffset.isBeforeOrEqual(currentNode.valueToken.end)) { let singlePropertyValue = getSelectionFromProperty(currentNode, editor.document, startOffset, endOffset, false, 'prev'); if (singlePropertyValue) { return singlePropertyValue; } } - if (currentNode.type === 'property' || !currentNode.firstChild || (currentNode.type === 'rule' && startOffset <= currentNode.firstChild.start)) { + if (currentNode.type === 'property' || !currentNode.firstChild || (currentNode.type === 'rule' && startOffset.isBeforeOrEqual(currentNode.firstChild.start))) { return getSelectionFromNode(currentNode, editor.document); } // Select the child that appears just before the cursor let prevNode = currentNode.firstChild; - while (prevNode.nextSibling && prevNode.nextSibling.end <= startOffset) { + while (prevNode.nextSibling && startOffset.isAfterOrEqual(prevNode.nextSibling.end)) { prevNode = prevNode.nextSibling; } prevNode = getDeepestNode(prevNode); @@ -86,47 +89,47 @@ function getSelectionFromNode(node: Node, document: vscode.TextDocument): vscode } let nodeToSelect = node.type === 'rule' ? node.selectorToken : node; - return new vscode.Selection(document.positionAt(nodeToSelect.start), document.positionAt(nodeToSelect.end)); + return new vscode.Selection(nodeToSelect.start, nodeToSelect.end); } -function getSelectionFromProperty(node: Node, document: vscode.TextDocument, selectionStart: number, selectionEnd: number, selectFullValue: boolean, direction: string): vscode.Selection { +function getSelectionFromProperty(node: Node, document: vscode.TextDocument, selectionStart: vscode.Position, selectionEnd: vscode.Position, selectFullValue: boolean, direction: string): vscode.Selection { if (!node || node.type !== 'property') { return; } let propertyValue = node.valueToken.stream.substring(node.valueToken.start, node.valueToken.end); - selectFullValue = selectFullValue || (direction === 'prev' && selectionStart === node.valueToken.start && selectionEnd < node.valueToken.end); + selectFullValue = selectFullValue || (direction === 'prev' && selectionStart.isEqual(node.valueToken.start) && selectionEnd.isBefore(node.valueToken.end)); if (selectFullValue) { - return new vscode.Selection(document.positionAt(node.valueToken.start), document.positionAt(node.valueToken.end)); + return new vscode.Selection(node.valueToken.start, node.valueToken.end); } let pos; if (direction === 'prev') { - if (selectionStart === node.valueToken.start) { + if (selectionStart.isEqual(node.valueToken.start)) { return; } - pos = selectionStart > node.valueToken.end ? propertyValue.length : selectionStart - node.valueToken.start; + pos = selectionStart.isAfter(node.valueToken.end) ? propertyValue.length : selectionStart.character - node.valueToken.start.character; } if (direction === 'next') { - if (selectionEnd === node.valueToken.end && (selectionStart > node.valueToken.start || propertyValue.indexOf(' ') === -1)) { + if (selectionEnd.isEqual(node.valueToken.end) && (selectionStart.isAfter(node.valueToken.start) || propertyValue.indexOf(' ') === -1)) { return; } - pos = selectionEnd === node.valueToken.end ? -1 : selectionEnd - node.valueToken.start - 1; + pos = selectionEnd.isEqual(node.valueToken.end) ? -1 : selectionEnd.character - node.valueToken.start.character - 1; } - let [newSelectionStart, newSelectionEnd] = direction === 'prev' ? findPrevWord(propertyValue, pos) : findNextWord(propertyValue, pos); - if (!newSelectionStart && !newSelectionEnd) { + let [newSelectionStartOffset, newSelectionEndOffset] = direction === 'prev' ? findPrevWord(propertyValue, pos) : findNextWord(propertyValue, pos); + if (!newSelectionStartOffset && !newSelectionEndOffset) { return; } - newSelectionStart += node.valueToken.start; - newSelectionEnd += node.valueToken.start; + const newSelectionStart = (node.valueToken.start).translate(0, newSelectionStartOffset); + const newSelectionEnd = (node.valueToken.start).translate(0, newSelectionEndOffset); - return new vscode.Selection(document.positionAt(newSelectionStart), document.positionAt(newSelectionEnd)); + return new vscode.Selection(newSelectionStart, newSelectionEnd); } diff --git a/extensions/emmet/src/splitJoinTag.ts b/extensions/emmet/src/splitJoinTag.ts index 1886ca2472c18..cbd02ef81cda3 100644 --- a/extensions/emmet/src/splitJoinTag.ts +++ b/extensions/emmet/src/splitJoinTag.ts @@ -7,6 +7,7 @@ import * as vscode from 'vscode'; import { isStyleSheet, getNode } from './util'; import parse from '@emmetio/html-matcher'; import Node from '@emmetio/node'; +import { DocumentStreamReader } from './bufferStream'; export function splitJoinTag() { let editor = vscode.window.activeTextEditor; @@ -18,7 +19,7 @@ export function splitJoinTag() { return; } - let rootNode: Node = parse(editor.document.getText()); + let rootNode: Node = parse(new DocumentStreamReader(editor.document)); editor.edit(editBuilder => { editor.selections.reverse().forEach(selection => { @@ -29,23 +30,24 @@ export function splitJoinTag() { } function getRangesToReplace(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): [vscode.Range, string] { - let offset = document.offsetAt(selection.start); - let nodeToUpdate: Node = getNode(rootNode, offset); + let nodeToUpdate: Node = getNode(rootNode, selection.start); let rangeToReplace: vscode.Range; let textToReplaceWith: string; if (!nodeToUpdate.close) { // Split Tag - let nodeText = document.getText(new vscode.Range(document.positionAt(nodeToUpdate.start), document.positionAt(nodeToUpdate.end))); + let nodeText = document.getText(new vscode.Range(nodeToUpdate.start, nodeToUpdate.end)); let m = nodeText.match(/(\s*\/)?>$/); - let end = nodeToUpdate.open.end; - let start = m ? end - m[0].length : end; + let end = nodeToUpdate.end; + let start = m ? end.translate(0, -m[0].length) : end; - rangeToReplace = new vscode.Range(document.positionAt(start), document.positionAt(end)); + rangeToReplace = new vscode.Range(start, end); textToReplaceWith = `>`; } else { // Join Tag - rangeToReplace = new vscode.Range(document.positionAt(nodeToUpdate.open.end - 1), document.positionAt(nodeToUpdate.close.end)); + let start = (nodeToUpdate.open.end).translate(0, -1); + let end = nodeToUpdate.end; + rangeToReplace = new vscode.Range(start, end); textToReplaceWith = '/>'; } diff --git a/extensions/emmet/src/toggleComment.ts b/extensions/emmet/src/toggleComment.ts index 1849535420c9a..6a91dc081e480 100644 --- a/extensions/emmet/src/toggleComment.ts +++ b/extensions/emmet/src/toggleComment.ts @@ -8,7 +8,7 @@ import { getNode, isStyleSheet, getNodesInBetween } from './util'; import parse from '@emmetio/html-matcher'; import parseStylesheet from '@emmetio/css-parser'; import Node from '@emmetio/node'; - +import { DocumentStreamReader } from './bufferStream'; const startCommentStylesheet = '/*'; const endCommentStylesheet = '*/'; @@ -39,7 +39,7 @@ export function toggleComment() { endComment = endCommentHTML; } - let rootNode = parseContent(editor.document.getText()); + let rootNode = parseContent(new DocumentStreamReader(editor.document)); editor.edit(editBuilder => { editor.selections.reverse().forEach(selection => { @@ -58,8 +58,8 @@ export function toggleComment() { } function toggleCommentHTML(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): [vscode.Range[], vscode.Range] { - const selectionStart = document.offsetAt(selection.isReversed ? selection.active : selection.anchor); - const selectionEnd = document.offsetAt(selection.isReversed ? selection.anchor : selection.active); + const selectionStart = selection.isReversed ? selection.active : selection.anchor; + const selectionEnd = selection.isReversed ? selection.anchor : selection.active; let startNode = getNode(rootNode, selectionStart, true); let endNode = getNode(rootNode, selectionEnd, true); @@ -79,7 +79,7 @@ function toggleCommentHTML(document: vscode.TextDocument, selection: vscode.Sele return [rangesToUnComment, null]; } - let rangeToComment = new vscode.Range(document.positionAt(allNodes[0].start), document.positionAt(allNodes[allNodes.length - 1].end)); + let rangeToComment = new vscode.Range(allNodes[0].start, allNodes[allNodes.length - 1].end); return [rangesToUnComment, rangeToComment]; } @@ -88,7 +88,7 @@ function getRangesToUnCommentHTML(node: Node, document: vscode.TextDocument): vs // If current node is commented, then uncomment and return if (node.type === 'comment') { - rangesToUnComment.push(new vscode.Range(document.positionAt(node.start), document.positionAt(node.end))); + rangesToUnComment.push(new vscode.Range(node.start, node.end)); return rangesToUnComment; } @@ -103,8 +103,8 @@ function getRangesToUnCommentHTML(node: Node, document: vscode.TextDocument): vs function toggleCommentStylesheet(document: vscode.TextDocument, selection: vscode.Selection, rootNode: Node): [vscode.Range[], vscode.Range] { - const selectionStart = document.offsetAt(selection.isReversed ? selection.active : selection.anchor); - const selectionEnd = document.offsetAt(selection.isReversed ? selection.anchor : selection.active); + const selectionStart = selection.isReversed ? selection.active : selection.anchor; + const selectionEnd = selection.isReversed ? selection.anchor : selection.active; let startNode = getNode(rootNode, selectionStart, true); let endNode = getNode(rootNode, selectionEnd, true); @@ -114,19 +114,18 @@ function toggleCommentStylesheet(document: vscode.TextDocument, selection: vscod // Uncomment the comments that intersect with the selection. rootNode.comments.forEach(comment => { - let commentStart = document.positionAt(comment.start); - let commentEnd = document.positionAt(comment.end); - if (!isFirstNodeCommented) { - isFirstNodeCommented = (comment.start <= selectionStart && comment.end >= selectionEnd); + isFirstNodeCommented = (selectionStart.isAfterOrEqual(comment.start) && selectionEnd.isBefore(comment.end)); } - if (selection.contains(commentStart) || selection.contains(commentEnd) || (comment.start <= selectionStart && comment.end >= selectionEnd)) { - rangesToUnComment.push(new vscode.Range(document.positionAt(comment.start), document.positionAt(comment.end))); + if (selection.contains(comment.start) + || selection.contains(comment.end) + || (selectionStart.isAfterOrEqual(comment.start) && selectionEnd.isBefore(comment.end))) { + rangesToUnComment.push(new vscode.Range(comment.start, comment.end)); } }); - let rangeToComment = isFirstNodeCommented ? null : new vscode.Range(document.positionAt(startNode.start), document.positionAt(endNode.end)); + let rangeToComment = isFirstNodeCommented ? null : new vscode.Range(startNode ? startNode.start : selectionStart, endNode ? endNode.end : selectionEnd); return [rangesToUnComment, rangeToComment]; diff --git a/extensions/emmet/src/updateTag.ts b/extensions/emmet/src/updateTag.ts index 43efb2cc28597..b4450eba2831e 100644 --- a/extensions/emmet/src/updateTag.ts +++ b/extensions/emmet/src/updateTag.ts @@ -7,6 +7,7 @@ import * as vscode from 'vscode'; import { getNode } from './util'; import parse from '@emmetio/html-matcher'; import Node from '@emmetio/node'; +import { DocumentStreamReader } from './bufferStream'; export function updateTag(tagName: string) { let editor = vscode.window.activeTextEditor; @@ -15,7 +16,7 @@ export function updateTag(tagName: string) { return; } - let rootNode: Node = parse(editor.document.getText()); + let rootNode: Node = parse(new DocumentStreamReader(editor.document)); let rangesToUpdate = []; editor.selections.reverse().forEach(selection => { rangesToUpdate = rangesToUpdate.concat(getRangesToUpdate(editor, selection, rootNode)); @@ -29,16 +30,15 @@ export function updateTag(tagName: string) { } function getRangesToUpdate(editor: vscode.TextEditor, selection: vscode.Selection, rootNode: Node): vscode.Range[] { - let offset = editor.document.offsetAt(selection.start); - let nodeToUpdate = getNode(rootNode, offset); + let nodeToUpdate = getNode(rootNode, selection.start); - let openStart = editor.document.positionAt(nodeToUpdate.open.start + 1); + let openStart = (nodeToUpdate.open.start).translate(0, 1); let openEnd = openStart.translate(0, nodeToUpdate.name.length); let ranges = [new vscode.Range(openStart, openEnd)]; if (nodeToUpdate.close) { - let closeStart = editor.document.positionAt(nodeToUpdate.close.start + 2); - let closeEnd = editor.document.positionAt(nodeToUpdate.close.end - 1); + let closeStart = (nodeToUpdate.close.start).translate(0, 2); + let closeEnd = (nodeToUpdate.close.end).translate(0, -1); ranges.push(new vscode.Range(closeStart, closeEnd)); } return ranges; diff --git a/extensions/emmet/src/util.ts b/extensions/emmet/src/util.ts index bc3f3893e89fa..a6200a2455d81 100644 --- a/extensions/emmet/src/util.ts +++ b/extensions/emmet/src/util.ts @@ -7,7 +7,7 @@ import * as vscode from 'vscode'; import parse from '@emmetio/html-matcher'; import Node from '@emmetio/node'; import * as extract from '@emmetio/extract-abbreviation'; - +import { DocumentStreamReader } from './bufferStream'; export function validate(allowStylesheet: boolean = true): boolean { let editor = vscode.window.activeTextEditor; @@ -80,24 +80,26 @@ export function getProfile(syntax: string): any { return newOptions; } -export function getOpenCloseRange(document: vscode.TextDocument, offset: number): [vscode.Range, vscode.Range] { - let rootNode: Node = parse(document.getText()); - let nodeToUpdate = getNode(rootNode, offset); - let openRange = new vscode.Range(document.positionAt(nodeToUpdate.open.start), document.positionAt(nodeToUpdate.open.end)); +export function getOpenCloseRange(document: vscode.TextDocument, position: vscode.Position): [vscode.Range, vscode.Range] { + let rootNode: Node = parse(new DocumentStreamReader(document)); + let nodeToUpdate = getNode(rootNode, position); + let openRange = new vscode.Range(nodeToUpdate.open.start, nodeToUpdate.open.end); let closeRange = null; if (nodeToUpdate.close) { - closeRange = new vscode.Range(document.positionAt(nodeToUpdate.close.start), document.positionAt(nodeToUpdate.close.end)); + closeRange = new vscode.Range(nodeToUpdate.close.start, nodeToUpdate.close.end); } return [openRange, closeRange]; } -export function getNode(root: Node, offset: number, includeNodeBoundary: boolean = false) { +export function getNode(root: Node, position: vscode.Position, includeNodeBoundary: boolean = false) { let currentNode: Node = root.firstChild; let foundNode: Node = null; while (currentNode) { - if ((currentNode.start < offset && currentNode.end > offset) - || (includeNodeBoundary && (currentNode.start <= offset && currentNode.end >= offset))) { + const nodeStart: vscode.Position = currentNode.start; + const nodeEnd: vscode.Position = currentNode.end; + if ((nodeStart.isBefore(position) && nodeEnd.isAfter(position)) + || (includeNodeBoundary && (nodeStart.isBeforeOrEqual(position) && nodeEnd.isAfterOrEqual(position)))) { foundNode = currentNode; // Dig deeper @@ -110,14 +112,6 @@ export function getNode(root: Node, offset: number, includeNodeBoundary: boolean return foundNode; } -export function getNodeOuterSelection(document: vscode.TextDocument, node: Node): vscode.Selection { - return new vscode.Selection(document.positionAt(node.start), document.positionAt(node.end)); -} - -export function getNodeInnerSelection(document: vscode.TextDocument, node: Node): vscode.Selection { - return new vscode.Selection(document.positionAt(node.open.end), document.positionAt(node.close.start)); -} - export function extractAbbreviation(position: vscode.Position): [vscode.Range, string] { let editor = vscode.window.activeTextEditor; let currentLine = editor.document.lineAt(position.line).text; @@ -229,32 +223,32 @@ export function getNodesInBetween(node1: Node, node2: Node): Node[] { } // node2 is ancestor of node1 - if (node2.start < node1.start) { + if (node2.start.isBefore(node1.start)) { return [node2]; } // node1 is ancestor of node2 - if (node2.start < node1.end) { + if (node2.start.isBefore(node1.end)) { return [node1]; } // Get the highest ancestor of node1 that should be commented - while (node1.parent && node1.parent.end < node2.start) { + while (node1.parent && node1.parent.end.isBefore(node2.start)) { node1 = node1.parent; } // Get the highest ancestor of node2 that should be commented - while (node2.parent && node2.parent.start > node1.start) { + while (node2.parent && node2.parent.start.isAfter(node1.start)) { node2 = node2.parent; } return getNextSiblingsTillPosition(node1, node2.end); } -function getNextSiblingsTillPosition(node: Node, position: number): Node[] { +function getNextSiblingsTillPosition(node: Node, position: vscode.Position): Node[] { let siblings: Node[] = []; let currentNode = node; - while (currentNode && currentNode.start < position) { + while (currentNode && position.isAfter(currentNode.start)) { siblings.push(currentNode); currentNode = currentNode.nextSibling; } @@ -265,5 +259,5 @@ export function sameNodes(node1: Node, node2: Node): boolean { if (!node1 || !node2) { return false; } - return node1.start === node2.start && node1.end === node2.end; + return (node1.start).isEqual(node2.start) && (node1.end).isEqual(node2.end); } \ No newline at end of file From 720c49692f74285178902d9ef8f1db571f3cd92a Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 15 Jun 2017 18:42:08 +0200 Subject: [PATCH 1903/2747] #28538 Simplify workspace configuration service api --- .../browser/standalone/simpleServices.ts | 6 ++++- .../configuration/common/configuration.ts | 5 ++++ .../node/configurationService.ts | 6 ++++- .../test/common/testConfigurationService.ts | 6 ++++- .../electron-browser/telemetryService.test.ts | 1 + src/vs/workbench/api/node/extHost.protocol.ts | 6 ++--- .../api/node/extHostConfiguration.ts | 10 +++---- .../terminalConfigHelper.test.ts | 1 + .../configuration/common/configuration.ts | 26 +------------------ .../configuration/node/configuration.ts | 6 ++--- .../node/configurationResolverService.test.ts | 1 + .../api/extHostConfiguration.test.ts | 6 ++--- 12 files changed, 38 insertions(+), 42 deletions(-) diff --git a/src/vs/editor/browser/standalone/simpleServices.ts b/src/vs/editor/browser/standalone/simpleServices.ts index 92970b62b40ae..97d0459cc8cd3 100644 --- a/src/vs/editor/browser/standalone/simpleServices.ts +++ b/src/vs/editor/browser/standalone/simpleServices.ts @@ -8,7 +8,7 @@ import { Schemas } from 'vs/base/common/network'; import Severity from 'vs/base/common/severity'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, getConfigurationValue, IConfigurationKeys } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, getConfigurationValue, IConfigurationKeys, IConfigurationValues } from 'vs/platform/configuration/common/configuration'; import { IEditor, IEditorInput, IEditorOptions, IEditorService, IResourceInput, Position } from 'vs/platform/editor/common/editor'; import { ICommandService, ICommand, ICommandEvent, ICommandHandler, CommandsRegistry } from 'vs/platform/commands/common/commands'; import { AbstractKeybindingService } from 'vs/platform/keybinding/common/abstractKeybindingService'; @@ -458,6 +458,10 @@ export class SimpleConfigurationService implements IConfigurationService { public keys(): IConfigurationKeys { return { default: [], user: [], workspace: [] }; } + + public values(): IConfigurationValues { + return {}; + } } export class SimpleMenuService implements IMenuService { diff --git a/src/vs/platform/configuration/common/configuration.ts b/src/vs/platform/configuration/common/configuration.ts index 988c167e791b2..018e7339ab74b 100644 --- a/src/vs/platform/configuration/common/configuration.ts +++ b/src/vs/platform/configuration/common/configuration.ts @@ -54,6 +54,11 @@ export interface IConfigurationService { * Event that fires when the configuration changes. */ onDidUpdateConfiguration: Event; + + /** + * Returns the defined values of configurations in the different scopes. + */ + values(): IConfigurationValues; } export enum ConfigurationSource { diff --git a/src/vs/platform/configuration/node/configurationService.ts b/src/vs/platform/configuration/node/configurationService.ts index c89737df2a23e..a241cc876a35d 100644 --- a/src/vs/platform/configuration/node/configurationService.ts +++ b/src/vs/platform/configuration/node/configurationService.ts @@ -9,7 +9,7 @@ import { ConfigWatcher } from 'vs/base/node/config'; import { Registry } from 'vs/platform/platform'; import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; import { IDisposable, toDisposable, Disposable } from 'vs/base/common/lifecycle'; -import { ConfigurationSource, IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, IConfigurationKeys, ConfigurationModel, IConfigurationOptions, Configuration } from 'vs/platform/configuration/common/configuration'; +import { ConfigurationSource, IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, IConfigurationKeys, ConfigurationModel, IConfigurationOptions, Configuration, IConfigurationValues } from 'vs/platform/configuration/common/configuration'; import { CustomConfigurationModel, DefaultConfigurationModel } from 'vs/platform/configuration/common/model'; import Event, { Emitter } from 'vs/base/common/event'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -77,6 +77,10 @@ export class ConfigurationService extends Disposable implements IConfiguratio return this.getConfiguration2().keys(); } + public values(): IConfigurationValues { + return this._configuration.values(); + } + public getConfiguration2(): Configuration { return this._configuration || (this._configuration = this.consolidateConfigurations()); } diff --git a/src/vs/platform/configuration/test/common/testConfigurationService.ts b/src/vs/platform/configuration/test/common/testConfigurationService.ts index 06be8aa2346b5..7d493764ef230 100644 --- a/src/vs/platform/configuration/test/common/testConfigurationService.ts +++ b/src/vs/platform/configuration/test/common/testConfigurationService.ts @@ -8,7 +8,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { EventEmitter } from 'vs/base/common/eventEmitter'; import { getConfigurationKeys } from 'vs/platform/configuration/common/model'; -import { IConfigurationService, getConfigurationValue, IConfigurationValue, IConfigurationKeys } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationService, getConfigurationValue, IConfigurationValue, IConfigurationKeys, IConfigurationValues } from 'vs/platform/configuration/common/configuration'; export class TestConfigurationService extends EventEmitter implements IConfigurationService { public _serviceBrand: any; @@ -48,4 +48,8 @@ export class TestConfigurationService extends EventEmitter implements IConfigura workspace: [] }; } + + public values(): IConfigurationValues { + return {}; + } } diff --git a/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts b/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts index 814428897c6a4..478619bb5992a 100644 --- a/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts +++ b/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts @@ -693,6 +693,7 @@ suite('TelemetryService', () => { }; }, keys() { return { default: [], user: [], workspace: [] }; }, + values() { return {}; }, onDidUpdateConfiguration: emitter.event }); diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index 9cb2b395ee614..bed2bbb9b76a0 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -30,7 +30,7 @@ import { IResourceEdit } from 'vs/editor/common/services/bulkEdit'; import { ITextSource } from 'vs/editor/common/model/textSource'; import { ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; -import { IWorkspaceConfigurationValues } from 'vs/workbench/services/configuration/common/configuration'; +import { IConfigurationValues } from 'vs/platform/configuration/common/configuration'; import { IPickOpenEntry, IPickOptions } from 'vs/platform/quickOpen/common/quickOpen'; import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; @@ -67,7 +67,7 @@ export interface IInitData { environment: IEnvironment; workspace: IWorkspaceData; extensions: IExtensionDescription[]; - configuration: IWorkspaceConfigurationValues; + configuration: IConfigurationValues; telemetryInfo: ITelemetryInfo; } @@ -349,7 +349,7 @@ export abstract class ExtHostCommandsShape { } export abstract class ExtHostConfigurationShape { - $acceptConfigurationChanged(values: IWorkspaceConfigurationValues) { throw ni(); } + $acceptConfigurationChanged(values: IConfigurationValues) { throw ni(); } } export abstract class ExtHostDiagnosticsShape { diff --git a/src/vs/workbench/api/node/extHostConfiguration.ts b/src/vs/workbench/api/node/extHostConfiguration.ts index 84b4d218335dc..3147509dde812 100644 --- a/src/vs/workbench/api/node/extHostConfiguration.ts +++ b/src/vs/workbench/api/node/extHostConfiguration.ts @@ -8,8 +8,8 @@ import { mixin } from 'vs/base/common/objects'; import Event, { Emitter } from 'vs/base/common/event'; import { WorkspaceConfiguration } from 'vscode'; import { ExtHostConfigurationShape, MainThreadConfigurationShape } from './extHost.protocol'; +import { IConfigurationValues } from 'vs/platform/configuration/common/configuration'; import { ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; -import { IWorkspaceConfigurationValues } from 'vs/workbench/services/configuration/common/configuration'; import { toValuesTree } from 'vs/platform/configuration/common/model'; function lookUp(tree: any, key: string) { @@ -24,11 +24,11 @@ function lookUp(tree: any, key: string) { } interface UsefulConfiguration { - data: IWorkspaceConfigurationValues; + data: IConfigurationValues; valueTree: any; } -function createUsefulConfiguration(data: IWorkspaceConfigurationValues): { data: IWorkspaceConfigurationValues, valueTree: any } { +function createUsefulConfiguration(data: IConfigurationValues): { data: IConfigurationValues, valueTree: any } { const valueMap: { [key: string]: any } = Object.create(null); for (let key in data) { if (Object.prototype.hasOwnProperty.call(data, key)) { @@ -48,7 +48,7 @@ export class ExtHostConfiguration extends ExtHostConfigurationShape { private _proxy: MainThreadConfigurationShape; private _configuration: UsefulConfiguration; - constructor(proxy: MainThreadConfigurationShape, data: IWorkspaceConfigurationValues) { + constructor(proxy: MainThreadConfigurationShape, data: IConfigurationValues) { super(); this._proxy = proxy; this._configuration = createUsefulConfiguration(data); @@ -58,7 +58,7 @@ export class ExtHostConfiguration extends ExtHostConfigurationShape { return this._onDidChangeConfiguration && this._onDidChangeConfiguration.event; } - public $acceptConfigurationChanged(data: IWorkspaceConfigurationValues) { + public $acceptConfigurationChanged(data: IConfigurationValues) { this._configuration = createUsefulConfiguration(data); this._onDidChangeConfiguration.fire(undefined); } diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts index 80da83ff48995..5c9074356793c 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts @@ -20,6 +20,7 @@ class MockConfigurationService implements IConfigurationService { public reloadConfiguration(section?: string): TPromise { return TPromise.as(this.getConfiguration()); } public lookup(key: string) { return { value: getConfigurationValue(this.getConfiguration(), key), default: getConfigurationValue(this.getConfiguration(), key), user: getConfigurationValue(this.getConfiguration(), key), workspace: void 0 }; } public keys() { return { default: [], user: [], workspace: [] }; } + public values() { return {}; } public getConfiguration(): any { return this.configuration; } public onDidUpdateConfiguration() { return { dispose() { } }; } } diff --git a/src/vs/workbench/services/configuration/common/configuration.ts b/src/vs/workbench/services/configuration/common/configuration.ts index 0038822ee9020..c38ff73b6d6ce 100644 --- a/src/vs/workbench/services/configuration/common/configuration.ts +++ b/src/vs/workbench/services/configuration/common/configuration.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IConfigurationService, IConfigurationValue, IConfigurationKeys } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; export const CONFIG_DEFAULT_NAME = 'settings'; @@ -12,8 +12,6 @@ export const WORKSPACE_CONFIG_DEFAULT_PATH = `${WORKSPACE_CONFIG_FOLDER_DEFAULT_ export const IWorkspaceConfigurationService = createDecorator('configurationService'); -export type IWorkspaceConfigurationValues = { [key: string]: IWorkspaceConfigurationValue }; - export interface IWorkspaceConfigurationService extends IConfigurationService { /** @@ -21,28 +19,6 @@ export interface IWorkspaceConfigurationService extends IConfigurationService { */ getUnsupportedWorkspaceKeys(): string[]; - /** - * Override for the IConfigurationService#lookup() method that adds information about workspace settings. - */ - lookup(key: string): IWorkspaceConfigurationValue; - - /** - * Override for the IConfigurationService#keys() method that adds information about workspace settings. - */ - keys(): IWorkspaceConfigurationKeys; - - /** - * Returns the defined values of configurations in the different scopes. - */ - values(): IWorkspaceConfigurationValues; -} - -export interface IWorkspaceConfigurationValue extends IConfigurationValue { - workspace: T; -} - -export interface IWorkspaceConfigurationKeys extends IConfigurationKeys { - workspace: string[]; } export const WORKSPACE_STANDALONE_CONFIGURATIONS = { diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index 03d8207072766..d165e84b81f53 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -24,8 +24,8 @@ import { isLinux } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { CustomConfigurationModel } from 'vs/platform/configuration/common/model'; import { ScopedConfigurationModel, FolderConfigurationModel, FolderSettingsModel } from 'vs/workbench/services/configuration/common/configurationModels'; -import { IConfigurationServiceEvent, ConfigurationSource, IConfigurationKeys, IConfigurationValue, ConfigurationModel, IConfigurationOptions, Configuration as BaseConfiguration } from 'vs/platform/configuration/common/configuration'; -import { IWorkspaceConfigurationService, WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME, WORKSPACE_STANDALONE_CONFIGURATIONS, WORKSPACE_CONFIG_DEFAULT_PATH, IWorkspaceConfigurationValues } from 'vs/workbench/services/configuration/common/configuration'; +import { IConfigurationServiceEvent, ConfigurationSource, IConfigurationKeys, IConfigurationValue, ConfigurationModel, IConfigurationOptions, Configuration as BaseConfiguration, IConfigurationValues } from 'vs/platform/configuration/common/configuration'; +import { IWorkspaceConfigurationService, WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME, WORKSPACE_STANDALONE_CONFIGURATIONS, WORKSPACE_CONFIG_DEFAULT_PATH } from 'vs/workbench/services/configuration/common/configuration'; import { ConfigurationService as GlobalConfigurationService } from 'vs/platform/configuration/node/configurationService'; import { createHash } from "crypto"; import { basename } from "path"; @@ -211,7 +211,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp return this._configuration.keys(); } - public values(): IWorkspaceConfigurationValues { + public values(): IConfigurationValues { return this._configuration.values(); } diff --git a/src/vs/workbench/services/configurationResolver/test/node/configurationResolverService.test.ts b/src/vs/workbench/services/configurationResolver/test/node/configurationResolverService.test.ts index df5b6f68b63fa..dfc7ac05d9a6a 100644 --- a/src/vs/workbench/services/configurationResolver/test/node/configurationResolverService.test.ts +++ b/src/vs/workbench/services/configurationResolver/test/node/configurationResolverService.test.ts @@ -342,6 +342,7 @@ class MockConfigurationService implements IConfigurationService { public reloadConfiguration(section?: string): TPromise { return TPromise.as(this.getConfiguration()); } public lookup(key: string) { return { value: getConfigurationValue(this.getConfiguration(), key), default: getConfigurationValue(this.getConfiguration(), key), user: getConfigurationValue(this.getConfiguration(), key), workspace: void 0 }; } public keys() { return { default: [], user: [], workspace: [] }; } + public values() { return {}; } public getConfiguration(): any { return this.configuration; } public onDidUpdateConfiguration() { return { dispose() { } }; } } diff --git a/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts b/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts index ff48c39246677..d449d5627aded 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts @@ -10,7 +10,7 @@ import { ExtHostConfiguration } from 'vs/workbench/api/node/extHostConfiguration import { MainThreadConfigurationShape } from 'vs/workbench/api/node/extHost.protocol'; import { TPromise } from 'vs/base/common/winjs.base'; import { ConfigurationTarget, ConfigurationEditingErrorCode, IConfigurationEditingError } from 'vs/workbench/services/configuration/common/configurationEditing'; -import { IWorkspaceConfigurationValues, IWorkspaceConfigurationValue } from 'vs/workbench/services/configuration/common/configuration'; +import { IConfigurationValues, IConfigurationValue } from 'vs/platform/configuration/common/configuration'; suite('ExtHostConfiguration', function () { @@ -22,14 +22,14 @@ suite('ExtHostConfiguration', function () { } }; - function createExtHostConfiguration(data: IWorkspaceConfigurationValues = Object.create(null), shape?: MainThreadConfigurationShape) { + function createExtHostConfiguration(data: IConfigurationValues = Object.create(null), shape?: MainThreadConfigurationShape) { if (!shape) { shape = new class extends MainThreadConfigurationShape { }; } return new ExtHostConfiguration(shape, data); } - function createConfigurationValue(value: T): IWorkspaceConfigurationValue { + function createConfigurationValue(value: T): IConfigurationValue { return { value, default: value, From 4f888ef65d7078577d3d4c15a6818492dcdcd2bf Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 15 Jun 2017 19:20:51 +0200 Subject: [PATCH 1904/2747] #28538 Expose Configuration Data through Configuration service --- .../browser/standalone/simpleServices.ts | 6 +- .../configuration/common/configuration.ts | 56 ++++++++++++++++++- .../node/configurationService.ts | 18 +++--- .../test/common/testConfigurationService.ts | 6 +- .../electron-browser/telemetryService.test.ts | 3 + .../terminalConfigHelper.test.ts | 1 + .../configuration/node/configuration.ts | 14 ++--- .../node/configurationResolverService.test.ts | 1 + 8 files changed, 85 insertions(+), 20 deletions(-) diff --git a/src/vs/editor/browser/standalone/simpleServices.ts b/src/vs/editor/browser/standalone/simpleServices.ts index 97d0459cc8cd3..990e6cf210958 100644 --- a/src/vs/editor/browser/standalone/simpleServices.ts +++ b/src/vs/editor/browser/standalone/simpleServices.ts @@ -8,7 +8,7 @@ import { Schemas } from 'vs/base/common/network'; import Severity from 'vs/base/common/severity'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, getConfigurationValue, IConfigurationKeys, IConfigurationValues } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, getConfigurationValue, IConfigurationKeys, IConfigurationValues, ConfigurationData, ConfigurationModel } from 'vs/platform/configuration/common/configuration'; import { IEditor, IEditorInput, IEditorOptions, IEditorService, IResourceInput, Position } from 'vs/platform/editor/common/editor'; import { ICommandService, ICommand, ICommandEvent, ICommandHandler, CommandsRegistry } from 'vs/platform/commands/common/commands'; import { AbstractKeybindingService } from 'vs/platform/keybinding/common/abstractKeybindingService'; @@ -442,6 +442,10 @@ export class SimpleConfigurationService implements IConfigurationService { return this._config; } + public getConfigurationData(): ConfigurationData { + return new ConfigurationData(new ConfigurationModel(this._config), new ConfigurationModel()); + } + public reloadConfiguration(section?: string): TPromise { return TPromise.as(this.getConfiguration(section)); } diff --git a/src/vs/platform/configuration/common/configuration.ts b/src/vs/platform/configuration/common/configuration.ts index 018e7339ab74b..4aee67a609108 100644 --- a/src/vs/platform/configuration/common/configuration.ts +++ b/src/vs/platform/configuration/common/configuration.ts @@ -25,6 +25,8 @@ export type IConfigurationValues = { [key: string]: IConfigurationValue }; export interface IConfigurationService { _serviceBrand: any; + getConfigurationData(): ConfigurationData; + /** * Fetches the appropriate section of the configuration JSON file. * This will be an object keyed off the section name. @@ -126,12 +128,17 @@ export function merge(base: any, add: any, overwrite: boolean): void { }); } +export interface IConfiguraionModel { + contents: T; + overrides: IOverrides[]; +} + export interface IOverrides { contents: T; identifiers: string[]; } -export class ConfigurationModel { +export class ConfigurationModel implements IConfiguraionModel { protected _keys: string[] = []; @@ -142,6 +149,10 @@ export class ConfigurationModel { return this._contents; } + public get overrides(): IOverrides[] { + return this._overrides; + } + public get keys(): string[] { return this._keys; } @@ -186,7 +197,14 @@ export class ConfigurationModel { } } -export class Configuration { +export interface IConfigurationData { + defaults: IConfiguraionModel; + user: IConfiguraionModel; + folders: { [folder: string]: IConfiguraionModel }; + workspaceUri: string; +} + +export class ConfigurationData { private _global: ConfigurationModel; private _workspace: ConfigurationModel; @@ -284,4 +302,38 @@ export class Configuration { let configurationModel = (options.resource ? this._foldersConsolidated.get(options.resource) : this._workspace) || new ConfigurationModel(); return options.overrideIdentifier ? configurationModel.override(options.overrideIdentifier) : configurationModel; } + + public toJSON(): IConfigurationData { + return { + defaults: { + contents: this._defaults.contents, + overrides: this._defaults.overrides + }, + user: { + contents: this._user.contents, + overrides: this._user.overrides + }, + folders: this.folders.keys().reduce((result, folder) => { + const { contents, overrides } = this.folders.get(folder); + result[folder.toString()] = { contents, overrides }; + return result; + }, Object.create({})), + workspaceUri: this.workspaceUri.toString() + }; + } + + public static parse(data: IConfigurationData): ConfigurationData { + const defaults = ConfigurationData.parseConfigurationModel(data.defaults); + const user = ConfigurationData.parseConfigurationModel(data.user); + const folders: StrictResourceMap> = Object.keys(data.folders).reduce((result, key) => { + result.set(URI.parse(key), ConfigurationData.parseConfigurationModel(data.folders[key])); + return result; + }, new StrictResourceMap>()); + const workspaceUri = data.workspaceUri ? URI.parse(data.workspaceUri) : void 0; + return new ConfigurationData(defaults, user, folders, workspaceUri); + } + + private static parseConfigurationModel(model: IConfiguraionModel): ConfigurationModel { + return new ConfigurationModel(model.contents, model.overrides); + } } \ No newline at end of file diff --git a/src/vs/platform/configuration/node/configurationService.ts b/src/vs/platform/configuration/node/configurationService.ts index a241cc876a35d..f5775b842c12d 100644 --- a/src/vs/platform/configuration/node/configurationService.ts +++ b/src/vs/platform/configuration/node/configurationService.ts @@ -9,7 +9,7 @@ import { ConfigWatcher } from 'vs/base/node/config'; import { Registry } from 'vs/platform/platform'; import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; import { IDisposable, toDisposable, Disposable } from 'vs/base/common/lifecycle'; -import { ConfigurationSource, IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, IConfigurationKeys, ConfigurationModel, IConfigurationOptions, Configuration, IConfigurationValues } from 'vs/platform/configuration/common/configuration'; +import { ConfigurationSource, IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, IConfigurationKeys, ConfigurationModel, IConfigurationOptions, ConfigurationData, IConfigurationValues } from 'vs/platform/configuration/common/configuration'; import { CustomConfigurationModel, DefaultConfigurationModel } from 'vs/platform/configuration/common/model'; import Event, { Emitter } from 'vs/base/common/event'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -18,7 +18,7 @@ export class ConfigurationService extends Disposable implements IConfiguratio _serviceBrand: any; - private _configuration: Configuration; + private _configuration: ConfigurationData; private userConfigModelWatcher: ConfigWatcher>; private _onDidUpdateConfiguration: Emitter = this._register(new Emitter()); @@ -46,7 +46,7 @@ export class ConfigurationService extends Disposable implements IConfiguratio private onConfigurationChange(source: ConfigurationSource): void { this.reset(); // reset our caches - const cache = this.getConfiguration2(); + const cache = this.getConfigurationData(); this._onDidUpdateConfiguration.fire({ source, @@ -66,22 +66,22 @@ export class ConfigurationService extends Disposable implements IConfiguratio public getConfiguration(section?: string): C public getConfiguration(options?: IConfigurationOptions): C public getConfiguration(arg?: any): C { - return this.getConfiguration2().getValue(this.toOptions(arg)); + return this.getConfigurationData().getValue(this.toOptions(arg)); } public lookup(key: string, overrideIdentifier?: string): IConfigurationValue { - return this.getConfiguration2().lookup(key, overrideIdentifier); + return this.getConfigurationData().lookup(key, overrideIdentifier); } public keys(): IConfigurationKeys { - return this.getConfiguration2().keys(); + return this.getConfigurationData().keys(); } public values(): IConfigurationValues { return this._configuration.values(); } - public getConfiguration2(): Configuration { + public getConfigurationData(): ConfigurationData { return this._configuration || (this._configuration = this.consolidateConfigurations()); } @@ -99,9 +99,9 @@ export class ConfigurationService extends Disposable implements IConfiguratio return {}; } - private consolidateConfigurations(): Configuration { + private consolidateConfigurations(): ConfigurationData { const defaults = new DefaultConfigurationModel(); const user = this.userConfigModelWatcher.getConfig(); - return new Configuration(defaults, user); + return new ConfigurationData(defaults, user); } } \ No newline at end of file diff --git a/src/vs/platform/configuration/test/common/testConfigurationService.ts b/src/vs/platform/configuration/test/common/testConfigurationService.ts index 7d493764ef230..91823b939bff3 100644 --- a/src/vs/platform/configuration/test/common/testConfigurationService.ts +++ b/src/vs/platform/configuration/test/common/testConfigurationService.ts @@ -8,7 +8,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { EventEmitter } from 'vs/base/common/eventEmitter'; import { getConfigurationKeys } from 'vs/platform/configuration/common/model'; -import { IConfigurationService, getConfigurationValue, IConfigurationValue, IConfigurationKeys, IConfigurationValues } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationService, getConfigurationValue, IConfigurationValue, IConfigurationKeys, IConfigurationValues, ConfigurationData, ConfigurationModel } from 'vs/platform/configuration/common/configuration'; export class TestConfigurationService extends EventEmitter implements IConfigurationService { public _serviceBrand: any; @@ -23,6 +23,10 @@ export class TestConfigurationService extends EventEmitter implements IConfigura return this.configuration; } + public getConfigurationData(): ConfigurationData { + return new ConfigurationData(new ConfigurationModel(), new ConfigurationModel(this.configuration)); + } + public setUserConfiguration(key: any, value: any): Thenable { this.configuration[key] = value; return TPromise.as(null); diff --git a/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts b/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts index 478619bb5992a..b80b748e9d1a6 100644 --- a/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts +++ b/src/vs/platform/telemetry/test/electron-browser/telemetryService.test.ts @@ -681,6 +681,9 @@ suite('TelemetryService', () => { enableTelemetry }; }, + getConfigurationData(): any { + return null; + }, reloadConfiguration() { return TPromise.as(this.getConfiguration()); }, diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts index 5c9074356793c..71e80be84f039 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts @@ -22,6 +22,7 @@ class MockConfigurationService implements IConfigurationService { public keys() { return { default: [], user: [], workspace: [] }; } public values() { return {}; } public getConfiguration(): any { return this.configuration; } + public getConfigurationData(): any { return null; } public onDidUpdateConfiguration() { return { dispose() { } }; } } diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index d165e84b81f53..367c9ae2c2462 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -24,7 +24,7 @@ import { isLinux } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { CustomConfigurationModel } from 'vs/platform/configuration/common/model'; import { ScopedConfigurationModel, FolderConfigurationModel, FolderSettingsModel } from 'vs/workbench/services/configuration/common/configurationModels'; -import { IConfigurationServiceEvent, ConfigurationSource, IConfigurationKeys, IConfigurationValue, ConfigurationModel, IConfigurationOptions, Configuration as BaseConfiguration, IConfigurationValues } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationServiceEvent, ConfigurationSource, IConfigurationKeys, IConfigurationValue, ConfigurationModel, IConfigurationOptions, ConfigurationData, IConfigurationValues } from 'vs/platform/configuration/common/configuration'; import { IWorkspaceConfigurationService, WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME, WORKSPACE_STANDALONE_CONFIGURATIONS, WORKSPACE_CONFIG_DEFAULT_PATH } from 'vs/workbench/services/configuration/common/configuration'; import { ConfigurationService as GlobalConfigurationService } from 'vs/platform/configuration/node/configurationService'; import { createHash } from "crypto"; @@ -193,7 +193,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp return this.workspace ? this.legacyWorkspace.toResource(workspaceRelativePath) : null; } - public get configuration(): BaseConfiguration { + public getConfigurationData(): ConfigurationData { return this._configuration; } @@ -275,7 +275,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private initCaches(): void { this.cachedFolderConfigs = new StrictResourceMap>(); - this._configuration = new Configuration(this.baseConfigurationService.getConfiguration2(), new StrictResourceMap>(), this.workspaceUri); + this._configuration = new Configuration(this.baseConfigurationService.getConfigurationData(), new StrictResourceMap>(), this.workspaceUri); this.initCachesForFolders(this.workspace ? this.workspace.roots : []); } @@ -298,7 +298,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } } - if (this._configuration.updateBaseConfiguration(this.baseConfigurationService.getConfiguration2())) { + if (this._configuration.updateBaseConfiguration(this.baseConfigurationService.getConfigurationData())) { this.trigger(event.source, event.sourceConfig); } } @@ -517,13 +517,13 @@ function resolveStat(resource: URI): TPromise { }); } -class Configuration extends BaseConfiguration { +class Configuration extends ConfigurationData { - constructor(private _baseConfiguration: BaseConfiguration, protected folders: StrictResourceMap>, workspaceUri: URI) { + constructor(private _baseConfiguration: ConfigurationData, protected folders: StrictResourceMap>, workspaceUri: URI) { super(_baseConfiguration.defaults, _baseConfiguration.user, folders, workspaceUri); } - updateBaseConfiguration(baseConfiguration: BaseConfiguration): boolean { + updateBaseConfiguration(baseConfiguration: ConfigurationData): boolean { const current = new Configuration(this._baseConfiguration, this.folders, this.workspaceUri); this._defaults = baseConfiguration.defaults; diff --git a/src/vs/workbench/services/configurationResolver/test/node/configurationResolverService.test.ts b/src/vs/workbench/services/configurationResolver/test/node/configurationResolverService.test.ts index dfc7ac05d9a6a..39c416f2f1a06 100644 --- a/src/vs/workbench/services/configurationResolver/test/node/configurationResolverService.test.ts +++ b/src/vs/workbench/services/configurationResolver/test/node/configurationResolverService.test.ts @@ -344,6 +344,7 @@ class MockConfigurationService implements IConfigurationService { public keys() { return { default: [], user: [], workspace: [] }; } public values() { return {}; } public getConfiguration(): any { return this.configuration; } + public getConfigurationData(): any { return null; } public onDidUpdateConfiguration() { return { dispose() { } }; } } From b3191eecc16b2fcdc613ec00b23b2e2b7ee40880 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 15 Jun 2017 20:27:16 +0200 Subject: [PATCH 1905/2747] #28538 Prepare for sending configuration data to extension host --- .../browser/standalone/simpleServices.ts | 6 ++--- .../configuration/common/configuration.ts | 18 +++++++------- .../node/configurationService.ts | 24 +++++++++++-------- .../test/common/testConfigurationService.ts | 6 ++--- .../configuration/node/configuration.ts | 18 ++++++++------ 5 files changed, 40 insertions(+), 32 deletions(-) diff --git a/src/vs/editor/browser/standalone/simpleServices.ts b/src/vs/editor/browser/standalone/simpleServices.ts index 990e6cf210958..7365d6ccdb508 100644 --- a/src/vs/editor/browser/standalone/simpleServices.ts +++ b/src/vs/editor/browser/standalone/simpleServices.ts @@ -8,7 +8,7 @@ import { Schemas } from 'vs/base/common/network'; import Severity from 'vs/base/common/severity'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; -import { IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, getConfigurationValue, IConfigurationKeys, IConfigurationValues, ConfigurationData, ConfigurationModel } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, getConfigurationValue, IConfigurationKeys, IConfigurationValues, Configuration, IConfigurationData, ConfigurationModel } from 'vs/platform/configuration/common/configuration'; import { IEditor, IEditorInput, IEditorOptions, IEditorService, IResourceInput, Position } from 'vs/platform/editor/common/editor'; import { ICommandService, ICommand, ICommandEvent, ICommandHandler, CommandsRegistry } from 'vs/platform/commands/common/commands'; import { AbstractKeybindingService } from 'vs/platform/keybinding/common/abstractKeybindingService'; @@ -442,8 +442,8 @@ export class SimpleConfigurationService implements IConfigurationService { return this._config; } - public getConfigurationData(): ConfigurationData { - return new ConfigurationData(new ConfigurationModel(this._config), new ConfigurationModel()); + public getConfigurationData(): IConfigurationData { + return new Configuration(new ConfigurationModel(this._config), new ConfigurationModel()).toData(); } public reloadConfiguration(section?: string): TPromise { diff --git a/src/vs/platform/configuration/common/configuration.ts b/src/vs/platform/configuration/common/configuration.ts index 4aee67a609108..35d4dd6762ecc 100644 --- a/src/vs/platform/configuration/common/configuration.ts +++ b/src/vs/platform/configuration/common/configuration.ts @@ -25,7 +25,7 @@ export type IConfigurationValues = { [key: string]: IConfigurationValue }; export interface IConfigurationService { _serviceBrand: any; - getConfigurationData(): ConfigurationData; + getConfigurationData(): IConfigurationData; /** * Fetches the appropriate section of the configuration JSON file. @@ -204,7 +204,7 @@ export interface IConfigurationData { workspaceUri: string; } -export class ConfigurationData { +export class Configuration { private _global: ConfigurationModel; private _workspace: ConfigurationModel; @@ -303,7 +303,7 @@ export class ConfigurationData { return options.overrideIdentifier ? configurationModel.override(options.overrideIdentifier) : configurationModel; } - public toJSON(): IConfigurationData { + public toData(): IConfigurationData { return { defaults: { contents: this._defaults.contents, @@ -318,19 +318,19 @@ export class ConfigurationData { result[folder.toString()] = { contents, overrides }; return result; }, Object.create({})), - workspaceUri: this.workspaceUri.toString() + workspaceUri: this.workspaceUri ? this.workspaceUri.toString() : void 0 }; } - public static parse(data: IConfigurationData): ConfigurationData { - const defaults = ConfigurationData.parseConfigurationModel(data.defaults); - const user = ConfigurationData.parseConfigurationModel(data.user); + public static parse(data: IConfigurationData): Configuration { + const defaults = Configuration.parseConfigurationModel(data.defaults); + const user = Configuration.parseConfigurationModel(data.user); const folders: StrictResourceMap> = Object.keys(data.folders).reduce((result, key) => { - result.set(URI.parse(key), ConfigurationData.parseConfigurationModel(data.folders[key])); + result.set(URI.parse(key), Configuration.parseConfigurationModel(data.folders[key])); return result; }, new StrictResourceMap>()); const workspaceUri = data.workspaceUri ? URI.parse(data.workspaceUri) : void 0; - return new ConfigurationData(defaults, user, folders, workspaceUri); + return new Configuration(defaults, user, folders, workspaceUri); } private static parseConfigurationModel(model: IConfiguraionModel): ConfigurationModel { diff --git a/src/vs/platform/configuration/node/configurationService.ts b/src/vs/platform/configuration/node/configurationService.ts index f5775b842c12d..d93ccf72d9114 100644 --- a/src/vs/platform/configuration/node/configurationService.ts +++ b/src/vs/platform/configuration/node/configurationService.ts @@ -9,7 +9,7 @@ import { ConfigWatcher } from 'vs/base/node/config'; import { Registry } from 'vs/platform/platform'; import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; import { IDisposable, toDisposable, Disposable } from 'vs/base/common/lifecycle'; -import { ConfigurationSource, IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, IConfigurationKeys, ConfigurationModel, IConfigurationOptions, ConfigurationData, IConfigurationValues } from 'vs/platform/configuration/common/configuration'; +import { ConfigurationSource, IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, IConfigurationKeys, ConfigurationModel, IConfigurationOptions, Configuration, IConfigurationValues, IConfigurationData } from 'vs/platform/configuration/common/configuration'; import { CustomConfigurationModel, DefaultConfigurationModel } from 'vs/platform/configuration/common/model'; import Event, { Emitter } from 'vs/base/common/event'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -18,7 +18,7 @@ export class ConfigurationService extends Disposable implements IConfiguratio _serviceBrand: any; - private _configuration: ConfigurationData; + private _configuration: Configuration; private userConfigModelWatcher: ConfigWatcher>; private _onDidUpdateConfiguration: Emitter = this._register(new Emitter()); @@ -43,10 +43,14 @@ export class ConfigurationService extends Disposable implements IConfiguratio this._register(Registry.as(Extensions.Configuration).onDidRegisterConfiguration(() => this.onConfigurationChange(ConfigurationSource.Default))); } + public get configuration(): Configuration { + return this._configuration || (this._configuration = this.consolidateConfigurations()); + } + private onConfigurationChange(source: ConfigurationSource): void { this.reset(); // reset our caches - const cache = this.getConfigurationData(); + const cache = this.configuration; this._onDidUpdateConfiguration.fire({ source, @@ -66,23 +70,23 @@ export class ConfigurationService extends Disposable implements IConfiguratio public getConfiguration(section?: string): C public getConfiguration(options?: IConfigurationOptions): C public getConfiguration(arg?: any): C { - return this.getConfigurationData().getValue(this.toOptions(arg)); + return this.configuration.getValue(this.toOptions(arg)); } public lookup(key: string, overrideIdentifier?: string): IConfigurationValue { - return this.getConfigurationData().lookup(key, overrideIdentifier); + return this.configuration.lookup(key, overrideIdentifier); } public keys(): IConfigurationKeys { - return this.getConfigurationData().keys(); + return this.configuration.keys(); } public values(): IConfigurationValues { return this._configuration.values(); } - public getConfigurationData(): ConfigurationData { - return this._configuration || (this._configuration = this.consolidateConfigurations()); + public getConfigurationData(): IConfigurationData { + return this.configuration.toData(); } private reset(): void { @@ -99,9 +103,9 @@ export class ConfigurationService extends Disposable implements IConfiguratio return {}; } - private consolidateConfigurations(): ConfigurationData { + private consolidateConfigurations(): Configuration { const defaults = new DefaultConfigurationModel(); const user = this.userConfigModelWatcher.getConfig(); - return new ConfigurationData(defaults, user); + return new Configuration(defaults, user); } } \ No newline at end of file diff --git a/src/vs/platform/configuration/test/common/testConfigurationService.ts b/src/vs/platform/configuration/test/common/testConfigurationService.ts index 91823b939bff3..31c5930599733 100644 --- a/src/vs/platform/configuration/test/common/testConfigurationService.ts +++ b/src/vs/platform/configuration/test/common/testConfigurationService.ts @@ -8,7 +8,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { EventEmitter } from 'vs/base/common/eventEmitter'; import { getConfigurationKeys } from 'vs/platform/configuration/common/model'; -import { IConfigurationService, getConfigurationValue, IConfigurationValue, IConfigurationKeys, IConfigurationValues, ConfigurationData, ConfigurationModel } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationService, getConfigurationValue, IConfigurationValue, IConfigurationKeys, IConfigurationValues, IConfigurationData, Configuration, ConfigurationModel } from 'vs/platform/configuration/common/configuration'; export class TestConfigurationService extends EventEmitter implements IConfigurationService { public _serviceBrand: any; @@ -23,8 +23,8 @@ export class TestConfigurationService extends EventEmitter implements IConfigura return this.configuration; } - public getConfigurationData(): ConfigurationData { - return new ConfigurationData(new ConfigurationModel(), new ConfigurationModel(this.configuration)); + public getConfigurationData(): IConfigurationData { + return new Configuration(new ConfigurationModel(), new ConfigurationModel(this.configuration)).toData(); } public setUserConfiguration(key: any, value: any): Thenable { diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index 367c9ae2c2462..dfd762bf30898 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -24,7 +24,7 @@ import { isLinux } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { CustomConfigurationModel } from 'vs/platform/configuration/common/model'; import { ScopedConfigurationModel, FolderConfigurationModel, FolderSettingsModel } from 'vs/workbench/services/configuration/common/configurationModels'; -import { IConfigurationServiceEvent, ConfigurationSource, IConfigurationKeys, IConfigurationValue, ConfigurationModel, IConfigurationOptions, ConfigurationData, IConfigurationValues } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationServiceEvent, ConfigurationSource, IConfigurationKeys, IConfigurationValue, ConfigurationModel, IConfigurationOptions, Configuration as BaseConfiguration, IConfigurationValues, IConfigurationData } from 'vs/platform/configuration/common/configuration'; import { IWorkspaceConfigurationService, WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME, WORKSPACE_STANDALONE_CONFIGURATIONS, WORKSPACE_CONFIG_DEFAULT_PATH } from 'vs/workbench/services/configuration/common/configuration'; import { ConfigurationService as GlobalConfigurationService } from 'vs/platform/configuration/node/configurationService'; import { createHash } from "crypto"; @@ -193,7 +193,11 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp return this.workspace ? this.legacyWorkspace.toResource(workspaceRelativePath) : null; } - public getConfigurationData(): ConfigurationData { + public getConfigurationData(): IConfigurationData { + return this._configuration.toData(); + } + + public get configuration(): BaseConfiguration { return this._configuration; } @@ -275,7 +279,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private initCaches(): void { this.cachedFolderConfigs = new StrictResourceMap>(); - this._configuration = new Configuration(this.baseConfigurationService.getConfigurationData(), new StrictResourceMap>(), this.workspaceUri); + this._configuration = new Configuration(this.baseConfigurationService.configuration, new StrictResourceMap>(), this.workspaceUri); this.initCachesForFolders(this.workspace ? this.workspace.roots : []); } @@ -298,7 +302,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } } - if (this._configuration.updateBaseConfiguration(this.baseConfigurationService.getConfigurationData())) { + if (this._configuration.updateBaseConfiguration(this.baseConfigurationService.configuration)) { this.trigger(event.source, event.sourceConfig); } } @@ -517,13 +521,13 @@ function resolveStat(resource: URI): TPromise { }); } -class Configuration extends ConfigurationData { +class Configuration extends BaseConfiguration { - constructor(private _baseConfiguration: ConfigurationData, protected folders: StrictResourceMap>, workspaceUri: URI) { + constructor(private _baseConfiguration: Configuration, protected folders: StrictResourceMap>, workspaceUri: URI) { super(_baseConfiguration.defaults, _baseConfiguration.user, folders, workspaceUri); } - updateBaseConfiguration(baseConfiguration: ConfigurationData): boolean { + updateBaseConfiguration(baseConfiguration: Configuration): boolean { const current = new Configuration(this._baseConfiguration, this.folders, this.workspaceUri); this._defaults = baseConfiguration.defaults; From c2d0d459cc8dca66f579a4663c08f30c311a80ca Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 15 Jun 2017 20:34:50 +0200 Subject: [PATCH 1906/2747] #27823 Fix tests --- .../configuration/node/configurationService.ts | 12 ++++++------ .../services/configuration/node/configuration.ts | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vs/platform/configuration/node/configurationService.ts b/src/vs/platform/configuration/node/configurationService.ts index d93ccf72d9114..a8f4443b4e3f6 100644 --- a/src/vs/platform/configuration/node/configurationService.ts +++ b/src/vs/platform/configuration/node/configurationService.ts @@ -43,14 +43,14 @@ export class ConfigurationService extends Disposable implements IConfiguratio this._register(Registry.as(Extensions.Configuration).onDidRegisterConfiguration(() => this.onConfigurationChange(ConfigurationSource.Default))); } - public get configuration(): Configuration { + public configuration(): Configuration { return this._configuration || (this._configuration = this.consolidateConfigurations()); } private onConfigurationChange(source: ConfigurationSource): void { this.reset(); // reset our caches - const cache = this.configuration; + const cache = this.configuration(); this._onDidUpdateConfiguration.fire({ source, @@ -70,15 +70,15 @@ export class ConfigurationService extends Disposable implements IConfiguratio public getConfiguration(section?: string): C public getConfiguration(options?: IConfigurationOptions): C public getConfiguration(arg?: any): C { - return this.configuration.getValue(this.toOptions(arg)); + return this.configuration().getValue(this.toOptions(arg)); } public lookup(key: string, overrideIdentifier?: string): IConfigurationValue { - return this.configuration.lookup(key, overrideIdentifier); + return this.configuration().lookup(key, overrideIdentifier); } public keys(): IConfigurationKeys { - return this.configuration.keys(); + return this.configuration().keys(); } public values(): IConfigurationValues { @@ -86,7 +86,7 @@ export class ConfigurationService extends Disposable implements IConfiguratio } public getConfigurationData(): IConfigurationData { - return this.configuration.toData(); + return this.configuration().toData(); } private reset(): void { diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index dfd762bf30898..2970fb389cd98 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -279,7 +279,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private initCaches(): void { this.cachedFolderConfigs = new StrictResourceMap>(); - this._configuration = new Configuration(this.baseConfigurationService.configuration, new StrictResourceMap>(), this.workspaceUri); + this._configuration = new Configuration(this.baseConfigurationService.configuration(), new StrictResourceMap>(), this.workspaceUri); this.initCachesForFolders(this.workspace ? this.workspace.roots : []); } @@ -302,7 +302,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } } - if (this._configuration.updateBaseConfiguration(this.baseConfigurationService.configuration)) { + if (this._configuration.updateBaseConfiguration(this.baseConfigurationService.configuration())) { this.trigger(event.source, event.sourceConfig); } } From 69fd57e4dc6613d430fe8b7012de70013c811a9b Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 15 Jun 2017 13:04:08 -0700 Subject: [PATCH 1907/2747] Add CSP To Root Document (#28670) * Add CSP To Root Document Adds a content security policy to the root vscode document. This limits what can be loaded. Important changes: * Connect-src is limited to `self` or `https:` * script-src is limited to `self` * object and child-src are limited to `self` * Media allows `self` `http` `https` and `data` * Add preload to gulp * Default to none * Don't use let in preload --- build/gulpfile.vscode.js | 3 +- .../electron-browser/bootstrap/index.html | 37 +----------------- .../electron-browser/bootstrap/preload.js | 39 +++++++++++++++++++ 3 files changed, 43 insertions(+), 36 deletions(-) create mode 100644 src/vs/workbench/electron-browser/bootstrap/preload.js diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 1af153e1e81c2..453b44df0667e 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -214,7 +214,8 @@ function packageTask(platform, arch, opts) { 'vs/workbench/electron-browser/workbench.main.js', 'vs/workbench/electron-browser/workbench.main.css', 'vs/workbench/electron-browser/bootstrap/index.html', - 'vs/workbench/electron-browser/bootstrap/index.js' + 'vs/workbench/electron-browser/bootstrap/index.js', + 'vs/workbench/electron-browser/bootstrap/preload.js' ]); const src = gulp.src(out + '/**', { base: '.' }) diff --git a/src/vs/workbench/electron-browser/bootstrap/index.html b/src/vs/workbench/electron-browser/bootstrap/index.html index 1474a70e097d7..29b73eae7c13f 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.html +++ b/src/vs/workbench/electron-browser/bootstrap/index.html @@ -3,43 +3,10 @@ + - + diff --git a/src/vs/workbench/electron-browser/bootstrap/preload.js b/src/vs/workbench/electron-browser/bootstrap/preload.js new file mode 100644 index 0000000000000..d451c2d5fb720 --- /dev/null +++ b/src/vs/workbench/electron-browser/bootstrap/preload.js @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +(function() { + function getConfig() { + const queryParams = window.location.search.substring(1).split('&'); + for (var i = 0; i < queryParams.length; i++) { + var kv = queryParams[i].split('='); + if (kv[0] === 'config' && kv[1]) { + return JSON.parse(decodeURIComponent(kv[1])); + } + } + return {}; + } + try { + const config = getConfig(); + const document = window.document; + + // sets the base theme class ('vs', 'vs-dark', 'hc-black') + const baseTheme = config.baseTheme || 'vs'; + document.body.className = 'monaco-shell ' + baseTheme; + + // adds a stylesheet with the backgrdound color + var backgroundColor = config.backgroundColor; + if (!backgroundColor) { + backgroundColor = baseTheme === 'hc-black' ? '#000000' : (baseTheme === 'vs' ? '#FFFFFF' : '#1E1E1E'); + } + const foregroundColor = baseTheme === 'hc-black' ? '#FFFFFF' : (baseTheme === 'vs' ? '#6C6C6C' : '#CCCCCC'); + const style = document.createElement('style'); + style.innerHTML = '.monaco-shell { background-color:' + backgroundColor + '; color:' + foregroundColor + '; }'; + document.head.appendChild(style); + + } catch (error) { + console.error(error); + } +})(); \ No newline at end of file From 00400d8fa6f221b418524566005c371615cff6d3 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 15 Jun 2017 22:13:53 +0200 Subject: [PATCH 1908/2747] #28538 API to get settings by override identifiers - language - resource --- .../services/editorWorkerServiceImpl.ts | 5 ++-- .../common/services/modelServiceImpl.ts | 2 +- .../configuration/common/configuration.ts | 16 ++++++------- .../node/configurationService.ts | 18 +++----------- .../browser/parts/editor/textDiffEditor.ts | 2 +- .../browser/parts/editor/textEditor.ts | 2 +- .../electron-browser/walkThroughPart.ts | 2 +- .../configuration/node/configuration.ts | 24 +++++-------------- .../keybinding/common/keybindingEditing.ts | 2 +- 9 files changed, 23 insertions(+), 50 deletions(-) diff --git a/src/vs/editor/common/services/editorWorkerServiceImpl.ts b/src/vs/editor/common/services/editorWorkerServiceImpl.ts index 77afcaec5dee7..aac6b88d9ff8d 100644 --- a/src/vs/editor/common/services/editorWorkerServiceImpl.ts +++ b/src/vs/editor/common/services/editorWorkerServiceImpl.ts @@ -17,7 +17,7 @@ import { IEditorWorkerService } from 'vs/editor/common/services/editorWorkerServ import { IModelService } from 'vs/editor/common/services/modelService'; import { EditorSimpleWorkerImpl } from 'vs/editor/common/services/editorSimpleWorker'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; -import { IConfigurationService, IConfigurationOptions } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IEditorOptions } from 'vs/editor/common/config/editorOptions'; import { IRange } from 'vs/editor/common/core/range'; import { IModeService } from 'vs/editor/common/services/modeService'; @@ -93,8 +93,7 @@ class WordBasedCompletionItemProvider implements modes.ISuggestSupport { provideCompletionItems(model: editorCommon.IModel, position: Position): TPromise { const { language } = this._modeService.getLanguageIdentifier(model.getLanguageIdAtPosition(position.lineNumber, position.column)); - const options = { section: 'editor', overrideIdentifier: language }; - const { wordBasedSuggestions } = this._configurationService.getConfiguration(options); + const { wordBasedSuggestions } = this._configurationService.getConfiguration('editor', { language }); if (!wordBasedSuggestions) { return undefined; } diff --git a/src/vs/editor/common/services/modelServiceImpl.ts b/src/vs/editor/common/services/modelServiceImpl.ts index 5bcb68eba4bab..da1b0a8207ee8 100644 --- a/src/vs/editor/common/services/modelServiceImpl.ts +++ b/src/vs/editor/common/services/modelServiceImpl.ts @@ -267,7 +267,7 @@ export class ModelServiceImpl implements IModelService { public getCreationOptions(language: string): editorCommon.ITextModelCreationOptions { let creationOptions = this._modelCreationOptionsByLanguage[language]; if (!creationOptions) { - creationOptions = ModelServiceImpl._readModelOptions(this._configurationService.getConfiguration({ overrideIdentifier: language })); + creationOptions = ModelServiceImpl._readModelOptions(this._configurationService.getConfiguration(null, { language })); this._modelCreationOptionsByLanguage[language] = creationOptions; } return creationOptions; diff --git a/src/vs/platform/configuration/common/configuration.ts b/src/vs/platform/configuration/common/configuration.ts index 35d4dd6762ecc..ac8016e30ab63 100644 --- a/src/vs/platform/configuration/common/configuration.ts +++ b/src/vs/platform/configuration/common/configuration.ts @@ -14,10 +14,9 @@ import Event from 'vs/base/common/event'; export const IConfigurationService = createDecorator('configurationService'); -export interface IConfigurationOptions { - overrideIdentifier?: string; +export interface IConfigurationOverrides { + language?: string; resource?: URI; - section?: string; } export type IConfigurationValues = { [key: string]: IConfigurationValue }; @@ -31,8 +30,7 @@ export interface IConfigurationService { * Fetches the appropriate section of the configuration JSON file. * This will be an object keyed off the section name. */ - getConfiguration(section?: string): T; - getConfiguration(options?: IConfigurationOptions): T; + getConfiguration(section?: string, overrides?: IConfigurationOverrides): T; /** * Resolves a configuration key to its values in the different scopes @@ -243,9 +241,9 @@ export class Configuration { } } - getValue(options: IConfigurationOptions = {}): C { + getValue(section: string = '', options: IConfigurationOverrides = {}): C { const configModel = this.getConfigurationModel(options); - return options.section ? configModel.getContentsFor(options.section) : configModel.contents; + return section ? configModel.getContentsFor(section) : configModel.contents; } lookup(key: string, overrideIdentifier?: string): IConfigurationValue { @@ -298,9 +296,9 @@ export class Configuration { return result; } - private getConfigurationModel(options: IConfigurationOptions): ConfigurationModel { + private getConfigurationModel(options: IConfigurationOverrides): ConfigurationModel { let configurationModel = (options.resource ? this._foldersConsolidated.get(options.resource) : this._workspace) || new ConfigurationModel(); - return options.overrideIdentifier ? configurationModel.override(options.overrideIdentifier) : configurationModel; + return options.language ? configurationModel.override(options.language) : configurationModel; } public toData(): IConfigurationData { diff --git a/src/vs/platform/configuration/node/configurationService.ts b/src/vs/platform/configuration/node/configurationService.ts index a8f4443b4e3f6..a0060b1759a15 100644 --- a/src/vs/platform/configuration/node/configurationService.ts +++ b/src/vs/platform/configuration/node/configurationService.ts @@ -9,7 +9,7 @@ import { ConfigWatcher } from 'vs/base/node/config'; import { Registry } from 'vs/platform/platform'; import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; import { IDisposable, toDisposable, Disposable } from 'vs/base/common/lifecycle'; -import { ConfigurationSource, IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, IConfigurationKeys, ConfigurationModel, IConfigurationOptions, Configuration, IConfigurationValues, IConfigurationData } from 'vs/platform/configuration/common/configuration'; +import { ConfigurationSource, IConfigurationService, IConfigurationServiceEvent, IConfigurationValue, IConfigurationKeys, ConfigurationModel, IConfigurationOverrides, Configuration, IConfigurationValues, IConfigurationData } from 'vs/platform/configuration/common/configuration'; import { CustomConfigurationModel, DefaultConfigurationModel } from 'vs/platform/configuration/common/model'; import Event, { Emitter } from 'vs/base/common/event'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -67,10 +67,8 @@ export class ConfigurationService extends Disposable implements IConfiguratio }); } - public getConfiguration(section?: string): C - public getConfiguration(options?: IConfigurationOptions): C - public getConfiguration(arg?: any): C { - return this.configuration().getValue(this.toOptions(arg)); + public getConfiguration(section?: string, options?: IConfigurationOverrides): C { + return this.configuration().getValue(section, options); } public lookup(key: string, overrideIdentifier?: string): IConfigurationValue { @@ -93,16 +91,6 @@ export class ConfigurationService extends Disposable implements IConfiguratio this._configuration = this.consolidateConfigurations(); } - private toOptions(arg: any): IConfigurationOptions { - if (typeof arg === 'string') { - return { section: arg }; - } - if (typeof arg === 'object') { - return arg; - } - return {}; - } - private consolidateConfigurations(): Configuration { const defaults = new DefaultConfigurationModel(); const user = this.userConfigModelWatcher.getConfig(); diff --git a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts index e22ac2936abd6..c9eb1f6aa13cb 100644 --- a/src/vs/workbench/browser/parts/editor/textDiffEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textDiffEditor.ts @@ -217,7 +217,7 @@ export class TextDiffEditor extends BaseTextEditor { const language = this.getLanguage(); if (language) { - objects.assign(editorConfiguration, this.configurationService.getConfiguration({ overrideIdentifier: language, section: 'diffEditor' })); + objects.assign(editorConfiguration, this.configurationService.getConfiguration('diffEditor', { language })); } return editorConfiguration; diff --git a/src/vs/workbench/browser/parts/editor/textEditor.ts b/src/vs/workbench/browser/parts/editor/textEditor.ts index c926a9d2e1715..c344a1c89a306 100644 --- a/src/vs/workbench/browser/parts/editor/textEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textEditor.ts @@ -119,7 +119,7 @@ export abstract class BaseTextEditor extends BaseEditor { const overrides = {}; const resource = this.getResource(); if (resource) { - objects.assign(overrides, this.configurationService.getConfiguration({ /*resource: this.getResource(), */overrideIdentifier: this.getLanguage(), section: 'editor' })); + objects.assign(overrides, this.configurationService.getConfiguration('editor', { language: this.getLanguage(), /*resource: this.getResource(), */ })); } objects.assign(overrides, { diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index 1187473c057f9..ac247b050eb7a 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -419,7 +419,7 @@ export class WalkThroughPart extends BaseEditor { } private getEditorOptions(language: string): IEditorOptions { - const config = this.configurationService.getConfiguration({ overrideIdentifier: language, section: 'editor' }); + const config = this.configurationService.getConfiguration('editor', { language }); return { ...isObject(config) ? config : Object.create(null), scrollBeyondLastLine: false, diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index 2970fb389cd98..d5e4872ebdf38 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -24,7 +24,7 @@ import { isLinux } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { CustomConfigurationModel } from 'vs/platform/configuration/common/model'; import { ScopedConfigurationModel, FolderConfigurationModel, FolderSettingsModel } from 'vs/workbench/services/configuration/common/configurationModels'; -import { IConfigurationServiceEvent, ConfigurationSource, IConfigurationKeys, IConfigurationValue, ConfigurationModel, IConfigurationOptions, Configuration as BaseConfiguration, IConfigurationValues, IConfigurationData } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationServiceEvent, ConfigurationSource, IConfigurationKeys, IConfigurationValue, ConfigurationModel, IConfigurationOverrides, Configuration as BaseConfiguration, IConfigurationValues, IConfigurationData } from 'vs/platform/configuration/common/configuration'; import { IWorkspaceConfigurationService, WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME, WORKSPACE_STANDALONE_CONFIGURATIONS, WORKSPACE_CONFIG_DEFAULT_PATH } from 'vs/workbench/services/configuration/common/configuration'; import { ConfigurationService as GlobalConfigurationService } from 'vs/platform/configuration/node/configurationService'; import { createHash } from "crypto"; @@ -201,10 +201,8 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp return this._configuration; } - public getConfiguration(section?: string): C - public getConfiguration(options?: IConfigurationOptions): C - public getConfiguration(arg?: any): C { - return this._configuration.getValue(this.toOptions(arg)); + public getConfiguration(section?: string, overrides?: IConfigurationOverrides): C { + return this._configuration.getValue(section, overrides); } public lookup(key: string, overrideIdentifier?: string): IConfigurationValue { @@ -310,16 +308,6 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private trigger(source: ConfigurationSource, sourceConfig: any = this._configuration.getFolderConfigurationModel(this.workspace.roots[0]).contents): void { this._onDidUpdateConfiguration.fire({ source, sourceConfig }); } - - private toOptions(arg: any): IConfigurationOptions { - if (typeof arg === 'string') { - return { section: arg }; - } - if (typeof arg === 'object') { - return arg; - } - return {}; - } } class FolderConfiguration extends Disposable { @@ -539,9 +527,9 @@ class Configuration extends BaseConfiguration { updateFolderConfiguration(resource: URI, configuration: FolderConfigurationModel): boolean { this.folders.set(resource, configuration); - const current = this.getValue({ resource }); + const current = this.getValue(null, { resource }); this.mergeFolder(resource); - return !objects.equals(current, this.getValue({ resource })); + return !objects.equals(current, this.getValue(null, { resource })); } deleteFolderConfiguration(folder: URI): boolean { @@ -572,7 +560,7 @@ class Configuration extends BaseConfiguration { } for (const resource of this._foldersConsolidated.keys()) { - if (!objects.equals(this.getValue({ resource }), other.getValue({ resource }))) { + if (!objects.equals(this.getValue(null, { resource }), other.getValue(null, { resource }))) { return false; } } diff --git a/src/vs/workbench/services/keybinding/common/keybindingEditing.ts b/src/vs/workbench/services/keybinding/common/keybindingEditing.ts index abfa76b0210d7..e947aa7dc9455 100644 --- a/src/vs/workbench/services/keybinding/common/keybindingEditing.ts +++ b/src/vs/workbench/services/keybinding/common/keybindingEditing.ts @@ -215,7 +215,7 @@ export class KeybindingsEditingService extends Disposable implements IKeybinding private resolveModelReference(): TPromise> { return this.fileService.existsFile(this.resource) .then(exists => { - const EOL = this.configurationService.getConfiguration({ section: 'files', overrideIdentifier: 'json' })['eol']; + const EOL = this.configurationService.getConfiguration('files', { language: 'json' })['eol']; const result = exists ? TPromise.as(null) : this.fileService.updateContent(this.resource, this.getEmptyContent(EOL), { encoding: 'utf8' }); return result.then(() => this.textModelResolverService.createModelReference(this.resource)); }); From ee2de29cf0416107559a71c911b111aa1335872b Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Thu, 15 Jun 2017 22:44:14 +0200 Subject: [PATCH 1909/2747] #28538 Implement resource overrides for settings --- src/vs/platform/configuration/common/configuration.ts | 10 +++++----- src/vs/workbench/browser/parts/editor/textEditor.ts | 2 +- .../services/configuration/node/configuration.ts | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/vs/platform/configuration/common/configuration.ts b/src/vs/platform/configuration/common/configuration.ts index ac8016e30ab63..94e02b37a2974 100644 --- a/src/vs/platform/configuration/common/configuration.ts +++ b/src/vs/platform/configuration/common/configuration.ts @@ -241,8 +241,8 @@ export class Configuration { } } - getValue(section: string = '', options: IConfigurationOverrides = {}): C { - const configModel = this.getConfigurationModel(options); + getValue(section: string = '', overrides: IConfigurationOverrides = {}): C { + const configModel = this.getConfigurationModel(overrides); return section ? configModel.getContentsFor(section) : configModel.contents; } @@ -296,9 +296,9 @@ export class Configuration { return result; } - private getConfigurationModel(options: IConfigurationOverrides): ConfigurationModel { - let configurationModel = (options.resource ? this._foldersConsolidated.get(options.resource) : this._workspace) || new ConfigurationModel(); - return options.language ? configurationModel.override(options.language) : configurationModel; + private getConfigurationModel(overrides: IConfigurationOverrides): ConfigurationModel { + let configurationModel = overrides.resource ? this._foldersConsolidated.get(overrides.resource) || this._workspace : this._workspace; + return overrides.language ? configurationModel.override(overrides.language) : configurationModel; } public toData(): IConfigurationData { diff --git a/src/vs/workbench/browser/parts/editor/textEditor.ts b/src/vs/workbench/browser/parts/editor/textEditor.ts index c344a1c89a306..4cbf6a0caf077 100644 --- a/src/vs/workbench/browser/parts/editor/textEditor.ts +++ b/src/vs/workbench/browser/parts/editor/textEditor.ts @@ -119,7 +119,7 @@ export abstract class BaseTextEditor extends BaseEditor { const overrides = {}; const resource = this.getResource(); if (resource) { - objects.assign(overrides, this.configurationService.getConfiguration('editor', { language: this.getLanguage(), /*resource: this.getResource(), */ })); + objects.assign(overrides, this.configurationService.getConfiguration('editor', { language: this.getLanguage(), resource: this.getResource() })); } objects.assign(overrides, { diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index d5e4872ebdf38..e5613d3190be7 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -202,6 +202,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } public getConfiguration(section?: string, overrides?: IConfigurationOverrides): C { + overrides = overrides && overrides.resource ? { ...overrides, resource: this.getRoot(overrides.resource) } : overrides; return this._configuration.getValue(section, overrides); } From 540930d5909093926b3534b1a81dbbce4dcae62f Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 15 Jun 2017 16:28:31 -0700 Subject: [PATCH 1910/2747] Pick up TS 2.4.1 insiders --- extensions/npm-shrinkwrap.json | 6 +++--- extensions/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/npm-shrinkwrap.json b/extensions/npm-shrinkwrap.json index 278e305e39bd5..25febab561990 100644 --- a/extensions/npm-shrinkwrap.json +++ b/extensions/npm-shrinkwrap.json @@ -3,9 +3,9 @@ "version": "0.0.1", "dependencies": { "typescript": { - "version": "2.3.4", - "from": "typescript@2.3.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.3.4.tgz" + "version": "2.4.1-insiders.20170615", + "from": "typescript@2.4.1-insiders.20170615", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.4.1-insiders.20170615.tgz" } } } diff --git a/extensions/package.json b/extensions/package.json index 180253c59ae45..29c909ce5cc24 100644 --- a/extensions/package.json +++ b/extensions/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "description": "Dependencies shared by all extensions", "dependencies": { - "typescript": "2.3.4" + "typescript": "2.4.1-insiders.20170615" }, "scripts": { "postinstall": "node ./postinstall" From 137b31c4ae2134e62168525c07e5cd970fb4dce5 Mon Sep 17 00:00:00 2001 From: aefernandes Date: Thu, 15 Jun 2017 16:32:33 -0700 Subject: [PATCH 1911/2747] changed command palette text --- .../parts/welcome/page/electron-browser/vs_code_welcome_page.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts index 2fe5fc81aa132..bf03a6df344d8 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts @@ -66,7 +66,7 @@ export default () => `

      ${escape(localize('welcomePage.learn', "Learn"))}

        -
      • +
      From baf54ef06f24cfc92f6c49cd2b972f8bec34f7e2 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 15 Jun 2017 17:20:00 -0700 Subject: [PATCH 1912/2747] Collapse html,css completion provider for emmet --- .../emmet/src/emmetCompletionProvider.ts | 51 +++++++------------ extensions/emmet/src/extension.ts | 21 +++----- 2 files changed, 23 insertions(+), 49 deletions(-) diff --git a/extensions/emmet/src/emmetCompletionProvider.ts b/extensions/emmet/src/emmetCompletionProvider.ts index 84d762988d253..3ba492bbf1218 100644 --- a/extensions/emmet/src/emmetCompletionProvider.ts +++ b/extensions/emmet/src/emmetCompletionProvider.ts @@ -6,12 +6,12 @@ import * as vscode from 'vscode'; import { expand, createSnippetsRegistry } from '@emmetio/expand-abbreviation'; -import { getSyntax, getProfile, extractAbbreviation } from './util'; +import { getSyntax, getProfile, extractAbbreviation, isStyleSheet } from './util'; const field = (index, placeholder) => `\${${index}${placeholder ? ':' + placeholder : ''}}`; const snippetCompletionsCache = new Map(); -export abstract class EmmetCompletionItemProviderBase implements vscode.CompletionItemProvider { +export class EmmetCompletionItemProvider implements vscode.CompletionItemProvider { public provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Thenable { @@ -19,15 +19,27 @@ export abstract class EmmetCompletionItemProviderBase implements vscode.Completi return Promise.resolve(null); } + let completionItems: vscode.CompletionItem[] = []; + let syntax = getSyntax(document); let currentWord = getCurrentWord(document, position); let expandedAbbr = this.getExpandedAbbreviation(document, position); - let abbreviationSuggestions = this.getAbbreviationSuggestions(getSyntax(document), currentWord, (expandedAbbr && currentWord === expandedAbbr.label)); - let completionItems = expandedAbbr ? [expandedAbbr, ...abbreviationSuggestions] : abbreviationSuggestions; + + if (!isStyleSheet(syntax)) { + if (expandedAbbr) { + // In non stylesheet like syntax, this extension returns expanded abbr plus posssible abbr completions + // To differentiate between the 2, the former is given CompletionItemKind.Value so that it gets a different icon + expandedAbbr.kind = vscode.CompletionItemKind.Value; + } + let abbreviationSuggestions = this.getAbbreviationSuggestions(syntax, currentWord, (expandedAbbr && currentWord === expandedAbbr.label)); + completionItems = expandedAbbr ? [expandedAbbr, ...abbreviationSuggestions] : abbreviationSuggestions; + } else { + completionItems = expandedAbbr ? [expandedAbbr] : []; + } return Promise.resolve(new vscode.CompletionList(completionItems, true)); } - protected getExpandedAbbreviation(document: vscode.TextDocument, position: vscode.Position): vscode.CompletionItem { + getExpandedAbbreviation(document: vscode.TextDocument, position: vscode.Position): vscode.CompletionItem { if (!vscode.workspace.getConfiguration('emmet')['showExpandedAbbreviation']) { return; } @@ -53,25 +65,6 @@ export abstract class EmmetCompletionItemProviderBase implements vscode.Completi return completionitem; } - abstract getAbbreviationSuggestions(syntax: string, prefix: string, skipExactMatch: boolean): vscode.CompletionItem[]; - -} - -export class EmmetCompletionItemProviderHtml extends EmmetCompletionItemProviderBase { - - protected getExpandedAbbreviation(document: vscode.TextDocument, position: vscode.Position): vscode.CompletionItem { - let completionItem = super.getExpandedAbbreviation(document, position); - - if (completionItem) { - // In non stylesheet like syntax, this extension returns expanded abbr plus posssible abbr completions - // To differentiate between the 2, the former is given CompletionItemKind.Value so that it gets a different icon - completionItem.kind = vscode.CompletionItemKind.Value; - } - - - return completionItem; - } - getAbbreviationSuggestions(syntax: string, prefix: string, skipExactMatch: boolean) { if (!vscode.workspace.getConfiguration('emmet')['showAbbreviationSuggestions'] || !prefix) { return []; @@ -102,19 +95,9 @@ export class EmmetCompletionItemProviderHtml extends EmmetCompletionItemProvider } - } -export class EmmetCompletionItemProviderCss extends EmmetCompletionItemProviderBase { - public provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken): Thenable { - return super.provideCompletionItems(document, position, token); - } - - getAbbreviationSuggestions(syntax: string, prefix: string, skipExactMatch: boolean) { - return []; - } -} function getCurrentWord(document: vscode.TextDocument, position: vscode.Position): string { let wordAtPosition = document.getWordRangeAtPosition(position); diff --git a/extensions/emmet/src/extension.ts b/extensions/emmet/src/extension.ts index 23f9190743dff..da9ce80a27507 100644 --- a/extensions/emmet/src/extension.ts +++ b/extensions/emmet/src/extension.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { EmmetCompletionItemProviderHtml, EmmetCompletionItemProviderCss } from './emmetCompletionProvider'; +import { EmmetCompletionItemProvider } from './emmetCompletionProvider'; import { expandAbbreviation, wrapWithAbbreviation } from './abbreviationActions'; import { removeTag } from './removeTag'; import { updateTag } from './updateTag'; @@ -21,7 +21,7 @@ interface ISupportedLanguageMode { triggerCharacters: string[]; } -const HTML_LANGUAGE_MODES: ISupportedLanguageMode[] = [ +const LANGUAGE_MODES: ISupportedLanguageMode[] = [ { id: 'html', triggerCharacters: ['!', '.', '}'] }, { id: 'jade', triggerCharacters: ['!', '.', '}'] }, { id: 'slim', triggerCharacters: ['!', '.', '}'] }, @@ -30,10 +30,8 @@ const HTML_LANGUAGE_MODES: ISupportedLanguageMode[] = [ { id: 'xsl', triggerCharacters: ['.', '}'] }, { id: 'javascriptreact', triggerCharacters: ['.'] }, - { id: 'typescriptreact', triggerCharacters: ['.'] } -]; + { id: 'typescriptreact', triggerCharacters: ['.'] }, -const CSS_LANGUAGE_MODES: ISupportedLanguageMode[] = [ { id: 'css', triggerCharacters: [':'] }, { id: 'scss', triggerCharacters: [':'] }, { id: 'sass', triggerCharacters: [':'] }, @@ -42,16 +40,9 @@ const CSS_LANGUAGE_MODES: ISupportedLanguageMode[] = [ ]; export function activate(context: vscode.ExtensionContext) { - let completionProviderHtml = new EmmetCompletionItemProviderHtml(); - let completionProviderCss = new EmmetCompletionItemProviderCss(); - - for (let language of HTML_LANGUAGE_MODES) { - const provider = vscode.languages.registerCompletionItemProvider({ language: language.id }, completionProviderHtml, ...language.triggerCharacters); - context.subscriptions.push(provider); - } - - for (let language of CSS_LANGUAGE_MODES) { - const provider = vscode.languages.registerCompletionItemProvider({ language: language.id }, completionProviderCss, ...language.triggerCharacters); + let completionProvider = new EmmetCompletionItemProvider(); + for (let language of LANGUAGE_MODES) { + const provider = vscode.languages.registerCompletionItemProvider({ language: language.id }, completionProvider, ...language.triggerCharacters); context.subscriptions.push(provider); } From e9ec53eb7acec373912d1eda5bf61fed594d223d Mon Sep 17 00:00:00 2001 From: Rohith Reddy Kumbharkar Date: Fri, 16 Jun 2017 05:54:47 +0530 Subject: [PATCH 1913/2747] Added functionality to toggle break rendering mode for markdown preview (#28713) --- extensions/markdown/package.json | 5 +++++ extensions/markdown/package.nls.json | 1 + extensions/markdown/src/markdownEngine.ts | 3 +++ extensions/markdown/src/previewContentProvider.ts | 2 ++ 4 files changed, 11 insertions(+) diff --git a/extensions/markdown/package.json b/extensions/markdown/package.json index cbcb63c5531a5..06f6b18e44f5b 100644 --- a/extensions/markdown/package.json +++ b/extensions/markdown/package.json @@ -159,6 +159,11 @@ "default": "hide", "description": "%markdown.previewFrontMatter.dec%" }, + "markdown.preview.breaks": { + "type": "boolean", + "default": false, + "description": "%markdown.preview.breaks.desc%" + }, "markdown.preview.fontFamily": { "type": "string", "default": "-apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', 'HelveticaNeue-Light', 'Ubuntu', 'Droid Sans', sans-serif", diff --git a/extensions/markdown/package.nls.json b/extensions/markdown/package.nls.json index b58fe4c5e401a..11e191a773206 100644 --- a/extensions/markdown/package.nls.json +++ b/extensions/markdown/package.nls.json @@ -1,4 +1,5 @@ { + "markdown.preview.breaks.desc": "Sets how line-breaks are rendered in the markdown preview. Setting it to 'true' creates a
      for every newline.", "markdown.preview.doubleClickToSwitchToEditor.desc": "Double click in the markdown preview to switch to the editor.", "markdown.preview.fontFamily.desc": "Controls the font family used in the markdown preview.", "markdown.preview.fontSize.desc": "Controls the font size in pixels used in the markdown preview.", diff --git a/extensions/markdown/src/markdownEngine.ts b/extensions/markdown/src/markdownEngine.ts index aad5d484645b7..c13130b98b911 100644 --- a/extensions/markdown/src/markdownEngine.ts +++ b/extensions/markdown/src/markdownEngine.ts @@ -20,6 +20,8 @@ interface MarkdownIt { parse(text: string, env: any): IToken[]; utils: any; + + set(options: any): MarkdownIt; } const FrontMatterRegex = /^---\s*[^]*?(-{3}|\.{3})\s*/; @@ -79,6 +81,7 @@ export class MarkdownEngine { this.addLinkNormalizer(this.md); this.addLinkValidator(this.md); } + this.md.set({ breaks: vscode.workspace.getConfiguration('markdown').get('preview.breaks', false) }); return this.md; } diff --git a/extensions/markdown/src/previewContentProvider.ts b/extensions/markdown/src/previewContentProvider.ts index 8f6d925059cdc..346232bbc5187 100644 --- a/extensions/markdown/src/previewContentProvider.ts +++ b/extensions/markdown/src/previewContentProvider.ts @@ -52,6 +52,7 @@ class MarkdownPreviewConfig { public readonly scrollBeyondLastLine: boolean; public readonly wordWrap: boolean; public readonly previewFrontMatter: string; + public readonly lineBreaks: boolean; public readonly doubleClickToSwitchToEditor: boolean; public readonly scrollEditorWithPreview: boolean; public readonly scrollPreviewWithEditorSelection: boolean; @@ -77,6 +78,7 @@ class MarkdownPreviewConfig { this.previewFrontMatter = markdownConfig.get('previewFrontMatter', 'hide'); this.scrollPreviewWithEditorSelection = !!markdownConfig.get('preview.scrollPreviewWithEditorSelection', true); this.scrollEditorWithPreview = !!markdownConfig.get('preview.scrollEditorWithPreview', true); + this.lineBreaks = !!markdownConfig.get('preview.breaks', false); this.doubleClickToSwitchToEditor = !!markdownConfig.get('preview.doubleClickToSwitchToEditor', true); this.markEditorSelection = !!markdownConfig.get('preview.markEditorSelection', true); From 73015a5e052e6de8ecd60eed2670bea81fad8cac Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 15 Jun 2017 17:27:12 -0700 Subject: [PATCH 1914/2747] Restrict index csp --- src/vs/workbench/electron-browser/bootstrap/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/electron-browser/bootstrap/index.html b/src/vs/workbench/electron-browser/bootstrap/index.html index 29b73eae7c13f..c14ebbe865323 100644 --- a/src/vs/workbench/electron-browser/bootstrap/index.html +++ b/src/vs/workbench/electron-browser/bootstrap/index.html @@ -3,7 +3,7 @@ - + From 5059f47ee2220e3ccd500b29d81c97036c134a16 Mon Sep 17 00:00:00 2001 From: Rohith Reddy Kumbharkar Date: Fri, 16 Jun 2017 11:17:38 +0530 Subject: [PATCH 1915/2747] Fixes issue #28695 with tooltips in Activity Bar (#28783) --- src/vs/workbench/browser/parts/activitybar/activitybarActions.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts index 6deb54dcab25a..17d00aba4da19 100644 --- a/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts +++ b/src/vs/workbench/browser/parts/activitybar/activitybarActions.ts @@ -445,6 +445,7 @@ export class ViewletActionItem extends ActivityActionItem { this.$label.title(title); this.$badge.title(title); + this.$container.title(title); } protected _updateClass(): void { From 81b98b8870e78acf055d3753f86cd82c10839873 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 16 Jun 2017 07:49:51 +0200 Subject: [PATCH 1916/2747] Adopt ext host to use configuration tree data --- .../mainThreadConfiguration.ts | 2 +- src/vs/workbench/api/node/extHost.protocol.ts | 6 +- .../api/node/extHostConfiguration.ts | 47 +++----- .../electron-browser/extensionHost.ts | 2 +- .../api/extHostConfiguration.test.ts | 110 ++++++++++-------- 5 files changed, 86 insertions(+), 81 deletions(-) diff --git a/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts b/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts index f3d1533b7dbc4..b08d8877d07ab 100644 --- a/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts +++ b/src/vs/workbench/api/electron-browser/mainThreadConfiguration.ts @@ -26,7 +26,7 @@ export class MainThreadConfiguration extends MainThreadConfigurationShape { const proxy = threadService.get(ExtHostContext.ExtHostConfiguration); this._toDispose = configurationService.onDidUpdateConfiguration(() => { - proxy.$acceptConfigurationChanged(configurationService.values()); + proxy.$acceptConfigurationChanged(configurationService.getConfigurationData()); }); } diff --git a/src/vs/workbench/api/node/extHost.protocol.ts b/src/vs/workbench/api/node/extHost.protocol.ts index bed2bbb9b76a0..0cd7ab1785a08 100644 --- a/src/vs/workbench/api/node/extHost.protocol.ts +++ b/src/vs/workbench/api/node/extHost.protocol.ts @@ -30,7 +30,7 @@ import { IResourceEdit } from 'vs/editor/common/services/bulkEdit'; import { ITextSource } from 'vs/editor/common/model/textSource'; import { ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; -import { IConfigurationValues } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationData } from 'vs/platform/configuration/common/configuration'; import { IPickOpenEntry, IPickOptions } from 'vs/platform/quickOpen/common/quickOpen'; import { SaveReason } from 'vs/workbench/services/textfile/common/textfiles'; @@ -67,7 +67,7 @@ export interface IInitData { environment: IEnvironment; workspace: IWorkspaceData; extensions: IExtensionDescription[]; - configuration: IConfigurationValues; + configuration: IConfigurationData; telemetryInfo: ITelemetryInfo; } @@ -349,7 +349,7 @@ export abstract class ExtHostCommandsShape { } export abstract class ExtHostConfigurationShape { - $acceptConfigurationChanged(values: IConfigurationValues) { throw ni(); } + $acceptConfigurationChanged(data: IConfigurationData) { throw ni(); } } export abstract class ExtHostDiagnosticsShape { diff --git a/src/vs/workbench/api/node/extHostConfiguration.ts b/src/vs/workbench/api/node/extHostConfiguration.ts index 3147509dde812..5ee24322929a6 100644 --- a/src/vs/workbench/api/node/extHostConfiguration.ts +++ b/src/vs/workbench/api/node/extHostConfiguration.ts @@ -8,9 +8,8 @@ import { mixin } from 'vs/base/common/objects'; import Event, { Emitter } from 'vs/base/common/event'; import { WorkspaceConfiguration } from 'vscode'; import { ExtHostConfigurationShape, MainThreadConfigurationShape } from './extHost.protocol'; -import { IConfigurationValues } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationData, Configuration } from 'vs/platform/configuration/common/configuration'; import { ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; -import { toValuesTree } from 'vs/platform/configuration/common/model'; function lookUp(tree: any, key: string) { if (key) { @@ -23,51 +22,41 @@ function lookUp(tree: any, key: string) { } } -interface UsefulConfiguration { - data: IConfigurationValues; - valueTree: any; -} - -function createUsefulConfiguration(data: IConfigurationValues): { data: IConfigurationValues, valueTree: any } { - const valueMap: { [key: string]: any } = Object.create(null); - for (let key in data) { - if (Object.prototype.hasOwnProperty.call(data, key)) { - valueMap[key] = data[key].value; - } - } - const valueTree = toValuesTree(valueMap, message => console.error(`Conflict in configuration settings: ${message}`)); - return { - data, - valueTree - }; -} - export class ExtHostConfiguration extends ExtHostConfigurationShape { private _onDidChangeConfiguration = new Emitter(); private _proxy: MainThreadConfigurationShape; - private _configuration: UsefulConfiguration; + private _data: IConfigurationData; + private _configuration: Configuration; - constructor(proxy: MainThreadConfigurationShape, data: IConfigurationValues) { + constructor(proxy: MainThreadConfigurationShape, data: IConfigurationData) { super(); this._proxy = proxy; - this._configuration = createUsefulConfiguration(data); + this._data = data; } get onDidChangeConfiguration(): Event { return this._onDidChangeConfiguration && this._onDidChangeConfiguration.event; } - public $acceptConfigurationChanged(data: IConfigurationValues) { - this._configuration = createUsefulConfiguration(data); + public $acceptConfigurationChanged(data: IConfigurationData) { + this._configuration = null; + this._data = data; this._onDidChangeConfiguration.fire(undefined); } + private get configuration(): Configuration { + if (!this._configuration) { + this._configuration = Configuration.parse(this._data); + } + return this._configuration; + } + public getConfiguration(section?: string): WorkspaceConfiguration { const config = section - ? lookUp(this._configuration.valueTree, section) - : this._configuration.valueTree; + ? lookUp(this.configuration.getValue(), section) + : this.configuration.getValue(); const result: WorkspaceConfiguration = { has(key: string): boolean { @@ -91,7 +80,7 @@ export class ExtHostConfiguration extends ExtHostConfigurationShape { }, inspect: (key: string): { key: string; defaultValue?: T; globalValue?: T; workspaceValue?: T } => { key = section ? `${section}.${key}` : key; - const config = this._configuration.data[key]; + const config = this.configuration.values()[key]; if (config) { return { key, diff --git a/src/vs/workbench/electron-browser/extensionHost.ts b/src/vs/workbench/electron-browser/extensionHost.ts index 0e29ffee23698..7c29456900eb9 100644 --- a/src/vs/workbench/electron-browser/extensionHost.ts +++ b/src/vs/workbench/electron-browser/extensionHost.ts @@ -290,7 +290,7 @@ export class ExtensionHostProcessWorker { }, workspace: this.contextService.getWorkspace2(), extensions: extensionDescriptions, - configuration: this.configurationService.values(), + configuration: this.configurationService.getConfigurationData(), telemetryInfo }; }); diff --git a/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts b/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts index d449d5627aded..acdf7e0de9f83 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts @@ -10,7 +10,7 @@ import { ExtHostConfiguration } from 'vs/workbench/api/node/extHostConfiguration import { MainThreadConfigurationShape } from 'vs/workbench/api/node/extHost.protocol'; import { TPromise } from 'vs/base/common/winjs.base'; import { ConfigurationTarget, ConfigurationEditingErrorCode, IConfigurationEditingError } from 'vs/workbench/services/configuration/common/configurationEditing'; -import { IConfigurationValues, IConfigurationValue } from 'vs/platform/configuration/common/configuration'; +import { ConfigurationModel } from 'vs/platform/configuration/common/configuration'; suite('ExtHostConfiguration', function () { @@ -22,25 +22,25 @@ suite('ExtHostConfiguration', function () { } }; - function createExtHostConfiguration(data: IConfigurationValues = Object.create(null), shape?: MainThreadConfigurationShape) { + function createExtHostConfiguration(contents: any = Object.create(null), shape?: MainThreadConfigurationShape) { if (!shape) { shape = new class extends MainThreadConfigurationShape { }; } - return new ExtHostConfiguration(shape, data); - } - - function createConfigurationValue(value: T): IConfigurationValue { - return { - value, - default: value, - user: undefined, - workspace: undefined - }; + return new ExtHostConfiguration(shape, { + defaults: new ConfigurationModel(contents), + user: new ConfigurationModel(contents), + folders: Object.create(null), + workspaceUri: void 0 + }); } test('getConfiguration fails regression test 1.7.1 -> 1.8 #15552', function () { const extHostConfig = createExtHostConfiguration({ - ['search.exclude']: createConfigurationValue({ '**/node_modules': true }) + 'search': { + 'exclude': { + '**/node_modules': true + } + } }); assert.equal(extHostConfig.getConfiguration('search.exclude')['**/node_modules'], true); @@ -54,10 +54,14 @@ suite('ExtHostConfiguration', function () { test('has/get', function () { const all = createExtHostConfiguration({ - ['farboo.config0']: createConfigurationValue(true), - ['farboo.nested.config1']: createConfigurationValue(42), - ['farboo.nested.config2']: createConfigurationValue('Das Pferd frisst kein Reis.'), - ['farboo.config4']: createConfigurationValue('') + 'farboo': { + 'config0': true, + 'nested': { + 'config1': 42, + 'config2': 'Das Pferd frisst kein Reis.' + }, + 'config4': '' + } }); const config = all.getConfiguration('farboo'); @@ -80,8 +84,10 @@ suite('ExtHostConfiguration', function () { test('getConfiguration vs get', function () { const all = createExtHostConfiguration({ - ['farboo.config0']: createConfigurationValue(true), - ['farboo.config4']: createConfigurationValue(38) + 'farboo': { + 'config0': true, + 'config4': 38 + } }); let config = all.getConfiguration('farboo.config0'); @@ -96,8 +102,10 @@ suite('ExtHostConfiguration', function () { test('getConfiguration vs get', function () { const all = createExtHostConfiguration({ - ['farboo.config0']: createConfigurationValue(true), - ['farboo.config4']: createConfigurationValue(38) + 'farboo': { + 'config0': true, + 'config4': 38 + } }); let config = all.getConfiguration('farboo.config0'); @@ -111,7 +119,9 @@ suite('ExtHostConfiguration', function () { test('name vs property', function () { const all = createExtHostConfiguration({ - ['farboo.get']: createConfigurationValue('get-prop') + 'farboo': { + 'get': 'get-prop' + } }); const config = all.getConfiguration('farboo'); @@ -125,8 +135,10 @@ suite('ExtHostConfiguration', function () { const shape = new RecordingShape(); const allConfig = createExtHostConfiguration({ - ['foo.bar']: createConfigurationValue(1), - ['foo.far']: createConfigurationValue(1) + 'foo': { + 'bar': 1, + 'far': 1 + } }, shape); let config = allConfig.getConfiguration('foo'); @@ -146,7 +158,9 @@ suite('ExtHostConfiguration', function () { test('update, what is #15834', function () { const shape = new RecordingShape(); const allConfig = createExtHostConfiguration({ - ['editor.formatOnSave']: createConfigurationValue(true) + 'editor': { + 'formatOnSave': true + } }, shape); allConfig.getConfiguration('editor').update('formatOnSave', { extensions: ['ts'] }); @@ -154,28 +168,30 @@ suite('ExtHostConfiguration', function () { assert.deepEqual(shape.lastArgs[2], { extensions: ['ts'] }); }); - test('bogous data, #15834', function () { - let oldLogger = console.error; - let errorLogged = false; - - // workaround until we have a proper logging story - console.error = (message, args) => { - errorLogged = true; - }; - let allConfig; - try { - const shape = new RecordingShape(); - allConfig = createExtHostConfiguration({ - ['editor.formatOnSave']: createConfigurationValue(true), - ['editor.formatOnSave.extensions']: createConfigurationValue(['ts']) - }, shape); - } finally { - console.error = oldLogger; - } - assert.ok(errorLogged); - assert.ok(allConfig.getConfiguration('').has('editor.formatOnSave')); - assert.ok(!allConfig.getConfiguration('').has('editor.formatOnSave.extensions')); - }); + /* + test('bogous data, #15834', function () { + let oldLogger = console.error; + let errorLogged = false; + + // workaround until we have a proper logging story + console.error = (message, args) => { + errorLogged = true; + }; + let allConfig; + try { + const shape = new RecordingShape(); + allConfig = createExtHostConfiguration({ + ['editor.formatOnSave']: createConfigurationValue(true), + ['editor.formatOnSave.extensions']: createConfigurationValue(['ts']) + }, shape); + } finally { + console.error = oldLogger; + } + assert.ok(errorLogged); + assert.ok(allConfig.getConfiguration('').has('editor.formatOnSave')); + assert.ok(!allConfig.getConfiguration('').has('editor.formatOnSave.extensions')); + }); + */ test('update/error-state not OK', function () { From 8f2523c4b12efa371ff16b0acc77099f378bc7d2 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 16 Jun 2017 07:52:32 +0200 Subject: [PATCH 1917/2747] fix potential npe in editor.hide() --- .../workbench/browser/parts/editor/editorGroupsControl.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index 4bc4a3b143a7d..2f9f422446205 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -519,8 +519,12 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro // Clear Position this.clearPosition(position); - // Take editor container offdom and hide - editor.getContainer().offDOM().hide(); + // Take editor container offdom and hide. Check if the editor container + // exists in case someone manages to hide an editor before it was created + const editorContainer = editor.getContainer(); + if (editorContainer) { + editorContainer.offDOM().hide(); + } // Adjust layout and rochade if instructed to do so if (layoutAndRochade) { From 42d3d54267972869376b4cc8aa84bbb4fe602a14 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 16 Jun 2017 08:57:51 +0200 Subject: [PATCH 1918/2747] suggest: improve element aria label --- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index 5ab85e8bf03a9..a1f36edca85d5 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -134,7 +134,7 @@ class Renderer implements IRenderer { const suggestion = (element).suggestion; if (canExpandCompletionItem(element)) { - data.root.setAttribute('aria-label', nls.localize('suggestionWithDetailsAriaLabel', "{0}, suggestion, has details", suggestion.label)); + data.root.setAttribute('aria-label', nls.localize('suggestionWithDetailsAriaLabel', "{0}, suggestion, has details, press {1} to read more", suggestion.label, this.triggerKeybindingLabel)); } else { data.root.setAttribute('aria-label', nls.localize('suggestionAriaLabel', "{0}, suggestion", suggestion.label)); } From 1ddc7d4e7908caab71279ef5fba0a63c22ffdd15 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 15 Jun 2017 16:20:11 +0200 Subject: [PATCH 1919/2747] Fix TS 2.4 monarch issues --- .../common/modes/monarch/monarchCommon.ts | 26 ++++++++++++++++--- .../common/modes/monarch/monarchCompile.ts | 8 +++--- .../common/modes/monarch/monarchLexer.ts | 12 ++++----- 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/src/vs/editor/common/modes/monarch/monarchCommon.ts b/src/vs/editor/common/modes/monarch/monarchCommon.ts index fd72d1d0cad5d..070d3572d34af 100644 --- a/src/vs/editor/common/modes/monarch/monarchCommon.ts +++ b/src/vs/editor/common/modes/monarch/monarchCommon.ts @@ -46,19 +46,37 @@ export interface IBracket { close: string; } +export type FuzzyAction = IAction | string; + +export function isFuzzyActionArr(what: FuzzyAction | FuzzyAction[]): what is FuzzyAction[] { + return (Array.isArray(what)); +} + +export function isFuzzyAction(what: FuzzyAction | FuzzyAction[]): what is FuzzyAction { + return !isFuzzyActionArr(what); +} + +export function isString(what: FuzzyAction): what is string { + return (typeof what === 'string'); +} + +export function isIAction(what: FuzzyAction): what is IAction { + return !isString(what); +} + export interface IRule { regex: RegExp; - action: IAction; + action: FuzzyAction; matchOnlyAtLineStart: boolean; name: string; } export interface IAction { // an action is either a group of actions - group?: IAction[]; + group?: FuzzyAction[]; // or a function that returns a fresh action - test?: (id: string, matches: string[], state: string, eos: boolean) => IAction; + test?: (id: string, matches: string[], state: string, eos: boolean) => FuzzyAction; // or it is a declarative action with a token value and various other attributes token?: string; @@ -74,7 +92,7 @@ export interface IAction { export interface IBranch { name: string; - value: IAction; + value: FuzzyAction; test: (id: string, matches: string[], state: string, eos: boolean) => boolean; } diff --git a/src/vs/editor/common/modes/monarch/monarchCompile.ts b/src/vs/editor/common/modes/monarch/monarchCompile.ts index 7f5fc6ebf60f1..7a41ee1a0be6f 100644 --- a/src/vs/editor/common/modes/monarch/monarchCompile.ts +++ b/src/vs/editor/common/modes/monarch/monarchCompile.ts @@ -118,7 +118,7 @@ function selectScrutinee(id: string, matches: string[], state: string, num: numb return null; } -function createGuard(lexer: monarchCommon.ILexerMin, ruleName: string, tkey: string, val: monarchCommon.IAction): monarchCommon.IBranch { +function createGuard(lexer: monarchCommon.ILexerMin, ruleName: string, tkey: string, val: monarchCommon.FuzzyAction): monarchCommon.IBranch { // get the scrutinee and pattern var scrut = -1; // -1: $!, 0-99: $n, 100+n: $Sn var oppat = tkey; @@ -222,7 +222,7 @@ function createGuard(lexer: monarchCommon.ILexerMin, ruleName: string, tkey: str * contains user functions as actions (which is usually not allowed), then this * may be called during lexing. It is important therefore to compile common cases efficiently */ -function compileAction(lexer: monarchCommon.ILexerMin, ruleName: string, action: any): monarchCommon.IAction { +function compileAction(lexer: monarchCommon.ILexerMin, ruleName: string, action: any): monarchCommon.FuzzyAction { if (!action) { return { token: '' }; } @@ -285,7 +285,7 @@ function compileAction(lexer: monarchCommon.ILexerMin, ruleName: string, action: } } else if (Array.isArray(action)) { - var results = []; + var results: monarchCommon.FuzzyAction[] = []; var idx: string; for (idx in action) { if (action.hasOwnProperty(idx)) { @@ -345,7 +345,7 @@ function compileAction(lexer: monarchCommon.ILexerMin, ruleName: string, action: */ class Rule implements monarchCommon.IRule { public regex: RegExp = new RegExp(''); - public action: monarchCommon.IAction = { token: '' }; + public action: monarchCommon.FuzzyAction = { token: '' }; public matchOnlyAtLineStart: boolean = false; public name: string = ''; diff --git a/src/vs/editor/common/modes/monarch/monarchLexer.ts b/src/vs/editor/common/modes/monarch/monarchLexer.ts index bc6f63811383b..daf73aae631e5 100644 --- a/src/vs/editor/common/modes/monarch/monarchLexer.ts +++ b/src/vs/editor/common/modes/monarch/monarchLexer.ts @@ -459,7 +459,7 @@ export class MonarchTokenizer implements modes.ITokenizationSupport { continue; } let rule: monarchCommon.IRule = rules[idx]; - if (rule.action.nextEmbedded !== '@pop') { + if (monarchCommon.isIAction(rule.action) && rule.action.nextEmbedded !== '@pop') { continue; } hasEmbeddedPopRule = true; @@ -518,7 +518,7 @@ export class MonarchTokenizer implements modes.ITokenizationSupport { // regular expression group matching // these never need cloning or equality since they are only used within a line match - let groupActions: monarchCommon.IAction[] = null; + let groupActions: monarchCommon.FuzzyAction[] = null; let groupMatches: string[] = null; let groupMatched: string[] = null; let groupRule: monarchCommon.IRule = null; @@ -531,7 +531,7 @@ export class MonarchTokenizer implements modes.ITokenizationSupport { let matches: string[] = null; let matched: string = null; - let action: monarchCommon.IAction = null; + let action: monarchCommon.FuzzyAction | monarchCommon.FuzzyAction[] = null; let rule: monarchCommon.IRule = null; let enteringEmbeddedMode: string = null; @@ -604,11 +604,11 @@ export class MonarchTokenizer implements modes.ITokenizationSupport { pos += matched.length; // maybe call action function (used for 'cases') - while (action.test) { + while (monarchCommon.isFuzzyAction(action) && monarchCommon.isIAction(action) && action.test) { action = action.test(matched, matches, state, pos === lineLength); } - let result: string | monarchCommon.IAction[] = null; + let result: monarchCommon.FuzzyAction | monarchCommon.FuzzyAction[] = null; // set the result: either a string or an array of actions if (typeof action === 'string' || Array.isArray(action)) { result = action; @@ -739,7 +739,7 @@ export class MonarchTokenizer implements modes.ITokenizationSupport { // return the result (and check for brace matching) // todo: for efficiency we could pre-sanitize tokenPostfix and substitutions let tokenType: string = null; - if (result.indexOf('@brackets') === 0) { + if (monarchCommon.isString(result) && result.indexOf('@brackets') === 0) { let rest = result.substr('@brackets'.length); let bracket = findBracket(this._lexer, matched); if (!bracket) { From c0bd80f7f5af25a8bafc1ecaff9e867545a7a5fc Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 15 Jun 2017 16:28:15 +0200 Subject: [PATCH 1920/2747] More TS 2.4 --- src/vs/editor/common/modes/monarch/monarchLexer.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/common/modes/monarch/monarchLexer.ts b/src/vs/editor/common/modes/monarch/monarchLexer.ts index daf73aae631e5..c13adda147b52 100644 --- a/src/vs/editor/common/modes/monarch/monarchLexer.ts +++ b/src/vs/editor/common/modes/monarch/monarchLexer.ts @@ -615,11 +615,12 @@ export class MonarchTokenizer implements modes.ITokenizationSupport { } else if (action.group) { result = action.group; } else if (action.token !== null && action.token !== undefined) { - result = action.token; // do $n replacements? if (action.tokenSubst) { - result = monarchCommon.substituteMatches(this._lexer, result, matched, matches, state); + result = monarchCommon.substituteMatches(this._lexer, action.token, matched, matches, state); + } else { + result = action.token; } // enter embedded mode? From 8abdf3bd50f7da6df85c85319004105fa9cbdde2 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Thu, 15 Jun 2017 16:54:05 +0200 Subject: [PATCH 1921/2747] Remove outdated explanations --- .../browser/controller/textAreaHandler.ts | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/vs/editor/browser/controller/textAreaHandler.ts b/src/vs/editor/browser/controller/textAreaHandler.ts index 40166317cbb98..23acec9b60416 100644 --- a/src/vs/editor/browser/controller/textAreaHandler.ts +++ b/src/vs/editor/browser/controller/textAreaHandler.ts @@ -420,25 +420,6 @@ export class TextAreaHandler extends ViewPart { Configuration.applyFontInfo(ta, this._fontInfo); } else { ta.setFontSize(1); - // Chrome does not generate input events in empty textareas that end - // up having a line height smaller than 1 screen pixel. - - // The problem is that I could not find any formula to explain how Chromium converts css px to screen px in the DOM. - // Observed values on a retina screen (by taking screenshots): - // |--------|-----------|------------|------------|-----------| - // | css px | zoomLevel | zoomFactor | pixelRatio | screen px | - // |--------|-----------|------------|------------|-----------| - // | 18 | -8 | 0.2325 | 0.5000 | 8 | - // | 18 | -7 | 0.2790 | 0.5581 | 10 | - // | 18 | -6 | 0.3348 | 0.6697 | 12 | - // | 18 | -5 | 0.4018 | 0.8037 | 14 | - // | 18 | -4 | 0.4822 | 0.9645 | 18 | - // | 18 | -3 | 0.5787 | 1.1574 | 20 | - // | 18 | -2 | 0.6944 | 1.3888 | 26 | - // | 18 | -1 | 0.8333 | 1.6666 | 30 | - // | 18 | 0 | 1.0000 | 2.0000 | 36 | - // |--------|-----------|------------|------------|-----------| - ta.setLineHeight(this._fontInfo.lineHeight); } From a0cf115d01069e93d438223d33c6fc6168788cfe Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 16 Jun 2017 09:18:31 +0200 Subject: [PATCH 1922/2747] Fixes #28694: Call `conf.setMaxLineNumber` before using the computed layout info --- src/vs/editor/common/commonCodeEditor.ts | 1 + src/vs/editor/common/viewModel/viewModelImpl.ts | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/vs/editor/common/commonCodeEditor.ts b/src/vs/editor/common/commonCodeEditor.ts index c5285a837245b..c636c9f8f5fc3 100644 --- a/src/vs/editor/common/commonCodeEditor.ts +++ b/src/vs/editor/common/commonCodeEditor.ts @@ -858,6 +858,7 @@ export abstract class CommonCodeEditor extends Disposable implements editorCommo if (this.model) { this.domElement.setAttribute('data-mode-id', this.model.getLanguageIdentifier().language); this._configuration.setIsDominatedByLongLines(this.model.isDominatedByLongLines()); + this._configuration.setMaxLineNumber(this.model.getLineCount()); this.model.onBeforeAttached(); diff --git a/src/vs/editor/common/viewModel/viewModelImpl.ts b/src/vs/editor/common/viewModel/viewModelImpl.ts index a7a7297e8810a..c05068d4a8379 100644 --- a/src/vs/editor/common/viewModel/viewModelImpl.ts +++ b/src/vs/editor/common/viewModel/viewModelImpl.ts @@ -120,8 +120,6 @@ export class ViewModel extends viewEvents.ViewEventEmitter implements IViewModel conf.wrappingInfo.wrappingIndent ); - this.configuration.setMaxLineNumber(this.model.getLineCount()); - this.coordinatesConverter = new CoordinatesConverter(this.lines); this.viewLayout = this._register(new ViewLayout(this.configuration, this.getLineCount())); From fd2dac6d5833ae422c2ede9c93a761bc4bcdb45a Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 16 Jun 2017 10:00:52 +0200 Subject: [PATCH 1923/2747] fixes #28506 --- extensions/git/src/commands.ts | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index 127544276ab13..05a93640ca1ad 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -5,7 +5,7 @@ 'use strict'; -import { Uri, commands, scm, Disposable, window, workspace, QuickPickItem, OutputChannel, Range, WorkspaceEdit, Position, LineChange, SourceControlResourceState } from 'vscode'; +import { Uri, commands, scm, Disposable, window, workspace, QuickPickItem, OutputChannel, Range, WorkspaceEdit, Position, LineChange, SourceControlResourceState, TextDocumentShowOptions, ViewColumn } from 'vscode'; import { Ref, RefType, Git, GitErrorCodes } from './git'; import { Model, Resource, Status, CommitOptions, WorkingTreeGroup, IndexGroup, MergeGroup } from './model'; import { toGitUri, fromGitUri } from './uri'; @@ -145,11 +145,18 @@ export class CommandCenter { return; } + const viewColumn = window.activeTextEditor && window.activeTextEditor.viewColumn || ViewColumn.One; + if (!left) { - return await commands.executeCommand('vscode.open', right); + return await commands.executeCommand('vscode.open', right, viewColumn); } - return await commands.executeCommand('vscode.diff', left, right, title, { preview: true }); + const opts: TextDocumentShowOptions = { + preview: true, + viewColumn + }; + + return await commands.executeCommand('vscode.diff', left, right, title, opts); } private getLeftResource(resource: Resource): Uri | undefined { @@ -289,7 +296,9 @@ export class CommandCenter { return; } - return await commands.executeCommand('vscode.open', uri); + const viewColumn = window.activeTextEditor && window.activeTextEditor.viewColumn || ViewColumn.One; + + return await commands.executeCommand('vscode.open', uri, viewColumn); } @command('git.openChange') @@ -329,7 +338,9 @@ export class CommandCenter { return; } - return await commands.executeCommand('vscode.open', uriToOpen); + const viewColumn = window.activeTextEditor && window.activeTextEditor.viewColumn || ViewColumn.One; + + return await commands.executeCommand('vscode.open', uriToOpen, viewColumn); } @command('git.stage') From 36ae1a6f81d0fb8930cc3ca6a2a01e72ca4ac024 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 16 Jun 2017 10:08:02 +0200 Subject: [PATCH 1924/2747] update distro related to #20732 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 6536cecc87a9d..109118846bd5a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "code-oss-dev", "version": "1.14.0", "electronVersion": "1.6.6", - "distro": "cb257c519d1ee526acfd00c0a7adc6b0fa4c18d2", + "distro": "652d5121d4004df51b085158050ea4a4af10693d", "author": { "name": "Microsoft Corporation" }, @@ -124,4 +124,4 @@ "windows-mutex": "^0.2.0", "fsevents": "0.3.8" } -} +} \ No newline at end of file From 7b3daf20432c1710f1c78ae34732d0e0dffbb762 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 16 Jun 2017 10:13:18 +0200 Subject: [PATCH 1925/2747] Small tweaks --- src/vs/editor/common/model/editableTextModel.ts | 7 +++++-- src/vs/editor/common/model/modelLine.ts | 7 ------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/vs/editor/common/model/editableTextModel.ts b/src/vs/editor/common/model/editableTextModel.ts index cbc963424da01..34f1fdfe8043d 100644 --- a/src/vs/editor/common/model/editableTextModel.ts +++ b/src/vs/editor/common/model/editableTextModel.ts @@ -581,7 +581,7 @@ export class EditableTextModel extends TextModelWithDecorations implements edito const spliceStartLineNumber = startLineNumber + editingLinesCnt; const spliceStartColumn = this.getLineMaxColumn(spliceStartLineNumber); - let endLineRemains = this._lines[endLineNumber - 1].split(markersTracker, endColumn, false, tabSize); + const endLineRemains = this._lines[endLineNumber - 1].split(markersTracker, endColumn, false, tabSize); this._invalidateLine(spliceStartLineNumber - 1); const spliceCnt = endLineNumber - spliceStartLineNumber; @@ -590,7 +590,10 @@ export class EditableTextModel extends TextModelWithDecorations implements edito let markersOnDeletedLines: LineMarker[] = []; for (let j = 0; j < spliceCnt; j++) { const deleteLineIndex = spliceStartLineNumber + j; - markersOnDeletedLines = markersOnDeletedLines.concat(this._lines[deleteLineIndex].deleteLine()); + const deleteLineMarkers = this._lines[deleteLineIndex].getMarkers(); + if (deleteLineMarkers) { + markersOnDeletedLines = markersOnDeletedLines.concat(deleteLineMarkers); + } } this._lines.splice(spliceStartLineNumber, spliceCnt); diff --git a/src/vs/editor/common/model/modelLine.ts b/src/vs/editor/common/model/modelLine.ts index b2d1b3eeea09a..4a1b012f60d00 100644 --- a/src/vs/editor/common/model/modelLine.ts +++ b/src/vs/editor/common/model/modelLine.ts @@ -741,13 +741,6 @@ export class ModelLine { this._lineNumber = newLineNumber; } - public deleteLine(): LineMarker[] { - if (!this._markers) { - return []; - } - return this._markers; - } - private _indexOfMarkerId(markerId: string): number { let markers = this._markers; for (let i = 0, len = markers.length; i < len; i++) { From d3c2ba364264db396d4eed1e9b27b8f8c223ffce Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 16 Jun 2017 10:16:11 +0200 Subject: [PATCH 1926/2747] better fix for NPE in editor.hide() --- .../browser/parts/editor/editorGroupsControl.ts | 8 ++------ src/vs/workbench/browser/parts/editor/editorPart.ts | 12 +++++++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index 2f9f422446205..4bc4a3b143a7d 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -519,12 +519,8 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro // Clear Position this.clearPosition(position); - // Take editor container offdom and hide. Check if the editor container - // exists in case someone manages to hide an editor before it was created - const editorContainer = editor.getContainer(); - if (editorContainer) { - editorContainer.offDOM().hide(); - } + // Take editor container offdom and hide + editor.getContainer().offDOM().hide(); // Adjust layout and rochade if instructed to do so if (layoutAndRochade) { diff --git a/src/vs/workbench/browser/parts/editor/editorPart.ts b/src/vs/workbench/browser/parts/editor/editorPart.ts index 7c4fdc9653b3f..2f7ff00c9be7b 100644 --- a/src/vs/workbench/browser/parts/editor/editorPart.ts +++ b/src/vs/workbench/browser/parts/editor/editorPart.ts @@ -361,7 +361,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService // Hide active one first if (editorAtPosition) { - this.doHideEditor(position, false); + this.doHideEditor(editorAtPosition, position, false); } // Create Editor @@ -592,8 +592,11 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService // Update stacks model this.modifyGroups(() => this.stacks.closeGroup(group)); - // Hide Editor - this.doHideEditor(position, true); + // Hide Editor if there is one + const editor = this.visibleEditors[position]; + if (editor) { + this.doHideEditor(editor, position, true); + } // Emit Change Event this._onEditorsChanged.fire(); @@ -613,8 +616,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService } } - private doHideEditor(position: Position, layoutAndRochade: boolean): void { - const editor = this.visibleEditors[position]; + private doHideEditor(editor: BaseEditor, position: Position, layoutAndRochade: boolean): void { // Hide in side by side control const rochade = this.editorGroupsControl.hide(editor, position, layoutAndRochade); From f02a1aced95318f93513bd44d14a9623434b58a9 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 16 Jun 2017 10:16:40 +0200 Subject: [PATCH 1927/2747] #27823 Prepare views to suppor toggling --- src/vs/base/browser/ui/splitview/splitview.ts | 1 + .../parts/files/browser/explorerViewlet.ts | 36 ++- .../parts/files/browser/views/emptyView.ts | 3 +- .../files/browser/views/openEditorsView.ts | 3 +- src/vs/workbench/parts/files/common/files.ts | 3 + src/vs/workbench/parts/views/browser/views.ts | 218 +++++++++++------- 6 files changed, 152 insertions(+), 112 deletions(-) diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 31710fb348938..6b2a1d5b20d83 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -617,6 +617,7 @@ export class SplitView implements this.viewFocusNextListeners.splice(index, 1); this.views.splice(index, 1); + this.initialWeights.splice(index, 1); this.el.removeChild(this.viewElements[index]); this.viewElements.splice(index, 1); diff --git a/src/vs/workbench/parts/files/browser/explorerViewlet.ts b/src/vs/workbench/parts/files/browser/explorerViewlet.ts index eaea1615ad2da..43a1d644a1d7b 100644 --- a/src/vs/workbench/parts/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/browser/explorerViewlet.ts @@ -10,9 +10,10 @@ import { IActionRunner } from 'vs/base/common/actions'; import { TPromise } from 'vs/base/common/winjs.base'; import * as DOM from 'vs/base/browser/dom'; import { Builder } from 'vs/base/browser/builder'; -import { VIEWLET_ID, ExplorerViewletVisibleContext, IFilesConfiguration } from 'vs/workbench/parts/files/common/files'; +import { VIEWLET_ID, ExplorerViewletVisibleContext, IFilesConfiguration, OpenEditorsVisibleContext, OpenEditorsVisibleCondition } from 'vs/workbench/parts/files/common/files'; import { ComposedViewsViewlet, IView, IViewletViewOptions } from 'vs/workbench/parts/views/browser/views'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; +import { IConfigurationEditingService } from 'vs/workbench/services/configuration/common/configurationEditing'; import { ActionRunner, FileViewletState } from 'vs/workbench/parts/files/browser/views/explorerViewer'; import { ExplorerView, IExplorerViewOptions } from 'vs/workbench/parts/files/browser/views/explorerView'; import { EmptyView } from 'vs/workbench/parts/files/browser/views/emptyView'; @@ -37,6 +38,7 @@ export class ExplorerViewlet extends ComposedViewsViewlet { private viewletState: FileViewletState; private viewletVisibleContextKey: IContextKey; + private openEditorsVisibleContextKey: IContextKey; constructor( @ITelemetryService telemetryService: ITelemetryService, @@ -47,14 +49,17 @@ export class ExplorerViewlet extends ComposedViewsViewlet { @IConfigurationService private configurationService: IConfigurationService, @IInstantiationService protected instantiationService: IInstantiationService, @IContextKeyService contextKeyService: IContextKeyService, + @IConfigurationEditingService private configurationEditingService: IConfigurationEditingService, @IThemeService themeService: IThemeService ) { super(VIEWLET_ID, ViewLocation.Explorer, ExplorerViewlet.EXPLORER_VIEWS_STATE, telemetryService, storageService, instantiationService, themeService, contextService, contextKeyService); this.viewletState = new FileViewletState(); this.viewletVisibleContextKey = ExplorerViewletVisibleContext.bindTo(contextKeyService); + this.openEditorsVisibleContextKey = OpenEditorsVisibleContext.bindTo(contextKeyService); this.registerViews(); + this.onConfigurationUpdated(); this._register(this.configurationService.onDidUpdateConfiguration(e => this.onConfigurationUpdated())); } @@ -64,9 +69,9 @@ export class ExplorerViewlet extends ComposedViewsViewlet { private registerViews(): void { let viewDescriptors = []; - if (this.isOpenEditorsVisible()) { - viewDescriptors.push(this.createOpenEditorsViewDescriptor()); - } + + viewDescriptors.push(this.createOpenEditorsViewDescriptor()); + if (this.contextService.hasWorkspace()) { viewDescriptors.push(this.createExplorerViewDescriptor()); } else { @@ -79,17 +84,18 @@ export class ExplorerViewlet extends ComposedViewsViewlet { private createOpenEditorsViewDescriptor(): IViewDescriptor { return { id: OpenEditorsView.ID, - name: '', + name: OpenEditorsView.NAME, location: ViewLocation.Explorer, ctor: OpenEditorsView, - order: 0 + order: 0, + when: OpenEditorsVisibleCondition }; } private createEmptyViewDescriptor(): IViewDescriptor { return { id: EmptyView.ID, - name: '', + name: EmptyView.NAME, location: ViewLocation.Explorer, ctor: EmptyView, order: 1 @@ -107,21 +113,7 @@ export class ExplorerViewlet extends ComposedViewsViewlet { } private onConfigurationUpdated(): void { - let openEditorsViewDescriptor = ViewsRegistry.getViews(ViewLocation.Explorer).filter(viewDescriptor => viewDescriptor.id === OpenEditorsView.ID)[0]; - let isOpenEditorsVisible = this.isOpenEditorsVisible(); - if (isOpenEditorsVisible) { - if (!openEditorsViewDescriptor) { - ViewsRegistry.registerViews([this.createOpenEditorsViewDescriptor()]); - } - } else { - if (openEditorsViewDescriptor) { - ViewsRegistry.deregisterViews([OpenEditorsView.ID], ViewLocation.Explorer); - } - } - } - - private isOpenEditorsVisible(): boolean { - return !this.contextService.hasWorkspace() || (this.configurationService.getConfiguration()).explorer.openEditors.visible !== 0; + this.openEditorsVisibleContextKey.set(!this.contextService.hasWorkspace() || (this.configurationService.getConfiguration()).explorer.openEditors.visible !== 0); } protected createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): IView { diff --git a/src/vs/workbench/parts/files/browser/views/emptyView.ts b/src/vs/workbench/parts/files/browser/views/emptyView.ts index 7cecda136e6cf..287fce6684510 100644 --- a/src/vs/workbench/parts/files/browser/views/emptyView.ts +++ b/src/vs/workbench/parts/files/browser/views/emptyView.ts @@ -25,6 +25,7 @@ import { ViewSizing } from 'vs/base/browser/ui/splitview/splitview'; export class EmptyView extends CollapsibleView { public static ID: string = 'workbench.explorer.emptyView'; + public static NAME = nls.localize('noWorkspace', "No Folder Opened"); private openFolderButton: Button; @@ -40,7 +41,7 @@ export class EmptyView extends CollapsibleView { public renderHeader(container: HTMLElement): void { let titleDiv = $('div.title').appendTo(container); - $('span').text(nls.localize('noWorkspace', "No Folder Opened")).appendTo(titleDiv); + $('span').text(this.name).appendTo(titleDiv); } protected renderBody(container: HTMLElement): void { diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts index 10c10b7736f0e..2b1f079b929fe 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts @@ -42,6 +42,7 @@ export class OpenEditorsView extends CollapsibleView { private static DEFAULT_VISIBLE_OPEN_EDITORS = 9; private static DEFAULT_DYNAMIC_HEIGHT = true; static ID = 'workbench.explorer.openEditorsView'; + static NAME = nls.localize({ key: 'openEditors', comment: ['Open is an adjective'] }, "Open Editors"); private visibleOpenEditors: number; private dynamicHeight: boolean; @@ -88,7 +89,7 @@ export class OpenEditorsView extends CollapsibleView { public renderHeader(container: HTMLElement): void { const titleDiv = dom.append(container, $('.title')); const titleSpan = dom.append(titleDiv, $('span')); - titleSpan.textContent = nls.localize({ key: 'openEditors', comment: ['Open is an adjective'] }, "Open Editors"); + titleSpan.textContent = this.name; this.dirtyCountElement = dom.append(titleDiv, $('.monaco-count-badge')); diff --git a/src/vs/workbench/parts/files/common/files.ts b/src/vs/workbench/parts/files/common/files.ts index dc8cd834b61fc..fcb7b3174681e 100644 --- a/src/vs/workbench/parts/files/common/files.ts +++ b/src/vs/workbench/parts/files/common/files.ts @@ -21,6 +21,7 @@ export const VIEWLET_ID = 'workbench.view.explorer'; */ const explorerViewletVisibleId = 'explorerViewletVisible'; const filesExplorerFocusId = 'filesExplorerFocus'; +const openEditorsVisibleId = 'openEditorsVisible'; const openEditorsFocusId = 'openEditorsFocus'; const explorerViewletFocusId = 'explorerViewletFocus'; const explorerResourceIsFolderId = 'explorerResourceIsFolder'; @@ -28,9 +29,11 @@ const explorerResourceIsFolderId = 'explorerResourceIsFolder'; export const ExplorerViewletVisibleContext = new RawContextKey(explorerViewletVisibleId, true); export const ExplorerFolderContext = new RawContextKey(explorerResourceIsFolderId, false); export const FilesExplorerFocussedContext = new RawContextKey(filesExplorerFocusId, false); +export const OpenEditorsVisibleContext = new RawContextKey(openEditorsVisibleId, false); export const OpenEditorsFocussedContext = new RawContextKey(openEditorsFocusId, false); export const ExplorerFocussedContext = new RawContextKey(explorerViewletFocusId, false); +export const OpenEditorsVisibleCondition = ContextKeyExpr.has(openEditorsVisibleId); export const FilesExplorerFocusCondition = ContextKeyExpr.and(ContextKeyExpr.has(explorerViewletVisibleId), ContextKeyExpr.has(filesExplorerFocusId)); export const ExplorerFocusCondition = ContextKeyExpr.and(ContextKeyExpr.has(explorerViewletVisibleId), ContextKeyExpr.has(explorerViewletFocusId)); diff --git a/src/vs/workbench/parts/views/browser/views.ts b/src/vs/workbench/parts/views/browser/views.ts index 382e14ed69506..f263f1c735264 100644 --- a/src/vs/workbench/parts/views/browser/views.ts +++ b/src/vs/workbench/parts/views/browser/views.ts @@ -51,6 +51,8 @@ export interface IView extends IBaseView, IThemable { id: string; + name: string; + create(): TPromise; setVisible(visible: boolean): TPromise; @@ -89,8 +91,8 @@ export interface ICollapsibleViewOptions extends IViewOptions { export abstract class CollapsibleView extends AbstractCollapsibleView implements IView { readonly id: string; + readonly name: string; - protected viewName: string; protected treeContainer: HTMLElement; protected tree: ITree; protected toDispose: IDisposable[]; @@ -114,7 +116,7 @@ export abstract class CollapsibleView extends AbstractCollapsibleView implements }); this.id = options.id; - this.viewName = options.name; + this.name = options.name; this.actionRunner = options.actionRunner; this.toDispose = []; } @@ -135,7 +137,7 @@ export abstract class CollapsibleView extends AbstractCollapsibleView implements this.toolBar = new ToolBar($('div.actions').appendTo(container).getHTMLElement(), this.contextMenuService, { orientation: ActionsOrientation.HORIZONTAL, actionItemProvider: (action) => this.getActionItem(action), - ariaLabel: nls.localize('viewToolbarAriaLabel', "{0} actions", this.viewName), + ariaLabel: nls.localize('viewToolbarAriaLabel', "{0} actions", this.name), getKeyBinding: (action) => this.keybindingService.lookupKeybinding(action.id) }); this.toolBar.actionRunner = this.actionRunner; @@ -213,7 +215,10 @@ export abstract class CollapsibleView extends AbstractCollapsibleView implements public dispose(): void { this.isDisposed = true; this.treeContainer = null; - this.tree.dispose(); + + if (this.tree) { + this.tree.dispose(); + } if (this.dragHandler) { this.dragHandler.dispose(); @@ -268,11 +273,12 @@ export interface IViewletViewOptions extends IViewOptions { } -export interface IViewState { +interface IViewState { collapsed: boolean; size: number; + } export class ComposedViewsViewlet extends Viewlet { @@ -285,6 +291,7 @@ export class ComposedViewsViewlet extends Viewlet { private dimension: Dimension; private viewletSettings: any; + private readonly viewsContextKeys: Set = new Set(); private readonly viewsStates: Map; constructor( @@ -304,8 +311,8 @@ export class ComposedViewsViewlet extends Viewlet { this.viewletSettings = this.getMemento(storageService, Scope.WORKSPACE); this.viewsStates = this.loadViewsStates(); - this._register(ViewsRegistry.onViewsRegistered(viewDescriptors => this.addViews(viewDescriptors.filter(viewDescriptor => this.location === viewDescriptor.location)))); - this._register(ViewsRegistry.onViewsDeregistered(viewDescriptors => this.updateViews([], viewDescriptors.filter(viewDescriptor => this.location === viewDescriptor.location)))); + this._register(ViewsRegistry.onViewsRegistered(() => this.onViewDescriptorsChanged())); + this._register(ViewsRegistry.onViewsDeregistered(() => this.onViewDescriptorsChanged())); this._register(contextKeyService.onDidChangeContext(keys => this.onContextChanged(keys))); } @@ -316,7 +323,7 @@ export class ComposedViewsViewlet extends Viewlet { this.splitView = this._register(new SplitView(this.viewletContainer)); this._register(this.splitView.onFocus((view: IView) => this.lastFocusedView = view)); - return this.addViews(ViewsRegistry.getViews(this.location)) + return this.onViewDescriptorsChanged() .then(() => { this.lastFocusedView = this.views[0]; this.focus(); @@ -337,20 +344,101 @@ export class ComposedViewsViewlet extends Viewlet { return []; } - private addViews(viewDescriptors: IViewDescriptor[]): TPromise { - viewDescriptors = viewDescriptors.filter(viewDescriptor => this.contextKeyService.contextMatchesRules(viewDescriptor.when)); - return this.updateViews(viewDescriptors, []); + public setVisible(visible: boolean): TPromise { + return super.setVisible(visible) + .then(() => TPromise.join(this.views.map((view) => view.setVisible(visible)))) + .then(() => void 0); + } + + public focus(): void { + super.focus(); + if (this.lastFocusedView) { + this.lastFocusedView.focus(); + } + } + + public layout(dimension: Dimension): void { + this.dimension = dimension; + this.splitView.layout(dimension.height); + for (const view of this.views) { + let viewState = this.createViewState(view); + this.viewsStates.set(view.id, viewState); + } + } + + public getOptimalWidth(): number { + const additionalMargin = 16; + const optimalWidth = Math.max(...this.views.map(view => view.getOptimalWidth() || 0)); + return optimalWidth + additionalMargin; + } + + public shutdown(): void { + this.saveViewsStates(); + this.views.forEach((view) => view.shutdown()); + super.shutdown(); + } + + private onViewDescriptorsChanged(): TPromise { + this.viewsContextKeys.clear(); + for (const viewDescriptor of this.getViewDescriptorsFromRegistry()) { + if (viewDescriptor.when) { + for (const key of viewDescriptor.when.keys()) { + this.viewsContextKeys.add(key); + } + } + } + return this.updateViews(); + } + + private onContextChanged(keys: string[]): void { + let hasToUpdate: boolean = false; + for (const key of keys) { + if (this.viewsContextKeys.has(key)) { + hasToUpdate = true; + break; + } + } + + if (hasToUpdate) { + this.updateViews(); + } } - private updateViews(toAdd: IViewDescriptor[], toRemove: IViewDescriptor[]): TPromise { - if (!this.splitView || (!toAdd.length && !toRemove.length)) { + private updateViews(): TPromise { + + if (!this.splitView) { + return TPromise.as(null); + } + + const registeredViews = this.getViewDescriptorsFromRegistry(); + const [visible, toAdd, toRemove] = registeredViews.reduce<[IViewDescriptor[], IViewDescriptor[], IViewDescriptor[]]>((result, viewDescriptor) => { + const isCurrentlyVisible = !!this.getView(viewDescriptor.id); + const canBeVisible = this.canBeVisible(viewDescriptor); + + if (canBeVisible) { + result[0].push(viewDescriptor); + } + + if (!isCurrentlyVisible && canBeVisible) { + result[1].push(viewDescriptor); + } + + if (isCurrentlyVisible && !canBeVisible) { + result[2].push(viewDescriptor); + } + + return result; + + }, [[], [], []]); + + if (!toAdd.length && !toRemove.length) { return TPromise.as(null); } for (const view of this.views) { let viewState = this.viewsStates.get(view.id); if (!viewState || view.size !== viewState.size || !view.isExpanded() !== viewState.collapsed) { - viewState = this.getViewState(view); + viewState = this.createViewState(view); this.viewsStates.set(view.id, viewState); this.splitView.updateWeight(view, viewState.size); } @@ -359,29 +447,16 @@ export class ComposedViewsViewlet extends Viewlet { if (toRemove.length) { for (const viewDescriptor of toRemove) { let view = this.getView(viewDescriptor.id); - if (view) { - this.views.splice(this.views.indexOf(view), 1); - this.splitView.removeView(view); - } + this.views.splice(this.views.indexOf(view), 1); + this.splitView.removeView(view); } } const toCreate = []; - const viewsInOrder = ViewsRegistry.getViews(this.location) - .filter(viewDescriptor => this.contextKeyService.contextMatchesRules(viewDescriptor.when)) - .sort((a, b) => { - if (b.order === void 0 || b.order === null) { - return -1; - } - if (a.order === void 0 || a.order === null) { - return 1; - } - return a.order - b.order; - }); for (const viewDescriptor of toAdd) { let viewState = this.viewsStates.get(viewDescriptor.id); - let index = viewsInOrder.indexOf(viewDescriptor); + let index = visible.indexOf(viewDescriptor); const view = this.createView(viewDescriptor, { id: viewDescriptor.id, name: viewDescriptor.name, @@ -400,6 +475,10 @@ export class ComposedViewsViewlet extends Viewlet { .then(() => this.onViewsUpdated()); } + private canBeVisible(viewDescriptor: IViewDescriptor): boolean { + return this.contextKeyService.contextMatchesRules(viewDescriptor.when); + } + private onViewsUpdated(): TPromise { if (this.views.length === 1) { this.views[0].hideHeader(); @@ -422,72 +501,35 @@ export class ComposedViewsViewlet extends Viewlet { return this.setVisible(this.isVisible()); } - private onContextChanged(keys: string[]): void { - let viewsToCreate: IViewDescriptor[] = []; - let viewsToRemove: IViewDescriptor[] = []; - - for (const viewDescriptor of ViewsRegistry.getViews(this.location)) { - const view = this.getView(viewDescriptor.id); - if (this.contextKeyService.contextMatchesRules(viewDescriptor.when)) { - if (!view) { - viewsToCreate.push(viewDescriptor); + private getViewDescriptorsFromRegistry(): IViewDescriptor[] { + return ViewsRegistry.getViews(this.location) + .sort((a, b) => { + if (b.order === void 0 || b.order === null) { + return -1; } - } else { - if (view) { - viewsToRemove.push(viewDescriptor); + if (a.order === void 0 || a.order === null) { + return 1; } - } - } - - this.updateViews(viewsToCreate, viewsToRemove); - } - - public setVisible(visible: boolean): TPromise { - return super.setVisible(visible) - .then(() => TPromise.join(this.views.map((view) => view.setVisible(visible)))) - .then(() => void 0); - } - - public focus(): void { - super.focus(); - if (this.lastFocusedView) { - this.lastFocusedView.focus(); - } - } - - public layout(dimension: Dimension): void { - this.dimension = dimension; - this.splitView.layout(dimension.height); - for (const view of this.views) { - let viewState = this.getViewState(view); - this.viewsStates.set(view.id, viewState); - } - } - - public getOptimalWidth(): number { - const additionalMargin = 16; - const optimalWidth = Math.max(...this.views.map(view => view.getOptimalWidth() || 0)); - return optimalWidth + additionalMargin; + return a.order - b.order; + }); } - public shutdown(): void { - this.saveViewsStates(); - this.views.forEach((view) => view.shutdown()); - super.shutdown(); - } + private saveViewsStates(): void { + const viewsStates = {}; + this.viewsStates.forEach((viewState, id) => { + const view = this.getView(id); + viewState = view ? this.createViewState(view) : viewState; + viewsStates[id] = { size: viewState.size, collapsed: viewState.collapsed }; + }); - protected saveViewsStates(): void { - const viewletState = this.views.reduce((result, view) => { - result[view.id] = this.getViewState(view); - return result; - }, {}); - this.storageService.store(this.viewletStateStorageId, JSON.stringify(viewletState), this.contextService.hasWorkspace() ? StorageScope.WORKSPACE : StorageScope.GLOBAL); + this.storageService.store(this.viewletStateStorageId, JSON.stringify(viewsStates), this.contextService.hasWorkspace() ? StorageScope.WORKSPACE : StorageScope.GLOBAL); } - protected loadViewsStates(): Map { + private loadViewsStates(): Map { const viewsStates = JSON.parse(this.storageService.get(this.viewletStateStorageId, this.contextService.hasWorkspace() ? StorageScope.WORKSPACE : StorageScope.GLOBAL, '{}')); return Object.keys(viewsStates).reduce((result, id) => { - result.set(id, viewsStates[id]); + const viewState = viewsStates[id]; + result.set(id, viewState); return result; }, new Map()); } @@ -500,7 +542,7 @@ export class ComposedViewsViewlet extends Viewlet { return this.views.filter(view => view.id === id)[0]; } - private getViewState(view: IView): IViewState { + private createViewState(view: IView): IViewState { const collapsed = !view.isExpanded(); const size = collapsed && view instanceof CollapsibleView ? view.previousSize : view.size; return { From 735de9f1d76b0a2da7fb95495bbccbf540d73629 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 16 Jun 2017 11:02:36 +0200 Subject: [PATCH 1928/2747] remove tree.refreshAll --- src/vs/base/parts/tree/browser/tree.ts | 5 --- src/vs/base/parts/tree/browser/treeImpl.ts | 4 --- src/vs/base/parts/tree/browser/treeModel.ts | 17 --------- .../parts/tree/test/browser/treeModel.test.ts | 36 ------------------- 4 files changed, 62 deletions(-) diff --git a/src/vs/base/parts/tree/browser/tree.ts b/src/vs/base/parts/tree/browser/tree.ts index 2b03b5f138b76..30435a9ddb070 100644 --- a/src/vs/base/parts/tree/browser/tree.ts +++ b/src/vs/base/parts/tree/browser/tree.ts @@ -76,11 +76,6 @@ export interface ITree extends Events.IEventEmitter { */ refresh(element?: any, recursive?: boolean): WinJS.Promise; - /** - * Refreshes all given elements. - */ - refreshAll(elements: any[], recursive?: boolean): WinJS.Promise; - /** * Expands an element. * The returned promise returns a boolean for whether the element was expanded or not. diff --git a/src/vs/base/parts/tree/browser/treeImpl.ts b/src/vs/base/parts/tree/browser/treeImpl.ts index ea81d203047b8..8bd111975601f 100644 --- a/src/vs/base/parts/tree/browser/treeImpl.ts +++ b/src/vs/base/parts/tree/browser/treeImpl.ts @@ -170,10 +170,6 @@ export class Tree extends Events.EventEmitter implements _.ITree { return this.model.refresh(element, recursive); } - public refreshAll(elements: any[], recursive = true): WinJS.Promise { - return this.model.refreshAll(elements, recursive); - } - public expand(element: any): WinJS.Promise { return this.model.expand(element); } diff --git a/src/vs/base/parts/tree/browser/treeModel.ts b/src/vs/base/parts/tree/browser/treeModel.ts index a3fbdfa04d571..9ca9f059c7279 100644 --- a/src/vs/base/parts/tree/browser/treeModel.ts +++ b/src/vs/base/parts/tree/browser/treeModel.ts @@ -839,23 +839,6 @@ export class TreeModel extends Events.EventEmitter { }); } - public refreshAll(elements: any[], recursive: boolean = true): WinJS.Promise { - try { - this.beginDeferredEmit(); - return this._refreshAll(elements, recursive); - } finally { - this.endDeferredEmit(); - } - } - - private _refreshAll(elements: any[], recursive: boolean): WinJS.Promise { - var promises = []; - for (var i = 0, len = elements.length; i < len; i++) { - promises.push(this.refresh(elements[i], recursive)); - } - return WinJS.Promise.join(promises); - } - public expand(element: any): WinJS.Promise { var item = this.getItem(element); diff --git a/src/vs/base/parts/tree/test/browser/treeModel.test.ts b/src/vs/base/parts/tree/test/browser/treeModel.test.ts index efb3c25a5b8fb..c9c890127e2cb 100644 --- a/src/vs/base/parts/tree/test/browser/treeModel.test.ts +++ b/src/vs/base/parts/tree/test/browser/treeModel.test.ts @@ -293,42 +293,6 @@ suite('TreeModel', () => { }); }); - test('refreshAll(...) refreshes the elements and descendants', (done) => { - model.setInput(SAMPLE.AB).then(() => { - model.expand(SAMPLE.AB.children[0]); - model.expand(SAMPLE.AB.children[2]); - - counter.listen(model, 'refreshing'); // 3 - counter.listen(model, 'refreshed'); // 3 - counter.listen(model, 'item:refresh'); // 7 - counter.listen(model, 'item:childrenRefreshing'); // 2 - counter.listen(model, 'item:childrenRefreshed'); // 2 - - return model.refreshAll([SAMPLE.AB.children[0], SAMPLE.AB.children[1], SAMPLE.AB.children[2]]); - }).done(() => { - assert.equal(counter.count, 17); - done(); - }); - }); - - test('refreshAll(..., false) refreshes the elements', (done) => { - model.setInput(SAMPLE.AB).then(() => { - model.expand(SAMPLE.AB.children[0]); - model.expand(SAMPLE.AB.children[2]); - - counter.listen(model, 'refreshing'); // 3 - counter.listen(model, 'refreshed'); // 3 - counter.listen(model, 'item:refresh'); // 3 - counter.listen(model, 'item:childrenRefreshing'); // 2 - counter.listen(model, 'item:childrenRefreshed'); // 2 - - return model.refreshAll([SAMPLE.AB.children[0], SAMPLE.AB.children[1], SAMPLE.AB.children[2]], false); - }).done(() => { - assert.equal(counter.count, 13); - done(); - }); - }); - test('depths', (done) => { model.setInput(SAMPLE.AB).then(() => { model.expandAll(['a', 'c']); From 1cc1b75d78c7b2cf2e5922ba7afcf072826d232a Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 16 Jun 2017 11:04:16 +0200 Subject: [PATCH 1929/2747] tfs: fix concurrent windows builds --- build/tfs/win32/lib.ps1 | 5 ++++- scripts/env.ps1 | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build/tfs/win32/lib.ps1 b/build/tfs/win32/lib.ps1 index 610b4d7fcdfed..ed8407b7013af 100644 --- a/build/tfs/win32/lib.ps1 +++ b/build/tfs/win32/lib.ps1 @@ -1,8 +1,11 @@ # stop when there's an error $ErrorActionPreference = 'Stop' -# set agent specific npm cache if (Test-Path env:AGENT_WORKFOLDER) { + # will be used by node-gyp + $env:HOME = "${env:AGENT_WORKFOLDER}\home" + + # will be used by npm $env:npm_config_cache = "${env:AGENT_WORKFOLDER}\npm-cache" } diff --git a/scripts/env.ps1 b/scripts/env.ps1 index 3d34630f391e7..f05a5680644f6 100644 --- a/scripts/env.ps1 +++ b/scripts/env.ps1 @@ -1,5 +1,5 @@ $env:npm_config_disturl="https://atom.io/download/electron" $env:npm_config_target=(node -p "require('./package.json').electronVersion") $env:npm_config_runtime="electron" -$env:npm_config_cache="$HOME/.npm-electron" +$env:npm_config_cache="${env:USERPROFILE}/.npm-electron" New-Item -Path "$env:npm_config_cache" -Type directory -Force | out-null \ No newline at end of file From 7e70dc1a47c0a637fa81c46496533f860555ac49 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 16 Jun 2017 11:13:11 +0200 Subject: [PATCH 1930/2747] tfs: fix windows build --- build/tfs/win32/1_build.ps1 | 3 +-- build/tfs/win32/lib.ps1 | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build/tfs/win32/1_build.ps1 b/build/tfs/win32/1_build.ps1 index 0f473ddeff5a0..34b44826fc09f 100644 --- a/build/tfs/win32/1_build.ps1 +++ b/build/tfs/win32/1_build.ps1 @@ -9,8 +9,7 @@ Param( # Create a _netrc file to download distro dependencies # In order to get _netrc to work, we need a HOME variable setup -$env:HOME=$env:USERPROFILE -"machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:USERPROFILE\_netrc" -Encoding ASCII +"machine monacotools.visualstudio.com password ${vsoPAT}" | Out-File "$env:HOME\_netrc" -Encoding ASCII # Set the right architecture $env:npm_config_arch="$arch" diff --git a/build/tfs/win32/lib.ps1 b/build/tfs/win32/lib.ps1 index ed8407b7013af..c2e9c1d83ef63 100644 --- a/build/tfs/win32/lib.ps1 +++ b/build/tfs/win32/lib.ps1 @@ -1,12 +1,16 @@ # stop when there's an error $ErrorActionPreference = 'Stop' +$env:HOME=$env:USERPROFILE + if (Test-Path env:AGENT_WORKFOLDER) { # will be used by node-gyp $env:HOME = "${env:AGENT_WORKFOLDER}\home" + New-Item -Path "$env:HOME" -Type directory -Force | out-null # will be used by npm $env:npm_config_cache = "${env:AGENT_WORKFOLDER}\npm-cache" + New-Item -Path "$env:npm_config_cache" -Type directory -Force | out-null } # throw when a process exits with something other than 0 From 3462fd14bea6c93d3829a38e9c38d31b164a8e82 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 16 Jun 2017 11:22:32 +0200 Subject: [PATCH 1931/2747] tfs: windows build --- build/tfs/win32/lib.ps1 | 11 ++++------- scripts/env.ps1 | 4 +--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/build/tfs/win32/lib.ps1 b/build/tfs/win32/lib.ps1 index c2e9c1d83ef63..9dfaeabf7a6f8 100644 --- a/build/tfs/win32/lib.ps1 +++ b/build/tfs/win32/lib.ps1 @@ -3,13 +3,10 @@ $ErrorActionPreference = 'Stop' $env:HOME=$env:USERPROFILE -if (Test-Path env:AGENT_WORKFOLDER) { - # will be used by node-gyp - $env:HOME = "${env:AGENT_WORKFOLDER}\home" - New-Item -Path "$env:HOME" -Type directory -Force | out-null - - # will be used by npm - $env:npm_config_cache = "${env:AGENT_WORKFOLDER}\npm-cache" +if (Test-Path env:AGENT_HOMEDIRECTORY) { + $env:USERPROFILE="${env:AGENT_HOMEDIRECTORY}" + $env:HOME="${env:AGENT_HOMEDIRECTORY}" + $env:npm_config_cache="${env:AGENT_HOMEDIRECTORY}/.npm-electron" New-Item -Path "$env:npm_config_cache" -Type directory -Force | out-null } diff --git a/scripts/env.ps1 b/scripts/env.ps1 index f05a5680644f6..afd26f17baab6 100644 --- a/scripts/env.ps1 +++ b/scripts/env.ps1 @@ -1,5 +1,3 @@ $env:npm_config_disturl="https://atom.io/download/electron" $env:npm_config_target=(node -p "require('./package.json').electronVersion") -$env:npm_config_runtime="electron" -$env:npm_config_cache="${env:USERPROFILE}/.npm-electron" -New-Item -Path "$env:npm_config_cache" -Type directory -Force | out-null \ No newline at end of file +$env:npm_config_runtime="electron" \ No newline at end of file From 5ed899192b6d5735370ef95105a98c20da38e423 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 16 Jun 2017 11:25:16 +0200 Subject: [PATCH 1932/2747] tfs: windows build --- build/tfs/win32/lib.ps1 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build/tfs/win32/lib.ps1 b/build/tfs/win32/lib.ps1 index 9dfaeabf7a6f8..ed7b80fc7d73e 100644 --- a/build/tfs/win32/lib.ps1 +++ b/build/tfs/win32/lib.ps1 @@ -3,10 +3,11 @@ $ErrorActionPreference = 'Stop' $env:HOME=$env:USERPROFILE -if (Test-Path env:AGENT_HOMEDIRECTORY) { - $env:USERPROFILE="${env:AGENT_HOMEDIRECTORY}" - $env:HOME="${env:AGENT_HOMEDIRECTORY}" - $env:npm_config_cache="${env:AGENT_HOMEDIRECTORY}/.npm-electron" +if (Test-Path env:AGENT_WORKFOLDER) { + $env:USERPROFILE="${env:AGENT_WORKFOLDER}/home" + $env:HOME="${env:USERPROFILE}" + $env:npm_config_cache="${env:USERPROFILE}/.npm-electron" + New-Item -Path "$env:USERPROFILE" -Type directory -Force | out-null New-Item -Path "$env:npm_config_cache" -Type directory -Force | out-null } From 01c71c1a7eb8a3c76e45b6fe317cc0f9045b48ac Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 16 Jun 2017 11:26:55 +0200 Subject: [PATCH 1933/2747] tfs: windows build --- build/tfs/win32/lib.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/tfs/win32/lib.ps1 b/build/tfs/win32/lib.ps1 index ed7b80fc7d73e..c35f6935081c9 100644 --- a/build/tfs/win32/lib.ps1 +++ b/build/tfs/win32/lib.ps1 @@ -4,9 +4,9 @@ $ErrorActionPreference = 'Stop' $env:HOME=$env:USERPROFILE if (Test-Path env:AGENT_WORKFOLDER) { - $env:USERPROFILE="${env:AGENT_WORKFOLDER}/home" + $env:USERPROFILE="${env:AGENT_WORKFOLDER}\home" $env:HOME="${env:USERPROFILE}" - $env:npm_config_cache="${env:USERPROFILE}/.npm-electron" + $env:npm_config_cache="${env:USERPROFILE}\.npm-electron" New-Item -Path "$env:USERPROFILE" -Type directory -Force | out-null New-Item -Path "$env:npm_config_cache" -Type directory -Force | out-null } From 88fd820176280fdc3fd7015dc17cf5e71282c728 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 16 Jun 2017 11:27:41 +0200 Subject: [PATCH 1934/2747] tfs: windows build --- build/tfs/win32/lib.ps1 | 2 -- 1 file changed, 2 deletions(-) diff --git a/build/tfs/win32/lib.ps1 b/build/tfs/win32/lib.ps1 index c35f6935081c9..7bac6c3eccd7b 100644 --- a/build/tfs/win32/lib.ps1 +++ b/build/tfs/win32/lib.ps1 @@ -6,9 +6,7 @@ $env:HOME=$env:USERPROFILE if (Test-Path env:AGENT_WORKFOLDER) { $env:USERPROFILE="${env:AGENT_WORKFOLDER}\home" $env:HOME="${env:USERPROFILE}" - $env:npm_config_cache="${env:USERPROFILE}\.npm-electron" New-Item -Path "$env:USERPROFILE" -Type directory -Force | out-null - New-Item -Path "$env:npm_config_cache" -Type directory -Force | out-null } # throw when a process exits with something other than 0 From e239a4512ed7fa27f9a8f1ccea33f8544dd5c381 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 16 Jun 2017 11:29:34 +0200 Subject: [PATCH 1935/2747] tfs: windows build --- build/tfs/win32/lib.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/tfs/win32/lib.ps1 b/build/tfs/win32/lib.ps1 index 7bac6c3eccd7b..3f5b13a02e106 100644 --- a/build/tfs/win32/lib.ps1 +++ b/build/tfs/win32/lib.ps1 @@ -6,7 +6,9 @@ $env:HOME=$env:USERPROFILE if (Test-Path env:AGENT_WORKFOLDER) { $env:USERPROFILE="${env:AGENT_WORKFOLDER}\home" $env:HOME="${env:USERPROFILE}" + $env:npm_config_cache="${env:USERPROFILE}\npm-cache" New-Item -Path "$env:USERPROFILE" -Type directory -Force | out-null + New-Item -Path "$env:npm_config_cache" -Type directory -Force | out-null } # throw when a process exits with something other than 0 From 6d96b62559b055ffe60738171e52cf7a7dc97125 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 16 Jun 2017 11:33:54 +0200 Subject: [PATCH 1936/2747] refresh all parants properly --- .../parts/files/browser/views/explorerView.ts | 12 ++++++------ .../parts/files/browser/views/explorerViewer.ts | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index a0003873dda3a..14c57378a429a 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -438,7 +438,7 @@ export class ExplorerView extends CollapsibleView { parents[0].addChild(childElement); // Refresh the Parent (View) - this.explorerViewer.refresh(parents).then(() => { + TPromise.join(parents.map(p => this.explorerViewer.refresh(p))).then(() => { return this.reveal(childElement, 0.5).then(() => { // Focus new element @@ -474,7 +474,7 @@ export class ExplorerView extends CollapsibleView { // Update Parent (View) parents = this.model.findAll(modelElement.parent.resource); if (parents.length) { - this.explorerViewer.refresh(parents).done(() => { + TPromise.join(parents.map(p => this.explorerViewer.refresh(p))).done(() => { // Select in Viewer if set if (restoreFocus) { @@ -497,11 +497,11 @@ export class ExplorerView extends CollapsibleView { modelElement.move(newParents[0], (callback: () => void) => { // Update old parent - this.explorerViewer.refresh(oldParents, true).done(callback, errors.onUnexpectedError); + TPromise.join(oldParents.map(p => this.explorerViewer.refresh(p))).done(callback, errors.onUnexpectedError); }, () => { // Update new parent - this.explorerViewer.refresh(newParents, true).done(() => this.explorerViewer.expand(newParents[0]), errors.onUnexpectedError); + TPromise.join(newParents.map(p => this.explorerViewer.refresh(p, true))).done(() => this.explorerViewer.expand(newParents[0]), errors.onUnexpectedError); }); } } @@ -518,7 +518,7 @@ export class ExplorerView extends CollapsibleView { // Refresh Parent (View) const restoreFocus = this.explorerViewer.isDOMFocused(); - this.explorerViewer.refresh(parents).done(() => { + TPromise.join(parents.map(p => this.explorerViewer.refresh(p))).done(() => { // Ensure viewer has keyboard focus if event originates from viewer if (restoreFocus) { @@ -806,7 +806,7 @@ export class ExplorerView extends CollapsibleView { // Stat needs to be resolved first and then revealed const options: IResolveFileOptions = { resolveTo: [resource] }; - const rootUri = this.contextService.getRoot(resource); + const rootUri = this.contextService.getRoot(resource) || this.model.roots[0].resource; return this.fileService.resolveFile(rootUri, options).then(stat => { // Convert to model diff --git a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts index 39890cff44e18..f81588d664940 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts @@ -75,7 +75,8 @@ export class FileDataSource implements IDataSource { return 'model'; } - return `${this.contextService.getRoot(stat.resource).toString()}:${stat.getId()}`; + const root = this.contextService.getRoot(stat.resource); + return `${root ? root.toString() : ''}:${stat.getId()}`; } public hasChildren(tree: ITree, stat: FileStat | Model): boolean { From 66c4bd5e9640d66216d40643a91038002b565623 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 16 Jun 2017 11:45:54 +0200 Subject: [PATCH 1937/2747] Revert "suggest: improve element aria label" This reverts commit 42d3d54267972869376b4cc8aa84bbb4fe602a14. --- src/vs/editor/contrib/suggest/browser/suggestWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts index a1f36edca85d5..5ab85e8bf03a9 100644 --- a/src/vs/editor/contrib/suggest/browser/suggestWidget.ts +++ b/src/vs/editor/contrib/suggest/browser/suggestWidget.ts @@ -134,7 +134,7 @@ class Renderer implements IRenderer { const suggestion = (element).suggestion; if (canExpandCompletionItem(element)) { - data.root.setAttribute('aria-label', nls.localize('suggestionWithDetailsAriaLabel', "{0}, suggestion, has details, press {1} to read more", suggestion.label, this.triggerKeybindingLabel)); + data.root.setAttribute('aria-label', nls.localize('suggestionWithDetailsAriaLabel', "{0}, suggestion, has details", suggestion.label)); } else { data.root.setAttribute('aria-label', nls.localize('suggestionAriaLabel', "{0}, suggestion", suggestion.label)); } From e7fc27d746ffc5ad490814d24d49c699213024a8 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 16 Jun 2017 11:48:53 +0200 Subject: [PATCH 1938/2747] :lipstick: --- .../services/textfile/common/textFileService.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/services/textfile/common/textFileService.ts b/src/vs/workbench/services/textfile/common/textFileService.ts index 515c976f07e60..07ffc8ceeb7b1 100644 --- a/src/vs/workbench/services/textfile/common/textFileService.ts +++ b/src/vs/workbench/services/textfile/common/textFileService.ts @@ -342,14 +342,11 @@ export abstract class TextFileService implements ITextFileService { } // Hot exit - const hotExitMode = configuration && configuration.files ? configuration.files.hotExit : HotExitConfiguration.OFF; - // Handle the legacy case where hot exit was a boolean - if (hotExitMode === false) { - this.configuredHotExit = HotExitConfiguration.OFF; - } else if (hotExitMode === true) { - this.configuredHotExit = HotExitConfiguration.ON_EXIT; - } else { + const hotExitMode = configuration && configuration.files && configuration.files.hotExit; + if (hotExitMode === HotExitConfiguration.OFF || hotExitMode === HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE) { this.configuredHotExit = hotExitMode; + } else { + this.configuredHotExit = HotExitConfiguration.ON_EXIT; } } @@ -469,8 +466,8 @@ export abstract class TextFileService implements ITextFileService { }); } - private doSaveAllFiles(arg1?: any /* URI[] */, reason?: SaveReason): TPromise { - const dirtyFileModels = this.getDirtyFileModels(Array.isArray(arg1) ? arg1 : void 0 /* Save All */) + private doSaveAllFiles(resources?: URI[], reason?: SaveReason): TPromise { + const dirtyFileModels = this.getDirtyFileModels(Array.isArray(resources) ? resources : void 0 /* Save All */) .filter(model => { if (model.hasState(ModelState.CONFLICT) && (reason === SaveReason.AUTO || reason === SaveReason.FOCUS_CHANGE || reason === SaveReason.WINDOW_CHANGE)) { return false; // if model is in save conflict, do not save unless save reason is explicit or not provided at all From d53d2d7ef859c5a9c348e761ae1eb1236afc031a Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 16 Jun 2017 12:16:07 +0200 Subject: [PATCH 1939/2747] fixes #28393 --- .../parameterHints/browser/parameterHintsWidget.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts b/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts index 7c4e88e035efa..d5ee521195b57 100644 --- a/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts +++ b/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.ts @@ -81,7 +81,7 @@ export class ParameterHintsModel extends Disposable { } trigger(delay = ParameterHintsModel.DELAY): void { - if (!this.enabled || !SignatureHelpProviderRegistry.has(this.editor.getModel())) { + if (!SignatureHelpProviderRegistry.has(this.editor.getModel())) { return; } @@ -132,8 +132,11 @@ export class ParameterHintsModel extends Disposable { } this.triggerCharactersListeners.push(this.editor.onDidType((text: string) => { - let lastCharCode = text.charCodeAt(text.length - 1); - if (triggerChars.has(lastCharCode)) { + if (!this.enabled) { + return; + } + + if (triggerChars.has(text.charCodeAt(text.length - 1))) { this.trigger(); } })); From 38f0cf830e919d93f489d259945f80525b9e93a0 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 16 Jun 2017 10:39:41 +0200 Subject: [PATCH 1940/2747] #28538 Rename old workspaces to legacy --- src/vs/editor/browser/standalone/simpleServices.ts | 2 +- .../common/extensionEnablementService.ts | 4 ++-- src/vs/platform/storage/test/storageService.test.ts | 4 ++-- src/vs/platform/workspace/common/workspace.ts | 6 +++--- .../platform/workspace/test/common/testWorkspace.ts | 4 ++-- src/vs/workbench/electron-browser/main.ts | 2 +- .../terminal/electron-browser/terminalInstance.ts | 6 +++--- .../test/electron-browser/terminalInstance.test.ts | 6 +++--- .../electron-browser/terminalLinkHandler.test.ts | 4 ++-- .../services/configuration/node/configuration.ts | 2 +- .../configuration/test/node/configuration.test.ts | 12 ++++++------ .../test/node/configurationEditingService.test.ts | 4 ++-- .../quickopen.perf.integrationTest.ts | 4 ++-- .../textsearch.perf.integrationTest.ts | 4 ++-- src/vs/workbench/test/workbenchTestServices.ts | 6 +++--- 15 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/vs/editor/browser/standalone/simpleServices.ts b/src/vs/editor/browser/standalone/simpleServices.ts index 7365d6ccdb508..4fad640c21eab 100644 --- a/src/vs/editor/browser/standalone/simpleServices.ts +++ b/src/vs/editor/browser/standalone/simpleServices.ts @@ -17,7 +17,7 @@ import { KeybindingResolver } from 'vs/platform/keybinding/common/keybindingReso import { IKeybindingEvent, KeybindingSource, IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding'; import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IConfirmation, IMessageService } from 'vs/platform/message/common/message'; -import { IWorkspaceContextService, IWorkspace as ILegacyWorkspace, IWorkspace2 } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, ILegacyWorkspace, IWorkspace2 } from 'vs/platform/workspace/common/workspace'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { ICodeEditor, IDiffEditor } from 'vs/editor/browser/editorBrowser'; import { Selection } from 'vs/editor/common/core/selection'; diff --git a/src/vs/platform/extensionManagement/common/extensionEnablementService.ts b/src/vs/platform/extensionManagement/common/extensionEnablementService.ts index 689c192d03a59..786e1be59b7cc 100644 --- a/src/vs/platform/extensionManagement/common/extensionEnablementService.ts +++ b/src/vs/platform/extensionManagement/common/extensionEnablementService.ts @@ -10,7 +10,7 @@ import Event, { Emitter } from 'vs/base/common/event'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { IExtensionManagementService, DidUninstallExtensionEvent, IExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement'; import { adoptToGalleryExtensionId, getIdAndVersionFromLocalExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil'; -import { IWorkspaceContextService, IWorkspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, ILegacyWorkspace } from 'vs/platform/workspace/common/workspace'; import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -34,7 +34,7 @@ export class ExtensionEnablementService implements IExtensionEnablementService { extensionManagementService.onDidUninstallExtension(this.onDidUninstallExtension, this, this.disposables); } - private get workspace(): IWorkspace { + private get workspace(): ILegacyWorkspace { return this.contextService.getWorkspace(); } diff --git a/src/vs/platform/storage/test/storageService.test.ts b/src/vs/platform/storage/test/storageService.test.ts index 2893d767a27ac..a32ef2f398fc4 100644 --- a/src/vs/platform/storage/test/storageService.test.ts +++ b/src/vs/platform/storage/test/storageService.test.ts @@ -8,7 +8,7 @@ import * as assert from 'assert'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; import { StorageScope } from 'vs/platform/storage/common/storage'; -import { IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, LegacyWorkspace } from 'vs/platform/workspace/common/workspace'; import { StorageService, InMemoryLocalStorage } from 'vs/platform/storage/common/storageService'; import { TestContextService } from 'vs/workbench/test/workbenchTestServices'; import { TestWorkspace } from 'vs/platform/workspace/test/common/testWorkspace'; @@ -95,7 +95,7 @@ suite('Workbench StorageSevice', () => { assert.strictEqual(s.get('wkey1', StorageScope.WORKSPACE), 'foo'); assert.strictEqual(s.get('wkey2', StorageScope.WORKSPACE), 'foo2'); - ws = new Workspace(TestWorkspace.resource, Date.now()); + ws = new LegacyWorkspace(TestWorkspace.resource, Date.now()); ws.uid = new Date().getTime() + 100; s = new StorageService(storageImpl, null, ws); diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index d6bfd45a2433a..25ac39d271606 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -25,7 +25,7 @@ export interface IWorkspaceContextService { * Provides access to the workspace object the platform is running with. This may be null if the workbench was opened * without workspace (empty); */ - getWorkspace(): IWorkspace; + getWorkspace(): ILegacyWorkspace; /** * Provides access to the workspace object the platform is running with. This may be null if the workbench was opened @@ -62,7 +62,7 @@ export interface IWorkspaceContextService { toResource: (workspaceRelativePath: string) => URI; } -export interface IWorkspace { +export interface ILegacyWorkspace { /** * the full uri of the workspace. this is a file:// URL to the location @@ -99,7 +99,7 @@ export interface IWorkspace2 { readonly roots: URI[]; } -export class Workspace implements IWorkspace { +export class LegacyWorkspace implements ILegacyWorkspace { private _name: string; constructor(private _resource: URI, private _ctime?: number) { diff --git a/src/vs/platform/workspace/test/common/testWorkspace.ts b/src/vs/platform/workspace/test/common/testWorkspace.ts index 8933555a37612..ed097d9c90b0c 100644 --- a/src/vs/platform/workspace/test/common/testWorkspace.ts +++ b/src/vs/platform/workspace/test/common/testWorkspace.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Workspace } from 'vs/platform/workspace/common/workspace'; +import { LegacyWorkspace } from 'vs/platform/workspace/common/workspace'; import URI from 'vs/base/common/uri'; -export const TestWorkspace = new Workspace( +export const TestWorkspace = new LegacyWorkspace( URI.file('C:\\testWorkspace'), Date.now() ); diff --git a/src/vs/workbench/electron-browser/main.ts b/src/vs/workbench/electron-browser/main.ts index c447bf78692a9..450e01cd4e731 100644 --- a/src/vs/workbench/electron-browser/main.ts +++ b/src/vs/workbench/electron-browser/main.ts @@ -18,7 +18,7 @@ import paths = require('vs/base/common/paths'); import uri from 'vs/base/common/uri'; import strings = require('vs/base/common/strings'); import { IResourceInput } from 'vs/platform/editor/common/editor'; -import { Workspace as LegacyWorkspace } from "vs/platform/workspace/common/workspace"; +import { LegacyWorkspace } from "vs/platform/workspace/common/workspace"; import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configuration'; import { realpath, stat } from 'vs/base/node/pfs'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 54989b2c49634..8d15110ad5eda 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -21,7 +21,7 @@ import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { IStringDictionary } from 'vs/base/common/collections'; import { ITerminalInstance, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, TERMINAL_PANEL_ID, IShellLaunchConfig } from 'vs/workbench/parts/terminal/common/terminal'; import { ITerminalProcessFactory } from 'vs/workbench/parts/terminal/electron-browser/terminal'; -import { IWorkspace, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { ILegacyWorkspace, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; @@ -464,7 +464,7 @@ export class TerminalInstance implements ITerminalInstance { return typeof data === 'string' ? data.replace(TerminalInstance.WINDOWS_EOL_REGEX, '\r') : data; } - protected _getCwd(shell: IShellLaunchConfig, workspace: IWorkspace): string { + protected _getCwd(shell: IShellLaunchConfig, workspace: ILegacyWorkspace): string { if (shell.cwd) { return shell.cwd; } @@ -492,7 +492,7 @@ export class TerminalInstance implements ITerminalInstance { return TerminalInstance._sanitizeCwd(cwd); } - protected _createProcess(workspace: IWorkspace, shell: IShellLaunchConfig): void { + protected _createProcess(workspace: ILegacyWorkspace, shell: IShellLaunchConfig): void { const locale = this._configHelper.config.setLocaleVariables ? platform.locale : undefined; if (!shell.executable) { this._configHelper.mergeDefaultShellPathAndArgs(shell); diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalInstance.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalInstance.test.ts index df83db52ee2a2..d85abe821f80e 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalInstance.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalInstance.test.ts @@ -10,7 +10,7 @@ import * as os from 'os'; import Uri from 'vs/base/common/uri'; import { IMessageService } from 'vs/platform/message/common/message'; import { IStringDictionary } from 'vs/base/common/collections'; -import { IWorkspace, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; +import { ILegacyWorkspace, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { TerminalInstance } from 'vs/workbench/parts/terminal/electron-browser/terminalInstance'; import { IShellLaunchConfig } from 'vs/workbench/parts/terminal/common/terminal'; import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock'; @@ -20,11 +20,11 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; class TestTerminalInstance extends TerminalInstance { - public _getCwd(shell: IShellLaunchConfig, workspace: IWorkspace): string { + public _getCwd(shell: IShellLaunchConfig, workspace: ILegacyWorkspace): string { return super._getCwd(shell, workspace); } - protected _createProcess(workspace: IWorkspace, shell: IShellLaunchConfig): void { } + protected _createProcess(workspace: ILegacyWorkspace, shell: IShellLaunchConfig): void { } protected _createXterm(): void { } } diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts index 1c6a4f13b7986..220f2adccfd2c 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalLinkHandler.test.ts @@ -8,7 +8,7 @@ import * as assert from 'assert'; import { Platform } from 'vs/base/common/platform'; import { TerminalLinkHandler, LineColumnInfo } from 'vs/workbench/parts/terminal/electron-browser/terminalLinkHandler'; -import { Workspace } from 'vs/platform/workspace/common/workspace'; +import { LegacyWorkspace } from 'vs/platform/workspace/common/workspace'; import { TestContextService } from 'vs/workbench/test/workbenchTestServices'; import URI from 'vs/base/common/uri'; import * as strings from 'vs/base/common/strings'; @@ -45,7 +45,7 @@ interface LinkFormatInfo { column?: string; } -class TestWorkspace extends Workspace { +class TestWorkspace extends LegacyWorkspace { constructor(private basePath: string) { super(new TestURI(basePath)); } diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index e5613d3190be7..8c1142fa18a38 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -18,7 +18,7 @@ import { Schemas } from "vs/base/common/network"; import { RunOnceScheduler } from 'vs/base/common/async'; import { readFile } from 'vs/base/node/pfs'; import * as extfs from 'vs/base/node/extfs'; -import { IWorkspaceContextService, IWorkspace2, Workspace as LegacyWorkspace, IWorkspace as ILegacyWorkspace } from "vs/platform/workspace/common/workspace"; +import { IWorkspaceContextService, IWorkspace2, LegacyWorkspace, ILegacyWorkspace } from "vs/platform/workspace/common/workspace"; import { FileChangeType, FileChangesEvent, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; import { isLinux } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; diff --git a/src/vs/workbench/services/configuration/test/node/configuration.test.ts b/src/vs/workbench/services/configuration/test/node/configuration.test.ts index 6a2ec1f6cd169..96370af434b6d 100644 --- a/src/vs/workbench/services/configuration/test/node/configuration.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configuration.test.ts @@ -13,7 +13,7 @@ import * as sinon from 'sinon'; import { TPromise } from 'vs/base/common/winjs.base'; import { Registry } from 'vs/platform/platform'; import { ParsedArgs } from 'vs/platform/environment/common/environment'; -import { Workspace } from 'vs/platform/workspace/common/workspace'; +import { LegacyWorkspace } from 'vs/platform/workspace/common/workspace'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import { parseArgs } from 'vs/platform/environment/node/argv'; import extfs = require('vs/base/node/extfs'); @@ -47,7 +47,7 @@ suite('WorkspaceConfigurationService - Node', () => { } function createService(workspaceDir: string, globalSettingsFile: string): TPromise { - const workspace = new Workspace(URI.file(workspaceDir)); + const workspace = new LegacyWorkspace(URI.file(workspaceDir)); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); const service = new WorkspaceConfigurationService(environmentService, workspace); @@ -204,7 +204,7 @@ suite('WorkspaceConfigurationService - Node', () => { test('workspace change triggers event', (done: () => void) => { createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { - const workspace = new Workspace(URI.file(workspaceDir)); + const workspace = new LegacyWorkspace(URI.file(workspaceDir)); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); const service = new WorkspaceConfigurationService(environmentService, workspace); @@ -230,7 +230,7 @@ suite('WorkspaceConfigurationService - Node', () => { test('workspace reload should triggers event if content changed', (done: () => void) => { createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { - const workspace = new Workspace(URI.file(workspaceDir)); + const workspace = new LegacyWorkspace(URI.file(workspaceDir)); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); const service = new WorkspaceConfigurationService(environmentService, workspace); @@ -255,7 +255,7 @@ suite('WorkspaceConfigurationService - Node', () => { test('workspace reload should not trigger event if nothing changed', (done: () => void) => { createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { - const workspace = new Workspace(URI.file(workspaceDir)); + const workspace = new LegacyWorkspace(URI.file(workspaceDir)); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); const service = new WorkspaceConfigurationService(environmentService, workspace); @@ -280,7 +280,7 @@ suite('WorkspaceConfigurationService - Node', () => { test('workspace reload should not trigger event if there is no model', (done: () => void) => { createWorkspace((workspaceDir, globalSettingsFile, cleanUp) => { - const workspace = new Workspace(URI.file(workspaceDir)); + const workspace = new LegacyWorkspace(URI.file(workspaceDir)); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); const service = new WorkspaceConfigurationService(environmentService, workspace); diff --git a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts index 9ce0d3b7fd540..8ad27dc8ed3b5 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts @@ -15,7 +15,7 @@ import { TPromise } from 'vs/base/common/winjs.base'; import { Registry } from 'vs/platform/platform'; import { ParsedArgs, IEnvironmentService } from 'vs/platform/environment/common/environment'; import { parseArgs } from 'vs/platform/environment/node/argv'; -import { IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, LegacyWorkspace } from 'vs/platform/workspace/common/workspace'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import extfs = require('vs/base/node/extfs'); import { TestTextFileService, TestEditorGroupService, TestLifecycleService, TestBackupFileService } from 'vs/workbench/test/workbenchTestServices'; @@ -115,7 +115,7 @@ suite('ConfigurationEditingService', () => { instantiationService = new TestInstantiationService(); const environmentService = new SettingsTestEnvironmentService(parseArgs(process.argv), process.execPath, globalSettingsFile); instantiationService.stub(IEnvironmentService, environmentService); - const workspace = noWorkspace ? null : new Workspace(URI.file(workspaceDir)); + const workspace = noWorkspace ? null : new LegacyWorkspace(URI.file(workspaceDir)); const workspaceService = new WorkspaceConfigurationService(environmentService, workspace); instantiationService.stub(IWorkspaceContextService, workspaceService); instantiationService.stub(IConfigurationService, workspaceService); diff --git a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts index c0c8221a118fe..e47e2448e0a2d 100644 --- a/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/quickopen.perf.integrationTest.ts @@ -7,7 +7,7 @@ import 'vs/workbench/parts/search/browser/search.contribution'; // load contributions import * as assert from 'assert'; -import { IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, LegacyWorkspace } from 'vs/platform/workspace/common/workspace'; import { createSyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ISearchService } from 'vs/platform/search/common/search'; @@ -72,7 +72,7 @@ suite('QuickOpen performance (integration)', () => { [ITelemetryService, telemetryService], [IConfigurationService, configurationService], [IModelService, new ModelServiceImpl(null, configurationService)], - [IWorkspaceContextService, new TestContextService(new Workspace(URI.file(testWorkspacePath)))], + [IWorkspaceContextService, new TestContextService(new LegacyWorkspace(URI.file(testWorkspacePath)))], [IWorkbenchEditorService, new TestEditorService()], [IEditorGroupService, new TestEditorGroupService()], [IEnvironmentService, TestEnvironmentService], diff --git a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts index cda4052f987f8..40c99b3e65058 100644 --- a/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts +++ b/src/vs/workbench/test/electron-browser/textsearch.perf.integrationTest.ts @@ -8,7 +8,7 @@ import 'vs/workbench/parts/search/browser/search.contribution'; // load contributions import * as assert from 'assert'; import * as fs from 'fs'; -import { IWorkspaceContextService, Workspace } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, LegacyWorkspace } from 'vs/platform/workspace/common/workspace'; import { createSyncDescriptor } from 'vs/platform/instantiation/common/descriptors'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ISearchService, IQueryOptions } from 'vs/platform/search/common/search'; @@ -62,7 +62,7 @@ suite('TextSearch performance (integration)', () => { [ITelemetryService, telemetryService], [IConfigurationService, configurationService], [IModelService, new ModelServiceImpl(null, configurationService)], - [IWorkspaceContextService, new TestContextService(new Workspace(URI.file(testWorkspacePath)))], + [IWorkspaceContextService, new TestContextService(new LegacyWorkspace(URI.file(testWorkspacePath)))], [IWorkbenchEditorService, new TestEditorService()], [IEditorGroupService, new TestEditorGroupService()], [IEnvironmentService, TestEnvironmentService], diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index fed3804bdff8b..623981f2b7b62 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -27,7 +27,7 @@ import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { IEditorInput, IEditorOptions, Position, Direction, IEditor, IResourceInput } from 'vs/platform/editor/common/editor'; import { IUntitledEditorService, UntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IMessageService, IConfirmation } from 'vs/platform/message/common/message'; -import { IWorkspace, IWorkspaceContextService, IWorkspace2 } from 'vs/platform/workspace/common/workspace'; +import { ILegacyWorkspace, IWorkspaceContextService, IWorkspace2 } from 'vs/platform/workspace/common/workspace'; import { ILifecycleService, ShutdownEvent, ShutdownReason, StartupKind, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; import { EditorStacksModel } from 'vs/workbench/common/editor/editorStacksModel'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; @@ -64,7 +64,7 @@ export const TestEnvironmentService = new EnvironmentService(parseArgs(process.a export class TestContextService implements IWorkspaceContextService { public _serviceBrand: any; - private workspace: IWorkspace; + private workspace: ILegacyWorkspace; private id: string; private options: any; @@ -89,7 +89,7 @@ export class TestContextService implements IWorkspaceContextService { return !!this.workspace; } - public getWorkspace(): IWorkspace { + public getWorkspace(): ILegacyWorkspace { return this.workspace; } From c0317cbdc8aba10ae292ebcf3d6c1693ff9c9e46 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 16 Jun 2017 10:40:55 +0200 Subject: [PATCH 1941/2747] #28538 Rename new IWorkspace2 to IWorkspace --- src/vs/editor/browser/standalone/simpleServices.ts | 6 +++--- src/vs/platform/workspace/common/workspace.ts | 4 ++-- .../services/configuration/node/configuration.ts | 8 ++++---- src/vs/workbench/test/workbenchTestServices.ts | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/vs/editor/browser/standalone/simpleServices.ts b/src/vs/editor/browser/standalone/simpleServices.ts index 4fad640c21eab..13e9ebf2401c6 100644 --- a/src/vs/editor/browser/standalone/simpleServices.ts +++ b/src/vs/editor/browser/standalone/simpleServices.ts @@ -17,7 +17,7 @@ import { KeybindingResolver } from 'vs/platform/keybinding/common/keybindingReso import { IKeybindingEvent, KeybindingSource, IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding'; import { ContextKeyExpr, IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IConfirmation, IMessageService } from 'vs/platform/message/common/message'; -import { IWorkspaceContextService, ILegacyWorkspace, IWorkspace2 } from 'vs/platform/workspace/common/workspace'; +import { IWorkspaceContextService, ILegacyWorkspace, IWorkspace } from 'vs/platform/workspace/common/workspace'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { ICodeEditor, IDiffEditor } from 'vs/editor/browser/editorBrowser'; import { Selection } from 'vs/editor/common/core/selection'; @@ -511,7 +511,7 @@ export class SimpleWorkspaceContextService implements IWorkspaceContextService { public readonly onDidChangeWorkspaceRoots: Event = this._onDidChangeWorkspaceRoots.event; private readonly legacyWorkspace: ILegacyWorkspace; - private readonly workspace: IWorkspace2; + private readonly workspace: IWorkspace; constructor() { this.legacyWorkspace = { resource: URI.from({ scheme: SimpleWorkspaceContextService.SCHEME, authority: 'model', path: '/' }), ctime: Date.now() }; @@ -522,7 +522,7 @@ export class SimpleWorkspaceContextService implements IWorkspaceContextService { return this.legacyWorkspace; } - public getWorkspace2(): IWorkspace2 { + public getWorkspace2(): IWorkspace { return this.workspace; } diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index 25ac39d271606..3cd9b028cef27 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -31,7 +31,7 @@ export interface IWorkspaceContextService { * Provides access to the workspace object the platform is running with. This may be null if the workbench was opened * without workspace (empty); */ - getWorkspace2(): IWorkspace2; + getWorkspace2(): IWorkspace; /** * An event which fires on workspace roots change. @@ -81,7 +81,7 @@ export interface ILegacyWorkspace { name?: string; } -export interface IWorkspace2 { +export interface IWorkspace { /** * the unique identifier of the workspace. diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index 8c1142fa18a38..e7845a1264bef 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -18,7 +18,7 @@ import { Schemas } from "vs/base/common/network"; import { RunOnceScheduler } from 'vs/base/common/async'; import { readFile } from 'vs/base/node/pfs'; import * as extfs from 'vs/base/node/extfs'; -import { IWorkspaceContextService, IWorkspace2, LegacyWorkspace, ILegacyWorkspace } from "vs/platform/workspace/common/workspace"; +import { IWorkspaceContextService, IWorkspace, LegacyWorkspace, ILegacyWorkspace } from "vs/platform/workspace/common/workspace"; import { FileChangeType, FileChangesEvent, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; import { isLinux } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -48,7 +48,7 @@ interface IWorkspaceConfiguration { type IWorkspaceFoldersConfiguration = { [rootFolder: string]: { folders: string[]; } }; -class Workspace implements IWorkspace2 { +class Workspace implements IWorkspace { private _name: string; constructor( @@ -75,7 +75,7 @@ class Workspace implements IWorkspace2 { return this._name; } - public toJSON(): IWorkspace2 { + public toJSON(): IWorkspace { return { id: this.id, roots: this.roots, name: this.name }; } } @@ -165,7 +165,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp return this.legacyWorkspace; } - public getWorkspace2(): IWorkspace2 { + public getWorkspace2(): IWorkspace { return this.workspace; } diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index 623981f2b7b62..cff7f1456264e 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -27,7 +27,7 @@ import { ITextModelService } from 'vs/editor/common/services/resolverService'; import { IEditorInput, IEditorOptions, Position, Direction, IEditor, IResourceInput } from 'vs/platform/editor/common/editor'; import { IUntitledEditorService, UntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService'; import { IMessageService, IConfirmation } from 'vs/platform/message/common/message'; -import { ILegacyWorkspace, IWorkspaceContextService, IWorkspace2 } from 'vs/platform/workspace/common/workspace'; +import { ILegacyWorkspace, IWorkspaceContextService, IWorkspace } from 'vs/platform/workspace/common/workspace'; import { ILifecycleService, ShutdownEvent, ShutdownReason, StartupKind, LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle'; import { EditorStacksModel } from 'vs/workbench/common/editor/editorStacksModel'; import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection'; @@ -93,7 +93,7 @@ export class TestContextService implements IWorkspaceContextService { return this.workspace; } - public getWorkspace2(): IWorkspace2 { + public getWorkspace2(): IWorkspace { return this.workspace ? { id: this.id, roots: [this.workspace.resource], name: this.workspace.resource.fsPath } : void 0; } From c2901b2b392d059415a7ab880785d11518e03628 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 16 Jun 2017 11:27:43 +0200 Subject: [PATCH 1942/2747] #28538 Extract and expose new Workspace object --- src/vs/platform/workspace/common/workspace.ts | 30 ++++++++++++ .../configuration/node/configuration.ts | 49 +++---------------- 2 files changed, 37 insertions(+), 42 deletions(-) diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index 3cd9b028cef27..7534ba70696db 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -141,4 +141,34 @@ export class LegacyWorkspace implements ILegacyWorkspace { return null; } +} + +export class Workspace implements IWorkspace { + + constructor( + public readonly id: string, + private _name: string, + private _roots: URI[] + ) { + } + + public get roots(): URI[] { + return this._roots; + } + + public set roots(roots: URI[]) { + this._roots = roots; + } + + public get name(): string { + return this._name; + } + + public set name(name: string) { + this._name = name; + } + + public toJSON(): IWorkspace { + return { id: this.id, roots: this.roots, name: this.name }; + } } \ No newline at end of file diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index e7845a1264bef..0a959e38a659c 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -18,7 +18,7 @@ import { Schemas } from "vs/base/common/network"; import { RunOnceScheduler } from 'vs/base/common/async'; import { readFile } from 'vs/base/node/pfs'; import * as extfs from 'vs/base/node/extfs'; -import { IWorkspaceContextService, IWorkspace, LegacyWorkspace, ILegacyWorkspace } from "vs/platform/workspace/common/workspace"; +import { IWorkspaceContextService, IWorkspace, Workspace, ILegacyWorkspace, LegacyWorkspace } from "vs/platform/workspace/common/workspace"; import { FileChangeType, FileChangesEvent, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; import { isLinux } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; @@ -48,38 +48,6 @@ interface IWorkspaceConfiguration { type IWorkspaceFoldersConfiguration = { [rootFolder: string]: { folders: string[]; } }; -class Workspace implements IWorkspace { - private _name: string; - - constructor( - public readonly id: string, - private _roots: URI[] - ) { - // - } - - public set roots(roots: URI[]) { - this._roots = roots; - this._name = null; // will be recomputed based on roots next time accessed - } - - public get roots(): URI[] { - return this._roots; - } - - public get name(): string { - if (!this._name) { - this._name = this.roots.map(root => basename(root.fsPath) || root.fsPath).join(', '); - } - - return this._name; - } - - public toJSON(): IWorkspace { - return { id: this.id, roots: this.roots, name: this.name }; - } -} - export class WorkspaceConfigurationService extends Disposable implements IWorkspaceContextService, IWorkspaceConfigurationService { public _serviceBrand: any; @@ -98,15 +66,10 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private rootsTrieMap: TrieMap = new TrieMap(TrieMap.PathSplitter); private _configuration: Configuration; - constructor(private environmentService: IEnvironmentService, private legacyWorkspace?: LegacyWorkspace, private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME) { + constructor(private environmentService: IEnvironmentService, private readonly legacyWorkspace?: LegacyWorkspace, private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME) { super(); - if (legacyWorkspace) { - const workspaceId = createHash('md5').update(legacyWorkspace.resource.fsPath).update(legacyWorkspace.ctime ? String(legacyWorkspace.ctime) : '').digest('hex'); - this.workspace = new Workspace(workspaceId, [legacyWorkspace.resource]); - } else { - this.workspace = null; - } + this.workspace = legacyWorkspace ? new Workspace(createHash('md5').update(legacyWorkspace.resource.fsPath).update(legacyWorkspace.ctime ? String(legacyWorkspace.ctime) : '').digest('hex'), basename(legacyWorkspace.resource.fsPath), [legacyWorkspace.resource]) : null; this.rootsTrieMap = new TrieMap(TrieMap.PathSplitter); if (this.workspace) { @@ -147,9 +110,11 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp // Find changes const changed = !equals(this.workspace.roots, configuredFolders, (r1, r2) => r1.toString() === r2.toString()); - this.workspace.roots = configuredFolders; - if (changed) { + + this.workspace.roots = configuredFolders; + this.workspace.name = configuredFolders.map(root => basename(root.fsPath) || root.fsPath).join(', '); + this.rootsTrieMap = new TrieMap(TrieMap.PathSplitter); for (const folder of this.workspace.roots) { this.rootsTrieMap.insert(folder.fsPath, folder); From 4e963d7592cd4649181bd562e8dfd74669b24a85 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 16 Jun 2017 11:32:38 +0200 Subject: [PATCH 1943/2747] #28538 Move getRoot method to Workspace object --- src/vs/platform/workspace/common/workspace.ts | 18 +++++++++++++++++- .../configuration/node/configuration.ts | 16 +++------------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index 7534ba70696db..7733f14a34c1c 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -6,7 +6,8 @@ import URI from 'vs/base/common/uri'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; -import paths = require('vs/base/common/paths'); +import * as paths from 'vs/base/common/paths'; +import { TrieMap } from 'vs/base/common/map'; import { isEqualOrParent } from 'vs/platform/files/common/files'; import { isLinux } from 'vs/base/common/platform'; import Event from 'vs/base/common/event'; @@ -145,11 +146,14 @@ export class LegacyWorkspace implements ILegacyWorkspace { export class Workspace implements IWorkspace { + private _rootsMap: TrieMap = new TrieMap(TrieMap.PathSplitter); + constructor( public readonly id: string, private _name: string, private _roots: URI[] ) { + this.updateRootsMap(); } public get roots(): URI[] { @@ -158,6 +162,7 @@ export class Workspace implements IWorkspace { public set roots(roots: URI[]) { this._roots = roots; + this.updateRootsMap(); } public get name(): string { @@ -168,6 +173,17 @@ export class Workspace implements IWorkspace { this._name = name; } + public getRoot(resource: URI): URI { + return this._rootsMap.findSubstr(resource.fsPath); + } + + private updateRootsMap(): void { + this._rootsMap = new TrieMap(TrieMap.PathSplitter); + for (const root of this.roots) { + this._rootsMap.insert(root.fsPath, root); + } + } + public toJSON(): IWorkspace { return { id: this.id, roots: this.roots, name: this.name }; } diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index 0a959e38a659c..cd6fa13bedcd5 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -8,7 +8,7 @@ import URI from 'vs/base/common/uri'; import * as paths from 'vs/base/common/paths'; import { TPromise } from 'vs/base/common/winjs.base'; import Event, { Emitter } from 'vs/base/common/event'; -import { StrictResourceMap, TrieMap } from 'vs/base/common/map'; +import { StrictResourceMap } from 'vs/base/common/map'; import { distinct, equals } from "vs/base/common/arrays"; import * as objects from 'vs/base/common/objects'; import * as errors from 'vs/base/common/errors'; @@ -63,18 +63,13 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private cachedFolderConfigs: StrictResourceMap>; private readonly workspace: Workspace; - private rootsTrieMap: TrieMap = new TrieMap(TrieMap.PathSplitter); + private _configuration: Configuration; constructor(private environmentService: IEnvironmentService, private readonly legacyWorkspace?: LegacyWorkspace, private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME) { super(); this.workspace = legacyWorkspace ? new Workspace(createHash('md5').update(legacyWorkspace.resource.fsPath).update(legacyWorkspace.ctime ? String(legacyWorkspace.ctime) : '').digest('hex'), basename(legacyWorkspace.resource.fsPath), [legacyWorkspace.resource]) : null; - - this.rootsTrieMap = new TrieMap(TrieMap.PathSplitter); - if (this.workspace) { - this.rootsTrieMap.insert(this.workspace.roots[0].fsPath, this.workspace.roots[0]); - } this._register(this.onDidUpdateConfiguration(e => this.resolveAdditionalFolders(true))); this.baseConfigurationService = this._register(new GlobalConfigurationService(environmentService)); @@ -115,11 +110,6 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp this.workspace.roots = configuredFolders; this.workspace.name = configuredFolders.map(root => basename(root.fsPath) || root.fsPath).join(', '); - this.rootsTrieMap = new TrieMap(TrieMap.PathSplitter); - for (const folder of this.workspace.roots) { - this.rootsTrieMap.insert(folder.fsPath, folder); - } - if (notify) { this._onDidChangeWorkspaceRoots.fire(configuredFolders); } @@ -139,7 +129,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } public getRoot(resource: URI): URI { - return this.rootsTrieMap.findSubstr(resource.fsPath); + return this.workspace ? this.workspace.getRoot(resource) : null; } private get workspaceUri(): URI { From a4b6dc95324cbdbe03e6292bb4a15db131339333 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 16 Jun 2017 12:19:21 +0200 Subject: [PATCH 1944/2747] #28538 Take workspace as input in Configuration model --- .../configuration/common/configuration.ts | 44 ++++++++++--------- src/vs/workbench/api/node/extHost.api.impl.ts | 4 +- .../api/node/extHostConfiguration.ts | 5 ++- src/vs/workbench/api/node/extHostWorkspace.ts | 15 ++++--- .../configuration/node/configuration.ts | 22 ++++++---- .../api/extHostConfiguration.test.ts | 7 +-- 6 files changed, 55 insertions(+), 42 deletions(-) diff --git a/src/vs/platform/configuration/common/configuration.ts b/src/vs/platform/configuration/common/configuration.ts index 94e02b37a2974..8216a7805f01f 100644 --- a/src/vs/platform/configuration/common/configuration.ts +++ b/src/vs/platform/configuration/common/configuration.ts @@ -9,6 +9,7 @@ import * as types from 'vs/base/common/types'; import * as objects from 'vs/base/common/objects'; import URI from 'vs/base/common/uri'; import { StrictResourceMap } from 'vs/base/common/map'; +import { Workspace } from 'vs/platform/workspace/common/workspace'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import Event from 'vs/base/common/event'; @@ -199,16 +200,15 @@ export interface IConfigurationData { defaults: IConfiguraionModel; user: IConfiguraionModel; folders: { [folder: string]: IConfiguraionModel }; - workspaceUri: string; } export class Configuration { - private _global: ConfigurationModel; - private _workspace: ConfigurationModel; - protected _foldersConsolidated: StrictResourceMap>; + private _globalConfiguration: ConfigurationModel; + private _workspaceConfiguration: ConfigurationModel; + protected _foldersConsolidatedConfigurations: StrictResourceMap>; - constructor(protected _defaults: ConfigurationModel, protected _user: ConfigurationModel, protected folders: StrictResourceMap> = new StrictResourceMap>(), protected workspaceUri?: URI) { + constructor(protected _defaults: ConfigurationModel, protected _user: ConfigurationModel, protected folders: StrictResourceMap> = new StrictResourceMap>(), protected _workspace?: Workspace) { this.merge(); } @@ -221,23 +221,23 @@ export class Configuration { } get workspace(): ConfigurationModel { - return this._workspace; + return this._workspaceConfiguration; } protected merge(): void { - this._global = this._workspace = new ConfigurationModel().merge(this._defaults).merge(this._user); - this._foldersConsolidated = new StrictResourceMap>(); + this._globalConfiguration = this._workspaceConfiguration = new ConfigurationModel().merge(this._defaults).merge(this._user); + this._foldersConsolidatedConfigurations = new StrictResourceMap>(); for (const folder of this.folders.keys()) { this.mergeFolder(folder); } } protected mergeFolder(folder: URI) { - if (this.workspaceUri && this.workspaceUri.fsPath === folder.fsPath) { - this._workspace = new ConfigurationModel().merge(this._global).merge(this.folders.get(this.workspaceUri)); - this._foldersConsolidated.set(folder, this._workspace); + if (this._workspace && this.workspaceUri.fsPath === folder.fsPath) { + this._workspaceConfiguration = new ConfigurationModel().merge(this._globalConfiguration).merge(this.folders.get(this.workspaceUri)); + this._foldersConsolidatedConfigurations.set(folder, this._workspaceConfiguration); } else { - this._foldersConsolidated.set(folder, new ConfigurationModel().merge(this._workspace).merge(this.folders.get(folder))); + this._foldersConsolidatedConfigurations.set(folder, new ConfigurationModel().merge(this._workspaceConfiguration).merge(this.folders.get(folder))); } } @@ -251,8 +251,8 @@ export class Configuration { return { default: objects.clone(getConfigurationValue(overrideIdentifier ? this._defaults.override(overrideIdentifier).contents : this._defaults.contents, key)), user: objects.clone(getConfigurationValue(overrideIdentifier ? this._user.override(overrideIdentifier).contents : this._user.contents, key)), - workspace: objects.clone(this.workspaceUri ? getConfigurationValue(overrideIdentifier ? this.folders.get(this.workspaceUri).override(overrideIdentifier).contents : this.folders.get(this.workspaceUri).contents, key) : void 0), - value: objects.clone(getConfigurationValue(overrideIdentifier ? this._workspace.override(overrideIdentifier).contents : this._workspace.contents, key)) + workspace: objects.clone(this._workspace ? getConfigurationValue(overrideIdentifier ? this.folders.get(this.workspaceUri).override(overrideIdentifier).contents : this.folders.get(this.workspaceUri).contents, key) : void 0), + value: objects.clone(getConfigurationValue(overrideIdentifier ? this._workspaceConfiguration.override(overrideIdentifier).contents : this._workspaceConfiguration.contents, key)) }; } @@ -260,7 +260,7 @@ export class Configuration { return { default: this._defaults.keys, user: this._user.keys, - workspace: this.workspaceUri ? this.folders.get(this.workspaceUri).keys : [] + workspace: this._workspace ? this.folders.get(this.workspaceUri).keys : [] }; } @@ -296,8 +296,12 @@ export class Configuration { return result; } + protected get workspaceUri(): URI { + return this.workspace ? this._workspace.roots[0] : null; + } + private getConfigurationModel(overrides: IConfigurationOverrides): ConfigurationModel { - let configurationModel = overrides.resource ? this._foldersConsolidated.get(overrides.resource) || this._workspace : this._workspace; + let configurationModel = overrides.resource ? this._foldersConsolidatedConfigurations.get(overrides.resource) || this._workspaceConfiguration : this._workspaceConfiguration; return overrides.language ? configurationModel.override(overrides.language) : configurationModel; } @@ -315,20 +319,18 @@ export class Configuration { const { contents, overrides } = this.folders.get(folder); result[folder.toString()] = { contents, overrides }; return result; - }, Object.create({})), - workspaceUri: this.workspaceUri ? this.workspaceUri.toString() : void 0 + }, Object.create({})) }; } - public static parse(data: IConfigurationData): Configuration { + public static parse(data: IConfigurationData, workspace: Workspace): Configuration { const defaults = Configuration.parseConfigurationModel(data.defaults); const user = Configuration.parseConfigurationModel(data.user); const folders: StrictResourceMap> = Object.keys(data.folders).reduce((result, key) => { result.set(URI.parse(key), Configuration.parseConfigurationModel(data.folders[key])); return result; }, new StrictResourceMap>()); - const workspaceUri = data.workspaceUri ? URI.parse(data.workspaceUri) : void 0; - return new Configuration(defaults, user, folders, workspaceUri); + return new Configuration(defaults, user, folders, workspace); } private static parseConfigurationModel(model: IConfiguraionModel): ConfigurationModel { diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 4b1429aa2948c..7c4e72c853daa 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -83,7 +83,8 @@ export function createApiFactory( const extHostEditors = col.define(ExtHostContext.ExtHostEditors).set(new ExtHostEditors(threadService, extHostDocumentsAndEditors)); const extHostCommands = col.define(ExtHostContext.ExtHostCommands).set(new ExtHostCommands(threadService, extHostHeapService)); const extHostTreeViews = col.define(ExtHostContext.ExtHostTreeViews).set(new ExtHostTreeViews(threadService, extHostCommands)); - const extHostConfiguration = col.define(ExtHostContext.ExtHostConfiguration).set(new ExtHostConfiguration(threadService.get(MainContext.MainThreadConfiguration), initData.configuration)); + const extHostWorkspace = col.define(ExtHostContext.ExtHostWorkspace).set(new ExtHostWorkspace(threadService, initData.workspace)); + const extHostConfiguration = col.define(ExtHostContext.ExtHostConfiguration).set(new ExtHostConfiguration(threadService.get(MainContext.MainThreadConfiguration), initData.configuration, extHostWorkspace)); const extHostDiagnostics = col.define(ExtHostContext.ExtHostDiagnostics).set(new ExtHostDiagnostics(threadService)); const languageFeatures = col.define(ExtHostContext.ExtHostLanguageFeatures).set(new ExtHostLanguageFeatures(threadService, extHostDocuments, extHostCommands, extHostHeapService, extHostDiagnostics)); const extHostFileSystemEvent = col.define(ExtHostContext.ExtHostFileSystemEventService).set(new ExtHostFileSystemEventService()); @@ -91,7 +92,6 @@ export function createApiFactory( const extHostTerminalService = col.define(ExtHostContext.ExtHostTerminalService).set(new ExtHostTerminalService(threadService)); const extHostSCM = col.define(ExtHostContext.ExtHostSCM).set(new ExtHostSCM(threadService, extHostCommands)); const extHostTask = col.define(ExtHostContext.ExtHostTask).set(new ExtHostTask(threadService)); - const extHostWorkspace = col.define(ExtHostContext.ExtHostWorkspace).set(new ExtHostWorkspace(threadService, initData.workspace)); col.define(ExtHostContext.ExtHostExtensionService).set(extensionService); col.finish(false, threadService); diff --git a/src/vs/workbench/api/node/extHostConfiguration.ts b/src/vs/workbench/api/node/extHostConfiguration.ts index 5ee24322929a6..da84ebf96ba52 100644 --- a/src/vs/workbench/api/node/extHostConfiguration.ts +++ b/src/vs/workbench/api/node/extHostConfiguration.ts @@ -7,6 +7,7 @@ import { mixin } from 'vs/base/common/objects'; import Event, { Emitter } from 'vs/base/common/event'; import { WorkspaceConfiguration } from 'vscode'; +import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; import { ExtHostConfigurationShape, MainThreadConfigurationShape } from './extHost.protocol'; import { IConfigurationData, Configuration } from 'vs/platform/configuration/common/configuration'; import { ConfigurationTarget } from 'vs/workbench/services/configuration/common/configurationEditing'; @@ -29,7 +30,7 @@ export class ExtHostConfiguration extends ExtHostConfigurationShape { private _data: IConfigurationData; private _configuration: Configuration; - constructor(proxy: MainThreadConfigurationShape, data: IConfigurationData) { + constructor(proxy: MainThreadConfigurationShape, data: IConfigurationData, private extWorkspace: ExtHostWorkspace) { super(); this._proxy = proxy; this._data = data; @@ -47,7 +48,7 @@ export class ExtHostConfiguration extends ExtHostConfigurationShape { private get configuration(): Configuration { if (!this._configuration) { - this._configuration = Configuration.parse(this._data); + this._configuration = Configuration.parse(this._data, this.extWorkspace.workspace); } return this._configuration; } diff --git a/src/vs/workbench/api/node/extHostWorkspace.ts b/src/vs/workbench/api/node/extHostWorkspace.ts index e222fb03816c6..8cb2947fe4106 100644 --- a/src/vs/workbench/api/node/extHostWorkspace.ts +++ b/src/vs/workbench/api/node/extHostWorkspace.ts @@ -9,6 +9,7 @@ import Event, { Emitter } from 'vs/base/common/event'; import { normalize } from 'vs/base/common/paths'; import { isFalsyOrEmpty } from 'vs/base/common/arrays'; import { relative } from 'path'; +import { Workspace } from 'vs/platform/workspace/common/workspace'; import { IThreadService } from 'vs/workbench/services/thread/common/threadService'; import { IResourceEdit } from 'vs/editor/common/services/bulkEdit'; import { TPromise } from 'vs/base/common/winjs.base'; @@ -22,18 +23,22 @@ export class ExtHostWorkspace extends ExtHostWorkspaceShape { private readonly _onDidChangeWorkspace = new Emitter(); private readonly _proxy: MainThreadWorkspaceShape; - private _workspace: IWorkspaceData; + private _workspace: Workspace; readonly onDidChangeWorkspace: Event = this._onDidChangeWorkspace.event; - constructor(threadService: IThreadService, workspace: IWorkspaceData) { + constructor(threadService: IThreadService, data: IWorkspaceData) { super(); this._proxy = threadService.get(MainContext.MainThreadWorkspace); - this._workspace = workspace; + this._workspace = data ? new Workspace(data.id, data.name, data.roots) : null; } // --- workspace --- + get workspace(): Workspace { + return this._workspace; + } + getPath(): string { // this is legacy from the days before having // multi-root and we keep it only alive if there @@ -69,8 +74,8 @@ export class ExtHostWorkspace extends ExtHostWorkspaceShape { return normalize(path); } - $acceptWorkspaceData(workspace: IWorkspaceData): void { - this._workspace = workspace; + $acceptWorkspaceData(data: IWorkspaceData): void { + this._workspace = data ? new Workspace(data.id, data.name, data.roots) : null; this._onDidChangeWorkspace.fire(this); } diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index cd6fa13bedcd5..28a61bbc46cf0 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -69,7 +69,11 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp constructor(private environmentService: IEnvironmentService, private readonly legacyWorkspace?: LegacyWorkspace, private workspaceSettingsRootFolder: string = WORKSPACE_CONFIG_FOLDER_DEFAULT_NAME) { super(); - this.workspace = legacyWorkspace ? new Workspace(createHash('md5').update(legacyWorkspace.resource.fsPath).update(legacyWorkspace.ctime ? String(legacyWorkspace.ctime) : '').digest('hex'), basename(legacyWorkspace.resource.fsPath), [legacyWorkspace.resource]) : null; + this.workspace = legacyWorkspace ? new Workspace( + createHash('md5').update(legacyWorkspace.resource.fsPath).update(legacyWorkspace.ctime ? String(legacyWorkspace.ctime) : '').digest('hex'), + basename(legacyWorkspace.resource.fsPath), + [legacyWorkspace.resource] + ) : null; this._register(this.onDidUpdateConfiguration(e => this.resolveAdditionalFolders(true))); this.baseConfigurationService = this._register(new GlobalConfigurationService(environmentService)); @@ -233,7 +237,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private initCaches(): void { this.cachedFolderConfigs = new StrictResourceMap>(); - this._configuration = new Configuration(this.baseConfigurationService.configuration(), new StrictResourceMap>(), this.workspaceUri); + this._configuration = new Configuration(this.baseConfigurationService.configuration(), new StrictResourceMap>(), this.workspace); this.initCachesForFolders(this.workspace ? this.workspace.roots : []); } @@ -467,12 +471,12 @@ function resolveStat(resource: URI): TPromise { class Configuration extends BaseConfiguration { - constructor(private _baseConfiguration: Configuration, protected folders: StrictResourceMap>, workspaceUri: URI) { - super(_baseConfiguration.defaults, _baseConfiguration.user, folders, workspaceUri); + constructor(private _baseConfiguration: Configuration, protected folders: StrictResourceMap>, workspace: Workspace) { + super(_baseConfiguration.defaults, _baseConfiguration.user, folders, workspace); } updateBaseConfiguration(baseConfiguration: Configuration): boolean { - const current = new Configuration(this._baseConfiguration, this.folders, this.workspaceUri); + const current = new Configuration(this._baseConfiguration, this.folders, this._workspace); this._defaults = baseConfiguration.defaults; this._user = baseConfiguration.user; @@ -489,13 +493,13 @@ class Configuration extends BaseConfiguration { } deleteFolderConfiguration(folder: URI): boolean { - if (this.workspaceUri && this.workspaceUri.fsPath === folder.fsPath) { + if (this.workspace && this.workspaceUri.fsPath === folder.fsPath) { // Do not remove workspace configuration return false; } this.folders.delete(folder); - return this._foldersConsolidated.delete(folder); + return this._foldersConsolidatedConfigurations.delete(folder); } getFolderConfigurationModel(folder: URI): FolderConfigurationModel { @@ -511,11 +515,11 @@ class Configuration extends BaseConfiguration { return false; } - if (this._foldersConsolidated.size !== other._foldersConsolidated.size) { + if (this._foldersConsolidatedConfigurations.size !== other._foldersConsolidatedConfigurations.size) { return false; } - for (const resource of this._foldersConsolidated.keys()) { + for (const resource of this._foldersConsolidatedConfigurations.keys()) { if (!objects.equals(this.getValue(null, { resource }), other.getValue(null, { resource }))) { return false; } diff --git a/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts b/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts index acdf7e0de9f83..a07b32c76b4a0 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostConfiguration.test.ts @@ -6,11 +6,13 @@ 'use strict'; import * as assert from 'assert'; +import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace'; import { ExtHostConfiguration } from 'vs/workbench/api/node/extHostConfiguration'; import { MainThreadConfigurationShape } from 'vs/workbench/api/node/extHost.protocol'; import { TPromise } from 'vs/base/common/winjs.base'; import { ConfigurationTarget, ConfigurationEditingErrorCode, IConfigurationEditingError } from 'vs/workbench/services/configuration/common/configurationEditing'; import { ConfigurationModel } from 'vs/platform/configuration/common/configuration'; +import { TestThreadService } from './testThreadService'; suite('ExtHostConfiguration', function () { @@ -29,9 +31,8 @@ suite('ExtHostConfiguration', function () { return new ExtHostConfiguration(shape, { defaults: new ConfigurationModel(contents), user: new ConfigurationModel(contents), - folders: Object.create(null), - workspaceUri: void 0 - }); + folders: Object.create(null) + }, new ExtHostWorkspace(new TestThreadService(), null)); } test('getConfiguration fails regression test 1.7.1 -> 1.8 #15552', function () { From c635d7a23f666c6730dba30cf254950b0865e3c2 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 16 Jun 2017 12:29:54 +0200 Subject: [PATCH 1945/2747] #28538 Let Configuration object gets the root given the resource from workspace --- .../configuration/common/configuration.ts | 19 ++++++++++++++++++- .../configuration/node/configuration.ts | 1 - 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/vs/platform/configuration/common/configuration.ts b/src/vs/platform/configuration/common/configuration.ts index 8216a7805f01f..1b31073ea9f40 100644 --- a/src/vs/platform/configuration/common/configuration.ts +++ b/src/vs/platform/configuration/common/configuration.ts @@ -301,10 +301,27 @@ export class Configuration { } private getConfigurationModel(overrides: IConfigurationOverrides): ConfigurationModel { - let configurationModel = overrides.resource ? this._foldersConsolidatedConfigurations.get(overrides.resource) || this._workspaceConfiguration : this._workspaceConfiguration; + let configurationModel = this.getConfigurationForResource(overrides); return overrides.language ? configurationModel.override(overrides.language) : configurationModel; } + private getConfigurationForResource({ resource }: IConfigurationOverrides): ConfigurationModel { + if (!this.workspace) { + return this._globalConfiguration; + } + + if (!resource) { + return this._workspaceConfiguration; + } + + const root = this._workspace.getRoot(resource); + if (!root) { + return this._workspaceConfiguration; + } + + return this._foldersConsolidatedConfigurations.get(root) || this._workspaceConfiguration; + } + public toData(): IConfigurationData { return { defaults: { diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index 28a61bbc46cf0..6da212e044e29 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -161,7 +161,6 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp } public getConfiguration(section?: string, overrides?: IConfigurationOverrides): C { - overrides = overrides && overrides.resource ? { ...overrides, resource: this.getRoot(overrides.resource) } : overrides; return this._configuration.getValue(section, overrides); } From d26fecce8527072d3e67179fc574103812cc85dc Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 16 Jun 2017 11:02:48 +0200 Subject: [PATCH 1946/2747] Move SelectionClipboard up to /workbench/ --- src/vs/workbench/electron-browser/workbench.main.ts | 1 - src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts | 3 ++- .../parts/codeEditor}/electron-browser/selectionClipboard.ts | 0 src/vs/workbench/parts/debug/electron-browser/replEditor.ts | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename src/vs/{editor/contrib/selectionClipboard => workbench/parts/codeEditor}/electron-browser/selectionClipboard.ts (100%) diff --git a/src/vs/workbench/electron-browser/workbench.main.ts b/src/vs/workbench/electron-browser/workbench.main.ts index d68ce2e3acf20..9eac4e5637b58 100644 --- a/src/vs/workbench/electron-browser/workbench.main.ts +++ b/src/vs/workbench/electron-browser/workbench.main.ts @@ -11,7 +11,6 @@ import 'vs/base/common/errors'; // Editor import 'vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes'; -import 'vs/editor/contrib/selectionClipboard/electron-browser/selectionClipboard'; import 'vs/editor/browser/editor.all'; // Menus/Actions diff --git a/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts b/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts index f8b57c7352d11..2bb951551fb66 100644 --- a/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts +++ b/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts @@ -4,9 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import './electron-browser/accessibility'; +import './electron-browser/inspectKeybindings'; +import './electron-browser/selectionClipboard'; import './electron-browser/toggleMultiCursorModifier'; import './electron-browser/toggleRenderControlCharacter'; import './electron-browser/toggleRenderWhitespace'; import './electron-browser/toggleWordWrap'; import './electron-browser/wordWrapMigration'; -import './electron-browser/inspectKeybindings'; diff --git a/src/vs/editor/contrib/selectionClipboard/electron-browser/selectionClipboard.ts b/src/vs/workbench/parts/codeEditor/electron-browser/selectionClipboard.ts similarity index 100% rename from src/vs/editor/contrib/selectionClipboard/electron-browser/selectionClipboard.ts rename to src/vs/workbench/parts/codeEditor/electron-browser/selectionClipboard.ts diff --git a/src/vs/workbench/parts/debug/electron-browser/replEditor.ts b/src/vs/workbench/parts/debug/electron-browser/replEditor.ts index dfa70d783bd4f..160dad9e10d86 100644 --- a/src/vs/workbench/parts/debug/electron-browser/replEditor.ts +++ b/src/vs/workbench/parts/debug/electron-browser/replEditor.ts @@ -14,7 +14,7 @@ import { ICommandService } from 'vs/platform/commands/common/commands'; // Allowed Editor Contributions: import { MenuPreventer } from 'vs/editor/contrib/multicursor/browser/menuPreventer'; -import { SelectionClipboard } from 'vs/editor/contrib/selectionClipboard/electron-browser/selectionClipboard'; +import { SelectionClipboard } from 'vs/workbench/parts/codeEditor/electron-browser/selectionClipboard'; import { ContextMenuController } from 'vs/editor/contrib/contextmenu/browser/contextmenu'; import { SuggestController } from 'vs/editor/contrib/suggest/browser/suggestController'; import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; From 31382db17cfbb3327c39013279abf299dbffa20b Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 16 Jun 2017 11:10:48 +0200 Subject: [PATCH 1947/2747] Move InspectTMScopes up to /workbench/ --- src/vs/workbench/electron-browser/workbench.main.ts | 1 - src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts | 1 + .../parts/codeEditor}/electron-browser/inspectTMScopes.css | 0 .../parts/codeEditor}/electron-browser/inspectTMScopes.ts | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename src/vs/{editor/contrib/inspectTMScopes => workbench/parts/codeEditor}/electron-browser/inspectTMScopes.css (100%) rename src/vs/{editor/contrib/inspectTMScopes => workbench/parts/codeEditor}/electron-browser/inspectTMScopes.ts (100%) diff --git a/src/vs/workbench/electron-browser/workbench.main.ts b/src/vs/workbench/electron-browser/workbench.main.ts index 9eac4e5637b58..7a9035a8e92e0 100644 --- a/src/vs/workbench/electron-browser/workbench.main.ts +++ b/src/vs/workbench/electron-browser/workbench.main.ts @@ -10,7 +10,6 @@ import 'vs/base/common/strings'; import 'vs/base/common/errors'; // Editor -import 'vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes'; import 'vs/editor/browser/editor.all'; // Menus/Actions diff --git a/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts b/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts index 2bb951551fb66..0866df0800828 100644 --- a/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts +++ b/src/vs/workbench/parts/codeEditor/codeEditor.contribution.ts @@ -5,6 +5,7 @@ import './electron-browser/accessibility'; import './electron-browser/inspectKeybindings'; +import './electron-browser/inspectTMScopes'; import './electron-browser/selectionClipboard'; import './electron-browser/toggleMultiCursorModifier'; import './electron-browser/toggleRenderControlCharacter'; diff --git a/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.css b/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.css similarity index 100% rename from src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.css rename to src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.css diff --git a/src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts b/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.ts similarity index 100% rename from src/vs/editor/contrib/inspectTMScopes/electron-browser/inspectTMScopes.ts rename to src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.ts From 19dff43f673e84ab6cd5065fd28ab3e8f25f353b Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 16 Jun 2017 11:15:42 +0200 Subject: [PATCH 1948/2747] Add the possibility for restrictions to be an OR array --- build/lib/tslint/importPatternsRule.js | 20 ++++++++++++++++++-- build/lib/tslint/importPatternsRule.ts | 22 +++++++++++++++++++--- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/build/lib/tslint/importPatternsRule.js b/build/lib/tslint/importPatternsRule.js index 6bd94309cf86e..9a6284febefdd 100644 --- a/build/lib/tslint/importPatternsRule.js +++ b/build/lib/tslint/importPatternsRule.js @@ -49,8 +49,24 @@ var ImportPatterns = (function (_super) { if (path[0] === '.') { return; } - if (!minimatch(path, this._config.restrictions)) { - this.addFailure(this.createFailure(node.getStart(), node.getWidth(), "Imports violates '" + this._config.restrictions + "'-restriction.")); + var restrictions; + if (typeof this._config.restrictions === 'string') { + restrictions = [this._config.restrictions]; + } + else { + restrictions = this._config.restrictions; + } + var matched = false; + for (var _i = 0, restrictions_1 = restrictions; _i < restrictions_1.length; _i++) { + var pattern = restrictions_1[_i]; + if (minimatch(path, pattern)) { + matched = true; + break; + } + } + if (!matched) { + // None of the restrictions matched + this.addFailure(this.createFailure(node.getStart(), node.getWidth(), "Imports violates '" + restrictions.join(' or ') + "' restrictions.")); } }; return ImportPatterns; diff --git a/build/lib/tslint/importPatternsRule.ts b/build/lib/tslint/importPatternsRule.ts index 469ceec743cc8..47f56627efd83 100644 --- a/build/lib/tslint/importPatternsRule.ts +++ b/build/lib/tslint/importPatternsRule.ts @@ -9,7 +9,7 @@ import * as minimatch from 'minimatch'; interface ImportPatternsConfig { target: string; - restrictions: string; + restrictions: string | string[]; } export class Rule extends Lint.Rules.AbstractRule { @@ -45,8 +45,24 @@ class ImportPatterns extends Lint.RuleWalker { return; } - if (!minimatch(path, this._config.restrictions)) { - this.addFailure(this.createFailure(node.getStart(), node.getWidth(), `Imports violates '${this._config.restrictions}'-restriction.`)); + let restrictions: string[]; + if (typeof this._config.restrictions === 'string') { + restrictions = [this._config.restrictions]; + } else { + restrictions = this._config.restrictions; + } + + let matched = false; + for (const pattern of restrictions) { + if (minimatch(path, pattern)) { + matched = true; + break; + } + } + + if (!matched) { + // None of the restrictions matched + this.addFailure(this.createFailure(node.getStart(), node.getWidth(), `Imports violates '${restrictions.join(' or ')}' restrictions.`)); } } } From f6e52ec2933e2b3af08a85104257fd8ab6b5a114 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 16 Jun 2017 12:06:51 +0200 Subject: [PATCH 1949/2747] Add support for old-style require statements in linters --- build/lib/tslint/importPatternsRule.js | 15 ++++++++++++--- build/lib/tslint/importPatternsRule.ts | 15 ++++++++++++--- build/lib/tslint/layeringRule.js | 10 +++++++++- build/lib/tslint/layeringRule.ts | 10 +++++++++- .../test/{ => node}/backupFileService.test.ts | 0 .../test/{ => node}/keybindingEditing.test.ts | 0 6 files changed, 42 insertions(+), 8 deletions(-) rename src/vs/workbench/services/backup/test/{ => node}/backupFileService.test.ts (100%) rename src/vs/workbench/services/keybinding/test/{ => node}/keybindingEditing.test.ts (100%) diff --git a/build/lib/tslint/importPatternsRule.js b/build/lib/tslint/importPatternsRule.js index 9a6284febefdd..f2c6fd5623304 100644 --- a/build/lib/tslint/importPatternsRule.js +++ b/build/lib/tslint/importPatternsRule.js @@ -14,8 +14,10 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); +var ts = require("typescript"); var Lint = require("tslint"); var minimatch = require("minimatch"); +var path_1 = require("path"); var Rule = (function (_super) { __extends(Rule, _super); function Rule() { @@ -41,13 +43,20 @@ var ImportPatterns = (function (_super) { _this._config = _config; return _this; } + ImportPatterns.prototype.visitImportEqualsDeclaration = function (node) { + if (node.moduleReference.kind === ts.SyntaxKind.ExternalModuleReference) { + this._validateImport(node.moduleReference.expression.getText(), node); + } + }; ImportPatterns.prototype.visitImportDeclaration = function (node) { - var path = node.moduleSpecifier.getText(); + this._validateImport(node.moduleSpecifier.getText(), node); + }; + ImportPatterns.prototype._validateImport = function (path, node) { // remove quotes path = path.slice(1, -1); - // ignore relative paths + // resolve relative paths if (path[0] === '.') { - return; + path = path_1.join(this.getSourceFile().fileName, path); } var restrictions; if (typeof this._config.restrictions === 'string') { diff --git a/build/lib/tslint/importPatternsRule.ts b/build/lib/tslint/importPatternsRule.ts index 47f56627efd83..6365e2d96b3e2 100644 --- a/build/lib/tslint/importPatternsRule.ts +++ b/build/lib/tslint/importPatternsRule.ts @@ -6,6 +6,7 @@ import * as ts from 'typescript'; import * as Lint from 'tslint'; import * as minimatch from 'minimatch'; +import { join } from 'path'; interface ImportPatternsConfig { target: string; @@ -34,15 +35,23 @@ class ImportPatterns extends Lint.RuleWalker { super(file, opts); } + protected visitImportEqualsDeclaration(node: ts.ImportEqualsDeclaration): void { + if (node.moduleReference.kind === ts.SyntaxKind.ExternalModuleReference) { + this._validateImport(node.moduleReference.expression.getText(), node); + } + } + protected visitImportDeclaration(node: ts.ImportDeclaration): void { - let path = node.moduleSpecifier.getText(); + this._validateImport(node.moduleSpecifier.getText(), node); + } + private _validateImport(path: string, node: ts.Node): void { // remove quotes path = path.slice(1, -1); - // ignore relative paths + // resolve relative paths if (path[0] === '.') { - return; + path = join(this.getSourceFile().fileName, path); } let restrictions: string[]; diff --git a/build/lib/tslint/layeringRule.js b/build/lib/tslint/layeringRule.js index 37a60b2b44f4c..31b19f3fb10ce 100644 --- a/build/lib/tslint/layeringRule.js +++ b/build/lib/tslint/layeringRule.js @@ -14,6 +14,7 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); +var ts = require("typescript"); var Lint = require("tslint"); var path_1 = require("path"); var Rule = (function (_super) { @@ -54,8 +55,15 @@ var LayeringRule = (function (_super) { _this._config = config; return _this; } + LayeringRule.prototype.visitImportEqualsDeclaration = function (node) { + if (node.moduleReference.kind === ts.SyntaxKind.ExternalModuleReference) { + this._validateImport(node.moduleReference.expression.getText(), node); + } + }; LayeringRule.prototype.visitImportDeclaration = function (node) { - var path = node.moduleSpecifier.getText(); + this._validateImport(node.moduleSpecifier.getText(), node); + }; + LayeringRule.prototype._validateImport = function (path, node) { // remove quotes path = path.slice(1, -1); if (path[0] === '.') { diff --git a/build/lib/tslint/layeringRule.ts b/build/lib/tslint/layeringRule.ts index c6e34623b2b1d..8217f11d92303 100644 --- a/build/lib/tslint/layeringRule.ts +++ b/build/lib/tslint/layeringRule.ts @@ -51,9 +51,17 @@ class LayeringRule extends Lint.RuleWalker { this._config = config; } + protected visitImportEqualsDeclaration(node: ts.ImportEqualsDeclaration): void { + if (node.moduleReference.kind === ts.SyntaxKind.ExternalModuleReference) { + this._validateImport(node.moduleReference.expression.getText(), node); + } + } + protected visitImportDeclaration(node: ts.ImportDeclaration): void { - let path = node.moduleSpecifier.getText(); + this._validateImport(node.moduleSpecifier.getText(), node); + } + private _validateImport(path: string, node: ts.Node): void { // remove quotes path = path.slice(1, -1); diff --git a/src/vs/workbench/services/backup/test/backupFileService.test.ts b/src/vs/workbench/services/backup/test/node/backupFileService.test.ts similarity index 100% rename from src/vs/workbench/services/backup/test/backupFileService.test.ts rename to src/vs/workbench/services/backup/test/node/backupFileService.test.ts diff --git a/src/vs/workbench/services/keybinding/test/keybindingEditing.test.ts b/src/vs/workbench/services/keybinding/test/node/keybindingEditing.test.ts similarity index 100% rename from src/vs/workbench/services/keybinding/test/keybindingEditing.test.ts rename to src/vs/workbench/services/keybinding/test/node/keybindingEditing.test.ts From fb48a513d87bf9118d21f8a5e9400e74cc681373 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 16 Jun 2017 12:27:26 +0200 Subject: [PATCH 1950/2747] Fix layering issues in vs/base/common --- src/vs/base/common/actions.ts | 7 ++- src/vs/base/common/labels.ts | 3 +- src/vs/base/common/paths.ts | 55 ++++++++++++++++++- src/vs/code/electron-main/app.ts | 3 +- src/vs/code/electron-main/windows.ts | 2 +- src/vs/code/node/windowsUtils.ts | 3 +- src/vs/platform/files/common/files.ts | 55 +------------------ src/vs/platform/files/test/files.test.ts | 4 +- src/vs/platform/workspace/common/workspace.ts | 3 +- .../common/editor/rangeDecorations.ts | 2 +- .../parts/files/browser/fileActions.ts | 10 ++-- .../parts/files/browser/views/explorerView.ts | 4 +- .../files/browser/views/explorerViewer.ts | 12 ++-- .../files/common/editors/fileEditorTracker.ts | 10 ++-- .../parts/files/common/explorerViewModel.ts | 8 +-- .../parts/search/browser/searchActions.ts | 3 +- .../configuration/node/configuration.ts | 6 +- .../services/files/node/fileService.ts | 3 +- .../textfile/common/textFileEditorModel.ts | 4 +- .../workbench/test/workbenchTestServices.ts | 4 +- 20 files changed, 103 insertions(+), 98 deletions(-) diff --git a/src/vs/base/common/actions.ts b/src/vs/base/common/actions.ts index b51eac17ddb40..1a5e7e1acd19f 100644 --- a/src/vs/base/common/actions.ts +++ b/src/vs/base/common/actions.ts @@ -9,7 +9,12 @@ import { IEventEmitter, EventEmitter } from 'vs/base/common/eventEmitter'; import { IDisposable } from 'vs/base/common/lifecycle'; import * as Events from 'vs/base/common/events'; import Event, { Emitter } from 'vs/base/common/event'; -import { ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; + +export interface ITelemetryData { + from?: string; + target?: string; + [key: string]: any; +} export interface IAction extends IDisposable { id: string; diff --git a/src/vs/base/common/labels.ts b/src/vs/base/common/labels.ts index ce95b07160c5f..e7b950da57744 100644 --- a/src/vs/base/common/labels.ts +++ b/src/vs/base/common/labels.ts @@ -7,9 +7,8 @@ import URI from 'vs/base/common/uri'; import platform = require('vs/base/common/platform'); import types = require('vs/base/common/types'); -import { nativeSep, normalize } from 'vs/base/common/paths'; +import { nativeSep, normalize, isEqualOrParent, isEqual } from 'vs/base/common/paths'; import { endsWith, ltrim } from 'vs/base/common/strings'; -import { isEqualOrParent, isEqual } from 'vs/platform/files/common/files'; export interface ILabelProvider { diff --git a/src/vs/base/common/paths.ts b/src/vs/base/common/paths.ts index 3ad625b365305..be13cd187efef 100644 --- a/src/vs/base/common/paths.ts +++ b/src/vs/base/common/paths.ts @@ -6,7 +6,7 @@ import { isLinux, isWindows } from 'vs/base/common/platform'; import { fill } from 'vs/base/common/arrays'; -import { rtrim } from 'vs/base/common/strings'; +import { rtrim, beginsWithIgnoreCase, equalsIgnoreCase } from 'vs/base/common/strings'; import { CharCode } from 'vs/base/common/charCode'; /** @@ -341,4 +341,55 @@ export function isValidBasename(name: string): boolean { } return true; -} \ No newline at end of file +} + +export function isEqual(pathA: string, pathB: string, ignoreCase?: boolean): boolean { + const identityEquals = (pathA === pathB); + if (!ignoreCase || identityEquals) { + return identityEquals; + } + + if (!pathA || !pathB) { + return false; + } + + return equalsIgnoreCase(pathA, pathB); +} + +export function isEqualOrParent(path: string, candidate: string, ignoreCase?: boolean): boolean { + if (path === candidate) { + return true; + } + + if (!path || !candidate) { + return false; + } + + if (candidate.length > path.length) { + return false; + } + + if (ignoreCase) { + const beginsWith = beginsWithIgnoreCase(path, candidate); + if (!beginsWith) { + return false; + } + + if (candidate.length === path.length) { + return true; // same path, different casing + } + + let sepOffset = candidate.length; + if (candidate.charAt(candidate.length - 1) === nativeSep) { + sepOffset--; // adjust the expected sep offset in case our candidate already ends in separator character + } + + return path.charAt(sepOffset) === nativeSep; + } + + if (candidate.charAt(candidate.length - 1) !== nativeSep) { + candidate += nativeSep; + } + + return path.indexOf(candidate) === 0; +} diff --git a/src/vs/code/electron-main/app.ts b/src/vs/code/electron-main/app.ts index a9adcc1e33ae3..98474156ee016 100644 --- a/src/vs/code/electron-main/app.ts +++ b/src/vs/code/electron-main/app.ts @@ -46,7 +46,8 @@ import { IWindowsMainService } from "vs/platform/windows/electron-main/windows"; import { IHistoryMainService } from "vs/platform/history/electron-main/historyMainService"; import { isUndefinedOrNull } from "vs/base/common/types"; import { CodeWindow } from "vs/code/electron-main/window"; -import { isEqual, isParent } from "vs/platform/files/common/files"; +import { isParent } from "vs/platform/files/common/files"; +import { isEqual } from "vs/base/common/paths"; import { KeyboardLayoutMonitor } from "vs/code/electron-main/keyboard"; import URI from 'vs/base/common/uri'; diff --git a/src/vs/code/electron-main/windows.ts b/src/vs/code/electron-main/windows.ts index 12a7337fb3d65..f291a2e6c7c34 100644 --- a/src/vs/code/electron-main/windows.ts +++ b/src/vs/code/electron-main/windows.ts @@ -24,7 +24,7 @@ import { getLastActiveWindow, findBestWindowOrFolder } from 'vs/code/node/window import CommonEvent, { Emitter } from 'vs/base/common/event'; import product from 'vs/platform/node/product'; import { ITelemetryService, ITelemetryData } from 'vs/platform/telemetry/common/telemetry'; -import { isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; +import { isEqual, isEqualOrParent } from 'vs/base/common/paths'; import { IWindowsMainService, IOpenConfiguration } from "vs/platform/windows/electron-main/windows"; import { IHistoryMainService } from "vs/platform/history/electron-main/historyMainService"; import { IProcessEnvironment, isLinux, isMacintosh } from "vs/base/common/platform"; diff --git a/src/vs/code/node/windowsUtils.ts b/src/vs/code/node/windowsUtils.ts index f7a75f9a85b0d..0727611a54383 100644 --- a/src/vs/code/node/windowsUtils.ts +++ b/src/vs/code/node/windowsUtils.ts @@ -10,7 +10,6 @@ import * as fs from 'fs'; import * as platform from 'vs/base/common/platform'; import * as paths from 'vs/base/common/paths'; import { OpenContext } from 'vs/platform/windows/common/windows'; -import { isEqualOrParent } from 'vs/platform/files/common/files'; /** * Exported subset of CodeWindow for testing. @@ -48,7 +47,7 @@ export function findBestWindowOrFolder({ win } function findBestWindow(windows: WINDOW[], filePath: string): WINDOW { - const containers = windows.filter(window => typeof window.openedWorkspacePath === 'string' && isEqualOrParent(filePath, window.openedWorkspacePath, !platform.isLinux /* ignorecase */)); + const containers = windows.filter(window => typeof window.openedWorkspacePath === 'string' && paths.isEqualOrParent(filePath, window.openedWorkspacePath, !platform.isLinux /* ignorecase */)); if (containers.length) { return containers.sort((a, b) => -(a.openedWorkspacePath.length - b.openedWorkspacePath.length))[0]; } diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index 099b40f2dbf25..f5616b353fbba 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -12,7 +12,7 @@ import events = require('vs/base/common/events'); import { isLinux } from 'vs/base/common/platform'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import Event from 'vs/base/common/event'; -import { equalsIgnoreCase, beginsWithIgnoreCase } from 'vs/base/common/strings'; +import { beginsWithIgnoreCase } from 'vs/base/common/strings'; export const IFileService = createDecorator('fileService'); @@ -231,10 +231,10 @@ export class FileChangesEvent extends events.Event { // For deleted also return true when deleted folder is parent of target path if (type === FileChangeType.DELETED) { - return isEqualOrParent(resource.fsPath, change.resource.fsPath, !isLinux /* ignorecase */); + return paths.isEqualOrParent(resource.fsPath, change.resource.fsPath, !isLinux /* ignorecase */); } - return isEqual(resource.fsPath, change.resource.fsPath, !isLinux /* ignorecase */); + return paths.isEqual(resource.fsPath, change.resource.fsPath, !isLinux /* ignorecase */); }); } @@ -291,19 +291,6 @@ export class FileChangesEvent extends events.Event { } } -export function isEqual(pathA: string, pathB: string, ignoreCase?: boolean): boolean { - const identityEquals = (pathA === pathB); - if (!ignoreCase || identityEquals) { - return identityEquals; - } - - if (!pathA || !pathB) { - return false; - } - - return equalsIgnoreCase(pathA, pathB); -} - export function isParent(path: string, candidate: string, ignoreCase?: boolean): boolean { if (!path || !candidate || path === candidate) { return false; @@ -324,43 +311,7 @@ export function isParent(path: string, candidate: string, ignoreCase?: boolean): return path.indexOf(candidate) === 0; } -export function isEqualOrParent(path: string, candidate: string, ignoreCase?: boolean): boolean { - if (path === candidate) { - return true; - } - - if (!path || !candidate) { - return false; - } - - if (candidate.length > path.length) { - return false; - } - - if (ignoreCase) { - const beginsWith = beginsWithIgnoreCase(path, candidate); - if (!beginsWith) { - return false; - } - - if (candidate.length === path.length) { - return true; // same path, different casing - } - - let sepOffset = candidate.length; - if (candidate.charAt(candidate.length - 1) === paths.nativeSep) { - sepOffset--; // adjust the expected sep offset in case our candidate already ends in separator character - } - - return path.charAt(sepOffset) === paths.nativeSep; - } - - if (candidate.charAt(candidate.length - 1) !== paths.nativeSep) { - candidate += paths.nativeSep; - } - return path.indexOf(candidate) === 0; -} export function indexOf(path: string, candidate: string, ignoreCase?: boolean): number { if (candidate.length > path.length) { diff --git a/src/vs/platform/files/test/files.test.ts b/src/vs/platform/files/test/files.test.ts index 14f4643f74991..305db3647cd83 100644 --- a/src/vs/platform/files/test/files.test.ts +++ b/src/vs/platform/files/test/files.test.ts @@ -7,8 +7,8 @@ import * as assert from 'assert'; import URI from 'vs/base/common/uri'; -import { join } from 'vs/base/common/paths'; -import { FileChangeType, FileChangesEvent, isEqual, isParent, isEqualOrParent, indexOf } from 'vs/platform/files/common/files'; +import { join, isEqual, isEqualOrParent } from 'vs/base/common/paths'; +import { FileChangeType, FileChangesEvent, isParent, indexOf } from 'vs/platform/files/common/files'; import { isLinux, isMacintosh, isWindows } from 'vs/base/common/platform'; suite('Files', () => { diff --git a/src/vs/platform/workspace/common/workspace.ts b/src/vs/platform/workspace/common/workspace.ts index 7733f14a34c1c..d4b971d9bbd7f 100644 --- a/src/vs/platform/workspace/common/workspace.ts +++ b/src/vs/platform/workspace/common/workspace.ts @@ -8,7 +8,6 @@ import URI from 'vs/base/common/uri'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import * as paths from 'vs/base/common/paths'; import { TrieMap } from 'vs/base/common/map'; -import { isEqualOrParent } from 'vs/platform/files/common/files'; import { isLinux } from 'vs/base/common/platform'; import Event from 'vs/base/common/event'; @@ -129,7 +128,7 @@ export class LegacyWorkspace implements ILegacyWorkspace { private contains(resource: URI): boolean { if (resource) { - return isEqualOrParent(resource.fsPath, this._resource.fsPath, !isLinux /* ignorecase */); + return paths.isEqualOrParent(resource.fsPath, this._resource.fsPath, !isLinux /* ignorecase */); } return false; diff --git a/src/vs/workbench/common/editor/rangeDecorations.ts b/src/vs/workbench/common/editor/rangeDecorations.ts index 70a95b1427449..730062404f4d8 100644 --- a/src/vs/workbench/common/editor/rangeDecorations.ts +++ b/src/vs/workbench/common/editor/rangeDecorations.ts @@ -9,7 +9,7 @@ import Event, { Emitter } from 'vs/base/common/event'; import * as editorCommon from 'vs/editor/common/editorCommon'; import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService'; import { toResource } from 'vs/workbench/common/editor'; -import { isEqual } from 'vs/platform/files/common/files'; +import { isEqual } from 'vs/base/common/paths'; import { IRange } from 'vs/editor/common/core/range'; import { CursorChangeReason, ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents'; import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; diff --git a/src/vs/workbench/parts/files/browser/fileActions.ts b/src/vs/workbench/parts/files/browser/fileActions.ts index 378a32e3889d7..d66bf8e86c318 100644 --- a/src/vs/workbench/parts/files/browser/fileActions.ts +++ b/src/vs/workbench/parts/files/browser/fileActions.ts @@ -25,7 +25,7 @@ import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { VIEWLET_ID } from 'vs/workbench/parts/files/common/files'; import labels = require('vs/base/common/labels'); import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; -import { IFileService, IFileStat, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; +import { IFileService, IFileStat } from 'vs/platform/files/common/files'; import { toResource, IEditorIdentifier, EditorInput } from 'vs/workbench/common/editor'; import { FileStat, NewStatPlaceholder } from 'vs/workbench/parts/files/common/explorerViewModel'; import { ExplorerView } from 'vs/workbench/parts/files/browser/views/explorerView'; @@ -285,7 +285,7 @@ class RenameFileAction extends BaseRenameAction { public runAction(newName: string): TPromise { - const dirty = this.textFileService.getDirty().filter(d => isEqualOrParent(d.fsPath, this.element.resource.fsPath, !isLinux /* ignorecase */)); + const dirty = this.textFileService.getDirty().filter(d => paths.isEqualOrParent(d.fsPath, this.element.resource.fsPath, !isLinux /* ignorecase */)); const dirtyRenamed: URI[] = []; return TPromise.join(dirty.map(d => { @@ -293,7 +293,7 @@ class RenameFileAction extends BaseRenameAction { let renamed: URI; // If the dirty file itself got moved, just reparent it to the target folder - if (isEqual(this.element.resource.fsPath, d.fsPath)) { + if (paths.isEqual(this.element.resource.fsPath, d.fsPath)) { renamed = URI.file(targetPath); } @@ -660,7 +660,7 @@ export class BaseDeleteFileAction extends BaseFileAction { // Handle dirty let revertPromise: TPromise = TPromise.as(null); - const dirty = this.textFileService.getDirty().filter(d => isEqualOrParent(d.fsPath, this.element.resource.fsPath, !isLinux /* ignorecase */)); + const dirty = this.textFileService.getDirty().filter(d => paths.isEqualOrParent(d.fsPath, this.element.resource.fsPath, !isLinux /* ignorecase */)); if (dirty.length) { let message: string; if (this.element.isDirectory) { @@ -955,7 +955,7 @@ export class PasteFileAction extends BaseFileAction { } // Check if target is ancestor of pasted folder - if (!isEqual(this.element.resource.fsPath, fileToCopy.resource.fsPath) && isEqualOrParent(this.element.resource.fsPath, fileToCopy.resource.fsPath, !isLinux /* ignorecase */)) { + if (!paths.isEqual(this.element.resource.fsPath, fileToCopy.resource.fsPath) && paths.isEqualOrParent(this.element.resource.fsPath, fileToCopy.resource.fsPath, !isLinux /* ignorecase */)) { return false; } diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index 37d52b0f58e58..bbbae2286f236 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -17,7 +17,7 @@ import { prepareActions } from 'vs/workbench/browser/actions'; import { ITree } from 'vs/base/parts/tree/browser/tree'; import { Tree } from 'vs/base/parts/tree/browser/treeImpl'; import { IFilesConfiguration, ExplorerFolderContext, FilesExplorerFocussedContext, ExplorerFocussedContext } from 'vs/workbench/parts/files/common/files'; -import { FileOperation, FileOperationEvent, IResolveFileOptions, FileChangeType, FileChangesEvent, IFileChange, IFileService, isEqualOrParent } from 'vs/platform/files/common/files'; +import { FileOperation, FileOperationEvent, IResolveFileOptions, FileChangeType, FileChangesEvent, IFileChange, IFileService } from 'vs/platform/files/common/files'; import { RefreshViewExplorerAction, NewFolderAction, NewFileAction } from 'vs/workbench/parts/files/browser/fileActions'; import { FileDragAndDrop, FileFilter, FileSorter, FileController, FileRenderer, FileDataSource, FileViewletState, FileAccessibilityProvider } from 'vs/workbench/parts/files/browser/views/explorerViewer'; import { toResource } from 'vs/workbench/common/editor'; @@ -743,7 +743,7 @@ export class ExplorerView extends CollapsibleView { // Drop those path which are parents of the current one for (let i = resolvedDirectories.length - 1; i >= 0; i--) { const resource = resolvedDirectories[i]; - if (isEqualOrParent(stat.resource.fsPath, resource.fsPath, !isLinux /* ignorecase */)) { + if (paths.isEqualOrParent(stat.resource.fsPath, resource.fsPath, !isLinux /* ignorecase */)) { resolvedDirectories.splice(i); } } diff --git a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts index e46282959a51c..da54911c0785b 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts @@ -25,7 +25,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import { ContributableActionProvider } from 'vs/workbench/browser/actions'; import { IFilesConfiguration } from 'vs/workbench/parts/files/common/files'; import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles'; -import { IFileOperationResult, FileOperationResult, IFileService, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; +import { IFileOperationResult, FileOperationResult, IFileService } from 'vs/platform/files/common/files'; import { ResourceMap } from 'vs/base/common/map'; import { DuplicateFileAction, ImportFileAction, IEditableData, IFileViewletState } from 'vs/workbench/parts/files/browser/fileActions'; import { IDataSource, ITree, IAccessibilityProvider, IRenderer, ContextMenuEvent, ISorter, IFilter, IDragAndDrop, IDragAndDropData, IDragOverReaction, DRAG_OVER_ACCEPT_BUBBLE_DOWN, DRAG_OVER_ACCEPT_BUBBLE_DOWN_COPY, DRAG_OVER_ACCEPT_BUBBLE_UP, DRAG_OVER_ACCEPT_BUBBLE_UP_COPY, DRAG_OVER_REJECT } from 'vs/base/parts/tree/browser/tree'; @@ -700,11 +700,11 @@ export class FileDragAndDrop implements IDragAndDrop { return true; // Can not move anything onto itself } - if (!isCopy && isEqual(paths.dirname(source.resource.fsPath), target.resource.fsPath)) { + if (!isCopy && paths.isEqual(paths.dirname(source.resource.fsPath), target.resource.fsPath)) { return true; // Can not move a file to the same parent unless we copy } - if (isEqualOrParent(target.resource.fsPath, source.resource.fsPath, !isLinux /* ignorecase */)) { + if (paths.isEqualOrParent(target.resource.fsPath, source.resource.fsPath, !isLinux /* ignorecase */)) { return true; // Can not move a parent folder into one of its children } @@ -766,12 +766,12 @@ export class FileDragAndDrop implements IDragAndDrop { }; // 1. check for dirty files that are being moved and backup to new target - const dirty = this.textFileService.getDirty().filter(d => isEqualOrParent(d.fsPath, source.resource.fsPath, !isLinux /* ignorecase */)); + const dirty = this.textFileService.getDirty().filter(d => paths.isEqualOrParent(d.fsPath, source.resource.fsPath, !isLinux /* ignorecase */)); return TPromise.join(dirty.map(d => { let moved: URI; // If the dirty file itself got moved, just reparent it to the target folder - if (isEqual(source.resource.fsPath, d.fsPath)) { + if (paths.isEqual(source.resource.fsPath, d.fsPath)) { moved = URI.file(paths.join(target.resource.fsPath, source.name)); } @@ -810,7 +810,7 @@ export class FileDragAndDrop implements IDragAndDrop { // Move with overwrite if the user confirms if (this.messageService.confirm(confirm)) { - const targetDirty = this.textFileService.getDirty().filter(d => isEqualOrParent(d.fsPath, targetResource.fsPath, !isLinux /* ignorecase */)); + const targetDirty = this.textFileService.getDirty().filter(d => paths.isEqualOrParent(d.fsPath, targetResource.fsPath, !isLinux /* ignorecase */)); // Make sure to revert all dirty in target first to be able to overwrite properly return this.textFileService.revertAll(targetDirty, { soft: true /* do not attempt to load content from disk */ }).then(() => { diff --git a/src/vs/workbench/parts/files/common/editors/fileEditorTracker.ts b/src/vs/workbench/parts/files/common/editors/fileEditorTracker.ts index b87ea5f7ab6bb..35e38eb980542 100644 --- a/src/vs/workbench/parts/files/common/editors/fileEditorTracker.ts +++ b/src/vs/workbench/parts/files/common/editors/fileEditorTracker.ts @@ -13,7 +13,7 @@ import { IEditor, IEditorViewState, isCommonCodeEditor } from 'vs/editor/common/ import { toResource, IEditorStacksModel, SideBySideEditorInput, IEditorGroup, IWorkbenchEditorConfiguration } from 'vs/workbench/common/editor'; import { BINARY_FILE_EDITOR_ID } from 'vs/workbench/parts/files/common/files'; import { ITextFileService, ITextFileEditorModel } from 'vs/workbench/services/textfile/common/textfiles'; -import { FileOperationEvent, FileOperation, IFileService, FileChangeType, FileChangesEvent, isEqual, indexOf, isEqualOrParent } from 'vs/platform/files/common/files'; +import { FileOperationEvent, FileOperation, IFileService, FileChangeType, FileChangesEvent, indexOf } from 'vs/platform/files/common/files'; import { FileEditorInput } from 'vs/workbench/parts/files/common/editors/fileEditorInput'; import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService'; import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle'; @@ -115,7 +115,7 @@ export class FileEditorTracker implements IWorkbenchContribution { // Do NOT close any opened editor that matches the resource path (either equal or being parent) of the // resource we move to (movedTo). Otherwise we would close a resource that has been renamed to the same // path but different casing. - if (movedTo && isEqualOrParent(resource.fsPath, movedTo.fsPath, !isLinux /* ignorecase */) && resource.fsPath.indexOf(movedTo.fsPath) === 0) { + if (movedTo && paths.isEqualOrParent(resource.fsPath, movedTo.fsPath, !isLinux /* ignorecase */) && resource.fsPath.indexOf(movedTo.fsPath) === 0) { return; } @@ -123,7 +123,7 @@ export class FileEditorTracker implements IWorkbenchContribution { if (arg1 instanceof FileChangesEvent) { matches = arg1.contains(resource, FileChangeType.DELETED); } else { - matches = isEqualOrParent(resource.fsPath, arg1.fsPath, !isLinux /* ignorecase */); + matches = paths.isEqualOrParent(resource.fsPath, arg1.fsPath, !isLinux /* ignorecase */); } if (!matches) { @@ -195,7 +195,7 @@ export class FileEditorTracker implements IWorkbenchContribution { const resource = input.getResource(); // Update Editor if file (or any parent of the input) got renamed or moved - if (isEqualOrParent(resource.fsPath, oldResource.fsPath, !isLinux /* ignorecase */)) { + if (paths.isEqualOrParent(resource.fsPath, oldResource.fsPath, !isLinux /* ignorecase */)) { let reopenFileResource: URI; if (oldResource.toString() === resource.toString()) { reopenFileResource = newResource; // file got moved @@ -229,7 +229,7 @@ export class FileEditorTracker implements IWorkbenchContribution { const editor = editors[i]; if (editor && editor.position === stacks.positionOfGroup(group)) { const resource = toResource(editor.input, { filter: 'file' }); - if (resource && isEqual(resource.fsPath, resource.fsPath)) { + if (resource && paths.isEqual(resource.fsPath, resource.fsPath)) { const control = editor.getControl(); if (isCommonCodeEditor(control)) { return control.saveViewState(); diff --git a/src/vs/workbench/parts/files/common/explorerViewModel.ts b/src/vs/workbench/parts/files/common/explorerViewModel.ts index f7463ababd977..e8fb2b614c8a2 100644 --- a/src/vs/workbench/parts/files/common/explorerViewModel.ts +++ b/src/vs/workbench/parts/files/common/explorerViewModel.ts @@ -7,7 +7,7 @@ import URI from 'vs/base/common/uri'; import paths = require('vs/base/common/paths'); -import { IFileStat, isEqual, isParent, isEqualOrParent } from 'vs/platform/files/common/files'; +import { IFileStat, isParent } from 'vs/platform/files/common/files'; import { IEditorInput } from 'vs/platform/editor/common/editor'; import { IEditorGroup, toResource } from 'vs/workbench/common/editor'; import { ResourceMap } from 'vs/base/common/map'; @@ -61,7 +61,7 @@ export class FileStat implements IFileStat { // the folder is fully resolved if either it has a list of children or the client requested this by using the resolveTo // array of resource path to resolve. stat.isDirectoryResolved = !!raw.children || (!!resolveTo && resolveTo.some((r) => { - return isEqualOrParent(r.fsPath, stat.resource.fsPath, !isLinux /* ignorecase */); + return paths.isEqualOrParent(r.fsPath, stat.resource.fsPath, !isLinux /* ignorecase */); })); // Recurse into children @@ -241,7 +241,7 @@ export class FileStat implements IFileStat { public find(resource: URI): FileStat { // Return if path found - if (isEqual(resource.fsPath, this.resource.fsPath, !isLinux /* ignorecase */)) { + if (paths.isEqual(resource.fsPath, this.resource.fsPath, !isLinux /* ignorecase */)) { return this; } @@ -253,7 +253,7 @@ export class FileStat implements IFileStat { for (let i = 0; i < this.children.length; i++) { const child = this.children[i]; - if (isEqual(resource.fsPath, child.resource.fsPath, !isLinux /* ignorecase */)) { + if (paths.isEqual(resource.fsPath, child.resource.fsPath, !isLinux /* ignorecase */)) { return child; } diff --git a/src/vs/workbench/parts/search/browser/searchActions.ts b/src/vs/workbench/parts/search/browser/searchActions.ts index 46e865e5b8a41..256f1ec1a2d4f 100644 --- a/src/vs/workbench/parts/search/browser/searchActions.ts +++ b/src/vs/workbench/parts/search/browser/searchActions.ts @@ -29,7 +29,6 @@ import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiati import { IListService } from 'vs/platform/list/browser/listService'; import { explorerItemToFileResource } from 'vs/workbench/parts/files/common/files'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -import { isEqual } from 'vs/platform/files/common/files'; import { OS } from 'vs/base/common/platform'; export function isSearchViewletFocussed(viewletService: IViewletService): boolean { @@ -525,7 +524,7 @@ export class ReplaceAction extends AbstractSearchAndReplaceAction { private hasToOpenFile(): boolean { const file = toResource(this.editorService.getActiveEditorInput(), { filter: 'file' }); if (file) { - return isEqual(file.fsPath, this.element.parent().resource().fsPath); + return paths.isEqual(file.fsPath, this.element.parent().resource().fsPath); } return false; } diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index 6da212e044e29..8f299b5873207 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -19,7 +19,7 @@ import { RunOnceScheduler } from 'vs/base/common/async'; import { readFile } from 'vs/base/node/pfs'; import * as extfs from 'vs/base/node/extfs'; import { IWorkspaceContextService, IWorkspace, Workspace, ILegacyWorkspace, LegacyWorkspace } from "vs/platform/workspace/common/workspace"; -import { FileChangeType, FileChangesEvent, isEqual, isEqualOrParent } from 'vs/platform/files/common/files'; +import { FileChangeType, FileChangesEvent } from 'vs/platform/files/common/files'; import { isLinux } from 'vs/base/common/platform'; import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { CustomConfigurationModel } from 'vs/platform/configuration/common/model'; @@ -339,7 +339,7 @@ class FolderConfiguration extends Disposable { for (let i = 0, len = events.length; i < len; i++) { const resource = events[i].resource; const isJson = paths.extname(resource.fsPath) === '.json'; - const isDeletedSettingsFolder = (events[i].type === FileChangeType.DELETED && isEqual(paths.basename(resource.fsPath), this.configFolderRelativePath)); + const isDeletedSettingsFolder = (events[i].type === FileChangeType.DELETED && paths.isEqual(paths.basename(resource.fsPath), this.configFolderRelativePath)); if (!isJson && !isDeletedSettingsFolder) { continue; // only JSON files or the actual settings folder } @@ -425,7 +425,7 @@ class FolderConfiguration extends Disposable { private contains(resource: URI): boolean { if (resource) { - return isEqualOrParent(resource.fsPath, this.folder.fsPath, !isLinux /* ignorecase */); + return paths.isEqualOrParent(resource.fsPath, this.folder.fsPath, !isLinux /* ignorecase */); } return false; diff --git a/src/vs/workbench/services/files/node/fileService.ts b/src/vs/workbench/services/files/node/fileService.ts index a00926d40bb52..11154b8e8c4c2 100644 --- a/src/vs/workbench/services/files/node/fileService.ts +++ b/src/vs/workbench/services/files/node/fileService.ts @@ -11,8 +11,9 @@ import os = require('os'); import crypto = require('crypto'); import assert = require('assert'); -import { isParent, FileOperation, FileOperationEvent, IContent, IFileService, IResolveFileOptions, IResolveContentOptions, IFileStat, IStreamContent, IFileOperationResult, FileOperationResult, IUpdateContentOptions, FileChangeType, IImportResult, MAX_FILE_SIZE, FileChangesEvent, isEqualOrParent } from 'vs/platform/files/common/files'; +import { isParent, FileOperation, FileOperationEvent, IContent, IFileService, IResolveFileOptions, IResolveContentOptions, IFileStat, IStreamContent, IFileOperationResult, FileOperationResult, IUpdateContentOptions, FileChangeType, IImportResult, MAX_FILE_SIZE, FileChangesEvent } from 'vs/platform/files/common/files'; import strings = require('vs/base/common/strings'); +import { isEqualOrParent } from 'vs/base/common/paths'; import { ResourceMap } from 'vs/base/common/map'; import arrays = require('vs/base/common/arrays'); import baseMime = require('vs/base/common/mime'); diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts index d200639a97533..126ce62526419 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts @@ -24,7 +24,7 @@ import { ITextFileService, IAutoSaveConfiguration, ModelState, ITextFileEditorMo import { EncodingMode } from 'vs/workbench/common/editor'; import { BaseTextEditorModel } from 'vs/workbench/common/editor/textEditorModel'; import { IBackupFileService, BACKUP_FILE_RESOLVE_OPTIONS } from 'vs/workbench/services/backup/common/backup'; -import { IFileService, IFileStat, IFileOperationResult, FileOperationResult, IContent, CONTENT_CHANGE_EVENT_BUFFER_DELAY, FileChangesEvent, FileChangeType, isEqualOrParent } from 'vs/platform/files/common/files'; +import { IFileService, IFileStat, IFileOperationResult, FileOperationResult, IContent, CONTENT_CHANGE_EVENT_BUFFER_DELAY, FileChangesEvent, FileChangeType } from 'vs/platform/files/common/files'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IModeService } from 'vs/editor/common/services/modeService'; @@ -669,7 +669,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil diag(`doSave(${versionId}) - after updateContent()`, this.resource, new Date()); // Telemetry - if ((this.contextService.hasWorkspace() && isEqualOrParent(this.resource.fsPath, this.contextService.toResource('.vscode').fsPath)) || + if ((this.contextService.hasWorkspace() && paths.isEqualOrParent(this.resource.fsPath, this.contextService.toResource('.vscode').fsPath)) || this.resource.fsPath === this.environmentService.appSettingsPath) { // Do not log write to user settings.json and .vscode folder as a filePUT event as it ruins our JSON usage data this.telemetryService.publicLog('settingsWritten'); diff --git a/src/vs/workbench/test/workbenchTestServices.ts b/src/vs/workbench/test/workbenchTestServices.ts index cff7f1456264e..d4cb1601f7b6f 100644 --- a/src/vs/workbench/test/workbenchTestServices.ts +++ b/src/vs/workbench/test/workbenchTestServices.ts @@ -34,7 +34,7 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle import { InstantiationService } from 'vs/platform/instantiation/common/instantiationService'; import { IEditorGroupService, GroupArrangement, GroupOrientation, ITabOptions, IMoveOptions } from 'vs/workbench/services/group/common/groupService'; import { TextFileService } from 'vs/workbench/services/textfile/common/textFileService'; -import { FileOperationEvent, IFileService, IResolveContentOptions, IFileOperationResult, IFileStat, IImportResult, FileChangesEvent, IResolveFileOptions, IContent, IUpdateContentOptions, IStreamContent, isEqualOrParent } from 'vs/platform/files/common/files'; +import { FileOperationEvent, IFileService, IResolveContentOptions, IFileOperationResult, IFileStat, IImportResult, FileChangesEvent, IResolveFileOptions, IContent, IUpdateContentOptions, IStreamContent } from 'vs/platform/files/common/files'; import { IModelService } from 'vs/editor/common/services/modelService'; import { ModeServiceImpl } from 'vs/editor/common/services/modeServiceImpl'; import { ModelServiceImpl } from 'vs/editor/common/services/modelServiceImpl'; @@ -115,7 +115,7 @@ export class TestContextService implements IWorkspaceContextService { public isInsideWorkspace(resource: URI): boolean { if (resource && this.workspace) { - return isEqualOrParent(resource.fsPath, this.workspace.resource.fsPath, !isLinux /* ignorecase */); + return paths.isEqualOrParent(resource.fsPath, this.workspace.resource.fsPath, !isLinux /* ignorecase */); } return false; From 30972ec993923c0d23f179f6223c039440623a1c Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 16 Jun 2017 12:27:50 +0200 Subject: [PATCH 1951/2747] Remove unused code --- src/vs/base/common/errorMessage.ts | 9 ++++- src/vs/base/common/http.ts | 54 ------------------------------ 2 files changed, 8 insertions(+), 55 deletions(-) delete mode 100644 src/vs/base/common/http.ts diff --git a/src/vs/base/common/errorMessage.ts b/src/vs/base/common/errorMessage.ts index 3c882cba2299c..1f587120c5e1c 100644 --- a/src/vs/base/common/errorMessage.ts +++ b/src/vs/base/common/errorMessage.ts @@ -9,7 +9,14 @@ import objects = require('vs/base/common/objects'); import types = require('vs/base/common/types'); import arrays = require('vs/base/common/arrays'); import strings = require('vs/base/common/strings'); -import { IXHRResponse } from 'vs/base/common/http'; + +export interface IXHRResponse { + responseText: string; + status: number; + + readyState: number; + getResponseHeader: (header: string) => string; +} export interface IConnectionErrorData { status: number; diff --git a/src/vs/base/common/http.ts b/src/vs/base/common/http.ts deleted file mode 100644 index 59feccf6e04bf..0000000000000 --- a/src/vs/base/common/http.ts +++ /dev/null @@ -1,54 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ -'use strict'; - -import * as nls from 'vs/nls'; - -export interface IXHROptions { - type?: string; - url?: string; - user?: string; - password?: string; - responseType?: string; - headers?: any; - timeout?: number; - followRedirects?: number; - data?: any; -} - -export interface IXHRResponse { - responseText: string; - status: number; - - readyState: number; - getResponseHeader: (header: string) => string; -} - -export function getErrorStatusDescription(status: number): string { - if (status < 400) { - return void 0; - } - switch (status) { - case 400: return nls.localize('status.400', 'Bad request. The request cannot be fulfilled due to bad syntax.'); - case 401: return nls.localize('status.401', 'Unauthorized. The server is refusing to respond.'); - case 403: return nls.localize('status.403', 'Forbidden. The server is refusing to respond.'); - case 404: return nls.localize('status.404', 'Not Found. The requested location could not be found.'); - case 405: return nls.localize('status.405', 'Method not allowed. A request was made using a request method not supported by that location.'); - case 406: return nls.localize('status.406', 'Not Acceptable. The server can only generate a response that is not accepted by the client.'); - case 407: return nls.localize('status.407', 'Proxy Authentication Required. The client must first authenticate itself with the proxy.'); - case 408: return nls.localize('status.408', 'Request Timeout. The server timed out waiting for the request.'); - case 409: return nls.localize('status.409', 'Conflict. The request could not be completed because of a conflict in the request.'); - case 410: return nls.localize('status.410', 'Gone. The requested page is no longer available.'); - case 411: return nls.localize('status.411', 'Length Required. The "Content-Length" is not defined.'); - case 412: return nls.localize('status.412', 'Precondition Failed. The precondition given in the request evaluated to false by the server.'); - case 413: return nls.localize('status.413', 'Request Entity Too Large. The server will not accept the request, because the request entity is too large.'); - case 414: return nls.localize('status.414', 'Request-URI Too Long. The server will not accept the request, because the URL is too long.'); - case 415: return nls.localize('status.415', 'Unsupported Media Type. The server will not accept the request, because the media type is not supported.'); - case 500: return nls.localize('status.500', 'Internal Server Error.'); - case 501: return nls.localize('status.501', 'Not Implemented. The server either does not recognize the request method, or it lacks the ability to fulfill the request.'); - case 503: return nls.localize('status.503', 'Service Unavailable. The server is currently unavailable (overloaded or down).'); - default: return nls.localize('status.416', 'HTTP status code {0}', status); - } -} From 2f7da22b04b6b6e4ac1ed455f6a421c1fc2c05d0 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 16 Jun 2017 12:28:38 +0200 Subject: [PATCH 1952/2747] Remove unnecessary import --- src/vs/editor/contrib/hover/browser/modesContentHover.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vs/editor/contrib/hover/browser/modesContentHover.ts b/src/vs/editor/contrib/hover/browser/modesContentHover.ts index 0814b278789ca..ff8f4d98be72f 100644 --- a/src/vs/editor/contrib/hover/browser/modesContentHover.ts +++ b/src/vs/editor/contrib/hover/browser/modesContentHover.ts @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -import 'vs/css!vs/base/browser/ui/progressbar/progressbar'; import * as nls from 'vs/nls'; import URI from 'vs/base/common/uri'; import { onUnexpectedError } from 'vs/base/common/errors'; From 0287c3cb40e4e8304f4c791cb2ef7a14a4630f4b Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 16 Jun 2017 12:29:28 +0200 Subject: [PATCH 1953/2747] Better TS Lint import enforcement rules for vs/base and vs/editor/contrib --- tslint.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tslint.json b/tslint.json index 84c20b3d478ae..5f48c5e2439af 100644 --- a/tslint.json +++ b/tslint.json @@ -46,6 +46,23 @@ ], "import-patterns": [ true, + { + "target": "**/vs/base/common/**", + "restrictions": [ + "vs/nls", + "**/vs/base/common/**" + ] + }, + { + "target": "**/vs/editor/contrib/**", + "restrictions": [ + "**/vs/css!./**/*", + "**/vs/nls", + "**/vs/{base,platform}/**/{common,browser}/**", + "**/vs/editor/**", + "assert" + ] + }, { "target": "**/{node,electron-browser,electron-main,extensions}/**", "restrictions": "**/*" From 05f96d11819cb3d39872381d1315801b7f162b14 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Fri, 16 Jun 2017 12:45:54 +0200 Subject: [PATCH 1954/2747] #28538 Initialize all folder configurations at once --- .../workbench/services/configuration/node/configuration.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/services/configuration/node/configuration.ts b/src/vs/workbench/services/configuration/node/configuration.ts index 8f299b5873207..7aa393fc2ac7f 100644 --- a/src/vs/workbench/services/configuration/node/configuration.ts +++ b/src/vs/workbench/services/configuration/node/configuration.ts @@ -243,6 +243,7 @@ export class WorkspaceConfigurationService extends Disposable implements IWorksp private initCachesForFolders(folders: URI[]): void { for (const folder of folders) { this.cachedFolderConfigs.set(folder, new FolderConfiguration(folder, this.workspaceSettingsRootFolder, this.workspace)); + this._configuration.updateFolderConfiguration(folder, new FolderConfigurationModel(new FolderSettingsModel(null), []), false); } } @@ -484,11 +485,11 @@ class Configuration extends BaseConfiguration { return !this.equals(current); } - updateFolderConfiguration(resource: URI, configuration: FolderConfigurationModel): boolean { + updateFolderConfiguration(resource: URI, configuration: FolderConfigurationModel, compare: boolean = true): boolean { this.folders.set(resource, configuration); const current = this.getValue(null, { resource }); this.mergeFolder(resource); - return !objects.equals(current, this.getValue(null, { resource })); + return compare && !objects.equals(current, this.getValue(null, { resource })); } deleteFolderConfiguration(folder: URI): boolean { From c1b48cb26810d78b6375040c8e18470e5171d964 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 16 Jun 2017 12:53:55 +0200 Subject: [PATCH 1955/2747] Fix and enforce layering rules in vs/base/browser --- .../ui/keybindingLabel/keybindingLabel.ts | 2 +- .../common/keybindingLabels.ts | 0 src/vs/base/node/startupTimers.d.ts | 2 +- .../browser/ui/list}/rangeMap.test.ts | 2 +- .../common/usLayoutResolvedKeybinding.ts | 2 +- .../common/keybindingsEditorModel.ts | 2 +- .../electron-browser/walkThroughPart.ts | 2 +- .../common/macLinuxKeyboardMapper.ts | 2 +- .../common/windowsKeyboardMapper.ts | 2 +- .../test/macLinuxKeyboardMapper.test.ts | 2 +- tslint.json | 22 ++++++++++++++++--- 11 files changed, 28 insertions(+), 12 deletions(-) rename src/vs/{platform/keybinding => base}/common/keybindingLabels.ts (100%) rename src/vs/base/{browser/ui/list/test => test/browser/ui/list}/rangeMap.test.ts (99%) diff --git a/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.ts b/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.ts index cee68a0de3a7a..f59b03858115b 100644 --- a/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.ts +++ b/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.ts @@ -9,7 +9,7 @@ import { IDisposable } from 'vs/base/common/lifecycle'; import { equals } from 'vs/base/common/objects'; import { OperatingSystem } from 'vs/base/common/platform'; import { ResolvedKeybinding, ResolvedKeybindingPart } from 'vs/base/common/keyCodes'; -import { UILabelProvider } from 'vs/platform/keybinding/common/keybindingLabels'; +import { UILabelProvider } from 'vs/base/common/keybindingLabels'; import * as dom from 'vs/base/browser/dom'; const $ = dom.$; diff --git a/src/vs/platform/keybinding/common/keybindingLabels.ts b/src/vs/base/common/keybindingLabels.ts similarity index 100% rename from src/vs/platform/keybinding/common/keybindingLabels.ts rename to src/vs/base/common/keybindingLabels.ts diff --git a/src/vs/base/node/startupTimers.d.ts b/src/vs/base/node/startupTimers.d.ts index 5a04270f4b603..2fae1f8eab1ad 100644 --- a/src/vs/base/node/startupTimers.d.ts +++ b/src/vs/base/node/startupTimers.d.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Profile } from './profiler' +import { Profile } from './profiler'; declare interface TickStart { name: string; diff --git a/src/vs/base/browser/ui/list/test/rangeMap.test.ts b/src/vs/base/test/browser/ui/list/rangeMap.test.ts similarity index 99% rename from src/vs/base/browser/ui/list/test/rangeMap.test.ts rename to src/vs/base/test/browser/ui/list/rangeMap.test.ts index 0ad8b350bef51..e5121fd51066c 100644 --- a/src/vs/base/browser/ui/list/test/rangeMap.test.ts +++ b/src/vs/base/test/browser/ui/list/rangeMap.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import assert = require('assert'); -import { RangeMap, intersect, groupIntersect, consolidate } from '../rangeMap'; +import { RangeMap, intersect, groupIntersect, consolidate } from 'vs/base/browser/ui/list/rangeMap'; suite('RangeMap', () => { var rangeMap: RangeMap; diff --git a/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts b/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts index 08d67882828f8..78861625e1a0c 100644 --- a/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts +++ b/src/vs/platform/keybinding/common/usLayoutResolvedKeybinding.ts @@ -5,7 +5,7 @@ 'use strict'; import { ResolvedKeybinding, ResolvedKeybindingPart, KeyCode, KeyCodeUtils, Keybinding, KeybindingType, SimpleKeybinding } from 'vs/base/common/keyCodes'; -import { UILabelProvider, AriaLabelProvider, ElectronAcceleratorLabelProvider, UserSettingsLabelProvider } from 'vs/platform/keybinding/common/keybindingLabels'; +import { UILabelProvider, AriaLabelProvider, ElectronAcceleratorLabelProvider, UserSettingsLabelProvider } from 'vs/base/common/keybindingLabels'; import { OperatingSystem } from 'vs/base/common/platform'; /** diff --git a/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts b/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts index cce68a1ae07aa..d9ab87baa3e78 100644 --- a/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts +++ b/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.ts @@ -11,7 +11,7 @@ import { OperatingSystem, language, LANGUAGE_DEFAULT } from 'vs/base/common/plat import { IMatch, IFilter, or, matchesContiguousSubString, matchesPrefix, matchesCamelCase, matchesWords } from 'vs/base/common/filters'; import { Registry } from 'vs/platform/platform'; import { ResolvedKeybinding, ResolvedKeybindingPart } from 'vs/base/common/keyCodes'; -import { AriaLabelProvider, UserSettingsLabelProvider, UILabelProvider, ModifierLabels as ModLabels } from 'vs/platform/keybinding/common/keybindingLabels'; +import { AriaLabelProvider, UserSettingsLabelProvider, UILabelProvider, ModifierLabels as ModLabels } from 'vs/base/common/keybindingLabels'; import { CommonEditorRegistry, EditorAction } from 'vs/editor/common/editorCommonExtensions'; import { MenuRegistry, ILocalizedString, SyncActionDescriptor, ICommandAction } from 'vs/platform/actions/common/actions'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; diff --git a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts index ac247b050eb7a..5bbbccb4d932b 100644 --- a/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts +++ b/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.ts @@ -40,7 +40,7 @@ import { IMessageService, Severity } from 'vs/platform/message/common/message'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; import { registerColor, focusBorder, textLinkForeground, textLinkActiveForeground, textPreformatForeground, contrastBorder, textBlockQuoteBackground, textBlockQuoteBorder } from 'vs/platform/theme/common/colorRegistry'; import { getExtraColor } from 'vs/workbench/parts/welcome/walkThrough/node/walkThroughUtils'; -import { UILabelProvider } from 'vs/platform/keybinding/common/keybindingLabels'; +import { UILabelProvider } from 'vs/base/common/keybindingLabels'; import { OS, OperatingSystem } from 'vs/base/common/platform'; export const WALK_THROUGH_FOCUS = new RawContextKey('interactivePlaygroundFocus', false); diff --git a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts index bf911f28c139d..a7790298f3718 100644 --- a/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/macLinuxKeyboardMapper.ts @@ -9,7 +9,7 @@ import { OperatingSystem } from 'vs/base/common/platform'; import { KeyCode, ResolvedKeybinding, KeyCodeUtils, SimpleKeybinding, Keybinding, KeybindingType, ResolvedKeybindingPart } from 'vs/base/common/keyCodes'; import { ScanCode, ScanCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE, IMMUTABLE_KEY_CODE_TO_CODE, ScanCodeBinding } from 'vs/workbench/services/keybinding/common/scanCode'; import { CharCode } from 'vs/base/common/charCode'; -import { UILabelProvider, AriaLabelProvider, UserSettingsLabelProvider, ElectronAcceleratorLabelProvider } from 'vs/platform/keybinding/common/keybindingLabels'; +import { UILabelProvider, AriaLabelProvider, UserSettingsLabelProvider, ElectronAcceleratorLabelProvider } from 'vs/base/common/keybindingLabels'; import { IKeyboardMapper } from 'vs/workbench/services/keybinding/common/keyboardMapper'; import { IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding'; diff --git a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts index 1eeb5b682b5de..02c1dac816cc3 100644 --- a/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts +++ b/src/vs/workbench/services/keybinding/common/windowsKeyboardMapper.ts @@ -8,7 +8,7 @@ import { KeyCode, KeyCodeUtils, ResolvedKeybinding, Keybinding, SimpleKeybinding, KeybindingType, ResolvedKeybindingPart } from 'vs/base/common/keyCodes'; import { ScanCode, ScanCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE, ScanCodeBinding } from 'vs/workbench/services/keybinding/common/scanCode'; import { CharCode } from 'vs/base/common/charCode'; -import { UILabelProvider, AriaLabelProvider, ElectronAcceleratorLabelProvider, UserSettingsLabelProvider } from 'vs/platform/keybinding/common/keybindingLabels'; +import { UILabelProvider, AriaLabelProvider, ElectronAcceleratorLabelProvider, UserSettingsLabelProvider } from 'vs/base/common/keybindingLabels'; import { OperatingSystem } from 'vs/base/common/platform'; import { IKeyboardMapper } from 'vs/workbench/services/keybinding/common/keyboardMapper'; import { IKeyboardEvent } from 'vs/platform/keybinding/common/keybinding'; diff --git a/src/vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts b/src/vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts index f168b02ef2f40..cc84bdadccec8 100644 --- a/src/vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts +++ b/src/vs/workbench/services/keybinding/test/macLinuxKeyboardMapper.test.ts @@ -9,7 +9,7 @@ import * as assert from 'assert'; import { KeyMod, KeyCode, createKeybinding, SimpleKeybinding, KeyChord } from 'vs/base/common/keyCodes'; import { MacLinuxKeyboardMapper, IMacLinuxKeyboardMapping } from 'vs/workbench/services/keybinding/common/macLinuxKeyboardMapper'; import { OperatingSystem } from 'vs/base/common/platform'; -import { UserSettingsLabelProvider } from 'vs/platform/keybinding/common/keybindingLabels'; +import { UserSettingsLabelProvider } from 'vs/base/common/keybindingLabels'; import { USLayoutResolvedKeybinding } from 'vs/platform/keybinding/common/usLayoutResolvedKeybinding'; import { ScanCodeUtils, ScanCodeBinding, ScanCode } from 'vs/workbench/services/keybinding/common/scanCode'; import { TPromise } from 'vs/base/common/winjs.base'; diff --git a/tslint.json b/tslint.json index 5f48c5e2439af..3cb9ec3a3e306 100644 --- a/tslint.json +++ b/tslint.json @@ -46,19 +46,35 @@ ], "import-patterns": [ true, + // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + // !!! Do not relax these rules !!! + // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! { + // vs/base/common cannot depend on anything else "target": "**/vs/base/common/**", "restrictions": [ "vs/nls", "**/vs/base/common/**" ] }, + { + // vs/base/browser can only depend on vs/base/common + "target": "**/vs/base/browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/common/**", + "**/vs/base/browser/**" + ] + }, { "target": "**/vs/editor/contrib/**", "restrictions": [ - "**/vs/css!./**/*", - "**/vs/nls", - "**/vs/{base,platform}/**/{common,browser}/**", + "vs/nls", + "vs/css!./**/*", + "**/vs/base/{common,browser}/**", + "**/vs/base/parts/{tree,quickopen}/{common,browser}/**", + "**/vs/platform/**/{common,browser}/**", "**/vs/editor/**", "assert" ] From 49d5cc6e4398491e33ad81d87b2c8cd4b2f56d85 Mon Sep 17 00:00:00 2001 From: Dirk Baeumer Date: Fri, 16 Jun 2017 13:01:58 +0200 Subject: [PATCH 1956/2747] Remove 'terminal' as a used term from tasks. --- src/vs/base/common/map.ts | 8 +- src/vs/vscode.proposed.d.ts | 35 ++++--- src/vs/workbench/api/node/extHost.api.impl.ts | 2 +- src/vs/workbench/api/node/extHostTask.ts | 28 +++--- src/vs/workbench/api/node/extHostTypes.ts | 16 +-- .../parts/tasks/browser/buildQuickOpen.ts | 2 +- .../parts/tasks/browser/taskQuickOpen.ts | 2 +- .../parts/tasks/browser/testQuickOpen.ts | 2 +- .../parts/tasks/common/taskConfiguration.ts | 98 +++++++++++-------- src/vs/workbench/parts/tasks/common/tasks.ts | 43 ++++---- .../tasks/electron-browser/jsonSchema_v2.ts | 22 ++++- .../electron-browser/terminalTaskSystem.ts | 89 +++++++++-------- .../parts/tasks/node/processTaskSystem.ts | 4 +- .../tasks/test/node/configuration.test.ts | 52 +++++----- 14 files changed, 224 insertions(+), 179 deletions(-) diff --git a/src/vs/base/common/map.ts b/src/vs/base/common/map.ts index 9b5804ee96f21..55ad91bee3e61 100644 --- a/src/vs/base/common/map.ts +++ b/src/vs/base/common/map.ts @@ -485,14 +485,18 @@ export class LinkedMap { } public delete(key: K): boolean { + return !!this.remove(key); + } + + public remove(key: K): V | undefined { const item = this._map.get(key); if (!item) { - return false; + return undefined; } this._map.delete(key); this.removeItem(item); this._size--; - return true; + return item.value; } public shift(): V | undefined { diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 29bde57d31838..fecdcb110fc06 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -31,49 +31,52 @@ declare module 'vscode' { /** * Controls how the task channel is used between tasks */ - export enum TaskInstanceKind { + export enum TaskPanelKind { /** - * Shares a channel with other tasks. This is the default. + * Shares a panel with other tasks. This is the default. */ Shared = 1, /** - * Uses the same task channel for every run if possible. The task channel is not + * Uses a dedicated panel for this tasks. The panel is not * shared with other tasks. */ - Same = 2, + Dedicated = 2, /** - * Creates a new task channel whenever that task is executed + * Creates a new panel whenever this task is executed. */ New = 3 } /** - * Controls terminal specific behavior. + * Controls how the task is presented in the UI. */ - export interface TaskTerminalBehavior { + export interface TaskPresentationOptions { /** - * Controls whether the terminal executing a task is brought to front or not. + * Controls whether the task output is reveal in the user interface. * Defaults to `RevealKind.Always`. */ reveal?: TaskRevealKind; /** - * Controls whether the command is echoed in the terminal or not. + * Controls whether the command associated with the task is echoed + * in the user interface. */ echo?: boolean; /** - * Controls whether the task pane takes focus when the task is executed + * Controls whether the panel showing the task output is taking focus. */ focus?: boolean; /** - * Controls in which pane the task is executed. + * Controls if the task panel is used for this task only (dedicated), + * shared between tasks (shared) or if a new panel is created on + * every task execution (new). Defaults to `TaskInstanceKind.Shared` */ - instance?: TaskInstanceKind; + panel?: TaskPanelKind; } export interface ProcessTaskOptions { @@ -200,9 +203,9 @@ declare module 'vscode' { options: ProcessTaskOptions; /** - * The terminal behavior. Defaults to an empty object literal. + * The presentation options. Defaults to an empty literal. */ - terminalBehavior: TaskTerminalBehavior; + presentationOptions: TaskPresentationOptions; /** * The problem matchers attached to the task. Defaults to an empty @@ -332,9 +335,9 @@ declare module 'vscode' { options: ShellTaskOptions; /** - * The terminal behavior. Defaults to an empty object literal. + * The presentation options. Defaults to an empty literal. */ - terminalBehavior: TaskTerminalBehavior; + presentationOptions: TaskPresentationOptions; /** * The problem matchers attached to the task. Defaults to an empty diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 7c4e72c853daa..fbaaaaa5897eb 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -489,7 +489,7 @@ export function createApiFactory( ThemeColor: extHostTypes.ThemeColor, // functions TaskRevealKind: extHostTypes.TaskRevealKind, - TaskInstanceKind: extHostTypes.TaskInstanceKind, + TaskPanelKind: extHostTypes.TaskPanelKind, TaskGroup: extHostTypes.TaskGroup, ShellTask: extHostTypes.ShellTask, ProcessTask: extHostTypes.ProcessTask diff --git a/src/vs/workbench/api/node/extHostTask.ts b/src/vs/workbench/api/node/extHostTask.ts index 28721295f7df1..6fbc70d641ea8 100644 --- a/src/vs/workbench/api/node/extHostTask.ts +++ b/src/vs/workbench/api/node/extHostTask.ts @@ -207,32 +207,32 @@ namespace TaskRevealKind { } } -namespace TaskInstanceKind { - export function from(value: vscode.TaskInstanceKind): TaskSystem.InstanceKind { +namespace TaskPanelKind { + export function from(value: vscode.TaskPanelKind): TaskSystem.PanelKind { if (value === void 0 || value === null) { - return TaskSystem.InstanceKind.Shared; + return TaskSystem.PanelKind.Shared; } switch (value) { - case types.TaskInstanceKind.Same: - return TaskSystem.InstanceKind.Same; - case types.TaskInstanceKind.New: - return TaskSystem.InstanceKind.New; + case types.TaskPanelKind.Dedicated: + return TaskSystem.PanelKind.Dedicated; + case types.TaskPanelKind.New: + return TaskSystem.PanelKind.New; default: - return TaskSystem.InstanceKind.Shared; + return TaskSystem.PanelKind.Shared; } } } -namespace TerminalBehaviour { - export function from(value: vscode.TaskTerminalBehavior): TaskSystem.TerminalBehavior { +namespace PresentationOptions { + export function from(value: vscode.TaskPresentationOptions): TaskSystem.PresentationOptions { if (value === void 0 || value === null) { - return { reveal: TaskSystem.RevealKind.Always, echo: true, focus: false, instance: TaskSystem.InstanceKind.Shared }; + return { reveal: TaskSystem.RevealKind.Always, echo: true, focus: false, panel: TaskSystem.PanelKind.Shared }; } return { reveal: TaskRevealKind.from(value.reveal), echo: value.echo === void 0 ? true : !!value.echo, focus: !!value.focus, - instance: TaskInstanceKind.from(value.instance) + panel: TaskPanelKind.from(value.panel) }; } } @@ -359,7 +359,7 @@ namespace Tasks { args: Strings.from(value.args), type: TaskSystem.CommandType.Process, suppressTaskName: true, - terminalBehavior: TerminalBehaviour.from(value.terminalBehavior) + presentation: PresentationOptions.from(value.presentationOptions) }; if (value.options) { result.options = CommandOptions.from(value.options); @@ -374,7 +374,7 @@ namespace Tasks { let result: TaskSystem.CommandConfiguration = { name: value.commandLine, type: TaskSystem.CommandType.Shell, - terminalBehavior: TerminalBehaviour.from(value.terminalBehavior) + presentation: PresentationOptions.from(value.presentationOptions) }; if (value.options) { result.options = CommandOptions.from(value.options); diff --git a/src/vs/workbench/api/node/extHostTypes.ts b/src/vs/workbench/api/node/extHostTypes.ts index 5b60f3cff85b3..ed530ee907a43 100644 --- a/src/vs/workbench/api/node/extHostTypes.ts +++ b/src/vs/workbench/api/node/extHostTypes.ts @@ -1037,10 +1037,10 @@ export enum TaskRevealKind { Never = 3 } -export enum TaskInstanceKind { +export enum TaskPanelKind { Shared = 1, - Same = 2, + Dedicated = 2, New = 3 } @@ -1053,7 +1053,7 @@ export class BaseTask { private _isBackground: boolean; private _source: string; private _group: string; - private _terminalBehavior: vscode.TaskTerminalBehavior; + private _presentationOptions: vscode.TaskPresentationOptions; constructor(name: string, problemMatchers: string[]) { if (typeof name !== 'string') { @@ -1062,7 +1062,7 @@ export class BaseTask { this._name = name; this._problemMatchers = problemMatchers || []; this._isBackground = false; - this._terminalBehavior = Object.create(null); + this._presentationOptions = Object.create(null); } get identifier(): string { @@ -1124,15 +1124,15 @@ export class BaseTask { this._group = value; } - get terminalBehavior(): vscode.TaskTerminalBehavior { - return this._terminalBehavior; + get presentationOptions(): vscode.TaskPresentationOptions { + return this._presentationOptions; } - set terminalBehavior(value: vscode.TaskTerminalBehavior) { + set presentationOptions(value: vscode.TaskPresentationOptions) { if (value === void 0 || value === null) { value = Object.create(null); } - this._terminalBehavior = value; + this._presentationOptions = value; } get problemMatchers(): string[] { diff --git a/src/vs/workbench/parts/tasks/browser/buildQuickOpen.ts b/src/vs/workbench/parts/tasks/browser/buildQuickOpen.ts index 0ef0d65fb3e0f..22e0bd0cd0004 100644 --- a/src/vs/workbench/parts/tasks/browser/buildQuickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/buildQuickOpen.ts @@ -26,7 +26,7 @@ class TaskEntry extends base.TaskEntry { } let task = this._task; this.taskService.run(task); - if (task.command.terminalBehavior.focus) { + if (task.command.presentation.focus) { this.quickOpenService.close(); return false; } diff --git a/src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts b/src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts index 544826907d491..e48d1d7d55cb0 100644 --- a/src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/taskQuickOpen.ts @@ -28,7 +28,7 @@ class TaskEntry extends base.TaskEntry { } let task = this._task; this.taskService.run(task); - if (task.command.terminalBehavior.focus) { + if (task.command.presentation.focus) { this.quickOpenService.close(); return false; } diff --git a/src/vs/workbench/parts/tasks/browser/testQuickOpen.ts b/src/vs/workbench/parts/tasks/browser/testQuickOpen.ts index ff9b506b36ec5..4c7f59844b0ca 100644 --- a/src/vs/workbench/parts/tasks/browser/testQuickOpen.ts +++ b/src/vs/workbench/parts/tasks/browser/testQuickOpen.ts @@ -26,7 +26,7 @@ class TaskEntry extends base.TaskEntry { } let task = this._task; this.taskService.run(task); - if (task.command.terminalBehavior.focus) { + if (task.command.presentation.focus) { this.quickOpenService.close(); return false; } diff --git a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts index 9b07f84f16fa9..75422d4ef674b 100644 --- a/src/vs/workbench/parts/tasks/common/taskConfiguration.ts +++ b/src/vs/workbench/parts/tasks/common/taskConfiguration.ts @@ -234,16 +234,27 @@ export interface BaseTaskRunnerConfiguration { /** * Controls the behavior of the used terminal */ - terminal?: { + presentation?: { /** - * The terminal should echo the run command. + * Controls whether the terminal executing a task is brought to front or not. + * Defaults to `RevealKind.Always`. + */ + reveal?: string; + + /** + * Controls whether the executed command is printed to the output window or terminal as well. */ echo?: boolean; + /** - * Controls whether or not the terminal is reveal if a task - * is executed. + * Controls whether the terminal is focus when this task is executed */ - reveal?: string; + focus?: boolean; + + /** + * Controls whether the task runs in a new terminal + */ + panel?: string; }; /** @@ -596,11 +607,11 @@ namespace CommandOptions { namespace CommandConfiguration { - interface TerminalBehavior { + interface PresentationOptions { echo?: boolean; reveal?: string; focus?: boolean; - instance?: string; + panel?: string; } interface BaseCommandConfiguationShape { @@ -611,7 +622,11 @@ namespace CommandConfiguration { options?: CommandOptions; echoCommand?: boolean; showOutput?: string; - terminal?: TerminalBehavior; + /** + * @deprecated Use panel instead. + */ + terminal?: PresentationOptions; + presentation?: PresentationOptions; taskSelector?: string; suppressTaskName?: boolean; } @@ -622,66 +637,67 @@ namespace CommandConfiguration { linux?: BaseCommandConfiguationShape; } - export namespace TerminalBehavior { - const properties: MetaData[] = [{ property: 'echo' }, { property: 'reveal' }, { property: 'focus' }, { property: 'instance' }]; + export namespace PresentationOptions { + const properties: MetaData[] = [{ property: 'echo' }, { property: 'reveal' }, { property: 'focus' }, { property: 'panel' }]; - export function from(this: void, config: BaseCommandConfiguationShape, context: ParseContext): Tasks.TerminalBehavior { + export function from(this: void, config: BaseCommandConfiguationShape, context: ParseContext): Tasks.PresentationOptions { let echo: boolean; let reveal: Tasks.RevealKind; let focus: boolean; - let instance: Tasks.InstanceKind; + let panel: Tasks.PanelKind; if (Types.isBoolean(config.echoCommand)) { echo = config.echoCommand; } if (Types.isString(config.showOutput)) { reveal = Tasks.RevealKind.fromString(config.showOutput); } - if (config.terminal) { - if (Types.isBoolean(config.terminal.echo)) { - echo = config.terminal.echo; + let presentation = config.presentation || config.terminal; + if (presentation) { + if (Types.isBoolean(presentation.echo)) { + echo = presentation.echo; } - if (Types.isString(config.terminal.reveal)) { - reveal = Tasks.RevealKind.fromString(config.terminal.reveal); + if (Types.isString(presentation.reveal)) { + reveal = Tasks.RevealKind.fromString(presentation.reveal); } - if (Types.isBoolean(config.terminal.focus)) { - focus = config.terminal.focus; + if (Types.isBoolean(presentation.focus)) { + focus = presentation.focus; } - if (Types.isString(config.terminal.instance)) { - instance = Tasks.InstanceKind.fromString(config.terminal.instance); + if (Types.isString(presentation.panel)) { + panel = Tasks.PanelKind.fromString(presentation.panel); } } - if (echo === void 0 && reveal === void 0 && focus === void 0 && instance === void 0) { + if (echo === void 0 && reveal === void 0 && focus === void 0 && panel === void 0) { return undefined; } - return { echo, reveal, focus, instance }; + return { echo, reveal, focus, panel }; } - export function assignProperties(target: Tasks.TerminalBehavior, source: Tasks.TerminalBehavior): Tasks.TerminalBehavior { + export function assignProperties(target: Tasks.PresentationOptions, source: Tasks.PresentationOptions): Tasks.PresentationOptions { return _assignProperties(target, source, properties); } - export function fillProperties(target: Tasks.TerminalBehavior, source: Tasks.TerminalBehavior): Tasks.TerminalBehavior { + export function fillProperties(target: Tasks.PresentationOptions, source: Tasks.PresentationOptions): Tasks.PresentationOptions { return _fillProperties(target, source, properties); } - export function fillDefaults(value: Tasks.TerminalBehavior, context: ParseContext): Tasks.TerminalBehavior { + export function fillDefaults(value: Tasks.PresentationOptions, context: ParseContext): Tasks.PresentationOptions { let defaultEcho = context.engine === Tasks.ExecutionEngine.Terminal ? true : false; - return _fillDefaults(value, { echo: defaultEcho, reveal: Tasks.RevealKind.Always, focus: false, instance: Tasks.InstanceKind.Shared }, properties, context); + return _fillDefaults(value, { echo: defaultEcho, reveal: Tasks.RevealKind.Always, focus: false, panel: Tasks.PanelKind.Shared }, properties, context); } - export function freeze(value: Tasks.TerminalBehavior): Readonly { + export function freeze(value: Tasks.PresentationOptions): Readonly { return _freeze(value, properties); } - export function isEmpty(this: void, value: Tasks.TerminalBehavior): boolean { + export function isEmpty(this: void, value: Tasks.PresentationOptions): boolean { return _isEmpty(value, properties); } } - const properties: MetaData[] = [ + const properties: MetaData[] = [ { property: 'type' }, { property: 'name' }, { property: 'options', type: CommandOptions }, { property: 'args' }, { property: 'taskSelector' }, { property: 'suppressTaskName' }, - { property: 'terminalBehavior', type: TerminalBehavior } + { property: 'presentation', type: PresentationOptions } ]; export function from(this: void, config: CommandConfiguationShape, context: ParseContext): Tasks.CommandConfiguration { @@ -705,7 +721,7 @@ namespace CommandConfiguration { let result: Tasks.CommandConfiguration = { name: undefined, type: undefined, - terminalBehavior: undefined + presentation: undefined }; if (Types.isString(config.command)) { result.name = config.command; @@ -735,9 +751,9 @@ namespace CommandConfiguration { } } } - let terminal = TerminalBehavior.from(config, context); - if (terminal) { - result.terminalBehavior = terminal; + let panel = PresentationOptions.from(config, context); + if (panel) { + result.presentation = panel; } if (Types.isString(config.taskSelector)) { result.taskSelector = config.taskSelector; @@ -754,7 +770,7 @@ namespace CommandConfiguration { export function onlyTerminalBehaviour(value: Tasks.CommandConfiguration): boolean { return value && - value.terminalBehavior && (value.terminalBehavior.echo !== void 0 || value.terminalBehavior.reveal !== void 0) && + value.presentation && (value.presentation.echo !== void 0 || value.presentation.reveal !== void 0) && value.name === void 0 && value.type === void 0 && value.args === void 0 && CommandOptions.isEmpty(value.options); } @@ -776,7 +792,7 @@ namespace CommandConfiguration { target.args = target.args.concat(source.args); } } - target.terminalBehavior = TerminalBehavior.assignProperties(target.terminalBehavior, source.terminalBehavior); + target.presentation = PresentationOptions.assignProperties(target.presentation, source.presentation); target.options = CommandOptions.assignProperties(target.options, source.options); return target; } @@ -788,14 +804,14 @@ namespace CommandConfiguration { target = target || { name: undefined, type: undefined, - terminalBehavior: undefined + presentation: undefined }; fillProperty(target, source, 'name'); fillProperty(target, source, 'type'); fillProperty(target, source, 'taskSelector'); fillProperty(target, source, 'suppressTaskName'); - target.terminalBehavior = TerminalBehavior.fillProperties(target.terminalBehavior, source.terminalBehavior); + target.presentation = PresentationOptions.fillProperties(target.presentation, source.presentation); target.options = CommandOptions.fillProperties(target.options, source.options); let args: string[] = source.args ? source.args.slice() : []; @@ -820,7 +836,7 @@ namespace CommandConfiguration { if (value.name !== void 0 && value.type === void 0) { value.type = Tasks.CommandType.Process; } - value.terminalBehavior = TerminalBehavior.fillDefaults(value.terminalBehavior, context); + value.presentation = PresentationOptions.fillDefaults(value.presentation, context); if (!isEmpty(value)) { value.options = CommandOptions.fillDefaults(value.options, context); } @@ -1415,7 +1431,7 @@ class ConfigurationParser { command: { name: undefined, type: undefined, - terminalBehavior: undefined, + presentation: undefined, suppressTaskName: true }, isBackground: isBackground, diff --git a/src/vs/workbench/parts/tasks/common/tasks.ts b/src/vs/workbench/parts/tasks/common/tasks.ts index ca4b93f542279..d84a4ce1f1422 100644 --- a/src/vs/workbench/parts/tasks/common/tasks.ts +++ b/src/vs/workbench/parts/tasks/common/tasks.ts @@ -80,61 +80,64 @@ export namespace RevealKind { } } -export enum InstanceKind { +export enum PanelKind { /** - * Shares a terminal with other tasks. This is the default. + * Shares a panel with other tasks. This is the default. */ Shared = 1, /** - * Uses the same terminal for every run if possible. The terminal is not + * Uses a dedicated panel for this tasks. The panel is not * shared with other tasks. */ - Same = 2, + Dedicated = 2, /** - * Creates a new terminal whenever that task is executed + * Creates a new panel whenever this task is executed. */ New = 3 } -export namespace InstanceKind { - export function fromString(value: string): InstanceKind { +export namespace PanelKind { + export function fromString(value: string): PanelKind { switch (value.toLowerCase()) { case 'shared': - return InstanceKind.Shared; - case 'same': - return InstanceKind.Same; + return PanelKind.Shared; + case 'dedicated': + return PanelKind.Dedicated; case 'new': - return InstanceKind.New; + return PanelKind.New; default: - return InstanceKind.Shared; + return PanelKind.Shared; } } } -export interface TerminalBehavior { +export interface PresentationOptions { /** - * Controls whether the terminal executing a task is brought to front or not. + * Controls whether the task output is reveal in the user interface. * Defaults to `RevealKind.Always`. */ reveal: RevealKind; /** - * Controls whether the executed command is printed to the output window or terminal as well. + * Controls whether the command associated with the task is echoed + * in the user interface. */ echo: boolean; /** - * Controls whether the terminal is focus when this task is executed + * Controls whether the panel showing the task output is taking focus. */ focus: boolean; /** - * Controls whether the task runs in a new terminal + * Controls if the task panel is used for this task only (dedicated), + * shared between tasks (shared) or if a new panel is created on + * every task execution (new). Defaults to `TaskInstanceKind.Shared` */ - instance: InstanceKind; + panel: PanelKind; } export enum CommandType { @@ -189,9 +192,9 @@ export interface CommandConfiguration { suppressTaskName?: boolean; /** - * Describes how the terminal is supposed to behave. + * Describes how the task is presented in the UI. */ - terminalBehavior: TerminalBehavior; + presentation: PresentationOptions; } export namespace TaskGroup { diff --git a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts index 554f6a9bc3958..f9c2f251a8951 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts @@ -43,23 +43,35 @@ const dependsOn: IJSONSchema = { ] }; -const terminal: IJSONSchema = { +const presentation: IJSONSchema = { type: 'object', default: { reveal: 'always' }, - description: nls.localize('JsonSchema.tasks.terminal', 'Configures the terminal that is used to execute the task.'), + description: nls.localize('JsonSchema.tasks.terminal', 'Configures the panel that is used to present the task\'s ouput and reads its input.'), + additionalProperties: false, properties: { echo: { + type: 'boolean', + default: true, + description: nls.localize('JsonSchema.tasks.terminal.echo', 'Controls whether the executed command is echoed to the panel. Default is true.') + }, + focus: { type: 'boolean', default: false, - description: nls.localize('JsonSchema.tasks.terminal.echo', 'Controls whether the executed command is echoed to the terminal. Default is false.') + description: nls.localize('JsonSchema.tasks.terminal.focus', 'Controls whether the panel takes focus. Default is false. If set to true the panel is revealed as well.') }, reveal: { type: 'string', enum: ['always', 'silent', 'never'], default: 'always', - description: nls.localize('JsonSchema.tasks.terminal.reveals', 'Controls whether the terminal running the task is revealed or not. Default is \"always\".') + description: nls.localize('JsonSchema.tasks.terminal.reveals', 'Controls whether the panel running the task is revealed or not. Default is \"always\".') + }, + panel: { + type: 'string', + enum: ['shared', 'dedicated', 'new'], + default: 'shared', + description: nls.localize('JsonSchema.tasks.terminal.instance', 'Controls if the panel is shared between tasks, dedicated to this task or a new one is created on every run.') } } }; @@ -131,7 +143,7 @@ definitions.taskDescription.properties.dependsOn = dependsOn; // definitions.taskDescription.properties.isTestCommand.deprecationMessage = nls.localize('JsonSchema.tasks.isTestCommand.deprecated', 'The property isTestCommand is deprecated. Use the group property instead.'); definitions.taskDescription.properties.customize = customize; definitions.taskDescription.properties.type = Objects.deepClone(taskType); -definitions.taskDescription.properties.terminal = terminal; +definitions.taskDescription.properties.presentation = presentation; definitions.taskDescription.properties.group = group; definitions.options.properties.shell = { $ref: '#/definitions/shellConfiguration' diff --git a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts index 8f43026ea2186..30ff0d963aef9 100644 --- a/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.ts @@ -15,6 +15,7 @@ import * as Platform from 'vs/base/common/platform'; import * as Async from 'vs/base/common/async'; import { TPromise } from 'vs/base/common/winjs.base'; import { IStringDictionary } from 'vs/base/common/collections'; +import { LinkedMap, Touch } from 'vs/base/common/map'; import Severity from 'vs/base/common/severity'; import { EventEmitter } from 'vs/base/common/eventEmitter'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; @@ -33,7 +34,7 @@ import { IConfigurationResolverService } from 'vs/workbench/services/configurati import { ITerminalService, ITerminalInstance, IShellLaunchConfig } from 'vs/workbench/parts/terminal/common/terminal'; import { IOutputService, IOutputChannel } from 'vs/workbench/parts/output/common/output'; import { StartStopProblemCollector, WatchingProblemCollector, ProblemCollectorEvents } from 'vs/workbench/parts/tasks/common/problemCollectors'; -import { Task, RevealKind, CommandOptions, ShellConfiguration, CommandType } from 'vs/workbench/parts/tasks/common/tasks'; +import { Task, RevealKind, CommandOptions, ShellConfiguration, CommandType, PanelKind } from 'vs/workbench/parts/tasks/common/tasks'; import { ITaskSystem, ITaskSummary, ITaskExecuteResult, TaskExecuteKind, TaskError, TaskErrors, ITaskResolver, TelemetryEvent, Triggers, TaskSystemEvents, TaskEvent, TaskType @@ -105,9 +106,9 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { private outputChannel: IOutputChannel; private activeTasks: IStringDictionary; - private primaryTerminal: PrimaryTerminal; private terminals: IStringDictionary; - private idleTaskTerminals: IStringDictionary; + private idleTaskTerminals: LinkedMap; + private sameTaskTerminals: IStringDictionary; constructor(private terminalService: ITerminalService, private outputService: IOutputService, private markerService: IMarkerService, private modelService: IModelService, @@ -120,7 +121,8 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { this.outputChannel = this.outputService.getChannel(outputChannelId); this.activeTasks = Object.create(null); this.terminals = Object.create(null); - this.idleTaskTerminals = Object.create(null); + this.idleTaskTerminals = new LinkedMap(); + this.sameTaskTerminals = Object.create(null); } public log(value: string): void { @@ -134,8 +136,8 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { public run(task: Task, resolver: ITaskResolver, trigger: string = Triggers.command): ITaskExecuteResult { let terminalData = this.activeTasks[task._id]; if (terminalData && terminalData.promise) { - let reveal = task.command.terminalBehavior.reveal; - let focus = task.command.terminalBehavior.focus; + let reveal = task.command.presentation.reveal; + let focus = task.command.presentation.focus; if (reveal === RevealKind.Always || focus) { this.terminalService.setActiveInstance(terminalData.terminal); this.terminalService.showPanel(focus); @@ -275,10 +277,14 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { onData.dispose(); onExit.dispose(); delete this.activeTasks[task._id]; - if (this.primaryTerminal && this.primaryTerminal.terminal === terminal) { - this.primaryTerminal.busy = false; + switch (task.command.presentation.panel) { + case PanelKind.Dedicated: + this.sameTaskTerminals[task._id] = terminal.id.toString(); + break; + case PanelKind.Shared: + this.idleTaskTerminals.set(task._id, terminal.id.toString(), Touch.First); + break; } - this.idleTaskTerminals[task._id] = terminal.id.toString(); let remaining = decoder.end(); if (remaining) { watchingProblemMatcher.processLine(remaining); @@ -291,7 +297,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { this.emit(TaskSystemEvents.Inactive, event); } eventCounter = 0; - let reveal = task.command.terminalBehavior.reveal; + let reveal = task.command.presentation.reveal; if (exitCode && exitCode === 1 && watchingProblemMatcher.numberOfMatches === 0 && reveal !== RevealKind.Never) { this.terminalService.setActiveInstance(terminal); this.terminalService.showPanel(false); @@ -317,10 +323,14 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { onData.dispose(); onExit.dispose(); delete this.activeTasks[task._id]; - if (this.primaryTerminal && this.primaryTerminal.terminal === terminal) { - this.primaryTerminal.busy = false; + switch (task.command.presentation.panel) { + case PanelKind.Dedicated: + this.sameTaskTerminals[task._id] = terminal.id.toString(); + break; + case PanelKind.Shared: + this.idleTaskTerminals.set(task._id, terminal.id.toString(), Touch.First); + break; } - this.idleTaskTerminals[task._id] = terminal.id.toString(); let remaining = decoder.end(); if (remaining) { startStopProblemMatcher.processLine(remaining); @@ -334,8 +344,8 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { }); } this.terminalService.setActiveInstance(terminal); - if (task.command.terminalBehavior.reveal === RevealKind.Always || (task.command.terminalBehavior.reveal === RevealKind.Silent && task.problemMatchers.length === 0)) { - this.terminalService.showPanel(task.command.terminalBehavior.focus); + if (task.command.presentation.reveal === RevealKind.Always || (task.command.presentation.reveal === RevealKind.Silent && task.problemMatchers.length === 0)) { + this.terminalService.showPanel(task.command.presentation.focus); } this.activeTasks[task._id] = { terminal, task, promise }; return promise.then((summary) => { @@ -371,7 +381,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { let { command, args } = this.resolveCommandAndArgs(task); let terminalName = nls.localize('TerminalTaskSystem.terminalName', 'Task - {0}', task.name); let waitOnExit: boolean | string = false; - if (task.command.terminalBehavior.reveal !== RevealKind.Never || !task.isBackground) { + if (task.command.presentation.reveal !== RevealKind.Never || !task.isBackground) { waitOnExit = nls.localize('reuseTerminal', 'Terminal will be reused by tasks, press any key to close it.'); }; let shellLaunchConfig: IShellLaunchConfig = undefined; @@ -424,7 +434,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { }); shellArgs.push(commandLine); shellLaunchConfig.args = Platform.isWindows ? shellArgs.join(' ') : shellArgs; - if (task.command.terminalBehavior.echo) { + if (task.command.presentation.echo) { shellLaunchConfig.initialText = `\x1b[1m> Executing task: ${commandLine} <\x1b[0m\n`; } } else { @@ -438,7 +448,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { args, waitOnExit }; - if (task.command.terminalBehavior.echo) { + if (task.command.presentation.echo) { let getArgsToEcho = (args: string | string[]): string => { if (!args || args.length === 0) { return ''; @@ -464,41 +474,38 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem { }); shellLaunchConfig.env = env; } - let terminalId = this.idleTaskTerminals[task._id]; - if (terminalId) { - let taskTerminal = this.terminals[terminalId]; - if (taskTerminal) { - delete this.idleTaskTerminals[task._id]; - taskTerminal.terminal.reuseTerminal(shellLaunchConfig); - return [taskTerminal.terminal, command]; + let prefersSameTerminal = task.command.presentation.panel === PanelKind.Dedicated; + let allowsSharedTerminal = task.command.presentation.panel === PanelKind.Shared; + + let terminalToReuse: TerminalData; + if (prefersSameTerminal) { + let terminalId = this.sameTaskTerminals[task._id]; + if (terminalId) { + terminalToReuse = this.terminals[terminalId]; + delete this.sameTaskTerminals[task._id]; } - } - if (this.primaryTerminal && !this.primaryTerminal.busy) { - // We reuse the primary terminal. Make sure the last running task isn't referenced in the idle terminals - let terminalData = this.terminals[this.primaryTerminal.terminal.id.toString()]; - if (terminalData) { - delete this.idleTaskTerminals[terminalData.lastTask]; + } else if (allowsSharedTerminal) { + let terminalId = this.idleTaskTerminals.remove(task._id) || this.idleTaskTerminals.shift(); + if (terminalId) { + terminalToReuse = this.terminals[terminalId]; } - this.primaryTerminal.terminal.reuseTerminal(shellLaunchConfig); - this.primaryTerminal.busy = true; - return [this.primaryTerminal.terminal, command]; } + if (terminalToReuse) { + terminalToReuse.terminal.reuseTerminal(shellLaunchConfig); + return [terminalToReuse.terminal, command]; + } + const result = this.terminalService.createInstance(shellLaunchConfig); const key = result.id.toString(); result.onDisposed((terminal) => { let terminalData = this.terminals[key]; if (terminalData) { delete this.terminals[key]; - delete this.idleTaskTerminals[terminalData.lastTask]; - } - if (this.primaryTerminal && this.primaryTerminal.terminal === terminal) { - this.primaryTerminal = undefined; + delete this.sameTaskTerminals[terminalData.lastTask]; + this.idleTaskTerminals.delete(terminalData.lastTask); } }); this.terminals[key] = { terminal: result, lastTask: task._id }; - if (!task.isBackground && !this.primaryTerminal) { - this.primaryTerminal = { terminal: result, busy: true }; - } return [result, command]; } diff --git a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts index 0db8946a2d29d..56bb36e37456c 100644 --- a/src/vs/workbench/parts/tasks/node/processTaskSystem.ts +++ b/src/vs/workbench/parts/tasks/node/processTaskSystem.ts @@ -167,12 +167,12 @@ export class ProcessTaskSystem extends EventEmitter implements ITaskSystem { this.childProcess = new LineProcess(command, args, commandConfig.type === CommandType.Shell, this.resolveOptions(commandConfig.options)); telemetryEvent.command = this.childProcess.getSanitizedCommand(); // we have no problem matchers defined. So show the output log - let reveal = task.command.terminalBehavior.reveal; + let reveal = task.command.presentation.reveal; if (reveal === RevealKind.Always || (reveal === RevealKind.Silent && task.problemMatchers.length === 0)) { this.showOutput(); } - if (commandConfig.terminalBehavior.echo) { + if (commandConfig.presentation.echo) { let prompt: string = Platform.isWindows ? '>' : '$'; this.log(`running command${prompt} ${command} ${args.join(' ')}`); } diff --git a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts index 2d60a06a14605..9c12f67048d59 100644 --- a/src/vs/workbench/parts/tasks/test/node/configuration.test.ts +++ b/src/vs/workbench/parts/tasks/test/node/configuration.test.ts @@ -77,31 +77,31 @@ class ConfiguationBuilder { } } -class TerminalBehaviorBuilder { +class PresentationBuilder { - public result: Tasks.TerminalBehavior; + public result: Tasks.PresentationOptions; constructor(public parent: CommandConfigurationBuilder) { - this.result = { echo: false, reveal: Tasks.RevealKind.Always, focus: false, instance: Tasks.InstanceKind.Shared }; + this.result = { echo: false, reveal: Tasks.RevealKind.Always, focus: false, panel: Tasks.PanelKind.Shared }; } - public echo(value: boolean): TerminalBehaviorBuilder { + public echo(value: boolean): PresentationBuilder { this.result.echo = value; return this; } - public reveal(value: Tasks.RevealKind): TerminalBehaviorBuilder { + public reveal(value: Tasks.RevealKind): PresentationBuilder { this.result.reveal = value; return this; } - public focus(value: boolean): TerminalBehaviorBuilder { + public focus(value: boolean): PresentationBuilder { this.result.focus = value; return this; } - public instance(value: Tasks.InstanceKind): TerminalBehaviorBuilder { - this.result.instance = value; + public instance(value: Tasks.PanelKind): PresentationBuilder { + this.result.panel = value; return this; } @@ -112,10 +112,10 @@ class TerminalBehaviorBuilder { class CommandConfigurationBuilder { public result: Tasks.CommandConfiguration; - private terminalBuilder: TerminalBehaviorBuilder; + private presentationBuilder: PresentationBuilder; constructor(public parent: TaskBuilder, command: string) { - this.terminalBuilder = new TerminalBehaviorBuilder(this); + this.presentationBuilder = new PresentationBuilder(this); this.result = { name: command, type: Tasks.CommandType.Process, @@ -123,7 +123,7 @@ class CommandConfigurationBuilder { options: { cwd: '${workspaceRoot}' }, - terminalBehavior: this.terminalBuilder.result, + presentation: this.presentationBuilder.result, suppressTaskName: false }; } @@ -158,13 +158,13 @@ class CommandConfigurationBuilder { return this; } - public terminal(): TerminalBehaviorBuilder { - return this.terminalBuilder; + public presentation(): PresentationBuilder { + return this.presentationBuilder; } public done(taskName: string): void { this.result.args = this.result.args.map(arg => arg === '$name' ? taskName : arg); - this.terminalBuilder.done(); + this.presentationBuilder.done(); } } @@ -458,7 +458,7 @@ function assertTask(actual: Tasks.Task, expected: Tasks.Task) { function assertCommandConfiguration(actual: Tasks.CommandConfiguration, expected: Tasks.CommandConfiguration) { assert.strictEqual(typeof actual, typeof expected); if (actual && expected) { - assertTerminalBehavior(actual.terminalBehavior, expected.terminalBehavior); + assertPresentation(actual.presentation, expected.presentation); assert.strictEqual(actual.name, expected.name, 'name'); assert.strictEqual(actual.type, expected.type, 'task type'); assert.strictEqual(actual.suppressTaskName, expected.suppressTaskName, 'suppressTaskName'); @@ -475,7 +475,7 @@ function assertCommandConfiguration(actual: Tasks.CommandConfiguration, expected } } -function assertTerminalBehavior(actual: Tasks.TerminalBehavior, expected: Tasks.TerminalBehavior) { +function assertPresentation(actual: Tasks.PresentationOptions, expected: Tasks.PresentationOptions) { assert.strictEqual(typeof actual, typeof expected); if (actual && expected) { assert.strictEqual(actual.echo, expected.echo); @@ -574,7 +574,7 @@ suite('Tasks version 0.1.0', () => { task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). command().suppressTaskName(true). - terminal().reveal(Tasks.RevealKind.Silent); + presentation().reveal(Tasks.RevealKind.Silent); testConfiguration( { version: '0.1.0', @@ -639,7 +639,7 @@ suite('Tasks version 0.1.0', () => { task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). command().suppressTaskName(true). - terminal().reveal(Tasks.RevealKind.Never); + presentation().reveal(Tasks.RevealKind.Never); testConfiguration( { version: '0.1.0', @@ -656,7 +656,7 @@ suite('Tasks version 0.1.0', () => { task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). command().suppressTaskName(true). - terminal(). + presentation(). echo(true); testConfiguration( { @@ -805,7 +805,7 @@ suite('Tasks version 0.1.0', () => { task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). command().suppressTaskName(true). - terminal().reveal(Platform.isWindows ? Tasks.RevealKind.Always : Tasks.RevealKind.Never); + presentation().reveal(Platform.isWindows ? Tasks.RevealKind.Always : Tasks.RevealKind.Never); let external: ExternalTaskRunnerConfiguration = { version: '0.1.0', command: 'tsc', @@ -823,7 +823,7 @@ suite('Tasks version 0.1.0', () => { task('tsc', 'tsc'). group(Tasks.TaskGroup.Build). command().suppressTaskName(true). - terminal(). + presentation(). echo(Platform.isWindows ? false : true); let external: ExternalTaskRunnerConfiguration = { version: '0.1.0', @@ -951,7 +951,7 @@ suite('Tasks version 0.1.0', () => { isBackground(true). promptOnClose(false). command().args(['$name', '--p']). - terminal(). + presentation(). echo(true).reveal(Tasks.RevealKind.Never); testConfiguration(external, builder); @@ -972,7 +972,7 @@ suite('Tasks version 0.1.0', () => { let builder = new ConfiguationBuilder(); builder.task('test', 'tsc'). group(Tasks.TaskGroup.Test). - command().args(['$name']).terminal(). + command().args(['$name']).presentation(). echo(true).reveal(Tasks.RevealKind.Never); testConfiguration(external, builder); @@ -1457,7 +1457,7 @@ suite('Tasks version 2.0.0', () => { group(Tasks.TaskGroup.Build). command().suppressTaskName(true). type(Tasks.CommandType.Shell). - terminal().echo(true); + presentation().echo(true); testConfiguration(external, builder); }); @@ -1518,14 +1518,14 @@ suite('Bugs / regression tests', () => { command().suppressTaskName(true). args(['-ExecutionPolicy', 'RemoteSigned', '.\\dockerTask.ps1', '-ComposeForDebug', '-Environment', 'debug']). options({ cwd: '${workspaceRoot}' }). - terminal().echo(true).reveal(Tasks.RevealKind.Always); + presentation().echo(true).reveal(Tasks.RevealKind.Always); testConfiguration(external, builder); } else if (Platform.isMacintosh) { builder.task('composeForDebug', '/bin/bash'). command().suppressTaskName(true). args(['-c', './dockerTask.sh composeForDebug debug']). options({ cwd: '${workspaceRoot}' }). - terminal().reveal(Tasks.RevealKind.Always); + presentation().reveal(Tasks.RevealKind.Always); testConfiguration(external, builder); } }); From 93f625294826c2b07fad4578ba612bc2083e3a22 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Fri, 16 Jun 2017 13:21:42 +0200 Subject: [PATCH 1957/2747] update DAP --- src/vs/workbench/parts/debug/common/debugProtocol.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vs/workbench/parts/debug/common/debugProtocol.d.ts b/src/vs/workbench/parts/debug/common/debugProtocol.d.ts index a8ec4386a55d7..04ae77ec97edb 100644 --- a/src/vs/workbench/parts/debug/common/debugProtocol.d.ts +++ b/src/vs/workbench/parts/debug/common/debugProtocol.d.ts @@ -988,6 +988,8 @@ declare module DebugProtocol { supportsExceptionInfoRequest?: boolean; /** The debug adapter supports the 'terminateDebuggee' attribute on the 'disconnect' request. */ supportTerminateDebuggee?: boolean; + /** The debug adapter supports the delayed loading of parts of the stack, which requires that both the 'startFrame' and 'levels' arguments and the 'totalFrames' result of the 'StackTrace' request are supported. */ + supportsDelayedStackTraceLoading?: boolean; } /** An ExceptionBreakpointsFilter is shown in the UI as an option for configuring how exceptions are dealt with. */ @@ -1305,6 +1307,8 @@ declare module DebugProtocol { line?: boolean; /** Displays the module of the stack frame. */ module?: boolean; + /** Includes all stack frames, including those the debug adapter might otherwise hide. */ + includeAll?: boolean; } /** An ExceptionOptions assigns configuration options to a set of exceptions. */ From a01a40522289f086eab5e4b97ac64c7d8800a078 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Fri, 16 Jun 2017 15:19:26 +0200 Subject: [PATCH 1958/2747] node-debug@1.14.3 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 453b44df0667e..89cd47827bb86 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -42,7 +42,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.14.2' }, + { name: 'ms-vscode.node-debug', version: '1.14.3' }, { name: 'ms-vscode.node-debug2', version: '1.14.0' } ]; From fede6134bb068e7010f2a3b39222fe88d4af98dc Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 16 Jun 2017 15:30:10 +0200 Subject: [PATCH 1959/2747] properly react to workspace change events --- .../workbench/parts/files/browser/views/explorerView.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index 8c51e4d97895f..4550bab1e120a 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -146,6 +146,7 @@ export class ExplorerView extends CollapsibleView { }; this.toDispose.push(this.themeService.onDidFileIconThemeChange(onFileIconThemeChange)); + this.toDispose.push(this.contextService.onDidChangeWorkspaceRoots(() => this.refreshFromEvent())); onFileIconThemeChange(this.themeService.getFileIconTheme()); } @@ -341,7 +342,7 @@ export class ExplorerView extends CollapsibleView { } private get isCreated(): boolean { - return this.explorerViewer && this.explorerViewer.getInput(); + return !!(this.explorerViewer && this.explorerViewer.getInput()); } @memoize @@ -728,13 +729,14 @@ export class ExplorerView extends CollapsibleView { // Subsequent refresh: Merge stat into our local model and refresh tree modelStats.forEach((modelStat, index) => FileStat.mergeLocalWithDisk(modelStat, this.model.roots[index])); - if (this.isCreated) { + const input = this.model.roots.length === 1 ? this.model.roots[0] : this.model; + if (input === this.explorerViewer.getInput()) { return this.explorerViewer.refresh(); } // First time refresh: The stat becomes the input of the viewer // Display roots only when there is more than 1 root - return this.explorerViewer.setInput(this.model.roots.length === 1 ? this.model.roots[0] : this.model).then(() => { + return this.explorerViewer.setInput(input).then(() => { // Make sure to expand all folders that where expanded in the previous session if (targetsToExpand) { From 644a48af847c31e39d6609cd9979eadde4756ab0 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 16 Jun 2017 15:30:12 +0200 Subject: [PATCH 1960/2747] fix #28880 --- .../contrib/zoneWidget/browser/zoneWidget.css | 7 -- .../contrib/zoneWidget/browser/zoneWidget.ts | 92 ++++++++++++++----- 2 files changed, 69 insertions(+), 30 deletions(-) diff --git a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.css b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.css index 38b3e43abd8ac..b9d960656edf3 100644 --- a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.css +++ b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.css @@ -7,13 +7,6 @@ z-index: 10; } -.monaco-editor .zone-widget-arrow.below { - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - position: absolute; -} .monaco-editor .zone-widget .zone-widget-container { border-top-style: solid; diff --git a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts index 4764ae690e52e..eabf84bb2821d 100644 --- a/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts +++ b/src/vs/editor/contrib/zoneWidget/browser/zoneWidget.ts @@ -17,6 +17,7 @@ import { Color, RGBA } from 'vs/base/common/color'; import { EditorLayoutInfo } from 'vs/editor/common/config/editorOptions'; import { Position, IPosition } from 'vs/editor/common/core/position'; import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; +import { IdGenerator } from "vs/base/common/idGenerator"; export interface IOptions { showFrame?: boolean; @@ -99,23 +100,77 @@ export class OverlayWidgetDelegate implements IOverlayWidget { public getPosition(): IOverlayWidgetPosition { return null; } +} + +class Arrow { + + private static _IdGenerator = new IdGenerator('.arrow-decoration-'); + + private readonly _ruleName = Arrow._IdGenerator.nextId(); + private _decorations: string[] = []; + private _color: string; + private _height: number; + + constructor( + private readonly _editor: ICodeEditor + ) { + // + } + + dispose(): void { + this.hide(); + dom.removeCSSRulesContainingSelector(this._ruleName); + } + + set color(value: string) { + if (this._color !== value) { + this._color = value; + this._updateStyle(); + } + } + + set height(value: number) { + if (this._height !== value) { + this._height = value; + this._updateStyle(); + } + } + + private _updateStyle(): void { + dom.removeCSSRulesContainingSelector(this._ruleName); + dom.createCSSRule( + `.monaco-editor ${this._ruleName}`, + `border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; ` + ); + } + show(where: IPosition): void { + this._decorations = this._editor.deltaDecorations( + this._decorations, + [{ range: Range.fromPositions(where), options: { className: this._ruleName } }] + ); + } + + hide(): void { + this._editor.deltaDecorations(this._decorations, []); + } } export abstract class ZoneWidget extends Widget implements IHorizontalSashLayoutProvider { - private _overlayWidget: OverlayWidgetDelegate = null; + private _arrow: Arrow; + private _overlayWidget: OverlayWidgetDelegate; private _resizeSash: Sash; private _positionMarkerId: string[] = []; - protected _viewZone: ViewZoneDelegate = null; + protected _viewZone: ViewZoneDelegate; protected _disposables: IDisposable[] = []; - public container: HTMLElement = null; + public container: HTMLElement; public domNode: HTMLElement; public editor: ICodeEditor; public options: IOptions; - private arrow: HTMLElement = null; + constructor(editor: ICodeEditor, options: IOptions = {}) { super(); @@ -163,8 +218,8 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout dom.addClass(this.container, 'zone-widget-container'); this.domNode.appendChild(this.container); if (this.options.showArrow) { - this.arrow = document.createElement('div'); - this.arrow.className = 'zone-widget-arrow below'; + this._arrow = new Arrow(this.editor); + this._disposables.push(this._arrow); } this._fillContainer(this.container); this._initSash(); @@ -187,9 +242,9 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout this.container.style.borderTopColor = frameColor; this.container.style.borderBottomColor = frameColor; } - if (this.arrow) { + if (this._arrow) { let arrowColor = this.options.arrowColor.toString(); - this.arrow.style.borderBottomColor = arrowColor; + this._arrow.color = arrowColor; } } @@ -243,6 +298,9 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout this.editor.removeOverlayWidget(this._overlayWidget); this._overlayWidget = null; } + if (this._arrow) { + this._arrow.hide(); + } } private _decoratingElementsHeight(): number { @@ -271,9 +329,6 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout const width = this._getWidth(); this.domNode.style.width = `${width}px`; - // Reveal position, to get the line rendered, such that the arrow can be positioned properly - this.editor.revealPosition(position); - // Render the widget as zone (rendering) and widget (lifecycle) const viewZoneDomNode = document.createElement('div'); viewZoneDomNode.style.overflow = 'hidden'; @@ -291,11 +346,8 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout // Render the arrow one 1/3 of an editor line height if (this.options.showArrow) { arrowHeight = Math.round(lineHeight / 3); - this.arrow.style.top = -arrowHeight + 'px'; - this.arrow.style.borderWidth = arrowHeight + 'px'; - this.arrow.style.left = this.editor.getOffsetForColumn(position.lineNumber, position.column) + 'px'; - - viewZoneDomNode.appendChild(this.arrow); + this._arrow.height = arrowHeight; + this._arrow.show(position); } // Render the frame as 1/9 of an editor line height @@ -326,7 +378,6 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout this.editor.addOverlayWidget(this._overlayWidget); }); - if (this.options.showFrame) { const width = this.options.frameWidth ? this.options.frameWidth : frameThickness; this.container.style.borderTopWidth = width + 'px'; @@ -351,15 +402,10 @@ export abstract class ZoneWidget extends Widget implements IHorizontalSashLayout protected setCssClass(className: string, classToReplace?: string): void { if (classToReplace) { this.container.classList.remove(classToReplace); - if (this.arrow) { - this.arrow.classList.remove(classToReplace); - } } dom.addClass(this.container, className); - if (this.arrow) { - dom.addClass(this.arrow, className); - } + } protected abstract _fillContainer(container: HTMLElement): void; From 3370fc8a0e1de103bf86281517461891a52cd78d Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 16 Jun 2017 15:30:31 +0200 Subject: [PATCH 1961/2747] fix revealing of elements --- .../workbench/parts/files/browser/views/explorerViewer.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts index 79da4419afe18..53df7dd08af8f 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts @@ -122,19 +122,18 @@ export class FileDataSource implements IDataSource { } } - public getParent(tree: ITree, stat: FileStat): TPromise { + public getParent(tree: ITree, stat: FileStat | Model): TPromise { if (!stat) { return TPromise.as(null); // can be null if nothing selected in the tree } // Return if root reached - const workspace = this.contextService.getWorkspace2(); - if (workspace && workspace.roots.filter(root => root.toString() === stat.resource.toString())) { + if (tree.getInput() === stat) { return TPromise.as(null); } // Return if parent already resolved - if (stat.parent) { + if (stat instanceof FileStat && stat.parent) { return TPromise.as(stat.parent); } From a416029addda0e965ce7ddfac5daa24316703b5d Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 16 Jun 2017 15:48:53 +0200 Subject: [PATCH 1962/2747] fix drag and drop --- .../parts/files/browser/views/explorerViewer.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts index 53df7dd08af8f..16708df7b4f16 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts @@ -636,6 +636,9 @@ export class FileDragAndDrop implements IDragAndDrop { } public getDragURI(tree: ITree, stat: FileStat): string { + if (this.contextService.getWorkspace2().roots.some(r => r.toString() === stat.resource.toString())) { + return null; // Can not move root folder + } if (stat.isDirectory) { return URI.from({ scheme: 'folder', path: stat.resource.fsPath }).toString(); // indicates that we are dragging a folder } @@ -673,8 +676,8 @@ export class FileDragAndDrop implements IDragAndDrop { } } - public onDragOver(tree: ITree, data: IDragAndDropData, target: FileStat, originalEvent: DragMouseEvent): IDragOverReaction { - if (!this.dropEnabled) { + public onDragOver(tree: ITree, data: IDragAndDropData, target: FileStat | Model, originalEvent: DragMouseEvent): IDragOverReaction { + if (!this.dropEnabled || target instanceof Model) { return DRAG_OVER_REJECT; } @@ -736,8 +739,8 @@ export class FileDragAndDrop implements IDragAndDrop { return fromDesktop || isCopy ? DRAG_OVER_ACCEPT_BUBBLE_DOWN_COPY(true) : DRAG_OVER_ACCEPT_BUBBLE_DOWN(true); } - const workspace = this.contextService.getWorkspace(); - if (workspace && target.resource.toString() !== workspace.resource.toString()) { + const workspace = this.contextService.getWorkspace2(); + if (workspace && workspace.roots.every(r => r.toString() !== target.resource.toString())) { return fromDesktop || isCopy ? DRAG_OVER_ACCEPT_BUBBLE_UP_COPY : DRAG_OVER_ACCEPT_BUBBLE_UP; } From 8c7689c9252919b785029d882bef442c08f23e06 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Fri, 16 Jun 2017 16:09:03 +0200 Subject: [PATCH 1963/2747] fixes #28650 --- build/lib/nls.js | 26 +- build/lib/nls.ts | 9 +- build/lib/typescript/OSSREADME.json | 70 - build/lib/typescript/typescriptServices.d.ts | 1994 - build/lib/typescript/typescriptServices.js | 44323 ----------------- 5 files changed, 22 insertions(+), 46400 deletions(-) delete mode 100644 build/lib/typescript/OSSREADME.json delete mode 100644 build/lib/typescript/typescriptServices.d.ts delete mode 100644 build/lib/typescript/typescriptServices.js diff --git a/build/lib/nls.js b/build/lib/nls.js index da8e6a27a5338..99a77feb182c2 100644 --- a/build/lib/nls.js +++ b/build/lib/nls.js @@ -1,5 +1,9 @@ "use strict"; -var ts = require("./typescript/typescriptServices"); +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +var ts = require("typescript"); var lazy = require("lazy.js"); var event_stream_1 = require("event-stream"); var File = require("vinyl"); @@ -69,7 +73,7 @@ function nls() { return event_stream_1.duplex(input, output); } function isImportNode(node) { - return node.kind === 212 /* ImportDeclaration */ || node.kind === 211 /* ImportEqualsDeclaration */; + return node.kind === ts.SyntaxKind.ImportDeclaration || node.kind === ts.SyntaxKind.ImportEqualsDeclaration; } (function (nls_1) { function fileFrom(file, contents, path) { @@ -111,27 +115,27 @@ function isImportNode(node) { if (!ts.textSpanContainsTextSpan({ start: node.pos, length: node.end - node.pos }, textSpan)) { return CollectStepResult.No; } - return node.kind === 160 /* CallExpression */ ? CollectStepResult.YesAndRecurse : CollectStepResult.NoAndRecurse; + return node.kind === ts.SyntaxKind.CallExpression ? CollectStepResult.YesAndRecurse : CollectStepResult.NoAndRecurse; } function analyze(contents, options) { if (options === void 0) { options = {}; } var filename = 'file.ts'; var serviceHost = new SingleFileServiceHost(assign(clone(options), { noResolve: true }), filename, contents); var service = ts.createLanguageService(serviceHost); - var sourceFile = service.getSourceFile(filename); + var sourceFile = ts.createSourceFile(filename, contents, ts.ScriptTarget.ES5, true); // all imports var imports = lazy(collect(sourceFile, function (n) { return isImportNode(n) ? CollectStepResult.YesAndRecurse : CollectStepResult.NoAndRecurse; })); // import nls = require('vs/nls'); var importEqualsDeclarations = imports - .filter(function (n) { return n.kind === 211 /* ImportEqualsDeclaration */; }) + .filter(function (n) { return n.kind === ts.SyntaxKind.ImportEqualsDeclaration; }) .map(function (n) { return n; }) - .filter(function (d) { return d.moduleReference.kind === 222 /* ExternalModuleReference */; }) + .filter(function (d) { return d.moduleReference.kind === ts.SyntaxKind.ExternalModuleReference; }) .filter(function (d) { return d.moduleReference.expression.getText() === '\'vs/nls\''; }); // import ... from 'vs/nls'; var importDeclarations = imports - .filter(function (n) { return n.kind === 212 /* ImportDeclaration */; }) + .filter(function (n) { return n.kind === ts.SyntaxKind.ImportDeclaration; }) .map(function (n) { return n; }) - .filter(function (d) { return d.moduleSpecifier.kind === 8 /* StringLiteral */; }) + .filter(function (d) { return d.moduleSpecifier.kind === ts.SyntaxKind.StringLiteral; }) .filter(function (d) { return d.moduleSpecifier.getText() === '\'vs/nls\''; }) .filter(function (d) { return !!d.importClause && !!d.importClause.namedBindings; }); var nlsExpressions = importEqualsDeclarations @@ -143,7 +147,7 @@ function isImportNode(node) { }); }); // `nls.localize(...)` calls var nlsLocalizeCallExpressions = importDeclarations - .filter(function (d) { return d.importClause.namedBindings.kind === 214 /* NamespaceImport */; }) + .filter(function (d) { return d.importClause.namedBindings.kind === ts.SyntaxKind.NamespaceImport; }) .map(function (d) { return d.importClause.namedBindings.name; }) .concat(importEqualsDeclarations.map(function (d) { return d.name; })) .map(function (n) { return service.getReferencesAtPosition(filename, n.pos + 1); }) @@ -153,10 +157,10 @@ function isImportNode(node) { .map(function (a) { return lazy(a).last(); }) .filter(function (n) { return !!n; }) .map(function (n) { return n; }) - .filter(function (n) { return n.expression.kind === 158 /* PropertyAccessExpression */ && n.expression.name.getText() === 'localize'; }); + .filter(function (n) { return n.expression.kind === ts.SyntaxKind.PropertyAccessExpression && n.expression.name.getText() === 'localize'; }); // `localize` named imports var allLocalizeImportDeclarations = importDeclarations - .filter(function (d) { return d.importClause.namedBindings.kind === 215 /* NamedImports */; }) + .filter(function (d) { return d.importClause.namedBindings.kind === ts.SyntaxKind.NamedImports; }) .map(function (d) { return d.importClause.namedBindings.elements; }) .flatten(); // `localize` read-only references diff --git a/build/lib/nls.ts b/build/lib/nls.ts index 9fdc15dd0e751..fcba7ac6e5e20 100644 --- a/build/lib/nls.ts +++ b/build/lib/nls.ts @@ -1,4 +1,9 @@ -import * as ts from './typescript/typescriptServices'; +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import * as ts from 'typescript'; import * as lazy from 'lazy.js'; import { duplex, through } from 'event-stream'; import File = require('vinyl'); @@ -171,7 +176,7 @@ module nls { const filename = 'file.ts'; const serviceHost = new SingleFileServiceHost(assign(clone(options), { noResolve: true }), filename, contents); const service = ts.createLanguageService(serviceHost); - const sourceFile = service.getSourceFile(filename); + const sourceFile = ts.createSourceFile(filename, contents, ts.ScriptTarget.ES5, true); // all imports const imports = lazy(collect(sourceFile, n => isImportNode(n) ? CollectStepResult.YesAndRecurse : CollectStepResult.NoAndRecurse)); diff --git a/build/lib/typescript/OSSREADME.json b/build/lib/typescript/OSSREADME.json deleted file mode 100644 index 6fa824225ad45..0000000000000 --- a/build/lib/typescript/OSSREADME.json +++ /dev/null @@ -1,70 +0,0 @@ -// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS: -[ - { - "name": "typescript-legacy", - "version": "1.5", - "license": "Apache2", - "repositoryURL": "https://github.com/Microsoft/TypeScript", - // Reason: LICENSE file does not include Copyright statement - "licenseDetail": [ - "Copyright (c) Microsoft Corporation. All rights reserved. ", - "", - "Apache License", - "", - "Version 2.0, January 2004", - "", - "http://www.apache.org/licenses/", - "", - "TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION", - "", - "1. Definitions.", - "", - "\"License\" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.", - "", - "\"Licensor\" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.", - "", - "\"Legal Entity\" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.", - "", - "\"You\" (or \"Your\") shall mean an individual or Legal Entity exercising permissions granted by this License.", - "", - "\"Source\" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.", - "", - "\"Object\" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.", - "", - "\"Work\" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).", - "", - "\"Derivative Works\" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.", - "", - "\"Contribution\" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as \"Not a Contribution.\"", - "", - "\"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.", - "", - "2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.", - "", - "3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.", - "", - "4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:", - "", - "You must give any other recipients of the Work or Derivative Works a copy of this License; and", - "", - "You must cause any modified files to carry prominent notices stating that You changed the files; and", - "", - "You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and", - "", - "If the Work includes a \"NOTICE\" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.", - "", - "5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.", - "", - "6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.", - "", - "7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.", - "", - "8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.", - "", - "9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.", - "", - "END OF TERMS AND CONDITIONS" - ], - "isDev": true - } -] \ No newline at end of file diff --git a/build/lib/typescript/typescriptServices.d.ts b/build/lib/typescript/typescriptServices.d.ts deleted file mode 100644 index 9b5cf8c4d50ff..0000000000000 --- a/build/lib/typescript/typescriptServices.d.ts +++ /dev/null @@ -1,1994 +0,0 @@ -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - -declare module ts { - interface Map { - [index: string]: T; - } - interface FileMap { - get(fileName: string): T; - set(fileName: string, value: T): void; - contains(fileName: string): boolean; - remove(fileName: string): void; - forEachValue(f: (v: T) => void): void; - } - interface TextRange { - pos: number; - end: number; - } - const enum SyntaxKind { - Unknown = 0, - EndOfFileToken = 1, - SingleLineCommentTrivia = 2, - MultiLineCommentTrivia = 3, - NewLineTrivia = 4, - WhitespaceTrivia = 5, - ConflictMarkerTrivia = 6, - NumericLiteral = 7, - StringLiteral = 8, - RegularExpressionLiteral = 9, - NoSubstitutionTemplateLiteral = 10, - TemplateHead = 11, - TemplateMiddle = 12, - TemplateTail = 13, - OpenBraceToken = 14, - CloseBraceToken = 15, - OpenParenToken = 16, - CloseParenToken = 17, - OpenBracketToken = 18, - CloseBracketToken = 19, - DotToken = 20, - DotDotDotToken = 21, - SemicolonToken = 22, - CommaToken = 23, - LessThanToken = 24, - GreaterThanToken = 25, - LessThanEqualsToken = 26, - GreaterThanEqualsToken = 27, - EqualsEqualsToken = 28, - ExclamationEqualsToken = 29, - EqualsEqualsEqualsToken = 30, - ExclamationEqualsEqualsToken = 31, - EqualsGreaterThanToken = 32, - PlusToken = 33, - MinusToken = 34, - AsteriskToken = 35, - SlashToken = 36, - PercentToken = 37, - PlusPlusToken = 38, - MinusMinusToken = 39, - LessThanLessThanToken = 40, - GreaterThanGreaterThanToken = 41, - GreaterThanGreaterThanGreaterThanToken = 42, - AmpersandToken = 43, - BarToken = 44, - CaretToken = 45, - ExclamationToken = 46, - TildeToken = 47, - AmpersandAmpersandToken = 48, - BarBarToken = 49, - QuestionToken = 50, - ColonToken = 51, - AtToken = 52, - EqualsToken = 53, - PlusEqualsToken = 54, - MinusEqualsToken = 55, - AsteriskEqualsToken = 56, - SlashEqualsToken = 57, - PercentEqualsToken = 58, - LessThanLessThanEqualsToken = 59, - GreaterThanGreaterThanEqualsToken = 60, - GreaterThanGreaterThanGreaterThanEqualsToken = 61, - AmpersandEqualsToken = 62, - BarEqualsToken = 63, - CaretEqualsToken = 64, - Identifier = 65, - BreakKeyword = 66, - CaseKeyword = 67, - CatchKeyword = 68, - ClassKeyword = 69, - ConstKeyword = 70, - ContinueKeyword = 71, - DebuggerKeyword = 72, - DefaultKeyword = 73, - DeleteKeyword = 74, - DoKeyword = 75, - ElseKeyword = 76, - EnumKeyword = 77, - ExportKeyword = 78, - ExtendsKeyword = 79, - FalseKeyword = 80, - FinallyKeyword = 81, - ForKeyword = 82, - FunctionKeyword = 83, - IfKeyword = 84, - ImportKeyword = 85, - InKeyword = 86, - InstanceOfKeyword = 87, - NewKeyword = 88, - NullKeyword = 89, - ReturnKeyword = 90, - SuperKeyword = 91, - SwitchKeyword = 92, - ThisKeyword = 93, - ThrowKeyword = 94, - TrueKeyword = 95, - TryKeyword = 96, - TypeOfKeyword = 97, - VarKeyword = 98, - VoidKeyword = 99, - WhileKeyword = 100, - WithKeyword = 101, - ImplementsKeyword = 102, - InterfaceKeyword = 103, - LetKeyword = 104, - PackageKeyword = 105, - PrivateKeyword = 106, - ProtectedKeyword = 107, - PublicKeyword = 108, - StaticKeyword = 109, - YieldKeyword = 110, - AsKeyword = 111, - AnyKeyword = 112, - BooleanKeyword = 113, - ConstructorKeyword = 114, - DeclareKeyword = 115, - GetKeyword = 116, - IsKeyword = 117, - ModuleKeyword = 118, - NamespaceKeyword = 119, - RequireKeyword = 120, - NumberKeyword = 121, - SetKeyword = 122, - StringKeyword = 123, - SymbolKeyword = 124, - TypeKeyword = 125, - FromKeyword = 126, - OfKeyword = 127, - QualifiedName = 128, - ComputedPropertyName = 129, - TypeParameter = 130, - Parameter = 131, - Decorator = 132, - PropertySignature = 133, - PropertyDeclaration = 134, - MethodSignature = 135, - MethodDeclaration = 136, - Constructor = 137, - GetAccessor = 138, - SetAccessor = 139, - CallSignature = 140, - ConstructSignature = 141, - IndexSignature = 142, - TypePredicate = 143, - TypeReference = 144, - FunctionType = 145, - ConstructorType = 146, - TypeQuery = 147, - TypeLiteral = 148, - ArrayType = 149, - TupleType = 150, - UnionType = 151, - ParenthesizedType = 152, - ObjectBindingPattern = 153, - ArrayBindingPattern = 154, - BindingElement = 155, - ArrayLiteralExpression = 156, - ObjectLiteralExpression = 157, - PropertyAccessExpression = 158, - ElementAccessExpression = 159, - CallExpression = 160, - NewExpression = 161, - TaggedTemplateExpression = 162, - TypeAssertionExpression = 163, - ParenthesizedExpression = 164, - FunctionExpression = 165, - ArrowFunction = 166, - DeleteExpression = 167, - TypeOfExpression = 168, - VoidExpression = 169, - PrefixUnaryExpression = 170, - PostfixUnaryExpression = 171, - BinaryExpression = 172, - ConditionalExpression = 173, - TemplateExpression = 174, - YieldExpression = 175, - SpreadElementExpression = 176, - ClassExpression = 177, - OmittedExpression = 178, - ExpressionWithTypeArguments = 179, - TemplateSpan = 180, - SemicolonClassElement = 181, - Block = 182, - VariableStatement = 183, - EmptyStatement = 184, - ExpressionStatement = 185, - IfStatement = 186, - DoStatement = 187, - WhileStatement = 188, - ForStatement = 189, - ForInStatement = 190, - ForOfStatement = 191, - ContinueStatement = 192, - BreakStatement = 193, - ReturnStatement = 194, - WithStatement = 195, - SwitchStatement = 196, - LabeledStatement = 197, - ThrowStatement = 198, - TryStatement = 199, - DebuggerStatement = 200, - VariableDeclaration = 201, - VariableDeclarationList = 202, - FunctionDeclaration = 203, - ClassDeclaration = 204, - InterfaceDeclaration = 205, - TypeAliasDeclaration = 206, - EnumDeclaration = 207, - ModuleDeclaration = 208, - ModuleBlock = 209, - CaseBlock = 210, - ImportEqualsDeclaration = 211, - ImportDeclaration = 212, - ImportClause = 213, - NamespaceImport = 214, - NamedImports = 215, - ImportSpecifier = 216, - ExportAssignment = 217, - ExportDeclaration = 218, - NamedExports = 219, - ExportSpecifier = 220, - MissingDeclaration = 221, - ExternalModuleReference = 222, - CaseClause = 223, - DefaultClause = 224, - HeritageClause = 225, - CatchClause = 226, - PropertyAssignment = 227, - ShorthandPropertyAssignment = 228, - EnumMember = 229, - SourceFile = 230, - JSDocTypeExpression = 231, - JSDocAllType = 232, - JSDocUnknownType = 233, - JSDocArrayType = 234, - JSDocUnionType = 235, - JSDocTupleType = 236, - JSDocNullableType = 237, - JSDocNonNullableType = 238, - JSDocRecordType = 239, - JSDocRecordMember = 240, - JSDocTypeReference = 241, - JSDocOptionalType = 242, - JSDocFunctionType = 243, - JSDocVariadicType = 244, - JSDocConstructorType = 245, - JSDocThisType = 246, - JSDocComment = 247, - JSDocTag = 248, - JSDocParameterTag = 249, - JSDocReturnTag = 250, - JSDocTypeTag = 251, - JSDocTemplateTag = 252, - SyntaxList = 253, - Count = 254, - FirstAssignment = 53, - LastAssignment = 64, - FirstReservedWord = 66, - LastReservedWord = 101, - FirstKeyword = 66, - LastKeyword = 127, - FirstFutureReservedWord = 102, - LastFutureReservedWord = 110, - FirstTypeNode = 144, - LastTypeNode = 152, - FirstPunctuation = 14, - LastPunctuation = 64, - FirstToken = 0, - LastToken = 127, - FirstTriviaToken = 2, - LastTriviaToken = 6, - FirstLiteralToken = 7, - LastLiteralToken = 10, - FirstTemplateToken = 10, - LastTemplateToken = 13, - FirstBinaryOperator = 24, - LastBinaryOperator = 64, - FirstNode = 128, - } - const enum NodeFlags { - Export = 1, - Ambient = 2, - Public = 16, - Private = 32, - Protected = 64, - Static = 128, - Default = 256, - MultiLine = 512, - Synthetic = 1024, - DeclarationFile = 2048, - Let = 4096, - Const = 8192, - OctalLiteral = 16384, - Namespace = 32768, - ExportContext = 65536, - Modifier = 499, - AccessibilityModifier = 112, - BlockScoped = 12288, - } - interface Node extends TextRange { - kind: SyntaxKind; - flags: NodeFlags; - decorators?: NodeArray; - modifiers?: ModifiersArray; - parent?: Node; - } - interface NodeArray extends Array, TextRange { - hasTrailingComma?: boolean; - } - interface ModifiersArray extends NodeArray { - flags: number; - } - interface Identifier extends PrimaryExpression { - text: string; - originalKeywordKind?: SyntaxKind; - } - interface QualifiedName extends Node { - left: EntityName; - right: Identifier; - } - type EntityName = Identifier | QualifiedName; - type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern; - interface Declaration extends Node { - _declarationBrand: any; - name?: DeclarationName; - } - interface ComputedPropertyName extends Node { - expression: Expression; - } - interface Decorator extends Node { - expression: LeftHandSideExpression; - } - interface TypeParameterDeclaration extends Declaration { - name: Identifier; - constraint?: TypeNode; - expression?: Expression; - } - interface SignatureDeclaration extends Declaration { - typeParameters?: NodeArray; - parameters: NodeArray; - type?: TypeNode; - } - interface VariableDeclaration extends Declaration { - parent?: VariableDeclarationList; - name: Identifier | BindingPattern; - type?: TypeNode; - initializer?: Expression; - } - interface VariableDeclarationList extends Node { - declarations: NodeArray; - } - interface ParameterDeclaration extends Declaration { - dotDotDotToken?: Node; - name: Identifier | BindingPattern; - questionToken?: Node; - type?: TypeNode; - initializer?: Expression; - } - interface BindingElement extends Declaration { - propertyName?: Identifier; - dotDotDotToken?: Node; - name: Identifier | BindingPattern; - initializer?: Expression; - } - interface PropertyDeclaration extends Declaration, ClassElement { - name: DeclarationName; - questionToken?: Node; - type?: TypeNode; - initializer?: Expression; - } - interface ObjectLiteralElement extends Declaration { - _objectLiteralBrandBrand: any; - } - interface PropertyAssignment extends ObjectLiteralElement { - _propertyAssignmentBrand: any; - name: DeclarationName; - questionToken?: Node; - initializer: Expression; - } - interface ShorthandPropertyAssignment extends ObjectLiteralElement { - name: Identifier; - questionToken?: Node; - } - interface VariableLikeDeclaration extends Declaration { - propertyName?: Identifier; - dotDotDotToken?: Node; - name: DeclarationName; - questionToken?: Node; - type?: TypeNode; - initializer?: Expression; - } - interface BindingPattern extends Node { - elements: NodeArray; - } - /** - * Several node kinds share function-like features such as a signature, - * a name, and a body. These nodes should extend FunctionLikeDeclaration. - * Examples: - * FunctionDeclaration - * MethodDeclaration - * AccessorDeclaration - */ - interface FunctionLikeDeclaration extends SignatureDeclaration { - _functionLikeDeclarationBrand: any; - asteriskToken?: Node; - questionToken?: Node; - body?: Block | Expression; - } - interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { - name?: Identifier; - body?: Block; - } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { - body?: Block; - } - interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { - body?: Block; - } - interface SemicolonClassElement extends ClassElement { - _semicolonClassElementBrand: any; - } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { - _accessorDeclarationBrand: any; - body: Block; - } - interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { - _indexSignatureDeclarationBrand: any; - } - interface TypeNode extends Node { - _typeNodeBrand: any; - } - interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { - _functionOrConstructorTypeNodeBrand: any; - } - interface TypeReferenceNode extends TypeNode { - typeName: EntityName; - typeArguments?: NodeArray; - } - interface TypePredicateNode extends TypeNode { - parameterName: Identifier; - type: TypeNode; - } - interface TypeQueryNode extends TypeNode { - exprName: EntityName; - } - interface TypeLiteralNode extends TypeNode, Declaration { - members: NodeArray; - } - interface ArrayTypeNode extends TypeNode { - elementType: TypeNode; - } - interface TupleTypeNode extends TypeNode { - elementTypes: NodeArray; - } - interface UnionTypeNode extends TypeNode { - types: NodeArray; - } - interface ParenthesizedTypeNode extends TypeNode { - type: TypeNode; - } - interface StringLiteral extends LiteralExpression, TypeNode { - _stringLiteralBrand: any; - } - interface Expression extends Node { - _expressionBrand: any; - contextualType?: Type; - } - interface UnaryExpression extends Expression { - _unaryExpressionBrand: any; - } - interface PrefixUnaryExpression extends UnaryExpression { - operator: SyntaxKind; - operand: UnaryExpression; - } - interface PostfixUnaryExpression extends PostfixExpression { - operand: LeftHandSideExpression; - operator: SyntaxKind; - } - interface PostfixExpression extends UnaryExpression { - _postfixExpressionBrand: any; - } - interface LeftHandSideExpression extends PostfixExpression { - _leftHandSideExpressionBrand: any; - } - interface MemberExpression extends LeftHandSideExpression { - _memberExpressionBrand: any; - } - interface PrimaryExpression extends MemberExpression { - _primaryExpressionBrand: any; - } - interface DeleteExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface TypeOfExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface VoidExpression extends UnaryExpression { - expression: UnaryExpression; - } - interface YieldExpression extends Expression { - asteriskToken?: Node; - expression?: Expression; - } - interface BinaryExpression extends Expression { - left: Expression; - operatorToken: Node; - right: Expression; - } - interface ConditionalExpression extends Expression { - condition: Expression; - questionToken: Node; - whenTrue: Expression; - colonToken: Node; - whenFalse: Expression; - } - interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { - name?: Identifier; - body: Block | Expression; - } - interface ArrowFunction extends Expression, FunctionLikeDeclaration { - equalsGreaterThanToken: Node; - } - interface LiteralExpression extends PrimaryExpression { - text: string; - isUnterminated?: boolean; - hasExtendedUnicodeEscape?: boolean; - } - interface TemplateExpression extends PrimaryExpression { - head: LiteralExpression; - templateSpans: NodeArray; - } - interface TemplateSpan extends Node { - expression: Expression; - literal: LiteralExpression; - } - interface ParenthesizedExpression extends PrimaryExpression { - expression: Expression; - } - interface ArrayLiteralExpression extends PrimaryExpression { - elements: NodeArray; - } - interface SpreadElementExpression extends Expression { - expression: Expression; - } - interface ObjectLiteralExpression extends PrimaryExpression, Declaration { - properties: NodeArray; - } - interface PropertyAccessExpression extends MemberExpression { - expression: LeftHandSideExpression; - dotToken: Node; - name: Identifier; - } - interface ElementAccessExpression extends MemberExpression { - expression: LeftHandSideExpression; - argumentExpression?: Expression; - } - interface CallExpression extends LeftHandSideExpression { - expression: LeftHandSideExpression; - typeArguments?: NodeArray; - arguments: NodeArray; - } - interface ExpressionWithTypeArguments extends TypeNode { - expression: LeftHandSideExpression; - typeArguments?: NodeArray; - } - interface NewExpression extends CallExpression, PrimaryExpression { - } - interface TaggedTemplateExpression extends MemberExpression { - tag: LeftHandSideExpression; - template: LiteralExpression | TemplateExpression; - } - type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; - interface TypeAssertion extends UnaryExpression { - type: TypeNode; - expression: UnaryExpression; - } - interface Statement extends Node { - _statementBrand: any; - } - interface Block extends Statement { - statements: NodeArray; - } - interface VariableStatement extends Statement { - declarationList: VariableDeclarationList; - } - interface ExpressionStatement extends Statement { - expression: Expression; - } - interface IfStatement extends Statement { - expression: Expression; - thenStatement: Statement; - elseStatement?: Statement; - } - interface IterationStatement extends Statement { - statement: Statement; - } - interface DoStatement extends IterationStatement { - expression: Expression; - } - interface WhileStatement extends IterationStatement { - expression: Expression; - } - interface ForStatement extends IterationStatement { - initializer?: VariableDeclarationList | Expression; - condition?: Expression; - incrementor?: Expression; - } - interface ForInStatement extends IterationStatement { - initializer: VariableDeclarationList | Expression; - expression: Expression; - } - interface ForOfStatement extends IterationStatement { - initializer: VariableDeclarationList | Expression; - expression: Expression; - } - interface BreakOrContinueStatement extends Statement { - label?: Identifier; - } - interface ReturnStatement extends Statement { - expression?: Expression; - } - interface WithStatement extends Statement { - expression: Expression; - statement: Statement; - } - interface SwitchStatement extends Statement { - expression: Expression; - caseBlock: CaseBlock; - } - interface CaseBlock extends Node { - clauses: NodeArray; - } - interface CaseClause extends Node { - expression?: Expression; - statements: NodeArray; - } - interface DefaultClause extends Node { - statements: NodeArray; - } - type CaseOrDefaultClause = CaseClause | DefaultClause; - interface LabeledStatement extends Statement { - label: Identifier; - statement: Statement; - } - interface ThrowStatement extends Statement { - expression: Expression; - } - interface TryStatement extends Statement { - tryBlock: Block; - catchClause?: CatchClause; - finallyBlock?: Block; - } - interface CatchClause extends Node { - variableDeclaration: VariableDeclaration; - block: Block; - } - interface ClassLikeDeclaration extends Declaration { - name?: Identifier; - typeParameters?: NodeArray; - heritageClauses?: NodeArray; - members: NodeArray; - } - interface ClassDeclaration extends ClassLikeDeclaration, Statement { - } - interface ClassExpression extends ClassLikeDeclaration, PrimaryExpression { - } - interface ClassElement extends Declaration { - _classElementBrand: any; - } - interface InterfaceDeclaration extends Declaration, Statement { - name: Identifier; - typeParameters?: NodeArray; - heritageClauses?: NodeArray; - members: NodeArray; - } - interface HeritageClause extends Node { - token: SyntaxKind; - types?: NodeArray; - } - interface TypeAliasDeclaration extends Declaration, Statement { - name: Identifier; - typeParameters?: NodeArray; - type: TypeNode; - } - interface EnumMember extends Declaration { - name: DeclarationName; - initializer?: Expression; - } - interface EnumDeclaration extends Declaration, Statement { - name: Identifier; - members: NodeArray; - } - interface ModuleDeclaration extends Declaration, Statement { - name: Identifier | LiteralExpression; - body: ModuleBlock | ModuleDeclaration; - } - interface ModuleBlock extends Node, Statement { - statements: NodeArray; - } - interface ImportEqualsDeclaration extends Declaration, Statement { - name: Identifier; - moduleReference: EntityName | ExternalModuleReference; - } - interface ExternalModuleReference extends Node { - expression?: Expression; - } - interface ImportDeclaration extends Statement { - importClause?: ImportClause; - moduleSpecifier: Expression; - } - interface ImportClause extends Declaration { - name?: Identifier; - namedBindings?: NamespaceImport | NamedImports; - } - interface NamespaceImport extends Declaration { - name: Identifier; - } - interface ExportDeclaration extends Declaration, Statement { - exportClause?: NamedExports; - moduleSpecifier?: Expression; - } - interface NamedImportsOrExports extends Node { - elements: NodeArray; - } - type NamedImports = NamedImportsOrExports; - type NamedExports = NamedImportsOrExports; - interface ImportOrExportSpecifier extends Declaration { - propertyName?: Identifier; - name: Identifier; - } - type ImportSpecifier = ImportOrExportSpecifier; - type ExportSpecifier = ImportOrExportSpecifier; - interface ExportAssignment extends Declaration, Statement { - isExportEquals?: boolean; - expression: Expression; - } - interface FileReference extends TextRange { - fileName: string; - } - interface CommentRange extends TextRange { - hasTrailingNewLine?: boolean; - kind: SyntaxKind; - } - interface JSDocTypeExpression extends Node { - type: JSDocType; - } - interface JSDocType extends TypeNode { - _jsDocTypeBrand: any; - } - interface JSDocAllType extends JSDocType { - _JSDocAllTypeBrand: any; - } - interface JSDocUnknownType extends JSDocType { - _JSDocUnknownTypeBrand: any; - } - interface JSDocArrayType extends JSDocType { - elementType: JSDocType; - } - interface JSDocUnionType extends JSDocType { - types: NodeArray; - } - interface JSDocTupleType extends JSDocType { - types: NodeArray; - } - interface JSDocNonNullableType extends JSDocType { - type: JSDocType; - } - interface JSDocNullableType extends JSDocType { - type: JSDocType; - } - interface JSDocRecordType extends JSDocType, TypeLiteralNode { - members: NodeArray; - } - interface JSDocTypeReference extends JSDocType { - name: EntityName; - typeArguments: NodeArray; - } - interface JSDocOptionalType extends JSDocType { - type: JSDocType; - } - interface JSDocFunctionType extends JSDocType, SignatureDeclaration { - parameters: NodeArray; - type: JSDocType; - } - interface JSDocVariadicType extends JSDocType { - type: JSDocType; - } - interface JSDocConstructorType extends JSDocType { - type: JSDocType; - } - interface JSDocThisType extends JSDocType { - type: JSDocType; - } - interface JSDocRecordMember extends PropertyDeclaration { - name: Identifier | LiteralExpression; - type?: JSDocType; - } - interface JSDocComment extends Node { - tags: NodeArray; - } - interface JSDocTag extends Node { - atToken: Node; - tagName: Identifier; - } - interface JSDocTemplateTag extends JSDocTag { - typeParameters: NodeArray; - } - interface JSDocReturnTag extends JSDocTag { - typeExpression: JSDocTypeExpression; - } - interface JSDocTypeTag extends JSDocTag { - typeExpression: JSDocTypeExpression; - } - interface JSDocParameterTag extends JSDocTag { - preParameterName?: Identifier; - typeExpression?: JSDocTypeExpression; - postParameterName?: Identifier; - isBracketed: boolean; - } - interface SourceFile extends Declaration { - statements: NodeArray; - endOfFileToken: Node; - fileName: string; - text: string; - amdDependencies: { - path: string; - name: string; - }[]; - moduleName: string; - referencedFiles: FileReference[]; - /** - * lib.d.ts should have a reference comment like - * - * /// - * - * If any other file has this comment, it signals not to include lib.d.ts - * because this containing file is intended to act as a default library. - */ - hasNoDefaultLib: boolean; - languageVersion: ScriptTarget; - } - interface ScriptReferenceHost { - getCompilerOptions(): CompilerOptions; - getSourceFile(fileName: string): SourceFile; - getCurrentDirectory(): string; - } - interface ParseConfigHost { - readDirectory(rootDir: string, extension: string, exclude: string[]): string[]; - } - interface WriteFileCallback { - (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; - } - interface Program extends ScriptReferenceHost { - /** - * Get a list of files in the program - */ - getSourceFiles(): SourceFile[]; - /** - * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then - * the JavaScript and declaration files will be produced for all the files in this program. - * If targetSourceFile is specified, then only the JavaScript and declaration for that - * specific file will be generated. - * - * If writeFile is not specified then the writeFile callback from the compiler host will be - * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter - * will be invoked when writing the JavaScript and declaration files. - */ - emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult; - getSyntacticDiagnostics(sourceFile?: SourceFile): Diagnostic[]; - getGlobalDiagnostics(): Diagnostic[]; - getSemanticDiagnostics(sourceFile?: SourceFile): Diagnostic[]; - getDeclarationDiagnostics(sourceFile?: SourceFile): Diagnostic[]; - /** - * Gets a type checker that can be used to semantically analyze source fils in the program. - */ - getTypeChecker(): TypeChecker; - } - interface SourceMapSpan { - /** Line number in the .js file. */ - emittedLine: number; - /** Column number in the .js file. */ - emittedColumn: number; - /** Line number in the .ts file. */ - sourceLine: number; - /** Column number in the .ts file. */ - sourceColumn: number; - /** Optional name (index into names array) associated with this span. */ - nameIndex?: number; - /** .ts file (index into sources array) associated with this span */ - sourceIndex: number; - } - interface SourceMapData { - sourceMapFilePath: string; - jsSourceMappingURL: string; - sourceMapFile: string; - sourceMapSourceRoot: string; - sourceMapSources: string[]; - sourceMapSourcesContent?: string[]; - inputSourceFileNames: string[]; - sourceMapNames?: string[]; - sourceMapMappings: string; - sourceMapDecodedMappings: SourceMapSpan[]; - } - /** Return code used by getEmitOutput function to indicate status of the function */ - enum ExitStatus { - Success = 0, - DiagnosticsPresent_OutputsSkipped = 1, - DiagnosticsPresent_OutputsGenerated = 2, - } - interface EmitResult { - emitSkipped: boolean; - diagnostics: Diagnostic[]; - } - interface TypeCheckerHost { - getCompilerOptions(): CompilerOptions; - getSourceFiles(): SourceFile[]; - getSourceFile(fileName: string): SourceFile; - } - interface TypeChecker { - getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; - getDeclaredTypeOfSymbol(symbol: Symbol): Type; - getPropertiesOfType(type: Type): Symbol[]; - getPropertyOfType(type: Type, propertyName: string): Symbol; - getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; - getIndexTypeOfType(type: Type, kind: IndexKind): Type; - getReturnTypeOfSignature(signature: Signature): Type; - getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; - getSymbolAtLocation(node: Node): Symbol; - getShorthandAssignmentValueSymbol(location: Node): Symbol; - getTypeAtLocation(node: Node): Type; - typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; - symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; - getSymbolDisplayBuilder(): SymbolDisplayBuilder; - getFullyQualifiedName(symbol: Symbol): string; - getAugmentedPropertiesOfType(type: Type): Symbol[]; - getRootSymbols(symbol: Symbol): Symbol[]; - getContextualType(node: Expression): Type; - getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; - getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; - isUndefinedSymbol(symbol: Symbol): boolean; - isArgumentsSymbol(symbol: Symbol): boolean; - getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; - isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; - getAliasedSymbol(symbol: Symbol): Symbol; - getExportsOfModule(moduleSymbol: Symbol): Symbol[]; - } - interface SymbolDisplayBuilder { - buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; - buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; - buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; - } - interface SymbolWriter { - writeKeyword(text: string): void; - writeOperator(text: string): void; - writePunctuation(text: string): void; - writeSpace(text: string): void; - writeStringLiteral(text: string): void; - writeParameter(text: string): void; - writeSymbol(text: string, symbol: Symbol): void; - writeLine(): void; - increaseIndent(): void; - decreaseIndent(): void; - clear(): void; - trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; - } - const enum TypeFormatFlags { - None = 0, - WriteArrayAsGenericType = 1, - UseTypeOfFunction = 2, - NoTruncation = 4, - WriteArrowStyleSignature = 8, - WriteOwnNameForAnyLike = 16, - WriteTypeArgumentsOfSignature = 32, - InElementType = 64, - UseFullyQualifiedType = 128, - } - const enum SymbolFormatFlags { - None = 0, - WriteTypeParametersOrArguments = 1, - UseOnlyExternalAliasing = 2, - } - interface TypePredicate { - parameterName: string; - parameterIndex: number; - type: Type; - } - const enum SymbolFlags { - None = 0, - FunctionScopedVariable = 1, - BlockScopedVariable = 2, - Property = 4, - EnumMember = 8, - Function = 16, - Class = 32, - Interface = 64, - ConstEnum = 128, - RegularEnum = 256, - ValueModule = 512, - NamespaceModule = 1024, - TypeLiteral = 2048, - ObjectLiteral = 4096, - Method = 8192, - Constructor = 16384, - GetAccessor = 32768, - SetAccessor = 65536, - Signature = 131072, - TypeParameter = 262144, - TypeAlias = 524288, - ExportValue = 1048576, - ExportType = 2097152, - ExportNamespace = 4194304, - Alias = 8388608, - Instantiated = 16777216, - Merged = 33554432, - Transient = 67108864, - Prototype = 134217728, - UnionProperty = 268435456, - Optional = 536870912, - ExportStar = 1073741824, - Enum = 384, - Variable = 3, - Value = 107455, - Type = 793056, - Namespace = 1536, - Module = 1536, - Accessor = 98304, - FunctionScopedVariableExcludes = 107454, - BlockScopedVariableExcludes = 107455, - ParameterExcludes = 107455, - PropertyExcludes = 107455, - EnumMemberExcludes = 107455, - FunctionExcludes = 106927, - ClassExcludes = 899583, - InterfaceExcludes = 792992, - RegularEnumExcludes = 899327, - ConstEnumExcludes = 899967, - ValueModuleExcludes = 106639, - NamespaceModuleExcludes = 0, - MethodExcludes = 99263, - GetAccessorExcludes = 41919, - SetAccessorExcludes = 74687, - TypeParameterExcludes = 530912, - TypeAliasExcludes = 793056, - AliasExcludes = 8388608, - ModuleMember = 8914931, - ExportHasLocal = 944, - HasExports = 1952, - HasMembers = 6240, - BlockScoped = 418, - PropertyOrAccessor = 98308, - Export = 7340032, - } - interface Symbol { - flags: SymbolFlags; - name: string; - declarations?: Declaration[]; - valueDeclaration?: Declaration; - members?: SymbolTable; - exports?: SymbolTable; - } - interface SymbolTable { - [index: string]: Symbol; - } - const enum TypeFlags { - Any = 1, - String = 2, - Number = 4, - Boolean = 8, - Void = 16, - Undefined = 32, - Null = 64, - Enum = 128, - StringLiteral = 256, - TypeParameter = 512, - Class = 1024, - Interface = 2048, - Reference = 4096, - Tuple = 8192, - Union = 16384, - Anonymous = 32768, - Instantiated = 65536, - ObjectLiteral = 262144, - ESSymbol = 2097152, - StringLike = 258, - NumberLike = 132, - ObjectType = 48128, - } - interface Type { - flags: TypeFlags; - symbol?: Symbol; - } - interface StringLiteralType extends Type { - text: string; - } - interface ObjectType extends Type { - } - interface InterfaceType extends ObjectType { - typeParameters: TypeParameter[]; - outerTypeParameters: TypeParameter[]; - localTypeParameters: TypeParameter[]; - } - interface InterfaceTypeWithBaseTypes extends InterfaceType { - baseTypes: ObjectType[]; - } - interface InterfaceTypeWithDeclaredMembers extends InterfaceType { - declaredProperties: Symbol[]; - declaredCallSignatures: Signature[]; - declaredConstructSignatures: Signature[]; - declaredStringIndexType: Type; - declaredNumberIndexType: Type; - } - interface TypeReference extends ObjectType { - target: GenericType; - typeArguments: Type[]; - } - interface GenericType extends InterfaceType, TypeReference { - } - interface TupleType extends ObjectType { - elementTypes: Type[]; - baseArrayType: TypeReference; - } - interface UnionType extends Type { - types: Type[]; - } - interface TypeParameter extends Type { - constraint: Type; - } - const enum SignatureKind { - Call = 0, - Construct = 1, - } - interface Signature { - declaration: SignatureDeclaration; - typeParameters: TypeParameter[]; - parameters: Symbol[]; - typePredicate?: TypePredicate; - } - const enum IndexKind { - String = 0, - Number = 1, - } - interface DiagnosticMessage { - key: string; - category: DiagnosticCategory; - code: number; - } - /** - * A linked list of formatted diagnostic messages to be used as part of a multiline message. - * It is built from the bottom up, leaving the head to be the "main" diagnostic. - * While it seems that DiagnosticMessageChain is structurally similar to DiagnosticMessage, - * the difference is that messages are all preformatted in DMC. - */ - interface DiagnosticMessageChain { - messageText: string; - category: DiagnosticCategory; - code: number; - next?: DiagnosticMessageChain; - } - interface Diagnostic { - file: SourceFile; - start: number; - length: number; - messageText: string | DiagnosticMessageChain; - category: DiagnosticCategory; - code: number; - } - enum DiagnosticCategory { - Warning = 0, - Error = 1, - Message = 2, - } - interface CompilerOptions { - allowNonTsExtensions?: boolean; - charset?: string; - declaration?: boolean; - dependency?: boolean; - diagnostics?: boolean; - emitBOM?: boolean; - help?: boolean; - inlineSourceMap?: boolean; - inlineSources?: boolean; - listFiles?: boolean; - locale?: string; - mapRoot?: string; - module?: ModuleKind; - newLine?: NewLineKind; - noEmit?: boolean; - noEmitHelpers?: boolean; - noEmitOnError?: boolean; - noErrorTruncation?: boolean; - noImplicitAny?: boolean; - noLib?: boolean; - noResolve?: boolean; - out?: string; - outDir?: string; - preserveConstEnums?: boolean; - project?: string; - removeComments?: boolean; - rootDir?: string; - sourceMap?: boolean; - sourceRoot?: string; - suppressImplicitAnyIndexErrors?: boolean; - target?: ScriptTarget; - version?: boolean; - watch?: boolean; - isolatedModules?: boolean; - experimentalDecorators?: boolean; - emitDecoratorMetadata?: boolean; - [option: string]: string | number | boolean; - } - const enum ModuleKind { - None = 0, - CommonJS = 1, - AMD = 2, - UMD = 3, - System = 4, - } - const enum NewLineKind { - CarriageReturnLineFeed = 0, - LineFeed = 1, - } - interface LineAndCharacter { - line: number; - character: number; - } - const enum ScriptTarget { - ES3 = 0, - ES5 = 1, - ES6 = 2, - Latest = 2, - } - interface ParsedCommandLine { - options: CompilerOptions; - fileNames: string[]; - errors: Diagnostic[]; - } - interface CancellationToken { - isCancellationRequested(): boolean; - } - interface CompilerHost { - getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; - getDefaultLibFileName(options: CompilerOptions): string; - getCancellationToken?(): CancellationToken; - writeFile: WriteFileCallback; - getCurrentDirectory(): string; - getCanonicalFileName(fileName: string): string; - useCaseSensitiveFileNames(): boolean; - getNewLine(): string; - } - interface TextSpan { - start: number; - length: number; - } - interface TextChangeRange { - span: TextSpan; - newLength: number; - } -} -declare module ts { - interface System { - args: string[]; - newLine: string; - useCaseSensitiveFileNames: boolean; - write(s: string): void; - readFile(path: string, encoding?: string): string; - writeFile(path: string, data: string, writeByteOrderMark?: boolean): void; - watchFile?(path: string, callback: (path: string) => void): FileWatcher; - resolvePath(path: string): string; - fileExists(path: string): boolean; - directoryExists(path: string): boolean; - createDirectory(path: string): void; - getExecutingFilePath(): string; - getCurrentDirectory(): string; - readDirectory(path: string, extension?: string, exclude?: string[]): string[]; - getMemoryUsage?(): number; - exit(exitCode?: number): void; - } - interface FileWatcher { - close(): void; - } - var sys: System; -} -declare module ts { - interface ErrorCallback { - (message: DiagnosticMessage, length: number): void; - } - interface Scanner { - getStartPos(): number; - getToken(): SyntaxKind; - getTextPos(): number; - getTokenPos(): number; - getTokenText(): string; - getTokenValue(): string; - hasExtendedUnicodeEscape(): boolean; - hasPrecedingLineBreak(): boolean; - isIdentifier(): boolean; - isReservedWord(): boolean; - isUnterminated(): boolean; - reScanGreaterToken(): SyntaxKind; - reScanSlashToken(): SyntaxKind; - reScanTemplateToken(): SyntaxKind; - scan(): SyntaxKind; - setText(text: string, start?: number, length?: number): void; - setOnError(onError: ErrorCallback): void; - setScriptTarget(scriptTarget: ScriptTarget): void; - setTextPos(textPos: number): void; - lookAhead(callback: () => T): T; - tryScan(callback: () => T): T; - } - function tokenToString(t: SyntaxKind): string; - function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number; - function getLineAndCharacterOfPosition(sourceFile: SourceFile, position: number): LineAndCharacter; - function isWhiteSpace(ch: number): boolean; - function isLineBreak(ch: number): boolean; - function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; - function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; - function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; - function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; -} -declare module ts { - function getDefaultLibFileName(options: CompilerOptions): string; - function textSpanEnd(span: TextSpan): number; - function textSpanIsEmpty(span: TextSpan): boolean; - function textSpanContainsPosition(span: TextSpan, position: number): boolean; - function textSpanContainsTextSpan(span: TextSpan, other: TextSpan): boolean; - function textSpanOverlapsWith(span: TextSpan, other: TextSpan): boolean; - function textSpanOverlap(span1: TextSpan, span2: TextSpan): TextSpan; - function textSpanIntersectsWithTextSpan(span: TextSpan, other: TextSpan): boolean; - function textSpanIntersectsWith(span: TextSpan, start: number, length: number): boolean; - function textSpanIntersectsWithPosition(span: TextSpan, position: number): boolean; - function textSpanIntersection(span1: TextSpan, span2: TextSpan): TextSpan; - function createTextSpan(start: number, length: number): TextSpan; - function createTextSpanFromBounds(start: number, end: number): TextSpan; - function textChangeRangeNewSpan(range: TextChangeRange): TextSpan; - function textChangeRangeIsUnchanged(range: TextChangeRange): boolean; - function createTextChangeRange(span: TextSpan, newLength: number): TextChangeRange; - let unchangedTextChangeRange: TextChangeRange; - /** - * Called to merge all the changes that occurred across several versions of a script snapshot - * into a single change. i.e. if a user keeps making successive edits to a script we will - * have a text change from V1 to V2, V2 to V3, ..., Vn. - * - * This function will then merge those changes into a single change range valid between V1 and - * Vn. - */ - function collapseTextChangeRangesAcrossMultipleVersions(changes: TextChangeRange[]): TextChangeRange; - function getTypeParameterOwner(d: Declaration): Declaration; -} -declare module ts { - function getNodeConstructor(kind: SyntaxKind): new () => Node; - function createNode(kind: SyntaxKind): Node; - function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T; - function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean): SourceFile; - function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; -} -declare module ts { - /** The version of the TypeScript compiler release */ - const version: string; - function findConfigFile(searchPath: string): string; - function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost; - function getPreEmitDiagnostics(program: Program, sourceFile?: SourceFile): Diagnostic[]; - function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string; - function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program; -} -declare module ts { - function parseCommandLine(commandLine: string[]): ParsedCommandLine; - /** - * Read tsconfig.json file - * @param fileName The path to the config file - */ - function readConfigFile(fileName: string): { - config?: any; - error?: Diagnostic; - }; - /** - * Parse the text of the tsconfig.json file - * @param fileName The path to the config file - * @param jsonText The text of the config file - */ - function parseConfigFileText(fileName: string, jsonText: string): { - config?: any; - error?: Diagnostic; - }; - /** - * Parse the contents of a config file (tsconfig.json). - * @param json The contents of the config file to parse - * @param basePath A root directory to resolve relative path entries in the config - * file to. e.g. outDir - */ - function parseConfigFile(json: any, host: ParseConfigHost, basePath: string): ParsedCommandLine; -} -declare module ts { - /** The version of the language service API */ - let servicesVersion: string; - interface Node { - getSourceFile(): SourceFile; - getChildCount(sourceFile?: SourceFile): number; - getChildAt(index: number, sourceFile?: SourceFile): Node; - getChildren(sourceFile?: SourceFile): Node[]; - getStart(sourceFile?: SourceFile): number; - getFullStart(): number; - getEnd(): number; - getWidth(sourceFile?: SourceFile): number; - getFullWidth(): number; - getLeadingTriviaWidth(sourceFile?: SourceFile): number; - getFullText(sourceFile?: SourceFile): string; - getText(sourceFile?: SourceFile): string; - getFirstToken(sourceFile?: SourceFile): Node; - getLastToken(sourceFile?: SourceFile): Node; - } - interface Symbol { - getFlags(): SymbolFlags; - getName(): string; - getDeclarations(): Declaration[]; - getDocumentationComment(): SymbolDisplayPart[]; - } - interface Type { - getFlags(): TypeFlags; - getSymbol(): Symbol; - getProperties(): Symbol[]; - getProperty(propertyName: string): Symbol; - getApparentProperties(): Symbol[]; - getCallSignatures(): Signature[]; - getConstructSignatures(): Signature[]; - getStringIndexType(): Type; - getNumberIndexType(): Type; - } - interface Signature { - getDeclaration(): SignatureDeclaration; - getTypeParameters(): Type[]; - getParameters(): Symbol[]; - getReturnType(): Type; - getDocumentationComment(): SymbolDisplayPart[]; - } - interface SourceFile { - getLineAndCharacterOfPosition(pos: number): LineAndCharacter; - getLineStarts(): number[]; - getPositionOfLineAndCharacter(line: number, character: number): number; - update(newText: string, textChangeRange: TextChangeRange): SourceFile; - } - /** - * Represents an immutable snapshot of a script at a specified time.Once acquired, the - * snapshot is observably immutable. i.e. the same calls with the same parameters will return - * the same values. - */ - interface IScriptSnapshot { - /** Gets a portion of the script snapshot specified by [start, end). */ - getText(start: number, end: number): string; - /** Gets the length of this script snapshot. */ - getLength(): number; - /** - * Gets the TextChangeRange that describe how the text changed between this text and - * an older version. This information is used by the incremental parser to determine - * what sections of the script need to be re-parsed. 'undefined' can be returned if the - * change range cannot be determined. However, in that case, incremental parsing will - * not happen and the entire document will be re - parsed. - */ - getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; - } - module ScriptSnapshot { - function fromString(text: string): IScriptSnapshot; - } - interface PreProcessedFileInfo { - referencedFiles: FileReference[]; - importedFiles: FileReference[]; - isLibFile: boolean; - } - interface LanguageServiceHost { - getCompilationSettings(): CompilerOptions; - getNewLine?(): string; - getProjectVersion?(): string; - getScriptFileNames(): string[]; - getScriptVersion(fileName: string): string; - getScriptSnapshot(fileName: string): IScriptSnapshot; - getLocalizedDiagnosticMessages?(): any; - getCancellationToken?(): CancellationToken; - getCurrentDirectory(): string; - getDefaultLibFileName(options: CompilerOptions): string; - log?(s: string): void; - trace?(s: string): void; - error?(s: string): void; - useCaseSensitiveFileNames?(): boolean; - } - interface LanguageService { - cleanupSemanticCache(): void; - getSyntacticDiagnostics(fileName: string): Diagnostic[]; - getSemanticDiagnostics(fileName: string): Diagnostic[]; - getCompilerOptionsDiagnostics(): Diagnostic[]; - /** - * @deprecated Use getEncodedSyntacticClassifications instead. - */ - getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - /** - * @deprecated Use getEncodedSemanticClassifications instead. - */ - getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; - getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications; - getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications; - getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; - getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; - getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; - getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; - getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; - getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; - getRenameInfo(fileName: string, position: number): RenameInfo; - findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; - getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; - getTypeDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; - getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; - findReferences(fileName: string, position: number): ReferencedSymbol[]; - getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): DocumentHighlights[]; - /** @deprecated */ - getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; - getNavigateToItems(searchValue: string, maxResultCount?: number): NavigateToItem[]; - getNavigationBarItems(fileName: string): NavigationBarItem[]; - getOutliningSpans(fileName: string): OutliningSpan[]; - getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; - getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; - getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; - getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; - getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; - getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; - getEmitOutput(fileName: string): EmitOutput; - getProgram(): Program; - getSourceFile(fileName: string): SourceFile; - dispose(): void; - } - interface Classifications { - spans: number[]; - endOfLineState: EndOfLineState; - } - interface ClassifiedSpan { - textSpan: TextSpan; - classificationType: string; - } - interface NavigationBarItem { - text: string; - kind: string; - kindModifiers: string; - spans: TextSpan[]; - childItems: NavigationBarItem[]; - indent: number; - bolded: boolean; - grayed: boolean; - } - interface TodoCommentDescriptor { - text: string; - priority: number; - } - interface TodoComment { - descriptor: TodoCommentDescriptor; - message: string; - position: number; - } - class TextChange { - span: TextSpan; - newText: string; - } - interface RenameLocation { - textSpan: TextSpan; - fileName: string; - } - interface ReferenceEntry { - textSpan: TextSpan; - fileName: string; - isWriteAccess: boolean; - } - interface DocumentHighlights { - fileName: string; - highlightSpans: HighlightSpan[]; - } - module HighlightSpanKind { - const none: string; - const definition: string; - const reference: string; - const writtenReference: string; - } - interface HighlightSpan { - textSpan: TextSpan; - kind: string; - } - interface NavigateToItem { - name: string; - kind: string; - kindModifiers: string; - matchKind: string; - isCaseSensitive: boolean; - fileName: string; - textSpan: TextSpan; - containerName: string; - containerKind: string; - } - interface EditorOptions { - IndentSize: number; - TabSize: number; - NewLineCharacter: string; - ConvertTabsToSpaces: boolean; - } - interface FormatCodeOptions extends EditorOptions { - InsertSpaceAfterCommaDelimiter: boolean; - InsertSpaceAfterSemicolonInForStatements: boolean; - InsertSpaceBeforeAndAfterBinaryOperators: boolean; - InsertSpaceAfterKeywordsInControlFlowStatements: boolean; - InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; - InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; - PlaceOpenBraceOnNewLineForFunctions: boolean; - PlaceOpenBraceOnNewLineForControlBlocks: boolean; - [s: string]: boolean | number | string; - } - interface DefinitionInfo { - fileName: string; - textSpan: TextSpan; - kind: string; - name: string; - containerKind: string; - containerName: string; - } - interface ReferencedSymbol { - definition: DefinitionInfo; - references: ReferenceEntry[]; - } - enum SymbolDisplayPartKind { - aliasName = 0, - className = 1, - enumName = 2, - fieldName = 3, - interfaceName = 4, - keyword = 5, - lineBreak = 6, - numericLiteral = 7, - stringLiteral = 8, - localName = 9, - methodName = 10, - moduleName = 11, - operator = 12, - parameterName = 13, - propertyName = 14, - punctuation = 15, - space = 16, - text = 17, - typeParameterName = 18, - enumMemberName = 19, - functionName = 20, - regularExpressionLiteral = 21, - } - interface SymbolDisplayPart { - text: string; - kind: string; - } - interface QuickInfo { - kind: string; - kindModifiers: string; - textSpan: TextSpan; - displayParts: SymbolDisplayPart[]; - documentation: SymbolDisplayPart[]; - } - interface RenameInfo { - canRename: boolean; - localizedErrorMessage: string; - displayName: string; - fullDisplayName: string; - kind: string; - kindModifiers: string; - triggerSpan: TextSpan; - } - interface SignatureHelpParameter { - name: string; - documentation: SymbolDisplayPart[]; - displayParts: SymbolDisplayPart[]; - isOptional: boolean; - } - /** - * Represents a single signature to show in signature help. - * The id is used for subsequent calls into the language service to ask questions about the - * signature help item in the context of any documents that have been updated. i.e. after - * an edit has happened, while signature help is still active, the host can ask important - * questions like 'what parameter is the user currently contained within?'. - */ - interface SignatureHelpItem { - isVariadic: boolean; - prefixDisplayParts: SymbolDisplayPart[]; - suffixDisplayParts: SymbolDisplayPart[]; - separatorDisplayParts: SymbolDisplayPart[]; - parameters: SignatureHelpParameter[]; - documentation: SymbolDisplayPart[]; - } - /** - * Represents a set of signature help items, and the preferred item that should be selected. - */ - interface SignatureHelpItems { - items: SignatureHelpItem[]; - applicableSpan: TextSpan; - selectedItemIndex: number; - argumentIndex: number; - argumentCount: number; - } - interface CompletionInfo { - isMemberCompletion: boolean; - isNewIdentifierLocation: boolean; - entries: CompletionEntry[]; - } - interface CompletionEntry { - name: string; - kind: string; - kindModifiers: string; - sortText: string; - } - interface CompletionEntryDetails { - name: string; - kind: string; - kindModifiers: string; - displayParts: SymbolDisplayPart[]; - documentation: SymbolDisplayPart[]; - } - interface OutliningSpan { - /** The span of the document to actually collapse. */ - textSpan: TextSpan; - /** The span of the document to display when the user hovers over the collapsed span. */ - hintSpan: TextSpan; - /** The text to display in the editor for the collapsed region. */ - bannerText: string; - /** - * Whether or not this region should be automatically collapsed when - * the 'Collapse to Definitions' command is invoked. - */ - autoCollapse: boolean; - } - interface EmitOutput { - outputFiles: OutputFile[]; - emitSkipped: boolean; - } - const enum OutputFileType { - JavaScript = 0, - SourceMap = 1, - Declaration = 2, - } - interface OutputFile { - name: string; - writeByteOrderMark: boolean; - text: string; - } - const enum EndOfLineState { - None = 0, - InMultiLineCommentTrivia = 1, - InSingleQuoteStringLiteral = 2, - InDoubleQuoteStringLiteral = 3, - InTemplateHeadOrNoSubstitutionTemplate = 4, - InTemplateMiddleOrTail = 5, - InTemplateSubstitutionPosition = 6, - } - enum TokenClass { - Punctuation = 0, - Keyword = 1, - Operator = 2, - Comment = 3, - Whitespace = 4, - Identifier = 5, - NumberLiteral = 6, - StringLiteral = 7, - RegExpLiteral = 8, - } - interface ClassificationResult { - finalLexState: EndOfLineState; - entries: ClassificationInfo[]; - } - interface ClassificationInfo { - length: number; - classification: TokenClass; - } - interface Classifier { - /** - * Gives lexical classifications of tokens on a line without any syntactic context. - * For instance, a token consisting of the text 'string' can be either an identifier - * named 'string' or the keyword 'string', however, because this classifier is not aware, - * it relies on certain heuristics to give acceptable results. For classifications where - * speed trumps accuracy, this function is preferable; however, for true accuracy, the - * syntactic classifier is ideal. In fact, in certain editing scenarios, combining the - * lexical, syntactic, and semantic classifiers may issue the best user experience. - * - * @param text The text of a line to classify. - * @param lexState The state of the lexical classifier at the end of the previous line. - * @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier. - * If there is no syntactic classifier (syntacticClassifierAbsent=true), - * certain heuristics may be used in its place; however, if there is a - * syntactic classifier (syntacticClassifierAbsent=false), certain - * classifications which may be incorrectly categorized will be given - * back as Identifiers in order to allow the syntactic classifier to - * subsume the classification. - * @deprecated Use getLexicalClassifications instead. - */ - getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult; - getEncodedLexicalClassifications(text: string, endOfLineState: EndOfLineState, syntacticClassifierAbsent: boolean): Classifications; - } - /** - * The document registry represents a store of SourceFile objects that can be shared between - * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST) - * of files in the context. - * SourceFile objects account for most of the memory usage by the language service. Sharing - * the same DocumentRegistry instance between different instances of LanguageService allow - * for more efficient memory utilization since all projects will share at least the library - * file (lib.d.ts). - * - * A more advanced use of the document registry is to serialize sourceFile objects to disk - * and re-hydrate them when needed. - * - * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it - * to all subsequent createLanguageService calls. - */ - interface DocumentRegistry { - /** - * Request a stored SourceFile with a given fileName and compilationSettings. - * The first call to acquire will call createLanguageServiceSourceFile to generate - * the SourceFile if was not found in the registry. - * - * @param fileName The name of the file requested - * @param compilationSettings Some compilation settings like target affects the - * shape of a the resulting SourceFile. This allows the DocumentRegistry to store - * multiple copies of the same file for different compilation settings. - * @parm scriptSnapshot Text of the file. Only used if the file was not found - * in the registry and a new one was created. - * @parm version Current version of the file. Only used if the file was not found - * in the registry and a new one was created. - */ - acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile; - /** - * Request an updated version of an already existing SourceFile with a given fileName - * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile - * to get an updated SourceFile. - * - * @param fileName The name of the file requested - * @param compilationSettings Some compilation settings like target affects the - * shape of a the resulting SourceFile. This allows the DocumentRegistry to store - * multiple copies of the same file for different compilation settings. - * @param scriptSnapshot Text of the file. - * @param version Current version of the file. - */ - updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile; - /** - * Informs the DocumentRegistry that a file is not needed any longer. - * - * Note: It is not allowed to call release on a SourceFile that was not acquired from - * this registry originally. - * - * @param fileName The name of the file to be released - * @param compilationSettings The compilation settings used to acquire the file - */ - releaseDocument(fileName: string, compilationSettings: CompilerOptions): void; - } - module ScriptElementKind { - const unknown: string; - const warning: string; - const keyword: string; - const scriptElement: string; - const moduleElement: string; - const classElement: string; - const interfaceElement: string; - const typeElement: string; - const enumElement: string; - const variableElement: string; - const localVariableElement: string; - const functionElement: string; - const localFunctionElement: string; - const memberFunctionElement: string; - const memberGetAccessorElement: string; - const memberSetAccessorElement: string; - const memberVariableElement: string; - const constructorImplementationElement: string; - const callSignatureElement: string; - const indexSignatureElement: string; - const constructSignatureElement: string; - const parameterElement: string; - const typeParameterElement: string; - const primitiveType: string; - const label: string; - const alias: string; - const constElement: string; - const letElement: string; - } - module ScriptElementKindModifier { - const none: string; - const publicMemberModifier: string; - const privateMemberModifier: string; - const protectedMemberModifier: string; - const exportedModifier: string; - const ambientModifier: string; - const staticModifier: string; - } - class ClassificationTypeNames { - static comment: string; - static identifier: string; - static keyword: string; - static numericLiteral: string; - static operator: string; - static stringLiteral: string; - static whiteSpace: string; - static text: string; - static punctuation: string; - static className: string; - static enumName: string; - static interfaceName: string; - static moduleName: string; - static typeParameterName: string; - static typeAliasName: string; - static parameterName: string; - static docCommentTagName: string; - } - const enum ClassificationType { - comment = 1, - identifier = 2, - keyword = 3, - numericLiteral = 4, - operator = 5, - stringLiteral = 6, - regularExpressionLiteral = 7, - whiteSpace = 8, - text = 9, - punctuation = 10, - className = 11, - enumName = 12, - interfaceName = 13, - moduleName = 14, - typeParameterName = 15, - typeAliasName = 16, - parameterName = 17, - docCommentTagName = 18, - } - interface DisplayPartsSymbolWriter extends SymbolWriter { - displayParts(): SymbolDisplayPart[]; - } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; - function getDefaultCompilerOptions(): CompilerOptions; - class OperationCanceledException { - } - class CancellationTokenObject { - private cancellationToken; - static None: CancellationTokenObject; - constructor(cancellationToken: CancellationToken); - isCancellationRequested(): boolean; - throwIfCancellationRequested(): void; - } - function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[], moduleName?: string): string; - function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; - let disableIncrementalParsing: boolean; - function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; - function createDocumentRegistry(useCaseSensitiveFileNames?: boolean): DocumentRegistry; - function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; - function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService; - function createClassifier(): Classifier; - /** - * Get the path of the default library file (lib.d.ts) as distributed with the typescript - * node package. - * The functionality is not supported if the ts module is consumed outside of a node module. - */ - function getDefaultLibFilePath(options: CompilerOptions): string; -} -export = ts; \ No newline at end of file diff --git a/build/lib/typescript/typescriptServices.js b/build/lib/typescript/typescriptServices.js deleted file mode 100644 index 349ff6ad391a5..0000000000000 --- a/build/lib/typescript/typescriptServices.js +++ /dev/null @@ -1,44323 +0,0 @@ -var ts; -(function (ts) { - // token > SyntaxKind.Identifer => token is a keyword - (function (SyntaxKind) { - SyntaxKind[SyntaxKind["Unknown"] = 0] = "Unknown"; - SyntaxKind[SyntaxKind["EndOfFileToken"] = 1] = "EndOfFileToken"; - SyntaxKind[SyntaxKind["SingleLineCommentTrivia"] = 2] = "SingleLineCommentTrivia"; - SyntaxKind[SyntaxKind["MultiLineCommentTrivia"] = 3] = "MultiLineCommentTrivia"; - SyntaxKind[SyntaxKind["NewLineTrivia"] = 4] = "NewLineTrivia"; - SyntaxKind[SyntaxKind["WhitespaceTrivia"] = 5] = "WhitespaceTrivia"; - // We detect and provide better error recovery when we encounter a git merge marker. This - // allows us to edit files with git-conflict markers in them in a much more pleasant manner. - SyntaxKind[SyntaxKind["ConflictMarkerTrivia"] = 6] = "ConflictMarkerTrivia"; - // Literals - SyntaxKind[SyntaxKind["NumericLiteral"] = 7] = "NumericLiteral"; - SyntaxKind[SyntaxKind["StringLiteral"] = 8] = "StringLiteral"; - SyntaxKind[SyntaxKind["RegularExpressionLiteral"] = 9] = "RegularExpressionLiteral"; - SyntaxKind[SyntaxKind["NoSubstitutionTemplateLiteral"] = 10] = "NoSubstitutionTemplateLiteral"; - // Pseudo-literals - SyntaxKind[SyntaxKind["TemplateHead"] = 11] = "TemplateHead"; - SyntaxKind[SyntaxKind["TemplateMiddle"] = 12] = "TemplateMiddle"; - SyntaxKind[SyntaxKind["TemplateTail"] = 13] = "TemplateTail"; - // Punctuation - SyntaxKind[SyntaxKind["OpenBraceToken"] = 14] = "OpenBraceToken"; - SyntaxKind[SyntaxKind["CloseBraceToken"] = 15] = "CloseBraceToken"; - SyntaxKind[SyntaxKind["OpenParenToken"] = 16] = "OpenParenToken"; - SyntaxKind[SyntaxKind["CloseParenToken"] = 17] = "CloseParenToken"; - SyntaxKind[SyntaxKind["OpenBracketToken"] = 18] = "OpenBracketToken"; - SyntaxKind[SyntaxKind["CloseBracketToken"] = 19] = "CloseBracketToken"; - SyntaxKind[SyntaxKind["DotToken"] = 20] = "DotToken"; - SyntaxKind[SyntaxKind["DotDotDotToken"] = 21] = "DotDotDotToken"; - SyntaxKind[SyntaxKind["SemicolonToken"] = 22] = "SemicolonToken"; - SyntaxKind[SyntaxKind["CommaToken"] = 23] = "CommaToken"; - SyntaxKind[SyntaxKind["LessThanToken"] = 24] = "LessThanToken"; - SyntaxKind[SyntaxKind["GreaterThanToken"] = 25] = "GreaterThanToken"; - SyntaxKind[SyntaxKind["LessThanEqualsToken"] = 26] = "LessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanEqualsToken"] = 27] = "GreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsToken"] = 28] = "EqualsEqualsToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsToken"] = 29] = "ExclamationEqualsToken"; - SyntaxKind[SyntaxKind["EqualsEqualsEqualsToken"] = 30] = "EqualsEqualsEqualsToken"; - SyntaxKind[SyntaxKind["ExclamationEqualsEqualsToken"] = 31] = "ExclamationEqualsEqualsToken"; - SyntaxKind[SyntaxKind["EqualsGreaterThanToken"] = 32] = "EqualsGreaterThanToken"; - SyntaxKind[SyntaxKind["PlusToken"] = 33] = "PlusToken"; - SyntaxKind[SyntaxKind["MinusToken"] = 34] = "MinusToken"; - SyntaxKind[SyntaxKind["AsteriskToken"] = 35] = "AsteriskToken"; - SyntaxKind[SyntaxKind["SlashToken"] = 36] = "SlashToken"; - SyntaxKind[SyntaxKind["PercentToken"] = 37] = "PercentToken"; - SyntaxKind[SyntaxKind["PlusPlusToken"] = 38] = "PlusPlusToken"; - SyntaxKind[SyntaxKind["MinusMinusToken"] = 39] = "MinusMinusToken"; - SyntaxKind[SyntaxKind["LessThanLessThanToken"] = 40] = "LessThanLessThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanToken"] = 41] = "GreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanToken"] = 42] = "GreaterThanGreaterThanGreaterThanToken"; - SyntaxKind[SyntaxKind["AmpersandToken"] = 43] = "AmpersandToken"; - SyntaxKind[SyntaxKind["BarToken"] = 44] = "BarToken"; - SyntaxKind[SyntaxKind["CaretToken"] = 45] = "CaretToken"; - SyntaxKind[SyntaxKind["ExclamationToken"] = 46] = "ExclamationToken"; - SyntaxKind[SyntaxKind["TildeToken"] = 47] = "TildeToken"; - SyntaxKind[SyntaxKind["AmpersandAmpersandToken"] = 48] = "AmpersandAmpersandToken"; - SyntaxKind[SyntaxKind["BarBarToken"] = 49] = "BarBarToken"; - SyntaxKind[SyntaxKind["QuestionToken"] = 50] = "QuestionToken"; - SyntaxKind[SyntaxKind["ColonToken"] = 51] = "ColonToken"; - SyntaxKind[SyntaxKind["AtToken"] = 52] = "AtToken"; - // Assignments - SyntaxKind[SyntaxKind["EqualsToken"] = 53] = "EqualsToken"; - SyntaxKind[SyntaxKind["PlusEqualsToken"] = 54] = "PlusEqualsToken"; - SyntaxKind[SyntaxKind["MinusEqualsToken"] = 55] = "MinusEqualsToken"; - SyntaxKind[SyntaxKind["AsteriskEqualsToken"] = 56] = "AsteriskEqualsToken"; - SyntaxKind[SyntaxKind["SlashEqualsToken"] = 57] = "SlashEqualsToken"; - SyntaxKind[SyntaxKind["PercentEqualsToken"] = 58] = "PercentEqualsToken"; - SyntaxKind[SyntaxKind["LessThanLessThanEqualsToken"] = 59] = "LessThanLessThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanEqualsToken"] = 60] = "GreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["GreaterThanGreaterThanGreaterThanEqualsToken"] = 61] = "GreaterThanGreaterThanGreaterThanEqualsToken"; - SyntaxKind[SyntaxKind["AmpersandEqualsToken"] = 62] = "AmpersandEqualsToken"; - SyntaxKind[SyntaxKind["BarEqualsToken"] = 63] = "BarEqualsToken"; - SyntaxKind[SyntaxKind["CaretEqualsToken"] = 64] = "CaretEqualsToken"; - // Identifiers - SyntaxKind[SyntaxKind["Identifier"] = 65] = "Identifier"; - // Reserved words - SyntaxKind[SyntaxKind["BreakKeyword"] = 66] = "BreakKeyword"; - SyntaxKind[SyntaxKind["CaseKeyword"] = 67] = "CaseKeyword"; - SyntaxKind[SyntaxKind["CatchKeyword"] = 68] = "CatchKeyword"; - SyntaxKind[SyntaxKind["ClassKeyword"] = 69] = "ClassKeyword"; - SyntaxKind[SyntaxKind["ConstKeyword"] = 70] = "ConstKeyword"; - SyntaxKind[SyntaxKind["ContinueKeyword"] = 71] = "ContinueKeyword"; - SyntaxKind[SyntaxKind["DebuggerKeyword"] = 72] = "DebuggerKeyword"; - SyntaxKind[SyntaxKind["DefaultKeyword"] = 73] = "DefaultKeyword"; - SyntaxKind[SyntaxKind["DeleteKeyword"] = 74] = "DeleteKeyword"; - SyntaxKind[SyntaxKind["DoKeyword"] = 75] = "DoKeyword"; - SyntaxKind[SyntaxKind["ElseKeyword"] = 76] = "ElseKeyword"; - SyntaxKind[SyntaxKind["EnumKeyword"] = 77] = "EnumKeyword"; - SyntaxKind[SyntaxKind["ExportKeyword"] = 78] = "ExportKeyword"; - SyntaxKind[SyntaxKind["ExtendsKeyword"] = 79] = "ExtendsKeyword"; - SyntaxKind[SyntaxKind["FalseKeyword"] = 80] = "FalseKeyword"; - SyntaxKind[SyntaxKind["FinallyKeyword"] = 81] = "FinallyKeyword"; - SyntaxKind[SyntaxKind["ForKeyword"] = 82] = "ForKeyword"; - SyntaxKind[SyntaxKind["FunctionKeyword"] = 83] = "FunctionKeyword"; - SyntaxKind[SyntaxKind["IfKeyword"] = 84] = "IfKeyword"; - SyntaxKind[SyntaxKind["ImportKeyword"] = 85] = "ImportKeyword"; - SyntaxKind[SyntaxKind["InKeyword"] = 86] = "InKeyword"; - SyntaxKind[SyntaxKind["InstanceOfKeyword"] = 87] = "InstanceOfKeyword"; - SyntaxKind[SyntaxKind["NewKeyword"] = 88] = "NewKeyword"; - SyntaxKind[SyntaxKind["NullKeyword"] = 89] = "NullKeyword"; - SyntaxKind[SyntaxKind["ReturnKeyword"] = 90] = "ReturnKeyword"; - SyntaxKind[SyntaxKind["SuperKeyword"] = 91] = "SuperKeyword"; - SyntaxKind[SyntaxKind["SwitchKeyword"] = 92] = "SwitchKeyword"; - SyntaxKind[SyntaxKind["ThisKeyword"] = 93] = "ThisKeyword"; - SyntaxKind[SyntaxKind["ThrowKeyword"] = 94] = "ThrowKeyword"; - SyntaxKind[SyntaxKind["TrueKeyword"] = 95] = "TrueKeyword"; - SyntaxKind[SyntaxKind["TryKeyword"] = 96] = "TryKeyword"; - SyntaxKind[SyntaxKind["TypeOfKeyword"] = 97] = "TypeOfKeyword"; - SyntaxKind[SyntaxKind["VarKeyword"] = 98] = "VarKeyword"; - SyntaxKind[SyntaxKind["VoidKeyword"] = 99] = "VoidKeyword"; - SyntaxKind[SyntaxKind["WhileKeyword"] = 100] = "WhileKeyword"; - SyntaxKind[SyntaxKind["WithKeyword"] = 101] = "WithKeyword"; - // Strict mode reserved words - SyntaxKind[SyntaxKind["ImplementsKeyword"] = 102] = "ImplementsKeyword"; - SyntaxKind[SyntaxKind["InterfaceKeyword"] = 103] = "InterfaceKeyword"; - SyntaxKind[SyntaxKind["LetKeyword"] = 104] = "LetKeyword"; - SyntaxKind[SyntaxKind["PackageKeyword"] = 105] = "PackageKeyword"; - SyntaxKind[SyntaxKind["PrivateKeyword"] = 106] = "PrivateKeyword"; - SyntaxKind[SyntaxKind["ProtectedKeyword"] = 107] = "ProtectedKeyword"; - SyntaxKind[SyntaxKind["PublicKeyword"] = 108] = "PublicKeyword"; - SyntaxKind[SyntaxKind["StaticKeyword"] = 109] = "StaticKeyword"; - SyntaxKind[SyntaxKind["YieldKeyword"] = 110] = "YieldKeyword"; - // Contextual keywords - SyntaxKind[SyntaxKind["AsKeyword"] = 111] = "AsKeyword"; - SyntaxKind[SyntaxKind["AnyKeyword"] = 112] = "AnyKeyword"; - SyntaxKind[SyntaxKind["BooleanKeyword"] = 113] = "BooleanKeyword"; - SyntaxKind[SyntaxKind["ConstructorKeyword"] = 114] = "ConstructorKeyword"; - SyntaxKind[SyntaxKind["DeclareKeyword"] = 115] = "DeclareKeyword"; - SyntaxKind[SyntaxKind["GetKeyword"] = 116] = "GetKeyword"; - SyntaxKind[SyntaxKind["IsKeyword"] = 117] = "IsKeyword"; - SyntaxKind[SyntaxKind["ModuleKeyword"] = 118] = "ModuleKeyword"; - SyntaxKind[SyntaxKind["NamespaceKeyword"] = 119] = "NamespaceKeyword"; - SyntaxKind[SyntaxKind["RequireKeyword"] = 120] = "RequireKeyword"; - SyntaxKind[SyntaxKind["NumberKeyword"] = 121] = "NumberKeyword"; - SyntaxKind[SyntaxKind["SetKeyword"] = 122] = "SetKeyword"; - SyntaxKind[SyntaxKind["StringKeyword"] = 123] = "StringKeyword"; - SyntaxKind[SyntaxKind["SymbolKeyword"] = 124] = "SymbolKeyword"; - SyntaxKind[SyntaxKind["TypeKeyword"] = 125] = "TypeKeyword"; - SyntaxKind[SyntaxKind["FromKeyword"] = 126] = "FromKeyword"; - SyntaxKind[SyntaxKind["OfKeyword"] = 127] = "OfKeyword"; - // Parse tree nodes - // Names - SyntaxKind[SyntaxKind["QualifiedName"] = 128] = "QualifiedName"; - SyntaxKind[SyntaxKind["ComputedPropertyName"] = 129] = "ComputedPropertyName"; - // Signature elements - SyntaxKind[SyntaxKind["TypeParameter"] = 130] = "TypeParameter"; - SyntaxKind[SyntaxKind["Parameter"] = 131] = "Parameter"; - SyntaxKind[SyntaxKind["Decorator"] = 132] = "Decorator"; - // TypeMember - SyntaxKind[SyntaxKind["PropertySignature"] = 133] = "PropertySignature"; - SyntaxKind[SyntaxKind["PropertyDeclaration"] = 134] = "PropertyDeclaration"; - SyntaxKind[SyntaxKind["MethodSignature"] = 135] = "MethodSignature"; - SyntaxKind[SyntaxKind["MethodDeclaration"] = 136] = "MethodDeclaration"; - SyntaxKind[SyntaxKind["Constructor"] = 137] = "Constructor"; - SyntaxKind[SyntaxKind["GetAccessor"] = 138] = "GetAccessor"; - SyntaxKind[SyntaxKind["SetAccessor"] = 139] = "SetAccessor"; - SyntaxKind[SyntaxKind["CallSignature"] = 140] = "CallSignature"; - SyntaxKind[SyntaxKind["ConstructSignature"] = 141] = "ConstructSignature"; - SyntaxKind[SyntaxKind["IndexSignature"] = 142] = "IndexSignature"; - // Type - SyntaxKind[SyntaxKind["TypePredicate"] = 143] = "TypePredicate"; - SyntaxKind[SyntaxKind["TypeReference"] = 144] = "TypeReference"; - SyntaxKind[SyntaxKind["FunctionType"] = 145] = "FunctionType"; - SyntaxKind[SyntaxKind["ConstructorType"] = 146] = "ConstructorType"; - SyntaxKind[SyntaxKind["TypeQuery"] = 147] = "TypeQuery"; - SyntaxKind[SyntaxKind["TypeLiteral"] = 148] = "TypeLiteral"; - SyntaxKind[SyntaxKind["ArrayType"] = 149] = "ArrayType"; - SyntaxKind[SyntaxKind["TupleType"] = 150] = "TupleType"; - SyntaxKind[SyntaxKind["UnionType"] = 151] = "UnionType"; - SyntaxKind[SyntaxKind["ParenthesizedType"] = 152] = "ParenthesizedType"; - // Binding patterns - SyntaxKind[SyntaxKind["ObjectBindingPattern"] = 153] = "ObjectBindingPattern"; - SyntaxKind[SyntaxKind["ArrayBindingPattern"] = 154] = "ArrayBindingPattern"; - SyntaxKind[SyntaxKind["BindingElement"] = 155] = "BindingElement"; - // Expression - SyntaxKind[SyntaxKind["ArrayLiteralExpression"] = 156] = "ArrayLiteralExpression"; - SyntaxKind[SyntaxKind["ObjectLiteralExpression"] = 157] = "ObjectLiteralExpression"; - SyntaxKind[SyntaxKind["PropertyAccessExpression"] = 158] = "PropertyAccessExpression"; - SyntaxKind[SyntaxKind["ElementAccessExpression"] = 159] = "ElementAccessExpression"; - SyntaxKind[SyntaxKind["CallExpression"] = 160] = "CallExpression"; - SyntaxKind[SyntaxKind["NewExpression"] = 161] = "NewExpression"; - SyntaxKind[SyntaxKind["TaggedTemplateExpression"] = 162] = "TaggedTemplateExpression"; - SyntaxKind[SyntaxKind["TypeAssertionExpression"] = 163] = "TypeAssertionExpression"; - SyntaxKind[SyntaxKind["ParenthesizedExpression"] = 164] = "ParenthesizedExpression"; - SyntaxKind[SyntaxKind["FunctionExpression"] = 165] = "FunctionExpression"; - SyntaxKind[SyntaxKind["ArrowFunction"] = 166] = "ArrowFunction"; - SyntaxKind[SyntaxKind["DeleteExpression"] = 167] = "DeleteExpression"; - SyntaxKind[SyntaxKind["TypeOfExpression"] = 168] = "TypeOfExpression"; - SyntaxKind[SyntaxKind["VoidExpression"] = 169] = "VoidExpression"; - SyntaxKind[SyntaxKind["PrefixUnaryExpression"] = 170] = "PrefixUnaryExpression"; - SyntaxKind[SyntaxKind["PostfixUnaryExpression"] = 171] = "PostfixUnaryExpression"; - SyntaxKind[SyntaxKind["BinaryExpression"] = 172] = "BinaryExpression"; - SyntaxKind[SyntaxKind["ConditionalExpression"] = 173] = "ConditionalExpression"; - SyntaxKind[SyntaxKind["TemplateExpression"] = 174] = "TemplateExpression"; - SyntaxKind[SyntaxKind["YieldExpression"] = 175] = "YieldExpression"; - SyntaxKind[SyntaxKind["SpreadElementExpression"] = 176] = "SpreadElementExpression"; - SyntaxKind[SyntaxKind["ClassExpression"] = 177] = "ClassExpression"; - SyntaxKind[SyntaxKind["OmittedExpression"] = 178] = "OmittedExpression"; - SyntaxKind[SyntaxKind["ExpressionWithTypeArguments"] = 179] = "ExpressionWithTypeArguments"; - // Misc - SyntaxKind[SyntaxKind["TemplateSpan"] = 180] = "TemplateSpan"; - SyntaxKind[SyntaxKind["SemicolonClassElement"] = 181] = "SemicolonClassElement"; - // Element - SyntaxKind[SyntaxKind["Block"] = 182] = "Block"; - SyntaxKind[SyntaxKind["VariableStatement"] = 183] = "VariableStatement"; - SyntaxKind[SyntaxKind["EmptyStatement"] = 184] = "EmptyStatement"; - SyntaxKind[SyntaxKind["ExpressionStatement"] = 185] = "ExpressionStatement"; - SyntaxKind[SyntaxKind["IfStatement"] = 186] = "IfStatement"; - SyntaxKind[SyntaxKind["DoStatement"] = 187] = "DoStatement"; - SyntaxKind[SyntaxKind["WhileStatement"] = 188] = "WhileStatement"; - SyntaxKind[SyntaxKind["ForStatement"] = 189] = "ForStatement"; - SyntaxKind[SyntaxKind["ForInStatement"] = 190] = "ForInStatement"; - SyntaxKind[SyntaxKind["ForOfStatement"] = 191] = "ForOfStatement"; - SyntaxKind[SyntaxKind["ContinueStatement"] = 192] = "ContinueStatement"; - SyntaxKind[SyntaxKind["BreakStatement"] = 193] = "BreakStatement"; - SyntaxKind[SyntaxKind["ReturnStatement"] = 194] = "ReturnStatement"; - SyntaxKind[SyntaxKind["WithStatement"] = 195] = "WithStatement"; - SyntaxKind[SyntaxKind["SwitchStatement"] = 196] = "SwitchStatement"; - SyntaxKind[SyntaxKind["LabeledStatement"] = 197] = "LabeledStatement"; - SyntaxKind[SyntaxKind["ThrowStatement"] = 198] = "ThrowStatement"; - SyntaxKind[SyntaxKind["TryStatement"] = 199] = "TryStatement"; - SyntaxKind[SyntaxKind["DebuggerStatement"] = 200] = "DebuggerStatement"; - SyntaxKind[SyntaxKind["VariableDeclaration"] = 201] = "VariableDeclaration"; - SyntaxKind[SyntaxKind["VariableDeclarationList"] = 202] = "VariableDeclarationList"; - SyntaxKind[SyntaxKind["FunctionDeclaration"] = 203] = "FunctionDeclaration"; - SyntaxKind[SyntaxKind["ClassDeclaration"] = 204] = "ClassDeclaration"; - SyntaxKind[SyntaxKind["InterfaceDeclaration"] = 205] = "InterfaceDeclaration"; - SyntaxKind[SyntaxKind["TypeAliasDeclaration"] = 206] = "TypeAliasDeclaration"; - SyntaxKind[SyntaxKind["EnumDeclaration"] = 207] = "EnumDeclaration"; - SyntaxKind[SyntaxKind["ModuleDeclaration"] = 208] = "ModuleDeclaration"; - SyntaxKind[SyntaxKind["ModuleBlock"] = 209] = "ModuleBlock"; - SyntaxKind[SyntaxKind["CaseBlock"] = 210] = "CaseBlock"; - SyntaxKind[SyntaxKind["ImportEqualsDeclaration"] = 211] = "ImportEqualsDeclaration"; - SyntaxKind[SyntaxKind["ImportDeclaration"] = 212] = "ImportDeclaration"; - SyntaxKind[SyntaxKind["ImportClause"] = 213] = "ImportClause"; - SyntaxKind[SyntaxKind["NamespaceImport"] = 214] = "NamespaceImport"; - SyntaxKind[SyntaxKind["NamedImports"] = 215] = "NamedImports"; - SyntaxKind[SyntaxKind["ImportSpecifier"] = 216] = "ImportSpecifier"; - SyntaxKind[SyntaxKind["ExportAssignment"] = 217] = "ExportAssignment"; - SyntaxKind[SyntaxKind["ExportDeclaration"] = 218] = "ExportDeclaration"; - SyntaxKind[SyntaxKind["NamedExports"] = 219] = "NamedExports"; - SyntaxKind[SyntaxKind["ExportSpecifier"] = 220] = "ExportSpecifier"; - SyntaxKind[SyntaxKind["MissingDeclaration"] = 221] = "MissingDeclaration"; - // Module references - SyntaxKind[SyntaxKind["ExternalModuleReference"] = 222] = "ExternalModuleReference"; - // Clauses - SyntaxKind[SyntaxKind["CaseClause"] = 223] = "CaseClause"; - SyntaxKind[SyntaxKind["DefaultClause"] = 224] = "DefaultClause"; - SyntaxKind[SyntaxKind["HeritageClause"] = 225] = "HeritageClause"; - SyntaxKind[SyntaxKind["CatchClause"] = 226] = "CatchClause"; - // Property assignments - SyntaxKind[SyntaxKind["PropertyAssignment"] = 227] = "PropertyAssignment"; - SyntaxKind[SyntaxKind["ShorthandPropertyAssignment"] = 228] = "ShorthandPropertyAssignment"; - // Enum - SyntaxKind[SyntaxKind["EnumMember"] = 229] = "EnumMember"; - // Top-level nodes - SyntaxKind[SyntaxKind["SourceFile"] = 230] = "SourceFile"; - // JSDoc nodes. - SyntaxKind[SyntaxKind["JSDocTypeExpression"] = 231] = "JSDocTypeExpression"; - // The * type. - SyntaxKind[SyntaxKind["JSDocAllType"] = 232] = "JSDocAllType"; - // The ? type. - SyntaxKind[SyntaxKind["JSDocUnknownType"] = 233] = "JSDocUnknownType"; - SyntaxKind[SyntaxKind["JSDocArrayType"] = 234] = "JSDocArrayType"; - SyntaxKind[SyntaxKind["JSDocUnionType"] = 235] = "JSDocUnionType"; - SyntaxKind[SyntaxKind["JSDocTupleType"] = 236] = "JSDocTupleType"; - SyntaxKind[SyntaxKind["JSDocNullableType"] = 237] = "JSDocNullableType"; - SyntaxKind[SyntaxKind["JSDocNonNullableType"] = 238] = "JSDocNonNullableType"; - SyntaxKind[SyntaxKind["JSDocRecordType"] = 239] = "JSDocRecordType"; - SyntaxKind[SyntaxKind["JSDocRecordMember"] = 240] = "JSDocRecordMember"; - SyntaxKind[SyntaxKind["JSDocTypeReference"] = 241] = "JSDocTypeReference"; - SyntaxKind[SyntaxKind["JSDocOptionalType"] = 242] = "JSDocOptionalType"; - SyntaxKind[SyntaxKind["JSDocFunctionType"] = 243] = "JSDocFunctionType"; - SyntaxKind[SyntaxKind["JSDocVariadicType"] = 244] = "JSDocVariadicType"; - SyntaxKind[SyntaxKind["JSDocConstructorType"] = 245] = "JSDocConstructorType"; - SyntaxKind[SyntaxKind["JSDocThisType"] = 246] = "JSDocThisType"; - SyntaxKind[SyntaxKind["JSDocComment"] = 247] = "JSDocComment"; - SyntaxKind[SyntaxKind["JSDocTag"] = 248] = "JSDocTag"; - SyntaxKind[SyntaxKind["JSDocParameterTag"] = 249] = "JSDocParameterTag"; - SyntaxKind[SyntaxKind["JSDocReturnTag"] = 250] = "JSDocReturnTag"; - SyntaxKind[SyntaxKind["JSDocTypeTag"] = 251] = "JSDocTypeTag"; - SyntaxKind[SyntaxKind["JSDocTemplateTag"] = 252] = "JSDocTemplateTag"; - // Synthesized list - SyntaxKind[SyntaxKind["SyntaxList"] = 253] = "SyntaxList"; - // Enum value count - SyntaxKind[SyntaxKind["Count"] = 254] = "Count"; - // Markers - SyntaxKind[SyntaxKind["FirstAssignment"] = 53] = "FirstAssignment"; - SyntaxKind[SyntaxKind["LastAssignment"] = 64] = "LastAssignment"; - SyntaxKind[SyntaxKind["FirstReservedWord"] = 66] = "FirstReservedWord"; - SyntaxKind[SyntaxKind["LastReservedWord"] = 101] = "LastReservedWord"; - SyntaxKind[SyntaxKind["FirstKeyword"] = 66] = "FirstKeyword"; - SyntaxKind[SyntaxKind["LastKeyword"] = 127] = "LastKeyword"; - SyntaxKind[SyntaxKind["FirstFutureReservedWord"] = 102] = "FirstFutureReservedWord"; - SyntaxKind[SyntaxKind["LastFutureReservedWord"] = 110] = "LastFutureReservedWord"; - SyntaxKind[SyntaxKind["FirstTypeNode"] = 144] = "FirstTypeNode"; - SyntaxKind[SyntaxKind["LastTypeNode"] = 152] = "LastTypeNode"; - SyntaxKind[SyntaxKind["FirstPunctuation"] = 14] = "FirstPunctuation"; - SyntaxKind[SyntaxKind["LastPunctuation"] = 64] = "LastPunctuation"; - SyntaxKind[SyntaxKind["FirstToken"] = 0] = "FirstToken"; - SyntaxKind[SyntaxKind["LastToken"] = 127] = "LastToken"; - SyntaxKind[SyntaxKind["FirstTriviaToken"] = 2] = "FirstTriviaToken"; - SyntaxKind[SyntaxKind["LastTriviaToken"] = 6] = "LastTriviaToken"; - SyntaxKind[SyntaxKind["FirstLiteralToken"] = 7] = "FirstLiteralToken"; - SyntaxKind[SyntaxKind["LastLiteralToken"] = 10] = "LastLiteralToken"; - SyntaxKind[SyntaxKind["FirstTemplateToken"] = 10] = "FirstTemplateToken"; - SyntaxKind[SyntaxKind["LastTemplateToken"] = 13] = "LastTemplateToken"; - SyntaxKind[SyntaxKind["FirstBinaryOperator"] = 24] = "FirstBinaryOperator"; - SyntaxKind[SyntaxKind["LastBinaryOperator"] = 64] = "LastBinaryOperator"; - SyntaxKind[SyntaxKind["FirstNode"] = 128] = "FirstNode"; - })(ts.SyntaxKind || (ts.SyntaxKind = {})); - var SyntaxKind = ts.SyntaxKind; - (function (NodeFlags) { - NodeFlags[NodeFlags["Export"] = 1] = "Export"; - NodeFlags[NodeFlags["Ambient"] = 2] = "Ambient"; - NodeFlags[NodeFlags["Public"] = 16] = "Public"; - NodeFlags[NodeFlags["Private"] = 32] = "Private"; - NodeFlags[NodeFlags["Protected"] = 64] = "Protected"; - NodeFlags[NodeFlags["Static"] = 128] = "Static"; - NodeFlags[NodeFlags["Default"] = 256] = "Default"; - NodeFlags[NodeFlags["MultiLine"] = 512] = "MultiLine"; - NodeFlags[NodeFlags["Synthetic"] = 1024] = "Synthetic"; - NodeFlags[NodeFlags["DeclarationFile"] = 2048] = "DeclarationFile"; - NodeFlags[NodeFlags["Let"] = 4096] = "Let"; - NodeFlags[NodeFlags["Const"] = 8192] = "Const"; - NodeFlags[NodeFlags["OctalLiteral"] = 16384] = "OctalLiteral"; - NodeFlags[NodeFlags["Namespace"] = 32768] = "Namespace"; - NodeFlags[NodeFlags["ExportContext"] = 65536] = "ExportContext"; - NodeFlags[NodeFlags["Modifier"] = 499] = "Modifier"; - NodeFlags[NodeFlags["AccessibilityModifier"] = 112] = "AccessibilityModifier"; - NodeFlags[NodeFlags["BlockScoped"] = 12288] = "BlockScoped"; - })(ts.NodeFlags || (ts.NodeFlags = {})); - var NodeFlags = ts.NodeFlags; - /* @internal */ - (function (ParserContextFlags) { - ParserContextFlags[ParserContextFlags["None"] = 0] = "None"; - // Set if this node was parsed in strict mode. Used for grammar error checks, as well as - // checking if the node can be reused in incremental settings. - ParserContextFlags[ParserContextFlags["StrictMode"] = 1] = "StrictMode"; - // If this node was parsed in a context where 'in-expressions' are not allowed. - ParserContextFlags[ParserContextFlags["DisallowIn"] = 2] = "DisallowIn"; - // If this node was parsed in the 'yield' context created when parsing a generator. - ParserContextFlags[ParserContextFlags["Yield"] = 4] = "Yield"; - // If this node was parsed in the parameters of a generator. - ParserContextFlags[ParserContextFlags["GeneratorParameter"] = 8] = "GeneratorParameter"; - // If this node was parsed as part of a decorator - ParserContextFlags[ParserContextFlags["Decorator"] = 16] = "Decorator"; - // If the parser encountered an error when parsing the code that created this node. Note - // the parser only sets this directly on the node it creates right after encountering the - // error. - ParserContextFlags[ParserContextFlags["ThisNodeHasError"] = 32] = "ThisNodeHasError"; - // This node was parsed in a JavaScript file and can be processed differently. For example - // its type can be specified usign a JSDoc comment. - ParserContextFlags[ParserContextFlags["JavaScriptFile"] = 64] = "JavaScriptFile"; - // Context flags set directly by the parser. - ParserContextFlags[ParserContextFlags["ParserGeneratedFlags"] = 63] = "ParserGeneratedFlags"; - // Context flags computed by aggregating child flags upwards. - // Used during incremental parsing to determine if this node or any of its children had an - // error. Computed only once and then cached. - ParserContextFlags[ParserContextFlags["ThisNodeOrAnySubNodesHasError"] = 128] = "ThisNodeOrAnySubNodesHasError"; - // Used to know if we've computed data from children and cached it in this node. - ParserContextFlags[ParserContextFlags["HasAggregatedChildData"] = 256] = "HasAggregatedChildData"; - })(ts.ParserContextFlags || (ts.ParserContextFlags = {})); - var ParserContextFlags = ts.ParserContextFlags; - /* @internal */ - (function (RelationComparisonResult) { - RelationComparisonResult[RelationComparisonResult["Succeeded"] = 1] = "Succeeded"; - RelationComparisonResult[RelationComparisonResult["Failed"] = 2] = "Failed"; - RelationComparisonResult[RelationComparisonResult["FailedAndReported"] = 3] = "FailedAndReported"; - })(ts.RelationComparisonResult || (ts.RelationComparisonResult = {})); - var RelationComparisonResult = ts.RelationComparisonResult; - /** Return code used by getEmitOutput function to indicate status of the function */ - (function (ExitStatus) { - // Compiler ran successfully. Either this was a simple do-nothing compilation (for example, - // when -version or -help was provided, or this was a normal compilation, no diagnostics - // were produced, and all outputs were generated successfully. - ExitStatus[ExitStatus["Success"] = 0] = "Success"; - // Diagnostics were produced and because of them no code was generated. - ExitStatus[ExitStatus["DiagnosticsPresent_OutputsSkipped"] = 1] = "DiagnosticsPresent_OutputsSkipped"; - // Diagnostics were produced and outputs were generated in spite of them. - ExitStatus[ExitStatus["DiagnosticsPresent_OutputsGenerated"] = 2] = "DiagnosticsPresent_OutputsGenerated"; - })(ts.ExitStatus || (ts.ExitStatus = {})); - var ExitStatus = ts.ExitStatus; - (function (TypeFormatFlags) { - TypeFormatFlags[TypeFormatFlags["None"] = 0] = "None"; - TypeFormatFlags[TypeFormatFlags["WriteArrayAsGenericType"] = 1] = "WriteArrayAsGenericType"; - TypeFormatFlags[TypeFormatFlags["UseTypeOfFunction"] = 2] = "UseTypeOfFunction"; - TypeFormatFlags[TypeFormatFlags["NoTruncation"] = 4] = "NoTruncation"; - TypeFormatFlags[TypeFormatFlags["WriteArrowStyleSignature"] = 8] = "WriteArrowStyleSignature"; - TypeFormatFlags[TypeFormatFlags["WriteOwnNameForAnyLike"] = 16] = "WriteOwnNameForAnyLike"; - TypeFormatFlags[TypeFormatFlags["WriteTypeArgumentsOfSignature"] = 32] = "WriteTypeArgumentsOfSignature"; - TypeFormatFlags[TypeFormatFlags["InElementType"] = 64] = "InElementType"; - TypeFormatFlags[TypeFormatFlags["UseFullyQualifiedType"] = 128] = "UseFullyQualifiedType"; - })(ts.TypeFormatFlags || (ts.TypeFormatFlags = {})); - var TypeFormatFlags = ts.TypeFormatFlags; - (function (SymbolFormatFlags) { - SymbolFormatFlags[SymbolFormatFlags["None"] = 0] = "None"; - // Write symbols's type argument if it is instantiated symbol - // eg. class C { p: T } <-- Show p as C.p here - // var a: C; - // var p = a.p; <--- Here p is property of C so show it as C.p instead of just C.p - SymbolFormatFlags[SymbolFormatFlags["WriteTypeParametersOrArguments"] = 1] = "WriteTypeParametersOrArguments"; - // Use only external alias information to get the symbol name in the given context - // eg. module m { export class c { } } import x = m.c; - // When this flag is specified m.c will be used to refer to the class instead of alias symbol x - SymbolFormatFlags[SymbolFormatFlags["UseOnlyExternalAliasing"] = 2] = "UseOnlyExternalAliasing"; - })(ts.SymbolFormatFlags || (ts.SymbolFormatFlags = {})); - var SymbolFormatFlags = ts.SymbolFormatFlags; - /* @internal */ - (function (SymbolAccessibility) { - SymbolAccessibility[SymbolAccessibility["Accessible"] = 0] = "Accessible"; - SymbolAccessibility[SymbolAccessibility["NotAccessible"] = 1] = "NotAccessible"; - SymbolAccessibility[SymbolAccessibility["CannotBeNamed"] = 2] = "CannotBeNamed"; - })(ts.SymbolAccessibility || (ts.SymbolAccessibility = {})); - var SymbolAccessibility = ts.SymbolAccessibility; - (function (SymbolFlags) { - SymbolFlags[SymbolFlags["None"] = 0] = "None"; - SymbolFlags[SymbolFlags["FunctionScopedVariable"] = 1] = "FunctionScopedVariable"; - SymbolFlags[SymbolFlags["BlockScopedVariable"] = 2] = "BlockScopedVariable"; - SymbolFlags[SymbolFlags["Property"] = 4] = "Property"; - SymbolFlags[SymbolFlags["EnumMember"] = 8] = "EnumMember"; - SymbolFlags[SymbolFlags["Function"] = 16] = "Function"; - SymbolFlags[SymbolFlags["Class"] = 32] = "Class"; - SymbolFlags[SymbolFlags["Interface"] = 64] = "Interface"; - SymbolFlags[SymbolFlags["ConstEnum"] = 128] = "ConstEnum"; - SymbolFlags[SymbolFlags["RegularEnum"] = 256] = "RegularEnum"; - SymbolFlags[SymbolFlags["ValueModule"] = 512] = "ValueModule"; - SymbolFlags[SymbolFlags["NamespaceModule"] = 1024] = "NamespaceModule"; - SymbolFlags[SymbolFlags["TypeLiteral"] = 2048] = "TypeLiteral"; - SymbolFlags[SymbolFlags["ObjectLiteral"] = 4096] = "ObjectLiteral"; - SymbolFlags[SymbolFlags["Method"] = 8192] = "Method"; - SymbolFlags[SymbolFlags["Constructor"] = 16384] = "Constructor"; - SymbolFlags[SymbolFlags["GetAccessor"] = 32768] = "GetAccessor"; - SymbolFlags[SymbolFlags["SetAccessor"] = 65536] = "SetAccessor"; - SymbolFlags[SymbolFlags["Signature"] = 131072] = "Signature"; - SymbolFlags[SymbolFlags["TypeParameter"] = 262144] = "TypeParameter"; - SymbolFlags[SymbolFlags["TypeAlias"] = 524288] = "TypeAlias"; - SymbolFlags[SymbolFlags["ExportValue"] = 1048576] = "ExportValue"; - SymbolFlags[SymbolFlags["ExportType"] = 2097152] = "ExportType"; - SymbolFlags[SymbolFlags["ExportNamespace"] = 4194304] = "ExportNamespace"; - SymbolFlags[SymbolFlags["Alias"] = 8388608] = "Alias"; - SymbolFlags[SymbolFlags["Instantiated"] = 16777216] = "Instantiated"; - SymbolFlags[SymbolFlags["Merged"] = 33554432] = "Merged"; - SymbolFlags[SymbolFlags["Transient"] = 67108864] = "Transient"; - SymbolFlags[SymbolFlags["Prototype"] = 134217728] = "Prototype"; - SymbolFlags[SymbolFlags["UnionProperty"] = 268435456] = "UnionProperty"; - SymbolFlags[SymbolFlags["Optional"] = 536870912] = "Optional"; - SymbolFlags[SymbolFlags["ExportStar"] = 1073741824] = "ExportStar"; - SymbolFlags[SymbolFlags["Enum"] = 384] = "Enum"; - SymbolFlags[SymbolFlags["Variable"] = 3] = "Variable"; - SymbolFlags[SymbolFlags["Value"] = 107455] = "Value"; - SymbolFlags[SymbolFlags["Type"] = 793056] = "Type"; - SymbolFlags[SymbolFlags["Namespace"] = 1536] = "Namespace"; - SymbolFlags[SymbolFlags["Module"] = 1536] = "Module"; - SymbolFlags[SymbolFlags["Accessor"] = 98304] = "Accessor"; - // Variables can be redeclared, but can not redeclare a block-scoped declaration with the - // same name, or any other value that is not a variable, e.g. ValueModule or Class - SymbolFlags[SymbolFlags["FunctionScopedVariableExcludes"] = 107454] = "FunctionScopedVariableExcludes"; - // Block-scoped declarations are not allowed to be re-declared - // they can not merge with anything in the value space - SymbolFlags[SymbolFlags["BlockScopedVariableExcludes"] = 107455] = "BlockScopedVariableExcludes"; - SymbolFlags[SymbolFlags["ParameterExcludes"] = 107455] = "ParameterExcludes"; - SymbolFlags[SymbolFlags["PropertyExcludes"] = 107455] = "PropertyExcludes"; - SymbolFlags[SymbolFlags["EnumMemberExcludes"] = 107455] = "EnumMemberExcludes"; - SymbolFlags[SymbolFlags["FunctionExcludes"] = 106927] = "FunctionExcludes"; - SymbolFlags[SymbolFlags["ClassExcludes"] = 899583] = "ClassExcludes"; - SymbolFlags[SymbolFlags["InterfaceExcludes"] = 792992] = "InterfaceExcludes"; - SymbolFlags[SymbolFlags["RegularEnumExcludes"] = 899327] = "RegularEnumExcludes"; - SymbolFlags[SymbolFlags["ConstEnumExcludes"] = 899967] = "ConstEnumExcludes"; - SymbolFlags[SymbolFlags["ValueModuleExcludes"] = 106639] = "ValueModuleExcludes"; - SymbolFlags[SymbolFlags["NamespaceModuleExcludes"] = 0] = "NamespaceModuleExcludes"; - SymbolFlags[SymbolFlags["MethodExcludes"] = 99263] = "MethodExcludes"; - SymbolFlags[SymbolFlags["GetAccessorExcludes"] = 41919] = "GetAccessorExcludes"; - SymbolFlags[SymbolFlags["SetAccessorExcludes"] = 74687] = "SetAccessorExcludes"; - SymbolFlags[SymbolFlags["TypeParameterExcludes"] = 530912] = "TypeParameterExcludes"; - SymbolFlags[SymbolFlags["TypeAliasExcludes"] = 793056] = "TypeAliasExcludes"; - SymbolFlags[SymbolFlags["AliasExcludes"] = 8388608] = "AliasExcludes"; - SymbolFlags[SymbolFlags["ModuleMember"] = 8914931] = "ModuleMember"; - SymbolFlags[SymbolFlags["ExportHasLocal"] = 944] = "ExportHasLocal"; - SymbolFlags[SymbolFlags["HasExports"] = 1952] = "HasExports"; - SymbolFlags[SymbolFlags["HasMembers"] = 6240] = "HasMembers"; - SymbolFlags[SymbolFlags["BlockScoped"] = 418] = "BlockScoped"; - SymbolFlags[SymbolFlags["PropertyOrAccessor"] = 98308] = "PropertyOrAccessor"; - SymbolFlags[SymbolFlags["Export"] = 7340032] = "Export"; - /* @internal */ - // The set of things we consider semantically classifiable. Used to speed up the LS during - // classification. - SymbolFlags[SymbolFlags["Classifiable"] = 788448] = "Classifiable"; - })(ts.SymbolFlags || (ts.SymbolFlags = {})); - var SymbolFlags = ts.SymbolFlags; - /* @internal */ - (function (NodeCheckFlags) { - NodeCheckFlags[NodeCheckFlags["TypeChecked"] = 1] = "TypeChecked"; - NodeCheckFlags[NodeCheckFlags["LexicalThis"] = 2] = "LexicalThis"; - NodeCheckFlags[NodeCheckFlags["CaptureThis"] = 4] = "CaptureThis"; - NodeCheckFlags[NodeCheckFlags["EmitExtends"] = 8] = "EmitExtends"; - NodeCheckFlags[NodeCheckFlags["SuperInstance"] = 16] = "SuperInstance"; - NodeCheckFlags[NodeCheckFlags["SuperStatic"] = 32] = "SuperStatic"; - NodeCheckFlags[NodeCheckFlags["ContextChecked"] = 64] = "ContextChecked"; - // Values for enum members have been computed, and any errors have been reported for them. - NodeCheckFlags[NodeCheckFlags["EnumValuesComputed"] = 128] = "EnumValuesComputed"; - NodeCheckFlags[NodeCheckFlags["BlockScopedBindingInLoop"] = 256] = "BlockScopedBindingInLoop"; - NodeCheckFlags[NodeCheckFlags["EmitDecorate"] = 512] = "EmitDecorate"; - NodeCheckFlags[NodeCheckFlags["EmitParam"] = 1024] = "EmitParam"; - NodeCheckFlags[NodeCheckFlags["LexicalModuleMergesWithClass"] = 2048] = "LexicalModuleMergesWithClass"; - })(ts.NodeCheckFlags || (ts.NodeCheckFlags = {})); - var NodeCheckFlags = ts.NodeCheckFlags; - (function (TypeFlags) { - TypeFlags[TypeFlags["Any"] = 1] = "Any"; - TypeFlags[TypeFlags["String"] = 2] = "String"; - TypeFlags[TypeFlags["Number"] = 4] = "Number"; - TypeFlags[TypeFlags["Boolean"] = 8] = "Boolean"; - TypeFlags[TypeFlags["Void"] = 16] = "Void"; - TypeFlags[TypeFlags["Undefined"] = 32] = "Undefined"; - TypeFlags[TypeFlags["Null"] = 64] = "Null"; - TypeFlags[TypeFlags["Enum"] = 128] = "Enum"; - TypeFlags[TypeFlags["StringLiteral"] = 256] = "StringLiteral"; - TypeFlags[TypeFlags["TypeParameter"] = 512] = "TypeParameter"; - TypeFlags[TypeFlags["Class"] = 1024] = "Class"; - TypeFlags[TypeFlags["Interface"] = 2048] = "Interface"; - TypeFlags[TypeFlags["Reference"] = 4096] = "Reference"; - TypeFlags[TypeFlags["Tuple"] = 8192] = "Tuple"; - TypeFlags[TypeFlags["Union"] = 16384] = "Union"; - TypeFlags[TypeFlags["Anonymous"] = 32768] = "Anonymous"; - TypeFlags[TypeFlags["Instantiated"] = 65536] = "Instantiated"; - /* @internal */ - TypeFlags[TypeFlags["FromSignature"] = 131072] = "FromSignature"; - TypeFlags[TypeFlags["ObjectLiteral"] = 262144] = "ObjectLiteral"; - /* @internal */ - TypeFlags[TypeFlags["ContainsUndefinedOrNull"] = 524288] = "ContainsUndefinedOrNull"; - /* @internal */ - TypeFlags[TypeFlags["ContainsObjectLiteral"] = 1048576] = "ContainsObjectLiteral"; - TypeFlags[TypeFlags["ESSymbol"] = 2097152] = "ESSymbol"; - /* @internal */ - TypeFlags[TypeFlags["Intrinsic"] = 2097279] = "Intrinsic"; - /* @internal */ - TypeFlags[TypeFlags["Primitive"] = 2097662] = "Primitive"; - TypeFlags[TypeFlags["StringLike"] = 258] = "StringLike"; - TypeFlags[TypeFlags["NumberLike"] = 132] = "NumberLike"; - TypeFlags[TypeFlags["ObjectType"] = 48128] = "ObjectType"; - /* @internal */ - TypeFlags[TypeFlags["RequiresWidening"] = 1572864] = "RequiresWidening"; - })(ts.TypeFlags || (ts.TypeFlags = {})); - var TypeFlags = ts.TypeFlags; - (function (SignatureKind) { - SignatureKind[SignatureKind["Call"] = 0] = "Call"; - SignatureKind[SignatureKind["Construct"] = 1] = "Construct"; - })(ts.SignatureKind || (ts.SignatureKind = {})); - var SignatureKind = ts.SignatureKind; - (function (IndexKind) { - IndexKind[IndexKind["String"] = 0] = "String"; - IndexKind[IndexKind["Number"] = 1] = "Number"; - })(ts.IndexKind || (ts.IndexKind = {})); - var IndexKind = ts.IndexKind; - (function (DiagnosticCategory) { - DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning"; - DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error"; - DiagnosticCategory[DiagnosticCategory["Message"] = 2] = "Message"; - })(ts.DiagnosticCategory || (ts.DiagnosticCategory = {})); - var DiagnosticCategory = ts.DiagnosticCategory; - (function (ModuleKind) { - ModuleKind[ModuleKind["None"] = 0] = "None"; - ModuleKind[ModuleKind["CommonJS"] = 1] = "CommonJS"; - ModuleKind[ModuleKind["AMD"] = 2] = "AMD"; - ModuleKind[ModuleKind["UMD"] = 3] = "UMD"; - ModuleKind[ModuleKind["System"] = 4] = "System"; - })(ts.ModuleKind || (ts.ModuleKind = {})); - var ModuleKind = ts.ModuleKind; - (function (NewLineKind) { - NewLineKind[NewLineKind["CarriageReturnLineFeed"] = 0] = "CarriageReturnLineFeed"; - NewLineKind[NewLineKind["LineFeed"] = 1] = "LineFeed"; - })(ts.NewLineKind || (ts.NewLineKind = {})); - var NewLineKind = ts.NewLineKind; - (function (ScriptTarget) { - ScriptTarget[ScriptTarget["ES3"] = 0] = "ES3"; - ScriptTarget[ScriptTarget["ES5"] = 1] = "ES5"; - ScriptTarget[ScriptTarget["ES6"] = 2] = "ES6"; - ScriptTarget[ScriptTarget["Latest"] = 2] = "Latest"; - })(ts.ScriptTarget || (ts.ScriptTarget = {})); - var ScriptTarget = ts.ScriptTarget; - /* @internal */ - (function (CharacterCodes) { - CharacterCodes[CharacterCodes["nullCharacter"] = 0] = "nullCharacter"; - CharacterCodes[CharacterCodes["maxAsciiCharacter"] = 127] = "maxAsciiCharacter"; - CharacterCodes[CharacterCodes["lineFeed"] = 10] = "lineFeed"; - CharacterCodes[CharacterCodes["carriageReturn"] = 13] = "carriageReturn"; - CharacterCodes[CharacterCodes["lineSeparator"] = 8232] = "lineSeparator"; - CharacterCodes[CharacterCodes["paragraphSeparator"] = 8233] = "paragraphSeparator"; - CharacterCodes[CharacterCodes["nextLine"] = 133] = "nextLine"; - // Unicode 3.0 space characters - CharacterCodes[CharacterCodes["space"] = 32] = "space"; - CharacterCodes[CharacterCodes["nonBreakingSpace"] = 160] = "nonBreakingSpace"; - CharacterCodes[CharacterCodes["enQuad"] = 8192] = "enQuad"; - CharacterCodes[CharacterCodes["emQuad"] = 8193] = "emQuad"; - CharacterCodes[CharacterCodes["enSpace"] = 8194] = "enSpace"; - CharacterCodes[CharacterCodes["emSpace"] = 8195] = "emSpace"; - CharacterCodes[CharacterCodes["threePerEmSpace"] = 8196] = "threePerEmSpace"; - CharacterCodes[CharacterCodes["fourPerEmSpace"] = 8197] = "fourPerEmSpace"; - CharacterCodes[CharacterCodes["sixPerEmSpace"] = 8198] = "sixPerEmSpace"; - CharacterCodes[CharacterCodes["figureSpace"] = 8199] = "figureSpace"; - CharacterCodes[CharacterCodes["punctuationSpace"] = 8200] = "punctuationSpace"; - CharacterCodes[CharacterCodes["thinSpace"] = 8201] = "thinSpace"; - CharacterCodes[CharacterCodes["hairSpace"] = 8202] = "hairSpace"; - CharacterCodes[CharacterCodes["zeroWidthSpace"] = 8203] = "zeroWidthSpace"; - CharacterCodes[CharacterCodes["narrowNoBreakSpace"] = 8239] = "narrowNoBreakSpace"; - CharacterCodes[CharacterCodes["ideographicSpace"] = 12288] = "ideographicSpace"; - CharacterCodes[CharacterCodes["mathematicalSpace"] = 8287] = "mathematicalSpace"; - CharacterCodes[CharacterCodes["ogham"] = 5760] = "ogham"; - CharacterCodes[CharacterCodes["_"] = 95] = "_"; - CharacterCodes[CharacterCodes["$"] = 36] = "$"; - CharacterCodes[CharacterCodes["_0"] = 48] = "_0"; - CharacterCodes[CharacterCodes["_1"] = 49] = "_1"; - CharacterCodes[CharacterCodes["_2"] = 50] = "_2"; - CharacterCodes[CharacterCodes["_3"] = 51] = "_3"; - CharacterCodes[CharacterCodes["_4"] = 52] = "_4"; - CharacterCodes[CharacterCodes["_5"] = 53] = "_5"; - CharacterCodes[CharacterCodes["_6"] = 54] = "_6"; - CharacterCodes[CharacterCodes["_7"] = 55] = "_7"; - CharacterCodes[CharacterCodes["_8"] = 56] = "_8"; - CharacterCodes[CharacterCodes["_9"] = 57] = "_9"; - CharacterCodes[CharacterCodes["a"] = 97] = "a"; - CharacterCodes[CharacterCodes["b"] = 98] = "b"; - CharacterCodes[CharacterCodes["c"] = 99] = "c"; - CharacterCodes[CharacterCodes["d"] = 100] = "d"; - CharacterCodes[CharacterCodes["e"] = 101] = "e"; - CharacterCodes[CharacterCodes["f"] = 102] = "f"; - CharacterCodes[CharacterCodes["g"] = 103] = "g"; - CharacterCodes[CharacterCodes["h"] = 104] = "h"; - CharacterCodes[CharacterCodes["i"] = 105] = "i"; - CharacterCodes[CharacterCodes["j"] = 106] = "j"; - CharacterCodes[CharacterCodes["k"] = 107] = "k"; - CharacterCodes[CharacterCodes["l"] = 108] = "l"; - CharacterCodes[CharacterCodes["m"] = 109] = "m"; - CharacterCodes[CharacterCodes["n"] = 110] = "n"; - CharacterCodes[CharacterCodes["o"] = 111] = "o"; - CharacterCodes[CharacterCodes["p"] = 112] = "p"; - CharacterCodes[CharacterCodes["q"] = 113] = "q"; - CharacterCodes[CharacterCodes["r"] = 114] = "r"; - CharacterCodes[CharacterCodes["s"] = 115] = "s"; - CharacterCodes[CharacterCodes["t"] = 116] = "t"; - CharacterCodes[CharacterCodes["u"] = 117] = "u"; - CharacterCodes[CharacterCodes["v"] = 118] = "v"; - CharacterCodes[CharacterCodes["w"] = 119] = "w"; - CharacterCodes[CharacterCodes["x"] = 120] = "x"; - CharacterCodes[CharacterCodes["y"] = 121] = "y"; - CharacterCodes[CharacterCodes["z"] = 122] = "z"; - CharacterCodes[CharacterCodes["A"] = 65] = "A"; - CharacterCodes[CharacterCodes["B"] = 66] = "B"; - CharacterCodes[CharacterCodes["C"] = 67] = "C"; - CharacterCodes[CharacterCodes["D"] = 68] = "D"; - CharacterCodes[CharacterCodes["E"] = 69] = "E"; - CharacterCodes[CharacterCodes["F"] = 70] = "F"; - CharacterCodes[CharacterCodes["G"] = 71] = "G"; - CharacterCodes[CharacterCodes["H"] = 72] = "H"; - CharacterCodes[CharacterCodes["I"] = 73] = "I"; - CharacterCodes[CharacterCodes["J"] = 74] = "J"; - CharacterCodes[CharacterCodes["K"] = 75] = "K"; - CharacterCodes[CharacterCodes["L"] = 76] = "L"; - CharacterCodes[CharacterCodes["M"] = 77] = "M"; - CharacterCodes[CharacterCodes["N"] = 78] = "N"; - CharacterCodes[CharacterCodes["O"] = 79] = "O"; - CharacterCodes[CharacterCodes["P"] = 80] = "P"; - CharacterCodes[CharacterCodes["Q"] = 81] = "Q"; - CharacterCodes[CharacterCodes["R"] = 82] = "R"; - CharacterCodes[CharacterCodes["S"] = 83] = "S"; - CharacterCodes[CharacterCodes["T"] = 84] = "T"; - CharacterCodes[CharacterCodes["U"] = 85] = "U"; - CharacterCodes[CharacterCodes["V"] = 86] = "V"; - CharacterCodes[CharacterCodes["W"] = 87] = "W"; - CharacterCodes[CharacterCodes["X"] = 88] = "X"; - CharacterCodes[CharacterCodes["Y"] = 89] = "Y"; - CharacterCodes[CharacterCodes["Z"] = 90] = "Z"; - CharacterCodes[CharacterCodes["ampersand"] = 38] = "ampersand"; - CharacterCodes[CharacterCodes["asterisk"] = 42] = "asterisk"; - CharacterCodes[CharacterCodes["at"] = 64] = "at"; - CharacterCodes[CharacterCodes["backslash"] = 92] = "backslash"; - CharacterCodes[CharacterCodes["backtick"] = 96] = "backtick"; - CharacterCodes[CharacterCodes["bar"] = 124] = "bar"; - CharacterCodes[CharacterCodes["caret"] = 94] = "caret"; - CharacterCodes[CharacterCodes["closeBrace"] = 125] = "closeBrace"; - CharacterCodes[CharacterCodes["closeBracket"] = 93] = "closeBracket"; - CharacterCodes[CharacterCodes["closeParen"] = 41] = "closeParen"; - CharacterCodes[CharacterCodes["colon"] = 58] = "colon"; - CharacterCodes[CharacterCodes["comma"] = 44] = "comma"; - CharacterCodes[CharacterCodes["dot"] = 46] = "dot"; - CharacterCodes[CharacterCodes["doubleQuote"] = 34] = "doubleQuote"; - CharacterCodes[CharacterCodes["equals"] = 61] = "equals"; - CharacterCodes[CharacterCodes["exclamation"] = 33] = "exclamation"; - CharacterCodes[CharacterCodes["greaterThan"] = 62] = "greaterThan"; - CharacterCodes[CharacterCodes["hash"] = 35] = "hash"; - CharacterCodes[CharacterCodes["lessThan"] = 60] = "lessThan"; - CharacterCodes[CharacterCodes["minus"] = 45] = "minus"; - CharacterCodes[CharacterCodes["openBrace"] = 123] = "openBrace"; - CharacterCodes[CharacterCodes["openBracket"] = 91] = "openBracket"; - CharacterCodes[CharacterCodes["openParen"] = 40] = "openParen"; - CharacterCodes[CharacterCodes["percent"] = 37] = "percent"; - CharacterCodes[CharacterCodes["plus"] = 43] = "plus"; - CharacterCodes[CharacterCodes["question"] = 63] = "question"; - CharacterCodes[CharacterCodes["semicolon"] = 59] = "semicolon"; - CharacterCodes[CharacterCodes["singleQuote"] = 39] = "singleQuote"; - CharacterCodes[CharacterCodes["slash"] = 47] = "slash"; - CharacterCodes[CharacterCodes["tilde"] = 126] = "tilde"; - CharacterCodes[CharacterCodes["backspace"] = 8] = "backspace"; - CharacterCodes[CharacterCodes["formFeed"] = 12] = "formFeed"; - CharacterCodes[CharacterCodes["byteOrderMark"] = 65279] = "byteOrderMark"; - CharacterCodes[CharacterCodes["tab"] = 9] = "tab"; - CharacterCodes[CharacterCodes["verticalTab"] = 11] = "verticalTab"; - })(ts.CharacterCodes || (ts.CharacterCodes = {})); - var CharacterCodes = ts.CharacterCodes; -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - // Ternary values are defined such that - // x & y is False if either x or y is False. - // x & y is Maybe if either x or y is Maybe, but neither x or y is False. - // x & y is True if both x and y are True. - // x | y is False if both x and y are False. - // x | y is Maybe if either x or y is Maybe, but neither x or y is True. - // x | y is True if either x or y is True. - (function (Ternary) { - Ternary[Ternary["False"] = 0] = "False"; - Ternary[Ternary["Maybe"] = 1] = "Maybe"; - Ternary[Ternary["True"] = -1] = "True"; - })(ts.Ternary || (ts.Ternary = {})); - var Ternary = ts.Ternary; - function createFileMap(getCanonicalFileName) { - var files = {}; - return { - get: get, - set: set, - contains: contains, - remove: remove, - forEachValue: forEachValueInMap - }; - function set(fileName, value) { - files[normalizeKey(fileName)] = value; - } - function get(fileName) { - return files[normalizeKey(fileName)]; - } - function contains(fileName) { - return hasProperty(files, normalizeKey(fileName)); - } - function remove(fileName) { - var key = normalizeKey(fileName); - delete files[key]; - } - function forEachValueInMap(f) { - forEachValue(files, f); - } - function normalizeKey(key) { - return getCanonicalFileName(normalizeSlashes(key)); - } - } - ts.createFileMap = createFileMap; - (function (Comparison) { - Comparison[Comparison["LessThan"] = -1] = "LessThan"; - Comparison[Comparison["EqualTo"] = 0] = "EqualTo"; - Comparison[Comparison["GreaterThan"] = 1] = "GreaterThan"; - })(ts.Comparison || (ts.Comparison = {})); - var Comparison = ts.Comparison; - function forEach(array, callback) { - if (array) { - for (var i = 0, len = array.length; i < len; i++) { - var result = callback(array[i], i); - if (result) { - return result; - } - } - } - return undefined; - } - ts.forEach = forEach; - function contains(array, value) { - if (array) { - for (var _i = 0; _i < array.length; _i++) { - var v = array[_i]; - if (v === value) { - return true; - } - } - } - return false; - } - ts.contains = contains; - function indexOf(array, value) { - if (array) { - for (var i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { - return i; - } - } - } - return -1; - } - ts.indexOf = indexOf; - function countWhere(array, predicate) { - var count = 0; - if (array) { - for (var _i = 0; _i < array.length; _i++) { - var v = array[_i]; - if (predicate(v)) { - count++; - } - } - } - return count; - } - ts.countWhere = countWhere; - function filter(array, f) { - var result; - if (array) { - result = []; - for (var _i = 0; _i < array.length; _i++) { - var item = array[_i]; - if (f(item)) { - result.push(item); - } - } - } - return result; - } - ts.filter = filter; - function map(array, f) { - var result; - if (array) { - result = []; - for (var _i = 0; _i < array.length; _i++) { - var v = array[_i]; - result.push(f(v)); - } - } - return result; - } - ts.map = map; - function concatenate(array1, array2) { - if (!array2 || !array2.length) - return array1; - if (!array1 || !array1.length) - return array2; - return array1.concat(array2); - } - ts.concatenate = concatenate; - function deduplicate(array) { - var result; - if (array) { - result = []; - for (var _i = 0; _i < array.length; _i++) { - var item = array[_i]; - if (!contains(result, item)) { - result.push(item); - } - } - } - return result; - } - ts.deduplicate = deduplicate; - function sum(array, prop) { - var result = 0; - for (var _i = 0; _i < array.length; _i++) { - var v = array[_i]; - result += v[prop]; - } - return result; - } - ts.sum = sum; - function addRange(to, from) { - if (to && from) { - for (var _i = 0; _i < from.length; _i++) { - var v = from[_i]; - to.push(v); - } - } - } - ts.addRange = addRange; - function rangeEquals(array1, array2, pos, end) { - while (pos < end) { - if (array1[pos] !== array2[pos]) { - return false; - } - pos++; - } - return true; - } - ts.rangeEquals = rangeEquals; - /** - * Returns the last element of an array if non-empty, undefined otherwise. - */ - function lastOrUndefined(array) { - if (array.length === 0) { - return undefined; - } - return array[array.length - 1]; - } - ts.lastOrUndefined = lastOrUndefined; - function binarySearch(array, value) { - var low = 0; - var high = array.length - 1; - while (low <= high) { - var middle = low + ((high - low) >> 1); - var midValue = array[middle]; - if (midValue === value) { - return middle; - } - else if (midValue > value) { - high = middle - 1; - } - else { - low = middle + 1; - } - } - return ~low; - } - ts.binarySearch = binarySearch; - function reduceLeft(array, f, initial) { - if (array) { - var count = array.length; - if (count > 0) { - var pos = 0; - var result = arguments.length <= 2 ? array[pos++] : initial; - while (pos < count) { - result = f(result, array[pos++]); - } - return result; - } - } - return initial; - } - ts.reduceLeft = reduceLeft; - function reduceRight(array, f, initial) { - if (array) { - var pos = array.length - 1; - if (pos >= 0) { - var result = arguments.length <= 2 ? array[pos--] : initial; - while (pos >= 0) { - result = f(result, array[pos--]); - } - return result; - } - } - return initial; - } - ts.reduceRight = reduceRight; - var hasOwnProperty = Object.prototype.hasOwnProperty; - function hasProperty(map, key) { - return hasOwnProperty.call(map, key); - } - ts.hasProperty = hasProperty; - function getProperty(map, key) { - return hasOwnProperty.call(map, key) ? map[key] : undefined; - } - ts.getProperty = getProperty; - function isEmpty(map) { - for (var id in map) { - if (hasProperty(map, id)) { - return false; - } - } - return true; - } - ts.isEmpty = isEmpty; - function clone(object) { - var result = {}; - for (var id in object) { - result[id] = object[id]; - } - return result; - } - ts.clone = clone; - function extend(first, second) { - var result = {}; - for (var id in first) { - result[id] = first[id]; - } - for (var id in second) { - if (!hasProperty(result, id)) { - result[id] = second[id]; - } - } - return result; - } - ts.extend = extend; - function forEachValue(map, callback) { - var result; - for (var id in map) { - if (result = callback(map[id])) - break; - } - return result; - } - ts.forEachValue = forEachValue; - function forEachKey(map, callback) { - var result; - for (var id in map) { - if (result = callback(id)) - break; - } - return result; - } - ts.forEachKey = forEachKey; - function lookUp(map, key) { - return hasProperty(map, key) ? map[key] : undefined; - } - ts.lookUp = lookUp; - function copyMap(source, target) { - for (var p in source) { - target[p] = source[p]; - } - } - ts.copyMap = copyMap; - /** - * Creates a map from the elements of an array. - * - * @param array the array of input elements. - * @param makeKey a function that produces a key for a given element. - * - * This function makes no effort to avoid collisions; if any two elements produce - * the same key with the given 'makeKey' function, then the element with the higher - * index in the array will be the one associated with the produced key. - */ - function arrayToMap(array, makeKey) { - var result = {}; - forEach(array, function (value) { - result[makeKey(value)] = value; - }); - return result; - } - ts.arrayToMap = arrayToMap; - function memoize(callback) { - var value; - return function () { - if (callback) { - value = callback(); - callback = undefined; - } - return value; - }; - } - ts.memoize = memoize; - function formatStringFromArgs(text, args, baseIndex) { - baseIndex = baseIndex || 0; - return text.replace(/{(\d+)}/g, function (match, index) { return args[+index + baseIndex]; }); - } - ts.localizedDiagnosticMessages = undefined; - function getLocaleSpecificMessage(message) { - return ts.localizedDiagnosticMessages && ts.localizedDiagnosticMessages[message] - ? ts.localizedDiagnosticMessages[message] - : message; - } - ts.getLocaleSpecificMessage = getLocaleSpecificMessage; - function createFileDiagnostic(file, start, length, message) { - var end = start + length; - Debug.assert(start >= 0, "start must be non-negative, is " + start); - Debug.assert(length >= 0, "length must be non-negative, is " + length); - if (file) { - Debug.assert(start <= file.text.length, "start must be within the bounds of the file. " + start + " > " + file.text.length); - Debug.assert(end <= file.text.length, "end must be the bounds of the file. " + end + " > " + file.text.length); - } - var text = getLocaleSpecificMessage(message.key); - if (arguments.length > 4) { - text = formatStringFromArgs(text, arguments, 4); - } - return { - file: file, - start: start, - length: length, - messageText: text, - category: message.category, - code: message.code - }; - } - ts.createFileDiagnostic = createFileDiagnostic; - function createCompilerDiagnostic(message) { - var text = getLocaleSpecificMessage(message.key); - if (arguments.length > 1) { - text = formatStringFromArgs(text, arguments, 1); - } - return { - file: undefined, - start: undefined, - length: undefined, - messageText: text, - category: message.category, - code: message.code - }; - } - ts.createCompilerDiagnostic = createCompilerDiagnostic; - function chainDiagnosticMessages(details, message) { - var text = getLocaleSpecificMessage(message.key); - if (arguments.length > 2) { - text = formatStringFromArgs(text, arguments, 2); - } - return { - messageText: text, - category: message.category, - code: message.code, - next: details - }; - } - ts.chainDiagnosticMessages = chainDiagnosticMessages; - function concatenateDiagnosticMessageChains(headChain, tailChain) { - Debug.assert(!headChain.next); - headChain.next = tailChain; - return headChain; - } - ts.concatenateDiagnosticMessageChains = concatenateDiagnosticMessageChains; - function compareValues(a, b) { - if (a === b) - return 0 /* EqualTo */; - if (a === undefined) - return -1 /* LessThan */; - if (b === undefined) - return 1 /* GreaterThan */; - return a < b ? -1 /* LessThan */ : 1 /* GreaterThan */; - } - ts.compareValues = compareValues; - function getDiagnosticFileName(diagnostic) { - return diagnostic.file ? diagnostic.file.fileName : undefined; - } - function compareDiagnostics(d1, d2) { - return compareValues(getDiagnosticFileName(d1), getDiagnosticFileName(d2)) || - compareValues(d1.start, d2.start) || - compareValues(d1.length, d2.length) || - compareValues(d1.code, d2.code) || - compareMessageText(d1.messageText, d2.messageText) || - 0 /* EqualTo */; - } - ts.compareDiagnostics = compareDiagnostics; - function compareMessageText(text1, text2) { - while (text1 && text2) { - // We still have both chains. - var string1 = typeof text1 === "string" ? text1 : text1.messageText; - var string2 = typeof text2 === "string" ? text2 : text2.messageText; - var res = compareValues(string1, string2); - if (res) { - return res; - } - text1 = typeof text1 === "string" ? undefined : text1.next; - text2 = typeof text2 === "string" ? undefined : text2.next; - } - if (!text1 && !text2) { - // if the chains are done, then these messages are the same. - return 0 /* EqualTo */; - } - // We still have one chain remaining. The shorter chain should come first. - return text1 ? 1 /* GreaterThan */ : -1 /* LessThan */; - } - function sortAndDeduplicateDiagnostics(diagnostics) { - return deduplicateSortedDiagnostics(diagnostics.sort(compareDiagnostics)); - } - ts.sortAndDeduplicateDiagnostics = sortAndDeduplicateDiagnostics; - function deduplicateSortedDiagnostics(diagnostics) { - if (diagnostics.length < 2) { - return diagnostics; - } - var newDiagnostics = [diagnostics[0]]; - var previousDiagnostic = diagnostics[0]; - for (var i = 1; i < diagnostics.length; i++) { - var currentDiagnostic = diagnostics[i]; - var isDupe = compareDiagnostics(currentDiagnostic, previousDiagnostic) === 0 /* EqualTo */; - if (!isDupe) { - newDiagnostics.push(currentDiagnostic); - previousDiagnostic = currentDiagnostic; - } - } - return newDiagnostics; - } - ts.deduplicateSortedDiagnostics = deduplicateSortedDiagnostics; - function normalizeSlashes(path) { - return path.replace(/\\/g, "/"); - } - ts.normalizeSlashes = normalizeSlashes; - // Returns length of path root (i.e. length of "/", "x:/", "//server/share/, file:///user/files") - function getRootLength(path) { - if (path.charCodeAt(0) === 47 /* slash */) { - if (path.charCodeAt(1) !== 47 /* slash */) - return 1; - var p1 = path.indexOf("/", 2); - if (p1 < 0) - return 2; - var p2 = path.indexOf("/", p1 + 1); - if (p2 < 0) - return p1 + 1; - return p2 + 1; - } - if (path.charCodeAt(1) === 58 /* colon */) { - if (path.charCodeAt(2) === 47 /* slash */) - return 3; - return 2; - } - // Per RFC 1738 'file' URI schema has the shape file:/// - // if is omitted then it is assumed that host value is 'localhost', - // however slash after the omitted is not removed. - // file:///folder1/file1 - this is a correct URI - // file://folder2/file2 - this is an incorrect URI - if (path.lastIndexOf("file:///", 0) === 0) { - return "file:///".length; - } - var idx = path.indexOf('://'); - if (idx !== -1) { - return idx + "://".length; - } - return 0; - } - ts.getRootLength = getRootLength; - ts.directorySeparator = "/"; - function getNormalizedParts(normalizedSlashedPath, rootLength) { - var parts = normalizedSlashedPath.substr(rootLength).split(ts.directorySeparator); - var normalized = []; - for (var _i = 0; _i < parts.length; _i++) { - var part = parts[_i]; - if (part !== ".") { - if (part === ".." && normalized.length > 0 && lastOrUndefined(normalized) !== "..") { - normalized.pop(); - } - else { - // A part may be an empty string (which is 'falsy') if the path had consecutive slashes, - // e.g. "path//file.ts". Drop these before re-joining the parts. - if (part) { - normalized.push(part); - } - } - } - } - return normalized; - } - function normalizePath(path) { - path = normalizeSlashes(path); - var rootLength = getRootLength(path); - var normalized = getNormalizedParts(path, rootLength); - return path.substr(0, rootLength) + normalized.join(ts.directorySeparator); - } - ts.normalizePath = normalizePath; - function getDirectoryPath(path) { - return path.substr(0, Math.max(getRootLength(path), path.lastIndexOf(ts.directorySeparator))); - } - ts.getDirectoryPath = getDirectoryPath; - function isUrl(path) { - return path && !isRootedDiskPath(path) && path.indexOf("://") !== -1; - } - ts.isUrl = isUrl; - function isRootedDiskPath(path) { - return getRootLength(path) !== 0; - } - ts.isRootedDiskPath = isRootedDiskPath; - function normalizedPathComponents(path, rootLength) { - var normalizedParts = getNormalizedParts(path, rootLength); - return [path.substr(0, rootLength)].concat(normalizedParts); - } - function getNormalizedPathComponents(path, currentDirectory) { - path = normalizeSlashes(path); - var rootLength = getRootLength(path); - if (rootLength == 0) { - // If the path is not rooted it is relative to current directory - path = combinePaths(normalizeSlashes(currentDirectory), path); - rootLength = getRootLength(path); - } - return normalizedPathComponents(path, rootLength); - } - ts.getNormalizedPathComponents = getNormalizedPathComponents; - function getNormalizedAbsolutePath(fileName, currentDirectory) { - return getNormalizedPathFromPathComponents(getNormalizedPathComponents(fileName, currentDirectory)); - } - ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath; - function getNormalizedPathFromPathComponents(pathComponents) { - if (pathComponents && pathComponents.length) { - return pathComponents[0] + pathComponents.slice(1).join(ts.directorySeparator); - } - } - ts.getNormalizedPathFromPathComponents = getNormalizedPathFromPathComponents; - function getNormalizedPathComponentsOfUrl(url) { - // Get root length of http://www.website.com/folder1/foler2/ - // In this example the root is: http://www.website.com/ - // normalized path components should be ["http://www.website.com/", "folder1", "folder2"] - var urlLength = url.length; - // Initial root length is http:// part - var rootLength = url.indexOf("://") + "://".length; - while (rootLength < urlLength) { - // Consume all immediate slashes in the protocol - // eg.initial rootlength is just file:// but it needs to consume another "/" in file:/// - if (url.charCodeAt(rootLength) === 47 /* slash */) { - rootLength++; - } - else { - // non slash character means we continue proceeding to next component of root search - break; - } - } - // there are no parts after http:// just return current string as the pathComponent - if (rootLength === urlLength) { - return [url]; - } - // Find the index of "/" after website.com so the root can be http://www.website.com/ (from existing http://) - var indexOfNextSlash = url.indexOf(ts.directorySeparator, rootLength); - if (indexOfNextSlash !== -1) { - // Found the "/" after the website.com so the root is length of http://www.website.com/ - // and get components afetr the root normally like any other folder components - rootLength = indexOfNextSlash + 1; - return normalizedPathComponents(url, rootLength); - } - else { - // Can't find the host assume the rest of the string as component - // but make sure we append "/" to it as root is not joined using "/" - // eg. if url passed in was http://website.com we want to use root as [http://website.com/] - // so that other path manipulations will be correct and it can be merged with relative paths correctly - return [url + ts.directorySeparator]; - } - } - function getNormalizedPathOrUrlComponents(pathOrUrl, currentDirectory) { - if (isUrl(pathOrUrl)) { - return getNormalizedPathComponentsOfUrl(pathOrUrl); - } - else { - return getNormalizedPathComponents(pathOrUrl, currentDirectory); - } - } - function getRelativePathToDirectoryOrUrl(directoryPathOrUrl, relativeOrAbsolutePath, currentDirectory, getCanonicalFileName, isAbsolutePathAnUrl) { - var pathComponents = getNormalizedPathOrUrlComponents(relativeOrAbsolutePath, currentDirectory); - var directoryComponents = getNormalizedPathOrUrlComponents(directoryPathOrUrl, currentDirectory); - if (directoryComponents.length > 1 && lastOrUndefined(directoryComponents) === "") { - // If the directory path given was of type test/cases/ then we really need components of directory to be only till its name - // that is ["test", "cases", ""] needs to be actually ["test", "cases"] - directoryComponents.length--; - } - // Find the component that differs - for (var joinStartIndex = 0; joinStartIndex < pathComponents.length && joinStartIndex < directoryComponents.length; joinStartIndex++) { - if (getCanonicalFileName(directoryComponents[joinStartIndex]) !== getCanonicalFileName(pathComponents[joinStartIndex])) { - break; - } - } - // Get the relative path - if (joinStartIndex) { - var relativePath = ""; - var relativePathComponents = pathComponents.slice(joinStartIndex, pathComponents.length); - for (; joinStartIndex < directoryComponents.length; joinStartIndex++) { - if (directoryComponents[joinStartIndex] !== "") { - relativePath = relativePath + ".." + ts.directorySeparator; - } - } - return relativePath + relativePathComponents.join(ts.directorySeparator); - } - // Cant find the relative path, get the absolute path - var absolutePath = getNormalizedPathFromPathComponents(pathComponents); - if (isAbsolutePathAnUrl && isRootedDiskPath(absolutePath)) { - absolutePath = "file:///" + absolutePath; - } - return absolutePath; - } - ts.getRelativePathToDirectoryOrUrl = getRelativePathToDirectoryOrUrl; - function getBaseFileName(path) { - var i = path.lastIndexOf(ts.directorySeparator); - return i < 0 ? path : path.substring(i + 1); - } - ts.getBaseFileName = getBaseFileName; - function combinePaths(path1, path2) { - if (!(path1 && path1.length)) - return path2; - if (!(path2 && path2.length)) - return path1; - if (getRootLength(path2) !== 0) - return path2; - if (path1.charAt(path1.length - 1) === ts.directorySeparator) - return path1 + path2; - return path1 + ts.directorySeparator + path2; - } - ts.combinePaths = combinePaths; - function fileExtensionIs(path, extension) { - var pathLen = path.length; - var extLen = extension.length; - return pathLen > extLen && path.substr(pathLen - extLen, extLen) === extension; - } - ts.fileExtensionIs = fileExtensionIs; - /** - * List of supported extensions in order of file resolution precedence. - */ - ts.supportedExtensions = [".ts", ".d.ts"]; - var extensionsToRemove = [".d.ts", ".ts", ".js"]; - function removeFileExtension(path) { - for (var _i = 0; _i < extensionsToRemove.length; _i++) { - var ext = extensionsToRemove[_i]; - if (fileExtensionIs(path, ext)) { - return path.substr(0, path.length - ext.length); - } - } - return path; - } - ts.removeFileExtension = removeFileExtension; - var backslashOrDoubleQuote = /[\"\\]/g; - var escapedCharsRegExp = /[\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; - var escapedCharsMap = { - "\0": "\\0", - "\t": "\\t", - "\v": "\\v", - "\f": "\\f", - "\b": "\\b", - "\r": "\\r", - "\n": "\\n", - "\\": "\\\\", - "\"": "\\\"", - "\u2028": "\\u2028", - "\u2029": "\\u2029", - "\u0085": "\\u0085" // nextLine - }; - function Symbol(flags, name) { - this.flags = flags; - this.name = name; - this.declarations = undefined; - } - function Type(checker, flags) { - this.flags = flags; - } - function Signature(checker) { - } - ts.objectAllocator = { - getNodeConstructor: function (kind) { - function Node() { - } - Node.prototype = { - kind: kind, - pos: 0, - end: 0, - flags: 0, - parent: undefined - }; - return Node; - }, - getSymbolConstructor: function () { return Symbol; }, - getTypeConstructor: function () { return Type; }, - getSignatureConstructor: function () { return Signature; } - }; - (function (AssertionLevel) { - AssertionLevel[AssertionLevel["None"] = 0] = "None"; - AssertionLevel[AssertionLevel["Normal"] = 1] = "Normal"; - AssertionLevel[AssertionLevel["Aggressive"] = 2] = "Aggressive"; - AssertionLevel[AssertionLevel["VeryAggressive"] = 3] = "VeryAggressive"; - })(ts.AssertionLevel || (ts.AssertionLevel = {})); - var AssertionLevel = ts.AssertionLevel; - var Debug; - (function (Debug) { - var currentAssertionLevel = 0 /* None */; - function shouldAssert(level) { - return currentAssertionLevel >= level; - } - Debug.shouldAssert = shouldAssert; - function assert(expression, message, verboseDebugInfo) { - if (!expression) { - var verboseDebugString = ""; - if (verboseDebugInfo) { - verboseDebugString = "\r\nVerbose Debug Information: " + verboseDebugInfo(); - } - throw new Error("Debug Failure. False expression: " + (message || "") + verboseDebugString); - } - } - Debug.assert = assert; - function fail(message) { - Debug.assert(false, message); - } - Debug.fail = fail; - })(Debug = ts.Debug || (ts.Debug = {})); -})(ts || (ts = {})); -/// -var ts; -(function (ts) { - ts.sys = (function () { - function getWScriptSystem() { - var fso = new ActiveXObject("Scripting.FileSystemObject"); - var fileStream = new ActiveXObject("ADODB.Stream"); - fileStream.Type = 2 /*text*/; - var binaryStream = new ActiveXObject("ADODB.Stream"); - binaryStream.Type = 1 /*binary*/; - var args = []; - for (var i = 0; i < WScript.Arguments.length; i++) { - args[i] = WScript.Arguments.Item(i); - } - function readFile(fileName, encoding) { - if (!fso.FileExists(fileName)) { - return undefined; - } - fileStream.Open(); - try { - if (encoding) { - fileStream.Charset = encoding; - fileStream.LoadFromFile(fileName); - } - else { - // Load file and read the first two bytes into a string with no interpretation - fileStream.Charset = "x-ansi"; - fileStream.LoadFromFile(fileName); - var bom = fileStream.ReadText(2) || ""; - // Position must be at 0 before encoding can be changed - fileStream.Position = 0; - // [0xFF,0xFE] and [0xFE,0xFF] mean utf-16 (little or big endian), otherwise default to utf-8 - fileStream.Charset = bom.length >= 2 && (bom.charCodeAt(0) === 0xFF && bom.charCodeAt(1) === 0xFE || bom.charCodeAt(0) === 0xFE && bom.charCodeAt(1) === 0xFF) ? "unicode" : "utf-8"; - } - // ReadText method always strips byte order mark from resulting string - return fileStream.ReadText(); - } - catch (e) { - throw e; - } - finally { - fileStream.Close(); - } - } - function writeFile(fileName, data, writeByteOrderMark) { - fileStream.Open(); - binaryStream.Open(); - try { - // Write characters in UTF-8 encoding - fileStream.Charset = "utf-8"; - fileStream.WriteText(data); - // If we don't want the BOM, then skip it by setting the starting location to 3 (size of BOM). - // If not, start from position 0, as the BOM will be added automatically when charset==utf8. - if (writeByteOrderMark) { - fileStream.Position = 0; - } - else { - fileStream.Position = 3; - } - fileStream.CopyTo(binaryStream); - binaryStream.SaveToFile(fileName, 2 /*overwrite*/); - } - finally { - binaryStream.Close(); - fileStream.Close(); - } - } - function getCanonicalPath(path) { - return path.toLowerCase(); - } - function getNames(collection) { - var result = []; - for (var e = new Enumerator(collection); !e.atEnd(); e.moveNext()) { - result.push(e.item().Name); - } - return result.sort(); - } - function readDirectory(path, extension, exclude) { - var result = []; - exclude = ts.map(exclude, function (s) { return getCanonicalPath(ts.combinePaths(path, s)); }); - visitDirectory(path); - return result; - function visitDirectory(path) { - var folder = fso.GetFolder(path || "."); - var files = getNames(folder.files); - for (var _i = 0; _i < files.length; _i++) { - var current = files[_i]; - var name_1 = ts.combinePaths(path, current); - if ((!extension || ts.fileExtensionIs(name_1, extension)) && !ts.contains(exclude, getCanonicalPath(name_1))) { - result.push(name_1); - } - } - var subfolders = getNames(folder.subfolders); - for (var _a = 0; _a < subfolders.length; _a++) { - var current = subfolders[_a]; - var name_2 = ts.combinePaths(path, current); - if (!ts.contains(exclude, getCanonicalPath(name_2))) { - visitDirectory(name_2); - } - } - } - } - return { - args: args, - newLine: "\r\n", - useCaseSensitiveFileNames: false, - write: function (s) { - WScript.StdOut.Write(s); - }, - readFile: readFile, - writeFile: writeFile, - resolvePath: function (path) { - return fso.GetAbsolutePathName(path); - }, - fileExists: function (path) { - return fso.FileExists(path); - }, - directoryExists: function (path) { - return fso.FolderExists(path); - }, - createDirectory: function (directoryName) { - if (!this.directoryExists(directoryName)) { - fso.CreateFolder(directoryName); - } - }, - getExecutingFilePath: function () { - return WScript.ScriptFullName; - }, - getCurrentDirectory: function () { - return new ActiveXObject("WScript.Shell").CurrentDirectory; - }, - readDirectory: readDirectory, - exit: function (exitCode) { - try { - WScript.Quit(exitCode); - } - catch (e) { - } - } - }; - } - function getNodeSystem() { - var _fs = require("fs"); - var _path = require("path"); - var _os = require('os'); - var platform = _os.platform(); - // win32\win64 are case insensitive platforms, MacOS (darwin) by default is also case insensitive - var useCaseSensitiveFileNames = platform !== "win32" && platform !== "win64" && platform !== "darwin"; - function readFile(fileName, encoding) { - if (!_fs.existsSync(fileName)) { - return undefined; - } - var buffer = _fs.readFileSync(fileName); - var len = buffer.length; - if (len >= 2 && buffer[0] === 0xFE && buffer[1] === 0xFF) { - // Big endian UTF-16 byte order mark detected. Since big endian is not supported by node.js, - // flip all byte pairs and treat as little endian. - len &= ~1; - for (var i = 0; i < len; i += 2) { - var temp = buffer[i]; - buffer[i] = buffer[i + 1]; - buffer[i + 1] = temp; - } - return buffer.toString("utf16le", 2); - } - if (len >= 2 && buffer[0] === 0xFF && buffer[1] === 0xFE) { - // Little endian UTF-16 byte order mark detected - return buffer.toString("utf16le", 2); - } - if (len >= 3 && buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) { - // UTF-8 byte order mark detected - return buffer.toString("utf8", 3); - } - // Default is UTF-8 with no byte order mark - return buffer.toString("utf8"); - } - function writeFile(fileName, data, writeByteOrderMark) { - // If a BOM is required, emit one - if (writeByteOrderMark) { - data = '\uFEFF' + data; - } - _fs.writeFileSync(fileName, data, "utf8"); - } - function getCanonicalPath(path) { - return useCaseSensitiveFileNames ? path.toLowerCase() : path; - } - function readDirectory(path, extension, exclude) { - var result = []; - exclude = ts.map(exclude, function (s) { return getCanonicalPath(ts.combinePaths(path, s)); }); - visitDirectory(path); - return result; - function visitDirectory(path) { - var files = _fs.readdirSync(path || ".").sort(); - var directories = []; - for (var _i = 0; _i < files.length; _i++) { - var current = files[_i]; - var name = ts.combinePaths(path, current); - if (!ts.contains(exclude, getCanonicalPath(name))) { - var stat = _fs.statSync(name); - if (stat.isFile()) { - if (!extension || ts.fileExtensionIs(name, extension)) { - result.push(name); - } - } - else if (stat.isDirectory()) { - directories.push(name); - } - } - } - for (var _a = 0; _a < directories.length; _a++) { - var current = directories[_a]; - visitDirectory(current); - } - } - } - return { - args: process.argv.slice(2), - newLine: _os.EOL, - useCaseSensitiveFileNames: useCaseSensitiveFileNames, - write: function (s) { - // 1 is a standard descriptor for stdout - _fs.writeSync(1, s); - }, - readFile: readFile, - writeFile: writeFile, - watchFile: function (fileName, callback) { - // watchFile polls a file every 250ms, picking up file notifications. - _fs.watchFile(fileName, { persistent: true, interval: 250 }, fileChanged); - return { - close: function () { _fs.unwatchFile(fileName, fileChanged); } - }; - function fileChanged(curr, prev) { - if (+curr.mtime <= +prev.mtime) { - return; - } - callback(fileName); - } - ; - }, - resolvePath: function (path) { - return _path.resolve(path); - }, - fileExists: function (path) { - return _fs.existsSync(path); - }, - directoryExists: function (path) { - return _fs.existsSync(path) && _fs.statSync(path).isDirectory(); - }, - createDirectory: function (directoryName) { - if (!this.directoryExists(directoryName)) { - _fs.mkdirSync(directoryName); - } - }, - getExecutingFilePath: function () { - return __filename; - }, - getCurrentDirectory: function () { - return process.cwd(); - }, - readDirectory: readDirectory, - getMemoryUsage: function () { - if (global.gc) { - global.gc(); - } - return process.memoryUsage().heapUsed; - }, - exit: function (exitCode) { - process.exit(exitCode); - } - }; - } - if (typeof WScript !== "undefined" && typeof ActiveXObject === "function") { - return getWScriptSystem(); - } - else if (typeof module !== "undefined" && module.exports) { - return getNodeSystem(); - } - else { - return undefined; // Unsupported host - } - })(); -})(ts || (ts = {})); -// -/// -/* @internal */ -var ts; -(function (ts) { - ts.Diagnostics = { - Unterminated_string_literal: { code: 1002, category: ts.DiagnosticCategory.Error, key: "Unterminated string literal." }, - Identifier_expected: { code: 1003, category: ts.DiagnosticCategory.Error, key: "Identifier expected." }, - _0_expected: { code: 1005, category: ts.DiagnosticCategory.Error, key: "'{0}' expected." }, - A_file_cannot_have_a_reference_to_itself: { code: 1006, category: ts.DiagnosticCategory.Error, key: "A file cannot have a reference to itself." }, - Trailing_comma_not_allowed: { code: 1009, category: ts.DiagnosticCategory.Error, key: "Trailing comma not allowed." }, - Asterisk_Slash_expected: { code: 1010, category: ts.DiagnosticCategory.Error, key: "'*/' expected." }, - Unexpected_token: { code: 1012, category: ts.DiagnosticCategory.Error, key: "Unexpected token." }, - A_rest_parameter_must_be_last_in_a_parameter_list: { code: 1014, category: ts.DiagnosticCategory.Error, key: "A rest parameter must be last in a parameter list." }, - Parameter_cannot_have_question_mark_and_initializer: { code: 1015, category: ts.DiagnosticCategory.Error, key: "Parameter cannot have question mark and initializer." }, - A_required_parameter_cannot_follow_an_optional_parameter: { code: 1016, category: ts.DiagnosticCategory.Error, key: "A required parameter cannot follow an optional parameter." }, - An_index_signature_cannot_have_a_rest_parameter: { code: 1017, category: ts.DiagnosticCategory.Error, key: "An index signature cannot have a rest parameter." }, - An_index_signature_parameter_cannot_have_an_accessibility_modifier: { code: 1018, category: ts.DiagnosticCategory.Error, key: "An index signature parameter cannot have an accessibility modifier." }, - An_index_signature_parameter_cannot_have_a_question_mark: { code: 1019, category: ts.DiagnosticCategory.Error, key: "An index signature parameter cannot have a question mark." }, - An_index_signature_parameter_cannot_have_an_initializer: { code: 1020, category: ts.DiagnosticCategory.Error, key: "An index signature parameter cannot have an initializer." }, - An_index_signature_must_have_a_type_annotation: { code: 1021, category: ts.DiagnosticCategory.Error, key: "An index signature must have a type annotation." }, - An_index_signature_parameter_must_have_a_type_annotation: { code: 1022, category: ts.DiagnosticCategory.Error, key: "An index signature parameter must have a type annotation." }, - An_index_signature_parameter_type_must_be_string_or_number: { code: 1023, category: ts.DiagnosticCategory.Error, key: "An index signature parameter type must be 'string' or 'number'." }, - A_class_or_interface_declaration_can_only_have_one_extends_clause: { code: 1024, category: ts.DiagnosticCategory.Error, key: "A class or interface declaration can only have one 'extends' clause." }, - An_extends_clause_must_precede_an_implements_clause: { code: 1025, category: ts.DiagnosticCategory.Error, key: "An 'extends' clause must precede an 'implements' clause." }, - A_class_can_only_extend_a_single_class: { code: 1026, category: ts.DiagnosticCategory.Error, key: "A class can only extend a single class." }, - A_class_declaration_can_only_have_one_implements_clause: { code: 1027, category: ts.DiagnosticCategory.Error, key: "A class declaration can only have one 'implements' clause." }, - Accessibility_modifier_already_seen: { code: 1028, category: ts.DiagnosticCategory.Error, key: "Accessibility modifier already seen." }, - _0_modifier_must_precede_1_modifier: { code: 1029, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier must precede '{1}' modifier." }, - _0_modifier_already_seen: { code: 1030, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier already seen." }, - _0_modifier_cannot_appear_on_a_class_element: { code: 1031, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a class element." }, - An_interface_declaration_cannot_have_an_implements_clause: { code: 1032, category: ts.DiagnosticCategory.Error, key: "An interface declaration cannot have an 'implements' clause." }, - super_must_be_followed_by_an_argument_list_or_member_access: { code: 1034, category: ts.DiagnosticCategory.Error, key: "'super' must be followed by an argument list or member access." }, - Only_ambient_modules_can_use_quoted_names: { code: 1035, category: ts.DiagnosticCategory.Error, key: "Only ambient modules can use quoted names." }, - Statements_are_not_allowed_in_ambient_contexts: { code: 1036, category: ts.DiagnosticCategory.Error, key: "Statements are not allowed in ambient contexts." }, - A_declare_modifier_cannot_be_used_in_an_already_ambient_context: { code: 1038, category: ts.DiagnosticCategory.Error, key: "A 'declare' modifier cannot be used in an already ambient context." }, - Initializers_are_not_allowed_in_ambient_contexts: { code: 1039, category: ts.DiagnosticCategory.Error, key: "Initializers are not allowed in ambient contexts." }, - _0_modifier_cannot_appear_on_a_module_element: { code: 1044, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a module element." }, - A_declare_modifier_cannot_be_used_with_an_interface_declaration: { code: 1045, category: ts.DiagnosticCategory.Error, key: "A 'declare' modifier cannot be used with an interface declaration." }, - A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file: { code: 1046, category: ts.DiagnosticCategory.Error, key: "A 'declare' modifier is required for a top level declaration in a .d.ts file." }, - A_rest_parameter_cannot_be_optional: { code: 1047, category: ts.DiagnosticCategory.Error, key: "A rest parameter cannot be optional." }, - A_rest_parameter_cannot_have_an_initializer: { code: 1048, category: ts.DiagnosticCategory.Error, key: "A rest parameter cannot have an initializer." }, - A_set_accessor_must_have_exactly_one_parameter: { code: 1049, category: ts.DiagnosticCategory.Error, key: "A 'set' accessor must have exactly one parameter." }, - A_set_accessor_cannot_have_an_optional_parameter: { code: 1051, category: ts.DiagnosticCategory.Error, key: "A 'set' accessor cannot have an optional parameter." }, - A_set_accessor_parameter_cannot_have_an_initializer: { code: 1052, category: ts.DiagnosticCategory.Error, key: "A 'set' accessor parameter cannot have an initializer." }, - A_set_accessor_cannot_have_rest_parameter: { code: 1053, category: ts.DiagnosticCategory.Error, key: "A 'set' accessor cannot have rest parameter." }, - A_get_accessor_cannot_have_parameters: { code: 1054, category: ts.DiagnosticCategory.Error, key: "A 'get' accessor cannot have parameters." }, - Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1056, category: ts.DiagnosticCategory.Error, key: "Accessors are only available when targeting ECMAScript 5 and higher." }, - Enum_member_must_have_initializer: { code: 1061, category: ts.DiagnosticCategory.Error, key: "Enum member must have initializer." }, - An_export_assignment_cannot_be_used_in_a_namespace: { code: 1063, category: ts.DiagnosticCategory.Error, key: "An export assignment cannot be used in a namespace." }, - Ambient_enum_elements_can_only_have_integer_literal_initializers: { code: 1066, category: ts.DiagnosticCategory.Error, key: "Ambient enum elements can only have integer literal initializers." }, - Unexpected_token_A_constructor_method_accessor_or_property_was_expected: { code: 1068, category: ts.DiagnosticCategory.Error, key: "Unexpected token. A constructor, method, accessor, or property was expected." }, - A_declare_modifier_cannot_be_used_with_an_import_declaration: { code: 1079, category: ts.DiagnosticCategory.Error, key: "A 'declare' modifier cannot be used with an import declaration." }, - Invalid_reference_directive_syntax: { code: 1084, category: ts.DiagnosticCategory.Error, key: "Invalid 'reference' directive syntax." }, - Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher: { code: 1085, category: ts.DiagnosticCategory.Error, key: "Octal literals are not available when targeting ECMAScript 5 and higher." }, - An_accessor_cannot_be_declared_in_an_ambient_context: { code: 1086, category: ts.DiagnosticCategory.Error, key: "An accessor cannot be declared in an ambient context." }, - _0_modifier_cannot_appear_on_a_constructor_declaration: { code: 1089, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a constructor declaration." }, - _0_modifier_cannot_appear_on_a_parameter: { code: 1090, category: ts.DiagnosticCategory.Error, key: "'{0}' modifier cannot appear on a parameter." }, - Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: { code: 1091, category: ts.DiagnosticCategory.Error, key: "Only a single variable declaration is allowed in a 'for...in' statement." }, - Type_parameters_cannot_appear_on_a_constructor_declaration: { code: 1092, category: ts.DiagnosticCategory.Error, key: "Type parameters cannot appear on a constructor declaration." }, - Type_annotation_cannot_appear_on_a_constructor_declaration: { code: 1093, category: ts.DiagnosticCategory.Error, key: "Type annotation cannot appear on a constructor declaration." }, - An_accessor_cannot_have_type_parameters: { code: 1094, category: ts.DiagnosticCategory.Error, key: "An accessor cannot have type parameters." }, - A_set_accessor_cannot_have_a_return_type_annotation: { code: 1095, category: ts.DiagnosticCategory.Error, key: "A 'set' accessor cannot have a return type annotation." }, - An_index_signature_must_have_exactly_one_parameter: { code: 1096, category: ts.DiagnosticCategory.Error, key: "An index signature must have exactly one parameter." }, - _0_list_cannot_be_empty: { code: 1097, category: ts.DiagnosticCategory.Error, key: "'{0}' list cannot be empty." }, - Type_parameter_list_cannot_be_empty: { code: 1098, category: ts.DiagnosticCategory.Error, key: "Type parameter list cannot be empty." }, - Type_argument_list_cannot_be_empty: { code: 1099, category: ts.DiagnosticCategory.Error, key: "Type argument list cannot be empty." }, - Invalid_use_of_0_in_strict_mode: { code: 1100, category: ts.DiagnosticCategory.Error, key: "Invalid use of '{0}' in strict mode." }, - with_statements_are_not_allowed_in_strict_mode: { code: 1101, category: ts.DiagnosticCategory.Error, key: "'with' statements are not allowed in strict mode." }, - delete_cannot_be_called_on_an_identifier_in_strict_mode: { code: 1102, category: ts.DiagnosticCategory.Error, key: "'delete' cannot be called on an identifier in strict mode." }, - A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: { code: 1104, category: ts.DiagnosticCategory.Error, key: "A 'continue' statement can only be used within an enclosing iteration statement." }, - A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: { code: 1105, category: ts.DiagnosticCategory.Error, key: "A 'break' statement can only be used within an enclosing iteration or switch statement." }, - Jump_target_cannot_cross_function_boundary: { code: 1107, category: ts.DiagnosticCategory.Error, key: "Jump target cannot cross function boundary." }, - A_return_statement_can_only_be_used_within_a_function_body: { code: 1108, category: ts.DiagnosticCategory.Error, key: "A 'return' statement can only be used within a function body." }, - Expression_expected: { code: 1109, category: ts.DiagnosticCategory.Error, key: "Expression expected." }, - Type_expected: { code: 1110, category: ts.DiagnosticCategory.Error, key: "Type expected." }, - A_class_member_cannot_be_declared_optional: { code: 1112, category: ts.DiagnosticCategory.Error, key: "A class member cannot be declared optional." }, - A_default_clause_cannot_appear_more_than_once_in_a_switch_statement: { code: 1113, category: ts.DiagnosticCategory.Error, key: "A 'default' clause cannot appear more than once in a 'switch' statement." }, - Duplicate_label_0: { code: 1114, category: ts.DiagnosticCategory.Error, key: "Duplicate label '{0}'" }, - A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement: { code: 1115, category: ts.DiagnosticCategory.Error, key: "A 'continue' statement can only jump to a label of an enclosing iteration statement." }, - A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement: { code: 1116, category: ts.DiagnosticCategory.Error, key: "A 'break' statement can only jump to a label of an enclosing statement." }, - An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode: { code: 1117, category: ts.DiagnosticCategory.Error, key: "An object literal cannot have multiple properties with the same name in strict mode." }, - An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: { code: 1118, category: ts.DiagnosticCategory.Error, key: "An object literal cannot have multiple get/set accessors with the same name." }, - An_object_literal_cannot_have_property_and_accessor_with_the_same_name: { code: 1119, category: ts.DiagnosticCategory.Error, key: "An object literal cannot have property and accessor with the same name." }, - An_export_assignment_cannot_have_modifiers: { code: 1120, category: ts.DiagnosticCategory.Error, key: "An export assignment cannot have modifiers." }, - Octal_literals_are_not_allowed_in_strict_mode: { code: 1121, category: ts.DiagnosticCategory.Error, key: "Octal literals are not allowed in strict mode." }, - A_tuple_type_element_list_cannot_be_empty: { code: 1122, category: ts.DiagnosticCategory.Error, key: "A tuple type element list cannot be empty." }, - Variable_declaration_list_cannot_be_empty: { code: 1123, category: ts.DiagnosticCategory.Error, key: "Variable declaration list cannot be empty." }, - Digit_expected: { code: 1124, category: ts.DiagnosticCategory.Error, key: "Digit expected." }, - Hexadecimal_digit_expected: { code: 1125, category: ts.DiagnosticCategory.Error, key: "Hexadecimal digit expected." }, - Unexpected_end_of_text: { code: 1126, category: ts.DiagnosticCategory.Error, key: "Unexpected end of text." }, - Invalid_character: { code: 1127, category: ts.DiagnosticCategory.Error, key: "Invalid character." }, - Declaration_or_statement_expected: { code: 1128, category: ts.DiagnosticCategory.Error, key: "Declaration or statement expected." }, - Statement_expected: { code: 1129, category: ts.DiagnosticCategory.Error, key: "Statement expected." }, - case_or_default_expected: { code: 1130, category: ts.DiagnosticCategory.Error, key: "'case' or 'default' expected." }, - Property_or_signature_expected: { code: 1131, category: ts.DiagnosticCategory.Error, key: "Property or signature expected." }, - Enum_member_expected: { code: 1132, category: ts.DiagnosticCategory.Error, key: "Enum member expected." }, - Type_reference_expected: { code: 1133, category: ts.DiagnosticCategory.Error, key: "Type reference expected." }, - Variable_declaration_expected: { code: 1134, category: ts.DiagnosticCategory.Error, key: "Variable declaration expected." }, - Argument_expression_expected: { code: 1135, category: ts.DiagnosticCategory.Error, key: "Argument expression expected." }, - Property_assignment_expected: { code: 1136, category: ts.DiagnosticCategory.Error, key: "Property assignment expected." }, - Expression_or_comma_expected: { code: 1137, category: ts.DiagnosticCategory.Error, key: "Expression or comma expected." }, - Parameter_declaration_expected: { code: 1138, category: ts.DiagnosticCategory.Error, key: "Parameter declaration expected." }, - Type_parameter_declaration_expected: { code: 1139, category: ts.DiagnosticCategory.Error, key: "Type parameter declaration expected." }, - Type_argument_expected: { code: 1140, category: ts.DiagnosticCategory.Error, key: "Type argument expected." }, - String_literal_expected: { code: 1141, category: ts.DiagnosticCategory.Error, key: "String literal expected." }, - Line_break_not_permitted_here: { code: 1142, category: ts.DiagnosticCategory.Error, key: "Line break not permitted here." }, - or_expected: { code: 1144, category: ts.DiagnosticCategory.Error, key: "'{' or ';' expected." }, - Modifiers_not_permitted_on_index_signature_members: { code: 1145, category: ts.DiagnosticCategory.Error, key: "Modifiers not permitted on index signature members." }, - Declaration_expected: { code: 1146, category: ts.DiagnosticCategory.Error, key: "Declaration expected." }, - Import_declarations_in_a_namespace_cannot_reference_a_module: { code: 1147, category: ts.DiagnosticCategory.Error, key: "Import declarations in a namespace cannot reference a module." }, - Cannot_compile_modules_unless_the_module_flag_is_provided: { code: 1148, category: ts.DiagnosticCategory.Error, key: "Cannot compile modules unless the '--module' flag is provided." }, - File_name_0_differs_from_already_included_file_name_1_only_in_casing: { code: 1149, category: ts.DiagnosticCategory.Error, key: "File name '{0}' differs from already included file name '{1}' only in casing" }, - new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead: { code: 1150, category: ts.DiagnosticCategory.Error, key: "'new T[]' cannot be used to create an array. Use 'new Array()' instead." }, - var_let_or_const_expected: { code: 1152, category: ts.DiagnosticCategory.Error, key: "'var', 'let' or 'const' expected." }, - let_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1153, category: ts.DiagnosticCategory.Error, key: "'let' declarations are only available when targeting ECMAScript 6 and higher." }, - const_declarations_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1154, category: ts.DiagnosticCategory.Error, key: "'const' declarations are only available when targeting ECMAScript 6 and higher." }, - const_declarations_must_be_initialized: { code: 1155, category: ts.DiagnosticCategory.Error, key: "'const' declarations must be initialized" }, - const_declarations_can_only_be_declared_inside_a_block: { code: 1156, category: ts.DiagnosticCategory.Error, key: "'const' declarations can only be declared inside a block." }, - let_declarations_can_only_be_declared_inside_a_block: { code: 1157, category: ts.DiagnosticCategory.Error, key: "'let' declarations can only be declared inside a block." }, - Unterminated_template_literal: { code: 1160, category: ts.DiagnosticCategory.Error, key: "Unterminated template literal." }, - Unterminated_regular_expression_literal: { code: 1161, category: ts.DiagnosticCategory.Error, key: "Unterminated regular expression literal." }, - An_object_member_cannot_be_declared_optional: { code: 1162, category: ts.DiagnosticCategory.Error, key: "An object member cannot be declared optional." }, - A_yield_expression_is_only_allowed_in_a_generator_body: { code: 1163, category: ts.DiagnosticCategory.Error, key: "A 'yield' expression is only allowed in a generator body." }, - Computed_property_names_are_not_allowed_in_enums: { code: 1164, category: ts.DiagnosticCategory.Error, key: "Computed property names are not allowed in enums." }, - A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_symbol: { code: 1165, category: ts.DiagnosticCategory.Error, key: "A computed property name in an ambient context must directly refer to a built-in symbol." }, - A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol: { code: 1166, category: ts.DiagnosticCategory.Error, key: "A computed property name in a class property declaration must directly refer to a built-in symbol." }, - Computed_property_names_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1167, category: ts.DiagnosticCategory.Error, key: "Computed property names are only available when targeting ECMAScript 6 and higher." }, - A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol: { code: 1168, category: ts.DiagnosticCategory.Error, key: "A computed property name in a method overload must directly refer to a built-in symbol." }, - A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol: { code: 1169, category: ts.DiagnosticCategory.Error, key: "A computed property name in an interface must directly refer to a built-in symbol." }, - A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol: { code: 1170, category: ts.DiagnosticCategory.Error, key: "A computed property name in a type literal must directly refer to a built-in symbol." }, - A_comma_expression_is_not_allowed_in_a_computed_property_name: { code: 1171, category: ts.DiagnosticCategory.Error, key: "A comma expression is not allowed in a computed property name." }, - extends_clause_already_seen: { code: 1172, category: ts.DiagnosticCategory.Error, key: "'extends' clause already seen." }, - extends_clause_must_precede_implements_clause: { code: 1173, category: ts.DiagnosticCategory.Error, key: "'extends' clause must precede 'implements' clause." }, - Classes_can_only_extend_a_single_class: { code: 1174, category: ts.DiagnosticCategory.Error, key: "Classes can only extend a single class." }, - implements_clause_already_seen: { code: 1175, category: ts.DiagnosticCategory.Error, key: "'implements' clause already seen." }, - Interface_declaration_cannot_have_implements_clause: { code: 1176, category: ts.DiagnosticCategory.Error, key: "Interface declaration cannot have 'implements' clause." }, - Binary_digit_expected: { code: 1177, category: ts.DiagnosticCategory.Error, key: "Binary digit expected." }, - Octal_digit_expected: { code: 1178, category: ts.DiagnosticCategory.Error, key: "Octal digit expected." }, - Unexpected_token_expected: { code: 1179, category: ts.DiagnosticCategory.Error, key: "Unexpected token. '{' expected." }, - Property_destructuring_pattern_expected: { code: 1180, category: ts.DiagnosticCategory.Error, key: "Property destructuring pattern expected." }, - Array_element_destructuring_pattern_expected: { code: 1181, category: ts.DiagnosticCategory.Error, key: "Array element destructuring pattern expected." }, - A_destructuring_declaration_must_have_an_initializer: { code: 1182, category: ts.DiagnosticCategory.Error, key: "A destructuring declaration must have an initializer." }, - Destructuring_declarations_are_not_allowed_in_ambient_contexts: { code: 1183, category: ts.DiagnosticCategory.Error, key: "Destructuring declarations are not allowed in ambient contexts." }, - An_implementation_cannot_be_declared_in_ambient_contexts: { code: 1184, category: ts.DiagnosticCategory.Error, key: "An implementation cannot be declared in ambient contexts." }, - Modifiers_cannot_appear_here: { code: 1184, category: ts.DiagnosticCategory.Error, key: "Modifiers cannot appear here." }, - Merge_conflict_marker_encountered: { code: 1185, category: ts.DiagnosticCategory.Error, key: "Merge conflict marker encountered." }, - A_rest_element_cannot_have_an_initializer: { code: 1186, category: ts.DiagnosticCategory.Error, key: "A rest element cannot have an initializer." }, - A_parameter_property_may_not_be_a_binding_pattern: { code: 1187, category: ts.DiagnosticCategory.Error, key: "A parameter property may not be a binding pattern." }, - Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement: { code: 1188, category: ts.DiagnosticCategory.Error, key: "Only a single variable declaration is allowed in a 'for...of' statement." }, - The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer: { code: 1189, category: ts.DiagnosticCategory.Error, key: "The variable declaration of a 'for...in' statement cannot have an initializer." }, - The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer: { code: 1190, category: ts.DiagnosticCategory.Error, key: "The variable declaration of a 'for...of' statement cannot have an initializer." }, - An_import_declaration_cannot_have_modifiers: { code: 1191, category: ts.DiagnosticCategory.Error, key: "An import declaration cannot have modifiers." }, - Module_0_has_no_default_export: { code: 1192, category: ts.DiagnosticCategory.Error, key: "Module '{0}' has no default export." }, - An_export_declaration_cannot_have_modifiers: { code: 1193, category: ts.DiagnosticCategory.Error, key: "An export declaration cannot have modifiers." }, - Export_declarations_are_not_permitted_in_a_namespace: { code: 1194, category: ts.DiagnosticCategory.Error, key: "Export declarations are not permitted in a namespace." }, - Catch_clause_variable_name_must_be_an_identifier: { code: 1195, category: ts.DiagnosticCategory.Error, key: "Catch clause variable name must be an identifier." }, - Catch_clause_variable_cannot_have_a_type_annotation: { code: 1196, category: ts.DiagnosticCategory.Error, key: "Catch clause variable cannot have a type annotation." }, - Catch_clause_variable_cannot_have_an_initializer: { code: 1197, category: ts.DiagnosticCategory.Error, key: "Catch clause variable cannot have an initializer." }, - An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive: { code: 1198, category: ts.DiagnosticCategory.Error, key: "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive." }, - Unterminated_Unicode_escape_sequence: { code: 1199, category: ts.DiagnosticCategory.Error, key: "Unterminated Unicode escape sequence." }, - Line_terminator_not_permitted_before_arrow: { code: 1200, category: ts.DiagnosticCategory.Error, key: "Line terminator not permitted before arrow." }, - Import_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_or_import_d_from_mod_instead: { code: 1202, category: ts.DiagnosticCategory.Error, key: "Import assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"' or 'import d from \"mod\"' instead." }, - Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_export_default_instead: { code: 1203, category: ts.DiagnosticCategory.Error, key: "Export assignment cannot be used when targeting ECMAScript 6 or higher. Consider using 'export default' instead." }, - Cannot_compile_modules_into_commonjs_amd_system_or_umd_when_targeting_ES6_or_higher: { code: 1204, category: ts.DiagnosticCategory.Error, key: "Cannot compile modules into 'commonjs', 'amd', 'system' or 'umd' when targeting 'ES6' or higher." }, - Decorators_are_only_available_when_targeting_ECMAScript_5_and_higher: { code: 1205, category: ts.DiagnosticCategory.Error, key: "Decorators are only available when targeting ECMAScript 5 and higher." }, - Decorators_are_not_valid_here: { code: 1206, category: ts.DiagnosticCategory.Error, key: "Decorators are not valid here." }, - Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: { code: 1207, category: ts.DiagnosticCategory.Error, key: "Decorators cannot be applied to multiple get/set accessors of the same name." }, - Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided: { code: 1208, category: ts.DiagnosticCategory.Error, key: "Cannot compile namespaces when the '--isolatedModules' flag is provided." }, - Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided: { code: 1209, category: ts.DiagnosticCategory.Error, key: "Ambient const enums are not allowed when the '--isolatedModules' flag is provided." }, - Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: { code: 1210, category: ts.DiagnosticCategory.Error, key: "Invalid use of '{0}'. Class definitions are automatically in strict mode." }, - A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: ts.DiagnosticCategory.Error, key: "A class declaration without the 'default' modifier must have a name" }, - Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: ts.DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode" }, - Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1213, category: ts.DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." }, - Type_expected_0_is_a_reserved_word_in_strict_mode: { code: 1215, category: ts.DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode" }, - Type_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1216, category: ts.DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." }, - Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: ts.DiagnosticCategory.Error, key: "Export assignment is not supported when '--module' flag is 'system'." }, - Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalDecorators_to_remove_this_warning: { code: 1219, category: ts.DiagnosticCategory.Error, key: "Experimental support for decorators is a feature that is subject to change in a future release. Specify '--experimentalDecorators' to remove this warning." }, - Generators_are_only_available_when_targeting_ECMAScript_6_or_higher: { code: 1220, category: ts.DiagnosticCategory.Error, key: "Generators are only available when targeting ECMAScript 6 or higher." }, - Generators_are_not_allowed_in_an_ambient_context: { code: 1221, category: ts.DiagnosticCategory.Error, key: "Generators are not allowed in an ambient context." }, - An_overload_signature_cannot_be_declared_as_a_generator: { code: 1222, category: ts.DiagnosticCategory.Error, key: "An overload signature cannot be declared as a generator." }, - _0_tag_already_specified: { code: 1223, category: ts.DiagnosticCategory.Error, key: "'{0}' tag already specified." }, - Signature_0_must_have_a_type_predicate: { code: 1224, category: ts.DiagnosticCategory.Error, key: "Signature '{0}' must have a type predicate." }, - Cannot_find_parameter_0: { code: 1225, category: ts.DiagnosticCategory.Error, key: "Cannot find parameter '{0}'." }, - Type_predicate_0_is_not_assignable_to_1: { code: 1226, category: ts.DiagnosticCategory.Error, key: "Type predicate '{0}' is not assignable to '{1}'." }, - Parameter_0_is_not_in_the_same_position_as_parameter_1: { code: 1227, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' is not in the same position as parameter '{1}'." }, - A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: { code: 1228, category: ts.DiagnosticCategory.Error, key: "A type predicate is only allowed in return type position for functions and methods." }, - A_type_predicate_cannot_reference_a_rest_parameter: { code: 1229, category: ts.DiagnosticCategory.Error, key: "A type predicate cannot reference a rest parameter." }, - A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: { code: 1230, category: ts.DiagnosticCategory.Error, key: "A type predicate cannot reference element '{0}' in a binding pattern." }, - An_export_assignment_can_only_be_used_in_a_module: { code: 1231, category: ts.DiagnosticCategory.Error, key: "An export assignment can only be used in a module." }, - An_import_declaration_can_only_be_used_in_a_namespace_or_module: { code: 1232, category: ts.DiagnosticCategory.Error, key: "An import declaration can only be used in a namespace or module." }, - An_export_declaration_can_only_be_used_in_a_module: { code: 1233, category: ts.DiagnosticCategory.Error, key: "An export declaration can only be used in a module." }, - An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: { code: 1234, category: ts.DiagnosticCategory.Error, key: "An ambient module declaration is only allowed at the top level in a file." }, - A_namespace_declaration_is_only_allowed_in_a_namespace_or_module: { code: 1235, category: ts.DiagnosticCategory.Error, key: "A namespace declaration is only allowed in a namespace or module." }, - Duplicate_identifier_0: { code: 2300, category: ts.DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." }, - Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: ts.DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." }, - Static_members_cannot_reference_class_type_parameters: { code: 2302, category: ts.DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." }, - Circular_definition_of_import_alias_0: { code: 2303, category: ts.DiagnosticCategory.Error, key: "Circular definition of import alias '{0}'." }, - Cannot_find_name_0: { code: 2304, category: ts.DiagnosticCategory.Error, key: "Cannot find name '{0}'." }, - Module_0_has_no_exported_member_1: { code: 2305, category: ts.DiagnosticCategory.Error, key: "Module '{0}' has no exported member '{1}'." }, - File_0_is_not_a_module: { code: 2306, category: ts.DiagnosticCategory.Error, key: "File '{0}' is not a module." }, - Cannot_find_module_0: { code: 2307, category: ts.DiagnosticCategory.Error, key: "Cannot find module '{0}'." }, - A_module_cannot_have_more_than_one_export_assignment: { code: 2308, category: ts.DiagnosticCategory.Error, key: "A module cannot have more than one export assignment." }, - An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: { code: 2309, category: ts.DiagnosticCategory.Error, key: "An export assignment cannot be used in a module with other exported elements." }, - Type_0_recursively_references_itself_as_a_base_type: { code: 2310, category: ts.DiagnosticCategory.Error, key: "Type '{0}' recursively references itself as a base type." }, - A_class_may_only_extend_another_class: { code: 2311, category: ts.DiagnosticCategory.Error, key: "A class may only extend another class." }, - An_interface_may_only_extend_a_class_or_another_interface: { code: 2312, category: ts.DiagnosticCategory.Error, key: "An interface may only extend a class or another interface." }, - Constraint_of_a_type_parameter_cannot_reference_any_type_parameter_from_the_same_type_parameter_list: { code: 2313, category: ts.DiagnosticCategory.Error, key: "Constraint of a type parameter cannot reference any type parameter from the same type parameter list." }, - Generic_type_0_requires_1_type_argument_s: { code: 2314, category: ts.DiagnosticCategory.Error, key: "Generic type '{0}' requires {1} type argument(s)." }, - Type_0_is_not_generic: { code: 2315, category: ts.DiagnosticCategory.Error, key: "Type '{0}' is not generic." }, - Global_type_0_must_be_a_class_or_interface_type: { code: 2316, category: ts.DiagnosticCategory.Error, key: "Global type '{0}' must be a class or interface type." }, - Global_type_0_must_have_1_type_parameter_s: { code: 2317, category: ts.DiagnosticCategory.Error, key: "Global type '{0}' must have {1} type parameter(s)." }, - Cannot_find_global_type_0: { code: 2318, category: ts.DiagnosticCategory.Error, key: "Cannot find global type '{0}'." }, - Named_property_0_of_types_1_and_2_are_not_identical: { code: 2319, category: ts.DiagnosticCategory.Error, key: "Named property '{0}' of types '{1}' and '{2}' are not identical." }, - Interface_0_cannot_simultaneously_extend_types_1_and_2: { code: 2320, category: ts.DiagnosticCategory.Error, key: "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'." }, - Excessive_stack_depth_comparing_types_0_and_1: { code: 2321, category: ts.DiagnosticCategory.Error, key: "Excessive stack depth comparing types '{0}' and '{1}'." }, - Type_0_is_not_assignable_to_type_1: { code: 2322, category: ts.DiagnosticCategory.Error, key: "Type '{0}' is not assignable to type '{1}'." }, - Property_0_is_missing_in_type_1: { code: 2324, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is missing in type '{1}'." }, - Property_0_is_private_in_type_1_but_not_in_type_2: { code: 2325, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is private in type '{1}' but not in type '{2}'." }, - Types_of_property_0_are_incompatible: { code: 2326, category: ts.DiagnosticCategory.Error, key: "Types of property '{0}' are incompatible." }, - Property_0_is_optional_in_type_1_but_required_in_type_2: { code: 2327, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is optional in type '{1}' but required in type '{2}'." }, - Types_of_parameters_0_and_1_are_incompatible: { code: 2328, category: ts.DiagnosticCategory.Error, key: "Types of parameters '{0}' and '{1}' are incompatible." }, - Index_signature_is_missing_in_type_0: { code: 2329, category: ts.DiagnosticCategory.Error, key: "Index signature is missing in type '{0}'." }, - Index_signatures_are_incompatible: { code: 2330, category: ts.DiagnosticCategory.Error, key: "Index signatures are incompatible." }, - this_cannot_be_referenced_in_a_module_or_namespace_body: { code: 2331, category: ts.DiagnosticCategory.Error, key: "'this' cannot be referenced in a module or namespace body." }, - this_cannot_be_referenced_in_current_location: { code: 2332, category: ts.DiagnosticCategory.Error, key: "'this' cannot be referenced in current location." }, - this_cannot_be_referenced_in_constructor_arguments: { code: 2333, category: ts.DiagnosticCategory.Error, key: "'this' cannot be referenced in constructor arguments." }, - this_cannot_be_referenced_in_a_static_property_initializer: { code: 2334, category: ts.DiagnosticCategory.Error, key: "'this' cannot be referenced in a static property initializer." }, - super_can_only_be_referenced_in_a_derived_class: { code: 2335, category: ts.DiagnosticCategory.Error, key: "'super' can only be referenced in a derived class." }, - super_cannot_be_referenced_in_constructor_arguments: { code: 2336, category: ts.DiagnosticCategory.Error, key: "'super' cannot be referenced in constructor arguments." }, - Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors: { code: 2337, category: ts.DiagnosticCategory.Error, key: "Super calls are not permitted outside constructors or in nested functions inside constructors" }, - super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class: { code: 2338, category: ts.DiagnosticCategory.Error, key: "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class" }, - Property_0_does_not_exist_on_type_1: { code: 2339, category: ts.DiagnosticCategory.Error, key: "Property '{0}' does not exist on type '{1}'." }, - Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: { code: 2340, category: ts.DiagnosticCategory.Error, key: "Only public and protected methods of the base class are accessible via the 'super' keyword" }, - Property_0_is_private_and_only_accessible_within_class_1: { code: 2341, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is private and only accessible within class '{1}'." }, - An_index_expression_argument_must_be_of_type_string_number_symbol_or_any: { code: 2342, category: ts.DiagnosticCategory.Error, key: "An index expression argument must be of type 'string', 'number', 'symbol, or 'any'." }, - Type_0_does_not_satisfy_the_constraint_1: { code: 2344, category: ts.DiagnosticCategory.Error, key: "Type '{0}' does not satisfy the constraint '{1}'." }, - Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: { code: 2345, category: ts.DiagnosticCategory.Error, key: "Argument of type '{0}' is not assignable to parameter of type '{1}'." }, - Supplied_parameters_do_not_match_any_signature_of_call_target: { code: 2346, category: ts.DiagnosticCategory.Error, key: "Supplied parameters do not match any signature of call target." }, - Untyped_function_calls_may_not_accept_type_arguments: { code: 2347, category: ts.DiagnosticCategory.Error, key: "Untyped function calls may not accept type arguments." }, - Value_of_type_0_is_not_callable_Did_you_mean_to_include_new: { code: 2348, category: ts.DiagnosticCategory.Error, key: "Value of type '{0}' is not callable. Did you mean to include 'new'?" }, - Cannot_invoke_an_expression_whose_type_lacks_a_call_signature: { code: 2349, category: ts.DiagnosticCategory.Error, key: "Cannot invoke an expression whose type lacks a call signature." }, - Only_a_void_function_can_be_called_with_the_new_keyword: { code: 2350, category: ts.DiagnosticCategory.Error, key: "Only a void function can be called with the 'new' keyword." }, - Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature: { code: 2351, category: ts.DiagnosticCategory.Error, key: "Cannot use 'new' with an expression whose type lacks a call or construct signature." }, - Neither_type_0_nor_type_1_is_assignable_to_the_other: { code: 2352, category: ts.DiagnosticCategory.Error, key: "Neither type '{0}' nor type '{1}' is assignable to the other." }, - No_best_common_type_exists_among_return_expressions: { code: 2354, category: ts.DiagnosticCategory.Error, key: "No best common type exists among return expressions." }, - A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2355, category: ts.DiagnosticCategory.Error, key: "A function whose declared type is neither 'void' nor 'any' must return a value or consist of a single 'throw' statement." }, - An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type: { code: 2356, category: ts.DiagnosticCategory.Error, key: "An arithmetic operand must be of type 'any', 'number' or an enum type." }, - The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer: { code: 2357, category: ts.DiagnosticCategory.Error, key: "The operand of an increment or decrement operator must be a variable, property or indexer." }, - The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2358, category: ts.DiagnosticCategory.Error, key: "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter." }, - The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: { code: 2359, category: ts.DiagnosticCategory.Error, key: "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type." }, - The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol: { code: 2360, category: ts.DiagnosticCategory.Error, key: "The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'." }, - The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2361, category: ts.DiagnosticCategory.Error, key: "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter" }, - The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2362, category: ts.DiagnosticCategory.Error, key: "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." }, - The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type: { code: 2363, category: ts.DiagnosticCategory.Error, key: "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type." }, - Invalid_left_hand_side_of_assignment_expression: { code: 2364, category: ts.DiagnosticCategory.Error, key: "Invalid left-hand side of assignment expression." }, - Operator_0_cannot_be_applied_to_types_1_and_2: { code: 2365, category: ts.DiagnosticCategory.Error, key: "Operator '{0}' cannot be applied to types '{1}' and '{2}'." }, - Type_parameter_name_cannot_be_0: { code: 2368, category: ts.DiagnosticCategory.Error, key: "Type parameter name cannot be '{0}'" }, - A_parameter_property_is_only_allowed_in_a_constructor_implementation: { code: 2369, category: ts.DiagnosticCategory.Error, key: "A parameter property is only allowed in a constructor implementation." }, - A_rest_parameter_must_be_of_an_array_type: { code: 2370, category: ts.DiagnosticCategory.Error, key: "A rest parameter must be of an array type." }, - A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: { code: 2371, category: ts.DiagnosticCategory.Error, key: "A parameter initializer is only allowed in a function or constructor implementation." }, - Parameter_0_cannot_be_referenced_in_its_initializer: { code: 2372, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' cannot be referenced in its initializer." }, - Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it: { code: 2373, category: ts.DiagnosticCategory.Error, key: "Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it." }, - Duplicate_string_index_signature: { code: 2374, category: ts.DiagnosticCategory.Error, key: "Duplicate string index signature." }, - Duplicate_number_index_signature: { code: 2375, category: ts.DiagnosticCategory.Error, key: "Duplicate number index signature." }, - A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties: { code: 2376, category: ts.DiagnosticCategory.Error, key: "A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties." }, - Constructors_for_derived_classes_must_contain_a_super_call: { code: 2377, category: ts.DiagnosticCategory.Error, key: "Constructors for derived classes must contain a 'super' call." }, - A_get_accessor_must_return_a_value_or_consist_of_a_single_throw_statement: { code: 2378, category: ts.DiagnosticCategory.Error, key: "A 'get' accessor must return a value or consist of a single 'throw' statement." }, - Getter_and_setter_accessors_do_not_agree_in_visibility: { code: 2379, category: ts.DiagnosticCategory.Error, key: "Getter and setter accessors do not agree in visibility." }, - get_and_set_accessor_must_have_the_same_type: { code: 2380, category: ts.DiagnosticCategory.Error, key: "'get' and 'set' accessor must have the same type." }, - A_signature_with_an_implementation_cannot_use_a_string_literal_type: { code: 2381, category: ts.DiagnosticCategory.Error, key: "A signature with an implementation cannot use a string literal type." }, - Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: { code: 2382, category: ts.DiagnosticCategory.Error, key: "Specialized overload signature is not assignable to any non-specialized signature." }, - Overload_signatures_must_all_be_exported_or_not_exported: { code: 2383, category: ts.DiagnosticCategory.Error, key: "Overload signatures must all be exported or not exported." }, - Overload_signatures_must_all_be_ambient_or_non_ambient: { code: 2384, category: ts.DiagnosticCategory.Error, key: "Overload signatures must all be ambient or non-ambient." }, - Overload_signatures_must_all_be_public_private_or_protected: { code: 2385, category: ts.DiagnosticCategory.Error, key: "Overload signatures must all be public, private or protected." }, - Overload_signatures_must_all_be_optional_or_required: { code: 2386, category: ts.DiagnosticCategory.Error, key: "Overload signatures must all be optional or required." }, - Function_overload_must_be_static: { code: 2387, category: ts.DiagnosticCategory.Error, key: "Function overload must be static." }, - Function_overload_must_not_be_static: { code: 2388, category: ts.DiagnosticCategory.Error, key: "Function overload must not be static." }, - Function_implementation_name_must_be_0: { code: 2389, category: ts.DiagnosticCategory.Error, key: "Function implementation name must be '{0}'." }, - Constructor_implementation_is_missing: { code: 2390, category: ts.DiagnosticCategory.Error, key: "Constructor implementation is missing." }, - Function_implementation_is_missing_or_not_immediately_following_the_declaration: { code: 2391, category: ts.DiagnosticCategory.Error, key: "Function implementation is missing or not immediately following the declaration." }, - Multiple_constructor_implementations_are_not_allowed: { code: 2392, category: ts.DiagnosticCategory.Error, key: "Multiple constructor implementations are not allowed." }, - Duplicate_function_implementation: { code: 2393, category: ts.DiagnosticCategory.Error, key: "Duplicate function implementation." }, - Overload_signature_is_not_compatible_with_function_implementation: { code: 2394, category: ts.DiagnosticCategory.Error, key: "Overload signature is not compatible with function implementation." }, - Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local: { code: 2395, category: ts.DiagnosticCategory.Error, key: "Individual declarations in merged declaration {0} must be all exported or all local." }, - Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters: { code: 2396, category: ts.DiagnosticCategory.Error, key: "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters." }, - Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: { code: 2399, category: ts.DiagnosticCategory.Error, key: "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference." }, - Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: { code: 2400, category: ts.DiagnosticCategory.Error, key: "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference." }, - Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference: { code: 2401, category: ts.DiagnosticCategory.Error, key: "Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference." }, - Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: { code: 2402, category: ts.DiagnosticCategory.Error, key: "Expression resolves to '_super' that compiler uses to capture base class reference." }, - Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: { code: 2403, category: ts.DiagnosticCategory.Error, key: "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'." }, - The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: { code: 2404, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement cannot use a type annotation." }, - The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any: { code: 2405, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'." }, - Invalid_left_hand_side_in_for_in_statement: { code: 2406, category: ts.DiagnosticCategory.Error, key: "Invalid left-hand side in 'for...in' statement." }, - The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter: { code: 2407, category: ts.DiagnosticCategory.Error, key: "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter." }, - Setters_cannot_return_a_value: { code: 2408, category: ts.DiagnosticCategory.Error, key: "Setters cannot return a value." }, - Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: { code: 2409, category: ts.DiagnosticCategory.Error, key: "Return type of constructor signature must be assignable to the instance type of the class" }, - All_symbols_within_a_with_block_will_be_resolved_to_any: { code: 2410, category: ts.DiagnosticCategory.Error, key: "All symbols within a 'with' block will be resolved to 'any'." }, - Property_0_of_type_1_is_not_assignable_to_string_index_type_2: { code: 2411, category: ts.DiagnosticCategory.Error, key: "Property '{0}' of type '{1}' is not assignable to string index type '{2}'." }, - Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: { code: 2412, category: ts.DiagnosticCategory.Error, key: "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'." }, - Numeric_index_type_0_is_not_assignable_to_string_index_type_1: { code: 2413, category: ts.DiagnosticCategory.Error, key: "Numeric index type '{0}' is not assignable to string index type '{1}'." }, - Class_name_cannot_be_0: { code: 2414, category: ts.DiagnosticCategory.Error, key: "Class name cannot be '{0}'" }, - Class_0_incorrectly_extends_base_class_1: { code: 2415, category: ts.DiagnosticCategory.Error, key: "Class '{0}' incorrectly extends base class '{1}'." }, - Class_static_side_0_incorrectly_extends_base_class_static_side_1: { code: 2417, category: ts.DiagnosticCategory.Error, key: "Class static side '{0}' incorrectly extends base class static side '{1}'." }, - Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0: { code: 2419, category: ts.DiagnosticCategory.Error, key: "Type name '{0}' in extends clause does not reference constructor function for '{0}'." }, - Class_0_incorrectly_implements_interface_1: { code: 2420, category: ts.DiagnosticCategory.Error, key: "Class '{0}' incorrectly implements interface '{1}'." }, - A_class_may_only_implement_another_class_or_interface: { code: 2422, category: ts.DiagnosticCategory.Error, key: "A class may only implement another class or interface." }, - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor: { code: 2423, category: ts.DiagnosticCategory.Error, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor." }, - Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property: { code: 2424, category: ts.DiagnosticCategory.Error, key: "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property." }, - Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2425, category: ts.DiagnosticCategory.Error, key: "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function." }, - Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function: { code: 2426, category: ts.DiagnosticCategory.Error, key: "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function." }, - Interface_name_cannot_be_0: { code: 2427, category: ts.DiagnosticCategory.Error, key: "Interface name cannot be '{0}'" }, - All_declarations_of_an_interface_must_have_identical_type_parameters: { code: 2428, category: ts.DiagnosticCategory.Error, key: "All declarations of an interface must have identical type parameters." }, - Interface_0_incorrectly_extends_interface_1: { code: 2430, category: ts.DiagnosticCategory.Error, key: "Interface '{0}' incorrectly extends interface '{1}'." }, - Enum_name_cannot_be_0: { code: 2431, category: ts.DiagnosticCategory.Error, key: "Enum name cannot be '{0}'" }, - In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element: { code: 2432, category: ts.DiagnosticCategory.Error, key: "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element." }, - A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged: { code: 2433, category: ts.DiagnosticCategory.Error, key: "A namespace declaration cannot be in a different file from a class or function with which it is merged" }, - A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged: { code: 2434, category: ts.DiagnosticCategory.Error, key: "A namespace declaration cannot be located prior to a class or function with which it is merged" }, - Ambient_modules_cannot_be_nested_in_other_modules: { code: 2435, category: ts.DiagnosticCategory.Error, key: "Ambient modules cannot be nested in other modules." }, - Ambient_module_declaration_cannot_specify_relative_module_name: { code: 2436, category: ts.DiagnosticCategory.Error, key: "Ambient module declaration cannot specify relative module name." }, - Module_0_is_hidden_by_a_local_declaration_with_the_same_name: { code: 2437, category: ts.DiagnosticCategory.Error, key: "Module '{0}' is hidden by a local declaration with the same name" }, - Import_name_cannot_be_0: { code: 2438, category: ts.DiagnosticCategory.Error, key: "Import name cannot be '{0}'" }, - Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name: { code: 2439, category: ts.DiagnosticCategory.Error, key: "Import or export declaration in an ambient module declaration cannot reference module through relative module name." }, - Import_declaration_conflicts_with_local_declaration_of_0: { code: 2440, category: ts.DiagnosticCategory.Error, key: "Import declaration conflicts with local declaration of '{0}'" }, - Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module: { code: 2441, category: ts.DiagnosticCategory.Error, key: "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module." }, - Types_have_separate_declarations_of_a_private_property_0: { code: 2442, category: ts.DiagnosticCategory.Error, key: "Types have separate declarations of a private property '{0}'." }, - Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: { code: 2443, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'." }, - Property_0_is_protected_in_type_1_but_public_in_type_2: { code: 2444, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is protected in type '{1}' but public in type '{2}'." }, - Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: { code: 2445, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is protected and only accessible within class '{1}' and its subclasses." }, - Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: { code: 2446, category: ts.DiagnosticCategory.Error, key: "Property '{0}' is protected and only accessible through an instance of class '{1}'." }, - The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: { code: 2447, category: ts.DiagnosticCategory.Error, key: "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead." }, - Block_scoped_variable_0_used_before_its_declaration: { code: 2448, category: ts.DiagnosticCategory.Error, key: "Block-scoped variable '{0}' used before its declaration." }, - The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant: { code: 2449, category: ts.DiagnosticCategory.Error, key: "The operand of an increment or decrement operator cannot be a constant." }, - Left_hand_side_of_assignment_expression_cannot_be_a_constant: { code: 2450, category: ts.DiagnosticCategory.Error, key: "Left-hand side of assignment expression cannot be a constant." }, - Cannot_redeclare_block_scoped_variable_0: { code: 2451, category: ts.DiagnosticCategory.Error, key: "Cannot redeclare block-scoped variable '{0}'." }, - An_enum_member_cannot_have_a_numeric_name: { code: 2452, category: ts.DiagnosticCategory.Error, key: "An enum member cannot have a numeric name." }, - The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: { code: 2453, category: ts.DiagnosticCategory.Error, key: "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly." }, - Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: { code: 2455, category: ts.DiagnosticCategory.Error, key: "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'." }, - Type_alias_0_circularly_references_itself: { code: 2456, category: ts.DiagnosticCategory.Error, key: "Type alias '{0}' circularly references itself." }, - Type_alias_name_cannot_be_0: { code: 2457, category: ts.DiagnosticCategory.Error, key: "Type alias name cannot be '{0}'" }, - An_AMD_module_cannot_have_multiple_name_assignments: { code: 2458, category: ts.DiagnosticCategory.Error, key: "An AMD module cannot have multiple name assignments." }, - Type_0_has_no_property_1_and_no_string_index_signature: { code: 2459, category: ts.DiagnosticCategory.Error, key: "Type '{0}' has no property '{1}' and no string index signature." }, - Type_0_has_no_property_1: { code: 2460, category: ts.DiagnosticCategory.Error, key: "Type '{0}' has no property '{1}'." }, - Type_0_is_not_an_array_type: { code: 2461, category: ts.DiagnosticCategory.Error, key: "Type '{0}' is not an array type." }, - A_rest_element_must_be_last_in_an_array_destructuring_pattern: { code: 2462, category: ts.DiagnosticCategory.Error, key: "A rest element must be last in an array destructuring pattern" }, - A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: { code: 2463, category: ts.DiagnosticCategory.Error, key: "A binding pattern parameter cannot be optional in an implementation signature." }, - A_computed_property_name_must_be_of_type_string_number_symbol_or_any: { code: 2464, category: ts.DiagnosticCategory.Error, key: "A computed property name must be of type 'string', 'number', 'symbol', or 'any'." }, - this_cannot_be_referenced_in_a_computed_property_name: { code: 2465, category: ts.DiagnosticCategory.Error, key: "'this' cannot be referenced in a computed property name." }, - super_cannot_be_referenced_in_a_computed_property_name: { code: 2466, category: ts.DiagnosticCategory.Error, key: "'super' cannot be referenced in a computed property name." }, - A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: { code: 2467, category: ts.DiagnosticCategory.Error, key: "A computed property name cannot reference a type parameter from its containing type." }, - Cannot_find_global_value_0: { code: 2468, category: ts.DiagnosticCategory.Error, key: "Cannot find global value '{0}'." }, - The_0_operator_cannot_be_applied_to_type_symbol: { code: 2469, category: ts.DiagnosticCategory.Error, key: "The '{0}' operator cannot be applied to type 'symbol'." }, - Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object: { code: 2470, category: ts.DiagnosticCategory.Error, key: "'Symbol' reference does not refer to the global Symbol constructor object." }, - A_computed_property_name_of_the_form_0_must_be_of_type_symbol: { code: 2471, category: ts.DiagnosticCategory.Error, key: "A computed property name of the form '{0}' must be of type 'symbol'." }, - Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher: { code: 2472, category: ts.DiagnosticCategory.Error, key: "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher." }, - Enum_declarations_must_all_be_const_or_non_const: { code: 2473, category: ts.DiagnosticCategory.Error, key: "Enum declarations must all be const or non-const." }, - In_const_enum_declarations_member_initializer_must_be_constant_expression: { code: 2474, category: ts.DiagnosticCategory.Error, key: "In 'const' enum declarations member initializer must be constant expression." }, - const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment: { code: 2475, category: ts.DiagnosticCategory.Error, key: "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment." }, - A_const_enum_member_can_only_be_accessed_using_a_string_literal: { code: 2476, category: ts.DiagnosticCategory.Error, key: "A const enum member can only be accessed using a string literal." }, - const_enum_member_initializer_was_evaluated_to_a_non_finite_value: { code: 2477, category: ts.DiagnosticCategory.Error, key: "'const' enum member initializer was evaluated to a non-finite value." }, - const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: { code: 2478, category: ts.DiagnosticCategory.Error, key: "'const' enum member initializer was evaluated to disallowed value 'NaN'." }, - Property_0_does_not_exist_on_const_enum_1: { code: 2479, category: ts.DiagnosticCategory.Error, key: "Property '{0}' does not exist on 'const' enum '{1}'." }, - let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: { code: 2480, category: ts.DiagnosticCategory.Error, key: "'let' is not allowed to be used as a name in 'let' or 'const' declarations." }, - Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: { code: 2481, category: ts.DiagnosticCategory.Error, key: "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'." }, - The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: { code: 2483, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...of' statement cannot use a type annotation." }, - Export_declaration_conflicts_with_exported_declaration_of_0: { code: 2484, category: ts.DiagnosticCategory.Error, key: "Export declaration conflicts with exported declaration of '{0}'" }, - The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant: { code: 2485, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...of' statement cannot be a previously defined constant." }, - The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant: { code: 2486, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement cannot be a previously defined constant." }, - Invalid_left_hand_side_in_for_of_statement: { code: 2487, category: ts.DiagnosticCategory.Error, key: "Invalid left-hand side in 'for...of' statement." }, - Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator: { code: 2488, category: ts.DiagnosticCategory.Error, key: "Type must have a '[Symbol.iterator]()' method that returns an iterator." }, - An_iterator_must_have_a_next_method: { code: 2489, category: ts.DiagnosticCategory.Error, key: "An iterator must have a 'next()' method." }, - The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property: { code: 2490, category: ts.DiagnosticCategory.Error, key: "The type returned by the 'next()' method of an iterator must have a 'value' property." }, - The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern: { code: 2491, category: ts.DiagnosticCategory.Error, key: "The left-hand side of a 'for...in' statement cannot be a destructuring pattern." }, - Cannot_redeclare_identifier_0_in_catch_clause: { code: 2492, category: ts.DiagnosticCategory.Error, key: "Cannot redeclare identifier '{0}' in catch clause" }, - Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2: { code: 2493, category: ts.DiagnosticCategory.Error, key: "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'." }, - Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher: { code: 2494, category: ts.DiagnosticCategory.Error, key: "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher." }, - Type_0_is_not_an_array_type_or_a_string_type: { code: 2495, category: ts.DiagnosticCategory.Error, key: "Type '{0}' is not an array type or a string type." }, - The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression: { code: 2496, category: ts.DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression." }, - Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct: { code: 2497, category: ts.DiagnosticCategory.Error, key: "Module '{0}' resolves to a non-module entity and cannot be imported using this construct." }, - Module_0_uses_export_and_cannot_be_used_with_export_Asterisk: { code: 2498, category: ts.DiagnosticCategory.Error, key: "Module '{0}' uses 'export =' and cannot be used with 'export *'." }, - An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2499, category: ts.DiagnosticCategory.Error, key: "An interface can only extend an identifier/qualified-name with optional type arguments." }, - A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments: { code: 2500, category: ts.DiagnosticCategory.Error, key: "A class can only implement an identifier/qualified-name with optional type arguments." }, - A_rest_element_cannot_contain_a_binding_pattern: { code: 2501, category: ts.DiagnosticCategory.Error, key: "A rest element cannot contain a binding pattern." }, - _0_is_referenced_directly_or_indirectly_in_its_own_type_annotation: { code: 2502, category: ts.DiagnosticCategory.Error, key: "'{0}' is referenced directly or indirectly in its own type annotation." }, - Cannot_find_namespace_0: { code: 2503, category: ts.DiagnosticCategory.Error, key: "Cannot find namespace '{0}'." }, - No_best_common_type_exists_among_yield_expressions: { code: 2504, category: ts.DiagnosticCategory.Error, key: "No best common type exists among yield expressions." }, - A_generator_cannot_have_a_void_type_annotation: { code: 2505, category: ts.DiagnosticCategory.Error, key: "A generator cannot have a 'void' type annotation." }, - Import_declaration_0_is_using_private_name_1: { code: 4000, category: ts.DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." }, - Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." }, - Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." }, - Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4006, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." }, - Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4008, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'." }, - Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4010, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'." }, - Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4012, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of public method from exported class has or is using private name '{1}'." }, - Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4014, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of method from exported interface has or is using private name '{1}'." }, - Type_parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4016, category: ts.DiagnosticCategory.Error, key: "Type parameter '{0}' of exported function has or is using private name '{1}'." }, - Implements_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4019, category: ts.DiagnosticCategory.Error, key: "Implements clause of exported class '{0}' has or is using private name '{1}'." }, - Extends_clause_of_exported_class_0_has_or_is_using_private_name_1: { code: 4020, category: ts.DiagnosticCategory.Error, key: "Extends clause of exported class '{0}' has or is using private name '{1}'." }, - Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1: { code: 4022, category: ts.DiagnosticCategory.Error, key: "Extends clause of exported interface '{0}' has or is using private name '{1}'." }, - Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4023, category: ts.DiagnosticCategory.Error, key: "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named." }, - Exported_variable_0_has_or_is_using_name_1_from_private_module_2: { code: 4024, category: ts.DiagnosticCategory.Error, key: "Exported variable '{0}' has or is using name '{1}' from private module '{2}'." }, - Exported_variable_0_has_or_is_using_private_name_1: { code: 4025, category: ts.DiagnosticCategory.Error, key: "Exported variable '{0}' has or is using private name '{1}'." }, - Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4026, category: ts.DiagnosticCategory.Error, key: "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4027, category: ts.DiagnosticCategory.Error, key: "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, - Public_static_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4028, category: ts.DiagnosticCategory.Error, key: "Public static property '{0}' of exported class has or is using private name '{1}'." }, - Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4029, category: ts.DiagnosticCategory.Error, key: "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4030, category: ts.DiagnosticCategory.Error, key: "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'." }, - Public_property_0_of_exported_class_has_or_is_using_private_name_1: { code: 4031, category: ts.DiagnosticCategory.Error, key: "Public property '{0}' of exported class has or is using private name '{1}'." }, - Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4032, category: ts.DiagnosticCategory.Error, key: "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'." }, - Property_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4033, category: ts.DiagnosticCategory.Error, key: "Property '{0}' of exported interface has or is using private name '{1}'." }, - Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4034, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public static property setter from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4035, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public static property setter from exported class has or is using private name '{1}'." }, - Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4036, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public property setter from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1: { code: 4037, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public property setter from exported class has or is using private name '{1}'." }, - Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4038, category: ts.DiagnosticCategory.Error, key: "Return type of public static property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4039, category: ts.DiagnosticCategory.Error, key: "Return type of public static property getter from exported class has or is using name '{0}' from private module '{1}'." }, - Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4040, category: ts.DiagnosticCategory.Error, key: "Return type of public static property getter from exported class has or is using private name '{0}'." }, - Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4041, category: ts.DiagnosticCategory.Error, key: "Return type of public property getter from exported class has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4042, category: ts.DiagnosticCategory.Error, key: "Return type of public property getter from exported class has or is using name '{0}' from private module '{1}'." }, - Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0: { code: 4043, category: ts.DiagnosticCategory.Error, key: "Return type of public property getter from exported class has or is using private name '{0}'." }, - Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4044, category: ts.DiagnosticCategory.Error, key: "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'." }, - Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4045, category: ts.DiagnosticCategory.Error, key: "Return type of constructor signature from exported interface has or is using private name '{0}'." }, - Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4046, category: ts.DiagnosticCategory.Error, key: "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'." }, - Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4047, category: ts.DiagnosticCategory.Error, key: "Return type of call signature from exported interface has or is using private name '{0}'." }, - Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4048, category: ts.DiagnosticCategory.Error, key: "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'." }, - Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0: { code: 4049, category: ts.DiagnosticCategory.Error, key: "Return type of index signature from exported interface has or is using private name '{0}'." }, - Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4050, category: ts.DiagnosticCategory.Error, key: "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4051, category: ts.DiagnosticCategory.Error, key: "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'." }, - Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0: { code: 4052, category: ts.DiagnosticCategory.Error, key: "Return type of public static method from exported class has or is using private name '{0}'." }, - Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4053, category: ts.DiagnosticCategory.Error, key: "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1: { code: 4054, category: ts.DiagnosticCategory.Error, key: "Return type of public method from exported class has or is using name '{0}' from private module '{1}'." }, - Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0: { code: 4055, category: ts.DiagnosticCategory.Error, key: "Return type of public method from exported class has or is using private name '{0}'." }, - Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1: { code: 4056, category: ts.DiagnosticCategory.Error, key: "Return type of method from exported interface has or is using name '{0}' from private module '{1}'." }, - Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0: { code: 4057, category: ts.DiagnosticCategory.Error, key: "Return type of method from exported interface has or is using private name '{0}'." }, - Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named: { code: 4058, category: ts.DiagnosticCategory.Error, key: "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named." }, - Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1: { code: 4059, category: ts.DiagnosticCategory.Error, key: "Return type of exported function has or is using name '{0}' from private module '{1}'." }, - Return_type_of_exported_function_has_or_is_using_private_name_0: { code: 4060, category: ts.DiagnosticCategory.Error, key: "Return type of exported function has or is using private name '{0}'." }, - Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4061, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4062, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1: { code: 4063, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of constructor from exported class has or is using private name '{1}'." }, - Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4064, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4065, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'." }, - Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4066, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1: { code: 4067, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'." }, - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4068, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4069, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1: { code: 4070, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public static method from exported class has or is using private name '{1}'." }, - Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4071, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named." }, - Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2: { code: 4072, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1: { code: 4073, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of public method from exported class has or is using private name '{1}'." }, - Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2: { code: 4074, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1: { code: 4075, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of method from exported interface has or is using private name '{1}'." }, - Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named: { code: 4076, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named." }, - Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2: { code: 4077, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'." }, - Parameter_0_of_exported_function_has_or_is_using_private_name_1: { code: 4078, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' of exported function has or is using private name '{1}'." }, - Exported_type_alias_0_has_or_is_using_private_name_1: { code: 4081, category: ts.DiagnosticCategory.Error, key: "Exported type alias '{0}' has or is using private name '{1}'." }, - Default_export_of_the_module_has_or_is_using_private_name_0: { code: 4082, category: ts.DiagnosticCategory.Error, key: "Default export of the module has or is using private name '{0}'." }, - Loop_contains_block_scoped_variable_0_referenced_by_a_function_in_the_loop_This_is_only_supported_in_ECMAScript_6_or_higher: { code: 4091, category: ts.DiagnosticCategory.Error, key: "Loop contains block-scoped variable '{0}' referenced by a function in the loop. This is only supported in ECMAScript 6 or higher." }, - The_current_host_does_not_support_the_0_option: { code: 5001, category: ts.DiagnosticCategory.Error, key: "The current host does not support the '{0}' option." }, - Cannot_find_the_common_subdirectory_path_for_the_input_files: { code: 5009, category: ts.DiagnosticCategory.Error, key: "Cannot find the common subdirectory path for the input files." }, - Cannot_read_file_0_Colon_1: { code: 5012, category: ts.DiagnosticCategory.Error, key: "Cannot read file '{0}': {1}" }, - Unsupported_file_encoding: { code: 5013, category: ts.DiagnosticCategory.Error, key: "Unsupported file encoding." }, - Failed_to_parse_file_0_Colon_1: { code: 5014, category: ts.DiagnosticCategory.Error, key: "Failed to parse file '{0}': {1}." }, - Unknown_compiler_option_0: { code: 5023, category: ts.DiagnosticCategory.Error, key: "Unknown compiler option '{0}'." }, - Compiler_option_0_requires_a_value_of_type_1: { code: 5024, category: ts.DiagnosticCategory.Error, key: "Compiler option '{0}' requires a value of type {1}." }, - Could_not_write_file_0_Colon_1: { code: 5033, category: ts.DiagnosticCategory.Error, key: "Could not write file '{0}': {1}" }, - Option_mapRoot_cannot_be_specified_without_specifying_sourceMap_option: { code: 5038, category: ts.DiagnosticCategory.Error, key: "Option 'mapRoot' cannot be specified without specifying 'sourceMap' option." }, - Option_sourceRoot_cannot_be_specified_without_specifying_sourceMap_option: { code: 5039, category: ts.DiagnosticCategory.Error, key: "Option 'sourceRoot' cannot be specified without specifying 'sourceMap' option." }, - Option_noEmit_cannot_be_specified_with_option_out_or_outDir: { code: 5040, category: ts.DiagnosticCategory.Error, key: "Option 'noEmit' cannot be specified with option 'out' or 'outDir'." }, - Option_noEmit_cannot_be_specified_with_option_declaration: { code: 5041, category: ts.DiagnosticCategory.Error, key: "Option 'noEmit' cannot be specified with option 'declaration'." }, - Option_project_cannot_be_mixed_with_source_files_on_a_command_line: { code: 5042, category: ts.DiagnosticCategory.Error, key: "Option 'project' cannot be mixed with source files on a command line." }, - Option_sourceMap_cannot_be_specified_with_option_isolatedModules: { code: 5043, category: ts.DiagnosticCategory.Error, key: "Option 'sourceMap' cannot be specified with option 'isolatedModules'." }, - Option_declaration_cannot_be_specified_with_option_isolatedModules: { code: 5044, category: ts.DiagnosticCategory.Error, key: "Option 'declaration' cannot be specified with option 'isolatedModules'." }, - Option_noEmitOnError_cannot_be_specified_with_option_isolatedModules: { code: 5045, category: ts.DiagnosticCategory.Error, key: "Option 'noEmitOnError' cannot be specified with option 'isolatedModules'." }, - Option_out_cannot_be_specified_with_option_isolatedModules: { code: 5046, category: ts.DiagnosticCategory.Error, key: "Option 'out' cannot be specified with option 'isolatedModules'." }, - Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES6_or_higher: { code: 5047, category: ts.DiagnosticCategory.Error, key: "Option 'isolatedModules' can only be used when either option'--module' is provided or option 'target' is 'ES6' or higher." }, - Option_sourceMap_cannot_be_specified_with_option_inlineSourceMap: { code: 5048, category: ts.DiagnosticCategory.Error, key: "Option 'sourceMap' cannot be specified with option 'inlineSourceMap'." }, - Option_sourceRoot_cannot_be_specified_with_option_inlineSourceMap: { code: 5049, category: ts.DiagnosticCategory.Error, key: "Option 'sourceRoot' cannot be specified with option 'inlineSourceMap'." }, - Option_mapRoot_cannot_be_specified_with_option_inlineSourceMap: { code: 5050, category: ts.DiagnosticCategory.Error, key: "Option 'mapRoot' cannot be specified with option 'inlineSourceMap'." }, - Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided: { code: 5051, category: ts.DiagnosticCategory.Error, key: "Option 'inlineSources' can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided." }, - Concatenate_and_emit_output_to_single_file: { code: 6001, category: ts.DiagnosticCategory.Message, key: "Concatenate and emit output to single file." }, - Generates_corresponding_d_ts_file: { code: 6002, category: ts.DiagnosticCategory.Message, key: "Generates corresponding '.d.ts' file." }, - Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: { code: 6003, category: ts.DiagnosticCategory.Message, key: "Specifies the location where debugger should locate map files instead of generated locations." }, - Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: { code: 6004, category: ts.DiagnosticCategory.Message, key: "Specifies the location where debugger should locate TypeScript files instead of source locations." }, - Watch_input_files: { code: 6005, category: ts.DiagnosticCategory.Message, key: "Watch input files." }, - Redirect_output_structure_to_the_directory: { code: 6006, category: ts.DiagnosticCategory.Message, key: "Redirect output structure to the directory." }, - Do_not_erase_const_enum_declarations_in_generated_code: { code: 6007, category: ts.DiagnosticCategory.Message, key: "Do not erase const enum declarations in generated code." }, - Do_not_emit_outputs_if_any_errors_were_reported: { code: 6008, category: ts.DiagnosticCategory.Message, key: "Do not emit outputs if any errors were reported." }, - Do_not_emit_comments_to_output: { code: 6009, category: ts.DiagnosticCategory.Message, key: "Do not emit comments to output." }, - Do_not_emit_outputs: { code: 6010, category: ts.DiagnosticCategory.Message, key: "Do not emit outputs." }, - Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental: { code: 6015, category: ts.DiagnosticCategory.Message, key: "Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES6' (experimental)" }, - Specify_module_code_generation_Colon_commonjs_amd_system_or_umd: { code: 6016, category: ts.DiagnosticCategory.Message, key: "Specify module code generation: 'commonjs', 'amd', 'system' or 'umd'" }, - Print_this_message: { code: 6017, category: ts.DiagnosticCategory.Message, key: "Print this message." }, - Print_the_compiler_s_version: { code: 6019, category: ts.DiagnosticCategory.Message, key: "Print the compiler's version." }, - Compile_the_project_in_the_given_directory: { code: 6020, category: ts.DiagnosticCategory.Message, key: "Compile the project in the given directory." }, - Syntax_Colon_0: { code: 6023, category: ts.DiagnosticCategory.Message, key: "Syntax: {0}" }, - options: { code: 6024, category: ts.DiagnosticCategory.Message, key: "options" }, - file: { code: 6025, category: ts.DiagnosticCategory.Message, key: "file" }, - Examples_Colon_0: { code: 6026, category: ts.DiagnosticCategory.Message, key: "Examples: {0}" }, - Options_Colon: { code: 6027, category: ts.DiagnosticCategory.Message, key: "Options:" }, - Version_0: { code: 6029, category: ts.DiagnosticCategory.Message, key: "Version {0}" }, - Insert_command_line_options_and_files_from_a_file: { code: 6030, category: ts.DiagnosticCategory.Message, key: "Insert command line options and files from a file." }, - File_change_detected_Starting_incremental_compilation: { code: 6032, category: ts.DiagnosticCategory.Message, key: "File change detected. Starting incremental compilation..." }, - KIND: { code: 6034, category: ts.DiagnosticCategory.Message, key: "KIND" }, - FILE: { code: 6035, category: ts.DiagnosticCategory.Message, key: "FILE" }, - VERSION: { code: 6036, category: ts.DiagnosticCategory.Message, key: "VERSION" }, - LOCATION: { code: 6037, category: ts.DiagnosticCategory.Message, key: "LOCATION" }, - DIRECTORY: { code: 6038, category: ts.DiagnosticCategory.Message, key: "DIRECTORY" }, - Compilation_complete_Watching_for_file_changes: { code: 6042, category: ts.DiagnosticCategory.Message, key: "Compilation complete. Watching for file changes." }, - Generates_corresponding_map_file: { code: 6043, category: ts.DiagnosticCategory.Message, key: "Generates corresponding '.map' file." }, - Compiler_option_0_expects_an_argument: { code: 6044, category: ts.DiagnosticCategory.Error, key: "Compiler option '{0}' expects an argument." }, - Unterminated_quoted_string_in_response_file_0: { code: 6045, category: ts.DiagnosticCategory.Error, key: "Unterminated quoted string in response file '{0}'." }, - Argument_for_module_option_must_be_commonjs_amd_system_or_umd: { code: 6046, category: ts.DiagnosticCategory.Error, key: "Argument for '--module' option must be 'commonjs', 'amd', 'system' or 'umd'." }, - Argument_for_target_option_must_be_ES3_ES5_or_ES6: { code: 6047, category: ts.DiagnosticCategory.Error, key: "Argument for '--target' option must be 'ES3', 'ES5', or 'ES6'." }, - Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: { code: 6048, category: ts.DiagnosticCategory.Error, key: "Locale must be of the form or -. For example '{0}' or '{1}'." }, - Unsupported_locale_0: { code: 6049, category: ts.DiagnosticCategory.Error, key: "Unsupported locale '{0}'." }, - Unable_to_open_file_0: { code: 6050, category: ts.DiagnosticCategory.Error, key: "Unable to open file '{0}'." }, - Corrupted_locale_file_0: { code: 6051, category: ts.DiagnosticCategory.Error, key: "Corrupted locale file {0}." }, - Raise_error_on_expressions_and_declarations_with_an_implied_any_type: { code: 6052, category: ts.DiagnosticCategory.Message, key: "Raise error on expressions and declarations with an implied 'any' type." }, - File_0_not_found: { code: 6053, category: ts.DiagnosticCategory.Error, key: "File '{0}' not found." }, - File_0_has_unsupported_extension_The_only_supported_extensions_are_1: { code: 6054, category: ts.DiagnosticCategory.Error, key: "File '{0}' has unsupported extension. The only supported extensions are {1}." }, - Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures: { code: 6055, category: ts.DiagnosticCategory.Message, key: "Suppress noImplicitAny errors for indexing objects lacking index signatures." }, - Do_not_emit_declarations_for_code_that_has_an_internal_annotation: { code: 6056, category: ts.DiagnosticCategory.Message, key: "Do not emit declarations for code that has an '@internal' annotation." }, - Preserve_new_lines_when_emitting_code: { code: 6057, category: ts.DiagnosticCategory.Message, key: "Preserve new-lines when emitting code." }, - Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir: { code: 6058, category: ts.DiagnosticCategory.Message, key: "Specifies the root directory of input files. Use to control the output directory structure with --outDir." }, - File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files: { code: 6059, category: ts.DiagnosticCategory.Error, key: "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files." }, - Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix: { code: 6060, category: ts.DiagnosticCategory.Message, key: "Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix)." }, - NEWLINE: { code: 6061, category: ts.DiagnosticCategory.Message, key: "NEWLINE" }, - Argument_for_newLine_option_must_be_CRLF_or_LF: { code: 6062, category: ts.DiagnosticCategory.Error, key: "Argument for '--newLine' option must be 'CRLF' or 'LF'." }, - Option_experimentalDecorators_must_also_be_specified_when_option_emitDecoratorMetadata_is_specified: { code: 6064, category: ts.DiagnosticCategory.Error, key: "Option 'experimentalDecorators' must also be specified when option 'emitDecoratorMetadata' is specified." }, - Enables_experimental_support_for_ES7_decorators: { code: 6065, category: ts.DiagnosticCategory.Message, key: "Enables experimental support for ES7 decorators." }, - Enables_experimental_support_for_emitting_type_metadata_for_decorators: { code: 6066, category: ts.DiagnosticCategory.Message, key: "Enables experimental support for emitting type metadata for decorators." }, - Variable_0_implicitly_has_an_1_type: { code: 7005, category: ts.DiagnosticCategory.Error, key: "Variable '{0}' implicitly has an '{1}' type." }, - Parameter_0_implicitly_has_an_1_type: { code: 7006, category: ts.DiagnosticCategory.Error, key: "Parameter '{0}' implicitly has an '{1}' type." }, - Member_0_implicitly_has_an_1_type: { code: 7008, category: ts.DiagnosticCategory.Error, key: "Member '{0}' implicitly has an '{1}' type." }, - new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type: { code: 7009, category: ts.DiagnosticCategory.Error, key: "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type." }, - _0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type: { code: 7010, category: ts.DiagnosticCategory.Error, key: "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type." }, - Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type: { code: 7011, category: ts.DiagnosticCategory.Error, key: "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type." }, - Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7013, category: ts.DiagnosticCategory.Error, key: "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type." }, - Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation: { code: 7016, category: ts.DiagnosticCategory.Error, key: "Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation." }, - Index_signature_of_object_type_implicitly_has_an_any_type: { code: 7017, category: ts.DiagnosticCategory.Error, key: "Index signature of object type implicitly has an 'any' type." }, - Object_literal_s_property_0_implicitly_has_an_1_type: { code: 7018, category: ts.DiagnosticCategory.Error, key: "Object literal's property '{0}' implicitly has an '{1}' type." }, - Rest_parameter_0_implicitly_has_an_any_type: { code: 7019, category: ts.DiagnosticCategory.Error, key: "Rest parameter '{0}' implicitly has an 'any[]' type." }, - Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: { code: 7020, category: ts.DiagnosticCategory.Error, key: "Call signature, which lacks return-type annotation, implicitly has an 'any' return type." }, - _0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: { code: 7022, category: ts.DiagnosticCategory.Error, key: "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer." }, - _0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7023, category: ts.DiagnosticCategory.Error, key: "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." }, - Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: { code: 7024, category: ts.DiagnosticCategory.Error, key: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions." }, - Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type: { code: 7025, category: ts.DiagnosticCategory.Error, key: "Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type." }, - You_cannot_rename_this_element: { code: 8000, category: ts.DiagnosticCategory.Error, key: "You cannot rename this element." }, - You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: { code: 8001, category: ts.DiagnosticCategory.Error, key: "You cannot rename elements that are defined in the standard TypeScript library." }, - import_can_only_be_used_in_a_ts_file: { code: 8002, category: ts.DiagnosticCategory.Error, key: "'import ... =' can only be used in a .ts file." }, - export_can_only_be_used_in_a_ts_file: { code: 8003, category: ts.DiagnosticCategory.Error, key: "'export=' can only be used in a .ts file." }, - type_parameter_declarations_can_only_be_used_in_a_ts_file: { code: 8004, category: ts.DiagnosticCategory.Error, key: "'type parameter declarations' can only be used in a .ts file." }, - implements_clauses_can_only_be_used_in_a_ts_file: { code: 8005, category: ts.DiagnosticCategory.Error, key: "'implements clauses' can only be used in a .ts file." }, - interface_declarations_can_only_be_used_in_a_ts_file: { code: 8006, category: ts.DiagnosticCategory.Error, key: "'interface declarations' can only be used in a .ts file." }, - module_declarations_can_only_be_used_in_a_ts_file: { code: 8007, category: ts.DiagnosticCategory.Error, key: "'module declarations' can only be used in a .ts file." }, - type_aliases_can_only_be_used_in_a_ts_file: { code: 8008, category: ts.DiagnosticCategory.Error, key: "'type aliases' can only be used in a .ts file." }, - _0_can_only_be_used_in_a_ts_file: { code: 8009, category: ts.DiagnosticCategory.Error, key: "'{0}' can only be used in a .ts file." }, - types_can_only_be_used_in_a_ts_file: { code: 8010, category: ts.DiagnosticCategory.Error, key: "'types' can only be used in a .ts file." }, - type_arguments_can_only_be_used_in_a_ts_file: { code: 8011, category: ts.DiagnosticCategory.Error, key: "'type arguments' can only be used in a .ts file." }, - parameter_modifiers_can_only_be_used_in_a_ts_file: { code: 8012, category: ts.DiagnosticCategory.Error, key: "'parameter modifiers' can only be used in a .ts file." }, - property_declarations_can_only_be_used_in_a_ts_file: { code: 8014, category: ts.DiagnosticCategory.Error, key: "'property declarations' can only be used in a .ts file." }, - enum_declarations_can_only_be_used_in_a_ts_file: { code: 8015, category: ts.DiagnosticCategory.Error, key: "'enum declarations' can only be used in a .ts file." }, - type_assertion_expressions_can_only_be_used_in_a_ts_file: { code: 8016, category: ts.DiagnosticCategory.Error, key: "'type assertion expressions' can only be used in a .ts file." }, - decorators_can_only_be_used_in_a_ts_file: { code: 8017, category: ts.DiagnosticCategory.Error, key: "'decorators' can only be used in a .ts file." }, - Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses: { code: 9002, category: ts.DiagnosticCategory.Error, key: "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses." }, - class_expressions_are_not_currently_supported: { code: 9003, category: ts.DiagnosticCategory.Error, key: "'class' expressions are not currently supported." } - }; -})(ts || (ts = {})); -/// -/// -var ts; -(function (ts) { - var textToToken = { - "any": 112 /* AnyKeyword */, - "as": 111 /* AsKeyword */, - "boolean": 113 /* BooleanKeyword */, - "break": 66 /* BreakKeyword */, - "case": 67 /* CaseKeyword */, - "catch": 68 /* CatchKeyword */, - "class": 69 /* ClassKeyword */, - "continue": 71 /* ContinueKeyword */, - "const": 70 /* ConstKeyword */, - "constructor": 114 /* ConstructorKeyword */, - "debugger": 72 /* DebuggerKeyword */, - "declare": 115 /* DeclareKeyword */, - "default": 73 /* DefaultKeyword */, - "delete": 74 /* DeleteKeyword */, - "do": 75 /* DoKeyword */, - "else": 76 /* ElseKeyword */, - "enum": 77 /* EnumKeyword */, - "export": 78 /* ExportKeyword */, - "extends": 79 /* ExtendsKeyword */, - "false": 80 /* FalseKeyword */, - "finally": 81 /* FinallyKeyword */, - "for": 82 /* ForKeyword */, - "from": 126 /* FromKeyword */, - "function": 83 /* FunctionKeyword */, - "get": 116 /* GetKeyword */, - "if": 84 /* IfKeyword */, - "implements": 102 /* ImplementsKeyword */, - "import": 85 /* ImportKeyword */, - "in": 86 /* InKeyword */, - "instanceof": 87 /* InstanceOfKeyword */, - "interface": 103 /* InterfaceKeyword */, - "is": 117 /* IsKeyword */, - "let": 104 /* LetKeyword */, - "module": 118 /* ModuleKeyword */, - "namespace": 119 /* NamespaceKeyword */, - "new": 88 /* NewKeyword */, - "null": 89 /* NullKeyword */, - "number": 121 /* NumberKeyword */, - "package": 105 /* PackageKeyword */, - "private": 106 /* PrivateKeyword */, - "protected": 107 /* ProtectedKeyword */, - "public": 108 /* PublicKeyword */, - "require": 120 /* RequireKeyword */, - "return": 90 /* ReturnKeyword */, - "set": 122 /* SetKeyword */, - "static": 109 /* StaticKeyword */, - "string": 123 /* StringKeyword */, - "super": 91 /* SuperKeyword */, - "switch": 92 /* SwitchKeyword */, - "symbol": 124 /* SymbolKeyword */, - "this": 93 /* ThisKeyword */, - "throw": 94 /* ThrowKeyword */, - "true": 95 /* TrueKeyword */, - "try": 96 /* TryKeyword */, - "type": 125 /* TypeKeyword */, - "typeof": 97 /* TypeOfKeyword */, - "var": 98 /* VarKeyword */, - "void": 99 /* VoidKeyword */, - "while": 100 /* WhileKeyword */, - "with": 101 /* WithKeyword */, - "yield": 110 /* YieldKeyword */, - "of": 127 /* OfKeyword */, - "{": 14 /* OpenBraceToken */, - "}": 15 /* CloseBraceToken */, - "(": 16 /* OpenParenToken */, - ")": 17 /* CloseParenToken */, - "[": 18 /* OpenBracketToken */, - "]": 19 /* CloseBracketToken */, - ".": 20 /* DotToken */, - "...": 21 /* DotDotDotToken */, - ";": 22 /* SemicolonToken */, - ",": 23 /* CommaToken */, - "<": 24 /* LessThanToken */, - ">": 25 /* GreaterThanToken */, - "<=": 26 /* LessThanEqualsToken */, - ">=": 27 /* GreaterThanEqualsToken */, - "==": 28 /* EqualsEqualsToken */, - "!=": 29 /* ExclamationEqualsToken */, - "===": 30 /* EqualsEqualsEqualsToken */, - "!==": 31 /* ExclamationEqualsEqualsToken */, - "=>": 32 /* EqualsGreaterThanToken */, - "+": 33 /* PlusToken */, - "-": 34 /* MinusToken */, - "*": 35 /* AsteriskToken */, - "/": 36 /* SlashToken */, - "%": 37 /* PercentToken */, - "++": 38 /* PlusPlusToken */, - "--": 39 /* MinusMinusToken */, - "<<": 40 /* LessThanLessThanToken */, - ">>": 41 /* GreaterThanGreaterThanToken */, - ">>>": 42 /* GreaterThanGreaterThanGreaterThanToken */, - "&": 43 /* AmpersandToken */, - "|": 44 /* BarToken */, - "^": 45 /* CaretToken */, - "!": 46 /* ExclamationToken */, - "~": 47 /* TildeToken */, - "&&": 48 /* AmpersandAmpersandToken */, - "||": 49 /* BarBarToken */, - "?": 50 /* QuestionToken */, - ":": 51 /* ColonToken */, - "=": 53 /* EqualsToken */, - "+=": 54 /* PlusEqualsToken */, - "-=": 55 /* MinusEqualsToken */, - "*=": 56 /* AsteriskEqualsToken */, - "/=": 57 /* SlashEqualsToken */, - "%=": 58 /* PercentEqualsToken */, - "<<=": 59 /* LessThanLessThanEqualsToken */, - ">>=": 60 /* GreaterThanGreaterThanEqualsToken */, - ">>>=": 61 /* GreaterThanGreaterThanGreaterThanEqualsToken */, - "&=": 62 /* AmpersandEqualsToken */, - "|=": 63 /* BarEqualsToken */, - "^=": 64 /* CaretEqualsToken */, - "@": 52 /* AtToken */ - }; - /* - As per ECMAScript Language Specification 3th Edition, Section 7.6: Identifiers - IdentifierStart :: - Can contain Unicode 3.0.0 categories: - Uppercase letter (Lu), - Lowercase letter (Ll), - Titlecase letter (Lt), - Modifier letter (Lm), - Other letter (Lo), or - Letter number (Nl). - IdentifierPart :: = - Can contain IdentifierStart + Unicode 3.0.0 categories: - Non-spacing mark (Mn), - Combining spacing mark (Mc), - Decimal number (Nd), or - Connector punctuation (Pc). - - Codepoint ranges for ES3 Identifiers are extracted from the Unicode 3.0.0 specification at: - http://www.unicode.org/Public/3.0-Update/UnicodeData-3.0.0.txt - */ - var unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - var unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - /* - As per ECMAScript Language Specification 5th Edition, Section 7.6: ISyntaxToken Names and Identifiers - IdentifierStart :: - Can contain Unicode 6.2 categories: - Uppercase letter (Lu), - Lowercase letter (Ll), - Titlecase letter (Lt), - Modifier letter (Lm), - Other letter (Lo), or - Letter number (Nl). - IdentifierPart :: - Can contain IdentifierStart + Unicode 6.2 categories: - Non-spacing mark (Mn), - Combining spacing mark (Mc), - Decimal number (Nd), - Connector punctuation (Pc), - , or - . - - Codepoint ranges for ES5 Identifiers are extracted from the Unicode 6.2 specification at: - http://www.unicode.org/Public/6.2.0/ucd/UnicodeData.txt - */ - var unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - var unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,]; - function lookupInUnicodeMap(code, map) { - // Bail out quickly if it couldn't possibly be in the map. - if (code < map[0]) { - return false; - } - // Perform binary search in one of the Unicode range maps - var lo = 0; - var hi = map.length; - var mid; - while (lo + 1 < hi) { - mid = lo + (hi - lo) / 2; - // mid has to be even to catch a range's beginning - mid -= mid % 2; - if (map[mid] <= code && code <= map[mid + 1]) { - return true; - } - if (code < map[mid]) { - hi = mid; - } - else { - lo = mid + 2; - } - } - return false; - } - /* @internal */ function isUnicodeIdentifierStart(code, languageVersion) { - return languageVersion >= 1 /* ES5 */ ? - lookupInUnicodeMap(code, unicodeES5IdentifierStart) : - lookupInUnicodeMap(code, unicodeES3IdentifierStart); - } - ts.isUnicodeIdentifierStart = isUnicodeIdentifierStart; - function isUnicodeIdentifierPart(code, languageVersion) { - return languageVersion >= 1 /* ES5 */ ? - lookupInUnicodeMap(code, unicodeES5IdentifierPart) : - lookupInUnicodeMap(code, unicodeES3IdentifierPart); - } - function makeReverseMap(source) { - var result = []; - for (var name_3 in source) { - if (source.hasOwnProperty(name_3)) { - result[source[name_3]] = name_3; - } - } - return result; - } - var tokenStrings = makeReverseMap(textToToken); - function tokenToString(t) { - return tokenStrings[t]; - } - ts.tokenToString = tokenToString; - /* @internal */ - function stringToToken(s) { - return textToToken[s]; - } - ts.stringToToken = stringToToken; - /* @internal */ - function computeLineStarts(text) { - var result = new Array(); - var pos = 0; - var lineStart = 0; - while (pos < text.length) { - var ch = text.charCodeAt(pos++); - switch (ch) { - case 13 /* carriageReturn */: - if (text.charCodeAt(pos) === 10 /* lineFeed */) { - pos++; - } - case 10 /* lineFeed */: - result.push(lineStart); - lineStart = pos; - break; - default: - if (ch > 127 /* maxAsciiCharacter */ && isLineBreak(ch)) { - result.push(lineStart); - lineStart = pos; - } - break; - } - } - result.push(lineStart); - return result; - } - ts.computeLineStarts = computeLineStarts; - function getPositionOfLineAndCharacter(sourceFile, line, character) { - return computePositionOfLineAndCharacter(getLineStarts(sourceFile), line, character); - } - ts.getPositionOfLineAndCharacter = getPositionOfLineAndCharacter; - /* @internal */ - function computePositionOfLineAndCharacter(lineStarts, line, character) { - ts.Debug.assert(line >= 0 && line < lineStarts.length); - return lineStarts[line] + character; - } - ts.computePositionOfLineAndCharacter = computePositionOfLineAndCharacter; - /* @internal */ - function getLineStarts(sourceFile) { - return sourceFile.lineMap || (sourceFile.lineMap = computeLineStarts(sourceFile.text)); - } - ts.getLineStarts = getLineStarts; - /* @internal */ - function computeLineAndCharacterOfPosition(lineStarts, position) { - var lineNumber = ts.binarySearch(lineStarts, position); - if (lineNumber < 0) { - // If the actual position was not found, - // the binary search returns the negative value of the next line start - // e.g. if the line starts at [5, 10, 23, 80] and the position requested was 20 - // then the search will return -2 - lineNumber = ~lineNumber - 1; - } - return { - line: lineNumber, - character: position - lineStarts[lineNumber] - }; - } - ts.computeLineAndCharacterOfPosition = computeLineAndCharacterOfPosition; - function getLineAndCharacterOfPosition(sourceFile, position) { - return computeLineAndCharacterOfPosition(getLineStarts(sourceFile), position); - } - ts.getLineAndCharacterOfPosition = getLineAndCharacterOfPosition; - var hasOwnProperty = Object.prototype.hasOwnProperty; - function isWhiteSpace(ch) { - // Note: nextLine is in the Zs space, and should be considered to be a whitespace. - // It is explicitly not a line-break as it isn't in the exact set specified by EcmaScript. - return ch === 32 /* space */ || - ch === 9 /* tab */ || - ch === 11 /* verticalTab */ || - ch === 12 /* formFeed */ || - ch === 160 /* nonBreakingSpace */ || - ch === 133 /* nextLine */ || - ch === 5760 /* ogham */ || - ch >= 8192 /* enQuad */ && ch <= 8203 /* zeroWidthSpace */ || - ch === 8239 /* narrowNoBreakSpace */ || - ch === 8287 /* mathematicalSpace */ || - ch === 12288 /* ideographicSpace */ || - ch === 65279 /* byteOrderMark */; - } - ts.isWhiteSpace = isWhiteSpace; - function isLineBreak(ch) { - // ES5 7.3: - // The ECMAScript line terminator characters are listed in Table 3. - // Table 3: Line Terminator Characters - // Code Unit Value Name Formal Name - // \u000A Line Feed - // \u000D Carriage Return - // \u2028 Line separator - // \u2029 Paragraph separator - // Only the characters in Table 3 are treated as line terminators. Other new line or line - // breaking characters are treated as white space but not as line terminators. - return ch === 10 /* lineFeed */ || - ch === 13 /* carriageReturn */ || - ch === 8232 /* lineSeparator */ || - ch === 8233 /* paragraphSeparator */; - } - ts.isLineBreak = isLineBreak; - function isDigit(ch) { - return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; - } - /* @internal */ - function isOctalDigit(ch) { - return ch >= 48 /* _0 */ && ch <= 55 /* _7 */; - } - ts.isOctalDigit = isOctalDigit; - /* @internal */ - function skipTrivia(text, pos, stopAfterLineBreak) { - while (true) { - var ch = text.charCodeAt(pos); - switch (ch) { - case 13 /* carriageReturn */: - if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) { - pos++; - } - case 10 /* lineFeed */: - pos++; - if (stopAfterLineBreak) { - return pos; - } - continue; - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 32 /* space */: - pos++; - continue; - case 47 /* slash */: - if (text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - while (pos < text.length) { - if (isLineBreak(text.charCodeAt(pos))) { - break; - } - pos++; - } - continue; - } - if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { - pos += 2; - while (pos < text.length) { - if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - break; - } - pos++; - } - continue; - } - break; - case 60 /* lessThan */: - case 61 /* equals */: - case 62 /* greaterThan */: - if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos); - continue; - } - break; - default: - if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch) || isLineBreak(ch))) { - pos++; - continue; - } - break; - } - return pos; - } - } - ts.skipTrivia = skipTrivia; - // All conflict markers consist of the same character repeated seven times. If it is - // a <<<<<<< or >>>>>>> marker then it is also followd by a space. - var mergeConflictMarkerLength = "<<<<<<<".length; - function isConflictMarkerTrivia(text, pos) { - ts.Debug.assert(pos >= 0); - // Conflict markers must be at the start of a line. - if (pos === 0 || isLineBreak(text.charCodeAt(pos - 1))) { - var ch = text.charCodeAt(pos); - if ((pos + mergeConflictMarkerLength) < text.length) { - for (var i = 0, n = mergeConflictMarkerLength; i < n; i++) { - if (text.charCodeAt(pos + i) !== ch) { - return false; - } - } - return ch === 61 /* equals */ || - text.charCodeAt(pos + mergeConflictMarkerLength) === 32 /* space */; - } - } - return false; - } - function scanConflictMarkerTrivia(text, pos, error) { - if (error) { - error(ts.Diagnostics.Merge_conflict_marker_encountered, mergeConflictMarkerLength); - } - var ch = text.charCodeAt(pos); - var len = text.length; - if (ch === 60 /* lessThan */ || ch === 62 /* greaterThan */) { - while (pos < len && !isLineBreak(text.charCodeAt(pos))) { - pos++; - } - } - else { - ts.Debug.assert(ch === 61 /* equals */); - // Consume everything from the start of the mid-conlict marker to the start of the next - // end-conflict marker. - while (pos < len) { - var ch_1 = text.charCodeAt(pos); - if (ch_1 === 62 /* greaterThan */ && isConflictMarkerTrivia(text, pos)) { - break; - } - pos++; - } - } - return pos; - } - // Extract comments from the given source text starting at the given position. If trailing is - // false, whitespace is skipped until the first line break and comments between that location - // and the next token are returned.If trailing is true, comments occurring between the given - // position and the next line break are returned.The return value is an array containing a - // TextRange for each comment. Single-line comment ranges include the beginning '//' characters - // but not the ending line break. Multi - line comment ranges include the beginning '/* and - // ending '*/' characters.The return value is undefined if no comments were found. - function getCommentRanges(text, pos, trailing) { - var result; - var collecting = trailing || pos === 0; - while (true) { - var ch = text.charCodeAt(pos); - switch (ch) { - case 13 /* carriageReturn */: - if (text.charCodeAt(pos + 1) === 10 /* lineFeed */) { - pos++; - } - case 10 /* lineFeed */: - pos++; - if (trailing) { - return result; - } - collecting = true; - if (result && result.length) { - ts.lastOrUndefined(result).hasTrailingNewLine = true; - } - continue; - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 32 /* space */: - pos++; - continue; - case 47 /* slash */: - var nextChar = text.charCodeAt(pos + 1); - var hasTrailingNewLine = false; - if (nextChar === 47 /* slash */ || nextChar === 42 /* asterisk */) { - var kind = nextChar === 47 /* slash */ ? 2 /* SingleLineCommentTrivia */ : 3 /* MultiLineCommentTrivia */; - var startPos = pos; - pos += 2; - if (nextChar === 47 /* slash */) { - while (pos < text.length) { - if (isLineBreak(text.charCodeAt(pos))) { - hasTrailingNewLine = true; - break; - } - pos++; - } - } - else { - while (pos < text.length) { - if (text.charCodeAt(pos) === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - break; - } - pos++; - } - } - if (collecting) { - if (!result) { - result = []; - } - result.push({ pos: startPos, end: pos, hasTrailingNewLine: hasTrailingNewLine, kind: kind }); - } - continue; - } - break; - default: - if (ch > 127 /* maxAsciiCharacter */ && (isWhiteSpace(ch) || isLineBreak(ch))) { - if (result && result.length && isLineBreak(ch)) { - ts.lastOrUndefined(result).hasTrailingNewLine = true; - } - pos++; - continue; - } - break; - } - return result; - } - } - function getLeadingCommentRanges(text, pos) { - return getCommentRanges(text, pos, false); - } - ts.getLeadingCommentRanges = getLeadingCommentRanges; - function getTrailingCommentRanges(text, pos) { - return getCommentRanges(text, pos, true); - } - ts.getTrailingCommentRanges = getTrailingCommentRanges; - function isIdentifierStart(ch, languageVersion) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || - ch === 36 /* $ */ || ch === 95 /* _ */ || - ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion); - } - ts.isIdentifierStart = isIdentifierStart; - function isIdentifierPart(ch, languageVersion) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || - ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || - ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion); - } - ts.isIdentifierPart = isIdentifierPart; - /* @internal */ - // Creates a scanner over a (possibly unspecified) range of a piece of text. - function createScanner(languageVersion, skipTrivia, text, onError, start, length) { - // Current position (end position of text of current token) - var pos; - // end of text - var end; - // Start position of whitespace before current token - var startPos; - // Start position of text of current token - var tokenPos; - var token; - var tokenValue; - var precedingLineBreak; - var hasExtendedUnicodeEscape; - var tokenIsUnterminated; - setText(text, start, length); - return { - getStartPos: function () { return startPos; }, - getTextPos: function () { return pos; }, - getToken: function () { return token; }, - getTokenPos: function () { return tokenPos; }, - getTokenText: function () { return text.substring(tokenPos, pos); }, - getTokenValue: function () { return tokenValue; }, - hasExtendedUnicodeEscape: function () { return hasExtendedUnicodeEscape; }, - hasPrecedingLineBreak: function () { return precedingLineBreak; }, - isIdentifier: function () { return token === 65 /* Identifier */ || token > 101 /* LastReservedWord */; }, - isReservedWord: function () { return token >= 66 /* FirstReservedWord */ && token <= 101 /* LastReservedWord */; }, - isUnterminated: function () { return tokenIsUnterminated; }, - reScanGreaterToken: reScanGreaterToken, - reScanSlashToken: reScanSlashToken, - reScanTemplateToken: reScanTemplateToken, - scan: scan, - setText: setText, - setScriptTarget: setScriptTarget, - setOnError: setOnError, - setTextPos: setTextPos, - tryScan: tryScan, - lookAhead: lookAhead - }; - function error(message, length) { - if (onError) { - onError(message, length || 0); - } - } - function isIdentifierStart(ch) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || - ch === 36 /* $ */ || ch === 95 /* _ */ || - ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierStart(ch, languageVersion); - } - function isIdentifierPart(ch) { - return ch >= 65 /* A */ && ch <= 90 /* Z */ || ch >= 97 /* a */ && ch <= 122 /* z */ || - ch >= 48 /* _0 */ && ch <= 57 /* _9 */ || ch === 36 /* $ */ || ch === 95 /* _ */ || - ch > 127 /* maxAsciiCharacter */ && isUnicodeIdentifierPart(ch, languageVersion); - } - function scanNumber() { - var start = pos; - while (isDigit(text.charCodeAt(pos))) - pos++; - if (text.charCodeAt(pos) === 46 /* dot */) { - pos++; - while (isDigit(text.charCodeAt(pos))) - pos++; - } - var end = pos; - if (text.charCodeAt(pos) === 69 /* E */ || text.charCodeAt(pos) === 101 /* e */) { - pos++; - if (text.charCodeAt(pos) === 43 /* plus */ || text.charCodeAt(pos) === 45 /* minus */) - pos++; - if (isDigit(text.charCodeAt(pos))) { - pos++; - while (isDigit(text.charCodeAt(pos))) - pos++; - end = pos; - } - else { - error(ts.Diagnostics.Digit_expected); - } - } - return +(text.substring(start, end)); - } - function scanOctalDigits() { - var start = pos; - while (isOctalDigit(text.charCodeAt(pos))) { - pos++; - } - return +(text.substring(start, pos)); - } - /** - * Scans the given number of hexadecimal digits in the text, - * returning -1 if the given number is unavailable. - */ - function scanExactNumberOfHexDigits(count) { - return scanHexDigits(count, false); - } - /** - * Scans as many hexadecimal digits as are available in the text, - * returning -1 if the given number of digits was unavailable. - */ - function scanMinimumNumberOfHexDigits(count) { - return scanHexDigits(count, true); - } - function scanHexDigits(minCount, scanAsManyAsPossible) { - var digits = 0; - var value = 0; - while (digits < minCount || scanAsManyAsPossible) { - var ch = text.charCodeAt(pos); - if (ch >= 48 /* _0 */ && ch <= 57 /* _9 */) { - value = value * 16 + ch - 48 /* _0 */; - } - else if (ch >= 65 /* A */ && ch <= 70 /* F */) { - value = value * 16 + ch - 65 /* A */ + 10; - } - else if (ch >= 97 /* a */ && ch <= 102 /* f */) { - value = value * 16 + ch - 97 /* a */ + 10; - } - else { - break; - } - pos++; - digits++; - } - if (digits < minCount) { - value = -1; - } - return value; - } - function scanString() { - var quote = text.charCodeAt(pos++); - var result = ""; - var start = pos; - while (true) { - if (pos >= end) { - result += text.substring(start, pos); - tokenIsUnterminated = true; - error(ts.Diagnostics.Unterminated_string_literal); - break; - } - var ch = text.charCodeAt(pos); - if (ch === quote) { - result += text.substring(start, pos); - pos++; - break; - } - if (ch === 92 /* backslash */) { - result += text.substring(start, pos); - result += scanEscapeSequence(); - start = pos; - continue; - } - if (isLineBreak(ch)) { - result += text.substring(start, pos); - tokenIsUnterminated = true; - error(ts.Diagnostics.Unterminated_string_literal); - break; - } - pos++; - } - return result; - } - /** - * Sets the current 'tokenValue' and returns a NoSubstitutionTemplateLiteral or - * a literal component of a TemplateExpression. - */ - function scanTemplateAndSetTokenValue() { - var startedWithBacktick = text.charCodeAt(pos) === 96 /* backtick */; - pos++; - var start = pos; - var contents = ""; - var resultingToken; - while (true) { - if (pos >= end) { - contents += text.substring(start, pos); - tokenIsUnterminated = true; - error(ts.Diagnostics.Unterminated_template_literal); - resultingToken = startedWithBacktick ? 10 /* NoSubstitutionTemplateLiteral */ : 13 /* TemplateTail */; - break; - } - var currChar = text.charCodeAt(pos); - // '`' - if (currChar === 96 /* backtick */) { - contents += text.substring(start, pos); - pos++; - resultingToken = startedWithBacktick ? 10 /* NoSubstitutionTemplateLiteral */ : 13 /* TemplateTail */; - break; - } - // '${' - if (currChar === 36 /* $ */ && pos + 1 < end && text.charCodeAt(pos + 1) === 123 /* openBrace */) { - contents += text.substring(start, pos); - pos += 2; - resultingToken = startedWithBacktick ? 11 /* TemplateHead */ : 12 /* TemplateMiddle */; - break; - } - // Escape character - if (currChar === 92 /* backslash */) { - contents += text.substring(start, pos); - contents += scanEscapeSequence(); - start = pos; - continue; - } - // Speculated ECMAScript 6 Spec 11.8.6.1: - // and LineTerminatorSequences are normalized to for Template Values - if (currChar === 13 /* carriageReturn */) { - contents += text.substring(start, pos); - pos++; - if (pos < end && text.charCodeAt(pos) === 10 /* lineFeed */) { - pos++; - } - contents += "\n"; - start = pos; - continue; - } - pos++; - } - ts.Debug.assert(resultingToken !== undefined); - tokenValue = contents; - return resultingToken; - } - function scanEscapeSequence() { - pos++; - if (pos >= end) { - error(ts.Diagnostics.Unexpected_end_of_text); - return ""; - } - var ch = text.charCodeAt(pos++); - switch (ch) { - case 48 /* _0 */: - return "\0"; - case 98 /* b */: - return "\b"; - case 116 /* t */: - return "\t"; - case 110 /* n */: - return "\n"; - case 118 /* v */: - return "\v"; - case 102 /* f */: - return "\f"; - case 114 /* r */: - return "\r"; - case 39 /* singleQuote */: - return "\'"; - case 34 /* doubleQuote */: - return "\""; - case 117 /* u */: - // '\u{DDDDDDDD}' - if (pos < end && text.charCodeAt(pos) === 123 /* openBrace */) { - hasExtendedUnicodeEscape = true; - pos++; - return scanExtendedUnicodeEscape(); - } - // '\uDDDD' - return scanHexadecimalEscape(4); - case 120 /* x */: - // '\xDD' - return scanHexadecimalEscape(2); - // when encountering a LineContinuation (i.e. a backslash and a line terminator sequence), - // the line terminator is interpreted to be "the empty code unit sequence". - case 13 /* carriageReturn */: - if (pos < end && text.charCodeAt(pos) === 10 /* lineFeed */) { - pos++; - } - // fall through - case 10 /* lineFeed */: - case 8232 /* lineSeparator */: - case 8233 /* paragraphSeparator */: - return ""; - default: - return String.fromCharCode(ch); - } - } - function scanHexadecimalEscape(numDigits) { - var escapedValue = scanExactNumberOfHexDigits(numDigits); - if (escapedValue >= 0) { - return String.fromCharCode(escapedValue); - } - else { - error(ts.Diagnostics.Hexadecimal_digit_expected); - return ""; - } - } - function scanExtendedUnicodeEscape() { - var escapedValue = scanMinimumNumberOfHexDigits(1); - var isInvalidExtendedEscape = false; - // Validate the value of the digit - if (escapedValue < 0) { - error(ts.Diagnostics.Hexadecimal_digit_expected); - isInvalidExtendedEscape = true; - } - else if (escapedValue > 0x10FFFF) { - error(ts.Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive); - isInvalidExtendedEscape = true; - } - if (pos >= end) { - error(ts.Diagnostics.Unexpected_end_of_text); - isInvalidExtendedEscape = true; - } - else if (text.charCodeAt(pos) == 125 /* closeBrace */) { - // Only swallow the following character up if it's a '}'. - pos++; - } - else { - error(ts.Diagnostics.Unterminated_Unicode_escape_sequence); - isInvalidExtendedEscape = true; - } - if (isInvalidExtendedEscape) { - return ""; - } - return utf16EncodeAsString(escapedValue); - } - // Derived from the 10.1.1 UTF16Encoding of the ES6 Spec. - function utf16EncodeAsString(codePoint) { - ts.Debug.assert(0x0 <= codePoint && codePoint <= 0x10FFFF); - if (codePoint <= 65535) { - return String.fromCharCode(codePoint); - } - var codeUnit1 = Math.floor((codePoint - 65536) / 1024) + 0xD800; - var codeUnit2 = ((codePoint - 65536) % 1024) + 0xDC00; - return String.fromCharCode(codeUnit1, codeUnit2); - } - // Current character is known to be a backslash. Check for Unicode escape of the form '\uXXXX' - // and return code point value if valid Unicode escape is found. Otherwise return -1. - function peekUnicodeEscape() { - if (pos + 5 < end && text.charCodeAt(pos + 1) === 117 /* u */) { - var start_1 = pos; - pos += 2; - var value = scanExactNumberOfHexDigits(4); - pos = start_1; - return value; - } - return -1; - } - function scanIdentifierParts() { - var result = ""; - var start = pos; - while (pos < end) { - var ch = text.charCodeAt(pos); - if (isIdentifierPart(ch)) { - pos++; - } - else if (ch === 92 /* backslash */) { - ch = peekUnicodeEscape(); - if (!(ch >= 0 && isIdentifierPart(ch))) { - break; - } - result += text.substring(start, pos); - result += String.fromCharCode(ch); - // Valid Unicode escape is always six characters - pos += 6; - start = pos; - } - else { - break; - } - } - result += text.substring(start, pos); - return result; - } - function getIdentifierToken() { - // Reserved words are between 2 and 11 characters long and start with a lowercase letter - var len = tokenValue.length; - if (len >= 2 && len <= 11) { - var ch = tokenValue.charCodeAt(0); - if (ch >= 97 /* a */ && ch <= 122 /* z */ && hasOwnProperty.call(textToToken, tokenValue)) { - return token = textToToken[tokenValue]; - } - } - return token = 65 /* Identifier */; - } - function scanBinaryOrOctalDigits(base) { - ts.Debug.assert(base !== 2 || base !== 8, "Expected either base 2 or base 8"); - var value = 0; - // For counting number of digits; Valid binaryIntegerLiteral must have at least one binary digit following B or b. - // Similarly valid octalIntegerLiteral must have at least one octal digit following o or O. - var numberOfDigits = 0; - while (true) { - var ch = text.charCodeAt(pos); - var valueOfCh = ch - 48 /* _0 */; - if (!isDigit(ch) || valueOfCh >= base) { - break; - } - value = value * base + valueOfCh; - pos++; - numberOfDigits++; - } - // Invalid binaryIntegerLiteral or octalIntegerLiteral - if (numberOfDigits === 0) { - return -1; - } - return value; - } - function scan() { - startPos = pos; - hasExtendedUnicodeEscape = false; - precedingLineBreak = false; - tokenIsUnterminated = false; - while (true) { - tokenPos = pos; - if (pos >= end) { - return token = 1 /* EndOfFileToken */; - } - var ch = text.charCodeAt(pos); - switch (ch) { - case 10 /* lineFeed */: - case 13 /* carriageReturn */: - precedingLineBreak = true; - if (skipTrivia) { - pos++; - continue; - } - else { - if (ch === 13 /* carriageReturn */ && pos + 1 < end && text.charCodeAt(pos + 1) === 10 /* lineFeed */) { - // consume both CR and LF - pos += 2; - } - else { - pos++; - } - return token = 4 /* NewLineTrivia */; - } - case 9 /* tab */: - case 11 /* verticalTab */: - case 12 /* formFeed */: - case 32 /* space */: - if (skipTrivia) { - pos++; - continue; - } - else { - while (pos < end && isWhiteSpace(text.charCodeAt(pos))) { - pos++; - } - return token = 5 /* WhitespaceTrivia */; - } - case 33 /* exclamation */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 31 /* ExclamationEqualsEqualsToken */; - } - return pos += 2, token = 29 /* ExclamationEqualsToken */; - } - return pos++, token = 46 /* ExclamationToken */; - case 34 /* doubleQuote */: - case 39 /* singleQuote */: - tokenValue = scanString(); - return token = 8 /* StringLiteral */; - case 96 /* backtick */: - return token = scanTemplateAndSetTokenValue(); - case 37 /* percent */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 58 /* PercentEqualsToken */; - } - return pos++, token = 37 /* PercentToken */; - case 38 /* ampersand */: - if (text.charCodeAt(pos + 1) === 38 /* ampersand */) { - return pos += 2, token = 48 /* AmpersandAmpersandToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 62 /* AmpersandEqualsToken */; - } - return pos++, token = 43 /* AmpersandToken */; - case 40 /* openParen */: - return pos++, token = 16 /* OpenParenToken */; - case 41 /* closeParen */: - return pos++, token = 17 /* CloseParenToken */; - case 42 /* asterisk */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 56 /* AsteriskEqualsToken */; - } - return pos++, token = 35 /* AsteriskToken */; - case 43 /* plus */: - if (text.charCodeAt(pos + 1) === 43 /* plus */) { - return pos += 2, token = 38 /* PlusPlusToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 54 /* PlusEqualsToken */; - } - return pos++, token = 33 /* PlusToken */; - case 44 /* comma */: - return pos++, token = 23 /* CommaToken */; - case 45 /* minus */: - if (text.charCodeAt(pos + 1) === 45 /* minus */) { - return pos += 2, token = 39 /* MinusMinusToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 55 /* MinusEqualsToken */; - } - return pos++, token = 34 /* MinusToken */; - case 46 /* dot */: - if (isDigit(text.charCodeAt(pos + 1))) { - tokenValue = "" + scanNumber(); - return token = 7 /* NumericLiteral */; - } - if (text.charCodeAt(pos + 1) === 46 /* dot */ && text.charCodeAt(pos + 2) === 46 /* dot */) { - return pos += 3, token = 21 /* DotDotDotToken */; - } - return pos++, token = 20 /* DotToken */; - case 47 /* slash */: - // Single-line comment - if (text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - while (pos < end) { - if (isLineBreak(text.charCodeAt(pos))) { - break; - } - pos++; - } - if (skipTrivia) { - continue; - } - else { - return token = 2 /* SingleLineCommentTrivia */; - } - } - // Multi-line comment - if (text.charCodeAt(pos + 1) === 42 /* asterisk */) { - pos += 2; - var commentClosed = false; - while (pos < end) { - var ch_2 = text.charCodeAt(pos); - if (ch_2 === 42 /* asterisk */ && text.charCodeAt(pos + 1) === 47 /* slash */) { - pos += 2; - commentClosed = true; - break; - } - if (isLineBreak(ch_2)) { - precedingLineBreak = true; - } - pos++; - } - if (!commentClosed) { - error(ts.Diagnostics.Asterisk_Slash_expected); - } - if (skipTrivia) { - continue; - } - else { - tokenIsUnterminated = !commentClosed; - return token = 3 /* MultiLineCommentTrivia */; - } - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 57 /* SlashEqualsToken */; - } - return pos++, token = 36 /* SlashToken */; - case 48 /* _0 */: - if (pos + 2 < end && (text.charCodeAt(pos + 1) === 88 /* X */ || text.charCodeAt(pos + 1) === 120 /* x */)) { - pos += 2; - var value = scanMinimumNumberOfHexDigits(1); - if (value < 0) { - error(ts.Diagnostics.Hexadecimal_digit_expected); - value = 0; - } - tokenValue = "" + value; - return token = 7 /* NumericLiteral */; - } - else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 66 /* B */ || text.charCodeAt(pos + 1) === 98 /* b */)) { - pos += 2; - var value = scanBinaryOrOctalDigits(2); - if (value < 0) { - error(ts.Diagnostics.Binary_digit_expected); - value = 0; - } - tokenValue = "" + value; - return token = 7 /* NumericLiteral */; - } - else if (pos + 2 < end && (text.charCodeAt(pos + 1) === 79 /* O */ || text.charCodeAt(pos + 1) === 111 /* o */)) { - pos += 2; - var value = scanBinaryOrOctalDigits(8); - if (value < 0) { - error(ts.Diagnostics.Octal_digit_expected); - value = 0; - } - tokenValue = "" + value; - return token = 7 /* NumericLiteral */; - } - // Try to parse as an octal - if (pos + 1 < end && isOctalDigit(text.charCodeAt(pos + 1))) { - tokenValue = "" + scanOctalDigits(); - return token = 7 /* NumericLiteral */; - } - // This fall-through is a deviation from the EcmaScript grammar. The grammar says that a leading zero - // can only be followed by an octal digit, a dot, or the end of the number literal. However, we are being - // permissive and allowing decimal digits of the form 08* and 09* (which many browsers also do). - case 49 /* _1 */: - case 50 /* _2 */: - case 51 /* _3 */: - case 52 /* _4 */: - case 53 /* _5 */: - case 54 /* _6 */: - case 55 /* _7 */: - case 56 /* _8 */: - case 57 /* _9 */: - tokenValue = "" + scanNumber(); - return token = 7 /* NumericLiteral */; - case 58 /* colon */: - return pos++, token = 51 /* ColonToken */; - case 59 /* semicolon */: - return pos++, token = 22 /* SemicolonToken */; - case 60 /* lessThan */: - if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); - if (skipTrivia) { - continue; - } - else { - return token = 6 /* ConflictMarkerTrivia */; - } - } - if (text.charCodeAt(pos + 1) === 60 /* lessThan */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 59 /* LessThanLessThanEqualsToken */; - } - return pos += 2, token = 40 /* LessThanLessThanToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 26 /* LessThanEqualsToken */; - } - return pos++, token = 24 /* LessThanToken */; - case 61 /* equals */: - if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); - if (skipTrivia) { - continue; - } - else { - return token = 6 /* ConflictMarkerTrivia */; - } - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 30 /* EqualsEqualsEqualsToken */; - } - return pos += 2, token = 28 /* EqualsEqualsToken */; - } - if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { - return pos += 2, token = 32 /* EqualsGreaterThanToken */; - } - return pos++, token = 53 /* EqualsToken */; - case 62 /* greaterThan */: - if (isConflictMarkerTrivia(text, pos)) { - pos = scanConflictMarkerTrivia(text, pos, error); - if (skipTrivia) { - continue; - } - else { - return token = 6 /* ConflictMarkerTrivia */; - } - } - return pos++, token = 25 /* GreaterThanToken */; - case 63 /* question */: - return pos++, token = 50 /* QuestionToken */; - case 91 /* openBracket */: - return pos++, token = 18 /* OpenBracketToken */; - case 93 /* closeBracket */: - return pos++, token = 19 /* CloseBracketToken */; - case 94 /* caret */: - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 64 /* CaretEqualsToken */; - } - return pos++, token = 45 /* CaretToken */; - case 123 /* openBrace */: - return pos++, token = 14 /* OpenBraceToken */; - case 124 /* bar */: - if (text.charCodeAt(pos + 1) === 124 /* bar */) { - return pos += 2, token = 49 /* BarBarToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 63 /* BarEqualsToken */; - } - return pos++, token = 44 /* BarToken */; - case 125 /* closeBrace */: - return pos++, token = 15 /* CloseBraceToken */; - case 126 /* tilde */: - return pos++, token = 47 /* TildeToken */; - case 64 /* at */: - return pos++, token = 52 /* AtToken */; - case 92 /* backslash */: - var cookedChar = peekUnicodeEscape(); - if (cookedChar >= 0 && isIdentifierStart(cookedChar)) { - pos += 6; - tokenValue = String.fromCharCode(cookedChar) + scanIdentifierParts(); - return token = getIdentifierToken(); - } - error(ts.Diagnostics.Invalid_character); - return pos++, token = 0 /* Unknown */; - default: - if (isIdentifierStart(ch)) { - pos++; - while (pos < end && isIdentifierPart(ch = text.charCodeAt(pos))) - pos++; - tokenValue = text.substring(tokenPos, pos); - if (ch === 92 /* backslash */) { - tokenValue += scanIdentifierParts(); - } - return token = getIdentifierToken(); - } - else if (isWhiteSpace(ch)) { - pos++; - continue; - } - else if (isLineBreak(ch)) { - precedingLineBreak = true; - pos++; - continue; - } - error(ts.Diagnostics.Invalid_character); - return pos++, token = 0 /* Unknown */; - } - } - } - function reScanGreaterToken() { - if (token === 25 /* GreaterThanToken */) { - if (text.charCodeAt(pos) === 62 /* greaterThan */) { - if (text.charCodeAt(pos + 1) === 62 /* greaterThan */) { - if (text.charCodeAt(pos + 2) === 61 /* equals */) { - return pos += 3, token = 61 /* GreaterThanGreaterThanGreaterThanEqualsToken */; - } - return pos += 2, token = 42 /* GreaterThanGreaterThanGreaterThanToken */; - } - if (text.charCodeAt(pos + 1) === 61 /* equals */) { - return pos += 2, token = 60 /* GreaterThanGreaterThanEqualsToken */; - } - return pos++, token = 41 /* GreaterThanGreaterThanToken */; - } - if (text.charCodeAt(pos) === 61 /* equals */) { - return pos++, token = 27 /* GreaterThanEqualsToken */; - } - } - return token; - } - function reScanSlashToken() { - if (token === 36 /* SlashToken */ || token === 57 /* SlashEqualsToken */) { - var p = tokenPos + 1; - var inEscape = false; - var inCharacterClass = false; - while (true) { - // If we reach the end of a file, or hit a newline, then this is an unterminated - // regex. Report error and return what we have so far. - if (p >= end) { - tokenIsUnterminated = true; - error(ts.Diagnostics.Unterminated_regular_expression_literal); - break; - } - var ch = text.charCodeAt(p); - if (isLineBreak(ch)) { - tokenIsUnterminated = true; - error(ts.Diagnostics.Unterminated_regular_expression_literal); - break; - } - if (inEscape) { - // Parsing an escape character; - // reset the flag and just advance to the next char. - inEscape = false; - } - else if (ch === 47 /* slash */ && !inCharacterClass) { - // A slash within a character class is permissible, - // but in general it signals the end of the regexp literal. - p++; - break; - } - else if (ch === 91 /* openBracket */) { - inCharacterClass = true; - } - else if (ch === 92 /* backslash */) { - inEscape = true; - } - else if (ch === 93 /* closeBracket */) { - inCharacterClass = false; - } - p++; - } - while (p < end && isIdentifierPart(text.charCodeAt(p))) { - p++; - } - pos = p; - tokenValue = text.substring(tokenPos, pos); - token = 9 /* RegularExpressionLiteral */; - } - return token; - } - /** - * Unconditionally back up and scan a template expression portion. - */ - function reScanTemplateToken() { - ts.Debug.assert(token === 15 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'"); - pos = tokenPos; - return token = scanTemplateAndSetTokenValue(); - } - function speculationHelper(callback, isLookahead) { - var savePos = pos; - var saveStartPos = startPos; - var saveTokenPos = tokenPos; - var saveToken = token; - var saveTokenValue = tokenValue; - var savePrecedingLineBreak = precedingLineBreak; - var result = callback(); - // If our callback returned something 'falsy' or we're just looking ahead, - // then unconditionally restore us to where we were. - if (!result || isLookahead) { - pos = savePos; - startPos = saveStartPos; - tokenPos = saveTokenPos; - token = saveToken; - tokenValue = saveTokenValue; - precedingLineBreak = savePrecedingLineBreak; - } - return result; - } - function lookAhead(callback) { - return speculationHelper(callback, true); - } - function tryScan(callback) { - return speculationHelper(callback, false); - } - function setText(newText, start, length) { - text = newText || ""; - end = length === undefined ? text.length : start + length; - setTextPos(start || 0); - } - function setOnError(errorCallback) { - onError = errorCallback; - } - function setScriptTarget(scriptTarget) { - languageVersion = scriptTarget; - } - function setTextPos(textPos) { - ts.Debug.assert(textPos >= 0); - pos = textPos; - startPos = textPos; - tokenPos = textPos; - token = 0 /* Unknown */; - precedingLineBreak = false; - tokenValue = undefined; - hasExtendedUnicodeEscape = false; - tokenIsUnterminated = false; - } - } - ts.createScanner = createScanner; -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - ts.bindTime = 0; - (function (ModuleInstanceState) { - ModuleInstanceState[ModuleInstanceState["NonInstantiated"] = 0] = "NonInstantiated"; - ModuleInstanceState[ModuleInstanceState["Instantiated"] = 1] = "Instantiated"; - ModuleInstanceState[ModuleInstanceState["ConstEnumOnly"] = 2] = "ConstEnumOnly"; - })(ts.ModuleInstanceState || (ts.ModuleInstanceState = {})); - var ModuleInstanceState = ts.ModuleInstanceState; - function getModuleInstanceState(node) { - // A module is uninstantiated if it contains only - // 1. interface declarations, type alias declarations - if (node.kind === 205 /* InterfaceDeclaration */ || node.kind === 206 /* TypeAliasDeclaration */) { - return 0 /* NonInstantiated */; - } - else if (ts.isConstEnumDeclaration(node)) { - return 2 /* ConstEnumOnly */; - } - else if ((node.kind === 212 /* ImportDeclaration */ || node.kind === 211 /* ImportEqualsDeclaration */) && !(node.flags & 1 /* Export */)) { - return 0 /* NonInstantiated */; - } - else if (node.kind === 209 /* ModuleBlock */) { - var state = 0 /* NonInstantiated */; - ts.forEachChild(node, function (n) { - switch (getModuleInstanceState(n)) { - case 0 /* NonInstantiated */: - // child is non-instantiated - continue searching - return false; - case 2 /* ConstEnumOnly */: - // child is const enum only - record state and continue searching - state = 2 /* ConstEnumOnly */; - return false; - case 1 /* Instantiated */: - // child is instantiated - record state and stop - state = 1 /* Instantiated */; - return true; - } - }); - return state; - } - else if (node.kind === 208 /* ModuleDeclaration */) { - return getModuleInstanceState(node.body); - } - else { - return 1 /* Instantiated */; - } - } - ts.getModuleInstanceState = getModuleInstanceState; - var ContainerFlags; - (function (ContainerFlags) { - // The current node is not a container, and no container manipulation should happen before - // recursing into it. - ContainerFlags[ContainerFlags["None"] = 0] = "None"; - // The current node is a container. It should be set as the current container (and block- - // container) before recursing into it. The current node does not have locals. Examples: - // - // Classes, ObjectLiterals, TypeLiterals, Interfaces... - ContainerFlags[ContainerFlags["IsContainer"] = 1] = "IsContainer"; - // The current node is a block-scoped-container. It should be set as the current block- - // container before recursing into it. Examples: - // - // Blocks (when not parented by functions), Catch clauses, For/For-in/For-of statements... - ContainerFlags[ContainerFlags["IsBlockScopedContainer"] = 2] = "IsBlockScopedContainer"; - ContainerFlags[ContainerFlags["HasLocals"] = 4] = "HasLocals"; - // If the current node is a container that also container that also contains locals. Examples: - // - // Functions, Methods, Modules, Source-files. - ContainerFlags[ContainerFlags["IsContainerWithLocals"] = 5] = "IsContainerWithLocals"; - })(ContainerFlags || (ContainerFlags = {})); - function bindSourceFile(file) { - var start = new Date().getTime(); - bindSourceFileWorker(file); - ts.bindTime += new Date().getTime() - start; - } - ts.bindSourceFile = bindSourceFile; - function bindSourceFileWorker(file) { - var parent; - var container; - var blockScopeContainer; - var lastContainer; - var symbolCount = 0; - var Symbol = ts.objectAllocator.getSymbolConstructor(); - var classifiableNames = {}; - if (!file.locals) { - bind(file); - file.symbolCount = symbolCount; - file.classifiableNames = classifiableNames; - } - return; - function createSymbol(flags, name) { - symbolCount++; - return new Symbol(flags, name); - } - function addDeclarationToSymbol(symbol, node, symbolFlags) { - symbol.flags |= symbolFlags; - node.symbol = symbol; - if (!symbol.declarations) { - symbol.declarations = []; - } - symbol.declarations.push(node); - if (symbolFlags & 1952 /* HasExports */ && !symbol.exports) { - symbol.exports = {}; - } - if (symbolFlags & 6240 /* HasMembers */ && !symbol.members) { - symbol.members = {}; - } - if (symbolFlags & 107455 /* Value */ && !symbol.valueDeclaration) { - symbol.valueDeclaration = node; - } - } - // Should not be called on a declaration with a computed property name, - // unless it is a well known Symbol. - function getDeclarationName(node) { - if (node.name) { - if (node.kind === 208 /* ModuleDeclaration */ && node.name.kind === 8 /* StringLiteral */) { - return '"' + node.name.text + '"'; - } - if (node.name.kind === 129 /* ComputedPropertyName */) { - var nameExpression = node.name.expression; - ts.Debug.assert(ts.isWellKnownSymbolSyntactically(nameExpression)); - return ts.getPropertyNameForKnownSymbolName(nameExpression.name.text); - } - return node.name.text; - } - switch (node.kind) { - case 137 /* Constructor */: - return "__constructor"; - case 145 /* FunctionType */: - case 140 /* CallSignature */: - return "__call"; - case 146 /* ConstructorType */: - case 141 /* ConstructSignature */: - return "__new"; - case 142 /* IndexSignature */: - return "__index"; - case 218 /* ExportDeclaration */: - return "__export"; - case 217 /* ExportAssignment */: - return node.isExportEquals ? "export=" : "default"; - case 203 /* FunctionDeclaration */: - case 204 /* ClassDeclaration */: - return node.flags & 256 /* Default */ ? "default" : undefined; - } - } - function getDisplayName(node) { - return node.name ? ts.declarationNameToString(node.name) : getDeclarationName(node); - } - function declareSymbol(symbolTable, parent, node, includes, excludes) { - ts.Debug.assert(!ts.hasDynamicName(node)); - // The exported symbol for an export default function/class node is always named "default" - var name = node.flags & 256 /* Default */ && parent ? "default" : getDeclarationName(node); - var symbol; - if (name !== undefined) { - // Check and see if the symbol table already has a symbol with this name. If not, - // create a new symbol with this name and add it to the table. Note that we don't - // give the new symbol any flags *yet*. This ensures that it will not conflict - // witht he 'excludes' flags we pass in. - // - // If we do get an existing symbol, see if it conflicts with the new symbol we're - // creating. For example, a 'var' symbol and a 'class' symbol will conflict within - // the same symbol table. If we have a conflict, report the issue on each - // declaration we have for this symbol, and then create a new symbol for this - // declaration. - // - // If we created a new symbol, either because we didn't have a symbol with this name - // in the symbol table, or we conflicted with an existing symbol, then just add this - // node as the sole declaration of the new symbol. - // - // Otherwise, we'll be merging into a compatible existing symbol (for example when - // you have multiple 'vars' with the same name in the same container). In this case - // just add this node into the declarations list of the symbol. - symbol = ts.hasProperty(symbolTable, name) - ? symbolTable[name] - : (symbolTable[name] = createSymbol(0 /* None */, name)); - if (name && (includes & 788448 /* Classifiable */)) { - classifiableNames[name] = name; - } - if (symbol.flags & excludes) { - if (node.name) { - node.name.parent = node; - } - // Report errors every position with duplicate declaration - // Report errors on previous encountered declarations - var message = symbol.flags & 2 /* BlockScopedVariable */ - ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 - : ts.Diagnostics.Duplicate_identifier_0; - ts.forEach(symbol.declarations, function (declaration) { - file.bindDiagnostics.push(ts.createDiagnosticForNode(declaration.name || declaration, message, getDisplayName(declaration))); - }); - file.bindDiagnostics.push(ts.createDiagnosticForNode(node.name || node, message, getDisplayName(node))); - symbol = createSymbol(0 /* None */, name); - } - } - else { - symbol = createSymbol(0 /* None */, "__missing"); - } - addDeclarationToSymbol(symbol, node, includes); - symbol.parent = parent; - return symbol; - } - function declareModuleMember(node, symbolFlags, symbolExcludes) { - var hasExportModifier = ts.getCombinedNodeFlags(node) & 1 /* Export */; - if (symbolFlags & 8388608 /* Alias */) { - if (node.kind === 220 /* ExportSpecifier */ || (node.kind === 211 /* ImportEqualsDeclaration */ && hasExportModifier)) { - return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - } - else { - return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); - } - } - else { - // Exported module members are given 2 symbols: A local symbol that is classified with an ExportValue, - // ExportType, or ExportContainer flag, and an associated export symbol with all the correct flags set - // on it. There are 2 main reasons: - // - // 1. We treat locals and exports of the same name as mutually exclusive within a container. - // That means the binder will issue a Duplicate Identifier error if you mix locals and exports - // with the same name in the same container. - // TODO: Make this a more specific error and decouple it from the exclusion logic. - // 2. When we checkIdentifier in the checker, we set its resolved symbol to the local symbol, - // but return the export symbol (by calling getExportSymbolOfValueSymbolIfExported). That way - // when the emitter comes back to it, it knows not to qualify the name if it was found in a containing scope. - if (hasExportModifier || container.flags & 65536 /* ExportContext */) { - var exportKind = (symbolFlags & 107455 /* Value */ ? 1048576 /* ExportValue */ : 0) | - (symbolFlags & 793056 /* Type */ ? 2097152 /* ExportType */ : 0) | - (symbolFlags & 1536 /* Namespace */ ? 4194304 /* ExportNamespace */ : 0); - var local = declareSymbol(container.locals, undefined, node, exportKind, symbolExcludes); - local.exportSymbol = declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - node.localSymbol = local; - return local; - } - else { - return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); - } - } - } - // All container nodes are kept on a linked list in declaration order. This list is used by - // the getLocalNameOfContainer function in the type checker to validate that the local name - // used for a container is unique. - function bindChildren(node) { - // Before we recurse into a node's chilren, we first save the existing parent, container - // and block-container. Then after we pop out of processing the children, we restore - // these saved values. - var saveParent = parent; - var saveContainer = container; - var savedBlockScopeContainer = blockScopeContainer; - // This node will now be set as the parent of all of its children as we recurse into them. - parent = node; - // Depending on what kind of node this is, we may have to adjust the current container - // and block-container. If the current node is a container, then it is automatically - // considered the current block-container as well. Also, for containers that we know - // may contain locals, we proactively initialize the .locals field. We do this because - // it's highly likely that the .locals will be needed to place some child in (for example, - // a parameter, or variable declaration). - // - // However, we do not proactively create the .locals for block-containers because it's - // totally normal and common for block-containers to never actually have a block-scoped - // variable in them. We don't want to end up allocating an object for every 'block' we - // run into when most of them won't be necessary. - // - // Finally, if this is a block-container, then we clear out any existing .locals object - // it may contain within it. This happens in incremental scenarios. Because we can be - // reusing a node from a previous compilation, that node may have had 'locals' created - // for it. We must clear this so we don't accidently move any stale data forward from - // a previous compilation. - var containerFlags = getContainerFlags(node); - if (containerFlags & 1 /* IsContainer */) { - container = blockScopeContainer = node; - if (containerFlags & 4 /* HasLocals */) { - container.locals = {}; - } - addToContainerChain(container); - } - else if (containerFlags & 2 /* IsBlockScopedContainer */) { - blockScopeContainer = node; - blockScopeContainer.locals = undefined; - } - ts.forEachChild(node, bind); - container = saveContainer; - parent = saveParent; - blockScopeContainer = savedBlockScopeContainer; - } - function getContainerFlags(node) { - switch (node.kind) { - case 177 /* ClassExpression */: - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 207 /* EnumDeclaration */: - case 148 /* TypeLiteral */: - case 157 /* ObjectLiteralExpression */: - return 1 /* IsContainer */; - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 142 /* IndexSignature */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 203 /* FunctionDeclaration */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - case 208 /* ModuleDeclaration */: - case 230 /* SourceFile */: - case 206 /* TypeAliasDeclaration */: - return 5 /* IsContainerWithLocals */; - case 226 /* CatchClause */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 210 /* CaseBlock */: - return 2 /* IsBlockScopedContainer */; - case 182 /* Block */: - // do not treat blocks directly inside a function as a block-scoped-container. - // Locals that reside in this block should go to the function locals. Othewise 'x' - // would not appear to be a redeclaration of a block scoped local in the following - // example: - // - // function foo() { - // var x; - // let x; - // } - // - // If we placed 'var x' into the function locals and 'let x' into the locals of - // the block, then there would be no collision. - // - // By not creating a new block-scoped-container here, we ensure that both 'var x' - // and 'let x' go into the Function-container's locals, and we do get a collision - // conflict. - return ts.isFunctionLike(node.parent) ? 0 /* None */ : 2 /* IsBlockScopedContainer */; - } - return 0 /* None */; - } - function addToContainerChain(next) { - if (lastContainer) { - lastContainer.nextContainer = next; - } - lastContainer = next; - } - function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) { - // Just call this directly so that the return type of this function stays "void". - declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes); - } - function declareSymbolAndAddToSymbolTableWorker(node, symbolFlags, symbolExcludes) { - switch (container.kind) { - // Modules, source files, and classes need specialized handling for how their - // members are declared (for example, a member of a class will go into a specific - // symbol table depending on if it is static or not). We defer to specialized - // handlers to take care of declaring these child members. - case 208 /* ModuleDeclaration */: - return declareModuleMember(node, symbolFlags, symbolExcludes); - case 230 /* SourceFile */: - return declareSourceFileMember(node, symbolFlags, symbolExcludes); - case 177 /* ClassExpression */: - case 204 /* ClassDeclaration */: - return declareClassMember(node, symbolFlags, symbolExcludes); - case 207 /* EnumDeclaration */: - return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes); - case 148 /* TypeLiteral */: - case 157 /* ObjectLiteralExpression */: - case 205 /* InterfaceDeclaration */: - // Interface/Object-types always have their children added to the 'members' of - // their container. They are only accessible through an instance of their - // container, and are never in scope otherwise (even inside the body of the - // object / type / interface declaring them). An exception is type parameters, - // which are in scope without qualification (similar to 'locals'). - return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 142 /* IndexSignature */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - case 206 /* TypeAliasDeclaration */: - // All the children of these container types are never visible through another - // symbol (i.e. through another symbol's 'exports' or 'members'). Instead, - // they're only accessed 'lexically' (i.e. from code that exists underneath - // their container in the tree. To accomplish this, we simply add their declared - // symbol to the 'locals' of the container. These symbols can then be found as - // the type checker walks up the containers, checking them for matching names. - return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes); - } - } - function declareClassMember(node, symbolFlags, symbolExcludes) { - return node.flags & 128 /* Static */ - ? declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes) - : declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes); - } - function declareSourceFileMember(node, symbolFlags, symbolExcludes) { - return ts.isExternalModule(file) - ? declareModuleMember(node, symbolFlags, symbolExcludes) - : declareSymbol(file.locals, undefined, node, symbolFlags, symbolExcludes); - } - function isAmbientContext(node) { - while (node) { - if (node.flags & 2 /* Ambient */) { - return true; - } - node = node.parent; - } - return false; - } - function hasExportDeclarations(node) { - var body = node.kind === 230 /* SourceFile */ ? node : node.body; - if (body.kind === 230 /* SourceFile */ || body.kind === 209 /* ModuleBlock */) { - for (var _i = 0, _a = body.statements; _i < _a.length; _i++) { - var stat = _a[_i]; - if (stat.kind === 218 /* ExportDeclaration */ || stat.kind === 217 /* ExportAssignment */) { - return true; - } - } - } - return false; - } - function setExportContextFlag(node) { - // A declaration source file or ambient module declaration that contains no export declarations (but possibly regular - // declarations with export modifiers) is an export context in which declarations are implicitly exported. - if (isAmbientContext(node) && !hasExportDeclarations(node)) { - node.flags |= 65536 /* ExportContext */; - } - else { - node.flags &= ~65536 /* ExportContext */; - } - } - function bindModuleDeclaration(node) { - setExportContextFlag(node); - if (node.name.kind === 8 /* StringLiteral */) { - declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */); - } - else { - var state = getModuleInstanceState(node); - if (state === 0 /* NonInstantiated */) { - declareSymbolAndAddToSymbolTable(node, 1024 /* NamespaceModule */, 0 /* NamespaceModuleExcludes */); - } - else { - declareSymbolAndAddToSymbolTable(node, 512 /* ValueModule */, 106639 /* ValueModuleExcludes */); - var currentModuleIsConstEnumOnly = state === 2 /* ConstEnumOnly */; - if (node.symbol.constEnumOnlyModule === undefined) { - // non-merged case - use the current state - node.symbol.constEnumOnlyModule = currentModuleIsConstEnumOnly; - } - else { - // merged case: module is const enum only if all its pieces are non-instantiated or const enum - node.symbol.constEnumOnlyModule = node.symbol.constEnumOnlyModule && currentModuleIsConstEnumOnly; - } - } - } - } - function bindFunctionOrConstructorType(node) { - // For a given function symbol "<...>(...) => T" we want to generate a symbol identical - // to the one we would get for: { <...>(...): T } - // - // We do that by making an anonymous type literal symbol, and then setting the function - // symbol as its sole member. To the rest of the system, this symbol will be indistinguishable - // from an actual type literal symbol you would have gotten had you used the long form. - var symbol = createSymbol(131072 /* Signature */, getDeclarationName(node)); - addDeclarationToSymbol(symbol, node, 131072 /* Signature */); - var typeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type"); - addDeclarationToSymbol(typeLiteralSymbol, node, 2048 /* TypeLiteral */); - typeLiteralSymbol.members = (_a = {}, _a[symbol.name] = symbol, _a); - var _a; - } - function bindAnonymousDeclaration(node, symbolFlags, name) { - var symbol = createSymbol(symbolFlags, name); - addDeclarationToSymbol(symbol, node, symbolFlags); - } - function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) { - switch (blockScopeContainer.kind) { - case 208 /* ModuleDeclaration */: - declareModuleMember(node, symbolFlags, symbolExcludes); - break; - case 230 /* SourceFile */: - if (ts.isExternalModule(container)) { - declareModuleMember(node, symbolFlags, symbolExcludes); - break; - } - // fall through. - default: - if (!blockScopeContainer.locals) { - blockScopeContainer.locals = {}; - addToContainerChain(blockScopeContainer); - } - declareSymbol(blockScopeContainer.locals, undefined, node, symbolFlags, symbolExcludes); - } - } - function bindBlockScopedVariableDeclaration(node) { - bindBlockScopedDeclaration(node, 2 /* BlockScopedVariable */, 107455 /* BlockScopedVariableExcludes */); - } - function getDestructuringParameterName(node) { - return "__" + ts.indexOf(node.parent.parameters, node); - } - function bind(node) { - node.parent = parent; - // First we bind declaration nodes to a symbol if possible. We'll both create a symbol - // and then potentially add the symbol to an appropriate symbol table. Possible - // destination symbol tables are: - // - // 1) The 'exports' table of the current container's symbol. - // 2) The 'members' table of the current container's symbol. - // 3) The 'locals' table of the current container. - // - // However, not all symbols will end up in any of these tables. 'Anonymous' symbols - // (like TypeLiterals for example) will not be put in any table. - bindWorker(node); - // Then we recurse into the children of the node to bind them as well. For certain - // symbols we do specialized work when we recurse. For example, we'll keep track of - // the current 'container' node when it changes. This helps us know which symbol table - // a local should go into for example. - bindChildren(node); - } - function bindWorker(node) { - switch (node.kind) { - case 130 /* TypeParameter */: - return declareSymbolAndAddToSymbolTable(node, 262144 /* TypeParameter */, 530912 /* TypeParameterExcludes */); - case 131 /* Parameter */: - return bindParameter(node); - case 201 /* VariableDeclaration */: - case 155 /* BindingElement */: - return bindVariableDeclarationOrBindingElement(node); - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - return bindPropertyOrMethodOrAccessor(node, 4 /* Property */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), 107455 /* PropertyExcludes */); - case 227 /* PropertyAssignment */: - case 228 /* ShorthandPropertyAssignment */: - return bindPropertyOrMethodOrAccessor(node, 4 /* Property */, 107455 /* PropertyExcludes */); - case 229 /* EnumMember */: - return bindPropertyOrMethodOrAccessor(node, 8 /* EnumMember */, 107455 /* EnumMemberExcludes */); - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 142 /* IndexSignature */: - return declareSymbolAndAddToSymbolTable(node, 131072 /* Signature */, 0 /* None */); - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - // If this is an ObjectLiteralExpression method, then it sits in the same space - // as other properties in the object literal. So we use SymbolFlags.PropertyExcludes - // so that it will conflict with any other object literal members with the same - // name. - return bindPropertyOrMethodOrAccessor(node, 8192 /* Method */ | (node.questionToken ? 536870912 /* Optional */ : 0 /* None */), ts.isObjectLiteralMethod(node) ? 107455 /* PropertyExcludes */ : 99263 /* MethodExcludes */); - case 203 /* FunctionDeclaration */: - return declareSymbolAndAddToSymbolTable(node, 16 /* Function */, 106927 /* FunctionExcludes */); - case 137 /* Constructor */: - return declareSymbolAndAddToSymbolTable(node, 16384 /* Constructor */, 0 /* None */); - case 138 /* GetAccessor */: - return bindPropertyOrMethodOrAccessor(node, 32768 /* GetAccessor */, 41919 /* GetAccessorExcludes */); - case 139 /* SetAccessor */: - return bindPropertyOrMethodOrAccessor(node, 65536 /* SetAccessor */, 74687 /* SetAccessorExcludes */); - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - return bindFunctionOrConstructorType(node); - case 148 /* TypeLiteral */: - return bindAnonymousDeclaration(node, 2048 /* TypeLiteral */, "__type"); - case 157 /* ObjectLiteralExpression */: - return bindAnonymousDeclaration(node, 4096 /* ObjectLiteral */, "__object"); - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - return bindAnonymousDeclaration(node, 16 /* Function */, "__function"); - case 177 /* ClassExpression */: - case 204 /* ClassDeclaration */: - return bindClassLikeDeclaration(node); - case 205 /* InterfaceDeclaration */: - return bindBlockScopedDeclaration(node, 64 /* Interface */, 792992 /* InterfaceExcludes */); - case 206 /* TypeAliasDeclaration */: - return bindBlockScopedDeclaration(node, 524288 /* TypeAlias */, 793056 /* TypeAliasExcludes */); - case 207 /* EnumDeclaration */: - return bindEnumDeclaration(node); - case 208 /* ModuleDeclaration */: - return bindModuleDeclaration(node); - case 211 /* ImportEqualsDeclaration */: - case 214 /* NamespaceImport */: - case 216 /* ImportSpecifier */: - case 220 /* ExportSpecifier */: - return declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); - case 213 /* ImportClause */: - return bindImportClause(node); - case 218 /* ExportDeclaration */: - return bindExportDeclaration(node); - case 217 /* ExportAssignment */: - return bindExportAssignment(node); - case 230 /* SourceFile */: - return bindSourceFileIfExternalModule(); - } - } - function bindSourceFileIfExternalModule() { - setExportContextFlag(file); - if (ts.isExternalModule(file)) { - bindAnonymousDeclaration(file, 512 /* ValueModule */, '"' + ts.removeFileExtension(file.fileName) + '"'); - } - } - function bindExportAssignment(node) { - if (!container.symbol || !container.symbol.exports) { - // Export assignment in some sort of block construct - bindAnonymousDeclaration(node, 8388608 /* Alias */, getDeclarationName(node)); - } - else if (node.expression.kind === 65 /* Identifier */) { - // An export default clause with an identifier exports all meanings of that identifier - declareSymbol(container.symbol.exports, container.symbol, node, 8388608 /* Alias */, 107455 /* PropertyExcludes */ | 8388608 /* AliasExcludes */); - } - else { - // An export default clause with an expression exports a value - declareSymbol(container.symbol.exports, container.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */ | 8388608 /* AliasExcludes */); - } - } - function bindExportDeclaration(node) { - if (!container.symbol || !container.symbol.exports) { - // Export * in some sort of block construct - bindAnonymousDeclaration(node, 1073741824 /* ExportStar */, getDeclarationName(node)); - } - else if (!node.exportClause) { - // All export * declarations are collected in an __export symbol - declareSymbol(container.symbol.exports, container.symbol, node, 1073741824 /* ExportStar */, 0 /* None */); - } - } - function bindImportClause(node) { - if (node.name) { - declareSymbolAndAddToSymbolTable(node, 8388608 /* Alias */, 8388608 /* AliasExcludes */); - } - } - function bindClassLikeDeclaration(node) { - if (node.kind === 204 /* ClassDeclaration */) { - bindBlockScopedDeclaration(node, 32 /* Class */, 899583 /* ClassExcludes */); - } - else { - bindAnonymousDeclaration(node, 32 /* Class */, "__class"); - } - var symbol = node.symbol; - // TypeScript 1.0 spec (April 2014): 8.4 - // Every class automatically contains a static property member named 'prototype', the - // type of which is an instantiation of the class type with type Any supplied as a type - // argument for each type parameter. It is an error to explicitly declare a static - // property member with the name 'prototype'. - // - // Note: we check for this here because this class may be merging into a module. The - // module might have an exported variable called 'prototype'. We can't allow that as - // that would clash with the built-in 'prototype' for the class. - var prototypeSymbol = createSymbol(4 /* Property */ | 134217728 /* Prototype */, "prototype"); - if (ts.hasProperty(symbol.exports, prototypeSymbol.name)) { - if (node.name) { - node.name.parent = node; - } - file.bindDiagnostics.push(ts.createDiagnosticForNode(symbol.exports[prototypeSymbol.name].declarations[0], ts.Diagnostics.Duplicate_identifier_0, prototypeSymbol.name)); - } - symbol.exports[prototypeSymbol.name] = prototypeSymbol; - prototypeSymbol.parent = symbol; - } - function bindEnumDeclaration(node) { - return ts.isConst(node) - ? bindBlockScopedDeclaration(node, 128 /* ConstEnum */, 899967 /* ConstEnumExcludes */) - : bindBlockScopedDeclaration(node, 256 /* RegularEnum */, 899327 /* RegularEnumExcludes */); - } - function bindVariableDeclarationOrBindingElement(node) { - if (!ts.isBindingPattern(node.name)) { - if (ts.isBlockOrCatchScoped(node)) { - bindBlockScopedVariableDeclaration(node); - } - else if (ts.isParameterDeclaration(node)) { - // It is safe to walk up parent chain to find whether the node is a destructing parameter declaration - // because its parent chain has already been set up, since parents are set before descending into children. - // - // If node is a binding element in parameter declaration, we need to use ParameterExcludes. - // Using ParameterExcludes flag allows the compiler to report an error on duplicate identifiers in Parameter Declaration - // For example: - // function foo([a,a]) {} // Duplicate Identifier error - // function bar(a,a) {} // Duplicate Identifier error, parameter declaration in this case is handled in bindParameter - // // which correctly set excluded symbols - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107455 /* ParameterExcludes */); - } - else { - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107454 /* FunctionScopedVariableExcludes */); - } - } - } - function bindParameter(node) { - if (ts.isBindingPattern(node.name)) { - bindAnonymousDeclaration(node, 1 /* FunctionScopedVariable */, getDestructuringParameterName(node)); - } - else { - declareSymbolAndAddToSymbolTable(node, 1 /* FunctionScopedVariable */, 107455 /* ParameterExcludes */); - } - // If this is a property-parameter, then also declare the property symbol into the - // containing class. - if (node.flags & 112 /* AccessibilityModifier */ && - node.parent.kind === 137 /* Constructor */ && - (node.parent.parent.kind === 204 /* ClassDeclaration */ || node.parent.parent.kind === 177 /* ClassExpression */)) { - var classDeclaration = node.parent.parent; - declareSymbol(classDeclaration.symbol.members, classDeclaration.symbol, node, 4 /* Property */, 107455 /* PropertyExcludes */); - } - } - function bindPropertyOrMethodOrAccessor(node, symbolFlags, symbolExcludes) { - return ts.hasDynamicName(node) - ? bindAnonymousDeclaration(node, symbolFlags, "__computed") - : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); - } - } -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - function getDeclarationOfKind(symbol, kind) { - var declarations = symbol.declarations; - for (var _i = 0; _i < declarations.length; _i++) { - var declaration = declarations[_i]; - if (declaration.kind === kind) { - return declaration; - } - } - return undefined; - } - ts.getDeclarationOfKind = getDeclarationOfKind; - // Pool writers to avoid needing to allocate them for every symbol we write. - var stringWriters = []; - function getSingleLineStringWriter() { - if (stringWriters.length == 0) { - var str = ""; - var writeText = function (text) { return str += text; }; - return { - string: function () { return str; }, - writeKeyword: writeText, - writeOperator: writeText, - writePunctuation: writeText, - writeSpace: writeText, - writeStringLiteral: writeText, - writeParameter: writeText, - writeSymbol: writeText, - // Completely ignore indentation for string writers. And map newlines to - // a single space. - writeLine: function () { return str += " "; }, - increaseIndent: function () { }, - decreaseIndent: function () { }, - clear: function () { return str = ""; }, - trackSymbol: function () { } - }; - } - return stringWriters.pop(); - } - ts.getSingleLineStringWriter = getSingleLineStringWriter; - function releaseStringWriter(writer) { - writer.clear(); - stringWriters.push(writer); - } - ts.releaseStringWriter = releaseStringWriter; - function getFullWidth(node) { - return node.end - node.pos; - } - ts.getFullWidth = getFullWidth; - // Returns true if this node contains a parse error anywhere underneath it. - function containsParseError(node) { - aggregateChildData(node); - return (node.parserContextFlags & 128 /* ThisNodeOrAnySubNodesHasError */) !== 0; - } - ts.containsParseError = containsParseError; - function aggregateChildData(node) { - if (!(node.parserContextFlags & 256 /* HasAggregatedChildData */)) { - // A node is considered to contain a parse error if: - // a) the parser explicitly marked that it had an error - // b) any of it's children reported that it had an error. - var thisNodeOrAnySubNodesHasError = ((node.parserContextFlags & 32 /* ThisNodeHasError */) !== 0) || - ts.forEachChild(node, containsParseError); - // If so, mark ourselves accordingly. - if (thisNodeOrAnySubNodesHasError) { - node.parserContextFlags |= 128 /* ThisNodeOrAnySubNodesHasError */; - } - // Also mark that we've propogated the child information to this node. This way we can - // always consult the bit directly on this node without needing to check its children - // again. - node.parserContextFlags |= 256 /* HasAggregatedChildData */; - } - } - function getSourceFileOfNode(node) { - while (node && node.kind !== 230 /* SourceFile */) { - node = node.parent; - } - return node; - } - ts.getSourceFileOfNode = getSourceFileOfNode; - function getStartPositionOfLine(line, sourceFile) { - ts.Debug.assert(line >= 0); - return ts.getLineStarts(sourceFile)[line]; - } - ts.getStartPositionOfLine = getStartPositionOfLine; - // This is a useful function for debugging purposes. - function nodePosToString(node) { - var file = getSourceFileOfNode(node); - var loc = ts.getLineAndCharacterOfPosition(file, node.pos); - return file.fileName + "(" + (loc.line + 1) + "," + (loc.character + 1) + ")"; - } - ts.nodePosToString = nodePosToString; - function getStartPosOfNode(node) { - return node.pos; - } - ts.getStartPosOfNode = getStartPosOfNode; - // Returns true if this node is missing from the actual source code. 'missing' is different - // from 'undefined/defined'. When a node is undefined (which can happen for optional nodes - // in the tree), it is definitel missing. HOwever, a node may be defined, but still be - // missing. This happens whenever the parser knows it needs to parse something, but can't - // get anything in the source code that it expects at that location. For example: - // - // let a: ; - // - // Here, the Type in the Type-Annotation is not-optional (as there is a colon in the source - // code). So the parser will attempt to parse out a type, and will create an actual node. - // However, this node will be 'missing' in the sense that no actual source-code/tokens are - // contained within it. - function nodeIsMissing(node) { - if (!node) { - return true; - } - return node.pos === node.end && node.kind !== 1 /* EndOfFileToken */; - } - ts.nodeIsMissing = nodeIsMissing; - function nodeIsPresent(node) { - return !nodeIsMissing(node); - } - ts.nodeIsPresent = nodeIsPresent; - function getTokenPosOfNode(node, sourceFile) { - // With nodes that have no width (i.e. 'Missing' nodes), we actually *don't* - // want to skip trivia because this will launch us forward to the next token. - if (nodeIsMissing(node)) { - return node.pos; - } - return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos); - } - ts.getTokenPosOfNode = getTokenPosOfNode; - function getNonDecoratorTokenPosOfNode(node, sourceFile) { - if (nodeIsMissing(node) || !node.decorators) { - return getTokenPosOfNode(node, sourceFile); - } - return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.decorators.end); - } - ts.getNonDecoratorTokenPosOfNode = getNonDecoratorTokenPosOfNode; - function getSourceTextOfNodeFromSourceFile(sourceFile, node) { - if (nodeIsMissing(node)) { - return ""; - } - var text = sourceFile.text; - return text.substring(ts.skipTrivia(text, node.pos), node.end); - } - ts.getSourceTextOfNodeFromSourceFile = getSourceTextOfNodeFromSourceFile; - function getTextOfNodeFromSourceText(sourceText, node) { - if (nodeIsMissing(node)) { - return ""; - } - return sourceText.substring(ts.skipTrivia(sourceText, node.pos), node.end); - } - ts.getTextOfNodeFromSourceText = getTextOfNodeFromSourceText; - function getTextOfNode(node) { - return getSourceTextOfNodeFromSourceFile(getSourceFileOfNode(node), node); - } - ts.getTextOfNode = getTextOfNode; - // Add an extra underscore to identifiers that start with two underscores to avoid issues with magic names like '__proto__' - function escapeIdentifier(identifier) { - return identifier.length >= 2 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ ? "_" + identifier : identifier; - } - ts.escapeIdentifier = escapeIdentifier; - // Remove extra underscore from escaped identifier - function unescapeIdentifier(identifier) { - return identifier.length >= 3 && identifier.charCodeAt(0) === 95 /* _ */ && identifier.charCodeAt(1) === 95 /* _ */ && identifier.charCodeAt(2) === 95 /* _ */ ? identifier.substr(1) : identifier; - } - ts.unescapeIdentifier = unescapeIdentifier; - // Make an identifier from an external module name by extracting the string after the last "/" and replacing - // all non-alphanumeric characters with underscores - function makeIdentifierFromModuleName(moduleName) { - return ts.getBaseFileName(moduleName).replace(/\W/g, "_"); - } - ts.makeIdentifierFromModuleName = makeIdentifierFromModuleName; - function isBlockOrCatchScoped(declaration) { - return (getCombinedNodeFlags(declaration) & 12288 /* BlockScoped */) !== 0 || - isCatchClauseVariableDeclaration(declaration); - } - ts.isBlockOrCatchScoped = isBlockOrCatchScoped; - // Gets the nearest enclosing block scope container that has the provided node - // as a descendant, that is not the provided node. - function getEnclosingBlockScopeContainer(node) { - var current = node.parent; - while (current) { - if (isFunctionLike(current)) { - return current; - } - switch (current.kind) { - case 230 /* SourceFile */: - case 210 /* CaseBlock */: - case 226 /* CatchClause */: - case 208 /* ModuleDeclaration */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - return current; - case 182 /* Block */: - // function block is not considered block-scope container - // see comment in binder.ts: bind(...), case for SyntaxKind.Block - if (!isFunctionLike(current.parent)) { - return current; - } - } - current = current.parent; - } - } - ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer; - function isCatchClauseVariableDeclaration(declaration) { - return declaration && - declaration.kind === 201 /* VariableDeclaration */ && - declaration.parent && - declaration.parent.kind === 226 /* CatchClause */; - } - ts.isCatchClauseVariableDeclaration = isCatchClauseVariableDeclaration; - // Return display name of an identifier - // Computed property names will just be emitted as "[]", where is the source - // text of the expression in the computed property. - function declarationNameToString(name) { - return getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name); - } - ts.declarationNameToString = declarationNameToString; - function createDiagnosticForNode(node, message, arg0, arg1, arg2) { - var sourceFile = getSourceFileOfNode(node); - var span = getErrorSpanForNode(sourceFile, node); - return ts.createFileDiagnostic(sourceFile, span.start, span.length, message, arg0, arg1, arg2); - } - ts.createDiagnosticForNode = createDiagnosticForNode; - function createDiagnosticForNodeFromMessageChain(node, messageChain) { - var sourceFile = getSourceFileOfNode(node); - var span = getErrorSpanForNode(sourceFile, node); - return { - file: sourceFile, - start: span.start, - length: span.length, - code: messageChain.code, - category: messageChain.category, - messageText: messageChain.next ? messageChain : messageChain.messageText - }; - } - ts.createDiagnosticForNodeFromMessageChain = createDiagnosticForNodeFromMessageChain; - function getSpanOfTokenAtPosition(sourceFile, pos) { - var scanner = ts.createScanner(sourceFile.languageVersion, true, sourceFile.text, undefined, pos); - scanner.scan(); - var start = scanner.getTokenPos(); - return ts.createTextSpanFromBounds(start, scanner.getTextPos()); - } - ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition; - function getErrorSpanForNode(sourceFile, node) { - var errorNode = node; - switch (node.kind) { - case 230 /* SourceFile */: - var pos_1 = ts.skipTrivia(sourceFile.text, 0, false); - if (pos_1 === sourceFile.text.length) { - // file is empty - return span for the beginning of the file - return ts.createTextSpan(0, 0); - } - return getSpanOfTokenAtPosition(sourceFile, pos_1); - // This list is a work in progress. Add missing node kinds to improve their error - // spans. - case 201 /* VariableDeclaration */: - case 155 /* BindingElement */: - case 204 /* ClassDeclaration */: - case 177 /* ClassExpression */: - case 205 /* InterfaceDeclaration */: - case 208 /* ModuleDeclaration */: - case 207 /* EnumDeclaration */: - case 229 /* EnumMember */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - errorNode = node.name; - break; - } - if (errorNode === undefined) { - // If we don't have a better node, then just set the error on the first token of - // construct. - return getSpanOfTokenAtPosition(sourceFile, node.pos); - } - var pos = nodeIsMissing(errorNode) - ? errorNode.pos - : ts.skipTrivia(sourceFile.text, errorNode.pos); - return ts.createTextSpanFromBounds(pos, errorNode.end); - } - ts.getErrorSpanForNode = getErrorSpanForNode; - function isExternalModule(file) { - return file.externalModuleIndicator !== undefined; - } - ts.isExternalModule = isExternalModule; - function isDeclarationFile(file) { - return (file.flags & 2048 /* DeclarationFile */) !== 0; - } - ts.isDeclarationFile = isDeclarationFile; - function isConstEnumDeclaration(node) { - return node.kind === 207 /* EnumDeclaration */ && isConst(node); - } - ts.isConstEnumDeclaration = isConstEnumDeclaration; - function walkUpBindingElementsAndPatterns(node) { - while (node && (node.kind === 155 /* BindingElement */ || isBindingPattern(node))) { - node = node.parent; - } - return node; - } - // Returns the node flags for this node and all relevant parent nodes. This is done so that - // nodes like variable declarations and binding elements can returned a view of their flags - // that includes the modifiers from their container. i.e. flags like export/declare aren't - // stored on the variable declaration directly, but on the containing variable statement - // (if it has one). Similarly, flags for let/const are store on the variable declaration - // list. By calling this function, all those flags are combined so that the client can treat - // the node as if it actually had those flags. - function getCombinedNodeFlags(node) { - node = walkUpBindingElementsAndPatterns(node); - var flags = node.flags; - if (node.kind === 201 /* VariableDeclaration */) { - node = node.parent; - } - if (node && node.kind === 202 /* VariableDeclarationList */) { - flags |= node.flags; - node = node.parent; - } - if (node && node.kind === 183 /* VariableStatement */) { - flags |= node.flags; - } - return flags; - } - ts.getCombinedNodeFlags = getCombinedNodeFlags; - function isConst(node) { - return !!(getCombinedNodeFlags(node) & 8192 /* Const */); - } - ts.isConst = isConst; - function isLet(node) { - return !!(getCombinedNodeFlags(node) & 4096 /* Let */); - } - ts.isLet = isLet; - function isPrologueDirective(node) { - return node.kind === 185 /* ExpressionStatement */ && node.expression.kind === 8 /* StringLiteral */; - } - ts.isPrologueDirective = isPrologueDirective; - function getLeadingCommentRangesOfNode(node, sourceFileOfNode) { - // If parameter/type parameter, the prev token trailing comments are part of this node too - if (node.kind === 131 /* Parameter */ || node.kind === 130 /* TypeParameter */) { - // e.g. (/** blah */ a, /** blah */ b); - // e.g.: ( - // /** blah */ a, - // /** blah */ b); - return ts.concatenate(ts.getTrailingCommentRanges(sourceFileOfNode.text, node.pos), ts.getLeadingCommentRanges(sourceFileOfNode.text, node.pos)); - } - else { - return ts.getLeadingCommentRanges(sourceFileOfNode.text, node.pos); - } - } - ts.getLeadingCommentRangesOfNode = getLeadingCommentRangesOfNode; - function getJsDocComments(node, sourceFileOfNode) { - return ts.filter(getLeadingCommentRangesOfNode(node, sourceFileOfNode), isJsDocComment); - function isJsDocComment(comment) { - // True if the comment starts with '/**' but not if it is '/**/' - return sourceFileOfNode.text.charCodeAt(comment.pos + 1) === 42 /* asterisk */ && - sourceFileOfNode.text.charCodeAt(comment.pos + 2) === 42 /* asterisk */ && - sourceFileOfNode.text.charCodeAt(comment.pos + 3) !== 47 /* slash */; - } - } - ts.getJsDocComments = getJsDocComments; - ts.fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/; - function isTypeNode(node) { - if (144 /* FirstTypeNode */ <= node.kind && node.kind <= 152 /* LastTypeNode */) { - return true; - } - switch (node.kind) { - case 112 /* AnyKeyword */: - case 121 /* NumberKeyword */: - case 123 /* StringKeyword */: - case 113 /* BooleanKeyword */: - case 124 /* SymbolKeyword */: - return true; - case 99 /* VoidKeyword */: - return node.parent.kind !== 169 /* VoidExpression */; - case 8 /* StringLiteral */: - // Specialized signatures can have string literals as their parameters' type names - return node.parent.kind === 131 /* Parameter */; - case 179 /* ExpressionWithTypeArguments */: - return true; - // Identifiers and qualified names may be type nodes, depending on their context. Climb - // above them to find the lowest container - case 65 /* Identifier */: - // If the identifier is the RHS of a qualified name, then it's a type iff its parent is. - if (node.parent.kind === 128 /* QualifiedName */ && node.parent.right === node) { - node = node.parent; - } - else if (node.parent.kind === 158 /* PropertyAccessExpression */ && node.parent.name === node) { - node = node.parent; - } - // fall through - case 128 /* QualifiedName */: - case 158 /* PropertyAccessExpression */: - // At this point, node is either a qualified name or an identifier - ts.Debug.assert(node.kind === 65 /* Identifier */ || node.kind === 128 /* QualifiedName */ || node.kind === 158 /* PropertyAccessExpression */, "'node' was expected to be a qualified name, identifier or property access in 'isTypeNode'."); - var parent_1 = node.parent; - if (parent_1.kind === 147 /* TypeQuery */) { - return false; - } - // Do not recursively call isTypeNode on the parent. In the example: - // - // let a: A.B.C; - // - // Calling isTypeNode would consider the qualified name A.B a type node. Only C or - // A.B.C is a type node. - if (144 /* FirstTypeNode */ <= parent_1.kind && parent_1.kind <= 152 /* LastTypeNode */) { - return true; - } - switch (parent_1.kind) { - case 179 /* ExpressionWithTypeArguments */: - return true; - case 130 /* TypeParameter */: - return node === parent_1.constraint; - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 131 /* Parameter */: - case 201 /* VariableDeclaration */: - return node === parent_1.type; - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - case 137 /* Constructor */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - return node === parent_1.type; - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 142 /* IndexSignature */: - return node === parent_1.type; - case 163 /* TypeAssertionExpression */: - return node === parent_1.type; - case 160 /* CallExpression */: - case 161 /* NewExpression */: - return parent_1.typeArguments && ts.indexOf(parent_1.typeArguments, node) >= 0; - case 162 /* TaggedTemplateExpression */: - // TODO (drosen): TaggedTemplateExpressions may eventually support type arguments. - return false; - } - } - return false; - } - ts.isTypeNode = isTypeNode; - // Warning: This has the same semantics as the forEach family of functions, - // in that traversal terminates in the event that 'visitor' supplies a truthy value. - function forEachReturnStatement(body, visitor) { - return traverse(body); - function traverse(node) { - switch (node.kind) { - case 194 /* ReturnStatement */: - return visitor(node); - case 210 /* CaseBlock */: - case 182 /* Block */: - case 186 /* IfStatement */: - case 187 /* DoStatement */: - case 188 /* WhileStatement */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 195 /* WithStatement */: - case 196 /* SwitchStatement */: - case 223 /* CaseClause */: - case 224 /* DefaultClause */: - case 197 /* LabeledStatement */: - case 199 /* TryStatement */: - case 226 /* CatchClause */: - return ts.forEachChild(node, traverse); - } - } - } - ts.forEachReturnStatement = forEachReturnStatement; - function forEachYieldExpression(body, visitor) { - return traverse(body); - function traverse(node) { - switch (node.kind) { - case 175 /* YieldExpression */: - visitor(node); - var operand = node.expression; - if (operand) { - traverse(operand); - } - case 207 /* EnumDeclaration */: - case 205 /* InterfaceDeclaration */: - case 208 /* ModuleDeclaration */: - case 206 /* TypeAliasDeclaration */: - case 204 /* ClassDeclaration */: - // These are not allowed inside a generator now, but eventually they may be allowed - // as local types. Regardless, any yield statements contained within them should be - // skipped in this traversal. - return; - default: - if (isFunctionLike(node)) { - var name_4 = node.name; - if (name_4 && name_4.kind === 129 /* ComputedPropertyName */) { - // Note that we will not include methods/accessors of a class because they would require - // first descending into the class. This is by design. - traverse(name_4.expression); - return; - } - } - else if (!isTypeNode(node)) { - // This is the general case, which should include mostly expressions and statements. - // Also includes NodeArrays. - ts.forEachChild(node, traverse); - } - } - } - } - ts.forEachYieldExpression = forEachYieldExpression; - function isVariableLike(node) { - if (node) { - switch (node.kind) { - case 155 /* BindingElement */: - case 229 /* EnumMember */: - case 131 /* Parameter */: - case 227 /* PropertyAssignment */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 228 /* ShorthandPropertyAssignment */: - case 201 /* VariableDeclaration */: - return true; - } - } - return false; - } - ts.isVariableLike = isVariableLike; - function isAccessor(node) { - if (node) { - switch (node.kind) { - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - return true; - } - } - return false; - } - ts.isAccessor = isAccessor; - function isClassLike(node) { - if (node) { - return node.kind === 204 /* ClassDeclaration */ || node.kind === 177 /* ClassExpression */; - } - } - ts.isClassLike = isClassLike; - function isFunctionLike(node) { - if (node) { - switch (node.kind) { - case 137 /* Constructor */: - case 165 /* FunctionExpression */: - case 203 /* FunctionDeclaration */: - case 166 /* ArrowFunction */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 142 /* IndexSignature */: - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - return true; - } - } - return false; - } - ts.isFunctionLike = isFunctionLike; - function isFunctionBlock(node) { - return node && node.kind === 182 /* Block */ && isFunctionLike(node.parent); - } - ts.isFunctionBlock = isFunctionBlock; - function isObjectLiteralMethod(node) { - return node && node.kind === 136 /* MethodDeclaration */ && node.parent.kind === 157 /* ObjectLiteralExpression */; - } - ts.isObjectLiteralMethod = isObjectLiteralMethod; - function getContainingFunction(node) { - while (true) { - node = node.parent; - if (!node || isFunctionLike(node)) { - return node; - } - } - } - ts.getContainingFunction = getContainingFunction; - function getThisContainer(node, includeArrowFunctions) { - while (true) { - node = node.parent; - if (!node) { - return undefined; - } - switch (node.kind) { - case 129 /* ComputedPropertyName */: - // If the grandparent node is an object literal (as opposed to a class), - // then the computed property is not a 'this' container. - // A computed property name in a class needs to be a this container - // so that we can error on it. - if (node.parent.parent.kind === 204 /* ClassDeclaration */) { - return node; - } - // If this is a computed property, then the parent should not - // make it a this container. The parent might be a property - // in an object literal, like a method or accessor. But in order for - // such a parent to be a this container, the reference must be in - // the *body* of the container. - node = node.parent; - break; - case 132 /* Decorator */: - // Decorators are always applied outside of the body of a class or method. - if (node.parent.kind === 131 /* Parameter */ && isClassElement(node.parent.parent)) { - // If the decorator's parent is a Parameter, we resolve the this container from - // the grandparent class declaration. - node = node.parent.parent; - } - else if (isClassElement(node.parent)) { - // If the decorator's parent is a class element, we resolve the 'this' container - // from the parent class declaration. - node = node.parent; - } - break; - case 166 /* ArrowFunction */: - if (!includeArrowFunctions) { - continue; - } - // Fall through - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 208 /* ModuleDeclaration */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 207 /* EnumDeclaration */: - case 230 /* SourceFile */: - return node; - } - } - } - ts.getThisContainer = getThisContainer; - function getSuperContainer(node, includeFunctions) { - while (true) { - node = node.parent; - if (!node) - return node; - switch (node.kind) { - case 129 /* ComputedPropertyName */: - // If the grandparent node is an object literal (as opposed to a class), - // then the computed property is not a 'super' container. - // A computed property name in a class needs to be a super container - // so that we can error on it. - if (node.parent.parent.kind === 204 /* ClassDeclaration */) { - return node; - } - // If this is a computed property, then the parent should not - // make it a super container. The parent might be a property - // in an object literal, like a method or accessor. But in order for - // such a parent to be a super container, the reference must be in - // the *body* of the container. - node = node.parent; - break; - case 132 /* Decorator */: - // Decorators are always applied outside of the body of a class or method. - if (node.parent.kind === 131 /* Parameter */ && isClassElement(node.parent.parent)) { - // If the decorator's parent is a Parameter, we resolve the this container from - // the grandparent class declaration. - node = node.parent.parent; - } - else if (isClassElement(node.parent)) { - // If the decorator's parent is a class element, we resolve the 'this' container - // from the parent class declaration. - node = node.parent; - } - break; - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - if (!includeFunctions) { - continue; - } - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - return node; - } - } - } - ts.getSuperContainer = getSuperContainer; - function getInvokedExpression(node) { - if (node.kind === 162 /* TaggedTemplateExpression */) { - return node.tag; - } - // Will either be a CallExpression or NewExpression. - return node.expression; - } - ts.getInvokedExpression = getInvokedExpression; - function nodeCanBeDecorated(node) { - switch (node.kind) { - case 204 /* ClassDeclaration */: - // classes are valid targets - return true; - case 134 /* PropertyDeclaration */: - // property declarations are valid if their parent is a class declaration. - return node.parent.kind === 204 /* ClassDeclaration */; - case 131 /* Parameter */: - // if the parameter's parent has a body and its grandparent is a class declaration, this is a valid target; - return node.parent.body && node.parent.parent.kind === 204 /* ClassDeclaration */; - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 136 /* MethodDeclaration */: - // if this method has a body and its parent is a class declaration, this is a valid target. - return node.body && node.parent.kind === 204 /* ClassDeclaration */; - } - return false; - } - ts.nodeCanBeDecorated = nodeCanBeDecorated; - function nodeIsDecorated(node) { - switch (node.kind) { - case 204 /* ClassDeclaration */: - if (node.decorators) { - return true; - } - return false; - case 134 /* PropertyDeclaration */: - case 131 /* Parameter */: - if (node.decorators) { - return true; - } - return false; - case 138 /* GetAccessor */: - if (node.body && node.decorators) { - return true; - } - return false; - case 136 /* MethodDeclaration */: - case 139 /* SetAccessor */: - if (node.body && node.decorators) { - return true; - } - return false; - } - return false; - } - ts.nodeIsDecorated = nodeIsDecorated; - function childIsDecorated(node) { - switch (node.kind) { - case 204 /* ClassDeclaration */: - return ts.forEach(node.members, nodeOrChildIsDecorated); - case 136 /* MethodDeclaration */: - case 139 /* SetAccessor */: - return ts.forEach(node.parameters, nodeIsDecorated); - } - return false; - } - ts.childIsDecorated = childIsDecorated; - function nodeOrChildIsDecorated(node) { - return nodeIsDecorated(node) || childIsDecorated(node); - } - ts.nodeOrChildIsDecorated = nodeOrChildIsDecorated; - function isExpression(node) { - switch (node.kind) { - case 93 /* ThisKeyword */: - case 91 /* SuperKeyword */: - case 89 /* NullKeyword */: - case 95 /* TrueKeyword */: - case 80 /* FalseKeyword */: - case 9 /* RegularExpressionLiteral */: - case 156 /* ArrayLiteralExpression */: - case 157 /* ObjectLiteralExpression */: - case 158 /* PropertyAccessExpression */: - case 159 /* ElementAccessExpression */: - case 160 /* CallExpression */: - case 161 /* NewExpression */: - case 162 /* TaggedTemplateExpression */: - case 163 /* TypeAssertionExpression */: - case 164 /* ParenthesizedExpression */: - case 165 /* FunctionExpression */: - case 177 /* ClassExpression */: - case 166 /* ArrowFunction */: - case 169 /* VoidExpression */: - case 167 /* DeleteExpression */: - case 168 /* TypeOfExpression */: - case 170 /* PrefixUnaryExpression */: - case 171 /* PostfixUnaryExpression */: - case 172 /* BinaryExpression */: - case 173 /* ConditionalExpression */: - case 176 /* SpreadElementExpression */: - case 174 /* TemplateExpression */: - case 10 /* NoSubstitutionTemplateLiteral */: - case 178 /* OmittedExpression */: - case 175 /* YieldExpression */: - return true; - case 128 /* QualifiedName */: - while (node.parent.kind === 128 /* QualifiedName */) { - node = node.parent; - } - return node.parent.kind === 147 /* TypeQuery */; - case 65 /* Identifier */: - if (node.parent.kind === 147 /* TypeQuery */) { - return true; - } - // fall through - case 7 /* NumericLiteral */: - case 8 /* StringLiteral */: - var parent_2 = node.parent; - switch (parent_2.kind) { - case 201 /* VariableDeclaration */: - case 131 /* Parameter */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 229 /* EnumMember */: - case 227 /* PropertyAssignment */: - case 155 /* BindingElement */: - return parent_2.initializer === node; - case 185 /* ExpressionStatement */: - case 186 /* IfStatement */: - case 187 /* DoStatement */: - case 188 /* WhileStatement */: - case 194 /* ReturnStatement */: - case 195 /* WithStatement */: - case 196 /* SwitchStatement */: - case 223 /* CaseClause */: - case 198 /* ThrowStatement */: - case 196 /* SwitchStatement */: - return parent_2.expression === node; - case 189 /* ForStatement */: - var forStatement = parent_2; - return (forStatement.initializer === node && forStatement.initializer.kind !== 202 /* VariableDeclarationList */) || - forStatement.condition === node || - forStatement.incrementor === node; - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - var forInStatement = parent_2; - return (forInStatement.initializer === node && forInStatement.initializer.kind !== 202 /* VariableDeclarationList */) || - forInStatement.expression === node; - case 163 /* TypeAssertionExpression */: - return node === parent_2.expression; - case 180 /* TemplateSpan */: - return node === parent_2.expression; - case 129 /* ComputedPropertyName */: - return node === parent_2.expression; - case 132 /* Decorator */: - return true; - default: - if (isExpression(parent_2)) { - return true; - } - } - } - return false; - } - ts.isExpression = isExpression; - function isInstantiatedModule(node, preserveConstEnums) { - var moduleState = ts.getModuleInstanceState(node); - return moduleState === 1 /* Instantiated */ || - (preserveConstEnums && moduleState === 2 /* ConstEnumOnly */); - } - ts.isInstantiatedModule = isInstantiatedModule; - function isExternalModuleImportEqualsDeclaration(node) { - return node.kind === 211 /* ImportEqualsDeclaration */ && node.moduleReference.kind === 222 /* ExternalModuleReference */; - } - ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration; - function getExternalModuleImportEqualsDeclarationExpression(node) { - ts.Debug.assert(isExternalModuleImportEqualsDeclaration(node)); - return node.moduleReference.expression; - } - ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression; - function isInternalModuleImportEqualsDeclaration(node) { - return node.kind === 211 /* ImportEqualsDeclaration */ && node.moduleReference.kind !== 222 /* ExternalModuleReference */; - } - ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration; - function getExternalModuleName(node) { - if (node.kind === 212 /* ImportDeclaration */) { - return node.moduleSpecifier; - } - if (node.kind === 211 /* ImportEqualsDeclaration */) { - var reference = node.moduleReference; - if (reference.kind === 222 /* ExternalModuleReference */) { - return reference.expression; - } - } - if (node.kind === 218 /* ExportDeclaration */) { - return node.moduleSpecifier; - } - } - ts.getExternalModuleName = getExternalModuleName; - function hasQuestionToken(node) { - if (node) { - switch (node.kind) { - case 131 /* Parameter */: - return node.questionToken !== undefined; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - return node.questionToken !== undefined; - case 228 /* ShorthandPropertyAssignment */: - case 227 /* PropertyAssignment */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - return node.questionToken !== undefined; - } - } - return false; - } - ts.hasQuestionToken = hasQuestionToken; - function isJSDocConstructSignature(node) { - return node.kind === 243 /* JSDocFunctionType */ && - node.parameters.length > 0 && - node.parameters[0].type.kind === 245 /* JSDocConstructorType */; - } - ts.isJSDocConstructSignature = isJSDocConstructSignature; - function getJSDocTag(node, kind) { - if (node && node.jsDocComment) { - for (var _i = 0, _a = node.jsDocComment.tags; _i < _a.length; _i++) { - var tag = _a[_i]; - if (tag.kind === kind) { - return tag; - } - } - } - } - function getJSDocTypeTag(node) { - return getJSDocTag(node, 251 /* JSDocTypeTag */); - } - ts.getJSDocTypeTag = getJSDocTypeTag; - function getJSDocReturnTag(node) { - return getJSDocTag(node, 250 /* JSDocReturnTag */); - } - ts.getJSDocReturnTag = getJSDocReturnTag; - function getJSDocTemplateTag(node) { - return getJSDocTag(node, 252 /* JSDocTemplateTag */); - } - ts.getJSDocTemplateTag = getJSDocTemplateTag; - function getCorrespondingJSDocParameterTag(parameter) { - if (parameter.name && parameter.name.kind === 65 /* Identifier */) { - // If it's a parameter, see if the parent has a jsdoc comment with an @param - // annotation. - var parameterName = parameter.name.text; - var docComment = parameter.parent.jsDocComment; - if (docComment) { - return ts.forEach(docComment.tags, function (t) { - if (t.kind === 249 /* JSDocParameterTag */) { - var parameterTag = t; - var name_5 = parameterTag.preParameterName || parameterTag.postParameterName; - if (name_5.text === parameterName) { - return t; - } - } - }); - } - } - } - ts.getCorrespondingJSDocParameterTag = getCorrespondingJSDocParameterTag; - function hasRestParameter(s) { - return isRestParameter(ts.lastOrUndefined(s.parameters)); - } - ts.hasRestParameter = hasRestParameter; - function isRestParameter(node) { - if (node) { - if (node.parserContextFlags & 64 /* JavaScriptFile */) { - if (node.type && node.type.kind === 244 /* JSDocVariadicType */) { - return true; - } - var paramTag = getCorrespondingJSDocParameterTag(node); - if (paramTag && paramTag.typeExpression) { - return paramTag.typeExpression.type.kind === 244 /* JSDocVariadicType */; - } - } - return node.dotDotDotToken !== undefined; - } - return false; - } - ts.isRestParameter = isRestParameter; - function isLiteralKind(kind) { - return 7 /* FirstLiteralToken */ <= kind && kind <= 10 /* LastLiteralToken */; - } - ts.isLiteralKind = isLiteralKind; - function isTextualLiteralKind(kind) { - return kind === 8 /* StringLiteral */ || kind === 10 /* NoSubstitutionTemplateLiteral */; - } - ts.isTextualLiteralKind = isTextualLiteralKind; - function isTemplateLiteralKind(kind) { - return 10 /* FirstTemplateToken */ <= kind && kind <= 13 /* LastTemplateToken */; - } - ts.isTemplateLiteralKind = isTemplateLiteralKind; - function isBindingPattern(node) { - return !!node && (node.kind === 154 /* ArrayBindingPattern */ || node.kind === 153 /* ObjectBindingPattern */); - } - ts.isBindingPattern = isBindingPattern; - function isInAmbientContext(node) { - while (node) { - if (node.flags & (2 /* Ambient */ | 2048 /* DeclarationFile */)) { - return true; - } - node = node.parent; - } - return false; - } - ts.isInAmbientContext = isInAmbientContext; - function isDeclaration(node) { - switch (node.kind) { - case 166 /* ArrowFunction */: - case 155 /* BindingElement */: - case 204 /* ClassDeclaration */: - case 137 /* Constructor */: - case 207 /* EnumDeclaration */: - case 229 /* EnumMember */: - case 220 /* ExportSpecifier */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 138 /* GetAccessor */: - case 213 /* ImportClause */: - case 211 /* ImportEqualsDeclaration */: - case 216 /* ImportSpecifier */: - case 205 /* InterfaceDeclaration */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 208 /* ModuleDeclaration */: - case 214 /* NamespaceImport */: - case 131 /* Parameter */: - case 227 /* PropertyAssignment */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 139 /* SetAccessor */: - case 228 /* ShorthandPropertyAssignment */: - case 206 /* TypeAliasDeclaration */: - case 130 /* TypeParameter */: - case 201 /* VariableDeclaration */: - return true; - } - return false; - } - ts.isDeclaration = isDeclaration; - function isStatement(n) { - switch (n.kind) { - case 193 /* BreakStatement */: - case 192 /* ContinueStatement */: - case 200 /* DebuggerStatement */: - case 187 /* DoStatement */: - case 185 /* ExpressionStatement */: - case 184 /* EmptyStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 189 /* ForStatement */: - case 186 /* IfStatement */: - case 197 /* LabeledStatement */: - case 194 /* ReturnStatement */: - case 196 /* SwitchStatement */: - case 94 /* ThrowKeyword */: - case 199 /* TryStatement */: - case 183 /* VariableStatement */: - case 188 /* WhileStatement */: - case 195 /* WithStatement */: - case 217 /* ExportAssignment */: - return true; - default: - return false; - } - } - ts.isStatement = isStatement; - function isClassElement(n) { - switch (n.kind) { - case 137 /* Constructor */: - case 134 /* PropertyDeclaration */: - case 136 /* MethodDeclaration */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 135 /* MethodSignature */: - case 142 /* IndexSignature */: - return true; - default: - return false; - } - } - ts.isClassElement = isClassElement; - // True if the given identifier, string literal, or number literal is the name of a declaration node - function isDeclarationName(name) { - if (name.kind !== 65 /* Identifier */ && name.kind !== 8 /* StringLiteral */ && name.kind !== 7 /* NumericLiteral */) { - return false; - } - var parent = name.parent; - if (parent.kind === 216 /* ImportSpecifier */ || parent.kind === 220 /* ExportSpecifier */) { - if (parent.propertyName) { - return true; - } - } - if (isDeclaration(parent)) { - return parent.name === name; - } - return false; - } - ts.isDeclarationName = isDeclarationName; - // An alias symbol is created by one of the following declarations: - // import = ... - // import from ... - // import * as from ... - // import { x as } from ... - // export { x as } from ... - // export = ... - // export default ... - function isAliasSymbolDeclaration(node) { - return node.kind === 211 /* ImportEqualsDeclaration */ || - node.kind === 213 /* ImportClause */ && !!node.name || - node.kind === 214 /* NamespaceImport */ || - node.kind === 216 /* ImportSpecifier */ || - node.kind === 220 /* ExportSpecifier */ || - node.kind === 217 /* ExportAssignment */ && node.expression.kind === 65 /* Identifier */; - } - ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration; - function getClassExtendsHeritageClauseElement(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 79 /* ExtendsKeyword */); - return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined; - } - ts.getClassExtendsHeritageClauseElement = getClassExtendsHeritageClauseElement; - function getClassImplementsHeritageClauseElements(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 102 /* ImplementsKeyword */); - return heritageClause ? heritageClause.types : undefined; - } - ts.getClassImplementsHeritageClauseElements = getClassImplementsHeritageClauseElements; - function getInterfaceBaseTypeNodes(node) { - var heritageClause = getHeritageClause(node.heritageClauses, 79 /* ExtendsKeyword */); - return heritageClause ? heritageClause.types : undefined; - } - ts.getInterfaceBaseTypeNodes = getInterfaceBaseTypeNodes; - function getHeritageClause(clauses, kind) { - if (clauses) { - for (var _i = 0; _i < clauses.length; _i++) { - var clause = clauses[_i]; - if (clause.token === kind) { - return clause; - } - } - } - return undefined; - } - ts.getHeritageClause = getHeritageClause; - function tryResolveScriptReference(host, sourceFile, reference) { - if (!host.getCompilerOptions().noResolve) { - var referenceFileName = ts.isRootedDiskPath(reference.fileName) ? reference.fileName : ts.combinePaths(ts.getDirectoryPath(sourceFile.fileName), reference.fileName); - referenceFileName = ts.getNormalizedAbsolutePath(referenceFileName, host.getCurrentDirectory()); - return host.getSourceFile(referenceFileName); - } - } - ts.tryResolveScriptReference = tryResolveScriptReference; - function getAncestor(node, kind) { - while (node) { - if (node.kind === kind) { - return node; - } - node = node.parent; - } - return undefined; - } - ts.getAncestor = getAncestor; - function getFileReferenceFromReferencePath(comment, commentRange) { - var simpleReferenceRegEx = /^\/\/\/\s*/gim; - if (simpleReferenceRegEx.exec(comment)) { - if (isNoDefaultLibRegEx.exec(comment)) { - return { - isNoDefaultLib: true - }; - } - else { - var matchResult = ts.fullTripleSlashReferencePathRegEx.exec(comment); - if (matchResult) { - var start = commentRange.pos; - var end = commentRange.end; - return { - fileReference: { - pos: start, - end: end, - fileName: matchResult[3] - }, - isNoDefaultLib: false - }; - } - else { - return { - diagnosticMessage: ts.Diagnostics.Invalid_reference_directive_syntax, - isNoDefaultLib: false - }; - } - } - } - return undefined; - } - ts.getFileReferenceFromReferencePath = getFileReferenceFromReferencePath; - function isKeyword(token) { - return 66 /* FirstKeyword */ <= token && token <= 127 /* LastKeyword */; - } - ts.isKeyword = isKeyword; - function isTrivia(token) { - return 2 /* FirstTriviaToken */ <= token && token <= 6 /* LastTriviaToken */; - } - ts.isTrivia = isTrivia; - /** - * A declaration has a dynamic name if both of the following are true: - * 1. The declaration has a computed property name - * 2. The computed name is *not* expressed as Symbol., where name - * is a property of the Symbol constructor that denotes a built in - * Symbol. - */ - function hasDynamicName(declaration) { - return declaration.name && - declaration.name.kind === 129 /* ComputedPropertyName */ && - !isWellKnownSymbolSyntactically(declaration.name.expression); - } - ts.hasDynamicName = hasDynamicName; - /** - * Checks if the expression is of the form: - * Symbol.name - * where Symbol is literally the word "Symbol", and name is any identifierName - */ - function isWellKnownSymbolSyntactically(node) { - return node.kind === 158 /* PropertyAccessExpression */ && isESSymbolIdentifier(node.expression); - } - ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically; - function getPropertyNameForPropertyNameNode(name) { - if (name.kind === 65 /* Identifier */ || name.kind === 8 /* StringLiteral */ || name.kind === 7 /* NumericLiteral */) { - return name.text; - } - if (name.kind === 129 /* ComputedPropertyName */) { - var nameExpression = name.expression; - if (isWellKnownSymbolSyntactically(nameExpression)) { - var rightHandSideName = nameExpression.name.text; - return getPropertyNameForKnownSymbolName(rightHandSideName); - } - } - return undefined; - } - ts.getPropertyNameForPropertyNameNode = getPropertyNameForPropertyNameNode; - function getPropertyNameForKnownSymbolName(symbolName) { - return "__@" + symbolName; - } - ts.getPropertyNameForKnownSymbolName = getPropertyNameForKnownSymbolName; - /** - * Includes the word "Symbol" with unicode escapes - */ - function isESSymbolIdentifier(node) { - return node.kind === 65 /* Identifier */ && node.text === "Symbol"; - } - ts.isESSymbolIdentifier = isESSymbolIdentifier; - function isModifier(token) { - switch (token) { - case 108 /* PublicKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - case 109 /* StaticKeyword */: - case 78 /* ExportKeyword */: - case 115 /* DeclareKeyword */: - case 70 /* ConstKeyword */: - case 73 /* DefaultKeyword */: - return true; - } - return false; - } - ts.isModifier = isModifier; - function isParameterDeclaration(node) { - var root = getRootDeclaration(node); - return root.kind === 131 /* Parameter */; - } - ts.isParameterDeclaration = isParameterDeclaration; - function getRootDeclaration(node) { - while (node.kind === 155 /* BindingElement */) { - node = node.parent.parent; - } - return node; - } - ts.getRootDeclaration = getRootDeclaration; - function nodeStartsNewLexicalEnvironment(n) { - return isFunctionLike(n) || n.kind === 208 /* ModuleDeclaration */ || n.kind === 230 /* SourceFile */; - } - ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment; - function nodeIsSynthesized(node) { - return node.pos === -1; - } - ts.nodeIsSynthesized = nodeIsSynthesized; - function createSynthesizedNode(kind, startsOnNewLine) { - var node = ts.createNode(kind); - node.pos = -1; - node.end = -1; - node.startsOnNewLine = startsOnNewLine; - return node; - } - ts.createSynthesizedNode = createSynthesizedNode; - function createSynthesizedNodeArray() { - var array = []; - array.pos = -1; - array.end = -1; - return array; - } - ts.createSynthesizedNodeArray = createSynthesizedNodeArray; - function createDiagnosticCollection() { - var nonFileDiagnostics = []; - var fileDiagnostics = {}; - var diagnosticsModified = false; - var modificationCount = 0; - return { - add: add, - getGlobalDiagnostics: getGlobalDiagnostics, - getDiagnostics: getDiagnostics, - getModificationCount: getModificationCount - }; - function getModificationCount() { - return modificationCount; - } - function add(diagnostic) { - var diagnostics; - if (diagnostic.file) { - diagnostics = fileDiagnostics[diagnostic.file.fileName]; - if (!diagnostics) { - diagnostics = []; - fileDiagnostics[diagnostic.file.fileName] = diagnostics; - } - } - else { - diagnostics = nonFileDiagnostics; - } - diagnostics.push(diagnostic); - diagnosticsModified = true; - modificationCount++; - } - function getGlobalDiagnostics() { - sortAndDeduplicate(); - return nonFileDiagnostics; - } - function getDiagnostics(fileName) { - sortAndDeduplicate(); - if (fileName) { - return fileDiagnostics[fileName] || []; - } - var allDiagnostics = []; - function pushDiagnostic(d) { - allDiagnostics.push(d); - } - ts.forEach(nonFileDiagnostics, pushDiagnostic); - for (var key in fileDiagnostics) { - if (ts.hasProperty(fileDiagnostics, key)) { - ts.forEach(fileDiagnostics[key], pushDiagnostic); - } - } - return ts.sortAndDeduplicateDiagnostics(allDiagnostics); - } - function sortAndDeduplicate() { - if (!diagnosticsModified) { - return; - } - diagnosticsModified = false; - nonFileDiagnostics = ts.sortAndDeduplicateDiagnostics(nonFileDiagnostics); - for (var key in fileDiagnostics) { - if (ts.hasProperty(fileDiagnostics, key)) { - fileDiagnostics[key] = ts.sortAndDeduplicateDiagnostics(fileDiagnostics[key]); - } - } - } - } - ts.createDiagnosticCollection = createDiagnosticCollection; - // This consists of the first 19 unprintable ASCII characters, canonical escapes, lineSeparator, - // paragraphSeparator, and nextLine. The latter three are just desirable to suppress new lines in - // the language service. These characters should be escaped when printing, and if any characters are added, - // the map below must be updated. Note that this regexp *does not* include the 'delete' character. - // There is no reason for this other than that JSON.stringify does not handle it either. - var escapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g; - var escapedCharsMap = { - "\0": "\\0", - "\t": "\\t", - "\v": "\\v", - "\f": "\\f", - "\b": "\\b", - "\r": "\\r", - "\n": "\\n", - "\\": "\\\\", - "\"": "\\\"", - "\u2028": "\\u2028", - "\u2029": "\\u2029", - "\u0085": "\\u0085" // nextLine - }; - /** - * Based heavily on the abstract 'Quote'/'QuoteJSONString' operation from ECMA-262 (24.3.2.2), - * but augmented for a few select characters (e.g. lineSeparator, paragraphSeparator, nextLine) - * Note that this doesn't actually wrap the input in double quotes. - */ - function escapeString(s) { - s = escapedCharsRegExp.test(s) ? s.replace(escapedCharsRegExp, getReplacement) : s; - return s; - function getReplacement(c) { - return escapedCharsMap[c] || get16BitUnicodeEscapeSequence(c.charCodeAt(0)); - } - } - ts.escapeString = escapeString; - function get16BitUnicodeEscapeSequence(charCode) { - var hexCharCode = charCode.toString(16).toUpperCase(); - var paddedHexCode = ("0000" + hexCharCode).slice(-4); - return "\\u" + paddedHexCode; - } - var nonAsciiCharacters = /[^\u0000-\u007F]/g; - function escapeNonAsciiCharacters(s) { - // Replace non-ASCII characters with '\uNNNN' escapes if any exist. - // Otherwise just return the original string. - return nonAsciiCharacters.test(s) ? - s.replace(nonAsciiCharacters, function (c) { return get16BitUnicodeEscapeSequence(c.charCodeAt(0)); }) : - s; - } - ts.escapeNonAsciiCharacters = escapeNonAsciiCharacters; - var indentStrings = ["", " "]; - function getIndentString(level) { - if (indentStrings[level] === undefined) { - indentStrings[level] = getIndentString(level - 1) + indentStrings[1]; - } - return indentStrings[level]; - } - ts.getIndentString = getIndentString; - function getIndentSize() { - return indentStrings[1].length; - } - ts.getIndentSize = getIndentSize; - function createTextWriter(newLine) { - var output = ""; - var indent = 0; - var lineStart = true; - var lineCount = 0; - var linePos = 0; - function write(s) { - if (s && s.length) { - if (lineStart) { - output += getIndentString(indent); - lineStart = false; - } - output += s; - } - } - function rawWrite(s) { - if (s !== undefined) { - if (lineStart) { - lineStart = false; - } - output += s; - } - } - function writeLiteral(s) { - if (s && s.length) { - write(s); - var lineStartsOfS = ts.computeLineStarts(s); - if (lineStartsOfS.length > 1) { - lineCount = lineCount + lineStartsOfS.length - 1; - linePos = output.length - s.length + ts.lastOrUndefined(lineStartsOfS); - } - } - } - function writeLine() { - if (!lineStart) { - output += newLine; - lineCount++; - linePos = output.length; - lineStart = true; - } - } - function writeTextOfNode(sourceFile, node) { - write(getSourceTextOfNodeFromSourceFile(sourceFile, node)); - } - return { - write: write, - rawWrite: rawWrite, - writeTextOfNode: writeTextOfNode, - writeLiteral: writeLiteral, - writeLine: writeLine, - increaseIndent: function () { return indent++; }, - decreaseIndent: function () { return indent--; }, - getIndent: function () { return indent; }, - getTextPos: function () { return output.length; }, - getLine: function () { return lineCount + 1; }, - getColumn: function () { return lineStart ? indent * getIndentSize() + 1 : output.length - linePos + 1; }, - getText: function () { return output; } - }; - } - ts.createTextWriter = createTextWriter; - function getOwnEmitOutputFilePath(sourceFile, host, extension) { - var compilerOptions = host.getCompilerOptions(); - var emitOutputFilePathWithoutExtension; - if (compilerOptions.outDir) { - emitOutputFilePathWithoutExtension = ts.removeFileExtension(getSourceFilePathInNewDir(sourceFile, host, compilerOptions.outDir)); - } - else { - emitOutputFilePathWithoutExtension = ts.removeFileExtension(sourceFile.fileName); - } - return emitOutputFilePathWithoutExtension + extension; - } - ts.getOwnEmitOutputFilePath = getOwnEmitOutputFilePath; - function getSourceFilePathInNewDir(sourceFile, host, newDirPath) { - var sourceFilePath = ts.getNormalizedAbsolutePath(sourceFile.fileName, host.getCurrentDirectory()); - sourceFilePath = sourceFilePath.replace(host.getCommonSourceDirectory(), ""); - return ts.combinePaths(newDirPath, sourceFilePath); - } - ts.getSourceFilePathInNewDir = getSourceFilePathInNewDir; - function writeFile(host, diagnostics, fileName, data, writeByteOrderMark) { - host.writeFile(fileName, data, writeByteOrderMark, function (hostErrorMessage) { - diagnostics.push(ts.createCompilerDiagnostic(ts.Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage)); - }); - } - ts.writeFile = writeFile; - function getLineOfLocalPosition(currentSourceFile, pos) { - return ts.getLineAndCharacterOfPosition(currentSourceFile, pos).line; - } - ts.getLineOfLocalPosition = getLineOfLocalPosition; - function getFirstConstructorWithBody(node) { - return ts.forEach(node.members, function (member) { - if (member.kind === 137 /* Constructor */ && nodeIsPresent(member.body)) { - return member; - } - }); - } - ts.getFirstConstructorWithBody = getFirstConstructorWithBody; - function shouldEmitToOwnFile(sourceFile, compilerOptions) { - if (!isDeclarationFile(sourceFile)) { - if ((isExternalModule(sourceFile) || !compilerOptions.out)) { - // 1. in-browser single file compilation scenario - // 2. non .js file - return compilerOptions.isolatedModules || !ts.fileExtensionIs(sourceFile.fileName, ".js"); - } - return false; - } - return false; - } - ts.shouldEmitToOwnFile = shouldEmitToOwnFile; - function getAllAccessorDeclarations(declarations, accessor) { - var firstAccessor; - var secondAccessor; - var getAccessor; - var setAccessor; - if (hasDynamicName(accessor)) { - firstAccessor = accessor; - if (accessor.kind === 138 /* GetAccessor */) { - getAccessor = accessor; - } - else if (accessor.kind === 139 /* SetAccessor */) { - setAccessor = accessor; - } - else { - ts.Debug.fail("Accessor has wrong kind"); - } - } - else { - ts.forEach(declarations, function (member) { - if ((member.kind === 138 /* GetAccessor */ || member.kind === 139 /* SetAccessor */) - && (member.flags & 128 /* Static */) === (accessor.flags & 128 /* Static */)) { - var memberName = getPropertyNameForPropertyNameNode(member.name); - var accessorName = getPropertyNameForPropertyNameNode(accessor.name); - if (memberName === accessorName) { - if (!firstAccessor) { - firstAccessor = member; - } - else if (!secondAccessor) { - secondAccessor = member; - } - if (member.kind === 138 /* GetAccessor */ && !getAccessor) { - getAccessor = member; - } - if (member.kind === 139 /* SetAccessor */ && !setAccessor) { - setAccessor = member; - } - } - } - }); - } - return { - firstAccessor: firstAccessor, - secondAccessor: secondAccessor, - getAccessor: getAccessor, - setAccessor: setAccessor - }; - } - ts.getAllAccessorDeclarations = getAllAccessorDeclarations; - function emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments) { - // If the leading comments start on different line than the start of node, write new line - if (leadingComments && leadingComments.length && node.pos !== leadingComments[0].pos && - getLineOfLocalPosition(currentSourceFile, node.pos) !== getLineOfLocalPosition(currentSourceFile, leadingComments[0].pos)) { - writer.writeLine(); - } - } - ts.emitNewLineBeforeLeadingComments = emitNewLineBeforeLeadingComments; - function emitComments(currentSourceFile, writer, comments, trailingSeparator, newLine, writeComment) { - var emitLeadingSpace = !trailingSeparator; - ts.forEach(comments, function (comment) { - if (emitLeadingSpace) { - writer.write(" "); - emitLeadingSpace = false; - } - writeComment(currentSourceFile, writer, comment, newLine); - if (comment.hasTrailingNewLine) { - writer.writeLine(); - } - else if (trailingSeparator) { - writer.write(" "); - } - else { - // Emit leading space to separate comment during next comment emit - emitLeadingSpace = true; - } - }); - } - ts.emitComments = emitComments; - function writeCommentRange(currentSourceFile, writer, comment, newLine) { - if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 42 /* asterisk */) { - var firstCommentLineAndCharacter = ts.getLineAndCharacterOfPosition(currentSourceFile, comment.pos); - var lineCount = ts.getLineStarts(currentSourceFile).length; - var firstCommentLineIndent; - for (var pos = comment.pos, currentLine = firstCommentLineAndCharacter.line; pos < comment.end; currentLine++) { - var nextLineStart = (currentLine + 1) === lineCount - ? currentSourceFile.text.length + 1 - : getStartPositionOfLine(currentLine + 1, currentSourceFile); - if (pos !== comment.pos) { - // If we are not emitting first line, we need to write the spaces to adjust the alignment - if (firstCommentLineIndent === undefined) { - firstCommentLineIndent = calculateIndent(getStartPositionOfLine(firstCommentLineAndCharacter.line, currentSourceFile), comment.pos); - } - // These are number of spaces writer is going to write at current indent - var currentWriterIndentSpacing = writer.getIndent() * getIndentSize(); - // Number of spaces we want to be writing - // eg: Assume writer indent - // module m { - // /* starts at character 9 this is line 1 - // * starts at character pos 4 line --1 = 8 - 8 + 3 - // More left indented comment */ --2 = 8 - 8 + 2 - // class c { } - // } - // module m { - // /* this is line 1 -- Assume current writer indent 8 - // * line --3 = 8 - 4 + 5 - // More right indented comment */ --4 = 8 - 4 + 11 - // class c { } - // } - var spacesToEmit = currentWriterIndentSpacing - firstCommentLineIndent + calculateIndent(pos, nextLineStart); - if (spacesToEmit > 0) { - var numberOfSingleSpacesToEmit = spacesToEmit % getIndentSize(); - var indentSizeSpaceString = getIndentString((spacesToEmit - numberOfSingleSpacesToEmit) / getIndentSize()); - // Write indent size string ( in eg 1: = "", 2: "" , 3: string with 8 spaces 4: string with 12 spaces - writer.rawWrite(indentSizeSpaceString); - // Emit the single spaces (in eg: 1: 3 spaces, 2: 2 spaces, 3: 1 space, 4: 3 spaces) - while (numberOfSingleSpacesToEmit) { - writer.rawWrite(" "); - numberOfSingleSpacesToEmit--; - } - } - else { - // No spaces to emit write empty string - writer.rawWrite(""); - } - } - // Write the comment line text - writeTrimmedCurrentLine(pos, nextLineStart); - pos = nextLineStart; - } - } - else { - // Single line comment of style //.... - writer.write(currentSourceFile.text.substring(comment.pos, comment.end)); - } - function writeTrimmedCurrentLine(pos, nextLineStart) { - var end = Math.min(comment.end, nextLineStart - 1); - var currentLineText = currentSourceFile.text.substring(pos, end).replace(/^\s+|\s+$/g, ''); - if (currentLineText) { - // trimmed forward and ending spaces text - writer.write(currentLineText); - if (end !== comment.end) { - writer.writeLine(); - } - } - else { - // Empty string - make sure we write empty line - writer.writeLiteral(newLine); - } - } - function calculateIndent(pos, end) { - var currentLineIndent = 0; - for (; pos < end && ts.isWhiteSpace(currentSourceFile.text.charCodeAt(pos)); pos++) { - if (currentSourceFile.text.charCodeAt(pos) === 9 /* tab */) { - // Tabs = TabSize = indent size and go to next tabStop - currentLineIndent += getIndentSize() - (currentLineIndent % getIndentSize()); - } - else { - // Single space - currentLineIndent++; - } - } - return currentLineIndent; - } - } - ts.writeCommentRange = writeCommentRange; - function modifierToFlag(token) { - switch (token) { - case 109 /* StaticKeyword */: return 128 /* Static */; - case 108 /* PublicKeyword */: return 16 /* Public */; - case 107 /* ProtectedKeyword */: return 64 /* Protected */; - case 106 /* PrivateKeyword */: return 32 /* Private */; - case 78 /* ExportKeyword */: return 1 /* Export */; - case 115 /* DeclareKeyword */: return 2 /* Ambient */; - case 70 /* ConstKeyword */: return 8192 /* Const */; - case 73 /* DefaultKeyword */: return 256 /* Default */; - } - return 0; - } - ts.modifierToFlag = modifierToFlag; - function isLeftHandSideExpression(expr) { - if (expr) { - switch (expr.kind) { - case 158 /* PropertyAccessExpression */: - case 159 /* ElementAccessExpression */: - case 161 /* NewExpression */: - case 160 /* CallExpression */: - case 162 /* TaggedTemplateExpression */: - case 156 /* ArrayLiteralExpression */: - case 164 /* ParenthesizedExpression */: - case 157 /* ObjectLiteralExpression */: - case 177 /* ClassExpression */: - case 165 /* FunctionExpression */: - case 65 /* Identifier */: - case 9 /* RegularExpressionLiteral */: - case 7 /* NumericLiteral */: - case 8 /* StringLiteral */: - case 10 /* NoSubstitutionTemplateLiteral */: - case 174 /* TemplateExpression */: - case 80 /* FalseKeyword */: - case 89 /* NullKeyword */: - case 93 /* ThisKeyword */: - case 95 /* TrueKeyword */: - case 91 /* SuperKeyword */: - return true; - } - } - return false; - } - ts.isLeftHandSideExpression = isLeftHandSideExpression; - function isAssignmentOperator(token) { - return token >= 53 /* FirstAssignment */ && token <= 64 /* LastAssignment */; - } - ts.isAssignmentOperator = isAssignmentOperator; - // Returns false if this heritage clause element's expression contains something unsupported - // (i.e. not a name or dotted name). - function isSupportedExpressionWithTypeArguments(node) { - return isSupportedExpressionWithTypeArgumentsRest(node.expression); - } - ts.isSupportedExpressionWithTypeArguments = isSupportedExpressionWithTypeArguments; - function isSupportedExpressionWithTypeArgumentsRest(node) { - if (node.kind === 65 /* Identifier */) { - return true; - } - else if (node.kind === 158 /* PropertyAccessExpression */) { - return isSupportedExpressionWithTypeArgumentsRest(node.expression); - } - else { - return false; - } - } - function isRightSideOfQualifiedNameOrPropertyAccess(node) { - return (node.parent.kind === 128 /* QualifiedName */ && node.parent.right === node) || - (node.parent.kind === 158 /* PropertyAccessExpression */ && node.parent.name === node); - } - ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess; - function getLocalSymbolForExportDefault(symbol) { - return symbol && symbol.valueDeclaration && (symbol.valueDeclaration.flags & 256 /* Default */) ? symbol.valueDeclaration.localSymbol : undefined; - } - ts.getLocalSymbolForExportDefault = getLocalSymbolForExportDefault; - function isJavaScript(fileName) { - return ts.fileExtensionIs(fileName, ".js"); - } - ts.isJavaScript = isJavaScript; - /** - * Replace each instance of non-ascii characters by one, two, three, or four escape sequences - * representing the UTF-8 encoding of the character, and return the expanded char code list. - */ - function getExpandedCharCodes(input) { - var output = []; - var length = input.length; - var leadSurrogate = undefined; - for (var i = 0; i < length; i++) { - var charCode = input.charCodeAt(i); - // handel utf8 - if (charCode < 0x80) { - output.push(charCode); - } - else if (charCode < 0x800) { - output.push((charCode >> 6) | 192); - output.push((charCode & 63) | 128); - } - else if (charCode < 0x10000) { - output.push((charCode >> 12) | 224); - output.push(((charCode >> 6) & 63) | 128); - output.push((charCode & 63) | 128); - } - else if (charCode < 0x20000) { - output.push((charCode >> 18) | 240); - output.push(((charCode >> 12) & 63) | 128); - output.push(((charCode >> 6) & 63) | 128); - output.push((charCode & 63) | 128); - } - else { - ts.Debug.assert(false, "Unexpected code point"); - } - } - return output; - } - var base64Digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - /** - * Converts a string to a base-64 encoded ASCII string. - */ - function convertToBase64(input) { - var result = ""; - var charCodes = getExpandedCharCodes(input); - var i = 0; - var length = charCodes.length; - var byte1, byte2, byte3, byte4; - while (i < length) { - // Convert every 6-bits in the input 3 character points - // into a base64 digit - byte1 = charCodes[i] >> 2; - byte2 = (charCodes[i] & 3) << 4 | charCodes[i + 1] >> 4; - byte3 = (charCodes[i + 1] & 15) << 2 | charCodes[i + 2] >> 6; - byte4 = charCodes[i + 2] & 63; - // We are out of characters in the input, set the extra - // digits to 64 (padding character). - if (i + 1 >= length) { - byte3 = byte4 = 64; - } - else if (i + 2 >= length) { - byte4 = 64; - } - // Write to the ouput - result += base64Digits.charAt(byte1) + base64Digits.charAt(byte2) + base64Digits.charAt(byte3) + base64Digits.charAt(byte4); - i += 3; - } - return result; - } - ts.convertToBase64 = convertToBase64; - var carriageReturnLineFeed = "\r\n"; - var lineFeed = "\n"; - function getNewLineCharacter(options) { - if (options.newLine === 0 /* CarriageReturnLineFeed */) { - return carriageReturnLineFeed; - } - else if (options.newLine === 1 /* LineFeed */) { - return lineFeed; - } - else if (ts.sys) { - return ts.sys.newLine; - } - return carriageReturnLineFeed; - } - ts.getNewLineCharacter = getNewLineCharacter; -})(ts || (ts = {})); -var ts; -(function (ts) { - function getDefaultLibFileName(options) { - return options.target === 2 /* ES6 */ ? "lib.es6.d.ts" : "lib.d.ts"; - } - ts.getDefaultLibFileName = getDefaultLibFileName; - function textSpanEnd(span) { - return span.start + span.length; - } - ts.textSpanEnd = textSpanEnd; - function textSpanIsEmpty(span) { - return span.length === 0; - } - ts.textSpanIsEmpty = textSpanIsEmpty; - function textSpanContainsPosition(span, position) { - return position >= span.start && position < textSpanEnd(span); - } - ts.textSpanContainsPosition = textSpanContainsPosition; - // Returns true if 'span' contains 'other'. - function textSpanContainsTextSpan(span, other) { - return other.start >= span.start && textSpanEnd(other) <= textSpanEnd(span); - } - ts.textSpanContainsTextSpan = textSpanContainsTextSpan; - function textSpanOverlapsWith(span, other) { - var overlapStart = Math.max(span.start, other.start); - var overlapEnd = Math.min(textSpanEnd(span), textSpanEnd(other)); - return overlapStart < overlapEnd; - } - ts.textSpanOverlapsWith = textSpanOverlapsWith; - function textSpanOverlap(span1, span2) { - var overlapStart = Math.max(span1.start, span2.start); - var overlapEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2)); - if (overlapStart < overlapEnd) { - return createTextSpanFromBounds(overlapStart, overlapEnd); - } - return undefined; - } - ts.textSpanOverlap = textSpanOverlap; - function textSpanIntersectsWithTextSpan(span, other) { - return other.start <= textSpanEnd(span) && textSpanEnd(other) >= span.start; - } - ts.textSpanIntersectsWithTextSpan = textSpanIntersectsWithTextSpan; - function textSpanIntersectsWith(span, start, length) { - var end = start + length; - return start <= textSpanEnd(span) && end >= span.start; - } - ts.textSpanIntersectsWith = textSpanIntersectsWith; - function textSpanIntersectsWithPosition(span, position) { - return position <= textSpanEnd(span) && position >= span.start; - } - ts.textSpanIntersectsWithPosition = textSpanIntersectsWithPosition; - function textSpanIntersection(span1, span2) { - var intersectStart = Math.max(span1.start, span2.start); - var intersectEnd = Math.min(textSpanEnd(span1), textSpanEnd(span2)); - if (intersectStart <= intersectEnd) { - return createTextSpanFromBounds(intersectStart, intersectEnd); - } - return undefined; - } - ts.textSpanIntersection = textSpanIntersection; - function createTextSpan(start, length) { - if (start < 0) { - throw new Error("start < 0"); - } - if (length < 0) { - throw new Error("length < 0"); - } - return { start: start, length: length }; - } - ts.createTextSpan = createTextSpan; - function createTextSpanFromBounds(start, end) { - return createTextSpan(start, end - start); - } - ts.createTextSpanFromBounds = createTextSpanFromBounds; - function textChangeRangeNewSpan(range) { - return createTextSpan(range.span.start, range.newLength); - } - ts.textChangeRangeNewSpan = textChangeRangeNewSpan; - function textChangeRangeIsUnchanged(range) { - return textSpanIsEmpty(range.span) && range.newLength === 0; - } - ts.textChangeRangeIsUnchanged = textChangeRangeIsUnchanged; - function createTextChangeRange(span, newLength) { - if (newLength < 0) { - throw new Error("newLength < 0"); - } - return { span: span, newLength: newLength }; - } - ts.createTextChangeRange = createTextChangeRange; - ts.unchangedTextChangeRange = createTextChangeRange(createTextSpan(0, 0), 0); - /** - * Called to merge all the changes that occurred across several versions of a script snapshot - * into a single change. i.e. if a user keeps making successive edits to a script we will - * have a text change from V1 to V2, V2 to V3, ..., Vn. - * - * This function will then merge those changes into a single change range valid between V1 and - * Vn. - */ - function collapseTextChangeRangesAcrossMultipleVersions(changes) { - if (changes.length === 0) { - return ts.unchangedTextChangeRange; - } - if (changes.length === 1) { - return changes[0]; - } - // We change from talking about { { oldStart, oldLength }, newLength } to { oldStart, oldEnd, newEnd } - // as it makes things much easier to reason about. - var change0 = changes[0]; - var oldStartN = change0.span.start; - var oldEndN = textSpanEnd(change0.span); - var newEndN = oldStartN + change0.newLength; - for (var i = 1; i < changes.length; i++) { - var nextChange = changes[i]; - // Consider the following case: - // i.e. two edits. The first represents the text change range { { 10, 50 }, 30 }. i.e. The span starting - // at 10, with length 50 is reduced to length 30. The second represents the text change range { { 30, 30 }, 40 }. - // i.e. the span starting at 30 with length 30 is increased to length 40. - // - // 0 10 20 30 40 50 60 70 80 90 100 - // ------------------------------------------------------------------------------------------------------- - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- - // ------------------------------------------------------------------------------------------------------- - // | \ - // | \ - // T2 | \ - // | \ - // | \ - // ------------------------------------------------------------------------------------------------------- - // - // Merging these turns out to not be too difficult. First, determining the new start of the change is trivial - // it's just the min of the old and new starts. i.e.: - // - // 0 10 20 30 40 50 60 70 80 90 100 - // ------------------------------------------------------------*------------------------------------------ - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- - // ----------------------------------------$-------------------$------------------------------------------ - // . | \ - // . | \ - // T2 . | \ - // . | \ - // . | \ - // ----------------------------------------------------------------------*-------------------------------- - // - // (Note the dots represent the newly inferrred start. - // Determining the new and old end is also pretty simple. Basically it boils down to paying attention to the - // absolute positions at the asterixes, and the relative change between the dollar signs. Basically, we see - // which if the two $'s precedes the other, and we move that one forward until they line up. in this case that - // means: - // - // 0 10 20 30 40 50 60 70 80 90 100 - // --------------------------------------------------------------------------------*---------------------- - // | / - // | /---- - // T1 | /---- - // | /---- - // | /---- - // ------------------------------------------------------------$------------------------------------------ - // . | \ - // . | \ - // T2 . | \ - // . | \ - // . | \ - // ----------------------------------------------------------------------*-------------------------------- - // - // In other words (in this case), we're recognizing that the second edit happened after where the first edit - // ended with a delta of 20 characters (60 - 40). Thus, if we go back in time to where the first edit started - // that's the same as if we started at char 80 instead of 60. - // - // As it so happens, the same logic applies if the second edit precedes the first edit. In that case rahter - // than pusing the first edit forward to match the second, we'll push the second edit forward to match the - // first. - // - // In this case that means we have { oldStart: 10, oldEnd: 80, newEnd: 70 } or, in TextChangeRange - // semantics: { { start: 10, length: 70 }, newLength: 60 } - // - // The math then works out as follows. - // If we have { oldStart1, oldEnd1, newEnd1 } and { oldStart2, oldEnd2, newEnd2 } then we can compute the - // final result like so: - // - // { - // oldStart3: Min(oldStart1, oldStart2), - // oldEnd3 : Max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)), - // newEnd3 : Max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)) - // } - var oldStart1 = oldStartN; - var oldEnd1 = oldEndN; - var newEnd1 = newEndN; - var oldStart2 = nextChange.span.start; - var oldEnd2 = textSpanEnd(nextChange.span); - var newEnd2 = oldStart2 + nextChange.newLength; - oldStartN = Math.min(oldStart1, oldStart2); - oldEndN = Math.max(oldEnd1, oldEnd1 + (oldEnd2 - newEnd1)); - newEndN = Math.max(newEnd2, newEnd2 + (newEnd1 - oldEnd2)); - } - return createTextChangeRange(createTextSpanFromBounds(oldStartN, oldEndN), newEndN - oldStartN); - } - ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions; - function getTypeParameterOwner(d) { - if (d && d.kind === 130 /* TypeParameter */) { - for (var current = d; current; current = current.parent) { - if (ts.isFunctionLike(current) || ts.isClassLike(current) || current.kind === 205 /* InterfaceDeclaration */) { - return current; - } - } - } - } - ts.getTypeParameterOwner = getTypeParameterOwner; -})(ts || (ts = {})); -/// -/// -var ts; -(function (ts) { - var nodeConstructors = new Array(254 /* Count */); - /* @internal */ ts.parseTime = 0; - function getNodeConstructor(kind) { - return nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)); - } - ts.getNodeConstructor = getNodeConstructor; - function createNode(kind) { - return new (getNodeConstructor(kind))(); - } - ts.createNode = createNode; - function visitNode(cbNode, node) { - if (node) { - return cbNode(node); - } - } - function visitNodeArray(cbNodes, nodes) { - if (nodes) { - return cbNodes(nodes); - } - } - function visitEachNode(cbNode, nodes) { - if (nodes) { - for (var _i = 0; _i < nodes.length; _i++) { - var node = nodes[_i]; - var result = cbNode(node); - if (result) { - return result; - } - } - } - } - // Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes - // stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise, - // embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns - // a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. - function forEachChild(node, cbNode, cbNodeArray) { - if (!node) { - return; - } - // The visitXXX functions could be written as local functions that close over the cbNode and cbNodeArray - // callback parameters, but that causes a closure allocation for each invocation with noticeable effects - // on performance. - var visitNodes = cbNodeArray ? visitNodeArray : visitEachNode; - var cbNodes = cbNodeArray || cbNode; - switch (node.kind) { - case 128 /* QualifiedName */: - return visitNode(cbNode, node.left) || - visitNode(cbNode, node.right); - case 130 /* TypeParameter */: - return visitNode(cbNode, node.name) || - visitNode(cbNode, node.constraint) || - visitNode(cbNode, node.expression); - case 131 /* Parameter */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 227 /* PropertyAssignment */: - case 228 /* ShorthandPropertyAssignment */: - case 201 /* VariableDeclaration */: - case 155 /* BindingElement */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.propertyName) || - visitNode(cbNode, node.dotDotDotToken) || - visitNode(cbNode, node.name) || - visitNode(cbNode, node.questionToken) || - visitNode(cbNode, node.type) || - visitNode(cbNode, node.initializer); - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 142 /* IndexSignature */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNodes(cbNodes, node.typeParameters) || - visitNodes(cbNodes, node.parameters) || - visitNode(cbNode, node.type); - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 165 /* FunctionExpression */: - case 203 /* FunctionDeclaration */: - case 166 /* ArrowFunction */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.asteriskToken) || - visitNode(cbNode, node.name) || - visitNode(cbNode, node.questionToken) || - visitNodes(cbNodes, node.typeParameters) || - visitNodes(cbNodes, node.parameters) || - visitNode(cbNode, node.type) || - visitNode(cbNode, node.equalsGreaterThanToken) || - visitNode(cbNode, node.body); - case 144 /* TypeReference */: - return visitNode(cbNode, node.typeName) || - visitNodes(cbNodes, node.typeArguments); - case 143 /* TypePredicate */: - return visitNode(cbNode, node.parameterName) || - visitNode(cbNode, node.type); - case 147 /* TypeQuery */: - return visitNode(cbNode, node.exprName); - case 148 /* TypeLiteral */: - return visitNodes(cbNodes, node.members); - case 149 /* ArrayType */: - return visitNode(cbNode, node.elementType); - case 150 /* TupleType */: - return visitNodes(cbNodes, node.elementTypes); - case 151 /* UnionType */: - return visitNodes(cbNodes, node.types); - case 152 /* ParenthesizedType */: - return visitNode(cbNode, node.type); - case 153 /* ObjectBindingPattern */: - case 154 /* ArrayBindingPattern */: - return visitNodes(cbNodes, node.elements); - case 156 /* ArrayLiteralExpression */: - return visitNodes(cbNodes, node.elements); - case 157 /* ObjectLiteralExpression */: - return visitNodes(cbNodes, node.properties); - case 158 /* PropertyAccessExpression */: - return visitNode(cbNode, node.expression) || - visitNode(cbNode, node.dotToken) || - visitNode(cbNode, node.name); - case 159 /* ElementAccessExpression */: - return visitNode(cbNode, node.expression) || - visitNode(cbNode, node.argumentExpression); - case 160 /* CallExpression */: - case 161 /* NewExpression */: - return visitNode(cbNode, node.expression) || - visitNodes(cbNodes, node.typeArguments) || - visitNodes(cbNodes, node.arguments); - case 162 /* TaggedTemplateExpression */: - return visitNode(cbNode, node.tag) || - visitNode(cbNode, node.template); - case 163 /* TypeAssertionExpression */: - return visitNode(cbNode, node.type) || - visitNode(cbNode, node.expression); - case 164 /* ParenthesizedExpression */: - return visitNode(cbNode, node.expression); - case 167 /* DeleteExpression */: - return visitNode(cbNode, node.expression); - case 168 /* TypeOfExpression */: - return visitNode(cbNode, node.expression); - case 169 /* VoidExpression */: - return visitNode(cbNode, node.expression); - case 170 /* PrefixUnaryExpression */: - return visitNode(cbNode, node.operand); - case 175 /* YieldExpression */: - return visitNode(cbNode, node.asteriskToken) || - visitNode(cbNode, node.expression); - case 171 /* PostfixUnaryExpression */: - return visitNode(cbNode, node.operand); - case 172 /* BinaryExpression */: - return visitNode(cbNode, node.left) || - visitNode(cbNode, node.operatorToken) || - visitNode(cbNode, node.right); - case 173 /* ConditionalExpression */: - return visitNode(cbNode, node.condition) || - visitNode(cbNode, node.questionToken) || - visitNode(cbNode, node.whenTrue) || - visitNode(cbNode, node.colonToken) || - visitNode(cbNode, node.whenFalse); - case 176 /* SpreadElementExpression */: - return visitNode(cbNode, node.expression); - case 182 /* Block */: - case 209 /* ModuleBlock */: - return visitNodes(cbNodes, node.statements); - case 230 /* SourceFile */: - return visitNodes(cbNodes, node.statements) || - visitNode(cbNode, node.endOfFileToken); - case 183 /* VariableStatement */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.declarationList); - case 202 /* VariableDeclarationList */: - return visitNodes(cbNodes, node.declarations); - case 185 /* ExpressionStatement */: - return visitNode(cbNode, node.expression); - case 186 /* IfStatement */: - return visitNode(cbNode, node.expression) || - visitNode(cbNode, node.thenStatement) || - visitNode(cbNode, node.elseStatement); - case 187 /* DoStatement */: - return visitNode(cbNode, node.statement) || - visitNode(cbNode, node.expression); - case 188 /* WhileStatement */: - return visitNode(cbNode, node.expression) || - visitNode(cbNode, node.statement); - case 189 /* ForStatement */: - return visitNode(cbNode, node.initializer) || - visitNode(cbNode, node.condition) || - visitNode(cbNode, node.incrementor) || - visitNode(cbNode, node.statement); - case 190 /* ForInStatement */: - return visitNode(cbNode, node.initializer) || - visitNode(cbNode, node.expression) || - visitNode(cbNode, node.statement); - case 191 /* ForOfStatement */: - return visitNode(cbNode, node.initializer) || - visitNode(cbNode, node.expression) || - visitNode(cbNode, node.statement); - case 192 /* ContinueStatement */: - case 193 /* BreakStatement */: - return visitNode(cbNode, node.label); - case 194 /* ReturnStatement */: - return visitNode(cbNode, node.expression); - case 195 /* WithStatement */: - return visitNode(cbNode, node.expression) || - visitNode(cbNode, node.statement); - case 196 /* SwitchStatement */: - return visitNode(cbNode, node.expression) || - visitNode(cbNode, node.caseBlock); - case 210 /* CaseBlock */: - return visitNodes(cbNodes, node.clauses); - case 223 /* CaseClause */: - return visitNode(cbNode, node.expression) || - visitNodes(cbNodes, node.statements); - case 224 /* DefaultClause */: - return visitNodes(cbNodes, node.statements); - case 197 /* LabeledStatement */: - return visitNode(cbNode, node.label) || - visitNode(cbNode, node.statement); - case 198 /* ThrowStatement */: - return visitNode(cbNode, node.expression); - case 199 /* TryStatement */: - return visitNode(cbNode, node.tryBlock) || - visitNode(cbNode, node.catchClause) || - visitNode(cbNode, node.finallyBlock); - case 226 /* CatchClause */: - return visitNode(cbNode, node.variableDeclaration) || - visitNode(cbNode, node.block); - case 132 /* Decorator */: - return visitNode(cbNode, node.expression); - case 204 /* ClassDeclaration */: - case 177 /* ClassExpression */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.name) || - visitNodes(cbNodes, node.typeParameters) || - visitNodes(cbNodes, node.heritageClauses) || - visitNodes(cbNodes, node.members); - case 205 /* InterfaceDeclaration */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.name) || - visitNodes(cbNodes, node.typeParameters) || - visitNodes(cbNodes, node.heritageClauses) || - visitNodes(cbNodes, node.members); - case 206 /* TypeAliasDeclaration */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.name) || - visitNodes(cbNodes, node.typeParameters) || - visitNode(cbNode, node.type); - case 207 /* EnumDeclaration */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.name) || - visitNodes(cbNodes, node.members); - case 229 /* EnumMember */: - return visitNode(cbNode, node.name) || - visitNode(cbNode, node.initializer); - case 208 /* ModuleDeclaration */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.name) || - visitNode(cbNode, node.body); - case 211 /* ImportEqualsDeclaration */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.name) || - visitNode(cbNode, node.moduleReference); - case 212 /* ImportDeclaration */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.importClause) || - visitNode(cbNode, node.moduleSpecifier); - case 213 /* ImportClause */: - return visitNode(cbNode, node.name) || - visitNode(cbNode, node.namedBindings); - case 214 /* NamespaceImport */: - return visitNode(cbNode, node.name); - case 215 /* NamedImports */: - case 219 /* NamedExports */: - return visitNodes(cbNodes, node.elements); - case 218 /* ExportDeclaration */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.exportClause) || - visitNode(cbNode, node.moduleSpecifier); - case 216 /* ImportSpecifier */: - case 220 /* ExportSpecifier */: - return visitNode(cbNode, node.propertyName) || - visitNode(cbNode, node.name); - case 217 /* ExportAssignment */: - return visitNodes(cbNodes, node.decorators) || - visitNodes(cbNodes, node.modifiers) || - visitNode(cbNode, node.expression); - case 174 /* TemplateExpression */: - return visitNode(cbNode, node.head) || visitNodes(cbNodes, node.templateSpans); - case 180 /* TemplateSpan */: - return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal); - case 129 /* ComputedPropertyName */: - return visitNode(cbNode, node.expression); - case 225 /* HeritageClause */: - return visitNodes(cbNodes, node.types); - case 179 /* ExpressionWithTypeArguments */: - return visitNode(cbNode, node.expression) || - visitNodes(cbNodes, node.typeArguments); - case 222 /* ExternalModuleReference */: - return visitNode(cbNode, node.expression); - case 221 /* MissingDeclaration */: - return visitNodes(cbNodes, node.decorators); - case 231 /* JSDocTypeExpression */: - return visitNode(cbNode, node.type); - case 235 /* JSDocUnionType */: - return visitNodes(cbNodes, node.types); - case 236 /* JSDocTupleType */: - return visitNodes(cbNodes, node.types); - case 234 /* JSDocArrayType */: - return visitNode(cbNode, node.elementType); - case 238 /* JSDocNonNullableType */: - return visitNode(cbNode, node.type); - case 237 /* JSDocNullableType */: - return visitNode(cbNode, node.type); - case 239 /* JSDocRecordType */: - return visitNodes(cbNodes, node.members); - case 241 /* JSDocTypeReference */: - return visitNode(cbNode, node.name) || - visitNodes(cbNodes, node.typeArguments); - case 242 /* JSDocOptionalType */: - return visitNode(cbNode, node.type); - case 243 /* JSDocFunctionType */: - return visitNodes(cbNodes, node.parameters) || - visitNode(cbNode, node.type); - case 244 /* JSDocVariadicType */: - return visitNode(cbNode, node.type); - case 245 /* JSDocConstructorType */: - return visitNode(cbNode, node.type); - case 246 /* JSDocThisType */: - return visitNode(cbNode, node.type); - case 240 /* JSDocRecordMember */: - return visitNode(cbNode, node.name) || - visitNode(cbNode, node.type); - case 247 /* JSDocComment */: - return visitNodes(cbNodes, node.tags); - case 249 /* JSDocParameterTag */: - return visitNode(cbNode, node.preParameterName) || - visitNode(cbNode, node.typeExpression) || - visitNode(cbNode, node.postParameterName); - case 250 /* JSDocReturnTag */: - return visitNode(cbNode, node.typeExpression); - case 251 /* JSDocTypeTag */: - return visitNode(cbNode, node.typeExpression); - case 252 /* JSDocTemplateTag */: - return visitNodes(cbNodes, node.typeParameters); - } - } - ts.forEachChild = forEachChild; - function createSourceFile(fileName, sourceText, languageVersion, setParentNodes) { - if (setParentNodes === void 0) { setParentNodes = false; } - var start = new Date().getTime(); - var result = Parser.parseSourceFile(fileName, sourceText, languageVersion, undefined, setParentNodes); - ts.parseTime += new Date().getTime() - start; - return result; - } - ts.createSourceFile = createSourceFile; - // Produces a new SourceFile for the 'newText' provided. The 'textChangeRange' parameter - // indicates what changed between the 'text' that this SourceFile has and the 'newText'. - // The SourceFile will be created with the compiler attempting to reuse as many nodes from - // this file as possible. - // - // Note: this function mutates nodes from this SourceFile. That means any existing nodes - // from this SourceFile that are being held onto may change as a result (including - // becoming detached from any SourceFile). It is recommended that this SourceFile not - // be used once 'update' is called on it. - function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) { - return IncrementalParser.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks); - } - ts.updateSourceFile = updateSourceFile; - /* @internal */ - function parseIsolatedJSDocComment(content, start, length) { - return Parser.JSDocParser.parseIsolatedJSDocComment(content, start, length); - } - ts.parseIsolatedJSDocComment = parseIsolatedJSDocComment; - /* @internal */ - // Exposed only for testing. - function parseJSDocTypeExpressionForTests(content, start, length) { - return Parser.JSDocParser.parseJSDocTypeExpressionForTests(content, start, length); - } - ts.parseJSDocTypeExpressionForTests = parseJSDocTypeExpressionForTests; - // Implement the parser as a singleton module. We do this for perf reasons because creating - // parser instances can actually be expensive enough to impact us on projects with many source - // files. - var Parser; - (function (Parser) { - // Share a single scanner across all calls to parse a source file. This helps speed things - // up by avoiding the cost of creating/compiling scanners over and over again. - var scanner = ts.createScanner(2 /* Latest */, true); - var disallowInAndDecoratorContext = 2 /* DisallowIn */ | 16 /* Decorator */; - var sourceFile; - var parseDiagnostics; - var syntaxCursor; - var token; - var sourceText; - var nodeCount; - var identifiers; - var identifierCount; - var parsingContext; - // Flags that dictate what parsing context we're in. For example: - // Whether or not we are in strict parsing mode. All that changes in strict parsing mode is - // that some tokens that would be considered identifiers may be considered keywords. - // - // When adding more parser context flags, consider which is the more common case that the - // flag will be in. This should be the 'false' state for that flag. The reason for this is - // that we don't store data in our nodes unless the value is in the *non-default* state. So, - // for example, more often than code 'allows-in' (or doesn't 'disallow-in'). We opt for - // 'disallow-in' set to 'false'. Otherwise, if we had 'allowsIn' set to 'true', then almost - // all nodes would need extra state on them to store this info. - // - // Note: 'allowIn' and 'allowYield' track 1:1 with the [in] and [yield] concepts in the ES6 - // grammar specification. - // - // An important thing about these context concepts. By default they are effectively inherited - // while parsing through every grammar production. i.e. if you don't change them, then when - // you parse a sub-production, it will have the same context values as the parent production. - // This is great most of the time. After all, consider all the 'expression' grammar productions - // and how nearly all of them pass along the 'in' and 'yield' context values: - // - // EqualityExpression[In, Yield] : - // RelationalExpression[?In, ?Yield] - // EqualityExpression[?In, ?Yield] == RelationalExpression[?In, ?Yield] - // EqualityExpression[?In, ?Yield] != RelationalExpression[?In, ?Yield] - // EqualityExpression[?In, ?Yield] === RelationalExpression[?In, ?Yield] - // EqualityExpression[?In, ?Yield] !== RelationalExpression[?In, ?Yield] - // - // Where you have to be careful is then understanding what the points are in the grammar - // where the values are *not* passed along. For example: - // - // SingleNameBinding[Yield,GeneratorParameter] - // [+GeneratorParameter]BindingIdentifier[Yield] Initializer[In]opt - // [~GeneratorParameter]BindingIdentifier[?Yield]Initializer[In, ?Yield]opt - // - // Here this is saying that if the GeneratorParameter context flag is set, that we should - // explicitly set the 'yield' context flag to false before calling into the BindingIdentifier - // and we should explicitly unset the 'yield' context flag before calling into the Initializer. - // production. Conversely, if the GeneratorParameter context flag is not set, then we - // should leave the 'yield' context flag alone. - // - // Getting this all correct is tricky and requires careful reading of the grammar to - // understand when these values should be changed versus when they should be inherited. - // - // Note: it should not be necessary to save/restore these flags during speculative/lookahead - // parsing. These context flags are naturally stored and restored through normal recursive - // descent parsing and unwinding. - var contextFlags; - // Whether or not we've had a parse error since creating the last AST node. If we have - // encountered an error, it will be stored on the next AST node we create. Parse errors - // can be broken down into three categories: - // - // 1) An error that occurred during scanning. For example, an unterminated literal, or a - // character that was completely not understood. - // - // 2) A token was expected, but was not present. This type of error is commonly produced - // by the 'parseExpected' function. - // - // 3) A token was present that no parsing function was able to consume. This type of error - // only occurs in the 'abortParsingListOrMoveToNextToken' function when the parser - // decides to skip the token. - // - // In all of these cases, we want to mark the next node as having had an error before it. - // With this mark, we can know in incremental settings if this node can be reused, or if - // we have to reparse it. If we don't keep this information around, we may just reuse the - // node. in that event we would then not produce the same errors as we did before, causing - // significant confusion problems. - // - // Note: it is necessary that this value be saved/restored during speculative/lookahead - // parsing. During lookahead parsing, we will often create a node. That node will have - // this value attached, and then this value will be set back to 'false'. If we decide to - // rewind, we must get back to the same value we had prior to the lookahead. - // - // Note: any errors at the end of the file that do not precede a regular node, should get - // attached to the EOF token. - var parseErrorBeforeNextFinishedNode = false; - function parseSourceFile(fileName, _sourceText, languageVersion, _syntaxCursor, setParentNodes) { - initializeState(fileName, _sourceText, languageVersion, _syntaxCursor); - var result = parseSourceFileWorker(fileName, languageVersion, setParentNodes); - clearState(); - return result; - } - Parser.parseSourceFile = parseSourceFile; - function initializeState(fileName, _sourceText, languageVersion, _syntaxCursor) { - sourceText = _sourceText; - syntaxCursor = _syntaxCursor; - parseDiagnostics = []; - parsingContext = 0; - identifiers = {}; - identifierCount = 0; - nodeCount = 0; - contextFlags = ts.isJavaScript(fileName) ? 64 /* JavaScriptFile */ : 0 /* None */; - parseErrorBeforeNextFinishedNode = false; - // Initialize and prime the scanner before parsing the source elements. - scanner.setText(sourceText); - scanner.setOnError(scanError); - scanner.setScriptTarget(languageVersion); - } - function clearState() { - // Clear out the text the scanner is pointing at, so it doesn't keep anything alive unnecessarily. - scanner.setText(""); - scanner.setOnError(undefined); - // Clear any data. We don't want to accidently hold onto it for too long. - parseDiagnostics = undefined; - sourceFile = undefined; - identifiers = undefined; - syntaxCursor = undefined; - sourceText = undefined; - } - function parseSourceFileWorker(fileName, languageVersion, setParentNodes) { - sourceFile = createSourceFile(fileName, languageVersion); - // Prime the scanner. - token = nextToken(); - processReferenceComments(sourceFile); - sourceFile.statements = parseList(0 /* SourceElements */, true, parseStatement); - ts.Debug.assert(token === 1 /* EndOfFileToken */); - sourceFile.endOfFileToken = parseTokenNode(); - setExternalModuleIndicator(sourceFile); - sourceFile.nodeCount = nodeCount; - sourceFile.identifierCount = identifierCount; - sourceFile.identifiers = identifiers; - sourceFile.parseDiagnostics = parseDiagnostics; - if (setParentNodes) { - fixupParentReferences(sourceFile); - } - // If this is a javascript file, proactively see if we can get JSDoc comments for - // relevant nodes in the file. We'll use these to provide typing informaion if they're - // available. - if (ts.isJavaScript(fileName)) { - addJSDocComments(); - } - return sourceFile; - } - function addJSDocComments() { - forEachChild(sourceFile, visit); - return; - function visit(node) { - // Add additional cases as necessary depending on how we see JSDoc comments used - // in the wild. - switch (node.kind) { - case 183 /* VariableStatement */: - case 203 /* FunctionDeclaration */: - case 131 /* Parameter */: - addJSDocComment(node); - } - forEachChild(node, visit); - } - } - function addJSDocComment(node) { - var comments = ts.getLeadingCommentRangesOfNode(node, sourceFile); - if (comments) { - for (var _i = 0; _i < comments.length; _i++) { - var comment = comments[_i]; - var jsDocComment = JSDocParser.parseJSDocComment(node, comment.pos, comment.end - comment.pos); - if (jsDocComment) { - node.jsDocComment = jsDocComment; - } - } - } - } - function fixupParentReferences(sourceFile) { - // normally parent references are set during binding. However, for clients that only need - // a syntax tree, and no semantic features, then the binding process is an unnecessary - // overhead. This functions allows us to set all the parents, without all the expense of - // binding. - var parent = sourceFile; - forEachChild(sourceFile, visitNode); - return; - function visitNode(n) { - // walk down setting parents that differ from the parent we think it should be. This - // allows us to quickly bail out of setting parents for subtrees during incremental - // parsing - if (n.parent !== parent) { - n.parent = parent; - var saveParent = parent; - parent = n; - forEachChild(n, visitNode); - parent = saveParent; - } - } - } - Parser.fixupParentReferences = fixupParentReferences; - function createSourceFile(fileName, languageVersion) { - var sourceFile = createNode(230 /* SourceFile */, 0); - sourceFile.pos = 0; - sourceFile.end = sourceText.length; - sourceFile.text = sourceText; - sourceFile.bindDiagnostics = []; - sourceFile.languageVersion = languageVersion; - sourceFile.fileName = ts.normalizePath(fileName); - sourceFile.flags = ts.fileExtensionIs(sourceFile.fileName, ".d.ts") ? 2048 /* DeclarationFile */ : 0; - return sourceFile; - } - function setContextFlag(val, flag) { - if (val) { - contextFlags |= flag; - } - else { - contextFlags &= ~flag; - } - } - function setStrictModeContext(val) { - setContextFlag(val, 1 /* StrictMode */); - } - function setDisallowInContext(val) { - setContextFlag(val, 2 /* DisallowIn */); - } - function setYieldContext(val) { - setContextFlag(val, 4 /* Yield */); - } - function setGeneratorParameterContext(val) { - setContextFlag(val, 8 /* GeneratorParameter */); - } - function setDecoratorContext(val) { - setContextFlag(val, 16 /* Decorator */); - } - function doOutsideOfContext(flags, func) { - var currentContextFlags = contextFlags & flags; - if (currentContextFlags) { - setContextFlag(false, currentContextFlags); - var result = func(); - setContextFlag(true, currentContextFlags); - return result; - } - // no need to do anything special as we are not in any of the requested contexts - return func(); - } - function allowInAnd(func) { - if (contextFlags & 2 /* DisallowIn */) { - setDisallowInContext(false); - var result = func(); - setDisallowInContext(true); - return result; - } - // no need to do anything special if 'in' is already allowed. - return func(); - } - function disallowInAnd(func) { - if (contextFlags & 2 /* DisallowIn */) { - // no need to do anything special if 'in' is already disallowed. - return func(); - } - setDisallowInContext(true); - var result = func(); - setDisallowInContext(false); - return result; - } - function doInYieldContext(func) { - if (contextFlags & 4 /* Yield */) { - // no need to do anything special if we're already in the [Yield] context. - return func(); - } - setYieldContext(true); - var result = func(); - setYieldContext(false); - return result; - } - function doOutsideOfYieldContext(func) { - if (contextFlags & 4 /* Yield */) { - setYieldContext(false); - var result = func(); - setYieldContext(true); - return result; - } - // no need to do anything special if we're not in the [Yield] context. - return func(); - } - function doInDecoratorContext(func) { - if (contextFlags & 16 /* Decorator */) { - // no need to do anything special if we're already in the [Decorator] context. - return func(); - } - setDecoratorContext(true); - var result = func(); - setDecoratorContext(false); - return result; - } - function inYieldContext() { - return (contextFlags & 4 /* Yield */) !== 0; - } - function inStrictModeContext() { - return (contextFlags & 1 /* StrictMode */) !== 0; - } - function inGeneratorParameterContext() { - return (contextFlags & 8 /* GeneratorParameter */) !== 0; - } - function inDisallowInContext() { - return (contextFlags & 2 /* DisallowIn */) !== 0; - } - function inDecoratorContext() { - return (contextFlags & 16 /* Decorator */) !== 0; - } - function parseErrorAtCurrentToken(message, arg0) { - var start = scanner.getTokenPos(); - var length = scanner.getTextPos() - start; - parseErrorAtPosition(start, length, message, arg0); - } - function parseErrorAtPosition(start, length, message, arg0) { - // Don't report another error if it would just be at the same position as the last error. - var lastError = ts.lastOrUndefined(parseDiagnostics); - if (!lastError || start !== lastError.start) { - parseDiagnostics.push(ts.createFileDiagnostic(sourceFile, start, length, message, arg0)); - } - // Mark that we've encountered an error. We'll set an appropriate bit on the next - // node we finish so that it can't be reused incrementally. - parseErrorBeforeNextFinishedNode = true; - } - function scanError(message, length) { - var pos = scanner.getTextPos(); - parseErrorAtPosition(pos, length || 0, message); - } - function getNodePos() { - return scanner.getStartPos(); - } - function getNodeEnd() { - return scanner.getStartPos(); - } - function nextToken() { - return token = scanner.scan(); - } - function getTokenPos(pos) { - return ts.skipTrivia(sourceText, pos); - } - function reScanGreaterToken() { - return token = scanner.reScanGreaterToken(); - } - function reScanSlashToken() { - return token = scanner.reScanSlashToken(); - } - function reScanTemplateToken() { - return token = scanner.reScanTemplateToken(); - } - function speculationHelper(callback, isLookAhead) { - // Keep track of the state we'll need to rollback to if lookahead fails (or if the - // caller asked us to always reset our state). - var saveToken = token; - var saveParseDiagnosticsLength = parseDiagnostics.length; - var saveParseErrorBeforeNextFinishedNode = parseErrorBeforeNextFinishedNode; - // Note: it is not actually necessary to save/restore the context flags here. That's - // because the saving/restorating of these flags happens naturally through the recursive - // descent nature of our parser. However, we still store this here just so we can - // assert that that invariant holds. - var saveContextFlags = contextFlags; - // If we're only looking ahead, then tell the scanner to only lookahead as well. - // Otherwise, if we're actually speculatively parsing, then tell the scanner to do the - // same. - var result = isLookAhead - ? scanner.lookAhead(callback) - : scanner.tryScan(callback); - ts.Debug.assert(saveContextFlags === contextFlags); - // If our callback returned something 'falsy' or we're just looking ahead, - // then unconditionally restore us to where we were. - if (!result || isLookAhead) { - token = saveToken; - parseDiagnostics.length = saveParseDiagnosticsLength; - parseErrorBeforeNextFinishedNode = saveParseErrorBeforeNextFinishedNode; - } - return result; - } - // Invokes the provided callback then unconditionally restores the parser to the state it - // was in immediately prior to invoking the callback. The result of invoking the callback - // is returned from this function. - function lookAhead(callback) { - return speculationHelper(callback, true); - } - // Invokes the provided callback. If the callback returns something falsy, then it restores - // the parser to the state it was in immediately prior to invoking the callback. If the - // callback returns something truthy, then the parser state is not rolled back. The result - // of invoking the callback is returned from this function. - function tryParse(callback) { - return speculationHelper(callback, false); - } - // Ignore strict mode flag because we will report an error in type checker instead. - function isIdentifier() { - if (token === 65 /* Identifier */) { - return true; - } - // If we have a 'yield' keyword, and we're in the [yield] context, then 'yield' is - // considered a keyword and is not an identifier. - if (token === 110 /* YieldKeyword */ && inYieldContext()) { - return false; - } - return token > 101 /* LastReservedWord */; - } - function parseExpected(kind, diagnosticMessage) { - if (token === kind) { - nextToken(); - return true; - } - // Report specific message if provided with one. Otherwise, report generic fallback message. - if (diagnosticMessage) { - parseErrorAtCurrentToken(diagnosticMessage); - } - else { - parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(kind)); - } - return false; - } - function parseOptional(t) { - if (token === t) { - nextToken(); - return true; - } - return false; - } - function parseOptionalToken(t) { - if (token === t) { - return parseTokenNode(); - } - return undefined; - } - function parseExpectedToken(t, reportAtCurrentPosition, diagnosticMessage, arg0) { - return parseOptionalToken(t) || - createMissingNode(t, reportAtCurrentPosition, diagnosticMessage, arg0); - } - function parseTokenNode() { - var node = createNode(token); - nextToken(); - return finishNode(node); - } - function canParseSemicolon() { - // If there's a real semicolon, then we can always parse it out. - if (token === 22 /* SemicolonToken */) { - return true; - } - // We can parse out an optional semicolon in ASI cases in the following cases. - return token === 15 /* CloseBraceToken */ || token === 1 /* EndOfFileToken */ || scanner.hasPrecedingLineBreak(); - } - function parseSemicolon() { - if (canParseSemicolon()) { - if (token === 22 /* SemicolonToken */) { - // consume the semicolon if it was explicitly provided. - nextToken(); - } - return true; - } - else { - return parseExpected(22 /* SemicolonToken */); - } - } - function createNode(kind, pos) { - nodeCount++; - var node = new (nodeConstructors[kind] || (nodeConstructors[kind] = ts.objectAllocator.getNodeConstructor(kind)))(); - if (!(pos >= 0)) { - pos = scanner.getStartPos(); - } - node.pos = pos; - node.end = pos; - return node; - } - function finishNode(node, end) { - node.end = end === undefined ? scanner.getStartPos() : end; - if (contextFlags) { - node.parserContextFlags = contextFlags; - } - // Keep track on the node if we encountered an error while parsing it. If we did, then - // we cannot reuse the node incrementally. Once we've marked this node, clear out the - // flag so that we don't mark any subsequent nodes. - if (parseErrorBeforeNextFinishedNode) { - parseErrorBeforeNextFinishedNode = false; - node.parserContextFlags |= 32 /* ThisNodeHasError */; - } - return node; - } - function createMissingNode(kind, reportAtCurrentPosition, diagnosticMessage, arg0) { - if (reportAtCurrentPosition) { - parseErrorAtPosition(scanner.getStartPos(), 0, diagnosticMessage, arg0); - } - else { - parseErrorAtCurrentToken(diagnosticMessage, arg0); - } - var result = createNode(kind, scanner.getStartPos()); - result.text = ""; - return finishNode(result); - } - function internIdentifier(text) { - text = ts.escapeIdentifier(text); - return ts.hasProperty(identifiers, text) ? identifiers[text] : (identifiers[text] = text); - } - // An identifier that starts with two underscores has an extra underscore character prepended to it to avoid issues - // with magic property names like '__proto__'. The 'identifiers' object is used to share a single string instance for - // each identifier in order to reduce memory consumption. - function createIdentifier(isIdentifier, diagnosticMessage) { - identifierCount++; - if (isIdentifier) { - var node = createNode(65 /* Identifier */); - // Store original token kind if it is not just an Identifier so we can report appropriate error later in type checker - if (token !== 65 /* Identifier */) { - node.originalKeywordKind = token; - } - node.text = internIdentifier(scanner.getTokenValue()); - nextToken(); - return finishNode(node); - } - return createMissingNode(65 /* Identifier */, false, diagnosticMessage || ts.Diagnostics.Identifier_expected); - } - function parseIdentifier(diagnosticMessage) { - return createIdentifier(isIdentifier(), diagnosticMessage); - } - function parseIdentifierName() { - return createIdentifier(isIdentifierOrKeyword()); - } - function isLiteralPropertyName() { - return isIdentifierOrKeyword() || - token === 8 /* StringLiteral */ || - token === 7 /* NumericLiteral */; - } - function parsePropertyNameWorker(allowComputedPropertyNames) { - if (token === 8 /* StringLiteral */ || token === 7 /* NumericLiteral */) { - return parseLiteralNode(true); - } - if (allowComputedPropertyNames && token === 18 /* OpenBracketToken */) { - return parseComputedPropertyName(); - } - return parseIdentifierName(); - } - function parsePropertyName() { - return parsePropertyNameWorker(true); - } - function parseSimplePropertyName() { - return parsePropertyNameWorker(false); - } - function isSimplePropertyName() { - return token === 8 /* StringLiteral */ || token === 7 /* NumericLiteral */ || isIdentifierOrKeyword(); - } - function parseComputedPropertyName() { - // PropertyName[Yield,GeneratorParameter] : - // LiteralPropertyName - // [+GeneratorParameter] ComputedPropertyName - // [~GeneratorParameter] ComputedPropertyName[?Yield] - // - // ComputedPropertyName[Yield] : - // [ AssignmentExpression[In, ?Yield] ] - // - var node = createNode(129 /* ComputedPropertyName */); - parseExpected(18 /* OpenBracketToken */); - // We parse any expression (including a comma expression). But the grammar - // says that only an assignment expression is allowed, so the grammar checker - // will error if it sees a comma expression. - var yieldContext = inYieldContext(); - if (inGeneratorParameterContext()) { - setYieldContext(false); - } - node.expression = allowInAnd(parseExpression); - if (inGeneratorParameterContext()) { - setYieldContext(yieldContext); - } - parseExpected(19 /* CloseBracketToken */); - return finishNode(node); - } - function parseContextualModifier(t) { - return token === t && tryParse(nextTokenCanFollowModifier); - } - function nextTokenCanFollowModifier() { - if (token === 70 /* ConstKeyword */) { - // 'const' is only a modifier if followed by 'enum'. - return nextToken() === 77 /* EnumKeyword */; - } - if (token === 78 /* ExportKeyword */) { - nextToken(); - if (token === 73 /* DefaultKeyword */) { - return lookAhead(nextTokenIsClassOrFunction); - } - return token !== 35 /* AsteriskToken */ && token !== 14 /* OpenBraceToken */ && canFollowModifier(); - } - if (token === 73 /* DefaultKeyword */) { - return nextTokenIsClassOrFunction(); - } - nextToken(); - return canFollowModifier(); - } - function parseAnyContextualModifier() { - return ts.isModifier(token) && tryParse(nextTokenCanFollowModifier); - } - function canFollowModifier() { - return token === 18 /* OpenBracketToken */ - || token === 14 /* OpenBraceToken */ - || token === 35 /* AsteriskToken */ - || isLiteralPropertyName(); - } - function nextTokenIsClassOrFunction() { - nextToken(); - return token === 69 /* ClassKeyword */ || token === 83 /* FunctionKeyword */; - } - // True if positioned at the start of a list element - function isListElement(parsingContext, inErrorRecovery) { - var node = currentNode(parsingContext); - if (node) { - return true; - } - switch (parsingContext) { - case 0 /* SourceElements */: - case 1 /* BlockStatements */: - case 3 /* SwitchClauseStatements */: - // If we're in error recovery, then we don't want to treat ';' as an empty statement. - // The problem is that ';' can show up in far too many contexts, and if we see one - // and assume it's a statement, then we may bail out inappropriately from whatever - // we're parsing. For example, if we have a semicolon in the middle of a class, then - // we really don't want to assume the class is over and we're on a statement in the - // outer module. We just want to consume and move on. - return !(token === 22 /* SemicolonToken */ && inErrorRecovery) && isStartOfStatement(); - case 2 /* SwitchClauses */: - return token === 67 /* CaseKeyword */ || token === 73 /* DefaultKeyword */; - case 4 /* TypeMembers */: - return isStartOfTypeMember(); - case 5 /* ClassMembers */: - // We allow semicolons as class elements (as specified by ES6) as long as we're - // not in error recovery. If we're in error recovery, we don't want an errant - // semicolon to be treated as a class member (since they're almost always used - // for statements. - return lookAhead(isClassMemberStart) || (token === 22 /* SemicolonToken */ && !inErrorRecovery); - case 6 /* EnumMembers */: - // Include open bracket computed properties. This technically also lets in indexers, - // which would be a candidate for improved error reporting. - return token === 18 /* OpenBracketToken */ || isLiteralPropertyName(); - case 12 /* ObjectLiteralMembers */: - return token === 18 /* OpenBracketToken */ || token === 35 /* AsteriskToken */ || isLiteralPropertyName(); - case 9 /* ObjectBindingElements */: - return isLiteralPropertyName(); - case 7 /* HeritageClauseElement */: - // If we see { } then only consume it as an expression if it is followed by , or { - // That way we won't consume the body of a class in its heritage clause. - if (token === 14 /* OpenBraceToken */) { - return lookAhead(isValidHeritageClauseObjectLiteral); - } - if (!inErrorRecovery) { - return isStartOfLeftHandSideExpression() && !isHeritageClauseExtendsOrImplementsKeyword(); - } - else { - // If we're in error recovery we tighten up what we're willing to match. - // That way we don't treat something like "this" as a valid heritage clause - // element during recovery. - return isIdentifier() && !isHeritageClauseExtendsOrImplementsKeyword(); - } - case 8 /* VariableDeclarations */: - return isIdentifierOrPattern(); - case 10 /* ArrayBindingElements */: - return token === 23 /* CommaToken */ || token === 21 /* DotDotDotToken */ || isIdentifierOrPattern(); - case 15 /* TypeParameters */: - return isIdentifier(); - case 11 /* ArgumentExpressions */: - case 13 /* ArrayLiteralMembers */: - return token === 23 /* CommaToken */ || token === 21 /* DotDotDotToken */ || isStartOfExpression(); - case 14 /* Parameters */: - return isStartOfParameter(); - case 16 /* TypeArguments */: - case 17 /* TupleElementTypes */: - return token === 23 /* CommaToken */ || isStartOfType(); - case 18 /* HeritageClauses */: - return isHeritageClause(); - case 19 /* ImportOrExportSpecifiers */: - return isIdentifierOrKeyword(); - case 20 /* JSDocFunctionParameters */: - case 21 /* JSDocTypeArguments */: - case 23 /* JSDocTupleTypes */: - return JSDocParser.isJSDocType(); - case 22 /* JSDocRecordMembers */: - return isSimplePropertyName(); - } - ts.Debug.fail("Non-exhaustive case in 'isListElement'."); - } - function isValidHeritageClauseObjectLiteral() { - ts.Debug.assert(token === 14 /* OpenBraceToken */); - if (nextToken() === 15 /* CloseBraceToken */) { - // if we see "extends {}" then only treat the {} as what we're extending (and not - // the class body) if we have: - // - // extends {} { - // extends {}, - // extends {} extends - // extends {} implements - var next = nextToken(); - return next === 23 /* CommaToken */ || next === 14 /* OpenBraceToken */ || next === 79 /* ExtendsKeyword */ || next === 102 /* ImplementsKeyword */; - } - return true; - } - function nextTokenIsIdentifier() { - nextToken(); - return isIdentifier(); - } - function isHeritageClauseExtendsOrImplementsKeyword() { - if (token === 102 /* ImplementsKeyword */ || - token === 79 /* ExtendsKeyword */) { - return lookAhead(nextTokenIsStartOfExpression); - } - return false; - } - function nextTokenIsStartOfExpression() { - nextToken(); - return isStartOfExpression(); - } - // True if positioned at a list terminator - function isListTerminator(kind) { - if (token === 1 /* EndOfFileToken */) { - // Being at the end of the file ends all lists. - return true; - } - switch (kind) { - case 1 /* BlockStatements */: - case 2 /* SwitchClauses */: - case 4 /* TypeMembers */: - case 5 /* ClassMembers */: - case 6 /* EnumMembers */: - case 12 /* ObjectLiteralMembers */: - case 9 /* ObjectBindingElements */: - case 19 /* ImportOrExportSpecifiers */: - return token === 15 /* CloseBraceToken */; - case 3 /* SwitchClauseStatements */: - return token === 15 /* CloseBraceToken */ || token === 67 /* CaseKeyword */ || token === 73 /* DefaultKeyword */; - case 7 /* HeritageClauseElement */: - return token === 14 /* OpenBraceToken */ || token === 79 /* ExtendsKeyword */ || token === 102 /* ImplementsKeyword */; - case 8 /* VariableDeclarations */: - return isVariableDeclaratorListTerminator(); - case 15 /* TypeParameters */: - // Tokens other than '>' are here for better error recovery - return token === 25 /* GreaterThanToken */ || token === 16 /* OpenParenToken */ || token === 14 /* OpenBraceToken */ || token === 79 /* ExtendsKeyword */ || token === 102 /* ImplementsKeyword */; - case 11 /* ArgumentExpressions */: - // Tokens other than ')' are here for better error recovery - return token === 17 /* CloseParenToken */ || token === 22 /* SemicolonToken */; - case 13 /* ArrayLiteralMembers */: - case 17 /* TupleElementTypes */: - case 10 /* ArrayBindingElements */: - return token === 19 /* CloseBracketToken */; - case 14 /* Parameters */: - // Tokens other than ')' and ']' (the latter for index signatures) are here for better error recovery - return token === 17 /* CloseParenToken */ || token === 19 /* CloseBracketToken */ /*|| token === SyntaxKind.OpenBraceToken*/; - case 16 /* TypeArguments */: - // Tokens other than '>' are here for better error recovery - return token === 25 /* GreaterThanToken */ || token === 16 /* OpenParenToken */; - case 18 /* HeritageClauses */: - return token === 14 /* OpenBraceToken */ || token === 15 /* CloseBraceToken */; - case 20 /* JSDocFunctionParameters */: - return token === 17 /* CloseParenToken */ || token === 51 /* ColonToken */ || token === 15 /* CloseBraceToken */; - case 21 /* JSDocTypeArguments */: - return token === 25 /* GreaterThanToken */ || token === 15 /* CloseBraceToken */; - case 23 /* JSDocTupleTypes */: - return token === 19 /* CloseBracketToken */ || token === 15 /* CloseBraceToken */; - case 22 /* JSDocRecordMembers */: - return token === 15 /* CloseBraceToken */; - } - } - function isVariableDeclaratorListTerminator() { - // If we can consume a semicolon (either explicitly, or with ASI), then consider us done - // with parsing the list of variable declarators. - if (canParseSemicolon()) { - return true; - } - // in the case where we're parsing the variable declarator of a 'for-in' statement, we - // are done if we see an 'in' keyword in front of us. Same with for-of - if (isInOrOfKeyword(token)) { - return true; - } - // ERROR RECOVERY TWEAK: - // For better error recovery, if we see an '=>' then we just stop immediately. We've got an - // arrow function here and it's going to be very unlikely that we'll resynchronize and get - // another variable declaration. - if (token === 32 /* EqualsGreaterThanToken */) { - return true; - } - // Keep trying to parse out variable declarators. - return false; - } - // True if positioned at element or terminator of the current list or any enclosing list - function isInSomeParsingContext() { - for (var kind = 0; kind < 24 /* Count */; kind++) { - if (parsingContext & (1 << kind)) { - if (isListElement(kind, true) || isListTerminator(kind)) { - return true; - } - } - } - return false; - } - // Parses a list of elements - function parseList(kind, checkForStrictMode, parseElement) { - var saveParsingContext = parsingContext; - parsingContext |= 1 << kind; - var result = []; - result.pos = getNodePos(); - var savedStrictModeContext = inStrictModeContext(); - while (!isListTerminator(kind)) { - if (isListElement(kind, false)) { - var element = parseListElement(kind, parseElement); - result.push(element); - // test elements only if we are not already in strict mode - if (checkForStrictMode && !inStrictModeContext()) { - if (ts.isPrologueDirective(element)) { - if (isUseStrictPrologueDirective(element)) { - setStrictModeContext(true); - checkForStrictMode = false; - } - } - else { - checkForStrictMode = false; - } - } - continue; - } - if (abortParsingListOrMoveToNextToken(kind)) { - break; - } - } - setStrictModeContext(savedStrictModeContext); - result.end = getNodeEnd(); - parsingContext = saveParsingContext; - return result; - } - /// Should be called only on prologue directives (isPrologueDirective(node) should be true) - function isUseStrictPrologueDirective(node) { - ts.Debug.assert(ts.isPrologueDirective(node)); - var nodeText = ts.getTextOfNodeFromSourceText(sourceText, node.expression); - // Note: the node text must be exactly "use strict" or 'use strict'. It is not ok for the - // string to contain unicode escapes (as per ES5). - return nodeText === '"use strict"' || nodeText === "'use strict'"; - } - function parseListElement(parsingContext, parseElement) { - var node = currentNode(parsingContext); - if (node) { - return consumeNode(node); - } - return parseElement(); - } - function currentNode(parsingContext) { - // If there is an outstanding parse error that we've encountered, but not attached to - // some node, then we cannot get a node from the old source tree. This is because we - // want to mark the next node we encounter as being unusable. - // - // Note: This may be too conservative. Perhaps we could reuse the node and set the bit - // on it (or its leftmost child) as having the error. For now though, being conservative - // is nice and likely won't ever affect perf. - if (parseErrorBeforeNextFinishedNode) { - return undefined; - } - if (!syntaxCursor) { - // if we don't have a cursor, we could never return a node from the old tree. - return undefined; - } - var node = syntaxCursor.currentNode(scanner.getStartPos()); - // Can't reuse a missing node. - if (ts.nodeIsMissing(node)) { - return undefined; - } - // Can't reuse a node that intersected the change range. - if (node.intersectsChange) { - return undefined; - } - // Can't reuse a node that contains a parse error. This is necessary so that we - // produce the same set of errors again. - if (ts.containsParseError(node)) { - return undefined; - } - // We can only reuse a node if it was parsed under the same strict mode that we're - // currently in. i.e. if we originally parsed a node in non-strict mode, but then - // the user added 'using strict' at the top of the file, then we can't use that node - // again as the presense of strict mode may cause us to parse the tokens in the file - // differetly. - // - // Note: we *can* reuse tokens when the strict mode changes. That's because tokens - // are unaffected by strict mode. It's just the parser will decide what to do with it - // differently depending on what mode it is in. - // - // This also applies to all our other context flags as well. - var nodeContextFlags = node.parserContextFlags & 63 /* ParserGeneratedFlags */; - if (nodeContextFlags !== contextFlags) { - return undefined; - } - // Ok, we have a node that looks like it could be reused. Now verify that it is valid - // in the currest list parsing context that we're currently at. - if (!canReuseNode(node, parsingContext)) { - return undefined; - } - return node; - } - function consumeNode(node) { - // Move the scanner so it is after the node we just consumed. - scanner.setTextPos(node.end); - nextToken(); - return node; - } - function canReuseNode(node, parsingContext) { - switch (parsingContext) { - case 5 /* ClassMembers */: - return isReusableClassMember(node); - case 2 /* SwitchClauses */: - return isReusableSwitchClause(node); - case 0 /* SourceElements */: - case 1 /* BlockStatements */: - case 3 /* SwitchClauseStatements */: - return isReusableStatement(node); - case 6 /* EnumMembers */: - return isReusableEnumMember(node); - case 4 /* TypeMembers */: - return isReusableTypeMember(node); - case 8 /* VariableDeclarations */: - return isReusableVariableDeclaration(node); - case 14 /* Parameters */: - return isReusableParameter(node); - // Any other lists we do not care about reusing nodes in. But feel free to add if - // you can do so safely. Danger areas involve nodes that may involve speculative - // parsing. If speculative parsing is involved with the node, then the range the - // parser reached while looking ahead might be in the edited range (see the example - // in canReuseVariableDeclaratorNode for a good case of this). - case 18 /* HeritageClauses */: - // This would probably be safe to reuse. There is no speculative parsing with - // heritage clauses. - case 15 /* TypeParameters */: - // This would probably be safe to reuse. There is no speculative parsing with - // type parameters. Note that that's because type *parameters* only occur in - // unambiguous *type* contexts. While type *arguments* occur in very ambiguous - // *expression* contexts. - case 17 /* TupleElementTypes */: - // This would probably be safe to reuse. There is no speculative parsing with - // tuple types. - // Technically, type argument list types are probably safe to reuse. While - // speculative parsing is involved with them (since type argument lists are only - // produced from speculative parsing a < as a type argument list), we only have - // the types because speculative parsing succeeded. Thus, the lookahead never - // went past the end of the list and rewound. - case 16 /* TypeArguments */: - // Note: these are almost certainly not safe to ever reuse. Expressions commonly - // need a large amount of lookahead, and we should not reuse them as they may - // have actually intersected the edit. - case 11 /* ArgumentExpressions */: - // This is not safe to reuse for the same reason as the 'AssignmentExpression' - // cases. i.e. a property assignment may end with an expression, and thus might - // have lookahead far beyond it's old node. - case 12 /* ObjectLiteralMembers */: - // This is probably not safe to reuse. There can be speculative parsing with - // type names in a heritage clause. There can be generic names in the type - // name list, and there can be left hand side expressions (which can have type - // arguments.) - case 7 /* HeritageClauseElement */: - } - return false; - } - function isReusableClassMember(node) { - if (node) { - switch (node.kind) { - case 137 /* Constructor */: - case 142 /* IndexSignature */: - case 136 /* MethodDeclaration */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 134 /* PropertyDeclaration */: - case 181 /* SemicolonClassElement */: - return true; - } - } - return false; - } - function isReusableSwitchClause(node) { - if (node) { - switch (node.kind) { - case 223 /* CaseClause */: - case 224 /* DefaultClause */: - return true; - } - } - return false; - } - function isReusableStatement(node) { - if (node) { - switch (node.kind) { - case 203 /* FunctionDeclaration */: - case 183 /* VariableStatement */: - case 182 /* Block */: - case 186 /* IfStatement */: - case 185 /* ExpressionStatement */: - case 198 /* ThrowStatement */: - case 194 /* ReturnStatement */: - case 196 /* SwitchStatement */: - case 193 /* BreakStatement */: - case 192 /* ContinueStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 189 /* ForStatement */: - case 188 /* WhileStatement */: - case 195 /* WithStatement */: - case 184 /* EmptyStatement */: - case 199 /* TryStatement */: - case 197 /* LabeledStatement */: - case 187 /* DoStatement */: - case 200 /* DebuggerStatement */: - case 212 /* ImportDeclaration */: - case 211 /* ImportEqualsDeclaration */: - case 218 /* ExportDeclaration */: - case 217 /* ExportAssignment */: - case 208 /* ModuleDeclaration */: - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 207 /* EnumDeclaration */: - case 206 /* TypeAliasDeclaration */: - return true; - } - } - return false; - } - function isReusableEnumMember(node) { - return node.kind === 229 /* EnumMember */; - } - function isReusableTypeMember(node) { - if (node) { - switch (node.kind) { - case 141 /* ConstructSignature */: - case 135 /* MethodSignature */: - case 142 /* IndexSignature */: - case 133 /* PropertySignature */: - case 140 /* CallSignature */: - return true; - } - } - return false; - } - function isReusableVariableDeclaration(node) { - if (node.kind !== 201 /* VariableDeclaration */) { - return false; - } - // Very subtle incremental parsing bug. Consider the following code: - // - // let v = new List < A, B - // - // This is actually legal code. It's a list of variable declarators "v = new List() - // - // then we have a problem. "v = new List= 0) { - // Always preserve a trailing comma by marking it on the NodeArray - result.hasTrailingComma = true; - } - result.end = getNodeEnd(); - parsingContext = saveParsingContext; - return result; - } - function createMissingList() { - var pos = getNodePos(); - var result = []; - result.pos = pos; - result.end = pos; - return result; - } - function parseBracketedList(kind, parseElement, open, close) { - if (parseExpected(open)) { - var result = parseDelimitedList(kind, parseElement); - parseExpected(close); - return result; - } - return createMissingList(); - } - // The allowReservedWords parameter controls whether reserved words are permitted after the first dot - function parseEntityName(allowReservedWords, diagnosticMessage) { - var entity = parseIdentifier(diagnosticMessage); - while (parseOptional(20 /* DotToken */)) { - var node = createNode(128 /* QualifiedName */, entity.pos); - node.left = entity; - node.right = parseRightSideOfDot(allowReservedWords); - entity = finishNode(node); - } - return entity; - } - function parseRightSideOfDot(allowIdentifierNames) { - // Technically a keyword is valid here as all identifiers and keywords are identifier names. - // However, often we'll encounter this in error situations when the identifier or keyword - // is actually starting another valid construct. - // - // So, we check for the following specific case: - // - // name. - // identifierOrKeyword identifierNameOrKeyword - // - // Note: the newlines are important here. For example, if that above code - // were rewritten into: - // - // name.identifierOrKeyword - // identifierNameOrKeyword - // - // Then we would consider it valid. That's because ASI would take effect and - // the code would be implicitly: "name.identifierOrKeyword; identifierNameOrKeyword". - // In the first case though, ASI will not take effect because there is not a - // line terminator after the identifier or keyword. - if (scanner.hasPrecedingLineBreak() && isIdentifierOrKeyword()) { - var matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); - if (matchesPattern) { - // Report that we need an identifier. However, report it right after the dot, - // and not on the next token. This is because the next token might actually - // be an identifier and the error would be quite confusing. - return createMissingNode(65 /* Identifier */, true, ts.Diagnostics.Identifier_expected); - } - } - return allowIdentifierNames ? parseIdentifierName() : parseIdentifier(); - } - function parseTemplateExpression() { - var template = createNode(174 /* TemplateExpression */); - template.head = parseLiteralNode(); - ts.Debug.assert(template.head.kind === 11 /* TemplateHead */, "Template head has wrong token kind"); - var templateSpans = []; - templateSpans.pos = getNodePos(); - do { - templateSpans.push(parseTemplateSpan()); - } while (ts.lastOrUndefined(templateSpans).literal.kind === 12 /* TemplateMiddle */); - templateSpans.end = getNodeEnd(); - template.templateSpans = templateSpans; - return finishNode(template); - } - function parseTemplateSpan() { - var span = createNode(180 /* TemplateSpan */); - span.expression = allowInAnd(parseExpression); - var literal; - if (token === 15 /* CloseBraceToken */) { - reScanTemplateToken(); - literal = parseLiteralNode(); - } - else { - literal = parseExpectedToken(13 /* TemplateTail */, false, ts.Diagnostics._0_expected, ts.tokenToString(15 /* CloseBraceToken */)); - } - span.literal = literal; - return finishNode(span); - } - function parseLiteralNode(internName) { - var node = createNode(token); - var text = scanner.getTokenValue(); - node.text = internName ? internIdentifier(text) : text; - if (scanner.hasExtendedUnicodeEscape()) { - node.hasExtendedUnicodeEscape = true; - } - if (scanner.isUnterminated()) { - node.isUnterminated = true; - } - var tokenPos = scanner.getTokenPos(); - nextToken(); - finishNode(node); - // Octal literals are not allowed in strict mode or ES5 - // Note that theoretically the following condition would hold true literals like 009, - // which is not octal.But because of how the scanner separates the tokens, we would - // never get a token like this. Instead, we would get 00 and 9 as two separate tokens. - // We also do not need to check for negatives because any prefix operator would be part of a - // parent unary expression. - if (node.kind === 7 /* NumericLiteral */ - && sourceText.charCodeAt(tokenPos) === 48 /* _0 */ - && ts.isOctalDigit(sourceText.charCodeAt(tokenPos + 1))) { - node.flags |= 16384 /* OctalLiteral */; - } - return node; - } - // TYPES - function parseTypeReferenceOrTypePredicate() { - var typeName = parseEntityName(false, ts.Diagnostics.Type_expected); - if (typeName.kind === 65 /* Identifier */ && token === 117 /* IsKeyword */ && !scanner.hasPrecedingLineBreak()) { - nextToken(); - var node_1 = createNode(143 /* TypePredicate */, typeName.pos); - node_1.parameterName = typeName; - node_1.type = parseType(); - return finishNode(node_1); - } - var node = createNode(144 /* TypeReference */, typeName.pos); - node.typeName = typeName; - if (!scanner.hasPrecedingLineBreak() && token === 24 /* LessThanToken */) { - node.typeArguments = parseBracketedList(16 /* TypeArguments */, parseType, 24 /* LessThanToken */, 25 /* GreaterThanToken */); - } - return finishNode(node); - } - function parseTypeQuery() { - var node = createNode(147 /* TypeQuery */); - parseExpected(97 /* TypeOfKeyword */); - node.exprName = parseEntityName(true); - return finishNode(node); - } - function parseTypeParameter() { - var node = createNode(130 /* TypeParameter */); - node.name = parseIdentifier(); - if (parseOptional(79 /* ExtendsKeyword */)) { - // It's not uncommon for people to write improper constraints to a generic. If the - // user writes a constraint that is an expression and not an actual type, then parse - // it out as an expression (so we can recover well), but report that a type is needed - // instead. - if (isStartOfType() || !isStartOfExpression()) { - node.constraint = parseType(); - } - else { - // It was not a type, and it looked like an expression. Parse out an expression - // here so we recover well. Note: it is important that we call parseUnaryExpression - // and not parseExpression here. If the user has: - // - // - // - // We do *not* want to consume the > as we're consuming the expression for "". - node.expression = parseUnaryExpressionOrHigher(); - } - } - return finishNode(node); - } - function parseTypeParameters() { - if (token === 24 /* LessThanToken */) { - return parseBracketedList(15 /* TypeParameters */, parseTypeParameter, 24 /* LessThanToken */, 25 /* GreaterThanToken */); - } - } - function parseParameterType() { - if (parseOptional(51 /* ColonToken */)) { - return token === 8 /* StringLiteral */ - ? parseLiteralNode(true) - : parseType(); - } - return undefined; - } - function isStartOfParameter() { - return token === 21 /* DotDotDotToken */ || isIdentifierOrPattern() || ts.isModifier(token) || token === 52 /* AtToken */; - } - function setModifiers(node, modifiers) { - if (modifiers) { - node.flags |= modifiers.flags; - node.modifiers = modifiers; - } - } - function parseParameter() { - var node = createNode(131 /* Parameter */); - node.decorators = parseDecorators(); - setModifiers(node, parseModifiers()); - node.dotDotDotToken = parseOptionalToken(21 /* DotDotDotToken */); - // SingleNameBinding[Yield,GeneratorParameter] : See 13.2.3 - // [+GeneratorParameter]BindingIdentifier[Yield]Initializer[In]opt - // [~GeneratorParameter]BindingIdentifier[?Yield]Initializer[In, ?Yield]opt - node.name = inGeneratorParameterContext() ? doInYieldContext(parseIdentifierOrPattern) : parseIdentifierOrPattern(); - if (ts.getFullWidth(node.name) === 0 && node.flags === 0 && ts.isModifier(token)) { - // in cases like - // 'use strict' - // function foo(static) - // isParameter('static') === true, because of isModifier('static') - // however 'static' is not a legal identifier in a strict mode. - // so result of this function will be ParameterDeclaration (flags = 0, name = missing, type = undefined, initializer = undefined) - // and current token will not change => parsing of the enclosing parameter list will last till the end of time (or OOM) - // to avoid this we'll advance cursor to the next token. - nextToken(); - } - node.questionToken = parseOptionalToken(50 /* QuestionToken */); - node.type = parseParameterType(); - node.initializer = inGeneratorParameterContext() ? doOutsideOfYieldContext(parseParameterInitializer) : parseParameterInitializer(); - // Do not check for initializers in an ambient context for parameters. This is not - // a grammar error because the grammar allows arbitrary call signatures in - // an ambient context. - // It is actually not necessary for this to be an error at all. The reason is that - // function/constructor implementations are syntactically disallowed in ambient - // contexts. In addition, parameter initializers are semantically disallowed in - // overload signatures. So parameter initializers are transitively disallowed in - // ambient contexts. - return finishNode(node); - } - function parseParameterInitializer() { - return parseInitializer(true); - } - function fillSignature(returnToken, yieldAndGeneratorParameterContext, requireCompleteParameterList, signature) { - var returnTokenRequired = returnToken === 32 /* EqualsGreaterThanToken */; - signature.typeParameters = parseTypeParameters(); - signature.parameters = parseParameterList(yieldAndGeneratorParameterContext, requireCompleteParameterList); - if (returnTokenRequired) { - parseExpected(returnToken); - signature.type = parseType(); - } - else if (parseOptional(returnToken)) { - signature.type = parseType(); - } - } - // Note: after careful analysis of the grammar, it does not appear to be possible to - // have 'Yield' And 'GeneratorParameter' not in sync. i.e. any production calling - // this FormalParameters production either always sets both to true, or always sets - // both to false. As such we only have a single parameter to represent both. - function parseParameterList(yieldAndGeneratorParameterContext, requireCompleteParameterList) { - // FormalParameters[Yield,GeneratorParameter] : - // ... - // - // FormalParameter[Yield,GeneratorParameter] : - // BindingElement[?Yield, ?GeneratorParameter] - // - // BindingElement[Yield, GeneratorParameter ] : See 13.2.3 - // SingleNameBinding[?Yield, ?GeneratorParameter] - // [+GeneratorParameter]BindingPattern[?Yield, GeneratorParameter]Initializer[In]opt - // [~GeneratorParameter]BindingPattern[?Yield]Initializer[In, ?Yield]opt - // - // SingleNameBinding[Yield, GeneratorParameter] : See 13.2.3 - // [+GeneratorParameter]BindingIdentifier[Yield]Initializer[In]opt - // [~GeneratorParameter]BindingIdentifier[?Yield]Initializer[In, ?Yield]opt - if (parseExpected(16 /* OpenParenToken */)) { - var savedYieldContext = inYieldContext(); - var savedGeneratorParameterContext = inGeneratorParameterContext(); - setYieldContext(yieldAndGeneratorParameterContext); - setGeneratorParameterContext(yieldAndGeneratorParameterContext); - var result = parseDelimitedList(14 /* Parameters */, parseParameter); - setYieldContext(savedYieldContext); - setGeneratorParameterContext(savedGeneratorParameterContext); - if (!parseExpected(17 /* CloseParenToken */) && requireCompleteParameterList) { - // Caller insisted that we had to end with a ) We didn't. So just return - // undefined here. - return undefined; - } - return result; - } - // We didn't even have an open paren. If the caller requires a complete parameter list, - // we definitely can't provide that. However, if they're ok with an incomplete one, - // then just return an empty set of parameters. - return requireCompleteParameterList ? undefined : createMissingList(); - } - function parseTypeMemberSemicolon() { - // We allow type members to be separated by commas or (possibly ASI) semicolons. - // First check if it was a comma. If so, we're done with the member. - if (parseOptional(23 /* CommaToken */)) { - return; - } - // Didn't have a comma. We must have a (possible ASI) semicolon. - parseSemicolon(); - } - function parseSignatureMember(kind) { - var node = createNode(kind); - if (kind === 141 /* ConstructSignature */) { - parseExpected(88 /* NewKeyword */); - } - fillSignature(51 /* ColonToken */, false, false, node); - parseTypeMemberSemicolon(); - return finishNode(node); - } - function isIndexSignature() { - if (token !== 18 /* OpenBracketToken */) { - return false; - } - return lookAhead(isUnambiguouslyIndexSignature); - } - function isUnambiguouslyIndexSignature() { - // The only allowed sequence is: - // - // [id: - // - // However, for error recovery, we also check the following cases: - // - // [... - // [id, - // [id?, - // [id?: - // [id?] - // [public id - // [private id - // [protected id - // [] - // - nextToken(); - if (token === 21 /* DotDotDotToken */ || token === 19 /* CloseBracketToken */) { - return true; - } - if (ts.isModifier(token)) { - nextToken(); - if (isIdentifier()) { - return true; - } - } - else if (!isIdentifier()) { - return false; - } - else { - // Skip the identifier - nextToken(); - } - // A colon signifies a well formed indexer - // A comma should be a badly formed indexer because comma expressions are not allowed - // in computed properties. - if (token === 51 /* ColonToken */ || token === 23 /* CommaToken */) { - return true; - } - // Question mark could be an indexer with an optional property, - // or it could be a conditional expression in a computed property. - if (token !== 50 /* QuestionToken */) { - return false; - } - // If any of the following tokens are after the question mark, it cannot - // be a conditional expression, so treat it as an indexer. - nextToken(); - return token === 51 /* ColonToken */ || token === 23 /* CommaToken */ || token === 19 /* CloseBracketToken */; - } - function parseIndexSignatureDeclaration(fullStart, decorators, modifiers) { - var node = createNode(142 /* IndexSignature */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - node.parameters = parseBracketedList(14 /* Parameters */, parseParameter, 18 /* OpenBracketToken */, 19 /* CloseBracketToken */); - node.type = parseTypeAnnotation(); - parseTypeMemberSemicolon(); - return finishNode(node); - } - function parsePropertyOrMethodSignature() { - var fullStart = scanner.getStartPos(); - var name = parsePropertyName(); - var questionToken = parseOptionalToken(50 /* QuestionToken */); - if (token === 16 /* OpenParenToken */ || token === 24 /* LessThanToken */) { - var method = createNode(135 /* MethodSignature */, fullStart); - method.name = name; - method.questionToken = questionToken; - // Method signatues don't exist in expression contexts. So they have neither - // [Yield] nor [GeneratorParameter] - fillSignature(51 /* ColonToken */, false, false, method); - parseTypeMemberSemicolon(); - return finishNode(method); - } - else { - var property = createNode(133 /* PropertySignature */, fullStart); - property.name = name; - property.questionToken = questionToken; - property.type = parseTypeAnnotation(); - parseTypeMemberSemicolon(); - return finishNode(property); - } - } - function isStartOfTypeMember() { - switch (token) { - case 16 /* OpenParenToken */: - case 24 /* LessThanToken */: - case 18 /* OpenBracketToken */: - return true; - default: - if (ts.isModifier(token)) { - var result = lookAhead(isStartOfIndexSignatureDeclaration); - if (result) { - return result; - } - } - return isLiteralPropertyName() && lookAhead(isTypeMemberWithLiteralPropertyName); - } - } - function isStartOfIndexSignatureDeclaration() { - while (ts.isModifier(token)) { - nextToken(); - } - return isIndexSignature(); - } - function isTypeMemberWithLiteralPropertyName() { - nextToken(); - return token === 16 /* OpenParenToken */ || - token === 24 /* LessThanToken */ || - token === 50 /* QuestionToken */ || - token === 51 /* ColonToken */ || - canParseSemicolon(); - } - function parseTypeMember() { - switch (token) { - case 16 /* OpenParenToken */: - case 24 /* LessThanToken */: - return parseSignatureMember(140 /* CallSignature */); - case 18 /* OpenBracketToken */: - // Indexer or computed property - return isIndexSignature() - ? parseIndexSignatureDeclaration(scanner.getStartPos(), undefined, undefined) - : parsePropertyOrMethodSignature(); - case 88 /* NewKeyword */: - if (lookAhead(isStartOfConstructSignature)) { - return parseSignatureMember(141 /* ConstructSignature */); - } - // fall through. - case 8 /* StringLiteral */: - case 7 /* NumericLiteral */: - return parsePropertyOrMethodSignature(); - default: - // Index declaration as allowed as a type member. But as per the grammar, - // they also allow modifiers. So we have to check for an index declaration - // that might be following modifiers. This ensures that things work properly - // when incrementally parsing as the parser will produce the Index declaration - // if it has the same text regardless of whether it is inside a class or an - // object type. - if (ts.isModifier(token)) { - var result = tryParse(parseIndexSignatureWithModifiers); - if (result) { - return result; - } - } - if (isIdentifierOrKeyword()) { - return parsePropertyOrMethodSignature(); - } - } - } - function parseIndexSignatureWithModifiers() { - var fullStart = scanner.getStartPos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - return isIndexSignature() - ? parseIndexSignatureDeclaration(fullStart, decorators, modifiers) - : undefined; - } - function isStartOfConstructSignature() { - nextToken(); - return token === 16 /* OpenParenToken */ || token === 24 /* LessThanToken */; - } - function parseTypeLiteral() { - var node = createNode(148 /* TypeLiteral */); - node.members = parseObjectTypeMembers(); - return finishNode(node); - } - function parseObjectTypeMembers() { - var members; - if (parseExpected(14 /* OpenBraceToken */)) { - members = parseList(4 /* TypeMembers */, false, parseTypeMember); - parseExpected(15 /* CloseBraceToken */); - } - else { - members = createMissingList(); - } - return members; - } - function parseTupleType() { - var node = createNode(150 /* TupleType */); - node.elementTypes = parseBracketedList(17 /* TupleElementTypes */, parseType, 18 /* OpenBracketToken */, 19 /* CloseBracketToken */); - return finishNode(node); - } - function parseParenthesizedType() { - var node = createNode(152 /* ParenthesizedType */); - parseExpected(16 /* OpenParenToken */); - node.type = parseType(); - parseExpected(17 /* CloseParenToken */); - return finishNode(node); - } - function parseFunctionOrConstructorType(kind) { - var node = createNode(kind); - if (kind === 146 /* ConstructorType */) { - parseExpected(88 /* NewKeyword */); - } - fillSignature(32 /* EqualsGreaterThanToken */, false, false, node); - return finishNode(node); - } - function parseKeywordAndNoDot() { - var node = parseTokenNode(); - return token === 20 /* DotToken */ ? undefined : node; - } - function parseNonArrayType() { - switch (token) { - case 112 /* AnyKeyword */: - case 123 /* StringKeyword */: - case 121 /* NumberKeyword */: - case 113 /* BooleanKeyword */: - case 124 /* SymbolKeyword */: - // If these are followed by a dot, then parse these out as a dotted type reference instead. - var node = tryParse(parseKeywordAndNoDot); - return node || parseTypeReferenceOrTypePredicate(); - case 99 /* VoidKeyword */: - return parseTokenNode(); - case 97 /* TypeOfKeyword */: - return parseTypeQuery(); - case 14 /* OpenBraceToken */: - return parseTypeLiteral(); - case 18 /* OpenBracketToken */: - return parseTupleType(); - case 16 /* OpenParenToken */: - return parseParenthesizedType(); - default: - return parseTypeReferenceOrTypePredicate(); - } - } - function isStartOfType() { - switch (token) { - case 112 /* AnyKeyword */: - case 123 /* StringKeyword */: - case 121 /* NumberKeyword */: - case 113 /* BooleanKeyword */: - case 124 /* SymbolKeyword */: - case 99 /* VoidKeyword */: - case 97 /* TypeOfKeyword */: - case 14 /* OpenBraceToken */: - case 18 /* OpenBracketToken */: - case 24 /* LessThanToken */: - case 88 /* NewKeyword */: - return true; - case 16 /* OpenParenToken */: - // Only consider '(' the start of a type if followed by ')', '...', an identifier, a modifier, - // or something that starts a type. We don't want to consider things like '(1)' a type. - return lookAhead(isStartOfParenthesizedOrFunctionType); - default: - return isIdentifier(); - } - } - function isStartOfParenthesizedOrFunctionType() { - nextToken(); - return token === 17 /* CloseParenToken */ || isStartOfParameter() || isStartOfType(); - } - function parseArrayTypeOrHigher() { - var type = parseNonArrayType(); - while (!scanner.hasPrecedingLineBreak() && parseOptional(18 /* OpenBracketToken */)) { - parseExpected(19 /* CloseBracketToken */); - var node = createNode(149 /* ArrayType */, type.pos); - node.elementType = type; - type = finishNode(node); - } - return type; - } - function parseUnionTypeOrHigher() { - var type = parseArrayTypeOrHigher(); - if (token === 44 /* BarToken */) { - var types = [type]; - types.pos = type.pos; - while (parseOptional(44 /* BarToken */)) { - types.push(parseArrayTypeOrHigher()); - } - types.end = getNodeEnd(); - var node = createNode(151 /* UnionType */, type.pos); - node.types = types; - type = finishNode(node); - } - return type; - } - function isStartOfFunctionType() { - if (token === 24 /* LessThanToken */) { - return true; - } - return token === 16 /* OpenParenToken */ && lookAhead(isUnambiguouslyStartOfFunctionType); - } - function isUnambiguouslyStartOfFunctionType() { - nextToken(); - if (token === 17 /* CloseParenToken */ || token === 21 /* DotDotDotToken */) { - // ( ) - // ( ... - return true; - } - if (isIdentifier() || ts.isModifier(token)) { - nextToken(); - if (token === 51 /* ColonToken */ || token === 23 /* CommaToken */ || - token === 50 /* QuestionToken */ || token === 53 /* EqualsToken */ || - isIdentifier() || ts.isModifier(token)) { - // ( id : - // ( id , - // ( id ? - // ( id = - // ( modifier id - return true; - } - if (token === 17 /* CloseParenToken */) { - nextToken(); - if (token === 32 /* EqualsGreaterThanToken */) { - // ( id ) => - return true; - } - } - } - return false; - } - function parseType() { - // The rules about 'yield' only apply to actual code/expression contexts. They don't - // apply to 'type' contexts. So we disable these parameters here before moving on. - var savedYieldContext = inYieldContext(); - var savedGeneratorParameterContext = inGeneratorParameterContext(); - setYieldContext(false); - setGeneratorParameterContext(false); - var result = parseTypeWorker(); - setYieldContext(savedYieldContext); - setGeneratorParameterContext(savedGeneratorParameterContext); - return result; - } - function parseTypeWorker() { - if (isStartOfFunctionType()) { - return parseFunctionOrConstructorType(145 /* FunctionType */); - } - if (token === 88 /* NewKeyword */) { - return parseFunctionOrConstructorType(146 /* ConstructorType */); - } - return parseUnionTypeOrHigher(); - } - function parseTypeAnnotation() { - return parseOptional(51 /* ColonToken */) ? parseType() : undefined; - } - // EXPRESSIONS - function isStartOfLeftHandSideExpression() { - switch (token) { - case 93 /* ThisKeyword */: - case 91 /* SuperKeyword */: - case 89 /* NullKeyword */: - case 95 /* TrueKeyword */: - case 80 /* FalseKeyword */: - case 7 /* NumericLiteral */: - case 8 /* StringLiteral */: - case 10 /* NoSubstitutionTemplateLiteral */: - case 11 /* TemplateHead */: - case 16 /* OpenParenToken */: - case 18 /* OpenBracketToken */: - case 14 /* OpenBraceToken */: - case 83 /* FunctionKeyword */: - case 69 /* ClassKeyword */: - case 88 /* NewKeyword */: - case 36 /* SlashToken */: - case 57 /* SlashEqualsToken */: - case 65 /* Identifier */: - return true; - default: - return isIdentifier(); - } - } - function isStartOfExpression() { - if (isStartOfLeftHandSideExpression()) { - return true; - } - switch (token) { - case 33 /* PlusToken */: - case 34 /* MinusToken */: - case 47 /* TildeToken */: - case 46 /* ExclamationToken */: - case 74 /* DeleteKeyword */: - case 97 /* TypeOfKeyword */: - case 99 /* VoidKeyword */: - case 38 /* PlusPlusToken */: - case 39 /* MinusMinusToken */: - case 24 /* LessThanToken */: - case 110 /* YieldKeyword */: - // Yield always starts an expression. Either it is an identifier (in which case - // it is definitely an expression). Or it's a keyword (either because we're in - // a generator, or in strict mode (or both)) and it started a yield expression. - return true; - default: - // Error tolerance. If we see the start of some binary operator, we consider - // that the start of an expression. That way we'll parse out a missing identifier, - // give a good message about an identifier being missing, and then consume the - // rest of the binary expression. - if (isBinaryOperator()) { - return true; - } - return isIdentifier(); - } - } - function isStartOfExpressionStatement() { - // As per the grammar, none of '{' or 'function' or 'class' can start an expression statement. - return token !== 14 /* OpenBraceToken */ && - token !== 83 /* FunctionKeyword */ && - token !== 69 /* ClassKeyword */ && - token !== 52 /* AtToken */ && - isStartOfExpression(); - } - function parseExpression() { - // Expression[in]: - // AssignmentExpression[in] - // Expression[in] , AssignmentExpression[in] - // clear the decorator context when parsing Expression, as it should be unambiguous when parsing a decorator - var saveDecoratorContext = inDecoratorContext(); - if (saveDecoratorContext) { - setDecoratorContext(false); - } - var expr = parseAssignmentExpressionOrHigher(); - var operatorToken; - while ((operatorToken = parseOptionalToken(23 /* CommaToken */))) { - expr = makeBinaryExpression(expr, operatorToken, parseAssignmentExpressionOrHigher()); - } - if (saveDecoratorContext) { - setDecoratorContext(true); - } - return expr; - } - function parseInitializer(inParameter) { - if (token !== 53 /* EqualsToken */) { - // It's not uncommon during typing for the user to miss writing the '=' token. Check if - // there is no newline after the last token and if we're on an expression. If so, parse - // this as an equals-value clause with a missing equals. - // NOTE: There are two places where we allow equals-value clauses. The first is in a - // variable declarator. The second is with a parameter. For variable declarators - // it's more likely that a { would be a allowed (as an object literal). While this - // is also allowed for parameters, the risk is that we consume the { as an object - // literal when it really will be for the block following the parameter. - if (scanner.hasPrecedingLineBreak() || (inParameter && token === 14 /* OpenBraceToken */) || !isStartOfExpression()) { - // preceding line break, open brace in a parameter (likely a function body) or current token is not an expression - - // do not try to parse initializer - return undefined; - } - } - // Initializer[In, Yield] : - // = AssignmentExpression[?In, ?Yield] - parseExpected(53 /* EqualsToken */); - return parseAssignmentExpressionOrHigher(); - } - function parseAssignmentExpressionOrHigher() { - // AssignmentExpression[in,yield]: - // 1) ConditionalExpression[?in,?yield] - // 2) LeftHandSideExpression = AssignmentExpression[?in,?yield] - // 3) LeftHandSideExpression AssignmentOperator AssignmentExpression[?in,?yield] - // 4) ArrowFunctionExpression[?in,?yield] - // 5) [+Yield] YieldExpression[?In] - // - // Note: for ease of implementation we treat productions '2' and '3' as the same thing. - // (i.e. they're both BinaryExpressions with an assignment operator in it). - // First, do the simple check if we have a YieldExpression (production '5'). - if (isYieldExpression()) { - return parseYieldExpression(); - } - // Then, check if we have an arrow function (production '4') that starts with a parenthesized - // parameter list. If we do, we must *not* recurse for productions 1, 2 or 3. An ArrowFunction is - // not a LeftHandSideExpression, nor does it start a ConditionalExpression. So we are done - // with AssignmentExpression if we see one. - var arrowExpression = tryParseParenthesizedArrowFunctionExpression(); - if (arrowExpression) { - return arrowExpression; - } - // Now try to see if we're in production '1', '2' or '3'. A conditional expression can - // start with a LogicalOrExpression, while the assignment productions can only start with - // LeftHandSideExpressions. - // - // So, first, we try to just parse out a BinaryExpression. If we get something that is a - // LeftHandSide or higher, then we can try to parse out the assignment expression part. - // Otherwise, we try to parse out the conditional expression bit. We want to allow any - // binary expression here, so we pass in the 'lowest' precedence here so that it matches - // and consumes anything. - var expr = parseBinaryExpressionOrHigher(0); - // To avoid a look-ahead, we did not handle the case of an arrow function with a single un-parenthesized - // parameter ('x => ...') above. We handle it here by checking if the parsed expression was a single - // identifier and the current token is an arrow. - if (expr.kind === 65 /* Identifier */ && token === 32 /* EqualsGreaterThanToken */) { - return parseSimpleArrowFunctionExpression(expr); - } - // Now see if we might be in cases '2' or '3'. - // If the expression was a LHS expression, and we have an assignment operator, then - // we're in '2' or '3'. Consume the assignment and return. - // - // Note: we call reScanGreaterToken so that we get an appropriately merged token - // for cases like > > = becoming >>= - if (ts.isLeftHandSideExpression(expr) && ts.isAssignmentOperator(reScanGreaterToken())) { - return makeBinaryExpression(expr, parseTokenNode(), parseAssignmentExpressionOrHigher()); - } - // It wasn't an assignment or a lambda. This is a conditional expression: - return parseConditionalExpressionRest(expr); - } - function isYieldExpression() { - if (token === 110 /* YieldKeyword */) { - // If we have a 'yield' keyword, and htis is a context where yield expressions are - // allowed, then definitely parse out a yield expression. - if (inYieldContext()) { - return true; - } - if (inStrictModeContext()) { - // If we're in strict mode, then 'yield' is a keyword, could only ever start - // a yield expression. - return true; - } - // We're in a context where 'yield expr' is not allowed. However, if we can - // definitely tell that the user was trying to parse a 'yield expr' and not - // just a normal expr that start with a 'yield' identifier, then parse out - // a 'yield expr'. We can then report an error later that they are only - // allowed in generator expressions. - // - // for example, if we see 'yield(foo)', then we'll have to treat that as an - // invocation expression of something called 'yield'. However, if we have - // 'yield foo' then that is not legal as a normal expression, so we can - // definitely recognize this as a yield expression. - // - // for now we just check if the next token is an identifier. More heuristics - // can be added here later as necessary. We just need to make sure that we - // don't accidently consume something legal. - return lookAhead(nextTokenIsIdentifierOnSameLine); - } - return false; - } - function nextTokenIsIdentifierOnSameLine() { - nextToken(); - return !scanner.hasPrecedingLineBreak() && isIdentifier(); - } - function parseYieldExpression() { - var node = createNode(175 /* YieldExpression */); - // YieldExpression[In] : - // yield - // yield [no LineTerminator here] [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] - // yield [no LineTerminator here] * [Lexical goal InputElementRegExp]AssignmentExpression[?In, Yield] - nextToken(); - if (!scanner.hasPrecedingLineBreak() && - (token === 35 /* AsteriskToken */ || isStartOfExpression())) { - node.asteriskToken = parseOptionalToken(35 /* AsteriskToken */); - node.expression = parseAssignmentExpressionOrHigher(); - return finishNode(node); - } - else { - // if the next token is not on the same line as yield. or we don't have an '*' or - // the start of an expressin, then this is just a simple "yield" expression. - return finishNode(node); - } - } - function parseSimpleArrowFunctionExpression(identifier) { - ts.Debug.assert(token === 32 /* EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>"); - var node = createNode(166 /* ArrowFunction */, identifier.pos); - var parameter = createNode(131 /* Parameter */, identifier.pos); - parameter.name = identifier; - finishNode(parameter); - node.parameters = [parameter]; - node.parameters.pos = parameter.pos; - node.parameters.end = parameter.end; - node.equalsGreaterThanToken = parseExpectedToken(32 /* EqualsGreaterThanToken */, false, ts.Diagnostics._0_expected, "=>"); - node.body = parseArrowFunctionExpressionBody(); - return finishNode(node); - } - function tryParseParenthesizedArrowFunctionExpression() { - var triState = isParenthesizedArrowFunctionExpression(); - if (triState === 0 /* False */) { - // It's definitely not a parenthesized arrow function expression. - return undefined; - } - // If we definitely have an arrow function, then we can just parse one, not requiring a - // following => or { token. Otherwise, we *might* have an arrow function. Try to parse - // it out, but don't allow any ambiguity, and return 'undefined' if this could be an - // expression instead. - var arrowFunction = triState === 1 /* True */ - ? parseParenthesizedArrowFunctionExpressionHead(true) - : tryParse(parsePossibleParenthesizedArrowFunctionExpressionHead); - if (!arrowFunction) { - // Didn't appear to actually be a parenthesized arrow function. Just bail out. - return undefined; - } - // If we have an arrow, then try to parse the body. Even if not, try to parse if we - // have an opening brace, just in case we're in an error state. - var lastToken = token; - arrowFunction.equalsGreaterThanToken = parseExpectedToken(32 /* EqualsGreaterThanToken */, false, ts.Diagnostics._0_expected, "=>"); - arrowFunction.body = (lastToken === 32 /* EqualsGreaterThanToken */ || lastToken === 14 /* OpenBraceToken */) - ? parseArrowFunctionExpressionBody() - : parseIdentifier(); - return finishNode(arrowFunction); - } - // True -> We definitely expect a parenthesized arrow function here. - // False -> There *cannot* be a parenthesized arrow function here. - // Unknown -> There *might* be a parenthesized arrow function here. - // Speculatively look ahead to be sure, and rollback if not. - function isParenthesizedArrowFunctionExpression() { - if (token === 16 /* OpenParenToken */ || token === 24 /* LessThanToken */) { - return lookAhead(isParenthesizedArrowFunctionExpressionWorker); - } - if (token === 32 /* EqualsGreaterThanToken */) { - // ERROR RECOVERY TWEAK: - // If we see a standalone => try to parse it as an arrow function expression as that's - // likely what the user intended to write. - return 1 /* True */; - } - // Definitely not a parenthesized arrow function. - return 0 /* False */; - } - function isParenthesizedArrowFunctionExpressionWorker() { - var first = token; - var second = nextToken(); - if (first === 16 /* OpenParenToken */) { - if (second === 17 /* CloseParenToken */) { - // Simple cases: "() =>", "(): ", and "() {". - // This is an arrow function with no parameters. - // The last one is not actually an arrow function, - // but this is probably what the user intended. - var third = nextToken(); - switch (third) { - case 32 /* EqualsGreaterThanToken */: - case 51 /* ColonToken */: - case 14 /* OpenBraceToken */: - return 1 /* True */; - default: - return 0 /* False */; - } - } - // If encounter "([" or "({", this could be the start of a binding pattern. - // Examples: - // ([ x ]) => { } - // ({ x }) => { } - // ([ x ]) - // ({ x }) - if (second === 18 /* OpenBracketToken */ || second === 14 /* OpenBraceToken */) { - return 2 /* Unknown */; - } - // Simple case: "(..." - // This is an arrow function with a rest parameter. - if (second === 21 /* DotDotDotToken */) { - return 1 /* True */; - } - // If we had "(" followed by something that's not an identifier, - // then this definitely doesn't look like a lambda. - // Note: we could be a little more lenient and allow - // "(public" or "(private". These would not ever actually be allowed, - // but we could provide a good error message instead of bailing out. - if (!isIdentifier()) { - return 0 /* False */; - } - // If we have something like "(a:", then we must have a - // type-annotated parameter in an arrow function expression. - if (nextToken() === 51 /* ColonToken */) { - return 1 /* True */; - } - // This *could* be a parenthesized arrow function. - // Return Unknown to let the caller know. - return 2 /* Unknown */; - } - else { - ts.Debug.assert(first === 24 /* LessThanToken */); - // If we have "<" not followed by an identifier, - // then this definitely is not an arrow function. - if (!isIdentifier()) { - return 0 /* False */; - } - // This *could* be a parenthesized arrow function. - return 2 /* Unknown */; - } - } - function parsePossibleParenthesizedArrowFunctionExpressionHead() { - return parseParenthesizedArrowFunctionExpressionHead(false); - } - function parseParenthesizedArrowFunctionExpressionHead(allowAmbiguity) { - var node = createNode(166 /* ArrowFunction */); - // Arrow functions are never generators. - // - // If we're speculatively parsing a signature for a parenthesized arrow function, then - // we have to have a complete parameter list. Otherwise we might see something like - // a => (b => c) - // And think that "(b =>" was actually a parenthesized arrow function with a missing - // close paren. - fillSignature(51 /* ColonToken */, false, !allowAmbiguity, node); - // If we couldn't get parameters, we definitely could not parse out an arrow function. - if (!node.parameters) { - return undefined; - } - // Parsing a signature isn't enough. - // Parenthesized arrow signatures often look like other valid expressions. - // For instance: - // - "(x = 10)" is an assignment expression parsed as a signature with a default parameter value. - // - "(x,y)" is a comma expression parsed as a signature with two parameters. - // - "a ? (b): c" will have "(b):" parsed as a signature with a return type annotation. - // - // So we need just a bit of lookahead to ensure that it can only be a signature. - if (!allowAmbiguity && token !== 32 /* EqualsGreaterThanToken */ && token !== 14 /* OpenBraceToken */) { - // Returning undefined here will cause our caller to rewind to where we started from. - return undefined; - } - return node; - } - function parseArrowFunctionExpressionBody() { - if (token === 14 /* OpenBraceToken */) { - return parseFunctionBlock(false, false); - } - if (token !== 22 /* SemicolonToken */ && - token !== 83 /* FunctionKeyword */ && - token !== 69 /* ClassKeyword */ && - isStartOfStatement() && - !isStartOfExpressionStatement()) { - // Check if we got a plain statement (i.e. no expression-statements, no function/class expressions/declarations) - // - // Here we try to recover from a potential error situation in the case where the - // user meant to supply a block. For example, if the user wrote: - // - // a => - // let v = 0; - // } - // - // they may be missing an open brace. Check to see if that's the case so we can - // try to recover better. If we don't do this, then the next close curly we see may end - // up preemptively closing the containing construct. - // - // Note: even when 'ignoreMissingOpenBrace' is passed as true, parseBody will still error. - return parseFunctionBlock(false, true); - } - return parseAssignmentExpressionOrHigher(); - } - function parseConditionalExpressionRest(leftOperand) { - // Note: we are passed in an expression which was produced from parseBinaryExpressionOrHigher. - var questionToken = parseOptionalToken(50 /* QuestionToken */); - if (!questionToken) { - return leftOperand; - } - // Note: we explicitly 'allowIn' in the whenTrue part of the condition expression, and - // we do not that for the 'whenFalse' part. - var node = createNode(173 /* ConditionalExpression */, leftOperand.pos); - node.condition = leftOperand; - node.questionToken = questionToken; - node.whenTrue = doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher); - node.colonToken = parseExpectedToken(51 /* ColonToken */, false, ts.Diagnostics._0_expected, ts.tokenToString(51 /* ColonToken */)); - node.whenFalse = parseAssignmentExpressionOrHigher(); - return finishNode(node); - } - function parseBinaryExpressionOrHigher(precedence) { - var leftOperand = parseUnaryExpressionOrHigher(); - return parseBinaryExpressionRest(precedence, leftOperand); - } - function isInOrOfKeyword(t) { - return t === 86 /* InKeyword */ || t === 127 /* OfKeyword */; - } - function parseBinaryExpressionRest(precedence, leftOperand) { - while (true) { - // We either have a binary operator here, or we're finished. We call - // reScanGreaterToken so that we merge token sequences like > and = into >= - reScanGreaterToken(); - var newPrecedence = getBinaryOperatorPrecedence(); - // Check the precedence to see if we should "take" this operator - if (newPrecedence <= precedence) { - break; - } - if (token === 86 /* InKeyword */ && inDisallowInContext()) { - break; - } - leftOperand = makeBinaryExpression(leftOperand, parseTokenNode(), parseBinaryExpressionOrHigher(newPrecedence)); - } - return leftOperand; - } - function isBinaryOperator() { - if (inDisallowInContext() && token === 86 /* InKeyword */) { - return false; - } - return getBinaryOperatorPrecedence() > 0; - } - function getBinaryOperatorPrecedence() { - switch (token) { - case 49 /* BarBarToken */: - return 1; - case 48 /* AmpersandAmpersandToken */: - return 2; - case 44 /* BarToken */: - return 3; - case 45 /* CaretToken */: - return 4; - case 43 /* AmpersandToken */: - return 5; - case 28 /* EqualsEqualsToken */: - case 29 /* ExclamationEqualsToken */: - case 30 /* EqualsEqualsEqualsToken */: - case 31 /* ExclamationEqualsEqualsToken */: - return 6; - case 24 /* LessThanToken */: - case 25 /* GreaterThanToken */: - case 26 /* LessThanEqualsToken */: - case 27 /* GreaterThanEqualsToken */: - case 87 /* InstanceOfKeyword */: - case 86 /* InKeyword */: - return 7; - case 40 /* LessThanLessThanToken */: - case 41 /* GreaterThanGreaterThanToken */: - case 42 /* GreaterThanGreaterThanGreaterThanToken */: - return 8; - case 33 /* PlusToken */: - case 34 /* MinusToken */: - return 9; - case 35 /* AsteriskToken */: - case 36 /* SlashToken */: - case 37 /* PercentToken */: - return 10; - } - // -1 is lower than all other precedences. Returning it will cause binary expression - // parsing to stop. - return -1; - } - function makeBinaryExpression(left, operatorToken, right) { - var node = createNode(172 /* BinaryExpression */, left.pos); - node.left = left; - node.operatorToken = operatorToken; - node.right = right; - return finishNode(node); - } - function parsePrefixUnaryExpression() { - var node = createNode(170 /* PrefixUnaryExpression */); - node.operator = token; - nextToken(); - node.operand = parseUnaryExpressionOrHigher(); - return finishNode(node); - } - function parseDeleteExpression() { - var node = createNode(167 /* DeleteExpression */); - nextToken(); - node.expression = parseUnaryExpressionOrHigher(); - return finishNode(node); - } - function parseTypeOfExpression() { - var node = createNode(168 /* TypeOfExpression */); - nextToken(); - node.expression = parseUnaryExpressionOrHigher(); - return finishNode(node); - } - function parseVoidExpression() { - var node = createNode(169 /* VoidExpression */); - nextToken(); - node.expression = parseUnaryExpressionOrHigher(); - return finishNode(node); - } - function parseUnaryExpressionOrHigher() { - switch (token) { - case 33 /* PlusToken */: - case 34 /* MinusToken */: - case 47 /* TildeToken */: - case 46 /* ExclamationToken */: - case 38 /* PlusPlusToken */: - case 39 /* MinusMinusToken */: - return parsePrefixUnaryExpression(); - case 74 /* DeleteKeyword */: - return parseDeleteExpression(); - case 97 /* TypeOfKeyword */: - return parseTypeOfExpression(); - case 99 /* VoidKeyword */: - return parseVoidExpression(); - case 24 /* LessThanToken */: - return parseTypeAssertion(); - default: - return parsePostfixExpressionOrHigher(); - } - } - function parsePostfixExpressionOrHigher() { - var expression = parseLeftHandSideExpressionOrHigher(); - ts.Debug.assert(ts.isLeftHandSideExpression(expression)); - if ((token === 38 /* PlusPlusToken */ || token === 39 /* MinusMinusToken */) && !scanner.hasPrecedingLineBreak()) { - var node = createNode(171 /* PostfixUnaryExpression */, expression.pos); - node.operand = expression; - node.operator = token; - nextToken(); - return finishNode(node); - } - return expression; - } - function parseLeftHandSideExpressionOrHigher() { - // Original Ecma: - // LeftHandSideExpression: See 11.2 - // NewExpression - // CallExpression - // - // Our simplification: - // - // LeftHandSideExpression: See 11.2 - // MemberExpression - // CallExpression - // - // See comment in parseMemberExpressionOrHigher on how we replaced NewExpression with - // MemberExpression to make our lives easier. - // - // to best understand the below code, it's important to see how CallExpression expands - // out into its own productions: - // - // CallExpression: - // MemberExpression Arguments - // CallExpression Arguments - // CallExpression[Expression] - // CallExpression.IdentifierName - // super ( ArgumentListopt ) - // super.IdentifierName - // - // Because of the recursion in these calls, we need to bottom out first. There are two - // bottom out states we can run into. Either we see 'super' which must start either of - // the last two CallExpression productions. Or we have a MemberExpression which either - // completes the LeftHandSideExpression, or starts the beginning of the first four - // CallExpression productions. - var expression = token === 91 /* SuperKeyword */ - ? parseSuperExpression() - : parseMemberExpressionOrHigher(); - // Now, we *may* be complete. However, we might have consumed the start of a - // CallExpression. As such, we need to consume the rest of it here to be complete. - return parseCallExpressionRest(expression); - } - function parseMemberExpressionOrHigher() { - // Note: to make our lives simpler, we decompose the the NewExpression productions and - // place ObjectCreationExpression and FunctionExpression into PrimaryExpression. - // like so: - // - // PrimaryExpression : See 11.1 - // this - // Identifier - // Literal - // ArrayLiteral - // ObjectLiteral - // (Expression) - // FunctionExpression - // new MemberExpression Arguments? - // - // MemberExpression : See 11.2 - // PrimaryExpression - // MemberExpression[Expression] - // MemberExpression.IdentifierName - // - // CallExpression : See 11.2 - // MemberExpression - // CallExpression Arguments - // CallExpression[Expression] - // CallExpression.IdentifierName - // - // Technically this is ambiguous. i.e. CallExpression defines: - // - // CallExpression: - // CallExpression Arguments - // - // If you see: "new Foo()" - // - // Then that could be treated as a single ObjectCreationExpression, or it could be - // treated as the invocation of "new Foo". We disambiguate that in code (to match - // the original grammar) by making sure that if we see an ObjectCreationExpression - // we always consume arguments if they are there. So we treat "new Foo()" as an - // object creation only, and not at all as an invocation) Another way to think - // about this is that for every "new" that we see, we will consume an argument list if - // it is there as part of the *associated* object creation node. Any additional - // argument lists we see, will become invocation expressions. - // - // Because there are no other places in the grammar now that refer to FunctionExpression - // or ObjectCreationExpression, it is safe to push down into the PrimaryExpression - // production. - // - // Because CallExpression and MemberExpression are left recursive, we need to bottom out - // of the recursion immediately. So we parse out a primary expression to start with. - var expression = parsePrimaryExpression(); - return parseMemberExpressionRest(expression); - } - function parseSuperExpression() { - var expression = parseTokenNode(); - if (token === 16 /* OpenParenToken */ || token === 20 /* DotToken */) { - return expression; - } - // If we have seen "super" it must be followed by '(' or '.'. - // If it wasn't then just try to parse out a '.' and report an error. - var node = createNode(158 /* PropertyAccessExpression */, expression.pos); - node.expression = expression; - node.dotToken = parseExpectedToken(20 /* DotToken */, false, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access); - node.name = parseRightSideOfDot(true); - return finishNode(node); - } - function parseTypeAssertion() { - var node = createNode(163 /* TypeAssertionExpression */); - parseExpected(24 /* LessThanToken */); - node.type = parseType(); - parseExpected(25 /* GreaterThanToken */); - node.expression = parseUnaryExpressionOrHigher(); - return finishNode(node); - } - function parseMemberExpressionRest(expression) { - while (true) { - var dotToken = parseOptionalToken(20 /* DotToken */); - if (dotToken) { - var propertyAccess = createNode(158 /* PropertyAccessExpression */, expression.pos); - propertyAccess.expression = expression; - propertyAccess.dotToken = dotToken; - propertyAccess.name = parseRightSideOfDot(true); - expression = finishNode(propertyAccess); - continue; - } - // when in the [Decorator] context, we do not parse ElementAccess as it could be part of a ComputedPropertyName - if (!inDecoratorContext() && parseOptional(18 /* OpenBracketToken */)) { - var indexedAccess = createNode(159 /* ElementAccessExpression */, expression.pos); - indexedAccess.expression = expression; - // It's not uncommon for a user to write: "new Type[]". - // Check for that common pattern and report a better error message. - if (token !== 19 /* CloseBracketToken */) { - indexedAccess.argumentExpression = allowInAnd(parseExpression); - if (indexedAccess.argumentExpression.kind === 8 /* StringLiteral */ || indexedAccess.argumentExpression.kind === 7 /* NumericLiteral */) { - var literal = indexedAccess.argumentExpression; - literal.text = internIdentifier(literal.text); - } - } - parseExpected(19 /* CloseBracketToken */); - expression = finishNode(indexedAccess); - continue; - } - if (token === 10 /* NoSubstitutionTemplateLiteral */ || token === 11 /* TemplateHead */) { - var tagExpression = createNode(162 /* TaggedTemplateExpression */, expression.pos); - tagExpression.tag = expression; - tagExpression.template = token === 10 /* NoSubstitutionTemplateLiteral */ - ? parseLiteralNode() - : parseTemplateExpression(); - expression = finishNode(tagExpression); - continue; - } - return expression; - } - } - function parseCallExpressionRest(expression) { - while (true) { - expression = parseMemberExpressionRest(expression); - if (token === 24 /* LessThanToken */) { - // See if this is the start of a generic invocation. If so, consume it and - // keep checking for postfix expressions. Otherwise, it's just a '<' that's - // part of an arithmetic expression. Break out so we consume it higher in the - // stack. - var typeArguments = tryParse(parseTypeArgumentsInExpression); - if (!typeArguments) { - return expression; - } - var callExpr = createNode(160 /* CallExpression */, expression.pos); - callExpr.expression = expression; - callExpr.typeArguments = typeArguments; - callExpr.arguments = parseArgumentList(); - expression = finishNode(callExpr); - continue; - } - else if (token === 16 /* OpenParenToken */) { - var callExpr = createNode(160 /* CallExpression */, expression.pos); - callExpr.expression = expression; - callExpr.arguments = parseArgumentList(); - expression = finishNode(callExpr); - continue; - } - return expression; - } - } - function parseArgumentList() { - parseExpected(16 /* OpenParenToken */); - var result = parseDelimitedList(11 /* ArgumentExpressions */, parseArgumentExpression); - parseExpected(17 /* CloseParenToken */); - return result; - } - function parseTypeArgumentsInExpression() { - if (!parseOptional(24 /* LessThanToken */)) { - return undefined; - } - var typeArguments = parseDelimitedList(16 /* TypeArguments */, parseType); - if (!parseExpected(25 /* GreaterThanToken */)) { - // If it doesn't have the closing > then it's definitely not an type argument list. - return undefined; - } - // If we have a '<', then only parse this as a arugment list if the type arguments - // are complete and we have an open paren. if we don't, rewind and return nothing. - return typeArguments && canFollowTypeArgumentsInExpression() - ? typeArguments - : undefined; - } - function canFollowTypeArgumentsInExpression() { - switch (token) { - case 16 /* OpenParenToken */: // foo( - // this case are the only case where this token can legally follow a type argument - // list. So we definitely want to treat this as a type arg list. - case 20 /* DotToken */: // foo. - case 17 /* CloseParenToken */: // foo) - case 19 /* CloseBracketToken */: // foo] - case 51 /* ColonToken */: // foo: - case 22 /* SemicolonToken */: // foo; - case 50 /* QuestionToken */: // foo? - case 28 /* EqualsEqualsToken */: // foo == - case 30 /* EqualsEqualsEqualsToken */: // foo === - case 29 /* ExclamationEqualsToken */: // foo != - case 31 /* ExclamationEqualsEqualsToken */: // foo !== - case 48 /* AmpersandAmpersandToken */: // foo && - case 49 /* BarBarToken */: // foo || - case 45 /* CaretToken */: // foo ^ - case 43 /* AmpersandToken */: // foo & - case 44 /* BarToken */: // foo | - case 15 /* CloseBraceToken */: // foo } - case 1 /* EndOfFileToken */: - // these cases can't legally follow a type arg list. However, they're not legal - // expressions either. The user is probably in the middle of a generic type. So - // treat it as such. - return true; - case 23 /* CommaToken */: // foo, - case 14 /* OpenBraceToken */: // foo { - // We don't want to treat these as type arguments. Otherwise we'll parse this - // as an invocation expression. Instead, we want to parse out the expression - // in isolation from the type arguments. - default: - // Anything else treat as an expression. - return false; - } - } - function parsePrimaryExpression() { - switch (token) { - case 7 /* NumericLiteral */: - case 8 /* StringLiteral */: - case 10 /* NoSubstitutionTemplateLiteral */: - return parseLiteralNode(); - case 93 /* ThisKeyword */: - case 91 /* SuperKeyword */: - case 89 /* NullKeyword */: - case 95 /* TrueKeyword */: - case 80 /* FalseKeyword */: - return parseTokenNode(); - case 16 /* OpenParenToken */: - return parseParenthesizedExpression(); - case 18 /* OpenBracketToken */: - return parseArrayLiteralExpression(); - case 14 /* OpenBraceToken */: - return parseObjectLiteralExpression(); - case 69 /* ClassKeyword */: - return parseClassExpression(); - case 83 /* FunctionKeyword */: - return parseFunctionExpression(); - case 88 /* NewKeyword */: - return parseNewExpression(); - case 36 /* SlashToken */: - case 57 /* SlashEqualsToken */: - if (reScanSlashToken() === 9 /* RegularExpressionLiteral */) { - return parseLiteralNode(); - } - break; - case 11 /* TemplateHead */: - return parseTemplateExpression(); - } - return parseIdentifier(ts.Diagnostics.Expression_expected); - } - function parseParenthesizedExpression() { - var node = createNode(164 /* ParenthesizedExpression */); - parseExpected(16 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(17 /* CloseParenToken */); - return finishNode(node); - } - function parseSpreadElement() { - var node = createNode(176 /* SpreadElementExpression */); - parseExpected(21 /* DotDotDotToken */); - node.expression = parseAssignmentExpressionOrHigher(); - return finishNode(node); - } - function parseArgumentOrArrayLiteralElement() { - return token === 21 /* DotDotDotToken */ ? parseSpreadElement() : - token === 23 /* CommaToken */ ? createNode(178 /* OmittedExpression */) : - parseAssignmentExpressionOrHigher(); - } - function parseArgumentExpression() { - return doOutsideOfContext(disallowInAndDecoratorContext, parseArgumentOrArrayLiteralElement); - } - function parseArrayLiteralExpression() { - var node = createNode(156 /* ArrayLiteralExpression */); - parseExpected(18 /* OpenBracketToken */); - if (scanner.hasPrecedingLineBreak()) - node.flags |= 512 /* MultiLine */; - node.elements = parseDelimitedList(13 /* ArrayLiteralMembers */, parseArgumentOrArrayLiteralElement); - parseExpected(19 /* CloseBracketToken */); - return finishNode(node); - } - function tryParseAccessorDeclaration(fullStart, decorators, modifiers) { - if (parseContextualModifier(116 /* GetKeyword */)) { - return parseAccessorDeclaration(138 /* GetAccessor */, fullStart, decorators, modifiers); - } - else if (parseContextualModifier(122 /* SetKeyword */)) { - return parseAccessorDeclaration(139 /* SetAccessor */, fullStart, decorators, modifiers); - } - return undefined; - } - function parseObjectLiteralElement() { - var fullStart = scanner.getStartPos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers); - if (accessor) { - return accessor; - } - var asteriskToken = parseOptionalToken(35 /* AsteriskToken */); - var tokenIsIdentifier = isIdentifier(); - var nameToken = token; - var propertyName = parsePropertyName(); - // Disallowing of optional property assignments happens in the grammar checker. - var questionToken = parseOptionalToken(50 /* QuestionToken */); - if (asteriskToken || token === 16 /* OpenParenToken */ || token === 24 /* LessThanToken */) { - return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, propertyName, questionToken); - } - // Parse to check if it is short-hand property assignment or normal property assignment - if ((token === 23 /* CommaToken */ || token === 15 /* CloseBraceToken */) && tokenIsIdentifier) { - var shorthandDeclaration = createNode(228 /* ShorthandPropertyAssignment */, fullStart); - shorthandDeclaration.name = propertyName; - shorthandDeclaration.questionToken = questionToken; - return finishNode(shorthandDeclaration); - } - else { - var propertyAssignment = createNode(227 /* PropertyAssignment */, fullStart); - propertyAssignment.name = propertyName; - propertyAssignment.questionToken = questionToken; - parseExpected(51 /* ColonToken */); - propertyAssignment.initializer = allowInAnd(parseAssignmentExpressionOrHigher); - return finishNode(propertyAssignment); - } - } - function parseObjectLiteralExpression() { - var node = createNode(157 /* ObjectLiteralExpression */); - parseExpected(14 /* OpenBraceToken */); - if (scanner.hasPrecedingLineBreak()) { - node.flags |= 512 /* MultiLine */; - } - node.properties = parseDelimitedList(12 /* ObjectLiteralMembers */, parseObjectLiteralElement, true); - parseExpected(15 /* CloseBraceToken */); - return finishNode(node); - } - function parseFunctionExpression() { - // GeneratorExpression : - // function * BindingIdentifier[Yield]opt (FormalParameters[Yield, GeneratorParameter]) { GeneratorBody[Yield] } - // FunctionExpression: - // function BindingIdentifieropt(FormalParameters) { FunctionBody } - var saveDecoratorContext = inDecoratorContext(); - if (saveDecoratorContext) { - setDecoratorContext(false); - } - var node = createNode(165 /* FunctionExpression */); - parseExpected(83 /* FunctionKeyword */); - node.asteriskToken = parseOptionalToken(35 /* AsteriskToken */); - node.name = node.asteriskToken ? doInYieldContext(parseOptionalIdentifier) : parseOptionalIdentifier(); - fillSignature(51 /* ColonToken */, !!node.asteriskToken, false, node); - node.body = parseFunctionBlock(!!node.asteriskToken, false); - if (saveDecoratorContext) { - setDecoratorContext(true); - } - return finishNode(node); - } - function parseOptionalIdentifier() { - return isIdentifier() ? parseIdentifier() : undefined; - } - function parseNewExpression() { - var node = createNode(161 /* NewExpression */); - parseExpected(88 /* NewKeyword */); - node.expression = parseMemberExpressionOrHigher(); - node.typeArguments = tryParse(parseTypeArgumentsInExpression); - if (node.typeArguments || token === 16 /* OpenParenToken */) { - node.arguments = parseArgumentList(); - } - return finishNode(node); - } - // STATEMENTS - function parseBlock(ignoreMissingOpenBrace, checkForStrictMode, diagnosticMessage) { - var node = createNode(182 /* Block */); - if (parseExpected(14 /* OpenBraceToken */, diagnosticMessage) || ignoreMissingOpenBrace) { - node.statements = parseList(1 /* BlockStatements */, checkForStrictMode, parseStatement); - parseExpected(15 /* CloseBraceToken */); - } - else { - node.statements = createMissingList(); - } - return finishNode(node); - } - function parseFunctionBlock(allowYield, ignoreMissingOpenBrace, diagnosticMessage) { - var savedYieldContext = inYieldContext(); - setYieldContext(allowYield); - // We may be in a [Decorator] context when parsing a function expression or - // arrow function. The body of the function is not in [Decorator] context. - var saveDecoratorContext = inDecoratorContext(); - if (saveDecoratorContext) { - setDecoratorContext(false); - } - var block = parseBlock(ignoreMissingOpenBrace, true, diagnosticMessage); - if (saveDecoratorContext) { - setDecoratorContext(true); - } - setYieldContext(savedYieldContext); - return block; - } - function parseEmptyStatement() { - var node = createNode(184 /* EmptyStatement */); - parseExpected(22 /* SemicolonToken */); - return finishNode(node); - } - function parseIfStatement() { - var node = createNode(186 /* IfStatement */); - parseExpected(84 /* IfKeyword */); - parseExpected(16 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(17 /* CloseParenToken */); - node.thenStatement = parseStatement(); - node.elseStatement = parseOptional(76 /* ElseKeyword */) ? parseStatement() : undefined; - return finishNode(node); - } - function parseDoStatement() { - var node = createNode(187 /* DoStatement */); - parseExpected(75 /* DoKeyword */); - node.statement = parseStatement(); - parseExpected(100 /* WhileKeyword */); - parseExpected(16 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(17 /* CloseParenToken */); - // From: https://mail.mozilla.org/pipermail/es-discuss/2011-August/016188.html - // 157 min --- All allen at wirfs-brock.com CONF --- "do{;}while(false)false" prohibited in - // spec but allowed in consensus reality. Approved -- this is the de-facto standard whereby - // do;while(0)x will have a semicolon inserted before x. - parseOptional(22 /* SemicolonToken */); - return finishNode(node); - } - function parseWhileStatement() { - var node = createNode(188 /* WhileStatement */); - parseExpected(100 /* WhileKeyword */); - parseExpected(16 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(17 /* CloseParenToken */); - node.statement = parseStatement(); - return finishNode(node); - } - function parseForOrForInOrForOfStatement() { - var pos = getNodePos(); - parseExpected(82 /* ForKeyword */); - parseExpected(16 /* OpenParenToken */); - var initializer = undefined; - if (token !== 22 /* SemicolonToken */) { - if (token === 98 /* VarKeyword */ || token === 104 /* LetKeyword */ || token === 70 /* ConstKeyword */) { - initializer = parseVariableDeclarationList(true); - } - else { - initializer = disallowInAnd(parseExpression); - } - } - var forOrForInOrForOfStatement; - if (parseOptional(86 /* InKeyword */)) { - var forInStatement = createNode(190 /* ForInStatement */, pos); - forInStatement.initializer = initializer; - forInStatement.expression = allowInAnd(parseExpression); - parseExpected(17 /* CloseParenToken */); - forOrForInOrForOfStatement = forInStatement; - } - else if (parseOptional(127 /* OfKeyword */)) { - var forOfStatement = createNode(191 /* ForOfStatement */, pos); - forOfStatement.initializer = initializer; - forOfStatement.expression = allowInAnd(parseAssignmentExpressionOrHigher); - parseExpected(17 /* CloseParenToken */); - forOrForInOrForOfStatement = forOfStatement; - } - else { - var forStatement = createNode(189 /* ForStatement */, pos); - forStatement.initializer = initializer; - parseExpected(22 /* SemicolonToken */); - if (token !== 22 /* SemicolonToken */ && token !== 17 /* CloseParenToken */) { - forStatement.condition = allowInAnd(parseExpression); - } - parseExpected(22 /* SemicolonToken */); - if (token !== 17 /* CloseParenToken */) { - forStatement.incrementor = allowInAnd(parseExpression); - } - parseExpected(17 /* CloseParenToken */); - forOrForInOrForOfStatement = forStatement; - } - forOrForInOrForOfStatement.statement = parseStatement(); - return finishNode(forOrForInOrForOfStatement); - } - function parseBreakOrContinueStatement(kind) { - var node = createNode(kind); - parseExpected(kind === 193 /* BreakStatement */ ? 66 /* BreakKeyword */ : 71 /* ContinueKeyword */); - if (!canParseSemicolon()) { - node.label = parseIdentifier(); - } - parseSemicolon(); - return finishNode(node); - } - function parseReturnStatement() { - var node = createNode(194 /* ReturnStatement */); - parseExpected(90 /* ReturnKeyword */); - if (!canParseSemicolon()) { - node.expression = allowInAnd(parseExpression); - } - parseSemicolon(); - return finishNode(node); - } - function parseWithStatement() { - var node = createNode(195 /* WithStatement */); - parseExpected(101 /* WithKeyword */); - parseExpected(16 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(17 /* CloseParenToken */); - node.statement = parseStatement(); - return finishNode(node); - } - function parseCaseClause() { - var node = createNode(223 /* CaseClause */); - parseExpected(67 /* CaseKeyword */); - node.expression = allowInAnd(parseExpression); - parseExpected(51 /* ColonToken */); - node.statements = parseList(3 /* SwitchClauseStatements */, false, parseStatement); - return finishNode(node); - } - function parseDefaultClause() { - var node = createNode(224 /* DefaultClause */); - parseExpected(73 /* DefaultKeyword */); - parseExpected(51 /* ColonToken */); - node.statements = parseList(3 /* SwitchClauseStatements */, false, parseStatement); - return finishNode(node); - } - function parseCaseOrDefaultClause() { - return token === 67 /* CaseKeyword */ ? parseCaseClause() : parseDefaultClause(); - } - function parseSwitchStatement() { - var node = createNode(196 /* SwitchStatement */); - parseExpected(92 /* SwitchKeyword */); - parseExpected(16 /* OpenParenToken */); - node.expression = allowInAnd(parseExpression); - parseExpected(17 /* CloseParenToken */); - var caseBlock = createNode(210 /* CaseBlock */, scanner.getStartPos()); - parseExpected(14 /* OpenBraceToken */); - caseBlock.clauses = parseList(2 /* SwitchClauses */, false, parseCaseOrDefaultClause); - parseExpected(15 /* CloseBraceToken */); - node.caseBlock = finishNode(caseBlock); - return finishNode(node); - } - function parseThrowStatement() { - // ThrowStatement[Yield] : - // throw [no LineTerminator here]Expression[In, ?Yield]; - // Because of automatic semicolon insertion, we need to report error if this - // throw could be terminated with a semicolon. Note: we can't call 'parseExpression' - // directly as that might consume an expression on the following line. - // We just return 'undefined' in that case. The actual error will be reported in the - // grammar walker. - var node = createNode(198 /* ThrowStatement */); - parseExpected(94 /* ThrowKeyword */); - node.expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression); - parseSemicolon(); - return finishNode(node); - } - // TODO: Review for error recovery - function parseTryStatement() { - var node = createNode(199 /* TryStatement */); - parseExpected(96 /* TryKeyword */); - node.tryBlock = parseBlock(false, false); - node.catchClause = token === 68 /* CatchKeyword */ ? parseCatchClause() : undefined; - // If we don't have a catch clause, then we must have a finally clause. Try to parse - // one out no matter what. - if (!node.catchClause || token === 81 /* FinallyKeyword */) { - parseExpected(81 /* FinallyKeyword */); - node.finallyBlock = parseBlock(false, false); - } - return finishNode(node); - } - function parseCatchClause() { - var result = createNode(226 /* CatchClause */); - parseExpected(68 /* CatchKeyword */); - if (parseExpected(16 /* OpenParenToken */)) { - result.variableDeclaration = parseVariableDeclaration(); - } - parseExpected(17 /* CloseParenToken */); - result.block = parseBlock(false, false); - return finishNode(result); - } - function parseDebuggerStatement() { - var node = createNode(200 /* DebuggerStatement */); - parseExpected(72 /* DebuggerKeyword */); - parseSemicolon(); - return finishNode(node); - } - function parseExpressionOrLabeledStatement() { - // Avoiding having to do the lookahead for a labeled statement by just trying to parse - // out an expression, seeing if it is identifier and then seeing if it is followed by - // a colon. - var fullStart = scanner.getStartPos(); - var expression = allowInAnd(parseExpression); - if (expression.kind === 65 /* Identifier */ && parseOptional(51 /* ColonToken */)) { - var labeledStatement = createNode(197 /* LabeledStatement */, fullStart); - labeledStatement.label = expression; - labeledStatement.statement = parseStatement(); - return finishNode(labeledStatement); - } - else { - var expressionStatement = createNode(185 /* ExpressionStatement */, fullStart); - expressionStatement.expression = expression; - parseSemicolon(); - return finishNode(expressionStatement); - } - } - function isIdentifierOrKeyword() { - return token >= 65 /* Identifier */; - } - function nextTokenIsIdentifierOrKeywordOnSameLine() { - nextToken(); - return isIdentifierOrKeyword() && !scanner.hasPrecedingLineBreak(); - } - function isDeclaration() { - while (true) { - switch (token) { - case 98 /* VarKeyword */: - case 104 /* LetKeyword */: - case 70 /* ConstKeyword */: - case 83 /* FunctionKeyword */: - case 69 /* ClassKeyword */: - case 77 /* EnumKeyword */: - return true; - // 'declare', 'module', 'namespace', 'interface'* and 'type' are all legal JavaScript identifiers; - // however, an identifier cannot be followed by another identifier on the same line. This is what we - // count on to parse out the respective declarations. For instance, we exploit this to say that - // - // namespace n - // - // can be none other than the beginning of a namespace declaration, but need to respect that JavaScript sees - // - // namespace - // n - // - // as the identifier 'namespace' on one line followed by the identifier 'n' on another. - // We need to look one token ahead to see if it permissible to try parsing a declaration. - // - // *Note*: 'interface' is actually a strict mode reserved word. So while - // - // "use strict" - // interface - // I {} - // - // could be legal, it would add complexity for very little gain. - case 103 /* InterfaceKeyword */: - case 125 /* TypeKeyword */: - return nextTokenIsIdentifierOnSameLine(); - case 118 /* ModuleKeyword */: - case 119 /* NamespaceKeyword */: - return nextTokenIsIdentifierOrStringLiteralOnSameLine(); - case 115 /* DeclareKeyword */: - nextToken(); - // ASI takes effect for this modifier. - if (scanner.hasPrecedingLineBreak()) { - return false; - } - continue; - case 85 /* ImportKeyword */: - nextToken(); - return token === 8 /* StringLiteral */ || token === 35 /* AsteriskToken */ || - token === 14 /* OpenBraceToken */ || isIdentifierOrKeyword(); - case 78 /* ExportKeyword */: - nextToken(); - if (token === 53 /* EqualsToken */ || token === 35 /* AsteriskToken */ || - token === 14 /* OpenBraceToken */ || token === 73 /* DefaultKeyword */) { - return true; - } - continue; - case 108 /* PublicKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - case 109 /* StaticKeyword */: - nextToken(); - continue; - default: - return false; - } - } - } - function isStartOfDeclaration() { - return lookAhead(isDeclaration); - } - function isStartOfStatement() { - switch (token) { - case 52 /* AtToken */: - case 22 /* SemicolonToken */: - case 14 /* OpenBraceToken */: - case 98 /* VarKeyword */: - case 104 /* LetKeyword */: - case 83 /* FunctionKeyword */: - case 69 /* ClassKeyword */: - case 77 /* EnumKeyword */: - case 84 /* IfKeyword */: - case 75 /* DoKeyword */: - case 100 /* WhileKeyword */: - case 82 /* ForKeyword */: - case 71 /* ContinueKeyword */: - case 66 /* BreakKeyword */: - case 90 /* ReturnKeyword */: - case 101 /* WithKeyword */: - case 92 /* SwitchKeyword */: - case 94 /* ThrowKeyword */: - case 96 /* TryKeyword */: - case 72 /* DebuggerKeyword */: - // 'catch' and 'finally' do not actually indicate that the code is part of a statement, - // however, we say they are here so that we may gracefully parse them and error later. - case 68 /* CatchKeyword */: - case 81 /* FinallyKeyword */: - return true; - case 70 /* ConstKeyword */: - case 78 /* ExportKeyword */: - case 85 /* ImportKeyword */: - return isStartOfDeclaration(); - case 115 /* DeclareKeyword */: - case 103 /* InterfaceKeyword */: - case 118 /* ModuleKeyword */: - case 119 /* NamespaceKeyword */: - case 125 /* TypeKeyword */: - // When these don't start a declaration, they're an identifier in an expression statement - return true; - case 108 /* PublicKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - case 109 /* StaticKeyword */: - // When these don't start a declaration, they may be the start of a class member if an identifier - // immediately follows. Otherwise they're an identifier in an expression statement. - return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine); - default: - return isStartOfExpression(); - } - } - function nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine() { - nextToken(); - return !scanner.hasPrecedingLineBreak() && - (isIdentifier() || token === 14 /* OpenBraceToken */ || token === 18 /* OpenBracketToken */); - } - function isLetDeclaration() { - // It is let declaration if in strict mode or next token is identifier\open bracket\open curly on same line. - // otherwise it needs to be treated like identifier - return inStrictModeContext() || lookAhead(nextTokenIsIdentifierOrStartOfDestructuringOnTheSameLine); - } - function parseStatement() { - switch (token) { - case 22 /* SemicolonToken */: - return parseEmptyStatement(); - case 14 /* OpenBraceToken */: - return parseBlock(false, false); - case 98 /* VarKeyword */: - return parseVariableStatement(scanner.getStartPos(), undefined, undefined); - case 104 /* LetKeyword */: - if (isLetDeclaration()) { - return parseVariableStatement(scanner.getStartPos(), undefined, undefined); - } - break; - case 83 /* FunctionKeyword */: - return parseFunctionDeclaration(scanner.getStartPos(), undefined, undefined); - case 69 /* ClassKeyword */: - return parseClassDeclaration(scanner.getStartPos(), undefined, undefined); - case 84 /* IfKeyword */: - return parseIfStatement(); - case 75 /* DoKeyword */: - return parseDoStatement(); - case 100 /* WhileKeyword */: - return parseWhileStatement(); - case 82 /* ForKeyword */: - return parseForOrForInOrForOfStatement(); - case 71 /* ContinueKeyword */: - return parseBreakOrContinueStatement(192 /* ContinueStatement */); - case 66 /* BreakKeyword */: - return parseBreakOrContinueStatement(193 /* BreakStatement */); - case 90 /* ReturnKeyword */: - return parseReturnStatement(); - case 101 /* WithKeyword */: - return parseWithStatement(); - case 92 /* SwitchKeyword */: - return parseSwitchStatement(); - case 94 /* ThrowKeyword */: - return parseThrowStatement(); - case 96 /* TryKeyword */: - // Include 'catch' and 'finally' for error recovery. - case 68 /* CatchKeyword */: - case 81 /* FinallyKeyword */: - return parseTryStatement(); - case 72 /* DebuggerKeyword */: - return parseDebuggerStatement(); - case 52 /* AtToken */: - return parseDeclaration(); - case 103 /* InterfaceKeyword */: - case 125 /* TypeKeyword */: - case 118 /* ModuleKeyword */: - case 119 /* NamespaceKeyword */: - case 115 /* DeclareKeyword */: - case 70 /* ConstKeyword */: - case 77 /* EnumKeyword */: - case 78 /* ExportKeyword */: - case 85 /* ImportKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - case 108 /* PublicKeyword */: - case 109 /* StaticKeyword */: - if (isStartOfDeclaration()) { - return parseDeclaration(); - } - break; - } - return parseExpressionOrLabeledStatement(); - } - function parseDeclaration() { - var fullStart = getNodePos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - switch (token) { - case 98 /* VarKeyword */: - case 104 /* LetKeyword */: - case 70 /* ConstKeyword */: - return parseVariableStatement(fullStart, decorators, modifiers); - case 83 /* FunctionKeyword */: - return parseFunctionDeclaration(fullStart, decorators, modifiers); - case 69 /* ClassKeyword */: - return parseClassDeclaration(fullStart, decorators, modifiers); - case 103 /* InterfaceKeyword */: - return parseInterfaceDeclaration(fullStart, decorators, modifiers); - case 125 /* TypeKeyword */: - return parseTypeAliasDeclaration(fullStart, decorators, modifiers); - case 77 /* EnumKeyword */: - return parseEnumDeclaration(fullStart, decorators, modifiers); - case 118 /* ModuleKeyword */: - case 119 /* NamespaceKeyword */: - return parseModuleDeclaration(fullStart, decorators, modifiers); - case 85 /* ImportKeyword */: - return parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers); - case 78 /* ExportKeyword */: - nextToken(); - return token === 73 /* DefaultKeyword */ || token === 53 /* EqualsToken */ ? - parseExportAssignment(fullStart, decorators, modifiers) : - parseExportDeclaration(fullStart, decorators, modifiers); - default: - if (decorators) { - // We reached this point because we encountered decorators and/or modifiers and assumed a declaration - // would follow. For recovery and error reporting purposes, return an incomplete declaration. - var node = createMissingNode(221 /* MissingDeclaration */, true, ts.Diagnostics.Declaration_expected); - node.pos = fullStart; - node.decorators = decorators; - setModifiers(node, modifiers); - return finishNode(node); - } - } - } - function nextTokenIsIdentifierOrStringLiteralOnSameLine() { - nextToken(); - return !scanner.hasPrecedingLineBreak() && (isIdentifier() || token === 8 /* StringLiteral */); - } - function parseFunctionBlockOrSemicolon(isGenerator, diagnosticMessage) { - if (token !== 14 /* OpenBraceToken */ && canParseSemicolon()) { - parseSemicolon(); - return; - } - return parseFunctionBlock(isGenerator, false, diagnosticMessage); - } - // DECLARATIONS - function parseArrayBindingElement() { - if (token === 23 /* CommaToken */) { - return createNode(178 /* OmittedExpression */); - } - var node = createNode(155 /* BindingElement */); - node.dotDotDotToken = parseOptionalToken(21 /* DotDotDotToken */); - node.name = parseIdentifierOrPattern(); - node.initializer = parseInitializer(false); - return finishNode(node); - } - function parseObjectBindingElement() { - var node = createNode(155 /* BindingElement */); - // TODO(andersh): Handle computed properties - var tokenIsIdentifier = isIdentifier(); - var propertyName = parsePropertyName(); - if (tokenIsIdentifier && token !== 51 /* ColonToken */) { - node.name = propertyName; - } - else { - parseExpected(51 /* ColonToken */); - node.propertyName = propertyName; - node.name = parseIdentifierOrPattern(); - } - node.initializer = parseInitializer(false); - return finishNode(node); - } - function parseObjectBindingPattern() { - var node = createNode(153 /* ObjectBindingPattern */); - parseExpected(14 /* OpenBraceToken */); - node.elements = parseDelimitedList(9 /* ObjectBindingElements */, parseObjectBindingElement); - parseExpected(15 /* CloseBraceToken */); - return finishNode(node); - } - function parseArrayBindingPattern() { - var node = createNode(154 /* ArrayBindingPattern */); - parseExpected(18 /* OpenBracketToken */); - node.elements = parseDelimitedList(10 /* ArrayBindingElements */, parseArrayBindingElement); - parseExpected(19 /* CloseBracketToken */); - return finishNode(node); - } - function isIdentifierOrPattern() { - return token === 14 /* OpenBraceToken */ || token === 18 /* OpenBracketToken */ || isIdentifier(); - } - function parseIdentifierOrPattern() { - if (token === 18 /* OpenBracketToken */) { - return parseArrayBindingPattern(); - } - if (token === 14 /* OpenBraceToken */) { - return parseObjectBindingPattern(); - } - return parseIdentifier(); - } - function parseVariableDeclaration() { - var node = createNode(201 /* VariableDeclaration */); - node.name = parseIdentifierOrPattern(); - node.type = parseTypeAnnotation(); - if (!isInOrOfKeyword(token)) { - node.initializer = parseInitializer(false); - } - return finishNode(node); - } - function parseVariableDeclarationList(inForStatementInitializer) { - var node = createNode(202 /* VariableDeclarationList */); - switch (token) { - case 98 /* VarKeyword */: - break; - case 104 /* LetKeyword */: - node.flags |= 4096 /* Let */; - break; - case 70 /* ConstKeyword */: - node.flags |= 8192 /* Const */; - break; - default: - ts.Debug.fail(); - } - nextToken(); - // The user may have written the following: - // - // for (let of X) { } - // - // In this case, we want to parse an empty declaration list, and then parse 'of' - // as a keyword. The reason this is not automatic is that 'of' is a valid identifier. - // So we need to look ahead to determine if 'of' should be treated as a keyword in - // this context. - // The checker will then give an error that there is an empty declaration list. - if (token === 127 /* OfKeyword */ && lookAhead(canFollowContextualOfKeyword)) { - node.declarations = createMissingList(); - } - else { - var savedDisallowIn = inDisallowInContext(); - setDisallowInContext(inForStatementInitializer); - node.declarations = parseDelimitedList(8 /* VariableDeclarations */, parseVariableDeclaration); - setDisallowInContext(savedDisallowIn); - } - return finishNode(node); - } - function canFollowContextualOfKeyword() { - return nextTokenIsIdentifier() && nextToken() === 17 /* CloseParenToken */; - } - function parseVariableStatement(fullStart, decorators, modifiers) { - var node = createNode(183 /* VariableStatement */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - node.declarationList = parseVariableDeclarationList(false); - parseSemicolon(); - return finishNode(node); - } - function parseFunctionDeclaration(fullStart, decorators, modifiers) { - var node = createNode(203 /* FunctionDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(83 /* FunctionKeyword */); - node.asteriskToken = parseOptionalToken(35 /* AsteriskToken */); - node.name = node.flags & 256 /* Default */ ? parseOptionalIdentifier() : parseIdentifier(); - fillSignature(51 /* ColonToken */, !!node.asteriskToken, false, node); - node.body = parseFunctionBlockOrSemicolon(!!node.asteriskToken, ts.Diagnostics.or_expected); - return finishNode(node); - } - function parseConstructorDeclaration(pos, decorators, modifiers) { - var node = createNode(137 /* Constructor */, pos); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(114 /* ConstructorKeyword */); - fillSignature(51 /* ColonToken */, false, false, node); - node.body = parseFunctionBlockOrSemicolon(false, ts.Diagnostics.or_expected); - return finishNode(node); - } - function parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, diagnosticMessage) { - var method = createNode(136 /* MethodDeclaration */, fullStart); - method.decorators = decorators; - setModifiers(method, modifiers); - method.asteriskToken = asteriskToken; - method.name = name; - method.questionToken = questionToken; - fillSignature(51 /* ColonToken */, !!asteriskToken, false, method); - method.body = parseFunctionBlockOrSemicolon(!!asteriskToken, diagnosticMessage); - return finishNode(method); - } - function parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken) { - var property = createNode(134 /* PropertyDeclaration */, fullStart); - property.decorators = decorators; - setModifiers(property, modifiers); - property.name = name; - property.questionToken = questionToken; - property.type = parseTypeAnnotation(); - // For instance properties specifically, since they are evaluated inside the constructor, - // we do *not * want to parse yield expressions, so we specifically turn the yield context - // off. The grammar would look something like this: - // - // MemberVariableDeclaration[Yield]: - // AccessibilityModifier_opt PropertyName TypeAnnotation_opt Initialiser_opt[In]; - // AccessibilityModifier_opt static_opt PropertyName TypeAnnotation_opt Initialiser_opt[In, ?Yield]; - // - // The checker may still error in the static case to explicitly disallow the yield expression. - property.initializer = modifiers && modifiers.flags & 128 /* Static */ - ? allowInAnd(parseNonParameterInitializer) - : doOutsideOfContext(4 /* Yield */ | 2 /* DisallowIn */, parseNonParameterInitializer); - parseSemicolon(); - return finishNode(property); - } - function parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers) { - var asteriskToken = parseOptionalToken(35 /* AsteriskToken */); - var name = parsePropertyName(); - // Note: this is not legal as per the grammar. But we allow it in the parser and - // report an error in the grammar checker. - var questionToken = parseOptionalToken(50 /* QuestionToken */); - if (asteriskToken || token === 16 /* OpenParenToken */ || token === 24 /* LessThanToken */) { - return parseMethodDeclaration(fullStart, decorators, modifiers, asteriskToken, name, questionToken, ts.Diagnostics.or_expected); - } - else { - return parsePropertyDeclaration(fullStart, decorators, modifiers, name, questionToken); - } - } - function parseNonParameterInitializer() { - return parseInitializer(false); - } - function parseAccessorDeclaration(kind, fullStart, decorators, modifiers) { - var node = createNode(kind, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - node.name = parsePropertyName(); - fillSignature(51 /* ColonToken */, false, false, node); - node.body = parseFunctionBlockOrSemicolon(false); - return finishNode(node); - } - function isClassMemberModifier(idToken) { - switch (idToken) { - case 108 /* PublicKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - case 109 /* StaticKeyword */: - return true; - default: - return false; - } - } - function isClassMemberStart() { - var idToken; - if (token === 52 /* AtToken */) { - return true; - } - // Eat up all modifiers, but hold on to the last one in case it is actually an identifier. - while (ts.isModifier(token)) { - idToken = token; - // If the idToken is a class modifier (protected, private, public, and static), it is - // certain that we are starting to parse class member. This allows better error recovery - // Example: - // public foo() ... // true - // public @dec blah ... // true; we will then report an error later - // export public ... // true; we will then report an error later - if (isClassMemberModifier(idToken)) { - return true; - } - nextToken(); - } - if (token === 35 /* AsteriskToken */) { - return true; - } - // Try to get the first property-like token following all modifiers. - // This can either be an identifier or the 'get' or 'set' keywords. - if (isLiteralPropertyName()) { - idToken = token; - nextToken(); - } - // Index signatures and computed properties are class members; we can parse. - if (token === 18 /* OpenBracketToken */) { - return true; - } - // If we were able to get any potential identifier... - if (idToken !== undefined) { - // If we have a non-keyword identifier, or if we have an accessor, then it's safe to parse. - if (!ts.isKeyword(idToken) || idToken === 122 /* SetKeyword */ || idToken === 116 /* GetKeyword */) { - return true; - } - // If it *is* a keyword, but not an accessor, check a little farther along - // to see if it should actually be parsed as a class member. - switch (token) { - case 16 /* OpenParenToken */: // Method declaration - case 24 /* LessThanToken */: // Generic Method declaration - case 51 /* ColonToken */: // Type Annotation for declaration - case 53 /* EqualsToken */: // Initializer for declaration - case 50 /* QuestionToken */: - return true; - default: - // Covers - // - Semicolons (declaration termination) - // - Closing braces (end-of-class, must be declaration) - // - End-of-files (not valid, but permitted so that it gets caught later on) - // - Line-breaks (enabling *automatic semicolon insertion*) - return canParseSemicolon(); - } - } - return false; - } - function parseDecorators() { - var decorators; - while (true) { - var decoratorStart = getNodePos(); - if (!parseOptional(52 /* AtToken */)) { - break; - } - if (!decorators) { - decorators = []; - decorators.pos = scanner.getStartPos(); - } - var decorator = createNode(132 /* Decorator */, decoratorStart); - decorator.expression = doInDecoratorContext(parseLeftHandSideExpressionOrHigher); - decorators.push(finishNode(decorator)); - } - if (decorators) { - decorators.end = getNodeEnd(); - } - return decorators; - } - function parseModifiers() { - var flags = 0; - var modifiers; - while (true) { - var modifierStart = scanner.getStartPos(); - var modifierKind = token; - if (!parseAnyContextualModifier()) { - break; - } - if (!modifiers) { - modifiers = []; - modifiers.pos = modifierStart; - } - flags |= ts.modifierToFlag(modifierKind); - modifiers.push(finishNode(createNode(modifierKind, modifierStart))); - } - if (modifiers) { - modifiers.flags = flags; - modifiers.end = scanner.getStartPos(); - } - return modifiers; - } - function parseClassElement() { - if (token === 22 /* SemicolonToken */) { - var result = createNode(181 /* SemicolonClassElement */); - nextToken(); - return finishNode(result); - } - var fullStart = getNodePos(); - var decorators = parseDecorators(); - var modifiers = parseModifiers(); - var accessor = tryParseAccessorDeclaration(fullStart, decorators, modifiers); - if (accessor) { - return accessor; - } - if (token === 114 /* ConstructorKeyword */) { - return parseConstructorDeclaration(fullStart, decorators, modifiers); - } - if (isIndexSignature()) { - return parseIndexSignatureDeclaration(fullStart, decorators, modifiers); - } - // It is very important that we check this *after* checking indexers because - // the [ token can start an index signature or a computed property name - if (isIdentifierOrKeyword() || - token === 8 /* StringLiteral */ || - token === 7 /* NumericLiteral */ || - token === 35 /* AsteriskToken */ || - token === 18 /* OpenBracketToken */) { - return parsePropertyOrMethodDeclaration(fullStart, decorators, modifiers); - } - if (decorators) { - // treat this as a property declaration with a missing name. - var name_6 = createMissingNode(65 /* Identifier */, true, ts.Diagnostics.Declaration_expected); - return parsePropertyDeclaration(fullStart, decorators, modifiers, name_6, undefined); - } - // 'isClassMemberStart' should have hinted not to attempt parsing. - ts.Debug.fail("Should not have attempted to parse class member declaration."); - } - function parseClassExpression() { - return parseClassDeclarationOrExpression( - /*fullStart*/ scanner.getStartPos(), - /*decorators*/ undefined, - /*modifiers*/ undefined, 177 /* ClassExpression */); - } - function parseClassDeclaration(fullStart, decorators, modifiers) { - return parseClassDeclarationOrExpression(fullStart, decorators, modifiers, 204 /* ClassDeclaration */); - } - function parseClassDeclarationOrExpression(fullStart, decorators, modifiers, kind) { - // In ES6 specification, All parts of a ClassDeclaration or a ClassExpression are strict mode code - var savedStrictModeContext = inStrictModeContext(); - setStrictModeContext(true); - var node = createNode(kind, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(69 /* ClassKeyword */); - node.name = parseOptionalIdentifier(); - node.typeParameters = parseTypeParameters(); - node.heritageClauses = parseHeritageClauses(true); - if (parseExpected(14 /* OpenBraceToken */)) { - // ClassTail[Yield,GeneratorParameter] : See 14.5 - // [~GeneratorParameter]ClassHeritage[?Yield]opt { ClassBody[?Yield]opt } - // [+GeneratorParameter] ClassHeritageopt { ClassBodyopt } - node.members = inGeneratorParameterContext() - ? doOutsideOfYieldContext(parseClassMembers) - : parseClassMembers(); - parseExpected(15 /* CloseBraceToken */); - } - else { - node.members = createMissingList(); - } - var finishedNode = finishNode(node); - setStrictModeContext(savedStrictModeContext); - return finishedNode; - } - function parseHeritageClauses(isClassHeritageClause) { - // ClassTail[Yield,GeneratorParameter] : See 14.5 - // [~GeneratorParameter]ClassHeritage[?Yield]opt { ClassBody[?Yield]opt } - // [+GeneratorParameter] ClassHeritageopt { ClassBodyopt } - if (isHeritageClause()) { - return isClassHeritageClause && inGeneratorParameterContext() - ? doOutsideOfYieldContext(parseHeritageClausesWorker) - : parseHeritageClausesWorker(); - } - return undefined; - } - function parseHeritageClausesWorker() { - return parseList(18 /* HeritageClauses */, false, parseHeritageClause); - } - function parseHeritageClause() { - if (token === 79 /* ExtendsKeyword */ || token === 102 /* ImplementsKeyword */) { - var node = createNode(225 /* HeritageClause */); - node.token = token; - nextToken(); - node.types = parseDelimitedList(7 /* HeritageClauseElement */, parseExpressionWithTypeArguments); - return finishNode(node); - } - return undefined; - } - function parseExpressionWithTypeArguments() { - var node = createNode(179 /* ExpressionWithTypeArguments */); - node.expression = parseLeftHandSideExpressionOrHigher(); - if (token === 24 /* LessThanToken */) { - node.typeArguments = parseBracketedList(16 /* TypeArguments */, parseType, 24 /* LessThanToken */, 25 /* GreaterThanToken */); - } - return finishNode(node); - } - function isHeritageClause() { - return token === 79 /* ExtendsKeyword */ || token === 102 /* ImplementsKeyword */; - } - function parseClassMembers() { - return parseList(5 /* ClassMembers */, false, parseClassElement); - } - function parseInterfaceDeclaration(fullStart, decorators, modifiers) { - var node = createNode(205 /* InterfaceDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(103 /* InterfaceKeyword */); - node.name = parseIdentifier(); - node.typeParameters = parseTypeParameters(); - node.heritageClauses = parseHeritageClauses(false); - node.members = parseObjectTypeMembers(); - return finishNode(node); - } - function parseTypeAliasDeclaration(fullStart, decorators, modifiers) { - var node = createNode(206 /* TypeAliasDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(125 /* TypeKeyword */); - node.name = parseIdentifier(); - node.typeParameters = parseTypeParameters(); - parseExpected(53 /* EqualsToken */); - node.type = parseType(); - parseSemicolon(); - return finishNode(node); - } - // In an ambient declaration, the grammar only allows integer literals as initializers. - // In a non-ambient declaration, the grammar allows uninitialized members only in a - // ConstantEnumMemberSection, which starts at the beginning of an enum declaration - // or any time an integer literal initializer is encountered. - function parseEnumMember() { - var node = createNode(229 /* EnumMember */, scanner.getStartPos()); - node.name = parsePropertyName(); - node.initializer = allowInAnd(parseNonParameterInitializer); - return finishNode(node); - } - function parseEnumDeclaration(fullStart, decorators, modifiers) { - var node = createNode(207 /* EnumDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - parseExpected(77 /* EnumKeyword */); - node.name = parseIdentifier(); - if (parseExpected(14 /* OpenBraceToken */)) { - node.members = parseDelimitedList(6 /* EnumMembers */, parseEnumMember); - parseExpected(15 /* CloseBraceToken */); - } - else { - node.members = createMissingList(); - } - return finishNode(node); - } - function parseModuleBlock() { - var node = createNode(209 /* ModuleBlock */, scanner.getStartPos()); - if (parseExpected(14 /* OpenBraceToken */)) { - node.statements = parseList(1 /* BlockStatements */, false, parseStatement); - parseExpected(15 /* CloseBraceToken */); - } - else { - node.statements = createMissingList(); - } - return finishNode(node); - } - function parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags) { - var node = createNode(208 /* ModuleDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - node.flags |= flags; - node.name = parseIdentifier(); - node.body = parseOptional(20 /* DotToken */) - ? parseModuleOrNamespaceDeclaration(getNodePos(), undefined, undefined, 1 /* Export */) - : parseModuleBlock(); - return finishNode(node); - } - function parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers) { - var node = createNode(208 /* ModuleDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - node.name = parseLiteralNode(true); - node.body = parseModuleBlock(); - return finishNode(node); - } - function parseModuleDeclaration(fullStart, decorators, modifiers) { - var flags = modifiers ? modifiers.flags : 0; - if (parseOptional(119 /* NamespaceKeyword */)) { - flags |= 32768 /* Namespace */; - } - else { - parseExpected(118 /* ModuleKeyword */); - if (token === 8 /* StringLiteral */) { - return parseAmbientExternalModuleDeclaration(fullStart, decorators, modifiers); - } - } - return parseModuleOrNamespaceDeclaration(fullStart, decorators, modifiers, flags); - } - function isExternalModuleReference() { - return token === 120 /* RequireKeyword */ && - lookAhead(nextTokenIsOpenParen); - } - function nextTokenIsOpenParen() { - return nextToken() === 16 /* OpenParenToken */; - } - function nextTokenIsCommaOrFromKeyword() { - nextToken(); - return token === 23 /* CommaToken */ || - token === 126 /* FromKeyword */; - } - function parseImportDeclarationOrImportEqualsDeclaration(fullStart, decorators, modifiers) { - parseExpected(85 /* ImportKeyword */); - var afterImportPos = scanner.getStartPos(); - var identifier; - if (isIdentifier()) { - identifier = parseIdentifier(); - if (token !== 23 /* CommaToken */ && token !== 126 /* FromKeyword */) { - // ImportEquals declaration of type: - // import x = require("mod"); or - // import x = M.x; - var importEqualsDeclaration = createNode(211 /* ImportEqualsDeclaration */, fullStart); - importEqualsDeclaration.decorators = decorators; - setModifiers(importEqualsDeclaration, modifiers); - importEqualsDeclaration.name = identifier; - parseExpected(53 /* EqualsToken */); - importEqualsDeclaration.moduleReference = parseModuleReference(); - parseSemicolon(); - return finishNode(importEqualsDeclaration); - } - } - // Import statement - var importDeclaration = createNode(212 /* ImportDeclaration */, fullStart); - importDeclaration.decorators = decorators; - setModifiers(importDeclaration, modifiers); - // ImportDeclaration: - // import ImportClause from ModuleSpecifier ; - // import ModuleSpecifier; - if (identifier || - token === 35 /* AsteriskToken */ || - token === 14 /* OpenBraceToken */) { - importDeclaration.importClause = parseImportClause(identifier, afterImportPos); - parseExpected(126 /* FromKeyword */); - } - importDeclaration.moduleSpecifier = parseModuleSpecifier(); - parseSemicolon(); - return finishNode(importDeclaration); - } - function parseImportClause(identifier, fullStart) { - //ImportClause: - // ImportedDefaultBinding - // NameSpaceImport - // NamedImports - // ImportedDefaultBinding, NameSpaceImport - // ImportedDefaultBinding, NamedImports - var importClause = createNode(213 /* ImportClause */, fullStart); - if (identifier) { - // ImportedDefaultBinding: - // ImportedBinding - importClause.name = identifier; - } - // If there was no default import or if there is comma token after default import - // parse namespace or named imports - if (!importClause.name || - parseOptional(23 /* CommaToken */)) { - importClause.namedBindings = token === 35 /* AsteriskToken */ ? parseNamespaceImport() : parseNamedImportsOrExports(215 /* NamedImports */); - } - return finishNode(importClause); - } - function parseModuleReference() { - return isExternalModuleReference() - ? parseExternalModuleReference() - : parseEntityName(false); - } - function parseExternalModuleReference() { - var node = createNode(222 /* ExternalModuleReference */); - parseExpected(120 /* RequireKeyword */); - parseExpected(16 /* OpenParenToken */); - node.expression = parseModuleSpecifier(); - parseExpected(17 /* CloseParenToken */); - return finishNode(node); - } - function parseModuleSpecifier() { - // We allow arbitrary expressions here, even though the grammar only allows string - // literals. We check to ensure that it is only a string literal later in the grammar - // walker. - var result = parseExpression(); - // Ensure the string being required is in our 'identifier' table. This will ensure - // that features like 'find refs' will look inside this file when search for its name. - if (result.kind === 8 /* StringLiteral */) { - internIdentifier(result.text); - } - return result; - } - function parseNamespaceImport() { - // NameSpaceImport: - // * as ImportedBinding - var namespaceImport = createNode(214 /* NamespaceImport */); - parseExpected(35 /* AsteriskToken */); - parseExpected(111 /* AsKeyword */); - namespaceImport.name = parseIdentifier(); - return finishNode(namespaceImport); - } - function parseNamedImportsOrExports(kind) { - var node = createNode(kind); - // NamedImports: - // { } - // { ImportsList } - // { ImportsList, } - // ImportsList: - // ImportSpecifier - // ImportsList, ImportSpecifier - node.elements = parseBracketedList(19 /* ImportOrExportSpecifiers */, kind === 215 /* NamedImports */ ? parseImportSpecifier : parseExportSpecifier, 14 /* OpenBraceToken */, 15 /* CloseBraceToken */); - return finishNode(node); - } - function parseExportSpecifier() { - return parseImportOrExportSpecifier(220 /* ExportSpecifier */); - } - function parseImportSpecifier() { - return parseImportOrExportSpecifier(216 /* ImportSpecifier */); - } - function parseImportOrExportSpecifier(kind) { - var node = createNode(kind); - // ImportSpecifier: - // BindingIdentifier - // IdentifierName as BindingIdentifier - // ExportSpecififer: - // IdentifierName - // IdentifierName as IdentifierName - var checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); - var checkIdentifierStart = scanner.getTokenPos(); - var checkIdentifierEnd = scanner.getTextPos(); - var identifierName = parseIdentifierName(); - if (token === 111 /* AsKeyword */) { - node.propertyName = identifierName; - parseExpected(111 /* AsKeyword */); - checkIdentifierIsKeyword = ts.isKeyword(token) && !isIdentifier(); - checkIdentifierStart = scanner.getTokenPos(); - checkIdentifierEnd = scanner.getTextPos(); - node.name = parseIdentifierName(); - } - else { - node.name = identifierName; - } - if (kind === 216 /* ImportSpecifier */ && checkIdentifierIsKeyword) { - // Report error identifier expected - parseErrorAtPosition(checkIdentifierStart, checkIdentifierEnd - checkIdentifierStart, ts.Diagnostics.Identifier_expected); - } - return finishNode(node); - } - function parseExportDeclaration(fullStart, decorators, modifiers) { - var node = createNode(218 /* ExportDeclaration */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - if (parseOptional(35 /* AsteriskToken */)) { - parseExpected(126 /* FromKeyword */); - node.moduleSpecifier = parseModuleSpecifier(); - } - else { - node.exportClause = parseNamedImportsOrExports(219 /* NamedExports */); - if (parseOptional(126 /* FromKeyword */)) { - node.moduleSpecifier = parseModuleSpecifier(); - } - } - parseSemicolon(); - return finishNode(node); - } - function parseExportAssignment(fullStart, decorators, modifiers) { - var node = createNode(217 /* ExportAssignment */, fullStart); - node.decorators = decorators; - setModifiers(node, modifiers); - if (parseOptional(53 /* EqualsToken */)) { - node.isExportEquals = true; - } - else { - parseExpected(73 /* DefaultKeyword */); - } - node.expression = parseAssignmentExpressionOrHigher(); - parseSemicolon(); - return finishNode(node); - } - function processReferenceComments(sourceFile) { - var triviaScanner = ts.createScanner(sourceFile.languageVersion, false, sourceText); - var referencedFiles = []; - var amdDependencies = []; - var amdModuleName; - // Keep scanning all the leading trivia in the file until we get to something that - // isn't trivia. Any single line comment will be analyzed to see if it is a - // reference comment. - while (true) { - var kind = triviaScanner.scan(); - if (kind === 5 /* WhitespaceTrivia */ || kind === 4 /* NewLineTrivia */ || kind === 3 /* MultiLineCommentTrivia */) { - continue; - } - if (kind !== 2 /* SingleLineCommentTrivia */) { - break; - } - var range = { pos: triviaScanner.getTokenPos(), end: triviaScanner.getTextPos(), kind: triviaScanner.getToken() }; - var comment = sourceText.substring(range.pos, range.end); - var referencePathMatchResult = ts.getFileReferenceFromReferencePath(comment, range); - if (referencePathMatchResult) { - var fileReference = referencePathMatchResult.fileReference; - sourceFile.hasNoDefaultLib = referencePathMatchResult.isNoDefaultLib; - var diagnosticMessage = referencePathMatchResult.diagnosticMessage; - if (fileReference) { - referencedFiles.push(fileReference); - } - if (diagnosticMessage) { - parseDiagnostics.push(ts.createFileDiagnostic(sourceFile, range.pos, range.end - range.pos, diagnosticMessage)); - } - } - else { - var amdModuleNameRegEx = /^\/\/\/\s*".length; - return parseErrorAtPosition(start, end - start, ts.Diagnostics.Type_argument_list_cannot_be_empty); - } - } - function parseQualifiedName(left) { - var result = createNode(128 /* QualifiedName */, left.pos); - result.left = left; - result.right = parseIdentifierName(); - return finishNode(result); - } - function parseJSDocRecordType() { - var result = createNode(239 /* JSDocRecordType */); - nextToken(); - result.members = parseDelimitedList(22 /* JSDocRecordMembers */, parseJSDocRecordMember); - checkForTrailingComma(result.members); - parseExpected(15 /* CloseBraceToken */); - return finishNode(result); - } - function parseJSDocRecordMember() { - var result = createNode(240 /* JSDocRecordMember */); - result.name = parseSimplePropertyName(); - if (token === 51 /* ColonToken */) { - nextToken(); - result.type = parseJSDocType(); - } - return finishNode(result); - } - function parseJSDocNonNullableType() { - var result = createNode(238 /* JSDocNonNullableType */); - nextToken(); - result.type = parseJSDocType(); - return finishNode(result); - } - function parseJSDocTupleType() { - var result = createNode(236 /* JSDocTupleType */); - nextToken(); - result.types = parseDelimitedList(23 /* JSDocTupleTypes */, parseJSDocType); - checkForTrailingComma(result.types); - parseExpected(19 /* CloseBracketToken */); - return finishNode(result); - } - function checkForTrailingComma(list) { - if (parseDiagnostics.length === 0 && list.hasTrailingComma) { - var start = list.end - ",".length; - parseErrorAtPosition(start, ",".length, ts.Diagnostics.Trailing_comma_not_allowed); - } - } - function parseJSDocUnionType() { - var result = createNode(235 /* JSDocUnionType */); - nextToken(); - result.types = parseJSDocTypeList(parseJSDocType()); - parseExpected(17 /* CloseParenToken */); - return finishNode(result); - } - function parseJSDocTypeList(firstType) { - ts.Debug.assert(!!firstType); - var types = []; - types.pos = firstType.pos; - types.push(firstType); - while (parseOptional(44 /* BarToken */)) { - types.push(parseJSDocType()); - } - types.end = scanner.getStartPos(); - return types; - } - function parseJSDocAllType() { - var result = createNode(232 /* JSDocAllType */); - nextToken(); - return finishNode(result); - } - function parseJSDocUnknownOrNullableType() { - var pos = scanner.getStartPos(); - // skip the ? - nextToken(); - // Need to lookahead to decide if this is a nullable or unknown type. - // Here are cases where we'll pick the unknown type: - // - // Foo(?, - // { a: ? } - // Foo(?) - // Foo - // Foo(?= - // (?| - if (token === 23 /* CommaToken */ || - token === 15 /* CloseBraceToken */ || - token === 17 /* CloseParenToken */ || - token === 25 /* GreaterThanToken */ || - token === 53 /* EqualsToken */ || - token === 44 /* BarToken */) { - var result = createNode(233 /* JSDocUnknownType */, pos); - return finishNode(result); - } - else { - var result = createNode(237 /* JSDocNullableType */, pos); - result.type = parseJSDocType(); - return finishNode(result); - } - } - function parseIsolatedJSDocComment(content, start, length) { - initializeState("file.js", content, 2 /* Latest */, undefined); - var jsDocComment = parseJSDocComment(undefined, start, length); - var diagnostics = parseDiagnostics; - clearState(); - return jsDocComment ? { jsDocComment: jsDocComment, diagnostics: diagnostics } : undefined; - } - JSDocParser.parseIsolatedJSDocComment = parseIsolatedJSDocComment; - function parseJSDocComment(parent, start, length) { - var comment = parseJSDocCommentWorker(start, length); - if (comment) { - fixupParentReferences(comment); - comment.parent = parent; - } - return comment; - } - JSDocParser.parseJSDocComment = parseJSDocComment; - function parseJSDocCommentWorker(start, length) { - var content = sourceText; - start = start || 0; - var end = length === undefined ? content.length : start + length; - length = end - start; - ts.Debug.assert(start >= 0); - ts.Debug.assert(start <= end); - ts.Debug.assert(end <= content.length); - var tags; - var pos; - // NOTE(cyrusn): This is essentially a handwritten scanner for JSDocComments. I - // considered using an actual Scanner, but this would complicate things. The - // scanner would need to know it was in a Doc Comment. Otherwise, it would then - // produce comments *inside* the doc comment. In the end it was just easier to - // write a simple scanner rather than go that route. - if (length >= "/** */".length) { - if (content.charCodeAt(start) === 47 /* slash */ && - content.charCodeAt(start + 1) === 42 /* asterisk */ && - content.charCodeAt(start + 2) === 42 /* asterisk */ && - content.charCodeAt(start + 3) !== 42 /* asterisk */) { - // Initially we can parse out a tag. We also have seen a starting asterisk. - // This is so that /** * @type */ doesn't parse. - var canParseTag = true; - var seenAsterisk = true; - for (pos = start + "/**".length; pos < end;) { - var ch = content.charCodeAt(pos); - pos++; - if (ch === 64 /* at */ && canParseTag) { - parseTag(); - // Once we parse out a tag, we cannot keep parsing out tags on this line. - canParseTag = false; - continue; - } - if (ts.isLineBreak(ch)) { - // After a line break, we can parse a tag, and we haven't seen as asterisk - // on the next line yet. - canParseTag = true; - seenAsterisk = false; - continue; - } - if (ts.isWhiteSpace(ch)) { - // Whitespace doesn't affect any of our parsing. - continue; - } - // Ignore the first asterisk on a line. - if (ch === 42 /* asterisk */) { - if (seenAsterisk) { - // If we've already seen an asterisk, then we can no longer parse a tag - // on this line. - canParseTag = false; - } - seenAsterisk = true; - continue; - } - // Anything else is doc comment text. We can't do anything with it. Because it - // wasn't a tag, we can no longer parse a tag on this line until we hit the next - // line break. - canParseTag = false; - } - } - } - return createJSDocComment(); - function createJSDocComment() { - if (!tags) { - return undefined; - } - var result = createNode(247 /* JSDocComment */, start); - result.tags = tags; - return finishNode(result, end); - } - function skipWhitespace() { - while (pos < end && ts.isWhiteSpace(content.charCodeAt(pos))) { - pos++; - } - } - function parseTag() { - ts.Debug.assert(content.charCodeAt(pos - 1) === 64 /* at */); - var atToken = createNode(52 /* AtToken */, pos - 1); - atToken.end = pos; - var startPos = pos; - var tagName = scanIdentifier(); - if (!tagName) { - return; - } - var tag = handleTag(atToken, tagName) || handleUnknownTag(atToken, tagName); - addTag(tag); - } - function handleTag(atToken, tagName) { - if (tagName) { - switch (tagName.text) { - case "param": - return handleParamTag(atToken, tagName); - case "return": - case "returns": - return handleReturnTag(atToken, tagName); - case "template": - return handleTemplateTag(atToken, tagName); - case "type": - return handleTypeTag(atToken, tagName); - } - } - return undefined; - } - function handleUnknownTag(atToken, tagName) { - var result = createNode(248 /* JSDocTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - return finishNode(result, pos); - } - function addTag(tag) { - if (tag) { - if (!tags) { - tags = []; - tags.pos = tag.pos; - } - tags.push(tag); - tags.end = tag.end; - } - } - function tryParseTypeExpression() { - skipWhitespace(); - if (content.charCodeAt(pos) !== 123 /* openBrace */) { - return undefined; - } - var typeExpression = parseJSDocTypeExpression(pos, end - pos); - pos = typeExpression.end; - return typeExpression; - } - function handleParamTag(atToken, tagName) { - var typeExpression = tryParseTypeExpression(); - skipWhitespace(); - var name; - var isBracketed; - if (content.charCodeAt(pos) === 91 /* openBracket */) { - pos++; - skipWhitespace(); - name = scanIdentifier(); - isBracketed = true; - } - else { - name = scanIdentifier(); - } - if (!name) { - parseErrorAtPosition(pos, 0, ts.Diagnostics.Identifier_expected); - return undefined; - } - var preName, postName; - if (typeExpression) { - postName = name; - } - else { - preName = name; - } - if (!typeExpression) { - typeExpression = tryParseTypeExpression(); - } - var result = createNode(249 /* JSDocParameterTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.preParameterName = preName; - result.typeExpression = typeExpression; - result.postParameterName = postName; - result.isBracketed = isBracketed; - return finishNode(result, pos); - } - function handleReturnTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 250 /* JSDocReturnTag */; })) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); - } - var result = createNode(250 /* JSDocReturnTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.typeExpression = tryParseTypeExpression(); - return finishNode(result, pos); - } - function handleTypeTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 251 /* JSDocTypeTag */; })) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); - } - var result = createNode(251 /* JSDocTypeTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.typeExpression = tryParseTypeExpression(); - return finishNode(result, pos); - } - function handleTemplateTag(atToken, tagName) { - if (ts.forEach(tags, function (t) { return t.kind === 252 /* JSDocTemplateTag */; })) { - parseErrorAtPosition(tagName.pos, pos - tagName.pos, ts.Diagnostics._0_tag_already_specified, tagName.text); - } - var typeParameters = []; - typeParameters.pos = pos; - while (true) { - skipWhitespace(); - var startPos = pos; - var name_7 = scanIdentifier(); - if (!name_7) { - parseErrorAtPosition(startPos, 0, ts.Diagnostics.Identifier_expected); - return undefined; - } - var typeParameter = createNode(130 /* TypeParameter */, name_7.pos); - typeParameter.name = name_7; - finishNode(typeParameter, pos); - typeParameters.push(typeParameter); - skipWhitespace(); - if (content.charCodeAt(pos) !== 44 /* comma */) { - break; - } - pos++; - } - typeParameters.end = pos; - var result = createNode(252 /* JSDocTemplateTag */, atToken.pos); - result.atToken = atToken; - result.tagName = tagName; - result.typeParameters = typeParameters; - return finishNode(result, pos); - } - function scanIdentifier() { - var startPos = pos; - for (; pos < end; pos++) { - var ch = content.charCodeAt(pos); - if (pos === startPos && ts.isIdentifierStart(ch, 2 /* Latest */)) { - continue; - } - else if (pos > startPos && ts.isIdentifierPart(ch, 2 /* Latest */)) { - continue; - } - break; - } - if (startPos === pos) { - return undefined; - } - var result = createNode(65 /* Identifier */, startPos); - result.text = content.substring(startPos, pos); - return finishNode(result, pos); - } - } - JSDocParser.parseJSDocCommentWorker = parseJSDocCommentWorker; - })(JSDocParser = Parser.JSDocParser || (Parser.JSDocParser = {})); - })(Parser || (Parser = {})); - var IncrementalParser; - (function (IncrementalParser) { - function updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks) { - aggressiveChecks = aggressiveChecks || ts.Debug.shouldAssert(2 /* Aggressive */); - checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks); - if (ts.textChangeRangeIsUnchanged(textChangeRange)) { - // if the text didn't change, then we can just return our current source file as-is. - return sourceFile; - } - if (sourceFile.statements.length === 0) { - // If we don't have any statements in the current source file, then there's no real - // way to incrementally parse. So just do a full parse instead. - return Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, undefined, true); - } - // Make sure we're not trying to incrementally update a source file more than once. Once - // we do an update the original source file is considered unusbale from that point onwards. - // - // This is because we do incremental parsing in-place. i.e. we take nodes from the old - // tree and give them new positions and parents. From that point on, trusting the old - // tree at all is not possible as far too much of it may violate invariants. - var incrementalSourceFile = sourceFile; - ts.Debug.assert(!incrementalSourceFile.hasBeenIncrementallyParsed); - incrementalSourceFile.hasBeenIncrementallyParsed = true; - var oldText = sourceFile.text; - var syntaxCursor = createSyntaxCursor(sourceFile); - // Make the actual change larger so that we know to reparse anything whose lookahead - // might have intersected the change. - var changeRange = extendToAffectedRange(sourceFile, textChangeRange); - checkChangeRange(sourceFile, newText, changeRange, aggressiveChecks); - // Ensure that extending the affected range only moved the start of the change range - // earlier in the file. - ts.Debug.assert(changeRange.span.start <= textChangeRange.span.start); - ts.Debug.assert(ts.textSpanEnd(changeRange.span) === ts.textSpanEnd(textChangeRange.span)); - ts.Debug.assert(ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)) === ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange))); - // The is the amount the nodes after the edit range need to be adjusted. It can be - // positive (if the edit added characters), negative (if the edit deleted characters) - // or zero (if this was a pure overwrite with nothing added/removed). - var delta = ts.textChangeRangeNewSpan(changeRange).length - changeRange.span.length; - // If we added or removed characters during the edit, then we need to go and adjust all - // the nodes after the edit. Those nodes may move forward (if we inserted chars) or they - // may move backward (if we deleted chars). - // - // Doing this helps us out in two ways. First, it means that any nodes/tokens we want - // to reuse are already at the appropriate position in the new text. That way when we - // reuse them, we don't have to figure out if they need to be adjusted. Second, it makes - // it very easy to determine if we can reuse a node. If the node's position is at where - // we are in the text, then we can reuse it. Otherwise we can't. If the node's position - // is ahead of us, then we'll need to rescan tokens. If the node's position is behind - // us, then we'll need to skip it or crumble it as appropriate - // - // We will also adjust the positions of nodes that intersect the change range as well. - // By doing this, we ensure that all the positions in the old tree are consistent, not - // just the positions of nodes entirely before/after the change range. By being - // consistent, we can then easily map from positions to nodes in the old tree easily. - // - // Also, mark any syntax elements that intersect the changed span. We know, up front, - // that we cannot reuse these elements. - updateTokenPositionsAndMarkElements(incrementalSourceFile, changeRange.span.start, ts.textSpanEnd(changeRange.span), ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks); - // Now that we've set up our internal incremental state just proceed and parse the - // source file in the normal fashion. When possible the parser will retrieve and - // reuse nodes from the old tree. - // - // Note: passing in 'true' for setNodeParents is very important. When incrementally - // parsing, we will be reusing nodes from the old tree, and placing it into new - // parents. If we don't set the parents now, we'll end up with an observably - // inconsistent tree. Setting the parents on the new tree should be very fast. We - // will immediately bail out of walking any subtrees when we can see that their parents - // are already correct. - var result = Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, syntaxCursor, true); - return result; - } - IncrementalParser.updateSourceFile = updateSourceFile; - function moveElementEntirelyPastChangeRange(element, isArray, delta, oldText, newText, aggressiveChecks) { - if (isArray) { - visitArray(element); - } - else { - visitNode(element); - } - return; - function visitNode(node) { - if (aggressiveChecks && shouldCheckNode(node)) { - var text = oldText.substring(node.pos, node.end); - } - // Ditch any existing LS children we may have created. This way we can avoid - // moving them forward. - if (node._children) { - node._children = undefined; - } - if (node.jsDocComment) { - node.jsDocComment = undefined; - } - node.pos += delta; - node.end += delta; - if (aggressiveChecks && shouldCheckNode(node)) { - ts.Debug.assert(text === newText.substring(node.pos, node.end)); - } - forEachChild(node, visitNode, visitArray); - checkNodePositions(node, aggressiveChecks); - } - function visitArray(array) { - array._children = undefined; - array.pos += delta; - array.end += delta; - for (var _i = 0; _i < array.length; _i++) { - var node = array[_i]; - visitNode(node); - } - } - } - function shouldCheckNode(node) { - switch (node.kind) { - case 8 /* StringLiteral */: - case 7 /* NumericLiteral */: - case 65 /* Identifier */: - return true; - } - return false; - } - function adjustIntersectingElement(element, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta) { - ts.Debug.assert(element.end >= changeStart, "Adjusting an element that was entirely before the change range"); - ts.Debug.assert(element.pos <= changeRangeOldEnd, "Adjusting an element that was entirely after the change range"); - ts.Debug.assert(element.pos <= element.end); - // We have an element that intersects the change range in some way. It may have its - // start, or its end (or both) in the changed range. We want to adjust any part - // that intersects such that the final tree is in a consistent state. i.e. all - // chlidren have spans within the span of their parent, and all siblings are ordered - // properly. - // We may need to update both the 'pos' and the 'end' of the element. - // If the 'pos' is before the start of the change, then we don't need to touch it. - // If it isn't, then the 'pos' must be inside the change. How we update it will - // depend if delta is positive or negative. If delta is positive then we have - // something like: - // - // -------------------AAA----------------- - // -------------------BBBCCCCCCC----------------- - // - // In this case, we consider any node that started in the change range to still be - // starting at the same position. - // - // however, if the delta is negative, then we instead have something like this: - // - // -------------------XXXYYYYYYY----------------- - // -------------------ZZZ----------------- - // - // In this case, any element that started in the 'X' range will keep its position. - // However any element htat started after that will have their pos adjusted to be - // at the end of the new range. i.e. any node that started in the 'Y' range will - // be adjusted to have their start at the end of the 'Z' range. - // - // The element will keep its position if possible. Or Move backward to the new-end - // if it's in the 'Y' range. - element.pos = Math.min(element.pos, changeRangeNewEnd); - // If the 'end' is after the change range, then we always adjust it by the delta - // amount. However, if the end is in the change range, then how we adjust it - // will depend on if delta is positive or negative. If delta is positive then we - // have something like: - // - // -------------------AAA----------------- - // -------------------BBBCCCCCCC----------------- - // - // In this case, we consider any node that ended inside the change range to keep its - // end position. - // - // however, if the delta is negative, then we instead have something like this: - // - // -------------------XXXYYYYYYY----------------- - // -------------------ZZZ----------------- - // - // In this case, any element that ended in the 'X' range will keep its position. - // However any element htat ended after that will have their pos adjusted to be - // at the end of the new range. i.e. any node that ended in the 'Y' range will - // be adjusted to have their end at the end of the 'Z' range. - if (element.end >= changeRangeOldEnd) { - // Element ends after the change range. Always adjust the end pos. - element.end += delta; - } - else { - // Element ends in the change range. The element will keep its position if - // possible. Or Move backward to the new-end if it's in the 'Y' range. - element.end = Math.min(element.end, changeRangeNewEnd); - } - ts.Debug.assert(element.pos <= element.end); - if (element.parent) { - ts.Debug.assert(element.pos >= element.parent.pos); - ts.Debug.assert(element.end <= element.parent.end); - } - } - function checkNodePositions(node, aggressiveChecks) { - if (aggressiveChecks) { - var pos = node.pos; - forEachChild(node, function (child) { - ts.Debug.assert(child.pos >= pos); - pos = child.end; - }); - ts.Debug.assert(pos <= node.end); - } - } - function updateTokenPositionsAndMarkElements(sourceFile, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta, oldText, newText, aggressiveChecks) { - visitNode(sourceFile); - return; - function visitNode(child) { - ts.Debug.assert(child.pos <= child.end); - if (child.pos > changeRangeOldEnd) { - // Node is entirely past the change range. We need to move both its pos and - // end, forward or backward appropriately. - moveElementEntirelyPastChangeRange(child, false, delta, oldText, newText, aggressiveChecks); - return; - } - // Check if the element intersects the change range. If it does, then it is not - // reusable. Also, we'll need to recurse to see what constituent portions we may - // be able to use. - var fullEnd = child.end; - if (fullEnd >= changeStart) { - child.intersectsChange = true; - child._children = undefined; - // Adjust the pos or end (or both) of the intersecting element accordingly. - adjustIntersectingElement(child, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); - forEachChild(child, visitNode, visitArray); - checkNodePositions(child, aggressiveChecks); - return; - } - // Otherwise, the node is entirely before the change range. No need to do anything with it. - ts.Debug.assert(fullEnd < changeStart); - } - function visitArray(array) { - ts.Debug.assert(array.pos <= array.end); - if (array.pos > changeRangeOldEnd) { - // Array is entirely after the change range. We need to move it, and move any of - // its children. - moveElementEntirelyPastChangeRange(array, true, delta, oldText, newText, aggressiveChecks); - return; - } - // Check if the element intersects the change range. If it does, then it is not - // reusable. Also, we'll need to recurse to see what constituent portions we may - // be able to use. - var fullEnd = array.end; - if (fullEnd >= changeStart) { - array.intersectsChange = true; - array._children = undefined; - // Adjust the pos or end (or both) of the intersecting array accordingly. - adjustIntersectingElement(array, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta); - for (var _i = 0; _i < array.length; _i++) { - var node = array[_i]; - visitNode(node); - } - return; - } - // Otherwise, the array is entirely before the change range. No need to do anything with it. - ts.Debug.assert(fullEnd < changeStart); - } - } - function extendToAffectedRange(sourceFile, changeRange) { - // Consider the following code: - // void foo() { /; } - // - // If the text changes with an insertion of / just before the semicolon then we end up with: - // void foo() { //; } - // - // If we were to just use the changeRange a is, then we would not rescan the { token - // (as it does not intersect the actual original change range). Because an edit may - // change the token touching it, we actually need to look back *at least* one token so - // that the prior token sees that change. - var maxLookahead = 1; - var start = changeRange.span.start; - // the first iteration aligns us with the change start. subsequent iteration move us to - // the left by maxLookahead tokens. We only need to do this as long as we're not at the - // start of the tree. - for (var i = 0; start > 0 && i <= maxLookahead; i++) { - var nearestNode = findNearestNodeStartingBeforeOrAtPosition(sourceFile, start); - ts.Debug.assert(nearestNode.pos <= start); - var position = nearestNode.pos; - start = Math.max(0, position - 1); - } - var finalSpan = ts.createTextSpanFromBounds(start, ts.textSpanEnd(changeRange.span)); - var finalLength = changeRange.newLength + (changeRange.span.start - start); - return ts.createTextChangeRange(finalSpan, finalLength); - } - function findNearestNodeStartingBeforeOrAtPosition(sourceFile, position) { - var bestResult = sourceFile; - var lastNodeEntirelyBeforePosition; - forEachChild(sourceFile, visit); - if (lastNodeEntirelyBeforePosition) { - var lastChildOfLastEntireNodeBeforePosition = getLastChild(lastNodeEntirelyBeforePosition); - if (lastChildOfLastEntireNodeBeforePosition.pos > bestResult.pos) { - bestResult = lastChildOfLastEntireNodeBeforePosition; - } - } - return bestResult; - function getLastChild(node) { - while (true) { - var lastChild = getLastChildWorker(node); - if (lastChild) { - node = lastChild; - } - else { - return node; - } - } - } - function getLastChildWorker(node) { - var last = undefined; - forEachChild(node, function (child) { - if (ts.nodeIsPresent(child)) { - last = child; - } - }); - return last; - } - function visit(child) { - if (ts.nodeIsMissing(child)) { - // Missing nodes are effectively invisible to us. We never even consider them - // When trying to find the nearest node before us. - return; - } - // If the child intersects this position, then this node is currently the nearest - // node that starts before the position. - if (child.pos <= position) { - if (child.pos >= bestResult.pos) { - // This node starts before the position, and is closer to the position than - // the previous best node we found. It is now the new best node. - bestResult = child; - } - // Now, the node may overlap the position, or it may end entirely before the - // position. If it overlaps with the position, then either it, or one of its - // children must be the nearest node before the position. So we can just - // recurse into this child to see if we can find something better. - if (position < child.end) { - // The nearest node is either this child, or one of the children inside - // of it. We've already marked this child as the best so far. Recurse - // in case one of the children is better. - forEachChild(child, visit); - // Once we look at the children of this node, then there's no need to - // continue any further. - return true; - } - else { - ts.Debug.assert(child.end <= position); - // The child ends entirely before this position. Say you have the following - // (where $ is the position) - // - // ? $ : <...> <...> - // - // We would want to find the nearest preceding node in "complex expr 2". - // To support that, we keep track of this node, and once we're done searching - // for a best node, we recurse down this node to see if we can find a good - // result in it. - // - // This approach allows us to quickly skip over nodes that are entirely - // before the position, while still allowing us to find any nodes in the - // last one that might be what we want. - lastNodeEntirelyBeforePosition = child; - } - } - else { - ts.Debug.assert(child.pos > position); - // We're now at a node that is entirely past the position we're searching for. - // This node (and all following nodes) could never contribute to the result, - // so just skip them by returning 'true' here. - return true; - } - } - } - function checkChangeRange(sourceFile, newText, textChangeRange, aggressiveChecks) { - var oldText = sourceFile.text; - if (textChangeRange) { - ts.Debug.assert((oldText.length - textChangeRange.span.length + textChangeRange.newLength) === newText.length); - if (aggressiveChecks || ts.Debug.shouldAssert(3 /* VeryAggressive */)) { - var oldTextPrefix = oldText.substr(0, textChangeRange.span.start); - var newTextPrefix = newText.substr(0, textChangeRange.span.start); - ts.Debug.assert(oldTextPrefix === newTextPrefix); - var oldTextSuffix = oldText.substring(ts.textSpanEnd(textChangeRange.span), oldText.length); - var newTextSuffix = newText.substring(ts.textSpanEnd(ts.textChangeRangeNewSpan(textChangeRange)), newText.length); - ts.Debug.assert(oldTextSuffix === newTextSuffix); - } - } - } - function createSyntaxCursor(sourceFile) { - var currentArray = sourceFile.statements; - var currentArrayIndex = 0; - ts.Debug.assert(currentArrayIndex < currentArray.length); - var current = currentArray[currentArrayIndex]; - var lastQueriedPosition = -1 /* Value */; - return { - currentNode: function (position) { - // Only compute the current node if the position is different than the last time - // we were asked. The parser commonly asks for the node at the same position - // twice. Once to know if can read an appropriate list element at a certain point, - // and then to actually read and consume the node. - if (position !== lastQueriedPosition) { - // Much of the time the parser will need the very next node in the array that - // we just returned a node from.So just simply check for that case and move - // forward in the array instead of searching for the node again. - if (current && current.end === position && currentArrayIndex < (currentArray.length - 1)) { - currentArrayIndex++; - current = currentArray[currentArrayIndex]; - } - // If we don't have a node, or the node we have isn't in the right position, - // then try to find a viable node at the position requested. - if (!current || current.pos !== position) { - findHighestListElementThatStartsAtPosition(position); - } - } - // Cache this query so that we don't do any extra work if the parser calls back - // into us. Note: this is very common as the parser will make pairs of calls like - // 'isListElement -> parseListElement'. If we were unable to find a node when - // called with 'isListElement', we don't want to redo the work when parseListElement - // is called immediately after. - lastQueriedPosition = position; - // Either we don'd have a node, or we have a node at the position being asked for. - ts.Debug.assert(!current || current.pos === position); - return current; - } - }; - // Finds the highest element in the tree we can find that starts at the provided position. - // The element must be a direct child of some node list in the tree. This way after we - // return it, we can easily return its next sibling in the list. - function findHighestListElementThatStartsAtPosition(position) { - // Clear out any cached state about the last node we found. - currentArray = undefined; - currentArrayIndex = -1 /* Value */; - current = undefined; - // Recurse into the source file to find the highest node at this position. - forEachChild(sourceFile, visitNode, visitArray); - return; - function visitNode(node) { - if (position >= node.pos && position < node.end) { - // Position was within this node. Keep searching deeper to find the node. - forEachChild(node, visitNode, visitArray); - // don't procede any futher in the search. - return true; - } - // position wasn't in this node, have to keep searching. - return false; - } - function visitArray(array) { - if (position >= array.pos && position < array.end) { - // position was in this array. Search through this array to see if we find a - // viable element. - for (var i = 0, n = array.length; i < n; i++) { - var child = array[i]; - if (child) { - if (child.pos === position) { - // Found the right node. We're done. - currentArray = array; - currentArrayIndex = i; - current = child; - return true; - } - else { - if (child.pos < position && position < child.end) { - // Position in somewhere within this child. Search in it and - // stop searching in this array. - forEachChild(child, visitNode, visitArray); - return true; - } - } - } - } - } - // position wasn't in this array, have to keep searching. - return false; - } - } - } - var InvalidPosition; - (function (InvalidPosition) { - InvalidPosition[InvalidPosition["Value"] = -1] = "Value"; - })(InvalidPosition || (InvalidPosition = {})); - })(IncrementalParser || (IncrementalParser = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var nextSymbolId = 1; - var nextNodeId = 1; - var nextMergeId = 1; - function getNodeId(node) { - if (!node.id) - node.id = nextNodeId++; - return node.id; - } - ts.getNodeId = getNodeId; - ts.checkTime = 0; - function getSymbolId(symbol) { - if (!symbol.id) { - symbol.id = nextSymbolId++; - } - return symbol.id; - } - ts.getSymbolId = getSymbolId; - function createTypeChecker(host, produceDiagnostics) { - var Symbol = ts.objectAllocator.getSymbolConstructor(); - var Type = ts.objectAllocator.getTypeConstructor(); - var Signature = ts.objectAllocator.getSignatureConstructor(); - var typeCount = 0; - var emptyArray = []; - var emptySymbols = {}; - var compilerOptions = host.getCompilerOptions(); - var languageVersion = compilerOptions.target || 0 /* ES3 */; - var emitResolver = createResolver(); - var undefinedSymbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "undefined"); - var argumentsSymbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "arguments"); - var checker = { - getNodeCount: function () { return ts.sum(host.getSourceFiles(), "nodeCount"); }, - getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); }, - getSymbolCount: function () { return ts.sum(host.getSourceFiles(), "symbolCount"); }, - getTypeCount: function () { return typeCount; }, - isUndefinedSymbol: function (symbol) { return symbol === undefinedSymbol; }, - isArgumentsSymbol: function (symbol) { return symbol === argumentsSymbol; }, - getDiagnostics: getDiagnostics, - getGlobalDiagnostics: getGlobalDiagnostics, - getTypeOfSymbolAtLocation: getTypeOfSymbolAtLocation, - getDeclaredTypeOfSymbol: getDeclaredTypeOfSymbol, - getPropertiesOfType: getPropertiesOfType, - getPropertyOfType: getPropertyOfType, - getSignaturesOfType: getSignaturesOfType, - getIndexTypeOfType: getIndexTypeOfType, - getReturnTypeOfSignature: getReturnTypeOfSignature, - getSymbolsInScope: getSymbolsInScope, - getSymbolAtLocation: getSymbolAtLocation, - getShorthandAssignmentValueSymbol: getShorthandAssignmentValueSymbol, - getTypeAtLocation: getTypeAtLocation, - typeToString: typeToString, - getSymbolDisplayBuilder: getSymbolDisplayBuilder, - symbolToString: symbolToString, - getAugmentedPropertiesOfType: getAugmentedPropertiesOfType, - getRootSymbols: getRootSymbols, - getContextualType: getContextualType, - getFullyQualifiedName: getFullyQualifiedName, - getResolvedSignature: getResolvedSignature, - getConstantValue: getConstantValue, - isValidPropertyAccess: isValidPropertyAccess, - getSignatureFromDeclaration: getSignatureFromDeclaration, - isImplementationOfOverload: isImplementationOfOverload, - getAliasedSymbol: resolveAlias, - getEmitResolver: getEmitResolver, - getExportsOfModule: getExportsOfModuleAsArray - }; - var unknownSymbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "unknown"); - var resolvingSymbol = createSymbol(67108864 /* Transient */, "__resolving__"); - var anyType = createIntrinsicType(1 /* Any */, "any"); - var stringType = createIntrinsicType(2 /* String */, "string"); - var numberType = createIntrinsicType(4 /* Number */, "number"); - var booleanType = createIntrinsicType(8 /* Boolean */, "boolean"); - var esSymbolType = createIntrinsicType(2097152 /* ESSymbol */, "symbol"); - var voidType = createIntrinsicType(16 /* Void */, "void"); - var undefinedType = createIntrinsicType(32 /* Undefined */ | 524288 /* ContainsUndefinedOrNull */, "undefined"); - var nullType = createIntrinsicType(64 /* Null */ | 524288 /* ContainsUndefinedOrNull */, "null"); - var unknownType = createIntrinsicType(1 /* Any */, "unknown"); - var circularType = createIntrinsicType(1 /* Any */, "__circular__"); - var emptyObjectType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - var emptyGenericType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - emptyGenericType.instantiations = {}; - var anyFunctionType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - var noConstraintType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - var anySignature = createSignature(undefined, undefined, emptyArray, anyType, undefined, 0, false, false); - var unknownSignature = createSignature(undefined, undefined, emptyArray, unknownType, undefined, 0, false, false); - var globals = {}; - var globalESSymbolConstructorSymbol; - var globalObjectType; - var globalFunctionType; - var globalArrayType; - var globalStringType; - var globalNumberType; - var globalBooleanType; - var globalRegExpType; - var globalTemplateStringsArrayType; - var globalESSymbolType; - var globalIterableType; - var globalIteratorType; - var globalIterableIteratorType; - var anyArrayType; - var getGlobalClassDecoratorType; - var getGlobalParameterDecoratorType; - var getGlobalPropertyDecoratorType; - var getGlobalMethodDecoratorType; - var tupleTypes = {}; - var unionTypes = {}; - var stringLiteralTypes = {}; - var emitExtends = false; - var emitDecorate = false; - var emitParam = false; - var resolutionTargets = []; - var resolutionResults = []; - var mergedSymbols = []; - var symbolLinks = []; - var nodeLinks = []; - var potentialThisCollisions = []; - var diagnostics = ts.createDiagnosticCollection(); - var primitiveTypeInfo = { - "string": { - type: stringType, - flags: 258 /* StringLike */ - }, - "number": { - type: numberType, - flags: 132 /* NumberLike */ - }, - "boolean": { - type: booleanType, - flags: 8 /* Boolean */ - }, - "symbol": { - type: esSymbolType, - flags: 2097152 /* ESSymbol */ - } - }; - function getEmitResolver(sourceFile) { - // Ensure we have all the type information in place for this file so that all the - // emitter questions of this resolver will return the right information. - getDiagnostics(sourceFile); - return emitResolver; - } - function error(location, message, arg0, arg1, arg2) { - var diagnostic = location - ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2) - : ts.createCompilerDiagnostic(message, arg0, arg1, arg2); - diagnostics.add(diagnostic); - } - function createSymbol(flags, name) { - return new Symbol(flags, name); - } - function getExcludedSymbolFlags(flags) { - var result = 0; - if (flags & 2 /* BlockScopedVariable */) - result |= 107455 /* BlockScopedVariableExcludes */; - if (flags & 1 /* FunctionScopedVariable */) - result |= 107454 /* FunctionScopedVariableExcludes */; - if (flags & 4 /* Property */) - result |= 107455 /* PropertyExcludes */; - if (flags & 8 /* EnumMember */) - result |= 107455 /* EnumMemberExcludes */; - if (flags & 16 /* Function */) - result |= 106927 /* FunctionExcludes */; - if (flags & 32 /* Class */) - result |= 899583 /* ClassExcludes */; - if (flags & 64 /* Interface */) - result |= 792992 /* InterfaceExcludes */; - if (flags & 256 /* RegularEnum */) - result |= 899327 /* RegularEnumExcludes */; - if (flags & 128 /* ConstEnum */) - result |= 899967 /* ConstEnumExcludes */; - if (flags & 512 /* ValueModule */) - result |= 106639 /* ValueModuleExcludes */; - if (flags & 8192 /* Method */) - result |= 99263 /* MethodExcludes */; - if (flags & 32768 /* GetAccessor */) - result |= 41919 /* GetAccessorExcludes */; - if (flags & 65536 /* SetAccessor */) - result |= 74687 /* SetAccessorExcludes */; - if (flags & 262144 /* TypeParameter */) - result |= 530912 /* TypeParameterExcludes */; - if (flags & 524288 /* TypeAlias */) - result |= 793056 /* TypeAliasExcludes */; - if (flags & 8388608 /* Alias */) - result |= 8388608 /* AliasExcludes */; - return result; - } - function recordMergedSymbol(target, source) { - if (!source.mergeId) - source.mergeId = nextMergeId++; - mergedSymbols[source.mergeId] = target; - } - function cloneSymbol(symbol) { - var result = createSymbol(symbol.flags | 33554432 /* Merged */, symbol.name); - result.declarations = symbol.declarations.slice(0); - result.parent = symbol.parent; - if (symbol.valueDeclaration) - result.valueDeclaration = symbol.valueDeclaration; - if (symbol.constEnumOnlyModule) - result.constEnumOnlyModule = true; - if (symbol.members) - result.members = cloneSymbolTable(symbol.members); - if (symbol.exports) - result.exports = cloneSymbolTable(symbol.exports); - recordMergedSymbol(result, symbol); - return result; - } - function mergeSymbol(target, source) { - if (!(target.flags & getExcludedSymbolFlags(source.flags))) { - if (source.flags & 512 /* ValueModule */ && target.flags & 512 /* ValueModule */ && target.constEnumOnlyModule && !source.constEnumOnlyModule) { - // reset flag when merging instantiated module into value module that has only const enums - target.constEnumOnlyModule = false; - } - target.flags |= source.flags; - if (!target.valueDeclaration && source.valueDeclaration) - target.valueDeclaration = source.valueDeclaration; - ts.forEach(source.declarations, function (node) { - target.declarations.push(node); - }); - if (source.members) { - if (!target.members) - target.members = {}; - mergeSymbolTable(target.members, source.members); - } - if (source.exports) { - if (!target.exports) - target.exports = {}; - mergeSymbolTable(target.exports, source.exports); - } - recordMergedSymbol(target, source); - } - else { - var message = target.flags & 2 /* BlockScopedVariable */ || source.flags & 2 /* BlockScopedVariable */ - ? ts.Diagnostics.Cannot_redeclare_block_scoped_variable_0 : ts.Diagnostics.Duplicate_identifier_0; - ts.forEach(source.declarations, function (node) { - error(node.name ? node.name : node, message, symbolToString(source)); - }); - ts.forEach(target.declarations, function (node) { - error(node.name ? node.name : node, message, symbolToString(source)); - }); - } - } - function cloneSymbolTable(symbolTable) { - var result = {}; - for (var id in symbolTable) { - if (ts.hasProperty(symbolTable, id)) { - result[id] = symbolTable[id]; - } - } - return result; - } - function mergeSymbolTable(target, source) { - for (var id in source) { - if (ts.hasProperty(source, id)) { - if (!ts.hasProperty(target, id)) { - target[id] = source[id]; - } - else { - var symbol = target[id]; - if (!(symbol.flags & 33554432 /* Merged */)) { - target[id] = symbol = cloneSymbol(symbol); - } - mergeSymbol(symbol, source[id]); - } - } - } - } - function getSymbolLinks(symbol) { - if (symbol.flags & 67108864 /* Transient */) - return symbol; - var id = getSymbolId(symbol); - return symbolLinks[id] || (symbolLinks[id] = {}); - } - function getNodeLinks(node) { - var nodeId = getNodeId(node); - return nodeLinks[nodeId] || (nodeLinks[nodeId] = {}); - } - function getSourceFile(node) { - return ts.getAncestor(node, 230 /* SourceFile */); - } - function isGlobalSourceFile(node) { - return node.kind === 230 /* SourceFile */ && !ts.isExternalModule(node); - } - function getSymbol(symbols, name, meaning) { - if (meaning && ts.hasProperty(symbols, name)) { - var symbol = symbols[name]; - ts.Debug.assert((symbol.flags & 16777216 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); - if (symbol.flags & meaning) { - return symbol; - } - if (symbol.flags & 8388608 /* Alias */) { - var target = resolveAlias(symbol); - // Unknown symbol means an error occurred in alias resolution, treat it as positive answer to avoid cascading errors - if (target === unknownSymbol || target.flags & meaning) { - return symbol; - } - } - } - // return undefined if we can't find a symbol. - } - /** Returns true if node1 is defined before node 2**/ - function isDefinedBefore(node1, node2) { - var file1 = ts.getSourceFileOfNode(node1); - var file2 = ts.getSourceFileOfNode(node2); - if (file1 === file2) { - return node1.pos <= node2.pos; - } - if (!compilerOptions.out) { - return true; - } - var sourceFiles = host.getSourceFiles(); - return sourceFiles.indexOf(file1) <= sourceFiles.indexOf(file2); - } - // Resolve a given name for a given meaning at a given location. An error is reported if the name was not found and - // the nameNotFoundMessage argument is not undefined. Returns the resolved symbol, or undefined if no symbol with - // the given name can be found. - function resolveName(location, name, meaning, nameNotFoundMessage, nameArg) { - var result; - var lastLocation; - var propertyWithInvalidInitializer; - var errorLocation = location; - var grandparent; - loop: while (location) { - // Locals of a source file are not in scope (because they get merged into the global symbol table) - if (location.locals && !isGlobalSourceFile(location)) { - if (result = getSymbol(location.locals, name, meaning)) { - // Type parameters of a function are in scope in the entire function declaration, including the parameter - // list and return type. However, local types are only in scope in the function body. - if (!(meaning & 793056 /* Type */) || - !(result.flags & (793056 /* Type */ & ~262144 /* TypeParameter */)) || - !ts.isFunctionLike(location) || - lastLocation === location.body) { - break loop; - } - result = undefined; - } - } - switch (location.kind) { - case 230 /* SourceFile */: - if (!ts.isExternalModule(location)) - break; - case 208 /* ModuleDeclaration */: - if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8914931 /* ModuleMember */)) { - if (result.flags & meaning || !(result.flags & 8388608 /* Alias */ && getDeclarationOfAliasSymbol(result).kind === 220 /* ExportSpecifier */)) { - break loop; - } - result = undefined; - } - else if (location.kind === 230 /* SourceFile */ || - (location.kind === 208 /* ModuleDeclaration */ && location.name.kind === 8 /* StringLiteral */)) { - result = getSymbolOfNode(location).exports["default"]; - var localSymbol = ts.getLocalSymbolForExportDefault(result); - if (result && localSymbol && (result.flags & meaning) && localSymbol.name === name) { - break loop; - } - result = undefined; - } - break; - case 207 /* EnumDeclaration */: - if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & 8 /* EnumMember */)) { - break loop; - } - break; - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - // TypeScript 1.0 spec (April 2014): 8.4.1 - // Initializer expressions for instance member variables are evaluated in the scope - // of the class constructor body but are not permitted to reference parameters or - // local variables of the constructor. This effectively means that entities from outer scopes - // by the same name as a constructor parameter or local variable are inaccessible - // in initializer expressions for instance member variables. - if (location.parent.kind === 204 /* ClassDeclaration */ && !(location.flags & 128 /* Static */)) { - var ctor = findConstructorDeclaration(location.parent); - if (ctor && ctor.locals) { - if (getSymbol(ctor.locals, name, meaning & 107455 /* Value */)) { - // Remember the property node, it will be used later to report appropriate error - propertyWithInvalidInitializer = location; - } - } - } - break; - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & 793056 /* Type */)) { - if (lastLocation && lastLocation.flags & 128 /* Static */) { - // TypeScript 1.0 spec (April 2014): 3.4.1 - // The scope of a type parameter extends over the entire declaration with which the type - // parameter list is associated, with the exception of static member declarations in classes. - error(errorLocation, ts.Diagnostics.Static_members_cannot_reference_class_type_parameters); - return undefined; - } - break loop; - } - break; - // It is not legal to reference a class's own type parameters from a computed property name that - // belongs to the class. For example: - // - // function foo() { return '' } - // class C { // <-- Class's own type parameter T - // [foo()]() { } // <-- Reference to T from class's own computed property - // } - // - case 129 /* ComputedPropertyName */: - grandparent = location.parent.parent; - if (grandparent.kind === 204 /* ClassDeclaration */ || grandparent.kind === 205 /* InterfaceDeclaration */) { - // A reference to this grandparent's type parameters would be an error - if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & 793056 /* Type */)) { - error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); - return undefined; - } - } - break; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 203 /* FunctionDeclaration */: - case 166 /* ArrowFunction */: - if (meaning & 3 /* Variable */ && name === "arguments") { - result = argumentsSymbol; - break loop; - } - break; - case 165 /* FunctionExpression */: - if (meaning & 3 /* Variable */ && name === "arguments") { - result = argumentsSymbol; - break loop; - } - if (meaning & 16 /* Function */) { - var functionName = location.name; - if (functionName && name === functionName.text) { - result = location.symbol; - break loop; - } - } - break; - case 177 /* ClassExpression */: - if (meaning & 32 /* Class */) { - var className = location.name; - if (className && name === className.text) { - result = location.symbol; - break loop; - } - } - break; - case 132 /* Decorator */: - // Decorators are resolved at the class declaration. Resolving at the parameter - // or member would result in looking up locals in the method. - // - // function y() {} - // class C { - // method(@y x, y) {} // <-- decorator y should be resolved at the class declaration, not the parameter. - // } - // - if (location.parent && location.parent.kind === 131 /* Parameter */) { - location = location.parent; - } - // - // function y() {} - // class C { - // @y method(x, y) {} // <-- decorator y should be resolved at the class declaration, not the method. - // } - // - if (location.parent && ts.isClassElement(location.parent)) { - location = location.parent; - } - break; - } - lastLocation = location; - location = location.parent; - } - if (!result) { - result = getSymbol(globals, name, meaning); - } - if (!result) { - if (nameNotFoundMessage) { - error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); - } - return undefined; - } - // Perform extra checks only if error reporting was requested - if (nameNotFoundMessage) { - if (propertyWithInvalidInitializer) { - // We have a match, but the reference occurred within a property initializer and the identifier also binds - // to a local variable in the constructor where the code will be emitted. - var propertyName = propertyWithInvalidInitializer.name; - error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), typeof nameArg === "string" ? nameArg : ts.declarationNameToString(nameArg)); - return undefined; - } - if (result.flags & 2 /* BlockScopedVariable */) { - checkResolvedBlockScopedVariable(result, errorLocation); - } - } - return result; - } - function checkResolvedBlockScopedVariable(result, errorLocation) { - ts.Debug.assert((result.flags & 2 /* BlockScopedVariable */) !== 0); - // Block-scoped variables cannot be used before their definition - var declaration = ts.forEach(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) ? d : undefined; }); - ts.Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined"); - // first check if usage is lexically located after the declaration - var isUsedBeforeDeclaration = !isDefinedBefore(declaration, errorLocation); - if (!isUsedBeforeDeclaration) { - // lexical check succeeded however code still can be illegal. - // - block scoped variables cannot be used in its initializers - // let x = x; // illegal but usage is lexically after definition - // - in ForIn/ForOf statements variable cannot be contained in expression part - // for (let x in x) - // for (let x of x) - // climb up to the variable declaration skipping binding patterns - var variableDeclaration = ts.getAncestor(declaration, 201 /* VariableDeclaration */); - var container = ts.getEnclosingBlockScopeContainer(variableDeclaration); - if (variableDeclaration.parent.parent.kind === 183 /* VariableStatement */ || - variableDeclaration.parent.parent.kind === 189 /* ForStatement */) { - // variable statement/for statement case, - // use site should not be inside variable declaration (initializer of declaration or binding element) - isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, variableDeclaration, container); - } - else if (variableDeclaration.parent.parent.kind === 191 /* ForOfStatement */ || - variableDeclaration.parent.parent.kind === 190 /* ForInStatement */) { - // ForIn/ForOf case - use site should not be used in expression part - var expression = variableDeclaration.parent.parent.expression; - isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, expression, container); - } - } - if (isUsedBeforeDeclaration) { - error(errorLocation, ts.Diagnostics.Block_scoped_variable_0_used_before_its_declaration, ts.declarationNameToString(declaration.name)); - } - } - /* Starting from 'initial' node walk up the parent chain until 'stopAt' node is reached. - * If at any point current node is equal to 'parent' node - return true. - * Return false if 'stopAt' node is reached or isFunctionLike(current) === true. - */ - function isSameScopeDescendentOf(initial, parent, stopAt) { - if (!parent) { - return false; - } - for (var current = initial; current && current !== stopAt && !ts.isFunctionLike(current); current = current.parent) { - if (current === parent) { - return true; - } - } - return false; - } - function getAnyImportSyntax(node) { - if (ts.isAliasSymbolDeclaration(node)) { - if (node.kind === 211 /* ImportEqualsDeclaration */) { - return node; - } - while (node && node.kind !== 212 /* ImportDeclaration */) { - node = node.parent; - } - return node; - } - } - function getDeclarationOfAliasSymbol(symbol) { - return ts.forEach(symbol.declarations, function (d) { return ts.isAliasSymbolDeclaration(d) ? d : undefined; }); - } - function getTargetOfImportEqualsDeclaration(node) { - if (node.moduleReference.kind === 222 /* ExternalModuleReference */) { - return resolveExternalModuleSymbol(resolveExternalModuleName(node, ts.getExternalModuleImportEqualsDeclarationExpression(node))); - } - return getSymbolOfPartOfRightHandSideOfImportEquals(node.moduleReference, node); - } - function getTargetOfImportClause(node) { - var moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier); - if (moduleSymbol) { - var exportDefaultSymbol = resolveSymbol(moduleSymbol.exports["default"]); - if (!exportDefaultSymbol) { - error(node.name, ts.Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol)); - } - return exportDefaultSymbol; - } - } - function getTargetOfNamespaceImport(node) { - var moduleSpecifier = node.parent.parent.moduleSpecifier; - return resolveESModuleSymbol(resolveExternalModuleName(node, moduleSpecifier), moduleSpecifier); - } - function getMemberOfModuleVariable(moduleSymbol, name) { - if (moduleSymbol.flags & 3 /* Variable */) { - var typeAnnotation = moduleSymbol.valueDeclaration.type; - if (typeAnnotation) { - return getPropertyOfType(getTypeFromTypeNode(typeAnnotation), name); - } - } - } - // This function creates a synthetic symbol that combines the value side of one symbol with the - // type/namespace side of another symbol. Consider this example: - // - // declare module graphics { - // interface Point { - // x: number; - // y: number; - // } - // } - // declare var graphics: { - // Point: new (x: number, y: number) => graphics.Point; - // } - // declare module "graphics" { - // export = graphics; - // } - // - // An 'import { Point } from "graphics"' needs to create a symbol that combines the value side 'Point' - // property with the type/namespace side interface 'Point'. - function combineValueAndTypeSymbols(valueSymbol, typeSymbol) { - if (valueSymbol.flags & (793056 /* Type */ | 1536 /* Namespace */)) { - return valueSymbol; - } - var result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.name); - result.declarations = ts.concatenate(valueSymbol.declarations, typeSymbol.declarations); - result.parent = valueSymbol.parent || typeSymbol.parent; - if (valueSymbol.valueDeclaration) - result.valueDeclaration = valueSymbol.valueDeclaration; - if (typeSymbol.members) - result.members = typeSymbol.members; - if (valueSymbol.exports) - result.exports = valueSymbol.exports; - return result; - } - function getExportOfModule(symbol, name) { - if (symbol.flags & 1536 /* Module */) { - var exports = getExportsOfSymbol(symbol); - if (ts.hasProperty(exports, name)) { - return resolveSymbol(exports[name]); - } - } - } - function getPropertyOfVariable(symbol, name) { - if (symbol.flags & 3 /* Variable */) { - var typeAnnotation = symbol.valueDeclaration.type; - if (typeAnnotation) { - return resolveSymbol(getPropertyOfType(getTypeFromTypeNode(typeAnnotation), name)); - } - } - } - function getExternalModuleMember(node, specifier) { - var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); - var targetSymbol = resolveESModuleSymbol(moduleSymbol, node.moduleSpecifier); - if (targetSymbol) { - var name_8 = specifier.propertyName || specifier.name; - if (name_8.text) { - var symbolFromModule = getExportOfModule(targetSymbol, name_8.text); - var symbolFromVariable = getPropertyOfVariable(targetSymbol, name_8.text); - var symbol = symbolFromModule && symbolFromVariable ? - combineValueAndTypeSymbols(symbolFromVariable, symbolFromModule) : - symbolFromModule || symbolFromVariable; - if (!symbol) { - error(name_8, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(moduleSymbol), ts.declarationNameToString(name_8)); - } - return symbol; - } - } - } - function getTargetOfImportSpecifier(node) { - return getExternalModuleMember(node.parent.parent.parent, node); - } - function getTargetOfExportSpecifier(node) { - return node.parent.parent.moduleSpecifier ? - getExternalModuleMember(node.parent.parent, node) : - resolveEntityName(node.propertyName || node.name, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */); - } - function getTargetOfExportAssignment(node) { - return resolveEntityName(node.expression, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */); - } - function getTargetOfAliasDeclaration(node) { - switch (node.kind) { - case 211 /* ImportEqualsDeclaration */: - return getTargetOfImportEqualsDeclaration(node); - case 213 /* ImportClause */: - return getTargetOfImportClause(node); - case 214 /* NamespaceImport */: - return getTargetOfNamespaceImport(node); - case 216 /* ImportSpecifier */: - return getTargetOfImportSpecifier(node); - case 220 /* ExportSpecifier */: - return getTargetOfExportSpecifier(node); - case 217 /* ExportAssignment */: - return getTargetOfExportAssignment(node); - } - } - function resolveSymbol(symbol) { - return symbol && symbol.flags & 8388608 /* Alias */ && !(symbol.flags & (107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */)) ? resolveAlias(symbol) : symbol; - } - function resolveAlias(symbol) { - ts.Debug.assert((symbol.flags & 8388608 /* Alias */) !== 0, "Should only get Alias here."); - var links = getSymbolLinks(symbol); - if (!links.target) { - links.target = resolvingSymbol; - var node = getDeclarationOfAliasSymbol(symbol); - var target = getTargetOfAliasDeclaration(node); - if (links.target === resolvingSymbol) { - links.target = target || unknownSymbol; - } - else { - error(node, ts.Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol)); - } - } - else if (links.target === resolvingSymbol) { - links.target = unknownSymbol; - } - return links.target; - } - function markExportAsReferenced(node) { - var symbol = getSymbolOfNode(node); - var target = resolveAlias(symbol); - if (target) { - var markAlias = (target === unknownSymbol && compilerOptions.isolatedModules) || - (target !== unknownSymbol && (target.flags & 107455 /* Value */) && !isConstEnumOrConstEnumOnlyModule(target)); - if (markAlias) { - markAliasSymbolAsReferenced(symbol); - } - } - } - // When an alias symbol is referenced, we need to mark the entity it references as referenced and in turn repeat that until - // we reach a non-alias or an exported entity (which is always considered referenced). We do this by checking the target of - // the alias as an expression (which recursively takes us back here if the target references another alias). - function markAliasSymbolAsReferenced(symbol) { - var links = getSymbolLinks(symbol); - if (!links.referenced) { - links.referenced = true; - var node = getDeclarationOfAliasSymbol(symbol); - if (node.kind === 217 /* ExportAssignment */) { - // export default - checkExpressionCached(node.expression); - } - else if (node.kind === 220 /* ExportSpecifier */) { - // export { } or export { as foo } - checkExpressionCached(node.propertyName || node.name); - } - else if (ts.isInternalModuleImportEqualsDeclaration(node)) { - // import foo = - checkExpressionCached(node.moduleReference); - } - } - } - // This function is only for imports with entity names - function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, importDeclaration) { - if (!importDeclaration) { - importDeclaration = ts.getAncestor(entityName, 211 /* ImportEqualsDeclaration */); - ts.Debug.assert(importDeclaration !== undefined); - } - // There are three things we might try to look for. In the following examples, - // the search term is enclosed in |...|: - // - // import a = |b|; // Namespace - // import a = |b.c|; // Value, type, namespace - // import a = |b.c|.d; // Namespace - if (entityName.kind === 65 /* Identifier */ && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { - entityName = entityName.parent; - } - // Check for case 1 and 3 in the above example - if (entityName.kind === 65 /* Identifier */ || entityName.parent.kind === 128 /* QualifiedName */) { - return resolveEntityName(entityName, 1536 /* Namespace */); - } - else { - // Case 2 in above example - // entityName.kind could be a QualifiedName or a Missing identifier - ts.Debug.assert(entityName.parent.kind === 211 /* ImportEqualsDeclaration */); - return resolveEntityName(entityName, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */); - } - } - function getFullyQualifiedName(symbol) { - return symbol.parent ? getFullyQualifiedName(symbol.parent) + "." + symbolToString(symbol) : symbolToString(symbol); - } - // Resolves a qualified name and any involved aliases - function resolveEntityName(name, meaning) { - if (ts.nodeIsMissing(name)) { - return undefined; - } - var symbol; - if (name.kind === 65 /* Identifier */) { - var message = meaning === 1536 /* Namespace */ ? ts.Diagnostics.Cannot_find_namespace_0 : ts.Diagnostics.Cannot_find_name_0; - symbol = resolveName(name, name.text, meaning, message, name); - if (!symbol) { - return undefined; - } - } - else if (name.kind === 128 /* QualifiedName */ || name.kind === 158 /* PropertyAccessExpression */) { - var left = name.kind === 128 /* QualifiedName */ ? name.left : name.expression; - var right = name.kind === 128 /* QualifiedName */ ? name.right : name.name; - var namespace = resolveEntityName(left, 1536 /* Namespace */); - if (!namespace || namespace === unknownSymbol || ts.nodeIsMissing(right)) { - return undefined; - } - symbol = getSymbol(getExportsOfSymbol(namespace), right.text, meaning); - if (!symbol) { - error(right, ts.Diagnostics.Module_0_has_no_exported_member_1, getFullyQualifiedName(namespace), ts.declarationNameToString(right)); - return undefined; - } - } - else { - ts.Debug.fail("Unknown entity name kind."); - } - ts.Debug.assert((symbol.flags & 16777216 /* Instantiated */) === 0, "Should never get an instantiated symbol here."); - return symbol.flags & meaning ? symbol : resolveAlias(symbol); - } - function isExternalModuleNameRelative(moduleName) { - // TypeScript 1.0 spec (April 2014): 11.2.1 - // An external module name is "relative" if the first term is "." or "..". - return moduleName.substr(0, 2) === "./" || moduleName.substr(0, 3) === "../" || moduleName.substr(0, 2) === ".\\" || moduleName.substr(0, 3) === "..\\"; - } - function resolveExternalModuleName(location, moduleReferenceExpression) { - if (moduleReferenceExpression.kind !== 8 /* StringLiteral */) { - return; - } - var moduleReferenceLiteral = moduleReferenceExpression; - var searchPath = ts.getDirectoryPath(getSourceFile(location).fileName); - // Module names are escaped in our symbol table. However, string literal values aren't. - // Escape the name in the "require(...)" clause to ensure we find the right symbol. - var moduleName = ts.escapeIdentifier(moduleReferenceLiteral.text); - if (!moduleName) - return; - var isRelative = isExternalModuleNameRelative(moduleName); - if (!isRelative) { - var symbol = getSymbol(globals, '"' + moduleName + '"', 512 /* ValueModule */); - if (symbol) { - return symbol; - } - } - var fileName; - var sourceFile; - while (true) { - fileName = ts.normalizePath(ts.combinePaths(searchPath, moduleName)); - sourceFile = ts.forEach(ts.supportedExtensions, function (extension) { return host.getSourceFile(fileName + extension); }); - if (sourceFile || isRelative) { - break; - } - var parentPath = ts.getDirectoryPath(searchPath); - if (parentPath === searchPath) { - break; - } - searchPath = parentPath; - } - if (sourceFile) { - if (sourceFile.symbol) { - return sourceFile.symbol; - } - error(moduleReferenceLiteral, ts.Diagnostics.File_0_is_not_a_module, sourceFile.fileName); - return; - } - error(moduleReferenceLiteral, ts.Diagnostics.Cannot_find_module_0, moduleName); - } - // An external module with an 'export =' declaration resolves to the target of the 'export =' declaration, - // and an external module with no 'export =' declaration resolves to the module itself. - function resolveExternalModuleSymbol(moduleSymbol) { - return moduleSymbol && resolveSymbol(moduleSymbol.exports["export="]) || moduleSymbol; - } - // An external module with an 'export =' declaration may be referenced as an ES6 module provided the 'export =' - // references a symbol that is at least declared as a module or a variable. The target of the 'export =' may - // combine other declarations with the module or variable (e.g. a class/module, function/module, interface/variable). - function resolveESModuleSymbol(moduleSymbol, moduleReferenceExpression) { - var symbol = resolveExternalModuleSymbol(moduleSymbol); - if (symbol && !(symbol.flags & (1536 /* Module */ | 3 /* Variable */))) { - error(moduleReferenceExpression, ts.Diagnostics.Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct, symbolToString(moduleSymbol)); - symbol = undefined; - } - return symbol; - } - function getExportAssignmentSymbol(moduleSymbol) { - return moduleSymbol.exports["export="]; - } - function getExportsOfModuleAsArray(moduleSymbol) { - return symbolsToArray(getExportsOfModule(moduleSymbol)); - } - function getExportsOfSymbol(symbol) { - return symbol.flags & 1536 /* Module */ ? getExportsOfModule(symbol) : symbol.exports || emptySymbols; - } - function getExportsOfModule(moduleSymbol) { - var links = getSymbolLinks(moduleSymbol); - return links.resolvedExports || (links.resolvedExports = getExportsForModule(moduleSymbol)); - } - function extendExportSymbols(target, source) { - for (var id in source) { - if (id !== "default" && !ts.hasProperty(target, id)) { - target[id] = source[id]; - } - } - } - function getExportsForModule(moduleSymbol) { - var result; - var visitedSymbols = []; - visit(moduleSymbol); - return result || moduleSymbol.exports; - // The ES6 spec permits export * declarations in a module to circularly reference the module itself. For example, - // module 'a' can 'export * from "b"' and 'b' can 'export * from "a"' without error. - function visit(symbol) { - if (symbol && symbol.flags & 1952 /* HasExports */ && !ts.contains(visitedSymbols, symbol)) { - visitedSymbols.push(symbol); - if (symbol !== moduleSymbol) { - if (!result) { - result = cloneSymbolTable(moduleSymbol.exports); - } - extendExportSymbols(result, symbol.exports); - } - // All export * declarations are collected in an __export symbol by the binder - var exportStars = symbol.exports["__export"]; - if (exportStars) { - for (var _i = 0, _a = exportStars.declarations; _i < _a.length; _i++) { - var node = _a[_i]; - visit(resolveExternalModuleName(node, node.moduleSpecifier)); - } - } - } - } - } - function getMergedSymbol(symbol) { - var merged; - return symbol && symbol.mergeId && (merged = mergedSymbols[symbol.mergeId]) ? merged : symbol; - } - function getSymbolOfNode(node) { - return getMergedSymbol(node.symbol); - } - function getParentOfSymbol(symbol) { - return getMergedSymbol(symbol.parent); - } - function getExportSymbolOfValueSymbolIfExported(symbol) { - return symbol && (symbol.flags & 1048576 /* ExportValue */) !== 0 - ? getMergedSymbol(symbol.exportSymbol) - : symbol; - } - function symbolIsValue(symbol) { - // If it is an instantiated symbol, then it is a value if the symbol it is an - // instantiation of is a value. - if (symbol.flags & 16777216 /* Instantiated */) { - return symbolIsValue(getSymbolLinks(symbol).target); - } - // If the symbol has the value flag, it is trivially a value. - if (symbol.flags & 107455 /* Value */) { - return true; - } - // If it is an alias, then it is a value if the symbol it resolves to is a value. - if (symbol.flags & 8388608 /* Alias */) { - return (resolveAlias(symbol).flags & 107455 /* Value */) !== 0; - } - return false; - } - function findConstructorDeclaration(node) { - var members = node.members; - for (var _i = 0; _i < members.length; _i++) { - var member = members[_i]; - if (member.kind === 137 /* Constructor */ && ts.nodeIsPresent(member.body)) { - return member; - } - } - } - function createType(flags) { - var result = new Type(checker, flags); - result.id = typeCount++; - return result; - } - function createIntrinsicType(kind, intrinsicName) { - var type = createType(kind); - type.intrinsicName = intrinsicName; - return type; - } - function createObjectType(kind, symbol) { - var type = createType(kind); - type.symbol = symbol; - return type; - } - // A reserved member name starts with two underscores, but the third character cannot be an underscore - // or the @ symbol. A third underscore indicates an escaped form of an identifer that started - // with at least two underscores. The @ character indicates that the name is denoted by a well known ES - // Symbol instance. - function isReservedMemberName(name) { - return name.charCodeAt(0) === 95 /* _ */ && - name.charCodeAt(1) === 95 /* _ */ && - name.charCodeAt(2) !== 95 /* _ */ && - name.charCodeAt(2) !== 64 /* at */; - } - function getNamedMembers(members) { - var result; - for (var id in members) { - if (ts.hasProperty(members, id)) { - if (!isReservedMemberName(id)) { - if (!result) - result = []; - var symbol = members[id]; - if (symbolIsValue(symbol)) { - result.push(symbol); - } - } - } - } - return result || emptyArray; - } - function setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType) { - type.members = members; - type.properties = getNamedMembers(members); - type.callSignatures = callSignatures; - type.constructSignatures = constructSignatures; - if (stringIndexType) - type.stringIndexType = stringIndexType; - if (numberIndexType) - type.numberIndexType = numberIndexType; - return type; - } - function createAnonymousType(symbol, members, callSignatures, constructSignatures, stringIndexType, numberIndexType) { - return setObjectTypeMembers(createObjectType(32768 /* Anonymous */, symbol), members, callSignatures, constructSignatures, stringIndexType, numberIndexType); - } - function forEachSymbolTableInScope(enclosingDeclaration, callback) { - var result; - for (var location_1 = enclosingDeclaration; location_1; location_1 = location_1.parent) { - // Locals of a source file are not in scope (because they get merged into the global symbol table) - if (location_1.locals && !isGlobalSourceFile(location_1)) { - if (result = callback(location_1.locals)) { - return result; - } - } - switch (location_1.kind) { - case 230 /* SourceFile */: - if (!ts.isExternalModule(location_1)) { - break; - } - case 208 /* ModuleDeclaration */: - if (result = callback(getSymbolOfNode(location_1).exports)) { - return result; - } - break; - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - if (result = callback(getSymbolOfNode(location_1).members)) { - return result; - } - break; - } - } - return callback(globals); - } - function getQualifiedLeftMeaning(rightMeaning) { - // If we are looking in value space, the parent meaning is value, other wise it is namespace - return rightMeaning === 107455 /* Value */ ? 107455 /* Value */ : 1536 /* Namespace */; - } - function getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, useOnlyExternalAliasing) { - function getAccessibleSymbolChainFromSymbolTable(symbols) { - function canQualifySymbol(symbolFromSymbolTable, meaning) { - // If the symbol is equivalent and doesn't need further qualification, this symbol is accessible - if (!needsQualification(symbolFromSymbolTable, enclosingDeclaration, meaning)) { - return true; - } - // If symbol needs qualification, make sure that parent is accessible, if it is then this symbol is accessible too - var accessibleParent = getAccessibleSymbolChain(symbolFromSymbolTable.parent, enclosingDeclaration, getQualifiedLeftMeaning(meaning), useOnlyExternalAliasing); - return !!accessibleParent; - } - function isAccessible(symbolFromSymbolTable, resolvedAliasSymbol) { - if (symbol === (resolvedAliasSymbol || symbolFromSymbolTable)) { - // if the symbolFromSymbolTable is not external module (it could be if it was determined as ambient external module and would be in globals table) - // and if symbolfrom symbolTable or alias resolution matches the symbol, - // check the symbol can be qualified, it is only then this symbol is accessible - return !ts.forEach(symbolFromSymbolTable.declarations, hasExternalModuleSymbol) && - canQualifySymbol(symbolFromSymbolTable, meaning); - } - } - // If symbol is directly available by its name in the symbol table - if (isAccessible(ts.lookUp(symbols, symbol.name))) { - return [symbol]; - } - // Check if symbol is any of the alias - return ts.forEachValue(symbols, function (symbolFromSymbolTable) { - if (symbolFromSymbolTable.flags & 8388608 /* Alias */ && symbolFromSymbolTable.name !== "export=") { - if (!useOnlyExternalAliasing || - // Is this external alias, then use it to name - ts.forEach(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration)) { - var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable); - if (isAccessible(symbolFromSymbolTable, resolveAlias(symbolFromSymbolTable))) { - return [symbolFromSymbolTable]; - } - // Look in the exported members, if we can find accessibleSymbolChain, symbol is accessible using this chain - // but only if the symbolFromSymbolTable can be qualified - var accessibleSymbolsFromExports = resolvedImportedSymbol.exports ? getAccessibleSymbolChainFromSymbolTable(resolvedImportedSymbol.exports) : undefined; - if (accessibleSymbolsFromExports && canQualifySymbol(symbolFromSymbolTable, getQualifiedLeftMeaning(meaning))) { - return [symbolFromSymbolTable].concat(accessibleSymbolsFromExports); - } - } - } - }); - } - if (symbol) { - return forEachSymbolTableInScope(enclosingDeclaration, getAccessibleSymbolChainFromSymbolTable); - } - } - function needsQualification(symbol, enclosingDeclaration, meaning) { - var qualify = false; - forEachSymbolTableInScope(enclosingDeclaration, function (symbolTable) { - // If symbol of this name is not available in the symbol table we are ok - if (!ts.hasProperty(symbolTable, symbol.name)) { - // Continue to the next symbol table - return false; - } - // If the symbol with this name is present it should refer to the symbol - var symbolFromSymbolTable = symbolTable[symbol.name]; - if (symbolFromSymbolTable === symbol) { - // No need to qualify - return true; - } - // Qualify if the symbol from symbol table has same meaning as expected - symbolFromSymbolTable = (symbolFromSymbolTable.flags & 8388608 /* Alias */) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable; - if (symbolFromSymbolTable.flags & meaning) { - qualify = true; - return true; - } - // Continue to the next symbol table - return false; - }); - return qualify; - } - function isSymbolAccessible(symbol, enclosingDeclaration, meaning) { - if (symbol && enclosingDeclaration && !(symbol.flags & 262144 /* TypeParameter */)) { - var initialSymbol = symbol; - var meaningToLook = meaning; - while (symbol) { - // Symbol is accessible if it by itself is accessible - var accessibleSymbolChain = getAccessibleSymbolChain(symbol, enclosingDeclaration, meaningToLook, false); - if (accessibleSymbolChain) { - var hasAccessibleDeclarations = hasVisibleDeclarations(accessibleSymbolChain[0]); - if (!hasAccessibleDeclarations) { - return { - accessibility: 1 /* NotAccessible */, - errorSymbolName: symbolToString(initialSymbol, enclosingDeclaration, meaning), - errorModuleName: symbol !== initialSymbol ? symbolToString(symbol, enclosingDeclaration, 1536 /* Namespace */) : undefined - }; - } - return hasAccessibleDeclarations; - } - // If we haven't got the accessible symbol, it doesn't mean the symbol is actually inaccessible. - // It could be a qualified symbol and hence verify the path - // e.g.: - // module m { - // export class c { - // } - // } - // let x: typeof m.c - // In the above example when we start with checking if typeof m.c symbol is accessible, - // we are going to see if c can be accessed in scope directly. - // But it can't, hence the accessible is going to be undefined, but that doesn't mean m.c is inaccessible - // It is accessible if the parent m is accessible because then m.c can be accessed through qualification - meaningToLook = getQualifiedLeftMeaning(meaning); - symbol = getParentOfSymbol(symbol); - } - // This could be a symbol that is not exported in the external module - // or it could be a symbol from different external module that is not aliased and hence cannot be named - var symbolExternalModule = ts.forEach(initialSymbol.declarations, getExternalModuleContainer); - if (symbolExternalModule) { - var enclosingExternalModule = getExternalModuleContainer(enclosingDeclaration); - if (symbolExternalModule !== enclosingExternalModule) { - // name from different external module that is not visible - return { - accessibility: 2 /* CannotBeNamed */, - errorSymbolName: symbolToString(initialSymbol, enclosingDeclaration, meaning), - errorModuleName: symbolToString(symbolExternalModule) - }; - } - } - // Just a local name that is not accessible - return { - accessibility: 1 /* NotAccessible */, - errorSymbolName: symbolToString(initialSymbol, enclosingDeclaration, meaning) - }; - } - return { accessibility: 0 /* Accessible */ }; - function getExternalModuleContainer(declaration) { - for (; declaration; declaration = declaration.parent) { - if (hasExternalModuleSymbol(declaration)) { - return getSymbolOfNode(declaration); - } - } - } - } - function hasExternalModuleSymbol(declaration) { - return (declaration.kind === 208 /* ModuleDeclaration */ && declaration.name.kind === 8 /* StringLiteral */) || - (declaration.kind === 230 /* SourceFile */ && ts.isExternalModule(declaration)); - } - function hasVisibleDeclarations(symbol) { - var aliasesToMakeVisible; - if (ts.forEach(symbol.declarations, function (declaration) { return !getIsDeclarationVisible(declaration); })) { - return undefined; - } - return { accessibility: 0 /* Accessible */, aliasesToMakeVisible: aliasesToMakeVisible }; - function getIsDeclarationVisible(declaration) { - if (!isDeclarationVisible(declaration)) { - // Mark the unexported alias as visible if its parent is visible - // because these kind of aliases can be used to name types in declaration file - var anyImportSyntax = getAnyImportSyntax(declaration); - if (anyImportSyntax && - !(anyImportSyntax.flags & 1 /* Export */) && - isDeclarationVisible(anyImportSyntax.parent)) { - getNodeLinks(declaration).isVisible = true; - if (aliasesToMakeVisible) { - if (!ts.contains(aliasesToMakeVisible, anyImportSyntax)) { - aliasesToMakeVisible.push(anyImportSyntax); - } - } - else { - aliasesToMakeVisible = [anyImportSyntax]; - } - return true; - } - // Declaration is not visible - return false; - } - return true; - } - } - function isEntityNameVisible(entityName, enclosingDeclaration) { - // get symbol of the first identifier of the entityName - var meaning; - if (entityName.parent.kind === 147 /* TypeQuery */) { - // Typeof value - meaning = 107455 /* Value */ | 1048576 /* ExportValue */; - } - else if (entityName.kind === 128 /* QualifiedName */ || entityName.kind === 158 /* PropertyAccessExpression */ || - entityName.parent.kind === 211 /* ImportEqualsDeclaration */) { - // Left identifier from type reference or TypeAlias - // Entity name of the import declaration - meaning = 1536 /* Namespace */; - } - else { - // Type Reference or TypeAlias entity = Identifier - meaning = 793056 /* Type */; - } - var firstIdentifier = getFirstIdentifier(entityName); - var symbol = resolveName(enclosingDeclaration, firstIdentifier.text, meaning, undefined, undefined); - // Verify if the symbol is accessible - return (symbol && hasVisibleDeclarations(symbol)) || { - accessibility: 1 /* NotAccessible */, - errorSymbolName: ts.getTextOfNode(firstIdentifier), - errorNode: firstIdentifier - }; - } - function writeKeyword(writer, kind) { - writer.writeKeyword(ts.tokenToString(kind)); - } - function writePunctuation(writer, kind) { - writer.writePunctuation(ts.tokenToString(kind)); - } - function writeSpace(writer) { - writer.writeSpace(" "); - } - function symbolToString(symbol, enclosingDeclaration, meaning) { - var writer = ts.getSingleLineStringWriter(); - getSymbolDisplayBuilder().buildSymbolDisplay(symbol, writer, enclosingDeclaration, meaning); - var result = writer.string(); - ts.releaseStringWriter(writer); - return result; - } - function signatureToString(signature, enclosingDeclaration, flags) { - var writer = ts.getSingleLineStringWriter(); - getSymbolDisplayBuilder().buildSignatureDisplay(signature, writer, enclosingDeclaration, flags); - var result = writer.string(); - ts.releaseStringWriter(writer); - return result; - } - function typeToString(type, enclosingDeclaration, flags) { - var writer = ts.getSingleLineStringWriter(); - getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); - var result = writer.string(); - ts.releaseStringWriter(writer); - var maxLength = compilerOptions.noErrorTruncation || flags & 4 /* NoTruncation */ ? undefined : 100; - if (maxLength && result.length >= maxLength) { - result = result.substr(0, maxLength - "...".length) + "..."; - } - return result; - } - function getTypeAliasForTypeLiteral(type) { - if (type.symbol && type.symbol.flags & 2048 /* TypeLiteral */) { - var node = type.symbol.declarations[0].parent; - while (node.kind === 152 /* ParenthesizedType */) { - node = node.parent; - } - if (node.kind === 206 /* TypeAliasDeclaration */) { - return getSymbolOfNode(node); - } - } - return undefined; - } - // This is for caching the result of getSymbolDisplayBuilder. Do not access directly. - var _displayBuilder; - function getSymbolDisplayBuilder() { - /** - * Writes only the name of the symbol out to the writer. Uses the original source text - * for the name of the symbol if it is available to match how the user inputted the name. - */ - function appendSymbolNameOnly(symbol, writer) { - if (symbol.declarations && symbol.declarations.length > 0) { - var declaration = symbol.declarations[0]; - if (declaration.name) { - writer.writeSymbol(ts.declarationNameToString(declaration.name), symbol); - return; - } - } - writer.writeSymbol(symbol.name, symbol); - } - /** - * Enclosing declaration is optional when we don't want to get qualified name in the enclosing declaration scope - * Meaning needs to be specified if the enclosing declaration is given - */ - function buildSymbolDisplay(symbol, writer, enclosingDeclaration, meaning, flags, typeFlags) { - var parentSymbol; - function appendParentTypeArgumentsAndSymbolName(symbol) { - if (parentSymbol) { - // Write type arguments of instantiated class/interface here - if (flags & 1 /* WriteTypeParametersOrArguments */) { - if (symbol.flags & 16777216 /* Instantiated */) { - buildDisplayForTypeArgumentsAndDelimiters(getTypeParametersOfClassOrInterface(parentSymbol), symbol.mapper, writer, enclosingDeclaration); - } - else { - buildTypeParameterDisplayFromSymbol(parentSymbol, writer, enclosingDeclaration); - } - } - writePunctuation(writer, 20 /* DotToken */); - } - parentSymbol = symbol; - appendSymbolNameOnly(symbol, writer); - } - // Let the writer know we just wrote out a symbol. The declaration emitter writer uses - // this to determine if an import it has previously seen (and not written out) needs - // to be written to the file once the walk of the tree is complete. - // - // NOTE(cyrusn): This approach feels somewhat unfortunate. A simple pass over the tree - // up front (for example, during checking) could determine if we need to emit the imports - // and we could then access that data during declaration emit. - writer.trackSymbol(symbol, enclosingDeclaration, meaning); - function walkSymbol(symbol, meaning) { - if (symbol) { - var accessibleSymbolChain = getAccessibleSymbolChain(symbol, enclosingDeclaration, meaning, !!(flags & 2 /* UseOnlyExternalAliasing */)); - if (!accessibleSymbolChain || - needsQualification(accessibleSymbolChain[0], enclosingDeclaration, accessibleSymbolChain.length === 1 ? meaning : getQualifiedLeftMeaning(meaning))) { - // Go up and add our parent. - walkSymbol(getParentOfSymbol(accessibleSymbolChain ? accessibleSymbolChain[0] : symbol), getQualifiedLeftMeaning(meaning)); - } - if (accessibleSymbolChain) { - for (var _i = 0; _i < accessibleSymbolChain.length; _i++) { - var accessibleSymbol = accessibleSymbolChain[_i]; - appendParentTypeArgumentsAndSymbolName(accessibleSymbol); - } - } - else { - // If we didn't find accessible symbol chain for this symbol, break if this is external module - if (!parentSymbol && ts.forEach(symbol.declarations, hasExternalModuleSymbol)) { - return; - } - // if this is anonymous type break - if (symbol.flags & 2048 /* TypeLiteral */ || symbol.flags & 4096 /* ObjectLiteral */) { - return; - } - appendParentTypeArgumentsAndSymbolName(symbol); - } - } - } - // Get qualified name if the symbol is not a type parameter - // and there is an enclosing declaration or we specifically - // asked for it - var isTypeParameter = symbol.flags & 262144 /* TypeParameter */; - var typeFormatFlag = 128 /* UseFullyQualifiedType */ & typeFlags; - if (!isTypeParameter && (enclosingDeclaration || typeFormatFlag)) { - walkSymbol(symbol, meaning); - return; - } - return appendParentTypeArgumentsAndSymbolName(symbol); - } - function buildTypeDisplay(type, writer, enclosingDeclaration, globalFlags, symbolStack) { - var globalFlagsToPass = globalFlags & 16 /* WriteOwnNameForAnyLike */; - return writeType(type, globalFlags); - function writeType(type, flags) { - // Write undefined/null type as any - if (type.flags & 2097279 /* Intrinsic */) { - // Special handling for unknown / resolving types, they should show up as any and not unknown or __resolving - writer.writeKeyword(!(globalFlags & 16 /* WriteOwnNameForAnyLike */) && isTypeAny(type) - ? "any" - : type.intrinsicName); - } - else if (type.flags & 4096 /* Reference */) { - writeTypeReference(type, flags); - } - else if (type.flags & (1024 /* Class */ | 2048 /* Interface */ | 128 /* Enum */ | 512 /* TypeParameter */)) { - // The specified symbol flags need to be reinterpreted as type flags - buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 793056 /* Type */, 0 /* None */, flags); - } - else if (type.flags & 8192 /* Tuple */) { - writeTupleType(type); - } - else if (type.flags & 16384 /* Union */) { - writeUnionType(type, flags); - } - else if (type.flags & 32768 /* Anonymous */) { - writeAnonymousType(type, flags); - } - else if (type.flags & 256 /* StringLiteral */) { - writer.writeStringLiteral(type.text); - } - else { - // Should never get here - // { ... } - writePunctuation(writer, 14 /* OpenBraceToken */); - writeSpace(writer); - writePunctuation(writer, 21 /* DotDotDotToken */); - writeSpace(writer); - writePunctuation(writer, 15 /* CloseBraceToken */); - } - } - function writeTypeList(types, union) { - for (var i = 0; i < types.length; i++) { - if (i > 0) { - if (union) { - writeSpace(writer); - } - writePunctuation(writer, union ? 44 /* BarToken */ : 23 /* CommaToken */); - writeSpace(writer); - } - writeType(types[i], union ? 64 /* InElementType */ : 0 /* None */); - } - } - function writeSymbolTypeReference(symbol, typeArguments, pos, end) { - // Unnamed function expressions, arrow functions, and unnamed class expressions have reserved names that - // we don't want to display - if (!isReservedMemberName(symbol.name)) { - buildSymbolDisplay(symbol, writer, enclosingDeclaration, 793056 /* Type */); - } - if (pos < end) { - writePunctuation(writer, 24 /* LessThanToken */); - writeType(typeArguments[pos++], 0 /* None */); - while (pos < end) { - writePunctuation(writer, 23 /* CommaToken */); - writeSpace(writer); - writeType(typeArguments[pos++], 0 /* None */); - } - writePunctuation(writer, 25 /* GreaterThanToken */); - } - } - function writeTypeReference(type, flags) { - var typeArguments = type.typeArguments; - if (type.target === globalArrayType && !(flags & 1 /* WriteArrayAsGenericType */)) { - writeType(typeArguments[0], 64 /* InElementType */); - writePunctuation(writer, 18 /* OpenBracketToken */); - writePunctuation(writer, 19 /* CloseBracketToken */); - } - else { - // Write the type reference in the format f.g.C where A and B are type arguments - // for outer type parameters, and f and g are the respective declaring containers of those - // type parameters. - var outerTypeParameters = type.target.outerTypeParameters; - var i = 0; - if (outerTypeParameters) { - var length_1 = outerTypeParameters.length; - while (i < length_1) { - // Find group of type arguments for type parameters with the same declaring container. - var start = i; - var parent_3 = getParentSymbolOfTypeParameter(outerTypeParameters[i]); - do { - i++; - } while (i < length_1 && getParentSymbolOfTypeParameter(outerTypeParameters[i]) === parent_3); - // When type parameters are their own type arguments for the whole group (i.e. we have - // the default outer type arguments), we don't show the group. - if (!ts.rangeEquals(outerTypeParameters, typeArguments, start, i)) { - writeSymbolTypeReference(parent_3, typeArguments, start, i); - writePunctuation(writer, 20 /* DotToken */); - } - } - } - writeSymbolTypeReference(type.symbol, typeArguments, i, typeArguments.length); - } - } - function writeTupleType(type) { - writePunctuation(writer, 18 /* OpenBracketToken */); - writeTypeList(type.elementTypes, false); - writePunctuation(writer, 19 /* CloseBracketToken */); - } - function writeUnionType(type, flags) { - if (flags & 64 /* InElementType */) { - writePunctuation(writer, 16 /* OpenParenToken */); - } - writeTypeList(type.types, true); - if (flags & 64 /* InElementType */) { - writePunctuation(writer, 17 /* CloseParenToken */); - } - } - function writeAnonymousType(type, flags) { - var symbol = type.symbol; - if (symbol) { - // Always use 'typeof T' for type of class, enum, and module objects - if (symbol.flags & (32 /* Class */ | 384 /* Enum */ | 512 /* ValueModule */)) { - writeTypeofSymbol(type, flags); - } - else if (shouldWriteTypeOfFunctionSymbol()) { - writeTypeofSymbol(type, flags); - } - else if (ts.contains(symbolStack, symbol)) { - // If type is an anonymous type literal in a type alias declaration, use type alias name - var typeAlias = getTypeAliasForTypeLiteral(type); - if (typeAlias) { - // The specified symbol flags need to be reinterpreted as type flags - buildSymbolDisplay(typeAlias, writer, enclosingDeclaration, 793056 /* Type */, 0 /* None */, flags); - } - else { - // Recursive usage, use any - writeKeyword(writer, 112 /* AnyKeyword */); - } - } - else { - // Since instantiations of the same anonymous type have the same symbol, tracking symbols instead - // of types allows us to catch circular references to instantiations of the same anonymous type - if (!symbolStack) { - symbolStack = []; - } - symbolStack.push(symbol); - writeLiteralType(type, flags); - symbolStack.pop(); - } - } - else { - // Anonymous types with no symbol are never circular - writeLiteralType(type, flags); - } - function shouldWriteTypeOfFunctionSymbol() { - var isStaticMethodSymbol = !!(symbol.flags & 8192 /* Method */ && - ts.forEach(symbol.declarations, function (declaration) { return declaration.flags & 128 /* Static */; })); - var isNonLocalFunctionSymbol = !!(symbol.flags & 16 /* Function */) && - (symbol.parent || - ts.forEach(symbol.declarations, function (declaration) { - return declaration.parent.kind === 230 /* SourceFile */ || declaration.parent.kind === 209 /* ModuleBlock */; - })); - if (isStaticMethodSymbol || isNonLocalFunctionSymbol) { - // typeof is allowed only for static/non local functions - return !!(flags & 2 /* UseTypeOfFunction */) || - (ts.contains(symbolStack, symbol)); // it is type of the symbol uses itself recursively - } - } - } - function writeTypeofSymbol(type, typeFormatFlags) { - writeKeyword(writer, 97 /* TypeOfKeyword */); - writeSpace(writer); - buildSymbolDisplay(type.symbol, writer, enclosingDeclaration, 107455 /* Value */, 0 /* None */, typeFormatFlags); - } - function getIndexerParameterName(type, indexKind, fallbackName) { - var declaration = getIndexDeclarationOfSymbol(type.symbol, indexKind); - if (!declaration) { - // declaration might not be found if indexer was added from the contextual type. - // in this case use fallback name - return fallbackName; - } - ts.Debug.assert(declaration.parameters.length !== 0); - return ts.declarationNameToString(declaration.parameters[0].name); - } - function writeLiteralType(type, flags) { - var resolved = resolveObjectOrUnionTypeMembers(type); - if (!resolved.properties.length && !resolved.stringIndexType && !resolved.numberIndexType) { - if (!resolved.callSignatures.length && !resolved.constructSignatures.length) { - writePunctuation(writer, 14 /* OpenBraceToken */); - writePunctuation(writer, 15 /* CloseBraceToken */); - return; - } - if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) { - if (flags & 64 /* InElementType */) { - writePunctuation(writer, 16 /* OpenParenToken */); - } - buildSignatureDisplay(resolved.callSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8 /* WriteArrowStyleSignature */, symbolStack); - if (flags & 64 /* InElementType */) { - writePunctuation(writer, 17 /* CloseParenToken */); - } - return; - } - if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) { - if (flags & 64 /* InElementType */) { - writePunctuation(writer, 16 /* OpenParenToken */); - } - writeKeyword(writer, 88 /* NewKeyword */); - writeSpace(writer); - buildSignatureDisplay(resolved.constructSignatures[0], writer, enclosingDeclaration, globalFlagsToPass | 8 /* WriteArrowStyleSignature */, symbolStack); - if (flags & 64 /* InElementType */) { - writePunctuation(writer, 17 /* CloseParenToken */); - } - return; - } - } - writePunctuation(writer, 14 /* OpenBraceToken */); - writer.writeLine(); - writer.increaseIndent(); - for (var _i = 0, _a = resolved.callSignatures; _i < _a.length; _i++) { - var signature = _a[_i]; - buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, symbolStack); - writePunctuation(writer, 22 /* SemicolonToken */); - writer.writeLine(); - } - for (var _b = 0, _c = resolved.constructSignatures; _b < _c.length; _b++) { - var signature = _c[_b]; - writeKeyword(writer, 88 /* NewKeyword */); - writeSpace(writer); - buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, symbolStack); - writePunctuation(writer, 22 /* SemicolonToken */); - writer.writeLine(); - } - if (resolved.stringIndexType) { - // [x: string]: - writePunctuation(writer, 18 /* OpenBracketToken */); - writer.writeParameter(getIndexerParameterName(resolved, 0 /* String */, "x")); - writePunctuation(writer, 51 /* ColonToken */); - writeSpace(writer); - writeKeyword(writer, 123 /* StringKeyword */); - writePunctuation(writer, 19 /* CloseBracketToken */); - writePunctuation(writer, 51 /* ColonToken */); - writeSpace(writer); - writeType(resolved.stringIndexType, 0 /* None */); - writePunctuation(writer, 22 /* SemicolonToken */); - writer.writeLine(); - } - if (resolved.numberIndexType) { - // [x: number]: - writePunctuation(writer, 18 /* OpenBracketToken */); - writer.writeParameter(getIndexerParameterName(resolved, 1 /* Number */, "x")); - writePunctuation(writer, 51 /* ColonToken */); - writeSpace(writer); - writeKeyword(writer, 121 /* NumberKeyword */); - writePunctuation(writer, 19 /* CloseBracketToken */); - writePunctuation(writer, 51 /* ColonToken */); - writeSpace(writer); - writeType(resolved.numberIndexType, 0 /* None */); - writePunctuation(writer, 22 /* SemicolonToken */); - writer.writeLine(); - } - for (var _d = 0, _e = resolved.properties; _d < _e.length; _d++) { - var p = _e[_d]; - var t = getTypeOfSymbol(p); - if (p.flags & (16 /* Function */ | 8192 /* Method */) && !getPropertiesOfObjectType(t).length) { - var signatures = getSignaturesOfType(t, 0 /* Call */); - for (var _f = 0; _f < signatures.length; _f++) { - var signature = signatures[_f]; - buildSymbolDisplay(p, writer); - if (p.flags & 536870912 /* Optional */) { - writePunctuation(writer, 50 /* QuestionToken */); - } - buildSignatureDisplay(signature, writer, enclosingDeclaration, globalFlagsToPass, symbolStack); - writePunctuation(writer, 22 /* SemicolonToken */); - writer.writeLine(); - } - } - else { - buildSymbolDisplay(p, writer); - if (p.flags & 536870912 /* Optional */) { - writePunctuation(writer, 50 /* QuestionToken */); - } - writePunctuation(writer, 51 /* ColonToken */); - writeSpace(writer); - writeType(t, 0 /* None */); - writePunctuation(writer, 22 /* SemicolonToken */); - writer.writeLine(); - } - } - writer.decreaseIndent(); - writePunctuation(writer, 15 /* CloseBraceToken */); - } - } - function buildTypeParameterDisplayFromSymbol(symbol, writer, enclosingDeclaraiton, flags) { - var targetSymbol = getTargetSymbol(symbol); - if (targetSymbol.flags & 32 /* Class */ || targetSymbol.flags & 64 /* Interface */) { - buildDisplayForTypeParametersAndDelimiters(getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol), writer, enclosingDeclaraiton, flags); - } - } - function buildTypeParameterDisplay(tp, writer, enclosingDeclaration, flags, symbolStack) { - appendSymbolNameOnly(tp.symbol, writer); - var constraint = getConstraintOfTypeParameter(tp); - if (constraint) { - writeSpace(writer); - writeKeyword(writer, 79 /* ExtendsKeyword */); - writeSpace(writer); - buildTypeDisplay(constraint, writer, enclosingDeclaration, flags, symbolStack); - } - } - function buildParameterDisplay(p, writer, enclosingDeclaration, flags, symbolStack) { - var parameterNode = p.valueDeclaration; - if (ts.isRestParameter(parameterNode)) { - writePunctuation(writer, 21 /* DotDotDotToken */); - } - appendSymbolNameOnly(p, writer); - if (isOptionalParameter(parameterNode)) { - writePunctuation(writer, 50 /* QuestionToken */); - } - writePunctuation(writer, 51 /* ColonToken */); - writeSpace(writer); - buildTypeDisplay(getTypeOfSymbol(p), writer, enclosingDeclaration, flags, symbolStack); - } - function buildDisplayForTypeParametersAndDelimiters(typeParameters, writer, enclosingDeclaration, flags, symbolStack) { - if (typeParameters && typeParameters.length) { - writePunctuation(writer, 24 /* LessThanToken */); - for (var i = 0; i < typeParameters.length; i++) { - if (i > 0) { - writePunctuation(writer, 23 /* CommaToken */); - writeSpace(writer); - } - buildTypeParameterDisplay(typeParameters[i], writer, enclosingDeclaration, flags, symbolStack); - } - writePunctuation(writer, 25 /* GreaterThanToken */); - } - } - function buildDisplayForTypeArgumentsAndDelimiters(typeParameters, mapper, writer, enclosingDeclaration, flags, symbolStack) { - if (typeParameters && typeParameters.length) { - writePunctuation(writer, 24 /* LessThanToken */); - for (var i = 0; i < typeParameters.length; i++) { - if (i > 0) { - writePunctuation(writer, 23 /* CommaToken */); - writeSpace(writer); - } - buildTypeDisplay(mapper(typeParameters[i]), writer, enclosingDeclaration, 0 /* None */); - } - writePunctuation(writer, 25 /* GreaterThanToken */); - } - } - function buildDisplayForParametersAndDelimiters(parameters, writer, enclosingDeclaration, flags, symbolStack) { - writePunctuation(writer, 16 /* OpenParenToken */); - for (var i = 0; i < parameters.length; i++) { - if (i > 0) { - writePunctuation(writer, 23 /* CommaToken */); - writeSpace(writer); - } - buildParameterDisplay(parameters[i], writer, enclosingDeclaration, flags, symbolStack); - } - writePunctuation(writer, 17 /* CloseParenToken */); - } - function buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack) { - if (flags & 8 /* WriteArrowStyleSignature */) { - writeSpace(writer); - writePunctuation(writer, 32 /* EqualsGreaterThanToken */); - } - else { - writePunctuation(writer, 51 /* ColonToken */); - } - writeSpace(writer); - buildTypeDisplay(getReturnTypeOfSignature(signature), writer, enclosingDeclaration, flags, symbolStack); - } - function buildSignatureDisplay(signature, writer, enclosingDeclaration, flags, symbolStack) { - if (signature.target && (flags & 32 /* WriteTypeArgumentsOfSignature */)) { - // Instantiated signature, write type arguments instead - // This is achieved by passing in the mapper separately - buildDisplayForTypeArgumentsAndDelimiters(signature.target.typeParameters, signature.mapper, writer, enclosingDeclaration); - } - else { - buildDisplayForTypeParametersAndDelimiters(signature.typeParameters, writer, enclosingDeclaration, flags, symbolStack); - } - buildDisplayForParametersAndDelimiters(signature.parameters, writer, enclosingDeclaration, flags, symbolStack); - buildReturnTypeDisplay(signature, writer, enclosingDeclaration, flags, symbolStack); - } - return _displayBuilder || (_displayBuilder = { - symbolToString: symbolToString, - typeToString: typeToString, - buildSymbolDisplay: buildSymbolDisplay, - buildTypeDisplay: buildTypeDisplay, - buildTypeParameterDisplay: buildTypeParameterDisplay, - buildParameterDisplay: buildParameterDisplay, - buildDisplayForParametersAndDelimiters: buildDisplayForParametersAndDelimiters, - buildDisplayForTypeParametersAndDelimiters: buildDisplayForTypeParametersAndDelimiters, - buildDisplayForTypeArgumentsAndDelimiters: buildDisplayForTypeArgumentsAndDelimiters, - buildTypeParameterDisplayFromSymbol: buildTypeParameterDisplayFromSymbol, - buildSignatureDisplay: buildSignatureDisplay, - buildReturnTypeDisplay: buildReturnTypeDisplay - }); - } - function isDeclarationVisible(node) { - function getContainingExternalModule(node) { - for (; node; node = node.parent) { - if (node.kind === 208 /* ModuleDeclaration */) { - if (node.name.kind === 8 /* StringLiteral */) { - return node; - } - } - else if (node.kind === 230 /* SourceFile */) { - return ts.isExternalModule(node) ? node : undefined; - } - } - ts.Debug.fail("getContainingModule cant reach here"); - } - function isUsedInExportAssignment(node) { - // Get source File and see if it is external module and has export assigned symbol - var externalModule = getContainingExternalModule(node); - var exportAssignmentSymbol; - var resolvedExportSymbol; - if (externalModule) { - // This is export assigned symbol node - var externalModuleSymbol = getSymbolOfNode(externalModule); - exportAssignmentSymbol = getExportAssignmentSymbol(externalModuleSymbol); - var symbolOfNode = getSymbolOfNode(node); - if (isSymbolUsedInExportAssignment(symbolOfNode)) { - return true; - } - // if symbolOfNode is alias declaration, resolve the symbol declaration and check - if (symbolOfNode.flags & 8388608 /* Alias */) { - return isSymbolUsedInExportAssignment(resolveAlias(symbolOfNode)); - } - } - // Check if the symbol is used in export assignment - function isSymbolUsedInExportAssignment(symbol) { - if (exportAssignmentSymbol === symbol) { - return true; - } - if (exportAssignmentSymbol && !!(exportAssignmentSymbol.flags & 8388608 /* Alias */)) { - // if export assigned symbol is alias declaration, resolve the alias - resolvedExportSymbol = resolvedExportSymbol || resolveAlias(exportAssignmentSymbol); - if (resolvedExportSymbol === symbol) { - return true; - } - // Container of resolvedExportSymbol is visible - return ts.forEach(resolvedExportSymbol.declarations, function (current) { - while (current) { - if (current === node) { - return true; - } - current = current.parent; - } - }); - } - } - } - function determineIfDeclarationIsVisible() { - switch (node.kind) { - case 155 /* BindingElement */: - return isDeclarationVisible(node.parent.parent); - case 201 /* VariableDeclaration */: - if (ts.isBindingPattern(node.name) && - !node.name.elements.length) { - // If the binding pattern is empty, this variable declaration is not visible - return false; - } - // Otherwise fall through - case 208 /* ModuleDeclaration */: - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 206 /* TypeAliasDeclaration */: - case 203 /* FunctionDeclaration */: - case 207 /* EnumDeclaration */: - case 211 /* ImportEqualsDeclaration */: - var parent_4 = getDeclarationContainer(node); - // If the node is not exported or it is not ambient module element (except import declaration) - if (!(ts.getCombinedNodeFlags(node) & 1 /* Export */) && - !(node.kind !== 211 /* ImportEqualsDeclaration */ && parent_4.kind !== 230 /* SourceFile */ && ts.isInAmbientContext(parent_4))) { - return isGlobalSourceFile(parent_4); - } - // Exported members/ambient module elements (exception import declaration) are visible if parent is visible - return isDeclarationVisible(parent_4); - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - if (node.flags & (32 /* Private */ | 64 /* Protected */)) { - // Private/protected properties/methods are not visible - return false; - } - // Public properties/methods are visible if its parents are visible, so let it fall into next case statement - case 137 /* Constructor */: - case 141 /* ConstructSignature */: - case 140 /* CallSignature */: - case 142 /* IndexSignature */: - case 131 /* Parameter */: - case 209 /* ModuleBlock */: - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - case 148 /* TypeLiteral */: - case 144 /* TypeReference */: - case 149 /* ArrayType */: - case 150 /* TupleType */: - case 151 /* UnionType */: - case 152 /* ParenthesizedType */: - return isDeclarationVisible(node.parent); - // Default binding, import specifier and namespace import is visible - // only on demand so by default it is not visible - case 213 /* ImportClause */: - case 214 /* NamespaceImport */: - case 216 /* ImportSpecifier */: - return false; - // Type parameters are always visible - case 130 /* TypeParameter */: - // Source file is always visible - case 230 /* SourceFile */: - return true; - // Export assignements do not create name bindings outside the module - case 217 /* ExportAssignment */: - return false; - default: - ts.Debug.fail("isDeclarationVisible unknown: SyntaxKind: " + node.kind); - } - } - if (node) { - var links = getNodeLinks(node); - if (links.isVisible === undefined) { - links.isVisible = !!determineIfDeclarationIsVisible(); - } - return links.isVisible; - } - } - function collectLinkedAliases(node) { - var exportSymbol; - if (node.parent && node.parent.kind === 217 /* ExportAssignment */) { - exportSymbol = resolveName(node.parent, node.text, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */, ts.Diagnostics.Cannot_find_name_0, node); - } - else if (node.parent.kind === 220 /* ExportSpecifier */) { - exportSymbol = getTargetOfExportSpecifier(node.parent); - } - var result = []; - if (exportSymbol) { - buildVisibleNodeList(exportSymbol.declarations); - } - return result; - function buildVisibleNodeList(declarations) { - ts.forEach(declarations, function (declaration) { - getNodeLinks(declaration).isVisible = true; - var resultNode = getAnyImportSyntax(declaration) || declaration; - if (!ts.contains(result, resultNode)) { - result.push(resultNode); - } - if (ts.isInternalModuleImportEqualsDeclaration(declaration)) { - // Add the referenced top container visible - var internalModuleReference = declaration.moduleReference; - var firstIdentifier = getFirstIdentifier(internalModuleReference); - var importSymbol = resolveName(declaration, firstIdentifier.text, 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */, ts.Diagnostics.Cannot_find_name_0, firstIdentifier); - buildVisibleNodeList(importSymbol.declarations); - } - }); - } - } - // Push an entry on the type resolution stack. If an entry with the given target is not already on the stack, - // a new entry with that target and an associated result value of true is pushed on the stack, and the value - // true is returned. Otherwise, a circularity has occurred and the result values of the existing entry and - // all entries pushed after it are changed to false, and the value false is returned. The target object provides - // a unique identity for a particular type resolution result: Symbol instances are used to track resolution of - // SymbolLinks.type, SymbolLinks instances are used to track resolution of SymbolLinks.declaredType, and - // Signature instances are used to track resolution of Signature.resolvedReturnType. - function pushTypeResolution(target) { - var i = 0; - var count = resolutionTargets.length; - while (i < count && resolutionTargets[i] !== target) { - i++; - } - if (i < count) { - do { - resolutionResults[i++] = false; - } while (i < count); - return false; - } - resolutionTargets.push(target); - resolutionResults.push(true); - return true; - } - // Pop an entry from the type resolution stack and return its associated result value. The result value will - // be true if no circularities were detected, or false if a circularity was found. - function popTypeResolution() { - resolutionTargets.pop(); - return resolutionResults.pop(); - } - function getDeclarationContainer(node) { - node = ts.getRootDeclaration(node); - // Parent chain: - // VaribleDeclaration -> VariableDeclarationList -> VariableStatement -> 'Declaration Container' - return node.kind === 201 /* VariableDeclaration */ ? node.parent.parent.parent : node.parent; - } - function getTypeOfPrototypeProperty(prototype) { - // TypeScript 1.0 spec (April 2014): 8.4 - // Every class automatically contains a static property member named 'prototype', - // the type of which is an instantiation of the class type with type Any supplied as a type argument for each type parameter. - // It is an error to explicitly declare a static property member with the name 'prototype'. - var classType = getDeclaredTypeOfSymbol(prototype.parent); - return classType.typeParameters ? createTypeReference(classType, ts.map(classType.typeParameters, function (_) { return anyType; })) : classType; - } - // Return the type of the given property in the given type, or undefined if no such property exists - function getTypeOfPropertyOfType(type, name) { - var prop = getPropertyOfType(type, name); - return prop ? getTypeOfSymbol(prop) : undefined; - } - function isTypeAny(type) { - return type && (type.flags & 1 /* Any */) !== 0; - } - // Return the inferred type for a binding element - function getTypeForBindingElement(declaration) { - var pattern = declaration.parent; - var parentType = getTypeForVariableLikeDeclaration(pattern.parent); - // If parent has the unknown (error) type, then so does this binding element - if (parentType === unknownType) { - return unknownType; - } - // If no type was specified or inferred for parent, or if the specified or inferred type is any, - // infer from the initializer of the binding element if one is present. Otherwise, go with the - // undefined or any type of the parent. - if (!parentType || isTypeAny(parentType)) { - if (declaration.initializer) { - return checkExpressionCached(declaration.initializer); - } - return parentType; - } - var type; - if (pattern.kind === 153 /* ObjectBindingPattern */) { - // Use explicitly specified property name ({ p: xxx } form), or otherwise the implied name ({ p } form) - var name_9 = declaration.propertyName || declaration.name; - // Use type of the specified property, or otherwise, for a numeric name, the type of the numeric index signature, - // or otherwise the type of the string index signature. - type = getTypeOfPropertyOfType(parentType, name_9.text) || - isNumericLiteralName(name_9.text) && getIndexTypeOfType(parentType, 1 /* Number */) || - getIndexTypeOfType(parentType, 0 /* String */); - if (!type) { - error(name_9, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(parentType), ts.declarationNameToString(name_9)); - return unknownType; - } - } - else { - // This elementType will be used if the specific property corresponding to this index is not - // present (aka the tuple element property). This call also checks that the parentType is in - // fact an iterable or array (depending on target language). - var elementType = checkIteratedTypeOrElementType(parentType, pattern, false); - if (!declaration.dotDotDotToken) { - if (isTypeAny(elementType)) { - return elementType; - } - // Use specific property type when parent is a tuple or numeric index type when parent is an array - var propName = "" + ts.indexOf(pattern.elements, declaration); - type = isTupleLikeType(parentType) - ? getTypeOfPropertyOfType(parentType, propName) - : elementType; - if (!type) { - if (isTupleType(parentType)) { - error(declaration, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(parentType), parentType.elementTypes.length, pattern.elements.length); - } - else { - error(declaration, ts.Diagnostics.Type_0_has_no_property_1, typeToString(parentType), propName); - } - return unknownType; - } - } - else { - // Rest element has an array type with the same element type as the parent type - type = createArrayType(elementType); - } - } - return type; - } - // Return the inferred type for a variable, parameter, or property declaration - function getTypeForVariableLikeDeclaration(declaration) { - // A variable declared in a for..in statement is always of type any - if (declaration.parent.parent.kind === 190 /* ForInStatement */) { - return anyType; - } - if (declaration.parent.parent.kind === 191 /* ForOfStatement */) { - // checkRightHandSideOfForOf will return undefined if the for-of expression type was - // missing properties/signatures required to get its iteratedType (like - // [Symbol.iterator] or next). This may be because we accessed properties from anyType, - // or it may have led to an error inside getElementTypeOfIterable. - return checkRightHandSideOfForOf(declaration.parent.parent.expression) || anyType; - } - if (ts.isBindingPattern(declaration.parent)) { - return getTypeForBindingElement(declaration); - } - // Use type from type annotation if one is present - if (declaration.type) { - return getTypeFromTypeNode(declaration.type); - } - if (declaration.kind === 131 /* Parameter */) { - var func = declaration.parent; - // For a parameter of a set accessor, use the type of the get accessor if one is present - if (func.kind === 139 /* SetAccessor */ && !ts.hasDynamicName(func)) { - var getter = ts.getDeclarationOfKind(declaration.parent.symbol, 138 /* GetAccessor */); - if (getter) { - return getReturnTypeOfSignature(getSignatureFromDeclaration(getter)); - } - } - // Use contextual parameter type if one is available - var type = getContextuallyTypedParameterType(declaration); - if (type) { - return type; - } - } - // Use the type of the initializer expression if one is present - if (declaration.initializer) { - return checkExpressionCached(declaration.initializer); - } - // If it is a short-hand property assignment, use the type of the identifier - if (declaration.kind === 228 /* ShorthandPropertyAssignment */) { - return checkIdentifier(declaration.name); - } - // No type specified and nothing can be inferred - return undefined; - } - // Return the type implied by a binding pattern element. This is the type of the initializer of the element if - // one is present. Otherwise, if the element is itself a binding pattern, it is the type implied by the binding - // pattern. Otherwise, it is the type any. - function getTypeFromBindingElement(element) { - if (element.initializer) { - return getWidenedType(checkExpressionCached(element.initializer)); - } - if (ts.isBindingPattern(element.name)) { - return getTypeFromBindingPattern(element.name); - } - return anyType; - } - // Return the type implied by an object binding pattern - function getTypeFromObjectBindingPattern(pattern) { - var members = {}; - ts.forEach(pattern.elements, function (e) { - var flags = 4 /* Property */ | 67108864 /* Transient */ | (e.initializer ? 536870912 /* Optional */ : 0); - var name = e.propertyName || e.name; - var symbol = createSymbol(flags, name.text); - symbol.type = getTypeFromBindingElement(e); - members[symbol.name] = symbol; - }); - return createAnonymousType(undefined, members, emptyArray, emptyArray, undefined, undefined); - } - // Return the type implied by an array binding pattern - function getTypeFromArrayBindingPattern(pattern) { - var hasSpreadElement = false; - var elementTypes = []; - ts.forEach(pattern.elements, function (e) { - elementTypes.push(e.kind === 178 /* OmittedExpression */ || e.dotDotDotToken ? anyType : getTypeFromBindingElement(e)); - if (e.dotDotDotToken) { - hasSpreadElement = true; - } - }); - if (!elementTypes.length) { - return languageVersion >= 2 /* ES6 */ ? createIterableType(anyType) : anyArrayType; - } - else if (hasSpreadElement) { - var unionOfElements = getUnionType(elementTypes); - return languageVersion >= 2 /* ES6 */ ? createIterableType(unionOfElements) : createArrayType(unionOfElements); - } - // If the pattern has at least one element, and no rest element, then it should imply a tuple type. - return createTupleType(elementTypes); - } - // Return the type implied by a binding pattern. This is the type implied purely by the binding pattern itself - // and without regard to its context (i.e. without regard any type annotation or initializer associated with the - // declaration in which the binding pattern is contained). For example, the implied type of [x, y] is [any, any] - // and the implied type of { x, y: z = 1 } is { x: any; y: number; }. The type implied by a binding pattern is - // used as the contextual type of an initializer associated with the binding pattern. Also, for a destructuring - // parameter with no type annotation or initializer, the type implied by the binding pattern becomes the type of - // the parameter. - function getTypeFromBindingPattern(pattern) { - return pattern.kind === 153 /* ObjectBindingPattern */ - ? getTypeFromObjectBindingPattern(pattern) - : getTypeFromArrayBindingPattern(pattern); - } - // Return the type associated with a variable, parameter, or property declaration. In the simple case this is the type - // specified in a type annotation or inferred from an initializer. However, in the case of a destructuring declaration it - // is a bit more involved. For example: - // - // var [x, s = ""] = [1, "one"]; - // - // Here, the array literal [1, "one"] is contextually typed by the type [any, string], which is the implied type of the - // binding pattern [x, s = ""]. Because the contextual type is a tuple type, the resulting type of [1, "one"] is the - // tuple type [number, string]. Thus, the type inferred for 'x' is number and the type inferred for 's' is string. - function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors) { - var type = getTypeForVariableLikeDeclaration(declaration); - if (type) { - if (reportErrors) { - reportErrorsFromWidening(declaration, type); - } - // During a normal type check we'll never get to here with a property assignment (the check of the containing - // object literal uses a different path). We exclude widening only so that language services and type verification - // tools see the actual type. - return declaration.kind !== 227 /* PropertyAssignment */ ? getWidenedType(type) : type; - } - // If no type was specified and nothing could be inferred, and if the declaration specifies a binding pattern, use - // the type implied by the binding pattern - if (ts.isBindingPattern(declaration.name)) { - return getTypeFromBindingPattern(declaration.name); - } - // Rest parameters default to type any[], other parameters default to type any - type = declaration.dotDotDotToken ? anyArrayType : anyType; - // Report implicit any errors unless this is a private property within an ambient declaration - if (reportErrors && compilerOptions.noImplicitAny) { - var root = ts.getRootDeclaration(declaration); - if (!isPrivateWithinAmbient(root) && !(root.kind === 131 /* Parameter */ && isPrivateWithinAmbient(root.parent))) { - reportImplicitAnyError(declaration, type); - } - } - return type; - } - function getTypeOfVariableOrParameterOrProperty(symbol) { - var links = getSymbolLinks(symbol); - if (!links.type) { - // Handle prototype property - if (symbol.flags & 134217728 /* Prototype */) { - return links.type = getTypeOfPrototypeProperty(symbol); - } - // Handle catch clause variables - var declaration = symbol.valueDeclaration; - if (declaration.parent.kind === 226 /* CatchClause */) { - return links.type = anyType; - } - // Handle export default expressions - if (declaration.kind === 217 /* ExportAssignment */) { - return links.type = checkExpression(declaration.expression); - } - // Handle variable, parameter or property - if (!pushTypeResolution(symbol)) { - return unknownType; - } - var type = getWidenedTypeForVariableLikeDeclaration(declaration, true); - if (!popTypeResolution()) { - if (symbol.valueDeclaration.type) { - // Variable has type annotation that circularly references the variable itself - type = unknownType; - error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol)); - } - else { - // Variable has initializer that circularly references the variable itself - type = anyType; - if (compilerOptions.noImplicitAny) { - error(symbol.valueDeclaration, ts.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol)); - } - } - } - links.type = type; - } - return links.type; - } - function getSetAccessorTypeAnnotationNode(accessor) { - return accessor && accessor.parameters.length > 0 && accessor.parameters[0].type; - } - function getAnnotatedAccessorType(accessor) { - if (accessor) { - if (accessor.kind === 138 /* GetAccessor */) { - return accessor.type && getTypeFromTypeNode(accessor.type); - } - else { - var setterTypeAnnotation = getSetAccessorTypeAnnotationNode(accessor); - return setterTypeAnnotation && getTypeFromTypeNode(setterTypeAnnotation); - } - } - return undefined; - } - function getTypeOfAccessors(symbol) { - var links = getSymbolLinks(symbol); - if (!links.type) { - if (!pushTypeResolution(symbol)) { - return unknownType; - } - var getter = ts.getDeclarationOfKind(symbol, 138 /* GetAccessor */); - var setter = ts.getDeclarationOfKind(symbol, 139 /* SetAccessor */); - var type; - // First try to see if the user specified a return type on the get-accessor. - var getterReturnType = getAnnotatedAccessorType(getter); - if (getterReturnType) { - type = getterReturnType; - } - else { - // If the user didn't specify a return type, try to use the set-accessor's parameter type. - var setterParameterType = getAnnotatedAccessorType(setter); - if (setterParameterType) { - type = setterParameterType; - } - else { - // If there are no specified types, try to infer it from the body of the get accessor if it exists. - if (getter && getter.body) { - type = getReturnTypeFromBody(getter); - } - else { - if (compilerOptions.noImplicitAny) { - error(setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation, symbolToString(symbol)); - } - type = anyType; - } - } - } - if (!popTypeResolution()) { - type = anyType; - if (compilerOptions.noImplicitAny) { - var getter_1 = ts.getDeclarationOfKind(symbol, 138 /* GetAccessor */); - error(getter_1, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol)); - } - } - links.type = type; - } - return links.type; - } - function getTypeOfFuncClassEnumModule(symbol) { - var links = getSymbolLinks(symbol); - if (!links.type) { - links.type = createObjectType(32768 /* Anonymous */, symbol); - } - return links.type; - } - function getTypeOfEnumMember(symbol) { - var links = getSymbolLinks(symbol); - if (!links.type) { - links.type = getDeclaredTypeOfEnum(getParentOfSymbol(symbol)); - } - return links.type; - } - function getTypeOfAlias(symbol) { - var links = getSymbolLinks(symbol); - if (!links.type) { - var targetSymbol = resolveAlias(symbol); - // It only makes sense to get the type of a value symbol. If the result of resolving - // the alias is not a value, then it has no type. To get the type associated with a - // type symbol, call getDeclaredTypeOfSymbol. - // This check is important because without it, a call to getTypeOfSymbol could end - // up recursively calling getTypeOfAlias, causing a stack overflow. - links.type = targetSymbol.flags & 107455 /* Value */ - ? getTypeOfSymbol(targetSymbol) - : unknownType; - } - return links.type; - } - function getTypeOfInstantiatedSymbol(symbol) { - var links = getSymbolLinks(symbol); - if (!links.type) { - links.type = instantiateType(getTypeOfSymbol(links.target), links.mapper); - } - return links.type; - } - function getTypeOfSymbol(symbol) { - if (symbol.flags & 16777216 /* Instantiated */) { - return getTypeOfInstantiatedSymbol(symbol); - } - if (symbol.flags & (3 /* Variable */ | 4 /* Property */)) { - return getTypeOfVariableOrParameterOrProperty(symbol); - } - if (symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 384 /* Enum */ | 512 /* ValueModule */)) { - return getTypeOfFuncClassEnumModule(symbol); - } - if (symbol.flags & 8 /* EnumMember */) { - return getTypeOfEnumMember(symbol); - } - if (symbol.flags & 98304 /* Accessor */) { - return getTypeOfAccessors(symbol); - } - if (symbol.flags & 8388608 /* Alias */) { - return getTypeOfAlias(symbol); - } - return unknownType; - } - function getTargetType(type) { - return type.flags & 4096 /* Reference */ ? type.target : type; - } - function hasBaseType(type, checkBase) { - return check(type); - function check(type) { - var target = getTargetType(type); - return target === checkBase || ts.forEach(getBaseTypes(target), check); - } - } - // Appends the type parameters given by a list of declarations to a set of type parameters and returns the resulting set. - // The function allocates a new array if the input type parameter set is undefined, but otherwise it modifies the set - // in-place and returns the same array. - function appendTypeParameters(typeParameters, declarations) { - for (var _i = 0; _i < declarations.length; _i++) { - var declaration = declarations[_i]; - var tp = getDeclaredTypeOfTypeParameter(getSymbolOfNode(declaration)); - if (!typeParameters) { - typeParameters = [tp]; - } - else if (!ts.contains(typeParameters, tp)) { - typeParameters.push(tp); - } - } - return typeParameters; - } - // Appends the outer type parameters of a node to a set of type parameters and returns the resulting set. The function - // allocates a new array if the input type parameter set is undefined, but otherwise it modifies the set in-place and - // returns the same array. - function appendOuterTypeParameters(typeParameters, node) { - while (true) { - node = node.parent; - if (!node) { - return typeParameters; - } - if (node.kind === 204 /* ClassDeclaration */ || node.kind === 203 /* FunctionDeclaration */ || - node.kind === 165 /* FunctionExpression */ || node.kind === 136 /* MethodDeclaration */ || - node.kind === 166 /* ArrowFunction */) { - var declarations = node.typeParameters; - if (declarations) { - return appendTypeParameters(appendOuterTypeParameters(typeParameters, node), declarations); - } - } - } - } - // The outer type parameters are those defined by enclosing generic classes, methods, or functions. - function getOuterTypeParametersOfClassOrInterface(symbol) { - var kind = symbol.flags & 32 /* Class */ ? 204 /* ClassDeclaration */ : 205 /* InterfaceDeclaration */; - return appendOuterTypeParameters(undefined, ts.getDeclarationOfKind(symbol, kind)); - } - // The local type parameters are the combined set of type parameters from all declarations of the class, - // interface, or type alias. - function getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) { - var result; - for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) { - var node = _a[_i]; - if (node.kind === 205 /* InterfaceDeclaration */ || node.kind === 204 /* ClassDeclaration */ || node.kind === 206 /* TypeAliasDeclaration */) { - var declaration = node; - if (declaration.typeParameters) { - result = appendTypeParameters(result, declaration.typeParameters); - } - } - } - return result; - } - // The full set of type parameters for a generic class or interface type consists of its outer type parameters plus - // its locally declared type parameters. - function getTypeParametersOfClassOrInterface(symbol) { - return ts.concatenate(getOuterTypeParametersOfClassOrInterface(symbol), getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol)); - } - function getBaseTypes(type) { - var typeWithBaseTypes = type; - if (!typeWithBaseTypes.baseTypes) { - if (type.symbol.flags & 32 /* Class */) { - resolveBaseTypesOfClass(typeWithBaseTypes); - } - else if (type.symbol.flags & 64 /* Interface */) { - resolveBaseTypesOfInterface(typeWithBaseTypes); - } - else { - ts.Debug.fail("type must be class or interface"); - } - } - return typeWithBaseTypes.baseTypes; - } - function resolveBaseTypesOfClass(type) { - type.baseTypes = []; - var declaration = ts.getDeclarationOfKind(type.symbol, 204 /* ClassDeclaration */); - var baseTypeNode = ts.getClassExtendsHeritageClauseElement(declaration); - if (baseTypeNode) { - var baseType = getTypeFromTypeNode(baseTypeNode); - if (baseType !== unknownType) { - if (getTargetType(baseType).flags & 1024 /* Class */) { - if (type !== baseType && !hasBaseType(baseType, type)) { - type.baseTypes.push(baseType); - } - else { - error(declaration, ts.Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString(type, undefined, 1 /* WriteArrayAsGenericType */)); - } - } - else { - error(baseTypeNode, ts.Diagnostics.A_class_may_only_extend_another_class); - } - } - } - } - function resolveBaseTypesOfInterface(type) { - type.baseTypes = []; - for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) { - var declaration = _a[_i]; - if (declaration.kind === 205 /* InterfaceDeclaration */ && ts.getInterfaceBaseTypeNodes(declaration)) { - for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) { - var node = _c[_b]; - var baseType = getTypeFromTypeNode(node); - if (baseType !== unknownType) { - if (getTargetType(baseType).flags & (1024 /* Class */ | 2048 /* Interface */)) { - if (type !== baseType && !hasBaseType(baseType, type)) { - type.baseTypes.push(baseType); - } - else { - error(declaration, ts.Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString(type, undefined, 1 /* WriteArrayAsGenericType */)); - } - } - else { - error(node, ts.Diagnostics.An_interface_may_only_extend_a_class_or_another_interface); - } - } - } - } - } - } - function getDeclaredTypeOfClassOrInterface(symbol) { - var links = getSymbolLinks(symbol); - if (!links.declaredType) { - var kind = symbol.flags & 32 /* Class */ ? 1024 /* Class */ : 2048 /* Interface */; - var type = links.declaredType = createObjectType(kind, symbol); - var outerTypeParameters = getOuterTypeParametersOfClassOrInterface(symbol); - var localTypeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); - if (outerTypeParameters || localTypeParameters) { - type.flags |= 4096 /* Reference */; - type.typeParameters = ts.concatenate(outerTypeParameters, localTypeParameters); - type.outerTypeParameters = outerTypeParameters; - type.localTypeParameters = localTypeParameters; - type.instantiations = {}; - type.instantiations[getTypeListId(type.typeParameters)] = type; - type.target = type; - type.typeArguments = type.typeParameters; - } - } - return links.declaredType; - } - function getDeclaredTypeOfTypeAlias(symbol) { - var links = getSymbolLinks(symbol); - if (!links.declaredType) { - // Note that we use the links object as the target here because the symbol object is used as the unique - // identity for resolution of the 'type' property in SymbolLinks. - if (!pushTypeResolution(links)) { - return unknownType; - } - var declaration = ts.getDeclarationOfKind(symbol, 206 /* TypeAliasDeclaration */); - var type = getTypeFromTypeNode(declaration.type); - if (popTypeResolution()) { - links.typeParameters = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol); - if (links.typeParameters) { - // Initialize the instantiation cache for generic type aliases. The declared type corresponds to - // an instantiation of the type alias with the type parameters supplied as type arguments. - links.instantiations = {}; - links.instantiations[getTypeListId(links.typeParameters)] = type; - } - } - else { - type = unknownType; - error(declaration.name, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol)); - } - links.declaredType = type; - } - return links.declaredType; - } - function getDeclaredTypeOfEnum(symbol) { - var links = getSymbolLinks(symbol); - if (!links.declaredType) { - var type = createType(128 /* Enum */); - type.symbol = symbol; - links.declaredType = type; - } - return links.declaredType; - } - function getDeclaredTypeOfTypeParameter(symbol) { - var links = getSymbolLinks(symbol); - if (!links.declaredType) { - var type = createType(512 /* TypeParameter */); - type.symbol = symbol; - if (!ts.getDeclarationOfKind(symbol, 130 /* TypeParameter */).constraint) { - type.constraint = noConstraintType; - } - links.declaredType = type; - } - return links.declaredType; - } - function getDeclaredTypeOfAlias(symbol) { - var links = getSymbolLinks(symbol); - if (!links.declaredType) { - links.declaredType = getDeclaredTypeOfSymbol(resolveAlias(symbol)); - } - return links.declaredType; - } - function getDeclaredTypeOfSymbol(symbol) { - ts.Debug.assert((symbol.flags & 16777216 /* Instantiated */) === 0); - if (symbol.flags & (32 /* Class */ | 64 /* Interface */)) { - return getDeclaredTypeOfClassOrInterface(symbol); - } - if (symbol.flags & 524288 /* TypeAlias */) { - return getDeclaredTypeOfTypeAlias(symbol); - } - if (symbol.flags & 384 /* Enum */) { - return getDeclaredTypeOfEnum(symbol); - } - if (symbol.flags & 262144 /* TypeParameter */) { - return getDeclaredTypeOfTypeParameter(symbol); - } - if (symbol.flags & 8388608 /* Alias */) { - return getDeclaredTypeOfAlias(symbol); - } - return unknownType; - } - function createSymbolTable(symbols) { - var result = {}; - for (var _i = 0; _i < symbols.length; _i++) { - var symbol = symbols[_i]; - result[symbol.name] = symbol; - } - return result; - } - function createInstantiatedSymbolTable(symbols, mapper) { - var result = {}; - for (var _i = 0; _i < symbols.length; _i++) { - var symbol = symbols[_i]; - result[symbol.name] = instantiateSymbol(symbol, mapper); - } - return result; - } - function addInheritedMembers(symbols, baseSymbols) { - for (var _i = 0; _i < baseSymbols.length; _i++) { - var s = baseSymbols[_i]; - if (!ts.hasProperty(symbols, s.name)) { - symbols[s.name] = s; - } - } - } - function addInheritedSignatures(signatures, baseSignatures) { - if (baseSignatures) { - for (var _i = 0; _i < baseSignatures.length; _i++) { - var signature = baseSignatures[_i]; - signatures.push(signature); - } - } - } - function resolveDeclaredMembers(type) { - if (!type.declaredProperties) { - var symbol = type.symbol; - type.declaredProperties = getNamedMembers(symbol.members); - type.declaredCallSignatures = getSignaturesOfSymbol(symbol.members["__call"]); - type.declaredConstructSignatures = getSignaturesOfSymbol(symbol.members["__new"]); - type.declaredStringIndexType = getIndexTypeOfSymbol(symbol, 0 /* String */); - type.declaredNumberIndexType = getIndexTypeOfSymbol(symbol, 1 /* Number */); - } - return type; - } - function resolveClassOrInterfaceMembers(type) { - var target = resolveDeclaredMembers(type); - var members = target.symbol.members; - var callSignatures = target.declaredCallSignatures; - var constructSignatures = target.declaredConstructSignatures; - var stringIndexType = target.declaredStringIndexType; - var numberIndexType = target.declaredNumberIndexType; - var baseTypes = getBaseTypes(target); - if (baseTypes.length) { - members = createSymbolTable(target.declaredProperties); - for (var _i = 0; _i < baseTypes.length; _i++) { - var baseType = baseTypes[_i]; - addInheritedMembers(members, getPropertiesOfObjectType(baseType)); - callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(baseType, 0 /* Call */)); - constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(baseType, 1 /* Construct */)); - stringIndexType = stringIndexType || getIndexTypeOfType(baseType, 0 /* String */); - numberIndexType = numberIndexType || getIndexTypeOfType(baseType, 1 /* Number */); - } - } - setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); - } - function resolveTypeReferenceMembers(type) { - var target = resolveDeclaredMembers(type.target); - var mapper = createTypeMapper(target.typeParameters, type.typeArguments); - var members = createInstantiatedSymbolTable(target.declaredProperties, mapper); - var callSignatures = instantiateList(target.declaredCallSignatures, mapper, instantiateSignature); - var constructSignatures = instantiateList(target.declaredConstructSignatures, mapper, instantiateSignature); - var stringIndexType = target.declaredStringIndexType ? instantiateType(target.declaredStringIndexType, mapper) : undefined; - var numberIndexType = target.declaredNumberIndexType ? instantiateType(target.declaredNumberIndexType, mapper) : undefined; - ts.forEach(getBaseTypes(target), function (baseType) { - var instantiatedBaseType = instantiateType(baseType, mapper); - addInheritedMembers(members, getPropertiesOfObjectType(instantiatedBaseType)); - callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, 0 /* Call */)); - constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, 1 /* Construct */)); - stringIndexType = stringIndexType || getIndexTypeOfType(instantiatedBaseType, 0 /* String */); - numberIndexType = numberIndexType || getIndexTypeOfType(instantiatedBaseType, 1 /* Number */); - }); - setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); - } - function createSignature(declaration, typeParameters, parameters, resolvedReturnType, typePredicate, minArgumentCount, hasRestParameter, hasStringLiterals) { - var sig = new Signature(checker); - sig.declaration = declaration; - sig.typeParameters = typeParameters; - sig.parameters = parameters; - sig.resolvedReturnType = resolvedReturnType; - sig.typePredicate = typePredicate; - sig.minArgumentCount = minArgumentCount; - sig.hasRestParameter = hasRestParameter; - sig.hasStringLiterals = hasStringLiterals; - return sig; - } - function cloneSignature(sig) { - return createSignature(sig.declaration, sig.typeParameters, sig.parameters, sig.resolvedReturnType, sig.typePredicate, sig.minArgumentCount, sig.hasRestParameter, sig.hasStringLiterals); - } - function getDefaultConstructSignatures(classType) { - var baseTypes = getBaseTypes(classType); - if (baseTypes.length) { - var baseType = baseTypes[0]; - var baseSignatures = getSignaturesOfType(getTypeOfSymbol(baseType.symbol), 1 /* Construct */); - return ts.map(baseSignatures, function (baseSignature) { - var signature = baseType.flags & 4096 /* Reference */ ? - getSignatureInstantiation(baseSignature, baseType.typeArguments) : cloneSignature(baseSignature); - signature.typeParameters = classType.localTypeParameters; - signature.resolvedReturnType = classType; - return signature; - }); - } - return [createSignature(undefined, classType.localTypeParameters, emptyArray, classType, undefined, 0, false, false)]; - } - function createTupleTypeMemberSymbols(memberTypes) { - var members = {}; - for (var i = 0; i < memberTypes.length; i++) { - var symbol = createSymbol(4 /* Property */ | 67108864 /* Transient */, "" + i); - symbol.type = memberTypes[i]; - members[i] = symbol; - } - return members; - } - function resolveTupleTypeMembers(type) { - var arrayType = resolveObjectOrUnionTypeMembers(createArrayType(getUnionType(type.elementTypes))); - var members = createTupleTypeMemberSymbols(type.elementTypes); - addInheritedMembers(members, arrayType.properties); - setObjectTypeMembers(type, members, arrayType.callSignatures, arrayType.constructSignatures, arrayType.stringIndexType, arrayType.numberIndexType); - } - function signatureListsIdentical(s, t) { - if (s.length !== t.length) { - return false; - } - for (var i = 0; i < s.length; i++) { - if (!compareSignatures(s[i], t[i], false, compareTypes)) { - return false; - } - } - return true; - } - // If the lists of call or construct signatures in the given types are all identical except for return types, - // and if none of the signatures are generic, return a list of signatures that has substitutes a union of the - // return types of the corresponding signatures in each resulting signature. - function getUnionSignatures(types, kind) { - var signatureLists = ts.map(types, function (t) { return getSignaturesOfType(t, kind); }); - var signatures = signatureLists[0]; - for (var _i = 0; _i < signatures.length; _i++) { - var signature = signatures[_i]; - if (signature.typeParameters) { - return emptyArray; - } - } - for (var i_1 = 1; i_1 < signatureLists.length; i_1++) { - if (!signatureListsIdentical(signatures, signatureLists[i_1])) { - return emptyArray; - } - } - var result = ts.map(signatures, cloneSignature); - for (var i = 0; i < result.length; i++) { - var s = result[i]; - // Clear resolved return type we possibly got from cloneSignature - s.resolvedReturnType = undefined; - s.unionSignatures = ts.map(signatureLists, function (signatures) { return signatures[i]; }); - } - return result; - } - function getUnionIndexType(types, kind) { - var indexTypes = []; - for (var _i = 0; _i < types.length; _i++) { - var type = types[_i]; - var indexType = getIndexTypeOfType(type, kind); - if (!indexType) { - return undefined; - } - indexTypes.push(indexType); - } - return getUnionType(indexTypes); - } - function resolveUnionTypeMembers(type) { - // The members and properties collections are empty for union types. To get all properties of a union - // type use getPropertiesOfType (only the language service uses this). - var callSignatures = getUnionSignatures(type.types, 0 /* Call */); - var constructSignatures = getUnionSignatures(type.types, 1 /* Construct */); - var stringIndexType = getUnionIndexType(type.types, 0 /* String */); - var numberIndexType = getUnionIndexType(type.types, 1 /* Number */); - setObjectTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexType, numberIndexType); - } - function resolveAnonymousTypeMembers(type) { - var symbol = type.symbol; - var members; - var callSignatures; - var constructSignatures; - var stringIndexType; - var numberIndexType; - if (symbol.flags & 2048 /* TypeLiteral */) { - members = symbol.members; - callSignatures = getSignaturesOfSymbol(members["__call"]); - constructSignatures = getSignaturesOfSymbol(members["__new"]); - stringIndexType = getIndexTypeOfSymbol(symbol, 0 /* String */); - numberIndexType = getIndexTypeOfSymbol(symbol, 1 /* Number */); - } - else { - // Combinations of function, class, enum and module - members = emptySymbols; - callSignatures = emptyArray; - constructSignatures = emptyArray; - if (symbol.flags & 1952 /* HasExports */) { - members = getExportsOfSymbol(symbol); - } - if (symbol.flags & (16 /* Function */ | 8192 /* Method */)) { - callSignatures = getSignaturesOfSymbol(symbol); - } - if (symbol.flags & 32 /* Class */) { - var classType = getDeclaredTypeOfClassOrInterface(symbol); - constructSignatures = getSignaturesOfSymbol(symbol.members["__constructor"]); - if (!constructSignatures.length) { - constructSignatures = getDefaultConstructSignatures(classType); - } - var baseTypes = getBaseTypes(classType); - if (baseTypes.length) { - members = createSymbolTable(getNamedMembers(members)); - addInheritedMembers(members, getPropertiesOfObjectType(getTypeOfSymbol(baseTypes[0].symbol))); - } - } - stringIndexType = undefined; - numberIndexType = (symbol.flags & 384 /* Enum */) ? stringType : undefined; - } - setObjectTypeMembers(type, members, callSignatures, constructSignatures, stringIndexType, numberIndexType); - } - function resolveObjectOrUnionTypeMembers(type) { - if (!type.members) { - if (type.flags & (1024 /* Class */ | 2048 /* Interface */)) { - resolveClassOrInterfaceMembers(type); - } - else if (type.flags & 32768 /* Anonymous */) { - resolveAnonymousTypeMembers(type); - } - else if (type.flags & 8192 /* Tuple */) { - resolveTupleTypeMembers(type); - } - else if (type.flags & 16384 /* Union */) { - resolveUnionTypeMembers(type); - } - else { - resolveTypeReferenceMembers(type); - } - } - return type; - } - // Return properties of an object type or an empty array for other types - function getPropertiesOfObjectType(type) { - if (type.flags & 48128 /* ObjectType */) { - return resolveObjectOrUnionTypeMembers(type).properties; - } - return emptyArray; - } - // If the given type is an object type and that type has a property by the given name, return - // the symbol for that property. Otherwise return undefined. - function getPropertyOfObjectType(type, name) { - if (type.flags & 48128 /* ObjectType */) { - var resolved = resolveObjectOrUnionTypeMembers(type); - if (ts.hasProperty(resolved.members, name)) { - var symbol = resolved.members[name]; - if (symbolIsValue(symbol)) { - return symbol; - } - } - } - } - function getPropertiesOfUnionType(type) { - var result = []; - ts.forEach(getPropertiesOfType(type.types[0]), function (prop) { - var unionProp = getPropertyOfUnionType(type, prop.name); - if (unionProp) { - result.push(unionProp); - } - }); - return result; - } - function getPropertiesOfType(type) { - type = getApparentType(type); - return type.flags & 16384 /* Union */ ? getPropertiesOfUnionType(type) : getPropertiesOfObjectType(type); - } - // For a type parameter, return the base constraint of the type parameter. For the string, number, - // boolean, and symbol primitive types, return the corresponding object types. Otherwise return the - // type itself. Note that the apparent type of a union type is the union type itself. - function getApparentType(type) { - if (type.flags & 16384 /* Union */) { - type = getReducedTypeOfUnionType(type); - } - if (type.flags & 512 /* TypeParameter */) { - do { - type = getConstraintOfTypeParameter(type); - } while (type && type.flags & 512 /* TypeParameter */); - if (!type) { - type = emptyObjectType; - } - } - if (type.flags & 258 /* StringLike */) { - type = globalStringType; - } - else if (type.flags & 132 /* NumberLike */) { - type = globalNumberType; - } - else if (type.flags & 8 /* Boolean */) { - type = globalBooleanType; - } - else if (type.flags & 2097152 /* ESSymbol */) { - type = globalESSymbolType; - } - return type; - } - function createUnionProperty(unionType, name) { - var types = unionType.types; - var props; - for (var _i = 0; _i < types.length; _i++) { - var current = types[_i]; - var type = getApparentType(current); - if (type !== unknownType) { - var prop = getPropertyOfType(type, name); - if (!prop || getDeclarationFlagsFromSymbol(prop) & (32 /* Private */ | 64 /* Protected */)) { - return undefined; - } - if (!props) { - props = [prop]; - } - else { - props.push(prop); - } - } - } - var propTypes = []; - var declarations = []; - for (var _a = 0; _a < props.length; _a++) { - var prop = props[_a]; - if (prop.declarations) { - declarations.push.apply(declarations, prop.declarations); - } - propTypes.push(getTypeOfSymbol(prop)); - } - var result = createSymbol(4 /* Property */ | 67108864 /* Transient */ | 268435456 /* UnionProperty */, name); - result.unionType = unionType; - result.declarations = declarations; - result.type = getUnionType(propTypes); - return result; - } - function getPropertyOfUnionType(type, name) { - var properties = type.resolvedProperties || (type.resolvedProperties = {}); - if (ts.hasProperty(properties, name)) { - return properties[name]; - } - var property = createUnionProperty(type, name); - if (property) { - properties[name] = property; - } - return property; - } - // Return the symbol for the property with the given name in the given type. Creates synthetic union properties when - // necessary, maps primitive types and type parameters are to their apparent types, and augments with properties from - // Object and Function as appropriate. - function getPropertyOfType(type, name) { - type = getApparentType(type); - if (type.flags & 48128 /* ObjectType */) { - var resolved = resolveObjectOrUnionTypeMembers(type); - if (ts.hasProperty(resolved.members, name)) { - var symbol = resolved.members[name]; - if (symbolIsValue(symbol)) { - return symbol; - } - } - if (resolved === anyFunctionType || resolved.callSignatures.length || resolved.constructSignatures.length) { - var symbol = getPropertyOfObjectType(globalFunctionType, name); - if (symbol) { - return symbol; - } - } - return getPropertyOfObjectType(globalObjectType, name); - } - if (type.flags & 16384 /* Union */) { - return getPropertyOfUnionType(type, name); - } - return undefined; - } - function getSignaturesOfObjectOrUnionType(type, kind) { - if (type.flags & (48128 /* ObjectType */ | 16384 /* Union */)) { - var resolved = resolveObjectOrUnionTypeMembers(type); - return kind === 0 /* Call */ ? resolved.callSignatures : resolved.constructSignatures; - } - return emptyArray; - } - // Return the signatures of the given kind in the given type. Creates synthetic union signatures when necessary and - // maps primitive types and type parameters are to their apparent types. - function getSignaturesOfType(type, kind) { - return getSignaturesOfObjectOrUnionType(getApparentType(type), kind); - } - function typeHasCallOrConstructSignatures(type) { - var apparentType = getApparentType(type); - if (apparentType.flags & (48128 /* ObjectType */ | 16384 /* Union */)) { - var resolved = resolveObjectOrUnionTypeMembers(type); - return resolved.callSignatures.length > 0 - || resolved.constructSignatures.length > 0; - } - return false; - } - function getIndexTypeOfObjectOrUnionType(type, kind) { - if (type.flags & (48128 /* ObjectType */ | 16384 /* Union */)) { - var resolved = resolveObjectOrUnionTypeMembers(type); - return kind === 0 /* String */ ? resolved.stringIndexType : resolved.numberIndexType; - } - } - // Return the index type of the given kind in the given type. Creates synthetic union index types when necessary and - // maps primitive types and type parameters are to their apparent types. - function getIndexTypeOfType(type, kind) { - return getIndexTypeOfObjectOrUnionType(getApparentType(type), kind); - } - // Return list of type parameters with duplicates removed (duplicate identifier errors are generated in the actual - // type checking functions). - function getTypeParametersFromDeclaration(typeParameterDeclarations) { - var result = []; - ts.forEach(typeParameterDeclarations, function (node) { - var tp = getDeclaredTypeOfTypeParameter(node.symbol); - if (!ts.contains(result, tp)) { - result.push(tp); - } - }); - return result; - } - function symbolsToArray(symbols) { - var result = []; - for (var id in symbols) { - if (!isReservedMemberName(id)) { - result.push(symbols[id]); - } - } - return result; - } - function isOptionalParameter(node) { - return ts.hasQuestionToken(node) || !!node.initializer; - } - function getSignatureFromDeclaration(declaration) { - var links = getNodeLinks(declaration); - if (!links.resolvedSignature) { - var classType = declaration.kind === 137 /* Constructor */ ? getDeclaredTypeOfClassOrInterface(declaration.parent.symbol) : undefined; - var typeParameters = classType ? classType.localTypeParameters : - declaration.typeParameters ? getTypeParametersFromDeclaration(declaration.typeParameters) : undefined; - var parameters = []; - var hasStringLiterals = false; - var minArgumentCount = -1; - for (var i = 0, n = declaration.parameters.length; i < n; i++) { - var param = declaration.parameters[i]; - parameters.push(param.symbol); - if (param.type && param.type.kind === 8 /* StringLiteral */) { - hasStringLiterals = true; - } - if (minArgumentCount < 0) { - if (param.initializer || param.questionToken || param.dotDotDotToken) { - minArgumentCount = i; - } - } - } - if (minArgumentCount < 0) { - minArgumentCount = declaration.parameters.length; - } - var returnType; - var typePredicate; - if (classType) { - returnType = classType; - } - else if (declaration.type) { - returnType = getTypeFromTypeNode(declaration.type); - if (declaration.type.kind === 143 /* TypePredicate */) { - var typePredicateNode = declaration.type; - typePredicate = { - parameterName: typePredicateNode.parameterName ? typePredicateNode.parameterName.text : undefined, - parameterIndex: typePredicateNode.parameterName ? getTypePredicateParameterIndex(declaration.parameters, typePredicateNode.parameterName) : undefined, - type: getTypeFromTypeNode(typePredicateNode.type) - }; - } - } - else { - // TypeScript 1.0 spec (April 2014): - // If only one accessor includes a type annotation, the other behaves as if it had the same type annotation. - if (declaration.kind === 138 /* GetAccessor */ && !ts.hasDynamicName(declaration)) { - var setter = ts.getDeclarationOfKind(declaration.symbol, 139 /* SetAccessor */); - returnType = getAnnotatedAccessorType(setter); - } - if (!returnType && ts.nodeIsMissing(declaration.body)) { - returnType = anyType; - } - } - links.resolvedSignature = createSignature(declaration, typeParameters, parameters, returnType, typePredicate, minArgumentCount, ts.hasRestParameter(declaration), hasStringLiterals); - } - return links.resolvedSignature; - } - function getSignaturesOfSymbol(symbol) { - if (!symbol) - return emptyArray; - var result = []; - for (var i = 0, len = symbol.declarations.length; i < len; i++) { - var node = symbol.declarations[i]; - switch (node.kind) { - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - case 203 /* FunctionDeclaration */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 142 /* IndexSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - // Don't include signature if node is the implementation of an overloaded function. A node is considered - // an implementation node if it has a body and the previous node is of the same kind and immediately - // precedes the implementation node (i.e. has the same parent and ends where the implementation starts). - if (i > 0 && node.body) { - var previous = symbol.declarations[i - 1]; - if (node.parent === previous.parent && node.kind === previous.kind && node.pos === previous.end) { - break; - } - } - result.push(getSignatureFromDeclaration(node)); - } - } - return result; - } - function getReturnTypeOfSignature(signature) { - if (!signature.resolvedReturnType) { - if (!pushTypeResolution(signature)) { - return unknownType; - } - var type; - if (signature.target) { - type = instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper); - } - else if (signature.unionSignatures) { - type = getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature)); - } - else { - type = getReturnTypeFromBody(signature.declaration); - } - if (!popTypeResolution()) { - type = anyType; - if (compilerOptions.noImplicitAny) { - var declaration = signature.declaration; - if (declaration.name) { - error(declaration.name, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, ts.declarationNameToString(declaration.name)); - } - else { - error(declaration, ts.Diagnostics.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions); - } - } - } - signature.resolvedReturnType = type; - } - return signature.resolvedReturnType; - } - function getRestTypeOfSignature(signature) { - if (signature.hasRestParameter) { - var type = getTypeOfSymbol(ts.lastOrUndefined(signature.parameters)); - if (type.flags & 4096 /* Reference */ && type.target === globalArrayType) { - return type.typeArguments[0]; - } - } - return anyType; - } - function getSignatureInstantiation(signature, typeArguments) { - return instantiateSignature(signature, createTypeMapper(signature.typeParameters, typeArguments), true); - } - function getErasedSignature(signature) { - if (!signature.typeParameters) - return signature; - if (!signature.erasedSignatureCache) { - if (signature.target) { - signature.erasedSignatureCache = instantiateSignature(getErasedSignature(signature.target), signature.mapper); - } - else { - signature.erasedSignatureCache = instantiateSignature(signature, createTypeEraser(signature.typeParameters), true); - } - } - return signature.erasedSignatureCache; - } - function getOrCreateTypeFromSignature(signature) { - // There are two ways to declare a construct signature, one is by declaring a class constructor - // using the constructor keyword, and the other is declaring a bare construct signature in an - // object type literal or interface (using the new keyword). Each way of declaring a constructor - // will result in a different declaration kind. - if (!signature.isolatedSignatureType) { - var isConstructor = signature.declaration.kind === 137 /* Constructor */ || signature.declaration.kind === 141 /* ConstructSignature */; - var type = createObjectType(32768 /* Anonymous */ | 131072 /* FromSignature */); - type.members = emptySymbols; - type.properties = emptyArray; - type.callSignatures = !isConstructor ? [signature] : emptyArray; - type.constructSignatures = isConstructor ? [signature] : emptyArray; - signature.isolatedSignatureType = type; - } - return signature.isolatedSignatureType; - } - function getIndexSymbol(symbol) { - return symbol.members["__index"]; - } - function getIndexDeclarationOfSymbol(symbol, kind) { - var syntaxKind = kind === 1 /* Number */ ? 121 /* NumberKeyword */ : 123 /* StringKeyword */; - var indexSymbol = getIndexSymbol(symbol); - if (indexSymbol) { - var len = indexSymbol.declarations.length; - for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) { - var decl = _a[_i]; - var node = decl; - if (node.parameters.length === 1) { - var parameter = node.parameters[0]; - if (parameter && parameter.type && parameter.type.kind === syntaxKind) { - return node; - } - } - } - } - return undefined; - } - function getIndexTypeOfSymbol(symbol, kind) { - var declaration = getIndexDeclarationOfSymbol(symbol, kind); - return declaration - ? declaration.type ? getTypeFromTypeNode(declaration.type) : anyType - : undefined; - } - function getConstraintOfTypeParameter(type) { - if (!type.constraint) { - if (type.target) { - var targetConstraint = getConstraintOfTypeParameter(type.target); - type.constraint = targetConstraint ? instantiateType(targetConstraint, type.mapper) : noConstraintType; - } - else { - type.constraint = getTypeFromTypeNode(ts.getDeclarationOfKind(type.symbol, 130 /* TypeParameter */).constraint); - } - } - return type.constraint === noConstraintType ? undefined : type.constraint; - } - function getParentSymbolOfTypeParameter(typeParameter) { - return getSymbolOfNode(ts.getDeclarationOfKind(typeParameter.symbol, 130 /* TypeParameter */).parent); - } - function getTypeListId(types) { - switch (types.length) { - case 1: - return "" + types[0].id; - case 2: - return types[0].id + "," + types[1].id; - default: - var result = ""; - for (var i = 0; i < types.length; i++) { - if (i > 0) { - result += ","; - } - result += types[i].id; - } - return result; - } - } - // This function is used to propagate widening flags when creating new object types references and union types. - // It is only necessary to do so if a constituent type might be the undefined type, the null type, or the type - // of an object literal (since those types have widening related information we need to track). - function getWideningFlagsOfTypes(types) { - var result = 0; - for (var _i = 0; _i < types.length; _i++) { - var type = types[_i]; - result |= type.flags; - } - return result & 1572864 /* RequiresWidening */; - } - function createTypeReference(target, typeArguments) { - var id = getTypeListId(typeArguments); - var type = target.instantiations[id]; - if (!type) { - var flags = 4096 /* Reference */ | getWideningFlagsOfTypes(typeArguments); - type = target.instantiations[id] = createObjectType(flags, target.symbol); - type.target = target; - type.typeArguments = typeArguments; - } - return type; - } - function isTypeParameterReferenceIllegalInConstraint(typeReferenceNode, typeParameterSymbol) { - var links = getNodeLinks(typeReferenceNode); - if (links.isIllegalTypeReferenceInConstraint !== undefined) { - return links.isIllegalTypeReferenceInConstraint; - } - // bubble up to the declaration - var currentNode = typeReferenceNode; - // forEach === exists - while (!ts.forEach(typeParameterSymbol.declarations, function (d) { return d.parent === currentNode.parent; })) { - currentNode = currentNode.parent; - } - // if last step was made from the type parameter this means that path has started somewhere in constraint which is illegal - links.isIllegalTypeReferenceInConstraint = currentNode.kind === 130 /* TypeParameter */; - return links.isIllegalTypeReferenceInConstraint; - } - function checkTypeParameterHasIllegalReferencesInConstraint(typeParameter) { - var typeParameterSymbol; - function check(n) { - if (n.kind === 144 /* TypeReference */ && n.typeName.kind === 65 /* Identifier */) { - var links = getNodeLinks(n); - if (links.isIllegalTypeReferenceInConstraint === undefined) { - var symbol = resolveName(typeParameter, n.typeName.text, 793056 /* Type */, undefined, undefined); - if (symbol && (symbol.flags & 262144 /* TypeParameter */)) { - // TypeScript 1.0 spec (April 2014): 3.4.1 - // Type parameters declared in a particular type parameter list - // may not be referenced in constraints in that type parameter list - // symbol.declaration.parent === typeParameter.parent - // -> typeParameter and symbol.declaration originate from the same type parameter list - // -> illegal for all declarations in symbol - // forEach === exists - links.isIllegalTypeReferenceInConstraint = ts.forEach(symbol.declarations, function (d) { return d.parent == typeParameter.parent; }); - } - } - if (links.isIllegalTypeReferenceInConstraint) { - error(typeParameter, ts.Diagnostics.Constraint_of_a_type_parameter_cannot_reference_any_type_parameter_from_the_same_type_parameter_list); - } - } - ts.forEachChild(n, check); - } - if (typeParameter.constraint) { - typeParameterSymbol = getSymbolOfNode(typeParameter); - check(typeParameter.constraint); - } - } - // Get type from reference to class or interface - function getTypeFromClassOrInterfaceReference(node, symbol) { - var type = getDeclaredTypeOfSymbol(symbol); - var typeParameters = type.localTypeParameters; - if (typeParameters) { - if (!node.typeArguments || node.typeArguments.length !== typeParameters.length) { - error(node, ts.Diagnostics.Generic_type_0_requires_1_type_argument_s, typeToString(type, undefined, 1 /* WriteArrayAsGenericType */), typeParameters.length); - return unknownType; - } - // In a type reference, the outer type parameters of the referenced class or interface are automatically - // supplied as type arguments and the type reference only specifies arguments for the local type parameters - // of the class or interface. - return createTypeReference(type, ts.concatenate(type.outerTypeParameters, ts.map(node.typeArguments, getTypeFromTypeNode))); - } - if (node.typeArguments) { - error(node, ts.Diagnostics.Type_0_is_not_generic, typeToString(type)); - return unknownType; - } - return type; - } - // Get type from reference to type alias. When a type alias is generic, the declared type of the type alias may include - // references to the type parameters of the alias. We replace those with the actual type arguments by instantiating the - // declared type. Instantiations are cached using the type identities of the type arguments as the key. - function getTypeFromTypeAliasReference(node, symbol) { - var type = getDeclaredTypeOfSymbol(symbol); - var links = getSymbolLinks(symbol); - var typeParameters = links.typeParameters; - if (typeParameters) { - if (!node.typeArguments || node.typeArguments.length !== typeParameters.length) { - error(node, ts.Diagnostics.Generic_type_0_requires_1_type_argument_s, symbolToString(symbol), typeParameters.length); - return unknownType; - } - var typeArguments = ts.map(node.typeArguments, getTypeFromTypeNode); - var id = getTypeListId(typeArguments); - return links.instantiations[id] || (links.instantiations[id] = instantiateType(type, createTypeMapper(typeParameters, typeArguments))); - } - if (node.typeArguments) { - error(node, ts.Diagnostics.Type_0_is_not_generic, symbolToString(symbol)); - return unknownType; - } - return type; - } - // Get type from reference to named type that cannot be generic (enum or type parameter) - function getTypeFromNonGenericTypeReference(node, symbol) { - if (symbol.flags & 262144 /* TypeParameter */ && isTypeParameterReferenceIllegalInConstraint(node, symbol)) { - // TypeScript 1.0 spec (April 2014): 3.4.1 - // Type parameters declared in a particular type parameter list - // may not be referenced in constraints in that type parameter list - // Implementation: such type references are resolved to 'unknown' type that usually denotes error - return unknownType; - } - if (node.typeArguments) { - error(node, ts.Diagnostics.Type_0_is_not_generic, symbolToString(symbol)); - return unknownType; - } - return getDeclaredTypeOfSymbol(symbol); - } - function getTypeFromTypeReference(node) { - var links = getNodeLinks(node); - if (!links.resolvedType) { - // We only support expressions that are simple qualified names. For other expressions this produces undefined. - var typeNameOrExpression = node.kind === 144 /* TypeReference */ ? node.typeName : - ts.isSupportedExpressionWithTypeArguments(node) ? node.expression : - undefined; - var symbol = typeNameOrExpression && resolveEntityName(typeNameOrExpression, 793056 /* Type */) || unknownSymbol; - var type = symbol === unknownSymbol ? unknownType : - symbol.flags & (32 /* Class */ | 64 /* Interface */) ? getTypeFromClassOrInterfaceReference(node, symbol) : - symbol.flags & 524288 /* TypeAlias */ ? getTypeFromTypeAliasReference(node, symbol) : - getTypeFromNonGenericTypeReference(node, symbol); - // Cache both the resolved symbol and the resolved type. The resolved symbol is needed in when we check the - // type reference in checkTypeReferenceOrExpressionWithTypeArguments. - links.resolvedSymbol = symbol; - links.resolvedType = type; - } - return links.resolvedType; - } - function getTypeFromTypeQueryNode(node) { - var links = getNodeLinks(node); - if (!links.resolvedType) { - // TypeScript 1.0 spec (April 2014): 3.6.3 - // The expression is processed as an identifier expression (section 4.3) - // or property access expression(section 4.10), - // the widened type(section 3.9) of which becomes the result. - links.resolvedType = getWidenedType(checkExpressionOrQualifiedName(node.exprName)); - } - return links.resolvedType; - } - function getTypeOfGlobalSymbol(symbol, arity) { - function getTypeDeclaration(symbol) { - var declarations = symbol.declarations; - for (var _i = 0; _i < declarations.length; _i++) { - var declaration = declarations[_i]; - switch (declaration.kind) { - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 207 /* EnumDeclaration */: - return declaration; - } - } - } - if (!symbol) { - return arity ? emptyGenericType : emptyObjectType; - } - var type = getDeclaredTypeOfSymbol(symbol); - if (!(type.flags & 48128 /* ObjectType */)) { - error(getTypeDeclaration(symbol), ts.Diagnostics.Global_type_0_must_be_a_class_or_interface_type, symbol.name); - return arity ? emptyGenericType : emptyObjectType; - } - if ((type.typeParameters ? type.typeParameters.length : 0) !== arity) { - error(getTypeDeclaration(symbol), ts.Diagnostics.Global_type_0_must_have_1_type_parameter_s, symbol.name, arity); - return arity ? emptyGenericType : emptyObjectType; - } - return type; - } - function getGlobalValueSymbol(name) { - return getGlobalSymbol(name, 107455 /* Value */, ts.Diagnostics.Cannot_find_global_value_0); - } - function getGlobalTypeSymbol(name) { - return getGlobalSymbol(name, 793056 /* Type */, ts.Diagnostics.Cannot_find_global_type_0); - } - function getGlobalSymbol(name, meaning, diagnostic) { - return resolveName(undefined, name, meaning, diagnostic, name); - } - function getGlobalType(name, arity) { - if (arity === void 0) { arity = 0; } - return getTypeOfGlobalSymbol(getGlobalTypeSymbol(name), arity); - } - function getGlobalESSymbolConstructorSymbol() { - return globalESSymbolConstructorSymbol || (globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol")); - } - /** - * Instantiates a global type that is generic with some element type, and returns that instantiation. - */ - function createTypeFromGenericGlobalType(genericGlobalType, elementType) { - return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, [elementType]) : emptyObjectType; - } - function createIterableType(elementType) { - return createTypeFromGenericGlobalType(globalIterableType, elementType); - } - function createIterableIteratorType(elementType) { - return createTypeFromGenericGlobalType(globalIterableIteratorType, elementType); - } - function createArrayType(elementType) { - return createTypeFromGenericGlobalType(globalArrayType, elementType); - } - function getTypeFromArrayTypeNode(node) { - var links = getNodeLinks(node); - if (!links.resolvedType) { - links.resolvedType = createArrayType(getTypeFromTypeNode(node.elementType)); - } - return links.resolvedType; - } - function createTupleType(elementTypes) { - var id = getTypeListId(elementTypes); - var type = tupleTypes[id]; - if (!type) { - type = tupleTypes[id] = createObjectType(8192 /* Tuple */); - type.elementTypes = elementTypes; - } - return type; - } - function getTypeFromTupleTypeNode(node) { - var links = getNodeLinks(node); - if (!links.resolvedType) { - links.resolvedType = createTupleType(ts.map(node.elementTypes, getTypeFromTypeNode)); - } - return links.resolvedType; - } - function addTypeToSortedSet(sortedSet, type) { - if (type.flags & 16384 /* Union */) { - addTypesToSortedSet(sortedSet, type.types); - } - else { - var i = 0; - var id = type.id; - while (i < sortedSet.length && sortedSet[i].id < id) { - i++; - } - if (i === sortedSet.length || sortedSet[i].id !== id) { - sortedSet.splice(i, 0, type); - } - } - } - function addTypesToSortedSet(sortedTypes, types) { - for (var _i = 0; _i < types.length; _i++) { - var type = types[_i]; - addTypeToSortedSet(sortedTypes, type); - } - } - function isSubtypeOfAny(candidate, types) { - for (var _i = 0; _i < types.length; _i++) { - var type = types[_i]; - if (candidate !== type && isTypeSubtypeOf(candidate, type)) { - return true; - } - } - return false; - } - function removeSubtypes(types) { - var i = types.length; - while (i > 0) { - i--; - if (isSubtypeOfAny(types[i], types)) { - types.splice(i, 1); - } - } - } - function containsTypeAny(types) { - for (var _i = 0; _i < types.length; _i++) { - var type = types[_i]; - if (isTypeAny(type)) { - return true; - } - } - return false; - } - function removeAllButLast(types, typeToRemove) { - var i = types.length; - while (i > 0 && types.length > 1) { - i--; - if (types[i] === typeToRemove) { - types.splice(i, 1); - } - } - } - // The noSubtypeReduction flag is there because it isn't possible to always do subtype reduction. The flag - // is true when creating a union type from a type node and when instantiating a union type. In both of those - // cases subtype reduction has to be deferred to properly support recursive union types. For example, a - // type alias of the form "type Item = string | (() => Item)" cannot be reduced during its declaration. - function getUnionType(types, noSubtypeReduction) { - if (types.length === 0) { - return emptyObjectType; - } - var sortedTypes = []; - addTypesToSortedSet(sortedTypes, types); - if (noSubtypeReduction) { - if (containsTypeAny(sortedTypes)) { - return anyType; - } - removeAllButLast(sortedTypes, undefinedType); - removeAllButLast(sortedTypes, nullType); - } - else { - removeSubtypes(sortedTypes); - } - if (sortedTypes.length === 1) { - return sortedTypes[0]; - } - var id = getTypeListId(sortedTypes); - var type = unionTypes[id]; - if (!type) { - type = unionTypes[id] = createObjectType(16384 /* Union */ | getWideningFlagsOfTypes(sortedTypes)); - type.types = sortedTypes; - type.reducedType = noSubtypeReduction ? undefined : type; - } - return type; - } - // Subtype reduction is basically an optimization we do to avoid excessively large union types, which take longer - // to process and look strange in quick info and error messages. Semantically there is no difference between the - // reduced type and the type itself. So, when we detect a circularity we simply say that the reduced type is the - // type itself. - function getReducedTypeOfUnionType(type) { - if (!type.reducedType) { - type.reducedType = circularType; - var reducedType = getUnionType(type.types, false); - if (type.reducedType === circularType) { - type.reducedType = reducedType; - } - } - else if (type.reducedType === circularType) { - type.reducedType = type; - } - return type.reducedType; - } - function getTypeFromUnionTypeNode(node) { - var links = getNodeLinks(node); - if (!links.resolvedType) { - links.resolvedType = getUnionType(ts.map(node.types, getTypeFromTypeNode), true); - } - return links.resolvedType; - } - function getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node) { - var links = getNodeLinks(node); - if (!links.resolvedType) { - // Deferred resolution of members is handled by resolveObjectTypeMembers - links.resolvedType = createObjectType(32768 /* Anonymous */, node.symbol); - } - return links.resolvedType; - } - function getStringLiteralType(node) { - if (ts.hasProperty(stringLiteralTypes, node.text)) { - return stringLiteralTypes[node.text]; - } - var type = stringLiteralTypes[node.text] = createType(256 /* StringLiteral */); - type.text = ts.getTextOfNode(node); - return type; - } - function getTypeFromStringLiteral(node) { - var links = getNodeLinks(node); - if (!links.resolvedType) { - links.resolvedType = getStringLiteralType(node); - } - return links.resolvedType; - } - function getTypeFromTypeNode(node) { - switch (node.kind) { - case 112 /* AnyKeyword */: - return anyType; - case 123 /* StringKeyword */: - return stringType; - case 121 /* NumberKeyword */: - return numberType; - case 113 /* BooleanKeyword */: - return booleanType; - case 124 /* SymbolKeyword */: - return esSymbolType; - case 99 /* VoidKeyword */: - return voidType; - case 8 /* StringLiteral */: - return getTypeFromStringLiteral(node); - case 144 /* TypeReference */: - return getTypeFromTypeReference(node); - case 143 /* TypePredicate */: - return booleanType; - case 179 /* ExpressionWithTypeArguments */: - return getTypeFromTypeReference(node); - case 147 /* TypeQuery */: - return getTypeFromTypeQueryNode(node); - case 149 /* ArrayType */: - return getTypeFromArrayTypeNode(node); - case 150 /* TupleType */: - return getTypeFromTupleTypeNode(node); - case 151 /* UnionType */: - return getTypeFromUnionTypeNode(node); - case 152 /* ParenthesizedType */: - return getTypeFromTypeNode(node.type); - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - case 148 /* TypeLiteral */: - return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - // This function assumes that an identifier or qualified name is a type expression - // Callers should first ensure this by calling isTypeNode - case 65 /* Identifier */: - case 128 /* QualifiedName */: - var symbol = getSymbolInfo(node); - return symbol && getDeclaredTypeOfSymbol(symbol); - default: - return unknownType; - } - } - function instantiateList(items, mapper, instantiator) { - if (items && items.length) { - var result = []; - for (var _i = 0; _i < items.length; _i++) { - var v = items[_i]; - result.push(instantiator(v, mapper)); - } - return result; - } - return items; - } - function createUnaryTypeMapper(source, target) { - return function (t) { return t === source ? target : t; }; - } - function createBinaryTypeMapper(source1, target1, source2, target2) { - return function (t) { return t === source1 ? target1 : t === source2 ? target2 : t; }; - } - function createTypeMapper(sources, targets) { - switch (sources.length) { - case 1: return createUnaryTypeMapper(sources[0], targets[0]); - case 2: return createBinaryTypeMapper(sources[0], targets[0], sources[1], targets[1]); - } - return function (t) { - for (var i = 0; i < sources.length; i++) { - if (t === sources[i]) { - return targets[i]; - } - } - return t; - }; - } - function createUnaryTypeEraser(source) { - return function (t) { return t === source ? anyType : t; }; - } - function createBinaryTypeEraser(source1, source2) { - return function (t) { return t === source1 || t === source2 ? anyType : t; }; - } - function createTypeEraser(sources) { - switch (sources.length) { - case 1: return createUnaryTypeEraser(sources[0]); - case 2: return createBinaryTypeEraser(sources[0], sources[1]); - } - return function (t) { - for (var _i = 0; _i < sources.length; _i++) { - var source = sources[_i]; - if (t === source) { - return anyType; - } - } - return t; - }; - } - function createInferenceMapper(context) { - return function (t) { - for (var i = 0; i < context.typeParameters.length; i++) { - if (t === context.typeParameters[i]) { - context.inferences[i].isFixed = true; - return getInferredType(context, i); - } - } - return t; - }; - } - function identityMapper(type) { - return type; - } - function combineTypeMappers(mapper1, mapper2) { - return function (t) { return instantiateType(mapper1(t), mapper2); }; - } - function instantiateTypeParameter(typeParameter, mapper) { - var result = createType(512 /* TypeParameter */); - result.symbol = typeParameter.symbol; - if (typeParameter.constraint) { - result.constraint = instantiateType(typeParameter.constraint, mapper); - } - else { - result.target = typeParameter; - result.mapper = mapper; - } - return result; - } - function instantiateSignature(signature, mapper, eraseTypeParameters) { - var freshTypeParameters; - var freshTypePredicate; - if (signature.typeParameters && !eraseTypeParameters) { - freshTypeParameters = instantiateList(signature.typeParameters, mapper, instantiateTypeParameter); - mapper = combineTypeMappers(createTypeMapper(signature.typeParameters, freshTypeParameters), mapper); - } - if (signature.typePredicate) { - freshTypePredicate = { - parameterName: signature.typePredicate.parameterName, - parameterIndex: signature.typePredicate.parameterIndex, - type: instantiateType(signature.typePredicate.type, mapper) - }; - } - var result = createSignature(signature.declaration, freshTypeParameters, instantiateList(signature.parameters, mapper, instantiateSymbol), signature.resolvedReturnType ? instantiateType(signature.resolvedReturnType, mapper) : undefined, freshTypePredicate, signature.minArgumentCount, signature.hasRestParameter, signature.hasStringLiterals); - result.target = signature; - result.mapper = mapper; - return result; - } - function instantiateSymbol(symbol, mapper) { - if (symbol.flags & 16777216 /* Instantiated */) { - var links = getSymbolLinks(symbol); - // If symbol being instantiated is itself a instantiation, fetch the original target and combine the - // type mappers. This ensures that original type identities are properly preserved and that aliases - // always reference a non-aliases. - symbol = links.target; - mapper = combineTypeMappers(links.mapper, mapper); - } - // Keep the flags from the symbol we're instantiating. Mark that is instantiated, and - // also transient so that we can just store data on it directly. - var result = createSymbol(16777216 /* Instantiated */ | 67108864 /* Transient */ | symbol.flags, symbol.name); - result.declarations = symbol.declarations; - result.parent = symbol.parent; - result.target = symbol; - result.mapper = mapper; - if (symbol.valueDeclaration) { - result.valueDeclaration = symbol.valueDeclaration; - } - return result; - } - function instantiateAnonymousType(type, mapper) { - // Mark the anonymous type as instantiated such that our infinite instantiation detection logic can recognize it - var result = createObjectType(32768 /* Anonymous */ | 65536 /* Instantiated */, type.symbol); - result.properties = instantiateList(getPropertiesOfObjectType(type), mapper, instantiateSymbol); - result.members = createSymbolTable(result.properties); - result.callSignatures = instantiateList(getSignaturesOfType(type, 0 /* Call */), mapper, instantiateSignature); - result.constructSignatures = instantiateList(getSignaturesOfType(type, 1 /* Construct */), mapper, instantiateSignature); - var stringIndexType = getIndexTypeOfType(type, 0 /* String */); - var numberIndexType = getIndexTypeOfType(type, 1 /* Number */); - if (stringIndexType) - result.stringIndexType = instantiateType(stringIndexType, mapper); - if (numberIndexType) - result.numberIndexType = instantiateType(numberIndexType, mapper); - return result; - } - function instantiateType(type, mapper) { - if (mapper !== identityMapper) { - if (type.flags & 512 /* TypeParameter */) { - return mapper(type); - } - if (type.flags & 32768 /* Anonymous */) { - return type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) ? - instantiateAnonymousType(type, mapper) : type; - } - if (type.flags & 4096 /* Reference */) { - return createTypeReference(type.target, instantiateList(type.typeArguments, mapper, instantiateType)); - } - if (type.flags & 8192 /* Tuple */) { - return createTupleType(instantiateList(type.elementTypes, mapper, instantiateType)); - } - if (type.flags & 16384 /* Union */) { - return getUnionType(instantiateList(type.types, mapper, instantiateType), true); - } - } - return type; - } - // Returns true if the given expression contains (at any level of nesting) a function or arrow expression - // that is subject to contextual typing. - function isContextSensitive(node) { - ts.Debug.assert(node.kind !== 136 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); - switch (node.kind) { - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - return isContextSensitiveFunctionLikeDeclaration(node); - case 157 /* ObjectLiteralExpression */: - return ts.forEach(node.properties, isContextSensitive); - case 156 /* ArrayLiteralExpression */: - return ts.forEach(node.elements, isContextSensitive); - case 173 /* ConditionalExpression */: - return isContextSensitive(node.whenTrue) || - isContextSensitive(node.whenFalse); - case 172 /* BinaryExpression */: - return node.operatorToken.kind === 49 /* BarBarToken */ && - (isContextSensitive(node.left) || isContextSensitive(node.right)); - case 227 /* PropertyAssignment */: - return isContextSensitive(node.initializer); - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - return isContextSensitiveFunctionLikeDeclaration(node); - case 164 /* ParenthesizedExpression */: - return isContextSensitive(node.expression); - } - return false; - } - function isContextSensitiveFunctionLikeDeclaration(node) { - return !node.typeParameters && node.parameters.length && !ts.forEach(node.parameters, function (p) { return p.type; }); - } - function getTypeWithoutConstructors(type) { - if (type.flags & 48128 /* ObjectType */) { - var resolved = resolveObjectOrUnionTypeMembers(type); - if (resolved.constructSignatures.length) { - var result = createObjectType(32768 /* Anonymous */, type.symbol); - result.members = resolved.members; - result.properties = resolved.properties; - result.callSignatures = resolved.callSignatures; - result.constructSignatures = emptyArray; - type = result; - } - } - return type; - } - // TYPE CHECKING - var subtypeRelation = {}; - var assignableRelation = {}; - var identityRelation = {}; - function isTypeIdenticalTo(source, target) { - return checkTypeRelatedTo(source, target, identityRelation, undefined); - } - function compareTypes(source, target) { - return checkTypeRelatedTo(source, target, identityRelation, undefined) ? -1 /* True */ : 0 /* False */; - } - function isTypeSubtypeOf(source, target) { - return checkTypeSubtypeOf(source, target, undefined); - } - function isTypeAssignableTo(source, target) { - return checkTypeAssignableTo(source, target, undefined); - } - function checkTypeSubtypeOf(source, target, errorNode, headMessage, containingMessageChain) { - return checkTypeRelatedTo(source, target, subtypeRelation, errorNode, headMessage, containingMessageChain); - } - function checkTypeAssignableTo(source, target, errorNode, headMessage) { - return checkTypeRelatedTo(source, target, assignableRelation, errorNode, headMessage); - } - function isSignatureAssignableTo(source, target) { - var sourceType = getOrCreateTypeFromSignature(source); - var targetType = getOrCreateTypeFromSignature(target); - return checkTypeRelatedTo(sourceType, targetType, assignableRelation, undefined); - } - function checkTypeRelatedTo(source, target, relation, errorNode, headMessage, containingMessageChain) { - var errorInfo; - var sourceStack; - var targetStack; - var maybeStack; - var expandingFlags; - var depth = 0; - var overflow = false; - var elaborateErrors = false; - ts.Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking"); - var result = isRelatedTo(source, target, errorNode !== undefined, headMessage); - if (overflow) { - error(errorNode, ts.Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); - } - else if (errorInfo) { - // If we already computed this relation, but in a context where we didn't want to report errors (e.g. overload resolution), - // then we'll only have a top-level error (e.g. 'Class X does not implement interface Y') without any details. If this happened, - // request a recompuation to get a complete error message. This will be skipped if we've already done this computation in a context - // where errors were being reported. - if (errorInfo.next === undefined) { - errorInfo = undefined; - elaborateErrors = true; - isRelatedTo(source, target, errorNode !== undefined, headMessage); - } - if (containingMessageChain) { - errorInfo = ts.concatenateDiagnosticMessageChains(containingMessageChain, errorInfo); - } - diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(errorNode, errorInfo)); - } - return result !== 0 /* False */; - function reportError(message, arg0, arg1, arg2) { - errorInfo = ts.chainDiagnosticMessages(errorInfo, message, arg0, arg1, arg2); - } - // Compare two types and return - // Ternary.True if they are related with no assumptions, - // Ternary.Maybe if they are related with assumptions of other relationships, or - // Ternary.False if they are not related. - function isRelatedTo(source, target, reportErrors, headMessage) { - var result; - // both types are the same - covers 'they are the same primitive type or both are Any' or the same type parameter cases - if (source === target) - return -1 /* True */; - if (relation !== identityRelation) { - if (isTypeAny(target)) - return -1 /* True */; - if (source === undefinedType) - return -1 /* True */; - if (source === nullType && target !== undefinedType) - return -1 /* True */; - if (source.flags & 128 /* Enum */ && target === numberType) - return -1 /* True */; - if (source.flags & 256 /* StringLiteral */ && target === stringType) - return -1 /* True */; - if (relation === assignableRelation) { - if (isTypeAny(source)) - return -1 /* True */; - if (source === numberType && target.flags & 128 /* Enum */) - return -1 /* True */; - } - } - var saveErrorInfo = errorInfo; - if (source.flags & 16384 /* Union */ || target.flags & 16384 /* Union */) { - if (relation === identityRelation) { - if (source.flags & 16384 /* Union */ && target.flags & 16384 /* Union */) { - if (result = unionTypeRelatedToUnionType(source, target)) { - if (result &= unionTypeRelatedToUnionType(target, source)) { - return result; - } - } - } - else if (source.flags & 16384 /* Union */) { - if (result = unionTypeRelatedToType(source, target, reportErrors)) { - return result; - } - } - else { - if (result = unionTypeRelatedToType(target, source, reportErrors)) { - return result; - } - } - } - else { - if (source.flags & 16384 /* Union */) { - if (result = unionTypeRelatedToType(source, target, reportErrors)) { - return result; - } - } - else { - if (result = typeRelatedToUnionType(source, target, reportErrors)) { - return result; - } - } - } - } - else if (source.flags & 512 /* TypeParameter */ && target.flags & 512 /* TypeParameter */) { - if (result = typeParameterRelatedTo(source, target, reportErrors)) { - return result; - } - } - else if (source.flags & 4096 /* Reference */ && target.flags & 4096 /* Reference */ && source.target === target.target) { - // We have type references to same target type, see if relationship holds for all type arguments - if (result = typesRelatedTo(source.typeArguments, target.typeArguments, reportErrors)) { - return result; - } - } - // Even if relationship doesn't hold for unions, type parameters, or generic type references, - // it may hold in a structural comparison. - // Report structural errors only if we haven't reported any errors yet - var reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo; - // identity relation does not use apparent type - var sourceOrApparentType = relation === identityRelation ? source : getApparentType(source); - if (sourceOrApparentType.flags & 48128 /* ObjectType */ && target.flags & 48128 /* ObjectType */) { - if (result = objectTypeRelatedTo(sourceOrApparentType, target, reportStructuralErrors)) { - errorInfo = saveErrorInfo; - return result; - } - } - else if (source.flags & 512 /* TypeParameter */ && sourceOrApparentType.flags & 16384 /* Union */) { - // We clear the errors first because the following check often gives a better error than - // the union comparison above if it is applicable. - errorInfo = saveErrorInfo; - if (result = isRelatedTo(sourceOrApparentType, target, reportErrors)) { - return result; - } - } - if (reportErrors) { - headMessage = headMessage || ts.Diagnostics.Type_0_is_not_assignable_to_type_1; - var sourceType = typeToString(source); - var targetType = typeToString(target); - if (sourceType === targetType) { - sourceType = typeToString(source, undefined, 128 /* UseFullyQualifiedType */); - targetType = typeToString(target, undefined, 128 /* UseFullyQualifiedType */); - } - reportError(headMessage, sourceType, targetType); - } - return 0 /* False */; - } - function unionTypeRelatedToUnionType(source, target) { - var result = -1 /* True */; - var sourceTypes = source.types; - for (var _i = 0; _i < sourceTypes.length; _i++) { - var sourceType = sourceTypes[_i]; - var related = typeRelatedToUnionType(sourceType, target, false); - if (!related) { - return 0 /* False */; - } - result &= related; - } - return result; - } - function typeRelatedToUnionType(source, target, reportErrors) { - var targetTypes = target.types; - for (var i = 0, len = targetTypes.length; i < len; i++) { - var related = isRelatedTo(source, targetTypes[i], reportErrors && i === len - 1); - if (related) { - return related; - } - } - return 0 /* False */; - } - function unionTypeRelatedToType(source, target, reportErrors) { - var result = -1 /* True */; - var sourceTypes = source.types; - for (var _i = 0; _i < sourceTypes.length; _i++) { - var sourceType = sourceTypes[_i]; - var related = isRelatedTo(sourceType, target, reportErrors); - if (!related) { - return 0 /* False */; - } - result &= related; - } - return result; - } - function typesRelatedTo(sources, targets, reportErrors) { - var result = -1 /* True */; - for (var i = 0, len = sources.length; i < len; i++) { - var related = isRelatedTo(sources[i], targets[i], reportErrors); - if (!related) { - return 0 /* False */; - } - result &= related; - } - return result; - } - function typeParameterRelatedTo(source, target, reportErrors) { - if (relation === identityRelation) { - if (source.symbol.name !== target.symbol.name) { - return 0 /* False */; - } - // covers case when both type parameters does not have constraint (both equal to noConstraintType) - if (source.constraint === target.constraint) { - return -1 /* True */; - } - if (source.constraint === noConstraintType || target.constraint === noConstraintType) { - return 0 /* False */; - } - return isRelatedTo(source.constraint, target.constraint, reportErrors); - } - else { - while (true) { - var constraint = getConstraintOfTypeParameter(source); - if (constraint === target) - return -1 /* True */; - if (!(constraint && constraint.flags & 512 /* TypeParameter */)) - break; - source = constraint; - } - return 0 /* False */; - } - } - // Determine if two object types are related by structure. First, check if the result is already available in the global cache. - // Second, check if we have already started a comparison of the given two types in which case we assume the result to be true. - // Third, check if both types are part of deeply nested chains of generic type instantiations and if so assume the types are - // equal and infinitely expanding. Fourth, if we have reached a depth of 100 nested comparisons, assume we have runaway recursion - // and issue an error. Otherwise, actually compare the structure of the two types. - function objectTypeRelatedTo(source, target, reportErrors) { - if (overflow) { - return 0 /* False */; - } - var id = relation !== identityRelation || source.id < target.id ? source.id + "," + target.id : target.id + "," + source.id; - var related = relation[id]; - //let related: RelationComparisonResult = undefined; // relation[id]; - if (related !== undefined) { - // If we computed this relation already and it was failed and reported, or if we're not being asked to elaborate - // errors, we can use the cached value. Otherwise, recompute the relation - if (!elaborateErrors || (related === 3 /* FailedAndReported */)) { - return related === 1 /* Succeeded */ ? -1 /* True */ : 0 /* False */; - } - } - if (depth > 0) { - for (var i = 0; i < depth; i++) { - // If source and target are already being compared, consider them related with assumptions - if (maybeStack[i][id]) { - return 1 /* Maybe */; - } - } - if (depth === 100) { - overflow = true; - return 0 /* False */; - } - } - else { - sourceStack = []; - targetStack = []; - maybeStack = []; - expandingFlags = 0; - } - sourceStack[depth] = source; - targetStack[depth] = target; - maybeStack[depth] = {}; - maybeStack[depth][id] = 1 /* Succeeded */; - depth++; - var saveExpandingFlags = expandingFlags; - if (!(expandingFlags & 1) && isDeeplyNestedGeneric(source, sourceStack, depth)) - expandingFlags |= 1; - if (!(expandingFlags & 2) && isDeeplyNestedGeneric(target, targetStack, depth)) - expandingFlags |= 2; - var result; - if (expandingFlags === 3) { - result = 1 /* Maybe */; - } - else { - result = propertiesRelatedTo(source, target, reportErrors); - if (result) { - result &= signaturesRelatedTo(source, target, 0 /* Call */, reportErrors); - if (result) { - result &= signaturesRelatedTo(source, target, 1 /* Construct */, reportErrors); - if (result) { - result &= stringIndexTypesRelatedTo(source, target, reportErrors); - if (result) { - result &= numberIndexTypesRelatedTo(source, target, reportErrors); - } - } - } - } - } - expandingFlags = saveExpandingFlags; - depth--; - if (result) { - var maybeCache = maybeStack[depth]; - // If result is definitely true, copy assumptions to global cache, else copy to next level up - var destinationCache = (result === -1 /* True */ || depth === 0) ? relation : maybeStack[depth - 1]; - ts.copyMap(maybeCache, destinationCache); - } - else { - // A false result goes straight into global cache (when something is false under assumptions it - // will also be false without assumptions) - relation[id] = reportErrors ? 3 /* FailedAndReported */ : 2 /* Failed */; - } - return result; - } - function propertiesRelatedTo(source, target, reportErrors) { - if (relation === identityRelation) { - return propertiesIdenticalTo(source, target); - } - var result = -1 /* True */; - var properties = getPropertiesOfObjectType(target); - var requireOptionalProperties = relation === subtypeRelation && !(source.flags & 262144 /* ObjectLiteral */); - for (var _i = 0; _i < properties.length; _i++) { - var targetProp = properties[_i]; - var sourceProp = getPropertyOfType(source, targetProp.name); - if (sourceProp !== targetProp) { - if (!sourceProp) { - if (!(targetProp.flags & 536870912 /* Optional */) || requireOptionalProperties) { - if (reportErrors) { - reportError(ts.Diagnostics.Property_0_is_missing_in_type_1, symbolToString(targetProp), typeToString(source)); - } - return 0 /* False */; - } - } - else if (!(targetProp.flags & 134217728 /* Prototype */)) { - var sourceFlags = getDeclarationFlagsFromSymbol(sourceProp); - var targetFlags = getDeclarationFlagsFromSymbol(targetProp); - if (sourceFlags & 32 /* Private */ || targetFlags & 32 /* Private */) { - if (sourceProp.valueDeclaration !== targetProp.valueDeclaration) { - if (reportErrors) { - if (sourceFlags & 32 /* Private */ && targetFlags & 32 /* Private */) { - reportError(ts.Diagnostics.Types_have_separate_declarations_of_a_private_property_0, symbolToString(targetProp)); - } - else { - reportError(ts.Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2, symbolToString(targetProp), typeToString(sourceFlags & 32 /* Private */ ? source : target), typeToString(sourceFlags & 32 /* Private */ ? target : source)); - } - } - return 0 /* False */; - } - } - else if (targetFlags & 64 /* Protected */) { - var sourceDeclaredInClass = sourceProp.parent && sourceProp.parent.flags & 32 /* Class */; - var sourceClass = sourceDeclaredInClass ? getDeclaredTypeOfSymbol(sourceProp.parent) : undefined; - var targetClass = getDeclaredTypeOfSymbol(targetProp.parent); - if (!sourceClass || !hasBaseType(sourceClass, targetClass)) { - if (reportErrors) { - reportError(ts.Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2, symbolToString(targetProp), typeToString(sourceClass || source), typeToString(targetClass)); - } - return 0 /* False */; - } - } - else if (sourceFlags & 64 /* Protected */) { - if (reportErrors) { - reportError(ts.Diagnostics.Property_0_is_protected_in_type_1_but_public_in_type_2, symbolToString(targetProp), typeToString(source), typeToString(target)); - } - return 0 /* False */; - } - var related = isRelatedTo(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp), reportErrors); - if (!related) { - if (reportErrors) { - reportError(ts.Diagnostics.Types_of_property_0_are_incompatible, symbolToString(targetProp)); - } - return 0 /* False */; - } - result &= related; - if (sourceProp.flags & 536870912 /* Optional */ && !(targetProp.flags & 536870912 /* Optional */)) { - // TypeScript 1.0 spec (April 2014): 3.8.3 - // S is a subtype of a type T, and T is a supertype of S if ... - // S' and T are object types and, for each member M in T.. - // M is a property and S' contains a property N where - // if M is a required property, N is also a required property - // (M - property in T) - // (N - property in S) - if (reportErrors) { - reportError(ts.Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2, symbolToString(targetProp), typeToString(source), typeToString(target)); - } - return 0 /* False */; - } - } - } - } - return result; - } - function propertiesIdenticalTo(source, target) { - var sourceProperties = getPropertiesOfObjectType(source); - var targetProperties = getPropertiesOfObjectType(target); - if (sourceProperties.length !== targetProperties.length) { - return 0 /* False */; - } - var result = -1 /* True */; - for (var _i = 0; _i < sourceProperties.length; _i++) { - var sourceProp = sourceProperties[_i]; - var targetProp = getPropertyOfObjectType(target, sourceProp.name); - if (!targetProp) { - return 0 /* False */; - } - var related = compareProperties(sourceProp, targetProp, isRelatedTo); - if (!related) { - return 0 /* False */; - } - result &= related; - } - return result; - } - function signaturesRelatedTo(source, target, kind, reportErrors) { - if (relation === identityRelation) { - return signaturesIdenticalTo(source, target, kind); - } - if (target === anyFunctionType || source === anyFunctionType) { - return -1 /* True */; - } - var sourceSignatures = getSignaturesOfType(source, kind); - var targetSignatures = getSignaturesOfType(target, kind); - var result = -1 /* True */; - var saveErrorInfo = errorInfo; - outer: for (var _i = 0; _i < targetSignatures.length; _i++) { - var t = targetSignatures[_i]; - if (!t.hasStringLiterals || target.flags & 131072 /* FromSignature */) { - var localErrors = reportErrors; - for (var _a = 0; _a < sourceSignatures.length; _a++) { - var s = sourceSignatures[_a]; - if (!s.hasStringLiterals || source.flags & 131072 /* FromSignature */) { - var related = signatureRelatedTo(s, t, localErrors); - if (related) { - result &= related; - errorInfo = saveErrorInfo; - continue outer; - } - // Only report errors from the first failure - localErrors = false; - } - } - return 0 /* False */; - } - } - return result; - } - function signatureRelatedTo(source, target, reportErrors) { - if (source === target) { - return -1 /* True */; - } - if (!target.hasRestParameter && source.minArgumentCount > target.parameters.length) { - return 0 /* False */; - } - var sourceMax = source.parameters.length; - var targetMax = target.parameters.length; - var checkCount; - if (source.hasRestParameter && target.hasRestParameter) { - checkCount = sourceMax > targetMax ? sourceMax : targetMax; - sourceMax--; - targetMax--; - } - else if (source.hasRestParameter) { - sourceMax--; - checkCount = targetMax; - } - else if (target.hasRestParameter) { - targetMax--; - checkCount = sourceMax; - } - else { - checkCount = sourceMax < targetMax ? sourceMax : targetMax; - } - // Spec 1.0 Section 3.8.3 & 3.8.4: - // M and N (the signatures) are instantiated using type Any as the type argument for all type parameters declared by M and N - source = getErasedSignature(source); - target = getErasedSignature(target); - var result = -1 /* True */; - for (var i = 0; i < checkCount; i++) { - var s_1 = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t_1 = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); - var saveErrorInfo = errorInfo; - var related = isRelatedTo(s_1, t_1, reportErrors); - if (!related) { - related = isRelatedTo(t_1, s_1, false); - if (!related) { - if (reportErrors) { - reportError(ts.Diagnostics.Types_of_parameters_0_and_1_are_incompatible, source.parameters[i < sourceMax ? i : sourceMax].name, target.parameters[i < targetMax ? i : targetMax].name); - } - return 0 /* False */; - } - errorInfo = saveErrorInfo; - } - result &= related; - } - if (source.typePredicate && target.typePredicate) { - var hasDifferentParameterIndex = source.typePredicate.parameterIndex !== target.typePredicate.parameterIndex; - var hasDifferentTypes; - if (hasDifferentParameterIndex || - (hasDifferentTypes = !isTypeIdenticalTo(source.typePredicate.type, target.typePredicate.type))) { - if (reportErrors) { - var sourceParamText = source.typePredicate.parameterName; - var targetParamText = target.typePredicate.parameterName; - var sourceTypeText = typeToString(source.typePredicate.type); - var targetTypeText = typeToString(target.typePredicate.type); - if (hasDifferentParameterIndex) { - reportError(ts.Diagnostics.Parameter_0_is_not_in_the_same_position_as_parameter_1, sourceParamText, targetParamText); - } - else if (hasDifferentTypes) { - reportError(ts.Diagnostics.Type_0_is_not_assignable_to_type_1, sourceTypeText, targetTypeText); - } - reportError(ts.Diagnostics.Type_predicate_0_is_not_assignable_to_1, sourceParamText + " is " + sourceTypeText, targetParamText + " is " + targetTypeText); - } - return 0 /* False */; - } - } - else if (!source.typePredicate && target.typePredicate) { - if (reportErrors) { - reportError(ts.Diagnostics.Signature_0_must_have_a_type_predicate, signatureToString(source)); - } - return 0 /* False */; - } - var t = getReturnTypeOfSignature(target); - if (t === voidType) - return result; - var s = getReturnTypeOfSignature(source); - return result & isRelatedTo(s, t, reportErrors); - } - function signaturesIdenticalTo(source, target, kind) { - var sourceSignatures = getSignaturesOfType(source, kind); - var targetSignatures = getSignaturesOfType(target, kind); - if (sourceSignatures.length !== targetSignatures.length) { - return 0 /* False */; - } - var result = -1 /* True */; - for (var i = 0, len = sourceSignatures.length; i < len; ++i) { - var related = compareSignatures(sourceSignatures[i], targetSignatures[i], true, isRelatedTo); - if (!related) { - return 0 /* False */; - } - result &= related; - } - return result; - } - function stringIndexTypesRelatedTo(source, target, reportErrors) { - if (relation === identityRelation) { - return indexTypesIdenticalTo(0 /* String */, source, target); - } - var targetType = getIndexTypeOfType(target, 0 /* String */); - if (targetType) { - var sourceType = getIndexTypeOfType(source, 0 /* String */); - if (!sourceType) { - if (reportErrors) { - reportError(ts.Diagnostics.Index_signature_is_missing_in_type_0, typeToString(source)); - } - return 0 /* False */; - } - var related = isRelatedTo(sourceType, targetType, reportErrors); - if (!related) { - if (reportErrors) { - reportError(ts.Diagnostics.Index_signatures_are_incompatible); - } - return 0 /* False */; - } - return related; - } - return -1 /* True */; - } - function numberIndexTypesRelatedTo(source, target, reportErrors) { - if (relation === identityRelation) { - return indexTypesIdenticalTo(1 /* Number */, source, target); - } - var targetType = getIndexTypeOfType(target, 1 /* Number */); - if (targetType) { - var sourceStringType = getIndexTypeOfType(source, 0 /* String */); - var sourceNumberType = getIndexTypeOfType(source, 1 /* Number */); - if (!(sourceStringType || sourceNumberType)) { - if (reportErrors) { - reportError(ts.Diagnostics.Index_signature_is_missing_in_type_0, typeToString(source)); - } - return 0 /* False */; - } - var related; - if (sourceStringType && sourceNumberType) { - // If we know for sure we're testing both string and numeric index types then only report errors from the second one - related = isRelatedTo(sourceStringType, targetType, false) || isRelatedTo(sourceNumberType, targetType, reportErrors); - } - else { - related = isRelatedTo(sourceStringType || sourceNumberType, targetType, reportErrors); - } - if (!related) { - if (reportErrors) { - reportError(ts.Diagnostics.Index_signatures_are_incompatible); - } - return 0 /* False */; - } - return related; - } - return -1 /* True */; - } - function indexTypesIdenticalTo(indexKind, source, target) { - var targetType = getIndexTypeOfType(target, indexKind); - var sourceType = getIndexTypeOfType(source, indexKind); - if (!sourceType && !targetType) { - return -1 /* True */; - } - if (sourceType && targetType) { - return isRelatedTo(sourceType, targetType); - } - return 0 /* False */; - } - } - // Return true if the given type is part of a deeply nested chain of generic instantiations. We consider this to be the case - // when structural type comparisons have been started for 10 or more instantiations of the same generic type. It is possible, - // though highly unlikely, for this test to be true in a situation where a chain of instantiations is not infinitely expanding. - // Effectively, we will generate a false positive when two types are structurally equal to at least 10 levels, but unequal at - // some level beyond that. - function isDeeplyNestedGeneric(type, stack, depth) { - // We track type references (created by createTypeReference) and instantiated types (created by instantiateType) - if (type.flags & (4096 /* Reference */ | 65536 /* Instantiated */) && depth >= 5) { - var symbol = type.symbol; - var count = 0; - for (var i = 0; i < depth; i++) { - var t = stack[i]; - if (t.flags & (4096 /* Reference */ | 65536 /* Instantiated */) && t.symbol === symbol) { - count++; - if (count >= 5) - return true; - } - } - } - return false; - } - function isPropertyIdenticalTo(sourceProp, targetProp) { - return compareProperties(sourceProp, targetProp, compareTypes) !== 0 /* False */; - } - function compareProperties(sourceProp, targetProp, compareTypes) { - // Two members are considered identical when - // - they are public properties with identical names, optionality, and types, - // - they are private or protected properties originating in the same declaration and having identical types - if (sourceProp === targetProp) { - return -1 /* True */; - } - var sourcePropAccessibility = getDeclarationFlagsFromSymbol(sourceProp) & (32 /* Private */ | 64 /* Protected */); - var targetPropAccessibility = getDeclarationFlagsFromSymbol(targetProp) & (32 /* Private */ | 64 /* Protected */); - if (sourcePropAccessibility !== targetPropAccessibility) { - return 0 /* False */; - } - if (sourcePropAccessibility) { - if (getTargetSymbol(sourceProp) !== getTargetSymbol(targetProp)) { - return 0 /* False */; - } - } - else { - if ((sourceProp.flags & 536870912 /* Optional */) !== (targetProp.flags & 536870912 /* Optional */)) { - return 0 /* False */; - } - } - return compareTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp)); - } - function compareSignatures(source, target, compareReturnTypes, compareTypes) { - if (source === target) { - return -1 /* True */; - } - if (source.parameters.length !== target.parameters.length || - source.minArgumentCount !== target.minArgumentCount || - source.hasRestParameter !== target.hasRestParameter) { - return 0 /* False */; - } - var result = -1 /* True */; - if (source.typeParameters && target.typeParameters) { - if (source.typeParameters.length !== target.typeParameters.length) { - return 0 /* False */; - } - for (var i = 0, len = source.typeParameters.length; i < len; ++i) { - var related = compareTypes(source.typeParameters[i], target.typeParameters[i]); - if (!related) { - return 0 /* False */; - } - result &= related; - } - } - else if (source.typeParameters || target.typeParameters) { - return 0 /* False */; - } - // Spec 1.0 Section 3.8.3 & 3.8.4: - // M and N (the signatures) are instantiated using type Any as the type argument for all type parameters declared by M and N - source = getErasedSignature(source); - target = getErasedSignature(target); - for (var i = 0, len = source.parameters.length; i < len; i++) { - var s = source.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(source) : getTypeOfSymbol(source.parameters[i]); - var t = target.hasRestParameter && i === len - 1 ? getRestTypeOfSignature(target) : getTypeOfSymbol(target.parameters[i]); - var related = compareTypes(s, t); - if (!related) { - return 0 /* False */; - } - result &= related; - } - if (compareReturnTypes) { - result &= compareTypes(getReturnTypeOfSignature(source), getReturnTypeOfSignature(target)); - } - return result; - } - function isSupertypeOfEach(candidate, types) { - for (var _i = 0; _i < types.length; _i++) { - var type = types[_i]; - if (candidate !== type && !isTypeSubtypeOf(type, candidate)) - return false; - } - return true; - } - function getCommonSupertype(types) { - return ts.forEach(types, function (t) { return isSupertypeOfEach(t, types) ? t : undefined; }); - } - function reportNoCommonSupertypeError(types, errorLocation, errorMessageChainHead) { - // The downfallType/bestSupertypeDownfallType is the first type that caused a particular candidate - // to not be the common supertype. So if it weren't for this one downfallType (and possibly others), - // the type in question could have been the common supertype. - var bestSupertype; - var bestSupertypeDownfallType; - var bestSupertypeScore = 0; - for (var i = 0; i < types.length; i++) { - var score = 0; - var downfallType = undefined; - for (var j = 0; j < types.length; j++) { - if (isTypeSubtypeOf(types[j], types[i])) { - score++; - } - else if (!downfallType) { - downfallType = types[j]; - } - } - ts.Debug.assert(!!downfallType, "If there is no common supertype, each type should have a downfallType"); - if (score > bestSupertypeScore) { - bestSupertype = types[i]; - bestSupertypeDownfallType = downfallType; - bestSupertypeScore = score; - } - // types.length - 1 is the maximum score, given that getCommonSupertype returned false - if (bestSupertypeScore === types.length - 1) { - break; - } - } - // In the following errors, the {1} slot is before the {0} slot because checkTypeSubtypeOf supplies the - // subtype as the first argument to the error - checkTypeSubtypeOf(bestSupertypeDownfallType, bestSupertype, errorLocation, ts.Diagnostics.Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0, errorMessageChainHead); - } - function isArrayType(type) { - return type.flags & 4096 /* Reference */ && type.target === globalArrayType; - } - function isArrayLikeType(type) { - // A type is array-like if it is not the undefined or null type and if it is assignable to any[] - return !(type.flags & (32 /* Undefined */ | 64 /* Null */)) && isTypeAssignableTo(type, anyArrayType); - } - function isTupleLikeType(type) { - return !!getPropertyOfType(type, "0"); - } - /** - * Check if a Type was written as a tuple type literal. - * Prefer using isTupleLikeType() unless the use of `elementTypes` is required. - */ - function isTupleType(type) { - return (type.flags & 8192 /* Tuple */) && !!type.elementTypes; - } - function getWidenedTypeOfObjectLiteral(type) { - var properties = getPropertiesOfObjectType(type); - var members = {}; - ts.forEach(properties, function (p) { - var propType = getTypeOfSymbol(p); - var widenedType = getWidenedType(propType); - if (propType !== widenedType) { - var symbol = createSymbol(p.flags | 67108864 /* Transient */, p.name); - symbol.declarations = p.declarations; - symbol.parent = p.parent; - symbol.type = widenedType; - symbol.target = p; - if (p.valueDeclaration) - symbol.valueDeclaration = p.valueDeclaration; - p = symbol; - } - members[p.name] = p; - }); - var stringIndexType = getIndexTypeOfType(type, 0 /* String */); - var numberIndexType = getIndexTypeOfType(type, 1 /* Number */); - if (stringIndexType) - stringIndexType = getWidenedType(stringIndexType); - if (numberIndexType) - numberIndexType = getWidenedType(numberIndexType); - return createAnonymousType(type.symbol, members, emptyArray, emptyArray, stringIndexType, numberIndexType); - } - function getWidenedType(type) { - if (type.flags & 1572864 /* RequiresWidening */) { - if (type.flags & (32 /* Undefined */ | 64 /* Null */)) { - return anyType; - } - if (type.flags & 262144 /* ObjectLiteral */) { - return getWidenedTypeOfObjectLiteral(type); - } - if (type.flags & 16384 /* Union */) { - return getUnionType(ts.map(type.types, getWidenedType)); - } - if (isArrayType(type)) { - return createArrayType(getWidenedType(type.typeArguments[0])); - } - } - return type; - } - function reportWideningErrorsInType(type) { - if (type.flags & 16384 /* Union */) { - var errorReported = false; - ts.forEach(type.types, function (t) { - if (reportWideningErrorsInType(t)) { - errorReported = true; - } - }); - return errorReported; - } - if (isArrayType(type)) { - return reportWideningErrorsInType(type.typeArguments[0]); - } - if (type.flags & 262144 /* ObjectLiteral */) { - var errorReported = false; - ts.forEach(getPropertiesOfObjectType(type), function (p) { - var t = getTypeOfSymbol(p); - if (t.flags & 524288 /* ContainsUndefinedOrNull */) { - if (!reportWideningErrorsInType(t)) { - error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, p.name, typeToString(getWidenedType(t))); - } - errorReported = true; - } - }); - return errorReported; - } - return false; - } - function reportImplicitAnyError(declaration, type) { - var typeAsString = typeToString(getWidenedType(type)); - var diagnostic; - switch (declaration.kind) { - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - diagnostic = ts.Diagnostics.Member_0_implicitly_has_an_1_type; - break; - case 131 /* Parameter */: - diagnostic = declaration.dotDotDotToken ? - ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : - ts.Diagnostics.Parameter_0_implicitly_has_an_1_type; - break; - case 203 /* FunctionDeclaration */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - if (!declaration.name) { - error(declaration, ts.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString); - return; - } - diagnostic = ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type; - break; - default: - diagnostic = ts.Diagnostics.Variable_0_implicitly_has_an_1_type; - } - error(declaration, diagnostic, ts.declarationNameToString(declaration.name), typeAsString); - } - function reportErrorsFromWidening(declaration, type) { - if (produceDiagnostics && compilerOptions.noImplicitAny && type.flags & 524288 /* ContainsUndefinedOrNull */) { - // Report implicit any error within type if possible, otherwise report error on declaration - if (!reportWideningErrorsInType(type)) { - reportImplicitAnyError(declaration, type); - } - } - } - function forEachMatchingParameterType(source, target, callback) { - var sourceMax = source.parameters.length; - var targetMax = target.parameters.length; - var count; - if (source.hasRestParameter && target.hasRestParameter) { - count = sourceMax > targetMax ? sourceMax : targetMax; - sourceMax--; - targetMax--; - } - else if (source.hasRestParameter) { - sourceMax--; - count = targetMax; - } - else if (target.hasRestParameter) { - targetMax--; - count = sourceMax; - } - else { - count = sourceMax < targetMax ? sourceMax : targetMax; - } - for (var i = 0; i < count; i++) { - var s = i < sourceMax ? getTypeOfSymbol(source.parameters[i]) : getRestTypeOfSignature(source); - var t = i < targetMax ? getTypeOfSymbol(target.parameters[i]) : getRestTypeOfSignature(target); - callback(s, t); - } - } - function createInferenceContext(typeParameters, inferUnionTypes) { - var inferences = []; - for (var _i = 0; _i < typeParameters.length; _i++) { - var unused = typeParameters[_i]; - inferences.push({ primary: undefined, secondary: undefined, isFixed: false }); - } - return { - typeParameters: typeParameters, - inferUnionTypes: inferUnionTypes, - inferences: inferences, - inferredTypes: new Array(typeParameters.length) - }; - } - function inferTypes(context, source, target) { - var sourceStack; - var targetStack; - var depth = 0; - var inferiority = 0; - inferFromTypes(source, target); - function isInProcess(source, target) { - for (var i = 0; i < depth; i++) { - if (source === sourceStack[i] && target === targetStack[i]) { - return true; - } - } - return false; - } - function inferFromTypes(source, target) { - if (source === anyFunctionType) { - return; - } - if (target.flags & 512 /* TypeParameter */) { - // If target is a type parameter, make an inference - var typeParameters = context.typeParameters; - for (var i = 0; i < typeParameters.length; i++) { - if (target === typeParameters[i]) { - var inferences = context.inferences[i]; - if (!inferences.isFixed) { - // Any inferences that are made to a type parameter in a union type are inferior - // to inferences made to a flat (non-union) type. This is because if we infer to - // T | string[], we really don't know if we should be inferring to T or not (because - // the correct constituent on the target side could be string[]). Therefore, we put - // such inferior inferences into a secondary bucket, and only use them if the primary - // bucket is empty. - var candidates = inferiority ? - inferences.secondary || (inferences.secondary = []) : - inferences.primary || (inferences.primary = []); - if (!ts.contains(candidates, source)) { - candidates.push(source); - } - } - return; - } - } - } - else if (source.flags & 4096 /* Reference */ && target.flags & 4096 /* Reference */ && source.target === target.target) { - // If source and target are references to the same generic type, infer from type arguments - var sourceTypes = source.typeArguments; - var targetTypes = target.typeArguments; - for (var i = 0; i < sourceTypes.length; i++) { - inferFromTypes(sourceTypes[i], targetTypes[i]); - } - } - else if (target.flags & 16384 /* Union */) { - var targetTypes = target.types; - var typeParameterCount = 0; - var typeParameter; - // First infer to each type in union that isn't a type parameter - for (var _i = 0; _i < targetTypes.length; _i++) { - var t = targetTypes[_i]; - if (t.flags & 512 /* TypeParameter */ && ts.contains(context.typeParameters, t)) { - typeParameter = t; - typeParameterCount++; - } - else { - inferFromTypes(source, t); - } - } - // If union contains a single naked type parameter, make a secondary inference to that type parameter - if (typeParameterCount === 1) { - inferiority++; - inferFromTypes(source, typeParameter); - inferiority--; - } - } - else if (source.flags & 16384 /* Union */) { - // Source is a union type, infer from each consituent type - var sourceTypes = source.types; - for (var _a = 0; _a < sourceTypes.length; _a++) { - var sourceType = sourceTypes[_a]; - inferFromTypes(sourceType, target); - } - } - else if (source.flags & 48128 /* ObjectType */ && (target.flags & (4096 /* Reference */ | 8192 /* Tuple */) || - (target.flags & 32768 /* Anonymous */) && target.symbol && target.symbol.flags & (8192 /* Method */ | 2048 /* TypeLiteral */))) { - // If source is an object type, and target is a type reference, a tuple type, the type of a method, or a type literal, infer from members - if (isInProcess(source, target)) { - return; - } - if (isDeeplyNestedGeneric(source, sourceStack, depth) && isDeeplyNestedGeneric(target, targetStack, depth)) { - return; - } - if (depth === 0) { - sourceStack = []; - targetStack = []; - } - sourceStack[depth] = source; - targetStack[depth] = target; - depth++; - inferFromProperties(source, target); - inferFromSignatures(source, target, 0 /* Call */); - inferFromSignatures(source, target, 1 /* Construct */); - inferFromIndexTypes(source, target, 0 /* String */, 0 /* String */); - inferFromIndexTypes(source, target, 1 /* Number */, 1 /* Number */); - inferFromIndexTypes(source, target, 0 /* String */, 1 /* Number */); - depth--; - } - } - function inferFromProperties(source, target) { - var properties = getPropertiesOfObjectType(target); - for (var _i = 0; _i < properties.length; _i++) { - var targetProp = properties[_i]; - var sourceProp = getPropertyOfObjectType(source, targetProp.name); - if (sourceProp) { - inferFromTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp)); - } - } - } - function inferFromSignatures(source, target, kind) { - var sourceSignatures = getSignaturesOfType(source, kind); - var targetSignatures = getSignaturesOfType(target, kind); - var sourceLen = sourceSignatures.length; - var targetLen = targetSignatures.length; - var len = sourceLen < targetLen ? sourceLen : targetLen; - for (var i = 0; i < len; i++) { - inferFromSignature(getErasedSignature(sourceSignatures[sourceLen - len + i]), getErasedSignature(targetSignatures[targetLen - len + i])); - } - } - function inferFromSignature(source, target) { - forEachMatchingParameterType(source, target, inferFromTypes); - if (source.typePredicate && target.typePredicate) { - if (target.typePredicate.parameterIndex === source.typePredicate.parameterIndex) { - // Return types from type predicates are treated as booleans. In order to infer types - // from type predicates we would need to infer using the type within the type predicate - // (i.e. 'Foo' from 'x is Foo'). - inferFromTypes(source.typePredicate.type, target.typePredicate.type); - } - } - else { - inferFromTypes(getReturnTypeOfSignature(source), getReturnTypeOfSignature(target)); - } - } - function inferFromIndexTypes(source, target, sourceKind, targetKind) { - var targetIndexType = getIndexTypeOfType(target, targetKind); - if (targetIndexType) { - var sourceIndexType = getIndexTypeOfType(source, sourceKind); - if (sourceIndexType) { - inferFromTypes(sourceIndexType, targetIndexType); - } - } - } - } - function getInferenceCandidates(context, index) { - var inferences = context.inferences[index]; - return inferences.primary || inferences.secondary || emptyArray; - } - function getInferredType(context, index) { - var inferredType = context.inferredTypes[index]; - var inferenceSucceeded; - if (!inferredType) { - var inferences = getInferenceCandidates(context, index); - if (inferences.length) { - // Infer widened union or supertype, or the unknown type for no common supertype - var unionOrSuperType = context.inferUnionTypes ? getUnionType(inferences) : getCommonSupertype(inferences); - inferredType = unionOrSuperType ? getWidenedType(unionOrSuperType) : unknownType; - inferenceSucceeded = !!unionOrSuperType; - } - else { - // Infer the empty object type when no inferences were made. It is important to remember that - // in this case, inference still succeeds, meaning there is no error for not having inference - // candidates. An inference error only occurs when there are *conflicting* candidates, i.e. - // candidates with no common supertype. - inferredType = emptyObjectType; - inferenceSucceeded = true; - } - // Only do the constraint check if inference succeeded (to prevent cascading errors) - if (inferenceSucceeded) { - var constraint = getConstraintOfTypeParameter(context.typeParameters[index]); - inferredType = constraint && !isTypeAssignableTo(inferredType, constraint) ? constraint : inferredType; - } - else if (context.failedTypeParameterIndex === undefined || context.failedTypeParameterIndex > index) { - // If inference failed, it is necessary to record the index of the failed type parameter (the one we are on). - // It might be that inference has already failed on a later type parameter on a previous call to inferTypeArguments. - // So if this failure is on preceding type parameter, this type parameter is the new failure index. - context.failedTypeParameterIndex = index; - } - context.inferredTypes[index] = inferredType; - } - return inferredType; - } - function getInferredTypes(context) { - for (var i = 0; i < context.inferredTypes.length; i++) { - getInferredType(context, i); - } - return context.inferredTypes; - } - function hasAncestor(node, kind) { - return ts.getAncestor(node, kind) !== undefined; - } - // EXPRESSION TYPE CHECKING - function getResolvedSymbol(node) { - var links = getNodeLinks(node); - if (!links.resolvedSymbol) { - links.resolvedSymbol = (!ts.nodeIsMissing(node) && resolveName(node, node.text, 107455 /* Value */ | 1048576 /* ExportValue */, ts.Diagnostics.Cannot_find_name_0, node)) || unknownSymbol; - } - return links.resolvedSymbol; - } - function isInTypeQuery(node) { - // TypeScript 1.0 spec (April 2014): 3.6.3 - // A type query consists of the keyword typeof followed by an expression. - // The expression is restricted to a single identifier or a sequence of identifiers separated by periods - while (node) { - switch (node.kind) { - case 147 /* TypeQuery */: - return true; - case 65 /* Identifier */: - case 128 /* QualifiedName */: - node = node.parent; - continue; - default: - return false; - } - } - ts.Debug.fail("should not get here"); - } - // For a union type, remove all constituent types that are of the given type kind (when isOfTypeKind is true) - // or not of the given type kind (when isOfTypeKind is false) - function removeTypesFromUnionType(type, typeKind, isOfTypeKind, allowEmptyUnionResult) { - if (type.flags & 16384 /* Union */) { - var types = type.types; - if (ts.forEach(types, function (t) { return !!(t.flags & typeKind) === isOfTypeKind; })) { - // Above we checked if we have anything to remove, now use the opposite test to do the removal - var narrowedType = getUnionType(ts.filter(types, function (t) { return !(t.flags & typeKind) === isOfTypeKind; })); - if (allowEmptyUnionResult || narrowedType !== emptyObjectType) { - return narrowedType; - } - } - } - else if (allowEmptyUnionResult && !!(type.flags & typeKind) === isOfTypeKind) { - // Use getUnionType(emptyArray) instead of emptyObjectType in case the way empty union types - // are represented ever changes. - return getUnionType(emptyArray); - } - return type; - } - function hasInitializer(node) { - return !!(node.initializer || ts.isBindingPattern(node.parent) && hasInitializer(node.parent.parent)); - } - // Check if a given variable is assigned within a given syntax node - function isVariableAssignedWithin(symbol, node) { - var links = getNodeLinks(node); - if (links.assignmentChecks) { - var cachedResult = links.assignmentChecks[symbol.id]; - if (cachedResult !== undefined) { - return cachedResult; - } - } - else { - links.assignmentChecks = {}; - } - return links.assignmentChecks[symbol.id] = isAssignedIn(node); - function isAssignedInBinaryExpression(node) { - if (node.operatorToken.kind >= 53 /* FirstAssignment */ && node.operatorToken.kind <= 64 /* LastAssignment */) { - var n = node.left; - while (n.kind === 164 /* ParenthesizedExpression */) { - n = n.expression; - } - if (n.kind === 65 /* Identifier */ && getResolvedSymbol(n) === symbol) { - return true; - } - } - return ts.forEachChild(node, isAssignedIn); - } - function isAssignedInVariableDeclaration(node) { - if (!ts.isBindingPattern(node.name) && getSymbolOfNode(node) === symbol && hasInitializer(node)) { - return true; - } - return ts.forEachChild(node, isAssignedIn); - } - function isAssignedIn(node) { - switch (node.kind) { - case 172 /* BinaryExpression */: - return isAssignedInBinaryExpression(node); - case 201 /* VariableDeclaration */: - case 155 /* BindingElement */: - return isAssignedInVariableDeclaration(node); - case 153 /* ObjectBindingPattern */: - case 154 /* ArrayBindingPattern */: - case 156 /* ArrayLiteralExpression */: - case 157 /* ObjectLiteralExpression */: - case 158 /* PropertyAccessExpression */: - case 159 /* ElementAccessExpression */: - case 160 /* CallExpression */: - case 161 /* NewExpression */: - case 163 /* TypeAssertionExpression */: - case 164 /* ParenthesizedExpression */: - case 170 /* PrefixUnaryExpression */: - case 167 /* DeleteExpression */: - case 168 /* TypeOfExpression */: - case 169 /* VoidExpression */: - case 171 /* PostfixUnaryExpression */: - case 173 /* ConditionalExpression */: - case 176 /* SpreadElementExpression */: - case 182 /* Block */: - case 183 /* VariableStatement */: - case 185 /* ExpressionStatement */: - case 186 /* IfStatement */: - case 187 /* DoStatement */: - case 188 /* WhileStatement */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 194 /* ReturnStatement */: - case 195 /* WithStatement */: - case 196 /* SwitchStatement */: - case 223 /* CaseClause */: - case 224 /* DefaultClause */: - case 197 /* LabeledStatement */: - case 198 /* ThrowStatement */: - case 199 /* TryStatement */: - case 226 /* CatchClause */: - return ts.forEachChild(node, isAssignedIn); - } - return false; - } - } - function resolveLocation(node) { - // Resolve location from top down towards node if it is a context sensitive expression - // That helps in making sure not assigning types as any when resolved out of order - var containerNodes = []; - for (var parent_5 = node.parent; parent_5; parent_5 = parent_5.parent) { - if ((ts.isExpression(parent_5) || ts.isObjectLiteralMethod(node)) && - isContextSensitive(parent_5)) { - containerNodes.unshift(parent_5); - } - } - ts.forEach(containerNodes, function (node) { getTypeOfNode(node); }); - } - function getSymbolAtLocation(node) { - resolveLocation(node); - return getSymbolInfo(node); - } - function getTypeAtLocation(node) { - resolveLocation(node); - return getTypeOfNode(node); - } - function getTypeOfSymbolAtLocation(symbol, node) { - resolveLocation(node); - // Get the narrowed type of symbol at given location instead of just getting - // the type of the symbol. - // eg. - // function foo(a: string | number) { - // if (typeof a === "string") { - // a/**/ - // } - // } - // getTypeOfSymbol for a would return type of parameter symbol string | number - // Unless we provide location /**/, checker wouldn't know how to narrow the type - // By using getNarrowedTypeOfSymbol would return string since it would be able to narrow - // it by typeguard in the if true condition - return getNarrowedTypeOfSymbol(symbol, node); - } - // Get the narrowed type of a given symbol at a given location - function getNarrowedTypeOfSymbol(symbol, node) { - var type = getTypeOfSymbol(symbol); - // Only narrow when symbol is variable of type any or an object, union, or type parameter type - if (node && symbol.flags & 3 /* Variable */) { - if (isTypeAny(type) || type.flags & (48128 /* ObjectType */ | 16384 /* Union */ | 512 /* TypeParameter */)) { - loop: while (node.parent) { - var child = node; - node = node.parent; - var narrowedType = type; - switch (node.kind) { - case 186 /* IfStatement */: - // In a branch of an if statement, narrow based on controlling expression - if (child !== node.expression) { - narrowedType = narrowType(type, node.expression, child === node.thenStatement); - } - break; - case 173 /* ConditionalExpression */: - // In a branch of a conditional expression, narrow based on controlling condition - if (child !== node.condition) { - narrowedType = narrowType(type, node.condition, child === node.whenTrue); - } - break; - case 172 /* BinaryExpression */: - // In the right operand of an && or ||, narrow based on left operand - if (child === node.right) { - if (node.operatorToken.kind === 48 /* AmpersandAmpersandToken */) { - narrowedType = narrowType(type, node.left, true); - } - else if (node.operatorToken.kind === 49 /* BarBarToken */) { - narrowedType = narrowType(type, node.left, false); - } - } - break; - case 230 /* SourceFile */: - case 208 /* ModuleDeclaration */: - case 203 /* FunctionDeclaration */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 137 /* Constructor */: - // Stop at the first containing function or module declaration - break loop; - } - // Use narrowed type if construct contains no assignments to variable - if (narrowedType !== type) { - if (isVariableAssignedWithin(symbol, node)) { - break; - } - type = narrowedType; - } - } - } - } - return type; - function narrowTypeByEquality(type, expr, assumeTrue) { - // Check that we have 'typeof ' on the left and string literal on the right - if (expr.left.kind !== 168 /* TypeOfExpression */ || expr.right.kind !== 8 /* StringLiteral */) { - return type; - } - var left = expr.left; - var right = expr.right; - if (left.expression.kind !== 65 /* Identifier */ || getResolvedSymbol(left.expression) !== symbol) { - return type; - } - var typeInfo = primitiveTypeInfo[right.text]; - if (expr.operatorToken.kind === 31 /* ExclamationEqualsEqualsToken */) { - assumeTrue = !assumeTrue; - } - if (assumeTrue) { - // Assumed result is true. If check was not for a primitive type, remove all primitive types - if (!typeInfo) { - return removeTypesFromUnionType(type, 258 /* StringLike */ | 132 /* NumberLike */ | 8 /* Boolean */ | 2097152 /* ESSymbol */, - /*isOfTypeKind*/ true, false); - } - // Check was for a primitive type, return that primitive type if it is a subtype - if (isTypeSubtypeOf(typeInfo.type, type)) { - return typeInfo.type; - } - // Otherwise, remove all types that aren't of the primitive type kind. This can happen when the type is - // union of enum types and other types. - return removeTypesFromUnionType(type, typeInfo.flags, false, false); - } - else { - // Assumed result is false. If check was for a primitive type, remove that primitive type - if (typeInfo) { - return removeTypesFromUnionType(type, typeInfo.flags, true, false); - } - // Otherwise we don't have enough information to do anything. - return type; - } - } - function narrowTypeByAnd(type, expr, assumeTrue) { - if (assumeTrue) { - // The assumed result is true, therefore we narrow assuming each operand to be true. - return narrowType(narrowType(type, expr.left, true), expr.right, true); - } - else { - // The assumed result is false. This means either the first operand was false, or the first operand was true - // and the second operand was false. We narrow with those assumptions and union the two resulting types. - return getUnionType([ - narrowType(type, expr.left, false), - narrowType(narrowType(type, expr.left, true), expr.right, false) - ]); - } - } - function narrowTypeByOr(type, expr, assumeTrue) { - if (assumeTrue) { - // The assumed result is true. This means either the first operand was true, or the first operand was false - // and the second operand was true. We narrow with those assumptions and union the two resulting types. - return getUnionType([ - narrowType(type, expr.left, true), - narrowType(narrowType(type, expr.left, false), expr.right, true) - ]); - } - else { - // The assumed result is false, therefore we narrow assuming each operand to be false. - return narrowType(narrowType(type, expr.left, false), expr.right, false); - } - } - function narrowTypeByInstanceof(type, expr, assumeTrue) { - // Check that type is not any, assumed result is true, and we have variable symbol on the left - if (isTypeAny(type) || !assumeTrue || expr.left.kind !== 65 /* Identifier */ || getResolvedSymbol(expr.left) !== symbol) { - return type; - } - // Check that right operand is a function type with a prototype property - var rightType = checkExpression(expr.right); - if (!isTypeSubtypeOf(rightType, globalFunctionType)) { - return type; - } - var targetType; - var prototypeProperty = getPropertyOfType(rightType, "prototype"); - if (prototypeProperty) { - // Target type is type of the prototype property - var prototypePropertyType = getTypeOfSymbol(prototypeProperty); - if (!isTypeAny(prototypePropertyType)) { - targetType = prototypePropertyType; - } - } - if (!targetType) { - // Target type is type of construct signature - var constructSignatures; - if (rightType.flags & 2048 /* Interface */) { - constructSignatures = resolveDeclaredMembers(rightType).declaredConstructSignatures; - } - else if (rightType.flags & 32768 /* Anonymous */) { - constructSignatures = getSignaturesOfType(rightType, 1 /* Construct */); - } - if (constructSignatures && constructSignatures.length) { - targetType = getUnionType(ts.map(constructSignatures, function (signature) { return getReturnTypeOfSignature(getErasedSignature(signature)); })); - } - } - if (targetType) { - return getNarrowedType(type, targetType); - } - return type; - } - function getNarrowedType(originalType, narrowedTypeCandidate) { - // Narrow to the target type if it's a subtype of the current type - if (isTypeSubtypeOf(narrowedTypeCandidate, originalType)) { - return narrowedTypeCandidate; - } - // If the current type is a union type, remove all constituents that aren't subtypes of the target. - if (originalType.flags & 16384 /* Union */) { - return getUnionType(ts.filter(originalType.types, function (t) { return isTypeSubtypeOf(t, narrowedTypeCandidate); })); - } - return originalType; - } - function narrowTypeByTypePredicate(type, expr, assumeTrue) { - if (type.flags & 1 /* Any */) { - return type; - } - var signature = getResolvedSignature(expr); - if (signature.typePredicate && - getSymbolAtLocation(expr.arguments[signature.typePredicate.parameterIndex]) === symbol) { - if (!assumeTrue) { - if (type.flags & 16384 /* Union */) { - return getUnionType(ts.filter(type.types, function (t) { return !isTypeSubtypeOf(t, signature.typePredicate.type); })); - } - return type; - } - return getNarrowedType(type, signature.typePredicate.type); - } - return type; - } - // Narrow the given type based on the given expression having the assumed boolean value. The returned type - // will be a subtype or the same type as the argument. - function narrowType(type, expr, assumeTrue) { - switch (expr.kind) { - case 160 /* CallExpression */: - return narrowTypeByTypePredicate(type, expr, assumeTrue); - case 164 /* ParenthesizedExpression */: - return narrowType(type, expr.expression, assumeTrue); - case 172 /* BinaryExpression */: - var operator = expr.operatorToken.kind; - if (operator === 30 /* EqualsEqualsEqualsToken */ || operator === 31 /* ExclamationEqualsEqualsToken */) { - return narrowTypeByEquality(type, expr, assumeTrue); - } - else if (operator === 48 /* AmpersandAmpersandToken */) { - return narrowTypeByAnd(type, expr, assumeTrue); - } - else if (operator === 49 /* BarBarToken */) { - return narrowTypeByOr(type, expr, assumeTrue); - } - else if (operator === 87 /* InstanceOfKeyword */) { - return narrowTypeByInstanceof(type, expr, assumeTrue); - } - break; - case 170 /* PrefixUnaryExpression */: - if (expr.operator === 46 /* ExclamationToken */) { - return narrowType(type, expr.operand, !assumeTrue); - } - break; - } - return type; - } - } - function checkIdentifier(node) { - var symbol = getResolvedSymbol(node); - // As noted in ECMAScript 6 language spec, arrow functions never have an arguments objects. - // Although in down-level emit of arrow function, we emit it using function expression which means that - // arguments objects will be bound to the inner object; emitting arrow function natively in ES6, arguments objects - // will be bound to non-arrow function that contain this arrow function. This results in inconsistent behavior. - // To avoid that we will give an error to users if they use arguments objects in arrow function so that they - // can explicitly bound arguments objects - if (symbol === argumentsSymbol && ts.getContainingFunction(node).kind === 166 /* ArrowFunction */ && languageVersion < 2 /* ES6 */) { - error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression); - } - if (symbol.flags & 8388608 /* Alias */ && !isInTypeQuery(node) && !isConstEnumOrConstEnumOnlyModule(resolveAlias(symbol))) { - markAliasSymbolAsReferenced(symbol); - } - checkCollisionWithCapturedSuperVariable(node, node); - checkCollisionWithCapturedThisVariable(node, node); - checkBlockScopedBindingCapturedInLoop(node, symbol); - return getNarrowedTypeOfSymbol(getExportSymbolOfValueSymbolIfExported(symbol), node); - } - function isInsideFunction(node, threshold) { - var current = node; - while (current && current !== threshold) { - if (ts.isFunctionLike(current)) { - return true; - } - current = current.parent; - } - return false; - } - function checkBlockScopedBindingCapturedInLoop(node, symbol) { - if (languageVersion >= 2 /* ES6 */ || - (symbol.flags & 2 /* BlockScopedVariable */) === 0 || - symbol.valueDeclaration.parent.kind === 226 /* CatchClause */) { - return; - } - // - check if binding is used in some function - // (stop the walk when reaching container of binding declaration) - // - if first check succeeded - check if variable is declared inside the loop - // nesting structure: - // (variable declaration or binding element) -> variable declaration list -> container - var container = symbol.valueDeclaration; - while (container.kind !== 202 /* VariableDeclarationList */) { - container = container.parent; - } - // get the parent of variable declaration list - container = container.parent; - if (container.kind === 183 /* VariableStatement */) { - // if parent is variable statement - get its parent - container = container.parent; - } - var inFunction = isInsideFunction(node.parent, container); - var current = container; - while (current && !ts.nodeStartsNewLexicalEnvironment(current)) { - if (isIterationStatement(current, false)) { - if (inFunction) { - grammarErrorOnFirstToken(current, ts.Diagnostics.Loop_contains_block_scoped_variable_0_referenced_by_a_function_in_the_loop_This_is_only_supported_in_ECMAScript_6_or_higher, ts.declarationNameToString(node)); - } - // mark value declaration so during emit they can have a special handling - getNodeLinks(symbol.valueDeclaration).flags |= 256 /* BlockScopedBindingInLoop */; - break; - } - current = current.parent; - } - } - function captureLexicalThis(node, container) { - var classNode = container.parent && container.parent.kind === 204 /* ClassDeclaration */ ? container.parent : undefined; - getNodeLinks(node).flags |= 2 /* LexicalThis */; - if (container.kind === 134 /* PropertyDeclaration */ || container.kind === 137 /* Constructor */) { - getNodeLinks(classNode).flags |= 4 /* CaptureThis */; - } - else { - getNodeLinks(container).flags |= 4 /* CaptureThis */; - } - } - function checkThisExpression(node) { - // Stop at the first arrow function so that we can - // tell whether 'this' needs to be captured. - var container = ts.getThisContainer(node, true); - var needToCaptureLexicalThis = false; - // Now skip arrow functions to get the "real" owner of 'this'. - if (container.kind === 166 /* ArrowFunction */) { - container = ts.getThisContainer(container, false); - // When targeting es6, arrow function lexically bind "this" so we do not need to do the work of binding "this" in emitted code - needToCaptureLexicalThis = (languageVersion < 2 /* ES6 */); - } - switch (container.kind) { - case 208 /* ModuleDeclaration */: - error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body); - // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks - break; - case 207 /* EnumDeclaration */: - error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location); - // do not return here so in case if lexical this is captured - it will be reflected in flags on NodeLinks - break; - case 137 /* Constructor */: - if (isInConstructorArgumentInitializer(node, container)) { - error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments); - } - break; - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - if (container.flags & 128 /* Static */) { - error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer); - } - break; - case 129 /* ComputedPropertyName */: - error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name); - break; - } - if (needToCaptureLexicalThis) { - captureLexicalThis(node, container); - } - var classNode = container.parent && container.parent.kind === 204 /* ClassDeclaration */ ? container.parent : undefined; - if (classNode) { - var symbol = getSymbolOfNode(classNode); - return container.flags & 128 /* Static */ ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol); - } - return anyType; - } - function isInConstructorArgumentInitializer(node, constructorDecl) { - for (var n = node; n && n !== constructorDecl; n = n.parent) { - if (n.kind === 131 /* Parameter */) { - return true; - } - } - return false; - } - function checkSuperExpression(node) { - var isCallExpression = node.parent.kind === 160 /* CallExpression */ && node.parent.expression === node; - var enclosingClass = ts.getAncestor(node, 204 /* ClassDeclaration */); - var baseClass; - if (enclosingClass && ts.getClassExtendsHeritageClauseElement(enclosingClass)) { - var classType = getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingClass)); - var baseTypes = getBaseTypes(classType); - baseClass = baseTypes.length && baseTypes[0]; - } - if (!baseClass) { - error(node, ts.Diagnostics.super_can_only_be_referenced_in_a_derived_class); - return unknownType; - } - var container = ts.getSuperContainer(node, true); - if (container) { - var canUseSuperExpression = false; - var needToCaptureLexicalThis; - if (isCallExpression) { - // TS 1.0 SPEC (April 2014): 4.8.1 - // Super calls are only permitted in constructors of derived classes - canUseSuperExpression = container.kind === 137 /* Constructor */; - } - else { - // TS 1.0 SPEC (April 2014) - // 'super' property access is allowed - // - In a constructor, instance member function, instance member accessor, or instance member variable initializer where this references a derived class instance - // - In a static member function or static member accessor - // super property access might appear in arrow functions with arbitrary deep nesting - needToCaptureLexicalThis = false; - while (container && container.kind === 166 /* ArrowFunction */) { - container = ts.getSuperContainer(container, true); - needToCaptureLexicalThis = languageVersion < 2 /* ES6 */; - } - // topmost container must be something that is directly nested in the class declaration - if (container && container.parent && container.parent.kind === 204 /* ClassDeclaration */) { - if (container.flags & 128 /* Static */) { - canUseSuperExpression = - container.kind === 136 /* MethodDeclaration */ || - container.kind === 135 /* MethodSignature */ || - container.kind === 138 /* GetAccessor */ || - container.kind === 139 /* SetAccessor */; - } - else { - canUseSuperExpression = - container.kind === 136 /* MethodDeclaration */ || - container.kind === 135 /* MethodSignature */ || - container.kind === 138 /* GetAccessor */ || - container.kind === 139 /* SetAccessor */ || - container.kind === 134 /* PropertyDeclaration */ || - container.kind === 133 /* PropertySignature */ || - container.kind === 137 /* Constructor */; - } - } - } - if (canUseSuperExpression) { - var returnType; - if ((container.flags & 128 /* Static */) || isCallExpression) { - getNodeLinks(node).flags |= 32 /* SuperStatic */; - returnType = getTypeOfSymbol(baseClass.symbol); - } - else { - getNodeLinks(node).flags |= 16 /* SuperInstance */; - returnType = baseClass; - } - if (container.kind === 137 /* Constructor */ && isInConstructorArgumentInitializer(node, container)) { - // issue custom error message for super property access in constructor arguments (to be aligned with old compiler) - error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments); - returnType = unknownType; - } - if (!isCallExpression && needToCaptureLexicalThis) { - // call expressions are allowed only in constructors so they should always capture correct 'this' - // super property access expressions can also appear in arrow functions - - // in this case they should also use correct lexical this - captureLexicalThis(node.parent, container); - } - return returnType; - } - } - if (container && container.kind === 129 /* ComputedPropertyName */) { - error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name); - } - else if (isCallExpression) { - error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors); - } - else { - error(node, ts.Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class); - } - return unknownType; - } - // Return contextual type of parameter or undefined if no contextual type is available - function getContextuallyTypedParameterType(parameter) { - if (isFunctionExpressionOrArrowFunction(parameter.parent)) { - var func = parameter.parent; - if (isContextSensitive(func)) { - var contextualSignature = getContextualSignature(func); - if (contextualSignature) { - var funcHasRestParameters = ts.hasRestParameter(func); - var len = func.parameters.length - (funcHasRestParameters ? 1 : 0); - var indexOfParameter = ts.indexOf(func.parameters, parameter); - if (indexOfParameter < len) { - return getTypeAtPosition(contextualSignature, indexOfParameter); - } - // If last parameter is contextually rest parameter get its type - if (indexOfParameter === (func.parameters.length - 1) && - funcHasRestParameters && contextualSignature.hasRestParameter && func.parameters.length >= contextualSignature.parameters.length) { - return getTypeOfSymbol(ts.lastOrUndefined(contextualSignature.parameters)); - } - } - } - } - return undefined; - } - // In a variable, parameter or property declaration with a type annotation, the contextual type of an initializer - // expression is the type of the variable, parameter or property. Otherwise, in a parameter declaration of a - // contextually typed function expression, the contextual type of an initializer expression is the contextual type - // of the parameter. Otherwise, in a variable or parameter declaration with a binding pattern name, the contextual - // type of an initializer expression is the type implied by the binding pattern. - function getContextualTypeForInitializerExpression(node) { - var declaration = node.parent; - if (node === declaration.initializer) { - if (declaration.type) { - return getTypeFromTypeNode(declaration.type); - } - if (declaration.kind === 131 /* Parameter */) { - var type = getContextuallyTypedParameterType(declaration); - if (type) { - return type; - } - } - if (ts.isBindingPattern(declaration.name)) { - return getTypeFromBindingPattern(declaration.name); - } - } - return undefined; - } - function getContextualTypeForReturnExpression(node) { - var func = ts.getContainingFunction(node); - if (func && !func.asteriskToken) { - return getContextualReturnType(func); - } - return undefined; - } - function getContextualTypeForYieldOperand(node) { - var func = ts.getContainingFunction(node); - if (func) { - var contextualReturnType = getContextualReturnType(func); - if (contextualReturnType) { - return node.asteriskToken - ? contextualReturnType - : getElementTypeOfIterableIterator(contextualReturnType); - } - } - return undefined; - } - function getContextualReturnType(functionDecl) { - // If the containing function has a return type annotation, is a constructor, or is a get accessor whose - // corresponding set accessor has a type annotation, return statements in the function are contextually typed - if (functionDecl.type || - functionDecl.kind === 137 /* Constructor */ || - functionDecl.kind === 138 /* GetAccessor */ && getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(functionDecl.symbol, 139 /* SetAccessor */))) { - return getReturnTypeOfSignature(getSignatureFromDeclaration(functionDecl)); - } - // Otherwise, if the containing function is contextually typed by a function type with exactly one call signature - // and that call signature is non-generic, return statements are contextually typed by the return type of the signature - var signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl); - if (signature) { - return getReturnTypeOfSignature(signature); - } - return undefined; - } - // In a typed function call, an argument or substitution expression is contextually typed by the type of the corresponding parameter. - function getContextualTypeForArgument(callTarget, arg) { - var args = getEffectiveCallArguments(callTarget); - var argIndex = ts.indexOf(args, arg); - if (argIndex >= 0) { - var signature = getResolvedSignature(callTarget); - return getTypeAtPosition(signature, argIndex); - } - return undefined; - } - function getContextualTypeForSubstitutionExpression(template, substitutionExpression) { - if (template.parent.kind === 162 /* TaggedTemplateExpression */) { - return getContextualTypeForArgument(template.parent, substitutionExpression); - } - return undefined; - } - function getContextualTypeForBinaryOperand(node) { - var binaryExpression = node.parent; - var operator = binaryExpression.operatorToken.kind; - if (operator >= 53 /* FirstAssignment */ && operator <= 64 /* LastAssignment */) { - // In an assignment expression, the right operand is contextually typed by the type of the left operand. - if (node === binaryExpression.right) { - return checkExpression(binaryExpression.left); - } - } - else if (operator === 49 /* BarBarToken */) { - // When an || expression has a contextual type, the operands are contextually typed by that type. When an || - // expression has no contextual type, the right operand is contextually typed by the type of the left operand. - var type = getContextualType(binaryExpression); - if (!type && node === binaryExpression.right) { - type = checkExpression(binaryExpression.left); - } - return type; - } - return undefined; - } - // Apply a mapping function to a contextual type and return the resulting type. If the contextual type - // is a union type, the mapping function is applied to each constituent type and a union of the resulting - // types is returned. - function applyToContextualType(type, mapper) { - if (!(type.flags & 16384 /* Union */)) { - return mapper(type); - } - var types = type.types; - var mappedType; - var mappedTypes; - for (var _i = 0; _i < types.length; _i++) { - var current = types[_i]; - var t = mapper(current); - if (t) { - if (!mappedType) { - mappedType = t; - } - else if (!mappedTypes) { - mappedTypes = [mappedType, t]; - } - else { - mappedTypes.push(t); - } - } - } - return mappedTypes ? getUnionType(mappedTypes) : mappedType; - } - function getTypeOfPropertyOfContextualType(type, name) { - return applyToContextualType(type, function (t) { - var prop = getPropertyOfObjectType(t, name); - return prop ? getTypeOfSymbol(prop) : undefined; - }); - } - function getIndexTypeOfContextualType(type, kind) { - return applyToContextualType(type, function (t) { return getIndexTypeOfObjectOrUnionType(t, kind); }); - } - // Return true if the given contextual type is a tuple-like type - function contextualTypeIsTupleLikeType(type) { - return !!(type.flags & 16384 /* Union */ ? ts.forEach(type.types, isTupleLikeType) : isTupleLikeType(type)); - } - // Return true if the given contextual type provides an index signature of the given kind - function contextualTypeHasIndexSignature(type, kind) { - return !!(type.flags & 16384 /* Union */ ? ts.forEach(type.types, function (t) { return getIndexTypeOfObjectOrUnionType(t, kind); }) : getIndexTypeOfObjectOrUnionType(type, kind)); - } - // In an object literal contextually typed by a type T, the contextual type of a property assignment is the type of - // the matching property in T, if one exists. Otherwise, it is the type of the numeric index signature in T, if one - // exists. Otherwise, it is the type of the string index signature in T, if one exists. - function getContextualTypeForObjectLiteralMethod(node) { - ts.Debug.assert(ts.isObjectLiteralMethod(node)); - if (isInsideWithStatementBody(node)) { - // We cannot answer semantic questions within a with block, do not proceed any further - return undefined; - } - return getContextualTypeForObjectLiteralElement(node); - } - function getContextualTypeForObjectLiteralElement(element) { - var objectLiteral = element.parent; - var type = getContextualType(objectLiteral); - if (type) { - if (!ts.hasDynamicName(element)) { - // For a (non-symbol) computed property, there is no reason to look up the name - // in the type. It will just be "__computed", which does not appear in any - // SymbolTable. - var symbolName = getSymbolOfNode(element).name; - var propertyType = getTypeOfPropertyOfContextualType(type, symbolName); - if (propertyType) { - return propertyType; - } - } - return isNumericName(element.name) && getIndexTypeOfContextualType(type, 1 /* Number */) || - getIndexTypeOfContextualType(type, 0 /* String */); - } - return undefined; - } - // In an array literal contextually typed by a type T, the contextual type of an element expression at index N is - // the type of the property with the numeric name N in T, if one exists. Otherwise, if T has a numeric index signature, - // it is the type of the numeric index signature in T. Otherwise, in ES6 and higher, the contextual type is the iterated - // type of T. - function getContextualTypeForElementExpression(node) { - var arrayLiteral = node.parent; - var type = getContextualType(arrayLiteral); - if (type) { - var index = ts.indexOf(arrayLiteral.elements, node); - return getTypeOfPropertyOfContextualType(type, "" + index) - || getIndexTypeOfContextualType(type, 1 /* Number */) - || (languageVersion >= 2 /* ES6 */ ? getElementTypeOfIterable(type, undefined) : undefined); - } - return undefined; - } - // In a contextually typed conditional expression, the true/false expressions are contextually typed by the same type. - function getContextualTypeForConditionalOperand(node) { - var conditional = node.parent; - return node === conditional.whenTrue || node === conditional.whenFalse ? getContextualType(conditional) : undefined; - } - // Return the contextual type for a given expression node. During overload resolution, a contextual type may temporarily - // be "pushed" onto a node using the contextualType property. - function getContextualType(node) { - if (isInsideWithStatementBody(node)) { - // We cannot answer semantic questions within a with block, do not proceed any further - return undefined; - } - if (node.contextualType) { - return node.contextualType; - } - var parent = node.parent; - switch (parent.kind) { - case 201 /* VariableDeclaration */: - case 131 /* Parameter */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 155 /* BindingElement */: - return getContextualTypeForInitializerExpression(node); - case 166 /* ArrowFunction */: - case 194 /* ReturnStatement */: - return getContextualTypeForReturnExpression(node); - case 175 /* YieldExpression */: - return getContextualTypeForYieldOperand(parent); - case 160 /* CallExpression */: - case 161 /* NewExpression */: - return getContextualTypeForArgument(parent, node); - case 163 /* TypeAssertionExpression */: - return getTypeFromTypeNode(parent.type); - case 172 /* BinaryExpression */: - return getContextualTypeForBinaryOperand(node); - case 227 /* PropertyAssignment */: - return getContextualTypeForObjectLiteralElement(parent); - case 156 /* ArrayLiteralExpression */: - return getContextualTypeForElementExpression(node); - case 173 /* ConditionalExpression */: - return getContextualTypeForConditionalOperand(node); - case 180 /* TemplateSpan */: - ts.Debug.assert(parent.parent.kind === 174 /* TemplateExpression */); - return getContextualTypeForSubstitutionExpression(parent.parent, node); - case 164 /* ParenthesizedExpression */: - return getContextualType(parent); - } - return undefined; - } - // If the given type is an object or union type, if that type has a single signature, and if - // that signature is non-generic, return the signature. Otherwise return undefined. - function getNonGenericSignature(type) { - var signatures = getSignaturesOfObjectOrUnionType(type, 0 /* Call */); - if (signatures.length === 1) { - var signature = signatures[0]; - if (!signature.typeParameters) { - return signature; - } - } - } - function isFunctionExpressionOrArrowFunction(node) { - return node.kind === 165 /* FunctionExpression */ || node.kind === 166 /* ArrowFunction */; - } - function getContextualSignatureForFunctionLikeDeclaration(node) { - // Only function expressions, arrow functions, and object literal methods are contextually typed. - return isFunctionExpressionOrArrowFunction(node) || ts.isObjectLiteralMethod(node) - ? getContextualSignature(node) - : undefined; - } - // Return the contextual signature for a given expression node. A contextual type provides a - // contextual signature if it has a single call signature and if that call signature is non-generic. - // If the contextual type is a union type, get the signature from each type possible and if they are - // all identical ignoring their return type, the result is same signature but with return type as - // union type of return types from these signatures - function getContextualSignature(node) { - ts.Debug.assert(node.kind !== 136 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); - var type = ts.isObjectLiteralMethod(node) - ? getContextualTypeForObjectLiteralMethod(node) - : getContextualType(node); - if (!type) { - return undefined; - } - if (!(type.flags & 16384 /* Union */)) { - return getNonGenericSignature(type); - } - var signatureList; - var types = type.types; - for (var _i = 0; _i < types.length; _i++) { - var current = types[_i]; - // The signature set of all constituent type with call signatures should match - // So number of signatures allowed is either 0 or 1 - if (signatureList && - getSignaturesOfObjectOrUnionType(current, 0 /* Call */).length > 1) { - return undefined; - } - var signature = getNonGenericSignature(current); - if (signature) { - if (!signatureList) { - // This signature will contribute to contextual union signature - signatureList = [signature]; - } - else if (!compareSignatures(signatureList[0], signature, false, compareTypes)) { - // Signatures aren't identical, do not use - return undefined; - } - else { - // Use this signature for contextual union signature - signatureList.push(signature); - } - } - } - // Result is union of signatures collected (return type is union of return types of this signature set) - var result; - if (signatureList) { - result = cloneSignature(signatureList[0]); - // Clear resolved return type we possibly got from cloneSignature - result.resolvedReturnType = undefined; - result.unionSignatures = signatureList; - } - return result; - } - // Presence of a contextual type mapper indicates inferential typing, except the identityMapper object is - // used as a special marker for other purposes. - function isInferentialContext(mapper) { - return mapper && mapper !== identityMapper; - } - // A node is an assignment target if it is on the left hand side of an '=' token, if it is parented by a property - // assignment in an object literal that is an assignment target, or if it is parented by an array literal that is - // an assignment target. Examples include 'a = xxx', '{ p: a } = xxx', '[{ p: a}] = xxx'. - function isAssignmentTarget(node) { - var parent = node.parent; - if (parent.kind === 172 /* BinaryExpression */ && parent.operatorToken.kind === 53 /* EqualsToken */ && parent.left === node) { - return true; - } - if (parent.kind === 227 /* PropertyAssignment */) { - return isAssignmentTarget(parent.parent); - } - if (parent.kind === 156 /* ArrayLiteralExpression */) { - return isAssignmentTarget(parent); - } - return false; - } - function checkSpreadElementExpression(node, contextualMapper) { - // It is usually not safe to call checkExpressionCached if we can be contextually typing. - // You can tell that we are contextually typing because of the contextualMapper parameter. - // While it is true that a spread element can have a contextual type, it does not do anything - // with this type. It is neither affected by it, nor does it propagate it to its operand. - // So the fact that contextualMapper is passed is not important, because the operand of a spread - // element is not contextually typed. - var arrayOrIterableType = checkExpressionCached(node.expression, contextualMapper); - return checkIteratedTypeOrElementType(arrayOrIterableType, node.expression, false); - } - function checkArrayLiteral(node, contextualMapper) { - var elements = node.elements; - if (!elements.length) { - return createArrayType(undefinedType); - } - var hasSpreadElement = false; - var elementTypes = []; - var inDestructuringPattern = isAssignmentTarget(node); - for (var _i = 0; _i < elements.length; _i++) { - var e = elements[_i]; - if (inDestructuringPattern && e.kind === 176 /* SpreadElementExpression */) { - // Given the following situation: - // var c: {}; - // [...c] = ["", 0]; - // - // c is represented in the tree as a spread element in an array literal. - // But c really functions as a rest element, and its purpose is to provide - // a contextual type for the right hand side of the assignment. Therefore, - // instead of calling checkExpression on "...c", which will give an error - // if c is not iterable/array-like, we need to act as if we are trying to - // get the contextual element type from it. So we do something similar to - // getContextualTypeForElementExpression, which will crucially not error - // if there is no index type / iterated type. - var restArrayType = checkExpression(e.expression, contextualMapper); - var restElementType = getIndexTypeOfType(restArrayType, 1 /* Number */) || - (languageVersion >= 2 /* ES6 */ ? getElementTypeOfIterable(restArrayType, undefined) : undefined); - if (restElementType) { - elementTypes.push(restElementType); - } - } - else { - var type = checkExpression(e, contextualMapper); - elementTypes.push(type); - } - hasSpreadElement = hasSpreadElement || e.kind === 176 /* SpreadElementExpression */; - } - if (!hasSpreadElement) { - var contextualType = getContextualType(node); - if (contextualType && contextualTypeIsTupleLikeType(contextualType) || inDestructuringPattern) { - return createTupleType(elementTypes); - } - } - return createArrayType(getUnionType(elementTypes)); - } - function isNumericName(name) { - return name.kind === 129 /* ComputedPropertyName */ ? isNumericComputedName(name) : isNumericLiteralName(name.text); - } - function isNumericComputedName(name) { - // It seems odd to consider an expression of type Any to result in a numeric name, - // but this behavior is consistent with checkIndexedAccess - return isTypeAnyOrAllConstituentTypesHaveKind(checkComputedPropertyName(name), 132 /* NumberLike */); - } - function isTypeAnyOrAllConstituentTypesHaveKind(type, kind) { - return isTypeAny(type) || allConstituentTypesHaveKind(type, kind); - } - function isNumericLiteralName(name) { - // The intent of numeric names is that - // - they are names with text in a numeric form, and that - // - setting properties/indexing with them is always equivalent to doing so with the numeric literal 'numLit', - // acquired by applying the abstract 'ToNumber' operation on the name's text. - // - // The subtlety is in the latter portion, as we cannot reliably say that anything that looks like a numeric literal is a numeric name. - // In fact, it is the case that the text of the name must be equal to 'ToString(numLit)' for this to hold. - // - // Consider the property name '"0xF00D"'. When one indexes with '0xF00D', they are actually indexing with the value of 'ToString(0xF00D)' - // according to the ECMAScript specification, so it is actually as if the user indexed with the string '"61453"'. - // Thus, the text of all numeric literals equivalent to '61543' such as '0xF00D', '0xf00D', '0170015', etc. are not valid numeric names - // because their 'ToString' representation is not equal to their original text. - // This is motivated by ECMA-262 sections 9.3.1, 9.8.1, 11.1.5, and 11.2.1. - // - // Here, we test whether 'ToString(ToNumber(name))' is exactly equal to 'name'. - // The '+' prefix operator is equivalent here to applying the abstract ToNumber operation. - // Applying the 'toString()' method on a number gives us the abstract ToString operation on a number. - // - // Note that this accepts the values 'Infinity', '-Infinity', and 'NaN', and that this is intentional. - // This is desired behavior, because when indexing with them as numeric entities, you are indexing - // with the strings '"Infinity"', '"-Infinity"', and '"NaN"' respectively. - return (+name).toString() === name; - } - function checkComputedPropertyName(node) { - var links = getNodeLinks(node.expression); - if (!links.resolvedType) { - links.resolvedType = checkExpression(node.expression); - // This will allow types number, string, symbol or any. It will also allow enums, the unknown - // type, and any union of these types (like string | number). - if (!isTypeAnyOrAllConstituentTypesHaveKind(links.resolvedType, 132 /* NumberLike */ | 258 /* StringLike */ | 2097152 /* ESSymbol */)) { - error(node, ts.Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any); - } - else { - checkThatExpressionIsProperSymbolReference(node.expression, links.resolvedType, true); - } - } - return links.resolvedType; - } - function checkObjectLiteral(node, contextualMapper) { - // Grammar checking - checkGrammarObjectLiteralExpression(node); - var propertiesTable = {}; - var propertiesArray = []; - var contextualType = getContextualType(node); - var typeFlags; - for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { - var memberDecl = _a[_i]; - var member = memberDecl.symbol; - if (memberDecl.kind === 227 /* PropertyAssignment */ || - memberDecl.kind === 228 /* ShorthandPropertyAssignment */ || - ts.isObjectLiteralMethod(memberDecl)) { - var type = void 0; - if (memberDecl.kind === 227 /* PropertyAssignment */) { - type = checkPropertyAssignment(memberDecl, contextualMapper); - } - else if (memberDecl.kind === 136 /* MethodDeclaration */) { - type = checkObjectLiteralMethod(memberDecl, contextualMapper); - } - else { - ts.Debug.assert(memberDecl.kind === 228 /* ShorthandPropertyAssignment */); - type = checkExpression(memberDecl.name, contextualMapper); - } - typeFlags |= type.flags; - var prop = createSymbol(4 /* Property */ | 67108864 /* Transient */ | member.flags, member.name); - prop.declarations = member.declarations; - prop.parent = member.parent; - if (member.valueDeclaration) { - prop.valueDeclaration = member.valueDeclaration; - } - prop.type = type; - prop.target = member; - member = prop; - } - else { - // TypeScript 1.0 spec (April 2014) - // A get accessor declaration is processed in the same manner as - // an ordinary function declaration(section 6.1) with no parameters. - // A set accessor declaration is processed in the same manner - // as an ordinary function declaration with a single parameter and a Void return type. - ts.Debug.assert(memberDecl.kind === 138 /* GetAccessor */ || memberDecl.kind === 139 /* SetAccessor */); - checkAccessorDeclaration(memberDecl); - } - if (!ts.hasDynamicName(memberDecl)) { - propertiesTable[member.name] = member; - } - propertiesArray.push(member); - } - var stringIndexType = getIndexType(0 /* String */); - var numberIndexType = getIndexType(1 /* Number */); - var result = createAnonymousType(node.symbol, propertiesTable, emptyArray, emptyArray, stringIndexType, numberIndexType); - result.flags |= 262144 /* ObjectLiteral */ | 1048576 /* ContainsObjectLiteral */ | (typeFlags & 524288 /* ContainsUndefinedOrNull */); - return result; - function getIndexType(kind) { - if (contextualType && contextualTypeHasIndexSignature(contextualType, kind)) { - var propTypes = []; - for (var i = 0; i < propertiesArray.length; i++) { - var propertyDecl = node.properties[i]; - if (kind === 0 /* String */ || isNumericName(propertyDecl.name)) { - // Do not call getSymbolOfNode(propertyDecl), as that will get the - // original symbol for the node. We actually want to get the symbol - // created by checkObjectLiteral, since that will be appropriately - // contextually typed and resolved. - var type = getTypeOfSymbol(propertiesArray[i]); - if (!ts.contains(propTypes, type)) { - propTypes.push(type); - } - } - } - var result_1 = propTypes.length ? getUnionType(propTypes) : undefinedType; - typeFlags |= result_1.flags; - return result_1; - } - return undefined; - } - } - // If a symbol is a synthesized symbol with no value declaration, we assume it is a property. Example of this are the synthesized - // '.prototype' property as well as synthesized tuple index properties. - function getDeclarationKindFromSymbol(s) { - return s.valueDeclaration ? s.valueDeclaration.kind : 134 /* PropertyDeclaration */; - } - function getDeclarationFlagsFromSymbol(s) { - return s.valueDeclaration ? ts.getCombinedNodeFlags(s.valueDeclaration) : s.flags & 134217728 /* Prototype */ ? 16 /* Public */ | 128 /* Static */ : 0; - } - function checkClassPropertyAccess(node, left, type, prop) { - var flags = getDeclarationFlagsFromSymbol(prop); - // Public properties are always accessible - if (!(flags & (32 /* Private */ | 64 /* Protected */))) { - return; - } - // Property is known to be private or protected at this point - // Get the declaring and enclosing class instance types - var enclosingClassDeclaration = ts.getAncestor(node, 204 /* ClassDeclaration */); - var enclosingClass = enclosingClassDeclaration ? getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingClassDeclaration)) : undefined; - var declaringClass = getDeclaredTypeOfSymbol(prop.parent); - // Private property is accessible if declaring and enclosing class are the same - if (flags & 32 /* Private */) { - if (declaringClass !== enclosingClass) { - error(node, ts.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(declaringClass)); - } - return; - } - // Property is known to be protected at this point - // All protected properties of a supertype are accessible in a super access - if (left.kind === 91 /* SuperKeyword */) { - return; - } - // A protected property is accessible in the declaring class and classes derived from it - if (!enclosingClass || !hasBaseType(enclosingClass, declaringClass)) { - error(node, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(declaringClass)); - return; - } - // No further restrictions for static properties - if (flags & 128 /* Static */) { - return; - } - // An instance property must be accessed through an instance of the enclosing class - if (!(getTargetType(type).flags & (1024 /* Class */ | 2048 /* Interface */) && hasBaseType(type, enclosingClass))) { - error(node, ts.Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1, symbolToString(prop), typeToString(enclosingClass)); - } - } - function checkPropertyAccessExpression(node) { - return checkPropertyAccessExpressionOrQualifiedName(node, node.expression, node.name); - } - function checkQualifiedName(node) { - return checkPropertyAccessExpressionOrQualifiedName(node, node.left, node.right); - } - function checkPropertyAccessExpressionOrQualifiedName(node, left, right) { - var type = checkExpressionOrQualifiedName(left); - if (isTypeAny(type)) { - return type; - } - var apparentType = getApparentType(getWidenedType(type)); - if (apparentType === unknownType) { - // handle cases when type is Type parameter with invalid constraint - return unknownType; - } - var prop = getPropertyOfType(apparentType, right.text); - if (!prop) { - if (right.text) { - error(right, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(right), typeToString(type)); - } - return unknownType; - } - getNodeLinks(node).resolvedSymbol = prop; - if (prop.parent && prop.parent.flags & 32 /* Class */) { - // TS 1.0 spec (April 2014): 4.8.2 - // - In a constructor, instance member function, instance member accessor, or - // instance member variable initializer where this references a derived class instance, - // a super property access is permitted and must specify a public instance member function of the base class. - // - In a static member function or static member accessor - // where this references the constructor function object of a derived class, - // a super property access is permitted and must specify a public static member function of the base class. - if (left.kind === 91 /* SuperKeyword */ && getDeclarationKindFromSymbol(prop) !== 136 /* MethodDeclaration */) { - error(right, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword); - } - else { - checkClassPropertyAccess(node, left, type, prop); - } - } - return getTypeOfSymbol(prop); - } - function isValidPropertyAccess(node, propertyName) { - var left = node.kind === 158 /* PropertyAccessExpression */ - ? node.expression - : node.left; - var type = checkExpressionOrQualifiedName(left); - if (type !== unknownType && !isTypeAny(type)) { - var prop = getPropertyOfType(getWidenedType(type), propertyName); - if (prop && prop.parent && prop.parent.flags & 32 /* Class */) { - if (left.kind === 91 /* SuperKeyword */ && getDeclarationKindFromSymbol(prop) !== 136 /* MethodDeclaration */) { - return false; - } - else { - var modificationCount = diagnostics.getModificationCount(); - checkClassPropertyAccess(node, left, type, prop); - return diagnostics.getModificationCount() === modificationCount; - } - } - } - return true; - } - function checkIndexedAccess(node) { - // Grammar checking - if (!node.argumentExpression) { - var sourceFile = getSourceFile(node); - if (node.parent.kind === 161 /* NewExpression */ && node.parent.expression === node) { - var start = ts.skipTrivia(sourceFile.text, node.expression.end); - var end = node.end; - grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead); - } - else { - var start = node.end - "]".length; - var end = node.end; - grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.Expression_expected); - } - } - // Obtain base constraint such that we can bail out if the constraint is an unknown type - var objectType = getApparentType(checkExpression(node.expression)); - var indexType = node.argumentExpression ? checkExpression(node.argumentExpression) : unknownType; - if (objectType === unknownType) { - return unknownType; - } - var isConstEnum = isConstEnumObjectType(objectType); - if (isConstEnum && - (!node.argumentExpression || node.argumentExpression.kind !== 8 /* StringLiteral */)) { - error(node.argumentExpression, ts.Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal); - return unknownType; - } - // TypeScript 1.0 spec (April 2014): 4.10 Property Access - // - If IndexExpr is a string literal or a numeric literal and ObjExpr's apparent type has a property with the name - // given by that literal(converted to its string representation in the case of a numeric literal), the property access is of the type of that property. - // - Otherwise, if ObjExpr's apparent type has a numeric index signature and IndexExpr is of type Any, the Number primitive type, or an enum type, - // the property access is of the type of that index signature. - // - Otherwise, if ObjExpr's apparent type has a string index signature and IndexExpr is of type Any, the String or Number primitive type, or an enum type, - // the property access is of the type of that index signature. - // - Otherwise, if IndexExpr is of type Any, the String or Number primitive type, or an enum type, the property access is of type Any. - // See if we can index as a property. - if (node.argumentExpression) { - var name_10 = getPropertyNameForIndexedAccess(node.argumentExpression, indexType); - if (name_10 !== undefined) { - var prop = getPropertyOfType(objectType, name_10); - if (prop) { - getNodeLinks(node).resolvedSymbol = prop; - return getTypeOfSymbol(prop); - } - else if (isConstEnum) { - error(node.argumentExpression, ts.Diagnostics.Property_0_does_not_exist_on_const_enum_1, name_10, symbolToString(objectType.symbol)); - return unknownType; - } - } - } - // Check for compatible indexer types. - if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 258 /* StringLike */ | 132 /* NumberLike */ | 2097152 /* ESSymbol */)) { - // Try to use a number indexer. - if (isTypeAnyOrAllConstituentTypesHaveKind(indexType, 132 /* NumberLike */)) { - var numberIndexType = getIndexTypeOfType(objectType, 1 /* Number */); - if (numberIndexType) { - return numberIndexType; - } - } - // Try to use string indexing. - var stringIndexType = getIndexTypeOfType(objectType, 0 /* String */); - if (stringIndexType) { - return stringIndexType; - } - // Fall back to any. - if (compilerOptions.noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors && !isTypeAny(objectType)) { - error(node, ts.Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type); - } - return anyType; - } - // REVIEW: Users should know the type that was actually used. - error(node, ts.Diagnostics.An_index_expression_argument_must_be_of_type_string_number_symbol_or_any); - return unknownType; - } - /** - * If indexArgumentExpression is a string literal or number literal, returns its text. - * If indexArgumentExpression is a well known symbol, returns the property name corresponding - * to this symbol, as long as it is a proper symbol reference. - * Otherwise, returns undefined. - */ - function getPropertyNameForIndexedAccess(indexArgumentExpression, indexArgumentType) { - if (indexArgumentExpression.kind === 8 /* StringLiteral */ || indexArgumentExpression.kind === 7 /* NumericLiteral */) { - return indexArgumentExpression.text; - } - if (checkThatExpressionIsProperSymbolReference(indexArgumentExpression, indexArgumentType, false)) { - var rightHandSideName = indexArgumentExpression.name.text; - return ts.getPropertyNameForKnownSymbolName(rightHandSideName); - } - return undefined; - } - /** - * A proper symbol reference requires the following: - * 1. The property access denotes a property that exists - * 2. The expression is of the form Symbol. - * 3. The property access is of the primitive type symbol. - * 4. Symbol in this context resolves to the global Symbol object - */ - function checkThatExpressionIsProperSymbolReference(expression, expressionType, reportError) { - if (expressionType === unknownType) { - // There is already an error, so no need to report one. - return false; - } - if (!ts.isWellKnownSymbolSyntactically(expression)) { - return false; - } - // Make sure the property type is the primitive symbol type - if ((expressionType.flags & 2097152 /* ESSymbol */) === 0) { - if (reportError) { - error(expression, ts.Diagnostics.A_computed_property_name_of_the_form_0_must_be_of_type_symbol, ts.getTextOfNode(expression)); - } - return false; - } - // The name is Symbol., so make sure Symbol actually resolves to the - // global Symbol object - var leftHandSide = expression.expression; - var leftHandSideSymbol = getResolvedSymbol(leftHandSide); - if (!leftHandSideSymbol) { - return false; - } - var globalESSymbol = getGlobalESSymbolConstructorSymbol(); - if (!globalESSymbol) { - // Already errored when we tried to look up the symbol - return false; - } - if (leftHandSideSymbol !== globalESSymbol) { - if (reportError) { - error(leftHandSide, ts.Diagnostics.Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object); - } - return false; - } - return true; - } - function resolveUntypedCall(node) { - if (node.kind === 162 /* TaggedTemplateExpression */) { - checkExpression(node.template); - } - else { - ts.forEach(node.arguments, function (argument) { - checkExpression(argument); - }); - } - return anySignature; - } - function resolveErrorCall(node) { - resolveUntypedCall(node); - return unknownSignature; - } - // Re-order candidate signatures into the result array. Assumes the result array to be empty. - // The candidate list orders groups in reverse, but within a group signatures are kept in declaration order - // A nit here is that we reorder only signatures that belong to the same symbol, - // so order how inherited signatures are processed is still preserved. - // interface A { (x: string): void } - // interface B extends A { (x: 'foo'): string } - // let b: B; - // b('foo') // <- here overloads should be processed as [(x:'foo'): string, (x: string): void] - function reorderCandidates(signatures, result) { - var lastParent; - var lastSymbol; - var cutoffIndex = 0; - var index; - var specializedIndex = -1; - var spliceIndex; - ts.Debug.assert(!result.length); - for (var _i = 0; _i < signatures.length; _i++) { - var signature = signatures[_i]; - var symbol = signature.declaration && getSymbolOfNode(signature.declaration); - var parent_6 = signature.declaration && signature.declaration.parent; - if (!lastSymbol || symbol === lastSymbol) { - if (lastParent && parent_6 === lastParent) { - index++; - } - else { - lastParent = parent_6; - index = cutoffIndex; - } - } - else { - // current declaration belongs to a different symbol - // set cutoffIndex so re-orderings in the future won't change result set from 0 to cutoffIndex - index = cutoffIndex = result.length; - lastParent = parent_6; - } - lastSymbol = symbol; - // specialized signatures always need to be placed before non-specialized signatures regardless - // of the cutoff position; see GH#1133 - if (signature.hasStringLiterals) { - specializedIndex++; - spliceIndex = specializedIndex; - // The cutoff index always needs to be greater than or equal to the specialized signature index - // in order to prevent non-specialized signatures from being added before a specialized - // signature. - cutoffIndex++; - } - else { - spliceIndex = index; - } - result.splice(spliceIndex, 0, signature); - } - } - function getSpreadArgumentIndex(args) { - for (var i = 0; i < args.length; i++) { - if (args[i].kind === 176 /* SpreadElementExpression */) { - return i; - } - } - return -1; - } - function hasCorrectArity(node, args, signature) { - var adjustedArgCount; // Apparent number of arguments we will have in this call - var typeArguments; // Type arguments (undefined if none) - var callIsIncomplete; // In incomplete call we want to be lenient when we have too few arguments - if (node.kind === 162 /* TaggedTemplateExpression */) { - var tagExpression = node; - // Even if the call is incomplete, we'll have a missing expression as our last argument, - // so we can say the count is just the arg list length - adjustedArgCount = args.length; - typeArguments = undefined; - if (tagExpression.template.kind === 174 /* TemplateExpression */) { - // If a tagged template expression lacks a tail literal, the call is incomplete. - // Specifically, a template only can end in a TemplateTail or a Missing literal. - var templateExpression = tagExpression.template; - var lastSpan = ts.lastOrUndefined(templateExpression.templateSpans); - ts.Debug.assert(lastSpan !== undefined); // we should always have at least one span. - callIsIncomplete = ts.nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated; - } - else { - // If the template didn't end in a backtick, or its beginning occurred right prior to EOF, - // then this might actually turn out to be a TemplateHead in the future; - // so we consider the call to be incomplete. - var templateLiteral = tagExpression.template; - ts.Debug.assert(templateLiteral.kind === 10 /* NoSubstitutionTemplateLiteral */); - callIsIncomplete = !!templateLiteral.isUnterminated; - } - } - else { - var callExpression = node; - if (!callExpression.arguments) { - // This only happens when we have something of the form: 'new C' - ts.Debug.assert(callExpression.kind === 161 /* NewExpression */); - return signature.minArgumentCount === 0; - } - // For IDE scenarios we may have an incomplete call, so a trailing comma is tantamount to adding another argument. - adjustedArgCount = callExpression.arguments.hasTrailingComma ? args.length + 1 : args.length; - // If we are missing the close paren, the call is incomplete. - callIsIncomplete = callExpression.arguments.end === callExpression.end; - typeArguments = callExpression.typeArguments; - } - // If the user supplied type arguments, but the number of type arguments does not match - // the declared number of type parameters, the call has an incorrect arity. - var hasRightNumberOfTypeArgs = !typeArguments || - (signature.typeParameters && typeArguments.length === signature.typeParameters.length); - if (!hasRightNumberOfTypeArgs) { - return false; - } - // If spread arguments are present, check that they correspond to a rest parameter. If so, no - // further checking is necessary. - var spreadArgIndex = getSpreadArgumentIndex(args); - if (spreadArgIndex >= 0) { - return signature.hasRestParameter && spreadArgIndex >= signature.parameters.length - 1; - } - // Too many arguments implies incorrect arity. - if (!signature.hasRestParameter && adjustedArgCount > signature.parameters.length) { - return false; - } - // If the call is incomplete, we should skip the lower bound check. - var hasEnoughArguments = adjustedArgCount >= signature.minArgumentCount; - return callIsIncomplete || hasEnoughArguments; - } - // If type has a single call signature and no other members, return that signature. Otherwise, return undefined. - function getSingleCallSignature(type) { - if (type.flags & 48128 /* ObjectType */) { - var resolved = resolveObjectOrUnionTypeMembers(type); - if (resolved.callSignatures.length === 1 && resolved.constructSignatures.length === 0 && - resolved.properties.length === 0 && !resolved.stringIndexType && !resolved.numberIndexType) { - return resolved.callSignatures[0]; - } - } - return undefined; - } - // Instantiate a generic signature in the context of a non-generic signature (section 3.8.5 in TypeScript spec) - function instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper) { - var context = createInferenceContext(signature.typeParameters, true); - forEachMatchingParameterType(contextualSignature, signature, function (source, target) { - // Type parameters from outer context referenced by source type are fixed by instantiation of the source type - inferTypes(context, instantiateType(source, contextualMapper), target); - }); - return getSignatureInstantiation(signature, getInferredTypes(context)); - } - function inferTypeArguments(signature, args, excludeArgument, context) { - var typeParameters = signature.typeParameters; - var inferenceMapper = createInferenceMapper(context); - // Clear out all the inference results from the last time inferTypeArguments was called on this context - for (var i = 0; i < typeParameters.length; i++) { - // As an optimization, we don't have to clear (and later recompute) inferred types - // for type parameters that have already been fixed on the previous call to inferTypeArguments. - // It would be just as correct to reset all of them. But then we'd be repeating the same work - // for the type parameters that were fixed, namely the work done by getInferredType. - if (!context.inferences[i].isFixed) { - context.inferredTypes[i] = undefined; - } - } - // On this call to inferTypeArguments, we may get more inferences for certain type parameters that were not - // fixed last time. This means that a type parameter that failed inference last time may succeed this time, - // or vice versa. Therefore, the failedTypeParameterIndex is useless if it points to an unfixed type parameter, - // because it may change. So here we reset it. However, getInferredType will not revisit any type parameters - // that were previously fixed. So if a fixed type parameter failed previously, it will fail again because - // it will contain the exact same set of inferences. So if we reset the index from a fixed type parameter, - // we will lose information that we won't recover this time around. - if (context.failedTypeParameterIndex !== undefined && !context.inferences[context.failedTypeParameterIndex].isFixed) { - context.failedTypeParameterIndex = undefined; - } - // We perform two passes over the arguments. In the first pass we infer from all arguments, but use - // wildcards for all context sensitive function expressions. - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - if (arg.kind !== 178 /* OmittedExpression */) { - var paramType = getTypeAtPosition(signature, i); - var argType = void 0; - if (i === 0 && args[i].parent.kind === 162 /* TaggedTemplateExpression */) { - argType = globalTemplateStringsArrayType; - } - else { - // For context sensitive arguments we pass the identityMapper, which is a signal to treat all - // context sensitive function expressions as wildcards - var mapper = excludeArgument && excludeArgument[i] !== undefined ? identityMapper : inferenceMapper; - argType = checkExpressionWithContextualType(arg, paramType, mapper); - } - inferTypes(context, argType, paramType); - } - } - // In the second pass we visit only context sensitive arguments, and only those that aren't excluded, this - // time treating function expressions normally (which may cause previously inferred type arguments to be fixed - // as we construct types for contextually typed parameters) - if (excludeArgument) { - for (var i = 0; i < args.length; i++) { - // No need to check for omitted args and template expressions, their exlusion value is always undefined - if (excludeArgument[i] === false) { - var arg = args[i]; - var paramType = getTypeAtPosition(signature, i); - inferTypes(context, checkExpressionWithContextualType(arg, paramType, inferenceMapper), paramType); - } - } - } - getInferredTypes(context); - } - function checkTypeArguments(signature, typeArguments, typeArgumentResultTypes, reportErrors) { - var typeParameters = signature.typeParameters; - var typeArgumentsAreAssignable = true; - for (var i = 0; i < typeParameters.length; i++) { - var typeArgNode = typeArguments[i]; - var typeArgument = getTypeFromTypeNode(typeArgNode); - // Do not push on this array! It has a preallocated length - typeArgumentResultTypes[i] = typeArgument; - if (typeArgumentsAreAssignable /* so far */) { - var constraint = getConstraintOfTypeParameter(typeParameters[i]); - if (constraint) { - typeArgumentsAreAssignable = checkTypeAssignableTo(typeArgument, constraint, reportErrors ? typeArgNode : undefined, ts.Diagnostics.Type_0_does_not_satisfy_the_constraint_1); - } - } - } - return typeArgumentsAreAssignable; - } - function checkApplicableSignature(node, args, signature, relation, excludeArgument, reportErrors) { - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - if (arg.kind !== 178 /* OmittedExpression */) { - // Check spread elements against rest type (from arity check we know spread argument corresponds to a rest parameter) - var paramType = getTypeAtPosition(signature, i); - // A tagged template expression provides a special first argument, and string literals get string literal types - // unless we're reporting errors - var argType = i === 0 && node.kind === 162 /* TaggedTemplateExpression */ - ? globalTemplateStringsArrayType - : arg.kind === 8 /* StringLiteral */ && !reportErrors - ? getStringLiteralType(arg) - : checkExpressionWithContextualType(arg, paramType, excludeArgument && excludeArgument[i] ? identityMapper : undefined); - // Use argument expression as error location when reporting errors - if (!checkTypeRelatedTo(argType, paramType, relation, reportErrors ? arg : undefined, ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1)) { - return false; - } - } - } - return true; - } - /** - * Returns the effective arguments for an expression that works like a function invocation. - * - * If 'node' is a CallExpression or a NewExpression, then its argument list is returned. - * If 'node' is a TaggedTemplateExpression, a new argument list is constructed from the substitution - * expressions, where the first element of the list is the template for error reporting purposes. - */ - function getEffectiveCallArguments(node) { - var args; - if (node.kind === 162 /* TaggedTemplateExpression */) { - var template = node.template; - args = [template]; - if (template.kind === 174 /* TemplateExpression */) { - ts.forEach(template.templateSpans, function (span) { - args.push(span.expression); - }); - } - } - else { - args = node.arguments || emptyArray; - } - return args; - } - /** - * In a 'super' call, type arguments are not provided within the CallExpression node itself. - * Instead, they must be fetched from the class declaration's base type node. - * - * If 'node' is a 'super' call (e.g. super(...), new super(...)), then we attempt to fetch - * the type arguments off the containing class's first heritage clause (if one exists). Note that if - * type arguments are supplied on the 'super' call, they are ignored (though this is syntactically incorrect). - * - * In all other cases, the call's explicit type arguments are returned. - */ - function getEffectiveTypeArguments(callExpression) { - if (callExpression.expression.kind === 91 /* SuperKeyword */) { - var containingClass = ts.getAncestor(callExpression, 204 /* ClassDeclaration */); - var baseClassTypeNode = containingClass && ts.getClassExtendsHeritageClauseElement(containingClass); - return baseClassTypeNode && baseClassTypeNode.typeArguments; - } - else { - // Ordinary case - simple function invocation. - return callExpression.typeArguments; - } - } - function resolveCall(node, signatures, candidatesOutArray) { - var isTaggedTemplate = node.kind === 162 /* TaggedTemplateExpression */; - var typeArguments; - if (!isTaggedTemplate) { - typeArguments = getEffectiveTypeArguments(node); - // We already perform checking on the type arguments on the class declaration itself. - if (node.expression.kind !== 91 /* SuperKeyword */) { - ts.forEach(typeArguments, checkSourceElement); - } - } - var candidates = candidatesOutArray || []; - // reorderCandidates fills up the candidates array directly - reorderCandidates(signatures, candidates); - if (!candidates.length) { - error(node, ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target); - return resolveErrorCall(node); - } - var args = getEffectiveCallArguments(node); - // The following applies to any value of 'excludeArgument[i]': - // - true: the argument at 'i' is susceptible to a one-time permanent contextual typing. - // - undefined: the argument at 'i' is *not* susceptible to permanent contextual typing. - // - false: the argument at 'i' *was* and *has been* permanently contextually typed. - // - // The idea is that we will perform type argument inference & assignability checking once - // without using the susceptible parameters that are functions, and once more for each of those - // parameters, contextually typing each as we go along. - // - // For a tagged template, then the first argument be 'undefined' if necessary - // because it represents a TemplateStringsArray. - var excludeArgument; - for (var i = isTaggedTemplate ? 1 : 0; i < args.length; i++) { - if (isContextSensitive(args[i])) { - if (!excludeArgument) { - excludeArgument = new Array(args.length); - } - excludeArgument[i] = true; - } - } - // The following variables are captured and modified by calls to chooseOverload. - // If overload resolution or type argument inference fails, we want to report the - // best error possible. The best error is one which says that an argument was not - // assignable to a parameter. This implies that everything else about the overload - // was fine. So if there is any overload that is only incorrect because of an - // argument, we will report an error on that one. - // - // function foo(s: string) {} - // function foo(n: number) {} // Report argument error on this overload - // function foo() {} - // foo(true); - // - // If none of the overloads even made it that far, there are two possibilities. - // There was a problem with type arguments for some overload, in which case - // report an error on that. Or none of the overloads even had correct arity, - // in which case give an arity error. - // - // function foo(x: T, y: T) {} // Report type argument inference error - // function foo() {} - // foo(0, true); - // - var candidateForArgumentError; - var candidateForTypeArgumentError; - var resultOfFailedInference; - var result; - // Section 4.12.1: - // if the candidate list contains one or more signatures for which the type of each argument - // expression is a subtype of each corresponding parameter type, the return type of the first - // of those signatures becomes the return type of the function call. - // Otherwise, the return type of the first signature in the candidate list becomes the return - // type of the function call. - // - // Whether the call is an error is determined by assignability of the arguments. The subtype pass - // is just important for choosing the best signature. So in the case where there is only one - // signature, the subtype pass is useless. So skipping it is an optimization. - if (candidates.length > 1) { - result = chooseOverload(candidates, subtypeRelation); - } - if (!result) { - // Reinitialize these pointers for round two - candidateForArgumentError = undefined; - candidateForTypeArgumentError = undefined; - resultOfFailedInference = undefined; - result = chooseOverload(candidates, assignableRelation); - } - if (result) { - return result; - } - // No signatures were applicable. Now report errors based on the last applicable signature with - // no arguments excluded from assignability checks. - // If candidate is undefined, it means that no candidates had a suitable arity. In that case, - // skip the checkApplicableSignature check. - if (candidateForArgumentError) { - // excludeArgument is undefined, in this case also equivalent to [undefined, undefined, ...] - // The importance of excludeArgument is to prevent us from typing function expression parameters - // in arguments too early. If possible, we'd like to only type them once we know the correct - // overload. However, this matters for the case where the call is correct. When the call is - // an error, we don't need to exclude any arguments, although it would cause no harm to do so. - checkApplicableSignature(node, args, candidateForArgumentError, assignableRelation, undefined, true); - } - else if (candidateForTypeArgumentError) { - if (!isTaggedTemplate && typeArguments) { - checkTypeArguments(candidateForTypeArgumentError, typeArguments, [], true); - } - else { - ts.Debug.assert(resultOfFailedInference.failedTypeParameterIndex >= 0); - var failedTypeParameter = candidateForTypeArgumentError.typeParameters[resultOfFailedInference.failedTypeParameterIndex]; - var inferenceCandidates = getInferenceCandidates(resultOfFailedInference, resultOfFailedInference.failedTypeParameterIndex); - var diagnosticChainHead = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly, typeToString(failedTypeParameter)); - reportNoCommonSupertypeError(inferenceCandidates, node.expression || node.tag, diagnosticChainHead); - } - } - else { - error(node, ts.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target); - } - // No signature was applicable. We have already reported the errors for the invalid signature. - // If this is a type resolution session, e.g. Language Service, try to get better information that anySignature. - // Pick the first candidate that matches the arity. This way we can get a contextual type for cases like: - // declare function f(a: { xa: number; xb: number; }); - // f({ | - if (!produceDiagnostics) { - for (var _i = 0; _i < candidates.length; _i++) { - var candidate = candidates[_i]; - if (hasCorrectArity(node, args, candidate)) { - return candidate; - } - } - } - return resolveErrorCall(node); - function chooseOverload(candidates, relation) { - for (var _i = 0; _i < candidates.length; _i++) { - var originalCandidate = candidates[_i]; - if (!hasCorrectArity(node, args, originalCandidate)) { - continue; - } - var candidate = void 0; - var typeArgumentsAreValid = void 0; - var inferenceContext = originalCandidate.typeParameters - ? createInferenceContext(originalCandidate.typeParameters, false) - : undefined; - while (true) { - candidate = originalCandidate; - if (candidate.typeParameters) { - var typeArgumentTypes = void 0; - if (typeArguments) { - typeArgumentTypes = new Array(candidate.typeParameters.length); - typeArgumentsAreValid = checkTypeArguments(candidate, typeArguments, typeArgumentTypes, false); - } - else { - inferTypeArguments(candidate, args, excludeArgument, inferenceContext); - typeArgumentsAreValid = inferenceContext.failedTypeParameterIndex === undefined; - typeArgumentTypes = inferenceContext.inferredTypes; - } - if (!typeArgumentsAreValid) { - break; - } - candidate = getSignatureInstantiation(candidate, typeArgumentTypes); - } - if (!checkApplicableSignature(node, args, candidate, relation, excludeArgument, false)) { - break; - } - var index = excludeArgument ? ts.indexOf(excludeArgument, true) : -1; - if (index < 0) { - return candidate; - } - excludeArgument[index] = false; - } - // A post-mortem of this iteration of the loop. The signature was not applicable, - // so we want to track it as a candidate for reporting an error. If the candidate - // had no type parameters, or had no issues related to type arguments, we can - // report an error based on the arguments. If there was an issue with type - // arguments, then we can only report an error based on the type arguments. - if (originalCandidate.typeParameters) { - var instantiatedCandidate = candidate; - if (typeArgumentsAreValid) { - candidateForArgumentError = instantiatedCandidate; - } - else { - candidateForTypeArgumentError = originalCandidate; - if (!typeArguments) { - resultOfFailedInference = inferenceContext; - } - } - } - else { - ts.Debug.assert(originalCandidate === candidate); - candidateForArgumentError = originalCandidate; - } - } - return undefined; - } - } - function resolveCallExpression(node, candidatesOutArray) { - if (node.expression.kind === 91 /* SuperKeyword */) { - var superType = checkSuperExpression(node.expression); - if (superType !== unknownType) { - return resolveCall(node, getSignaturesOfType(superType, 1 /* Construct */), candidatesOutArray); - } - return resolveUntypedCall(node); - } - var funcType = checkExpression(node.expression); - var apparentType = getApparentType(funcType); - if (apparentType === unknownType) { - // Another error has already been reported - return resolveErrorCall(node); - } - // Technically, this signatures list may be incomplete. We are taking the apparent type, - // but we are not including call signatures that may have been added to the Object or - // Function interface, since they have none by default. This is a bit of a leap of faith - // that the user will not add any. - var callSignatures = getSignaturesOfType(apparentType, 0 /* Call */); - var constructSignatures = getSignaturesOfType(apparentType, 1 /* Construct */); - // TS 1.0 spec: 4.12 - // If FuncExpr is of type Any, or of an object type that has no call or construct signatures - // but is a subtype of the Function interface, the call is an untyped function call. In an - // untyped function call no TypeArgs are permitted, Args can be any argument list, no contextual - // types are provided for the argument expressions, and the result is always of type Any. - // We exclude union types because we may have a union of function types that happen to have - // no common signatures. - if (isTypeAny(funcType) || (!callSignatures.length && !constructSignatures.length && !(funcType.flags & 16384 /* Union */) && isTypeAssignableTo(funcType, globalFunctionType))) { - // The unknownType indicates that an error already occured (and was reported). No - // need to report another error in this case. - if (funcType !== unknownType && node.typeArguments) { - error(node, ts.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); - } - return resolveUntypedCall(node); - } - // If FuncExpr's apparent type(section 3.8.1) is a function type, the call is a typed function call. - // TypeScript employs overload resolution in typed function calls in order to support functions - // with multiple call signatures. - if (!callSignatures.length) { - if (constructSignatures.length) { - error(node, ts.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new, typeToString(funcType)); - } - else { - error(node, ts.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature); - } - return resolveErrorCall(node); - } - return resolveCall(node, callSignatures, candidatesOutArray); - } - function resolveNewExpression(node, candidatesOutArray) { - if (node.arguments && languageVersion < 1 /* ES5 */) { - var spreadIndex = getSpreadArgumentIndex(node.arguments); - if (spreadIndex >= 0) { - error(node.arguments[spreadIndex], ts.Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher); - } - } - var expressionType = checkExpression(node.expression); - // If ConstructExpr's apparent type(section 3.8.1) is an object type with one or - // more construct signatures, the expression is processed in the same manner as a - // function call, but using the construct signatures as the initial set of candidate - // signatures for overload resolution. The result type of the function call becomes - // the result type of the operation. - expressionType = getApparentType(expressionType); - if (expressionType === unknownType) { - // Another error has already been reported - return resolveErrorCall(node); - } - // TS 1.0 spec: 4.11 - // If ConstructExpr is of type Any, Args can be any argument - // list and the result of the operation is of type Any. - if (isTypeAny(expressionType)) { - if (node.typeArguments) { - error(node, ts.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments); - } - return resolveUntypedCall(node); - } - // Technically, this signatures list may be incomplete. We are taking the apparent type, - // but we are not including construct signatures that may have been added to the Object or - // Function interface, since they have none by default. This is a bit of a leap of faith - // that the user will not add any. - var constructSignatures = getSignaturesOfType(expressionType, 1 /* Construct */); - if (constructSignatures.length) { - return resolveCall(node, constructSignatures, candidatesOutArray); - } - // If ConstructExpr's apparent type is an object type with no construct signatures but - // one or more call signatures, the expression is processed as a function call. A compile-time - // error occurs if the result of the function call is not Void. The type of the result of the - // operation is Any. - var callSignatures = getSignaturesOfType(expressionType, 0 /* Call */); - if (callSignatures.length) { - var signature = resolveCall(node, callSignatures, candidatesOutArray); - if (getReturnTypeOfSignature(signature) !== voidType) { - error(node, ts.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword); - } - return signature; - } - error(node, ts.Diagnostics.Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature); - return resolveErrorCall(node); - } - function resolveTaggedTemplateExpression(node, candidatesOutArray) { - var tagType = checkExpression(node.tag); - var apparentType = getApparentType(tagType); - if (apparentType === unknownType) { - // Another error has already been reported - return resolveErrorCall(node); - } - var callSignatures = getSignaturesOfType(apparentType, 0 /* Call */); - if (isTypeAny(tagType) || (!callSignatures.length && !(tagType.flags & 16384 /* Union */) && isTypeAssignableTo(tagType, globalFunctionType))) { - return resolveUntypedCall(node); - } - if (!callSignatures.length) { - error(node, ts.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature); - return resolveErrorCall(node); - } - return resolveCall(node, callSignatures, candidatesOutArray); - } - // candidatesOutArray is passed by signature help in the language service, and collectCandidates - // must fill it up with the appropriate candidate signatures - function getResolvedSignature(node, candidatesOutArray) { - var links = getNodeLinks(node); - // If getResolvedSignature has already been called, we will have cached the resolvedSignature. - // However, it is possible that either candidatesOutArray was not passed in the first time, - // or that a different candidatesOutArray was passed in. Therefore, we need to redo the work - // to correctly fill the candidatesOutArray. - if (!links.resolvedSignature || candidatesOutArray) { - links.resolvedSignature = anySignature; - if (node.kind === 160 /* CallExpression */) { - links.resolvedSignature = resolveCallExpression(node, candidatesOutArray); - } - else if (node.kind === 161 /* NewExpression */) { - links.resolvedSignature = resolveNewExpression(node, candidatesOutArray); - } - else if (node.kind === 162 /* TaggedTemplateExpression */) { - links.resolvedSignature = resolveTaggedTemplateExpression(node, candidatesOutArray); - } - else { - ts.Debug.fail("Branch in 'getResolvedSignature' should be unreachable."); - } - } - return links.resolvedSignature; - } - function checkCallExpression(node) { - // Grammar checking; stop grammar-checking if checkGrammarTypeArguments return true - checkGrammarTypeArguments(node, node.typeArguments) || checkGrammarArguments(node, node.arguments); - var signature = getResolvedSignature(node); - if (node.expression.kind === 91 /* SuperKeyword */) { - return voidType; - } - if (node.kind === 161 /* NewExpression */) { - var declaration = signature.declaration; - if (declaration && - declaration.kind !== 137 /* Constructor */ && - declaration.kind !== 141 /* ConstructSignature */ && - declaration.kind !== 146 /* ConstructorType */) { - // When resolved signature is a call signature (and not a construct signature) the result type is any - if (compilerOptions.noImplicitAny) { - error(node, ts.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type); - } - return anyType; - } - } - return getReturnTypeOfSignature(signature); - } - function checkTaggedTemplateExpression(node) { - return getReturnTypeOfSignature(getResolvedSignature(node)); - } - function checkTypeAssertion(node) { - var exprType = checkExpression(node.expression); - var targetType = getTypeFromTypeNode(node.type); - if (produceDiagnostics && targetType !== unknownType) { - var widenedType = getWidenedType(exprType); - if (!(isTypeAssignableTo(targetType, widenedType))) { - checkTypeAssignableTo(exprType, targetType, node, ts.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other); - } - } - return targetType; - } - function getTypeAtPosition(signature, pos) { - return signature.hasRestParameter ? - pos < signature.parameters.length - 1 ? getTypeOfSymbol(signature.parameters[pos]) : getRestTypeOfSignature(signature) : - pos < signature.parameters.length ? getTypeOfSymbol(signature.parameters[pos]) : anyType; - } - function assignContextualParameterTypes(signature, context, mapper) { - var len = signature.parameters.length - (signature.hasRestParameter ? 1 : 0); - for (var i = 0; i < len; i++) { - var parameter = signature.parameters[i]; - var links = getSymbolLinks(parameter); - links.type = instantiateType(getTypeAtPosition(context, i), mapper); - } - if (signature.hasRestParameter && context.hasRestParameter && signature.parameters.length >= context.parameters.length) { - var parameter = ts.lastOrUndefined(signature.parameters); - var links = getSymbolLinks(parameter); - links.type = instantiateType(getTypeOfSymbol(ts.lastOrUndefined(context.parameters)), mapper); - } - } - function getReturnTypeFromBody(func, contextualMapper) { - var contextualSignature = getContextualSignatureForFunctionLikeDeclaration(func); - if (!func.body) { - return unknownType; - } - var type; - if (func.body.kind !== 182 /* Block */) { - type = checkExpressionCached(func.body, contextualMapper); - } - else { - var types; - var funcIsGenerator = !!func.asteriskToken; - if (funcIsGenerator) { - types = checkAndAggregateYieldOperandTypes(func.body, contextualMapper); - if (types.length === 0) { - var iterableIteratorAny = createIterableIteratorType(anyType); - if (compilerOptions.noImplicitAny) { - error(func.asteriskToken, ts.Diagnostics.Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type, typeToString(iterableIteratorAny)); - } - return iterableIteratorAny; - } - } - else { - types = checkAndAggregateReturnExpressionTypes(func.body, contextualMapper); - if (types.length === 0) { - return voidType; - } - } - // When yield/return statements are contextually typed we allow the return type to be a union type. - // Otherwise we require the yield/return expressions to have a best common supertype. - type = contextualSignature ? getUnionType(types) : getCommonSupertype(types); - if (!type) { - if (funcIsGenerator) { - error(func, ts.Diagnostics.No_best_common_type_exists_among_yield_expressions); - return createIterableIteratorType(unknownType); - } - else { - error(func, ts.Diagnostics.No_best_common_type_exists_among_return_expressions); - return unknownType; - } - } - if (funcIsGenerator) { - type = createIterableIteratorType(type); - } - } - if (!contextualSignature) { - reportErrorsFromWidening(func, type); - } - return getWidenedType(type); - } - function checkAndAggregateYieldOperandTypes(body, contextualMapper) { - var aggregatedTypes = []; - ts.forEachYieldExpression(body, function (yieldExpression) { - var expr = yieldExpression.expression; - if (expr) { - var type = checkExpressionCached(expr, contextualMapper); - if (yieldExpression.asteriskToken) { - // A yield* expression effectively yields everything that its operand yields - type = checkElementTypeOfIterable(type, yieldExpression.expression); - } - if (!ts.contains(aggregatedTypes, type)) { - aggregatedTypes.push(type); - } - } - }); - return aggregatedTypes; - } - function checkAndAggregateReturnExpressionTypes(body, contextualMapper) { - var aggregatedTypes = []; - ts.forEachReturnStatement(body, function (returnStatement) { - var expr = returnStatement.expression; - if (expr) { - var type = checkExpressionCached(expr, contextualMapper); - if (!ts.contains(aggregatedTypes, type)) { - aggregatedTypes.push(type); - } - } - }); - return aggregatedTypes; - } - function bodyContainsAReturnStatement(funcBody) { - return ts.forEachReturnStatement(funcBody, function (returnStatement) { - return true; - }); - } - function bodyContainsSingleThrowStatement(body) { - return (body.statements.length === 1) && (body.statements[0].kind === 198 /* ThrowStatement */); - } - // TypeScript Specification 1.0 (6.3) - July 2014 - // An explicitly typed function whose return type isn't the Void or the Any type - // must have at least one return statement somewhere in its body. - // An exception to this rule is if the function implementation consists of a single 'throw' statement. - function checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(func, returnType) { - if (!produceDiagnostics) { - return; - } - // Functions that return 'void' or 'any' don't need any return expressions. - if (returnType === voidType || isTypeAny(returnType)) { - return; - } - // If all we have is a function signature, or an arrow function with an expression body, then there is nothing to check. - if (ts.nodeIsMissing(func.body) || func.body.kind !== 182 /* Block */) { - return; - } - var bodyBlock = func.body; - // Ensure the body has at least one return expression. - if (bodyContainsAReturnStatement(bodyBlock)) { - return; - } - // If there are no return expressions, then we need to check if - // the function body consists solely of a throw statement; - // this is to make an exception for unimplemented functions. - if (bodyContainsSingleThrowStatement(bodyBlock)) { - return; - } - // This function does not conform to the specification. - error(func.type, ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_or_consist_of_a_single_throw_statement); - } - function checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper) { - ts.Debug.assert(node.kind !== 136 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); - // Grammar checking - var hasGrammarError = checkGrammarDeclarationNameInStrictMode(node) || checkGrammarFunctionLikeDeclaration(node); - if (!hasGrammarError && node.kind === 165 /* FunctionExpression */) { - checkGrammarFunctionName(node.name) || checkGrammarForGenerator(node); - } - // The identityMapper object is used to indicate that function expressions are wildcards - if (contextualMapper === identityMapper && isContextSensitive(node)) { - return anyFunctionType; - } - var links = getNodeLinks(node); - var type = getTypeOfSymbol(node.symbol); - // Check if function expression is contextually typed and assign parameter types if so - if (!(links.flags & 64 /* ContextChecked */)) { - var contextualSignature = getContextualSignature(node); - // If a type check is started at a function expression that is an argument of a function call, obtaining the - // contextual type may recursively get back to here during overload resolution of the call. If so, we will have - // already assigned contextual types. - if (!(links.flags & 64 /* ContextChecked */)) { - links.flags |= 64 /* ContextChecked */; - if (contextualSignature) { - var signature = getSignaturesOfType(type, 0 /* Call */)[0]; - if (isContextSensitive(node)) { - assignContextualParameterTypes(signature, contextualSignature, contextualMapper || identityMapper); - } - if (!node.type && !signature.resolvedReturnType) { - var returnType = getReturnTypeFromBody(node, contextualMapper); - if (!signature.resolvedReturnType) { - signature.resolvedReturnType = returnType; - } - } - } - checkSignatureDeclaration(node); - } - } - if (produceDiagnostics && node.kind !== 136 /* MethodDeclaration */ && node.kind !== 135 /* MethodSignature */) { - checkCollisionWithCapturedSuperVariable(node, node.name); - checkCollisionWithCapturedThisVariable(node, node.name); - } - return type; - } - function checkFunctionExpressionOrObjectLiteralMethodBody(node) { - ts.Debug.assert(node.kind !== 136 /* MethodDeclaration */ || ts.isObjectLiteralMethod(node)); - if (node.type && !node.asteriskToken) { - checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type)); - } - if (node.body) { - if (!node.type) { - // There are some checks that are only performed in getReturnTypeFromBody, that may produce errors - // we need. An example is the noImplicitAny errors resulting from widening the return expression - // of a function. Because checking of function expression bodies is deferred, there was never an - // appropriate time to do this during the main walk of the file (see the comment at the top of - // checkFunctionExpressionBodies). So it must be done now. - getReturnTypeOfSignature(getSignatureFromDeclaration(node)); - } - if (node.body.kind === 182 /* Block */) { - checkSourceElement(node.body); - } - else { - var exprType = checkExpression(node.body); - if (node.type) { - checkTypeAssignableTo(exprType, getTypeFromTypeNode(node.type), node.body, undefined); - } - checkFunctionExpressionBodies(node.body); - } - } - } - function checkArithmeticOperandType(operand, type, diagnostic) { - if (!isTypeAnyOrAllConstituentTypesHaveKind(type, 132 /* NumberLike */)) { - error(operand, diagnostic); - return false; - } - return true; - } - function checkReferenceExpression(n, invalidReferenceMessage, constantVariableMessage) { - function findSymbol(n) { - var symbol = getNodeLinks(n).resolvedSymbol; - // Because we got the symbol from the resolvedSymbol property, it might be of kind - // SymbolFlags.ExportValue. In this case it is necessary to get the actual export - // symbol, which will have the correct flags set on it. - return symbol && getExportSymbolOfValueSymbolIfExported(symbol); - } - function isReferenceOrErrorExpression(n) { - // TypeScript 1.0 spec (April 2014): - // Expressions are classified as values or references. - // References are the subset of expressions that are permitted as the target of an assignment. - // Specifically, references are combinations of identifiers(section 4.3), parentheses(section 4.7), - // and property accesses(section 4.10). - // All other expression constructs described in this chapter are classified as values. - switch (n.kind) { - case 65 /* Identifier */: { - var symbol = findSymbol(n); - // TypeScript 1.0 spec (April 2014): 4.3 - // An identifier expression that references a variable or parameter is classified as a reference. - // An identifier expression that references any other kind of entity is classified as a value(and therefore cannot be the target of an assignment). - return !symbol || symbol === unknownSymbol || symbol === argumentsSymbol || (symbol.flags & 3 /* Variable */) !== 0; - } - case 158 /* PropertyAccessExpression */: { - var symbol = findSymbol(n); - // TypeScript 1.0 spec (April 2014): 4.10 - // A property access expression is always classified as a reference. - // NOTE (not in spec): assignment to enum members should not be allowed - return !symbol || symbol === unknownSymbol || (symbol.flags & ~8 /* EnumMember */) !== 0; - } - case 159 /* ElementAccessExpression */: - // old compiler doesn't check indexed assess - return true; - case 164 /* ParenthesizedExpression */: - return isReferenceOrErrorExpression(n.expression); - default: - return false; - } - } - function isConstVariableReference(n) { - switch (n.kind) { - case 65 /* Identifier */: - case 158 /* PropertyAccessExpression */: { - var symbol = findSymbol(n); - return symbol && (symbol.flags & 3 /* Variable */) !== 0 && (getDeclarationFlagsFromSymbol(symbol) & 8192 /* Const */) !== 0; - } - case 159 /* ElementAccessExpression */: { - var index = n.argumentExpression; - var symbol = findSymbol(n.expression); - if (symbol && index && index.kind === 8 /* StringLiteral */) { - var name_11 = index.text; - var prop = getPropertyOfType(getTypeOfSymbol(symbol), name_11); - return prop && (prop.flags & 3 /* Variable */) !== 0 && (getDeclarationFlagsFromSymbol(prop) & 8192 /* Const */) !== 0; - } - return false; - } - case 164 /* ParenthesizedExpression */: - return isConstVariableReference(n.expression); - default: - return false; - } - } - if (!isReferenceOrErrorExpression(n)) { - error(n, invalidReferenceMessage); - return false; - } - if (isConstVariableReference(n)) { - error(n, constantVariableMessage); - return false; - } - return true; - } - function checkDeleteExpression(node) { - // Grammar checking - if (node.parserContextFlags & 1 /* StrictMode */ && node.expression.kind === 65 /* Identifier */) { - // When a delete operator occurs within strict mode code, a SyntaxError is thrown if its - // UnaryExpression is a direct reference to a variable, function argument, or function name - grammarErrorOnNode(node.expression, ts.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode); - } - var operandType = checkExpression(node.expression); - return booleanType; - } - function checkTypeOfExpression(node) { - var operandType = checkExpression(node.expression); - return stringType; - } - function checkVoidExpression(node) { - var operandType = checkExpression(node.expression); - return undefinedType; - } - function checkPrefixUnaryExpression(node) { - // Grammar checking - // The identifier eval or arguments may not appear as the LeftHandSideExpression of an - // Assignment operator(11.13) or of a PostfixExpression(11.3) or as the UnaryExpression - // operated upon by a Prefix Increment(11.4.4) or a Prefix Decrement(11.4.5) operator - if ((node.operator === 38 /* PlusPlusToken */ || node.operator === 39 /* MinusMinusToken */)) { - checkGrammarEvalOrArgumentsInStrictMode(node, node.operand); - } - var operandType = checkExpression(node.operand); - switch (node.operator) { - case 33 /* PlusToken */: - case 34 /* MinusToken */: - case 47 /* TildeToken */: - if (someConstituentTypeHasKind(operandType, 2097152 /* ESSymbol */)) { - error(node.operand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(node.operator)); - } - return numberType; - case 46 /* ExclamationToken */: - return booleanType; - case 38 /* PlusPlusToken */: - case 39 /* MinusMinusToken */: - var ok = checkArithmeticOperandType(node.operand, operandType, ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type); - if (ok) { - // run check only if former checks succeeded to avoid reporting cascading errors - checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant); - } - return numberType; - } - return unknownType; - } - function checkPostfixUnaryExpression(node) { - // Grammar checking - // The identifier eval or arguments may not appear as the LeftHandSideExpression of an - // Assignment operator(11.13) or of a PostfixExpression(11.3) or as the UnaryExpression - // operated upon by a Prefix Increment(11.4.4) or a Prefix Decrement(11.4.5) operator. - checkGrammarEvalOrArgumentsInStrictMode(node, node.operand); - var operandType = checkExpression(node.operand); - var ok = checkArithmeticOperandType(node.operand, operandType, ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type); - if (ok) { - // run check only if former checks succeeded to avoid reporting cascading errors - checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant); - } - return numberType; - } - // Just like isTypeOfKind below, except that it returns true if *any* constituent - // has this kind. - function someConstituentTypeHasKind(type, kind) { - if (type.flags & kind) { - return true; - } - if (type.flags & 16384 /* Union */) { - var types = type.types; - for (var _i = 0; _i < types.length; _i++) { - var current = types[_i]; - if (current.flags & kind) { - return true; - } - } - return false; - } - return false; - } - // Return true if type has the given flags, or is a union type composed of types that all have those flags. - function allConstituentTypesHaveKind(type, kind) { - if (type.flags & kind) { - return true; - } - if (type.flags & 16384 /* Union */) { - var types = type.types; - for (var _i = 0; _i < types.length; _i++) { - var current = types[_i]; - if (!(current.flags & kind)) { - return false; - } - } - return true; - } - return false; - } - function isConstEnumObjectType(type) { - return type.flags & (48128 /* ObjectType */ | 32768 /* Anonymous */) && type.symbol && isConstEnumSymbol(type.symbol); - } - function isConstEnumSymbol(symbol) { - return (symbol.flags & 128 /* ConstEnum */) !== 0; - } - function checkInstanceOfExpression(node, leftType, rightType) { - // TypeScript 1.0 spec (April 2014): 4.15.4 - // The instanceof operator requires the left operand to be of type Any, an object type, or a type parameter type, - // and the right operand to be of type Any or a subtype of the 'Function' interface type. - // The result is always of the Boolean primitive type. - // NOTE: do not raise error if leftType is unknown as related error was already reported - if (allConstituentTypesHaveKind(leftType, 2097662 /* Primitive */)) { - error(node.left, ts.Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); - } - // NOTE: do not raise error if right is unknown as related error was already reported - if (!(isTypeAny(rightType) || isTypeSubtypeOf(rightType, globalFunctionType))) { - error(node.right, ts.Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type); - } - return booleanType; - } - function checkInExpression(node, leftType, rightType) { - // TypeScript 1.0 spec (April 2014): 4.15.5 - // The in operator requires the left operand to be of type Any, the String primitive type, or the Number primitive type, - // and the right operand to be of type Any, an object type, or a type parameter type. - // The result is always of the Boolean primitive type. - if (!isTypeAnyOrAllConstituentTypesHaveKind(leftType, 258 /* StringLike */ | 132 /* NumberLike */ | 2097152 /* ESSymbol */)) { - error(node.left, ts.Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol); - } - if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 48128 /* ObjectType */ | 512 /* TypeParameter */)) { - error(node.right, ts.Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter); - } - return booleanType; - } - function checkObjectLiteralAssignment(node, sourceType, contextualMapper) { - var properties = node.properties; - for (var _i = 0; _i < properties.length; _i++) { - var p = properties[_i]; - if (p.kind === 227 /* PropertyAssignment */ || p.kind === 228 /* ShorthandPropertyAssignment */) { - // TODO(andersh): Computed property support - var name_12 = p.name; - var type = isTypeAny(sourceType) - ? sourceType - : getTypeOfPropertyOfType(sourceType, name_12.text) || - isNumericLiteralName(name_12.text) && getIndexTypeOfType(sourceType, 1 /* Number */) || - getIndexTypeOfType(sourceType, 0 /* String */); - if (type) { - checkDestructuringAssignment(p.initializer || name_12, type); - } - else { - error(name_12, ts.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature, typeToString(sourceType), ts.declarationNameToString(name_12)); - } - } - else { - error(p, ts.Diagnostics.Property_assignment_expected); - } - } - return sourceType; - } - function checkArrayLiteralAssignment(node, sourceType, contextualMapper) { - // This elementType will be used if the specific property corresponding to this index is not - // present (aka the tuple element property). This call also checks that the parentType is in - // fact an iterable or array (depending on target language). - var elementType = checkIteratedTypeOrElementType(sourceType, node, false) || unknownType; - var elements = node.elements; - for (var i = 0; i < elements.length; i++) { - var e = elements[i]; - if (e.kind !== 178 /* OmittedExpression */) { - if (e.kind !== 176 /* SpreadElementExpression */) { - var propName = "" + i; - var type = isTypeAny(sourceType) - ? sourceType - : isTupleLikeType(sourceType) - ? getTypeOfPropertyOfType(sourceType, propName) - : elementType; - if (type) { - checkDestructuringAssignment(e, type, contextualMapper); - } - else { - if (isTupleType(sourceType)) { - error(e, ts.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(sourceType), sourceType.elementTypes.length, elements.length); - } - else { - error(e, ts.Diagnostics.Type_0_has_no_property_1, typeToString(sourceType), propName); - } - } - } - else { - if (i < elements.length - 1) { - error(e, ts.Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pattern); - } - else { - var restExpression = e.expression; - if (restExpression.kind === 172 /* BinaryExpression */ && restExpression.operatorToken.kind === 53 /* EqualsToken */) { - error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer); - } - else { - checkDestructuringAssignment(restExpression, createArrayType(elementType), contextualMapper); - } - } - } - } - } - return sourceType; - } - function checkDestructuringAssignment(target, sourceType, contextualMapper) { - if (target.kind === 172 /* BinaryExpression */ && target.operatorToken.kind === 53 /* EqualsToken */) { - checkBinaryExpression(target, contextualMapper); - target = target.left; - } - if (target.kind === 157 /* ObjectLiteralExpression */) { - return checkObjectLiteralAssignment(target, sourceType, contextualMapper); - } - if (target.kind === 156 /* ArrayLiteralExpression */) { - return checkArrayLiteralAssignment(target, sourceType, contextualMapper); - } - return checkReferenceAssignment(target, sourceType, contextualMapper); - } - function checkReferenceAssignment(target, sourceType, contextualMapper) { - var targetType = checkExpression(target, contextualMapper); - if (checkReferenceExpression(target, ts.Diagnostics.Invalid_left_hand_side_of_assignment_expression, ts.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant)) { - checkTypeAssignableTo(sourceType, targetType, target, undefined); - } - return sourceType; - } - function checkBinaryExpression(node, contextualMapper) { - // Grammar checking - if (ts.isLeftHandSideExpression(node.left) && ts.isAssignmentOperator(node.operatorToken.kind)) { - // ECMA 262 (Annex C) The identifier eval or arguments may not appear as the LeftHandSideExpression of an - // Assignment operator(11.13) or of a PostfixExpression(11.3) - checkGrammarEvalOrArgumentsInStrictMode(node, node.left); - } - var operator = node.operatorToken.kind; - if (operator === 53 /* EqualsToken */ && (node.left.kind === 157 /* ObjectLiteralExpression */ || node.left.kind === 156 /* ArrayLiteralExpression */)) { - return checkDestructuringAssignment(node.left, checkExpression(node.right, contextualMapper), contextualMapper); - } - var leftType = checkExpression(node.left, contextualMapper); - var rightType = checkExpression(node.right, contextualMapper); - switch (operator) { - case 35 /* AsteriskToken */: - case 56 /* AsteriskEqualsToken */: - case 36 /* SlashToken */: - case 57 /* SlashEqualsToken */: - case 37 /* PercentToken */: - case 58 /* PercentEqualsToken */: - case 34 /* MinusToken */: - case 55 /* MinusEqualsToken */: - case 40 /* LessThanLessThanToken */: - case 59 /* LessThanLessThanEqualsToken */: - case 41 /* GreaterThanGreaterThanToken */: - case 60 /* GreaterThanGreaterThanEqualsToken */: - case 42 /* GreaterThanGreaterThanGreaterThanToken */: - case 61 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 44 /* BarToken */: - case 63 /* BarEqualsToken */: - case 45 /* CaretToken */: - case 64 /* CaretEqualsToken */: - case 43 /* AmpersandToken */: - case 62 /* AmpersandEqualsToken */: - // TypeScript 1.0 spec (April 2014): 4.15.1 - // These operators require their operands to be of type Any, the Number primitive type, - // or an enum type. Operands of an enum type are treated - // as having the primitive type Number. If one operand is the null or undefined value, - // it is treated as having the type of the other operand. - // The result is always of the Number primitive type. - if (leftType.flags & (32 /* Undefined */ | 64 /* Null */)) - leftType = rightType; - if (rightType.flags & (32 /* Undefined */ | 64 /* Null */)) - rightType = leftType; - var suggestedOperator; - // if a user tries to apply a bitwise operator to 2 boolean operands - // try and return them a helpful suggestion - if ((leftType.flags & 8 /* Boolean */) && - (rightType.flags & 8 /* Boolean */) && - (suggestedOperator = getSuggestedBooleanOperator(node.operatorToken.kind)) !== undefined) { - error(node, ts.Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead, ts.tokenToString(node.operatorToken.kind), ts.tokenToString(suggestedOperator)); - } - else { - // otherwise just check each operand separately and report errors as normal - var leftOk = checkArithmeticOperandType(node.left, leftType, ts.Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type); - var rightOk = checkArithmeticOperandType(node.right, rightType, ts.Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type); - if (leftOk && rightOk) { - checkAssignmentOperator(numberType); - } - } - return numberType; - case 33 /* PlusToken */: - case 54 /* PlusEqualsToken */: - // TypeScript 1.0 spec (April 2014): 4.15.2 - // The binary + operator requires both operands to be of the Number primitive type or an enum type, - // or at least one of the operands to be of type Any or the String primitive type. - // If one operand is the null or undefined value, it is treated as having the type of the other operand. - if (leftType.flags & (32 /* Undefined */ | 64 /* Null */)) - leftType = rightType; - if (rightType.flags & (32 /* Undefined */ | 64 /* Null */)) - rightType = leftType; - var resultType; - if (allConstituentTypesHaveKind(leftType, 132 /* NumberLike */) && allConstituentTypesHaveKind(rightType, 132 /* NumberLike */)) { - // Operands of an enum type are treated as having the primitive type Number. - // If both operands are of the Number primitive type, the result is of the Number primitive type. - resultType = numberType; - } - else { - if (allConstituentTypesHaveKind(leftType, 258 /* StringLike */) || allConstituentTypesHaveKind(rightType, 258 /* StringLike */)) { - // If one or both operands are of the String primitive type, the result is of the String primitive type. - resultType = stringType; - } - else if (isTypeAny(leftType) || isTypeAny(rightType)) { - // Otherwise, the result is of type Any. - // NOTE: unknown type here denotes error type. Old compiler treated this case as any type so do we. - resultType = leftType === unknownType || rightType === unknownType ? unknownType : anyType; - } - // Symbols are not allowed at all in arithmetic expressions - if (resultType && !checkForDisallowedESSymbolOperand(operator)) { - return resultType; - } - } - if (!resultType) { - reportOperatorError(); - return anyType; - } - if (operator === 54 /* PlusEqualsToken */) { - checkAssignmentOperator(resultType); - } - return resultType; - case 24 /* LessThanToken */: - case 25 /* GreaterThanToken */: - case 26 /* LessThanEqualsToken */: - case 27 /* GreaterThanEqualsToken */: - if (!checkForDisallowedESSymbolOperand(operator)) { - return booleanType; - } - // Fall through - case 28 /* EqualsEqualsToken */: - case 29 /* ExclamationEqualsToken */: - case 30 /* EqualsEqualsEqualsToken */: - case 31 /* ExclamationEqualsEqualsToken */: - if (!isTypeAssignableTo(leftType, rightType) && !isTypeAssignableTo(rightType, leftType)) { - reportOperatorError(); - } - return booleanType; - case 87 /* InstanceOfKeyword */: - return checkInstanceOfExpression(node, leftType, rightType); - case 86 /* InKeyword */: - return checkInExpression(node, leftType, rightType); - case 48 /* AmpersandAmpersandToken */: - return rightType; - case 49 /* BarBarToken */: - return getUnionType([leftType, rightType]); - case 53 /* EqualsToken */: - checkAssignmentOperator(rightType); - return rightType; - case 23 /* CommaToken */: - return rightType; - } - // Return true if there was no error, false if there was an error. - function checkForDisallowedESSymbolOperand(operator) { - var offendingSymbolOperand = someConstituentTypeHasKind(leftType, 2097152 /* ESSymbol */) ? node.left : - someConstituentTypeHasKind(rightType, 2097152 /* ESSymbol */) ? node.right : - undefined; - if (offendingSymbolOperand) { - error(offendingSymbolOperand, ts.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol, ts.tokenToString(operator)); - return false; - } - return true; - } - function getSuggestedBooleanOperator(operator) { - switch (operator) { - case 44 /* BarToken */: - case 63 /* BarEqualsToken */: - return 49 /* BarBarToken */; - case 45 /* CaretToken */: - case 64 /* CaretEqualsToken */: - return 31 /* ExclamationEqualsEqualsToken */; - case 43 /* AmpersandToken */: - case 62 /* AmpersandEqualsToken */: - return 48 /* AmpersandAmpersandToken */; - default: - return undefined; - } - } - function checkAssignmentOperator(valueType) { - if (produceDiagnostics && operator >= 53 /* FirstAssignment */ && operator <= 64 /* LastAssignment */) { - // TypeScript 1.0 spec (April 2014): 4.17 - // An assignment of the form - // VarExpr = ValueExpr - // requires VarExpr to be classified as a reference - // A compound assignment furthermore requires VarExpr to be classified as a reference (section 4.1) - // and the type of the non - compound operation to be assignable to the type of VarExpr. - var ok = checkReferenceExpression(node.left, ts.Diagnostics.Invalid_left_hand_side_of_assignment_expression, ts.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant); - // Use default messages - if (ok) { - // to avoid cascading errors check assignability only if 'isReference' check succeeded and no errors were reported - checkTypeAssignableTo(valueType, leftType, node.left, undefined); - } - } - } - function reportOperatorError() { - error(node, ts.Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2, ts.tokenToString(node.operatorToken.kind), typeToString(leftType), typeToString(rightType)); - } - } - function isYieldExpressionInClass(node) { - var current = node; - var parent = node.parent; - while (parent) { - if (ts.isFunctionLike(parent) && current === parent.body) { - return false; - } - else if (current.kind === 204 /* ClassDeclaration */ || current.kind === 177 /* ClassExpression */) { - return true; - } - current = parent; - parent = parent.parent; - } - return false; - } - function checkYieldExpression(node) { - // Grammar checking - if (!(node.parserContextFlags & 4 /* Yield */) || isYieldExpressionInClass(node)) { - grammarErrorOnFirstToken(node, ts.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body); - } - if (node.expression) { - var func = ts.getContainingFunction(node); - // If the user's code is syntactically correct, the func should always have a star. After all, - // we are in a yield context. - if (func && func.asteriskToken) { - var expressionType = checkExpressionCached(node.expression, undefined); - var expressionElementType; - var nodeIsYieldStar = !!node.asteriskToken; - if (nodeIsYieldStar) { - expressionElementType = checkElementTypeOfIterable(expressionType, node.expression); - } - // There is no point in doing an assignability check if the function - // has no explicit return type because the return type is directly computed - // from the yield expressions. - if (func.type) { - var signatureElementType = getElementTypeOfIterableIterator(getTypeFromTypeNode(func.type)) || anyType; - if (nodeIsYieldStar) { - checkTypeAssignableTo(expressionElementType, signatureElementType, node.expression, undefined); - } - else { - checkTypeAssignableTo(expressionType, signatureElementType, node.expression, undefined); - } - } - } - } - // Both yield and yield* expressions have type 'any' - return anyType; - } - function checkConditionalExpression(node, contextualMapper) { - checkExpression(node.condition); - var type1 = checkExpression(node.whenTrue, contextualMapper); - var type2 = checkExpression(node.whenFalse, contextualMapper); - return getUnionType([type1, type2]); - } - function checkTemplateExpression(node) { - // We just want to check each expressions, but we are unconcerned with - // the type of each expression, as any value may be coerced into a string. - // It is worth asking whether this is what we really want though. - // A place where we actually *are* concerned with the expressions' types are - // in tagged templates. - ts.forEach(node.templateSpans, function (templateSpan) { - checkExpression(templateSpan.expression); - }); - return stringType; - } - function checkExpressionWithContextualType(node, contextualType, contextualMapper) { - var saveContextualType = node.contextualType; - node.contextualType = contextualType; - var result = checkExpression(node, contextualMapper); - node.contextualType = saveContextualType; - return result; - } - function checkExpressionCached(node, contextualMapper) { - var links = getNodeLinks(node); - if (!links.resolvedType) { - links.resolvedType = checkExpression(node, contextualMapper); - } - return links.resolvedType; - } - function checkPropertyAssignment(node, contextualMapper) { - // Do not use hasDynamicName here, because that returns false for well known symbols. - // We want to perform checkComputedPropertyName for all computed properties, including - // well known symbols. - if (node.name.kind === 129 /* ComputedPropertyName */) { - checkComputedPropertyName(node.name); - } - return checkExpression(node.initializer, contextualMapper); - } - function checkObjectLiteralMethod(node, contextualMapper) { - // Grammar checking - checkGrammarMethod(node); - // Do not use hasDynamicName here, because that returns false for well known symbols. - // We want to perform checkComputedPropertyName for all computed properties, including - // well known symbols. - if (node.name.kind === 129 /* ComputedPropertyName */) { - checkComputedPropertyName(node.name); - } - var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); - return instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper); - } - function instantiateTypeWithSingleGenericCallSignature(node, type, contextualMapper) { - if (contextualMapper && contextualMapper !== identityMapper) { - var signature = getSingleCallSignature(type); - if (signature && signature.typeParameters) { - var contextualType = getContextualType(node); - if (contextualType) { - var contextualSignature = getSingleCallSignature(contextualType); - if (contextualSignature && !contextualSignature.typeParameters) { - return getOrCreateTypeFromSignature(instantiateSignatureInContextOf(signature, contextualSignature, contextualMapper)); - } - } - } - } - return type; - } - function checkExpression(node, contextualMapper) { - checkGrammarIdentifierInStrictMode(node); - return checkExpressionOrQualifiedName(node, contextualMapper); - } - // Checks an expression and returns its type. The contextualMapper parameter serves two purposes: When - // contextualMapper is not undefined and not equal to the identityMapper function object it indicates that the - // expression is being inferentially typed (section 4.12.2 in spec) and provides the type mapper to use in - // conjunction with the generic contextual type. When contextualMapper is equal to the identityMapper function - // object, it serves as an indicator that all contained function and arrow expressions should be considered to - // have the wildcard function type; this form of type check is used during overload resolution to exclude - // contextually typed function and arrow expressions in the initial phase. - function checkExpressionOrQualifiedName(node, contextualMapper) { - var type; - if (node.kind == 128 /* QualifiedName */) { - type = checkQualifiedName(node); - } - else { - var uninstantiatedType = checkExpressionWorker(node, contextualMapper); - type = instantiateTypeWithSingleGenericCallSignature(node, uninstantiatedType, contextualMapper); - } - if (isConstEnumObjectType(type)) { - // enum object type for const enums are only permitted in: - // - 'left' in property access - // - 'object' in indexed access - // - target in rhs of import statement - var ok = (node.parent.kind === 158 /* PropertyAccessExpression */ && node.parent.expression === node) || - (node.parent.kind === 159 /* ElementAccessExpression */ && node.parent.expression === node) || - ((node.kind === 65 /* Identifier */ || node.kind === 128 /* QualifiedName */) && isInRightSideOfImportOrExportAssignment(node)); - if (!ok) { - error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment); - } - } - return type; - } - function checkNumericLiteral(node) { - // Grammar checking - checkGrammarNumericLiteral(node); - return numberType; - } - function checkExpressionWorker(node, contextualMapper) { - switch (node.kind) { - case 65 /* Identifier */: - return checkIdentifier(node); - case 93 /* ThisKeyword */: - return checkThisExpression(node); - case 91 /* SuperKeyword */: - return checkSuperExpression(node); - case 89 /* NullKeyword */: - return nullType; - case 95 /* TrueKeyword */: - case 80 /* FalseKeyword */: - return booleanType; - case 7 /* NumericLiteral */: - return checkNumericLiteral(node); - case 174 /* TemplateExpression */: - return checkTemplateExpression(node); - case 8 /* StringLiteral */: - case 10 /* NoSubstitutionTemplateLiteral */: - return stringType; - case 9 /* RegularExpressionLiteral */: - return globalRegExpType; - case 156 /* ArrayLiteralExpression */: - return checkArrayLiteral(node, contextualMapper); - case 157 /* ObjectLiteralExpression */: - return checkObjectLiteral(node, contextualMapper); - case 158 /* PropertyAccessExpression */: - return checkPropertyAccessExpression(node); - case 159 /* ElementAccessExpression */: - return checkIndexedAccess(node); - case 160 /* CallExpression */: - case 161 /* NewExpression */: - return checkCallExpression(node); - case 162 /* TaggedTemplateExpression */: - return checkTaggedTemplateExpression(node); - case 163 /* TypeAssertionExpression */: - return checkTypeAssertion(node); - case 164 /* ParenthesizedExpression */: - return checkExpression(node.expression, contextualMapper); - case 177 /* ClassExpression */: - return checkClassExpression(node); - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - return checkFunctionExpressionOrObjectLiteralMethod(node, contextualMapper); - case 168 /* TypeOfExpression */: - return checkTypeOfExpression(node); - case 167 /* DeleteExpression */: - return checkDeleteExpression(node); - case 169 /* VoidExpression */: - return checkVoidExpression(node); - case 170 /* PrefixUnaryExpression */: - return checkPrefixUnaryExpression(node); - case 171 /* PostfixUnaryExpression */: - return checkPostfixUnaryExpression(node); - case 172 /* BinaryExpression */: - return checkBinaryExpression(node, contextualMapper); - case 173 /* ConditionalExpression */: - return checkConditionalExpression(node, contextualMapper); - case 176 /* SpreadElementExpression */: - return checkSpreadElementExpression(node, contextualMapper); - case 178 /* OmittedExpression */: - return undefinedType; - case 175 /* YieldExpression */: - return checkYieldExpression(node); - } - return unknownType; - } - // DECLARATION AND STATEMENT TYPE CHECKING - function checkTypeParameter(node) { - checkGrammarDeclarationNameInStrictMode(node); - // Grammar Checking - if (node.expression) { - grammarErrorOnFirstToken(node.expression, ts.Diagnostics.Type_expected); - } - checkSourceElement(node.constraint); - if (produceDiagnostics) { - checkTypeParameterHasIllegalReferencesInConstraint(node); - checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_parameter_name_cannot_be_0); - } - // TODO: Check multiple declarations are identical - } - function checkParameter(node) { - // Grammar checking - // It is a SyntaxError if the Identifier "eval" or the Identifier "arguments" occurs as the - // Identifier in a PropertySetParameterList of a PropertyAssignment that is contained in strict code - // or if its FunctionBody is strict code(11.1.5). - // It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a - // strict mode FunctionLikeDeclaration or FunctionExpression(13.1) - // Grammar checking - checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarEvalOrArgumentsInStrictMode(node, node.name); - checkVariableLikeDeclaration(node); - var func = ts.getContainingFunction(node); - if (node.flags & 112 /* AccessibilityModifier */) { - func = ts.getContainingFunction(node); - if (!(func.kind === 137 /* Constructor */ && ts.nodeIsPresent(func.body))) { - error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); - } - } - if (node.questionToken && ts.isBindingPattern(node.name) && func.body) { - error(node, ts.Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature); - } - // Only check rest parameter type if it's not a binding pattern. Since binding patterns are - // not allowed in a rest parameter, we already have an error from checkGrammarParameterList. - if (node.dotDotDotToken && !ts.isBindingPattern(node.name) && !isArrayType(getTypeOfSymbol(node.symbol))) { - error(node, ts.Diagnostics.A_rest_parameter_must_be_of_an_array_type); - } - } - function isSyntacticallyValidGenerator(node) { - if (!node.asteriskToken || !node.body) { - return false; - } - return node.kind === 136 /* MethodDeclaration */ || - node.kind === 203 /* FunctionDeclaration */ || - node.kind === 165 /* FunctionExpression */; - } - function getTypePredicateParameterIndex(parameterList, parameter) { - if (parameterList) { - for (var i = 0; i < parameterList.length; i++) { - var param = parameterList[i]; - if (param.name.kind === 65 /* Identifier */ && - param.name.text === parameter.text) { - return i; - } - } - } - return -1; - } - function isInLegalTypePredicatePosition(node) { - switch (node.parent.kind) { - case 166 /* ArrowFunction */: - case 140 /* CallSignature */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 145 /* FunctionType */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - return node === node.parent.type; - } - return false; - } - function checkSignatureDeclaration(node) { - // Grammar checking - if (node.kind === 142 /* IndexSignature */) { - checkGrammarIndexSignature(node); - } - else if (node.kind === 145 /* FunctionType */ || node.kind === 203 /* FunctionDeclaration */ || node.kind === 146 /* ConstructorType */ || - node.kind === 140 /* CallSignature */ || node.kind === 137 /* Constructor */ || - node.kind === 141 /* ConstructSignature */) { - checkGrammarFunctionLikeDeclaration(node); - } - checkTypeParameters(node.typeParameters); - ts.forEach(node.parameters, checkParameter); - if (node.type) { - if (node.type.kind === 143 /* TypePredicate */) { - var typePredicate = getSignatureFromDeclaration(node).typePredicate; - var typePredicateNode = node.type; - if (isInLegalTypePredicatePosition(typePredicateNode)) { - if (typePredicate.parameterIndex >= 0) { - if (node.parameters[typePredicate.parameterIndex].dotDotDotToken) { - error(typePredicateNode.parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter); - } - else { - checkTypeAssignableTo(typePredicate.type, getTypeAtLocation(node.parameters[typePredicate.parameterIndex]), typePredicateNode.type); - } - } - else if (typePredicateNode.parameterName) { - var hasReportedError = false; - for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { - var param = _a[_i]; - if (hasReportedError) { - break; - } - if (param.name.kind === 153 /* ObjectBindingPattern */ || - param.name.kind === 154 /* ArrayBindingPattern */) { - (function checkBindingPattern(pattern) { - for (var _i = 0, _a = pattern.elements; _i < _a.length; _i++) { - var element = _a[_i]; - if (element.name.kind === 65 /* Identifier */ && - element.name.text === typePredicate.parameterName) { - error(typePredicateNode.parameterName, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, typePredicate.parameterName); - hasReportedError = true; - break; - } - else if (element.name.kind === 154 /* ArrayBindingPattern */ || - element.name.kind === 153 /* ObjectBindingPattern */) { - checkBindingPattern(element.name); - } - } - })(param.name); - } - } - if (!hasReportedError) { - error(typePredicateNode.parameterName, ts.Diagnostics.Cannot_find_parameter_0, typePredicate.parameterName); - } - } - } - else { - error(typePredicateNode, ts.Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); - } - } - else { - checkSourceElement(node.type); - } - } - if (produceDiagnostics) { - checkCollisionWithArgumentsInGeneratedCode(node); - if (compilerOptions.noImplicitAny && !node.type) { - switch (node.kind) { - case 141 /* ConstructSignature */: - error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); - break; - case 140 /* CallSignature */: - error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type); - break; - } - } - if (node.type) { - if (languageVersion >= 2 /* ES6 */ && isSyntacticallyValidGenerator(node)) { - var returnType = getTypeFromTypeNode(node.type); - if (returnType === voidType) { - error(node.type, ts.Diagnostics.A_generator_cannot_have_a_void_type_annotation); - } - else { - var generatorElementType = getElementTypeOfIterableIterator(returnType) || anyType; - var iterableIteratorInstantiation = createIterableIteratorType(generatorElementType); - // Naively, one could check that IterableIterator is assignable to the return type annotation. - // However, that would not catch the error in the following case. - // - // interface BadGenerator extends Iterable, Iterator { } - // function* g(): BadGenerator { } // Iterable and Iterator have different types! - // - checkTypeAssignableTo(iterableIteratorInstantiation, returnType, node.type); - } - } - } - } - checkSpecializedSignatureDeclaration(node); - } - function checkTypeForDuplicateIndexSignatures(node) { - if (node.kind === 205 /* InterfaceDeclaration */) { - var nodeSymbol = getSymbolOfNode(node); - // in case of merging interface declaration it is possible that we'll enter this check procedure several times for every declaration - // to prevent this run check only for the first declaration of a given kind - if (nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) { - return; - } - } - // TypeScript 1.0 spec (April 2014) - // 3.7.4: An object type can contain at most one string index signature and one numeric index signature. - // 8.5: A class declaration can have at most one string index member declaration and one numeric index member declaration - var indexSymbol = getIndexSymbol(getSymbolOfNode(node)); - if (indexSymbol) { - var seenNumericIndexer = false; - var seenStringIndexer = false; - for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) { - var decl = _a[_i]; - var declaration = decl; - if (declaration.parameters.length === 1 && declaration.parameters[0].type) { - switch (declaration.parameters[0].type.kind) { - case 123 /* StringKeyword */: - if (!seenStringIndexer) { - seenStringIndexer = true; - } - else { - error(declaration, ts.Diagnostics.Duplicate_string_index_signature); - } - break; - case 121 /* NumberKeyword */: - if (!seenNumericIndexer) { - seenNumericIndexer = true; - } - else { - error(declaration, ts.Diagnostics.Duplicate_number_index_signature); - } - break; - } - } - } - } - } - function checkPropertyDeclaration(node) { - // Grammar checking - checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarProperty(node) || checkGrammarComputedPropertyName(node.name); - checkVariableLikeDeclaration(node); - } - function checkMethodDeclaration(node) { - // Grammar checking - checkGrammarMethod(node) || checkGrammarComputedPropertyName(node.name); - // Grammar checking for modifiers is done inside the function checkGrammarFunctionLikeDeclaration - checkFunctionLikeDeclaration(node); - } - function checkConstructorDeclaration(node) { - // Grammar check on signature of constructor and modifier of the constructor is done in checkSignatureDeclaration function. - checkSignatureDeclaration(node); - // Grammar check for checking only related to constructoDeclaration - checkGrammarConstructorTypeParameters(node) || checkGrammarConstructorTypeAnnotation(node); - checkSourceElement(node.body); - var symbol = getSymbolOfNode(node); - var firstDeclaration = ts.getDeclarationOfKind(symbol, node.kind); - // Only type check the symbol once - if (node === firstDeclaration) { - checkFunctionOrConstructorSymbol(symbol); - } - // exit early in the case of signature - super checks are not relevant to them - if (ts.nodeIsMissing(node.body)) { - return; - } - if (!produceDiagnostics) { - return; - } - function isSuperCallExpression(n) { - return n.kind === 160 /* CallExpression */ && n.expression.kind === 91 /* SuperKeyword */; - } - function containsSuperCall(n) { - if (isSuperCallExpression(n)) { - return true; - } - switch (n.kind) { - case 165 /* FunctionExpression */: - case 203 /* FunctionDeclaration */: - case 166 /* ArrowFunction */: - case 157 /* ObjectLiteralExpression */: return false; - default: return ts.forEachChild(n, containsSuperCall); - } - } - function markThisReferencesAsErrors(n) { - if (n.kind === 93 /* ThisKeyword */) { - error(n, ts.Diagnostics.this_cannot_be_referenced_in_current_location); - } - else if (n.kind !== 165 /* FunctionExpression */ && n.kind !== 203 /* FunctionDeclaration */) { - ts.forEachChild(n, markThisReferencesAsErrors); - } - } - function isInstancePropertyWithInitializer(n) { - return n.kind === 134 /* PropertyDeclaration */ && - !(n.flags & 128 /* Static */) && - !!n.initializer; - } - // TS 1.0 spec (April 2014): 8.3.2 - // Constructors of classes with no extends clause may not contain super calls, whereas - // constructors of derived classes must contain at least one super call somewhere in their function body. - if (ts.getClassExtendsHeritageClauseElement(node.parent)) { - if (containsSuperCall(node.body)) { - // The first statement in the body of a constructor must be a super call if both of the following are true: - // - The containing class is a derived class. - // - The constructor declares parameter properties - // or the containing class declares instance member variables with initializers. - var superCallShouldBeFirst = ts.forEach(node.parent.members, isInstancePropertyWithInitializer) || - ts.forEach(node.parameters, function (p) { return p.flags & (16 /* Public */ | 32 /* Private */ | 64 /* Protected */); }); - if (superCallShouldBeFirst) { - var statements = node.body.statements; - if (!statements.length || statements[0].kind !== 185 /* ExpressionStatement */ || !isSuperCallExpression(statements[0].expression)) { - error(node, ts.Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties); - } - else { - // In such a required super call, it is a compile-time error for argument expressions to reference this. - markThisReferencesAsErrors(statements[0].expression); - } - } - } - else { - error(node, ts.Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call); - } - } - } - function checkAccessorDeclaration(node) { - if (produceDiagnostics) { - // Grammar checking accessors - checkGrammarFunctionLikeDeclaration(node) || checkGrammarAccessor(node) || checkGrammarComputedPropertyName(node.name); - if (node.kind === 138 /* GetAccessor */) { - if (!ts.isInAmbientContext(node) && ts.nodeIsPresent(node.body) && !(bodyContainsAReturnStatement(node.body) || bodyContainsSingleThrowStatement(node.body))) { - error(node.name, ts.Diagnostics.A_get_accessor_must_return_a_value_or_consist_of_a_single_throw_statement); - } - } - if (!ts.hasDynamicName(node)) { - // TypeScript 1.0 spec (April 2014): 8.4.3 - // Accessors for the same member name must specify the same accessibility. - var otherKind = node.kind === 138 /* GetAccessor */ ? 139 /* SetAccessor */ : 138 /* GetAccessor */; - var otherAccessor = ts.getDeclarationOfKind(node.symbol, otherKind); - if (otherAccessor) { - if (((node.flags & 112 /* AccessibilityModifier */) !== (otherAccessor.flags & 112 /* AccessibilityModifier */))) { - error(node.name, ts.Diagnostics.Getter_and_setter_accessors_do_not_agree_in_visibility); - } - var currentAccessorType = getAnnotatedAccessorType(node); - var otherAccessorType = getAnnotatedAccessorType(otherAccessor); - // TypeScript 1.0 spec (April 2014): 4.5 - // If both accessors include type annotations, the specified types must be identical. - if (currentAccessorType && otherAccessorType) { - if (!isTypeIdenticalTo(currentAccessorType, otherAccessorType)) { - error(node, ts.Diagnostics.get_and_set_accessor_must_have_the_same_type); - } - } - } - } - getTypeOfAccessors(getSymbolOfNode(node)); - } - checkFunctionLikeDeclaration(node); - } - function checkMissingDeclaration(node) { - checkDecorators(node); - } - function checkTypeReferenceNode(node) { - checkGrammarTypeReferenceInStrictMode(node.typeName); - return checkTypeReferenceOrExpressionWithTypeArguments(node); - } - function checkExpressionWithTypeArguments(node) { - checkGrammarExpressionWithTypeArgumentsInStrictMode(node.expression); - return checkTypeReferenceOrExpressionWithTypeArguments(node); - } - function checkTypeReferenceOrExpressionWithTypeArguments(node) { - // Grammar checking - checkGrammarTypeArguments(node, node.typeArguments); - var type = getTypeFromTypeReference(node); - if (type !== unknownType && node.typeArguments) { - // Do type argument local checks only if referenced type is successfully resolved - var symbol = getNodeLinks(node).resolvedSymbol; - var typeParameters = symbol.flags & 524288 /* TypeAlias */ ? getSymbolLinks(symbol).typeParameters : type.target.localTypeParameters; - var len = node.typeArguments.length; - for (var i = 0; i < len; i++) { - checkSourceElement(node.typeArguments[i]); - var constraint = getConstraintOfTypeParameter(typeParameters[i]); - if (produceDiagnostics && constraint) { - var typeArgument = type.typeArguments[i]; - checkTypeAssignableTo(typeArgument, constraint, node, ts.Diagnostics.Type_0_does_not_satisfy_the_constraint_1); - } - } - } - } - function checkTypeQuery(node) { - getTypeFromTypeQueryNode(node); - } - function checkTypeLiteral(node) { - ts.forEach(node.members, checkSourceElement); - if (produceDiagnostics) { - var type = getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node); - checkIndexConstraints(type); - checkTypeForDuplicateIndexSignatures(node); - } - } - function checkArrayType(node) { - checkSourceElement(node.elementType); - } - function checkTupleType(node) { - // Grammar checking - var hasErrorFromDisallowedTrailingComma = checkGrammarForDisallowedTrailingComma(node.elementTypes); - if (!hasErrorFromDisallowedTrailingComma && node.elementTypes.length === 0) { - grammarErrorOnNode(node, ts.Diagnostics.A_tuple_type_element_list_cannot_be_empty); - } - ts.forEach(node.elementTypes, checkSourceElement); - } - function checkUnionType(node) { - ts.forEach(node.types, checkSourceElement); - } - function isPrivateWithinAmbient(node) { - return (node.flags & 32 /* Private */) && ts.isInAmbientContext(node); - } - function checkSpecializedSignatureDeclaration(signatureDeclarationNode) { - if (!produceDiagnostics) { - return; - } - var signature = getSignatureFromDeclaration(signatureDeclarationNode); - if (!signature.hasStringLiterals) { - return; - } - // TypeScript 1.0 spec (April 2014): 3.7.2.2 - // Specialized signatures are not permitted in conjunction with a function body - if (ts.nodeIsPresent(signatureDeclarationNode.body)) { - error(signatureDeclarationNode, ts.Diagnostics.A_signature_with_an_implementation_cannot_use_a_string_literal_type); - return; - } - // TypeScript 1.0 spec (April 2014): 3.7.2.4 - // Every specialized call or construct signature in an object type must be assignable - // to at least one non-specialized call or construct signature in the same object type - var signaturesToCheck; - // Unnamed (call\construct) signatures in interfaces are inherited and not shadowed so examining just node symbol won't give complete answer. - // Use declaring type to obtain full list of signatures. - if (!signatureDeclarationNode.name && signatureDeclarationNode.parent && signatureDeclarationNode.parent.kind === 205 /* InterfaceDeclaration */) { - ts.Debug.assert(signatureDeclarationNode.kind === 140 /* CallSignature */ || signatureDeclarationNode.kind === 141 /* ConstructSignature */); - var signatureKind = signatureDeclarationNode.kind === 140 /* CallSignature */ ? 0 /* Call */ : 1 /* Construct */; - var containingSymbol = getSymbolOfNode(signatureDeclarationNode.parent); - var containingType = getDeclaredTypeOfSymbol(containingSymbol); - signaturesToCheck = getSignaturesOfType(containingType, signatureKind); - } - else { - signaturesToCheck = getSignaturesOfSymbol(getSymbolOfNode(signatureDeclarationNode)); - } - for (var _i = 0; _i < signaturesToCheck.length; _i++) { - var otherSignature = signaturesToCheck[_i]; - if (!otherSignature.hasStringLiterals && isSignatureAssignableTo(signature, otherSignature)) { - return; - } - } - error(signatureDeclarationNode, ts.Diagnostics.Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature); - } - function getEffectiveDeclarationFlags(n, flagsToCheck) { - var flags = ts.getCombinedNodeFlags(n); - if (n.parent.kind !== 205 /* InterfaceDeclaration */ && ts.isInAmbientContext(n)) { - if (!(flags & 2 /* Ambient */)) { - // It is nested in an ambient context, which means it is automatically exported - flags |= 1 /* Export */; - } - flags |= 2 /* Ambient */; - } - return flags & flagsToCheck; - } - function checkFunctionOrConstructorSymbol(symbol) { - if (!produceDiagnostics) { - return; - } - function getCanonicalOverload(overloads, implementation) { - // Consider the canonical set of flags to be the flags of the bodyDeclaration or the first declaration - // Error on all deviations from this canonical set of flags - // The caveat is that if some overloads are defined in lib.d.ts, we don't want to - // report the errors on those. To achieve this, we will say that the implementation is - // the canonical signature only if it is in the same container as the first overload - var implementationSharesContainerWithFirstOverload = implementation !== undefined && implementation.parent === overloads[0].parent; - return implementationSharesContainerWithFirstOverload ? implementation : overloads[0]; - } - function checkFlagAgreementBetweenOverloads(overloads, implementation, flagsToCheck, someOverloadFlags, allOverloadFlags) { - // Error if some overloads have a flag that is not shared by all overloads. To find the - // deviations, we XOR someOverloadFlags with allOverloadFlags - var someButNotAllOverloadFlags = someOverloadFlags ^ allOverloadFlags; - if (someButNotAllOverloadFlags !== 0) { - var canonicalFlags = getEffectiveDeclarationFlags(getCanonicalOverload(overloads, implementation), flagsToCheck); - ts.forEach(overloads, function (o) { - var deviation = getEffectiveDeclarationFlags(o, flagsToCheck) ^ canonicalFlags; - if (deviation & 1 /* Export */) { - error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_exported_or_not_exported); - } - else if (deviation & 2 /* Ambient */) { - error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient); - } - else if (deviation & (32 /* Private */ | 64 /* Protected */)) { - error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected); - } - }); - } - } - function checkQuestionTokenAgreementBetweenOverloads(overloads, implementation, someHaveQuestionToken, allHaveQuestionToken) { - if (someHaveQuestionToken !== allHaveQuestionToken) { - var canonicalHasQuestionToken = ts.hasQuestionToken(getCanonicalOverload(overloads, implementation)); - ts.forEach(overloads, function (o) { - var deviation = ts.hasQuestionToken(o) !== canonicalHasQuestionToken; - if (deviation) { - error(o.name, ts.Diagnostics.Overload_signatures_must_all_be_optional_or_required); - } - }); - } - } - var flagsToCheck = 1 /* Export */ | 2 /* Ambient */ | 32 /* Private */ | 64 /* Protected */; - var someNodeFlags = 0; - var allNodeFlags = flagsToCheck; - var someHaveQuestionToken = false; - var allHaveQuestionToken = true; - var hasOverloads = false; - var bodyDeclaration; - var lastSeenNonAmbientDeclaration; - var previousDeclaration; - var declarations = symbol.declarations; - var isConstructor = (symbol.flags & 16384 /* Constructor */) !== 0; - function reportImplementationExpectedError(node) { - if (node.name && ts.nodeIsMissing(node.name)) { - return; - } - var seen = false; - var subsequentNode = ts.forEachChild(node.parent, function (c) { - if (seen) { - return c; - } - else { - seen = c === node; - } - }); - if (subsequentNode) { - if (subsequentNode.kind === node.kind) { - var errorNode_1 = subsequentNode.name || subsequentNode; - // TODO(jfreeman): These are methods, so handle computed name case - if (node.name && subsequentNode.name && node.name.text === subsequentNode.name.text) { - // the only situation when this is possible (same kind\same name but different symbol) - mixed static and instance class members - ts.Debug.assert(node.kind === 136 /* MethodDeclaration */ || node.kind === 135 /* MethodSignature */); - ts.Debug.assert((node.flags & 128 /* Static */) !== (subsequentNode.flags & 128 /* Static */)); - var diagnostic = node.flags & 128 /* Static */ ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static; - error(errorNode_1, diagnostic); - return; - } - else if (ts.nodeIsPresent(subsequentNode.body)) { - error(errorNode_1, ts.Diagnostics.Function_implementation_name_must_be_0, ts.declarationNameToString(node.name)); - return; - } - } - } - var errorNode = node.name || node; - if (isConstructor) { - error(errorNode, ts.Diagnostics.Constructor_implementation_is_missing); - } - else { - error(errorNode, ts.Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration); - } - } - // when checking exported function declarations across modules check only duplicate implementations - // names and consistency of modifiers are verified when we check local symbol - var isExportSymbolInsideModule = symbol.parent && symbol.parent.flags & 1536 /* Module */; - var duplicateFunctionDeclaration = false; - var multipleConstructorImplementation = false; - for (var _i = 0; _i < declarations.length; _i++) { - var current = declarations[_i]; - var node = current; - var inAmbientContext = ts.isInAmbientContext(node); - var inAmbientContextOrInterface = node.parent.kind === 205 /* InterfaceDeclaration */ || node.parent.kind === 148 /* TypeLiteral */ || inAmbientContext; - if (inAmbientContextOrInterface) { - // check if declarations are consecutive only if they are non-ambient - // 1. ambient declarations can be interleaved - // i.e. this is legal - // declare function foo(); - // declare function bar(); - // declare function foo(); - // 2. mixing ambient and non-ambient declarations is a separate error that will be reported - do not want to report an extra one - previousDeclaration = undefined; - } - if (node.kind === 203 /* FunctionDeclaration */ || node.kind === 136 /* MethodDeclaration */ || node.kind === 135 /* MethodSignature */ || node.kind === 137 /* Constructor */) { - var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); - someNodeFlags |= currentNodeFlags; - allNodeFlags &= currentNodeFlags; - someHaveQuestionToken = someHaveQuestionToken || ts.hasQuestionToken(node); - allHaveQuestionToken = allHaveQuestionToken && ts.hasQuestionToken(node); - if (ts.nodeIsPresent(node.body) && bodyDeclaration) { - if (isConstructor) { - multipleConstructorImplementation = true; - } - else { - duplicateFunctionDeclaration = true; - } - } - else if (!isExportSymbolInsideModule && previousDeclaration && previousDeclaration.parent === node.parent && previousDeclaration.end !== node.pos) { - reportImplementationExpectedError(previousDeclaration); - } - if (ts.nodeIsPresent(node.body)) { - if (!bodyDeclaration) { - bodyDeclaration = node; - } - } - else { - hasOverloads = true; - } - previousDeclaration = node; - if (!inAmbientContextOrInterface) { - lastSeenNonAmbientDeclaration = node; - } - } - } - if (multipleConstructorImplementation) { - ts.forEach(declarations, function (declaration) { - error(declaration, ts.Diagnostics.Multiple_constructor_implementations_are_not_allowed); - }); - } - if (duplicateFunctionDeclaration) { - ts.forEach(declarations, function (declaration) { - error(declaration.name, ts.Diagnostics.Duplicate_function_implementation); - }); - } - if (!isExportSymbolInsideModule && lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body) { - reportImplementationExpectedError(lastSeenNonAmbientDeclaration); - } - if (hasOverloads) { - checkFlagAgreementBetweenOverloads(declarations, bodyDeclaration, flagsToCheck, someNodeFlags, allNodeFlags); - checkQuestionTokenAgreementBetweenOverloads(declarations, bodyDeclaration, someHaveQuestionToken, allHaveQuestionToken); - if (bodyDeclaration) { - var signatures = getSignaturesOfSymbol(symbol); - var bodySignature = getSignatureFromDeclaration(bodyDeclaration); - // If the implementation signature has string literals, we will have reported an error in - // checkSpecializedSignatureDeclaration - if (!bodySignature.hasStringLiterals) { - // TypeScript 1.0 spec (April 2014): 6.1 - // If a function declaration includes overloads, the overloads determine the call - // signatures of the type given to the function object - // and the function implementation signature must be assignable to that type - // - // TypeScript 1.0 spec (April 2014): 3.8.4 - // Note that specialized call and construct signatures (section 3.7.2.4) are not significant when determining assignment compatibility - // Consider checking against specialized signatures too. Not doing so creates a type hole: - // - // function g(x: "hi", y: boolean); - // function g(x: string, y: {}); - // function g(x: string, y: string) { } - // - // The implementation is completely unrelated to the specialized signature, yet we do not check this. - for (var _a = 0; _a < signatures.length; _a++) { - var signature = signatures[_a]; - if (!signature.hasStringLiterals && !isSignatureAssignableTo(bodySignature, signature)) { - error(signature.declaration, ts.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation); - break; - } - } - } - } - } - } - function checkExportsOnMergedDeclarations(node) { - if (!produceDiagnostics) { - return; - } - // Exports should be checked only if enclosing module contains both exported and non exported declarations. - // In case if all declarations are non-exported check is unnecessary. - // if localSymbol is defined on node then node itself is exported - check is required - var symbol = node.localSymbol; - if (!symbol) { - // local symbol is undefined => this declaration is non-exported. - // however symbol might contain other declarations that are exported - symbol = getSymbolOfNode(node); - if (!(symbol.flags & 7340032 /* Export */)) { - // this is a pure local symbol (all declarations are non-exported) - no need to check anything - return; - } - } - // run the check only for the first declaration in the list - if (ts.getDeclarationOfKind(symbol, node.kind) !== node) { - return; - } - // we use SymbolFlags.ExportValue, SymbolFlags.ExportType and SymbolFlags.ExportNamespace - // to denote disjoint declarationSpaces (without making new enum type). - var exportedDeclarationSpaces = 0; - var nonExportedDeclarationSpaces = 0; - ts.forEach(symbol.declarations, function (d) { - var declarationSpaces = getDeclarationSpaces(d); - if (getEffectiveDeclarationFlags(d, 1 /* Export */)) { - exportedDeclarationSpaces |= declarationSpaces; - } - else { - nonExportedDeclarationSpaces |= declarationSpaces; - } - }); - var commonDeclarationSpace = exportedDeclarationSpaces & nonExportedDeclarationSpaces; - if (commonDeclarationSpace) { - // declaration spaces for exported and non-exported declarations intersect - ts.forEach(symbol.declarations, function (d) { - if (getDeclarationSpaces(d) & commonDeclarationSpace) { - error(d.name, ts.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local, ts.declarationNameToString(d.name)); - } - }); - } - function getDeclarationSpaces(d) { - switch (d.kind) { - case 205 /* InterfaceDeclaration */: - return 2097152 /* ExportType */; - case 208 /* ModuleDeclaration */: - return d.name.kind === 8 /* StringLiteral */ || ts.getModuleInstanceState(d) !== 0 /* NonInstantiated */ - ? 4194304 /* ExportNamespace */ | 1048576 /* ExportValue */ - : 4194304 /* ExportNamespace */; - case 204 /* ClassDeclaration */: - case 207 /* EnumDeclaration */: - return 2097152 /* ExportType */ | 1048576 /* ExportValue */; - case 211 /* ImportEqualsDeclaration */: - var result = 0; - var target = resolveAlias(getSymbolOfNode(d)); - ts.forEach(target.declarations, function (d) { result |= getDeclarationSpaces(d); }); - return result; - default: - return 1048576 /* ExportValue */; - } - } - } - /** Check a decorator */ - function checkDecorator(node) { - var expression = node.expression; - var exprType = checkExpression(expression); - switch (node.parent.kind) { - case 204 /* ClassDeclaration */: - var classSymbol = getSymbolOfNode(node.parent); - var classConstructorType = getTypeOfSymbol(classSymbol); - var classDecoratorType = instantiateSingleCallFunctionType(getGlobalClassDecoratorType(), [classConstructorType]); - checkTypeAssignableTo(exprType, classDecoratorType, node); - break; - case 134 /* PropertyDeclaration */: - checkTypeAssignableTo(exprType, getGlobalPropertyDecoratorType(), node); - break; - case 136 /* MethodDeclaration */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - var methodType = getTypeOfNode(node.parent); - var methodDecoratorType = instantiateSingleCallFunctionType(getGlobalMethodDecoratorType(), [methodType]); - checkTypeAssignableTo(exprType, methodDecoratorType, node); - break; - case 131 /* Parameter */: - checkTypeAssignableTo(exprType, getGlobalParameterDecoratorType(), node); - break; - } - } - /** Checks a type reference node as an expression. */ - function checkTypeNodeAsExpression(node) { - // When we are emitting type metadata for decorators, we need to try to check the type - // as if it were an expression so that we can emit the type in a value position when we - // serialize the type metadata. - if (node && node.kind === 144 /* TypeReference */) { - var type = getTypeFromTypeNode(node); - var shouldCheckIfUnknownType = type === unknownType && compilerOptions.isolatedModules; - if (!type || (!shouldCheckIfUnknownType && type.flags & (2097279 /* Intrinsic */ | 132 /* NumberLike */ | 258 /* StringLike */))) { - return; - } - if (shouldCheckIfUnknownType || type.symbol.valueDeclaration) { - checkExpressionOrQualifiedName(node.typeName); - } - } - } - /** - * Checks the type annotation of an accessor declaration or property declaration as - * an expression if it is a type reference to a type with a value declaration. - */ - function checkTypeAnnotationAsExpression(node) { - switch (node.kind) { - case 134 /* PropertyDeclaration */: - checkTypeNodeAsExpression(node.type); - break; - case 131 /* Parameter */: - checkTypeNodeAsExpression(node.type); - break; - case 136 /* MethodDeclaration */: - checkTypeNodeAsExpression(node.type); - break; - case 138 /* GetAccessor */: - checkTypeNodeAsExpression(node.type); - break; - case 139 /* SetAccessor */: - checkTypeNodeAsExpression(getSetAccessorTypeAnnotationNode(node)); - break; - } - } - /** Checks the type annotation of the parameters of a function/method or the constructor of a class as expressions */ - function checkParameterTypeAnnotationsAsExpressions(node) { - // ensure all type annotations with a value declaration are checked as an expression - for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) { - var parameter = _a[_i]; - checkTypeAnnotationAsExpression(parameter); - } - } - /** Check the decorators of a node */ - function checkDecorators(node) { - if (!node.decorators) { - return; - } - // skip this check for nodes that cannot have decorators. These should have already had an error reported by - // checkGrammarDecorators. - if (!ts.nodeCanBeDecorated(node)) { - return; - } - if (!compilerOptions.experimentalDecorators) { - error(node, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalDecorators_to_remove_this_warning); - } - if (compilerOptions.emitDecoratorMetadata) { - // we only need to perform these checks if we are emitting serialized type metadata for the target of a decorator. - switch (node.kind) { - case 204 /* ClassDeclaration */: - var constructor = ts.getFirstConstructorWithBody(node); - if (constructor) { - checkParameterTypeAnnotationsAsExpressions(constructor); - } - break; - case 136 /* MethodDeclaration */: - checkParameterTypeAnnotationsAsExpressions(node); - // fall-through - case 139 /* SetAccessor */: - case 138 /* GetAccessor */: - case 134 /* PropertyDeclaration */: - case 131 /* Parameter */: - checkTypeAnnotationAsExpression(node); - break; - } - } - emitDecorate = true; - if (node.kind === 131 /* Parameter */) { - emitParam = true; - } - ts.forEach(node.decorators, checkDecorator); - } - function checkFunctionDeclaration(node) { - if (produceDiagnostics) { - checkFunctionLikeDeclaration(node) || - checkGrammarFunctionName(node.name) || - checkGrammarForGenerator(node); - checkCollisionWithCapturedSuperVariable(node, node.name); - checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - } - } - function checkFunctionLikeDeclaration(node) { - checkGrammarDeclarationNameInStrictMode(node); - checkDecorators(node); - checkSignatureDeclaration(node); - // Do not use hasDynamicName here, because that returns false for well known symbols. - // We want to perform checkComputedPropertyName for all computed properties, including - // well known symbols. - if (node.name && node.name.kind === 129 /* ComputedPropertyName */) { - // This check will account for methods in class/interface declarations, - // as well as accessors in classes/object literals - checkComputedPropertyName(node.name); - } - if (!ts.hasDynamicName(node)) { - // first we want to check the local symbol that contain this declaration - // - if node.localSymbol !== undefined - this is current declaration is exported and localSymbol points to the local symbol - // - if node.localSymbol === undefined - this node is non-exported so we can just pick the result of getSymbolOfNode - var symbol = getSymbolOfNode(node); - var localSymbol = node.localSymbol || symbol; - var firstDeclaration = ts.getDeclarationOfKind(localSymbol, node.kind); - // Only type check the symbol once - if (node === firstDeclaration) { - checkFunctionOrConstructorSymbol(localSymbol); - } - if (symbol.parent) { - // run check once for the first declaration - if (ts.getDeclarationOfKind(symbol, node.kind) === node) { - // run check on export symbol to check that modifiers agree across all exported declarations - checkFunctionOrConstructorSymbol(symbol); - } - } - } - checkSourceElement(node.body); - if (node.type && !isAccessor(node.kind) && !node.asteriskToken) { - checkIfNonVoidFunctionHasReturnExpressionsOrSingleThrowStatment(node, getTypeFromTypeNode(node.type)); - } - if (produceDiagnostics && !node.type) { - // Report an implicit any error if there is no body, no explicit return type, and node is not a private method - // in an ambient context - if (compilerOptions.noImplicitAny && ts.nodeIsMissing(node.body) && !isPrivateWithinAmbient(node)) { - reportImplicitAnyError(node, anyType); - } - if (node.asteriskToken && ts.nodeIsPresent(node.body)) { - // A generator with a body and no type annotation can still cause errors. It can error if the - // yielded values have no common supertype, or it can give an implicit any error if it has no - // yielded values. The only way to trigger these errors is to try checking its return type. - getReturnTypeOfSignature(getSignatureFromDeclaration(node)); - } - } - } - function checkBlock(node) { - // Grammar checking for SyntaxKind.Block - if (node.kind === 182 /* Block */) { - checkGrammarStatementInAmbientContext(node); - } - ts.forEach(node.statements, checkSourceElement); - if (ts.isFunctionBlock(node) || node.kind === 209 /* ModuleBlock */) { - checkFunctionExpressionBodies(node); - } - } - function checkCollisionWithArgumentsInGeneratedCode(node) { - // no rest parameters \ declaration context \ overload - no codegen impact - if (!ts.hasRestParameter(node) || ts.isInAmbientContext(node) || ts.nodeIsMissing(node.body)) { - return; - } - ts.forEach(node.parameters, function (p) { - if (p.name && !ts.isBindingPattern(p.name) && p.name.text === argumentsSymbol.name) { - error(p, ts.Diagnostics.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters); - } - }); - } - function needCollisionCheckForIdentifier(node, identifier, name) { - if (!(identifier && identifier.text === name)) { - return false; - } - if (node.kind === 134 /* PropertyDeclaration */ || - node.kind === 133 /* PropertySignature */ || - node.kind === 136 /* MethodDeclaration */ || - node.kind === 135 /* MethodSignature */ || - node.kind === 138 /* GetAccessor */ || - node.kind === 139 /* SetAccessor */) { - // it is ok to have member named '_super' or '_this' - member access is always qualified - return false; - } - if (ts.isInAmbientContext(node)) { - // ambient context - no codegen impact - return false; - } - var root = ts.getRootDeclaration(node); - if (root.kind === 131 /* Parameter */ && ts.nodeIsMissing(root.parent.body)) { - // just an overload - no codegen impact - return false; - } - return true; - } - function checkCollisionWithCapturedThisVariable(node, name) { - if (needCollisionCheckForIdentifier(node, name, "_this")) { - potentialThisCollisions.push(node); - } - } - // this function will run after checking the source file so 'CaptureThis' is correct for all nodes - function checkIfThisIsCapturedInEnclosingScope(node) { - var current = node; - while (current) { - if (getNodeCheckFlags(current) & 4 /* CaptureThis */) { - var isDeclaration_1 = node.kind !== 65 /* Identifier */; - if (isDeclaration_1) { - error(node.name, ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference); - } - else { - error(node, ts.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference); - } - return; - } - current = current.parent; - } - } - function checkCollisionWithCapturedSuperVariable(node, name) { - if (!needCollisionCheckForIdentifier(node, name, "_super")) { - return; - } - // bubble up and find containing type - var enclosingClass = ts.getAncestor(node, 204 /* ClassDeclaration */); - // if containing type was not found or it is ambient - exit (no codegen) - if (!enclosingClass || ts.isInAmbientContext(enclosingClass)) { - return; - } - if (ts.getClassExtendsHeritageClauseElement(enclosingClass)) { - var isDeclaration_2 = node.kind !== 65 /* Identifier */; - if (isDeclaration_2) { - error(node, ts.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference); - } - else { - error(node, ts.Diagnostics.Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference); - } - } - } - function checkCollisionWithRequireExportsInGeneratedCode(node, name) { - if (!needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) { - return; - } - // Uninstantiated modules shouldnt do this check - if (node.kind === 208 /* ModuleDeclaration */ && ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { - return; - } - // In case of variable declaration, node.parent is variable statement so look at the variable statement's parent - var parent = getDeclarationContainer(node); - if (parent.kind === 230 /* SourceFile */ && ts.isExternalModule(parent)) { - // If the declaration happens to be in external module, report error that require and exports are reserved keywords - error(name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name)); - } - } - function checkVarDeclaredNamesNotShadowed(node) { - // - ScriptBody : StatementList - // It is a Syntax Error if any element of the LexicallyDeclaredNames of StatementList - // also occurs in the VarDeclaredNames of StatementList. - // - Block : { StatementList } - // It is a Syntax Error if any element of the LexicallyDeclaredNames of StatementList - // also occurs in the VarDeclaredNames of StatementList. - // Variable declarations are hoisted to the top of their function scope. They can shadow - // block scoped declarations, which bind tighter. this will not be flagged as duplicate definition - // by the binder as the declaration scope is different. - // A non-initialized declaration is a no-op as the block declaration will resolve before the var - // declaration. the problem is if the declaration has an initializer. this will act as a write to the - // block declared value. this is fine for let, but not const. - // Only consider declarations with initializers, uninitialized let declarations will not - // step on a let/const variable. - // Do not consider let and const declarations, as duplicate block-scoped declarations - // are handled by the binder. - // We are only looking for let declarations that step on let\const declarations from a - // different scope. e.g.: - // { - // const x = 0; // localDeclarationSymbol obtained after name resolution will correspond to this declaration - // let x = 0; // symbol for this declaration will be 'symbol' - // } - // skip block-scoped variables and parameters - if ((ts.getCombinedNodeFlags(node) & 12288 /* BlockScoped */) !== 0 || ts.isParameterDeclaration(node)) { - return; - } - // skip variable declarations that don't have initializers - // NOTE: in ES6 spec initializer is required in variable declarations where name is binding pattern - // so we'll always treat binding elements as initialized - if (node.kind === 201 /* VariableDeclaration */ && !node.initializer) { - return; - } - var symbol = getSymbolOfNode(node); - if (symbol.flags & 1 /* FunctionScopedVariable */) { - var localDeclarationSymbol = resolveName(node, node.name.text, 3 /* Variable */, undefined, undefined); - if (localDeclarationSymbol && - localDeclarationSymbol !== symbol && - localDeclarationSymbol.flags & 2 /* BlockScopedVariable */) { - if (getDeclarationFlagsFromSymbol(localDeclarationSymbol) & 12288 /* BlockScoped */) { - var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 202 /* VariableDeclarationList */); - var container = varDeclList.parent.kind === 183 /* VariableStatement */ && varDeclList.parent.parent - ? varDeclList.parent.parent - : undefined; - // names of block-scoped and function scoped variables can collide only - // if block scoped variable is defined in the function\module\source file scope (because of variable hoisting) - var namesShareScope = container && - (container.kind === 182 /* Block */ && ts.isFunctionLike(container.parent) || - container.kind === 209 /* ModuleBlock */ || - container.kind === 208 /* ModuleDeclaration */ || - container.kind === 230 /* SourceFile */); - // here we know that function scoped variable is shadowed by block scoped one - // if they are defined in the same scope - binder has already reported redeclaration error - // otherwise if variable has an initializer - show error that initialization will fail - // since LHS will be block scoped name instead of function scoped - if (!namesShareScope) { - var name_13 = symbolToString(localDeclarationSymbol); - error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name_13, name_13); - } - } - } - } - } - // Check that a parameter initializer contains no references to parameters declared to the right of itself - function checkParameterInitializer(node) { - if (ts.getRootDeclaration(node).kind !== 131 /* Parameter */) { - return; - } - var func = ts.getContainingFunction(node); - visit(node.initializer); - function visit(n) { - if (n.kind === 65 /* Identifier */) { - var referencedSymbol = getNodeLinks(n).resolvedSymbol; - // check FunctionLikeDeclaration.locals (stores parameters\function local variable) - // if it contains entry with a specified name and if this entry matches the resolved symbol - if (referencedSymbol && referencedSymbol !== unknownSymbol && getSymbol(func.locals, referencedSymbol.name, 107455 /* Value */) === referencedSymbol) { - if (referencedSymbol.valueDeclaration.kind === 131 /* Parameter */) { - if (referencedSymbol.valueDeclaration === node) { - error(n, ts.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer, ts.declarationNameToString(node.name)); - return; - } - if (referencedSymbol.valueDeclaration.pos < node.pos) { - // legal case - parameter initializer references some parameter strictly on left of current parameter declaration - return; - } - } - error(n, ts.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it, ts.declarationNameToString(node.name), ts.declarationNameToString(n)); - } - } - else { - ts.forEachChild(n, visit); - } - } - } - // Check variable, parameter, or property declaration - function checkVariableLikeDeclaration(node) { - checkGrammarDeclarationNameInStrictMode(node); - checkDecorators(node); - checkSourceElement(node.type); - // For a computed property, just check the initializer and exit - // Do not use hasDynamicName here, because that returns false for well known symbols. - // We want to perform checkComputedPropertyName for all computed properties, including - // well known symbols. - if (node.name.kind === 129 /* ComputedPropertyName */) { - checkComputedPropertyName(node.name); - if (node.initializer) { - checkExpressionCached(node.initializer); - } - } - // For a binding pattern, check contained binding elements - if (ts.isBindingPattern(node.name)) { - ts.forEach(node.name.elements, checkSourceElement); - } - // For a parameter declaration with an initializer, error and exit if the containing function doesn't have a body - if (node.initializer && ts.getRootDeclaration(node).kind === 131 /* Parameter */ && ts.nodeIsMissing(ts.getContainingFunction(node).body)) { - error(node, ts.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); - return; - } - // For a binding pattern, validate the initializer and exit - if (ts.isBindingPattern(node.name)) { - if (node.initializer) { - checkTypeAssignableTo(checkExpressionCached(node.initializer), getWidenedTypeForVariableLikeDeclaration(node), node, undefined); - checkParameterInitializer(node); - } - return; - } - var symbol = getSymbolOfNode(node); - var type = getTypeOfVariableOrParameterOrProperty(symbol); - if (node === symbol.valueDeclaration) { - // Node is the primary declaration of the symbol, just validate the initializer - if (node.initializer) { - checkTypeAssignableTo(checkExpressionCached(node.initializer), type, node, undefined); - checkParameterInitializer(node); - } - } - else { - // Node is a secondary declaration, check that type is identical to primary declaration and check that - // initializer is consistent with type associated with the node - var declarationType = getWidenedTypeForVariableLikeDeclaration(node); - if (type !== unknownType && declarationType !== unknownType && !isTypeIdenticalTo(type, declarationType)) { - error(node.name, ts.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2, ts.declarationNameToString(node.name), typeToString(type), typeToString(declarationType)); - } - if (node.initializer) { - checkTypeAssignableTo(checkExpressionCached(node.initializer), declarationType, node, undefined); - } - } - if (node.kind !== 134 /* PropertyDeclaration */ && node.kind !== 133 /* PropertySignature */) { - // We know we don't have a binding pattern or computed name here - checkExportsOnMergedDeclarations(node); - if (node.kind === 201 /* VariableDeclaration */ || node.kind === 155 /* BindingElement */) { - checkVarDeclaredNamesNotShadowed(node); - } - checkCollisionWithCapturedSuperVariable(node, node.name); - checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - } - } - function checkVariableDeclaration(node) { - checkGrammarVariableDeclaration(node); - return checkVariableLikeDeclaration(node); - } - function checkBindingElement(node) { - checkGrammarBindingElement(node); - return checkVariableLikeDeclaration(node); - } - function checkVariableStatement(node) { - // Grammar checking - checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarVariableDeclarationList(node.declarationList) || checkGrammarForDisallowedLetOrConstStatement(node); - ts.forEach(node.declarationList.declarations, checkSourceElement); - } - function checkGrammarDisallowedModifiersInBlockOrObjectLiteralExpression(node) { - if (node.modifiers) { - if (inBlockOrObjectLiteralExpression(node)) { - return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); - } - } - } - function inBlockOrObjectLiteralExpression(node) { - while (node) { - if (node.kind === 182 /* Block */ || node.kind === 157 /* ObjectLiteralExpression */) { - return true; - } - node = node.parent; - } - } - function checkExpressionStatement(node) { - // Grammar checking - checkGrammarStatementInAmbientContext(node); - checkExpression(node.expression); - } - function checkIfStatement(node) { - // Grammar checking - checkGrammarStatementInAmbientContext(node); - checkExpression(node.expression); - checkSourceElement(node.thenStatement); - checkSourceElement(node.elseStatement); - } - function checkDoStatement(node) { - // Grammar checking - checkGrammarStatementInAmbientContext(node); - checkSourceElement(node.statement); - checkExpression(node.expression); - } - function checkWhileStatement(node) { - // Grammar checking - checkGrammarStatementInAmbientContext(node); - checkExpression(node.expression); - checkSourceElement(node.statement); - } - function checkForStatement(node) { - // Grammar checking - if (!checkGrammarStatementInAmbientContext(node)) { - if (node.initializer && node.initializer.kind == 202 /* VariableDeclarationList */) { - checkGrammarVariableDeclarationList(node.initializer); - } - } - if (node.initializer) { - if (node.initializer.kind === 202 /* VariableDeclarationList */) { - ts.forEach(node.initializer.declarations, checkVariableDeclaration); - } - else { - checkExpression(node.initializer); - } - } - if (node.condition) - checkExpression(node.condition); - if (node.incrementor) - checkExpression(node.incrementor); - checkSourceElement(node.statement); - } - function checkForOfStatement(node) { - checkGrammarForInOrForOfStatement(node); - // Check the LHS and RHS - // If the LHS is a declaration, just check it as a variable declaration, which will in turn check the RHS - // via checkRightHandSideOfForOf. - // If the LHS is an expression, check the LHS, as a destructuring assignment or as a reference. - // Then check that the RHS is assignable to it. - if (node.initializer.kind === 202 /* VariableDeclarationList */) { - checkForInOrForOfVariableDeclaration(node); - } - else { - var varExpr = node.initializer; - var iteratedType = checkRightHandSideOfForOf(node.expression); - // There may be a destructuring assignment on the left side - if (varExpr.kind === 156 /* ArrayLiteralExpression */ || varExpr.kind === 157 /* ObjectLiteralExpression */) { - // iteratedType may be undefined. In this case, we still want to check the structure of - // varExpr, in particular making sure it's a valid LeftHandSideExpression. But we'd like - // to short circuit the type relation checking as much as possible, so we pass the unknownType. - checkDestructuringAssignment(varExpr, iteratedType || unknownType); - } - else { - var leftType = checkExpression(varExpr); - checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_of_statement, - /*constantVariableMessage*/ ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant); - // iteratedType will be undefined if the rightType was missing properties/signatures - // required to get its iteratedType (like [Symbol.iterator] or next). This may be - // because we accessed properties from anyType, or it may have led to an error inside - // getElementTypeOfIterable. - if (iteratedType) { - checkTypeAssignableTo(iteratedType, leftType, varExpr, undefined); - } - } - } - checkSourceElement(node.statement); - } - function checkForInStatement(node) { - // Grammar checking - checkGrammarForInOrForOfStatement(node); - // TypeScript 1.0 spec (April 2014): 5.4 - // In a 'for-in' statement of the form - // for (let VarDecl in Expr) Statement - // VarDecl must be a variable declaration without a type annotation that declares a variable of type Any, - // and Expr must be an expression of type Any, an object type, or a type parameter type. - if (node.initializer.kind === 202 /* VariableDeclarationList */) { - var variable = node.initializer.declarations[0]; - if (variable && ts.isBindingPattern(variable.name)) { - error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); - } - checkForInOrForOfVariableDeclaration(node); - } - else { - // In a 'for-in' statement of the form - // for (Var in Expr) Statement - // Var must be an expression classified as a reference of type Any or the String primitive type, - // and Expr must be an expression of type Any, an object type, or a type parameter type. - var varExpr = node.initializer; - var leftType = checkExpression(varExpr); - if (varExpr.kind === 156 /* ArrayLiteralExpression */ || varExpr.kind === 157 /* ObjectLiteralExpression */) { - error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern); - } - else if (!isTypeAnyOrAllConstituentTypesHaveKind(leftType, 258 /* StringLike */)) { - error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any); - } - else { - // run check only former check succeeded to avoid cascading errors - checkReferenceExpression(varExpr, ts.Diagnostics.Invalid_left_hand_side_in_for_in_statement, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant); - } - } - var rightType = checkExpression(node.expression); - // unknownType is returned i.e. if node.expression is identifier whose name cannot be resolved - // in this case error about missing name is already reported - do not report extra one - if (!isTypeAnyOrAllConstituentTypesHaveKind(rightType, 48128 /* ObjectType */ | 512 /* TypeParameter */)) { - error(node.expression, ts.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter); - } - checkSourceElement(node.statement); - } - function checkForInOrForOfVariableDeclaration(iterationStatement) { - var variableDeclarationList = iterationStatement.initializer; - // checkGrammarForInOrForOfStatement will check that there is exactly one declaration. - if (variableDeclarationList.declarations.length >= 1) { - var decl = variableDeclarationList.declarations[0]; - checkVariableDeclaration(decl); - } - } - function checkRightHandSideOfForOf(rhsExpression) { - var expressionType = getTypeOfExpression(rhsExpression); - return checkIteratedTypeOrElementType(expressionType, rhsExpression, true); - } - function checkIteratedTypeOrElementType(inputType, errorNode, allowStringInput) { - if (isTypeAny(inputType)) { - return inputType; - } - if (languageVersion >= 2 /* ES6 */) { - return checkElementTypeOfIterable(inputType, errorNode); - } - if (allowStringInput) { - return checkElementTypeOfArrayOrString(inputType, errorNode); - } - if (isArrayLikeType(inputType)) { - var indexType = getIndexTypeOfType(inputType, 1 /* Number */); - if (indexType) { - return indexType; - } - } - error(errorNode, ts.Diagnostics.Type_0_is_not_an_array_type, typeToString(inputType)); - return unknownType; - } - /** - * When errorNode is undefined, it means we should not report any errors. - */ - function checkElementTypeOfIterable(iterable, errorNode) { - var elementType = getElementTypeOfIterable(iterable, errorNode); - // Now even though we have extracted the iteratedType, we will have to validate that the type - // passed in is actually an Iterable. - if (errorNode && elementType) { - checkTypeAssignableTo(iterable, createIterableType(elementType), errorNode); - } - return elementType || anyType; - } - /** - * We want to treat type as an iterable, and get the type it is an iterable of. The iterable - * must have the following structure (annotated with the names of the variables below): - * - * { // iterable - * [Symbol.iterator]: { // iteratorFunction - * (): Iterator - * } - * } - * - * T is the type we are after. At every level that involves analyzing return types - * of signatures, we union the return types of all the signatures. - * - * Another thing to note is that at any step of this process, we could run into a dead end, - * meaning either the property is missing, or we run into the anyType. If either of these things - * happens, we return undefined to signal that we could not find the iterated type. If a property - * is missing, and the previous step did not result in 'any', then we also give an error if the - * caller requested it. Then the caller can decide what to do in the case where there is no iterated - * type. This is different from returning anyType, because that would signify that we have matched the - * whole pattern and that T (above) is 'any'. - */ - function getElementTypeOfIterable(type, errorNode) { - if (isTypeAny(type)) { - return undefined; - } - var typeAsIterable = type; - if (!typeAsIterable.iterableElementType) { - // As an optimization, if the type is instantiated directly using the globalIterableType (Iterable), - // then just grab its type argument. - if ((type.flags & 4096 /* Reference */) && type.target === globalIterableType) { - typeAsIterable.iterableElementType = type.typeArguments[0]; - } - else { - var iteratorFunction = getTypeOfPropertyOfType(type, ts.getPropertyNameForKnownSymbolName("iterator")); - if (isTypeAny(iteratorFunction)) { - return undefined; - } - var iteratorFunctionSignatures = iteratorFunction ? getSignaturesOfType(iteratorFunction, 0 /* Call */) : emptyArray; - if (iteratorFunctionSignatures.length === 0) { - if (errorNode) { - error(errorNode, ts.Diagnostics.Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator); - } - return undefined; - } - typeAsIterable.iterableElementType = getElementTypeOfIterator(getUnionType(ts.map(iteratorFunctionSignatures, getReturnTypeOfSignature)), errorNode); - } - } - return typeAsIterable.iterableElementType; - } - /** - * This function has very similar logic as getElementTypeOfIterable, except that it operates on - * Iterators instead of Iterables. Here is the structure: - * - * { // iterator - * next: { // iteratorNextFunction - * (): { // iteratorNextResult - * value: T // iteratorNextValue - * } - * } - * } - * - */ - function getElementTypeOfIterator(type, errorNode) { - if (isTypeAny(type)) { - return undefined; - } - var typeAsIterator = type; - if (!typeAsIterator.iteratorElementType) { - // As an optimization, if the type is instantiated directly using the globalIteratorType (Iterator), - // then just grab its type argument. - if ((type.flags & 4096 /* Reference */) && type.target === globalIteratorType) { - typeAsIterator.iteratorElementType = type.typeArguments[0]; - } - else { - var iteratorNextFunction = getTypeOfPropertyOfType(type, "next"); - if (isTypeAny(iteratorNextFunction)) { - return undefined; - } - var iteratorNextFunctionSignatures = iteratorNextFunction ? getSignaturesOfType(iteratorNextFunction, 0 /* Call */) : emptyArray; - if (iteratorNextFunctionSignatures.length === 0) { - if (errorNode) { - error(errorNode, ts.Diagnostics.An_iterator_must_have_a_next_method); - } - return undefined; - } - var iteratorNextResult = getUnionType(ts.map(iteratorNextFunctionSignatures, getReturnTypeOfSignature)); - if (isTypeAny(iteratorNextResult)) { - return undefined; - } - var iteratorNextValue = getTypeOfPropertyOfType(iteratorNextResult, "value"); - if (!iteratorNextValue) { - if (errorNode) { - error(errorNode, ts.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property); - } - return undefined; - } - typeAsIterator.iteratorElementType = iteratorNextValue; - } - } - return typeAsIterator.iteratorElementType; - } - function getElementTypeOfIterableIterator(type) { - if (isTypeAny(type)) { - return undefined; - } - // As an optimization, if the type is instantiated directly using the globalIterableIteratorType (IterableIterator), - // then just grab its type argument. - if ((type.flags & 4096 /* Reference */) && type.target === globalIterableIteratorType) { - return type.typeArguments[0]; - } - return getElementTypeOfIterable(type, undefined) || - getElementTypeOfIterator(type, undefined); - } - /** - * This function does the following steps: - * 1. Break up arrayOrStringType (possibly a union) into its string constituents and array constituents. - * 2. Take the element types of the array constituents. - * 3. Return the union of the element types, and string if there was a string constitutent. - * - * For example: - * string -> string - * number[] -> number - * string[] | number[] -> string | number - * string | number[] -> string | number - * string | string[] | number[] -> string | number - * - * It also errors if: - * 1. Some constituent is neither a string nor an array. - * 2. Some constituent is a string and target is less than ES5 (because in ES3 string is not indexable). - */ - function checkElementTypeOfArrayOrString(arrayOrStringType, errorNode) { - ts.Debug.assert(languageVersion < 2 /* ES6 */); - // After we remove all types that are StringLike, we will know if there was a string constituent - // based on whether the remaining type is the same as the initial type. - var arrayType = removeTypesFromUnionType(arrayOrStringType, 258 /* StringLike */, true, true); - var hasStringConstituent = arrayOrStringType !== arrayType; - var reportedError = false; - if (hasStringConstituent) { - if (languageVersion < 1 /* ES5 */) { - error(errorNode, ts.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher); - reportedError = true; - } - // Now that we've removed all the StringLike types, if no constituents remain, then the entire - // arrayOrStringType was a string. - if (arrayType === emptyObjectType) { - return stringType; - } - } - if (!isArrayLikeType(arrayType)) { - if (!reportedError) { - // Which error we report depends on whether there was a string constituent. For example, - // if the input type is number | string, we want to say that number is not an array type. - // But if the input was just number, we want to say that number is not an array type - // or a string type. - var diagnostic = hasStringConstituent - ? ts.Diagnostics.Type_0_is_not_an_array_type - : ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type; - error(errorNode, diagnostic, typeToString(arrayType)); - } - return hasStringConstituent ? stringType : unknownType; - } - var arrayElementType = getIndexTypeOfType(arrayType, 1 /* Number */) || unknownType; - if (hasStringConstituent) { - // This is just an optimization for the case where arrayOrStringType is string | string[] - if (arrayElementType.flags & 258 /* StringLike */) { - return stringType; - } - return getUnionType([arrayElementType, stringType]); - } - return arrayElementType; - } - function checkBreakOrContinueStatement(node) { - // Grammar checking - checkGrammarStatementInAmbientContext(node) || checkGrammarBreakOrContinueStatement(node); - // TODO: Check that target label is valid - } - function isGetAccessorWithAnnotatatedSetAccessor(node) { - return !!(node.kind === 138 /* GetAccessor */ && getSetAccessorTypeAnnotationNode(ts.getDeclarationOfKind(node.symbol, 139 /* SetAccessor */))); - } - function checkReturnStatement(node) { - // Grammar checking - if (!checkGrammarStatementInAmbientContext(node)) { - var functionBlock = ts.getContainingFunction(node); - if (!functionBlock) { - grammarErrorOnFirstToken(node, ts.Diagnostics.A_return_statement_can_only_be_used_within_a_function_body); - } - } - if (node.expression) { - var func = ts.getContainingFunction(node); - if (func) { - var signature = getSignatureFromDeclaration(func); - var returnType = getReturnTypeOfSignature(signature); - var exprType = checkExpressionCached(node.expression); - if (func.asteriskToken) { - // A generator does not need its return expressions checked against its return type. - // Instead, the yield expressions are checked against the element type. - // TODO: Check return expressions of generators when return type tracking is added - // for generators. - return; - } - if (func.kind === 139 /* SetAccessor */) { - error(node.expression, ts.Diagnostics.Setters_cannot_return_a_value); - } - else if (func.kind === 137 /* Constructor */) { - if (!isTypeAssignableTo(exprType, returnType)) { - error(node.expression, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class); - } - } - else if (func.type || isGetAccessorWithAnnotatatedSetAccessor(func) || signature.typePredicate) { - checkTypeAssignableTo(exprType, returnType, node.expression, undefined); - } - } - } - } - function checkWithStatement(node) { - // Grammar checking for withStatement - if (!checkGrammarStatementInAmbientContext(node)) { - if (node.parserContextFlags & 1 /* StrictMode */) { - grammarErrorOnFirstToken(node, ts.Diagnostics.with_statements_are_not_allowed_in_strict_mode); - } - } - checkExpression(node.expression); - error(node.expression, ts.Diagnostics.All_symbols_within_a_with_block_will_be_resolved_to_any); - } - function checkSwitchStatement(node) { - // Grammar checking - checkGrammarStatementInAmbientContext(node); - var firstDefaultClause; - var hasDuplicateDefaultClause = false; - var expressionType = checkExpression(node.expression); - ts.forEach(node.caseBlock.clauses, function (clause) { - // Grammar check for duplicate default clauses, skip if we already report duplicate default clause - if (clause.kind === 224 /* DefaultClause */ && !hasDuplicateDefaultClause) { - if (firstDefaultClause === undefined) { - firstDefaultClause = clause; - } - else { - var sourceFile = ts.getSourceFileOfNode(node); - var start = ts.skipTrivia(sourceFile.text, clause.pos); - var end = clause.statements.length > 0 ? clause.statements[0].pos : clause.end; - grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement); - hasDuplicateDefaultClause = true; - } - } - if (produceDiagnostics && clause.kind === 223 /* CaseClause */) { - var caseClause = clause; - // TypeScript 1.0 spec (April 2014):5.9 - // In a 'switch' statement, each 'case' expression must be of a type that is assignable to or from the type of the 'switch' expression. - var caseType = checkExpression(caseClause.expression); - if (!isTypeAssignableTo(expressionType, caseType)) { - // check 'expressionType isAssignableTo caseType' failed, try the reversed check and report errors if it fails - checkTypeAssignableTo(caseType, expressionType, caseClause.expression, undefined); - } - } - ts.forEach(clause.statements, checkSourceElement); - }); - } - function checkLabeledStatement(node) { - // Grammar checking - if (!checkGrammarStatementInAmbientContext(node)) { - var current = node.parent; - while (current) { - if (ts.isFunctionLike(current)) { - break; - } - if (current.kind === 197 /* LabeledStatement */ && current.label.text === node.label.text) { - var sourceFile = ts.getSourceFileOfNode(node); - grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNodeFromSourceText(sourceFile.text, node.label)); - break; - } - current = current.parent; - } - } - // ensure that label is unique - checkSourceElement(node.statement); - } - function checkThrowStatement(node) { - // Grammar checking - if (!checkGrammarStatementInAmbientContext(node)) { - if (node.expression === undefined) { - grammarErrorAfterFirstToken(node, ts.Diagnostics.Line_break_not_permitted_here); - } - } - if (node.expression) { - checkExpression(node.expression); - } - } - function checkTryStatement(node) { - // Grammar checking - checkGrammarStatementInAmbientContext(node); - checkBlock(node.tryBlock); - var catchClause = node.catchClause; - if (catchClause) { - // Grammar checking - if (catchClause.variableDeclaration) { - if (catchClause.variableDeclaration.name.kind !== 65 /* Identifier */) { - grammarErrorOnFirstToken(catchClause.variableDeclaration.name, ts.Diagnostics.Catch_clause_variable_name_must_be_an_identifier); - } - else if (catchClause.variableDeclaration.type) { - grammarErrorOnFirstToken(catchClause.variableDeclaration.type, ts.Diagnostics.Catch_clause_variable_cannot_have_a_type_annotation); - } - else if (catchClause.variableDeclaration.initializer) { - grammarErrorOnFirstToken(catchClause.variableDeclaration.initializer, ts.Diagnostics.Catch_clause_variable_cannot_have_an_initializer); - } - else { - var identifierName = catchClause.variableDeclaration.name.text; - var locals = catchClause.block.locals; - if (locals && ts.hasProperty(locals, identifierName)) { - var localSymbol = locals[identifierName]; - if (localSymbol && (localSymbol.flags & 2 /* BlockScopedVariable */) !== 0) { - grammarErrorOnNode(localSymbol.valueDeclaration, ts.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, identifierName); - } - } - // It is a SyntaxError if a TryStatement with a Catch occurs within strict code and the Identifier of the - // Catch production is eval or arguments - checkGrammarEvalOrArgumentsInStrictMode(node, catchClause.variableDeclaration.name); - } - } - checkBlock(catchClause.block); - } - if (node.finallyBlock) { - checkBlock(node.finallyBlock); - } - } - function checkIndexConstraints(type) { - var declaredNumberIndexer = getIndexDeclarationOfSymbol(type.symbol, 1 /* Number */); - var declaredStringIndexer = getIndexDeclarationOfSymbol(type.symbol, 0 /* String */); - var stringIndexType = getIndexTypeOfType(type, 0 /* String */); - var numberIndexType = getIndexTypeOfType(type, 1 /* Number */); - if (stringIndexType || numberIndexType) { - ts.forEach(getPropertiesOfObjectType(type), function (prop) { - var propType = getTypeOfSymbol(prop); - checkIndexConstraintForProperty(prop, propType, type, declaredStringIndexer, stringIndexType, 0 /* String */); - checkIndexConstraintForProperty(prop, propType, type, declaredNumberIndexer, numberIndexType, 1 /* Number */); - }); - if (type.flags & 1024 /* Class */ && type.symbol.valueDeclaration.kind === 204 /* ClassDeclaration */) { - var classDeclaration = type.symbol.valueDeclaration; - for (var _i = 0, _a = classDeclaration.members; _i < _a.length; _i++) { - var member = _a[_i]; - // Only process instance properties with computed names here. - // Static properties cannot be in conflict with indexers, - // and properties with literal names were already checked. - if (!(member.flags & 128 /* Static */) && ts.hasDynamicName(member)) { - var propType = getTypeOfSymbol(member.symbol); - checkIndexConstraintForProperty(member.symbol, propType, type, declaredStringIndexer, stringIndexType, 0 /* String */); - checkIndexConstraintForProperty(member.symbol, propType, type, declaredNumberIndexer, numberIndexType, 1 /* Number */); - } - } - } - } - var errorNode; - if (stringIndexType && numberIndexType) { - errorNode = declaredNumberIndexer || declaredStringIndexer; - // condition 'errorNode === undefined' may appear if types does not declare nor string neither number indexer - if (!errorNode && (type.flags & 2048 /* Interface */)) { - var someBaseTypeHasBothIndexers = ts.forEach(getBaseTypes(type), function (base) { return getIndexTypeOfType(base, 0 /* String */) && getIndexTypeOfType(base, 1 /* Number */); }); - errorNode = someBaseTypeHasBothIndexers ? undefined : type.symbol.declarations[0]; - } - } - if (errorNode && !isTypeAssignableTo(numberIndexType, stringIndexType)) { - error(errorNode, ts.Diagnostics.Numeric_index_type_0_is_not_assignable_to_string_index_type_1, typeToString(numberIndexType), typeToString(stringIndexType)); - } - function checkIndexConstraintForProperty(prop, propertyType, containingType, indexDeclaration, indexType, indexKind) { - if (!indexType) { - return; - } - // index is numeric and property name is not valid numeric literal - if (indexKind === 1 /* Number */ && !isNumericName(prop.valueDeclaration.name)) { - return; - } - // perform property check if property or indexer is declared in 'type' - // this allows to rule out cases when both property and indexer are inherited from the base class - var errorNode; - if (prop.valueDeclaration.name.kind === 129 /* ComputedPropertyName */ || prop.parent === containingType.symbol) { - errorNode = prop.valueDeclaration; - } - else if (indexDeclaration) { - errorNode = indexDeclaration; - } - else if (containingType.flags & 2048 /* Interface */) { - // for interfaces property and indexer might be inherited from different bases - // check if any base class already has both property and indexer. - // check should be performed only if 'type' is the first type that brings property\indexer together - var someBaseClassHasBothPropertyAndIndexer = ts.forEach(getBaseTypes(containingType), function (base) { return getPropertyOfObjectType(base, prop.name) && getIndexTypeOfType(base, indexKind); }); - errorNode = someBaseClassHasBothPropertyAndIndexer ? undefined : containingType.symbol.declarations[0]; - } - if (errorNode && !isTypeAssignableTo(propertyType, indexType)) { - var errorMessage = indexKind === 0 /* String */ - ? ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2 - : ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2; - error(errorNode, errorMessage, symbolToString(prop), typeToString(propertyType), typeToString(indexType)); - } - } - } - function checkTypeNameIsReserved(name, message) { - // TS 1.0 spec (April 2014): 3.6.1 - // The predefined type keywords are reserved and cannot be used as names of user defined types. - switch (name.text) { - case "any": - case "number": - case "boolean": - case "string": - case "symbol": - case "void": - error(name, message, name.text); - } - } - // Check each type parameter and check that list has no duplicate type parameter declarations - function checkTypeParameters(typeParameterDeclarations) { - if (typeParameterDeclarations) { - for (var i = 0, n = typeParameterDeclarations.length; i < n; i++) { - var node = typeParameterDeclarations[i]; - checkTypeParameter(node); - if (produceDiagnostics) { - for (var j = 0; j < i; j++) { - if (typeParameterDeclarations[j].symbol === node.symbol) { - error(node.name, ts.Diagnostics.Duplicate_identifier_0, ts.declarationNameToString(node.name)); - } - } - } - } - } - } - function checkClassExpression(node) { - grammarErrorOnNode(node, ts.Diagnostics.class_expressions_are_not_currently_supported); - ts.forEach(node.members, checkSourceElement); - return unknownType; - } - function checkClassDeclaration(node) { - checkGrammarDeclarationNameInStrictMode(node); - // Grammar checking - if (!node.name && !(node.flags & 256 /* Default */)) { - grammarErrorOnFirstToken(node, ts.Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name); - } - checkGrammarClassDeclarationHeritageClauses(node); - checkDecorators(node); - if (node.name) { - checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0); - checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - } - checkTypeParameters(node.typeParameters); - checkExportsOnMergedDeclarations(node); - var symbol = getSymbolOfNode(node); - var type = getDeclaredTypeOfSymbol(symbol); - var staticType = getTypeOfSymbol(symbol); - var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node); - if (baseTypeNode) { - if (!ts.isSupportedExpressionWithTypeArguments(baseTypeNode)) { - error(baseTypeNode.expression, ts.Diagnostics.Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses); - } - emitExtends = emitExtends || !ts.isInAmbientContext(node); - checkExpressionWithTypeArguments(baseTypeNode); - } - var baseTypes = getBaseTypes(type); - if (baseTypes.length) { - if (produceDiagnostics) { - var baseType = baseTypes[0]; - checkTypeAssignableTo(type, baseType, node.name || node, ts.Diagnostics.Class_0_incorrectly_extends_base_class_1); - var staticBaseType = getTypeOfSymbol(baseType.symbol); - checkTypeAssignableTo(staticType, getTypeWithoutConstructors(staticBaseType), node.name || node, ts.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1); - if (baseType.symbol !== resolveEntityName(baseTypeNode.expression, 107455 /* Value */)) { - error(baseTypeNode, ts.Diagnostics.Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0, typeToString(baseType)); - } - checkKindsOfPropertyMemberOverrides(type, baseType); - } - } - if (baseTypes.length || (baseTypeNode && compilerOptions.isolatedModules)) { - // Check that base type can be evaluated as expression - checkExpressionOrQualifiedName(baseTypeNode.expression); - } - var implementedTypeNodes = ts.getClassImplementsHeritageClauseElements(node); - if (implementedTypeNodes) { - ts.forEach(implementedTypeNodes, function (typeRefNode) { - if (!ts.isSupportedExpressionWithTypeArguments(typeRefNode)) { - error(typeRefNode.expression, ts.Diagnostics.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments); - } - checkExpressionWithTypeArguments(typeRefNode); - if (produceDiagnostics) { - var t = getTypeFromTypeNode(typeRefNode); - if (t !== unknownType) { - var declaredType = (t.flags & 4096 /* Reference */) ? t.target : t; - if (declaredType.flags & (1024 /* Class */ | 2048 /* Interface */)) { - checkTypeAssignableTo(type, t, node.name || node, ts.Diagnostics.Class_0_incorrectly_implements_interface_1); - } - else { - error(typeRefNode, ts.Diagnostics.A_class_may_only_implement_another_class_or_interface); - } - } - } - }); - } - ts.forEach(node.members, checkSourceElement); - if (produceDiagnostics) { - checkIndexConstraints(type); - checkTypeForDuplicateIndexSignatures(node); - } - } - function getTargetSymbol(s) { - // if symbol is instantiated its flags are not copied from the 'target' - // so we'll need to get back original 'target' symbol to work with correct set of flags - return s.flags & 16777216 /* Instantiated */ ? getSymbolLinks(s).target : s; - } - function checkKindsOfPropertyMemberOverrides(type, baseType) { - // TypeScript 1.0 spec (April 2014): 8.2.3 - // A derived class inherits all members from its base class it doesn't override. - // Inheritance means that a derived class implicitly contains all non - overridden members of the base class. - // Both public and private property members are inherited, but only public property members can be overridden. - // A property member in a derived class is said to override a property member in a base class - // when the derived class property member has the same name and kind(instance or static) - // as the base class property member. - // The type of an overriding property member must be assignable(section 3.8.4) - // to the type of the overridden property member, or otherwise a compile - time error occurs. - // Base class instance member functions can be overridden by derived class instance member functions, - // but not by other kinds of members. - // Base class instance member variables and accessors can be overridden by - // derived class instance member variables and accessors, but not by other kinds of members. - // NOTE: assignability is checked in checkClassDeclaration - var baseProperties = getPropertiesOfObjectType(baseType); - for (var _i = 0; _i < baseProperties.length; _i++) { - var baseProperty = baseProperties[_i]; - var base = getTargetSymbol(baseProperty); - if (base.flags & 134217728 /* Prototype */) { - continue; - } - var derived = getTargetSymbol(getPropertyOfObjectType(type, base.name)); - if (derived) { - var baseDeclarationFlags = getDeclarationFlagsFromSymbol(base); - var derivedDeclarationFlags = getDeclarationFlagsFromSymbol(derived); - if ((baseDeclarationFlags & 32 /* Private */) || (derivedDeclarationFlags & 32 /* Private */)) { - // either base or derived property is private - not override, skip it - continue; - } - if ((baseDeclarationFlags & 128 /* Static */) !== (derivedDeclarationFlags & 128 /* Static */)) { - // value of 'static' is not the same for properties - not override, skip it - continue; - } - if ((base.flags & derived.flags & 8192 /* Method */) || ((base.flags & 98308 /* PropertyOrAccessor */) && (derived.flags & 98308 /* PropertyOrAccessor */))) { - // method is overridden with method or property/accessor is overridden with property/accessor - correct case - continue; - } - var errorMessage = void 0; - if (base.flags & 8192 /* Method */) { - if (derived.flags & 98304 /* Accessor */) { - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; - } - else { - ts.Debug.assert((derived.flags & 4 /* Property */) !== 0); - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property; - } - } - else if (base.flags & 4 /* Property */) { - ts.Debug.assert((derived.flags & 8192 /* Method */) !== 0); - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function; - } - else { - ts.Debug.assert((base.flags & 98304 /* Accessor */) !== 0); - ts.Debug.assert((derived.flags & 8192 /* Method */) !== 0); - errorMessage = ts.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function; - } - error(derived.valueDeclaration.name, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type)); - } - } - } - function isAccessor(kind) { - return kind === 138 /* GetAccessor */ || kind === 139 /* SetAccessor */; - } - function areTypeParametersIdentical(list1, list2) { - if (!list1 && !list2) { - return true; - } - if (!list1 || !list2 || list1.length !== list2.length) { - return false; - } - // TypeScript 1.0 spec (April 2014): - // When a generic interface has multiple declarations, all declarations must have identical type parameter - // lists, i.e. identical type parameter names with identical constraints in identical order. - for (var i = 0, len = list1.length; i < len; i++) { - var tp1 = list1[i]; - var tp2 = list2[i]; - if (tp1.name.text !== tp2.name.text) { - return false; - } - if (!tp1.constraint && !tp2.constraint) { - continue; - } - if (!tp1.constraint || !tp2.constraint) { - return false; - } - if (!isTypeIdenticalTo(getTypeFromTypeNode(tp1.constraint), getTypeFromTypeNode(tp2.constraint))) { - return false; - } - } - return true; - } - function checkInheritedPropertiesAreIdentical(type, typeNode) { - var baseTypes = getBaseTypes(type); - if (baseTypes.length < 2) { - return true; - } - var seen = {}; - ts.forEach(resolveDeclaredMembers(type).declaredProperties, function (p) { seen[p.name] = { prop: p, containingType: type }; }); - var ok = true; - for (var _i = 0; _i < baseTypes.length; _i++) { - var base = baseTypes[_i]; - var properties = getPropertiesOfObjectType(base); - for (var _a = 0; _a < properties.length; _a++) { - var prop = properties[_a]; - if (!ts.hasProperty(seen, prop.name)) { - seen[prop.name] = { prop: prop, containingType: base }; - } - else { - var existing = seen[prop.name]; - var isInheritedProperty = existing.containingType !== type; - if (isInheritedProperty && !isPropertyIdenticalTo(existing.prop, prop)) { - ok = false; - var typeName1 = typeToString(existing.containingType); - var typeName2 = typeToString(base); - var errorInfo = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Named_property_0_of_types_1_and_2_are_not_identical, symbolToString(prop), typeName1, typeName2); - errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2, typeToString(type), typeName1, typeName2); - diagnostics.add(ts.createDiagnosticForNodeFromMessageChain(typeNode, errorInfo)); - } - } - } - } - return ok; - } - function checkInterfaceDeclaration(node) { - // Grammar checking - checkGrammarDeclarationNameInStrictMode(node) || checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarInterfaceDeclaration(node); - checkTypeParameters(node.typeParameters); - if (produceDiagnostics) { - checkTypeNameIsReserved(node.name, ts.Diagnostics.Interface_name_cannot_be_0); - checkExportsOnMergedDeclarations(node); - var symbol = getSymbolOfNode(node); - var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 205 /* InterfaceDeclaration */); - if (symbol.declarations.length > 1) { - if (node !== firstInterfaceDecl && !areTypeParametersIdentical(firstInterfaceDecl.typeParameters, node.typeParameters)) { - error(node.name, ts.Diagnostics.All_declarations_of_an_interface_must_have_identical_type_parameters); - } - } - // Only check this symbol once - if (node === firstInterfaceDecl) { - var type = getDeclaredTypeOfSymbol(symbol); - // run subsequent checks only if first set succeeded - if (checkInheritedPropertiesAreIdentical(type, node.name)) { - ts.forEach(getBaseTypes(type), function (baseType) { - checkTypeAssignableTo(type, baseType, node.name, ts.Diagnostics.Interface_0_incorrectly_extends_interface_1); - }); - checkIndexConstraints(type); - } - } - } - ts.forEach(ts.getInterfaceBaseTypeNodes(node), function (heritageElement) { - if (!ts.isSupportedExpressionWithTypeArguments(heritageElement)) { - error(heritageElement.expression, ts.Diagnostics.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments); - } - checkExpressionWithTypeArguments(heritageElement); - }); - ts.forEach(node.members, checkSourceElement); - if (produceDiagnostics) { - checkTypeForDuplicateIndexSignatures(node); - } - } - function checkTypeAliasDeclaration(node) { - // Grammar checking - checkGrammarDecorators(node) || checkGrammarModifiers(node); - checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_alias_name_cannot_be_0); - checkSourceElement(node.type); - } - function computeEnumMemberValues(node) { - var nodeLinks = getNodeLinks(node); - if (!(nodeLinks.flags & 128 /* EnumValuesComputed */)) { - var enumSymbol = getSymbolOfNode(node); - var enumType = getDeclaredTypeOfSymbol(enumSymbol); - var autoValue = 0; - var ambient = ts.isInAmbientContext(node); - var enumIsConst = ts.isConst(node); - ts.forEach(node.members, function (member) { - if (member.name.kind !== 129 /* ComputedPropertyName */ && isNumericLiteralName(member.name.text)) { - error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name); - } - var initializer = member.initializer; - if (initializer) { - autoValue = getConstantValueForEnumMemberInitializer(initializer); - if (autoValue === undefined) { - if (enumIsConst) { - error(initializer, ts.Diagnostics.In_const_enum_declarations_member_initializer_must_be_constant_expression); - } - else if (!ambient) { - // Only here do we need to check that the initializer is assignable to the enum type. - // If it is a constant value (not undefined), it is syntactically constrained to be a number. - // Also, we do not need to check this for ambients because there is already - // a syntax error if it is not a constant. - checkTypeAssignableTo(checkExpression(initializer), enumType, initializer, undefined); - } - } - else if (enumIsConst) { - if (isNaN(autoValue)) { - error(initializer, ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN); - } - else if (!isFinite(autoValue)) { - error(initializer, ts.Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value); - } - } - } - else if (ambient && !enumIsConst) { - autoValue = undefined; - } - if (autoValue !== undefined) { - getNodeLinks(member).enumMemberValue = autoValue++; - } - }); - nodeLinks.flags |= 128 /* EnumValuesComputed */; - } - function getConstantValueForEnumMemberInitializer(initializer) { - return evalConstant(initializer); - function evalConstant(e) { - switch (e.kind) { - case 170 /* PrefixUnaryExpression */: - var value = evalConstant(e.operand); - if (value === undefined) { - return undefined; - } - switch (e.operator) { - case 33 /* PlusToken */: return value; - case 34 /* MinusToken */: return -value; - case 47 /* TildeToken */: return ~value; - } - return undefined; - case 172 /* BinaryExpression */: - var left = evalConstant(e.left); - if (left === undefined) { - return undefined; - } - var right = evalConstant(e.right); - if (right === undefined) { - return undefined; - } - switch (e.operatorToken.kind) { - case 44 /* BarToken */: return left | right; - case 43 /* AmpersandToken */: return left & right; - case 41 /* GreaterThanGreaterThanToken */: return left >> right; - case 42 /* GreaterThanGreaterThanGreaterThanToken */: return left >>> right; - case 40 /* LessThanLessThanToken */: return left << right; - case 45 /* CaretToken */: return left ^ right; - case 35 /* AsteriskToken */: return left * right; - case 36 /* SlashToken */: return left / right; - case 33 /* PlusToken */: return left + right; - case 34 /* MinusToken */: return left - right; - case 37 /* PercentToken */: return left % right; - } - return undefined; - case 7 /* NumericLiteral */: - return +e.text; - case 164 /* ParenthesizedExpression */: - return evalConstant(e.expression); - case 65 /* Identifier */: - case 159 /* ElementAccessExpression */: - case 158 /* PropertyAccessExpression */: - var member = initializer.parent; - var currentType = getTypeOfSymbol(getSymbolOfNode(member.parent)); - var enumType; - var propertyName; - if (e.kind === 65 /* Identifier */) { - // unqualified names can refer to member that reside in different declaration of the enum so just doing name resolution won't work. - // instead pick current enum type and later try to fetch member from the type - enumType = currentType; - propertyName = e.text; - } - else { - var expression; - if (e.kind === 159 /* ElementAccessExpression */) { - if (e.argumentExpression === undefined || - e.argumentExpression.kind !== 8 /* StringLiteral */) { - return undefined; - } - expression = e.expression; - propertyName = e.argumentExpression.text; - } - else { - expression = e.expression; - propertyName = e.name.text; - } - // expression part in ElementAccess\PropertyAccess should be either identifier or dottedName - var current = expression; - while (current) { - if (current.kind === 65 /* Identifier */) { - break; - } - else if (current.kind === 158 /* PropertyAccessExpression */) { - current = current.expression; - } - else { - return undefined; - } - } - enumType = checkExpression(expression); - // allow references to constant members of other enums - if (!(enumType.symbol && (enumType.symbol.flags & 384 /* Enum */))) { - return undefined; - } - } - if (propertyName === undefined) { - return undefined; - } - var property = getPropertyOfObjectType(enumType, propertyName); - if (!property || !(property.flags & 8 /* EnumMember */)) { - return undefined; - } - var propertyDecl = property.valueDeclaration; - // self references are illegal - if (member === propertyDecl) { - return undefined; - } - // illegal case: forward reference - if (!isDefinedBefore(propertyDecl, member)) { - return undefined; - } - return getNodeLinks(propertyDecl).enumMemberValue; - } - } - } - } - function checkEnumDeclaration(node) { - if (!produceDiagnostics) { - return; - } - // Grammar checking - checkGrammarDeclarationNameInStrictMode(node) || checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarEnumDeclaration(node); - checkTypeNameIsReserved(node.name, ts.Diagnostics.Enum_name_cannot_be_0); - checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - checkExportsOnMergedDeclarations(node); - computeEnumMemberValues(node); - var enumIsConst = ts.isConst(node); - if (compilerOptions.isolatedModules && enumIsConst && ts.isInAmbientContext(node)) { - error(node.name, ts.Diagnostics.Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided); - } - // Spec 2014 - Section 9.3: - // It isn't possible for one enum declaration to continue the automatic numbering sequence of another, - // and when an enum type has multiple declarations, only one declaration is permitted to omit a value - // for the first member. - // - // Only perform this check once per symbol - var enumSymbol = getSymbolOfNode(node); - var firstDeclaration = ts.getDeclarationOfKind(enumSymbol, node.kind); - if (node === firstDeclaration) { - if (enumSymbol.declarations.length > 1) { - // check that const is placed\omitted on all enum declarations - ts.forEach(enumSymbol.declarations, function (decl) { - if (ts.isConstEnumDeclaration(decl) !== enumIsConst) { - error(decl.name, ts.Diagnostics.Enum_declarations_must_all_be_const_or_non_const); - } - }); - } - var seenEnumMissingInitialInitializer = false; - ts.forEach(enumSymbol.declarations, function (declaration) { - // return true if we hit a violation of the rule, false otherwise - if (declaration.kind !== 207 /* EnumDeclaration */) { - return false; - } - var enumDeclaration = declaration; - if (!enumDeclaration.members.length) { - return false; - } - var firstEnumMember = enumDeclaration.members[0]; - if (!firstEnumMember.initializer) { - if (seenEnumMissingInitialInitializer) { - error(firstEnumMember.name, ts.Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element); - } - else { - seenEnumMissingInitialInitializer = true; - } - } - }); - } - } - function getFirstNonAmbientClassOrFunctionDeclaration(symbol) { - var declarations = symbol.declarations; - for (var _i = 0; _i < declarations.length; _i++) { - var declaration = declarations[_i]; - if ((declaration.kind === 204 /* ClassDeclaration */ || - (declaration.kind === 203 /* FunctionDeclaration */ && ts.nodeIsPresent(declaration.body))) && - !ts.isInAmbientContext(declaration)) { - return declaration; - } - } - return undefined; - } - function inSameLexicalScope(node1, node2) { - var container1 = ts.getEnclosingBlockScopeContainer(node1); - var container2 = ts.getEnclosingBlockScopeContainer(node2); - if (isGlobalSourceFile(container1)) { - return isGlobalSourceFile(container2); - } - else if (isGlobalSourceFile(container2)) { - return false; - } - else { - return container1 === container2; - } - } - function checkModuleDeclaration(node) { - if (produceDiagnostics) { - // Grammar checking - var isAmbientExternalModule = node.name.kind === 8 /* StringLiteral */; - var contextErrorMessage = isAmbientExternalModule - ? ts.Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file - : ts.Diagnostics.A_namespace_declaration_is_only_allowed_in_a_namespace_or_module; - if (checkGrammarModuleElementContext(node, contextErrorMessage)) { - // If we hit a module declaration in an illegal context, just bail out to avoid cascading errors. - return; - } - if (!checkGrammarDeclarationNameInStrictMode(node) && !checkGrammarDecorators(node) && !checkGrammarModifiers(node)) { - if (!ts.isInAmbientContext(node) && node.name.kind === 8 /* StringLiteral */) { - grammarErrorOnNode(node.name, ts.Diagnostics.Only_ambient_modules_can_use_quoted_names); - } - } - checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - checkExportsOnMergedDeclarations(node); - var symbol = getSymbolOfNode(node); - // The following checks only apply on a non-ambient instantiated module declaration. - if (symbol.flags & 512 /* ValueModule */ - && symbol.declarations.length > 1 - && !ts.isInAmbientContext(node) - && ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.isolatedModules)) { - var firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); - if (firstNonAmbientClassOrFunc) { - if (ts.getSourceFileOfNode(node) !== ts.getSourceFileOfNode(firstNonAmbientClassOrFunc)) { - error(node.name, ts.Diagnostics.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged); - } - else if (node.pos < firstNonAmbientClassOrFunc.pos) { - error(node.name, ts.Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged); - } - } - // if the module merges with a class declaration in the same lexical scope, - // we need to track this to ensure the correct emit. - var mergedClass = ts.getDeclarationOfKind(symbol, 204 /* ClassDeclaration */); - if (mergedClass && - inSameLexicalScope(node, mergedClass)) { - getNodeLinks(node).flags |= 2048 /* LexicalModuleMergesWithClass */; - } - } - // Checks for ambient external modules. - if (isAmbientExternalModule) { - if (!isGlobalSourceFile(node.parent)) { - error(node.name, ts.Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules); - } - if (isExternalModuleNameRelative(node.name.text)) { - error(node.name, ts.Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name); - } - } - } - checkSourceElement(node.body); - } - function getFirstIdentifier(node) { - while (true) { - if (node.kind === 128 /* QualifiedName */) { - node = node.left; - } - else if (node.kind === 158 /* PropertyAccessExpression */) { - node = node.expression; - } - else { - break; - } - } - ts.Debug.assert(node.kind === 65 /* Identifier */); - return node; - } - function checkExternalImportOrExportDeclaration(node) { - var moduleName = ts.getExternalModuleName(node); - if (!ts.nodeIsMissing(moduleName) && moduleName.kind !== 8 /* StringLiteral */) { - error(moduleName, ts.Diagnostics.String_literal_expected); - return false; - } - var inAmbientExternalModule = node.parent.kind === 209 /* ModuleBlock */ && node.parent.parent.name.kind === 8 /* StringLiteral */; - if (node.parent.kind !== 230 /* SourceFile */ && !inAmbientExternalModule) { - error(moduleName, node.kind === 218 /* ExportDeclaration */ ? - ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace : - ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module); - return false; - } - if (inAmbientExternalModule && isExternalModuleNameRelative(moduleName.text)) { - // TypeScript 1.0 spec (April 2013): 12.1.6 - // An ExternalImportDeclaration in an AmbientExternalModuleDeclaration may reference - // other external modules only through top - level external module names. - // Relative external module names are not permitted. - error(node, ts.Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name); - return false; - } - return true; - } - function checkAliasSymbol(node) { - var symbol = getSymbolOfNode(node); - var target = resolveAlias(symbol); - if (target !== unknownSymbol) { - var excludedMeanings = (symbol.flags & 107455 /* Value */ ? 107455 /* Value */ : 0) | - (symbol.flags & 793056 /* Type */ ? 793056 /* Type */ : 0) | - (symbol.flags & 1536 /* Namespace */ ? 1536 /* Namespace */ : 0); - if (target.flags & excludedMeanings) { - var message = node.kind === 220 /* ExportSpecifier */ ? - ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 : - ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0; - error(node, message, symbolToString(symbol)); - } - } - } - function checkImportBinding(node) { - checkCollisionWithCapturedThisVariable(node, node.name); - checkCollisionWithRequireExportsInGeneratedCode(node, node.name); - checkAliasSymbol(node); - } - function checkImportDeclaration(node) { - if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)) { - // If we hit an import declaration in an illegal context, just bail out to avoid cascading errors. - return; - } - if (!checkGrammarImportDeclarationNameInStrictMode(node) && !checkGrammarDecorators(node) && !checkGrammarModifiers(node) && (node.flags & 499 /* Modifier */)) { - grammarErrorOnFirstToken(node, ts.Diagnostics.An_import_declaration_cannot_have_modifiers); - } - if (checkExternalImportOrExportDeclaration(node)) { - var importClause = node.importClause; - if (importClause) { - if (importClause.name) { - checkImportBinding(importClause); - } - if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 214 /* NamespaceImport */) { - checkImportBinding(importClause.namedBindings); - } - else { - ts.forEach(importClause.namedBindings.elements, checkImportBinding); - } - } - } - } - } - function checkImportEqualsDeclaration(node) { - if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)) { - // If we hit an import declaration in an illegal context, just bail out to avoid cascading errors. - return; - } - checkGrammarDeclarationNameInStrictMode(node) || checkGrammarDecorators(node) || checkGrammarModifiers(node); - if (ts.isInternalModuleImportEqualsDeclaration(node) || checkExternalImportOrExportDeclaration(node)) { - checkImportBinding(node); - if (node.flags & 1 /* Export */) { - markExportAsReferenced(node); - } - if (ts.isInternalModuleImportEqualsDeclaration(node)) { - var target = resolveAlias(getSymbolOfNode(node)); - if (target !== unknownSymbol) { - if (target.flags & 107455 /* Value */) { - // Target is a value symbol, check that it is not hidden by a local declaration with the same name - var moduleName = getFirstIdentifier(node.moduleReference); - if (!(resolveEntityName(moduleName, 107455 /* Value */ | 1536 /* Namespace */).flags & 1536 /* Namespace */)) { - error(moduleName, ts.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name, ts.declarationNameToString(moduleName)); - } - } - if (target.flags & 793056 /* Type */) { - checkTypeNameIsReserved(node.name, ts.Diagnostics.Import_name_cannot_be_0); - } - } - } - else { - if (languageVersion >= 2 /* ES6 */) { - // Import equals declaration is deprecated in es6 or above - grammarErrorOnNode(node, ts.Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_or_import_d_from_mod_instead); - } - } - } - } - function checkExportDeclaration(node) { - if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_export_declaration_can_only_be_used_in_a_module)) { - // If we hit an export in an illegal context, just bail out to avoid cascading errors. - return; - } - if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && (node.flags & 499 /* Modifier */)) { - grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_declaration_cannot_have_modifiers); - } - if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) { - if (node.exportClause) { - // export { x, y } - // export { x, y } from "foo" - ts.forEach(node.exportClause.elements, checkExportSpecifier); - var inAmbientExternalModule = node.parent.kind === 209 /* ModuleBlock */ && node.parent.parent.name.kind === 8 /* StringLiteral */; - if (node.parent.kind !== 230 /* SourceFile */ && !inAmbientExternalModule) { - error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace); - } - } - else { - // export * from "foo" - var moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier); - if (moduleSymbol && moduleSymbol.exports["export="]) { - error(node.moduleSpecifier, ts.Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk, symbolToString(moduleSymbol)); - } - } - } - } - function checkGrammarModuleElementContext(node, errorMessage) { - if (node.parent.kind !== 230 /* SourceFile */ && node.parent.kind !== 209 /* ModuleBlock */ && node.parent.kind !== 208 /* ModuleDeclaration */) { - return grammarErrorOnFirstToken(node, errorMessage); - } - } - function checkExportSpecifier(node) { - checkAliasSymbol(node); - if (!node.parent.parent.moduleSpecifier) { - markExportAsReferenced(node); - } - } - function checkExportAssignment(node) { - if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)) { - // If we hit an export assignment in an illegal context, just bail out to avoid cascading errors. - return; - } - var container = node.parent.kind === 230 /* SourceFile */ ? node.parent : node.parent.parent; - if (container.kind === 208 /* ModuleDeclaration */ && container.name.kind === 65 /* Identifier */) { - error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace); - return; - } - // Grammar checking - if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && (node.flags & 499 /* Modifier */)) { - grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_assignment_cannot_have_modifiers); - } - if (node.expression.kind === 65 /* Identifier */) { - markExportAsReferenced(node); - } - else { - checkExpressionCached(node.expression); - } - checkExternalModuleExports(container); - if (node.isExportEquals && !ts.isInAmbientContext(node)) { - if (languageVersion >= 2 /* ES6 */) { - // export assignment is deprecated in es6 or above - grammarErrorOnNode(node, ts.Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_or_higher_Consider_using_export_default_instead); - } - else if (compilerOptions.module === 4 /* System */) { - // system modules does not support export assignment - grammarErrorOnNode(node, ts.Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system); - } - } - } - function getModuleStatements(node) { - if (node.kind === 230 /* SourceFile */) { - return node.statements; - } - if (node.kind === 208 /* ModuleDeclaration */ && node.body.kind === 209 /* ModuleBlock */) { - return node.body.statements; - } - return emptyArray; - } - function hasExportedMembers(moduleSymbol) { - for (var id in moduleSymbol.exports) { - if (id !== "export=") { - return true; - } - } - return false; - } - function checkExternalModuleExports(node) { - var moduleSymbol = getSymbolOfNode(node); - var links = getSymbolLinks(moduleSymbol); - if (!links.exportsChecked) { - var exportEqualsSymbol = moduleSymbol.exports["export="]; - if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) { - var declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration; - error(declaration, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements); - } - links.exportsChecked = true; - } - } - function checkTypePredicate(node) { - if (!isInLegalTypePredicatePosition(node)) { - error(node, ts.Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods); - } - } - function checkSourceElement(node) { - if (!node) - return; - switch (node.kind) { - case 130 /* TypeParameter */: - return checkTypeParameter(node); - case 131 /* Parameter */: - return checkParameter(node); - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - return checkPropertyDeclaration(node); - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - return checkSignatureDeclaration(node); - case 142 /* IndexSignature */: - return checkSignatureDeclaration(node); - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - return checkMethodDeclaration(node); - case 137 /* Constructor */: - return checkConstructorDeclaration(node); - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - return checkAccessorDeclaration(node); - case 144 /* TypeReference */: - return checkTypeReferenceNode(node); - case 143 /* TypePredicate */: - return checkTypePredicate(node); - case 147 /* TypeQuery */: - return checkTypeQuery(node); - case 148 /* TypeLiteral */: - return checkTypeLiteral(node); - case 149 /* ArrayType */: - return checkArrayType(node); - case 150 /* TupleType */: - return checkTupleType(node); - case 151 /* UnionType */: - return checkUnionType(node); - case 152 /* ParenthesizedType */: - return checkSourceElement(node.type); - case 203 /* FunctionDeclaration */: - return checkFunctionDeclaration(node); - case 182 /* Block */: - case 209 /* ModuleBlock */: - return checkBlock(node); - case 183 /* VariableStatement */: - return checkVariableStatement(node); - case 185 /* ExpressionStatement */: - return checkExpressionStatement(node); - case 186 /* IfStatement */: - return checkIfStatement(node); - case 187 /* DoStatement */: - return checkDoStatement(node); - case 188 /* WhileStatement */: - return checkWhileStatement(node); - case 189 /* ForStatement */: - return checkForStatement(node); - case 190 /* ForInStatement */: - return checkForInStatement(node); - case 191 /* ForOfStatement */: - return checkForOfStatement(node); - case 192 /* ContinueStatement */: - case 193 /* BreakStatement */: - return checkBreakOrContinueStatement(node); - case 194 /* ReturnStatement */: - return checkReturnStatement(node); - case 195 /* WithStatement */: - return checkWithStatement(node); - case 196 /* SwitchStatement */: - return checkSwitchStatement(node); - case 197 /* LabeledStatement */: - return checkLabeledStatement(node); - case 198 /* ThrowStatement */: - return checkThrowStatement(node); - case 199 /* TryStatement */: - return checkTryStatement(node); - case 201 /* VariableDeclaration */: - return checkVariableDeclaration(node); - case 155 /* BindingElement */: - return checkBindingElement(node); - case 204 /* ClassDeclaration */: - return checkClassDeclaration(node); - case 205 /* InterfaceDeclaration */: - return checkInterfaceDeclaration(node); - case 206 /* TypeAliasDeclaration */: - return checkTypeAliasDeclaration(node); - case 207 /* EnumDeclaration */: - return checkEnumDeclaration(node); - case 208 /* ModuleDeclaration */: - return checkModuleDeclaration(node); - case 212 /* ImportDeclaration */: - return checkImportDeclaration(node); - case 211 /* ImportEqualsDeclaration */: - return checkImportEqualsDeclaration(node); - case 218 /* ExportDeclaration */: - return checkExportDeclaration(node); - case 217 /* ExportAssignment */: - return checkExportAssignment(node); - case 184 /* EmptyStatement */: - checkGrammarStatementInAmbientContext(node); - return; - case 200 /* DebuggerStatement */: - checkGrammarStatementInAmbientContext(node); - return; - case 221 /* MissingDeclaration */: - return checkMissingDeclaration(node); - } - } - // Function expression bodies are checked after all statements in the enclosing body. This is to ensure - // constructs like the following are permitted: - // let foo = function () { - // let s = foo(); - // return "hello"; - // } - // Here, performing a full type check of the body of the function expression whilst in the process of - // determining the type of foo would cause foo to be given type any because of the recursive reference. - // Delaying the type check of the body ensures foo has been assigned a type. - function checkFunctionExpressionBodies(node) { - switch (node.kind) { - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - ts.forEach(node.parameters, checkFunctionExpressionBodies); - checkFunctionExpressionOrObjectLiteralMethodBody(node); - break; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - ts.forEach(node.decorators, checkFunctionExpressionBodies); - ts.forEach(node.parameters, checkFunctionExpressionBodies); - if (ts.isObjectLiteralMethod(node)) { - checkFunctionExpressionOrObjectLiteralMethodBody(node); - } - break; - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 203 /* FunctionDeclaration */: - ts.forEach(node.parameters, checkFunctionExpressionBodies); - break; - case 195 /* WithStatement */: - checkFunctionExpressionBodies(node.expression); - break; - case 132 /* Decorator */: - case 131 /* Parameter */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 153 /* ObjectBindingPattern */: - case 154 /* ArrayBindingPattern */: - case 155 /* BindingElement */: - case 156 /* ArrayLiteralExpression */: - case 157 /* ObjectLiteralExpression */: - case 227 /* PropertyAssignment */: - case 158 /* PropertyAccessExpression */: - case 159 /* ElementAccessExpression */: - case 160 /* CallExpression */: - case 161 /* NewExpression */: - case 162 /* TaggedTemplateExpression */: - case 174 /* TemplateExpression */: - case 180 /* TemplateSpan */: - case 163 /* TypeAssertionExpression */: - case 164 /* ParenthesizedExpression */: - case 168 /* TypeOfExpression */: - case 169 /* VoidExpression */: - case 167 /* DeleteExpression */: - case 170 /* PrefixUnaryExpression */: - case 171 /* PostfixUnaryExpression */: - case 172 /* BinaryExpression */: - case 173 /* ConditionalExpression */: - case 176 /* SpreadElementExpression */: - case 182 /* Block */: - case 209 /* ModuleBlock */: - case 183 /* VariableStatement */: - case 185 /* ExpressionStatement */: - case 186 /* IfStatement */: - case 187 /* DoStatement */: - case 188 /* WhileStatement */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 192 /* ContinueStatement */: - case 193 /* BreakStatement */: - case 194 /* ReturnStatement */: - case 196 /* SwitchStatement */: - case 210 /* CaseBlock */: - case 223 /* CaseClause */: - case 224 /* DefaultClause */: - case 197 /* LabeledStatement */: - case 198 /* ThrowStatement */: - case 199 /* TryStatement */: - case 226 /* CatchClause */: - case 201 /* VariableDeclaration */: - case 202 /* VariableDeclarationList */: - case 204 /* ClassDeclaration */: - case 207 /* EnumDeclaration */: - case 229 /* EnumMember */: - case 217 /* ExportAssignment */: - case 230 /* SourceFile */: - ts.forEachChild(node, checkFunctionExpressionBodies); - break; - } - } - function checkSourceFile(node) { - var start = new Date().getTime(); - checkSourceFileWorker(node); - ts.checkTime += new Date().getTime() - start; - } - // Fully type check a source file and collect the relevant diagnostics. - function checkSourceFileWorker(node) { - var links = getNodeLinks(node); - if (!(links.flags & 1 /* TypeChecked */)) { - // Check whether the file has declared it is the default lib, - // and whether the user has specifically chosen to avoid checking it. - if (node.isDefaultLib && compilerOptions.skipDefaultLibCheck) { - return; - } - // Grammar checking - checkGrammarSourceFile(node); - emitExtends = false; - emitDecorate = false; - emitParam = false; - potentialThisCollisions.length = 0; - ts.forEach(node.statements, checkSourceElement); - checkFunctionExpressionBodies(node); - if (ts.isExternalModule(node)) { - checkExternalModuleExports(node); - } - if (potentialThisCollisions.length) { - ts.forEach(potentialThisCollisions, checkIfThisIsCapturedInEnclosingScope); - potentialThisCollisions.length = 0; - } - if (emitExtends) { - links.flags |= 8 /* EmitExtends */; - } - if (emitDecorate) { - links.flags |= 512 /* EmitDecorate */; - } - if (emitParam) { - links.flags |= 1024 /* EmitParam */; - } - links.flags |= 1 /* TypeChecked */; - } - } - function getDiagnostics(sourceFile) { - throwIfNonDiagnosticsProducing(); - if (sourceFile) { - checkSourceFile(sourceFile); - return diagnostics.getDiagnostics(sourceFile.fileName); - } - ts.forEach(host.getSourceFiles(), checkSourceFile); - return diagnostics.getDiagnostics(); - } - function getGlobalDiagnostics() { - throwIfNonDiagnosticsProducing(); - return diagnostics.getGlobalDiagnostics(); - } - function throwIfNonDiagnosticsProducing() { - if (!produceDiagnostics) { - throw new Error("Trying to get diagnostics from a type checker that does not produce them."); - } - } - // Language service support - function isInsideWithStatementBody(node) { - if (node) { - while (node.parent) { - if (node.parent.kind === 195 /* WithStatement */ && node.parent.statement === node) { - return true; - } - node = node.parent; - } - } - return false; - } - function getSymbolsInScope(location, meaning) { - var symbols = {}; - var memberFlags = 0; - if (isInsideWithStatementBody(location)) { - // We cannot answer semantic questions within a with block, do not proceed any further - return []; - } - populateSymbols(); - return symbolsToArray(symbols); - function populateSymbols() { - while (location) { - if (location.locals && !isGlobalSourceFile(location)) { - copySymbols(location.locals, meaning); - } - switch (location.kind) { - case 230 /* SourceFile */: - if (!ts.isExternalModule(location)) { - break; - } - case 208 /* ModuleDeclaration */: - copySymbols(getSymbolOfNode(location).exports, meaning & 8914931 /* ModuleMember */); - break; - case 207 /* EnumDeclaration */: - copySymbols(getSymbolOfNode(location).exports, meaning & 8 /* EnumMember */); - break; - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - if (!(memberFlags & 128 /* Static */)) { - copySymbols(getSymbolOfNode(location).members, meaning & 793056 /* Type */); - } - break; - case 165 /* FunctionExpression */: - if (location.name) { - copySymbol(location.symbol, meaning); - } - break; - } - memberFlags = location.flags; - location = location.parent; - } - copySymbols(globals, meaning); - } - // Returns 'true' if we should stop processing symbols. - function copySymbol(symbol, meaning) { - if (symbol.flags & meaning) { - var id = symbol.name; - if (!isReservedMemberName(id) && !ts.hasProperty(symbols, id)) { - symbols[id] = symbol; - } - } - } - function copySymbols(source, meaning) { - if (meaning) { - for (var id in source) { - if (ts.hasProperty(source, id)) { - copySymbol(source[id], meaning); - } - } - } - } - if (isInsideWithStatementBody(location)) { - // We cannot answer semantic questions within a with block, do not proceed any further - return []; - } - while (location) { - if (location.locals && !isGlobalSourceFile(location)) { - copySymbols(location.locals, meaning); - } - switch (location.kind) { - case 230 /* SourceFile */: - if (!ts.isExternalModule(location)) - break; - case 208 /* ModuleDeclaration */: - copySymbols(getSymbolOfNode(location).exports, meaning & 8914931 /* ModuleMember */); - break; - case 207 /* EnumDeclaration */: - copySymbols(getSymbolOfNode(location).exports, meaning & 8 /* EnumMember */); - break; - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - if (!(memberFlags & 128 /* Static */)) { - copySymbols(getSymbolOfNode(location).members, meaning & 793056 /* Type */); - } - break; - case 165 /* FunctionExpression */: - if (location.name) { - copySymbol(location.symbol, meaning); - } - break; - } - memberFlags = location.flags; - location = location.parent; - } - copySymbols(globals, meaning); - return symbolsToArray(symbols); - } - function isTypeDeclarationName(name) { - return name.kind == 65 /* Identifier */ && - isTypeDeclaration(name.parent) && - name.parent.name === name; - } - function isTypeDeclaration(node) { - switch (node.kind) { - case 130 /* TypeParameter */: - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 206 /* TypeAliasDeclaration */: - case 207 /* EnumDeclaration */: - return true; - } - } - // True if the given identifier is part of a type reference - function isTypeReferenceIdentifier(entityName) { - var node = entityName; - while (node.parent && node.parent.kind === 128 /* QualifiedName */) { - node = node.parent; - } - return node.parent && node.parent.kind === 144 /* TypeReference */; - } - function isHeritageClauseElementIdentifier(entityName) { - var node = entityName; - while (node.parent && node.parent.kind === 158 /* PropertyAccessExpression */) { - node = node.parent; - } - return node.parent && node.parent.kind === 179 /* ExpressionWithTypeArguments */; - } - function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) { - while (nodeOnRightSide.parent.kind === 128 /* QualifiedName */) { - nodeOnRightSide = nodeOnRightSide.parent; - } - if (nodeOnRightSide.parent.kind === 211 /* ImportEqualsDeclaration */) { - return nodeOnRightSide.parent.moduleReference === nodeOnRightSide && nodeOnRightSide.parent; - } - if (nodeOnRightSide.parent.kind === 217 /* ExportAssignment */) { - return nodeOnRightSide.parent.expression === nodeOnRightSide && nodeOnRightSide.parent; - } - return undefined; - } - function isInRightSideOfImportOrExportAssignment(node) { - return getLeftSideOfImportEqualsOrExportAssignment(node) !== undefined; - } - function getSymbolOfEntityNameOrPropertyAccessExpression(entityName) { - if (ts.isDeclarationName(entityName)) { - return getSymbolOfNode(entityName.parent); - } - if (entityName.parent.kind === 217 /* ExportAssignment */) { - return resolveEntityName(entityName, - /*all meanings*/ 107455 /* Value */ | 793056 /* Type */ | 1536 /* Namespace */ | 8388608 /* Alias */); - } - if (entityName.kind !== 158 /* PropertyAccessExpression */) { - if (isInRightSideOfImportOrExportAssignment(entityName)) { - // Since we already checked for ExportAssignment, this really could only be an Import - return getSymbolOfPartOfRightHandSideOfImportEquals(entityName); - } - } - if (ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) { - entityName = entityName.parent; - } - if (isHeritageClauseElementIdentifier(entityName)) { - var meaning = entityName.parent.kind === 179 /* ExpressionWithTypeArguments */ ? 793056 /* Type */ : 1536 /* Namespace */; - meaning |= 8388608 /* Alias */; - return resolveEntityName(entityName, meaning); - } - else if (ts.isExpression(entityName)) { - if (ts.nodeIsMissing(entityName)) { - // Missing entity name. - return undefined; - } - if (entityName.kind === 65 /* Identifier */) { - // Include aliases in the meaning, this ensures that we do not follow aliases to where they point and instead - // return the alias symbol. - var meaning = 107455 /* Value */ | 8388608 /* Alias */; - return resolveEntityName(entityName, meaning); - } - else if (entityName.kind === 158 /* PropertyAccessExpression */) { - var symbol = getNodeLinks(entityName).resolvedSymbol; - if (!symbol) { - checkPropertyAccessExpression(entityName); - } - return getNodeLinks(entityName).resolvedSymbol; - } - else if (entityName.kind === 128 /* QualifiedName */) { - var symbol = getNodeLinks(entityName).resolvedSymbol; - if (!symbol) { - checkQualifiedName(entityName); - } - return getNodeLinks(entityName).resolvedSymbol; - } - } - else if (isTypeReferenceIdentifier(entityName)) { - var meaning = entityName.parent.kind === 144 /* TypeReference */ ? 793056 /* Type */ : 1536 /* Namespace */; - // Include aliases in the meaning, this ensures that we do not follow aliases to where they point and instead - // return the alias symbol. - meaning |= 8388608 /* Alias */; - return resolveEntityName(entityName, meaning); - } - // Do we want to return undefined here? - return undefined; - } - function getSymbolInfo(node) { - if (isInsideWithStatementBody(node)) { - // We cannot answer semantic questions within a with block, do not proceed any further - return undefined; - } - if (ts.isDeclarationName(node)) { - // This is a declaration, call getSymbolOfNode - return getSymbolOfNode(node.parent); - } - if (node.kind === 65 /* Identifier */ && isInRightSideOfImportOrExportAssignment(node)) { - return node.parent.kind === 217 /* ExportAssignment */ - ? getSymbolOfEntityNameOrPropertyAccessExpression(node) - : getSymbolOfPartOfRightHandSideOfImportEquals(node); - } - switch (node.kind) { - case 65 /* Identifier */: - case 158 /* PropertyAccessExpression */: - case 128 /* QualifiedName */: - return getSymbolOfEntityNameOrPropertyAccessExpression(node); - case 93 /* ThisKeyword */: - case 91 /* SuperKeyword */: - var type = checkExpression(node); - return type.symbol; - case 114 /* ConstructorKeyword */: - // constructor keyword for an overload, should take us to the definition if it exist - var constructorDeclaration = node.parent; - if (constructorDeclaration && constructorDeclaration.kind === 137 /* Constructor */) { - return constructorDeclaration.parent.symbol; - } - return undefined; - case 8 /* StringLiteral */: - // External module name in an import declaration - var moduleName; - if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && - ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) || - ((node.parent.kind === 212 /* ImportDeclaration */ || node.parent.kind === 218 /* ExportDeclaration */) && - node.parent.moduleSpecifier === node)) { - return resolveExternalModuleName(node, node); - } - // Intentional fall-through - case 7 /* NumericLiteral */: - // index access - if (node.parent.kind == 159 /* ElementAccessExpression */ && node.parent.argumentExpression === node) { - var objectType = checkExpression(node.parent.expression); - if (objectType === unknownType) - return undefined; - var apparentType = getApparentType(objectType); - if (apparentType === unknownType) - return undefined; - return getPropertyOfType(apparentType, node.text); - } - break; - } - return undefined; - } - function getShorthandAssignmentValueSymbol(location) { - // The function returns a value symbol of an identifier in the short-hand property assignment. - // This is necessary as an identifier in short-hand property assignment can contains two meaning: - // property name and property value. - if (location && location.kind === 228 /* ShorthandPropertyAssignment */) { - return resolveEntityName(location.name, 107455 /* Value */); - } - return undefined; - } - function getTypeOfNode(node) { - if (isInsideWithStatementBody(node)) { - // We cannot answer semantic questions within a with block, do not proceed any further - return unknownType; - } - if (ts.isTypeNode(node)) { - return getTypeFromTypeNode(node); - } - if (ts.isExpression(node)) { - return getTypeOfExpression(node); - } - if (isTypeDeclaration(node)) { - // In this case, we call getSymbolOfNode instead of getSymbolInfo because it is a declaration - var symbol = getSymbolOfNode(node); - return getDeclaredTypeOfSymbol(symbol); - } - if (isTypeDeclarationName(node)) { - var symbol = getSymbolInfo(node); - return symbol && getDeclaredTypeOfSymbol(symbol); - } - if (ts.isDeclaration(node)) { - // In this case, we call getSymbolOfNode instead of getSymbolInfo because it is a declaration - var symbol = getSymbolOfNode(node); - return getTypeOfSymbol(symbol); - } - if (ts.isDeclarationName(node)) { - var symbol = getSymbolInfo(node); - return symbol && getTypeOfSymbol(symbol); - } - if (isInRightSideOfImportOrExportAssignment(node)) { - var symbol = getSymbolInfo(node); - var declaredType = symbol && getDeclaredTypeOfSymbol(symbol); - return declaredType !== unknownType ? declaredType : getTypeOfSymbol(symbol); - } - return unknownType; - } - function getTypeOfExpression(expr) { - if (ts.isRightSideOfQualifiedNameOrPropertyAccess(expr)) { - expr = expr.parent; - } - return checkExpression(expr); - } - // Return the list of properties of the given type, augmented with properties from Function - // if the type has call or construct signatures - function getAugmentedPropertiesOfType(type) { - type = getApparentType(type); - var propsByName = createSymbolTable(getPropertiesOfType(type)); - if (getSignaturesOfType(type, 0 /* Call */).length || getSignaturesOfType(type, 1 /* Construct */).length) { - ts.forEach(getPropertiesOfType(globalFunctionType), function (p) { - if (!ts.hasProperty(propsByName, p.name)) { - propsByName[p.name] = p; - } - }); - } - return getNamedMembers(propsByName); - } - function getRootSymbols(symbol) { - if (symbol.flags & 268435456 /* UnionProperty */) { - var symbols = []; - var name_14 = symbol.name; - ts.forEach(getSymbolLinks(symbol).unionType.types, function (t) { - symbols.push(getPropertyOfType(t, name_14)); - }); - return symbols; - } - else if (symbol.flags & 67108864 /* Transient */) { - var target = getSymbolLinks(symbol).target; - if (target) { - return [target]; - } - } - return [symbol]; - } - // Emitter support - // When resolved as an expression identifier, if the given node references an exported entity, return the declaration - // node of the exported entity's container. Otherwise, return undefined. - function getReferencedExportContainer(node) { - var symbol = getReferencedValueSymbol(node); - if (symbol) { - if (symbol.flags & 1048576 /* ExportValue */) { - // If we reference an exported entity within the same module declaration, then whether - // we prefix depends on the kind of entity. SymbolFlags.ExportHasLocal encompasses all the - // kinds that we do NOT prefix. - var exportSymbol = getMergedSymbol(symbol.exportSymbol); - if (exportSymbol.flags & 944 /* ExportHasLocal */) { - return undefined; - } - symbol = exportSymbol; - } - var parentSymbol = getParentOfSymbol(symbol); - if (parentSymbol) { - if (parentSymbol.flags & 512 /* ValueModule */ && parentSymbol.valueDeclaration.kind === 230 /* SourceFile */) { - return parentSymbol.valueDeclaration; - } - for (var n = node.parent; n; n = n.parent) { - if ((n.kind === 208 /* ModuleDeclaration */ || n.kind === 207 /* EnumDeclaration */) && getSymbolOfNode(n) === parentSymbol) { - return n; - } - } - } - } - } - // When resolved as an expression identifier, if the given node references an import, return the declaration of - // that import. Otherwise, return undefined. - function getReferencedImportDeclaration(node) { - var symbol = getReferencedValueSymbol(node); - return symbol && symbol.flags & 8388608 /* Alias */ ? getDeclarationOfAliasSymbol(symbol) : undefined; - } - function isStatementWithLocals(node) { - switch (node.kind) { - case 182 /* Block */: - case 210 /* CaseBlock */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - return true; - } - return false; - } - function isNestedRedeclarationSymbol(symbol) { - if (symbol.flags & 418 /* BlockScoped */) { - var links = getSymbolLinks(symbol); - if (links.isNestedRedeclaration === undefined) { - var container = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration); - links.isNestedRedeclaration = isStatementWithLocals(container) && - !!resolveName(container.parent, symbol.name, 107455 /* Value */, undefined, undefined); - } - return links.isNestedRedeclaration; - } - return false; - } - // When resolved as an expression identifier, if the given node references a nested block scoped entity with - // a name that hides an existing name, return the declaration of that entity. Otherwise, return undefined. - function getReferencedNestedRedeclaration(node) { - var symbol = getReferencedValueSymbol(node); - return symbol && isNestedRedeclarationSymbol(symbol) ? symbol.valueDeclaration : undefined; - } - // Return true if the given node is a declaration of a nested block scoped entity with a name that hides an - // existing name. - function isNestedRedeclaration(node) { - return isNestedRedeclarationSymbol(getSymbolOfNode(node)); - } - function isValueAliasDeclaration(node) { - switch (node.kind) { - case 211 /* ImportEqualsDeclaration */: - case 213 /* ImportClause */: - case 214 /* NamespaceImport */: - case 216 /* ImportSpecifier */: - case 220 /* ExportSpecifier */: - return isAliasResolvedToValue(getSymbolOfNode(node)); - case 218 /* ExportDeclaration */: - var exportClause = node.exportClause; - return exportClause && ts.forEach(exportClause.elements, isValueAliasDeclaration); - case 217 /* ExportAssignment */: - return node.expression && node.expression.kind === 65 /* Identifier */ ? isAliasResolvedToValue(getSymbolOfNode(node)) : true; - } - return false; - } - function isTopLevelValueImportEqualsWithEntityName(node) { - if (node.parent.kind !== 230 /* SourceFile */ || !ts.isInternalModuleImportEqualsDeclaration(node)) { - // parent is not source file or it is not reference to internal module - return false; - } - var isValue = isAliasResolvedToValue(getSymbolOfNode(node)); - return isValue && node.moduleReference && !ts.nodeIsMissing(node.moduleReference); - } - function isAliasResolvedToValue(symbol) { - var target = resolveAlias(symbol); - if (target === unknownSymbol && compilerOptions.isolatedModules) { - return true; - } - // const enums and modules that contain only const enums are not considered values from the emit perespective - return target !== unknownSymbol && target && target.flags & 107455 /* Value */ && !isConstEnumOrConstEnumOnlyModule(target); - } - function isConstEnumOrConstEnumOnlyModule(s) { - return isConstEnumSymbol(s) || s.constEnumOnlyModule; - } - function isReferencedAliasDeclaration(node, checkChildren) { - if (ts.isAliasSymbolDeclaration(node)) { - var symbol = getSymbolOfNode(node); - if (getSymbolLinks(symbol).referenced) { - return true; - } - } - if (checkChildren) { - return ts.forEachChild(node, function (node) { return isReferencedAliasDeclaration(node, checkChildren); }); - } - return false; - } - function isImplementationOfOverload(node) { - if (ts.nodeIsPresent(node.body)) { - var symbol = getSymbolOfNode(node); - var signaturesOfSymbol = getSignaturesOfSymbol(symbol); - // If this function body corresponds to function with multiple signature, it is implementation of overload - // e.g.: function foo(a: string): string; - // function foo(a: number): number; - // function foo(a: any) { // This is implementation of the overloads - // return a; - // } - return signaturesOfSymbol.length > 1 || - // If there is single signature for the symbol, it is overload if that signature isn't coming from the node - // e.g.: function foo(a: string): string; - // function foo(a: any) { // This is implementation of the overloads - // return a; - // } - (signaturesOfSymbol.length === 1 && signaturesOfSymbol[0].declaration !== node); - } - return false; - } - function getNodeCheckFlags(node) { - return getNodeLinks(node).flags; - } - function getEnumMemberValue(node) { - computeEnumMemberValues(node.parent); - return getNodeLinks(node).enumMemberValue; - } - function getConstantValue(node) { - if (node.kind === 229 /* EnumMember */) { - return getEnumMemberValue(node); - } - var symbol = getNodeLinks(node).resolvedSymbol; - if (symbol && (symbol.flags & 8 /* EnumMember */)) { - // inline property\index accesses only for const enums - if (ts.isConstEnumDeclaration(symbol.valueDeclaration.parent)) { - return getEnumMemberValue(symbol.valueDeclaration); - } - } - return undefined; - } - /** Serializes an EntityName (with substitutions) to an appropriate JS constructor value. Used by the __metadata decorator. */ - function serializeEntityName(node, fallbackPath) { - if (node.kind === 65 /* Identifier */) { - // TODO(ron.buckton): The getExpressionNameSubstitution function has been removed, but calling it - // here has no effect anyway as an identifier in a type name is not an expression. - // var substitution = getExpressionNameSubstitution(node, getGeneratedNameForNode); - // var text = substitution || (node).text; - var text = node.text; - if (fallbackPath) { - fallbackPath.push(text); - } - else { - return text; - } - } - else { - var left = serializeEntityName(node.left, fallbackPath); - var right = serializeEntityName(node.right, fallbackPath); - if (!fallbackPath) { - return left + "." + right; - } - } - } - /** Serializes a TypeReferenceNode to an appropriate JS constructor value. Used by the __metadata decorator. */ - function serializeTypeReferenceNode(node) { - // serialization of a TypeReferenceNode uses the following rules: - // - // * The serialized type of a TypeReference that is `void` is "void 0". - // * The serialized type of a TypeReference that is a `boolean` is "Boolean". - // * The serialized type of a TypeReference that is an enum or `number` is "Number". - // * The serialized type of a TypeReference that is a string literal or `string` is "String". - // * The serialized type of a TypeReference that is a tuple is "Array". - // * The serialized type of a TypeReference that is a `symbol` is "Symbol". - // * The serialized type of a TypeReference with a value declaration is its entity name. - // * The serialized type of a TypeReference with a call or construct signature is "Function". - // * The serialized type of any other type is "Object". - var type = getTypeFromTypeNode(node); - if (type.flags & 16 /* Void */) { - return "void 0"; - } - else if (type.flags & 8 /* Boolean */) { - return "Boolean"; - } - else if (type.flags & 132 /* NumberLike */) { - return "Number"; - } - else if (type.flags & 258 /* StringLike */) { - return "String"; - } - else if (type.flags & 8192 /* Tuple */) { - return "Array"; - } - else if (type.flags & 2097152 /* ESSymbol */) { - return "Symbol"; - } - else if (type === unknownType) { - var fallbackPath = []; - serializeEntityName(node.typeName, fallbackPath); - return fallbackPath; - } - else if (type.symbol && type.symbol.valueDeclaration) { - return serializeEntityName(node.typeName); - } - else if (typeHasCallOrConstructSignatures(type)) { - return "Function"; - } - return "Object"; - } - /** Serializes a TypeNode to an appropriate JS constructor value. Used by the __metadata decorator. */ - function serializeTypeNode(node) { - // serialization of a TypeNode uses the following rules: - // - // * The serialized type of `void` is "void 0" (undefined). - // * The serialized type of a parenthesized type is the serialized type of its nested type. - // * The serialized type of a Function or Constructor type is "Function". - // * The serialized type of an Array or Tuple type is "Array". - // * The serialized type of `boolean` is "Boolean". - // * The serialized type of `string` or a string-literal type is "String". - // * The serialized type of a type reference is handled by `serializeTypeReferenceNode`. - // * The serialized type of any other type node is "Object". - if (node) { - switch (node.kind) { - case 99 /* VoidKeyword */: - return "void 0"; - case 152 /* ParenthesizedType */: - return serializeTypeNode(node.type); - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - return "Function"; - case 149 /* ArrayType */: - case 150 /* TupleType */: - return "Array"; - case 113 /* BooleanKeyword */: - return "Boolean"; - case 123 /* StringKeyword */: - case 8 /* StringLiteral */: - return "String"; - case 121 /* NumberKeyword */: - return "Number"; - case 144 /* TypeReference */: - return serializeTypeReferenceNode(node); - case 147 /* TypeQuery */: - case 148 /* TypeLiteral */: - case 151 /* UnionType */: - case 112 /* AnyKeyword */: - break; - default: - ts.Debug.fail("Cannot serialize unexpected type node."); - break; - } - } - return "Object"; - } - /** Serializes the type of a declaration to an appropriate JS constructor value. Used by the __metadata decorator for a class member. */ - function serializeTypeOfNode(node) { - // serialization of the type of a declaration uses the following rules: - // - // * The serialized type of a ClassDeclaration is "Function" - // * The serialized type of a ParameterDeclaration is the serialized type of its type annotation. - // * The serialized type of a PropertyDeclaration is the serialized type of its type annotation. - // * The serialized type of an AccessorDeclaration is the serialized type of the return type annotation of its getter or parameter type annotation of its setter. - // * The serialized type of any other FunctionLikeDeclaration is "Function". - // * The serialized type of any other node is "void 0". - // - // For rules on serializing type annotations, see `serializeTypeNode`. - switch (node.kind) { - case 204 /* ClassDeclaration */: return "Function"; - case 134 /* PropertyDeclaration */: return serializeTypeNode(node.type); - case 131 /* Parameter */: return serializeTypeNode(node.type); - case 138 /* GetAccessor */: return serializeTypeNode(node.type); - case 139 /* SetAccessor */: return serializeTypeNode(getSetAccessorTypeAnnotationNode(node)); - } - if (ts.isFunctionLike(node)) { - return "Function"; - } - return "void 0"; - } - /** Serializes the parameter types of a function or the constructor of a class. Used by the __metadata decorator for a method or set accessor. */ - function serializeParameterTypesOfNode(node) { - // serialization of parameter types uses the following rules: - // - // * If the declaration is a class, the parameters of the first constructor with a body are used. - // * If the declaration is function-like and has a body, the parameters of the function are used. - // - // For the rules on serializing the type of each parameter declaration, see `serializeTypeOfDeclaration`. - if (node) { - var valueDeclaration; - if (node.kind === 204 /* ClassDeclaration */) { - valueDeclaration = ts.getFirstConstructorWithBody(node); - } - else if (ts.isFunctionLike(node) && ts.nodeIsPresent(node.body)) { - valueDeclaration = node; - } - if (valueDeclaration) { - var result; - var parameters = valueDeclaration.parameters; - var parameterCount = parameters.length; - if (parameterCount > 0) { - result = new Array(parameterCount); - for (var i = 0; i < parameterCount; i++) { - if (parameters[i].dotDotDotToken) { - var parameterType = parameters[i].type; - if (parameterType.kind === 149 /* ArrayType */) { - parameterType = parameterType.elementType; - } - else if (parameterType.kind === 144 /* TypeReference */ && parameterType.typeArguments && parameterType.typeArguments.length === 1) { - parameterType = parameterType.typeArguments[0]; - } - else { - parameterType = undefined; - } - result[i] = serializeTypeNode(parameterType); - } - else { - result[i] = serializeTypeOfNode(parameters[i]); - } - } - return result; - } - } - } - return emptyArray; - } - /** Serializes the return type of function. Used by the __metadata decorator for a method. */ - function serializeReturnTypeOfNode(node) { - if (node && ts.isFunctionLike(node)) { - return serializeTypeNode(node.type); - } - return "void 0"; - } - function writeTypeOfDeclaration(declaration, enclosingDeclaration, flags, writer) { - // Get type of the symbol if this is the valid symbol otherwise get type at location - var symbol = getSymbolOfNode(declaration); - var type = symbol && !(symbol.flags & (2048 /* TypeLiteral */ | 131072 /* Signature */)) - ? getTypeOfSymbol(symbol) - : unknownType; - getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); - } - function writeReturnTypeOfSignatureDeclaration(signatureDeclaration, enclosingDeclaration, flags, writer) { - var signature = getSignatureFromDeclaration(signatureDeclaration); - getSymbolDisplayBuilder().buildTypeDisplay(getReturnTypeOfSignature(signature), writer, enclosingDeclaration, flags); - } - function writeTypeOfExpression(expr, enclosingDeclaration, flags, writer) { - var type = getTypeOfExpression(expr); - getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); - } - function hasGlobalName(name) { - return ts.hasProperty(globals, name); - } - function getReferencedValueSymbol(reference) { - return getNodeLinks(reference).resolvedSymbol || - resolveName(reference, reference.text, 107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */, - /*nodeNotFoundMessage*/ undefined, undefined); - } - function getReferencedValueDeclaration(reference) { - ts.Debug.assert(!ts.nodeIsSynthesized(reference)); - var symbol = getReferencedValueSymbol(reference); - return symbol && getExportSymbolOfValueSymbolIfExported(symbol).valueDeclaration; - } - function getBlockScopedVariableId(n) { - ts.Debug.assert(!ts.nodeIsSynthesized(n)); - var isVariableDeclarationOrBindingElement = n.parent.kind === 155 /* BindingElement */ || (n.parent.kind === 201 /* VariableDeclaration */ && n.parent.name === n); - var symbol = (isVariableDeclarationOrBindingElement ? getSymbolOfNode(n.parent) : undefined) || - getNodeLinks(n).resolvedSymbol || - resolveName(n, n.text, 107455 /* Value */ | 8388608 /* Alias */, undefined, undefined); - var isLetOrConst = symbol && - (symbol.flags & 2 /* BlockScopedVariable */) && - symbol.valueDeclaration.parent.kind !== 226 /* CatchClause */; - if (isLetOrConst) { - // side-effect of calling this method: - // assign id to symbol if it was not yet set - getSymbolLinks(symbol); - return symbol.id; - } - return undefined; - } - function instantiateSingleCallFunctionType(functionType, typeArguments) { - if (functionType === unknownType) { - return unknownType; - } - var signature = getSingleCallSignature(functionType); - if (!signature) { - return unknownType; - } - var instantiatedSignature = getSignatureInstantiation(signature, typeArguments); - return getOrCreateTypeFromSignature(instantiatedSignature); - } - function createResolver() { - return { - getReferencedExportContainer: getReferencedExportContainer, - getReferencedImportDeclaration: getReferencedImportDeclaration, - getReferencedNestedRedeclaration: getReferencedNestedRedeclaration, - isNestedRedeclaration: isNestedRedeclaration, - isValueAliasDeclaration: isValueAliasDeclaration, - hasGlobalName: hasGlobalName, - isReferencedAliasDeclaration: isReferencedAliasDeclaration, - getNodeCheckFlags: getNodeCheckFlags, - isTopLevelValueImportEqualsWithEntityName: isTopLevelValueImportEqualsWithEntityName, - isDeclarationVisible: isDeclarationVisible, - isImplementationOfOverload: isImplementationOfOverload, - writeTypeOfDeclaration: writeTypeOfDeclaration, - writeReturnTypeOfSignatureDeclaration: writeReturnTypeOfSignatureDeclaration, - writeTypeOfExpression: writeTypeOfExpression, - isSymbolAccessible: isSymbolAccessible, - isEntityNameVisible: isEntityNameVisible, - getConstantValue: getConstantValue, - collectLinkedAliases: collectLinkedAliases, - getBlockScopedVariableId: getBlockScopedVariableId, - getReferencedValueDeclaration: getReferencedValueDeclaration, - serializeTypeOfNode: serializeTypeOfNode, - serializeParameterTypesOfNode: serializeParameterTypesOfNode, - serializeReturnTypeOfNode: serializeReturnTypeOfNode - }; - } - function initializeTypeChecker() { - // Bind all source files and propagate errors - ts.forEach(host.getSourceFiles(), function (file) { - ts.bindSourceFile(file); - }); - // Initialize global symbol table - ts.forEach(host.getSourceFiles(), function (file) { - if (!ts.isExternalModule(file)) { - mergeSymbolTable(globals, file.locals); - } - }); - // Initialize special symbols - getSymbolLinks(undefinedSymbol).type = undefinedType; - getSymbolLinks(argumentsSymbol).type = getGlobalType("IArguments"); - getSymbolLinks(unknownSymbol).type = unknownType; - globals[undefinedSymbol.name] = undefinedSymbol; - // Initialize special types - globalArrayType = getGlobalType("Array", 1); - globalObjectType = getGlobalType("Object"); - globalFunctionType = getGlobalType("Function"); - globalStringType = getGlobalType("String"); - globalNumberType = getGlobalType("Number"); - globalBooleanType = getGlobalType("Boolean"); - globalRegExpType = getGlobalType("RegExp"); - getGlobalClassDecoratorType = ts.memoize(function () { return getGlobalType("ClassDecorator"); }); - getGlobalPropertyDecoratorType = ts.memoize(function () { return getGlobalType("PropertyDecorator"); }); - getGlobalMethodDecoratorType = ts.memoize(function () { return getGlobalType("MethodDecorator"); }); - getGlobalParameterDecoratorType = ts.memoize(function () { return getGlobalType("ParameterDecorator"); }); - // If we're in ES6 mode, load the TemplateStringsArray. - // Otherwise, default to 'unknown' for the purposes of type checking in LS scenarios. - if (languageVersion >= 2 /* ES6 */) { - globalTemplateStringsArrayType = getGlobalType("TemplateStringsArray"); - globalESSymbolType = getGlobalType("Symbol"); - globalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol"); - globalIterableType = getGlobalType("Iterable", 1); - globalIteratorType = getGlobalType("Iterator", 1); - globalIterableIteratorType = getGlobalType("IterableIterator", 1); - } - else { - globalTemplateStringsArrayType = unknownType; - // Consider putting Symbol interface in lib.d.ts. On the plus side, putting it in lib.d.ts would make it - // extensible for Polyfilling Symbols. But putting it into lib.d.ts could also break users that have - // a global Symbol already, particularly if it is a class. - globalESSymbolType = createAnonymousType(undefined, emptySymbols, emptyArray, emptyArray, undefined, undefined); - globalESSymbolConstructorSymbol = undefined; - globalIterableType = emptyGenericType; - globalIteratorType = emptyGenericType; - globalIterableIteratorType = emptyGenericType; - } - anyArrayType = createArrayType(anyType); - } - // GRAMMAR CHECKING - function isReservedWordInStrictMode(node) { - // Check that originalKeywordKind is less than LastFutureReservedWord to see if an Identifier is a strict-mode reserved word - return (node.parserContextFlags & 1 /* StrictMode */) && - (102 /* FirstFutureReservedWord */ <= node.originalKeywordKind && node.originalKeywordKind <= 110 /* LastFutureReservedWord */); - } - function reportStrictModeGrammarErrorInClassDeclaration(identifier, message, arg0, arg1, arg2) { - // We are checking if this name is inside class declaration or class expression (which are under class definitions inside ES6 spec.) - // if so, we would like to give more explicit invalid usage error. - if (ts.getAncestor(identifier, 204 /* ClassDeclaration */) || ts.getAncestor(identifier, 177 /* ClassExpression */)) { - return grammarErrorOnNode(identifier, message, arg0); - } - return false; - } - function checkGrammarImportDeclarationNameInStrictMode(node) { - // Check if the import declaration used strict-mode reserved word in its names bindings - if (node.importClause) { - var impotClause = node.importClause; - if (impotClause.namedBindings) { - var nameBindings = impotClause.namedBindings; - if (nameBindings.kind === 214 /* NamespaceImport */) { - var name_15 = nameBindings.name; - if (isReservedWordInStrictMode(name_15)) { - var nameText = ts.declarationNameToString(name_15); - return grammarErrorOnNode(name_15, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText); - } - } - else if (nameBindings.kind === 215 /* NamedImports */) { - var reportError = false; - for (var _i = 0, _a = nameBindings.elements; _i < _a.length; _i++) { - var element = _a[_i]; - var name_16 = element.name; - if (isReservedWordInStrictMode(name_16)) { - var nameText = ts.declarationNameToString(name_16); - reportError = reportError || grammarErrorOnNode(name_16, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText); - } - } - return reportError; - } - } - } - return false; - } - function checkGrammarDeclarationNameInStrictMode(node) { - var name = node.name; - if (name && name.kind === 65 /* Identifier */ && isReservedWordInStrictMode(name)) { - var nameText = ts.declarationNameToString(name); - switch (node.kind) { - case 131 /* Parameter */: - case 201 /* VariableDeclaration */: - case 203 /* FunctionDeclaration */: - case 130 /* TypeParameter */: - case 155 /* BindingElement */: - case 205 /* InterfaceDeclaration */: - case 206 /* TypeAliasDeclaration */: - case 207 /* EnumDeclaration */: - return checkGrammarIdentifierInStrictMode(name); - case 204 /* ClassDeclaration */: - // Report an error if the class declaration uses strict-mode reserved word. - return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode, nameText); - case 208 /* ModuleDeclaration */: - // Report an error if the module declaration uses strict-mode reserved word. - // TODO(yuisu): fix this when having external module in strict mode - return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText); - case 211 /* ImportEqualsDeclaration */: - // TODO(yuisu): fix this when having external module in strict mode - return grammarErrorOnNode(name, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText); - } - } - return false; - } - function checkGrammarTypeReferenceInStrictMode(typeName) { - // Check if the type reference is using strict mode keyword - // Example: - // class C { - // foo(x: public){} // Error. - // } - if (typeName.kind === 65 /* Identifier */) { - checkGrammarTypeNameInStrictMode(typeName); - } - else if (typeName.kind === 128 /* QualifiedName */) { - // Walk from right to left and report a possible error at each Identifier in QualifiedName - // Example: - // x1: public.private.package // error at public and private - checkGrammarTypeNameInStrictMode(typeName.right); - checkGrammarTypeReferenceInStrictMode(typeName.left); - } - } - // This function will report an error for every identifier in property access expression - // whether it violates strict mode reserved words. - // Example: - // public // error at public - // public.private.package // error at public - // B.private.B // no error - function checkGrammarExpressionWithTypeArgumentsInStrictMode(expression) { - // Example: - // class C extends public // error at public - if (expression && expression.kind === 65 /* Identifier */) { - return checkGrammarIdentifierInStrictMode(expression); - } - else if (expression && expression.kind === 158 /* PropertyAccessExpression */) { - // Walk from left to right in PropertyAccessExpression until we are at the left most expression - // in PropertyAccessExpression. According to grammar production of MemberExpression, - // the left component expression is a PrimaryExpression (i.e. Identifier) while the other - // component after dots can be IdentifierName. - checkGrammarExpressionWithTypeArgumentsInStrictMode(expression.expression); - } - } - // The function takes an identifier itself or an expression which has SyntaxKind.Identifier. - function checkGrammarIdentifierInStrictMode(node, nameText) { - if (node && node.kind === 65 /* Identifier */ && isReservedWordInStrictMode(node)) { - if (!nameText) { - nameText = ts.declarationNameToString(node); - } - // TODO (yuisu): Fix when module is a strict mode - var errorReport = reportStrictModeGrammarErrorInClassDeclaration(node, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode, nameText) || - grammarErrorOnNode(node, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode, nameText); - return errorReport; - } - return false; - } - // The function takes an identifier when uses as a typeName in TypeReferenceNode - function checkGrammarTypeNameInStrictMode(node) { - if (node && node.kind === 65 /* Identifier */ && isReservedWordInStrictMode(node)) { - var nameText = ts.declarationNameToString(node); - // TODO (yuisu): Fix when module is a strict mode - var errorReport = reportStrictModeGrammarErrorInClassDeclaration(node, ts.Diagnostics.Type_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode, nameText) || - grammarErrorOnNode(node, ts.Diagnostics.Type_expected_0_is_a_reserved_word_in_strict_mode, nameText); - return errorReport; - } - return false; - } - function checkGrammarDecorators(node) { - if (!node.decorators) { - return false; - } - if (!ts.nodeCanBeDecorated(node)) { - return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here); - } - else if (languageVersion < 1 /* ES5 */) { - return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_only_available_when_targeting_ECMAScript_5_and_higher); - } - else if (node.kind === 138 /* GetAccessor */ || node.kind === 139 /* SetAccessor */) { - var accessors = ts.getAllAccessorDeclarations(node.parent.members, node); - if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) { - return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); - } - } - return false; - } - function checkGrammarModifiers(node) { - switch (node.kind) { - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 137 /* Constructor */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 142 /* IndexSignature */: - case 208 /* ModuleDeclaration */: - case 212 /* ImportDeclaration */: - case 211 /* ImportEqualsDeclaration */: - case 218 /* ExportDeclaration */: - case 217 /* ExportAssignment */: - case 131 /* Parameter */: - break; - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 183 /* VariableStatement */: - case 203 /* FunctionDeclaration */: - case 206 /* TypeAliasDeclaration */: - if (node.modifiers && node.parent.kind !== 209 /* ModuleBlock */ && node.parent.kind !== 230 /* SourceFile */) { - return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); - } - break; - case 207 /* EnumDeclaration */: - if (node.modifiers && (node.modifiers.length > 1 || node.modifiers[0].kind !== 70 /* ConstKeyword */) && - node.parent.kind !== 209 /* ModuleBlock */ && node.parent.kind !== 230 /* SourceFile */) { - return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here); - } - break; - default: - return false; - } - if (!node.modifiers) { - return; - } - var lastStatic, lastPrivate, lastProtected, lastDeclare; - var flags = 0; - for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) { - var modifier = _a[_i]; - switch (modifier.kind) { - case 108 /* PublicKeyword */: - case 107 /* ProtectedKeyword */: - case 106 /* PrivateKeyword */: - var text = void 0; - if (modifier.kind === 108 /* PublicKeyword */) { - text = "public"; - } - else if (modifier.kind === 107 /* ProtectedKeyword */) { - text = "protected"; - lastProtected = modifier; - } - else { - text = "private"; - lastPrivate = modifier; - } - if (flags & 112 /* AccessibilityModifier */) { - return grammarErrorOnNode(modifier, ts.Diagnostics.Accessibility_modifier_already_seen); - } - else if (flags & 128 /* Static */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "static"); - } - else if (node.parent.kind === 209 /* ModuleBlock */ || node.parent.kind === 230 /* SourceFile */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, text); - } - flags |= ts.modifierToFlag(modifier.kind); - break; - case 109 /* StaticKeyword */: - if (flags & 128 /* Static */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "static"); - } - else if (node.parent.kind === 209 /* ModuleBlock */ || node.parent.kind === 230 /* SourceFile */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_element, "static"); - } - else if (node.kind === 131 /* Parameter */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static"); - } - flags |= 128 /* Static */; - lastStatic = modifier; - break; - case 78 /* ExportKeyword */: - if (flags & 1 /* Export */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "export"); - } - else if (flags & 2 /* Ambient */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "declare"); - } - else if (node.parent.kind === 204 /* ClassDeclaration */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "export"); - } - else if (node.kind === 131 /* Parameter */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export"); - } - flags |= 1 /* Export */; - break; - case 115 /* DeclareKeyword */: - if (flags & 2 /* Ambient */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "declare"); - } - else if (node.parent.kind === 204 /* ClassDeclaration */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare"); - } - else if (node.kind === 131 /* Parameter */) { - return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare"); - } - else if (ts.isInAmbientContext(node.parent) && node.parent.kind === 209 /* ModuleBlock */) { - return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context); - } - flags |= 2 /* Ambient */; - lastDeclare = modifier; - break; - } - } - if (node.kind === 137 /* Constructor */) { - if (flags & 128 /* Static */) { - return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static"); - } - else if (flags & 64 /* Protected */) { - return grammarErrorOnNode(lastProtected, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "protected"); - } - else if (flags & 32 /* Private */) { - return grammarErrorOnNode(lastPrivate, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "private"); - } - } - else if ((node.kind === 212 /* ImportDeclaration */ || node.kind === 211 /* ImportEqualsDeclaration */) && flags & 2 /* Ambient */) { - return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_declare_modifier_cannot_be_used_with_an_import_declaration, "declare"); - } - else if (node.kind === 131 /* Parameter */ && (flags & 112 /* AccessibilityModifier */) && ts.isBindingPattern(node.name)) { - return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_a_binding_pattern); - } - } - function checkGrammarForDisallowedTrailingComma(list) { - if (list && list.hasTrailingComma) { - var start = list.end - ",".length; - var end = list.end; - var sourceFile = ts.getSourceFileOfNode(list[0]); - return grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.Trailing_comma_not_allowed); - } - } - function checkGrammarTypeParameterList(node, typeParameters, file) { - if (checkGrammarForDisallowedTrailingComma(typeParameters)) { - return true; - } - if (typeParameters && typeParameters.length === 0) { - var start = typeParameters.pos - "<".length; - var end = ts.skipTrivia(file.text, typeParameters.end) + ">".length; - return grammarErrorAtPos(file, start, end - start, ts.Diagnostics.Type_parameter_list_cannot_be_empty); - } - } - function checkGrammarParameterList(parameters) { - if (checkGrammarForDisallowedTrailingComma(parameters)) { - return true; - } - var seenOptionalParameter = false; - var parameterCount = parameters.length; - for (var i = 0; i < parameterCount; i++) { - var parameter = parameters[i]; - if (parameter.dotDotDotToken) { - if (i !== (parameterCount - 1)) { - return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list); - } - if (ts.isBindingPattern(parameter.name)) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern); - } - if (parameter.questionToken) { - return grammarErrorOnNode(parameter.questionToken, ts.Diagnostics.A_rest_parameter_cannot_be_optional); - } - if (parameter.initializer) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.A_rest_parameter_cannot_have_an_initializer); - } - } - else if (parameter.questionToken || parameter.initializer) { - seenOptionalParameter = true; - if (parameter.questionToken && parameter.initializer) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.Parameter_cannot_have_question_mark_and_initializer); - } - } - else { - if (seenOptionalParameter) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.A_required_parameter_cannot_follow_an_optional_parameter); - } - } - } - } - function checkGrammarFunctionLikeDeclaration(node) { - // Prevent cascading error by short-circuit - var file = ts.getSourceFileOfNode(node); - return checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarTypeParameterList(node, node.typeParameters, file) || - checkGrammarParameterList(node.parameters) || checkGrammarArrowFunction(node, file); - } - function checkGrammarArrowFunction(node, file) { - if (node.kind === 166 /* ArrowFunction */) { - var arrowFunction = node; - var startLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.pos).line; - var endLine = ts.getLineAndCharacterOfPosition(file, arrowFunction.equalsGreaterThanToken.end).line; - if (startLine !== endLine) { - return grammarErrorOnNode(arrowFunction.equalsGreaterThanToken, ts.Diagnostics.Line_terminator_not_permitted_before_arrow); - } - } - return false; - } - function checkGrammarIndexSignatureParameters(node) { - var parameter = node.parameters[0]; - if (node.parameters.length !== 1) { - if (parameter) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_must_have_exactly_one_parameter); - } - else { - return grammarErrorOnNode(node, ts.Diagnostics.An_index_signature_must_have_exactly_one_parameter); - } - } - if (parameter.dotDotDotToken) { - return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.An_index_signature_cannot_have_a_rest_parameter); - } - if (parameter.flags & 499 /* Modifier */) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_cannot_have_an_accessibility_modifier); - } - if (parameter.questionToken) { - return grammarErrorOnNode(parameter.questionToken, ts.Diagnostics.An_index_signature_parameter_cannot_have_a_question_mark); - } - if (parameter.initializer) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_cannot_have_an_initializer); - } - if (!parameter.type) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation); - } - if (parameter.type.kind !== 123 /* StringKeyword */ && parameter.type.kind !== 121 /* NumberKeyword */) { - return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number); - } - if (!node.type) { - return grammarErrorOnNode(node, ts.Diagnostics.An_index_signature_must_have_a_type_annotation); - } - } - function checkGrammarForIndexSignatureModifier(node) { - if (node.flags & 499 /* Modifier */) { - grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_not_permitted_on_index_signature_members); - } - } - function checkGrammarIndexSignature(node) { - // Prevent cascading error by short-circuit - return checkGrammarDecorators(node) || checkGrammarModifiers(node) || checkGrammarIndexSignatureParameters(node) || checkGrammarForIndexSignatureModifier(node); - } - function checkGrammarForAtLeastOneTypeArgument(node, typeArguments) { - if (typeArguments && typeArguments.length === 0) { - var sourceFile = ts.getSourceFileOfNode(node); - var start = typeArguments.pos - "<".length; - var end = ts.skipTrivia(sourceFile.text, typeArguments.end) + ">".length; - return grammarErrorAtPos(sourceFile, start, end - start, ts.Diagnostics.Type_argument_list_cannot_be_empty); - } - } - function checkGrammarTypeArguments(node, typeArguments) { - return checkGrammarForDisallowedTrailingComma(typeArguments) || - checkGrammarForAtLeastOneTypeArgument(node, typeArguments); - } - function checkGrammarForOmittedArgument(node, arguments) { - if (arguments) { - var sourceFile = ts.getSourceFileOfNode(node); - for (var _i = 0; _i < arguments.length; _i++) { - var arg = arguments[_i]; - if (arg.kind === 178 /* OmittedExpression */) { - return grammarErrorAtPos(sourceFile, arg.pos, 0, ts.Diagnostics.Argument_expression_expected); - } - } - } - } - function checkGrammarArguments(node, arguments) { - return checkGrammarForDisallowedTrailingComma(arguments) || - checkGrammarForOmittedArgument(node, arguments); - } - function checkGrammarHeritageClause(node) { - var types = node.types; - if (checkGrammarForDisallowedTrailingComma(types)) { - return true; - } - if (types && types.length === 0) { - var listType = ts.tokenToString(node.token); - var sourceFile = ts.getSourceFileOfNode(node); - return grammarErrorAtPos(sourceFile, types.pos, 0, ts.Diagnostics._0_list_cannot_be_empty, listType); - } - } - function checkGrammarClassDeclarationHeritageClauses(node) { - var seenExtendsClause = false; - var seenImplementsClause = false; - if (!checkGrammarDecorators(node) && !checkGrammarModifiers(node) && node.heritageClauses) { - for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) { - var heritageClause = _a[_i]; - if (heritageClause.token === 79 /* ExtendsKeyword */) { - if (seenExtendsClause) { - return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); - } - if (seenImplementsClause) { - return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_must_precede_implements_clause); - } - if (heritageClause.types.length > 1) { - return grammarErrorOnFirstToken(heritageClause.types[1], ts.Diagnostics.Classes_can_only_extend_a_single_class); - } - seenExtendsClause = true; - } - else { - ts.Debug.assert(heritageClause.token === 102 /* ImplementsKeyword */); - if (seenImplementsClause) { - return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.implements_clause_already_seen); - } - seenImplementsClause = true; - } - // Grammar checking heritageClause inside class declaration - checkGrammarHeritageClause(heritageClause); - } - } - } - function checkGrammarInterfaceDeclaration(node) { - var seenExtendsClause = false; - if (node.heritageClauses) { - for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) { - var heritageClause = _a[_i]; - if (heritageClause.token === 79 /* ExtendsKeyword */) { - if (seenExtendsClause) { - return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen); - } - seenExtendsClause = true; - } - else { - ts.Debug.assert(heritageClause.token === 102 /* ImplementsKeyword */); - return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.Interface_declaration_cannot_have_implements_clause); - } - // Grammar checking heritageClause inside class declaration - checkGrammarHeritageClause(heritageClause); - } - } - return false; - } - function checkGrammarComputedPropertyName(node) { - // If node is not a computedPropertyName, just skip the grammar checking - if (node.kind !== 129 /* ComputedPropertyName */) { - return false; - } - var computedPropertyName = node; - if (computedPropertyName.expression.kind === 172 /* BinaryExpression */ && computedPropertyName.expression.operatorToken.kind === 23 /* CommaToken */) { - return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name); - } - } - function checkGrammarForGenerator(node) { - if (node.asteriskToken) { - ts.Debug.assert(node.kind === 203 /* FunctionDeclaration */ || - node.kind === 165 /* FunctionExpression */ || - node.kind === 136 /* MethodDeclaration */); - if (ts.isInAmbientContext(node)) { - return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context); - } - if (!node.body) { - return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator); - } - if (languageVersion < 2 /* ES6 */) { - return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_only_available_when_targeting_ECMAScript_6_or_higher); - } - } - } - function checkGrammarFunctionName(name) { - // It is a SyntaxError if the identifier eval or arguments appears within a FormalParameterList of a strict mode FunctionDeclaration or FunctionExpression (13.1)) - return checkGrammarEvalOrArgumentsInStrictMode(name, name); - } - function checkGrammarForInvalidQuestionMark(node, questionToken, message) { - if (questionToken) { - return grammarErrorOnNode(questionToken, message); - } - } - function checkGrammarObjectLiteralExpression(node) { - var seen = {}; - var Property = 1; - var GetAccessor = 2; - var SetAccesor = 4; - var GetOrSetAccessor = GetAccessor | SetAccesor; - var inStrictMode = (node.parserContextFlags & 1 /* StrictMode */) !== 0; - for (var _i = 0, _a = node.properties; _i < _a.length; _i++) { - var prop = _a[_i]; - var name_17 = prop.name; - if (prop.kind === 178 /* OmittedExpression */ || - name_17.kind === 129 /* ComputedPropertyName */) { - // If the name is not a ComputedPropertyName, the grammar checking will skip it - checkGrammarComputedPropertyName(name_17); - continue; - } - // ECMA-262 11.1.5 Object Initialiser - // If previous is not undefined then throw a SyntaxError exception if any of the following conditions are true - // a.This production is contained in strict code and IsDataDescriptor(previous) is true and - // IsDataDescriptor(propId.descriptor) is true. - // b.IsDataDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true. - // c.IsAccessorDescriptor(previous) is true and IsDataDescriptor(propId.descriptor) is true. - // d.IsAccessorDescriptor(previous) is true and IsAccessorDescriptor(propId.descriptor) is true - // and either both previous and propId.descriptor have[[Get]] fields or both previous and propId.descriptor have[[Set]] fields - var currentKind = void 0; - if (prop.kind === 227 /* PropertyAssignment */ || prop.kind === 228 /* ShorthandPropertyAssignment */) { - // Grammar checking for computedPropertName and shorthandPropertyAssignment - checkGrammarForInvalidQuestionMark(prop, prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional); - if (name_17.kind === 7 /* NumericLiteral */) { - checkGrammarNumericLiteral(name_17); - } - currentKind = Property; - } - else if (prop.kind === 136 /* MethodDeclaration */) { - currentKind = Property; - } - else if (prop.kind === 138 /* GetAccessor */) { - currentKind = GetAccessor; - } - else if (prop.kind === 139 /* SetAccessor */) { - currentKind = SetAccesor; - } - else { - ts.Debug.fail("Unexpected syntax kind:" + prop.kind); - } - if (!ts.hasProperty(seen, name_17.text)) { - seen[name_17.text] = currentKind; - } - else { - var existingKind = seen[name_17.text]; - if (currentKind === Property && existingKind === Property) { - if (inStrictMode) { - grammarErrorOnNode(name_17, ts.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode); - } - } - else if ((currentKind & GetOrSetAccessor) && (existingKind & GetOrSetAccessor)) { - if (existingKind !== GetOrSetAccessor && currentKind !== existingKind) { - seen[name_17.text] = currentKind | existingKind; - } - else { - return grammarErrorOnNode(name_17, ts.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name); - } - } - else { - return grammarErrorOnNode(name_17, ts.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name); - } - } - } - } - function checkGrammarForInOrForOfStatement(forInOrOfStatement) { - if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) { - return true; - } - if (forInOrOfStatement.initializer.kind === 202 /* VariableDeclarationList */) { - var variableList = forInOrOfStatement.initializer; - if (!checkGrammarVariableDeclarationList(variableList)) { - if (variableList.declarations.length > 1) { - var diagnostic = forInOrOfStatement.kind === 190 /* ForInStatement */ - ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement - : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement; - return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic); - } - var firstDeclaration = variableList.declarations[0]; - if (firstDeclaration.initializer) { - var diagnostic = forInOrOfStatement.kind === 190 /* ForInStatement */ - ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer - : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer; - return grammarErrorOnNode(firstDeclaration.name, diagnostic); - } - if (firstDeclaration.type) { - var diagnostic = forInOrOfStatement.kind === 190 /* ForInStatement */ - ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation - : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation; - return grammarErrorOnNode(firstDeclaration, diagnostic); - } - } - } - return false; - } - function checkGrammarAccessor(accessor) { - var kind = accessor.kind; - if (languageVersion < 1 /* ES5 */) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher); - } - else if (ts.isInAmbientContext(accessor)) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_be_declared_in_an_ambient_context); - } - else if (accessor.body === undefined) { - return grammarErrorAtPos(ts.getSourceFileOfNode(accessor), accessor.end - 1, ";".length, ts.Diagnostics._0_expected, "{"); - } - else if (accessor.typeParameters) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters); - } - else if (kind === 138 /* GetAccessor */ && accessor.parameters.length) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_get_accessor_cannot_have_parameters); - } - else if (kind === 139 /* SetAccessor */) { - if (accessor.type) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation); - } - else if (accessor.parameters.length !== 1) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter); - } - else { - var parameter = accessor.parameters[0]; - if (parameter.dotDotDotToken) { - return grammarErrorOnNode(parameter.dotDotDotToken, ts.Diagnostics.A_set_accessor_cannot_have_rest_parameter); - } - else if (parameter.flags & 499 /* Modifier */) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation); - } - else if (parameter.questionToken) { - return grammarErrorOnNode(parameter.questionToken, ts.Diagnostics.A_set_accessor_cannot_have_an_optional_parameter); - } - else if (parameter.initializer) { - return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_parameter_cannot_have_an_initializer); - } - } - } - } - function checkGrammarForNonSymbolComputedProperty(node, message) { - if (node.kind === 129 /* ComputedPropertyName */ && !ts.isWellKnownSymbolSyntactically(node.expression)) { - return grammarErrorOnNode(node, message); - } - } - function checkGrammarMethod(node) { - if (checkGrammarDisallowedModifiersInBlockOrObjectLiteralExpression(node) || - checkGrammarFunctionLikeDeclaration(node) || - checkGrammarForGenerator(node)) { - return true; - } - if (node.parent.kind === 157 /* ObjectLiteralExpression */) { - if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.A_class_member_cannot_be_declared_optional)) { - return true; - } - else if (node.body === undefined) { - return grammarErrorAtPos(getSourceFile(node), node.end - 1, ";".length, ts.Diagnostics._0_expected, "{"); - } - } - if (node.parent.kind === 204 /* ClassDeclaration */) { - if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.A_class_member_cannot_be_declared_optional)) { - return true; - } - // Technically, computed properties in ambient contexts is disallowed - // for property declarations and accessors too, not just methods. - // However, property declarations disallow computed names in general, - // and accessors are not allowed in ambient contexts in general, - // so this error only really matters for methods. - if (ts.isInAmbientContext(node)) { - return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_symbol); - } - else if (!node.body) { - return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol); - } - } - else if (node.parent.kind === 205 /* InterfaceDeclaration */) { - return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol); - } - else if (node.parent.kind === 148 /* TypeLiteral */) { - return checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol); - } - } - function isIterationStatement(node, lookInLabeledStatements) { - switch (node.kind) { - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 187 /* DoStatement */: - case 188 /* WhileStatement */: - return true; - case 197 /* LabeledStatement */: - return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements); - } - return false; - } - function checkGrammarBreakOrContinueStatement(node) { - var current = node; - while (current) { - if (ts.isFunctionLike(current)) { - return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary); - } - switch (current.kind) { - case 197 /* LabeledStatement */: - if (node.label && current.label.text === node.label.text) { - // found matching label - verify that label usage is correct - // continue can only target labels that are on iteration statements - var isMisplacedContinueLabel = node.kind === 192 /* ContinueStatement */ - && !isIterationStatement(current.statement, true); - if (isMisplacedContinueLabel) { - return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement); - } - return false; - } - break; - case 196 /* SwitchStatement */: - if (node.kind === 193 /* BreakStatement */ && !node.label) { - // unlabeled break within switch statement - ok - return false; - } - break; - default: - if (isIterationStatement(current, false) && !node.label) { - // unlabeled break or continue within iteration statement - ok - return false; - } - break; - } - current = current.parent; - } - if (node.label) { - var message = node.kind === 193 /* BreakStatement */ - ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement - : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement; - return grammarErrorOnNode(node, message); - } - else { - var message = node.kind === 193 /* BreakStatement */ - ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement - : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement; - return grammarErrorOnNode(node, message); - } - } - function checkGrammarBindingElement(node) { - if (node.dotDotDotToken) { - var elements = node.parent.elements; - if (node !== ts.lastOrUndefined(elements)) { - return grammarErrorOnNode(node, ts.Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pattern); - } - if (node.name.kind === 154 /* ArrayBindingPattern */ || node.name.kind === 153 /* ObjectBindingPattern */) { - return grammarErrorOnNode(node.name, ts.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern); - } - if (node.initializer) { - // Error on equals token which immediate precedes the initializer - return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.initializer.pos - 1, 1, ts.Diagnostics.A_rest_element_cannot_have_an_initializer); - } - } - // It is a SyntaxError if a VariableDeclaration or VariableDeclarationNoIn occurs within strict code - // and its Identifier is eval or arguments - return checkGrammarEvalOrArgumentsInStrictMode(node, node.name); - } - function checkGrammarVariableDeclaration(node) { - if (node.parent.parent.kind !== 190 /* ForInStatement */ && node.parent.parent.kind !== 191 /* ForOfStatement */) { - if (ts.isInAmbientContext(node)) { - if (node.initializer) { - // Error on equals token which immediate precedes the initializer - var equalsTokenLength = "=".length; - return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.initializer.pos - equalsTokenLength, equalsTokenLength, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); - } - } - else if (!node.initializer) { - if (ts.isBindingPattern(node.name) && !ts.isBindingPattern(node.parent)) { - return grammarErrorOnNode(node, ts.Diagnostics.A_destructuring_declaration_must_have_an_initializer); - } - if (ts.isConst(node)) { - return grammarErrorOnNode(node, ts.Diagnostics.const_declarations_must_be_initialized); - } - } - } - var checkLetConstNames = languageVersion >= 2 /* ES6 */ && (ts.isLet(node) || ts.isConst(node)); - // 1. LexicalDeclaration : LetOrConst BindingList ; - // It is a Syntax Error if the BoundNames of BindingList contains "let". - // 2. ForDeclaration: ForDeclaration : LetOrConst ForBinding - // It is a Syntax Error if the BoundNames of ForDeclaration contains "let". - // It is a SyntaxError if a VariableDeclaration or VariableDeclarationNoIn occurs within strict code - // and its Identifier is eval or arguments - return (checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name)) || - checkGrammarEvalOrArgumentsInStrictMode(node, node.name); - } - function checkGrammarNameInLetOrConstDeclarations(name) { - if (name.kind === 65 /* Identifier */) { - if (name.text === "let") { - return grammarErrorOnNode(name, ts.Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations); - } - } - else { - var elements = name.elements; - for (var _i = 0; _i < elements.length; _i++) { - var element = elements[_i]; - if (element.kind !== 178 /* OmittedExpression */) { - checkGrammarNameInLetOrConstDeclarations(element.name); - } - } - } - } - function checkGrammarVariableDeclarationList(declarationList) { - var declarations = declarationList.declarations; - if (checkGrammarForDisallowedTrailingComma(declarationList.declarations)) { - return true; - } - if (!declarationList.declarations.length) { - return grammarErrorAtPos(ts.getSourceFileOfNode(declarationList), declarations.pos, declarations.end - declarations.pos, ts.Diagnostics.Variable_declaration_list_cannot_be_empty); - } - } - function allowLetAndConstDeclarations(parent) { - switch (parent.kind) { - case 186 /* IfStatement */: - case 187 /* DoStatement */: - case 188 /* WhileStatement */: - case 195 /* WithStatement */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - return false; - case 197 /* LabeledStatement */: - return allowLetAndConstDeclarations(parent.parent); - } - return true; - } - function checkGrammarForDisallowedLetOrConstStatement(node) { - if (!allowLetAndConstDeclarations(node.parent)) { - if (ts.isLet(node.declarationList)) { - return grammarErrorOnNode(node, ts.Diagnostics.let_declarations_can_only_be_declared_inside_a_block); - } - else if (ts.isConst(node.declarationList)) { - return grammarErrorOnNode(node, ts.Diagnostics.const_declarations_can_only_be_declared_inside_a_block); - } - } - } - function isIntegerLiteral(expression) { - if (expression.kind === 170 /* PrefixUnaryExpression */) { - var unaryExpression = expression; - if (unaryExpression.operator === 33 /* PlusToken */ || unaryExpression.operator === 34 /* MinusToken */) { - expression = unaryExpression.operand; - } - } - if (expression.kind === 7 /* NumericLiteral */) { - // Allows for scientific notation since literalExpression.text was formed by - // coercing a number to a string. Sometimes this coercion can yield a string - // in scientific notation. - // We also don't need special logic for hex because a hex integer is converted - // to decimal when it is coerced. - return /^[0-9]+([eE]\+?[0-9]+)?$/.test(expression.text); - } - return false; - } - function checkGrammarEnumDeclaration(enumDecl) { - var enumIsConst = (enumDecl.flags & 8192 /* Const */) !== 0; - var hasError = false; - // skip checks below for const enums - they allow arbitrary initializers as long as they can be evaluated to constant expressions. - // since all values are known in compile time - it is not necessary to check that constant enum section precedes computed enum members. - if (!enumIsConst) { - var inConstantEnumMemberSection = true; - var inAmbientContext = ts.isInAmbientContext(enumDecl); - for (var _i = 0, _a = enumDecl.members; _i < _a.length; _i++) { - var node = _a[_i]; - // Do not use hasDynamicName here, because that returns false for well known symbols. - // We want to perform checkComputedPropertyName for all computed properties, including - // well known symbols. - if (node.name.kind === 129 /* ComputedPropertyName */) { - hasError = grammarErrorOnNode(node.name, ts.Diagnostics.Computed_property_names_are_not_allowed_in_enums); - } - else if (inAmbientContext) { - if (node.initializer && !isIntegerLiteral(node.initializer)) { - hasError = grammarErrorOnNode(node.name, ts.Diagnostics.Ambient_enum_elements_can_only_have_integer_literal_initializers) || hasError; - } - } - else if (node.initializer) { - inConstantEnumMemberSection = isIntegerLiteral(node.initializer); - } - else if (!inConstantEnumMemberSection) { - hasError = grammarErrorOnNode(node.name, ts.Diagnostics.Enum_member_must_have_initializer) || hasError; - } - } - } - return hasError; - } - function hasParseDiagnostics(sourceFile) { - return sourceFile.parseDiagnostics.length > 0; - } - function grammarErrorOnFirstToken(node, message, arg0, arg1, arg2) { - var sourceFile = ts.getSourceFileOfNode(node); - if (!hasParseDiagnostics(sourceFile)) { - var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); - diagnostics.add(ts.createFileDiagnostic(sourceFile, span.start, span.length, message, arg0, arg1, arg2)); - return true; - } - } - function grammarErrorAtPos(sourceFile, start, length, message, arg0, arg1, arg2) { - if (!hasParseDiagnostics(sourceFile)) { - diagnostics.add(ts.createFileDiagnostic(sourceFile, start, length, message, arg0, arg1, arg2)); - return true; - } - } - function grammarErrorOnNode(node, message, arg0, arg1, arg2) { - var sourceFile = ts.getSourceFileOfNode(node); - if (!hasParseDiagnostics(sourceFile)) { - diagnostics.add(ts.createDiagnosticForNode(node, message, arg0, arg1, arg2)); - return true; - } - } - function checkGrammarEvalOrArgumentsInStrictMode(contextNode, name) { - if (name && name.kind === 65 /* Identifier */) { - var identifier = name; - if (contextNode && (contextNode.parserContextFlags & 1 /* StrictMode */) && isEvalOrArgumentsIdentifier(identifier)) { - var nameText = ts.declarationNameToString(identifier); - // We check first if the name is inside class declaration or class expression; if so give explicit message - // otherwise report generic error message. - // reportGrammarErrorInClassDeclaration only return true if grammar error is successfully reported and false otherwise - var reportErrorInClassDeclaration = reportStrictModeGrammarErrorInClassDeclaration(identifier, ts.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode, nameText); - if (!reportErrorInClassDeclaration) { - return grammarErrorOnNode(identifier, ts.Diagnostics.Invalid_use_of_0_in_strict_mode, nameText); - } - return reportErrorInClassDeclaration; - } - } - } - function isEvalOrArgumentsIdentifier(node) { - return node.kind === 65 /* Identifier */ && - (node.text === "eval" || node.text === "arguments"); - } - function checkGrammarConstructorTypeParameters(node) { - if (node.typeParameters) { - return grammarErrorAtPos(ts.getSourceFileOfNode(node), node.typeParameters.pos, node.typeParameters.end - node.typeParameters.pos, ts.Diagnostics.Type_parameters_cannot_appear_on_a_constructor_declaration); - } - } - function checkGrammarConstructorTypeAnnotation(node) { - if (node.type) { - return grammarErrorOnNode(node.type, ts.Diagnostics.Type_annotation_cannot_appear_on_a_constructor_declaration); - } - } - function checkGrammarProperty(node) { - if (node.parent.kind === 204 /* ClassDeclaration */) { - if (checkGrammarForInvalidQuestionMark(node, node.questionToken, ts.Diagnostics.A_class_member_cannot_be_declared_optional) || - checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol)) { - return true; - } - } - else if (node.parent.kind === 205 /* InterfaceDeclaration */) { - if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) { - return true; - } - } - else if (node.parent.kind === 148 /* TypeLiteral */) { - if (checkGrammarForNonSymbolComputedProperty(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) { - return true; - } - } - if (ts.isInAmbientContext(node) && node.initializer) { - return grammarErrorOnFirstToken(node.initializer, ts.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts); - } - } - function checkGrammarTopLevelElementForRequiredDeclareModifier(node) { - // A declare modifier is required for any top level .d.ts declaration except export=, export default, - // interfaces and imports categories: - // - // DeclarationElement: - // ExportAssignment - // export_opt InterfaceDeclaration - // export_opt ImportDeclaration - // export_opt ExternalImportDeclaration - // export_opt AmbientDeclaration - // - if (node.kind === 205 /* InterfaceDeclaration */ || - node.kind === 212 /* ImportDeclaration */ || - node.kind === 211 /* ImportEqualsDeclaration */ || - node.kind === 218 /* ExportDeclaration */ || - node.kind === 217 /* ExportAssignment */ || - (node.flags & 2 /* Ambient */) || - (node.flags & (1 /* Export */ | 256 /* Default */))) { - return false; - } - return grammarErrorOnFirstToken(node, ts.Diagnostics.A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file); - } - function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) { - for (var _i = 0, _a = file.statements; _i < _a.length; _i++) { - var decl = _a[_i]; - if (ts.isDeclaration(decl) || decl.kind === 183 /* VariableStatement */) { - if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) { - return true; - } - } - } - } - function checkGrammarSourceFile(node) { - return ts.isInAmbientContext(node) && checkGrammarTopLevelElementsForRequiredDeclareModifier(node); - } - function checkGrammarStatementInAmbientContext(node) { - if (ts.isInAmbientContext(node)) { - // An accessors is already reported about the ambient context - if (isAccessor(node.parent.kind)) { - return getNodeLinks(node).hasReportedStatementInAmbientContext = true; - } - // Find containing block which is either Block, ModuleBlock, SourceFile - var links = getNodeLinks(node); - if (!links.hasReportedStatementInAmbientContext && ts.isFunctionLike(node.parent)) { - return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts); - } - // We are either parented by another statement, or some sort of block. - // If we're in a block, we only want to really report an error once - // to prevent noisyness. So use a bit on the block to indicate if - // this has already been reported, and don't report if it has. - // - if (node.parent.kind === 182 /* Block */ || node.parent.kind === 209 /* ModuleBlock */ || node.parent.kind === 230 /* SourceFile */) { - var links_1 = getNodeLinks(node.parent); - // Check if the containing block ever report this error - if (!links_1.hasReportedStatementInAmbientContext) { - return links_1.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts); - } - } - else { - } - } - } - function checkGrammarNumericLiteral(node) { - // Grammar checking - if (node.flags & 16384 /* OctalLiteral */) { - if (node.parserContextFlags & 1 /* StrictMode */) { - return grammarErrorOnNode(node, ts.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode); - } - else if (languageVersion >= 1 /* ES5 */) { - return grammarErrorOnNode(node, ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher); - } - } - } - function grammarErrorAfterFirstToken(node, message, arg0, arg1, arg2) { - var sourceFile = ts.getSourceFileOfNode(node); - if (!hasParseDiagnostics(sourceFile)) { - var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos); - diagnostics.add(ts.createFileDiagnostic(sourceFile, ts.textSpanEnd(span), 0, message, arg0, arg1, arg2)); - return true; - } - } - initializeTypeChecker(); - return checker; - } - ts.createTypeChecker = createTypeChecker; -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - function getDeclarationDiagnostics(host, resolver, targetSourceFile) { - var diagnostics = []; - var jsFilePath = ts.getOwnEmitOutputFilePath(targetSourceFile, host, ".js"); - emitDeclarations(host, resolver, diagnostics, jsFilePath, targetSourceFile); - return diagnostics; - } - ts.getDeclarationDiagnostics = getDeclarationDiagnostics; - function emitDeclarations(host, resolver, diagnostics, jsFilePath, root) { - var newLine = host.getNewLine(); - var compilerOptions = host.getCompilerOptions(); - var languageVersion = compilerOptions.target || 0 /* ES3 */; - var write; - var writeLine; - var increaseIndent; - var decreaseIndent; - var writeTextOfNode; - var writer = createAndSetNewTextWriterWithSymbolWriter(); - var enclosingDeclaration; - var currentSourceFile; - var reportedDeclarationError = false; - var emitJsDocComments = compilerOptions.removeComments ? function (declaration) { } : writeJsDocComments; - var emit = compilerOptions.stripInternal ? stripInternal : emitNode; - var moduleElementDeclarationEmitInfo = []; - var asynchronousSubModuleDeclarationEmitInfo; - // Contains the reference paths that needs to go in the declaration file. - // Collecting this separately because reference paths need to be first thing in the declaration file - // and we could be collecting these paths from multiple files into single one with --out option - var referencePathsOutput = ""; - if (root) { - // Emitting just a single file, so emit references in this file only - if (!compilerOptions.noResolve) { - var addedGlobalFileReference = false; - ts.forEach(root.referencedFiles, function (fileReference) { - var referencedFile = ts.tryResolveScriptReference(host, root, fileReference); - // All the references that are not going to be part of same file - if (referencedFile && ((referencedFile.flags & 2048 /* DeclarationFile */) || - ts.shouldEmitToOwnFile(referencedFile, compilerOptions) || - !addedGlobalFileReference)) { - writeReferencePath(referencedFile); - if (!ts.isExternalModuleOrDeclarationFile(referencedFile)) { - addedGlobalFileReference = true; - } - } - }); - } - emitSourceFile(root); - // create asynchronous output for the importDeclarations - if (moduleElementDeclarationEmitInfo.length) { - var oldWriter = writer; - ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { - if (aliasEmitInfo.isVisible) { - ts.Debug.assert(aliasEmitInfo.node.kind === 212 /* ImportDeclaration */); - createAndSetNewTextWriterWithSymbolWriter(); - ts.Debug.assert(aliasEmitInfo.indent === 0); - writeImportDeclaration(aliasEmitInfo.node); - aliasEmitInfo.asynchronousOutput = writer.getText(); - } - }); - setWriter(oldWriter); - } - } - else { - // Emit references corresponding to this file - var emittedReferencedFiles = []; - ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (!ts.isExternalModuleOrDeclarationFile(sourceFile)) { - // Check what references need to be added - if (!compilerOptions.noResolve) { - ts.forEach(sourceFile.referencedFiles, function (fileReference) { - var referencedFile = ts.tryResolveScriptReference(host, sourceFile, fileReference); - // If the reference file is a declaration file or an external module, emit that reference - if (referencedFile && (ts.isExternalModuleOrDeclarationFile(referencedFile) && - !ts.contains(emittedReferencedFiles, referencedFile))) { - writeReferencePath(referencedFile); - emittedReferencedFiles.push(referencedFile); - } - }); - } - emitSourceFile(sourceFile); - } - }); - } - return { - reportedDeclarationError: reportedDeclarationError, - moduleElementDeclarationEmitInfo: moduleElementDeclarationEmitInfo, - synchronousDeclarationOutput: writer.getText(), - referencePathsOutput: referencePathsOutput - }; - function hasInternalAnnotation(range) { - var text = currentSourceFile.text; - var comment = text.substring(range.pos, range.end); - return comment.indexOf("@internal") >= 0; - } - function stripInternal(node) { - if (node) { - var leadingCommentRanges = ts.getLeadingCommentRanges(currentSourceFile.text, node.pos); - if (ts.forEach(leadingCommentRanges, hasInternalAnnotation)) { - return; - } - emitNode(node); - } - } - function createAndSetNewTextWriterWithSymbolWriter() { - var writer = ts.createTextWriter(newLine); - writer.trackSymbol = trackSymbol; - writer.writeKeyword = writer.write; - writer.writeOperator = writer.write; - writer.writePunctuation = writer.write; - writer.writeSpace = writer.write; - writer.writeStringLiteral = writer.writeLiteral; - writer.writeParameter = writer.write; - writer.writeSymbol = writer.write; - setWriter(writer); - return writer; - } - function setWriter(newWriter) { - writer = newWriter; - write = newWriter.write; - writeTextOfNode = newWriter.writeTextOfNode; - writeLine = newWriter.writeLine; - increaseIndent = newWriter.increaseIndent; - decreaseIndent = newWriter.decreaseIndent; - } - function writeAsynchronousModuleElements(nodes) { - var oldWriter = writer; - ts.forEach(nodes, function (declaration) { - var nodeToCheck; - if (declaration.kind === 201 /* VariableDeclaration */) { - nodeToCheck = declaration.parent.parent; - } - else if (declaration.kind === 215 /* NamedImports */ || declaration.kind === 216 /* ImportSpecifier */ || declaration.kind === 213 /* ImportClause */) { - ts.Debug.fail("We should be getting ImportDeclaration instead to write"); - } - else { - nodeToCheck = declaration; - } - var moduleElementEmitInfo = ts.forEach(moduleElementDeclarationEmitInfo, function (declEmitInfo) { return declEmitInfo.node === nodeToCheck ? declEmitInfo : undefined; }); - if (!moduleElementEmitInfo && asynchronousSubModuleDeclarationEmitInfo) { - moduleElementEmitInfo = ts.forEach(asynchronousSubModuleDeclarationEmitInfo, function (declEmitInfo) { return declEmitInfo.node === nodeToCheck ? declEmitInfo : undefined; }); - } - // If the alias was marked as not visible when we saw its declaration, we would have saved the aliasEmitInfo, but if we haven't yet visited the alias declaration - // then we don't need to write it at this point. We will write it when we actually see its declaration - // Eg. - // export function bar(a: foo.Foo) { } - // import foo = require("foo"); - // Writing of function bar would mark alias declaration foo as visible but we haven't yet visited that declaration so do nothing, - // we would write alias foo declaration when we visit it since it would now be marked as visible - if (moduleElementEmitInfo) { - if (moduleElementEmitInfo.node.kind === 212 /* ImportDeclaration */) { - // we have to create asynchronous output only after we have collected complete information - // because it is possible to enable multiple bindings as asynchronously visible - moduleElementEmitInfo.isVisible = true; - } - else { - createAndSetNewTextWriterWithSymbolWriter(); - for (var declarationIndent = moduleElementEmitInfo.indent; declarationIndent; declarationIndent--) { - increaseIndent(); - } - if (nodeToCheck.kind === 208 /* ModuleDeclaration */) { - ts.Debug.assert(asynchronousSubModuleDeclarationEmitInfo === undefined); - asynchronousSubModuleDeclarationEmitInfo = []; - } - writeModuleElement(nodeToCheck); - if (nodeToCheck.kind === 208 /* ModuleDeclaration */) { - moduleElementEmitInfo.subModuleElementDeclarationEmitInfo = asynchronousSubModuleDeclarationEmitInfo; - asynchronousSubModuleDeclarationEmitInfo = undefined; - } - moduleElementEmitInfo.asynchronousOutput = writer.getText(); - } - } - }); - setWriter(oldWriter); - } - function handleSymbolAccessibilityError(symbolAccesibilityResult) { - if (symbolAccesibilityResult.accessibility === 0 /* Accessible */) { - // write the aliases - if (symbolAccesibilityResult && symbolAccesibilityResult.aliasesToMakeVisible) { - writeAsynchronousModuleElements(symbolAccesibilityResult.aliasesToMakeVisible); - } - } - else { - // Report error - reportedDeclarationError = true; - var errorInfo = writer.getSymbolAccessibilityDiagnostic(symbolAccesibilityResult); - if (errorInfo) { - if (errorInfo.typeName) { - diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, errorInfo.typeName), symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); - } - else { - diagnostics.push(ts.createDiagnosticForNode(symbolAccesibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, symbolAccesibilityResult.errorSymbolName, symbolAccesibilityResult.errorModuleName)); - } - } - } - } - function trackSymbol(symbol, enclosingDeclaration, meaning) { - handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning)); - } - function writeTypeOfDeclaration(declaration, type, getSymbolAccessibilityDiagnostic) { - writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic; - write(": "); - if (type) { - // Write the type - emitType(type); - } - else { - resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, 2 /* UseTypeOfFunction */, writer); - } - } - function writeReturnTypeAtSignature(signature, getSymbolAccessibilityDiagnostic) { - writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic; - write(": "); - if (signature.type) { - // Write the type - emitType(signature.type); - } - else { - resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, 2 /* UseTypeOfFunction */, writer); - } - } - function emitLines(nodes) { - for (var _i = 0; _i < nodes.length; _i++) { - var node = nodes[_i]; - emit(node); - } - } - function emitSeparatedList(nodes, separator, eachNodeEmitFn, canEmitFn) { - var currentWriterPos = writer.getTextPos(); - for (var _i = 0; _i < nodes.length; _i++) { - var node = nodes[_i]; - if (!canEmitFn || canEmitFn(node)) { - if (currentWriterPos !== writer.getTextPos()) { - write(separator); - } - currentWriterPos = writer.getTextPos(); - eachNodeEmitFn(node); - } - } - } - function emitCommaList(nodes, eachNodeEmitFn, canEmitFn) { - emitSeparatedList(nodes, ", ", eachNodeEmitFn, canEmitFn); - } - function writeJsDocComments(declaration) { - if (declaration) { - var jsDocComments = ts.getJsDocComments(declaration, currentSourceFile); - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, declaration, jsDocComments); - // jsDoc comments are emitted at /*leading comment1 */space/*leading comment*/space - ts.emitComments(currentSourceFile, writer, jsDocComments, true, newLine, ts.writeCommentRange); - } - } - function emitTypeWithNewGetSymbolAccessibilityDiagnostic(type, getSymbolAccessibilityDiagnostic) { - writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic; - emitType(type); - } - function emitType(type) { - switch (type.kind) { - case 112 /* AnyKeyword */: - case 123 /* StringKeyword */: - case 121 /* NumberKeyword */: - case 113 /* BooleanKeyword */: - case 124 /* SymbolKeyword */: - case 99 /* VoidKeyword */: - case 8 /* StringLiteral */: - return writeTextOfNode(currentSourceFile, type); - case 179 /* ExpressionWithTypeArguments */: - return emitExpressionWithTypeArguments(type); - case 144 /* TypeReference */: - return emitTypeReference(type); - case 147 /* TypeQuery */: - return emitTypeQuery(type); - case 149 /* ArrayType */: - return emitArrayType(type); - case 150 /* TupleType */: - return emitTupleType(type); - case 151 /* UnionType */: - return emitUnionType(type); - case 152 /* ParenthesizedType */: - return emitParenType(type); - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - return emitSignatureDeclarationWithJsDocComments(type); - case 148 /* TypeLiteral */: - return emitTypeLiteral(type); - case 65 /* Identifier */: - return emitEntityName(type); - case 128 /* QualifiedName */: - return emitEntityName(type); - } - function emitEntityName(entityName) { - var visibilityResult = resolver.isEntityNameVisible(entityName, - // Aliases can be written asynchronously so use correct enclosing declaration - entityName.parent.kind === 211 /* ImportEqualsDeclaration */ ? entityName.parent : enclosingDeclaration); - handleSymbolAccessibilityError(visibilityResult); - writeEntityName(entityName); - function writeEntityName(entityName) { - if (entityName.kind === 65 /* Identifier */) { - writeTextOfNode(currentSourceFile, entityName); - } - else { - var left = entityName.kind === 128 /* QualifiedName */ ? entityName.left : entityName.expression; - var right = entityName.kind === 128 /* QualifiedName */ ? entityName.right : entityName.name; - writeEntityName(left); - write("."); - writeTextOfNode(currentSourceFile, right); - } - } - } - function emitExpressionWithTypeArguments(node) { - if (ts.isSupportedExpressionWithTypeArguments(node)) { - ts.Debug.assert(node.expression.kind === 65 /* Identifier */ || node.expression.kind === 158 /* PropertyAccessExpression */); - emitEntityName(node.expression); - if (node.typeArguments) { - write("<"); - emitCommaList(node.typeArguments, emitType); - write(">"); - } - } - } - function emitTypeReference(type) { - emitEntityName(type.typeName); - if (type.typeArguments) { - write("<"); - emitCommaList(type.typeArguments, emitType); - write(">"); - } - } - function emitTypeQuery(type) { - write("typeof "); - emitEntityName(type.exprName); - } - function emitArrayType(type) { - emitType(type.elementType); - write("[]"); - } - function emitTupleType(type) { - write("["); - emitCommaList(type.elementTypes, emitType); - write("]"); - } - function emitUnionType(type) { - emitSeparatedList(type.types, " | ", emitType); - } - function emitParenType(type) { - write("("); - emitType(type.type); - write(")"); - } - function emitTypeLiteral(type) { - write("{"); - if (type.members.length) { - writeLine(); - increaseIndent(); - // write members - emitLines(type.members); - decreaseIndent(); - } - write("}"); - } - } - function emitSourceFile(node) { - currentSourceFile = node; - enclosingDeclaration = node; - emitLines(node.statements); - } - // Return a temp variable name to be used in `export default` statements. - // The temp name will be of the form _default_counter. - // Note that export default is only allowed at most once in a module, so we - // do not need to keep track of created temp names. - function getExportDefaultTempVariableName() { - var baseName = "_default"; - if (!ts.hasProperty(currentSourceFile.identifiers, baseName)) { - return baseName; - } - var count = 0; - while (true) { - var name_18 = baseName + "_" + (++count); - if (!ts.hasProperty(currentSourceFile.identifiers, name_18)) { - return name_18; - } - } - } - function emitExportAssignment(node) { - if (node.expression.kind === 65 /* Identifier */) { - write(node.isExportEquals ? "export = " : "export default "); - writeTextOfNode(currentSourceFile, node.expression); - } - else { - // Expression - var tempVarName = getExportDefaultTempVariableName(); - write("declare var "); - write(tempVarName); - write(": "); - writer.getSymbolAccessibilityDiagnostic = getDefaultExportAccessibilityDiagnostic; - resolver.writeTypeOfExpression(node.expression, enclosingDeclaration, 2 /* UseTypeOfFunction */, writer); - write(";"); - writeLine(); - write(node.isExportEquals ? "export = " : "export default "); - write(tempVarName); - } - write(";"); - writeLine(); - // Make all the declarations visible for the export name - if (node.expression.kind === 65 /* Identifier */) { - var nodes = resolver.collectLinkedAliases(node.expression); - // write each of these declarations asynchronously - writeAsynchronousModuleElements(nodes); - } - function getDefaultExportAccessibilityDiagnostic(diagnostic) { - return { - diagnosticMessage: ts.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0, - errorNode: node - }; - } - } - function isModuleElementVisible(node) { - return resolver.isDeclarationVisible(node); - } - function emitModuleElement(node, isModuleElementVisible) { - if (isModuleElementVisible) { - writeModuleElement(node); - } - else if (node.kind === 211 /* ImportEqualsDeclaration */ || - (node.parent.kind === 230 /* SourceFile */ && ts.isExternalModule(currentSourceFile))) { - var isVisible; - if (asynchronousSubModuleDeclarationEmitInfo && node.parent.kind !== 230 /* SourceFile */) { - // Import declaration of another module that is visited async so lets put it in right spot - asynchronousSubModuleDeclarationEmitInfo.push({ - node: node, - outputPos: writer.getTextPos(), - indent: writer.getIndent(), - isVisible: isVisible - }); - } - else { - if (node.kind === 212 /* ImportDeclaration */) { - var importDeclaration = node; - if (importDeclaration.importClause) { - isVisible = (importDeclaration.importClause.name && resolver.isDeclarationVisible(importDeclaration.importClause)) || - isVisibleNamedBinding(importDeclaration.importClause.namedBindings); - } - } - moduleElementDeclarationEmitInfo.push({ - node: node, - outputPos: writer.getTextPos(), - indent: writer.getIndent(), - isVisible: isVisible - }); - } - } - } - function writeModuleElement(node) { - switch (node.kind) { - case 203 /* FunctionDeclaration */: - return writeFunctionDeclaration(node); - case 183 /* VariableStatement */: - return writeVariableStatement(node); - case 205 /* InterfaceDeclaration */: - return writeInterfaceDeclaration(node); - case 204 /* ClassDeclaration */: - return writeClassDeclaration(node); - case 206 /* TypeAliasDeclaration */: - return writeTypeAliasDeclaration(node); - case 207 /* EnumDeclaration */: - return writeEnumDeclaration(node); - case 208 /* ModuleDeclaration */: - return writeModuleDeclaration(node); - case 211 /* ImportEqualsDeclaration */: - return writeImportEqualsDeclaration(node); - case 212 /* ImportDeclaration */: - return writeImportDeclaration(node); - default: - ts.Debug.fail("Unknown symbol kind"); - } - } - function emitModuleElementDeclarationFlags(node) { - // If the node is parented in the current source file we need to emit export declare or just export - if (node.parent === currentSourceFile) { - // If the node is exported - if (node.flags & 1 /* Export */) { - write("export "); - } - if (node.flags & 256 /* Default */) { - write("default "); - } - else if (node.kind !== 205 /* InterfaceDeclaration */) { - write("declare "); - } - } - } - function emitClassMemberDeclarationFlags(node) { - if (node.flags & 32 /* Private */) { - write("private "); - } - else if (node.flags & 64 /* Protected */) { - write("protected "); - } - if (node.flags & 128 /* Static */) { - write("static "); - } - } - function writeImportEqualsDeclaration(node) { - // note usage of writer. methods instead of aliases created, just to make sure we are using - // correct writer especially to handle asynchronous alias writing - emitJsDocComments(node); - if (node.flags & 1 /* Export */) { - write("export "); - } - write("import "); - writeTextOfNode(currentSourceFile, node.name); - write(" = "); - if (ts.isInternalModuleImportEqualsDeclaration(node)) { - emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.moduleReference, getImportEntityNameVisibilityError); - write(";"); - } - else { - write("require("); - writeTextOfNode(currentSourceFile, ts.getExternalModuleImportEqualsDeclarationExpression(node)); - write(");"); - } - writer.writeLine(); - function getImportEntityNameVisibilityError(symbolAccesibilityResult) { - return { - diagnosticMessage: ts.Diagnostics.Import_declaration_0_is_using_private_name_1, - errorNode: node, - typeName: node.name - }; - } - } - function isVisibleNamedBinding(namedBindings) { - if (namedBindings) { - if (namedBindings.kind === 214 /* NamespaceImport */) { - return resolver.isDeclarationVisible(namedBindings); - } - else { - return ts.forEach(namedBindings.elements, function (namedImport) { return resolver.isDeclarationVisible(namedImport); }); - } - } - } - function writeImportDeclaration(node) { - if (!node.importClause && !(node.flags & 1 /* Export */)) { - // do not write non-exported import declarations that don't have import clauses - return; - } - emitJsDocComments(node); - if (node.flags & 1 /* Export */) { - write("export "); - } - write("import "); - if (node.importClause) { - var currentWriterPos = writer.getTextPos(); - if (node.importClause.name && resolver.isDeclarationVisible(node.importClause)) { - writeTextOfNode(currentSourceFile, node.importClause.name); - } - if (node.importClause.namedBindings && isVisibleNamedBinding(node.importClause.namedBindings)) { - if (currentWriterPos !== writer.getTextPos()) { - // If the default binding was emitted, write the separated - write(", "); - } - if (node.importClause.namedBindings.kind === 214 /* NamespaceImport */) { - write("* as "); - writeTextOfNode(currentSourceFile, node.importClause.namedBindings.name); - } - else { - write("{ "); - emitCommaList(node.importClause.namedBindings.elements, emitImportOrExportSpecifier, resolver.isDeclarationVisible); - write(" }"); - } - } - write(" from "); - } - writeTextOfNode(currentSourceFile, node.moduleSpecifier); - write(";"); - writer.writeLine(); - } - function emitImportOrExportSpecifier(node) { - if (node.propertyName) { - writeTextOfNode(currentSourceFile, node.propertyName); - write(" as "); - } - writeTextOfNode(currentSourceFile, node.name); - } - function emitExportSpecifier(node) { - emitImportOrExportSpecifier(node); - // Make all the declarations visible for the export name - var nodes = resolver.collectLinkedAliases(node.propertyName || node.name); - // write each of these declarations asynchronously - writeAsynchronousModuleElements(nodes); - } - function emitExportDeclaration(node) { - emitJsDocComments(node); - write("export "); - if (node.exportClause) { - write("{ "); - emitCommaList(node.exportClause.elements, emitExportSpecifier); - write(" }"); - } - else { - write("*"); - } - if (node.moduleSpecifier) { - write(" from "); - writeTextOfNode(currentSourceFile, node.moduleSpecifier); - } - write(";"); - writer.writeLine(); - } - function writeModuleDeclaration(node) { - emitJsDocComments(node); - emitModuleElementDeclarationFlags(node); - write("module "); - writeTextOfNode(currentSourceFile, node.name); - while (node.body.kind !== 209 /* ModuleBlock */) { - node = node.body; - write("."); - writeTextOfNode(currentSourceFile, node.name); - } - var prevEnclosingDeclaration = enclosingDeclaration; - enclosingDeclaration = node; - write(" {"); - writeLine(); - increaseIndent(); - emitLines(node.body.statements); - decreaseIndent(); - write("}"); - writeLine(); - enclosingDeclaration = prevEnclosingDeclaration; - } - function writeTypeAliasDeclaration(node) { - emitJsDocComments(node); - emitModuleElementDeclarationFlags(node); - write("type "); - writeTextOfNode(currentSourceFile, node.name); - write(" = "); - emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.type, getTypeAliasDeclarationVisibilityError); - write(";"); - writeLine(); - function getTypeAliasDeclarationVisibilityError(symbolAccesibilityResult) { - return { - diagnosticMessage: ts.Diagnostics.Exported_type_alias_0_has_or_is_using_private_name_1, - errorNode: node.type, - typeName: node.name - }; - } - } - function writeEnumDeclaration(node) { - emitJsDocComments(node); - emitModuleElementDeclarationFlags(node); - if (ts.isConst(node)) { - write("const "); - } - write("enum "); - writeTextOfNode(currentSourceFile, node.name); - write(" {"); - writeLine(); - increaseIndent(); - emitLines(node.members); - decreaseIndent(); - write("}"); - writeLine(); - } - function emitEnumMemberDeclaration(node) { - emitJsDocComments(node); - writeTextOfNode(currentSourceFile, node.name); - var enumMemberValue = resolver.getConstantValue(node); - if (enumMemberValue !== undefined) { - write(" = "); - write(enumMemberValue.toString()); - } - write(","); - writeLine(); - } - function isPrivateMethodTypeParameter(node) { - return node.parent.kind === 136 /* MethodDeclaration */ && (node.parent.flags & 32 /* Private */); - } - function emitTypeParameters(typeParameters) { - function emitTypeParameter(node) { - increaseIndent(); - emitJsDocComments(node); - decreaseIndent(); - writeTextOfNode(currentSourceFile, node.name); - // If there is constraint present and this is not a type parameter of the private method emit the constraint - if (node.constraint && !isPrivateMethodTypeParameter(node)) { - write(" extends "); - if (node.parent.kind === 145 /* FunctionType */ || - node.parent.kind === 146 /* ConstructorType */ || - (node.parent.parent && node.parent.parent.kind === 148 /* TypeLiteral */)) { - ts.Debug.assert(node.parent.kind === 136 /* MethodDeclaration */ || - node.parent.kind === 135 /* MethodSignature */ || - node.parent.kind === 145 /* FunctionType */ || - node.parent.kind === 146 /* ConstructorType */ || - node.parent.kind === 140 /* CallSignature */ || - node.parent.kind === 141 /* ConstructSignature */); - emitType(node.constraint); - } - else { - emitTypeWithNewGetSymbolAccessibilityDiagnostic(node.constraint, getTypeParameterConstraintVisibilityError); - } - } - function getTypeParameterConstraintVisibilityError(symbolAccesibilityResult) { - // Type parameter constraints are named by user so we should always be able to name it - var diagnosticMessage; - switch (node.parent.kind) { - case 204 /* ClassDeclaration */: - diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1; - break; - case 205 /* InterfaceDeclaration */: - diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1; - break; - case 141 /* ConstructSignature */: - diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - break; - case 140 /* CallSignature */: - diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - break; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - if (node.parent.flags & 128 /* Static */) { - diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } - else if (node.parent.parent.kind === 204 /* ClassDeclaration */) { - diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; - } - else { - diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; - } - break; - case 203 /* FunctionDeclaration */: - diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1; - break; - default: - ts.Debug.fail("This is unknown parent for type parameter: " + node.parent.kind); - } - return { - diagnosticMessage: diagnosticMessage, - errorNode: node, - typeName: node.name - }; - } - } - if (typeParameters) { - write("<"); - emitCommaList(typeParameters, emitTypeParameter); - write(">"); - } - } - function emitHeritageClause(typeReferences, isImplementsList) { - if (typeReferences) { - write(isImplementsList ? " implements " : " extends "); - emitCommaList(typeReferences, emitTypeOfTypeReference); - } - function emitTypeOfTypeReference(node) { - if (ts.isSupportedExpressionWithTypeArguments(node)) { - emitTypeWithNewGetSymbolAccessibilityDiagnostic(node, getHeritageClauseVisibilityError); - } - function getHeritageClauseVisibilityError(symbolAccesibilityResult) { - var diagnosticMessage; - // Heritage clause is written by user so it can always be named - if (node.parent.parent.kind === 204 /* ClassDeclaration */) { - // Class or Interface implemented/extended is inaccessible - diagnosticMessage = isImplementsList ? - ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : - ts.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1; - } - else { - // interface is inaccessible - diagnosticMessage = ts.Diagnostics.Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1; - } - return { - diagnosticMessage: diagnosticMessage, - errorNode: node, - typeName: node.parent.parent.name - }; - } - } - } - function writeClassDeclaration(node) { - function emitParameterProperties(constructorDeclaration) { - if (constructorDeclaration) { - ts.forEach(constructorDeclaration.parameters, function (param) { - if (param.flags & 112 /* AccessibilityModifier */) { - emitPropertyDeclaration(param); - } - }); - } - } - emitJsDocComments(node); - emitModuleElementDeclarationFlags(node); - write("class "); - writeTextOfNode(currentSourceFile, node.name); - var prevEnclosingDeclaration = enclosingDeclaration; - enclosingDeclaration = node; - emitTypeParameters(node.typeParameters); - var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node); - if (baseTypeNode) { - emitHeritageClause([baseTypeNode], false); - } - emitHeritageClause(ts.getClassImplementsHeritageClauseElements(node), true); - write(" {"); - writeLine(); - increaseIndent(); - emitParameterProperties(ts.getFirstConstructorWithBody(node)); - emitLines(node.members); - decreaseIndent(); - write("}"); - writeLine(); - enclosingDeclaration = prevEnclosingDeclaration; - } - function writeInterfaceDeclaration(node) { - emitJsDocComments(node); - emitModuleElementDeclarationFlags(node); - write("interface "); - writeTextOfNode(currentSourceFile, node.name); - var prevEnclosingDeclaration = enclosingDeclaration; - enclosingDeclaration = node; - emitTypeParameters(node.typeParameters); - emitHeritageClause(ts.getInterfaceBaseTypeNodes(node), false); - write(" {"); - writeLine(); - increaseIndent(); - emitLines(node.members); - decreaseIndent(); - write("}"); - writeLine(); - enclosingDeclaration = prevEnclosingDeclaration; - } - function emitPropertyDeclaration(node) { - if (ts.hasDynamicName(node)) { - return; - } - emitJsDocComments(node); - emitClassMemberDeclarationFlags(node); - emitVariableDeclaration(node); - write(";"); - writeLine(); - } - function emitVariableDeclaration(node) { - // If we are emitting property it isn't moduleElement and hence we already know it needs to be emitted - // so there is no check needed to see if declaration is visible - if (node.kind !== 201 /* VariableDeclaration */ || resolver.isDeclarationVisible(node)) { - if (ts.isBindingPattern(node.name)) { - emitBindingPattern(node.name); - } - else { - // If this node is a computed name, it can only be a symbol, because we've already skipped - // it if it's not a well known symbol. In that case, the text of the name will be exactly - // what we want, namely the name expression enclosed in brackets. - writeTextOfNode(currentSourceFile, node.name); - // If optional property emit ? - if ((node.kind === 134 /* PropertyDeclaration */ || node.kind === 133 /* PropertySignature */) && ts.hasQuestionToken(node)) { - write("?"); - } - if ((node.kind === 134 /* PropertyDeclaration */ || node.kind === 133 /* PropertySignature */) && node.parent.kind === 148 /* TypeLiteral */) { - emitTypeOfVariableDeclarationFromTypeLiteral(node); - } - else if (!(node.flags & 32 /* Private */)) { - writeTypeOfDeclaration(node, node.type, getVariableDeclarationTypeVisibilityError); - } - } - } - function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult) { - if (node.kind === 201 /* VariableDeclaration */) { - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1; - } - else if (node.kind === 134 /* PropertyDeclaration */ || node.kind === 133 /* PropertySignature */) { - // TODO(jfreeman): Deal with computed properties in error reporting. - if (node.flags & 128 /* Static */) { - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1; - } - else if (node.parent.kind === 204 /* ClassDeclaration */) { - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1; - } - else { - // Interfaces cannot have types that cannot be named - return symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1; - } - } - } - function getVariableDeclarationTypeVisibilityError(symbolAccesibilityResult) { - var diagnosticMessage = getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult); - return diagnosticMessage !== undefined ? { - diagnosticMessage: diagnosticMessage, - errorNode: node, - typeName: node.name - } : undefined; - } - function emitBindingPattern(bindingPattern) { - // Only select non-omitted expression from the bindingPattern's elements. - // We have to do this to avoid emitting trailing commas. - // For example: - // original: var [, c,,] = [ 2,3,4] - // emitted: declare var c: number; // instead of declare var c:number, ; - var elements = []; - for (var _i = 0, _a = bindingPattern.elements; _i < _a.length; _i++) { - var element = _a[_i]; - if (element.kind !== 178 /* OmittedExpression */) { - elements.push(element); - } - } - emitCommaList(elements, emitBindingElement); - } - function emitBindingElement(bindingElement) { - function getBindingElementTypeVisibilityError(symbolAccesibilityResult) { - var diagnosticMessage = getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult); - return diagnosticMessage !== undefined ? { - diagnosticMessage: diagnosticMessage, - errorNode: bindingElement, - typeName: bindingElement.name - } : undefined; - } - if (bindingElement.name) { - if (ts.isBindingPattern(bindingElement.name)) { - emitBindingPattern(bindingElement.name); - } - else { - writeTextOfNode(currentSourceFile, bindingElement.name); - writeTypeOfDeclaration(bindingElement, undefined, getBindingElementTypeVisibilityError); - } - } - } - } - function emitTypeOfVariableDeclarationFromTypeLiteral(node) { - // if this is property of type literal, - // or is parameter of method/call/construct/index signature of type literal - // emit only if type is specified - if (node.type) { - write(": "); - emitType(node.type); - } - } - function isVariableStatementVisible(node) { - return ts.forEach(node.declarationList.declarations, function (varDeclaration) { return resolver.isDeclarationVisible(varDeclaration); }); - } - function writeVariableStatement(node) { - emitJsDocComments(node); - emitModuleElementDeclarationFlags(node); - if (ts.isLet(node.declarationList)) { - write("let "); - } - else if (ts.isConst(node.declarationList)) { - write("const "); - } - else { - write("var "); - } - emitCommaList(node.declarationList.declarations, emitVariableDeclaration, resolver.isDeclarationVisible); - write(";"); - writeLine(); - } - function emitAccessorDeclaration(node) { - if (ts.hasDynamicName(node)) { - return; - } - var accessors = ts.getAllAccessorDeclarations(node.parent.members, node); - var accessorWithTypeAnnotation; - if (node === accessors.firstAccessor) { - emitJsDocComments(accessors.getAccessor); - emitJsDocComments(accessors.setAccessor); - emitClassMemberDeclarationFlags(node); - writeTextOfNode(currentSourceFile, node.name); - if (!(node.flags & 32 /* Private */)) { - accessorWithTypeAnnotation = node; - var type = getTypeAnnotationFromAccessor(node); - if (!type) { - // couldn't get type for the first accessor, try the another one - var anotherAccessor = node.kind === 138 /* GetAccessor */ ? accessors.setAccessor : accessors.getAccessor; - type = getTypeAnnotationFromAccessor(anotherAccessor); - if (type) { - accessorWithTypeAnnotation = anotherAccessor; - } - } - writeTypeOfDeclaration(node, type, getAccessorDeclarationTypeVisibilityError); - } - write(";"); - writeLine(); - } - function getTypeAnnotationFromAccessor(accessor) { - if (accessor) { - return accessor.kind === 138 /* GetAccessor */ - ? accessor.type // Getter - return type - : accessor.parameters.length > 0 - ? accessor.parameters[0].type // Setter parameter type - : undefined; - } - } - function getAccessorDeclarationTypeVisibilityError(symbolAccesibilityResult) { - var diagnosticMessage; - if (accessorWithTypeAnnotation.kind === 139 /* SetAccessor */) { - // Setters have to have type named and cannot infer it so, the type should always be named - if (accessorWithTypeAnnotation.parent.flags & 128 /* Static */) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1; - } - else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1; - } - return { - diagnosticMessage: diagnosticMessage, - errorNode: accessorWithTypeAnnotation.parameters[0], - // TODO(jfreeman): Investigate why we are passing node.name instead of node.parameters[0].name - typeName: accessorWithTypeAnnotation.name - }; - } - else { - if (accessorWithTypeAnnotation.flags & 128 /* Static */) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : - ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0; - } - else { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : - ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0; - } - return { - diagnosticMessage: diagnosticMessage, - errorNode: accessorWithTypeAnnotation.name, - typeName: undefined - }; - } - } - } - function writeFunctionDeclaration(node) { - if (ts.hasDynamicName(node)) { - return; - } - // If we are emitting Method/Constructor it isn't moduleElement and hence already determined to be emitting - // so no need to verify if the declaration is visible - if (!resolver.isImplementationOfOverload(node)) { - emitJsDocComments(node); - if (node.kind === 203 /* FunctionDeclaration */) { - emitModuleElementDeclarationFlags(node); - } - else if (node.kind === 136 /* MethodDeclaration */) { - emitClassMemberDeclarationFlags(node); - } - if (node.kind === 203 /* FunctionDeclaration */) { - write("function "); - writeTextOfNode(currentSourceFile, node.name); - } - else if (node.kind === 137 /* Constructor */) { - write("constructor"); - } - else { - writeTextOfNode(currentSourceFile, node.name); - if (ts.hasQuestionToken(node)) { - write("?"); - } - } - emitSignatureDeclaration(node); - } - } - function emitSignatureDeclarationWithJsDocComments(node) { - emitJsDocComments(node); - emitSignatureDeclaration(node); - } - function emitSignatureDeclaration(node) { - // Construct signature or constructor type write new Signature - if (node.kind === 141 /* ConstructSignature */ || node.kind === 146 /* ConstructorType */) { - write("new "); - } - emitTypeParameters(node.typeParameters); - if (node.kind === 142 /* IndexSignature */) { - write("["); - } - else { - write("("); - } - var prevEnclosingDeclaration = enclosingDeclaration; - enclosingDeclaration = node; - // Parameters - emitCommaList(node.parameters, emitParameterDeclaration); - if (node.kind === 142 /* IndexSignature */) { - write("]"); - } - else { - write(")"); - } - // If this is not a constructor and is not private, emit the return type - var isFunctionTypeOrConstructorType = node.kind === 145 /* FunctionType */ || node.kind === 146 /* ConstructorType */; - if (isFunctionTypeOrConstructorType || node.parent.kind === 148 /* TypeLiteral */) { - // Emit type literal signature return type only if specified - if (node.type) { - write(isFunctionTypeOrConstructorType ? " => " : ": "); - emitType(node.type); - } - } - else if (node.kind !== 137 /* Constructor */ && !(node.flags & 32 /* Private */)) { - writeReturnTypeAtSignature(node, getReturnTypeVisibilityError); - } - enclosingDeclaration = prevEnclosingDeclaration; - if (!isFunctionTypeOrConstructorType) { - write(";"); - writeLine(); - } - function getReturnTypeVisibilityError(symbolAccesibilityResult) { - var diagnosticMessage; - switch (node.kind) { - case 141 /* ConstructSignature */: - // Interfaces cannot have return types that cannot be named - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0; - break; - case 140 /* CallSignature */: - // Interfaces cannot have return types that cannot be named - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0; - break; - case 142 /* IndexSignature */: - // Interfaces cannot have return types that cannot be named - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0; - break; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - if (node.flags & 128 /* Static */) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : - ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0; - } - else if (node.parent.kind === 204 /* ClassDeclaration */) { - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : - ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0; - } - else { - // Interfaces cannot have return types that cannot be named - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0; - } - break; - case 203 /* FunctionDeclaration */: - diagnosticMessage = symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named : - ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1 : - ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0; - break; - default: - ts.Debug.fail("This is unknown kind for signature: " + node.kind); - } - return { - diagnosticMessage: diagnosticMessage, - errorNode: node.name || node - }; - } - } - function emitParameterDeclaration(node) { - increaseIndent(); - emitJsDocComments(node); - if (node.dotDotDotToken) { - write("..."); - } - if (ts.isBindingPattern(node.name)) { - // For bindingPattern, we can't simply writeTextOfNode from the source file - // because we want to omit the initializer and using writeTextOfNode will result in initializer get emitted. - // Therefore, we will have to recursively emit each element in the bindingPattern. - emitBindingPattern(node.name); - } - else { - writeTextOfNode(currentSourceFile, node.name); - } - if (node.initializer || ts.hasQuestionToken(node)) { - write("?"); - } - decreaseIndent(); - if (node.parent.kind === 145 /* FunctionType */ || - node.parent.kind === 146 /* ConstructorType */ || - node.parent.parent.kind === 148 /* TypeLiteral */) { - emitTypeOfVariableDeclarationFromTypeLiteral(node); - } - else if (!(node.parent.flags & 32 /* Private */)) { - writeTypeOfDeclaration(node, node.type, getParameterDeclarationTypeVisibilityError); - } - function getParameterDeclarationTypeVisibilityError(symbolAccesibilityResult) { - var diagnosticMessage = getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult); - return diagnosticMessage !== undefined ? { - diagnosticMessage: diagnosticMessage, - errorNode: node, - typeName: node.name - } : undefined; - } - function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult) { - switch (node.parent.kind) { - case 137 /* Constructor */: - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1; - case 141 /* ConstructSignature */: - // Interfaces cannot have parameter types that cannot be named - return symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1; - case 140 /* CallSignature */: - // Interfaces cannot have parameter types that cannot be named - return symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - if (node.parent.flags & 128 /* Static */) { - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1; - } - else if (node.parent.parent.kind === 204 /* ClassDeclaration */) { - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1; - } - else { - // Interfaces cannot have parameter types that cannot be named - return symbolAccesibilityResult.errorModuleName ? - ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1; - } - case 203 /* FunctionDeclaration */: - return symbolAccesibilityResult.errorModuleName ? - symbolAccesibilityResult.accessibility === 2 /* CannotBeNamed */ ? - ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named : - ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 : - ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1; - default: - ts.Debug.fail("This is unknown parent for parameter: " + node.parent.kind); - } - } - function emitBindingPattern(bindingPattern) { - // We have to explicitly emit square bracket and bracket because these tokens are not store inside the node. - if (bindingPattern.kind === 153 /* ObjectBindingPattern */) { - write("{"); - emitCommaList(bindingPattern.elements, emitBindingElement); - write("}"); - } - else if (bindingPattern.kind === 154 /* ArrayBindingPattern */) { - write("["); - var elements = bindingPattern.elements; - emitCommaList(elements, emitBindingElement); - if (elements && elements.hasTrailingComma) { - write(", "); - } - write("]"); - } - } - function emitBindingElement(bindingElement) { - function getBindingElementTypeVisibilityError(symbolAccesibilityResult) { - var diagnosticMessage = getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccesibilityResult); - return diagnosticMessage !== undefined ? { - diagnosticMessage: diagnosticMessage, - errorNode: bindingElement, - typeName: bindingElement.name - } : undefined; - } - if (bindingElement.kind === 178 /* OmittedExpression */) { - // If bindingElement is an omittedExpression (i.e. containing elision), - // we will emit blank space (although this may differ from users' original code, - // it allows emitSeparatedList to write separator appropriately) - // Example: - // original: function foo([, x, ,]) {} - // emit : function foo([ , x, , ]) {} - write(" "); - } - else if (bindingElement.kind === 155 /* BindingElement */) { - if (bindingElement.propertyName) { - // bindingElement has propertyName property in the following case: - // { y: [a,b,c] ...} -> bindingPattern will have a property called propertyName for "y" - // We have to explicitly emit the propertyName before descending into its binding elements. - // Example: - // original: function foo({y: [a,b,c]}) {} - // emit : declare function foo({y: [a, b, c]}: { y: [any, any, any] }) void; - writeTextOfNode(currentSourceFile, bindingElement.propertyName); - write(": "); - // If bindingElement has propertyName property, then its name must be another bindingPattern of SyntaxKind.ObjectBindingPattern - emitBindingPattern(bindingElement.name); - } - else if (bindingElement.name) { - if (ts.isBindingPattern(bindingElement.name)) { - // If it is a nested binding pattern, we will recursively descend into each element and emit each one separately. - // In the case of rest element, we will omit rest element. - // Example: - // original: function foo([a, [[b]], c] = [1,[["string"]], 3]) {} - // emit : declare function foo([a, [[b]], c]: [number, [[string]], number]): void; - // original with rest: function foo([a, ...c]) {} - // emit : declare function foo([a, ...c]): void; - emitBindingPattern(bindingElement.name); - } - else { - ts.Debug.assert(bindingElement.name.kind === 65 /* Identifier */); - // If the node is just an identifier, we will simply emit the text associated with the node's name - // Example: - // original: function foo({y = 10, x}) {} - // emit : declare function foo({y, x}: {number, any}): void; - if (bindingElement.dotDotDotToken) { - write("..."); - } - writeTextOfNode(currentSourceFile, bindingElement.name); - } - } - } - } - } - function emitNode(node) { - switch (node.kind) { - case 203 /* FunctionDeclaration */: - case 208 /* ModuleDeclaration */: - case 211 /* ImportEqualsDeclaration */: - case 205 /* InterfaceDeclaration */: - case 204 /* ClassDeclaration */: - case 206 /* TypeAliasDeclaration */: - case 207 /* EnumDeclaration */: - return emitModuleElement(node, isModuleElementVisible(node)); - case 183 /* VariableStatement */: - return emitModuleElement(node, isVariableStatementVisible(node)); - case 212 /* ImportDeclaration */: - // Import declaration without import clause is visible, otherwise it is not visible - return emitModuleElement(node, !node.importClause); - case 218 /* ExportDeclaration */: - return emitExportDeclaration(node); - case 137 /* Constructor */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - return writeFunctionDeclaration(node); - case 141 /* ConstructSignature */: - case 140 /* CallSignature */: - case 142 /* IndexSignature */: - return emitSignatureDeclarationWithJsDocComments(node); - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - return emitAccessorDeclaration(node); - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - return emitPropertyDeclaration(node); - case 229 /* EnumMember */: - return emitEnumMemberDeclaration(node); - case 217 /* ExportAssignment */: - return emitExportAssignment(node); - case 230 /* SourceFile */: - return emitSourceFile(node); - } - } - function writeReferencePath(referencedFile) { - var declFileName = referencedFile.flags & 2048 /* DeclarationFile */ - ? referencedFile.fileName // Declaration file, use declaration file name - : ts.shouldEmitToOwnFile(referencedFile, compilerOptions) - ? ts.getOwnEmitOutputFilePath(referencedFile, host, ".d.ts") // Own output file so get the .d.ts file - : ts.removeFileExtension(compilerOptions.out) + ".d.ts"; // Global out file - declFileName = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizeSlashes(jsFilePath)), declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, - /*isAbsolutePathAnUrl*/ false); - referencePathsOutput += "/// " + newLine; - } - } - /* @internal */ - function writeDeclarationFile(jsFilePath, sourceFile, host, resolver, diagnostics) { - var emitDeclarationResult = emitDeclarations(host, resolver, diagnostics, jsFilePath, sourceFile); - // TODO(shkamat): Should we not write any declaration file if any of them can produce error, - // or should we just not write this file like we are doing now - if (!emitDeclarationResult.reportedDeclarationError) { - var declarationOutput = emitDeclarationResult.referencePathsOutput - + getDeclarationOutput(emitDeclarationResult.synchronousDeclarationOutput, emitDeclarationResult.moduleElementDeclarationEmitInfo); - ts.writeFile(host, diagnostics, ts.removeFileExtension(jsFilePath) + ".d.ts", declarationOutput, host.getCompilerOptions().emitBOM); - } - function getDeclarationOutput(synchronousDeclarationOutput, moduleElementDeclarationEmitInfo) { - var appliedSyncOutputPos = 0; - var declarationOutput = ""; - // apply asynchronous additions to the synchronous output - ts.forEach(moduleElementDeclarationEmitInfo, function (aliasEmitInfo) { - if (aliasEmitInfo.asynchronousOutput) { - declarationOutput += synchronousDeclarationOutput.substring(appliedSyncOutputPos, aliasEmitInfo.outputPos); - declarationOutput += getDeclarationOutput(aliasEmitInfo.asynchronousOutput, aliasEmitInfo.subModuleElementDeclarationEmitInfo); - appliedSyncOutputPos = aliasEmitInfo.outputPos; - } - }); - declarationOutput += synchronousDeclarationOutput.substring(appliedSyncOutputPos); - return declarationOutput; - } - } - ts.writeDeclarationFile = writeDeclarationFile; -})(ts || (ts = {})); -/// -/// -/* @internal */ -var ts; -(function (ts) { - function isExternalModuleOrDeclarationFile(sourceFile) { - return ts.isExternalModule(sourceFile) || ts.isDeclarationFile(sourceFile); - } - ts.isExternalModuleOrDeclarationFile = isExternalModuleOrDeclarationFile; - // Flags enum to track count of temp variables and a few dedicated names - var TempFlags; - (function (TempFlags) { - TempFlags[TempFlags["Auto"] = 0] = "Auto"; - TempFlags[TempFlags["CountMask"] = 268435455] = "CountMask"; - TempFlags[TempFlags["_i"] = 268435456] = "_i"; - })(TempFlags || (TempFlags = {})); - // targetSourceFile is when users only want one file in entire project to be emitted. This is used in compileOnSave feature - function emitFiles(resolver, host, targetSourceFile) { - // emit output for the __extends helper function - var extendsHelper = "\nvar __extends = (this && this.__extends) || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n function __() { this.constructor = d; }\n __.prototype = b.prototype;\n d.prototype = new __();\n};"; - // emit output for the __decorate helper function - var decorateHelper = "\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") return Reflect.decorate(decorators, target, key, desc);\n switch (arguments.length) {\n case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target);\n case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0);\n case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc);\n }\n};"; - // emit output for the __metadata helper function - var metadataHelper = "\nvar __metadata = (this && this.__metadata) || function (k, v) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\n};"; - // emit output for the __param helper function - var paramHelper = "\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};"; - var compilerOptions = host.getCompilerOptions(); - var languageVersion = compilerOptions.target || 0 /* ES3 */; - var sourceMapDataList = compilerOptions.sourceMap || compilerOptions.inlineSourceMap ? [] : undefined; - var diagnostics = []; - var newLine = host.getNewLine(); - if (targetSourceFile === undefined) { - ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (ts.shouldEmitToOwnFile(sourceFile, compilerOptions)) { - var jsFilePath = ts.getOwnEmitOutputFilePath(sourceFile, host, ".js"); - emitFile(jsFilePath, sourceFile); - } - }); - if (compilerOptions.out) { - emitFile(compilerOptions.out); - } - } - else { - // targetSourceFile is specified (e.g calling emitter from language service or calling getSemanticDiagnostic from language service) - if (ts.shouldEmitToOwnFile(targetSourceFile, compilerOptions)) { - var jsFilePath = ts.getOwnEmitOutputFilePath(targetSourceFile, host, ".js"); - emitFile(jsFilePath, targetSourceFile); - } - else if (!ts.isDeclarationFile(targetSourceFile) && compilerOptions.out) { - emitFile(compilerOptions.out); - } - } - // Sort and make the unique list of diagnostics - diagnostics = ts.sortAndDeduplicateDiagnostics(diagnostics); - return { - emitSkipped: false, - diagnostics: diagnostics, - sourceMaps: sourceMapDataList - }; - function isNodeDescendentOf(node, ancestor) { - while (node) { - if (node === ancestor) - return true; - node = node.parent; - } - return false; - } - function isUniqueLocalName(name, container) { - for (var node = container; isNodeDescendentOf(node, container); node = node.nextContainer) { - if (node.locals && ts.hasProperty(node.locals, name)) { - // We conservatively include alias symbols to cover cases where they're emitted as locals - if (node.locals[name].flags & (107455 /* Value */ | 1048576 /* ExportValue */ | 8388608 /* Alias */)) { - return false; - } - } - } - return true; - } - function emitJavaScript(jsFilePath, root) { - var writer = ts.createTextWriter(newLine); - var write = writer.write; - var writeTextOfNode = writer.writeTextOfNode; - var writeLine = writer.writeLine; - var increaseIndent = writer.increaseIndent; - var decreaseIndent = writer.decreaseIndent; - var currentSourceFile; - // name of an exporter function if file is a System external module - // System.register([...], function () {...}) - // exporting in System modules looks like: - // export var x; ... x = 1 - // => - // var x;... exporter("x", x = 1) - var exportFunctionForFile; - var generatedNameSet = {}; - var nodeToGeneratedName = []; - var computedPropertyNamesToGeneratedNames; - var extendsEmitted = false; - var decorateEmitted = false; - var paramEmitted = false; - var tempFlags = 0; - var tempVariables; - var tempParameters; - var externalImports; - var exportSpecifiers; - var exportEquals; - var hasExportStars; - /** Write emitted output to disk */ - var writeEmittedFiles = writeJavaScriptFile; - var detachedCommentsInfo; - var writeComment = ts.writeCommentRange; - /** Emit a node */ - var emit = emitNodeWithoutSourceMap; - /** Called just before starting emit of a node */ - var emitStart = function (node) { }; - /** Called once the emit of the node is done */ - var emitEnd = function (node) { }; - /** Emit the text for the given token that comes after startPos - * This by default writes the text provided with the given tokenKind - * but if optional emitFn callback is provided the text is emitted using the callback instead of default text - * @param tokenKind the kind of the token to search and emit - * @param startPos the position in the source to start searching for the token - * @param emitFn if given will be invoked to emit the text instead of actual token emit */ - var emitToken = emitTokenText; - /** Called to before starting the lexical scopes as in function/class in the emitted code because of node - * @param scopeDeclaration node that starts the lexical scope - * @param scopeName Optional name of this scope instead of deducing one from the declaration node */ - var scopeEmitStart = function (scopeDeclaration, scopeName) { }; - /** Called after coming out of the scope */ - var scopeEmitEnd = function () { }; - /** Sourcemap data that will get encoded */ - var sourceMapData; - if (compilerOptions.sourceMap || compilerOptions.inlineSourceMap) { - initializeEmitterWithSourceMaps(); - } - if (root) { - // Do not call emit directly. It does not set the currentSourceFile. - emitSourceFile(root); - } - else { - ts.forEach(host.getSourceFiles(), function (sourceFile) { - if (!isExternalModuleOrDeclarationFile(sourceFile)) { - emitSourceFile(sourceFile); - } - }); - } - writeLine(); - writeEmittedFiles(writer.getText(), compilerOptions.emitBOM); - if (compilerOptions.dependency && root && compilerOptions.module) { - emitDependencyFile(root); - } - return; - function emitDependencyFile(sourceFile) { - var depFile = ts.removeFileExtension(jsFilePath) + '.dep.json'; - var runtime = []; - var compileTime = []; - for (var _a = 0, _b = root.amdDependencies; _a < _b.length; _a++) { - var node = _b[_a]; - runtime.push(node.path); - } - function processExternalDeclaration(node) { - var name = getExternalModuleNameText(node); - if (name) { - if (name.length >= 2) { - var first = name[0]; - var last = name[name.length - 1]; - if ((first == '"' || first == "'") && (last == '"' || last == "'")) { - name = name.substring(1, name.length - 1); - } - } - if (isExternalDepedency(node)) { - runtime.push(name); - } - else { - compileTime.push(name); - } - } - } - function isExternalDepedency(node) { - for (var _a = 0; _a < externalImports.length; _a++) { - var external_1 = externalImports[_a]; - if (node === external_1) { - return true; - } - } - return false; - } - for (var _c = 0, _d = root.statements; _c < _d.length; _c++) { - var node = _d[_c]; - var name_19; - switch (node.kind) { - case 212 /* ImportDeclaration */: - processExternalDeclaration(node); - break; - case 211 /* ImportEqualsDeclaration */: - processExternalDeclaration(node); - break; - case 218 /* ExportDeclaration */: - var exportDeclaration = node; - if (exportDeclaration.moduleSpecifier) { - processExternalDeclaration(node); - } - break; - } - } - var dep = { - filePath: root.fileName, - compileTime: compileTime, - runtime: runtime - }; - ts.writeFile(host, [], depFile, JSON.stringify(dep, null, 4), compilerOptions.emitBOM); - } - function emitSourceFile(sourceFile) { - currentSourceFile = sourceFile; - exportFunctionForFile = undefined; - emit(sourceFile); - } - function isUniqueName(name) { - return !resolver.hasGlobalName(name) && - !ts.hasProperty(currentSourceFile.identifiers, name) && - !ts.hasProperty(generatedNameSet, name); - } - // Return the next available name in the pattern _a ... _z, _0, _1, ... - // TempFlags._i or TempFlags._n may be used to express a preference for that dedicated name. - // Note that names generated by makeTempVariableName and makeUniqueName will never conflict. - function makeTempVariableName(flags) { - if (flags && !(tempFlags & flags)) { - var name = flags === 268435456 /* _i */ ? "_i" : "_n"; - if (isUniqueName(name)) { - tempFlags |= flags; - return name; - } - } - while (true) { - var count = tempFlags & 268435455 /* CountMask */; - tempFlags++; - // Skip over 'i' and 'n' - if (count !== 8 && count !== 13) { - var name_20 = count < 26 ? "_" + String.fromCharCode(97 /* a */ + count) : "_" + (count - 26); - if (isUniqueName(name_20)) { - return name_20; - } - } - } - } - // Generate a name that is unique within the current file and doesn't conflict with any names - // in global scope. The name is formed by adding an '_n' suffix to the specified base name, - // where n is a positive integer. Note that names generated by makeTempVariableName and - // makeUniqueName are guaranteed to never conflict. - function makeUniqueName(baseName) { - // Find the first unique 'name_n', where n is a positive number - if (baseName.charCodeAt(baseName.length - 1) !== 95 /* _ */) { - baseName += "_"; - } - var i = 1; - while (true) { - var generatedName = baseName + i; - if (isUniqueName(generatedName)) { - return generatedNameSet[generatedName] = generatedName; - } - i++; - } - } - function generateNameForModuleOrEnum(node) { - var name = node.name.text; - // Use module/enum name itself if it is unique, otherwise make a unique variation - return isUniqueLocalName(name, node) ? name : makeUniqueName(name); - } - function generateNameForImportOrExportDeclaration(node) { - var expr = ts.getExternalModuleName(node); - var baseName = expr.kind === 8 /* StringLiteral */ ? - ts.escapeIdentifier(ts.makeIdentifierFromModuleName(expr.text)) : "module"; - return makeUniqueName(baseName); - } - function generateNameForExportDefault() { - return makeUniqueName("default"); - } - function generateNameForNode(node) { - switch (node.kind) { - case 65 /* Identifier */: - return makeUniqueName(node.text); - case 208 /* ModuleDeclaration */: - case 207 /* EnumDeclaration */: - return generateNameForModuleOrEnum(node); - case 212 /* ImportDeclaration */: - case 218 /* ExportDeclaration */: - return generateNameForImportOrExportDeclaration(node); - case 203 /* FunctionDeclaration */: - case 204 /* ClassDeclaration */: - case 177 /* ClassExpression */: - case 217 /* ExportAssignment */: - return generateNameForExportDefault(); - } - } - function getGeneratedNameForNode(node) { - var id = ts.getNodeId(node); - return nodeToGeneratedName[id] || (nodeToGeneratedName[id] = ts.unescapeIdentifier(generateNameForNode(node))); - } - function initializeEmitterWithSourceMaps() { - var sourceMapDir; // The directory in which sourcemap will be - // Current source map file and its index in the sources list - var sourceMapSourceIndex = -1; - // Names and its index map - var sourceMapNameIndexMap = {}; - var sourceMapNameIndices = []; - function getSourceMapNameIndex() { - return sourceMapNameIndices.length ? ts.lastOrUndefined(sourceMapNameIndices) : -1; - } - // Last recorded and encoded spans - var lastRecordedSourceMapSpan; - var lastEncodedSourceMapSpan = { - emittedLine: 1, - emittedColumn: 1, - sourceLine: 1, - sourceColumn: 1, - sourceIndex: 0 - }; - var lastEncodedNameIndex = 0; - // Encoding for sourcemap span - function encodeLastRecordedSourceMapSpan() { - if (!lastRecordedSourceMapSpan || lastRecordedSourceMapSpan === lastEncodedSourceMapSpan) { - return; - } - var prevEncodedEmittedColumn = lastEncodedSourceMapSpan.emittedColumn; - // Line/Comma delimiters - if (lastEncodedSourceMapSpan.emittedLine == lastRecordedSourceMapSpan.emittedLine) { - // Emit comma to separate the entry - if (sourceMapData.sourceMapMappings) { - sourceMapData.sourceMapMappings += ","; - } - } - else { - // Emit line delimiters - for (var encodedLine = lastEncodedSourceMapSpan.emittedLine; encodedLine < lastRecordedSourceMapSpan.emittedLine; encodedLine++) { - sourceMapData.sourceMapMappings += ";"; - } - prevEncodedEmittedColumn = 1; - } - // 1. Relative Column 0 based - sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.emittedColumn - prevEncodedEmittedColumn); - // 2. Relative sourceIndex - sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceIndex - lastEncodedSourceMapSpan.sourceIndex); - // 3. Relative sourceLine 0 based - sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceLine - lastEncodedSourceMapSpan.sourceLine); - // 4. Relative sourceColumn 0 based - sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.sourceColumn - lastEncodedSourceMapSpan.sourceColumn); - // 5. Relative namePosition 0 based - if (lastRecordedSourceMapSpan.nameIndex >= 0) { - sourceMapData.sourceMapMappings += base64VLQFormatEncode(lastRecordedSourceMapSpan.nameIndex - lastEncodedNameIndex); - lastEncodedNameIndex = lastRecordedSourceMapSpan.nameIndex; - } - lastEncodedSourceMapSpan = lastRecordedSourceMapSpan; - sourceMapData.sourceMapDecodedMappings.push(lastEncodedSourceMapSpan); - function base64VLQFormatEncode(inValue) { - function base64FormatEncode(inValue) { - if (inValue < 64) { - return 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.charAt(inValue); - } - throw TypeError(inValue + ": not a 64 based value"); - } - // Add a new least significant bit that has the sign of the value. - // if negative number the least significant bit that gets added to the number has value 1 - // else least significant bit value that gets added is 0 - // eg. -1 changes to binary : 01 [1] => 3 - // +1 changes to binary : 01 [0] => 2 - if (inValue < 0) { - inValue = ((-inValue) << 1) + 1; - } - else { - inValue = inValue << 1; - } - // Encode 5 bits at a time starting from least significant bits - var encodedStr = ""; - do { - var currentDigit = inValue & 31; // 11111 - inValue = inValue >> 5; - if (inValue > 0) { - // There are still more digits to decode, set the msb (6th bit) - currentDigit = currentDigit | 32; - } - encodedStr = encodedStr + base64FormatEncode(currentDigit); - } while (inValue > 0); - return encodedStr; - } - } - function recordSourceMapSpan(pos) { - var sourceLinePos = ts.getLineAndCharacterOfPosition(currentSourceFile, pos); - // Convert the location to be one-based. - sourceLinePos.line++; - sourceLinePos.character++; - var emittedLine = writer.getLine(); - var emittedColumn = writer.getColumn(); - // If this location wasn't recorded or the location in source is going backwards, record the span - if (!lastRecordedSourceMapSpan || - lastRecordedSourceMapSpan.emittedLine != emittedLine || - lastRecordedSourceMapSpan.emittedColumn != emittedColumn || - (lastRecordedSourceMapSpan.sourceIndex === sourceMapSourceIndex && - (lastRecordedSourceMapSpan.sourceLine > sourceLinePos.line || - (lastRecordedSourceMapSpan.sourceLine === sourceLinePos.line && lastRecordedSourceMapSpan.sourceColumn > sourceLinePos.character)))) { - // Encode the last recordedSpan before assigning new - encodeLastRecordedSourceMapSpan(); - // New span - lastRecordedSourceMapSpan = { - emittedLine: emittedLine, - emittedColumn: emittedColumn, - sourceLine: sourceLinePos.line, - sourceColumn: sourceLinePos.character, - nameIndex: getSourceMapNameIndex(), - sourceIndex: sourceMapSourceIndex - }; - } - else { - // Take the new pos instead since there is no change in emittedLine and column since last location - lastRecordedSourceMapSpan.sourceLine = sourceLinePos.line; - lastRecordedSourceMapSpan.sourceColumn = sourceLinePos.character; - lastRecordedSourceMapSpan.sourceIndex = sourceMapSourceIndex; - } - } - function recordEmitNodeStartSpan(node) { - // Get the token pos after skipping to the token (ignoring the leading trivia) - recordSourceMapSpan(ts.skipTrivia(currentSourceFile.text, node.pos)); - } - function recordEmitNodeEndSpan(node) { - recordSourceMapSpan(node.end); - } - function writeTextWithSpanRecord(tokenKind, startPos, emitFn) { - var tokenStartPos = ts.skipTrivia(currentSourceFile.text, startPos); - recordSourceMapSpan(tokenStartPos); - var tokenEndPos = emitTokenText(tokenKind, tokenStartPos, emitFn); - recordSourceMapSpan(tokenEndPos); - return tokenEndPos; - } - function recordNewSourceFileStart(node) { - // Add the file to tsFilePaths - // If sourceroot option: Use the relative path corresponding to the common directory path - // otherwise source locations relative to map file location - var sourcesDirectoryPath = compilerOptions.sourceRoot ? host.getCommonSourceDirectory() : sourceMapDir; - sourceMapData.sourceMapSources.push(ts.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, node.fileName, host.getCurrentDirectory(), host.getCanonicalFileName, - /*isAbsolutePathAnUrl*/ true)); - sourceMapSourceIndex = sourceMapData.sourceMapSources.length - 1; - // The one that can be used from program to get the actual source file - sourceMapData.inputSourceFileNames.push(node.fileName); - if (compilerOptions.inlineSources) { - if (!sourceMapData.sourceMapSourcesContent) { - sourceMapData.sourceMapSourcesContent = []; - } - sourceMapData.sourceMapSourcesContent.push(node.text); - } - } - function recordScopeNameOfNode(node, scopeName) { - function recordScopeNameIndex(scopeNameIndex) { - sourceMapNameIndices.push(scopeNameIndex); - } - function recordScopeNameStart(scopeName) { - var scopeNameIndex = -1; - if (scopeName) { - var parentIndex = getSourceMapNameIndex(); - if (parentIndex !== -1) { - // Child scopes are always shown with a dot (even if they have no name), - // unless it is a computed property. Then it is shown with brackets, - // but the brackets are included in the name. - var name_21 = node.name; - if (!name_21 || name_21.kind !== 129 /* ComputedPropertyName */) { - scopeName = "." + scopeName; - } - scopeName = sourceMapData.sourceMapNames[parentIndex] + scopeName; - } - scopeNameIndex = ts.getProperty(sourceMapNameIndexMap, scopeName); - if (scopeNameIndex === undefined) { - scopeNameIndex = sourceMapData.sourceMapNames.length; - sourceMapData.sourceMapNames.push(scopeName); - sourceMapNameIndexMap[scopeName] = scopeNameIndex; - } - } - recordScopeNameIndex(scopeNameIndex); - } - if (scopeName) { - // The scope was already given a name use it - recordScopeNameStart(scopeName); - } - else if (node.kind === 203 /* FunctionDeclaration */ || - node.kind === 165 /* FunctionExpression */ || - node.kind === 136 /* MethodDeclaration */ || - node.kind === 135 /* MethodSignature */ || - node.kind === 138 /* GetAccessor */ || - node.kind === 139 /* SetAccessor */ || - node.kind === 208 /* ModuleDeclaration */ || - node.kind === 204 /* ClassDeclaration */ || - node.kind === 207 /* EnumDeclaration */) { - // Declaration and has associated name use it - if (node.name) { - var name_22 = node.name; - // For computed property names, the text will include the brackets - scopeName = name_22.kind === 129 /* ComputedPropertyName */ - ? ts.getTextOfNode(name_22) - : node.name.text; - } - recordScopeNameStart(scopeName); - } - else { - // Block just use the name from upper level scope - recordScopeNameIndex(getSourceMapNameIndex()); - } - } - function recordScopeNameEnd() { - sourceMapNameIndices.pop(); - } - ; - function writeCommentRangeWithMap(curentSourceFile, writer, comment, newLine) { - recordSourceMapSpan(comment.pos); - ts.writeCommentRange(currentSourceFile, writer, comment, newLine); - recordSourceMapSpan(comment.end); - } - function serializeSourceMapContents(version, file, sourceRoot, sources, names, mappings, sourcesContent) { - if (typeof JSON !== "undefined") { - var map_1 = { - version: version, - file: file, - sourceRoot: sourceRoot, - sources: sources, - names: names, - mappings: mappings - }; - if (sourcesContent !== undefined) { - map_1.sourcesContent = sourcesContent; - } - return JSON.stringify(map_1); - } - return "{\"version\":" + version + ",\"file\":\"" + ts.escapeString(file) + "\",\"sourceRoot\":\"" + ts.escapeString(sourceRoot) + "\",\"sources\":[" + serializeStringArray(sources) + "],\"names\":[" + serializeStringArray(names) + "],\"mappings\":\"" + ts.escapeString(mappings) + "\" " + (sourcesContent !== undefined ? ",\"sourcesContent\":[" + serializeStringArray(sourcesContent) + "]" : "") + "}"; - function serializeStringArray(list) { - var output = ""; - for (var i = 0, n = list.length; i < n; i++) { - if (i) { - output += ","; - } - output += "\"" + ts.escapeString(list[i]) + "\""; - } - return output; - } - } - function writeJavaScriptAndSourceMapFile(emitOutput, writeByteOrderMark) { - encodeLastRecordedSourceMapSpan(); - var sourceMapText = serializeSourceMapContents(3, sourceMapData.sourceMapFile, sourceMapData.sourceMapSourceRoot, sourceMapData.sourceMapSources, sourceMapData.sourceMapNames, sourceMapData.sourceMapMappings, sourceMapData.sourceMapSourcesContent); - sourceMapDataList.push(sourceMapData); - var sourceMapUrl; - if (compilerOptions.inlineSourceMap) { - // Encode the sourceMap into the sourceMap url - var base64SourceMapText = ts.convertToBase64(sourceMapText); - sourceMapUrl = "//# sourceMappingURL=data:application/json;base64," + base64SourceMapText; - } - else { - // Write source map file - ts.writeFile(host, diagnostics, sourceMapData.sourceMapFilePath, sourceMapText, false); - sourceMapUrl = "//# sourceMappingURL=" + sourceMapData.jsSourceMappingURL; - } - // Write sourcemap url to the js file and write the js file - writeJavaScriptFile(emitOutput + sourceMapUrl, writeByteOrderMark); - } - // Initialize source map data - var sourceMapJsFile = ts.getBaseFileName(ts.normalizeSlashes(jsFilePath)); - sourceMapData = { - sourceMapFilePath: jsFilePath + ".map", - jsSourceMappingURL: sourceMapJsFile + ".map", - sourceMapFile: sourceMapJsFile, - sourceMapSourceRoot: compilerOptions.sourceRoot || "", - sourceMapSources: [], - inputSourceFileNames: [], - sourceMapNames: [], - sourceMapMappings: "", - sourceMapSourcesContent: undefined, - sourceMapDecodedMappings: [] - }; - // Normalize source root and make sure it has trailing "/" so that it can be used to combine paths with the - // relative paths of the sources list in the sourcemap - sourceMapData.sourceMapSourceRoot = ts.normalizeSlashes(sourceMapData.sourceMapSourceRoot); - if (sourceMapData.sourceMapSourceRoot.length && sourceMapData.sourceMapSourceRoot.charCodeAt(sourceMapData.sourceMapSourceRoot.length - 1) !== 47 /* slash */) { - sourceMapData.sourceMapSourceRoot += ts.directorySeparator; - } - if (compilerOptions.mapRoot) { - sourceMapDir = ts.normalizeSlashes(compilerOptions.mapRoot); - if (root) { - // For modules or multiple emit files the mapRoot will have directory structure like the sources - // So if src\a.ts and src\lib\b.ts are compiled together user would be moving the maps into mapRoot\a.js.map and mapRoot\lib\b.js.map - sourceMapDir = ts.getDirectoryPath(ts.getSourceFilePathInNewDir(root, host, sourceMapDir)); - } - if (!ts.isRootedDiskPath(sourceMapDir) && !ts.isUrl(sourceMapDir)) { - // The relative paths are relative to the common directory - sourceMapDir = ts.combinePaths(host.getCommonSourceDirectory(), sourceMapDir); - sourceMapData.jsSourceMappingURL = ts.getRelativePathToDirectoryOrUrl(ts.getDirectoryPath(ts.normalizePath(jsFilePath)), ts.combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL), host.getCurrentDirectory(), host.getCanonicalFileName, - /*isAbsolutePathAnUrl*/ true); - } - else { - sourceMapData.jsSourceMappingURL = ts.combinePaths(sourceMapDir, sourceMapData.jsSourceMappingURL); - } - } - else { - sourceMapDir = ts.getDirectoryPath(ts.normalizePath(jsFilePath)); - } - function emitNodeWithSourceMap(node) { - if (node) { - if (ts.nodeIsSynthesized(node)) { - return emitNodeWithoutSourceMap(node); - } - if (node.kind != 230 /* SourceFile */) { - recordEmitNodeStartSpan(node); - emitNodeWithoutSourceMap(node); - recordEmitNodeEndSpan(node); - } - else { - recordNewSourceFileStart(node); - emitNodeWithoutSourceMap(node); - } - } - } - writeEmittedFiles = writeJavaScriptAndSourceMapFile; - emit = emitNodeWithSourceMap; - emitStart = recordEmitNodeStartSpan; - emitEnd = recordEmitNodeEndSpan; - emitToken = writeTextWithSpanRecord; - scopeEmitStart = recordScopeNameOfNode; - scopeEmitEnd = recordScopeNameEnd; - writeComment = writeCommentRangeWithMap; - } - function writeJavaScriptFile(emitOutput, writeByteOrderMark) { - ts.writeFile(host, diagnostics, jsFilePath, emitOutput, writeByteOrderMark); - } - // Create a temporary variable with a unique unused name. - function createTempVariable(flags) { - var result = ts.createSynthesizedNode(65 /* Identifier */); - result.text = makeTempVariableName(flags); - return result; - } - function recordTempDeclaration(name) { - if (!tempVariables) { - tempVariables = []; - } - tempVariables.push(name); - } - function createAndRecordTempVariable(flags) { - var temp = createTempVariable(flags); - recordTempDeclaration(temp); - return temp; - } - function emitTempDeclarations(newLine) { - if (tempVariables) { - if (newLine) { - writeLine(); - } - else { - write(" "); - } - write("var "); - emitCommaList(tempVariables); - write(";"); - } - } - function emitTokenText(tokenKind, startPos, emitFn) { - var tokenString = ts.tokenToString(tokenKind); - if (emitFn) { - emitFn(); - } - else { - write(tokenString); - } - return startPos + tokenString.length; - } - function emitOptional(prefix, node) { - if (node) { - write(prefix); - emit(node); - } - } - function emitParenthesizedIf(node, parenthesized) { - if (parenthesized) { - write("("); - } - emit(node); - if (parenthesized) { - write(")"); - } - } - function emitTrailingCommaIfPresent(nodeList) { - if (nodeList.hasTrailingComma) { - write(","); - } - } - function emitLinePreservingList(parent, nodes, allowTrailingComma, spacesBetweenBraces) { - ts.Debug.assert(nodes.length > 0); - increaseIndent(); - if (nodeStartPositionsAreOnSameLine(parent, nodes[0])) { - if (spacesBetweenBraces) { - write(" "); - } - } - else { - writeLine(); - } - for (var i = 0, n = nodes.length; i < n; i++) { - if (i) { - if (nodeEndIsOnSameLineAsNodeStart(nodes[i - 1], nodes[i])) { - write(", "); - } - else { - write(","); - writeLine(); - } - } - emit(nodes[i]); - } - if (nodes.hasTrailingComma && allowTrailingComma) { - write(","); - } - decreaseIndent(); - if (nodeEndPositionsAreOnSameLine(parent, ts.lastOrUndefined(nodes))) { - if (spacesBetweenBraces) { - write(" "); - } - } - else { - writeLine(); - } - } - function emitList(nodes, start, count, multiLine, trailingComma, leadingComma, noTrailingNewLine, emitNode) { - if (!emitNode) { - emitNode = emit; - } - for (var i = 0; i < count; i++) { - if (multiLine) { - if (i || leadingComma) { - write(","); - } - writeLine(); - } - else { - if (i || leadingComma) { - write(", "); - } - } - emitNode(nodes[start + i]); - leadingComma = true; - } - if (trailingComma) { - write(","); - } - if (multiLine && !noTrailingNewLine) { - writeLine(); - } - return count; - } - function emitCommaList(nodes) { - if (nodes) { - emitList(nodes, 0, nodes.length, false, false); - } - } - function emitLines(nodes) { - emitLinesStartingAt(nodes, 0); - } - function emitLinesStartingAt(nodes, startIndex) { - for (var i = startIndex; i < nodes.length; i++) { - writeLine(); - emit(nodes[i]); - } - } - function isBinaryOrOctalIntegerLiteral(node, text) { - if (node.kind === 7 /* NumericLiteral */ && text.length > 1) { - switch (text.charCodeAt(1)) { - case 98 /* b */: - case 66 /* B */: - case 111 /* o */: - case 79 /* O */: - return true; - } - } - return false; - } - function emitLiteral(node) { - var text = getLiteralText(node); - if ((compilerOptions.sourceMap || compilerOptions.inlineSourceMap) && (node.kind === 8 /* StringLiteral */ || ts.isTemplateLiteralKind(node.kind))) { - writer.writeLiteral(text); - } - else if (languageVersion < 2 /* ES6 */ && isBinaryOrOctalIntegerLiteral(node, text)) { - write(node.text); - } - else { - write(text); - } - } - function getLiteralText(node) { - // Any template literal or string literal with an extended escape - // (e.g. "\u{0067}") will need to be downleveled as a escaped string literal. - if (languageVersion < 2 /* ES6 */ && (ts.isTemplateLiteralKind(node.kind) || node.hasExtendedUnicodeEscape)) { - return getQuotedEscapedLiteralText('"', node.text, '"'); - } - // If we don't need to downlevel and we can reach the original source text using - // the node's parent reference, then simply get the text as it was originally written. - if (node.parent) { - return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); - } - // If we can't reach the original source text, use the canonical form if it's a number, - // or an escaped quoted form of the original text if it's string-like. - switch (node.kind) { - case 8 /* StringLiteral */: - return getQuotedEscapedLiteralText('"', node.text, '"'); - case 10 /* NoSubstitutionTemplateLiteral */: - return getQuotedEscapedLiteralText('`', node.text, '`'); - case 11 /* TemplateHead */: - return getQuotedEscapedLiteralText('`', node.text, '${'); - case 12 /* TemplateMiddle */: - return getQuotedEscapedLiteralText('}', node.text, '${'); - case 13 /* TemplateTail */: - return getQuotedEscapedLiteralText('}', node.text, '`'); - case 7 /* NumericLiteral */: - return node.text; - } - ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for."); - } - function getQuotedEscapedLiteralText(leftQuote, text, rightQuote) { - return leftQuote + ts.escapeNonAsciiCharacters(ts.escapeString(text)) + rightQuote; - } - function emitDownlevelRawTemplateLiteral(node) { - // Find original source text, since we need to emit the raw strings of the tagged template. - // The raw strings contain the (escaped) strings of what the user wrote. - // Examples: `\n` is converted to "\\n", a template string with a newline to "\n". - var text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node); - // text contains the original source, it will also contain quotes ("`"), dolar signs and braces ("${" and "}"), - // thus we need to remove those characters. - // First template piece starts with "`", others with "}" - // Last template piece ends with "`", others with "${" - var isLast = node.kind === 10 /* NoSubstitutionTemplateLiteral */ || node.kind === 13 /* TemplateTail */; - text = text.substring(1, text.length - (isLast ? 1 : 2)); - // Newline normalization: - // ES6 Spec 11.8.6.1 - Static Semantics of TV's and TRV's - // and LineTerminatorSequences are normalized to for both TV and TRV. - text = text.replace(/\r\n?/g, "\n"); - text = ts.escapeString(text); - write('"' + text + '"'); - } - function emitDownlevelTaggedTemplateArray(node, literalEmitter) { - write("["); - if (node.template.kind === 10 /* NoSubstitutionTemplateLiteral */) { - literalEmitter(node.template); - } - else { - literalEmitter(node.template.head); - ts.forEach(node.template.templateSpans, function (child) { - write(", "); - literalEmitter(child.literal); - }); - } - write("]"); - } - function emitDownlevelTaggedTemplate(node) { - var tempVariable = createAndRecordTempVariable(0 /* Auto */); - write("("); - emit(tempVariable); - write(" = "); - emitDownlevelTaggedTemplateArray(node, emit); - write(", "); - emit(tempVariable); - write(".raw = "); - emitDownlevelTaggedTemplateArray(node, emitDownlevelRawTemplateLiteral); - write(", "); - emitParenthesizedIf(node.tag, needsParenthesisForPropertyAccessOrInvocation(node.tag)); - write("("); - emit(tempVariable); - // Now we emit the expressions - if (node.template.kind === 174 /* TemplateExpression */) { - ts.forEach(node.template.templateSpans, function (templateSpan) { - write(", "); - var needsParens = templateSpan.expression.kind === 172 /* BinaryExpression */ - && templateSpan.expression.operatorToken.kind === 23 /* CommaToken */; - emitParenthesizedIf(templateSpan.expression, needsParens); - }); - } - write("))"); - } - function emitTemplateExpression(node) { - // In ES6 mode and above, we can simply emit each portion of a template in order, but in - // ES3 & ES5 we must convert the template expression into a series of string concatenations. - if (languageVersion >= 2 /* ES6 */) { - ts.forEachChild(node, emit); - return; - } - var emitOuterParens = ts.isExpression(node.parent) - && templateNeedsParens(node, node.parent); - if (emitOuterParens) { - write("("); - } - var headEmitted = false; - if (shouldEmitTemplateHead()) { - emitLiteral(node.head); - headEmitted = true; - } - for (var i = 0, n = node.templateSpans.length; i < n; i++) { - var templateSpan = node.templateSpans[i]; - // Check if the expression has operands and binds its operands less closely than binary '+'. - // If it does, we need to wrap the expression in parentheses. Otherwise, something like - // `abc${ 1 << 2 }` - // becomes - // "abc" + 1 << 2 + "" - // which is really - // ("abc" + 1) << (2 + "") - // rather than - // "abc" + (1 << 2) + "" - var needsParens = templateSpan.expression.kind !== 164 /* ParenthesizedExpression */ - && comparePrecedenceToBinaryPlus(templateSpan.expression) !== 1 /* GreaterThan */; - if (i > 0 || headEmitted) { - // If this is the first span and the head was not emitted, then this templateSpan's - // expression will be the first to be emitted. Don't emit the preceding ' + ' in that - // case. - write(" + "); - } - emitParenthesizedIf(templateSpan.expression, needsParens); - // Only emit if the literal is non-empty. - // The binary '+' operator is left-associative, so the first string concatenation - // with the head will force the result up to this point to be a string. - // Emitting a '+ ""' has no semantic effect for middles and tails. - if (templateSpan.literal.text.length !== 0) { - write(" + "); - emitLiteral(templateSpan.literal); - } - } - if (emitOuterParens) { - write(")"); - } - function shouldEmitTemplateHead() { - // If this expression has an empty head literal and the first template span has a non-empty - // literal, then emitting the empty head literal is not necessary. - // `${ foo } and ${ bar }` - // can be emitted as - // foo + " and " + bar - // This is because it is only required that one of the first two operands in the emit - // output must be a string literal, so that the other operand and all following operands - // are forced into strings. - // - // If the first template span has an empty literal, then the head must still be emitted. - // `${ foo }${ bar }` - // must still be emitted as - // "" + foo + bar - // There is always atleast one templateSpan in this code path, since - // NoSubstitutionTemplateLiterals are directly emitted via emitLiteral() - ts.Debug.assert(node.templateSpans.length !== 0); - return node.head.text.length !== 0 || node.templateSpans[0].literal.text.length === 0; - } - function templateNeedsParens(template, parent) { - switch (parent.kind) { - case 160 /* CallExpression */: - case 161 /* NewExpression */: - return parent.expression === template; - case 162 /* TaggedTemplateExpression */: - case 164 /* ParenthesizedExpression */: - return false; - default: - return comparePrecedenceToBinaryPlus(parent) !== -1 /* LessThan */; - } - } - /** - * Returns whether the expression has lesser, greater, - * or equal precedence to the binary '+' operator - */ - function comparePrecedenceToBinaryPlus(expression) { - // All binary expressions have lower precedence than '+' apart from '*', '/', and '%' - // which have greater precedence and '-' which has equal precedence. - // All unary operators have a higher precedence apart from yield. - // Arrow functions and conditionals have a lower precedence, - // although we convert the former into regular function expressions in ES5 mode, - // and in ES6 mode this function won't get called anyway. - // - // TODO (drosen): Note that we need to account for the upcoming 'yield' and - // spread ('...') unary operators that are anticipated for ES6. - switch (expression.kind) { - case 172 /* BinaryExpression */: - switch (expression.operatorToken.kind) { - case 35 /* AsteriskToken */: - case 36 /* SlashToken */: - case 37 /* PercentToken */: - return 1 /* GreaterThan */; - case 33 /* PlusToken */: - case 34 /* MinusToken */: - return 0 /* EqualTo */; - default: - return -1 /* LessThan */; - } - case 175 /* YieldExpression */: - case 173 /* ConditionalExpression */: - return -1 /* LessThan */; - default: - return 1 /* GreaterThan */; - } - } - } - function emitTemplateSpan(span) { - emit(span.expression); - emit(span.literal); - } - // This function specifically handles numeric/string literals for enum and accessor 'identifiers'. - // In a sense, it does not actually emit identifiers as much as it declares a name for a specific property. - // For example, this is utilized when feeding in a result to Object.defineProperty. - function emitExpressionForPropertyName(node) { - ts.Debug.assert(node.kind !== 155 /* BindingElement */); - if (node.kind === 8 /* StringLiteral */) { - emitLiteral(node); - } - else if (node.kind === 129 /* ComputedPropertyName */) { - // if this is a decorated computed property, we will need to capture the result - // of the property expression so that we can apply decorators later. This is to ensure - // we don't introduce unintended side effects: - // - // class C { - // [_a = x]() { } - // } - // - // The emit for the decorated computed property decorator is: - // - // Object.defineProperty(C.prototype, _a, __decorate([dec], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); - // - if (ts.nodeIsDecorated(node.parent)) { - if (!computedPropertyNamesToGeneratedNames) { - computedPropertyNamesToGeneratedNames = []; - } - var generatedName = computedPropertyNamesToGeneratedNames[ts.getNodeId(node)]; - if (generatedName) { - // we have already generated a variable for this node, write that value instead. - write(generatedName); - return; - } - generatedName = createAndRecordTempVariable(0 /* Auto */).text; - computedPropertyNamesToGeneratedNames[ts.getNodeId(node)] = generatedName; - write(generatedName); - write(" = "); - } - emit(node.expression); - } - else { - write("\""); - if (node.kind === 7 /* NumericLiteral */) { - write(node.text); - } - else { - writeTextOfNode(currentSourceFile, node); - } - write("\""); - } - } - function isExpressionIdentifier(node) { - var parent = node.parent; - switch (parent.kind) { - case 156 /* ArrayLiteralExpression */: - case 172 /* BinaryExpression */: - case 160 /* CallExpression */: - case 223 /* CaseClause */: - case 129 /* ComputedPropertyName */: - case 173 /* ConditionalExpression */: - case 132 /* Decorator */: - case 167 /* DeleteExpression */: - case 187 /* DoStatement */: - case 159 /* ElementAccessExpression */: - case 217 /* ExportAssignment */: - case 185 /* ExpressionStatement */: - case 179 /* ExpressionWithTypeArguments */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 186 /* IfStatement */: - case 161 /* NewExpression */: - case 164 /* ParenthesizedExpression */: - case 171 /* PostfixUnaryExpression */: - case 170 /* PrefixUnaryExpression */: - case 194 /* ReturnStatement */: - case 228 /* ShorthandPropertyAssignment */: - case 176 /* SpreadElementExpression */: - case 196 /* SwitchStatement */: - case 162 /* TaggedTemplateExpression */: - case 180 /* TemplateSpan */: - case 198 /* ThrowStatement */: - case 163 /* TypeAssertionExpression */: - case 168 /* TypeOfExpression */: - case 169 /* VoidExpression */: - case 188 /* WhileStatement */: - case 195 /* WithStatement */: - case 175 /* YieldExpression */: - return true; - case 155 /* BindingElement */: - case 229 /* EnumMember */: - case 131 /* Parameter */: - case 227 /* PropertyAssignment */: - case 134 /* PropertyDeclaration */: - case 201 /* VariableDeclaration */: - return parent.initializer === node; - case 158 /* PropertyAccessExpression */: - return parent.expression === node; - case 166 /* ArrowFunction */: - case 165 /* FunctionExpression */: - return parent.body === node; - case 211 /* ImportEqualsDeclaration */: - return parent.moduleReference === node; - case 128 /* QualifiedName */: - return parent.left === node; - } - return false; - } - function emitExpressionIdentifier(node) { - var container = resolver.getReferencedExportContainer(node); - if (container) { - if (container.kind === 230 /* SourceFile */) { - // Identifier references module export - if (languageVersion < 2 /* ES6 */ && compilerOptions.module !== 4 /* System */) { - write("exports."); - } - } - else { - // Identifier references namespace export - write(getGeneratedNameForNode(container)); - write("."); - } - } - else if (languageVersion < 2 /* ES6 */) { - var declaration = resolver.getReferencedImportDeclaration(node); - if (declaration) { - if (declaration.kind === 213 /* ImportClause */) { - // Identifier references default import - write(getGeneratedNameForNode(declaration.parent)); - write(languageVersion === 0 /* ES3 */ ? '["default"]' : ".default"); - return; - } - else if (declaration.kind === 216 /* ImportSpecifier */) { - // Identifier references named import - write(getGeneratedNameForNode(declaration.parent.parent.parent)); - write("."); - writeTextOfNode(currentSourceFile, declaration.propertyName || declaration.name); - return; - } - } - declaration = resolver.getReferencedNestedRedeclaration(node); - if (declaration) { - write(getGeneratedNameForNode(declaration.name)); - return; - } - } - writeTextOfNode(currentSourceFile, node); - } - function isNameOfNestedRedeclaration(node) { - if (languageVersion < 2 /* ES6 */) { - var parent_7 = node.parent; - switch (parent_7.kind) { - case 155 /* BindingElement */: - case 204 /* ClassDeclaration */: - case 207 /* EnumDeclaration */: - case 201 /* VariableDeclaration */: - return parent_7.name === node && resolver.isNestedRedeclaration(parent_7); - } - } - return false; - } - function emitIdentifier(node) { - if (!node.parent) { - write(node.text); - } - else if (isExpressionIdentifier(node)) { - emitExpressionIdentifier(node); - } - else if (isNameOfNestedRedeclaration(node)) { - write(getGeneratedNameForNode(node)); - } - else { - writeTextOfNode(currentSourceFile, node); - } - } - function emitThis(node) { - if (resolver.getNodeCheckFlags(node) & 2 /* LexicalThis */) { - write("_this"); - } - else { - write("this"); - } - } - function emitSuper(node) { - if (languageVersion >= 2 /* ES6 */) { - write("super"); - } - else { - var flags = resolver.getNodeCheckFlags(node); - if (flags & 16 /* SuperInstance */) { - write("_super.prototype"); - } - else { - write("_super"); - } - } - } - function emitObjectBindingPattern(node) { - write("{ "); - var elements = node.elements; - emitList(elements, 0, elements.length, false, elements.hasTrailingComma); - write(" }"); - } - function emitArrayBindingPattern(node) { - write("["); - var elements = node.elements; - emitList(elements, 0, elements.length, false, elements.hasTrailingComma); - write("]"); - } - function emitBindingElement(node) { - if (node.propertyName) { - emit(node.propertyName); - write(": "); - } - if (node.dotDotDotToken) { - write("..."); - } - if (ts.isBindingPattern(node.name)) { - emit(node.name); - } - else { - emitModuleMemberName(node); - } - emitOptional(" = ", node.initializer); - } - function emitSpreadElementExpression(node) { - write("..."); - emit(node.expression); - } - function emitYieldExpression(node) { - write(ts.tokenToString(110 /* YieldKeyword */)); - if (node.asteriskToken) { - write("*"); - } - if (node.expression) { - write(" "); - emit(node.expression); - } - } - function needsParenthesisForPropertyAccessOrInvocation(node) { - switch (node.kind) { - case 65 /* Identifier */: - case 156 /* ArrayLiteralExpression */: - case 158 /* PropertyAccessExpression */: - case 159 /* ElementAccessExpression */: - case 160 /* CallExpression */: - case 164 /* ParenthesizedExpression */: - // This list is not exhaustive and only includes those cases that are relevant - // to the check in emitArrayLiteral. More cases can be added as needed. - return false; - } - return true; - } - function emitListWithSpread(elements, needsUniqueCopy, multiLine, trailingComma, useConcat) { - var pos = 0; - var group = 0; - var length = elements.length; - while (pos < length) { - // Emit using the pattern .concat(, , ...) - if (group === 1 && useConcat) { - write(".concat("); - } - else if (group > 0) { - write(", "); - } - var e = elements[pos]; - if (e.kind === 176 /* SpreadElementExpression */) { - e = e.expression; - emitParenthesizedIf(e, group === 0 && needsParenthesisForPropertyAccessOrInvocation(e)); - pos++; - if (pos === length && group === 0 && needsUniqueCopy && e.kind !== 156 /* ArrayLiteralExpression */) { - write(".slice()"); - } - } - else { - var i = pos; - while (i < length && elements[i].kind !== 176 /* SpreadElementExpression */) { - i++; - } - write("["); - if (multiLine) { - increaseIndent(); - } - emitList(elements, pos, i - pos, multiLine, trailingComma && i === length); - if (multiLine) { - decreaseIndent(); - } - write("]"); - pos = i; - } - group++; - } - if (group > 1) { - if (useConcat) { - write(")"); - } - } - } - function isSpreadElementExpression(node) { - return node.kind === 176 /* SpreadElementExpression */; - } - function emitArrayLiteral(node) { - var elements = node.elements; - if (elements.length === 0) { - write("[]"); - } - else if (languageVersion >= 2 /* ES6 */ || !ts.forEach(elements, isSpreadElementExpression)) { - write("["); - emitLinePreservingList(node, node.elements, elements.hasTrailingComma, false); - write("]"); - } - else { - emitListWithSpread(elements, true, (node.flags & 512 /* MultiLine */) !== 0, - /*trailingComma*/ elements.hasTrailingComma, true); - } - } - function emitObjectLiteralBody(node, numElements) { - if (numElements === 0) { - write("{}"); - return; - } - write("{"); - if (numElements > 0) { - var properties = node.properties; - // If we are not doing a downlevel transformation for object literals, - // then try to preserve the original shape of the object literal. - // Otherwise just try to preserve the formatting. - if (numElements === properties.length) { - emitLinePreservingList(node, properties, languageVersion >= 1 /* ES5 */, true); - } - else { - var multiLine = (node.flags & 512 /* MultiLine */) !== 0; - if (!multiLine) { - write(" "); - } - else { - increaseIndent(); - } - emitList(properties, 0, numElements, multiLine, false); - if (!multiLine) { - write(" "); - } - else { - decreaseIndent(); - } - } - } - write("}"); - } - function emitDownlevelObjectLiteralWithComputedProperties(node, firstComputedPropertyIndex) { - var multiLine = (node.flags & 512 /* MultiLine */) !== 0; - var properties = node.properties; - write("("); - if (multiLine) { - increaseIndent(); - } - // For computed properties, we need to create a unique handle to the object - // literal so we can modify it without risking internal assignments tainting the object. - var tempVar = createAndRecordTempVariable(0 /* Auto */); - // Write out the first non-computed properties - // (or all properties if none of them are computed), - // then emit the rest through indexing on the temp variable. - emit(tempVar); - write(" = "); - emitObjectLiteralBody(node, firstComputedPropertyIndex); - for (var i = firstComputedPropertyIndex, n = properties.length; i < n; i++) { - writeComma(); - var property = properties[i]; - emitStart(property); - if (property.kind === 138 /* GetAccessor */ || property.kind === 139 /* SetAccessor */) { - // TODO (drosen): Reconcile with 'emitMemberFunctions'. - var accessors = ts.getAllAccessorDeclarations(node.properties, property); - if (property !== accessors.firstAccessor) { - continue; - } - write("Object.defineProperty("); - emit(tempVar); - write(", "); - emitStart(node.name); - emitExpressionForPropertyName(property.name); - emitEnd(property.name); - write(", {"); - increaseIndent(); - if (accessors.getAccessor) { - writeLine(); - emitLeadingComments(accessors.getAccessor); - write("get: "); - emitStart(accessors.getAccessor); - write("function "); - emitSignatureAndBody(accessors.getAccessor); - emitEnd(accessors.getAccessor); - emitTrailingComments(accessors.getAccessor); - write(","); - } - if (accessors.setAccessor) { - writeLine(); - emitLeadingComments(accessors.setAccessor); - write("set: "); - emitStart(accessors.setAccessor); - write("function "); - emitSignatureAndBody(accessors.setAccessor); - emitEnd(accessors.setAccessor); - emitTrailingComments(accessors.setAccessor); - write(","); - } - writeLine(); - write("enumerable: true,"); - writeLine(); - write("configurable: true"); - decreaseIndent(); - writeLine(); - write("})"); - emitEnd(property); - } - else { - emitLeadingComments(property); - emitStart(property.name); - emit(tempVar); - emitMemberAccessForPropertyName(property.name); - emitEnd(property.name); - write(" = "); - if (property.kind === 227 /* PropertyAssignment */) { - emit(property.initializer); - } - else if (property.kind === 228 /* ShorthandPropertyAssignment */) { - emitExpressionIdentifier(property.name); - } - else if (property.kind === 136 /* MethodDeclaration */) { - emitFunctionDeclaration(property); - } - else { - ts.Debug.fail("ObjectLiteralElement type not accounted for: " + property.kind); - } - } - emitEnd(property); - } - writeComma(); - emit(tempVar); - if (multiLine) { - decreaseIndent(); - writeLine(); - } - write(")"); - function writeComma() { - if (multiLine) { - write(","); - writeLine(); - } - else { - write(", "); - } - } - } - function emitObjectLiteral(node) { - var properties = node.properties; - if (languageVersion < 2 /* ES6 */) { - var numProperties = properties.length; - // Find the first computed property. - // Everything until that point can be emitted as part of the initial object literal. - var numInitialNonComputedProperties = numProperties; - for (var i = 0, n = properties.length; i < n; i++) { - if (properties[i].name.kind === 129 /* ComputedPropertyName */) { - numInitialNonComputedProperties = i; - break; - } - } - var hasComputedProperty = numInitialNonComputedProperties !== properties.length; - if (hasComputedProperty) { - emitDownlevelObjectLiteralWithComputedProperties(node, numInitialNonComputedProperties); - return; - } - } - // Ordinary case: either the object has no computed properties - // or we're compiling with an ES6+ target. - emitObjectLiteralBody(node, properties.length); - } - function createBinaryExpression(left, operator, right, startsOnNewLine) { - var result = ts.createSynthesizedNode(172 /* BinaryExpression */, startsOnNewLine); - result.operatorToken = ts.createSynthesizedNode(operator); - result.left = left; - result.right = right; - return result; - } - function createPropertyAccessExpression(expression, name) { - var result = ts.createSynthesizedNode(158 /* PropertyAccessExpression */); - result.expression = parenthesizeForAccess(expression); - result.dotToken = ts.createSynthesizedNode(20 /* DotToken */); - result.name = name; - return result; - } - function createElementAccessExpression(expression, argumentExpression) { - var result = ts.createSynthesizedNode(159 /* ElementAccessExpression */); - result.expression = parenthesizeForAccess(expression); - result.argumentExpression = argumentExpression; - return result; - } - function parenthesizeForAccess(expr) { - // When diagnosing whether the expression needs parentheses, the decision should be based - // on the innermost expression in a chain of nested type assertions. - while (expr.kind === 163 /* TypeAssertionExpression */) { - expr = expr.expression; - } - // isLeftHandSideExpression is almost the correct criterion for when it is not necessary - // to parenthesize the expression before a dot. The known exceptions are: - // - // NewExpression: - // new C.x -> not the same as (new C).x - // NumberLiteral - // 1.x -> not the same as (1).x - // - if (ts.isLeftHandSideExpression(expr) && - expr.kind !== 161 /* NewExpression */ && - expr.kind !== 7 /* NumericLiteral */) { - return expr; - } - var node = ts.createSynthesizedNode(164 /* ParenthesizedExpression */); - node.expression = expr; - return node; - } - function emitComputedPropertyName(node) { - write("["); - emitExpressionForPropertyName(node); - write("]"); - } - function emitMethod(node) { - if (languageVersion >= 2 /* ES6 */ && node.asteriskToken) { - write("*"); - } - emit(node.name); - if (languageVersion < 2 /* ES6 */) { - write(": function "); - } - emitSignatureAndBody(node); - } - function emitPropertyAssignment(node) { - emit(node.name); - write(": "); - emit(node.initializer); - } - // Return true if identifier resolves to an exported member of a namespace - function isNamespaceExportReference(node) { - var container = resolver.getReferencedExportContainer(node); - return container && container.kind !== 230 /* SourceFile */; - } - function emitShorthandPropertyAssignment(node) { - // The name property of a short-hand property assignment is considered an expression position, so here - // we manually emit the identifier to avoid rewriting. - writeTextOfNode(currentSourceFile, node.name); - // If emitting pre-ES6 code, or if the name requires rewriting when resolved as an expression identifier, - // we emit a normal property assignment. For example: - // module m { - // export let y; - // } - // module m { - // let obj = { y }; - // } - // Here we need to emit obj = { y : m.y } regardless of the output target. - if (languageVersion < 2 /* ES6 */ || isNamespaceExportReference(node.name)) { - // Emit identifier as an identifier - write(": "); - emit(node.name); - } - } - function tryEmitConstantValue(node) { - if (compilerOptions.isolatedModules) { - // do not inline enum values in separate compilation mode - return false; - } - var constantValue = resolver.getConstantValue(node); - if (constantValue !== undefined) { - write(constantValue.toString()); - if (!compilerOptions.removeComments) { - var propertyName = node.kind === 158 /* PropertyAccessExpression */ ? ts.declarationNameToString(node.name) : ts.getTextOfNode(node.argumentExpression); - write(" /* " + propertyName + " */"); - } - return true; - } - return false; - } - // Returns 'true' if the code was actually indented, false otherwise. - // If the code is not indented, an optional valueToWriteWhenNotIndenting will be - // emitted instead. - function indentIfOnDifferentLines(parent, node1, node2, valueToWriteWhenNotIndenting) { - var realNodesAreOnDifferentLines = !ts.nodeIsSynthesized(parent) && !nodeEndIsOnSameLineAsNodeStart(node1, node2); - // Always use a newline for synthesized code if the synthesizer desires it. - var synthesizedNodeIsOnDifferentLine = synthesizedNodeStartsOnNewLine(node2); - if (realNodesAreOnDifferentLines || synthesizedNodeIsOnDifferentLine) { - increaseIndent(); - writeLine(); - return true; - } - else { - if (valueToWriteWhenNotIndenting) { - write(valueToWriteWhenNotIndenting); - } - return false; - } - } - function emitPropertyAccess(node) { - if (tryEmitConstantValue(node)) { - return; - } - emit(node.expression); - var indentedBeforeDot = indentIfOnDifferentLines(node, node.expression, node.dotToken); - write("."); - var indentedAfterDot = indentIfOnDifferentLines(node, node.dotToken, node.name); - emit(node.name); - decreaseIndentIf(indentedBeforeDot, indentedAfterDot); - } - function emitQualifiedName(node) { - emit(node.left); - write("."); - emit(node.right); - } - function emitIndexedAccess(node) { - if (tryEmitConstantValue(node)) { - return; - } - emit(node.expression); - write("["); - emit(node.argumentExpression); - write("]"); - } - function hasSpreadElement(elements) { - return ts.forEach(elements, function (e) { return e.kind === 176 /* SpreadElementExpression */; }); - } - function skipParentheses(node) { - while (node.kind === 164 /* ParenthesizedExpression */ || node.kind === 163 /* TypeAssertionExpression */) { - node = node.expression; - } - return node; - } - function emitCallTarget(node) { - if (node.kind === 65 /* Identifier */ || node.kind === 93 /* ThisKeyword */ || node.kind === 91 /* SuperKeyword */) { - emit(node); - return node; - } - var temp = createAndRecordTempVariable(0 /* Auto */); - write("("); - emit(temp); - write(" = "); - emit(node); - write(")"); - return temp; - } - function emitCallWithSpread(node) { - var target; - var expr = skipParentheses(node.expression); - if (expr.kind === 158 /* PropertyAccessExpression */) { - // Target will be emitted as "this" argument - target = emitCallTarget(expr.expression); - write("."); - emit(expr.name); - } - else if (expr.kind === 159 /* ElementAccessExpression */) { - // Target will be emitted as "this" argument - target = emitCallTarget(expr.expression); - write("["); - emit(expr.argumentExpression); - write("]"); - } - else if (expr.kind === 91 /* SuperKeyword */) { - target = expr; - write("_super"); - } - else { - emit(node.expression); - } - write(".apply("); - if (target) { - if (target.kind === 91 /* SuperKeyword */) { - // Calls of form super(...) and super.foo(...) - emitThis(target); - } - else { - // Calls of form obj.foo(...) - emit(target); - } - } - else { - // Calls of form foo(...) - write("void 0"); - } - write(", "); - emitListWithSpread(node.arguments, false, false, false, true); - write(")"); - } - function emitCallExpression(node) { - if (languageVersion < 2 /* ES6 */ && hasSpreadElement(node.arguments)) { - emitCallWithSpread(node); - return; - } - var superCall = false; - if (node.expression.kind === 91 /* SuperKeyword */) { - emitSuper(node.expression); - superCall = true; - } - else { - emit(node.expression); - superCall = node.expression.kind === 158 /* PropertyAccessExpression */ && node.expression.expression.kind === 91 /* SuperKeyword */; - } - if (superCall && languageVersion < 2 /* ES6 */) { - write(".call("); - emitThis(node.expression); - if (node.arguments.length) { - write(", "); - emitCommaList(node.arguments); - } - write(")"); - } - else { - write("("); - emitCommaList(node.arguments); - write(")"); - } - } - function emitNewExpression(node) { - write("new "); - // Spread operator logic is supported in new expressions in ES5 using a combination - // of Function.prototype.bind() and Function.prototype.apply(). - // - // Example: - // - // var args = [1, 2, 3, 4, 5]; - // new Array(...args); - // - // is compiled into the following ES5: - // - // var args = [1, 2, 3, 4, 5]; - // new (Array.bind.apply(Array, [void 0].concat(args))); - // - // The 'thisArg' to 'bind' is ignored when invoking the result of 'bind' with 'new', - // Thus, we set it to undefined ('void 0'). - if (languageVersion === 1 /* ES5 */ && - node.arguments && - hasSpreadElement(node.arguments)) { - write("("); - var target = emitCallTarget(node.expression); - write(".bind.apply("); - emit(target); - write(", [void 0].concat("); - emitListWithSpread(node.arguments, false, false, false, false); - write(")))"); - write("()"); - } - else { - emit(node.expression); - if (node.arguments) { - write("("); - emitCommaList(node.arguments); - write(")"); - } - } - } - function emitTaggedTemplateExpression(node) { - if (languageVersion >= 2 /* ES6 */) { - emit(node.tag); - write(" "); - emit(node.template); - } - else { - emitDownlevelTaggedTemplate(node); - } - } - function emitParenExpression(node) { - // If the node is synthesized, it means the emitter put the parentheses there, - // not the user. If we didn't want them, the emitter would not have put them - // there. - if (!ts.nodeIsSynthesized(node) && node.parent.kind !== 166 /* ArrowFunction */) { - if (node.expression.kind === 163 /* TypeAssertionExpression */) { - var operand = node.expression.expression; - // Make sure we consider all nested cast expressions, e.g.: - // (-A).x; - while (operand.kind == 163 /* TypeAssertionExpression */) { - operand = operand.expression; - } - // We have an expression of the form: (SubExpr) - // Emitting this as (SubExpr) is really not desirable. We would like to emit the subexpr as is. - // Omitting the parentheses, however, could cause change in the semantics of the generated - // code if the casted expression has a lower precedence than the rest of the expression, e.g.: - // (new A).foo should be emitted as (new A).foo and not new A.foo - // (typeof A).toString() should be emitted as (typeof A).toString() and not typeof A.toString() - // new (A()) should be emitted as new (A()) and not new A() - // (function foo() { })() should be emitted as an IIF (function foo(){})() and not declaration function foo(){} () - if (operand.kind !== 170 /* PrefixUnaryExpression */ && - operand.kind !== 169 /* VoidExpression */ && - operand.kind !== 168 /* TypeOfExpression */ && - operand.kind !== 167 /* DeleteExpression */ && - operand.kind !== 171 /* PostfixUnaryExpression */ && - operand.kind !== 161 /* NewExpression */ && - !(operand.kind === 160 /* CallExpression */ && node.parent.kind === 161 /* NewExpression */) && - !(operand.kind === 165 /* FunctionExpression */ && node.parent.kind === 160 /* CallExpression */)) { - emit(operand); - return; - } - } - } - write("("); - emit(node.expression); - write(")"); - } - function emitDeleteExpression(node) { - write(ts.tokenToString(74 /* DeleteKeyword */)); - write(" "); - emit(node.expression); - } - function emitVoidExpression(node) { - write(ts.tokenToString(99 /* VoidKeyword */)); - write(" "); - emit(node.expression); - } - function emitTypeOfExpression(node) { - write(ts.tokenToString(97 /* TypeOfKeyword */)); - write(" "); - emit(node.expression); - } - function isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node) { - if (!isCurrentFileSystemExternalModule() || node.kind !== 65 /* Identifier */ || ts.nodeIsSynthesized(node)) { - return false; - } - var isVariableDeclarationOrBindingElement = node.parent && (node.parent.kind === 201 /* VariableDeclaration */ || node.parent.kind === 155 /* BindingElement */); - var targetDeclaration = isVariableDeclarationOrBindingElement - ? node.parent - : resolver.getReferencedValueDeclaration(node); - return isSourceFileLevelDeclarationInSystemJsModule(targetDeclaration, true); - } - function emitPrefixUnaryExpression(node) { - var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.operand); - if (exportChanged) { - // emit - // ++x - // as - // exports('x', ++x) - write(exportFunctionForFile + "(\""); - emitNodeWithoutSourceMap(node.operand); - write("\", "); - } - write(ts.tokenToString(node.operator)); - // In some cases, we need to emit a space between the operator and the operand. One obvious case - // is when the operator is an identifier, like delete or typeof. We also need to do this for plus - // and minus expressions in certain cases. Specifically, consider the following two cases (parens - // are just for clarity of exposition, and not part of the source code): - // - // (+(+1)) - // (+(++1)) - // - // We need to emit a space in both cases. In the first case, the absence of a space will make - // the resulting expression a prefix increment operation. And in the second, it will make the resulting - // expression a prefix increment whose operand is a plus expression - (++(+x)) - // The same is true of minus of course. - if (node.operand.kind === 170 /* PrefixUnaryExpression */) { - var operand = node.operand; - if (node.operator === 33 /* PlusToken */ && (operand.operator === 33 /* PlusToken */ || operand.operator === 38 /* PlusPlusToken */)) { - write(" "); - } - else if (node.operator === 34 /* MinusToken */ && (operand.operator === 34 /* MinusToken */ || operand.operator === 39 /* MinusMinusToken */)) { - write(" "); - } - } - emit(node.operand); - if (exportChanged) { - write(")"); - } - } - function emitPostfixUnaryExpression(node) { - var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.operand); - if (exportChanged) { - // export function returns the value that was passes as the second argument - // however for postfix unary expressions result value should be the value before modification. - // emit 'x++' as '(export('x', ++x) - 1)' and 'x--' as '(export('x', --x) + 1)' - write("(" + exportFunctionForFile + "(\""); - emitNodeWithoutSourceMap(node.operand); - write("\", "); - write(ts.tokenToString(node.operator)); - emit(node.operand); - if (node.operator === 38 /* PlusPlusToken */) { - write(") - 1)"); - } - else { - write(") + 1)"); - } - } - else { - emit(node.operand); - write(ts.tokenToString(node.operator)); - } - } - function shouldHoistDeclarationInSystemJsModule(node) { - return isSourceFileLevelDeclarationInSystemJsModule(node, false); - } - /* - * Checks if given node is a source file level declaration (not nested in module/function). - * If 'isExported' is true - then declaration must also be exported. - * This function is used in two cases: - * - check if node is a exported source file level value to determine - * if we should also export the value after its it changed - * - check if node is a source level declaration to emit it differently, - * i.e non-exported variable statement 'var x = 1' is hoisted so - * we we emit variable statement 'var' should be dropped. - */ - function isSourceFileLevelDeclarationInSystemJsModule(node, isExported) { - if (!node || languageVersion >= 2 /* ES6 */ || !isCurrentFileSystemExternalModule()) { - return false; - } - var current = node; - while (current) { - if (current.kind === 230 /* SourceFile */) { - return !isExported || ((ts.getCombinedNodeFlags(node) & 1 /* Export */) !== 0); - } - else if (ts.isFunctionLike(current) || current.kind === 209 /* ModuleBlock */) { - return false; - } - else { - current = current.parent; - } - } - } - function emitBinaryExpression(node) { - if (languageVersion < 2 /* ES6 */ && node.operatorToken.kind === 53 /* EqualsToken */ && - (node.left.kind === 157 /* ObjectLiteralExpression */ || node.left.kind === 156 /* ArrayLiteralExpression */)) { - emitDestructuring(node, node.parent.kind === 185 /* ExpressionStatement */); - } - else { - var exportChanged = node.operatorToken.kind >= 53 /* FirstAssignment */ && - node.operatorToken.kind <= 64 /* LastAssignment */ && - isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.left); - if (exportChanged) { - // emit assignment 'x y' as 'exports("x", x y)' - write(exportFunctionForFile + "(\""); - emitNodeWithoutSourceMap(node.left); - write("\", "); - } - emit(node.left); - var indentedBeforeOperator = indentIfOnDifferentLines(node, node.left, node.operatorToken, node.operatorToken.kind !== 23 /* CommaToken */ ? " " : undefined); - write(ts.tokenToString(node.operatorToken.kind)); - var indentedAfterOperator = indentIfOnDifferentLines(node, node.operatorToken, node.right, " "); - emit(node.right); - decreaseIndentIf(indentedBeforeOperator, indentedAfterOperator); - if (exportChanged) { - write(")"); - } - } - } - function synthesizedNodeStartsOnNewLine(node) { - return ts.nodeIsSynthesized(node) && node.startsOnNewLine; - } - function emitConditionalExpression(node) { - emit(node.condition); - var indentedBeforeQuestion = indentIfOnDifferentLines(node, node.condition, node.questionToken, " "); - write("?"); - var indentedAfterQuestion = indentIfOnDifferentLines(node, node.questionToken, node.whenTrue, " "); - emit(node.whenTrue); - decreaseIndentIf(indentedBeforeQuestion, indentedAfterQuestion); - var indentedBeforeColon = indentIfOnDifferentLines(node, node.whenTrue, node.colonToken, " "); - write(":"); - var indentedAfterColon = indentIfOnDifferentLines(node, node.colonToken, node.whenFalse, " "); - emit(node.whenFalse); - decreaseIndentIf(indentedBeforeColon, indentedAfterColon); - } - // Helper function to decrease the indent if we previously indented. Allows multiple - // previous indent values to be considered at a time. This also allows caller to just - // call this once, passing in all their appropriate indent values, instead of needing - // to call this helper function multiple times. - function decreaseIndentIf(value1, value2) { - if (value1) { - decreaseIndent(); - } - if (value2) { - decreaseIndent(); - } - } - function isSingleLineEmptyBlock(node) { - if (node && node.kind === 182 /* Block */) { - var block = node; - return block.statements.length === 0 && nodeEndIsOnSameLineAsNodeStart(block, block); - } - } - function emitBlock(node) { - if (isSingleLineEmptyBlock(node)) { - emitToken(14 /* OpenBraceToken */, node.pos); - write(" "); - emitToken(15 /* CloseBraceToken */, node.statements.end); - return; - } - emitToken(14 /* OpenBraceToken */, node.pos); - increaseIndent(); - scopeEmitStart(node.parent); - if (node.kind === 209 /* ModuleBlock */) { - ts.Debug.assert(node.parent.kind === 208 /* ModuleDeclaration */); - emitCaptureThisForNodeIfNecessary(node.parent); - } - emitLines(node.statements); - if (node.kind === 209 /* ModuleBlock */) { - emitTempDeclarations(true); - } - decreaseIndent(); - writeLine(); - emitToken(15 /* CloseBraceToken */, node.statements.end); - scopeEmitEnd(); - } - function emitEmbeddedStatement(node) { - if (node.kind === 182 /* Block */) { - write(" "); - emit(node); - } - else { - increaseIndent(); - writeLine(); - emit(node); - decreaseIndent(); - } - } - function emitExpressionStatement(node) { - emitParenthesizedIf(node.expression, node.expression.kind === 166 /* ArrowFunction */); - write(";"); - } - function emitIfStatement(node) { - var endPos = emitToken(84 /* IfKeyword */, node.pos); - write(" "); - endPos = emitToken(16 /* OpenParenToken */, endPos); - emit(node.expression); - emitToken(17 /* CloseParenToken */, node.expression.end); - emitEmbeddedStatement(node.thenStatement); - if (node.elseStatement) { - writeLine(); - emitToken(76 /* ElseKeyword */, node.thenStatement.end); - if (node.elseStatement.kind === 186 /* IfStatement */) { - write(" "); - emit(node.elseStatement); - } - else { - emitEmbeddedStatement(node.elseStatement); - } - } - } - function emitDoStatement(node) { - write("do"); - emitEmbeddedStatement(node.statement); - if (node.statement.kind === 182 /* Block */) { - write(" "); - } - else { - writeLine(); - } - write("while ("); - emit(node.expression); - write(");"); - } - function emitWhileStatement(node) { - write("while ("); - emit(node.expression); - write(")"); - emitEmbeddedStatement(node.statement); - } - /** - * Returns true if start of variable declaration list was emitted. - * Returns false if nothing was written - this can happen for source file level variable declarations - * in system modules where such variable declarations are hoisted. - */ - function tryEmitStartOfVariableDeclarationList(decl, startPos) { - if (shouldHoistVariable(decl, true)) { - // variables in variable declaration list were already hoisted - return false; - } - var tokenKind = 98 /* VarKeyword */; - if (decl && languageVersion >= 2 /* ES6 */) { - if (ts.isLet(decl)) { - tokenKind = 104 /* LetKeyword */; - } - else if (ts.isConst(decl)) { - tokenKind = 70 /* ConstKeyword */; - } - } - if (startPos !== undefined) { - emitToken(tokenKind, startPos); - write(" "); - } - else { - switch (tokenKind) { - case 98 /* VarKeyword */: - write("var "); - break; - case 104 /* LetKeyword */: - write("let "); - break; - case 70 /* ConstKeyword */: - write("const "); - break; - } - } - return true; - } - function emitVariableDeclarationListSkippingUninitializedEntries(list) { - var started = false; - for (var _a = 0, _b = list.declarations; _a < _b.length; _a++) { - var decl = _b[_a]; - if (!decl.initializer) { - continue; - } - if (!started) { - started = true; - } - else { - write(", "); - } - emit(decl); - } - return started; - } - function emitForStatement(node) { - var endPos = emitToken(82 /* ForKeyword */, node.pos); - write(" "); - endPos = emitToken(16 /* OpenParenToken */, endPos); - if (node.initializer && node.initializer.kind === 202 /* VariableDeclarationList */) { - var variableDeclarationList = node.initializer; - var startIsEmitted = tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos); - if (startIsEmitted) { - emitCommaList(variableDeclarationList.declarations); - } - else { - emitVariableDeclarationListSkippingUninitializedEntries(variableDeclarationList); - } - } - else if (node.initializer) { - emit(node.initializer); - } - write(";"); - emitOptional(" ", node.condition); - write(";"); - emitOptional(" ", node.incrementor); - write(")"); - emitEmbeddedStatement(node.statement); - } - function emitForInOrForOfStatement(node) { - if (languageVersion < 2 /* ES6 */ && node.kind === 191 /* ForOfStatement */) { - return emitDownLevelForOfStatement(node); - } - var endPos = emitToken(82 /* ForKeyword */, node.pos); - write(" "); - endPos = emitToken(16 /* OpenParenToken */, endPos); - if (node.initializer.kind === 202 /* VariableDeclarationList */) { - var variableDeclarationList = node.initializer; - if (variableDeclarationList.declarations.length >= 1) { - tryEmitStartOfVariableDeclarationList(variableDeclarationList, endPos); - emit(variableDeclarationList.declarations[0]); - } - } - else { - emit(node.initializer); - } - if (node.kind === 190 /* ForInStatement */) { - write(" in "); - } - else { - write(" of "); - } - emit(node.expression); - emitToken(17 /* CloseParenToken */, node.expression.end); - emitEmbeddedStatement(node.statement); - } - function emitDownLevelForOfStatement(node) { - // The following ES6 code: - // - // for (let v of expr) { } - // - // should be emitted as - // - // for (let _i = 0, _a = expr; _i < _a.length; _i++) { - // let v = _a[_i]; - // } - // - // where _a and _i are temps emitted to capture the RHS and the counter, - // respectively. - // When the left hand side is an expression instead of a let declaration, - // the "let v" is not emitted. - // When the left hand side is a let/const, the v is renamed if there is - // another v in scope. - // Note that all assignments to the LHS are emitted in the body, including - // all destructuring. - // Note also that because an extra statement is needed to assign to the LHS, - // for-of bodies are always emitted as blocks. - var endPos = emitToken(82 /* ForKeyword */, node.pos); - write(" "); - endPos = emitToken(16 /* OpenParenToken */, endPos); - // Do not emit the LHS let declaration yet, because it might contain destructuring. - // Do not call recordTempDeclaration because we are declaring the temps - // right here. Recording means they will be declared later. - // In the case where the user wrote an identifier as the RHS, like this: - // - // for (let v of arr) { } - // - // we don't want to emit a temporary variable for the RHS, just use it directly. - var rhsIsIdentifier = node.expression.kind === 65 /* Identifier */; - var counter = createTempVariable(268435456 /* _i */); - var rhsReference = rhsIsIdentifier ? node.expression : createTempVariable(0 /* Auto */); - // This is the let keyword for the counter and rhsReference. The let keyword for - // the LHS will be emitted inside the body. - emitStart(node.expression); - write("var "); - // _i = 0 - emitNodeWithoutSourceMap(counter); - write(" = 0"); - emitEnd(node.expression); - if (!rhsIsIdentifier) { - // , _a = expr - write(", "); - emitStart(node.expression); - emitNodeWithoutSourceMap(rhsReference); - write(" = "); - emitNodeWithoutSourceMap(node.expression); - emitEnd(node.expression); - } - write("; "); - // _i < _a.length; - emitStart(node.initializer); - emitNodeWithoutSourceMap(counter); - write(" < "); - emitNodeWithoutSourceMap(rhsReference); - write(".length"); - emitEnd(node.initializer); - write("; "); - // _i++) - emitStart(node.initializer); - emitNodeWithoutSourceMap(counter); - write("++"); - emitEnd(node.initializer); - emitToken(17 /* CloseParenToken */, node.expression.end); - // Body - write(" {"); - writeLine(); - increaseIndent(); - // Initialize LHS - // let v = _a[_i]; - var rhsIterationValue = createElementAccessExpression(rhsReference, counter); - emitStart(node.initializer); - if (node.initializer.kind === 202 /* VariableDeclarationList */) { - write("var "); - var variableDeclarationList = node.initializer; - if (variableDeclarationList.declarations.length > 0) { - var declaration = variableDeclarationList.declarations[0]; - if (ts.isBindingPattern(declaration.name)) { - // This works whether the declaration is a var, let, or const. - // It will use rhsIterationValue _a[_i] as the initializer. - emitDestructuring(declaration, false, rhsIterationValue); - } - else { - // The following call does not include the initializer, so we have - // to emit it separately. - emitNodeWithoutSourceMap(declaration); - write(" = "); - emitNodeWithoutSourceMap(rhsIterationValue); - } - } - else { - // It's an empty declaration list. This can only happen in an error case, if the user wrote - // for (let of []) {} - emitNodeWithoutSourceMap(createTempVariable(0 /* Auto */)); - write(" = "); - emitNodeWithoutSourceMap(rhsIterationValue); - } - } - else { - // Initializer is an expression. Emit the expression in the body, so that it's - // evaluated on every iteration. - var assignmentExpression = createBinaryExpression(node.initializer, 53 /* EqualsToken */, rhsIterationValue, false); - if (node.initializer.kind === 156 /* ArrayLiteralExpression */ || node.initializer.kind === 157 /* ObjectLiteralExpression */) { - // This is a destructuring pattern, so call emitDestructuring instead of emit. Calling emit will not work, because it will cause - // the BinaryExpression to be passed in instead of the expression statement, which will cause emitDestructuring to crash. - emitDestructuring(assignmentExpression, true, undefined); - } - else { - emitNodeWithoutSourceMap(assignmentExpression); - } - } - emitEnd(node.initializer); - write(";"); - if (node.statement.kind === 182 /* Block */) { - emitLines(node.statement.statements); - } - else { - writeLine(); - emit(node.statement); - } - writeLine(); - decreaseIndent(); - write("}"); - } - function emitBreakOrContinueStatement(node) { - emitToken(node.kind === 193 /* BreakStatement */ ? 66 /* BreakKeyword */ : 71 /* ContinueKeyword */, node.pos); - emitOptional(" ", node.label); - write(";"); - } - function emitReturnStatement(node) { - emitToken(90 /* ReturnKeyword */, node.pos); - emitOptional(" ", node.expression); - write(";"); - } - function emitWithStatement(node) { - write("with ("); - emit(node.expression); - write(")"); - emitEmbeddedStatement(node.statement); - } - function emitSwitchStatement(node) { - var endPos = emitToken(92 /* SwitchKeyword */, node.pos); - write(" "); - emitToken(16 /* OpenParenToken */, endPos); - emit(node.expression); - endPos = emitToken(17 /* CloseParenToken */, node.expression.end); - write(" "); - emitCaseBlock(node.caseBlock, endPos); - } - function emitCaseBlock(node, startPos) { - emitToken(14 /* OpenBraceToken */, startPos); - increaseIndent(); - emitLines(node.clauses); - decreaseIndent(); - writeLine(); - emitToken(15 /* CloseBraceToken */, node.clauses.end); - } - function nodeStartPositionsAreOnSameLine(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node1.pos)) === - ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos)); - } - function nodeEndPositionsAreOnSameLine(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, node1.end) === - ts.getLineOfLocalPosition(currentSourceFile, node2.end); - } - function nodeEndIsOnSameLineAsNodeStart(node1, node2) { - return ts.getLineOfLocalPosition(currentSourceFile, node1.end) === - ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node2.pos)); - } - function emitCaseOrDefaultClause(node) { - if (node.kind === 223 /* CaseClause */) { - write("case "); - emit(node.expression); - write(":"); - } - else { - write("default:"); - } - if (node.statements.length === 1 && nodeStartPositionsAreOnSameLine(node, node.statements[0])) { - write(" "); - emit(node.statements[0]); - } - else { - increaseIndent(); - emitLines(node.statements); - decreaseIndent(); - } - } - function emitThrowStatement(node) { - write("throw "); - emit(node.expression); - write(";"); - } - function emitTryStatement(node) { - write("try "); - emit(node.tryBlock); - emit(node.catchClause); - if (node.finallyBlock) { - writeLine(); - write("finally "); - emit(node.finallyBlock); - } - } - function emitCatchClause(node) { - writeLine(); - var endPos = emitToken(68 /* CatchKeyword */, node.pos); - write(" "); - emitToken(16 /* OpenParenToken */, endPos); - emit(node.variableDeclaration); - emitToken(17 /* CloseParenToken */, node.variableDeclaration ? node.variableDeclaration.end : endPos); - write(" "); - emitBlock(node.block); - } - function emitDebuggerStatement(node) { - emitToken(72 /* DebuggerKeyword */, node.pos); - write(";"); - } - function emitLabelledStatement(node) { - emit(node.label); - write(": "); - emit(node.statement); - } - function getContainingModule(node) { - do { - node = node.parent; - } while (node && node.kind !== 208 /* ModuleDeclaration */); - return node; - } - function emitContainingModuleName(node) { - var container = getContainingModule(node); - write(container ? getGeneratedNameForNode(container) : "exports"); - } - function emitModuleMemberName(node) { - emitStart(node.name); - if (ts.getCombinedNodeFlags(node) & 1 /* Export */) { - var container = getContainingModule(node); - if (container) { - write(getGeneratedNameForNode(container)); - write("."); - } - else if (languageVersion < 2 /* ES6 */ && compilerOptions.module !== 4 /* System */) { - write("exports."); - } - } - emitNodeWithoutSourceMap(node.name); - emitEnd(node.name); - } - function createVoidZero() { - var zero = ts.createSynthesizedNode(7 /* NumericLiteral */); - zero.text = "0"; - var result = ts.createSynthesizedNode(169 /* VoidExpression */); - result.expression = zero; - return result; - } - function emitExportMemberAssignment(node) { - if (node.flags & 1 /* Export */) { - writeLine(); - emitStart(node); - // emit call to exporter only for top level nodes - if (compilerOptions.module === 4 /* System */ && node.parent === currentSourceFile) { - // emit export default as - // export("default", ) - write(exportFunctionForFile + "(\""); - if (node.flags & 256 /* Default */) { - write("default"); - } - else { - emitNodeWithoutSourceMap(node.name); - } - write("\", "); - emitDeclarationName(node); - write(")"); - } - else { - if (node.flags & 256 /* Default */) { - if (languageVersion === 0 /* ES3 */) { - write("exports[\"default\"]"); - } - else { - write("exports.default"); - } - } - else { - emitModuleMemberName(node); - } - write(" = "); - emitDeclarationName(node); - } - emitEnd(node); - write(";"); - } - } - function emitExportMemberAssignments(name) { - if (!exportEquals && exportSpecifiers && ts.hasProperty(exportSpecifiers, name.text)) { - for (var _a = 0, _b = exportSpecifiers[name.text]; _a < _b.length; _a++) { - var specifier = _b[_a]; - writeLine(); - if (compilerOptions.module === 4 /* System */) { - emitStart(specifier.name); - write(exportFunctionForFile + "(\""); - emitNodeWithoutSourceMap(specifier.name); - write("\", "); - emitExpressionIdentifier(name); - write(")"); - emitEnd(specifier.name); - } - else { - emitStart(specifier.name); - emitContainingModuleName(specifier); - write("."); - emitNodeWithoutSourceMap(specifier.name); - emitEnd(specifier.name); - write(" = "); - emitExpressionIdentifier(name); - } - write(";"); - } - } - } - function emitDestructuring(root, isAssignmentExpressionStatement, value) { - var emitCount = 0; - // An exported declaration is actually emitted as an assignment (to a property on the module object), so - // temporary variables in an exported declaration need to have real declarations elsewhere - // Also temporary variables should be explicitly allocated for source level declarations when module target is system - // because actual variable declarations are hoisted - var canDefineTempVariablesInPlace = false; - if (root.kind === 201 /* VariableDeclaration */) { - var isExported = ts.getCombinedNodeFlags(root) & 1 /* Export */; - var isSourceLevelForSystemModuleKind = shouldHoistDeclarationInSystemJsModule(root); - canDefineTempVariablesInPlace = !isExported && !isSourceLevelForSystemModuleKind; - } - else if (root.kind === 131 /* Parameter */) { - canDefineTempVariablesInPlace = true; - } - if (root.kind === 172 /* BinaryExpression */) { - emitAssignmentExpression(root); - } - else { - ts.Debug.assert(!isAssignmentExpressionStatement); - emitBindingElement(root, value); - } - function emitAssignment(name, value) { - if (emitCount++) { - write(", "); - } - var isVariableDeclarationOrBindingElement = name.parent && (name.parent.kind === 201 /* VariableDeclaration */ || name.parent.kind === 155 /* BindingElement */); - var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(name); - if (exportChanged) { - write(exportFunctionForFile + "(\""); - emitNodeWithoutSourceMap(name); - write("\", "); - } - if (isVariableDeclarationOrBindingElement) { - emitModuleMemberName(name.parent); - } - else { - emit(name); - } - write(" = "); - emit(value); - if (exportChanged) { - write(")"); - } - } - function ensureIdentifier(expr) { - if (expr.kind !== 65 /* Identifier */) { - var identifier = createTempVariable(0 /* Auto */); - if (!canDefineTempVariablesInPlace) { - recordTempDeclaration(identifier); - } - emitAssignment(identifier, expr); - expr = identifier; - } - return expr; - } - function createDefaultValueCheck(value, defaultValue) { - // The value expression will be evaluated twice, so for anything but a simple identifier - // we need to generate a temporary variable - value = ensureIdentifier(value); - // Return the expression 'value === void 0 ? defaultValue : value' - var equals = ts.createSynthesizedNode(172 /* BinaryExpression */); - equals.left = value; - equals.operatorToken = ts.createSynthesizedNode(30 /* EqualsEqualsEqualsToken */); - equals.right = createVoidZero(); - return createConditionalExpression(equals, defaultValue, value); - } - function createConditionalExpression(condition, whenTrue, whenFalse) { - var cond = ts.createSynthesizedNode(173 /* ConditionalExpression */); - cond.condition = condition; - cond.questionToken = ts.createSynthesizedNode(50 /* QuestionToken */); - cond.whenTrue = whenTrue; - cond.colonToken = ts.createSynthesizedNode(51 /* ColonToken */); - cond.whenFalse = whenFalse; - return cond; - } - function createNumericLiteral(value) { - var node = ts.createSynthesizedNode(7 /* NumericLiteral */); - node.text = "" + value; - return node; - } - function createPropertyAccessForDestructuringProperty(object, propName) { - // We create a synthetic copy of the identifier in order to avoid the rewriting that might - // otherwise occur when the identifier is emitted. - var syntheticName = ts.createSynthesizedNode(propName.kind); - syntheticName.text = propName.text; - if (syntheticName.kind !== 65 /* Identifier */) { - return createElementAccessExpression(object, syntheticName); - } - return createPropertyAccessExpression(object, syntheticName); - } - function createSliceCall(value, sliceIndex) { - var call = ts.createSynthesizedNode(160 /* CallExpression */); - var sliceIdentifier = ts.createSynthesizedNode(65 /* Identifier */); - sliceIdentifier.text = "slice"; - call.expression = createPropertyAccessExpression(value, sliceIdentifier); - call.arguments = ts.createSynthesizedNodeArray(); - call.arguments[0] = createNumericLiteral(sliceIndex); - return call; - } - function emitObjectLiteralAssignment(target, value) { - var properties = target.properties; - if (properties.length !== 1) { - // For anything but a single element destructuring we need to generate a temporary - // to ensure value is evaluated exactly once. - value = ensureIdentifier(value); - } - for (var _a = 0; _a < properties.length; _a++) { - var p = properties[_a]; - if (p.kind === 227 /* PropertyAssignment */ || p.kind === 228 /* ShorthandPropertyAssignment */) { - var propName = p.name; - emitDestructuringAssignment(p.initializer || propName, createPropertyAccessForDestructuringProperty(value, propName)); - } - } - } - function emitArrayLiteralAssignment(target, value) { - var elements = target.elements; - if (elements.length !== 1) { - // For anything but a single element destructuring we need to generate a temporary - // to ensure value is evaluated exactly once. - value = ensureIdentifier(value); - } - for (var i = 0; i < elements.length; i++) { - var e = elements[i]; - if (e.kind !== 178 /* OmittedExpression */) { - if (e.kind !== 176 /* SpreadElementExpression */) { - emitDestructuringAssignment(e, createElementAccessExpression(value, createNumericLiteral(i))); - } - else if (i === elements.length - 1) { - emitDestructuringAssignment(e.expression, createSliceCall(value, i)); - } - } - } - } - function emitDestructuringAssignment(target, value) { - if (target.kind === 172 /* BinaryExpression */ && target.operatorToken.kind === 53 /* EqualsToken */) { - value = createDefaultValueCheck(value, target.right); - target = target.left; - } - if (target.kind === 157 /* ObjectLiteralExpression */) { - emitObjectLiteralAssignment(target, value); - } - else if (target.kind === 156 /* ArrayLiteralExpression */) { - emitArrayLiteralAssignment(target, value); - } - else { - emitAssignment(target, value); - } - } - function emitAssignmentExpression(root) { - var target = root.left; - var value = root.right; - if (isAssignmentExpressionStatement) { - emitDestructuringAssignment(target, value); - } - else { - if (root.parent.kind !== 164 /* ParenthesizedExpression */) { - write("("); - } - value = ensureIdentifier(value); - emitDestructuringAssignment(target, value); - write(", "); - emit(value); - if (root.parent.kind !== 164 /* ParenthesizedExpression */) { - write(")"); - } - } - } - function emitBindingElement(target, value) { - if (target.initializer) { - // Combine value and initializer - value = value ? createDefaultValueCheck(value, target.initializer) : target.initializer; - } - else if (!value) { - // Use 'void 0' in absence of value and initializer - value = createVoidZero(); - } - if (ts.isBindingPattern(target.name)) { - var pattern = target.name; - var elements = pattern.elements; - if (elements.length !== 1) { - // For anything but a single element destructuring we need to generate a temporary - // to ensure value is evaluated exactly once. - value = ensureIdentifier(value); - } - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - if (pattern.kind === 153 /* ObjectBindingPattern */) { - // Rewrite element to a declaration with an initializer that fetches property - var propName = element.propertyName || element.name; - emitBindingElement(element, createPropertyAccessForDestructuringProperty(value, propName)); - } - else if (element.kind !== 178 /* OmittedExpression */) { - if (!element.dotDotDotToken) { - // Rewrite element to a declaration that accesses array element at index i - emitBindingElement(element, createElementAccessExpression(value, createNumericLiteral(i))); - } - else if (i === elements.length - 1) { - emitBindingElement(element, createSliceCall(value, i)); - } - } - } - } - else { - emitAssignment(target.name, value); - } - } - } - function emitVariableDeclaration(node) { - if (ts.isBindingPattern(node.name)) { - if (languageVersion < 2 /* ES6 */) { - emitDestructuring(node, false); - } - else { - emit(node.name); - emitOptional(" = ", node.initializer); - } - } - else { - var initializer = node.initializer; - if (!initializer && languageVersion < 2 /* ES6 */) { - // downlevel emit for non-initialized let bindings defined in loops - // for (...) { let x; } - // should be - // for (...) { var = void 0; } - // this is necessary to preserve ES6 semantic in scenarios like - // for (...) { let x; console.log(x); x = 1 } // assignment on one iteration should not affect other iterations - var isUninitializedLet = (resolver.getNodeCheckFlags(node) & 256 /* BlockScopedBindingInLoop */) && - (getCombinedFlagsForIdentifier(node.name) & 4096 /* Let */); - // NOTE: default initialization should not be added to let bindings in for-in\for-of statements - if (isUninitializedLet && - node.parent.parent.kind !== 190 /* ForInStatement */ && - node.parent.parent.kind !== 191 /* ForOfStatement */) { - initializer = createVoidZero(); - } - } - var exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.name); - if (exportChanged) { - write(exportFunctionForFile + "(\""); - emitNodeWithoutSourceMap(node.name); - write("\", "); - } - emitModuleMemberName(node); - emitOptional(" = ", initializer); - if (exportChanged) { - write(")"); - } - } - } - function emitExportVariableAssignments(node) { - if (node.kind === 178 /* OmittedExpression */) { - return; - } - var name = node.name; - if (name.kind === 65 /* Identifier */) { - emitExportMemberAssignments(name); - } - else if (ts.isBindingPattern(name)) { - ts.forEach(name.elements, emitExportVariableAssignments); - } - } - function getCombinedFlagsForIdentifier(node) { - if (!node.parent || (node.parent.kind !== 201 /* VariableDeclaration */ && node.parent.kind !== 155 /* BindingElement */)) { - return 0; - } - return ts.getCombinedNodeFlags(node.parent); - } - function isES6ExportedDeclaration(node) { - return !!(node.flags & 1 /* Export */) && - languageVersion >= 2 /* ES6 */ && - node.parent.kind === 230 /* SourceFile */; - } - function emitVariableStatement(node) { - var startIsEmitted = false; - if (node.flags & 1 /* Export */) { - if (isES6ExportedDeclaration(node)) { - // Exported ES6 module member - write("export "); - startIsEmitted = tryEmitStartOfVariableDeclarationList(node.declarationList); - } - } - else { - startIsEmitted = tryEmitStartOfVariableDeclarationList(node.declarationList); - } - if (startIsEmitted) { - emitCommaList(node.declarationList.declarations); - write(";"); - } - else { - var atLeastOneItem = emitVariableDeclarationListSkippingUninitializedEntries(node.declarationList); - if (atLeastOneItem) { - write(";"); - } - } - if (languageVersion < 2 /* ES6 */ && node.parent === currentSourceFile) { - ts.forEach(node.declarationList.declarations, emitExportVariableAssignments); - } - } - function shouldEmitLeadingAndTrailingCommentsForVariableStatement(node) { - // If we're not exporting the variables, there's nothing special here. - // Always emit comments for these nodes. - if (!(node.flags & 1 /* Export */)) { - return true; - } - // If we are exporting, but it's a top-level ES6 module exports, - // we'll emit the declaration list verbatim, so emit comments too. - if (isES6ExportedDeclaration(node)) { - return true; - } - // Otherwise, only emit if we have at least one initializer present. - for (var _a = 0, _b = node.declarationList.declarations; _a < _b.length; _a++) { - var declaration = _b[_a]; - if (declaration.initializer) { - return true; - } - } - return false; - } - function emitParameter(node) { - if (languageVersion < 2 /* ES6 */) { - if (ts.isBindingPattern(node.name)) { - var name_23 = createTempVariable(0 /* Auto */); - if (!tempParameters) { - tempParameters = []; - } - tempParameters.push(name_23); - emit(name_23); - } - else { - emit(node.name); - } - } - else { - if (node.dotDotDotToken) { - write("..."); - } - emit(node.name); - emitOptional(" = ", node.initializer); - } - } - function emitDefaultValueAssignments(node) { - if (languageVersion < 2 /* ES6 */) { - var tempIndex = 0; - ts.forEach(node.parameters, function (p) { - // A rest parameter cannot have a binding pattern or an initializer, - // so let's just ignore it. - if (p.dotDotDotToken) { - return; - } - if (ts.isBindingPattern(p.name)) { - writeLine(); - write("var "); - emitDestructuring(p, false, tempParameters[tempIndex]); - write(";"); - tempIndex++; - } - else if (p.initializer) { - writeLine(); - emitStart(p); - write("if ("); - emitNodeWithoutSourceMap(p.name); - write(" === void 0)"); - emitEnd(p); - write(" { "); - emitStart(p); - emitNodeWithoutSourceMap(p.name); - write(" = "); - emitNodeWithoutSourceMap(p.initializer); - emitEnd(p); - write("; }"); - } - }); - } - } - function emitRestParameter(node) { - if (languageVersion < 2 /* ES6 */ && ts.hasRestParameter(node)) { - var restIndex = node.parameters.length - 1; - var restParam = node.parameters[restIndex]; - // A rest parameter cannot have a binding pattern, so let's just ignore it if it does. - if (ts.isBindingPattern(restParam.name)) { - return; - } - var tempName = createTempVariable(268435456 /* _i */).text; - writeLine(); - emitLeadingComments(restParam); - emitStart(restParam); - write("var "); - emitNodeWithoutSourceMap(restParam.name); - write(" = [];"); - emitEnd(restParam); - emitTrailingComments(restParam); - writeLine(); - write("for ("); - emitStart(restParam); - write("var " + tempName + " = " + restIndex + ";"); - emitEnd(restParam); - write(" "); - emitStart(restParam); - write(tempName + " < arguments.length;"); - emitEnd(restParam); - write(" "); - emitStart(restParam); - write(tempName + "++"); - emitEnd(restParam); - write(") {"); - increaseIndent(); - writeLine(); - emitStart(restParam); - emitNodeWithoutSourceMap(restParam.name); - write("[" + tempName + " - " + restIndex + "] = arguments[" + tempName + "];"); - emitEnd(restParam); - decreaseIndent(); - writeLine(); - write("}"); - } - } - function emitAccessor(node) { - write(node.kind === 138 /* GetAccessor */ ? "get " : "set "); - emit(node.name); - emitSignatureAndBody(node); - } - function shouldEmitAsArrowFunction(node) { - return node.kind === 166 /* ArrowFunction */ && languageVersion >= 2 /* ES6 */; - } - function emitDeclarationName(node) { - if (node.name) { - emitNodeWithoutSourceMap(node.name); - } - else { - write(getGeneratedNameForNode(node)); - } - } - function shouldEmitFunctionName(node) { - if (node.kind === 165 /* FunctionExpression */) { - // Emit name if one is present - return !!node.name; - } - if (node.kind === 203 /* FunctionDeclaration */) { - // Emit name if one is present, or emit generated name in down-level case (for export default case) - return !!node.name || languageVersion < 2 /* ES6 */; - } - } - function emitFunctionDeclaration(node) { - if (ts.nodeIsMissing(node.body)) { - return emitOnlyPinnedOrTripleSlashComments(node); - } - if (node.kind !== 136 /* MethodDeclaration */ && node.kind !== 135 /* MethodSignature */) { - // Methods will emit the comments as part of emitting method declaration - emitLeadingComments(node); - } - // For targeting below es6, emit functions-like declaration including arrow function using function keyword. - // When targeting ES6, emit arrow function natively in ES6 by omitting function keyword and using fat arrow instead - if (!shouldEmitAsArrowFunction(node)) { - if (isES6ExportedDeclaration(node)) { - write("export "); - if (node.flags & 256 /* Default */) { - write("default "); - } - } - write("function"); - if (languageVersion >= 2 /* ES6 */ && node.asteriskToken) { - write("*"); - } - write(" "); - } - if (shouldEmitFunctionName(node)) { - emitDeclarationName(node); - } - emitSignatureAndBody(node); - if (languageVersion < 2 /* ES6 */ && node.kind === 203 /* FunctionDeclaration */ && node.parent === currentSourceFile && node.name) { - emitExportMemberAssignments(node.name); - } - if (node.kind !== 136 /* MethodDeclaration */ && node.kind !== 135 /* MethodSignature */) { - emitTrailingComments(node); - } - } - function emitCaptureThisForNodeIfNecessary(node) { - if (resolver.getNodeCheckFlags(node) & 4 /* CaptureThis */) { - writeLine(); - emitStart(node); - write("var _this = this;"); - emitEnd(node); - } - } - function emitSignatureParameters(node) { - increaseIndent(); - write("("); - if (node) { - var parameters = node.parameters; - var omitCount = languageVersion < 2 /* ES6 */ && ts.hasRestParameter(node) ? 1 : 0; - emitList(parameters, 0, parameters.length - omitCount, false, false); - } - write(")"); - decreaseIndent(); - } - function emitSignatureParametersForArrow(node) { - // Check whether the parameter list needs parentheses and preserve no-parenthesis - if (node.parameters.length === 1 && node.pos === node.parameters[0].pos) { - emit(node.parameters[0]); - return; - } - emitSignatureParameters(node); - } - function emitSignatureAndBody(node) { - var saveTempFlags = tempFlags; - var saveTempVariables = tempVariables; - var saveTempParameters = tempParameters; - tempFlags = 0; - tempVariables = undefined; - tempParameters = undefined; - // When targeting ES6, emit arrow function natively in ES6 - if (shouldEmitAsArrowFunction(node)) { - emitSignatureParametersForArrow(node); - write(" =>"); - } - else { - emitSignatureParameters(node); - } - if (!node.body) { - // There can be no body when there are parse errors. Just emit an empty block - // in that case. - write(" { }"); - } - else if (node.body.kind === 182 /* Block */) { - emitBlockFunctionBody(node, node.body); - } - else { - emitExpressionFunctionBody(node, node.body); - } - if (!isES6ExportedDeclaration(node)) { - emitExportMemberAssignment(node); - } - tempFlags = saveTempFlags; - tempVariables = saveTempVariables; - tempParameters = saveTempParameters; - } - // Returns true if any preamble code was emitted. - function emitFunctionBodyPreamble(node) { - emitCaptureThisForNodeIfNecessary(node); - emitDefaultValueAssignments(node); - emitRestParameter(node); - } - function emitExpressionFunctionBody(node, body) { - if (languageVersion < 2 /* ES6 */) { - emitDownLevelExpressionFunctionBody(node, body); - return; - } - // For es6 and higher we can emit the expression as is. However, in the case - // where the expression might end up looking like a block when emitted, we'll - // also wrap it in parentheses first. For example if you have: a => {} - // then we need to generate: a => ({}) - write(" "); - // Unwrap all type assertions. - var current = body; - while (current.kind === 163 /* TypeAssertionExpression */) { - current = current.expression; - } - emitParenthesizedIf(body, current.kind === 157 /* ObjectLiteralExpression */); - } - function emitDownLevelExpressionFunctionBody(node, body) { - write(" {"); - scopeEmitStart(node); - increaseIndent(); - var outPos = writer.getTextPos(); - emitDetachedComments(node.body); - emitFunctionBodyPreamble(node); - var preambleEmitted = writer.getTextPos() !== outPos; - decreaseIndent(); - // If we didn't have to emit any preamble code, then attempt to keep the arrow - // function on one line. - if (!preambleEmitted && nodeStartPositionsAreOnSameLine(node, body)) { - write(" "); - emitStart(body); - write("return "); - emit(body); - emitEnd(body); - write(";"); - emitTempDeclarations(false); - write(" "); - } - else { - increaseIndent(); - writeLine(); - emitLeadingComments(node.body); - write("return "); - emit(body); - write(";"); - emitTrailingComments(node.body); - emitTempDeclarations(true); - decreaseIndent(); - writeLine(); - } - emitStart(node.body); - write("}"); - emitEnd(node.body); - scopeEmitEnd(); - } - function emitBlockFunctionBody(node, body) { - write(" {"); - scopeEmitStart(node); - var initialTextPos = writer.getTextPos(); - increaseIndent(); - emitDetachedComments(body.statements); - // Emit all the directive prologues (like "use strict"). These have to come before - // any other preamble code we write (like parameter initializers). - var startIndex = emitDirectivePrologues(body.statements, true); - emitFunctionBodyPreamble(node); - decreaseIndent(); - var preambleEmitted = writer.getTextPos() !== initialTextPos; - if (!preambleEmitted && nodeEndIsOnSameLineAsNodeStart(body, body)) { - for (var _a = 0, _b = body.statements; _a < _b.length; _a++) { - var statement = _b[_a]; - write(" "); - emit(statement); - } - emitTempDeclarations(false); - write(" "); - emitLeadingCommentsOfPosition(body.statements.end); - } - else { - increaseIndent(); - emitLinesStartingAt(body.statements, startIndex); - emitTempDeclarations(true); - writeLine(); - emitLeadingCommentsOfPosition(body.statements.end); - decreaseIndent(); - } - emitToken(15 /* CloseBraceToken */, body.statements.end); - scopeEmitEnd(); - } - function findInitialSuperCall(ctor) { - if (ctor.body) { - var statement = ctor.body.statements[0]; - if (statement && statement.kind === 185 /* ExpressionStatement */) { - var expr = statement.expression; - if (expr && expr.kind === 160 /* CallExpression */) { - var func = expr.expression; - if (func && func.kind === 91 /* SuperKeyword */) { - return statement; - } - } - } - } - } - function emitParameterPropertyAssignments(node) { - ts.forEach(node.parameters, function (param) { - if (param.flags & 112 /* AccessibilityModifier */) { - writeLine(); - emitStart(param); - emitStart(param.name); - write("this."); - emitNodeWithoutSourceMap(param.name); - emitEnd(param.name); - write(" = "); - emit(param.name); - write(";"); - emitEnd(param); - } - }); - } - function emitMemberAccessForPropertyName(memberName) { - // TODO: (jfreeman,drosen): comment on why this is emitNodeWithoutSourceMap instead of emit here. - if (memberName.kind === 8 /* StringLiteral */ || memberName.kind === 7 /* NumericLiteral */) { - write("["); - emitNodeWithoutSourceMap(memberName); - write("]"); - } - else if (memberName.kind === 129 /* ComputedPropertyName */) { - emitComputedPropertyName(memberName); - } - else { - write("."); - emitNodeWithoutSourceMap(memberName); - } - } - function getInitializedProperties(node, isStatic) { - var properties = []; - for (var _a = 0, _b = node.members; _a < _b.length; _a++) { - var member = _b[_a]; - if (member.kind === 134 /* PropertyDeclaration */ && isStatic === ((member.flags & 128 /* Static */) !== 0) && member.initializer) { - properties.push(member); - } - } - return properties; - } - function emitPropertyDeclarations(node, properties) { - for (var _a = 0; _a < properties.length; _a++) { - var property = properties[_a]; - emitPropertyDeclaration(node, property); - } - } - function emitPropertyDeclaration(node, property, receiver, isExpression) { - writeLine(); - emitLeadingComments(property); - emitStart(property); - emitStart(property.name); - if (receiver) { - emit(receiver); - } - else { - if (property.flags & 128 /* Static */) { - emitDeclarationName(node); - } - else { - write("this"); - } - } - emitMemberAccessForPropertyName(property.name); - emitEnd(property.name); - write(" = "); - emit(property.initializer); - if (!isExpression) { - write(";"); - } - emitEnd(property); - emitTrailingComments(property); - } - function emitMemberFunctionsForES5AndLower(node) { - ts.forEach(node.members, function (member) { - if (member.kind === 181 /* SemicolonClassElement */) { - writeLine(); - write(";"); - } - else if (member.kind === 136 /* MethodDeclaration */ || node.kind === 135 /* MethodSignature */) { - if (!member.body) { - return emitOnlyPinnedOrTripleSlashComments(member); - } - writeLine(); - emitLeadingComments(member); - emitStart(member); - emitStart(member.name); - emitClassMemberPrefix(node, member); - emitMemberAccessForPropertyName(member.name); - emitEnd(member.name); - write(" = "); - emitStart(member); - emitFunctionDeclaration(member); - emitEnd(member); - emitEnd(member); - write(";"); - emitTrailingComments(member); - } - else if (member.kind === 138 /* GetAccessor */ || member.kind === 139 /* SetAccessor */) { - var accessors = ts.getAllAccessorDeclarations(node.members, member); - if (member === accessors.firstAccessor) { - writeLine(); - emitStart(member); - write("Object.defineProperty("); - emitStart(member.name); - emitClassMemberPrefix(node, member); - write(", "); - emitExpressionForPropertyName(member.name); - emitEnd(member.name); - write(", {"); - increaseIndent(); - if (accessors.getAccessor) { - writeLine(); - emitLeadingComments(accessors.getAccessor); - write("get: "); - emitStart(accessors.getAccessor); - write("function "); - emitSignatureAndBody(accessors.getAccessor); - emitEnd(accessors.getAccessor); - emitTrailingComments(accessors.getAccessor); - write(","); - } - if (accessors.setAccessor) { - writeLine(); - emitLeadingComments(accessors.setAccessor); - write("set: "); - emitStart(accessors.setAccessor); - write("function "); - emitSignatureAndBody(accessors.setAccessor); - emitEnd(accessors.setAccessor); - emitTrailingComments(accessors.setAccessor); - write(","); - } - writeLine(); - write("enumerable: true,"); - writeLine(); - write("configurable: true"); - decreaseIndent(); - writeLine(); - write("});"); - emitEnd(member); - } - } - }); - } - function emitMemberFunctionsForES6AndHigher(node) { - for (var _a = 0, _b = node.members; _a < _b.length; _a++) { - var member = _b[_a]; - if ((member.kind === 136 /* MethodDeclaration */ || node.kind === 135 /* MethodSignature */) && !member.body) { - emitOnlyPinnedOrTripleSlashComments(member); - } - else if (member.kind === 136 /* MethodDeclaration */ || - member.kind === 138 /* GetAccessor */ || - member.kind === 139 /* SetAccessor */) { - writeLine(); - emitLeadingComments(member); - emitStart(member); - if (member.flags & 128 /* Static */) { - write("static "); - } - if (member.kind === 138 /* GetAccessor */) { - write("get "); - } - else if (member.kind === 139 /* SetAccessor */) { - write("set "); - } - if (member.asteriskToken) { - write("*"); - } - emit(member.name); - emitSignatureAndBody(member); - emitEnd(member); - emitTrailingComments(member); - } - else if (member.kind === 181 /* SemicolonClassElement */) { - writeLine(); - write(";"); - } - } - } - function emitConstructor(node, baseTypeElement) { - var saveTempFlags = tempFlags; - var saveTempVariables = tempVariables; - var saveTempParameters = tempParameters; - tempFlags = 0; - tempVariables = undefined; - tempParameters = undefined; - emitConstructorWorker(node, baseTypeElement); - tempFlags = saveTempFlags; - tempVariables = saveTempVariables; - tempParameters = saveTempParameters; - } - function emitConstructorWorker(node, baseTypeElement) { - // Check if we have property assignment inside class declaration. - // If there is property assignment, we need to emit constructor whether users define it or not - // If there is no property assignment, we can omit constructor if users do not define it - var hasInstancePropertyWithInitializer = false; - // Emit the constructor overload pinned comments - ts.forEach(node.members, function (member) { - if (member.kind === 137 /* Constructor */ && !member.body) { - emitOnlyPinnedOrTripleSlashComments(member); - } - // Check if there is any non-static property assignment - if (member.kind === 134 /* PropertyDeclaration */ && member.initializer && (member.flags & 128 /* Static */) === 0) { - hasInstancePropertyWithInitializer = true; - } - }); - var ctor = ts.getFirstConstructorWithBody(node); - // For target ES6 and above, if there is no user-defined constructor and there is no property assignment - // do not emit constructor in class declaration. - if (languageVersion >= 2 /* ES6 */ && !ctor && !hasInstancePropertyWithInitializer) { - return; - } - if (ctor) { - emitLeadingComments(ctor); - } - emitStart(ctor || node); - if (languageVersion < 2 /* ES6 */) { - write("function "); - emitDeclarationName(node); - emitSignatureParameters(ctor); - } - else { - write("constructor"); - if (ctor) { - emitSignatureParameters(ctor); - } - else { - // Based on EcmaScript6 section 14.5.14: Runtime Semantics: ClassDefinitionEvaluation. - // If constructor is empty, then, - // If ClassHeritageopt is present, then - // Let constructor be the result of parsing the String "constructor(... args){ super (...args);}" using the syntactic grammar with the goal symbol MethodDefinition. - // Else, - // Let constructor be the result of parsing the String "constructor( ){ }" using the syntactic grammar with the goal symbol MethodDefinition - if (baseTypeElement) { - write("(...args)"); - } - else { - write("()"); - } - } - } - write(" {"); - scopeEmitStart(node, "constructor"); - increaseIndent(); - if (ctor) { - emitDetachedComments(ctor.body.statements); - } - emitCaptureThisForNodeIfNecessary(node); - if (ctor) { - emitDefaultValueAssignments(ctor); - emitRestParameter(ctor); - if (baseTypeElement) { - var superCall = findInitialSuperCall(ctor); - if (superCall) { - writeLine(); - emit(superCall); - } - } - emitParameterPropertyAssignments(ctor); - } - else { - if (baseTypeElement) { - writeLine(); - emitStart(baseTypeElement); - if (languageVersion < 2 /* ES6 */) { - write("_super.apply(this, arguments);"); - } - else { - write("super(...args);"); - } - emitEnd(baseTypeElement); - } - } - emitPropertyDeclarations(node, getInitializedProperties(node, false)); - if (ctor) { - var statements = ctor.body.statements; - if (superCall) { - statements = statements.slice(1); - } - emitLines(statements); - } - emitTempDeclarations(true); - writeLine(); - if (ctor) { - emitLeadingCommentsOfPosition(ctor.body.statements.end); - } - decreaseIndent(); - emitToken(15 /* CloseBraceToken */, ctor ? ctor.body.statements.end : node.members.end); - scopeEmitEnd(); - emitEnd(ctor || node); - if (ctor) { - emitTrailingComments(ctor); - } - } - function emitClassExpression(node) { - return emitClassLikeDeclaration(node); - } - function emitClassDeclaration(node) { - return emitClassLikeDeclaration(node); - } - function emitClassLikeDeclaration(node) { - if (languageVersion < 2 /* ES6 */) { - emitClassLikeDeclarationBelowES6(node); - } - else { - emitClassLikeDeclarationForES6AndHigher(node); - } - } - function emitClassLikeDeclarationForES6AndHigher(node) { - var thisNodeIsDecorated = ts.nodeIsDecorated(node); - if (node.kind === 204 /* ClassDeclaration */) { - if (thisNodeIsDecorated) { - // To preserve the correct runtime semantics when decorators are applied to the class, - // the emit needs to follow one of the following rules: - // - // * For a local class declaration: - // - // @dec class C { - // } - // - // The emit should be: - // - // let C = class { - // }; - // Object.defineProperty(C, "name", { value: "C", configurable: true }); - // C = __decorate([dec], C); - // - // * For an exported class declaration: - // - // @dec export class C { - // } - // - // The emit should be: - // - // export let C = class { - // }; - // Object.defineProperty(C, "name", { value: "C", configurable: true }); - // C = __decorate([dec], C); - // - // * For a default export of a class declaration with a name: - // - // @dec default export class C { - // } - // - // The emit should be: - // - // let C = class { - // } - // Object.defineProperty(C, "name", { value: "C", configurable: true }); - // C = __decorate([dec], C); - // export default C; - // - // * For a default export of a class declaration without a name: - // - // @dec default export class { - // } - // - // The emit should be: - // - // let _default = class { - // } - // _default = __decorate([dec], _default); - // export default _default; - // - if (isES6ExportedDeclaration(node) && !(node.flags & 256 /* Default */)) { - write("export "); - } - write("let "); - emitDeclarationName(node); - write(" = "); - } - else if (isES6ExportedDeclaration(node)) { - write("export "); - if (node.flags & 256 /* Default */) { - write("default "); - } - } - } - // If the class has static properties, and it's a class expression, then we'll need - // to specialize the emit a bit. for a class expression of the form: - // - // class C { static a = 1; static b = 2; ... } - // - // We'll emit: - // - // (_temp = class C { ... }, _temp.a = 1, _temp.b = 2, _temp) - // - // This keeps the expression as an expression, while ensuring that the static parts - // of it have been initialized by the time it is used. - var staticProperties = getInitializedProperties(node, true); - var isClassExpressionWithStaticProperties = staticProperties.length > 0 && node.kind === 177 /* ClassExpression */; - var tempVariable; - if (isClassExpressionWithStaticProperties) { - tempVariable = createAndRecordTempVariable(0 /* Auto */); - write("("); - increaseIndent(); - emit(tempVariable); - write(" = "); - } - write("class"); - // check if this is an "export default class" as it may not have a name. Do not emit the name if the class is decorated. - if ((node.name || !(node.flags & 256 /* Default */)) && !thisNodeIsDecorated) { - write(" "); - emitDeclarationName(node); - } - var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node); - if (baseTypeNode) { - write(" extends "); - emit(baseTypeNode.expression); - } - write(" {"); - increaseIndent(); - scopeEmitStart(node); - writeLine(); - emitConstructor(node, baseTypeNode); - emitMemberFunctionsForES6AndHigher(node); - decreaseIndent(); - writeLine(); - emitToken(15 /* CloseBraceToken */, node.members.end); - scopeEmitEnd(); - // TODO(rbuckton): Need to go back to `let _a = class C {}` approach, removing the defineProperty call for now. - // For a decorated class, we need to assign its name (if it has one). This is because we emit - // the class as a class expression to avoid the double-binding of the identifier: - // - // let C = class { - // } - // Object.defineProperty(C, "name", { value: "C", configurable: true }); - // - if (thisNodeIsDecorated) { - write(";"); - } - // Emit static property assignment. Because classDeclaration is lexically evaluated, - // it is safe to emit static property assignment after classDeclaration - // From ES6 specification: - // HasLexicalDeclaration (N) : Determines if the argument identifier has a binding in this environment record that was created using - // a lexical declaration such as a LexicalDeclaration or a ClassDeclaration. - if (isClassExpressionWithStaticProperties) { - for (var _a = 0; _a < staticProperties.length; _a++) { - var property = staticProperties[_a]; - write(","); - writeLine(); - emitPropertyDeclaration(node, property, tempVariable, true); - } - write(","); - writeLine(); - emit(tempVariable); - decreaseIndent(); - write(")"); - } - else { - writeLine(); - emitPropertyDeclarations(node, staticProperties); - emitDecoratorsOfClass(node); - } - // If this is an exported class, but not on the top level (i.e. on an internal - // module), export it - if (!isES6ExportedDeclaration(node) && (node.flags & 1 /* Export */)) { - writeLine(); - emitStart(node); - emitModuleMemberName(node); - write(" = "); - emitDeclarationName(node); - emitEnd(node); - write(";"); - } - else if (isES6ExportedDeclaration(node) && (node.flags & 256 /* Default */) && thisNodeIsDecorated) { - // if this is a top level default export of decorated class, write the export after the declaration. - writeLine(); - write("export default "); - emitDeclarationName(node); - write(";"); - } - } - function emitClassLikeDeclarationBelowES6(node) { - if (node.kind === 204 /* ClassDeclaration */) { - // source file level classes in system modules are hoisted so 'var's for them are already defined - if (!shouldHoistDeclarationInSystemJsModule(node)) { - write("var "); - } - emitDeclarationName(node); - write(" = "); - } - write("(function ("); - var baseTypeNode = ts.getClassExtendsHeritageClauseElement(node); - if (baseTypeNode) { - write("_super"); - } - write(") {"); - var saveTempFlags = tempFlags; - var saveTempVariables = tempVariables; - var saveTempParameters = tempParameters; - var saveComputedPropertyNamesToGeneratedNames = computedPropertyNamesToGeneratedNames; - tempFlags = 0; - tempVariables = undefined; - tempParameters = undefined; - computedPropertyNamesToGeneratedNames = undefined; - increaseIndent(); - scopeEmitStart(node); - if (baseTypeNode) { - writeLine(); - emitStart(baseTypeNode); - write("__extends("); - emitDeclarationName(node); - write(", _super);"); - emitEnd(baseTypeNode); - } - writeLine(); - emitConstructor(node, baseTypeNode); - emitMemberFunctionsForES5AndLower(node); - emitPropertyDeclarations(node, getInitializedProperties(node, true)); - writeLine(); - emitDecoratorsOfClass(node); - writeLine(); - emitToken(15 /* CloseBraceToken */, node.members.end, function () { - write("return "); - emitDeclarationName(node); - }); - write(";"); - emitTempDeclarations(true); - tempFlags = saveTempFlags; - tempVariables = saveTempVariables; - tempParameters = saveTempParameters; - computedPropertyNamesToGeneratedNames = saveComputedPropertyNamesToGeneratedNames; - decreaseIndent(); - writeLine(); - emitToken(15 /* CloseBraceToken */, node.members.end); - scopeEmitEnd(); - emitStart(node); - write(")("); - if (baseTypeNode) { - emit(baseTypeNode.expression); - } - write(")"); - if (node.kind === 204 /* ClassDeclaration */) { - write(";"); - } - emitEnd(node); - if (node.kind === 204 /* ClassDeclaration */) { - emitExportMemberAssignment(node); - } - if (languageVersion < 2 /* ES6 */ && node.parent === currentSourceFile && node.name) { - emitExportMemberAssignments(node.name); - } - } - function emitClassMemberPrefix(node, member) { - emitDeclarationName(node); - if (!(member.flags & 128 /* Static */)) { - write(".prototype"); - } - } - function emitDecoratorsOfClass(node) { - emitDecoratorsOfMembers(node, 0); - emitDecoratorsOfMembers(node, 128 /* Static */); - emitDecoratorsOfConstructor(node); - } - function emitDecoratorsOfConstructor(node) { - var decorators = node.decorators; - var constructor = ts.getFirstConstructorWithBody(node); - var hasDecoratedParameters = constructor && ts.forEach(constructor.parameters, ts.nodeIsDecorated); - // skip decoration of the constructor if neither it nor its parameters are decorated - if (!decorators && !hasDecoratedParameters) { - return; - } - // Emit the call to __decorate. Given the class: - // - // @dec - // class C { - // } - // - // The emit for the class is: - // - // C = __decorate([dec], C); - // - writeLine(); - emitStart(node); - emitDeclarationName(node); - write(" = __decorate(["); - increaseIndent(); - writeLine(); - var decoratorCount = decorators ? decorators.length : 0; - var argumentsWritten = emitList(decorators, 0, decoratorCount, true, false, false, true, function (decorator) { - emitStart(decorator); - emit(decorator.expression); - emitEnd(decorator); - }); - argumentsWritten += emitDecoratorsOfParameters(constructor, argumentsWritten > 0); - emitSerializedTypeMetadata(node, argumentsWritten >= 0); - decreaseIndent(); - writeLine(); - write("], "); - emitDeclarationName(node); - write(");"); - emitEnd(node); - writeLine(); - } - function emitDecoratorsOfMembers(node, staticFlag) { - for (var _a = 0, _b = node.members; _a < _b.length; _a++) { - var member = _b[_a]; - // only emit members in the correct group - if ((member.flags & 128 /* Static */) !== staticFlag) { - continue; - } - // skip members that cannot be decorated (such as the constructor) - if (!ts.nodeCanBeDecorated(member)) { - continue; - } - // skip a member if it or any of its parameters are not decorated - if (!ts.nodeOrChildIsDecorated(member)) { - continue; - } - // skip an accessor declaration if it is not the first accessor - var decorators = void 0; - var functionLikeMember = void 0; - if (ts.isAccessor(member)) { - var accessors = ts.getAllAccessorDeclarations(node.members, member); - if (member !== accessors.firstAccessor) { - continue; - } - // get the decorators from the first accessor with decorators - decorators = accessors.firstAccessor.decorators; - if (!decorators && accessors.secondAccessor) { - decorators = accessors.secondAccessor.decorators; - } - // we only decorate parameters of the set accessor - functionLikeMember = accessors.setAccessor; - } - else { - decorators = member.decorators; - // we only decorate the parameters here if this is a method - if (member.kind === 136 /* MethodDeclaration */) { - functionLikeMember = member; - } - } - // Emit the call to __decorate. Given the following: - // - // class C { - // @dec method(@dec2 x) {} - // @dec get accessor() {} - // @dec prop; - // } - // - // The emit for a method is: - // - // Object.defineProperty(C.prototype, "method", - // __decorate([ - // dec, - // __param(0, dec2), - // __metadata("design:type", Function), - // __metadata("design:paramtypes", [Object]), - // __metadata("design:returntype", void 0) - // ], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); - // - // The emit for an accessor is: - // - // Object.defineProperty(C.prototype, "accessor", - // __decorate([ - // dec - // ], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); - // - // The emit for a property is: - // - // __decorate([ - // dec - // ], C.prototype, "prop"); - // - writeLine(); - emitStart(member); - if (member.kind !== 134 /* PropertyDeclaration */) { - write("Object.defineProperty("); - emitStart(member.name); - emitClassMemberPrefix(node, member); - write(", "); - emitExpressionForPropertyName(member.name); - emitEnd(member.name); - write(","); - increaseIndent(); - writeLine(); - } - write("__decorate(["); - increaseIndent(); - writeLine(); - var decoratorCount = decorators ? decorators.length : 0; - var argumentsWritten = emitList(decorators, 0, decoratorCount, true, false, false, true, function (decorator) { - emitStart(decorator); - emit(decorator.expression); - emitEnd(decorator); - }); - argumentsWritten += emitDecoratorsOfParameters(functionLikeMember, argumentsWritten > 0); - emitSerializedTypeMetadata(member, argumentsWritten > 0); - decreaseIndent(); - writeLine(); - write("], "); - emitStart(member.name); - emitClassMemberPrefix(node, member); - write(", "); - emitExpressionForPropertyName(member.name); - emitEnd(member.name); - if (member.kind !== 134 /* PropertyDeclaration */) { - write(", Object.getOwnPropertyDescriptor("); - emitStart(member.name); - emitClassMemberPrefix(node, member); - write(", "); - emitExpressionForPropertyName(member.name); - emitEnd(member.name); - write("))"); - decreaseIndent(); - } - write(");"); - emitEnd(member); - writeLine(); - } - } - function emitDecoratorsOfParameters(node, leadingComma) { - var argumentsWritten = 0; - if (node) { - var parameterIndex = 0; - for (var _a = 0, _b = node.parameters; _a < _b.length; _a++) { - var parameter = _b[_a]; - if (ts.nodeIsDecorated(parameter)) { - var decorators = parameter.decorators; - argumentsWritten += emitList(decorators, 0, decorators.length, true, false, leadingComma, true, function (decorator) { - emitStart(decorator); - write("__param(" + parameterIndex + ", "); - emit(decorator.expression); - write(")"); - emitEnd(decorator); - }); - leadingComma = true; - } - ++parameterIndex; - } - } - return argumentsWritten; - } - function shouldEmitTypeMetadata(node) { - // This method determines whether to emit the "design:type" metadata based on the node's kind. - // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata - // compiler option is set. - switch (node.kind) { - case 136 /* MethodDeclaration */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 134 /* PropertyDeclaration */: - return true; - } - return false; - } - function shouldEmitReturnTypeMetadata(node) { - // This method determines whether to emit the "design:returntype" metadata based on the node's kind. - // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata - // compiler option is set. - switch (node.kind) { - case 136 /* MethodDeclaration */: - return true; - } - return false; - } - function shouldEmitParamTypesMetadata(node) { - // This method determines whether to emit the "design:paramtypes" metadata based on the node's kind. - // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata - // compiler option is set. - switch (node.kind) { - case 204 /* ClassDeclaration */: - case 136 /* MethodDeclaration */: - case 139 /* SetAccessor */: - return true; - } - return false; - } - function emitSerializedTypeMetadata(node, writeComma) { - // This method emits the serialized type metadata for a decorator target. - // The caller should have already tested whether the node has decorators. - var argumentsWritten = 0; - if (compilerOptions.emitDecoratorMetadata) { - if (shouldEmitTypeMetadata(node)) { - var serializedType = resolver.serializeTypeOfNode(node); - if (serializedType) { - if (writeComma) { - write(", "); - } - writeLine(); - write("__metadata('design:type', "); - emitSerializedType(node, serializedType); - write(")"); - argumentsWritten++; - } - } - if (shouldEmitParamTypesMetadata(node)) { - var serializedTypes = resolver.serializeParameterTypesOfNode(node); - if (serializedTypes) { - if (writeComma || argumentsWritten) { - write(", "); - } - writeLine(); - write("__metadata('design:paramtypes', ["); - for (var i = 0; i < serializedTypes.length; ++i) { - if (i > 0) { - write(", "); - } - emitSerializedType(node, serializedTypes[i]); - } - write("])"); - argumentsWritten++; - } - } - if (shouldEmitReturnTypeMetadata(node)) { - var serializedType = resolver.serializeReturnTypeOfNode(node); - if (serializedType) { - if (writeComma || argumentsWritten) { - write(", "); - } - writeLine(); - write("__metadata('design:returntype', "); - emitSerializedType(node, serializedType); - write(")"); - argumentsWritten++; - } - } - } - return argumentsWritten; - } - function serializeTypeNameSegment(location, path, index) { - switch (index) { - case 0: - return "typeof " + path[index] + " !== 'undefined' && " + path[index]; - case 1: - return serializeTypeNameSegment(location, path, index - 1) + "." + path[index]; - default: - var temp = createAndRecordTempVariable(0 /* Auto */).text; - return "(" + temp + " = " + serializeTypeNameSegment(location, path, index - 1) + ") && " + temp + "." + path[index]; - } - } - function emitSerializedType(location, name) { - if (typeof name === "string") { - write(name); - return; - } - else { - ts.Debug.assert(name.length > 0, "Invalid serialized type name"); - write("(" + serializeTypeNameSegment(location, name, name.length - 1) + ") || Object"); - } - } - function emitInterfaceDeclaration(node) { - emitOnlyPinnedOrTripleSlashComments(node); - } - function shouldEmitEnumDeclaration(node) { - var isConstEnum = ts.isConst(node); - return !isConstEnum || compilerOptions.preserveConstEnums || compilerOptions.isolatedModules; - } - function emitEnumDeclaration(node) { - // const enums are completely erased during compilation. - if (!shouldEmitEnumDeclaration(node)) { - return; - } - if (!shouldHoistDeclarationInSystemJsModule(node)) { - // do not emit var if variable was already hoisted - if (!(node.flags & 1 /* Export */) || isES6ExportedDeclaration(node)) { - emitStart(node); - if (isES6ExportedDeclaration(node)) { - write("export "); - } - write("var "); - emit(node.name); - emitEnd(node); - write(";"); - } - } - writeLine(); - emitStart(node); - write("(function ("); - emitStart(node.name); - write(getGeneratedNameForNode(node)); - emitEnd(node.name); - write(") {"); - increaseIndent(); - scopeEmitStart(node); - emitLines(node.members); - decreaseIndent(); - writeLine(); - emitToken(15 /* CloseBraceToken */, node.members.end); - scopeEmitEnd(); - write(")("); - emitModuleMemberName(node); - write(" || ("); - emitModuleMemberName(node); - write(" = {}));"); - emitEnd(node); - if (!isES6ExportedDeclaration(node) && node.flags & 1 /* Export */ && !shouldHoistDeclarationInSystemJsModule(node)) { - // do not emit var if variable was already hoisted - writeLine(); - emitStart(node); - write("var "); - emit(node.name); - write(" = "); - emitModuleMemberName(node); - emitEnd(node); - write(";"); - } - if (languageVersion < 2 /* ES6 */ && node.parent === currentSourceFile) { - if (compilerOptions.module === 4 /* System */ && (node.flags & 1 /* Export */)) { - // write the call to exporter for enum - writeLine(); - write(exportFunctionForFile + "(\""); - emitDeclarationName(node); - write("\", "); - emitDeclarationName(node); - write(");"); - } - emitExportMemberAssignments(node.name); - } - } - function emitEnumMember(node) { - var enumParent = node.parent; - emitStart(node); - write(getGeneratedNameForNode(enumParent)); - write("["); - write(getGeneratedNameForNode(enumParent)); - write("["); - emitExpressionForPropertyName(node.name); - write("] = "); - writeEnumMemberDeclarationValue(node); - write("] = "); - emitExpressionForPropertyName(node.name); - emitEnd(node); - write(";"); - } - function writeEnumMemberDeclarationValue(member) { - var value = resolver.getConstantValue(member); - if (value !== undefined) { - write(value.toString()); - return; - } - else if (member.initializer) { - emit(member.initializer); - } - else { - write("undefined"); - } - } - function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) { - if (moduleDeclaration.body.kind === 208 /* ModuleDeclaration */) { - var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body); - return recursiveInnerModule || moduleDeclaration.body; - } - } - function shouldEmitModuleDeclaration(node) { - return ts.isInstantiatedModule(node, compilerOptions.preserveConstEnums || compilerOptions.isolatedModules); - } - function isModuleMergedWithES6Class(node) { - return languageVersion === 2 /* ES6 */ && !!(resolver.getNodeCheckFlags(node) & 2048 /* LexicalModuleMergesWithClass */); - } - function emitModuleDeclaration(node) { - // Emit only if this module is non-ambient. - var shouldEmit = shouldEmitModuleDeclaration(node); - if (!shouldEmit) { - return emitOnlyPinnedOrTripleSlashComments(node); - } - var hoistedInDeclarationScope = shouldHoistDeclarationInSystemJsModule(node); - var emitVarForModule = !hoistedInDeclarationScope && !isModuleMergedWithES6Class(node); - if (emitVarForModule) { - emitStart(node); - if (isES6ExportedDeclaration(node)) { - write("export "); - } - write("var "); - emit(node.name); - write(";"); - emitEnd(node); - writeLine(); - } - emitStart(node); - write("(function ("); - emitStart(node.name); - write(getGeneratedNameForNode(node)); - emitEnd(node.name); - write(") "); - if (node.body.kind === 209 /* ModuleBlock */) { - var saveTempFlags = tempFlags; - var saveTempVariables = tempVariables; - tempFlags = 0; - tempVariables = undefined; - emit(node.body); - tempFlags = saveTempFlags; - tempVariables = saveTempVariables; - } - else { - write("{"); - increaseIndent(); - scopeEmitStart(node); - emitCaptureThisForNodeIfNecessary(node); - writeLine(); - emit(node.body); - decreaseIndent(); - writeLine(); - var moduleBlock = getInnerMostModuleDeclarationFromDottedModule(node).body; - emitToken(15 /* CloseBraceToken */, moduleBlock.statements.end); - scopeEmitEnd(); - } - write(")("); - // write moduleDecl = containingModule.m only if it is not exported es6 module member - if ((node.flags & 1 /* Export */) && !isES6ExportedDeclaration(node)) { - emit(node.name); - write(" = "); - } - emitModuleMemberName(node); - write(" || ("); - emitModuleMemberName(node); - write(" = {}));"); - emitEnd(node); - if (!isES6ExportedDeclaration(node) && node.name.kind === 65 /* Identifier */ && node.parent === currentSourceFile) { - if (compilerOptions.module === 4 /* System */ && (node.flags & 1 /* Export */)) { - writeLine(); - write(exportFunctionForFile + "(\""); - emitDeclarationName(node); - write("\", "); - emitDeclarationName(node); - write(");"); - } - emitExportMemberAssignments(node.name); - } - } - function emitRequire(moduleName) { - if (moduleName.kind === 8 /* StringLiteral */) { - write("require("); - emitStart(moduleName); - emitLiteral(moduleName); - emitEnd(moduleName); - emitToken(17 /* CloseParenToken */, moduleName.end); - } - else { - write("require()"); - } - } - function getNamespaceDeclarationNode(node) { - if (node.kind === 211 /* ImportEqualsDeclaration */) { - return node; - } - var importClause = node.importClause; - if (importClause && importClause.namedBindings && importClause.namedBindings.kind === 214 /* NamespaceImport */) { - return importClause.namedBindings; - } - } - function isDefaultImport(node) { - return node.kind === 212 /* ImportDeclaration */ && node.importClause && !!node.importClause.name; - } - function emitExportImportAssignments(node) { - if (ts.isAliasSymbolDeclaration(node) && resolver.isValueAliasDeclaration(node)) { - emitExportMemberAssignments(node.name); - } - ts.forEachChild(node, emitExportImportAssignments); - } - function emitImportDeclaration(node) { - if (languageVersion < 2 /* ES6 */) { - return emitExternalImportDeclaration(node); - } - // ES6 import - if (node.importClause) { - var shouldEmitDefaultBindings = resolver.isReferencedAliasDeclaration(node.importClause); - var shouldEmitNamedBindings = node.importClause.namedBindings && resolver.isReferencedAliasDeclaration(node.importClause.namedBindings, true); - if (shouldEmitDefaultBindings || shouldEmitNamedBindings) { - write("import "); - emitStart(node.importClause); - if (shouldEmitDefaultBindings) { - emit(node.importClause.name); - if (shouldEmitNamedBindings) { - write(", "); - } - } - if (shouldEmitNamedBindings) { - emitLeadingComments(node.importClause.namedBindings); - emitStart(node.importClause.namedBindings); - if (node.importClause.namedBindings.kind === 214 /* NamespaceImport */) { - write("* as "); - emit(node.importClause.namedBindings.name); - } - else { - write("{ "); - emitExportOrImportSpecifierList(node.importClause.namedBindings.elements, resolver.isReferencedAliasDeclaration); - write(" }"); - } - emitEnd(node.importClause.namedBindings); - emitTrailingComments(node.importClause.namedBindings); - } - emitEnd(node.importClause); - write(" from "); - emit(node.moduleSpecifier); - write(";"); - } - } - else { - write("import "); - emit(node.moduleSpecifier); - write(";"); - } - } - function emitExternalImportDeclaration(node) { - if (ts.contains(externalImports, node)) { - var isExportedImport = node.kind === 211 /* ImportEqualsDeclaration */ && (node.flags & 1 /* Export */) !== 0; - var namespaceDeclaration = getNamespaceDeclarationNode(node); - if (compilerOptions.module !== 2 /* AMD */) { - emitLeadingComments(node); - emitStart(node); - if (namespaceDeclaration && !isDefaultImport(node)) { - // import x = require("foo") - // import * as x from "foo" - if (!isExportedImport) - write("var "); - emitModuleMemberName(namespaceDeclaration); - write(" = "); - } - else { - // import "foo" - // import x from "foo" - // import { x, y } from "foo" - // import d, * as x from "foo" - // import d, { x, y } from "foo" - var isNakedImport = 212 /* ImportDeclaration */ && !node.importClause; - if (!isNakedImport) { - write("var "); - write(getGeneratedNameForNode(node)); - write(" = "); - } - } - emitRequire(ts.getExternalModuleName(node)); - if (namespaceDeclaration && isDefaultImport(node)) { - // import d, * as x from "foo" - write(", "); - emitModuleMemberName(namespaceDeclaration); - write(" = "); - write(getGeneratedNameForNode(node)); - } - write(";"); - emitEnd(node); - emitExportImportAssignments(node); - emitTrailingComments(node); - } - else { - if (isExportedImport) { - emitModuleMemberName(namespaceDeclaration); - write(" = "); - emit(namespaceDeclaration.name); - write(";"); - } - else if (namespaceDeclaration && isDefaultImport(node)) { - // import d, * as x from "foo" - write("var "); - emitModuleMemberName(namespaceDeclaration); - write(" = "); - write(getGeneratedNameForNode(node)); - write(";"); - } - emitExportImportAssignments(node); - } - } - } - function emitImportEqualsDeclaration(node) { - if (ts.isExternalModuleImportEqualsDeclaration(node)) { - emitExternalImportDeclaration(node); - return; - } - // preserve old compiler's behavior: emit 'var' for import declaration (even if we do not consider them referenced) when - // - current file is not external module - // - import declaration is top level and target is value imported by entity name - if (resolver.isReferencedAliasDeclaration(node) || - (!ts.isExternalModule(currentSourceFile) && resolver.isTopLevelValueImportEqualsWithEntityName(node))) { - emitLeadingComments(node); - emitStart(node); - if (isES6ExportedDeclaration(node)) { - write("export "); - write("var "); - } - else if (!(node.flags & 1 /* Export */)) { - write("var "); - } - emitModuleMemberName(node); - write(" = "); - emit(node.moduleReference); - write(";"); - emitEnd(node); - emitExportImportAssignments(node); - emitTrailingComments(node); - } - } - function emitExportDeclaration(node) { - ts.Debug.assert(compilerOptions.module !== 4 /* System */); - if (languageVersion < 2 /* ES6 */) { - if (node.moduleSpecifier && (!node.exportClause || resolver.isValueAliasDeclaration(node))) { - emitStart(node); - var generatedName = getGeneratedNameForNode(node); - if (node.exportClause) { - // export { x, y, ... } from "foo" - if (compilerOptions.module !== 2 /* AMD */) { - write("var "); - write(generatedName); - write(" = "); - emitRequire(ts.getExternalModuleName(node)); - write(";"); - } - for (var _a = 0, _b = node.exportClause.elements; _a < _b.length; _a++) { - var specifier = _b[_a]; - if (resolver.isValueAliasDeclaration(specifier)) { - writeLine(); - emitStart(specifier); - emitContainingModuleName(specifier); - write("."); - emitNodeWithoutSourceMap(specifier.name); - write(" = "); - write(generatedName); - write("."); - emitNodeWithoutSourceMap(specifier.propertyName || specifier.name); - write(";"); - emitEnd(specifier); - } - } - } - else { - // export * from "foo" - writeLine(); - write("__export("); - if (compilerOptions.module !== 2 /* AMD */) { - emitRequire(ts.getExternalModuleName(node)); - } - else { - write(generatedName); - } - write(");"); - } - emitEnd(node); - } - } - else { - if (!node.exportClause || resolver.isValueAliasDeclaration(node)) { - emitStart(node); - write("export "); - if (node.exportClause) { - // export { x, y, ... } - write("{ "); - emitExportOrImportSpecifierList(node.exportClause.elements, resolver.isValueAliasDeclaration); - write(" }"); - } - else { - write("*"); - } - if (node.moduleSpecifier) { - write(" from "); - emitNodeWithoutSourceMap(node.moduleSpecifier); - } - write(";"); - emitEnd(node); - } - } - } - function emitExportOrImportSpecifierList(specifiers, shouldEmit) { - ts.Debug.assert(languageVersion >= 2 /* ES6 */); - var needsComma = false; - for (var _a = 0; _a < specifiers.length; _a++) { - var specifier = specifiers[_a]; - if (shouldEmit(specifier)) { - if (needsComma) { - write(", "); - } - emitStart(specifier); - if (specifier.propertyName) { - emitNodeWithoutSourceMap(specifier.propertyName); - write(" as "); - } - emitNodeWithoutSourceMap(specifier.name); - emitEnd(specifier); - needsComma = true; - } - } - } - function emitExportAssignment(node) { - if (!node.isExportEquals && resolver.isValueAliasDeclaration(node)) { - if (languageVersion >= 2 /* ES6 */) { - writeLine(); - emitStart(node); - write("export default "); - var expression = node.expression; - emit(expression); - if (expression.kind !== 203 /* FunctionDeclaration */ && - expression.kind !== 204 /* ClassDeclaration */) { - write(";"); - } - emitEnd(node); - } - else { - writeLine(); - emitStart(node); - if (compilerOptions.module === 4 /* System */) { - write(exportFunctionForFile + "(\"default\","); - emit(node.expression); - write(")"); - } - else { - emitContainingModuleName(node); - if (languageVersion === 0 /* ES3 */) { - write("[\"default\"] = "); - } - else { - write(".default = "); - } - emit(node.expression); - } - write(";"); - emitEnd(node); - } - } - } - function collectExternalModuleInfo(sourceFile) { - externalImports = []; - exportSpecifiers = {}; - exportEquals = undefined; - hasExportStars = false; - for (var _a = 0, _b = sourceFile.statements; _a < _b.length; _a++) { - var node = _b[_a]; - switch (node.kind) { - case 212 /* ImportDeclaration */: - if (!node.importClause || - resolver.isReferencedAliasDeclaration(node.importClause, true)) { - // import "mod" - // import x from "mod" where x is referenced - // import * as x from "mod" where x is referenced - // import { x, y } from "mod" where at least one import is referenced - externalImports.push(node); - } - break; - case 211 /* ImportEqualsDeclaration */: - if (node.moduleReference.kind === 222 /* ExternalModuleReference */ && resolver.isReferencedAliasDeclaration(node)) { - // import x = require("mod") where x is referenced - externalImports.push(node); - } - break; - case 218 /* ExportDeclaration */: - if (node.moduleSpecifier) { - if (!node.exportClause) { - // export * from "mod" - externalImports.push(node); - hasExportStars = true; - } - else if (resolver.isValueAliasDeclaration(node)) { - // export { x, y } from "mod" where at least one export is a value symbol - externalImports.push(node); - } - } - else { - // export { x, y } - for (var _c = 0, _d = node.exportClause.elements; _c < _d.length; _c++) { - var specifier = _d[_c]; - var name_24 = (specifier.propertyName || specifier.name).text; - (exportSpecifiers[name_24] || (exportSpecifiers[name_24] = [])).push(specifier); - } - } - break; - case 217 /* ExportAssignment */: - if (node.isExportEquals && !exportEquals) { - // export = x - exportEquals = node; - } - break; - } - } - } - function emitExportStarHelper() { - if (hasExportStars) { - writeLine(); - write("function __export(m) {"); - increaseIndent(); - writeLine(); - write("for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];"); - decreaseIndent(); - writeLine(); - write("}"); - } - } - function getLocalNameForExternalImport(node) { - var namespaceDeclaration = getNamespaceDeclarationNode(node); - if (namespaceDeclaration && !isDefaultImport(node)) { - return ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, namespaceDeclaration.name); - } - if (node.kind === 212 /* ImportDeclaration */ && node.importClause) { - return getGeneratedNameForNode(node); - } - if (node.kind === 218 /* ExportDeclaration */ && node.moduleSpecifier) { - return getGeneratedNameForNode(node); - } - } - function getExternalModuleNameText(importNode) { - var moduleName = ts.getExternalModuleName(importNode); - if (moduleName.kind === 8 /* StringLiteral */) { - return getLiteralText(moduleName); - } - return undefined; - } - function emitVariableDeclarationsForImports() { - if (externalImports.length === 0) { - return; - } - writeLine(); - var started = false; - for (var _a = 0; _a < externalImports.length; _a++) { - var importNode = externalImports[_a]; - // do not create variable declaration for exports and imports that lack import clause - var skipNode = importNode.kind === 218 /* ExportDeclaration */ || - (importNode.kind === 212 /* ImportDeclaration */ && !importNode.importClause); - if (skipNode) { - continue; - } - if (!started) { - write("var "); - started = true; - } - else { - write(", "); - } - write(getLocalNameForExternalImport(importNode)); - } - if (started) { - write(";"); - } - } - function emitLocalStorageForExportedNamesIfNecessary(exportedDeclarations) { - // when resolving exports local exported entries/indirect exported entries in the module - // should always win over entries with similar names that were added via star exports - // to support this we store names of local/indirect exported entries in a set. - // this set is used to filter names brought by star expors. - if (!hasExportStars) { - // local names set is needed only in presence of star exports - return undefined; - } - // local names set should only be added if we have anything exported - if (!exportedDeclarations && ts.isEmpty(exportSpecifiers)) { - // no exported declarations (export var ...) or export specifiers (export {x}) - // check if we have any non star export declarations. - var hasExportDeclarationWithExportClause = false; - for (var _a = 0; _a < externalImports.length; _a++) { - var externalImport = externalImports[_a]; - if (externalImport.kind === 218 /* ExportDeclaration */ && externalImport.exportClause) { - hasExportDeclarationWithExportClause = true; - break; - } - } - if (!hasExportDeclarationWithExportClause) { - // we still need to emit exportStar helper - return emitExportStarFunction(undefined); - } - } - var exportedNamesStorageRef = makeUniqueName("exportedNames"); - writeLine(); - write("var " + exportedNamesStorageRef + " = {"); - increaseIndent(); - var started = false; - if (exportedDeclarations) { - for (var i = 0; i < exportedDeclarations.length; ++i) { - // write name of exported declaration, i.e 'export var x...' - writeExportedName(exportedDeclarations[i]); - } - } - if (exportSpecifiers) { - for (var n in exportSpecifiers) { - for (var _b = 0, _c = exportSpecifiers[n]; _b < _c.length; _b++) { - var specifier = _c[_b]; - // write name of export specified, i.e. 'export {x}' - writeExportedName(specifier.name); - } - } - } - for (var _d = 0; _d < externalImports.length; _d++) { - var externalImport = externalImports[_d]; - if (externalImport.kind !== 218 /* ExportDeclaration */) { - continue; - } - var exportDecl = externalImport; - if (!exportDecl.exportClause) { - // export * from ... - continue; - } - for (var _e = 0, _f = exportDecl.exportClause.elements; _e < _f.length; _e++) { - var element = _f[_e]; - // write name of indirectly exported entry, i.e. 'export {x} from ...' - writeExportedName(element.name || element.propertyName); - } - } - decreaseIndent(); - writeLine(); - write("};"); - return emitExportStarFunction(exportedNamesStorageRef); - function emitExportStarFunction(localNames) { - var exportStarFunction = makeUniqueName("exportStar"); - writeLine(); - // define an export star helper function - write("function " + exportStarFunction + "(m) {"); - increaseIndent(); - writeLine(); - write("for(var n in m) {"); - increaseIndent(); - writeLine(); - write("if (n !== \"default\""); - if (localNames) { - write("&& !" + localNames + ".hasOwnProperty(n)"); - } - write(") " + exportFunctionForFile + "(n, m[n]);"); - decreaseIndent(); - writeLine(); - write("}"); - decreaseIndent(); - writeLine(); - write("}"); - return exportStarFunction; - } - function writeExportedName(node) { - // do not record default exports - // they are local to module and never overwritten (explicitly skipped) by star export - if (node.kind !== 65 /* Identifier */ && node.flags & 256 /* Default */) { - return; - } - if (started) { - write(","); - } - else { - started = true; - } - writeLine(); - write("'"); - if (node.kind === 65 /* Identifier */) { - emitNodeWithoutSourceMap(node); - } - else { - emitDeclarationName(node); - } - write("': true"); - } - } - function processTopLevelVariableAndFunctionDeclarations(node) { - // per ES6 spec: - // 15.2.1.16.4 ModuleDeclarationInstantiation() Concrete Method - // - var declarations are initialized to undefined - 14.a.ii - // - function/generator declarations are instantiated - 16.a.iv - // this means that after module is instantiated but before its evaluation - // exported functions are already accessible at import sites - // in theory we should hoist only exported functions and its dependencies - // in practice to simplify things we'll hoist all source level functions and variable declaration - // including variables declarations for module and class declarations - var hoistedVars; - var hoistedFunctionDeclarations; - var exportedDeclarations; - visit(node); - if (hoistedVars) { - writeLine(); - write("var "); - var seen = {}; - for (var i = 0; i < hoistedVars.length; ++i) { - var local = hoistedVars[i]; - var name_25 = local.kind === 65 /* Identifier */ - ? local - : local.name; - if (name_25) { - // do not emit duplicate entries (in case of declaration merging) in the list of hoisted variables - var text = ts.unescapeIdentifier(name_25.text); - if (ts.hasProperty(seen, text)) { - continue; - } - else { - seen[text] = text; - } - } - if (i !== 0) { - write(", "); - } - if (local.kind === 204 /* ClassDeclaration */ || local.kind === 208 /* ModuleDeclaration */ || local.kind === 207 /* EnumDeclaration */) { - emitDeclarationName(local); - } - else { - emit(local); - } - var flags = ts.getCombinedNodeFlags(local.kind === 65 /* Identifier */ ? local.parent : local); - if (flags & 1 /* Export */) { - if (!exportedDeclarations) { - exportedDeclarations = []; - } - exportedDeclarations.push(local); - } - } - write(";"); - } - if (hoistedFunctionDeclarations) { - for (var _a = 0; _a < hoistedFunctionDeclarations.length; _a++) { - var f = hoistedFunctionDeclarations[_a]; - writeLine(); - emit(f); - if (f.flags & 1 /* Export */) { - if (!exportedDeclarations) { - exportedDeclarations = []; - } - exportedDeclarations.push(f); - } - } - } - return exportedDeclarations; - function visit(node) { - if (node.flags & 2 /* Ambient */) { - return; - } - if (node.kind === 203 /* FunctionDeclaration */) { - if (!hoistedFunctionDeclarations) { - hoistedFunctionDeclarations = []; - } - hoistedFunctionDeclarations.push(node); - return; - } - if (node.kind === 204 /* ClassDeclaration */) { - if (!hoistedVars) { - hoistedVars = []; - } - hoistedVars.push(node); - return; - } - if (node.kind === 207 /* EnumDeclaration */) { - if (shouldEmitEnumDeclaration(node)) { - if (!hoistedVars) { - hoistedVars = []; - } - hoistedVars.push(node); - } - return; - } - if (node.kind === 208 /* ModuleDeclaration */) { - if (shouldEmitModuleDeclaration(node)) { - if (!hoistedVars) { - hoistedVars = []; - } - hoistedVars.push(node); - } - return; - } - if (node.kind === 201 /* VariableDeclaration */ || node.kind === 155 /* BindingElement */) { - if (shouldHoistVariable(node, false)) { - var name_26 = node.name; - if (name_26.kind === 65 /* Identifier */) { - if (!hoistedVars) { - hoistedVars = []; - } - hoistedVars.push(name_26); - } - else { - ts.forEachChild(name_26, visit); - } - } - return; - } - if (ts.isBindingPattern(node)) { - ts.forEach(node.elements, visit); - return; - } - if (!ts.isDeclaration(node)) { - ts.forEachChild(node, visit); - } - } - } - function shouldHoistVariable(node, checkIfSourceFileLevelDecl) { - if (checkIfSourceFileLevelDecl && !shouldHoistDeclarationInSystemJsModule(node)) { - return false; - } - // hoist variable if - // - it is not block scoped - // - it is top level block scoped - // if block scoped variables are nested in some another block then - // no other functions can use them except ones that are defined at least in the same block - return (ts.getCombinedNodeFlags(node) & 12288 /* BlockScoped */) === 0 || - ts.getEnclosingBlockScopeContainer(node).kind === 230 /* SourceFile */; - } - function isCurrentFileSystemExternalModule() { - return compilerOptions.module === 4 /* System */ && ts.isExternalModule(currentSourceFile); - } - function emitSystemModuleBody(node, startIndex) { - // shape of the body in system modules: - // function (exports) { - // - // - // - // return { - // setters: [ - // - // ], - // execute: function() { - // - // } - // } - // - // } - // I.e: - // import {x} from 'file1' - // var y = 1; - // export function foo() { return y + x(); } - // console.log(y); - // will be transformed to - // function(exports) { - // var file1; // local alias - // var y; - // function foo() { return y + file1.x(); } - // exports("foo", foo); - // return { - // setters: [ - // function(v) { file1 = v } - // ], - // execute(): function() { - // y = 1; - // console.log(y); - // } - // }; - // } - emitVariableDeclarationsForImports(); - writeLine(); - var exportedDeclarations = processTopLevelVariableAndFunctionDeclarations(node); - var exportStarFunction = emitLocalStorageForExportedNamesIfNecessary(exportedDeclarations); - writeLine(); - write("return {"); - increaseIndent(); - writeLine(); - emitSetters(exportStarFunction); - writeLine(); - emitExecute(node, startIndex); - decreaseIndent(); - writeLine(); - write("}"); // return - emitTempDeclarations(true); - } - function emitSetters(exportStarFunction) { - write("setters:["); - for (var i = 0; i < externalImports.length; ++i) { - if (i !== 0) { - write(","); - } - writeLine(); - increaseIndent(); - var importNode = externalImports[i]; - var importVariableName = getLocalNameForExternalImport(importNode) || ""; - var parameterName = "_" + importVariableName; - write("function (" + parameterName + ") {"); - switch (importNode.kind) { - case 212 /* ImportDeclaration */: - if (!importNode.importClause) { - // 'import "..."' case - // module is imported only for side-effects, setter body will be empty - break; - } - // fall-through - case 211 /* ImportEqualsDeclaration */: - ts.Debug.assert(importVariableName !== ""); - increaseIndent(); - writeLine(); - // save import into the local - write(importVariableName + " = " + parameterName + ";"); - writeLine(); - var defaultName = importNode.kind === 212 /* ImportDeclaration */ - ? importNode.importClause.name - : importNode.name; - if (defaultName) { - // emit re-export for imported default name - // import n1 from 'foo1' - // import n2 = require('foo2') - // export {n1} - // export {n2} - emitExportMemberAssignments(defaultName); - writeLine(); - } - if (importNode.kind === 212 /* ImportDeclaration */ && - importNode.importClause.namedBindings) { - var namedBindings = importNode.importClause.namedBindings; - if (namedBindings.kind === 214 /* NamespaceImport */) { - // emit re-export for namespace - // import * as n from 'foo' - // export {n} - emitExportMemberAssignments(namedBindings.name); - writeLine(); - } - else { - // emit re-exports for named imports - // import {a, b} from 'foo' - // export {a, b as c} - for (var _a = 0, _b = namedBindings.elements; _a < _b.length; _a++) { - var element = _b[_a]; - emitExportMemberAssignments(element.name || element.propertyName); - writeLine(); - } - } - } - decreaseIndent(); - break; - case 218 /* ExportDeclaration */: - ts.Debug.assert(importVariableName !== ""); - increaseIndent(); - if (importNode.exportClause) { - // export {a, b as c} from 'foo' - // emit as: - // exports('a', _foo["a"]) - // exports('c', _foo["b"]) - for (var _c = 0, _d = importNode.exportClause.elements; _c < _d.length; _c++) { - var e = _d[_c]; - writeLine(); - write(exportFunctionForFile + "(\""); - emitNodeWithoutSourceMap(e.name); - write("\", " + parameterName + "[\""); - emitNodeWithoutSourceMap(e.propertyName || e.name); - write("\"]);"); - } - } - else { - writeLine(); - // export * from 'foo' - // emit as: - // exportStar(_foo); - write(exportStarFunction + "(" + parameterName + ");"); - } - writeLine(); - decreaseIndent(); - break; - } - write("}"); - decreaseIndent(); - } - write("],"); - } - function emitExecute(node, startIndex) { - write("execute: function() {"); - increaseIndent(); - writeLine(); - for (var i = startIndex; i < node.statements.length; ++i) { - var statement = node.statements[i]; - // - imports/exports are not emitted for system modules - // - function declarations are not emitted because they were already hoisted - switch (statement.kind) { - case 218 /* ExportDeclaration */: - case 212 /* ImportDeclaration */: - case 211 /* ImportEqualsDeclaration */: - case 203 /* FunctionDeclaration */: - continue; - } - writeLine(); - emit(statement); - } - decreaseIndent(); - writeLine(); - write("}"); // execute - } - function emitSystemModule(node, startIndex) { - collectExternalModuleInfo(node); - // System modules has the following shape - // System.register(['dep-1', ... 'dep-n'], function(exports) {/* module body function */}) - // 'exports' here is a function 'exports(name: string, value: T): T' that is used to publish exported values. - // 'exports' returns its 'value' argument so in most cases expressions - // that mutate exported values can be rewritten as: - // expr -> exports('name', expr). - // The only exception in this rule is postfix unary operators, - // see comment to 'emitPostfixUnaryExpression' for more details - ts.Debug.assert(!exportFunctionForFile); - // make sure that name of 'exports' function does not conflict with existing identifiers - exportFunctionForFile = makeUniqueName("exports"); - write("System.register("); - if (node.moduleName) { - write("\"" + node.moduleName + "\", "); - } - write("["); - for (var i = 0; i < externalImports.length; ++i) { - var text = getExternalModuleNameText(externalImports[i]); - if (i !== 0) { - write(", "); - } - write(text); - } - write("], function(" + exportFunctionForFile + ") {"); - writeLine(); - increaseIndent(); - emitCaptureThisForNodeIfNecessary(node); - emitSystemModuleBody(node, startIndex); - decreaseIndent(); - writeLine(); - write("});"); - } - function emitAMDDependencies(node, includeNonAmdDependencies) { - // An AMD define function has the following shape: - // define(id?, dependencies?, factory); - // - // This has the shape of - // define(name, ["module1", "module2"], function (module1Alias) { - // The location of the alias in the parameter list in the factory function needs to - // match the position of the module name in the dependency list. - // - // To ensure this is true in cases of modules with no aliases, e.g.: - // `import "module"` or `` - // we need to add modules without alias names to the end of the dependencies list - var aliasedModuleNames = []; // names of modules with corresponding parameter in the - // factory function. - var unaliasedModuleNames = []; // names of modules with no corresponding parameters in - // factory function. - var importAliasNames = []; // names of the parameters in the factory function; these - // parameters need to match the indexes of the corresponding - // module names in aliasedModuleNames. - // Fill in amd-dependency tags - for (var _a = 0, _b = node.amdDependencies; _a < _b.length; _a++) { - var amdDependency = _b[_a]; - if (amdDependency.name) { - aliasedModuleNames.push("\"" + amdDependency.path + "\""); - importAliasNames.push(amdDependency.name); - } - else { - unaliasedModuleNames.push("\"" + amdDependency.path + "\""); - } - } - for (var _c = 0; _c < externalImports.length; _c++) { - var importNode = externalImports[_c]; - // Find the name of the external module - var externalModuleName = getExternalModuleNameText(importNode); - // Find the name of the module alias, if there is one - var importAliasName = getLocalNameForExternalImport(importNode); - if (includeNonAmdDependencies && importAliasName) { - aliasedModuleNames.push(externalModuleName); - importAliasNames.push(importAliasName); - } - else { - unaliasedModuleNames.push(externalModuleName); - } - } - write("[\"require\", \"exports\""); - if (aliasedModuleNames.length) { - write(", "); - write(aliasedModuleNames.join(", ")); - } - if (unaliasedModuleNames.length) { - write(", "); - write(unaliasedModuleNames.join(", ")); - } - write("], function (require, exports"); - if (importAliasNames.length) { - write(", "); - write(importAliasNames.join(", ")); - } - } - function emitAMDModule(node, startIndex) { - collectExternalModuleInfo(node); - writeLine(); - write("define("); - if (node.moduleName) { - write("\"" + node.moduleName + "\", "); - } - emitAMDDependencies(node, true); - write(") {"); - increaseIndent(); - emitExportStarHelper(); - emitCaptureThisForNodeIfNecessary(node); - emitLinesStartingAt(node.statements, startIndex); - emitTempDeclarations(true); - emitExportEquals(true); - decreaseIndent(); - writeLine(); - write("});"); - } - function emitCommonJSModule(node, startIndex) { - collectExternalModuleInfo(node); - emitExportStarHelper(); - emitCaptureThisForNodeIfNecessary(node); - emitLinesStartingAt(node.statements, startIndex); - emitTempDeclarations(true); - emitExportEquals(false); - } - function emitUMDModule(node, startIndex) { - collectExternalModuleInfo(node); - // Module is detected first to support Browserify users that load into a browser with an AMD loader - writeLines("(function (deps, factory) {\n if (typeof module === 'object' && typeof module.exports === 'object') {\n var v = factory(require, exports); if (v !== undefined) module.exports = v;\n }\n else if (typeof define === 'function' && define.amd) {\n define(deps, factory);\n }\n})("); - emitAMDDependencies(node, false); - write(") {"); - increaseIndent(); - emitExportStarHelper(); - emitCaptureThisForNodeIfNecessary(node); - emitLinesStartingAt(node.statements, startIndex); - emitTempDeclarations(true); - emitExportEquals(true); - decreaseIndent(); - writeLine(); - write("});"); - } - function emitES6Module(node, startIndex) { - externalImports = undefined; - exportSpecifiers = undefined; - exportEquals = undefined; - hasExportStars = false; - emitCaptureThisForNodeIfNecessary(node); - emitLinesStartingAt(node.statements, startIndex); - emitTempDeclarations(true); - // Emit exportDefault if it exists will happen as part - // or normal statement emit. - } - function emitExportEquals(emitAsReturn) { - if (exportEquals && resolver.isValueAliasDeclaration(exportEquals)) { - writeLine(); - emitStart(exportEquals); - write(emitAsReturn ? "return " : "module.exports = "); - emit(exportEquals.expression); - write(";"); - emitEnd(exportEquals); - } - } - function emitDirectivePrologues(statements, startWithNewLine) { - for (var i = 0; i < statements.length; ++i) { - if (ts.isPrologueDirective(statements[i])) { - if (startWithNewLine || i > 0) { - writeLine(); - } - emit(statements[i]); - } - else { - // return index of the first non prologue directive - return i; - } - } - return statements.length; - } - function writeLines(text) { - var lines = text.split(/\r\n|\r|\n/g); - for (var i = 0; i < lines.length; ++i) { - var line = lines[i]; - if (line.length) { - writeLine(); - write(line); - } - } - } - function emitSourceFileNode(node) { - // Start new file on new line - writeLine(); - emitDetachedComments(node); - // emit prologue directives prior to __extends - var startIndex = emitDirectivePrologues(node.statements, false); - // Only emit helpers if the user did not say otherwise. - if (!compilerOptions.noEmitHelpers) { - // Only Emit __extends function when target ES5. - // For target ES6 and above, we can emit classDeclaration as is. - if ((languageVersion < 2 /* ES6 */) && (!extendsEmitted && resolver.getNodeCheckFlags(node) & 8 /* EmitExtends */)) { - writeLines(extendsHelper); - extendsEmitted = true; - } - if (!decorateEmitted && resolver.getNodeCheckFlags(node) & 512 /* EmitDecorate */) { - writeLines(decorateHelper); - if (compilerOptions.emitDecoratorMetadata) { - writeLines(metadataHelper); - } - decorateEmitted = true; - } - if (!paramEmitted && resolver.getNodeCheckFlags(node) & 1024 /* EmitParam */) { - writeLines(paramHelper); - paramEmitted = true; - } - } - if (ts.isExternalModule(node) || compilerOptions.isolatedModules) { - if (languageVersion >= 2 /* ES6 */) { - emitES6Module(node, startIndex); - } - else if (compilerOptions.module === 2 /* AMD */) { - emitAMDModule(node, startIndex); - } - else if (compilerOptions.module === 4 /* System */) { - emitSystemModule(node, startIndex); - } - else if (compilerOptions.module === 3 /* UMD */) { - emitUMDModule(node, startIndex); - } - else { - emitCommonJSModule(node, startIndex); - } - } - else { - externalImports = undefined; - exportSpecifiers = undefined; - exportEquals = undefined; - hasExportStars = false; - emitCaptureThisForNodeIfNecessary(node); - emitLinesStartingAt(node.statements, startIndex); - emitTempDeclarations(true); - } - emitLeadingComments(node.endOfFileToken); - } - function emitNodeWithoutSourceMap(node) { - if (!node) { - return; - } - if (node.flags & 2 /* Ambient */) { - return emitOnlyPinnedOrTripleSlashComments(node); - } - var emitComments = shouldEmitLeadingAndTrailingComments(node); - if (emitComments) { - emitLeadingComments(node); - } - emitJavaScriptWorker(node); - if (emitComments) { - emitTrailingComments(node); - } - } - function shouldEmitLeadingAndTrailingComments(node) { - switch (node.kind) { - // All of these entities are emitted in a specialized fashion. As such, we allow - // the specialized methods for each to handle the comments on the nodes. - case 205 /* InterfaceDeclaration */: - case 203 /* FunctionDeclaration */: - case 212 /* ImportDeclaration */: - case 211 /* ImportEqualsDeclaration */: - case 206 /* TypeAliasDeclaration */: - case 217 /* ExportAssignment */: - return false; - case 183 /* VariableStatement */: - return shouldEmitLeadingAndTrailingCommentsForVariableStatement(node); - case 208 /* ModuleDeclaration */: - // Only emit the leading/trailing comments for a module if we're actually - // emitting the module as well. - return shouldEmitModuleDeclaration(node); - case 207 /* EnumDeclaration */: - // Only emit the leading/trailing comments for an enum if we're actually - // emitting the module as well. - return shouldEmitEnumDeclaration(node); - } - // If this is the expression body of an arrow function that we're down-leveling, - // then we don't want to emit comments when we emit the body. It will have already - // been taken care of when we emitted the 'return' statement for the function - // expression body. - if (node.kind !== 182 /* Block */ && - node.parent && - node.parent.kind === 166 /* ArrowFunction */ && - node.parent.body === node && - compilerOptions.target <= 1 /* ES5 */) { - return false; - } - // Emit comments for everything else. - return true; - } - function emitJavaScriptWorker(node) { - // Check if the node can be emitted regardless of the ScriptTarget - switch (node.kind) { - case 65 /* Identifier */: - return emitIdentifier(node); - case 131 /* Parameter */: - return emitParameter(node); - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - return emitMethod(node); - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - return emitAccessor(node); - case 93 /* ThisKeyword */: - return emitThis(node); - case 91 /* SuperKeyword */: - return emitSuper(node); - case 89 /* NullKeyword */: - return write("null"); - case 95 /* TrueKeyword */: - return write("true"); - case 80 /* FalseKeyword */: - return write("false"); - case 7 /* NumericLiteral */: - case 8 /* StringLiteral */: - case 9 /* RegularExpressionLiteral */: - case 10 /* NoSubstitutionTemplateLiteral */: - case 11 /* TemplateHead */: - case 12 /* TemplateMiddle */: - case 13 /* TemplateTail */: - return emitLiteral(node); - case 174 /* TemplateExpression */: - return emitTemplateExpression(node); - case 180 /* TemplateSpan */: - return emitTemplateSpan(node); - case 128 /* QualifiedName */: - return emitQualifiedName(node); - case 153 /* ObjectBindingPattern */: - return emitObjectBindingPattern(node); - case 154 /* ArrayBindingPattern */: - return emitArrayBindingPattern(node); - case 155 /* BindingElement */: - return emitBindingElement(node); - case 156 /* ArrayLiteralExpression */: - return emitArrayLiteral(node); - case 157 /* ObjectLiteralExpression */: - return emitObjectLiteral(node); - case 227 /* PropertyAssignment */: - return emitPropertyAssignment(node); - case 228 /* ShorthandPropertyAssignment */: - return emitShorthandPropertyAssignment(node); - case 129 /* ComputedPropertyName */: - return emitComputedPropertyName(node); - case 158 /* PropertyAccessExpression */: - return emitPropertyAccess(node); - case 159 /* ElementAccessExpression */: - return emitIndexedAccess(node); - case 160 /* CallExpression */: - return emitCallExpression(node); - case 161 /* NewExpression */: - return emitNewExpression(node); - case 162 /* TaggedTemplateExpression */: - return emitTaggedTemplateExpression(node); - case 163 /* TypeAssertionExpression */: - return emit(node.expression); - case 164 /* ParenthesizedExpression */: - return emitParenExpression(node); - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - return emitFunctionDeclaration(node); - case 167 /* DeleteExpression */: - return emitDeleteExpression(node); - case 168 /* TypeOfExpression */: - return emitTypeOfExpression(node); - case 169 /* VoidExpression */: - return emitVoidExpression(node); - case 170 /* PrefixUnaryExpression */: - return emitPrefixUnaryExpression(node); - case 171 /* PostfixUnaryExpression */: - return emitPostfixUnaryExpression(node); - case 172 /* BinaryExpression */: - return emitBinaryExpression(node); - case 173 /* ConditionalExpression */: - return emitConditionalExpression(node); - case 176 /* SpreadElementExpression */: - return emitSpreadElementExpression(node); - case 175 /* YieldExpression */: - return emitYieldExpression(node); - case 178 /* OmittedExpression */: - return; - case 182 /* Block */: - case 209 /* ModuleBlock */: - return emitBlock(node); - case 183 /* VariableStatement */: - return emitVariableStatement(node); - case 184 /* EmptyStatement */: - return write(";"); - case 185 /* ExpressionStatement */: - return emitExpressionStatement(node); - case 186 /* IfStatement */: - return emitIfStatement(node); - case 187 /* DoStatement */: - return emitDoStatement(node); - case 188 /* WhileStatement */: - return emitWhileStatement(node); - case 189 /* ForStatement */: - return emitForStatement(node); - case 191 /* ForOfStatement */: - case 190 /* ForInStatement */: - return emitForInOrForOfStatement(node); - case 192 /* ContinueStatement */: - case 193 /* BreakStatement */: - return emitBreakOrContinueStatement(node); - case 194 /* ReturnStatement */: - return emitReturnStatement(node); - case 195 /* WithStatement */: - return emitWithStatement(node); - case 196 /* SwitchStatement */: - return emitSwitchStatement(node); - case 223 /* CaseClause */: - case 224 /* DefaultClause */: - return emitCaseOrDefaultClause(node); - case 197 /* LabeledStatement */: - return emitLabelledStatement(node); - case 198 /* ThrowStatement */: - return emitThrowStatement(node); - case 199 /* TryStatement */: - return emitTryStatement(node); - case 226 /* CatchClause */: - return emitCatchClause(node); - case 200 /* DebuggerStatement */: - return emitDebuggerStatement(node); - case 201 /* VariableDeclaration */: - return emitVariableDeclaration(node); - case 177 /* ClassExpression */: - return emitClassExpression(node); - case 204 /* ClassDeclaration */: - return emitClassDeclaration(node); - case 205 /* InterfaceDeclaration */: - return emitInterfaceDeclaration(node); - case 207 /* EnumDeclaration */: - return emitEnumDeclaration(node); - case 229 /* EnumMember */: - return emitEnumMember(node); - case 208 /* ModuleDeclaration */: - return emitModuleDeclaration(node); - case 212 /* ImportDeclaration */: - return emitImportDeclaration(node); - case 211 /* ImportEqualsDeclaration */: - return emitImportEqualsDeclaration(node); - case 218 /* ExportDeclaration */: - return emitExportDeclaration(node); - case 217 /* ExportAssignment */: - return emitExportAssignment(node); - case 230 /* SourceFile */: - return emitSourceFileNode(node); - } - } - function hasDetachedComments(pos) { - return detachedCommentsInfo !== undefined && ts.lastOrUndefined(detachedCommentsInfo).nodePos === pos; - } - function getLeadingCommentsWithoutDetachedComments() { - // get the leading comments from detachedPos - var leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, ts.lastOrUndefined(detachedCommentsInfo).detachedCommentEndPos); - if (detachedCommentsInfo.length - 1) { - detachedCommentsInfo.pop(); - } - else { - detachedCommentsInfo = undefined; - } - return leadingComments; - } - function filterComments(ranges, onlyPinnedOrTripleSlashComments) { - // If we're removing comments, then we want to strip out all but the pinned or - // triple slash comments. - if (ranges && onlyPinnedOrTripleSlashComments) { - ranges = ts.filter(ranges, isPinnedOrTripleSlashComment); - if (ranges.length === 0) { - return undefined; - } - } - return ranges; - } - function getLeadingCommentsToEmit(node) { - // Emit the leading comments only if the parent's pos doesn't match because parent should take care of emitting these comments - if (node.parent) { - if (node.parent.kind === 230 /* SourceFile */ || node.pos !== node.parent.pos) { - if (hasDetachedComments(node.pos)) { - // get comments without detached comments - return getLeadingCommentsWithoutDetachedComments(); - } - else { - // get the leading comments from the node - return ts.getLeadingCommentRangesOfNode(node, currentSourceFile); - } - } - } - } - function getTrailingCommentsToEmit(node) { - // Emit the trailing comments only if the parent's pos doesn't match because parent should take care of emitting these comments - if (node.parent) { - if (node.parent.kind === 230 /* SourceFile */ || node.end !== node.parent.end) { - return ts.getTrailingCommentRanges(currentSourceFile.text, node.end); - } - } - } - function emitOnlyPinnedOrTripleSlashComments(node) { - emitLeadingCommentsWorker(node, true); - } - function emitLeadingComments(node) { - return emitLeadingCommentsWorker(node, compilerOptions.removeComments); - } - function emitLeadingCommentsWorker(node, onlyPinnedOrTripleSlashComments) { - // If the caller only wants pinned or triple slash comments, then always filter - // down to that set. Otherwise, filter based on the current compiler options. - var leadingComments = filterComments(getLeadingCommentsToEmit(node), onlyPinnedOrTripleSlashComments); - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments); - // Leading comments are emitted at /*leading comment1 */space/*leading comment*/space - ts.emitComments(currentSourceFile, writer, leadingComments, true, newLine, writeComment); - } - function emitTrailingComments(node) { - // Emit the trailing comments only if the parent's end doesn't match - var trailingComments = filterComments(getTrailingCommentsToEmit(node), compilerOptions.removeComments); - // trailing comments are emitted at space/*trailing comment1 */space/*trailing comment*/ - ts.emitComments(currentSourceFile, writer, trailingComments, false, newLine, writeComment); - } - function emitLeadingCommentsOfPosition(pos) { - var leadingComments; - if (hasDetachedComments(pos)) { - // get comments without detached comments - leadingComments = getLeadingCommentsWithoutDetachedComments(); - } - else { - // get the leading comments from the node - leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, pos); - } - leadingComments = filterComments(leadingComments, compilerOptions.removeComments); - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, { pos: pos, end: pos }, leadingComments); - // Leading comments are emitted at /*leading comment1 */space/*leading comment*/space - ts.emitComments(currentSourceFile, writer, leadingComments, true, newLine, writeComment); - } - function emitDetachedComments(node) { - var leadingComments = ts.getLeadingCommentRanges(currentSourceFile.text, node.pos); - if (leadingComments) { - var detachedComments = []; - var lastComment; - ts.forEach(leadingComments, function (comment) { - if (lastComment) { - var lastCommentLine = ts.getLineOfLocalPosition(currentSourceFile, lastComment.end); - var commentLine = ts.getLineOfLocalPosition(currentSourceFile, comment.pos); - if (commentLine >= lastCommentLine + 2) { - // There was a blank line between the last comment and this comment. This - // comment is not part of the copyright comments. Return what we have so - // far. - return detachedComments; - } - } - detachedComments.push(comment); - lastComment = comment; - }); - if (detachedComments.length) { - // All comments look like they could have been part of the copyright header. Make - // sure there is at least one blank line between it and the node. If not, it's not - // a copyright header. - var lastCommentLine = ts.getLineOfLocalPosition(currentSourceFile, ts.lastOrUndefined(detachedComments).end); - var nodeLine = ts.getLineOfLocalPosition(currentSourceFile, ts.skipTrivia(currentSourceFile.text, node.pos)); - if (nodeLine >= lastCommentLine + 2) { - // Valid detachedComments - ts.emitNewLineBeforeLeadingComments(currentSourceFile, writer, node, leadingComments); - ts.emitComments(currentSourceFile, writer, detachedComments, true, newLine, writeComment); - var currentDetachedCommentInfo = { nodePos: node.pos, detachedCommentEndPos: ts.lastOrUndefined(detachedComments).end }; - if (detachedCommentsInfo) { - detachedCommentsInfo.push(currentDetachedCommentInfo); - } - else { - detachedCommentsInfo = [currentDetachedCommentInfo]; - } - } - } - } - } - function isPinnedOrTripleSlashComment(comment) { - if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 42 /* asterisk */) { - return currentSourceFile.text.charCodeAt(comment.pos + 2) === 33 /* exclamation */; - } - else if (currentSourceFile.text.charCodeAt(comment.pos + 1) === 47 /* slash */ && - comment.pos + 2 < comment.end && - currentSourceFile.text.charCodeAt(comment.pos + 2) === 47 /* slash */ && - currentSourceFile.text.substring(comment.pos, comment.end).match(ts.fullTripleSlashReferencePathRegEx)) { - return true; - } - } - } - function emitFile(jsFilePath, sourceFile) { - emitJavaScript(jsFilePath, sourceFile); - if (compilerOptions.declaration) { - ts.writeDeclarationFile(jsFilePath, sourceFile, host, resolver, diagnostics); - } - } - } - ts.emitFiles = emitFiles; -})(ts || (ts = {})); -/// -/// -var ts; -(function (ts) { - /* @internal */ ts.programTime = 0; - /* @internal */ ts.emitTime = 0; - /* @internal */ ts.ioReadTime = 0; - /* @internal */ ts.ioWriteTime = 0; - /** The version of the TypeScript compiler release */ - ts.version = "1.5.3"; - function findConfigFile(searchPath) { - var fileName = "tsconfig.json"; - while (true) { - if (ts.sys.fileExists(fileName)) { - return fileName; - } - var parentPath = ts.getDirectoryPath(searchPath); - if (parentPath === searchPath) { - break; - } - searchPath = parentPath; - fileName = "../" + fileName; - } - return undefined; - } - ts.findConfigFile = findConfigFile; - function createCompilerHost(options, setParentNodes) { - var currentDirectory; - var existingDirectories = {}; - function getCanonicalFileName(fileName) { - // if underlying system can distinguish between two files whose names differs only in cases then file name already in canonical form. - // otherwise use toLowerCase as a canonical form. - return ts.sys.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase(); - } - // returned by CScript sys environment - var unsupportedFileEncodingErrorCode = -2147024809; - function getSourceFile(fileName, languageVersion, onError) { - var text; - try { - var start = new Date().getTime(); - text = ts.sys.readFile(fileName, options.charset); - ts.ioReadTime += new Date().getTime() - start; - } - catch (e) { - if (onError) { - onError(e.number === unsupportedFileEncodingErrorCode - ? ts.createCompilerDiagnostic(ts.Diagnostics.Unsupported_file_encoding).messageText - : e.message); - } - text = ""; - } - return text !== undefined ? ts.createSourceFile(fileName, text, languageVersion, setParentNodes) : undefined; - } - function directoryExists(directoryPath) { - if (ts.hasProperty(existingDirectories, directoryPath)) { - return true; - } - if (ts.sys.directoryExists(directoryPath)) { - existingDirectories[directoryPath] = true; - return true; - } - return false; - } - function ensureDirectoriesExist(directoryPath) { - if (directoryPath.length > ts.getRootLength(directoryPath) && !directoryExists(directoryPath)) { - var parentDirectory = ts.getDirectoryPath(directoryPath); - ensureDirectoriesExist(parentDirectory); - ts.sys.createDirectory(directoryPath); - } - } - function writeFile(fileName, data, writeByteOrderMark, onError) { - try { - var start = new Date().getTime(); - ensureDirectoriesExist(ts.getDirectoryPath(ts.normalizePath(fileName))); - ts.sys.writeFile(fileName, data, writeByteOrderMark); - ts.ioWriteTime += new Date().getTime() - start; - } - catch (e) { - if (onError) { - onError(e.message); - } - } - } - var newLine = ts.getNewLineCharacter(options); - return { - getSourceFile: getSourceFile, - getDefaultLibFileName: function (options) { return ts.combinePaths(ts.getDirectoryPath(ts.normalizePath(ts.sys.getExecutingFilePath())), ts.getDefaultLibFileName(options)); }, - writeFile: writeFile, - getCurrentDirectory: function () { return currentDirectory || (currentDirectory = ts.sys.getCurrentDirectory()); }, - useCaseSensitiveFileNames: function () { return ts.sys.useCaseSensitiveFileNames; }, - getCanonicalFileName: getCanonicalFileName, - getNewLine: function () { return newLine; } - }; - } - ts.createCompilerHost = createCompilerHost; - function getPreEmitDiagnostics(program, sourceFile) { - var diagnostics = program.getSyntacticDiagnostics(sourceFile).concat(program.getGlobalDiagnostics()).concat(program.getSemanticDiagnostics(sourceFile)); - if (program.getCompilerOptions().declaration) { - diagnostics.concat(program.getDeclarationDiagnostics(sourceFile)); - } - return ts.sortAndDeduplicateDiagnostics(diagnostics); - } - ts.getPreEmitDiagnostics = getPreEmitDiagnostics; - function flattenDiagnosticMessageText(messageText, newLine) { - if (typeof messageText === "string") { - return messageText; - } - else { - var diagnosticChain = messageText; - var result = ""; - var indent = 0; - while (diagnosticChain) { - if (indent) { - result += newLine; - for (var i = 0; i < indent; i++) { - result += " "; - } - } - result += diagnosticChain.messageText; - indent++; - diagnosticChain = diagnosticChain.next; - } - return result; - } - } - ts.flattenDiagnosticMessageText = flattenDiagnosticMessageText; - function createProgram(rootNames, options, host) { - var program; - var files = []; - var diagnostics = ts.createDiagnosticCollection(); - var commonSourceDirectory; - var diagnosticsProducingTypeChecker; - var noDiagnosticsTypeChecker; - var classifiableNames; - var skipDefaultLib = options.noLib; - var start = new Date().getTime(); - host = host || createCompilerHost(options); - var filesByName = ts.createFileMap(function (fileName) { return host.getCanonicalFileName(fileName); }); - ts.forEach(rootNames, function (name) { return processRootFile(name, false); }); - // Do not process the default library if: - // - The '--noLib' flag is used. - // - A 'no-default-lib' reference comment is encountered in - // processing the root files. - if (!skipDefaultLib) { - processRootFile(host.getDefaultLibFileName(options), true); - } - verifyCompilerOptions(); - ts.programTime += new Date().getTime() - start; - program = { - getSourceFile: getSourceFile, - getSourceFiles: function () { return files; }, - getCompilerOptions: function () { return options; }, - getSyntacticDiagnostics: getSyntacticDiagnostics, - getGlobalDiagnostics: getGlobalDiagnostics, - getSemanticDiagnostics: getSemanticDiagnostics, - getDeclarationDiagnostics: getDeclarationDiagnostics, - getCompilerOptionsDiagnostics: getCompilerOptionsDiagnostics, - getTypeChecker: getTypeChecker, - getClassifiableNames: getClassifiableNames, - getDiagnosticsProducingTypeChecker: getDiagnosticsProducingTypeChecker, - getCommonSourceDirectory: function () { return commonSourceDirectory; }, - emit: emit, - getCurrentDirectory: function () { return host.getCurrentDirectory(); }, - getNodeCount: function () { return getDiagnosticsProducingTypeChecker().getNodeCount(); }, - getIdentifierCount: function () { return getDiagnosticsProducingTypeChecker().getIdentifierCount(); }, - getSymbolCount: function () { return getDiagnosticsProducingTypeChecker().getSymbolCount(); }, - getTypeCount: function () { return getDiagnosticsProducingTypeChecker().getTypeCount(); } - }; - return program; - function getClassifiableNames() { - if (!classifiableNames) { - // Initialize a checker so that all our files are bound. - getTypeChecker(); - classifiableNames = {}; - for (var _i = 0; _i < files.length; _i++) { - var sourceFile = files[_i]; - ts.copyMap(sourceFile.classifiableNames, classifiableNames); - } - } - return classifiableNames; - } - function getEmitHost(writeFileCallback) { - return { - getCanonicalFileName: function (fileName) { return host.getCanonicalFileName(fileName); }, - getCommonSourceDirectory: program.getCommonSourceDirectory, - getCompilerOptions: program.getCompilerOptions, - getCurrentDirectory: function () { return host.getCurrentDirectory(); }, - getNewLine: function () { return host.getNewLine(); }, - getSourceFile: program.getSourceFile, - getSourceFiles: program.getSourceFiles, - writeFile: writeFileCallback || (function (fileName, data, writeByteOrderMark, onError) { return host.writeFile(fileName, data, writeByteOrderMark, onError); }) - }; - } - function getDiagnosticsProducingTypeChecker() { - return diagnosticsProducingTypeChecker || (diagnosticsProducingTypeChecker = ts.createTypeChecker(program, true)); - } - function getTypeChecker() { - return noDiagnosticsTypeChecker || (noDiagnosticsTypeChecker = ts.createTypeChecker(program, false)); - } - function emit(sourceFile, writeFileCallback) { - // If the noEmitOnError flag is set, then check if we have any errors so far. If so, - // immediately bail out. - if (options.noEmitOnError && getPreEmitDiagnostics(this).length > 0) { - return { diagnostics: [], sourceMaps: undefined, emitSkipped: true }; - } - // Create the emit resolver outside of the "emitTime" tracking code below. That way - // any cost associated with it (like type checking) are appropriate associated with - // the type-checking counter. - // - // If the -out option is specified, we should not pass the source file to getEmitResolver. - // This is because in the -out scenario all files need to be emitted, and therefore all - // files need to be type checked. And the way to specify that all files need to be type - // checked is to not pass the file to getEmitResolver. - var emitResolver = getDiagnosticsProducingTypeChecker().getEmitResolver(options.out ? undefined : sourceFile); - var start = new Date().getTime(); - var emitResult = ts.emitFiles(emitResolver, getEmitHost(writeFileCallback), sourceFile); - ts.emitTime += new Date().getTime() - start; - return emitResult; - } - function getSourceFile(fileName) { - return filesByName.get(fileName); - } - function getDiagnosticsHelper(sourceFile, getDiagnostics) { - if (sourceFile) { - return getDiagnostics(sourceFile); - } - var allDiagnostics = []; - ts.forEach(program.getSourceFiles(), function (sourceFile) { - ts.addRange(allDiagnostics, getDiagnostics(sourceFile)); - }); - return ts.sortAndDeduplicateDiagnostics(allDiagnostics); - } - function getSyntacticDiagnostics(sourceFile) { - return getDiagnosticsHelper(sourceFile, getSyntacticDiagnosticsForFile); - } - function getSemanticDiagnostics(sourceFile) { - return getDiagnosticsHelper(sourceFile, getSemanticDiagnosticsForFile); - } - function getDeclarationDiagnostics(sourceFile) { - return getDiagnosticsHelper(sourceFile, getDeclarationDiagnosticsForFile); - } - function getSyntacticDiagnosticsForFile(sourceFile) { - return sourceFile.parseDiagnostics; - } - function getSemanticDiagnosticsForFile(sourceFile) { - var typeChecker = getDiagnosticsProducingTypeChecker(); - ts.Debug.assert(!!sourceFile.bindDiagnostics); - var bindDiagnostics = sourceFile.bindDiagnostics; - var checkDiagnostics = typeChecker.getDiagnostics(sourceFile); - var programDiagnostics = diagnostics.getDiagnostics(sourceFile.fileName); - return bindDiagnostics.concat(checkDiagnostics).concat(programDiagnostics); - } - function getDeclarationDiagnosticsForFile(sourceFile) { - if (!ts.isDeclarationFile(sourceFile)) { - var resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile); - // Don't actually write any files since we're just getting diagnostics. - var writeFile = function () { }; - return ts.getDeclarationDiagnostics(getEmitHost(writeFile), resolver, sourceFile); - } - } - function getCompilerOptionsDiagnostics() { - var allDiagnostics = []; - ts.addRange(allDiagnostics, diagnostics.getGlobalDiagnostics()); - return ts.sortAndDeduplicateDiagnostics(allDiagnostics); - } - function getGlobalDiagnostics() { - var typeChecker = getDiagnosticsProducingTypeChecker(); - var allDiagnostics = []; - ts.addRange(allDiagnostics, typeChecker.getGlobalDiagnostics()); - ts.addRange(allDiagnostics, diagnostics.getGlobalDiagnostics()); - return ts.sortAndDeduplicateDiagnostics(allDiagnostics); - } - function hasExtension(fileName) { - return ts.getBaseFileName(fileName).indexOf(".") >= 0; - } - function processRootFile(fileName, isDefaultLib) { - processSourceFile(ts.normalizePath(fileName), isDefaultLib); - } - function processSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd) { - var start; - var length; - var extensions; - var diagnosticArgument; - if (refEnd !== undefined && refPos !== undefined) { - start = refPos; - length = refEnd - refPos; - } - var diagnostic; - if (hasExtension(fileName)) { - if (!options.allowNonTsExtensions && !ts.forEach(ts.supportedExtensions, function (extension) { return ts.fileExtensionIs(host.getCanonicalFileName(fileName), extension); })) { - diagnostic = ts.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1; - diagnosticArgument = [fileName, "'" + ts.supportedExtensions.join("', '") + "'"]; - } - else if (!findSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd)) { - diagnostic = ts.Diagnostics.File_0_not_found; - diagnosticArgument = [fileName]; - } - else if (refFile && host.getCanonicalFileName(fileName) === host.getCanonicalFileName(refFile.fileName)) { - diagnostic = ts.Diagnostics.A_file_cannot_have_a_reference_to_itself; - diagnosticArgument = [fileName]; - } - } - else { - var nonTsFile = options.allowNonTsExtensions && findSourceFile(fileName, isDefaultLib, refFile, refPos, refEnd); - if (!nonTsFile) { - if (options.allowNonTsExtensions) { - diagnostic = ts.Diagnostics.File_0_not_found; - diagnosticArgument = [fileName]; - } - else if (!ts.forEach(ts.supportedExtensions, function (extension) { return findSourceFile(fileName + extension, isDefaultLib, refFile, refPos, refEnd); })) { - diagnostic = ts.Diagnostics.File_0_not_found; - fileName += ".ts"; - diagnosticArgument = [fileName]; - } - } - } - if (diagnostic) { - if (refFile) { - diagnostics.add(ts.createFileDiagnostic.apply(void 0, [refFile, start, length, diagnostic].concat(diagnosticArgument))); - } - else { - diagnostics.add(ts.createCompilerDiagnostic.apply(void 0, [diagnostic].concat(diagnosticArgument))); - } - } - } - // Get source file from normalized fileName - function findSourceFile(fileName, isDefaultLib, refFile, refStart, refLength) { - var canonicalName = host.getCanonicalFileName(ts.normalizeSlashes(fileName)); - if (filesByName.contains(canonicalName)) { - // We've already looked for this file, use cached result - return getSourceFileFromCache(fileName, canonicalName, false); - } - else { - var normalizedAbsolutePath = ts.getNormalizedAbsolutePath(fileName, host.getCurrentDirectory()); - var canonicalAbsolutePath = host.getCanonicalFileName(normalizedAbsolutePath); - if (filesByName.contains(canonicalAbsolutePath)) { - return getSourceFileFromCache(normalizedAbsolutePath, canonicalAbsolutePath, true); - } - // We haven't looked for this file, do so now and cache result - var file = host.getSourceFile(fileName, options.target, function (hostErrorMessage) { - if (refFile) { - diagnostics.add(ts.createFileDiagnostic(refFile, refStart, refLength, ts.Diagnostics.Cannot_read_file_0_Colon_1, fileName, hostErrorMessage)); - } - else { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_read_file_0_Colon_1, fileName, hostErrorMessage)); - } - }); - filesByName.set(canonicalName, file); - if (file) { - skipDefaultLib = skipDefaultLib || file.hasNoDefaultLib; - // Set the source file for normalized absolute path - filesByName.set(canonicalAbsolutePath, file); - if (!options.noResolve) { - var basePath = ts.getDirectoryPath(fileName); - processReferencedFiles(file, basePath); - processImportedModules(file, basePath); - } - if (isDefaultLib) { - file.isDefaultLib = true; - files.unshift(file); - } - else { - files.push(file); - } - } - return file; - } - function getSourceFileFromCache(fileName, canonicalName, useAbsolutePath) { - var file = filesByName.get(canonicalName); - if (file && host.useCaseSensitiveFileNames()) { - var sourceFileName = useAbsolutePath ? ts.getNormalizedAbsolutePath(file.fileName, host.getCurrentDirectory()) : file.fileName; - if (canonicalName !== sourceFileName) { - diagnostics.add(ts.createFileDiagnostic(refFile, refStart, refLength, ts.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, fileName, sourceFileName)); - } - } - return file; - } - } - function processReferencedFiles(file, basePath) { - ts.forEach(file.referencedFiles, function (ref) { - var referencedFileName = ts.isRootedDiskPath(ref.fileName) ? ref.fileName : ts.combinePaths(basePath, ref.fileName); - processSourceFile(ts.normalizePath(referencedFileName), false, file, ref.pos, ref.end); - }); - } - function processImportedModules(file, basePath) { - ts.forEach(file.statements, function (node) { - if (node.kind === 212 /* ImportDeclaration */ || node.kind === 211 /* ImportEqualsDeclaration */ || node.kind === 218 /* ExportDeclaration */) { - var moduleNameExpr = ts.getExternalModuleName(node); - if (moduleNameExpr && moduleNameExpr.kind === 8 /* StringLiteral */) { - var moduleNameText = moduleNameExpr.text; - if (moduleNameText) { - var searchPath = basePath; - var searchName; - while (true) { - searchName = ts.normalizePath(ts.combinePaths(searchPath, moduleNameText)); - if (ts.forEach(ts.supportedExtensions, function (extension) { return findModuleSourceFile(searchName + extension, moduleNameExpr); })) { - break; - } - var parentPath = ts.getDirectoryPath(searchPath); - if (parentPath === searchPath) { - break; - } - searchPath = parentPath; - } - } - } - } - else if (node.kind === 208 /* ModuleDeclaration */ && node.name.kind === 8 /* StringLiteral */ && (node.flags & 2 /* Ambient */ || ts.isDeclarationFile(file))) { - // TypeScript 1.0 spec (April 2014): 12.1.6 - // An AmbientExternalModuleDeclaration declares an external module. - // This type of declaration is permitted only in the global module. - // The StringLiteral must specify a top - level external module name. - // Relative external module names are not permitted - ts.forEachChild(node.body, function (node) { - if (ts.isExternalModuleImportEqualsDeclaration(node) && - ts.getExternalModuleImportEqualsDeclarationExpression(node).kind === 8 /* StringLiteral */) { - var nameLiteral = ts.getExternalModuleImportEqualsDeclarationExpression(node); - var moduleName = nameLiteral.text; - if (moduleName) { - // TypeScript 1.0 spec (April 2014): 12.1.6 - // An ExternalImportDeclaration in anAmbientExternalModuleDeclaration may reference other external modules - // only through top - level external module names. Relative external module names are not permitted. - var searchName = ts.normalizePath(ts.combinePaths(basePath, moduleName)); - ts.forEach(ts.supportedExtensions, function (extension) { return findModuleSourceFile(searchName + extension, nameLiteral); }); - } - } - }); - } - }); - function findModuleSourceFile(fileName, nameLiteral) { - return findSourceFile(fileName, false, file, nameLiteral.pos, nameLiteral.end - nameLiteral.pos); - } - } - function computeCommonSourceDirectory(sourceFiles) { - var commonPathComponents; - var currentDirectory = host.getCurrentDirectory(); - ts.forEach(files, function (sourceFile) { - // Each file contributes into common source file path - if (ts.isDeclarationFile(sourceFile)) { - return; - } - var sourcePathComponents = ts.getNormalizedPathComponents(sourceFile.fileName, currentDirectory); - sourcePathComponents.pop(); // The base file name is not part of the common directory path - if (!commonPathComponents) { - // first file - commonPathComponents = sourcePathComponents; - return; - } - for (var i = 0, n = Math.min(commonPathComponents.length, sourcePathComponents.length); i < n; i++) { - if (commonPathComponents[i] !== sourcePathComponents[i]) { - if (i === 0) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files)); - return; - } - // New common path found that is 0 -> i-1 - commonPathComponents.length = i; - break; - } - } - // If the sourcePathComponents was shorter than the commonPathComponents, truncate to the sourcePathComponents - if (sourcePathComponents.length < commonPathComponents.length) { - commonPathComponents.length = sourcePathComponents.length; - } - }); - return ts.getNormalizedPathFromPathComponents(commonPathComponents); - } - function checkSourceFilesBelongToPath(sourceFiles, rootDirectory) { - var allFilesBelongToPath = true; - if (sourceFiles) { - var currentDirectory = host.getCurrentDirectory(); - var absoluteRootDirectoryPath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(rootDirectory, currentDirectory)); - for (var _i = 0; _i < sourceFiles.length; _i++) { - var sourceFile = sourceFiles[_i]; - if (!ts.isDeclarationFile(sourceFile)) { - var absoluteSourceFilePath = host.getCanonicalFileName(ts.getNormalizedAbsolutePath(sourceFile.fileName, currentDirectory)); - if (absoluteSourceFilePath.indexOf(absoluteRootDirectoryPath) !== 0) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files, sourceFile.fileName, options.rootDir)); - allFilesBelongToPath = false; - } - } - } - } - return allFilesBelongToPath; - } - function verifyCompilerOptions() { - if (options.isolatedModules) { - if (options.sourceMap) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_sourceMap_cannot_be_specified_with_option_isolatedModules)); - } - if (options.declaration) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_declaration_cannot_be_specified_with_option_isolatedModules)); - } - if (options.noEmitOnError) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_noEmitOnError_cannot_be_specified_with_option_isolatedModules)); - } - if (options.out) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_out_cannot_be_specified_with_option_isolatedModules)); - } - } - if (options.inlineSourceMap) { - if (options.sourceMap) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_sourceMap_cannot_be_specified_with_option_inlineSourceMap)); - } - if (options.mapRoot) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_mapRoot_cannot_be_specified_with_option_inlineSourceMap)); - } - if (options.sourceRoot) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_sourceRoot_cannot_be_specified_with_option_inlineSourceMap)); - } - } - if (options.inlineSources) { - if (!options.sourceMap && !options.inlineSourceMap) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided)); - } - } - if (!options.sourceMap && (options.mapRoot || options.sourceRoot)) { - // Error to specify --mapRoot or --sourceRoot without mapSourceFiles - if (options.mapRoot) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_mapRoot_cannot_be_specified_without_specifying_sourceMap_option)); - } - if (options.sourceRoot) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_sourceRoot_cannot_be_specified_without_specifying_sourceMap_option)); - } - return; - } - var languageVersion = options.target || 0 /* ES3 */; - var firstExternalModuleSourceFile = ts.forEach(files, function (f) { return ts.isExternalModule(f) ? f : undefined; }); - if (options.isolatedModules) { - if (!options.module && languageVersion < 2 /* ES6 */) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES6_or_higher)); - } - var firstNonExternalModuleSourceFile = ts.forEach(files, function (f) { return !ts.isExternalModule(f) && !ts.isDeclarationFile(f) ? f : undefined; }); - if (firstNonExternalModuleSourceFile) { - var span = ts.getErrorSpanForNode(firstNonExternalModuleSourceFile, firstNonExternalModuleSourceFile); - diagnostics.add(ts.createFileDiagnostic(firstNonExternalModuleSourceFile, span.start, span.length, ts.Diagnostics.Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided)); - } - } - else if (firstExternalModuleSourceFile && languageVersion < 2 /* ES6 */ && !options.module) { - // We cannot use createDiagnosticFromNode because nodes do not have parents yet - var span = ts.getErrorSpanForNode(firstExternalModuleSourceFile, firstExternalModuleSourceFile.externalModuleIndicator); - diagnostics.add(ts.createFileDiagnostic(firstExternalModuleSourceFile, span.start, span.length, ts.Diagnostics.Cannot_compile_modules_unless_the_module_flag_is_provided)); - } - // Cannot specify module gen target when in es6 or above - if (options.module && languageVersion >= 2 /* ES6 */) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_compile_modules_into_commonjs_amd_system_or_umd_when_targeting_ES6_or_higher)); - } - // there has to be common source directory if user specified --outdir || --sourceRoot - // if user specified --mapRoot, there needs to be common source directory if there would be multiple files being emitted - if (options.outDir || - options.sourceRoot || - (options.mapRoot && - (!options.out || firstExternalModuleSourceFile !== undefined))) { - if (options.rootDir && checkSourceFilesBelongToPath(files, options.rootDir)) { - // If a rootDir is specified and is valid use it as the commonSourceDirectory - commonSourceDirectory = ts.getNormalizedAbsolutePath(options.rootDir, host.getCurrentDirectory()); - } - else { - // Compute the commonSourceDirectory from the input files - commonSourceDirectory = computeCommonSourceDirectory(files); - } - if (commonSourceDirectory && commonSourceDirectory[commonSourceDirectory.length - 1] !== ts.directorySeparator) { - // Make sure directory path ends with directory separator so this string can directly - // used to replace with "" to get the relative path of the source file and the relative path doesn't - // start with / making it rooted path - commonSourceDirectory += ts.directorySeparator; - } - } - if (options.noEmit) { - if (options.out || options.outDir) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_noEmit_cannot_be_specified_with_option_out_or_outDir)); - } - if (options.declaration) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_noEmit_cannot_be_specified_with_option_declaration)); - } - } - if (options.emitDecoratorMetadata && - !options.experimentalDecorators) { - diagnostics.add(ts.createCompilerDiagnostic(ts.Diagnostics.Option_experimentalDecorators_must_also_be_specified_when_option_emitDecoratorMetadata_is_specified)); - } - } - } - ts.createProgram = createProgram; -})(ts || (ts = {})); -/// -/// -/// -/// -var ts; -(function (ts) { - /* @internal */ - ts.optionDeclarations = [ - { - name: "charset", - type: "string" - }, - { - name: "declaration", - shortName: "d", - type: "boolean", - description: ts.Diagnostics.Generates_corresponding_d_ts_file - }, - { - name: "diagnostics", - type: "boolean" - }, - { - name: "emitBOM", - type: "boolean" - }, - { - name: "help", - shortName: "h", - type: "boolean", - description: ts.Diagnostics.Print_this_message - }, - { - name: "inlineSourceMap", - type: "boolean" - }, - { - name: "inlineSources", - type: "boolean" - }, - { - name: "listFiles", - type: "boolean" - }, - { - name: "locale", - type: "string" - }, - { - name: "mapRoot", - type: "string", - isFilePath: true, - description: ts.Diagnostics.Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations, - paramType: ts.Diagnostics.LOCATION - }, - { - name: "module", - shortName: "m", - type: { - "commonjs": 1 /* CommonJS */, - "amd": 2 /* AMD */, - "system": 4 /* System */, - "umd": 3 /* UMD */ - }, - description: ts.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_or_umd, - paramType: ts.Diagnostics.KIND, - error: ts.Diagnostics.Argument_for_module_option_must_be_commonjs_amd_system_or_umd - }, - { - name: "newLine", - type: { - "crlf": 0 /* CarriageReturnLineFeed */, - "lf": 1 /* LineFeed */ - }, - description: ts.Diagnostics.Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix, - paramType: ts.Diagnostics.NEWLINE, - error: ts.Diagnostics.Argument_for_newLine_option_must_be_CRLF_or_LF - }, - { - name: "noEmit", - type: "boolean", - description: ts.Diagnostics.Do_not_emit_outputs - }, - { - name: "noEmitHelpers", - type: "boolean" - }, - { - name: "noEmitOnError", - type: "boolean", - description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported - }, - { - name: "noImplicitAny", - type: "boolean", - description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type - }, - { - name: "noLib", - type: "boolean" - }, - { - name: "noResolve", - type: "boolean" - }, - { - name: "skipDefaultLibCheck", - type: "boolean" - }, - { - name: "out", - type: "string", - description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file, - paramType: ts.Diagnostics.FILE - }, - { - name: "outDir", - type: "string", - isFilePath: true, - description: ts.Diagnostics.Redirect_output_structure_to_the_directory, - paramType: ts.Diagnostics.DIRECTORY - }, - { - name: "preserveConstEnums", - type: "boolean", - description: ts.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code - }, - { - name: "project", - shortName: "p", - type: "string", - isFilePath: true, - description: ts.Diagnostics.Compile_the_project_in_the_given_directory, - paramType: ts.Diagnostics.DIRECTORY - }, - { - name: "removeComments", - type: "boolean", - description: ts.Diagnostics.Do_not_emit_comments_to_output - }, - { - name: "rootDir", - type: "string", - isFilePath: true, - description: ts.Diagnostics.Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir, - paramType: ts.Diagnostics.LOCATION - }, - { - name: "isolatedModules", - type: "boolean" - }, - { - name: "sourceMap", - type: "boolean", - description: ts.Diagnostics.Generates_corresponding_map_file - }, - { - name: "sourceRoot", - type: "string", - isFilePath: true, - description: ts.Diagnostics.Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations, - paramType: ts.Diagnostics.LOCATION - }, - { - name: "suppressImplicitAnyIndexErrors", - type: "boolean", - description: ts.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures - }, - { - name: "stripInternal", - type: "boolean", - description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation, - experimental: true - }, - { - name: "target", - shortName: "t", - type: { "es3": 0 /* ES3 */, "es5": 1 /* ES5 */, "es6": 2 /* ES6 */ }, - description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES6_experimental, - paramType: ts.Diagnostics.VERSION, - error: ts.Diagnostics.Argument_for_target_option_must_be_ES3_ES5_or_ES6 - }, - { - name: "version", - shortName: "v", - type: "boolean", - description: ts.Diagnostics.Print_the_compiler_s_version - }, - { - name: "watch", - shortName: "w", - type: "boolean", - description: ts.Diagnostics.Watch_input_files - }, - { - name: "experimentalDecorators", - type: "boolean", - description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators - }, - { - name: "emitDecoratorMetadata", - type: "boolean", - experimental: true, - description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators - } - ]; - function parseCommandLine(commandLine) { - var options = {}; - var fileNames = []; - var errors = []; - var shortOptionNames = {}; - var optionNameMap = {}; - ts.forEach(ts.optionDeclarations, function (option) { - optionNameMap[option.name.toLowerCase()] = option; - if (option.shortName) { - shortOptionNames[option.shortName] = option.name; - } - }); - parseStrings(commandLine); - return { - options: options, - fileNames: fileNames, - errors: errors - }; - function parseStrings(args) { - var i = 0; - while (i < args.length) { - var s = args[i++]; - if (s.charCodeAt(0) === 64 /* at */) { - parseResponseFile(s.slice(1)); - } - else if (s.charCodeAt(0) === 45 /* minus */) { - s = s.slice(s.charCodeAt(1) === 45 /* minus */ ? 2 : 1).toLowerCase(); - // Try to translate short option names to their full equivalents. - if (ts.hasProperty(shortOptionNames, s)) { - s = shortOptionNames[s]; - } - if (ts.hasProperty(optionNameMap, s)) { - var opt = optionNameMap[s]; - // Check to see if no argument was provided (e.g. "--locale" is the last command-line argument). - if (!args[i] && opt.type !== "boolean") { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_expects_an_argument, opt.name)); - } - switch (opt.type) { - case "number": - options[opt.name] = parseInt(args[i++]); - break; - case "boolean": - options[opt.name] = true; - break; - case "string": - options[opt.name] = args[i++] || ""; - break; - // If not a primitive, the possible types are specified in what is effectively a map of options. - default: - var map = opt.type; - var key = (args[i++] || "").toLowerCase(); - if (ts.hasProperty(map, key)) { - options[opt.name] = map[key]; - } - else { - errors.push(ts.createCompilerDiagnostic(opt.error)); - } - } - } - else { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_compiler_option_0, s)); - } - } - else { - fileNames.push(s); - } - } - } - function parseResponseFile(fileName) { - var text = ts.sys.readFile(fileName); - if (!text) { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.File_0_not_found, fileName)); - return; - } - var args = []; - var pos = 0; - while (true) { - while (pos < text.length && text.charCodeAt(pos) <= 32 /* space */) - pos++; - if (pos >= text.length) - break; - var start = pos; - if (text.charCodeAt(start) === 34 /* doubleQuote */) { - pos++; - while (pos < text.length && text.charCodeAt(pos) !== 34 /* doubleQuote */) - pos++; - if (pos < text.length) { - args.push(text.substring(start + 1, pos)); - pos++; - } - else { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unterminated_quoted_string_in_response_file_0, fileName)); - } - } - else { - while (text.charCodeAt(pos) > 32 /* space */) - pos++; - args.push(text.substring(start, pos)); - } - } - parseStrings(args); - } - } - ts.parseCommandLine = parseCommandLine; - /** - * Read tsconfig.json file - * @param fileName The path to the config file - */ - function readConfigFile(fileName) { - try { - var text = ts.sys.readFile(fileName); - } - catch (e) { - return { error: ts.createCompilerDiagnostic(ts.Diagnostics.Cannot_read_file_0_Colon_1, fileName, e.message) }; - } - return parseConfigFileText(fileName, text); - } - ts.readConfigFile = readConfigFile; - /** - * Parse the text of the tsconfig.json file - * @param fileName The path to the config file - * @param jsonText The text of the config file - */ - function parseConfigFileText(fileName, jsonText) { - try { - return { config: /\S/.test(jsonText) ? JSON.parse(jsonText) : {} }; - } - catch (e) { - return { error: ts.createCompilerDiagnostic(ts.Diagnostics.Failed_to_parse_file_0_Colon_1, fileName, e.message) }; - } - } - ts.parseConfigFileText = parseConfigFileText; - /** - * Parse the contents of a config file (tsconfig.json). - * @param json The contents of the config file to parse - * @param basePath A root directory to resolve relative path entries in the config - * file to. e.g. outDir - */ - function parseConfigFile(json, host, basePath) { - var errors = []; - return { - options: getCompilerOptions(), - fileNames: getFileNames(), - errors: errors - }; - function getCompilerOptions() { - var options = {}; - var optionNameMap = {}; - ts.forEach(ts.optionDeclarations, function (option) { - optionNameMap[option.name] = option; - }); - var jsonOptions = json["compilerOptions"]; - if (jsonOptions) { - for (var id in jsonOptions) { - if (ts.hasProperty(optionNameMap, id)) { - var opt = optionNameMap[id]; - var optType = opt.type; - var value = jsonOptions[id]; - var expectedType = typeof optType === "string" ? optType : "string"; - if (typeof value === expectedType) { - if (typeof optType !== "string") { - var key = value.toLowerCase(); - if (ts.hasProperty(optType, key)) { - value = optType[key]; - } - else { - errors.push(ts.createCompilerDiagnostic(opt.error)); - value = 0; - } - } - if (opt.isFilePath) { - value = ts.normalizePath(ts.combinePaths(basePath, value)); - } - options[opt.name] = value; - } - else { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Compiler_option_0_requires_a_value_of_type_1, id, expectedType)); - } - } - else { - errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Unknown_compiler_option_0, id)); - } - } - } - return options; - } - function getFileNames() { - var fileNames = []; - if (ts.hasProperty(json, "files")) { - if (json["files"] instanceof Array) { - fileNames = ts.map(json["files"], function (s) { return ts.combinePaths(basePath, s); }); - } - } - else { - var exclude = json["exclude"] instanceof Array ? ts.map(json["exclude"], ts.normalizeSlashes) : undefined; - var sysFiles = host.readDirectory(basePath, ".ts", exclude); - for (var i = 0; i < sysFiles.length; i++) { - var name = sysFiles[i]; - if (!ts.fileExtensionIs(name, ".d.ts") || !ts.contains(sysFiles, name.substr(0, name.length - 5) + ".ts")) { - fileNames.push(name); - } - } - } - return fileNames; - } - } - ts.parseConfigFile = parseConfigFile; -})(ts || (ts = {})); -/* @internal */ -var ts; -(function (ts) { - var OutliningElementsCollector; - (function (OutliningElementsCollector) { - function collectElements(sourceFile) { - var elements = []; - var collapseText = "..."; - function addOutliningSpan(hintSpanNode, startElement, endElement, autoCollapse) { - if (hintSpanNode && startElement && endElement) { - var span = { - textSpan: ts.createTextSpanFromBounds(startElement.pos, endElement.end), - hintSpan: ts.createTextSpanFromBounds(hintSpanNode.getStart(), hintSpanNode.end), - bannerText: collapseText, - autoCollapse: autoCollapse - }; - elements.push(span); - } - } - function addOutliningSpanComments(commentSpan, autoCollapse) { - if (commentSpan) { - var span = { - textSpan: ts.createTextSpanFromBounds(commentSpan.pos, commentSpan.end), - hintSpan: ts.createTextSpanFromBounds(commentSpan.pos, commentSpan.end), - bannerText: collapseText, - autoCollapse: autoCollapse - }; - elements.push(span); - } - } - function addOutliningForLeadingCommentsForNode(n) { - var comments = ts.getLeadingCommentRangesOfNode(n, sourceFile); - if (comments) { - var firstSingleLineCommentStart = -1; - var lastSingleLineCommentEnd = -1; - var isFirstSingleLineComment = true; - var singleLineCommentCount = 0; - for (var _i = 0; _i < comments.length; _i++) { - var currentComment = comments[_i]; - // For single line comments, combine consecutive ones (2 or more) into - // a single span from the start of the first till the end of the last - if (currentComment.kind === 2 /* SingleLineCommentTrivia */) { - if (isFirstSingleLineComment) { - firstSingleLineCommentStart = currentComment.pos; - } - isFirstSingleLineComment = false; - lastSingleLineCommentEnd = currentComment.end; - singleLineCommentCount++; - } - else if (currentComment.kind === 3 /* MultiLineCommentTrivia */) { - combineAndAddMultipleSingleLineComments(singleLineCommentCount, firstSingleLineCommentStart, lastSingleLineCommentEnd); - addOutliningSpanComments(currentComment, false); - singleLineCommentCount = 0; - lastSingleLineCommentEnd = -1; - isFirstSingleLineComment = true; - } - } - combineAndAddMultipleSingleLineComments(singleLineCommentCount, firstSingleLineCommentStart, lastSingleLineCommentEnd); - } - } - function combineAndAddMultipleSingleLineComments(count, start, end) { - // Only outline spans of two or more consecutive single line comments - if (count > 1) { - var multipleSingleLineComments = { - pos: start, - end: end, - kind: 2 /* SingleLineCommentTrivia */ - }; - addOutliningSpanComments(multipleSingleLineComments, false); - } - } - function autoCollapse(node) { - return ts.isFunctionBlock(node) && node.parent.kind !== 166 /* ArrowFunction */; - } - var depth = 0; - var maxDepth = 20; - function walk(n) { - if (depth > maxDepth) { - return; - } - if (ts.isDeclaration(n)) { - addOutliningForLeadingCommentsForNode(n); - } - switch (n.kind) { - case 182 /* Block */: - if (!ts.isFunctionBlock(n)) { - var parent_8 = n.parent; - var openBrace = ts.findChildOfKind(n, 14 /* OpenBraceToken */, sourceFile); - var closeBrace = ts.findChildOfKind(n, 15 /* CloseBraceToken */, sourceFile); - // Check if the block is standalone, or 'attached' to some parent statement. - // If the latter, we want to collaps the block, but consider its hint span - // to be the entire span of the parent. - if (parent_8.kind === 187 /* DoStatement */ || - parent_8.kind === 190 /* ForInStatement */ || - parent_8.kind === 191 /* ForOfStatement */ || - parent_8.kind === 189 /* ForStatement */ || - parent_8.kind === 186 /* IfStatement */ || - parent_8.kind === 188 /* WhileStatement */ || - parent_8.kind === 195 /* WithStatement */ || - parent_8.kind === 226 /* CatchClause */) { - addOutliningSpan(parent_8, openBrace, closeBrace, autoCollapse(n)); - break; - } - if (parent_8.kind === 199 /* TryStatement */) { - // Could be the try-block, or the finally-block. - var tryStatement = parent_8; - if (tryStatement.tryBlock === n) { - addOutliningSpan(parent_8, openBrace, closeBrace, autoCollapse(n)); - break; - } - else if (tryStatement.finallyBlock === n) { - var finallyKeyword = ts.findChildOfKind(tryStatement, 81 /* FinallyKeyword */, sourceFile); - if (finallyKeyword) { - addOutliningSpan(finallyKeyword, openBrace, closeBrace, autoCollapse(n)); - break; - } - } - } - // Block was a standalone block. In this case we want to only collapse - // the span of the block, independent of any parent span. - var span = ts.createTextSpanFromBounds(n.getStart(), n.end); - elements.push({ - textSpan: span, - hintSpan: span, - bannerText: collapseText, - autoCollapse: autoCollapse(n) - }); - break; - } - // Fallthrough. - case 209 /* ModuleBlock */: { - var openBrace = ts.findChildOfKind(n, 14 /* OpenBraceToken */, sourceFile); - var closeBrace = ts.findChildOfKind(n, 15 /* CloseBraceToken */, sourceFile); - addOutliningSpan(n.parent, openBrace, closeBrace, autoCollapse(n)); - break; - } - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 207 /* EnumDeclaration */: - case 157 /* ObjectLiteralExpression */: - case 210 /* CaseBlock */: { - var openBrace = ts.findChildOfKind(n, 14 /* OpenBraceToken */, sourceFile); - var closeBrace = ts.findChildOfKind(n, 15 /* CloseBraceToken */, sourceFile); - addOutliningSpan(n, openBrace, closeBrace, autoCollapse(n)); - break; - } - case 156 /* ArrayLiteralExpression */: - var openBracket = ts.findChildOfKind(n, 18 /* OpenBracketToken */, sourceFile); - var closeBracket = ts.findChildOfKind(n, 19 /* CloseBracketToken */, sourceFile); - addOutliningSpan(n, openBracket, closeBracket, autoCollapse(n)); - break; - } - depth++; - ts.forEachChild(n, walk); - depth--; - } - walk(sourceFile); - return elements; - } - OutliningElementsCollector.collectElements = collectElements; - })(OutliningElementsCollector = ts.OutliningElementsCollector || (ts.OutliningElementsCollector = {})); -})(ts || (ts = {})); -/* @internal */ -var ts; -(function (ts) { - var NavigateTo; - (function (NavigateTo) { - function getNavigateToItems(program, cancellationToken, searchValue, maxResultCount) { - var patternMatcher = ts.createPatternMatcher(searchValue); - var rawItems = []; - // Search the declarations in all files and output matched NavigateToItem into array of NavigateToItem[] - ts.forEach(program.getSourceFiles(), function (sourceFile) { - cancellationToken.throwIfCancellationRequested(); - var nameToDeclarations = sourceFile.getNamedDeclarations(); - for (var name_27 in nameToDeclarations) { - var declarations = ts.getProperty(nameToDeclarations, name_27); - if (declarations) { - // First do a quick check to see if the name of the declaration matches the - // last portion of the (possibly) dotted name they're searching for. - var matches = patternMatcher.getMatchesForLastSegmentOfPattern(name_27); - if (!matches) { - continue; - } - for (var _i = 0; _i < declarations.length; _i++) { - var declaration = declarations[_i]; - // It was a match! If the pattern has dots in it, then also see if the - // declaration container matches as well. - if (patternMatcher.patternContainsDots) { - var containers = getContainers(declaration); - if (!containers) { - return undefined; - } - matches = patternMatcher.getMatches(containers, name_27); - if (!matches) { - continue; - } - } - var fileName = sourceFile.fileName; - var matchKind = bestMatchKind(matches); - rawItems.push({ name: name_27, fileName: fileName, matchKind: matchKind, isCaseSensitive: allMatchesAreCaseSensitive(matches), declaration: declaration }); - } - } - } - }); - rawItems.sort(compareNavigateToItems); - if (maxResultCount !== undefined) { - rawItems = rawItems.slice(0, maxResultCount); - } - var items = ts.map(rawItems, createNavigateToItem); - return items; - function allMatchesAreCaseSensitive(matches) { - ts.Debug.assert(matches.length > 0); - // This is a case sensitive match, only if all the submatches were case sensitive. - for (var _i = 0; _i < matches.length; _i++) { - var match = matches[_i]; - if (!match.isCaseSensitive) { - return false; - } - } - return true; - } - function getTextOfIdentifierOrLiteral(node) { - if (node) { - if (node.kind === 65 /* Identifier */ || - node.kind === 8 /* StringLiteral */ || - node.kind === 7 /* NumericLiteral */) { - return node.text; - } - } - return undefined; - } - function tryAddSingleDeclarationName(declaration, containers) { - if (declaration && declaration.name) { - var text = getTextOfIdentifierOrLiteral(declaration.name); - if (text !== undefined) { - containers.unshift(text); - } - else if (declaration.name.kind === 129 /* ComputedPropertyName */) { - return tryAddComputedPropertyName(declaration.name.expression, containers, true); - } - else { - // Don't know how to add this. - return false; - } - } - return true; - } - // Only added the names of computed properties if they're simple dotted expressions, like: - // - // [X.Y.Z]() { } - function tryAddComputedPropertyName(expression, containers, includeLastPortion) { - var text = getTextOfIdentifierOrLiteral(expression); - if (text !== undefined) { - if (includeLastPortion) { - containers.unshift(text); - } - return true; - } - if (expression.kind === 158 /* PropertyAccessExpression */) { - var propertyAccess = expression; - if (includeLastPortion) { - containers.unshift(propertyAccess.name.text); - } - return tryAddComputedPropertyName(propertyAccess.expression, containers, true); - } - return false; - } - function getContainers(declaration) { - var containers = []; - // First, if we started with a computed property name, then add all but the last - // portion into the container array. - if (declaration.name.kind === 129 /* ComputedPropertyName */) { - if (!tryAddComputedPropertyName(declaration.name.expression, containers, false)) { - return undefined; - } - } - // Now, walk up our containers, adding all their names to the container array. - declaration = ts.getContainerNode(declaration); - while (declaration) { - if (!tryAddSingleDeclarationName(declaration, containers)) { - return undefined; - } - declaration = ts.getContainerNode(declaration); - } - return containers; - } - function bestMatchKind(matches) { - ts.Debug.assert(matches.length > 0); - var bestMatchKind = ts.PatternMatchKind.camelCase; - for (var _i = 0; _i < matches.length; _i++) { - var match = matches[_i]; - var kind = match.kind; - if (kind < bestMatchKind) { - bestMatchKind = kind; - } - } - return bestMatchKind; - } - // This means "compare in a case insensitive manner." - var baseSensitivity = { sensitivity: "base" }; - function compareNavigateToItems(i1, i2) { - // TODO(cyrusn): get the gamut of comparisons that VS already uses here. - // Right now we just sort by kind first, and then by name of the item. - // We first sort case insensitively. So "Aaa" will come before "bar". - // Then we sort case sensitively, so "aaa" will come before "Aaa". - return i1.matchKind - i2.matchKind || - i1.name.localeCompare(i2.name, undefined, baseSensitivity) || - i1.name.localeCompare(i2.name); - } - function createNavigateToItem(rawItem) { - var declaration = rawItem.declaration; - var container = ts.getContainerNode(declaration); - return { - name: rawItem.name, - kind: ts.getNodeKind(declaration), - kindModifiers: ts.getNodeModifiers(declaration), - matchKind: ts.PatternMatchKind[rawItem.matchKind], - isCaseSensitive: rawItem.isCaseSensitive, - fileName: rawItem.fileName, - textSpan: ts.createTextSpanFromBounds(declaration.getStart(), declaration.getEnd()), - // TODO(jfreeman): What should be the containerName when the container has a computed name? - containerName: container && container.name ? container.name.text : "", - containerKind: container && container.name ? ts.getNodeKind(container) : "" - }; - } - } - NavigateTo.getNavigateToItems = getNavigateToItems; - })(NavigateTo = ts.NavigateTo || (ts.NavigateTo = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var NavigationBar; - (function (NavigationBar) { - function getNavigationBarItems(sourceFile) { - // If the source file has any child items, then it included in the tree - // and takes lexical ownership of all other top-level items. - var hasGlobalNode = false; - return getItemsWorker(getTopLevelNodes(sourceFile), createTopLevelItem); - function getIndent(node) { - // If we have a global node in the tree, - // then it adds an extra layer of depth to all subnodes. - var indent = hasGlobalNode ? 1 : 0; - var current = node.parent; - while (current) { - switch (current.kind) { - case 208 /* ModuleDeclaration */: - // If we have a module declared as A.B.C, it is more "intuitive" - // to say it only has a single layer of depth - do { - current = current.parent; - } while (current.kind === 208 /* ModuleDeclaration */); - // fall through - case 204 /* ClassDeclaration */: - case 207 /* EnumDeclaration */: - case 205 /* InterfaceDeclaration */: - case 203 /* FunctionDeclaration */: - indent++; - } - current = current.parent; - } - return indent; - } - function getChildNodes(nodes) { - var childNodes = []; - function visit(node) { - switch (node.kind) { - case 183 /* VariableStatement */: - ts.forEach(node.declarationList.declarations, visit); - break; - case 153 /* ObjectBindingPattern */: - case 154 /* ArrayBindingPattern */: - ts.forEach(node.elements, visit); - break; - case 218 /* ExportDeclaration */: - // Handle named exports case e.g.: - // export {a, b as B} from "mod"; - if (node.exportClause) { - ts.forEach(node.exportClause.elements, visit); - } - break; - case 212 /* ImportDeclaration */: - var importClause = node.importClause; - if (importClause) { - // Handle default import case e.g.: - // import d from "mod"; - if (importClause.name) { - childNodes.push(importClause); - } - // Handle named bindings in imports e.g.: - // import * as NS from "mod"; - // import {a, b as B} from "mod"; - if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 214 /* NamespaceImport */) { - childNodes.push(importClause.namedBindings); - } - else { - ts.forEach(importClause.namedBindings.elements, visit); - } - } - } - break; - case 155 /* BindingElement */: - case 201 /* VariableDeclaration */: - if (ts.isBindingPattern(node.name)) { - visit(node.name); - break; - } - // Fall through - case 204 /* ClassDeclaration */: - case 207 /* EnumDeclaration */: - case 205 /* InterfaceDeclaration */: - case 208 /* ModuleDeclaration */: - case 203 /* FunctionDeclaration */: - case 211 /* ImportEqualsDeclaration */: - case 216 /* ImportSpecifier */: - case 220 /* ExportSpecifier */: - childNodes.push(node); - break; - } - } - //for (let i = 0, n = nodes.length; i < n; i++) { - // let node = nodes[i]; - // if (node.kind === SyntaxKind.ClassDeclaration || - // node.kind === SyntaxKind.EnumDeclaration || - // node.kind === SyntaxKind.InterfaceDeclaration || - // node.kind === SyntaxKind.ModuleDeclaration || - // node.kind === SyntaxKind.FunctionDeclaration) { - // childNodes.push(node); - // } - // else if (node.kind === SyntaxKind.VariableStatement) { - // childNodes.push.apply(childNodes, (node).declarations); - // } - //} - ts.forEach(nodes, visit); - return sortNodes(childNodes); - } - function getTopLevelNodes(node) { - var topLevelNodes = []; - topLevelNodes.push(node); - addTopLevelNodes(node.statements, topLevelNodes); - return topLevelNodes; - } - function sortNodes(nodes) { - return nodes.slice(0).sort(function (n1, n2) { - if (n1.name && n2.name) { - return ts.getPropertyNameForPropertyNameNode(n1.name).localeCompare(ts.getPropertyNameForPropertyNameNode(n2.name)); - } - else if (n1.name) { - return 1; - } - else if (n2.name) { - return -1; - } - else { - return n1.kind - n2.kind; - } - }); - } - function addTopLevelNodes(nodes, topLevelNodes) { - nodes = sortNodes(nodes); - for (var _i = 0; _i < nodes.length; _i++) { - var node = nodes[_i]; - switch (node.kind) { - case 204 /* ClassDeclaration */: - case 207 /* EnumDeclaration */: - case 205 /* InterfaceDeclaration */: - topLevelNodes.push(node); - break; - case 208 /* ModuleDeclaration */: - var moduleDeclaration = node; - topLevelNodes.push(node); - addTopLevelNodes(getInnermostModule(moduleDeclaration).body.statements, topLevelNodes); - break; - case 203 /* FunctionDeclaration */: - var functionDeclaration = node; - if (isTopLevelFunctionDeclaration(functionDeclaration)) { - topLevelNodes.push(node); - addTopLevelNodes(functionDeclaration.body.statements, topLevelNodes); - } - break; - } - } - } - function isTopLevelFunctionDeclaration(functionDeclaration) { - if (functionDeclaration.kind === 203 /* FunctionDeclaration */) { - // A function declaration is 'top level' if it contains any function declarations - // within it. - if (functionDeclaration.body && functionDeclaration.body.kind === 182 /* Block */) { - // Proper function declarations can only have identifier names - if (ts.forEach(functionDeclaration.body.statements, function (s) { return s.kind === 203 /* FunctionDeclaration */ && !isEmpty(s.name.text); })) { - return true; - } - // Or if it is not parented by another function. i.e all functions - // at module scope are 'top level'. - if (!ts.isFunctionBlock(functionDeclaration.parent)) { - return true; - } - } - } - return false; - } - function getItemsWorker(nodes, createItem) { - var items = []; - var keyToItem = {}; - for (var _i = 0; _i < nodes.length; _i++) { - var child = nodes[_i]; - var item = createItem(child); - if (item !== undefined) { - if (item.text.length > 0) { - var key = item.text + "-" + item.kind + "-" + item.indent; - var itemWithSameName = keyToItem[key]; - if (itemWithSameName) { - // We had an item with the same name. Merge these items together. - merge(itemWithSameName, item); - } - else { - keyToItem[key] = item; - items.push(item); - } - } - } - } - return items; - } - function merge(target, source) { - // First, add any spans in the source to the target. - target.spans.push.apply(target.spans, source.spans); - if (source.childItems) { - if (!target.childItems) { - target.childItems = []; - } - // Next, recursively merge or add any children in the source as appropriate. - outer: for (var _i = 0, _a = source.childItems; _i < _a.length; _i++) { - var sourceChild = _a[_i]; - for (var _b = 0, _c = target.childItems; _b < _c.length; _b++) { - var targetChild = _c[_b]; - if (targetChild.text === sourceChild.text && targetChild.kind === sourceChild.kind) { - // Found a match. merge them. - merge(targetChild, sourceChild); - continue outer; - } - } - // Didn't find a match, just add this child to the list. - target.childItems.push(sourceChild); - } - } - } - function createChildItem(node) { - switch (node.kind) { - case 131 /* Parameter */: - if (ts.isBindingPattern(node.name)) { - break; - } - if ((node.flags & 499 /* Modifier */) === 0) { - return undefined; - } - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberFunctionElement); - case 138 /* GetAccessor */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberGetAccessorElement); - case 139 /* SetAccessor */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberSetAccessorElement); - case 142 /* IndexSignature */: - return createItem(node, "[]", ts.ScriptElementKind.indexSignatureElement); - case 229 /* EnumMember */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); - case 140 /* CallSignature */: - return createItem(node, "()", ts.ScriptElementKind.callSignatureElement); - case 141 /* ConstructSignature */: - return createItem(node, "new()", ts.ScriptElementKind.constructSignatureElement); - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.memberVariableElement); - case 203 /* FunctionDeclaration */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.functionElement); - case 201 /* VariableDeclaration */: - case 155 /* BindingElement */: - var variableDeclarationNode; - var name_28; - if (node.kind === 155 /* BindingElement */) { - name_28 = node.name; - variableDeclarationNode = node; - // binding elements are added only for variable declarations - // bubble up to the containing variable declaration - while (variableDeclarationNode && variableDeclarationNode.kind !== 201 /* VariableDeclaration */) { - variableDeclarationNode = variableDeclarationNode.parent; - } - ts.Debug.assert(variableDeclarationNode !== undefined); - } - else { - ts.Debug.assert(!ts.isBindingPattern(node.name)); - variableDeclarationNode = node; - name_28 = node.name; - } - if (ts.isConst(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_28), ts.ScriptElementKind.constElement); - } - else if (ts.isLet(variableDeclarationNode)) { - return createItem(node, getTextOfNode(name_28), ts.ScriptElementKind.letElement); - } - else { - return createItem(node, getTextOfNode(name_28), ts.ScriptElementKind.variableElement); - } - case 137 /* Constructor */: - return createItem(node, "constructor", ts.ScriptElementKind.constructorImplementationElement); - case 220 /* ExportSpecifier */: - case 216 /* ImportSpecifier */: - case 211 /* ImportEqualsDeclaration */: - case 213 /* ImportClause */: - case 214 /* NamespaceImport */: - return createItem(node, getTextOfNode(node.name), ts.ScriptElementKind.alias); - } - return undefined; - function createItem(node, name, scriptElementKind) { - return getNavigationBarItem(name, scriptElementKind, ts.getNodeModifiers(node), [getNodeSpan(node)]); - } - } - function isEmpty(text) { - return !text || text.trim() === ""; - } - function getNavigationBarItem(text, kind, kindModifiers, spans, childItems, indent) { - if (childItems === void 0) { childItems = []; } - if (indent === void 0) { indent = 0; } - if (isEmpty(text)) { - return undefined; - } - return { - text: text, - kind: kind, - kindModifiers: kindModifiers, - spans: spans, - childItems: childItems, - indent: indent, - bolded: false, - grayed: false - }; - } - function createTopLevelItem(node) { - switch (node.kind) { - case 230 /* SourceFile */: - return createSourceFileItem(node); - case 204 /* ClassDeclaration */: - return createClassItem(node); - case 207 /* EnumDeclaration */: - return createEnumItem(node); - case 205 /* InterfaceDeclaration */: - return createIterfaceItem(node); - case 208 /* ModuleDeclaration */: - return createModuleItem(node); - case 203 /* FunctionDeclaration */: - return createFunctionItem(node); - } - return undefined; - function getModuleName(moduleDeclaration) { - // We want to maintain quotation marks. - if (moduleDeclaration.name.kind === 8 /* StringLiteral */) { - return getTextOfNode(moduleDeclaration.name); - } - // Otherwise, we need to aggregate each identifier to build up the qualified name. - var result = []; - result.push(moduleDeclaration.name.text); - while (moduleDeclaration.body && moduleDeclaration.body.kind === 208 /* ModuleDeclaration */) { - moduleDeclaration = moduleDeclaration.body; - result.push(moduleDeclaration.name.text); - } - return result.join("."); - } - function createModuleItem(node) { - var moduleName = getModuleName(node); - var childItems = getItemsWorker(getChildNodes(getInnermostModule(node).body.statements), createChildItem); - return getNavigationBarItem(moduleName, ts.ScriptElementKind.moduleElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); - } - function createFunctionItem(node) { - if (node.body && node.body.kind === 182 /* Block */) { - var childItems = getItemsWorker(sortNodes(node.body.statements), createChildItem); - return getNavigationBarItem(!node.name ? "default" : node.name.text, ts.ScriptElementKind.functionElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); - } - return undefined; - } - function createSourceFileItem(node) { - var childItems = getItemsWorker(getChildNodes(node.statements), createChildItem); - if (childItems === undefined || childItems.length === 0) { - return undefined; - } - hasGlobalNode = true; - var rootName = ts.isExternalModule(node) - ? "\"" + ts.escapeString(ts.getBaseFileName(ts.removeFileExtension(ts.normalizePath(node.fileName)))) + "\"" - : ""; - return getNavigationBarItem(rootName, ts.ScriptElementKind.moduleElement, ts.ScriptElementKindModifier.none, [getNodeSpan(node)], childItems); - } - function createClassItem(node) { - var childItems; - if (node.members) { - var constructor = ts.forEach(node.members, function (member) { - return member.kind === 137 /* Constructor */ && member; - }); - // Add the constructor parameters in as children of the class (for property parameters). - // Note that *all non-binding pattern named* parameters will be added to the nodes array, but parameters that - // are not properties will be filtered out later by createChildItem. - var nodes = removeDynamicallyNamedProperties(node); - if (constructor) { - nodes.push.apply(nodes, ts.filter(constructor.parameters, function (p) { return !ts.isBindingPattern(p.name); })); - } - childItems = getItemsWorker(sortNodes(nodes), createChildItem); - } - var nodeName = !node.name ? "default" : node.name.text; - return getNavigationBarItem(nodeName, ts.ScriptElementKind.classElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); - } - function createEnumItem(node) { - var childItems = getItemsWorker(sortNodes(removeComputedProperties(node)), createChildItem); - return getNavigationBarItem(node.name.text, ts.ScriptElementKind.enumElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); - } - function createIterfaceItem(node) { - var childItems = getItemsWorker(sortNodes(removeDynamicallyNamedProperties(node)), createChildItem); - return getNavigationBarItem(node.name.text, ts.ScriptElementKind.interfaceElement, ts.getNodeModifiers(node), [getNodeSpan(node)], childItems, getIndent(node)); - } - } - function removeComputedProperties(node) { - return ts.filter(node.members, function (member) { return member.name === undefined || member.name.kind !== 129 /* ComputedPropertyName */; }); - } - /** - * Like removeComputedProperties, but retains the properties with well known symbol names - */ - function removeDynamicallyNamedProperties(node) { - return ts.filter(node.members, function (member) { return !ts.hasDynamicName(member); }); - } - function getInnermostModule(node) { - while (node.body.kind === 208 /* ModuleDeclaration */) { - node = node.body; - } - return node; - } - function getNodeSpan(node) { - return node.kind === 230 /* SourceFile */ - ? ts.createTextSpanFromBounds(node.getFullStart(), node.getEnd()) - : ts.createTextSpanFromBounds(node.getStart(), node.getEnd()); - } - function getTextOfNode(node) { - return ts.getTextOfNodeFromSourceText(sourceFile.text, node); - } - } - NavigationBar.getNavigationBarItems = getNavigationBarItems; - })(NavigationBar = ts.NavigationBar || (ts.NavigationBar = {})); -})(ts || (ts = {})); -/* @internal */ -var ts; -(function (ts) { - // Note(cyrusn): this enum is ordered from strongest match type to weakest match type. - (function (PatternMatchKind) { - PatternMatchKind[PatternMatchKind["exact"] = 0] = "exact"; - PatternMatchKind[PatternMatchKind["prefix"] = 1] = "prefix"; - PatternMatchKind[PatternMatchKind["substring"] = 2] = "substring"; - PatternMatchKind[PatternMatchKind["camelCase"] = 3] = "camelCase"; - })(ts.PatternMatchKind || (ts.PatternMatchKind = {})); - var PatternMatchKind = ts.PatternMatchKind; - function createPatternMatch(kind, punctuationStripped, isCaseSensitive, camelCaseWeight) { - return { - kind: kind, - punctuationStripped: punctuationStripped, - isCaseSensitive: isCaseSensitive, - camelCaseWeight: camelCaseWeight - }; - } - function createPatternMatcher(pattern) { - // We'll often see the same candidate string many times when searching (For example, when - // we see the name of a module that is used everywhere, or the name of an overload). As - // such, we cache the information we compute about the candidate for the life of this - // pattern matcher so we don't have to compute it multiple times. - var stringToWordSpans = {}; - pattern = pattern.trim(); - var fullPatternSegment = createSegment(pattern); - var dotSeparatedSegments = pattern.split(".").map(function (p) { return createSegment(p.trim()); }); - var invalidPattern = dotSeparatedSegments.length === 0 || ts.forEach(dotSeparatedSegments, segmentIsInvalid); - return { - getMatches: getMatches, - getMatchesForLastSegmentOfPattern: getMatchesForLastSegmentOfPattern, - patternContainsDots: dotSeparatedSegments.length > 1 - }; - // Quick checks so we can bail out when asked to match a candidate. - function skipMatch(candidate) { - return invalidPattern || !candidate; - } - function getMatchesForLastSegmentOfPattern(candidate) { - if (skipMatch(candidate)) { - return undefined; - } - return matchSegment(candidate, ts.lastOrUndefined(dotSeparatedSegments)); - } - function getMatches(candidateContainers, candidate) { - if (skipMatch(candidate)) { - return undefined; - } - // First, check that the last part of the dot separated pattern matches the name of the - // candidate. If not, then there's no point in proceeding and doing the more - // expensive work. - var candidateMatch = matchSegment(candidate, ts.lastOrUndefined(dotSeparatedSegments)); - if (!candidateMatch) { - return undefined; - } - candidateContainers = candidateContainers || []; - // -1 because the last part was checked against the name, and only the rest - // of the parts are checked against the container. - if (dotSeparatedSegments.length - 1 > candidateContainers.length) { - // There weren't enough container parts to match against the pattern parts. - // So this definitely doesn't match. - return undefined; - } - // So far so good. Now break up the container for the candidate and check if all - // the dotted parts match up correctly. - var totalMatch = candidateMatch; - for (var i = dotSeparatedSegments.length - 2, j = candidateContainers.length - 1; i >= 0; i--, j--) { - var segment = dotSeparatedSegments[i]; - var containerName = candidateContainers[j]; - var containerMatch = matchSegment(containerName, segment); - if (!containerMatch) { - // This container didn't match the pattern piece. So there's no match at all. - return undefined; - } - ts.addRange(totalMatch, containerMatch); - } - // Success, this symbol's full name matched against the dotted name the user was asking - // about. - return totalMatch; - } - function getWordSpans(word) { - if (!ts.hasProperty(stringToWordSpans, word)) { - stringToWordSpans[word] = breakIntoWordSpans(word); - } - return stringToWordSpans[word]; - } - function matchTextChunk(candidate, chunk, punctuationStripped) { - var index = indexOfIgnoringCase(candidate, chunk.textLowerCase); - if (index === 0) { - if (chunk.text.length === candidate.length) { - // a) Check if the part matches the candidate entirely, in an case insensitive or - // sensitive manner. If it does, return that there was an exact match. - return createPatternMatch(PatternMatchKind.exact, punctuationStripped, candidate === chunk.text); - } - else { - // b) Check if the part is a prefix of the candidate, in a case insensitive or sensitive - // manner. If it does, return that there was a prefix match. - return createPatternMatch(PatternMatchKind.prefix, punctuationStripped, startsWith(candidate, chunk.text)); - } - } - var isLowercase = chunk.isLowerCase; - if (isLowercase) { - if (index > 0) { - // c) If the part is entirely lowercase, then check if it is contained anywhere in the - // candidate in a case insensitive manner. If so, return that there was a substring - // match. - // - // Note: We only have a substring match if the lowercase part is prefix match of some - // word part. That way we don't match something like 'Class' when the user types 'a'. - // But we would match 'FooAttribute' (since 'Attribute' starts with 'a'). - var wordSpans = getWordSpans(candidate); - for (var _i = 0; _i < wordSpans.length; _i++) { - var span = wordSpans[_i]; - if (partStartsWith(candidate, span, chunk.text, true)) { - return createPatternMatch(PatternMatchKind.substring, punctuationStripped, - /*isCaseSensitive:*/ partStartsWith(candidate, span, chunk.text, false)); - } - } - } - } - else { - // d) If the part was not entirely lowercase, then check if it is contained in the - // candidate in a case *sensitive* manner. If so, return that there was a substring - // match. - if (candidate.indexOf(chunk.text) > 0) { - return createPatternMatch(PatternMatchKind.substring, punctuationStripped, true); - } - } - if (!isLowercase) { - // e) If the part was not entirely lowercase, then attempt a camel cased match as well. - if (chunk.characterSpans.length > 0) { - var candidateParts = getWordSpans(candidate); - var camelCaseWeight = tryCamelCaseMatch(candidate, candidateParts, chunk, false); - if (camelCaseWeight !== undefined) { - return createPatternMatch(PatternMatchKind.camelCase, punctuationStripped, true, camelCaseWeight); - } - camelCaseWeight = tryCamelCaseMatch(candidate, candidateParts, chunk, true); - if (camelCaseWeight !== undefined) { - return createPatternMatch(PatternMatchKind.camelCase, punctuationStripped, false, camelCaseWeight); - } - } - } - if (isLowercase) { - // f) Is the pattern a substring of the candidate starting on one of the candidate's word boundaries? - // We could check every character boundary start of the candidate for the pattern. However, that's - // an m * n operation in the wost case. Instead, find the first instance of the pattern - // substring, and see if it starts on a capital letter. It seems unlikely that the user will try to - // filter the list based on a substring that starts on a capital letter and also with a lowercase one. - // (Pattern: fogbar, Candidate: quuxfogbarFogBar). - if (chunk.text.length < candidate.length) { - if (index > 0 && isUpperCaseLetter(candidate.charCodeAt(index))) { - return createPatternMatch(PatternMatchKind.substring, punctuationStripped, false); - } - } - } - return undefined; - } - function containsSpaceOrAsterisk(text) { - for (var i = 0; i < text.length; i++) { - var ch = text.charCodeAt(i); - if (ch === 32 /* space */ || ch === 42 /* asterisk */) { - return true; - } - } - return false; - } - function matchSegment(candidate, segment) { - // First check if the segment matches as is. This is also useful if the segment contains - // characters we would normally strip when splitting into parts that we also may want to - // match in the candidate. For example if the segment is "@int" and the candidate is - // "@int", then that will show up as an exact match here. - // - // Note: if the segment contains a space or an asterisk then we must assume that it's a - // multi-word segment. - if (!containsSpaceOrAsterisk(segment.totalTextChunk.text)) { - var match = matchTextChunk(candidate, segment.totalTextChunk, false); - if (match) { - return [match]; - } - } - // The logic for pattern matching is now as follows: - // - // 1) Break the segment passed in into words. Breaking is rather simple and a - // good way to think about it that if gives you all the individual alphanumeric words - // of the pattern. - // - // 2) For each word try to match the word against the candidate value. - // - // 3) Matching is as follows: - // - // a) Check if the word matches the candidate entirely, in an case insensitive or - // sensitive manner. If it does, return that there was an exact match. - // - // b) Check if the word is a prefix of the candidate, in a case insensitive or - // sensitive manner. If it does, return that there was a prefix match. - // - // c) If the word is entirely lowercase, then check if it is contained anywhere in the - // candidate in a case insensitive manner. If so, return that there was a substring - // match. - // - // Note: We only have a substring match if the lowercase part is prefix match of - // some word part. That way we don't match something like 'Class' when the user - // types 'a'. But we would match 'FooAttribute' (since 'Attribute' starts with - // 'a'). - // - // d) If the word was not entirely lowercase, then check if it is contained in the - // candidate in a case *sensitive* manner. If so, return that there was a substring - // match. - // - // e) If the word was not entirely lowercase, then attempt a camel cased match as - // well. - // - // f) The word is all lower case. Is it a case insensitive substring of the candidate starting - // on a part boundary of the candidate? - // - // Only if all words have some sort of match is the pattern considered matched. - var subWordTextChunks = segment.subWordTextChunks; - var matches = undefined; - for (var _i = 0; _i < subWordTextChunks.length; _i++) { - var subWordTextChunk = subWordTextChunks[_i]; - // Try to match the candidate with this word - var result = matchTextChunk(candidate, subWordTextChunk, true); - if (!result) { - return undefined; - } - matches = matches || []; - matches.push(result); - } - return matches; - } - function partStartsWith(candidate, candidateSpan, pattern, ignoreCase, patternSpan) { - var patternPartStart = patternSpan ? patternSpan.start : 0; - var patternPartLength = patternSpan ? patternSpan.length : pattern.length; - if (patternPartLength > candidateSpan.length) { - // Pattern part is longer than the candidate part. There can never be a match. - return false; - } - if (ignoreCase) { - for (var i = 0; i < patternPartLength; i++) { - var ch1 = pattern.charCodeAt(patternPartStart + i); - var ch2 = candidate.charCodeAt(candidateSpan.start + i); - if (toLowerCase(ch1) !== toLowerCase(ch2)) { - return false; - } - } - } - else { - for (var i = 0; i < patternPartLength; i++) { - var ch1 = pattern.charCodeAt(patternPartStart + i); - var ch2 = candidate.charCodeAt(candidateSpan.start + i); - if (ch1 !== ch2) { - return false; - } - } - } - return true; - } - function tryCamelCaseMatch(candidate, candidateParts, chunk, ignoreCase) { - var chunkCharacterSpans = chunk.characterSpans; - // Note: we may have more pattern parts than candidate parts. This is because multiple - // pattern parts may match a candidate part. For example "SiUI" against "SimpleUI". - // We'll have 3 pattern parts Si/U/I against two candidate parts Simple/UI. However, U - // and I will both match in UI. - var currentCandidate = 0; - var currentChunkSpan = 0; - var firstMatch = undefined; - var contiguous = undefined; - while (true) { - // Let's consider our termination cases - if (currentChunkSpan === chunkCharacterSpans.length) { - // We did match! We shall assign a weight to this - var weight = 0; - // Was this contiguous? - if (contiguous) { - weight += 1; - } - // Did we start at the beginning of the candidate? - if (firstMatch === 0) { - weight += 2; - } - return weight; - } - else if (currentCandidate === candidateParts.length) { - // No match, since we still have more of the pattern to hit - return undefined; - } - var candidatePart = candidateParts[currentCandidate]; - var gotOneMatchThisCandidate = false; - // Consider the case of matching SiUI against SimpleUIElement. The candidate parts - // will be Simple/UI/Element, and the pattern parts will be Si/U/I. We'll match 'Si' - // against 'Simple' first. Then we'll match 'U' against 'UI'. However, we want to - // still keep matching pattern parts against that candidate part. - for (; currentChunkSpan < chunkCharacterSpans.length; currentChunkSpan++) { - var chunkCharacterSpan = chunkCharacterSpans[currentChunkSpan]; - if (gotOneMatchThisCandidate) { - // We've already gotten one pattern part match in this candidate. We will - // only continue trying to consumer pattern parts if the last part and this - // part are both upper case. - if (!isUpperCaseLetter(chunk.text.charCodeAt(chunkCharacterSpans[currentChunkSpan - 1].start)) || - !isUpperCaseLetter(chunk.text.charCodeAt(chunkCharacterSpans[currentChunkSpan].start))) { - break; - } - } - if (!partStartsWith(candidate, candidatePart, chunk.text, ignoreCase, chunkCharacterSpan)) { - break; - } - gotOneMatchThisCandidate = true; - firstMatch = firstMatch === undefined ? currentCandidate : firstMatch; - // If we were contiguous, then keep that value. If we weren't, then keep that - // value. If we don't know, then set the value to 'true' as an initial match is - // obviously contiguous. - contiguous = contiguous === undefined ? true : contiguous; - candidatePart = ts.createTextSpan(candidatePart.start + chunkCharacterSpan.length, candidatePart.length - chunkCharacterSpan.length); - } - // Check if we matched anything at all. If we didn't, then we need to unset the - // contiguous bit if we currently had it set. - // If we haven't set the bit yet, then that means we haven't matched anything so - // far, and we don't want to change that. - if (!gotOneMatchThisCandidate && contiguous !== undefined) { - contiguous = false; - } - // Move onto the next candidate. - currentCandidate++; - } - } - } - ts.createPatternMatcher = createPatternMatcher; - // Helper function to compare two matches to determine which is better. Matches are first - // ordered by kind (so all prefix matches always beat all substring matches). Then, if the - // match is a camel case match, the relative weights of the match are used to determine - // which is better (with a greater weight being better). Then if the match is of the same - // type, then a case sensitive match is considered better than an insensitive one. - function patternMatchCompareTo(match1, match2) { - return compareType(match1, match2) || - compareCamelCase(match1, match2) || - compareCase(match1, match2) || - comparePunctuation(match1, match2); - } - function comparePunctuation(result1, result2) { - // Consider a match to be better if it was successful without stripping punctuation - // versus a match that had to strip punctuation to succeed. - if (result1.punctuationStripped !== result2.punctuationStripped) { - return result1.punctuationStripped ? 1 : -1; - } - return 0; - } - function compareCase(result1, result2) { - if (result1.isCaseSensitive !== result2.isCaseSensitive) { - return result1.isCaseSensitive ? -1 : 1; - } - return 0; - } - function compareType(result1, result2) { - return result1.kind - result2.kind; - } - function compareCamelCase(result1, result2) { - if (result1.kind === PatternMatchKind.camelCase && result2.kind === PatternMatchKind.camelCase) { - // Swap the values here. If result1 has a higher weight, then we want it to come - // first. - return result2.camelCaseWeight - result1.camelCaseWeight; - } - return 0; - } - function createSegment(text) { - return { - totalTextChunk: createTextChunk(text), - subWordTextChunks: breakPatternIntoTextChunks(text) - }; - } - // A segment is considered invalid if we couldn't find any words in it. - function segmentIsInvalid(segment) { - return segment.subWordTextChunks.length === 0; - } - function isUpperCaseLetter(ch) { - // Fast check for the ascii range. - if (ch >= 65 /* A */ && ch <= 90 /* Z */) { - return true; - } - if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 2 /* Latest */)) { - return false; - } - // TODO: find a way to determine this for any unicode characters in a - // non-allocating manner. - var str = String.fromCharCode(ch); - return str === str.toUpperCase(); - } - function isLowerCaseLetter(ch) { - // Fast check for the ascii range. - if (ch >= 97 /* a */ && ch <= 122 /* z */) { - return true; - } - if (ch < 127 /* maxAsciiCharacter */ || !ts.isUnicodeIdentifierStart(ch, 2 /* Latest */)) { - return false; - } - // TODO: find a way to determine this for any unicode characters in a - // non-allocating manner. - var str = String.fromCharCode(ch); - return str === str.toLowerCase(); - } - function containsUpperCaseLetter(string) { - for (var i = 0, n = string.length; i < n; i++) { - if (isUpperCaseLetter(string.charCodeAt(i))) { - return true; - } - } - return false; - } - function startsWith(string, search) { - for (var i = 0, n = search.length; i < n; i++) { - if (string.charCodeAt(i) !== search.charCodeAt(i)) { - return false; - } - } - return true; - } - // Assumes 'value' is already lowercase. - function indexOfIgnoringCase(string, value) { - for (var i = 0, n = string.length - value.length; i <= n; i++) { - if (startsWithIgnoringCase(string, value, i)) { - return i; - } - } - return -1; - } - // Assumes 'value' is already lowercase. - function startsWithIgnoringCase(string, value, start) { - for (var i = 0, n = value.length; i < n; i++) { - var ch1 = toLowerCase(string.charCodeAt(i + start)); - var ch2 = value.charCodeAt(i); - if (ch1 !== ch2) { - return false; - } - } - return true; - } - function toLowerCase(ch) { - // Fast convert for the ascii range. - if (ch >= 65 /* A */ && ch <= 90 /* Z */) { - return 97 /* a */ + (ch - 65 /* A */); - } - if (ch < 127 /* maxAsciiCharacter */) { - return ch; - } - // TODO: find a way to compute this for any unicode characters in a - // non-allocating manner. - return String.fromCharCode(ch).toLowerCase().charCodeAt(0); - } - function isDigit(ch) { - // TODO(cyrusn): Find a way to support this for unicode digits. - return ch >= 48 /* _0 */ && ch <= 57 /* _9 */; - } - function isWordChar(ch) { - return isUpperCaseLetter(ch) || isLowerCaseLetter(ch) || isDigit(ch) || ch === 95 /* _ */ || ch === 36 /* $ */; - } - function breakPatternIntoTextChunks(pattern) { - var result = []; - var wordStart = 0; - var wordLength = 0; - for (var i = 0; i < pattern.length; i++) { - var ch = pattern.charCodeAt(i); - if (isWordChar(ch)) { - if (wordLength++ === 0) { - wordStart = i; - } - } - else { - if (wordLength > 0) { - result.push(createTextChunk(pattern.substr(wordStart, wordLength))); - wordLength = 0; - } - } - } - if (wordLength > 0) { - result.push(createTextChunk(pattern.substr(wordStart, wordLength))); - } - return result; - } - function createTextChunk(text) { - var textLowerCase = text.toLowerCase(); - return { - text: text, - textLowerCase: textLowerCase, - isLowerCase: text === textLowerCase, - characterSpans: breakIntoCharacterSpans(text) - }; - } - /* @internal */ function breakIntoCharacterSpans(identifier) { - return breakIntoSpans(identifier, false); - } - ts.breakIntoCharacterSpans = breakIntoCharacterSpans; - /* @internal */ function breakIntoWordSpans(identifier) { - return breakIntoSpans(identifier, true); - } - ts.breakIntoWordSpans = breakIntoWordSpans; - function breakIntoSpans(identifier, word) { - var result = []; - var wordStart = 0; - for (var i = 1, n = identifier.length; i < n; i++) { - var lastIsDigit = isDigit(identifier.charCodeAt(i - 1)); - var currentIsDigit = isDigit(identifier.charCodeAt(i)); - var hasTransitionFromLowerToUpper = transitionFromLowerToUpper(identifier, word, i); - var hasTransitionFromUpperToLower = transitionFromUpperToLower(identifier, word, i, wordStart); - if (charIsPunctuation(identifier.charCodeAt(i - 1)) || - charIsPunctuation(identifier.charCodeAt(i)) || - lastIsDigit != currentIsDigit || - hasTransitionFromLowerToUpper || - hasTransitionFromUpperToLower) { - if (!isAllPunctuation(identifier, wordStart, i)) { - result.push(ts.createTextSpan(wordStart, i - wordStart)); - } - wordStart = i; - } - } - if (!isAllPunctuation(identifier, wordStart, identifier.length)) { - result.push(ts.createTextSpan(wordStart, identifier.length - wordStart)); - } - return result; - } - function charIsPunctuation(ch) { - switch (ch) { - case 33 /* exclamation */: - case 34 /* doubleQuote */: - case 35 /* hash */: - case 37 /* percent */: - case 38 /* ampersand */: - case 39 /* singleQuote */: - case 40 /* openParen */: - case 41 /* closeParen */: - case 42 /* asterisk */: - case 44 /* comma */: - case 45 /* minus */: - case 46 /* dot */: - case 47 /* slash */: - case 58 /* colon */: - case 59 /* semicolon */: - case 63 /* question */: - case 64 /* at */: - case 91 /* openBracket */: - case 92 /* backslash */: - case 93 /* closeBracket */: - case 95 /* _ */: - case 123 /* openBrace */: - case 125 /* closeBrace */: - return true; - } - return false; - } - function isAllPunctuation(identifier, start, end) { - for (var i = start; i < end; i++) { - var ch = identifier.charCodeAt(i); - // We don't consider _ or $ as punctuation as there may be things with that name. - if (!charIsPunctuation(ch) || ch === 95 /* _ */ || ch === 36 /* $ */) { - return false; - } - } - return true; - } - function transitionFromUpperToLower(identifier, word, index, wordStart) { - if (word) { - // Cases this supports: - // 1) IDisposable -> I, Disposable - // 2) UIElement -> UI, Element - // 3) HTMLDocument -> HTML, Document - // - // etc. - if (index != wordStart && - index + 1 < identifier.length) { - var currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index)); - var nextIsLower = isLowerCaseLetter(identifier.charCodeAt(index + 1)); - if (currentIsUpper && nextIsLower) { - // We have a transition from an upper to a lower letter here. But we only - // want to break if all the letters that preceded are uppercase. i.e. if we - // have "Foo" we don't want to break that into "F, oo". But if we have - // "IFoo" or "UIFoo", then we want to break that into "I, Foo" and "UI, - // Foo". i.e. the last uppercase letter belongs to the lowercase letters - // that follows. Note: this will make the following not split properly: - // "HELLOthere". However, these sorts of names do not show up in .Net - // programs. - for (var i = wordStart; i < index; i++) { - if (!isUpperCaseLetter(identifier.charCodeAt(i))) { - return false; - } - } - return true; - } - } - } - return false; - } - function transitionFromLowerToUpper(identifier, word, index) { - var lastIsUpper = isUpperCaseLetter(identifier.charCodeAt(index - 1)); - var currentIsUpper = isUpperCaseLetter(identifier.charCodeAt(index)); - // See if the casing indicates we're starting a new word. Note: if we're breaking on - // words, then just seeing an upper case character isn't enough. Instead, it has to - // be uppercase and the previous character can't be uppercase. - // - // For example, breaking "AddMetadata" on words would make: Add Metadata - // - // on characters would be: A dd M etadata - // - // Break "AM" on words would be: AM - // - // on characters would be: A M - // - // We break the search string on characters. But we break the symbol name on words. - var transition = word - ? (currentIsUpper && !lastIsUpper) - : currentIsUpper; - return transition; - } -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var SignatureHelp; - (function (SignatureHelp) { - // A partially written generic type expression is not guaranteed to have the correct syntax tree. the expression could be parsed as less than/greater than expression or a comma expression - // or some other combination depending on what the user has typed so far. For the purposes of signature help we need to consider any location after "<" as a possible generic type reference. - // To do this, the method will back parse the expression starting at the position required. it will try to parse the current expression as a generic type expression, if it did succeed it - // will return the generic identifier that started the expression (e.g. "foo" in "foo(#a, b) -> The token introduces a list, and should begin a sig help session - // Case 2: - // fo#o#(a, b)# -> The token is either not associated with a list, or ends a list, so the session should end - // Case 3: - // foo(a#, #b#) -> The token is buried inside a list, and should give sig help - // Find out if 'node' is an argument, a type argument, or neither - if (node.kind === 24 /* LessThanToken */ || - node.kind === 16 /* OpenParenToken */) { - // Find the list that starts right *after* the < or ( token. - // If the user has just opened a list, consider this item 0. - var list = getChildListThatStartsWithOpenerToken(callExpression, node, sourceFile); - var isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === list.pos; - ts.Debug.assert(list !== undefined); - return { - kind: isTypeArgList ? 0 /* TypeArguments */ : 1 /* CallArguments */, - invocation: callExpression, - argumentsSpan: getApplicableSpanForArguments(list), - argumentIndex: 0, - argumentCount: getArgumentCount(list) - }; - } - // findListItemInfo can return undefined if we are not in parent's argument list - // or type argument list. This includes cases where the cursor is: - // - To the right of the closing paren, non-substitution template, or template tail. - // - Between the type arguments and the arguments (greater than token) - // - On the target of the call (parent.func) - // - On the 'new' keyword in a 'new' expression - var listItemInfo = ts.findListItemInfo(node); - if (listItemInfo) { - var list = listItemInfo.list; - var isTypeArgList = callExpression.typeArguments && callExpression.typeArguments.pos === list.pos; - var argumentIndex = getArgumentIndex(list, node); - var argumentCount = getArgumentCount(list); - ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); - return { - kind: isTypeArgList ? 0 /* TypeArguments */ : 1 /* CallArguments */, - invocation: callExpression, - argumentsSpan: getApplicableSpanForArguments(list), - argumentIndex: argumentIndex, - argumentCount: argumentCount - }; - } - } - else if (node.kind === 10 /* NoSubstitutionTemplateLiteral */ && node.parent.kind === 162 /* TaggedTemplateExpression */) { - // Check if we're actually inside the template; - // otherwise we'll fall out and return undefined. - if (ts.isInsideTemplateLiteral(node, position)) { - return getArgumentListInfoForTemplate(node.parent, 0); - } - } - else if (node.kind === 11 /* TemplateHead */ && node.parent.parent.kind === 162 /* TaggedTemplateExpression */) { - var templateExpression = node.parent; - var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 174 /* TemplateExpression */); - var argumentIndex = ts.isInsideTemplateLiteral(node, position) ? 0 : 1; - return getArgumentListInfoForTemplate(tagExpression, argumentIndex); - } - else if (node.parent.kind === 180 /* TemplateSpan */ && node.parent.parent.parent.kind === 162 /* TaggedTemplateExpression */) { - var templateSpan = node.parent; - var templateExpression = templateSpan.parent; - var tagExpression = templateExpression.parent; - ts.Debug.assert(templateExpression.kind === 174 /* TemplateExpression */); - // If we're just after a template tail, don't show signature help. - if (node.kind === 13 /* TemplateTail */ && !ts.isInsideTemplateLiteral(node, position)) { - return undefined; - } - var spanIndex = templateExpression.templateSpans.indexOf(templateSpan); - var argumentIndex = getArgumentIndexForTemplatePiece(spanIndex, node); - return getArgumentListInfoForTemplate(tagExpression, argumentIndex); - } - return undefined; - } - function getArgumentIndex(argumentsList, node) { - // The list we got back can include commas. In the presence of errors it may - // also just have nodes without commas. For example "Foo(a b c)" will have 3 - // args without commas. We want to find what index we're at. So we count - // forward until we hit ourselves, only incrementing the index if it isn't a - // comma. - // - // Note: the subtlety around trailing commas (in getArgumentCount) does not apply - // here. That's because we're only walking forward until we hit the node we're - // on. In that case, even if we're after the trailing comma, we'll still see - // that trailing comma in the list, and we'll have generated the appropriate - // arg index. - var argumentIndex = 0; - var listChildren = argumentsList.getChildren(); - for (var _i = 0; _i < listChildren.length; _i++) { - var child = listChildren[_i]; - if (child === node) { - break; - } - if (child.kind !== 23 /* CommaToken */) { - argumentIndex++; - } - } - return argumentIndex; - } - function getArgumentCount(argumentsList) { - // The argument count for a list is normally the number of non-comma children it has. - // For example, if you have "Foo(a,b)" then there will be three children of the arg - // list 'a' '' 'b'. So, in this case the arg count will be 2. However, there - // is a small subtlety. If you have "Foo(a,)", then the child list will just have - // 'a' ''. So, in the case where the last child is a comma, we increase the - // arg count by one to compensate. - // - // Note: this subtlety only applies to the last comma. If you had "Foo(a,," then - // we'll have: 'a' '' '' - // That will give us 2 non-commas. We then add one for the last comma, givin us an - // arg count of 3. - var listChildren = argumentsList.getChildren(); - var argumentCount = ts.countWhere(listChildren, function (arg) { return arg.kind !== 23 /* CommaToken */; }); - if (listChildren.length > 0 && ts.lastOrUndefined(listChildren).kind === 23 /* CommaToken */) { - argumentCount++; - } - return argumentCount; - } - // spanIndex is either the index for a given template span. - // This does not give appropriate results for a NoSubstitutionTemplateLiteral - function getArgumentIndexForTemplatePiece(spanIndex, node) { - // Because the TemplateStringsArray is the first argument, we have to offset each substitution expression by 1. - // There are three cases we can encounter: - // 1. We are precisely in the template literal (argIndex = 0). - // 2. We are in or to the right of the substitution expression (argIndex = spanIndex + 1). - // 3. We are directly to the right of the template literal, but because we look for the token on the left, - // not enough to put us in the substitution expression; we should consider ourselves part of - // the *next* span's expression by offsetting the index (argIndex = (spanIndex + 1) + 1). - // - // Example: f `# abcd $#{# 1 + 1# }# efghi ${ #"#hello"# } # ` - // ^ ^ ^ ^ ^ ^ ^ ^ ^ - // Case: 1 1 3 2 1 3 2 2 1 - ts.Debug.assert(position >= node.getStart(), "Assumed 'position' could not occur before node."); - if (ts.isTemplateLiteralKind(node.kind)) { - if (ts.isInsideTemplateLiteral(node, position)) { - return 0; - } - return spanIndex + 2; - } - return spanIndex + 1; - } - function getArgumentListInfoForTemplate(tagExpression, argumentIndex) { - // argumentCount is either 1 or (numSpans + 1) to account for the template strings array argument. - var argumentCount = tagExpression.template.kind === 10 /* NoSubstitutionTemplateLiteral */ - ? 1 - : tagExpression.template.templateSpans.length + 1; - ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); - return { - kind: 2 /* TaggedTemplateArguments */, - invocation: tagExpression, - argumentsSpan: getApplicableSpanForTaggedTemplate(tagExpression), - argumentIndex: argumentIndex, - argumentCount: argumentCount - }; - } - function getApplicableSpanForArguments(argumentsList) { - // We use full start and skip trivia on the end because we want to include trivia on - // both sides. For example, - // - // foo( /*comment */ a, b, c /*comment*/ ) - // | | - // - // The applicable span is from the first bar to the second bar (inclusive, - // but not including parentheses) - var applicableSpanStart = argumentsList.getFullStart(); - var applicableSpanEnd = ts.skipTrivia(sourceFile.text, argumentsList.getEnd(), false); - return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); - } - function getApplicableSpanForTaggedTemplate(taggedTemplate) { - var template = taggedTemplate.template; - var applicableSpanStart = template.getStart(); - var applicableSpanEnd = template.getEnd(); - // We need to adjust the end position for the case where the template does not have a tail. - // Otherwise, we will not show signature help past the expression. - // For example, - // - // ` ${ 1 + 1 foo(10) - // | | - // - // This is because a Missing node has no width. However, what we actually want is to include trivia - // leading up to the next token in case the user is about to type in a TemplateMiddle or TemplateTail. - if (template.kind === 174 /* TemplateExpression */) { - var lastSpan = ts.lastOrUndefined(template.templateSpans); - if (lastSpan.literal.getFullWidth() === 0) { - applicableSpanEnd = ts.skipTrivia(sourceFile.text, applicableSpanEnd, false); - } - } - return ts.createTextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart); - } - function getContainingArgumentInfo(node) { - for (var n = node; n.kind !== 230 /* SourceFile */; n = n.parent) { - if (ts.isFunctionBlock(n)) { - return undefined; - } - // If the node is not a subspan of its parent, this is a big problem. - // There have been crashes that might be caused by this violation. - if (n.pos < n.parent.pos || n.end > n.parent.end) { - ts.Debug.fail("Node of kind " + n.kind + " is not a subspan of its parent of kind " + n.parent.kind); - } - var argumentInfo_1 = getImmediatelyContainingArgumentInfo(n); - if (argumentInfo_1) { - return argumentInfo_1; - } - } - return undefined; - } - function getChildListThatStartsWithOpenerToken(parent, openerToken, sourceFile) { - var children = parent.getChildren(sourceFile); - var indexOfOpenerToken = children.indexOf(openerToken); - ts.Debug.assert(indexOfOpenerToken >= 0 && children.length > indexOfOpenerToken + 1); - return children[indexOfOpenerToken + 1]; - } - /** - * The selectedItemIndex could be negative for several reasons. - * 1. There are too many arguments for all of the overloads - * 2. None of the overloads were type compatible - * The solution here is to try to pick the best overload by picking - * either the first one that has an appropriate number of parameters, - * or the one with the most parameters. - */ - function selectBestInvalidOverloadIndex(candidates, argumentCount) { - var maxParamsSignatureIndex = -1; - var maxParams = -1; - for (var i = 0; i < candidates.length; i++) { - var candidate = candidates[i]; - if (candidate.hasRestParameter || candidate.parameters.length >= argumentCount) { - return i; - } - if (candidate.parameters.length > maxParams) { - maxParams = candidate.parameters.length; - maxParamsSignatureIndex = i; - } - } - return maxParamsSignatureIndex; - } - function createSignatureHelpItems(candidates, bestSignature, argumentListInfo) { - var applicableSpan = argumentListInfo.argumentsSpan; - var isTypeParameterList = argumentListInfo.kind === 0 /* TypeArguments */; - var invocation = argumentListInfo.invocation; - var callTarget = ts.getInvokedExpression(invocation); - var callTargetSymbol = typeChecker.getSymbolAtLocation(callTarget); - var callTargetDisplayParts = callTargetSymbol && ts.symbolToDisplayParts(typeChecker, callTargetSymbol, undefined, undefined); - var items = ts.map(candidates, function (candidateSignature) { - var signatureHelpParameters; - var prefixDisplayParts = []; - var suffixDisplayParts = []; - if (callTargetDisplayParts) { - prefixDisplayParts.push.apply(prefixDisplayParts, callTargetDisplayParts); - } - if (isTypeParameterList) { - prefixDisplayParts.push(ts.punctuationPart(24 /* LessThanToken */)); - var typeParameters = candidateSignature.typeParameters; - signatureHelpParameters = typeParameters && typeParameters.length > 0 ? ts.map(typeParameters, createSignatureHelpParameterForTypeParameter) : emptyArray; - suffixDisplayParts.push(ts.punctuationPart(25 /* GreaterThanToken */)); - var parameterParts = ts.mapToDisplayParts(function (writer) { - return typeChecker.getSymbolDisplayBuilder().buildDisplayForParametersAndDelimiters(candidateSignature.parameters, writer, invocation); - }); - suffixDisplayParts.push.apply(suffixDisplayParts, parameterParts); - } - else { - var typeParameterParts = ts.mapToDisplayParts(function (writer) { - return typeChecker.getSymbolDisplayBuilder().buildDisplayForTypeParametersAndDelimiters(candidateSignature.typeParameters, writer, invocation); - }); - prefixDisplayParts.push.apply(prefixDisplayParts, typeParameterParts); - prefixDisplayParts.push(ts.punctuationPart(16 /* OpenParenToken */)); - var parameters = candidateSignature.parameters; - signatureHelpParameters = parameters.length > 0 ? ts.map(parameters, createSignatureHelpParameterForParameter) : emptyArray; - suffixDisplayParts.push(ts.punctuationPart(17 /* CloseParenToken */)); - } - var returnTypeParts = ts.mapToDisplayParts(function (writer) { - return typeChecker.getSymbolDisplayBuilder().buildReturnTypeDisplay(candidateSignature, writer, invocation); - }); - suffixDisplayParts.push.apply(suffixDisplayParts, returnTypeParts); - return { - isVariadic: candidateSignature.hasRestParameter, - prefixDisplayParts: prefixDisplayParts, - suffixDisplayParts: suffixDisplayParts, - separatorDisplayParts: [ts.punctuationPart(23 /* CommaToken */), ts.spacePart()], - parameters: signatureHelpParameters, - documentation: candidateSignature.getDocumentationComment() - }; - }); - var argumentIndex = argumentListInfo.argumentIndex; - // argumentCount is the *apparent* number of arguments. - var argumentCount = argumentListInfo.argumentCount; - var selectedItemIndex = candidates.indexOf(bestSignature); - if (selectedItemIndex < 0) { - selectedItemIndex = selectBestInvalidOverloadIndex(candidates, argumentCount); - } - ts.Debug.assert(argumentIndex === 0 || argumentIndex < argumentCount, "argumentCount < argumentIndex, " + argumentCount + " < " + argumentIndex); - return { - items: items, - applicableSpan: applicableSpan, - selectedItemIndex: selectedItemIndex, - argumentIndex: argumentIndex, - argumentCount: argumentCount - }; - function createSignatureHelpParameterForParameter(parameter) { - var displayParts = ts.mapToDisplayParts(function (writer) { - return typeChecker.getSymbolDisplayBuilder().buildParameterDisplay(parameter, writer, invocation); - }); - var isOptional = ts.hasQuestionToken(parameter.valueDeclaration); - return { - name: parameter.name, - documentation: parameter.getDocumentationComment(), - displayParts: displayParts, - isOptional: isOptional - }; - } - function createSignatureHelpParameterForTypeParameter(typeParameter) { - var displayParts = ts.mapToDisplayParts(function (writer) { - return typeChecker.getSymbolDisplayBuilder().buildTypeParameterDisplay(typeParameter, writer, invocation); - }); - return { - name: typeParameter.symbol.name, - documentation: emptyArray, - displayParts: displayParts, - isOptional: false - }; - } - } - } - SignatureHelp.getSignatureHelpItems = getSignatureHelpItems; - })(SignatureHelp = ts.SignatureHelp || (ts.SignatureHelp = {})); -})(ts || (ts = {})); -// These utilities are common to multiple language service features. -/* @internal */ -var ts; -(function (ts) { - function getEndLinePosition(line, sourceFile) { - ts.Debug.assert(line >= 0); - var lineStarts = sourceFile.getLineStarts(); - var lineIndex = line; - if (lineIndex + 1 === lineStarts.length) { - // last line - return EOF - return sourceFile.text.length - 1; - } - else { - // current line start - var start = lineStarts[lineIndex]; - // take the start position of the next line -1 = it should be some line break - var pos = lineStarts[lineIndex + 1] - 1; - ts.Debug.assert(ts.isLineBreak(sourceFile.text.charCodeAt(pos))); - // walk backwards skipping line breaks, stop the the beginning of current line. - // i.e: - // - // $ <- end of line for this position should match the start position - while (start <= pos && ts.isLineBreak(sourceFile.text.charCodeAt(pos))) { - pos--; - } - return pos; - } - } - ts.getEndLinePosition = getEndLinePosition; - function getLineStartPositionForPosition(position, sourceFile) { - var lineStarts = sourceFile.getLineStarts(); - var line = sourceFile.getLineAndCharacterOfPosition(position).line; - return lineStarts[line]; - } - ts.getLineStartPositionForPosition = getLineStartPositionForPosition; - function rangeContainsRange(r1, r2) { - return startEndContainsRange(r1.pos, r1.end, r2); - } - ts.rangeContainsRange = rangeContainsRange; - function startEndContainsRange(start, end, range) { - return start <= range.pos && end >= range.end; - } - ts.startEndContainsRange = startEndContainsRange; - function rangeContainsStartEnd(range, start, end) { - return range.pos <= start && range.end >= end; - } - ts.rangeContainsStartEnd = rangeContainsStartEnd; - function rangeOverlapsWithStartEnd(r1, start, end) { - return startEndOverlapsWithStartEnd(r1.pos, r1.end, start, end); - } - ts.rangeOverlapsWithStartEnd = rangeOverlapsWithStartEnd; - function startEndOverlapsWithStartEnd(start1, end1, start2, end2) { - var start = Math.max(start1, start2); - var end = Math.min(end1, end2); - return start < end; - } - ts.startEndOverlapsWithStartEnd = startEndOverlapsWithStartEnd; - function positionBelongsToNode(candidate, position, sourceFile) { - return candidate.end > position || !isCompletedNode(candidate, sourceFile); - } - ts.positionBelongsToNode = positionBelongsToNode; - function isCompletedNode(n, sourceFile) { - if (ts.nodeIsMissing(n)) { - return false; - } - switch (n.kind) { - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 207 /* EnumDeclaration */: - case 157 /* ObjectLiteralExpression */: - case 153 /* ObjectBindingPattern */: - case 148 /* TypeLiteral */: - case 182 /* Block */: - case 209 /* ModuleBlock */: - case 210 /* CaseBlock */: - return nodeEndsWith(n, 15 /* CloseBraceToken */, sourceFile); - case 226 /* CatchClause */: - return isCompletedNode(n.block, sourceFile); - case 161 /* NewExpression */: - if (!n.arguments) { - return true; - } - // fall through - case 160 /* CallExpression */: - case 164 /* ParenthesizedExpression */: - case 152 /* ParenthesizedType */: - return nodeEndsWith(n, 17 /* CloseParenToken */, sourceFile); - case 145 /* FunctionType */: - case 146 /* ConstructorType */: - return isCompletedNode(n.type, sourceFile); - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 141 /* ConstructSignature */: - case 140 /* CallSignature */: - case 166 /* ArrowFunction */: - if (n.body) { - return isCompletedNode(n.body, sourceFile); - } - if (n.type) { - return isCompletedNode(n.type, sourceFile); - } - // Even though type parameters can be unclosed, we can get away with - // having at least a closing paren. - return hasChildOfKind(n, 17 /* CloseParenToken */, sourceFile); - case 208 /* ModuleDeclaration */: - return n.body && isCompletedNode(n.body, sourceFile); - case 186 /* IfStatement */: - if (n.elseStatement) { - return isCompletedNode(n.elseStatement, sourceFile); - } - return isCompletedNode(n.thenStatement, sourceFile); - case 185 /* ExpressionStatement */: - return isCompletedNode(n.expression, sourceFile); - case 156 /* ArrayLiteralExpression */: - case 154 /* ArrayBindingPattern */: - case 159 /* ElementAccessExpression */: - case 129 /* ComputedPropertyName */: - case 150 /* TupleType */: - return nodeEndsWith(n, 19 /* CloseBracketToken */, sourceFile); - case 142 /* IndexSignature */: - if (n.type) { - return isCompletedNode(n.type, sourceFile); - } - return hasChildOfKind(n, 19 /* CloseBracketToken */, sourceFile); - case 223 /* CaseClause */: - case 224 /* DefaultClause */: - // there is no such thing as terminator token for CaseClause/DefaultClause so for simplicitly always consider them non-completed - return false; - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 188 /* WhileStatement */: - return isCompletedNode(n.statement, sourceFile); - case 187 /* DoStatement */: - // rough approximation: if DoStatement has While keyword - then if node is completed is checking the presence of ')'; - var hasWhileKeyword = findChildOfKind(n, 100 /* WhileKeyword */, sourceFile); - if (hasWhileKeyword) { - return nodeEndsWith(n, 17 /* CloseParenToken */, sourceFile); - } - return isCompletedNode(n.statement, sourceFile); - case 147 /* TypeQuery */: - return isCompletedNode(n.exprName, sourceFile); - case 168 /* TypeOfExpression */: - case 167 /* DeleteExpression */: - case 169 /* VoidExpression */: - case 175 /* YieldExpression */: - case 176 /* SpreadElementExpression */: - var unaryWordExpression = n; - return isCompletedNode(unaryWordExpression.expression, sourceFile); - case 162 /* TaggedTemplateExpression */: - return isCompletedNode(n.template, sourceFile); - case 174 /* TemplateExpression */: - var lastSpan = ts.lastOrUndefined(n.templateSpans); - return isCompletedNode(lastSpan, sourceFile); - case 180 /* TemplateSpan */: - return ts.nodeIsPresent(n.literal); - case 170 /* PrefixUnaryExpression */: - return isCompletedNode(n.operand, sourceFile); - case 172 /* BinaryExpression */: - return isCompletedNode(n.right, sourceFile); - case 173 /* ConditionalExpression */: - return isCompletedNode(n.whenFalse, sourceFile); - default: - return true; - } - } - ts.isCompletedNode = isCompletedNode; - /* - * Checks if node ends with 'expectedLastToken'. - * If child at position 'length - 1' is 'SemicolonToken' it is skipped and 'expectedLastToken' is compared with child at position 'length - 2'. - */ - function nodeEndsWith(n, expectedLastToken, sourceFile) { - var children = n.getChildren(sourceFile); - if (children.length) { - var last = ts.lastOrUndefined(children); - if (last.kind === expectedLastToken) { - return true; - } - else if (last.kind === 22 /* SemicolonToken */ && children.length !== 1) { - return children[children.length - 2].kind === expectedLastToken; - } - } - return false; - } - function findListItemInfo(node) { - var list = findContainingList(node); - // It is possible at this point for syntaxList to be undefined, either if - // node.parent had no list child, or if none of its list children contained - // the span of node. If this happens, return undefined. The caller should - // handle this case. - if (!list) { - return undefined; - } - var children = list.getChildren(); - var listItemIndex = ts.indexOf(children, node); - return { - listItemIndex: listItemIndex, - list: list - }; - } - ts.findListItemInfo = findListItemInfo; - function hasChildOfKind(n, kind, sourceFile) { - return !!findChildOfKind(n, kind, sourceFile); - } - ts.hasChildOfKind = hasChildOfKind; - function findChildOfKind(n, kind, sourceFile) { - return ts.forEach(n.getChildren(sourceFile), function (c) { return c.kind === kind && c; }); - } - ts.findChildOfKind = findChildOfKind; - function findContainingList(node) { - // The node might be a list element (nonsynthetic) or a comma (synthetic). Either way, it will - // be parented by the container of the SyntaxList, not the SyntaxList itself. - // In order to find the list item index, we first need to locate SyntaxList itself and then search - // for the position of the relevant node (or comma). - var syntaxList = ts.forEach(node.parent.getChildren(), function (c) { - // find syntax list that covers the span of the node - if (c.kind === 253 /* SyntaxList */ && c.pos <= node.pos && c.end >= node.end) { - return c; - } - }); - // Either we didn't find an appropriate list, or the list must contain us. - ts.Debug.assert(!syntaxList || ts.contains(syntaxList.getChildren(), node)); - return syntaxList; - } - ts.findContainingList = findContainingList; - /* Gets the token whose text has range [start, end) and - * position >= start and (position < end or (position === end && token is keyword or identifier)) - */ - function getTouchingWord(sourceFile, position) { - return getTouchingToken(sourceFile, position, function (n) { return isWord(n.kind); }); - } - ts.getTouchingWord = getTouchingWord; - /* Gets the token whose text has range [start, end) and position >= start - * and (position < end or (position === end && token is keyword or identifier or numeric\string litera)) - */ - function getTouchingPropertyName(sourceFile, position) { - return getTouchingToken(sourceFile, position, function (n) { return isPropertyName(n.kind); }); - } - ts.getTouchingPropertyName = getTouchingPropertyName; - /** Returns the token if position is in [start, end) or if position === end and includeItemAtEndPosition(token) === true */ - function getTouchingToken(sourceFile, position, includeItemAtEndPosition) { - return getTokenAtPositionWorker(sourceFile, position, false, includeItemAtEndPosition); - } - ts.getTouchingToken = getTouchingToken; - /** Returns a token if position is in [start-of-leading-trivia, end) */ - function getTokenAtPosition(sourceFile, position) { - return getTokenAtPositionWorker(sourceFile, position, true, undefined); - } - ts.getTokenAtPosition = getTokenAtPosition; - /** Get the token whose text contains the position */ - function getTokenAtPositionWorker(sourceFile, position, allowPositionInLeadingTrivia, includeItemAtEndPosition) { - var current = sourceFile; - outer: while (true) { - if (isToken(current)) { - // exit early - return current; - } - // find the child that contains 'position' - for (var i = 0, n = current.getChildCount(sourceFile); i < n; i++) { - var child = current.getChildAt(i); - var start = allowPositionInLeadingTrivia ? child.getFullStart() : child.getStart(sourceFile); - if (start <= position) { - var end = child.getEnd(); - if (position < end || (position === end && child.kind === 1 /* EndOfFileToken */)) { - current = child; - continue outer; - } - else if (includeItemAtEndPosition && end === position) { - var previousToken = findPrecedingToken(position, sourceFile, child); - if (previousToken && includeItemAtEndPosition(previousToken)) { - return previousToken; - } - } - } - } - return current; - } - } - /** - * The token on the left of the position is the token that strictly includes the position - * or sits to the left of the cursor if it is on a boundary. For example - * - * fo|o -> will return foo - * foo |bar -> will return foo - * - */ - function findTokenOnLeftOfPosition(file, position) { - // Ideally, getTokenAtPosition should return a token. However, it is currently - // broken, so we do a check to make sure the result was indeed a token. - var tokenAtPosition = getTokenAtPosition(file, position); - if (isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) { - return tokenAtPosition; - } - return findPrecedingToken(position, file); - } - ts.findTokenOnLeftOfPosition = findTokenOnLeftOfPosition; - function findNextToken(previousToken, parent) { - return find(parent); - function find(n) { - if (isToken(n) && n.pos === previousToken.end) { - // this is token that starts at the end of previous token - return it - return n; - } - var children = n.getChildren(); - for (var _i = 0; _i < children.length; _i++) { - var child = children[_i]; - var shouldDiveInChildNode = - // previous token is enclosed somewhere in the child - (child.pos <= previousToken.pos && child.end > previousToken.end) || - // previous token ends exactly at the beginning of child - (child.pos === previousToken.end); - if (shouldDiveInChildNode && nodeHasTokens(child)) { - return find(child); - } - } - return undefined; - } - } - ts.findNextToken = findNextToken; - function findPrecedingToken(position, sourceFile, startNode) { - return find(startNode || sourceFile); - function findRightmostToken(n) { - if (isToken(n)) { - return n; - } - var children = n.getChildren(); - var candidate = findRightmostChildNodeWithTokens(children, children.length); - return candidate && findRightmostToken(candidate); - } - function find(n) { - if (isToken(n)) { - return n; - } - var children = n.getChildren(); - for (var i = 0, len = children.length; i < len; i++) { - var child = children[i]; - if (nodeHasTokens(child)) { - if (position <= child.end) { - if (child.getStart(sourceFile) >= position) { - // actual start of the node is past the position - previous token should be at the end of previous child - var candidate = findRightmostChildNodeWithTokens(children, i); - return candidate && findRightmostToken(candidate); - } - else { - // candidate should be in this node - return find(child); - } - } - } - } - ts.Debug.assert(startNode !== undefined || n.kind === 230 /* SourceFile */); - // Here we know that none of child token nodes embrace the position, - // the only known case is when position is at the end of the file. - // Try to find the rightmost token in the file without filtering. - // Namely we are skipping the check: 'position < node.end' - if (children.length) { - var candidate = findRightmostChildNodeWithTokens(children, children.length); - return candidate && findRightmostToken(candidate); - } - } - /// finds last node that is considered as candidate for search (isCandidate(node) === true) starting from 'exclusiveStartPosition' - function findRightmostChildNodeWithTokens(children, exclusiveStartPosition) { - for (var i = exclusiveStartPosition - 1; i >= 0; --i) { - if (nodeHasTokens(children[i])) { - return children[i]; - } - } - } - } - ts.findPrecedingToken = findPrecedingToken; - function nodeHasTokens(n) { - // If we have a token or node that has a non-zero width, it must have tokens. - // Note, that getWidth() does not take trivia into account. - return n.getWidth() !== 0; - } - function getNodeModifiers(node) { - var flags = ts.getCombinedNodeFlags(node); - var result = []; - if (flags & 32 /* Private */) - result.push(ts.ScriptElementKindModifier.privateMemberModifier); - if (flags & 64 /* Protected */) - result.push(ts.ScriptElementKindModifier.protectedMemberModifier); - if (flags & 16 /* Public */) - result.push(ts.ScriptElementKindModifier.publicMemberModifier); - if (flags & 128 /* Static */) - result.push(ts.ScriptElementKindModifier.staticModifier); - if (flags & 1 /* Export */) - result.push(ts.ScriptElementKindModifier.exportedModifier); - if (ts.isInAmbientContext(node)) - result.push(ts.ScriptElementKindModifier.ambientModifier); - return result.length > 0 ? result.join(',') : ts.ScriptElementKindModifier.none; - } - ts.getNodeModifiers = getNodeModifiers; - function getTypeArgumentOrTypeParameterList(node) { - if (node.kind === 144 /* TypeReference */ || node.kind === 160 /* CallExpression */) { - return node.typeArguments; - } - if (ts.isFunctionLike(node) || node.kind === 204 /* ClassDeclaration */ || node.kind === 205 /* InterfaceDeclaration */) { - return node.typeParameters; - } - return undefined; - } - ts.getTypeArgumentOrTypeParameterList = getTypeArgumentOrTypeParameterList; - function isToken(n) { - return n.kind >= 0 /* FirstToken */ && n.kind <= 127 /* LastToken */; - } - ts.isToken = isToken; - function isWord(kind) { - return kind === 65 /* Identifier */ || ts.isKeyword(kind); - } - ts.isWord = isWord; - function isPropertyName(kind) { - return kind === 8 /* StringLiteral */ || kind === 7 /* NumericLiteral */ || isWord(kind); - } - function isComment(kind) { - return kind === 2 /* SingleLineCommentTrivia */ || kind === 3 /* MultiLineCommentTrivia */; - } - ts.isComment = isComment; - function isPunctuation(kind) { - return 14 /* FirstPunctuation */ <= kind && kind <= 64 /* LastPunctuation */; - } - ts.isPunctuation = isPunctuation; - function isInsideTemplateLiteral(node, position) { - return ts.isTemplateLiteralKind(node.kind) - && (node.getStart() < position && position < node.getEnd()) || (!!node.isUnterminated && position === node.getEnd()); - } - ts.isInsideTemplateLiteral = isInsideTemplateLiteral; - function isAccessibilityModifier(kind) { - switch (kind) { - case 108 /* PublicKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - return true; - } - return false; - } - ts.isAccessibilityModifier = isAccessibilityModifier; - function compareDataObjects(dst, src) { - for (var e in dst) { - if (typeof dst[e] === "object") { - if (!compareDataObjects(dst[e], src[e])) { - return false; - } - } - else if (typeof dst[e] !== "function") { - if (dst[e] !== src[e]) { - return false; - } - } - } - return true; - } - ts.compareDataObjects = compareDataObjects; -})(ts || (ts = {})); -// Display-part writer helpers -/* @internal */ -var ts; -(function (ts) { - function isFirstDeclarationOfSymbolParameter(symbol) { - return symbol.declarations && symbol.declarations.length > 0 && symbol.declarations[0].kind === 131 /* Parameter */; - } - ts.isFirstDeclarationOfSymbolParameter = isFirstDeclarationOfSymbolParameter; - var displayPartWriter = getDisplayPartWriter(); - function getDisplayPartWriter() { - var displayParts; - var lineStart; - var indent; - resetWriter(); - return { - displayParts: function () { return displayParts; }, - writeKeyword: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.keyword); }, - writeOperator: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.operator); }, - writePunctuation: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.punctuation); }, - writeSpace: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.space); }, - writeStringLiteral: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.stringLiteral); }, - writeParameter: function (text) { return writeKind(text, ts.SymbolDisplayPartKind.parameterName); }, - writeSymbol: writeSymbol, - writeLine: writeLine, - increaseIndent: function () { indent++; }, - decreaseIndent: function () { indent--; }, - clear: resetWriter, - trackSymbol: function () { } - }; - function writeIndent() { - if (lineStart) { - var indentString = ts.getIndentString(indent); - if (indentString) { - displayParts.push(displayPart(indentString, ts.SymbolDisplayPartKind.space)); - } - lineStart = false; - } - } - function writeKind(text, kind) { - writeIndent(); - displayParts.push(displayPart(text, kind)); - } - function writeSymbol(text, symbol) { - writeIndent(); - displayParts.push(symbolPart(text, symbol)); - } - function writeLine() { - displayParts.push(lineBreakPart()); - lineStart = true; - } - function resetWriter() { - displayParts = []; - lineStart = true; - indent = 0; - } - } - function symbolPart(text, symbol) { - return displayPart(text, displayPartKind(symbol), symbol); - function displayPartKind(symbol) { - var flags = symbol.flags; - if (flags & 3 /* Variable */) { - return isFirstDeclarationOfSymbolParameter(symbol) ? ts.SymbolDisplayPartKind.parameterName : ts.SymbolDisplayPartKind.localName; - } - else if (flags & 4 /* Property */) { - return ts.SymbolDisplayPartKind.propertyName; - } - else if (flags & 32768 /* GetAccessor */) { - return ts.SymbolDisplayPartKind.propertyName; - } - else if (flags & 65536 /* SetAccessor */) { - return ts.SymbolDisplayPartKind.propertyName; - } - else if (flags & 8 /* EnumMember */) { - return ts.SymbolDisplayPartKind.enumMemberName; - } - else if (flags & 16 /* Function */) { - return ts.SymbolDisplayPartKind.functionName; - } - else if (flags & 32 /* Class */) { - return ts.SymbolDisplayPartKind.className; - } - else if (flags & 64 /* Interface */) { - return ts.SymbolDisplayPartKind.interfaceName; - } - else if (flags & 384 /* Enum */) { - return ts.SymbolDisplayPartKind.enumName; - } - else if (flags & 1536 /* Module */) { - return ts.SymbolDisplayPartKind.moduleName; - } - else if (flags & 8192 /* Method */) { - return ts.SymbolDisplayPartKind.methodName; - } - else if (flags & 262144 /* TypeParameter */) { - return ts.SymbolDisplayPartKind.typeParameterName; - } - else if (flags & 524288 /* TypeAlias */) { - return ts.SymbolDisplayPartKind.aliasName; - } - else if (flags & 8388608 /* Alias */) { - return ts.SymbolDisplayPartKind.aliasName; - } - return ts.SymbolDisplayPartKind.text; - } - } - ts.symbolPart = symbolPart; - function displayPart(text, kind, symbol) { - return { - text: text, - kind: ts.SymbolDisplayPartKind[kind] - }; - } - ts.displayPart = displayPart; - function spacePart() { - return displayPart(" ", ts.SymbolDisplayPartKind.space); - } - ts.spacePart = spacePart; - function keywordPart(kind) { - return displayPart(ts.tokenToString(kind), ts.SymbolDisplayPartKind.keyword); - } - ts.keywordPart = keywordPart; - function punctuationPart(kind) { - return displayPart(ts.tokenToString(kind), ts.SymbolDisplayPartKind.punctuation); - } - ts.punctuationPart = punctuationPart; - function operatorPart(kind) { - return displayPart(ts.tokenToString(kind), ts.SymbolDisplayPartKind.operator); - } - ts.operatorPart = operatorPart; - function textOrKeywordPart(text) { - var kind = ts.stringToToken(text); - return kind === undefined - ? textPart(text) - : keywordPart(kind); - } - ts.textOrKeywordPart = textOrKeywordPart; - function textPart(text) { - return displayPart(text, ts.SymbolDisplayPartKind.text); - } - ts.textPart = textPart; - function lineBreakPart() { - return displayPart("\n", ts.SymbolDisplayPartKind.lineBreak); - } - ts.lineBreakPart = lineBreakPart; - function mapToDisplayParts(writeDisplayParts) { - writeDisplayParts(displayPartWriter); - var result = displayPartWriter.displayParts(); - displayPartWriter.clear(); - return result; - } - ts.mapToDisplayParts = mapToDisplayParts; - function typeToDisplayParts(typechecker, type, enclosingDeclaration, flags) { - return mapToDisplayParts(function (writer) { - typechecker.getSymbolDisplayBuilder().buildTypeDisplay(type, writer, enclosingDeclaration, flags); - }); - } - ts.typeToDisplayParts = typeToDisplayParts; - function symbolToDisplayParts(typeChecker, symbol, enclosingDeclaration, meaning, flags) { - return mapToDisplayParts(function (writer) { - typeChecker.getSymbolDisplayBuilder().buildSymbolDisplay(symbol, writer, enclosingDeclaration, meaning, flags); - }); - } - ts.symbolToDisplayParts = symbolToDisplayParts; - function signatureToDisplayParts(typechecker, signature, enclosingDeclaration, flags) { - return mapToDisplayParts(function (writer) { - typechecker.getSymbolDisplayBuilder().buildSignatureDisplay(signature, writer, enclosingDeclaration, flags); - }); - } - ts.signatureToDisplayParts = signatureToDisplayParts; -})(ts || (ts = {})); -/// -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var scanner = ts.createScanner(2 /* Latest */, false); - var ScanAction; - (function (ScanAction) { - ScanAction[ScanAction["Scan"] = 0] = "Scan"; - ScanAction[ScanAction["RescanGreaterThanToken"] = 1] = "RescanGreaterThanToken"; - ScanAction[ScanAction["RescanSlashToken"] = 2] = "RescanSlashToken"; - ScanAction[ScanAction["RescanTemplateToken"] = 3] = "RescanTemplateToken"; - })(ScanAction || (ScanAction = {})); - function getFormattingScanner(sourceFile, startPos, endPos) { - scanner.setText(sourceFile.text); - scanner.setTextPos(startPos); - var wasNewLine = true; - var leadingTrivia; - var trailingTrivia; - var savedPos; - var lastScanAction; - var lastTokenInfo; - return { - advance: advance, - readTokenInfo: readTokenInfo, - isOnToken: isOnToken, - lastTrailingTriviaWasNewLine: function () { return wasNewLine; }, - close: function () { - lastTokenInfo = undefined; - scanner.setText(undefined); - } - }; - function advance() { - lastTokenInfo = undefined; - var isStarted = scanner.getStartPos() !== startPos; - if (isStarted) { - if (trailingTrivia) { - ts.Debug.assert(trailingTrivia.length !== 0); - wasNewLine = ts.lastOrUndefined(trailingTrivia).kind === 4 /* NewLineTrivia */; - } - else { - wasNewLine = false; - } - } - leadingTrivia = undefined; - trailingTrivia = undefined; - if (!isStarted) { - scanner.scan(); - } - var t; - var pos = scanner.getStartPos(); - // Read leading trivia and token - while (pos < endPos) { - var t_2 = scanner.getToken(); - if (!ts.isTrivia(t_2)) { - break; - } - // consume leading trivia - scanner.scan(); - var item = { - pos: pos, - end: scanner.getStartPos(), - kind: t_2 - }; - pos = scanner.getStartPos(); - if (!leadingTrivia) { - leadingTrivia = []; - } - leadingTrivia.push(item); - } - savedPos = scanner.getStartPos(); - } - function shouldRescanGreaterThanToken(node) { - if (node) { - switch (node.kind) { - case 27 /* GreaterThanEqualsToken */: - case 60 /* GreaterThanGreaterThanEqualsToken */: - case 61 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 42 /* GreaterThanGreaterThanGreaterThanToken */: - case 41 /* GreaterThanGreaterThanToken */: - return true; - } - } - return false; - } - function shouldRescanSlashToken(container) { - return container.kind === 9 /* RegularExpressionLiteral */; - } - function shouldRescanTemplateToken(container) { - return container.kind === 12 /* TemplateMiddle */ || - container.kind === 13 /* TemplateTail */; - } - function startsWithSlashToken(t) { - return t === 36 /* SlashToken */ || t === 57 /* SlashEqualsToken */; - } - function readTokenInfo(n) { - if (!isOnToken()) { - // scanner is not on the token (either advance was not called yet or scanner is already past the end position) - return { - leadingTrivia: leadingTrivia, - trailingTrivia: undefined, - token: undefined - }; - } - // normally scanner returns the smallest available token - // check the kind of context node to determine if scanner should have more greedy behavior and consume more text. - var expectedScanAction = shouldRescanGreaterThanToken(n) - ? 1 /* RescanGreaterThanToken */ - : shouldRescanSlashToken(n) - ? 2 /* RescanSlashToken */ - : shouldRescanTemplateToken(n) - ? 3 /* RescanTemplateToken */ - : 0 /* Scan */; - if (lastTokenInfo && expectedScanAction === lastScanAction) { - // readTokenInfo was called before with the same expected scan action. - // No need to re-scan text, return existing 'lastTokenInfo' - // it is ok to call fixTokenKind here since it does not affect - // what portion of text is consumed. In opposize rescanning can change it, - // i.e. for '>=' when originally scanner eats just one character - // and rescanning forces it to consume more. - return fixTokenKind(lastTokenInfo, n); - } - if (scanner.getStartPos() !== savedPos) { - ts.Debug.assert(lastTokenInfo !== undefined); - // readTokenInfo was called before but scan action differs - rescan text - scanner.setTextPos(savedPos); - scanner.scan(); - } - var currentToken = scanner.getToken(); - if (expectedScanAction === 1 /* RescanGreaterThanToken */ && currentToken === 25 /* GreaterThanToken */) { - currentToken = scanner.reScanGreaterToken(); - ts.Debug.assert(n.kind === currentToken); - lastScanAction = 1 /* RescanGreaterThanToken */; - } - else if (expectedScanAction === 2 /* RescanSlashToken */ && startsWithSlashToken(currentToken)) { - currentToken = scanner.reScanSlashToken(); - ts.Debug.assert(n.kind === currentToken); - lastScanAction = 2 /* RescanSlashToken */; - } - else if (expectedScanAction === 3 /* RescanTemplateToken */ && currentToken === 15 /* CloseBraceToken */) { - currentToken = scanner.reScanTemplateToken(); - lastScanAction = 3 /* RescanTemplateToken */; - } - else { - lastScanAction = 0 /* Scan */; - } - var token = { - pos: scanner.getStartPos(), - end: scanner.getTextPos(), - kind: currentToken - }; - // consume trailing trivia - if (trailingTrivia) { - trailingTrivia = undefined; - } - while (scanner.getStartPos() < endPos) { - currentToken = scanner.scan(); - if (!ts.isTrivia(currentToken)) { - break; - } - var trivia = { - pos: scanner.getStartPos(), - end: scanner.getTextPos(), - kind: currentToken - }; - if (!trailingTrivia) { - trailingTrivia = []; - } - trailingTrivia.push(trivia); - if (currentToken === 4 /* NewLineTrivia */) { - // move past new line - scanner.scan(); - break; - } - } - lastTokenInfo = { - leadingTrivia: leadingTrivia, - trailingTrivia: trailingTrivia, - token: token - }; - return fixTokenKind(lastTokenInfo, n); - } - function isOnToken() { - var current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken(); - var startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); - return startPos < endPos && current !== 1 /* EndOfFileToken */ && !ts.isTrivia(current); - } - // when containing node in the tree is token - // but its kind differs from the kind that was returned by the scanner, - // then kind needs to be fixed. This might happen in cases - // when parser interprets token differently, i.e keyword treated as identifier - function fixTokenKind(tokenInfo, container) { - if (ts.isToken(container) && tokenInfo.token.kind !== container.kind) { - tokenInfo.token.kind = container.kind; - } - return tokenInfo; - } - } - formatting.getFormattingScanner = getFormattingScanner; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var FormattingContext = (function () { - function FormattingContext(sourceFile, formattingRequestKind) { - this.sourceFile = sourceFile; - this.formattingRequestKind = formattingRequestKind; - } - FormattingContext.prototype.updateContext = function (currentRange, currentTokenParent, nextRange, nextTokenParent, commonParent) { - ts.Debug.assert(currentRange !== undefined, "currentTokenSpan is null"); - ts.Debug.assert(currentTokenParent !== undefined, "currentTokenParent is null"); - ts.Debug.assert(nextRange !== undefined, "nextTokenSpan is null"); - ts.Debug.assert(nextTokenParent !== undefined, "nextTokenParent is null"); - ts.Debug.assert(commonParent !== undefined, "commonParent is null"); - this.currentTokenSpan = currentRange; - this.currentTokenParent = currentTokenParent; - this.nextTokenSpan = nextRange; - this.nextTokenParent = nextTokenParent; - this.contextNode = commonParent; - // drop cached results - this.contextNodeAllOnSameLine = undefined; - this.nextNodeAllOnSameLine = undefined; - this.tokensAreOnSameLine = undefined; - this.contextNodeBlockIsOnOneLine = undefined; - this.nextNodeBlockIsOnOneLine = undefined; - }; - FormattingContext.prototype.ContextNodeAllOnSameLine = function () { - if (this.contextNodeAllOnSameLine === undefined) { - this.contextNodeAllOnSameLine = this.NodeIsOnOneLine(this.contextNode); - } - return this.contextNodeAllOnSameLine; - }; - FormattingContext.prototype.NextNodeAllOnSameLine = function () { - if (this.nextNodeAllOnSameLine === undefined) { - this.nextNodeAllOnSameLine = this.NodeIsOnOneLine(this.nextTokenParent); - } - return this.nextNodeAllOnSameLine; - }; - FormattingContext.prototype.TokensAreOnSameLine = function () { - if (this.tokensAreOnSameLine === undefined) { - var startLine = this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line; - var endLine = this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line; - this.tokensAreOnSameLine = (startLine == endLine); - } - return this.tokensAreOnSameLine; - }; - FormattingContext.prototype.ContextNodeBlockIsOnOneLine = function () { - if (this.contextNodeBlockIsOnOneLine === undefined) { - this.contextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.contextNode); - } - return this.contextNodeBlockIsOnOneLine; - }; - FormattingContext.prototype.NextNodeBlockIsOnOneLine = function () { - if (this.nextNodeBlockIsOnOneLine === undefined) { - this.nextNodeBlockIsOnOneLine = this.BlockIsOnOneLine(this.nextTokenParent); - } - return this.nextNodeBlockIsOnOneLine; - }; - FormattingContext.prototype.NodeIsOnOneLine = function (node) { - var startLine = this.sourceFile.getLineAndCharacterOfPosition(node.getStart(this.sourceFile)).line; - var endLine = this.sourceFile.getLineAndCharacterOfPosition(node.getEnd()).line; - return startLine == endLine; - }; - FormattingContext.prototype.BlockIsOnOneLine = function (node) { - var openBrace = ts.findChildOfKind(node, 14 /* OpenBraceToken */, this.sourceFile); - var closeBrace = ts.findChildOfKind(node, 15 /* CloseBraceToken */, this.sourceFile); - if (openBrace && closeBrace) { - var startLine = this.sourceFile.getLineAndCharacterOfPosition(openBrace.getEnd()).line; - var endLine = this.sourceFile.getLineAndCharacterOfPosition(closeBrace.getStart(this.sourceFile)).line; - return startLine === endLine; - } - return false; - }; - return FormattingContext; - })(); - formatting.FormattingContext = FormattingContext; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - (function (FormattingRequestKind) { - FormattingRequestKind[FormattingRequestKind["FormatDocument"] = 0] = "FormatDocument"; - FormattingRequestKind[FormattingRequestKind["FormatSelection"] = 1] = "FormatSelection"; - FormattingRequestKind[FormattingRequestKind["FormatOnEnter"] = 2] = "FormatOnEnter"; - FormattingRequestKind[FormattingRequestKind["FormatOnSemicolon"] = 3] = "FormatOnSemicolon"; - FormattingRequestKind[FormattingRequestKind["FormatOnClosingCurlyBrace"] = 4] = "FormatOnClosingCurlyBrace"; - })(formatting.FormattingRequestKind || (formatting.FormattingRequestKind = {})); - var FormattingRequestKind = formatting.FormattingRequestKind; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var Rule = (function () { - function Rule(Descriptor, Operation, Flag) { - if (Flag === void 0) { Flag = 0 /* None */; } - this.Descriptor = Descriptor; - this.Operation = Operation; - this.Flag = Flag; - } - Rule.prototype.toString = function () { - return "[desc=" + this.Descriptor + "," + - "operation=" + this.Operation + "," + - "flag=" + this.Flag + "]"; - }; - return Rule; - })(); - formatting.Rule = Rule; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - (function (RuleAction) { - RuleAction[RuleAction["Ignore"] = 1] = "Ignore"; - RuleAction[RuleAction["Space"] = 2] = "Space"; - RuleAction[RuleAction["NewLine"] = 4] = "NewLine"; - RuleAction[RuleAction["Delete"] = 8] = "Delete"; - })(formatting.RuleAction || (formatting.RuleAction = {})); - var RuleAction = formatting.RuleAction; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var RuleDescriptor = (function () { - function RuleDescriptor(LeftTokenRange, RightTokenRange) { - this.LeftTokenRange = LeftTokenRange; - this.RightTokenRange = RightTokenRange; - } - RuleDescriptor.prototype.toString = function () { - return "[leftRange=" + this.LeftTokenRange + "," + - "rightRange=" + this.RightTokenRange + "]"; - }; - RuleDescriptor.create1 = function (left, right) { - return RuleDescriptor.create4(formatting.Shared.TokenRange.FromToken(left), formatting.Shared.TokenRange.FromToken(right)); - }; - RuleDescriptor.create2 = function (left, right) { - return RuleDescriptor.create4(left, formatting.Shared.TokenRange.FromToken(right)); - }; - RuleDescriptor.create3 = function (left, right) { - return RuleDescriptor.create4(formatting.Shared.TokenRange.FromToken(left), right); - }; - RuleDescriptor.create4 = function (left, right) { - return new RuleDescriptor(left, right); - }; - return RuleDescriptor; - })(); - formatting.RuleDescriptor = RuleDescriptor; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - (function (RuleFlags) { - RuleFlags[RuleFlags["None"] = 0] = "None"; - RuleFlags[RuleFlags["CanDeleteNewLines"] = 1] = "CanDeleteNewLines"; - })(formatting.RuleFlags || (formatting.RuleFlags = {})); - var RuleFlags = formatting.RuleFlags; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var RuleOperation = (function () { - function RuleOperation() { - this.Context = null; - this.Action = null; - } - RuleOperation.prototype.toString = function () { - return "[context=" + this.Context + "," + - "action=" + this.Action + "]"; - }; - RuleOperation.create1 = function (action) { - return RuleOperation.create2(formatting.RuleOperationContext.Any, action); - }; - RuleOperation.create2 = function (context, action) { - var result = new RuleOperation(); - result.Context = context; - result.Action = action; - return result; - }; - return RuleOperation; - })(); - formatting.RuleOperation = RuleOperation; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var RuleOperationContext = (function () { - function RuleOperationContext() { - var funcs = []; - for (var _i = 0; _i < arguments.length; _i++) { - funcs[_i - 0] = arguments[_i]; - } - this.customContextChecks = funcs; - } - RuleOperationContext.prototype.IsAny = function () { - return this == RuleOperationContext.Any; - }; - RuleOperationContext.prototype.InContext = function (context) { - if (this.IsAny()) { - return true; - } - for (var _i = 0, _a = this.customContextChecks; _i < _a.length; _i++) { - var check = _a[_i]; - if (!check(context)) { - return false; - } - } - return true; - }; - RuleOperationContext.Any = new RuleOperationContext(); - return RuleOperationContext; - })(); - formatting.RuleOperationContext = RuleOperationContext; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var Rules = (function () { - function Rules() { - /// - /// Common Rules - /// - // Leave comments alone - this.IgnoreBeforeComment = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.Comments), formatting.RuleOperation.create1(1 /* Ignore */)); - this.IgnoreAfterLineComment = new formatting.Rule(formatting.RuleDescriptor.create3(2 /* SingleLineCommentTrivia */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create1(1 /* Ignore */)); - // Space after keyword but not before ; or : or ? - this.NoSpaceBeforeSemicolon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 22 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeColon = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 51 /* ColonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); - this.NoSpaceBeforeQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 50 /* QuestionToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); - this.SpaceAfterColon = new formatting.Rule(formatting.RuleDescriptor.create3(51 /* ColonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 2 /* Space */)); - this.SpaceAfterQuestionMarkInConditionalOperator = new formatting.Rule(formatting.RuleDescriptor.create3(50 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsConditionalOperatorContext), 2 /* Space */)); - this.NoSpaceAfterQuestionMark = new formatting.Rule(formatting.RuleDescriptor.create3(50 /* QuestionToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterSemicolon = new formatting.Rule(formatting.RuleDescriptor.create3(22 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - // Space after }. - this.SpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(15 /* CloseBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsAfterCodeBlockContext), 2 /* Space */)); - // Special case for (}, else) and (}, while) since else & while tokens are not part of the tree which makes SpaceAfterCloseBrace rule not applied - this.SpaceBetweenCloseBraceAndElse = new formatting.Rule(formatting.RuleDescriptor.create1(15 /* CloseBraceToken */, 76 /* ElseKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.SpaceBetweenCloseBraceAndWhile = new formatting.Rule(formatting.RuleDescriptor.create1(15 /* CloseBraceToken */, 100 /* WhileKeyword */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.NoSpaceAfterCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create3(15 /* CloseBraceToken */, formatting.Shared.TokenRange.FromTokens([17 /* CloseParenToken */, 19 /* CloseBracketToken */, 23 /* CommaToken */, 22 /* SemicolonToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - // No space for indexer and dot - this.NoSpaceBeforeDot = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 20 /* DotToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterDot = new formatting.Rule(formatting.RuleDescriptor.create3(20 /* DotToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 18 /* OpenBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterOpenBracket = new formatting.Rule(formatting.RuleDescriptor.create3(18 /* OpenBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 19 /* CloseBracketToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterCloseBracket = new formatting.Rule(formatting.RuleDescriptor.create3(19 /* CloseBracketToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBeforeBlockInFunctionDeclarationContext), 8 /* Delete */)); - // Place a space before open brace in a function declaration - this.FunctionOpenBraceLeftTokenRange = formatting.Shared.TokenRange.AnyIncludingMultilineComments; - this.SpaceBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 14 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); - // Place a space before open brace in a TypeScript declaration that has braces as children (class, module, enum, etc) - this.TypeScriptOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([65 /* Identifier */, 3 /* MultiLineCommentTrivia */]); - this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 14 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); - // Place a space before open brace in a control flow construct - this.ControlOpenBraceLeftTokenRange = formatting.Shared.TokenRange.FromTokens([17 /* CloseParenToken */, 3 /* MultiLineCommentTrivia */, 75 /* DoKeyword */, 96 /* TryKeyword */, 81 /* FinallyKeyword */, 76 /* ElseKeyword */]); - this.SpaceBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 14 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsNotFormatOnEnter, Rules.IsSameLineTokenOrBeforeMultilineBlockContext), 2 /* Space */), 1 /* CanDeleteNewLines */); - // Insert a space after { and before } in single-line contexts, but remove space from empty object literals {}. - this.SpaceAfterOpenBrace = new formatting.Rule(formatting.RuleDescriptor.create3(14 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 2 /* Space */)); - this.SpaceBeforeCloseBrace = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 15 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSingleLineBlockContext), 2 /* Space */)); - this.NoSpaceBetweenEmptyBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(14 /* OpenBraceToken */, 15 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsObjectContext), 8 /* Delete */)); - // Insert new line after { and before } in multi-line contexts. - this.NewLineAfterOpenBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create3(14 /* OpenBraceToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */)); - // For functions and control block place } on a new line [multi-line rule] - this.NewLineBeforeCloseBraceInBlockContext = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.AnyIncludingMultilineComments, 15 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsMultilineBlockContext), 4 /* NewLine */)); - // Special handling of unary operators. - // Prefix operators generally shouldn't have a space between - // them and their target unary expression. - this.NoSpaceAfterUnaryPrefixOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.UnaryPrefixOperators, formatting.Shared.TokenRange.UnaryPrefixExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); - this.NoSpaceAfterUnaryPreincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(38 /* PlusPlusToken */, formatting.Shared.TokenRange.UnaryPreincrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterUnaryPredecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create3(39 /* MinusMinusToken */, formatting.Shared.TokenRange.UnaryPredecrementExpressions), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeUnaryPostincrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostincrementExpressions, 38 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeUnaryPostdecrementOperator = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.UnaryPostdecrementExpressions, 39 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - // More unary operator special-casing. - // DevDiv 181814: Be careful when removing leading whitespace - // around unary operators. Examples: - // 1 - -2 --X--> 1--2 - // a + ++b --X--> a+++b - this.SpaceAfterPostincrementWhenFollowedByAdd = new formatting.Rule(formatting.RuleDescriptor.create1(38 /* PlusPlusToken */, 33 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterAddWhenFollowedByUnaryPlus = new formatting.Rule(formatting.RuleDescriptor.create1(33 /* PlusToken */, 33 /* PlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterAddWhenFollowedByPreincrement = new formatting.Rule(formatting.RuleDescriptor.create1(33 /* PlusToken */, 38 /* PlusPlusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterPostdecrementWhenFollowedBySubtract = new formatting.Rule(formatting.RuleDescriptor.create1(39 /* MinusMinusToken */, 34 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterSubtractWhenFollowedByUnaryMinus = new formatting.Rule(formatting.RuleDescriptor.create1(34 /* MinusToken */, 34 /* MinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterSubtractWhenFollowedByPredecrement = new formatting.Rule(formatting.RuleDescriptor.create1(34 /* MinusToken */, 39 /* MinusMinusToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.NoSpaceBeforeComma = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 23 /* CommaToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterCertainKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([98 /* VarKeyword */, 94 /* ThrowKeyword */, 88 /* NewKeyword */, 74 /* DeleteKeyword */, 90 /* ReturnKeyword */, 97 /* TypeOfKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.SpaceAfterLetConstInVariableDeclaration = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([104 /* LetKeyword */, 70 /* ConstKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsStartOfVariableDeclarationList), 2 /* Space */)); - this.NoSpaceBeforeOpenParenInFuncCall = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 16 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionCallOrNewContext, Rules.IsPreviousTokenNotComma), 8 /* Delete */)); - this.SpaceAfterFunctionInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create3(83 /* FunctionKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); - this.NoSpaceBeforeOpenParenInFuncDecl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 16 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsFunctionDeclContext), 8 /* Delete */)); - this.SpaceAfterVoidOperator = new formatting.Rule(formatting.RuleDescriptor.create3(99 /* VoidKeyword */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsVoidOpContext), 2 /* Space */)); - this.NoSpaceBetweenReturnAndSemicolon = new formatting.Rule(formatting.RuleDescriptor.create1(90 /* ReturnKeyword */, 22 /* SemicolonToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - // Add a space between statements. All keywords except (do,else,case) has open/close parens after them. - // So, we have a rule to add a space for [),Any], [do,Any], [else,Any], and [case,Any] - this.SpaceBetweenStatements = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([17 /* CloseParenToken */, 75 /* DoKeyword */, 76 /* ElseKeyword */, 67 /* CaseKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotForContext), 2 /* Space */)); - // This low-pri rule takes care of "try {" and "finally {" in case the rule SpaceBeforeOpenBraceInControl didn't execute on FormatOnEnter. - this.SpaceAfterTryFinally = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([96 /* TryKeyword */, 81 /* FinallyKeyword */]), 14 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - // get x() {} - // set x(val) {} - this.SpaceAfterGetSetInMember = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([116 /* GetKeyword */, 122 /* SetKeyword */]), 65 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); - // Special case for binary operators (that are keywords). For these we have to add a space and shouldn't follow any user options. - this.SpaceBeforeBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryKeywordOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterBinaryKeywordOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryKeywordOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - // TypeScript-specific higher priority rules - // Treat constructor as an identifier in a function declaration, and remove spaces between constructor and following left parentheses - this.NoSpaceAfterConstructor = new formatting.Rule(formatting.RuleDescriptor.create1(114 /* ConstructorKeyword */, 16 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - // Use of module as a function call. e.g.: import m2 = module("m2"); - this.NoSpaceAfterModuleImport = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.FromTokens([118 /* ModuleKeyword */, 120 /* RequireKeyword */]), 16 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - // Add a space around certain TypeScript keywords - this.SpaceAfterCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([69 /* ClassKeyword */, 115 /* DeclareKeyword */, 77 /* EnumKeyword */, 78 /* ExportKeyword */, 79 /* ExtendsKeyword */, 116 /* GetKeyword */, 102 /* ImplementsKeyword */, 85 /* ImportKeyword */, 103 /* InterfaceKeyword */, 118 /* ModuleKeyword */, 119 /* NamespaceKeyword */, 106 /* PrivateKeyword */, 108 /* PublicKeyword */, 122 /* SetKeyword */, 109 /* StaticKeyword */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.SpaceBeforeCertainTypeScriptKeywords = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([79 /* ExtendsKeyword */, 102 /* ImplementsKeyword */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - // Treat string literals in module names as identifiers, and add a space between the literal and the opening Brace braces, e.g.: module "m2" { - this.SpaceAfterModuleName = new formatting.Rule(formatting.RuleDescriptor.create1(8 /* StringLiteral */, 14 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsModuleDeclContext), 2 /* Space */)); - // Lambda expressions - this.SpaceAfterArrow = new formatting.Rule(formatting.RuleDescriptor.create3(32 /* EqualsGreaterThanToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - // Optional parameters and let args - this.NoSpaceAfterEllipsis = new formatting.Rule(formatting.RuleDescriptor.create1(21 /* DotDotDotToken */, 65 /* Identifier */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterOptionalParameters = new formatting.Rule(formatting.RuleDescriptor.create3(50 /* QuestionToken */, formatting.Shared.TokenRange.FromTokens([17 /* CloseParenToken */, 23 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsNotBinaryOpContext), 8 /* Delete */)); - // generics - this.NoSpaceBeforeOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.TypeNames, 24 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8 /* Delete */)); - this.NoSpaceBetweenCloseParenAndAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create1(17 /* CloseParenToken */, 24 /* LessThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8 /* Delete */)); - this.NoSpaceAfterOpenAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(24 /* LessThanToken */, formatting.Shared.TokenRange.TypeNames), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8 /* Delete */)); - this.NoSpaceBeforeCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 25 /* GreaterThanToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8 /* Delete */)); - this.NoSpaceAfterCloseAngularBracket = new formatting.Rule(formatting.RuleDescriptor.create3(25 /* GreaterThanToken */, formatting.Shared.TokenRange.FromTokens([16 /* OpenParenToken */, 18 /* OpenBracketToken */, 25 /* GreaterThanToken */, 23 /* CommaToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsTypeArgumentOrParameterContext), 8 /* Delete */)); - // Remove spaces in empty interface literals. e.g.: x: {} - this.NoSpaceBetweenEmptyInterfaceBraceBrackets = new formatting.Rule(formatting.RuleDescriptor.create1(14 /* OpenBraceToken */, 15 /* CloseBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsObjectTypeContext), 8 /* Delete */)); - // decorators - this.SpaceBeforeAt = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 52 /* AtToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.NoSpaceAfterAt = new formatting.Rule(formatting.RuleDescriptor.create3(52 /* AtToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.SpaceAfterDecorator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.FromTokens([65 /* Identifier */, 78 /* ExportKeyword */, 73 /* DefaultKeyword */, 69 /* ClassKeyword */, 109 /* StaticKeyword */, 108 /* PublicKeyword */, 106 /* PrivateKeyword */, 107 /* ProtectedKeyword */, 116 /* GetKeyword */, 122 /* SetKeyword */, 18 /* OpenBracketToken */, 35 /* AsteriskToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsEndOfDecoratorContextOnSameLine), 2 /* Space */)); - this.NoSpaceBetweenFunctionKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(83 /* FunctionKeyword */, 35 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 8 /* Delete */)); - this.SpaceAfterStarInGeneratorDeclaration = new formatting.Rule(formatting.RuleDescriptor.create3(35 /* AsteriskToken */, formatting.Shared.TokenRange.FromTokens([65 /* Identifier */, 16 /* OpenParenToken */])), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclarationOrFunctionExpressionContext), 2 /* Space */)); - this.NoSpaceBetweenYieldKeywordAndStar = new formatting.Rule(formatting.RuleDescriptor.create1(110 /* YieldKeyword */, 35 /* AsteriskToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 8 /* Delete */)); - this.SpaceBetweenYieldOrYieldStarAndOperand = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.FromTokens([110 /* YieldKeyword */, 35 /* AsteriskToken */]), formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsYieldOrYieldStarWithOperand), 2 /* Space */)); - // These rules are higher in priority than user-configurable rules. - this.HighPriorityCommonRules = - [ - this.IgnoreBeforeComment, this.IgnoreAfterLineComment, - this.NoSpaceBeforeColon, this.SpaceAfterColon, this.NoSpaceBeforeQuestionMark, this.SpaceAfterQuestionMarkInConditionalOperator, - this.NoSpaceAfterQuestionMark, - this.NoSpaceBeforeDot, this.NoSpaceAfterDot, - this.NoSpaceAfterUnaryPrefixOperator, - this.NoSpaceAfterUnaryPreincrementOperator, this.NoSpaceAfterUnaryPredecrementOperator, - this.NoSpaceBeforeUnaryPostincrementOperator, this.NoSpaceBeforeUnaryPostdecrementOperator, - this.SpaceAfterPostincrementWhenFollowedByAdd, - this.SpaceAfterAddWhenFollowedByUnaryPlus, this.SpaceAfterAddWhenFollowedByPreincrement, - this.SpaceAfterPostdecrementWhenFollowedBySubtract, - this.SpaceAfterSubtractWhenFollowedByUnaryMinus, this.SpaceAfterSubtractWhenFollowedByPredecrement, - this.NoSpaceAfterCloseBrace, - this.SpaceAfterOpenBrace, this.SpaceBeforeCloseBrace, this.NewLineBeforeCloseBraceInBlockContext, - this.SpaceAfterCloseBrace, this.SpaceBetweenCloseBraceAndElse, this.SpaceBetweenCloseBraceAndWhile, this.NoSpaceBetweenEmptyBraceBrackets, - this.NoSpaceBetweenFunctionKeywordAndStar, this.SpaceAfterStarInGeneratorDeclaration, - this.SpaceAfterFunctionInFuncDecl, this.NewLineAfterOpenBraceInBlockContext, this.SpaceAfterGetSetInMember, - this.NoSpaceBetweenYieldKeywordAndStar, this.SpaceBetweenYieldOrYieldStarAndOperand, - this.NoSpaceBetweenReturnAndSemicolon, - this.SpaceAfterCertainKeywords, - this.SpaceAfterLetConstInVariableDeclaration, - this.NoSpaceBeforeOpenParenInFuncCall, - this.SpaceBeforeBinaryKeywordOperator, this.SpaceAfterBinaryKeywordOperator, - this.SpaceAfterVoidOperator, - // TypeScript-specific rules - this.NoSpaceAfterConstructor, this.NoSpaceAfterModuleImport, - this.SpaceAfterCertainTypeScriptKeywords, this.SpaceBeforeCertainTypeScriptKeywords, - this.SpaceAfterModuleName, - this.SpaceAfterArrow, - this.NoSpaceAfterEllipsis, - this.NoSpaceAfterOptionalParameters, - this.NoSpaceBetweenEmptyInterfaceBraceBrackets, - this.NoSpaceBeforeOpenAngularBracket, - this.NoSpaceBetweenCloseParenAndAngularBracket, - this.NoSpaceAfterOpenAngularBracket, - this.NoSpaceBeforeCloseAngularBracket, - this.NoSpaceAfterCloseAngularBracket, - this.SpaceBeforeAt, - this.NoSpaceAfterAt, - this.SpaceAfterDecorator, - ]; - // These rules are lower in priority than user-configurable rules. - this.LowPriorityCommonRules = - [ - this.NoSpaceBeforeSemicolon, - this.SpaceBeforeOpenBraceInControl, this.SpaceBeforeOpenBraceInFunction, this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock, - this.NoSpaceBeforeComma, - this.NoSpaceBeforeOpenBracket, this.NoSpaceAfterOpenBracket, - this.NoSpaceBeforeCloseBracket, this.NoSpaceAfterCloseBracket, - this.SpaceAfterSemicolon, - this.NoSpaceBeforeOpenParenInFuncDecl, - this.SpaceBetweenStatements, this.SpaceAfterTryFinally - ]; - /// - /// Rules controlled by user options - /// - // Insert space after comma delimiter - this.SpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(23 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.NoSpaceAfterComma = new formatting.Rule(formatting.RuleDescriptor.create3(23 /* CommaToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - // Insert space before and after binary operators - this.SpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.SpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 2 /* Space */)); - this.NoSpaceBeforeBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.Any, formatting.Shared.TokenRange.BinaryOperators), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */)); - this.NoSpaceAfterBinaryOperator = new formatting.Rule(formatting.RuleDescriptor.create4(formatting.Shared.TokenRange.BinaryOperators, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsBinaryOpContext), 8 /* Delete */)); - // Insert space after keywords in control flow statements - this.SpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 16 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 2 /* Space */)); - this.NoSpaceAfterKeywordInControl = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Keywords, 16 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext), 8 /* Delete */)); - // Open Brace braces after function - //TypeScript: Function can have return types, which can be made of tons of different token kinds - this.NewLineBeforeOpenBraceInFunction = new formatting.Rule(formatting.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange, 14 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); - // Open Brace braces after TypeScript module/class/interface - this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock = new formatting.Rule(formatting.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange, 14 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsTypeScriptDeclWithBlockContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); - // Open Brace braces after control block - this.NewLineBeforeOpenBraceInControl = new formatting.Rule(formatting.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange, 14 /* OpenBraceToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsControlDeclContext, Rules.IsBeforeMultilineBlockContext), 4 /* NewLine */), 1 /* CanDeleteNewLines */); - // Insert space after semicolon in for statement - this.SpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(22 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsForContext), 2 /* Space */)); - this.NoSpaceAfterSemicolonInFor = new formatting.Rule(formatting.RuleDescriptor.create3(22 /* SemicolonToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext, Rules.IsForContext), 8 /* Delete */)); - // Insert space after opening and before closing nonempty parenthesis - this.SpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.SpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 2 /* Space */)); - this.NoSpaceBetweenParens = new formatting.Rule(formatting.RuleDescriptor.create1(16 /* OpenParenToken */, 17 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceAfterOpenParen = new formatting.Rule(formatting.RuleDescriptor.create3(16 /* OpenParenToken */, formatting.Shared.TokenRange.Any), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - this.NoSpaceBeforeCloseParen = new formatting.Rule(formatting.RuleDescriptor.create2(formatting.Shared.TokenRange.Any, 17 /* CloseParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsSameLineTokenContext), 8 /* Delete */)); - // Insert space after function keyword for anonymous functions - this.SpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(83 /* FunctionKeyword */, 16 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 2 /* Space */)); - this.NoSpaceAfterAnonymousFunctionKeyword = new formatting.Rule(formatting.RuleDescriptor.create1(83 /* FunctionKeyword */, 16 /* OpenParenToken */), formatting.RuleOperation.create2(new formatting.RuleOperationContext(Rules.IsFunctionDeclContext), 8 /* Delete */)); - } - Rules.prototype.getRuleName = function (rule) { - var o = this; - for (var name_29 in o) { - if (o[name_29] === rule) { - return name_29; - } - } - throw new Error("Unknown rule"); - }; - /// - /// Contexts - /// - Rules.IsForContext = function (context) { - return context.contextNode.kind === 189 /* ForStatement */; - }; - Rules.IsNotForContext = function (context) { - return !Rules.IsForContext(context); - }; - Rules.IsBinaryOpContext = function (context) { - switch (context.contextNode.kind) { - case 172 /* BinaryExpression */: - case 173 /* ConditionalExpression */: - case 143 /* TypePredicate */: - return true; - // equals in binding elements: function foo([[x, y] = [1, 2]]) - case 155 /* BindingElement */: - // equals in type X = ... - case 206 /* TypeAliasDeclaration */: - // equal in import a = module('a'); - case 211 /* ImportEqualsDeclaration */: - // equal in let a = 0; - case 201 /* VariableDeclaration */: - // equal in p = 0; - case 131 /* Parameter */: - case 229 /* EnumMember */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - return context.currentTokenSpan.kind === 53 /* EqualsToken */ || context.nextTokenSpan.kind === 53 /* EqualsToken */; - // "in" keyword in for (let x in []) { } - case 190 /* ForInStatement */: - return context.currentTokenSpan.kind === 86 /* InKeyword */ || context.nextTokenSpan.kind === 86 /* InKeyword */; - // Technically, "of" is not a binary operator, but format it the same way as "in" - case 191 /* ForOfStatement */: - return context.currentTokenSpan.kind === 127 /* OfKeyword */ || context.nextTokenSpan.kind === 127 /* OfKeyword */; - } - return false; - }; - Rules.IsNotBinaryOpContext = function (context) { - return !Rules.IsBinaryOpContext(context); - }; - Rules.IsConditionalOperatorContext = function (context) { - return context.contextNode.kind === 173 /* ConditionalExpression */; - }; - Rules.IsSameLineTokenOrBeforeMultilineBlockContext = function (context) { - //// This check is mainly used inside SpaceBeforeOpenBraceInControl and SpaceBeforeOpenBraceInFunction. - //// - //// Ex: - //// if (1) { .... - //// * ) and { are on the same line so apply the rule. Here we don't care whether it's same or multi block context - //// - //// Ex: - //// if (1) - //// { ... } - //// * ) and { are on differnet lines. We only need to format if the block is multiline context. So in this case we don't format. - //// - //// Ex: - //// if (1) - //// { ... - //// } - //// * ) and { are on differnet lines. We only need to format if the block is multiline context. So in this case we format. - return context.TokensAreOnSameLine() || Rules.IsBeforeMultilineBlockContext(context); - }; - // This check is done before an open brace in a control construct, a function, or a typescript block declaration - Rules.IsBeforeMultilineBlockContext = function (context) { - return Rules.IsBeforeBlockContext(context) && !(context.NextNodeAllOnSameLine() || context.NextNodeBlockIsOnOneLine()); - }; - Rules.IsMultilineBlockContext = function (context) { - return Rules.IsBlockContext(context) && !(context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine()); - }; - Rules.IsSingleLineBlockContext = function (context) { - return Rules.IsBlockContext(context) && (context.ContextNodeAllOnSameLine() || context.ContextNodeBlockIsOnOneLine()); - }; - Rules.IsBlockContext = function (context) { - return Rules.NodeIsBlockContext(context.contextNode); - }; - Rules.IsBeforeBlockContext = function (context) { - return Rules.NodeIsBlockContext(context.nextTokenParent); - }; - // IMPORTANT!!! This method must return true ONLY for nodes with open and close braces as immediate children - Rules.NodeIsBlockContext = function (node) { - if (Rules.NodeIsTypeScriptDeclWithBlockContext(node)) { - // This means we are in a context that looks like a block to the user, but in the grammar is actually not a node (it's a class, module, enum, object type literal, etc). - return true; - } - switch (node.kind) { - case 182 /* Block */: - case 210 /* CaseBlock */: - case 157 /* ObjectLiteralExpression */: - case 209 /* ModuleBlock */: - return true; - } - return false; - }; - Rules.IsFunctionDeclContext = function (context) { - switch (context.contextNode.kind) { - case 203 /* FunctionDeclaration */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - //case SyntaxKind.MemberFunctionDeclaration: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - ///case SyntaxKind.MethodSignature: - case 140 /* CallSignature */: - case 165 /* FunctionExpression */: - case 137 /* Constructor */: - case 166 /* ArrowFunction */: - //case SyntaxKind.ConstructorDeclaration: - //case SyntaxKind.SimpleArrowFunctionExpression: - //case SyntaxKind.ParenthesizedArrowFunctionExpression: - case 205 /* InterfaceDeclaration */: - return true; - } - return false; - }; - Rules.IsFunctionDeclarationOrFunctionExpressionContext = function (context) { - return context.contextNode.kind === 203 /* FunctionDeclaration */ || context.contextNode.kind === 165 /* FunctionExpression */; - }; - Rules.IsTypeScriptDeclWithBlockContext = function (context) { - return Rules.NodeIsTypeScriptDeclWithBlockContext(context.contextNode); - }; - Rules.NodeIsTypeScriptDeclWithBlockContext = function (node) { - switch (node.kind) { - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 207 /* EnumDeclaration */: - case 148 /* TypeLiteral */: - case 208 /* ModuleDeclaration */: - return true; - } - return false; - }; - Rules.IsAfterCodeBlockContext = function (context) { - switch (context.currentTokenParent.kind) { - case 204 /* ClassDeclaration */: - case 208 /* ModuleDeclaration */: - case 207 /* EnumDeclaration */: - case 182 /* Block */: - case 226 /* CatchClause */: - case 209 /* ModuleBlock */: - case 196 /* SwitchStatement */: - return true; - } - return false; - }; - Rules.IsControlDeclContext = function (context) { - switch (context.contextNode.kind) { - case 186 /* IfStatement */: - case 196 /* SwitchStatement */: - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 188 /* WhileStatement */: - case 199 /* TryStatement */: - case 187 /* DoStatement */: - case 195 /* WithStatement */: - // TODO - // case SyntaxKind.ElseClause: - case 226 /* CatchClause */: - return true; - default: - return false; - } - }; - Rules.IsObjectContext = function (context) { - return context.contextNode.kind === 157 /* ObjectLiteralExpression */; - }; - Rules.IsFunctionCallContext = function (context) { - return context.contextNode.kind === 160 /* CallExpression */; - }; - Rules.IsNewContext = function (context) { - return context.contextNode.kind === 161 /* NewExpression */; - }; - Rules.IsFunctionCallOrNewContext = function (context) { - return Rules.IsFunctionCallContext(context) || Rules.IsNewContext(context); - }; - Rules.IsPreviousTokenNotComma = function (context) { - return context.currentTokenSpan.kind !== 23 /* CommaToken */; - }; - Rules.IsSameLineTokenContext = function (context) { - return context.TokensAreOnSameLine(); - }; - Rules.IsNotBeforeBlockInFunctionDeclarationContext = function (context) { - return !Rules.IsFunctionDeclContext(context) && !Rules.IsBeforeBlockContext(context); - }; - Rules.IsEndOfDecoratorContextOnSameLine = function (context) { - return context.TokensAreOnSameLine() && - context.contextNode.decorators && - Rules.NodeIsInDecoratorContext(context.currentTokenParent) && - !Rules.NodeIsInDecoratorContext(context.nextTokenParent); - }; - Rules.NodeIsInDecoratorContext = function (node) { - while (ts.isExpression(node)) { - node = node.parent; - } - return node.kind === 132 /* Decorator */; - }; - Rules.IsStartOfVariableDeclarationList = function (context) { - return context.currentTokenParent.kind === 202 /* VariableDeclarationList */ && - context.currentTokenParent.getStart(context.sourceFile) === context.currentTokenSpan.pos; - }; - Rules.IsNotFormatOnEnter = function (context) { - return context.formattingRequestKind != 2 /* FormatOnEnter */; - }; - Rules.IsModuleDeclContext = function (context) { - return context.contextNode.kind === 208 /* ModuleDeclaration */; - }; - Rules.IsObjectTypeContext = function (context) { - return context.contextNode.kind === 148 /* TypeLiteral */; // && context.contextNode.parent.kind !== SyntaxKind.InterfaceDeclaration; - }; - Rules.IsTypeArgumentOrParameter = function (token, parent) { - if (token.kind !== 24 /* LessThanToken */ && token.kind !== 25 /* GreaterThanToken */) { - return false; - } - switch (parent.kind) { - case 144 /* TypeReference */: - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 160 /* CallExpression */: - case 161 /* NewExpression */: - return true; - default: - return false; - } - }; - Rules.IsTypeArgumentOrParameterContext = function (context) { - return Rules.IsTypeArgumentOrParameter(context.currentTokenSpan, context.currentTokenParent) || - Rules.IsTypeArgumentOrParameter(context.nextTokenSpan, context.nextTokenParent); - }; - Rules.IsVoidOpContext = function (context) { - return context.currentTokenSpan.kind === 99 /* VoidKeyword */ && context.currentTokenParent.kind === 169 /* VoidExpression */; - }; - Rules.IsYieldOrYieldStarWithOperand = function (context) { - return context.contextNode.kind === 175 /* YieldExpression */ && context.contextNode.expression !== undefined; - }; - return Rules; - })(); - formatting.Rules = Rules; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var RulesMap = (function () { - function RulesMap() { - this.map = []; - this.mapRowLength = 0; - } - RulesMap.create = function (rules) { - var result = new RulesMap(); - result.Initialize(rules); - return result; - }; - RulesMap.prototype.Initialize = function (rules) { - this.mapRowLength = 127 /* LastToken */ + 1; - this.map = new Array(this.mapRowLength * this.mapRowLength); //new Array(this.mapRowLength * this.mapRowLength); - // This array is used only during construction of the rulesbucket in the map - var rulesBucketConstructionStateList = new Array(this.map.length); //new Array(this.map.length); - this.FillRules(rules, rulesBucketConstructionStateList); - return this.map; - }; - RulesMap.prototype.FillRules = function (rules, rulesBucketConstructionStateList) { - var _this = this; - rules.forEach(function (rule) { - _this.FillRule(rule, rulesBucketConstructionStateList); - }); - }; - RulesMap.prototype.GetRuleBucketIndex = function (row, column) { - var rulesBucketIndex = (row * this.mapRowLength) + column; - //Debug.Assert(rulesBucketIndex < this.map.Length, "Trying to access an index outside the array."); - return rulesBucketIndex; - }; - RulesMap.prototype.FillRule = function (rule, rulesBucketConstructionStateList) { - var _this = this; - var specificRule = rule.Descriptor.LeftTokenRange != formatting.Shared.TokenRange.Any && - rule.Descriptor.RightTokenRange != formatting.Shared.TokenRange.Any; - rule.Descriptor.LeftTokenRange.GetTokens().forEach(function (left) { - rule.Descriptor.RightTokenRange.GetTokens().forEach(function (right) { - var rulesBucketIndex = _this.GetRuleBucketIndex(left, right); - var rulesBucket = _this.map[rulesBucketIndex]; - if (rulesBucket == undefined) { - rulesBucket = _this.map[rulesBucketIndex] = new RulesBucket(); - } - rulesBucket.AddRule(rule, specificRule, rulesBucketConstructionStateList, rulesBucketIndex); - }); - }); - }; - RulesMap.prototype.GetRule = function (context) { - var bucketIndex = this.GetRuleBucketIndex(context.currentTokenSpan.kind, context.nextTokenSpan.kind); - var bucket = this.map[bucketIndex]; - if (bucket != null) { - for (var _i = 0, _a = bucket.Rules(); _i < _a.length; _i++) { - var rule = _a[_i]; - if (rule.Operation.Context.InContext(context)) { - return rule; - } - } - } - return null; - }; - return RulesMap; - })(); - formatting.RulesMap = RulesMap; - var MaskBitSize = 5; - var Mask = 0x1f; - (function (RulesPosition) { - RulesPosition[RulesPosition["IgnoreRulesSpecific"] = 0] = "IgnoreRulesSpecific"; - RulesPosition[RulesPosition["IgnoreRulesAny"] = MaskBitSize * 1] = "IgnoreRulesAny"; - RulesPosition[RulesPosition["ContextRulesSpecific"] = MaskBitSize * 2] = "ContextRulesSpecific"; - RulesPosition[RulesPosition["ContextRulesAny"] = MaskBitSize * 3] = "ContextRulesAny"; - RulesPosition[RulesPosition["NoContextRulesSpecific"] = MaskBitSize * 4] = "NoContextRulesSpecific"; - RulesPosition[RulesPosition["NoContextRulesAny"] = MaskBitSize * 5] = "NoContextRulesAny"; - })(formatting.RulesPosition || (formatting.RulesPosition = {})); - var RulesPosition = formatting.RulesPosition; - var RulesBucketConstructionState = (function () { - function RulesBucketConstructionState() { - //// The Rules list contains all the inserted rules into a rulebucket in the following order: - //// 1- Ignore rules with specific token combination - //// 2- Ignore rules with any token combination - //// 3- Context rules with specific token combination - //// 4- Context rules with any token combination - //// 5- Non-context rules with specific token combination - //// 6- Non-context rules with any token combination - //// - //// The member rulesInsertionIndexBitmap is used to describe the number of rules - //// in each sub-bucket (above) hence can be used to know the index of where to insert - //// the next rule. It's a bitmap which contains 6 different sections each is given 5 bits. - //// - //// Example: - //// In order to insert a rule to the end of sub-bucket (3), we get the index by adding - //// the values in the bitmap segments 3rd, 2nd, and 1st. - this.rulesInsertionIndexBitmap = 0; - } - RulesBucketConstructionState.prototype.GetInsertionIndex = function (maskPosition) { - var index = 0; - var pos = 0; - var indexBitmap = this.rulesInsertionIndexBitmap; - while (pos <= maskPosition) { - index += (indexBitmap & Mask); - indexBitmap >>= MaskBitSize; - pos += MaskBitSize; - } - return index; - }; - RulesBucketConstructionState.prototype.IncreaseInsertionIndex = function (maskPosition) { - var value = (this.rulesInsertionIndexBitmap >> maskPosition) & Mask; - value++; - ts.Debug.assert((value & Mask) == value, "Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules."); - var temp = this.rulesInsertionIndexBitmap & ~(Mask << maskPosition); - temp |= value << maskPosition; - this.rulesInsertionIndexBitmap = temp; - }; - return RulesBucketConstructionState; - })(); - formatting.RulesBucketConstructionState = RulesBucketConstructionState; - var RulesBucket = (function () { - function RulesBucket() { - this.rules = []; - } - RulesBucket.prototype.Rules = function () { - return this.rules; - }; - RulesBucket.prototype.AddRule = function (rule, specificTokens, constructionState, rulesBucketIndex) { - var position; - if (rule.Operation.Action == 1 /* Ignore */) { - position = specificTokens ? - RulesPosition.IgnoreRulesSpecific : - RulesPosition.IgnoreRulesAny; - } - else if (!rule.Operation.Context.IsAny()) { - position = specificTokens ? - RulesPosition.ContextRulesSpecific : - RulesPosition.ContextRulesAny; - } - else { - position = specificTokens ? - RulesPosition.NoContextRulesSpecific : - RulesPosition.NoContextRulesAny; - } - var state = constructionState[rulesBucketIndex]; - if (state === undefined) { - state = constructionState[rulesBucketIndex] = new RulesBucketConstructionState(); - } - var index = state.GetInsertionIndex(position); - this.rules.splice(index, 0, rule); - state.IncreaseInsertionIndex(position); - }; - return RulesBucket; - })(); - formatting.RulesBucket = RulesBucket; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var Shared; - (function (Shared) { - var TokenRangeAccess = (function () { - function TokenRangeAccess(from, to, except) { - this.tokens = []; - for (var token = from; token <= to; token++) { - if (except.indexOf(token) < 0) { - this.tokens.push(token); - } - } - } - TokenRangeAccess.prototype.GetTokens = function () { - return this.tokens; - }; - TokenRangeAccess.prototype.Contains = function (token) { - return this.tokens.indexOf(token) >= 0; - }; - return TokenRangeAccess; - })(); - Shared.TokenRangeAccess = TokenRangeAccess; - var TokenValuesAccess = (function () { - function TokenValuesAccess(tks) { - this.tokens = tks && tks.length ? tks : []; - } - TokenValuesAccess.prototype.GetTokens = function () { - return this.tokens; - }; - TokenValuesAccess.prototype.Contains = function (token) { - return this.tokens.indexOf(token) >= 0; - }; - return TokenValuesAccess; - })(); - Shared.TokenValuesAccess = TokenValuesAccess; - var TokenSingleValueAccess = (function () { - function TokenSingleValueAccess(token) { - this.token = token; - } - TokenSingleValueAccess.prototype.GetTokens = function () { - return [this.token]; - }; - TokenSingleValueAccess.prototype.Contains = function (tokenValue) { - return tokenValue == this.token; - }; - return TokenSingleValueAccess; - })(); - Shared.TokenSingleValueAccess = TokenSingleValueAccess; - var TokenAllAccess = (function () { - function TokenAllAccess() { - } - TokenAllAccess.prototype.GetTokens = function () { - var result = []; - for (var token = 0 /* FirstToken */; token <= 127 /* LastToken */; token++) { - result.push(token); - } - return result; - }; - TokenAllAccess.prototype.Contains = function (tokenValue) { - return true; - }; - TokenAllAccess.prototype.toString = function () { - return "[allTokens]"; - }; - return TokenAllAccess; - })(); - Shared.TokenAllAccess = TokenAllAccess; - var TokenRange = (function () { - function TokenRange(tokenAccess) { - this.tokenAccess = tokenAccess; - } - TokenRange.FromToken = function (token) { - return new TokenRange(new TokenSingleValueAccess(token)); - }; - TokenRange.FromTokens = function (tokens) { - return new TokenRange(new TokenValuesAccess(tokens)); - }; - TokenRange.FromRange = function (f, to, except) { - if (except === void 0) { except = []; } - return new TokenRange(new TokenRangeAccess(f, to, except)); - }; - TokenRange.AllTokens = function () { - return new TokenRange(new TokenAllAccess()); - }; - TokenRange.prototype.GetTokens = function () { - return this.tokenAccess.GetTokens(); - }; - TokenRange.prototype.Contains = function (token) { - return this.tokenAccess.Contains(token); - }; - TokenRange.prototype.toString = function () { - return this.tokenAccess.toString(); - }; - TokenRange.Any = TokenRange.AllTokens(); - TokenRange.AnyIncludingMultilineComments = TokenRange.FromTokens(TokenRange.Any.GetTokens().concat([3 /* MultiLineCommentTrivia */])); - TokenRange.Keywords = TokenRange.FromRange(66 /* FirstKeyword */, 127 /* LastKeyword */); - TokenRange.BinaryOperators = TokenRange.FromRange(24 /* FirstBinaryOperator */, 64 /* LastBinaryOperator */); - TokenRange.BinaryKeywordOperators = TokenRange.FromTokens([86 /* InKeyword */, 87 /* InstanceOfKeyword */, 127 /* OfKeyword */, 117 /* IsKeyword */]); - TokenRange.UnaryPrefixOperators = TokenRange.FromTokens([38 /* PlusPlusToken */, 39 /* MinusMinusToken */, 47 /* TildeToken */, 46 /* ExclamationToken */]); - TokenRange.UnaryPrefixExpressions = TokenRange.FromTokens([7 /* NumericLiteral */, 65 /* Identifier */, 16 /* OpenParenToken */, 18 /* OpenBracketToken */, 14 /* OpenBraceToken */, 93 /* ThisKeyword */, 88 /* NewKeyword */]); - TokenRange.UnaryPreincrementExpressions = TokenRange.FromTokens([65 /* Identifier */, 16 /* OpenParenToken */, 93 /* ThisKeyword */, 88 /* NewKeyword */]); - TokenRange.UnaryPostincrementExpressions = TokenRange.FromTokens([65 /* Identifier */, 17 /* CloseParenToken */, 19 /* CloseBracketToken */, 88 /* NewKeyword */]); - TokenRange.UnaryPredecrementExpressions = TokenRange.FromTokens([65 /* Identifier */, 16 /* OpenParenToken */, 93 /* ThisKeyword */, 88 /* NewKeyword */]); - TokenRange.UnaryPostdecrementExpressions = TokenRange.FromTokens([65 /* Identifier */, 17 /* CloseParenToken */, 19 /* CloseBracketToken */, 88 /* NewKeyword */]); - TokenRange.Comments = TokenRange.FromTokens([2 /* SingleLineCommentTrivia */, 3 /* MultiLineCommentTrivia */]); - TokenRange.TypeNames = TokenRange.FromTokens([65 /* Identifier */, 121 /* NumberKeyword */, 123 /* StringKeyword */, 113 /* BooleanKeyword */, 124 /* SymbolKeyword */, 99 /* VoidKeyword */, 112 /* AnyKeyword */]); - return TokenRange; - })(); - Shared.TokenRange = TokenRange; - })(Shared = formatting.Shared || (formatting.Shared = {})); - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var RulesProvider = (function () { - function RulesProvider() { - this.globalRules = new formatting.Rules(); - } - RulesProvider.prototype.getRuleName = function (rule) { - return this.globalRules.getRuleName(rule); - }; - RulesProvider.prototype.getRuleByName = function (name) { - return this.globalRules[name]; - }; - RulesProvider.prototype.getRulesMap = function () { - return this.rulesMap; - }; - RulesProvider.prototype.ensureUpToDate = function (options) { - if (this.options == null || !ts.compareDataObjects(this.options, options)) { - var activeRules = this.createActiveRules(options); - var rulesMap = formatting.RulesMap.create(activeRules); - this.activeRules = activeRules; - this.rulesMap = rulesMap; - this.options = ts.clone(options); - } - }; - RulesProvider.prototype.createActiveRules = function (options) { - var rules = this.globalRules.HighPriorityCommonRules.slice(0); - if (options.InsertSpaceAfterCommaDelimiter) { - rules.push(this.globalRules.SpaceAfterComma); - } - else { - rules.push(this.globalRules.NoSpaceAfterComma); - } - if (options.InsertSpaceAfterFunctionKeywordForAnonymousFunctions) { - rules.push(this.globalRules.SpaceAfterAnonymousFunctionKeyword); - } - else { - rules.push(this.globalRules.NoSpaceAfterAnonymousFunctionKeyword); - } - if (options.InsertSpaceAfterKeywordsInControlFlowStatements) { - rules.push(this.globalRules.SpaceAfterKeywordInControl); - } - else { - rules.push(this.globalRules.NoSpaceAfterKeywordInControl); - } - if (options.InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis) { - rules.push(this.globalRules.SpaceAfterOpenParen); - rules.push(this.globalRules.SpaceBeforeCloseParen); - rules.push(this.globalRules.NoSpaceBetweenParens); - } - else { - rules.push(this.globalRules.NoSpaceAfterOpenParen); - rules.push(this.globalRules.NoSpaceBeforeCloseParen); - rules.push(this.globalRules.NoSpaceBetweenParens); - } - if (options.InsertSpaceAfterSemicolonInForStatements) { - rules.push(this.globalRules.SpaceAfterSemicolonInFor); - } - else { - rules.push(this.globalRules.NoSpaceAfterSemicolonInFor); - } - if (options.InsertSpaceBeforeAndAfterBinaryOperators) { - rules.push(this.globalRules.SpaceBeforeBinaryOperator); - rules.push(this.globalRules.SpaceAfterBinaryOperator); - } - else { - rules.push(this.globalRules.NoSpaceBeforeBinaryOperator); - rules.push(this.globalRules.NoSpaceAfterBinaryOperator); - } - if (options.PlaceOpenBraceOnNewLineForControlBlocks) { - rules.push(this.globalRules.NewLineBeforeOpenBraceInControl); - } - if (options.PlaceOpenBraceOnNewLineForFunctions) { - rules.push(this.globalRules.NewLineBeforeOpenBraceInFunction); - rules.push(this.globalRules.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock); - } - rules = rules.concat(this.globalRules.LowPriorityCommonRules); - return rules; - }; - return RulesProvider; - })(); - formatting.RulesProvider = RulesProvider; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/// -/// -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var Constants; - (function (Constants) { - Constants[Constants["Unknown"] = -1] = "Unknown"; - })(Constants || (Constants = {})); - function formatOnEnter(position, sourceFile, rulesProvider, options) { - var line = sourceFile.getLineAndCharacterOfPosition(position).line; - if (line === 0) { - return []; - } - // get the span for the previous\current line - var span = { - // get start position for the previous line - pos: ts.getStartPositionOfLine(line - 1, sourceFile), - // get end position for the current line (end value is exclusive so add 1 to the result) - end: ts.getEndLinePosition(line, sourceFile) + 1 - }; - return formatSpan(span, sourceFile, options, rulesProvider, 2 /* FormatOnEnter */); - } - formatting.formatOnEnter = formatOnEnter; - function formatOnSemicolon(position, sourceFile, rulesProvider, options) { - return formatOutermostParent(position, 22 /* SemicolonToken */, sourceFile, options, rulesProvider, 3 /* FormatOnSemicolon */); - } - formatting.formatOnSemicolon = formatOnSemicolon; - function formatOnClosingCurly(position, sourceFile, rulesProvider, options) { - return formatOutermostParent(position, 15 /* CloseBraceToken */, sourceFile, options, rulesProvider, 4 /* FormatOnClosingCurlyBrace */); - } - formatting.formatOnClosingCurly = formatOnClosingCurly; - function formatDocument(sourceFile, rulesProvider, options) { - var span = { - pos: 0, - end: sourceFile.text.length - }; - return formatSpan(span, sourceFile, options, rulesProvider, 0 /* FormatDocument */); - } - formatting.formatDocument = formatDocument; - function formatSelection(start, end, sourceFile, rulesProvider, options) { - // format from the beginning of the line - var span = { - pos: ts.getLineStartPositionForPosition(start, sourceFile), - end: end - }; - return formatSpan(span, sourceFile, options, rulesProvider, 1 /* FormatSelection */); - } - formatting.formatSelection = formatSelection; - function formatOutermostParent(position, expectedLastToken, sourceFile, options, rulesProvider, requestKind) { - var parent = findOutermostParent(position, expectedLastToken, sourceFile); - if (!parent) { - return []; - } - var span = { - pos: ts.getLineStartPositionForPosition(parent.getStart(sourceFile), sourceFile), - end: parent.end - }; - return formatSpan(span, sourceFile, options, rulesProvider, requestKind); - } - function findOutermostParent(position, expectedTokenKind, sourceFile) { - var precedingToken = ts.findPrecedingToken(position, sourceFile); - // when it is claimed that trigger character was typed at given position - // we verify that there is a token with a matching kind whose end is equal to position (because the character was just typed). - // If this condition is not hold - then trigger character was typed in some other context, - // i.e.in comment and thus should not trigger autoformatting - if (!precedingToken || - precedingToken.kind !== expectedTokenKind || - position !== precedingToken.getEnd()) { - return undefined; - } - // walk up and search for the parent node that ends at the same position with precedingToken. - // for cases like this - // - // let x = 1; - // while (true) { - // } - // after typing close curly in while statement we want to reformat just the while statement. - // However if we just walk upwards searching for the parent that has the same end value - - // we'll end up with the whole source file. isListElement allows to stop on the list element level - var current = precedingToken; - while (current && - current.parent && - current.parent.end === precedingToken.end && - !isListElement(current.parent, current)) { - current = current.parent; - } - return current; - } - // Returns true if node is a element in some list in parent - // i.e. parent is class declaration with the list of members and node is one of members. - function isListElement(parent, node) { - switch (parent.kind) { - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - return ts.rangeContainsRange(parent.members, node); - case 208 /* ModuleDeclaration */: - var body = parent.body; - return body && body.kind === 182 /* Block */ && ts.rangeContainsRange(body.statements, node); - case 230 /* SourceFile */: - case 182 /* Block */: - case 209 /* ModuleBlock */: - return ts.rangeContainsRange(parent.statements, node); - case 226 /* CatchClause */: - return ts.rangeContainsRange(parent.block.statements, node); - } - return false; - } - /** find node that fully contains given text range */ - function findEnclosingNode(range, sourceFile) { - return find(sourceFile); - function find(n) { - var candidate = ts.forEachChild(n, function (c) { return ts.startEndContainsRange(c.getStart(sourceFile), c.end, range) && c; }); - if (candidate) { - var result = find(candidate); - if (result) { - return result; - } - } - return n; - } - } - /** formatting is not applied to ranges that contain parse errors. - * This function will return a predicate that for a given text range will tell - * if there are any parse errors that overlap with the range. - */ - function prepareRangeContainsErrorFunction(errors, originalRange) { - if (!errors.length) { - return rangeHasNoErrors; - } - // pick only errors that fall in range - var sorted = errors - .filter(function (d) { return ts.rangeOverlapsWithStartEnd(originalRange, d.start, d.start + d.length); }) - .sort(function (e1, e2) { return e1.start - e2.start; }); - if (!sorted.length) { - return rangeHasNoErrors; - } - var index = 0; - return function (r) { - // in current implementation sequence of arguments [r1, r2...] is monotonically increasing. - // 'index' tracks the index of the most recent error that was checked. - while (true) { - if (index >= sorted.length) { - // all errors in the range were already checked -> no error in specified range - return false; - } - var error = sorted[index]; - if (r.end <= error.start) { - // specified range ends before the error refered by 'index' - no error in range - return false; - } - if (ts.startEndOverlapsWithStartEnd(r.pos, r.end, error.start, error.start + error.length)) { - // specified range overlaps with error range - return true; - } - index++; - } - }; - function rangeHasNoErrors(r) { - return false; - } - } - /** - * Start of the original range might fall inside the comment - scanner will not yield appropriate results - * This function will look for token that is located before the start of target range - * and return its end as start position for the scanner. - */ - function getScanStartPosition(enclosingNode, originalRange, sourceFile) { - var start = enclosingNode.getStart(sourceFile); - if (start === originalRange.pos && enclosingNode.end === originalRange.end) { - return start; - } - var precedingToken = ts.findPrecedingToken(originalRange.pos, sourceFile); - if (!precedingToken) { - // no preceding token found - start from the beginning of enclosing node - return enclosingNode.pos; - } - // preceding token ends after the start of original range (i.e when originaRange.pos falls in the middle of literal) - // start from the beginning of enclosingNode to handle the entire 'originalRange' - if (precedingToken.end >= originalRange.pos) { - return enclosingNode.pos; - } - return precedingToken.end; - } - /* - * For cases like - * if (a || - * b ||$ - * c) {...} - * If we hit Enter at $ we want line ' b ||' to be indented. - * Formatting will be applied to the last two lines. - * Node that fully encloses these lines is binary expression 'a ||...'. - * Initial indentation for this node will be 0. - * Binary expressions don't introduce new indentation scopes, however it is possible - * that some parent node on the same line does - like if statement in this case. - * Note that we are considering parents only from the same line with initial node - - * if parent is on the different line - its delta was already contributed - * to the initial indentation. - */ - function getOwnOrInheritedDelta(n, options, sourceFile) { - var previousLine = -1 /* Unknown */; - var childKind = 0 /* Unknown */; - while (n) { - var line = sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)).line; - if (previousLine !== -1 /* Unknown */ && line !== previousLine) { - break; - } - if (formatting.SmartIndenter.shouldIndentChildNode(n.kind, childKind)) { - return options.IndentSize; - } - previousLine = line; - childKind = n.kind; - n = n.parent; - } - return 0; - } - function formatSpan(originalRange, sourceFile, options, rulesProvider, requestKind) { - var rangeContainsError = prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange); - // formatting context is used by rules provider - var formattingContext = new formatting.FormattingContext(sourceFile, requestKind); - // find the smallest node that fully wraps the range and compute the initial indentation for the node - var enclosingNode = findEnclosingNode(originalRange, sourceFile); - var formattingScanner = formatting.getFormattingScanner(sourceFile, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end); - var initialIndentation = formatting.SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options); - var previousRangeHasError; - var previousRange; - var previousParent; - var previousRangeStartLine; - var lastIndentedLine; - var indentationOnLastIndentedLine; - var edits = []; - formattingScanner.advance(); - if (formattingScanner.isOnToken()) { - var startLine = sourceFile.getLineAndCharacterOfPosition(enclosingNode.getStart(sourceFile)).line; - var undecoratedStartLine = startLine; - if (enclosingNode.decorators) { - undecoratedStartLine = sourceFile.getLineAndCharacterOfPosition(ts.getNonDecoratorTokenPosOfNode(enclosingNode, sourceFile)).line; - } - var delta = getOwnOrInheritedDelta(enclosingNode, options, sourceFile); - processNode(enclosingNode, enclosingNode, startLine, undecoratedStartLine, initialIndentation, delta); - } - formattingScanner.close(); - return edits; - // local functions - /** Tries to compute the indentation for a list element. - * If list element is not in range then - * function will pick its actual indentation - * so it can be pushed downstream as inherited indentation. - * If list element is in the range - its indentation will be equal - * to inherited indentation from its predecessors. - */ - function tryComputeIndentationForListItem(startPos, endPos, parentStartLine, range, inheritedIndentation) { - if (ts.rangeOverlapsWithStartEnd(range, startPos, endPos)) { - if (inheritedIndentation !== -1 /* Unknown */) { - return inheritedIndentation; - } - } - else { - var startLine = sourceFile.getLineAndCharacterOfPosition(startPos).line; - var startLinePosition = ts.getLineStartPositionForPosition(startPos, sourceFile); - var column = formatting.SmartIndenter.findFirstNonWhitespaceColumn(startLinePosition, startPos, sourceFile, options); - if (startLine !== parentStartLine || startPos === column) { - return column; - } - } - return -1 /* Unknown */; - } - function computeIndentation(node, startLine, inheritedIndentation, parent, parentDynamicIndentation, effectiveParentStartLine) { - var indentation = inheritedIndentation; - if (indentation === -1 /* Unknown */) { - if (isSomeBlock(node.kind)) { - // blocks should be indented in - // - other blocks - // - source file - // - switch\default clauses - if (isSomeBlock(parent.kind) || - parent.kind === 230 /* SourceFile */ || - parent.kind === 223 /* CaseClause */ || - parent.kind === 224 /* DefaultClause */) { - indentation = parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(); - } - else { - indentation = parentDynamicIndentation.getIndentation(); - } - } - else { - if (formatting.SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(parent, node, startLine, sourceFile)) { - indentation = parentDynamicIndentation.getIndentation(); - } - else { - indentation = parentDynamicIndentation.getIndentation() + parentDynamicIndentation.getDelta(); - } - } - } - var delta = formatting.SmartIndenter.shouldIndentChildNode(node.kind, 0 /* Unknown */) ? options.IndentSize : 0; - if (effectiveParentStartLine === startLine) { - // if node is located on the same line with the parent - // - inherit indentation from the parent - // - push children if either parent of node itself has non-zero delta - indentation = startLine === lastIndentedLine - ? indentationOnLastIndentedLine - : parentDynamicIndentation.getIndentation(); - delta = Math.min(options.IndentSize, parentDynamicIndentation.getDelta() + delta); - } - return { - indentation: indentation, - delta: delta - }; - } - function getFirstNonDecoratorTokenOfNode(node) { - if (node.modifiers && node.modifiers.length) { - return node.modifiers[0].kind; - } - switch (node.kind) { - case 204 /* ClassDeclaration */: return 69 /* ClassKeyword */; - case 205 /* InterfaceDeclaration */: return 103 /* InterfaceKeyword */; - case 203 /* FunctionDeclaration */: return 83 /* FunctionKeyword */; - case 207 /* EnumDeclaration */: return 207 /* EnumDeclaration */; - case 138 /* GetAccessor */: return 116 /* GetKeyword */; - case 139 /* SetAccessor */: return 122 /* SetKeyword */; - case 136 /* MethodDeclaration */: - if (node.asteriskToken) { - return 35 /* AsteriskToken */; - } - // fall-through - case 134 /* PropertyDeclaration */: - case 131 /* Parameter */: - return node.name.kind; - } - } - function getDynamicIndentation(node, nodeStartLine, indentation, delta) { - return { - getIndentationForComment: function (kind) { - switch (kind) { - // preceding comment to the token that closes the indentation scope inherits the indentation from the scope - // .. { - // // comment - // } - case 15 /* CloseBraceToken */: - case 19 /* CloseBracketToken */: - return indentation + delta; - } - return indentation; - }, - getIndentationForToken: function (line, kind) { - if (nodeStartLine !== line && node.decorators) { - if (kind === getFirstNonDecoratorTokenOfNode(node)) { - // if this token is the first token following the list of decorators, we do not need to indent - return indentation; - } - } - switch (kind) { - // open and close brace, 'else' and 'while' (in do statement) tokens has indentation of the parent - case 14 /* OpenBraceToken */: - case 15 /* CloseBraceToken */: - case 18 /* OpenBracketToken */: - case 19 /* CloseBracketToken */: - case 76 /* ElseKeyword */: - case 100 /* WhileKeyword */: - case 52 /* AtToken */: - return indentation; - default: - // if token line equals to the line of containing node (this is a first token in the node) - use node indentation - return nodeStartLine !== line ? indentation + delta : indentation; - } - }, - getIndentation: function () { return indentation; }, - getDelta: function () { return delta; }, - recomputeIndentation: function (lineAdded) { - if (node.parent && formatting.SmartIndenter.shouldIndentChildNode(node.parent.kind, node.kind)) { - if (lineAdded) { - indentation += options.IndentSize; - } - else { - indentation -= options.IndentSize; - } - if (formatting.SmartIndenter.shouldIndentChildNode(node.kind, 0 /* Unknown */)) { - delta = options.IndentSize; - } - else { - delta = 0; - } - } - } - }; - } - function processNode(node, contextNode, nodeStartLine, undecoratedNodeStartLine, indentation, delta) { - if (!ts.rangeOverlapsWithStartEnd(originalRange, node.getStart(sourceFile), node.getEnd())) { - return; - } - var nodeDynamicIndentation = getDynamicIndentation(node, nodeStartLine, indentation, delta); - // a useful observations when tracking context node - // / - // [a] - // / | \ - // [b] [c] [d] - // node 'a' is a context node for nodes 'b', 'c', 'd' - // except for the leftmost leaf token in [b] - in this case context node ('e') is located somewhere above 'a' - // this rule can be applied recursively to child nodes of 'a'. - // - // context node is set to parent node value after processing every child node - // context node is set to parent of the token after processing every token - var childContextNode = contextNode; - // if there are any tokens that logically belong to node and interleave child nodes - // such tokens will be consumed in processChildNode for for the child that follows them - ts.forEachChild(node, function (child) { - processChildNode(child, -1 /* Unknown */, node, nodeDynamicIndentation, nodeStartLine, undecoratedNodeStartLine, false); - }, function (nodes) { - processChildNodes(nodes, node, nodeStartLine, nodeDynamicIndentation); - }); - // proceed any tokens in the node that are located after child nodes - while (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(node); - if (tokenInfo.token.end > node.end) { - break; - } - consumeTokenAndAdvanceScanner(tokenInfo, node, nodeDynamicIndentation); - } - function processChildNode(child, inheritedIndentation, parent, parentDynamicIndentation, parentStartLine, undecoratedParentStartLine, isListItem) { - var childStartPos = child.getStart(sourceFile); - var childStartLine = sourceFile.getLineAndCharacterOfPosition(childStartPos).line; - var undecoratedChildStartLine = childStartLine; - if (child.decorators) { - undecoratedChildStartLine = sourceFile.getLineAndCharacterOfPosition(ts.getNonDecoratorTokenPosOfNode(child, sourceFile)).line; - } - // if child is a list item - try to get its indentation - var childIndentationAmount = -1 /* Unknown */; - if (isListItem) { - childIndentationAmount = tryComputeIndentationForListItem(childStartPos, child.end, parentStartLine, originalRange, inheritedIndentation); - if (childIndentationAmount !== -1 /* Unknown */) { - inheritedIndentation = childIndentationAmount; - } - } - // child node is outside the target range - do not dive inside - if (!ts.rangeOverlapsWithStartEnd(originalRange, child.pos, child.end)) { - return inheritedIndentation; - } - if (child.getFullWidth() === 0) { - return inheritedIndentation; - } - while (formattingScanner.isOnToken()) { - // proceed any parent tokens that are located prior to child.getStart() - var tokenInfo = formattingScanner.readTokenInfo(node); - if (tokenInfo.token.end > childStartPos) { - // stop when formatting scanner advances past the beginning of the child - break; - } - consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation); - } - if (!formattingScanner.isOnToken()) { - return inheritedIndentation; - } - if (ts.isToken(child)) { - // if child node is a token, it does not impact indentation, proceed it using parent indentation scope rules - var tokenInfo = formattingScanner.readTokenInfo(child); - ts.Debug.assert(tokenInfo.token.end === child.end); - consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation); - return inheritedIndentation; - } - var effectiveParentStartLine = child.kind === 132 /* Decorator */ ? childStartLine : undecoratedParentStartLine; - var childIndentation = computeIndentation(child, childStartLine, childIndentationAmount, node, parentDynamicIndentation, effectiveParentStartLine); - processNode(child, childContextNode, childStartLine, undecoratedChildStartLine, childIndentation.indentation, childIndentation.delta); - childContextNode = node; - return inheritedIndentation; - } - function processChildNodes(nodes, parent, parentStartLine, parentDynamicIndentation) { - var listStartToken = getOpenTokenForList(parent, nodes); - var listEndToken = getCloseTokenForOpenToken(listStartToken); - var listDynamicIndentation = parentDynamicIndentation; - var startLine = parentStartLine; - if (listStartToken !== 0 /* Unknown */) { - // introduce a new indentation scope for lists (including list start and end tokens) - while (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(parent); - if (tokenInfo.token.end > nodes.pos) { - // stop when formatting scanner moves past the beginning of node list - break; - } - else if (tokenInfo.token.kind === listStartToken) { - // consume list start token - startLine = sourceFile.getLineAndCharacterOfPosition(tokenInfo.token.pos).line; - var indentation_1 = computeIndentation(tokenInfo.token, startLine, -1 /* Unknown */, parent, parentDynamicIndentation, startLine); - listDynamicIndentation = getDynamicIndentation(parent, parentStartLine, indentation_1.indentation, indentation_1.delta); - consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation); - } - else { - // consume any tokens that precede the list as child elements of 'node' using its indentation scope - consumeTokenAndAdvanceScanner(tokenInfo, parent, parentDynamicIndentation); - } - } - } - var inheritedIndentation = -1 /* Unknown */; - for (var _i = 0; _i < nodes.length; _i++) { - var child = nodes[_i]; - inheritedIndentation = processChildNode(child, inheritedIndentation, node, listDynamicIndentation, startLine, startLine, true); - } - if (listEndToken !== 0 /* Unknown */) { - if (formattingScanner.isOnToken()) { - var tokenInfo = formattingScanner.readTokenInfo(parent); - // consume the list end token only if it is still belong to the parent - // there might be the case when current token matches end token but does not considered as one - // function (x: function) <-- - // without this check close paren will be interpreted as list end token for function expression which is wrong - if (tokenInfo.token.kind === listEndToken && ts.rangeContainsRange(parent, tokenInfo.token)) { - // consume list end token - consumeTokenAndAdvanceScanner(tokenInfo, parent, listDynamicIndentation); - } - } - } - } - function consumeTokenAndAdvanceScanner(currentTokenInfo, parent, dynamicIndentation) { - ts.Debug.assert(ts.rangeContainsRange(parent, currentTokenInfo.token)); - var lastTriviaWasNewLine = formattingScanner.lastTrailingTriviaWasNewLine(); - var indentToken = false; - if (currentTokenInfo.leadingTrivia) { - processTrivia(currentTokenInfo.leadingTrivia, parent, childContextNode, dynamicIndentation); - } - var lineAdded; - var isTokenInRange = ts.rangeContainsRange(originalRange, currentTokenInfo.token); - var tokenStart = sourceFile.getLineAndCharacterOfPosition(currentTokenInfo.token.pos); - if (isTokenInRange) { - var rangeHasError = rangeContainsError(currentTokenInfo.token); - // save prevStartLine since processRange will overwrite this value with current ones - var prevStartLine = previousRangeStartLine; - lineAdded = processRange(currentTokenInfo.token, tokenStart, parent, childContextNode, dynamicIndentation); - if (rangeHasError) { - // do not indent comments\token if token range overlaps with some error - indentToken = false; - } - else { - if (lineAdded !== undefined) { - indentToken = lineAdded; - } - else { - indentToken = lastTriviaWasNewLine && tokenStart.line !== prevStartLine; - } - } - } - if (currentTokenInfo.trailingTrivia) { - processTrivia(currentTokenInfo.trailingTrivia, parent, childContextNode, dynamicIndentation); - } - if (indentToken) { - var indentNextTokenOrTrivia = true; - if (currentTokenInfo.leadingTrivia) { - for (var _i = 0, _a = currentTokenInfo.leadingTrivia; _i < _a.length; _i++) { - var triviaItem = _a[_i]; - if (!ts.rangeContainsRange(originalRange, triviaItem)) { - continue; - } - switch (triviaItem.kind) { - case 3 /* MultiLineCommentTrivia */: - var commentIndentation = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); - indentMultilineComment(triviaItem, commentIndentation, !indentNextTokenOrTrivia); - indentNextTokenOrTrivia = false; - break; - case 2 /* SingleLineCommentTrivia */: - if (indentNextTokenOrTrivia) { - var commentIndentation_1 = dynamicIndentation.getIndentationForComment(currentTokenInfo.token.kind); - insertIndentation(triviaItem.pos, commentIndentation_1, false); - indentNextTokenOrTrivia = false; - } - break; - case 4 /* NewLineTrivia */: - indentNextTokenOrTrivia = true; - break; - } - } - } - // indent token only if is it is in target range and does not overlap with any error ranges - if (isTokenInRange && !rangeContainsError(currentTokenInfo.token)) { - var tokenIndentation = dynamicIndentation.getIndentationForToken(tokenStart.line, currentTokenInfo.token.kind); - insertIndentation(currentTokenInfo.token.pos, tokenIndentation, lineAdded); - lastIndentedLine = tokenStart.line; - indentationOnLastIndentedLine = tokenIndentation; - } - } - formattingScanner.advance(); - childContextNode = parent; - } - } - function processTrivia(trivia, parent, contextNode, dynamicIndentation) { - for (var _i = 0; _i < trivia.length; _i++) { - var triviaItem = trivia[_i]; - if (ts.isComment(triviaItem.kind) && ts.rangeContainsRange(originalRange, triviaItem)) { - var triviaItemStart = sourceFile.getLineAndCharacterOfPosition(triviaItem.pos); - processRange(triviaItem, triviaItemStart, parent, contextNode, dynamicIndentation); - } - } - } - function processRange(range, rangeStart, parent, contextNode, dynamicIndentation) { - var rangeHasError = rangeContainsError(range); - var lineAdded; - if (!rangeHasError && !previousRangeHasError) { - if (!previousRange) { - // trim whitespaces starting from the beginning of the span up to the current line - var originalStart = sourceFile.getLineAndCharacterOfPosition(originalRange.pos); - trimTrailingWhitespacesForLines(originalStart.line, rangeStart.line); - } - else { - lineAdded = - processPair(range, rangeStart.line, parent, previousRange, previousRangeStartLine, previousParent, contextNode, dynamicIndentation); - } - } - previousRange = range; - previousParent = parent; - previousRangeStartLine = rangeStart.line; - previousRangeHasError = rangeHasError; - return lineAdded; - } - function processPair(currentItem, currentStartLine, currentParent, previousItem, previousStartLine, previousParent, contextNode, dynamicIndentation) { - formattingContext.updateContext(previousItem, previousParent, currentItem, currentParent, contextNode); - var rule = rulesProvider.getRulesMap().GetRule(formattingContext); - var trimTrailingWhitespaces; - var lineAdded; - if (rule) { - applyRuleEdits(rule, previousItem, previousStartLine, currentItem, currentStartLine); - if (rule.Operation.Action & (2 /* Space */ | 8 /* Delete */) && currentStartLine !== previousStartLine) { - lineAdded = false; - // Handle the case where the next line is moved to be the end of this line. - // In this case we don't indent the next line in the next pass. - if (currentParent.getStart(sourceFile) === currentItem.pos) { - dynamicIndentation.recomputeIndentation(false); - } - } - else if (rule.Operation.Action & 4 /* NewLine */ && currentStartLine === previousStartLine) { - lineAdded = true; - // Handle the case where token2 is moved to the new line. - // In this case we indent token2 in the next pass but we set - // sameLineIndent flag to notify the indenter that the indentation is within the line. - if (currentParent.getStart(sourceFile) === currentItem.pos) { - dynamicIndentation.recomputeIndentation(true); - } - } - // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line - trimTrailingWhitespaces = - (rule.Operation.Action & (4 /* NewLine */ | 2 /* Space */)) && - rule.Flag !== 1 /* CanDeleteNewLines */; - } - else { - trimTrailingWhitespaces = true; - } - if (currentStartLine !== previousStartLine && trimTrailingWhitespaces) { - // We need to trim trailing whitespace between the tokens if they were on different lines, and no rule was applied to put them on the same line - trimTrailingWhitespacesForLines(previousStartLine, currentStartLine, previousItem); - } - return lineAdded; - } - function insertIndentation(pos, indentation, lineAdded) { - var indentationString = getIndentationString(indentation, options); - if (lineAdded) { - // new line is added before the token by the formatting rules - // insert indentation string at the very beginning of the token - recordReplace(pos, 0, indentationString); - } - else { - var tokenStart = sourceFile.getLineAndCharacterOfPosition(pos); - if (indentation !== tokenStart.character) { - var startLinePosition = ts.getStartPositionOfLine(tokenStart.line, sourceFile); - recordReplace(startLinePosition, tokenStart.character, indentationString); - } - } - } - function indentMultilineComment(commentRange, indentation, firstLineIsIndented) { - // split comment in lines - var startLine = sourceFile.getLineAndCharacterOfPosition(commentRange.pos).line; - var endLine = sourceFile.getLineAndCharacterOfPosition(commentRange.end).line; - var parts; - if (startLine === endLine) { - if (!firstLineIsIndented) { - // treat as single line comment - insertIndentation(commentRange.pos, indentation, false); - } - return; - } - else { - parts = []; - var startPos = commentRange.pos; - for (var line = startLine; line < endLine; ++line) { - var endOfLine = ts.getEndLinePosition(line, sourceFile); - parts.push({ pos: startPos, end: endOfLine }); - startPos = ts.getStartPositionOfLine(line + 1, sourceFile); - } - parts.push({ pos: startPos, end: commentRange.end }); - } - var startLinePos = ts.getStartPositionOfLine(startLine, sourceFile); - var nonWhitespaceColumnInFirstPart = formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(startLinePos, parts[0].pos, sourceFile, options); - if (indentation === nonWhitespaceColumnInFirstPart.column) { - return; - } - var startIndex = 0; - if (firstLineIsIndented) { - startIndex = 1; - startLine++; - } - // shift all parts on the delta size - var delta = indentation - nonWhitespaceColumnInFirstPart.column; - for (var i = startIndex, len = parts.length; i < len; ++i, ++startLine) { - var startLinePos_1 = ts.getStartPositionOfLine(startLine, sourceFile); - var nonWhitespaceCharacterAndColumn = i === 0 - ? nonWhitespaceColumnInFirstPart - : formatting.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(parts[i].pos, parts[i].end, sourceFile, options); - var newIndentation = nonWhitespaceCharacterAndColumn.column + delta; - if (newIndentation > 0) { - var indentationString = getIndentationString(newIndentation, options); - recordReplace(startLinePos_1, nonWhitespaceCharacterAndColumn.character, indentationString); - } - else { - recordDelete(startLinePos_1, nonWhitespaceCharacterAndColumn.character); - } - } - } - function trimTrailingWhitespacesForLines(line1, line2, range) { - for (var line = line1; line < line2; ++line) { - var lineStartPosition = ts.getStartPositionOfLine(line, sourceFile); - var lineEndPosition = ts.getEndLinePosition(line, sourceFile); - // do not trim whitespaces in comments - if (range && ts.isComment(range.kind) && range.pos <= lineEndPosition && range.end > lineEndPosition) { - continue; - } - var pos = lineEndPosition; - while (pos >= lineStartPosition && ts.isWhiteSpace(sourceFile.text.charCodeAt(pos))) { - pos--; - } - if (pos !== lineEndPosition) { - ts.Debug.assert(pos === lineStartPosition || !ts.isWhiteSpace(sourceFile.text.charCodeAt(pos))); - recordDelete(pos + 1, lineEndPosition - pos); - } - } - } - function newTextChange(start, len, newText) { - return { span: ts.createTextSpan(start, len), newText: newText }; - } - function recordDelete(start, len) { - if (len) { - edits.push(newTextChange(start, len, "")); - } - } - function recordReplace(start, len, newText) { - if (len || newText) { - edits.push(newTextChange(start, len, newText)); - } - } - function applyRuleEdits(rule, previousRange, previousStartLine, currentRange, currentStartLine) { - var between; - switch (rule.Operation.Action) { - case 1 /* Ignore */: - // no action required - return; - case 8 /* Delete */: - if (previousRange.end !== currentRange.pos) { - // delete characters starting from t1.end up to t2.pos exclusive - recordDelete(previousRange.end, currentRange.pos - previousRange.end); - } - break; - case 4 /* NewLine */: - // exit early if we on different lines and rule cannot change number of newlines - // if line1 and line2 are on subsequent lines then no edits are required - ok to exit - // if line1 and line2 are separated with more than one newline - ok to exit since we cannot delete extra new lines - if (rule.Flag !== 1 /* CanDeleteNewLines */ && previousStartLine !== currentStartLine) { - return; - } - // edit should not be applied only if we have one line feed between elements - var lineDelta = currentStartLine - previousStartLine; - if (lineDelta !== 1) { - recordReplace(previousRange.end, currentRange.pos - previousRange.end, options.NewLineCharacter); - } - break; - case 2 /* Space */: - // exit early if we on different lines and rule cannot change number of newlines - if (rule.Flag !== 1 /* CanDeleteNewLines */ && previousStartLine !== currentStartLine) { - return; - } - var posDelta = currentRange.pos - previousRange.end; - if (posDelta !== 1 || sourceFile.text.charCodeAt(previousRange.end) !== 32 /* space */) { - recordReplace(previousRange.end, currentRange.pos - previousRange.end, " "); - } - break; - } - } - } - function isSomeBlock(kind) { - switch (kind) { - case 182 /* Block */: - case 209 /* ModuleBlock */: - return true; - } - return false; - } - function getOpenTokenForList(node, list) { - switch (node.kind) { - case 137 /* Constructor */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 166 /* ArrowFunction */: - if (node.typeParameters === list) { - return 24 /* LessThanToken */; - } - else if (node.parameters === list) { - return 16 /* OpenParenToken */; - } - break; - case 160 /* CallExpression */: - case 161 /* NewExpression */: - if (node.typeArguments === list) { - return 24 /* LessThanToken */; - } - else if (node.arguments === list) { - return 16 /* OpenParenToken */; - } - break; - case 144 /* TypeReference */: - if (node.typeArguments === list) { - return 24 /* LessThanToken */; - } - } - return 0 /* Unknown */; - } - function getCloseTokenForOpenToken(kind) { - switch (kind) { - case 16 /* OpenParenToken */: - return 17 /* CloseParenToken */; - case 24 /* LessThanToken */: - return 25 /* GreaterThanToken */; - } - return 0 /* Unknown */; - } - var internedSizes; - var internedTabsIndentation; - var internedSpacesIndentation; - function getIndentationString(indentation, options) { - // reset interned strings if FormatCodeOptions were changed - var resetInternedStrings = !internedSizes || (internedSizes.tabSize !== options.TabSize || internedSizes.indentSize !== options.IndentSize); - if (resetInternedStrings) { - internedSizes = { tabSize: options.TabSize, indentSize: options.IndentSize }; - internedTabsIndentation = internedSpacesIndentation = undefined; - } - if (!options.ConvertTabsToSpaces) { - var tabs = Math.floor(indentation / options.TabSize); - var spaces = indentation - tabs * options.TabSize; - var tabString; - if (!internedTabsIndentation) { - internedTabsIndentation = []; - } - if (internedTabsIndentation[tabs] === undefined) { - internedTabsIndentation[tabs] = tabString = repeat('\t', tabs); - } - else { - tabString = internedTabsIndentation[tabs]; - } - return spaces ? tabString + repeat(" ", spaces) : tabString; - } - else { - var spacesString; - var quotient = Math.floor(indentation / options.IndentSize); - var remainder = indentation % options.IndentSize; - if (!internedSpacesIndentation) { - internedSpacesIndentation = []; - } - if (internedSpacesIndentation[quotient] === undefined) { - spacesString = repeat(" ", options.IndentSize * quotient); - internedSpacesIndentation[quotient] = spacesString; - } - else { - spacesString = internedSpacesIndentation[quotient]; - } - return remainder ? spacesString + repeat(" ", remainder) : spacesString; - } - function repeat(value, count) { - var s = ""; - for (var i = 0; i < count; ++i) { - s += value; - } - return s; - } - } - formatting.getIndentationString = getIndentationString; - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -/* @internal */ -var ts; -(function (ts) { - var formatting; - (function (formatting) { - var SmartIndenter; - (function (SmartIndenter) { - var Value; - (function (Value) { - Value[Value["Unknown"] = -1] = "Unknown"; - })(Value || (Value = {})); - function getIndentation(position, sourceFile, options) { - if (position > sourceFile.text.length) { - return 0; // past EOF - } - var precedingToken = ts.findPrecedingToken(position, sourceFile); - if (!precedingToken) { - return 0; - } - // no indentation in string \regex\template literals - var precedingTokenIsLiteral = precedingToken.kind === 8 /* StringLiteral */ || - precedingToken.kind === 9 /* RegularExpressionLiteral */ || - precedingToken.kind === 10 /* NoSubstitutionTemplateLiteral */ || - precedingToken.kind === 11 /* TemplateHead */ || - precedingToken.kind === 12 /* TemplateMiddle */ || - precedingToken.kind === 13 /* TemplateTail */; - if (precedingTokenIsLiteral && precedingToken.getStart(sourceFile) <= position && precedingToken.end > position) { - return 0; - } - var lineAtPosition = sourceFile.getLineAndCharacterOfPosition(position).line; - if (precedingToken.kind === 23 /* CommaToken */ && precedingToken.parent.kind !== 172 /* BinaryExpression */) { - // previous token is comma that separates items in list - find the previous item and try to derive indentation from it - var actualIndentation = getActualIndentationForListItemBeforeComma(precedingToken, sourceFile, options); - if (actualIndentation !== -1 /* Unknown */) { - return actualIndentation; - } - } - // try to find node that can contribute to indentation and includes 'position' starting from 'precedingToken' - // if such node is found - compute initial indentation for 'position' inside this node - var previous; - var current = precedingToken; - var currentStart; - var indentationDelta; - while (current) { - if (ts.positionBelongsToNode(current, position, sourceFile) && shouldIndentChildNode(current.kind, previous ? previous.kind : 0 /* Unknown */)) { - currentStart = getStartLineAndCharacterForNode(current, sourceFile); - if (nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile)) { - indentationDelta = 0; - } - else { - indentationDelta = lineAtPosition !== currentStart.line ? options.IndentSize : 0; - } - break; - } - // check if current node is a list item - if yes, take indentation from it - var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); - if (actualIndentation !== -1 /* Unknown */) { - return actualIndentation; - } - previous = current; - current = current.parent; - } - if (!current) { - // no parent was found - return 0 to be indented on the level of SourceFile - return 0; - } - return getIndentationForNodeWorker(current, currentStart, undefined, indentationDelta, sourceFile, options); - } - SmartIndenter.getIndentation = getIndentation; - function getIndentationForNode(n, ignoreActualIndentationRange, sourceFile, options) { - var start = sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); - return getIndentationForNodeWorker(n, start, ignoreActualIndentationRange, 0, sourceFile, options); - } - SmartIndenter.getIndentationForNode = getIndentationForNode; - function getIndentationForNodeWorker(current, currentStart, ignoreActualIndentationRange, indentationDelta, sourceFile, options) { - var parent = current.parent; - var parentStart; - // walk upwards and collect indentations for pairs of parent-child nodes - // indentation is not added if parent and child nodes start on the same line or if parent is IfStatement and child starts on the same line with 'else clause' - while (parent) { - var useActualIndentation = true; - if (ignoreActualIndentationRange) { - var start = current.getStart(sourceFile); - useActualIndentation = start < ignoreActualIndentationRange.pos || start > ignoreActualIndentationRange.end; - } - if (useActualIndentation) { - // check if current node is a list item - if yes, take indentation from it - var actualIndentation = getActualIndentationForListItem(current, sourceFile, options); - if (actualIndentation !== -1 /* Unknown */) { - return actualIndentation + indentationDelta; - } - } - parentStart = getParentStart(parent, current, sourceFile); - var parentAndChildShareLine = parentStart.line === currentStart.line || - childStartsOnTheSameLineWithElseInIfStatement(parent, current, currentStart.line, sourceFile); - if (useActualIndentation) { - // try to fetch actual indentation for current node from source text - var actualIndentation = getActualIndentationForNode(current, parent, currentStart, parentAndChildShareLine, sourceFile, options); - if (actualIndentation !== -1 /* Unknown */) { - return actualIndentation + indentationDelta; - } - } - // increase indentation if parent node wants its content to be indented and parent and child nodes don't start on the same line - if (shouldIndentChildNode(parent.kind, current.kind) && !parentAndChildShareLine) { - indentationDelta += options.IndentSize; - } - current = parent; - currentStart = parentStart; - parent = current.parent; - } - return indentationDelta; - } - function getParentStart(parent, child, sourceFile) { - var containingList = getContainingList(child, sourceFile); - if (containingList) { - return sourceFile.getLineAndCharacterOfPosition(containingList.pos); - } - return sourceFile.getLineAndCharacterOfPosition(parent.getStart(sourceFile)); - } - /* - * Function returns Value.Unknown if indentation cannot be determined - */ - function getActualIndentationForListItemBeforeComma(commaToken, sourceFile, options) { - // previous token is comma that separates items in list - find the previous item and try to derive indentation from it - var commaItemInfo = ts.findListItemInfo(commaToken); - if (commaItemInfo && commaItemInfo.listItemIndex > 0) { - return deriveActualIndentationFromList(commaItemInfo.list.getChildren(), commaItemInfo.listItemIndex - 1, sourceFile, options); - } - else { - // handle broken code gracefully - return -1 /* Unknown */; - } - } - /* - * Function returns Value.Unknown if actual indentation for node should not be used (i.e because node is nested expression) - */ - function getActualIndentationForNode(current, parent, currentLineAndChar, parentAndChildShareLine, sourceFile, options) { - // actual indentation is used for statements\declarations if one of cases below is true: - // - parent is SourceFile - by default immediate children of SourceFile are not indented except when user indents them manually - // - parent and child are not on the same line - var useActualIndentation = (ts.isDeclaration(current) || ts.isStatement(current)) && - (parent.kind === 230 /* SourceFile */ || !parentAndChildShareLine); - if (!useActualIndentation) { - return -1 /* Unknown */; - } - return findColumnForFirstNonWhitespaceCharacterInLine(currentLineAndChar, sourceFile, options); - } - function nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile) { - var nextToken = ts.findNextToken(precedingToken, current); - if (!nextToken) { - return false; - } - if (nextToken.kind === 14 /* OpenBraceToken */) { - // open braces are always indented at the parent level - return true; - } - else if (nextToken.kind === 15 /* CloseBraceToken */) { - // close braces are indented at the parent level if they are located on the same line with cursor - // this means that if new line will be added at $ position, this case will be indented - // class A { - // $ - // } - /// and this one - not - // class A { - // $} - var nextTokenStartLine = getStartLineAndCharacterForNode(nextToken, sourceFile).line; - return lineAtPosition === nextTokenStartLine; - } - return false; - } - function getStartLineAndCharacterForNode(n, sourceFile) { - return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); - } - function childStartsOnTheSameLineWithElseInIfStatement(parent, child, childStartLine, sourceFile) { - if (parent.kind === 186 /* IfStatement */ && parent.elseStatement === child) { - var elseKeyword = ts.findChildOfKind(parent, 76 /* ElseKeyword */, sourceFile); - ts.Debug.assert(elseKeyword !== undefined); - var elseKeywordStartLine = getStartLineAndCharacterForNode(elseKeyword, sourceFile).line; - return elseKeywordStartLine === childStartLine; - } - return false; - } - SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement = childStartsOnTheSameLineWithElseInIfStatement; - function getContainingList(node, sourceFile) { - if (node.parent) { - switch (node.parent.kind) { - case 144 /* TypeReference */: - if (node.parent.typeArguments && - ts.rangeContainsStartEnd(node.parent.typeArguments, node.getStart(sourceFile), node.getEnd())) { - return node.parent.typeArguments; - } - break; - case 157 /* ObjectLiteralExpression */: - return node.parent.properties; - case 156 /* ArrayLiteralExpression */: - return node.parent.elements; - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: { - var start = node.getStart(sourceFile); - if (node.parent.typeParameters && - ts.rangeContainsStartEnd(node.parent.typeParameters, start, node.getEnd())) { - return node.parent.typeParameters; - } - if (ts.rangeContainsStartEnd(node.parent.parameters, start, node.getEnd())) { - return node.parent.parameters; - } - break; - } - case 161 /* NewExpression */: - case 160 /* CallExpression */: { - var start = node.getStart(sourceFile); - if (node.parent.typeArguments && - ts.rangeContainsStartEnd(node.parent.typeArguments, start, node.getEnd())) { - return node.parent.typeArguments; - } - if (node.parent.arguments && - ts.rangeContainsStartEnd(node.parent.arguments, start, node.getEnd())) { - return node.parent.arguments; - } - break; - } - } - } - return undefined; - } - function getActualIndentationForListItem(node, sourceFile, options) { - var containingList = getContainingList(node, sourceFile); - return containingList ? getActualIndentationFromList(containingList) : -1 /* Unknown */; - function getActualIndentationFromList(list) { - var index = ts.indexOf(list, node); - return index !== -1 ? deriveActualIndentationFromList(list, index, sourceFile, options) : -1 /* Unknown */; - } - } - function deriveActualIndentationFromList(list, index, sourceFile, options) { - ts.Debug.assert(index >= 0 && index < list.length); - var node = list[index]; - // walk toward the start of the list starting from current node and check if the line is the same for all items. - // if end line for item [i - 1] differs from the start line for item [i] - find column of the first non-whitespace character on the line of item [i] - var lineAndCharacter = getStartLineAndCharacterForNode(node, sourceFile); - for (var i = index - 1; i >= 0; --i) { - if (list[i].kind === 23 /* CommaToken */) { - continue; - } - // skip list items that ends on the same line with the current list element - var prevEndLine = sourceFile.getLineAndCharacterOfPosition(list[i].end).line; - if (prevEndLine !== lineAndCharacter.line) { - return findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter, sourceFile, options); - } - lineAndCharacter = getStartLineAndCharacterForNode(list[i], sourceFile); - } - return -1 /* Unknown */; - } - function findColumnForFirstNonWhitespaceCharacterInLine(lineAndCharacter, sourceFile, options) { - var lineStart = sourceFile.getPositionOfLineAndCharacter(lineAndCharacter.line, 0); - return findFirstNonWhitespaceColumn(lineStart, lineStart + lineAndCharacter.character, sourceFile, options); - } - /* - Character is the actual index of the character since the beginning of the line. - Column - position of the character after expanding tabs to spaces - "0\t2$" - value of 'character' for '$' is 3 - value of 'column' for '$' is 6 (assuming that tab size is 4) - */ - function findFirstNonWhitespaceCharacterAndColumn(startPos, endPos, sourceFile, options) { - var character = 0; - var column = 0; - for (var pos = startPos; pos < endPos; ++pos) { - var ch = sourceFile.text.charCodeAt(pos); - if (!ts.isWhiteSpace(ch)) { - break; - } - if (ch === 9 /* tab */) { - column += options.TabSize + (column % options.TabSize); - } - else { - column++; - } - character++; - } - return { column: column, character: character }; - } - SmartIndenter.findFirstNonWhitespaceCharacterAndColumn = findFirstNonWhitespaceCharacterAndColumn; - function findFirstNonWhitespaceColumn(startPos, endPos, sourceFile, options) { - return findFirstNonWhitespaceCharacterAndColumn(startPos, endPos, sourceFile, options).column; - } - SmartIndenter.findFirstNonWhitespaceColumn = findFirstNonWhitespaceColumn; - function nodeContentIsAlwaysIndented(kind) { - switch (kind) { - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 207 /* EnumDeclaration */: - case 156 /* ArrayLiteralExpression */: - case 182 /* Block */: - case 209 /* ModuleBlock */: - case 157 /* ObjectLiteralExpression */: - case 148 /* TypeLiteral */: - case 150 /* TupleType */: - case 210 /* CaseBlock */: - case 224 /* DefaultClause */: - case 223 /* CaseClause */: - case 164 /* ParenthesizedExpression */: - case 160 /* CallExpression */: - case 161 /* NewExpression */: - case 183 /* VariableStatement */: - case 201 /* VariableDeclaration */: - case 217 /* ExportAssignment */: - case 194 /* ReturnStatement */: - case 173 /* ConditionalExpression */: - case 154 /* ArrayBindingPattern */: - case 153 /* ObjectBindingPattern */: - return true; - } - return false; - } - function shouldIndentChildNode(parent, child) { - if (nodeContentIsAlwaysIndented(parent)) { - return true; - } - switch (parent) { - case 187 /* DoStatement */: - case 188 /* WhileStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 189 /* ForStatement */: - case 186 /* IfStatement */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 140 /* CallSignature */: - case 166 /* ArrowFunction */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - return child !== 182 /* Block */; - default: - return false; - } - } - SmartIndenter.shouldIndentChildNode = shouldIndentChildNode; - })(SmartIndenter = formatting.SmartIndenter || (formatting.SmartIndenter = {})); - })(formatting = ts.formatting || (ts.formatting = {})); -})(ts || (ts = {})); -/// -var __extends = (this && this.__extends) || function (d, b) { - for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; - function __() { this.constructor = d; } - __.prototype = b.prototype; - d.prototype = new __(); -}; -/// -/// -/// -/// -/// -/// -/// -/// -/// -var ts; -(function (ts) { - /** The version of the language service API */ - ts.servicesVersion = "0.4"; - var ScriptSnapshot; - (function (ScriptSnapshot) { - var StringScriptSnapshot = (function () { - function StringScriptSnapshot(text) { - this.text = text; - this._lineStartPositions = undefined; - } - StringScriptSnapshot.prototype.getText = function (start, end) { - return this.text.substring(start, end); - }; - StringScriptSnapshot.prototype.getLength = function () { - return this.text.length; - }; - StringScriptSnapshot.prototype.getChangeRange = function (oldSnapshot) { - // Text-based snapshots do not support incremental parsing. Return undefined - // to signal that to the caller. - return undefined; - }; - return StringScriptSnapshot; - })(); - function fromString(text) { - return new StringScriptSnapshot(text); - } - ScriptSnapshot.fromString = fromString; - })(ScriptSnapshot = ts.ScriptSnapshot || (ts.ScriptSnapshot = {})); - var scanner = ts.createScanner(2 /* Latest */, true); - var emptyArray = []; - function createNode(kind, pos, end, flags, parent) { - var node = new (ts.getNodeConstructor(kind))(); - node.pos = pos; - node.end = end; - node.flags = flags; - node.parent = parent; - return node; - } - var NodeObject = (function () { - function NodeObject() { - } - NodeObject.prototype.getSourceFile = function () { - return ts.getSourceFileOfNode(this); - }; - NodeObject.prototype.getStart = function (sourceFile) { - return ts.getTokenPosOfNode(this, sourceFile); - }; - NodeObject.prototype.getFullStart = function () { - return this.pos; - }; - NodeObject.prototype.getEnd = function () { - return this.end; - }; - NodeObject.prototype.getWidth = function (sourceFile) { - return this.getEnd() - this.getStart(sourceFile); - }; - NodeObject.prototype.getFullWidth = function () { - return this.end - this.getFullStart(); - }; - NodeObject.prototype.getLeadingTriviaWidth = function (sourceFile) { - return this.getStart(sourceFile) - this.pos; - }; - NodeObject.prototype.getFullText = function (sourceFile) { - return (sourceFile || this.getSourceFile()).text.substring(this.pos, this.end); - }; - NodeObject.prototype.getText = function (sourceFile) { - return (sourceFile || this.getSourceFile()).text.substring(this.getStart(), this.getEnd()); - }; - NodeObject.prototype.addSyntheticNodes = function (nodes, pos, end) { - scanner.setTextPos(pos); - while (pos < end) { - var token = scanner.scan(); - var textPos = scanner.getTextPos(); - nodes.push(createNode(token, pos, textPos, 1024 /* Synthetic */, this)); - pos = textPos; - } - return pos; - }; - NodeObject.prototype.createSyntaxList = function (nodes) { - var list = createNode(253 /* SyntaxList */, nodes.pos, nodes.end, 1024 /* Synthetic */, this); - list._children = []; - var pos = nodes.pos; - for (var _i = 0; _i < nodes.length; _i++) { - var node = nodes[_i]; - if (pos < node.pos) { - pos = this.addSyntheticNodes(list._children, pos, node.pos); - } - list._children.push(node); - pos = node.end; - } - if (pos < nodes.end) { - this.addSyntheticNodes(list._children, pos, nodes.end); - } - return list; - }; - NodeObject.prototype.createChildren = function (sourceFile) { - var _this = this; - var children; - if (this.kind >= 128 /* FirstNode */) { - scanner.setText((sourceFile || this.getSourceFile()).text); - children = []; - var pos = this.pos; - var processNode = function (node) { - if (pos < node.pos) { - pos = _this.addSyntheticNodes(children, pos, node.pos); - } - children.push(node); - pos = node.end; - }; - var processNodes = function (nodes) { - if (pos < nodes.pos) { - pos = _this.addSyntheticNodes(children, pos, nodes.pos); - } - children.push(_this.createSyntaxList(nodes)); - pos = nodes.end; - }; - ts.forEachChild(this, processNode, processNodes); - if (pos < this.end) { - this.addSyntheticNodes(children, pos, this.end); - } - scanner.setText(undefined); - } - this._children = children || emptyArray; - }; - NodeObject.prototype.getChildCount = function (sourceFile) { - if (!this._children) - this.createChildren(sourceFile); - return this._children.length; - }; - NodeObject.prototype.getChildAt = function (index, sourceFile) { - if (!this._children) - this.createChildren(sourceFile); - return this._children[index]; - }; - NodeObject.prototype.getChildren = function (sourceFile) { - if (!this._children) - this.createChildren(sourceFile); - return this._children; - }; - NodeObject.prototype.getFirstToken = function (sourceFile) { - var children = this.getChildren(); - for (var _i = 0; _i < children.length; _i++) { - var child = children[_i]; - if (child.kind < 128 /* FirstNode */) { - return child; - } - return child.getFirstToken(sourceFile); - } - }; - NodeObject.prototype.getLastToken = function (sourceFile) { - var children = this.getChildren(sourceFile); - for (var i = children.length - 1; i >= 0; i--) { - var child = children[i]; - if (child.kind < 128 /* FirstNode */) { - return child; - } - return child.getLastToken(sourceFile); - } - }; - return NodeObject; - })(); - var SymbolObject = (function () { - function SymbolObject(flags, name) { - this.flags = flags; - this.name = name; - } - SymbolObject.prototype.getFlags = function () { - return this.flags; - }; - SymbolObject.prototype.getName = function () { - return this.name; - }; - SymbolObject.prototype.getDeclarations = function () { - return this.declarations; - }; - SymbolObject.prototype.getDocumentationComment = function () { - if (this.documentationComment === undefined) { - this.documentationComment = getJsDocCommentsFromDeclarations(this.declarations, this.name, !(this.flags & 4 /* Property */)); - } - return this.documentationComment; - }; - return SymbolObject; - })(); - function getJsDocCommentsFromDeclarations(declarations, name, canUseParsedParamTagComments) { - var documentationComment = []; - var docComments = getJsDocCommentsSeparatedByNewLines(); - ts.forEach(docComments, function (docComment) { - if (documentationComment.length) { - documentationComment.push(ts.lineBreakPart()); - } - documentationComment.push(docComment); - }); - return documentationComment; - function getJsDocCommentsSeparatedByNewLines() { - var paramTag = "@param"; - var jsDocCommentParts = []; - ts.forEach(declarations, function (declaration, indexOfDeclaration) { - // Make sure we are collecting doc comment from declaration once, - // In case of union property there might be same declaration multiple times - // which only varies in type parameter - // Eg. let a: Array | Array; a.length - // The property length will have two declarations of property length coming - // from Array - Array and Array - if (ts.indexOf(declarations, declaration) === indexOfDeclaration) { - var sourceFileOfDeclaration = ts.getSourceFileOfNode(declaration); - // If it is parameter - try and get the jsDoc comment with @param tag from function declaration's jsDoc comments - if (canUseParsedParamTagComments && declaration.kind === 131 /* Parameter */) { - ts.forEach(getJsDocCommentTextRange(declaration.parent, sourceFileOfDeclaration), function (jsDocCommentTextRange) { - var cleanedParamJsDocComment = getCleanedParamJsDocComment(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration); - if (cleanedParamJsDocComment) { - jsDocCommentParts.push.apply(jsDocCommentParts, cleanedParamJsDocComment); - } - }); - } - // If this is left side of dotted module declaration, there is no doc comments associated with this node - if (declaration.kind === 208 /* ModuleDeclaration */ && declaration.body.kind === 208 /* ModuleDeclaration */) { - return; - } - // If this is dotted module name, get the doc comments from the parent - while (declaration.kind === 208 /* ModuleDeclaration */ && declaration.parent.kind === 208 /* ModuleDeclaration */) { - declaration = declaration.parent; - } - // Get the cleaned js doc comment text from the declaration - ts.forEach(getJsDocCommentTextRange(declaration.kind === 201 /* VariableDeclaration */ ? declaration.parent.parent : declaration, sourceFileOfDeclaration), function (jsDocCommentTextRange) { - var cleanedJsDocComment = getCleanedJsDocComment(jsDocCommentTextRange.pos, jsDocCommentTextRange.end, sourceFileOfDeclaration); - if (cleanedJsDocComment) { - jsDocCommentParts.push.apply(jsDocCommentParts, cleanedJsDocComment); - } - }); - } - }); - return jsDocCommentParts; - function getJsDocCommentTextRange(node, sourceFile) { - return ts.map(ts.getJsDocComments(node, sourceFile), function (jsDocComment) { - return { - pos: jsDocComment.pos + "/*".length, - end: jsDocComment.end - "*/".length // Trim off comment end indicator - }; - }); - } - function consumeWhiteSpacesOnTheLine(pos, end, sourceFile, maxSpacesToRemove) { - if (maxSpacesToRemove !== undefined) { - end = Math.min(end, pos + maxSpacesToRemove); - } - for (; pos < end; pos++) { - var ch = sourceFile.text.charCodeAt(pos); - if (!ts.isWhiteSpace(ch) || ts.isLineBreak(ch)) { - // Either found lineBreak or non whiteSpace - return pos; - } - } - return end; - } - function consumeLineBreaks(pos, end, sourceFile) { - while (pos < end && ts.isLineBreak(sourceFile.text.charCodeAt(pos))) { - pos++; - } - return pos; - } - function isName(pos, end, sourceFile, name) { - return pos + name.length < end && - sourceFile.text.substr(pos, name.length) === name && - (ts.isWhiteSpace(sourceFile.text.charCodeAt(pos + name.length)) || - ts.isLineBreak(sourceFile.text.charCodeAt(pos + name.length))); - } - function isParamTag(pos, end, sourceFile) { - // If it is @param tag - return isName(pos, end, sourceFile, paramTag); - } - function pushDocCommentLineText(docComments, text, blankLineCount) { - // Add the empty lines in between texts - while (blankLineCount--) { - docComments.push(ts.textPart("")); - } - docComments.push(ts.textPart(text)); - } - function getCleanedJsDocComment(pos, end, sourceFile) { - var spacesToRemoveAfterAsterisk; - var docComments = []; - var blankLineCount = 0; - var isInParamTag = false; - while (pos < end) { - var docCommentTextOfLine = ""; - // First consume leading white space - pos = consumeWhiteSpacesOnTheLine(pos, end, sourceFile); - // If the comment starts with '*' consume the spaces on this line - if (pos < end && sourceFile.text.charCodeAt(pos) === 42 /* asterisk */) { - var lineStartPos = pos + 1; - pos = consumeWhiteSpacesOnTheLine(pos + 1, end, sourceFile, spacesToRemoveAfterAsterisk); - // Set the spaces to remove after asterisk as margin if not already set - if (spacesToRemoveAfterAsterisk === undefined && pos < end && !ts.isLineBreak(sourceFile.text.charCodeAt(pos))) { - spacesToRemoveAfterAsterisk = pos - lineStartPos; - } - } - else if (spacesToRemoveAfterAsterisk === undefined) { - spacesToRemoveAfterAsterisk = 0; - } - // Analyse text on this line - while (pos < end && !ts.isLineBreak(sourceFile.text.charCodeAt(pos))) { - var ch = sourceFile.text.charAt(pos); - if (ch === "@") { - // If it is @param tag - if (isParamTag(pos, end, sourceFile)) { - isInParamTag = true; - pos += paramTag.length; - continue; - } - else { - isInParamTag = false; - } - } - // Add the ch to doc text if we arent in param tag - if (!isInParamTag) { - docCommentTextOfLine += ch; - } - // Scan next character - pos++; - } - // Continue with next line - pos = consumeLineBreaks(pos, end, sourceFile); - if (docCommentTextOfLine) { - pushDocCommentLineText(docComments, docCommentTextOfLine, blankLineCount); - blankLineCount = 0; - } - else if (!isInParamTag && docComments.length) { - // This is blank line when there is text already parsed - blankLineCount++; - } - } - return docComments; - } - function getCleanedParamJsDocComment(pos, end, sourceFile) { - var paramHelpStringMargin; - var paramDocComments = []; - while (pos < end) { - if (isParamTag(pos, end, sourceFile)) { - var blankLineCount = 0; - var recordedParamTag = false; - // Consume leading spaces - pos = consumeWhiteSpaces(pos + paramTag.length); - if (pos >= end) { - break; - } - // Ignore type expression - if (sourceFile.text.charCodeAt(pos) === 123 /* openBrace */) { - pos++; - for (var curlies = 1; pos < end; pos++) { - var charCode = sourceFile.text.charCodeAt(pos); - // { character means we need to find another } to match the found one - if (charCode === 123 /* openBrace */) { - curlies++; - continue; - } - // } char - if (charCode === 125 /* closeBrace */) { - curlies--; - if (curlies === 0) { - // We do not have any more } to match the type expression is ignored completely - pos++; - break; - } - else { - // there are more { to be matched with } - continue; - } - } - // Found start of another tag - if (charCode === 64 /* at */) { - break; - } - } - // Consume white spaces - pos = consumeWhiteSpaces(pos); - if (pos >= end) { - break; - } - } - // Parameter name - if (isName(pos, end, sourceFile, name)) { - // Found the parameter we are looking for consume white spaces - pos = consumeWhiteSpaces(pos + name.length); - if (pos >= end) { - break; - } - var paramHelpString = ""; - var firstLineParamHelpStringPos = pos; - while (pos < end) { - var ch = sourceFile.text.charCodeAt(pos); - // at line break, set this comment line text and go to next line - if (ts.isLineBreak(ch)) { - if (paramHelpString) { - pushDocCommentLineText(paramDocComments, paramHelpString, blankLineCount); - paramHelpString = ""; - blankLineCount = 0; - recordedParamTag = true; - } - else if (recordedParamTag) { - blankLineCount++; - } - // Get the pos after cleaning start of the line - setPosForParamHelpStringOnNextLine(firstLineParamHelpStringPos); - continue; - } - // Done scanning param help string - next tag found - if (ch === 64 /* at */) { - break; - } - paramHelpString += sourceFile.text.charAt(pos); - // Go to next character - pos++; - } - // If there is param help text, add it top the doc comments - if (paramHelpString) { - pushDocCommentLineText(paramDocComments, paramHelpString, blankLineCount); - } - paramHelpStringMargin = undefined; - } - // If this is the start of another tag, continue with the loop in seach of param tag with symbol name - if (sourceFile.text.charCodeAt(pos) === 64 /* at */) { - continue; - } - } - // Next character - pos++; - } - return paramDocComments; - function consumeWhiteSpaces(pos) { - while (pos < end && ts.isWhiteSpace(sourceFile.text.charCodeAt(pos))) { - pos++; - } - return pos; - } - function setPosForParamHelpStringOnNextLine(firstLineParamHelpStringPos) { - // Get the pos after consuming line breaks - pos = consumeLineBreaks(pos, end, sourceFile); - if (pos >= end) { - return; - } - if (paramHelpStringMargin === undefined) { - paramHelpStringMargin = sourceFile.getLineAndCharacterOfPosition(firstLineParamHelpStringPos).character; - } - // Now consume white spaces max - var startOfLinePos = pos; - pos = consumeWhiteSpacesOnTheLine(pos, end, sourceFile, paramHelpStringMargin); - if (pos >= end) { - return; - } - var consumedSpaces = pos - startOfLinePos; - if (consumedSpaces < paramHelpStringMargin) { - var ch = sourceFile.text.charCodeAt(pos); - if (ch === 42 /* asterisk */) { - // Consume more spaces after asterisk - pos = consumeWhiteSpacesOnTheLine(pos + 1, end, sourceFile, paramHelpStringMargin - consumedSpaces - 1); - } - } - } - } - } - } - var TypeObject = (function () { - function TypeObject(checker, flags) { - this.checker = checker; - this.flags = flags; - } - TypeObject.prototype.getFlags = function () { - return this.flags; - }; - TypeObject.prototype.getSymbol = function () { - return this.symbol; - }; - TypeObject.prototype.getProperties = function () { - return this.checker.getPropertiesOfType(this); - }; - TypeObject.prototype.getProperty = function (propertyName) { - return this.checker.getPropertyOfType(this, propertyName); - }; - TypeObject.prototype.getApparentProperties = function () { - return this.checker.getAugmentedPropertiesOfType(this); - }; - TypeObject.prototype.getCallSignatures = function () { - return this.checker.getSignaturesOfType(this, 0 /* Call */); - }; - TypeObject.prototype.getConstructSignatures = function () { - return this.checker.getSignaturesOfType(this, 1 /* Construct */); - }; - TypeObject.prototype.getStringIndexType = function () { - return this.checker.getIndexTypeOfType(this, 0 /* String */); - }; - TypeObject.prototype.getNumberIndexType = function () { - return this.checker.getIndexTypeOfType(this, 1 /* Number */); - }; - return TypeObject; - })(); - var SignatureObject = (function () { - function SignatureObject(checker) { - this.checker = checker; - } - SignatureObject.prototype.getDeclaration = function () { - return this.declaration; - }; - SignatureObject.prototype.getTypeParameters = function () { - return this.typeParameters; - }; - SignatureObject.prototype.getParameters = function () { - return this.parameters; - }; - SignatureObject.prototype.getReturnType = function () { - return this.checker.getReturnTypeOfSignature(this); - }; - SignatureObject.prototype.getDocumentationComment = function () { - if (this.documentationComment === undefined) { - this.documentationComment = this.declaration ? getJsDocCommentsFromDeclarations([this.declaration], - /*name*/ undefined, - /*canUseParsedParamTagComments*/ false) : []; - } - return this.documentationComment; - }; - return SignatureObject; - })(); - var SourceFileObject = (function (_super) { - __extends(SourceFileObject, _super); - function SourceFileObject() { - _super.apply(this, arguments); - } - SourceFileObject.prototype.update = function (newText, textChangeRange) { - return ts.updateSourceFile(this, newText, textChangeRange); - }; - SourceFileObject.prototype.getLineAndCharacterOfPosition = function (position) { - return ts.getLineAndCharacterOfPosition(this, position); - }; - SourceFileObject.prototype.getLineStarts = function () { - return ts.getLineStarts(this); - }; - SourceFileObject.prototype.getPositionOfLineAndCharacter = function (line, character) { - return ts.getPositionOfLineAndCharacter(this, line, character); - }; - SourceFileObject.prototype.getNamedDeclarations = function () { - if (!this.namedDeclarations) { - this.namedDeclarations = this.computeNamedDeclarations(); - } - return this.namedDeclarations; - }; - SourceFileObject.prototype.computeNamedDeclarations = function () { - var result = {}; - ts.forEachChild(this, visit); - return result; - function addDeclaration(declaration) { - var name = getDeclarationName(declaration); - if (name) { - var declarations = getDeclarations(name); - declarations.push(declaration); - } - } - function getDeclarations(name) { - return ts.getProperty(result, name) || (result[name] = []); - } - function getDeclarationName(declaration) { - if (declaration.name) { - var result_2 = getTextOfIdentifierOrLiteral(declaration.name); - if (result_2 !== undefined) { - return result_2; - } - if (declaration.name.kind === 129 /* ComputedPropertyName */) { - var expr = declaration.name.expression; - if (expr.kind === 158 /* PropertyAccessExpression */) { - return expr.name.text; - } - return getTextOfIdentifierOrLiteral(expr); - } - } - return undefined; - } - function getTextOfIdentifierOrLiteral(node) { - if (node) { - if (node.kind === 65 /* Identifier */ || - node.kind === 8 /* StringLiteral */ || - node.kind === 7 /* NumericLiteral */) { - return node.text; - } - } - return undefined; - } - function visit(node) { - switch (node.kind) { - case 203 /* FunctionDeclaration */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - var functionDeclaration = node; - var declarationName = getDeclarationName(functionDeclaration); - if (declarationName) { - var declarations = getDeclarations(declarationName); - var lastDeclaration = ts.lastOrUndefined(declarations); - // Check whether this declaration belongs to an "overload group". - if (lastDeclaration && functionDeclaration.parent === lastDeclaration.parent && functionDeclaration.symbol === lastDeclaration.symbol) { - // Overwrite the last declaration if it was an overload - // and this one is an implementation. - if (functionDeclaration.body && !lastDeclaration.body) { - declarations[declarations.length - 1] = functionDeclaration; - } - } - else { - declarations.push(functionDeclaration); - } - ts.forEachChild(node, visit); - } - break; - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 206 /* TypeAliasDeclaration */: - case 207 /* EnumDeclaration */: - case 208 /* ModuleDeclaration */: - case 211 /* ImportEqualsDeclaration */: - case 220 /* ExportSpecifier */: - case 216 /* ImportSpecifier */: - case 211 /* ImportEqualsDeclaration */: - case 213 /* ImportClause */: - case 214 /* NamespaceImport */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 148 /* TypeLiteral */: - addDeclaration(node); - // fall through - case 137 /* Constructor */: - case 183 /* VariableStatement */: - case 202 /* VariableDeclarationList */: - case 153 /* ObjectBindingPattern */: - case 154 /* ArrayBindingPattern */: - case 209 /* ModuleBlock */: - ts.forEachChild(node, visit); - break; - case 182 /* Block */: - if (ts.isFunctionBlock(node)) { - ts.forEachChild(node, visit); - } - break; - case 131 /* Parameter */: - // Only consider properties defined as constructor parameters - if (!(node.flags & 112 /* AccessibilityModifier */)) { - break; - } - // fall through - case 201 /* VariableDeclaration */: - case 155 /* BindingElement */: - if (ts.isBindingPattern(node.name)) { - ts.forEachChild(node.name, visit); - break; - } - case 229 /* EnumMember */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - addDeclaration(node); - break; - case 218 /* ExportDeclaration */: - // Handle named exports case e.g.: - // export {a, b as B} from "mod"; - if (node.exportClause) { - ts.forEach(node.exportClause.elements, visit); - } - break; - case 212 /* ImportDeclaration */: - var importClause = node.importClause; - if (importClause) { - // Handle default import case e.g.: - // import d from "mod"; - if (importClause.name) { - addDeclaration(importClause); - } - // Handle named bindings in imports e.g.: - // import * as NS from "mod"; - // import {a, b as B} from "mod"; - if (importClause.namedBindings) { - if (importClause.namedBindings.kind === 214 /* NamespaceImport */) { - addDeclaration(importClause.namedBindings); - } - else { - ts.forEach(importClause.namedBindings.elements, visit); - } - } - } - break; - } - } - }; - return SourceFileObject; - })(NodeObject); - var TextChange = (function () { - function TextChange() { - } - return TextChange; - })(); - ts.TextChange = TextChange; - var HighlightSpanKind; - (function (HighlightSpanKind) { - HighlightSpanKind.none = "none"; - HighlightSpanKind.definition = "definition"; - HighlightSpanKind.reference = "reference"; - HighlightSpanKind.writtenReference = "writtenReference"; - })(HighlightSpanKind = ts.HighlightSpanKind || (ts.HighlightSpanKind = {})); - (function (SymbolDisplayPartKind) { - SymbolDisplayPartKind[SymbolDisplayPartKind["aliasName"] = 0] = "aliasName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["className"] = 1] = "className"; - SymbolDisplayPartKind[SymbolDisplayPartKind["enumName"] = 2] = "enumName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["fieldName"] = 3] = "fieldName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["interfaceName"] = 4] = "interfaceName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["keyword"] = 5] = "keyword"; - SymbolDisplayPartKind[SymbolDisplayPartKind["lineBreak"] = 6] = "lineBreak"; - SymbolDisplayPartKind[SymbolDisplayPartKind["numericLiteral"] = 7] = "numericLiteral"; - SymbolDisplayPartKind[SymbolDisplayPartKind["stringLiteral"] = 8] = "stringLiteral"; - SymbolDisplayPartKind[SymbolDisplayPartKind["localName"] = 9] = "localName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["methodName"] = 10] = "methodName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["moduleName"] = 11] = "moduleName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["operator"] = 12] = "operator"; - SymbolDisplayPartKind[SymbolDisplayPartKind["parameterName"] = 13] = "parameterName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["propertyName"] = 14] = "propertyName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["punctuation"] = 15] = "punctuation"; - SymbolDisplayPartKind[SymbolDisplayPartKind["space"] = 16] = "space"; - SymbolDisplayPartKind[SymbolDisplayPartKind["text"] = 17] = "text"; - SymbolDisplayPartKind[SymbolDisplayPartKind["typeParameterName"] = 18] = "typeParameterName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["enumMemberName"] = 19] = "enumMemberName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["functionName"] = 20] = "functionName"; - SymbolDisplayPartKind[SymbolDisplayPartKind["regularExpressionLiteral"] = 21] = "regularExpressionLiteral"; - })(ts.SymbolDisplayPartKind || (ts.SymbolDisplayPartKind = {})); - var SymbolDisplayPartKind = ts.SymbolDisplayPartKind; - (function (OutputFileType) { - OutputFileType[OutputFileType["JavaScript"] = 0] = "JavaScript"; - OutputFileType[OutputFileType["SourceMap"] = 1] = "SourceMap"; - OutputFileType[OutputFileType["Declaration"] = 2] = "Declaration"; - })(ts.OutputFileType || (ts.OutputFileType = {})); - var OutputFileType = ts.OutputFileType; - (function (EndOfLineState) { - EndOfLineState[EndOfLineState["None"] = 0] = "None"; - EndOfLineState[EndOfLineState["InMultiLineCommentTrivia"] = 1] = "InMultiLineCommentTrivia"; - EndOfLineState[EndOfLineState["InSingleQuoteStringLiteral"] = 2] = "InSingleQuoteStringLiteral"; - EndOfLineState[EndOfLineState["InDoubleQuoteStringLiteral"] = 3] = "InDoubleQuoteStringLiteral"; - EndOfLineState[EndOfLineState["InTemplateHeadOrNoSubstitutionTemplate"] = 4] = "InTemplateHeadOrNoSubstitutionTemplate"; - EndOfLineState[EndOfLineState["InTemplateMiddleOrTail"] = 5] = "InTemplateMiddleOrTail"; - EndOfLineState[EndOfLineState["InTemplateSubstitutionPosition"] = 6] = "InTemplateSubstitutionPosition"; - })(ts.EndOfLineState || (ts.EndOfLineState = {})); - var EndOfLineState = ts.EndOfLineState; - (function (TokenClass) { - TokenClass[TokenClass["Punctuation"] = 0] = "Punctuation"; - TokenClass[TokenClass["Keyword"] = 1] = "Keyword"; - TokenClass[TokenClass["Operator"] = 2] = "Operator"; - TokenClass[TokenClass["Comment"] = 3] = "Comment"; - TokenClass[TokenClass["Whitespace"] = 4] = "Whitespace"; - TokenClass[TokenClass["Identifier"] = 5] = "Identifier"; - TokenClass[TokenClass["NumberLiteral"] = 6] = "NumberLiteral"; - TokenClass[TokenClass["StringLiteral"] = 7] = "StringLiteral"; - TokenClass[TokenClass["RegExpLiteral"] = 8] = "RegExpLiteral"; - })(ts.TokenClass || (ts.TokenClass = {})); - var TokenClass = ts.TokenClass; - // TODO: move these to enums - var ScriptElementKind; - (function (ScriptElementKind) { - ScriptElementKind.unknown = ""; - ScriptElementKind.warning = "warning"; - // predefined type (void) or keyword (class) - ScriptElementKind.keyword = "keyword"; - // top level script node - ScriptElementKind.scriptElement = "script"; - // module foo {} - ScriptElementKind.moduleElement = "module"; - // class X {} - ScriptElementKind.classElement = "class"; - // interface Y {} - ScriptElementKind.interfaceElement = "interface"; - // type T = ... - ScriptElementKind.typeElement = "type"; - // enum E - ScriptElementKind.enumElement = "enum"; - // Inside module and script only - // let v = .. - ScriptElementKind.variableElement = "var"; - // Inside function - ScriptElementKind.localVariableElement = "local var"; - // Inside module and script only - // function f() { } - ScriptElementKind.functionElement = "function"; - // Inside function - ScriptElementKind.localFunctionElement = "local function"; - // class X { [public|private]* foo() {} } - ScriptElementKind.memberFunctionElement = "method"; - // class X { [public|private]* [get|set] foo:number; } - ScriptElementKind.memberGetAccessorElement = "getter"; - ScriptElementKind.memberSetAccessorElement = "setter"; - // class X { [public|private]* foo:number; } - // interface Y { foo:number; } - ScriptElementKind.memberVariableElement = "property"; - // class X { constructor() { } } - ScriptElementKind.constructorImplementationElement = "constructor"; - // interface Y { ():number; } - ScriptElementKind.callSignatureElement = "call"; - // interface Y { []:number; } - ScriptElementKind.indexSignatureElement = "index"; - // interface Y { new():Y; } - ScriptElementKind.constructSignatureElement = "construct"; - // function foo(*Y*: string) - ScriptElementKind.parameterElement = "parameter"; - ScriptElementKind.typeParameterElement = "type parameter"; - ScriptElementKind.primitiveType = "primitive type"; - ScriptElementKind.label = "label"; - ScriptElementKind.alias = "alias"; - ScriptElementKind.constElement = "const"; - ScriptElementKind.letElement = "let"; - })(ScriptElementKind = ts.ScriptElementKind || (ts.ScriptElementKind = {})); - var ScriptElementKindModifier; - (function (ScriptElementKindModifier) { - ScriptElementKindModifier.none = ""; - ScriptElementKindModifier.publicMemberModifier = "public"; - ScriptElementKindModifier.privateMemberModifier = "private"; - ScriptElementKindModifier.protectedMemberModifier = "protected"; - ScriptElementKindModifier.exportedModifier = "export"; - ScriptElementKindModifier.ambientModifier = "declare"; - ScriptElementKindModifier.staticModifier = "static"; - })(ScriptElementKindModifier = ts.ScriptElementKindModifier || (ts.ScriptElementKindModifier = {})); - var ClassificationTypeNames = (function () { - function ClassificationTypeNames() { - } - ClassificationTypeNames.comment = "comment"; - ClassificationTypeNames.identifier = "identifier"; - ClassificationTypeNames.keyword = "keyword"; - ClassificationTypeNames.numericLiteral = "number"; - ClassificationTypeNames.operator = "operator"; - ClassificationTypeNames.stringLiteral = "string"; - ClassificationTypeNames.whiteSpace = "whitespace"; - ClassificationTypeNames.text = "text"; - ClassificationTypeNames.punctuation = "punctuation"; - ClassificationTypeNames.className = "class name"; - ClassificationTypeNames.enumName = "enum name"; - ClassificationTypeNames.interfaceName = "interface name"; - ClassificationTypeNames.moduleName = "module name"; - ClassificationTypeNames.typeParameterName = "type parameter name"; - ClassificationTypeNames.typeAliasName = "type alias name"; - ClassificationTypeNames.parameterName = "parameter name"; - ClassificationTypeNames.docCommentTagName = "doc comment tag name"; - return ClassificationTypeNames; - })(); - ts.ClassificationTypeNames = ClassificationTypeNames; - (function (ClassificationType) { - ClassificationType[ClassificationType["comment"] = 1] = "comment"; - ClassificationType[ClassificationType["identifier"] = 2] = "identifier"; - ClassificationType[ClassificationType["keyword"] = 3] = "keyword"; - ClassificationType[ClassificationType["numericLiteral"] = 4] = "numericLiteral"; - ClassificationType[ClassificationType["operator"] = 5] = "operator"; - ClassificationType[ClassificationType["stringLiteral"] = 6] = "stringLiteral"; - ClassificationType[ClassificationType["regularExpressionLiteral"] = 7] = "regularExpressionLiteral"; - ClassificationType[ClassificationType["whiteSpace"] = 8] = "whiteSpace"; - ClassificationType[ClassificationType["text"] = 9] = "text"; - ClassificationType[ClassificationType["punctuation"] = 10] = "punctuation"; - ClassificationType[ClassificationType["className"] = 11] = "className"; - ClassificationType[ClassificationType["enumName"] = 12] = "enumName"; - ClassificationType[ClassificationType["interfaceName"] = 13] = "interfaceName"; - ClassificationType[ClassificationType["moduleName"] = 14] = "moduleName"; - ClassificationType[ClassificationType["typeParameterName"] = 15] = "typeParameterName"; - ClassificationType[ClassificationType["typeAliasName"] = 16] = "typeAliasName"; - ClassificationType[ClassificationType["parameterName"] = 17] = "parameterName"; - ClassificationType[ClassificationType["docCommentTagName"] = 18] = "docCommentTagName"; - })(ts.ClassificationType || (ts.ClassificationType = {})); - var ClassificationType = ts.ClassificationType; - function displayPartsToString(displayParts) { - if (displayParts) { - return ts.map(displayParts, function (displayPart) { return displayPart.text; }).join(""); - } - return ""; - } - ts.displayPartsToString = displayPartsToString; - function isLocalVariableOrFunction(symbol) { - if (symbol.parent) { - return false; // This is exported symbol - } - return ts.forEach(symbol.declarations, function (declaration) { - // Function expressions are local - if (declaration.kind === 165 /* FunctionExpression */) { - return true; - } - if (declaration.kind !== 201 /* VariableDeclaration */ && declaration.kind !== 203 /* FunctionDeclaration */) { - return false; - } - // If the parent is not sourceFile or module block it is local variable - for (var parent_9 = declaration.parent; !ts.isFunctionBlock(parent_9); parent_9 = parent_9.parent) { - // Reached source file or module block - if (parent_9.kind === 230 /* SourceFile */ || parent_9.kind === 209 /* ModuleBlock */) { - return false; - } - } - // parent is in function block - return true; - }); - } - function getDefaultCompilerOptions() { - // Always default to "ScriptTarget.ES5" for the language service - return { - target: 1 /* ES5 */, - module: 0 /* None */ - }; - } - ts.getDefaultCompilerOptions = getDefaultCompilerOptions; - var OperationCanceledException = (function () { - function OperationCanceledException() { - } - return OperationCanceledException; - })(); - ts.OperationCanceledException = OperationCanceledException; - var CancellationTokenObject = (function () { - function CancellationTokenObject(cancellationToken) { - this.cancellationToken = cancellationToken; - } - CancellationTokenObject.prototype.isCancellationRequested = function () { - return this.cancellationToken && this.cancellationToken.isCancellationRequested(); - }; - CancellationTokenObject.prototype.throwIfCancellationRequested = function () { - if (this.isCancellationRequested()) { - throw new OperationCanceledException(); - } - }; - CancellationTokenObject.None = new CancellationTokenObject(null); - return CancellationTokenObject; - })(); - ts.CancellationTokenObject = CancellationTokenObject; - // Cache host information about scrip Should be refreshed - // at each language service public entry point, since we don't know when - // set of scripts handled by the host changes. - var HostCache = (function () { - function HostCache(host, getCanonicalFileName) { - this.host = host; - // script id => script index - this.fileNameToEntry = ts.createFileMap(getCanonicalFileName); - // Initialize the list with the root file names - var rootFileNames = host.getScriptFileNames(); - for (var _i = 0; _i < rootFileNames.length; _i++) { - var fileName = rootFileNames[_i]; - this.createEntry(fileName); - } - // store the compilation settings - this._compilationSettings = host.getCompilationSettings() || getDefaultCompilerOptions(); - } - HostCache.prototype.compilationSettings = function () { - return this._compilationSettings; - }; - HostCache.prototype.createEntry = function (fileName) { - var entry; - var scriptSnapshot = this.host.getScriptSnapshot(fileName); - if (scriptSnapshot) { - entry = { - hostFileName: fileName, - version: this.host.getScriptVersion(fileName), - scriptSnapshot: scriptSnapshot - }; - } - this.fileNameToEntry.set(fileName, entry); - return entry; - }; - HostCache.prototype.getEntry = function (fileName) { - return this.fileNameToEntry.get(fileName); - }; - HostCache.prototype.contains = function (fileName) { - return this.fileNameToEntry.contains(fileName); - }; - HostCache.prototype.getOrCreateEntry = function (fileName) { - if (this.contains(fileName)) { - return this.getEntry(fileName); - } - return this.createEntry(fileName); - }; - HostCache.prototype.getRootFileNames = function () { - var fileNames = []; - this.fileNameToEntry.forEachValue(function (value) { - if (value) { - fileNames.push(value.hostFileName); - } - }); - return fileNames; - }; - HostCache.prototype.getVersion = function (fileName) { - var file = this.getEntry(fileName); - return file && file.version; - }; - HostCache.prototype.getScriptSnapshot = function (fileName) { - var file = this.getEntry(fileName); - return file && file.scriptSnapshot; - }; - return HostCache; - })(); - var SyntaxTreeCache = (function () { - function SyntaxTreeCache(host) { - this.host = host; - } - SyntaxTreeCache.prototype.getCurrentSourceFile = function (fileName) { - var scriptSnapshot = this.host.getScriptSnapshot(fileName); - if (!scriptSnapshot) { - // The host does not know about this file. - throw new Error("Could not find file: '" + fileName + "'."); - } - var version = this.host.getScriptVersion(fileName); - var sourceFile; - if (this.currentFileName !== fileName) { - // This is a new file, just parse it - sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, 2 /* Latest */, version, true); - } - else if (this.currentFileVersion !== version) { - // This is the same file, just a newer version. Incrementally parse the file. - var editRange = scriptSnapshot.getChangeRange(this.currentFileScriptSnapshot); - sourceFile = updateLanguageServiceSourceFile(this.currentSourceFile, scriptSnapshot, version, editRange); - } - if (sourceFile) { - // All done, ensure state is up to date - this.currentFileVersion = version; - this.currentFileName = fileName; - this.currentFileScriptSnapshot = scriptSnapshot; - this.currentSourceFile = sourceFile; - } - return this.currentSourceFile; - }; - return SyntaxTreeCache; - })(); - function setSourceFileFields(sourceFile, scriptSnapshot, version) { - sourceFile.version = version; - sourceFile.scriptSnapshot = scriptSnapshot; - } - /* - * This function will compile source text from 'input' argument using specified compiler options. - * If not options are provided - it will use a set of default compiler options. - * Extra compiler options that will unconditionally be used bu this function are: - * - isolatedModules = true - * - allowNonTsExtensions = true - * - noLib = true - * - noResolve = true - */ - function transpile(input, compilerOptions, fileName, diagnostics, moduleName) { - var options = compilerOptions ? ts.clone(compilerOptions) : getDefaultCompilerOptions(); - options.isolatedModules = true; - // Filename can be non-ts file. - options.allowNonTsExtensions = true; - // We are not returning a sourceFile for lib file when asked by the program, - // so pass --noLib to avoid reporting a file not found error. - options.noLib = true; - // We are not doing a full typecheck, we are not resolving the whole context, - // so pass --noResolve to avoid reporting missing file errors. - options.noResolve = true; - // Parse - var inputFileName = fileName || "module.ts"; - var sourceFile = ts.createSourceFile(inputFileName, input, options.target); - if (moduleName) { - sourceFile.moduleName = moduleName; - } - // Store syntactic diagnostics - if (diagnostics && sourceFile.parseDiagnostics) { - diagnostics.push.apply(diagnostics, sourceFile.parseDiagnostics); - } - var newLine = ts.getNewLineCharacter(options); - // Output - var outputText; - // Create a compilerHost object to allow the compiler to read and write files - var compilerHost = { - getSourceFile: function (fileName, target) { return fileName === inputFileName ? sourceFile : undefined; }, - writeFile: function (name, text, writeByteOrderMark) { - ts.Debug.assert(outputText === undefined, "Unexpected multiple outputs for the file: " + name); - outputText = text; - }, - getDefaultLibFileName: function () { return "lib.d.ts"; }, - useCaseSensitiveFileNames: function () { return false; }, - getCanonicalFileName: function (fileName) { return fileName; }, - getCurrentDirectory: function () { return ""; }, - getNewLine: function () { return newLine; } - }; - var program = ts.createProgram([inputFileName], options, compilerHost); - if (diagnostics) { - diagnostics.push.apply(diagnostics, program.getCompilerOptionsDiagnostics()); - } - // Emit - program.emit(); - ts.Debug.assert(outputText !== undefined, "Output generation failed"); - return outputText; - } - ts.transpile = transpile; - function createLanguageServiceSourceFile(fileName, scriptSnapshot, scriptTarget, version, setNodeParents) { - var text = scriptSnapshot.getText(0, scriptSnapshot.getLength()); - var sourceFile = ts.createSourceFile(fileName, text, scriptTarget, setNodeParents); - setSourceFileFields(sourceFile, scriptSnapshot, version); - // after full parsing we can use table with interned strings as name table - sourceFile.nameTable = sourceFile.identifiers; - return sourceFile; - } - ts.createLanguageServiceSourceFile = createLanguageServiceSourceFile; - ts.disableIncrementalParsing = false; - function updateLanguageServiceSourceFile(sourceFile, scriptSnapshot, version, textChangeRange, aggressiveChecks) { - // If we were given a text change range, and our version or open-ness changed, then - // incrementally parse this file. - if (textChangeRange) { - if (version !== sourceFile.version) { - // Once incremental parsing is ready, then just call into this function. - if (!ts.disableIncrementalParsing) { - var newText; - // grab the fragment from the beginning of the original text to the beginning of the span - var prefix = textChangeRange.span.start !== 0 - ? sourceFile.text.substr(0, textChangeRange.span.start) - : ""; - // grab the fragment from the end of the span till the end of the original text - var suffix = ts.textSpanEnd(textChangeRange.span) !== sourceFile.text.length - ? sourceFile.text.substr(ts.textSpanEnd(textChangeRange.span)) - : ""; - if (textChangeRange.newLength === 0) { - // edit was a deletion - just combine prefix and suffix - newText = prefix && suffix ? prefix + suffix : prefix || suffix; - } - else { - // it was actual edit, fetch the fragment of new text that correspond to new span - var changedText = scriptSnapshot.getText(textChangeRange.span.start, textChangeRange.span.start + textChangeRange.newLength); - // combine prefix, changed text and suffix - newText = prefix && suffix - ? prefix + changedText + suffix - : prefix - ? (prefix + changedText) - : (changedText + suffix); - } - var newSourceFile = ts.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks); - setSourceFileFields(newSourceFile, scriptSnapshot, version); - // after incremental parsing nameTable might not be up-to-date - // drop it so it can be lazily recreated later - newSourceFile.nameTable = undefined; - return newSourceFile; - } - } - } - // Otherwise, just create a new source file. - return createLanguageServiceSourceFile(sourceFile.fileName, scriptSnapshot, sourceFile.languageVersion, version, true); - } - ts.updateLanguageServiceSourceFile = updateLanguageServiceSourceFile; - function createGetCanonicalFileName(useCaseSensitivefileNames) { - return useCaseSensitivefileNames - ? (function (fileName) { return fileName; }) - : (function (fileName) { return fileName.toLowerCase(); }); - } - function createDocumentRegistry(useCaseSensitiveFileNames) { - // Maps from compiler setting target (ES3, ES5, etc.) to all the cached documents we have - // for those settings. - var buckets = {}; - var getCanonicalFileName = createGetCanonicalFileName(!!useCaseSensitiveFileNames); - function getKeyFromCompilationSettings(settings) { - return "_" + settings.target; // + "|" + settings.propagateEnumConstantoString() - } - function getBucketForCompilationSettings(settings, createIfMissing) { - var key = getKeyFromCompilationSettings(settings); - var bucket = ts.lookUp(buckets, key); - if (!bucket && createIfMissing) { - buckets[key] = bucket = ts.createFileMap(getCanonicalFileName); - } - return bucket; - } - function reportStats() { - var bucketInfoArray = Object.keys(buckets).filter(function (name) { return name && name.charAt(0) === '_'; }).map(function (name) { - var entries = ts.lookUp(buckets, name); - var sourceFiles = []; - for (var i in entries) { - var entry = entries.get(i); - sourceFiles.push({ - name: i, - refCount: entry.languageServiceRefCount, - references: entry.owners.slice(0) - }); - } - sourceFiles.sort(function (x, y) { return y.refCount - x.refCount; }); - return { - bucket: name, - sourceFiles: sourceFiles - }; - }); - return JSON.stringify(bucketInfoArray, null, 2); - } - function acquireDocument(fileName, compilationSettings, scriptSnapshot, version) { - return acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, true); - } - function updateDocument(fileName, compilationSettings, scriptSnapshot, version) { - return acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, false); - } - function acquireOrUpdateDocument(fileName, compilationSettings, scriptSnapshot, version, acquiring) { - var bucket = getBucketForCompilationSettings(compilationSettings, true); - var entry = bucket.get(fileName); - if (!entry) { - ts.Debug.assert(acquiring, "How could we be trying to update a document that the registry doesn't have?"); - // Have never seen this file with these settings. Create a new source file for it. - var sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, compilationSettings.target, version, false); - entry = { - sourceFile: sourceFile, - languageServiceRefCount: 0, - owners: [] - }; - bucket.set(fileName, entry); - } - else { - // We have an entry for this file. However, it may be for a different version of - // the script snapshot. If so, update it appropriately. Otherwise, we can just - // return it as is. - if (entry.sourceFile.version !== version) { - entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot, version, scriptSnapshot.getChangeRange(entry.sourceFile.scriptSnapshot)); - } - } - // If we're acquiring, then this is the first time this LS is asking for this document. - // Increase our ref count so we know there's another LS using the document. If we're - // not acquiring, then that means the LS is 'updating' the file instead, and that means - // it has already acquired the document previously. As such, we do not need to increase - // the ref count. - if (acquiring) { - entry.languageServiceRefCount++; - } - return entry.sourceFile; - } - function releaseDocument(fileName, compilationSettings) { - var bucket = getBucketForCompilationSettings(compilationSettings, false); - ts.Debug.assert(bucket !== undefined); - var entry = bucket.get(fileName); - entry.languageServiceRefCount--; - ts.Debug.assert(entry.languageServiceRefCount >= 0); - if (entry.languageServiceRefCount === 0) { - bucket.remove(fileName); - } - } - return { - acquireDocument: acquireDocument, - updateDocument: updateDocument, - releaseDocument: releaseDocument, - reportStats: reportStats - }; - } - ts.createDocumentRegistry = createDocumentRegistry; - function preProcessFile(sourceText, readImportFiles) { - if (readImportFiles === void 0) { readImportFiles = true; } - var referencedFiles = []; - var importedFiles = []; - var isNoDefaultLib = false; - function processTripleSlashDirectives() { - var commentRanges = ts.getLeadingCommentRanges(sourceText, 0); - ts.forEach(commentRanges, function (commentRange) { - var comment = sourceText.substring(commentRange.pos, commentRange.end); - var referencePathMatchResult = ts.getFileReferenceFromReferencePath(comment, commentRange); - if (referencePathMatchResult) { - isNoDefaultLib = referencePathMatchResult.isNoDefaultLib; - var fileReference = referencePathMatchResult.fileReference; - if (fileReference) { - referencedFiles.push(fileReference); - } - } - }); - } - function recordModuleName() { - var importPath = scanner.getTokenValue(); - var pos = scanner.getTokenPos(); - importedFiles.push({ - fileName: importPath, - pos: pos, - end: pos + importPath.length - }); - } - function processImport() { - scanner.setText(sourceText); - var token = scanner.scan(); - // Look for: - // import "mod"; - // import d from "mod" - // import {a as A } from "mod"; - // import * as NS from "mod" - // import d, {a, b as B} from "mod" - // import i = require("mod"); - // - // export * from "mod" - // export {a as b} from "mod" - while (token !== 1 /* EndOfFileToken */) { - if (token === 85 /* ImportKeyword */) { - token = scanner.scan(); - if (token === 8 /* StringLiteral */) { - // import "mod"; - recordModuleName(); - continue; - } - else { - if (token === 65 /* Identifier */) { - token = scanner.scan(); - if (token === 126 /* FromKeyword */) { - token = scanner.scan(); - if (token === 8 /* StringLiteral */) { - // import d from "mod"; - recordModuleName(); - continue; - } - } - else if (token === 53 /* EqualsToken */) { - token = scanner.scan(); - if (token === 120 /* RequireKeyword */) { - token = scanner.scan(); - if (token === 16 /* OpenParenToken */) { - token = scanner.scan(); - if (token === 8 /* StringLiteral */) { - // import i = require("mod"); - recordModuleName(); - continue; - } - } - } - } - else if (token === 23 /* CommaToken */) { - // consume comma and keep going - token = scanner.scan(); - } - else { - // unknown syntax - continue; - } - } - if (token === 14 /* OpenBraceToken */) { - token = scanner.scan(); - // consume "{ a as B, c, d as D}" clauses - while (token !== 15 /* CloseBraceToken */) { - token = scanner.scan(); - } - if (token === 15 /* CloseBraceToken */) { - token = scanner.scan(); - if (token === 126 /* FromKeyword */) { - token = scanner.scan(); - if (token === 8 /* StringLiteral */) { - // import {a as A} from "mod"; - // import d, {a, b as B} from "mod" - recordModuleName(); - } - } - } - } - else if (token === 35 /* AsteriskToken */) { - token = scanner.scan(); - if (token === 111 /* AsKeyword */) { - token = scanner.scan(); - if (token === 65 /* Identifier */) { - token = scanner.scan(); - if (token === 126 /* FromKeyword */) { - token = scanner.scan(); - if (token === 8 /* StringLiteral */) { - // import * as NS from "mod" - // import d, * as NS from "mod" - recordModuleName(); - } - } - } - } - } - } - } - else if (token === 78 /* ExportKeyword */) { - token = scanner.scan(); - if (token === 14 /* OpenBraceToken */) { - token = scanner.scan(); - // consume "{ a as B, c, d as D}" clauses - while (token !== 15 /* CloseBraceToken */) { - token = scanner.scan(); - } - if (token === 15 /* CloseBraceToken */) { - token = scanner.scan(); - if (token === 126 /* FromKeyword */) { - token = scanner.scan(); - if (token === 8 /* StringLiteral */) { - // export {a as A} from "mod"; - // export {a, b as B} from "mod" - recordModuleName(); - } - } - } - } - else if (token === 35 /* AsteriskToken */) { - token = scanner.scan(); - if (token === 126 /* FromKeyword */) { - token = scanner.scan(); - if (token === 8 /* StringLiteral */) { - // export * from "mod" - recordModuleName(); - } - } - } - } - token = scanner.scan(); - } - scanner.setText(undefined); - } - if (readImportFiles) { - processImport(); - } - processTripleSlashDirectives(); - return { referencedFiles: referencedFiles, importedFiles: importedFiles, isLibFile: isNoDefaultLib }; - } - ts.preProcessFile = preProcessFile; - /// Helpers - function getTargetLabel(referenceNode, labelName) { - while (referenceNode) { - if (referenceNode.kind === 197 /* LabeledStatement */ && referenceNode.label.text === labelName) { - return referenceNode.label; - } - referenceNode = referenceNode.parent; - } - return undefined; - } - function isJumpStatementTarget(node) { - return node.kind === 65 /* Identifier */ && - (node.parent.kind === 193 /* BreakStatement */ || node.parent.kind === 192 /* ContinueStatement */) && - node.parent.label === node; - } - function isLabelOfLabeledStatement(node) { - return node.kind === 65 /* Identifier */ && - node.parent.kind === 197 /* LabeledStatement */ && - node.parent.label === node; - } - /** - * Whether or not a 'node' is preceded by a label of the given string. - * Note: 'node' cannot be a SourceFile. - */ - function isLabeledBy(node, labelName) { - for (var owner = node.parent; owner.kind === 197 /* LabeledStatement */; owner = owner.parent) { - if (owner.label.text === labelName) { - return true; - } - } - return false; - } - function isLabelName(node) { - return isLabelOfLabeledStatement(node) || isJumpStatementTarget(node); - } - function isRightSideOfQualifiedName(node) { - return node.parent.kind === 128 /* QualifiedName */ && node.parent.right === node; - } - function isRightSideOfPropertyAccess(node) { - return node && node.parent && node.parent.kind === 158 /* PropertyAccessExpression */ && node.parent.name === node; - } - function isCallExpressionTarget(node) { - if (isRightSideOfPropertyAccess(node)) { - node = node.parent; - } - return node && node.parent && node.parent.kind === 160 /* CallExpression */ && node.parent.expression === node; - } - function isNewExpressionTarget(node) { - if (isRightSideOfPropertyAccess(node)) { - node = node.parent; - } - return node && node.parent && node.parent.kind === 161 /* NewExpression */ && node.parent.expression === node; - } - function isNameOfModuleDeclaration(node) { - return node.parent.kind === 208 /* ModuleDeclaration */ && node.parent.name === node; - } - function isNameOfFunctionDeclaration(node) { - return node.kind === 65 /* Identifier */ && - ts.isFunctionLike(node.parent) && node.parent.name === node; - } - /** Returns true if node is a name of an object literal property, e.g. "a" in x = { "a": 1 } */ - function isNameOfPropertyAssignment(node) { - return (node.kind === 65 /* Identifier */ || node.kind === 8 /* StringLiteral */ || node.kind === 7 /* NumericLiteral */) && - (node.parent.kind === 227 /* PropertyAssignment */ || node.parent.kind === 228 /* ShorthandPropertyAssignment */) && node.parent.name === node; - } - function isLiteralNameOfPropertyDeclarationOrIndexAccess(node) { - if (node.kind === 8 /* StringLiteral */ || node.kind === 7 /* NumericLiteral */) { - switch (node.parent.kind) { - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 227 /* PropertyAssignment */: - case 229 /* EnumMember */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 208 /* ModuleDeclaration */: - return node.parent.name === node; - case 159 /* ElementAccessExpression */: - return node.parent.argumentExpression === node; - } - } - return false; - } - function isNameOfExternalModuleImportOrDeclaration(node) { - if (node.kind === 8 /* StringLiteral */) { - return isNameOfModuleDeclaration(node) || - (ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node); - } - return false; - } - /** Returns true if the position is within a comment */ - function isInsideComment(sourceFile, token, position) { - // The position has to be: 1. in the leading trivia (before token.getStart()), and 2. within a comment - return position <= token.getStart(sourceFile) && - (isInsideCommentRange(ts.getTrailingCommentRanges(sourceFile.text, token.getFullStart())) || - isInsideCommentRange(ts.getLeadingCommentRanges(sourceFile.text, token.getFullStart()))); - function isInsideCommentRange(comments) { - return ts.forEach(comments, function (comment) { - // either we are 1. completely inside the comment, or 2. at the end of the comment - if (comment.pos < position && position < comment.end) { - return true; - } - else if (position === comment.end) { - var text = sourceFile.text; - var width = comment.end - comment.pos; - // is single line comment or just /* - if (width <= 2 || text.charCodeAt(comment.pos + 1) === 47 /* slash */) { - return true; - } - else { - // is unterminated multi-line comment - return !(text.charCodeAt(comment.end - 1) === 47 /* slash */ && - text.charCodeAt(comment.end - 2) === 42 /* asterisk */); - } - } - return false; - }); - } - } - var SemanticMeaning; - (function (SemanticMeaning) { - SemanticMeaning[SemanticMeaning["None"] = 0] = "None"; - SemanticMeaning[SemanticMeaning["Value"] = 1] = "Value"; - SemanticMeaning[SemanticMeaning["Type"] = 2] = "Type"; - SemanticMeaning[SemanticMeaning["Namespace"] = 4] = "Namespace"; - SemanticMeaning[SemanticMeaning["All"] = 7] = "All"; - })(SemanticMeaning || (SemanticMeaning = {})); - var BreakContinueSearchType; - (function (BreakContinueSearchType) { - BreakContinueSearchType[BreakContinueSearchType["None"] = 0] = "None"; - BreakContinueSearchType[BreakContinueSearchType["Unlabeled"] = 1] = "Unlabeled"; - BreakContinueSearchType[BreakContinueSearchType["Labeled"] = 2] = "Labeled"; - BreakContinueSearchType[BreakContinueSearchType["All"] = 3] = "All"; - })(BreakContinueSearchType || (BreakContinueSearchType = {})); - // A cache of completion entries for keywords, these do not change between sessions - var keywordCompletions = []; - for (var i = 66 /* FirstKeyword */; i <= 127 /* LastKeyword */; i++) { - keywordCompletions.push({ - name: ts.tokenToString(i), - kind: ScriptElementKind.keyword, - kindModifiers: ScriptElementKindModifier.none, - sortText: "0" - }); - } - /* @internal */ function getContainerNode(node) { - while (true) { - node = node.parent; - if (!node) { - return undefined; - } - switch (node.kind) { - case 230 /* SourceFile */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 204 /* ClassDeclaration */: - case 205 /* InterfaceDeclaration */: - case 207 /* EnumDeclaration */: - case 208 /* ModuleDeclaration */: - return node; - } - } - } - ts.getContainerNode = getContainerNode; - /* @internal */ function getNodeKind(node) { - switch (node.kind) { - case 208 /* ModuleDeclaration */: return ScriptElementKind.moduleElement; - case 204 /* ClassDeclaration */: return ScriptElementKind.classElement; - case 205 /* InterfaceDeclaration */: return ScriptElementKind.interfaceElement; - case 206 /* TypeAliasDeclaration */: return ScriptElementKind.typeElement; - case 207 /* EnumDeclaration */: return ScriptElementKind.enumElement; - case 201 /* VariableDeclaration */: - return ts.isConst(node) - ? ScriptElementKind.constElement - : ts.isLet(node) - ? ScriptElementKind.letElement - : ScriptElementKind.variableElement; - case 203 /* FunctionDeclaration */: return ScriptElementKind.functionElement; - case 138 /* GetAccessor */: return ScriptElementKind.memberGetAccessorElement; - case 139 /* SetAccessor */: return ScriptElementKind.memberSetAccessorElement; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - return ScriptElementKind.memberFunctionElement; - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - return ScriptElementKind.memberVariableElement; - case 142 /* IndexSignature */: return ScriptElementKind.indexSignatureElement; - case 141 /* ConstructSignature */: return ScriptElementKind.constructSignatureElement; - case 140 /* CallSignature */: return ScriptElementKind.callSignatureElement; - case 137 /* Constructor */: return ScriptElementKind.constructorImplementationElement; - case 130 /* TypeParameter */: return ScriptElementKind.typeParameterElement; - case 229 /* EnumMember */: return ScriptElementKind.variableElement; - case 131 /* Parameter */: return (node.flags & 112 /* AccessibilityModifier */) ? ScriptElementKind.memberVariableElement : ScriptElementKind.parameterElement; - case 211 /* ImportEqualsDeclaration */: - case 216 /* ImportSpecifier */: - case 213 /* ImportClause */: - case 220 /* ExportSpecifier */: - case 214 /* NamespaceImport */: - return ScriptElementKind.alias; - } - return ScriptElementKind.unknown; - } - ts.getNodeKind = getNodeKind; - function createLanguageService(host, documentRegistry) { - if (documentRegistry === void 0) { documentRegistry = createDocumentRegistry(); } - var syntaxTreeCache = new SyntaxTreeCache(host); - var ruleProvider; - var program; - var lastProjectVersion; - var useCaseSensitivefileNames = false; - var cancellationToken = new CancellationTokenObject(host.getCancellationToken && host.getCancellationToken()); - // Check if the localized messages json is set, otherwise query the host for it - if (!ts.localizedDiagnosticMessages && host.getLocalizedDiagnosticMessages) { - ts.localizedDiagnosticMessages = host.getLocalizedDiagnosticMessages(); - } - function log(message) { - if (host.log) { - host.log(message); - } - } - var getCanonicalFileName = createGetCanonicalFileName(useCaseSensitivefileNames); - function getValidSourceFile(fileName) { - fileName = ts.normalizeSlashes(fileName); - var sourceFile = program.getSourceFile(getCanonicalFileName(fileName)); - if (!sourceFile) { - throw new Error("Could not find file: '" + fileName + "'."); - } - return sourceFile; - } - function getRuleProvider(options) { - // Ensure rules are initialized and up to date wrt to formatting options - if (!ruleProvider) { - ruleProvider = new ts.formatting.RulesProvider(); - } - ruleProvider.ensureUpToDate(options); - return ruleProvider; - } - function synchronizeHostData() { - // perform fast check if host supports it - if (host.getProjectVersion) { - var hostProjectVersion = host.getProjectVersion(); - if (hostProjectVersion) { - if (lastProjectVersion === hostProjectVersion) { - return; - } - lastProjectVersion = hostProjectVersion; - } - } - // Get a fresh cache of the host information - var hostCache = new HostCache(host, getCanonicalFileName); - // If the program is already up-to-date, we can reuse it - if (programUpToDate()) { - return; - } - // IMPORTANT - It is critical from this moment onward that we do not check - // cancellation tokens. We are about to mutate source files from a previous program - // instance. If we cancel midway through, we may end up in an inconsistent state where - // the program points to old source files that have been invalidated because of - // incremental parsing. - var oldSettings = program && program.getCompilerOptions(); - var newSettings = hostCache.compilationSettings(); - var changesInCompilationSettingsAffectSyntax = oldSettings && oldSettings.target !== newSettings.target; - // Now create a new compiler - var newProgram = ts.createProgram(hostCache.getRootFileNames(), newSettings, { - getSourceFile: getOrCreateSourceFile, - getCancellationToken: function () { return cancellationToken; }, - getCanonicalFileName: getCanonicalFileName, - useCaseSensitiveFileNames: function () { return useCaseSensitivefileNames; }, - getNewLine: function () { return host.getNewLine ? host.getNewLine() : "\r\n"; }, - getDefaultLibFileName: function (options) { return host.getDefaultLibFileName(options); }, - writeFile: function (fileName, data, writeByteOrderMark) { }, - getCurrentDirectory: function () { return host.getCurrentDirectory(); } - }); - // Release any files we have acquired in the old program but are - // not part of the new program. - if (program) { - var oldSourceFiles = program.getSourceFiles(); - for (var _i = 0; _i < oldSourceFiles.length; _i++) { - var oldSourceFile = oldSourceFiles[_i]; - var fileName = oldSourceFile.fileName; - if (!newProgram.getSourceFile(fileName) || changesInCompilationSettingsAffectSyntax) { - documentRegistry.releaseDocument(fileName, oldSettings); - } - } - } - // hostCache is captured in the closure for 'getOrCreateSourceFile' but it should not be used past this point. - // It needs to be cleared to allow all collected snapshots to be released - hostCache = undefined; - program = newProgram; - // Make sure all the nodes in the program are both bound, and have their parent - // pointers set property. - program.getTypeChecker(); - return; - function getOrCreateSourceFile(fileName) { - ts.Debug.assert(hostCache !== undefined); - // The program is asking for this file, check first if the host can locate it. - // If the host can not locate the file, then it does not exist. return undefined - // to the program to allow reporting of errors for missing files. - var hostFileInformation = hostCache.getOrCreateEntry(fileName); - if (!hostFileInformation) { - return undefined; - } - // Check if the language version has changed since we last created a program; if they are the same, - // it is safe to reuse the souceFiles; if not, then the shape of the AST can change, and the oldSourceFile - // can not be reused. we have to dump all syntax trees and create new ones. - if (!changesInCompilationSettingsAffectSyntax) { - // Check if the old program had this file already - var oldSourceFile = program && program.getSourceFile(fileName); - if (oldSourceFile) { - // We already had a source file for this file name. Go to the registry to - // ensure that we get the right up to date version of it. We need this to - // address the following 'race'. Specifically, say we have the following: - // - // LS1 - // \ - // DocumentRegistry - // / - // LS2 - // - // Each LS has a reference to file 'foo.ts' at version 1. LS2 then updates - // it's version of 'foo.ts' to version 2. This will cause LS2 and the - // DocumentRegistry to have version 2 of the document. HOwever, LS1 will - // have version 1. And *importantly* this source file will be *corrupt*. - // The act of creating version 2 of the file irrevocably damages the version - // 1 file. - // - // So, later when we call into LS1, we need to make sure that it doesn't use - // it's source file any more, and instead defers to DocumentRegistry to get - // either version 1, version 2 (or some other version) depending on what the - // host says should be used. - return documentRegistry.updateDocument(fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version); - } - } - // Could not find this file in the old program, create a new SourceFile for it. - return documentRegistry.acquireDocument(fileName, newSettings, hostFileInformation.scriptSnapshot, hostFileInformation.version); - } - function sourceFileUpToDate(sourceFile) { - return sourceFile && sourceFile.version === hostCache.getVersion(sourceFile.fileName); - } - function programUpToDate() { - // If we haven't create a program yet, then it is not up-to-date - if (!program) { - return false; - } - // If number of files in the program do not match, it is not up-to-date - var rootFileNames = hostCache.getRootFileNames(); - if (program.getSourceFiles().length !== rootFileNames.length) { - return false; - } - // If any file is not up-to-date, then the whole program is not up-to-date - for (var _i = 0; _i < rootFileNames.length; _i++) { - var fileName = rootFileNames[_i]; - if (!sourceFileUpToDate(program.getSourceFile(fileName))) { - return false; - } - } - // If the compilation settings do no match, then the program is not up-to-date - return ts.compareDataObjects(program.getCompilerOptions(), hostCache.compilationSettings()); - } - } - function getProgram() { - synchronizeHostData(); - return program; - } - function cleanupSemanticCache() { - // TODO: Should we jettison the program (or it's type checker) here? - } - function dispose() { - if (program) { - ts.forEach(program.getSourceFiles(), function (f) { - return documentRegistry.releaseDocument(f.fileName, program.getCompilerOptions()); - }); - } - } - /// Diagnostics - function getSyntacticDiagnostics(fileName) { - synchronizeHostData(); - return program.getSyntacticDiagnostics(getValidSourceFile(fileName)); - } - /** - * getSemanticDiagnostiscs return array of Diagnostics. If '-d' is not enabled, only report semantic errors - * If '-d' enabled, report both semantic and emitter errors - */ - function getSemanticDiagnostics(fileName) { - synchronizeHostData(); - var targetSourceFile = getValidSourceFile(fileName); - // For JavaScript files, we don't want to report the normal typescript semantic errors. - // Instead, we just report errors for using TypeScript-only constructs from within a - // JavaScript file. - if (ts.isJavaScript(fileName)) { - return getJavaScriptSemanticDiagnostics(targetSourceFile); - } - // Only perform the action per file regardless of '-out' flag as LanguageServiceHost is expected to call this function per file. - // Therefore only get diagnostics for given file. - var semanticDiagnostics = program.getSemanticDiagnostics(targetSourceFile); - if (!program.getCompilerOptions().declaration) { - return semanticDiagnostics; - } - // If '-d' is enabled, check for emitter error. One example of emitter error is export class implements non-export interface - var declarationDiagnostics = program.getDeclarationDiagnostics(targetSourceFile); - return ts.concatenate(semanticDiagnostics, declarationDiagnostics); - } - function getJavaScriptSemanticDiagnostics(sourceFile) { - var diagnostics = []; - walk(sourceFile); - return diagnostics; - function walk(node) { - if (!node) { - return false; - } - switch (node.kind) { - case 211 /* ImportEqualsDeclaration */: - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_a_ts_file)); - return true; - case 217 /* ExportAssignment */: - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_a_ts_file)); - return true; - case 204 /* ClassDeclaration */: - var classDeclaration = node; - if (checkModifiers(classDeclaration.modifiers) || - checkTypeParameters(classDeclaration.typeParameters)) { - return true; - } - break; - case 225 /* HeritageClause */: - var heritageClause = node; - if (heritageClause.token === 102 /* ImplementsKeyword */) { - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)); - return true; - } - break; - case 205 /* InterfaceDeclaration */: - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)); - return true; - case 208 /* ModuleDeclaration */: - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)); - return true; - case 206 /* TypeAliasDeclaration */: - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)); - return true; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 165 /* FunctionExpression */: - case 203 /* FunctionDeclaration */: - case 166 /* ArrowFunction */: - case 203 /* FunctionDeclaration */: - var functionDeclaration = node; - if (checkModifiers(functionDeclaration.modifiers) || - checkTypeParameters(functionDeclaration.typeParameters) || - checkTypeAnnotation(functionDeclaration.type)) { - return true; - } - break; - case 183 /* VariableStatement */: - var variableStatement = node; - if (checkModifiers(variableStatement.modifiers)) { - return true; - } - break; - case 201 /* VariableDeclaration */: - var variableDeclaration = node; - if (checkTypeAnnotation(variableDeclaration.type)) { - return true; - } - break; - case 160 /* CallExpression */: - case 161 /* NewExpression */: - var expression = node; - if (expression.typeArguments && expression.typeArguments.length > 0) { - var start = expression.typeArguments.pos; - diagnostics.push(ts.createFileDiagnostic(sourceFile, start, expression.typeArguments.end - start, ts.Diagnostics.type_arguments_can_only_be_used_in_a_ts_file)); - return true; - } - break; - case 131 /* Parameter */: - var parameter = node; - if (parameter.modifiers) { - var start = parameter.modifiers.pos; - diagnostics.push(ts.createFileDiagnostic(sourceFile, start, parameter.modifiers.end - start, ts.Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file)); - return true; - } - if (parameter.questionToken) { - diagnostics.push(ts.createDiagnosticForNode(parameter.questionToken, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, '?')); - return true; - } - if (parameter.type) { - diagnostics.push(ts.createDiagnosticForNode(parameter.type, ts.Diagnostics.types_can_only_be_used_in_a_ts_file)); - return true; - } - break; - case 134 /* PropertyDeclaration */: - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.property_declarations_can_only_be_used_in_a_ts_file)); - return true; - case 207 /* EnumDeclaration */: - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)); - return true; - case 163 /* TypeAssertionExpression */: - var typeAssertionExpression = node; - diagnostics.push(ts.createDiagnosticForNode(typeAssertionExpression.type, ts.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)); - return true; - case 132 /* Decorator */: - diagnostics.push(ts.createDiagnosticForNode(node, ts.Diagnostics.decorators_can_only_be_used_in_a_ts_file)); - return true; - } - return ts.forEachChild(node, walk); - } - function checkTypeParameters(typeParameters) { - if (typeParameters) { - var start = typeParameters.pos; - diagnostics.push(ts.createFileDiagnostic(sourceFile, start, typeParameters.end - start, ts.Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file)); - return true; - } - return false; - } - function checkTypeAnnotation(type) { - if (type) { - diagnostics.push(ts.createDiagnosticForNode(type, ts.Diagnostics.types_can_only_be_used_in_a_ts_file)); - return true; - } - return false; - } - function checkModifiers(modifiers) { - if (modifiers) { - for (var _i = 0; _i < modifiers.length; _i++) { - var modifier = modifiers[_i]; - switch (modifier.kind) { - case 108 /* PublicKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - case 115 /* DeclareKeyword */: - diagnostics.push(ts.createDiagnosticForNode(modifier, ts.Diagnostics._0_can_only_be_used_in_a_ts_file, ts.tokenToString(modifier.kind))); - return true; - // These are all legal modifiers. - case 109 /* StaticKeyword */: - case 78 /* ExportKeyword */: - case 70 /* ConstKeyword */: - case 73 /* DefaultKeyword */: - } - } - } - return false; - } - } - function getCompilerOptionsDiagnostics() { - synchronizeHostData(); - return program.getGlobalDiagnostics(); - } - /// Completion - function getCompletionEntryDisplayNameForSymbol(symbol, target, performCharacterChecks) { - var displayName = symbol.getName(); - if (displayName) { - // If this is the default export, get the name of the declaration if it exists - if (displayName === "default") { - var localSymbol = ts.getLocalSymbolForExportDefault(symbol); - if (localSymbol && localSymbol.name) { - displayName = symbol.valueDeclaration.localSymbol.name; - } - } - var firstCharCode = displayName.charCodeAt(0); - // First check of the displayName is not external module; if it is an external module, it is not valid entry - if ((symbol.flags & 1536 /* Namespace */) && (firstCharCode === 39 /* singleQuote */ || firstCharCode === 34 /* doubleQuote */)) { - // If the symbol is external module, don't show it in the completion list - // (i.e declare module "http" { let x; } | // <= request completion here, "http" should not be there) - return undefined; - } - } - return getCompletionEntryDisplayName(displayName, target, performCharacterChecks); - } - function getCompletionEntryDisplayName(displayName, target, performCharacterChecks) { - if (!displayName) { - return undefined; - } - var firstCharCode = displayName.charCodeAt(0); - if (displayName.length >= 2 && - firstCharCode === displayName.charCodeAt(displayName.length - 1) && - (firstCharCode === 39 /* singleQuote */ || firstCharCode === 34 /* doubleQuote */)) { - // If the user entered name for the symbol was quoted, removing the quotes is not enough, as the name could be an - // invalid identifier name. We need to check if whatever was inside the quotes is actually a valid identifier name. - displayName = displayName.substring(1, displayName.length - 1); - } - if (!displayName) { - return undefined; - } - if (performCharacterChecks) { - if (!ts.isIdentifierStart(displayName.charCodeAt(0), target)) { - return undefined; - } - for (var i = 1, n = displayName.length; i < n; i++) { - if (!ts.isIdentifierPart(displayName.charCodeAt(i), target)) { - return undefined; - } - } - } - return ts.unescapeIdentifier(displayName); - } - function getCompletionData(fileName, position) { - var typeChecker = program.getTypeChecker(); - var syntacticStart = new Date().getTime(); - var sourceFile = getValidSourceFile(fileName); - var isJavaScriptFile = ts.isJavaScript(fileName); - var start = new Date().getTime(); - var currentToken = ts.getTokenAtPosition(sourceFile, position); - log("getCompletionData: Get current token: " + (new Date().getTime() - start)); - start = new Date().getTime(); - // Completion not allowed inside comments, bail out if this is the case - var insideComment = isInsideComment(sourceFile, currentToken, position); - log("getCompletionData: Is inside comment: " + (new Date().getTime() - start)); - if (insideComment) { - log("Returning an empty list because completion was inside a comment."); - return undefined; - } - start = new Date().getTime(); - var previousToken = ts.findPrecedingToken(position, sourceFile); - log("getCompletionData: Get previous token 1: " + (new Date().getTime() - start)); - // The decision to provide completion depends on the contextToken, which is determined through the previousToken. - // Note: 'previousToken' (and thus 'contextToken') can be undefined if we are the beginning of the file - var contextToken = previousToken; - // Check if the caret is at the end of an identifier; this is a partial identifier that we want to complete: e.g. a.toS| - // Skip this partial identifier and adjust the contextToken to the token that precedes it. - if (contextToken && position <= contextToken.end && ts.isWord(contextToken.kind)) { - var start_2 = new Date().getTime(); - contextToken = ts.findPrecedingToken(contextToken.getFullStart(), sourceFile); - log("getCompletionData: Get previous token 2: " + (new Date().getTime() - start_2)); - } - // Check if this is a valid completion location - if (contextToken && isCompletionListBlocker(contextToken)) { - log("Returning an empty list because completion was requested in an invalid position."); - return undefined; - } - // Find the node where completion is requested on, in the case of a completion after - // a dot, it is the member access expression other wise, it is a request for all - // visible symbols in the scope, and the node is the current location. - var node = currentToken; - var isRightOfDot = false; - if (contextToken && contextToken.kind === 20 /* DotToken */ && contextToken.parent.kind === 158 /* PropertyAccessExpression */) { - node = contextToken.parent.expression; - isRightOfDot = true; - } - else if (contextToken && contextToken.kind === 20 /* DotToken */ && contextToken.parent.kind === 128 /* QualifiedName */) { - node = contextToken.parent.left; - isRightOfDot = true; - } - var location = ts.getTouchingPropertyName(sourceFile, position); - var target = program.getCompilerOptions().target; - var semanticStart = new Date().getTime(); - var isMemberCompletion; - var isNewIdentifierLocation; - var symbols = []; - if (isRightOfDot) { - getTypeScriptMemberSymbols(); - } - else { - // For JavaScript or TypeScript, if we're not after a dot, then just try to get the - // global symbols in scope. These results should be valid for either language as - // the set of symbols that can be referenced from this location. - if (!tryGetGlobalSymbols()) { - return undefined; - } - } - log("getCompletionData: Semantic work: " + (new Date().getTime() - semanticStart)); - return { symbols: symbols, isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, location: location, isRightOfDot: isRightOfDot }; - function getTypeScriptMemberSymbols() { - // Right of dot member completion list - isMemberCompletion = true; - isNewIdentifierLocation = false; - if (node.kind === 65 /* Identifier */ || node.kind === 128 /* QualifiedName */ || node.kind === 158 /* PropertyAccessExpression */) { - var symbol = typeChecker.getSymbolAtLocation(node); - // This is an alias, follow what it aliases - if (symbol && symbol.flags & 8388608 /* Alias */) { - symbol = typeChecker.getAliasedSymbol(symbol); - } - if (symbol && symbol.flags & 1952 /* HasExports */) { - // Extract module or enum members - var exportedSymbols = typeChecker.getExportsOfModule(symbol); - ts.forEach(exportedSymbols, function (symbol) { - if (typeChecker.isValidPropertyAccess((node.parent), symbol.name)) { - symbols.push(symbol); - } - }); - } - } - var type = typeChecker.getTypeAtLocation(node); - addTypeProperties(type); - } - function addTypeProperties(type) { - if (type) { - // Filter private properties - for (var _i = 0, _a = type.getApparentProperties(); _i < _a.length; _i++) { - var symbol = _a[_i]; - if (typeChecker.isValidPropertyAccess((node.parent), symbol.name)) { - symbols.push(symbol); - } - } - if (isJavaScriptFile && type.flags & 16384 /* Union */) { - // In javascript files, for union types, we don't just get the members that - // the individual types have in common, we also include all the members that - // each individual type has. This is because we're going to add all identifiers - // anyways. So we might as well elevate the members that were at least part - // of the individual types to a higher status since we know what they are. - var unionType = type; - for (var _b = 0, _c = unionType.types; _b < _c.length; _b++) { - var elementType = _c[_b]; - addTypeProperties(elementType); - } - } - } - } - function tryGetGlobalSymbols() { - var containingObjectLiteral = getContainingObjectLiteralApplicableForCompletion(contextToken); - if (containingObjectLiteral) { - // Object literal expression, look up possible property names from contextual type - isMemberCompletion = true; - isNewIdentifierLocation = true; - var contextualType = typeChecker.getContextualType(containingObjectLiteral); - if (!contextualType) { - return false; - } - var contextualTypeMembers = typeChecker.getPropertiesOfType(contextualType); - if (contextualTypeMembers && contextualTypeMembers.length > 0) { - // Add filtered items to the completion list - symbols = filterContextualMembersList(contextualTypeMembers, containingObjectLiteral.properties); - } - } - else if (ts.getAncestor(contextToken, 213 /* ImportClause */)) { - // cursor is in import clause - // try to show exported member for imported module - isMemberCompletion = true; - isNewIdentifierLocation = true; - if (showCompletionsInImportsClause(contextToken)) { - var importDeclaration = ts.getAncestor(contextToken, 212 /* ImportDeclaration */); - ts.Debug.assert(importDeclaration !== undefined); - var exports; - if (importDeclaration.moduleSpecifier) { - var moduleSpecifierSymbol = typeChecker.getSymbolAtLocation(importDeclaration.moduleSpecifier); - if (moduleSpecifierSymbol) { - exports = typeChecker.getExportsOfModule(moduleSpecifierSymbol); - } - } - //let exports = typeInfoResolver.getExportsOfImportDeclaration(importDeclaration); - symbols = exports ? filterModuleExports(exports, importDeclaration) : emptyArray; - } - } - else { - // Get all entities in the current scope. - isMemberCompletion = false; - isNewIdentifierLocation = isNewIdentifierDefinitionLocation(contextToken); - if (previousToken !== contextToken) { - ts.Debug.assert(!!previousToken, "Expected 'contextToken' to be defined when different from 'previousToken'."); - } - // We need to find the node that will give us an appropriate scope to begin - // aggregating completion candidates. This is achieved in 'getScopeNode' - // by finding the first node that encompasses a position, accounting for whether a node - // is "complete" to decide whether a position belongs to the node. - // - // However, at the end of an identifier, we are interested in the scope of the identifier - // itself, but fall outside of the identifier. For instance: - // - // xyz => x$ - // - // the cursor is outside of both the 'x' and the arrow function 'xyz => x', - // so 'xyz' is not returned in our results. - // - // We define 'adjustedPosition' so that we may appropriately account for - // being at the end of an identifier. The intention is that if requesting completion - // at the end of an identifier, it should be effectively equivalent to requesting completion - // anywhere inside/at the beginning of the identifier. So in the previous case, the - // 'adjustedPosition' will work as if requesting completion in the following: - // - // xyz => $x - // - // If previousToken !== contextToken, then - // - 'contextToken' was adjusted to the token prior to 'previousToken' - // because we were at the end of an identifier. - // - 'previousToken' is defined. - var adjustedPosition = previousToken !== contextToken ? - previousToken.getStart() : - position; - var scopeNode = getScopeNode(contextToken, adjustedPosition, sourceFile) || sourceFile; - /// TODO filter meaning based on the current context - var symbolMeanings = 793056 /* Type */ | 107455 /* Value */ | 1536 /* Namespace */ | 8388608 /* Alias */; - symbols = typeChecker.getSymbolsInScope(scopeNode, symbolMeanings); - } - return true; - } - /** - * Finds the first node that "embraces" the position, so that one may - * accurately aggregate locals from the closest containing scope. - */ - function getScopeNode(initialToken, position, sourceFile) { - var scope = initialToken; - while (scope && !ts.positionBelongsToNode(scope, position, sourceFile)) { - scope = scope.parent; - } - return scope; - } - function isCompletionListBlocker(previousToken) { - var start = new Date().getTime(); - var result = isInStringOrRegularExpressionOrTemplateLiteral(previousToken) || - isIdentifierDefinitionLocation(previousToken) || - isRightOfIllegalDot(previousToken); - log("getCompletionsAtPosition: isCompletionListBlocker: " + (new Date().getTime() - start)); - return result; - } - function showCompletionsInImportsClause(node) { - if (node) { - // import {| - // import {a,| - if (node.kind === 14 /* OpenBraceToken */ || node.kind === 23 /* CommaToken */) { - return node.parent.kind === 215 /* NamedImports */; - } - } - return false; - } - function isNewIdentifierDefinitionLocation(previousToken) { - if (previousToken) { - var containingNodeKind = previousToken.parent.kind; - switch (previousToken.kind) { - case 23 /* CommaToken */: - return containingNodeKind === 160 /* CallExpression */ // func( a, | - || containingNodeKind === 137 /* Constructor */ // constructor( a, | public, protected, private keywords are allowed here, so show completion - || containingNodeKind === 161 /* NewExpression */ // new C(a, | - || containingNodeKind === 156 /* ArrayLiteralExpression */ // [a, | - || containingNodeKind === 172 /* BinaryExpression */ // let x = (a, | - || containingNodeKind === 145 /* FunctionType */; // var x: (s: string, list| - case 16 /* OpenParenToken */: - return containingNodeKind === 160 /* CallExpression */ // func( | - || containingNodeKind === 137 /* Constructor */ // constructor( | - || containingNodeKind === 161 /* NewExpression */ // new C(a| - || containingNodeKind === 164 /* ParenthesizedExpression */ // let x = (a| - || containingNodeKind === 152 /* ParenthesizedType */; // function F(pred: (a| this can become an arrow function, where 'a' is the argument - case 18 /* OpenBracketToken */: - return containingNodeKind === 156 /* ArrayLiteralExpression */; // [ | - case 118 /* ModuleKeyword */: // module | - case 119 /* NamespaceKeyword */: - return true; - case 20 /* DotToken */: - return containingNodeKind === 208 /* ModuleDeclaration */; // module A.| - case 14 /* OpenBraceToken */: - return containingNodeKind === 204 /* ClassDeclaration */; // class A{ | - case 53 /* EqualsToken */: - return containingNodeKind === 201 /* VariableDeclaration */ // let x = a| - || containingNodeKind === 172 /* BinaryExpression */; // x = a| - case 11 /* TemplateHead */: - return containingNodeKind === 174 /* TemplateExpression */; // `aa ${| - case 12 /* TemplateMiddle */: - return containingNodeKind === 180 /* TemplateSpan */; // `aa ${10} dd ${| - case 108 /* PublicKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - return containingNodeKind === 134 /* PropertyDeclaration */; // class A{ public | - } - // Previous token may have been a keyword that was converted to an identifier. - switch (previousToken.getText()) { - case "public": - case "protected": - case "private": - return true; - } - } - return false; - } - function isInStringOrRegularExpressionOrTemplateLiteral(previousToken) { - if (previousToken.kind === 8 /* StringLiteral */ - || previousToken.kind === 9 /* RegularExpressionLiteral */ - || ts.isTemplateLiteralKind(previousToken.kind)) { - var start_3 = previousToken.getStart(); - var end = previousToken.getEnd(); - // To be "in" one of these literals, the position has to be: - // 1. entirely within the token text. - // 2. at the end position of an unterminated token. - // 3. at the end of a regular expression (due to trailing flags like '/foo/g'). - if (start_3 < position && position < end) { - return true; - } - if (position === end) { - return !!previousToken.isUnterminated || - previousToken.kind === 9 /* RegularExpressionLiteral */; - } - } - return false; - } - function getContainingObjectLiteralApplicableForCompletion(previousToken) { - // The locations in an object literal expression that are applicable for completion are property name definition locations. - if (previousToken) { - var parent_10 = previousToken.parent; - switch (previousToken.kind) { - case 14 /* OpenBraceToken */: // let x = { | - case 23 /* CommaToken */: - if (parent_10 && parent_10.kind === 157 /* ObjectLiteralExpression */) { - return parent_10; - } - break; - } - } - return undefined; - } - function isFunction(kind) { - switch (kind) { - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - case 203 /* FunctionDeclaration */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 140 /* CallSignature */: - case 141 /* ConstructSignature */: - case 142 /* IndexSignature */: - return true; - } - return false; - } - function isIdentifierDefinitionLocation(previousToken) { - if (previousToken) { - var containingNodeKind = previousToken.parent.kind; - switch (previousToken.kind) { - case 23 /* CommaToken */: - return containingNodeKind === 201 /* VariableDeclaration */ || - containingNodeKind === 202 /* VariableDeclarationList */ || - containingNodeKind === 183 /* VariableStatement */ || - containingNodeKind === 207 /* EnumDeclaration */ || - isFunction(containingNodeKind) || - containingNodeKind === 204 /* ClassDeclaration */ || - containingNodeKind === 203 /* FunctionDeclaration */ || - containingNodeKind === 205 /* InterfaceDeclaration */ || - containingNodeKind === 154 /* ArrayBindingPattern */ || - containingNodeKind === 153 /* ObjectBindingPattern */; // function func({ x, y| - case 20 /* DotToken */: - return containingNodeKind === 154 /* ArrayBindingPattern */; // var [.| - case 51 /* ColonToken */: - return containingNodeKind === 155 /* BindingElement */; // var {x :html| - case 18 /* OpenBracketToken */: - return containingNodeKind === 154 /* ArrayBindingPattern */; // var [x| - case 16 /* OpenParenToken */: - return containingNodeKind === 226 /* CatchClause */ || - isFunction(containingNodeKind); - case 14 /* OpenBraceToken */: - return containingNodeKind === 207 /* EnumDeclaration */ || - containingNodeKind === 205 /* InterfaceDeclaration */ || - containingNodeKind === 148 /* TypeLiteral */ || - containingNodeKind === 153 /* ObjectBindingPattern */; // function func({ x| - case 22 /* SemicolonToken */: - return containingNodeKind === 133 /* PropertySignature */ && - previousToken.parent && previousToken.parent.parent && - (previousToken.parent.parent.kind === 205 /* InterfaceDeclaration */ || - previousToken.parent.parent.kind === 148 /* TypeLiteral */); // let x : { a; | - case 24 /* LessThanToken */: - return containingNodeKind === 204 /* ClassDeclaration */ || - containingNodeKind === 203 /* FunctionDeclaration */ || - containingNodeKind === 205 /* InterfaceDeclaration */ || - isFunction(containingNodeKind); - case 109 /* StaticKeyword */: - return containingNodeKind === 134 /* PropertyDeclaration */; - case 21 /* DotDotDotToken */: - return containingNodeKind === 131 /* Parameter */ || - containingNodeKind === 137 /* Constructor */ || - (previousToken.parent && previousToken.parent.parent && - previousToken.parent.parent.kind === 154 /* ArrayBindingPattern */); // var [...z| - case 108 /* PublicKeyword */: - case 106 /* PrivateKeyword */: - case 107 /* ProtectedKeyword */: - return containingNodeKind === 131 /* Parameter */; - case 69 /* ClassKeyword */: - case 77 /* EnumKeyword */: - case 103 /* InterfaceKeyword */: - case 83 /* FunctionKeyword */: - case 98 /* VarKeyword */: - case 116 /* GetKeyword */: - case 122 /* SetKeyword */: - case 85 /* ImportKeyword */: - case 104 /* LetKeyword */: - case 70 /* ConstKeyword */: - case 110 /* YieldKeyword */: - case 125 /* TypeKeyword */: - return true; - } - // Previous token may have been a keyword that was converted to an identifier. - switch (previousToken.getText()) { - case "class": - case "interface": - case "enum": - case "function": - case "var": - case "static": - case "let": - case "const": - case "yield": - return true; - } - } - return false; - } - function isRightOfIllegalDot(previousToken) { - if (previousToken && previousToken.kind === 7 /* NumericLiteral */) { - var text = previousToken.getFullText(); - return text.charAt(text.length - 1) === "."; - } - return false; - } - function filterModuleExports(exports, importDeclaration) { - var exisingImports = {}; - if (!importDeclaration.importClause) { - return exports; - } - if (importDeclaration.importClause.namedBindings && - importDeclaration.importClause.namedBindings.kind === 215 /* NamedImports */) { - ts.forEach(importDeclaration.importClause.namedBindings.elements, function (el) { - var name = el.propertyName || el.name; - exisingImports[name.text] = true; - }); - } - if (ts.isEmpty(exisingImports)) { - return exports; - } - return ts.filter(exports, function (e) { return !ts.lookUp(exisingImports, e.name); }); - } - function filterContextualMembersList(contextualMemberSymbols, existingMembers) { - if (!existingMembers || existingMembers.length === 0) { - return contextualMemberSymbols; - } - var existingMemberNames = {}; - ts.forEach(existingMembers, function (m) { - if (m.kind !== 227 /* PropertyAssignment */ && m.kind !== 228 /* ShorthandPropertyAssignment */) { - // Ignore omitted expressions for missing members in the object literal - return; - } - if (m.getStart() <= position && position <= m.getEnd()) { - // If this is the current item we are editing right now, do not filter it out - return; - } - // TODO(jfreeman): Account for computed property name - existingMemberNames[m.name.text] = true; - }); - var filteredMembers = []; - ts.forEach(contextualMemberSymbols, function (s) { - if (!existingMemberNames[s.name]) { - filteredMembers.push(s); - } - }); - return filteredMembers; - } - } - function getCompletionsAtPosition(fileName, position) { - synchronizeHostData(); - var completionData = getCompletionData(fileName, position); - if (!completionData) { - return undefined; - } - var symbols = completionData.symbols, isMemberCompletion = completionData.isMemberCompletion, isNewIdentifierLocation = completionData.isNewIdentifierLocation, location = completionData.location, isRightOfDot = completionData.isRightOfDot; - var entries; - if (isRightOfDot && ts.isJavaScript(fileName)) { - entries = getCompletionEntriesFromSymbols(symbols); - ts.addRange(entries, getJavaScriptCompletionEntries()); - } - else { - if (!symbols || symbols.length === 0) { - return undefined; - } - entries = getCompletionEntriesFromSymbols(symbols); - } - // Add keywords if this is not a member completion list - if (!isMemberCompletion) { - ts.addRange(entries, keywordCompletions); - } - return { isMemberCompletion: isMemberCompletion, isNewIdentifierLocation: isNewIdentifierLocation, entries: entries }; - function getJavaScriptCompletionEntries() { - var entries = []; - var allNames = {}; - var target = program.getCompilerOptions().target; - for (var _i = 0, _a = program.getSourceFiles(); _i < _a.length; _i++) { - var sourceFile = _a[_i]; - var nameTable = getNameTable(sourceFile); - for (var name_30 in nameTable) { - if (!allNames[name_30]) { - allNames[name_30] = name_30; - var displayName = getCompletionEntryDisplayName(name_30, target, true); - if (displayName) { - var entry = { - name: displayName, - kind: ScriptElementKind.warning, - kindModifiers: "", - sortText: "1" - }; - entries.push(entry); - } - } - } - } - return entries; - } - function createCompletionEntry(symbol, location) { - // Try to get a valid display name for this symbol, if we could not find one, then ignore it. - // We would like to only show things that can be added after a dot, so for instance numeric properties can - // not be accessed with a dot (a.1 <- invalid) - var displayName = getCompletionEntryDisplayNameForSymbol(symbol, program.getCompilerOptions().target, true); - if (!displayName) { - return undefined; - } - // TODO(drosen): Right now we just permit *all* semantic meanings when calling - // 'getSymbolKind' which is permissible given that it is backwards compatible; but - // really we should consider passing the meaning for the node so that we don't report - // that a suggestion for a value is an interface. We COULD also just do what - // 'getSymbolModifiers' does, which is to use the first declaration. - // Use a 'sortText' of 0' so that all symbol completion entries come before any other - // entries (like JavaScript identifier entries). - return { - name: displayName, - kind: getSymbolKind(symbol, location), - kindModifiers: getSymbolModifiers(symbol), - sortText: "0" - }; - } - function getCompletionEntriesFromSymbols(symbols) { - var start = new Date().getTime(); - var entries = []; - if (symbols) { - var nameToSymbol = {}; - for (var _i = 0; _i < symbols.length; _i++) { - var symbol = symbols[_i]; - var entry = createCompletionEntry(symbol, location); - if (entry) { - var id = ts.escapeIdentifier(entry.name); - if (!ts.lookUp(nameToSymbol, id)) { - entries.push(entry); - nameToSymbol[id] = symbol; - } - } - } - } - log("getCompletionsAtPosition: getCompletionEntriesFromSymbols: " + (new Date().getTime() - start)); - return entries; - } - } - function getCompletionEntryDetails(fileName, position, entryName) { - synchronizeHostData(); - // Compute all the completion symbols again. - var completionData = getCompletionData(fileName, position); - if (completionData) { - var symbols = completionData.symbols, location_2 = completionData.location; - // Find the symbol with the matching entry name. - var target = program.getCompilerOptions().target; - // We don't need to perform character checks here because we're only comparing the - // name against 'entryName' (which is known to be good), not building a new - // completion entry. - var symbol = ts.forEach(symbols, function (s) { return getCompletionEntryDisplayNameForSymbol(s, target, false) === entryName ? s : undefined; }); - if (symbol) { - var displayPartsDocumentationsAndSymbolKind = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, getValidSourceFile(fileName), location_2, location_2, 7 /* All */); - return { - name: entryName, - kind: displayPartsDocumentationsAndSymbolKind.symbolKind, - kindModifiers: getSymbolModifiers(symbol), - displayParts: displayPartsDocumentationsAndSymbolKind.displayParts, - documentation: displayPartsDocumentationsAndSymbolKind.documentation - }; - } - } - // Didn't find a symbol with this name. See if we can find a keyword instead. - var keywordCompletion = ts.forEach(keywordCompletions, function (c) { return c.name === entryName; }); - if (keywordCompletion) { - return { - name: entryName, - kind: ScriptElementKind.keyword, - kindModifiers: ScriptElementKindModifier.none, - displayParts: [ts.displayPart(entryName, SymbolDisplayPartKind.keyword)], - documentation: undefined - }; - } - return undefined; - } - // TODO(drosen): use contextual SemanticMeaning. - function getSymbolKind(symbol, location) { - var flags = symbol.getFlags(); - if (flags & 32 /* Class */) - return ScriptElementKind.classElement; - if (flags & 384 /* Enum */) - return ScriptElementKind.enumElement; - if (flags & 524288 /* TypeAlias */) - return ScriptElementKind.typeElement; - if (flags & 64 /* Interface */) - return ScriptElementKind.interfaceElement; - if (flags & 262144 /* TypeParameter */) - return ScriptElementKind.typeParameterElement; - var result = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, flags, location); - if (result === ScriptElementKind.unknown) { - if (flags & 262144 /* TypeParameter */) - return ScriptElementKind.typeParameterElement; - if (flags & 8 /* EnumMember */) - return ScriptElementKind.variableElement; - if (flags & 8388608 /* Alias */) - return ScriptElementKind.alias; - if (flags & 1536 /* Module */) - return ScriptElementKind.moduleElement; - } - return result; - } - function getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, flags, location) { - var typeChecker = program.getTypeChecker(); - if (typeChecker.isUndefinedSymbol(symbol)) { - return ScriptElementKind.variableElement; - } - if (typeChecker.isArgumentsSymbol(symbol)) { - return ScriptElementKind.localVariableElement; - } - if (flags & 3 /* Variable */) { - if (ts.isFirstDeclarationOfSymbolParameter(symbol)) { - return ScriptElementKind.parameterElement; - } - else if (symbol.valueDeclaration && ts.isConst(symbol.valueDeclaration)) { - return ScriptElementKind.constElement; - } - else if (ts.forEach(symbol.declarations, ts.isLet)) { - return ScriptElementKind.letElement; - } - return isLocalVariableOrFunction(symbol) ? ScriptElementKind.localVariableElement : ScriptElementKind.variableElement; - } - if (flags & 16 /* Function */) - return isLocalVariableOrFunction(symbol) ? ScriptElementKind.localFunctionElement : ScriptElementKind.functionElement; - if (flags & 32768 /* GetAccessor */) - return ScriptElementKind.memberGetAccessorElement; - if (flags & 65536 /* SetAccessor */) - return ScriptElementKind.memberSetAccessorElement; - if (flags & 8192 /* Method */) - return ScriptElementKind.memberFunctionElement; - if (flags & 16384 /* Constructor */) - return ScriptElementKind.constructorImplementationElement; - if (flags & 4 /* Property */) { - if (flags & 268435456 /* UnionProperty */) { - // If union property is result of union of non method (property/accessors/variables), it is labeled as property - var unionPropertyKind = ts.forEach(typeChecker.getRootSymbols(symbol), function (rootSymbol) { - var rootSymbolFlags = rootSymbol.getFlags(); - if (rootSymbolFlags & (98308 /* PropertyOrAccessor */ | 3 /* Variable */)) { - return ScriptElementKind.memberVariableElement; - } - ts.Debug.assert(!!(rootSymbolFlags & 8192 /* Method */)); - }); - if (!unionPropertyKind) { - // If this was union of all methods, - //make sure it has call signatures before we can label it as method - var typeOfUnionProperty = typeChecker.getTypeOfSymbolAtLocation(symbol, location); - if (typeOfUnionProperty.getCallSignatures().length) { - return ScriptElementKind.memberFunctionElement; - } - return ScriptElementKind.memberVariableElement; - } - return unionPropertyKind; - } - return ScriptElementKind.memberVariableElement; - } - return ScriptElementKind.unknown; - } - function getSymbolModifiers(symbol) { - return symbol && symbol.declarations && symbol.declarations.length > 0 - ? ts.getNodeModifiers(symbol.declarations[0]) - : ScriptElementKindModifier.none; - } - // TODO(drosen): Currently completion entry details passes the SemanticMeaning.All instead of using semanticMeaning of location - function getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, sourceFile, enclosingDeclaration, location, semanticMeaning) { - if (semanticMeaning === void 0) { semanticMeaning = getMeaningFromLocation(location); } - var typeChecker = program.getTypeChecker(); - var displayParts = []; - var documentation; - var symbolFlags = symbol.flags; - var symbolKind = getSymbolKindOfConstructorPropertyMethodAccessorFunctionOrVar(symbol, symbolFlags, location); - var hasAddedSymbolInfo; - var type; - // Class at constructor site need to be shown as constructor apart from property,method, vars - if (symbolKind !== ScriptElementKind.unknown || symbolFlags & 32 /* Class */ || symbolFlags & 8388608 /* Alias */) { - // If it is accessor they are allowed only if location is at name of the accessor - if (symbolKind === ScriptElementKind.memberGetAccessorElement || symbolKind === ScriptElementKind.memberSetAccessorElement) { - symbolKind = ScriptElementKind.memberVariableElement; - } - var signature; - type = typeChecker.getTypeOfSymbolAtLocation(symbol, location); - if (type) { - if (location.parent && location.parent.kind === 158 /* PropertyAccessExpression */) { - var right = location.parent.name; - // Either the location is on the right of a property access, or on the left and the right is missing - if (right === location || (right && right.getFullWidth() === 0)) { - location = location.parent; - } - } - // try get the call/construct signature from the type if it matches - var callExpression; - if (location.kind === 160 /* CallExpression */ || location.kind === 161 /* NewExpression */) { - callExpression = location; - } - else if (isCallExpressionTarget(location) || isNewExpressionTarget(location)) { - callExpression = location.parent; - } - if (callExpression) { - var candidateSignatures = []; - signature = typeChecker.getResolvedSignature(callExpression, candidateSignatures); - if (!signature && candidateSignatures.length) { - // Use the first candidate: - signature = candidateSignatures[0]; - } - var useConstructSignatures = callExpression.kind === 161 /* NewExpression */ || callExpression.expression.kind === 91 /* SuperKeyword */; - var allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures(); - if (!ts.contains(allSignatures, signature.target || signature)) { - // Get the first signature if there - signature = allSignatures.length ? allSignatures[0] : undefined; - } - if (signature) { - if (useConstructSignatures && (symbolFlags & 32 /* Class */)) { - // Constructor - symbolKind = ScriptElementKind.constructorImplementationElement; - addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); - } - else if (symbolFlags & 8388608 /* Alias */) { - symbolKind = ScriptElementKind.alias; - pushTypePart(symbolKind); - displayParts.push(ts.spacePart()); - if (useConstructSignatures) { - displayParts.push(ts.keywordPart(88 /* NewKeyword */)); - displayParts.push(ts.spacePart()); - } - addFullSymbolName(symbol); - } - else { - addPrefixForAnyFunctionOrVar(symbol, symbolKind); - } - switch (symbolKind) { - case ScriptElementKind.memberVariableElement: - case ScriptElementKind.variableElement: - case ScriptElementKind.constElement: - case ScriptElementKind.letElement: - case ScriptElementKind.parameterElement: - case ScriptElementKind.localVariableElement: - // If it is call or construct signature of lambda's write type name - displayParts.push(ts.punctuationPart(51 /* ColonToken */)); - displayParts.push(ts.spacePart()); - if (useConstructSignatures) { - displayParts.push(ts.keywordPart(88 /* NewKeyword */)); - displayParts.push(ts.spacePart()); - } - if (!(type.flags & 32768 /* Anonymous */)) { - displayParts.push.apply(displayParts, ts.symbolToDisplayParts(typeChecker, type.symbol, enclosingDeclaration, undefined, 1 /* WriteTypeParametersOrArguments */)); - } - addSignatureDisplayParts(signature, allSignatures, 8 /* WriteArrowStyleSignature */); - break; - default: - // Just signature - addSignatureDisplayParts(signature, allSignatures); - } - hasAddedSymbolInfo = true; - } - } - else if ((isNameOfFunctionDeclaration(location) && !(symbol.flags & 98304 /* Accessor */)) || - (location.kind === 114 /* ConstructorKeyword */ && location.parent.kind === 137 /* Constructor */)) { - // get the signature from the declaration and write it - var functionDeclaration = location.parent; - var allSignatures = functionDeclaration.kind === 137 /* Constructor */ ? type.getConstructSignatures() : type.getCallSignatures(); - if (!typeChecker.isImplementationOfOverload(functionDeclaration)) { - signature = typeChecker.getSignatureFromDeclaration(functionDeclaration); - } - else { - signature = allSignatures[0]; - } - if (functionDeclaration.kind === 137 /* Constructor */) { - // show (constructor) Type(...) signature - symbolKind = ScriptElementKind.constructorImplementationElement; - addPrefixForAnyFunctionOrVar(type.symbol, symbolKind); - } - else { - // (function/method) symbol(..signature) - addPrefixForAnyFunctionOrVar(functionDeclaration.kind === 140 /* CallSignature */ && - !(type.symbol.flags & 2048 /* TypeLiteral */ || type.symbol.flags & 4096 /* ObjectLiteral */) ? type.symbol : symbol, symbolKind); - } - addSignatureDisplayParts(signature, allSignatures); - hasAddedSymbolInfo = true; - } - } - } - if (symbolFlags & 32 /* Class */ && !hasAddedSymbolInfo) { - displayParts.push(ts.keywordPart(69 /* ClassKeyword */)); - displayParts.push(ts.spacePart()); - addFullSymbolName(symbol); - writeTypeParametersOfSymbol(symbol, sourceFile); - } - if ((symbolFlags & 64 /* Interface */) && (semanticMeaning & 2 /* Type */)) { - addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(103 /* InterfaceKeyword */)); - displayParts.push(ts.spacePart()); - addFullSymbolName(symbol); - writeTypeParametersOfSymbol(symbol, sourceFile); - } - if (symbolFlags & 524288 /* TypeAlias */) { - addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(125 /* TypeKeyword */)); - displayParts.push(ts.spacePart()); - addFullSymbolName(symbol); - displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(53 /* EqualsToken */)); - displayParts.push(ts.spacePart()); - displayParts.push.apply(displayParts, ts.typeToDisplayParts(typeChecker, typeChecker.getDeclaredTypeOfSymbol(symbol), enclosingDeclaration)); - } - if (symbolFlags & 384 /* Enum */) { - addNewLineIfDisplayPartsExist(); - if (ts.forEach(symbol.declarations, ts.isConstEnumDeclaration)) { - displayParts.push(ts.keywordPart(70 /* ConstKeyword */)); - displayParts.push(ts.spacePart()); - } - displayParts.push(ts.keywordPart(77 /* EnumKeyword */)); - displayParts.push(ts.spacePart()); - addFullSymbolName(symbol); - } - if (symbolFlags & 1536 /* Module */) { - addNewLineIfDisplayPartsExist(); - var declaration = ts.getDeclarationOfKind(symbol, 208 /* ModuleDeclaration */); - var isNamespace = declaration && declaration.name && declaration.name.kind === 65 /* Identifier */; - displayParts.push(ts.keywordPart(isNamespace ? 119 /* NamespaceKeyword */ : 118 /* ModuleKeyword */)); - displayParts.push(ts.spacePart()); - addFullSymbolName(symbol); - } - if ((symbolFlags & 262144 /* TypeParameter */) && (semanticMeaning & 2 /* Type */)) { - addNewLineIfDisplayPartsExist(); - displayParts.push(ts.punctuationPart(16 /* OpenParenToken */)); - displayParts.push(ts.textPart("type parameter")); - displayParts.push(ts.punctuationPart(17 /* CloseParenToken */)); - displayParts.push(ts.spacePart()); - addFullSymbolName(symbol); - displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(86 /* InKeyword */)); - displayParts.push(ts.spacePart()); - if (symbol.parent) { - // Class/Interface type parameter - addFullSymbolName(symbol.parent, enclosingDeclaration); - writeTypeParametersOfSymbol(symbol.parent, enclosingDeclaration); - } - else { - // Method/function type parameter - var signatureDeclaration = ts.getDeclarationOfKind(symbol, 130 /* TypeParameter */).parent; - var signature = typeChecker.getSignatureFromDeclaration(signatureDeclaration); - if (signatureDeclaration.kind === 141 /* ConstructSignature */) { - displayParts.push(ts.keywordPart(88 /* NewKeyword */)); - displayParts.push(ts.spacePart()); - } - else if (signatureDeclaration.kind !== 140 /* CallSignature */ && signatureDeclaration.name) { - addFullSymbolName(signatureDeclaration.symbol); - } - displayParts.push.apply(displayParts, ts.signatureToDisplayParts(typeChecker, signature, sourceFile, 32 /* WriteTypeArgumentsOfSignature */)); - } - } - if (symbolFlags & 8 /* EnumMember */) { - addPrefixForAnyFunctionOrVar(symbol, "enum member"); - var declaration = symbol.declarations[0]; - if (declaration.kind === 229 /* EnumMember */) { - var constantValue = typeChecker.getConstantValue(declaration); - if (constantValue !== undefined) { - displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(53 /* EqualsToken */)); - displayParts.push(ts.spacePart()); - displayParts.push(ts.displayPart(constantValue.toString(), SymbolDisplayPartKind.numericLiteral)); - } - } - } - if (symbolFlags & 8388608 /* Alias */) { - addNewLineIfDisplayPartsExist(); - displayParts.push(ts.keywordPart(85 /* ImportKeyword */)); - displayParts.push(ts.spacePart()); - addFullSymbolName(symbol); - ts.forEach(symbol.declarations, function (declaration) { - if (declaration.kind === 211 /* ImportEqualsDeclaration */) { - var importEqualsDeclaration = declaration; - if (ts.isExternalModuleImportEqualsDeclaration(importEqualsDeclaration)) { - displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(53 /* EqualsToken */)); - displayParts.push(ts.spacePart()); - displayParts.push(ts.keywordPart(120 /* RequireKeyword */)); - displayParts.push(ts.punctuationPart(16 /* OpenParenToken */)); - displayParts.push(ts.displayPart(ts.getTextOfNode(ts.getExternalModuleImportEqualsDeclarationExpression(importEqualsDeclaration)), SymbolDisplayPartKind.stringLiteral)); - displayParts.push(ts.punctuationPart(17 /* CloseParenToken */)); - } - else { - var internalAliasSymbol = typeChecker.getSymbolAtLocation(importEqualsDeclaration.moduleReference); - if (internalAliasSymbol) { - displayParts.push(ts.spacePart()); - displayParts.push(ts.operatorPart(53 /* EqualsToken */)); - displayParts.push(ts.spacePart()); - addFullSymbolName(internalAliasSymbol, enclosingDeclaration); - } - } - return true; - } - }); - } - if (!hasAddedSymbolInfo) { - if (symbolKind !== ScriptElementKind.unknown) { - if (type) { - addPrefixForAnyFunctionOrVar(symbol, symbolKind); - // For properties, variables and local vars: show the type - if (symbolKind === ScriptElementKind.memberVariableElement || - symbolFlags & 3 /* Variable */ || - symbolKind === ScriptElementKind.localVariableElement) { - displayParts.push(ts.punctuationPart(51 /* ColonToken */)); - displayParts.push(ts.spacePart()); - // If the type is type parameter, format it specially - if (type.symbol && type.symbol.flags & 262144 /* TypeParameter */) { - var typeParameterParts = ts.mapToDisplayParts(function (writer) { - typeChecker.getSymbolDisplayBuilder().buildTypeParameterDisplay(type, writer, enclosingDeclaration); - }); - displayParts.push.apply(displayParts, typeParameterParts); - } - else { - displayParts.push.apply(displayParts, ts.typeToDisplayParts(typeChecker, type, enclosingDeclaration)); - } - } - else if (symbolFlags & 16 /* Function */ || - symbolFlags & 8192 /* Method */ || - symbolFlags & 16384 /* Constructor */ || - symbolFlags & 131072 /* Signature */ || - symbolFlags & 98304 /* Accessor */ || - symbolKind === ScriptElementKind.memberFunctionElement) { - var allSignatures = type.getCallSignatures(); - addSignatureDisplayParts(allSignatures[0], allSignatures); - } - } - } - else { - symbolKind = getSymbolKind(symbol, location); - } - } - if (!documentation) { - documentation = symbol.getDocumentationComment(); - } - return { displayParts: displayParts, documentation: documentation, symbolKind: symbolKind }; - function addNewLineIfDisplayPartsExist() { - if (displayParts.length) { - displayParts.push(ts.lineBreakPart()); - } - } - function addFullSymbolName(symbol, enclosingDeclaration) { - var fullSymbolDisplayParts = ts.symbolToDisplayParts(typeChecker, symbol, enclosingDeclaration || sourceFile, undefined, 1 /* WriteTypeParametersOrArguments */ | 2 /* UseOnlyExternalAliasing */); - displayParts.push.apply(displayParts, fullSymbolDisplayParts); - } - function addPrefixForAnyFunctionOrVar(symbol, symbolKind) { - addNewLineIfDisplayPartsExist(); - if (symbolKind) { - pushTypePart(symbolKind); - displayParts.push(ts.spacePart()); - addFullSymbolName(symbol); - } - } - function pushTypePart(symbolKind) { - switch (symbolKind) { - case ScriptElementKind.variableElement: - case ScriptElementKind.functionElement: - case ScriptElementKind.letElement: - case ScriptElementKind.constElement: - case ScriptElementKind.constructorImplementationElement: - displayParts.push(ts.textOrKeywordPart(symbolKind)); - return; - default: - displayParts.push(ts.punctuationPart(16 /* OpenParenToken */)); - displayParts.push(ts.textOrKeywordPart(symbolKind)); - displayParts.push(ts.punctuationPart(17 /* CloseParenToken */)); - return; - } - } - function addSignatureDisplayParts(signature, allSignatures, flags) { - displayParts.push.apply(displayParts, ts.signatureToDisplayParts(typeChecker, signature, enclosingDeclaration, flags | 32 /* WriteTypeArgumentsOfSignature */)); - if (allSignatures.length > 1) { - displayParts.push(ts.spacePart()); - displayParts.push(ts.punctuationPart(16 /* OpenParenToken */)); - displayParts.push(ts.operatorPart(33 /* PlusToken */)); - displayParts.push(ts.displayPart((allSignatures.length - 1).toString(), SymbolDisplayPartKind.numericLiteral)); - displayParts.push(ts.spacePart()); - displayParts.push(ts.textPart(allSignatures.length === 2 ? "overload" : "overloads")); - displayParts.push(ts.punctuationPart(17 /* CloseParenToken */)); - } - documentation = signature.getDocumentationComment(); - } - function writeTypeParametersOfSymbol(symbol, enclosingDeclaration) { - var typeParameterParts = ts.mapToDisplayParts(function (writer) { - typeChecker.getSymbolDisplayBuilder().buildTypeParameterDisplayFromSymbol(symbol, writer, enclosingDeclaration); - }); - displayParts.push.apply(displayParts, typeParameterParts); - } - } - function getQuickInfoAtPosition(fileName, position) { - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - var node = ts.getTouchingPropertyName(sourceFile, position); - if (!node) { - return undefined; - } - if (isLabelName(node)) { - return undefined; - } - var typeChecker = program.getTypeChecker(); - var symbol = typeChecker.getSymbolAtLocation(node); - if (!symbol) { - // Try getting just type at this position and show - switch (node.kind) { - case 65 /* Identifier */: - case 158 /* PropertyAccessExpression */: - case 128 /* QualifiedName */: - case 93 /* ThisKeyword */: - case 91 /* SuperKeyword */: - // For the identifiers/this/super etc get the type at position - var type = typeChecker.getTypeAtLocation(node); - if (type) { - return { - kind: ScriptElementKind.unknown, - kindModifiers: ScriptElementKindModifier.none, - textSpan: ts.createTextSpan(node.getStart(), node.getWidth()), - displayParts: ts.typeToDisplayParts(typeChecker, type, getContainerNode(node)), - documentation: type.symbol ? type.symbol.getDocumentationComment() : undefined - }; - } - } - return undefined; - } - var displayPartsDocumentationsAndKind = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, sourceFile, getContainerNode(node), node); - return { - kind: displayPartsDocumentationsAndKind.symbolKind, - kindModifiers: getSymbolModifiers(symbol), - textSpan: ts.createTextSpan(node.getStart(), node.getWidth()), - displayParts: displayPartsDocumentationsAndKind.displayParts, - documentation: displayPartsDocumentationsAndKind.documentation - }; - } - function createDefinitionInfo(node, symbolKind, symbolName, containerName) { - return { - fileName: node.getSourceFile().fileName, - textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()), - kind: symbolKind, - name: symbolName, - containerKind: undefined, - containerName: containerName - }; - } - function getDefinitionFromSymbol(symbol, node) { - var typeChecker = program.getTypeChecker(); - var result = []; - var declarations = symbol.getDeclarations(); - var symbolName = typeChecker.symbolToString(symbol); // Do not get scoped name, just the name of the symbol - var symbolKind = getSymbolKind(symbol, node); - var containerSymbol = symbol.parent; - var containerName = containerSymbol ? typeChecker.symbolToString(containerSymbol, node) : ""; - if (!tryAddConstructSignature(symbol, node, symbolKind, symbolName, containerName, result) && - !tryAddCallSignature(symbol, node, symbolKind, symbolName, containerName, result)) { - // Just add all the declarations. - ts.forEach(declarations, function (declaration) { - result.push(createDefinitionInfo(declaration, symbolKind, symbolName, containerName)); - }); - } - return result; - function tryAddConstructSignature(symbol, location, symbolKind, symbolName, containerName, result) { - // Applicable only if we are in a new expression, or we are on a constructor declaration - // and in either case the symbol has a construct signature definition, i.e. class - if (isNewExpressionTarget(location) || location.kind === 114 /* ConstructorKeyword */) { - if (symbol.flags & 32 /* Class */) { - var classDeclaration = symbol.getDeclarations()[0]; - ts.Debug.assert(classDeclaration && classDeclaration.kind === 204 /* ClassDeclaration */); - return tryAddSignature(classDeclaration.members, true, symbolKind, symbolName, containerName, result); - } - } - return false; - } - function tryAddCallSignature(symbol, location, symbolKind, symbolName, containerName, result) { - if (isCallExpressionTarget(location) || isNewExpressionTarget(location) || isNameOfFunctionDeclaration(location)) { - return tryAddSignature(symbol.declarations, false, symbolKind, symbolName, containerName, result); - } - return false; - } - function tryAddSignature(signatureDeclarations, selectConstructors, symbolKind, symbolName, containerName, result) { - var declarations = []; - var definition; - ts.forEach(signatureDeclarations, function (d) { - if ((selectConstructors && d.kind === 137 /* Constructor */) || - (!selectConstructors && (d.kind === 203 /* FunctionDeclaration */ || d.kind === 136 /* MethodDeclaration */ || d.kind === 135 /* MethodSignature */))) { - declarations.push(d); - if (d.body) - definition = d; - } - }); - if (definition) { - result.push(createDefinitionInfo(definition, symbolKind, symbolName, containerName)); - return true; - } - else if (declarations.length) { - result.push(createDefinitionInfo(ts.lastOrUndefined(declarations), symbolKind, symbolName, containerName)); - return true; - } - return false; - } - } - /// Goto definition - function getDefinitionAtPosition(fileName, position) { - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - var node = ts.getTouchingPropertyName(sourceFile, position); - if (!node) { - return undefined; - } - // Labels - if (isJumpStatementTarget(node)) { - var labelName = node.text; - var label = getTargetLabel(node.parent, node.text); - return label ? [createDefinitionInfo(label, ScriptElementKind.label, labelName, undefined)] : undefined; - } - /// Triple slash reference comments - var comment = ts.forEach(sourceFile.referencedFiles, function (r) { return (r.pos <= position && position < r.end) ? r : undefined; }); - if (comment) { - var referenceFile = ts.tryResolveScriptReference(program, sourceFile, comment); - if (referenceFile) { - return [{ - fileName: referenceFile.fileName, - textSpan: ts.createTextSpanFromBounds(0, 0), - kind: ScriptElementKind.scriptElement, - name: comment.fileName, - containerName: undefined, - containerKind: undefined - }]; - } - return undefined; - } - var typeChecker = program.getTypeChecker(); - var symbol = typeChecker.getSymbolAtLocation(node); - // Could not find a symbol e.g. node is string or number keyword, - // or the symbol was an internal symbol and does not have a declaration e.g. undefined symbol - if (!symbol) { - return undefined; - } - // If this is an alias, and the request came at the declaration location - // get the aliased symbol instead. This allows for goto def on an import e.g. - // import {A, B} from "mod"; - // to jump to the implementation directly. - if (symbol.flags & 8388608 /* Alias */) { - var declaration = symbol.declarations[0]; - if (node.kind === 65 /* Identifier */ && node.parent === declaration) { - symbol = typeChecker.getAliasedSymbol(symbol); - } - } - // Because name in short-hand property assignment has two different meanings: property name and property value, - // using go-to-definition at such position should go to the variable declaration of the property value rather than - // go to the declaration of the property name (in this case stay at the same position). However, if go-to-definition - // is performed at the location of property access, we would like to go to definition of the property in the short-hand - // assignment. This case and others are handled by the following code. - if (node.parent.kind === 228 /* ShorthandPropertyAssignment */) { - var shorthandSymbol = typeChecker.getShorthandAssignmentValueSymbol(symbol.valueDeclaration); - if (!shorthandSymbol) { - return []; - } - var shorthandDeclarations = shorthandSymbol.getDeclarations(); - var shorthandSymbolKind = getSymbolKind(shorthandSymbol, node); - var shorthandSymbolName = typeChecker.symbolToString(shorthandSymbol); - var shorthandContainerName = typeChecker.symbolToString(symbol.parent, node); - return ts.map(shorthandDeclarations, function (declaration) { return createDefinitionInfo(declaration, shorthandSymbolKind, shorthandSymbolName, shorthandContainerName); }); - } - return getDefinitionFromSymbol(symbol, node); - } - /// Goto type - function getTypeDefinitionAtPosition(fileName, position) { - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - var node = ts.getTouchingPropertyName(sourceFile, position); - if (!node) { - return undefined; - } - var typeChecker = program.getTypeChecker(); - var symbol = typeChecker.getSymbolAtLocation(node); - if (!symbol) { - return undefined; - } - var type = typeChecker.getTypeOfSymbolAtLocation(symbol, node); - if (!type) { - return undefined; - } - if (type.flags & 16384 /* Union */) { - var result = []; - ts.forEach(type.types, function (t) { - if (t.symbol) { - result.push.apply(result, getDefinitionFromSymbol(t.symbol, node)); - } - }); - return result; - } - if (!type.symbol) { - return undefined; - } - return getDefinitionFromSymbol(type.symbol, node); - } - function getOccurrencesAtPosition(fileName, position) { - var results = getOccurrencesAtPositionCore(fileName, position); - if (results) { - var sourceFile = getCanonicalFileName(ts.normalizeSlashes(fileName)); - // Get occurrences only supports reporting occurrences for the file queried. So - // filter down to that list. - results = ts.filter(results, function (r) { return getCanonicalFileName(ts.normalizeSlashes(r.fileName)) === sourceFile; }); - } - return results; - } - function getDocumentHighlights(fileName, position, filesToSearch) { - synchronizeHostData(); - filesToSearch = ts.map(filesToSearch, ts.normalizeSlashes); - var sourceFilesToSearch = ts.filter(program.getSourceFiles(), function (f) { return ts.contains(filesToSearch, f.fileName); }); - var sourceFile = getValidSourceFile(fileName); - var node = ts.getTouchingWord(sourceFile, position); - if (!node) { - return undefined; - } - return getSemanticDocumentHighlights(node) || getSyntacticDocumentHighlights(node); - function getHighlightSpanForNode(node) { - var start = node.getStart(); - var end = node.getEnd(); - return { - fileName: sourceFile.fileName, - textSpan: ts.createTextSpanFromBounds(start, end), - kind: HighlightSpanKind.none - }; - } - function getSemanticDocumentHighlights(node) { - if (node.kind === 65 /* Identifier */ || - node.kind === 93 /* ThisKeyword */ || - node.kind === 91 /* SuperKeyword */ || - isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || - isNameOfExternalModuleImportOrDeclaration(node)) { - var referencedSymbols = getReferencedSymbolsForNodes(node, sourceFilesToSearch, false, false); - return convertReferencedSymbols(referencedSymbols); - } - return undefined; - function convertReferencedSymbols(referencedSymbols) { - if (!referencedSymbols) { - return undefined; - } - var fileNameToDocumentHighlights = {}; - var result = []; - for (var _i = 0; _i < referencedSymbols.length; _i++) { - var referencedSymbol = referencedSymbols[_i]; - for (var _a = 0, _b = referencedSymbol.references; _a < _b.length; _a++) { - var referenceEntry = _b[_a]; - var fileName_1 = referenceEntry.fileName; - var documentHighlights = ts.getProperty(fileNameToDocumentHighlights, fileName_1); - if (!documentHighlights) { - documentHighlights = { fileName: fileName_1, highlightSpans: [] }; - fileNameToDocumentHighlights[fileName_1] = documentHighlights; - result.push(documentHighlights); - } - documentHighlights.highlightSpans.push({ - textSpan: referenceEntry.textSpan, - kind: referenceEntry.isWriteAccess ? HighlightSpanKind.writtenReference : HighlightSpanKind.reference - }); - } - } - return result; - } - } - function getSyntacticDocumentHighlights(node) { - var fileName = sourceFile.fileName; - var highlightSpans = getHighlightSpans(node); - if (!highlightSpans || highlightSpans.length === 0) { - return undefined; - } - return [{ fileName: fileName, highlightSpans: highlightSpans }]; - // returns true if 'node' is defined and has a matching 'kind'. - function hasKind(node, kind) { - return node !== undefined && node.kind === kind; - } - // Null-propagating 'parent' function. - function parent(node) { - return node && node.parent; - } - function getHighlightSpans(node) { - if (node) { - switch (node.kind) { - case 84 /* IfKeyword */: - case 76 /* ElseKeyword */: - if (hasKind(node.parent, 186 /* IfStatement */)) { - return getIfElseOccurrences(node.parent); - } - break; - case 90 /* ReturnKeyword */: - if (hasKind(node.parent, 194 /* ReturnStatement */)) { - return getReturnOccurrences(node.parent); - } - break; - case 94 /* ThrowKeyword */: - if (hasKind(node.parent, 198 /* ThrowStatement */)) { - return getThrowOccurrences(node.parent); - } - break; - case 68 /* CatchKeyword */: - if (hasKind(parent(parent(node)), 199 /* TryStatement */)) { - return getTryCatchFinallyOccurrences(node.parent.parent); - } - break; - case 96 /* TryKeyword */: - case 81 /* FinallyKeyword */: - if (hasKind(parent(node), 199 /* TryStatement */)) { - return getTryCatchFinallyOccurrences(node.parent); - } - break; - case 92 /* SwitchKeyword */: - if (hasKind(node.parent, 196 /* SwitchStatement */)) { - return getSwitchCaseDefaultOccurrences(node.parent); - } - break; - case 67 /* CaseKeyword */: - case 73 /* DefaultKeyword */: - if (hasKind(parent(parent(parent(node))), 196 /* SwitchStatement */)) { - return getSwitchCaseDefaultOccurrences(node.parent.parent.parent); - } - break; - case 66 /* BreakKeyword */: - case 71 /* ContinueKeyword */: - if (hasKind(node.parent, 193 /* BreakStatement */) || hasKind(node.parent, 192 /* ContinueStatement */)) { - return getBreakOrContinueStatementOccurences(node.parent); - } - break; - case 82 /* ForKeyword */: - if (hasKind(node.parent, 189 /* ForStatement */) || - hasKind(node.parent, 190 /* ForInStatement */) || - hasKind(node.parent, 191 /* ForOfStatement */)) { - return getLoopBreakContinueOccurrences(node.parent); - } - break; - case 100 /* WhileKeyword */: - case 75 /* DoKeyword */: - if (hasKind(node.parent, 188 /* WhileStatement */) || hasKind(node.parent, 187 /* DoStatement */)) { - return getLoopBreakContinueOccurrences(node.parent); - } - break; - case 114 /* ConstructorKeyword */: - if (hasKind(node.parent, 137 /* Constructor */)) { - return getConstructorOccurrences(node.parent); - } - break; - case 116 /* GetKeyword */: - case 122 /* SetKeyword */: - if (hasKind(node.parent, 138 /* GetAccessor */) || hasKind(node.parent, 139 /* SetAccessor */)) { - return getGetAndSetOccurrences(node.parent); - } - default: - if (ts.isModifier(node.kind) && node.parent && - (ts.isDeclaration(node.parent) || node.parent.kind === 183 /* VariableStatement */)) { - return getModifierOccurrences(node.kind, node.parent); - } - } - } - return undefined; - } - /** - * Aggregates all throw-statements within this node *without* crossing - * into function boundaries and try-blocks with catch-clauses. - */ - function aggregateOwnedThrowStatements(node) { - var statementAccumulator = []; - aggregate(node); - return statementAccumulator; - function aggregate(node) { - if (node.kind === 198 /* ThrowStatement */) { - statementAccumulator.push(node); - } - else if (node.kind === 199 /* TryStatement */) { - var tryStatement = node; - if (tryStatement.catchClause) { - aggregate(tryStatement.catchClause); - } - else { - // Exceptions thrown within a try block lacking a catch clause - // are "owned" in the current context. - aggregate(tryStatement.tryBlock); - } - if (tryStatement.finallyBlock) { - aggregate(tryStatement.finallyBlock); - } - } - else if (!ts.isFunctionLike(node)) { - ts.forEachChild(node, aggregate); - } - } - ; - } - /** - * For lack of a better name, this function takes a throw statement and returns the - * nearest ancestor that is a try-block (whose try statement has a catch clause), - * function-block, or source file. - */ - function getThrowStatementOwner(throwStatement) { - var child = throwStatement; - while (child.parent) { - var parent_11 = child.parent; - if (ts.isFunctionBlock(parent_11) || parent_11.kind === 230 /* SourceFile */) { - return parent_11; - } - // A throw-statement is only owned by a try-statement if the try-statement has - // a catch clause, and if the throw-statement occurs within the try block. - if (parent_11.kind === 199 /* TryStatement */) { - var tryStatement = parent_11; - if (tryStatement.tryBlock === child && tryStatement.catchClause) { - return child; - } - } - child = parent_11; - } - return undefined; - } - function aggregateAllBreakAndContinueStatements(node) { - var statementAccumulator = []; - aggregate(node); - return statementAccumulator; - function aggregate(node) { - if (node.kind === 193 /* BreakStatement */ || node.kind === 192 /* ContinueStatement */) { - statementAccumulator.push(node); - } - else if (!ts.isFunctionLike(node)) { - ts.forEachChild(node, aggregate); - } - } - ; - } - function ownsBreakOrContinueStatement(owner, statement) { - var actualOwner = getBreakOrContinueOwner(statement); - return actualOwner && actualOwner === owner; - } - function getBreakOrContinueOwner(statement) { - for (var node_2 = statement.parent; node_2; node_2 = node_2.parent) { - switch (node_2.kind) { - case 196 /* SwitchStatement */: - if (statement.kind === 192 /* ContinueStatement */) { - continue; - } - // Fall through. - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 188 /* WhileStatement */: - case 187 /* DoStatement */: - if (!statement.label || isLabeledBy(node_2, statement.label.text)) { - return node_2; - } - break; - default: - // Don't cross function boundaries. - if (ts.isFunctionLike(node_2)) { - return undefined; - } - break; - } - } - return undefined; - } - function getModifierOccurrences(modifier, declaration) { - var container = declaration.parent; - // Make sure we only highlight the keyword when it makes sense to do so. - if (ts.isAccessibilityModifier(modifier)) { - if (!(container.kind === 204 /* ClassDeclaration */ || - (declaration.kind === 131 /* Parameter */ && hasKind(container, 137 /* Constructor */)))) { - return undefined; - } - } - else if (modifier === 109 /* StaticKeyword */) { - if (container.kind !== 204 /* ClassDeclaration */) { - return undefined; - } - } - else if (modifier === 78 /* ExportKeyword */ || modifier === 115 /* DeclareKeyword */) { - if (!(container.kind === 209 /* ModuleBlock */ || container.kind === 230 /* SourceFile */)) { - return undefined; - } - } - else { - // unsupported modifier - return undefined; - } - var keywords = []; - var modifierFlag = getFlagFromModifier(modifier); - var nodes; - switch (container.kind) { - case 209 /* ModuleBlock */: - case 230 /* SourceFile */: - nodes = container.statements; - break; - case 137 /* Constructor */: - nodes = container.parameters.concat(container.parent.members); - break; - case 204 /* ClassDeclaration */: - nodes = container.members; - // If we're an accessibility modifier, we're in an instance member and should search - // the constructor's parameter list for instance members as well. - if (modifierFlag & 112 /* AccessibilityModifier */) { - var constructor = ts.forEach(container.members, function (member) { - return member.kind === 137 /* Constructor */ && member; - }); - if (constructor) { - nodes = nodes.concat(constructor.parameters); - } - } - break; - default: - ts.Debug.fail("Invalid container kind."); - } - ts.forEach(nodes, function (node) { - if (node.modifiers && node.flags & modifierFlag) { - ts.forEach(node.modifiers, function (child) { return pushKeywordIf(keywords, child, modifier); }); - } - }); - return ts.map(keywords, getHighlightSpanForNode); - function getFlagFromModifier(modifier) { - switch (modifier) { - case 108 /* PublicKeyword */: - return 16 /* Public */; - case 106 /* PrivateKeyword */: - return 32 /* Private */; - case 107 /* ProtectedKeyword */: - return 64 /* Protected */; - case 109 /* StaticKeyword */: - return 128 /* Static */; - case 78 /* ExportKeyword */: - return 1 /* Export */; - case 115 /* DeclareKeyword */: - return 2 /* Ambient */; - default: - ts.Debug.fail(); - } - } - } - function pushKeywordIf(keywordList, token) { - var expected = []; - for (var _i = 2; _i < arguments.length; _i++) { - expected[_i - 2] = arguments[_i]; - } - if (token && ts.contains(expected, token.kind)) { - keywordList.push(token); - return true; - } - return false; - } - function getGetAndSetOccurrences(accessorDeclaration) { - var keywords = []; - tryPushAccessorKeyword(accessorDeclaration.symbol, 138 /* GetAccessor */); - tryPushAccessorKeyword(accessorDeclaration.symbol, 139 /* SetAccessor */); - return ts.map(keywords, getHighlightSpanForNode); - function tryPushAccessorKeyword(accessorSymbol, accessorKind) { - var accessor = ts.getDeclarationOfKind(accessorSymbol, accessorKind); - if (accessor) { - ts.forEach(accessor.getChildren(), function (child) { return pushKeywordIf(keywords, child, 116 /* GetKeyword */, 122 /* SetKeyword */); }); - } - } - } - function getConstructorOccurrences(constructorDeclaration) { - var declarations = constructorDeclaration.symbol.getDeclarations(); - var keywords = []; - ts.forEach(declarations, function (declaration) { - ts.forEach(declaration.getChildren(), function (token) { - return pushKeywordIf(keywords, token, 114 /* ConstructorKeyword */); - }); - }); - return ts.map(keywords, getHighlightSpanForNode); - } - function getLoopBreakContinueOccurrences(loopNode) { - var keywords = []; - if (pushKeywordIf(keywords, loopNode.getFirstToken(), 82 /* ForKeyword */, 100 /* WhileKeyword */, 75 /* DoKeyword */)) { - // If we succeeded and got a do-while loop, then start looking for a 'while' keyword. - if (loopNode.kind === 187 /* DoStatement */) { - var loopTokens = loopNode.getChildren(); - for (var i = loopTokens.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, loopTokens[i], 100 /* WhileKeyword */)) { - break; - } - } - } - } - var breaksAndContinues = aggregateAllBreakAndContinueStatements(loopNode.statement); - ts.forEach(breaksAndContinues, function (statement) { - if (ownsBreakOrContinueStatement(loopNode, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 66 /* BreakKeyword */, 71 /* ContinueKeyword */); - } - }); - return ts.map(keywords, getHighlightSpanForNode); - } - function getBreakOrContinueStatementOccurences(breakOrContinueStatement) { - var owner = getBreakOrContinueOwner(breakOrContinueStatement); - if (owner) { - switch (owner.kind) { - case 189 /* ForStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - case 187 /* DoStatement */: - case 188 /* WhileStatement */: - return getLoopBreakContinueOccurrences(owner); - case 196 /* SwitchStatement */: - return getSwitchCaseDefaultOccurrences(owner); - } - } - return undefined; - } - function getSwitchCaseDefaultOccurrences(switchStatement) { - var keywords = []; - pushKeywordIf(keywords, switchStatement.getFirstToken(), 92 /* SwitchKeyword */); - // Go through each clause in the switch statement, collecting the 'case'/'default' keywords. - ts.forEach(switchStatement.caseBlock.clauses, function (clause) { - pushKeywordIf(keywords, clause.getFirstToken(), 67 /* CaseKeyword */, 73 /* DefaultKeyword */); - var breaksAndContinues = aggregateAllBreakAndContinueStatements(clause); - ts.forEach(breaksAndContinues, function (statement) { - if (ownsBreakOrContinueStatement(switchStatement, statement)) { - pushKeywordIf(keywords, statement.getFirstToken(), 66 /* BreakKeyword */); - } - }); - }); - return ts.map(keywords, getHighlightSpanForNode); - } - function getTryCatchFinallyOccurrences(tryStatement) { - var keywords = []; - pushKeywordIf(keywords, tryStatement.getFirstToken(), 96 /* TryKeyword */); - if (tryStatement.catchClause) { - pushKeywordIf(keywords, tryStatement.catchClause.getFirstToken(), 68 /* CatchKeyword */); - } - if (tryStatement.finallyBlock) { - var finallyKeyword = ts.findChildOfKind(tryStatement, 81 /* FinallyKeyword */, sourceFile); - pushKeywordIf(keywords, finallyKeyword, 81 /* FinallyKeyword */); - } - return ts.map(keywords, getHighlightSpanForNode); - } - function getThrowOccurrences(throwStatement) { - var owner = getThrowStatementOwner(throwStatement); - if (!owner) { - return undefined; - } - var keywords = []; - ts.forEach(aggregateOwnedThrowStatements(owner), function (throwStatement) { - pushKeywordIf(keywords, throwStatement.getFirstToken(), 94 /* ThrowKeyword */); - }); - // If the "owner" is a function, then we equate 'return' and 'throw' statements in their - // ability to "jump out" of the function, and include occurrences for both. - if (ts.isFunctionBlock(owner)) { - ts.forEachReturnStatement(owner, function (returnStatement) { - pushKeywordIf(keywords, returnStatement.getFirstToken(), 90 /* ReturnKeyword */); - }); - } - return ts.map(keywords, getHighlightSpanForNode); - } - function getReturnOccurrences(returnStatement) { - var func = ts.getContainingFunction(returnStatement); - // If we didn't find a containing function with a block body, bail out. - if (!(func && hasKind(func.body, 182 /* Block */))) { - return undefined; - } - var keywords = []; - ts.forEachReturnStatement(func.body, function (returnStatement) { - pushKeywordIf(keywords, returnStatement.getFirstToken(), 90 /* ReturnKeyword */); - }); - // Include 'throw' statements that do not occur within a try block. - ts.forEach(aggregateOwnedThrowStatements(func.body), function (throwStatement) { - pushKeywordIf(keywords, throwStatement.getFirstToken(), 94 /* ThrowKeyword */); - }); - return ts.map(keywords, getHighlightSpanForNode); - } - function getIfElseOccurrences(ifStatement) { - var keywords = []; - // Traverse upwards through all parent if-statements linked by their else-branches. - while (hasKind(ifStatement.parent, 186 /* IfStatement */) && ifStatement.parent.elseStatement === ifStatement) { - ifStatement = ifStatement.parent; - } - // Now traverse back down through the else branches, aggregating if/else keywords of if-statements. - while (ifStatement) { - var children = ifStatement.getChildren(); - pushKeywordIf(keywords, children[0], 84 /* IfKeyword */); - // Generally the 'else' keyword is second-to-last, so we traverse backwards. - for (var i = children.length - 1; i >= 0; i--) { - if (pushKeywordIf(keywords, children[i], 76 /* ElseKeyword */)) { - break; - } - } - if (!hasKind(ifStatement.elseStatement, 186 /* IfStatement */)) { - break; - } - ifStatement = ifStatement.elseStatement; - } - var result = []; - // We'd like to highlight else/ifs together if they are only separated by whitespace - // (i.e. the keywords are separated by no comments, no newlines). - for (var i = 0; i < keywords.length; i++) { - if (keywords[i].kind === 76 /* ElseKeyword */ && i < keywords.length - 1) { - var elseKeyword = keywords[i]; - var ifKeyword = keywords[i + 1]; // this *should* always be an 'if' keyword. - var shouldCombindElseAndIf = true; - // Avoid recalculating getStart() by iterating backwards. - for (var j = ifKeyword.getStart() - 1; j >= elseKeyword.end; j--) { - if (!ts.isWhiteSpace(sourceFile.text.charCodeAt(j))) { - shouldCombindElseAndIf = false; - break; - } - } - if (shouldCombindElseAndIf) { - result.push({ - fileName: fileName, - textSpan: ts.createTextSpanFromBounds(elseKeyword.getStart(), ifKeyword.end), - kind: HighlightSpanKind.reference - }); - i++; // skip the next keyword - continue; - } - } - // Ordinary case: just highlight the keyword. - result.push(getHighlightSpanForNode(keywords[i])); - } - return result; - } - } - } - /// References and Occurrences - function getOccurrencesAtPositionCore(fileName, position) { - synchronizeHostData(); - return convertDocumentHighlights(getDocumentHighlights(fileName, position, [fileName])); - function convertDocumentHighlights(documentHighlights) { - if (!documentHighlights) { - return undefined; - } - var result = []; - for (var _i = 0; _i < documentHighlights.length; _i++) { - var entry = documentHighlights[_i]; - for (var _a = 0, _b = entry.highlightSpans; _a < _b.length; _a++) { - var highlightSpan = _b[_a]; - result.push({ - fileName: entry.fileName, - textSpan: highlightSpan.textSpan, - isWriteAccess: highlightSpan.kind === HighlightSpanKind.writtenReference - }); - } - } - return result; - } - } - function convertReferences(referenceSymbols) { - if (!referenceSymbols) { - return undefined; - } - var referenceEntries = []; - for (var _i = 0; _i < referenceSymbols.length; _i++) { - var referenceSymbol = referenceSymbols[_i]; - ts.addRange(referenceEntries, referenceSymbol.references); - } - return referenceEntries; - } - function findRenameLocations(fileName, position, findInStrings, findInComments) { - var referencedSymbols = findReferencedSymbols(fileName, position, findInStrings, findInComments); - return convertReferences(referencedSymbols); - } - function getReferencesAtPosition(fileName, position) { - var referencedSymbols = findReferencedSymbols(fileName, position, false, false); - return convertReferences(referencedSymbols); - } - function findReferences(fileName, position) { - var referencedSymbols = findReferencedSymbols(fileName, position, false, false); - // Only include referenced symbols that have a valid definition. - return ts.filter(referencedSymbols, function (rs) { return !!rs.definition; }); - } - function findReferencedSymbols(fileName, position, findInStrings, findInComments) { - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - var node = ts.getTouchingPropertyName(sourceFile, position); - if (!node) { - return undefined; - } - if (node.kind !== 65 /* Identifier */ && - // TODO (drosen): This should be enabled in a later release - currently breaks rename. - //node.kind !== SyntaxKind.ThisKeyword && - //node.kind !== SyntaxKind.SuperKeyword && - !isLiteralNameOfPropertyDeclarationOrIndexAccess(node) && - !isNameOfExternalModuleImportOrDeclaration(node)) { - return undefined; - } - ts.Debug.assert(node.kind === 65 /* Identifier */ || node.kind === 7 /* NumericLiteral */ || node.kind === 8 /* StringLiteral */); - return getReferencedSymbolsForNodes(node, program.getSourceFiles(), findInStrings, findInComments); - } - function getReferencedSymbolsForNodes(node, sourceFiles, findInStrings, findInComments) { - var typeChecker = program.getTypeChecker(); - // Labels - if (isLabelName(node)) { - if (isJumpStatementTarget(node)) { - var labelDefinition = getTargetLabel(node.parent, node.text); - // if we have a label definition, look within its statement for references, if not, then - // the label is undefined and we have no results.. - return labelDefinition ? getLabelReferencesInNode(labelDefinition.parent, labelDefinition) : undefined; - } - else { - // it is a label definition and not a target, search within the parent labeledStatement - return getLabelReferencesInNode(node.parent, node); - } - } - if (node.kind === 93 /* ThisKeyword */) { - return getReferencesForThisKeyword(node, sourceFiles); - } - if (node.kind === 91 /* SuperKeyword */) { - return getReferencesForSuperKeyword(node); - } - var symbol = typeChecker.getSymbolAtLocation(node); - // Could not find a symbol e.g. unknown identifier - if (!symbol) { - // Can't have references to something that we have no symbol for. - return undefined; - } - var declarations = symbol.declarations; - // The symbol was an internal symbol and does not have a declaration e.g.undefined symbol - if (!declarations || !declarations.length) { - return undefined; - } - var result; - // Compute the meaning from the location and the symbol it references - var searchMeaning = getIntersectingMeaningFromDeclarations(getMeaningFromLocation(node), declarations); - // Get the text to search for, we need to normalize it as external module names will have quote - var declaredName = getDeclaredName(symbol, node); - // Try to get the smallest valid scope that we can limit our search to; - // otherwise we'll need to search globally (i.e. include each file). - var scope = getSymbolScope(symbol); - // Maps from a symbol ID to the ReferencedSymbol entry in 'result'. - var symbolToIndex = []; - if (scope) { - result = []; - getReferencesInNode(scope, symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result, symbolToIndex); - } - else { - var internedName = getInternedName(symbol, node, declarations); - for (var _i = 0; _i < sourceFiles.length; _i++) { - var sourceFile = sourceFiles[_i]; - cancellationToken.throwIfCancellationRequested(); - var nameTable = getNameTable(sourceFile); - if (ts.lookUp(nameTable, internedName)) { - result = result || []; - getReferencesInNode(sourceFile, symbol, declaredName, node, searchMeaning, findInStrings, findInComments, result, symbolToIndex); - } - } - } - return result; - function getDefinition(symbol) { - var info = getSymbolDisplayPartsDocumentationAndSymbolKind(symbol, node.getSourceFile(), getContainerNode(node), node); - var name = ts.map(info.displayParts, function (p) { return p.text; }).join(""); - var declarations = symbol.declarations; - if (!declarations || declarations.length === 0) { - return undefined; - } - return { - containerKind: "", - containerName: "", - name: name, - kind: info.symbolKind, - fileName: declarations[0].getSourceFile().fileName, - textSpan: ts.createTextSpan(declarations[0].getStart(), 0) - }; - } - function isImportOrExportSpecifierName(location) { - return location.parent && - (location.parent.kind === 216 /* ImportSpecifier */ || location.parent.kind === 220 /* ExportSpecifier */) && - location.parent.propertyName === location; - } - function isImportOrExportSpecifierImportSymbol(symbol) { - return (symbol.flags & 8388608 /* Alias */) && ts.forEach(symbol.declarations, function (declaration) { - return declaration.kind === 216 /* ImportSpecifier */ || declaration.kind === 220 /* ExportSpecifier */; - }); - } - function getDeclaredName(symbol, location) { - // Special case for function expressions, whose names are solely local to their bodies. - var functionExpression = ts.forEach(symbol.declarations, function (d) { return d.kind === 165 /* FunctionExpression */ ? d : undefined; }); - // When a name gets interned into a SourceFile's 'identifiers' Map, - // its name is escaped and stored in the same way its symbol name/identifier - // name should be stored. Function expressions, however, are a special case, - // because despite sometimes having a name, the binder unconditionally binds them - // to a symbol with the name "__function". - var name; - if (functionExpression && functionExpression.name) { - name = functionExpression.name.text; - } - // If this is an export or import specifier it could have been renamed using the as syntax. - // if so we want to search for whatever under the cursor, the symbol is pointing to the alias (name) - // so check for the propertyName. - if (isImportOrExportSpecifierName(location)) { - return location.getText(); - } - name = typeChecker.symbolToString(symbol); - return stripQuotes(name); - } - function getInternedName(symbol, location, declarations) { - // If this is an export or import specifier it could have been renamed using the as syntax. - // if so we want to search for whatever under the cursor, the symbol is pointing to the alias (name) - // so check for the propertyName. - if (isImportOrExportSpecifierName(location)) { - return location.getText(); - } - // Special case for function expressions, whose names are solely local to their bodies. - var functionExpression = ts.forEach(declarations, function (d) { return d.kind === 165 /* FunctionExpression */ ? d : undefined; }); - // When a name gets interned into a SourceFile's 'identifiers' Map, - // its name is escaped and stored in the same way its symbol name/identifier - // name should be stored. Function expressions, however, are a special case, - // because despite sometimes having a name, the binder unconditionally binds them - // to a symbol with the name "__function". - var name = functionExpression && functionExpression.name - ? functionExpression.name.text - : symbol.name; - return stripQuotes(name); - } - function stripQuotes(name) { - var length = name.length; - if (length >= 2 && name.charCodeAt(0) === 34 /* doubleQuote */ && name.charCodeAt(length - 1) === 34 /* doubleQuote */) { - return name.substring(1, length - 1); - } - ; - return name; - } - function getSymbolScope(symbol) { - // If this is private property or method, the scope is the containing class - if (symbol.flags & (4 /* Property */ | 8192 /* Method */)) { - var privateDeclaration = ts.forEach(symbol.getDeclarations(), function (d) { return (d.flags & 32 /* Private */) ? d : undefined; }); - if (privateDeclaration) { - return ts.getAncestor(privateDeclaration, 204 /* ClassDeclaration */); - } - } - // If the symbol is an import we would like to find it if we are looking for what it imports. - // So consider it visibile outside its declaration scope. - if (symbol.flags & 8388608 /* Alias */) { - return undefined; - } - // if this symbol is visible from its parent container, e.g. exported, then bail out - // if symbol correspond to the union property - bail out - if (symbol.parent || (symbol.flags & 268435456 /* UnionProperty */)) { - return undefined; - } - var scope = undefined; - var declarations = symbol.getDeclarations(); - if (declarations) { - for (var _i = 0; _i < declarations.length; _i++) { - var declaration = declarations[_i]; - var container = getContainerNode(declaration); - if (!container) { - return undefined; - } - if (scope && scope !== container) { - // Different declarations have different containers, bail out - return undefined; - } - if (container.kind === 230 /* SourceFile */ && !ts.isExternalModule(container)) { - // This is a global variable and not an external module, any declaration defined - // within this scope is visible outside the file - return undefined; - } - // The search scope is the container node - scope = container; - } - } - return scope; - } - function getPossibleSymbolReferencePositions(sourceFile, symbolName, start, end) { - var positions = []; - /// TODO: Cache symbol existence for files to save text search - // Also, need to make this work for unicode escapes. - // Be resilient in the face of a symbol with no name or zero length name - if (!symbolName || !symbolName.length) { - return positions; - } - var text = sourceFile.text; - var sourceLength = text.length; - var symbolNameLength = symbolName.length; - var position = text.indexOf(symbolName, start); - while (position >= 0) { - cancellationToken.throwIfCancellationRequested(); - // If we are past the end, stop looking - if (position > end) - break; - // We found a match. Make sure it's not part of a larger word (i.e. the char - // before and after it have to be a non-identifier char). - var endPosition = position + symbolNameLength; - if ((position === 0 || !ts.isIdentifierPart(text.charCodeAt(position - 1), 2 /* Latest */)) && - (endPosition === sourceLength || !ts.isIdentifierPart(text.charCodeAt(endPosition), 2 /* Latest */))) { - // Found a real match. Keep searching. - positions.push(position); - } - position = text.indexOf(symbolName, position + symbolNameLength + 1); - } - return positions; - } - function getLabelReferencesInNode(container, targetLabel) { - var references = []; - var sourceFile = container.getSourceFile(); - var labelName = targetLabel.text; - var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container.getStart(), container.getEnd()); - ts.forEach(possiblePositions, function (position) { - cancellationToken.throwIfCancellationRequested(); - var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.getWidth() !== labelName.length) { - return; - } - // Only pick labels that are either the target label, or have a target that is the target label - if (node === targetLabel || - (isJumpStatementTarget(node) && getTargetLabel(node, labelName) === targetLabel)) { - references.push(getReferenceEntryFromNode(node)); - } - }); - var definition = { - containerKind: "", - containerName: "", - fileName: targetLabel.getSourceFile().fileName, - kind: ScriptElementKind.label, - name: labelName, - textSpan: ts.createTextSpanFromBounds(targetLabel.getStart(), targetLabel.getEnd()) - }; - return [{ definition: definition, references: references }]; - } - function isValidReferencePosition(node, searchSymbolName) { - if (node) { - // Compare the length so we filter out strict superstrings of the symbol we are looking for - switch (node.kind) { - case 65 /* Identifier */: - return node.getWidth() === searchSymbolName.length; - case 8 /* StringLiteral */: - if (isLiteralNameOfPropertyDeclarationOrIndexAccess(node) || - isNameOfExternalModuleImportOrDeclaration(node)) { - // For string literals we have two additional chars for the quotes - return node.getWidth() === searchSymbolName.length + 2; - } - break; - case 7 /* NumericLiteral */: - if (isLiteralNameOfPropertyDeclarationOrIndexAccess(node)) { - return node.getWidth() === searchSymbolName.length; - } - break; - } - } - return false; - } - /** Search within node "container" for references for a search value, where the search value is defined as a - * tuple of(searchSymbol, searchText, searchLocation, and searchMeaning). - * searchLocation: a node where the search value - */ - function getReferencesInNode(container, searchSymbol, searchText, searchLocation, searchMeaning, findInStrings, findInComments, result, symbolToIndex) { - var sourceFile = container.getSourceFile(); - var tripleSlashDirectivePrefixRegex = /^\/\/\/\s*= 0) { - var referencedSymbol = getReferencedSymbol(shorthandValueSymbol); - referencedSymbol.references.push(getReferenceEntryFromNode(referenceSymbolDeclaration.name)); - } - } - }); - } - return; - function getReferencedSymbol(symbol) { - var symbolId = ts.getSymbolId(symbol); - var index = symbolToIndex[symbolId]; - if (index === undefined) { - index = result.length; - symbolToIndex[symbolId] = index; - result.push({ - definition: getDefinition(symbol), - references: [] - }); - } - return result[index]; - } - function isInString(position) { - var token = ts.getTokenAtPosition(sourceFile, position); - return token && token.kind === 8 /* StringLiteral */ && position > token.getStart(); - } - function isInComment(position) { - var token = ts.getTokenAtPosition(sourceFile, position); - if (token && position < token.getStart()) { - // First, we have to see if this position actually landed in a comment. - var commentRanges = ts.getLeadingCommentRanges(sourceFile.text, token.pos); - // Then we want to make sure that it wasn't in a "///<" directive comment - // We don't want to unintentionally update a file name. - return ts.forEach(commentRanges, function (c) { - if (c.pos < position && position < c.end) { - var commentText = sourceFile.text.substring(c.pos, c.end); - if (!tripleSlashDirectivePrefixRegex.test(commentText)) { - return true; - } - } - }); - } - return false; - } - } - function getReferencesForSuperKeyword(superKeyword) { - var searchSpaceNode = ts.getSuperContainer(superKeyword, false); - if (!searchSpaceNode) { - return undefined; - } - // Whether 'super' occurs in a static context within a class. - var staticFlag = 128 /* Static */; - switch (searchSpaceNode.kind) { - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - staticFlag &= searchSpaceNode.flags; - searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class - break; - default: - return undefined; - } - var references = []; - var sourceFile = searchSpaceNode.getSourceFile(); - var possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); - ts.forEach(possiblePositions, function (position) { - cancellationToken.throwIfCancellationRequested(); - var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.kind !== 91 /* SuperKeyword */) { - return; - } - var container = ts.getSuperContainer(node, false); - // If we have a 'super' container, we must have an enclosing class. - // Now make sure the owning class is the same as the search-space - // and has the same static qualifier as the original 'super's owner. - if (container && (128 /* Static */ & container.flags) === staticFlag && container.parent.symbol === searchSpaceNode.symbol) { - references.push(getReferenceEntryFromNode(node)); - } - }); - var definition = getDefinition(searchSpaceNode.symbol); - return [{ definition: definition, references: references }]; - } - function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles) { - var searchSpaceNode = ts.getThisContainer(thisOrSuperKeyword, false); - // Whether 'this' occurs in a static context within a class. - var staticFlag = 128 /* Static */; - switch (searchSpaceNode.kind) { - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - if (ts.isObjectLiteralMethod(searchSpaceNode)) { - break; - } - // fall through - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - staticFlag &= searchSpaceNode.flags; - searchSpaceNode = searchSpaceNode.parent; // re-assign to be the owning class - break; - case 230 /* SourceFile */: - if (ts.isExternalModule(searchSpaceNode)) { - return undefined; - } - // Fall through - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - break; - // Computed properties in classes are not handled here because references to this are illegal, - // so there is no point finding references to them. - default: - return undefined; - } - var references = []; - var possiblePositions; - if (searchSpaceNode.kind === 230 /* SourceFile */) { - ts.forEach(sourceFiles, function (sourceFile) { - possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", sourceFile.getStart(), sourceFile.getEnd()); - getThisReferencesInFile(sourceFile, sourceFile, possiblePositions, references); - }); - } - else { - var sourceFile = searchSpaceNode.getSourceFile(); - possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "this", searchSpaceNode.getStart(), searchSpaceNode.getEnd()); - getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, references); - } - return [{ - definition: { - containerKind: "", - containerName: "", - fileName: node.getSourceFile().fileName, - kind: ScriptElementKind.variableElement, - name: "this", - textSpan: ts.createTextSpanFromBounds(node.getStart(), node.getEnd()) - }, - references: references - }]; - function getThisReferencesInFile(sourceFile, searchSpaceNode, possiblePositions, result) { - ts.forEach(possiblePositions, function (position) { - cancellationToken.throwIfCancellationRequested(); - var node = ts.getTouchingWord(sourceFile, position); - if (!node || node.kind !== 93 /* ThisKeyword */) { - return; - } - var container = ts.getThisContainer(node, false); - switch (searchSpaceNode.kind) { - case 165 /* FunctionExpression */: - case 203 /* FunctionDeclaration */: - if (searchSpaceNode.symbol === container.symbol) { - result.push(getReferenceEntryFromNode(node)); - } - break; - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - if (ts.isObjectLiteralMethod(searchSpaceNode) && searchSpaceNode.symbol === container.symbol) { - result.push(getReferenceEntryFromNode(node)); - } - break; - case 204 /* ClassDeclaration */: - // Make sure the container belongs to the same class - // and has the appropriate static modifier from the original container. - if (container.parent && searchSpaceNode.symbol === container.parent.symbol && (container.flags & 128 /* Static */) === staticFlag) { - result.push(getReferenceEntryFromNode(node)); - } - break; - case 230 /* SourceFile */: - if (container.kind === 230 /* SourceFile */ && !ts.isExternalModule(container)) { - result.push(getReferenceEntryFromNode(node)); - } - break; - } - }); - } - } - function populateSearchSymbolSet(symbol, location) { - // The search set contains at least the current symbol - var result = [symbol]; - // If the symbol is an alias, add what it alaises to the list - if (isImportOrExportSpecifierImportSymbol(symbol)) { - result.push(typeChecker.getAliasedSymbol(symbol)); - } - // If the location is in a context sensitive location (i.e. in an object literal) try - // to get a contextual type for it, and add the property symbol from the contextual - // type to the search set - if (isNameOfPropertyAssignment(location)) { - ts.forEach(getPropertySymbolsFromContextualType(location), function (contextualSymbol) { - result.push.apply(result, typeChecker.getRootSymbols(contextualSymbol)); - }); - /* Because in short-hand property assignment, location has two meaning : property name and as value of the property - * When we do findAllReference at the position of the short-hand property assignment, we would want to have references to position of - * property name and variable declaration of the identifier. - * Like in below example, when querying for all references for an identifier 'name', of the property assignment, the language service - * should show both 'name' in 'obj' and 'name' in variable declaration - * let name = "Foo"; - * let obj = { name }; - * In order to do that, we will populate the search set with the value symbol of the identifier as a value of the property assignment - * so that when matching with potential reference symbol, both symbols from property declaration and variable declaration - * will be included correctly. - */ - var shorthandValueSymbol = typeChecker.getShorthandAssignmentValueSymbol(location.parent); - if (shorthandValueSymbol) { - result.push(shorthandValueSymbol); - } - } - // If this is a union property, add all the symbols from all its source symbols in all unioned types. - // If the symbol is an instantiation from a another symbol (e.g. widened symbol) , add the root the list - ts.forEach(typeChecker.getRootSymbols(symbol), function (rootSymbol) { - if (rootSymbol !== symbol) { - result.push(rootSymbol); - } - // Add symbol of properties/methods of the same name in base classes and implemented interfaces definitions - if (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */)) { - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result); - } - }); - return result; - } - function getPropertySymbolsFromBaseTypes(symbol, propertyName, result) { - if (symbol && symbol.flags & (32 /* Class */ | 64 /* Interface */)) { - ts.forEach(symbol.getDeclarations(), function (declaration) { - if (declaration.kind === 204 /* ClassDeclaration */) { - getPropertySymbolFromTypeReference(ts.getClassExtendsHeritageClauseElement(declaration)); - ts.forEach(ts.getClassImplementsHeritageClauseElements(declaration), getPropertySymbolFromTypeReference); - } - else if (declaration.kind === 205 /* InterfaceDeclaration */) { - ts.forEach(ts.getInterfaceBaseTypeNodes(declaration), getPropertySymbolFromTypeReference); - } - }); - } - return; - function getPropertySymbolFromTypeReference(typeReference) { - if (typeReference) { - var type = typeChecker.getTypeAtLocation(typeReference); - if (type) { - var propertySymbol = typeChecker.getPropertyOfType(type, propertyName); - if (propertySymbol) { - result.push(propertySymbol); - } - // Visit the typeReference as well to see if it directly or indirectly use that property - getPropertySymbolsFromBaseTypes(type.symbol, propertyName, result); - } - } - } - } - function getRelatedSymbol(searchSymbols, referenceSymbol, referenceLocation) { - if (searchSymbols.indexOf(referenceSymbol) >= 0) { - return referenceSymbol; - } - // If the reference symbol is an alias, check if what it is aliasing is one of the search - // symbols. - if (isImportOrExportSpecifierImportSymbol(referenceSymbol)) { - var aliasedSymbol = typeChecker.getAliasedSymbol(referenceSymbol); - if (searchSymbols.indexOf(aliasedSymbol) >= 0) { - return aliasedSymbol; - } - } - // If the reference location is in an object literal, try to get the contextual type for the - // object literal, lookup the property symbol in the contextual type, and use this symbol to - // compare to our searchSymbol - if (isNameOfPropertyAssignment(referenceLocation)) { - return ts.forEach(getPropertySymbolsFromContextualType(referenceLocation), function (contextualSymbol) { - return ts.forEach(typeChecker.getRootSymbols(contextualSymbol), function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; }); - }); - } - // Unwrap symbols to get to the root (e.g. transient symbols as a result of widening) - // Or a union property, use its underlying unioned symbols - return ts.forEach(typeChecker.getRootSymbols(referenceSymbol), function (rootSymbol) { - // if it is in the list, then we are done - if (searchSymbols.indexOf(rootSymbol) >= 0) { - return rootSymbol; - } - // Finally, try all properties with the same name in any type the containing type extended or implemented, and - // see if any is in the list - if (rootSymbol.parent && rootSymbol.parent.flags & (32 /* Class */ | 64 /* Interface */)) { - var result_3 = []; - getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.getName(), result_3); - return ts.forEach(result_3, function (s) { return searchSymbols.indexOf(s) >= 0 ? s : undefined; }); - } - return undefined; - }); - } - function getPropertySymbolsFromContextualType(node) { - if (isNameOfPropertyAssignment(node)) { - var objectLiteral = node.parent.parent; - var contextualType = typeChecker.getContextualType(objectLiteral); - var name_31 = node.text; - if (contextualType) { - if (contextualType.flags & 16384 /* Union */) { - // This is a union type, first see if the property we are looking for is a union property (i.e. exists in all types) - // if not, search the constituent types for the property - var unionProperty = contextualType.getProperty(name_31); - if (unionProperty) { - return [unionProperty]; - } - else { - var result_4 = []; - ts.forEach(contextualType.types, function (t) { - var symbol = t.getProperty(name_31); - if (symbol) { - result_4.push(symbol); - } - }); - return result_4; - } - } - else { - var symbol_1 = contextualType.getProperty(name_31); - if (symbol_1) { - return [symbol_1]; - } - } - } - } - return undefined; - } - /** Given an initial searchMeaning, extracted from a location, widen the search scope based on the declarations - * of the corresponding symbol. e.g. if we are searching for "Foo" in value position, but "Foo" references a class - * then we need to widen the search to include type positions as well. - * On the contrary, if we are searching for "Bar" in type position and we trace bar to an interface, and an uninstantiated - * module, we want to keep the search limited to only types, as the two declarations (interface and uninstantiated module) - * do not intersect in any of the three spaces. - */ - function getIntersectingMeaningFromDeclarations(meaning, declarations) { - if (declarations) { - var lastIterationMeaning; - do { - // The result is order-sensitive, for instance if initialMeaning === Namespace, and declarations = [class, instantiated module] - // we need to consider both as they initialMeaning intersects with the module in the namespace space, and the module - // intersects with the class in the value space. - // To achieve that we will keep iterating until the result stabilizes. - // Remember the last meaning - lastIterationMeaning = meaning; - for (var _i = 0; _i < declarations.length; _i++) { - var declaration = declarations[_i]; - var declarationMeaning = getMeaningFromDeclaration(declaration); - if (declarationMeaning & meaning) { - meaning |= declarationMeaning; - } - } - } while (meaning !== lastIterationMeaning); - } - return meaning; - } - } - function getReferenceEntryFromNode(node) { - var start = node.getStart(); - var end = node.getEnd(); - if (node.kind === 8 /* StringLiteral */) { - start += 1; - end -= 1; - } - return { - fileName: node.getSourceFile().fileName, - textSpan: ts.createTextSpanFromBounds(start, end), - isWriteAccess: isWriteAccess(node) - }; - } - /** A node is considered a writeAccess iff it is a name of a declaration or a target of an assignment */ - function isWriteAccess(node) { - if (node.kind === 65 /* Identifier */ && ts.isDeclarationName(node)) { - return true; - } - var parent = node.parent; - if (parent) { - if (parent.kind === 171 /* PostfixUnaryExpression */ || parent.kind === 170 /* PrefixUnaryExpression */) { - return true; - } - else if (parent.kind === 172 /* BinaryExpression */ && parent.left === node) { - var operator = parent.operatorToken.kind; - return 53 /* FirstAssignment */ <= operator && operator <= 64 /* LastAssignment */; - } - } - return false; - } - /// NavigateTo - function getNavigateToItems(searchValue, maxResultCount) { - synchronizeHostData(); - return ts.NavigateTo.getNavigateToItems(program, cancellationToken, searchValue, maxResultCount); - } - function containErrors(diagnostics) { - return ts.forEach(diagnostics, function (diagnostic) { return diagnostic.category === ts.DiagnosticCategory.Error; }); - } - function getEmitOutput(fileName) { - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - var outputFiles = []; - function writeFile(fileName, data, writeByteOrderMark) { - outputFiles.push({ - name: fileName, - writeByteOrderMark: writeByteOrderMark, - text: data - }); - } - var emitOutput = program.emit(sourceFile, writeFile); - return { - outputFiles: outputFiles, - emitSkipped: emitOutput.emitSkipped - }; - } - function getMeaningFromDeclaration(node) { - switch (node.kind) { - case 131 /* Parameter */: - case 201 /* VariableDeclaration */: - case 155 /* BindingElement */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - case 227 /* PropertyAssignment */: - case 228 /* ShorthandPropertyAssignment */: - case 229 /* EnumMember */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 137 /* Constructor */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 203 /* FunctionDeclaration */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - case 226 /* CatchClause */: - return 1 /* Value */; - case 130 /* TypeParameter */: - case 205 /* InterfaceDeclaration */: - case 206 /* TypeAliasDeclaration */: - case 148 /* TypeLiteral */: - return 2 /* Type */; - case 204 /* ClassDeclaration */: - case 207 /* EnumDeclaration */: - return 1 /* Value */ | 2 /* Type */; - case 208 /* ModuleDeclaration */: - if (node.name.kind === 8 /* StringLiteral */) { - return 4 /* Namespace */ | 1 /* Value */; - } - else if (ts.getModuleInstanceState(node) === 1 /* Instantiated */) { - return 4 /* Namespace */ | 1 /* Value */; - } - else { - return 4 /* Namespace */; - } - case 215 /* NamedImports */: - case 216 /* ImportSpecifier */: - case 211 /* ImportEqualsDeclaration */: - case 212 /* ImportDeclaration */: - case 217 /* ExportAssignment */: - case 218 /* ExportDeclaration */: - return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; - // An external module can be a Value - case 230 /* SourceFile */: - return 4 /* Namespace */ | 1 /* Value */; - } - return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; - ts.Debug.fail("Unknown declaration type"); - } - function isTypeReference(node) { - if (ts.isRightSideOfQualifiedNameOrPropertyAccess(node)) { - node = node.parent; - } - return node.parent.kind === 144 /* TypeReference */ || node.parent.kind === 179 /* ExpressionWithTypeArguments */; - } - function isNamespaceReference(node) { - return isQualifiedNameNamespaceReference(node) || isPropertyAccessNamespaceReference(node); - } - function isPropertyAccessNamespaceReference(node) { - var root = node; - var isLastClause = true; - if (root.parent.kind === 158 /* PropertyAccessExpression */) { - while (root.parent && root.parent.kind === 158 /* PropertyAccessExpression */) { - root = root.parent; - } - isLastClause = root.name === node; - } - if (!isLastClause && root.parent.kind === 179 /* ExpressionWithTypeArguments */ && root.parent.parent.kind === 225 /* HeritageClause */) { - var decl = root.parent.parent.parent; - return (decl.kind === 204 /* ClassDeclaration */ && root.parent.parent.token === 102 /* ImplementsKeyword */) || - (decl.kind === 205 /* InterfaceDeclaration */ && root.parent.parent.token === 79 /* ExtendsKeyword */); - } - return false; - } - function isQualifiedNameNamespaceReference(node) { - var root = node; - var isLastClause = true; - if (root.parent.kind === 128 /* QualifiedName */) { - while (root.parent && root.parent.kind === 128 /* QualifiedName */) { - root = root.parent; - } - isLastClause = root.right === node; - } - return root.parent.kind === 144 /* TypeReference */ && !isLastClause; - } - function isInRightSideOfImport(node) { - while (node.parent.kind === 128 /* QualifiedName */) { - node = node.parent; - } - return ts.isInternalModuleImportEqualsDeclaration(node.parent) && node.parent.moduleReference === node; - } - function getMeaningFromRightHandSideOfImportEquals(node) { - ts.Debug.assert(node.kind === 65 /* Identifier */); - // import a = |b|; // Namespace - // import a = |b.c|; // Value, type, namespace - // import a = |b.c|.d; // Namespace - if (node.parent.kind === 128 /* QualifiedName */ && - node.parent.right === node && - node.parent.parent.kind === 211 /* ImportEqualsDeclaration */) { - return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; - } - return 4 /* Namespace */; - } - function getMeaningFromLocation(node) { - if (node.parent.kind === 217 /* ExportAssignment */) { - return 1 /* Value */ | 2 /* Type */ | 4 /* Namespace */; - } - else if (isInRightSideOfImport(node)) { - return getMeaningFromRightHandSideOfImportEquals(node); - } - else if (ts.isDeclarationName(node)) { - return getMeaningFromDeclaration(node.parent); - } - else if (isTypeReference(node)) { - return 2 /* Type */; - } - else if (isNamespaceReference(node)) { - return 4 /* Namespace */; - } - else { - return 1 /* Value */; - } - } - // Signature help - /** - * This is a semantic operation. - */ - function getSignatureHelpItems(fileName, position) { - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - return ts.SignatureHelp.getSignatureHelpItems(program, sourceFile, position, cancellationToken); - } - /// Syntactic features - function getSourceFile(fileName) { - return syntaxTreeCache.getCurrentSourceFile(fileName); - } - function getNameOrDottedNameSpan(fileName, startPos, endPos) { - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - // Get node at the location - var node = ts.getTouchingPropertyName(sourceFile, startPos); - if (!node) { - return; - } - switch (node.kind) { - case 158 /* PropertyAccessExpression */: - case 128 /* QualifiedName */: - case 8 /* StringLiteral */: - case 80 /* FalseKeyword */: - case 95 /* TrueKeyword */: - case 89 /* NullKeyword */: - case 91 /* SuperKeyword */: - case 93 /* ThisKeyword */: - case 65 /* Identifier */: - break; - // Cant create the text span - default: - return; - } - var nodeForStartPos = node; - while (true) { - if (isRightSideOfPropertyAccess(nodeForStartPos) || isRightSideOfQualifiedName(nodeForStartPos)) { - // If on the span is in right side of the the property or qualified name, return the span from the qualified name pos to end of this node - nodeForStartPos = nodeForStartPos.parent; - } - else if (isNameOfModuleDeclaration(nodeForStartPos)) { - // If this is name of a module declarations, check if this is right side of dotted module name - // If parent of the module declaration which is parent of this node is module declaration and its body is the module declaration that this node is name of - // Then this name is name from dotted module - if (nodeForStartPos.parent.parent.kind === 208 /* ModuleDeclaration */ && - nodeForStartPos.parent.parent.body === nodeForStartPos.parent) { - // Use parent module declarations name for start pos - nodeForStartPos = nodeForStartPos.parent.parent.name; - } - else { - // We have to use this name for start pos - break; - } - } - else { - // Is not a member expression so we have found the node for start pos - break; - } - } - return ts.createTextSpanFromBounds(nodeForStartPos.getStart(), node.getEnd()); - } - function getBreakpointStatementAtPosition(fileName, position) { - // doesn't use compiler - no need to synchronize with host - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - return ts.BreakpointResolver.spanInSourceFileAtLocation(sourceFile, position); - } - function getNavigationBarItems(fileName) { - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - return ts.NavigationBar.getNavigationBarItems(sourceFile); - } - function getSemanticClassifications(fileName, span) { - return convertClassifications(getEncodedSemanticClassifications(fileName, span)); - } - function getEncodedSemanticClassifications(fileName, span) { - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - var typeChecker = program.getTypeChecker(); - var result = []; - var classifiableNames = program.getClassifiableNames(); - processNode(sourceFile); - return { spans: result, endOfLineState: 0 /* None */ }; - function pushClassification(start, length, type) { - result.push(start); - result.push(length); - result.push(type); - } - function classifySymbol(symbol, meaningAtPosition) { - var flags = symbol.getFlags(); - if ((flags & 788448 /* Classifiable */) === 0 /* None */) { - return; - } - if (flags & 32 /* Class */) { - return 11 /* className */; - } - else if (flags & 384 /* Enum */) { - return 12 /* enumName */; - } - else if (flags & 524288 /* TypeAlias */) { - return 16 /* typeAliasName */; - } - else if (meaningAtPosition & 2 /* Type */) { - if (flags & 64 /* Interface */) { - return 13 /* interfaceName */; - } - else if (flags & 262144 /* TypeParameter */) { - return 15 /* typeParameterName */; - } - } - else if (flags & 1536 /* Module */) { - // Only classify a module as such if - // - It appears in a namespace context. - // - There exists a module declaration which actually impacts the value side. - if (meaningAtPosition & 4 /* Namespace */ || - (meaningAtPosition & 1 /* Value */ && hasValueSideModule(symbol))) { - return 14 /* moduleName */; - } - } - return undefined; - /** - * Returns true if there exists a module that introduces entities on the value side. - */ - function hasValueSideModule(symbol) { - return ts.forEach(symbol.declarations, function (declaration) { - return declaration.kind === 208 /* ModuleDeclaration */ && ts.getModuleInstanceState(declaration) == 1 /* Instantiated */; - }); - } - } - function processNode(node) { - // Only walk into nodes that intersect the requested span. - if (node && ts.textSpanIntersectsWith(span, node.getFullStart(), node.getFullWidth())) { - if (node.kind === 65 /* Identifier */ && !ts.nodeIsMissing(node)) { - var identifier = node; - // Only bother calling into the typechecker if this is an identifier that - // could possibly resolve to a type name. This makes classification run - // in a third of the time it would normally take. - if (classifiableNames[identifier.text]) { - var symbol = typeChecker.getSymbolAtLocation(node); - if (symbol) { - var type = classifySymbol(symbol, getMeaningFromLocation(node)); - if (type) { - pushClassification(node.getStart(), node.getWidth(), type); - } - } - } - } - ts.forEachChild(node, processNode); - } - } - } - function getClassificationTypeName(type) { - switch (type) { - case 1 /* comment */: return ClassificationTypeNames.comment; - case 2 /* identifier */: return ClassificationTypeNames.identifier; - case 3 /* keyword */: return ClassificationTypeNames.keyword; - case 4 /* numericLiteral */: return ClassificationTypeNames.numericLiteral; - case 5 /* operator */: return ClassificationTypeNames.operator; - case 6 /* stringLiteral */: return ClassificationTypeNames.stringLiteral; - case 8 /* whiteSpace */: return ClassificationTypeNames.whiteSpace; - case 9 /* text */: return ClassificationTypeNames.text; - case 10 /* punctuation */: return ClassificationTypeNames.punctuation; - case 11 /* className */: return ClassificationTypeNames.className; - case 12 /* enumName */: return ClassificationTypeNames.enumName; - case 13 /* interfaceName */: return ClassificationTypeNames.interfaceName; - case 14 /* moduleName */: return ClassificationTypeNames.moduleName; - case 15 /* typeParameterName */: return ClassificationTypeNames.typeParameterName; - case 16 /* typeAliasName */: return ClassificationTypeNames.typeAliasName; - case 17 /* parameterName */: return ClassificationTypeNames.parameterName; - case 18 /* docCommentTagName */: return ClassificationTypeNames.docCommentTagName; - } - } - function convertClassifications(classifications) { - ts.Debug.assert(classifications.spans.length % 3 === 0); - var dense = classifications.spans; - var result = []; - for (var i = 0, n = dense.length; i < n; i += 3) { - result.push({ - textSpan: ts.createTextSpan(dense[i], dense[i + 1]), - classificationType: getClassificationTypeName(dense[i + 2]) - }); - } - return result; - } - function getSyntacticClassifications(fileName, span) { - return convertClassifications(getEncodedSyntacticClassifications(fileName, span)); - } - function getEncodedSyntacticClassifications(fileName, span) { - // doesn't use compiler - no need to synchronize with host - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - // Make a scanner we can get trivia from. - var triviaScanner = ts.createScanner(2 /* Latest */, false, sourceFile.text); - var mergeConflictScanner = ts.createScanner(2 /* Latest */, false, sourceFile.text); - var result = []; - processElement(sourceFile); - return { spans: result, endOfLineState: 0 /* None */ }; - function pushClassification(start, length, type) { - result.push(start); - result.push(length); - result.push(type); - } - function classifyLeadingTrivia(token) { - var tokenStart = ts.skipTrivia(sourceFile.text, token.pos, false); - if (tokenStart === token.pos) { - return; - } - // token has trivia. Classify them appropriately. - triviaScanner.setTextPos(token.pos); - while (true) { - var start = triviaScanner.getTextPos(); - var kind = triviaScanner.scan(); - var end = triviaScanner.getTextPos(); - var width = end - start; - // The moment we get something that isn't trivia, then stop processing. - if (!ts.isTrivia(kind)) { - return; - } - // Only bother with the trivia if it at least intersects the span of interest. - if (ts.textSpanIntersectsWith(span, start, width)) { - if (ts.isComment(kind)) { - classifyComment(token, kind, start, width); - continue; - } - if (kind === 6 /* ConflictMarkerTrivia */) { - var text = sourceFile.text; - var ch = text.charCodeAt(start); - // for the <<<<<<< and >>>>>>> markers, we just add them in as comments - // in the classification stream. - if (ch === 60 /* lessThan */ || ch === 62 /* greaterThan */) { - pushClassification(start, width, 1 /* comment */); - continue; - } - // for the ======== add a comment for the first line, and then lex all - // subsequent lines up until the end of the conflict marker. - ts.Debug.assert(ch === 61 /* equals */); - classifyDisabledMergeCode(text, start, end); - } - } - } - } - function classifyComment(token, kind, start, width) { - if (kind === 3 /* MultiLineCommentTrivia */) { - // See if this is a doc comment. If so, we'll classify certain portions of it - // specially. - var docCommentAndDiagnostics = ts.parseIsolatedJSDocComment(sourceFile.text, start, width); - if (docCommentAndDiagnostics && docCommentAndDiagnostics.jsDocComment) { - docCommentAndDiagnostics.jsDocComment.parent = token; - classifyJSDocComment(docCommentAndDiagnostics.jsDocComment); - return; - } - } - // Simple comment. Just add as is. - pushCommentRange(start, width); - } - function pushCommentRange(start, width) { - pushClassification(start, width, 1 /* comment */); - } - function classifyJSDocComment(docComment) { - var pos = docComment.pos; - for (var _i = 0, _a = docComment.tags; _i < _a.length; _i++) { - var tag = _a[_i]; - // As we walk through each tag, classify the portion of text from the end of - // the last tag (or the start of the entire doc comment) as 'comment'. - if (tag.pos !== pos) { - pushCommentRange(pos, tag.pos - pos); - } - pushClassification(tag.atToken.pos, tag.atToken.end - tag.atToken.pos, 10 /* punctuation */); - pushClassification(tag.tagName.pos, tag.tagName.end - tag.tagName.pos, 18 /* docCommentTagName */); - pos = tag.tagName.end; - switch (tag.kind) { - case 249 /* JSDocParameterTag */: - processJSDocParameterTag(tag); - break; - case 252 /* JSDocTemplateTag */: - processJSDocTemplateTag(tag); - break; - case 251 /* JSDocTypeTag */: - processElement(tag.typeExpression); - break; - case 250 /* JSDocReturnTag */: - processElement(tag.typeExpression); - break; - } - pos = tag.end; - } - if (pos !== docComment.end) { - pushCommentRange(pos, docComment.end - pos); - } - return; - function processJSDocParameterTag(tag) { - if (tag.preParameterName) { - pushCommentRange(pos, tag.preParameterName.pos - pos); - pushClassification(tag.preParameterName.pos, tag.preParameterName.end - tag.preParameterName.pos, 17 /* parameterName */); - pos = tag.preParameterName.end; - } - if (tag.typeExpression) { - pushCommentRange(pos, tag.typeExpression.pos - pos); - processElement(tag.typeExpression); - pos = tag.typeExpression.end; - } - if (tag.postParameterName) { - pushCommentRange(pos, tag.postParameterName.pos - pos); - pushClassification(tag.postParameterName.pos, tag.postParameterName.end - tag.postParameterName.pos, 17 /* parameterName */); - pos = tag.postParameterName.end; - } - } - } - function processJSDocTemplateTag(tag) { - for (var _i = 0, _a = tag.getChildren(); _i < _a.length; _i++) { - var child = _a[_i]; - processElement(child); - } - } - function classifyDisabledMergeCode(text, start, end) { - // Classify the line that the ======= marker is on as a comment. Then just lex - // all further tokens and add them to the result. - for (var i = start; i < end; i++) { - if (ts.isLineBreak(text.charCodeAt(i))) { - break; - } - } - pushClassification(start, i - start, 1 /* comment */); - mergeConflictScanner.setTextPos(i); - while (mergeConflictScanner.getTextPos() < end) { - classifyDisabledCodeToken(); - } - } - function classifyDisabledCodeToken() { - var start = mergeConflictScanner.getTextPos(); - var tokenKind = mergeConflictScanner.scan(); - var end = mergeConflictScanner.getTextPos(); - var type = classifyTokenType(tokenKind); - if (type) { - pushClassification(start, end - start, type); - } - } - function classifyToken(token) { - classifyLeadingTrivia(token); - if (token.getWidth() > 0) { - var type = classifyTokenType(token.kind, token); - if (type) { - pushClassification(token.getStart(), token.getWidth(), type); - } - } - } - // for accurate classification, the actual token should be passed in. however, for - // cases like 'disabled merge code' classification, we just get the token kind and - // classify based on that instead. - function classifyTokenType(tokenKind, token) { - if (ts.isKeyword(tokenKind)) { - return 3 /* keyword */; - } - // Special case < and > If they appear in a generic context they are punctuation, - // not operators. - if (tokenKind === 24 /* LessThanToken */ || tokenKind === 25 /* GreaterThanToken */) { - // If the node owning the token has a type argument list or type parameter list, then - // we can effectively assume that a '<' and '>' belong to those lists. - if (token && ts.getTypeArgumentOrTypeParameterList(token.parent)) { - return 10 /* punctuation */; - } - } - if (ts.isPunctuation(tokenKind)) { - if (token) { - if (tokenKind === 53 /* EqualsToken */) { - // the '=' in a variable declaration is special cased here. - if (token.parent.kind === 201 /* VariableDeclaration */ || - token.parent.kind === 134 /* PropertyDeclaration */ || - token.parent.kind === 131 /* Parameter */) { - return 5 /* operator */; - } - } - if (token.parent.kind === 172 /* BinaryExpression */ || - token.parent.kind === 170 /* PrefixUnaryExpression */ || - token.parent.kind === 171 /* PostfixUnaryExpression */ || - token.parent.kind === 173 /* ConditionalExpression */) { - return 5 /* operator */; - } - } - return 10 /* punctuation */; - } - else if (tokenKind === 7 /* NumericLiteral */) { - return 4 /* numericLiteral */; - } - else if (tokenKind === 8 /* StringLiteral */) { - return 6 /* stringLiteral */; - } - else if (tokenKind === 9 /* RegularExpressionLiteral */) { - // TODO: we should get another classification type for these literals. - return 6 /* stringLiteral */; - } - else if (ts.isTemplateLiteralKind(tokenKind)) { - // TODO (drosen): we should *also* get another classification type for these literals. - return 6 /* stringLiteral */; - } - else if (tokenKind === 65 /* Identifier */) { - if (token) { - switch (token.parent.kind) { - case 204 /* ClassDeclaration */: - if (token.parent.name === token) { - return 11 /* className */; - } - return; - case 130 /* TypeParameter */: - if (token.parent.name === token) { - return 15 /* typeParameterName */; - } - return; - case 205 /* InterfaceDeclaration */: - if (token.parent.name === token) { - return 13 /* interfaceName */; - } - return; - case 207 /* EnumDeclaration */: - if (token.parent.name === token) { - return 12 /* enumName */; - } - return; - case 208 /* ModuleDeclaration */: - if (token.parent.name === token) { - return 14 /* moduleName */; - } - return; - case 131 /* Parameter */: - if (token.parent.name === token) { - return 17 /* parameterName */; - } - return; - } - } - return 9 /* text */; - } - } - function processElement(element) { - if (!element) { - return; - } - // Ignore nodes that don't intersect the original span to classify. - if (ts.textSpanIntersectsWith(span, element.getFullStart(), element.getFullWidth())) { - var children = element.getChildren(sourceFile); - for (var _i = 0; _i < children.length; _i++) { - var child = children[_i]; - if (ts.isToken(child)) { - classifyToken(child); - } - else { - // Recurse into our child nodes. - processElement(child); - } - } - } - } - } - function getOutliningSpans(fileName) { - // doesn't use compiler - no need to synchronize with host - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - return ts.OutliningElementsCollector.collectElements(sourceFile); - } - function getBraceMatchingAtPosition(fileName, position) { - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - var result = []; - var token = ts.getTouchingToken(sourceFile, position); - if (token.getStart(sourceFile) === position) { - var matchKind = getMatchingTokenKind(token); - // Ensure that there is a corresponding token to match ours. - if (matchKind) { - var parentElement = token.parent; - var childNodes = parentElement.getChildren(sourceFile); - for (var _i = 0; _i < childNodes.length; _i++) { - var current = childNodes[_i]; - if (current.kind === matchKind) { - var range1 = ts.createTextSpan(token.getStart(sourceFile), token.getWidth(sourceFile)); - var range2 = ts.createTextSpan(current.getStart(sourceFile), current.getWidth(sourceFile)); - // We want to order the braces when we return the result. - if (range1.start < range2.start) { - result.push(range1, range2); - } - else { - result.push(range2, range1); - } - break; - } - } - } - } - return result; - function getMatchingTokenKind(token) { - switch (token.kind) { - case 14 /* OpenBraceToken */: return 15 /* CloseBraceToken */; - case 16 /* OpenParenToken */: return 17 /* CloseParenToken */; - case 18 /* OpenBracketToken */: return 19 /* CloseBracketToken */; - case 24 /* LessThanToken */: return 25 /* GreaterThanToken */; - case 15 /* CloseBraceToken */: return 14 /* OpenBraceToken */; - case 17 /* CloseParenToken */: return 16 /* OpenParenToken */; - case 19 /* CloseBracketToken */: return 18 /* OpenBracketToken */; - case 25 /* GreaterThanToken */: return 24 /* LessThanToken */; - } - return undefined; - } - } - function getIndentationAtPosition(fileName, position, editorOptions) { - var start = new Date().getTime(); - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - log("getIndentationAtPosition: getCurrentSourceFile: " + (new Date().getTime() - start)); - start = new Date().getTime(); - var result = ts.formatting.SmartIndenter.getIndentation(position, sourceFile, editorOptions); - log("getIndentationAtPosition: computeIndentation : " + (new Date().getTime() - start)); - return result; - } - function getFormattingEditsForRange(fileName, start, end, options) { - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - return ts.formatting.formatSelection(start, end, sourceFile, getRuleProvider(options), options); - } - function getFormattingEditsForDocument(fileName, options) { - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - return ts.formatting.formatDocument(sourceFile, getRuleProvider(options), options); - } - function getFormattingEditsAfterKeystroke(fileName, position, key, options) { - var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); - if (key === "}") { - return ts.formatting.formatOnClosingCurly(position, sourceFile, getRuleProvider(options), options); - } - else if (key === ";") { - return ts.formatting.formatOnSemicolon(position, sourceFile, getRuleProvider(options), options); - } - else if (key === "\n") { - return ts.formatting.formatOnEnter(position, sourceFile, getRuleProvider(options), options); - } - return []; - } - function getTodoComments(fileName, descriptors) { - // Note: while getting todo comments seems like a syntactic operation, we actually - // treat it as a semantic operation here. This is because we expect our host to call - // this on every single file. If we treat this syntactically, then that will cause - // us to populate and throw away the tree in our syntax tree cache for each file. By - // treating this as a semantic operation, we can access any tree without throwing - // anything away. - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - cancellationToken.throwIfCancellationRequested(); - var fileContents = sourceFile.text; - var result = []; - if (descriptors.length > 0) { - var regExp = getTodoCommentsRegExp(); - var matchArray; - while (matchArray = regExp.exec(fileContents)) { - cancellationToken.throwIfCancellationRequested(); - // If we got a match, here is what the match array will look like. Say the source text is: - // - // " // hack 1" - // - // The result array with the regexp: will be: - // - // ["// hack 1", "// ", "hack 1", undefined, "hack"] - // - // Here are the relevant capture groups: - // 0) The full match for the entire regexp. - // 1) The preamble to the message portion. - // 2) The message portion. - // 3...N) The descriptor that was matched - by index. 'undefined' for each - // descriptor that didn't match. an actual value if it did match. - // - // i.e. 'undefined' in position 3 above means TODO(jason) didn't match. - // "hack" in position 4 means HACK did match. - var firstDescriptorCaptureIndex = 3; - ts.Debug.assert(matchArray.length === descriptors.length + firstDescriptorCaptureIndex); - var preamble = matchArray[1]; - var matchPosition = matchArray.index + preamble.length; - // OK, we have found a match in the file. This is only an acceptable match if - // it is contained within a comment. - var token = ts.getTokenAtPosition(sourceFile, matchPosition); - if (!isInsideComment(sourceFile, token, matchPosition)) { - continue; - } - var descriptor = undefined; - for (var i = 0, n = descriptors.length; i < n; i++) { - if (matchArray[i + firstDescriptorCaptureIndex]) { - descriptor = descriptors[i]; - } - } - ts.Debug.assert(descriptor !== undefined); - // We don't want to match something like 'TODOBY', so we make sure a non - // letter/digit follows the match. - if (isLetterOrDigit(fileContents.charCodeAt(matchPosition + descriptor.text.length))) { - continue; - } - var message = matchArray[2]; - result.push({ - descriptor: descriptor, - message: message, - position: matchPosition - }); - } - } - return result; - function escapeRegExp(str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); - } - function getTodoCommentsRegExp() { - // NOTE: ?: means 'non-capture group'. It allows us to have groups without having to - // filter them out later in the final result array. - // TODO comments can appear in one of the following forms: - // - // 1) // TODO or /////////// TODO - // - // 2) /* TODO or /********** TODO - // - // 3) /* - // * TODO - // */ - // - // The following three regexps are used to match the start of the text up to the TODO - // comment portion. - var singleLineCommentStart = /(?:\/\/+\s*)/.source; - var multiLineCommentStart = /(?:\/\*+\s*)/.source; - var anyNumberOfSpacesAndAsterixesAtStartOfLine = /(?:^(?:\s|\*)*)/.source; - // Match any of the above three TODO comment start regexps. - // Note that the outermost group *is* a capture group. We want to capture the preamble - // so that we can determine the starting position of the TODO comment match. - var preamble = "(" + anyNumberOfSpacesAndAsterixesAtStartOfLine + "|" + singleLineCommentStart + "|" + multiLineCommentStart + ")"; - // Takes the descriptors and forms a regexp that matches them as if they were literals. - // For example, if the descriptors are "TODO(jason)" and "HACK", then this will be: - // - // (?:(TODO\(jason\))|(HACK)) - // - // Note that the outermost group is *not* a capture group, but the innermost groups - // *are* capture groups. By capturing the inner literals we can determine after - // matching which descriptor we are dealing with. - var literals = "(?:" + ts.map(descriptors, function (d) { return "(" + escapeRegExp(d.text) + ")"; }).join("|") + ")"; - // After matching a descriptor literal, the following regexp matches the rest of the - // text up to the end of the line (or */). - var endOfLineOrEndOfComment = /(?:$|\*\/)/.source; - var messageRemainder = /(?:.*?)/.source; - // This is the portion of the match we'll return as part of the TODO comment result. We - // match the literal portion up to the end of the line or end of comment. - var messagePortion = "(" + literals + messageRemainder + ")"; - var regExpString = preamble + messagePortion + endOfLineOrEndOfComment; - // The final regexp will look like this: - // /((?:\/\/+\s*)|(?:\/\*+\s*)|(?:^(?:\s|\*)*))((?:(TODO\(jason\))|(HACK))(?:.*?))(?:$|\*\/)/gim - // The flags of the regexp are important here. - // 'g' is so that we are doing a global search and can find matches several times - // in the input. - // - // 'i' is for case insensitivity (We do this to match C# TODO comment code). - // - // 'm' is so we can find matches in a multi-line input. - return new RegExp(regExpString, "gim"); - } - function isLetterOrDigit(char) { - return (char >= 97 /* a */ && char <= 122 /* z */) || - (char >= 65 /* A */ && char <= 90 /* Z */) || - (char >= 48 /* _0 */ && char <= 57 /* _9 */); - } - } - function getRenameInfo(fileName, position) { - synchronizeHostData(); - var sourceFile = getValidSourceFile(fileName); - var typeChecker = program.getTypeChecker(); - var node = ts.getTouchingWord(sourceFile, position); - // Can only rename an identifier. - if (node && node.kind === 65 /* Identifier */) { - var symbol = typeChecker.getSymbolAtLocation(node); - // Only allow a symbol to be renamed if it actually has at least one declaration. - if (symbol) { - var declarations = symbol.getDeclarations(); - if (declarations && declarations.length > 0) { - // Disallow rename for elements that are defined in the standard TypeScript library. - var defaultLibFileName = host.getDefaultLibFileName(host.getCompilationSettings()); - if (defaultLibFileName) { - for (var _i = 0; _i < declarations.length; _i++) { - var current = declarations[_i]; - var sourceFile_2 = current.getSourceFile(); - if (sourceFile_2 && getCanonicalFileName(ts.normalizePath(sourceFile_2.fileName)) === getCanonicalFileName(ts.normalizePath(defaultLibFileName))) { - return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library.key)); - } - } - } - var kind = getSymbolKind(symbol, node); - if (kind) { - return { - canRename: true, - localizedErrorMessage: undefined, - displayName: symbol.name, - fullDisplayName: typeChecker.getFullyQualifiedName(symbol), - kind: kind, - kindModifiers: getSymbolModifiers(symbol), - triggerSpan: ts.createTextSpan(node.getStart(), node.getWidth()) - }; - } - } - } - } - return getRenameInfoError(ts.getLocaleSpecificMessage(ts.Diagnostics.You_cannot_rename_this_element.key)); - function getRenameInfoError(localizedErrorMessage) { - return { - canRename: false, - localizedErrorMessage: localizedErrorMessage, - displayName: undefined, - fullDisplayName: undefined, - kind: undefined, - kindModifiers: undefined, - triggerSpan: undefined - }; - } - } - return { - dispose: dispose, - cleanupSemanticCache: cleanupSemanticCache, - getSyntacticDiagnostics: getSyntacticDiagnostics, - getSemanticDiagnostics: getSemanticDiagnostics, - getCompilerOptionsDiagnostics: getCompilerOptionsDiagnostics, - getSyntacticClassifications: getSyntacticClassifications, - getSemanticClassifications: getSemanticClassifications, - getEncodedSyntacticClassifications: getEncodedSyntacticClassifications, - getEncodedSemanticClassifications: getEncodedSemanticClassifications, - getCompletionsAtPosition: getCompletionsAtPosition, - getCompletionEntryDetails: getCompletionEntryDetails, - getSignatureHelpItems: getSignatureHelpItems, - getQuickInfoAtPosition: getQuickInfoAtPosition, - getDefinitionAtPosition: getDefinitionAtPosition, - getTypeDefinitionAtPosition: getTypeDefinitionAtPosition, - getReferencesAtPosition: getReferencesAtPosition, - findReferences: findReferences, - getOccurrencesAtPosition: getOccurrencesAtPosition, - getDocumentHighlights: getDocumentHighlights, - getNameOrDottedNameSpan: getNameOrDottedNameSpan, - getBreakpointStatementAtPosition: getBreakpointStatementAtPosition, - getNavigateToItems: getNavigateToItems, - getRenameInfo: getRenameInfo, - findRenameLocations: findRenameLocations, - getNavigationBarItems: getNavigationBarItems, - getOutliningSpans: getOutliningSpans, - getTodoComments: getTodoComments, - getBraceMatchingAtPosition: getBraceMatchingAtPosition, - getIndentationAtPosition: getIndentationAtPosition, - getFormattingEditsForRange: getFormattingEditsForRange, - getFormattingEditsForDocument: getFormattingEditsForDocument, - getFormattingEditsAfterKeystroke: getFormattingEditsAfterKeystroke, - getEmitOutput: getEmitOutput, - getSourceFile: getSourceFile, - getProgram: getProgram - }; - } - ts.createLanguageService = createLanguageService; - /* @internal */ - function getNameTable(sourceFile) { - if (!sourceFile.nameTable) { - initializeNameTable(sourceFile); - } - return sourceFile.nameTable; - } - ts.getNameTable = getNameTable; - function initializeNameTable(sourceFile) { - var nameTable = {}; - walk(sourceFile); - sourceFile.nameTable = nameTable; - function walk(node) { - switch (node.kind) { - case 65 /* Identifier */: - nameTable[node.text] = node.text; - break; - case 8 /* StringLiteral */: - case 7 /* NumericLiteral */: - // We want to store any numbers/strings if they were a name that could be - // related to a declaration. So, if we have 'import x = require("something")' - // then we want 'something' to be in the name table. Similarly, if we have - // "a['propname']" then we want to store "propname" in the name table. - if (ts.isDeclarationName(node) || - node.parent.kind === 222 /* ExternalModuleReference */ || - isArgumentOfElementAccessExpression(node)) { - nameTable[node.text] = node.text; - } - break; - default: - ts.forEachChild(node, walk); - } - } - } - function isArgumentOfElementAccessExpression(node) { - return node && - node.parent && - node.parent.kind === 159 /* ElementAccessExpression */ && - node.parent.argumentExpression === node; - } - /// Classifier - function createClassifier() { - var scanner = ts.createScanner(2 /* Latest */, false); - /// We do not have a full parser support to know when we should parse a regex or not - /// If we consider every slash token to be a regex, we could be missing cases like "1/2/3", where - /// we have a series of divide operator. this list allows us to be more accurate by ruling out - /// locations where a regexp cannot exist. - var noRegexTable = []; - noRegexTable[65 /* Identifier */] = true; - noRegexTable[8 /* StringLiteral */] = true; - noRegexTable[7 /* NumericLiteral */] = true; - noRegexTable[9 /* RegularExpressionLiteral */] = true; - noRegexTable[93 /* ThisKeyword */] = true; - noRegexTable[38 /* PlusPlusToken */] = true; - noRegexTable[39 /* MinusMinusToken */] = true; - noRegexTable[17 /* CloseParenToken */] = true; - noRegexTable[19 /* CloseBracketToken */] = true; - noRegexTable[15 /* CloseBraceToken */] = true; - noRegexTable[95 /* TrueKeyword */] = true; - noRegexTable[80 /* FalseKeyword */] = true; - // Just a stack of TemplateHeads and OpenCurlyBraces, used to perform rudimentary (inexact) - // classification on template strings. Because of the context free nature of templates, - // the only precise way to classify a template portion would be by propagating the stack across - // lines, just as we do with the end-of-line state. However, this is a burden for implementers, - // and the behavior is entirely subsumed by the syntactic classifier anyway, so we instead - // flatten any nesting when the template stack is non-empty and encode it in the end-of-line state. - // Situations in which this fails are - // 1) When template strings are nested across different lines: - // `hello ${ `world - // ` }` - // - // Where on the second line, you will get the closing of a template, - // a closing curly, and a new template. - // - // 2) When substitution expressions have curly braces and the curly brace falls on the next line: - // `hello ${ () => { - // return "world" } } ` - // - // Where on the second line, you will get the 'return' keyword, - // a string literal, and a template end consisting of '} } `'. - var templateStack = []; - /** Returns true if 'keyword2' can legally follow 'keyword1' in any language construct. */ - function canFollow(keyword1, keyword2) { - if (ts.isAccessibilityModifier(keyword1)) { - if (keyword2 === 116 /* GetKeyword */ || - keyword2 === 122 /* SetKeyword */ || - keyword2 === 114 /* ConstructorKeyword */ || - keyword2 === 109 /* StaticKeyword */) { - // Allow things like "public get", "public constructor" and "public static". - // These are all legal. - return true; - } - // Any other keyword following "public" is actually an identifier an not a real - // keyword. - return false; - } - // Assume any other keyword combination is legal. This can be refined in the future - // if there are more cases we want the classifier to be better at. - return true; - } - function convertClassifications(classifications, text) { - var entries = []; - var dense = classifications.spans; - var lastEnd = 0; - for (var i = 0, n = dense.length; i < n; i += 3) { - var start = dense[i]; - var length_2 = dense[i + 1]; - var type = dense[i + 2]; - // Make a whitespace entry between the last item and this one. - if (lastEnd >= 0) { - var whitespaceLength_1 = start - lastEnd; - if (whitespaceLength_1 > 0) { - entries.push({ length: whitespaceLength_1, classification: TokenClass.Whitespace }); - } - } - entries.push({ length: length_2, classification: convertClassification(type) }); - lastEnd = start + length_2; - } - var whitespaceLength = text.length - lastEnd; - if (whitespaceLength > 0) { - entries.push({ length: whitespaceLength, classification: TokenClass.Whitespace }); - } - return { entries: entries, finalLexState: classifications.endOfLineState }; - } - function convertClassification(type) { - switch (type) { - case 1 /* comment */: return TokenClass.Comment; - case 3 /* keyword */: return TokenClass.Keyword; - case 4 /* numericLiteral */: return TokenClass.NumberLiteral; - case 5 /* operator */: return TokenClass.Operator; - case 6 /* stringLiteral */: return TokenClass.StringLiteral; - case 8 /* whiteSpace */: return TokenClass.Whitespace; - case 10 /* punctuation */: return TokenClass.Punctuation; - case 2 /* identifier */: - case 11 /* className */: - case 12 /* enumName */: - case 13 /* interfaceName */: - case 14 /* moduleName */: - case 15 /* typeParameterName */: - case 16 /* typeAliasName */: - case 9 /* text */: - case 17 /* parameterName */: - default: - return TokenClass.Identifier; - } - } - function getClassificationsForLine(text, lexState, syntacticClassifierAbsent) { - return convertClassifications(getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent), text); - } - // If there is a syntactic classifier ('syntacticClassifierAbsent' is false), - // we will be more conservative in order to avoid conflicting with the syntactic classifier. - function getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent) { - var offset = 0; - var token = 0 /* Unknown */; - var lastNonTriviaToken = 0 /* Unknown */; - // Empty out the template stack for reuse. - while (templateStack.length > 0) { - templateStack.pop(); - } - // If we're in a string literal, then prepend: "\ - // (and a newline). That way when we lex we'll think we're still in a string literal. - // - // If we're in a multiline comment, then prepend: /* - // (and a newline). That way when we lex we'll think we're still in a multiline comment. - switch (lexState) { - case 3 /* InDoubleQuoteStringLiteral */: - text = '"\\\n' + text; - offset = 3; - break; - case 2 /* InSingleQuoteStringLiteral */: - text = "'\\\n" + text; - offset = 3; - break; - case 1 /* InMultiLineCommentTrivia */: - text = "/*\n" + text; - offset = 3; - break; - case 4 /* InTemplateHeadOrNoSubstitutionTemplate */: - text = "`\n" + text; - offset = 2; - break; - case 5 /* InTemplateMiddleOrTail */: - text = "}\n" + text; - offset = 2; - // fallthrough - case 6 /* InTemplateSubstitutionPosition */: - templateStack.push(11 /* TemplateHead */); - break; - } - scanner.setText(text); - var result = { - endOfLineState: 0 /* None */, - spans: [] - }; - // We can run into an unfortunate interaction between the lexical and syntactic classifier - // when the user is typing something generic. Consider the case where the user types: - // - // Foo tokens. It's a weak heuristic, but should - // work well enough in practice. - var angleBracketStack = 0; - do { - token = scanner.scan(); - if (!ts.isTrivia(token)) { - if ((token === 36 /* SlashToken */ || token === 57 /* SlashEqualsToken */) && !noRegexTable[lastNonTriviaToken]) { - if (scanner.reScanSlashToken() === 9 /* RegularExpressionLiteral */) { - token = 9 /* RegularExpressionLiteral */; - } - } - else if (lastNonTriviaToken === 20 /* DotToken */ && isKeyword(token)) { - token = 65 /* Identifier */; - } - else if (isKeyword(lastNonTriviaToken) && isKeyword(token) && !canFollow(lastNonTriviaToken, token)) { - // We have two keywords in a row. Only treat the second as a keyword if - // it's a sequence that could legally occur in the language. Otherwise - // treat it as an identifier. This way, if someone writes "private var" - // we recognize that 'var' is actually an identifier here. - token = 65 /* Identifier */; - } - else if (lastNonTriviaToken === 65 /* Identifier */ && - token === 24 /* LessThanToken */) { - // Could be the start of something generic. Keep track of that by bumping - // up the current count of generic contexts we may be in. - angleBracketStack++; - } - else if (token === 25 /* GreaterThanToken */ && angleBracketStack > 0) { - // If we think we're currently in something generic, then mark that that - // generic entity is complete. - angleBracketStack--; - } - else if (token === 112 /* AnyKeyword */ || - token === 123 /* StringKeyword */ || - token === 121 /* NumberKeyword */ || - token === 113 /* BooleanKeyword */ || - token === 124 /* SymbolKeyword */) { - if (angleBracketStack > 0 && !syntacticClassifierAbsent) { - // If it looks like we're could be in something generic, don't classify this - // as a keyword. We may just get overwritten by the syntactic classifier, - // causing a noisy experience for the user. - token = 65 /* Identifier */; - } - } - else if (token === 11 /* TemplateHead */) { - templateStack.push(token); - } - else if (token === 14 /* OpenBraceToken */) { - // If we don't have anything on the template stack, - // then we aren't trying to keep track of a previously scanned template head. - if (templateStack.length > 0) { - templateStack.push(token); - } - } - else if (token === 15 /* CloseBraceToken */) { - // If we don't have anything on the template stack, - // then we aren't trying to keep track of a previously scanned template head. - if (templateStack.length > 0) { - var lastTemplateStackToken = ts.lastOrUndefined(templateStack); - if (lastTemplateStackToken === 11 /* TemplateHead */) { - token = scanner.reScanTemplateToken(); - // Only pop on a TemplateTail; a TemplateMiddle indicates there is more for us. - if (token === 13 /* TemplateTail */) { - templateStack.pop(); - } - else { - ts.Debug.assert(token === 12 /* TemplateMiddle */, "Should have been a template middle. Was " + token); - } - } - else { - ts.Debug.assert(lastTemplateStackToken === 14 /* OpenBraceToken */, "Should have been an open brace. Was: " + token); - templateStack.pop(); - } - } - } - lastNonTriviaToken = token; - } - processToken(); - } while (token !== 1 /* EndOfFileToken */); - return result; - function processToken() { - var start = scanner.getTokenPos(); - var end = scanner.getTextPos(); - addResult(start, end, classFromKind(token)); - if (end >= text.length) { - if (token === 8 /* StringLiteral */) { - // Check to see if we finished up on a multiline string literal. - var tokenText = scanner.getTokenText(); - if (scanner.isUnterminated()) { - var lastCharIndex = tokenText.length - 1; - var numBackslashes = 0; - while (tokenText.charCodeAt(lastCharIndex - numBackslashes) === 92 /* backslash */) { - numBackslashes++; - } - // If we have an odd number of backslashes, then the multiline string is unclosed - if (numBackslashes & 1) { - var quoteChar = tokenText.charCodeAt(0); - result.endOfLineState = quoteChar === 34 /* doubleQuote */ - ? 3 /* InDoubleQuoteStringLiteral */ - : 2 /* InSingleQuoteStringLiteral */; - } - } - } - else if (token === 3 /* MultiLineCommentTrivia */) { - // Check to see if the multiline comment was unclosed. - if (scanner.isUnterminated()) { - result.endOfLineState = 1 /* InMultiLineCommentTrivia */; - } - } - else if (ts.isTemplateLiteralKind(token)) { - if (scanner.isUnterminated()) { - if (token === 13 /* TemplateTail */) { - result.endOfLineState = 5 /* InTemplateMiddleOrTail */; - } - else if (token === 10 /* NoSubstitutionTemplateLiteral */) { - result.endOfLineState = 4 /* InTemplateHeadOrNoSubstitutionTemplate */; - } - else { - ts.Debug.fail("Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #" + token); - } - } - } - else if (templateStack.length > 0 && ts.lastOrUndefined(templateStack) === 11 /* TemplateHead */) { - result.endOfLineState = 6 /* InTemplateSubstitutionPosition */; - } - } - } - function addResult(start, end, classification) { - if (classification === 8 /* whiteSpace */) { - // Don't bother with whitespace classifications. They're not needed. - return; - } - if (start === 0 && offset > 0) { - // We're classifying the first token, and this was a case where we prepended - // text. We should consider the start of this token to be at the start of - // the original text. - start += offset; - } - // All our tokens are in relation to the augmented text. Move them back to be - // relative to the original text. - start -= offset; - end -= offset; - var length = end - start; - if (length > 0) { - result.spans.push(start); - result.spans.push(length); - result.spans.push(classification); - } - } - } - function isBinaryExpressionOperatorToken(token) { - switch (token) { - case 35 /* AsteriskToken */: - case 36 /* SlashToken */: - case 37 /* PercentToken */: - case 33 /* PlusToken */: - case 34 /* MinusToken */: - case 40 /* LessThanLessThanToken */: - case 41 /* GreaterThanGreaterThanToken */: - case 42 /* GreaterThanGreaterThanGreaterThanToken */: - case 24 /* LessThanToken */: - case 25 /* GreaterThanToken */: - case 26 /* LessThanEqualsToken */: - case 27 /* GreaterThanEqualsToken */: - case 87 /* InstanceOfKeyword */: - case 86 /* InKeyword */: - case 28 /* EqualsEqualsToken */: - case 29 /* ExclamationEqualsToken */: - case 30 /* EqualsEqualsEqualsToken */: - case 31 /* ExclamationEqualsEqualsToken */: - case 43 /* AmpersandToken */: - case 45 /* CaretToken */: - case 44 /* BarToken */: - case 48 /* AmpersandAmpersandToken */: - case 49 /* BarBarToken */: - case 63 /* BarEqualsToken */: - case 62 /* AmpersandEqualsToken */: - case 64 /* CaretEqualsToken */: - case 59 /* LessThanLessThanEqualsToken */: - case 60 /* GreaterThanGreaterThanEqualsToken */: - case 61 /* GreaterThanGreaterThanGreaterThanEqualsToken */: - case 54 /* PlusEqualsToken */: - case 55 /* MinusEqualsToken */: - case 56 /* AsteriskEqualsToken */: - case 57 /* SlashEqualsToken */: - case 58 /* PercentEqualsToken */: - case 53 /* EqualsToken */: - case 23 /* CommaToken */: - return true; - default: - return false; - } - } - function isPrefixUnaryExpressionOperatorToken(token) { - switch (token) { - case 33 /* PlusToken */: - case 34 /* MinusToken */: - case 47 /* TildeToken */: - case 46 /* ExclamationToken */: - case 38 /* PlusPlusToken */: - case 39 /* MinusMinusToken */: - return true; - default: - return false; - } - } - function isKeyword(token) { - return token >= 66 /* FirstKeyword */ && token <= 127 /* LastKeyword */; - } - function classFromKind(token) { - if (isKeyword(token)) { - return 3 /* keyword */; - } - else if (isBinaryExpressionOperatorToken(token) || isPrefixUnaryExpressionOperatorToken(token)) { - return 5 /* operator */; - } - else if (token >= 14 /* FirstPunctuation */ && token <= 64 /* LastPunctuation */) { - return 10 /* punctuation */; - } - switch (token) { - case 7 /* NumericLiteral */: - return 4 /* numericLiteral */; - case 8 /* StringLiteral */: - return 6 /* stringLiteral */; - case 9 /* RegularExpressionLiteral */: - return 7 /* regularExpressionLiteral */; - case 6 /* ConflictMarkerTrivia */: - case 3 /* MultiLineCommentTrivia */: - case 2 /* SingleLineCommentTrivia */: - return 1 /* comment */; - case 5 /* WhitespaceTrivia */: - case 4 /* NewLineTrivia */: - return 8 /* whiteSpace */; - case 65 /* Identifier */: - default: - if (ts.isTemplateLiteralKind(token)) { - return 6 /* stringLiteral */; - } - return 2 /* identifier */; - } - } - return { - getClassificationsForLine: getClassificationsForLine, - getEncodedLexicalClassifications: getEncodedLexicalClassifications - }; - } - ts.createClassifier = createClassifier; - /** - * Get the path of the default library file (lib.d.ts) as distributed with the typescript - * node package. - * The functionality is not supported if the ts module is consumed outside of a node module. - */ - function getDefaultLibFilePath(options) { - // Check __dirname is defined and that we are on a node.js system. - if (typeof __dirname !== "undefined") { - return __dirname + ts.directorySeparator + ts.getDefaultLibFileName(options); - } - throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. "); - } - ts.getDefaultLibFilePath = getDefaultLibFilePath; - function initializeServices() { - ts.objectAllocator = { - getNodeConstructor: function (kind) { - function Node() { - } - var proto = kind === 230 /* SourceFile */ ? new SourceFileObject() : new NodeObject(); - proto.kind = kind; - proto.pos = 0; - proto.end = 0; - proto.flags = 0; - proto.parent = undefined; - Node.prototype = proto; - return Node; - }, - getSymbolConstructor: function () { return SymbolObject; }, - getTypeConstructor: function () { return TypeObject; }, - getSignatureConstructor: function () { return SignatureObject; } - }; - } - initializeServices(); -})(ts || (ts = {})); -// Copyright (c) Microsoft. All rights reserved. Licensed under the Apache License, Version 2.0. -// See LICENSE.txt in the project root for complete license information. -/// -/* @internal */ -var ts; -(function (ts) { - var BreakpointResolver; - (function (BreakpointResolver) { - /** - * Get the breakpoint span in given sourceFile - */ - function spanInSourceFileAtLocation(sourceFile, position) { - // Cannot set breakpoint in dts file - if (sourceFile.flags & 2048 /* DeclarationFile */) { - return undefined; - } - var tokenAtLocation = ts.getTokenAtPosition(sourceFile, position); - var lineOfPosition = sourceFile.getLineAndCharacterOfPosition(position).line; - if (sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getStart()).line > lineOfPosition) { - // Get previous token if the token is returned starts on new line - // eg: let x =10; |--- cursor is here - // let y = 10; - // token at position will return let keyword on second line as the token but we would like to use - // token on same line if trailing trivia (comments or white spaces on same line) part of the last token on that line - tokenAtLocation = ts.findPrecedingToken(tokenAtLocation.pos, sourceFile); - // Its a blank line - if (!tokenAtLocation || sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getEnd()).line !== lineOfPosition) { - return undefined; - } - } - // Cannot set breakpoint in ambient declarations - if (ts.isInAmbientContext(tokenAtLocation)) { - return undefined; - } - // Get the span in the node based on its syntax - return spanInNode(tokenAtLocation); - function textSpan(startNode, endNode) { - return ts.createTextSpanFromBounds(startNode.getStart(), (endNode || startNode).getEnd()); - } - function spanInNodeIfStartsOnSameLine(node, otherwiseOnNode) { - if (node && lineOfPosition === sourceFile.getLineAndCharacterOfPosition(node.getStart()).line) { - return spanInNode(node); - } - return spanInNode(otherwiseOnNode); - } - function spanInPreviousNode(node) { - return spanInNode(ts.findPrecedingToken(node.pos, sourceFile)); - } - function spanInNextNode(node) { - return spanInNode(ts.findNextToken(node, node.parent)); - } - function spanInNode(node) { - if (node) { - if (ts.isExpression(node)) { - if (node.parent.kind === 187 /* DoStatement */) { - // Set span as if on while keyword - return spanInPreviousNode(node); - } - if (node.parent.kind === 189 /* ForStatement */) { - // For now lets set the span on this expression, fix it later - return textSpan(node); - } - if (node.parent.kind === 172 /* BinaryExpression */ && node.parent.operatorToken.kind === 23 /* CommaToken */) { - // if this is comma expression, the breakpoint is possible in this expression - return textSpan(node); - } - if (node.parent.kind == 166 /* ArrowFunction */ && node.parent.body == node) { - // If this is body of arrow function, it is allowed to have the breakpoint - return textSpan(node); - } - } - switch (node.kind) { - case 183 /* VariableStatement */: - // Span on first variable declaration - return spanInVariableDeclaration(node.declarationList.declarations[0]); - case 201 /* VariableDeclaration */: - case 134 /* PropertyDeclaration */: - case 133 /* PropertySignature */: - return spanInVariableDeclaration(node); - case 131 /* Parameter */: - return spanInParameterDeclaration(node); - case 203 /* FunctionDeclaration */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 137 /* Constructor */: - case 165 /* FunctionExpression */: - case 166 /* ArrowFunction */: - return spanInFunctionDeclaration(node); - case 182 /* Block */: - if (ts.isFunctionBlock(node)) { - return spanInFunctionBlock(node); - } - // Fall through - case 209 /* ModuleBlock */: - return spanInBlock(node); - case 226 /* CatchClause */: - return spanInBlock(node.block); - case 185 /* ExpressionStatement */: - // span on the expression - return textSpan(node.expression); - case 194 /* ReturnStatement */: - // span on return keyword and expression if present - return textSpan(node.getChildAt(0), node.expression); - case 188 /* WhileStatement */: - // Span on while(...) - return textSpan(node, ts.findNextToken(node.expression, node)); - case 187 /* DoStatement */: - // span in statement of the do statement - return spanInNode(node.statement); - case 200 /* DebuggerStatement */: - // span on debugger keyword - return textSpan(node.getChildAt(0)); - case 186 /* IfStatement */: - // set on if(..) span - return textSpan(node, ts.findNextToken(node.expression, node)); - case 197 /* LabeledStatement */: - // span in statement - return spanInNode(node.statement); - case 193 /* BreakStatement */: - case 192 /* ContinueStatement */: - // On break or continue keyword and label if present - return textSpan(node.getChildAt(0), node.label); - case 189 /* ForStatement */: - return spanInForStatement(node); - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - // span on for (a in ...) - return textSpan(node, ts.findNextToken(node.expression, node)); - case 196 /* SwitchStatement */: - // span on switch(...) - return textSpan(node, ts.findNextToken(node.expression, node)); - case 223 /* CaseClause */: - case 224 /* DefaultClause */: - // span in first statement of the clause - return spanInNode(node.statements[0]); - case 199 /* TryStatement */: - // span in try block - return spanInBlock(node.tryBlock); - case 198 /* ThrowStatement */: - // span in throw ... - return textSpan(node, node.expression); - case 217 /* ExportAssignment */: - // span on export = id - return textSpan(node, node.expression); - case 211 /* ImportEqualsDeclaration */: - // import statement without including semicolon - return textSpan(node, node.moduleReference); - case 212 /* ImportDeclaration */: - // import statement without including semicolon - return textSpan(node, node.moduleSpecifier); - case 218 /* ExportDeclaration */: - // import statement without including semicolon - return textSpan(node, node.moduleSpecifier); - case 208 /* ModuleDeclaration */: - // span on complete module if it is instantiated - if (ts.getModuleInstanceState(node) !== 1 /* Instantiated */) { - return undefined; - } - case 204 /* ClassDeclaration */: - case 207 /* EnumDeclaration */: - case 229 /* EnumMember */: - case 160 /* CallExpression */: - case 161 /* NewExpression */: - // span on complete node - return textSpan(node); - case 195 /* WithStatement */: - // span in statement - return spanInNode(node.statement); - // No breakpoint in interface, type alias - case 205 /* InterfaceDeclaration */: - case 206 /* TypeAliasDeclaration */: - return undefined; - // Tokens: - case 22 /* SemicolonToken */: - case 1 /* EndOfFileToken */: - return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile)); - case 23 /* CommaToken */: - return spanInPreviousNode(node); - case 14 /* OpenBraceToken */: - return spanInOpenBraceToken(node); - case 15 /* CloseBraceToken */: - return spanInCloseBraceToken(node); - case 16 /* OpenParenToken */: - return spanInOpenParenToken(node); - case 17 /* CloseParenToken */: - return spanInCloseParenToken(node); - case 51 /* ColonToken */: - return spanInColonToken(node); - case 25 /* GreaterThanToken */: - case 24 /* LessThanToken */: - return spanInGreaterThanOrLessThanToken(node); - // Keywords: - case 100 /* WhileKeyword */: - return spanInWhileKeyword(node); - case 76 /* ElseKeyword */: - case 68 /* CatchKeyword */: - case 81 /* FinallyKeyword */: - return spanInNextNode(node); - default: - // If this is name of property assignment, set breakpoint in the initializer - if (node.parent.kind === 227 /* PropertyAssignment */ && node.parent.name === node) { - return spanInNode(node.parent.initializer); - } - // Breakpoint in type assertion goes to its operand - if (node.parent.kind === 163 /* TypeAssertionExpression */ && node.parent.type === node) { - return spanInNode(node.parent.expression); - } - // return type of function go to previous token - if (ts.isFunctionLike(node.parent) && node.parent.type === node) { - return spanInPreviousNode(node); - } - // Default go to parent to set the breakpoint - return spanInNode(node.parent); - } - } - function spanInVariableDeclaration(variableDeclaration) { - // If declaration of for in statement, just set the span in parent - if (variableDeclaration.parent.parent.kind === 190 /* ForInStatement */ || - variableDeclaration.parent.parent.kind === 191 /* ForOfStatement */) { - return spanInNode(variableDeclaration.parent.parent); - } - var isParentVariableStatement = variableDeclaration.parent.parent.kind === 183 /* VariableStatement */; - var isDeclarationOfForStatement = variableDeclaration.parent.parent.kind === 189 /* ForStatement */ && ts.contains(variableDeclaration.parent.parent.initializer.declarations, variableDeclaration); - var declarations = isParentVariableStatement - ? variableDeclaration.parent.parent.declarationList.declarations - : isDeclarationOfForStatement - ? variableDeclaration.parent.parent.initializer.declarations - : undefined; - // Breakpoint is possible in variableDeclaration only if there is initialization - if (variableDeclaration.initializer || (variableDeclaration.flags & 1 /* Export */)) { - if (declarations && declarations[0] === variableDeclaration) { - if (isParentVariableStatement) { - // First declaration - include let keyword - return textSpan(variableDeclaration.parent, variableDeclaration); - } - else { - ts.Debug.assert(isDeclarationOfForStatement); - // Include let keyword from for statement declarations in the span - return textSpan(ts.findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration); - } - } - else { - // Span only on this declaration - return textSpan(variableDeclaration); - } - } - else if (declarations && declarations[0] !== variableDeclaration) { - // If we cant set breakpoint on this declaration, set it on previous one - var indexOfCurrentDeclaration = ts.indexOf(declarations, variableDeclaration); - return spanInVariableDeclaration(declarations[indexOfCurrentDeclaration - 1]); - } - } - function canHaveSpanInParameterDeclaration(parameter) { - // Breakpoint is possible on parameter only if it has initializer, is a rest parameter, or has public or private modifier - return !!parameter.initializer || parameter.dotDotDotToken !== undefined || - !!(parameter.flags & 16 /* Public */) || !!(parameter.flags & 32 /* Private */); - } - function spanInParameterDeclaration(parameter) { - if (canHaveSpanInParameterDeclaration(parameter)) { - return textSpan(parameter); - } - else { - var functionDeclaration = parameter.parent; - var indexOfParameter = ts.indexOf(functionDeclaration.parameters, parameter); - if (indexOfParameter) { - // Not a first parameter, go to previous parameter - return spanInParameterDeclaration(functionDeclaration.parameters[indexOfParameter - 1]); - } - else { - // Set breakpoint in the function declaration body - return spanInNode(functionDeclaration.body); - } - } - } - function canFunctionHaveSpanInWholeDeclaration(functionDeclaration) { - return !!(functionDeclaration.flags & 1 /* Export */) || - (functionDeclaration.parent.kind === 204 /* ClassDeclaration */ && functionDeclaration.kind !== 137 /* Constructor */); - } - function spanInFunctionDeclaration(functionDeclaration) { - // No breakpoints in the function signature - if (!functionDeclaration.body) { - return undefined; - } - if (canFunctionHaveSpanInWholeDeclaration(functionDeclaration)) { - // Set the span on whole function declaration - return textSpan(functionDeclaration); - } - // Set span in function body - return spanInNode(functionDeclaration.body); - } - function spanInFunctionBlock(block) { - var nodeForSpanInBlock = block.statements.length ? block.statements[0] : block.getLastToken(); - if (canFunctionHaveSpanInWholeDeclaration(block.parent)) { - return spanInNodeIfStartsOnSameLine(block.parent, nodeForSpanInBlock); - } - return spanInNode(nodeForSpanInBlock); - } - function spanInBlock(block) { - switch (block.parent.kind) { - case 208 /* ModuleDeclaration */: - if (ts.getModuleInstanceState(block.parent) !== 1 /* Instantiated */) { - return undefined; - } - // Set on parent if on same line otherwise on first statement - case 188 /* WhileStatement */: - case 186 /* IfStatement */: - case 190 /* ForInStatement */: - case 191 /* ForOfStatement */: - return spanInNodeIfStartsOnSameLine(block.parent, block.statements[0]); - // Set span on previous token if it starts on same line otherwise on the first statement of the block - case 189 /* ForStatement */: - return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(block.pos, sourceFile, block.parent), block.statements[0]); - } - // Default action is to set on first statement - return spanInNode(block.statements[0]); - } - function spanInForStatement(forStatement) { - if (forStatement.initializer) { - if (forStatement.initializer.kind === 202 /* VariableDeclarationList */) { - var variableDeclarationList = forStatement.initializer; - if (variableDeclarationList.declarations.length > 0) { - return spanInNode(variableDeclarationList.declarations[0]); - } - } - else { - return spanInNode(forStatement.initializer); - } - } - if (forStatement.condition) { - return textSpan(forStatement.condition); - } - if (forStatement.incrementor) { - return textSpan(forStatement.incrementor); - } - } - // Tokens: - function spanInOpenBraceToken(node) { - switch (node.parent.kind) { - case 207 /* EnumDeclaration */: - var enumDeclaration = node.parent; - return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), enumDeclaration.members.length ? enumDeclaration.members[0] : enumDeclaration.getLastToken(sourceFile)); - case 204 /* ClassDeclaration */: - var classDeclaration = node.parent; - return spanInNodeIfStartsOnSameLine(ts.findPrecedingToken(node.pos, sourceFile, node.parent), classDeclaration.members.length ? classDeclaration.members[0] : classDeclaration.getLastToken(sourceFile)); - case 210 /* CaseBlock */: - return spanInNodeIfStartsOnSameLine(node.parent.parent, node.parent.clauses[0]); - } - // Default to parent node - return spanInNode(node.parent); - } - function spanInCloseBraceToken(node) { - switch (node.parent.kind) { - case 209 /* ModuleBlock */: - // If this is not instantiated module block no bp span - if (ts.getModuleInstanceState(node.parent.parent) !== 1 /* Instantiated */) { - return undefined; - } - case 207 /* EnumDeclaration */: - case 204 /* ClassDeclaration */: - // Span on close brace token - return textSpan(node); - case 182 /* Block */: - if (ts.isFunctionBlock(node.parent)) { - // Span on close brace token - return textSpan(node); - } - // fall through. - case 226 /* CatchClause */: - return spanInNode(ts.lastOrUndefined(node.parent.statements)); - ; - case 210 /* CaseBlock */: - // breakpoint in last statement of the last clause - var caseBlock = node.parent; - var lastClause = ts.lastOrUndefined(caseBlock.clauses); - if (lastClause) { - return spanInNode(ts.lastOrUndefined(lastClause.statements)); - } - return undefined; - // Default to parent node - default: - return spanInNode(node.parent); - } - } - function spanInOpenParenToken(node) { - if (node.parent.kind === 187 /* DoStatement */) { - // Go to while keyword and do action instead - return spanInPreviousNode(node); - } - // Default to parent node - return spanInNode(node.parent); - } - function spanInCloseParenToken(node) { - // Is this close paren token of parameter list, set span in previous token - switch (node.parent.kind) { - case 165 /* FunctionExpression */: - case 203 /* FunctionDeclaration */: - case 166 /* ArrowFunction */: - case 136 /* MethodDeclaration */: - case 135 /* MethodSignature */: - case 138 /* GetAccessor */: - case 139 /* SetAccessor */: - case 137 /* Constructor */: - case 188 /* WhileStatement */: - case 187 /* DoStatement */: - case 189 /* ForStatement */: - return spanInPreviousNode(node); - // Default to parent node - default: - return spanInNode(node.parent); - } - // Default to parent node - return spanInNode(node.parent); - } - function spanInColonToken(node) { - // Is this : specifying return annotation of the function declaration - if (ts.isFunctionLike(node.parent) || node.parent.kind === 227 /* PropertyAssignment */) { - return spanInPreviousNode(node); - } - return spanInNode(node.parent); - } - function spanInGreaterThanOrLessThanToken(node) { - if (node.parent.kind === 163 /* TypeAssertionExpression */) { - return spanInNode(node.parent.expression); - } - return spanInNode(node.parent); - } - function spanInWhileKeyword(node) { - if (node.parent.kind === 187 /* DoStatement */) { - // Set span on while expression - return textSpan(node, ts.findNextToken(node.parent.expression, node.parent)); - } - // Default to parent node - return spanInNode(node.parent); - } - } - } - BreakpointResolver.spanInSourceFileAtLocation = spanInSourceFileAtLocation; - })(BreakpointResolver = ts.BreakpointResolver || (ts.BreakpointResolver = {})); -})(ts || (ts = {})); -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -/// -/* @internal */ -var debugObjectHost = this; -/* @internal */ -var ts; -(function (ts) { - function logInternalError(logger, err) { - if (logger) { - logger.log("*INTERNAL ERROR* - Exception in typescript services: " + err.message); - } - } - var ScriptSnapshotShimAdapter = (function () { - function ScriptSnapshotShimAdapter(scriptSnapshotShim) { - this.scriptSnapshotShim = scriptSnapshotShim; - this.lineStartPositions = null; - } - ScriptSnapshotShimAdapter.prototype.getText = function (start, end) { - return this.scriptSnapshotShim.getText(start, end); - }; - ScriptSnapshotShimAdapter.prototype.getLength = function () { - return this.scriptSnapshotShim.getLength(); - }; - ScriptSnapshotShimAdapter.prototype.getChangeRange = function (oldSnapshot) { - var oldSnapshotShim = oldSnapshot; - var encoded = this.scriptSnapshotShim.getChangeRange(oldSnapshotShim.scriptSnapshotShim); - if (encoded == null) { - return null; - } - var decoded = JSON.parse(encoded); - return ts.createTextChangeRange(ts.createTextSpan(decoded.span.start, decoded.span.length), decoded.newLength); - }; - return ScriptSnapshotShimAdapter; - })(); - var LanguageServiceShimHostAdapter = (function () { - function LanguageServiceShimHostAdapter(shimHost) { - this.shimHost = shimHost; - this.loggingEnabled = false; - this.tracingEnabled = false; - } - LanguageServiceShimHostAdapter.prototype.log = function (s) { - if (this.loggingEnabled) { - this.shimHost.log(s); - } - }; - LanguageServiceShimHostAdapter.prototype.trace = function (s) { - if (this.tracingEnabled) { - this.shimHost.trace(s); - } - }; - LanguageServiceShimHostAdapter.prototype.error = function (s) { - this.shimHost.error(s); - }; - LanguageServiceShimHostAdapter.prototype.getProjectVersion = function () { - if (!this.shimHost.getProjectVersion) { - // shimmed host does not support getProjectVersion - return undefined; - } - return this.shimHost.getProjectVersion(); - }; - LanguageServiceShimHostAdapter.prototype.useCaseSensitiveFileNames = function () { - return this.shimHost.useCaseSensitiveFileNames ? this.shimHost.useCaseSensitiveFileNames() : false; - }; - LanguageServiceShimHostAdapter.prototype.getCompilationSettings = function () { - var settingsJson = this.shimHost.getCompilationSettings(); - if (settingsJson == null || settingsJson == "") { - throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings"); - return null; - } - return JSON.parse(settingsJson); - }; - LanguageServiceShimHostAdapter.prototype.getScriptFileNames = function () { - var encoded = this.shimHost.getScriptFileNames(); - return this.files = JSON.parse(encoded); - }; - LanguageServiceShimHostAdapter.prototype.getScriptSnapshot = function (fileName) { - // Shim the API changes for 1.5 release. This should be removed once - // TypeScript 1.5 has shipped. - if (this.files && this.files.indexOf(fileName) < 0) { - return undefined; - } - var scriptSnapshot = this.shimHost.getScriptSnapshot(fileName); - return scriptSnapshot && new ScriptSnapshotShimAdapter(scriptSnapshot); - }; - LanguageServiceShimHostAdapter.prototype.getScriptVersion = function (fileName) { - return this.shimHost.getScriptVersion(fileName); - }; - LanguageServiceShimHostAdapter.prototype.getLocalizedDiagnosticMessages = function () { - var diagnosticMessagesJson = this.shimHost.getLocalizedDiagnosticMessages(); - if (diagnosticMessagesJson == null || diagnosticMessagesJson == "") { - return null; - } - try { - return JSON.parse(diagnosticMessagesJson); - } - catch (e) { - this.log(e.description || "diagnosticMessages.generated.json has invalid JSON format"); - return null; - } - }; - LanguageServiceShimHostAdapter.prototype.getCancellationToken = function () { - return this.shimHost.getCancellationToken(); - }; - LanguageServiceShimHostAdapter.prototype.getCurrentDirectory = function () { - return this.shimHost.getCurrentDirectory(); - }; - LanguageServiceShimHostAdapter.prototype.getDefaultLibFileName = function (options) { - // Wrap the API changes for 1.5 release. This try/catch - // should be removed once TypeScript 1.5 has shipped. - try { - return this.shimHost.getDefaultLibFileName(JSON.stringify(options)); - } - catch (e) { - return ""; - } - }; - return LanguageServiceShimHostAdapter; - })(); - ts.LanguageServiceShimHostAdapter = LanguageServiceShimHostAdapter; - var CoreServicesShimHostAdapter = (function () { - function CoreServicesShimHostAdapter(shimHost) { - this.shimHost = shimHost; - } - CoreServicesShimHostAdapter.prototype.readDirectory = function (rootDir, extension) { - var encoded = this.shimHost.readDirectory(rootDir, extension); - return JSON.parse(encoded); - }; - return CoreServicesShimHostAdapter; - })(); - ts.CoreServicesShimHostAdapter = CoreServicesShimHostAdapter; - function simpleForwardCall(logger, actionDescription, action, logPerformance) { - if (logPerformance) { - logger.log(actionDescription); - var start = Date.now(); - } - var result = action(); - if (logPerformance) { - var end = Date.now(); - logger.log(actionDescription + " completed in " + (end - start) + " msec"); - if (typeof (result) === "string") { - var str = result; - if (str.length > 128) { - str = str.substring(0, 128) + "..."; - } - logger.log(" result.length=" + str.length + ", result='" + JSON.stringify(str) + "'"); - } - } - return result; - } - function forwardJSONCall(logger, actionDescription, action, logPerformance) { - try { - var result = simpleForwardCall(logger, actionDescription, action, logPerformance); - return JSON.stringify({ result: result }); - } - catch (err) { - if (err instanceof ts.OperationCanceledException) { - return JSON.stringify({ canceled: true }); - } - logInternalError(logger, err); - err.description = actionDescription; - return JSON.stringify({ error: err }); - } - } - var ShimBase = (function () { - function ShimBase(factory) { - this.factory = factory; - factory.registerShim(this); - } - ShimBase.prototype.dispose = function (dummy) { - this.factory.unregisterShim(this); - }; - return ShimBase; - })(); - function realizeDiagnostics(diagnostics, newLine) { - return diagnostics.map(function (d) { return realizeDiagnostic(d, newLine); }); - } - ts.realizeDiagnostics = realizeDiagnostics; - function realizeDiagnostic(diagnostic, newLine) { - return { - message: ts.flattenDiagnosticMessageText(diagnostic.messageText, newLine), - start: diagnostic.start, - length: diagnostic.length, - /// TODO: no need for the tolowerCase call - category: ts.DiagnosticCategory[diagnostic.category].toLowerCase(), - code: diagnostic.code - }; - } - var LanguageServiceShimObject = (function (_super) { - __extends(LanguageServiceShimObject, _super); - function LanguageServiceShimObject(factory, host, languageService) { - _super.call(this, factory); - this.host = host; - this.languageService = languageService; - this.logPerformance = false; - this.logger = this.host; - } - LanguageServiceShimObject.prototype.forwardJSONCall = function (actionDescription, action) { - return forwardJSONCall(this.logger, actionDescription, action, this.logPerformance); - }; - /// DISPOSE - /** - * Ensure (almost) deterministic release of internal Javascript resources when - * some external native objects holds onto us (e.g. Com/Interop). - */ - LanguageServiceShimObject.prototype.dispose = function (dummy) { - this.logger.log("dispose()"); - this.languageService.dispose(); - this.languageService = null; - // force a GC - if (debugObjectHost && debugObjectHost.CollectGarbage) { - debugObjectHost.CollectGarbage(); - this.logger.log("CollectGarbage()"); - } - this.logger = null; - _super.prototype.dispose.call(this, dummy); - }; - /// REFRESH - /** - * Update the list of scripts known to the compiler - */ - LanguageServiceShimObject.prototype.refresh = function (throwOnError) { - this.forwardJSONCall("refresh(" + throwOnError + ")", function () { - return null; - }); - }; - LanguageServiceShimObject.prototype.cleanupSemanticCache = function () { - var _this = this; - this.forwardJSONCall("cleanupSemanticCache()", function () { - _this.languageService.cleanupSemanticCache(); - return null; - }); - }; - LanguageServiceShimObject.prototype.realizeDiagnostics = function (diagnostics) { - var newLine = this.getNewLine(); - return ts.realizeDiagnostics(diagnostics, newLine); - }; - LanguageServiceShimObject.prototype.getSyntacticClassifications = function (fileName, start, length) { - var _this = this; - return this.forwardJSONCall("getSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { - var classifications = _this.languageService.getSyntacticClassifications(fileName, ts.createTextSpan(start, length)); - return classifications; - }); - }; - LanguageServiceShimObject.prototype.getSemanticClassifications = function (fileName, start, length) { - var _this = this; - return this.forwardJSONCall("getSemanticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { - var classifications = _this.languageService.getSemanticClassifications(fileName, ts.createTextSpan(start, length)); - return classifications; - }); - }; - LanguageServiceShimObject.prototype.getEncodedSyntacticClassifications = function (fileName, start, length) { - var _this = this; - return this.forwardJSONCall("getEncodedSyntacticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { - // directly serialize the spans out to a string. This is much faster to decode - // on the managed side versus a full JSON array. - return convertClassifications(_this.languageService.getEncodedSyntacticClassifications(fileName, ts.createTextSpan(start, length))); - }); - }; - LanguageServiceShimObject.prototype.getEncodedSemanticClassifications = function (fileName, start, length) { - var _this = this; - return this.forwardJSONCall("getEncodedSemanticClassifications('" + fileName + "', " + start + ", " + length + ")", function () { - // directly serialize the spans out to a string. This is much faster to decode - // on the managed side versus a full JSON array. - return convertClassifications(_this.languageService.getEncodedSemanticClassifications(fileName, ts.createTextSpan(start, length))); - }); - }; - LanguageServiceShimObject.prototype.getNewLine = function () { - return this.host.getNewLine ? this.host.getNewLine() : "\r\n"; - }; - LanguageServiceShimObject.prototype.getSyntacticDiagnostics = function (fileName) { - var _this = this; - return this.forwardJSONCall("getSyntacticDiagnostics('" + fileName + "')", function () { - var diagnostics = _this.languageService.getSyntacticDiagnostics(fileName); - return _this.realizeDiagnostics(diagnostics); - }); - }; - LanguageServiceShimObject.prototype.getSemanticDiagnostics = function (fileName) { - var _this = this; - return this.forwardJSONCall("getSemanticDiagnostics('" + fileName + "')", function () { - var diagnostics = _this.languageService.getSemanticDiagnostics(fileName); - return _this.realizeDiagnostics(diagnostics); - }); - }; - LanguageServiceShimObject.prototype.getCompilerOptionsDiagnostics = function () { - var _this = this; - return this.forwardJSONCall("getCompilerOptionsDiagnostics()", function () { - var diagnostics = _this.languageService.getCompilerOptionsDiagnostics(); - return _this.realizeDiagnostics(diagnostics); - }); - }; - /// QUICKINFO - /** - * Computes a string representation of the type at the requested position - * in the active file. - */ - LanguageServiceShimObject.prototype.getQuickInfoAtPosition = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getQuickInfoAtPosition('" + fileName + "', " + position + ")", function () { - var quickInfo = _this.languageService.getQuickInfoAtPosition(fileName, position); - return quickInfo; - }); - }; - /// NAMEORDOTTEDNAMESPAN - /** - * Computes span information of the name or dotted name at the requested position - * in the active file. - */ - LanguageServiceShimObject.prototype.getNameOrDottedNameSpan = function (fileName, startPos, endPos) { - var _this = this; - return this.forwardJSONCall("getNameOrDottedNameSpan('" + fileName + "', " + startPos + ", " + endPos + ")", function () { - var spanInfo = _this.languageService.getNameOrDottedNameSpan(fileName, startPos, endPos); - return spanInfo; - }); - }; - /** - * STATEMENTSPAN - * Computes span information of statement at the requested position in the active file. - */ - LanguageServiceShimObject.prototype.getBreakpointStatementAtPosition = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getBreakpointStatementAtPosition('" + fileName + "', " + position + ")", function () { - var spanInfo = _this.languageService.getBreakpointStatementAtPosition(fileName, position); - return spanInfo; - }); - }; - /// SIGNATUREHELP - LanguageServiceShimObject.prototype.getSignatureHelpItems = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getSignatureHelpItems('" + fileName + "', " + position + ")", function () { - var signatureInfo = _this.languageService.getSignatureHelpItems(fileName, position); - return signatureInfo; - }); - }; - /// GOTO DEFINITION - /** - * Computes the definition location and file for the symbol - * at the requested position. - */ - LanguageServiceShimObject.prototype.getDefinitionAtPosition = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getDefinitionAtPosition('" + fileName + "', " + position + ")", function () { - return _this.languageService.getDefinitionAtPosition(fileName, position); - }); - }; - /// GOTO Type - /** - * Computes the definition location of the type of the symbol - * at the requested position. - */ - LanguageServiceShimObject.prototype.getTypeDefinitionAtPosition = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getTypeDefinitionAtPosition('" + fileName + "', " + position + ")", function () { - return _this.languageService.getTypeDefinitionAtPosition(fileName, position); - }); - }; - LanguageServiceShimObject.prototype.getRenameInfo = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getRenameInfo('" + fileName + "', " + position + ")", function () { - return _this.languageService.getRenameInfo(fileName, position); - }); - }; - LanguageServiceShimObject.prototype.findRenameLocations = function (fileName, position, findInStrings, findInComments) { - var _this = this; - return this.forwardJSONCall("findRenameLocations('" + fileName + "', " + position + ", " + findInStrings + ", " + findInComments + ")", function () { - return _this.languageService.findRenameLocations(fileName, position, findInStrings, findInComments); - }); - }; - /// GET BRACE MATCHING - LanguageServiceShimObject.prototype.getBraceMatchingAtPosition = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getBraceMatchingAtPosition('" + fileName + "', " + position + ")", function () { - var textRanges = _this.languageService.getBraceMatchingAtPosition(fileName, position); - return textRanges; - }); - }; - /// GET SMART INDENT - LanguageServiceShimObject.prototype.getIndentationAtPosition = function (fileName, position, options /*Services.EditorOptions*/) { - var _this = this; - return this.forwardJSONCall("getIndentationAtPosition('" + fileName + "', " + position + ")", function () { - var localOptions = JSON.parse(options); - return _this.languageService.getIndentationAtPosition(fileName, position, localOptions); - }); - }; - /// GET REFERENCES - LanguageServiceShimObject.prototype.getReferencesAtPosition = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getReferencesAtPosition('" + fileName + "', " + position + ")", function () { - return _this.languageService.getReferencesAtPosition(fileName, position); - }); - }; - LanguageServiceShimObject.prototype.findReferences = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("findReferences('" + fileName + "', " + position + ")", function () { - return _this.languageService.findReferences(fileName, position); - }); - }; - LanguageServiceShimObject.prototype.getOccurrencesAtPosition = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getOccurrencesAtPosition('" + fileName + "', " + position + ")", function () { - return _this.languageService.getOccurrencesAtPosition(fileName, position); - }); - }; - LanguageServiceShimObject.prototype.getDocumentHighlights = function (fileName, position, filesToSearch) { - var _this = this; - return this.forwardJSONCall("getDocumentHighlights('" + fileName + "', " + position + ")", function () { - return _this.languageService.getDocumentHighlights(fileName, position, JSON.parse(filesToSearch)); - }); - }; - /// COMPLETION LISTS - /** - * Get a string based representation of the completions - * to provide at the given source position and providing a member completion - * list if requested. - */ - LanguageServiceShimObject.prototype.getCompletionsAtPosition = function (fileName, position) { - var _this = this; - return this.forwardJSONCall("getCompletionsAtPosition('" + fileName + "', " + position + ")", function () { - var completion = _this.languageService.getCompletionsAtPosition(fileName, position); - return completion; - }); - }; - /** Get a string based representation of a completion list entry details */ - LanguageServiceShimObject.prototype.getCompletionEntryDetails = function (fileName, position, entryName) { - var _this = this; - return this.forwardJSONCall("getCompletionEntryDetails('" + fileName + "', " + position + ", " + entryName + ")", function () { - var details = _this.languageService.getCompletionEntryDetails(fileName, position, entryName); - return details; - }); - }; - LanguageServiceShimObject.prototype.getFormattingEditsForRange = function (fileName, start, end, options /*Services.FormatCodeOptions*/) { - var _this = this; - return this.forwardJSONCall("getFormattingEditsForRange('" + fileName + "', " + start + ", " + end + ")", function () { - var localOptions = JSON.parse(options); - var edits = _this.languageService.getFormattingEditsForRange(fileName, start, end, localOptions); - return edits; - }); - }; - LanguageServiceShimObject.prototype.getFormattingEditsForDocument = function (fileName, options /*Services.FormatCodeOptions*/) { - var _this = this; - return this.forwardJSONCall("getFormattingEditsForDocument('" + fileName + "')", function () { - var localOptions = JSON.parse(options); - var edits = _this.languageService.getFormattingEditsForDocument(fileName, localOptions); - return edits; - }); - }; - LanguageServiceShimObject.prototype.getFormattingEditsAfterKeystroke = function (fileName, position, key, options /*Services.FormatCodeOptions*/) { - var _this = this; - return this.forwardJSONCall("getFormattingEditsAfterKeystroke('" + fileName + "', " + position + ", '" + key + "')", function () { - var localOptions = JSON.parse(options); - var edits = _this.languageService.getFormattingEditsAfterKeystroke(fileName, position, key, localOptions); - return edits; - }); - }; - /// NAVIGATE TO - /** Return a list of symbols that are interesting to navigate to */ - LanguageServiceShimObject.prototype.getNavigateToItems = function (searchValue, maxResultCount) { - var _this = this; - return this.forwardJSONCall("getNavigateToItems('" + searchValue + "', " + maxResultCount + ")", function () { - var items = _this.languageService.getNavigateToItems(searchValue, maxResultCount); - return items; - }); - }; - LanguageServiceShimObject.prototype.getNavigationBarItems = function (fileName) { - var _this = this; - return this.forwardJSONCall("getNavigationBarItems('" + fileName + "')", function () { - var items = _this.languageService.getNavigationBarItems(fileName); - return items; - }); - }; - LanguageServiceShimObject.prototype.getOutliningSpans = function (fileName) { - var _this = this; - return this.forwardJSONCall("getOutliningSpans('" + fileName + "')", function () { - var items = _this.languageService.getOutliningSpans(fileName); - return items; - }); - }; - LanguageServiceShimObject.prototype.getTodoComments = function (fileName, descriptors) { - var _this = this; - return this.forwardJSONCall("getTodoComments('" + fileName + "')", function () { - var items = _this.languageService.getTodoComments(fileName, JSON.parse(descriptors)); - return items; - }); - }; - /// Emit - LanguageServiceShimObject.prototype.getEmitOutput = function (fileName) { - var _this = this; - return this.forwardJSONCall("getEmitOutput('" + fileName + "')", function () { - var output = _this.languageService.getEmitOutput(fileName); - // Shim the API changes for 1.5 release. This should be removed once - // TypeScript 1.5 has shipped. - output.emitOutputStatus = output.emitSkipped ? 1 : 0; - return output; - }); - }; - return LanguageServiceShimObject; - })(ShimBase); - function convertClassifications(classifications) { - return { spans: classifications.spans.join(","), endOfLineState: classifications.endOfLineState }; - } - var ClassifierShimObject = (function (_super) { - __extends(ClassifierShimObject, _super); - function ClassifierShimObject(factory, logger) { - _super.call(this, factory); - this.logger = logger; - this.logPerformance = false; - this.classifier = ts.createClassifier(); - } - ClassifierShimObject.prototype.getEncodedLexicalClassifications = function (text, lexState, syntacticClassifierAbsent) { - var _this = this; - return forwardJSONCall(this.logger, "getEncodedLexicalClassifications", function () { return convertClassifications(_this.classifier.getEncodedLexicalClassifications(text, lexState, syntacticClassifierAbsent)); }, this.logPerformance); - }; - /// COLORIZATION - ClassifierShimObject.prototype.getClassificationsForLine = function (text, lexState, classifyKeywordsInGenerics) { - var classification = this.classifier.getClassificationsForLine(text, lexState, classifyKeywordsInGenerics); - var items = classification.entries; - var result = ""; - for (var i = 0; i < items.length; i++) { - result += items[i].length + "\n"; - result += items[i].classification + "\n"; - } - result += classification.finalLexState; - return result; - }; - return ClassifierShimObject; - })(ShimBase); - var CoreServicesShimObject = (function (_super) { - __extends(CoreServicesShimObject, _super); - function CoreServicesShimObject(factory, logger, host) { - _super.call(this, factory); - this.logger = logger; - this.host = host; - this.logPerformance = false; - } - CoreServicesShimObject.prototype.forwardJSONCall = function (actionDescription, action) { - return forwardJSONCall(this.logger, actionDescription, action, this.logPerformance); - }; - CoreServicesShimObject.prototype.getPreProcessedFileInfo = function (fileName, sourceTextSnapshot) { - return this.forwardJSONCall("getPreProcessedFileInfo('" + fileName + "')", function () { - var result = ts.preProcessFile(sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength())); - var convertResult = { - referencedFiles: [], - importedFiles: [], - isLibFile: result.isLibFile - }; - ts.forEach(result.referencedFiles, function (refFile) { - convertResult.referencedFiles.push({ - path: ts.normalizePath(refFile.fileName), - position: refFile.pos, - length: refFile.end - refFile.pos - }); - }); - ts.forEach(result.importedFiles, function (importedFile) { - convertResult.importedFiles.push({ - path: ts.normalizeSlashes(importedFile.fileName), - position: importedFile.pos, - length: importedFile.end - importedFile.pos - }); - }); - return convertResult; - }); - }; - CoreServicesShimObject.prototype.getTSConfigFileInfo = function (fileName, sourceTextSnapshot) { - var _this = this; - return this.forwardJSONCall("getTSConfigFileInfo('" + fileName + "')", function () { - var text = sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength()); - var result = ts.parseConfigFileText(fileName, text); - if (result.error) { - return { - options: {}, - files: [], - errors: [realizeDiagnostic(result.error, '\r\n')] - }; - } - var configFile = ts.parseConfigFile(result.config, _this.host, ts.getDirectoryPath(ts.normalizeSlashes(fileName))); - return { - options: configFile.options, - files: configFile.fileNames, - errors: realizeDiagnostics(configFile.errors, '\r\n') - }; - }); - }; - CoreServicesShimObject.prototype.getDefaultCompilationSettings = function () { - return this.forwardJSONCall("getDefaultCompilationSettings()", function () { - return ts.getDefaultCompilerOptions(); - }); - }; - return CoreServicesShimObject; - })(ShimBase); - var TypeScriptServicesFactory = (function () { - function TypeScriptServicesFactory() { - this._shims = []; - } - /* - * Returns script API version. - */ - TypeScriptServicesFactory.prototype.getServicesVersion = function () { - return ts.servicesVersion; - }; - TypeScriptServicesFactory.prototype.createLanguageServiceShim = function (host) { - try { - if (this.documentRegistry === undefined) { - this.documentRegistry = ts.createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames()); - } - var hostAdapter = new LanguageServiceShimHostAdapter(host); - var languageService = ts.createLanguageService(hostAdapter, this.documentRegistry); - return new LanguageServiceShimObject(this, host, languageService); - } - catch (err) { - logInternalError(host, err); - throw err; - } - }; - TypeScriptServicesFactory.prototype.createClassifierShim = function (logger) { - try { - return new ClassifierShimObject(this, logger); - } - catch (err) { - logInternalError(logger, err); - throw err; - } - }; - TypeScriptServicesFactory.prototype.createCoreServicesShim = function (host) { - try { - var adapter = new CoreServicesShimHostAdapter(host); - return new CoreServicesShimObject(this, host, adapter); - } - catch (err) { - logInternalError(host, err); - throw err; - } - }; - TypeScriptServicesFactory.prototype.close = function () { - // Forget all the registered shims - this._shims = []; - this.documentRegistry = ts.createDocumentRegistry(); - }; - TypeScriptServicesFactory.prototype.registerShim = function (shim) { - this._shims.push(shim); - }; - TypeScriptServicesFactory.prototype.unregisterShim = function (shim) { - for (var i = 0, n = this._shims.length; i < n; i++) { - if (this._shims[i] === shim) { - delete this._shims[i]; - return; - } - } - throw new Error("Invalid operation"); - }; - return TypeScriptServicesFactory; - })(); - ts.TypeScriptServicesFactory = TypeScriptServicesFactory; - if (typeof module !== "undefined" && module.exports) { - module.exports = ts; - } -})(ts || (ts = {})); -/// TODO: this is used by VS, clean this up on both sides of the interface -/* @internal */ -var TypeScript; -(function (TypeScript) { - var Services; - (function (Services) { - Services.TypeScriptServicesFactory = ts.TypeScriptServicesFactory; - })(Services = TypeScript.Services || (TypeScript.Services = {})); -})(TypeScript || (TypeScript = {})); -/* @internal */ -var toolsVersion = "1.5"; -module.exports = ts; \ No newline at end of file From b3f9d8a2831257be256fed43f9612771e1e172b4 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 16 Jun 2017 16:23:31 +0200 Subject: [PATCH 1964/2747] move codelense to /browser/-layer --- src/vs/editor/browser/editor.all.ts | 2 +- .../contrib/codelens/browser/codelens.ts | 663 ++---------------- .../{codelens.css => codelensController.css} | 0 .../codelens/browser/codelensController.ts | 641 +++++++++++++++++ .../contrib/codelens/common/codelens.ts | 72 -- .../workbench/api/node/extHostApiCommands.ts | 7 +- .../api/extHostLanguageFeatures.test.ts | 2 +- 7 files changed, 693 insertions(+), 694 deletions(-) rename src/vs/editor/contrib/codelens/browser/{codelens.css => codelensController.css} (100%) create mode 100644 src/vs/editor/contrib/codelens/browser/codelensController.ts delete mode 100644 src/vs/editor/contrib/codelens/common/codelens.ts diff --git a/src/vs/editor/browser/editor.all.ts b/src/vs/editor/browser/editor.all.ts index 4223fbac79041..ba486b3818105 100644 --- a/src/vs/editor/browser/editor.all.ts +++ b/src/vs/editor/browser/editor.all.ts @@ -14,7 +14,7 @@ import 'vs/css!vs/editor/contrib/bracketMatching/browser/bracketMatching'; import 'vs/editor/contrib/caretOperations/common/caretOperations'; import 'vs/editor/contrib/caretOperations/common/transpose'; import 'vs/editor/contrib/clipboard/browser/clipboard'; -import 'vs/editor/contrib/codelens/browser/codelens'; +import 'vs/editor/contrib/codelens/browser/codelensController'; import 'vs/editor/contrib/comment/common/comment'; import 'vs/editor/contrib/contextmenu/browser/contextmenu'; import 'vs/editor/contrib/cursorUndo/browser/cursorUndo'; diff --git a/src/vs/editor/contrib/codelens/browser/codelens.ts b/src/vs/editor/contrib/codelens/browser/codelens.ts index 2c7e6ff341cdf..2cbda09d66f6c 100644 --- a/src/vs/editor/contrib/codelens/browser/codelens.ts +++ b/src/vs/editor/contrib/codelens/browser/codelens.ts @@ -5,637 +5,68 @@ 'use strict'; -import 'vs/css!./codelens'; -import { RunOnceScheduler, asWinJsPromise } from 'vs/base/common/async'; -import { onUnexpectedError } from 'vs/base/common/errors'; -import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import Severity from 'vs/base/common/severity'; -import { format, escape } from 'vs/base/common/strings'; +import { illegalArgument, onUnexpectedExternalError } from 'vs/base/common/errors'; +import { stableSort } from 'vs/base/common/arrays'; +import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; -import * as dom from 'vs/base/browser/dom'; -import { ICommandService } from 'vs/platform/commands/common/commands'; -import { IMessageService } from 'vs/platform/message/common/message'; -import { Range } from 'vs/editor/common/core/range'; -import * as editorCommon from 'vs/editor/common/editorCommon'; -import { CodeLensProviderRegistry, ICodeLensSymbol, Command } from 'vs/editor/common/modes'; -import * as editorBrowser from 'vs/editor/browser/editorBrowser'; -import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; -import { ICodeLensData, getCodeLensData } from '../common/codelens'; -import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; -import { editorCodeLensForeground } from 'vs/editor/common/view/editorColorRegistry'; -import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; -import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; - - -class CodeLensViewZone implements editorBrowser.IViewZone { - - public afterLineNumber: number; - public heightInLines: number; - public suppressMouseDown: boolean; - public domNode: HTMLElement; - private _lastHeight: number; - private _onHeight: Function; - - constructor(afterLineNumber: number, onHeight: Function) { - this.afterLineNumber = afterLineNumber; - this._onHeight = onHeight; - - this.heightInLines = 1; - this.suppressMouseDown = true; - this.domNode = document.createElement('div'); - } - - public setAfterLineNumber(afterLineNumber: number): void { - this.afterLineNumber = afterLineNumber; - } - - onComputedHeight(height: number): void { - if (this._lastHeight === undefined) { - this._lastHeight = height; - } else if (this._lastHeight !== height) { - this._lastHeight = height; - this._onHeight(); - } - } - +import { IModel } from 'vs/editor/common/editorCommon'; +import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; +import { CodeLensProviderRegistry, CodeLensProvider, ICodeLensSymbol } from 'vs/editor/common/modes'; +import { IModelService } from 'vs/editor/common/services/modelService'; +import { asWinJsPromise } from 'vs/base/common/async'; + +export interface ICodeLensData { + symbol: ICodeLensSymbol; + provider: CodeLensProvider; } -class CodeLensContentWidget implements editorBrowser.IContentWidget { - - private static ID: number = 0; - - // Editor.IContentWidget.allowEditorOverflow - readonly allowEditorOverflow: boolean = false; - readonly suppressMouseDown: boolean = true; - - private _id: string; - - private _domNode: HTMLElement; - private _disposables: IDisposable[] = []; - private _symbolRange: Range; - private _widgetPosition: editorBrowser.IContentWidgetPosition; - private _editor: editorBrowser.ICodeEditor; - private _commands: { [id: string]: Command } = Object.create(null); - - public constructor( - editor: editorBrowser.ICodeEditor, - symbolRange: Range, - commandService: ICommandService, - messageService: IMessageService - ) { - - this._id = 'codeLensWidget' + (++CodeLensContentWidget.ID); - this._editor = editor; - - this.setSymbolRange(symbolRange); - - this._domNode = document.createElement('span'); - this._domNode.innerHTML = ' '; - dom.addClass(this._domNode, 'codelens-decoration'); - dom.addClass(this._domNode, 'invisible-cl'); - this._updateHeight(); - - this._disposables.push(this._editor.onDidChangeConfiguration(e => { - if (e.fontInfo) { - this._updateHeight(); - } - })); - - this._disposables.push(dom.addDisposableListener(this._domNode, 'click', e => { - let element = e.target; - if (element.tagName === 'A' && element.id) { - let command = this._commands[element.id]; - if (command) { - editor.focus(); - commandService.executeCommand(command.id, ...command.arguments).done(undefined, err => { - messageService.show(Severity.Error, err); - }); - } - } - })); - - this.updateVisibility(); - } - - public dispose(): void { - dispose(this._disposables); - this._symbolRange = null; - } - - private _updateHeight(): void { - const { fontInfo, lineHeight } = this._editor.getConfiguration(); - this._domNode.style.height = `${Math.round(lineHeight * 1.1)}px`; - this._domNode.style.lineHeight = `${lineHeight}px`; - this._domNode.style.fontSize = `${Math.round(fontInfo.fontSize * .9)}px`; - this._domNode.innerHTML = ' '; - } - - public updateVisibility(): void { - if (this.isVisible()) { - dom.removeClass(this._domNode, 'invisible-cl'); - dom.addClass(this._domNode, 'fadein'); - } - } +export function getCodeLensData(model: IModel): TPromise { - public withCommands(symbols: ICodeLensSymbol[]): void { - this._commands = Object.create(null); - if (!symbols || !symbols.length) { - this._domNode.innerHTML = 'no commands'; - return; - } + const symbols: ICodeLensData[] = []; + const provider = CodeLensProviderRegistry.ordered(model); - let html: string[] = []; - for (let i = 0; i < symbols.length; i++) { - let command = symbols[i].command; - let title = escape(command.title); - let part: string; - if (command.id) { - part = format('{1}', i, title); - this._commands[i] = command; - } else { - part = format('{0}', title); + const promises = provider.map(provider => asWinJsPromise(token => provider.provideCodeLenses(model, token)).then(result => { + if (Array.isArray(result)) { + for (let symbol of result) { + symbols.push({ symbol, provider }); } - html.push(part); - } - - this._domNode.innerHTML = html.join(' | '); - this._editor.layoutContentWidget(this); - } - - public getId(): string { - return this._id; - } - - public getDomNode(): HTMLElement { - return this._domNode; - } - - public setSymbolRange(range: Range): void { - this._symbolRange = range; - - const lineNumber = range.startLineNumber; - const column = this._editor.getModel().getLineFirstNonWhitespaceColumn(lineNumber); - this._widgetPosition = { - position: { lineNumber: lineNumber, column: column }, - preference: [editorBrowser.ContentWidgetPositionPreference.ABOVE] - }; - } - - public getPosition(): editorBrowser.IContentWidgetPosition { - return this._widgetPosition; - } - - public isVisible(): boolean { - return this._domNode.hasAttribute('monaco-visible-content-widget'); - } -} - -interface IDecorationIdCallback { - (decorationId: string): void; -} - -class CodeLensHelper { - - private _removeDecorations: string[]; - private _addDecorations: editorCommon.IModelDeltaDecoration[]; - private _addDecorationsCallbacks: IDecorationIdCallback[]; - - constructor() { - this._removeDecorations = []; - this._addDecorations = []; - this._addDecorationsCallbacks = []; - } - - public addDecoration(decoration: editorCommon.IModelDeltaDecoration, callback: IDecorationIdCallback): void { - this._addDecorations.push(decoration); - this._addDecorationsCallbacks.push(callback); - } - - public removeDecoration(decorationId: string): void { - this._removeDecorations.push(decorationId); - } - - public commit(changeAccessor: editorCommon.IModelDecorationsChangeAccessor): void { - var resultingDecorations = changeAccessor.deltaDecorations(this._removeDecorations, this._addDecorations); - for (let i = 0, len = resultingDecorations.length; i < len; i++) { - this._addDecorationsCallbacks[i](resultingDecorations[i]); } - } -} - -class CodeLens { - - private _viewZone: CodeLensViewZone; - private _viewZoneId: number; - private _contentWidget: CodeLensContentWidget; - private _decorationIds: string[]; - private _data: ICodeLensData[]; - private _editor: editorBrowser.ICodeEditor; - - public constructor( - data: ICodeLensData[], - editor: editorBrowser.ICodeEditor, - helper: CodeLensHelper, - viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor, - commandService: ICommandService, messageService: IMessageService, - updateCallabck: Function - ) { - - this._editor = editor; - this._data = data; - this._decorationIds = new Array(this._data.length); - - let range: Range; - this._data.forEach((codeLensData, i) => { - - helper.addDecoration({ - range: codeLensData.symbol.range, - options: ModelDecorationOptions.EMPTY - }, id => this._decorationIds[i] = id); - - // the range contains all lenses on this line - if (!range) { - range = Range.lift(codeLensData.symbol.range); + }, onUnexpectedExternalError)); + + return TPromise.join(promises).then(() => { + + return stableSort(symbols, (a, b) => { + // sort by lineNumber, provider-rank, and column + if (a.symbol.range.startLineNumber < b.symbol.range.startLineNumber) { + return -1; + } else if (a.symbol.range.startLineNumber > b.symbol.range.startLineNumber) { + return 1; + } else if (provider.indexOf(a.provider) < provider.indexOf(b.provider)) { + return -1; + } else if (provider.indexOf(a.provider) > provider.indexOf(b.provider)) { + return 1; + } else if (a.symbol.range.startColumn < b.symbol.range.startColumn) { + return -1; + } else if (a.symbol.range.startColumn > b.symbol.range.startColumn) { + return 1; } else { - range = Range.plusRange(range, codeLensData.symbol.range); + return 0; } }); - - this._contentWidget = new CodeLensContentWidget(editor, range, commandService, messageService); - this._viewZone = new CodeLensViewZone(range.startLineNumber - 1, updateCallabck); - - this._viewZoneId = viewZoneChangeAccessor.addZone(this._viewZone); - this._editor.addContentWidget(this._contentWidget); - } - - public dispose(helper: CodeLensHelper, viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor): void { - while (this._decorationIds.length) { - helper.removeDecoration(this._decorationIds.pop()); - } - if (viewZoneChangeAccessor) { - viewZoneChangeAccessor.removeZone(this._viewZoneId); - } - this._editor.removeContentWidget(this._contentWidget); - - this._contentWidget.dispose(); - } - - public isValid(): boolean { - return this._decorationIds.some((id, i) => { - const range = this._editor.getModel().getDecorationRange(id); - const symbol = this._data[i].symbol; - return range && Range.isEmpty(symbol.range) === range.isEmpty(); - }); - } - - public updateCodeLensSymbols(data: ICodeLensData[], helper: CodeLensHelper): void { - while (this._decorationIds.length) { - helper.removeDecoration(this._decorationIds.pop()); - } - this._data = data; - this._decorationIds = new Array(this._data.length); - this._data.forEach((codeLensData, i) => { - helper.addDecoration({ - range: codeLensData.symbol.range, - options: ModelDecorationOptions.EMPTY - }, id => this._decorationIds[i] = id); - }); - } - - public computeIfNecessary(model: editorCommon.IModel): ICodeLensData[] { - this._contentWidget.updateVisibility(); // trigger the fade in - if (!this._contentWidget.isVisible()) { - return null; - } - - // Read editor current state - for (let i = 0; i < this._decorationIds.length; i++) { - this._data[i].symbol.range = model.getDecorationRange(this._decorationIds[i]); - } - return this._data; - } - - public updateCommands(symbols: ICodeLensSymbol[]): void { - this._contentWidget.withCommands(symbols); - } - - public getLineNumber(): number { - const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]); - if (range) { - return range.startLineNumber; - } - return -1; - } - - public update(viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor): void { - if (this.isValid()) { - const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]); - - this._viewZone.setAfterLineNumber(range.startLineNumber - 1); - viewZoneChangeAccessor.layoutZone(this._viewZoneId); - - this._contentWidget.setSymbolRange(range); - this._editor.layoutContentWidget(this._contentWidget); - } - } + }); } -@editorContribution -export class CodeLensContribution implements editorCommon.IEditorContribution { - - private static ID: string = 'css.editor.codeLens'; - - private _isEnabled: boolean; - - private _globalToDispose: IDisposable[]; - private _localToDispose: IDisposable[]; - private _lenses: CodeLens[]; - private _currentFindCodeLensSymbolsPromise: TPromise; - private _modelChangeCounter: number; - private _currentFindOccPromise: TPromise; - private _detectVisibleLenses: RunOnceScheduler; - - constructor( - private _editor: editorBrowser.ICodeEditor, - @ICommandService private _commandService: ICommandService, - @IMessageService private _messageService: IMessageService - ) { - this._isEnabled = this._editor.getConfiguration().contribInfo.codeLens; - - this._globalToDispose = []; - this._localToDispose = []; - this._lenses = []; - this._currentFindCodeLensSymbolsPromise = null; - this._modelChangeCounter = 0; - - this._globalToDispose.push(this._editor.onDidChangeModel(() => this.onModelChange())); - this._globalToDispose.push(this._editor.onDidChangeModelLanguage(() => this.onModelChange())); - this._globalToDispose.push(this._editor.onDidChangeConfiguration((e: IConfigurationChangedEvent) => { - let prevIsEnabled = this._isEnabled; - this._isEnabled = this._editor.getConfiguration().contribInfo.codeLens; - if (prevIsEnabled !== this._isEnabled) { - this.onModelChange(); - } - })); - this._globalToDispose.push(CodeLensProviderRegistry.onDidChange(this.onModelChange, this)); - this.onModelChange(); - } - - public dispose(): void { - this.localDispose(); - this._globalToDispose = dispose(this._globalToDispose); - } +CommonEditorRegistry.registerLanguageCommand('_executeCodeLensProvider', function (accessor, args) { - private localDispose(): void { - if (this._currentFindCodeLensSymbolsPromise) { - this._currentFindCodeLensSymbolsPromise.cancel(); - this._currentFindCodeLensSymbolsPromise = null; - this._modelChangeCounter++; - } - if (this._currentFindOccPromise) { - this._currentFindOccPromise.cancel(); - this._currentFindOccPromise = null; - } - this._localToDispose = dispose(this._localToDispose); + const { resource } = args; + if (!(resource instanceof URI)) { + throw illegalArgument(); } - public getId(): string { - return CodeLensContribution.ID; + const model = accessor.get(IModelService).getModel(resource); + if (!model) { + throw illegalArgument(); } - private onModelChange(): void { - - this.localDispose(); - - const model = this._editor.getModel(); - if (!model) { - return; - } - - if (!this._isEnabled) { - return; - } - - if (!CodeLensProviderRegistry.has(model)) { - return; - } - - for (const provider of CodeLensProviderRegistry.all(model)) { - if (typeof provider.onDidChange === 'function') { - let registration = provider.onDidChange(() => scheduler.schedule()); - this._localToDispose.push(registration); - } - } - - this._detectVisibleLenses = new RunOnceScheduler(() => { - this._onViewportChanged(model.getLanguageIdentifier().language); - }, 500); - - const scheduler = new RunOnceScheduler(() => { - if (this._currentFindCodeLensSymbolsPromise) { - this._currentFindCodeLensSymbolsPromise.cancel(); - } - - this._currentFindCodeLensSymbolsPromise = getCodeLensData(model); - - const counterValue = ++this._modelChangeCounter; - this._currentFindCodeLensSymbolsPromise.then((result) => { - if (counterValue === this._modelChangeCounter) { // only the last one wins - this.renderCodeLensSymbols(result); - this._detectVisibleLenses.schedule(); - } - }, (error) => { - onUnexpectedError(error); - }); - }, 250); - this._localToDispose.push(scheduler); - this._localToDispose.push(this._detectVisibleLenses); - this._localToDispose.push(this._editor.onDidChangeModelContent((e) => { - this._editor.changeDecorations((changeAccessor) => { - this._editor.changeViewZones((viewAccessor) => { - const toDispose: CodeLens[] = []; - this._lenses.forEach((lens) => { - if (lens.isValid()) { - lens.update(viewAccessor); - } else { - toDispose.push(lens); - } - }); - - let helper = new CodeLensHelper(); - toDispose.forEach((l) => { - l.dispose(helper, viewAccessor); - this._lenses.splice(this._lenses.indexOf(l), 1); - }); - helper.commit(changeAccessor); - }); - }); - - // Compute new `visible` code lenses - this._detectVisibleLenses.schedule(); - // Ask for all references again - scheduler.schedule(); - })); - this._localToDispose.push(this._editor.onDidScrollChange(e => { - if (e.scrollTopChanged) { - this._detectVisibleLenses.schedule(); - } - })); - this._localToDispose.push(this._editor.onDidLayoutChange(e => { - this._detectVisibleLenses.schedule(); - })); - this._localToDispose.push({ - dispose: () => { - if (this._editor.getModel()) { - this._editor.changeDecorations((changeAccessor) => { - this._editor.changeViewZones((accessor) => { - this._disposeAllLenses(changeAccessor, accessor); - }); - }); - } else { - // No accessors available - this._disposeAllLenses(null, null); - } - } - }); - - scheduler.schedule(); - } - - private _disposeAllLenses(decChangeAccessor: editorCommon.IModelDecorationsChangeAccessor, viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor): void { - let helper = new CodeLensHelper(); - this._lenses.forEach((lens) => lens.dispose(helper, viewZoneChangeAccessor)); - if (decChangeAccessor) { - helper.commit(decChangeAccessor); - } - this._lenses = []; - } - - private renderCodeLensSymbols(symbols: ICodeLensData[]): void { - if (!this._editor.getModel()) { - return; - } - - let maxLineNumber = this._editor.getModel().getLineCount(); - let groups: ICodeLensData[][] = []; - let lastGroup: ICodeLensData[]; - - for (let symbol of symbols) { - let line = symbol.symbol.range.startLineNumber; - if (line < 1 || line > maxLineNumber) { - // invalid code lens - continue; - } else if (lastGroup && lastGroup[lastGroup.length - 1].symbol.range.startLineNumber === line) { - // on same line as previous - lastGroup.push(symbol); - } else { - // on later line as previous - lastGroup = [symbol]; - groups.push(lastGroup); - } - } - - const centeredRange = this._editor.getCenteredRangeInViewport(); - const shouldRestoreCenteredRange = centeredRange && (groups.length !== this._lenses.length && this._editor.getScrollTop() !== 0); - this._editor.changeDecorations((changeAccessor) => { - this._editor.changeViewZones((accessor) => { - - let codeLensIndex = 0, groupsIndex = 0, helper = new CodeLensHelper(); - - while (groupsIndex < groups.length && codeLensIndex < this._lenses.length) { - - let symbolsLineNumber = groups[groupsIndex][0].symbol.range.startLineNumber; - let codeLensLineNumber = this._lenses[codeLensIndex].getLineNumber(); - - if (codeLensLineNumber < symbolsLineNumber) { - this._lenses[codeLensIndex].dispose(helper, accessor); - this._lenses.splice(codeLensIndex, 1); - } else if (codeLensLineNumber === symbolsLineNumber) { - this._lenses[codeLensIndex].updateCodeLensSymbols(groups[groupsIndex], helper); - groupsIndex++; - codeLensIndex++; - } else { - this._lenses.splice(codeLensIndex, 0, new CodeLens(groups[groupsIndex], this._editor, helper, accessor, this._commandService, this._messageService, () => this._detectVisibleLenses.schedule())); - codeLensIndex++; - groupsIndex++; - } - } - - // Delete extra code lenses - while (codeLensIndex < this._lenses.length) { - this._lenses[codeLensIndex].dispose(helper, accessor); - this._lenses.splice(codeLensIndex, 1); - } - - // Create extra symbols - while (groupsIndex < groups.length) { - this._lenses.push(new CodeLens(groups[groupsIndex], this._editor, helper, accessor, this._commandService, this._messageService, () => this._detectVisibleLenses.schedule())); - groupsIndex++; - } - - helper.commit(changeAccessor); - }); - }); - if (shouldRestoreCenteredRange) { - this._editor.revealRangeInCenter(centeredRange); - } - } - - private _onViewportChanged(modeId: string): void { - if (this._currentFindOccPromise) { - this._currentFindOccPromise.cancel(); - this._currentFindOccPromise = null; - } - - const model = this._editor.getModel(); - if (!model) { - return; - } - - const toResolve: ICodeLensData[][] = []; - const lenses: CodeLens[] = []; - this._lenses.forEach((lens) => { - const request = lens.computeIfNecessary(model); - if (request) { - toResolve.push(request); - lenses.push(lens); - } - }); - - if (toResolve.length === 0) { - return; - } - - const promises = toResolve.map((request, i) => { - - const resolvedSymbols = new Array(request.length); - const promises = request.map((request, i) => { - return asWinJsPromise((token) => { - return request.provider.resolveCodeLens(model, request.symbol, token); - }).then(symbol => { - resolvedSymbols[i] = symbol; - }); - }); - - return TPromise.join(promises).then(() => { - lenses[i].updateCommands(resolvedSymbols); - }); - }); - - this._currentFindOccPromise = TPromise.join(promises).then(() => { - this._currentFindOccPromise = null; - }); - } -} - -registerThemingParticipant((theme, collector) => { - let codeLensForeground = theme.getColor(editorCodeLensForeground); - if (codeLensForeground) { - collector.addRule(`.monaco-editor .codelens-decoration { color: ${codeLensForeground}; }`); - } - let activeLinkForeground = theme.getColor(editorActiveLinkForeground); - if (activeLinkForeground) { - collector.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${activeLinkForeground} !important; }`); - } + return getCodeLensData(model).then(value => value.map(item => item.symbol)); }); diff --git a/src/vs/editor/contrib/codelens/browser/codelens.css b/src/vs/editor/contrib/codelens/browser/codelensController.css similarity index 100% rename from src/vs/editor/contrib/codelens/browser/codelens.css rename to src/vs/editor/contrib/codelens/browser/codelensController.css diff --git a/src/vs/editor/contrib/codelens/browser/codelensController.ts b/src/vs/editor/contrib/codelens/browser/codelensController.ts new file mode 100644 index 0000000000000..c43b02b73e9a7 --- /dev/null +++ b/src/vs/editor/contrib/codelens/browser/codelensController.ts @@ -0,0 +1,641 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import 'vs/css!./codelensController'; +import { RunOnceScheduler, asWinJsPromise } from 'vs/base/common/async'; +import { onUnexpectedError } from 'vs/base/common/errors'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import Severity from 'vs/base/common/severity'; +import { format, escape } from 'vs/base/common/strings'; +import { TPromise } from 'vs/base/common/winjs.base'; +import * as dom from 'vs/base/browser/dom'; +import { ICommandService } from 'vs/platform/commands/common/commands'; +import { IMessageService } from 'vs/platform/message/common/message'; +import { Range } from 'vs/editor/common/core/range'; +import * as editorCommon from 'vs/editor/common/editorCommon'; +import { CodeLensProviderRegistry, ICodeLensSymbol, Command } from 'vs/editor/common/modes'; +import * as editorBrowser from 'vs/editor/browser/editorBrowser'; +import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; +import { ICodeLensData, getCodeLensData } from './codelens'; +import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; +import { editorCodeLensForeground } from 'vs/editor/common/view/editorColorRegistry'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; + + +class CodeLensViewZone implements editorBrowser.IViewZone { + + public afterLineNumber: number; + public heightInLines: number; + public suppressMouseDown: boolean; + public domNode: HTMLElement; + private _lastHeight: number; + private _onHeight: Function; + + constructor(afterLineNumber: number, onHeight: Function) { + this.afterLineNumber = afterLineNumber; + this._onHeight = onHeight; + + this.heightInLines = 1; + this.suppressMouseDown = true; + this.domNode = document.createElement('div'); + } + + public setAfterLineNumber(afterLineNumber: number): void { + this.afterLineNumber = afterLineNumber; + } + + onComputedHeight(height: number): void { + if (this._lastHeight === undefined) { + this._lastHeight = height; + } else if (this._lastHeight !== height) { + this._lastHeight = height; + this._onHeight(); + } + } + +} + +class CodeLensContentWidget implements editorBrowser.IContentWidget { + + private static ID: number = 0; + + // Editor.IContentWidget.allowEditorOverflow + readonly allowEditorOverflow: boolean = false; + readonly suppressMouseDown: boolean = true; + + private _id: string; + + private _domNode: HTMLElement; + private _disposables: IDisposable[] = []; + private _symbolRange: Range; + private _widgetPosition: editorBrowser.IContentWidgetPosition; + private _editor: editorBrowser.ICodeEditor; + private _commands: { [id: string]: Command } = Object.create(null); + + public constructor( + editor: editorBrowser.ICodeEditor, + symbolRange: Range, + commandService: ICommandService, + messageService: IMessageService + ) { + + this._id = 'codeLensWidget' + (++CodeLensContentWidget.ID); + this._editor = editor; + + this.setSymbolRange(symbolRange); + + this._domNode = document.createElement('span'); + this._domNode.innerHTML = ' '; + dom.addClass(this._domNode, 'codelens-decoration'); + dom.addClass(this._domNode, 'invisible-cl'); + this._updateHeight(); + + this._disposables.push(this._editor.onDidChangeConfiguration(e => { + if (e.fontInfo) { + this._updateHeight(); + } + })); + + this._disposables.push(dom.addDisposableListener(this._domNode, 'click', e => { + let element = e.target; + if (element.tagName === 'A' && element.id) { + let command = this._commands[element.id]; + if (command) { + editor.focus(); + commandService.executeCommand(command.id, ...command.arguments).done(undefined, err => { + messageService.show(Severity.Error, err); + }); + } + } + })); + + this.updateVisibility(); + } + + public dispose(): void { + dispose(this._disposables); + this._symbolRange = null; + } + + private _updateHeight(): void { + const { fontInfo, lineHeight } = this._editor.getConfiguration(); + this._domNode.style.height = `${Math.round(lineHeight * 1.1)}px`; + this._domNode.style.lineHeight = `${lineHeight}px`; + this._domNode.style.fontSize = `${Math.round(fontInfo.fontSize * .9)}px`; + this._domNode.innerHTML = ' '; + } + + public updateVisibility(): void { + if (this.isVisible()) { + dom.removeClass(this._domNode, 'invisible-cl'); + dom.addClass(this._domNode, 'fadein'); + } + } + + public withCommands(symbols: ICodeLensSymbol[]): void { + this._commands = Object.create(null); + if (!symbols || !symbols.length) { + this._domNode.innerHTML = 'no commands'; + return; + } + + let html: string[] = []; + for (let i = 0; i < symbols.length; i++) { + let command = symbols[i].command; + let title = escape(command.title); + let part: string; + if (command.id) { + part = format('{1}', i, title); + this._commands[i] = command; + } else { + part = format('{0}', title); + } + html.push(part); + } + + this._domNode.innerHTML = html.join(' | '); + this._editor.layoutContentWidget(this); + } + + public getId(): string { + return this._id; + } + + public getDomNode(): HTMLElement { + return this._domNode; + } + + public setSymbolRange(range: Range): void { + this._symbolRange = range; + + const lineNumber = range.startLineNumber; + const column = this._editor.getModel().getLineFirstNonWhitespaceColumn(lineNumber); + this._widgetPosition = { + position: { lineNumber: lineNumber, column: column }, + preference: [editorBrowser.ContentWidgetPositionPreference.ABOVE] + }; + } + + public getPosition(): editorBrowser.IContentWidgetPosition { + return this._widgetPosition; + } + + public isVisible(): boolean { + return this._domNode.hasAttribute('monaco-visible-content-widget'); + } +} + +interface IDecorationIdCallback { + (decorationId: string): void; +} + +class CodeLensHelper { + + private _removeDecorations: string[]; + private _addDecorations: editorCommon.IModelDeltaDecoration[]; + private _addDecorationsCallbacks: IDecorationIdCallback[]; + + constructor() { + this._removeDecorations = []; + this._addDecorations = []; + this._addDecorationsCallbacks = []; + } + + public addDecoration(decoration: editorCommon.IModelDeltaDecoration, callback: IDecorationIdCallback): void { + this._addDecorations.push(decoration); + this._addDecorationsCallbacks.push(callback); + } + + public removeDecoration(decorationId: string): void { + this._removeDecorations.push(decorationId); + } + + public commit(changeAccessor: editorCommon.IModelDecorationsChangeAccessor): void { + var resultingDecorations = changeAccessor.deltaDecorations(this._removeDecorations, this._addDecorations); + for (let i = 0, len = resultingDecorations.length; i < len; i++) { + this._addDecorationsCallbacks[i](resultingDecorations[i]); + } + } +} + +class CodeLens { + + private _viewZone: CodeLensViewZone; + private _viewZoneId: number; + private _contentWidget: CodeLensContentWidget; + private _decorationIds: string[]; + private _data: ICodeLensData[]; + private _editor: editorBrowser.ICodeEditor; + + public constructor( + data: ICodeLensData[], + editor: editorBrowser.ICodeEditor, + helper: CodeLensHelper, + viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor, + commandService: ICommandService, messageService: IMessageService, + updateCallabck: Function + ) { + + this._editor = editor; + this._data = data; + this._decorationIds = new Array(this._data.length); + + let range: Range; + this._data.forEach((codeLensData, i) => { + + helper.addDecoration({ + range: codeLensData.symbol.range, + options: ModelDecorationOptions.EMPTY + }, id => this._decorationIds[i] = id); + + // the range contains all lenses on this line + if (!range) { + range = Range.lift(codeLensData.symbol.range); + } else { + range = Range.plusRange(range, codeLensData.symbol.range); + } + }); + + this._contentWidget = new CodeLensContentWidget(editor, range, commandService, messageService); + this._viewZone = new CodeLensViewZone(range.startLineNumber - 1, updateCallabck); + + this._viewZoneId = viewZoneChangeAccessor.addZone(this._viewZone); + this._editor.addContentWidget(this._contentWidget); + } + + public dispose(helper: CodeLensHelper, viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor): void { + while (this._decorationIds.length) { + helper.removeDecoration(this._decorationIds.pop()); + } + if (viewZoneChangeAccessor) { + viewZoneChangeAccessor.removeZone(this._viewZoneId); + } + this._editor.removeContentWidget(this._contentWidget); + + this._contentWidget.dispose(); + } + + public isValid(): boolean { + return this._decorationIds.some((id, i) => { + const range = this._editor.getModel().getDecorationRange(id); + const symbol = this._data[i].symbol; + return range && Range.isEmpty(symbol.range) === range.isEmpty(); + }); + } + + public updateCodeLensSymbols(data: ICodeLensData[], helper: CodeLensHelper): void { + while (this._decorationIds.length) { + helper.removeDecoration(this._decorationIds.pop()); + } + this._data = data; + this._decorationIds = new Array(this._data.length); + this._data.forEach((codeLensData, i) => { + helper.addDecoration({ + range: codeLensData.symbol.range, + options: ModelDecorationOptions.EMPTY + }, id => this._decorationIds[i] = id); + }); + } + + public computeIfNecessary(model: editorCommon.IModel): ICodeLensData[] { + this._contentWidget.updateVisibility(); // trigger the fade in + if (!this._contentWidget.isVisible()) { + return null; + } + + // Read editor current state + for (let i = 0; i < this._decorationIds.length; i++) { + this._data[i].symbol.range = model.getDecorationRange(this._decorationIds[i]); + } + return this._data; + } + + public updateCommands(symbols: ICodeLensSymbol[]): void { + this._contentWidget.withCommands(symbols); + } + + public getLineNumber(): number { + const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]); + if (range) { + return range.startLineNumber; + } + return -1; + } + + public update(viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor): void { + if (this.isValid()) { + const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]); + + this._viewZone.setAfterLineNumber(range.startLineNumber - 1); + viewZoneChangeAccessor.layoutZone(this._viewZoneId); + + this._contentWidget.setSymbolRange(range); + this._editor.layoutContentWidget(this._contentWidget); + } + } +} + +@editorContribution +export class CodeLensContribution implements editorCommon.IEditorContribution { + + private static ID: string = 'css.editor.codeLens'; + + private _isEnabled: boolean; + + private _globalToDispose: IDisposable[]; + private _localToDispose: IDisposable[]; + private _lenses: CodeLens[]; + private _currentFindCodeLensSymbolsPromise: TPromise; + private _modelChangeCounter: number; + private _currentFindOccPromise: TPromise; + private _detectVisibleLenses: RunOnceScheduler; + + constructor( + private _editor: editorBrowser.ICodeEditor, + @ICommandService private _commandService: ICommandService, + @IMessageService private _messageService: IMessageService + ) { + this._isEnabled = this._editor.getConfiguration().contribInfo.codeLens; + + this._globalToDispose = []; + this._localToDispose = []; + this._lenses = []; + this._currentFindCodeLensSymbolsPromise = null; + this._modelChangeCounter = 0; + + this._globalToDispose.push(this._editor.onDidChangeModel(() => this.onModelChange())); + this._globalToDispose.push(this._editor.onDidChangeModelLanguage(() => this.onModelChange())); + this._globalToDispose.push(this._editor.onDidChangeConfiguration((e: IConfigurationChangedEvent) => { + let prevIsEnabled = this._isEnabled; + this._isEnabled = this._editor.getConfiguration().contribInfo.codeLens; + if (prevIsEnabled !== this._isEnabled) { + this.onModelChange(); + } + })); + this._globalToDispose.push(CodeLensProviderRegistry.onDidChange(this.onModelChange, this)); + this.onModelChange(); + } + + public dispose(): void { + this.localDispose(); + this._globalToDispose = dispose(this._globalToDispose); + } + + private localDispose(): void { + if (this._currentFindCodeLensSymbolsPromise) { + this._currentFindCodeLensSymbolsPromise.cancel(); + this._currentFindCodeLensSymbolsPromise = null; + this._modelChangeCounter++; + } + if (this._currentFindOccPromise) { + this._currentFindOccPromise.cancel(); + this._currentFindOccPromise = null; + } + this._localToDispose = dispose(this._localToDispose); + } + + public getId(): string { + return CodeLensContribution.ID; + } + + private onModelChange(): void { + + this.localDispose(); + + const model = this._editor.getModel(); + if (!model) { + return; + } + + if (!this._isEnabled) { + return; + } + + if (!CodeLensProviderRegistry.has(model)) { + return; + } + + for (const provider of CodeLensProviderRegistry.all(model)) { + if (typeof provider.onDidChange === 'function') { + let registration = provider.onDidChange(() => scheduler.schedule()); + this._localToDispose.push(registration); + } + } + + this._detectVisibleLenses = new RunOnceScheduler(() => { + this._onViewportChanged(model.getLanguageIdentifier().language); + }, 500); + + const scheduler = new RunOnceScheduler(() => { + if (this._currentFindCodeLensSymbolsPromise) { + this._currentFindCodeLensSymbolsPromise.cancel(); + } + + this._currentFindCodeLensSymbolsPromise = getCodeLensData(model); + + const counterValue = ++this._modelChangeCounter; + this._currentFindCodeLensSymbolsPromise.then((result) => { + if (counterValue === this._modelChangeCounter) { // only the last one wins + this.renderCodeLensSymbols(result); + this._detectVisibleLenses.schedule(); + } + }, (error) => { + onUnexpectedError(error); + }); + }, 250); + this._localToDispose.push(scheduler); + this._localToDispose.push(this._detectVisibleLenses); + this._localToDispose.push(this._editor.onDidChangeModelContent((e) => { + this._editor.changeDecorations((changeAccessor) => { + this._editor.changeViewZones((viewAccessor) => { + const toDispose: CodeLens[] = []; + this._lenses.forEach((lens) => { + if (lens.isValid()) { + lens.update(viewAccessor); + } else { + toDispose.push(lens); + } + }); + + let helper = new CodeLensHelper(); + toDispose.forEach((l) => { + l.dispose(helper, viewAccessor); + this._lenses.splice(this._lenses.indexOf(l), 1); + }); + helper.commit(changeAccessor); + }); + }); + + // Compute new `visible` code lenses + this._detectVisibleLenses.schedule(); + // Ask for all references again + scheduler.schedule(); + })); + this._localToDispose.push(this._editor.onDidScrollChange(e => { + if (e.scrollTopChanged) { + this._detectVisibleLenses.schedule(); + } + })); + this._localToDispose.push(this._editor.onDidLayoutChange(e => { + this._detectVisibleLenses.schedule(); + })); + this._localToDispose.push({ + dispose: () => { + if (this._editor.getModel()) { + this._editor.changeDecorations((changeAccessor) => { + this._editor.changeViewZones((accessor) => { + this._disposeAllLenses(changeAccessor, accessor); + }); + }); + } else { + // No accessors available + this._disposeAllLenses(null, null); + } + } + }); + + scheduler.schedule(); + } + + private _disposeAllLenses(decChangeAccessor: editorCommon.IModelDecorationsChangeAccessor, viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor): void { + let helper = new CodeLensHelper(); + this._lenses.forEach((lens) => lens.dispose(helper, viewZoneChangeAccessor)); + if (decChangeAccessor) { + helper.commit(decChangeAccessor); + } + this._lenses = []; + } + + private renderCodeLensSymbols(symbols: ICodeLensData[]): void { + if (!this._editor.getModel()) { + return; + } + + let maxLineNumber = this._editor.getModel().getLineCount(); + let groups: ICodeLensData[][] = []; + let lastGroup: ICodeLensData[]; + + for (let symbol of symbols) { + let line = symbol.symbol.range.startLineNumber; + if (line < 1 || line > maxLineNumber) { + // invalid code lens + continue; + } else if (lastGroup && lastGroup[lastGroup.length - 1].symbol.range.startLineNumber === line) { + // on same line as previous + lastGroup.push(symbol); + } else { + // on later line as previous + lastGroup = [symbol]; + groups.push(lastGroup); + } + } + + const centeredRange = this._editor.getCenteredRangeInViewport(); + const shouldRestoreCenteredRange = centeredRange && (groups.length !== this._lenses.length && this._editor.getScrollTop() !== 0); + this._editor.changeDecorations((changeAccessor) => { + this._editor.changeViewZones((accessor) => { + + let codeLensIndex = 0, groupsIndex = 0, helper = new CodeLensHelper(); + + while (groupsIndex < groups.length && codeLensIndex < this._lenses.length) { + + let symbolsLineNumber = groups[groupsIndex][0].symbol.range.startLineNumber; + let codeLensLineNumber = this._lenses[codeLensIndex].getLineNumber(); + + if (codeLensLineNumber < symbolsLineNumber) { + this._lenses[codeLensIndex].dispose(helper, accessor); + this._lenses.splice(codeLensIndex, 1); + } else if (codeLensLineNumber === symbolsLineNumber) { + this._lenses[codeLensIndex].updateCodeLensSymbols(groups[groupsIndex], helper); + groupsIndex++; + codeLensIndex++; + } else { + this._lenses.splice(codeLensIndex, 0, new CodeLens(groups[groupsIndex], this._editor, helper, accessor, this._commandService, this._messageService, () => this._detectVisibleLenses.schedule())); + codeLensIndex++; + groupsIndex++; + } + } + + // Delete extra code lenses + while (codeLensIndex < this._lenses.length) { + this._lenses[codeLensIndex].dispose(helper, accessor); + this._lenses.splice(codeLensIndex, 1); + } + + // Create extra symbols + while (groupsIndex < groups.length) { + this._lenses.push(new CodeLens(groups[groupsIndex], this._editor, helper, accessor, this._commandService, this._messageService, () => this._detectVisibleLenses.schedule())); + groupsIndex++; + } + + helper.commit(changeAccessor); + }); + }); + if (shouldRestoreCenteredRange) { + this._editor.revealRangeInCenter(centeredRange); + } + } + + private _onViewportChanged(modeId: string): void { + if (this._currentFindOccPromise) { + this._currentFindOccPromise.cancel(); + this._currentFindOccPromise = null; + } + + const model = this._editor.getModel(); + if (!model) { + return; + } + + const toResolve: ICodeLensData[][] = []; + const lenses: CodeLens[] = []; + this._lenses.forEach((lens) => { + const request = lens.computeIfNecessary(model); + if (request) { + toResolve.push(request); + lenses.push(lens); + } + }); + + if (toResolve.length === 0) { + return; + } + + const promises = toResolve.map((request, i) => { + + const resolvedSymbols = new Array(request.length); + const promises = request.map((request, i) => { + return asWinJsPromise((token) => { + return request.provider.resolveCodeLens(model, request.symbol, token); + }).then(symbol => { + resolvedSymbols[i] = symbol; + }); + }); + + return TPromise.join(promises).then(() => { + lenses[i].updateCommands(resolvedSymbols); + }); + }); + + this._currentFindOccPromise = TPromise.join(promises).then(() => { + this._currentFindOccPromise = null; + }); + } +} + +registerThemingParticipant((theme, collector) => { + let codeLensForeground = theme.getColor(editorCodeLensForeground); + if (codeLensForeground) { + collector.addRule(`.monaco-editor .codelens-decoration { color: ${codeLensForeground}; }`); + } + let activeLinkForeground = theme.getColor(editorActiveLinkForeground); + if (activeLinkForeground) { + collector.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${activeLinkForeground} !important; }`); + } +}); diff --git a/src/vs/editor/contrib/codelens/common/codelens.ts b/src/vs/editor/contrib/codelens/common/codelens.ts deleted file mode 100644 index 28424195ae2b7..0000000000000 --- a/src/vs/editor/contrib/codelens/common/codelens.ts +++ /dev/null @@ -1,72 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -'use strict'; - -import { illegalArgument, onUnexpectedExternalError } from 'vs/base/common/errors'; -import { stableSort } from 'vs/base/common/arrays'; -import URI from 'vs/base/common/uri'; -import { TPromise } from 'vs/base/common/winjs.base'; -import { IModel } from 'vs/editor/common/editorCommon'; -import { CommonEditorRegistry } from 'vs/editor/common/editorCommonExtensions'; -import { CodeLensProviderRegistry, CodeLensProvider, ICodeLensSymbol } from 'vs/editor/common/modes'; -import { IModelService } from 'vs/editor/common/services/modelService'; -import { asWinJsPromise } from 'vs/base/common/async'; - -export interface ICodeLensData { - symbol: ICodeLensSymbol; - provider: CodeLensProvider; -} - -export function getCodeLensData(model: IModel): TPromise { - - const symbols: ICodeLensData[] = []; - const provider = CodeLensProviderRegistry.ordered(model); - - const promises = provider.map(provider => asWinJsPromise(token => provider.provideCodeLenses(model, token)).then(result => { - if (Array.isArray(result)) { - for (let symbol of result) { - symbols.push({ symbol, provider }); - } - } - }, onUnexpectedExternalError)); - - return TPromise.join(promises).then(() => { - - return stableSort(symbols, (a, b) => { - // sort by lineNumber, provider-rank, and column - if (a.symbol.range.startLineNumber < b.symbol.range.startLineNumber) { - return -1; - } else if (a.symbol.range.startLineNumber > b.symbol.range.startLineNumber) { - return 1; - } else if (provider.indexOf(a.provider) < provider.indexOf(b.provider)) { - return -1; - } else if (provider.indexOf(a.provider) > provider.indexOf(b.provider)) { - return 1; - } else if (a.symbol.range.startColumn < b.symbol.range.startColumn) { - return -1; - } else if (a.symbol.range.startColumn > b.symbol.range.startColumn) { - return 1; - } else { - return 0; - } - }); - }); -} - -CommonEditorRegistry.registerLanguageCommand('_executeCodeLensProvider', function (accessor, args) { - - const { resource } = args; - if (!(resource instanceof URI)) { - throw illegalArgument(); - } - - const model = accessor.get(IModelService).getModel(resource); - if (!model) { - throw illegalArgument(); - } - - return getCodeLensData(model); -}); diff --git a/src/vs/workbench/api/node/extHostApiCommands.ts b/src/vs/workbench/api/node/extHostApiCommands.ts index aef4d71d01fe1..ac762cd7e054c 100644 --- a/src/vs/workbench/api/node/extHostApiCommands.ts +++ b/src/vs/workbench/api/node/extHostApiCommands.ts @@ -16,7 +16,6 @@ import { ICommandHandlerDescription } from 'vs/platform/commands/common/commands import { ExtHostCommands } from 'vs/workbench/api/node/extHostCommands'; import { IOutline } from 'vs/editor/contrib/quickOpen/common/quickOpen'; import { IWorkspaceSymbolProvider } from 'vs/workbench/parts/search/common/search'; -import { ICodeLensData } from 'vs/editor/contrib/codelens/common/codelens'; import { IEditorOptions } from 'vs/platform/editor/common/editor'; export class ExtHostApiCommands { @@ -409,12 +408,12 @@ export class ExtHostApiCommands { private _executeCodeLensProvider(resource: URI): Thenable { const args = { resource }; - return this._commands.executeCommand('_executeCodeLensProvider', args).then(value => { + return this._commands.executeCommand('_executeCodeLensProvider', args).then(value => { if (Array.isArray(value)) { return value.map(item => { return new types.CodeLens( - typeConverters.toRange(item.symbol.range), - this._commands.converter.fromInternal(item.symbol.command)); + typeConverters.toRange(item.range), + this._commands.converter.fromInternal(item.command)); }); } return undefined; diff --git a/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts b/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts index e34efcb9297f2..3cfcedbac4b3b 100644 --- a/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts +++ b/src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts @@ -27,7 +27,7 @@ import { ExtHostDocuments } from 'vs/workbench/api/node/extHostDocuments'; import { ExtHostDocumentsAndEditors } from 'vs/workbench/api/node/extHostDocumentsAndEditors'; import { getDocumentSymbols } from 'vs/editor/contrib/quickOpen/common/quickOpen'; import { DocumentSymbolProviderRegistry, DocumentHighlightKind } from 'vs/editor/common/modes'; -import { getCodeLensData } from 'vs/editor/contrib/codelens/common/codelens'; +import { getCodeLensData } from 'vs/editor/contrib/codelens/browser/codelens'; import { getDefinitionsAtPosition, getImplementationsAtPosition, getTypeDefinitionsAtPosition } from 'vs/editor/contrib/goToDeclaration/browser/goToDeclaration'; import { getHover } from 'vs/editor/contrib/hover/common/hover'; import { getOccurrencesAtPosition } from 'vs/editor/contrib/wordHighlighter/common/wordHighlighter'; From 5fccd2b92cafdaeee8ada20cddac5fd9536229b2 Mon Sep 17 00:00:00 2001 From: isidor Date: Fri, 16 Jun 2017 16:39:05 +0200 Subject: [PATCH 1965/2747] fix issues with having multiple of the same files in different roots --- .../parts/files/browser/views/explorerView.ts | 114 +++++++++--------- .../files/browser/views/explorerViewer.ts | 17 +-- 2 files changed, 64 insertions(+), 67 deletions(-) diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index 4550bab1e120a..b0b6f70f94776 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -421,31 +421,28 @@ export class ExplorerView extends CollapsibleView { return; // ignore if not yet created } - let modelElement: FileStat; - let parents: FileStat[]; - let parentResource: URI; - // Add if (e.operation === FileOperation.CREATE || e.operation === FileOperation.IMPORT || e.operation === FileOperation.COPY) { const addedElement = e.target; - parentResource = URI.file(paths.dirname(addedElement.resource.fsPath)); - parents = this.model.findAll(parentResource); + const parentResource = URI.file(paths.dirname(addedElement.resource.fsPath)); + const parents = this.model.findAll(parentResource); if (parents.length) { // Add the new file to its parent (Model) - const childElement = FileStat.create(addedElement); - parents[0].removeChild(childElement); // make sure to remove any previous version of the file if any - parents[0].addChild(childElement); - - // Refresh the Parent (View) - TPromise.join(parents.map(p => this.explorerViewer.refresh(p))).then(() => { - return this.reveal(childElement, 0.5).then(() => { - - // Focus new element - this.explorerViewer.setFocus(childElement); - }); - }).done(null, errors.onUnexpectedError); + parents.forEach(p => { + const childElement = FileStat.create(addedElement); + p.removeChild(childElement); // make sure to remove any previous version of the file if any + p.addChild(childElement); + // Refresh the Parent (View) + this.explorerViewer.refresh(p).then(() => { + return this.reveal(childElement, 0.5).then(() => { + + // Focus new element + this.explorerViewer.setFocus(childElement); + }); + }).done(null, errors.onUnexpectedError); + }); } } @@ -466,43 +463,39 @@ export class ExplorerView extends CollapsibleView { // Handle Rename if (oldParentResource && newParentResource && oldParentResource.toString() === newParentResource.toString()) { - modelElement = this.model.findFirst(oldResource); - if (modelElement) { - + const modelElements = this.model.findAll(oldResource); + modelElements.forEach(modelElement => { // Rename File (Model) modelElement.rename(newElement); // Update Parent (View) - parents = this.model.findAll(modelElement.parent.resource); - if (parents.length) { - TPromise.join(parents.map(p => this.explorerViewer.refresh(p))).done(() => { - - // Select in Viewer if set - if (restoreFocus) { - this.explorerViewer.setFocus(modelElement); - } - }, errors.onUnexpectedError); - } - } + this.explorerViewer.refresh(modelElement.parent).done(() => { + + // Select in Viewer if set + if (restoreFocus) { + this.explorerViewer.setFocus(modelElement); + } + }, errors.onUnexpectedError); + }); } // Handle Move else if (oldParentResource && newParentResource) { - const oldParents = this.model.findAll(oldParentResource); const newParents = this.model.findAll(newParentResource); - modelElement = this.model.findFirst(oldResource); + const modelElements = this.model.findAll(oldResource); - if (oldParents.length && newParents.length && modelElement) { + if (newParents.length && modelElements.length) { // Move in Model - modelElement.move(newParents[0], (callback: () => void) => { - - // Update old parent - TPromise.join(oldParents.map(p => this.explorerViewer.refresh(p))).done(callback, errors.onUnexpectedError); - }, () => { - - // Update new parent - TPromise.join(newParents.map(p => this.explorerViewer.refresh(p, true))).done(() => this.explorerViewer.expand(newParents[0]), errors.onUnexpectedError); + modelElements.forEach((modelElement, index) => { + const oldParent = modelElement.parent; + modelElement.move(newParents[index], (callback: () => void) => { + // Update old parent + this.explorerViewer.refresh(oldParent).done(callback, errors.onUnexpectedError); + }, () => { + // Update new parent + this.explorerViewer.refresh(newParents[index], true).done(() => this.explorerViewer.expand(newParents[index]), errors.onUnexpectedError); + }); }); } } @@ -510,23 +503,24 @@ export class ExplorerView extends CollapsibleView { // Delete else if (e.operation === FileOperation.DELETE) { - modelElement = this.model.findFirst(e.resource); - if (modelElement && modelElement.parent) { - parents = this.model.findAll(modelElement.parent.resource); - - // Remove Element from Parent (Model) - parents[0].removeChild(modelElement); - - // Refresh Parent (View) - const restoreFocus = this.explorerViewer.isDOMFocused(); - TPromise.join(parents.map(p => this.explorerViewer.refresh(p))).done(() => { - - // Ensure viewer has keyboard focus if event originates from viewer - if (restoreFocus) { - this.explorerViewer.DOMFocus(); - } - }, errors.onUnexpectedError); - } + const modelElements = this.model.findAll(e.resource); + modelElements.forEach(element => { + if (element.parent) { + const parent = element.parent; + // Remove Element from Parent (Model) + parent.removeChild(element); + + // Refresh Parent (View) + const restoreFocus = this.explorerViewer.isDOMFocused(); + this.explorerViewer.refresh(parent).done(() => { + + // Ensure viewer has keyboard focus if event originates from viewer + if (restoreFocus) { + this.explorerViewer.DOMFocus(); + } + }, errors.onUnexpectedError); + } + }); } } diff --git a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts index 16708df7b4f16..f9da410331661 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerViewer.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerViewer.ts @@ -51,14 +51,10 @@ import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { attachInputBoxStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -// Multiple of the same folder in the explorer - id needs to get more complex, add index for the parent -// check context menu actions // special context menu actions for root -// more checks might be needed for drag n drop +// expand state in second root // step2: deleting one of the root folders -// Resolve me all the expansion state in one go // revealing an element might be tricky if it is in two workspaces, in that case just reveal the first to not break. Not a common scenario - // files.exclude, for each of the roots ask the configurations service for files.exclude export class FileDataSource implements IDataSource { @@ -75,8 +71,15 @@ export class FileDataSource implements IDataSource { return 'model'; } - const root = this.contextService.getRoot(stat.resource); - return `${root ? root.toString() : ''}:${stat.getId()}`; + // TODO@Isidor each file stat should have a reference to the root, this way you do not have to walk up the parent chain + let parent = stat.parent; + let depth = 0; + while (parent) { + parent = parent.parent; + depth++; + } + + return `${depth}:${stat.getId()}`; } public hasChildren(tree: ITree, stat: FileStat | Model): boolean { From e3a6a37e0f5bb2cfdd8517aab31403c388be4b60 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 16 Jun 2017 16:45:02 +0200 Subject: [PATCH 1966/2747] debt - move codeLenseWidget into its own file --- .../codelens/browser/codelensController.ts | 367 +----------------- ...elensController.css => codelensWidget.css} | 0 .../codelens/browser/codelensWidget.ts | 339 ++++++++++++++++ 3 files changed, 355 insertions(+), 351 deletions(-) rename src/vs/editor/contrib/codelens/browser/{codelensController.css => codelensWidget.css} (100%) create mode 100644 src/vs/editor/contrib/codelens/browser/codelensWidget.ts diff --git a/src/vs/editor/contrib/codelens/browser/codelensController.ts b/src/vs/editor/contrib/codelens/browser/codelensController.ts index c43b02b73e9a7..948753823013e 100644 --- a/src/vs/editor/contrib/codelens/browser/codelensController.ts +++ b/src/vs/editor/contrib/codelens/browser/codelensController.ts @@ -5,341 +5,19 @@ 'use strict'; -import 'vs/css!./codelensController'; import { RunOnceScheduler, asWinJsPromise } from 'vs/base/common/async'; import { onUnexpectedError } from 'vs/base/common/errors'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; -import Severity from 'vs/base/common/severity'; -import { format, escape } from 'vs/base/common/strings'; import { TPromise } from 'vs/base/common/winjs.base'; -import * as dom from 'vs/base/browser/dom'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IMessageService } from 'vs/platform/message/common/message'; -import { Range } from 'vs/editor/common/core/range'; import * as editorCommon from 'vs/editor/common/editorCommon'; -import { CodeLensProviderRegistry, ICodeLensSymbol, Command } from 'vs/editor/common/modes'; +import { CodeLensProviderRegistry, ICodeLensSymbol } from 'vs/editor/common/modes'; import * as editorBrowser from 'vs/editor/browser/editorBrowser'; import { editorContribution } from 'vs/editor/browser/editorBrowserExtensions'; import { ICodeLensData, getCodeLensData } from './codelens'; import { IConfigurationChangedEvent } from 'vs/editor/common/config/editorOptions'; -import { editorCodeLensForeground } from 'vs/editor/common/view/editorColorRegistry'; -import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; -import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; - - -class CodeLensViewZone implements editorBrowser.IViewZone { - - public afterLineNumber: number; - public heightInLines: number; - public suppressMouseDown: boolean; - public domNode: HTMLElement; - private _lastHeight: number; - private _onHeight: Function; - - constructor(afterLineNumber: number, onHeight: Function) { - this.afterLineNumber = afterLineNumber; - this._onHeight = onHeight; - - this.heightInLines = 1; - this.suppressMouseDown = true; - this.domNode = document.createElement('div'); - } - - public setAfterLineNumber(afterLineNumber: number): void { - this.afterLineNumber = afterLineNumber; - } - - onComputedHeight(height: number): void { - if (this._lastHeight === undefined) { - this._lastHeight = height; - } else if (this._lastHeight !== height) { - this._lastHeight = height; - this._onHeight(); - } - } - -} - -class CodeLensContentWidget implements editorBrowser.IContentWidget { - - private static ID: number = 0; - - // Editor.IContentWidget.allowEditorOverflow - readonly allowEditorOverflow: boolean = false; - readonly suppressMouseDown: boolean = true; - - private _id: string; - - private _domNode: HTMLElement; - private _disposables: IDisposable[] = []; - private _symbolRange: Range; - private _widgetPosition: editorBrowser.IContentWidgetPosition; - private _editor: editorBrowser.ICodeEditor; - private _commands: { [id: string]: Command } = Object.create(null); - - public constructor( - editor: editorBrowser.ICodeEditor, - symbolRange: Range, - commandService: ICommandService, - messageService: IMessageService - ) { - - this._id = 'codeLensWidget' + (++CodeLensContentWidget.ID); - this._editor = editor; - - this.setSymbolRange(symbolRange); - - this._domNode = document.createElement('span'); - this._domNode.innerHTML = ' '; - dom.addClass(this._domNode, 'codelens-decoration'); - dom.addClass(this._domNode, 'invisible-cl'); - this._updateHeight(); - - this._disposables.push(this._editor.onDidChangeConfiguration(e => { - if (e.fontInfo) { - this._updateHeight(); - } - })); - - this._disposables.push(dom.addDisposableListener(this._domNode, 'click', e => { - let element = e.target; - if (element.tagName === 'A' && element.id) { - let command = this._commands[element.id]; - if (command) { - editor.focus(); - commandService.executeCommand(command.id, ...command.arguments).done(undefined, err => { - messageService.show(Severity.Error, err); - }); - } - } - })); - - this.updateVisibility(); - } - - public dispose(): void { - dispose(this._disposables); - this._symbolRange = null; - } - - private _updateHeight(): void { - const { fontInfo, lineHeight } = this._editor.getConfiguration(); - this._domNode.style.height = `${Math.round(lineHeight * 1.1)}px`; - this._domNode.style.lineHeight = `${lineHeight}px`; - this._domNode.style.fontSize = `${Math.round(fontInfo.fontSize * .9)}px`; - this._domNode.innerHTML = ' '; - } - - public updateVisibility(): void { - if (this.isVisible()) { - dom.removeClass(this._domNode, 'invisible-cl'); - dom.addClass(this._domNode, 'fadein'); - } - } - - public withCommands(symbols: ICodeLensSymbol[]): void { - this._commands = Object.create(null); - if (!symbols || !symbols.length) { - this._domNode.innerHTML = 'no commands'; - return; - } - - let html: string[] = []; - for (let i = 0; i < symbols.length; i++) { - let command = symbols[i].command; - let title = escape(command.title); - let part: string; - if (command.id) { - part = format('{1}', i, title); - this._commands[i] = command; - } else { - part = format('{0}', title); - } - html.push(part); - } - - this._domNode.innerHTML = html.join(' | '); - this._editor.layoutContentWidget(this); - } - - public getId(): string { - return this._id; - } - - public getDomNode(): HTMLElement { - return this._domNode; - } - - public setSymbolRange(range: Range): void { - this._symbolRange = range; - - const lineNumber = range.startLineNumber; - const column = this._editor.getModel().getLineFirstNonWhitespaceColumn(lineNumber); - this._widgetPosition = { - position: { lineNumber: lineNumber, column: column }, - preference: [editorBrowser.ContentWidgetPositionPreference.ABOVE] - }; - } - - public getPosition(): editorBrowser.IContentWidgetPosition { - return this._widgetPosition; - } - - public isVisible(): boolean { - return this._domNode.hasAttribute('monaco-visible-content-widget'); - } -} - -interface IDecorationIdCallback { - (decorationId: string): void; -} - -class CodeLensHelper { - - private _removeDecorations: string[]; - private _addDecorations: editorCommon.IModelDeltaDecoration[]; - private _addDecorationsCallbacks: IDecorationIdCallback[]; - - constructor() { - this._removeDecorations = []; - this._addDecorations = []; - this._addDecorationsCallbacks = []; - } - - public addDecoration(decoration: editorCommon.IModelDeltaDecoration, callback: IDecorationIdCallback): void { - this._addDecorations.push(decoration); - this._addDecorationsCallbacks.push(callback); - } - - public removeDecoration(decorationId: string): void { - this._removeDecorations.push(decorationId); - } - - public commit(changeAccessor: editorCommon.IModelDecorationsChangeAccessor): void { - var resultingDecorations = changeAccessor.deltaDecorations(this._removeDecorations, this._addDecorations); - for (let i = 0, len = resultingDecorations.length; i < len; i++) { - this._addDecorationsCallbacks[i](resultingDecorations[i]); - } - } -} - -class CodeLens { - - private _viewZone: CodeLensViewZone; - private _viewZoneId: number; - private _contentWidget: CodeLensContentWidget; - private _decorationIds: string[]; - private _data: ICodeLensData[]; - private _editor: editorBrowser.ICodeEditor; - - public constructor( - data: ICodeLensData[], - editor: editorBrowser.ICodeEditor, - helper: CodeLensHelper, - viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor, - commandService: ICommandService, messageService: IMessageService, - updateCallabck: Function - ) { - - this._editor = editor; - this._data = data; - this._decorationIds = new Array(this._data.length); - - let range: Range; - this._data.forEach((codeLensData, i) => { - - helper.addDecoration({ - range: codeLensData.symbol.range, - options: ModelDecorationOptions.EMPTY - }, id => this._decorationIds[i] = id); - - // the range contains all lenses on this line - if (!range) { - range = Range.lift(codeLensData.symbol.range); - } else { - range = Range.plusRange(range, codeLensData.symbol.range); - } - }); - - this._contentWidget = new CodeLensContentWidget(editor, range, commandService, messageService); - this._viewZone = new CodeLensViewZone(range.startLineNumber - 1, updateCallabck); - - this._viewZoneId = viewZoneChangeAccessor.addZone(this._viewZone); - this._editor.addContentWidget(this._contentWidget); - } - - public dispose(helper: CodeLensHelper, viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor): void { - while (this._decorationIds.length) { - helper.removeDecoration(this._decorationIds.pop()); - } - if (viewZoneChangeAccessor) { - viewZoneChangeAccessor.removeZone(this._viewZoneId); - } - this._editor.removeContentWidget(this._contentWidget); - - this._contentWidget.dispose(); - } - - public isValid(): boolean { - return this._decorationIds.some((id, i) => { - const range = this._editor.getModel().getDecorationRange(id); - const symbol = this._data[i].symbol; - return range && Range.isEmpty(symbol.range) === range.isEmpty(); - }); - } - - public updateCodeLensSymbols(data: ICodeLensData[], helper: CodeLensHelper): void { - while (this._decorationIds.length) { - helper.removeDecoration(this._decorationIds.pop()); - } - this._data = data; - this._decorationIds = new Array(this._data.length); - this._data.forEach((codeLensData, i) => { - helper.addDecoration({ - range: codeLensData.symbol.range, - options: ModelDecorationOptions.EMPTY - }, id => this._decorationIds[i] = id); - }); - } - - public computeIfNecessary(model: editorCommon.IModel): ICodeLensData[] { - this._contentWidget.updateVisibility(); // trigger the fade in - if (!this._contentWidget.isVisible()) { - return null; - } - - // Read editor current state - for (let i = 0; i < this._decorationIds.length; i++) { - this._data[i].symbol.range = model.getDecorationRange(this._decorationIds[i]); - } - return this._data; - } - - public updateCommands(symbols: ICodeLensSymbol[]): void { - this._contentWidget.withCommands(symbols); - } - - public getLineNumber(): number { - const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]); - if (range) { - return range.startLineNumber; - } - return -1; - } - - public update(viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor): void { - if (this.isValid()) { - const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]); - - this._viewZone.setAfterLineNumber(range.startLineNumber - 1); - viewZoneChangeAccessor.layoutZone(this._viewZoneId); - - this._contentWidget.setSymbolRange(range); - this._editor.layoutContentWidget(this._contentWidget); - } - } -} +import { CodeLens, CodeLensHelper } from "vs/editor/contrib/codelens/browser/codelensWidget"; @editorContribution export class CodeLensContribution implements editorCommon.IEditorContribution { @@ -369,25 +47,25 @@ export class CodeLensContribution implements editorCommon.IEditorContribution { this._currentFindCodeLensSymbolsPromise = null; this._modelChangeCounter = 0; - this._globalToDispose.push(this._editor.onDidChangeModel(() => this.onModelChange())); - this._globalToDispose.push(this._editor.onDidChangeModelLanguage(() => this.onModelChange())); + this._globalToDispose.push(this._editor.onDidChangeModel(() => this._onModelChange())); + this._globalToDispose.push(this._editor.onDidChangeModelLanguage(() => this._onModelChange())); this._globalToDispose.push(this._editor.onDidChangeConfiguration((e: IConfigurationChangedEvent) => { let prevIsEnabled = this._isEnabled; this._isEnabled = this._editor.getConfiguration().contribInfo.codeLens; if (prevIsEnabled !== this._isEnabled) { - this.onModelChange(); + this._onModelChange(); } })); - this._globalToDispose.push(CodeLensProviderRegistry.onDidChange(this.onModelChange, this)); - this.onModelChange(); + this._globalToDispose.push(CodeLensProviderRegistry.onDidChange(this._onModelChange, this)); + this._onModelChange(); } - public dispose(): void { - this.localDispose(); + dispose(): void { + this._localDispose(); this._globalToDispose = dispose(this._globalToDispose); } - private localDispose(): void { + private _localDispose(): void { if (this._currentFindCodeLensSymbolsPromise) { this._currentFindCodeLensSymbolsPromise.cancel(); this._currentFindCodeLensSymbolsPromise = null; @@ -400,13 +78,13 @@ export class CodeLensContribution implements editorCommon.IEditorContribution { this._localToDispose = dispose(this._localToDispose); } - public getId(): string { + getId(): string { return CodeLensContribution.ID; } - private onModelChange(): void { + private _onModelChange(): void { - this.localDispose(); + this._localDispose(); const model = this._editor.getModel(); if (!model) { @@ -442,12 +120,10 @@ export class CodeLensContribution implements editorCommon.IEditorContribution { const counterValue = ++this._modelChangeCounter; this._currentFindCodeLensSymbolsPromise.then((result) => { if (counterValue === this._modelChangeCounter) { // only the last one wins - this.renderCodeLensSymbols(result); + this._renderCodeLensSymbols(result); this._detectVisibleLenses.schedule(); } - }, (error) => { - onUnexpectedError(error); - }); + }, onUnexpectedError); }, 250); this._localToDispose.push(scheduler); this._localToDispose.push(this._detectVisibleLenses); @@ -512,7 +188,7 @@ export class CodeLensContribution implements editorCommon.IEditorContribution { this._lenses = []; } - private renderCodeLensSymbols(symbols: ICodeLensData[]): void { + private _renderCodeLensSymbols(symbols: ICodeLensData[]): void { if (!this._editor.getModel()) { return; } @@ -628,14 +304,3 @@ export class CodeLensContribution implements editorCommon.IEditorContribution { }); } } - -registerThemingParticipant((theme, collector) => { - let codeLensForeground = theme.getColor(editorCodeLensForeground); - if (codeLensForeground) { - collector.addRule(`.monaco-editor .codelens-decoration { color: ${codeLensForeground}; }`); - } - let activeLinkForeground = theme.getColor(editorActiveLinkForeground); - if (activeLinkForeground) { - collector.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${activeLinkForeground} !important; }`); - } -}); diff --git a/src/vs/editor/contrib/codelens/browser/codelensController.css b/src/vs/editor/contrib/codelens/browser/codelensWidget.css similarity index 100% rename from src/vs/editor/contrib/codelens/browser/codelensController.css rename to src/vs/editor/contrib/codelens/browser/codelensWidget.css diff --git a/src/vs/editor/contrib/codelens/browser/codelensWidget.ts b/src/vs/editor/contrib/codelens/browser/codelensWidget.ts new file mode 100644 index 0000000000000..d0c45ac46f32b --- /dev/null +++ b/src/vs/editor/contrib/codelens/browser/codelensWidget.ts @@ -0,0 +1,339 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import 'vs/css!./codelensController'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; +import Severity from 'vs/base/common/severity'; +import { format, escape } from 'vs/base/common/strings'; +import * as dom from 'vs/base/browser/dom'; +import { ICommandService } from 'vs/platform/commands/common/commands'; +import { IMessageService } from 'vs/platform/message/common/message'; +import { Range } from 'vs/editor/common/core/range'; +import * as editorCommon from 'vs/editor/common/editorCommon'; +import { ICodeLensSymbol, Command } from 'vs/editor/common/modes'; +import * as editorBrowser from 'vs/editor/browser/editorBrowser'; +import { ICodeLensData } from './codelens'; +import { ModelDecorationOptions } from 'vs/editor/common/model/textModelWithDecorations'; +import { editorCodeLensForeground } from 'vs/editor/common/view/editorColorRegistry'; +import { registerThemingParticipant } from 'vs/platform/theme/common/themeService'; +import { editorActiveLinkForeground } from 'vs/platform/theme/common/colorRegistry'; + +class CodeLensViewZone implements editorBrowser.IViewZone { + + readonly heightInLines: number; + readonly suppressMouseDown: boolean; + readonly domNode: HTMLElement; + + afterLineNumber: number; + + private _lastHeight: number; + private _onHeight: Function; + + constructor(afterLineNumber: number, onHeight: Function) { + this.afterLineNumber = afterLineNumber; + this._onHeight = onHeight; + + this.heightInLines = 1; + this.suppressMouseDown = true; + this.domNode = document.createElement('div'); + } + + onComputedHeight(height: number): void { + if (this._lastHeight === undefined) { + this._lastHeight = height; + } else if (this._lastHeight !== height) { + this._lastHeight = height; + this._onHeight(); + } + } +} + +class CodeLensContentWidget implements editorBrowser.IContentWidget { + + private static _idPool: number = 0; + + // Editor.IContentWidget.allowEditorOverflow + readonly allowEditorOverflow: boolean = false; + readonly suppressMouseDown: boolean = true; + + private readonly _id: string; + private readonly _domNode: HTMLElement; + private readonly _disposables: IDisposable[] = []; + private readonly _editor: editorBrowser.ICodeEditor; + + private _symbolRange: Range; + private _widgetPosition: editorBrowser.IContentWidgetPosition; + private _commands: { [id: string]: Command } = Object.create(null); + + constructor( + editor: editorBrowser.ICodeEditor, + symbolRange: Range, + commandService: ICommandService, + messageService: IMessageService + ) { + + this._id = 'codeLensWidget' + (++CodeLensContentWidget._idPool); + this._editor = editor; + + this.setSymbolRange(symbolRange); + + this._domNode = document.createElement('span'); + this._domNode.innerHTML = ' '; + dom.addClass(this._domNode, 'codelens-decoration'); + dom.addClass(this._domNode, 'invisible-cl'); + this._updateHeight(); + + this._disposables.push(this._editor.onDidChangeConfiguration(e => e.fontInfo && this._updateHeight())); + + this._disposables.push(dom.addDisposableListener(this._domNode, 'click', e => { + let element = e.target; + if (element.tagName === 'A' && element.id) { + let command = this._commands[element.id]; + if (command) { + editor.focus(); + commandService.executeCommand(command.id, ...command.arguments).done(undefined, err => { + messageService.show(Severity.Error, err); + }); + } + } + })); + + this.updateVisibility(); + } + + dispose(): void { + dispose(this._disposables); + this._symbolRange = null; + } + + private _updateHeight(): void { + const { fontInfo, lineHeight } = this._editor.getConfiguration(); + this._domNode.style.height = `${Math.round(lineHeight * 1.1)}px`; + this._domNode.style.lineHeight = `${lineHeight}px`; + this._domNode.style.fontSize = `${Math.round(fontInfo.fontSize * .9)}px`; + this._domNode.innerHTML = ' '; + } + + updateVisibility(): void { + if (this.isVisible()) { + dom.removeClass(this._domNode, 'invisible-cl'); + dom.addClass(this._domNode, 'fadein'); + } + } + + withCommands(symbols: ICodeLensSymbol[]): void { + this._commands = Object.create(null); + if (!symbols || !symbols.length) { + this._domNode.innerHTML = 'no commands'; + return; + } + + let html: string[] = []; + for (let i = 0; i < symbols.length; i++) { + let command = symbols[i].command; + let title = escape(command.title); + let part: string; + if (command.id) { + part = format('{1}', i, title); + this._commands[i] = command; + } else { + part = format('{0}', title); + } + html.push(part); + } + + this._domNode.innerHTML = html.join(' | '); + this._editor.layoutContentWidget(this); + } + + getId(): string { + return this._id; + } + + getDomNode(): HTMLElement { + return this._domNode; + } + + setSymbolRange(range: Range): void { + this._symbolRange = range; + + const lineNumber = range.startLineNumber; + const column = this._editor.getModel().getLineFirstNonWhitespaceColumn(lineNumber); + this._widgetPosition = { + position: { lineNumber: lineNumber, column: column }, + preference: [editorBrowser.ContentWidgetPositionPreference.ABOVE] + }; + } + + getPosition(): editorBrowser.IContentWidgetPosition { + return this._widgetPosition; + } + + isVisible(): boolean { + return this._domNode.hasAttribute('monaco-visible-content-widget'); + } +} + +export interface IDecorationIdCallback { + (decorationId: string): void; +} + +export class CodeLensHelper { + + private _removeDecorations: string[]; + private _addDecorations: editorCommon.IModelDeltaDecoration[]; + private _addDecorationsCallbacks: IDecorationIdCallback[]; + + constructor() { + this._removeDecorations = []; + this._addDecorations = []; + this._addDecorationsCallbacks = []; + } + + addDecoration(decoration: editorCommon.IModelDeltaDecoration, callback: IDecorationIdCallback): void { + this._addDecorations.push(decoration); + this._addDecorationsCallbacks.push(callback); + } + + removeDecoration(decorationId: string): void { + this._removeDecorations.push(decorationId); + } + + commit(changeAccessor: editorCommon.IModelDecorationsChangeAccessor): void { + var resultingDecorations = changeAccessor.deltaDecorations(this._removeDecorations, this._addDecorations); + for (let i = 0, len = resultingDecorations.length; i < len; i++) { + this._addDecorationsCallbacks[i](resultingDecorations[i]); + } + } +} + +export class CodeLens { + + private readonly _editor: editorBrowser.ICodeEditor; + private readonly _viewZone: CodeLensViewZone; + private readonly _viewZoneId: number; + private readonly _contentWidget: CodeLensContentWidget; + private _decorationIds: string[]; + private _data: ICodeLensData[]; + + constructor( + data: ICodeLensData[], + editor: editorBrowser.ICodeEditor, + helper: CodeLensHelper, + viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor, + commandService: ICommandService, messageService: IMessageService, + updateCallabck: Function + ) { + this._editor = editor; + this._data = data; + this._decorationIds = new Array(this._data.length); + + let range: Range; + this._data.forEach((codeLensData, i) => { + + helper.addDecoration({ + range: codeLensData.symbol.range, + options: ModelDecorationOptions.EMPTY + }, id => this._decorationIds[i] = id); + + // the range contains all lenses on this line + if (!range) { + range = Range.lift(codeLensData.symbol.range); + } else { + range = Range.plusRange(range, codeLensData.symbol.range); + } + }); + + this._contentWidget = new CodeLensContentWidget(editor, range, commandService, messageService); + this._viewZone = new CodeLensViewZone(range.startLineNumber - 1, updateCallabck); + + this._viewZoneId = viewZoneChangeAccessor.addZone(this._viewZone); + this._editor.addContentWidget(this._contentWidget); + } + + dispose(helper: CodeLensHelper, viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor): void { + while (this._decorationIds.length) { + helper.removeDecoration(this._decorationIds.pop()); + } + if (viewZoneChangeAccessor) { + viewZoneChangeAccessor.removeZone(this._viewZoneId); + } + this._editor.removeContentWidget(this._contentWidget); + + this._contentWidget.dispose(); + } + + isValid(): boolean { + return this._decorationIds.some((id, i) => { + const range = this._editor.getModel().getDecorationRange(id); + const symbol = this._data[i].symbol; + return range && Range.isEmpty(symbol.range) === range.isEmpty(); + }); + } + + updateCodeLensSymbols(data: ICodeLensData[], helper: CodeLensHelper): void { + while (this._decorationIds.length) { + helper.removeDecoration(this._decorationIds.pop()); + } + this._data = data; + this._decorationIds = new Array(this._data.length); + this._data.forEach((codeLensData, i) => { + helper.addDecoration({ + range: codeLensData.symbol.range, + options: ModelDecorationOptions.EMPTY + }, id => this._decorationIds[i] = id); + }); + } + + computeIfNecessary(model: editorCommon.IModel): ICodeLensData[] { + this._contentWidget.updateVisibility(); // trigger the fade in + if (!this._contentWidget.isVisible()) { + return null; + } + + // Read editor current state + for (let i = 0; i < this._decorationIds.length; i++) { + this._data[i].symbol.range = model.getDecorationRange(this._decorationIds[i]); + } + return this._data; + } + + updateCommands(symbols: ICodeLensSymbol[]): void { + this._contentWidget.withCommands(symbols); + } + + getLineNumber(): number { + const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]); + if (range) { + return range.startLineNumber; + } + return -1; + } + + update(viewZoneChangeAccessor: editorBrowser.IViewZoneChangeAccessor): void { + if (this.isValid()) { + const range = this._editor.getModel().getDecorationRange(this._decorationIds[0]); + + this._viewZone.afterLineNumber = range.startLineNumber - 1; + viewZoneChangeAccessor.layoutZone(this._viewZoneId); + + this._contentWidget.setSymbolRange(range); + this._editor.layoutContentWidget(this._contentWidget); + } + } +} + +registerThemingParticipant((theme, collector) => { + let codeLensForeground = theme.getColor(editorCodeLensForeground); + if (codeLensForeground) { + collector.addRule(`.monaco-editor .codelens-decoration { color: ${codeLensForeground}; }`); + } + let activeLinkForeground = theme.getColor(editorActiveLinkForeground); + if (activeLinkForeground) { + collector.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${activeLinkForeground} !important; }`); + } +}); From e86733e2a0a2a48f68289ce1c59c7bf3b855bc1a Mon Sep 17 00:00:00 2001 From: Michel Kaporin Date: Fri, 16 Jun 2017 17:12:49 +0200 Subject: [PATCH 1967/2747] Added smoke test environment configuration for Linux. --- build/tfs/linux/smoketest.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/tfs/linux/smoketest.sh b/build/tfs/linux/smoketest.sh index 54f18db177415..f9848f6b1d36e 100644 --- a/build/tfs/linux/smoketest.sh +++ b/build/tfs/linux/smoketest.sh @@ -25,6 +25,13 @@ step "Install distro dependencies" \ step "Build minified" \ npm run gulp -- --max_old_space_size=4096 "vscode-linux-$ARCH-min" +step "Configure environment" \ + id -u testuser &>/dev/null || (useradd -m testuser; echo -e "testpassword\ntestpassword" | passwd testuser &>/dev/null) + su testuser + cd $BUILD_REPOSITORY_LOCALPATH + git config --global user.name "Michel Kaporin" + git config --global user.email "monacotools@microsoft.com" + step "Run smoke test" \ pushd test/smoke npm install From 748ceac184c45cd1297ccdd5021c0627575c8738 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 16 Jun 2017 13:05:38 +0200 Subject: [PATCH 1968/2747] Add tslint rules for vs/base/test/common and vs/base/test/browser --- .../quickopen}/test/browser/quickopen.test.ts | 0 tslint.json | 22 +++++++++++++++++++ 2 files changed, 22 insertions(+) rename src/vs/base/{ => parts/quickopen}/test/browser/quickopen.test.ts (100%) diff --git a/src/vs/base/test/browser/quickopen.test.ts b/src/vs/base/parts/quickopen/test/browser/quickopen.test.ts similarity index 100% rename from src/vs/base/test/browser/quickopen.test.ts rename to src/vs/base/parts/quickopen/test/browser/quickopen.test.ts diff --git a/tslint.json b/tslint.json index 3cb9ec3a3e306..58f72c3296524 100644 --- a/tslint.json +++ b/tslint.json @@ -57,6 +57,16 @@ "**/vs/base/common/**" ] }, + { + // vs/base/test/common contains tests for vs/base/common + "target": "**/vs/base/test/common/**", + "restrictions": [ + "assert", + "vs/nls", + "**/vs/base/common/**", + "**/vs/base/test/common/**" + ] + }, { // vs/base/browser can only depend on vs/base/common "target": "**/vs/base/browser/**", @@ -67,6 +77,18 @@ "**/vs/base/browser/**" ] }, + { + // vs/base/test/browser contains tests for vs/base/browser + "target": "**/vs/base/test/browser/**", + "restrictions": [ + "assert", + "vs/nls", + "**/vs/base/common/**", + "**/vs/base/test/common/**", + "**/vs/base/browser/**", + "**/vs/base/test/browser/**" + ] + }, { "target": "**/vs/editor/contrib/**", "restrictions": [ From 494b7b7d0124a75cd0415cde1681e34617694f13 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 16 Jun 2017 16:06:27 +0200 Subject: [PATCH 1969/2747] Bring "hidden" code out in the open --- src/vs/base/common/errors.ts | 53 +++++++++++++++++++++++++++++- src/vs/base/common/winjs.base.d.ts | 17 ++++++++++ src/vs/base/common/winjs.base.js | 53 ++---------------------------- 3 files changed, 71 insertions(+), 52 deletions(-) diff --git a/src/vs/base/common/errors.ts b/src/vs/base/common/errors.ts index 7367358de17e9..26d3df040c912 100644 --- a/src/vs/base/common/errors.ts +++ b/src/vs/base/common/errors.ts @@ -8,7 +8,58 @@ import platform = require('vs/base/common/platform'); import types = require('vs/base/common/types'); import { IAction } from 'vs/base/common/actions'; import Severity from 'vs/base/common/severity'; -import { TPromise } from 'vs/base/common/winjs.base'; +import { TPromise, IPromiseError, IPromiseErrorDetail } from 'vs/base/common/winjs.base'; + +// ------ BEGIN Hook up error listeners to winjs promises + +let outstandingPromiseErrors: { [id: string]: IPromiseErrorDetail; } = {}; +function promiseErrorHandler(e: IPromiseError): void { + + // + // e.detail looks like: { exception, error, promise, handler, id, parent } + // + var details = e.detail; + var id = details.id; + + // If the error has a parent promise then this is not the origination of the + // error so we check if it has a handler, and if so we mark that the error + // was handled by removing it from outstandingPromiseErrors + // + if (details.parent) { + if (details.handler && outstandingPromiseErrors) { + delete outstandingPromiseErrors[id]; + } + return; + } + + // Indicate that this error was originated and needs to be handled + outstandingPromiseErrors[id] = details; + + // The first time the queue fills up this iteration, schedule a timeout to + // check if any errors are still unhandled. + if (Object.keys(outstandingPromiseErrors).length === 1) { + setTimeout(function () { + var errors = outstandingPromiseErrors; + outstandingPromiseErrors = {}; + Object.keys(errors).forEach(function (errorId) { + var error = errors[errorId]; + if (error.exception) { + onUnexpectedError(error.exception); + } else if (error.error) { + onUnexpectedError(error.error); + } + console.log('WARNING: Promise with no error callback:' + error.id); + console.log(error); + if (error.exception) { + console.log(error.exception.stack); + } + }); + }, 0); + } +} +TPromise.addEventListener('error', promiseErrorHandler); + +// ------ END Hook up error listeners to winjs promises export interface ErrorListenerCallback { (error: any): void; diff --git a/src/vs/base/common/winjs.base.d.ts b/src/vs/base/common/winjs.base.d.ts index ea35630cf374e..8e7a1afe3a9f6 100644 --- a/src/vs/base/common/winjs.base.d.ts +++ b/src/vs/base/common/winjs.base.d.ts @@ -55,6 +55,18 @@ export interface TProgressCallback { (progress: T): void; } +interface IPromiseErrorDetail { + parent: TPromise; + error: any; + id: number; + handler: Function; + exception: Error; +} + +interface IPromiseError { + detail: IPromiseErrorDetail; +} + /** * A Promise implementation that supports progress and cancelation. */ @@ -95,6 +107,11 @@ export declare class TPromise { public static wrap(value: ValueType): TPromise; public static wrapError(error: any): TPromise; + + /** + * @internal + */ + public static addEventListener(event: 'error', promiseErrorHandler: (e: IPromiseError) => void); } // --- Generic promise with generic progress value diff --git a/src/vs/base/common/winjs.base.js b/src/vs/base/common/winjs.base.js index d8e7516a0d938..aea7370ed16e7 100644 --- a/src/vs/base/common/winjs.base.js +++ b/src/vs/base/common/winjs.base.js @@ -3,60 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -define(['./winjs.base.raw', 'vs/base/common/errors'], function (winjs, __Errors__) { +define(['./winjs.base.raw'], function (winjs) { 'use strict'; - - var outstandingPromiseErrors = {}; - function promiseErrorHandler(e) { - - // - // e.detail looks like: { exception, error, promise, handler, id, parent } - // - var details = e.detail; - var id = details.id; - - // If the error has a parent promise then this is not the origination of the - // error so we check if it has a handler, and if so we mark that the error - // was handled by removing it from outstandingPromiseErrors - // - if (details.parent) { - if (details.handler && outstandingPromiseErrors) { - delete outstandingPromiseErrors[id]; - } - return; - } - - // Indicate that this error was originated and needs to be handled - outstandingPromiseErrors[id] = details; - - // The first time the queue fills up this iteration, schedule a timeout to - // check if any errors are still unhandled. - if (Object.keys(outstandingPromiseErrors).length === 1) { - setTimeout(function () { - var errors = outstandingPromiseErrors; - outstandingPromiseErrors = {}; - Object.keys(errors).forEach(function (errorId) { - var error = errors[errorId]; - if(error.exception) { - __Errors__.onUnexpectedError(error.exception); - } else if(error.error) { - __Errors__.onUnexpectedError(error.error); - } - console.log("WARNING: Promise with no error callback:" + error.id); - console.log(error); - if(error.exception) { - console.log(error.exception.stack); - } - }); - }, 0); - } - } - - winjs.Promise.addEventListener("error", promiseErrorHandler); - return { Promise: winjs.Promise, TPromise: winjs.Promise, PPromise: winjs.Promise }; -}); \ No newline at end of file +}); From 3d2eec85d61880c2ae53f872319484cb9a3ac83c Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Fri, 16 Jun 2017 18:04:37 +0200 Subject: [PATCH 1970/2747] Enforce more dependency rules via TS Lint --- src/vs/editor/{browser => }/editor.all.ts | 0 src/vs/editor/editor.main.ts | 2 +- .../electron-browser/workbench.main.ts | 2 +- tslint.json | 74 +++++++++++++++++++ 4 files changed, 76 insertions(+), 2 deletions(-) rename src/vs/editor/{browser => }/editor.all.ts (100%) diff --git a/src/vs/editor/browser/editor.all.ts b/src/vs/editor/editor.all.ts similarity index 100% rename from src/vs/editor/browser/editor.all.ts rename to src/vs/editor/editor.all.ts diff --git a/src/vs/editor/editor.main.ts b/src/vs/editor/editor.main.ts index 012e073ff516f..d8770ae5ade2b 100644 --- a/src/vs/editor/editor.main.ts +++ b/src/vs/editor/editor.main.ts @@ -5,7 +5,7 @@ 'use strict'; -import 'vs/editor/browser/editor.all'; +import 'vs/editor/editor.all'; import 'vs/editor/contrib/quickOpen/browser/quickOutline'; import 'vs/editor/contrib/quickOpen/browser/gotoLine'; import 'vs/editor/contrib/quickOpen/browser/quickCommand'; diff --git a/src/vs/workbench/electron-browser/workbench.main.ts b/src/vs/workbench/electron-browser/workbench.main.ts index 7a9035a8e92e0..5dfb796f5424f 100644 --- a/src/vs/workbench/electron-browser/workbench.main.ts +++ b/src/vs/workbench/electron-browser/workbench.main.ts @@ -10,7 +10,7 @@ import 'vs/base/common/strings'; import 'vs/base/common/errors'; // Editor -import 'vs/editor/browser/editor.all'; +import 'vs/editor/editor.all'; // Menus/Actions import 'vs/platform/actions/electron-browser/menusExtensionPoint'; diff --git a/tslint.json b/tslint.json index 58f72c3296524..8104bad6b07d0 100644 --- a/tslint.json +++ b/tslint.json @@ -89,6 +89,80 @@ "**/vs/base/test/browser/**" ] }, + { + "target": "**/vs/base/parts/quickopen/common/**", + "restrictions": [ + "vs/nls", + "**/vs/base/common/**" + ] + }, + { + "target": "**/vs/base/parts/quickopen/browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/common/**", + "**/vs/base/browser/**", + "**/vs/base/parts/tree/browser/**", + "**/vs/base/parts/quickopen/common/**", + "**/vs/base/parts/quickopen/browser/**" + ] + }, + { + "target": "**/vs/base/parts/tree/browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/common/**", + "**/vs/base/browser/**", + "**/vs/base/parts/tree/browser/**" + ] + }, + // { + // "target": "**/vs/platform/test/common/**", + // "restrictions": [ + // "assert", + // "**/vs/platform/platform", + // "**/vs/base/common/**" + // ] + // }, + // { + // "target": "**/vs/platform/*/common/**", + // "restrictions": [ + // "vs/nls", + // "**/vs/base/common/**", + // "**/vs/platform/*/common/**", + // "**/vs/platform/platform", + // "**/vs/base/parts/ipc/common/**", + // "**/vs/base/parts/quickopen/common/**" + // ] + // }, + { + "target": "**/vs/editor/common/**", + "restrictions": [ + "vs/nls", + "**/vs/base/common/**", + "**/vs/base/worker/**", + "**/vs/platform/*/common/**", + "**/vs/platform/platform", + "**/vs/editor/common/**" + ] + }, + { + "target": "**/vs/editor/browser/**", + "restrictions": [ + "vs/nls", + "vs/css!./**/*", + "**/vs/base/common/**", + "**/vs/base/browser/**", + "**/vs/platform/*/common/**", + "**/vs/platform/*/browser/**", + "**/vs/platform/platform", + "**/vs/editor/common/**", + "**/vs/editor/browser/**", + "vs/editor/contrib/diffNavigator/common/diffNavigator" // TODO@Alex + ] + }, { "target": "**/vs/editor/contrib/**", "restrictions": [ From 4685dae198757d64ef57653d460af46c48729804 Mon Sep 17 00:00:00 2001 From: Pete Chown Date: Fri, 16 Jun 2017 18:01:56 +0100 Subject: [PATCH 1971/2747] Don't split words at U+2019, the right single quotation mark. This stops the editor splitting words at apostrophes, when editing plain text. --- src/vs/editor/common/config/editorOptions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 9835b48bc22a5..b610d4c1b5be2 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -2086,7 +2086,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { wordWrapMinified: true, wrappingIndent: WrappingIndent.Same, wordWrapBreakBeforeCharacters: '([{‘“〈《「『【〔([{「£¥$£¥++', - wordWrapBreakAfterCharacters: ' \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー’”〉》」』】〕)]}」', + wordWrapBreakAfterCharacters: ' \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」', wordWrapBreakObtrusiveCharacters: '.', autoClosingBrackets: true, dragAndDrop: true, From 57b318b14ce43ee49304ee6246b62c66942bd57e Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 16 Jun 2017 19:07:10 +0200 Subject: [PATCH 1972/2747] fix build --- src/vs/editor/contrib/codelens/browser/codelensWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/codelens/browser/codelensWidget.ts b/src/vs/editor/contrib/codelens/browser/codelensWidget.ts index d0c45ac46f32b..ac7b103cd55e9 100644 --- a/src/vs/editor/contrib/codelens/browser/codelensWidget.ts +++ b/src/vs/editor/contrib/codelens/browser/codelensWidget.ts @@ -5,7 +5,7 @@ 'use strict'; -import 'vs/css!./codelensController'; +import 'vs/css!./codelensWidget'; import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import Severity from 'vs/base/common/severity'; import { format, escape } from 'vs/base/common/strings'; From d03641774579816c6d703227db24a9b20afa6f5a Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 16 Jun 2017 19:10:05 +0200 Subject: [PATCH 1973/2747] :lipstick: no tricks, implement a stable sort --- src/vs/base/common/arrays.ts | 53 ++++++++++++------- src/vs/base/test/common/arrays.test.ts | 50 ++++++++++++++++- .../contrib/codelens/browser/codelens.ts | 4 +- .../workbench/api/node/extHostDiagnostics.ts | 4 +- 4 files changed, 87 insertions(+), 24 deletions(-) diff --git a/src/vs/base/common/arrays.ts b/src/vs/base/common/arrays.ts index 72416376659fd..791dd07185089 100644 --- a/src/vs/base/common/arrays.ts +++ b/src/vs/base/common/arrays.ts @@ -67,30 +67,45 @@ export function findFirst(array: T[], p: (x: T) => boolean): number { } /** - * Like `Array#sort` but always stable. Comes at a cost: iterates 2n-times, - * creates n-objects in addition to sorting (log(n)) + * Like `Array#sort` but always stable. Usually runs a little slower `than Array#sort` + * so only use this when actually needing stable sort. */ -export function stableSort(data: T[], compare: (a: T, b: T) => number): T[] { - - let data2: { idx: number; e: T }[] = data; +export function mergeSort(data: T[], compare: (a: T, b: T) => number): T[] { + _divideAndMerge(data, compare); + return data; +} - for (let idx = 0; idx < data2.length; idx++) { - data2[idx] = { idx, e: data[idx] }; +function _divideAndMerge(data: T[], compare: (a: T, b: T) => number): void { + if (data.length === 1) { + // sorted + return; } - - data2.sort((a, b) => { - let ret = compare(a.e, b.e); - if (ret === 0) { - ret = a.idx - b.idx; + const p = (data.length / 2) | 0; + const left = data.slice(0, p); + const right = data.slice(p); + + _divideAndMerge(left, compare); + _divideAndMerge(right, compare); + + let leftIdx = 0; + let rightIdx = 0; + let i = 0; + while (leftIdx < left.length && rightIdx < right.length) { + let ret = compare(left[leftIdx], right[rightIdx]); + if (ret <= 0) { + // smaller_equal -> take left to preserve order + data[i++] = left[leftIdx++]; + } else { + // greater -> take right + data[i++] = right[rightIdx++]; } - return ret; - }); - - for (let idx = 0; idx < data2.length; idx++) { - data[idx] = data2[idx].e; } - - return data; + while (leftIdx < left.length) { + data[i++] = left[leftIdx++]; + } + while (rightIdx < right.length) { + data[i++] = right[rightIdx++]; + } } export function groupBy(data: T[], compare: (a: T, b: T) => number): T[][] { diff --git a/src/vs/base/test/common/arrays.test.ts b/src/vs/base/test/common/arrays.test.ts index 5037261bc73b3..4d1e67c20fc5f 100644 --- a/src/vs/base/test/common/arrays.test.ts +++ b/src/vs/base/test/common/arrays.test.ts @@ -37,7 +37,7 @@ suite('Arrays', () => { let counter = 0; let data = arrays.fill(10000, () => ({ n: 1, m: counter++ })); - arrays.stableSort(data, (a, b) => a.n - b.n); + arrays.mergeSort(data, (a, b) => a.n - b.n); let lastM = -1; for (const element of data) { @@ -46,6 +46,54 @@ suite('Arrays', () => { } }); + test('mergeSort', function () { + let data = arrays.mergeSort([6, 5, 3, 1, 8, 7, 2, 4], (a, b) => a - b); + assert.deepEqual(data, [1, 2, 3, 4, 5, 6, 7, 8]); + }); + + test('mergeSort, is stable', function () { + + let numbers = arrays.mergeSort([33, 22, 11, 4, 99, 1], (a, b) => 0); + assert.deepEqual(numbers, [33, 22, 11, 4, 99, 1]); + }); + + test('mergeSort, many random numbers', function () { + + function compare(a: number, b: number) { + if (a < b) { + return -1; + } else if (a > b) { + return 1; + } else { + return 0; + } + } + + function assertSorted(array: number[]) { + let last = array[0]; + for (let i = 1; i < array.length; i++) { + let n = array[i]; + if (last > n) { + assert.fail(array.slice(i - 10, i + 10)); + } + } + } + const MAX = 101; + const data: number[][] = []; + for (let i = 1; i < MAX; i++) { + let array: number[] = []; + for (let j = 0; j < 10 + i; j++) { + array.push(Math.random() * 10e8 | 0); + } + data.push(array); + } + + for (const array of data) { + arrays.mergeSort(array, compare); + assertSorted(array); + } + }); + test('delta', function () { function compare(a: number, b: number): number { return a - b; diff --git a/src/vs/editor/contrib/codelens/browser/codelens.ts b/src/vs/editor/contrib/codelens/browser/codelens.ts index 2cbda09d66f6c..0c7d563cc55e9 100644 --- a/src/vs/editor/contrib/codelens/browser/codelens.ts +++ b/src/vs/editor/contrib/codelens/browser/codelens.ts @@ -6,7 +6,7 @@ 'use strict'; import { illegalArgument, onUnexpectedExternalError } from 'vs/base/common/errors'; -import { stableSort } from 'vs/base/common/arrays'; +import { mergeSort } from 'vs/base/common/arrays'; import URI from 'vs/base/common/uri'; import { TPromise } from 'vs/base/common/winjs.base'; import { IModel } from 'vs/editor/common/editorCommon'; @@ -35,7 +35,7 @@ export function getCodeLensData(model: IModel): TPromise { return TPromise.join(promises).then(() => { - return stableSort(symbols, (a, b) => { + return mergeSort(symbols, (a, b) => { // sort by lineNumber, provider-rank, and column if (a.symbol.range.startLineNumber < b.symbol.range.startLineNumber) { return -1; diff --git a/src/vs/workbench/api/node/extHostDiagnostics.ts b/src/vs/workbench/api/node/extHostDiagnostics.ts index 7b720e5eec143..eeb41c0b0e903 100644 --- a/src/vs/workbench/api/node/extHostDiagnostics.ts +++ b/src/vs/workbench/api/node/extHostDiagnostics.ts @@ -12,7 +12,7 @@ import Severity from 'vs/base/common/severity'; import * as vscode from 'vscode'; import { MainContext, MainThreadDiagnosticsShape, ExtHostDiagnosticsShape } from './extHost.protocol'; import { DiagnosticSeverity } from './extHostTypes'; -import { stableSort } from 'vs/base/common/arrays'; +import { mergeSort } from 'vs/base/common/arrays'; export class DiagnosticCollection implements vscode.DiagnosticCollection { @@ -76,7 +76,7 @@ export class DiagnosticCollection implements vscode.DiagnosticCollection { let lastUri: vscode.Uri; // ensure stable-sort - stableSort(first, DiagnosticCollection._compareIndexedTuplesByUri); + mergeSort(first, DiagnosticCollection._compareIndexedTuplesByUri); for (const tuple of first) { const [uri, diagnostics] = tuple; From 19ae0932c45b1096443a8c1335cf1e02eb99e16d Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 8 Jun 2017 17:53:07 -0700 Subject: [PATCH 1974/2747] AutoIndent: Enrich TypeScript and HTML rules. --- extensions/html/client/src/htmlMain.ts | 4 ++++ extensions/typescript/src/typescriptMain.ts | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/extensions/html/client/src/htmlMain.ts b/extensions/html/client/src/htmlMain.ts index cd12405a71f24..7f4c9fe344060 100644 --- a/extensions/html/client/src/htmlMain.ts +++ b/extensions/html/client/src/htmlMain.ts @@ -78,6 +78,10 @@ export function activate(context: ExtensionContext) { }); languages.setLanguageConfiguration('html', { + indentationRules: { + increaseIndentPattern: /<(?!\?|(?:area|base|br|col|frame|hr|html|img|input|link|meta|param)\b|[^>]*\/>)([-_\.A-Za-z0-9]+)(?=\s|>)\b[^>]*>(?!.*<\/\1>)|)|\{[^}"']*$/, + decreaseIndentPattern: /^\s*(<\/(?!html)[-_\.A-Za-z0-9]+\b[^>]*>|-->|\})/ + }, wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g, onEnterRules: [ { diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 085e48bb40b63..00db96b6663bd 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -283,9 +283,10 @@ class LanguageProvider { this.disposables.push(languages.setLanguageConfiguration(modeId, { indentationRules: { // ^(.*\*/)?\s*\}.*$ - decreaseIndentPattern: /^(.*\*\/)?\s*\}.*$/, + decreaseIndentPattern: /^(.*\*\/)?\s*[\}|\]|\)].*$/, // ^.*\{[^}"']*$ - increaseIndentPattern: /^.*\{[^}"'`]*$/ + increaseIndentPattern: /^.*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/, + indentNextLinePattern: /^\s*(for|while|if|else)\b(?!.*[;{}]\s*(\/\/.*|\/[*].*[*]\/\s*)?$)/ }, wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, onEnterRules: [ From 33d8446d68a0d83bcda094a8b61d6d30edfb37d4 Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 8 Jun 2017 18:00:23 -0700 Subject: [PATCH 1975/2747] AutoIndent. Correct behavior of indentNextLine for Enter --- .../common/controller/cursorTypeOperations.ts | 97 +++-- .../modes/languageConfigurationRegistry.ts | 362 ++++++++++++------ .../common/modes/supports/indentRules.ts | 78 ++++ .../editor/common/modes/supports/onEnter.ts | 59 --- 4 files changed, 397 insertions(+), 199 deletions(-) create mode 100644 src/vs/editor/common/modes/supports/indentRules.ts diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index 7793fe670ce2c..389cc03ecbbbc 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -144,7 +144,7 @@ export class TypeOperations { } private static _goodIndentForLine(config: CursorConfiguration, model: ITokenizedModel, lineNumber: number): string { - let expectedIndentAction = LanguageConfigurationRegistry.getGoodIndentActionForLine(model, lineNumber); + let expectedIndentAction = LanguageConfigurationRegistry.getInheritIndentForLine(model, lineNumber, false); if (expectedIndentAction) { if (expectedIndentAction.action) { @@ -265,47 +265,24 @@ export class TypeOperations { private static _enter(config: CursorConfiguration, model: ITokenizedModel, keepPosition: boolean, range: Range): ICommand { let r = LanguageConfigurationRegistry.getEnterAction(model, range); + if (r) { let enterAction = r.enterAction; let indentation = r.indentation; - let beforeText = ''; - - if (!r.ignoreCurrentLine) { - // textBeforeEnter doesn't match unIndentPattern. - let goodIndent = this._goodIndentForLine(config, model, range.startLineNumber); - - if (goodIndent !== null && goodIndent === r.indentation) { - if (enterAction.outdentCurrentLine) { - goodIndent = TypeOperations.unshiftIndent(config, goodIndent); - } - - let lineText = model.getLineContent(range.startLineNumber); - if (config.normalizeIndentation(goodIndent) !== config.normalizeIndentation(indentation)) { - beforeText = config.normalizeIndentation(goodIndent) + lineText.substring(indentation.length, range.startColumn - 1); - indentation = goodIndent; - range = new Range(range.startLineNumber, 1, range.endLineNumber, range.endColumn); - } - } - } - - if (enterAction.removeText) { - indentation = indentation.substring(0, indentation.length - enterAction.removeText); - } - if (enterAction.indentAction === IndentAction.None) { // Nothing special - return TypeOperations._typeCommand(range, beforeText + '\n' + config.normalizeIndentation(indentation + enterAction.appendText), keepPosition); + return TypeOperations._typeCommand(range, '\n' + config.normalizeIndentation(indentation + enterAction.appendText), keepPosition); } else if (enterAction.indentAction === IndentAction.Indent) { // Indent once - return TypeOperations._typeCommand(range, beforeText + '\n' + config.normalizeIndentation(indentation + enterAction.appendText), keepPosition); + return TypeOperations._typeCommand(range, '\n' + config.normalizeIndentation(indentation + enterAction.appendText), keepPosition); } else if (enterAction.indentAction === IndentAction.IndentOutdent) { // Ultra special let normalIndent = config.normalizeIndentation(indentation); let increasedIndent = config.normalizeIndentation(indentation + enterAction.appendText); - let typeText = beforeText + '\n' + increasedIndent + '\n' + normalIndent; + let typeText = '\n' + increasedIndent + '\n' + normalIndent; if (keepPosition) { return new ReplaceCommandWithoutChangingPosition(range, typeText, true); @@ -314,7 +291,69 @@ export class TypeOperations { } } else if (enterAction.indentAction === IndentAction.Outdent) { let actualIndentation = TypeOperations.unshiftIndent(config, indentation); - return TypeOperations._typeCommand(range, beforeText + '\n' + config.normalizeIndentation(actualIndentation + enterAction.appendText), keepPosition); + return TypeOperations._typeCommand(range, '\n' + config.normalizeIndentation(actualIndentation + enterAction.appendText), keepPosition); + } + } + + // no enter rules applied, we should check indentation rules then. + let ir = LanguageConfigurationRegistry.getIndentForEnter(model, range, { + unshiftIndent: (indent) => { + return TypeOperations.unshiftIndent(config, indent); + }, + shiftIndent: (indent) => { + return TypeOperations.shiftIndent(config, indent); + }, + normalizeIndentation: (indent) => { + return config.normalizeIndentation(indent); + } + }); + + let lineText = model.getLineContent(range.startLineNumber); + let indentation = strings.getLeadingWhitespace(lineText); + if (ir) { + if (/^\s+$/.test(lineText) || indentation === config.normalizeIndentation(ir.beforeEnter)) { + return TypeOperations._typeCommand(range, '\n' + config.normalizeIndentation(ir.afterEnter), keepPosition); + } + let beforeText = config.normalizeIndentation(ir.beforeEnter) + lineText.substring(indentation.length, range.startColumn - 1); + range = new Range(range.startLineNumber, 1, range.endLineNumber, range.endColumn); + return TypeOperations._typeCommand(range, beforeText + '\n' + config.normalizeIndentation(ir.afterEnter), keepPosition); + } else { + return TypeOperations._typeCommand(range, '\n' + config.normalizeIndentation(indentation), keepPosition); + } + } + + private static _runAutoIndentType(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], ch: string): ICommand { + let selection = selections[0]; + let currentIndentation = LanguageConfigurationRegistry.getIndentationAtPosition(model, selection.startLineNumber, selection.startColumn); + let actualIndentation = LanguageConfigurationRegistry.getIndentActionForType(model, selections[0].startLineNumber, selections[0].startColumn, ch, { + shiftIndent: (indentation) => { + return TypeOperations.shiftIndent(config, indentation); + }, + unshiftIndent: (indentation) => { + return TypeOperations.unshiftIndent(config, indentation); + }, + }); + + if (actualIndentation === null) { + return null; + } + + if (actualIndentation !== config.normalizeIndentation(currentIndentation)) { + let firstNonWhitespace = model.getLineFirstNonWhitespaceColumn(selection.startLineNumber); + if (firstNonWhitespace === 0) { + return TypeOperations._typeCommand( + new Range(selection.startLineNumber, 0, selection.startLineNumber, selection.startColumn), + actualIndentation + ch, + false + ); + } else { + return TypeOperations._typeCommand( + new Range(selection.startLineNumber, 0, selection.startLineNumber, selection.startColumn), + actualIndentation + + model.getLineContent(selection.startLineNumber).substring(firstNonWhitespace - 1, selection.startColumn) + ch, + false + ); + } } return null; diff --git a/src/vs/editor/common/modes/languageConfigurationRegistry.ts b/src/vs/editor/common/modes/languageConfigurationRegistry.ts index 1563ebc48de75..dde5e4c57c58f 100644 --- a/src/vs/editor/common/modes/languageConfigurationRegistry.ts +++ b/src/vs/editor/common/modes/languageConfigurationRegistry.ts @@ -7,6 +7,7 @@ import { CharacterPairSupport } from 'vs/editor/common/modes/supports/characterPair'; import { BracketElectricCharacterSupport, IElectricAction } from 'vs/editor/common/modes/supports/electricCharacter'; import { IOnEnterSupportOptions, OnEnterSupport } from 'vs/editor/common/modes/supports/onEnter'; +import { IndentRulesSupport } from 'vs/editor/common/modes/supports/indentRules'; import { RichEditBrackets } from 'vs/editor/common/modes/supports/richEditBrackets'; import Event, { Emitter } from 'vs/base/common/event'; import { ITokenizedModel } from 'vs/editor/common/editorCommon'; @@ -29,6 +30,13 @@ export interface ICommentsConfiguration { blockCommentEndToken?: string; } +export interface IVirtualModel { + getLineTokens(lineNumber: number): LineTokens; + getLanguageIdentifier(): LanguageIdentifier; + getLanguageIdAtPosition(lineNumber: number, column: number): LanguageId; + getLineContent(lineNumber: number): string; +} + export class RichEditSupport { private readonly _conf: LanguageConfiguration; @@ -38,6 +46,7 @@ export class RichEditSupport { public readonly characterPair: CharacterPairSupport; public readonly wordDefinition: RegExp; public readonly onEnter: OnEnterSupport; + public readonly indentRulesSupport: IndentRulesSupport; public readonly brackets: RichEditBrackets; public readonly indentationRules: IndentationRule; @@ -64,6 +73,9 @@ export class RichEditSupport { this.wordDefinition = this._conf.wordPattern || DEFAULT_WORD_REGEXP; this.indentationRules = this._conf.indentationRules; + if (this._conf.indentationRules) { + this.indentRulesSupport = new IndentRulesSupport(this._conf.indentationRules); + } } private static _mergeConf(prev: LanguageConfiguration, current: LanguageConfiguration): LanguageConfiguration { @@ -250,6 +262,236 @@ export class LanguageConfigurationRegistryImpl { return ensureValidWordDefinition(value.wordDefinition || null); } + + + // beigin Indent Rules + + private _getIndentRulesSupport(languageId: LanguageId): IndentRulesSupport { + let value = this._getRichEditSupport(languageId); + if (!value) { + return null; + } + return value.indentRulesSupport || null; + } + + /** + * Get nearest preceiding line which doesn't match unIndentPattern or contains all whitespace. + */ + private getPrecedingValidLine(model: IVirtualModel, lineNumber: number, indentRulesSupport: IndentRulesSupport) { + let languageID = model.getLanguageIdAtPosition(lineNumber, 0); + if (lineNumber > 1) { + let lastLineNumber = lineNumber - 1; + let resultLineNumber = -1; + + for (lastLineNumber = lineNumber - 1; lastLineNumber >= 1; lastLineNumber--) { + if (model.getLanguageIdAtPosition(lastLineNumber, 0) !== languageID) { + return resultLineNumber; + } + let text = model.getLineContent(lastLineNumber); + if (indentRulesSupport.shouldIgnore(text) || text === '') { + resultLineNumber = lastLineNumber; + continue; + } + + return lastLineNumber; + } + } + + return -1; + } + + /** + * Get inherited indentation from above lines. + * 1. Find the nearest preceding line which doesn't match unIndentedLinePattern. + * 2. If this line matches indentNextLinePattern or increaseIndentPattern, it means that the indent level of `lineNumber` should be 1 greater than this line. + * 3. If this line doesn't match any indent rules + * a. check whether the line above it matches indentNextLinePattern + * b. If not, the indent level of this line is the result + * c. If so, it means the indent of this line is *temporary*, go upward utill we find a line whose indent is not temporary (the same workflow a -> b -> c). + * 4. Otherwise, we fail to get an inherited indent from aboves. Return null and we should not touch the indent of `lineNumber` + * + * This function only return the inherited indent based on above lines, it doesn't check whether current line should decrease or not. + */ + public getInheritIndentForLine(model: IVirtualModel, lineNumber: number, honorIntentialIndent: boolean = true) { + let indentRulesSupport = this._getIndentRulesSupport(model.getLanguageIdentifier().id); + if (!indentRulesSupport) { + return null; + } + + if (lineNumber <= 1) { + return null; + } + + let precedingUnIgnoredLine = this.getPrecedingValidLine(model, lineNumber, indentRulesSupport); + if (precedingUnIgnoredLine < 1) { + return null; + } + + let precedingUnIgnoredLineContent = model.getLineContent(precedingUnIgnoredLine); + + if (indentRulesSupport.shouldIncrease(precedingUnIgnoredLineContent) || indentRulesSupport.shouldIndentNextLine(precedingUnIgnoredLineContent)) { + return { + indentation: strings.getLeadingWhitespace(precedingUnIgnoredLineContent), + action: IndentAction.Indent + }; + } else if (indentRulesSupport.shouldDecrease(precedingUnIgnoredLineContent)) { + return { + indentation: strings.getLeadingWhitespace(precedingUnIgnoredLineContent), + action: null + }; + } else { + // precedingUnIgnoredLine can not be ignored. + // it doesn't increase indent of following lines + // it doesn't increase just next line + // so current line is not affect by precedingUnIgnoredLine + // and then we should get a correct inheritted indentation from above lines + if (precedingUnIgnoredLine === 1) { + return { + indentation: strings.getLeadingWhitespace(model.getLineContent(precedingUnIgnoredLine)), + action: null + }; + } + + let previousLine = precedingUnIgnoredLine - 1; + + let previousLineContent = model.getLineContent(previousLine); + + if (indentRulesSupport.shouldIndentNextLine(previousLineContent)) { + let stopLine = 0; + for (let i = previousLine - 1; i > 0; i--) { + if (indentRulesSupport.shouldIndentNextLine(model.getLineContent(i))) { + continue; + } + stopLine = i; + break; + } + + return { + indentation: strings.getLeadingWhitespace(model.getLineContent(stopLine + 1)), + action: null + }; + } + + if (honorIntentialIndent) { + return { + indentation: strings.getLeadingWhitespace(model.getLineContent(precedingUnIgnoredLine)), + action: null + }; + } else { + // search from precedingUnIgnoredLine until we find one whose indent is not temporary + for (let i = precedingUnIgnoredLine; i > 0; i--) { + let lineContent = model.getLineContent(i); + if (indentRulesSupport.shouldDecrease(lineContent)) { + return { + indentation: strings.getLeadingWhitespace(lineContent), + action: null + }; + } else if (indentRulesSupport.shouldIncrease(lineContent)) { + return { + indentation: strings.getLeadingWhitespace(lineContent), + action: IndentAction.Indent + }; + } else if (indentRulesSupport.shouldIndentNextLine(lineContent)) { + let stopLine = 0; + for (let j = i - 1; j > 0; j--) { + if (indentRulesSupport.shouldIndentNextLine(model.getLineContent(i))) { + continue; + } + stopLine = j; + break; + } + + return { + indentation: strings.getLeadingWhitespace(model.getLineContent(stopLine + 1)), + action: null + }; + } + } + + return { + indentation: strings.getLeadingWhitespace(model.getLineContent(1)), + action: null + }; + } + + } + } + + public getIndentForEnter(model: ITokenizedModel, range: Range, indentConverter: any): {beforeEnter: string, afterEnter: string} { + let scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber, range.startColumn); + let scopedLineText = scopedLineTokens.getLineContent(); + let beforeEnterText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset); + let afterEnterText; + + if (range.isEmpty()) { + afterEnterText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset); + } else { + const endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn); + afterEnterText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset); + } + + let indentRulesSupport = this._getIndentRulesSupport(scopedLineTokens.languageId); + + if (!indentRulesSupport) { + return null; + } + + let beforeEnterIndentAction = this.getInheritIndentForLine(model, range.startLineNumber); + let beforeEnterIndent = strings.getLeadingWhitespace(beforeEnterText); + + if (indentRulesSupport.shouldDecrease(beforeEnterText)) { + if (beforeEnterIndentAction) { + beforeEnterIndent = beforeEnterIndentAction.indentation; + if (beforeEnterIndentAction.action !== IndentAction.Indent) { + beforeEnterIndent = indentConverter.unshiftIndent(beforeEnterIndent); + } + } + } + + let beforeEnterResult = beforeEnterIndent + strings.ltrim(strings.ltrim(beforeEnterText, ' '), '\t'); + + let virtualModel: IVirtualModel = { + getLineTokens: (lineNumber: number) => { + return model.getLineTokens(lineNumber); + }, + getLanguageIdentifier: () => { + return model.getLanguageIdentifier(); + }, + getLanguageIdAtPosition: (lineNumber: number, column: number) => { + return model.getLanguageIdAtPosition(lineNumber, column); + }, + getLineContent: (lineNumber: number) => { + if (lineNumber === range.startLineNumber) { + return beforeEnterResult; + } else { + return model.getLineContent(lineNumber); + } + } + }; + + let afterEnterAction = this.getInheritIndentForLine(virtualModel, range.startLineNumber + 1); + if (!afterEnterAction) { + return { + beforeEnter: beforeEnterIndent, + afterEnter: beforeEnterIndent + }; + } + + let afterEnterIndent = afterEnterAction.indentation; + + if (afterEnterAction.action === IndentAction.Indent) { + afterEnterIndent = indentConverter.shiftIndent(afterEnterIndent); + } + + if (indentRulesSupport.shouldDecrease(afterEnterText)) { + afterEnterIndent = indentConverter.unshiftIndent(afterEnterIndent); + } + + return { + beforeEnter: beforeEnterIndent, + afterEnter: afterEnterIndent + }; + } // begin onEnter private _getOnEnterSupport(languageId: LanguageId): OnEnterSupport { @@ -266,18 +508,13 @@ export class LanguageConfigurationRegistryImpl { return r ? r.enterAction : null; } - public getEnterAction(model: ITokenizedModel, range: Range): { enterAction: EnterAction; indentation: string; ignoreCurrentLine: boolean } { + public getEnterAction(model: ITokenizedModel, range: Range): { enterAction: EnterAction; indentation: string; } { let indentation = this.getIndentationAtPosition(model, range.startLineNumber, range.startColumn); - let ignoreCurrentLine = false; let scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber, range.startColumn); let onEnterSupport = this._getOnEnterSupport(scopedLineTokens.languageId); if (!onEnterSupport) { - return { - enterAction: { indentAction: IndentAction.None, appendText: '' }, - indentation: indentation, - ignoreCurrentLine: false - }; + return null; } let scopedLineText = scopedLineTokens.getLineContent(); @@ -293,45 +530,18 @@ export class LanguageConfigurationRegistryImpl { } let lineNumber = range.startLineNumber; - - // if the text before the cursor/range start position is empty or matches `unIndentedLinePattern` - // this line is actually ignored after the enter action - if (onEnterSupport.shouldIgnore(beforeEnterText)) { - ignoreCurrentLine = true; - let lastLineNumber = this.getLastValidLine(model, lineNumber, onEnterSupport); - - if (lastLineNumber <= 0) { - return { - enterAction: { indentAction: IndentAction.None, appendText: '' }, - indentation: '', - ignoreCurrentLine: ignoreCurrentLine - }; - } - - scopedLineTokens = this.getScopedLineTokens(model, lastLineNumber); - beforeEnterText = this.getLineContent(model, lastLineNumber); - lineNumber = lastLineNumber; - indentation = this.getIndentationAtPosition(model, lineNumber, model.getLineMaxColumn(lineNumber)); - } - let oneLineAboveText = ''; if (lineNumber > 1 && scopedLineTokens.firstCharOffset === 0) { // This is not the first line and the entire line belongs to this mode - let lastLineNumber = this.getLastValidLine(model, lineNumber, onEnterSupport); - - if (lastLineNumber >= 1) { - // No previous line with content found - let oneLineAboveScopedLineTokens = this.getScopedLineTokens(model, lastLineNumber); + let oneLineAboveScopedLineTokens = this.getScopedLineTokens(model, lineNumber - 1); if (oneLineAboveScopedLineTokens.languageId === scopedLineTokens.languageId) { // The line above ends with text belonging to the same mode oneLineAboveText = oneLineAboveScopedLineTokens.getLineContent(); } } - } let enterResult: EnterAction = null; - try { enterResult = onEnterSupport.onEnter(oneLineAboveText, beforeEnterText, afterEnterText); } catch (e) { @@ -339,7 +549,7 @@ export class LanguageConfigurationRegistryImpl { } if (!enterResult) { - enterResult = { indentAction: IndentAction.None, appendText: '' }; + return null; } else { // Here we add `\t` to appendText first because enterAction is leveraging appendText and removeText to change indentation. if (!enterResult.appendText) { @@ -351,17 +561,20 @@ export class LanguageConfigurationRegistryImpl { } else { enterResult.appendText = ''; } + } } + + if (enterResult.removeText) { + indentation = indentation.substring(0, indentation.length - enterResult.removeText); } return { enterAction: enterResult, indentation: indentation, - ignoreCurrentLine: ignoreCurrentLine }; } - private getIndentationAtPosition(model: ITokenizedModel, lineNumber: number, column: number): string { + public getIndentationAtPosition(model: ITokenizedModel, lineNumber: number, column: number): string { let lineText = model.getLineContent(lineNumber); let indentation = strings.getLeadingWhitespace(lineText); if (indentation.length > column - 1) { @@ -371,33 +584,6 @@ export class LanguageConfigurationRegistryImpl { return indentation; } - private getLastValidLine(model: ITokenizedModel, lineNumber: number, onEnterSupport: OnEnterSupport): number { - if (lineNumber > 1) { - let lastLineNumber = lineNumber - 1; - - for (lastLineNumber = lineNumber - 1; lastLineNumber >= 1; lastLineNumber--) { - let lineText = model.getLineContent(lastLineNumber); - if (!onEnterSupport.shouldIgnore(lineText) && onEnterSupport.containNonWhitespace(lineText)) { - break; - } - } - - if (lastLineNumber >= 1) { - return lastLineNumber; - } - } - - return -1; - } - - private getLineContent(model: ITokenizedModel, lineNumber: number): string { - let scopedLineTokens = this.getScopedLineTokens(model, lineNumber); - let column = model.getLineMaxColumn(lineNumber); - let scopedLineText = scopedLineTokens.getLineContent(); - let lineText = scopedLineText.substr(0, column - 1 - scopedLineTokens.firstCharOffset); - return lineText; - } - private getScopedLineTokens(model: ITokenizedModel, lineNumber: number, columnNumber?: number) { model.forceTokenization(lineNumber); let lineTokens = model.getLineTokens(lineNumber); @@ -406,52 +592,6 @@ export class LanguageConfigurationRegistryImpl { return scopedLineTokens; } - public getGoodIndentActionForLine(model: ITokenizedModel, lineNumber: number) { - let onEnterSupport = this._getOnEnterSupport(model.getLanguageIdentifier().id); - if (!onEnterSupport) { - return null; - } - - /** - * In order to get correct indentation for current line - * we need to loop backwards the content from current line until - * 1. a line contains non whitespace characters, - * 2. and the line doesn't match `unIndentedLinePattern` pattern - */ - let lastLineNumber = this.getLastValidLine(model, lineNumber, onEnterSupport); - - if (lastLineNumber < 1) { - // No previous line with content found - return null; - } - - // it's Okay that lineNumber > model.getLineCount(), a good example is guessing the indentation of next potential line - // when the cursor is at the end of file. - if (lineNumber <= model.getLineCount()) { - let currentLineScopedLineTokens = this.getScopedLineTokens(model, lineNumber); - let lastLineScopedLineTokens = this.getScopedLineTokens(model, lastLineNumber); - - if (currentLineScopedLineTokens.languageId !== lastLineScopedLineTokens.languageId) { - // The language mode of last valid line is not the same as current line. - return null; - } - } - - let lineText = model.getLineContent(lastLineNumber); - let oneLineAboveText: string; - if (lastLineNumber > 1) { - oneLineAboveText = model.getLineContent(lastLineNumber - 1); - } - - let indentation = strings.getLeadingWhitespace(lineText); - let onEnterAction = onEnterSupport.onEnter(oneLineAboveText, lineText, ''); - - return { - indentation: indentation, - action: onEnterAction ? onEnterAction.indentAction : null - }; - } - // end onEnter public getBracketsSupport(languageId: LanguageId): RichEditBrackets { diff --git a/src/vs/editor/common/modes/supports/indentRules.ts b/src/vs/editor/common/modes/supports/indentRules.ts new file mode 100644 index 0000000000000..ab23b19a12056 --- /dev/null +++ b/src/vs/editor/common/modes/supports/indentRules.ts @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import * as strings from 'vs/base/common/strings'; +import { IndentationRule, IndentAction } from 'vs/editor/common/modes/languageConfiguration'; + +export class IndentRulesSupport { + + private readonly _indentationRules: IndentationRule; + + constructor(indentationRules: IndentationRule) { + this._indentationRules = indentationRules; + } + + public onType(text: string): IndentAction { + if (this._indentationRules) { + if (this._indentationRules.unIndentedLinePattern && this._indentationRules.unIndentedLinePattern.test(text)) { + return null; + } + + if (this._indentationRules.decreaseIndentPattern && this._indentationRules.decreaseIndentPattern.test(text)) { + return IndentAction.Outdent; + } + } + return null; + } + + public containNonWhitespace(text: string): boolean { + // the text doesn't contain any non-whitespace character. + let nonWhitespaceIdx = strings.lastNonWhitespaceIndex(text); + + if (nonWhitespaceIdx >= 0) { + return true; + } + + return false; + } + + public shouldIncrease(text: string): boolean { + if (this._indentationRules) { + if (this._indentationRules.increaseIndentPattern && this._indentationRules.increaseIndentPattern.test(text)) { + return true; + } + // if (this._indentationRules.indentNextLinePattern && this._indentationRules.indentNextLinePattern.test(text)) { + // return true; + // } + } + return false; + } + + public shouldDecrease(text: string): boolean { + if (this._indentationRules && this._indentationRules.decreaseIndentPattern && this._indentationRules.decreaseIndentPattern.test(text)) { + return true; + } + return false; + } + + public shouldIndentNextLine(text: string): boolean { + if (this._indentationRules && this._indentationRules.indentNextLinePattern && this._indentationRules.indentNextLinePattern.test(text)) { + return true; + } + + return false; + } + + public shouldIgnore(text: string): boolean { + // the text matches `unIndentedLinePattern` + if (this._indentationRules && this._indentationRules.unIndentedLinePattern && this._indentationRules.unIndentedLinePattern.test(text)) { + return true; + } + + return false; + } +} + diff --git a/src/vs/editor/common/modes/supports/onEnter.ts b/src/vs/editor/common/modes/supports/onEnter.ts index 3bddd1f856647..2287829bb1d7b 100644 --- a/src/vs/editor/common/modes/supports/onEnter.ts +++ b/src/vs/editor/common/modes/supports/onEnter.ts @@ -72,45 +72,6 @@ export class OnEnterSupport { } } - // (3): Indentation Support - if (this._indentationRules) { - let indentOffset: null | number = null; - let outdentCurrentLine = false; - - if (this._indentationRules.increaseIndentPattern && this._indentationRules.increaseIndentPattern.test(beforeEnterText)) { - indentOffset = 1; - } - if (this._indentationRules.indentNextLinePattern && this._indentationRules.indentNextLinePattern.test(beforeEnterText)) { - indentOffset = 1; - } - - /** - * Since the indentation of `beforeEnterText` might not be correct, we still provide the correct indent action - * even if there is nothing to outdent from. - */ - if (this._indentationRules.decreaseIndentPattern && this._indentationRules.decreaseIndentPattern.test(afterEnterText)) { - indentOffset = indentOffset ? indentOffset - 1 : -1; - } - if (this._indentationRules.indentNextLinePattern && this._indentationRules.indentNextLinePattern.test(oneLineAboveText)) { - indentOffset = indentOffset ? indentOffset - 1 : -1; - } - if (this._indentationRules.decreaseIndentPattern && this._indentationRules.decreaseIndentPattern.test(beforeEnterText)) { - outdentCurrentLine = true; - } - - if (indentOffset !== null || outdentCurrentLine) { - // this means at least one indentation rule is matched so we should handle it - indentOffset = indentOffset || 0; - switch (indentOffset) { - case -1: - return { indentAction: IndentAction.Outdent, outdentCurrentLine: outdentCurrentLine }; - case 0: - return { indentAction: IndentAction.None, outdentCurrentLine: outdentCurrentLine }; - case 1: - return { indentAction: IndentAction.Indent, outdentCurrentLine: outdentCurrentLine }; - } - } - } // (4): Open bracket based logic if (beforeEnterText.length > 0) { @@ -125,26 +86,6 @@ export class OnEnterSupport { return null; } - public containNonWhitespace(text: string): boolean { - // the text doesn't contain any non-whitespace character. - let nonWhitespaceIdx = strings.lastNonWhitespaceIndex(text); - - if (nonWhitespaceIdx >= 0) { - return true; - } - - return false; - } - - public shouldIgnore(text: string): boolean { - // the text matches `unIndentedLinePattern` - if (this._indentationRules && this._indentationRules.unIndentedLinePattern && this._indentationRules.unIndentedLinePattern.test(text)) { - return true; - } - - return false; - } - private static _createOpenBracketRegExp(bracket: string): RegExp { var str = strings.escapeRegExpCharacters(bracket); if (!/\B/.test(str.charAt(0))) { From 9bda5f0d184279f8d8d20bff25181421cc705de4 Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 8 Jun 2017 18:01:26 -0700 Subject: [PATCH 1976/2747] AutoIndent: Thanks you tests, without you I will have another sleepless night. --- .../test/common/controller/cursor.test.ts | 373 +++++++++--------- .../common/modes/supports/onEnter.test.ts | 28 -- 2 files changed, 180 insertions(+), 221 deletions(-) diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index f2456100aa348..7c9fa3076bdcd 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -1222,172 +1222,6 @@ suite('Editor Controller - Regression tests', () => { model.dispose(); }); - test('bug #16543: Tab should indent to correct indentation spot immediately', () => { - let mode = new OnEnterMode(IndentAction.Indent); - let model = Model.createFromString( - [ - 'function baz() {', - '\tfunction hello() { // something here', - '\t', - '', - '\t}', - '}' - ].join('\n'), - { - defaultEOL: DefaultEndOfLine.LF, - detectIndentation: false, - insertSpaces: false, - tabSize: 4, - trimAutoWhitespace: true - }, - mode.getLanguageIdentifier() - ); - - withMockCodeEditor(null, { model: model }, (editor, cursor) => { - moveTo(cursor, 4, 1, false); - assertCursor(cursor, new Selection(4, 1, 4, 1)); - - CoreEditingCommands.Tab.runEditorCommand(null, editor, null); - assert.equal(model.getLineContent(4), '\t\t'); - }); - - model.dispose(); - mode.dispose(); - }); - - test('bug #2938 (1): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { - let mode = new OnEnterMode(IndentAction.Indent); - let model = Model.createFromString( - [ - '\tfunction baz() {', - '\t\tfunction hello() { // something here', - '\t\t', - '\t', - '\t\t}', - '\t}' - ].join('\n'), - { - defaultEOL: DefaultEndOfLine.LF, - detectIndentation: false, - insertSpaces: false, - tabSize: 4, - trimAutoWhitespace: true - }, - mode.getLanguageIdentifier() - ); - - withMockCodeEditor(null, { model: model }, (editor, cursor) => { - moveTo(cursor, 4, 2, false); - assertCursor(cursor, new Selection(4, 2, 4, 2)); - - CoreEditingCommands.Tab.runEditorCommand(null, editor, null); - assert.equal(model.getLineContent(4), '\t\t\t'); - }); - - model.dispose(); - mode.dispose(); - }); - - - test('bug #2938 (2): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { - let mode = new OnEnterMode(IndentAction.Indent); - let model = Model.createFromString( - [ - '\tfunction baz() {', - '\t\tfunction hello() { // something here', - '\t\t', - ' ', - '\t\t}', - '\t}' - ].join('\n'), - { - defaultEOL: DefaultEndOfLine.LF, - detectIndentation: false, - insertSpaces: false, - tabSize: 4, - trimAutoWhitespace: true - }, - mode.getLanguageIdentifier() - ); - - withMockCodeEditor(null, { model: model }, (editor, cursor) => { - moveTo(cursor, 4, 1, false); - assertCursor(cursor, new Selection(4, 1, 4, 1)); - - CoreEditingCommands.Tab.runEditorCommand(null, editor, null); - assert.equal(model.getLineContent(4), '\t\t\t'); - }); - - model.dispose(); - mode.dispose(); - }); - - test('bug #2938 (3): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { - let mode = new OnEnterMode(IndentAction.Indent); - let model = Model.createFromString( - [ - '\tfunction baz() {', - '\t\tfunction hello() { // something here', - '\t\t', - '\t\t\t', - '\t\t}', - '\t}' - ].join('\n'), - { - defaultEOL: DefaultEndOfLine.LF, - detectIndentation: false, - insertSpaces: false, - tabSize: 4, - trimAutoWhitespace: true - }, - mode.getLanguageIdentifier() - ); - - withMockCodeEditor(null, { model: model }, (editor, cursor) => { - moveTo(cursor, 4, 3, false); - assertCursor(cursor, new Selection(4, 3, 4, 3)); - - CoreEditingCommands.Tab.runEditorCommand(null, editor, null); - assert.equal(model.getLineContent(4), '\t\t\t\t'); - }); - - model.dispose(); - mode.dispose(); - }); - - test('bug #2938 (4): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { - let mode = new OnEnterMode(IndentAction.Indent); - let model = Model.createFromString( - [ - '\tfunction baz() {', - '\t\tfunction hello() { // something here', - '\t\t', - '\t\t\t\t', - '\t\t}', - '\t}' - ].join('\n'), - { - defaultEOL: DefaultEndOfLine.LF, - detectIndentation: false, - insertSpaces: false, - tabSize: 4, - trimAutoWhitespace: true - }, - mode.getLanguageIdentifier() - ); - - withMockCodeEditor(null, { model: model }, (editor, cursor) => { - moveTo(cursor, 4, 4, false); - assertCursor(cursor, new Selection(4, 4, 4, 4)); - - CoreEditingCommands.Tab.runEditorCommand(null, editor, null); - assert.equal(model.getLineContent(4), '\t\t\t\t\t'); - }); - - model.dispose(); - mode.dispose(); - }); - test('bug #16815:Shift+Tab doesn\'t go back to tabstop', () => { let mode = new OnEnterMode(IndentAction.IndentOutdent); let model = Model.createFromString( @@ -2423,8 +2257,6 @@ suite('Editor Controller - Indentation Rules', () => { unIndentedLinePattern: /^(?!.*([;{}]|\S:)\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!.*(\{[^}"']*|\([^)"']*|\[[^\]"']*|^\s*(\{\}|\(\)|\[\]|(case\b.*|default):))\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!^\s*((?!\S.*\/[*]).*[*]\/\s*)?[})\]]|^\s*(case\b.*|default):\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!^\s*(for|while|if|else)\b(?!.*[;{}]\s*(\/\/.*|\/[*].*[*]\/\s*)?$))/ }); - let emptyRulesMode = new OnEnterMode(IndentAction.None); - test('Enter honors increaseIndentPattern', () => { usingCursor({ text: [ @@ -2544,7 +2376,7 @@ suite('Editor Controller - Indentation Rules', () => { cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); assertCursor(cursor, new Selection(5, 1, 5, 1)); - assert.equal(model.getLineContent(4), '}', '001'); + assert.equal(model.getLineContent(4), '\t}', '001'); }); }); @@ -2661,27 +2493,27 @@ suite('Editor Controller - Indentation Rules', () => { }); }); - test('Enter supports intentional indentation', () => { - usingCursor({ - text: [ - '\tif (true) {', - '\t\tswitch(true) {', - '\t\t\tcase true:', - '\t\t\t\tbreak;', - '\t\t}', - '\t}' - ], - languageIdentifier: mode.getLanguageIdentifier(), - modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } - }, (model, cursor) => { - moveTo(cursor, 5, 4, false); - assertCursor(cursor, new Selection(5, 4, 5, 4)); - - cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); - assert.equal(model.getLineContent(5), '\t\t}'); - assertCursor(cursor, new Selection(6, 3, 6, 3)); - }); - }); + // test('Enter supports intentional indentation', () => { + // usingCursor({ + // text: [ + // '\tif (true) {', + // '\t\tswitch(true) {', + // '\t\t\tcase true:', + // '\t\t\t\tbreak;', + // '\t\t}', + // '\t}' + // ], + // languageIdentifier: mode.getLanguageIdentifier(), + // modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } + // }, (model, cursor) => { + // moveTo(cursor, 5, 4, false); + // assertCursor(cursor, new Selection(5, 4, 5, 4)); + + // cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); + // assert.equal(model.getLineContent(5), '\t\t}'); + // assertCursor(cursor, new Selection(6, 3, 6, 3)); + // }); + // }); test('issue Microsoft/monaco-editor#108 part 1/2: Auto indentation on Enter with selection is half broken', () => { usingCursor({ @@ -2747,7 +2579,6 @@ suite('Editor Controller - Indentation Rules', () => { '\t}', '?>' ], - languageIdentifier: emptyRulesMode.getLanguageIdentifier(), modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } }, (model, cursor) => { moveTo(cursor, 5, 3, false); @@ -2767,7 +2598,6 @@ suite('Editor Controller - Indentation Rules', () => { ' return 5;', ' ' ], - languageIdentifier: emptyRulesMode.getLanguageIdentifier(), modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } }, (model, cursor) => { moveTo(cursor, 3, 2, false); @@ -2778,6 +2608,163 @@ suite('Editor Controller - Indentation Rules', () => { assert.equal(model.getLineContent(4), '\t'); }); }); + + test('bug #16543: Tab should indent to correct indentation spot immediately', () => { + let model = Model.createFromString( + [ + 'function baz() {', + '\tfunction hello() { // something here', + '\t', + '', + '\t}', + '}' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: false, + tabSize: 4, + trimAutoWhitespace: true + }, + mode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { + moveTo(cursor, 4, 1, false); + assertCursor(cursor, new Selection(4, 1, 4, 1)); + + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); + assert.equal(model.getLineContent(4), '\t\t'); + }); + + model.dispose(); + }); + + + test('bug #2938 (1): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { + let model = Model.createFromString( + [ + '\tfunction baz() {', + '\t\tfunction hello() { // something here', + '\t\t', + '\t', + '\t\t}', + '\t}' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: false, + tabSize: 4, + trimAutoWhitespace: true + }, + mode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { + moveTo(cursor, 4, 2, false); + assertCursor(cursor, new Selection(4, 2, 4, 2)); + + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); + assert.equal(model.getLineContent(4), '\t\t\t'); + }); + + model.dispose(); + }); + + + test('bug #2938 (2): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { + let model = Model.createFromString( + [ + '\tfunction baz() {', + '\t\tfunction hello() { // something here', + '\t\t', + ' ', + '\t\t}', + '\t}' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: false, + tabSize: 4, + trimAutoWhitespace: true + }, + mode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { + moveTo(cursor, 4, 1, false); + assertCursor(cursor, new Selection(4, 1, 4, 1)); + + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); + assert.equal(model.getLineContent(4), '\t\t\t'); + }); + + model.dispose(); + }); + + test('bug #2938 (3): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { + let model = Model.createFromString( + [ + '\tfunction baz() {', + '\t\tfunction hello() { // something here', + '\t\t', + '\t\t\t', + '\t\t}', + '\t}' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: false, + tabSize: 4, + trimAutoWhitespace: true + }, + mode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { + moveTo(cursor, 4, 3, false); + assertCursor(cursor, new Selection(4, 3, 4, 3)); + + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); + assert.equal(model.getLineContent(4), '\t\t\t\t'); + }); + + model.dispose(); + }); + + test('bug #2938 (4): When pressing Tab on white-space only lines, indent straight to the right spot (similar to empty lines)', () => { + let model = Model.createFromString( + [ + '\tfunction baz() {', + '\t\tfunction hello() { // something here', + '\t\t', + '\t\t\t\t', + '\t\t}', + '\t}' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: false, + tabSize: 4, + trimAutoWhitespace: true + }, + mode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model }, (editor, cursor) => { + moveTo(cursor, 4, 4, false); + assertCursor(cursor, new Selection(4, 4, 4, 4)); + + CoreEditingCommands.Tab.runEditorCommand(null, editor, null); + assert.equal(model.getLineContent(4), '\t\t\t\t\t'); + }); + + model.dispose(); + }); }); interface ICursorOpts { @@ -3061,7 +3048,7 @@ suite('autoClosingPairs', () => { class AutoClosingMode extends MockMode { - private static _id = new LanguageIdentifier('autoClosingMode', 3); + private static _id = new LanguageIdentifier('autoClosingMode', 5); constructor() { super(AutoClosingMode._id); diff --git a/src/vs/editor/test/common/modes/supports/onEnter.test.ts b/src/vs/editor/test/common/modes/supports/onEnter.test.ts index a0a6cf77fd008..8b47393c63535 100644 --- a/src/vs/editor/test/common/modes/supports/onEnter.test.ts +++ b/src/vs/editor/test/common/modes/supports/onEnter.test.ts @@ -10,34 +10,6 @@ import { OnEnterSupport } from 'vs/editor/common/modes/supports/onEnter'; suite('OnEnter', () => { - test('uses indentationRules', () => { - var support = new OnEnterSupport({ - indentationRules: { - decreaseIndentPattern: /^\s*((?!\S.*\/[*]).*[*]\/\s*)?[})\]]|^\s*(case\b.*|default):\s*(\/\/.*|\/[*].*[*]\/\s*)?$/, - increaseIndentPattern: /(\{[^}"'`]*|\([^)"']*|\[[^\]"']*|^\s*(\{\}|\(\)|\[\]|(case\b.*|default):))\s*(\/\/.*|\/[*].*[*]\/\s*)?$/, - indentNextLinePattern: /^\s*(for|while|if|else)\b(?!.*[;{}]\s*(\/\/.*|\/[*].*[*]\/\s*)?$)/, - unIndentedLinePattern: /^(?!.*([;{}]|\S:)\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!.*(\{[^}"']*|\([^)"']*|\[[^\]"']*|^\s*(\{\}|\(\)|\[\]|(case\b.*|default):))\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!^\s*((?!\S.*\/[*]).*[*]\/\s*)?[})\]]|^\s*(case\b.*|default):\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!^\s*(for|while|if|else)\b(?!.*[;{}]\s*(\/\/.*|\/[*].*[*]\/\s*)?$))/ - } - }); - - var testIndentAction = (oneLineAboveText: string, beforeText: string, afterText: string, expected: IndentAction) => { - var actual = support.onEnter(oneLineAboveText, beforeText, afterText); - if (expected === IndentAction.None) { - assert.equal(actual, null); - } else { - assert.equal(actual.indentAction, expected); - } - }; - - testIndentAction('', 'case', '', IndentAction.None); - testIndentAction('', 'case:', '', IndentAction.Indent); - testIndentAction('', 'if (true) {', '', IndentAction.Indent); - testIndentAction('', 'if (true)', '', IndentAction.Indent); - testIndentAction('', ' ', '}', IndentAction.Outdent); - testIndentAction('if(true)', '\treturn false', '', IndentAction.Outdent); - testIndentAction('', 'var foo = `{`;', '', IndentAction.None); - }); - test('uses brackets', () => { var brackets: CharacterPair[] = [ ['(', ')'], From 557f010feef1ab1029bf26f2b86b9c8a72930fdd Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 8 Jun 2017 18:01:45 -0700 Subject: [PATCH 1977/2747] AutoIndent: Type! --- .../common/controller/cursorTypeOperations.ts | 42 ++++++++------ .../modes/languageConfigurationRegistry.ts | 55 ++++++++++++++++--- 2 files changed, 73 insertions(+), 24 deletions(-) diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index 389cc03ecbbbc..d10b0d5951c6e 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -266,31 +266,31 @@ export class TypeOperations { private static _enter(config: CursorConfiguration, model: ITokenizedModel, keepPosition: boolean, range: Range): ICommand { let r = LanguageConfigurationRegistry.getEnterAction(model, range); if (r) { - let enterAction = r.enterAction; - let indentation = r.indentation; + let enterAction = r.enterAction; + let indentation = r.indentation; - if (enterAction.indentAction === IndentAction.None) { - // Nothing special + if (enterAction.indentAction === IndentAction.None) { + // Nothing special return TypeOperations._typeCommand(range, '\n' + config.normalizeIndentation(indentation + enterAction.appendText), keepPosition); - } else if (enterAction.indentAction === IndentAction.Indent) { - // Indent once + } else if (enterAction.indentAction === IndentAction.Indent) { + // Indent once return TypeOperations._typeCommand(range, '\n' + config.normalizeIndentation(indentation + enterAction.appendText), keepPosition); - } else if (enterAction.indentAction === IndentAction.IndentOutdent) { - // Ultra special - let normalIndent = config.normalizeIndentation(indentation); - let increasedIndent = config.normalizeIndentation(indentation + enterAction.appendText); + } else if (enterAction.indentAction === IndentAction.IndentOutdent) { + // Ultra special + let normalIndent = config.normalizeIndentation(indentation); + let increasedIndent = config.normalizeIndentation(indentation + enterAction.appendText); let typeText = '\n' + increasedIndent + '\n' + normalIndent; - if (keepPosition) { - return new ReplaceCommandWithoutChangingPosition(range, typeText, true); - } else { - return new ReplaceCommandWithOffsetCursorState(range, typeText, -1, increasedIndent.length - normalIndent.length, true); - } - } else if (enterAction.indentAction === IndentAction.Outdent) { - let actualIndentation = TypeOperations.unshiftIndent(config, indentation); + if (keepPosition) { + return new ReplaceCommandWithoutChangingPosition(range, typeText, true); + } else { + return new ReplaceCommandWithOffsetCursorState(range, typeText, -1, increasedIndent.length - normalIndent.length, true); + } + } else if (enterAction.indentAction === IndentAction.Outdent) { + let actualIndentation = TypeOperations.unshiftIndent(config, indentation); return TypeOperations._typeCommand(range, '\n' + config.normalizeIndentation(actualIndentation + enterAction.appendText), keepPosition); } } @@ -596,6 +596,14 @@ export class TypeOperations { }); } + let indentCommand = this._runAutoIndentType(config, model, selections, ch); + if (indentCommand) { + return new EditOperationResult([indentCommand], { + shouldPushStackElementBefore: true, + shouldPushStackElementAfter: false, + }); + } + if (this._isAutoClosingCloseCharType(config, model, selections, ch)) { return this._runAutoClosingCloseCharType(config, model, selections, ch); } diff --git a/src/vs/editor/common/modes/languageConfigurationRegistry.ts b/src/vs/editor/common/modes/languageConfigurationRegistry.ts index dde5e4c57c58f..c15da62eb22f8 100644 --- a/src/vs/editor/common/modes/languageConfigurationRegistry.ts +++ b/src/vs/editor/common/modes/languageConfigurationRegistry.ts @@ -75,7 +75,7 @@ export class RichEditSupport { this.indentationRules = this._conf.indentationRules; if (this._conf.indentationRules) { this.indentRulesSupport = new IndentRulesSupport(this._conf.indentationRules); - } + } } private static _mergeConf(prev: LanguageConfiguration, current: LanguageConfiguration): LanguageConfiguration { @@ -417,7 +417,7 @@ export class LanguageConfigurationRegistryImpl { } } - public getIndentForEnter(model: ITokenizedModel, range: Range, indentConverter: any): {beforeEnter: string, afterEnter: string} { + public getIndentForEnter(model: ITokenizedModel, range: Range, indentConverter: any): { beforeEnter: string, afterEnter: string } { let scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber, range.startColumn); let scopedLineText = scopedLineTokens.getLineContent(); let beforeEnterText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset); @@ -492,6 +492,47 @@ export class LanguageConfigurationRegistryImpl { afterEnter: afterEnterIndent }; } + + /** + * We should always allow intentional indentation. It means, if users change the indentation of `lineNumber` and the content of + * this line doesn't match decreaseIndentPattern, we should not adjust the indentation. + */ + public getIndentActionForType(model: ITokenizedModel, lineNumber: number, column: number, ch: string, indentConverter: any): string { + let maxColumn = model.getLineMaxColumn(lineNumber); + // let indentation = this.getIndentationAtPosition(model, lineNumber, column); + + let scopedLineTokens = this.getScopedLineTokens(model, lineNumber, maxColumn); + let indentRulesSupport = this._getIndentRulesSupport(scopedLineTokens.languageId); + if (!indentRulesSupport) { + return null; + } + + let scopedLineText = scopedLineTokens.getLineContent(); + let beforeTypeText = scopedLineText.substr(0, column - 1); + let afterTypeText = scopedLineText.substr(column - 1); + + if (indentRulesSupport.shouldDecrease(beforeTypeText + ch + afterTypeText)) { + // after typing `ch`, the content matches decreaseIndentPattern, we should adjust the indent to a good manner. + // 1. Get inherited indent action + let r = this.getInheritIndentForLine(model, lineNumber, false); + if (!r) { + return null; + } + + let indentation = r.indentation; + + if (r.action !== IndentAction.Indent) { + indentation = indentConverter.unshiftIndent(indentation); + } + + return indentation; + } + + return null; + } + + // end Indent Rules + // begin onEnter private _getOnEnterSupport(languageId: LanguageId): OnEnterSupport { @@ -535,11 +576,11 @@ export class LanguageConfigurationRegistryImpl { if (lineNumber > 1 && scopedLineTokens.firstCharOffset === 0) { // This is not the first line and the entire line belongs to this mode let oneLineAboveScopedLineTokens = this.getScopedLineTokens(model, lineNumber - 1); - if (oneLineAboveScopedLineTokens.languageId === scopedLineTokens.languageId) { - // The line above ends with text belonging to the same mode - oneLineAboveText = oneLineAboveScopedLineTokens.getLineContent(); - } + if (oneLineAboveScopedLineTokens.languageId === scopedLineTokens.languageId) { + // The line above ends with text belonging to the same mode + oneLineAboveText = oneLineAboveScopedLineTokens.getLineContent(); } + } let enterResult: EnterAction = null; try { @@ -561,8 +602,8 @@ export class LanguageConfigurationRegistryImpl { } else { enterResult.appendText = ''; } - } } + } if (enterResult.removeText) { indentation = indentation.substring(0, indentation.length - enterResult.removeText); From e82a1bef993a7499af90d2a1aa1735fd524af348 Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 8 Jun 2017 18:16:53 -0700 Subject: [PATCH 1978/2747] AutoIndent: Type supports selection. --- .../common/controller/cursorTypeOperations.ts | 17 +++++++-------- .../modes/languageConfigurationRegistry.ts | 21 ++++++++++++------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index d10b0d5951c6e..7f57c9f51f876 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -322,10 +322,9 @@ export class TypeOperations { } } - private static _runAutoIndentType(config: CursorConfiguration, model: ITokenizedModel, selections: Selection[], ch: string): ICommand { - let selection = selections[0]; - let currentIndentation = LanguageConfigurationRegistry.getIndentationAtPosition(model, selection.startLineNumber, selection.startColumn); - let actualIndentation = LanguageConfigurationRegistry.getIndentActionForType(model, selections[0].startLineNumber, selections[0].startColumn, ch, { + private static _runAutoIndentType(config: CursorConfiguration, model: ITokenizedModel, range: Range, ch: string): ICommand { + let currentIndentation = LanguageConfigurationRegistry.getIndentationAtPosition(model, range.startLineNumber, range.startColumn); + let actualIndentation = LanguageConfigurationRegistry.getIndentActionForType(model, range, ch, { shiftIndent: (indentation) => { return TypeOperations.shiftIndent(config, indentation); }, @@ -339,18 +338,18 @@ export class TypeOperations { } if (actualIndentation !== config.normalizeIndentation(currentIndentation)) { - let firstNonWhitespace = model.getLineFirstNonWhitespaceColumn(selection.startLineNumber); + let firstNonWhitespace = model.getLineFirstNonWhitespaceColumn(range.startLineNumber); if (firstNonWhitespace === 0) { return TypeOperations._typeCommand( - new Range(selection.startLineNumber, 0, selection.startLineNumber, selection.startColumn), + new Range(range.startLineNumber, 0, range.endLineNumber, range.endColumn), actualIndentation + ch, false ); } else { return TypeOperations._typeCommand( - new Range(selection.startLineNumber, 0, selection.startLineNumber, selection.startColumn), + new Range(range.startLineNumber, 0, range.endLineNumber, range.endColumn), actualIndentation + - model.getLineContent(selection.startLineNumber).substring(firstNonWhitespace - 1, selection.startColumn) + ch, + model.getLineContent(range.startLineNumber).substring(firstNonWhitespace - 1, range.startColumn - 1) + ch, false ); } @@ -596,7 +595,7 @@ export class TypeOperations { }); } - let indentCommand = this._runAutoIndentType(config, model, selections, ch); + let indentCommand = this._runAutoIndentType(config, model, selections[0], ch); if (indentCommand) { return new EditOperationResult([indentCommand], { shouldPushStackElementBefore: true, diff --git a/src/vs/editor/common/modes/languageConfigurationRegistry.ts b/src/vs/editor/common/modes/languageConfigurationRegistry.ts index c15da62eb22f8..2c9d960febc29 100644 --- a/src/vs/editor/common/modes/languageConfigurationRegistry.ts +++ b/src/vs/editor/common/modes/languageConfigurationRegistry.ts @@ -497,24 +497,29 @@ export class LanguageConfigurationRegistryImpl { * We should always allow intentional indentation. It means, if users change the indentation of `lineNumber` and the content of * this line doesn't match decreaseIndentPattern, we should not adjust the indentation. */ - public getIndentActionForType(model: ITokenizedModel, lineNumber: number, column: number, ch: string, indentConverter: any): string { - let maxColumn = model.getLineMaxColumn(lineNumber); - // let indentation = this.getIndentationAtPosition(model, lineNumber, column); - - let scopedLineTokens = this.getScopedLineTokens(model, lineNumber, maxColumn); + public getIndentActionForType(model: ITokenizedModel, range: Range, ch: string, indentConverter: any): string { + let scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber, range.startColumn); let indentRulesSupport = this._getIndentRulesSupport(scopedLineTokens.languageId); if (!indentRulesSupport) { return null; } let scopedLineText = scopedLineTokens.getLineContent(); - let beforeTypeText = scopedLineText.substr(0, column - 1); - let afterTypeText = scopedLineText.substr(column - 1); + let beforeTypeText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset); + let afterTypeText; + + // selection support + if (range.isEmpty()) { + afterTypeText = scopedLineText.substr(range.startColumn - 1 - scopedLineTokens.firstCharOffset); + } else { + const endScopedLineTokens = this.getScopedLineTokens(model, range.endLineNumber, range.endColumn); + afterTypeText = endScopedLineTokens.getLineContent().substr(range.endColumn - 1 - scopedLineTokens.firstCharOffset); + } if (indentRulesSupport.shouldDecrease(beforeTypeText + ch + afterTypeText)) { // after typing `ch`, the content matches decreaseIndentPattern, we should adjust the indent to a good manner. // 1. Get inherited indent action - let r = this.getInheritIndentForLine(model, lineNumber, false); + let r = this.getInheritIndentForLine(model, range.startLineNumber, false); if (!r) { return null; } From 89a4f7a69ac9a7bbc75482951082b10c69dc6f4a Mon Sep 17 00:00:00 2001 From: rebornix Date: Thu, 8 Jun 2017 18:32:31 -0700 Subject: [PATCH 1979/2747] AutoIndent: Type, put this feature behind a flag. --- .../editor/common/config/commonEditorConfig.ts | 5 +++++ src/vs/editor/common/config/editorOptions.ts | 16 ++++++++++++++++ src/vs/editor/common/controller/cursorCommon.ts | 2 ++ .../common/controller/cursorTypeOperations.ts | 14 ++++++++------ src/vs/monaco.d.ts | 7 +++++++ .../platform/telemetry/common/telemetryUtils.ts | 1 + 6 files changed, 39 insertions(+), 6 deletions(-) diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index 9dc377162fd62..a13fd48f5a748 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -401,6 +401,11 @@ const editorConfiguration: IConfigurationNode = { 'default': EDITOR_DEFAULTS.contribInfo.formatOnPaste, 'description': nls.localize('formatOnPaste', "Controls if the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.") }, + 'editor.autoIndent': { + 'type': 'boolean', + 'default': EDITOR_DEFAULTS.autoIndent, + 'description': nls.localize('autoIndent', "Controls if the editor should automatically adjust the indenation when users type. Indentation Rules of the language must be available. ") + }, 'editor.suggestOnTriggerCharacters': { 'type': 'boolean', 'default': EDITOR_DEFAULTS.contribInfo.suggestOnTriggerCharacters, diff --git a/src/vs/editor/common/config/editorOptions.ts b/src/vs/editor/common/config/editorOptions.ts index 9835b48bc22a5..53ad5cbc7a2f4 100644 --- a/src/vs/editor/common/config/editorOptions.ts +++ b/src/vs/editor/common/config/editorOptions.ts @@ -376,6 +376,11 @@ export interface IEditorOptions { * Defaults to true. */ autoClosingBrackets?: boolean; + /** + * Enable auto indentation adjustment. + * Defaults to false. + */ + autoIndent?: boolean; /** * Enable format on type. * Defaults to false. @@ -803,6 +808,7 @@ export interface IValidatedEditorOptions { readonly wordWrapBreakAfterCharacters: string; readonly wordWrapBreakObtrusiveCharacters: string; readonly autoClosingBrackets: boolean; + readonly autoIndent: boolean; readonly dragAndDrop: boolean; readonly emptySelectionClipboard: boolean; readonly useTabStops: boolean; @@ -833,6 +839,7 @@ export class InternalEditorOptions { // ---- cursor options readonly wordSeparators: string; readonly autoClosingBrackets: boolean; + readonly autoIndent: boolean; readonly useTabStops: boolean; readonly tabFocusMode: boolean; readonly dragAndDrop: boolean; @@ -858,6 +865,7 @@ export class InternalEditorOptions { multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; wordSeparators: string; autoClosingBrackets: boolean; + autoIndent: boolean; useTabStops: boolean; tabFocusMode: boolean; dragAndDrop: boolean; @@ -877,6 +885,7 @@ export class InternalEditorOptions { this.multiCursorModifier = source.multiCursorModifier; this.wordSeparators = source.wordSeparators; this.autoClosingBrackets = source.autoClosingBrackets; + this.autoIndent = source.autoIndent; this.useTabStops = source.useTabStops; this.tabFocusMode = source.tabFocusMode; this.dragAndDrop = source.dragAndDrop; @@ -902,6 +911,7 @@ export class InternalEditorOptions { && this.multiCursorModifier === other.multiCursorModifier && this.wordSeparators === other.wordSeparators && this.autoClosingBrackets === other.autoClosingBrackets + && this.autoIndent === other.autoIndent && this.useTabStops === other.useTabStops && this.tabFocusMode === other.tabFocusMode && this.dragAndDrop === other.dragAndDrop @@ -928,6 +938,7 @@ export class InternalEditorOptions { multiCursorModifier: (this.multiCursorModifier !== newOpts.multiCursorModifier), wordSeparators: (this.wordSeparators !== newOpts.wordSeparators), autoClosingBrackets: (this.autoClosingBrackets !== newOpts.autoClosingBrackets), + autoIndent: (this.autoIndent !== newOpts.autoIndent), useTabStops: (this.useTabStops !== newOpts.useTabStops), tabFocusMode: (this.tabFocusMode !== newOpts.tabFocusMode), dragAndDrop: (this.dragAndDrop !== newOpts.dragAndDrop), @@ -1268,6 +1279,7 @@ export interface IConfigurationChangedEvent { readonly multiCursorModifier: boolean; readonly wordSeparators: boolean; readonly autoClosingBrackets: boolean; + readonly autoIndent: boolean; readonly useTabStops: boolean; readonly tabFocusMode: boolean; readonly dragAndDrop: boolean; @@ -1445,6 +1457,7 @@ export class EditorOptionsValidator { wordWrapBreakAfterCharacters: _string(opts.wordWrapBreakAfterCharacters, defaults.wordWrapBreakAfterCharacters), wordWrapBreakObtrusiveCharacters: _string(opts.wordWrapBreakObtrusiveCharacters, defaults.wordWrapBreakObtrusiveCharacters), autoClosingBrackets: _boolean(opts.autoClosingBrackets, defaults.autoClosingBrackets), + autoIndent: _boolean(opts.autoIndent, defaults.autoIndent), dragAndDrop: _boolean(opts.dragAndDrop, defaults.dragAndDrop), emptySelectionClipboard: _boolean(opts.emptySelectionClipboard, defaults.emptySelectionClipboard), useTabStops: _boolean(opts.useTabStops, defaults.useTabStops), @@ -1670,6 +1683,7 @@ export class InternalEditorOptionsFactory { wordWrapBreakAfterCharacters: opts.wordWrapBreakAfterCharacters, wordWrapBreakObtrusiveCharacters: opts.wordWrapBreakObtrusiveCharacters, autoClosingBrackets: opts.autoClosingBrackets, + autoIndent: opts.autoIndent, dragAndDrop: opts.dragAndDrop, emptySelectionClipboard: opts.emptySelectionClipboard, useTabStops: opts.useTabStops, @@ -1876,6 +1890,7 @@ export class InternalEditorOptionsFactory { multiCursorModifier: opts.multiCursorModifier, wordSeparators: opts.wordSeparators, autoClosingBrackets: opts.autoClosingBrackets, + autoIndent: opts.autoIndent, useTabStops: opts.useTabStops, tabFocusMode: opts.readOnly ? true : env.tabFocusMode, dragAndDrop: opts.dragAndDrop, @@ -2089,6 +2104,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = { wordWrapBreakAfterCharacters: ' \t})]?|&,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー’”〉》」』】〕)]}」', wordWrapBreakObtrusiveCharacters: '.', autoClosingBrackets: true, + autoIndent: false, dragAndDrop: true, emptySelectionClipboard: true, useTabStops: true, diff --git a/src/vs/editor/common/controller/cursorCommon.ts b/src/vs/editor/common/controller/cursorCommon.ts index 55e00ad1e4340..eb7b37719647c 100644 --- a/src/vs/editor/common/controller/cursorCommon.ts +++ b/src/vs/editor/common/controller/cursorCommon.ts @@ -64,6 +64,7 @@ export class CursorConfiguration { public readonly wordSeparators: string; public readonly emptySelectionClipboard: boolean; public readonly autoClosingBrackets: boolean; + public readonly autoIndent: boolean; public readonly autoClosingPairsOpen: CharacterMap; public readonly autoClosingPairsClose: CharacterMap; public readonly surroundingPairs: CharacterMap; @@ -99,6 +100,7 @@ export class CursorConfiguration { this.wordSeparators = c.wordSeparators; this.emptySelectionClipboard = c.emptySelectionClipboard; this.autoClosingBrackets = c.autoClosingBrackets; + this.autoIndent = c.autoIndent; this.autoClosingPairsOpen = {}; this.autoClosingPairsClose = {}; diff --git a/src/vs/editor/common/controller/cursorTypeOperations.ts b/src/vs/editor/common/controller/cursorTypeOperations.ts index 7f57c9f51f876..f57b20765897b 100644 --- a/src/vs/editor/common/controller/cursorTypeOperations.ts +++ b/src/vs/editor/common/controller/cursorTypeOperations.ts @@ -595,12 +595,14 @@ export class TypeOperations { }); } - let indentCommand = this._runAutoIndentType(config, model, selections[0], ch); - if (indentCommand) { - return new EditOperationResult([indentCommand], { - shouldPushStackElementBefore: true, - shouldPushStackElementAfter: false, - }); + if (config.autoIndent) { + let indentCommand = this._runAutoIndentType(config, model, selections[0], ch); + if (indentCommand) { + return new EditOperationResult([indentCommand], { + shouldPushStackElementBefore: true, + shouldPushStackElementAfter: false, + }); + } } if (this._isAutoClosingCloseCharType(config, model, selections, ch)) { diff --git a/src/vs/monaco.d.ts b/src/vs/monaco.d.ts index 5dddf0d0f3d32..6a801403e303a 100644 --- a/src/vs/monaco.d.ts +++ b/src/vs/monaco.d.ts @@ -2926,6 +2926,11 @@ declare module monaco.editor { * Defaults to true. */ autoClosingBrackets?: boolean; + /** + * Enable auto indentation adjustment. + * Defaults to false. + */ + autoIndent?: boolean; /** * Enable format on type. * Defaults to false. @@ -3284,6 +3289,7 @@ declare module monaco.editor { readonly multiCursorModifier: 'altKey' | 'ctrlKey' | 'metaKey'; readonly wordSeparators: string; readonly autoClosingBrackets: boolean; + readonly autoIndent: boolean; readonly useTabStops: boolean; readonly tabFocusMode: boolean; readonly dragAndDrop: boolean; @@ -3416,6 +3422,7 @@ declare module monaco.editor { readonly multiCursorModifier: boolean; readonly wordSeparators: boolean; readonly autoClosingBrackets: boolean; + readonly autoIndent: boolean; readonly useTabStops: boolean; readonly tabFocusMode: boolean; readonly dragAndDrop: boolean; diff --git a/src/vs/platform/telemetry/common/telemetryUtils.ts b/src/vs/platform/telemetry/common/telemetryUtils.ts index 516a0320f0ae5..4a8231e3d3a74 100644 --- a/src/vs/platform/telemetry/common/telemetryUtils.ts +++ b/src/vs/platform/telemetry/common/telemetryUtils.ts @@ -219,6 +219,7 @@ const configurationValueWhitelist = [ 'editor.quickSuggestionsDelay', 'editor.parameterHints', 'editor.autoClosingBrackets', + 'editor.autoindent', 'editor.formatOnType', 'editor.formatOnPaste', 'editor.suggestOnTriggerCharacters', From 0b80802df6205dc9fac604e5e48e9754ffa31bfa Mon Sep 17 00:00:00 2001 From: rebornix Date: Fri, 9 Jun 2017 15:41:26 -0700 Subject: [PATCH 1980/2747] AutoIndent: MoveLines, draft version, it already works but have potential bugs. --- .../modes/languageConfigurationRegistry.ts | 27 +++ .../linesOperations/common/linesOperations.ts | 3 +- .../common/moveLinesCommand.ts | 166 +++++++++++++++++- 3 files changed, 192 insertions(+), 4 deletions(-) diff --git a/src/vs/editor/common/modes/languageConfigurationRegistry.ts b/src/vs/editor/common/modes/languageConfigurationRegistry.ts index 2c9d960febc29..e7d63e773a5e2 100644 --- a/src/vs/editor/common/modes/languageConfigurationRegistry.ts +++ b/src/vs/editor/common/modes/languageConfigurationRegistry.ts @@ -417,6 +417,33 @@ export class LanguageConfigurationRegistryImpl { } } + public getGoodIndentForLine(virtualModel: IVirtualModel, languageId: LanguageId, lineNumber: number, indentConverter: any): string { + let indentRulesSupport = this._getIndentRulesSupport(languageId); + if (!indentRulesSupport) { + return null; + } + + let indent = this.getInheritIndentForLine(virtualModel, lineNumber); + let lineContent = virtualModel.getLineContent(lineNumber); + + if (indent) { + if (indentRulesSupport.shouldDecrease(lineContent)) { + if (indent.action === IndentAction.Indent) { + return indent.indentation; + } else { + return indentConverter.unshiftIndent(indent.indentation); + } + } else { + if (indent.action === IndentAction.Indent) { + return indentConverter.shiftIndent(indent.indentation); + } else { + return indent.indentation; + } + } + } + return null; + } + public getIndentForEnter(model: ITokenizedModel, range: Range, indentConverter: any): { beforeEnter: string, afterEnter: string } { let scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber, range.startColumn); let scopedLineText = scopedLineTokens.getLineContent(); diff --git a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts index a41829a885b17..3c5229de4505e 100644 --- a/src/vs/editor/contrib/linesOperations/common/linesOperations.ts +++ b/src/vs/editor/contrib/linesOperations/common/linesOperations.ts @@ -96,9 +96,10 @@ abstract class AbstractMoveLinesAction extends EditorAction { var commands: ICommand[] = []; var selections = editor.getSelections(); + var autoIndent = editor.getConfiguration().autoIndent; for (var i = 0; i < selections.length; i++) { - commands.push(new MoveLinesCommand(selections[i], this.down)); + commands.push(new MoveLinesCommand(selections[i], this.down, autoIndent)); } editor.pushUndoStop(); diff --git a/src/vs/editor/contrib/linesOperations/common/moveLinesCommand.ts b/src/vs/editor/contrib/linesOperations/common/moveLinesCommand.ts index 43ed98d212d82..ef64aba88b248 100644 --- a/src/vs/editor/contrib/linesOperations/common/moveLinesCommand.ts +++ b/src/vs/editor/contrib/linesOperations/common/moveLinesCommand.ts @@ -4,21 +4,26 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; +import * as strings from 'vs/base/common/strings'; import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { ICommand, ICursorStateComputerData, IEditOperationBuilder, ITokenizedModel } from 'vs/editor/common/editorCommon'; +import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; +import { ShiftCommand } from 'vs/editor/common/commands/shiftCommand'; export class MoveLinesCommand implements ICommand { private _selection: Selection; private _isMovingDown: boolean; + private _autoIndent: boolean; private _selectionId: string; private _moveEndPositionDown: boolean; - constructor(selection: Selection, isMovingDown: boolean) { + constructor(selection: Selection, isMovingDown: boolean, autoIndent: boolean) { this._selection = selection; this._isMovingDown = isMovingDown; + this._autoIndent = autoIndent; } public getEditOperations(model: ITokenizedModel, builder: IEditOperationBuilder): void { @@ -40,6 +45,41 @@ export class MoveLinesCommand implements ICommand { s = s.setEndPosition(s.endLineNumber - 1, model.getLineMaxColumn(s.endLineNumber - 1)); } + let tabSize = model.getOptions().tabSize; + let insertSpaces = model.getOptions().insertSpaces; + let indentConverter = { + shiftIndent: (indentation) => { + let desiredIndentCount = ShiftCommand.shiftIndentCount(indentation, indentation.length + 1, tabSize); + let newIndentation = ''; + for (let i = 0; i < desiredIndentCount; i++) { + newIndentation += '\t'; + } + + return newIndentation; + }, + unshiftIndent: (indentation) => { + let desiredIndentCount = ShiftCommand.unshiftIndentCount(indentation, indentation.length + 1, tabSize); + let newIndentation = ''; + for (let i = 0; i < desiredIndentCount; i++) { + newIndentation += '\t'; + } + + return newIndentation; + } + }; + let virtualModel = { + getLineTokens: (lineNumber: number) => { + return model.getLineTokens(lineNumber); + }, + getLanguageIdentifier: () => { + return model.getLanguageIdentifier(); + }, + getLanguageIdAtPosition: (lineNumber: number, column: number) => { + return model.getLanguageIdAtPosition(lineNumber, column); + }, + getLineContent: null + }; + if (s.startLineNumber === s.endLineNumber && model.getLineMaxColumn(s.startLineNumber) === 1) { // Current line is empty var lineNumber = s.startLineNumber; @@ -67,12 +107,67 @@ export class MoveLinesCommand implements ICommand { if (this._isMovingDown) { movingLineNumber = s.endLineNumber + 1; movingLineText = model.getLineContent(movingLineNumber); - // Delete line that needs to be moved builder.addEditOperation(new Range(movingLineNumber - 1, model.getLineMaxColumn(movingLineNumber - 1), movingLineNumber, model.getLineMaxColumn(movingLineNumber)), null); + let insertingText = movingLineText; // Insert line that needs to be moved before - builder.addEditOperation(new Range(s.startLineNumber, 1, s.startLineNumber, 1), movingLineText + '\n'); + + if (this._autoIndent) { + virtualModel.getLineContent = (lineNumber) => { + if (lineNumber === s.startLineNumber) { + return model.getLineContent(movingLineNumber); + } else { + return model.getLineContent(lineNumber); + } + }; + let newIndentation = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdAtPosition( + movingLineNumber, 1), s.startLineNumber, indentConverter); + if (newIndentation !== null) { + let oldIndentation = strings.getLeadingWhitespace(model.getLineContent(movingLineNumber)); + let newSpaceCnt = this.getSpaceCnt(newIndentation, tabSize); + let oldSpaceCnt = this.getSpaceCnt(oldIndentation, tabSize); + if (newSpaceCnt !== oldSpaceCnt) { + let newIndentation = this.generateIndent(newSpaceCnt, tabSize, insertSpaces); + insertingText = newIndentation + strings.ltrim(strings.ltrim(movingLineText), '\t'); + } + } + + virtualModel.getLineContent = (lineNumber) => { + if (lineNumber === s.startLineNumber) { + return insertingText; + } else if (lineNumber >= s.startLineNumber + 1 && lineNumber <= s.endLineNumber + 1) { + return model.getLineContent(lineNumber - 1); + } else { + return model.getLineContent(lineNumber); + } + }; + + let newIndentationForMovingBlock = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdAtPosition( + movingLineNumber, 1), s.startLineNumber + 1, indentConverter); + + if (newIndentationForMovingBlock !== null) { + let oldIndentation = strings.getLeadingWhitespace(model.getLineContent(s.startLineNumber)); + let newSpaceCnt = this.getSpaceCnt(newIndentationForMovingBlock, tabSize); + let oldSpaceCnt = this.getSpaceCnt(oldIndentation, tabSize); + if (newSpaceCnt !== oldSpaceCnt) { + let spaceCntOffset = newSpaceCnt - oldSpaceCnt; + + for (let i = s.startLineNumber; i <= s.endLineNumber; i++) { + let lineContent = model.getLineContent(i); + let originalIndent = strings.getLeadingWhitespace(lineContent); + let originalSpacesCnt = this.getSpaceCnt(originalIndent, tabSize); + let newSpacesCnt = originalSpacesCnt + spaceCntOffset; + let newIndent = this.generateIndent(newSpacesCnt, tabSize, insertSpaces); + + if (newIndent !== originalIndent) { + builder.addEditOperation(new Range(i, 1, i, originalIndent.length + 1), newIndent); + } + } + } + } + } + builder.addEditOperation(new Range(s.startLineNumber, 1, s.startLineNumber, 1), insertingText + '\n'); } else { movingLineNumber = s.startLineNumber - 1; movingLineText = model.getLineContent(movingLineNumber); @@ -82,12 +177,77 @@ export class MoveLinesCommand implements ICommand { // Insert line that needs to be moved after builder.addEditOperation(new Range(s.endLineNumber, model.getLineMaxColumn(s.endLineNumber), s.endLineNumber, model.getLineMaxColumn(s.endLineNumber)), '\n' + movingLineText); + + if (this._autoIndent && (model.getLanguageIdAtPosition(s.startLineNumber, 1) === model.getLanguageIdAtPosition(s.endLineNumber, 1))) { + virtualModel.getLineContent = (lineNumber: number) => { + if (lineNumber === movingLineNumber) { + return model.getLineContent(s.startLineNumber); + } else { + return model.getLineContent(lineNumber); + } + }; + let newIndentation = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdAtPosition(s.startLineNumber, 1), movingLineNumber, indentConverter); + if (newIndentation !== null) { + // adjust the indentation of the moving block + let oldIndentation = strings.getLeadingWhitespace(model.getLineContent(s.startLineNumber)); + let newSpaceCnt = this.getSpaceCnt(newIndentation, tabSize); + let oldSpaceCnt = this.getSpaceCnt(oldIndentation, tabSize); + if (newSpaceCnt !== oldSpaceCnt) { + let spaceCntOffset = newSpaceCnt - oldSpaceCnt; + + for (let i = s.startLineNumber; i <= s.endLineNumber; i++) { + let lineContent = model.getLineContent(i); + let originalIndent = strings.getLeadingWhitespace(lineContent); + let originalSpacesCnt = this.getSpaceCnt(originalIndent, tabSize); + let newSpacesCnt = originalSpacesCnt + spaceCntOffset; + let newIndent = this.generateIndent(newSpacesCnt, tabSize, insertSpaces); + + if (newIndent !== originalIndent) { + builder.addEditOperation(new Range(i, 1, i, originalIndent.length + 1), newIndent); + } + } + } + } + } } } this._selectionId = builder.trackSelection(s); } + private getSpaceCnt(str, tabSize) { + let spacesCnt = 0; + + for (let i = 0; i < str.length; i++) { + if (str.charAt(i) === '\t') { + spacesCnt += tabSize; + } else { + spacesCnt++; + } + } + + return spacesCnt; + } + + private generateIndent(spacesCnt: number, tabSize, insertSpaces) { + spacesCnt = spacesCnt < 0 ? 0 : spacesCnt; + + let result = ''; + if (!insertSpaces) { + let tabsCnt = Math.floor(spacesCnt / tabSize); + spacesCnt = spacesCnt % tabSize; + for (let i = 0; i < tabsCnt; i++) { + result += '\t'; + } + } + + for (let i = 0; i < spacesCnt; i++) { + result += ' '; + } + + return result; + } + public computeCursorState(model: ITokenizedModel, helper: ICursorStateComputerData): Selection { var result = helper.getTrackedSelection(this._selectionId); From ed09ea34f9cb5908940853cd25f9c0f3acae504d Mon Sep 17 00:00:00 2001 From: rebornix Date: Fri, 9 Jun 2017 16:53:10 -0700 Subject: [PATCH 1981/2747] AutoIndent: Indent on paste --- .../contrib/indentation/common/indentation.ts | 233 +++++++++++++++++- 1 file changed, 231 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/indentation/common/indentation.ts b/src/vs/editor/contrib/indentation/common/indentation.ts index 7fb494c770d07..d9c270f2464ad 100644 --- a/src/vs/editor/contrib/indentation/common/indentation.ts +++ b/src/vs/editor/contrib/indentation/common/indentation.ts @@ -4,11 +4,12 @@ *--------------------------------------------------------------------------------------------*/ import * as nls from 'vs/nls'; +import { IDisposable, dispose } from 'vs/base/common/lifecycle'; import { TPromise } from 'vs/base/common/winjs.base'; import * as strings from 'vs/base/common/strings'; -import { ICommonCodeEditor, IIdentifiedSingleEditOperation, ICommand, ICursorStateComputerData, IEditOperationBuilder, ITokenizedModel } from 'vs/editor/common/editorCommon'; +import { ICommonCodeEditor, IEditorContribution, IIdentifiedSingleEditOperation, ICommand, ICursorStateComputerData, IEditOperationBuilder, ITokenizedModel, EndOfLineSequence } from 'vs/editor/common/editorCommon'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; -import { editorAction, ServicesAccessor, IActionOptions, EditorAction } from 'vs/editor/common/editorCommonExtensions'; +import { editorAction, ServicesAccessor, IActionOptions, EditorAction, commonEditorContribution } from 'vs/editor/common/editorCommonExtensions'; import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen'; import { IModelService } from 'vs/editor/common/services/modelService'; import { Range } from 'vs/editor/common/core/range'; @@ -17,6 +18,7 @@ import { EditOperation } from 'vs/editor/common/core/editOperation'; import { TextModel } from 'vs/editor/common/model/textModel'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { ShiftCommand } from 'vs/editor/common/commands/shiftCommand'; +import { TextEdit } from 'vs/editor/common/modes'; export function shiftIndent(tabSize: number, indentation: string, count?: number): string { count = count || 1; @@ -325,6 +327,233 @@ export class ReindentLinesAction extends EditorAction { } } +export class AutoIndentOnPasteCommand implements ICommand { + + private _edits: TextEdit[]; + private _newEol: EndOfLineSequence; + + private _initialSelection: Selection; + private _selectionId: string; + + constructor(edits: TextEdit[], initialSelection: Selection) { + this._initialSelection = initialSelection; + this._edits = []; + this._newEol = undefined; + + for (let edit of edits) { + if (typeof edit.eol === 'number') { + this._newEol = edit.eol; + } + if (edit.range && typeof edit.text === 'string') { + this._edits.push(edit); + } + } + } + + public getEditOperations(model: ITokenizedModel, builder: IEditOperationBuilder): void { + for (let edit of this._edits) { + builder.addEditOperation(Range.lift(edit.range), edit.text); + } + + var selectionIsSet = false; + if (Array.isArray(this._edits) && this._edits.length === 1 && this._initialSelection.isEmpty()) { + if (this._edits[0].range.startColumn === this._initialSelection.endColumn && + this._edits[0].range.startLineNumber === this._initialSelection.endLineNumber) { + selectionIsSet = true; + this._selectionId = builder.trackSelection(this._initialSelection, true); + } else if (this._edits[0].range.endColumn === this._initialSelection.startColumn && + this._edits[0].range.endLineNumber === this._initialSelection.startLineNumber) { + selectionIsSet = true; + this._selectionId = builder.trackSelection(this._initialSelection, false); + } + } + + if (!selectionIsSet) { + this._selectionId = builder.trackSelection(this._initialSelection); + } + } + + public computeCursorState(model: ITokenizedModel, helper: ICursorStateComputerData): Selection { + return helper.getTrackedSelection(this._selectionId); + } +} + +@commonEditorContribution +export class AutoIndentOnPaste implements IEditorContribution { + private static ID = 'editor.contrib.autoIndentOnPaste'; + + private editor: ICommonCodeEditor; + private callOnDispose: IDisposable[]; + private callOnModel: IDisposable[]; + + constructor(editor: ICommonCodeEditor) { + this.editor = editor; + this.callOnDispose = []; + this.callOnModel = []; + + this.callOnDispose.push(editor.onDidChangeConfiguration(() => this.update())); + this.callOnDispose.push(editor.onDidChangeModel(() => this.update())); + this.callOnDispose.push(editor.onDidChangeModelLanguage(() => this.update())); + } + + private update(): void { + + // clean up + this.callOnModel = dispose(this.callOnModel); + + // we are disabled + if (!this.editor.getConfiguration().autoIndent) { + return; + } + + // no model + if (!this.editor.getModel()) { + return; + } + + this.callOnModel.push(this.editor.onDidPaste((range: Range) => { + this.trigger(range); + })); + } + + private trigger(range: Range): void { + if (this.editor.getSelections().length > 1) { + return; + } + + const model = this.editor.getModel(); + const { tabSize, insertSpaces } = model.getOptions(); + this.editor.pushUndoStop(); + let textEdits: TextEdit[] = []; + + let indentConverter = { + shiftIndent: (indentation) => { + let desiredIndentCount = ShiftCommand.shiftIndentCount(indentation, indentation.length + 1, tabSize); + let newIndentation = ''; + for (let i = 0; i < desiredIndentCount; i++) { + newIndentation += '\t'; + } + + return newIndentation; + }, + unshiftIndent: (indentation) => { + let desiredIndentCount = ShiftCommand.unshiftIndentCount(indentation, indentation.length + 1, tabSize); + let newIndentation = ''; + for (let i = 0; i < desiredIndentCount; i++) { + newIndentation += '\t'; + } + + return newIndentation; + } + }; + let indentOfFirstLine = LanguageConfigurationRegistry.getGoodIndentForLine(model, model.getLanguageIdentifier().id, range.startLineNumber, indentConverter); + + if (indentOfFirstLine !== null) { + let firstLineText = model.getLineContent(range.startLineNumber); + let oldIndentation = strings.getLeadingWhitespace(firstLineText); + let newSpaceCnt = this.getSpaceCnt(indentOfFirstLine, tabSize); + let oldSpaceCnt = this.getSpaceCnt(oldIndentation, tabSize); + + if (newSpaceCnt !== oldSpaceCnt) { + let newIndent = this.generateIndent(newSpaceCnt, tabSize, insertSpaces); + textEdits.push({ + range: new Range(range.startLineNumber, 1, range.startLineNumber, oldIndentation.length + 1), + text: newIndent + }); + firstLineText = newIndent + firstLineText.substr(oldIndentation.length + 1); + } + + if (range.startLineNumber !== range.endLineNumber) { + let virtualModel = { + getLineTokens: (lineNumber: number) => { + return model.getLineTokens(lineNumber); + }, + getLanguageIdentifier: () => { + return model.getLanguageIdentifier(); + }, + getLanguageIdAtPosition: (lineNumber: number, column: number) => { + return model.getLanguageIdAtPosition(lineNumber, column); + }, + getLineContent: (lineNumber) => { + if (lineNumber === range.startLineNumber) { + return firstLineText; + } else { + return model.getLineContent(lineNumber); + } + } + }; + let indentOfSecondLine = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdentifier().id, range.startLineNumber + 1, indentConverter); + let newSpaceCntOfSecondLine = this.getSpaceCnt(indentOfSecondLine, tabSize); + let oldSpaceCntOfSecondLine = this.getSpaceCnt(strings.getLeadingWhitespace(model.getLineContent(range.startLineNumber + 1)), tabSize); + + if (newSpaceCntOfSecondLine !== oldSpaceCntOfSecondLine) { + let spaceCntOffset = newSpaceCntOfSecondLine - oldSpaceCntOfSecondLine; + for (let i = range.startLineNumber + 1; i <= range.endLineNumber; i++) { + let lineContent = model.getLineContent(i); + let originalIndent = strings.getLeadingWhitespace(lineContent); + let originalSpacesCnt = this.getSpaceCnt(originalIndent, tabSize); + let newSpacesCnt = originalSpacesCnt + spaceCntOffset; + let newIndent = this.generateIndent(newSpacesCnt, tabSize, insertSpaces); + + if (newIndent !== originalIndent) { + textEdits.push({ + range: new Range(i, 1, i, originalIndent.length), + text: newIndent + }); + } + } + } + } + } + + let cmd = new AutoIndentOnPasteCommand(textEdits, this.editor.getSelection()); + this.editor.executeCommand('autoIndentOnPaste', cmd); + this.editor.pushUndoStop(); + } + + public getId(): string { + return AutoIndentOnPaste.ID; + } + + public dispose(): void { + this.callOnDispose = dispose(this.callOnDispose); + this.callOnModel = dispose(this.callOnModel); + } + + private getSpaceCnt(str, tabSize) { + let spacesCnt = 0; + + for (let i = 0; i < str.length; i++) { + if (str.charAt(i) === '\t') { + spacesCnt += tabSize; + } else { + spacesCnt++; + } + } + + return spacesCnt; + } + + private generateIndent(spacesCnt: number, tabSize, insertSpaces) { + spacesCnt = spacesCnt < 0 ? 0 : spacesCnt; + + let result = ''; + if (!insertSpaces) { + let tabsCnt = Math.floor(spacesCnt / tabSize); + spacesCnt = spacesCnt % tabSize; + for (let i = 0; i < tabsCnt; i++) { + result += '\t'; + } + } + + for (let i = 0; i < spacesCnt; i++) { + result += ' '; + } + + return result; + } +} + function getIndentationEditOperations(model: ITokenizedModel, builder: IEditOperationBuilder, tabSize: number, tabsToSpaces: boolean): void { if (model.getLineCount() === 1 && model.getLineMaxColumn(1) === 1) { // Model is empty From ca86a87726cf6ef8144cc64c7e2474c836ae005b Mon Sep 17 00:00:00 2001 From: rebornix Date: Sat, 10 Jun 2017 11:09:47 -0700 Subject: [PATCH 1982/2747] AutoIndent: Fix MoveLinesCommand test cases. --- .../linesOperations/test/common/moveLinesCommand.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/contrib/linesOperations/test/common/moveLinesCommand.test.ts b/src/vs/editor/contrib/linesOperations/test/common/moveLinesCommand.test.ts index 429d896276ebb..31b2778901a74 100644 --- a/src/vs/editor/contrib/linesOperations/test/common/moveLinesCommand.test.ts +++ b/src/vs/editor/contrib/linesOperations/test/common/moveLinesCommand.test.ts @@ -9,11 +9,11 @@ import { MoveLinesCommand } from 'vs/editor/contrib/linesOperations/common/moveL import { testCommand } from 'vs/editor/test/common/commands/commandTestUtils'; function testMoveLinesDownCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void { - testCommand(lines, null, selection, (sel) => new MoveLinesCommand(sel, true), expectedLines, expectedSelection); + testCommand(lines, null, selection, (sel) => new MoveLinesCommand(sel, true, false), expectedLines, expectedSelection); } function testMoveLinesUpCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void { - testCommand(lines, null, selection, (sel) => new MoveLinesCommand(sel, false), expectedLines, expectedSelection); + testCommand(lines, null, selection, (sel) => new MoveLinesCommand(sel, false, false), expectedLines, expectedSelection); } suite('Editor Contrib - Move Lines Command', () => { From fc326445becd7959b5d78a3de468015741a8c5b3 Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 14 Jun 2017 13:20:38 -0700 Subject: [PATCH 1983/2747] AutoIndent on paste, remove all indent whitespaces. --- src/vs/editor/contrib/indentation/common/indentation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/indentation/common/indentation.ts b/src/vs/editor/contrib/indentation/common/indentation.ts index d9c270f2464ad..b44866fc5827a 100644 --- a/src/vs/editor/contrib/indentation/common/indentation.ts +++ b/src/vs/editor/contrib/indentation/common/indentation.ts @@ -497,7 +497,7 @@ export class AutoIndentOnPaste implements IEditorContribution { if (newIndent !== originalIndent) { textEdits.push({ - range: new Range(i, 1, i, originalIndent.length), + range: new Range(i, 1, i, originalIndent.length + 1), text: newIndent }); } From b59f98988ee46977dc4818f6527e3ae61efc00b4 Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 14 Jun 2017 13:21:48 -0700 Subject: [PATCH 1984/2747] Make sure indent adjustment is executed on correct markers. --- .../contrib/linesOperations/common/moveLinesCommand.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/linesOperations/common/moveLinesCommand.ts b/src/vs/editor/contrib/linesOperations/common/moveLinesCommand.ts index ef64aba88b248..bf628c40a7dfe 100644 --- a/src/vs/editor/contrib/linesOperations/common/moveLinesCommand.ts +++ b/src/vs/editor/contrib/linesOperations/common/moveLinesCommand.ts @@ -133,6 +133,10 @@ export class MoveLinesCommand implements ICommand { } } + // add edit operations for moving line first to make sure it's executed after we make indentation change + // to s.startLineNumber + builder.addEditOperation(new Range(s.startLineNumber, 1, s.startLineNumber, 1), insertingText + '\n'); + virtualModel.getLineContent = (lineNumber) => { if (lineNumber === s.startLineNumber) { return insertingText; @@ -166,8 +170,9 @@ export class MoveLinesCommand implements ICommand { } } } + } else { + builder.addEditOperation(new Range(s.startLineNumber, 1, s.startLineNumber, 1), insertingText + '\n'); } - builder.addEditOperation(new Range(s.startLineNumber, 1, s.startLineNumber, 1), insertingText + '\n'); } else { movingLineNumber = s.startLineNumber - 1; movingLineText = model.getLineContent(movingLineNumber); @@ -186,6 +191,7 @@ export class MoveLinesCommand implements ICommand { return model.getLineContent(lineNumber); } }; + let newIndentation = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdAtPosition(s.startLineNumber, 1), movingLineNumber, indentConverter); if (newIndentation !== null) { // adjust the indentation of the moving block From 9ece2f5cad61720b8f6fc2c6fa5ee182f31f2a3e Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 14 Jun 2017 13:22:20 -0700 Subject: [PATCH 1985/2747] Moving lines beyond the first nonempty line now uses indent 0. --- .../common/modes/languageConfigurationRegistry.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/common/modes/languageConfigurationRegistry.ts b/src/vs/editor/common/modes/languageConfigurationRegistry.ts index e7d63e773a5e2..a524ea101a64e 100644 --- a/src/vs/editor/common/modes/languageConfigurationRegistry.ts +++ b/src/vs/editor/common/modes/languageConfigurationRegistry.ts @@ -319,12 +319,18 @@ export class LanguageConfigurationRegistryImpl { } if (lineNumber <= 1) { - return null; + return { + indentation: '', + action: null + }; } let precedingUnIgnoredLine = this.getPrecedingValidLine(model, lineNumber, indentRulesSupport); if (precedingUnIgnoredLine < 1) { - return null; + return { + indentation: '', + action: null + }; } let precedingUnIgnoredLineContent = model.getLineContent(precedingUnIgnoredLine); From 4527fd7ce8a73f710775bc51a1f1eecabb68229d Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 14 Jun 2017 14:02:17 -0700 Subject: [PATCH 1986/2747] Nested langauge issue. --- .../modes/languageConfigurationRegistry.ts | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/common/modes/languageConfigurationRegistry.ts b/src/vs/editor/common/modes/languageConfigurationRegistry.ts index a524ea101a64e..5ffccd3e8385b 100644 --- a/src/vs/editor/common/modes/languageConfigurationRegistry.ts +++ b/src/vs/editor/common/modes/languageConfigurationRegistry.ts @@ -451,9 +451,21 @@ export class LanguageConfigurationRegistryImpl { } public getIndentForEnter(model: ITokenizedModel, range: Range, indentConverter: any): { beforeEnter: string, afterEnter: string } { - let scopedLineTokens = this.getScopedLineTokens(model, range.startLineNumber, range.startColumn); + model.forceTokenization(range.startLineNumber); + let lineTokens = model.getLineTokens(range.startLineNumber); + + let beforeEnterText; + let tokenIndexUnderCursor = lineTokens.findTokenIndexAtOffset(range.startColumn); + let tokenIndexAtBeginning = lineTokens.findTokenIndexAtOffset(0); + let scopedLineTokens = createScopedLineTokens(lineTokens, range.startColumn); let scopedLineText = scopedLineTokens.getLineContent(); - let beforeEnterText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset); + + if (lineTokens.getLanguageId(tokenIndexAtBeginning) === lineTokens.getLanguageId(tokenIndexUnderCursor)) { + beforeEnterText = lineTokens.getLineContent().substring(0, range.startColumn); + } else { + beforeEnterText = scopedLineText.substr(0, range.startColumn - 1 - scopedLineTokens.firstCharOffset); + } + let afterEnterText; if (range.isEmpty()) { From 2ddfa2ec392823e4cd5ccdfe608d38f6c4f7fff3 Mon Sep 17 00:00:00 2001 From: rebornix Date: Fri, 16 Jun 2017 12:58:19 -0700 Subject: [PATCH 1987/2747] Refactor and test cases --- .../common/config/commonEditorConfig.ts | 2 +- .../contrib/indentation/common/indentUtils.ts | 37 +++++++ .../contrib/indentation/common/indentation.ts | 50 ++-------- .../common/moveLinesCommand.ts | 98 ++++++------------- .../test/common/moveLinesCommand.test.ts | 83 +++++++++++++++- .../test/common/controller/cursor.test.ts | 85 ++++++++++++++++ 6 files changed, 246 insertions(+), 109 deletions(-) create mode 100644 src/vs/editor/contrib/indentation/common/indentUtils.ts diff --git a/src/vs/editor/common/config/commonEditorConfig.ts b/src/vs/editor/common/config/commonEditorConfig.ts index a13fd48f5a748..fb99c90e67d2b 100644 --- a/src/vs/editor/common/config/commonEditorConfig.ts +++ b/src/vs/editor/common/config/commonEditorConfig.ts @@ -404,7 +404,7 @@ const editorConfiguration: IConfigurationNode = { 'editor.autoIndent': { 'type': 'boolean', 'default': EDITOR_DEFAULTS.autoIndent, - 'description': nls.localize('autoIndent', "Controls if the editor should automatically adjust the indenation when users type. Indentation Rules of the language must be available. ") + 'description': nls.localize('autoIndent', "Controls if the editor should automatically adjust the indenation when users type, paste or move lines. Indentation Rules of the language must be available. ") }, 'editor.suggestOnTriggerCharacters': { 'type': 'boolean', diff --git a/src/vs/editor/contrib/indentation/common/indentUtils.ts b/src/vs/editor/contrib/indentation/common/indentUtils.ts new file mode 100644 index 0000000000000..45ee5c3656666 --- /dev/null +++ b/src/vs/editor/contrib/indentation/common/indentUtils.ts @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +export function getSpaceCnt(str, tabSize) { + let spacesCnt = 0; + + for (let i = 0; i < str.length; i++) { + if (str.charAt(i) === '\t') { + spacesCnt += tabSize; + } else { + spacesCnt++; + } + } + + return spacesCnt; +} + +export function generateIndent(spacesCnt: number, tabSize, insertSpaces) { + spacesCnt = spacesCnt < 0 ? 0 : spacesCnt; + + let result = ''; + if (!insertSpaces) { + let tabsCnt = Math.floor(spacesCnt / tabSize); + spacesCnt = spacesCnt % tabSize; + for (let i = 0; i < tabsCnt; i++) { + result += '\t'; + } + } + + for (let i = 0; i < spacesCnt; i++) { + result += ' '; + } + + return result; +} \ No newline at end of file diff --git a/src/vs/editor/contrib/indentation/common/indentation.ts b/src/vs/editor/contrib/indentation/common/indentation.ts index b44866fc5827a..9ad1fd44c5c4a 100644 --- a/src/vs/editor/contrib/indentation/common/indentation.ts +++ b/src/vs/editor/contrib/indentation/common/indentation.ts @@ -19,6 +19,7 @@ import { TextModel } from 'vs/editor/common/model/textModel'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { ShiftCommand } from 'vs/editor/common/commands/shiftCommand'; import { TextEdit } from 'vs/editor/common/modes'; +import * as IndentUtil from './indentUtils'; export function shiftIndent(tabSize: number, indentation: string, count?: number): string { count = count || 1; @@ -402,7 +403,7 @@ export class AutoIndentOnPaste implements IEditorContribution { this.callOnModel = dispose(this.callOnModel); // we are disabled - if (!this.editor.getConfiguration().autoIndent) { + if (!this.editor.getConfiguration().autoIndent || this.editor.getConfiguration().contribInfo.formatOnPaste) { return; } @@ -451,11 +452,11 @@ export class AutoIndentOnPaste implements IEditorContribution { if (indentOfFirstLine !== null) { let firstLineText = model.getLineContent(range.startLineNumber); let oldIndentation = strings.getLeadingWhitespace(firstLineText); - let newSpaceCnt = this.getSpaceCnt(indentOfFirstLine, tabSize); - let oldSpaceCnt = this.getSpaceCnt(oldIndentation, tabSize); + let newSpaceCnt = IndentUtil.getSpaceCnt(indentOfFirstLine, tabSize); + let oldSpaceCnt = IndentUtil.getSpaceCnt(oldIndentation, tabSize); if (newSpaceCnt !== oldSpaceCnt) { - let newIndent = this.generateIndent(newSpaceCnt, tabSize, insertSpaces); + let newIndent = IndentUtil.generateIndent(newSpaceCnt, tabSize, insertSpaces); textEdits.push({ range: new Range(range.startLineNumber, 1, range.startLineNumber, oldIndentation.length + 1), text: newIndent @@ -483,17 +484,17 @@ export class AutoIndentOnPaste implements IEditorContribution { } }; let indentOfSecondLine = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdentifier().id, range.startLineNumber + 1, indentConverter); - let newSpaceCntOfSecondLine = this.getSpaceCnt(indentOfSecondLine, tabSize); - let oldSpaceCntOfSecondLine = this.getSpaceCnt(strings.getLeadingWhitespace(model.getLineContent(range.startLineNumber + 1)), tabSize); + let newSpaceCntOfSecondLine = IndentUtil.getSpaceCnt(indentOfSecondLine, tabSize); + let oldSpaceCntOfSecondLine = IndentUtil.getSpaceCnt(strings.getLeadingWhitespace(model.getLineContent(range.startLineNumber + 1)), tabSize); if (newSpaceCntOfSecondLine !== oldSpaceCntOfSecondLine) { let spaceCntOffset = newSpaceCntOfSecondLine - oldSpaceCntOfSecondLine; for (let i = range.startLineNumber + 1; i <= range.endLineNumber; i++) { let lineContent = model.getLineContent(i); let originalIndent = strings.getLeadingWhitespace(lineContent); - let originalSpacesCnt = this.getSpaceCnt(originalIndent, tabSize); + let originalSpacesCnt = IndentUtil.getSpaceCnt(originalIndent, tabSize); let newSpacesCnt = originalSpacesCnt + spaceCntOffset; - let newIndent = this.generateIndent(newSpacesCnt, tabSize, insertSpaces); + let newIndent = IndentUtil.generateIndent(newSpacesCnt, tabSize, insertSpaces); if (newIndent !== originalIndent) { textEdits.push({ @@ -519,39 +520,6 @@ export class AutoIndentOnPaste implements IEditorContribution { this.callOnDispose = dispose(this.callOnDispose); this.callOnModel = dispose(this.callOnModel); } - - private getSpaceCnt(str, tabSize) { - let spacesCnt = 0; - - for (let i = 0; i < str.length; i++) { - if (str.charAt(i) === '\t') { - spacesCnt += tabSize; - } else { - spacesCnt++; - } - } - - return spacesCnt; - } - - private generateIndent(spacesCnt: number, tabSize, insertSpaces) { - spacesCnt = spacesCnt < 0 ? 0 : spacesCnt; - - let result = ''; - if (!insertSpaces) { - let tabsCnt = Math.floor(spacesCnt / tabSize); - spacesCnt = spacesCnt % tabSize; - for (let i = 0; i < tabsCnt; i++) { - result += '\t'; - } - } - - for (let i = 0; i < spacesCnt; i++) { - result += ' '; - } - - return result; - } } function getIndentationEditOperations(model: ITokenizedModel, builder: IEditOperationBuilder, tabSize: number, tabsToSpaces: boolean): void { diff --git a/src/vs/editor/contrib/linesOperations/common/moveLinesCommand.ts b/src/vs/editor/contrib/linesOperations/common/moveLinesCommand.ts index bf628c40a7dfe..de5613d5a5d78 100644 --- a/src/vs/editor/contrib/linesOperations/common/moveLinesCommand.ts +++ b/src/vs/editor/contrib/linesOperations/common/moveLinesCommand.ts @@ -10,6 +10,7 @@ import { Selection } from 'vs/editor/common/core/selection'; import { ICommand, ICursorStateComputerData, IEditOperationBuilder, ITokenizedModel } from 'vs/editor/common/editorCommon'; import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; import { ShiftCommand } from 'vs/editor/common/commands/shiftCommand'; +import * as IndentUtil from 'vs/editor/contrib/indentation/common/indentUtils'; export class MoveLinesCommand implements ICommand { @@ -113,7 +114,7 @@ export class MoveLinesCommand implements ICommand { let insertingText = movingLineText; // Insert line that needs to be moved before - if (this._autoIndent) { + if (this.isAutoIndent(model, s)) { virtualModel.getLineContent = (lineNumber) => { if (lineNumber === s.startLineNumber) { return model.getLineContent(movingLineNumber); @@ -121,14 +122,14 @@ export class MoveLinesCommand implements ICommand { return model.getLineContent(lineNumber); } }; - let newIndentation = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdAtPosition( + let indentOfMovingLine = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdAtPosition( movingLineNumber, 1), s.startLineNumber, indentConverter); - if (newIndentation !== null) { + if (indentOfMovingLine !== null) { let oldIndentation = strings.getLeadingWhitespace(model.getLineContent(movingLineNumber)); - let newSpaceCnt = this.getSpaceCnt(newIndentation, tabSize); - let oldSpaceCnt = this.getSpaceCnt(oldIndentation, tabSize); + let newSpaceCnt = IndentUtil.getSpaceCnt(indentOfMovingLine, tabSize); + let oldSpaceCnt = IndentUtil.getSpaceCnt(oldIndentation, tabSize); if (newSpaceCnt !== oldSpaceCnt) { - let newIndentation = this.generateIndent(newSpaceCnt, tabSize, insertSpaces); + let newIndentation = IndentUtil.generateIndent(newSpaceCnt, tabSize, insertSpaces); insertingText = newIndentation + strings.ltrim(strings.ltrim(movingLineText), '\t'); } } @@ -147,27 +148,17 @@ export class MoveLinesCommand implements ICommand { } }; - let newIndentationForMovingBlock = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdAtPosition( + let newIndentatOfMovingBlock = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdAtPosition( movingLineNumber, 1), s.startLineNumber + 1, indentConverter); - if (newIndentationForMovingBlock !== null) { - let oldIndentation = strings.getLeadingWhitespace(model.getLineContent(s.startLineNumber)); - let newSpaceCnt = this.getSpaceCnt(newIndentationForMovingBlock, tabSize); - let oldSpaceCnt = this.getSpaceCnt(oldIndentation, tabSize); + if (newIndentatOfMovingBlock !== null) { + const oldIndentation = strings.getLeadingWhitespace(model.getLineContent(s.startLineNumber)); + const newSpaceCnt = IndentUtil.getSpaceCnt(newIndentatOfMovingBlock, tabSize); + const oldSpaceCnt = IndentUtil.getSpaceCnt(oldIndentation, tabSize); if (newSpaceCnt !== oldSpaceCnt) { - let spaceCntOffset = newSpaceCnt - oldSpaceCnt; + const spaceCntOffset = newSpaceCnt - oldSpaceCnt; - for (let i = s.startLineNumber; i <= s.endLineNumber; i++) { - let lineContent = model.getLineContent(i); - let originalIndent = strings.getLeadingWhitespace(lineContent); - let originalSpacesCnt = this.getSpaceCnt(originalIndent, tabSize); - let newSpacesCnt = originalSpacesCnt + spaceCntOffset; - let newIndent = this.generateIndent(newSpacesCnt, tabSize, insertSpaces); - - if (newIndent !== originalIndent) { - builder.addEditOperation(new Range(i, 1, i, originalIndent.length + 1), newIndent); - } - } + this.getIndentEditsOfMovingBlock(model, builder, s.startLineNumber, s.endLineNumber, tabSize, insertSpaces, spaceCntOffset); } } } else { @@ -183,7 +174,7 @@ export class MoveLinesCommand implements ICommand { // Insert line that needs to be moved after builder.addEditOperation(new Range(s.endLineNumber, model.getLineMaxColumn(s.endLineNumber), s.endLineNumber, model.getLineMaxColumn(s.endLineNumber)), '\n' + movingLineText); - if (this._autoIndent && (model.getLanguageIdAtPosition(s.startLineNumber, 1) === model.getLanguageIdAtPosition(s.endLineNumber, 1))) { + if (this.isAutoIndent(model, s)) { virtualModel.getLineContent = (lineNumber: number) => { if (lineNumber === movingLineNumber) { return model.getLineContent(s.startLineNumber); @@ -192,26 +183,16 @@ export class MoveLinesCommand implements ICommand { } }; - let newIndentation = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdAtPosition(s.startLineNumber, 1), movingLineNumber, indentConverter); - if (newIndentation !== null) { + let indentOfFirstLine = LanguageConfigurationRegistry.getGoodIndentForLine(virtualModel, model.getLanguageIdAtPosition(s.startLineNumber, 1), movingLineNumber, indentConverter); + if (indentOfFirstLine !== null) { // adjust the indentation of the moving block - let oldIndentation = strings.getLeadingWhitespace(model.getLineContent(s.startLineNumber)); - let newSpaceCnt = this.getSpaceCnt(newIndentation, tabSize); - let oldSpaceCnt = this.getSpaceCnt(oldIndentation, tabSize); + let oldIndent = strings.getLeadingWhitespace(model.getLineContent(s.startLineNumber)); + let newSpaceCnt = IndentUtil.getSpaceCnt(indentOfFirstLine, tabSize); + let oldSpaceCnt = IndentUtil.getSpaceCnt(oldIndent, tabSize); if (newSpaceCnt !== oldSpaceCnt) { let spaceCntOffset = newSpaceCnt - oldSpaceCnt; - for (let i = s.startLineNumber; i <= s.endLineNumber; i++) { - let lineContent = model.getLineContent(i); - let originalIndent = strings.getLeadingWhitespace(lineContent); - let originalSpacesCnt = this.getSpaceCnt(originalIndent, tabSize); - let newSpacesCnt = originalSpacesCnt + spaceCntOffset; - let newIndent = this.generateIndent(newSpacesCnt, tabSize, insertSpaces); - - if (newIndent !== originalIndent) { - builder.addEditOperation(new Range(i, 1, i, originalIndent.length + 1), newIndent); - } - } + this.getIndentEditsOfMovingBlock(model, builder, s.startLineNumber, s.endLineNumber, tabSize, insertSpaces, spaceCntOffset); } } } @@ -221,37 +202,22 @@ export class MoveLinesCommand implements ICommand { this._selectionId = builder.trackSelection(s); } - private getSpaceCnt(str, tabSize) { - let spacesCnt = 0; - - for (let i = 0; i < str.length; i++) { - if (str.charAt(i) === '\t') { - spacesCnt += tabSize; - } else { - spacesCnt++; - } - } - - return spacesCnt; + private isAutoIndent(model: ITokenizedModel, selection: Selection) { + return this._autoIndent && (model.getLanguageIdAtPosition(selection.startLineNumber, 1) === model.getLanguageIdAtPosition(selection.endLineNumber, 1)); } - private generateIndent(spacesCnt: number, tabSize, insertSpaces) { - spacesCnt = spacesCnt < 0 ? 0 : spacesCnt; + private getIndentEditsOfMovingBlock(model: ITokenizedModel, builder: IEditOperationBuilder, startLineNumber: number, endLineNumber: number, tabSize: number, insertSpaces: boolean, offset: number) { + for (let i = startLineNumber; i <= endLineNumber; i++) { + let lineContent = model.getLineContent(i); + let originalIndent = strings.getLeadingWhitespace(lineContent); + let originalSpacesCnt = IndentUtil.getSpaceCnt(originalIndent, tabSize); + let newSpacesCnt = originalSpacesCnt + offset; + let newIndent = IndentUtil.generateIndent(newSpacesCnt, tabSize, insertSpaces); - let result = ''; - if (!insertSpaces) { - let tabsCnt = Math.floor(spacesCnt / tabSize); - spacesCnt = spacesCnt % tabSize; - for (let i = 0; i < tabsCnt; i++) { - result += '\t'; + if (newIndent !== originalIndent) { + builder.addEditOperation(new Range(i, 1, i, originalIndent.length + 1), newIndent); } } - - for (let i = 0; i < spacesCnt; i++) { - result += ' '; - } - - return result; } public computeCursorState(model: ITokenizedModel, helper: ICursorStateComputerData): Selection { diff --git a/src/vs/editor/contrib/linesOperations/test/common/moveLinesCommand.test.ts b/src/vs/editor/contrib/linesOperations/test/common/moveLinesCommand.test.ts index 31b2778901a74..518dbb2d76223 100644 --- a/src/vs/editor/contrib/linesOperations/test/common/moveLinesCommand.test.ts +++ b/src/vs/editor/contrib/linesOperations/test/common/moveLinesCommand.test.ts @@ -3,10 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; - import { Selection } from 'vs/editor/common/core/selection'; import { MoveLinesCommand } from 'vs/editor/contrib/linesOperations/common/moveLinesCommand'; import { testCommand } from 'vs/editor/test/common/commands/commandTestUtils'; +import { MockMode } from 'vs/editor/test/common/mocks/mockMode'; +import { LanguageIdentifier } from 'vs/editor/common/modes'; +import { IndentationRule } from 'vs/editor/common/modes/languageConfiguration'; +import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry'; function testMoveLinesDownCommand(lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void { testCommand(lines, null, selection, (sel) => new MoveLinesCommand(sel, true, false), expectedLines, expectedSelection); @@ -16,6 +19,14 @@ function testMoveLinesUpCommand(lines: string[], selection: Selection, expectedL testCommand(lines, null, selection, (sel) => new MoveLinesCommand(sel, false, false), expectedLines, expectedSelection); } +function testMoveLinesDownWithIndentCommand(languageId: LanguageIdentifier, lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void { + testCommand(lines, languageId, selection, (sel) => new MoveLinesCommand(sel, true, true), expectedLines, expectedSelection); +} + +function testMoveLinesUpWithIndentCommand(languageId: LanguageIdentifier, lines: string[], selection: Selection, expectedLines: string[], expectedSelection: Selection): void { + testCommand(lines, languageId, selection, (sel) => new MoveLinesCommand(sel, false, true), expectedLines, expectedSelection); +} + suite('Editor Contrib - Move Lines Command', () => { test('move first up / last down disabled', function () { @@ -248,3 +259,73 @@ suite('Editor Contrib - Move Lines Command', () => { }); }); +class IndentRulesMode extends MockMode { + private static _id = new LanguageIdentifier('moveLinesIndentMode', 7); + constructor(indentationRules: IndentationRule) { + super(IndentRulesMode._id); + this._register(LanguageConfigurationRegistry.register(this.getLanguageIdentifier(), { + indentationRules: indentationRules + })); + } +} + +suite('Editor contrib - Move Lines Command honors Indentation Rules', () => { + let indentRules = { + decreaseIndentPattern: /^\s*((?!\S.*\/[*]).*[*]\/\s*)?[})\]]|^\s*(case\b.*|default):\s*(\/\/.*|\/[*].*[*]\/\s*)?$/, + increaseIndentPattern: /(\{[^}"'`]*|\([^)"']*|\[[^\]"']*|^\s*(\{\}|\(\)|\[\]|(case\b.*|default):))\s*(\/\/.*|\/[*].*[*]\/\s*)?$/, + indentNextLinePattern: /^\s*(for|while|if|else)\b(?!.*[;{}]\s*(\/\/.*|\/[*].*[*]\/\s*)?$)/, + unIndentedLinePattern: /^(?!.*([;{}]|\S:)\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!.*(\{[^}"']*|\([^)"']*|\[[^\]"']*|^\s*(\{\}|\(\)|\[\]|(case\b.*|default):))\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!^\s*((?!\S.*\/[*]).*[*]\/\s*)?[})\]]|^\s*(case\b.*|default):\s*(\/\/.*|\/[*].*[*]\/\s*)?$)(?!^\s*(for|while|if|else)\b(?!.*[;{}]\s*(\/\/.*|\/[*].*[*]\/\s*)?$))/ + }; + + // https://github.com/Microsoft/vscode/issues/28552#issuecomment-307862797 + test('first line indentation adjust to 0', () => { + let mode = new IndentRulesMode(indentRules); + + testMoveLinesUpWithIndentCommand( + mode.getLanguageIdentifier(), + [ + 'class X {', + '\tz = 2', + '}' + ], + new Selection(2, 1, 2, 1), + [ + 'z = 2', + 'class X {', + '}' + ], + new Selection(1, 1, 1, 1) + ); + + mode.dispose(); + }); + + // https://github.com/Microsoft/vscode/issues/28552#issuecomment-307867717 + test('move lines across block', () => { + let mode = new IndentRulesMode(indentRules); + + testMoveLinesDownWithIndentCommand( + mode.getLanguageIdentifier(), + [ + 'const value = 2;', + 'const standardLanguageDescriptions = [', + ' {', + ' diagnosticSource: \'js\',', + ' }', + '];' + ], + new Selection(1, 1, 1, 1), + [ + 'const standardLanguageDescriptions = [', + ' const value = 2;', + ' {', + ' diagnosticSource: \'js\',', + ' }', + '];' + ], + new Selection(2, 5, 2, 5) + ); + + mode.dispose(); + }); +}); \ No newline at end of file diff --git a/src/vs/editor/test/common/controller/cursor.test.ts b/src/vs/editor/test/common/controller/cursor.test.ts index 7c9fa3076bdcd..148e50d08ec73 100644 --- a/src/vs/editor/test/common/controller/cursor.test.ts +++ b/src/vs/editor/test/common/controller/cursor.test.ts @@ -2340,6 +2340,37 @@ suite('Editor Controller - Indentation Rules', () => { }); }); + test('Enter honors indentNextLinePattern 2', () => { + let model = Model.createFromString( + [ + 'if (true)', + '\tif (true)' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: false, + tabSize: 4, + trimAutoWhitespace: true + }, + mode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model, autoIndent: true }, (editor, cursor) => { + moveTo(cursor, 2, 11, false); + assertCursor(cursor, new Selection(2, 11, 2, 11)); + + cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); + assertCursor(cursor, new Selection(3, 3, 3, 3)); + + cursorCommand(cursor, H.Type, { text: 'console.log();' }, 'keyboard'); + cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); + assertCursor(cursor, new Selection(4, 1, 4, 1)); + }); + + model.dispose(); + }); + test('Enter adjusts indentation of current line 1', () => { usingCursor({ text: [ @@ -2380,6 +2411,26 @@ suite('Editor Controller - Indentation Rules', () => { }); }); + test('Enter honors intential indent', () => { + usingCursor({ + text: [ + 'if (true) {', + '\tif (true) {', + 'return true;', + '}}' + ], + languageIdentifier: mode.getLanguageIdentifier(), + modelOpts: { insertSpaces: false, tabSize: 4, detectIndentation: false, defaultEOL: DefaultEndOfLine.LF, trimAutoWhitespace: true } + }, (model, cursor) => { + moveTo(cursor, 3, 13, false); + assertCursor(cursor, new Selection(3, 13, 3, 13)); + + cursorCommand(cursor, H.Type, { text: '\n' }, 'keyboard'); + assertCursor(cursor, new Selection(4, 1, 4, 1)); + assert.equal(model.getLineContent(3), 'return true;', '001'); + }); + }); + test('Enter supports selection 1', () => { usingCursor({ text: [ @@ -2765,6 +2816,40 @@ suite('Editor Controller - Indentation Rules', () => { model.dispose(); }); + + test('type honors indentation rules: ruby keywords', () => { + let rubyMode = new IndentRulesMode({ + increaseIndentPattern: /^\s*((begin|class|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while)|(.*\sdo\b))\b[^\{;]*$/, + decreaseIndentPattern: /^\s*([}\]]([,)]?\s*(#|$)|\.[a-zA-Z_]\w*\b)|(end|rescue|ensure|else|elsif|when)\b)/ + }); + let model = Model.createFromString( + [ + 'class Greeter', + ' def initialize(name)', + ' @name = name', + ' en' + ].join('\n'), + { + defaultEOL: DefaultEndOfLine.LF, + detectIndentation: false, + insertSpaces: true, + tabSize: 2, + trimAutoWhitespace: true + }, + rubyMode.getLanguageIdentifier() + ); + + withMockCodeEditor(null, { model: model, autoIndent: true }, (editor, cursor) => { + moveTo(cursor, 4, 7, false); + assertCursor(cursor, new Selection(4, 7, 4, 7)); + + cursorCommand(cursor, H.Type, { text: 'd' }, 'keyboard'); + assert.equal(model.getLineContent(4), ' end'); + }); + + rubyMode.dispose(); + model.dispose(); + }); }); interface ICursorOpts { From 1564137b95a0150db69726c75f80f53a19dafa83 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 16 Jun 2017 13:13:55 -0700 Subject: [PATCH 1988/2747] Prototype TS/JS Refactoring Provider (#27166) * Prototype TS/JS Refactoring Provider Fixes #25739, from https://github.com/Microsoft/TypeScript/pull/15569 Prototype of refactoring support for ts 2.4 * Adding error reporting * Updating for new API * show quick pick for non-inlinable refactrings --- .../src/features/refactorProvider.ts | 128 ++++++++++++++++++ extensions/typescript/src/typescriptMain.ts | 5 +- .../typescript/src/typescriptService.ts | 5 + 3 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 extensions/typescript/src/features/refactorProvider.ts diff --git a/extensions/typescript/src/features/refactorProvider.ts b/extensions/typescript/src/features/refactorProvider.ts new file mode 100644 index 0000000000000..4e930e09d8065 --- /dev/null +++ b/extensions/typescript/src/features/refactorProvider.ts @@ -0,0 +1,128 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { CodeActionProvider, TextDocument, Range, CancellationToken, CodeActionContext, Command, commands, workspace, WorkspaceEdit, window, QuickPickItem } from 'vscode'; + +import * as Proto from '../protocol'; +import { ITypescriptServiceClient } from '../typescriptService'; + + +export default class TypeScriptRefactorProvider implements CodeActionProvider { + private doRefactorCommandId: string; + private selectRefactorCommandId: string; + + constructor( + private readonly client: ITypescriptServiceClient, + mode: string + ) { + this.doRefactorCommandId = `_typescript.applyRefactoring.${mode}`; + this.selectRefactorCommandId = `_typescript.selectRefactoring.${mode}`; + + commands.registerCommand(this.doRefactorCommandId, this.doRefactoring, this); + commands.registerCommand(this.selectRefactorCommandId, this.selectRefactoring, this); + + } + + public async provideCodeActions( + document: TextDocument, + range: Range, + _context: CodeActionContext, + token: CancellationToken + ): Promise { + if (!this.client.apiVersion.has240Features()) { + return []; + } + + const file = this.client.normalizePath(document.uri); + if (!file) { + return []; + } + + const args: Proto.GetApplicableRefactorsRequestArgs = { + file: file, + startLine: range.start.line + 1, + startOffset: range.start.character + 1, + endLine: range.end.line + 1, + endOffset: range.end.character + 1 + }; + + try { + const response = await this.client.execute('getApplicableRefactors', args, token); + if (!response || !response.body) { + return []; + } + + const actions: Command[] = []; + for (const info of response.body) { + if (info.inlineable === false) { + actions.push({ + title: info.description, + command: this.selectRefactorCommandId, + arguments: [file, info, range] + }); + } else { + for (const action of info.actions) { + actions.push({ + title: action.description, + command: this.doRefactorCommandId, + arguments: [file, info.name, action.name, range] + }); + } + } + } + return actions; + } catch (err) { + return []; + } + } + + private toWorkspaceEdit(edits: Proto.FileCodeEdits[]): WorkspaceEdit { + const workspaceEdit = new WorkspaceEdit(); + for (const edit of edits) { + for (const textChange of edit.textChanges) { + workspaceEdit.replace(this.client.asUrl(edit.fileName), + new Range( + textChange.start.line - 1, textChange.start.offset - 1, + textChange.end.line - 1, textChange.end.offset - 1), + textChange.newText); + } + } + return workspaceEdit; + } + + private async selectRefactoring(file: string, info: Proto.ApplicableRefactorInfo, range: Range): Promise { + return window.showQuickPick(info.actions.map((action): QuickPickItem => ({ + label: action.name, + description: action.description + }))).then(selected => { + if (!selected) { + return false; + } + return this.doRefactoring(file, info.name, selected.label, range); + }); + } + + private async doRefactoring(file: string, refactor: string, action: string, range: Range): Promise { + const args: Proto.GetEditsForRefactorRequestArgs = { + file, + refactor, + action, + startLine: range.start.line + 1, + startOffset: range.start.character + 1, + endLine: range.end.line + 1, + endOffset: range.end.character + 1 + }; + + const response = await this.client.execute('getEditsForRefactor', args); + if (!response || !response.body || !response.body.edits.length) { + return false; + } + + const edit = this.toWorkspaceEdit(response.body.edits); + return workspace.applyEdit(edit); + } +} \ No newline at end of file diff --git a/extensions/typescript/src/typescriptMain.ts b/extensions/typescript/src/typescriptMain.ts index 00db96b6663bd..5910f1765a3aa 100644 --- a/extensions/typescript/src/typescriptMain.ts +++ b/extensions/typescript/src/typescriptMain.ts @@ -38,11 +38,11 @@ import BufferSyncSupport from './features/bufferSyncSupport'; import CompletionItemProvider from './features/completionItemProvider'; import WorkspaceSymbolProvider from './features/workspaceSymbolProvider'; import CodeActionProvider from './features/codeActionProvider'; +import RefactorProvider from './features/refactorProvider'; import ReferenceCodeLensProvider from './features/referencesCodeLensProvider'; import { JsDocCompletionProvider, TryCompleteJsDocCommand } from './features/jsDocCompletionProvider'; import { DirectiveCommentCompletionProvider } from './features/directiveCommentCompletionProvider'; import TypeScriptTaskProviderManager from './features/taskProvider'; - import ImplementationCodeLensProvider from './features/implementationsCodeLensProvider'; import * as ProjectStatus from './utils/projectStatus'; @@ -167,6 +167,7 @@ export function activate(context: ExtensionContext): void { const validateSetting = 'validate.enable'; class LanguageProvider { + private syntaxDiagnostics: ObjectMap; private readonly currentDiagnostics: DiagnosticCollection; private readonly bufferSyncSupport: BufferSyncSupport; @@ -263,7 +264,7 @@ class LanguageProvider { this.disposables.push(languages.registerRenameProvider(selector, new RenameProvider(client))); this.disposables.push(languages.registerCodeActionsProvider(selector, new CodeActionProvider(client, this.description.id))); - + this.disposables.push(languages.registerCodeActionsProvider(selector, new RefactorProvider(client, this.description.id))); this.registerVersionDependentProviders(); this.description.modeIds.forEach(modeId => { diff --git a/extensions/typescript/src/typescriptService.ts b/extensions/typescript/src/typescriptService.ts index 1b545fef0ace8..05b11a24f4166 100644 --- a/extensions/typescript/src/typescriptService.ts +++ b/extensions/typescript/src/typescriptService.ts @@ -68,6 +68,9 @@ export class API { public has234Features(): boolean { return semver.gte(this._version, '2.3.4'); } + public has240Features(): boolean { + return semver.gte(this._version, '2.4.0'); + } } export interface ITypescriptServiceClient { @@ -115,6 +118,8 @@ export interface ITypescriptServiceClient { execute(command: 'getCodeFixes', args: Proto.CodeFixRequestArgs, token?: CancellationToken): Promise; execute(command: 'getSupportedCodeFixes', args: null, token?: CancellationToken): Promise; execute(command: 'docCommentTemplate', args: Proto.FileLocationRequestArgs, token?: CancellationToken): Promise; + execute(command: 'getApplicableRefactors', args: Proto.GetApplicableRefactorsRequestArgs, token?: CancellationToken): Promise; + execute(command: 'getEditsForRefactor', args: Proto.GetEditsForRefactorRequestArgs, token?: CancellationToken): Promise; // execute(command: 'compileOnSaveAffectedFileList', args: Proto.CompileOnSaveEmitFileRequestArgs, token?: CancellationToken): Promise; // execute(command: 'compileOnSaveEmitFile', args: Proto.CompileOnSaveEmitFileRequestArgs, token?: CancellationToken): Promise; execute(command: string, args: any, expectedResult: boolean | CancellationToken, token?: CancellationToken): Promise; From 062abef9eedb258936c044096d75cf75bcd73105 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 16 Jun 2017 13:28:47 -0700 Subject: [PATCH 1989/2747] Fix stable sort for zero sized array --- src/vs/base/common/arrays.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/base/common/arrays.ts b/src/vs/base/common/arrays.ts index 791dd07185089..e014f37cc158c 100644 --- a/src/vs/base/common/arrays.ts +++ b/src/vs/base/common/arrays.ts @@ -76,7 +76,7 @@ export function mergeSort(data: T[], compare: (a: T, b: T) => number): T[] { } function _divideAndMerge(data: T[], compare: (a: T, b: T) => number): void { - if (data.length === 1) { + if (data.length <= 1) { // sorted return; } From 32702189cb97575a90e188a71d7924196f90ab8c Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 16 Jun 2017 14:46:43 -0700 Subject: [PATCH 1990/2747] Add CSP to shared process --- src/vs/code/electron-browser/sharedProcess.html | 1 + src/vs/code/electron-main/sharedProcess.ts | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/vs/code/electron-browser/sharedProcess.html b/src/vs/code/electron-browser/sharedProcess.html index 1c3da8dcb917a..e4e23bf96ae95 100644 --- a/src/vs/code/electron-browser/sharedProcess.html +++ b/src/vs/code/electron-browser/sharedProcess.html @@ -4,6 +4,7 @@ + diff --git a/src/vs/code/electron-main/sharedProcess.ts b/src/vs/code/electron-main/sharedProcess.ts index eb540858c6df3..2422ab62c9a4e 100644 --- a/src/vs/code/electron-main/sharedProcess.ts +++ b/src/vs/code/electron-main/sharedProcess.ts @@ -22,7 +22,14 @@ export class SharedProcess implements ISharedProcess { @memoize private get _whenReady(): TPromise { - this.window = new BrowserWindow({ show: false }); + this.window = new BrowserWindow({ + show: false, + webPreferences: { + images: false, + webaudio: false, + webgl: false + } + }); const config = assign({ appRoot: this.environmentService.appRoot, nodeCachedDataDir: this.environmentService.nodeCachedDataDir, From c017db2eec80ab5c6d0b0b648444345cd749a920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20H=C3=BCbelbauer?= Date: Fri, 16 Jun 2017 23:51:57 +0200 Subject: [PATCH 1991/2747] Add spaces, use MarkDown, recommend Help > Report Issues (#28696) --- issue_template.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/issue_template.md b/issue_template.md index 81a8470fc44a7..7747f9d337142 100644 --- a/issue_template.md +++ b/issue_template.md @@ -1,9 +1,10 @@ - +Do you have a question? Please ask it on [Stack Overflow with `vscode` tag](http://stackoverflow.com/questions/tagged/vscode) -- VSCode Version: -- OS Version: +(Use Help > Report Issues to prefill these) +- VSCode Version: +- OS Version: Steps to Reproduce: -1. -2. +1. +2. From c364d3a61736234361066f5859cd3c02fc114ed5 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 16 Jun 2017 15:06:04 -0700 Subject: [PATCH 1992/2747] Fixing csp for installing extensions --- src/vs/code/electron-browser/sharedProcess.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/code/electron-browser/sharedProcess.html b/src/vs/code/electron-browser/sharedProcess.html index e4e23bf96ae95..be70dede202b9 100644 --- a/src/vs/code/electron-browser/sharedProcess.html +++ b/src/vs/code/electron-browser/sharedProcess.html @@ -4,7 +4,7 @@ - + From 3c4afb72d85ca93563414e4fd0cf76ff819a51df Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 16 Jun 2017 15:18:31 -0700 Subject: [PATCH 1993/2747] Rework ext install flow a bit --- .../node/extensionsWorkbenchService.ts | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts index 26ce06d363423..c89324762dab3 100644 --- a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts +++ b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts @@ -811,14 +811,25 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService { } const extension = result.firstPage[0]; - const promises = [this.open(extension)]; - - if (this.local.every(local => local.id !== extension.id)) { - promises.push(this.install(extension)); - } - - TPromise.join(promises) - .done(null, error => this.onError(error)); + this.open(extension).then(() => { + const message = nls.localize('installConfirmation', "Would you like to install the '{0}' extension?", extension.displayName, extension.publisher); + const options = [ + nls.localize('install', "Install"), + nls.localize('cancel', "Cancel") + ]; + this.choiceService.choose(Severity.Info, message, options, 2, false) + .then(value => { + if (value === 0) { + const promises: TPromise[] = []; + if (this.local.every(local => local.id !== extension.id)) { + promises.push(this.install(extension)); + } + + TPromise.join(promises) + .done(null, error => this.onError(error)); + } + }); + }); }); } From 5e0df0cf8ff7c0477ac613e01cc247e21ffd7810 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Fri, 16 Jun 2017 15:28:42 -0700 Subject: [PATCH 1994/2747] Cleanup --- .../node/extensionsWorkbenchService.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts index c89324762dab3..c7a025ac73acd 100644 --- a/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts +++ b/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.ts @@ -805,32 +805,32 @@ export class ExtensionsWorkbenchService implements IExtensionsWorkbenchService { const extensionId = match[1]; this.queryGallery({ names: [extensionId] }) - .done(result => { + .then(result => { if (result.total < 1) { - return; + return TPromise.as(null); } const extension = result.firstPage[0]; - this.open(extension).then(() => { + return this.open(extension).then(() => { const message = nls.localize('installConfirmation', "Would you like to install the '{0}' extension?", extension.displayName, extension.publisher); const options = [ nls.localize('install', "Install"), nls.localize('cancel', "Cancel") ]; - this.choiceService.choose(Severity.Info, message, options, 2, false) + return this.choiceService.choose(Severity.Info, message, options, 2, false) .then(value => { if (value === 0) { const promises: TPromise[] = []; if (this.local.every(local => local.id !== extension.id)) { promises.push(this.install(extension)); } - - TPromise.join(promises) - .done(null, error => this.onError(error)); + return TPromise.join(promises); } + return TPromise.as(null); }); }); - }); + }) + .done(undefined, error => this.onError(error)); } dispose(): void { From b5d511e85d15bd3cf87ea19be6abd0cd329ccf78 Mon Sep 17 00:00:00 2001 From: Anjali Fernandes Date: Fri, 16 Jun 2017 16:37:30 -0700 Subject: [PATCH 1995/2747] Update vs_code_welcome_page.ts --- .../welcome/page/electron-browser/vs_code_welcome_page.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts index bf03a6df344d8..f554ff11596d5 100644 --- a/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts +++ b/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.ts @@ -66,7 +66,7 @@ export default () => `

      ${escape(localize('welcomePage.learn', "Learn"))}

        -
      • +
      @@ -82,4 +82,4 @@ export default () => `
      -`; \ No newline at end of file +`; From e72fcb6089e7e9801b666cf2733a387227a56982 Mon Sep 17 00:00:00 2001 From: Daniel Ye Date: Fri, 16 Jun 2017 18:42:44 -0700 Subject: [PATCH 1996/2747] 2017-06-16. Merged in translations from Transifex. --- build/win32/i18n/messages.hu.isl | 8 + build/win32/i18n/messages.tr.isl | 8 + i18n/chs/extensions/git/package.i18n.json | 2 +- .../out/codelensProvider.i18n.json | 7 +- .../out/commandHandler.i18n.json | 2 + .../merge-conflict/package.i18n.json | 8 + .../out/features/bufferSyncSupport.i18n.json | 2 +- .../out/utils/projectStatus.i18n.json | 1 - .../out/utils/typingsStatus.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 4 +- .../src/vs/base/common/errorMessage.i18n.json | 1 - .../vs/base/common/keybindingLabels.i18n.json | 6 + .../src/vs/code/electron-main/menus.i18n.json | 18 +- .../vs/code/electron-main/windows.i18n.json | 6 +- .../config/commonEditorConfig.i18n.json | 9 +- .../common/config/editorOptions.i18n.json | 1 + .../find/common/findController.i18n.json | 1 - .../format/browser/formatActions.i18n.json | 6 +- .../browser/referencesModel.i18n.json | 4 +- .../menusExtensionPoint.i18n.json | 2 + .../common/extensionsRegistry.i18n.json | 6 + .../node/extensionValidator.i18n.json | 16 +- .../historyMainService.i18n.json | 11 ++ .../markers/common/problemMatcher.i18n.json | 2 +- .../theme/common/colorRegistry.i18n.json | 11 +- .../workbench/api/node/extHostTask.i18n.json | 4 +- .../activitybar/activitybarPart.i18n.json | 3 +- .../parts/editor/editorActions.i18n.json | 1 + .../parts/editor/editorStatus.i18n.json | 1 + .../parts/editor/titleControl.i18n.json | 1 + .../parts/quickopen/quickopen.i18n.json | 12 ++ .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../vs/workbench/browser/viewlet.i18n.json | 3 +- .../src/vs/workbench/common/theme.i18n.json | 11 +- .../electron-browser/actions.i18n.json | 18 +- .../main.contribution.i18n.json | 14 +- .../electron-browser/accessibility.i18n.json | 26 +++ .../inspectTMScopes.i18n.json | 6 + .../toggleMultiCursorModifier.i18n.json | 8 + .../electron-browser/debugViews.i18n.json | 4 - .../actions/editPoints.i18n.json | 4 +- .../emmet.contribution.i18n.json | 3 +- .../browser/extensionEditor.i18n.json | 4 + .../browser/files.contribution.i18n.json | 1 - .../files/browser/views/emptyView.i18n.json | 2 - .../browser/views/openEditorsView.i18n.json | 2 +- .../browser/keybindingWidgets.i18n.json | 2 +- .../keybindingsEditorContribution.i18n.json | 4 +- .../relauncher.contribution.i18n.json | 10 + .../snippets.contribution.i18n.json | 2 +- .../languageSurveys.contribution.i18n.json | 11 ++ .../nps.contribution.i18n.json | 11 ++ .../tasks/browser/buildQuickOpen.i18n.json | 8 + .../parts/tasks/browser/quickOpen.i18n.json | 3 +- .../tasks/browser/testQuickOpen.i18n.json | 9 + .../tasks/common/taskConfiguration.i18n.json | 1 + .../jsonSchemaCommon.i18n.json | 1 + .../electron-browser/jsonSchema_v1.i18n.json | 2 + .../electron-browser/jsonSchema_v2.i18n.json | 4 + .../task.contribution.i18n.json | 7 +- .../terminalTaskSystem.i18n.json | 1 + .../terminalActions.i18n.json | 7 +- .../terminalFindWidget.i18n.json | 12 ++ .../terminalInstance.i18n.json | 1 - .../update/electron-browser/update.i18n.json | 15 +- .../parts/views/browser/views.i18n.json | 8 + .../browser/viewsExtensionPoint.i18n.json | 15 ++ .../vs_code_welcome_page.i18n.json | 1 - .../welcomePage.contribution.i18n.json | 2 - .../electron-browser/welcomePage.i18n.json | 17 +- .../common/crashReporterService.i18n.json | 9 + .../keybindingService.i18n.json | 2 +- .../browser/progressService2.i18n.json | 9 + .../cht/extensions/git/out/commands.i18n.json | 3 + .../extensions/git/out/scmProvider.i18n.json | 2 +- i18n/cht/extensions/git/package.i18n.json | 3 +- i18n/cht/extensions/jake/out/main.i18n.json | 4 +- i18n/cht/extensions/jake/package.i18n.json | 4 +- .../markdown/out/extension.i18n.json | 4 +- .../out/codelensProvider.i18n.json | 7 +- .../out/commandHandler.i18n.json | 1 + .../merge-conflict/package.i18n.json | 8 + .../out/features/bufferSyncSupport.i18n.json | 1 - ...rectiveCommentCompletionProvider.i18n.json | 6 +- .../out/utils/projectStatus.i18n.json | 1 - .../out/utils/typingsStatus.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 6 +- .../src/vs/base/common/errorMessage.i18n.json | 1 - .../base/common/jsonErrorMessages.i18n.json | 12 +- .../vs/base/common/keybindingLabels.i18n.json | 6 + .../src/vs/code/electron-main/menus.i18n.json | 11 +- .../vs/code/electron-main/windows.i18n.json | 6 +- .../config/commonEditorConfig.i18n.json | 12 +- .../common/config/editorOptions.i18n.json | 1 + .../find/common/findController.i18n.json | 1 - .../contrib/links/browser/links.i18n.json | 1 + .../browser/referencesModel.i18n.json | 2 - .../suggest/browser/suggestWidget.i18n.json | 1 + ...guageConfigurationExtensionPoint.i18n.json | 1 + .../menusExtensionPoint.i18n.json | 2 + .../common/extensionsRegistry.i18n.json | 6 + .../historyMainService.i18n.json | 11 ++ .../markers/common/problemMatcher.i18n.json | 7 + .../theme/common/colorRegistry.i18n.json | 18 +- .../workbench/api/node/extHostTask.i18n.json | 4 +- .../api/node/extHostTreeViews.i18n.json | 2 + .../activitybar/activitybarPart.i18n.json | 3 +- .../parts/editor/editorStatus.i18n.json | 2 +- .../parts/quickopen/quickopen.i18n.json | 12 ++ .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../vs/workbench/browser/viewlet.i18n.json | 3 +- .../src/vs/workbench/common/theme.i18n.json | 14 ++ .../electron-browser/actions.i18n.json | 9 +- .../main.contribution.i18n.json | 10 +- .../electron-browser/accessibility.i18n.json | 26 +++ .../inspectTMScopes.i18n.json | 6 + .../toggleMultiCursorModifier.i18n.json | 8 + .../debug/browser/debugActions.i18n.json | 1 + .../electron-browser/debugCommands.i18n.json | 4 +- .../electron-browser/debugViews.i18n.json | 4 - .../electronDebugActions.i18n.json | 1 + .../statusbarColorProvider.i18n.json | 3 +- .../parts/debug/node/debugAdapter.i18n.json | 1 + .../actions/editPoints.i18n.json | 4 +- .../emmet.contribution.i18n.json | 3 +- .../browser/extensionEditor.i18n.json | 4 + .../browser/extensionsActions.i18n.json | 9 +- .../extensionTipsService.i18n.json | 2 + .../extensions.contribution.i18n.json | 3 +- .../extensionsUtils.i18n.json | 2 + .../browser/files.contribution.i18n.json | 2 + .../files/browser/views/emptyView.i18n.json | 2 - .../browser/views/openEditorsView.i18n.json | 2 +- .../performance.contribution.i18n.json | 4 +- .../keybindingsEditorContribution.i18n.json | 4 +- .../browser/preferencesRenderers.i18n.json | 1 + .../browser/commandsHandler.i18n.json | 1 + .../relauncher.contribution.i18n.json | 10 + .../dirtydiffDecorator.i18n.json | 6 +- .../browser/searchResultsView.i18n.json | 4 +- .../electron-browser/TMSnippets.i18n.json | 3 +- .../snippets.contribution.i18n.json | 2 +- .../languageSurveys.contribution.i18n.json | 11 ++ .../nps.contribution.i18n.json | 11 ++ .../tasks/browser/buildQuickOpen.i18n.json | 8 + .../parts/tasks/browser/quickOpen.i18n.json | 3 +- .../tasks/browser/testQuickOpen.i18n.json | 8 + .../tasks/common/taskConfiguration.i18n.json | 1 + .../jsonSchemaCommon.i18n.json | 1 + .../electron-browser/jsonSchema_v1.i18n.json | 2 + .../electron-browser/jsonSchema_v2.i18n.json | 4 + .../task.contribution.i18n.json | 3 +- .../terminalTaskSystem.i18n.json | 4 +- .../tasks/node/processTaskSystem.i18n.json | 3 +- .../terminalActions.i18n.json | 6 +- .../terminalColorRegistry.i18n.json | 2 + .../terminalFindWidget.i18n.json | 12 ++ .../terminalInstance.i18n.json | 1 - .../update/electron-browser/update.i18n.json | 15 +- .../parts/views/browser/views.i18n.json | 8 + .../browser/viewsExtensionPoint.i18n.json | 15 ++ .../vs_code_welcome_page.i18n.json | 3 +- .../welcomePage.contribution.i18n.json | 2 - .../electron-browser/welcomePage.i18n.json | 17 +- .../configurationEditingService.i18n.json | 1 + .../common/crashReporterService.i18n.json | 9 + .../browser/progressService2.i18n.json | 9 + i18n/deu/extensions/git/package.i18n.json | 5 +- .../out/codelensProvider.i18n.json | 7 +- .../out/commandHandler.i18n.json | 3 + .../out/mergeDecorator.i18n.json | 5 +- .../merge-conflict/package.i18n.json | 12 +- .../out/features/bufferSyncSupport.i18n.json | 1 - ...rectiveCommentCompletionProvider.i18n.json | 6 +- .../out/utils/projectStatus.i18n.json | 1 - .../out/utils/typingsStatus.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 9 +- .../src/vs/base/common/errorMessage.i18n.json | 1 - .../vs/base/common/keybindingLabels.i18n.json | 6 + .../src/vs/code/electron-main/menus.i18n.json | 11 +- .../vs/code/electron-main/windows.i18n.json | 6 +- .../config/commonEditorConfig.i18n.json | 12 +- .../common/config/editorOptions.i18n.json | 1 + .../common/view/editorColorRegistry.i18n.json | 10 +- .../find/common/findController.i18n.json | 1 - .../browser/referencesModel.i18n.json | 2 - .../browser/referencesWidget.i18n.json | 3 + ...guageConfigurationExtensionPoint.i18n.json | 6 +- .../menusExtensionPoint.i18n.json | 2 + .../common/extensionsRegistry.i18n.json | 6 + .../historyMainService.i18n.json | 11 ++ .../markers/common/problemMatcher.i18n.json | 7 + .../theme/common/colorRegistry.i18n.json | 13 +- .../workbench/api/node/extHostTask.i18n.json | 4 +- .../api/node/extHostTreeViews.i18n.json | 1 + .../browser/actions/configureLocale.i18n.json | 1 + .../activitybar/activitybarPart.i18n.json | 3 +- .../parts/editor/editorStatus.i18n.json | 2 +- .../parts/quickopen/quickopen.i18n.json | 12 ++ .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../vs/workbench/browser/viewlet.i18n.json | 3 +- .../src/vs/workbench/common/theme.i18n.json | 15 ++ .../electron-browser/actions.i18n.json | 9 +- .../main.contribution.i18n.json | 10 +- .../electron-browser/accessibility.i18n.json | 26 +++ .../inspectTMScopes.i18n.json | 6 + .../toggleMultiCursorModifier.i18n.json | 8 + .../debug/browser/debugActions.i18n.json | 1 + .../electron-browser/debugCommands.i18n.json | 4 +- .../electron-browser/debugViews.i18n.json | 4 - .../statusbarColorProvider.i18n.json | 3 +- .../parts/debug/node/debugAdapter.i18n.json | 1 + .../actions/editPoints.i18n.json | 4 +- .../emmet.contribution.i18n.json | 3 +- .../browser/extensionEditor.i18n.json | 4 + .../browser/extensionsActions.i18n.json | 9 +- .../extensionsUtils.i18n.json | 2 + .../browser/files.contribution.i18n.json | 2 + .../files/browser/views/emptyView.i18n.json | 2 - .../browser/views/openEditorsView.i18n.json | 2 +- .../performance.contribution.i18n.json | 3 +- .../keybindingsEditorContribution.i18n.json | 4 +- .../browser/preferencesRenderers.i18n.json | 1 + .../relauncher.contribution.i18n.json | 10 + .../dirtydiffDecorator.i18n.json | 6 +- .../scm.contribution.i18n.json | 1 + .../scm/electron-browser/scmMenus.i18n.json | 1 + .../browser/searchResultsView.i18n.json | 4 +- .../electron-browser/TMSnippets.i18n.json | 3 +- .../snippets.contribution.i18n.json | 2 +- .../languageSurveys.contribution.i18n.json | 11 ++ .../nps.contribution.i18n.json | 11 ++ .../tasks/browser/buildQuickOpen.i18n.json | 8 + .../parts/tasks/browser/quickOpen.i18n.json | 3 +- .../tasks/browser/testQuickOpen.i18n.json | 8 + .../tasks/common/taskConfiguration.i18n.json | 1 + .../jsonSchemaCommon.i18n.json | 1 + .../electron-browser/jsonSchema_v1.i18n.json | 2 + .../electron-browser/jsonSchema_v2.i18n.json | 4 + .../task.contribution.i18n.json | 4 +- .../terminalTaskSystem.i18n.json | 4 +- .../tasks/node/processTaskSystem.i18n.json | 3 +- .../terminalActions.i18n.json | 6 +- .../terminalColorRegistry.i18n.json | 2 + .../terminalFindWidget.i18n.json | 12 ++ .../terminalInstance.i18n.json | 1 - .../themes.contribution.i18n.json | 1 + .../update/electron-browser/update.i18n.json | 15 +- .../parts/views/browser/views.i18n.json | 8 + .../browser/viewsExtensionPoint.i18n.json | 15 ++ .../vs_code_welcome_page.i18n.json | 5 +- .../welcomePage.contribution.i18n.json | 2 - .../electron-browser/welcomePage.i18n.json | 16 +- .../walkThroughPart.i18n.json | 3 +- .../configurationEditingService.i18n.json | 8 +- .../common/crashReporterService.i18n.json | 9 + .../browser/progressService2.i18n.json | 9 + i18n/esn/extensions/git/package.i18n.json | 2 +- .../out/codelensProvider.i18n.json | 7 +- .../out/commandHandler.i18n.json | 2 + .../merge-conflict/package.i18n.json | 8 + .../out/features/bufferSyncSupport.i18n.json | 1 - .../out/utils/projectStatus.i18n.json | 1 - .../out/utils/typingsStatus.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 6 +- .../resourceviewer/resourceViewer.i18n.json | 1 + .../src/vs/base/common/errorMessage.i18n.json | 1 - .../vs/base/common/keybindingLabels.i18n.json | 6 + .../src/vs/code/electron-main/menus.i18n.json | 7 +- .../vs/code/electron-main/windows.i18n.json | 6 +- .../config/commonEditorConfig.i18n.json | 11 +- .../common/config/editorOptions.i18n.json | 1 + .../common/view/editorColorRegistry.i18n.json | 6 +- .../find/common/findController.i18n.json | 1 - .../contrib/links/browser/links.i18n.json | 1 + .../browser/referencesModel.i18n.json | 2 - .../menusExtensionPoint.i18n.json | 6 +- .../common/extensionsRegistry.i18n.json | 6 + .../historyMainService.i18n.json | 11 ++ .../theme/common/colorRegistry.i18n.json | 11 +- .../workbench/api/node/extHostTask.i18n.json | 4 +- .../activitybar/activitybarPart.i18n.json | 3 +- .../parts/editor/editorStatus.i18n.json | 2 +- .../parts/quickopen/quickopen.i18n.json | 12 ++ .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../vs/workbench/browser/viewlet.i18n.json | 3 +- .../src/vs/workbench/common/theme.i18n.json | 11 ++ .../electron-browser/actions.i18n.json | 9 +- .../main.contribution.i18n.json | 8 +- .../electron-browser/accessibility.i18n.json | 26 +++ .../inspectTMScopes.i18n.json | 6 + .../toggleMultiCursorModifier.i18n.json | 8 + .../electron-browser/debugViews.i18n.json | 4 - .../actions/editPoints.i18n.json | 4 +- .../emmet.contribution.i18n.json | 3 +- .../browser/extensionEditor.i18n.json | 4 + .../browser/extensionsActions.i18n.json | 9 +- .../extensionsUtils.i18n.json | 2 + .../browser/files.contribution.i18n.json | 1 - .../files/browser/views/emptyView.i18n.json | 2 - .../browser/views/openEditorsView.i18n.json | 2 +- .../keybindingsEditorContribution.i18n.json | 4 +- .../relauncher.contribution.i18n.json | 10 + .../dirtydiffDecorator.i18n.json | 6 +- .../electron-browser/TMSnippets.i18n.json | 3 +- .../snippets.contribution.i18n.json | 2 +- .../languageSurveys.contribution.i18n.json | 11 ++ .../nps.contribution.i18n.json | 11 ++ .../tasks/browser/buildQuickOpen.i18n.json | 8 + .../parts/tasks/browser/quickOpen.i18n.json | 3 +- .../tasks/browser/testQuickOpen.i18n.json | 8 + .../tasks/common/taskConfiguration.i18n.json | 1 + .../jsonSchemaCommon.i18n.json | 1 + .../electron-browser/jsonSchema_v1.i18n.json | 2 + .../electron-browser/jsonSchema_v2.i18n.json | 4 + .../task.contribution.i18n.json | 3 +- .../terminalTaskSystem.i18n.json | 1 + .../terminalActions.i18n.json | 4 +- .../terminalFindWidget.i18n.json | 12 ++ .../terminalInstance.i18n.json | 1 - .../update/electron-browser/update.i18n.json | 15 +- .../parts/views/browser/views.i18n.json | 8 + .../browser/viewsExtensionPoint.i18n.json | 15 ++ .../vs_code_welcome_page.i18n.json | 1 - .../welcomePage.contribution.i18n.json | 2 - .../electron-browser/welcomePage.i18n.json | 17 +- .../common/crashReporterService.i18n.json | 9 + .../browser/progressService2.i18n.json | 9 + .../fra/extensions/git/out/commands.i18n.json | 4 + i18n/fra/extensions/git/package.i18n.json | 7 +- i18n/fra/extensions/jake/out/main.i18n.json | 4 +- i18n/fra/extensions/jake/package.i18n.json | 4 +- .../markdown/out/extension.i18n.json | 4 +- .../out/codelensProvider.i18n.json | 7 +- .../out/commandHandler.i18n.json | 8 +- .../out/mergeDecorator.i18n.json | 5 +- .../merge-conflict/package.i18n.json | 16 +- i18n/fra/extensions/npm/package.i18n.json | 4 +- .../out/features/bufferSyncSupport.i18n.json | 1 - ...rectiveCommentCompletionProvider.i18n.json | 6 +- .../out/utils/projectStatus.i18n.json | 1 - .../out/utils/typingsStatus.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 11 +- .../resourceviewer/resourceViewer.i18n.json | 1 + .../src/vs/base/common/errorMessage.i18n.json | 1 - .../vs/base/common/keybindingLabels.i18n.json | 6 + .../src/vs/code/electron-main/menus.i18n.json | 12 +- .../vs/code/electron-main/windows.i18n.json | 6 +- .../config/commonEditorConfig.i18n.json | 12 +- .../common/config/editorOptions.i18n.json | 1 + .../common/view/editorColorRegistry.i18n.json | 6 +- .../find/common/findController.i18n.json | 1 - .../contrib/links/browser/links.i18n.json | 1 + .../browser/referencesModel.i18n.json | 2 - .../browser/referencesWidget.i18n.json | 3 + .../suggest/browser/suggestWidget.i18n.json | 1 + .../menusExtensionPoint.i18n.json | 2 + .../common/extensionsRegistry.i18n.json | 6 + .../historyMainService.i18n.json | 11 ++ .../markers/common/problemMatcher.i18n.json | 7 + .../theme/common/colorRegistry.i18n.json | 17 +- .../workbench/api/node/extHostTask.i18n.json | 4 +- .../api/node/extHostTreeViews.i18n.json | 6 +- .../browser/actions/configureLocale.i18n.json | 1 + .../activitybar/activitybarPart.i18n.json | 3 +- .../parts/editor/editorStatus.i18n.json | 2 +- .../parts/quickopen/quickopen.i18n.json | 12 ++ .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../vs/workbench/browser/viewlet.i18n.json | 3 +- .../src/vs/workbench/common/theme.i18n.json | 15 ++ .../electron-browser/actions.i18n.json | 9 +- .../main.contribution.i18n.json | 10 +- .../electron-browser/accessibility.i18n.json | 26 +++ .../inspectTMScopes.i18n.json | 6 + .../toggleMultiCursorModifier.i18n.json | 8 + .../debug/browser/debugActions.i18n.json | 1 + .../electron-browser/debugCommands.i18n.json | 4 +- .../electron-browser/debugViews.i18n.json | 4 - .../electronDebugActions.i18n.json | 1 + .../statusbarColorProvider.i18n.json | 3 +- .../parts/debug/node/debugAdapter.i18n.json | 1 + .../actions/editPoints.i18n.json | 4 +- .../emmet.contribution.i18n.json | 3 +- .../browser/extensionEditor.i18n.json | 4 + .../browser/extensionsActions.i18n.json | 9 +- .../extensionTipsService.i18n.json | 2 + .../extensions.contribution.i18n.json | 3 +- .../extensionsUtils.i18n.json | 2 + .../browser/files.contribution.i18n.json | 2 + .../files/browser/views/emptyView.i18n.json | 2 - .../browser/views/openEditorsView.i18n.json | 2 +- .../performance.contribution.i18n.json | 4 +- .../keybindingsEditorContribution.i18n.json | 4 +- .../browser/preferencesRenderers.i18n.json | 1 + .../browser/commandsHandler.i18n.json | 1 + .../relauncher.contribution.i18n.json | 10 + .../dirtydiffDecorator.i18n.json | 6 +- .../scm.contribution.i18n.json | 1 + .../scm/electron-browser/scmMenus.i18n.json | 1 + .../browser/searchResultsView.i18n.json | 4 +- .../electron-browser/TMSnippets.i18n.json | 3 +- .../snippets.contribution.i18n.json | 2 +- .../languageSurveys.contribution.i18n.json | 11 ++ .../nps.contribution.i18n.json | 11 ++ .../tasks/browser/buildQuickOpen.i18n.json | 8 + .../parts/tasks/browser/quickOpen.i18n.json | 3 +- .../tasks/browser/testQuickOpen.i18n.json | 8 + .../tasks/common/taskConfiguration.i18n.json | 1 + .../jsonSchemaCommon.i18n.json | 1 + .../electron-browser/jsonSchema_v1.i18n.json | 2 + .../electron-browser/jsonSchema_v2.i18n.json | 4 + .../task.contribution.i18n.json | 4 +- .../terminalTaskSystem.i18n.json | 4 +- .../tasks/node/processTaskSystem.i18n.json | 3 +- .../terminalActions.i18n.json | 6 +- .../terminalColorRegistry.i18n.json | 2 + .../terminalFindWidget.i18n.json | 12 ++ .../terminalInstance.i18n.json | 1 - .../themes.contribution.i18n.json | 1 + .../update/electron-browser/update.i18n.json | 15 +- .../parts/views/browser/views.i18n.json | 8 + .../browser/viewsExtensionPoint.i18n.json | 15 ++ .../vs_code_welcome_page.i18n.json | 8 +- .../welcomePage.contribution.i18n.json | 2 - .../electron-browser/welcomePage.i18n.json | 20 +- .../walkThroughPart.i18n.json | 3 +- .../configurationEditingService.i18n.json | 8 +- .../common/crashReporterService.i18n.json | 9 + .../browser/progressService2.i18n.json | 9 + .../out/settingsDocumentHelper.i18n.json | 36 ++++ .../css/client/out/cssMain.i18n.json | 8 + i18n/hun/extensions/css/package.i18n.json | 67 +++++++ .../out/packageDocumentHelper.i18n.json | 9 + .../extensions/git/out/askpass-main.i18n.json | 6 + .../hun/extensions/git/out/commands.i18n.json | 17 ++ i18n/hun/extensions/git/out/main.i18n.json | 8 + i18n/hun/extensions/git/out/model.i18n.json | 11 ++ .../extensions/git/out/scmProvider.i18n.json | 8 + .../extensions/git/out/statusbar.i18n.json | 8 + i18n/hun/extensions/git/package.i18n.json | 24 +++ i18n/hun/extensions/grunt/out/main.i18n.json | 8 + i18n/hun/extensions/grunt/package.i18n.json | 8 + i18n/hun/extensions/gulp/out/main.i18n.json | 8 + i18n/hun/extensions/gulp/package.i18n.json | 8 + .../html/client/out/htmlMain.i18n.json | 8 + i18n/hun/extensions/html/package.i18n.json | 27 +++ i18n/hun/extensions/jake/out/main.i18n.json | 8 + i18n/hun/extensions/jake/package.i18n.json | 8 + .../features/bowerJSONContribution.i18n.json | 10 + .../packageJSONContribution.i18n.json | 13 ++ .../json/client/out/jsonMain.i18n.json | 8 + i18n/hun/extensions/json/package.i18n.json | 15 ++ .../markdown/out/extension.i18n.json | 8 + .../out/previewContentProvider.i18n.json | 10 + .../markdown/out/security.i18n.json | 11 ++ .../hun/extensions/markdown/package.i18n.json | 22 +++ .../out/codelensProvider.i18n.json | 11 ++ .../out/commandHandler.i18n.json | 13 ++ .../out/mergeDecorator.i18n.json | 9 + .../merge-conflict/package.i18n.json | 20 ++ i18n/hun/extensions/npm/package.i18n.json | 8 + .../out/features/validationProvider.i18n.json | 13 ++ i18n/hun/extensions/php/package.i18n.json | 14 ++ .../out/features/bufferSyncSupport.i18n.json | 12 ++ .../features/completionItemProvider.i18n.json | 9 + ...rectiveCommentCompletionProvider.i18n.json | 10 + .../implementationsCodeLensProvider.i18n.json | 10 + .../jsDocCompletionProvider.i18n.json | 8 + .../referencesCodeLensProvider.i18n.json | 10 + .../typescript/out/typescriptMain.i18n.json | 15 ++ .../out/typescriptServiceClient.i18n.json | 24 +++ .../typescript/out/utils/logger.i18n.json | 8 + .../out/utils/projectStatus.i18n.json | 11 ++ .../out/utils/typingsStatus.i18n.json | 12 ++ .../extensions/typescript/package.i18n.json | 48 +++++ .../browser/ui/actionbar/actionbar.i18n.json | 8 + .../vs/base/browser/ui/aria/aria.i18n.json | 8 + .../browser/ui/findinput/findInput.i18n.json | 8 + .../findinput/findInputCheckboxes.i18n.json | 10 + .../browser/ui/inputbox/inputBox.i18n.json | 10 + .../resourceviewer/resourceViewer.i18n.json | 16 ++ .../base/browser/ui/toolbar/toolbar.i18n.json | 8 + .../src/vs/base/common/errorMessage.i18n.json | 17 ++ .../base/common/jsonErrorMessages.i18n.json | 16 ++ .../vs/base/common/keybindingLabels.i18n.json | 6 + .../src/vs/base/common/processes.i18n.json | 11 ++ .../hun/src/vs/base/common/severity.i18n.json | 10 + i18n/hun/src/vs/base/node/processes.i18n.json | 8 + i18n/hun/src/vs/base/node/zip.i18n.json | 8 + .../browser/quickOpenModel.i18n.json | 9 + .../browser/quickOpenWidget.i18n.json | 9 + .../parts/tree/browser/treeDefaults.i18n.json | 8 + .../src/vs/code/electron-main/menus.i18n.json | 178 ++++++++++++++++++ .../vs/code/electron-main/window.i18n.json | 8 + .../vs/code/electron-main/windows.i18n.json | 17 ++ .../src/vs/code/node/cliProcessMain.i18n.json | 17 ++ .../config/commonEditorConfig.i18n.json | 88 +++++++++ .../common/config/editorOptions.i18n.json | 9 + .../editor/common/controller/cursor.i18n.json | 8 + .../model/textModelWithTokens.i18n.json | 8 + .../common/modes/modesRegistry.i18n.json | 8 + .../editor/common/services/bulkEdit.i18n.json | 11 ++ .../common/services/modeServiceImpl.i18n.json | 16 ++ .../services/modelServiceImpl.i18n.json | 9 + .../common/view/editorColorRegistry.i18n.json | 24 +++ .../common/bracketMatching.i18n.json | 8 + .../common/caretOperations.i18n.json | 9 + .../common/transpose.i18n.json | 8 + .../clipboard/browser/clipboard.i18n.json | 11 ++ .../contrib/comment/common/comment.i18n.json | 11 ++ .../contextmenu/browser/contextmenu.i18n.json | 8 + .../contrib/find/browser/findWidget.i18n.json | 21 +++ .../find/common/findController.i18n.json | 18 ++ .../contrib/folding/browser/folding.i18n.json | 14 ++ .../format/browser/formatActions.i18n.json | 13 ++ .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../gotoError/browser/gotoError.i18n.json | 13 ++ .../contrib/hover/browser/hover.i18n.json | 8 + .../hover/browser/modesContentHover.i18n.json | 8 + .../common/inPlaceReplace.i18n.json | 9 + .../indentation/common/indentation.i18n.json | 15 ++ .../common/linesOperations.i18n.json | 25 +++ .../contrib/links/browser/links.i18n.json | 13 ++ .../multicursor/common/multicursor.i18n.json | 10 + .../browser/parameterHints.i18n.json | 8 + .../browser/parameterHintsWidget.i18n.json | 8 + .../browser/quickFixCommands.i18n.json | 10 + .../browser/referenceSearch.i18n.json | 9 + .../browser/referencesController.i18n.json | 8 + .../browser/referencesModel.i18n.json | 14 ++ .../browser/referencesWidget.i18n.json | 27 +++ .../contrib/rename/browser/rename.i18n.json | 11 ++ .../rename/browser/renameInputField.i18n.json | 8 + .../smartSelect/common/smartSelect.i18n.json | 9 + .../browser/suggestController.i18n.json | 9 + .../suggest/browser/suggestWidget.i18n.json | 21 +++ .../common/toggleTabFocusMode.i18n.json | 8 + .../common/wordHighlighter.i18n.json | 9 + .../browser/peekViewWidget.i18n.json | 8 + .../textMate/TMSyntax.i18n.json | 14 ++ ...guageConfigurationExtensionPoint.i18n.json | 23 +++ .../editor/node/textMate/TMGrammars.i18n.json | 13 ++ .../browser/menuItemActionItem.i18n.json | 8 + .../menusExtensionPoint.i18n.json | 43 +++++ .../common/configurationRegistry.i18n.json | 19 ++ .../platform/environment/node/argv.i18n.json | 32 ++++ .../extensionEnablementService.i18n.json | 8 + .../common/extensionManagement.i18n.json | 9 + .../node/extensionGalleryService.i18n.json | 9 + .../node/extensionManagementService.i18n.json | 22 +++ .../common/abstractExtensionService.i18n.json | 11 ++ .../common/extensionsRegistry.i18n.json | 30 +++ .../node/extensionValidator.i18n.json | 24 +++ .../historyMainService.i18n.json | 11 ++ .../node/integrityServiceImpl.i18n.json | 11 ++ .../jsonValidationExtensionPoint.i18n.json | 15 ++ .../abstractKeybindingService.i18n.json | 9 + .../markers/common/problemMatcher.i18n.json | 61 ++++++ .../platform/message/common/message.i18n.json | 10 + .../platform/request/node/request.i18n.json | 11 ++ .../common/telemetryService.i18n.json | 9 + .../theme/common/colorRegistry.i18n.json | 88 +++++++++ .../mainThreadExtensionService.i18n.json | 9 + .../mainThreadMessageService.i18n.json | 10 + .../api/node/extHostDiagnostics.i18n.json | 8 + .../workbench/api/node/extHostTask.i18n.json | 8 + .../api/node/extHostTreeViews.i18n.json | 10 + .../browser/actions/configureLocale.i18n.json | 13 ++ .../browser/actions/fileActions.i18n.json | 9 + .../toggleActivityBarVisibility.i18n.json | 9 + .../actions/toggleEditorLayout.i18n.json | 11 ++ .../actions/toggleSidebarPosition.i18n.json | 9 + .../actions/toggleSidebarVisibility.i18n.json | 9 + .../toggleStatusbarVisibility.i18n.json | 9 + .../browser/actions/toggleZenMode.i18n.json | 9 + .../activitybar/activitybarActions.i18n.json | 14 ++ .../activitybar/activitybarPart.i18n.json | 10 + .../browser/parts/compositePart.i18n.json | 9 + .../parts/editor/binaryDiffEditor.i18n.json | 8 + .../parts/editor/binaryEditor.i18n.json | 8 + .../editor/editor.contribution.i18n.json | 16 ++ .../parts/editor/editorActions.i18n.json | 56 ++++++ .../parts/editor/editorCommands.i18n.json | 12 ++ .../browser/parts/editor/editorPart.i18n.json | 14 ++ .../parts/editor/editorPicker.i18n.json | 13 ++ .../parts/editor/editorStatus.i18n.json | 51 +++++ .../parts/editor/tabsTitleControl.i18n.json | 8 + .../parts/editor/textDiffEditor.i18n.json | 16 ++ .../browser/parts/editor/textEditor.i18n.json | 8 + .../parts/editor/textResourceEditor.i18n.json | 12 ++ .../parts/editor/titleControl.i18n.json | 15 ++ .../parts/panel/panelActions.i18n.json | 15 ++ .../browser/parts/panel/panelPart.i18n.json | 8 + .../quickopen/quickOpenController.i18n.json | 17 ++ .../parts/quickopen/quickopen.i18n.json | 12 ++ .../parts/sidebar/sidebarPart.i18n.json | 9 + .../parts/statusbar/statusbarPart.i18n.json | 9 + .../parts/titlebar/titlebarPart.i18n.json | 9 + .../vs/workbench/browser/quickopen.i18n.json | 10 + .../vs/workbench/browser/viewlet.i18n.json | 8 + .../src/vs/workbench/common/theme.i18n.json | 61 ++++++ .../electron-browser/actions.i18n.json | 43 +++++ .../electron-browser/commands.i18n.json | 8 + .../electron-browser/extensionHost.i18n.json | 11 ++ .../main.contribution.i18n.json | 69 +++++++ .../workbench/electron-browser/main.i18n.json | 9 + .../electron-browser/shell.i18n.json | 8 + .../electron-browser/window.i18n.json | 15 ++ .../electron-browser/workbench.i18n.json | 9 + .../node/extensionHostMain.i18n.json | 8 + .../workbench/node/extensionPoints.i18n.json | 11 ++ .../cli.contribution.i18n.json | 18 ++ .../electron-browser/accessibility.i18n.json | 26 +++ .../inspectKeybindings.i18n.json | 8 + .../inspectTMScopes.i18n.json | 6 + .../toggleMultiCursorModifier.i18n.json | 8 + .../toggleRenderControlCharacter.i18n.json | 8 + .../toggleRenderWhitespace.i18n.json | 8 + .../electron-browser/toggleWordWrap.i18n.json | 11 ++ .../wordWrapMigration.i18n.json | 11 ++ .../debug/browser/breakpointWidget.i18n.json | 13 ++ .../debug/browser/debugActionItems.i18n.json | 9 + .../debug/browser/debugActions.i18n.json | 49 +++++ .../browser/debugActionsWidget.i18n.json | 8 + .../browser/debugContentProvider.i18n.json | 8 + .../browser/debugEditorActions.i18n.json | 15 ++ .../browser/debugEditorModelManager.i18n.json | 11 ++ .../debug/browser/debugQuickOpen.i18n.json | 11 ++ .../debug/browser/exceptionWidget.i18n.json | 11 ++ .../debug/browser/linkDetector.i18n.json | 9 + .../parts/debug/common/debug.i18n.json | 8 + .../parts/debug/common/debugModel.i18n.json | 9 + .../parts/debug/common/debugSource.i18n.json | 8 + .../debug.contribution.i18n.json | 20 ++ .../electron-browser/debugCommands.i18n.json | 8 + .../debugConfigurationManager.i18n.json | 38 ++++ .../debugEditorContribution.i18n.json | 20 ++ .../electron-browser/debugHover.i18n.json | 8 + .../electron-browser/debugService.i18n.json | 25 +++ .../electron-browser/debugViewer.i18n.json | 28 +++ .../electron-browser/debugViews.i18n.json | 16 ++ .../electronDebugActions.i18n.json | 11 ++ .../rawDebugSession.i18n.json | 12 ++ .../debug/electron-browser/repl.i18n.json | 12 ++ .../electron-browser/replViewer.i18n.json | 12 ++ .../statusbarColorProvider.i18n.json | 9 + .../terminalSupport.i18n.json | 9 + .../parts/debug/node/debugAdapter.i18n.json | 20 ++ .../actions/showEmmetCommands.i18n.json | 8 + .../actions/balance.i18n.json | 9 + .../actions/editPoints.i18n.json | 9 + .../actions/evaluateMath.i18n.json | 8 + .../actions/expandAbbreviation.i18n.json | 8 + .../actions/incrementDecrement.i18n.json | 13 ++ .../actions/matchingPair.i18n.json | 8 + .../actions/mergeLines.i18n.json | 8 + .../actions/reflectCssValue.i18n.json | 8 + .../actions/removeTag.i18n.json | 8 + .../actions/selectItem.i18n.json | 9 + .../actions/splitJoinTag.i18n.json | 8 + .../actions/toggleComment.i18n.json | 8 + .../actions/updateImageSize.i18n.json | 8 + .../actions/updateTag.i18n.json | 10 + .../actions/wrapWithAbbreviation.i18n.json | 10 + .../emmet.contribution.i18n.json | 14 ++ .../terminal.contribution.i18n.json | 15 ++ .../terminalService.i18n.json | 12 ++ .../treeExplorer.contribution.i18n.json | 14 ++ .../browser/treeExplorerActions.i18n.json | 8 + .../browser/treeExplorerService.i18n.json | 8 + .../browser/views/treeExplorerView.i18n.json | 8 + .../browser/dependenciesViewer.i18n.json | 9 + .../browser/extensionEditor.i18n.json | 43 +++++ .../browser/extensionsActions.i18n.json | 62 ++++++ .../browser/extensionsQuickOpen.i18n.json | 10 + .../common/extensionsFileTemplate.i18n.json | 10 + .../common/extensionsInput.i18n.json | 8 + .../extensionTipsService.i18n.json | 16 ++ .../extensions.contribution.i18n.json | 15 ++ .../extensionsActions.i18n.json | 11 ++ .../extensionsUtils.i18n.json | 13 ++ .../extensionsViewlet.i18n.json | 15 ++ .../node/extensionsWorkbenchService.i18n.json | 17 ++ .../electron-browser/feedback.i18n.json | 25 +++ .../editors/binaryFileEditor.i18n.json | 8 + .../browser/editors/textFileEditor.i18n.json | 11 ++ .../fileActions.contribution.i18n.json | 11 ++ .../parts/files/browser/fileActions.i18n.json | 73 +++++++ .../files/browser/fileCommands.i18n.json | 9 + .../browser/files.contribution.i18n.json | 41 ++++ .../files/browser/saveErrorHandler.i18n.json | 16 ++ .../files/browser/views/emptyView.i18n.json | 9 + .../browser/views/explorerView.i18n.json | 9 + .../browser/views/explorerViewer.i18n.json | 12 ++ .../browser/views/openEditorsView.i18n.json | 11 ++ .../browser/views/openEditorsViewer.i18n.json | 14 ++ .../files/common/dirtyFilesTracker.i18n.json | 8 + .../common/editors/fileEditorInput.i18n.json | 8 + .../html/browser/html.contribution.i18n.json | 8 + .../html/browser/htmlPreviewPart.i18n.json | 8 + .../parts/html/browser/webview.i18n.json | 8 + .../parts/markers/common/messages.i18n.json | 39 ++++ .../markersElectronContributions.i18n.json | 8 + .../nps.contribution.i18n.json | 11 ++ .../browser/output.contribution.i18n.json | 10 + .../output/browser/outputActions.i18n.json | 11 ++ .../output/browser/outputPanel.i18n.json | 9 + .../parts/output/common/output.i18n.json | 9 + .../performance.contribution.i18n.json | 15 ++ .../browser/keybindingWidgets.i18n.json | 9 + .../browser/keybindingsEditor.i18n.json | 35 ++++ .../keybindingsEditorContribution.i18n.json | 11 ++ .../preferences.contribution.i18n.json | 10 + .../browser/preferencesActions.i18n.json | 14 ++ .../browser/preferencesEditor.i18n.json | 15 ++ .../browser/preferencesRenderers.i18n.json | 13 ++ .../browser/preferencesService.i18n.json | 13 ++ .../browser/preferencesWidgets.i18n.json | 10 + .../common/keybindingsEditorModel.i18n.json | 11 ++ .../common/preferencesModels.i18n.json | 9 + .../browser/commandsHandler.i18n.json | 19 ++ .../browser/gotoLineHandler.i18n.json | 14 ++ .../browser/gotoSymbolHandler.i18n.json | 34 ++++ .../quickopen/browser/helpHandler.i18n.json | 10 + .../browser/quickopen.contribution.i18n.json | 14 ++ .../browser/viewPickerHandler.i18n.json | 15 ++ .../relauncher.contribution.i18n.json | 10 + .../dirtydiffDecorator.i18n.json | 10 + .../scm.contribution.i18n.json | 12 ++ .../electron-browser/scmActivity.i18n.json | 8 + .../scm/electron-browser/scmMenus.i18n.json | 9 + .../scm/electron-browser/scmViewlet.i18n.json | 10 + .../browser/openAnythingHandler.i18n.json | 9 + .../search/browser/openFileHandler.i18n.json | 9 + .../browser/openSymbolHandler.i18n.json | 11 ++ .../browser/patternInputWidget.i18n.json | 12 ++ .../search/browser/replaceService.i18n.json | 8 + .../browser/search.contribution.i18n.json | 22 +++ .../search/browser/searchActions.i18n.json | 21 +++ .../browser/searchResultsView.i18n.json | 12 ++ .../search/browser/searchViewlet.i18n.json | 50 +++++ .../search/browser/searchWidget.i18n.json | 15 ++ .../electron-browser/TMSnippets.i18n.json | 14 ++ .../electron-browser/insertSnippet.i18n.json | 8 + .../snippets.contribution.i18n.json | 16 ++ .../snippetsService.i18n.json | 9 + .../electron-browser/tabCompletion.i18n.json | 8 + .../languageSurveys.contribution.i18n.json | 11 ++ .../nps.contribution.i18n.json | 11 ++ .../tasks/browser/buildQuickOpen.i18n.json | 10 + .../parts/tasks/browser/quickOpen.i18n.json | 9 + .../tasks/browser/restartQuickOpen.i18n.json | 10 + .../tasks/browser/taskQuickOpen.i18n.json | 10 + .../browser/terminateQuickOpen.i18n.json | 10 + .../tasks/browser/testQuickOpen.i18n.json | 10 + .../tasks/common/taskConfiguration.i18n.json | 17 ++ .../tasks/common/taskTemplates.i18n.json | 13 ++ .../jsonSchemaCommon.i18n.json | 39 ++++ .../electron-browser/jsonSchema_v1.i18n.json | 14 ++ .../electron-browser/jsonSchema_v2.i18n.json | 17 ++ .../task.contribution.i18n.json | 51 +++++ .../terminalTaskSystem.i18n.json | 12 ++ .../node/processRunnerDetector.i18n.json | 15 ++ .../tasks/node/processTaskSystem.i18n.json | 12 ++ .../terminal.contribution.i18n.json | 30 +++ .../terminalActions.i18n.json | 37 ++++ .../terminalColorRegistry.i18n.json | 10 + .../terminalConfigHelper.i18n.json | 10 + .../terminalFindWidget.i18n.json | 12 ++ .../terminalInstance.i18n.json | 11 ++ .../terminalLinkHandler.i18n.json | 9 + .../electron-browser/terminalPanel.i18n.json | 11 ++ .../terminalService.i18n.json | 15 ++ .../themes.contribution.i18n.json | 19 ++ ...edWorkspaceSettings.contribution.i18n.json | 11 ++ .../releaseNotesInput.i18n.json | 8 + .../update.contribution.i18n.json | 10 + .../update/electron-browser/update.i18n.json | 32 ++++ .../parts/views/browser/views.i18n.json | 8 + .../browser/viewsExtensionPoint.i18n.json | 16 ++ .../electron-browser/watermark.i18n.json | 24 +++ .../overlay/browser/welcomeOverlay.i18n.json | 17 ++ .../vs_code_welcome_page.i18n.json | 43 +++++ .../welcomePage.contribution.i18n.json | 8 + .../electron-browser/welcomePage.i18n.json | 38 ++++ .../editor/editorWalkThrough.i18n.json | 9 + .../walkThrough.contribution.i18n.json | 10 + .../walkThroughActions.i18n.json | 11 ++ .../walkThroughPart.i18n.json | 10 + .../configurationEditingService.i18n.json | 17 ++ .../common/crashReporterService.i18n.json | 9 + .../editor/browser/editorService.i18n.json | 8 + .../electron-browser/fileService.i18n.json | 11 ++ .../services/files/node/fileService.i18n.json | 14 ++ .../common/keybindingEditing.i18n.json | 11 ++ .../keybindingService.i18n.json | 26 +++ .../message/browser/messageList.i18n.json | 14 ++ .../electron-browser/messageService.i18n.json | 9 + .../common/workbenchModeService.i18n.json | 16 ++ .../browser/progressService2.i18n.json | 9 + .../common/textFileEditorModel.i18n.json | 9 + .../textfile/common/textFileService.i18n.json | 8 + .../textFileService.i18n.json | 18 ++ .../themes/common/colorThemeSchema.i18n.json | 11 ++ .../common/fileIconThemeSchema.i18n.json | 37 ++++ .../electron-browser/colorThemeData.i18n.json | 13 ++ .../workbenchThemeService.i18n.json | 32 ++++ .../extensions/git/out/statusbar.i18n.json | 2 +- i18n/ita/extensions/git/package.i18n.json | 2 +- .../out/codelensProvider.i18n.json | 7 +- .../out/commandHandler.i18n.json | 1 + .../merge-conflict/package.i18n.json | 8 + .../out/features/bufferSyncSupport.i18n.json | 1 - .../out/utils/projectStatus.i18n.json | 1 - .../out/utils/typingsStatus.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 3 +- .../src/vs/base/common/errorMessage.i18n.json | 1 - .../vs/base/common/keybindingLabels.i18n.json | 6 + .../src/vs/code/electron-main/menus.i18n.json | 12 +- .../vs/code/electron-main/windows.i18n.json | 6 +- .../config/commonEditorConfig.i18n.json | 8 +- .../common/config/editorOptions.i18n.json | 1 + .../find/common/findController.i18n.json | 1 - .../browser/referencesModel.i18n.json | 2 - .../menusExtensionPoint.i18n.json | 2 + .../common/extensionsRegistry.i18n.json | 6 + .../historyMainService.i18n.json | 11 ++ .../theme/common/colorRegistry.i18n.json | 15 +- .../workbench/api/node/extHostTask.i18n.json | 4 +- .../api/node/extHostTreeViews.i18n.json | 6 +- .../browser/actions/configureLocale.i18n.json | 1 + .../activitybar/activitybarPart.i18n.json | 3 +- .../parts/editor/editorStatus.i18n.json | 2 +- .../parts/quickopen/quickopen.i18n.json | 12 ++ .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../vs/workbench/browser/viewlet.i18n.json | 3 +- .../src/vs/workbench/common/theme.i18n.json | 15 ++ .../electron-browser/actions.i18n.json | 9 +- .../main.contribution.i18n.json | 10 +- .../electron-browser/accessibility.i18n.json | 26 +++ .../inspectTMScopes.i18n.json | 6 + .../toggleMultiCursorModifier.i18n.json | 8 + .../debug/browser/debugActions.i18n.json | 1 + .../electron-browser/debugCommands.i18n.json | 4 +- .../electron-browser/debugViews.i18n.json | 4 - .../electronDebugActions.i18n.json | 1 + .../statusbarColorProvider.i18n.json | 3 +- .../parts/debug/node/debugAdapter.i18n.json | 1 + .../actions/editPoints.i18n.json | 4 +- .../emmet.contribution.i18n.json | 3 +- .../browser/extensionEditor.i18n.json | 4 + .../browser/extensionsActions.i18n.json | 9 +- .../extensionTipsService.i18n.json | 2 + .../extensions.contribution.i18n.json | 3 +- .../extensionsUtils.i18n.json | 2 + .../browser/files.contribution.i18n.json | 2 + .../files/browser/views/emptyView.i18n.json | 2 - .../browser/views/openEditorsView.i18n.json | 2 +- .../keybindingsEditorContribution.i18n.json | 4 +- .../browser/preferencesRenderers.i18n.json | 1 + .../browser/commandsHandler.i18n.json | 1 + .../relauncher.contribution.i18n.json | 10 + .../dirtydiffDecorator.i18n.json | 6 +- .../scm/electron-browser/scmMenus.i18n.json | 1 + .../browser/searchResultsView.i18n.json | 4 +- .../electron-browser/TMSnippets.i18n.json | 3 +- .../snippets.contribution.i18n.json | 2 +- .../languageSurveys.contribution.i18n.json | 11 ++ .../nps.contribution.i18n.json | 11 ++ .../tasks/browser/buildQuickOpen.i18n.json | 8 + .../parts/tasks/browser/quickOpen.i18n.json | 3 +- .../tasks/browser/testQuickOpen.i18n.json | 8 + .../tasks/common/taskConfiguration.i18n.json | 1 + .../jsonSchemaCommon.i18n.json | 1 + .../electron-browser/jsonSchema_v1.i18n.json | 2 + .../electron-browser/jsonSchema_v2.i18n.json | 4 + .../task.contribution.i18n.json | 4 +- .../terminalTaskSystem.i18n.json | 4 +- .../tasks/node/processTaskSystem.i18n.json | 3 +- .../terminalActions.i18n.json | 6 +- .../terminalColorRegistry.i18n.json | 2 + .../terminalFindWidget.i18n.json | 12 ++ .../terminalInstance.i18n.json | 1 - .../update/electron-browser/update.i18n.json | 15 +- .../parts/views/browser/views.i18n.json | 8 + .../browser/viewsExtensionPoint.i18n.json | 15 ++ .../vs_code_welcome_page.i18n.json | 8 +- .../welcomePage.contribution.i18n.json | 2 - .../electron-browser/welcomePage.i18n.json | 20 +- .../walkThroughPart.i18n.json | 3 +- .../configurationEditingService.i18n.json | 3 +- .../common/crashReporterService.i18n.json | 9 + .../browser/progressService2.i18n.json | 9 + i18n/jpn/extensions/git/package.i18n.json | 2 +- .../out/codelensProvider.i18n.json | 7 +- .../out/commandHandler.i18n.json | 1 + .../merge-conflict/package.i18n.json | 8 + .../out/features/bufferSyncSupport.i18n.json | 1 - .../out/utils/projectStatus.i18n.json | 1 - .../out/utils/typingsStatus.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 3 +- .../resourceviewer/resourceViewer.i18n.json | 2 +- .../src/vs/base/common/errorMessage.i18n.json | 1 - .../vs/base/common/keybindingLabels.i18n.json | 6 + .../src/vs/code/electron-main/menus.i18n.json | 4 +- .../vs/code/electron-main/windows.i18n.json | 6 +- .../config/commonEditorConfig.i18n.json | 9 +- .../common/config/editorOptions.i18n.json | 1 + .../find/common/findController.i18n.json | 1 - .../format/browser/formatActions.i18n.json | 2 +- .../gotoError/browser/gotoError.i18n.json | 3 +- .../browser/referencesModel.i18n.json | 2 - .../menusExtensionPoint.i18n.json | 2 + .../platform/environment/node/argv.i18n.json | 16 +- .../common/extensionsRegistry.i18n.json | 6 + .../historyMainService.i18n.json | 11 ++ .../markers/common/problemMatcher.i18n.json | 4 +- .../theme/common/colorRegistry.i18n.json | 12 +- .../workbench/api/node/extHostTask.i18n.json | 4 +- .../activitybar/activitybarPart.i18n.json | 3 +- .../parts/editor/editorStatus.i18n.json | 3 +- .../parts/quickopen/quickopen.i18n.json | 12 ++ .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../vs/workbench/browser/viewlet.i18n.json | 3 +- .../src/vs/workbench/common/theme.i18n.json | 5 + .../electron-browser/actions.i18n.json | 9 +- .../main.contribution.i18n.json | 8 +- .../electron-browser/accessibility.i18n.json | 26 +++ .../inspectTMScopes.i18n.json | 6 + .../toggleMultiCursorModifier.i18n.json | 8 + .../electron-browser/debugViews.i18n.json | 4 - .../actions/editPoints.i18n.json | 4 +- .../emmet.contribution.i18n.json | 3 +- .../browser/extensionEditor.i18n.json | 4 + .../browser/extensionsActions.i18n.json | 8 +- .../browser/files.contribution.i18n.json | 1 - .../files/browser/views/emptyView.i18n.json | 2 - .../browser/views/openEditorsView.i18n.json | 2 +- .../keybindingsEditorContribution.i18n.json | 4 +- .../relauncher.contribution.i18n.json | 10 + .../snippets.contribution.i18n.json | 2 +- .../languageSurveys.contribution.i18n.json | 11 ++ .../nps.contribution.i18n.json | 11 ++ .../tasks/browser/buildQuickOpen.i18n.json | 8 + .../parts/tasks/browser/quickOpen.i18n.json | 3 +- .../tasks/browser/testQuickOpen.i18n.json | 8 + .../tasks/common/taskConfiguration.i18n.json | 1 + .../jsonSchemaCommon.i18n.json | 1 + .../electron-browser/jsonSchema_v1.i18n.json | 2 + .../electron-browser/jsonSchema_v2.i18n.json | 4 + .../task.contribution.i18n.json | 3 +- .../terminalTaskSystem.i18n.json | 1 + .../terminal.contribution.i18n.json | 6 +- .../terminalActions.i18n.json | 10 +- .../terminalFindWidget.i18n.json | 12 ++ .../terminalInstance.i18n.json | 1 - .../electron-browser/terminalPanel.i18n.json | 2 +- .../update/electron-browser/update.i18n.json | 15 +- .../parts/views/browser/views.i18n.json | 8 + .../browser/viewsExtensionPoint.i18n.json | 15 ++ .../vs_code_welcome_page.i18n.json | 1 - .../welcomePage.contribution.i18n.json | 2 - .../electron-browser/welcomePage.i18n.json | 17 +- .../common/crashReporterService.i18n.json | 9 + .../browser/progressService2.i18n.json | 9 + .../kor/extensions/git/out/commands.i18n.json | 4 + i18n/kor/extensions/git/package.i18n.json | 7 +- i18n/kor/extensions/jake/out/main.i18n.json | 4 +- i18n/kor/extensions/jake/package.i18n.json | 4 +- .../markdown/out/extension.i18n.json | 4 +- .../out/codelensProvider.i18n.json | 7 +- .../out/commandHandler.i18n.json | 8 +- .../out/mergeDecorator.i18n.json | 5 +- .../merge-conflict/package.i18n.json | 16 +- i18n/kor/extensions/npm/package.i18n.json | 4 +- .../out/features/bufferSyncSupport.i18n.json | 1 - ...rectiveCommentCompletionProvider.i18n.json | 6 +- .../out/utils/projectStatus.i18n.json | 1 - .../out/utils/typingsStatus.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 11 +- .../resourceviewer/resourceViewer.i18n.json | 1 + .../src/vs/base/common/errorMessage.i18n.json | 1 - .../vs/base/common/keybindingLabels.i18n.json | 6 + .../src/vs/code/electron-main/menus.i18n.json | 12 +- .../vs/code/electron-main/windows.i18n.json | 6 +- .../config/commonEditorConfig.i18n.json | 13 +- .../common/config/editorOptions.i18n.json | 1 + .../common/view/editorColorRegistry.i18n.json | 12 +- .../find/common/findController.i18n.json | 1 - .../contrib/links/browser/links.i18n.json | 1 + .../browser/referencesModel.i18n.json | 2 - .../browser/referencesWidget.i18n.json | 3 + .../suggest/browser/suggestWidget.i18n.json | 1 + ...guageConfigurationExtensionPoint.i18n.json | 6 +- .../menusExtensionPoint.i18n.json | 2 + .../common/extensionsRegistry.i18n.json | 6 + .../historyMainService.i18n.json | 11 ++ .../markers/common/problemMatcher.i18n.json | 7 + .../theme/common/colorRegistry.i18n.json | 26 ++- .../workbench/api/node/extHostTask.i18n.json | 4 +- .../api/node/extHostTreeViews.i18n.json | 6 +- .../browser/actions/configureLocale.i18n.json | 1 + .../activitybar/activitybarPart.i18n.json | 3 +- .../parts/editor/editorStatus.i18n.json | 2 +- .../parts/quickopen/quickopen.i18n.json | 12 ++ .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../vs/workbench/browser/viewlet.i18n.json | 3 +- .../src/vs/workbench/common/theme.i18n.json | 15 ++ .../electron-browser/actions.i18n.json | 9 +- .../main.contribution.i18n.json | 10 +- .../electron-browser/accessibility.i18n.json | 26 +++ .../inspectTMScopes.i18n.json | 6 + .../toggleMultiCursorModifier.i18n.json | 8 + .../debug/browser/debugActions.i18n.json | 1 + .../electron-browser/debugCommands.i18n.json | 4 +- .../electron-browser/debugViews.i18n.json | 4 - .../electronDebugActions.i18n.json | 1 + .../statusbarColorProvider.i18n.json | 3 +- .../parts/debug/node/debugAdapter.i18n.json | 1 + .../actions/editPoints.i18n.json | 4 +- .../emmet.contribution.i18n.json | 3 +- .../browser/extensionEditor.i18n.json | 4 + .../browser/extensionsActions.i18n.json | 9 +- .../extensionTipsService.i18n.json | 2 + .../extensions.contribution.i18n.json | 3 +- .../extensionsUtils.i18n.json | 2 + .../browser/files.contribution.i18n.json | 2 + .../files/browser/views/emptyView.i18n.json | 2 - .../browser/views/openEditorsView.i18n.json | 2 +- .../performance.contribution.i18n.json | 4 +- .../keybindingsEditorContribution.i18n.json | 4 +- .../browser/preferencesRenderers.i18n.json | 1 + .../browser/commandsHandler.i18n.json | 1 + .../relauncher.contribution.i18n.json | 10 + .../dirtydiffDecorator.i18n.json | 6 +- .../scm.contribution.i18n.json | 1 + .../scm/electron-browser/scmMenus.i18n.json | 1 + .../browser/searchResultsView.i18n.json | 4 +- .../electron-browser/TMSnippets.i18n.json | 3 +- .../snippets.contribution.i18n.json | 2 +- .../languageSurveys.contribution.i18n.json | 11 ++ .../nps.contribution.i18n.json | 11 ++ .../tasks/browser/buildQuickOpen.i18n.json | 8 + .../parts/tasks/browser/quickOpen.i18n.json | 3 +- .../tasks/browser/testQuickOpen.i18n.json | 8 + .../tasks/common/taskConfiguration.i18n.json | 1 + .../jsonSchemaCommon.i18n.json | 1 + .../electron-browser/jsonSchema_v1.i18n.json | 2 + .../electron-browser/jsonSchema_v2.i18n.json | 4 + .../task.contribution.i18n.json | 4 +- .../terminalTaskSystem.i18n.json | 4 +- .../tasks/node/processTaskSystem.i18n.json | 3 +- .../terminalActions.i18n.json | 6 +- .../terminalColorRegistry.i18n.json | 2 + .../terminalFindWidget.i18n.json | 12 ++ .../terminalInstance.i18n.json | 1 - .../themes.contribution.i18n.json | 1 + .../update/electron-browser/update.i18n.json | 15 +- .../parts/views/browser/views.i18n.json | 8 + .../browser/viewsExtensionPoint.i18n.json | 15 ++ .../vs_code_welcome_page.i18n.json | 8 +- .../welcomePage.contribution.i18n.json | 2 - .../electron-browser/welcomePage.i18n.json | 20 +- .../walkThroughPart.i18n.json | 3 +- .../configurationEditingService.i18n.json | 8 +- .../common/crashReporterService.i18n.json | 9 + .../browser/progressService2.i18n.json | 9 + .../out/settingsDocumentHelper.i18n.json | 2 +- .../extensions/git/out/statusbar.i18n.json | 4 +- i18n/ptb/extensions/git/package.i18n.json | 2 +- .../out/codelensProvider.i18n.json | 7 +- .../out/commandHandler.i18n.json | 2 + .../out/mergeDecorator.i18n.json | 4 +- .../merge-conflict/package.i18n.json | 8 + .../out/features/bufferSyncSupport.i18n.json | 2 +- .../out/utils/projectStatus.i18n.json | 1 - .../out/utils/typingsStatus.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 4 +- .../src/vs/base/common/errorMessage.i18n.json | 1 - .../vs/base/common/keybindingLabels.i18n.json | 6 + .../src/vs/code/electron-main/menus.i18n.json | 15 +- .../vs/code/electron-main/windows.i18n.json | 6 +- .../config/commonEditorConfig.i18n.json | 11 +- .../common/config/editorOptions.i18n.json | 1 + .../find/common/findController.i18n.json | 1 - .../browser/referencesModel.i18n.json | 4 +- .../menusExtensionPoint.i18n.json | 2 + .../common/extensionsRegistry.i18n.json | 6 + .../historyMainService.i18n.json | 11 ++ .../theme/common/colorRegistry.i18n.json | 4 +- .../workbench/api/node/extHostTask.i18n.json | 4 +- .../activitybar/activitybarPart.i18n.json | 3 +- .../parts/editor/editorActions.i18n.json | 1 + .../parts/editor/editorStatus.i18n.json | 5 +- .../parts/editor/titleControl.i18n.json | 1 + .../parts/quickopen/quickopen.i18n.json | 12 ++ .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../vs/workbench/browser/viewlet.i18n.json | 3 +- .../src/vs/workbench/common/theme.i18n.json | 16 +- .../electron-browser/actions.i18n.json | 18 +- .../main.contribution.i18n.json | 15 +- .../electron-browser/accessibility.i18n.json | 26 +++ .../inspectTMScopes.i18n.json | 6 + .../toggleMultiCursorModifier.i18n.json | 8 + .../electron-browser/debugViews.i18n.json | 4 - .../debug/electron-browser/repl.i18n.json | 3 +- .../actions/editPoints.i18n.json | 4 +- .../emmet.contribution.i18n.json | 3 +- .../browser/extensionEditor.i18n.json | 4 + .../browser/files.contribution.i18n.json | 2 +- .../files/browser/views/emptyView.i18n.json | 2 - .../browser/views/openEditorsView.i18n.json | 2 +- .../browser/views/openEditorsViewer.i18n.json | 1 + .../keybindingsEditorContribution.i18n.json | 4 +- .../browser/commandsHandler.i18n.json | 3 + .../relauncher.contribution.i18n.json | 10 + .../snippets.contribution.i18n.json | 2 +- .../languageSurveys.contribution.i18n.json | 11 ++ .../nps.contribution.i18n.json | 11 ++ .../tasks/browser/buildQuickOpen.i18n.json | 10 + .../parts/tasks/browser/quickOpen.i18n.json | 3 +- .../tasks/browser/testQuickOpen.i18n.json | 10 + .../tasks/common/taskConfiguration.i18n.json | 1 + .../jsonSchemaCommon.i18n.json | 1 + .../electron-browser/jsonSchema_v1.i18n.json | 2 + .../electron-browser/jsonSchema_v2.i18n.json | 4 + .../task.contribution.i18n.json | 8 +- .../terminalTaskSystem.i18n.json | 1 + .../terminalActions.i18n.json | 7 +- .../terminalFindWidget.i18n.json | 12 ++ .../terminalInstance.i18n.json | 2 +- .../update/electron-browser/update.i18n.json | 15 +- .../parts/views/browser/views.i18n.json | 8 + .../browser/viewsExtensionPoint.i18n.json | 16 ++ .../vs_code_welcome_page.i18n.json | 1 - .../welcomePage.contribution.i18n.json | 2 - .../electron-browser/welcomePage.i18n.json | 17 +- .../common/crashReporterService.i18n.json | 9 + .../browser/progressService2.i18n.json | 9 + .../rus/extensions/git/out/commands.i18n.json | 4 + .../extensions/git/out/statusbar.i18n.json | 2 +- i18n/rus/extensions/git/package.i18n.json | 7 +- i18n/rus/extensions/jake/out/main.i18n.json | 4 +- i18n/rus/extensions/jake/package.i18n.json | 4 +- .../markdown/out/extension.i18n.json | 4 +- .../out/codelensProvider.i18n.json | 7 +- .../out/commandHandler.i18n.json | 8 +- .../out/mergeDecorator.i18n.json | 5 +- .../merge-conflict/package.i18n.json | 16 +- i18n/rus/extensions/npm/package.i18n.json | 4 +- .../out/features/bufferSyncSupport.i18n.json | 1 - ...rectiveCommentCompletionProvider.i18n.json | 6 +- .../out/utils/projectStatus.i18n.json | 1 - .../out/utils/typingsStatus.i18n.json | 1 + .../extensions/typescript/package.i18n.json | 11 +- .../resourceviewer/resourceViewer.i18n.json | 1 + .../src/vs/base/common/errorMessage.i18n.json | 1 - .../vs/base/common/keybindingLabels.i18n.json | 6 + .../src/vs/code/electron-main/menus.i18n.json | 10 +- .../vs/code/electron-main/windows.i18n.json | 6 +- .../config/commonEditorConfig.i18n.json | 13 +- .../common/config/editorOptions.i18n.json | 1 + .../common/view/editorColorRegistry.i18n.json | 12 +- .../find/common/findController.i18n.json | 1 - .../contrib/links/browser/links.i18n.json | 1 + .../browser/referencesModel.i18n.json | 2 - .../browser/referencesWidget.i18n.json | 3 + .../suggest/browser/suggestWidget.i18n.json | 1 + ...guageConfigurationExtensionPoint.i18n.json | 6 +- .../menusExtensionPoint.i18n.json | 2 + .../common/extensionsRegistry.i18n.json | 6 + .../historyMainService.i18n.json | 11 ++ .../markers/common/problemMatcher.i18n.json | 7 + .../theme/common/colorRegistry.i18n.json | 14 +- .../workbench/api/node/extHostTask.i18n.json | 4 +- .../api/node/extHostTreeViews.i18n.json | 6 +- .../browser/actions/configureLocale.i18n.json | 1 + .../activitybar/activitybarPart.i18n.json | 3 +- .../parts/editor/editorStatus.i18n.json | 2 +- .../parts/quickopen/quickopen.i18n.json | 12 ++ .../vs/workbench/browser/quickopen.i18n.json | 3 +- .../vs/workbench/browser/viewlet.i18n.json | 3 +- .../src/vs/workbench/common/theme.i18n.json | 15 ++ .../electron-browser/actions.i18n.json | 9 +- .../main.contribution.i18n.json | 10 +- .../electron-browser/accessibility.i18n.json | 26 +++ .../inspectTMScopes.i18n.json | 6 + .../toggleMultiCursorModifier.i18n.json | 8 + .../debug/browser/debugActions.i18n.json | 1 + .../electron-browser/debugCommands.i18n.json | 4 +- .../electron-browser/debugViews.i18n.json | 4 - .../electronDebugActions.i18n.json | 1 + .../statusbarColorProvider.i18n.json | 3 +- .../parts/debug/node/debugAdapter.i18n.json | 1 + .../actions/editPoints.i18n.json | 4 +- .../emmet.contribution.i18n.json | 3 +- .../browser/extensionEditor.i18n.json | 4 + .../browser/extensionsActions.i18n.json | 9 +- .../extensionTipsService.i18n.json | 2 + .../extensions.contribution.i18n.json | 3 +- .../extensionsUtils.i18n.json | 2 + .../browser/files.contribution.i18n.json | 2 + .../files/browser/views/emptyView.i18n.json | 2 - .../browser/views/openEditorsView.i18n.json | 2 +- .../performance.contribution.i18n.json | 4 +- .../keybindingsEditorContribution.i18n.json | 4 +- .../browser/preferencesRenderers.i18n.json | 1 + .../browser/commandsHandler.i18n.json | 1 + .../relauncher.contribution.i18n.json | 10 + .../dirtydiffDecorator.i18n.json | 6 +- .../scm.contribution.i18n.json | 1 + .../scm/electron-browser/scmMenus.i18n.json | 1 + .../browser/searchResultsView.i18n.json | 4 +- .../electron-browser/TMSnippets.i18n.json | 3 +- .../snippets.contribution.i18n.json | 2 +- .../languageSurveys.contribution.i18n.json | 11 ++ .../nps.contribution.i18n.json | 11 ++ .../tasks/browser/buildQuickOpen.i18n.json | 8 + .../parts/tasks/browser/quickOpen.i18n.json | 3 +- .../tasks/browser/testQuickOpen.i18n.json | 8 + .../tasks/common/taskConfiguration.i18n.json | 1 + .../jsonSchemaCommon.i18n.json | 1 + .../electron-browser/jsonSchema_v1.i18n.json | 2 + .../electron-browser/jsonSchema_v2.i18n.json | 4 + .../task.contribution.i18n.json | 4 +- .../terminalTaskSystem.i18n.json | 4 +- .../tasks/node/processTaskSystem.i18n.json | 3 +- .../terminalActions.i18n.json | 6 +- .../terminalColorRegistry.i18n.json | 2 + .../terminalFindWidget.i18n.json | 12 ++ .../terminalInstance.i18n.json | 1 - .../themes.contribution.i18n.json | 1 + .../update/electron-browser/update.i18n.json | 15 +- .../parts/views/browser/views.i18n.json | 8 + .../browser/viewsExtensionPoint.i18n.json | 15 ++ .../vs_code_welcome_page.i18n.json | 8 +- .../welcomePage.contribution.i18n.json | 2 - .../electron-browser/welcomePage.i18n.json | 20 +- .../walkThroughPart.i18n.json | 3 +- .../configurationEditingService.i18n.json | 8 +- .../common/crashReporterService.i18n.json | 9 + .../browser/progressService2.i18n.json | 9 + .../out/settingsDocumentHelper.i18n.json | 36 ++++ .../css/client/out/cssMain.i18n.json | 8 + i18n/trk/extensions/css/package.i18n.json | 67 +++++++ .../out/packageDocumentHelper.i18n.json | 9 + .../extensions/git/out/askpass-main.i18n.json | 8 + .../trk/extensions/git/out/commands.i18n.json | 46 +++++ i18n/trk/extensions/git/out/main.i18n.json | 11 ++ i18n/trk/extensions/git/out/model.i18n.json | 14 ++ .../extensions/git/out/scmProvider.i18n.json | 8 + .../extensions/git/out/statusbar.i18n.json | 11 ++ i18n/trk/extensions/git/package.i18n.json | 49 +++++ i18n/trk/extensions/grunt/out/main.i18n.json | 8 + i18n/trk/extensions/grunt/package.i18n.json | 8 + i18n/trk/extensions/gulp/out/main.i18n.json | 8 + i18n/trk/extensions/gulp/package.i18n.json | 8 + .../html/client/out/htmlMain.i18n.json | 8 + i18n/trk/extensions/html/package.i18n.json | 27 +++ i18n/trk/extensions/jake/out/main.i18n.json | 8 + i18n/trk/extensions/jake/package.i18n.json | 8 + .../features/bowerJSONContribution.i18n.json | 10 + .../packageJSONContribution.i18n.json | 13 ++ .../json/client/out/jsonMain.i18n.json | 8 + i18n/trk/extensions/json/package.i18n.json | 15 ++ .../markdown/out/extension.i18n.json | 8 + .../out/previewContentProvider.i18n.json | 10 + .../markdown/out/security.i18n.json | 11 ++ .../trk/extensions/markdown/package.i18n.json | 22 +++ .../out/codelensProvider.i18n.json | 11 ++ .../out/commandHandler.i18n.json | 13 ++ .../out/mergeDecorator.i18n.json | 9 + .../merge-conflict/package.i18n.json | 20 ++ i18n/trk/extensions/npm/package.i18n.json | 8 + .../out/features/validationProvider.i18n.json | 13 ++ i18n/trk/extensions/php/package.i18n.json | 14 ++ .../out/features/bufferSyncSupport.i18n.json | 12 ++ .../features/completionItemProvider.i18n.json | 9 + ...rectiveCommentCompletionProvider.i18n.json | 10 + .../implementationsCodeLensProvider.i18n.json | 10 + .../jsDocCompletionProvider.i18n.json | 8 + .../referencesCodeLensProvider.i18n.json | 10 + .../typescript/out/typescriptMain.i18n.json | 15 ++ .../out/typescriptServiceClient.i18n.json | 24 +++ .../typescript/out/utils/logger.i18n.json | 8 + .../out/utils/projectStatus.i18n.json | 11 ++ .../out/utils/typingsStatus.i18n.json | 12 ++ .../extensions/typescript/package.i18n.json | 48 +++++ .../browser/ui/actionbar/actionbar.i18n.json | 8 + .../vs/base/browser/ui/aria/aria.i18n.json | 8 + .../browser/ui/findinput/findInput.i18n.json | 8 + .../findinput/findInputCheckboxes.i18n.json | 10 + .../browser/ui/inputbox/inputBox.i18n.json | 10 + .../resourceviewer/resourceViewer.i18n.json | 16 ++ .../base/browser/ui/toolbar/toolbar.i18n.json | 8 + .../src/vs/base/common/errorMessage.i18n.json | 17 ++ .../base/common/jsonErrorMessages.i18n.json | 16 ++ .../vs/base/common/keybindingLabels.i18n.json | 6 + .../src/vs/base/common/processes.i18n.json | 11 ++ .../trk/src/vs/base/common/severity.i18n.json | 10 + i18n/trk/src/vs/base/node/processes.i18n.json | 8 + i18n/trk/src/vs/base/node/zip.i18n.json | 8 + .../browser/quickOpenModel.i18n.json | 9 + .../browser/quickOpenWidget.i18n.json | 9 + .../parts/tree/browser/treeDefaults.i18n.json | 8 + .../src/vs/code/electron-main/menus.i18n.json | 178 ++++++++++++++++++ .../vs/code/electron-main/window.i18n.json | 8 + .../vs/code/electron-main/windows.i18n.json | 17 ++ .../src/vs/code/node/cliProcessMain.i18n.json | 17 ++ .../config/commonEditorConfig.i18n.json | 88 +++++++++ .../common/config/editorOptions.i18n.json | 9 + .../editor/common/controller/cursor.i18n.json | 8 + .../model/textModelWithTokens.i18n.json | 8 + .../common/modes/modesRegistry.i18n.json | 8 + .../editor/common/services/bulkEdit.i18n.json | 11 ++ .../common/services/modeServiceImpl.i18n.json | 16 ++ .../services/modelServiceImpl.i18n.json | 9 + .../common/view/editorColorRegistry.i18n.json | 24 +++ .../common/bracketMatching.i18n.json | 8 + .../common/caretOperations.i18n.json | 9 + .../common/transpose.i18n.json | 8 + .../clipboard/browser/clipboard.i18n.json | 11 ++ .../contrib/comment/common/comment.i18n.json | 11 ++ .../contextmenu/browser/contextmenu.i18n.json | 8 + .../contrib/find/browser/findWidget.i18n.json | 21 +++ .../find/common/findController.i18n.json | 18 ++ .../contrib/folding/browser/folding.i18n.json | 14 ++ .../format/browser/formatActions.i18n.json | 13 ++ .../browser/goToDeclarationCommands.i18n.json | 23 +++ .../browser/goToDeclarationMouse.i18n.json | 8 + .../gotoError/browser/gotoError.i18n.json | 13 ++ .../contrib/hover/browser/hover.i18n.json | 8 + .../hover/browser/modesContentHover.i18n.json | 8 + .../common/inPlaceReplace.i18n.json | 9 + .../indentation/common/indentation.i18n.json | 15 ++ .../common/linesOperations.i18n.json | 25 +++ .../contrib/links/browser/links.i18n.json | 13 ++ .../multicursor/common/multicursor.i18n.json | 10 + .../browser/parameterHints.i18n.json | 8 + .../browser/parameterHintsWidget.i18n.json | 8 + .../browser/quickFixCommands.i18n.json | 10 + .../browser/referenceSearch.i18n.json | 9 + .../browser/referencesController.i18n.json | 8 + .../browser/referencesModel.i18n.json | 14 ++ .../browser/referencesWidget.i18n.json | 27 +++ .../contrib/rename/browser/rename.i18n.json | 11 ++ .../rename/browser/renameInputField.i18n.json | 8 + .../smartSelect/common/smartSelect.i18n.json | 9 + .../browser/suggestController.i18n.json | 9 + .../suggest/browser/suggestWidget.i18n.json | 21 +++ .../common/toggleTabFocusMode.i18n.json | 8 + .../common/wordHighlighter.i18n.json | 9 + .../browser/peekViewWidget.i18n.json | 8 + .../textMate/TMSyntax.i18n.json | 14 ++ ...guageConfigurationExtensionPoint.i18n.json | 23 +++ .../editor/node/textMate/TMGrammars.i18n.json | 13 ++ .../browser/menuItemActionItem.i18n.json | 8 + .../menusExtensionPoint.i18n.json | 43 +++++ .../common/configurationRegistry.i18n.json | 19 ++ .../platform/environment/node/argv.i18n.json | 32 ++++ .../extensionEnablementService.i18n.json | 8 + .../common/extensionManagement.i18n.json | 9 + .../node/extensionGalleryService.i18n.json | 9 + .../node/extensionManagementService.i18n.json | 22 +++ .../common/abstractExtensionService.i18n.json | 11 ++ .../common/extensionsRegistry.i18n.json | 30 +++ .../node/extensionValidator.i18n.json | 24 +++ .../historyMainService.i18n.json | 11 ++ .../node/integrityServiceImpl.i18n.json | 11 ++ .../jsonValidationExtensionPoint.i18n.json | 15 ++ .../abstractKeybindingService.i18n.json | 9 + .../markers/common/problemMatcher.i18n.json | 61 ++++++ .../platform/message/common/message.i18n.json | 10 + .../platform/request/node/request.i18n.json | 11 ++ .../common/telemetryService.i18n.json | 9 + .../theme/common/colorRegistry.i18n.json | 88 +++++++++ .../mainThreadExtensionService.i18n.json | 9 + .../mainThreadMessageService.i18n.json | 10 + .../api/node/extHostDiagnostics.i18n.json | 8 + .../workbench/api/node/extHostTask.i18n.json | 8 + .../api/node/extHostTreeViews.i18n.json | 10 + .../browser/actions/configureLocale.i18n.json | 13 ++ .../browser/actions/fileActions.i18n.json | 9 + .../toggleActivityBarVisibility.i18n.json | 9 + .../actions/toggleEditorLayout.i18n.json | 11 ++ .../actions/toggleSidebarPosition.i18n.json | 9 + .../actions/toggleSidebarVisibility.i18n.json | 9 + .../toggleStatusbarVisibility.i18n.json | 9 + .../browser/actions/toggleZenMode.i18n.json | 9 + .../activitybar/activitybarActions.i18n.json | 14 ++ .../activitybar/activitybarPart.i18n.json | 10 + .../browser/parts/compositePart.i18n.json | 9 + .../parts/editor/binaryDiffEditor.i18n.json | 8 + .../parts/editor/binaryEditor.i18n.json | 8 + .../editor/editor.contribution.i18n.json | 16 ++ .../parts/editor/editorActions.i18n.json | 56 ++++++ .../parts/editor/editorCommands.i18n.json | 12 ++ .../browser/parts/editor/editorPart.i18n.json | 14 ++ .../parts/editor/editorPicker.i18n.json | 13 ++ .../parts/editor/editorStatus.i18n.json | 51 +++++ .../parts/editor/tabsTitleControl.i18n.json | 8 + .../parts/editor/textDiffEditor.i18n.json | 16 ++ .../browser/parts/editor/textEditor.i18n.json | 8 + .../parts/editor/textResourceEditor.i18n.json | 12 ++ .../parts/editor/titleControl.i18n.json | 15 ++ .../parts/panel/panelActions.i18n.json | 15 ++ .../browser/parts/panel/panelPart.i18n.json | 8 + .../quickopen/quickOpenController.i18n.json | 17 ++ .../parts/quickopen/quickopen.i18n.json | 12 ++ .../parts/sidebar/sidebarPart.i18n.json | 9 + .../parts/statusbar/statusbarPart.i18n.json | 9 + .../parts/titlebar/titlebarPart.i18n.json | 9 + .../vs/workbench/browser/quickopen.i18n.json | 10 + .../vs/workbench/browser/viewlet.i18n.json | 8 + .../src/vs/workbench/common/theme.i18n.json | 61 ++++++ .../electron-browser/actions.i18n.json | 43 +++++ .../electron-browser/commands.i18n.json | 8 + .../electron-browser/extensionHost.i18n.json | 11 ++ .../main.contribution.i18n.json | 69 +++++++ .../workbench/electron-browser/main.i18n.json | 9 + .../electron-browser/shell.i18n.json | 8 + .../electron-browser/window.i18n.json | 15 ++ .../electron-browser/workbench.i18n.json | 9 + .../node/extensionHostMain.i18n.json | 8 + .../workbench/node/extensionPoints.i18n.json | 11 ++ .../cli.contribution.i18n.json | 18 ++ .../electron-browser/accessibility.i18n.json | 26 +++ .../inspectKeybindings.i18n.json | 8 + .../inspectTMScopes.i18n.json | 6 + .../toggleMultiCursorModifier.i18n.json | 8 + .../toggleRenderControlCharacter.i18n.json | 8 + .../toggleRenderWhitespace.i18n.json | 8 + .../electron-browser/toggleWordWrap.i18n.json | 11 ++ .../wordWrapMigration.i18n.json | 11 ++ .../debug/browser/breakpointWidget.i18n.json | 13 ++ .../debug/browser/debugActionItems.i18n.json | 9 + .../debug/browser/debugActions.i18n.json | 49 +++++ .../browser/debugActionsWidget.i18n.json | 8 + .../browser/debugContentProvider.i18n.json | 8 + .../browser/debugEditorActions.i18n.json | 15 ++ .../browser/debugEditorModelManager.i18n.json | 11 ++ .../debug/browser/debugQuickOpen.i18n.json | 11 ++ .../debug/browser/exceptionWidget.i18n.json | 11 ++ .../debug/browser/linkDetector.i18n.json | 9 + .../parts/debug/common/debug.i18n.json | 8 + .../parts/debug/common/debugModel.i18n.json | 9 + .../parts/debug/common/debugSource.i18n.json | 8 + .../debug.contribution.i18n.json | 20 ++ .../electron-browser/debugCommands.i18n.json | 8 + .../debugConfigurationManager.i18n.json | 38 ++++ .../debugEditorContribution.i18n.json | 20 ++ .../electron-browser/debugHover.i18n.json | 8 + .../electron-browser/debugService.i18n.json | 25 +++ .../electron-browser/debugViewer.i18n.json | 28 +++ .../electron-browser/debugViews.i18n.json | 16 ++ .../electronDebugActions.i18n.json | 11 ++ .../rawDebugSession.i18n.json | 12 ++ .../debug/electron-browser/repl.i18n.json | 12 ++ .../electron-browser/replViewer.i18n.json | 12 ++ .../statusbarColorProvider.i18n.json | 9 + .../terminalSupport.i18n.json | 9 + .../parts/debug/node/debugAdapter.i18n.json | 20 ++ .../actions/showEmmetCommands.i18n.json | 8 + .../actions/balance.i18n.json | 9 + .../actions/editPoints.i18n.json | 9 + .../actions/evaluateMath.i18n.json | 8 + .../actions/expandAbbreviation.i18n.json | 8 + .../actions/incrementDecrement.i18n.json | 13 ++ .../actions/matchingPair.i18n.json | 8 + .../actions/mergeLines.i18n.json | 8 + .../actions/reflectCssValue.i18n.json | 8 + .../actions/removeTag.i18n.json | 8 + .../actions/selectItem.i18n.json | 9 + .../actions/splitJoinTag.i18n.json | 8 + .../actions/toggleComment.i18n.json | 8 + .../actions/updateImageSize.i18n.json | 8 + .../actions/updateTag.i18n.json | 10 + .../actions/wrapWithAbbreviation.i18n.json | 10 + .../emmet.contribution.i18n.json | 14 ++ .../terminal.contribution.i18n.json | 15 ++ .../terminalService.i18n.json | 12 ++ .../treeExplorer.contribution.i18n.json | 14 ++ .../browser/treeExplorerActions.i18n.json | 8 + .../browser/treeExplorerService.i18n.json | 8 + .../browser/views/treeExplorerView.i18n.json | 8 + .../browser/dependenciesViewer.i18n.json | 9 + .../browser/extensionEditor.i18n.json | 43 +++++ .../browser/extensionsActions.i18n.json | 62 ++++++ .../browser/extensionsQuickOpen.i18n.json | 10 + .../common/extensionsFileTemplate.i18n.json | 10 + .../common/extensionsInput.i18n.json | 8 + .../extensionTipsService.i18n.json | 16 ++ .../extensions.contribution.i18n.json | 15 ++ .../extensionsActions.i18n.json | 11 ++ .../extensionsUtils.i18n.json | 13 ++ .../extensionsViewlet.i18n.json | 15 ++ .../node/extensionsWorkbenchService.i18n.json | 17 ++ .../electron-browser/feedback.i18n.json | 25 +++ .../editors/binaryFileEditor.i18n.json | 8 + .../browser/editors/textFileEditor.i18n.json | 11 ++ .../fileActions.contribution.i18n.json | 11 ++ .../parts/files/browser/fileActions.i18n.json | 73 +++++++ .../files/browser/fileCommands.i18n.json | 9 + .../browser/files.contribution.i18n.json | 41 ++++ .../files/browser/saveErrorHandler.i18n.json | 16 ++ .../files/browser/views/emptyView.i18n.json | 9 + .../browser/views/explorerView.i18n.json | 9 + .../browser/views/explorerViewer.i18n.json | 12 ++ .../browser/views/openEditorsView.i18n.json | 11 ++ .../browser/views/openEditorsViewer.i18n.json | 14 ++ .../files/common/dirtyFilesTracker.i18n.json | 8 + .../common/editors/fileEditorInput.i18n.json | 8 + .../html/browser/html.contribution.i18n.json | 8 + .../html/browser/htmlPreviewPart.i18n.json | 8 + .../parts/html/browser/webview.i18n.json | 8 + .../parts/markers/common/messages.i18n.json | 39 ++++ .../markersElectronContributions.i18n.json | 8 + .../nps.contribution.i18n.json | 11 ++ .../browser/output.contribution.i18n.json | 10 + .../output/browser/outputActions.i18n.json | 11 ++ .../output/browser/outputPanel.i18n.json | 9 + .../parts/output/common/output.i18n.json | 9 + .../performance.contribution.i18n.json | 15 ++ .../browser/keybindingWidgets.i18n.json | 9 + .../browser/keybindingsEditor.i18n.json | 35 ++++ .../keybindingsEditorContribution.i18n.json | 11 ++ .../preferences.contribution.i18n.json | 10 + .../browser/preferencesActions.i18n.json | 14 ++ .../browser/preferencesEditor.i18n.json | 15 ++ .../browser/preferencesRenderers.i18n.json | 13 ++ .../browser/preferencesService.i18n.json | 13 ++ .../browser/preferencesWidgets.i18n.json | 10 + .../common/keybindingsEditorModel.i18n.json | 11 ++ .../common/preferencesModels.i18n.json | 9 + .../browser/commandsHandler.i18n.json | 19 ++ .../browser/gotoLineHandler.i18n.json | 14 ++ .../browser/gotoSymbolHandler.i18n.json | 34 ++++ .../quickopen/browser/helpHandler.i18n.json | 10 + .../browser/quickopen.contribution.i18n.json | 14 ++ .../browser/viewPickerHandler.i18n.json | 15 ++ .../relauncher.contribution.i18n.json | 10 + .../dirtydiffDecorator.i18n.json | 10 + .../scm.contribution.i18n.json | 12 ++ .../electron-browser/scmActivity.i18n.json | 8 + .../scm/electron-browser/scmMenus.i18n.json | 9 + .../scm/electron-browser/scmViewlet.i18n.json | 10 + .../browser/openAnythingHandler.i18n.json | 9 + .../search/browser/openFileHandler.i18n.json | 9 + .../browser/openSymbolHandler.i18n.json | 11 ++ .../browser/patternInputWidget.i18n.json | 12 ++ .../search/browser/replaceService.i18n.json | 8 + .../browser/search.contribution.i18n.json | 22 +++ .../search/browser/searchActions.i18n.json | 21 +++ .../browser/searchResultsView.i18n.json | 12 ++ .../search/browser/searchViewlet.i18n.json | 50 +++++ .../search/browser/searchWidget.i18n.json | 15 ++ .../electron-browser/TMSnippets.i18n.json | 14 ++ .../electron-browser/insertSnippet.i18n.json | 8 + .../snippets.contribution.i18n.json | 16 ++ .../snippetsService.i18n.json | 9 + .../electron-browser/tabCompletion.i18n.json | 8 + .../languageSurveys.contribution.i18n.json | 11 ++ .../nps.contribution.i18n.json | 11 ++ .../tasks/browser/buildQuickOpen.i18n.json | 10 + .../parts/tasks/browser/quickOpen.i18n.json | 9 + .../tasks/browser/restartQuickOpen.i18n.json | 10 + .../tasks/browser/taskQuickOpen.i18n.json | 10 + .../browser/terminateQuickOpen.i18n.json | 10 + .../tasks/browser/testQuickOpen.i18n.json | 10 + .../tasks/common/taskConfiguration.i18n.json | 17 ++ .../tasks/common/taskTemplates.i18n.json | 13 ++ .../jsonSchemaCommon.i18n.json | 39 ++++ .../electron-browser/jsonSchema_v1.i18n.json | 14 ++ .../electron-browser/jsonSchema_v2.i18n.json | 17 ++ .../task.contribution.i18n.json | 51 +++++ .../terminalTaskSystem.i18n.json | 12 ++ .../node/processRunnerDetector.i18n.json | 15 ++ .../tasks/node/processTaskSystem.i18n.json | 12 ++ .../terminal.contribution.i18n.json | 30 +++ .../terminalActions.i18n.json | 37 ++++ .../terminalColorRegistry.i18n.json | 10 + .../terminalConfigHelper.i18n.json | 10 + .../terminalFindWidget.i18n.json | 12 ++ .../terminalInstance.i18n.json | 11 ++ .../terminalLinkHandler.i18n.json | 9 + .../electron-browser/terminalPanel.i18n.json | 11 ++ .../terminalService.i18n.json | 15 ++ .../themes.contribution.i18n.json | 19 ++ ...edWorkspaceSettings.contribution.i18n.json | 11 ++ .../releaseNotesInput.i18n.json | 8 + .../update.contribution.i18n.json | 10 + .../update/electron-browser/update.i18n.json | 32 ++++ .../parts/views/browser/views.i18n.json | 8 + .../browser/viewsExtensionPoint.i18n.json | 16 ++ .../electron-browser/watermark.i18n.json | 24 +++ .../overlay/browser/welcomeOverlay.i18n.json | 17 ++ .../vs_code_welcome_page.i18n.json | 43 +++++ .../welcomePage.contribution.i18n.json | 8 + .../electron-browser/welcomePage.i18n.json | 38 ++++ .../editor/editorWalkThrough.i18n.json | 9 + .../walkThrough.contribution.i18n.json | 10 + .../walkThroughActions.i18n.json | 11 ++ .../walkThroughPart.i18n.json | 10 + .../configurationEditingService.i18n.json | 17 ++ .../common/crashReporterService.i18n.json | 9 + .../editor/browser/editorService.i18n.json | 8 + .../electron-browser/fileService.i18n.json | 11 ++ .../services/files/node/fileService.i18n.json | 14 ++ .../common/keybindingEditing.i18n.json | 11 ++ .../keybindingService.i18n.json | 26 +++ .../message/browser/messageList.i18n.json | 14 ++ .../electron-browser/messageService.i18n.json | 9 + .../common/workbenchModeService.i18n.json | 16 ++ .../browser/progressService2.i18n.json | 9 + .../common/textFileEditorModel.i18n.json | 9 + .../textfile/common/textFileService.i18n.json | 8 + .../textFileService.i18n.json | 18 ++ .../themes/common/colorThemeSchema.i18n.json | 11 ++ .../common/fileIconThemeSchema.i18n.json | 37 ++++ .../electron-browser/colorThemeData.i18n.json | 13 ++ .../workbenchThemeService.i18n.json | 32 ++++ 1622 files changed, 15568 insertions(+), 796 deletions(-) create mode 100644 build/win32/i18n/messages.hu.isl create mode 100644 build/win32/i18n/messages.tr.isl create mode 100644 i18n/chs/src/vs/base/common/keybindingLabels.i18n.json create mode 100644 i18n/chs/src/vs/platform/history/electron-main/historyMainService.i18n.json create mode 100644 i18n/chs/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/views/browser/views.i18n.json create mode 100644 i18n/chs/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json create mode 100644 i18n/chs/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json create mode 100644 i18n/chs/src/vs/workbench/services/progress/browser/progressService2.i18n.json create mode 100644 i18n/cht/src/vs/base/common/keybindingLabels.i18n.json create mode 100644 i18n/cht/src/vs/platform/history/electron-main/historyMainService.i18n.json create mode 100644 i18n/cht/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/views/browser/views.i18n.json create mode 100644 i18n/cht/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json create mode 100644 i18n/cht/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json create mode 100644 i18n/cht/src/vs/workbench/services/progress/browser/progressService2.i18n.json create mode 100644 i18n/deu/src/vs/base/common/keybindingLabels.i18n.json create mode 100644 i18n/deu/src/vs/platform/history/electron-main/historyMainService.i18n.json create mode 100644 i18n/deu/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/views/browser/views.i18n.json create mode 100644 i18n/deu/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json create mode 100644 i18n/deu/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json create mode 100644 i18n/deu/src/vs/workbench/services/progress/browser/progressService2.i18n.json create mode 100644 i18n/esn/src/vs/base/common/keybindingLabels.i18n.json create mode 100644 i18n/esn/src/vs/platform/history/electron-main/historyMainService.i18n.json create mode 100644 i18n/esn/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/views/browser/views.i18n.json create mode 100644 i18n/esn/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json create mode 100644 i18n/esn/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json create mode 100644 i18n/esn/src/vs/workbench/services/progress/browser/progressService2.i18n.json create mode 100644 i18n/fra/src/vs/base/common/keybindingLabels.i18n.json create mode 100644 i18n/fra/src/vs/platform/history/electron-main/historyMainService.i18n.json create mode 100644 i18n/fra/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/views/browser/views.i18n.json create mode 100644 i18n/fra/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json create mode 100644 i18n/fra/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json create mode 100644 i18n/fra/src/vs/workbench/services/progress/browser/progressService2.i18n.json create mode 100644 i18n/hun/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json create mode 100644 i18n/hun/extensions/css/client/out/cssMain.i18n.json create mode 100644 i18n/hun/extensions/css/package.i18n.json create mode 100644 i18n/hun/extensions/extension-editing/out/packageDocumentHelper.i18n.json create mode 100644 i18n/hun/extensions/git/out/askpass-main.i18n.json create mode 100644 i18n/hun/extensions/git/out/commands.i18n.json create mode 100644 i18n/hun/extensions/git/out/main.i18n.json create mode 100644 i18n/hun/extensions/git/out/model.i18n.json create mode 100644 i18n/hun/extensions/git/out/scmProvider.i18n.json create mode 100644 i18n/hun/extensions/git/out/statusbar.i18n.json create mode 100644 i18n/hun/extensions/git/package.i18n.json create mode 100644 i18n/hun/extensions/grunt/out/main.i18n.json create mode 100644 i18n/hun/extensions/grunt/package.i18n.json create mode 100644 i18n/hun/extensions/gulp/out/main.i18n.json create mode 100644 i18n/hun/extensions/gulp/package.i18n.json create mode 100644 i18n/hun/extensions/html/client/out/htmlMain.i18n.json create mode 100644 i18n/hun/extensions/html/package.i18n.json create mode 100644 i18n/hun/extensions/jake/out/main.i18n.json create mode 100644 i18n/hun/extensions/jake/package.i18n.json create mode 100644 i18n/hun/extensions/javascript/out/features/bowerJSONContribution.i18n.json create mode 100644 i18n/hun/extensions/javascript/out/features/packageJSONContribution.i18n.json create mode 100644 i18n/hun/extensions/json/client/out/jsonMain.i18n.json create mode 100644 i18n/hun/extensions/json/package.i18n.json create mode 100644 i18n/hun/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/hun/extensions/markdown/out/previewContentProvider.i18n.json create mode 100644 i18n/hun/extensions/markdown/out/security.i18n.json create mode 100644 i18n/hun/extensions/markdown/package.i18n.json create mode 100644 i18n/hun/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/hun/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/hun/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/hun/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/hun/extensions/npm/package.i18n.json create mode 100644 i18n/hun/extensions/php/out/features/validationProvider.i18n.json create mode 100644 i18n/hun/extensions/php/package.i18n.json create mode 100644 i18n/hun/extensions/typescript/out/features/bufferSyncSupport.i18n.json create mode 100644 i18n/hun/extensions/typescript/out/features/completionItemProvider.i18n.json create mode 100644 i18n/hun/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json create mode 100644 i18n/hun/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json create mode 100644 i18n/hun/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json create mode 100644 i18n/hun/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json create mode 100644 i18n/hun/extensions/typescript/out/typescriptMain.i18n.json create mode 100644 i18n/hun/extensions/typescript/out/typescriptServiceClient.i18n.json create mode 100644 i18n/hun/extensions/typescript/out/utils/logger.i18n.json create mode 100644 i18n/hun/extensions/typescript/out/utils/projectStatus.i18n.json create mode 100644 i18n/hun/extensions/typescript/out/utils/typingsStatus.i18n.json create mode 100644 i18n/hun/extensions/typescript/package.i18n.json create mode 100644 i18n/hun/src/vs/base/browser/ui/actionbar/actionbar.i18n.json create mode 100644 i18n/hun/src/vs/base/browser/ui/aria/aria.i18n.json create mode 100644 i18n/hun/src/vs/base/browser/ui/findinput/findInput.i18n.json create mode 100644 i18n/hun/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json create mode 100644 i18n/hun/src/vs/base/browser/ui/inputbox/inputBox.i18n.json create mode 100644 i18n/hun/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json create mode 100644 i18n/hun/src/vs/base/browser/ui/toolbar/toolbar.i18n.json create mode 100644 i18n/hun/src/vs/base/common/errorMessage.i18n.json create mode 100644 i18n/hun/src/vs/base/common/jsonErrorMessages.i18n.json create mode 100644 i18n/hun/src/vs/base/common/keybindingLabels.i18n.json create mode 100644 i18n/hun/src/vs/base/common/processes.i18n.json create mode 100644 i18n/hun/src/vs/base/common/severity.i18n.json create mode 100644 i18n/hun/src/vs/base/node/processes.i18n.json create mode 100644 i18n/hun/src/vs/base/node/zip.i18n.json create mode 100644 i18n/hun/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json create mode 100644 i18n/hun/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json create mode 100644 i18n/hun/src/vs/base/parts/tree/browser/treeDefaults.i18n.json create mode 100644 i18n/hun/src/vs/code/electron-main/menus.i18n.json create mode 100644 i18n/hun/src/vs/code/electron-main/window.i18n.json create mode 100644 i18n/hun/src/vs/code/electron-main/windows.i18n.json create mode 100644 i18n/hun/src/vs/code/node/cliProcessMain.i18n.json create mode 100644 i18n/hun/src/vs/editor/common/config/commonEditorConfig.i18n.json create mode 100644 i18n/hun/src/vs/editor/common/config/editorOptions.i18n.json create mode 100644 i18n/hun/src/vs/editor/common/controller/cursor.i18n.json create mode 100644 i18n/hun/src/vs/editor/common/model/textModelWithTokens.i18n.json create mode 100644 i18n/hun/src/vs/editor/common/modes/modesRegistry.i18n.json create mode 100644 i18n/hun/src/vs/editor/common/services/bulkEdit.i18n.json create mode 100644 i18n/hun/src/vs/editor/common/services/modeServiceImpl.i18n.json create mode 100644 i18n/hun/src/vs/editor/common/services/modelServiceImpl.i18n.json create mode 100644 i18n/hun/src/vs/editor/common/view/editorColorRegistry.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/comment/common/comment.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/find/browser/findWidget.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/find/common/findController.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/folding/browser/folding.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/format/browser/formatActions.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/hover/browser/hover.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/indentation/common/indentation.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/links/browser/links.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/rename/browser/rename.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json create mode 100644 i18n/hun/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json create mode 100644 i18n/hun/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json create mode 100644 i18n/hun/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json create mode 100644 i18n/hun/src/vs/editor/node/textMate/TMGrammars.i18n.json create mode 100644 i18n/hun/src/vs/platform/actions/browser/menuItemActionItem.i18n.json create mode 100644 i18n/hun/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json create mode 100644 i18n/hun/src/vs/platform/configuration/common/configurationRegistry.i18n.json create mode 100644 i18n/hun/src/vs/platform/environment/node/argv.i18n.json create mode 100644 i18n/hun/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json create mode 100644 i18n/hun/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json create mode 100644 i18n/hun/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json create mode 100644 i18n/hun/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json create mode 100644 i18n/hun/src/vs/platform/extensions/common/abstractExtensionService.i18n.json create mode 100644 i18n/hun/src/vs/platform/extensions/common/extensionsRegistry.i18n.json create mode 100644 i18n/hun/src/vs/platform/extensions/node/extensionValidator.i18n.json create mode 100644 i18n/hun/src/vs/platform/history/electron-main/historyMainService.i18n.json create mode 100644 i18n/hun/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json create mode 100644 i18n/hun/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json create mode 100644 i18n/hun/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json create mode 100644 i18n/hun/src/vs/platform/markers/common/problemMatcher.i18n.json create mode 100644 i18n/hun/src/vs/platform/message/common/message.i18n.json create mode 100644 i18n/hun/src/vs/platform/request/node/request.i18n.json create mode 100644 i18n/hun/src/vs/platform/telemetry/common/telemetryService.i18n.json create mode 100644 i18n/hun/src/vs/platform/theme/common/colorRegistry.i18n.json create mode 100644 i18n/hun/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/api/node/extHostDiagnostics.i18n.json create mode 100644 i18n/hun/src/vs/workbench/api/node/extHostTask.i18n.json create mode 100644 i18n/hun/src/vs/workbench/api/node/extHostTreeViews.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/actions/configureLocale.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/actions/fileActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/actions/toggleZenMode.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/compositePart.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/editor/editorActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/editor/editorPart.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/editor/textEditor.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/editor/titleControl.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/panel/panelActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/panel/panelPart.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/quickopen.i18n.json create mode 100644 i18n/hun/src/vs/workbench/browser/viewlet.i18n.json create mode 100644 i18n/hun/src/vs/workbench/common/theme.i18n.json create mode 100644 i18n/hun/src/vs/workbench/electron-browser/actions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/electron-browser/commands.i18n.json create mode 100644 i18n/hun/src/vs/workbench/electron-browser/extensionHost.i18n.json create mode 100644 i18n/hun/src/vs/workbench/electron-browser/main.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/electron-browser/main.i18n.json create mode 100644 i18n/hun/src/vs/workbench/electron-browser/shell.i18n.json create mode 100644 i18n/hun/src/vs/workbench/electron-browser/window.i18n.json create mode 100644 i18n/hun/src/vs/workbench/electron-browser/workbench.i18n.json create mode 100644 i18n/hun/src/vs/workbench/node/extensionHostMain.i18n.json create mode 100644 i18n/hun/src/vs/workbench/node/extensionPoints.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/browser/debugActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/common/debug.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/common/debugModel.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/common/debugSource.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/browser/fileActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/browser/fileCommands.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/browser/files.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/html/browser/html.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/html/browser/webview.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/markers/common/messages.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/output/browser/output.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/output/browser/outputActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/output/browser/outputPanel.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/output/common/output.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/search/browser/replaceService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/search/browser/search.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/search/browser/searchActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/search/browser/searchWidget.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/update/electron-browser/update.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/views/browser/views.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json create mode 100644 i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/editor/browser/editorService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/files/electron-browser/fileService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/files/node/fileService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/message/browser/messageList.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/message/electron-browser/messageService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/progress/browser/progressService2.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/textfile/common/textFileService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json create mode 100644 i18n/hun/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json create mode 100644 i18n/ita/src/vs/base/common/keybindingLabels.i18n.json create mode 100644 i18n/ita/src/vs/platform/history/electron-main/historyMainService.i18n.json create mode 100644 i18n/ita/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/views/browser/views.i18n.json create mode 100644 i18n/ita/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json create mode 100644 i18n/ita/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json create mode 100644 i18n/ita/src/vs/workbench/services/progress/browser/progressService2.i18n.json create mode 100644 i18n/jpn/src/vs/base/common/keybindingLabels.i18n.json create mode 100644 i18n/jpn/src/vs/platform/history/electron-main/historyMainService.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/views/browser/views.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json create mode 100644 i18n/jpn/src/vs/workbench/services/progress/browser/progressService2.i18n.json create mode 100644 i18n/kor/src/vs/base/common/keybindingLabels.i18n.json create mode 100644 i18n/kor/src/vs/platform/history/electron-main/historyMainService.i18n.json create mode 100644 i18n/kor/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/views/browser/views.i18n.json create mode 100644 i18n/kor/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json create mode 100644 i18n/kor/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json create mode 100644 i18n/kor/src/vs/workbench/services/progress/browser/progressService2.i18n.json create mode 100644 i18n/ptb/src/vs/base/common/keybindingLabels.i18n.json create mode 100644 i18n/ptb/src/vs/platform/history/electron-main/historyMainService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/views/browser/views.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json create mode 100644 i18n/ptb/src/vs/workbench/services/progress/browser/progressService2.i18n.json create mode 100644 i18n/rus/src/vs/base/common/keybindingLabels.i18n.json create mode 100644 i18n/rus/src/vs/platform/history/electron-main/historyMainService.i18n.json create mode 100644 i18n/rus/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/views/browser/views.i18n.json create mode 100644 i18n/rus/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json create mode 100644 i18n/rus/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json create mode 100644 i18n/rus/src/vs/workbench/services/progress/browser/progressService2.i18n.json create mode 100644 i18n/trk/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json create mode 100644 i18n/trk/extensions/css/client/out/cssMain.i18n.json create mode 100644 i18n/trk/extensions/css/package.i18n.json create mode 100644 i18n/trk/extensions/extension-editing/out/packageDocumentHelper.i18n.json create mode 100644 i18n/trk/extensions/git/out/askpass-main.i18n.json create mode 100644 i18n/trk/extensions/git/out/commands.i18n.json create mode 100644 i18n/trk/extensions/git/out/main.i18n.json create mode 100644 i18n/trk/extensions/git/out/model.i18n.json create mode 100644 i18n/trk/extensions/git/out/scmProvider.i18n.json create mode 100644 i18n/trk/extensions/git/out/statusbar.i18n.json create mode 100644 i18n/trk/extensions/git/package.i18n.json create mode 100644 i18n/trk/extensions/grunt/out/main.i18n.json create mode 100644 i18n/trk/extensions/grunt/package.i18n.json create mode 100644 i18n/trk/extensions/gulp/out/main.i18n.json create mode 100644 i18n/trk/extensions/gulp/package.i18n.json create mode 100644 i18n/trk/extensions/html/client/out/htmlMain.i18n.json create mode 100644 i18n/trk/extensions/html/package.i18n.json create mode 100644 i18n/trk/extensions/jake/out/main.i18n.json create mode 100644 i18n/trk/extensions/jake/package.i18n.json create mode 100644 i18n/trk/extensions/javascript/out/features/bowerJSONContribution.i18n.json create mode 100644 i18n/trk/extensions/javascript/out/features/packageJSONContribution.i18n.json create mode 100644 i18n/trk/extensions/json/client/out/jsonMain.i18n.json create mode 100644 i18n/trk/extensions/json/package.i18n.json create mode 100644 i18n/trk/extensions/markdown/out/extension.i18n.json create mode 100644 i18n/trk/extensions/markdown/out/previewContentProvider.i18n.json create mode 100644 i18n/trk/extensions/markdown/out/security.i18n.json create mode 100644 i18n/trk/extensions/markdown/package.i18n.json create mode 100644 i18n/trk/extensions/merge-conflict/out/codelensProvider.i18n.json create mode 100644 i18n/trk/extensions/merge-conflict/out/commandHandler.i18n.json create mode 100644 i18n/trk/extensions/merge-conflict/out/mergeDecorator.i18n.json create mode 100644 i18n/trk/extensions/merge-conflict/package.i18n.json create mode 100644 i18n/trk/extensions/npm/package.i18n.json create mode 100644 i18n/trk/extensions/php/out/features/validationProvider.i18n.json create mode 100644 i18n/trk/extensions/php/package.i18n.json create mode 100644 i18n/trk/extensions/typescript/out/features/bufferSyncSupport.i18n.json create mode 100644 i18n/trk/extensions/typescript/out/features/completionItemProvider.i18n.json create mode 100644 i18n/trk/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json create mode 100644 i18n/trk/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json create mode 100644 i18n/trk/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json create mode 100644 i18n/trk/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json create mode 100644 i18n/trk/extensions/typescript/out/typescriptMain.i18n.json create mode 100644 i18n/trk/extensions/typescript/out/typescriptServiceClient.i18n.json create mode 100644 i18n/trk/extensions/typescript/out/utils/logger.i18n.json create mode 100644 i18n/trk/extensions/typescript/out/utils/projectStatus.i18n.json create mode 100644 i18n/trk/extensions/typescript/out/utils/typingsStatus.i18n.json create mode 100644 i18n/trk/extensions/typescript/package.i18n.json create mode 100644 i18n/trk/src/vs/base/browser/ui/actionbar/actionbar.i18n.json create mode 100644 i18n/trk/src/vs/base/browser/ui/aria/aria.i18n.json create mode 100644 i18n/trk/src/vs/base/browser/ui/findinput/findInput.i18n.json create mode 100644 i18n/trk/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json create mode 100644 i18n/trk/src/vs/base/browser/ui/inputbox/inputBox.i18n.json create mode 100644 i18n/trk/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json create mode 100644 i18n/trk/src/vs/base/browser/ui/toolbar/toolbar.i18n.json create mode 100644 i18n/trk/src/vs/base/common/errorMessage.i18n.json create mode 100644 i18n/trk/src/vs/base/common/jsonErrorMessages.i18n.json create mode 100644 i18n/trk/src/vs/base/common/keybindingLabels.i18n.json create mode 100644 i18n/trk/src/vs/base/common/processes.i18n.json create mode 100644 i18n/trk/src/vs/base/common/severity.i18n.json create mode 100644 i18n/trk/src/vs/base/node/processes.i18n.json create mode 100644 i18n/trk/src/vs/base/node/zip.i18n.json create mode 100644 i18n/trk/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json create mode 100644 i18n/trk/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json create mode 100644 i18n/trk/src/vs/base/parts/tree/browser/treeDefaults.i18n.json create mode 100644 i18n/trk/src/vs/code/electron-main/menus.i18n.json create mode 100644 i18n/trk/src/vs/code/electron-main/window.i18n.json create mode 100644 i18n/trk/src/vs/code/electron-main/windows.i18n.json create mode 100644 i18n/trk/src/vs/code/node/cliProcessMain.i18n.json create mode 100644 i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json create mode 100644 i18n/trk/src/vs/editor/common/config/editorOptions.i18n.json create mode 100644 i18n/trk/src/vs/editor/common/controller/cursor.i18n.json create mode 100644 i18n/trk/src/vs/editor/common/model/textModelWithTokens.i18n.json create mode 100644 i18n/trk/src/vs/editor/common/modes/modesRegistry.i18n.json create mode 100644 i18n/trk/src/vs/editor/common/services/bulkEdit.i18n.json create mode 100644 i18n/trk/src/vs/editor/common/services/modeServiceImpl.i18n.json create mode 100644 i18n/trk/src/vs/editor/common/services/modelServiceImpl.i18n.json create mode 100644 i18n/trk/src/vs/editor/common/view/editorColorRegistry.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/comment/common/comment.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/find/browser/findWidget.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/find/common/findController.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/folding/browser/folding.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/format/browser/formatActions.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/hover/browser/hover.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/indentation/common/indentation.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/links/browser/links.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/rename/browser/rename.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json create mode 100644 i18n/trk/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json create mode 100644 i18n/trk/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json create mode 100644 i18n/trk/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json create mode 100644 i18n/trk/src/vs/editor/node/textMate/TMGrammars.i18n.json create mode 100644 i18n/trk/src/vs/platform/actions/browser/menuItemActionItem.i18n.json create mode 100644 i18n/trk/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json create mode 100644 i18n/trk/src/vs/platform/configuration/common/configurationRegistry.i18n.json create mode 100644 i18n/trk/src/vs/platform/environment/node/argv.i18n.json create mode 100644 i18n/trk/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json create mode 100644 i18n/trk/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json create mode 100644 i18n/trk/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json create mode 100644 i18n/trk/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json create mode 100644 i18n/trk/src/vs/platform/extensions/common/abstractExtensionService.i18n.json create mode 100644 i18n/trk/src/vs/platform/extensions/common/extensionsRegistry.i18n.json create mode 100644 i18n/trk/src/vs/platform/extensions/node/extensionValidator.i18n.json create mode 100644 i18n/trk/src/vs/platform/history/electron-main/historyMainService.i18n.json create mode 100644 i18n/trk/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json create mode 100644 i18n/trk/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json create mode 100644 i18n/trk/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json create mode 100644 i18n/trk/src/vs/platform/markers/common/problemMatcher.i18n.json create mode 100644 i18n/trk/src/vs/platform/message/common/message.i18n.json create mode 100644 i18n/trk/src/vs/platform/request/node/request.i18n.json create mode 100644 i18n/trk/src/vs/platform/telemetry/common/telemetryService.i18n.json create mode 100644 i18n/trk/src/vs/platform/theme/common/colorRegistry.i18n.json create mode 100644 i18n/trk/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/api/node/extHostDiagnostics.i18n.json create mode 100644 i18n/trk/src/vs/workbench/api/node/extHostTask.i18n.json create mode 100644 i18n/trk/src/vs/workbench/api/node/extHostTreeViews.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/actions/configureLocale.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/actions/fileActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/actions/toggleZenMode.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/compositePart.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/editor/editorActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/editor/editorPart.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/editor/textEditor.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/editor/titleControl.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/panel/panelActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/panel/panelPart.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/quickopen.i18n.json create mode 100644 i18n/trk/src/vs/workbench/browser/viewlet.i18n.json create mode 100644 i18n/trk/src/vs/workbench/common/theme.i18n.json create mode 100644 i18n/trk/src/vs/workbench/electron-browser/actions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/electron-browser/commands.i18n.json create mode 100644 i18n/trk/src/vs/workbench/electron-browser/extensionHost.i18n.json create mode 100644 i18n/trk/src/vs/workbench/electron-browser/main.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/electron-browser/main.i18n.json create mode 100644 i18n/trk/src/vs/workbench/electron-browser/shell.i18n.json create mode 100644 i18n/trk/src/vs/workbench/electron-browser/window.i18n.json create mode 100644 i18n/trk/src/vs/workbench/electron-browser/workbench.i18n.json create mode 100644 i18n/trk/src/vs/workbench/node/extensionHostMain.i18n.json create mode 100644 i18n/trk/src/vs/workbench/node/extensionPoints.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/browser/debugActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/common/debug.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/common/debugModel.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/common/debugSource.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/browser/fileActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/browser/fileCommands.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/browser/files.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/html/browser/html.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/html/browser/webview.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/markers/common/messages.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/output/browser/output.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/output/browser/outputActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/output/browser/outputPanel.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/output/common/output.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/search/browser/replaceService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/search/browser/search.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/search/browser/searchActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/search/browser/searchWidget.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/update/electron-browser/update.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/views/browser/views.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json create mode 100644 i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/editor/browser/editorService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/files/electron-browser/fileService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/files/node/fileService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/message/browser/messageList.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/message/electron-browser/messageService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/progress/browser/progressService2.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/textfile/common/textFileService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json create mode 100644 i18n/trk/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json diff --git a/build/win32/i18n/messages.hu.isl b/build/win32/i18n/messages.hu.isl new file mode 100644 index 0000000000000..120bf8fc27b8e --- /dev/null +++ b/build/win32/i18n/messages.hu.isl @@ -0,0 +1,8 @@ +[CustomMessages] +AddContextMenuFiles="Megnyit�s a k�vetkez�vel: %1" parancs hozz�ad�sa a f�jlok helyi men�j�hez a Windows Int�z�ben +AddContextMenuFolders="Megnyit�s a k�vetkez�vel: %1" parancs hozz�ad�sa a mapp�k helyi men�j�hez a Windows Int�z�ben +AssociateWithFiles=%1 regisztr�l�sa szerkeszt�k�nt a t�mogatott f�jlt�pusokhoz +AddToPath=Hozz�ad�s a PATH-hoz (�jraind�t�s ut�n lesz el�rhet�) +RunAfter=%1 ind�t�sa a telep�t�s ut�n +Other=Egy�b: +SourceFile=%1 forr�sf�jl \ No newline at end of file diff --git a/build/win32/i18n/messages.tr.isl b/build/win32/i18n/messages.tr.isl new file mode 100644 index 0000000000000..4e8e7bbd19b44 --- /dev/null +++ b/build/win32/i18n/messages.tr.isl @@ -0,0 +1,8 @@ +[CustomMessages] +AddContextMenuFiles=Windows Gezgini ba�lam men�s�ne "%1 �le A�" eylemini ekle +AddContextMenuFolders=Windows Gezgini dizin ba�lam men�s�ne "%1 �le A�" eylemini ekle +AssociateWithFiles=%1 uygulamas�n� desteklenen dosya t�rleri i�in bir d�zenleyici olarak kay�t et +AddToPath=PATH'e ekle (yeniden ba�latt�ktan sonra kullan�labilir) +RunAfter=Kurulumdan sonra %1 uygulamas�n� �al��t�r. +Other=Di�er: +SourceFile=%1 Kaynak Dosyas� \ No newline at end of file diff --git a/i18n/chs/extensions/git/package.i18n.json b/i18n/chs/extensions/git/package.i18n.json index 9c65f275fd6e4..996b8a4173c67 100644 --- a/i18n/chs/extensions/git/package.i18n.json +++ b/i18n/chs/extensions/git/package.i18n.json @@ -32,7 +32,7 @@ "command.push": "推送", "command.pushTo": "推送到...", "command.sync": "同步", - "command.publish": "发布", + "command.publish": "发布分支", "command.showOutput": "显示 GIT 输出", "config.enabled": "是否已启用 GIT", "config.path": "Git 可执行文件路径", diff --git a/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json index 8b6ad71cd4e6d..91a343efd7d87 100644 --- a/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/chs/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "acceptCurrentChange": "采用当前更改", + "acceptIncomingChange": "采用传入的更改", + "acceptBothChanges": "保留双方更改", + "compareChanges": "比较变更" +} \ No newline at end of file diff --git a/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json index b6f2dae32e960..836475b99dc33 100644 --- a/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/chs/extensions/merge-conflict/out/commandHandler.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "cursorNotInConflict": "编辑器光标不在合并冲突内", + "compareChangesTitle": "{0}:当前更改 ⟷ 传入的更改", + "cursorOnCommonAncestorsRange": "编辑器光标在共同来源块上,请将其移动至“当前”或“传入”区域中", "cursorOnSplitterRange": "编辑器光标在合并冲突分割线上,请将其移动至“当前”或“传入”区域中", "noConflicts": "没有在此文件中找到合并冲突", "noOtherConflictsInThisFile": "此文件中没有其他合并冲突了" diff --git a/i18n/chs/extensions/merge-conflict/package.i18n.json b/i18n/chs/extensions/merge-conflict/package.i18n.json index 7ed47cfef74aa..ae0c9b4170490 100644 --- a/i18n/chs/extensions/merge-conflict/package.i18n.json +++ b/i18n/chs/extensions/merge-conflict/package.i18n.json @@ -5,7 +5,15 @@ // Do not edit this file. It is machine generated. { "command.category": "合并冲突", + "command.accept.all-incoming": "全部采用传入版本", + "command.accept.all-both": "全部保留两者", + "command.accept.current": "采用当前内容", + "command.accept.incoming": "采用传入内容", + "command.accept.selection": "采用选中版本", "command.accept.both": "保留两者", + "command.next": "下一个冲突", + "command.previous": "上一个冲突", + "command.compare": "比较当前冲突", "config.title": "合并冲突", "config.codeLensEnabled": "启用/禁用编辑器内合并冲突区域的 CodeLens", "config.decoratorsEnabled": "启用/禁用编辑器内的合并冲突修饰器" diff --git a/i18n/chs/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/chs/extensions/typescript/out/features/bufferSyncSupport.i18n.json index 9dcaf692d8f98..2b32badbce55a 100644 --- a/i18n/chs/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/chs/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "版本不匹配! 全局 tsc ({0}) != VS Code 的语言服务({1})。可能出现不一致的编译错误", + "versionMismatch": "正在使用 TypeScript ({1}) 实现的编辑器功能。TypeScript ({0}) 已经全局安装在你的电脑上。VS Code 中发生的错误可能会与 TCS 中不同", "moreInformation": "详细信息", "doNotCheckAgain": "不再检查", "close": "关闭", diff --git a/i18n/chs/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/chs/extensions/typescript/out/utils/projectStatus.i18n.json index 801a0e687c6ba..cd5d5f3a2ff01 100644 --- a/i18n/chs/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/chs/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "若要启用项目范围内的 JavaScript/TypeScript 语言功能,请排除包含多个文件的文件夹,例如: {0}", "hintExclude.generic": "若要启用项目范围内的 JavaScript/TypeScript 语言功能,请排除包含不需要处理的源文件的大型文件夹。", - "open": "配置排除", "large.label": "配置排除", "hintExclude.tooltip": "若要启用项目范围内的 JavaScript/TypeScript 语言功能,请排除包含不需要处理的源文件的大型文件夹。" } \ No newline at end of file diff --git a/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json index f6ee369cc4082..276914045d0be 100644 --- a/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/chs/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "提取数据以实现更好的 TypeScript IntelliSense", + "typesInstallerInitializationFailed.title": "无法为 JavaScript 语言功能安装 typings 文件。请确认 NPM 已经安装或者在你的用户设置中配置“typescript.npm”", "typesInstallerInitializationFailed.moreInformation": "详细信息", "typesInstallerInitializationFailed.doNotCheckAgain": "不要再次检查", "typesInstallerInitializationFailed.close": "关闭" diff --git a/i18n/chs/extensions/typescript/package.i18n.json b/i18n/chs/extensions/typescript/package.i18n.json index e5267352ece10..8f30f33dedaf0 100644 --- a/i18n/chs/extensions/typescript/package.i18n.json +++ b/i18n/chs/extensions/typescript/package.i18n.json @@ -13,11 +13,11 @@ "typescript.check.tscVersion": "检查全局安装的 TypeScript 编译器(例如 tsc )是否不同于使用的 TypeScript 语言服务。", "typescript.tsserver.log": "将 TS 服务器的日志保存到一个文件。此日志可用于诊断 TS 服务器问题。日志可能包含你的项目中的文件路径、源代码和其他可能敏感的信息。", "typescript.tsserver.trace": "对发送到 TS 服务器的消息启用跟踪。此跟踪信息可用于诊断 TS 服务器问题。 跟踪信息可能包含你的项目中的文件路径、源代码和其他可能敏感的信息。", - "typescript.tsserver.experimentalAutoBuild": "启用实验性自动生成。要求安装 1.9 dev 或 2.x tsserver 版本并在更改后重启 VS Code。", "typescript.validate.enable": "启用/禁用 TypeScript 验证。", "typescript.format.enable": "启用/禁用默认 TypeScript 格式化程序。", "javascript.format.enable": "启用/禁用 JavaScript 格式化程序。", "format.insertSpaceAfterCommaDelimiter": "定义逗号分隔符后面的空格处理。", + "format.insertSpaceAfterConstructor": "定义构造器关键字后的空格处理。要求 TypeScript >= 2.3.0。", "format.insertSpaceAfterSemicolonInForStatements": "在 For 语句中,定义分号后面的空格处理。", "format.insertSpaceBeforeAndAfterBinaryOperators": "定义二进制运算符后面的空格处理", "format.insertSpaceAfterKeywordsInControlFlowStatements": "定义控制流语句中关键字后面的空格处理。", @@ -41,6 +41,8 @@ "typescript.selectTypeScriptVersion.title": "选择 TypeScript 版本", "jsDocCompletion.enabled": "启用/禁用自动 JSDoc 注释", "javascript.implicitProjectConfig.checkJs": "启用/禁用 JavaScript 文件的语义检查。现有的 jsconfig.json 或\n tsconfig.json 文件会覆盖此设置。要求 TypeScript >=2.3.1。", + "typescript.npm": "指定用于自动获取类型的 NPM 可执行文件的路径。要求 TypeScript >= 2.3.4。", + "typescript.check.npmIsInstalled": "检查是否安装了 NPM 以自动获取类型。", "javascript.nameSuggestions": "启用/禁用在 JavaScript 建议列表中包含文件中的唯一名称。", "typescript.tsc.autoDetect": "控制自动检测 tsc 任务是否打开。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/base/common/errorMessage.i18n.json b/i18n/chs/src/vs/base/common/errorMessage.i18n.json index 8dd95907e5163..8e1a689b214be 100644 --- a/i18n/chs/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/chs/src/vs/base/common/errorMessage.i18n.json @@ -13,6 +13,5 @@ "error.connection.unknown": "出现未知连接错误。您的 Internet 连接已断开,或者您连接的服务器已脱机。", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "出现未知错误。有关详细信息,请参阅日志。", - "nodeExceptionMessage": "发生了系统错误({0})", "error.moreErrors": "{0} 个(共 {1} 个错误)" } \ No newline at end of file diff --git a/i18n/chs/src/vs/base/common/keybindingLabels.i18n.json b/i18n/chs/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/code/electron-main/menus.i18n.json b/i18n/chs/src/vs/code/electron-main/menus.i18n.json index 10d2dd072d7de..8e60bd1b82aa0 100644 --- a/i18n/chs/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/chs/src/vs/code/electron-main/menus.i18n.json @@ -12,6 +12,7 @@ "mDebug": "调试(&&D)", "mWindow": "窗口", "mHelp": "帮助(&&H)", + "mTask": "任务(&&T)", "miNewWindow": "新建窗口(&&W)", "mAbout": "关于 {0}", "mServices": "服务", @@ -41,6 +42,7 @@ "miSelectIconTheme": "文件图标主题(&&I)", "miPreferences": "首选项(&&P)", "miReopenClosedEditor": "重新打开已关闭的编辑器(&&R)", + "miMore": "更多(&&M)...", "miClearRecentOpen": "清除最近使用的文件(&&C)", "miUndo": "撤消(&&U)", "miRedo": "恢复(&&R)", @@ -55,6 +57,9 @@ "miShowEmmetCommands": "Emmet(&&M)...", "miToggleLineComment": "切换行注释(&&T)", "miToggleBlockComment": "切换块注释(&&B)", + "miMultiCursorAlt": "使用Alt+单击进行多光标功能", + "miMultiCursorCmd": "使用Cmd+单击进行多光标功能", + "miMultiCursorCtrl": "使用Ctrl+单击进行多光标功能", "miInsertCursorAbove": "在上面添加光标(&&A)", "miInsertCursorBelow": "在下面添加光标(&&D)", "miInsertCursorAtEndOfEachLineSelected": "在行尾添加光标(&&U)", @@ -102,7 +107,7 @@ "miForward": "前进(&&F)", "miNextEditor": "下一个编辑器(&&N)", "miPreviousEditor": "上一个编辑器(&&P)", - "miNextEditorInGroup": "组中上一个使用过的编辑器(&&P)", + "miNextEditorInGroup": "组中下一个使用过的编辑器(&&N)", "miPreviousEditorInGroup": "组中上一个使用过的编辑器(&&P)", "miSwitchEditor": "切换编辑器(&&E)", "miFocusFirstGroup": "第一组(&&F)", @@ -133,12 +138,14 @@ "miColumnBreakpoint": "列断点(&&O)", "miFunctionBreakpoint": "函数断点(&&F)...", "miNewBreakpoint": "新建断点(&&N)", + "miEnableAllBreakpoints": "启用所有断点", "miDisableAllBreakpoints": "禁用所有断点(&&L)", "miRemoveAllBreakpoints": "删除所有断点(&&R)", "miInstallAdditionalDebuggers": "安装其他调试器(&&I)...", "mMinimize": "最小化", - "mClose": "关闭", + "mZoom": "缩放", "mBringToFront": "全部置于顶层", + "miSwitchWindow": "切换窗口(&&W)...", "miToggleDevTools": "切换开发人员工具(&&T)", "miAccessibilityOptions": "辅助功能选项(&&O)", "miReportIssues": "报告问题(&&I)", @@ -153,12 +160,19 @@ "miLicense": "查看许可证(&&L)", "miPrivacyStatement": "隐私声明(&&P)", "miAbout": "关于(&&A)", + "miRunTask": "运行任务(&&R)...", + "miRestartTask": "重启任务(&&E)", + "miTerminateTask": "终止任务(&&T)", + "miBuildTask": "生成任务(&&B)", + "miTestTask": "测试任务(&&A)", + "miShowTaskLog": "显示任务日志(&&S)", "accessibilityOptionsWindowTitle": "辅助功能选项", "miRestartToUpdate": "重启以更新...", "miCheckingForUpdates": "正在检查更新...", "miDownloadUpdate": "下载可用更新", "miDownloadingUpdate": "正在下载更新...", "miInstallingUpdate": "正在安装更新...", + "miCheckForUpdates": "检查更新...", "aboutDetail": "\n版本 {0}\n提交 {1}\n日期 {2}\nShell {3}\n渲染器 {4}\nNode {5}", "okButton": "确定" } \ No newline at end of file diff --git a/i18n/chs/src/vs/code/electron-main/windows.i18n.json b/i18n/chs/src/vs/code/electron-main/windows.i18n.json index 55246096dd2d0..c07ddb7e29d2d 100644 --- a/i18n/chs/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/chs/src/vs/code/electron-main/windows.i18n.json @@ -13,9 +13,5 @@ "appStalled": "窗口不再响应", "appStalledDetail": "可以重新打开或关闭窗,或者保持等待。", "appCrashed": "窗口出现故障", - "appCrashedDetail": "我们对此引起的不便表示抱歉! 请重启该窗口从上次停止的位置继续。", - "newWindow": "新建窗口", - "newWindowDesc": "打开一个新窗口", - "recentFolders": "最近的文件夹", - "folderDesc": "{0} {1}" + "appCrashedDetail": "我们对此引起的不便表示抱歉! 请重启该窗口从上次停止的位置继续。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json index 9943fbbaa8ac5..ec542efe0a076 100644 --- a/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/chs/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -33,12 +33,15 @@ "wordWrapColumn": "在 \"editor.wordWrap\" 为 \"wordWrapColumn\" 或 \"bounded\" 时控制编辑器列的换行。", "wrappingIndent": "控制折行的缩进。可以是“none”、“same”或“indent”。", "mouseWheelScrollSensitivity": "要对鼠标滚轮滚动事件的 \"deltaX\" 和 \"deltaY\" 使用的乘数 ", + "multiCursorModifier.ctrlCmd": "映射到“Control”(Windows 和 Linux)或“Command”(OSX)。", + "multiCursorModifier.alt": "映射到“Alt”(Windows 和 Linux)或“Option”(OSX)。", + "multiCursorModifier": "用鼠标添加多个光标时使用的修改键。“ctrlCmd”映射为“Control”(Windows 和 Linux)或“Command”(OSX)。“转到定义”和“打开链接”功能的鼠标手势将会相应调整,不与多光标修改键冲突。", "quickSuggestions.strings": "在字符串内启用快速建议。", "quickSuggestions.comments": "在注释内启用快速建议。", "quickSuggestions.other": "在字符串和注释外启用快速建议。", "quickSuggestions": "控制键入时是否应自动显示建议", "quickSuggestionsDelay": "控制延迟多少毫秒后将显示快速建议", - "parameterHints": "启用参数提示", + "parameterHints": "启用在输入时显示含有参数文档和类型信息的小面板", "autoClosingBrackets": "控制编辑器是否应该在左括号后自动插入右括号", "formatOnType": "控制编辑器是否应在键入后自动设置行的格式", "formatOnPaste": "控制编辑器是否应自动设置粘贴内容的格式。格式化程序必须可用并且能设置文档中某一范围的格式。", @@ -72,6 +75,10 @@ "trimAutoWhitespace": "删除尾随自动插入的空格", "stablePeek": "即使在双击编辑器内容或按 Esc 键时,也要保持速览编辑器的打开状态。", "dragAndDrop": "控制编辑器是否应该允许通过拖放移动所选项。", + "accessibilitySupport.auto": "编辑器将使用平台 API 以检测是否附加了屏幕阅读器。", + "accessibilitySupport.on": "编辑器将对屏幕阅读器的使用进行永久优化。", + "accessibilitySupport.off": "编辑器将不再对屏幕阅读器的使用进行优化。", + "accessibilitySupport": "控制编辑器是否应运行在对屏幕阅读器进行优化的模式。", "sideBySide": "控制 Diff 编辑器以并排或内联形式显示差异", "ignoreTrimWhitespace": "控制差异编辑器是否将对前导空格或尾随空格的更改显示为差异", "renderIndicators": "控制差异编辑器是否为已添加/删除的更改显示 +/- 指示符号", diff --git a/i18n/chs/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/chs/src/vs/editor/common/config/editorOptions.i18n.json index 9d5691d3e42a4..fa32e6dd25278 100644 --- a/i18n/chs/src/vs/editor/common/config/editorOptions.i18n.json +++ b/i18n/chs/src/vs/editor/common/config/editorOptions.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "accessibilityOffAriaLabel": "现在无法访问编辑器。按 Alt+F1 显示选项。", "editorViewAccessibleLabel": "编辑器内容" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/chs/src/vs/editor/contrib/find/common/findController.i18n.json index 0ae6f9d406d90..1125fe32bcd65 100644 --- a/i18n/chs/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,5 @@ "addSelectionToPreviousFindMatch": "将选择内容添加到上一查找匹配项", "moveSelectionToNextFindMatch": "将上次选择移动到下一个查找匹配项", "moveSelectionToPreviousFindMatch": "将上个选择内容移动到上一查找匹配项", - "selectAllOccurencesOfFindMatch": "选择所有找到的查找匹配项", "changeAll.label": "更改所有匹配项" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/chs/src/vs/editor/contrib/format/browser/formatActions.i18n.json index e1cac08643457..7a87ba778044c 100644 --- a/i18n/chs/src/vs/editor/contrib/format/browser/formatActions.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "hint11": "在第 {0} 行作出1 次格式编辑", + "hint11": "在第 {0} 行进行了 1 次格式编辑", "hintn1": "在第 {1} 行进行了 {0} 次格式编辑", "hint1n": "第 {0} 行到第 {1} 行间进行了 1 次格式编辑", - "hintnn": "Made {0} formatting edits between lines {1} and {2}", - "formatDocument.label": "Format Document", + "hintnn": "第 {1} 行到第 {2} 行间进行了 {0} 次格式编辑", + "formatDocument.label": "格式化文件", "formatSelection.label": "格式化选定代码" } \ No newline at end of file diff --git a/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 26bf7a51ac5af..710eeeefcfc87 100644 --- a/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/chs/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "aria.oneReference": "在文件 {0} 的 {1} 行 {2} 列的符号", - "aria.fileReferences.1": "{0} 中有 1 个符号", - "aria.fileReferences.N": "{1} 中有 {0} 个符号", + "aria.fileReferences.1": "{0} 中有 1 个符号,完整路径:{1}", + "aria.fileReferences.N": "{1} 中有 {0} 个符号,完整路径:{2}", "aria.result.0": "未找到结果", "aria.result.1": "在 {0} 中找到 1 个符号", "aria.result.n1": "在 {1} 中找到 {0} 个符号", diff --git a/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 806db0f074865..2e644c790f621 100644 --- a/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/chs/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -21,6 +21,8 @@ "menus.scmTitle": "源代码管理标题菜单", "menus.resourceGroupContext": "源代码管理资源组上下文菜单", "menus.resourceStateContext": "源代码管理资源状态上下文菜单", + "view.viewTitle": "提供的视图的标题菜单", + "view.itemContext": "提供的视图中的项目的上下文菜单", "nonempty": "应为非空值。", "opticon": "可以省略属性“图标”或者它必须是一个字符串或类似“{dark, light}”的文本", "requireStringOrObject": "属性“{0}”为必需且其类型必须为“字符串”或“对象”", diff --git a/i18n/chs/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/chs/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 2c8ade8f369fe..feafccf34519c 100644 --- a/i18n/chs/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/chs/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "由此包表示的 VS Code 扩展的所有贡献。", "vscode.extension.preview": "在 Marketplace 中设置扩展,将其标记为“预览”。", "vscode.extension.activationEvents": "VS Code 扩展的激活事件。", + "vscode.extension.activationEvents.onLanguage": "在打开被解析为指定语言的文件时发出的激活事件。", + "vscode.extension.activationEvents.onCommand": "在调用指定命令时发出的激活事件。", + "vscode.extension.activationEvents.onDebug": "在指定类型的调试会话开始时发出的激活事件。", + "vscode.extension.activationEvents.workspaceContains": "在打开至少包含一个匹配指定 glob 模式的文件的文件夹时发出的激活事件。", + "vscode.extension.activationEvents.onView": "在指定视图被展开时发出的激活事件。", + "vscode.extension.activationEvents.star": "在 VS Code 启动时发出的激活事件。为确保良好的最终用户体验,请仅在其他激活事件组合不适用于你的情况时,才在扩展中使用此事件。", "vscode.extension.badges": "在 Marketplace 的扩展页边栏中显示的徽章数组。", "vscode.extension.badges.url": "徽章图像 URL。", "vscode.extension.badges.href": "徽章链接。", diff --git a/i18n/chs/src/vs/platform/extensions/node/extensionValidator.i18n.json b/i18n/chs/src/vs/platform/extensions/node/extensionValidator.i18n.json index 58daf0e1a2441..73890b4a095af 100644 --- a/i18n/chs/src/vs/platform/extensions/node/extensionValidator.i18n.json +++ b/i18n/chs/src/vs/platform/extensions/node/extensionValidator.i18n.json @@ -9,15 +9,15 @@ "versionSpecificity2": "\"engines.vscode\" ({0}) 中指定的版本不够具体。对于 1.0.0 之后的 vscode 版本,请至少定义主要想要的版本。例如: ^1.10.0、1.10.x、1.x.x、2.x.x 等。", "versionMismatch": "扩展与 Code {0} 不兼容。扩展需要: {1}。", "extensionDescription.empty": "已获得空扩展说明", - "extensionDescription.publisher": "属性“{0}”是必需的,其类型必须是“字符串”", - "extensionDescription.name": "属性“{0}”是必需的,其类型必须是“字符串”", - "extensionDescription.version": "属性“{0}”是必需的,其类型必须是“字符串”", - "extensionDescription.engines": "属性“{0}”为必需且其类型必须为 \"object\"", - "extensionDescription.engines.vscode": "属性“{0}”是必需的,其类型必须是“字符串”", - "extensionDescription.extensionDependencies": "属性“{0}”可以省略或其类型必须是 \"string[]\"", - "extensionDescription.activationEvents1": "属性“{0}”可以省略或其类型必须是 \"string[]\"", + "extensionDescription.publisher": "属性“{0}”是必要属性,其类型必须是 \"string\"", + "extensionDescription.name": "属性“{0}”是必要属性,其类型必须是 \"string\"", + "extensionDescription.version": "属性“{0}”是必要属性,其类型必须是 \"string\"", + "extensionDescription.engines": "属性“{0}”是必要属性,其类型必须是 \"object\"", + "extensionDescription.engines.vscode": "属性“{0}”是必要属性,其类型必须是 \"string\"", + "extensionDescription.extensionDependencies": "属性“{0}”可以省略,否则其类型必须是 \"string[]\"", + "extensionDescription.activationEvents1": "属性“{0}”可以省略,否则其类型必须是 \"string[]\"", "extensionDescription.activationEvents2": "必须同时指定或同时省略属性”{0}“和”{1}“", - "extensionDescription.main1": "属性“{0}”可以省略,或者其类型必须是“字符串”", + "extensionDescription.main1": "属性“{0}”可以省略,否则其类型必须是 \"string\"", "extensionDescription.main2": "应在扩展文件夹({1})中包含 \"main\" ({0})。这可能会使扩展不可移植。", "extensionDescription.main3": "必须同时指定或同时省略属性”{0}“和”{1}“", "notSemver": "扩展版本与 semver 不兼容。" diff --git a/i18n/chs/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/chs/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..61b499c3553c1 --- /dev/null +++ b/i18n/chs/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "新建窗口", + "newWindowDesc": "打开一个新窗口", + "recentFolders": "最近的文件夹", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json index b9fc2ddbbdea4..53f5b8e472afe 100644 --- a/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/chs/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -29,7 +29,7 @@ "ProblemMatcherParser.noOwner": "错误: 描述未定义所有者:\n{0}\n", "ProblemMatcherParser.noFileLocation": "错误: 描述未定义文件位置:\n{0}\n", "ProblemMatcherParser.unknownSeverity": "信息:未知严重性 {0}。有效值为“error”、“warning”和“info”。\n", - "ProblemMatcherParser.noDefinedPatter": "错误: 含标识符 {0} 的模式不存在。", + "ProblemMatcherParser.noDefinedPatter": "错误: 标识符为 {0} 的模式不存在。", "ProblemMatcherParser.noIdentifier": "错误: 模式属性引用空标识符。", "ProblemMatcherParser.noValidIdentifier": "错误: 模式属性 {0} 是无效的模式变量名。", "ProblemMatcherParser.problemPattern.watchingMatcher": "问题匹配程序必须定义监视的开始模式和结束模式。", diff --git a/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json index 37be20d77e940..2b6fb78afe823 100644 --- a/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/chs/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -12,7 +12,7 @@ "focusBorder": "焦点元素的整体边框颜色。此颜色仅在不被其他组件覆盖时适用。", "contrastBorder": "在元素周围额外的一层边框,用来提高对比度从而区别其他元素。", "activeContrastBorder": "在活动元素周围额外的一层边框,用来提高对比度从而区别其他元素。", - "selectionBackground": "工作台所选文本的背景颜色(例如输入字段或文本区域)。注意,本设置不适用于编辑器和终端。", + "selectionBackground": "工作台所选文本的背景颜色(例如输入字段或文本区域)。注意,本设置不适用于编辑器。", "textSeparatorForeground": "文字分隔符的颜色。", "textLinkForeground": "文本中链接的前景色。", "textLinkActiveForeground": "文本中活动链接的前景色。", @@ -60,6 +60,7 @@ "editorBackground": "编辑器背景颜色。", "editorForeground": "编辑器默认前景色。", "editorWidgetBackground": "编辑器组件(如查找/替换)背景颜色。", + "editorWidgetBorder": "编辑器小部件的边框颜色。此颜色仅在小部件有边框且不被小部件重写时适用。", "editorSelection": "编辑器所选内容的颜色。", "editorInactiveSelection": "非活动编辑器中所选内容的颜色。", "editorSelectionHighlight": "与所选内容具有相同内容的区域颜色。", @@ -68,7 +69,7 @@ "findRangeHighlight": "限制搜索的范围的颜色。", "hoverHighlight": "悬停提示显示时文本底下的高亮颜色。", "hoverBackground": "编辑器悬停提示的背景颜色。", - "hoverBorder": "编辑器软键盘边框颜色。", + "hoverBorder": "光标悬停时编辑器的边框颜色。", "activeLinkForeground": "活动链接颜色。", "diffEditorInserted": "已插入文本的背景颜色。", "diffEditorRemoved": "被删除文本的背景颜色。", @@ -78,6 +79,10 @@ "mergeCurrentContentBackground": "内联合并冲突中当前版本区域的内容背景色。", "mergeIncomingHeaderBackground": "内联合并冲突中传入的版本区域的标头背景色。", "mergeIncomingContentBackground": "内联合并冲突中传入的版本区域的内容背景色。", + "mergeCommonHeaderBackground": "内联合并冲突中共同祖先区域的标头背景色。", + "mergeCommonContentBackground": "内联合并冲突中共同祖先区域的内容背景色。", + "mergeBorder": "内联合并冲突中标头和分割线的边框颜色。", "overviewRulerCurrentContentForeground": "内联合并冲突中当前版本区域的概览标尺前景色。", - "overviewRulerIncomingContentForeground": "内联合并冲突中传入的版本区域的概览标尺前景色。" + "overviewRulerIncomingContentForeground": "内联合并冲突中传入的版本区域的概览标尺前景色。", + "overviewRulerCommonContentForeground": "内联合并冲突中共同祖先区域的概览标尺前景色。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/chs/src/vs/workbench/api/node/extHostTask.i18n.json index 8b6ad71cd4e6d..4b90a12aaf247 100644 --- a/i18n/chs/src/vs/workbench/api/node/extHostTask.i18n.json +++ b/i18n/chs/src/vs/workbench/api/node/extHostTask.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index 29e014471dace..9b17b8e657258 100644 --- a/i18n/chs/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "隐藏活动栏", - "activityBarAriaLabel": "活动视图切换器" + "activityBarAriaLabel": "活动视图切换器", + "globalActions": "全局动作" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index dc267856d02f8..bc03cc6b1af21 100644 --- a/i18n/chs/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -19,6 +19,7 @@ "closeEditorsToTheLeft": "关闭左侧编辑器", "closeEditorsToTheRight": "关闭右侧编辑器", "closeAllEditors": "关闭所有编辑器", + "closeUnmodifiedEditors": "关闭组中未作更改的编辑器", "closeEditorsInOtherGroups": "关闭其他组中的编辑器", "closeOtherEditorsInGroup": "关闭其他编辑器", "closeEditorsInGroup": "关闭组中的所有编辑器", diff --git a/i18n/chs/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 056d85f4a23af..0b7d6bc441e3b 100644 --- a/i18n/chs/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -12,6 +12,7 @@ "endOfLineCarriageReturnLineFeed": "CRLF", "tabFocusModeEnabled": "按 Tab 移动焦点", "screenReaderDetected": "检测到屏幕阅读器", + "screenReaderDetectedExtra": "如果你没有使用屏幕阅读器,请将设置中的“editor.accessibilitySupport”改为“off”。", "disableTabMode": "禁用辅助功能模式", "gotoLine": "转到行", "indentation": "缩进", diff --git a/i18n/chs/src/vs/workbench/browser/parts/editor/titleControl.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/editor/titleControl.i18n.json index 33c78c3b91123..63726f327651d 100644 --- a/i18n/chs/src/vs/workbench/browser/parts/editor/titleControl.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/parts/editor/titleControl.i18n.json @@ -8,6 +8,7 @@ "closeOthers": "关闭其他", "closeRight": "关闭到右侧", "closeAll": "全部关闭", + "closeAllUnmodified": "关闭未更改的", "keepOpen": "保持打开状态", "showOpenedEditors": "显示打开的编辑器", "araLabelEditorActions": "编辑器操作" diff --git a/i18n/chs/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/chs/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..04188ac2f7920 --- /dev/null +++ b/i18n/chs/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "转到文件...", + "quickNavigateNext": "在 Quick Open 中导航到下一个", + "quickNavigatePrevious": "在 Quick Open 中导航到上一个", + "quickSelectNext": "在 Quick Open 中选择“下一步”", + "quickSelectPrevious": "在 Quick Open 中选择“上一步”" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/browser/quickopen.i18n.json b/i18n/chs/src/vs/workbench/browser/quickopen.i18n.json index 5df82e1051da1..949f6468fc28c 100644 --- a/i18n/chs/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "没有匹配的结果", "noResultsFound2": "未找到结果", - "entryAriaLabel": "{0},命令", - "noCommands": "没有匹配的命令" + "entryAriaLabel": "{0},命令" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/browser/viewlet.i18n.json b/i18n/chs/src/vs/workbench/browser/viewlet.i18n.json index 9f0c295e5f27e..6f2dfb7174db7 100644 --- a/i18n/chs/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/chs/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "全部折叠", - "viewToolbarAriaLabel": "{0} 操作" + "collapse": "全部折叠" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/common/theme.i18n.json b/i18n/chs/src/vs/workbench/common/theme.i18n.json index e130cd7df4d77..7f9baabd3e4a5 100644 --- a/i18n/chs/src/vs/workbench/common/theme.i18n.json +++ b/i18n/chs/src/vs/workbench/common/theme.i18n.json @@ -7,12 +7,17 @@ "tabActiveBackground": "活动选项卡的背景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", "tabInactiveBackground": "非活动选项卡的背景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", "tabBorder": "用于将选项卡彼此分隔开的边框。选项卡是编辑器区域中编辑器的容器。可在一个编辑器组中打开多个选项卡。可以存在多个编辑器组。", + "tabActiveForeground": "活动组中活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", + "tabInactiveForeground": "活动组中非活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", + "tabUnfocusedActiveForeground": "非活动组中活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", + "tabUnfocusedInactiveForeground": "非活动组中非活动选项卡的前景色。在编辑器区域,选项卡是编辑器的容器。可在一个编辑器组中打开多个选项卡。可以有多个编辑器组。", "editorGroupBackground": "编辑器组的背景颜色。编辑器组是编辑器的容器。此颜色在拖动编辑器组时显示。", "tabsContainerBackground": "启用选项卡时编辑器组标题的背景颜色。编辑器组是编辑器的容器。", "tabsContainerBorder": "选项卡启用时编辑器组标题的边框颜色。编辑器组是编辑器的容器。", "editorGroupHeaderBackground": "禁用选项卡时编辑器组标题的背景颜色。编辑器组是编辑器的容器。", "editorGroupBorder": "将多个编辑器组彼此分隔开的颜色。编辑器组是编辑器的容器。", "editorDragAndDropBackground": "拖动编辑器时的背景颜色。此颜色应有透明度,以便编辑器内容能透过背景。", + "panelBackground": "面板的背景色。面板显示在编辑器区域下方,可包含输出和集成终端等视图。", "panelBorder": "分隔到编辑器的顶部面板边框色。面板显示在编辑器区域下方,可包含输出和集成终端等视图。", "panelActiveTitleForeground": "活动面板的标题颜色。面板显示在编辑器区域下方,并包含输出和集成终端等视图。", "panelInactiveTitleForeground": "非活动面板的标题颜色。面板显示在编辑器区域下方,并包含输出和集成终端等视图。", @@ -43,5 +48,9 @@ "titleBarActiveBackground": "窗口处于活动状态时的标题栏背景色。请注意,该颜色当前仅在 macOS 上受支持。", "titleBarInactiveBackground": "窗口处于非活动状态时的标题栏背景色。请注意,该颜色当前仅在 macOS 上受支持。", "notificationsForeground": "通知前景色。通知从窗口顶部滑入。", - "notificationsBackground": "通知背颜色。通知从窗口顶部滑入。" + "notificationsBackground": "通知背颜色。通知从窗口顶部滑入。", + "notificationsButtonForeground": "通知按钮前景色。通知从窗口顶部滑入。", + "notificationsInfoForeground": "消息通知前景色。通知从窗口顶部滑入。", + "notificationsWarningForeground": "警告通知前景色。通知从窗口顶部滑入。", + "notificationsErrorForeground": "错误通知前景色。通知从窗口顶部滑入。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/actions.i18n.json index 7ee775d592ca3..0663a15d8b689 100644 --- a/i18n/chs/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/chs/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "关闭编辑器", "closeWindow": "关闭窗口", - "switchWindow": "切换窗口", - "switchWindowPlaceHolder": "选择窗口", - "current": "当前窗口", "closeFolder": "关闭文件夹", "noFolderOpened": "此实例中没有要关闭的已打开文件夹。", "newWindow": "新建窗口", @@ -20,11 +17,16 @@ "zoomReset": "重置缩放", "appPerf": "启动性能", "reloadWindow": "重新加载窗口", - "openRecent": "打开最近的文件", + "switchWindowPlaceHolder": "选择切换的窗口", + "current": "当前窗口", + "switchWindow": "切换窗口...", + "quickSwitchWindow": "快速切换窗口...", "folders": "文件夹", "files": "文件", "openRecentPlaceHolderMac": "选择路径(在新窗口中按住 Cmd 键打开)", "openRecentPlaceHolder": "选择要打开的路径(在新窗口中按住 Ctrl 键打开)", + "openRecent": "打开最近的文件…", + "quickOpenRecent": "快速打开最近的文件…", "closeMessages": "关闭通知消息", "reportIssues": "报告问题", "reportPerformanceIssue": "报告性能问题", @@ -32,10 +34,10 @@ "openDocumentationUrl": "文档", "openIntroductoryVideosUrl": "入门视频", "toggleSharedProcess": "切换共享进程", - "navigateLeft": "移动到左侧的视图部分", - "navigateRight": "移动到右侧的视图部分", - "navigateUp": "移动到上方的视图部分", - "navigateDown": "移动到下方的视图部分", + "navigateLeft": "导航到左侧视图", + "navigateRight": "导航到右侧视图", + "navigateUp": "导航到上方视图", + "navigateDown": "导航到下方视图", "increaseViewSize": "增加当前视图大小", "decreaseViewSize": "减小当前视图大小" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json index 6997449c1ce46..01e2a1e7dff71 100644 --- a/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -31,10 +31,11 @@ "window.openFoldersInNewWindow.off": "文件夹将替换上一个活动窗口", "window.openFoldersInNewWindow.default": "文件夹在新窗口中打开,除非从应用程序内选取一个文件夹(例如,通过“文件”菜单)", "openFoldersInNewWindow": "控制文件夹应在新窗口中打开还是替换上一活动窗口。\n- default: 文件夹将在新窗口中打开,除非文件是从应用程序内选取的(例如通过“文件”菜单)\n- on: 文件夹将在新窗口中打开\n- off: 文件夹将替换上一活动窗口\n注意,可能仍会存在忽略此设置的情况(例如当使用 -new-window 或 -reuse-window 命令行选项时)。", - "window.reopenFolders.none": "永不重新打开文件夹。", - "window.reopenFolders.one": "重新打开上一个活动文件夹。", - "window.reopenFolders.all": "重新打开上一个会话的所有文件夹。", - "reopenFolders": "控制重启后重新打开文件夹的方式。选择“none”表示永不重新打开文件夹,选择“one”表示重新打开最后使用的一个文件夹,或选择“all”表示打开上次会话的所有文件夹。", + "window.reopenFolders.all": "重新打开所有窗口。", + "window.reopenFolders.folders": "重新打开所有文件夹。空窗口将不会被恢复。", + "window.reopenFolders.one": "重新打开上一个活动窗口。", + "window.reopenFolders.none": "永远不重新打开窗口。总是以一个空窗口启动。", + "restoreWindows": "控制重启后重新打开窗口的方式。选择“none”则永远在启动时打开一个空窗口;选择“one”则重新打开最后使用的窗口;选择“folders”则重新打开所有你曾打开的文件夹;或选择“all”则重新打开上次会话的所有窗口。", "restoreFullscreen": "如果窗口已退出全屏模式,控制其是否应还原为全屏模式。", "zoomLevel": "调整窗口的缩放级别。原始大小是 0,每次递增(例如 1)或递减(例如 -1)表示放大或缩小 20%。也可以输入小数以便以更精细的粒度调整缩放级别。", "title": "基于活动编辑器控制窗口标题。基于上下文替换变量:\n${activeEditorShort}: 例如 myFile.txt\n${activeEditorMedium}:例如 myFolder/myFile.txt\n${activeEditorLong}: 例如 /Users/Development/myProject/myFolder/myFile.txt\n${rootName}: 例如 myProject\n${rootPath}: 例如 /Users/Development/myProject\n${appName}: 例如 VS Code\n${dirty}: 一个更新指示器,指示活动编辑器是否更新\n${separator}: 一个条件分隔符(\"-\"),仅在左右是具有值的变量时才显示", @@ -58,5 +59,8 @@ "zenMode.hideTabs": "控制打开 Zen 模式是否也会隐藏工作台选项卡。", "zenMode.hideStatusBar": "控制打开 Zen 模式是否也会隐藏工作台底部的状态栏。", "zenMode.hideActivityBar": "控制打开 Zen 模式是否也会隐藏工作台左侧的活动栏。", - "zenMode.restore": "控制如果某窗口已退出 zen 模式,是否应还原到 zen 模式。" + "zenMode.restore": "控制如果某窗口已退出 zen 模式,是否应还原到 zen 模式。", + "workspaceConfigurationTitle": "工作区", + "files.exclude.boolean": "匹配文件路径所依据的 glob 模式。设置为 true 或 false 可启用或禁用该模式。", + "workspaces.additionalFolders": "工作区中的文件夹" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..9085c53577122 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "正在更改“editor.accessibilitySupport”设置为“on”。", + "openingDocs": "正在打开 VS Code 辅助功能文档页面。", + "introMsg": "感谢试用 VS Code 的辅助功能选项。", + "status": "状态:", + "changeConfigToOnMac": "要配置编辑器对屏幕阅读器进行永久优化,请按 Command+E。", + "changeConfigToOnWinLinux": "要配置编辑器对屏幕阅读器进行永久优化,请按 Ctrl+E。", + "auto_unknown": "编辑器被配置为使用平台 API 以检测是否附加了屏幕阅读器,但当前运行时不支持此功能。", + "auto_on": "编辑器自动检测到已附加屏幕阅读器。", + "auto_off": "编辑器被配置为自动检测是否附加了屏幕阅读器,当前未检测到。", + "configuredOn": "编辑器被配置为对屏幕阅读器的使用进行永久优化 — 你可以编辑设置中的“editor.accessibilitySupport”以改变此行为。", + "configuredOff": "编辑器被配置为不对屏幕阅读器的使用进行优化。", + "tabFocusModeOnMsg": "在当前编辑器中按 Tab 会将焦点移动到下一个可聚焦的元素。按 {0} 来切换此行为。", + "tabFocusModeOnMsgNoKb": "在当前编辑器中按 Tab 会将焦点移动到下一个可聚焦的元素。当前无法通过键绑定触发命令 {0}。", + "tabFocusModeOffMsg": "在当前编辑器中按 Tab 将插入制表符。按 {0} 来切换此行为。", + "tabFocusModeOffMsgNoKb": "在当前编辑器中按 Tab 会插入制表符。当前无法通过键绑定触发命令 {0}。", + "openDocMac": "按 Command+H 以打开浏览器窗口,其中包含更多有关 VS Code 辅助功能的信息。", + "openDocWinLinux": "按 Ctrl+H 以打开浏览器窗口,其中包含更多有关 VS Code 辅助功能的信息。", + "outroMsg": "你可以按 Esc 或 Shift+Esc 消除此工具提示并返回到编辑器。", + "ShowAccessibilityHelpAction": "显示辅助功能帮助" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..90e803801d335 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "切换多行修改键" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json index b47d705e0f32b..230f0bd8f03a7 100644 --- a/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json @@ -5,16 +5,12 @@ // Do not edit this file. It is machine generated. { "variablesSection": "变量部分", - "variables": "变量", "variablesAriaTreeLabel": "调试变量", "expressionsSection": "表达式部分", - "watch": "监视", "watchAriaTreeLabel": "调试监视表达式", "callstackSection": "调用堆栈部分", "debugStopped": "因 {0} 已暂停", - "callStack": "调用堆栈", "callStackAriaLabel": "调试调用堆栈", "breakpointsSection": "断点部分", - "breakpoints": "断点", "breakpointsAriaTreeLabel": "调试断点" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index 87fec1a103c22..fbb9c2b2cd2d4 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "previousEditPoint": "Emmet: 上一编辑点", - "nextEditPoint": "Emmet: 下一编辑点" + "previousEditPoint": "Emmet: 转到上一编辑点", + "nextEditPoint": "Emmet: 转到下一编辑点" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 0701c9f4ae63b..2d8b8d26d448d 100644 --- a/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -9,5 +9,6 @@ "emmetPreferences": "用于修改 Emmet 某些操作和解析程序的行为的首选项。", "emmetSyntaxProfiles": "为指定的语法定义配置文件或使用带有特定规则的配置文件。", "emmetExclude": "不应展开 Emmet 缩写的语言数组。", - "emmetExtensionsPath": "包含 Emmet 配置文件、代码段和首选项的文件夹路径" + "emmetExtensionsPath": "包含 Emmet 配置文件、代码段和首选项的文件夹路径", + "useNewEmmet": "试用新版 Emmet 模块(最终会替换旧版单一 Emmet 库)体验所有 Emmet 功能。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 5e357e17480ed..f8c655a1a8907 100644 --- a/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,10 @@ "default": "默认", "debuggers": "调试程序({0})", "debugger name": "名称", + "views": "视图 ({0})", + "view id": "ID", + "view name": "名称", + "view location": "位置", "themes": "主题({0})", "JSON Validation": "JSON 验证({0})", "commands": "命令({0})", diff --git a/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 955985888a94b..50c0b174efaca 100644 --- a/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -28,7 +28,6 @@ "watcherExclude": "配置文件路径的 glob 模式以从文件监视排除。更改此设置要求重启。如果在启动时遇到 Code 消耗大量 CPU 时间,则可以排除大型文件夹以减少初始加载。", "hotExit.off": "禁用热退出。", "hotExit.onExit": "应用程序关闭时将触发热退出。在 Windows/Linux 上关闭最后一个窗口或触发 workbench.action.quit 命令(命令托盘、键绑定、菜单)会引起应用程序关闭。下次启动时将还原所有已备份的窗口。", - "hotExit.onExitAndWindowClose": "应用程序关闭时将触发热退出。在 Windows/Linux 上关闭最后一个窗口、触发 workbench.action.quit 命令(命令托盘、键绑定、菜单)会引起应用程序关闭。对于任何有文件夹打开的窗口,则不论该窗口是否是最后一个窗口。下次启动时将还原所有未打开文件夹的窗口。若要还原打开有文件夹的窗口,请将“window.reopenFolders”设置为“all”。", "hotExit": "控制是否在会话间记住未保存的文件,以允许在退出编辑器时跳过保存提示。", "defaultLanguage": "分配给新文件的默认语言模式。", "editorConfigurationTitle": "编辑器", diff --git a/i18n/chs/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/chs/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index 4d442c51a66c6..f98b4a8c0071b 100644 --- a/i18n/chs/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -5,7 +5,5 @@ // Do not edit this file. It is machine generated. { "explorerSection": "文件资源管理器部分", - "noWorkspace": "无打开的文件夹", - "noWorkspaceHelp": "尚未打开文件夹。", "openFolder": "打开文件夹" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/chs/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index 33cc7fda987c0..1639569b1103d 100644 --- a/i18n/chs/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "打开的编辑器部分", "openEditors": "打开的编辑器", + "openEditosrSection": "打开的编辑器部分", "treeAriaLabel": "打开的编辑器: 活动文件列表", "dirtyCounter": "{0} 个未保存" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json index 99d48068a9a9f..1c5aca86231a6 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -5,5 +5,5 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.initial": "按所需的键组合,然后按 Enter。按 Esc 可取消。", - "defineKeybinding.chordsTo": "弦形" + "defineKeybinding.chordsTo": "加上" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 1cd8910edd821..574f03fcc125d 100644 --- a/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "定义键绑定", - "defineKeybinding.kbLayoutErrorMessage": "在当前键盘布局下无法生成此组合键。" + "defineKeybinding.kbLayoutErrorMessage": "在当前键盘布局下无法生成此组合键。", + "defineKeybinding.kbLayoutLocalAndUSMessage": "在你的键盘布局上为 **{0}**(美国标准布局上为 **{1}**)。", + "defineKeybinding.kbLayoutLocalMessage": "在你的键盘布局上为 **{0}**。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..f3d350d60583b --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchMessage": "设置已更改,需要重启才能生效。", + "relaunchDetail": "按下“重启”按钮以重新启动 {0} 并启用该设置。", + "restart": "重启" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index 40b1258792202..5a84e47f5dbcf 100644 --- a/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "空代码片段", "snippetSchema.json": "用户代码片段配置", "snippetSchema.json.prefix": "在 Intellisense 中选择代码片段时将使用的前缀", - "snippetSchema.json.body": "代码片段内容。使用“${id}”、“${id:label}”、“${1:label}”作为变量,使用 \"$0\" 和 \"$1\" 作为光标位置", + "snippetSchema.json.body": "代码片段的内容。使用“$1”和“${1:defaultText}”定义光标位置,使用“$0”定义最终光标位置。使用“${varName}”和“${varName:defaultText}”插入变量值,例如“这是文件:$TM_FILENAME”。", "snippetSchema.json.description": "代码片段描述。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..52ab1590ed236 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "帮助我们改善对 {0} 的支持", + "takeShortSurvey": "参与小调查", + "remindLater": "稍后提醒", + "neverAgain": "不再显示" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..36e84d84fb11b --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "您愿意参与一次简短的反馈调查吗?", + "takeSurvey": "参与调查", + "remindLater": "稍后提醒", + "neverAgain": "不再显示" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..4ec9c9da62529 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "没有匹配的任务" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index bf5eec2631c96..8c2a202c0e158 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0},任务" + "entryAriaLabel": "{0},任务", + "customizeTask": "自定义任务" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..5c6969c70d790 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "没有匹配的任务", + "noTasksFound": "没有找到测试任务" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 0c2209acdb615..29d782900adbc 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -12,5 +12,6 @@ "ConfigurationParser.invalidVaraibleReference": "错误: 无效的 problemMatcher 引用: {0}\n", "ConfigurationParser.noTaskName": "错误: 任务必须提供 taskName 属性。将忽略该任务。\n{0}\n", "taskConfiguration.shellArgs": "警告: 任务“{0}”是 shell 命令,该命令的名称或其中一个参数具有非转义空格。若要确保命令行引用正确,请将参数合并到该命令。", + "taskConfiguration.noCommandOrDependsOn": "错误:任务“{0}”既不指定命令,也不指定 dependsOn 属性。将忽略该任务。其定义为:\n{1}", "taskConfiguration.noCommand": "错误: 任务“{0}”未定义命令。将忽略该任务。其定义为:\n{1}" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index 46ce4264dea7a..022342352e6b3 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "其他命令选项", "JsonSchema.options.cwd": "已执行程序或脚本的当前工作目录。如果省略,则使用代码的当前工作区根。", "JsonSchema.options.env": "已执行程序或 shell 的环境。如果省略,则使用父进程的环境。", + "JsonSchema.shellConfiguration": "配置使用的 shell。", "JsonSchema.shell.executable": "待使用的 shell。", "JsonSchema.shell.args": "shell 参数。", "JsonSchema.command": "要执行的命令。可以是外部程序或 shell 命令。", diff --git a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index 739af6ee7d504..f4f41e4b5fc90 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "配置的版本号", + "JsonSchema._runner": "此 runner 已完成使命。请使用官方 runner 属性", + "JsonSchema.runner": "定义任务是否作为进程执行,输出显示在输出窗口还是在终端内。", "JsonSchema.windows": "Windows 特定的命令配置", "JsonSchema.mac": "Mac 特定的命令配置", "JsonSchema.linux": "Linux 特定的命令配置", diff --git a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 0fc11b1726877..17f745a969836 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -7,6 +7,10 @@ "JsonSchema.shell": "指定命令是 shell 命令还是外部程序。如果省略,默认值是 false。", "JsonSchema.tasks.dependsOn.string": "此任务依赖的另一任务。", "JsonSchema.tasks.dependsOn.array": "此任务依赖的其他任务。", + "JsonSchema.tasks.group": "定义此任务属于的执行组。如被省略,则此任务不属于任何组。", + "JsonSchema.tasks.type": "定义任务是被作为进程运行还是在 shell 中作为命令运行。默认作为进程运行。", + "JsonSchema.version": "配置的版本号。", + "JsonSchema.tasks.customize": "要自定义的提供的视图。", "JsonSchema.windows": "Windows 特定的命令配置", "JsonSchema.mac": "Mac 特定的命令配置", "JsonSchema.linux": "Linux 特定的命令配置" diff --git a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index e8ff5a94c0b10..5fc4616ea4757 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -22,7 +22,8 @@ "TaskService.noBuildTask": "未定义任何生成任务。使用 \"isBuildCommand\" 在 tasks.json 文件中标记任务。", "TaskService.noTestTask": "未定义任何测试任务。使用 \"isTestCommand\" 在 tasks.json 文件中标记任务。", "TaskServer.noTask": "未找到要执行的请求任务 {0}。", - "TaskSystem.activeSame": "任务已处于活动状态并处于监视模式。若要终止任务,请使用 \"F1\" >“终止任务”", + "customizeParseErrors": "当前任务配置存在错误。请先更正错误,再自定义任务。", + "moreThanOneBuildTask": "当前 tasks.json 中定义了多个生成任务。正在执行第一个。\n", "TaskSystem.active": "当前已有任务正在运行。请先终止它,然后再执行另一项任务。", "TaskSystem.restartFailed": "未能终止并重启任务 {0}", "TaskSystem.configurationErrors": "错误: 提供的任务配置具有验证错误,无法使用。请首先改正错误。", @@ -43,5 +44,7 @@ "TestAction.label": "运行测试任务", "quickOpen.task": "运行任务", "quickOpen.terminateTask": "终止任务(&&T)", - "quickOpen.restartTask": "重启任务" + "quickOpen.restartTask": "重启任务", + "quickOpen.buildTask": "生成任务", + "quickOpen.testTask": "测试任务" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index f5f009904e1de..007d5c51e4a65 100644 --- a/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,6 +6,7 @@ { "TerminalTaskSystem.unknownError": "在执行任务时发生未知错误。请参见任务输出日志了解详细信息。", "TerminalTaskSystem.terminalName": "任务 - {0}", + "reuseTerminal": "终端将被任务重用,按任意键关闭。", "TerminalTaskSystem": "无法对 UNC 驱动器执行 shell 命令。", "unkownProblemMatcher": "无法解析问题匹配程序 {0}。此匹配程序将被忽略" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 3b09b277be3c4..c8746db7afb2f 100644 --- a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -8,6 +8,7 @@ "workbench.action.terminal.kill": "终止活动终端实例", "workbench.action.terminal.kill.short": "终止终端", "workbench.action.terminal.copySelection": "复制所选内容", + "workbench.action.terminal.selectAll": "全选", "workbench.action.terminal.new": "新建集成终端", "workbench.action.terminal.new.short": "新的终端", "workbench.action.terminal.focus": "聚焦于终端", @@ -28,5 +29,9 @@ "workbench.action.terminal.scrollToTop": "滚动到顶部", "workbench.action.terminal.clear": "清除", "workbench.action.terminal.allowWorkspaceShell": "允许配置工作区 Shell", - "workbench.action.terminal.disallowWorkspaceShell": "禁止配置工作区 Shell" + "workbench.action.terminal.disallowWorkspaceShell": "禁止配置工作区 Shell", + "workbench.action.terminal.rename": "重命名", + "workbench.action.terminal.rename.prompt": "输入终端名称", + "workbench.action.terminal.focusFindWidget": "聚焦于查找小组件", + "workbench.action.terminal.hideFindWidget": "隐藏查找小组件" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..d650d2c5ce653 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "查找", + "placeholder.find": "查找", + "label.previousMatchButton": "上一个匹配", + "label.nextMatchButton": "下一个匹配", + "label.closeButton": "关闭" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index 968bdf8f6a5bf..c6e31e6ba8bdc 100644 --- a/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "当终端没有位于焦点时无法复制终端选定内容", "terminal.integrated.exitedWithCode": "通过退出代码 {0} 终止的终端进程", "terminal.integrated.waitOnExit": "按任意键以关闭终端", "terminal.integrated.launchFailed": "终端进程命令“{0} {1}”无法启动(退出代码: {2})" diff --git a/i18n/chs/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/chs/src/vs/workbench/parts/update/electron-browser/update.i18n.json index 458a66e47a206..254f11cdeffab 100644 --- a/i18n/chs/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -15,5 +15,18 @@ "license": "读取许可证", "updateAvailable": "{0} 将在重启后更新。", "thereIsUpdateAvailable": "存在可用更新。", - "noUpdatesAvailable": "当前没有可用的更新。" + "noUpdatesAvailable": "当前没有可用的更新。", + "updateIsReady": "有新更新可用。", + "commandPalette": "命令面板...", + "settings": "设置", + "keyboardShortcuts": "键盘快捷方式", + "selectTheme.label": "颜色主题", + "themes.selectIconTheme.label": "文件图标主题", + "not available": "更新不可用", + "checkingForUpdates": "正在检查更新...", + "DownloadUpdate": "下载可用更新", + "DownloadingUpdate": "正在下载更新...", + "InstallingUpdate": "正在安装更新...", + "restartToUpdate": "重启以更新...", + "checkForUpdates": "检查更新..." } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/chs/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..08ebcb29e969b --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} 操作" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/chs/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..c013ce2e6be28 --- /dev/null +++ b/i18n/chs/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "视图必须为数组", + "requirestring": "属性“{0}”是必需的,其类型必须是“string”", + "optstring": "属性“{0}”可以省略,否则其类型必须是 \"string\"", + "vscode.extension.contributes.view.id": "视图的标识符。使用标识符通过“vscode.window.registerTreeDataProviderForView” API 注册数据提供程序。同时将“onView:${id}”事件注册到“activationEvents”以激活你的扩展。", + "vscode.extension.contributes.view.name": "人类可读的视图名称。将会被显示", + "vscode.extension.contributes.views": "向编辑器提供视图", + "views.explorer": "资源管理器视图", + "locationId.invalid": "“{0}”为无效视图位置" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 3503db3576a03..efc4346e6342a 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -31,7 +31,6 @@ "welcomePage.colorThemeDescription": "使编辑器和代码呈现你喜欢的外观", "welcomePage.learn": "学习", "welcomePage.showCommands": "查找并运行所有命令", - "welcomePage.showCommandsDescription": "从控制面板快速访问并搜索命令({0})", "welcomePage.interfaceOverview": "界面概述", "welcomePage.interfaceOverviewDescription": "查看突出显示主要 UI 组件的叠加图", "welcomePage.interactivePlayground": "交互式演练场", diff --git a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index 9df0fba85871c..f98f5d0208ef4 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbenchConfigurationTitle": "工作台", - "welcomePage.enabled": "启用后,将在启动时显示欢迎页。", "help": "帮助" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 495283f621e0b..6180f4d0d5bdd 100644 --- a/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/chs/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "workbenchConfigurationTitle": "工作台", + "welcomePage.enabled": "启用后,将在启动时显示欢迎页。", "welcomePage": "欢迎使用", "welcomePage.javaScript": "JavaScript", "welcomePage.typeScript": "TypeScript", @@ -14,16 +16,23 @@ "welcomePage.sublime": "Sublime", "welcomePage.atom": "Atom", "welcomePage.extensionPackAlreadyInstalled": "已安装对 {0} 的支持。", - "welcomePage.willReloadAfterInstallingExtensionPack": "安装对 {0} 的支持后,将重载窗口。", - "welcomePage.installingExtensionPack": "正在安装对 {0} 的支持...", + "welcomePage.willReloadAfterInstallingExtensionPack": "安装对 {0} 的额外支持后,将重载窗口。", + "welcomePage.installingExtensionPack": "正在安装对 {0} 的额外支持...", "welcomePage.extensionPackNotFound": "找不到对 {0} (ID: {1}) 的支持。", "welcomePage.keymapAlreadyInstalled": "已安装 {0} 键盘快捷方式。", "welcomePage.willReloadAfterInstallingKeymap": "安装 {0} 键盘快捷方式后,将重载窗口。", "welcomePage.installingKeymap": "正在安装 {0} 键盘快捷方式...", "welcomePage.keymapNotFound": "找不到 ID 为 {1} 的 {0} 键盘快捷方式。", "welcome.title": "欢迎使用", + "welcomePage.openFolderWithPath": "打开路径为 {1} 的文件夹 {0}", "welcomePage.extensionListSeparator": "、", - "welcomePage.installedExtension": "{0}(已安装)", + "welcomePage.installKeymap": "安装 {0} 键映射", + "welcomePage.installExtensionPack": "安装对 {0} 的额外支持", + "welcomePage.installedKeymap": "已安装 {0} 键映射", + "welcomePage.installedExtensionPack": "已安装 {0} 支持", "ok": "确定", - "cancel": "取消" + "details": "详细信息", + "cancel": "取消", + "welcomePage.buttonBackground": "欢迎页按钮的背景色。", + "welcomePage.buttonHoverBackground": "欢迎页按钮被悬停时的背景色。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/chs/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..0581515bc92d8 --- /dev/null +++ b/i18n/chs/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "遥测", + "telemetry.enableCrashReporting": "启用要发送给 Microsoft 的故障报表。\n此选项需重启才可生效。" +} \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/chs/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json index 162baf8c31f90..4d434e9c4c961 100644 --- a/i18n/chs/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json +++ b/i18n/chs/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -22,5 +22,5 @@ "keybindings.json.when": "键处于活动状态时的条件。", "keybindings.json.args": "要传递给命令以执行的参数。", "keyboardConfigurationTitle": "键盘", - "dispatch": "控制按键的分派逻辑以使用 \"keydown.code\" (推荐)或 \"eydown.keyCode\"。" + "dispatch": "控制按键的调度逻辑以使用“keydown.code”(推荐) 或“keydown.keyCode”。" } \ No newline at end of file diff --git a/i18n/chs/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/chs/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/chs/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/cht/extensions/git/out/commands.i18n.json b/i18n/cht/extensions/git/out/commands.i18n.json index 849277aa8fe49..ccc4f6c757a6d 100644 --- a/i18n/cht/extensions/git/out/commands.i18n.json +++ b/i18n/cht/extensions/git/out/commands.i18n.json @@ -26,6 +26,9 @@ "provide commit message": "請提供認可訊息", "branch name": "分支名稱", "provide branch name": "請提供分支名稱", + "select branch to delete": "選擇分支進行刪除", + "confirm force delete branch": "分支 '{0}' 尚未完整合併. 確定刪除嗎?", + "delete branch": "刪除分支", "no remotes to pull": "您的存放庫未設定要提取的來源遠端。", "no remotes to push": "您的存放庫未設定要推送的目標遠端。", "nobranch": "請簽出分支以推送到遠端。", diff --git a/i18n/cht/extensions/git/out/scmProvider.i18n.json b/i18n/cht/extensions/git/out/scmProvider.i18n.json index 7fded37328a95..e71dab52f4e97 100644 --- a/i18n/cht/extensions/git/out/scmProvider.i18n.json +++ b/i18n/cht/extensions/git/out/scmProvider.i18n.json @@ -4,5 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "commit": "Commit" + "commit": "認可" } \ No newline at end of file diff --git a/i18n/cht/extensions/git/package.i18n.json b/i18n/cht/extensions/git/package.i18n.json index 63f725ec18367..725f33d871ad3 100644 --- a/i18n/cht/extensions/git/package.i18n.json +++ b/i18n/cht/extensions/git/package.i18n.json @@ -26,12 +26,13 @@ "command.undoCommit": "復原上次認可", "command.checkout": "簽出至...", "command.branch": "建立分支...", + "command.deleteBranch": "刪除分支...", "command.pull": "提取", "command.pullRebase": "提取 (重訂基底)", "command.push": "推送", "command.pushTo": "推送至...", "command.sync": "同步處理", - "command.publish": "發行", + "command.publish": "發行分支", "command.showOutput": "顯示 Git 輸出", "config.enabled": "是否啟用 GIT", "config.path": "Git 可執行檔的路徑", diff --git a/i18n/cht/extensions/jake/out/main.i18n.json b/i18n/cht/extensions/jake/out/main.i18n.json index 8b6ad71cd4e6d..f85adc82182e7 100644 --- a/i18n/cht/extensions/jake/out/main.i18n.json +++ b/i18n/cht/extensions/jake/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Jake 的自動偵測失敗。錯誤: {0}" +} \ No newline at end of file diff --git a/i18n/cht/extensions/jake/package.i18n.json b/i18n/cht/extensions/jake/package.i18n.json index 8b6ad71cd4e6d..ee533577d0713 100644 --- a/i18n/cht/extensions/jake/package.i18n.json +++ b/i18n/cht/extensions/jake/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.jake.autoDetect": "控制 Jake 工作的自動偵測為開啟或關閉。預設為開。" +} \ No newline at end of file diff --git a/i18n/cht/extensions/markdown/out/extension.i18n.json b/i18n/cht/extensions/markdown/out/extension.i18n.json index 8b6ad71cd4e6d..f8b580fc8f070 100644 --- a/i18n/cht/extensions/markdown/out/extension.i18n.json +++ b/i18n/cht/extensions/markdown/out/extension.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "onPreviewStyleLoadError": "無法載入 ‘markdown.style' 樣式:{0}" +} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json index 8b6ad71cd4e6d..fd3fc4ee5125c 100644 --- a/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/cht/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "acceptCurrentChange": "接受當前變更", + "acceptIncomingChange": "接受來源變更", + "acceptBothChanges": "接受兩者變更", + "compareChanges": "比較變更" +} \ No newline at end of file diff --git a/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json index fe300c53427c3..a82efe04f8a99 100644 --- a/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/cht/extensions/merge-conflict/out/commandHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "cursorNotInConflict": "編輯器游標不在衝突合併範圍之內", + "compareChangesTitle": "{0}: 當前變更⟷來源變更", "cursorOnSplitterRange": "編輯器游標在衝突合併工具範圍內,請移動至\"當前項目\"或來源項目\"區塊", "noConflicts": "檔案內找不到需要合併衝突項目", "noOtherConflictsInThisFile": "此檔案內沒有其他的衝突合併項目" diff --git a/i18n/cht/extensions/merge-conflict/package.i18n.json b/i18n/cht/extensions/merge-conflict/package.i18n.json index 8546878e4e445..21711a0ff3211 100644 --- a/i18n/cht/extensions/merge-conflict/package.i18n.json +++ b/i18n/cht/extensions/merge-conflict/package.i18n.json @@ -5,7 +5,15 @@ // Do not edit this file. It is machine generated. { "command.category": "合併衝突", + "command.accept.all-incoming": "接受所有來源", + "command.accept.all-both": "接受兩者所有項目", + "command.accept.current": "接受當前項目", + "command.accept.incoming": "接受來源項目", + "command.accept.selection": "接受選取項目", "command.accept.both": "接受兩者", + "command.next": "下一個衝突", + "command.previous": "前一個衝突", + "command.compare": "比較目前衝突", "config.title": "合併衝突", "config.codeLensEnabled": "啟用/停用 編輯器CodeLens衝突合併 ", "config.decoratorsEnabled": "啟用/停用 編輯器衝突合併色彩裝飾" diff --git a/i18n/cht/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/cht/extensions/typescript/out/features/bufferSyncSupport.i18n.json index 94c3eb2b5b915..8d73858cf4f5e 100644 --- a/i18n/cht/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/cht/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "版本不符! 全域 TSC ({0}) != VS Code 的語言服務 ({1})。可能會發生編譯不一致的錯誤", "moreInformation": "詳細資訊", "doNotCheckAgain": "不要再檢查", "close": "關閉", diff --git a/i18n/cht/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/cht/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json index 8b6ad71cd4e6d..19b6338186e4b 100644 --- a/i18n/cht/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json +++ b/i18n/cht/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "ts-check": "啟用 JavaScript 檔案的語意檢查。必須在檔案的最上面。", + "ts-nocheck": "停用 JavaScript 檔案的語意檢查。必須在檔案的最上面。", + "ts-ignore": "隱藏下一行@ts-check 的錯誤警告。" +} \ No newline at end of file diff --git a/i18n/cht/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/cht/extensions/typescript/out/utils/projectStatus.i18n.json index bfe9d8300ece6..3c39220ae532e 100644 --- a/i18n/cht/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/cht/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "若要讓整個專案都能使用 JavaScript/TypeScript 語言功能,請排除內含許多檔案的資料夾,例如: {0}", "hintExclude.generic": "若要讓整個專案都能使用 JavaScript/TypeScript 語言功能,請排除內含您未使用之來源檔案的大型資料夾。", - "open": "設定排除項目", "large.label": "設定排除項目", "hintExclude.tooltip": "若要讓整個專案都能使用 JavaScript/TypeScript 語言功能,請排除內含您未使用之來源檔案的大型資料夾。" } \ No newline at end of file diff --git a/i18n/cht/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/cht/extensions/typescript/out/utils/typingsStatus.i18n.json index 4f15ff5fc04f8..d487fd639bc08 100644 --- a/i18n/cht/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/cht/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "正在擷取資料以改善 TypeScript IntelliSense", + "typesInstallerInitializationFailed.title": "無法安裝typings檔案Javascript語言功能,請確認NPM是否已安裝且配置'typescript.npm'", "typesInstallerInitializationFailed.moreInformation": "詳細資訊", "typesInstallerInitializationFailed.doNotCheckAgain": "不要再檢查", "typesInstallerInitializationFailed.close": "關閉" diff --git a/i18n/cht/extensions/typescript/package.i18n.json b/i18n/cht/extensions/typescript/package.i18n.json index a9e009d33a4fa..349b5b0321526 100644 --- a/i18n/cht/extensions/typescript/package.i18n.json +++ b/i18n/cht/extensions/typescript/package.i18n.json @@ -13,7 +13,6 @@ "typescript.check.tscVersion": "請檢查全域安裝 TypeScript 編譯器 (例如 tsc) 是否不同於使用的 TypeScript 語言服務。", "typescript.tsserver.log": "允許 TS 伺服器記錄到檔案。此記錄可用來診斷 TS 伺服器問題。記錄可能包含檔案路徑、原始程式碼及您專案中可能具有敏感性的其他資訊。", "typescript.tsserver.trace": "允許將訊息追蹤傳送到 TS 伺服器。此追蹤可用來診斷 TS 伺服器問題。追蹤可能包含檔案路徑、原始程式碼及您專案中可能具有敏感性的其他資訊。", - "typescript.tsserver.experimentalAutoBuild": "啟用實驗性自動建置。需要 1.9 dev 或 2.x tsserver 版本,且在變更後必須重新啟動 VS Code。", "typescript.validate.enable": "啟用/停用 TypeScript 驗證。", "typescript.format.enable": "啟用/停用預設 TypeScript 格式器。", "javascript.format.enable": "啟用/停用預設 JavaScript 格式器。", @@ -41,5 +40,8 @@ "typescript.selectTypeScriptVersion.title": "選取 TypeScript 版本", "jsDocCompletion.enabled": "啟用/停用自動 JSDoc 註解", "javascript.implicitProjectConfig.checkJs": "啟用/停用 JavaScript 檔案的語意檢查。現有的 jsconfig.json 或 tsconfig.json 檔案會覆寫此設定。需要 TypeScript >=2.3.1。", - "javascript.nameSuggestions": "從JavaScript推薦表檔案中啟用/停用包含唯一檔名" + "typescript.npm": "指定用於自動類型取得的 NPM 可執行檔路徑。TypeScript 必須 >= 2.3.4.", + "typescript.check.npmIsInstalled": "檢查是否已安裝NPM用以取得自動類型擷取.", + "javascript.nameSuggestions": "從JavaScript推薦表檔案中啟用/停用包含唯一檔名", + "typescript.tsc.autoDetect": "控制 tsc 工作的自動偵測為開啟或關閉。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/base/common/errorMessage.i18n.json b/i18n/cht/src/vs/base/common/errorMessage.i18n.json index 0ff1888b74e0c..693f35b5cc0ce 100644 --- a/i18n/cht/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/cht/src/vs/base/common/errorMessage.i18n.json @@ -13,6 +13,5 @@ "error.connection.unknown": "發生未知的連接錯誤。可能是您已經沒有連線到網際網路,或是您連接的伺服器已離線。", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "發生未知的錯誤。如需詳細資訊,請參閱記錄檔。", - "nodeExceptionMessage": "發生系統錯誤 ({0})", "error.moreErrors": "{0} (總計 {1} 個錯誤)" } \ No newline at end of file diff --git a/i18n/cht/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/cht/src/vs/base/common/jsonErrorMessages.i18n.json index a131a45e657ff..5259c9207ad87 100644 --- a/i18n/cht/src/vs/base/common/jsonErrorMessages.i18n.json +++ b/i18n/cht/src/vs/base/common/jsonErrorMessages.i18n.json @@ -4,13 +4,13 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "error.invalidSymbol": "符號無效", - "error.invalidNumberFormat": "數字格式無效", - "error.propertyNameExpected": "必須有屬性名稱", + "error.invalidSymbol": "無效符號", + "error.invalidNumberFormat": "無效的數字格式", + "error.propertyNameExpected": "須有屬性名稱", "error.valueExpected": "必須有值", - "error.colonExpected": "必須為冒號", - "error.commaExpected": "必須為逗號", + "error.colonExpected": "必須有冒號", + "error.commaExpected": "必須有逗號", "error.closeBraceExpected": "必須為右大括號", "error.closeBracketExpected": "必須為右中括號", - "error.endOfFileExpected": "必須為檔案結尾" + "error.endOfFileExpected": "必須有檔案結尾" } \ No newline at end of file diff --git a/i18n/cht/src/vs/base/common/keybindingLabels.i18n.json b/i18n/cht/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/code/electron-main/menus.i18n.json b/i18n/cht/src/vs/code/electron-main/menus.i18n.json index 6d87a7b49027d..097fbdb725009 100644 --- a/i18n/cht/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/cht/src/vs/code/electron-main/menus.i18n.json @@ -55,6 +55,9 @@ "miShowEmmetCommands": "Emmet(&&M)...", "miToggleLineComment": "切換行註解(&&T)", "miToggleBlockComment": "切換區塊註解(&&B)", + "miMultiCursorAlt": "透過 Alt+ 按一下啟用多重游標", + "miMultiCursorCmd": "透過 Cmdt+ 按一下啟用多重游標", + "miMultiCursorCtrl": "透過 Ctrl+ 按一下啟用多重游標", "miInsertCursorAbove": "在上方新增游標(&&A)", "miInsertCursorBelow": "在下方新增游標(&&D)", "miInsertCursorAtEndOfEachLineSelected": "在行尾新增游標(&&U)", @@ -70,6 +73,7 @@ "miSmartSelectShrink": "壓縮選取範圍(&&S)", "miViewExplorer": "檔案總管(&&E)", "miViewSearch": "搜尋(&&S)", + "miViewSCM": "SCM", "miViewDebug": "偵錯 (&&D)", "miViewExtensions": "擴充功能(&&X)", "miToggleOutput": "輸出(&&O)", @@ -114,6 +118,8 @@ "miGotoSymbolInFile": "前往檔案中的符號(&&S)...", "miGotoSymbolInWorkspace": "前往工作區中的符號(&&W)...", "miGotoDefinition": "移至定義(&&D)", + "miGotoTypeDefinition": "移至類型定義(&&T)", + "miGotoImplementation": "前往實作(&&I)", "miGotoLine": "移至行(&&L)...", "miStartDebugging": "啟動偵錯(&&S)", "miStartWithoutDebugging": "只啟動但不偵錯(&&W)", @@ -130,16 +136,17 @@ "miColumnBreakpoint": "資料行中斷點(&&O)", "miFunctionBreakpoint": "函式中斷點(&&F}...", "miNewBreakpoint": "新增中斷點(&&N)", + "miEnableAllBreakpoints": "啟用所有中斷點", "miDisableAllBreakpoints": "停用所有中斷點(&&L)", "miRemoveAllBreakpoints": "移除所有中斷點(&&R)", "miInstallAdditionalDebuggers": "安裝其他偵錯工具(&&I)...", "mMinimize": "最小化", - "mClose": "關閉", "mBringToFront": "全部提到最上層", "miToggleDevTools": "切換開發人員工具(&&T)", "miAccessibilityOptions": "協助工具選項(&&O)", "miReportIssues": "回報問題(&&I)", "miWelcome": "歡迎使用(&&W)", + "miInteractivePlayground": "Interactive Playground(&&I)", "miDocumentation": "文件(&&D)", "miReleaseNotes": "版本資訊(&&R)", "miKeyboardShortcuts": "鍵盤快速鍵參考(&&K)", @@ -149,12 +156,14 @@ "miLicense": "檢視授權(&&L)", "miPrivacyStatement": "隱私權聲明(&&P)", "miAbout": "關於(&&A)", + "miTerminateTask": "終止工作(&&T)", "accessibilityOptionsWindowTitle": "協助工具選項", "miRestartToUpdate": "重新啟動以更新...", "miCheckingForUpdates": "正在查看是否有更新...", "miDownloadUpdate": "下載可用更新", "miDownloadingUpdate": "正在下載更新...", "miInstallingUpdate": "正在安裝更新...", + "miCheckForUpdates": "查看是否有更新", "aboutDetail": "\n版本 {0}\n認可 {1}\n日期 {2}\nShell {3}\n轉譯器 {4}\nNode {5}", "okButton": "確定" } \ No newline at end of file diff --git a/i18n/cht/src/vs/code/electron-main/windows.i18n.json b/i18n/cht/src/vs/code/electron-main/windows.i18n.json index 08847b4b8e488..fe29d0fb035ae 100644 --- a/i18n/cht/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/cht/src/vs/code/electron-main/windows.i18n.json @@ -13,9 +13,5 @@ "appStalled": "視窗已沒有回應", "appStalledDetail": "您可以重新開啟或關閉視窗,或是繼續等候。", "appCrashed": "視窗已損毀", - "appCrashedDetail": "很抱歉造成您的不便! 您可以重新開啟視窗,從您離開的地方繼續進行。", - "newWindow": "開新視窗", - "newWindowDesc": "開啟新視窗", - "recentFolders": "最近使用的資料夾", - "folderDesc": "{0} {1}" + "appCrashedDetail": "很抱歉造成您的不便! 您可以重新開啟視窗,從您離開的地方繼續進行。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json index f1f6f5fa235b5..23812d4eed80e 100644 --- a/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/cht/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -23,6 +23,8 @@ "minimap.enabled": "控制是否會顯示迷你地圖", "minimap.renderCharacters": "呈現行內的實際字元 (而不是彩色區塊)", "minimap.maxColumn": "限制迷你地圖的寬度,以呈現最多的資料行", + "find.seedSearchStringFromSelection": "控制編譯器選取範圍是否預設為尋找工具的搜尋字串", + "find.autoFindInSelection": "控制編譯器內選取多字元或多行內文是否開啟選取範圍尋找功能", "wordWrap.off": "一律不換行。", "wordWrap.on": "依檢視區寬度換行。", "wordWrap.wordWrapColumn": "於 'editor.wordWrapColumn' 換行。", @@ -31,16 +33,19 @@ "wordWrapColumn": "當 `editor.wordWrap` 為 [wordWrapColumn] 或 [bounded] 時,控制編輯器中的資料行換行。", "wrappingIndent": "控制換行的縮排。可以是 [無]、[相同] 或 [縮排]。", "mouseWheelScrollSensitivity": "滑鼠滾輪捲動事件的 'deltaX' 與 'deltaY' 所使用的乘數", + "multiCursorModifier.ctrlCmd": "對應Windows和Linux的'Control'與對應OSX的'Command'", + "multiCursorModifier.alt": "對應Windows和Linux的'Alt'與對應OSX的'Option'", + "multiCursorModifier": "用於新增多個滑鼠游標的修改程式。`ctrlCmd` 會對應到 Windows 及 Linux 上的 `Control` 以及 OSX 上的 `Command`。[移至定義] 及 [開啟連結] 滑鼠手勢將會適應以避免和 multicursor 修改程式衝突。", "quickSuggestions.strings": "允許在字串內顯示即時建議。", "quickSuggestions.comments": "允許在註解中顯示即時建議。", "quickSuggestions.other": "允許在字串與註解以外之處顯示即時建議。", "quickSuggestions": "控制是否應在輸入時自動顯示建議", "quickSuggestionsDelay": "控制延遲顯示快速建議的毫秒數", - "parameterHints": "啟用參數提示", "autoClosingBrackets": "控制編輯器是否應在左括號後自動插入右括號", "formatOnType": "控制編輯器是否應在輸入一行後自動格式化", "formatOnPaste": "控制編輯器是否應自動設定貼上的內容格式。格式器必須可供使用,而且格式器應該能夠設定文件中一個範圍的格式。", "suggestOnTriggerCharacters": "控制輸入觸發字元時,是否應自動顯示建議", + "acceptSuggestionOnEnter": "控制除了 'Tab' 外,是否也藉由按下 'Enter' 接受建議。如此可避免混淆要插入新行或接受建議。設定值'smart'表示在文字變更同時,只透過Enter接受建議。", "acceptSuggestionOnCommitCharacter": "控制認可字元是否應接受建議。例如在 JavaScript 中,分號 (';') 可以是接受建議並鍵入該字元的認可字元。", "snippetSuggestions": "控制程式碼片段是否隨其他建議顯示,以及其排序方式。", "emptySelectionClipboard": "控制複製時不選取任何項目是否會複製目前程式行。", @@ -62,12 +67,17 @@ "renderLineHighlight": "控制編輯器應如何轉譯目前反白的行,可能的值有 'none'、'gutter'、'line' 和 'all'。", "codeLens": "控制編輯器是否顯示程式碼濾鏡", "folding": "控制編輯器是否已啟用程式碼摺疊功能", + "showFoldingControls": "自動隱藏摺疊控制向", "matchBrackets": "當選取某側的括號時,強調顯示另一側的配對括號。", "glyphMargin": "控制編輯器是否應轉譯垂直字符邊界。字符邊界最常用來進行偵錯。", "useTabStops": "插入和刪除接在定位停駐點後的空白字元", "trimAutoWhitespace": "移除尾端自動插入的空白字元", "stablePeek": "讓預覽編輯器在使用者按兩下其內容或點擊 Escape 時保持開啟。", "dragAndDrop": "控制編輯器是否允許透過拖放動作移動選取範圍。", + "accessibilitySupport.auto": "編輯器將使用平台 API 以偵測螢幕助讀程式附加。", + "accessibilitySupport.on": "編輯器將會為螢幕助讀程式的使用方式永久地最佳化。", + "accessibilitySupport.off": "編輯器不會為螢幕助讀程式的使用方式進行最佳化。", + "accessibilitySupport": "控制編輯器是否應於已為螢幕助讀程式最佳化的模式中執行。", "sideBySide": "控制 Diff 編輯器要並排或內嵌顯示差異", "ignoreTrimWhitespace": "控制 Diff 編輯器是否將開頭或尾端空白字元的變更顯示為差異", "renderIndicators": "控制 Diff 編輯器是否要為新增的/移除的變更顯示 +/- 標記", diff --git a/i18n/cht/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/cht/src/vs/editor/common/config/editorOptions.i18n.json index f48289922ad71..7d0a6fdde24db 100644 --- a/i18n/cht/src/vs/editor/common/config/editorOptions.i18n.json +++ b/i18n/cht/src/vs/editor/common/config/editorOptions.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "accessibilityOffAriaLabel": "編輯器現在無法存取。按Alt+F1尋求選項", "editorViewAccessibleLabel": "編輯器內容" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/cht/src/vs/editor/contrib/find/common/findController.i18n.json index 29657be9ff8c0..515b39749628b 100644 --- a/i18n/cht/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,5 @@ "addSelectionToPreviousFindMatch": "將選取項目加入前一個找到的相符項中", "moveSelectionToNextFindMatch": "將最後一個選擇項目移至下一個找到的相符項", "moveSelectionToPreviousFindMatch": "將最後一個選擇項目移至前一個找到的相符項", - "selectAllOccurencesOfFindMatch": "選取所有找到的相符項目", "changeAll.label": "變更所有發生次數" } \ No newline at end of file diff --git a/i18n/cht/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/cht/src/vs/editor/contrib/links/browser/links.i18n.json index 405dbdb09b960..6f5daa0aa3cf1 100644 --- a/i18n/cht/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "按住 Cmd 並按一下按鍵以追蹤連結", "links.navigate": "按住 Ctrl 並按一下滑鼠按鈕可連入連結", + "links.navigate.al": "按住Alt並點擊以追蹤連結", "invalid.url": "抱歉,因為此連結的語式不正確,所以無法加以開啟: {0}", "missing.url": "抱歉,因為此連結遺失目標,所以無法加以開啟。", "label": "開啟連結" diff --git a/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 5ee6d0db8a7ea..b3f68973521df 100644 --- a/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "aria.oneReference": "個符號位於 {0} 中的第 {1} 行第 {2} 欄", - "aria.fileReferences.1": "1 個符號位於 {0}", - "aria.fileReferences.N": "{0} 個符號位於 {1}", "aria.result.0": "找不到結果", "aria.result.1": "在 {0} 中找到 1 個符號", "aria.result.n1": "在 {1} 中找到 {0} 個符號", diff --git a/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 28f57ee6a5fc1..beb2f4690fc30 100644 --- a/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/cht/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -12,6 +12,7 @@ "readMore": "進一步了解...{0}", "suggestionWithDetailsAriaLabel": "{0},建議,有詳細資料", "suggestionAriaLabel": "{0},建議", + "readLess": "簡易說明...{0}", "suggestWidget.loading": "正在載入...", "suggestWidget.noSuggestions": "無建議。", "suggestionAriaAccepted": "{0},接受", diff --git a/i18n/cht/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/cht/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index 3c019fc1a1cb4..bf2bf87414cc4 100644 --- a/i18n/cht/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/cht/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -16,6 +16,7 @@ "schema.autoClosingPairs": "定義成對括弧。輸入左括弧時,即自動插入右括弧。", "schema.autoClosingPairs.notIn": "定義停用自動配對的範圍清單。", "schema.surroundingPairs": "定義可用以括住所選字串的成對括弧。", + "schema.wordPattern": "定義語言的文字", "schema.wordPattern.pattern": "使用正規表示式進行文字比對", "schema.wordPattern.flags": "使用正規表示式標記進行文字比對", "schema.wordPattern.flags.errorMessage": "必須符合樣式 `/^([gimuy]+)$/`" diff --git a/i18n/cht/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/cht/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 993d9fa74a6a0..8a8133f764f81 100644 --- a/i18n/cht/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/cht/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -21,6 +21,8 @@ "menus.scmTitle": "原始檔控制標題功能表", "menus.resourceGroupContext": "原始檔控制資源群組操作功能表", "menus.resourceStateContext": "原始檔控制資源群組狀態操作功能表", + "view.viewTitle": "這有助於查看標題功能表", + "view.itemContext": "這有助於查看項目內容功能表", "nonempty": "必須是非空白值。", "opticon": "屬性 `icon` 可以省略,否則必須為字串或類似 `{dark, light}` 的常值", "requireStringOrObject": "'{0}' 為必要屬性,且其類型必須是 'string' 或 'object'", diff --git a/i18n/cht/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/cht/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index f1ba5247c95d7..8586f1686ce66 100644 --- a/i18n/cht/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/cht/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "此封裝所代表的所有 VS Code 擴充功能比重。", "vscode.extension.preview": "將延伸模組設為在 Marketplace 中標幟為 [預覽]。", "vscode.extension.activationEvents": "VS Code 擴充功能的啟動事件。", + "vscode.extension.activationEvents.onLanguage": "當指定語言檔案開啟時激發該事件", + "vscode.extension.activationEvents.onCommand": "當指定的命令被調用時激發該事件", + "vscode.extension.activationEvents.onDebug": "當指定的工作偵錯階段開始時激發該事件", + "vscode.extension.activationEvents.workspaceContains": "當開啟指定的文件夾包含glob模式匹配的文件時激發該事件", + "vscode.extension.activationEvents.onView": "當指定的檢視被擴展時激發該事件", + "vscode.extension.activationEvents.star": "當VS Code啟動時激發該事件,為了確保最好的使用者體驗,當您的擴充功能沒有其他組合作業時,請激活此事件.", "vscode.extension.badges": "要顯示於 Marketplace 擴充頁面資訊看板的徽章陣列。", "vscode.extension.badges.url": "徽章映像 URL。", "vscode.extension.badges.href": "徽章連結。", diff --git a/i18n/cht/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/cht/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..72828dcc85cd2 --- /dev/null +++ b/i18n/cht/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "開新視窗", + "newWindowDesc": "開啟新視窗", + "recentFolders": "最近使用的資料夾", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/cht/src/vs/platform/markers/common/problemMatcher.i18n.json index cd3b3aa69fec9..a4b2c6583ccd6 100644 --- a/i18n/cht/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/cht/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,6 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "錯誤: 樣式屬性 {0} 不是有效的樣式變數名稱。", "ProblemMatcherParser.problemPattern.watchingMatcher": "問題比對器必須同時定義監控的開始模式和結束模式。", "ProblemMatcherParser.invalidRegexp": "錯誤: 字串 {0} 不是有效的規則運算式。\n", + "WatchingPatternSchema.regexp": "用來查看偵測背景工作開始或結束的正規表達式.", "WatchingPatternSchema.file": "檔案名稱的符合群組索引。可以省略。", "PatternTypeSchema.name": "所提供或預先定義之模式的名稱", "PatternTypeSchema.description": "問題模式或所提供或預先定義之問題模式的名稱。如有指定基底,即可發出。", @@ -42,6 +43,12 @@ "ProblemMatcherSchema.severity": "擷取項目問題的預設嚴重性。如果模式未定義嚴重性的符合群組,就會加以使用。", "ProblemMatcherSchema.applyTo": "控制文字文件上所回報的問題僅會套用至開啟的文件、關閉的文件或所有文件。", "ProblemMatcherSchema.fileLocation": "定義問題模式中所回報檔案名稱的解譯方式。", + "ProblemMatcherSchema.background": "偵測後台任務中匹配程序模式的開始與結束.", + "ProblemMatcherSchema.background.activeOnStart": "如果設置為 True,背景監控程式在工作啟動時處於主動模式。這相當於符合起始樣式的行。", + "ProblemMatcherSchema.background.beginsPattern": "如果於輸出中相符,則會指示背景程式開始。", + "ProblemMatcherSchema.background.endsPattern": "如果於輸出中相符,則會指示背景程式結束。", + "ProblemMatcherSchema.watching.deprecated": "關注屬性已被淘汰,請改用背景取代。", + "ProblemMatcherSchema.watching": "追蹤匹配程序的開始與結束。", "ProblemMatcherSchema.watching.activeOnStart": "如果設定為 True,監控程式在工作啟動時處於主動模式。這相當於發出符合 beginPattern 的行", "ProblemMatcherSchema.watching.beginsPattern": "如果在輸出中相符,則會指示監看工作開始。", "ProblemMatcherSchema.watching.endsPattern": "如果在輸出中相符,則會指示監看工作結束。", diff --git a/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json index 85fdbbbbdf2c9..f1a9772aec361 100644 --- a/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/cht/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -9,14 +9,14 @@ "foreground": "整體的前景色彩。僅當未被任何元件覆疊時,才會使用此色彩。", "errorForeground": "整體錯誤訊息的前景色彩。僅當未被任何元件覆蓋時,才會使用此色彩。", "descriptionForeground": "提供附加訊息的前景顏色,例如標籤", - "focusBorder": "焦點項目的整體邊界色彩。只在沒有任何元件覆寫此色彩時,才會加以使用。", - "contrastBorder": "項目周圍的額外邊界,可將項目從其他項目中區隔出來以提高對比。", + "focusBorder": "焦點項目的整體框線色彩。只在沒有任何元件覆寫此色彩時,才會加以使用。", + "contrastBorder": "項目周圍的額外框線,可將項目從其他項目中區隔出來以提高對比。", "activeContrastBorder": "使用中項目周圍的額外邊界,可將項目從其他項目中區隔出來以提高對比。", - "selectionBackground": "作業區域選取的背景顏色(例如輸入或文字區域)。請注意,這不適用於編輯器與終端機中的選取。", "textSeparatorForeground": "文字分隔符號的顏色。", "textLinkForeground": "內文連結的前景色彩", "textLinkActiveForeground": "內文使用連結的前景色彩", "textPreformatForeground": "提示及建議文字的前景色彩。", + "textBlockQuoteBackground": "文內引用區塊背景色彩。", "textBlockQuoteBorder": "引用文字的框線顏色。", "textCodeBlockBackground": "文字區塊的背景顏色。", "widgetShadow": "小工具的陰影色彩,例如編輯器中的尋找/取代。", @@ -35,11 +35,13 @@ "dropdownForeground": "下拉式清單的前景。", "dropdownBorder": "下拉式清單的框線。", "listFocusBackground": "當清單/樹狀為使用中狀態時,焦點項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", + "listFocusForeground": "當清單/樹狀為使用中狀態時,焦點項目的清單/樹狀前景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", "listActiveSelectionBackground": "當清單/樹狀為使用中狀態時,所選項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", "listActiveSelectionForeground": "當清單/樹狀為使用中狀態時,所選項目的清單/樹狀前景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", "listInactiveSelectionBackground": "當清單/樹狀為非使用中狀態時,所選項目的清單/樹狀背景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中者則沒有。", "listInactiveSelectionForeground": "當清單/樹狀為使用中狀態時,所選項目的清單/樹狀前景色彩。使用中的清單/樹狀有鍵盤焦點,非使用中則沒有。", "listHoverBackground": "使用滑鼠暫留在項目時的清單/樹狀背景。", + "listHoverForeground": "滑鼠暫留在項目時的清單/樹狀前景。", "listDropBackground": "使用滑鼠四處移動項目時的清單/樹狀拖放背景。", "highlight": "在清單/樹狀內搜尋時,相符醒目提示的清單/樹狀前景色彩。", "pickerGroupForeground": "分組標籤的快速選擇器色彩。", @@ -57,6 +59,7 @@ "editorBackground": "編輯器的背景色彩。", "editorForeground": "編輯器的預設前景色彩。", "editorWidgetBackground": "編輯器小工具的背景色彩,例如尋找/取代。", + "editorWidgetBorder": "編輯器小工具的邊界色彩。小工具選擇擁有邊界或色彩未被小工具覆寫時,才會使用色彩。", "editorSelection": "編輯器選取範圍的色彩。", "editorInactiveSelection": "非使用中之編輯器選取範圍的色彩。", "editorSelectionHighlight": "選取時,內容相同之區域的色彩。", @@ -70,5 +73,12 @@ "diffEditorInserted": "插入文字的背景色彩。", "diffEditorRemoved": "移除文字的背景色彩。", "diffEditorInsertedOutline": "插入的文字外框色彩。", - "diffEditorRemovedOutline": "移除的文字外框色彩。" + "diffEditorRemovedOutline": "移除的文字外框色彩。", + "mergeCurrentHeaderBackground": "目前內嵌合併衝突中的深色標題背景。", + "mergeCurrentContentBackground": "目前內嵌合併衝突中的內容背景。", + "mergeIncomingHeaderBackground": "傳入內嵌合併衝突中的深色標題背景。", + "mergeIncomingContentBackground": "傳入內嵌合併衝突中的內容背景。", + "mergeBorder": "內嵌合併衝突中標頭及分隔器的邊界色彩。", + "overviewRulerCurrentContentForeground": "目前內嵌合併衝突的概觀尺規前景。", + "overviewRulerIncomingContentForeground": "傳入內嵌合併衝突的概觀尺規前景。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/cht/src/vs/workbench/api/node/extHostTask.i18n.json index 8b6ad71cd4e6d..4b90a12aaf247 100644 --- a/i18n/cht/src/vs/workbench/api/node/extHostTask.i18n.json +++ b/i18n/cht/src/vs/workbench/api/node/extHostTask.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json index 028bfb1a1d027..edc32bace6e95 100644 --- a/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json +++ b/i18n/cht/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "treeView.notRegistered": "未註冊識別碼為 '{0}' 的樹狀檢視。", + "treeItem.notFound": "找不到識別碼為 '{0}' 的樹狀檢視。", "treeView.duplicateElement": "元件{0}已被註冊" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/cht/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index f5d3fe58b6219..e2c33864cd6df 100644 --- a/i18n/cht/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "隱藏活動列", - "activityBarAriaLabel": "即時檢視切換器" + "activityBarAriaLabel": "即時檢視切換器", + "globalActions": "全域動作" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/cht/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 3ee2576e0d359..54beb87e59b5f 100644 --- a/i18n/cht/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -10,7 +10,7 @@ "multiSelection": "{0} 個選取項目", "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", - "tabFocusModeEnabled": "用 Tab 鍵移動焦點", + "screenReaderDetectedExtra": "若您不打算使用螢幕助讀程式,請將設定 `editor.accessibilitySupport` 變更為 \"off\"。", "disableTabMode": "停用協助工具模式", "gotoLine": "移至行", "indentation": "縮排", diff --git a/i18n/cht/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/cht/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..4e28880164248 --- /dev/null +++ b/i18n/cht/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "移至檔案...", + "quickNavigateNext": "在 Quick Open 中導覽至下一項", + "quickNavigatePrevious": "在 Quick Open 中導覽至上一項", + "quickSelectNext": "在 Quick Open 中選取下一個", + "quickSelectPrevious": "在 Quick Open 中選取上一個" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/browser/quickopen.i18n.json b/i18n/cht/src/vs/workbench/browser/quickopen.i18n.json index c47858a81d205..cab0a05a7b4a3 100644 --- a/i18n/cht/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "沒有相符的結果", "noResultsFound2": "找不到結果", - "entryAriaLabel": "{0},命令", - "noCommands": "沒有相符的命令" + "entryAriaLabel": "{0},命令" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/browser/viewlet.i18n.json b/i18n/cht/src/vs/workbench/browser/viewlet.i18n.json index 26801a4aefd57..690069abe9667 100644 --- a/i18n/cht/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/cht/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "全部摺疊", - "viewToolbarAriaLabel": "{0} 個動作" + "collapse": "全部摺疊" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/common/theme.i18n.json b/i18n/cht/src/vs/workbench/common/theme.i18n.json index ae6c513e6ceb9..938086e4262e6 100644 --- a/i18n/cht/src/vs/workbench/common/theme.i18n.json +++ b/i18n/cht/src/vs/workbench/common/theme.i18n.json @@ -7,28 +7,42 @@ "tabActiveBackground": "使用中之索引標籤的背景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", "tabInactiveBackground": "非使用中之索引標籤的背景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", "tabBorder": "用以分隔索引標籤彼此的框線。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", + "tabActiveForeground": "使用中的群組內,使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", + "tabInactiveForeground": "使用中的群組內,非使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", + "tabUnfocusedActiveForeground": "非使用中的群組內,使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", + "tabUnfocusedInactiveForeground": "非使用中的群組內,非使用中之索引標籤的前景色彩。索引標籤是編輯器在編輯器區域中的容器。同一個編輯器群組中的多個索引標籤可以同時開啟。可能會有多個編輯器群組。", "editorGroupBackground": "編輯器群組的背景色彩。編輯器群組是編輯器的容器。當拖曳編輯器群組時會顯示背景色彩。", + "tabsContainerBackground": "當索引標籤啟用的時候編輯器群組標題的背景色彩。編輯器群組是編輯器的容器。", + "tabsContainerBorder": "當索引標籤啟用時,編輯器群組標題的框線色彩。編輯器群組是編輯器的容器。", "editorGroupHeaderBackground": "當索引標籤禁用的時候編輯器群組標題的背景顏色。編輯器群組是編輯器的容器。", "editorGroupBorder": "用以分隔多個編輯器群組彼此的色彩。編輯器群組是編輯器的容器。", + "editorDragAndDropBackground": "拖拉編輯器時的背景顏色,可設置透明度讓內容穿透顯示.", + "panelBackground": "面板的前景色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "panelBorder": "面板頂端用以分隔編輯器的邊框色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "panelActiveTitleForeground": "使用中之面板標題的標題色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "panelInactiveTitleForeground": "非使用中之面板標題的標題色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "panelActiveTitleBorder": "使用中之面板標題的框線色彩。面板會顯示在編輯器區域的下方,其中包含諸如輸出與整合式終端機等檢視。", "statusBarForeground": "狀態列的前景色彩。狀態列會顯示在視窗的底部。", "statusBarBackground": "標準狀態列的背景色彩。狀態列會顯示在視窗的底部。", + "statusBarBorder": "用以分隔資訊看板與編輯器的狀態列框線色彩。狀態列會顯示在視窗的底部。", "statusBarNoFolderBackground": "當未開啟任何資料夾時,狀態列的背景色彩。狀態列會顯示在視窗的底部。", + "statusBarNoFolderForeground": "當未開啟任何資料夾時,狀態列的前景色彩。狀態列會顯示在視窗的底部。", "statusBarItemActiveBackground": "按下滑鼠按鈕時,狀態列項目的背景色彩。狀態列會顯示在視窗的底部。", "statusBarItemHoverBackground": "動態顯示時,狀態列項目的背景色彩。狀態列會顯示在視窗的底部。", "statusBarProminentItemBackground": "狀態列突出項目的背景顏色。突出項目比狀態列的其他項目更顯眼,用於表示重要性更高。狀態列會顯示在視窗的底部。", "statusBarProminentItemHoverBackground": "狀態列突出項目暫留時的背景顏色。突出項目比狀態列的其他項目更顯眼,用於表示重要性更高。狀態列會顯示在視窗的底部。", "activityBarBackground": "活動列背景的色彩。活動列會顯示在最左側或最右側,並可切換不同的提要欄位檢視。", "activityBarForeground": "活動列的前背景色彩(例如用於圖示)。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", + "activityBarBorder": "用以分隔提要欄位的活動列框線色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", + "activityBarDragAndDropBackground": "拖拉活動徽章項目時的色彩.顏色可設置透明度讓原活動徽章可穿透顯示.活動徽章列表會出現在最左側或最右側並允許切換不同的檢視.", "activityBarBadgeBackground": "活動通知徽章的背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", "activityBarBadgeForeground": "活動通知徽章的前背景色彩。此活動列會顯示在最左側或最右側,讓您可以切換提要欄位的不同檢視。", "sideBarBackground": "提要欄位的背景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", "sideBarForeground": "側欄的前景顏色.側欄包含Explorer與搜尋.", + "sideBarBorder": "用以分隔編輯器的側邊提要欄位框線色彩。該提要欄位是檢視 (例如 Explorer 及搜尋) 的容器。", "sideBarTitleForeground": "提要欄位標題的前景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", "sideBarSectionHeaderBackground": "提要欄位區段標頭的背景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", + "sideBarSectionHeaderForeground": "提要欄位區段標頭的前景色彩。提要欄位是檢視 (例如 Explorer 與搜尋) 的容器。", "titleBarActiveForeground": "作用中視窗之標題列的前景。請注意,目前只有 macOS 支援此色彩。", "titleBarInactiveForeground": "非作用中視窗之標題列的前景。請注意,目前只有 macOS 支援此色彩。", "titleBarActiveBackground": "作用中視窗之標題列的背景。請注意,目前只有 macOS 支援此色彩。", diff --git a/i18n/cht/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/actions.i18n.json index 5268fd64574f1..4bb693a3d1f98 100644 --- a/i18n/cht/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/cht/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "關閉編輯器", "closeWindow": "關閉視窗", - "switchWindow": "切換視窗", - "switchWindowPlaceHolder": "選取視窗", - "current": "目前視窗", "closeFolder": "關閉資料夾", "noFolderOpened": "此執行個體中目前沒有開啟的資料夾可以關閉。", "newWindow": "開新視窗", @@ -20,7 +17,7 @@ "zoomReset": "重設縮放", "appPerf": "啟動效能", "reloadWindow": "重新載入視窗", - "openRecent": "開啟最近使用的檔案", + "current": "目前視窗", "folders": "資料夾", "files": "檔案", "openRecentPlaceHolderMac": "選取路徑 (按住 Cmd 鍵以在新視窗開啟)", @@ -32,10 +29,6 @@ "openDocumentationUrl": "文件", "openIntroductoryVideosUrl": "簡介影片", "toggleSharedProcess": "切換共用處理序", - "navigateLeft": "移至 [檢視左側]", - "navigateRight": "移至 [檢視右側]", - "navigateUp": "移至 [檢視上方]", - "navigateDown": "移至 [檢視下方]", "increaseViewSize": "增加目前的檢視大小", "decreaseViewSize": "縮小目前的檢視大小" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json index bced8b136e5de..7fcb8f4533b2e 100644 --- a/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -31,10 +31,6 @@ "window.openFoldersInNewWindow.off": "資料夾會取代上一個使用中的視窗", "window.openFoldersInNewWindow.default": "除非已從應用程式內挑選了資料夾 (例如透過 [檔案] 功能表),否則資料夾會在新視窗中開啟", "openFoldersInNewWindow": "控制資料夾應在新視窗中開啟或取代上一個使用中的視窗。\n- default: 除非已從應用程式內挑選資料夾 (例如,透過 [檔案] 功能表),否則會在新視窗開啟\n- on: 資料夾會在新視窗開啟\n- off: 資料夾會取代上一個使用中視窗\n請注意,在某些情況下會略過此設定 (例如,使用了 -new-window 或 -reuse-window 命令列選項時)。", - "window.reopenFolders.none": "一律不重新開啟資料夾。", - "window.reopenFolders.one": "重新開啟上一個使用中的資料夾。", - "window.reopenFolders.all": "重新開啟上一個工作階段的所有資料夾。", - "reopenFolders": "控制重新啟動後重新開啟資料夾的方式。選取 [none] 永不重新開啟資料夾,選取 [one] 重新開啟最近一個使用的資料夾,或選取 [all] 重新開啟上一個工作階段的所有資料夾。", "restoreFullscreen": "控制當視窗在全螢幕模式下結束後,下次是否仍以全螢幕模式開啟。", "zoomLevel": "調整視窗的縮放比例。原始大小為 0,而且每個向上增量 (例如 1) 或向下增量 (例如 -1) 代表放大或縮小 20%。您也可以輸入小數,更細微地調整縮放比例。", "title": "控制使用中之編輯器上的視窗標題。變數會依內容替換: \n${activeEditorShort}: 例如 myFile.txt\n${activeEditorMedium}: 例如 myFolder/myFile.txt\n${activeEditorLong}: 例如 /Users/Development/myProject/myFolder/myFile.txt\n${rootName}: 例如 myProject\n${rootPath}: 例如 /Users/Development/myProject\n${appName}: 例如 VS Code\n${dirty}: 若使用中的編輯器已變更,即為已變更的指標\n${separator}: 條件式分隔符號 (\" - \"),只會在前後有包含值的變數時顯示", @@ -42,11 +38,13 @@ "window.newWindowDimensions.inherit": "以相同於上一個使用中之視窗的維度開啟新視窗。", "window.newWindowDimensions.maximized": "開啟並最大化新視窗。", "window.newWindowDimensions.fullscreen": "在全螢幕模式下開啟新視窗。", + "newWindowDimensions": "控制當至少一個視窗已打開的情況下開啟新視窗的維度。根據預設,新視窗會以小型維度在畫面中央開啟。設為 'inherit' 時,視窗的維度會和最後開啟的視窗相同。設為 'maximized' 時,視窗會開到最大,若設為 'fullscreen' 則全螢幕開啟。", "window.menuBarVisibility.default": "只在全螢幕模式時隱藏功能表。", "window.menuBarVisibility.visible": "一律顯示功能表,即使在全螢幕模式時亦然。", "window.menuBarVisibility.toggle": "隱藏功能表,但可經由 Alt 鍵加以顯示。", "window.menuBarVisibility.hidden": "一律隱藏功能表。", "menuBarVisibility": "控制功能表列的可見度。[切換] 設定表示會隱藏功能表列,按一下 Alt 鍵則會顯示。除非視窗是全螢幕,否則預設會顯示功能表列。", + "enableMenuBarMnemonics": "啟用後可以利用Alt快捷鍵打開主選單.關閉記憶選單將Alt快捷鍵綁定至替代的命令區塊.", "autoDetectHighContrast": "若啟用,如果 Windows 使用高對比佈景主題,就會自動變更為高對比佈景主題,切換掉 Windows 高對比佈景主題時則變更為深色佈景主題。", "titleBarStyle": "調整視窗標題列的外觀。變更需要完整重新啟動才會套用。", "window.nativeTabs": "啟用 macOS Sierra 視窗索引標籤。請注意需要完全重新啟動才能套用變更,並且完成設定後原始索引標籤將會停用自訂標題列樣式。", @@ -56,5 +54,7 @@ "zenMode.hideTabs": "控制開啟 Zen Mode 是否也會隱藏 Workbench 索引標籤。", "zenMode.hideStatusBar": "控制開啟 Zen Mode 是否也會隱藏 Workbench 底部的狀態列。", "zenMode.hideActivityBar": "控制開啟 Zen Mode 是否也會隱藏 Workbench 左方的活動列。", - "zenMode.restore": "控制視窗如果在 Zen Mode 下結束,是否應還原為 Zen Mode。" + "zenMode.restore": "控制視窗如果在 Zen Mode 下結束,是否應還原為 Zen Mode。", + "workspaceConfigurationTitle": "工作區", + "files.exclude.boolean": "要符合檔案路徑的 Glob 模式。設為 True 或 False 可啟用或停用模式。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..9e13a86b296f4 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "現在請將設定 `editor.accessibilitySupport` 變更為 'on'。", + "openingDocs": "現在請開啟 VS Code 協助工具文件頁面。", + "introMsg": "感謝您試用 VS Code 的協助工具選項。", + "status": "狀態:", + "changeConfigToOnMac": "若要將編輯器為螢幕助讀程式的使用方式設定為永久地最佳化,現在請按 Command+E。", + "changeConfigToOnWinLinux": "若要將編輯器為螢幕助讀程式的使用方式設定為永久地最佳化,現在請按 Control+E。", + "auto_unknown": "編輯器已設定為使用平台 API 以偵測螢幕助讀程式附加,但是目前的執行階段不支援。", + "auto_on": "編輯器已自動偵測到螢幕助讀程式附加。", + "auto_off": "編輯器已設定為自動偵測螢幕助讀程式附加,但目前的實際狀況卻不是如此。", + "configuredOn": "編輯器已為螢幕助讀程式的使用方式設定為永久地更新 - 您可以藉由編輯設定 `editor.accessibilitySupport` 以變更這項設定。", + "configuredOff": "編輯器已設定為不會為螢幕助讀程式的使用方式進行最佳化。", + "tabFocusModeOnMsg": "在目前的編輯器中按 Tab 鍵會將焦點移至下一個可設定焦點的元素。按 {0} 可切換此行為。", + "tabFocusModeOnMsgNoKb": "在目前的編輯器中按 Tab 鍵會將焦點移至下一個可設定焦點的元素。命令 {0} 目前無法由按鍵繫結關係觸發。", + "tabFocusModeOffMsg": "在目前的編輯器中按 Tab 鍵會插入定位字元。按 {0} 可切換此行為。", + "tabFocusModeOffMsgNoKb": "在目前的編輯器中按 Tab 鍵會插入定位字元。命令 {0} 目前無法由按鍵繫結關係觸發。", + "openDocMac": "現在請按 Command+H 以開啟具有更多與協助工具相關 VS Code 資訊的瀏覽器視窗。", + "openDocWinLinux": "現在請按 Control+H 以開啟具有更多與協助工具相關 VS Code 資訊的瀏覽器視窗。", + "outroMsg": "您可以按 Esc 鍵或 Shift+Esc 鍵來解除此工具提示並返回編輯器。", + "ShowAccessibilityHelpAction": "顯示協助工具說明" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..fef7fe532f8f2 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "切換至多游標修改程式" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index c2ab22390ca55..b1e2ccbfec457 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "開啟 {0}", "launchJsonNeedsConfigurtion": "設定或修正 'launch.json'", + "noFolderDebugConfig": "請先打開一個資料夾以便設定進階偵錯組態。", "startDebug": "開始偵錯", "startWithoutDebugging": "開始但不偵錯", "selectAndStartDebugging": "選取並開始偵錯", diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json index 8b6ad71cd4e6d..b5bfc8d474b30 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "noFolderDebugConfig": "請先打開一個資料夾以便設定進階偵錯組態。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json index e199cca677554..e6e2542dc0a73 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json @@ -5,16 +5,12 @@ // Do not edit this file. It is machine generated. { "variablesSection": "變數區段", - "variables": "變數", "variablesAriaTreeLabel": "偵錯變數", "expressionsSection": "運算式區段", - "watch": "監看", "watchAriaTreeLabel": "對監看運算式執行偵錯", "callstackSection": "呼叫堆疊區段", "debugStopped": "於 {0} 暫停", - "callStack": "呼叫堆疊", "callStackAriaLabel": "偵錯呼叫堆疊", "breakpointsSection": "中斷點區段", - "breakpoints": "中斷點", "breakpointsAriaTreeLabel": "偵錯中斷點" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index ae46ae65a607f..d77b4677ceadc 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "複製值", "copy": "複製", + "copyAll": "全部複製", "copyStackTrace": "複製呼叫堆疊" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index 259df04a8b178..81362151ea4a1 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "對程式執行偵錯時狀態列的背景色彩。狀態列會顯示在視窗的底部" + "statusBarDebuggingBackground": "對程式執行偵錯時狀態列的背景色彩。狀態列會顯示在視窗的底部", + "statusBarDebuggingForeground": "對程式執行偵錯時狀態列的前景色彩。狀態列會顯示在視窗的底部" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/cht/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index fbd7d7b23df6e..246786aab6cf2 100644 --- a/i18n/cht/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "偵錯配接器可執行檔 '{0}' 不存在。", "debugAdapterCannotDetermineExecutable": "無法判斷偵錯配接器 '{0}' 的可執行檔。", "debugType": "組態的類型。", + "debugTypeNotRecognised": "無法辨識此偵錯類型.請確認已有安裝並啟用相對應的偵錯擴充功能.", "node2NotSupported": "\"node2\" 已不再支援,請改用 \"node\",並將 \"protocol\" 屬性設為 \"inspector\"。", "debugName": "組態的名稱; 出現在啟動組態下拉式功能表中。", "debugRequest": "要求組態的類型。可以是 [啟動] 或 [附加]。", diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index 9c79dedc0ca60..cc8a2f3862077 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "previousEditPoint": "Emmet: 上一個編輯端點", - "nextEditPoint": "Emmet: 下一個編輯端點" + "previousEditPoint": "Emmet: 前往上一個編輯端點", + "nextEditPoint": "Emmet: 前往下一個編輯端點" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index fa22b35c419d0..0766d1cdedb10 100644 --- a/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -9,5 +9,6 @@ "emmetPreferences": "喜好設定,用以修改某些動作的行為及 Emmet 的解析程式。", "emmetSyntaxProfiles": "為指定的語法定義設定檔,或透過特定規則使用自己的設定檔。", "emmetExclude": "不應展開 Emmet 縮寫的語言陣列。", - "emmetExtensionsPath": "包含 Emmet 設定檔、程式碼片段及參考的資料夾路徑" + "emmetExtensionsPath": "包含 Emmet 設定檔、程式碼片段及參考的資料夾路徑", + "useNewEmmet": "試試所有 Emmet 功能的新 Emmet 模組 (最終會取代舊的單一 Emmet 程式庫)。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 2badec430e0fd..3d0e6b6a5b66e 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,10 @@ "default": "預設", "debuggers": "偵錯工具 ({0})", "debugger name": "名稱", + "views": "瀏覽次數 ({0})", + "view id": "識別碼", + "view name": "名稱", + "view location": "位置", "themes": "佈景主題 ({0})", "JSON Validation": "JSON 驗證 ({0})", "commands": "命令 ({0})", diff --git a/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 7e0eff0f087ce..dce745aeaf805 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,6 +22,8 @@ "disableGloballyAction": "永遠", "disableAction": "停用", "checkForUpdates": "查看是否有更新", + "enableAutoUpdate": "啟用自動更新延伸模組", + "disableAutoUpdate": "停用自動更新延伸模組", "updateAll": "更新所有延伸模組", "reloadAction": "重新載入", "postUpdateTooltip": "重新載入以更新", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "顯示工作區的建議擴充功能", "showRecommendedKeymapExtensions": "顯示建議的按鍵對應", "showRecommendedKeymapExtensionsShort": "按鍵對應", + "showLanguageExtensions": "顯示語言擴充功能", + "showLanguageExtensionsShort": "語言擴充功能", "configureWorkspaceRecommendedExtensions": "設定建議的延伸模組 (工作區)", "ConfigureWorkspaceRecommendations.noWorkspace": "只有在工作區資料夾中才能使用建議。", "OpenExtensionsFile.failed": "無法在 '.vscode' 資料夾 ({0}) 中建立 'extensions.json' 檔案。", @@ -51,5 +55,8 @@ "disableAll": "停用所有已安裝的延伸模組", "disableAllWorkspace": "停用此工作區的所有已安裝延伸模組", "enableAll": "啟用所有已安裝的延伸模組", - "enableAllWorkspace": "啟用此工作區的所有已安裝延伸模組" + "enableAllWorkspace": "啟用此工作區的所有已安裝延伸模組", + "extensionButtonProminentBackground": "突出的動作延伸模組按鈕背景色彩 (例如,[安裝] 按鈕)。", + "extensionButtonProminentForeground": "突出的動作延伸模組按鈕前景色彩 (例如,[安裝] 按鈕)。", + "extensionButtonProminentHoverBackground": "突出的動作延伸模組按鈕背景暫留色彩 (例如,[安裝] 按鈕)。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 7855f3a13f51b..9e97614cd5ee4 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -9,6 +9,8 @@ "neverShowAgain": "不要再顯示", "close": "關閉", "workspaceRecommended": "此工作區具有擴充功能建議。", + "ignoreExtensionRecommendations": "是否略過所有建議的擴充功能?", + "ignoreAll": "是,略過全部", "no": "否", "cancel": "取消" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index ee54fc14d14f0..c0f0b8275588f 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -10,5 +10,6 @@ "extensions": "擴充功能", "view": "檢視", "extensionsConfigurationTitle": "擴充功能", - "extensionsAutoUpdate": "自動更新擴充功能" + "extensionsAutoUpdate": "自動更新擴充功能", + "extensionsIgnoreRecommendations": "忽略延伸模組建議" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 6394eecabd8b9..8c853f39a8303 100644 --- a/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,8 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "disableOtherKeymapsConfirmation": "要停用其他按鍵對應 ({0}),以避免按鍵繫結關係間的衝突嗎?", "yes": "是", "no": "否", + "betterMergeDisabled": "目前已內建 Better Merge 延伸模組,安裝的延伸模組已停用並且可以移除。", "uninstall": "解除安裝", "later": "稍後" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 5b044579208f6..777013462f05b 100644 --- a/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,6 +16,7 @@ "associations": "將檔案關聯設定為語言 (例如 \"*.extension\": \"html\")。這些語言優先於已安裝語言的預設關聯。", "encoding": "讀取與寫入檔案時要使用的預設字元集編碼。", "autoGuessEncoding": "如有啟用,將會在開啟檔案時,嘗試猜測字元集編碼", + "eol": "預設結尾斷行字元.LF使用 \\n , CRLF使用\\r\\n ", "trimTrailingWhitespace": "若啟用,將在儲存檔案時修剪尾端空白。", "insertFinalNewline": "啟用時,請在儲存檔案時在其結尾插入最後一個新行。", "files.autoSave.off": "已變更的檔案一律不會自動儲存。", @@ -26,6 +27,7 @@ "autoSaveDelay": "控制要自動儲存已變更之檔案前必須經過的延遲時間 (毫秒)。僅當 'files.autoSave' 設為 \"{0}\" 時才適用。", "watcherExclude": "將檔案路徑的 Glob 模式設定為從檔案監控排除。需要重新啟動才能變更此設定。當您發現 Code 在啟動時使用大量 CPU 時間時,可以排除較大的資料夾以降低初始負載。", "hotExit.off": "停用 Hot Exit。", + "hotExit.onExit": "Hot Exit 將會在關閉應用程式時觸發,也就是在 Windows/Linux 上關閉上一個視窗,或是觸發 workbench.action.quit 命令 (命令選擇區、按鍵繫結關係、功能表) 時觸發。具有備份的所有視窗都會在下次啟動時還原。", "hotExit": "控制是否讓不同工作階段記住未儲存的檔案,並允許在結束編輯器時跳過儲存提示。", "defaultLanguage": "指派給新檔案的預設語言模式。", "editorConfigurationTitle": "編輯器", diff --git a/i18n/cht/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/cht/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index daa9489ee2bcc..6083b4139ccd8 100644 --- a/i18n/cht/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -5,7 +5,5 @@ // Do not edit this file. It is machine generated. { "explorerSection": "檔案總管區段", - "noWorkspace": "沒有開啟的資料夾", - "noWorkspaceHelp": "您尚未開啟資料夾。", "openFolder": "開啟資料夾" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/cht/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index bb6c9f7b0a8fd..4279cc7e911c6 100644 --- a/i18n/cht/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "開放式編輯器區段", "openEditors": "已開啟的編輯器", + "openEditosrSection": "開放式編輯器區段", "treeAriaLabel": "開啟的編輯器: 使用中檔案的清單", "dirtyCounter": "{0} 未儲存" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index f36b3a04dbaf4..2699d76ae0960 100644 --- a/i18n/cht/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -9,5 +9,7 @@ "prof.message": "已成功建立設定檔。", "prof.detail": "請建立問題,並手動附加下列檔案:\n{0}", "prof.restartAndFileIssue": "建立問題並重新啟動", - "prof.restart": "重新啟動" + "prof.restart": "重新啟動", + "prof.thanks": "感謝您的協助", + "prof.detail.restart": "需要重新啟動才能夠繼續使用'{0}‘.再次感謝您的回饋." } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 799796b51ffde..96477e8cd2891 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "定義按鍵繫結關係", - "defineKeybinding.kbLayoutErrorMessage": "您無法在目前的鍵盤配置下產生此按鍵組合。" + "defineKeybinding.kbLayoutErrorMessage": "您無法在目前的鍵盤配置下產生此按鍵組合。", + "defineKeybinding.kbLayoutLocalAndUSMessage": "**{0}**針對您目前的按鍵配置(**{1}**為美國標準)", + "defineKeybinding.kbLayoutLocalMessage": "**{0}**針對您目前的鍵盤配置" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index d55154b3d4292..7179fe0d56b70 100644 --- a/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "無法寫入設定.請開啟使用者設定並修正檔案中的錯誤/警告後再試一次.", "editTtile": "編輯", "replaceDefaultValue": "在設定中取代", "copyDefaultValue": "複製到設定", diff --git a/i18n/cht/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/cht/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index 57c6be161054c..6f93d38ba4b15 100644 --- a/i18n/cht/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "顯示所有命令", + "showCommands.label": "命令選擇區...", "entryAriaLabelWithKey": "{0}、{1}、命令", "entryAriaLabel": "{0},命令", "canNotRun": "無法從這裡執行命令 '{0}'。", diff --git a/i18n/cht/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..c58e0321baca9 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchMessage": "設定已經變更,必須重新啟動才會生效。", + "relaunchDetail": "請按 [重新啟動] 按鈕以重新啟動 {0} 並啟用設定。", + "restart": "重新啟動" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json index 8b6ad71cd4e6d..eea295d406662 100644 --- a/i18n/cht/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "editorGutterModifiedBackground": "修改中的行於編輯器邊框的背景色彩", + "editorGutterAddedBackground": "新增後的行於編輯器邊框的背景色彩", + "editorGutterDeletedBackground": "刪除後的行於編輯器邊框的背景色彩" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/cht/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index 0dacece483983..0780f0f62bdbe 100644 --- a/i18n/cht/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,5 +6,7 @@ { "searchMatches": "找到 {0} 個相符", "searchMatch": "找到 {0} 個相符", - "fileMatchAriaLabel": "資料夾 {2} 的檔案 {1} 中有 {0} 個相符,搜尋結果" + "fileMatchAriaLabel": "資料夾 {2} 的檔案 {1} 中有 {0} 個相符,搜尋結果", + "replacePreviewResultAria": "根據文字({3})在({2})欄位列表中將({1})替代為文字{{0}}", + "searchResultAria": "根據文字({2})並在({1})欄位列表中找到符合({0})的項目" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 4cb9c1367eea4..2789a5e845e9d 100644 --- a/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -9,5 +9,6 @@ "vscode.extension.contributes.snippets-path": "程式碼片段檔案的路徑。此路徑是擴充功能資料夾的相對路徑,而且一般會以 './snippets/' 開頭。", "invalid.language": "`contributes.{0}.language` 中的不明語言。提供的值: {1}", "invalid.path.0": "`contributes.{0}.path` 中的預期字串。提供的值: {1}", - "invalid.path.1": "要包含在擴充功能資料夾 ({2}) 中的預期 `contributes.{0}.path` ({1})。這可能會使擴充功能無法移植。" + "invalid.path.1": "要包含在擴充功能資料夾 ({2}) 中的預期 `contributes.{0}.path` ({1})。這可能會使擴充功能無法移植。", + "badVariableUse": "程式碼片段 \"{0}\" 很可能會混淆 snippet-variables 及 snippet-placeholders。如需詳細資料,請參閱 https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index 79eb6e8c71ce9..8db84c0d3ebbe 100644 --- a/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "空白程式碼片段", "snippetSchema.json": "使用者程式碼片段組態", "snippetSchema.json.prefix": "在 Intellisense 中選取程式碼片段時要使用的前置詞", - "snippetSchema.json.body": "程式碼片段內容。請針對變數使用 '${id}'、'${id:label}'、'${1:label}',並針對游標位置使用 '$0'、'$1'", + "snippetSchema.json.body": "程式碼片段內容。請使用 '$1', '${1:defaultText}' 以定義游標位置,並使用 '$0' 定義最終游標位置。將 '${varName}' and '${varName:defaultText}' 插入變數值,例如 'This is file: $TM_FILENAME'。", "snippetSchema.json.description": "程式碼片段描述。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..a74cdd763fc61 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "協助我們改善{0}", + "takeShortSurvey": "填寫簡短調查問卷", + "remindLater": "稍後再提醒我", + "neverAgain": "不要再顯示" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..260deed4c1d26 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "您願意填寫簡短的意見反應問卷嗎?", + "takeSurvey": "填寫問卷", + "remindLater": "稍後再提醒我", + "neverAgain": "不要再顯示" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..8ccb1a3828491 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "沒有工作相符" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index e35a088465013..6a8c26e1e1468 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0},工作" + "entryAriaLabel": "{0},工作", + "customizeTask": "自訂任務" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..8ccb1a3828491 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "沒有工作相符" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index e2b27a208b013..9320c66c86fb0 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -12,5 +12,6 @@ "ConfigurationParser.invalidVaraibleReference": "錯誤: problemMatcher 參考無效: {0}\n", "ConfigurationParser.noTaskName": "錯誤: 工作必須提供 taskName 屬性。即將忽略此工作。\n{0}\n", "taskConfiguration.shellArgs": "警告: 工作 '{0}' 是殼層命令,但命令名稱或其中一個引數有的未逸出的空格。若要確保命令列正確引述,請將引數合併到命令中。", + "taskConfiguration.noCommandOrDependsOn": "錯誤: 工作 '{0}' 未指定命令與 dependsOn 屬性。將會略過該工作。其定義為: \n{1}", "taskConfiguration.noCommand": "錯誤: 工作 '{0}' 未定義命令。即將略過該工作。其定義為:\n{1}" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index a08f7bd95bc77..44fe783df838d 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "其他命令選項", "JsonSchema.options.cwd": "所執行程式或指令碼的目前工作目錄。如果省略,則會使用 Code 的目前工作區根目錄。", "JsonSchema.options.env": "所執行程式或殼層的環境。如果省略,則會使用父處理序的環境。", + "JsonSchema.shellConfiguration": "設定要使用的殼層。", "JsonSchema.shell.executable": "要使用的殼層。", "JsonSchema.shell.args": "殼層引數。", "JsonSchema.command": "要執行的命令。可以是外部程式或殼層命令。", diff --git a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index b729447e97962..fa2e875a18e10 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "組態的版本號碼", + "JsonSchema._runner": "執行器已結束支援.請參考官方執行器屬性", + "JsonSchema.runner": "定義工作是否作為處理序執行,以及輸出會顯示在輸出視窗或終端機內。", "JsonSchema.windows": "Windows 特定命令組態", "JsonSchema.mac": "Mac 特定命令組態", "JsonSchema.linux": "Linux 特定命令組態", diff --git a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index b24501dac4e20..ad9741c08b95e 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -7,6 +7,10 @@ "JsonSchema.shell": "指定此命令是殼層命令或外部程式。如果省略,預設為 False。", "JsonSchema.tasks.dependsOn.string": "此工作相依的另一個工作。", "JsonSchema.tasks.dependsOn.array": "此工作相依的其他工作。", + "JsonSchema.tasks.group": "請定義此工作所屬的執行群組。若是省略此步驟,工作會屬於沒有群組。", + "JsonSchema.tasks.type": "定義工作是作為處理序或殼層中的命令執行。預設為處理序。", + "JsonSchema.version": "組態版本號碼", + "JsonSchema.tasks.customize": "要自訂的已提供工作。", "JsonSchema.windows": "Windows 特定命令組態", "JsonSchema.mac": "Mac 特定命令組態", "JsonSchema.linux": "Linux 特定命令組態" diff --git a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index c0537ee4cdfbc..9604a31ff96e2 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -22,7 +22,8 @@ "TaskService.noBuildTask": "未定義任何建置工作。請使用 'isBuildCommand' 標記 tasks.json 檔案中的工作。", "TaskService.noTestTask": "未定義任何建置工作。請使用 'isTestCommand' 標記 tasks.json 檔案中的工作。", "TaskServer.noTask": "找不到所要求要執行的工作 {0}。", - "TaskSystem.activeSame": "工作已在使用中並處於監看模式。若要終止工作,請使用 F1 > [終止工作]", + "customizeParseErrors": "當前的工作組態存在錯誤.請更正錯誤再執行工作.", + "moreThanOneBuildTask": "定義了很多建置工作於tasks.json.執行第一個.", "TaskSystem.active": "已有工作在執行。請先終止該工作,然後再執行其他工作。", "TaskSystem.restartFailed": "無法終止再重新啟動工作 {0}", "TaskSystem.configurationErrors": "錯誤: 提供的工作組態具有驗證錯誤而無法使用。請先更正這些錯誤。", diff --git a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 6fbf828e69e89..871f4fbea5ab1 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,7 @@ { "TerminalTaskSystem.unknownError": "執行工作時發生不明錯誤。如需詳細資訊,請參閱工作輸出記錄檔。", "TerminalTaskSystem.terminalName": "工作 - {0}", - "TerminalTaskSystem": "無法在 UNC 磁碟機上執行殼層命令。" + "reuseTerminal": "工作將被重新啟用.按任意鍵關閉.", + "TerminalTaskSystem": "無法在 UNC 磁碟機上執行殼層命令。", + "unkownProblemMatcher": "問題比對器 {0} 無法解析,比對器將予忽略。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/cht/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index 14a1145483abf..a61b95cb11771 100644 --- a/i18n/cht/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "執行工作時發生不明錯誤。如需詳細資訊,請參閱工作輸出記錄檔。", "TaskRunnerSystem.watchingBuildTaskFinished": "\n監看建置工作已完成。", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\n根據使用者要求已終止工作 '{0}'。" + "TaskRunnerSystem.cancelRequested": "\n根據使用者要求已終止工作 '{0}'。", + "unkownProblemMatcher": "問題比對器 {0} 無法解析,比對器將予忽略。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 1e92f6894ee39..88c335275098c 100644 --- a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -8,6 +8,7 @@ "workbench.action.terminal.kill": "終止使用中的終端機執行個體", "workbench.action.terminal.kill.short": "終止終端機", "workbench.action.terminal.copySelection": "複製選取項目", + "workbench.action.terminal.selectAll": "全選", "workbench.action.terminal.new": "建立新的整合式終端機", "workbench.action.terminal.new.short": "新增終端機", "workbench.action.terminal.focus": "聚焦終端機", @@ -26,5 +27,8 @@ "workbench.action.terminal.scrollUp": "向上捲動 (行)", "workbench.action.terminal.scrollUpPage": "向上捲動 (頁)", "workbench.action.terminal.scrollToTop": "捲動至頂端", - "workbench.action.terminal.clear": "清除" + "workbench.action.terminal.clear": "清除", + "workbench.action.terminal.allowWorkspaceShell": "允許工作區外觀配置", + "workbench.action.terminal.disallowWorkspaceShell": "不允許工作區外觀設置", + "workbench.action.terminal.rename": "重新命名" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index d6c50f67f6886..6016a0077c1c8 100644 --- a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "終端機的背景色彩,允許終端機和面板的色彩不同。", + "terminal.foreground": "終端機的前景色彩。", "terminal.ansiColor": "終端機中的 '{0}' ANSI 色彩。" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..f2ff92bce0706 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "尋找", + "placeholder.find": "尋找", + "label.previousMatchButton": "上一個符合項", + "label.nextMatchButton": "下一個相符項", + "label.closeButton": "關閉" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index d0d02ca0fc55d..6ac7e3480a4a2 100644 --- a/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "無法在終端機沒有焦點時複製終端機選取範圍", "terminal.integrated.exitedWithCode": "終端機處理序已終止,結束代碼為: {0}", "terminal.integrated.waitOnExit": "按任意鍵關閉終端機", "terminal.integrated.launchFailed": "無法啟動終端機處理序命令 `{0}{1}` (結束代碼: {2})" diff --git a/i18n/cht/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/cht/src/vs/workbench/parts/update/electron-browser/update.i18n.json index 942ed9430c3a7..763f5b45d61dd 100644 --- a/i18n/cht/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -15,5 +15,18 @@ "license": "閱讀授權", "updateAvailable": "{0} 重新啟動後將會更新。", "thereIsUpdateAvailable": "已有更新可用。", - "noUpdatesAvailable": "目前沒有可用的更新。" + "noUpdatesAvailable": "目前沒有可用的更新。", + "updateIsReady": "可用的更新", + "commandPalette": "命令選擇區...", + "settings": "設定", + "keyboardShortcuts": "鍵盤快速鍵(&&K)", + "selectTheme.label": "色彩佈景主題", + "themes.selectIconTheme.label": "檔案圖示佈景主題", + "not available": "無可用更新", + "checkingForUpdates": "正在查看是否有更新...", + "DownloadUpdate": "下載可用更新", + "DownloadingUpdate": "正在下載更新...", + "InstallingUpdate": "正在安裝更新...", + "restartToUpdate": "重新啟動以更新...", + "checkForUpdates": "查看是否有更新..." } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/cht/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..6894078d8f2b5 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} 個動作" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/cht/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..fcc72299d87a2 --- /dev/null +++ b/i18n/cht/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "項目必須為陣列", + "requirestring": "屬性 '{0}' 為強制項目且必須屬於 `string` 類型", + "optstring": "屬性 `{0}` 可以省略或必須屬於 `string` 類型", + "vscode.extension.contributes.view.id": "檢視的識別碼。請使用此識別碼透過 `vscode.window.registerTreeDataProviderForView` API 登錄資料提供者。並藉由將 `onView:${id}` 事件登錄至 `activationEvents` 以觸發啟用您的延伸模組。", + "vscode.extension.contributes.view.name": "使用人性化顯示名稱.", + "vscode.extension.contributes.views": "提供意見給編輯者", + "views.explorer": "檔案總管檢視", + "locationId.invalid": "`{0}`不是有效的識別位置" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 41c9f9e1a0dd2..440dfaba679ee 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -14,6 +14,7 @@ "welcomePage.moreRecent": "更多...", "welcomePage.noRecentFolders": "沒有最近使用的資料夾", "welcomePage.help": "說明", + "welcomePage.keybindingsCheatsheet": "閱覽鍵盤快速鍵", "welcomePage.introductoryVideos": "簡介影片", "welcomePage.productDocumentation": "產品文件", "welcomePage.gitHubRepository": "GitHub 存放庫", @@ -21,6 +22,7 @@ "welcomePage.showOnStartup": "啟動時顯示歡迎頁面", "welcomePage.customize": "自訂", "welcomePage.installExtensionPacks": "工具與語言", + "welcomePage.installExtensionPacksDescription": "安裝{0}與{1}的支援功能。", "welcomePage.moreExtensions": "更多", "welcomePage.installKeymapDescription": "安裝鍵盤快速鍵", "welcomePage.installKeymapExtension": "安裝鍵盤快速鍵{0}與{1}", @@ -29,7 +31,6 @@ "welcomePage.colorThemeDescription": "將編輯器及您的程式碼設定成您喜愛的外觀", "welcomePage.learn": "深入了解", "welcomePage.showCommands": "尋找及執行所有命令", - "welcomePage.showCommandsDescription": "從控制台快速存取及搜尋命令 ({0})", "welcomePage.interfaceOverview": "介面概觀", "welcomePage.interfaceOverviewDescription": "使用視覺覆疊效果強調顯示 UI 的主要元件", "welcomePage.interactivePlayground": "Interactive Playground", diff --git a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index 2e0c06390e3ec..0b34cedf5f5b0 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbenchConfigurationTitle": "工作台", - "welcomePage.enabled": "若啟用,會在啟動時顯示歡迎頁面。", "help": "說明" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 69d1bd41dadcf..815a7653f57cb 100644 --- a/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/cht/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "workbenchConfigurationTitle": "工作台", + "welcomePage.enabled": "若啟用,會在啟動時顯示歡迎頁面。", "welcomePage": "歡迎使用", "welcomePage.javaScript": "JavaScript", "welcomePage.typeScript": "TypeScript", @@ -13,13 +15,24 @@ "welcomePage.vim": "活力", "welcomePage.sublime": "壯麗", "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "支援功能{0}已被安裝。", + "welcomePage.willReloadAfterInstallingExtensionPack": "{0} 的其他支援安裝完成後,將會重新載入此視窗。", + "welcomePage.installingExtensionPack": "正在安裝 {0} 的其他支援...", + "welcomePage.extensionPackNotFound": "找不到ID為{1}的{0}支援功能.", "welcomePage.keymapAlreadyInstalled": "已安裝 {0} 鍵盤快速鍵。", "welcomePage.willReloadAfterInstallingKeymap": "{0} 鍵盤快速鍵安裝完成後,將會重新載入此視窗。", "welcomePage.installingKeymap": "正在安裝 {0} 鍵盤快速鍵...", "welcomePage.keymapNotFound": "找不到識別碼為 {1} 的 {0} 鍵盤快速鍵。", "welcome.title": "歡迎使用", + "welcomePage.openFolderWithPath": "透過路徑 {1} 開啟資料夾 {0}", "welcomePage.extensionListSeparator": ",", - "welcomePage.installedExtension": "{0}(已安裝)", + "welcomePage.installKeymap": "安裝 {0} 按鍵對應", + "welcomePage.installExtensionPack": "安裝 {0} 的其他支援", + "welcomePage.installedKeymap": "已安裝 {0} 按鍵對應", + "welcomePage.installedExtensionPack": "已安裝 {0} 支援", "ok": "確定", - "cancel": "取消" + "details": "詳細資料", + "cancel": "取消", + "welcomePage.buttonBackground": "起始頁面按鈕的背景色彩.", + "welcomePage.buttonHoverBackground": "起始頁面暫留於按鈕的背景色彩" } \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index d1d07b14ebd51..0121512656e19 100644 --- a/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/cht/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -6,6 +6,7 @@ { "open": "開啟設定", "close": "關閉", + "saveAndRetry": "儲存設定並重啟", "errorUnknownKey": "無法寫入組態檔 (不明的按鍵)", "errorInvalidTarget": "無法寫入組態檔 (目標無效)", "errorNoWorkspaceOpened": "無法寫入設定,因為沒有開啟資料夾,請開啟資料夾後再試一次.", diff --git a/i18n/cht/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/cht/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..e3e021a425489 --- /dev/null +++ b/i18n/cht/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "遙測", + "telemetry.enableCrashReporting": "允許將損毀報告傳送給 Microsoft。\n此選項需要重新啟動才會生效。" +} \ No newline at end of file diff --git a/i18n/cht/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/cht/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/cht/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/deu/extensions/git/package.i18n.json b/i18n/deu/extensions/git/package.i18n.json index 8383045471459..1fe0fda130cff 100644 --- a/i18n/deu/extensions/git/package.i18n.json +++ b/i18n/deu/extensions/git/package.i18n.json @@ -22,7 +22,7 @@ "command.commitStaged": "Commit bereitgestellt", "command.commitStagedSigned": "Bereitgestelltes committen (unterzeichnet)", "command.commitAll": "Commit für alle ausführen", - "command.commitAllSigned": "Alle committen (abgemeldet)", + "command.commitAllSigned": "Alle committen (unterzeichnet)", "command.undoCommit": "Letzten Commit rückgängig machen", "command.checkout": "Auschecken an...", "command.branch": "Branch erstellen...", @@ -32,7 +32,7 @@ "command.push": "Push", "command.pushTo": "Push zu...", "command.sync": "Synchronisierung", - "command.publish": "Veröffentlichen", + "command.publish": "Branch veröffentlichen", "command.showOutput": "Git-Ausgabe anzeigen", "config.enabled": "Gibt an, ob Git aktiviert ist.", "config.path": "Der Pfad zur ausführbaren Git-Datei.", @@ -44,5 +44,6 @@ "config.checkoutType": "Steuert, welcher Branchtyp beim Ausführen von \"Auschecken an...\" aufgelistet wird. \"Alle\" zeigt alle Verweise an, \"Lokal\" nur die lokalen Branches, \"Tags\" zeigt nur Tags an, und \"Remote\" zeigt nur Remotebranches an.", "config.ignoreLegacyWarning": "Ignoriert die Legacy-Git-Warnung.", "config.ignoreLimitWarning": "Ignoriert Warnung bei zu hoher Anzahl von Änderungen in einem Repository", + "config.defaultCloneDirectory": "Das Standard-Verzeichnis für einen Klon eines Git-Repositorys", "config.enableSmartCommit": "Alle Änderungen committen, wenn keine Änderungen bereitgestellt sind." } \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/deu/extensions/merge-conflict/out/codelensProvider.i18n.json index 8b6ad71cd4e6d..278e924d5a580 100644 --- a/i18n/deu/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/deu/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "acceptCurrentChange": "Aktuelle Änderung akzeptieren", + "acceptIncomingChange": "Eingehende Änderung akzeptieren", + "acceptBothChanges": "Beide Änderungen akzeptieren", + "compareChanges": "Änderungen vergleichen" +} \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json index f18cf16824649..c33f0f8ae6c8d 100644 --- a/i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/deu/extensions/merge-conflict/out/commandHandler.i18n.json @@ -4,6 +4,9 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "cursorNotInConflict": "Der Editor-Cursor ist nicht innerhalb eines Mergingkonflikts", + "compareChangesTitle": "{0}: Aktuelle Änderungen ⟷ Eingehende Änderungen", + "cursorOnSplitterRange": "Der Editor-Cursor ist innerhalb der Mergingkonfliktaufteilung, verschieben Sie ihn entweder in den Block \"aktuell\" oder \"eingehend\".", "noConflicts": "Keine Merge-Konflikte in dieser Datei gefunden", "noOtherConflictsInThisFile": "Keine weiteren Merge-Konflikte in dieser Datei" } \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/deu/extensions/merge-conflict/out/mergeDecorator.i18n.json index 8b6ad71cd4e6d..5ef895aeb90fe 100644 --- a/i18n/deu/extensions/merge-conflict/out/mergeDecorator.i18n.json +++ b/i18n/deu/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "currentChange": "(Aktuelle Änderung)", + "incomingChange": "(Eingehende Änderung)" +} \ No newline at end of file diff --git a/i18n/deu/extensions/merge-conflict/package.i18n.json b/i18n/deu/extensions/merge-conflict/package.i18n.json index 0875e460a99e6..5bbe54989dcf3 100644 --- a/i18n/deu/extensions/merge-conflict/package.i18n.json +++ b/i18n/deu/extensions/merge-conflict/package.i18n.json @@ -5,6 +5,16 @@ // Do not edit this file. It is machine generated. { "command.category": "Merge-Konflikt", + "command.accept.all-incoming": "Alle eingehenden akzeptieren", + "command.accept.all-both": "Alle beide akzeptieren", + "command.accept.current": "Aktuelles akzeptieren", + "command.accept.incoming": "Eingehendes akzeptieren", + "command.accept.selection": "Auswahl akzeptieren", "command.accept.both": "Beides akzeptieren", - "config.title": "Merge-Konflikt" + "command.next": "Nächster Konflikt", + "command.previous": "Vorheriger Konflikt", + "command.compare": "Aktuellen Konflikt vergleichen", + "config.title": "Merge-Konflikt", + "config.codeLensEnabled": "CodeLens-Mergingkonfliktblock im Editor aktivieren/deaktivieren", + "config.decoratorsEnabled": "Mergingkonflikt-Decorators im Editor aktivieren/deaktivieren" } \ No newline at end of file diff --git a/i18n/deu/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/deu/extensions/typescript/out/features/bufferSyncSupport.i18n.json index 055c93e97a340..b8f60f73f8ba5 100644 --- a/i18n/deu/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/deu/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "Versionskonflikt zwischen dem globalen TSC ({0}) und dem Sprachdienst von VS Code ({1}). Dies kann zu Kompilierungsfehlern aufgrund von Inkonsistenzen führen.", "moreInformation": "Weitere Informationen", "doNotCheckAgain": "Nicht erneut überprüfen", "close": "Schließen", diff --git a/i18n/deu/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/deu/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json index 8b6ad71cd4e6d..171e5c786affa 100644 --- a/i18n/deu/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json +++ b/i18n/deu/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "ts-check": "Aktiviert die Semantiküberprüfung in einer JavaScript-Datei. Muss sich oben in einer Datei befinden.", + "ts-nocheck": "Deaktiviert die Semantiküberprüfung in einer JavaScript-Datei. Muss sich oben in einer Datei befinden.", + "ts-ignore": "Unterdrückt @ts-check-Fehler in der nächsten Zeile einer Datei." +} \ No newline at end of file diff --git a/i18n/deu/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/deu/extensions/typescript/out/utils/projectStatus.i18n.json index 2ec9b6aab9aa8..22d044da6195e 100644 --- a/i18n/deu/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/deu/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "Um die JavaScript/TypeScript-Sprachfunktionen für das gesamte Projekt zu aktivieren, schließen Sie Ordner mit vielen Dateien aus. Beispiel: {0}", "hintExclude.generic": "Um JavaScript/TypeScript-Sprachfunktionen für das gesamte Projekt zu aktivieren, schließen Sie große Ordner mit Quelldateien aus, an denen Sie nicht arbeiten.", - "open": "Auszuschließende Elemente konfigurieren", "large.label": "Auszuschließende Elemente konfigurieren", "hintExclude.tooltip": "Um JavaScript/TypeScript-Sprachfunktionen für das gesamte Projekt zu aktivieren, schließen Sie große Ordner mit Quelldateien aus, an denen Sie nicht arbeiten." } \ No newline at end of file diff --git a/i18n/deu/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/deu/extensions/typescript/out/utils/typingsStatus.i18n.json index 6d9362666976d..1f64e53eff2db 100644 --- a/i18n/deu/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/deu/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Daten werden zum Optimieren von TypeScript IntelliSense abgerufen", + "typesInstallerInitializationFailed.title": "Typisierungsdateien für JavaScript-Sprachfunktionen konnten nicht installiert werden. Stellen Sie sicher, das NPM installiert ist, oder konfigurieren Sie \"typescript.npm\" in Ihren Benutzereinstellungen.", "typesInstallerInitializationFailed.moreInformation": "Weitere Informationen", "typesInstallerInitializationFailed.doNotCheckAgain": "Nicht erneut überprüfen", "typesInstallerInitializationFailed.close": "Schließen" diff --git a/i18n/deu/extensions/typescript/package.i18n.json b/i18n/deu/extensions/typescript/package.i18n.json index 451b77c6fa52e..86ef4eb0ea43b 100644 --- a/i18n/deu/extensions/typescript/package.i18n.json +++ b/i18n/deu/extensions/typescript/package.i18n.json @@ -13,7 +13,6 @@ "typescript.check.tscVersion": "Überprüfen, ob sich ein global installierter TypeScript-Compiler (z. B. tsc) vom verwendeten TypeScript-Sprachdienst unterscheidet.", "typescript.tsserver.log": "Aktiviert die Protokollierung des TS-Servers in eine Datei. Mithilfe der Protokolldatei lassen sich Probleme beim TS-Server diagnostizieren. Die Protokolldatei kann Dateipfade, Quellcode und weitere potenziell sensible Informationen aus Ihrem Projekt enthalten.", "typescript.tsserver.trace": "Aktiviert die Ablaufverfolgung von an den TS-Server gesendeten Nachrichten. Mithilfe der Ablaufverfolgung lassen sich Probleme beim TS-Server diagnostizieren. Die Ablaufverfolgung kann Dateipfade, Quellcode und weitere potenziell sensible Informationen aus Ihrem Projekt enthalten.", - "typescript.tsserver.experimentalAutoBuild": "Ermöglicht experimentelle automatische Buildvorgänge. Erfordert Version 1.9 dev oder 2.x tsserver sowie einen Neustart von VS Code nach der Änderung.", "typescript.validate.enable": "TypeScript-Überprüfung aktivieren/deaktivieren.", "typescript.format.enable": "Standardmäßigen TypeScript-Formatierer aktivieren/deaktivieren.", "javascript.format.enable": "Standardmäßigen JavaScript-Formatierer aktivieren/deaktivieren.", @@ -33,10 +32,16 @@ "javascript.validate.enable": "JavaScript-Überprüfung aktivieren/deaktivieren.", "typescript.goToProjectConfig.title": "Zur Projektkonfiguration wechseln", "javascript.goToProjectConfig.title": "Zur Projektkonfiguration wechseln", + "javascript.referencesCodeLens.enabled": "Aktiviert oder deaktiviert CodeLens-Verweise in JavaScript Dateien. Erfordert TypeScript 2.0.6 oder höher.", + "typescript.referencesCodeLens.enabled": "Aktiviert oder deaktiviert CodeLens-Verweise in TypeScript Dateien. Erfordert TypeScript 2.0.6 oder höher.", "typescript.implementationsCodeLens.enabled": "Aktiviert oder deaktiviert CodeLens-Implementierungen. Erfordert TypeScript 2.2.0 oder höher.", "typescript.openTsServerLog.title": "TS Server-Protokolldatei öffnen", "typescript.restartTsServer": "TS Server neu starten", "typescript.selectTypeScriptVersion.title": "TypeScript-Version wählen", "jsDocCompletion.enabled": "Automatische JSDoc-Kommentare aktivieren/deaktivieren", - "javascript.implicitProjectConfig.checkJs": "Aktiviert/deaktiviert die Semantikprüfung bei JavaScript-Dateien. Diese Einstellung wird von vorhandenen \"jsconfig.json\"- oder \"tsconfig.json\"-Dateien außer Kraft gesetzt. Erfordert TypeScript 2.3.1 oder höher." + "javascript.implicitProjectConfig.checkJs": "Aktiviert/deaktiviert die Semantikprüfung bei JavaScript-Dateien. Diese Einstellung wird von vorhandenen \"jsconfig.json\"- oder \"tsconfig.json\"-Dateien außer Kraft gesetzt. Erfordert TypeScript 2.3.1 oder höher.", + "typescript.npm": "Gibt den Pfad zur ausführbaren NPM-Datei an, die für die automatische Typerfassung verwendet wird. Hierfür ist TypeScript 2.3.4 oder höher erforderlich.", + "typescript.check.npmIsInstalled": "Überprüfen Sie, ob NPM für die automatische Typerfassung installiert ist.", + "javascript.nameSuggestions": "Das Einbeziehen eindeutiger Namen von der Datei in der JavaScript-Vorschlagsliste aktivieren/deaktivieren.", + "typescript.tsc.autoDetect": "Steuert, ob die automatische Erkennung von tsc-Tasks aktiviert oder deaktiviert ist.\n" } \ No newline at end of file diff --git a/i18n/deu/src/vs/base/common/errorMessage.i18n.json b/i18n/deu/src/vs/base/common/errorMessage.i18n.json index 4bda5bf72a268..70a2d54842570 100644 --- a/i18n/deu/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/deu/src/vs/base/common/errorMessage.i18n.json @@ -13,6 +13,5 @@ "error.connection.unknown": "Es ist ein unbekannter Verbindungsfehler aufgetreten. Entweder besteht keine Internetverbindung mehr, oder der verbundene Server ist offline.", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "Ein unbekannter Fehler ist aufgetreten. Weitere Details dazu finden Sie im Protokoll.", - "nodeExceptionMessage": "Systemfehler ({0})", "error.moreErrors": "{0} ({1} Fehler gesamt)" } \ No newline at end of file diff --git a/i18n/deu/src/vs/base/common/keybindingLabels.i18n.json b/i18n/deu/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/code/electron-main/menus.i18n.json b/i18n/deu/src/vs/code/electron-main/menus.i18n.json index 739090b752177..40280594bf95e 100644 --- a/i18n/deu/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/deu/src/vs/code/electron-main/menus.i18n.json @@ -55,6 +55,9 @@ "miShowEmmetCommands": "E&&mmet...", "miToggleLineComment": "Zeilenkommen&&tar umschalten", "miToggleBlockComment": "&&Blockkommentar umschalten", + "miMultiCursorAlt": "Verwenden Sie Alt+Mausklick für Multi-Cursor", + "miMultiCursorCmd": "Verwenden Sie Befehlstaste+Mausklick für Multi-Cursor", + "miMultiCursorCtrl": "Verwenden Sie STRG+Mausklick für Multi-Cursor", "miInsertCursorAbove": "Cursor oberh&&alb hinzufügen", "miInsertCursorBelow": "Cursor unterhal&&b hinzufügen", "miInsertCursorAtEndOfEachLineSelected": "C&&ursor an Zeilenenden hinzufügen", @@ -70,6 +73,7 @@ "miSmartSelectShrink": "Au&&swahl verkleinern", "miViewExplorer": "&&Explorer", "miViewSearch": "&&Suchen", + "miViewSCM": "S&&CM", "miViewDebug": "&&Debuggen", "miViewExtensions": "E&&xtensions", "miToggleOutput": "&&Ausgabe", @@ -114,6 +118,8 @@ "miGotoSymbolInFile": "Gehe zu &&Symbol in Datei...", "miGotoSymbolInWorkspace": "Zu Symbol im &&Arbeitsbereich wechseln...", "miGotoDefinition": "Gehe &&zu Definition", + "miGotoTypeDefinition": "Wechsle zu &&Typdefinition", + "miGotoImplementation": "Wechsle zur &&Implementierung", "miGotoLine": "Gehe zu &&Zeile...", "miStartDebugging": "&&Debugging starten", "miStartWithoutDebugging": "&&Ohne Debugging starten", @@ -130,16 +136,17 @@ "miColumnBreakpoint": "S&&paltenhaltepunkt", "miFunctionBreakpoint": "&&Funktionshaltepunkt...", "miNewBreakpoint": "&&Neuer Haltepunkt", + "miEnableAllBreakpoints": "Alle Haltepunkte aktivieren", "miDisableAllBreakpoints": "A&&lle Haltepunkte deaktivieren", "miRemoveAllBreakpoints": "&&Alle Haltepunkte entfernen", "miInstallAdditionalDebuggers": "&&Zusätzliche Debugger installieren...", "mMinimize": "Minimieren", - "mClose": "Schließen", "mBringToFront": "Alle in den Vordergrund", "miToggleDevTools": "&&Entwicklungertools umschalten", "miAccessibilityOptions": "&&Optionen für erleichterte Bedienung", "miReportIssues": "&&Probleme melden", "miWelcome": "&&Willkommen", + "miInteractivePlayground": "&&Interactive Spielwiese", "miDocumentation": "&&Dokumentation", "miReleaseNotes": "&&Anmerkungen zu dieser Version", "miKeyboardShortcuts": "&&Referenz für Tastenkombinationen", @@ -149,12 +156,14 @@ "miLicense": "&&Lizenz anzeigen", "miPrivacyStatement": "&&Datenschutzerklärung", "miAbout": "&&Info", + "miTerminateTask": "&&Task beenden", "accessibilityOptionsWindowTitle": "Optionen für erleichterte Bedienung", "miRestartToUpdate": "Für Update neu starten...", "miCheckingForUpdates": "Überprüfen auf Updates...", "miDownloadUpdate": "Verfügbares Update herunterladen", "miDownloadingUpdate": "Das Update wird heruntergeladen...", "miInstallingUpdate": "Update wird installiert...", + "miCheckForUpdates": "Nach Aktualisierungen suchen...", "aboutDetail": "\nVersion {0}\nCommit {1}\nDatum {2}\nShell {3}\nRenderer {4}\nNode {5}", "okButton": "OK" } \ No newline at end of file diff --git a/i18n/deu/src/vs/code/electron-main/windows.i18n.json b/i18n/deu/src/vs/code/electron-main/windows.i18n.json index b31c876e93003..2889578236385 100644 --- a/i18n/deu/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/deu/src/vs/code/electron-main/windows.i18n.json @@ -13,9 +13,5 @@ "appStalled": "Das Fenster reagiert nicht mehr.", "appStalledDetail": "Sie können das Fenster erneut öffnen oder schließen oder weiterhin warten.", "appCrashed": "Das Fenster ist abgestürzt.", - "appCrashedDetail": "Bitte entschuldigen Sie die Unannehmlichkeiten. Sie können das Fenster erneut öffnen und dort weitermachen, wo Sie aufgehört haben.", - "newWindow": "Neues Fenster", - "newWindowDesc": "Öffnet ein neues Fenster.", - "recentFolders": "Zuletzt verwendete Ordner", - "folderDesc": "{0} {1}" + "appCrashedDetail": "Bitte entschuldigen Sie die Unannehmlichkeiten. Sie können das Fenster erneut öffnen und dort weitermachen, wo Sie aufgehört haben." } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json index 15fd087f170d3..78d7ebc307eb8 100644 --- a/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/deu/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -23,6 +23,8 @@ "minimap.enabled": "Steuert, ob die Minikarte angezeigt wird", "minimap.renderCharacters": "Die tatsächlichen Zeichen in einer Zeile rendern (im Gegensatz zu Farbblöcken)", "minimap.maxColumn": "Breite der Minikarte beschränken, um höchstens eine bestimmte Anzahl von Spalten zu rendern", + "find.seedSearchStringFromSelection": "Steuert, ob wir für die Suchzeichenfolge im Suchwidget aus der Editorauswahl ein Seeding ausführen.", + "find.autoFindInSelection": "Steuert, ob die Kennzeichnung \"In Auswahl suchen\" aktiviert ist, wenn mehrere Zeichen oder Textzeilen im Editor ausgewählt wurden.", "wordWrap.off": "Zeilenumbrüche erfolgen nie.", "wordWrap.on": "Der Zeilenumbruch erfolgt an der Breite des Anzeigebereichs.", "wordWrap.wordWrapColumn": "Der Zeilenbereich erfolgt bei \"editor.wordWrapColumn\".", @@ -31,16 +33,19 @@ "wordWrapColumn": "Steuert die Umbruchspalte des Editors, wenn für \"editor.wordWrap\" die Option \"wordWrapColumn\" oder \"bounded\" festgelegt ist.", "wrappingIndent": "Steuert den Einzug der umbrochenen Zeilen. Der Wert kann \"none\", \"same\" oder \"indent\" sein.", "mouseWheelScrollSensitivity": "Ein Multiplikator, der für die Mausrad-Bildlaufereignisse \"deltaX\" und \"deltaY\" verwendet werden soll.", + "multiCursorModifier.ctrlCmd": "Ist unter Windows und Linux der Taste \"STRG\" und unter OSX der Befehlstaste zugeordnet.", + "multiCursorModifier.alt": "Ist unter Windows und Linux der Taste \"Alt\" und unter OSX der Wahltaste zugeordnet. ", + "multiCursorModifier": "Der Modifizierer, der zum Hinzufügen mehrerer Cursor mit der Maus verwendet wird. \"ctrlCmd\" wird unter Windows und Linux der Taste \"STRG\" und unter OSX der Befehlstaste zugeordnet. Die Mausbewegungen \"Gehe zu Definition\" und \"Link öffnen\" werden so angepasst, dass kein Konflikt mit dem Multi-Cursor-Modifizierer entsteht.", "quickSuggestions.strings": "Schnellvorschläge innerhalb von Zeichenfolgen aktivieren.", "quickSuggestions.comments": "Schnellvorschläge innerhalb von Kommentaren aktivieren.", "quickSuggestions.other": "Schnellvorschläge außerhalb von Zeichenfolgen und Kommentaren aktivieren.", "quickSuggestions": "Steuert, ob Vorschläge während der Eingabe automatisch angezeigt werden sollen.", "quickSuggestionsDelay": "Steuert die Verzögerung in ms für die Anzeige der Schnellvorschläge.", - "parameterHints": "Aktiviert Parameterhinweise.", "autoClosingBrackets": "Steuert, ob der Editor Klammern automatisch nach dem Öffnen schließt.", "formatOnType": "Steuert, ob der Editor Zeilen automatisch nach der Eingabe formatiert.", "formatOnPaste": "Steuert, ob der Editor den eingefügten Inhalt automatisch formatiert.", "suggestOnTriggerCharacters": "Steuert, ob Vorschläge automatisch bei der Eingabe von Triggerzeichen angezeigt werden.", + "acceptSuggestionOnEnter": "Steuert, ob Vorschläge über die Eingabetaste (zusätzlich zur TAB-Taste) angenommen werden sollen. Vermeidet Mehrdeutigkeit zwischen dem Einfügen neuer Zeilen oder dem Annehmen von Vorschlägen. Der Wert \"smart\" bedeutet, dass ein Vorschlag nur über die Eingabetaste akzeptiert wird, wenn eine Textänderung vorgenommen wird.", "acceptSuggestionOnCommitCharacter": "Steuert, ob Vorschläge über Commitzeichen angenommen werden sollen. In JavaScript kann ein Semikolon (\";\") beispielsweise ein Commitzeichen sein, das einen Vorschlag annimmt und dieses Zeichen eingibt.", "snippetSuggestions": "Steuert, ob Codeausschnitte mit anderen Vorschlägen angezeigt und wie diese sortiert werden.", "emptySelectionClipboard": "Steuert, ob ein Kopiervorgang ohne Auswahl die aktuelle Zeile kopiert.", @@ -62,12 +67,17 @@ "renderLineHighlight": "Steuert, wie der Editor die aktuelle Zeilenhervorhebung rendern soll. Mögliche Werte sind \"none\", \"gutter\", \"line\" und \"all\".", "codeLens": "Steuert, ob der Editor CodeLenses anzeigt.", "folding": "Steuert, ob für den Editor Codefaltung aktiviert ist.", + "showFoldingControls": "Steuert, ob die Falt-Steuerelemente an der Leiste automatisch ausgeblendet werden.", "matchBrackets": "Übereinstimmende Klammern hervorheben, wenn eine davon ausgewählt wird.", "glyphMargin": "Steuert, ob der Editor den vertikalen Glyphenrand rendert. Der Glyphenrand wird hauptsächlich zum Debuggen verwendet.", "useTabStops": "Das Einfügen und Löschen von Leerzeichen folgt auf Tabstopps.", "trimAutoWhitespace": "Nachfolgendes automatisch eingefügtes Leerzeichen entfernen", "stablePeek": "Peek-Editoren geöffnet lassen, auch wenn auf ihren Inhalt doppelgeklickt oder die ESC-TASTE gedrückt wird.", "dragAndDrop": "Steuert, ob der Editor das Verschieben einer Auswahl per Drag and Drop zulässt.", + "accessibilitySupport.auto": "Der Editor verwendet Plattform-APIs, um zu erkennen, wenn eine Sprachausgabe angefügt wird.", + "accessibilitySupport.on": "Der Editor wird durchgehend für die Verwendung mit einer Sprachausgabe optimiert.", + "accessibilitySupport.off": "Der Editor wird nie für die Verwendung mit einer Sprachausgabe optimiert. ", + "accessibilitySupport": "Steuert, ob der Editor in einem Modus ausgeführt werden soll, in dem er für die Sprachausgabe optimiert wird.", "sideBySide": "Steuert, ob der Diff-Editor das Diff nebeneinander oder inline anzeigt.", "ignoreTrimWhitespace": "Steuert, ob der Diff-Editor Änderungen in führenden oder nachgestellten Leerzeichen als Diffs anzeigt.", "renderIndicators": "Steuert, ob der Diff-Editor die Indikatoren \"+\" und \"-\" für hinzugefügte/entfernte Änderungen anzeigt.", diff --git a/i18n/deu/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/deu/src/vs/editor/common/config/editorOptions.i18n.json index 2e06d6b808ae3..b892d619fd6ca 100644 --- a/i18n/deu/src/vs/editor/common/config/editorOptions.i18n.json +++ b/i18n/deu/src/vs/editor/common/config/editorOptions.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "accessibilityOffAriaLabel": "Der Editor ist zurzeit nicht verfügbar. Drücken Sie Alt+F1 für Optionen.", "editorViewAccessibleLabel": "Editor-Inhalt" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/deu/src/vs/editor/common/view/editorColorRegistry.i18n.json index de766791c8796..56e0924a36c8f 100644 --- a/i18n/deu/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/deu/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -11,6 +11,14 @@ "editorWhitespaces": "Farbe der Leerzeichen im Editor.", "editorIndentGuides": "Farbe der Führungslinien für Einzüge im Editor.", "editorLineNumbers": "Zeilennummernfarbe im Editor.", + "editorRuler": "Farbe des Editor-Lineals.", "editorCodeLensForeground": "Vordergrundfarbe der CodeLens-Links im Editor", - "editorBracketMatchBackground": "Hintergrundfarbe für zusammengehörige Klammern" + "editorBracketMatchBackground": "Hintergrundfarbe für zusammengehörige Klammern", + "editorBracketMatchBorder": "Farbe für zusammengehörige Klammern", + "editorOverviewRulerBorder": "Farbe des Rahmens für das Übersicht-Lineal.", + "editorGutter": "Hintergrundfarbe der Editorleiste. Die Leiste enthält die Glyphenränder und die Zeilennummern.", + "errorForeground": "Vordergrundfarbe von Fehlerunterstreichungen im Editor.", + "errorBorder": "Rahmenfarbe von Fehlerunterstreichungen im Editor.", + "warningForeground": "Vordergrundfarbe von Warnungsunterstreichungen im Editor.", + "warningBorder": "Rahmenfarbe von Warnungsunterstreichungen im Editor." } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/deu/src/vs/editor/contrib/find/common/findController.i18n.json index e4d42f465d185..56e65f90b2e03 100644 --- a/i18n/deu/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,5 @@ "addSelectionToPreviousFindMatch": "Letzte Auswahl zu vorheriger Übereinstimmungssuche hinzufügen", "moveSelectionToNextFindMatch": "Letzte Auswahl in nächste Übereinstimmungssuche verschieben", "moveSelectionToPreviousFindMatch": "Letzte Auswahl in vorherige Übereinstimmungssuche verschieben", - "selectAllOccurencesOfFindMatch": "Alle Vorkommen auswählen und Übereinstimmung suchen", "changeAll.label": "Alle Vorkommen ändern" } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index ff88046159d0f..5db5e40ca1e20 100644 --- a/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "aria.oneReference": "Symbol in {0} in Zeile {1}, Spalte {2}", - "aria.fileReferences.1": "1 Symbol in {0}", - "aria.fileReferences.N": "{0} Symbole in {1}", "aria.result.0": "Es wurden keine Ergebnisse gefunden.", "aria.result.1": "1 Symbol in {0} gefunden", "aria.result.n1": "{0} Symbole in {1} gefunden", diff --git a/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index d115a4e214a9e..358b448e65f6b 100644 --- a/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/deu/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -16,9 +16,12 @@ "peekViewTitleInfoForeground": "Farbe der Titelinformationen in der Peek-Ansicht.", "peekViewBorder": "Farbe der Peek-Ansichtsränder und des Pfeils.", "peekViewResultsBackground": "Hintergrundfarbe der Ergebnisliste in der Peek-Ansicht.", + "peekViewResultsMatchForeground": "Vordergrundfarbe für Zeilenknoten in der Ergebnisliste der Peek-Ansicht.", + "peekViewResultsFileForeground": "Vordergrundfarbe für Dateiknoten in der Ergebnisliste der Peek-Ansicht.", "peekViewResultsSelectionBackground": "Hintergrundfarbe des ausgewählten Eintrags in der Ergebnisliste der Peek-Ansicht.", "peekViewResultsSelectionForeground": "Vordergrundfarbe des ausgewählten Eintrags in der Ergebnisliste der Peek-Ansicht.", "peekViewEditorBackground": "Hintergrundfarbe des Peek-Editors.", + "peekViewEditorGutterBackground": "Hintergrundfarbe der Leiste im Peek-Editor.", "peekViewResultsMatchHighlight": "Farbe für Übereinstimmungsmarkierungen in der Ergebnisliste der Peek-Ansicht.", "peekViewEditorMatchHighlight": "Farbe für Übereinstimmungsmarkierungen im Peek-Editor." } \ No newline at end of file diff --git a/i18n/deu/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/deu/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index 0dd09877b283b..91b2f0a1b1a38 100644 --- a/i18n/deu/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/deu/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,9 @@ "schema.brackets": "Definiert die Klammersymbole, die den Einzug vergrößern oder verkleinern.", "schema.autoClosingPairs": "Definiert die Klammerpaare. Wenn eine öffnende Klammer eingegeben wird, wird die schließende Klammer automatisch eingefügt.", "schema.autoClosingPairs.notIn": "Definiert eine Liste von Bereichen, in denen die automatischen Paare deaktiviert sind.", - "schema.surroundingPairs": "Definiert die Klammerpaare, in die eine ausgewählte Zeichenfolge eingeschlossen werden kann." + "schema.surroundingPairs": "Definiert die Klammerpaare, in die eine ausgewählte Zeichenfolge eingeschlossen werden kann.", + "schema.wordPattern": "Die Worddefinition für die Sprache.", + "schema.wordPattern.pattern": "RegExp Muster für Wortübereinstimmungen.", + "schema.wordPattern.flags": "RegExp Kennzeichen für Wortübereinstimmungen", + "schema.wordPattern.flags.errorMessage": "Muss mit dem Muster `/^([gimuy]+)$/` übereinstimmen." } \ No newline at end of file diff --git a/i18n/deu/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/deu/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index e82addc678451..e957466c8a6bd 100644 --- a/i18n/deu/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/deu/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -21,6 +21,8 @@ "menus.scmTitle": "Das Titelmenü der Quellcodeverwaltung", "menus.resourceGroupContext": "Das Ressourcengruppen-Kontextmenü der Quellcodeverwaltung", "menus.resourceStateContext": "Das Ressourcenstatus-Kontextmenü der Quellcodeverwaltung", + "view.viewTitle": "Das beigetragene Editor-Titelmenü.", + "view.itemContext": "Das beigetragene Anzeigeelement-Kontextmenü.", "nonempty": "Es wurde ein nicht leerer Wert erwartet.", "opticon": "Die Eigenschaft \"icon\" kann ausgelassen werden oder muss eine Zeichenfolge oder ein Literal wie \"{dark, light}\" sein.", "requireStringOrObject": "Die Eigenschaft \"{0}\" ist obligatorisch und muss vom Typ \"Zeichenfolge\" oder \"Objekt\" sein.", diff --git a/i18n/deu/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/deu/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index d6cbe93d2b633..2a33dae4abf0a 100644 --- a/i18n/deu/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/deu/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "Alle Beiträge der VS Code-Extension, die durch dieses Paket dargestellt werden.", "vscode.extension.preview": "Legt die Erweiterung fest, die im Marketplace als Vorschau gekennzeichnet werden soll.", "vscode.extension.activationEvents": "Aktivierungsereignisse für die VS Code-Extension.", + "vscode.extension.activationEvents.onLanguage": "Ein Aktivierungsereignis wird beim Öffnen einer Datei ausgegeben, die in die angegebene Sprache aufgelöst wird.", + "vscode.extension.activationEvents.onCommand": "Ein Aktivierungsereignis wird beim Aufrufen des angegebenen Befehls ausgegeben.", + "vscode.extension.activationEvents.onDebug": "Ein Aktivierungsereignis wird beim Starten einer Debugsitzung des angegebenen Typs ausgegeben.", + "vscode.extension.activationEvents.workspaceContains": "Ein Aktivierungsereignis wird beim Öffnen eines Ordners ausgegeben, der mindestens eine Datei enthält, die mit dem angegebenen Globmuster übereinstimmt.", + "vscode.extension.activationEvents.onView": "Ein Aktivierungsereignis wird beim Erweitern der angegebenen Ansicht ausgegeben.", + "vscode.extension.activationEvents.star": "Ein Aktivierungsereignis wird beim Start von VS Code ausgegeben. Damit für die Endbenutzer eine bestmögliche Benutzerfreundlichkeit sichergestellt ist, verwenden Sie dieses Aktivierungsereignis in Ihrer Erweiterung nur dann, wenn in Ihrem Anwendungsfall keine andere Kombination an Aktivierungsereignissen funktioniert.", "vscode.extension.badges": "Array aus Badges, die im Marketplace in der Seitenleiste auf der Seite mit den Erweiterungen angezeigt werden.", "vscode.extension.badges.url": "Die Bild-URL für den Badge.", "vscode.extension.badges.href": "Der Link für den Badge.", diff --git a/i18n/deu/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/deu/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..88004b1c71eca --- /dev/null +++ b/i18n/deu/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "Neues Fenster", + "newWindowDesc": "Öffnet ein neues Fenster.", + "recentFolders": "Zuletzt verwendete Ordner", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/deu/src/vs/platform/markers/common/problemMatcher.i18n.json index 565c50e40d10f..d6bda033f7330 100644 --- a/i18n/deu/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/deu/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,6 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "Fehler: Die Mustereigenschaft {0} ist kein gültiger Name für eine Mustervariable.", "ProblemMatcherParser.problemPattern.watchingMatcher": "Ein Problemmatcher muss ein Anfangsmuster und ein Endmuster für die Überwachung definieren.", "ProblemMatcherParser.invalidRegexp": "Fehler: Die Zeichenfolge {0} ist kein gültiger regulärer Ausdruck.\n", + "WatchingPatternSchema.regexp": "Der reguläre Ausdruck zum Erkennen des Anfangs oder Endes eines Hintergrundtasks.", "WatchingPatternSchema.file": "Der Übereinstimmungsgruppenindex des Dateinamens. Kann ausgelassen werden.", "PatternTypeSchema.name": "Der Name eines beigetragenen oder vordefinierten Musters", "PatternTypeSchema.description": "Ein Problemmuster oder der Name eines beigetragenen oder vordefinierten Problemmusters. Kann ausgelassen werden, wenn die Basis angegeben ist.", @@ -42,6 +43,12 @@ "ProblemMatcherSchema.severity": "Der Standardschweregrad für Erfassungsprobleme. Dieser wird verwendet, wenn das Muster keine Übereinstimmungsgruppe für den Schweregrad definiert.", "ProblemMatcherSchema.applyTo": "Steuert, ob ein für ein Textdokument gemeldetes Problem nur auf geöffnete, geschlossene oder alle Dokumente angewendet wird.", "ProblemMatcherSchema.fileLocation": "Definiert, wie Dateinamen interpretiert werden sollen, die in einem Problemmuster gemeldet werden.", + "ProblemMatcherSchema.background": "Muster zum Nachverfolgen des Beginns und Endes eines Abgleichers, der für eine Hintergrundaufgabe aktiv ist.", + "ProblemMatcherSchema.background.activeOnStart": "Wenn dieser Wert auf \"true\" festgelegt wird, befindet sich die Hintergrundüberwachung im aktiven Modus, wenn die Aufgabe gestartet wird. Dies entspricht dem Ausgeben einer Zeile, die mit dem \"beginPattern\" übereinstimmt.", + "ProblemMatcherSchema.background.beginsPattern": "Wenn eine Übereinstimmung mit der Ausgabe vorliegt, wird der Start einer Hintergrundaufgabe signalisiert.", + "ProblemMatcherSchema.background.endsPattern": "Wenn eine Übereinstimmung mit der Ausgabe vorliegt, wird das Ende einer Hintergrundaufgabe signalisiert.", + "ProblemMatcherSchema.watching.deprecated": "Die Überwachungseigenschaft ist veraltet. Verwenden Sie stattdessen den Hintergrund.", + "ProblemMatcherSchema.watching": "Muster zum Nachverfolgen des Beginns und Endes eines Problemabgleicher.", "ProblemMatcherSchema.watching.activeOnStart": "Wenn dieser Wert auf \"true\" festgelegt wird, befindet sich die Überwachung im aktiven Modus, wenn der Task gestartet wird. Dies entspricht dem Ausgeben einer Zeile, die mit dem \"beginPattern\" übereinstimmt.", "ProblemMatcherSchema.watching.beginsPattern": "Wenn eine Übereinstimmung mit der Ausgabe vorliegt, wird der Start eines Überwachungstasks signalisiert.", "ProblemMatcherSchema.watching.endsPattern": "Wenn eine Übereinstimmung mit der Ausgabe vorliegt, wird das Ende eines Überwachungstasks signalisiert.", diff --git a/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json index e8bca8886d1bf..ccf32b5809801 100644 --- a/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/deu/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -35,11 +35,13 @@ "dropdownForeground": "Vordergrund für Dropdown.", "dropdownBorder": "Rahmen für Dropdown.", "listFocusBackground": "Hintergrundfarbe der Liste/Struktur für das fokussierte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", + "listFocusForeground": "Vordergrundfarbe der Liste/Struktur für das fokussierte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", "listActiveSelectionBackground": "Hintergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", "listActiveSelectionForeground": "Vordergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", "listInactiveSelectionBackground": "Hintergrundfarbe der Liste/Struktur für das ausgewählte Element, wenn die Liste/Struktur inaktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.", "listInactiveSelectionForeground": "Liste/Baumstruktur - Vordergrundfarbe für das ausgewählte Element, wenn die Liste/Baumstruktur inaktiv ist. Eine aktive Liste/Baumstruktur hat Tastaturfokus, eine inaktive hingegen nicht.", "listHoverBackground": "Hintergrund der Liste/Struktur, wenn mit der Maus auf Elemente gezeigt wird.", + "listHoverForeground": "Vordergrund der Liste/Struktur, wenn mit der Maus auf Elemente gezeigt wird.", "listDropBackground": "Drag & Drop-Hintergrund der Liste/Struktur, wenn Elemente mithilfe der Maus verschoben werden.", "highlight": "Vordergrundfarbe der Liste/Struktur zur Trefferhervorhebung beim Suchen innerhalb der Liste/Struktur.", "pickerGroupForeground": "Schnellauswahlfarbe für das Gruppieren von Bezeichnungen.", @@ -53,9 +55,11 @@ "scrollbarSliderBackground": "Hintergrundfarbe des Schiebereglers.", "scrollbarSliderHoverBackground": "Hintergrundfarbe des Schiebereglers, wenn darauf gezeigt wird.", "scrollbarSliderActiveBackground": "Hintergrundfarbe des Schiebereglers, wenn dieser aktiv ist.", + "progressBarBackground": "Hintergrundfarbe des Fortschrittbalkens, der für lang ausgeführte Vorgänge angezeigt werden kann.", "editorBackground": "Hintergrundfarbe des Editors.", "editorForeground": "Standardvordergrundfarbe des Editors.", "editorWidgetBackground": "Hintergrundfarbe von Editor-Widgets wie zum Beispiel Suchen/Ersetzen.", + "editorWidgetBorder": "Rahmenfarbe von Editorwigdets. Die Farbe wird nur verwendet, wenn für das Widget ein Rahmen verwendet wird und die Farbe nicht von einem Widget überschrieben wird.", "editorSelection": "Farbe der Editor-Auswahl.", "editorInactiveSelection": "Farbe der Auswahl in einem inaktiven Editor.", "editorSelectionHighlight": "Farbe für Bereiche, deren Inhalt der Auswahl entspricht.", @@ -69,5 +73,12 @@ "diffEditorInserted": "Hintergrundfarbe für eingefügten Text.", "diffEditorRemoved": "Hintergrundfarbe für entfernten Text.", "diffEditorInsertedOutline": "Konturfarbe für eingefügten Text.", - "diffEditorRemovedOutline": "Konturfarbe für entfernten Text." + "diffEditorRemovedOutline": "Konturfarbe für entfernten Text.", + "mergeCurrentHeaderBackground": "Aktueller Kopfzeilenhintergrund in Inline-Mergingkonflikten.", + "mergeCurrentContentBackground": "Aktueller Inhaltshintergrund in Inline-Mergingkonflikten.", + "mergeIncomingHeaderBackground": "Eingehender Kopfzeilenhintergrund in Inline-Mergingkonflikten. ", + "mergeIncomingContentBackground": "Eingehender Inhaltshintergrund in Inline-Mergingkonflikten.", + "mergeBorder": "Rahmenfarbe für Kopfzeilen und die Aufteilung in Inline-Mergingkonflikten.", + "overviewRulerCurrentContentForeground": "Aktueller Übersichtslineal-Vordergrund für Inline-Mergingkonflikte.", + "overviewRulerIncomingContentForeground": "Eingehender Übersichtslineal-Vordergrund für Inline-Mergingkonflikte. " } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/deu/src/vs/workbench/api/node/extHostTask.i18n.json index 8b6ad71cd4e6d..4b90a12aaf247 100644 --- a/i18n/deu/src/vs/workbench/api/node/extHostTask.i18n.json +++ b/i18n/deu/src/vs/workbench/api/node/extHostTask.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/deu/src/vs/workbench/api/node/extHostTreeViews.i18n.json index 83810e505c9f2..76a366889135e 100644 --- a/i18n/deu/src/vs/workbench/api/node/extHostTreeViews.i18n.json +++ b/i18n/deu/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "treeView.notRegistered": "Kein Treeviw mit der id '{0}' registriert.", "treeItem.notFound": "Kein Tree-Eintrag mit der id '{0}' gefunden.", "treeView.duplicateElement": "Element {0} ist bereit registriert." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/deu/src/vs/workbench/browser/actions/configureLocale.i18n.json index a6835e15a6da5..f17cc2cd8aa4b 100644 --- a/i18n/deu/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,6 +7,7 @@ "configureLocale": "Sprache konfigurieren", "displayLanguage": "Definiert die Anzeigesprache von VSCode.", "doc": "Unter {0} finden Sie eine Liste der unterstützten Sprachen.", + "restart": "Das Ändern dieses Wertes erfordert einen Neustart von VSCode.", "fail.createSettings": "{0} ({1}) kann nicht erstellt werden.", "JsonSchema.locale": "Die zu verwendende Sprache der Benutzeroberfläche." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index ab66bc16e2e56..419bdb09927d7 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "Aktivitätsleiste ausblenden", - "activityBarAriaLabel": "Umschaltung der aktiven Ansicht" + "activityBarAriaLabel": "Umschaltung der aktiven Ansicht", + "globalActions": "Globale Aktionen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 27e4ef85e7a04..3bfcbf3c5241d 100644 --- a/i18n/deu/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -10,7 +10,7 @@ "multiSelection": "{0} Auswahlen", "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", - "tabFocusModeEnabled": "TAB-TASTE verschiebt Fokus", + "screenReaderDetectedExtra": "Wenn Sie keine Sprachausgabe verwenden, ändern Sie die Einstellung \"editor.accessibilitySupport\" in \"Aus\".", "disableTabMode": "Barrierefreiheitsmodus deaktivieren", "gotoLine": "Gehe zu Zeile", "indentation": "Einzug", diff --git a/i18n/deu/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/deu/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..51845025d4128 --- /dev/null +++ b/i18n/deu/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "Gehe zu Datei...", + "quickNavigateNext": "Zum nächsten Element in Quick Open navigieren", + "quickNavigatePrevious": "Zum vorherigen Element in Quick Open navigieren", + "quickSelectNext": "Nächstes Element in Quick Open auswählen", + "quickSelectPrevious": "Vorheriges Element in Quick Open auswählen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/quickopen.i18n.json b/i18n/deu/src/vs/workbench/browser/quickopen.i18n.json index 4283ec57cb32a..89a7706d48243 100644 --- a/i18n/deu/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "Keine übereinstimmenden Ergebnisse.", "noResultsFound2": "Es wurden keine Ergebnisse gefunden.", - "entryAriaLabel": "{0}, Befehl", - "noCommands": "Keine übereinstimmenden Befehle." + "entryAriaLabel": "{0}, Befehl" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/browser/viewlet.i18n.json b/i18n/deu/src/vs/workbench/browser/viewlet.i18n.json index 14a9eb167211b..97b755d5fd67f 100644 --- a/i18n/deu/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/deu/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "Alle zuklappen", - "viewToolbarAriaLabel": "{0}-Aktionen" + "collapse": "Alle zuklappen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/common/theme.i18n.json b/i18n/deu/src/vs/workbench/common/theme.i18n.json index 52d4cbaf357a2..01779434428e5 100644 --- a/i18n/deu/src/vs/workbench/common/theme.i18n.json +++ b/i18n/deu/src/vs/workbench/common/theme.i18n.json @@ -7,27 +7,42 @@ "tabActiveBackground": "Hintergrundfarbe der aktiven Registerkarte. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", "tabInactiveBackground": "Hintergrundfarbe der inaktiven Registerkarte. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", "tabBorder": "Rahmen zum Trennen von Registerkarten. Registerkarten sind die Container für Editoren im Editor-Bereich. In einer Editor-Gruppe können mehrere Registerkarten geöffnet werden. Mehrere Editor-Gruppen sind möglich.", + "tabActiveForeground": "Vordergrundfarbe der aktiven Registerkarte in einer aktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", + "tabInactiveForeground": "Vordergrundfarbe der inaktiven Registerkarte in einer aktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", + "tabUnfocusedActiveForeground": "Vordergrundfarbe der aktiven Registerkarte in einer inaktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", + "tabUnfocusedInactiveForeground": "Vordergrundfarbe der inaktiven Registerkarte in einer inaktiven Gruppe. Registerkarten sind die Container für Editors im Editorbereich. In einer Editorgruppe können mehrere Registerkarten geöffnet werden. Mehrere Editorgruppen können vorhanden sein.", "editorGroupBackground": "Hintergrundfarbe einer Editor-Gruppe. Editor-Gruppen sind die Container der Editoren. Die Hintergrundfarbe wird beim Ziehen von Editoren angezeigt.", + "tabsContainerBackground": "Hintergrundfarbe der Titelüberschrift der Editor-Gruppe, wenn die Registerkarten deaktiviert sind. Editor-Gruppen sind die Container der Editoren.", + "tabsContainerBorder": "Rahmenfarbe der Titelüberschrift der Editor-Gruppe, wenn die Registerkarten deaktiviert sind. Editor-Gruppen sind die Container der Editoren.", "editorGroupHeaderBackground": "Hintergrundfarbe der Titelüberschrift des Editors, wenn die Registerkarten deaktiviert sind. Editor-Gruppen sind die Container der Editoren.", "editorGroupBorder": "Farbe zum Trennen mehrerer Editor-Gruppen. Editor-Gruppen sind die Container der Editoren.", + "editorDragAndDropBackground": " Hintergrundfarbe beim Ziehen von Editoren. Die Farbe muss transparent sein, damit der Editor-Inhalt noch sichtbar sind.", + "panelBackground": "Hintergrundfarbe des Panels. Panels werden unter dem Editorbereich angezeigt und enthalten Ansichten wie die Ausgabe und das integrierte Terminal.", "panelBorder": "Farbe des oberen Panelrahmens, der das Panel vom Editor abtrennt. Panels werden unter dem Editorbereich angezeigt und enthalten Ansichten wie die Ausgabe und das integrierten Terminal.", "panelActiveTitleForeground": "Titelfarbe für den aktiven Bereich. Bereiche werden unter dem Editorbereich angezeigt und enthalten Ansichten wie Ausgabe und integriertes Terminal.", "panelInactiveTitleForeground": "Titelfarbe für den inaktiven Bereich. Bereiche werden unter dem Editorbereich angezeigt und enthalten Ansichten wie Ausgabe und integriertes Terminal.", "panelActiveTitleBorder": "Rahmenfarbe für den Titel des aktiven Bereichs. Bereiche werden unter dem Editorbereich angezeigt und enthalten Ansichten wie Ausgabe und integriertes Terminal.", "statusBarForeground": "Vordergrundfarbe der Statusleiste. Die Statusleiste wird unten im Fenster angezeigt.", "statusBarBackground": "Standardhintergrundfarbe der Statusleiste. Die Statusleiste wird unten im Fenster angezeigt.", + "statusBarBorder": "Rahmenfarbe der Statusleiste für die Abtrennung von der Seitenleiste und dem Editor. Die Statusleiste wird unten im Fenster angezeigt.", "statusBarNoFolderBackground": "Hintergrundfarbe der Statusleiste, wenn kein Ordner geöffnet ist. Die Statusleiste wird unten im Fenster angezeigt.", + "statusBarNoFolderForeground": "Vordergrundfarbe der Statusleiste, wenn kein Ordner geöffnet ist. Die Statusleiste wird unten im Fenster angezeigt.", "statusBarItemActiveBackground": "Hintergrundfarbe für Statusleistenelemente beim Klicken. Die Statusleiste wird am unteren Rand des Fensters angezeigt.", "statusBarItemHoverBackground": "Hintergrundfarbe der Statusleistenelemente beim Daraufzeigen. Die Statusleiste wird am unteren Seitenrand angezeigt.", "statusBarProminentItemBackground": "Hintergrundfarbe für markante Elemente der Statusleiste. Markante Elemente sind im Vergleich zu anderen Statusleisteneinträgen hervorgehoben, um auf ihre Bedeutung hinzuweisen. Die Statusleiste wird unten im Fenster angezeigt.", "statusBarProminentItemHoverBackground": "Hintergrundfarbe für markante Elemente der Statusleiste, wenn auf diese gezeigt wird. Markante Elemente sind im Vergleich zu anderen Statusleisteneinträgen hervorgehoben, um auf ihre Bedeutung hinzuweisen. Die Statusleiste wird unten im Fenster angezeigt.", "activityBarBackground": "Hintergrundfarbe der Aktivitätsleiste. Die Aktivitätsleiste wird ganz links oder rechts angezeigt und ermöglicht das Wechseln zwischen verschiedenen Ansichten der Seitenleiste.", "activityBarForeground": "Vordergrundfarbe der Aktivitätsleiste (z. B. für Symbole). Die Aktivitätsleiste wird ganz links oder rechts angezeigt und ermöglicht das Wechseln zwischen verschiedenen Ansichten der Seitenleiste.", + "activityBarBorder": "Rahmenfarbe der Aktivitätsleiste für die Abtrennung von der Seitenleiste. Die Aktivitätsleiste wird ganz links oder rechts angezeigt und ermöglicht das Wechseln zwischen verschiedenen Ansichten der Seitenleiste.", + "activityBarDragAndDropBackground": "Drag & Drop-Feedbackfarbe für Elemente der Aktivitätsleiste. Die Farbe muss transparent sein, damit die Einträge der Aktivitätsleiste noch sichtbar sind. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", "activityBarBadgeBackground": "Hintergrundfarbe für Aktivitätsinfobadge. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", "activityBarBadgeForeground": "Vordergrundfarbe für Aktivitätsinfobadge. Die Aktivitätsleiste wird ganz links oder ganz rechts angezeigt und ermöglicht den Wechsel zwischen Ansichten der Seitenleiste.", "sideBarBackground": "Hintergrundfarbe der Seitenleiste. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", + "sideBarForeground": "Vordergrundfarbe der Seitenleiste. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", + "sideBarBorder": "Rahmenfarbe der Seitenleiste zum Abtrennen an der Seite zum Editor. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", "sideBarTitleForeground": "Vordergrundfarbe der Seitenleiste. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", "sideBarSectionHeaderBackground": "Hintergrundfarbe der Abschnittsüberschrift der Seitenleiste. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", + "sideBarSectionHeaderForeground": "Vordergrundfarbe der Abschnittsüberschrift der Seitenleiste. Die Seitenleiste ist der Container für Ansichten wie den Explorer und die Suche.", "titleBarActiveForeground": "Vordergrund der Titelleiste, wenn das Fenster aktiv ist. Diese Farbe wird derzeit nur von MacOS unterstützt.", "titleBarInactiveForeground": "Vordergrund der Titelleiste, wenn das Fenster inaktiv ist. Diese Farbe wird derzeit nur von MacOS unterstützt.", "titleBarActiveBackground": "Hintergrund der Titelleiste, wenn das Fenster aktiv ist. Diese Farbe wird derzeit nur von MacOS unterstützt.", diff --git a/i18n/deu/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/actions.i18n.json index 92dabcb049614..70ead81b19e0c 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "Editor schließen", "closeWindow": "Fenster schließen", - "switchWindow": "Fenster wechseln", - "switchWindowPlaceHolder": "Fenster auswählen", - "current": "Aktuelles Fenster", "closeFolder": "Ordner schließen", "noFolderOpened": "Zurzeit ist kein Ordner in dieser Instanz geöffnet, der geschlossen werden kann.", "newWindow": "Neues Fenster", @@ -20,7 +17,7 @@ "zoomReset": "Zoom zurücksetzen", "appPerf": "Startleistung", "reloadWindow": "Fenster erneut laden", - "openRecent": "Zuletzt verwendete öffnen", + "current": "Aktuelles Fenster", "folders": "Ordner", "files": "Dateien", "openRecentPlaceHolderMac": "Wählen Sie einen Pfad aus (halten Sie die BEFEHLSTASTE gedrückt, um ein neues Fenster zu öffnen).", @@ -32,10 +29,6 @@ "openDocumentationUrl": "Dokumentation", "openIntroductoryVideosUrl": "Einführungsvideos", "toggleSharedProcess": "Freigegebenen Prozess umschalten", - "navigateLeft": "Zum Ansichtsteil links verschieben", - "navigateRight": "Zum Ansichtsteil rechts verschieben", - "navigateUp": "Zum Ansichtsteil darüber verschieben", - "navigateDown": "Zum Ansichtsteil darunter verschieben", "increaseViewSize": "Aktuelle Ansicht vergrößern", "decreaseViewSize": "Aktuelle Ansicht verkleinern" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json index 15f166829b2aa..40552bf6b2a1a 100644 --- a/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -31,10 +31,6 @@ "window.openFoldersInNewWindow.off": "Ordner ersetzen das letzte aktive Fenster.", "window.openFoldersInNewWindow.default": "Ordner werden in einem neuen Fenster geöffnet, sofern kein Ordner innerhalb der Anwendung ausgewählt wird (z. B. über das Dateimenü).", "openFoldersInNewWindow": "Steuert, ob Ordner in einem neuen Fenster geöffnet werden oder das letzte aktive Fenster ersetzen.\n- default: Die Ordner werden in einem neuen Fenster geöffnet, sofern kein Ordner innerhalb der Anwendung ausgewählt wird (z. B. über das Dateimenü).\n- on: Die Ordner werden in einem neuen Fenster geöffnet.\n- off: Die Ordner ersetzen das letzte aktive Fenster.\nIn einigen Fällen wird diese Einstellung unter Umständen ignoriert (z. B. bei der Befehlszeilenoption \"-new-window\" oder \"-reuse-window\").", - "window.reopenFolders.none": "Ordner nie erneut öffnen.", - "window.reopenFolders.one": "Den letzten aktiven Ordner erneut öffnen.", - "window.reopenFolders.all": "Alle Ordner der letzten Sitzung erneut öffnen.", - "reopenFolders": "Steuert, wie Ordner nach einem Neustart erneut geöffnet werden. Wählen Sie \"none\" aus, um Ordner nie erneut zu öffnen, \"one\", um den zuletzt bearbeiteten Ordner erneut zu öffnen, oder \"all\", um alle Ordner der letzten Sitzung erneut zu öffnen.", "restoreFullscreen": "Steuert, ob ein Fenster im Vollbildmodus wiederhergestellt wird, wenn es im Vollbildmodus beendet wurde.", "zoomLevel": "Passen Sie den Zoomfaktor des Fensters an. Die ursprüngliche Größe ist 0. Jede Inkrementierung nach oben (z. B. 1) oder unten (z. B. -1) stellt eine Vergrößerung bzw. Verkleinerung um 20 % dar. Sie können auch Dezimalwerte eingeben, um den Zoomfaktor genauer anzupassen.", "title": "Steuert den Fenstertitel abhängig vom aktiven Editor. Variablen werden abhängig vom Kontext ersetzt:\n${activeEditorShort}: z. B. myFile.txt\n${activeEditorMedium}: z. B. myFolder/myFile.txt\n${activeEditorLong}: z. B. /Users/Development/myProject/myFolder/myFile.txt\n${rootName}: z. B. myProject\n${rootPath}: z. B. /Users/Development/myProject\n${appName}: z. B. VS Code\n${dirty}: ein geänderter Indikator, wenn der aktive Editor geändert wurde\n${separator}: ein bedingtes Trennzeichen (\" - \"), das nur in der Umgebung von Variablen mit Werten angezeigt wird", @@ -42,11 +38,13 @@ "window.newWindowDimensions.inherit": "Öffnet neue Fenster mit den gleichen Abmessungen wie das letzte aktive Fenster.", "window.newWindowDimensions.maximized": "Öffnet neue Fenster maximiert.", "window.newWindowDimensions.fullscreen": "Öffnet neue Fenster im Vollbildmodus.", + "newWindowDimensions": "Steuert die Abmessungen beim Öffnen eines neuen Fensters. Standardmäßig wird in der Mitte des Bildschirms ein neues Fenster mit kleinen Abmessungen geöffnet. Bei der Einstellung \"inherit\" erhält das Fenster die gleichen Abmessungen wie das letzte aktive Fenster. Bei der Einstellung \"maximized\" wird das Fenster maximiert geöffnet, und bei \"fullscreen\" wird es im Vollbildmodus geöffnet. Die Einstellung hat keine Auswirkungen auf das zuerst geöffnete Fenster. Größe und Position des ersten Fensters werden immer so wiederhergestellt, wie sie vor dem Schließen waren.", "window.menuBarVisibility.default": "Das Menü ist nur im Vollbildmodus ausgeblendet.", "window.menuBarVisibility.visible": "Das Menu wird immer angezeigt, auch im Vollbildmodus.", "window.menuBarVisibility.toggle": "Das Menu ist ausgeblendet, kann aber mit der Alt-Taste angezeigt werden.", "window.menuBarVisibility.hidden": "Das Menü ist immer ausgeblendet.", "menuBarVisibility": "Steuert die Sichtbarkeit der Menüleiste. Die Einstellung \"Umschalten\" bedeutet, dass die Menüleiste durch einfaches Betätigen der ALT-Taste angezeigt und ausgeblendet wird. Die Menüleite wird standardmäßig angezeigt, sofern sich das Fenster nicht im Vollbildmodus befindet.", + "enableMenuBarMnemonics": "Ist dies aktiviert, können die Hauptmenüs mithilfe von Tastenkombinationen mit der Alt-Taste geöffnet werden. Wenn mnemonische Zeichen deaktiviert werden, können diese Tastenkombinationen mit der Alt-Taste stattdessen an Editor-Befehle gebunden werden.", "autoDetectHighContrast": "Ist diese Option aktiviert, erfolgt automatisch ein Wechsel zu einem Design mit hohem Kontrast, wenn Windows ein Design mit hohem Kontrast verwendet, und zu einem dunklen Design, wenn Sie für Windows kein Design mit hohem Kontrast mehr verwenden.", "titleBarStyle": "Passt das Aussehen der Titelleiste des Fensters an. Zum Anwenden der Änderungen ist ein vollständiger Neustart erforderlich.", "window.nativeTabs": "Aktiviert MacOS Sierra-Fensterregisterkarten. Beachten Sie, dass zum Übernehmen von Änderungen ein vollständiger Neustart erforderlich ist und durch ggf. konfigurierte native Registerkarten ein benutzerdefinierter Titelleistenstil deaktiviert wird.", @@ -56,5 +54,7 @@ "zenMode.hideTabs": "Steuert, ob die Workbench-Registerkarten durch Aktivieren des Zen-Modus ebenfalls ausgeblendet werden.", "zenMode.hideStatusBar": "Steuert, ob die Statusleiste im unteren Bereich der Workbench durch Aktivieren des Zen-Modus ebenfalls ausgeblendet wird.", "zenMode.hideActivityBar": "Steuert, ob die Aktivitätsleiste im linken Bereich der Workbench durch Aktivieren des Zen-Modus ebenfalls ausgeblendet wird.", - "zenMode.restore": "Steuert, ob ein Fenster im Zen-Modus wiederhergestellt werden soll, wenn es im Zen-Modus beendet wurde." + "zenMode.restore": "Steuert, ob ein Fenster im Zen-Modus wiederhergestellt werden soll, wenn es im Zen-Modus beendet wurde.", + "workspaceConfigurationTitle": "Arbeitsbereich", + "files.exclude.boolean": "Das Globmuster, mit dem Dateipfade verglichen werden sollen. Legen Sie diesen Wert auf \"true\" oder \"false\" fest, um das Muster zu aktivieren bzw. zu deaktivieren." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..f802905959f40 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "Die Einstellung \"editor.accessibilitySupport\" wird in \"Ein\" geändert.", + "openingDocs": "Die Dokumentationsseite zur Barrierefreiheit von VS Code wird jetzt geöffnet.", + "introMsg": "Vielen Dank, dass Sie die Optionen für Barrierefreiheit von VS Code testen.", + "status": "Status:", + "changeConfigToOnMac": "Betätigen Sie jetzt die Befehlstaste+E, um den Editor zu konfigurieren, sodass er permanent für die Verwendung mit einer Sprachausgabe optimiert wird.", + "changeConfigToOnWinLinux": "Betätigen Sie jetzt die Befehlstaste+E, um den Editor zu konfigurieren, sodass er permanent für die Verwendung mit einer Sprachausgabe optimiert wird.", + "auto_unknown": "Der Editor ist für die Verwendung von Plattform-APIs konfiguriert, um zu erkennen, wenn eine Sprachausgabe angefügt wird, die aktuelle Laufzeit unterstützt dies jedoch nicht.", + "auto_on": "Der Editor hat automatisch erkannt, dass eine Sprachausgabe angefügt wurde.", + "auto_off": "Der Editor ist so konfiguriert, dass er automatisch erkennt, wenn eine Sprachausgabe angefügt wird, was momentan nicht der Fall ist.", + "configuredOn": "Der Editor ist so konfiguriert, dass er für die Verwendung mit einer Sprachausgabe durchgehend optimiert wird – Sie können dies ändern, indem Sie die Einstellung \"editor.accessibilitySupport\" bearbeiten.", + "configuredOff": "Der Editor ist so konfiguriert, dass er für die Verwendung mit einer Sprachausgabe nie optimiert wird.", + "tabFocusModeOnMsg": "Durch Drücken der TAB-TASTE im aktuellen Editor wird der Fokus in das nächste Element verschoben, das den Fokus erhalten kann. Schalten Sie dieses Verhalten um, indem Sie {0} drücken.", + "tabFocusModeOnMsgNoKb": "Durch Drücken der TAB-TASTE im aktuellen Editor wird der Fokus in das nächste Element verschoben, das den Fokus erhalten kann. Der {0}-Befehl kann zurzeit nicht durch eine Tastenzuordnung ausgelöst werden.", + "tabFocusModeOffMsg": "Durch Drücken der TAB-TASTE im aktuellen Editor wird das Tabstoppzeichen eingefügt. Schalten Sie dieses Verhalten um, indem Sie {0} drücken.", + "tabFocusModeOffMsgNoKb": "Durch Drücken der TAB-TASTE im aktuellen Editor wird das Tabstoppzeichen eingefügt. Der {0}-Befehl kann zurzeit nicht durch eine Tastenzuordnung ausgelöst werden.", + "openDocMac": "Drücken Sie die Befehlstaste+H, um ein Browserfenster mit zusätzlichen VS Code-Informationen zur Barrierefreiheit zu öffnen.", + "openDocWinLinux": "Drücken Sie STRG+H, um ein Browserfenster mit zusätzlichen VS Code-Informationen zur Barrierefreiheit zu öffnen.", + "outroMsg": "Sie können diese QuickInfo schließen und durch Drücken von ESC oder UMSCHALT+ESC zum Editor zurückkehren.", + "ShowAccessibilityHelpAction": "Hilfe zur Barrierefreiheit anzeigen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..0ca859efe95f5 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Multi-Curosor-Modifizierer umschalten" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index 11b3d69c656dc..a294a18039b78 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "{0} öffnen", "launchJsonNeedsConfigurtion": "Konfigurieren oder reparieren Sie \"launch.json\".", + "noFolderDebugConfig": "Öffnen Sie bitte einen Ordner, um erweitertes Debuggen zu konfigurieren.", "startDebug": "Debuggen starten", "startWithoutDebugging": "Ohne Debuggen starten", "selectAndStartDebugging": "Debugging auswählen und starten", diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json index 8b6ad71cd4e6d..09e90db77c7ea 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "noFolderDebugConfig": "Öffnen Sie bitte einen Ordner, um erweitertes Debuggen zu konfigurieren." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json index 785ccd9e411d7..55c6c83a6c042 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json @@ -5,16 +5,12 @@ // Do not edit this file. It is machine generated. { "variablesSection": "Variablenabschnitt", - "variables": "Variablen", "variablesAriaTreeLabel": "Variablen debuggen", "expressionsSection": "Ausdrucksabschnitt", - "watch": "Überwachen", "watchAriaTreeLabel": "Überwachungsausdrücke debuggen", "callstackSection": "Aufruflistenabschnitt", "debugStopped": "Angehalten bei {0}", - "callStack": "Aufrufliste", "callStackAriaLabel": "Aufrufliste debuggen", "breakpointsSection": "Haltepunkteabschnitt", - "breakpoints": "Haltepunkte", "breakpointsAriaTreeLabel": "Haltepunkte debuggen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index 83ecbf1d9c05f..57d2b6200423f 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "Hintergrundfarbe der Statusleiste beim Debuggen eines Programms. Die Statusleiste wird unten im Fenster angezeigt." + "statusBarDebuggingBackground": "Hintergrundfarbe der Statusleiste beim Debuggen eines Programms. Die Statusleiste wird unten im Fenster angezeigt.", + "statusBarDebuggingForeground": "Vordergrundfarbe der Statusleiste beim Debuggen eines Programms. Die Statusleiste wird unten im Fenster angezeigt." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/deu/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 094d1188c24e2..1bcee0dbf6e04 100644 --- a/i18n/deu/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "Die ausführbare Datei \"{0}\" des Debugadapters ist nicht vorhanden.", "debugAdapterCannotDetermineExecutable": "Die ausführbare Datei \"{0}\" des Debugadapters kann nicht bestimmt werden.", "debugType": "Der Typ der Konfiguration.", + "debugTypeNotRecognised": "Dieser Debugging-Typ wurde nicht erkannt. Bitte installieren und aktivieren Sie die dazugehörige Debugging-Erweiterung.", "node2NotSupported": "\"node2\" wird nicht mehr unterstützt, verwenden Sie stattdessen \"node\", und legen Sie das Attribut \"protocol\" auf \"inspector\" fest.", "debugName": "Der Name der Konfiguration. Er wird im Dropdownmenü der Startkonfiguration angezeigt.", "debugRequest": "Der Anforderungstyp der Konfiguration. Der Wert kann \"launch\" oder \"attach\" sein.", diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index 35ffc123f143a..de81c8b774353 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "previousEditPoint": "Emmet: Vorheriger Bearbeitungspunkt", - "nextEditPoint": "Emmet: Nächster Bearbeitungspunkt" + "previousEditPoint": "Emmet: Zum vorherigen Bearbeitungspunkt wechseln", + "nextEditPoint": "Emmet: Zum nächsten Bearbeitungspunkt wechseln" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 5beaa142e9f13..71dbf73cb59ff 100644 --- a/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -9,5 +9,6 @@ "emmetPreferences": "Einstellungen, die zum Ändern des Verhaltens einiger Aktionen und Konfliktlöser von Emmet verwendet werden.", "emmetSyntaxProfiles": "Definieren Sie das Profil für die angegebene Syntax, oder verwenden Sie Ihr eigenes Profil mit bestimmten Regeln.", "emmetExclude": "Ein Array von Sprachen, in dem Emmet-Abkürzungen nicht erweitert werden sollen.", - "emmetExtensionsPath": "Pfad zu einem Ordner mit Emmet-Profilen, Ausschnitten und Voreinstellungen" + "emmetExtensionsPath": "Pfad zu einem Ordner mit Emmet-Profilen, Ausschnitten und Voreinstellungen", + "useNewEmmet": "Testen Sie die neuen Emmet-Module (die letztendlich die alte einzelne Emmet-Bibliothek ersetzen) für alle Emmet-Funktionen." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index c893534d59cb7..80ecb27720f60 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,10 @@ "default": "Standard", "debuggers": "Debugger ({0})", "debugger name": "Name", + "views": "Ansichten ({0})", + "view id": "ID", + "view name": "Name", + "view location": "Wo", "themes": "Designs ({0})", "JSON Validation": "JSON-Validierung ({0})", "commands": "Befehle ({0})", diff --git a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 3fc196fe64ee6..0e32d73283c06 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,6 +22,8 @@ "disableGloballyAction": "Immer", "disableAction": "Deaktivieren", "checkForUpdates": "Nach Updates suchen", + "enableAutoUpdate": "Aktivere die automatische Aktualisierung von Erweiterungen", + "disableAutoUpdate": "Deaktivere die automatische Aktualisierung von Erweiterungen", "updateAll": "Alle Erweiterungen aktualisieren", "reloadAction": "Neu starten", "postUpdateTooltip": "Zum Aktualisieren erneut laden", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "Für den Arbeitsbereich empfohlene Erweiterungen anzeigen", "showRecommendedKeymapExtensions": "Empfohlene Tastenzuordnungen anzeigen", "showRecommendedKeymapExtensionsShort": "Tastenzuordnungen", + "showLanguageExtensions": "Spracherweiterungen anzeigen", + "showLanguageExtensionsShort": "Spracherweiterungen", "configureWorkspaceRecommendedExtensions": "Empfohlene Erweiterungen konfigurieren (Arbeitsbereich)", "ConfigureWorkspaceRecommendations.noWorkspace": "Empfehlungen sind nur für einen Arbeitsbereichsordner verfügbar.", "OpenExtensionsFile.failed": "Die Datei \"extensions.json\" kann nicht im Ordner \".vscode\" erstellt werden ({0}).", @@ -51,5 +55,8 @@ "disableAll": "Alle installierten Erweiterungen löschen", "disableAllWorkspace": "Alle installierten Erweiterungen für diesen Arbeitsbereich deaktivieren", "enableAll": "Alle installierten Erweiterungen aktivieren", - "enableAllWorkspace": "Alle installierten Erweiterungen für diesen Arbeitsbereich aktivieren" + "enableAllWorkspace": "Alle installierten Erweiterungen für diesen Arbeitsbereich aktivieren", + "extensionButtonProminentBackground": "Hintergrundfarbe für markante Aktionenerweiterungen (z. B. die Schaltfläche zum Installieren).", + "extensionButtonProminentForeground": "Vordergrundfarbe für markante Aktionenerweiterungen (z. B. die Schaltfläche zum Installieren).", + "extensionButtonProminentHoverBackground": "Hoverhintergrundfarbe für markante Aktionenerweiterungen (z. B. die Schaltfläche zum Installieren)." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 4769dc3fe1e89..48aabfdf0bfe8 100644 --- a/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,8 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "disableOtherKeymapsConfirmation": "Deaktivere Tastenzuordnungen ({0}) um Konfilkte mit anderen zu vermeiden?", "yes": "Ja", "no": "Nein", + "betterMergeDisabled": "Die \"Better Merge\" Erweiterung ist jetzt integriert, die alte Erweiterung wurde deaktiviert und kann deinstalliert werden.", "uninstall": "Deinstallieren", "later": "Später" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 8153f54254b59..3a26505523df9 100644 --- a/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,6 +16,7 @@ "associations": "Konfigurieren Sie Dateizuordnungen zu Sprachen (beispielsweise \"*.extension\": \"html\"). Diese besitzen Vorrang vor den Standardzuordnungen der installierten Sprachen.", "encoding": "Die Standardzeichensatz-Codierung, die beim Lesen und Schreiben von Dateien verwendet werden soll.", "autoGuessEncoding": "Ist diese Option aktiviert, wird beim Öffnen von Dateien versucht, die Zeichensatzcodierung automatisch zu ermitteln.", + "eol": "Das Zeilenende-Standardzeichen. Verwenden Sie \\n für LF und \\r\\n für CRLF.", "trimTrailingWhitespace": "Bei Aktivierung werden nachgestellte Leerzeichen beim Speichern einer Datei gekürzt.", "insertFinalNewline": "Bei Aktivierung wird beim Speichern einer Datei eine abschließende neue Zeile am Dateiende eingefügt.", "files.autoSave.off": "Eine geänderte Datei wird nie automatisch gespeichert.", @@ -26,6 +27,7 @@ "autoSaveDelay": "Steuert die Verzögerung in Millisekunden, nach der eine geänderte Datei automatisch gespeichert wird. Nur gültig, wenn \"files.autoSave\" auf \"{0}\" festgelegt ist.", "watcherExclude": "Konfigurieren Sie Globmuster von Dateipfaden, die aus der Dateiüberwachung ausgeschlossen werden sollen. Das Ändern dieser Einstellung erfordert einen Neustart. Wenn Ihr Code beim Starten viel CPU-Zeit benötigt, können Sie große Ordner ausschließen, um die Anfangslast zu verringern.", "hotExit.off": "Hot Exit deaktivieren.", + "hotExit.onExit": "Hot Exit wird beim Schließen der Anwendung ausgelöst, d. h. wenn unter Windows/Linux das letzte Fenster geschlossen wird oder wenn der Befehl \"workbench.action.quit\" ausgelöst wird (Befehlspalette, Tastenzuordnung, Menü). Alle Fenster mit Sicherungen werden beim nächsten Start wiederhergestellt.", "hotExit": "Steuert, ob nicht gespeicherten Dateien zwischen den Sitzungen beibehlten werden, die Aufforderung zum Speichern wird beim Beenden des Editors übersprungen.", "defaultLanguage": "Der Standardsprachmodus, der neuen Dateien zugewiesen wird.", "editorConfigurationTitle": "Editor", diff --git a/i18n/deu/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/deu/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index 0402d68c71d79..ed93c437e8725 100644 --- a/i18n/deu/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -5,7 +5,5 @@ // Do not edit this file. It is machine generated. { "explorerSection": "Datei-Explorer-Abschnitt", - "noWorkspace": "Es ist kein Ordner geöffnet.", - "noWorkspaceHelp": "Sie haben noch keinen Ordner geöffnet.", "openFolder": "Ordner öffnen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/deu/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index 02b807c765760..ac1fd2f5acbc6 100644 --- a/i18n/deu/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "Abschnitt \"Geöffnete Editoren\"", "openEditors": "Geöffnete Editoren", + "openEditosrSection": "Abschnitt \"Geöffnete Editoren\"", "treeAriaLabel": "Geöffnete Editoren: Liste der aktiven Dateien", "dirtyCounter": "{0} nicht gespeichert" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index b7e6e1897409c..7fb4c04c827ae 100644 --- a/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -10,5 +10,6 @@ "prof.detail": "Erstellen Sie ein Problem, und fügen Sie die folgenden Dateien manuell an:\n{0}", "prof.restartAndFileIssue": "Problem erstellen und neu starten", "prof.restart": "Neu starten", - "prof.thanks": "Danke für Ihre Hilfe." + "prof.thanks": "Danke für Ihre Hilfe.", + "prof.detail.restart": "Ein abschließender Neustart ist erforderlich um '{0}' nutzen zu können. Danke für Ihre Hilfe." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 17617151e91f6..959f4d64674da 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "Tastenbindung definieren", - "defineKeybinding.kbLayoutErrorMessage": "Sie können diese Tastenkombination mit Ihrem aktuellen Tastaturlayout nicht generieren." + "defineKeybinding.kbLayoutErrorMessage": "Sie können diese Tastenkombination mit Ihrem aktuellen Tastaturlayout nicht generieren.", + "defineKeybinding.kbLayoutLocalAndUSMessage": "**{0}** für Ihr aktuelles Tastaturlayout (**{1}** für USA, Standard).", + "defineKeybinding.kbLayoutLocalMessage": "**{0}** für Ihr aktuelles Tastaturlayout." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 701fa77e7a58f..409e4b05ee121 100644 --- a/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "Einstellungen können nicht geschrieben werden. Öffnen Sie die Datei, um Fehler/Warnungen in der Datei zu korrigieren. Versuchen Sie es anschließend noch mal.", "editTtile": "Bearbeiten", "replaceDefaultValue": "In Einstellungen ersetzen", "copyDefaultValue": "In Einstellungen kopieren", diff --git a/i18n/deu/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..8595fd7f9f7f3 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchMessage": "Eine Einstellung wurde geändert, welche einen Neustart benötigt.", + "relaunchDetail": "Drücke den Neu starten-Button, um {0} neuzustarten und die Einstellung zu aktivieren.", + "restart": "Neu starten" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/deu/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json index 8b6ad71cd4e6d..3a19632777036 100644 --- a/i18n/deu/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "editorGutterModifiedBackground": "Hintergrundfarbe für die Editor-Leiste für Zeilen, die geändert wurden.", + "editorGutterAddedBackground": "Hintergrundfarbe für die Editor-Leiste für Zeilen, die hinzugefügt wurden.", + "editorGutterDeletedBackground": "Hintergrundfarbe für die Editor-Leiste für Zeilen, die gelöscht wurden." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index cfb59dde79057..11d322e71292a 100644 --- a/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "Git anzeigen", + "installAdditionalSCMProviders": "Installiere weiter SCM Provider...", "source control": "Quellcodeverwaltung", "toggleSCMViewlet": "SCM anzeigen", "view": "Anzeigen" diff --git a/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index 07930885971eb..d2a2095a234b2 100644 --- a/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "Installiere weiter SCM Provider...", "switch provider": "SCM-Anbieter wechseln..." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/deu/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index e7724dc5035c5..8ec0049b3b37b 100644 --- a/i18n/deu/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,5 +6,7 @@ { "searchMatches": "{0} Übereinstimmungen gefunden", "searchMatch": "{0} Übereinstimmung gefunden", - "fileMatchAriaLabel": "{0} Übereinstimmungen in der Datei \"{1}\" des Ordners \"{2}\", Suchergebnis" + "fileMatchAriaLabel": "{0} Übereinstimmungen in der Datei \"{1}\" des Ordners \"{2}\", Suchergebnis", + "replacePreviewResultAria": "Ersetze Term {0} mit {1} an Spaltenposition {2} in Zeile mit Text {3}", + "searchResultAria": "Term {0} an Spaltenposition {1} in Zeile mit Text {2} gefunden" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 60f40269ae400..b0d6510181e2e 100644 --- a/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -9,5 +9,6 @@ "vscode.extension.contributes.snippets-path": "Der Pfad der Codeausschnittdatei. Der Pfad ist relativ zum Extensionordner und beginnt normalerweise mit \". /snippets/\".", "invalid.language": "Unbekannte Sprache in \"contributes.{0}.language\". Bereitgestellter Wert: {1}", "invalid.path.0": "In \"contributes.{0}.path\" wurde eine Zeichenfolge erwartet. Bereitgestellter Wert: {1}", - "invalid.path.1": "Es wurde erwartet, dass \"contributes.{0}.path\" ({1}) im Ordner ({2}) der Extension enthalten ist. Dies führt ggf. dazu, dass die Extension nicht portierbar ist." + "invalid.path.1": "Es wurde erwartet, dass \"contributes.{0}.path\" ({1}) im Ordner ({2}) der Extension enthalten ist. Dies führt ggf. dazu, dass die Extension nicht portierbar ist.", + "badVariableUse": "Das \"{0}\"-Snippet verwirrt wahrscheinlich Snippet-Variablen und Snippet-Paltzhalter. Schaue https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax für weitere Informationen." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index 086f7561431e4..ff4eb3dd4ad30 100644 --- a/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "Leerer Codeausschnitt", "snippetSchema.json": "Benutzerkonfiguration des Codeausschnitts", "snippetSchema.json.prefix": "Das Präfix, das beim Auswählen des Codeausschnitts in IntelliSense verwendet werden soll.", - "snippetSchema.json.body": "Der Inhalt des Codeausschnitts. Verwenden Sie \"${id}\", \"${id:label}\", \"${1:label}\" für Variablen und \"$0\", \"$1\" für die Cursorpositionen.", + "snippetSchema.json.body": "Der Inhalt des Codeausschnitts. Verwenden Sie \"$1\", \"${1:defaultText}\", um Cursorpositionen zu definieren, und \"$0\" für die finale Cursorposition. Fügen Sie mit \"${varName}\" und \"${varName:defaultText}\" Variablenwerte ein, z. B. \"This is file: $TM_FILENAME\".", "snippetSchema.json.description": "Die Beschreibung des Codeausschnitts." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..b04bf830fa17e --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "Helfen Sie uns die Unterstützung für {0} zu verbessern", + "takeShortSurvey": "An kurzer Umfrage teilnehmen", + "remindLater": "Später erinnern", + "neverAgain": "Nicht mehr anzeigen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..5082c06fc4a4f --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Wir würden uns freuen, wenn Sie an einer schnellen Umfrage teilnehmen.", + "takeSurvey": "An Umfrage teilnehmen", + "remindLater": "Später erinnern", + "neverAgain": "Nicht mehr anzeigen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..b8a1db0f78fd4 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "Keine übereinstimmenden Aufgaben" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index c0432625724e1..b588e15359bd5 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks" + "entryAriaLabel": "{0}, tasks", + "customizeTask": "Aufgabe anpassen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..b8a1db0f78fd4 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "Keine übereinstimmenden Aufgaben" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index bf5de1662ada6..b78817aed4ca2 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -12,5 +12,6 @@ "ConfigurationParser.invalidVaraibleReference": "Fehler: Ungültiger ProblemMatcher-Verweis: {0}\n", "ConfigurationParser.noTaskName": "Fehler: Tasks müssen eine Eigenschaft \"TaskName\" angeben. Der Task wird ignoriert.\n{0}\n", "taskConfiguration.shellArgs": "Warnung: Die Aufgabe \"{0}\" ist ein Shellbefehl, und der Befehlsname oder eines seiner Argumente enthält Leerzeichen ohne Escapezeichen. Führen Sie Argumente im Befehl zusammen, um eine korrekte Angabe der Befehlszeile sicherzustellen.", + "taskConfiguration.noCommandOrDependsOn": "Fehler: Aufgabe \"{0}\" definiert keinen Befehl bzw. keine depondsOn-Eigenschaft. Die Aufgabe wird ignoriert. Die Definition lautet:\n{1}", "taskConfiguration.noCommand": "Fehler: Aufgabe \"{0}\" definiert keinen Befehl. Die Aufgabe wird ignoriert. Die Definition lautet:\n{1}" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index 386f8b115b1ed..0570db2cdce1b 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "Weitere Befehlsoptionen", "JsonSchema.options.cwd": "Das aktuelle Arbeitsverzeichnis des ausgeführten Programms oder Skripts. Wenn keine Angabe erfolgt, wird das aktuelle Arbeitsbereich-Stammverzeichnis des Codes verwendet.", "JsonSchema.options.env": "Die Umgebung des ausgeführten Programms oder der Shell. Wenn keine Angabe erfolgt, wird Umgebung des übergeordneten Prozesses verwendet.", + "JsonSchema.shellConfiguration": "Konfiguriert die zu verwendende Shell.", "JsonSchema.shell.executable": "Die zu verwendende Shell.", "JsonSchema.shell.args": "Die Shell-Argumente.", "JsonSchema.command": "Der auszuführende Befehl. Es kann sich um ein externes Programm oder einen Shellbefehl handeln.", diff --git a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index ce023819c120a..1bfe4d70cd96d 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "Die Versionsnummer der Konfiguration.", + "JsonSchema._runner": "Die Ausführung ist abgestuft. Verwenden Sie die offizielle Ausführungseigenschaft.", + "JsonSchema.runner": "Definiert, ob die Aufgabe als Prozess ausgeführt wird, und die Ausgabe wird im Ausgabefenster oder innerhalb des Terminals angezeigt.", "JsonSchema.windows": "Windows-spezifische Befehlskonfiguration", "JsonSchema.mac": "Mac-spezifische Befehlskonfiguration", "JsonSchema.linux": "Linux-spezifische Befehlskonfiguration", diff --git a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 1363d395b952b..433a15c4e8fe3 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -7,6 +7,10 @@ "JsonSchema.shell": "Gibt an, ob der Befehl ein Shellbefehl oder ein externes Programm ist. Wenn keine Angabe erfolgt, ist der Standardwert \"false\".", "JsonSchema.tasks.dependsOn.string": "Eine weitere Aufgabe, von der diese Aufgabe abhängt.", "JsonSchema.tasks.dependsOn.array": "Die anderen Aufgaben, von denen diese Aufgabe abhängt.", + "JsonSchema.tasks.group": "Definiert die Ausführungsgruppe, der diese Aufgabe angehört. Wird dies ausgelassen, gehört die Aufgabe keiner Gruppe an.", + "JsonSchema.tasks.type": "Definiert, ob die Aufgabe als Prozess oder als Befehl innerhalb einer Shell ausgeführt wird. Standardmäßig wird sie als Prozess ausgeführt.", + "JsonSchema.version": "Die Versionsnummer der Konfiguration.", + "JsonSchema.tasks.customize": "Die anzupassende beigetragene Aufgabe.", "JsonSchema.windows": "Windows-spezifische Befehlskonfiguration", "JsonSchema.mac": "Mac-spezifische Befehlskonfiguration", "JsonSchema.linux": "Linux-spezifische Befehlskonfiguration" diff --git a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index aedbe077c16f7..d4db76035e550 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -18,10 +18,12 @@ "problems": "Probleme", "manyMarkers": "mehr als 99", "tasks": "Aufgaben", + "TaskSystem.noHotSwap": "Zum Ändern des Aufgabenausführungsmoduls muss VS Code neu gestartet werden. Die Änderung wird ignoriert.", "TaskService.noBuildTask": "Keine Buildaufgabe definiert. Markieren Sie eine Aufgabe mit 'isBuildCommand' in der tasks.json-Datei.", "TaskService.noTestTask": "Keine Testaufgabe definiert. Markieren Sie eine Aufgabe mit 'isTestCommand' in der tasks.json-Datei.", "TaskServer.noTask": "Die angeforderte auszuführende Aufgabe {0} wurde nicht gefunden.", - "TaskSystem.activeSame": "Der Task ist bereits aktiv und im Überwachungsmodus. Um den Task zu beenden, verwenden Sie \"F1 > Task beenden\".", + "customizeParseErrors": "Die aktuelle Aufgabenkonfiguration weist Fehler auf. Beheben Sie die Fehler, bevor Sie eine Aufgabe anpassen.", + "moreThanOneBuildTask": "In \"tasks.json\" sind mehrere Buildaufgaben definiert. Die erste wird ausgeführt.\n", "TaskSystem.active": "Eine aktive Aufgabe wird bereits ausgeführt. Beenden Sie diese, bevor Sie eine andere Aufgabe ausführen.", "TaskSystem.restartFailed": "Fehler beim Beenden und Neustarten der Aufgabe \"{0}\".", "TaskSystem.configurationErrors": "Fehler: Die angegebene Aufgabenkonfiguration weist Validierungsfehler auf und kann nicht verwendet werden. Beheben Sie zuerst die Fehler.", diff --git a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index a619f8880ba7b..0ad146b37850f 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,7 @@ { "TerminalTaskSystem.unknownError": "Unbekannter Fehler beim Ausführen eines Tasks. Details finden Sie im Taskausgabeprotokoll.", "TerminalTaskSystem.terminalName": "Aufgabe - {0}", - "TerminalTaskSystem": "Ein Shell-Befehl kann nicht auf einem UNC-Laufwerk ausgeführt werden." + "reuseTerminal": "Das Terminal wird von Aufgaben wiederverwendet, drücken Sie zum Schließen eine beliebige Taste.", + "TerminalTaskSystem": "Ein Shell-Befehl kann nicht auf einem UNC-Laufwerk ausgeführt werden.", + "unkownProblemMatcher": "Der Problemabgleicher {0} kann nicht aufgelöst werden. Der Abgleicher wird ignoriert." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/deu/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index 8a66033683fd7..b6c2bea0eab6b 100644 --- a/i18n/deu/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "Unbekannter Fehler beim Ausführen eines Tasks. Details finden Sie im Taskausgabeprotokoll.", "TaskRunnerSystem.watchingBuildTaskFinished": "\nDie Überwachung der Buildtasks wurde beendet.", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\nDer Task \"{0}\" wurde durch eine Benutzeranforderung beendet." + "TaskRunnerSystem.cancelRequested": "\nDer Task \"{0}\" wurde durch eine Benutzeranforderung beendet.", + "unkownProblemMatcher": "Der Problemabgleicher {0} kann nicht aufgelöst werden. Der Abgleicher wird ignoriert." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 2b0635fb08d60..2bbcb5a8073ba 100644 --- a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -8,6 +8,7 @@ "workbench.action.terminal.kill": "Aktive Terminalinstanz beenden", "workbench.action.terminal.kill.short": "Terminal beenden", "workbench.action.terminal.copySelection": "Auswahl kopieren", + "workbench.action.terminal.selectAll": "Alles auswählen", "workbench.action.terminal.new": "Neues integriertes Terminal erstellen", "workbench.action.terminal.new.short": "Neues Terminal", "workbench.action.terminal.focus": "Fokus im Terminal", @@ -26,5 +27,8 @@ "workbench.action.terminal.scrollUp": "Nach oben scrollen (Zeile)", "workbench.action.terminal.scrollUpPage": "Nach oben scrollen (Seite)", "workbench.action.terminal.scrollToTop": "Bildlauf nach oben", - "workbench.action.terminal.clear": "Löschen" + "workbench.action.terminal.clear": "Löschen", + "workbench.action.terminal.allowWorkspaceShell": "Shell-Konfiguration des Arbeitsbereichs zulassen", + "workbench.action.terminal.disallowWorkspaceShell": "Verbiete Workspace Shell Konfiguration", + "workbench.action.terminal.rename": "Umbenennen" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index 209097e71ed31..9d4810761f243 100644 --- a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "Die Hintergrundfarbe des Terminals, dies ermöglicht eine unterschiedliche Färbung des Terminals im Panel.", + "terminal.foreground": "Die Vordergrundfarbe des Terminal.", "terminal.ansiColor": "\"{0}\": ANSI-Farbe im Terminal" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..32db8ee0bd6e9 --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Suchen", + "placeholder.find": "Suchen", + "label.previousMatchButton": "Vorherige Übereinstimmung", + "label.nextMatchButton": "Nächste Übereinstimmung", + "label.closeButton": "Schließen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index 656e6a048aeef..ed2d8c3d2122c 100644 --- a/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "Die Terminalauswahl kann nicht kopiert werden, wenn das Terminal nicht den Fokus besitzt.", "terminal.integrated.exitedWithCode": "Der Terminalprozess wurde mit folgendem Exitcode beendet: {0}", "terminal.integrated.waitOnExit": "Betätigen Sie eine beliebige Taste, um das Terminal zu schließen.", "terminal.integrated.launchFailed": "Fehler beim Starten des Terminalprozessbefehls \"{0}{1}\" (Exitcode: {2})." diff --git a/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index cc616e88ee27e..5b38193cdecf0 100644 --- a/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,6 +6,7 @@ { "selectTheme.label": "Farbdesign", "installColorThemes": "Zusätzliche Farbschemas installieren...", + "themes.selectTheme": "Farbdesign auswählen (eine Vorschau wird mit den Tasten NACH OBEN/NACH UNTEN angezeigt)", "selectIconTheme.label": "Dateisymboldesign", "installIconThemes": "Zusätzliche Dateisymbolschemas installieren...", "noIconThemeLabel": "Keine", diff --git a/i18n/deu/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/deu/src/vs/workbench/parts/update/electron-browser/update.i18n.json index 22510793b9c98..80d0e1e4ecf47 100644 --- a/i18n/deu/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -15,5 +15,18 @@ "license": "Lizenz lesen", "updateAvailable": "{0} wird nach dem Neustart aktualisiert.", "thereIsUpdateAvailable": "Ein Update ist verfügbar.", - "noUpdatesAvailable": "Zurzeit sind keine Updates verfügbar." + "noUpdatesAvailable": "Zurzeit sind keine Updates verfügbar.", + "updateIsReady": "Neue Aktualisierung verfügbar.", + "commandPalette": "Befehlspalette...", + "settings": "Einstellungen", + "keyboardShortcuts": "Tastenkombinationen", + "selectTheme.label": "Farbdesign", + "themes.selectIconTheme.label": "Dateisymboldesign", + "not available": "Aktualisierungen nicht verfügbar", + "checkingForUpdates": "Überprüfen auf Updates...", + "DownloadUpdate": "Verfügbares Update herunterladen", + "DownloadingUpdate": "Das Update wird heruntergeladen...", + "InstallingUpdate": "Update wird installiert...", + "restartToUpdate": "Für Update neu starten...", + "checkForUpdates": "Nach Aktualisierungen suchen..." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/deu/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..b7eb39e941ebe --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0}-Aktionen" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/deu/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..69d939fd7d16c --- /dev/null +++ b/i18n/deu/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "Ansichten müssen ein Array sein.", + "requirestring": "Die Eigenschaft \"{0}\" ist erforderlich. Sie muss vom Typ \"string\" sein.", + "optstring": "Die Eigenschaft \"{0}\" kann ausgelassen werden oder muss vom Typ \"string\" sein.", + "vscode.extension.contributes.view.id": "Bezeichner der Ansicht. Damit können Sie einen Datenanbieter über die API \"vscode.window.registerTreeDataProviderForView\" registrieren. Er dient auch zum Aktivieren Ihrer Erweiterung, indem Sie das Ereignis \"onView:${id}\" für \"activationEvents\" registrieren.", + "vscode.extension.contributes.view.name": "Der visuell lesbare Name der Ansicht. Wird angezeigt", + "vscode.extension.contributes.views": "Trägt Ansichten zum Editor bei.", + "views.explorer": "Explorer-Ansicht", + "locationId.invalid": "{0}\" ist kein gültiger Ansichtenspeicherort" +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 57931ea4bd6ff..89fcf6e01edf2 100644 --- a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -14,20 +14,23 @@ "welcomePage.moreRecent": "Weitere Informationen...", "welcomePage.noRecentFolders": "Keine kürzlich verwendeten Ordner", "welcomePage.help": "Hilfe", + "welcomePage.keybindingsCheatsheet": "Druckbare Tastaturübersicht", "welcomePage.introductoryVideos": "Einführungsvideos", "welcomePage.productDocumentation": "Produktdokumentation", "welcomePage.gitHubRepository": "GitHub-Repository", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Willkommensseite beim Start anzeigen", "welcomePage.customize": "Anpassen", + "welcomePage.installExtensionPacks": "Tools und Sprachen", + "welcomePage.installExtensionPacksDescription": "Unterstützung für {0} und {1} installieren", "welcomePage.moreExtensions": "mehr", "welcomePage.installKeymapDescription": "Tastenkombinationen installieren", + "welcomePage.installKeymapExtension": "Installieren Sie die Tastenkombinationen von {0} und {1}.", "welcomePage.others": "Andere", "welcomePage.colorTheme": "Farbdesign", "welcomePage.colorThemeDescription": "Passen Sie das Aussehen des Editors und Ihres Codes an Ihre Wünsche an.", "welcomePage.learn": "Lernen", "welcomePage.showCommands": "Alle Befehle suchen und ausführen", - "welcomePage.showCommandsDescription": "Über die Einstellungen ({0}) können Sie Befehle schnell suchen und darauf zugreifen.", "welcomePage.interfaceOverview": "Überblick über die Schnittstelle", "welcomePage.interfaceOverviewDescription": "Erhalten Sie eine visuelle Überlagerung, die die wichtigsten Komponenten der Benutzeroberfläche hervorhebt.", "welcomePage.interactivePlayground": "Interaktiver Playground", diff --git a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index f83bfd761c786..399910772cea5 100644 --- a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbenchConfigurationTitle": "Workbench", - "welcomePage.enabled": "Wenn diese Option aktiviert ist, wird die Willkommensseite beim Start angezeigt.", "help": "Hilfe" } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index a6f6f26a54aab..bd211db7d59d9 100644 --- a/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "workbenchConfigurationTitle": "Workbench", + "welcomePage.enabled": "Wenn diese Option aktiviert ist, wird die Willkommensseite beim Start angezeigt.", "welcomePage": "Willkommen", "welcomePage.javaScript": "JavaScript", "welcomePage.typeScript": "TypeScript", @@ -14,11 +16,23 @@ "welcomePage.sublime": "Sublime", "welcomePage.atom": "Atom", "welcomePage.extensionPackAlreadyInstalled": "Unterstützung für {0} ist bereits installiert.", + "welcomePage.willReloadAfterInstallingExtensionPack": "Nach dem Installieren zusätzlicher Unterstützung für {0} wird das Fenster neu geladen.", + "welcomePage.installingExtensionPack": "Zusätzliche Unterstützung für {0} wird installiert...", + "welcomePage.extensionPackNotFound": "Unterstützung für {0} mit der ID {1} wurde nicht gefunden.", "welcomePage.keymapAlreadyInstalled": "Die {0} Tastenkombinationen sind bereits installiert.", "welcomePage.willReloadAfterInstallingKeymap": "Das Fenster wird nach der Installation der {0}-Tastaturbefehle neu geladen.", "welcomePage.installingKeymap": "Die {0}-Tastenkombinationen werden installiert...", "welcomePage.keymapNotFound": "Die {0} Tastenkombinationen mit der ID {1} wurden nicht gefunden.", "welcome.title": "Willkommen", + "welcomePage.openFolderWithPath": "Ordner {0} mit Pfad {1} öffnen", + "welcomePage.extensionListSeparator": ",", + "welcomePage.installKeymap": "Tastenzuordnung {0} öffnen", + "welcomePage.installExtensionPack": "Zusätzliche Unterstützung für {0} installieren", + "welcomePage.installedKeymap": "Die Tastaturzuordnung {0} ist bereits installiert.", + "welcomePage.installedExtensionPack": "Unterstützung für {0} ist bereits installiert.", "ok": "OK", - "cancel": "Abbrechen" + "details": "Details", + "cancel": "Abbrechen", + "welcomePage.buttonBackground": "Hintergrundfarbe für die Schaltflächen auf der Willkommensseite.", + "welcomePage.buttonHoverBackground": "Hoverhintergrundfarbe für die Schaltflächen auf der Willkommensseite." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/deu/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index 197be5e3800c3..f8c9526c03a23 100644 --- a/i18n/deu/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/deu/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "walkThrough.unboundCommand": "Ungebunden", - "walkThrough.gitNotFound": "Git scheint auf Ihrem System nicht installiert zu sein." + "walkThrough.gitNotFound": "Git scheint auf Ihrem System nicht installiert zu sein.", + "walkThrough.embeddedEditorBackground": "Hintergrundfarbe für die eingebetteten Editoren im Interaktiven Playground." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/deu/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 0c8e653b4e5f4..8f33c300c01e8 100644 --- a/i18n/deu/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/deu/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -6,6 +6,12 @@ { "open": "Einstellungen öffnen", "close": "Schließen", + "saveAndRetry": "Änderungen Speichern und Wiederholen", "errorUnknownKey": "Die Konfigurationsdatei kann nicht geschrieben werden (unbekannter Schlüssel).", - "errorInvalidTarget": "In die Konfigurationsdatei kann nicht geschrieben werden (ungültiges Ziel)." + "errorInvalidTarget": "In die Konfigurationsdatei kann nicht geschrieben werden (ungültiges Ziel).", + "errorNoWorkspaceOpened": "In die Einstellungen kann nicht geschrieben werden, weil kein Ordner geöffnet ist. Öffnen Sie zuerst einen Ordner, und versuchen Sie es noch mal.", + "errorInvalidConfiguration": "In die Einstellungen kann nicht geschrieben werden. Öffnen Sie **Benutzereinstellungen**, um Fehler/Warnungen in der Datei zu korrigieren, und versuchen Sie es noch mal.", + "errorInvalidConfigurationWorkspace": "In die Einstellungen kann nicht geschrieben werden. Öffnen Sie die **Arbeitsbereichseinstellungen**, um Fehler/Warnungen in der Datei zu korrigieren, und versuchen Sie es noch mal.", + "errorConfigurationFileDirty": "In die Einstellungen kann nicht geschrieben werden, weil die Datei geändert wurde. Speichern Sie die Datei **Benutzereinstellungen**, und versuchen Sie es noch mal.", + "errorConfigurationFileDirtyWorkspace": "In die Einstellungen kann nicht geschrieben werden, weil die Datei geändert wurde. Speichern Sie die Datei **Arbeitsbereichseinstellungen**, und versuchen Sie es noch mal." } \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/deu/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..f7a2d1f0c3ff4 --- /dev/null +++ b/i18n/deu/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetrie", + "telemetry.enableCrashReporting": "Aktiviert Absturzberichte, die an Microsoft gesendet werden.\nDiese Option erfordert einen Neustart, damit sie wirksam wird." +} \ No newline at end of file diff --git a/i18n/deu/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/deu/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/deu/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/esn/extensions/git/package.i18n.json b/i18n/esn/extensions/git/package.i18n.json index afda046fe5a80..607d4f1df8120 100644 --- a/i18n/esn/extensions/git/package.i18n.json +++ b/i18n/esn/extensions/git/package.i18n.json @@ -32,7 +32,7 @@ "command.push": "Insertar", "command.pushTo": "Insertar en...", "command.sync": "Sincronizar", - "command.publish": "Publicar", + "command.publish": "Publicar rama", "command.showOutput": "Mostrar salida de GIT", "config.enabled": "Si GIT está habilitado", "config.path": "Ruta de acceso del ejecutable de GIT", diff --git a/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json index 8b6ad71cd4e6d..22ca13053b59f 100644 --- a/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/esn/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "acceptCurrentChange": "Aceptar cambio actual", + "acceptIncomingChange": "Aceptar cambio entrante", + "acceptBothChanges": "Aceptar ambos cambios", + "compareChanges": "Comparar cambios" +} \ No newline at end of file diff --git a/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json index c3d2c17c302ba..e94eadacd8d8c 100644 --- a/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/esn/extensions/merge-conflict/out/commandHandler.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "cursorNotInConflict": "El cursor de edición no se encuentra en un conflicto de fusión", + "compareChangesTitle": "{0}: Cambios actuales ⟷ Cambios entrantes", + "cursorOnCommonAncestorsRange": "El cursor del editor está dentro del bloque de ancestros comunes, por favor muévalo al bloque \"actual\" o al \"entrante\"", "cursorOnSplitterRange": "El cursor del editor está dentro del separador de conflictos de fusión, muévalo al bloque \"actual\" o al \"entrante\" ", "noConflicts": "No se encontraron conflictos en este archivo", "noOtherConflictsInThisFile": "No hay más conflictos en este archivo" diff --git a/i18n/esn/extensions/merge-conflict/package.i18n.json b/i18n/esn/extensions/merge-conflict/package.i18n.json index 97bdb64996225..b72c99c527d15 100644 --- a/i18n/esn/extensions/merge-conflict/package.i18n.json +++ b/i18n/esn/extensions/merge-conflict/package.i18n.json @@ -5,7 +5,15 @@ // Do not edit this file. It is machine generated. { "command.category": "Fusionar conflicto", + "command.accept.all-incoming": "Aceptar todos los entrantes", + "command.accept.all-both": "Aceptar ambos", + "command.accept.current": "Aceptar actuales", + "command.accept.incoming": "Aceptar entrantes", + "command.accept.selection": "Aceptar selección", "command.accept.both": "Aceptar ambos", + "command.next": "Siguiente conflicto", + "command.previous": "Conflicto anterior", + "command.compare": "Comparar conflicto actual", "config.title": "Fusionar conflicto", "config.codeLensEnabled": "Habilitar/deshabilitar CodeLens de fusionar bloque de conflictos en el editor", "config.decoratorsEnabled": "Habilitar/deshabilitar decoradores de conflictos de fusión en el editor" diff --git a/i18n/esn/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/esn/extensions/typescript/out/features/bufferSyncSupport.i18n.json index ce77997be34a4..11669b0c32b47 100644 --- a/i18n/esn/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/esn/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "Las versiones no coinciden; global tsc ({0}) != servicio de lenguaje de VS Code ({1}). Pueden producirse errores de compilación incoherente.", "moreInformation": "Más información", "doNotCheckAgain": "No volver a comprobar", "close": "Cerrar", diff --git a/i18n/esn/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/esn/extensions/typescript/out/utils/projectStatus.i18n.json index 22620be6b2223..1248c23303354 100644 --- a/i18n/esn/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/esn/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "Para habilitar las características de lenguaje de JavaScript/TypeScript en todo el proyecto, excluya las carpetas con muchos archivos, como: {0}", "hintExclude.generic": "Para habilitar las características de idioma de JavaScript/TypeScript IntelliSense en todo el proyecto, excluya las carpetas de tamaño grande con archivos de origen en los que no trabaje.", - "open": "Configurar exclusiones", "large.label": "Configurar exclusiones", "hintExclude.tooltip": "Para habilitar las características de idioma de JavaScript/TypeScript IntelliSense en todo el proyecto, excluya las carpetas de tamaño grande con archivos de origen en los que no trabaje." } \ No newline at end of file diff --git a/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json index 0d39c772a73fb..0d41f3ba91cef 100644 --- a/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/esn/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Recuperando cambios en los datos para un mejor rendimiento de TypeScript IntelliSense", + "typesInstallerInitializationFailed.title": "No se pudieron instalar archivos de términos para las características de lenguaje de JavaScript. Asegúrese de que NPM está instalado o configure \"typescript.npm\" en la configuración de usuario", "typesInstallerInitializationFailed.moreInformation": "Más información", "typesInstallerInitializationFailed.doNotCheckAgain": "No volver a comprobar", "typesInstallerInitializationFailed.close": "Cerrar" diff --git a/i18n/esn/extensions/typescript/package.i18n.json b/i18n/esn/extensions/typescript/package.i18n.json index 3de04eb5b4a60..95927c8d1dd7c 100644 --- a/i18n/esn/extensions/typescript/package.i18n.json +++ b/i18n/esn/extensions/typescript/package.i18n.json @@ -13,7 +13,6 @@ "typescript.check.tscVersion": "Compruebe si un compilador de TypeScript de instalación global (p. ej., tsc) difiere del servicio de lenguaje de TypeScript usado.", "typescript.tsserver.log": "votes Habilita los registros del servidor TS a un archivo. Este registro se puede utilizar para diagnosticar problemas en el servidor TS. Este registro puede contener rutas de acceso, código fuente y posiblemente otra información sensitiva acerca del proyecto.", "typescript.tsserver.trace": "Habilita el seguimiento de mensajes al servidor TS. Este seguimiento se puede utilizar para diagnosticar problemas en el servidor TS. Este seguimiento puede contener rutas de acceso, código fuente y posiblemente otra información sensitiva acerca del proyecto.", - "typescript.tsserver.experimentalAutoBuild": "Permite la generación automática experimental. Requiere la versión de desarrollo 1.9 o tsserver 2.x y un reinicio de VS Code después de modificarlo.", "typescript.validate.enable": "Habilita o deshabilita la validación de TypeScript.", "typescript.format.enable": "Habilita o deshabilita el formateador predeterminado de TypeScript.", "javascript.format.enable": "Habilita o deshabilita el formateador predeterminado de JavaScript.", @@ -41,5 +40,8 @@ "typescript.selectTypeScriptVersion.title": "Seleccionar versión de TypeScript", "jsDocCompletion.enabled": "Habilita o deshabilita comentarios automaticos de JSDoc", "javascript.implicitProjectConfig.checkJs": "Habilita/deshabilita la comprobación semántica de los archivos JavaScript. Los archivos jsconfig.json o tsconfig.json reemplazan esta configuración. Se requiere TypeScript >=2.3.1.", - "javascript.nameSuggestions": "Habilitar/deshabilitar nombres únicos de la lista de sugerencias en los archivos de JavaScript. " + "typescript.npm": "Especifica la ruta de acceso al archivo ejecutable de NPM usada para la adquisición automática de tipos. Requiere TypeScript >= 2.3.4.", + "typescript.check.npmIsInstalled": "Compruebe si NPM está instalado para la adquisición automática de tipos.", + "javascript.nameSuggestions": "Habilitar/deshabilitar nombres únicos de la lista de sugerencias en los archivos de JavaScript. ", + "typescript.tsc.autoDetect": "Controla si la detección automática de tareas TSC está activada o desactivada." } \ No newline at end of file diff --git a/i18n/esn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/esn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index 8029ab0b3bdfb..169c17eadd6d0 100644 --- a/i18n/esn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/esn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,6 +6,7 @@ { "imgMeta": "{0} x {1} {2}", "largeImageError": "La imagen es muy grande para mostrar en el editor", + "resourceOpenExternalButton": "¿Abrir la imagen mediante un programa externo?", "nativeBinaryError": "El archivo no se mostrará en el editor porque es binario, muy grande o usa una codificación de texto no compatible.", "sizeB": "{0} B", "sizeKB": "{0} KB", diff --git a/i18n/esn/src/vs/base/common/errorMessage.i18n.json b/i18n/esn/src/vs/base/common/errorMessage.i18n.json index ccfa6a32d0bb6..88c477aba6ab3 100644 --- a/i18n/esn/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/esn/src/vs/base/common/errorMessage.i18n.json @@ -13,6 +13,5 @@ "error.connection.unknown": "Error de conexión desconocido. Es posible que ya no esté conectado a Internet o que el servidor al que se había conectado esté sin conexión.", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "Se ha producido un error desconocido. Consulte el registro para obtener más detalles.", - "nodeExceptionMessage": "Error del sistema ({0})", "error.moreErrors": "{0} ({1} errores en total)" } \ No newline at end of file diff --git a/i18n/esn/src/vs/base/common/keybindingLabels.i18n.json b/i18n/esn/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/code/electron-main/menus.i18n.json b/i18n/esn/src/vs/code/electron-main/menus.i18n.json index 4b1468558adcd..52fa22103d731 100644 --- a/i18n/esn/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/esn/src/vs/code/electron-main/menus.i18n.json @@ -55,6 +55,9 @@ "miShowEmmetCommands": "E&&mmet...", "miToggleLineComment": "&&Alternar comentario de línea", "miToggleBlockComment": "Alternar &&Bloquear comentario", + "miMultiCursorAlt": "Usar Alt+Clic para multicursor", + "miMultiCursorCmd": "Usar Cmd+Clic para multicursor", + "miMultiCursorCtrl": "Usar Ctrl+Clic para multicursor", "miInsertCursorAbove": "&&Agregar cursor arriba", "miInsertCursorBelow": "A&&gregar cursor abajo", "miInsertCursorAtEndOfEachLineSelected": "Agregar c&&ursores a extremos de línea", @@ -133,11 +136,11 @@ "miColumnBreakpoint": "Punto de interrupción de c&&olumna", "miFunctionBreakpoint": "Punto de interrupción de &&función...", "miNewBreakpoint": "&&Nuevo punto de interrupción", + "miEnableAllBreakpoints": "Habilitar todos los puntos de interrupción", "miDisableAllBreakpoints": "&&Deshabilitar todos los puntos de interrupción", "miRemoveAllBreakpoints": "Quitar &&todos los puntos de interrupción", "miInstallAdditionalDebuggers": "&&Instalar los depuradores adicionales...", "mMinimize": "Minimizar", - "mClose": "Cerrar", "mBringToFront": "Traer todo al frente", "miToggleDevTools": "&&Alternar herramientas de desarrollo", "miAccessibilityOptions": "&&Opciones de accesibilidad", @@ -153,12 +156,14 @@ "miLicense": "Ver &&licencia", "miPrivacyStatement": "&&Declaración de privacidad", "miAbout": "&&Acerca de", + "miTerminateTask": "&&Finalizar tarea", "accessibilityOptionsWindowTitle": "Opciones de accesibilidad", "miRestartToUpdate": "Reiniciar para actualizar...", "miCheckingForUpdates": "Buscando actualizaciones...", "miDownloadUpdate": "Descargar actualización disponible", "miDownloadingUpdate": "Descargando actualización...", "miInstallingUpdate": "Instalando actualización...", + "miCheckForUpdates": "Buscar actualizaciones...", "aboutDetail": "\nVersión {0}\nConfirmación {1}\nFecha {2}\nShell {3}\nRepresentador {4}\nNode {5}", "okButton": "Aceptar" } \ No newline at end of file diff --git a/i18n/esn/src/vs/code/electron-main/windows.i18n.json b/i18n/esn/src/vs/code/electron-main/windows.i18n.json index 80fb2bc32dc6d..959ddae244632 100644 --- a/i18n/esn/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/esn/src/vs/code/electron-main/windows.i18n.json @@ -13,9 +13,5 @@ "appStalled": "La ventana ha dejado de responder.", "appStalledDetail": "Puede volver a abrir la ventana, cerrarla o seguir esperando.", "appCrashed": "La ventana se bloqueó", - "appCrashedDetail": "Sentimos las molestias. Puede volver a abrir la ventana para continuar donde se detuvo.", - "newWindow": "Nueva ventana", - "newWindowDesc": "Abre una ventana nueva.", - "recentFolders": "Carpetas recientes", - "folderDesc": "{0} {1}" + "appCrashedDetail": "Sentimos las molestias. Puede volver a abrir la ventana para continuar donde se detuvo." } \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json index 8fe058e55cef5..c70492563f8e4 100644 --- a/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/esn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -23,6 +23,8 @@ "minimap.enabled": "Controla si se muestra el minimapa", "minimap.renderCharacters": "Presentar los caracteres reales en una línea (por oposición a bloques de color)", "minimap.maxColumn": "Limitar el ancho del minimapa para presentar como mucho un número de columnas determinado", + "find.seedSearchStringFromSelection": "Controla si se inicializa la cadena de búsqueda en Buscar widget en la selección del editor", + "find.autoFindInSelection": "Controla si el indicador Buscar en selección se activa cuando se seleccionan varios caracteres o líneas de texto en el editor", "wordWrap.off": "Las líneas no se ajustarán nunca.", "wordWrap.on": "Las líneas se ajustarán en el ancho de la ventanilla.", "wordWrap.wordWrapColumn": "Las líneas se ajustarán en \"editor.wordWrapColumn\".", @@ -31,16 +33,19 @@ "wordWrapColumn": "Controls the wrapping column of the editor when `editor.wordWrap` is 'wordWrapColumn' or 'bounded'.", "wrappingIndent": "Controla el sangrado de las líneas ajustadas. Puede ser uno los valores 'none', 'same' o 'indent'.", "mouseWheelScrollSensitivity": "Se utilizará un multiplicador en los eventos de desplazamiento de la rueda del mouse `deltaX` y `deltaY`", + "multiCursorModifier.ctrlCmd": "Se asigna a \"Control\" en Windows y Linux y a \"Comando\" en OSX.", + "multiCursorModifier.alt": "Se asigna a \"Alt\" en Windows y Linux y a \"Opción\" en OSX.", + "multiCursorModifier": "El modificador que se usará para agregar varios cursores con el mouse. \"ctrlCmd\" se asigna a \"Control\" en Windows y Linux y a \"Comando\" en OSX. Los gestos del mouse Ir a la definición y Abrir vínculo se adaptarán de modo que no entren en conflicto con el modificador multicursor.", "quickSuggestions.strings": "Habilita sugerencias rápidas en las cadenas.", "quickSuggestions.comments": "Habilita sugerencias rápidas en los comentarios.", "quickSuggestions.other": "Habilita sugerencias rápidas fuera de las cadenas y los comentarios.", "quickSuggestions": "Controla si las sugerencias deben mostrarse automáticamente mientras se escribe", "quickSuggestionsDelay": "Controla el retardo en ms tras el cual aparecerán sugerencias rápidas", - "parameterHints": "Habilita sugerencias de parámetro", "autoClosingBrackets": "Controla si el editor debe cerrar automáticamente los corchetes después de abrirlos", "formatOnType": "Controla si el editor debe dar formato automáticamente a la línea después de escribirla", "formatOnPaste": "Controla si el editor debe formatear automáticamente el contenido pegado. Debe haber disponible un formateador capaz de aplicar formato a un intervalo dentro de un documento.", "suggestOnTriggerCharacters": "Controla si las sugerencias deben aparecer de forma automática al escribir caracteres desencadenadores", + "acceptSuggestionOnEnter": "Controla si las sugerencias deben aceptarse en \"Entrar\" (además de \"TAB\"). Ayuda a evitar la ambigüedad entre insertar nuevas líneas o aceptar sugerencias. El valor \"smart\" significa que solo se acepta una sugerencia con Entrar cuando se realiza un cambio textual.", "acceptSuggestionOnCommitCharacter": "Controla si se deben aceptar sugerencias en los caracteres de confirmación. Por ejemplo, en Javascript, el punto y coma (\";\") puede ser un carácter de confirmación que acepta una sugerencia y escribe ese carácter.", "snippetSuggestions": "Controla si se muestran los fragmentos de código con otras sugerencias y cómo se ordenan.", "emptySelectionClipboard": "Controla si al copiar sin selección se copia la línea actual.", @@ -69,6 +74,10 @@ "trimAutoWhitespace": "Quitar espacio en blanco final autoinsertado", "stablePeek": "Mantiene abierto el editor interactivo incluso al hacer doble clic en su contenido o presionar Escape.", "dragAndDrop": "Controla si el editor debe permitir mover selecciones mediante arrastrar y colocar.", + "accessibilitySupport.auto": "El editor usará API de plataforma para detectar cuándo está conectado un lector de pantalla.", + "accessibilitySupport.on": "El editor se optimizará de forma permanente para su uso con un editor de pantalla.", + "accessibilitySupport.off": "El editor nunca se optimizará para su uso con un lector de pantalla.", + "accessibilitySupport": "Controla si el editor se debe ejecutar en un modo optimizado para lectores de pantalla.", "sideBySide": "Controla si el editor de diferencias muestra las diferencias en paralelo o alineadas.", "ignoreTrimWhitespace": "Controla si el editor de diferencias muestra los cambios de espacio inicial o espacio final como diferencias.", "renderIndicators": "Controla si el editor de diff muestra indicadores +/- para cambios agregados/quitados", diff --git a/i18n/esn/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/esn/src/vs/editor/common/config/editorOptions.i18n.json index b1da401aa984a..c82ce8730064c 100644 --- a/i18n/esn/src/vs/editor/common/config/editorOptions.i18n.json +++ b/i18n/esn/src/vs/editor/common/config/editorOptions.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "accessibilityOffAriaLabel": "No se puede acceder al editor en este momento. Presione Alt+F1 para ver opciones.", "editorViewAccessibleLabel": "Contenido del editor" } \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/esn/src/vs/editor/common/view/editorColorRegistry.i18n.json index fcdba2ee5ad58..e5d0cfe1b5bae 100644 --- a/i18n/esn/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/esn/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -16,5 +16,9 @@ "editorBracketMatchBackground": "Color de fondo tras corchetes coincidentes", "editorBracketMatchBorder": "Color de bloques con corchetes coincidentes", "editorOverviewRulerBorder": "Color del borde de la regla de visión general.", - "editorGutter": "Color de fondo del margen del editor. Este espacio contiene los márgenes de glifos y los números de línea." + "editorGutter": "Color de fondo del margen del editor. Este espacio contiene los márgenes de glifos y los números de línea.", + "errorForeground": "Color de primer plano de squigglies de error en el editor.", + "errorBorder": "Color de borde de squigglies de error en el editor.", + "warningForeground": "Color de primer plano de squigglies de advertencia en el editor.", + "warningBorder": "Color de borde de squigglies de advertencia en el editor." } \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/esn/src/vs/editor/contrib/find/common/findController.i18n.json index a16ef436a2016..70c6090fd3243 100644 --- a/i18n/esn/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,5 @@ "addSelectionToPreviousFindMatch": "Agregar selección hasta la anterior coincidencia de búsqueda", "moveSelectionToNextFindMatch": "Mover última selección hasta la siguiente coincidencia de búsqueda", "moveSelectionToPreviousFindMatch": "Mover última selección hasta la anterior coincidencia de búsqueda", - "selectAllOccurencesOfFindMatch": "Seleccionar todas las repeticiones de coincidencia de búsqueda", "changeAll.label": "Cambiar todas las ocurrencias" } \ No newline at end of file diff --git a/i18n/esn/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/esn/src/vs/editor/contrib/links/browser/links.i18n.json index 9446261fac5d8..7b9ee53d86a2c 100644 --- a/i18n/esn/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "Cmd + clic para abrir el vínculo", "links.navigate": "Ctrl + clic para abrir el vínculo", + "links.navigate.al": "Alt + clic para seguir el vínculo", "invalid.url": "No se pudo abrir este vínculo porque no tiene un formato correcto: {0}", "missing.url": "No se pudo abrir este vínculo porque falta el destino.", "label": "Abrir vínculo" diff --git a/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 515c40c0c1d5e..2d8140e32a700 100644 --- a/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/esn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "aria.oneReference": "símbolo en {0} linea {1} en la columna {2}", - "aria.fileReferences.1": "1 símbolo en {0}", - "aria.fileReferences.N": "{0} símbolos en {1}", "aria.result.0": "No se encontraron resultados", "aria.result.1": "Encontró 1 símbolo en {0}", "aria.result.n1": "Encontró {0} símbolos en {1}", diff --git a/i18n/esn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/esn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 963cc3dbe3d5a..253f50641c33f 100644 --- a/i18n/esn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/esn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -14,13 +14,15 @@ "vscode.extension.contributes.menus": "Contribuye con elementos de menú al editor", "menus.commandPalette": "La paleta de comandos", "menus.editorTitle": "El menú de título del editor", - "menus.editorContext": "El menú conextual del editor", + "menus.editorContext": "El menú contextual del editor", "menus.explorerContext": "El menú contextual del explorador de archivos", - "menus.editorTabContext": "Menú contextual de pestañas del editor", + "menus.editorTabContext": "El menú contextual de pestañas del editor", "menus.debugCallstackContext": "El menú contextual de la pila de llamadas de depuración", "menus.scmTitle": "El menú del título Control de código fuente", "menus.resourceGroupContext": "El menú contextual del grupo de recursos de Control de código fuente", "menus.resourceStateContext": "El menú contextual de estado de recursos de Control de código fuente", + "view.viewTitle": "El menú de título de vista contribuida", + "view.itemContext": "El menú contextual del elemento de vista contribuida", "nonempty": "se esperaba un valor no vacío.", "opticon": "la propiedad `icon` se puede omitir o debe ser una cadena o un literal como `{dark, light}`", "requireStringOrObject": "La propiedad \"{0}\" es obligatoria y debe ser de tipo \"string\" u \"object\"", diff --git a/i18n/esn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/esn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 09295c5362ba4..b7b9d3c4f35f0 100644 --- a/i18n/esn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/esn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "Todas las contribuciones de la extensión VS Code representadas por este paquete.", "vscode.extension.preview": "Establece la extensión que debe marcarse como versión preliminar en Marketplace.", "vscode.extension.activationEvents": "Eventos de activación de la extensión VS Code.", + "vscode.extension.activationEvents.onLanguage": "Un evento de activación emitido cada vez que se abre un archivo que se resuelve en el idioma especificado.", + "vscode.extension.activationEvents.onCommand": "Un evento de activación emitido cada vez que se invoca el comando especificado.", + "vscode.extension.activationEvents.onDebug": "Un evento de activación emitido cada vez que se inicia una sesión de depuración del tipo especificado.", + "vscode.extension.activationEvents.workspaceContains": "Un evento de activación emitido cada vez que se abre una carpeta que contiene al menos un archivo que coincide con el patrón global especificado.", + "vscode.extension.activationEvents.onView": "Un evento de activación emitido cada vez que se expande la vista especificada.", + "vscode.extension.activationEvents.star": "Un evento de activación emitido al inicio de VS Code. Para garantizar una buena experiencia para el usuario final, use este evento de activación en su extensión solo cuando no le sirva ninguna otra combinación de eventos de activación en su caso.", "vscode.extension.badges": "Matriz de distintivos que se muestran en la barra lateral de la página de extensiones de Marketplace.", "vscode.extension.badges.url": "URL de la imagen del distintivo.", "vscode.extension.badges.href": "Vínculo del distintivo.", diff --git a/i18n/esn/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/esn/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..ef4f14a4e2963 --- /dev/null +++ b/i18n/esn/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "Nueva ventana", + "newWindowDesc": "Abre una ventana nueva.", + "recentFolders": "Carpetas recientes", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json index c20c4e2b34f70..91c6d95a0e277 100644 --- a/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/esn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -12,7 +12,6 @@ "focusBorder": "Color de borde de los elementos con foco. Este color solo se usa si un componente no lo invalida.", "contrastBorder": "Un borde adicional alrededor de los elementos para separarlos unos de otros y así mejorar el contraste.", "activeContrastBorder": "Un borde adicional alrededor de los elementos activos para separarlos unos de otros y así mejorar el contraste.", - "selectionBackground": "El color de fondo del texto seleccionado en la área de trabajo (por ejemplo, campos de entrada o áreas de texto). Esto no se aplica a las selecciones dentro del editor o el terminal.", "textSeparatorForeground": "Color para los separadores de texto.", "textLinkForeground": "Color de primer plano para los vínculos en el texto.", "textLinkActiveForeground": "Color de primer plano para los vínculos activos en el texto.", @@ -60,6 +59,7 @@ "editorBackground": "Color de fondo del editor.", "editorForeground": "Color de primer plano predeterminado del editor.", "editorWidgetBackground": "Color de fondo del editor de widgets como buscar/reemplazar", + "editorWidgetBorder": "Color de borde de los widgets del editor. El color solo se usa si el widget elige tener un borde y no invalida el color.", "editorSelection": "Color de la selección del editor.", "editorInactiveSelection": "Color de la selección en un editor inactivo.", "editorSelectionHighlight": "Color de las regiones con el mismo contenido que la selección.", @@ -73,5 +73,12 @@ "diffEditorInserted": "Color de fondo para el texto insertado.", "diffEditorRemoved": "Color de fondo para el texto quitado.", "diffEditorInsertedOutline": "Color de contorno para el texto insertado.", - "diffEditorRemovedOutline": "Color de contorno para el texto quitado." + "diffEditorRemovedOutline": "Color de contorno para el texto quitado.", + "mergeCurrentHeaderBackground": "Fondo del encabezado actual en conflictos de combinación alineados.", + "mergeCurrentContentBackground": "Fondo del contenido actual en conflictos de combinación alineados.", + "mergeIncomingHeaderBackground": "Fondo del encabezado de entrada en conflictos de combinación alineados.", + "mergeIncomingContentBackground": "Fondo del contenido de entrada en conflcitos de combinación alineados.", + "mergeBorder": "Color del borde en los encabezados y el divisor en conflictos de combinación alineados.", + "overviewRulerCurrentContentForeground": "Primer plano de la regla de visión general actual para conflictos de combinación alineados.", + "overviewRulerIncomingContentForeground": "Primer plano de regla de visión general de entrada para conflictos de combinación alineados." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/esn/src/vs/workbench/api/node/extHostTask.i18n.json index 8b6ad71cd4e6d..4b90a12aaf247 100644 --- a/i18n/esn/src/vs/workbench/api/node/extHostTask.i18n.json +++ b/i18n/esn/src/vs/workbench/api/node/extHostTask.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/esn/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index 86c8b000ea6ea..bfe695f895bca 100644 --- a/i18n/esn/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "Ocultar barra de actividades", - "activityBarAriaLabel": "Modificador de vista activa" + "activityBarAriaLabel": "Modificador de vista activa", + "globalActions": "Acciones globales" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/esn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 399678bda1960..57f49827a55ff 100644 --- a/i18n/esn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -10,7 +10,7 @@ "multiSelection": "{0} selecciones", "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", - "tabFocusModeEnabled": "La tabulación mueve el foco", + "screenReaderDetectedExtra": "Si no va a usar un lector de pantalla, cambie el valor de configuración \"editor.accessibilitySupport\" a \"desactivado\".", "disableTabMode": "Deshabilitar modo de accesibilidad", "gotoLine": "Ir a la línea", "indentation": "Sangría", diff --git a/i18n/esn/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/esn/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..7a95e7a0c694e --- /dev/null +++ b/i18n/esn/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "Ir al archivo...", + "quickNavigateNext": "Navegar a siguiente en Quick Open", + "quickNavigatePrevious": "Navegar a anterior en Quick Open", + "quickSelectNext": "Seleccionar Siguiente en Quick Open", + "quickSelectPrevious": "Seleccionar Anterior en Quick Open" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/browser/quickopen.i18n.json b/i18n/esn/src/vs/workbench/browser/quickopen.i18n.json index bc196c6f3577f..6677960aba0d7 100644 --- a/i18n/esn/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "No hay resultados coincidentes", "noResultsFound2": "No se encontraron resultados", - "entryAriaLabel": "{0}, comando", - "noCommands": "No hay comandos coincidentes" + "entryAriaLabel": "{0}, comando" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/browser/viewlet.i18n.json b/i18n/esn/src/vs/workbench/browser/viewlet.i18n.json index 26b81eaef9214..ff2c96161787b 100644 --- a/i18n/esn/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/esn/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "Contraer todo", - "viewToolbarAriaLabel": "{0} acciones" + "collapse": "Contraer todo" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/common/theme.i18n.json b/i18n/esn/src/vs/workbench/common/theme.i18n.json index 9ae35bba944bd..5128dcdbbc0ef 100644 --- a/i18n/esn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/esn/src/vs/workbench/common/theme.i18n.json @@ -7,31 +7,42 @@ "tabActiveBackground": "Color de fondo de la pestaña activa. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "tabInactiveBackground": "Color de fondo de la pestaña inactiva. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "tabBorder": "Borde para separar las pestañas entre sí. Las pestañas son contenedores de editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", + "tabActiveForeground": "Color de primer plano de la pestaña activa en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", + "tabInactiveForeground": "Color de primer plano de la pestaña inactiva en un grupo activo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", + "tabUnfocusedActiveForeground": "Color de primer plano de la pestaña activa en un grupo inactivo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", + "tabUnfocusedInactiveForeground": "Color de primer plano de la pestaña inactiva en un grupo inactivo. Las pestañas son los contenedores de los editores en el área de editores. Se pueden abrir varias pestañas en un grupo de editores. Puede haber varios grupos de editores.", "editorGroupBackground": "Color de fondo de un grupo de editores. Los grupos de editores son los contenedores de los editores. El color de fondo se ve cuando se mueven arrastrando los grupos de editores.", "tabsContainerBackground": "Color de fondo del encabezado del título del grupo de editores cuando las fichas están habilitadas. Los grupos de editores son contenedores de editores.", + "tabsContainerBorder": "Color de borde del encabezado del título del grupo de editores cuando las fichas están habilitadas. Los grupos de editores son contenedores de editores.", "editorGroupHeaderBackground": "Color de fondo del encabezado del título del grupo de editores cuando las fichas están deshabilitadas. Los grupos de editores son contenedores de editores.", "editorGroupBorder": "Color para separar varios grupos de editores entre sí. Los grupos de editores son los contenedores de los editores.", "editorDragAndDropBackground": "Color de fondo cuando se arrastran los editores. El color debería tener transparencia para que el contenido del editor pueda brillar a su través.", + "panelBackground": "Color de fondo del panel. Los paneles se muestran debajo del área de editores y contienen vistas, como Salida y Terminal integrado.", "panelBorder": "Color del borde superior del panel que lo separa del editor. Los paneles se muestran debajo del área de editores y contienen vistas, como Salida y Terminal integrado.", "panelActiveTitleForeground": "Color del título del panel activo. Los paneles se muestran debajo del área del editor y contienen vistas como Salida y Terminal integrado.", "panelInactiveTitleForeground": "Color del título del panel inactivo. Los paneles se muestran debajo del área del editor y contienen vistas como Salida y Terminal integrado.", "panelActiveTitleBorder": "Color de borde del título del panel activo. Los paneles se muestran debajo del área del editor y contienen vistas como Salida y Terminal integrado.", "statusBarForeground": "Color de primer plano de la barra de estado, que se muestra en la parte inferior de la ventana.", "statusBarBackground": "Color de fondo de la barra de estado estándar, que se muestra en la parte inferior de la ventana.", + "statusBarBorder": "Color de borde de la barra de estado que separa la barra lateral y el editor. La barra de estado se muestra en la parte inferior de la ventana.", "statusBarNoFolderBackground": "Color de fondo de la barra de estado cuando no hay ninguna carpeta abierta. La barra de estado se muestra en la parte inferior de la ventana.", + "statusBarNoFolderForeground": "Color de primer plano de la barra de estado cuando no hay ninguna carpeta abierta. La barra de estado se muestra en la parte inferior de la ventana.", "statusBarItemActiveBackground": "Color de fondo de un elemento de la barra de estado al hacer clic. La barra de estado se muestra en la parte inferior de la ventana.", "statusBarItemHoverBackground": "Color de fondo de un elemento de la barra de estado al mantener el puntero. La barra de estado se muestra en la parte inferior de la ventana.", "statusBarProminentItemBackground": "Color de fondo de los elementos destacados en la barra de estado. Estos elementos sobresalen para indicar importancia. La barra de estado está ubicada en la parte inferior de la ventana.", "statusBarProminentItemHoverBackground": "Color de fondo de los elementos destacados en la barra de estado cuando se mantiene el mouse sobre estos elementos. Estos elementos sobresalen para indicar importancia. La barra de estado está ubicada en la parte inferior de la ventana.", "activityBarBackground": "Color de fondo de la barra de actividad, que se muestra en el lado izquierdo o derecho y que permite cambiar entre diferentes vistas de la barra lateral.", "activityBarForeground": "Color de fondo de la barra de actividad (por ejemplo utilizado por los iconos). La barra de actividad muestra en el lado izquierdo o derecho y permite cambiar entre diferentes vistas de la barra lateral.", + "activityBarBorder": "Color de borde de la barra de actividad que separa la barra lateral. La barra de actividad se muestra en el extremo derecho o izquierdo y permite cambiar entre las vistas de la barra lateral.", "activityBarDragAndDropBackground": "Arrastre y suelte el color de las sugerencias para los elementos de la barra de actividad. El color debería tener transparencias, de forma que los elementos de la barra continúen siendo visibles a través de él. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre distintas vistas de la barra lateral.", "activityBarBadgeBackground": "Color de fondo de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", "activityBarBadgeForeground": "Color de primer plano de distintivo de notificación de actividad. La barra de actividad se muestra en el extremo izquierdo o derecho y permite cambiar entre vistas de la barra lateral.", "sideBarBackground": "Color de fondo de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", "sideBarForeground": "Color de primer plano de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", + "sideBarBorder": "Color de borde de la barra lateral en el lado que separa el editor. La barra lateral es el contenedor de vistas como Explorador y Búsqueda.", "sideBarTitleForeground": "Color de primer plano del título de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", "sideBarSectionHeaderBackground": "Color de fondo del encabezado de sección de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", + "sideBarSectionHeaderForeground": "Color de primer plano del encabezado de sección de la barra lateral, que es el contenedor de vistas como Explorador y Búsqueda.", "titleBarActiveForeground": "Color de primer plano de la barra de título cuando la ventana está activa. Tenga en cuenta que, actualmente, este clor solo se admite en macOS.", "titleBarInactiveForeground": "Color de primer plano de la barra de título cuando la ventana está inactiva. Tenga en cuenta que, actualmente, este color solo se admite en macOS.", "titleBarActiveBackground": "Fondo de la barra de título cuando la ventana está activa. Tenga en cuenta que, actualmente, este color solo se admite en macOS.", diff --git a/i18n/esn/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/actions.i18n.json index cf43b7ec441f9..2956c1f4a475b 100644 --- a/i18n/esn/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/esn/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "Cerrar editor", "closeWindow": "Cerrar ventana", - "switchWindow": "Cambiar de ventana", - "switchWindowPlaceHolder": "Seleccionar una ventana", - "current": "Ventana actual", "closeFolder": "Cerrar carpeta", "noFolderOpened": "No hay ninguna carpeta abierta en esta instancia para cerrar.", "newWindow": "Nueva ventana", @@ -20,7 +17,7 @@ "zoomReset": "Restablecer zoom", "appPerf": "Rendimiento de inicio", "reloadWindow": "Recargar ventana", - "openRecent": "Abrir recientes", + "current": "Ventana actual", "folders": "carpetas", "files": "archivos", "openRecentPlaceHolderMac": "Seleccione una ruta de acceso (mantenga presionada la tecla Cmd para abrirla en una nueva ventana)", @@ -32,10 +29,6 @@ "openDocumentationUrl": "Documentación", "openIntroductoryVideosUrl": "Vídeos de introducción", "toggleSharedProcess": "Alternar proceso compartido", - "navigateLeft": "Mover a la vista de la izquierda", - "navigateRight": "Mover a la vista de la derecha", - "navigateUp": "Mover a la vista superior", - "navigateDown": "Mover a la vista inferior", "increaseViewSize": "Aumentar tamaño de vista actual", "decreaseViewSize": "Reducir tamaño de vista actual" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json index 543d5451907bc..701489feabd57 100644 --- a/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -31,10 +31,6 @@ "window.openFoldersInNewWindow.off": "Las carpetas reemplazarán la ventana activa más reciente", "window.openFoldersInNewWindow.default": "Las carpetas se abrirán en una nueva ventana a menos que se seleccione una carpeta desde la aplicación (p. ej. mediante el menú Archivo)", "openFoldersInNewWindow": "Controla si las carpetas deben abrirse en una ventana nueva o reemplazar la última ventana activa.\n- default: las carpetas se abrirán en una ventana nueva, a menos que se seleccione una carpeta desde la aplicación (por ejemplo, desde el menú Archivo)\n- on: las carpetas se abrirán en una ventana nueva\n- off: las carpetas reemplazarán la última ventana activa\nTenga en cuenta que aún puede haber casos en los que este parámetro se ignore (por ejemplo, al usar la opción de la línea de comandos -new-window o -reuse-window).", - "window.reopenFolders.none": "No volver a abrir nunca una carpeta.", - "window.reopenFolders.one": "Volver a abrir la carpeta activa más reciente.", - "window.reopenFolders.all": "Volver a abrir todas las carpetas de la sesión más reciente.", - "reopenFolders": "Controla cómo se vuelven a abrir las carpetas tras un reinicio. Seleccione \"none\" para no volver a abrir jamás una carpeta, \"one\" para volver a abrir la última carpeta en la que trabajó o seleccione \"all\" para volver a abrir todas las carpetas de la última sesión.", "restoreFullscreen": "Controla si una ventana se debe restaurar al modo de pantalla completa si se salió de ella en dicho modo.", "zoomLevel": "Ajuste el nivel de zoom de la ventana. El tamaño original es 0 y cada incremento (por ejemplo, 1) o disminución (por ejemplo, -1) representa una aplicación de zoom un 20 % más grande o más pequeño. También puede especificar decimales para ajustar el nivel de zoom con una granularidad más precisa.", "title": "Controla el título de la ventana según el editor activo. Las variables se sustituyen según el contexto: ${activeEditorShort}: por ejemplo, myFile.txt ${activeEditorMedium}: por ejemplo, myFolder/myFile.txt ${activeEditorLong}: por ejemplo, /Users/Development/myProject/myFolder/myFile.txt ${rootName}: por ejemplo, myProject ${rootPath}: por ejemplo, /Users/Development/myProject ${appName}: por ejemplo, VS Code ${dirty}: un indicador con modificaciones si el editor activo está desfasado ${separator}: un separador condicional (\" - \") que solo se muestra cuando está rodeado por variables con valores", @@ -58,5 +54,7 @@ "zenMode.hideTabs": "Controla si la activación del modo zen también oculta las pestañas del área de trabajo.", "zenMode.hideStatusBar": "Controla si la activación del modo zen oculta también la barra de estado en la parte inferior del área de trabajo.", "zenMode.hideActivityBar": "Controla si la activación del modo zen oculta también la barra de estado en la parte izquierda del área de trabajo.", - "zenMode.restore": "Controla si una ventana debe restaurarse a modo zen si se cerró en modo zen." + "zenMode.restore": "Controla si una ventana debe restaurarse a modo zen si se cerró en modo zen.", + "workspaceConfigurationTitle": "Área de trabajo", + "files.exclude.boolean": "El patrón global con el que se harán coincidir las rutas de acceso de los archivos. Establézcalo en true o false para habilitarlo o deshabilitarlo." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..58480e0cd81d8 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "Se cambiará ahora el valor de configuración \"editor.accessibilitySupport\" a \"activado\".", + "openingDocs": "Se abrirá ahora la página de documentación de accesibilidad de VS Code.", + "introMsg": "Gracias por probar las opciones de accesibilidad de VS Code.", + "status": "Estado:", + "changeConfigToOnMac": "Para configurar el editor de forma que esté optimizado de permanentemente para su uso con un lector de pantalla, presione ahora Comando+E.", + "changeConfigToOnWinLinux": "Para configurar el editor de forma que esté optimizado permanentemente para su uso con un lector de pantalla, presione ahora Control+E.", + "auto_unknown": "El editor está configurado para usar API de plataforma para detectar cuándo está conectado un lector de pantalla, pero el entorno actual de tiempo de ejecución no admite esta característica.", + "auto_on": "El editor ha detectado automáticamente un lector de pantalla conectado.", + "auto_off": "El editor está configurado para detectar automáticamente cuándo está conectado un lector de pantalla, lo que no es el caso en este momento.", + "configuredOn": "El editor está configurado para optimizarse permanentemente para su uso con un lector de pantalla; para cambiar este comportamiento, edite el valor de configuración \"editor.accessibilitySupport\".", + "configuredOff": "El editor está configurado de forma que no esté nunca optimizado para su uso con un lector de pantalla.", + "tabFocusModeOnMsg": "Al presionar TAB en el editor actual, el foco se mueve al siguiente elemento activable. Presione {0} para activar o desactivar este comportamiento.", + "tabFocusModeOnMsgNoKb": "Al presionar TAB en el editor actual, el foco se mueve al siguiente elemento activable. El comando {0} no se puede desencadenar actualmente mediante un enlace de teclado.", + "tabFocusModeOffMsg": "Al presionar TAB en el editor actual, se insertará el carácter de tabulación. Presione {0} para activar o desactivar este comportamiento.", + "tabFocusModeOffMsgNoKb": "Al presionar TAB en el editor actual, se insertará el carácter de tabulación. El comando {0} no se puede desencadenar actualmente mediante un enlace de teclado.", + "openDocMac": "Presione Comando+H ahora para abrir una ventana de explorador con más información de VS Code relacionada con la accesibilidad.", + "openDocWinLinux": "Presione Control+H ahora para abrir una ventana de explorador con más información de VS Code relacionada con la accesibilidad.", + "outroMsg": "Para descartar esta información sobre herramientas y volver al editor, presione Esc o Mayús+Escape.", + "ShowAccessibilityHelpAction": "Mostrar ayuda de accesibilidad" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..6612e373361ce --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Alternar modificador multicursor" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json index 92832a7c2dc8a..7b12765e51e8f 100644 --- a/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json @@ -5,16 +5,12 @@ // Do not edit this file. It is machine generated. { "variablesSection": "Sección de variables", - "variables": "Variables", "variablesAriaTreeLabel": "Variables de depuración", "expressionsSection": "Sección de expresiones", - "watch": "Inspección", "watchAriaTreeLabel": "Expresiones de inspección de la depuración", "callstackSection": "Sección de la pila de llamadas", "debugStopped": "En pausa en {0}", - "callStack": "Pila de llamadas", "callStackAriaLabel": "Pila de llamadas de la depuración", "breakpointsSection": "Sección de puntos de interrupción", - "breakpoints": "Puntos de interrupción", "breakpointsAriaTreeLabel": "Puntos de interrupción de la depuración" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index 328583915c472..a06b5c267dd11 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "previousEditPoint": "Emmet: Punto de edición anterior", - "nextEditPoint": "Emmet: Punto de edición siguiente" + "previousEditPoint": "Emmet: Ir al punto de edición anterior", + "nextEditPoint": "Emmet: Ir al punto de edición siguiente" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 176ecb884a191..a1f452f38ff14 100644 --- a/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -9,5 +9,6 @@ "emmetPreferences": "Preferencias usadas para modificar el comportamiento de algunas acciones y resoluciones de Emmet.", "emmetSyntaxProfiles": "Defina el perfil de la sintaxis especificada o use su propio perfil con reglas específicas.", "emmetExclude": "Matriz de lenguajes donde no deben expandirse la abreviación Emmet.", - "emmetExtensionsPath": "Ruta de acceso a una carpeta que contiene perfiles de Emmet, fragmentos de código y preferencias" + "emmetExtensionsPath": "Ruta de acceso a una carpeta que contiene perfiles de Emmet, fragmentos de código y preferencias", + "useNewEmmet": "Pruebe los nuevos módulos de Emmet (que finalmente sustituirán a la biblioteca anterior de Emmet) para conocer todas las características de Emmet." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index bd5f70d9a8dc7..e68b4424c5280 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,10 @@ "default": "Predeterminado", "debuggers": "Depuradores ({0})", "debugger name": "Nombre", + "views": "Vistas ({0})", + "view id": "Id.", + "view name": "Nombre", + "view location": "Donde", "themes": "Temas ({0})", "JSON Validation": "Validación JSON ({0})", "commands": "Comandos ({0})", diff --git a/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 7da24054556a5..5e236865193d6 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,6 +22,8 @@ "disableGloballyAction": "Siempre", "disableAction": "Deshabilitar", "checkForUpdates": "Buscar actualizaciones", + "enableAutoUpdate": "Habilitar extensiones de actualización automática", + "disableAutoUpdate": "Deshabilitar extensiones de actualización automática", "updateAll": "Actualizar todas las extensiones", "reloadAction": "Recargar", "postUpdateTooltip": "Recargar para actualizar", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "Mostrar extensiones recomendadas del área de trabajo", "showRecommendedKeymapExtensions": "Mostrar asignaciones de teclado recomendadas", "showRecommendedKeymapExtensionsShort": "Asignaciones de teclado", + "showLanguageExtensions": "Mostrar extensiones del lenguaje", + "showLanguageExtensionsShort": "Extensiones del lenguaje", "configureWorkspaceRecommendedExtensions": "Configurar extensiones recomendadas (área de trabajo)", "ConfigureWorkspaceRecommendations.noWorkspace": "Las recomendaciones solo están disponibles en una carpeta de área de trabajo.", "OpenExtensionsFile.failed": "No se puede crear el archivo \"extensions.json\" dentro de la carpeta \".vscode\" ({0}).", @@ -51,5 +55,8 @@ "disableAll": "Deshabilitar todas las extensiones instaladas", "disableAllWorkspace": "Deshabilitar todas las extensiones instaladas para esta área de trabajo", "enableAll": "Habilitar todas las extensiones instaladas", - "enableAllWorkspace": "Habilitar todas las extensiones instaladas para esta área de trabajo" + "enableAllWorkspace": "Habilitar todas las extensiones instaladas para esta área de trabajo", + "extensionButtonProminentBackground": "Color de fondo del botón para la extensión de acciones que se destacan (por ejemplo, el botón de instalación).", + "extensionButtonProminentForeground": "Color de primer plano del botón para la extensión de acciones que se destacan (por ejemplo, botón de instalación).", + "extensionButtonProminentHoverBackground": "Color de fondo del botón al mantener el mouse para la extensión de acciones que se destacan (por ejemplo, el botón de instalación)." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index f9f715ea4a98e..6151f36cc6b22 100644 --- a/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,8 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "disableOtherKeymapsConfirmation": "¿Quiere deshabilitar otras asignaciones de teclas ({0}) para evitar conflictos entre enlaces de teclado?", "yes": "Sí", "no": "No", + "betterMergeDisabled": "La extensión Mejor combinación está ahora integrada, la extensión instalada se deshabilitó y no se puede desinstalar.", "uninstall": "Desinstalación", "later": "Más tarde" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 923353af13327..b104c63f09f93 100644 --- a/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -28,7 +28,6 @@ "watcherExclude": "Configure patrones globales de las rutas de acceso de archivo que se van a excluir de la inspección de archivos. Al cambiar esta configuración, es necesario reiniciar. Si observa que Code consume mucho tiempo de CPU al iniciarse, puede excluir las carpetas grandes para reducir la carga inicial.", "hotExit.off": "Deshabilita la salida rápida.", "hotExit.onExit": "hotExit se desencadena al cerrar la aplicación, es decir, al cerrarse la última ventana en Windows/Linux o cuando se desencadena el comando workbench.action.quit (paleta de comandos, enlace de teclado, menú). Todas las ventanas con copias de seguridad se restaurarán la próxima vez que se inicie.", - "hotExit.onExitAndWindowClose": "HotExit se desencadena al cerrar la aplicación, es decir, al cerrarse la última ventana en Windows/Linux o cuando se desencadena el comando workbench.action.quit (paleta de comandos, enlace de teclado, menú). También para cualquier ventana que tenga una carpeta abierta, independientemente de que sea o no la última ventana. Todas las ventanas sin carpetas abiertas se restaurarán la próxima vez que se inicie. Para restaurar las ventanas con carpetas tal cual estaban antes de cerrarse, establezca \"window.reopenFolders\" en \"all\".", "hotExit": "Controla si los archivos no guardados se recuerdan entre las sesiones, lo que permite omitir el mensaje para guardar al salir del editor.", "defaultLanguage": "El modo de lenguaje predeterminado que se asigna a nuevos archivos.", "editorConfigurationTitle": "Editor", diff --git a/i18n/esn/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/esn/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index f62bf00d0ebca..c2ff9cef3d7b3 100644 --- a/i18n/esn/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -5,7 +5,5 @@ // Do not edit this file. It is machine generated. { "explorerSection": "Sección del Explorador de archivos", - "noWorkspace": "No hay ninguna carpeta abierta", - "noWorkspaceHelp": "Todavía no ha abierto ninguna carpeta.", "openFolder": "Abrir carpeta" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/esn/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index 1b3168622ee33..30c064adf3d1d 100644 --- a/i18n/esn/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "Sección Editores abiertos", "openEditors": "Editores abiertos", + "openEditosrSection": "Sección Editores abiertos", "treeAriaLabel": "Editores abiertos: lista de archivos activos", "dirtyCounter": "{0} sin guardar" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 6c042c0daffdb..e8414e42d1430 100644 --- a/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "Definir enlace de teclado", - "defineKeybinding.kbLayoutErrorMessage": "La distribución del teclado actual no permite reproducir esta combinación de teclas." + "defineKeybinding.kbLayoutErrorMessage": "La distribución del teclado actual no permite reproducir esta combinación de teclas.", + "defineKeybinding.kbLayoutLocalAndUSMessage": "**{0}** para su distribución de teclado actual (**{1}** para EE. UU. estándar).", + "defineKeybinding.kbLayoutLocalMessage": "**{0}** para su distribución de teclado actual." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..d3057c63b0853 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchMessage": "Ha cambiado un ajuste que requiere un reinicio para ser efectivo.", + "relaunchDetail": "Pulse el botón de reinicio para reiniciar {0} y habilitar el ajuste.", + "restart": "Reiniciar" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json index 8b6ad71cd4e6d..5fe13ab86c431 100644 --- a/i18n/esn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "editorGutterModifiedBackground": "Color de fondo del medianil del editor para las líneas modificadas.", + "editorGutterAddedBackground": "Color de fondo del medianil del editor para las líneas agregadas.", + "editorGutterDeletedBackground": "Color de fondo del medianil del editor para las líneas eliminadas." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 2841d09230e04..08084e884982f 100644 --- a/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -9,5 +9,6 @@ "vscode.extension.contributes.snippets-path": "Ruta de acceso del archivo de fragmentos de código. La ruta es relativa a la carpeta de extensión y normalmente empieza por \"./snippets/\".", "invalid.language": "Lenguaje desconocido en \"contributes.{0}.language\". Valor proporcionado: {1}", "invalid.path.0": "Se esperaba una cadena en \"contributes.{0}.path\". Valor proporcionado: {1}", - "invalid.path.1": "Se esperaba que \"contributes.{0}.path\" ({1}) se incluyera en la carpeta de la extensión ({2}). Esto puede hacer que la extensión no sea portátil." + "invalid.path.1": "Se esperaba que \"contributes.{0}.path\" ({1}) se incluyera en la carpeta de la extensión ({2}). Esto puede hacer que la extensión no sea portátil.", + "badVariableUse": "Es muy probable que el fragmento de código \"{0}\" confunda las variables de fragmento de código y los marcadores de posición de fragmento de código. Consulte https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax para más informacion." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index 6bb2b76ad2be3..4a006c7f57175 100644 --- a/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "Fragmento de código vacío", "snippetSchema.json": "Configuración de fragmento de código del usuario", "snippetSchema.json.prefix": "El prefijo que se debe usar al seleccionar el fragmento de código en Intellisense", - "snippetSchema.json.body": "Contenido del fragmento de código. Use '${id}', '${id:label}', '${1:label}' para las variables y '$0', '$1' para las posiciones del cursor", + "snippetSchema.json.body": "El contenido del fragmento de código. Use \"$1', \"${1:defaultText}\" para definir las posiciones del cursor, use \"$0\" para la posición final del cursor. Inserte valores de variable con \"${varName}\" y \"${varName:defaultText}\", por ejemplo, \"This is file: $TM_FILENAME\".", "snippetSchema.json.description": "La descripción del fragmento de código." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..411c12dbc4608 --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "Ayúdenos a mejorar nuestro soporte para {0}", + "takeShortSurvey": "Realizar una breve encuesta", + "remindLater": "Recordármelo más tarde", + "neverAgain": "No volver a mostrar" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..2e4d1ea682fef --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "¿Le importaría realizar una breve encuesta de opinión?", + "takeSurvey": "Realizar encuesta", + "remindLater": "Recordármelo más tarde", + "neverAgain": "No volver a mostrar" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..6574ffdaef17d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "No tasks matching" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index e5995f59713d9..59b152344cf5d 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tareas" + "entryAriaLabel": "{0}, tareas", + "customizeTask": "Personalizar tarea" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..6574ffdaef17d --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "No tasks matching" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 2cc7fa5953567..71a6380a7abf0 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -12,5 +12,6 @@ "ConfigurationParser.invalidVaraibleReference": "Error: Referencia a problemMatcher no válida: {0}", "ConfigurationParser.noTaskName": "Error: Las tareas deben proporcionar una propiedad taskName. La tarea se ignorará. {0}", "taskConfiguration.shellArgs": "Advertencia: La tarea \"{0}\" es un comando de shell y su nombre de comando o uno de sus argumentos tiene espacios sin escape. Para asegurarse de que la línea de comandos se cite correctamente, combine mediante fusión los argumentos en el comando.", + "taskConfiguration.noCommandOrDependsOn": "Error: La tarea \"{0}\" no especifica un comando ni una propiedad dependsOn. La tarea se ignorará. Su definición es: \n{1}", "taskConfiguration.noCommand": "Error: La tarea \"{0}\" no define un comando. La tarea se ignorará. Su definición es: {1}" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index 20c5a4af69853..b148f0ec22a9b 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "Opciones de comando adicionales", "JsonSchema.options.cwd": "Directorio de trabajo actual del script o el programa ejecutado. Si se omite, se usa la raíz del área de trabajo actual de Code.", "JsonSchema.options.env": "Entorno del shell o el programa ejecutado. Si se omite, se usa el entorno del proceso primario.", + "JsonSchema.shellConfiguration": "Configura el shell que se usará.", "JsonSchema.shell.executable": "Shell que se va a usar.", "JsonSchema.shell.args": "Argumentos de shell.", "JsonSchema.command": "El comando que se va a ejecutar. Puede ser un programa externo o un comando shell.", diff --git a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index 9c0e9c0db0b47..d8137d279a8da 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "Número de versión de la configuración", + "JsonSchema._runner": "El ejecutador se ha graduado. Use el ejecutador oficial correctamente", + "JsonSchema.runner": "Define si la tarea se ejecuta como un proceso y la salida se muestra en la ventana de salida o dentro del terminal.", "JsonSchema.windows": "Configuración de comando específico de Windows", "JsonSchema.mac": "Configuración de comando específico de Mac", "JsonSchema.linux": "Configuración de comando específico de Linux", diff --git a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index a568620f9fe1e..af62585104d01 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -7,6 +7,10 @@ "JsonSchema.shell": "Especifica si el comando es un comando shell o un programa externo. Si se omite, el valor predeterminado es false.", "JsonSchema.tasks.dependsOn.string": "Otra tarea de la que depende esta tarea.", "JsonSchema.tasks.dependsOn.array": "Las otras tareas de las que depende esta tarea.", + "JsonSchema.tasks.group": "Define el grupo de ejecución al que pertenece esta tarea. Si se omite, la tarea no pertenece a ningún grupo.", + "JsonSchema.tasks.type": "Define si la tarea se ejecuta como un proceso o como un comando dentro de un shell. El valor predeterminado es proceso.", + "JsonSchema.version": "El número de versión de la configuración.", + "JsonSchema.tasks.customize": "La tarea contribuida que se va a personalizar.", "JsonSchema.windows": "Configuración de comando específico de Windows", "JsonSchema.mac": "Configuración de comando específico de Mac", "JsonSchema.linux": "Configuración de comando específico de Linux" diff --git a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 05a4cfef6c77a..7be9d7375de86 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -22,7 +22,8 @@ "TaskService.noBuildTask": "No se ha definido ninguna tarea de compilación. Marque una tarea con \"isBuildCommand\" en el archivo tasks.json.", "TaskService.noTestTask": "No se ha definido ninguna tarea de prueba. Marque una tarea con \"isTestCommand\" en el archivo tasks.json.", "TaskServer.noTask": "No se encuentra la tarea {0} que se ha solicitado para ejecutarla.", - "TaskSystem.activeSame": "La tarea ya está activa y en modo de inspección. Para finalizar la tarea, use \"F1 > finalizar tarea\"", + "customizeParseErrors": "La configuración actual de tareas contiene errores. Antes de personalizar una tarea, corrija los errores.", + "moreThanOneBuildTask": "Hay muchas tareas de compilación definidas en el archivo tasks.json. Se ejecutará la primera.\n", "TaskSystem.active": "Ya hay una tarea en ejecución. Finalícela antes de ejecutar otra tarea.", "TaskSystem.restartFailed": "No se pudo terminar y reiniciar la tarea {0}", "TaskSystem.configurationErrors": "Error: La configuración de la tarea proporcionada tiene errores de validación y no se puede usar. Corrija los errores primero.", diff --git a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 58c4eca7cfefd..99a6eef0566be 100644 --- a/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,6 +6,7 @@ { "TerminalTaskSystem.unknownError": "Error desconocido durante la ejecución de una tarea. Vea el registro de resultados de la tarea para obtener más detalles.", "TerminalTaskSystem.terminalName": "Tarea - {0}", + "reuseTerminal": "Las tareas reutilizarán el terminal, presione cualquier tecla para cerrarlo.", "TerminalTaskSystem": "No se puede ejecutar un comando shell en una unidad UNC.", "unkownProblemMatcher": "No puede resolver el comprobador de problemas {0}. Será omitido." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 50e571af89f11..fe23037a3ffd3 100644 --- a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -8,6 +8,7 @@ "workbench.action.terminal.kill": "Terminar la instancia del terminal activo", "workbench.action.terminal.kill.short": "Terminar el terminal", "workbench.action.terminal.copySelection": "Copiar selección", + "workbench.action.terminal.selectAll": "Seleccionar todo", "workbench.action.terminal.new": "Crear nuevo terminal integrado", "workbench.action.terminal.new.short": "Nuevo terminal", "workbench.action.terminal.focus": "Enfocar terminal", @@ -28,5 +29,6 @@ "workbench.action.terminal.scrollToTop": "Desplazar al principio", "workbench.action.terminal.clear": "Borrar", "workbench.action.terminal.allowWorkspaceShell": "Permitir la configuración del área de trabajo Shell", - "workbench.action.terminal.disallowWorkspaceShell": "No permitir la configuración del área de trabajo Shell" + "workbench.action.terminal.disallowWorkspaceShell": "No permitir la configuración del área de trabajo Shell", + "workbench.action.terminal.rename": "Cambiar nombre" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..213a60a3c4fea --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Buscar", + "placeholder.find": "Buscar", + "label.previousMatchButton": "Coincidencia anterior", + "label.nextMatchButton": "Coincidencia siguiente", + "label.closeButton": "Cerrar" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index af3664237c856..651e16251db54 100644 --- a/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "No se puede copiar la selección del terminal cuando el terminal no tiene el foco", "terminal.integrated.exitedWithCode": "El proceso del terminal finalizó con el código de salida: {0}", "terminal.integrated.waitOnExit": "Presione cualquier tecla para cerrar el terminar", "terminal.integrated.launchFailed": "No se pudo iniciar el comando de proceso terminal \"{0}{1}\" (código de salida: {2})" diff --git a/i18n/esn/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/esn/src/vs/workbench/parts/update/electron-browser/update.i18n.json index 2d90eac682801..614696014d8f9 100644 --- a/i18n/esn/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -15,5 +15,18 @@ "license": "Leer licencia", "updateAvailable": "{0} se actualizará después de reiniciarse.", "thereIsUpdateAvailable": "Hay una actualización disponible.", - "noUpdatesAvailable": "Actualmente no hay actualizaciones disponibles." + "noUpdatesAvailable": "Actualmente no hay actualizaciones disponibles.", + "updateIsReady": "Nueva actualización disponible.", + "commandPalette": "Paleta de comandos...", + "settings": "Configuración", + "keyboardShortcuts": "Métodos abreviados de teclado", + "selectTheme.label": "Tema de color", + "themes.selectIconTheme.label": "Tema de icono de archivo", + "not available": "Actualizaciones no disponibles", + "checkingForUpdates": "Buscando actualizaciones...", + "DownloadUpdate": "Descargar actualización disponible", + "DownloadingUpdate": "Descargando actualización...", + "InstallingUpdate": "Instalando actualización...", + "restartToUpdate": "Reiniciar para actualizar...", + "checkForUpdates": "Buscar actualizaciones..." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/esn/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..62933f6b509ea --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} acciones" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/esn/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..825009fbc6c7e --- /dev/null +++ b/i18n/esn/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "views debe ser una mariz", + "requirestring": "la propiedad `{0}` es obligatoria y debe ser de tipo \"string\"", + "optstring": "la propiedad `{0}` se puede omitir o debe ser de tipo \"string\"", + "vscode.extension.contributes.view.id": "Identificador de la vista. Úselo para registrar un proveedor de datos mediante la API \"vscode.window.registerTreeDataProviderForView\". También para desencadenar la activación de su extensión al registrar el evento \"onView:${id}\" en \"activationEvents\".", + "vscode.extension.contributes.view.name": "Nombre de la vista en lenguaje natural. Será mostrado", + "vscode.extension.contributes.views": "Aporta vistas al editor", + "views.explorer": "Vista del explorador", + "locationId.invalid": "`{0}` no es una ubicación de vista válida" +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 2438b3e17098b..d10b9f9846478 100644 --- a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -31,7 +31,6 @@ "welcomePage.colorThemeDescription": "Modifique a su gusto la apariencia del editor y el código", "welcomePage.learn": "Más información", "welcomePage.showCommands": "Buscar y ejecutar todos los comandos", - "welcomePage.showCommandsDescription": "Acceda rápidamente y busque comandos desde el panel de control ({0})", "welcomePage.interfaceOverview": "Introducción a la interfaz", "welcomePage.interfaceOverviewDescription": "Obtenga una superposición que resalta los componentes principales de la interfaz de usuario", "welcomePage.interactivePlayground": "Área de juegos interactiva", diff --git a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index f366b9af6fd84..7fb18c5a5ef29 100644 --- a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbenchConfigurationTitle": "Área de trabajo", - "welcomePage.enabled": "Cuando está habilitado, se mostrará la página principal en el inicio.", "help": "Ayuda" } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 0ada1a16443c4..7542d5d3b7c59 100644 --- a/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/esn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "workbenchConfigurationTitle": "Área de trabajo", + "welcomePage.enabled": "Cuando está habilitado, se mostrará la página principal en el inicio.", "welcomePage": "Bienvenido", "welcomePage.javaScript": "JavaScript", "welcomePage.typeScript": "TypeScript", @@ -14,16 +16,23 @@ "welcomePage.sublime": "Sublime", "welcomePage.atom": "Atom", "welcomePage.extensionPackAlreadyInstalled": "El soporte para '{0}' ya está instalado.", - "welcomePage.willReloadAfterInstallingExtensionPack": "La ventana se volverá a cargar después de instalar el soporte para {0}.", - "welcomePage.installingExtensionPack": "Instalando soporte para {0}...", + "welcomePage.willReloadAfterInstallingExtensionPack": "La ventana se volverá a cargar después de instalar compatibilidad adicional con {0}.", + "welcomePage.installingExtensionPack": "Instalando compatibilidad adicional con {0}...", "welcomePage.extensionPackNotFound": "No se pudo encontrar el soporte para {0} con id {1}.", "welcomePage.keymapAlreadyInstalled": "Los métodos abreviados de teclado {0} ya están instalados.", "welcomePage.willReloadAfterInstallingKeymap": "La ventana se volverá a cargar después de instalar los métodos abreviados de teclado {0}.", "welcomePage.installingKeymap": "Instalando los métodos abreviados de teclado de {0}...", "welcomePage.keymapNotFound": "No se pudieron encontrar los métodos abreviados de teclado {0} con el identificador {1}.", "welcome.title": "Bienvenido", + "welcomePage.openFolderWithPath": "Abrir la carpeta {0} con la ruta de acceso {1}", "welcomePage.extensionListSeparator": ", ", - "welcomePage.installedExtension": "{0} (instalado)", + "welcomePage.installKeymap": "Instalar mapa de teclas de {0}", + "welcomePage.installExtensionPack": "Instalar compatibilidad adicional con {0}", + "welcomePage.installedKeymap": "El mapa de teclas de {0} ya está instalado", + "welcomePage.installedExtensionPack": "La compatibilidad con {0} ya está instalada", "ok": "Aceptar", - "cancel": "Cancelar" + "details": "Detalles", + "cancel": "Cancelar", + "welcomePage.buttonBackground": "Color de fondo de los botones en la página principal.", + "welcomePage.buttonHoverBackground": "Color de fondo al mantener el mouse en los botones de la página principal." } \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/esn/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..fb3b052d7b4b0 --- /dev/null +++ b/i18n/esn/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetría", + "telemetry.enableCrashReporting": "Habilite los informes de bloqueo para enviarlos a Microsoft. Esta opción requiere reiniciar para que tenga efecto." +} \ No newline at end of file diff --git a/i18n/esn/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/esn/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..ee9bbb9d071d3 --- /dev/null +++ b/i18n/esn/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1} ", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/fra/extensions/git/out/commands.i18n.json b/i18n/fra/extensions/git/out/commands.i18n.json index 3601e044f8b25..f1b007aaf1ec7 100644 --- a/i18n/fra/extensions/git/out/commands.i18n.json +++ b/i18n/fra/extensions/git/out/commands.i18n.json @@ -18,6 +18,7 @@ "discard": "Ignorer les modifications", "confirm discard all": "Voulez-vous vraiment ignorer TOUTES les modifications ? Cette action est IRRÉVERSIBLE.", "discardAll": "Ignorer TOUTES les modifications", + "no staged changes": "Aucune modification en attente à valider.\n\nVoulez-vous automatiquement mettre en attente toutes vos modifications et les valider directement ?", "yes": "Oui", "always": "Toujours", "no changes": "Il n'existe aucun changement à valider.", @@ -25,6 +26,9 @@ "provide commit message": "Indiquez un message de validation", "branch name": "Nom de la branche", "provide branch name": "Fournissez un nom de branche", + "select branch to delete": "Sélectionner une branche à supprimer", + "confirm force delete branch": "La branche '{0}' n'est pas complètement fusionnée. Supprimer quand même ?", + "delete branch": "Supprimer la branche", "no remotes to pull": "Votre dépôt n'a aucun dépôt distant configuré pour un Pull.", "no remotes to push": "Votre dépôt n'a aucun dépôt distant configuré pour un Push.", "nobranch": "Vous devez extraire une branche dont vous souhaitez effectuer le Push vers un emplacement distant.", diff --git a/i18n/fra/extensions/git/package.i18n.json b/i18n/fra/extensions/git/package.i18n.json index 801419a6433bb..16a737e5dd012 100644 --- a/i18n/fra/extensions/git/package.i18n.json +++ b/i18n/fra/extensions/git/package.i18n.json @@ -26,12 +26,13 @@ "command.undoCommit": "Annuler la dernière validation", "command.checkout": "Extraire vers...", "command.branch": "Créer une branche...", + "command.deleteBranch": "Supprimer la branche...", "command.pull": "Pull", "command.pullRebase": "Pull (rebaser)", "command.push": "Push", "command.pushTo": "Transfert (Push) vers...", "command.sync": "Synchroniser", - "command.publish": "Publier", + "command.publish": "Publier la branche", "command.showOutput": "Afficher la sortie Git", "config.enabled": "Indique si git est activé", "config.path": "Chemin d'accès à l'exécutable git", @@ -42,5 +43,7 @@ "config.countBadge": "Contrôle le compteur de badges Git. La valeur 'toutes' compte toutes les modifications. La valeur 'suivies' compte uniquement les modifications suivies. La valeur 'désactivé' désactive le compteur.", "config.checkoutType": "Contrôle le type des branches répertoriées pendant l'exécution de 'Extraire vers...'. La valeur 'toutes' montre toutes les références, la valeur 'locales' montre uniquement les branches locales, la valeur 'balises' montre uniquement les balises et la valeur 'distantes' montre uniquement les branches distantes.", "config.ignoreLegacyWarning": "Ignore l'avertissement Git hérité", - "config.ignoreLimitWarning": "Ignore l'avertissement quand il y a trop de modifications dans un dépôt" + "config.ignoreLimitWarning": "Ignore l'avertissement quand il y a trop de modifications dans un dépôt", + "config.defaultCloneDirectory": "Emplacement par défaut où cloner un dépôt git", + "config.enableSmartCommit": "Validez toutes les modifications en l'absence de modifications en attente." } \ No newline at end of file diff --git a/i18n/fra/extensions/jake/out/main.i18n.json b/i18n/fra/extensions/jake/out/main.i18n.json index 8b6ad71cd4e6d..4811debb9a3c0 100644 --- a/i18n/fra/extensions/jake/out/main.i18n.json +++ b/i18n/fra/extensions/jake/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Échec de la détection automatique des tâches Jake avec l'erreur : {0}" +} \ No newline at end of file diff --git a/i18n/fra/extensions/jake/package.i18n.json b/i18n/fra/extensions/jake/package.i18n.json index 8b6ad71cd4e6d..0a21c419d8f27 100644 --- a/i18n/fra/extensions/jake/package.i18n.json +++ b/i18n/fra/extensions/jake/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.jake.autoDetect": "Contrôle si la détection automatique des tâches Jake est activée ou désactivée. La valeur par défaut est activée." +} \ No newline at end of file diff --git a/i18n/fra/extensions/markdown/out/extension.i18n.json b/i18n/fra/extensions/markdown/out/extension.i18n.json index 8b6ad71cd4e6d..34001f88bb7ee 100644 --- a/i18n/fra/extensions/markdown/out/extension.i18n.json +++ b/i18n/fra/extensions/markdown/out/extension.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "onPreviewStyleLoadError": "Impossible de charger 'markdown.styles' : {0}" +} \ No newline at end of file diff --git a/i18n/fra/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/fra/extensions/merge-conflict/out/codelensProvider.i18n.json index 8b6ad71cd4e6d..96643427968fa 100644 --- a/i18n/fra/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/fra/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "acceptCurrentChange": "Accepter la modification actuelle", + "acceptIncomingChange": "Accepter la modification entrante", + "acceptBothChanges": "Accepter les deux modifications", + "compareChanges": "Comparer les modifications" +} \ No newline at end of file diff --git a/i18n/fra/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/fra/extensions/merge-conflict/out/commandHandler.i18n.json index 8b6ad71cd4e6d..ef10c1f10639d 100644 --- a/i18n/fra/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/fra/extensions/merge-conflict/out/commandHandler.i18n.json @@ -3,4 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "cursorNotInConflict": "Le curseur de l'éditeur ne se trouve pas dans un conflit de fusion", + "compareChangesTitle": "{0} : Modifications actuelles ⟷ Modifications entrantes", + "cursorOnSplitterRange": "Le curseur de l'éditeur se trouve dans le séparateur du conflit de fusion, déplacez-le dans le bloc \"actuelles\" ou \"entrantes\"", + "noConflicts": "Aucun conflit de fusion dans ce fichier", + "noOtherConflictsInThisFile": "Aucun autre conflit de fusion dans ce fichier" +} \ No newline at end of file diff --git a/i18n/fra/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/fra/extensions/merge-conflict/out/mergeDecorator.i18n.json index 8b6ad71cd4e6d..1dfd58679b3d5 100644 --- a/i18n/fra/extensions/merge-conflict/out/mergeDecorator.i18n.json +++ b/i18n/fra/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "currentChange": "(Modification actuelle)", + "incomingChange": "(Modification entrante)" +} \ No newline at end of file diff --git a/i18n/fra/extensions/merge-conflict/package.i18n.json b/i18n/fra/extensions/merge-conflict/package.i18n.json index 8b6ad71cd4e6d..6f812b18e76d1 100644 --- a/i18n/fra/extensions/merge-conflict/package.i18n.json +++ b/i18n/fra/extensions/merge-conflict/package.i18n.json @@ -3,4 +3,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "command.category": "Conflit de fusion", + "command.accept.all-incoming": "Accepter toutes les modifications entrantes", + "command.accept.all-both": "Accepter les deux", + "command.accept.current": "Accepter les modifications actuelles", + "command.accept.incoming": "Accepter les modifications entrantes", + "command.accept.selection": "Accepter la sélection", + "command.accept.both": "Accepter les deux", + "command.next": "Conflit suivant", + "command.previous": "Conflit précédent", + "command.compare": "Conflit de comparaison des modifications actuelles", + "config.title": "Conflit de fusion", + "config.codeLensEnabled": "Activer/désactiver le bloc CodeLens du conflit de fusion dans l'éditeur", + "config.decoratorsEnabled": "Activer/désactiver les éléments décoratifs du conflit de fusion dans l'éditeur" +} \ No newline at end of file diff --git a/i18n/fra/extensions/npm/package.i18n.json b/i18n/fra/extensions/npm/package.i18n.json index 8b6ad71cd4e6d..df84303decb34 100644 --- a/i18n/fra/extensions/npm/package.i18n.json +++ b/i18n/fra/extensions/npm/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.npm.autoDetect": "Contrôle si la détection automatique des scripts npm est activée ou désactivée. La valeur par défaut est activée." +} \ No newline at end of file diff --git a/i18n/fra/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/fra/extensions/typescript/out/features/bufferSyncSupport.i18n.json index 26cde295cd569..3187cd8f22f85 100644 --- a/i18n/fra/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/fra/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "Incompatibilité de version ! global tsc ({0}) != Service de langage de VS Code ({1}). Des erreurs de compilation incohérentes risquent de se produire", "moreInformation": "Informations", "doNotCheckAgain": "Ne plus vérifier", "close": "Fermer", diff --git a/i18n/fra/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/fra/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json index 8b6ad71cd4e6d..052fa717730f1 100644 --- a/i18n/fra/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json +++ b/i18n/fra/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "ts-check": "Active la vérification sémantique dans un fichier JavaScript. Doit se trouver au début d'un fichier.", + "ts-nocheck": "Désactive la vérification sémantique dans un fichier JavaScript. Doit se trouver au début d'un fichier.", + "ts-ignore": "Supprime les erreurs @ts-check sur la ligne suivante d'un fichier." +} \ No newline at end of file diff --git a/i18n/fra/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/fra/extensions/typescript/out/utils/projectStatus.i18n.json index 9f6a19db97f04..7890a4f6439a6 100644 --- a/i18n/fra/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/fra/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "Pour activer les fonctionnalités de langage JavaScript/TypeScript à l'échelle du projet, excluez les dossiers contenant de nombreux fichiers, par exemple : {0}", "hintExclude.generic": "Pour activer les fonctionnalités de langage JavaScript/TypeScript à l'échelle du projet, excluez les dossiers volumineux contenant des fichiers sources inutilisés.", - "open": "Configurer les exclusions", "large.label": "Configurer les exclusions", "hintExclude.tooltip": "Pour activer les fonctionnalités de langage JavaScript/TypeScript à l'échelle du projet, excluez les dossiers volumineux contenant des fichiers sources inutilisés." } \ No newline at end of file diff --git a/i18n/fra/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/fra/extensions/typescript/out/utils/typingsStatus.i18n.json index 0b61796218ce7..36ca9606c1cf2 100644 --- a/i18n/fra/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/fra/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Récupération (fetch) des données pour l'amélioration de TypeScript IntelliSense", + "typesInstallerInitializationFailed.title": "Impossible d'installer des fichiers de typages pour les fonctionnalités de langage JavaScript. Vérifiez que NPM est installé ou configurez 'typescript.npm' dans vos paramètres utilisateur", "typesInstallerInitializationFailed.moreInformation": "Informations", "typesInstallerInitializationFailed.doNotCheckAgain": "Ne plus vérifier", "typesInstallerInitializationFailed.close": "Fermer" diff --git a/i18n/fra/extensions/typescript/package.i18n.json b/i18n/fra/extensions/typescript/package.i18n.json index d672a75d013d7..53c76f9a4c4e5 100644 --- a/i18n/fra/extensions/typescript/package.i18n.json +++ b/i18n/fra/extensions/typescript/package.i18n.json @@ -13,7 +13,6 @@ "typescript.check.tscVersion": "Vérifiez si un compilateur TypeScript installé globalement (par exemple tsc) est différent du service de langage TypeScript.", "typescript.tsserver.log": "Active la journalisation du serveur TS dans un fichier. Ce journal peut être utilisé pour diagnostiquer les problèmes du serveur TS. Il peut contenir des chemins de fichier, du code source et d'autres informations potentiellement sensibles de votre projet.", "typescript.tsserver.trace": "Active le traçage des messages envoyés au serveur TS. Cette trace peut être utilisée pour diagnostiquer les problèmes du serveur TS. Elle peut contenir des chemins de fichier, du code source et d'autres informations potentiellement sensibles de votre projet.", - "typescript.tsserver.experimentalAutoBuild": "Active la build automatique expérimentale. Nécessite la version 1.9 dev ou 2.x tsserver et le redémarrage du code VS une fois celui-ci modifié.", "typescript.validate.enable": "Activez/désactivez la validation TypeScript.", "typescript.format.enable": "Activez/désactivez le formateur TypeScript par défaut.", "javascript.format.enable": "Activez/désactivez le formateur JavaScript par défaut.", @@ -33,8 +32,16 @@ "javascript.validate.enable": "Activez/désactivez la validation JavaScript.", "typescript.goToProjectConfig.title": "Accéder à la configuration du projet", "javascript.goToProjectConfig.title": "Accéder à la configuration du projet", + "javascript.referencesCodeLens.enabled": "Activez/désactivez les références CodeLens dans les fichiers JavaScript.", + "typescript.referencesCodeLens.enabled": "Activez/désactivez les références CodeLens dans les fichiers TypeScript. Nécessite TypeScript >= 2.0.6.", "typescript.implementationsCodeLens.enabled": "Activer/désactiver CodeLens dans les implémentations. Nécessite TypeScript >= 2.2.0.", + "typescript.openTsServerLog.title": "Ouvrir le journal du serveur TS", + "typescript.restartTsServer": "Redémarrer le serveur TS", "typescript.selectTypeScriptVersion.title": "Sélectionner la version de TypeScript", "jsDocCompletion.enabled": "Activer/désactiver les commentaires JSDoc automatiques", - "javascript.implicitProjectConfig.checkJs": "Activer/désactiver la vérification sémantique des fichiers JavaScript. Les fichiers jsconfig.json ou tsconfig.json existants remplacent ce paramètre. Nécessite TypeScript >=2.3.1." + "javascript.implicitProjectConfig.checkJs": "Activer/désactiver la vérification sémantique des fichiers JavaScript. Les fichiers jsconfig.json ou tsconfig.json existants remplacent ce paramètre. Nécessite TypeScript >=2.3.1.", + "typescript.npm": "Spécifie le chemin de l'exécutable NPM utilisé pour l'acquisition de type automatique. Nécessite TypeScript >= 2.3.4.", + "typescript.check.npmIsInstalled": "Vérifie si NPM est installé pour l'acquisition de type automatique.", + "javascript.nameSuggestions": "Activez/désactivez l'inclusion de noms uniques à partir du fichier dans les listes de suggestions JavaScript.", + "typescript.tsc.autoDetect": "Contrôle si la détection automatique des tâches tsc est activée ou désactivée." } \ No newline at end of file diff --git a/i18n/fra/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/fra/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index b6faf1c8af7d5..e5800681aa307 100644 --- a/i18n/fra/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/fra/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,6 +6,7 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "L'image est trop grande pour être affichée dans l'éditeur. ", + "resourceOpenExternalButton": " Ouvrir l'image en utilisant un programme externe ?", "nativeBinaryError": "Impossible d'afficher le fichier dans l'éditeur : soit il est binaire, soit il est très volumineux, soit il utilise un encodage de texte non pris en charge.", "sizeB": "{0} o", "sizeKB": "{0} Ko", diff --git a/i18n/fra/src/vs/base/common/errorMessage.i18n.json b/i18n/fra/src/vs/base/common/errorMessage.i18n.json index 0276e51a4a051..4871401845f6e 100644 --- a/i18n/fra/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/fra/src/vs/base/common/errorMessage.i18n.json @@ -13,6 +13,5 @@ "error.connection.unknown": "Une erreur de connexion inconnue s'est produite. Soit vous n'êtes plus connecté à Internet, soit le serveur auquel vous êtes connecté est hors connexion.", "stackTrace.format": "{0} : {1}", "error.defaultMessage": "Une erreur inconnue s’est produite. Veuillez consulter le journal pour plus de détails.", - "nodeExceptionMessage": "Une erreur système s'est produite ({0})", "error.moreErrors": "{0} ({1} erreurs au total)" } \ No newline at end of file diff --git a/i18n/fra/src/vs/base/common/keybindingLabels.i18n.json b/i18n/fra/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/code/electron-main/menus.i18n.json b/i18n/fra/src/vs/code/electron-main/menus.i18n.json index 770b210d7645a..15083213d9a10 100644 --- a/i18n/fra/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/fra/src/vs/code/electron-main/menus.i18n.json @@ -14,6 +14,7 @@ "mHelp": "&&Aide", "miNewWindow": "Nouvelle &&fenêtre", "mAbout": "À propos de {0}", + "mServices": "Services", "mHide": "Masquer {0}", "mHideOthers": "Masquer les autres", "mShowAll": "Afficher tout", @@ -54,6 +55,9 @@ "miShowEmmetCommands": "E&&mmet...", "miToggleLineComment": "Afficher/masquer le commen&&taire de ligne", "miToggleBlockComment": "Afficher/masquer le commentaire de &&bloc", + "miMultiCursorAlt": "Utiliser Alt+Clic pour l'option multicurseur", + "miMultiCursorCmd": "Utiliser Cmd+Clic pour l'option multicurseur", + "miMultiCursorCtrl": "Utiliser Ctrl+Clic pour l'option multicurseur", "miInsertCursorAbove": "&&Ajouter un curseur au-dessus", "miInsertCursorBelow": "Aj&&outer un curseur en dessous", "miInsertCursorAtEndOfEachLineSelected": "Ajouter des c&&urseurs à la fin des lignes", @@ -69,6 +73,7 @@ "miSmartSelectShrink": "&&Réduire la sélection", "miViewExplorer": "&&Explorateur", "miViewSearch": "&&Rechercher", + "miViewSCM": "S&&CM", "miViewDebug": "&&Déboguer", "miViewExtensions": "E&&xtensions", "miToggleOutput": "&&Sortie", @@ -113,6 +118,8 @@ "miGotoSymbolInFile": "Atteindre le &&symbole dans le fichier...", "miGotoSymbolInWorkspace": "Atteindre le symbole dans l'espace de &&travail...", "miGotoDefinition": "Atteindre la &&définition", + "miGotoTypeDefinition": "Accéder à la définition de &&type", + "miGotoImplementation": "Accéder à l'&&implémentation", "miGotoLine": "Atteindre la &&ligne...", "miStartDebugging": "&&Démarrer le débogage", "miStartWithoutDebugging": "Démarrer &&sans débogage", @@ -129,16 +136,17 @@ "miColumnBreakpoint": "P&&oint d'arrêt de la colonne", "miFunctionBreakpoint": "Point d'arrêt sur &&fonction...", "miNewBreakpoint": "&&Nouveau point d'arrêt", + "miEnableAllBreakpoints": "Activer tous les points d'arrêt", "miDisableAllBreakpoints": "Désacti&&ver tous les points d'arrêt", "miRemoveAllBreakpoints": "Supprimer &&tous les points d'arrêt", "miInstallAdditionalDebuggers": "&&Installer des débogueurs supplémentaires...", "mMinimize": "Réduire", - "mClose": "Fermer", "mBringToFront": "Mettre tout au premier plan", "miToggleDevTools": "Activer/désactiver les ou&&tils de développement", "miAccessibilityOptions": "&&Options d'accessibilité", "miReportIssues": "S&&ignaler les problèmes", "miWelcome": "&&Bienvenue", + "miInteractivePlayground": "Terrain de jeu &&interactif", "miDocumentation": "&&Documentation", "miReleaseNotes": "Notes de pu&&blication", "miKeyboardShortcuts": "Référence des racco&&urcis clavier", @@ -148,12 +156,14 @@ "miLicense": "Affic&&her la licence", "miPrivacyStatement": "Déc&&laration de confidentialité", "miAbout": "À pr&&opos de", + "miTerminateTask": "&&Terminer la tâche", "accessibilityOptionsWindowTitle": "Options d'accessibilité", "miRestartToUpdate": "Redémarrer pour mettre à jour...", "miCheckingForUpdates": "Recherche des mises à jour...", "miDownloadUpdate": "Télécharger la mise à jour disponible", "miDownloadingUpdate": "Téléchargement de la mise à jour...", "miInstallingUpdate": "Installation de la mise à jour...", + "miCheckForUpdates": "Rechercher les mises à jour...", "aboutDetail": "\nVersion {0}\nValidation {1}\nDate {2}\nInterpréteur de commandes {3}\nConvertisseur {4}\nNode {5}", "okButton": "OK" } \ No newline at end of file diff --git a/i18n/fra/src/vs/code/electron-main/windows.i18n.json b/i18n/fra/src/vs/code/electron-main/windows.i18n.json index af0778db0155d..b1abddadd2442 100644 --- a/i18n/fra/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/fra/src/vs/code/electron-main/windows.i18n.json @@ -13,9 +13,5 @@ "appStalled": "La fenêtre ne répond plus", "appStalledDetail": "Vous pouvez rouvrir ou fermer la fenêtre, ou continuer à patienter.", "appCrashed": "La fenêtre s'est bloquée", - "appCrashedDetail": "Nous vous prions de nous excuser pour ce désagrément. Vous pouvez rouvrir la fenêtre pour reprendre l'action au moment où elle a été interrompue.", - "newWindow": "Nouvelle fenêtre", - "newWindowDesc": "Ouvre une nouvelle fenêtre", - "recentFolders": "Dossiers récents", - "folderDesc": "{0} {1}" + "appCrashedDetail": "Nous vous prions de nous excuser pour ce désagrément. Vous pouvez rouvrir la fenêtre pour reprendre l'action au moment où elle a été interrompue." } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json index 16acf6481b0c5..a6f12dfbce141 100644 --- a/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/fra/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -23,6 +23,8 @@ "minimap.enabled": "Contrôle si la minicarte est affichée", "minimap.renderCharacters": "Afficher les caractères réels sur une ligne (par opposition aux blocs de couleurs)", "minimap.maxColumn": "Limiter la largeur de la minicarte pour afficher au maximum un certain nombre de colonnes", + "find.seedSearchStringFromSelection": "Contrôle si nous remplissons la chaîne à rechercher dans le Widget Recherche à partir de la sélection de l'éditeur", + "find.autoFindInSelection": "Contrôle si l'indicateur Rechercher dans la sélection est activé quand plusieurs caractères ou lignes de texte sont sélectionnés dans l'éditeur", "wordWrap.off": "Le retour automatique à la ligne n'est jamais effectué.", "wordWrap.on": "Le retour automatique à la ligne s'effectue en fonction de la largeur de la fenêtre d'affichage.", "wordWrap.wordWrapColumn": "Le retour automatique à la ligne s'effectue en fonction de 'editor.wordWrapColumn'.", @@ -31,16 +33,19 @@ "wordWrapColumn": "Contrôle la colonne de retour automatique à la ligne de l'éditeur quand 'editor.wordWrap' a la valeur 'wordWrapColumn' ou 'bounded'.", "wrappingIndent": "Contrôle le retrait des lignes renvoyées. La valeur peut être 'none', 'same' ou 'indent'.", "mouseWheelScrollSensitivity": "Multiplicateur à utiliser pour le 'deltaX' et le 'deltaY' des événements de défilement de la roulette de la souris", + "multiCursorModifier.ctrlCmd": "Mappe vers 'Contrôle' dans Windows et Linux, et vers 'Commande' dans OSX.", + "multiCursorModifier.alt": "Mappe vers 'Alt' dans Windows et Linux, et vers 'Option' dans OSX.", + "multiCursorModifier": "Modificateur à utiliser pour ajouter plusieurs curseurs avec la souris. 'ctrlCmd' mappe vers 'Contrôle' dans Windows et Linux, et vers 'Commande' dans OSX. Les mouvements de souris Accéder à la définition et Ouvrir le lien s'adaptent pour ne pas entrer en conflit avec le modificateur multicurseur.", "quickSuggestions.strings": "Activez les suggestions rapides dans les chaînes.", "quickSuggestions.comments": "Activez les suggestions rapides dans les commentaires.", "quickSuggestions.other": "Activez les suggestions rapides en dehors des chaînes et des commentaires.", "quickSuggestions": "Contrôle si les suggestions doivent s'afficher automatiquement en cours de frappe", "quickSuggestionsDelay": "Contrôle le délai en ms au bout duquel les suggestions rapides s'affichent", - "parameterHints": "Active les indicateurs de paramètres", "autoClosingBrackets": "Contrôle si l'éditeur doit automatiquement fermer les crochets après les avoir ouverts", "formatOnType": "Contrôle si l'éditeur doit automatiquement mettre en forme la ligne après la saisie", "formatOnPaste": "Contrôle si l'éditeur doit automatiquement mettre en forme le contenu collé. Un formateur doit être disponible et doit pouvoir mettre en forme une plage dans un document.", "suggestOnTriggerCharacters": "Contrôle si les suggestions doivent s'afficher automatiquement durant la saisie de caractères de déclenchement", + "acceptSuggestionOnEnter": "Contrôle si les suggestions doivent être acceptées avec 'Entrée', en plus de 'Tab'. Cela permet d'éviter toute ambiguïté entre l'insertion de nouvelles lignes et l'acceptation de suggestions. La valeur 'smart' signifie que vous acceptez uniquement une suggestion avec Entrée quand elle applique une modification de texte", "acceptSuggestionOnCommitCharacter": "Contrôle si les suggestions doivent être acceptées avec des caractères de validation. Par exemple, en JavaScript, le point-virgule (';') peut être un caractère de validation qui permet d'accepter une suggestion et de taper ce caractère.", "snippetSuggestions": "Contrôle si les extraits de code s'affichent en même temps que d'autres suggestions, ainsi que leur mode de tri.", "emptySelectionClipboard": "Contrôle si la copie sans sélection permet de copier la ligne actuelle.", @@ -62,12 +67,17 @@ "renderLineHighlight": "Contrôle la façon dont l'éditeur doit afficher la surbrillance de la ligne active. Les différentes possibilités sont 'none', 'gutter', 'line' et 'all'.", "codeLens": "Contrôle si l'éditeur affiche les indicateurs CodeLens", "folding": "Contrôle si le pliage de code est activé dans l'éditeur", + "showFoldingControls": "Définit si les contrôles de réduction sur la bordure sont cachés automatiquement", "matchBrackets": "Met en surbrillance les crochets correspondants quand l'un d'eux est sélectionné.", "glyphMargin": "Contrôle si l'éditeur doit afficher la marge de glyphes verticale. La marge de glyphes sert principalement au débogage.", "useTabStops": "L'insertion et la suppression d'un espace blanc suit les taquets de tabulation", "trimAutoWhitespace": "Supprimer l'espace blanc de fin inséré automatiquement", "stablePeek": "Garder les éditeurs d'aperçu ouverts même si l'utilisateur double-clique sur son contenu ou appuie sur la touche Échap.", "dragAndDrop": "Contrôle si l'éditeur autorise le déplacement des sélections par glisser-déplacer.", + "accessibilitySupport.auto": "L'éditeur utilise les API de la plateforme pour détecter si un lecteur d'écran est attaché.", + "accessibilitySupport.on": "L'éditeur est optimisé en permanence pour une utilisation avec un lecteur d'écran.", + "accessibilitySupport.off": "L'éditeur n'est jamais optimisé pour une utilisation avec un lecteur d'écran.", + "accessibilitySupport": "Contrôle si l'éditeur doit s'exécuter dans un mode optimisé pour les lecteurs d'écran.", "sideBySide": "Contrôle si l'éditeur de différences affiche les différences en mode côte à côte ou inline", "ignoreTrimWhitespace": "Contrôle si l'éditeur de différences affiche les changements liés aux espaces blancs de début ou de fin comme des différences", "renderIndicators": "Contrôle si l'éditeur de différences affiche les indicateurs +/- pour les modifications ajoutées/supprimées", diff --git a/i18n/fra/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/fra/src/vs/editor/common/config/editorOptions.i18n.json index bf45d0601aaa9..452e3e365b7d6 100644 --- a/i18n/fra/src/vs/editor/common/config/editorOptions.i18n.json +++ b/i18n/fra/src/vs/editor/common/config/editorOptions.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "accessibilityOffAriaLabel": "L'éditeur n'est pas accessible pour le moment. Appuyez sur Alt+F1 pour connaître les options.", "editorViewAccessibleLabel": "Contenu d'éditeur" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/fra/src/vs/editor/common/view/editorColorRegistry.i18n.json index 77ca0b5bb8ff8..0025ed5f438c3 100644 --- a/i18n/fra/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/fra/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -16,5 +16,9 @@ "editorBracketMatchBackground": "Couleur d'arrière-plan pour les accolades associées", "editorBracketMatchBorder": "Couleur pour le contour des accolades associées", "editorOverviewRulerBorder": "Couleur de la bordure de la règle d'apperçu.", - "editorGutter": "Couleur de fond pour la bordure de l'éditeur. La bordure contient les marges pour les symboles et les numéros de ligne." + "editorGutter": "Couleur de fond pour la bordure de l'éditeur. La bordure contient les marges pour les symboles et les numéros de ligne.", + "errorForeground": "Couleur de premier plan de la ligne ondulée marquant les erreurs dans l'éditeur.", + "errorBorder": "Couleur de bordure de la ligne ondulée marquant les erreurs dans l'éditeur.", + "warningForeground": "Couleur de premier plan de la ligne ondulée marquant les avertissements dans l'éditeur.", + "warningBorder": "Couleur de bordure de la ligne ondulée marquant les avertissements dans l'éditeur." } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/fra/src/vs/editor/contrib/find/common/findController.i18n.json index 83dcc17be9b65..255c5de5a2793 100644 --- a/i18n/fra/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,5 @@ "addSelectionToPreviousFindMatch": "Ajouter la sélection à la correspondance de recherche précédente", "moveSelectionToNextFindMatch": "Déplacer la dernière sélection vers la correspondance de recherche suivante", "moveSelectionToPreviousFindMatch": "Déplacer la dernière sélection à la correspondance de recherche précédente", - "selectAllOccurencesOfFindMatch": "Sélectionner toutes les occurrences des correspondances de la recherche", "changeAll.label": "Modifier toutes les occurrences" } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/fra/src/vs/editor/contrib/links/browser/links.i18n.json index f16f009895594..3b71097e7dfb4 100644 --- a/i18n/fra/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "Commande + clic pour suivre le lien", "links.navigate": "Ctrl + clic pour suivre le lien", + "links.navigate.al": "Alt + clic pour suivre le lien", "invalid.url": "Échec de l'ouverture de ce lien, car il n'est pas bien formé : {0}", "missing.url": "Échec de l'ouverture de ce lien, car sa cible est manquante.", "label": "Ouvrir le lien" diff --git a/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index e4871d36b8975..733dbb088ce67 100644 --- a/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "aria.oneReference": "symbole dans {0} sur la ligne {1}, colonne {2}", - "aria.fileReferences.1": "1 symbole dans {0}", - "aria.fileReferences.N": "{0} symboles dans {1}", "aria.result.0": "Résultats introuvables", "aria.result.1": "1 symbole dans {0}", "aria.result.n1": "{0} symboles dans {1}", diff --git a/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index b2ba0b9ad35f0..498b3551c287b 100644 --- a/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -16,9 +16,12 @@ "peekViewTitleInfoForeground": "Couleur des informations sur le titre de l'affichage d'aperçu.", "peekViewBorder": "Couleur des bordures et de la flèche de l'affichage d'aperçu.", "peekViewResultsBackground": "Couleur d'arrière-plan de la liste des résultats de l'affichage d'aperçu.", + "peekViewResultsMatchForeground": "Couleur de premier plan des noeuds de lignes dans la liste des résultats de l'affichage d'aperçu.", + "peekViewResultsFileForeground": "Couleur de premier plan des noeuds de fichiers dans la liste des résultats de l'affichage d'aperçu.", "peekViewResultsSelectionBackground": "Couleur d'arrière-plan de l'entrée sélectionnée dans la liste des résultats de l'affichage d'aperçu.", "peekViewResultsSelectionForeground": "Couleur de premier plan de l'entrée sélectionnée dans la liste des résultats de l'affichage d'aperçu.", "peekViewEditorBackground": "Couleur d'arrière-plan de l'éditeur d'affichage d'aperçu.", + "peekViewEditorGutterBackground": "Couleur d'arrière-plan de la bordure de l'éditeur d'affichage d'aperçu.", "peekViewResultsMatchHighlight": "Couleur de mise en surbrillance d'une correspondance dans la liste des résultats de l'affichage d'aperçu.", "peekViewEditorMatchHighlight": "Couleur de mise en surbrillance d'une correspondance dans l'éditeur de l'affichage d'aperçu." } \ No newline at end of file diff --git a/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index e38b8d1bf14ed..75285eb257ef9 100644 --- a/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/fra/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -12,6 +12,7 @@ "readMore": "En savoir plus...{0}", "suggestionWithDetailsAriaLabel": "{0}, suggestion, avec détails", "suggestionAriaLabel": "{0}, suggestion", + "readLess": "En savoir moins...{0}", "suggestWidget.loading": "Chargement...", "suggestWidget.noSuggestions": "Pas de suggestions.", "suggestionAriaAccepted": "{0}, accepté", diff --git a/i18n/fra/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/fra/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 315671f3b2287..4ec0caa12c157 100644 --- a/i18n/fra/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/fra/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -21,6 +21,8 @@ "menus.scmTitle": "Menu du titre du contrôle de code source", "menus.resourceGroupContext": "Menu contextuel du groupe de ressources du contrôle de code source", "menus.resourceStateContext": "Menu contextuel de l'état des ressources du contrôle de code source", + "view.viewTitle": "Menu de titre de la vue ajoutée", + "view.itemContext": "Menu contextuel de l'élément de vue ajoutée", "nonempty": "valeur non vide attendue.", "opticon": "la propriété 'icon' peut être omise, ou bien elle doit être une chaîne ou un littéral tel que '{dark, light}'", "requireStringOrObject": "la propriété `{0}` est obligatoire et doit être de type `string` ou `object`", diff --git a/i18n/fra/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/fra/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 23d586b47fb73..1b99c644dbbe3 100644 --- a/i18n/fra/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/fra/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "Toutes les contributions de l'extension VS Code représentées par ce package.", "vscode.extension.preview": "Définit l'extension à marquer en tant que préversion dans Marketplace.", "vscode.extension.activationEvents": "Événements d'activation pour l'extension VS Code.", + "vscode.extension.activationEvents.onLanguage": "Événement d'activation envoyé quand un fichier résolu dans le langage spécifié est ouvert.", + "vscode.extension.activationEvents.onCommand": "Événement d'activation envoyé quand la commande spécifiée est appelée.", + "vscode.extension.activationEvents.onDebug": "Événement d'activation envoyé quand une session de débogage du type spécifié est démarrée.", + "vscode.extension.activationEvents.workspaceContains": "Événement d'activation envoyé quand un dossier ouvert contient au moins un fichier correspondant au modèle glob spécifié.", + "vscode.extension.activationEvents.onView": "Événement d'activation envoyé quand la vue spécifiée est développée.", + "vscode.extension.activationEvents.star": "Événement d'activation envoyé au démarrage de VS Code. Pour garantir la qualité de l'expérience utilisateur, utilisez cet événement d'activation dans votre extension uniquement quand aucune autre combinaison d'événements d'activation ne fonctionne dans votre cas d'utilisation.", "vscode.extension.badges": "Ensemble de badges à afficher dans la barre latérale de la page d'extensions de Marketplace.", "vscode.extension.badges.url": "URL de l'image du badge.", "vscode.extension.badges.href": "Lien du badge.", diff --git a/i18n/fra/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/fra/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..316d8cd9473a9 --- /dev/null +++ b/i18n/fra/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "Nouvelle fenêtre", + "newWindowDesc": "Ouvre une nouvelle fenêtre", + "recentFolders": "Dossiers récents", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/fra/src/vs/platform/markers/common/problemMatcher.i18n.json index 985f7884334dd..42756c8837cf1 100644 --- a/i18n/fra/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/fra/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,6 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "Erreur : la propriété de modèle {0} n'est pas un nom de variable de modèle valide.", "ProblemMatcherParser.problemPattern.watchingMatcher": "Un détecteur de problèmes de correspondance doit définir un modèle de début et un modèle de fin à observer.", "ProblemMatcherParser.invalidRegexp": "Erreur : la chaîne {0} est une expression régulière non valide.\n", + "WatchingPatternSchema.regexp": "Expression régulière permettant de détecter le début ou la fin d'une tâche en arrière-plan.", "WatchingPatternSchema.file": "Index de groupe de correspondance du nom de fichier. Peut être omis.", "PatternTypeSchema.name": "Nom d'un modèle faisant l'objet d'une contribution ou prédéfini", "PatternTypeSchema.description": "Modèle de problème ou bien nom d'un modèle de problème faisant l'objet d'une contribution ou prédéfini. Peut être omis si base est spécifié.", @@ -42,6 +43,12 @@ "ProblemMatcherSchema.severity": "Gravité par défaut des problèmes de capture. Est utilisé si le modèle ne définit aucun groupe de correspondance pour la gravité.", "ProblemMatcherSchema.applyTo": "Contrôle si un problème signalé pour un document texte s'applique uniquement aux documents ouverts ou fermés, ou bien à l'ensemble des documents.", "ProblemMatcherSchema.fileLocation": "Définit la façon dont les noms de fichiers signalés dans un modèle de problème doivent être interprétés.", + "ProblemMatcherSchema.background": "Modèles de suivi du début et de la fin d'un détecteur de problèmes de correspondance actif sur une tâche en arrière-plan.", + "ProblemMatcherSchema.background.activeOnStart": "Si la valeur est true, le moniteur d'arrière-plan est actif au démarrage de la tâche. Cela revient à envoyer une ligne qui correspond à beginPattern", + "ProblemMatcherSchema.background.beginsPattern": "En cas de correspondance dans la sortie, le début d'une tâche en arrière-plan est signalé.", + "ProblemMatcherSchema.background.endsPattern": "En cas de correspondance dans la sortie, la fin d'une tâche en arrière-plan est signalée.", + "ProblemMatcherSchema.watching.deprecated": "La propriété espion est déconseillée. Utilisez l'arrière-plan à la place.", + "ProblemMatcherSchema.watching": "Modèles de suivi du début et de la fin d'un détecteur de problèmes de correspondance espion.", "ProblemMatcherSchema.watching.activeOnStart": "Si la valeur est true, le mode espion est actif au démarrage de la tâche. Cela revient à émettre une ligne qui correspond à beginPattern", "ProblemMatcherSchema.watching.beginsPattern": "En cas de correspondance dans la sortie, le début d'une tâche de suivi est signalé.", "ProblemMatcherSchema.watching.endsPattern": "En cas de correspondance dans la sortie, la fin d'une tâche de suivi est signalée.", diff --git a/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json index 4977fe04f0ba5..5d206ed6b986e 100644 --- a/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/fra/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -16,11 +16,15 @@ "textLinkForeground": "Couleur des liens dans le texte.", "textLinkActiveForeground": "Couleur des liens actifs dans le texte.", "textPreformatForeground": "Couleur des segments de texte préformatés.", + "textBlockQuoteBackground": "Couleur d'arrière-plan des citations dans le texte.", + "textBlockQuoteBorder": "Couleur de bordure des citations dans le texte.", + "textCodeBlockBackground": "Couleur d'arrière-plan des blocs de code dans le texte.", "widgetShadow": "Couleur de l'ombre des widgets, comme rechercher/remplacer, au sein de l'éditeur.", "inputBoxBackground": "Arrière-plan de la zone d'entrée.", "inputBoxForeground": "Premier plan de la zone d'entrée.", "inputBoxBorder": "Bordure de la zone d'entrée.", "inputBoxActiveOptionBorder": "Couleur de la bordure des options activées dans les champs d'entrée.", + "inputPlaceholderForeground": "Couleur de premier plan de la zone d'entrée pour le texte d'espace réservé.", "inputValidationInfoBackground": "Couleur d'arrière-plan de la validation d'entrée pour la gravité des informations.", "inputValidationInfoBorder": "Couleur de bordure de la validation d'entrée pour la gravité des informations.", "inputValidationWarningBackground": "Couleur d'arrière-plan de la validation d'entrée pour l'avertissement sur les informations.", @@ -31,10 +35,13 @@ "dropdownForeground": "Premier plan de la liste déroulante.", "dropdownBorder": "Bordure de la liste déroulante.", "listFocusBackground": "Couleur d'arrière-plan de la liste/l'arborescence pour l'élément ayant le focus quand la liste/l'arborescence est active. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", + "listFocusForeground": "Couleur de premier plan de la liste/l'arborescence pour l'élément ayant le focus quand la liste/l'arborescence est active. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", "listActiveSelectionBackground": "Couleur d'arrière-plan de la liste/l'arborescence de l'élément sélectionné quand la liste/l'arborescence est active. Une liste/arborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", "listActiveSelectionForeground": "Couleur de premier plan de la liste/l'arborescence pour l'élément sélectionné quand la liste/l'arborescence est active. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", "listInactiveSelectionBackground": "Couleur d'arrière-plan de la liste/l'arborescence pour l'élément sélectionné quand la liste/l'arborescence est inactive. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", + "listInactiveSelectionForeground": "Couleur de premier plan de la liste/l'arborescence pour l'élément sélectionné quand la liste/l'arborescence est active. Une liste/aborescence active peut être sélectionnée au clavier, elle ne l'est pas quand elle est inactive.", "listHoverBackground": "Arrière-plan de la liste/l'arborescence pendant le pointage sur des éléments avec la souris.", + "listHoverForeground": "Premier plan de la liste/l'arborescence pendant le pointage sur des éléments avec la souris.", "listDropBackground": "Arrière-plan de l'opération de glisser-déplacer dans une liste/arborescence pendant le déplacement d'éléments avec la souris.", "highlight": "Couleur de premier plan dans la liste/l'arborescence pour la surbrillance des correspondances pendant la recherche dans une liste/arborescence.", "pickerGroupForeground": "Couleur du sélecteur rapide pour les étiquettes de regroupement.", @@ -52,6 +59,7 @@ "editorBackground": "Couleur d'arrière-plan de l'éditeur.", "editorForeground": "Couleur de premier plan par défaut de l'éditeur.", "editorWidgetBackground": "Couleur d'arrière-plan des gadgets de l'éditeur tels que rechercher/remplacer.", + "editorWidgetBorder": "Couleur de bordure des widgets de l'éditeur. La couleur est utilisée uniquement si le widget choisit d'avoir une bordure et si la couleur n'est pas remplacée par un widget.", "editorSelection": "Couleur de la sélection de l'éditeur.", "editorInactiveSelection": "Couleur de la sélection dans un éditeur inactif.", "editorSelectionHighlight": "Couleur des régions dont le contenu est identique à la sélection.", @@ -65,5 +73,12 @@ "diffEditorInserted": "Couleur d'arrière-plan du texte inséré.", "diffEditorRemoved": "Couleur d'arrière-plan du texte supprimé.", "diffEditorInsertedOutline": "Couleur de contour du texte inséré.", - "diffEditorRemovedOutline": "Couleur de contour du texte supprimé." + "diffEditorRemovedOutline": "Couleur de contour du texte supprimé.", + "mergeCurrentHeaderBackground": "Arrière-plan de l'en-tête actuel dans les conflits de fusion inline.", + "mergeCurrentContentBackground": "Arrière-plan du contenu actuel dans les conflits de fusion inline.", + "mergeIncomingHeaderBackground": "Arrière-plan de l'en-tête entrant dans les conflits de fusion inline.", + "mergeIncomingContentBackground": "Arrière-plan du contenu entrant dans les conflits de fusion inline.", + "mergeBorder": "Couleur de bordure des en-têtes et du séparateur dans les conflits de fusion inline.", + "overviewRulerCurrentContentForeground": "Premier plan de la règle d'aperçu actuelle pour les conflits de fusion inline.", + "overviewRulerIncomingContentForeground": "Premier plan de la règle d'aperçu entrante pour les conflits de fusion inline." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/fra/src/vs/workbench/api/node/extHostTask.i18n.json index 8b6ad71cd4e6d..c9b8882d43762 100644 --- a/i18n/fra/src/vs/workbench/api/node/extHostTask.i18n.json +++ b/i18n/fra/src/vs/workbench/api/node/extHostTask.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "task.label": "{0} : {1}" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/fra/src/vs/workbench/api/node/extHostTreeViews.i18n.json index 8b6ad71cd4e6d..2c25d01eeb19c 100644 --- a/i18n/fra/src/vs/workbench/api/node/extHostTreeViews.i18n.json +++ b/i18n/fra/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "treeView.notRegistered": "Aucune arborescence avec l'ID '{0}' n'est inscrite.", + "treeItem.notFound": "L'élément d'arborescence avec l'ID '{0}' est introuvable.", + "treeView.duplicateElement": "L'élément '{0}' est déjà inscrit" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/fra/src/vs/workbench/browser/actions/configureLocale.i18n.json index ef4f2686d9e8d..a8e6e2e51470c 100644 --- a/i18n/fra/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,6 +7,7 @@ "configureLocale": "Configurer la langue", "displayLanguage": "Définit le langage affiché par VSCode.", "doc": "Consultez {0} pour connaître la liste des langues prises en charge.", + "restart": "Le changement de la valeur nécessite le redémarrage de VS Code.", "fail.createSettings": "Impossible de créer '{0}' ({1}).", "JsonSchema.locale": "Langue d'interface utilisateur (IU) à utiliser." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/fra/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index 7b7e61c23f48c..a04b897abfe8b 100644 --- a/i18n/fra/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "Masquer la barre d'activités", - "activityBarAriaLabel": "Sélecteur d'affichage actif" + "activityBarAriaLabel": "Sélecteur d'affichage actif", + "globalActions": "Actions globales" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/fra/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index a96ef282603f6..625e22d6bcd49 100644 --- a/i18n/fra/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -10,7 +10,7 @@ "multiSelection": "{0} sélections", "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", - "tabFocusModeEnabled": "La touche Tab déplace le focus", + "screenReaderDetectedExtra": "Si vous n'utilisez pas de lecteur d'écran, définissez le paramètre 'editor.accessibilitySupport' sur \"désactivé\".", "disableTabMode": "Désactiver le mode d'accessibilité", "gotoLine": "Atteindre la ligne", "indentation": "Retrait", diff --git a/i18n/fra/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/fra/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..4ae604a5c68fd --- /dev/null +++ b/i18n/fra/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "Atteindre le fichier...", + "quickNavigateNext": "Naviguer vers l'élément suivant dans Quick Open", + "quickNavigatePrevious": "Naviguer vers l'élément précédent dans Quick Open", + "quickSelectNext": "Sélectionner l'élément suivant dans Quick Open", + "quickSelectPrevious": "Sélectionner l'élément précédent dans Quick Open" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/browser/quickopen.i18n.json b/i18n/fra/src/vs/workbench/browser/quickopen.i18n.json index 553ab99539ca4..6c5413c9c047c 100644 --- a/i18n/fra/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "Aucun résultat correspondant", "noResultsFound2": "Résultats introuvables", - "entryAriaLabel": "{0}, commande", - "noCommands": "Aucune commande correspondante" + "entryAriaLabel": "{0}, commande" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/browser/viewlet.i18n.json b/i18n/fra/src/vs/workbench/browser/viewlet.i18n.json index a2b2c00414d0b..0c0be9aff9bee 100644 --- a/i18n/fra/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/fra/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "Réduire tout", - "viewToolbarAriaLabel": "{0} actions" + "collapse": "Réduire tout" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/common/theme.i18n.json b/i18n/fra/src/vs/workbench/common/theme.i18n.json index 541ca65cc44ba..33eccb30b80b3 100644 --- a/i18n/fra/src/vs/workbench/common/theme.i18n.json +++ b/i18n/fra/src/vs/workbench/common/theme.i18n.json @@ -7,27 +7,42 @@ "tabActiveBackground": "Couleur d'arrière-plan de l'onglet actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", "tabInactiveBackground": "Couleur d'arrière-plan de l'onglet inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", "tabBorder": "Bordure séparant les onglets les uns des autres. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", + "tabActiveForeground": "Couleur de premier plan de l'onglet actif dans un groupe actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", + "tabInactiveForeground": "Couleur de premier plan de l'onglet inactif dans un groupe actif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", + "tabUnfocusedActiveForeground": "Couleur de premier plan de l'onglet actif dans un groupe inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", + "tabUnfocusedInactiveForeground": "Couleur de premier plan de l'onglet inactif dans un groupe inactif. Les onglets sont les conteneurs des éditeurs dans la zone d'éditeurs. Vous pouvez ouvrir plusieurs onglets dans un groupe d'éditeurs. Il peut exister plusieurs groupes d'éditeurs.", "editorGroupBackground": "Couleur d'arrière-plan d'un groupe d'éditeurs. Les groupes d'éditeurs sont les conteneurs des éditeurs. La couleur d'arrière-plan s'affiche pendant le glissement de groupes d'éditeurs.", + "tabsContainerBackground": "Couleur d'arrière-plan de l'en-tête du titre du groupe d'éditeurs quand les onglets sont activés. Les groupes d'éditeurs sont les conteneurs des éditeurs.", + "tabsContainerBorder": "Couleur de bordure de l'en-tête du titre du groupe d'éditeurs quand les onglets sont activés. Les groupes d'éditeurs sont les conteneurs des éditeurs.", "editorGroupHeaderBackground": "Couleur d'arrière-plan de l'en-tête du titre du groupe d'éditeurs quand les onglets sont désactivés. Les groupes d'éditeurs sont les conteneurs des éditeurs.", "editorGroupBorder": "Couleur séparant plusieurs groupes d'éditeurs les uns des autres. Les groupes d'éditeurs sont les conteneurs des éditeurs.", + "editorDragAndDropBackground": "Couleur d'arrière-plan lors du déplacement des éditeurs par glissement. La couleur doit avoir une transparence pour que le contenu de l'éditeur soit visible à travers.", + "panelBackground": "Couleur d'arrière-plan du panneau. Les panneaux s'affichent sous la zone d'éditeurs et contiennent des affichages tels que la sortie et le terminal intégré.", "panelBorder": "Couleur de bordure de panneau dans la partie supérieure de séparation de l'éditeur. Les panneaux s'affichent sous la zone d'éditeurs et contiennent des affichages tels que la sortie et le terminal intégré.", "panelActiveTitleForeground": "Couleur du titre du panneau actif. Les panneaux se situent sous la zone de l'éditeur et contiennent des affichages comme la sortie et le terminal intégré.", "panelInactiveTitleForeground": "Couleur du titre du panneau inactif. Les panneaux se situent sous la zone de l'éditeur et contiennent des affichages comme la sortie et le terminal intégré.", "panelActiveTitleBorder": "Couleur de la bordure du titre du panneau actif. Les panneaux se situent sous la zone de l'éditeur et contiennent des affichages comme la sortie et le terminal intégré.", "statusBarForeground": "Couleur de premier plan de la barre d'état. La barre d'état est affichée en bas de la fenêtre.", "statusBarBackground": "Couleur d'arrière-plan de la barre d'état standard. La barre d'état est affichée en bas de la fenêtre.", + "statusBarBorder": "Couleur de bordure de la barre d'état faisant la séparation avec la barre latérale et l'éditeur. La barre d'état est affichée en bas de la fenêtre.", "statusBarNoFolderBackground": "Couleur d'arrière-plan de la barre d'état quand aucun dossier n'est ouvert. La barre d'état est affichée en bas de la fenêtre.", + "statusBarNoFolderForeground": "Couleur de premier plan de la barre d'état quand aucun dossier n'est ouvert. La barre d'état est affichée en bas de la fenêtre.", "statusBarItemActiveBackground": "Couleur d'arrière-plan de l'élément de la barre d'état durant un clic. La barre d'état est affichée en bas de la fenêtre.", "statusBarItemHoverBackground": "Couleur d'arrière-plan de l'élément de la barre d'état durant un pointage. La barre d'état est affichée en bas de la fenêtre.", "statusBarProminentItemBackground": "Couleur d'arrière-plan des éléments importants de la barre d'état. Les éléments importants se différencient des autres entrées de la barre d'état pour indiquer l'importance. La barre d'état est affichée en bas de la fenêtre.", "statusBarProminentItemHoverBackground": "Couleur d'arrière-plan des éléments importants de la barre d'état pendant le pointage. Les éléments importants se différencient des autres entrées de la barre d'état pour indiquer l'importance. La barre d'état est affichée en bas de la fenêtre.", "activityBarBackground": "Couleur d'arrière-plan de la barre d'activités. La barre d'activités s'affiche complètement à gauche ou à droite, et permet de naviguer entre les affichages de la barre latérale.", "activityBarForeground": "Couleur de premier plan de la barre d'activités (par ex., utilisée pour les icônes). La barre d'activités s'affiche complètement à gauche ou à droite, et permet de parcourir les vues de la barre latérale.", + "activityBarBorder": "Couleur de bordure de la barre d'activités faisant la séparation avec la barre latérale. La barre d'activités, située à l'extrême droite ou gauche, permet de parcourir les vues de la barre latérale.", + "activityBarDragAndDropBackground": "Couleur des commentaires sur une opération de glisser-déplacer pour les éléments de la barre d'activités. La couleur doit avoir une transparence pour que les entrées de la barre d'activités soient visibles à travers. La barre d'activités, située à l'extrême droite ou gauche, permet de parcourir les vues de la barre latérale.", "activityBarBadgeBackground": "Couleur d'arrière-plan du badge de notification d'activité. La barre d'activités, située à l'extrême gauche ou droite, permet de basculer entre les affichages de la barre latérale.", "activityBarBadgeForeground": "Couleur de premier plan du badge de notification d'activité. La barre d'activités, située à l'extrême gauche ou droite, permet de basculer entre les affichages de la barre latérale.", "sideBarBackground": "Couleur d'arrière-plan de la barre latérale. La barre latérale est le conteneur des affichages tels que ceux de l'exploration et la recherche.", + "sideBarForeground": "Couleur de premier plan de la barre latérale. La barre latérale est le conteneur des vues comme celles de l'explorateur et de la recherche.", + "sideBarBorder": "Couleur de bordure de la barre latérale faisant la séparation avec l'éditeur. La barre latérale est le conteneur des vues comme celles de l'explorateur et de la recherche.", "sideBarTitleForeground": "Couleur de premier plan du titre de la barre latérale. La barre latérale est le conteneur des affichages tels que ceux de l'exploration et la recherche.", "sideBarSectionHeaderBackground": "Couleur d'arrière-plan de l'en-tête de section de la barre latérale. La barre latérale est le conteneur des vues comme celles de l'explorateur et la recherche.", + "sideBarSectionHeaderForeground": "Couleur de premier plan de l'en-tête de section de la barre latérale. La barre latérale est le conteneur des vues comme celles de l'explorateur et de la recherche.", "titleBarActiveForeground": "Premier plan de la barre de titre quand la fenêtre est active. Notez que cette couleur est uniquement prise en charge sur macOS.", "titleBarInactiveForeground": "Premier plan de la barre de titre quand la fenêtre est inactive. Notez que cette couleur est uniquement prise en charge sur macOS.", "titleBarActiveBackground": "Arrière-plan de la barre de titre quand la fenêtre est active. Notez que cette couleur est uniquement prise en charge sur macOS.", diff --git a/i18n/fra/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/actions.i18n.json index 89d053f8d1df4..96da96abc3d9c 100644 --- a/i18n/fra/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/fra/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "Fermer l'éditeur", "closeWindow": "Fermer la fenêtre", - "switchWindow": "Changer de fenêtre", - "switchWindowPlaceHolder": "Sélectionner une fenêtre", - "current": "Fenêtre active", "closeFolder": "Fermer un dossier", "noFolderOpened": "Il n'existe actuellement aucun dossier ouvert à fermer dans cette instance.", "newWindow": "Nouvelle fenêtre", @@ -20,7 +17,7 @@ "zoomReset": "Réinitialiser le zoom", "appPerf": "Performance de démarrage", "reloadWindow": "Recharger la fenêtre", - "openRecent": "Ouvrir les éléments récents", + "current": "Fenêtre active", "folders": "dossiers", "files": "fichiers", "openRecentPlaceHolderMac": "Sélectionner un chemin (maintenir la touche Cmd enfoncée pour l'ouvrir dans une nouvelle fenêtre)", @@ -32,10 +29,6 @@ "openDocumentationUrl": "Documentation", "openIntroductoryVideosUrl": "Vidéos d'introduction", "toggleSharedProcess": "Activer/désactiver le processus partagé", - "navigateLeft": "Déplacer vers l'affichage à gauche", - "navigateRight": "Déplacer vers l'affichage à droite", - "navigateUp": "Déplacer vers l'affichage au-dessus", - "navigateDown": "Déplacer vers l'affichage en dessous", "increaseViewSize": "Augmenter la taille de l'affichage actuel", "decreaseViewSize": "Diminuer la taille de l'affichage actuel" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json index d1fbda145ce56..1d5619cef58d4 100644 --- a/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -31,10 +31,6 @@ "window.openFoldersInNewWindow.off": "Les dossiers remplacent la dernière fenêtre active", "window.openFoldersInNewWindow.default": "Les dossiers s'ouvrent dans une nouvelle fenêtre, sauf si un dossier est sélectionné depuis l'application (par exemple, via le menu Fichier)", "openFoldersInNewWindow": "Contrôle si les dossiers doivent s'ouvrir dans une nouvelle fenêtre ou remplacer la dernière fenêtre active.\n- default : les dossiers s'ouvrent dans une nouvelle fenêtre, sauf si un dossier est sélectionné depuis l'application (par exemple, via le menu Fichier)\n- on : les dossiers s'ouvrent dans une nouvelle fenêtre\n- off : les dossiers remplacent la dernière fenêtre active\nNotez que dans certains cas, ce paramètre est ignoré (par exemple, quand vous utilisez l'option de ligne de commande -new-window ou -reuse-window).", - "window.reopenFolders.none": "Permet de ne jamais rouvrir un dossier.", - "window.reopenFolders.one": "Permet de rouvrir le dernier dossier actif.", - "window.reopenFolders.all": "Permet de rouvrir tous les dossiers de la dernière session.", - "reopenFolders": "Contrôle la façon dont les dossiers sont rouverts après un redémarrage. Sélectionnez 'none' pour ne jamais rouvrir un dossier, 'one' pour rouvrir le dernier dossier utilisé, ou 'all' pour rouvrir tous les dossiers de votre dernière session.", "restoreFullscreen": "Contrôle si une fenêtre doit être restaurée en mode plein écran si elle a été fermée dans ce mode.", "zoomLevel": "Modifiez le niveau de zoom de la fenêtre. La taille d'origine est 0. Chaque incrément supérieur (exemple : 1) ou inférieur (exemple : -1) représente un zoom 20 % plus gros ou plus petit. Vous pouvez également entrer des décimales pour changer le niveau de zoom avec une granularité plus fine.", "title": "Contrôle le titre de la fenêtre en fonction de l'éditeur actif. Les variables sont remplacées en fonction du contexte :\n${activeEditorShort} : exemple : myFile.txt\n${activeEditorMedium} : exemple : myFolder/myFile.txt\n${activeEditorLong} : exemple : /Users/Development/myProject/myFolder/myFile.txt\n${rootName} : exemple : myProject\n${rootPath} : exemple : /Users/Development/myProject\n${appName} : exemple : VS Code\n${dirty} : indicateur d'intégrité si l'intégrité de l'éditeur actif est compromise\n${separator} : séparateur conditionnel (\" - \") qui s'affiche uniquement quand il est entouré de variables avec des valeurs", @@ -42,11 +38,13 @@ "window.newWindowDimensions.inherit": "Permet d'ouvrir les nouvelles fenêtres avec la même dimension que la dernière fenêtre active.", "window.newWindowDimensions.maximized": "Permet d'ouvrir les nouvelles fenêtres de manière agrandie.", "window.newWindowDimensions.fullscreen": "Permet d'ouvrir les nouvelles fenêtres en mode plein écran.", + "newWindowDimensions": "Contrôle les dimensions d'ouverture d'une nouvelle fenêtre quand au moins une fenêtre est déjà ouverte. Par défaut, une nouvelle fenêtre s'ouvre au centre de l'écran avec des dimensions réduites. Quand la valeur est 'inherit', la fenêtre a les mêmes dimensions que la dernière fenêtre active. Quand la valeur est 'maximized', la fenêtre s'ouvre dans sa taille maximale et quand la valeur est 'fullscreen', elle s'ouvre en mode plein écran. Notez que ce paramètre n'a aucun impact sur la première fenêtre ouverte, laquelle est toujours restaurée à la taille et l'emplacement définis au moment de sa fermeture.", "window.menuBarVisibility.default": "Le menu n'est masqué qu'en mode plein écran.", "window.menuBarVisibility.visible": "Le menu est toujours visible même en mode plein écran.", "window.menuBarVisibility.toggle": "Le menu est masqué mais il peut être affiché via la touche Alt.", "window.menuBarVisibility.hidden": "Le menu est toujours masqué.", "menuBarVisibility": "Contrôle la visibilité de la barre de menus. Le paramètre 'toggle' signifie que la barre de menus est masquée, et qu'une seule pression sur la touche Alt permet de l'afficher. Par défaut, la barre de menus est visible, sauf si la fenêtre est en mode plein écran.", + "enableMenuBarMnemonics": "S'ils sont activés, les menus principaux peuvent être ouverts via des raccourcis avec la touche Alt. La désactivation des mnémoniques permet plutôt de lier ces raccourcis avec la touche Alt aux commandes de l'éditeur.", "autoDetectHighContrast": "Si cette option est activée, le thème à contraste élevé est automatiquement choisi quand Windows utilise un thème à contraste élevé. À l'inverse, le thème sombre est automatiquement choisi quand Windows n'utilise plus le thème à contraste élevé.", "titleBarStyle": "Ajustez l'apparence de la barre de titre de la fenêtre. Vous devez effectuer un redémarrage complet pour que les changements soient appliqués.", "window.nativeTabs": "Active les onglets macOS Sierra. Notez que vous devez redémarrer l'ordinateur pour appliquer les modifications et que les onglets natifs désactivent tout style de barre de titre personnalisé configuré, le cas échéant.", @@ -56,5 +54,7 @@ "zenMode.hideTabs": "Contrôle si l'activation du mode Zen masque également les onglets du banc d'essai.", "zenMode.hideStatusBar": "Contrôle si l'activation du mode Zen masque également la barre d'état au bas du banc d'essai.", "zenMode.hideActivityBar": "Contrôle si l'activation du mode Zen masque également la barre d'activités à gauche du banc d'essai.", - "zenMode.restore": "Contrôle si une fenêtre doit être restaurée en mode zen, si elle a été fermée en mode zen." + "zenMode.restore": "Contrôle si une fenêtre doit être restaurée en mode zen, si elle a été fermée en mode zen.", + "workspaceConfigurationTitle": "Espace de travail", + "files.exclude.boolean": "Modèle Glob auquel les chemins de fichiers doivent correspondre. Affectez la valeur true ou false pour activer ou désactiver le modèle." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..a99450230b2d2 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "Définition du paramètre 'editor.accessibilitySupport' sur 'activé'.", + "openingDocs": "Ouverture de la page de documentation sur l'accessibilité dans VS Code.", + "introMsg": "Nous vous remercions de tester les options d'accessibilité de VS Code.", + "status": "État :", + "changeConfigToOnMac": "Pour configurer l'éditeur de sorte qu'il soit optimisé en permanence pour une utilisation avec un lecteur d'écran, appuyez sur Commande+E.", + "changeConfigToOnWinLinux": "Pour configurer l'éditeur de sorte qu'il soit optimisé en permanence pour une utilisation avec un lecteur d'écran, appuyez sur Ctrl+E.", + "auto_unknown": "L'éditeur est configuré pour utiliser les API de la plateforme afin de détecter si un lecteur d'écran est attaché, mais le runtime actuel ne prend pas en charge cette configuration.", + "auto_on": "L'éditeur a automatiquement détecté qu'un lecteur d'écran est attaché.", + "auto_off": "L'éditeur est configuré pour détecter automatiquement si un lecteur d'écran est attaché, ce qui n'est pas le cas pour le moment.", + "configuredOn": "L'éditeur est configuré de sorte qu'il soit optimisé en permanence pour une utilisation avec un lecteur d'écran. Vous pouvez changer ce comportement en modifiant le paramètre 'editor.accessibilitySupport'.", + "configuredOff": "L'éditeur est configuré de sorte à ne jamais être optimisé pour une utilisation avec un lecteur d'écran.", + "tabFocusModeOnMsg": "Appuyez sur Tab dans l'éditeur pour déplacer le focus vers le prochain élément pouvant être désigné comme élément actif. Activez ou désactivez ce comportement en appuyant sur {0}.", + "tabFocusModeOnMsgNoKb": "Appuyez sur Tab dans l'éditeur pour déplacer le focus vers le prochain élément pouvant être désigné comme élément actif. La commande {0} ne peut pas être déclenchée par une combinaison de touches.", + "tabFocusModeOffMsg": "Appuyez sur Tab dans l'éditeur pour insérer le caractère de tabulation. Activez ou désactivez ce comportement en appuyant sur {0}.", + "tabFocusModeOffMsgNoKb": "Appuyez sur Tab dans l'éditeur pour insérer le caractère de tabulation. La commande {0} ne peut pas être déclenchée par une combinaison de touches.", + "openDocMac": "Appuyez sur Commande+H pour ouvrir une fenêtre de navigateur contenant plus d'informations sur l'accessibilité dans VS Code.", + "openDocWinLinux": "Appuyez sur Ctrl+H pour ouvrir une fenêtre de navigateur contenant plus d'informations sur l'accessibilité dans VS Code.", + "outroMsg": "Vous pouvez masquer cette info-bulle et revenir à l'éditeur en appuyant sur Échap ou Maj+Échap.", + "ShowAccessibilityHelpAction": "Afficher l'aide sur l'accessibilité" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..a18dfa416d981 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Changer le modificateur multicurseur" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index 1783ec559cbd7..fd1a330f1c0af 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "Ouvrir {0}", "launchJsonNeedsConfigurtion": "Configurer ou corriger 'launch.json'", + "noFolderDebugConfig": "Ouvrez d'abord un dossier pour effectuer une configuration de débogage avancée.", "startDebug": "Démarrer le débogage", "startWithoutDebugging": "Exécuter sans débogage", "selectAndStartDebugging": "Sélectionner et démarrer le débogage", diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json index 8b6ad71cd4e6d..9ea33c457e4d9 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "noFolderDebugConfig": "Ouvrez d'abord un dossier pour effectuer une configuration de débogage avancée." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json index 810f2f0eab160..66ff22521aa35 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json @@ -5,16 +5,12 @@ // Do not edit this file. It is machine generated. { "variablesSection": "Section des variables", - "variables": "Variables", "variablesAriaTreeLabel": "Déboguer les variables", "expressionsSection": "Section des expressions", - "watch": "Espion", "watchAriaTreeLabel": "Déboguer les expressions espionnées", "callstackSection": "Section de pile des appels", "debugStopped": "En pause sur {0}", - "callStack": "Pile des appels", "callStackAriaLabel": "Déboguer la pile des appels", "breakpointsSection": "Section des points d'arrêt", - "breakpoints": "Points d'arrêt", "breakpointsAriaTreeLabel": "Déboguer les points d'arrêt" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index 213e8a8ab69b9..e963a7127e706 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "Copier la valeur", "copy": "Copier", + "copyAll": "Copier tout", "copyStackTrace": "Copier la pile des appels" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index ea381e994a065..b4fa3eab63698 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "Couleur d'arrière-plan de la barre d'état quand un programme est en cours de débogage. La barre d'état est affichée en bas de la fenêtre" + "statusBarDebuggingBackground": "Couleur d'arrière-plan de la barre d'état quand un programme est en cours de débogage. La barre d'état est affichée en bas de la fenêtre", + "statusBarDebuggingForeground": "Couleur de premier plan de la barre d'état quand un programme est en cours de débogage. La barre d'état est affichée en bas de la fenêtre" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/fra/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index b52cacf9ab292..8b0cfe2f540cb 100644 --- a/i18n/fra/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "L'exécutable d'adaptateur de débogage '{0}' n'existe pas.", "debugAdapterCannotDetermineExecutable": "Impossible de déterminer l'exécutable pour l'adaptateur de débogage '{0}'.", "debugType": "Type de configuration.", + "debugTypeNotRecognised": "Le type de débogage n'est pas reconnu. Vérifiez que vous avez installé l'extension de débogage correspondante et qu'elle est activée.", "node2NotSupported": "\"node2\" n'est plus pris en charge. Utilisez \"node\" à la place, et affectez la valeur \"inspector\" à l'attribut \"protocol\".", "debugName": "Le nom de la configuration s'affiche dans le menu déroulant de la configuration de lancement.", "debugRequest": "Type de requête de configuration. Il peut s'agir de \"launch\" ou \"attach\".", diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index a8c5798771114..ad194859cdcfe 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "previousEditPoint": "Emmet : Previous Edit Point", - "nextEditPoint": "Emmet : Next Edit Point" + "previousEditPoint": "Emmet : Go to Previous Edit Point", + "nextEditPoint": "Emmet : Go to Next Edit Point" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 33db3866d0c12..3bd0a45f5943a 100644 --- a/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -9,5 +9,6 @@ "emmetPreferences": "Préférences utilisées pour modifier le comportement de certaines actions et résolveurs d'Emmet.", "emmetSyntaxProfiles": "Définissez le profil pour la syntaxe spécifiée ou utilisez votre propre profil avec des règles spécifiques.", "emmetExclude": "Ensemble de langages où les abréviations emmet ne doivent pas être développées.", - "emmetExtensionsPath": "Chemin d'un dossier contenant les profils, extraits et préférences Emmet" + "emmetExtensionsPath": "Chemin d'un dossier contenant les profils, extraits et préférences Emmet", + "useNewEmmet": "Essayez les nouveaux modules Emmet (qui remplaceront à terme l'ancienne bibliothèque Emmet) pour toutes les fonctionnalités Emmet." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 5dd842e57ef7f..df8369170ce58 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,10 @@ "default": "Par défaut", "debuggers": "Débogueurs ({0})", "debugger name": "Nom", + "views": "Vues ({0})", + "view id": "ID", + "view name": "Nom", + "view location": "Emplacement", "themes": "Thèmes ({0})", "JSON Validation": "Validation JSON ({0})", "commands": "Commandes ({0})", diff --git a/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 5b7a7ecda7f31..0112a21db366d 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,6 +22,8 @@ "disableGloballyAction": "Toujours", "disableAction": "Désactiver", "checkForUpdates": "Rechercher les mises à jour", + "enableAutoUpdate": "Activer la mise à jour automatique des extensions", + "disableAutoUpdate": "Désactiver la mise à jour automatique des extensions", "updateAll": "Mettre à jour toutes les extensions", "reloadAction": "Recharger", "postUpdateTooltip": "Recharger pour mettre à jour", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "Afficher les extensions recommandées pour l'espace de travail", "showRecommendedKeymapExtensions": "Afficher les mappages de touches recommandés", "showRecommendedKeymapExtensionsShort": "Mappages de touches", + "showLanguageExtensions": "Afficher les extensions de langage", + "showLanguageExtensionsShort": "Extensions de langage", "configureWorkspaceRecommendedExtensions": "Configurer les extensions recommandées (espace de travail)", "ConfigureWorkspaceRecommendations.noWorkspace": "Les recommandations ne sont disponibles que pour un dossier d'espace de travail.", "OpenExtensionsFile.failed": "Impossible de créer le fichier 'extensions.json' dans le dossier '.vscode' ({0}).", @@ -51,5 +55,8 @@ "disableAll": "Désactiver toutes les extensions installées", "disableAllWorkspace": "Désactiver toutes les extensions installées pour cet espace de travail", "enableAll": "Activer toutes les extensions installées", - "enableAllWorkspace": "Activer toutes les extensions installées pour cet espace de travail" + "enableAllWorkspace": "Activer toutes les extensions installées pour cet espace de travail", + "extensionButtonProminentBackground": "Couleur d'arrière-plan du bouton pour les extension d'actions importantes (par ex., le bouton d'installation).", + "extensionButtonProminentForeground": "Couleur d'arrière-plan du bouton pour l'extension d'actions importantes (par ex., le bouton d'installation).", + "extensionButtonProminentHoverBackground": "Couleur d'arrière-plan du pointage de bouton pour l'extension d'actions importantes (par ex., le bouton d'installation)." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index c4a2f4bc59dbe..ba4825598d4c7 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -9,6 +9,8 @@ "neverShowAgain": "Ne plus afficher", "close": "Fermer", "workspaceRecommended": "Cet espace de travail a des recommandations d'extension.", + "ignoreExtensionRecommendations": "Voulez-vous ignorer toutes les recommandations d'extension ?", + "ignoreAll": "Oui, ignorer tout", "no": "Non", "cancel": "Annuler" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 89edbc50c8928..be819e14deb67 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -10,5 +10,6 @@ "extensions": "Extensions", "view": "Affichage", "extensionsConfigurationTitle": "Extensions", - "extensionsAutoUpdate": "Mettre à jour automatiquement les extensions" + "extensionsAutoUpdate": "Mettre à jour automatiquement les extensions", + "extensionsIgnoreRecommendations": "Ignorer les recommandations d'extension" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 8fa1a11d54a58..3eea012e3732d 100644 --- a/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,8 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "disableOtherKeymapsConfirmation": "Désactiver les autres mappages de touches ({0}) pour éviter les conflits de combinaisons de touches ?", "yes": "Oui", "no": "Non", + "betterMergeDisabled": "L'extension Better Merge est désormais intégrée, l'extension installée est désactivée et peut être désinstallée.", "uninstall": "Désinstaller", "later": "Plus tard" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 6f916235625b1..2416f91e4c10f 100644 --- a/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,6 +16,7 @@ "associations": "Configurez les associations entre les fichiers et les langages (par exemple, \"*.extension\": \"html\"). Celles-ci ont priorité sur les associations par défaut des langages installés.", "encoding": "Encodage du jeu de caractères par défaut à utiliser durant la lecture et l'écriture des fichiers.", "autoGuessEncoding": "Quand cette option est activée, tente de deviner l'encodage du jeu de caractères à l'ouverture des fichiers", + "eol": "Caractère de fin de ligne par défaut. Utilisez \\n pour LF et \\r\\n pour CRLF.", "trimTrailingWhitespace": "Si l'option est activée, l'espace blanc de fin est supprimé au moment de l'enregistrement d'un fichier.", "insertFinalNewline": "Quand l'option est activée, une nouvelle ligne finale est insérée à la fin du fichier au moment de son enregistrement.", "files.autoSave.off": "Un fichier dont l'intégrité est compromise n'est jamais enregistré automatiquement.", @@ -26,6 +27,7 @@ "autoSaveDelay": "Contrôle le délai en ms au bout duquel un fichier à l'intégrité compromise est enregistré automatiquement. S'applique uniquement quand 'files.autoSave' a la valeur '{0}'", "watcherExclude": "Configurez les modèles Glob des chemins de fichiers à exclure de la surveillance des fichiers. La modification de ce paramètre nécessite un redémarrage. Si vous constatez que le code consomme beaucoup de temps processeur au démarrage, excluez les dossiers volumineux pour réduire la charge initiale.", "hotExit.off": "Désactivez la sortie à chaud.", + "hotExit.onExit": "La sortie à chaud se déclenche à la fermeture de l'application, c'est-à-dire quand la dernière fenêtre est fermée dans Windows/Linux, ou quand la commande workbench.action.quit est déclenchée (palette de commandes, combinaison de touches, menu). Toutes les fenêtres avec des sauvegardes sont restaurées au prochain lancement.", "hotExit": "Contrôle si les fichiers non enregistrés sont mémorisés entre les sessions, ce qui permet d'ignorer la demande d'enregistrement à la sortie de l'éditeur.", "defaultLanguage": "Mode de langage par défaut affecté aux nouveaux fichiers.", "editorConfigurationTitle": "Éditeur", diff --git a/i18n/fra/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/fra/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index 3b4a98a5b1ac2..3e9166e1c44ea 100644 --- a/i18n/fra/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -5,7 +5,5 @@ // Do not edit this file. It is machine generated. { "explorerSection": "Section de l'Explorateur de fichiers", - "noWorkspace": "Aucun dossier ouvert", - "noWorkspaceHelp": "Vous n'avez pas encore ouvert de dossier.", "openFolder": "Ouvrir le dossier" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/fra/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index 049ecf726f012..edcca33816cda 100644 --- a/i18n/fra/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "Section des éditeurs ouverts", "openEditors": "Éditeurs ouverts", + "openEditosrSection": "Section des éditeurs ouverts", "treeAriaLabel": "Éditeurs ouverts : liste des fichiers actifs", "dirtyCounter": "{0} non enregistré(s)" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 56c9603dba733..13b60d7dd5c53 100644 --- a/i18n/fra/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -9,5 +9,7 @@ "prof.message": "Création réussie des profils.", "prof.detail": "Créez un problème et joignez manuellement les fichiers suivants :\n{0}", "prof.restartAndFileIssue": "Créer le problème et redémarrer", - "prof.restart": "Redémarrer" + "prof.restart": "Redémarrer", + "prof.thanks": "Merci de votre aide.", + "prof.detail.restart": "Un redémarrage final est nécessaire pour continuer à utiliser '{0}'. Nous vous remercions une fois de plus pour votre contribution." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 0a1d06c06efe6..0fa91c30616a0 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "Définir une combinaison de touches", - "defineKeybinding.kbLayoutErrorMessage": "Vous ne pouvez pas produire cette combinaison de touches avec la disposition actuelle du clavier." + "defineKeybinding.kbLayoutErrorMessage": "Vous ne pouvez pas produire cette combinaison de touches avec la disposition actuelle du clavier.", + "defineKeybinding.kbLayoutLocalAndUSMessage": "**{0}** pour votre disposition actuelle du clavier (**{1}** pour le clavier États-Unis standard).", + "defineKeybinding.kbLayoutLocalMessage": "**{0}** pour votre disposition actuelle du clavier." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 6d2534d7624c3..26f2edae5fef7 100644 --- a/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "Impossible d'écrire les paramètres. Corrigez les erreurs/avertissements présents dans le fichier, puis réessayez.", "editTtile": "Modifier", "replaceDefaultValue": "Remplacer dans les paramètres", "copyDefaultValue": "Copier dans Paramètres", diff --git a/i18n/fra/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/fra/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index 54c588725ce40..261570184f127 100644 --- a/i18n/fra/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "Afficher toutes les commandes", + "showCommands.label": "Palette de commandes...", "entryAriaLabelWithKey": "{0}, {1}, commandes", "entryAriaLabel": "{0}, commandes", "canNotRun": "La commande '{0}' ne peut pas être exécutée à partir d'ici.", diff --git a/i18n/fra/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..35b4553577f00 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchMessage": "Un paramètre a changé et nécessite un redémarrage pour être appliqué.", + "relaunchDetail": "Appuyez sur le bouton de redémarrage pour redémarrer {0} et activer le paramètre.", + "restart": "Redémarrer" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/fra/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json index 8b6ad71cd4e6d..3fe2c3e213dbe 100644 --- a/i18n/fra/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "editorGutterModifiedBackground": "Couleur d'arrière-plan de la reliure de l'éditeur pour les lignes modifiées.", + "editorGutterAddedBackground": "Couleur d'arrière-plan de la reliure de l'éditeur pour les lignes ajoutées.", + "editorGutterDeletedBackground": "Couleur d'arrière-plan de la reliure de l'éditeur pour les lignes supprimées." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index 015c5898f64a1..50606f11e00f0 100644 --- a/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "Afficher Git", + "installAdditionalSCMProviders": "Installer des fournisseurs SCM supplémentaires...", "source control": "Contrôle de code source", "toggleSCMViewlet": "Afficher SCM", "view": "Afficher" diff --git a/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index 28a54af77fa66..90044a6bbbc57 100644 --- a/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "Installer des fournisseurs SCM supplémentaires...", "switch provider": "Changer de fournisseur GCL..." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/fra/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index b89dba6f17f9e..052e41c13ac83 100644 --- a/i18n/fra/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,5 +6,7 @@ { "searchMatches": "{0} correspondances trouvées", "searchMatch": "{0} correspondance trouvée", - "fileMatchAriaLabel": "{0} correspondances dans le fichier {1} du dossier {2}, Résultat de la recherche" + "fileMatchAriaLabel": "{0} correspondances dans le fichier {1} du dossier {2}, Résultat de la recherche", + "replacePreviewResultAria": "Remplacer le terme {0} par {1} à la position de colonne {2} dans la ligne avec le texte {3}", + "searchResultAria": "Terme {0} trouvé à la position de colonne {1} dans la ligne avec le texte {2}" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 379815030a8ed..ce5cfc948495d 100644 --- a/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -9,5 +9,6 @@ "vscode.extension.contributes.snippets-path": "Chemin du fichier d'extraits de code. Le chemin est relatif au dossier d'extensions et commence généralement par './snippets/'.", "invalid.language": "Langage inconnu dans 'contributes.{0}.language'. Valeur fournie : {1}", "invalid.path.0": "Chaîne attendue dans 'contributes.{0}.path'. Valeur fournie : {1}", - "invalid.path.1": "'contributes.{0}.path' ({1}) est censé être inclus dans le dossier ({2}) de l'extension. Cela risque de rendre l'extension non portable." + "invalid.path.1": "'contributes.{0}.path' ({1}) est censé être inclus dans le dossier ({2}) de l'extension. Cela risque de rendre l'extension non portable.", + "badVariableUse": "L'extrait de code \"{0}\" confond très probablement les variables et les espaces réservés d'extrait de code. Consultez https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax pour plus d'informations." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index 0b77278c9389a..af0ca524f41df 100644 --- a/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "Extrait de code vide", "snippetSchema.json": "Configuration de l'extrait de code utilisateur", "snippetSchema.json.prefix": "Préfixe à utiliser durant la sélection de l'extrait de code dans IntelliSense", - "snippetSchema.json.body": "Contenu de l'extrait de code. Utilisez '${id}', '${id:label}', '${1:label}' pour les variables, et '$0', '$1' pour les positions du curseur", + "snippetSchema.json.body": "Contenu de l'extrait de code. Utilisez '$1', '${1:defaultText}' pour définir les positions du curseur, utilisez '$0' pour la position finale du curseur. Insérez les valeurs de variable avec '${varName}' et '${varName:defaultText}', par ex., 'Il s'agit du fichier : $TM_FILENAME'.", "snippetSchema.json.description": "Description de l'extrait de code." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..b68d1b3bcbbf2 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "Aidez-nous à améliorer le support de {0}", + "takeShortSurvey": "Répondre à une enquête rapide", + "remindLater": "Me le rappeler plus tard", + "neverAgain": "Ne plus afficher" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..18c8f1427ffb0 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Acceptez-vous de répondre à une enquête rapide ?", + "takeSurvey": "Répondre à l'enquête", + "remindLater": "Me le rappeler plus tard", + "neverAgain": "Ne plus afficher" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..c4f5420f0963b --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "Aucune tâche correspondante" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index c0432625724e1..34aab6d5ccf35 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks" + "entryAriaLabel": "{0}, tasks", + "customizeTask": "Personnaliser la tâche" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..c4f5420f0963b --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "Aucune tâche correspondante" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 5c565fd63896a..cfdcd7341c0d1 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -12,5 +12,6 @@ "ConfigurationParser.invalidVaraibleReference": "Erreur : référence à problemMatcher non valide : {0}\n", "ConfigurationParser.noTaskName": "Erreur : les tâches doivent fournir une propriété taskName. La tâche va être ignorée.\n{0}\n", "taskConfiguration.shellArgs": "Avertissement : La tâche '{0}' est une commande d'interpréteur de commandes, et le nom de la commande ou l'un de ses arguments contient des espaces non précédés d'un caractère d'échappement. Pour garantir une ligne de commande correcte, fusionnez les arguments dans la commande.", + "taskConfiguration.noCommandOrDependsOn": "Erreur : La tâche '{0}' ne spécifie ni une commande, ni une propriété dependsOn. La tâche est ignorée. Sa définition est :\n{1}", "taskConfiguration.noCommand": "Erreur : La tâche '{0}' ne définit aucune commande. La tâche va être ignorée. Sa définition est :\n{1}" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index f9b47cd0ac4cf..4a1e27d2714b1 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "Options de commande supplémentaires", "JsonSchema.options.cwd": "Répertoire de travail actif du programme ou script exécuté. En cas d'omission, la racine de l'espace de travail actif de Code est utilisée.", "JsonSchema.options.env": "Environnement du programme ou de l'interpréteur de commandes exécuté. En cas d'omission, l'environnement du processus parent est utilisé.", + "JsonSchema.shellConfiguration": "Configure l'interpréteur de commandes à utiliser.", "JsonSchema.shell.executable": "Interpréteur de commandes à utiliser.", "JsonSchema.shell.args": "Arguments de l'interpréteur de commandes.", "JsonSchema.command": "Commande à exécuter. Il peut s'agir d'un programme externe ou d'une commande d'interpréteur de commandes.", diff --git a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index c2cb490358eee..d125a6f5534f4 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "Numéro de version de la configuration", + "JsonSchema._runner": "Le runner est dégradé. Utiliser la propriété runner officielle", + "JsonSchema.runner": "Définit si la tâche est exécutée sous forme de processus, et si la sortie s'affiche dans la fenêtre de sortie ou dans le terminal.", "JsonSchema.windows": "Configuration de commande spécifique à Windows", "JsonSchema.mac": "Configuration de commande spécifique à Mac", "JsonSchema.linux": "Configuration de commande spécifique à Linux", diff --git a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index c95ac82e6a87e..7df99994e1847 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -7,6 +7,10 @@ "JsonSchema.shell": "Spécifie si la commande est une commande d'interpréteur de commandes ou un programme externe. La valeur par défaut est false, en cas d'omission.", "JsonSchema.tasks.dependsOn.string": "Autre tâche dont cette tâche dépend.", "JsonSchema.tasks.dependsOn.array": "Autres tâches dont cette tâche dépend.", + "JsonSchema.tasks.group": "Définit le groupe d'exécution auquel la tâche appartient. En cas d'omission, la tâche n'appartient à aucun groupe.", + "JsonSchema.tasks.type": "Définit si la tâche est exécutée sous forme de processus ou d'une commande d'un interpréteur de commandes. La valeur par défaut est un processus.", + "JsonSchema.version": "Numéro de version de la configuration.", + "JsonSchema.tasks.customize": "Tâche ajoutée à personnaliser.", "JsonSchema.windows": "Configuration de commande spécifique à Windows", "JsonSchema.mac": "Configuration de commande spécifique à Mac", "JsonSchema.linux": "Configuration de commande spécifique à Linux" diff --git a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index e59f5fcb09a77..f406beb28c885 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -18,10 +18,12 @@ "problems": "Problèmes", "manyMarkers": "99", "tasks": "Tâches", + "TaskSystem.noHotSwap": "Le changement du moteur d'exécution de tâches nécessite le redémarrage de VS Code. Changement ignoré.", "TaskService.noBuildTask": "Aucune tâche de build définie. Marquez une tâche avec 'isBuildCommand' dans le fichier tasks.json.", "TaskService.noTestTask": "Aucune tâche de test définie. Marquez une tâche avec 'isTestCommand' dans le fichier tasks.json.", "TaskServer.noTask": "La tâche {0} à exécuter est introuvable.", - "TaskSystem.activeSame": "La tâche est déjà active et en mode espion. Pour terminer la tâche, utilisez 'F1 > terminer la tâche'", + "customizeParseErrors": "La configuration de tâche actuelle contient des erreurs. Corrigez-les avant de personnaliser une tâche. ", + "moreThanOneBuildTask": "De nombreuses tâches de génération sont définies dans le fichier tasks.json. Exécution de la première.\n", "TaskSystem.active": "Une tâche est déjà en cours d'exécution. Terminez-la avant d'exécuter une autre tâche.", "TaskSystem.restartFailed": "Échec de la fin de l'exécution de la tâche {0}", "TaskSystem.configurationErrors": "Erreur : la configuration de tâche fournie comporte des erreurs de validation et ne peut pas être utilisée. Corrigez d'abord les erreurs.", diff --git a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 32ff4c480d3b6..413680671bf49 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,7 @@ { "TerminalTaskSystem.unknownError": "Une erreur inconnue s'est produite durant l'exécution d'une tâche. Pour plus d'informations, consultez le journal de sortie des tâches.", "TerminalTaskSystem.terminalName": "Tâche - {0}", - "TerminalTaskSystem": "Impossible d'exécuter une commande d'interpréteur de commandes sur un lecteur UNC." + "reuseTerminal": "Le terminal sera réutilisé par les tâches, appuyez sur une touche pour le fermer.", + "TerminalTaskSystem": "Impossible d'exécuter une commande d'interpréteur de commandes sur un lecteur UNC.", + "unkownProblemMatcher": "Impossible de résoudre le détecteur de problèmes {0}. Le détecteur est ignoré" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/fra/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index a2ea447d1055a..50a093077839a 100644 --- a/i18n/fra/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "Une erreur inconnue s'est produite durant l'exécution d'une tâche. Pour plus d'informations, consultez le journal de sortie des tâches.", "TaskRunnerSystem.watchingBuildTaskFinished": "\nFin du suivi des tâches de génération.", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\nThe task '{0}' was terminated per user request." + "TaskRunnerSystem.cancelRequested": "\nThe task '{0}' was terminated per user request.", + "unkownProblemMatcher": "Impossible de résoudre le détecteur de problèmes {0}. Le détecteur est ignoré" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index fdfee189e15bd..b2f5634cfe83e 100644 --- a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -8,6 +8,7 @@ "workbench.action.terminal.kill": "Tuer l'instance active du terminal", "workbench.action.terminal.kill.short": "Tuer le terminal", "workbench.action.terminal.copySelection": "Copier la sélection", + "workbench.action.terminal.selectAll": "Tout Sélectionner", "workbench.action.terminal.new": "Créer un terminal intégré", "workbench.action.terminal.new.short": "Nouveau terminal", "workbench.action.terminal.focus": "Focus sur le terminal", @@ -26,5 +27,8 @@ "workbench.action.terminal.scrollUp": "Faire défiler vers le haut (ligne)", "workbench.action.terminal.scrollUpPage": "Faire défiler vers le haut (page)", "workbench.action.terminal.scrollToTop": "Faire défiler jusqu'en haut", - "workbench.action.terminal.clear": "Effacer" + "workbench.action.terminal.clear": "Effacer", + "workbench.action.terminal.allowWorkspaceShell": "Autoriser la configuration de l'interpréteur de commandes de l'espace de travail", + "workbench.action.terminal.disallowWorkspaceShell": "Interdire la configuration de l'interpréteur de commandes de l'espace de travail", + "workbench.action.terminal.rename": "Renommer" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index 24d7761697ecc..2a639927b494a 100644 --- a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "Couleur d'arrière-plan du terminal, permet d'appliquer au terminal une couleur différente de celle du panneau.", + "terminal.foreground": "Couleur de premier plan du terminal.", "terminal.ansiColor": "Couleur ansi '{0}' dans le terminal." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..6183484b59cad --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Rechercher", + "placeholder.find": "Rechercher", + "label.previousMatchButton": "Correspondance précédente", + "label.nextMatchButton": "Correspondance suivante", + "label.closeButton": "Fermer" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index e783aa11ec074..1129e824638a8 100644 --- a/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "Impossible de copier la sélection du terminal quand il n'a pas le focus", "terminal.integrated.exitedWithCode": "Le processus du terminal s'est achevé avec le code de sortie {0}", "terminal.integrated.waitOnExit": "Appuyez sur une touche pour fermer le terminal", "terminal.integrated.launchFailed": "Échec du lancement de la commande de traitement du terminal '{0}{1}' (code de sortie : {2})" diff --git a/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 515d4f6f9c586..ae4ba496061e0 100644 --- a/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,6 +6,7 @@ { "selectTheme.label": "Thème de couleur", "installColorThemes": "Installer des thèmes de couleurs supplémentaires...", + "themes.selectTheme": "Sélectionner un thème de couleur (flèches bas/haut pour afficher l'aperçu)", "selectIconTheme.label": "Thème d'icône de fichier", "installIconThemes": "Installer des thèmes d'icônes de fichiers supplémentaires...", "noIconThemeLabel": "Aucun", diff --git a/i18n/fra/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/fra/src/vs/workbench/parts/update/electron-browser/update.i18n.json index 641b395e494d6..9f0475f53b413 100644 --- a/i18n/fra/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -15,5 +15,18 @@ "license": "Lire la licence", "updateAvailable": "{0} sera mis à jour après avoir redémarré.", "thereIsUpdateAvailable": "Une mise à jour est disponible.", - "noUpdatesAvailable": "Aucune mise à jour n'est disponible actuellement." + "noUpdatesAvailable": "Aucune mise à jour n'est disponible actuellement.", + "updateIsReady": "Nouvelle mise à jour disponible.", + "commandPalette": "Palette de commandes...", + "settings": "Paramètres", + "keyboardShortcuts": "Raccourcis clavier", + "selectTheme.label": "Thème de couleur", + "themes.selectIconTheme.label": "Thème d'icône de fichier", + "not available": "Mises à jour non disponibles", + "checkingForUpdates": "Recherche des mises à jour...", + "DownloadUpdate": "Télécharger la mise à jour disponible", + "DownloadingUpdate": "Téléchargement de la mise à jour...", + "InstallingUpdate": "Installation de la mise à jour...", + "restartToUpdate": "Redémarrer pour mettre à jour...", + "checkForUpdates": "Rechercher les mises à jour..." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/fra/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..4868e0b0e1194 --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} actions" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/fra/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..792b28b26828d --- /dev/null +++ b/i18n/fra/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "les vues doivent figurer dans un tableau", + "requirestring": "la propriété '{0}' est obligatoire et doit être de type 'string'", + "optstring": "La propriété '{0}' peut être omise ou doit être de type 'string'", + "vscode.extension.contributes.view.id": "Identificateur de la vue. Utilisez-le pour inscrire un fournisseur de données au moyen de l'API 'vscode.window.registerTreeDataProviderForView', ainsi que pour déclencher l'activation de votre extension en inscrivant l'événement 'onView:${id}' dans 'activationEvents'.", + "vscode.extension.contributes.view.name": "Nom de la vue, contrôlable de visu. Affiché", + "vscode.extension.contributes.views": "Ajoute des vues à l'éditeur", + "views.explorer": "Mode Explorateur", + "locationId.invalid": "'{0}' n'est pas un emplacement de vue valide" +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 88d26394dcf40..97f83a61230f5 100644 --- a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,20 +11,26 @@ "welcomePage.openFolder": "Ouvrir un dossier...", "welcomePage.cloneGitRepository": "Cloner le dépôt Git...", "welcomePage.recent": "Récent", + "welcomePage.moreRecent": "Plus...", "welcomePage.noRecentFolders": "Aucun dossier récent", "welcomePage.help": "Aide", + "welcomePage.keybindingsCheatsheet": "Fiche de révision du clavier imprimable", "welcomePage.introductoryVideos": "Vidéos d'introduction", "welcomePage.productDocumentation": "Documentation du produit", "welcomePage.gitHubRepository": "Dépôt GitHub", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Afficher la page d'accueil au démarrage", "welcomePage.customize": "Personnaliser", + "welcomePage.installExtensionPacks": "Outils et langages", + "welcomePage.installExtensionPacksDescription": "Installer un support pour {0} et {1}", + "welcomePage.moreExtensions": "plus", "welcomePage.installKeymapDescription": "Installer les raccourcis clavier", + "welcomePage.installKeymapExtension": "Installer les raccourcis clavier de {0} et {1}", "welcomePage.others": "autres", "welcomePage.colorTheme": "Thème de couleur", "welcomePage.colorThemeDescription": "Personnalisez l'apparence de l'éditeur et de votre code", + "welcomePage.learn": "Apprendre", "welcomePage.showCommands": "Rechercher et exécuter toutes les commandes", - "welcomePage.showCommandsDescription": "Utilisez et recherchez rapidement des commandes dans le Panneau de configuration ({0})", "welcomePage.interfaceOverview": "Vue d'ensemble de l'interface", "welcomePage.interfaceOverviewDescription": "Obtenez une superposition visuelle mettant en évidence les principaux composants de l'IU", "welcomePage.interactivePlayground": "Terrain de jeu interactif", diff --git a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index 8cf53ce388ea5..b3c44c1bab1e5 100644 --- a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbenchConfigurationTitle": "Banc d'essai", - "welcomePage.enabled": "Quand cette option est activée, la page de bienvenue s'affiche au démarrage.", "help": "Aide" } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 66bb9f2ab6628..9f2d8bfccaf26 100644 --- a/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -4,17 +4,35 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "workbenchConfigurationTitle": "Banc d'essai", + "welcomePage.enabled": "Quand cette option est activée, la page de bienvenue s'affiche au démarrage.", "welcomePage": "Bienvenue", + "welcomePage.javaScript": "JavaScript", "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", "welcomePage.vim": "Vim", "welcomePage.sublime": "Sublime", "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "Le support pour {0} est déjà installé.", + "welcomePage.willReloadAfterInstallingExtensionPack": "La fenêtre se recharge après l'installation d'un support supplémentaire pour {0}.", + "welcomePage.installingExtensionPack": "Installation d'un support supplémentaire pour {0}...", + "welcomePage.extensionPackNotFound": "Le support pour {0} avec l'ID {1} est introuvable.", "welcomePage.keymapAlreadyInstalled": "Les raccourcis clavier {0} sont déjà installés.", "welcomePage.willReloadAfterInstallingKeymap": "La fenêtre se recharge après l'installation des raccourcis clavier {0}.", "welcomePage.installingKeymap": "Installation des raccourcis clavier de {0}...", "welcomePage.keymapNotFound": "Les raccourcis clavier {0} ayant l'ID {1} sont introuvables.", "welcome.title": "Bienvenue", + "welcomePage.openFolderWithPath": "Ouvrir le dossier {0} avec le chemin {1}", + "welcomePage.extensionListSeparator": ", ", + "welcomePage.installKeymap": "Installer le mappage de touches {0}", + "welcomePage.installExtensionPack": "Installer un support supplémentaire pour {0} ", + "welcomePage.installedKeymap": "Le mappage de touches '{0}' est déjà installé", + "welcomePage.installedExtensionPack": "Le support {0} est déjà installé.", "ok": "OK", - "cancel": "Annuler" + "details": "Détails", + "cancel": "Annuler", + "welcomePage.buttonBackground": "Couleur d'arrière-plan des boutons de la page d'accueil.", + "welcomePage.buttonHoverBackground": "Couleur d'arrière-plan du pointage des boutons de la page d'accueil." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/fra/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index a27dad756b16e..4fd64e5f282e1 100644 --- a/i18n/fra/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/fra/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "walkThrough.unboundCommand": "indépendant", - "walkThrough.gitNotFound": "Git semble ne pas être installé sur votre système." + "walkThrough.gitNotFound": "Git semble ne pas être installé sur votre système.", + "walkThrough.embeddedEditorBackground": "Couleur d'arrière-plan des éditeurs incorporés dans le terrain de jeu interactif." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/fra/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 8c86edbfa4038..1e0860c2647e9 100644 --- a/i18n/fra/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/fra/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -6,6 +6,12 @@ { "open": "Ouvrir les paramètres", "close": "Fermer", + "saveAndRetry": "Enregistrer les paramètres et recommencer", "errorUnknownKey": "Impossible d'écrire dans le fichier de configuration (clé inconnue)", - "errorInvalidTarget": "Impossible d'écrire dans le fichier config (cible non valide)" + "errorInvalidTarget": "Impossible d'écrire dans le fichier config (cible non valide)", + "errorNoWorkspaceOpened": "Impossible d'écrire les paramètres, car aucun dossier n'est ouvert. Ouvrez d'abord un dossier, puis réessayez.", + "errorInvalidConfiguration": "Impossible d'écrire les paramètres. Ouvrez les **Paramètres utilisateur** pour corriger les erreurs/avertissements présents dans le fichier, puis réessayez.", + "errorInvalidConfigurationWorkspace": "Impossible d'écrire les paramètres. Ouvrez les **Paramètres d'espace de travail** pour corriger les erreurs/avertissements présents dans le fichier, puis réessayez.", + "errorConfigurationFileDirty": "Impossible d'écrire les paramètres, car l'intégrité du fichier est compromise. Enregistrez le fichier des **Paramètres utilisateur**, puis réessayez.", + "errorConfigurationFileDirtyWorkspace": "Impossible d'écrire les paramètres, car l'intégrité du fichier est compromise. Enregistrez le fichier des **Paramètres d'espace de travail**, puis réessayez." } \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/fra/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..42bafb09091ba --- /dev/null +++ b/i18n/fra/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Télémétrie", + "telemetry.enableCrashReporting": "Activez l'envoi de rapports d'incidents à Microsoft.\nCette option nécessite un redémarrage pour être prise en compte." +} \ No newline at end of file diff --git a/i18n/fra/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/fra/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..541b82ff55a2e --- /dev/null +++ b/i18n/fra/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0} : {1}" +} \ No newline at end of file diff --git a/i18n/hun/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/hun/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json new file mode 100644 index 0000000000000..7521c58758cb8 --- /dev/null +++ b/i18n/hun/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "activeEditorShort": "pl.: myFile.txt", + "activeEditorMedium": "pl.: myFolder/myFile.txt", + "activeEditorLong": "pl.: /Users/Development/myProject/myFolder/myFile.txt", + "rootName": "pl.: myProject", + "rootPath": "pl.: /Users/Development/myProject", + "appName": "pl.: VS Code", + "dirty": "módosításjelző, ami akkor jelenik meg, ha az aktív szerkesztőablak tartalma módosítva lett", + "separator": "egy feltételes elválasztó (' - '), ami akkor jelenik meg, ha olyan változókkal van körülvéve, amelyeknek van értéke", + "assocLabelFile": "Fájlok kiterjesztésekkel", + "assocDescriptionFile": "A megadott azonosítójú nyelvhez tartozó glob mintának megfelelő fájlok feltérképezése.", + "assocLabelPath": "Fájlok elérési úttal", + "assocDescriptionPath": "A megadott azonosítójú nyelvhez tartozó abszolút elérési utas glob mintának megfelelő fájlok feltérképezése.", + "fileLabel": "Fájlok kiterjesztés szerint", + "fileDescription": "Adott kiterjesztéssel rendelkező fájlok keresése.", + "filesLabel": "Fájlok több kiterjesztés szerint", + "filesDescription": "A megadott kiterjesztések bármelyikével rendelkező fájlok keresése.", + "derivedLabel": "Testvérekkel rendelkező fájlok név szerint", + "derivedDescription": "Olyan fájlok keresése, amelyek azonos nevű, de különböző kiterjesztésű testvérekkel rendelkeznek.", + "topFolderLabel": "Mappák név szerint (legfelső szinten)", + "topFolderDescription": "Adott névvel rendelkező, legfelső szintű mappák keresése", + "topFoldersLabel": "Fájlok több név szerint (legfelső szinten)", + "topFoldersDescription": "Több legfelső szintű mappa keresése.", + "folderLabel": "Mappa név szerint (bármely helyen)", + "folderDescription": "Adott névvel rendelkező mappa keresése helytől függetlenül.", + "falseDescription": "A minta letiltása.", + "trueDescription": "A minta engedélyezése.", + "siblingsDescription": "Olyan fájlok keresése, amelyek azonos nevű, de különböző kiterjesztésű testvérekkel rendelkeznek.", + "languageSpecificEditorSettings": "Nyelvspecifikus szerkesztőbeállítások", + "languageSpecificEditorSettingsDescription": "A szerkesztő beállításainak felülírása az adott nyelvre vonatkozóan" +} \ No newline at end of file diff --git a/i18n/hun/extensions/css/client/out/cssMain.i18n.json b/i18n/hun/extensions/css/client/out/cssMain.i18n.json new file mode 100644 index 0000000000000..ded2c0dd4761a --- /dev/null +++ b/i18n/hun/extensions/css/client/out/cssMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cssserver.name": "CSS nyelvi szerver" +} \ No newline at end of file diff --git a/i18n/hun/extensions/css/package.i18n.json b/i18n/hun/extensions/css/package.i18n.json new file mode 100644 index 0000000000000..5f6b8a4014be0 --- /dev/null +++ b/i18n/hun/extensions/css/package.i18n.json @@ -0,0 +1,67 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "css.lint.argumentsInColorFunction.desc": "Nem megfelelő számú paraméter", + "css.lint.boxModel.desc": "A width és a height tulajdonság kerülése a padding és a border tulajdonság használata esetén", + "css.lint.compatibleVendorPrefixes.desc": "Gyártóspecifikus előtag használata esetén minden más gyártóspecifikus tulajdonságot is meg kell adni", + "css.lint.duplicateProperties.desc": "Duplikált stílusdefiníciók kerülése", + "css.lint.emptyRules.desc": "Üres szabályhalmazok kerülése", + "css.lint.float.desc": "A float tulajdonságérték kerülése, mivel könnyen váratlan eredményt idézhet elő az elrendezés változásakor.", + "css.lint.fontFaceProperties.desc": "A @font-face szabályokban az src és a font-family tulajdonságot is definiálni kell", + "css.lint.hexColorLength.desc": "A hexadecimális formában megadott színeknek három vagy hat hexadecimális számjegyből kell állniuk", + "css.lint.idSelector.desc": "A szelektorok nem tartalmazhatnak azonosítókat, mivel az ilyen szabályok túl szorosan kötődnek a HTML-hez.", + "css.lint.ieHack.desc": "Az IE hangolása csak az IE7 vagy régebbi verziók támogatása esetén szükséges", + "css.lint.important.desc": "Az !important attribútum mellőzése. Az attribútum jelenléte arra utal, hogy a CSS-struktúra átláthatatlanná vált, és refaktorálásra szorul.", + "css.lint.importStatement.desc": "Ne töltődjenek párhuzamosan az importálási utasítások", + "css.lint.propertyIgnoredDueToDisplay.desc": "A megjelenítési mód miatt a megjelenítőkomponensek nem fogják figyelembe venni a tulajdonságot. Ha például a display tulajdonság értéke inline, akkor a megjelenítők figyelmen kívül hagyják a width, a height, a margin-top, a margin-bottom és a float tulajdonságot.", + "css.lint.universalSelector.desc": "Az univerzális szelektor (*) lassú működést eredményez", + "css.lint.unknownProperties.desc": "Ismeretlen tulajdonság.", + "css.lint.unknownVendorSpecificProperties.desc": "Ismeretlen gyártóspecifikus tulajdonság.", + "css.lint.vendorPrefix.desc": "Gyártóspecifikus előtagok használata esetén az adott tulajdonság szabványos változatát is meg kell adni", + "css.lint.zeroUnits.desc": "A 0 értékhez nem szükséges mértékegység", + "css.validate.desc": "Összes validálás engedélyezése vagy letiltása", + "less.lint.argumentsInColorFunction.desc": "Nem megfelelő számú paraméter", + "less.lint.boxModel.desc": "A width és a height tulajdonság kerülése a padding és a border tulajdonság használata esetén", + "less.lint.compatibleVendorPrefixes.desc": "Gyártóspecifikus előtag használata esetén minden más gyártóspecifikus tulajdonságot is meg kell adni", + "less.lint.duplicateProperties.desc": "Duplikált stílusdefiníciók kerülése", + "less.lint.emptyRules.desc": "Üres szabályhalmazok kerülése", + "less.lint.float.desc": "A float tulajdonságérték kerülése, mivel könnyen váratlan eredményt idézhet elő az elrendezés változásakor.", + "less.lint.fontFaceProperties.desc": "A @font-face szabályokban az src és a font-family tulajdonságot is definiálni kell", + "less.lint.hexColorLength.desc": "A hexadecimális formában megadott színeknek három vagy hat hexadecimális számjegyből kell állniuk", + "less.lint.idSelector.desc": "A szelektorok nem tartalmazhatnak azonosítókat, mivel az ilyen szabályok túl szorosan kötődnek a HTML-hez.", + "less.lint.ieHack.desc": "Az IE hangolása csak az IE7 vagy régebbi verziók támogatása esetén szükséges", + "less.lint.important.desc": "Az !important attribútum mellőzése. Az attribútum jelenléte arra utal, hogy a CSS-struktúra átláthatatlanná vált, és refaktorálásra szorul.", + "less.lint.importStatement.desc": "Ne töltődjenek párhuzamosan az importálási utasítások", + "less.lint.propertyIgnoredDueToDisplay.desc": "A megjelenítési mód miatt a megjelenítőkomponensek nem fogják figyelembe venni a tulajdonságot. Ha például a display tulajdonság értéke inline, akkor a megjelenítők figyelmen kívül hagyják a width, a height, a margin-top, a margin-bottom és a float tulajdonságot.", + "less.lint.universalSelector.desc": "Az univerzális szelektor (*) lassú működést eredményez", + "less.lint.unknownProperties.desc": "Ismeretlen tulajdonság.", + "less.lint.unknownVendorSpecificProperties.desc": "Ismeretlen gyártóspecifikus tulajdonság.", + "less.lint.vendorPrefix.desc": "Gyártóspecifikus előtagok használata esetén az adott tulajdonság szabványos változatát is meg kell adni", + "less.lint.zeroUnits.desc": "A 0 értékhez nem szükséges mértékegység", + "less.validate.desc": "Összes validálás engedélyezése vagy letiltása", + "scss.lint.argumentsInColorFunction.desc": "Nem megfelelő számú paraméter", + "scss.lint.boxModel.desc": "A width és a height tulajdonság kerülése a padding és a border tulajdonság használata esetén", + "scss.lint.compatibleVendorPrefixes.desc": "Gyártóspecifikus előtag használata esetén minden más gyártóspecifikus tulajdonságot is meg kell adni", + "scss.lint.duplicateProperties.desc": "Duplikált stílusdefiníciók kerülése", + "scss.lint.emptyRules.desc": "Üres szabályhalmazok kerülése", + "scss.lint.float.desc": "A float tulajdonságérték kerülése, mivel könnyen váratlan eredményt idézhet elő az elrendezés változásakor.", + "scss.lint.fontFaceProperties.desc": "A @font-face szabályokban az src és a font-family tulajdonságot is definiálni kell", + "scss.lint.hexColorLength.desc": "A hexadecimális formában megadott színeknek három vagy hat hexadecimális számjegyből kell állniuk", + "scss.lint.idSelector.desc": "A szelektorok nem tartalmazhatnak azonosítókat, mivel az ilyen szabályok túl szorosan kötődnek a HTML-hez.", + "scss.lint.ieHack.desc": "Az IE hangolása csak az IE7 vagy régebbi verziók támogatása esetén szükséges", + "scss.lint.important.desc": "Az !important attribútum mellőzése. Az attribútum jelenléte arra utal, hogy a CSS-struktúra átláthatatlanná vált, és refaktorálásra szorul.", + "scss.lint.importStatement.desc": "Ne töltődjenek párhuzamosan az importálási utasítások", + "scss.lint.propertyIgnoredDueToDisplay.desc": "A megjelenítési mód miatt a megjelenítőkomponensek nem fogják figyelembe venni a tulajdonságot. Ha például a display tulajdonság értéke inline, akkor a megjelenítők figyelmen kívül hagyják a width, a height, a margin-top, a margin-bottom és a float tulajdonságot.", + "scss.lint.universalSelector.desc": "Az univerzális szelektor (*) lassú működést eredményez", + "scss.lint.unknownProperties.desc": "Ismeretlen tulajdonság.", + "scss.lint.unknownVendorSpecificProperties.desc": "Ismeretlen gyártóspecifikus tulajdonság.", + "scss.lint.vendorPrefix.desc": "Gyártóspecifikus előtagok használata esetén az adott tulajdonság szabványos változatát is meg kell adni", + "scss.lint.zeroUnits.desc": "A 0 értékhez nem szükséges mértékegység", + "scss.validate.desc": "Összes validálás engedélyezése vagy letiltása", + "less.colorDecorators.enable.desc": "Színdekorátorok engedélyezése vagy letiltása", + "scss.colorDecorators.enable.desc": "Színdekorátorok engedélyezése vagy letiltása", + "css.colorDecorators.enable.desc": "Színdekorátorok engedélyezése vagy letiltása" +} \ No newline at end of file diff --git a/i18n/hun/extensions/extension-editing/out/packageDocumentHelper.i18n.json b/i18n/hun/extensions/extension-editing/out/packageDocumentHelper.i18n.json new file mode 100644 index 0000000000000..12ff7e4eb5a04 --- /dev/null +++ b/i18n/hun/extensions/extension-editing/out/packageDocumentHelper.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "languageSpecificEditorSettings": "Nyelvspecifikus szerkesztőbeállítások", + "languageSpecificEditorSettingsDescription": "A szerkesztő beállításainak felülírása az adott nyelvre vonatkozóan" +} \ No newline at end of file diff --git a/i18n/hun/extensions/git/out/askpass-main.i18n.json b/i18n/hun/extensions/git/out/askpass-main.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/hun/extensions/git/out/askpass-main.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/hun/extensions/git/out/commands.i18n.json b/i18n/hun/extensions/git/out/commands.i18n.json new file mode 100644 index 0000000000000..2459ab031bd4a --- /dev/null +++ b/i18n/hun/extensions/git/out/commands.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tag at": "Címke, a következőre mutat: {0}", + "remote branch at": "Távoli ág, a következőre mutat: {0}", + "repourl": "Forráskódtár URL-címe", + "yes": "Igen", + "always": "Mindig", + "commit message": "Beadási üzenet", + "pick remote": "Válassza ki a távoli szervert, ahová publikálni szeretné a(z) '{0}' ágat:", + "sync is unpredictable": "Ez a művelet pusholja és pullozza a commitokat a következő helyről: '{0}'.", + "ok": "OK", + "never again": "Rendben, ne jelenítse meg újra" +} \ No newline at end of file diff --git a/i18n/hun/extensions/git/out/main.i18n.json b/i18n/hun/extensions/git/out/main.i18n.json new file mode 100644 index 0000000000000..024c38affd0b0 --- /dev/null +++ b/i18n/hun/extensions/git/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "neverShowAgain": "Ne jelenítse meg újra" +} \ No newline at end of file diff --git a/i18n/hun/extensions/git/out/model.i18n.json b/i18n/hun/extensions/git/out/model.i18n.json new file mode 100644 index 0000000000000..7dece8191bd87 --- /dev/null +++ b/i18n/hun/extensions/git/out/model.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "merge changes": "Módosítások egyesítése", + "staged changes": "Beadásra előjegyzett módosítások", + "changes": "Módosítások", + "ok": "OK" +} \ No newline at end of file diff --git a/i18n/hun/extensions/git/out/scmProvider.i18n.json b/i18n/hun/extensions/git/out/scmProvider.i18n.json new file mode 100644 index 0000000000000..7fded37328a95 --- /dev/null +++ b/i18n/hun/extensions/git/out/scmProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commit": "Commit" +} \ No newline at end of file diff --git a/i18n/hun/extensions/git/out/statusbar.i18n.json b/i18n/hun/extensions/git/out/statusbar.i18n.json new file mode 100644 index 0000000000000..a2c0dd5ce3935 --- /dev/null +++ b/i18n/hun/extensions/git/out/statusbar.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "sync changes": "Módosítások szinkronizálása" +} \ No newline at end of file diff --git a/i18n/hun/extensions/git/package.i18n.json b/i18n/hun/extensions/git/package.i18n.json new file mode 100644 index 0000000000000..9c50271593412 --- /dev/null +++ b/i18n/hun/extensions/git/package.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.clone": "Klónozás", + "command.refresh": "Frissítés", + "command.openFile": "Fájl megnyitása", + "command.commit": "Commit", + "command.commitStaged": "Beadásra előjegyezve", + "command.commitStagedSigned": "Előjegyzettek beadása (commit) aláírással", + "command.commitAll": "Teljes beadás", + "command.commitAllSigned": "Összes beadása (commit) aláírással", + "command.undoCommit": "Legutolsó beadás (commit) visszavonása", + "command.pull": "Letöltés", + "command.push": "Feltöltés", + "command.pushTo": "Push...", + "command.sync": "Szinkronizálás", + "command.publish": "Ág publikálása", + "command.showOutput": "Git kimenet megjelenítése", + "config.path": "Elérési út a git végrehajtható fájljához", + "config.autorefresh": "Meghatározza, hogy engedélyezve van-e az automatikus frissítés" +} \ No newline at end of file diff --git a/i18n/hun/extensions/grunt/out/main.i18n.json b/i18n/hun/extensions/grunt/out/main.i18n.json new file mode 100644 index 0000000000000..9c9746663158b --- /dev/null +++ b/i18n/hun/extensions/grunt/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "A Grunt automatikus felderítése nem sikerült a következő hiba miatt: {0}" +} \ No newline at end of file diff --git a/i18n/hun/extensions/grunt/package.i18n.json b/i18n/hun/extensions/grunt/package.i18n.json new file mode 100644 index 0000000000000..9888b20bc6a5f --- /dev/null +++ b/i18n/hun/extensions/grunt/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.grunt.autoDetect": "Meghatározza, hogy a Grunt feladatok automatikus felderításe be van-e kapcsolva. A beállítás alapértelmezetten aktív." +} \ No newline at end of file diff --git a/i18n/hun/extensions/gulp/out/main.i18n.json b/i18n/hun/extensions/gulp/out/main.i18n.json new file mode 100644 index 0000000000000..8c8ac9db0317f --- /dev/null +++ b/i18n/hun/extensions/gulp/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "A gulp automatikus felderítése nem sikerült a következő hiba miatt: {0}" +} \ No newline at end of file diff --git a/i18n/hun/extensions/gulp/package.i18n.json b/i18n/hun/extensions/gulp/package.i18n.json new file mode 100644 index 0000000000000..ecaab76d9c785 --- /dev/null +++ b/i18n/hun/extensions/gulp/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.gulp.autoDetect": "Meghatározza, hogy a Gulp feladatok automatikus felderításe be van-e kapcsolva. A beállítás alapértelmezetten aktív." +} \ No newline at end of file diff --git a/i18n/hun/extensions/html/client/out/htmlMain.i18n.json b/i18n/hun/extensions/html/client/out/htmlMain.i18n.json new file mode 100644 index 0000000000000..3aff5dce6a06a --- /dev/null +++ b/i18n/hun/extensions/html/client/out/htmlMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "htmlserver.name": "HTML nyelvi szerver" +} \ No newline at end of file diff --git a/i18n/hun/extensions/html/package.i18n.json b/i18n/hun/extensions/html/package.i18n.json new file mode 100644 index 0000000000000..1eea9c9eee661 --- /dev/null +++ b/i18n/hun/extensions/html/package.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.format.enable.desc": "Alapértelmezett HTML-formázó engedélyezése vagy letiltása (újraindítást igényel)", + "html.format.wrapLineLength.desc": "Maximális karakterszám soronként (0 = letiltás)", + "html.format.unformatted.desc": "Azon elemek vesszővel elválasztott listája, melyek ne legyenek újraformázva. 'null' érték esetén a https://www.w3.org/TR/html5/dom.html#phrasing-content oldalon listázott elemek lesznek használva.", + "html.format.contentUnformatted.desc": "Azon elemek vesszővel elválasztott listája, melyek ne legyenek újraformázva. 'null' érték esetén a 'pre' tag lesz használva.", + "html.format.indentInnerHtml.desc": "- és -szakaszok indentálása.", + "html.format.preserveNewLines.desc": "Az elemek előtt lévő sortörések meg legyenek-e hagyva. Csak elemek előtt működik, elemek belsejében vagy szövegben nem.", + "html.format.maxPreserveNewLines.desc": "Az egymás után megőrzött sortörések maximális száma. Ha nem szeretné korlátozni, használja a 'null' értéket!", + "html.format.indentHandlebars.desc": "{{#foo}} és {{/foo}} formázása és indentálása.", + "html.format.endWithNewline.desc": "Lezárás új sorral.", + "html.format.extraLiners.desc": "Azon elemek veszővel elválasztott listája, amelyek előtt lennie kell egy extra új sornak. 'null' érték esetén a \"head,body,/html\" érték van használva.", + "html.format.wrapAttributes.desc": "Attribútumok tördelése.", + "html.format.wrapAttributes.auto": "Az attribútumok csak akkor vannak tördelve, ha a sorhossz túl lett lépve.", + "html.format.wrapAttributes.force": "Minden egyes attribútum tördelve van, kivéve az elsőt.", + "html.format.wrapAttributes.forcealign": "Minden egyes attribútum tördelve van, kivéve az elsőt, és igazítva vannak.", + "html.format.wrapAttributes.forcemultiline": "Minden egyes attribútum tördelve van.", + "html.suggest.angular1.desc": "Meghatározza, hogy a beépített HTML nyelvi támogatás ajánl-e Angular V1 elemeket és tulajdonságokat.", + "html.suggest.ionic.desc": "Meghatározza, hogy a beépített HTML nyelvi támogatás ajánl-e Ionic elemeket, tulajdonságokat és értékeket.", + "html.suggest.html5.desc": "Meghatározza, hogy a beépített HTML nyelvi támogatás ajánl-e HTML5-ös elemeket, tulajdonságokat és értékeket.", + "html.validate.scripts": "Meghatározza, hogy a beépített HTML nyelvi támogatás validálja-e a beágyazott parancsafájlokat.", + "html.validate.styles": "Meghatározza, hogy a beépített HTML nyelvi támogatás validálja-e a beágyazott stílusfájlokat." +} \ No newline at end of file diff --git a/i18n/hun/extensions/jake/out/main.i18n.json b/i18n/hun/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..c73ae9cac7e91 --- /dev/null +++ b/i18n/hun/extensions/jake/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "A Jake automatikus felderítése nem sikerült a következő hiba miatt: {0}" +} \ No newline at end of file diff --git a/i18n/hun/extensions/jake/package.i18n.json b/i18n/hun/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..4ac74e50f940f --- /dev/null +++ b/i18n/hun/extensions/jake/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.jake.autoDetect": "Meghatározza, hogy a Jake-feladatok automatikus felderításe be van-e kapcsolva. A beállítás alapértelmezetten aktív." +} \ No newline at end of file diff --git a/i18n/hun/extensions/javascript/out/features/bowerJSONContribution.i18n.json b/i18n/hun/extensions/javascript/out/features/bowerJSONContribution.i18n.json new file mode 100644 index 0000000000000..c1e4df9ef0141 --- /dev/null +++ b/i18n/hun/extensions/javascript/out/features/bowerJSONContribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.bower.default": "Alapértelmezett bower.json", + "json.bower.error.repoaccess": "A bower-adattár lekérdezése nem sikerült: {0}", + "json.bower.latest.version": "legutóbbi" +} \ No newline at end of file diff --git a/i18n/hun/extensions/javascript/out/features/packageJSONContribution.i18n.json b/i18n/hun/extensions/javascript/out/features/packageJSONContribution.i18n.json new file mode 100644 index 0000000000000..364a0ae2d172f --- /dev/null +++ b/i18n/hun/extensions/javascript/out/features/packageJSONContribution.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.package.default": "Alapértelmezett package.json", + "json.npm.error.repoaccess": "Az NPM-adattár lekérdezése nem sikerült: {0}", + "json.npm.latestversion": "A csomag jelenlegi legújabb verziója", + "json.npm.majorversion": "A legfrissebb főverzió keresése (1.x.x)", + "json.npm.minorversion": "A legfrissebb alverzió keresése (1.2.x)", + "json.npm.version.hover": "Legújabb verzió: {0}" +} \ No newline at end of file diff --git a/i18n/hun/extensions/json/client/out/jsonMain.i18n.json b/i18n/hun/extensions/json/client/out/jsonMain.i18n.json new file mode 100644 index 0000000000000..a71a351271b11 --- /dev/null +++ b/i18n/hun/extensions/json/client/out/jsonMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "jsonserver.name": "JSON nyelvi szerver" +} \ No newline at end of file diff --git a/i18n/hun/extensions/json/package.i18n.json b/i18n/hun/extensions/json/package.i18n.json new file mode 100644 index 0000000000000..9357a63ffaf86 --- /dev/null +++ b/i18n/hun/extensions/json/package.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.schemas.desc": "Sémák hozzárendelése JSON-fájlokhoz a jelenlegi projektben", + "json.schemas.url.desc": "Egy séma URL-címe vagy egy séma relatív elérési útja az aktuális könyvtárban", + "json.schemas.fileMatch.desc": "Fájlminták tömbje, amely a JSON-fájlok sémákhoz való rendelésénél van használva.", + "json.schemas.fileMatch.item.desc": "Fájlminták tömbje, amely a JSON-fájlok sémákhoz való rendelésénél van használva. Tartalmazhat '*'-ot.", + "json.schemas.schema.desc": "Az adott URL-cím sémadefiníciója. A sémát csak a séma URL-címéhez való fölösleges lekérdezések megakadályozása érdekében kell megadni.", + "json.format.enable.desc": "Alapértelmezett JSON-formázó engedélyezése vagy letiltása (újraindítást igényel)", + "json.tracing.desc": "A VS Code és a JSON nyelvi szerver közötti kommunikáció naplózása.", + "json.colorDecorators.enable.desc": "Színdekorátorok engedélyezése vagy letiltása" +} \ No newline at end of file diff --git a/i18n/hun/extensions/markdown/out/extension.i18n.json b/i18n/hun/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..5f2c5343afb28 --- /dev/null +++ b/i18n/hun/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "onPreviewStyleLoadError": "A 'markdown.styles' nem tölthető be: {0}" +} \ No newline at end of file diff --git a/i18n/hun/extensions/markdown/out/previewContentProvider.i18n.json b/i18n/hun/extensions/markdown/out/previewContentProvider.i18n.json new file mode 100644 index 0000000000000..9e943e324b8ac --- /dev/null +++ b/i18n/hun/extensions/markdown/out/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "A parancsfájlok futtatása le van tiltva az aktuális dokumentumban", + "preview.securityMessage.title": "A parancsfájlok futtatása le van tiltva a markdown-előnézetben. Módosítsa a markdown-előnézet biztonsági beállításait a parancsfájlok engedélyezéséhez", + "preview.securityMessage.label": "Biztonsági figyelmeztetés: a parancsfájlok le vannak tiltva" +} \ No newline at end of file diff --git a/i18n/hun/extensions/markdown/out/security.i18n.json b/i18n/hun/extensions/markdown/out/security.i18n.json new file mode 100644 index 0000000000000..2bba397346ffc --- /dev/null +++ b/i18n/hun/extensions/markdown/out/security.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.showPreviewSecuritySelector.disallowScriptsForWorkspaceTitle": "Parancsfájlok futtatásának letiltása a markdown-előnézetben ezen a munkaterületen", + "preview.showPreviewSecuritySelector.currentSelection": "Aktuális beállítás", + "preview.showPreviewSecuritySelector.allowScriptsForWorkspaceTitle": "Parancsfájlok futtatásának engedélyezése a markdown-előnézetben ezen a munkaterületen", + "preview.showPreviewSecuritySelector.title": "A markdown-előnézet biztonsági beállításainak módosítása" +} \ No newline at end of file diff --git a/i18n/hun/extensions/markdown/package.i18n.json b/i18n/hun/extensions/markdown/package.i18n.json new file mode 100644 index 0000000000000..8c3641582cb80 --- /dev/null +++ b/i18n/hun/extensions/markdown/package.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "markdown.preview.doubleClickToSwitchToEditor.desc": "Kattintson duplán a markdown-előnézetre a szerkesztőre való átváltáshoz.", + "markdown.preview.fontFamily.desc": "Meghatározza a markdown-előnézeten használt betűkészletet.", + "markdown.preview.fontSize.desc": "Meghatározza a markdown-előnézet betűméretét, pixelekben.", + "markdown.preview.lineHeight.desc": "Meghatározza a markdown-előnézeten használt sormagasságot. Az érték relatív a betűmérethez képest.", + "markdown.preview.markEditorSelection.desc": "Az aktuális kijelölés megjelölése a markdown-előnézeten", + "markdown.preview.scrollEditorWithPreview.desc": "Amikor a markdown-előnézetet görgetik, a szerkesztőnézet is aktualizálódik", + "markdown.preview.scrollPreviewWithEditorSelection.desc": "A markdown-előnézetet úgy görgeti, hogy látni lehessen az aktuálisan kijelölt sort", + "markdown.preview.title": "Előnézet megnyitása", + "markdown.previewFrontMatter.dec": "Meghatározza, hogy a YAML konfiguráció (front matter) hogyan legyen megjelenítve a markdown-előnézetben. A 'hide' elrejti a konfigurációt, minden más esetben a front matter markdown-tartalomként van kezelve.", + "markdown.previewSide.title": "Előnézet megnyitása oldalt", + "markdown.showSource.title": "Forrás megjelenítése", + "markdown.styles.dec": "CSS-stíluslapok URL-címeinek vagy helyi elérési útjainak listája, amelyek a markdown-előnézeten használva vannak. A relatív elérési utak az intézőben megnyitott mappához képest vannak relatívan értelmezve. Ha nincs mappa megnyitva, akkor a markdown-fájl elréséi útjához képest. Minden '\\' karaktert '\\\\' formában kell megadni.", + "markdown.showPreviewSecuritySelector.title": "A markdown-előnézet biztonsági beállításainak módosítása", + "markdown.preview.enableExperimentalExtensionApi.desc": "[Kísérleti] Kiterjesztések módosíthatják a markdown előnézetet.", + "markdown.trace.desc": "Hibakeresési napló engedélyezése a markdown kiterjesztésben." +} \ No newline at end of file diff --git a/i18n/hun/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/hun/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..7dfc4ee0d5de0 --- /dev/null +++ b/i18n/hun/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acceptCurrentChange": "Helyi változtatás elfogadása", + "acceptIncomingChange": "Beérkező változtatás elfogadása", + "acceptBothChanges": "Változtatások elfogadása mindkét oldalról", + "compareChanges": "Változtatások összehasonlítása" +} \ No newline at end of file diff --git a/i18n/hun/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/hun/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..16d242a669ce6 --- /dev/null +++ b/i18n/hun/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cursorNotInConflict": "A szerkesztőablak kurzora nem egy összeolvasztási konfliktuson belül van.", + "compareChangesTitle": "{0}: Helyi változtatások ⟷ Beérkező változtatások", + "cursorOnCommonAncestorsRange": "A szerkesztőablak kurzora a közös ős blokkján van. Vigye vagy a \"helyi\" vagy a \"beérkező\" blokkra.", + "cursorOnSplitterRange": "A szerkesztőablak kurzora az összeolvasztási konfliktus elválasztójánál van. Vigye vagy a \"helyi\" vagy a \"beérkező\" blokkra.", + "noConflicts": "Ebben a fájlban nincsenek összeolvasztási konfliktusok", + "noOtherConflictsInThisFile": "Ebben a fájlban nincsenek további összeolvasztási konfliktusok" +} \ No newline at end of file diff --git a/i18n/hun/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/hun/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..dac641cdd1099 --- /dev/null +++ b/i18n/hun/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "currentChange": "(Helyi változtatás)", + "incomingChange": "(Beérkező változtatás)" +} \ No newline at end of file diff --git a/i18n/hun/extensions/merge-conflict/package.i18n.json b/i18n/hun/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..b3814f8d7e637 --- /dev/null +++ b/i18n/hun/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.category": "Összeolvasztási konfliktus", + "command.accept.all-incoming": "Összes beérkező változás elfogadása", + "command.accept.all-both": "Változások elfogadása mindkét oldalról", + "command.accept.current": "Helyi változtatás elfogadása", + "command.accept.incoming": "Beérkező változtatás elfogadása", + "command.accept.selection": "Kijelölt változtatás elfogadása", + "command.accept.both": "Változás elfogadása mindkét oldalról", + "command.next": "Következő konfliktus", + "command.previous": "Előző konfliktus", + "command.compare": "Aktuális konfliktus összehasonlítása", + "config.title": "Összeolvasztási konfliktus", + "config.codeLensEnabled": "Összeolvasztási konfliktust jelző kódlencsék engedélyezése vagy letiltása a szerkesztőablakban.", + "config.decoratorsEnabled": "Összeolvasztási konfliktust jelző dekorátorok engedélyezése vagy letiltása a szerkesztőablakban." +} \ No newline at end of file diff --git a/i18n/hun/extensions/npm/package.i18n.json b/i18n/hun/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..89c11886b21ac --- /dev/null +++ b/i18n/hun/extensions/npm/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.npm.autoDetect": "Meghatározza, hogy az npm-parancsfájlok automatikus felderításe be van-e kapcsolva. A beállítás alapértelmezetten aktív." +} \ No newline at end of file diff --git a/i18n/hun/extensions/php/out/features/validationProvider.i18n.json b/i18n/hun/extensions/php/out/features/validationProvider.i18n.json new file mode 100644 index 0000000000000..2786c871df69c --- /dev/null +++ b/i18n/hun/extensions/php/out/features/validationProvider.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "php.useExecutablePath": "Engedélyezi a(z) {0} (munkaterületi beállításként megadott) végrehajtását a PHP-fájlok linteléséhez?", + "php.yes": "Engedélyezés", + "php.no": "Tiltás", + "wrongExecutable": "A validáció nem sikerült, mivel a(z) {0} nem egy érvényes php végrehajtható fájl. Használja a 'php.validate.executablePath' beállítást a PHP végrehajtható fájl konfigurálásához!", + "noExecutable": "A validáció nem sikerült, mivel nincs beállítva PHP végrehajtható fájl. Használja a 'php.validate.executablePath' beállítást a PHP végrehajtható fájl konfigurálásához!", + "unknownReason": "Nem sikerült futtatni a PHP-t a következő elérési út használatával: {0}. Az ok ismeretlen." +} \ No newline at end of file diff --git a/i18n/hun/extensions/php/package.i18n.json b/i18n/hun/extensions/php/package.i18n.json new file mode 100644 index 0000000000000..59e189e72c4c4 --- /dev/null +++ b/i18n/hun/extensions/php/package.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "configuration.suggest.basic": "Meghatározza, hogy a beépített PHP nyelvi támogatás ajánl-e PHP globálisokat és változókat.", + "configuration.validate.enable": "Beépített PHP-validáció engedélyezése vagy letiltása", + "configuration.validate.executablePath": "A PHP végrehajtható fájljának elérési útja.", + "configuration.validate.run": "A linter mentéskor vagy gépeléskor fut-e.", + "configuration.title": "PHP", + "commands.categroy.php": "PHP", + "command.untrustValidationExecutable": "PHP-validációs végrehajtható fájl letiltása (munkaterületi beállításként megadva)" +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/hun/extensions/typescript/out/features/bufferSyncSupport.i18n.json new file mode 100644 index 0000000000000..36e9902ff5e78 --- /dev/null +++ b/i18n/hun/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "versionMismatch": "TypeScript ({1}) használata a szerkesztőfunkciókhoz. A számítógére TypeScript (01}) van globálisan telepítve. A VS Code-ban látható hibák eltérhetnek a TSC által visszaadott hibáktól.", + "moreInformation": "További információ", + "doNotCheckAgain": "Ne ellenőrizze újra", + "close": "Bezárás", + "updateTscCheck": "A 'typescript.check.tscVersion' felhasználói beállítás értéke módosítva false-ra" +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/hun/extensions/typescript/out/features/completionItemProvider.i18n.json new file mode 100644 index 0000000000000..69b50af008f82 --- /dev/null +++ b/i18n/hun/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acquiringTypingsLabel": "Típusdefiníciók letöltése...", + "acquiringTypingsDetail": "Típusdefiníciók letöltése az IntelliSense-hez." +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/hun/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..4785b97e7228d --- /dev/null +++ b/i18n/hun/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "Engedélyezi a JavaScript-fájlok szemantikai ellenőrzését. A fájl tetején kell szerepelnie.", + "ts-nocheck": "Letiltja a JavaScript-fájlok szemantikai ellenőrzését. A fájl tetején kell szerepelnie.", + "ts-ignore": "Elfedi a fájl következő sorában található @ts-check-hibákat." +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json b/i18n/hun/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json new file mode 100644 index 0000000000000..f5a576fa8a74e --- /dev/null +++ b/i18n/hun/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "oneImplementationLabel": "1 implementáció", + "manyImplementationLabel": "{0} implementáció", + "implementationsErrorLabel": "Nem sikerült meghatározni az implementációkat" +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json b/i18n/hun/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json new file mode 100644 index 0000000000000..c1b25917e3b52 --- /dev/null +++ b/i18n/hun/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.jsDocCompletionItem.documentation": "JSDoc-megjegyzés" +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json b/i18n/hun/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json new file mode 100644 index 0000000000000..797518b509102 --- /dev/null +++ b/i18n/hun/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "oneReferenceLabel": "1 referencia", + "manyReferenceLabel": "{0} referencia", + "referenceErrorLabel": "Nem sikerült meghatározni a referenciákat" +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/typescriptMain.i18n.json b/i18n/hun/extensions/typescript/out/typescriptMain.i18n.json new file mode 100644 index 0000000000000..c521fb331a6d2 --- /dev/null +++ b/i18n/hun/extensions/typescript/out/typescriptMain.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.projectConfigNoWorkspace": "Nyisson meg egy mappát a VS Code-ban typescriptes vagy javascriptes projekt használatához!", + "typescript.projectConfigUnsupportedFile": "Nem sikerült meghatározni a TypeScript- vagy JavaScript-projektet. Nem támogatott fájltípus", + "typescript.projectConfigCouldNotGetInfo": "Nem sikerült meghatározni a TypeScript- vagy JavaScript-projektet", + "typescript.noTypeScriptProjectConfig": "A fájl nem része egy TypeScript-projektnek", + "typescript.noJavaScriptProjectConfig": "A fájl nem része egy JavaScript-projektnek", + "typescript.configureTsconfigQuickPick": "tsconfig.json konfigurálása", + "typescript.configureJsconfigQuickPick": "jsconfig.json konfigurálása", + "typescript.projectConfigLearnMore": "További információ" +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/hun/extensions/typescript/out/typescriptServiceClient.i18n.json new file mode 100644 index 0000000000000..e46f95c0a626a --- /dev/null +++ b/i18n/hun/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noServerFound": "A(z) {0} elérési út nem egy érvényes tsserver-telepítésre mutat. A beépített TypeScript-verzió lesz használva.", + "noBundledServerFound": "A VSCode beépített TS-szerverét törölte egy másik alkalmazás, például egy hibásan viselkedő víruskereső eszköz. Telepítse újra a VSCode-ot! ", + "versionNumber.custom": "egyedi", + "serverCouldNotBeStarted": "Nem sikerült elindítani a TypeScript nyelvi szervert. Hibaüzenet: {0}", + "useVSCodeVersionOption": "A VSCode verziójának használata", + "activeVersion": "Jelenleg aktív", + "useWorkspaceVersionOption": "A munkaterület verziójának használata", + "learnMore": "További információ", + "selectTsVersion": "Válassza ki a javascriptes és typescriptes nyelvi funkciókhoz használt TypeScript-verziót", + "typescript.openTsServerLog.notSupported": "A TS-szerver naplózáshoz TS 2.2.2+ szükséges", + "typescript.openTsServerLog.loggingNotEnabled": "A TS-szervernaplózás ki van kapcsolva. Állítsa be a `typescript.tsserver.log` beállítást, majd indítsa újra a TS-szervert a naplózás engedélyezéséhez!", + "typescript.openTsServerLog.enableAndReloadOption": "Naplózás engedélyezése és TS-szerver újraindítása", + "typescript.openTsServerLog.noLogFile": "A TS-szerver nem kezdett el naplózni", + "openTsServerLog.openFileFailedFailed": "A TS-szervernapló nem nyitható meg", + "serverDiedAfterStart": "A TypeScript nyelvi szolgáltatás öt alkalommal omlott össze rögtön azután, hogy el lett indítva. A szolgáltatás nem lesz újraindítva.", + "serverDiedReportIssue": "Probléma jelentése", + "serverDied": "A TypeScript nyelvi szolgáltatás öt alkalommal omlott össze az elmúlt öt percben." +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/utils/logger.i18n.json b/i18n/hun/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..bc738f43d0c37 --- /dev/null +++ b/i18n/hun/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/hun/extensions/typescript/out/utils/projectStatus.i18n.json new file mode 100644 index 0000000000000..a75ecaf059829 --- /dev/null +++ b/i18n/hun/extensions/typescript/out/utils/projectStatus.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hintExclude": "A JavaScript/TypeScript funkciók teljes projektre való engedélyezéséhez zárja ki a sok fájlt tartalmazó mappákat. Például: {0}", + "hintExclude.generic": "A JavaScript/TypeScript funkciók teljes projektre való engedélyezéséhez zárja ki azokat a mappákat, amelyben olyan forrásfájlok találhatók, melyen nem dolgozik.", + "large.label": "Kivételek konfigurálása", + "hintExclude.tooltip": "A JavaScript/TypeScript funkciók teljes projektre való engedélyezéséhez zárja ki azokat a mappákat, amelyben olyan forrásfájlok találhatók, melyen nem dolgozik. " +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/hun/extensions/typescript/out/utils/typingsStatus.i18n.json new file mode 100644 index 0000000000000..4b308f26e0425 --- /dev/null +++ b/i18n/hun/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installingPackages": "Adatok lekérése a jobb typescriptes IntelliSense-hez", + "typesInstallerInitializationFailed.title": "Nem sikerült telepíteni a típusdefiníciós fájlokat a javascriptes nyelvi funkciókhoz. Győződjön meg róla, hogy az NPM telepítve van vagy módosítsa a 'typescript.npm' beállítás értékét a felhasználói beállításokban", + "typesInstallerInitializationFailed.moreInformation": "További információ", + "typesInstallerInitializationFailed.doNotCheckAgain": "Ne ellenőrizze újra", + "typesInstallerInitializationFailed.close": "Bezárás" +} \ No newline at end of file diff --git a/i18n/hun/extensions/typescript/package.i18n.json b/i18n/hun/extensions/typescript/package.i18n.json new file mode 100644 index 0000000000000..42fa728d94191 --- /dev/null +++ b/i18n/hun/extensions/typescript/package.i18n.json @@ -0,0 +1,48 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.reloadProjects.title": "Projekt újratöltése", + "javascript.reloadProjects.title": "Projekt újratöltése", + "configuration.typescript": "TypeScript", + "typescript.useCodeSnippetsOnMethodSuggest.dec": "Függvények kiegészítése paraméterdefiníciójukkal.", + "typescript.tsdk.desc": "A tsservert és a lib*.d.ts fájlokat tartalmazó mappa elérési útja.", + "typescript.disableAutomaticTypeAcquisition": "Automatikus típusdefiníció-letöltés letiltása. Legalább 2.0.6-os TypeScriptet igényel, és a módosítás után újraindítás szükséges.", + "typescript.check.tscVersion": "Megvizsgálja, hogy a globálisan telepített TypeScript fordító (pl. tsc) különbözik-e a TypeScript nyelvi szolgáltatás által használttól.", + "typescript.tsserver.log": "Engedélyezi a TS-szerver naplózását egy fájlba. Ez a napló a TS-szerverrel kapcsolatos problémák diagnosztizálására használható. A napló tartalmazhat elérési utakat, forráskódot és más potenciálisan érzékeny, projekttel kapcsolatos adatot.", + "typescript.tsserver.trace": "Engedélyezi a TS-szervernek küldött üzenetek naplózását. Ez a napló a TS-szerverrel kapcsolatos problémák diagnosztizálására használható. A napló tartalmazhat elérési utakat, forráskódot és más potenciálisan érzékeny, projekttel kapcsolatos adatot. ", + "typescript.validate.enable": "TypeScript-validálás engedélyezése vagy letiltása.", + "typescript.format.enable": "Alapértelmezett TypeScript-formázó engedélyezése vagy letiltása.", + "javascript.format.enable": "Alapértelmezett JavaScript-formázó engedélyezése vagy letiltása.", + "format.insertSpaceAfterCommaDelimiter": "Meghatározza a szóközök kezelését vessző elválasztókarakter után.", + "format.insertSpaceAfterConstructor": "Meghatározza a szóközök kezelését a constructor kulcsszó után. TypeScript >= 2.3.0-t igényel.", + "format.insertSpaceAfterSemicolonInForStatements": "Meghatározza a szóközök kezelését pontosvessző után a for ciklusban.", + "format.insertSpaceBeforeAndAfterBinaryOperators": "Meghatározza a szóközök kezelését bináris operátorok után.", + "format.insertSpaceAfterKeywordsInControlFlowStatements": "Meghatározza a szóközök kezelését vezérlési szerkezetek kulcsszavai után.", + "format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": "Meghatározza a szóközök kezelését a névtelen függvényekben található function kulcsszó után.", + "format.insertSpaceBeforeFunctionParenthesis": "Meghatározza a szóközök kezelését a függvényargumentumokat tartalmazó zárójel előtt. TypeScript >= 2.1.5-öt igényel.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Meghatározza a szóközök kezelését nem üres zárójelek nyitása után és zárása előtt.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Meghatározza a szóközök kezelését nem üres szögletes zárójelek nyitása után és zárása előtt.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Meghatározza a szóközök kezelését nem üres kapcsos zárójelek nyitása után és zárása előtt. TypeScript >= 2.3.0-t igényel.", + "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Meghatározza a szóközök kezelését a sablonkarakterláncok (template stringek) kapcsos zárójeleinek nyitása után és zárása előtt. TypeScript >= 2.0.6-ot igényel.", + "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "Meghatározza a szóközök kezelését JSX-kifejezések kapcsos zárójeleinek nyitása után és zárása előtt. TypeScript >= 2.0.6-ot igényel.", + "format.placeOpenBraceOnNewLineForFunctions": "Meghatározza, hogy a függvények nyitó kapcsos zárójelei új sorba kerüljenek-e vagy sem.", + "format.placeOpenBraceOnNewLineForControlBlocks": "Meghatározza, hogy a vezérlőblokkok nyitó kapcsos zárójelei új sorba kerüljenek-e vagy sem.", + "javascript.validate.enable": "JavaScript-validálás engedélyezése vagy letiltása.", + "typescript.goToProjectConfig.title": "Projektkonfiguráció megkeresése", + "javascript.goToProjectConfig.title": "Projektkonfiguráció megkeresése", + "javascript.referencesCodeLens.enabled": "Referencia kódlencsék engedélyezése vagy letiltása a JavaScript-fájlokban.", + "typescript.referencesCodeLens.enabled": "Referencia kódlencsék engedélyezése vagy letiltása a TypeScript-fájlokban. TypeScript >= 2.0.6-ot igényel.", + "typescript.implementationsCodeLens.enabled": "Implementációs kódlencsék engedélyezése vagy letiltása. TypeScript >= 2.2.0-t igényel.", + "typescript.openTsServerLog.title": "TS-szervernapló megnyitása", + "typescript.restartTsServer": "TS-szerver újraindítása", + "typescript.selectTypeScriptVersion.title": "TypeScript-verzió kiválasztása", + "jsDocCompletion.enabled": "Automatikus JSDoc-megjegyzések engedélyezése vagy letiltása", + "javascript.implicitProjectConfig.checkJs": "JavaScript-fájlok szemantikai ellenőrzésének engedélyezése vagy letiltása. A meglévő jsconfig.json vagy tsconfig.json fájlok felülírják ezt a beállítást. TypeScript >= 2.3.1-et igényel.", + "typescript.npm": "Az automatikus típusdefiníció-letöltéshez használt NPM végrehajtható fájl elérési útja. TypeScript 2.3.4-et igényel.", + "typescript.check.npmIsInstalled": "Ellenőrizze, hogy az NPM telepítve van-e az automatikus típusdefiníció-letöltéshez.", + "javascript.nameSuggestions": "Egyedi nevek listázásának engedélyezése a javascriptes javaslati listákban.", + "typescript.tsc.autoDetect": "Meghatározza, hogy a tsc-feladatok automatikus felderítése be van-e kapcsolva." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/browser/ui/actionbar/actionbar.i18n.json b/i18n/hun/src/vs/base/browser/ui/actionbar/actionbar.i18n.json new file mode 100644 index 0000000000000..4ecb2c803f4cd --- /dev/null +++ b/i18n/hun/src/vs/base/browser/ui/actionbar/actionbar.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "titleLabel": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/browser/ui/aria/aria.i18n.json b/i18n/hun/src/vs/base/browser/ui/aria/aria.i18n.json new file mode 100644 index 0000000000000..3bc0f0c0e684b --- /dev/null +++ b/i18n/hun/src/vs/base/browser/ui/aria/aria.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "repeated": "{0} (ismét előfordult)" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/browser/ui/findinput/findInput.i18n.json b/i18n/hun/src/vs/base/browser/ui/findinput/findInput.i18n.json new file mode 100644 index 0000000000000..d43a176512b4d --- /dev/null +++ b/i18n/hun/src/vs/base/browser/ui/findinput/findInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultLabel": "bemeneti adat" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json b/i18n/hun/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json new file mode 100644 index 0000000000000..d165fd190240a --- /dev/null +++ b/i18n/hun/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caseDescription": "Kis- és nagybetűk megkülönböztetése", + "wordsDescription": "Csak teljes szavas egyezés", + "regexDescription": "Reguláris kifejezés használata" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/browser/ui/inputbox/inputBox.i18n.json b/i18n/hun/src/vs/base/browser/ui/inputbox/inputBox.i18n.json new file mode 100644 index 0000000000000..f6a7c8c5b2069 --- /dev/null +++ b/i18n/hun/src/vs/base/browser/ui/inputbox/inputBox.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "alertErrorMessage": "Hiba: {0}", + "alertWarningMessage": "Figyelmeztetés: {0}", + "alertInfoMessage": "Információ: {0}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/hun/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json new file mode 100644 index 0000000000000..a5030e9187205 --- /dev/null +++ b/i18n/hun/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "imgMeta": "{0}x{1} {2}", + "largeImageError": "A kép túl nagy a szerkesztőben való megjelenítéshez.", + "resourceOpenExternalButton": "Kép megnyitása külső program használatával?", + "nativeBinaryError": "A fájl nem jeleníthető meg a szerkesztőben, mert bináris adatokat tartalmaz, túl nagy vagy nem támogatott szövegkódolást használ.", + "sizeB": "{0} B", + "sizeKB": "{0} KB", + "sizeMB": "{0} MB", + "sizeGB": "{0} GB", + "sizeTB": "{0} TB" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/browser/ui/toolbar/toolbar.i18n.json b/i18n/hun/src/vs/base/browser/ui/toolbar/toolbar.i18n.json new file mode 100644 index 0000000000000..d28a4867625d1 --- /dev/null +++ b/i18n/hun/src/vs/base/browser/ui/toolbar/toolbar.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "more": "Tovább" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/common/errorMessage.i18n.json b/i18n/hun/src/vs/base/common/errorMessage.i18n.json new file mode 100644 index 0000000000000..a5107de5d65b1 --- /dev/null +++ b/i18n/hun/src/vs/base/common/errorMessage.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "message": "{0}: {1}", + "error.permission.verbose": "Engedélyhiány (HTTP {0})", + "error.permission": "Engedélyhiány", + "error.http.verbose": "{0} (HTTP {1}: {2})", + "error.http": "{0} (HTTP {1})", + "error.connection.unknown.verbose": "Ismeretlen csatlakozási hiba ({0})", + "error.connection.unknown": "Ismeretlen csatlakozási hiba történt. Vagy megszakadt az internetkapcsolat, vagy a kiszolgáló vált offline-ná.", + "stackTrace.format": "{0}: {1}", + "error.defaultMessage": "Ismeretlen hiba történt. Részletek a naplóban.", + "error.moreErrors": "{0} (összesen {1} hiba)" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/hun/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..c73ba839ef696 --- /dev/null +++ b/i18n/hun/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.invalidSymbol": "Érvénytelen szimbólum", + "error.invalidNumberFormat": "Érvénytelen számformátum.", + "error.propertyNameExpected": "Hiányzó tulajdonságnév", + "error.valueExpected": "Hiányzó érték.", + "error.colonExpected": "Hiányzó kettőspont.", + "error.commaExpected": "Hiányzó vessző", + "error.closeBraceExpected": "Hiányzó záró kapcsos zárójel", + "error.closeBracketExpected": "Hiányzó záró szögletes zárójel", + "error.endOfFileExpected": "Itt fájlvége jelnek kellene szerepelnie." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/common/keybindingLabels.i18n.json b/i18n/hun/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/hun/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/common/processes.i18n.json b/i18n/hun/src/vs/base/common/processes.i18n.json new file mode 100644 index 0000000000000..d80423e4ca777 --- /dev/null +++ b/i18n/hun/src/vs/base/common/processes.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ExecutableParser.commandMissing": "Hiba: a végrehajtási információnak definiálnia kell egy karakterlánc típusú parancsot.", + "ExecutableParser.isShellCommand": "Figyelmeztetés: az isShellCommand értékének boolean típusúnak kell lennie. A következő érték figyelmen kívül van hagyva: {0}.", + "ExecutableParser.args": "Figyelmeztetés: az args értékének string[] típusúnak kell lennie. A következő érték figyelmen kívül van hagyva: {0}.", + "ExecutableParser.invalidCWD": "Figyelmeztetés: az options.cwd értékének string típusúnak kell lennie. A következő érték figyelmen kívül van hagyva: {0}." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/common/severity.i18n.json b/i18n/hun/src/vs/base/common/severity.i18n.json new file mode 100644 index 0000000000000..5c503caf27981 --- /dev/null +++ b/i18n/hun/src/vs/base/common/severity.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "sev.error": "Hiba", + "sev.warning": "Figyelmeztetés", + "sev.info": "Információ" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/node/processes.i18n.json b/i18n/hun/src/vs/base/node/processes.i18n.json new file mode 100644 index 0000000000000..9e3ad98b69c3a --- /dev/null +++ b/i18n/hun/src/vs/base/node/processes.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskRunner.UNC": "Rendszerparancsok UNC-meghajtókon nem hajthatók végre." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/node/zip.i18n.json b/i18n/hun/src/vs/base/node/zip.i18n.json new file mode 100644 index 0000000000000..feb34282ee736 --- /dev/null +++ b/i18n/hun/src/vs/base/node/zip.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "{0} nem található a zipen belül." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json b/i18n/hun/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json new file mode 100644 index 0000000000000..fb2705ff3c83b --- /dev/null +++ b/i18n/hun/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpenAriaLabelEntry": "{0}, választó", + "quickOpenAriaLabel": "választó" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json b/i18n/hun/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json new file mode 100644 index 0000000000000..095139488e0b5 --- /dev/null +++ b/i18n/hun/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpenAriaLabel": "Gyorsválasztó. Kezdjen el gépelni a találati lista szűkítéséhez!", + "treeAriaLabel": "Gyorsválasztó" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/base/parts/tree/browser/treeDefaults.i18n.json b/i18n/hun/src/vs/base/parts/tree/browser/treeDefaults.i18n.json new file mode 100644 index 0000000000000..1bb27ebb3237f --- /dev/null +++ b/i18n/hun/src/vs/base/parts/tree/browser/treeDefaults.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "collapse": "Összecsukás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/code/electron-main/menus.i18n.json b/i18n/hun/src/vs/code/electron-main/menus.i18n.json new file mode 100644 index 0000000000000..72b0fe6308632 --- /dev/null +++ b/i18n/hun/src/vs/code/electron-main/menus.i18n.json @@ -0,0 +1,178 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mFile": "&&Fájl", + "mEdit": "Sz&&erkesztés", + "mSelection": "Kijelölé&&s", + "mView": "&&Nézet", + "mGoto": "U&&grás", + "mDebug": "Hi&&bakeresés", + "mWindow": "Ablak", + "mHelp": "&&Súgó", + "mTask": "&&Feladatok", + "miNewWindow": "Új &&ablak", + "mAbout": "A(z) {0} névjegye", + "mServices": "Szolgáltatások", + "mHide": "{0} elrejtése", + "mHideOthers": "Egyebek elrejtése", + "mShowAll": "Az összes megjelenítése", + "miQuit": "Kilépés innen: {0}", + "miNewFile": "Ú&&j fájl", + "miOpen": "&&Megnyitás", + "miOpenFolder": "Ma&&ppa megnyitása", + "miOpenFile": "&&Fájl megnyitása", + "miOpenRecent": "&&Legutóbbi megnyitása", + "miSave": "Menté&&s", + "miSaveAs": "M&&entés másként", + "miSaveAll": "Összes men&&tése", + "miAutoSave": "Automatikus mentés", + "miRevert": "Fájl &&visszaállítása", + "miCloseWindow": "Ablak be&&zárása", + "miCloseFolder": "Mappa &&bezárása", + "miCloseEditor": "Szer&&kesztőablak bezárása", + "miExit": "&&Kilépés", + "miOpenSettings": "&&Beállítások", + "miOpenKeymap": "&&Billentyűparancsok", + "miOpenKeymapExtensions": "Billentyűparancs-kiegészítő&&k", + "miOpenSnippets": "Felhasználói kód&&részletek", + "miSelectColorTheme": "Szín&&téma", + "miSelectIconTheme": "Fájl&&ikonok témája", + "miPreferences": "&&Beállítások", + "miReopenClosedEditor": "Bezárt szerkesztőablak ú&&jranyitása", + "miMore": "&&Továbbiak...", + "miClearRecentOpen": "Leg&&utóbbi fájlok listájának törlése", + "miUndo": "&&Visszavonás", + "miRedo": "Ú&&jra", + "miCut": "&&Kivágás", + "miCopy": "&&Másolás", + "miPaste": "&&Beillesztés", + "miFind": "K&&eresés", + "miReplace": "&&Csere", + "miFindInFiles": "Keresés a &&fájlokban", + "miReplaceInFiles": "Csere a fá&&jlokban", + "miEmmetExpandAbbreviation": "Emmet: Rövidítés k&&ibontása", + "miShowEmmetCommands": "E&&mmet...", + "miToggleLineComment": "&&Egysoros megjegyzés ki-/bekapcsolása", + "miToggleBlockComment": "Me&&gjegyzésblokk ki-/bekapcsolása", + "miMultiCursorAlt": "Alt+kattintás használata több kurzorhoz", + "miMultiCursorCmd": "Cmd+kattintás használata több kurzorhoz", + "miMultiCursorCtrl": "Ctrl+kattintás használata több kurzorhoz", + "miInsertCursorAbove": "&&Kurzor beszúrása egy sorral feljebb", + "miInsertCursorBelow": "Ku&&rzor beszúrása egy sorral feljebb", + "miInsertCursorAtEndOfEachLineSelected": "K&&urzor beszúrása a sorok végére", + "miAddSelectionToNextFindMatch": "&&Következő találat kijelölése", + "miAddSelectionToPreviousFindMatch": "&&Előző találat kijelölése", + "miSelectHighlights": "Az összes keresési találat &&kijelölése", + "miCopyLinesUp": "Sor másolása eggyel &&feljebb", + "miCopyLinesDown": "Sor másolása eggyel &&lejjebb", + "miMoveLinesUp": "Sor feljebb &&helyezése", + "miMoveLinesDown": "Sor lejje&&bb helyezése", + "miSelectAll": "Az össze&&s kijelölése", + "miSmartSelectGrow": "Kijelölés &&bővítése", + "miSmartSelectShrink": "Ki&&jelölés szűkítése", + "miViewExplorer": "Fájlk&&ezelő", + "miViewSearch": "&&Keresés", + "miViewSCM": "&&Verziókezelés", + "miViewDebug": "&&Hibakeresés", + "miViewExtensions": "Kiegé&&szítők", + "miToggleOutput": "&&Kimenet", + "miToggleDebugConsole": "Hi&&bakeresési konzol", + "miToggleIntegratedTerminal": "Beépített term&&inál", + "miMarker": "&&Problémák", + "miAdditionalViews": "További &&nézetek", + "miCommandPalette": "Paran&&cskatalógus...", + "miToggleFullScreen": "&&Teljes képernyő be- és kikapcsolása", + "miToggleZenMode": "Zen mód be- és kikapcsolása", + "miToggleMenuBar": "Menüsáv &&be- és kikapcsolása", + "miSplitEditor": "Szerkesztőablak k&&ettéosztása", + "miToggleEditorLayout": "Szerkesztőablak-csoport e&&lrendezésének váltása", + "miToggleSidebar": "&&Oldalsáv be- és kikapcsolása", + "miMoveSidebarRight": "Oldalsáv áthelyezése &&jobbra", + "miMoveSidebarLeft": "Oldalsáv áthelyezése &&balra", + "miTogglePanel": "&&Panel be- és kikapcsolása", + "miHideStatusbar": "Állapotsor &&elrejtése", + "miShowStatusbar": "Állapotsor &&megjelenítése", + "miHideActivityBar": "&&Tevékenységsáv elrejtése", + "miShowActivityBar": "&&Tevékenységsáv megjelenítése", + "miToggleWordWrap": "&&Sortörés be- és kikapcsolása", + "miToggleRenderWhitespace": "S&&zóközök kirajzolásának be- és kikapcsolása", + "miToggleRenderControlCharacters": "&&Vezérlőkarakterek kirajzolásának be- és kikapcsolása", + "miZoomIn": "&&Nagyítás", + "miZoomOut": "&&Kicsinyítés", + "miZoomReset": "&&Nagyítási szint alaphelyzetbe állítása", + "miBack": "&&Vissza", + "miForward": "&&Előre", + "miNextEditor": "&&Következő szerkesztőablak", + "miPreviousEditor": "&&Előző szerkesztőablak", + "miNextEditorInGroup": "Következő &&használt szerkesztőablak a csoportban", + "miPreviousEditorInGroup": "Következő h&&asznált szerkesztőablak a csoportban", + "miSwitchEditor": "Sz&&szerkesztőablak váltása", + "miFocusFirstGroup": "&&Első csoport", + "miFocusSecondGroup": "&&Második csoport", + "miFocusThirdGroup": "&&Harmadik csoport", + "miNextGroup": "&&Következő csoport", + "miPreviousGroup": "&&Előző csoport", + "miSwitchGroup": "Csoport &&váltása", + "miGotoFile": "Ugrás &&fájlhoz...", + "miGotoSymbolInFile": "Ugrás szim&&bólumhoz egy fájlban...", + "miGotoSymbolInWorkspace": "Ugrás szimbólumhoz a &&munkaterületen...", + "miGotoDefinition": "Ugrás a &&definícióra", + "miGotoTypeDefinition": "Ugrás a &&típusdefinícióra", + "miGotoImplementation": "Ugrás az &&implementációra", + "miGotoLine": "&&Sor megkeresáse...", + "miStartDebugging": "Hibakeresés indítá&&sa", + "miStartWithoutDebugging": "Indítás hibakeresés &&nélkül", + "miStopDebugging": "Hibakeresés leállítá&&sa", + "miRestart Debugging": "Hibakeresés új&&raindítása", + "miOpenConfigurations": "&&Konfigurációk megnyitása", + "miAddConfiguration": "Konfiguráció hozzáadása...", + "miStepOver": "Á&&tugrás", + "miStepInto": "&&Belépés", + "miStepOut": "&&Kilépés", + "miContinue": "&&Folytatás", + "miToggleBreakpoint": "&&Töréspont be- és kikapcsolása", + "miConditionalBreakpoint": "Feltételes törés&&pont", + "miColumnBreakpoint": "Töréspont &&oszlopnál", + "miFunctionBreakpoint": "Töréspont&&funkció...", + "miNewBreakpoint": "Ú&&j töréspont", + "miEnableAllBreakpoints": "Összes töréspont engedélyezése", + "miDisableAllBreakpoints": "Összes töréspont leti&<ása", + "miRemoveAllBreakpoints": "Összes töréspont eltávolítás&&a", + "miInstallAdditionalDebuggers": "Tovább&&i hibakeresők telepítése", + "mMinimize": "Kis méret", + "mZoom": "Nagyítás", + "mBringToFront": "Legyen az összes előtérben", + "miSwitchWindow": "&&Ablak váltása...", + "miToggleDevTools": "&&Fejlesztői eszközök be- és kikapcsolása", + "miAccessibilityOptions": "&&Kisegítő lehetőségek", + "miReportIssues": "&&Problémák jelentése", + "miWelcome": "Üdvözlő&&oldal", + "miInteractivePlayground": "&&Interaktív játszótér", + "miDocumentation": "&&Dokumentáció", + "miReleaseNotes": "&&Kiadási jegyzék", + "miKeyboardShortcuts": "Billentyűparancs-&&referencia", + "miIntroductoryVideos": "Bemutató&&videók", + "miTwitter": "&&Csatlakozzon hozzánk a Twitteren", + "miUserVoice": "Funkcióigények keresé&&se", + "miLicense": "&&Licenc megtekintése", + "miPrivacyStatement": "&&Adatvédelmi nyilatkozat", + "miAbout": "&&Névjegy", + "miRunTask": "&&Feladat futtatása...", + "miRestartTask": "F&&eladat újraindítása", + "miTerminateTask": "Felada&&t megszakítása", + "miBuildTask": "&&Buildelési feladat", + "miTestTask": "Tesztelési felad&&at", + "miShowTaskLog": "Feladat&&napló megtekintése", + "accessibilityOptionsWindowTitle": "Kisegítő lehetőségek beállításai", + "miRestartToUpdate": "Újraindítás a frissítéshez...", + "miCheckingForUpdates": "Frissítések keresése...", + "miDownloadUpdate": "Elérhető frissítés letöltése", + "miDownloadingUpdate": "Frissítés letöltése...", + "miInstallingUpdate": "Frissítés telepítése...", + "miCheckForUpdates": "Frissítések keresése...", + "aboutDetail": "\nVerzió: {0}\nCommit: {1}\nDátum: {2}\nShell: {3}\nRendelő: {4}\nNode: {5}", + "okButton": "OK" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/code/electron-main/window.i18n.json b/i18n/hun/src/vs/code/electron-main/window.i18n.json new file mode 100644 index 0000000000000..4acca80d5c4d8 --- /dev/null +++ b/i18n/hun/src/vs/code/electron-main/window.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hiddenMenuBar": "A menüsáv továbbra is elréhető az **Alt** billentyű leütésével." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/code/electron-main/windows.i18n.json b/i18n/hun/src/vs/code/electron-main/windows.i18n.json new file mode 100644 index 0000000000000..46afd59149253 --- /dev/null +++ b/i18n/hun/src/vs/code/electron-main/windows.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ok": "OK", + "pathNotExistTitle": "Az elérési út nem létezik", + "pathNotExistDetail": "Úgy tűnik, hogy a(z) „{0}” elérési út már nem létezik a lemezen.", + "reopen": "Újranyitás", + "wait": "Várakozás tovább", + "close": "Bezárás", + "appStalled": "Az ablak nem válaszol", + "appStalledDetail": "Bezárhatja vagy újranyithatja az ablakot vagy várakozhat tovább.", + "appCrashed": "Az ablak összeomlott", + "appCrashedDetail": "Elnézést kérünk az okozott kellemetlenségért. Nyissa újra az ablakot, ha onnan szeretné folytatni a munkát, ahol abbahagyta." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/code/node/cliProcessMain.i18n.json b/i18n/hun/src/vs/code/node/cliProcessMain.i18n.json new file mode 100644 index 0000000000000..fe8c039d35fd9 --- /dev/null +++ b/i18n/hun/src/vs/code/node/cliProcessMain.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "A(z) '{0}' kiegészítő nem található.", + "notInstalled": "A(z) '{0}' kiegészítő nincs telepítve.", + "useId": "Bizonyosodjon meg róla, hogy a kiegészítő teljes azonosítóját használja, beleértve a kiadót, pl.: {0}", + "successVsixInstall": "A(z) '{0}' kiegszítő sikeresen telepítve lett.", + "alreadyInstalled": "A(z) '{0}' kiegészítő már telepítve van.", + "foundExtension": "A(z) '{0}' kiegészítő megtalálva a piactéren.", + "installing": "Telepítés...", + "successInstall": "A(z) '{0}' v{1} kiegészítő sikeresen telepítve lett.", + "uninstalling": "{0} eltávolítása...", + "successUninstall": "A(z) '{0}' kiegészítő sikeresen el lett távolítva." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/hun/src/vs/editor/common/config/commonEditorConfig.i18n.json new file mode 100644 index 0000000000000..1e9ce0d9025a7 --- /dev/null +++ b/i18n/hun/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -0,0 +1,88 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorConfigurationTitle": "Szerkesztőablak", + "fontFamily": "Ez a beállítás a betűkészletet határozza meg.", + "fontWeight": "Meghatározza a betűvastagságot.", + "fontSize": "Meghatározza a betű méretét, pixelekben.", + "lineHeight": "Meghatározza a sormagasságot. A 0 érték használata esetén a sormagasság a fontSize értékéből van számolva.", + "letterSpacing": "Meghatározza a betűközt, pixelekben.", + "lineNumbers": "Meghatározza, hogy megjelenjenek-e a sorszámok. A lehetséges értékek 'on', 'off' és 'relative'. A 'relative' érték használata esetén a kurzor aktuális pozíciójához képest számított sorszám jelenik meg.", + "rulers": "Azon oszlopok listája, ahol függőleges segédvonal jelenjen meg.", + "wordSeparators": "Azon karakterek listája, amelyek szóelválasztónak vannak tekintve szavakkal kapcsolatos navigáció vagy műveletek során.", + "tabSize": "Egy tabulátor hány szóköznek felel meg. Ez a beállítás felülírásra kerül a fájl tartalma alapján, ha az 'editor.detectIndentation' beállítás aktív.", + "tabSize.errorMessage": "A várt érték 'number' típusú. Megjegyzés: az \"auto\" értéket az 'editor.detectIndentation' beállítás helyettesíti.", + "insertSpaces": "Tabulátor billentyű lenyomásánál szóközök legyenek-e beszúrva. Ez a beállítás felülírásra kerül a fájl tartalma alapján, ha az 'editor.detectIndentation' beállítás aktív.", + "insertSpaces.errorMessage": "A várt érték 'boolean' típusú. Megjegyzés: az \"auto\" értéket az 'editor.detectIndentation' beállítás helyettesíti.", + "detectIndentation": "Fájl megnyitásakor az `editor.tabSize` és az `editor.insertSpaces` értéke a fájl tartalma alapján lesz meghatározva.", + "roundedSelection": "Itt adható meg, hogy a kijelölt elemek sarkai lekerekítettek legyenek-e", + "scrollBeyondLastLine": "Meghatározza, hogy a szerkesztőablak görgethető-e az utolsó sor után.", + "minimap.enabled": "Meghatározza, hogy megjelenjen-e a kódtérkép.", + "minimap.showSlider": "Meghatározza, hogy automatikusan el legyen-e rejtve a kódtérképes görgetősáv.", + "minimap.renderCharacters": "Meghatározza, hogy a tényleges karakterek legyenek-e megjelenítve (színes téglalapok helyett)", + "minimap.maxColumn": "Meghatározza, hogy a kódtérképen legfeljebb hány oszlop legyen kirajzolva.", + "find.seedSearchStringFromSelection": "Meghatározza, hogy a keresés modulba automatikusan bekerüljön-e a szerkesztőablakban kiválasztott szöveg.", + "find.autoFindInSelection": "Meghatározza, hogy a keresés a kijelölésben beállítás be van-e kapcsolva, ha több karakternyi vagy sornyi szöveg ki van jelölve a szerkesztőablakban.", + "wordWrap.off": "A sorok soha nem lesznek tördelve.", + "wordWrap.on": "A sorok tördelve lesznek a nézetablak szélességénél.", + "wordWrap.wordWrapColumn": "A sorok tördelve lesznek az `editor.wordWrapColumn` oszlopnál.", + "wordWrap.bounded": "A sorok tördelve lesznek a nézetablak szélességének és az `editor.wordWrapColumn` értékének minimumánál.", + "wordWrap": "Ez a beállítás meghatározza, hogy a sorok hogyan legyenek tördelve. Lehetséges értékek:\n- 'off' (nincs sortörés)\n- 'on' (sortörés a nézetablakban)\n- 'wordWrapColumn' (sortörés az `editor.wordWrapColumn` oszlopnál) vagy\n- 'bounded' (sortörés az `editor.wordWrapColumn` és a nézetablak minimumánál)", + "wordWrapColumn": "Meghatározza a sortöréshez használt oszlopszámot a szerkesztőablakban, ha az `editor.wordWrap` értéke 'wordWrapColumn' vagy 'bounded'.", + "wrappingIndent": "Meghatározza a tördelt sorok behúzását. Értéke 'none', 'same' vagy 'indent' lehet.", + "mouseWheelScrollSensitivity": "Az egér görgetési eseményeinél keletkező `deltaX` és `deltaY` paraméterek szorzója", + "multiCursorModifier.ctrlCmd": "Windows és Linux alatt a `Control`, OSX alatt a `Command` billentyűt jelenti.", + "multiCursorModifier.alt": "Windows és Linux alatt az `Alt`, OSX alatt az `Option` billentyűt jelenti.", + "multiCursorModifier": "Több kurzor hozzáadásához használt módosítóbillentyű. A `ctrlCmd` Windows és Linux alatt a `Control`, OSX alatt a `Command` billentyűt jelenti. A Definíció megkeresése és Hivatkozás megnyitása egérgesztusok automatikusan alkalmazkodnak úgy, hogy ne ütközzenek a többkurzorhoz tartozó módosítóval.", + "quickSuggestions.strings": "Kiegészítési javaslatok engedélyezése karakterláncokban (stringekben)", + "quickSuggestions.comments": "Kiegészítési javaslatok engedélyezése megjegyzésekben", + "quickSuggestions.other": "Kiegészítési javaslatok engedélyezése karakterláncokon (stringeken) és megjegyzéseken kívül", + "quickSuggestions": "Meghatározza, hogy automatikusan megjelenjenek-e a javaslatok gépelés közben", + "quickSuggestionsDelay": "Meghatározza, hogy hány ezredmásodperc késleltetéssel jelenjenek meg a kiegészítési javaslatok", + "parameterHints": "Paraméterinformációkat és típusinformációkat tartalmazó felugró ablak engedélyezése gépelés közben", + "autoClosingBrackets": "Meghatározza, hogy a szerkesztő automatikusan beszúrja-e a nyitó zárójelek záró párját", + "formatOnType": "Meghatározza, hogy a szerkesztő automatikusan formázza-e a sort a gépelés után", + "formatOnPaste": "Meghatározza, hogy a szerkesztő automatikusan formázza-e a beillesztett tartalmat. Ehhez szükség van egy formázóra, illetve a formázónak tudnia kell a dokumentum egy részét formázni.", + "suggestOnTriggerCharacters": "Itt adható meg, hogy eseményindító karakterek beírásakor automatikusan megjelenjenek-e a javaslatok", + "acceptSuggestionOnEnter": "Meghatározza, hogy a javaslatok az 'Enter' gomb leütésére is el legyenek fogadva a 'Tab' mellett. Segít feloldani a bizonytalanságot az új sorok beillesztése és a javaslatok elfogadása között. A 'smart' érték azt jelenti, hogy csak akkor fogadja el a javaslatot az Enter leütése esetén, ha az módosítja a szöveget.", + "acceptSuggestionOnCommitCharacter": "Meghatározza, hogy a javaslaok a zárókarakterek leütésére is el legyenek fogadva. A JavaScriptben például a pontosvessző (';') számít zárókarakternek, leütésére a javaslat elfogadásra kerül és beillesztődik az adott karakter. ", + "snippetSuggestions": "Meghatározza, hogy a kódtöredékek megjelenjenek-e a javaslatok között, illetve hogy hogyan legyenek rendezve.", + "emptySelectionClipboard": "Meghatározza, hogy kijelölés nélküli másolás esetén a teljes sor legyen-e másolva.", + "wordBasedSuggestions": "Meghatározza, hogy a kiegészítések listája a dokumentumban lévő szövegek alapján legyen-e meghatározva.", + "suggestFontSize": "Az ajánlásokat tartalmazó modul betűmérete", + "suggestLineHeight": "Az ajánlásokat tartalmazó modul sormagassága", + "selectionHighlight": "Itt adható meg, hogy a szerkesztő kiemelje-e a kijelöléshez hasonló találatokat", + "occurrencesHighlight": "Meghatározza, hogy a szerkesztőablakban ki legyenek-e emelve a szimbólum szemantikailag hozzá tartozó előfordulásai.", + "overviewRulerLanes": "Meghatározza, hogy hány dekoráció jelenhet meg azonos pozícióban az áttekintő sávon.", + "overviewRulerBorder": "Meghatározza, hogy legyen-e kerete az áttekintő sávnak.", + "cursorBlinking": "Meghatározza a kurzor animációjának stílusát. Lehetséges értékek: 'blink', 'smooth', 'phase', 'expand' vagy 'solid'", + "mouseWheelZoom": "A szerkesztőablak betűtípusának nagyítása vagy kicsinyítése az egérgörgő Ctrl lenyomása mellett történő használata esetén", + "cursorStyle": "Meghatározza a kurzor stílusát. Lehetséges értékek: 'block', 'block-outline', 'line', 'line-thin', 'underline' vagy 'underline-thin'", + "fontLigatures": "Engedélyezi a betűtípusban található ligatúrák használatát", + "hideCursorInOverviewRuler": "Meghatározza, hogy a kurzor pozíciója el legyen-e rejtve az áttekintő sávon.", + "renderWhitespace": "Meghatározza, hogy a szerkesztőablakban hogyan legyenek kirajzolva a szóköz karakterek. Lehetséges értékek: 'none', 'boundary', vagy 'all'. A 'boundary' beállítás esetén, ha szavak között egyetlen szóköz található, akkor az nem lesz kirajzolva.", + "renderControlCharacters": "Meghatározza, hogy a szerkesztőablakban ki legyenek-e rajzolva a vezérlőkarakterek.", + "renderIndentGuides": "Meghatározza, hogy a szerkesztőablakban ki legyenek-e rajzolva az indentálási segédvonalak.", + "renderLineHighlight": "Meghatározza, hogy a szerkesztőablakban hogyan legyen kirajzolva az aktuális sor kiemelése. Lehetséges értékek: 'none', 'gutter', 'line', vagy 'all'.", + "codeLens": "Meghatározza, hogy megjelenjenek-e a kódlencsék", + "folding": "Meghatározza, hogy engedélyezve van-e a kódrészletek bezárása a szerkesztőablakban.", + "showFoldingControls": "Meghatározza, hogy a kódrészletek bezárásához tartozó vezérlőelemek automatikusan el legyenek-e rejtve.", + "matchBrackets": "Zárójel kiválasztása esetén a hozzátartozó zárójel kiemelése.", + "glyphMargin": "Meghatározza, hogy legyen-e vertikális szimbólummargó a szerkesztőablakban. A szimbólummargó elsősorban hibakeresésnél van használva.", + "useTabStops": "Szóközök beillesztése és törlése során követve vannak a tabulátorok.", + "trimAutoWhitespace": "A sorok végén lévő, automatikusan beillesztett szóközök eltávolítása", + "stablePeek": "A betekintőablakok maradjanak nyitva akkor is, ha duplán kattintanak a tartalmára vagy megnyomják az Escape gombot.", + "dragAndDrop": "Meghatározza, hogy a szerkesztőablakban engedélyezett-e a kijelölt szövegrészletek áhelyezése húzással.", + "accessibilitySupport.auto": "A szerkesztő a platform által biztosított API-kat használja annak megállapításához, hogy van-e képernyőolvasó csatlakoztatva.", + "accessibilitySupport.on": "A szerkesztő folyamatos képernyőolvasóval való használatára van optimalizálva.", + "accessibilitySupport.off": "A szerkesztő soha nincs képernyőolvasó használatára optimalizálva.", + "accessibilitySupport": "Meghatározza, hogy a szerkesztő olyan módban fusson-e, ami optimalizálva van képernyőolvasóval való használathoz.", + "links": "Meghatározza, hogy a szerkesztőablak érzékelje-e a hivatkozásokat, és kattinthatóvá tegye-e őket.", + "sideBySide": "Meghatározza, hogy a differenciaszerkesztő ablakban egymás mellett vagy a sorban jelenjenek meg az eltérések", + "ignoreTrimWhitespace": "Meghatározza, hogy a differenciaszerkesztő ablakban megjelenjenek-e a sor elején vagy végén a szóközökben talált különbségek", + "renderIndicators": "Meghatározza, hogy a differenciaszerkesztő ablakban megjelenjenek-e a +/- jelzők az hozzáadott/eltávolított változásoknál", + "selectionClipboard": "Meghatározza-e, hogy támogatva van-e az elsődleges vágólap Linux alatt" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/hun/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..6a2e047821187 --- /dev/null +++ b/i18n/hun/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "accessibilityOffAriaLabel": "A szerkesztőablak jelenleg nem elérhető. Nyomja meg az Alt+F1-et a beállítási lehetőségek megjelenítéséhez!", + "editorViewAccessibleLabel": "Szerkesztőablak tartalma" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/controller/cursor.i18n.json b/i18n/hun/src/vs/editor/common/controller/cursor.i18n.json new file mode 100644 index 0000000000000..6b33fa4e18eca --- /dev/null +++ b/i18n/hun/src/vs/editor/common/controller/cursor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "corrupt.commands": "Váratlan kivétel egy parancs végrehajtása során." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/model/textModelWithTokens.i18n.json b/i18n/hun/src/vs/editor/common/model/textModelWithTokens.i18n.json new file mode 100644 index 0000000000000..41687561a2e4b --- /dev/null +++ b/i18n/hun/src/vs/editor/common/model/textModelWithTokens.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mode.tokenizationSupportFailed": "Ebben az üzemmódban nem sikerült lexikális elemekre bontani a bemenetet." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/modes/modesRegistry.i18n.json b/i18n/hun/src/vs/editor/common/modes/modesRegistry.i18n.json new file mode 100644 index 0000000000000..26fe7e29f4c19 --- /dev/null +++ b/i18n/hun/src/vs/editor/common/modes/modesRegistry.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "plainText.alias": "Egyszerű szöveg" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/hun/src/vs/editor/common/services/bulkEdit.i18n.json new file mode 100644 index 0000000000000..b0bbd29edb052 --- /dev/null +++ b/i18n/hun/src/vs/editor/common/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "A következő fájlok módosultak időközben: {0}", + "summary.0": "Nem történtek változtatások", + "summary.nm": "{0} változtatást végzett {0} fájlban", + "summary.n0": "{0} változtatást végzett egy fájlban" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/services/modeServiceImpl.i18n.json b/i18n/hun/src/vs/editor/common/services/modeServiceImpl.i18n.json new file mode 100644 index 0000000000000..b85462146b6e1 --- /dev/null +++ b/i18n/hun/src/vs/editor/common/services/modeServiceImpl.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.languages": "Nyelvdeklarációkat szolgáltat.", + "vscode.extension.contributes.languages.id": "A nyelv azonosítója", + "vscode.extension.contributes.languages.aliases": "A nyelv kiegészítő nevei.", + "vscode.extension.contributes.languages.extensions": "A nyelvhez hozzárendelt fájlkiterjesztések.", + "vscode.extension.contributes.languages.filenames": "A nyelvhez hozzárendelt fájlnevek.", + "vscode.extension.contributes.languages.filenamePatterns": "A nyelvhez hozzárendelt globális minták.", + "vscode.extension.contributes.languages.mimetypes": "A nyelvhez hozzárendelt MIME-típusok.", + "vscode.extension.contributes.languages.firstLine": "Reguláris kifejezés, ami az adott nyelven írt fájl első sorára illeszkedik.", + "vscode.extension.contributes.languages.configuration": "A nyelvhez tartozó konfigurációkat tartalmazó fájl relatív elérési útja." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/services/modelServiceImpl.i18n.json b/i18n/hun/src/vs/editor/common/services/modelServiceImpl.i18n.json new file mode 100644 index 0000000000000..a12e01358bbaf --- /dev/null +++ b/i18n/hun/src/vs/editor/common/services/modelServiceImpl.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "diagAndSourceMultiline": "[{0}]\n{1}", + "diagAndSource": "[{0}] {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/hun/src/vs/editor/common/view/editorColorRegistry.i18n.json new file mode 100644 index 0000000000000..94d90edc0717e --- /dev/null +++ b/i18n/hun/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lineHighlight": "A kurzor pozícióján található sor kiemelési háttérszíne.", + "lineHighlightBorderBox": "A kurzor pozícióján található sor keretszíne.", + "rangeHighlight": "A kiemelt területek háttérszíne, pl. a gyors megnyitás és keresés funkcióknál.", + "caret": "A szerkesztőablak kurzorának színe.", + "editorWhitespaces": "A szerkesztőablakban található szóköz karakterek színe.", + "editorIndentGuides": "A szerkesztőablak segédvonalainak színe.", + "editorLineNumbers": "A szerkesztőablak sorszámainak színe.", + "editorRuler": "A szerkesztőablak sávjainak színe.", + "editorCodeLensForeground": "A szerkesztőablakban található kódlencsék előtérszíne", + "editorBracketMatchBackground": "Hozzátartozó zárójelek háttérszíne", + "editorBracketMatchBorder": "Az összetartozó zárójelek dobozának színe", + "editorOverviewRulerBorder": "Az áttekintő sáv keretszíne.", + "editorGutter": "A szerkesztőablag margójának háttérszíne. A margón található a szimbólummargó és a sorszámok.", + "errorForeground": "A hibákat jelző hullámvonal előtérszíne a szerkesztőablakban.", + "errorBorder": "A hibákat jelző hullámvonal keretszíne a szerkesztőablakban.", + "warningForeground": "A figyelmeztetéseket jelző hullámvonal előtérszíne a szerkesztőablakban.", + "warningBorder": "A figyelmeztetéseket jelző hullámvonal keretszíne a szerkesztőablakban." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json b/i18n/hun/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json new file mode 100644 index 0000000000000..647a263affcf5 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "Ugrás a zárójelre" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json b/i18n/hun/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json new file mode 100644 index 0000000000000..1fc37d076840c --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "Kurzor mozgatása balra", + "caret.moveRight": "Kurzor mozgatása jobbra" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json b/i18n/hun/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json new file mode 100644 index 0000000000000..e8cbbca5cf4d6 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "Betűk megcserélése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json b/i18n/hun/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json new file mode 100644 index 0000000000000..09439c237cb30 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "Kivágás", + "actions.clipboard.copyLabel": "Másolás", + "actions.clipboard.pasteLabel": "Beillesztés", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "Másolás szintaktikai kiemeléssel" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/comment/common/comment.i18n.json b/i18n/hun/src/vs/editor/contrib/comment/common/comment.i18n.json new file mode 100644 index 0000000000000..219553bdc4e1a --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/comment/common/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "Egysoros megjegyzés ki-/bekapcsolása", + "comment.line.add": "Egysoros megjegyzés hozzáadása", + "comment.line.remove": "Egysoros megjegyzés eltávolítása", + "comment.block": "Megjegyzésblokk ki-/bekapcsolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json b/i18n/hun/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json new file mode 100644 index 0000000000000..78d9a20aae1c9 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "Szerkesztőablak helyi menüjének megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/find/browser/findWidget.i18n.json b/i18n/hun/src/vs/editor/contrib/find/browser/findWidget.i18n.json new file mode 100644 index 0000000000000..2e445d0ec2eb9 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/find/browser/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Keresés", + "placeholder.find": "Keresés", + "label.previousMatchButton": "Előző találat", + "label.nextMatchButton": "Következő találat", + "label.toggleSelectionFind": "Keresés kijelölésben", + "label.closeButton": "Bezárás", + "label.replace": "Csere", + "placeholder.replace": "Csere", + "label.replaceButton": "Csere", + "label.replaceAllButton": "Az összes előfordulás cseréje", + "label.toggleReplaceButton": "Váltás csere módra", + "title.matchesCountLimit": "Csak az első 999 találat van kiemelve, de minden keresési művelet a teljes szöveggel dolgozik.", + "label.matchesLocation": "{0} (összesen {1})", + "label.noResults": "Nincs eredmény" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/hun/src/vs/editor/contrib/find/common/findController.i18n.json new file mode 100644 index 0000000000000..4b84cd4d15b3f --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/find/common/findController.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "Keresés", + "findNextMatchAction": "Következő találat", + "findPreviousMatchAction": "Előző találat", + "nextSelectionMatchFindAction": "Következő kijelölés", + "previousSelectionMatchFindAction": "Előző kijelölés", + "startReplace": "Csere", + "addSelectionToNextFindMatch": "Kijelölés hozzáadása a következő keresési találathoz", + "addSelectionToPreviousFindMatch": "Kijelölés hozzáadása az előző keresési találathoz", + "moveSelectionToNextFindMatch": "Utolsó kijelölés áthelyezése a következő keresési találatra", + "moveSelectionToPreviousFindMatch": "Utolsó kijelölés áthelyezése az előző keresési találatra", + "changeAll.label": "Minden előfordulás módosítása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/folding/browser/folding.i18n.json b/i18n/hun/src/vs/editor/contrib/folding/browser/folding.i18n.json new file mode 100644 index 0000000000000..07da29ad41aa9 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/folding/browser/folding.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "Kibontás", + "unFoldRecursivelyAction.label": "Kibontás rekurzívan", + "foldAction.label": "Bezárás", + "foldRecursivelyAction.label": "Bezárás rekurzívan", + "foldAllAction.label": "Az összes bezárása", + "unfoldAllAction.label": "Az összes kinyitása", + "foldLevelAction.label": "{0} szintű blokkok bezárása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/hun/src/vs/editor/contrib/format/browser/formatActions.i18n.json new file mode 100644 index 0000000000000..6ef4ffd2eedc1 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "Egy formázást végzett a(z) {0}. sorban", + "hintn1": "{0} formázást végzett a(z) {1}. sorban", + "hint1n": "Egy formázást végzett a(z) {0}. és {1}. sorok között", + "hintnn": "{0} formázást végzett a(z) {1}. és {2}. sorok között", + "formatDocument.label": "Dokumentum formázása", + "formatSelection.label": "Kijelölt tartalom formázása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/hun/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..50e0679aba908 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "Nem található a(z) '{0}' definíciója", + "generic.noResults": "Definíció nem található", + "meta.title": " – {0} definíció", + "actions.goToDecl.label": "Ugrás a definícióra", + "actions.goToDeclToSide.label": "Definíció megnyitása oldalt", + "actions.previewDecl.label": "Betekintés a definícióba", + "goToImplementation.noResultWord": "Nem található a(z) '{0}' implementációja", + "goToImplementation.generic.noResults": "Implementáció nem található", + "meta.implementations.title": " – {0} implementáció", + "actions.goToImplementation.label": "Ugrás az implementációra", + "actions.peekImplementation.label": "Betekintés az implementációba", + "goToTypeDefinition.noResultWord": "Nem található a(z) '{0}' típusdefiníciója", + "goToTypeDefinition.generic.noResults": "Típusdefiníció nem található", + "meta.typeDefinitions.title": " – {0} típusdefiníció", + "actions.goToTypeDefinition.label": "Ugrás a típusdefinícióra", + "actions.peekTypeDefinition.label": "Betekintés a típusdefinícióba" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/hun/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..782190fef044c --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "Kattintson {0} definíció megjelenítéséhez." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json b/i18n/hun/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json new file mode 100644 index 0000000000000..ce65a365e4533 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "Következő hiba vagy figyelmeztetés", + "markerAction.previous.label": "Előző hiba vagy figyelmeztetés", + "editorMarkerNavigationError": "A szerkesztőablak jelzőnavigációs moduljának színe hiba esetén.", + "editorMarkerNavigationWarning": "A szerkesztőablak jelzőnavigációs moduljának színe figyelmeztetés esetén.", + "editorMarkerNavigationBackground": "A szerkesztőablak jelzőnavigációs moduljának háttérszíne." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/hun/src/vs/editor/contrib/hover/browser/hover.i18n.json new file mode 100644 index 0000000000000..e9de48281ee8f --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "Súgószöveg megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json b/i18n/hun/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json new file mode 100644 index 0000000000000..a9cab1dd0d559 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "Betöltés..." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json b/i18n/hun/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json new file mode 100644 index 0000000000000..0339e509b33a4 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "Csere az előző értékre", + "InPlaceReplaceAction.next.label": "Csere a következő értékre" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/indentation/common/indentation.i18n.json b/i18n/hun/src/vs/editor/contrib/indentation/common/indentation.i18n.json new file mode 100644 index 0000000000000..4b8870d20ac8b --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/indentation/common/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "Indentálások átalakítása szóközökké", + "indentationToTabs": "Indentálások átalakítása tabulátorokká", + "configuredTabSize": "Beállított tabulátorméret", + "selectTabWidth": "Tabulátorméret kiválasztása az aktuális fájlhoz", + "indentUsingTabs": "Indentálás tabulátorral", + "indentUsingSpaces": "Indentálás szóközzel", + "detectIndentation": "Indentálás felismerése a tartalom alapján", + "editor.reindentlines": "Sorok újraindentálása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json b/i18n/hun/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json new file mode 100644 index 0000000000000..d5c935359b070 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "Sor másolása eggyel feljebb", + "lines.copyDown": "Sor másolása eggyel lejjebb", + "lines.moveUp": "Sor feljebb helyezése", + "lines.moveDown": "Sor lejjebb helyezése", + "lines.sortAscending": "Rendezés növekvő sorrendben", + "lines.sortDescending": "Rendezés csökkenő sorrendben", + "lines.trimTrailingWhitespace": "Sor végén található szóközök levágása", + "lines.delete": "Sor törlése", + "lines.indent": "Sor behúzása", + "lines.outdent": "Sor kihúzása", + "lines.insertBefore": "Sor beszúrása eggyel feljebb", + "lines.insertAfter": "Sor beszúrása eggyel lejjebb", + "lines.deleteAllLeft": "Balra lévő tartalom törlése", + "lines.deleteAllRight": "Jobbra lévő tartalom törlése", + "lines.joinLines": "Sorok egyesítése", + "editor.transpose": "A kurzor körüli karakterek felcserélése", + "editor.transformToUppercase": "Átalakítás nagybetűssé", + "editor.transformToLowercase": "Átalakítás kisbetűssé" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/hun/src/vs/editor/contrib/links/browser/links.i18n.json new file mode 100644 index 0000000000000..ece9320a75896 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/links/browser/links.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "Hivatkozott oldal megnyitása Cmd + kattintás paranccsal", + "links.navigate": "Hivatkozott oldal megnyitása Ctrl + kattintás paranccsal", + "links.navigate.al": "Hivatkozás megnyitása Alt + kattintás paranccsal", + "invalid.url": "A hivatkozást nem sikerült megnyitni, mert nem jól formázott: {0}", + "missing.url": "A hivatkozást nem sikerült megnyitni, hiányzik a célja.", + "label": "Hivatkozás megnyitása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json b/i18n/hun/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json new file mode 100644 index 0000000000000..8aa3dbca9ff72 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "Kurzor beszúrása egy sorral feljebb", + "mutlicursor.insertBelow": "Kurzor beszúrása egy sorral lejjebb", + "mutlicursor.insertAtEndOfEachLineSelected": "Kurzor beszúrása a sorok végére" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json b/i18n/hun/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json new file mode 100644 index 0000000000000..973e6d7ae912e --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "Paraméterinformációk megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json b/i18n/hun/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json new file mode 100644 index 0000000000000..f05a169d614ff --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0}, információ" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json b/i18n/hun/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json new file mode 100644 index 0000000000000..1fef02c03eb52 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "Javítások megjelenítése ({0})", + "quickFix": "Javítások megjelenítése", + "quickfix.trigger.label": "Gyorsjavítás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json b/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json new file mode 100644 index 0000000000000..bc4f4f5abd630 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": " – {0} referencia", + "references.action.label": "Minden hivatkozás megkeresése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json b/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json new file mode 100644 index 0000000000000..b93a507d5d9bd --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "Betöltés..." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json new file mode 100644 index 0000000000000..4ab9002859c96 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "szimbólum a következő helyen: {0}, sor: {1}, oszlop: {2}", + "aria.fileReferences.1": "Egy szimbólum a következő helyen: {0}, teljes elérési út: {1}", + "aria.fileReferences.N": "{0} szimbólum a következő helyen: {1}, teljes elérési út: {2}", + "aria.result.0": "Nincs találat", + "aria.result.1": "Egy szimbólum a következő helyen: {0}", + "aria.result.n1": "{0} szimbólum a következő helyen: {1}", + "aria.result.nm": "{0} szimbólum {1} fájlban" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json new file mode 100644 index 0000000000000..2701fadac42d9 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "Nem sikerült feloldani a fájlt.", + "referencesCount": "{0} referencia", + "referenceCount": "{0} referencia", + "missingPreviewMessage": "előnézet nem érhető el", + "treeAriaLabel": "Referenciák", + "noResults": "Nincs eredmény", + "peekView.alternateTitle": "Referenciák", + "peekViewTitleBackground": "A betekintőablak címsorának háttérszíne.", + "peekViewTitleForeground": "A betekintőablak címének színe.", + "peekViewTitleInfoForeground": "A betekintőablak címsorában található információ színe.", + "peekViewBorder": "A betekintőablak keretének és nyilainak színe.", + "peekViewResultsBackground": "A betekintőablak eredménylistájának háttérszíne.", + "peekViewResultsMatchForeground": "A betekintőablak eredménylistájában található sorhivatkozások előtérszíne.", + "peekViewResultsFileForeground": "A betekintőablak eredménylistájában található fájlhivatkozások előtérszíne.", + "peekViewResultsSelectionBackground": "A betekintőablak eredménylistájában kiválaszott elem háttérszíne.", + "peekViewResultsSelectionForeground": "A betekintőablak eredménylistájában kiválaszott elem előtérszíne.", + "peekViewEditorBackground": "A betekintőablak szerkesztőablakának háttérszíne.", + "peekViewEditorGutterBackground": "A betekintőablak szerkesztőablakában található margó háttérszíne.", + "peekViewResultsMatchHighlight": "Kiemelt keresési eredmények színe a betekintőablak eredménylistájában.", + "peekViewEditorMatchHighlight": "Kiemelt keresési eredmények színe a betekintőablak szerkesztőablakában." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/hun/src/vs/editor/contrib/rename/browser/rename.i18n.json new file mode 100644 index 0000000000000..c6eac10add61f --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "Nincs eredmény.", + "aria": "'{0}' sikeresen át lett nevezve a következőre: '{1}'. Összefoglaló: {2}", + "rename.failed": "Az átnevezést nem sikerült végrehajtani.", + "rename.label": "Szimbólum átnevezése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json b/i18n/hun/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json new file mode 100644 index 0000000000000..cd26c078ae05b --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "Átnevezésre szolgáló beviteli mező. Adja meg az új nevet, majd nyomja meg az Enter gombot a változtatások elvégzéséhez." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json b/i18n/hun/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json new file mode 100644 index 0000000000000..463be33cb03fa --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "Kijelölés bővítése", + "smartSelect.shrink": "Kijelölés szűkítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/hun/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json new file mode 100644 index 0000000000000..d7050253ff13e --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "A(z) '{0}' elfogadása a következő szöveg beszúrását eredményezte: {1}", + "suggest.trigger.label": "Javaslatok megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/hun/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json new file mode 100644 index 0000000000000..1ea907a2db039 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "A javaslatokat tartalmazó modul háttérszíne.", + "editorSuggestWidgetBorder": "A javaslatokat tartalmazó modul keretszíne.", + "editorSuggestWidgetForeground": "A javaslatokat tartalmazó modul előtérszíne.", + "editorSuggestWidgetSelectedBackground": "A javaslatokat tartalmazó modulban kiválasztott elem háttérszíne.", + "editorSuggestWidgetHighlightForeground": "Az illeszkedő szövegrészletek kiemelése a javaslatok modulban.", + "readMore": "További információk megjelenítése...{0}", + "suggestionWithDetailsAriaLabel": "{0}, javaslat, részletekkel", + "suggestionAriaLabel": "{0}, javaslat", + "readLess": "Kevesebb információ megjelenítése...{0}", + "suggestWidget.loading": "Betöltés...", + "suggestWidget.noSuggestions": "Nincsenek javaslatok.", + "suggestionAriaAccepted": "{0}, elfogadva", + "ariaCurrentSuggestionWithDetails": "{0}, javaslat, részletekkel", + "ariaCurrentSuggestion": "{0}, javaslat" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json b/i18n/hun/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json new file mode 100644 index 0000000000000..dc4360652cbf4 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "Tab billentyűvel mozgatott fókusz ki- és bekapcsolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json b/i18n/hun/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json new file mode 100644 index 0000000000000..6192eaea44a97 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "Szimbólumok háttérszíne olvasási hozzáférés, páldául változó olvasása esetén.", + "wordHighlightStrong": "Szimbólumok háttérszíne írási hozzáférés, páldául változó írása esetén." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json b/i18n/hun/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json new file mode 100644 index 0000000000000..a40829f1ae605 --- /dev/null +++ b/i18n/hun/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Bezárás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json b/i18n/hun/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json new file mode 100644 index 0000000000000..be4ee2e798998 --- /dev/null +++ b/i18n/hun/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "Ismeretlen nyelv található a következőben: `contributes.{0}.language`. A megadott érték: {1}", + "invalid.scopeName": "Hiányzó karakterlánc a `contributes.{0}.scopeName`-ben. A megadott érték: {1}", + "invalid.path.0": "Hiányzó karakterlánc a `contributes.{0}.path`-ban. A megadott érték: {1}", + "invalid.injectTo": "A `contributes.{0}.injectTo` értéke érvénytelen. Az értéke egy tömb lehet, ami nyelvhatókörök neveit tartalmazza. A megadott érték: {1}", + "invalid.embeddedLanguages": "A `contributes.{0}.embeddedLanguages` értéke érvénytelen. Az értéke egy hatókörnév-nyelv kulcs-érték párokat tartalmazó objektum lehet. A megadott érték: {1}", + "invalid.path.1": "A `contributes.{0}.path` ({1}) nem a kiegészítő mappáján belül található ({2}). Emiatt előfordulhat, hogy a kiegészítő nem lesz hordozható.", + "no-tm-grammar": "Nincs TM Grammar regisztrálva ehhez a nyelvhez." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/hun/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..45673b13e303e --- /dev/null +++ b/i18n/hun/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "Hiba a(z) {0} feldolgozása közben: {1}", + "schema.openBracket": "A nyitó zárójelet definiáló karakter vagy karaktersorozat", + "schema.closeBracket": "A záró zárójelet definiáló karakter vagy karaktersorozat", + "schema.comments": "Meghatározza a megjegyzésszimbólumokat", + "schema.blockComments": "Meghatározza, hogyan vannak jelölve a megjegyzésblokkok.", + "schema.blockComment.begin": "A megjegyzésblokk kezdetét definiáló karaktersorozat.", + "schema.blockComment.end": "A megjegyzésblokk végét definiáló karaktersorozat.", + "schema.lineComment": "A megjegyzéssor kezdetét definiáló karaktersorozat.", + "schema.brackets": "Meghatározza azokat a zárójelszimbólumokat, amelyek növeik vagy csökkentik az indentálást.", + "schema.autoClosingPairs": "Meghatározza a zárójelpárokat. Ha egy nyitó zárójelet írnak be a szerkesztőbe, a záró párja automatikusan be lesz illesztve.", + "schema.autoClosingPairs.notIn": "Azon hatókörök listája, ahol az automatikus zárójelek automatikus párosítása le van tiltve.", + "schema.surroundingPairs": "Meghatározza azok zárójelpárok listáját, melyek használhatók a kijelölt szöveg körbezárására.", + "schema.wordPattern": "A nyelvben található szavak definíciója.", + "schema.wordPattern.pattern": "A szavak illesztésére használt reguláris kifejezés.", + "schema.wordPattern.flags": "A szavak illesztésére használt reguláris kifejezés beállításai.", + "schema.wordPattern.flags.errorMessage": "Illeszkednie kell a következő mintára: `/^([gimuy]+)$/`." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/editor/node/textMate/TMGrammars.i18n.json b/i18n/hun/src/vs/editor/node/textMate/TMGrammars.i18n.json new file mode 100644 index 0000000000000..4ae6117a727d9 --- /dev/null +++ b/i18n/hun/src/vs/editor/node/textMate/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "TextMate-tokenizálókat szolgáltat.", + "vscode.extension.contributes.grammars.language": "Annak a nyelvnek az azonosítója, amely számára szolgáltatva van ez a szintaxis.", + "vscode.extension.contributes.grammars.scopeName": "A tmLanguage-fájl által használt TextMate-hatókör neve.", + "vscode.extension.contributes.grammars.path": "A tmLanguage-fájl elérési útja. Az elérési út relatív a kiegészítő mappájához képest, és általában './syntaxes/'-zal kezdődik.", + "vscode.extension.contributes.grammars.embeddedLanguages": "Hatókörnév-nyelvazonosító kulcs-érték párokat tartalmazó objektum, ha a nyelvtan tartalmaz beágyazott nyelveket.", + "vscode.extension.contributes.grammars.injectTo": "Azon nyelvi hatókörök nevei, ahová be lesz ágyazva ez a nyelvtan." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/actions/browser/menuItemActionItem.i18n.json b/i18n/hun/src/vs/platform/actions/browser/menuItemActionItem.i18n.json new file mode 100644 index 0000000000000..e64a7d0ed09f0 --- /dev/null +++ b/i18n/hun/src/vs/platform/actions/browser/menuItemActionItem.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "titleAndKb": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/hun/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json new file mode 100644 index 0000000000000..e935364b995c1 --- /dev/null +++ b/i18n/hun/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "a menüelemeket tömbként kell megadni", + "requirestring": "a(z) `{0}` tulajdonság kötelező és `string` típusúnak kell lennie", + "optstring": "a(z) `{0}` tulajdonság elhagyható vagy `string` típusúnak kell lennie", + "vscode.extension.contributes.menuItem.command": "A végrehajtandó parancs azonosítója. A parancsot a 'commands'-szakaszban kell deklarálni", + "vscode.extension.contributes.menuItem.alt": "Egy alternatív végrehajtandó parancs azonosítója. A parancsot a 'commands'-szakaszban kell deklarálni", + "vscode.extension.contributes.menuItem.when": "A feltételnek igaznak kell lennie az elem megjelenítéséhez", + "vscode.extension.contributes.menuItem.group": "A csoport, amibe a parancs tartozik", + "vscode.extension.contributes.menus": "Menüket szolgáltat a szerkesztőhöz", + "menus.commandPalette": "A parancskatalógus", + "menus.editorTitle": "A szerkesztőablak címsora menüje", + "menus.editorContext": "A szerkesztőablak helyi menüje", + "menus.explorerContext": "A fájlkezelő helyi menüje", + "menus.editorTabContext": "A szerkesztőablak füleinek helyi menüje", + "menus.debugCallstackContext": "A hibakeresési hívási verem helyi menüje", + "menus.scmTitle": "A verziókezelő címsora menüje", + "menus.resourceGroupContext": "A verziókezelő erőforráscsoportja helyi menüje", + "menus.resourceStateContext": "A verziókzeleő erőforrásállapot helyi menüje", + "view.viewTitle": "A szolgáltatott nézet címsorának menüje", + "view.itemContext": "A szolgáltatott nézet elemének helyi menüje", + "nonempty": "az érték nem lehet üres.", + "opticon": "a(z) `icon` tulajdonság elhagyható vagy ha van értéke, akkor string vagy literál (pl. `{dark, light}`) típusúnak kell lennie", + "requireStringOrObject": "a(z) `{0}` tulajdonság kötelező és `string` vagy `object` típusúnak kell lennie", + "requirestrings": "a(z) `{0}` és `{1}` tulajdonságok kötelezők és `string` típusúnak kell lenniük", + "vscode.extension.contributes.commandType.command": "A végrehajtandó parancs azonosítója", + "vscode.extension.contributes.commandType.title": "A cím, amivel a parancs meg fog jelenni a felhasználói felületen", + "vscode.extension.contributes.commandType.category": "(Nem kötelező) Kategória neve, amibe a felületen csoportosítva lesz a parancs", + "vscode.extension.contributes.commandType.icon": "(Nem kötelező) Ikon, ami reprezentálni fogja a parancsot a felhasználói felületen. Egy fájl elérési útja vagy egy színtéma-konfiguráció", + "vscode.extension.contributes.commandType.icon.light": "Az ikon elérési útja, ha világos téma van használatban", + "vscode.extension.contributes.commandType.icon.dark": "Az ikon elérési útja, ha sötét téma van használatban", + "vscode.extension.contributes.commands": "Parancsokat szolgáltat a parancskatalógushoz.", + "dup": "A(z) `{0}` parancs többször szerepel a `commands`-szakaszban.", + "menuId.invalid": "A(z) `{0}` nem érvényes menüazonosító", + "missing.command": "A menüpont a(z) `{0}` parancsra hivatkozik, ami nincs deklarálva a 'commands'-szakaszban.", + "missing.altCommand": "A menüpont a(z) `{0}` alternatív parancsra hivatkozik, ami nincs deklarálva a 'commands'-szakaszban.", + "dupe.command": "A menüpont ugyanazt a parancsot hivatkozza alapértelmezett és alternatív parancsként", + "nosupport.altCommand": "Jelenleg csak az 'editor/title' menü 'navigation' csoportja támogatja az alternatív parancsokat" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/hun/src/vs/platform/configuration/common/configurationRegistry.i18n.json new file mode 100644 index 0000000000000..bfd5f7e168cf7 --- /dev/null +++ b/i18n/hun/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultConfigurations.title": "Felülírt alapértelmezett konfigurációk", + "overrideSettings.description": "A szerkesztő beállításainak felülírása a(z) {0} nyelvre vonatkozóan", + "overrideSettings.defaultDescription": "A szerkesztő beállításainak felülírása egy adott nyelvre vonatkozóan", + "vscode.extension.contributes.configuration": "Konfigurációs beállításokat szolgáltat.", + "vscode.extension.contributes.configuration.title": "A beállítások összefoglaló leírása. Ez a címke jelenik meg a beállítások fájlban egy különálló megjegyzésként.", + "vscode.extension.contributes.configuration.properties": "A konfigurációs tulajdonságok leírása.", + "config.property.languageDefault": "A(z) '{0}' nem regisztrálható. Ez a beállítás illeszkedik a '\\\\[.*\\\\]$' mintára, ami a nyelvspecifikus szerkesztőbeállításokhoz van használva. Használja a 'configurationDefaults' szolgáltatási lehetőséget.", + "config.property.duplicate": "A(z) '{0}' nem regisztrálható: ez a tulajdonság már regisztrálva van.", + "invalid.properties": "A 'configuration.properties' értékét egy objektumként kell megadni", + "invalid.type": "ha meg van adva, a 'configuration.type' értékét egy objektumként kell megadnii", + "invalid.title": "a 'configuration.title' értékét karakterláncként kell megadni", + "vscode.extension.contributes.defaultConfiguration": "Adott nyelvre vonatkozóan szerkesztőbeállításokat szolgáltat." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/environment/node/argv.i18n.json b/i18n/hun/src/vs/platform/environment/node/argv.i18n.json new file mode 100644 index 0000000000000..e6ca14e40be7d --- /dev/null +++ b/i18n/hun/src/vs/platform/environment/node/argv.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoValidation": "`--goto` mód esetén az argumentumokat a következő formában kell megadni: `FÁJL(:SOR(:OSZLOP))`.", + "diff": "Megnyit egy diffszerkesztőt. Argumentumként két fájl elérési útját kell átadni.", + "goto": "Megnyitja a megadott elérési úton található fájlt a megadott sornál és oszlopnál (a :sor[:oszlop] információt az elérési út végére kell fűzni)", + "locale": "A használt lokalizáció (pl. en-US vagy zh-TW)", + "newWindow": "Mindenképp induljon új példány a Code-ból.", + "performance": "Indítás a 'Developer: Startup Performance' parancs engedélyezésével.", + "prof-startup": "Processzorhasználat profilozása induláskor", + "reuseWindow": "Fájl vagy mappa megnyitása a legutoljára aktív ablakban.", + "userDataDir": "Meghatározza a könyvtárat, ahol a felhasználói adatok vannak tárolva. Hasznás, ha rootként van futtatva.", + "verbose": "Részletes kimenet kiírása (magába foglalja a --wait kapcsolót)", + "wait": "Várjon az ablak bezárására a visszatérés előtt.", + "extensionHomePath": "A kiegészítők gyökérkönyvtárának beállítása.", + "listExtensions": "Telepített kiegészítők listázása.", + "showVersions": "Telepített kiegészítők verziójának megjelenítése a --list-extension kapcsoló használata esetén.", + "installExtension": "Kiegészítő telepítése.", + "uninstallExtension": "Kiegészítő eltávolítása.", + "experimentalApis": "Tervezett API-funkciók engedélyezése egy kiegészítő számára.", + "disableExtensions": "Összes telepített kiegészítő letiltása.", + "disableGPU": "Hardveres gyorsítás letiltása.", + "version": "Verzió kiírása.", + "help": "Használati útmutató kiírása.", + "usage": "Használat", + "options": "beállítások", + "paths": "elérési utak", + "optionsUpperCase": "Beálítások" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json b/i18n/hun/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json new file mode 100644 index 0000000000000..5da094f11e357 --- /dev/null +++ b/i18n/hun/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "Nincs munkaterület." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json b/i18n/hun/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json new file mode 100644 index 0000000000000..c6aca38bd35a8 --- /dev/null +++ b/i18n/hun/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "Kiegészítők", + "preferences": "Beállítások" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/hun/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json new file mode 100644 index 0000000000000..62fa385ee0481 --- /dev/null +++ b/i18n/hun/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "Kiegészítő nem található", + "noCompatible": "A(z) {0} kiegészítőnek nincs ezzel a Code-verzióval kompatibilis változata." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/hun/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json new file mode 100644 index 0000000000000..9a21167685a8b --- /dev/null +++ b/i18n/hun/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalidManifest": "A kiegészítő érvénytelen: a package.json nem egy JSON-fájl.", + "restartCode": "Indítsa újra a Code-ot a(z) {0} újratelepítése előtt.", + "installDependeciesConfirmation": "A(z) '{0}' teleítése során annak függőségei is telepítve lesznek. Szeretné folytatni?", + "install": "Igen", + "doNotInstall": "Nem", + "uninstallDependeciesConfirmation": "Csak a(z) '{0}' kiegészítőt szeretné eltávolítani vagy annak függőségeit is?", + "uninstallOnly": "Csak ezt", + "uninstallAll": "Mindent", + "cancel": "Mégse", + "uninstallConfirmation": "Biztosan szeretné eltávolítani a(z) '{0}' kiegészítőt?", + "ok": "OK", + "singleDependentError": "Nem sikerült eltávolítani a(z) '{0}' kiegészítőt: a(z) '{1}' kiegészítő függ tőle.", + "twoDependentsError": "Nem sikerült eltávolítani a(z) '{0}' kiegészítőt: a(z) '{1}' és '{2}' kiegészítők függnek tőle.", + "multipleDependentsError": "Nem sikerült eltávolítani a(z) '{0}' kiegészítőt: a(z) '{1}', '{2}' és más kiegészítők függnek tőle.", + "notExists": "Nem sikerült megtalálni a kiegészítőt" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/extensions/common/abstractExtensionService.i18n.json b/i18n/hun/src/vs/platform/extensions/common/abstractExtensionService.i18n.json new file mode 100644 index 0000000000000..a4e5d9f9437b0 --- /dev/null +++ b/i18n/hun/src/vs/platform/extensions/common/abstractExtensionService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownDep": "A(z) `{1}` kiegészítőt nem sikerült aktiválni. Oka: ismeretlen függőség: `{0}`.", + "failedDep1": "A(z) `{1}` kiegészítőt nem sikerült aktiválni. Oka: a(z) `{0}` függőséget nem sikerült aktiválni.", + "failedDep2": "A(z) `{0}` kiegészítőt nem sikerült aktiválni. Oka: több, mint 10 szintnyi függőség van (nagy valószínűséggel egy függőségi hurok miatt).", + "activationError": "A(z) `{0}` kiegészítő aktiválása nem sikerült: {1}." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/hun/src/vs/platform/extensions/common/extensionsRegistry.i18n.json new file mode 100644 index 0000000000000..d7c85757ebd94 --- /dev/null +++ b/i18n/hun/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.engines.vscode": "VS Code kiegészítőkhöz. Meghatározza azt a VS Code-verziót, amivel a kiegészítő kompatibilis. Nem lehet *. Például a ^0.10.5 a VS Code minimum 0.10.5-ös verziójával való kompatibilitást jelzi.", + "vscode.extension.publisher": "A VS Code-kiegészítő kiadója.", + "vscode.extension.displayName": "A kiegészítő VS Code galériában megjelenített neve.", + "vscode.extension.categories": "A VS Code-galériában való kategorizálásra használt kategóriák.", + "vscode.extension.galleryBanner": "A VS Code piactéren használt szalagcím.", + "vscode.extension.galleryBanner.color": "A VS Code piactéren használt szalagcím színe.", + "vscode.extension.galleryBanner.theme": "A szalagcímben használt betűtípus színsémája.", + "vscode.extension.contributes": "A csomagban található összes szolgáltatás, amit ez a VS Code kiterjesztés tartalmaz.", + "vscode.extension.preview": "A kiegészítő előnézetesnek jelölése a piactéren.", + "vscode.extension.activationEvents": "A VS Code kiegészítő aktiválási eseményei.", + "vscode.extension.activationEvents.onLanguage": "Aktiváló esemény, ami akkor fut le, ha az adott nyelvhez társított fájl kerül megnyitásra.", + "vscode.extension.activationEvents.onCommand": "Aktiváló esemény, ami akkor fut le, amikor a megadott parancsot meghívják.", + "vscode.extension.activationEvents.onDebug": "Aktiváló esemény, ami akkor fut le, amikor elindul az adott típusú hibakeresési folyamat.", + "vscode.extension.activationEvents.workspaceContains": "Aktiváló esemény, ami akkor fut le, ha egy olyan mappa kerül megnyitásra, amiben legalább egy olyan fájl van, amely illeszkedik a megadott globális mintára.", + "vscode.extension.activationEvents.onView": "Aktiváló esemény, ami akkor fut le, amikor a megadott nézetet kiterjesztik.", + "vscode.extension.activationEvents.star": "Aktiváló esemény, ami a VS Code indításakor fut le. A jó felhasználói élmény érdekében csak akkor használja ezt az eseményt, ha más aktiváló események nem alkalmasak az adott kiegészítő esetében.", + "vscode.extension.badges": "A kiegészítő piactéren található oldalának oldalsávjában megjelenő jelvények listája.", + "vscode.extension.badges.url": "A jelvény kép URL-je.", + "vscode.extension.badges.href": "A jelvény hivatkozása.", + "vscode.extension.badges.description": "A jelvény leírása.", + "vscode.extension.extensionDependencies": "Más kiegészítők, melyek függőségei ennek a kiegészítőnek. A kiegészítők azonosítója mindig ${publisher}.${name} formájú. Például: vscode.csharp.", + "vscode.extension.scripts.prepublish": "A VS Code kiegészítő publikálása előtt végrehajtott parancsfájl.", + "vscode.extension.icon": "Egy 128x128 pixeles ikon elérési útja." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/extensions/node/extensionValidator.i18n.json b/i18n/hun/src/vs/platform/extensions/node/extensionValidator.i18n.json new file mode 100644 index 0000000000000..6d0f5c97cf419 --- /dev/null +++ b/i18n/hun/src/vs/platform/extensions/node/extensionValidator.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "versionSyntax": "Nem sikerült feldolgozni az `engines.vscode` beállítás értékét ({0}). Használja például a következők egyikét: ^0.10.0, ^1.2.3, ^0.11.0, ^0.10.x stb.", + "versionSpecificity1": "Az `engines.vscode` beállításban megadott érték ({0}) nem elég konkrét. A vscode 1.0.0 előtti verzióihoz legalább a kívánt fő- és alverziót is meg kell adni. Pl.: ^0.10.0, 0.10.x, 0.11.0 stb.", + "versionSpecificity2": "Az `engines.vscode` beállításban megadott érték ({0}) nem elég konkrét. A vscode 1.0.0 utáni verzióihoz legalább a kívánt főverziót meg kell adni. Pl.: ^1.10.0, 1.10.x, 1.x.x, 2.x.x stb.", + "versionMismatch": "A kiegészítő nem kompatibilis a Code {0} verziójával. A következő szükséges hozzá: {1}.", + "extensionDescription.empty": "A kiegészítő leírása üres", + "extensionDescription.publisher": "a(z) `{0}` tulajdonság kötelező és `string` típusúnak kell lennie", + "extensionDescription.name": "a(z) `{0}` tulajdonság kötelező és `string` típusúnak kell lennie", + "extensionDescription.version": "a(z) `{0}` tulajdonság kötelező és `string` típusúnak kell lennie", + "extensionDescription.engines": "a(z) `{0}` tulajdonság kötelező és `object` típusúnak kell lennie", + "extensionDescription.engines.vscode": "a(z) `{0}` tulajdonság kötelező és `string` típusúnak kell lennie", + "extensionDescription.extensionDependencies": "a(z) `{0}` tulajdonság elhagyható vagy `string[]` típusúnak kell lennie", + "extensionDescription.activationEvents1": "a(z) `{0}` tulajdonság elhagyható vagy `string[]` típusúnak kell lennie", + "extensionDescription.activationEvents2": "a(z) `{0}` és `{1}` megadása kötelező vagy mindkettőt el kell hagyni", + "extensionDescription.main1": "a(z) `{0}` tulajdonság elhagyható vagy `string` típusúnak kell lennie", + "extensionDescription.main2": "A `main` ({0}) nem a kiegészítő mappáján belül található ({1}). Emiatt előfordulhat, hogy a kiegészítő nem lesz hordozható.", + "extensionDescription.main3": "a(z) `{0}` és `{1}` megadása kötelező vagy mindkettőt el kell hagyni", + "notSemver": "A kiegészítő verziója nem semver-kompatibilis." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/hun/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..a8e30a812a242 --- /dev/null +++ b/i18n/hun/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "Új ablak", + "newWindowDesc": "Nyit egy új ablakot", + "recentFolders": "Legutóbbi mappák", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json b/i18n/hun/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json new file mode 100644 index 0000000000000..b60e588de5f64 --- /dev/null +++ b/i18n/hun/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "integrity.ok": "OK", + "integrity.dontShowAgain": "Ne jelenítse meg újra", + "integrity.moreInfo": "További információ", + "integrity.prompt": "A feltelepített {0} hibásnak tűnik. Telepítse újra!" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json b/i18n/hun/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..8e300a2fd3874 --- /dev/null +++ b/i18n/hun/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "contributes.jsonValidation": "JSON-sémakonfigurációkat szolgáltat.", + "contributes.jsonValidation.fileMatch": "Az illesztendő fájlok mintája, például \"package.json\" vagy \"*.launch\".", + "contributes.jsonValidation.url": "A séma URL-címe ('http:', 'https:') vagy relatív elérési útja a kiegészítő mappájához képest ('./').", + "invalid.jsonValidation": "a 'configuration.jsonValidation' értékét tömbként kell megadni", + "invalid.fileMatch": "a 'configuration.jsonValidation.fileMatch' tulajdonság kötelező", + "invalid.url": "a 'configuration.jsonValidation.url' értéke URL-cím vagy relatív elérési út lehet", + "invalid.url.fileschema": "a 'configuration.jsonValidation.url' érvénytelen relatív elérési utat tartalmaz: {0}", + "invalid.url.schema": "a 'configuration.jsonValidation.url' érténének 'http:'-tal, 'https:'-tal, vagy a kiegészítőben elhelyezett sémák hivatkozása esetén './'-rel kell kezdődnie." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json b/i18n/hun/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json new file mode 100644 index 0000000000000..3e93e9b7ff5fc --- /dev/null +++ b/i18n/hun/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "first.chord": "Lenyomta a következőt: ({0}). Várakozás a kombináció második billentyűjére...", + "missing.chord": "A(z) ({0}, {1}) billentyűkombináció nem egy parancs." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/hun/src/vs/platform/markers/common/problemMatcher.i18n.json new file mode 100644 index 0000000000000..e24a428b5f13f --- /dev/null +++ b/i18n/hun/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ProblemPatternParser.loopProperty.notLast": "A loop tulajdonság csak az utolsó, sorra illesztő kifejezésnél támogatott.", + "ProblemPatternParser.problemPattern.missingRegExp": "A problémamintából hiányzik egy reguláris kifejezés.", + "ProblemPatternParser.problemPattern.missingProperty": "A probléma mintája érvénytelen. Mindenképp tartalmaznia kell egy fájlra, egy üzenetre és egy sorra vagy helyre illesztő csoportot.", + "ProblemPatternParser.invalidRegexp": "Hiba: A(z) {0} karakterlánc nem érvényes reguláris kifejezés.\n", + "ProblemPatternSchema.regexp": "A kimenetben található hibák, figyelmeztetések és információk megkeresésére használt reguláris kifejezés.", + "ProblemPatternSchema.file": "Annak az illesztési csoportnak az indexe, amely tartalmazza azt, hogy a probléma melyik fájlban található. Ha nincs megadva, akkor az alapértelmezett érték, 1 van használva.", + "ProblemPatternSchema.location": "Annak az illesztési csoportnak az indexe, amely tartalmazza a probléma helyét. Az érvényes minták helyek illesztésére: (line), (line,column) és (startLine,startColumn,endLine,endColumn). Ha nincs megadva, akkor a (line,column) van feltételezve.", + "ProblemPatternSchema.line": "Annak az illesztési csoportnak az indexe, amely tartalmazza azt, hogy a probléma hanyadik sorban található. Alapértelmezett értéke 2.", + "ProblemPatternSchema.column": "Annak az illesztési csoportnak az indexe, amely tartalmazza azt, hogy a probléma az adott soron belül mely oszlopban található. Alapértelmezett értéke 3.", + "ProblemPatternSchema.endLine": "Annak az illesztési csoportnak az indexe, amely tartalmazza azt, hogy a probléma mely sorban ér véget. Alapértelmezett értéke határozatlan.", + "ProblemPatternSchema.endColumn": "Annak az illesztési csoportnak az indexe, amely tartalmazza azt, hogy a probléma vége a zárósoron belül mely oszlopban található. Alapértelmezett értéke határozatlan.", + "ProblemPatternSchema.severity": "Annak az illesztési csoportnak az indexe, amely tartalmazza a probléma súlyosságát. Alapértelmezett értéke határozatlan.", + "ProblemPatternSchema.code": "Annak az illesztési csoportnak az indexe, amely tartalmazza a problémás kódrészletet. Alapértelmezett értéke határozatlan.", + "ProblemPatternSchema.message": "Annak az illesztési csoportnak az indexe, amely tartalmazza az üzenetet. Ha nincs megadva, és a location paraméternek van értéke, akkor a 4, minden más esetben 5 az alapértelmezett érték.", + "ProblemPatternSchema.loop": "Több soros illesztés esetén meghatározza, hogy az aktuális minta mindaddig végre legyen-e hajtva, amíg eredményt talál. Csak többsoros minta esetén használható, utolsóként.", + "NamedProblemPatternSchema.name": "A problémaminta neve.", + "NamedMultiLineProblemPatternSchema.name": "A többsoros problémaminta neve.", + "NamedMultiLineProblemPatternSchema.patterns": "A konkrét minkák.", + "ProblemPatternExtPoint": "Problémamintákat szolgáltat.", + "ProblemPatternRegistry.error": "Érvénytelen problémaminta. A minta figyelmen kívül lesz hagyva.", + "ProblemMatcherParser.noProblemMatcher": "Hiba: a leírást nem sikerült problémaillesztővé alakítani:\n{0}\n", + "ProblemMatcherParser.noProblemPattern": "Hiba: a leírás nem definiál érvényes problémamintát:\n{0}\n", + "ProblemMatcherParser.noOwner": "Hiba: a leírás nem határoz meg tulajdonost:\n{0}\n", + "ProblemMatcherParser.noFileLocation": "Hiba: a leírás nem határoz meg fájlhelyszínt:\n{0}\n", + "ProblemMatcherParser.unknownSeverity": "Információ: ismeretlen súlyosság: {0}. Az érvényes értékek: error, warning és info.\n", + "ProblemMatcherParser.noDefinedPatter": "Hiba: nem létezik {0} azonosítóval rendelkező minta.", + "ProblemMatcherParser.noIdentifier": "Hiba: a minta tulajdonság egy üres azonosítóra hivatkozik.", + "ProblemMatcherParser.noValidIdentifier": "Hiba: a minta {0} tulajdonsága nem érvényes mintaváltozónév.", + "ProblemMatcherParser.problemPattern.watchingMatcher": "A problémaillesztőnek definiálnia kell a kezdőmintát és a zárómintát is a figyeléshez.", + "ProblemMatcherParser.invalidRegexp": "Hiba: A(z) {0} karakterlánc nem érvényes reguláris kifejezés.\n", + "WatchingPatternSchema.regexp": "Reguláris kifejezés a háttérben futó feladat indulásának vagy befejeződésének detektálására.", + "WatchingPatternSchema.file": "Annak az illesztési csoportnak az indexe, amely tartalmazza azt, hogy a probléma melyik fájlban található. Elhagyható.", + "PatternTypeSchema.name": "Egy szolgáltatott vagy elődefiniált minta neve", + "PatternTypeSchema.description": "Egy problémaminta vagy egy szolgáltatott vagy elődefiniált problémaminta neve. Elhagyható, ha az alapként használandó minta meg van adva.", + "ProblemMatcherSchema.base": "A alapként használni kívánt problémaillesztő neve.", + "ProblemMatcherSchema.owner": "A probléma tulajdonosa a Code-on belül. Elhagyható, ha az alapként használt minta meg van adva. Alapértelmezett értéke 'external', ha nem létezik és az alapként használt minta nincs meghatározva.", + "ProblemMatcherSchema.severity": "Az elkapott problémák alapértelmezett súlyossága. Ez az érték van használva, ha a minta nem definiál illesztési csoportot a súlyossághoz.", + "ProblemMatcherSchema.applyTo": "Meghatározza, hogy a szöveges dokumentumhoz jelentett probléma megnyitott, bezárt vagy minden dokumentumra legyen alkalmazva.", + "ProblemMatcherSchema.fileLocation": "Meghatározza, hogy a problémamintában talált fájlnevek hogyan legyenek értelmezve.", + "ProblemMatcherSchema.background": "Minták, melyekkel követhető egy háttérben futó feladaton aktív illesztő indulása és befejeződése.", + "ProblemMatcherSchema.background.activeOnStart": "Ha értéke igaz, akkor a háttérfeladat aktív módban van, amikor a feladat indul. Ez egyenlő egy olyan sor kimenetre történő kiírásával, ami illeszkedik a beginPatternre.", + "ProblemMatcherSchema.background.beginsPattern": "Ha illeszkedik a kimenetre, akkor a háttérben futó feladat elindulása lesz jelezve.", + "ProblemMatcherSchema.background.endsPattern": "Ha illeszkedik a kimenetre, akkor a háttérben futó feladat befejeződése lesz jelezve.", + "ProblemMatcherSchema.watching.deprecated": "A watching tulajdonság elavult. Használja a backgroundot helyette.", + "ProblemMatcherSchema.watching": "Minták, melyekkel következő a figyelő illesztők indulása és befejeződése.", + "ProblemMatcherSchema.watching.activeOnStart": "Ha értéke igaz, akkor a figyelő aktív módban van, amikor a feladat indul. Ez egyenlő egy olyan sor kimenetre történő kiírásával, ami illeszkedik a beginPatternre.", + "ProblemMatcherSchema.watching.beginsPattern": "Ha illeszkedik a kimenetre, akkor a figyelő feladat elindulása lesz jelezve.", + "ProblemMatcherSchema.watching.endsPattern": "Ha illeszkedik a kimenetre, akkor a figyelő feladat befejeződése lesz jelezve.", + "LegacyProblemMatcherSchema.watchedBegin.deprecated": "Ez a tulajdonság elavult. Használja a watching tulajdonságot helyette.", + "LegacyProblemMatcherSchema.watchedBegin": "Reguláris kifejezés, mely jelzi, hogy a figyeltő feladatok fájlmódosítás miatt éppen műveletet hajtanak végre.", + "LegacyProblemMatcherSchema.watchedEnd.deprecated": "Ez a tulajdonság elavult. Használja a watching tulajdonságot helyette.", + "LegacyProblemMatcherSchema.watchedEnd": "Reguláros kifejezés, ami jelzi, hogy a figyelő feladat befejezte a végrehajtást.", + "NamedProblemMatcherSchema.name": "A problémaillesztő neve.", + "ProblemMatcherExtPoint": "Problémaillesztőket szolgáltat." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/message/common/message.i18n.json b/i18n/hun/src/vs/platform/message/common/message.i18n.json new file mode 100644 index 0000000000000..a4f556eb01c23 --- /dev/null +++ b/i18n/hun/src/vs/platform/message/common/message.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Bezárás", + "later": "Később", + "cancel": "Mégse" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/request/node/request.i18n.json b/i18n/hun/src/vs/platform/request/node/request.i18n.json new file mode 100644 index 0000000000000..83987512ccd7c --- /dev/null +++ b/i18n/hun/src/vs/platform/request/node/request.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "httpConfigurationTitle": "HTTP", + "proxy": "A használni kívánt proxybeállítás. Ha nincs beállítva, a http_proxy és a https_proxy környezeti változókból lesz átvéve", + "strictSSL": "A proxyszerver tanúsítványa hitelesítve legyen-e a megadott hitelesítésszolgáltatóknál.", + "proxyAuthorization": "Minden hálózati kérés 'Proxy-Authorization' fejlécében küldendő érték." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/telemetry/common/telemetryService.i18n.json b/i18n/hun/src/vs/platform/telemetry/common/telemetryService.i18n.json new file mode 100644 index 0000000000000..312528f889138 --- /dev/null +++ b/i18n/hun/src/vs/platform/telemetry/common/telemetryService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetria", + "telemetry.enableTelemetry": "Használati adatok és hibák küldésének engedélyezése a Microsoft felé." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/hun/src/vs/platform/theme/common/colorRegistry.i18n.json new file mode 100644 index 0000000000000..9521382b276ca --- /dev/null +++ b/i18n/hun/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -0,0 +1,88 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.color": "Érvénytelen színformátum. Az #RGB, #RGBA, #RRGGBB vagy #RRGGBBAA formátum használható.", + "schema.colors": "A munkaterületen használt színek.", + "foreground": "Általános előtérszín. Csak akkor van használva, ha nem írja felül az adott komponens.", + "errorForeground": "A hibaüzenetek általános előtérszíne. Csak akkor van használva, ha nem írja felül az adott komponens.", + "descriptionForeground": "A további információkat szolgáltató leíró szövegek, pl. a címkék előtérszíne.", + "focusBorder": "Fókuszált elemek keretének általános színe. Csak akkor van használva, ha nem írja felül az adott komponens.", + "contrastBorder": "Az elemek körüli extra keret, mely arra szolgál, hogy elválassza egymástól őket, így növelve a kontrasztot.", + "activeContrastBorder": "Az aktív elemek körüli extra keret, mely arra szolgál, hogy elválassza egymástól őket, így növelve a kontrasztot.", + "selectionBackground": "A munkaterületen kijelölt szövegek háttérszíne (pl. beviteli mezők vagy szövegmezők esetén). Ez a beállítás nem vonatkozik a szerkesztőablakban végzett kijelölésekre. ", + "textSeparatorForeground": "A szövegelválasztók színe.", + "textLinkForeground": "A szövegben található hivatkozások előtérszíne.", + "textLinkActiveForeground": "A szövegben található aktív hivatkozások előtérszíne.", + "textPreformatForeground": "Az előformázott szövegrészek előtérszíne.", + "textBlockQuoteBackground": "A szövegben található idézetblokkok háttérszíne.", + "textBlockQuoteBorder": "A szövegben található idézetblokkok keretszíne.", + "textCodeBlockBackground": "A szövegben található kódblokkok háttérszíne.", + "widgetShadow": "A szerkesztőablakon belül található modulok, pl. a keresés/csere árnyékának színe.", + "inputBoxBackground": "A beviteli mezők háttérszíne.", + "inputBoxForeground": "A beviteli mezők előtérszíne.", + "inputBoxBorder": "A beviteli mezők kerete.", + "inputBoxActiveOptionBorder": "A beviteli mezőben található aktivált beállítások keretszíne.", + "inputPlaceholderForeground": "A beviteli mezőkben használt helykitöltő szövegek előtérszíne.", + "inputValidationInfoBackground": "Beviteli mezők háttérszíne információs szintű validációs állapot esetén.", + "inputValidationInfoBorder": "Beviteli mezők keretszíne információs szintű validációs állapot esetén.", + "inputValidationWarningBackground": "Beviteli mezők háttérszíne figyelmeztetés szintű validációs állapot esetén.", + "inputValidationWarningBorder": "Beviteli mezők keretszíne figyelmeztetés szintű validációs állapot esetén.", + "inputValidationErrorBackground": "Beviteli mezők háttérszíne hiba szintű validációs állapot esetén.", + "inputValidationErrorBorder": "Beviteli mezők keretszíne hiba szintű validációs állapot esetén.", + "dropdownBackground": "A legördülő menük háttérszíne.", + "dropdownForeground": "A legördülő menük előtérszíne.", + "dropdownBorder": "A legördülő menük kerete.", + "listFocusBackground": "Listák/fák fókuszált elemének háttérszine, amikor a lista aktív. Egy aktív listának/fának van billentyűfőkusza, míg egy inaktívnak nincs.", + "listFocusForeground": "Listák/fák fókuszált elemének előtérszíne, amikor a lista aktív. Egy aktív listának/fának van billentyűfőkusza, míg egy inaktívnak nincs.", + "listActiveSelectionBackground": "Listák/fák kiválasztott elemének háttérszíne, amikor a lista aktív. Egy aktív listának/fának van billentyűfőkusza, míg egy inaktívnak nincs.", + "listActiveSelectionForeground": "Listák/fák kiválasztott elemének előtérszíne, amikor a lista aktív. Egy aktív listának/fának van billentyűfőkusza, míg egy inaktívnak nincs.", + "listInactiveSelectionBackground": "Listák/fák kiválasztott elemének háttérszíne, amikor a lista inaktív. Egy aktív listának/fának van billentyűfőkusza, míg egy inaktívnak nincs.", + "listInactiveSelectionForeground": "Listák/fák kiválasztott elemének előtérszíne, amikor a lista inaktív. Egy aktív listának/fának van billentyűfőkusza, míg egy inaktívnak nincs.", + "listHoverBackground": "A lista/fa háttérszíne, amikor az egérkurzor egy adott elem fölé kerül.", + "listHoverForeground": "A lista/fa előtérszíne, amikor az egérkurzor egy adott elem fölé kerül.", + "listDropBackground": "A lista/fa háttérszíne, amikor az elemek az egérkurzorral vannak mozgatva egyik helyről a másikra.", + "highlight": "Kiemelt találatok előtérszíne a listában/fában való keresés esetén.", + "pickerGroupForeground": "Csoportcímkék színe a gyorsválasztóban.", + "pickerGroupBorder": "Csoportok keretszíne a gyorsválasztóban.", + "buttonForeground": "A gombok előtérszíne.", + "buttonBackground": "A gombok háttérszíne.", + "buttonHoverBackground": "A gomb háttérszine, ha az egérkurzor fölötte van.", + "badgeBackground": "A jelvények háttérszíne. A jelvények apró információs címkék, pl. a keresési eredmények számának jelzésére.", + "badgeForeground": "A jelvények előtérszíne. A jelvények apró információs címkék, pl. a keresési eredmények számának jelzésére.", + "scrollbarShadow": "A görgetősáv árnyéka, ami jelzi, hogy a nézet el van görgetve.", + "scrollbarSliderBackground": "A csúszkák háttérszíne.", + "scrollbarSliderHoverBackground": "A csúszkák háttérszíne, ha az egérkurzor felette van.", + "scrollbarSliderActiveBackground": "Az aktív csúszkák háttérszíne.", + "progressBarBackground": "A hosszú ideig tartó folyamatok esetén megjelenített folyamatjelző háttérszíne.", + "editorBackground": "A szerkesztőablak háttérszíne.", + "editorForeground": "A szerkesztőablak alapértelmezett előtérszíne.", + "editorWidgetBackground": "A szerkesztőablak moduljainak háttérszíne, pl. a keresés/cserének.", + "editorWidgetBorder": "A szerkesztőablak-modulok keretszíne. A szín csak akkor van használva, ha a modul beállítása alapján rendelkezik kerettel, és a színt nem írja felül a modul.", + "editorSelection": "A szerkesztőablakban található kijelölések színe.", + "editorInactiveSelection": "Az inaktív szerkesztőablakban található kijelölések színe.", + "editorSelectionHighlight": "A kijelöléssel megegyező tartalmú területek színe.", + "editorFindMatch": "A keresés jelenlegi találatának színe.", + "findMatchHighlight": "A keresés további találatainak színe.", + "findRangeHighlight": "A keresést korlátozó terület színe.", + "hoverHighlight": "Kiemelés azon szó alatt, amely fölött lebegő elem jelenik meg.", + "hoverBackground": "A szerkesztőablakban lebegő elemek háttérszíne.", + "hoverBorder": "A szerkesztőablakban lebegő elemek keretszíne.", + "activeLinkForeground": "Az aktív hivatkozások háttérszíne.", + "diffEditorInserted": "A beillesztett szövegek háttérszíne.", + "diffEditorRemoved": "Az eltávolított szövegek háttérszíne.", + "diffEditorInsertedOutline": "A beillesztett szövegek körvonalának színe.", + "diffEditorRemovedOutline": "Az eltávolított szövegek körvonalának színe.", + "mergeCurrentHeaderBackground": "A helyi tartalom fejlécének háttérszíne sorok között megjelenített összeolvasztási konfliktusok esetén.", + "mergeCurrentContentBackground": "A helyi tartalom háttérszíne sorok között megjelenített összeolvasztási konfliktusok esetén.", + "mergeIncomingHeaderBackground": "A beérkező tartalom fejlécének háttérszíne sorok között megjelenített összeolvasztási konfliktusok esetén.", + "mergeIncomingContentBackground": "A beérkező tartalom háttérszíne sorok között megjelenített összeolvasztási konfliktusok esetén.", + "mergeCommonHeaderBackground": "A közös ős tartalom fejlécének háttérszíne sorok között megjelenített összeolvasztási konfliktusok esetén. ", + "mergeCommonContentBackground": "A közös ős tartalom háttérszíne sorok között megjelenített összeolvasztási konfliktusok esetén. ", + "mergeBorder": "A fejlécek és az elválasztó sáv keretszíne a sorok között megjelenített összeolvasztási konfliktusok esetén.", + "overviewRulerCurrentContentForeground": "A helyi tartalom előtérszíne az áttekintő sávon összeolvasztási konfliktusok esetén.", + "overviewRulerIncomingContentForeground": "A beérkező tartalom előtérszíne az áttekintő sávon összeolvasztási konfliktusok esetén.", + "overviewRulerCommonContentForeground": "A közös ős tartalom előtérszíne az áttekintő sávon összeolvasztási konfliktusok esetén. " +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/hun/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..c9ac5c4a1264f --- /dev/null +++ b/i18n/hun/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "overwritingExtension": "A(z) {0} kiegészítő felülírása a következővel: {1}.", + "extensionUnderDevelopment": "A(z) {0} elérési úton található fejlesztői kiegészítő betöltése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/hun/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..32ac1f41978bc --- /dev/null +++ b/i18n/hun/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Bezárás", + "cancel": "Mégse", + "ok": "OK" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/api/node/extHostDiagnostics.i18n.json b/i18n/hun/src/vs/workbench/api/node/extHostDiagnostics.i18n.json new file mode 100644 index 0000000000000..4b78aadacdece --- /dev/null +++ b/i18n/hun/src/vs/workbench/api/node/extHostDiagnostics.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "limitHit": "{0} további hiba és figyelmeztetés nem jelenik meg." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/hun/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..4b90a12aaf247 --- /dev/null +++ b/i18n/hun/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/hun/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..ad630367cbae5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeView.notRegistered": "Nincs '{0}' azonosítóval regisztrált fanézet.", + "treeItem.notFound": "Nincs '{0}' azonosítójú elem a fában.", + "treeView.duplicateElement": "A(z) {0} elem már regisztrálva van" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/hun/src/vs/workbench/browser/actions/configureLocale.i18n.json new file mode 100644 index 0000000000000..fde77c790146f --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "configureLocale": "Nyelv beállítása", + "displayLanguage": "Meghatározza a VSCode felületének nyelvét.", + "doc": "Az elérhető nyelvek listája a következő címen tekinthető meg: {0}", + "restart": "Az érték módosítása után újra kell indítani a VSCode-ot.", + "fail.createSettings": "A(z) '{0}' nem hozható létre ({1})", + "JsonSchema.locale": "A felhasználói felületen használt nyelv." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/actions/fileActions.i18n.json b/i18n/hun/src/vs/workbench/browser/actions/fileActions.i18n.json new file mode 100644 index 0000000000000..9c4fe7cdf283d --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/actions/fileActions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFolder": "Mappa megnyitása...", + "openFileFolder": "Megnyitás..." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json b/i18n/hun/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json new file mode 100644 index 0000000000000..5855d42c943d0 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleActivityBar": "Tevékenységsáv be- és kikapcsolása", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json b/i18n/hun/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json new file mode 100644 index 0000000000000..3880a172e267e --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleEditorGroupLayout": "Szerkesztőablak-csoport vízszintes/függőleges elrendezésének váltása", + "horizontalLayout": "Szerkesztőablak-csoport elrendezése vízszintesen", + "verticalLayout": "Szerkesztőablak-csoport elrendezése függőlegesen", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json b/i18n/hun/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json new file mode 100644 index 0000000000000..b5b22901d6a80 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Oldalsáv helyének váltása", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json b/i18n/hun/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json new file mode 100644 index 0000000000000..851dacaba5cea --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleSidebar": "Oldalsáv be- és kikapcsolása", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json b/i18n/hun/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json new file mode 100644 index 0000000000000..b2087b12af601 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleStatusbar": "Állapotsor be- és kikapcsolása", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/actions/toggleZenMode.i18n.json b/i18n/hun/src/vs/workbench/browser/actions/toggleZenMode.i18n.json new file mode 100644 index 0000000000000..de2a4b219be26 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/actions/toggleZenMode.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleZenMode": "Zen mód be- és kikapcsolása", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json new file mode 100644 index 0000000000000..38f496cc0eecb --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeFromActivityBar": "Eltávolítás a tevékenységsávról", + "keepInActivityBar": "Megtartás a tevékenységsávon", + "titleKeybinding": "{0} ({1})", + "additionalViews": "További nézetek", + "numberBadge": "{0} ({1})", + "manageExtension": "Kiegészítő kezelése", + "toggle": "Nézet rögzítésének be- és kikapcsolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json new file mode 100644 index 0000000000000..266ac56433e84 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hideActivitBar": "Tevékenységsáv elrejtése", + "activityBarAriaLabel": "Az aktív nézet váltása", + "globalActions": "Globális műveletek" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/compositePart.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/compositePart.i18n.json new file mode 100644 index 0000000000000..46148b0c7c3bd --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/compositePart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ariaCompositeToolbarLabel": "{0} művelet", + "titleTooltip": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json new file mode 100644 index 0000000000000..a38af02d66352 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "metadataDiff": "{0} ↔ {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json new file mode 100644 index 0000000000000..a8bbd66e2e814 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "binaryEditor": "Bináris megjelenítő" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json new file mode 100644 index 0000000000000..186c2e66b64ba --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textEditor": "Szövegszerkesztő", + "textDiffEditor": "Szöveges tartalmak differenciaszerkesztő ablaka", + "binaryDiffEditor": "Bináris tartalmak differenciaszerkesztő ablaka", + "sideBySideEditor": "Párhuzamos szerkesztőablakok", + "groupOnePicker": "Az első csoportban található szerkesztőablakok megjelenítése", + "groupTwoPicker": "A második csoportban található szerkesztőablakok megjelenítése", + "groupThreePicker": "A harmadik csoportban található szerkesztőablakok megjelenítése", + "allEditorsPicker": "Összes megnyitott szerkesztőablak megjelenítése", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/editorActions.i18n.json new file mode 100644 index 0000000000000..e2495b74e21de --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -0,0 +1,56 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitEditor": "Szerkesztő kettéosztása", + "joinTwoGroups": "Két szerkesztőcsoport összevonása", + "navigateEditorGroups": "Váltás szerkesztőcsoportok között", + "focusActiveEditorGroup": "Váltás az aktív szerkesztőcsoportra", + "focusFirstEditorGroup": "Váltás az első szerkesztőcsoportra", + "focusSecondEditorGroup": "Váltás a második szerkesztőcsoportra", + "focusThirdEditorGroup": "Váltás a harmadik szerkesztőcsoportra", + "focusPreviousGroup": "Váltás az előző csoportra", + "focusNextGroup": "Váltás a következő csoportra", + "openToSide": "Megnyitás oldalt", + "closeEditor": "Szerkesztőablak bezárása", + "revertAndCloseActiveEditor": "Visszaállítás és szerkesztőablak bezárása", + "closeEditorsToTheLeft": "Balra lévő szerkesztőablakok bezárása", + "closeEditorsToTheRight": "Jobbra lévő szerkesztőablakok bezárása", + "closeAllEditors": "Összes szerkesztőablak bezárása", + "closeUnmodifiedEditors": "Nem módosult szerkesztőablakok bezárása a csoportban", + "closeEditorsInOtherGroups": "A többi csoport szerkesztőablakainak bezárása", + "closeOtherEditorsInGroup": "Többi szerkesztőablak bezárása", + "closeEditorsInGroup": "A csoportban lévő összes szerkesztőablak bezárása", + "moveActiveGroupLeft": "Szerkesztőablak-csoport mozgatása balra", + "moveActiveGroupRight": "Szerkesztőablak-csoport mozgatása jobbra", + "minimizeOtherEditorGroups": "Többi szerkesztőablak-csoport kis méretűvé tétele", + "evenEditorGroups": "Szerkesztőablak-csoportok egyenlő méretűvé tétele", + "maximizeEditor": "Szerkesztőablak-csoport nagy méretűvé tétele és oldalsáv elrejtése", + "keepEditor": "Szerkesztőablak nyitva tartása", + "openNextEditor": "Következő szerkesztőablak megnyitása", + "openPreviousEditor": "Előző szerkesztőablak megnyitása", + "nextEditorInGroup": "A csoport következő szerkesztőablakának megnyitása", + "openPreviousEditorInGroup": "A csoport előző szerkesztőablakának megnyitása", + "navigateNext": "Ugrás előre", + "navigatePrevious": "Ugrás vissza", + "reopenClosedEditor": "Bezárt szerkesztőablak újranyitása", + "clearRecentFiles": "Legutóbbi fájlok listájának törlése", + "showEditorsInFirstGroup": "Az első csoportban található szerkesztőablakok megjelenítése", + "showEditorsInSecondGroup": "A második csoportban található szerkesztőablakok megjelenítése", + "showEditorsInThirdGroup": "A harmadik csoportban található szerkesztőablakok megjelenítése", + "showEditorsInGroup": "A csoportban található szerkesztőablakok megjelenítése", + "showAllEditors": "Összes szerkesztőablak megjelenítése", + "openPreviousRecentlyUsedEditorInGroup": "A csoportban előző legutoljára használt szerksztőablak megnyitása", + "openNextRecentlyUsedEditorInGroup": "A csoportban következő legutoljára használt szerksztőablak megnyitása", + "navigateEditorHistoryByInput": "Előző szerkesztőablak menyitása az előzményekből", + "openNextRecentlyUsedEditor": "A következő legutoljára használt szerksztőablak megnyitása", + "openPreviousRecentlyUsedEditor": "Az előző legutoljára használt szerksztőablak megnyitása", + "clearEditorHistory": "Szerkesztőablak-előzmények törlése", + "focusLastEditorInStack": "Csoport utolsó szerkesztőablakának megnyitása", + "moveEditorLeft": "Szerkesztőablak mozgatása balra", + "moveEditorRight": "Szerkesztőablak mozgatása jobbra", + "moveEditorToPreviousGroup": "Szerkesztőablak mozgatása az előző csoportba", + "moveEditorToNextGroup": "Szerkesztőablak mozgatása a következő csoportba" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json new file mode 100644 index 0000000000000..6e6ffe92dbd1e --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorCommand.activeEditorMove.description": "Aktív szerkesztőablak mozgatása fülek vagy csoportok között", + "editorCommand.activeEditorMove.arg.name": "Aktív szerkesztőablak mozgatási argumentum", + "editorCommand.activeEditorMove.arg.description": "Argumentumtulajdonságok:\n\t\t\t\t\t\t* 'to': karakterlánc, a mozgatás célpontja.\n\t\t\t\t\t\t* 'by': karakterlánc, a mozgatás egysége. Fülek (tab) vagy csoportok (group) alapján.\n\t\t\t\t\t\t* 'value': szám, ami meghatározza, hogy hány pozíciót kell mozgatni, vagy egy abszolút pozíciót, ahová mozgatni kell.\n\t\t\t\t\t", + "commandDeprecated": "A(z) **{0}** parancs el lett távolítva. A(z) **{1}** használható helyette", + "openKeybindings": "Billentyűparancsok beállítása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/editorPart.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/editorPart.i18n.json new file mode 100644 index 0000000000000..6936103772894 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/editorPart.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "groupOneVertical": "Bal", + "groupTwoVertical": "Középső", + "groupThreeVertical": "Jobb", + "groupOneHorizontal": "Felső", + "groupTwoHorizontal": "Középső", + "groupThreeHorizontal": "Alsó", + "editorOpenError": "Nem sikerült megnyitni a(z) '{0}' fájlt: {1}." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json new file mode 100644 index 0000000000000..51a1f4752547d --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, szerkesztőcsoport-választó", + "groupLabel": "Csoport: {0}", + "noResultsFoundInGroup": "A csoportban nem található ilyen nyitott szerkesztőablak", + "noOpenedEditors": "A csoportban jelenleg nincs megnyitott szerkesztőablak", + "noResultsFound": "Nem található ilyen nyitott szerkesztőablak", + "noOpenedEditorsAllGroups": "Jelenleg nincs megnyitott szerkesztőablak" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json new file mode 100644 index 0000000000000..cf37b615cda9c --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "singleSelectionRange": "{0}. sor, {1}. oszlop ({2} kijelölve)", + "singleSelection": "{0}. sor, {1}. oszlop", + "multiSelectionRange": "{0} kijelölés ({1} karakter kijelölve)", + "multiSelection": "{0} kijelölés", + "endOfLineLineFeed": "LF", + "endOfLineCarriageReturnLineFeed": "CRLF", + "tabFocusModeEnabled": "Tab fókuszt vált", + "screenReaderDetected": "Képernyőolvasó érzékelve", + "screenReaderDetectedExtra": "Ha nem használ képernyőolvasót, állítsa az `editor.accessibilitySupport` értékét \"off\"-ra.", + "disableTabMode": "Kisegítő mód letiltása", + "gotoLine": "Sor megkeresése", + "indentation": "Indentálás", + "selectEncoding": "Kódolás kiválasztása", + "selectEOL": "Sorvégjel kiválasztása", + "selectLanguageMode": "Nyelvmód kiválasztása", + "fileInfo": "Fájlinformáció", + "spacesSize": "Szóközök: {0}", + "tabSize": "Tabulátorméret: {0}", + "showLanguageExtensions": "'{0}' kiegészítő keresése a piactéren...", + "changeMode": "Nyelvmód váltása", + "noEditor": "Jelenleg nincs aktív szerkesztőablak", + "languageDescription": "({0}) - Beállított nyelv", + "languageDescriptionConfigured": "({0})", + "languagesPicks": "nyelvek (azonosító)", + "configureModeSettings": "'{0}' nyelvi beállítások módosítása...", + "configureAssociationsExt": "'{0}' fájlhozzárendelések módosítása...", + "autoDetect": "Automatikus felderítés", + "pickLanguage": "Nyelvmód kiválasztása", + "currentAssociation": "Jelenlegi társítás", + "pickLanguageToConfigure": "A(z) '{0}' kiterjesztéshez társított nyelvmód kiválasztása", + "changeIndentation": "Indentálás módosítása", + "noWritableCodeEditor": "Az aktív kódszerkesztő-ablak írásvédett módban van.", + "indentView": "nézet váltása", + "indentConvert": "fájl konvertálása", + "pickAction": "Művelet kiválasztása", + "changeEndOfLine": "Sorvégjel módosítása", + "pickEndOfLine": "Sorvégjel kiválasztása", + "changeEncoding": "Fájlkódolás módosítása", + "noFileEditor": "Jelenleg nincs aktív fájl", + "saveWithEncoding": "Mentés adott kódolással", + "reopenWithEncoding": "Újranyitás adott kódolással", + "guessedEncoding": "Kitalálva a tartalomból", + "pickEncodingForReopen": "Válassza ki a kódolást a fájl újranyitásához", + "pickEncodingForSave": "Válassza ki a mentéshez használandó kódolást" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json new file mode 100644 index 0000000000000..716abaa9fd041 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "araLabelTabActions": "Fülműveletek" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json new file mode 100644 index 0000000000000..0cb7c46cb05e4 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textDiffEditor": "Szöveges tartalmak differenciaszerkesztő ablaka", + "readonlyEditorWithInputAriaLabel": "{0}. Írásvédett szövegösszehasonlító.", + "readonlyEditorAriaLabel": "Írásvédett szövegösszehasonlító.", + "editableEditorWithInputAriaLabel": "{0}. Szövegfájl-összehasonlító.", + "editableEditorAriaLabel": "Szövegfájl-összehasonlító.", + "navigate.next.label": "Következő módosítás", + "navigate.prev.label": "Előző módosítás", + "inlineDiffLabel": "Váltás inline nézetre", + "sideBySideDiffLabel": "Váltás párhuzamos nézetre" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/textEditor.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/textEditor.i18n.json new file mode 100644 index 0000000000000..bc6c6d9162f3d --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/textEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorLabelWithGroup": "{0}, {1}. csoport" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json new file mode 100644 index 0000000000000..357b1df914cd4 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textEditor": "Szövegszerkesztő", + "readonlyEditorWithInputAriaLabel": "{0}. Írásvédett szövegszerkesztő.", + "readonlyEditorAriaLabel": "Írásvédett szövegszerkesztő.", + "untitledFileEditorWithInputAriaLabel": "{0}. Névtelen szövegszerkesztő.", + "untitledFileEditorAriaLabel": "Névtelen szövegszerkesztő." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/editor/titleControl.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/editor/titleControl.i18n.json new file mode 100644 index 0000000000000..0ef6405cab271 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/editor/titleControl.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Bezárás", + "closeOthers": "Többi bezárása", + "closeRight": "Jobbra lévők bezárása", + "closeAll": "Összes bezárása", + "closeAllUnmodified": "Nem módosultak bezárása", + "keepOpen": "Maradjon nyitva", + "showOpenedEditors": "Megnyitott szerkesztőablak megjelenítése", + "araLabelEditorActions": "Szerkesztőablak-műveletek" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/panel/panelActions.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/panel/panelActions.i18n.json new file mode 100644 index 0000000000000..79a37ed7da4fa --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/panel/panelActions.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "panelActionTooltip": "{0} ({1})", + "closePanel": "Panel bezárása", + "togglePanel": "Panel be- és kikapcsolása", + "focusPanel": "Váltás a panelra", + "toggleMaximizedPanel": "Teljes méretű panel be- és kikapcsolása", + "maximizePanel": "Panel teljes méretűvé tétele", + "minimizePanel": "Panel méretének visszaállítása", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/panel/panelPart.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/panel/panelPart.i18n.json new file mode 100644 index 0000000000000..6bbddde875317 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/panel/panelPart.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "panelSwitcherBarAriaLabel": "Az aktív panel váltása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json new file mode 100644 index 0000000000000..d1d7a5732f949 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inputModeEntryDescription": "{0} (Nyomjon 'Enter'-t a megerősítéshez vagy 'Escape'-et a megszakításhoz)", + "inputModeEntry": "Nyomjon 'Enter'-t a megerősítéshez vagy 'Escape'-et a megszakításhoz", + "emptyPicks": "Nincs választható elem", + "quickOpenInput": "A végrehajtható műveletek körét a ? karakter beírásával tekintheti meg", + "historyMatches": "legutóbb megnyitott", + "noResultsFound1": "Nincs találat", + "canNotRunPlaceholder": "A jelenlegi kontextusban nem használható a gyorsmegnyitási funkció", + "entryAriaLabel": "{0}, legutóbb megnyitott", + "removeFromEditorHistory": "Eltávolítás az előzményekből", + "pickHistory": "Válassza ki azt a szerkesztőablakot, amit el szeretne távolítani az előzményekből" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..1686ffdab02d6 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "File megkeresése...", + "quickNavigateNext": "Ugrás a következőre a fájlok gyors megnyitásánál", + "quickNavigatePrevious": "Ugrás az előzőre a fájlok gyors megnyitásánál", + "quickSelectNext": "Következő kiválasztása a fájlok gyors megnyitásánál", + "quickSelectPrevious": "Előző kiválasztása a fájlok gyors megnyitásánál" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json new file mode 100644 index 0000000000000..f150e0f9ff209 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "focusSideBar": "Váltás az oldalsávra", + "viewCategory": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json new file mode 100644 index 0000000000000..3cc19480b6240 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "canNotRun": "A(z) '{0}' parancs jelenleg nem engedélyezett és nem futtatható.", + "manageExtension": "Kiegészítő kezelése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json b/i18n/hun/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json new file mode 100644 index 0000000000000..6ed546539cf83 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "patchedWindowTitle": "[Nem támogatott]", + "devExtensionWindowTitlePrefix": "[Kiegészítő fejlesztői példány]" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/quickopen.i18n.json b/i18n/hun/src/vs/workbench/browser/quickopen.i18n.json new file mode 100644 index 0000000000000..3f67d6f3e139d --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/quickopen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultsMatching": "Nincs eredmény", + "noResultsFound2": "Nincs találat", + "entryAriaLabel": "{0}, parancs" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/browser/viewlet.i18n.json b/i18n/hun/src/vs/workbench/browser/viewlet.i18n.json new file mode 100644 index 0000000000000..1d02ba8d6eed1 --- /dev/null +++ b/i18n/hun/src/vs/workbench/browser/viewlet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "collapse": "Összes bezárása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/common/theme.i18n.json b/i18n/hun/src/vs/workbench/common/theme.i18n.json new file mode 100644 index 0000000000000..4966ba698450e --- /dev/null +++ b/i18n/hun/src/vs/workbench/common/theme.i18n.json @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tabActiveBackground": "Az aktív fül háttérszíne. A fülek tartalmazzák a szerkesztőablakoket a szerkesztőterületen. Egy szerkesztőablak-csoportban több fül is megnyitható. Több szerkesztőablak-csoportot is létre lehet hozni.", + "tabInactiveBackground": "Az inaktív fülek háttérszíne. A fülek tartalmazzák a szerkesztőablakoket a szerkesztőterületen. Egy szerkesztőablak-csoportban több fül is megnyitható. Több szerkesztőablak-csoportot is létre lehet hozni.", + "tabBorder": "A füleket egymástól elválasztó keret színe. A fülek tartalmazzák a szerkesztőablakoket a szerkesztőterületen. Egy szerkesztőablak-csoportban több fül is megnyitható. Több szerkesztőablak-csoportot is létre lehet hozni.", + "tabActiveForeground": "Az aktív fül előtérszíne az aktív csoportban. A fülek tartalmazzák a szerkesztőablakoket a szerkesztőterületen. Egy szerkesztőablak-csoportban több fül is megnyitható. Több szerkesztőablak-csoportot is létre lehet hozni.", + "tabInactiveForeground": "Az inaktív fülek előtérszíne az aktív csoportban. A fülek tartalmazzák a szerkesztőablakoket a szerkesztőterületen. Egy szerkesztőablak-csoportban több fül is megnyitható. Több szerkesztőablak-csoportot is létre lehet hozni.", + "tabUnfocusedActiveForeground": "Az aktív fül előtérszíne az inaktív csoportokban. A fülek tartalmazzák a szerkesztőablakoket a szerkesztőterületen. Egy szerkesztőablak-csoportban több fül is megnyitható. Több szerkesztőablak-csoportot is létre lehet hozni.", + "tabUnfocusedInactiveForeground": "Az inaktív fülek előtérszíne inaktív csoportokban. A fülek tartalmazzák a szerkesztőablakoket a szerkesztőterületen. Egy szerkesztőablak-csoportban több fül is megnyitható. Több szerkesztőablak-csoportot is létre lehet hozni.", + "editorGroupBackground": "A szerkesztőcsoportok háttérszíne. A szerkesztőcsoportok szerkesztőablakokat tartalmaznak. A háttérszín akkor jelenik meg, ha a szerkesztőcsoportok mozgatva vannak.", + "tabsContainerBackground": "A szerkesztőcsoport címsorának háttérszíne, ha a fülek engedélyezve vannak. A szerkesztőcsoportok szerkesztőablakokat tartalmaznak.", + "tabsContainerBorder": "A szerkesztőcsoport címsorának keretszíne, ha a fülek engedélyezve vannak. A szerkesztőcsoportok szerkesztőablakokat tartalmaznak.", + "editorGroupHeaderBackground": "A szerkesztőcsoport címsorának keretszíne, ha a fülek le vannak tiltva. A szerkesztőcsoportok szerkesztőablakokat tartalmaznak.", + "editorGroupBorder": "A szerkesztőcsoportokat elválasztó vonal színe. A szerkesztőcsoportok szerkesztőablakokat tartalmaznak.", + "editorDragAndDropBackground": "A szerkesztőablakok mozgatásánál használt háttérszín. Érdemes átlátszó színt választani, hogy a szerkesztőablak tartalma továbbra is látszódjon.", + "panelBackground": "A panelek háttérszíne. A panelek a szerkesztőterület alatt jelennek meg, és pl. itt található a kimenetet és az integrált terminál.", + "panelBorder": "A panelek keretszíne, ami elválasztja őket a szerkesztőablakoktól. A panelek a szerkesztőterület alatt jelennek meg, és pl. itt található a kimenetet és az integrált terminál.", + "panelActiveTitleForeground": "Az aktív panel címsorának színe. A panelek a szerkesztőterület alatt jelennek meg, és pl. itt található a kimenetet és az integrált terminál.", + "panelInactiveTitleForeground": "Az inaktív panelek címsorának színe. A panelek a szerkesztőterület alatt jelennek meg, és pl. itt található a kimenetet és az integrált terminál.", + "panelActiveTitleBorder": "Az aktív panel címsorának keretszíne. A panelek a szerkesztőterület alatt jelennek meg, és pl. itt található a kimenetet és az integrált terminál.", + "statusBarForeground": "Az állapotsor előtérszíne. Az állapotsor az ablak alján jelenik meg.", + "statusBarBackground": "Az állapotsor alapértelmezett háttérszíne. Az állapotsor az ablak alján jelenik meg.", + "statusBarBorder": "Az állapotsort az oldalsávtól és a szerkesztőablakoktól elválasztó keret színe. Az állapotsor az ablak alján jelenik meg.", + "statusBarNoFolderBackground": "Az állapotsor háttérszíne, ha nincs mappa megnyitva. Az állapotsor az ablak alján jelenik meg.", + "statusBarNoFolderForeground": "Az állapotsor előtérszíne, ha nincs mappa megnyitva. Az állapotsor az ablak alján jelenik meg.", + "statusBarItemActiveBackground": "Az állapotsor elemének háttérszíne kattintás esetén. Az állapotsor az ablak alján jelenik meg.", + "statusBarItemHoverBackground": "Az állapotsor elemének háttérszíne, ha az egérkurzor fölötte van. Az állapotsor az ablak alján jelenik meg.", + "statusBarProminentItemBackground": "Az állapotsor kiemelt elemeinek háttérszíne. A kiemelt elemek kitűnnek az állapotsor többi eleme közül, így jelezve a fontosságukat. Az állapotsor az ablak alján jelenik meg.", + "statusBarProminentItemHoverBackground": "Az állapotsor kiemelt elemeinek háttérszíne, ha az egérkurzor fölöttük van. A kiemelt elemek kitűnnek az állapotsor többi eleme közül, így jelezve a fontosságukat. Az állapotsor az ablak alján jelenik meg.", + "activityBarBackground": "A tevékenységsáv háttérszíne. A tevékenységsáv az ablak legszélén jelenik meg bal vagy jobb oldalon, segítségével lehet váltani az oldalsáv nézetei között.", + "activityBarForeground": "A tevékenységsáv előtérszíne (pl. az ikonok színe). A tevékenységsáv az ablak legszélén jelenik meg bal vagy jobb oldalon, segítségével lehet váltani az oldalsáv nézetei között.", + "activityBarBorder": "A tevékenyésgsáv keretszíne, ami elválasztja az oldalsávtól. A tevékenységsáv az ablak legszélén jelenik meg bal vagy jobb oldalon, segítségével lehet váltani az oldalsáv nézetei között.", + "activityBarDragAndDropBackground": "A tevékenységsáv elemeinek mozgatásánál használt visszajelzési szín. Érdemes átlátszó színt választani, hogy a tevékenységsáv elemei láthatóak maradjanak. A tevékenységsáv az ablak legszélén jelenik meg bal vagy jobb oldalon, segítségével lehet váltani az oldalsáv nézetei között.", + "activityBarBadgeBackground": "A tevékenységsáv értesítési jelvényeinek háttérszíne. A tevékenységsáv az ablak legszélén jelenik meg bal vagy jobb oldalon, segítségével lehet váltani az oldalsáv nézetei között.", + "activityBarBadgeForeground": "A tevékenységsáv értesítési jelvényeinek előtérszíne. A tevékenységsáv az ablak legszélén jelenik meg bal vagy jobb oldalon, segítségével lehet váltani az oldalsáv nézetei között.", + "sideBarBackground": "Az oldalsáv háttérszíne. Az oldalsávon található például a fájlkezelő és a keresés nézet.", + "sideBarForeground": "Az oldalsáv előtérszíne. Az oldalsávon található például a fájlkezelő és a keresés nézet.", + "sideBarBorder": "Az oldalsáv keretszíne, ami elválasztja a szerkesztőablaktól. Az oldalsávon található például a fájlkezelő és a keresés nézet.", + "sideBarTitleForeground": "Az oldalsáv címsorának előtérszíne. Az oldalsávon található például a fájlkezelő és a keresés nézet.", + "sideBarSectionHeaderBackground": "Az oldalsáv szakaszfejlécének háttérszíne. Az oldalsávon található például a fájlkezelő és a keresés nézet.", + "sideBarSectionHeaderForeground": "Az oldalsáv szakaszfejlécének előtérszíne. Az oldalsávon található például a fájlkezelő és a keresés nézet.", + "titleBarActiveForeground": "A címsor előtérszíne, ha az ablak aktív. Megjegyzés: ez a beállítás jelenleg csak macOS-en támogatott.", + "titleBarInactiveForeground": "A címsor előtérszíne, ha az ablak inaktív. Megjegyzés: ez a beállítás jelenleg csak macOS-en támogatott.", + "titleBarActiveBackground": "A címsor háttérszíne, ha az ablak aktív. Megjegyzés: ez a beállítás jelenleg csak macOS-en támogatott.", + "titleBarInactiveBackground": "A címsor háttérszíne, ha az ablak inaktív. Megjegyzés: ez a beállítás jelenleg csak macOS-en támogatott.", + "notificationsForeground": "Az értesítések előtérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsBackground": "Az értesítések háttérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsButtonBackground": "Az értesítések gombjainak háttérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsButtonHoverBackground": "Az értesítések gombjainak háttérszíne, ha az egérkurzor fölöttük van. Az értesítések az ablak tetején ugranak fel.", + "notificationsButtonForeground": "Az értesítések gombjainak előtérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsInfoBackground": "Az információs értesítések háttérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsInfoForeground": "Az információs értesítések előtérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsWarningBackground": "A figyelmeztető értesítések háttérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsWarningForeground": "A figyelmeztető értesítések előtérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsErrorBackground": "A hibajelző értesítések háttérszíne. Az értesítések az ablak tetején ugranak fel.", + "notificationsErrorForeground": "A hibajelző értesítések előtérszíne. Az értesítések az ablak tetején ugranak fel." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/actions.i18n.json new file mode 100644 index 0000000000000..623bfad721c6d --- /dev/null +++ b/i18n/hun/src/vs/workbench/electron-browser/actions.i18n.json @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "closeActiveEditor": "Szerkesztőablak bezárása", + "closeWindow": "Ablak bezárása", + "closeFolder": "Mappa bezárása", + "noFolderOpened": "Ebben a példányban nincs mappa megnyitva, amit be lehetne zárni.", + "newWindow": "Új ablak", + "toggleFullScreen": "Teljes képernyő be- és kikapcsolása", + "toggleMenuBar": "Menüsáv be- és kikapcsolása", + "toggleDevTools": "Fejlesztői eszközök be- és kikapcsolása", + "zoomIn": "Nagyítás", + "zoomOut": "Kicsinyítés", + "zoomReset": "Nagyítási szint alaphelyzetbe állítása", + "appPerf": "Indulási teljesítmény", + "reloadWindow": "Ablak újratöltése", + "switchWindowPlaceHolder": "Válassza ki az ablakot, amire váltani szeretne", + "current": "Aktuális ablak", + "switchWindow": "Ablak váltása...", + "quickSwitchWindow": "Gyors ablakváltás...", + "folders": "mappák", + "files": "fájlok", + "openRecentPlaceHolderMac": "Válasszon egy elérési utat! (A Cmd billentyű lenyomása esetén új ablakban nyílik meg)", + "openRecentPlaceHolder": "Válasszon egy elérési utat! (A Ctrl billentyű lenyomása esetén új ablakban nyílik meg)", + "openRecent": "Legutóbbi megnyitása...", + "quickOpenRecent": "Legutóbbi gyors megnyitása...", + "closeMessages": "Értesítések törlése", + "reportIssues": "Problémák jelentése", + "reportPerformanceIssue": "Teljesítményproblémák jelentése", + "keybindingsReference": "Billentyűparancs-referencia", + "openDocumentationUrl": "Dokumentáció", + "openIntroductoryVideosUrl": "Bemutatóvideók", + "toggleSharedProcess": "Megosztott folyamat be- és klikapcsolása", + "navigateLeft": "Navigálás a balra lévő nézetre", + "navigateRight": "Navigálás a jobbra lévő nézetre", + "navigateUp": "Navigálás a felül lévő nézetre", + "navigateDown": "Navigálás az alul lévő nézetre", + "increaseViewSize": "Jelenlegi nézet méretének növelése", + "decreaseViewSize": "Jelenlegi nézet méretének csökkentése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/commands.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/commands.i18n.json new file mode 100644 index 0000000000000..3a1051dcfdad7 --- /dev/null +++ b/i18n/hun/src/vs/workbench/electron-browser/commands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "diffLeftRightLabel": "{0} ⟷ {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/extensionHost.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/extensionHost.i18n.json new file mode 100644 index 0000000000000..41f2c6757d6a8 --- /dev/null +++ b/i18n/hun/src/vs/workbench/electron-browser/extensionHost.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionHostProcess.startupFailDebug": "A kiegészítő gazdafolyamata nem idult el 10 másodperben belül. Elképzelhető, hogy megállt az első soron, és szüksége van a hibakeresőre a folytatáshoz.", + "extensionHostProcess.startupFail": "A kiegészítő gazdafolyamata nem idult el 10 másodperben belül. Ez probléma lehet.", + "extensionHostProcess.error": "A kiegészítő gazdafolyamatától hiba érkezett: {0}", + "extensionHostProcess.crash": "A kiegészítő gazdafolyamata váratlanul leállt. Töltse újra az ablakot a visszaállításhoz." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/main.contribution.i18n.json new file mode 100644 index 0000000000000..65965e2d96466 --- /dev/null +++ b/i18n/hun/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -0,0 +1,69 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "view": "Nézet", + "help": "Súgó", + "file": "Fájl", + "developer": "Fejlesztői", + "showEditorTabs": "Meghatározza, hogy a megnyitott szerkesztőablakok telején megjelenjenek-e a fülek", + "editorTabCloseButton": "Meghatározza a szerkesztőablakok fülein található bezárógomb pozícióját vagy eltávolítja őket, ha a beállítás értéke 'off'.", + "showIcons": "Meghatározza, hogy a megnyitott szerkesztőablakok ikonnal együtt jelenjenek-e meg. A működéshez szükséges egy ikontéma engedélyezése is.", + "enablePreview": "Meghatározza, hogy a megnyitott szerkesztőablakok előnézetként jelenjenek-e meg. Az előnézetként használt szerkesztőablakok újra vannak hasznosítva, amíg meg nem tartja őket a felhasználó (pl. dupla kattintás vagy szerkesztés esetén).", + "enablePreviewFromQuickOpen": "Meghatározza, hogy a gyors megnyitás során megnyitott szerkesztőablakok előnézetként jelenjenek-e meg. Az előnézetként használt szerkesztőablakok újra vannak hasznosítva, amíg meg nem tartja őket a felhasználó (pl. dupla kattintás vagy szerkesztés esetén).", + "editorOpenPositioning": "Meghatározza, hogy hol nyíljanak meg a szerkesztőablakok. A 'left' vagy 'right' használata esetén az aktív szerkesztőablaktól jobbra vagy balra nyílnak meg az újak. A 'first' vagy 'last' esetén a szerkesztőablakok a jelenleg aktív ablaktól függetlenül nyílnak meg.", + "revealIfOpen": "Meghatározza, hogy egy szerkesztőablak fel legyen-e fedve, ha már meg van nyitva a látható csoportok bármelyiképben. Ha le van tiltva, akkor egy új szerkesztőablak nyílik az aktív szerkesztőablak-csoportban. Ha engedélyezve van, akkor a már megnyitott szerkesztőablak lesz felfedve egy új megnyitása helyett. Megjegyzés: vannak esetek, amikor ez a beállítás figyelmen kívül van hagyva, pl. ha egy adott szerkesztőablak egy konkrét csoportban vagy a jelenleg aktív csoport mellett van menyitva.", + "commandHistory": "Meghatározza, hogy mennyi legutóbb használt parancs jelenjen meg a parancskatalógus előzményeinek listájában. Az előzmények kikapcsolásához állítsa az értéket 0-ra.", + "preserveInput": "Meghatározza, hogy a legutóbb beírt parancs automatikusan helyre legyen-e állítva a parancskatalógus következő megnyitása során.", + "closeOnFocusLost": "Meghatározza, hogy a gyors megnyitás automatikusan bezáródjon-e amint elveszíti a fókuszt.", + "openDefaultSettings": "Meghatározza, hogy a beállítások megnyitásakor megnyíljon-e egy szerkesztő az összes alapértelmezett beállítással.", + "sideBarLocation": "Meghatározza az oldalsáv helyét. Az oldalsáv megjelenhet a munkaterület bal vagy jobb oldalán.", + "statusBarVisibility": "Meghatározza, hogy megjelenjen-e az állapotsor a munkaterület alján.", + "activityBarVisibility": "Meghatározza, hogy megjelenjen-e a tevékenységsáv a munkaterületen.", + "closeOnFileDelete": "Meghatározza, hogy bezáródjanak-e azok a szerkesztőablakok, melyekben olyan fájl van megnyitva, amelyet töröl vagy átnevez egy másik folyamat. A beállítás letiltása esetén a szerkesztőablak nyitva marad módosított állapotban ilyen esemény után. Megjegyzés: az alkalmazáson belüli törlések esetén mindig bezáródik a szerkesztőablakok, a módosított fájlok pedig soha nem záródnak be, hogy az adatok megmaradjanak.", + "swipeToNavigate": "Navigálás a nyitott fájlok között háromujjas, vízszintes húzással.", + "workbenchConfigurationTitle": "Munkaterület", + "window.openFilesInNewWindow.on": "A fájlok új ablakban nyílnak meg", + "window.openFilesInNewWindow.off": "A fájlok abban az ablakban nyílnak meg, ahol a mappájuk meg van nyitva vagy a legutoljára aktív ablakban", + "window.openFilesInNewWindow.default": "A fájlok abban az ablakban nyílnak meg, ahol a mappájuk meg van nyitva vagy a legutoljára aktív ablakban, kivéve, ha a dokkról vagy a Finderből lettek megnyitva (csak macOS-en)", + "openFilesInNewWindow": "Meghatározza, hogy a fájlok új ablakban legyenek-e megnyitva.\n- default: A fájlok abban az ablakban nyílnak meg, ahol a mappájuk meg van nyitva vagy a legutoljára aktív ablakban, kivéve, ha a dokkról vagy a Finderből lettek megnyitva (csak macOS-en)\n- on: A fájlok új ablakban nyílnak meg.\n- off: A fájlok abban az ablakban nyílnak meg, ahol a mappájuk meg van nyitva vagy a legutoljára aktív ablakban\nMegjegyzés: vannak esetek, amikor ez a beállítás figyelmen kívül van hagyva (pl. a -new-window vagy a -reuse-window parancssori beállítás használata esetén).", + "window.openFoldersInNewWindow.on": "A mappák új ablakban nyílnak meg", + "window.openFoldersInNewWindow.off": "A mappák lecserélik a legutoljára aktív ablakot", + "window.openFoldersInNewWindow.default": "A mappák új ablakban nyílnak meg, kivéve akkor, ha a mappát az alkalmazáson belül lett kiválasztva (pl. a Fájl menüből)", + "openFoldersInNewWindow": "Meghatározza, hogy a mappák új ablakban legyenek-e megnyitva.\n- alapértelmezett: A mappák új ablakban nyílnak meg, kivéve akkor, ha a mappát az alkalmazáson belül lett kiválasztva (pl. a Fájl menüből)\n- on: A mappák új ablakban nyílnak meg\n- off: A mappák lecserélik a legutoljára aktív ablakot\nMegjegyzés: vannak esetek, amikor ez a beállítás figyelmen kívül van hagyva (pl. a -new-window vagy a -reuse-window parancssori beállítás használata esetén).", + "window.reopenFolders.all": "Összes ablak újranyitása.", + "window.reopenFolders.folders": "Összes mappa újranyitása. Az üres ablakok nem lesznek helyreállítva.", + "window.reopenFolders.one": "A legutóbbi aktív ablak újranyitása.", + "window.reopenFolders.none": "Soha ne nyisson meg újra ablakot. Mindig üresen induljon.", + "restoreWindows": "Meghatározza, hogy újraindítás után hogyan vannak ismét megnyitva az ablakok. A 'none' választása esetén mindig üres ablak indul, 'one' esetén a legutóbb használt ablak nyílik meg újra, a 'folders' megnyitja az összes megnyitott mappát, míg az 'all' újranyitja az összes ablakot az előző munkamenetből.", + "restoreFullscreen": "Meghatározza, hogy az ablak teljesképernyős módban nyíljon-e meg, ha kilépéskor teljes képernyős módban volt.", + "zoomLevel": "Meghatározza az ablak nagyítási szintjét. Az eredei méret 0, és minden egyes plusz (pl. 1) vagy mínusz (pl. -1) 20%-kal nagyobb vagy kisebb nagyítási szintet jelent. Tizedestört megadása esetén a nagyítási szint finomabban állítható.", + "title": "Meghatározza az ablak címét az aktív szerkesztőablak alapján. A változók a környezet alapján vannak behelyettesítve:\n${activeEditorShort}: pl. myFile.txt\n${activeEditorMedium}: pl. myFolder/myFile.txt\n${activeEditorLong}: pl. /Users/Development/myProject/myFolder/myFile.txt\n${rootName}: pl. myProject\n${rootPath}: pl. /Users/Development/myProject\n${appName}: pl. VS Code\n${dirty}: módosításjelző, ami jelzi, ha az aktív szerkesztőablak tartalma módosítva lett\n${separator}: feltételes elválasztó (\" - \"), ami akkor jelenik meg, ha olyan változókkal van körülvéve, amelyeknek van értéke\n", + "window.newWindowDimensions.default": "Az új ablakok a képernyő közepén nyílnak meg.", + "window.newWindowDimensions.inherit": "Az új ablakok ugyanolyan méretben és ugyanazon a helyen jelennek meg, mint a legutoljára aktív ablak.", + "window.newWindowDimensions.maximized": "Az új ablakok teljes méretben nyílnak meg.", + "window.newWindowDimensions.fullscreen": "Az új ablakok teljes képernyős módban nyílnak meg.", + "newWindowDimensions": "Meghatározza az új ablakok méretét és pozícióját, ha már legalább egy ablak meg van nyitva. Az új ablakok alapértlmezetten a képernyő közepén, kis mérettel nyílnak meg. Ha az értéke 'inherit', az ablak ugyanazon méretben és pozícióban nyílik meg, mint a legutoljára aktív. Ha az értéke 'maximized', teljes méretben, ha pedig 'fullscreen' akkor teljes képernyős módban nyílik meg. Megjegyzés: a beállítás nincs hatással az első megnyitott ablakra. Az első ablak mindig a bezárás előtti mérettel és pozícióban nyílik meg.", + "window.menuBarVisibility.default": "A menü csak teljes képernyős mód esetén van elrejtve.", + "window.menuBarVisibility.visible": "A menü mindig látható, még teljes képernyő módban is.", + "window.menuBarVisibility.toggle": "A menü rejtett, de megjeleníthető az Alt billentyű lenyomásával.", + "window.menuBarVisibility.hidden": "A menü mindig el van rejtve.", + "menuBarVisibility": "Meghatározza a menüsáv láthatóságát. A 'toggle' érték azt jelenti, hogy a menüsáv rejtett, és az Alt billentyű lenyomására megjelenik. A menüsáv alapértelmezetten látható, kivéve, ha az ablak teljes képernyős módban van.", + "enableMenuBarMnemonics": "Ha engedélyezve van, a főmenük megnyithatók Alt-billentyűs billentyűparancsokkal. Letiltás esetén ezek az Alt-billentyűparancsok más parancsokhoz rendelhetők.", + "autoDetectHighContrast": "Ha engedélyezve van, az alkalmazás automatikusan átvált a nagy kontrasztos témára, ha a WIndows a nagy kontrasztos témát használ, és a sötét témára, ha a Windows átvált a nagy kontrasztos témáról.", + "titleBarStyle": "Módosítja az ablak címsorának megjelenését. A változtatás teljes újraindítást igényel.", + "window.nativeTabs": "Engedélyezi a macOS Sierra ablakfüleket. Megjegyzés: a változtatás teljes újraindítást igényel, és a natív fülek letiltják az egyedi címsorstílust, ha azok be vannak konfigurálva.", + "windowConfigurationTitle": "Ablak", + "zenModeConfigurationTitle": "Zen-mód", + "zenMode.fullScreen": "Meghatározza, hogy zen-módban a munakterület teljes képernyős módba vált-e.", + "zenMode.hideTabs": "Meghatározza, hogy zen-módban el vannak-e rejtve a munkaterület fülei.", + "zenMode.hideStatusBar": "Meghatározza, hogy zen-módban el van-e rejtve a munkaterület alján található állapotsor.", + "zenMode.hideActivityBar": "Meghatározza, hogy zen-módban el van-e rejtve a munkaterület bal oldalán található tevékenységsáv.", + "zenMode.restore": "Meghatározza, hogy az ablak zen-módban induljon-e, ha kilépéskor zen-módban volt.", + "workspaceConfigurationTitle": "Munkaterület", + "workspaces.title": "A munkaterület mappakonfiugrációja", + "files.exclude.boolean": "A globális minta, amire illesztve lesznek a fájlok elérési útjai. A minta engedélyezéséhez vagy letiltásához állítsa igaz vagy hamis értékre.", + "workspaces.additionalFolders": "A munkaterület mappái" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/main.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/main.i18n.json new file mode 100644 index 0000000000000..35ad4a784e889 --- /dev/null +++ b/i18n/hun/src/vs/workbench/electron-browser/main.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "loaderError": "Az egyik szükséges fájlt nem sikerült betölteni. Vagy megszakadt az internetkapcsolat, vagy a kiszolgáló vált offline-ná. Frissítse az oldalt a böngészőben, és próbálkozzon újra.", + "loaderErrorNative": "Egy szükséges fájl betöltése nem sikerült. Indítsa újra az alkalmazást, és próbálkozzon újra. Részletek: {0}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/shell.i18n.json new file mode 100644 index 0000000000000..f9fefa3fe2d6e --- /dev/null +++ b/i18n/hun/src/vs/workbench/electron-browser/shell.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "runningAsRoot": "Nem ajánlott a Code-ot 'root'-ként futtatni." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/window.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/window.i18n.json new file mode 100644 index 0000000000000..13f0befdb66be --- /dev/null +++ b/i18n/hun/src/vs/workbench/electron-browser/window.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "undo": "Visszavonás", + "redo": "Újra", + "cut": "Kivágás", + "copy": "Másolás", + "paste": "Beillesztés", + "selectAll": "Összes kijelölése", + "confirmOpen": "Biztosan meg akar nyitni {0} mappát?", + "confirmOpenButton": "&&Megnyitás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/hun/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..e230783deddd8 --- /dev/null +++ b/i18n/hun/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "developer": "Fejlesztői", + "file": "Fájl" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/node/extensionHostMain.i18n.json b/i18n/hun/src/vs/workbench/node/extensionHostMain.i18n.json new file mode 100644 index 0000000000000..acba56dc6e902 --- /dev/null +++ b/i18n/hun/src/vs/workbench/node/extensionHostMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionTestError": "Az {0} elérési út nem érvényes kiegészítő tesztfuttató alkalmazásra mutat." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/node/extensionPoints.i18n.json b/i18n/hun/src/vs/workbench/node/extensionPoints.i18n.json new file mode 100644 index 0000000000000..e9cae50ed459f --- /dev/null +++ b/i18n/hun/src/vs/workbench/node/extensionPoints.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "jsonParseFail": "Hiba a(z) {0} feldolgozása közben: {1}.", + "fileReadFail": "A(z) ({0}) fájl nem olvasható: {1}.", + "jsonsParseFail": "Hiba a(z) {0} vagy {1} feldolgozása közben: {2}.", + "missingNLSKey": "A(z) {0} kulcshoz tartozó üzenet nem található." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json new file mode 100644 index 0000000000000..371e0ad88d7c6 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "install": "'{0}' parancs telepítése a PATH-ba", + "not available": "Ez a parancs nem érhető el.", + "successIn": "A(z) '{0}' rendszerparancs sikeresen telepítve lett a PATH-ba.", + "warnEscalation": "A Code adminisztrátori jogosultságot fog kérni az 'osascript'-tel a rendszerparancs telepítéséhez.", + "ok": "OK", + "cantCreateBinFolder": "Nem sikerült létrehozni az '/usr/local/bin' könyvtárat.", + "cancel2": "Mégse", + "aborted": "Megszakítva", + "uninstall": "'{0}' parancs eltávolítása a PATH-ból", + "successFrom": "A(z) '{0}' rendszerparancs sikeresen el lett a PATH-ból.", + "shellCommand": "Rendszerparancs" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..0edff5007dec9 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "Az `editor.accessibilitySupport` beállítás értékének beállítása a következőre: 'on'.", + "openingDocs": "A VS Code kisegítő lehetőségei dokumentációjának megnyitása.", + "introMsg": "Köszönjük, hogy kipróbálta a VS Code kisegítő lehetőségeit.", + "status": "Állapot:", + "changeConfigToOnMac": "A szerkesztő folyamatos képernyőolvasóval való használatára optimalizálásához nyomja meg a Command+E gombot!", + "changeConfigToOnWinLinux": "A szerkesztő folyamatos képernyőolvasóval való használatára optimalizálásához nyomja meg a Control+E gombot!", + "auto_unknown": "A szerkesztő úgy van konfigurálva, hogy a platform által biztosított API-kat használja annak megállapításához, hogy van-e képernyőolvasó csatlakoztatva, azonban a jelenlegi futtatókörnyezet ezt nem támogatja.", + "auto_on": "A szerkesztő automatikusan észlelte a csatlakoztatott képernyőolvasót.", + "auto_off": "A szerkesztő úgy van konfigurálva, hogy automatikusan érzékelkje, ha képernyőolvasó van csatlakoztatva. Jelenleg nincs csatlakoztatva.", + "configuredOn": "A szerkesztő folyamatos képernyőolvasóval való használatára van optimalizálva – ez az `editor.accessibilitySupport` beállítás módosításával változtatható.", + "configuredOff": "A szerkesztő úgy van konfigurálva, hogy soha nincs képernyőolvasó használatára optimalizálva.", + "tabFocusModeOnMsg": "Az aktuális szerkesztőablakban a Tab billentyű lenyomása esetén a fókusz a következő fókuszálható elemre kerül. Ez a viselkedés a(z) {0} leütésével módosítható.", + "tabFocusModeOnMsgNoKb": "Az aktuális szerkesztőablakban a Tab billentyű lenyomása esetén a fókusz a következő fókuszálható elemre kerül. A(z) {0} parancs jelenleg nem aktiválható billentyűkombinációval.", + "tabFocusModeOffMsg": "Az aktuális szerkesztőablakban a Tab billentyű lenyomása esetén beszúrásra kerül egy tabulátor karakter. Ez a viselkedés a(z) {0} leütésével módosítható.", + "tabFocusModeOffMsgNoKb": "Az aktuális szerkesztőablakban a Tab billentyű lenyomása esetén beszúrásra kerül egy tabulátor karakter. A(z) {0} parancs jelenleg nem aktiválható billentyűkombinációval.", + "openDocMac": "VS Code kisegítő lehetőségeivel kapcsolatos információk böngészőben való megjelenítéséhez nyomja meg a Command+H billentyűkombinációt!", + "openDocWinLinux": "VS Code kisegítő lehetőségeivel kapcsolatos információk böngészőben való megjelenítéséhez nyomja meg a Control+H billentyűkombinációt!", + "outroMsg": "A súgószöveg eltüntetéséhez és a szerkesztőablakba való visszatéréshez nyomja meg az Escape billentyűt vagy a Shift+Escape billentyűkombinációt!", + "ShowAccessibilityHelpAction": "Kisegítő lehetőségek súgó megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json new file mode 100644 index 0000000000000..b01c9a81930b8 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbench.action.inspectKeyMap": "Fejlesztői: Billentyűkiosztás vizsgálata" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..a0a8e4d892847 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Többkurzoros módosító be- és kikapcsolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json new file mode 100644 index 0000000000000..79c5e7716eee6 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleRenderControlCharacters": "Vezérlőkarakterek be- és kikapcsolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json new file mode 100644 index 0000000000000..e496d62b10240 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleRenderWhitespace": "Szóközök kirajzolásának be- és kikapcsolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json new file mode 100644 index 0000000000000..02a67dbe14632 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.wordwrap": "Nézet: Sortörés be- és kikapcsolása", + "wordWrap.notInDiffEditor": "A sortörés nem kapcsolható be vagy ki differenciaszerkesztőben.", + "unwrapMinified": "Sortörés letiltása ebben a fájlban", + "wrapMinified": "Sortörés engedélyezése ebben a fájlban" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json new file mode 100644 index 0000000000000..1631851aee5fc --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordWrapMigration.ok": "OK", + "wordWrapMigration.dontShowAgain": "Ne jelenjen meg újra", + "wordWrapMigration.openSettings": "Beállítások megnyitása", + "wordWrapMigration.prompt": "Az `editor.wrappingColumn` beállítás elavult az `editor.wordWrap` bevezetése miatt." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json new file mode 100644 index 0000000000000..9a0eccdde5015 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "breakpointWidgetExpressionPlaceholder": "Futás megállítása, ha a kifejezés értéke igazra értékelődik ki. 'Enter' a megerősítéshez vagy 'Escape' a megszakításhoz.", + "breakpointWidgetAriaLabel": "A program csak akkor áll meg itt, ha a feltétel igaz. Nyomjon 'Enter'-t a megerősítéshez vagy 'Escape'-et a megszakításhoz.", + "breakpointWidgetHitCountPlaceholder": "Futás megállítása, ha adott alkalommal érintve lett. 'Enter' a megerősítéshez vagy 'Escape' a megszakításhoz.", + "breakpointWidgetHitCountAriaLabel": "A program akkor fog megállni itt, ha adott alkalommal érintette ezt a pontot. Nyomjon 'Enter'-t a megerősítéshez vagy 'Escape'-et a megszakításhoz.", + "expression": "Kifejezés", + "hitCount": "Érintések száma" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json new file mode 100644 index 0000000000000..c7cfbc8b3baa9 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "addConfiguration": "Konfiguráció hozzáadása...", + "noConfigurations": "Nincs konfiguráció" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/debugActions.i18n.json new file mode 100644 index 0000000000000..e98acd71fa157 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openLaunchJson": "{0} megnyitása", + "launchJsonNeedsConfigurtion": "'launch.json' konfigurálása vagy javítása", + "noFolderDebugConfig": "Fejlettebb hibakeresési konfigurációk használatához nyisson meg egy mappát!", + "startDebug": "Hibakeresés indítása", + "startWithoutDebugging": "Indítás hibakeresés nélkül", + "selectAndStartDebugging": "Hibakeresés kiválasztása és indítása", + "restartDebug": "Újraindítás", + "reconnectDebug": "Újracsatlakozás", + "stepOverDebug": "Átugrás", + "stepIntoDebug": "Belépés", + "stepOutDebug": "Kilépés", + "stopDebug": "Leállítás", + "disconnectDebug": "Kapcsolat bontása", + "continueDebug": "Folytatás", + "pauseDebug": "Szüneteltetés", + "restartFrame": "Keret újraindítása", + "removeBreakpoint": "Töréspont eltávolítása", + "removeAllBreakpoints": "Összes töréspont eltávolítása", + "enableBreakpoint": "Töréspont engedélyezése", + "disableBreakpoint": "Töréspont letiltása", + "enableAllBreakpoints": "Összes töréspont engedélyezése", + "disableAllBreakpoints": "Összes töréspont letiltása", + "activateBreakpoints": "Töréspontok aktiválása", + "deactivateBreakpoints": "Töréspontok deaktiválása", + "reapplyAllBreakpoints": "Töréspontok felvétele ismét", + "addFunctionBreakpoint": "Függvénytöréspont hozzáadása", + "renameFunctionBreakpoint": "Függvénytöréspont átnevezése", + "addConditionalBreakpoint": "Feltételes töréspont hozzáadása...", + "editConditionalBreakpoint": "Töréspont szerkesztése...", + "setValue": "Érték beállítása", + "addWatchExpression": "Kifejezés hozzáadása", + "editWatchExpression": "Kifejezés szerkesztése", + "addToWatchExpressions": "Hozzáadás a figyelőlistához", + "removeWatchExpression": "Kifejezés eltávolítása", + "removeAllWatchExpressions": "Összes kifejezés eltávolítása", + "clearRepl": "Konzoltartalom törlése", + "debugConsoleAction": "Hibakeresési konzol", + "unreadOutput": "Új kimenet a hibakeresési konzolban", + "debugFocusConsole": "Váltás a hibakeresési konzolra", + "focusProcess": "Váltás a folyamatra", + "stepBackDebug": "Visszalépés", + "reverseContinue": "Visszafordítás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..fa1bc4e164b69 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugToolBarBackground": "A hibakeresési eszköztár háttérszíne." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json new file mode 100644 index 0000000000000..b66b9f52e6897 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unable": "Az erőforrás nem oldható fel hibakeresési munkamenet nélkül" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json new file mode 100644 index 0000000000000..7d9b38824da42 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleBreakpointAction": "Hibakeresés: Töréspont be- és kikapcsolása", + "columnBreakpointAction": "Hibakeresés: Töréspont oszlopnál", + "columnBreakpoint": "Oszlop töréspont hozzáadása", + "conditionalBreakpointEditorAction": "Hibakeresés: Feltételes töréspont...", + "runToCursor": "Futtatás a kurzorig", + "debugEvaluate": "Hibakeresés: Kiértékelés", + "debugAddToWatch": "Hibakeresés: Hozzáadás a figyelőlistához", + "showDebugHover": "Hibakeresés: Súgószöveg megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json new file mode 100644 index 0000000000000..bbe58d3ce4242 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "breakpointDisabledHover": "Letiltott töréspont", + "breakpointUnverifieddHover": "Nem megerősített töréspont", + "breakpointDirtydHover": "Nem megerősített töréspont. A fájl módosult, indítsa újra a hibakeresési munkamenetet.", + "breakpointUnsupported": "Ez a hibakereső nem támogatja a feltételes töréspontokat" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json new file mode 100644 index 0000000000000..4020242c40ced --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, hibakeresés", + "debugAriaLabel": "Írja be a futtatandó konfiguráció nevét.", + "noConfigurationsMatching": "Nincs illeszkedő hibakeresési konfiguráció", + "noConfigurationsFound": "Nem található hibakeresési konfiguráció. Készítsen egy 'launch.json' fájlt." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json new file mode 100644 index 0000000000000..37b31bfd19b47 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugExceptionWidgetBorder": "A kivételmodul keretszíne.", + "debugExceptionWidgetBackground": "A kivételmodul háttérszíne.", + "exceptionThrownWithId": "Kivétel következett be: {0}", + "exceptionThrown": "Kivétel következett be." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..8e0e584901b1f --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "Megnyitás kattintásra (Cmd + kattintásra oldalt nyitja meg)", + "fileLink": "Megnyitás kattintásra (Ctrl + kattintásra oldalt nyitja meg)" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..bceb3f2cf21ab --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "Meghatározza a belső hibakeresési konzol viselkedését." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/common/debugModel.i18n.json new file mode 100644 index 0000000000000..a3704d3069835 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notAvailable": "nem elérhető", + "startDebugFirst": "Indítson egy hibakeresési folyamatot a kiértékeléshez" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..4054145e143a8 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "Ismeretlen forrás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json new file mode 100644 index 0000000000000..fa24086f10125 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleDebugViewlet": "Hibakeresés megjelenítése", + "toggleDebugPanel": "Hibakeresési konzol", + "debug": "Hibakeresés", + "debugPanel": "Hibakeresési konzol", + "view": "Nézet", + "debugCategory": "Hibakeresés", + "debugCommands": "Hibakeresési konfiguráció", + "debugConfigurationTitle": "Hibakeresés", + "allowBreakpointsEverywhere": "Bármelyik fájlban helyezhető el töréspont", + "openExplorerOnEnd": "Hibakeresési munkamenet végén automatikusan nyíljon meg a fájlkezelő nézet", + "inlineValues": "Változók értékének megjelenítése a sorok között hibakeresés közben", + "hideActionBar": "Meghatározza, hogy megjelenjen-e a lebegő hibakeresési műveletsáv", + "launch": "Globális hibakeresés indítási konfiguráció. Használható a 'launch.json' alternatívájaként, ami meg van osztva több munkaterület között" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..096d97567fc37 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noFolderDebugConfig": "Fejlettebb hibakeresési konfigurációk használatához nyisson meg egy mappát!" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json new file mode 100644 index 0000000000000..7f6a09aa689f5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.debuggers": "Hibakeresési illesztőket szolgáltat.", + "vscode.extension.contributes.debuggers.type": "A hibakeresési illesztő egyedi azonosítója.", + "vscode.extension.contributes.debuggers.label": "A hibakeresési illesztő megjelenített neve.", + "vscode.extension.contributes.debuggers.program": "A hibakeresési illesztő program elérési útja. Az elérési út lehet abszolút vagy relatív a kiegészítő mappájához képest.", + "vscode.extension.contributes.debuggers.args": "Az illesztő számára átadott argumentumok.", + "vscode.extension.contributes.debuggers.runtime": "Kiegészítő futtatókörnyezet arra az esetre, ha a program attribútum nem egy futtatható fájl, és futtatókörnyezetre van szüksége.", + "vscode.extension.contributes.debuggers.runtimeArgs": "Kiegészítő argumentumok a futtatókörnyezet számára.", + "vscode.extension.contributes.debuggers.variables": "A `launch.json`-ban található interaktív változók (pl. ${action.pickProcess}) hozzárendelése parancsokhoz.", + "vscode.extension.contributes.debuggers.initialConfigurations": "Konfigurációk a 'launch.json' első változatának elkészítéséhez.", + "vscode.extension.contributes.debuggers.languages": "Azon nyelvek listája, amelyeknél ez a hibakeresési kiegészítő alapértelmezett hibakeresőnek tekinthető.", + "vscode.extension.contributes.debuggers.adapterExecutableCommand": "Ha meg van adva, a VS Code ezt a parancsot fogja hívni a hibakeresési illesztő futtatható állománya elérési útjának és az átadandó argumentumok meghatározásához.", + "vscode.extension.contributes.debuggers.startSessionCommand": "Ha meg van határozva, a VS Code ezt a parancsot fogja hívni az ennek a kiegészítőnek küldött \"debug\" vagy \"run\" parancsok esetén.", + "vscode.extension.contributes.debuggers.configurationSnippets": "Kódtöredékek új 'launch.json'-konfigurációk hozzáadásához.", + "vscode.extension.contributes.debuggers.configurationAttributes": "JSON-sémakonfigurációk a 'launch.json' validálásához.", + "vscode.extension.contributes.debuggers.windows": "Windows-specifikus beállítások.", + "vscode.extension.contributes.debuggers.windows.runtime": "A Windows által használt futtatókörnyezet.", + "vscode.extension.contributes.debuggers.osx": "OS X-specifikus beállítások.", + "vscode.extension.contributes.debuggers.osx.runtime": "Az OSX által használt futtatókörnyezet.", + "vscode.extension.contributes.debuggers.linux": "Linux-specifikus beállítások.", + "vscode.extension.contributes.debuggers.linux.runtime": "A Linux által használt futtatókörnyezet.", + "vscode.extension.contributes.breakpoints": "Töréspontokat szolgáltat.", + "vscode.extension.contributes.breakpoints.language": "Töréspontok engedélyezése ennél a nyelvnél.", + "app.launch.json.title": "Indítás", + "app.launch.json.version": "A fájlformátum verziója.", + "app.launch.json.configurations": "A konfigurációk listája. Új konfigurációk hozzáadhatók vagy a meglévők szerkeszthetők az IntelliSense használatával.", + "app.launch.json.compounds": "A kombinációk listája. Minden kombináció több konfigurációt hivatkozik meg, melyek együtt indulnak el.", + "app.launch.json.compound.name": "A kombináció neve. Az indítási konfiguráció lenyíló menüjében jelenik meg.", + "app.launch.json.compounds.configurations": "Azon konfigurációk neve, melyek elindulnak ezen kombináció részeként.", + "debugNoType": "A hibakeresési illesztő 'type' tulajdonsága kötelező, és 'string' típusúnak kell lennie.", + "DebugConfig.failed": "Nem sikerült létrehozni a 'launch.json' fájlt a '.vscode' mappánan ({0}).", + "selectDebug": "Környezet kiválasztása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json new file mode 100644 index 0000000000000..dde289381299c --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeBreakpoints": "Töréspontok eltávolítása", + "removeBreakpointOnColumn": "{0}. oszlopban található töréspont eltávolítása", + "removeLineBreakpoint": "Sorra vonatkozó töréspont eltávolítása", + "editBreakpoints": "Töréspontok szerkesztése", + "editBreakpointOnColumn": "{0}. oszlopban található töréspont szerkesztése", + "editLineBrekapoint": "Sorra vonatkozó töréspont szerkesztése", + "enableDisableBreakpoints": "Töréspontok engedélyezése/letiltása", + "disableColumnBreakpoint": "{0}. oszlopban található töréspont letiltása", + "disableBreakpointOnLine": "Sorszintű töréspont letiltása", + "enableBreakpoints": "{0}. oszlopban található töréspont engedélyezése", + "enableBreakpointOnLine": "Sorszintű töréspont engedélyezése", + "addBreakpoint": "Töréspont hozzáadása", + "addConfiguration": "Konfiguráció hozzáadása..." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json new file mode 100644 index 0000000000000..c222653e922ef --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeAriaLabel": "Hibakeresési súgószöveg" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json new file mode 100644 index 0000000000000..644abcafd013b --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "snapshotObj": "Ennél az objektumhoz csak a primitív értékek vannak megjelenítve.", + "debuggingPaused": "Hibakeresés szüneteltetve, oka: {0}, {1} {2}", + "debuggingStarted": "Hibakeresés elindítva.", + "debuggingStopped": "Hibakeresés leállítva.", + "breakpointAdded": "Töréspont hozzáadva, {0}. sor, fájl: {1}", + "breakpointRemoved": "Töréspont eltávoíltva, {0}. sor, fájl: {1}", + "compoundMustHaveConfigurations": "A kombinációk \"configurations\" tulajdonságát be kell állítani több konfiguráció elindításához.", + "configMissing": "A(z) '{0}' konfiguráció hiányzik a 'launch.json'-ból.", + "debugTypeNotSupported": "A megadott hibakeresési típus ('{0}') nem támogatott.", + "debugTypeMissing": "A kiválasztott indítási konfigurációnak hiányzik a 'type' tulajdonsága.", + "preLaunchTaskErrors": "Buildelési hibák léptek fel a(z) '{0}' preLaunchTask futása közben.", + "preLaunchTaskError": "Buildelési hiba lépett fel a(z) '{0}' preLaunchTask futása közben.", + "preLaunchTaskExitCode": "A(z) '{0}' preLaunchTask a következő hibakóddal fejeződött be: {1}.", + "debugAnyway": "Hibakeresés indítása mindenképp", + "noFolderWorkspaceDebugError": "Az aktív fájlon nem lehet hibakeresést végezni. Bizonyosodjon meg róla, hogy el van mentve a lemezre, és hogy az adott fájltípushoz telepítve van a megfelelő hibakeresési kiegészítő.", + "NewLaunchConfig": "Állítson be egy indítási konfigurációt az alkalmazása számára. {0}", + "DebugTaskNotFound": "A(z) '{0}' preLaunchTask nem található.", + "differentTaskRunning": "A(z) {0} feladat már fut. Nem futtatható a(z) {1} indítás előtti feladat." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json new file mode 100644 index 0000000000000..b11dd37762668 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "process": "Folyamat", + "paused": "Szüneteltetve", + "running": "Fut", + "thread": "Szál", + "pausedOn": "Szüneteltetve a következő helyen: {0}", + "loadMoreStackFrames": "További veremkeretek betöltése", + "threadAriaLabel": "Szál: {0}, hívási verem, hibakeresés", + "stackFrameAriaLabel": "{0} veremkeret, {0}. sor {1} {2}, hívási verem, hibakeresés", + "variableValueAriaLabel": "Adja meg a változó új nevét", + "variableScopeAriaLabel": "{0} hatókör, változók, hibakeresés", + "variableAriaLabel": "{0} értéke {1}, változók, hibakeresés", + "watchExpressionPlaceholder": "Figyelendő kifejezés", + "watchExpressionInputAriaLabel": "Adja meg a figyelendő kifejezést", + "watchExpressionAriaLabel": "{0} értéke {1}, figyelt, hibakeresés", + "watchVariableAriaLabel": "{0} értéke {1}, figyelt, hibakeresés", + "functionBreakpointPlaceholder": "A függvény, amin meg kell állni", + "functionBreakPointInputAriaLabel": "Adja meg a függvénytöréspontot", + "functionBreakpointsNotSupported": "Ez a hibakereső nem támogatja a függvénytöréspontokat", + "breakpointAriaLabel": "Töréspont a(z) {0}. sorban {1}, töréspontok, hibakeresés", + "functionBreakpointAriaLabel": "{0} függvénytöréspont, töréspontok, hibakeresés", + "exceptionBreakpointAriaLabel": "{0} kivételtöréspont, töréspontok, hibakeresés" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json new file mode 100644 index 0000000000000..e7e17b09fd6b5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "Változók szakasz", + "variablesAriaTreeLabel": "Hibakeresési változók", + "expressionsSection": "Kifejezések szaszasz", + "watchAriaTreeLabel": "Hibakeresési figyelőkifejezések", + "callstackSection": "Hívási verem szakasz", + "debugStopped": "Szüneteltetve a következő helyen: {0}", + "callStackAriaLabel": "Hibakeresési hívási verem", + "breakpointsSection": "Töréspontok szakasz", + "breakpointsAriaTreeLabel": "Hibakeresési töréspontok" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json new file mode 100644 index 0000000000000..b71c6795fa6ce --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copyValue": "Érték másolása", + "copy": "Másolás", + "copyAll": "Összes másolása", + "copyStackTrace": "Hívási verem másolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json new file mode 100644 index 0000000000000..fb49eeb2cdb18 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "moreInfo": "További információ", + "unableToLaunchDebugAdapter": "Nem sikerült elindítani a hibakeresési illesztőt a következő helyről: '{0}'.", + "unableToLaunchDebugAdapterNoArgs": "Nem sikerült elindítani a hibakeresési illesztőt.", + "stoppingDebugAdapter": "{0}. Hibakeresési illesztő leállítása.", + "debugAdapterCrash": "A hibakeresési illesztő folyamata váratlanul leállt" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json new file mode 100644 index 0000000000000..2490789235bb5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "replAriaLabel": "REPL-panel", + "actions.repl.historyPrevious": "Előző az előzményekből", + "actions.repl.historyNext": "Következő az előzményekből", + "actions.repl.acceptInput": "REPL bemenet elfogadása", + "actions.repl.copyAll": "Hibakeresés: Összes másolása a konzolból" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json new file mode 100644 index 0000000000000..929096a6c4338 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "stateCapture": "Az objekum állapota az első kiértékelés idején", + "replVariableAriaLabel": "A(z) {0} változó értéke: {1}, REPL, hibakeresés", + "replExpressionAriaLabel": "A(z) {0} kifejezés értéke: {1}, REPL, hibakeresés", + "replValueOutputAriaLabel": "{0}, REPL, hibakeresés", + "replKeyValueOutputAriaLabel": "A(z) {0} kimeneti változó értéke: {1}, REPL, hibakeresés" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json new file mode 100644 index 0000000000000..861e45437c786 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "statusBarDebuggingBackground": "Az állapotsor háttérszíne, ha a programon hibakeresés folyik. Az állapotsor az ablak alján jelenik meg.", + "statusBarDebuggingForeground": "Az állapotsor előtérszíne, ha a programon hibakeresés folyik. Az állapotsor az ablak alján jelenik meg." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json new file mode 100644 index 0000000000000..8e82d560ff027 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debug.terminal.title": "hibakereső", + "debug.terminal.not.available.error": "Az integrált terminál nem elérhető" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/hun/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json new file mode 100644 index 0000000000000..6b2154af74d90 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugAdapterBinNotFound": "A hibakeresési illesztő futtatható állománya ('{0}') nem létezik.", + "debugAdapterCannotDetermineExecutable": "Nem határozható meg a(z) '{0}' hibakeresési illesztő futtatható állománya.", + "debugType": "A konfiguráció típusa.", + "debugTypeNotRecognised": "Ez a hibakeresési típus nem ismert. Bizonyosodjon meg róla, hogy telepítve és engedélyezve van a megfelelő hibakeresési kiegészítő.", + "node2NotSupported": "A \"node2\" már nem támogatott. Használja helyette a \"node\"-ot, és állítsa a \"protocol\" attribútum értékét \"inspector\"-ra.", + "debugName": "A konfiguráció neve. Az indítási konfiguráció lenyíló menüjében jelenik meg.", + "debugRequest": "A konfiguráció kérési típusa. Lehet \"launch\" vagy \"attach\".", + "debugServer": "Csak hibakeresési kiegészítők fejlesztéséhez: ha a port meg van adva, akkor a VS Code egy szerver módban futó hibakeresési illesztőhöz próbál meg csatlakozni.", + "debugPrelaunchTask": "A hibakeresési folyamat előtt futtatandó feladat.", + "debugWindowsConfiguration": "Windows-specifikus indítási konfigurációs attribútumok.", + "debugOSXConfiguration": "OS X-specifikus indítási konfigurációs attribútumok.", + "debugLinuxConfiguration": "Linux-specifikus indítási konfigurációs attribútumok.", + "deprecatedVariables": "Az 'env.', 'config.' és 'command.' tujdonságok elavultak, használja helyette az 'env:', 'config:' és 'command:' tulajdonságokat." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json new file mode 100644 index 0000000000000..0f5eb4400f63b --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showEmmetCommands": "Emmet-parancsok megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..1534d8b6077e9 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "balanceInward": "Emmet: Egyensúlyozás (belefé)", + "balanceOutward": "Emmet: Egyensúlyozás (kifelé)" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..219aad079bd90 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previousEditPoint": "Emmet: Ugrás az előző szerkesztési pontra", + "nextEditPoint": "Emmet: Ugrás a következő szerkesztési pontra" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..ab60a0c6b09da --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "evaluateMathExpression": "Emmet: Matematikai kifejezés kiértékelése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..646e5adcf6f2d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expandAbbreviationAction": "Emmet: Rövidítés kibontása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..d9e318872d89d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "incrementNumberByOneTenth": "Emmet: Növelés 0,1-gyel", + "incrementNumberByOne": "Emmet: Növelés 1-gyel", + "incrementNumberByTen": "Emmet: Növelés 10-zel", + "decrementNumberByOneTenth": "Emmet: Csökkentés 0,1-gyel", + "decrementNumberByOne": "Emmet: Csökkentés 1-gyel", + "decrementNumberByTen": "Emmet: Csökkentés 10-zel" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..cec247d0e8fd3 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "matchingPair": "Emmet: Ugrás az illeszkedő párra" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..de85d11a1367e --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mergeLines": "Emmet: Sorok összeolvasztása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..f4fa17b28600a --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reflectCSSValue": "Emmet: CSS-érték tükrözése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..ee23339dfca23 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeTag": "Emmet: Elem eltávolítása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..0d67ceb7a0237 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectPreviousItem": "Emmet: Előző elem kiválasztása", + "selectNextItem": "Emmet: Következő elem kiválasztása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..93c0cba54af55 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitJoinTag": "Emmet: Elem szétbontása/összeolvasztása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..cd5b4fc1fe348 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleComment": "Emmet: Megjegyzés be- és kikapcsolása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..82dab2c362c8b --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateImageSize": "Emmet: Képméret frissítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..60dea6fbae0d2 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateTag": "Emmet: Elem frissítése", + "enterTag": "Adja meg az elemet", + "tag": "Elem" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..7a062455c6270 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wrapWithAbbreviationAction": "Emmet: Becsomagolás rövidítéssel", + "enterAbbreviation": "Adja meg a rövidítést", + "abbreviation": "Rövidítés" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..a4c1aceb7c643 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "Ha engedélyezve van, akkor az Emmet-rövidítések a Tab billentyű lenyomásával bonthatók ki.", + "emmetPreferences": "Beállítások, melyek módosítják az Emmet műveleteinek és feloldó algoritmusainak viselkedését.", + "emmetSyntaxProfiles": "Konkrét szintaktika profiljának meghatározása vagy saját profil használata adott szabályokkal.", + "emmetExclude": "Azon nyelvek listája, ahol az Emmet-rövidítések ne legyenek kibontva.", + "emmetExtensionsPath": "Az Emmet-profilokat, -kódtöredékeket és -beállításokat tartalmazó mappa", + "useNewEmmet": "Új Emmet-modulok használata az összes Emmet-funkcióhoz (ami előbb-utóbb helyettesíteni fogja az egyedülálló Emmet-könyvtárat)." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json new file mode 100644 index 0000000000000..91f0c001e15c7 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalConfigurationTitle": "Külső terminál", + "terminal.external.windowsExec": "Meghatározza, hogy mely terminál fusson Windowson.", + "terminal.external.osxExec": "Meghatározza, hogy mely terminál fusson OS X-en.", + "terminal.external.linuxExec": "Meghatározza, hogy mely terminál fusson Linuxon.", + "globalConsoleActionWin": "Új parancssor megnyitása", + "globalConsoleActionMacLinux": "Új terminál megnyitása", + "scopedConsoleActionWin": "Megnyitás a parancssorban", + "scopedConsoleActionMacLinux": "Megnyitás a terminálban" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json b/i18n/hun/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json new file mode 100644 index 0000000000000..d8480642f6862 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "console.title": "VS Code-konzol", + "mac.terminal.script.failed": "A(z) '{0}' parancsfájl a következő hibakóddal lépett ki: {1}", + "mac.terminal.type.not.supported": "A(z) '{0}' nem támogatott", + "press.any.key": "A folytatáshoz nyomjon meg egy billentyűt...", + "linux.term.failed": "A(z) '{0}' a következő hibakóddal lépett ki: {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json new file mode 100644 index 0000000000000..e441ed0dd6dc6 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.view": "Egyedi nézetet szolgáltat", + "vscode.extension.contributes.view.id": "A vscode.workspace.createTreeView-n keresztül létrehozott nézet azonosítására szolgáló egyedi azonosító", + "vscode.extension.contributes.view.label": "A nézet kirajzolásához használt, emberek által olvasható szöveg", + "vscode.extension.contributes.view.icon": "A nézet ikonjának elérési útja", + "vscode.extension.contributes.views": "Egyedi nézeteket szolgáltat", + "showViewlet": "{0} megjelenítése", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json b/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json new file mode 100644 index 0000000000000..982d3cebdfeaa --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "refresh": "Frissítés" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json b/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json new file mode 100644 index 0000000000000..ccb7f2536108a --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.noMatchingProviderId": "Nincs {0} azonosítójú TreeExplorerNodeProvider regisztrálva" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json b/i18n/hun/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json new file mode 100644 index 0000000000000..4c975404538f6 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorerViewlet.tree": "Fa-alapú kezelőszakasz" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json new file mode 100644 index 0000000000000..0ea38cb93c45c --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error": "Hiba", + "Unknown Dependency": "Ismeretlen függőség:" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json new file mode 100644 index 0000000000000..9e2b6f5d7a4ce --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "name": "Kiegészítő neve", + "extension id": "Kiegészítő azonosítója", + "publisher": "Kiadó neve", + "install count": "Telepítések száma", + "rating": "Értékelés", + "license": "Licenc", + "details": "Részletek", + "contributions": "Szolgáltatások", + "changelog": "Változtatási napló", + "dependencies": "Függőségek", + "noReadme": "Leírás nem található.", + "noChangelog": "Változtatási napló nem található.", + "noContributions": "Nincsenek szolgáltatások", + "noDependencies": "Nincsenek függőségek", + "settings": "Beállítások ({0})", + "setting name": "Név", + "description": "Leírás", + "default": "Alapértelmezett érték", + "debuggers": "Hibakeresők ({0})", + "debugger name": "Név", + "views": "Nézetek ({0})", + "view id": "Azonosító", + "view name": "Név", + "view location": "Hol?", + "themes": "Témák ({0})", + "JSON Validation": "JSON-validációk ({0})", + "commands": "Parancsok ({0})", + "command name": "Név", + "keyboard shortcuts": "Billentyűparancsok", + "menuContexts": "Helyi menük", + "languages": "Nyelvek ({0})", + "language id": "Azonosító", + "language name": "Név", + "file extensions": "Fájlkiterjesztések", + "grammar": "Nyelvtan", + "snippets": "Kódtöredékek" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json new file mode 100644 index 0000000000000..348b2ebb6afb4 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installAction": "Telepítés", + "installing": "Telepítés...", + "uninstallAction": "Eltávolítás", + "Uninstalling": "Eltávolítás...", + "updateAction": "Frissítés", + "updateTo": "Frissítés ({0})", + "enableForWorkspaceAction.label": "Engedélyezés a munkaterületen", + "enableAlwaysAction.label": "Engedélyezés mindig", + "disableForWorkspaceAction.label": "Letiltás a munkaterületen", + "disableAlwaysAction.label": "Letiltás mindig", + "ManageExtensionAction.uninstallingTooltip": "Eltávolítás", + "enableForWorkspaceAction": "Munkaterület", + "enableGloballyAction": "Mindig", + "enableAction": "Engedélyezés", + "disableForWorkspaceAction": "Munkaterület", + "disableGloballyAction": "Mindig", + "disableAction": "Letiltás", + "checkForUpdates": "Frissítések keresése", + "enableAutoUpdate": "Kiegészítők automatikus frissítésének engedélyezése", + "disableAutoUpdate": "Kiegészítők automatikus frissítésének letiltása", + "updateAll": "Összes kiegészítő frissítése", + "reloadAction": "Újratöltés", + "postUpdateTooltip": "Újratöltés a frissítéshez", + "postUpdateMessage": "Újratölti az ablakot a frissített kiegészítő ('{0}') aktiválásához?", + "postEnableTooltip": "Újratöltés az aktiváláshoz", + "postEnableMessage": "Újratölti az ablakot a kiegészítő ('{0}') aktiválásához?", + "postDisableTooltip": "Újratöltés a kikapcsoláshoz", + "postDisableMessage": "Újratölti az ablakot a kiegészítő ('{0}') kikapcsolásához?", + "postUninstallTooltip": "Újratöltés a kikapcsoláshoz", + "postUninstallMessage": "Újratölti az ablakot az eltávolított kiegészítő ('{0}') kikapcsolásához?", + "reload": "Ablak új&&ratöltése", + "toggleExtensionsViewlet": "Kiegészítők megjelenítése", + "installExtensions": "Kiegészítők telepítése", + "showInstalledExtensions": "Telepített kiegészítők megjelenítése", + "showDisabledExtensions": "Letiltott kiegészítők megjelenítése", + "clearExtensionsInput": "Kiegészítők beviteli mező tartalmának törlése", + "showOutdatedExtensions": "Elavult kiegészítők megjelenítése", + "showPopularExtensions": "Népszerű kiegészítők megjelenítése", + "showRecommendedExtensions": "Ajánlott kiegészítők megjelenítése", + "showWorkspaceRecommendedExtensions": "Munkaterülethez ajánlott kiegészítők megjelenítése", + "showRecommendedKeymapExtensions": "Ajánlott billentyűkonfigurációk megjelenítése", + "showRecommendedKeymapExtensionsShort": "Billentyűkonfigurációk", + "showLanguageExtensions": "Nyelvi kiegészítők megjelenítése", + "showLanguageExtensionsShort": "Nyelvi kiegészítők", + "configureWorkspaceRecommendedExtensions": "Ajánlott kiegészítők konfigurálása (munkaterületre vonatkozóan)", + "ConfigureWorkspaceRecommendations.noWorkspace": "Az ajánlatok csak egy munkaterület mappájára vonatkozóan érhetők el.", + "OpenExtensionsFile.failed": "Nem sikerült létrehozni az 'extensions.json' fájlt a '.vscode' mappánan ({0}).", + "builtin": "Beépített", + "disableAll": "Összes telepített kiegészítő letiltása", + "disableAllWorkspace": "Összes telepített kiegészítő letiltása a munkaterületre vonatkozóan", + "enableAll": "Összes telepített kiegészítő engedélyezése", + "enableAllWorkspace": "Összes telepített kiegészítő engedélyezése a munkaterületre vonatkozóan", + "extensionButtonProminentBackground": "A kiegészítőkhöz tartozó kiemelt műveletgombok (pl. a Telepítés gomb) háttérszíne.", + "extensionButtonProminentForeground": "A kiegészítőkhöz tartozó kiemelt műveletgombok (pl. a Telepítés gomb) előtérszíne.", + "extensionButtonProminentHoverBackground": "A kiegészítőkhöz tartozó kiemelt műveletgombok (pl. a Telepítés gomb) háttérszíne, ha az egér fölötte van." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json new file mode 100644 index 0000000000000..85d01b9b53eab --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "manage": "Nyomjon Entert a kiegészítők kezeléséhez.", + "searchFor": "Nyomja meg az Enter gombot a(z) '{0}' kiegészítő kereséséhez a piactéren.", + "noExtensionsToInstall": "Adja meg a kiegészítő nevét" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json new file mode 100644 index 0000000000000..81a39e83e429f --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "app.extensions.json.title": "Kiegészítők", + "app.extensions.json.recommendations": "Ajánlott kiegészítők listája. A kiegészítők azonosítója mindig '${publisher}.${name}' formában van. Példa: 'vscode.csharp'.", + "app.extension.identifier.errorMessage": "Az elvárt formátum: '${publisher}.${name}'. Példa: 'vscode.csharp'." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json new file mode 100644 index 0000000000000..ed471bc488cfa --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionsInputName": "Kiegészítő: {0}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json new file mode 100644 index 0000000000000..09c306397f420 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reallyRecommended2": "Ehhez a fájltípushoz a(z) '{0}' kiegészítő ajánlott", + "showRecommendations": "Ajánlatok megjelenítése", + "neverShowAgain": "Ne jelenítse meg újra", + "close": "Bezárás", + "workspaceRecommended": "A munkaterülethez vannak javasolt kiegészítők", + "ignoreExtensionRecommendations": "Figyelmen kívül akarja hagyni az összes javasolt kiegészítőt?", + "ignoreAll": "Igen, az összes figyelmen kívül hagyása", + "no": "Nem", + "cancel": "Mégse" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json new file mode 100644 index 0000000000000..61b346af2edff --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionsCommands": "Kiegészítők kezelése", + "galleryExtensionsCommands": "Kiegészítők telepítése a galériából", + "extension": "Kiegészítő", + "extensions": "Kiegészítők", + "view": "Nézet", + "extensionsConfigurationTitle": "Kiegészítők", + "extensionsAutoUpdate": "Kiegészítők automatikus frissítése", + "extensionsIgnoreRecommendations": "Ajánlott kiegészítők figyelmen kívül hagyása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json new file mode 100644 index 0000000000000..aa157cfb84a02 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openExtensionsFolder": "Kiegészítők mappájának megnyitása", + "installVSIX": "Telepítés VSIX-ből...", + "InstallVSIXAction.success": "A kiegészítő sikeresen fel lett telepítve. Indítsa újra az engedélyezéshez.", + "InstallVSIXAction.reloadNow": "Újratöltés most" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..f71021aaf8793 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "disableOtherKeymapsConfirmation": "Letiltja a többi billentyűkonfigurációt ({0}) a billentyűparancsok közötti konfliktusok megelőzése érdekében?", + "yes": "Igen", + "no": "Nem", + "betterMergeDisabled": "A Better Merge kiegészítő most már be van építve. A telepített kiegészítő le lett tiltva és eltávolítható.", + "uninstall": "Eltávolítás", + "later": "Később" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json new file mode 100644 index 0000000000000..b897e553bd59d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "searchExtensions": "Kiegészítők keresése a piactéren", + "extensions": "Kiegészítők", + "sort by installs": "Rendezés a telepítések száma szerint", + "sort by rating": "Rendezés értékelés szerint", + "sort by name": "Rendezés név szerint", + "no extensions found": "Kiegészítő nem található.", + "suggestProxyError": "A piactér 'ECONNREFUSED' hibával tért vissza. Ellenőrizze a 'http.proxy' beállítást!", + "outdatedExtensions": "{0} elavult kiegészítő" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/hun/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json new file mode 100644 index 0000000000000..c4d13294809f7 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "enableDependeciesConfirmation": "A(z) '{0}' engedélyezésével annak függőségei is engedélyezve lesznek. Szeretné folytatni?", + "enable": "Igen", + "doNotEnable": "Nem", + "disableDependeciesConfirmation": "Csak a(z) '{0}' kiegészítőt szeretné letiltani vagy annak függőségeit is?", + "disableOnly": "Csak ezt", + "disableAll": "Az összeset", + "cancel": "Mégse", + "singleDependentError": "Nem sikerült letiltani a(z) '{0}' kiegészítőt: a(z) '{1}' kiegészítő függ tőle.", + "twoDependentsError": "Nem sikerült letiltani a(z) '{0}' kiegészítőt: a(z) '{1}' és '{2}' kiegészítők függnek tőle.", + "multipleDependentsError": "Nem sikerült letiltani a(z) '{0}' kiegészítőt: a(z) '{1}', '{2}' és más kiegészítők függnek tőle." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json b/i18n/hun/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json new file mode 100644 index 0000000000000..d2b7c3c88fa26 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "sendFeedback": "Visszajelzés tweetelése", + "label.sendASmile": "Küldje el nekünk egy tweetben a visszajelzését!", + "patchedVersion1": "A telepítés hibás.", + "patchedVersion2": "Az alábbiakat adja meg, ha hibát akar beküldeni.", + "sentiment": "Milyennek találja az alkalmazást?", + "smileCaption": "Elégedett", + "frownCaption": "Elégedetlen vagyok vele", + "other ways to contact us": "Más értesítési módok", + "submit a bug": "Hibajelentés küldése", + "request a missing feature": "Hiányzó funkció kérése", + "tell us why?": "Mondja el, hogy miért", + "commentsHeader": "Visszajelzés", + "tweet": "Tweer", + "character left": "karakter maradt", + "characters left": "karakter maradt", + "feedbackSending": "Küldés", + "feedbackSent": "Köszönjük!", + "feedbackSendingError": "Újrapróbálkozás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json new file mode 100644 index 0000000000000..b0c0567e17920 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "binaryFileEditor": "Bináris megjelenítő" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json new file mode 100644 index 0000000000000..d37f4ed8778ea --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textFileEditor": "Szövegfájlszerkesztő", + "createFile": "Fájl létrehozása", + "fileEditorWithInputAriaLabel": "{0}. Szövegfájlszerkesztő.", + "fileEditorAriaLabel": "Szövegfájlszerkesztő" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json new file mode 100644 index 0000000000000..a5d582952d07c --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "Fájlok", + "revealInSideBar": "Megjelenítés az oldalsávon", + "acceptLocalChanges": "Helyi változtatások használata és a lemezen lévő tartalom felülírása", + "revertLocalChanges": "Helyi változtatások eldobása és visszaállítás a lemezen lévő tartalomra" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/fileActions.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/fileActions.i18n.json new file mode 100644 index 0000000000000..a6ef3bb7930a8 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/fileActions.i18n.json @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "Újra", + "rename": "Átnevezés", + "newFile": "Új fájl", + "newFolder": "Új mappa", + "openFolderFirst": "Mappák vagy fájlok létrehozásához először nyisson meg egy mappát!", + "newUntitledFile": "Új, névtelen fájl", + "createNewFile": "Új fájl", + "createNewFolder": "Új mappa", + "deleteButtonLabelRecycleBin": "Áthelyezés a lo&&mtárba", + "deleteButtonLabelTrash": "Áthelyezés a &&kukába", + "deleteButtonLabel": "&&Törlés", + "dirtyMessageFolderOneDelete": "Törölni készül egy olyan mappát, melyben egy nem mentett változtatásokat tartalmazó fájl van. Folytatja?", + "dirtyMessageFolderDelete": "Törölni készül egy olyan mappát, melyben {0} nem mentett változtatásokat tartalmazó fájl van. Folytatja?", + "dirtyMessageFileDelete": "Törölni készül egy olyan fájlt, amely nem mentett változtatásokat tartalmaz. Folytatja?", + "dirtyWarning": "A módosítások elvesznek, ha nem menti őket.", + "confirmMoveTrashMessageFolder": "Törli a(z) '{0}' nevű mappát és a teljes tartalmát?", + "confirmMoveTrashMessageFile": "Törli a(z) '{0}' nevű fájlt?", + "undoBin": "Helyreállíthatja a lomtárból.", + "undoTrash": "Helyreállíthatja a kukából.", + "confirmDeleteMessageFolder": "Törli a(z) {0} mappát és a teljes tartalmát?", + "confirmDeleteMessageFile": "Véglegesen törli a következőt: {0}?", + "irreversible": "A művelet nem vonható vissza!", + "permDelete": "Végleges törlés", + "delete": "Törlés", + "importFiles": "Fájlok importálása", + "confirmOverwrite": "A célmappában már van ilyen nevű mappa vagy fájl. Le szeretné cserélni?", + "replaceButtonLabel": "&&Csere", + "copyFile": "Másolás", + "pasteFile": "Beillesztés", + "duplicateFile": "Duplikálás", + "openToSide": "Megnyitás oldalt", + "compareSource": "Kijelölés összehasonlításhoz", + "globalCompareFile": "Aktív fájl összehasonlítása...", + "pickHistory": "Válasszon egy korábban megnyitott fájlt az összehasonlításhoz", + "unableToFileToCompare": "A kiválasztott fájl nem hasonlítható össze a következővel: '{0}'.", + "openFileToCompare": "Fájlok összehasonlításához elősször nyisson meg egy fájlt.", + "compareWith": "Összehasonlítás a következővel: '{0}'", + "compareFiles": "Fájlok összehasonlítása", + "refresh": "Frissítés", + "save": "Mentés", + "saveAs": "Mentés másként...", + "saveAll": "Összes mentése", + "saveAllInGroup": "Összes mentése a csoportban", + "saveFiles": "Módosított fájlok mentése", + "revert": "Fájl visszaállítása", + "focusOpenEditors": "Váltás a megnyitott szerkesztőablakok nézetre", + "focusFilesExplorer": "Váltás a fájlkezelőre", + "showInExplorer": "Aktív fájl megjelenítése az oldalsávon", + "openFileToShow": "Fájl fájlkezelőben történő megjelenítéséhez először nyisson meg egy fájlt", + "collapseExplorerFolders": "Mappák összecsukása a fájlkezelőben", + "refreshExplorer": "Fájlkezelő frissítése", + "openFile": "Fájl megnyitása...", + "openFileInNewWindow": "Aktív fájl megnyitása új ablakban", + "openFileToShowInNewWindow": "Fájl új ablakban történő megnyitásához először nyisson meg egy fájlt", + "revealInWindows": "Megjelenítés a fájlkezelőben", + "revealInMac": "Megjelenítés a Finderben", + "openContainer": "Tartalmazó mappa megnyitása", + "revealActiveFileInWindows": "Aktív fájl megjelenítése a Windows Intézőben", + "revealActiveFileInMac": "Aktív fájl megjelenítése a Finderben", + "openActiveFileContainer": "Aktív fájlt tartalmazó mappa megnyitása", + "copyPath": "Elérési út másolása", + "copyPathOfActive": "Aktív fájl elérési útjának másolása", + "emptyFileNameError": "Meg kell adni egy fájl vagy mappa nevét.", + "fileNameExistsError": "Már létezik **{0}** nevű fájl vagy mappa ezen a helyszínen. Adjon meg egy másik nevet!", + "invalidFileNameError": "A(z) **{0}** név nem érvényes fájl- vagy mappanév. Adjon meg egy másik nevet!", + "filePathTooLongError": "A(z) **{0}** név egy olyan elérési utat eredményez, ami túl hosszú. Adjon meg egy másik nevet!" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/fileCommands.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/fileCommands.i18n.json new file mode 100644 index 0000000000000..dd9057b1fa4b3 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "Fájlok elérési útjának másolásához elősször nyisson meg egy fájlt", + "openFileToReveal": "Fájlok felfedéséhez elősször nyisson meg egy fájlt" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/files.contribution.i18n.json new file mode 100644 index 0000000000000..7a29310b0e06d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "Fájlkezelő megjelenítése", + "explore": "Fájlkezelő", + "view": "Nézet", + "textFileEditor": "Szövegfájlszerkesztő", + "binaryFileEditor": "Bináris fájlszerkesztő", + "filesConfigurationTitle": "Fájlok", + "exclude": "Globális minták konfigurálása fájlok és mappák kiszűréséhez.", + "files.exclude.boolean": "A globális minta, amire illesztve lesznek a fájlok elérési útjai. A minta engedélyezéséhez vagy letiltásához állítsa igaz vagy hamis értékre.", + "files.exclude.when": "További ellenőrzés elvégzése egy egyező fájl testvérein. Az egyező fájlnévhez használja a $(basename) változót.", + "associations": "Rendeljen nyelveket a fájlokhoz (pl: \"*.kiterjesztés\": \"html\"). Ezek a hozzárendelések elsőbbséget élveznek a telepített nyelvek által definiált alapértelmezett beállításokkal szemben.", + "encoding": "A fájlok olvasásakor és írásakor használt alapértelmezett karakterkódolás.", + "autoGuessEncoding": "Ha engedélyezve van, az alkalmazás automatikusan megpróbálja kitalálni a fájlok kódolását megnyitáskor", + "eol": "Az alapértelmezett sorvégjel. LF-hez használjon \\n-t, CRLF-hez pedig \\r\\n-t.", + "trimTrailingWhitespace": "Ha engedélyezve van, a fájl mentésekor levágja a sor végén található szóközöket.", + "insertFinalNewline": "Ha engedélyezve van, mentéskor beszúr egy záró újsort a fájl végére.", + "files.autoSave.off": "A módosított fájlok soha nincsenek automatikusan mentve.", + "files.autoSave.afterDelay": "A módosított fájlok automatikusan mentésre kerülnek a 'files.autoSaveDelay' beállításban meghatározott időközönként.", + "files.autoSave.onFocusChange": "A módosított fájlok automatikusan mentésre kerülnek, ha a szerkesztőablak elveszíti a fókuszt.", + "files.autoSave.onWindowChange": "A módosított fájlok automatikusan mentésre kerülnek, ha az ablak elveszíti a fókuszt.", + "autoSave": "Meghatározza a módosított fájlok automatikus mentési stratégiáját. Elfogadott értékek: '{0}', '{1}', '{2}' (a szerkesztőablak elveszíti a fókuszt), '{3}' (az ablak elveszíti a fókuszt). Ha az értéke '{4}', megadható a késleltetés a 'files.autoSaveDelay' beállításban.", + "autoSaveDelay": "Meghatározza ezredmásodpercben a késleltetést, ami után a módosított fájlok automatikusan mentésre kerülnek. Csak akkor van hatása, ha a 'files.autoSave' beállítás értéke '{0}'.", + "watcherExclude": "Globális minta, ami meghatározza azoknak a fájloknak a listáját, amelyek ki vannak szűrve a figyelésből. A beállítás módosítása újraindítást igényel. Ha úgy észleli, hogy a Code túl sok processzort használ indításnál, ki tudja szűrni a nagy mappákat a kezdeti terhelés csökkentés érdekében.", + "hotExit.off": "Gyors kilépés letiltása.", + "hotExit.onExit": "Gyors kilépésről akkor van szó, ha az utolsó ablakot bezárják Windowson és Linuxon, vagy ha a workbench.action.quit parancs van futtatva (a parancskatalógusból, billentyűkombinációval vagy a menüből). Az összes biztonsági mentéssel rendelkező ablak helyre lesz állítva a következő indítás során.", + "hotExit.onExitAndWindowClose": "Gyors kilépésről akkor van szó, ha az utolsó ablakot bezárják Windowson és Linuxon, ha a workbench.action.quit parancs van futtatva (a parancskatalógusból, billentyűkombinációval vagy a menüből), vagy bármely ablak, amelyben mappa van megnyitva, függetlenül attól, hogy az az utolsó ablak-e. Az összes megnyitott, mappa nélküli ablak helyre lesz állítva a következő indítás során. A megnyitott mappát tartalmazó ablakok helyreállításához állítsa a \"window.restoreWindows\" értékét \"all\"-ra.", + "hotExit": "Meghatározza, hogy a nem mentett fájlokra emlékezzen-e az alkalmazás a munkamenetek között, így ki lehet hagyni a mentéssel kapcsolatos felugró ablakokat kilépésnél.", + "defaultLanguage": "Az új fájlokhoz alapértelmezetten hozzárendelt nyelv.", + "editorConfigurationTitle": "Szerkesztőablak", + "formatOnSave": "Fájlok formázása mentéskor. Az adott nyelvhez rendelkezésre kell állni formázónak, nem lehet beállítva automatikus mentés, és a szerkesztő nem állhat éppen lefelé.", + "explorerConfigurationTitle": "Fájlkezelő", + "openEditorsVisible": "A megnyitott szerkesztőablakok panelen megjelenített szerkesztőablakok száma. Állítsa 0-ra, ha el szeretné rejteni a panelt.", + "dynamicHeight": "Meghatározza, hogy a megnyitott szerkesztőablakok szakasz magassága automatikusan illeszkedjen a megnyitott elemek számához vagy sem.", + "autoReveal": "Meghatározza, hogy a fájlkezelőben automatikusan fel legyenek fedve és ki legyenek jelölve a fájlok, amikor megnyitják őket.", + "enableDragAndDrop": "Meghatározza, hogy a fájlkezelőben áthelyezhetők-e a fájlok és mappák húzással." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json new file mode 100644 index 0000000000000..bd3c645714af5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "discard": "Elvetés", + "overwrite": "Felülírás", + "retry": "Újrapróbálkozás", + "readonlySaveError": "Nem sikerült menteni a(z) '{0}' fájlt: a fájl írásvédett. Válassza a 'Felülírás' lehetőséget a védelem eltávolításához.", + "genericSaveError": "Hiba a(z) '{0}' mentése közben: {1}", + "staleSaveError": "Nem sikerült menteni a(z) '{0}' fájlt: a lemezen lévő tartalom újabb. Kattintson az **Összehasonlítás*** gombra a helyi és a lemezen lévő változat összehasonlításához.", + "compareChanges": "Összehasonlítás", + "saveConflictDiffLabel": "{0} (a lemezen) ↔ {1} ({2}) – Mentési konfliktus feloldása", + "userGuide": "Használja a szerkesztői eszköztáron található műveleteket a helyi változtatások **visszavonására** vagy **írja felül** a lemezen lévő tartalmat a változtatásokkal" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json new file mode 100644 index 0000000000000..e1d7ba53a99b3 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Fájlkezelő szakasz", + "openFolder": "Mappa megnyitása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json new file mode 100644 index 0000000000000..d5015512419dc --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Fájlkezelő szakasz", + "treeAriaLabel": "Fájlkezelő" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json new file mode 100644 index 0000000000000..d2f6b36195dbd --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "Adja meg a fájl nevét. Nyomjon 'Enter'-t a megerősítéshez vagy 'Escape'-et a megszakításhoz.", + "filesExplorerViewerAriaLabel": "{0}, Fájlkezelő", + "confirmOverwriteMessage": "A célmappában már létezik '{0}' nevű elem. Le szeretné cserélni?", + "irreversible": "A művelet nem vonható vissza!", + "replaceButtonLabel": "&&Csere" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json new file mode 100644 index 0000000000000..4a7e281205717 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditors": "Megnyitott szerkesztőablakok", + "openEditosrSection": "Megnyitott szerkesztőablakok szakasz", + "treeAriaLabel": "Megnyitott szerkesztőablakok: az aktív fájlok listája", + "dirtyCounter": "{0} nincs mentve" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json b/i18n/hun/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json new file mode 100644 index 0000000000000..4ee03d3f18f04 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}, Szerkesztőcsoport", + "openEditorAriaLabel": "{0}, megnyitott szerkesztőablak", + "saveAll": "Összes mentése", + "closeAllUnmodified": "Nem módosultak bezárása", + "closeAll": "Összes bezárása", + "close": "Bezárás", + "closeOthers": "Többi bezárása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json b/i18n/hun/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json new file mode 100644 index 0000000000000..24ed237c8feac --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "dirtyFiles": "{0} nem mentett fájl" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json b/i18n/hun/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json new file mode 100644 index 0000000000000..30e3c5f45be9a --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "orphanedFile": "{0} (törölve a lemezről)" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/html/browser/html.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/html/browser/html.contribution.i18n.json new file mode 100644 index 0000000000000..cd4faab781787 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/html/browser/html.contribution.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.editor.label": "HTML-előnézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json b/i18n/hun/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json new file mode 100644 index 0000000000000..e0ec7953f3b60 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.voidInput": "Érvénytelen bemenet a szerkesztőablakból." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/html/browser/webview.i18n.json b/i18n/hun/src/vs/workbench/parts/html/browser/webview.i18n.json new file mode 100644 index 0000000000000..2f238385c100a --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/html/browser/webview.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "devtools.webview": "Fejlesztői: Webview-eszközök" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/hun/src/vs/workbench/parts/markers/common/messages.i18n.json new file mode 100644 index 0000000000000..f17c3b300c490 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewCategory": "Nézet", + "problems.view.show.label": "Problémák megjelenítése", + "problems.panel.configuration.title": "Problémák-nézet", + "problems.panel.configuration.autoreveal": "Meghatározza, hogy a problémák nézet automatikusan felfedje-e a fájlokat, amikor megnyitja őket.", + "markers.panel.title.problems": "Problémák", + "markers.panel.aria.label.problems.tree": "Problémák fájlonként csoportosítva", + "markers.panel.no.problems.build": "A munkaterületen eddig egyetlen hiba sem lett érzékelve.", + "markers.panel.no.problems.filters": "A megadott szűrőfeltételnek egyetlen elem sem felel meg.", + "markers.panel.action.filter": "Problémák szűrése", + "markers.panel.filter.placeholder": "Szűrés típus vagy szöveg alapján", + "markers.panel.filter.errors": "hibák", + "markers.panel.filter.warnings": "figyelmeztetések", + "markers.panel.filter.infos": "információk", + "markers.panel.single.error.label": "1 hiba", + "markers.panel.multiple.errors.label": "{0} hiba", + "markers.panel.single.warning.label": "1 figyelmeztetés", + "markers.panel.multiple.warnings.label": "{0} figyelmeztetés", + "markers.panel.single.info.label": "1 információ", + "markers.panel.multiple.infos.label": "{0} információ", + "markers.panel.single.unknown.label": "1 ismeretlen", + "markers.panel.multiple.unknowns.label": "{0} ismeretlen", + "markers.panel.at.ln.col.number": "({0}, {1})", + "problems.tree.aria.label.resource": "{0} {1} problémával", + "problems.tree.aria.label.error.marker": "{0} által generált hiba: {1}, sor: {2}, oszlop: {3}", + "problems.tree.aria.label.error.marker.nosource": "Hiba: {0}, sor: {1}, oszlop: {2}", + "problems.tree.aria.label.warning.marker": "{0} által generált figyelmeztetés: {1}, sor: {2}, oszlop: {3}", + "problems.tree.aria.label.warning.marker.nosource": "Figyelmeztetés: {0}, sor: {1}, oszlop: {2}", + "problems.tree.aria.label.info.marker": "{0} által generált információ: {1}, sor: {2}, oszlop: {3}", + "problems.tree.aria.label.info.marker.nosource": "Információ: {0}, sor: {1}, oszlop: {2}", + "problems.tree.aria.label.marker": "{0} által generált probléma: {1}, sor: {2}, oszlop: {3}", + "problems.tree.aria.label.marker.nosource": "Probléma: {0}, sor: {1}, oszlop: {2}", + "errors.warnings.show.label": "Hibák és figyelmezetések megjelenítése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json b/i18n/hun/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json new file mode 100644 index 0000000000000..ef6d4a9d7dbf3 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copyMarker": "Másolás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..bd0a0d1969614 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Lenne kedve egy gyors elégedettségi felméréshez?", + "takeSurvey": "Felmérés kitöltése", + "remindLater": "Emlékeztessen később", + "neverAgain": "Ne jelenjen meg újra" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/output/browser/output.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/output/browser/output.contribution.i18n.json new file mode 100644 index 0000000000000..06381af2f6892 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/output/browser/output.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "output": "Kimenet", + "viewCategory": "Nézet", + "clearOutput.label": "Kimenet törlése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/output/browser/outputActions.i18n.json b/i18n/hun/src/vs/workbench/parts/output/browser/outputActions.i18n.json new file mode 100644 index 0000000000000..fb409d189e401 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/output/browser/outputActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleOutput": "Kimenet be- és kikapcsolása", + "clearOutput": "Kimenet törlése", + "toggleOutputScrollLock": "Kimenet görgetési zárának be- és kikapcsolása", + "switchToOutput.label": "Váltás a kimenetre" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/output/browser/outputPanel.i18n.json b/i18n/hun/src/vs/workbench/parts/output/browser/outputPanel.i18n.json new file mode 100644 index 0000000000000..b910266898226 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/output/browser/outputPanel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "outputPanelWithInputAriaLabel": "{0}, kimenetpanel", + "outputPanelAriaLabel": "Kimenetpanel" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/output/common/output.i18n.json b/i18n/hun/src/vs/workbench/parts/output/common/output.i18n.json new file mode 100644 index 0000000000000..6d78e77e5ec68 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/output/common/output.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "output": "Kimenet", + "channel": "a következőhöz: '{0}'" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json new file mode 100644 index 0000000000000..497bbff0b892d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "slow": "Lassú indulás érzékelve", + "slow.detail": "Sajnáljuk, hogy lassú volt az alkalmazás indulása. Indítsa újra a(z) '{0}' alkalmazást bekapcsolt profilozással, ossza meg a profilt velünk, és keményen fogunk dolgozni azon, hogy az indulás ismét gyors legyen.", + "prof.message": "Profil sikeresen elkészítve.", + "prof.detail": "Készítsen egy hibajelentést, és manuálisan csatolja a következő fájlokat:\n{0}", + "prof.restartAndFileIssue": "Hibajelentés létrehozása és újraindítás", + "prof.restart": "Újraindítás", + "prof.thanks": "Köszönjük a segítséget!", + "prof.detail.restart": "Egy utolsó újraindítás szükséges a(z) '{0}' használatához. Ismételten köszönjük a közreműködését!" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json new file mode 100644 index 0000000000000..f660711dc6b6d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defineKeybinding.initial": "Üsse le a kívánt billentyűkombinációt, majd nyomjon ENTER-t. ESCAPE a megszakításhoz.", + "defineKeybinding.chordsTo": "kombináció a következőhöz:" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json new file mode 100644 index 0000000000000..1e432a804192a --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "keybindingsInputName": "Billentyűparancsok", + "SearchKeybindings.AriaLabel": "Billentyűparancsok keresése", + "SearchKeybindings.Placeholder": "Billentyűparancsok keresése", + "sortByPrecedene": "Rendezés precedencia szerint", + "header-message": "Haladó beállításokhoz nyissa meg és szerkessze a következőt:", + "keybindings-file-name": "keybindings.json", + "keybindingsLabel": "Billentyűparancsok", + "changeLabel": "Billentyűparancs módosítása", + "addLabel": "Billentyűparancs hozzáadása", + "removeLabel": "Billentyűparancs eltávolítása", + "resetLabel": "Billentyűparancs visszaállítása", + "showConflictsLabel": "Konfliktusok megjelenítése", + "copyLabel": "Másolás", + "error": "'{0}' hiba a billentyűparancsok szerkesztése közben. Nyissa meg a 'keybindings.json' fájlt, és ellenőrizze!", + "command": "Parancs", + "keybinding": "Billentyűparancs", + "source": "Forrás", + "when": "Mikor?", + "editKeybindingLabelWithKey": "{0} billentyűparancs módosítása", + "editKeybindingLabel": "Billentyűparancs módosítása", + "addKeybindingLabelWithKey": "{0} billentyűparancs hozzáadása", + "addKeybindingLabel": "Billentyűparancs hozzáadása", + "commandAriaLabel": "Parancs: {0}.", + "keybindingAriaLabel": "Billentyűparancs: {0}.", + "noKeybinding": "Nincs billentyűparancs hozzárendelve.", + "sourceAriaLabel": "Forrás: {0}.", + "whenAriaLabel": "Mikor: {0}.", + "noWhen": "Nincs 'mikor'-kontextus." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json new file mode 100644 index 0000000000000..bce5ff41424bd --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defineKeybinding.start": "Billentyűparancs megadása", + "defineKeybinding.kbLayoutErrorMessage": "A jelenlegi billentyűkiosztással nem használható ez a billentyűkombináció.", + "defineKeybinding.kbLayoutLocalAndUSMessage": "**{0}** a jelenlegi billentyűkiosztással (**{1}** az alapértelmezett amerikaival.", + "defineKeybinding.kbLayoutLocalMessage": "**{0}** a jelenlegi billentyűkiosztással." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json new file mode 100644 index 0000000000000..b2ceafc3869aa --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "Alapértelmezett beállításszerkesztő", + "keybindingsEditor": "Billentyűparancs-szerkesztő", + "preferences": "Beállítások" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json new file mode 100644 index 0000000000000..6b0c1dfa1dace --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openGlobalSettings": "Felhasználói beállítások megnyitása", + "openGlobalKeybindings": "Billentyűparancsok megnyitása", + "openGlobalKeybindingsFile": "Billentyűparancsfájl megnyitása", + "openWorkspaceSettings": "Munkaterület beállításainak megnyitása", + "configureLanguageBasedSettings": "Nyelvspecifikus beállítások konfigurálása...", + "languageDescriptionConfigured": "(({0})", + "pickLanguage": "Nyelv kiválasztása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json new file mode 100644 index 0000000000000..f06c901c35494 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "settingsEditorName": "Alapértelmezett beállítások", + "SearchSettingsWidget.AriaLabel": "Beállítások keresése", + "SearchSettingsWidget.Placeholder": "Beállítások keresése", + "totalSettingsMessage": "Összesen {0} beállítás", + "noSettingsFound": "Nincs eredmény", + "oneSettingFound": "1 illeszkedő beállítás", + "settingsFound": "{0} illeszkedő beállítás", + "preferencesAriaLabel": "Az alapértelmezett beállítások. Írásvédett szerkesztőablak." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json new file mode 100644 index 0000000000000..961013af48103 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "errorInvalidConfiguration": "Nem sikerült írni a beállításokba. Javítsa a fájlban található hibákat/figyelmeztetéseket, majd próbálja újra!", + "editTtile": "Szerkesztés", + "replaceDefaultValue": "Csere a beállításokban", + "copyDefaultValue": "Másolás a beállításokba", + "unsupportedPHPExecutablePathSetting": "Ez a beállítás csak a felhasználói beállításokban szerepelhet. A PHP munkaterülethez történő konfigurálásához nyisson meg egy PHP-fájlt, majd kattintson a PHP-elérési útra az állapotsoron!", + "unsupportedWorkspaceSetting": "Ez a beállítás csak a felhasználói beállításokban szerepelhet." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json new file mode 100644 index 0000000000000..a7800d606fb5d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFolderFirst": "Munkaterületspecifikus beállítások létrehozásához nyisson meg egy mappát", + "emptyKeybindingsHeader": "Az ebben a fájlban elhelyezett billentyűparancsok felülírják az alapértelmezett beállításokat", + "defaultKeybindings": "Alapértelmezett billentyűparancsok", + "emptySettingsHeader": "Az ebben a fájlban elhelyezett beállítások felülírják az alapértelmezett beállításokat", + "emptySettingsHeader1": "Az ebben a fájlban elhelyezett beállítások felülírják az alapértelmezett és felhasználói beállításokat", + "fail.createSettings": "Nem sikerült a(z) '{0}' létrehozás ({1})." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json new file mode 100644 index 0000000000000..b2d1254fb58af --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "settingsSwitcherBarAriaLabel": "Beállításkapcsoló", + "userSettings": "Felhasználói beállítások", + "workspaceSettings": "Munkaterület-beállítások" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json new file mode 100644 index 0000000000000..8fb1c62719267 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "default": "Alapértelmezett", + "user": "Felhasználói", + "meta": "meta", + "option": "beállítás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json b/i18n/hun/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json new file mode 100644 index 0000000000000..35cc39622d0b2 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commonlyUsed": "Gyakran használt", + "defaultKeybindingsHeader": "A billentyűparancsok fájlban elhelyezett billentyűparancsok felülírják az alapértelmezett beállításokat" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json new file mode 100644 index 0000000000000..41ec82c33f721 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Minden parancs megjelenítése", + "clearCommandHistory": "Parancselőzmények törlése", + "showCommands.label": "Parancskatalógus...", + "entryAriaLabelWithKey": "{0}, {1}, parancsok", + "entryAriaLabel": "{0}, parancs", + "canNotRun": "Innen nem futtatható a(z) {0} parancs.", + "actionNotEnabled": "Ebben a kontextusban nem engedélyezett a(z) {0} parancs futtatása.", + "recentlyUsed": "legutóbb használt", + "morecCommands": "további parancsok", + "commandLabel": "{0}: {1}", + "cat.title": "{0}: {1}", + "noCommandsMatching": "Parancs nem található" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json new file mode 100644 index 0000000000000..fca514543eac2 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoLine": "Sor megkeresése...", + "gotoLineLabelEmptyWithLimit": "A keresett sor 1 és {0} közötti sorszáma", + "gotoLineLabelEmpty": "A keresett sor száma", + "gotoLineColumnLabel": "Ugrás a(z) {0}. sor {1}. oszlopára", + "gotoLineLabel": "Sor megkeresése {0}", + "gotoLineHandlerAriaLabel": "Adja meg a keresett sor számát!", + "cannotRunGotoLine": "Sor megkereséséhez nyisson meg egy fájlt" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json new file mode 100644 index 0000000000000..25da1f31b6b8b --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoSymbol": "Ugrás szimbólumhoz egy fájlban...", + "symbols": "szimbólumok ({0})", + "method": "metódusok ({0})", + "function": "függvények ({0})", + "_constructor": "konstruktorok ({0})", + "variable": "változók ({0})", + "class": "osztályok ({0})", + "interface": "interfészek ({0})", + "namespace": "névterek ({0})", + "package": "csomagok ({0})", + "modules": "modulok ({0})", + "property": "tulajdonságok ({0})", + "enum": "enumerátorok ({0n)", + "string": "karakterláncok ({0})", + "rule": "szabályok ({0})", + "file": "fájlok ({0})", + "array": "tömbök ({0})", + "number": "számok ({0})", + "boolean": "logikai értékek ({0})", + "object": "objektumok ({0})", + "key": "kulcsok ({0})", + "entryAriaLabel": "{0}, szimbólumok", + "noSymbolsMatching": "Nincs illeszkedő szimbólum", + "noSymbolsFound": "Szimbólum nem található", + "gotoSymbolHandlerAriaLabel": "Írjon az aktív szerkesztőablakban található szimbólumok szűréséhez.", + "cannotRunGotoSymbolInFile": "Ehhez a fájlhoz nincs szimbóluminformáció", + "cannotRunGotoSymbol": "Szimbólum megkereséséhez nyisson meg egy szövegfájlt" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json new file mode 100644 index 0000000000000..3b68e86853265 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, választó súgó", + "globalCommands": "globális parancsok", + "editorCommands": "szerkesztőablak parancsai" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json new file mode 100644 index 0000000000000..7e61210cdf735 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commandsHandlerDescriptionDefault": "Parancsok megjelenítése és futtatása", + "gotoLineDescriptionMac": "Sor megkeresése", + "gotoLineDescriptionWin": "Sor megkeresése", + "gotoSymbolDescription": "Ugrás szimbólumhoz egy fájlban...", + "gotoSymbolDescriptionScoped": "Szimbólum megkeresése kategória alapján", + "helpDescription": "Súgó megjelenítése", + "viewPickerDescription": "Nézet megnyitása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json new file mode 100644 index 0000000000000..955a8d6a1ecec --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, nézetválasztó", + "views": "Nézetek", + "panels": "Panelek", + "terminals": "Terminál", + "terminalTitle": "{0}: {1}", + "channels": "Kimenet", + "openView": "Nézet megnyitása", + "quickOpenView": "Gyors megnyitás nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..757fd45ffecbd --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchMessage": "Egy olyan beállítás változott, melynek hatályba lépéséhez újraindítás szükséges.", + "relaunchDetail": "A beállítás engedélyezéséhez nyomja meg az újraindítás gombot a {0} újraindításához.", + "restart": "Újraindítás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..088f4ecdf1739 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGutterModifiedBackground": "A szerkesztőablak margójának háttérszíne a módosított soroknál.", + "editorGutterAddedBackground": "A szerkesztőablak margójának háttérszíne a hozzáadott soroknál.", + "editorGutterDeletedBackground": "A szerkesztőablak margójának háttérszíne a törölt soroknál." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json new file mode 100644 index 0000000000000..fd2863510afd5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleGitViewlet": "Git megjelenítése", + "installAdditionalSCMProviders": "További verziókezelő rendszerek telepítése...", + "source control": "Verziókezelő rendszer", + "toggleSCMViewlet": "Verziókezelő megjelenítése", + "view": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json new file mode 100644 index 0000000000000..89a9d4e2341c4 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "scmPendingChangesBadge": "{0} függőben lévő módosítás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json new file mode 100644 index 0000000000000..a7af703f9fc29 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installAdditionalSCMProviders": "További verziókezelő rendszerek telepítése...", + "switch provider": "Váltás más verziókezelő rendszerre..." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json new file mode 100644 index 0000000000000..529d2491ca21f --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commitMessage": "Üzenet (nyomja meg a következőt a commithoz: {0})", + "source control": "Verziókezelő rendszer", + "viewletTitle": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json new file mode 100644 index 0000000000000..20f5e1c646aa9 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileAndTypeResults": "fájl- és szimbólumkeresés eredménye", + "fileResults": "fájlkeresés eredménye" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json new file mode 100644 index 0000000000000..39b05feed4f2d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, fájlválasztó", + "searchResults": "keresési eredmények" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json new file mode 100644 index 0000000000000..a8dd776594b11 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, szimbólumválasztó", + "symbols": "szimbólumkeresési eredmények", + "noSymbolsMatching": "Nincs illeszkedő szimbólum", + "noSymbolsWithoutInput": "Adja meg a keresett szimbólumot" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json new file mode 100644 index 0000000000000..0f499bf29572c --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultLabel": "bemeneti adat", + "patternDescription": "Globális minták használata", + "patternHelpInclude": "Az illesztéshez használt minta. Pl. **\\*\\*/*.js** használható az összes JavaScript-fájl, vagy a **myFolder/\\*\\*** egy adott mappa és a benne található összes fájl illesztéséhez.\n\n**Referencia**:\n**\\*** 0 vagy több karakterre illeszkedik\n**?** 1 karakterre illeszkedik\n**\\*\\*** 0 vagy több könyvtárra illeszkedik\n**[a-z]** karakterek tartományára illeszkedik\n**{a,b}** a megadott minták bármelyikére illeszkedik", + "useIgnoreFilesDescription": "Ignore-fájlok használata", + "useExcludeSettingsDescription": "Kizárási beállítások használata" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/replaceService.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/replaceService.i18n.json new file mode 100644 index 0000000000000..7825dc551c078 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/replaceService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileReplaceChanges": "{0} ↔ {1} (csere előnézete)" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/search.contribution.i18n.json new file mode 100644 index 0000000000000..47387e215d88a --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Szimbólum megkeresése a munkaterületen...", + "name": "Keresés", + "showSearchViewlet": "Keresés megjelenítése", + "view": "Nézet", + "findInFiles": "Keresés a fájlokban", + "openAnythingHandlerDescription": "Fájl megkeresése", + "openSymbolDescriptionNormal": "Szimbólum megkeresése a munkaterületen", + "searchOutputChannelTitle": "Keresés", + "searchConfigurationTitle": "Keresés", + "exclude": "Globális minták konfigurálása fájlok és mappák keresésből való kizárásához. Örökli az összes globális mintát a fliex.exclude beállításból.", + "exclude.boolean": "A globális minta, amire illesztve lesznek a fájlok elérési útjai. A minta engedélyezéséhez vagy letiltásához állítsa igaz vagy hamis értékre.", + "exclude.when": "További ellenőrzés elvégzése az illeszkedő fájlok testvérein. Az illeszkedő fájl nevéhez használja a $(basename) változót!", + "useRipgrep": "Meghatározza, hogy a szövegben való kereséshez a ripgrep van-e használva.", + "useIgnoreFilesByDefault": "Meghatározza, hogy a .gitignore és .ignore fájlok használva vannak-e az új munkaterületeken a kereséshez.", + "search.quickOpen.includeSymbols": "Meghatározza, hogy a fájlok gyors megnyitásánál megjelenjenek-e a globális szimbólumkereső találatai." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/searchActions.i18n.json new file mode 100644 index 0000000000000..11ab7f2e40ec0 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "nextSearchTerm": "Következő keresőkifejezés megjelenítése", + "previousSearchTerm": "Előző keresőkifejezés megjelenítése", + "focusNextInputBox": "Váltás a következő beviteli mezőre", + "focusPreviousInputBox": "Váltás az előző beviteli mezőre", + "replaceInFiles": "Csere a fájlokban", + "findInFolder": "Keresés mappában", + "RefreshAction.label": "Frissítés", + "ClearSearchResultsAction.label": "Keresési eredmények törlése", + "FocusNextSearchResult.label": "Váltás a következő keresési eredményre", + "FocusPreviousSearchResult.label": "Váltás az előző keresési eredményre", + "RemoveAction.label": "Eltávolítás", + "file.replaceAll.label": "Összes cseréje", + "match.replace.label": "Csere", + "ConfigureGlobalExclusionsAction.label": "Beállítások megnyitása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json new file mode 100644 index 0000000000000..d0aadbe17bcf4 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "searchMatches": "{0} találat", + "searchMatch": "{0} találat", + "fileMatchAriaLabel": "{0} találat a(z) {2} mappa {1} fájljában. Keresési eredmény", + "replacePreviewResultAria": "{0} kifejezés cseréje a következőre: {1}, a(z) {2}. oszlopban, a következő szöveget tartalmazó sorban: {3}", + "searchResultAria": "Találat a(z) {0} kifejezésre a(z) {1}. oszlopban, a következő szöveget tartalmazó sorban: {2}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json new file mode 100644 index 0000000000000..d97ee9906db8e --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json @@ -0,0 +1,50 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "moreSearch": "Keresési részletek be- és kikapcsolása", + "searchScope.includes": "bele foglalt fájlok", + "label.includes": "Keresésbe bele foglalt fájlok", + "searchScope.excludes": "kizárt fájlok", + "label.excludes": "Keresésből kizárt fájlok", + "global.searchScope.folders": "keresésből a beállítások miatt kizárt fájlok", + "label.global.excludes": "Beállított keresésből kizáró minták", + "replaceAll.confirmation.title": "Minden előfordulás cseréje", + "replaceAll.confirm.button": "Csere", + "replaceAll.occurrence.file.message": "{0} előfordulás cserélve {1} fájlban a következőre: '{2}'.", + "removeAll.occurrence.file.message": "{0} előfordulás cserélve {1} fájlban.", + "replaceAll.occurrence.files.message": "{0} előfordulás cserélve {1} fájlban a következőre: '{2}'.", + "removeAll.occurrence.files.message": "{0} előfordulás cserélve {1} fájlban.", + "replaceAll.occurrences.file.message": "{0} előfordulás cserélve {1} fájlban a következőre: '{2}'.", + "removeAll.occurrences.file.message": "{0} előfordulás cserélve {1} fájlban.", + "replaceAll.occurrences.files.message": "{0} előfordulás cserélve {1} fájlban a következőre: '{2}'.", + "removeAll.occurrences.files.message": "{0} előfordulás cserélve {1} fájlban.", + "removeAll.occurrence.file.confirmation.message": "Cserél {0} előfordulás {1} fájlban a következőre: '{2}'?", + "replaceAll.occurrence.file.confirmation.message": "Cserél {0} előfordulást {1} fájlban?", + "removeAll.occurrence.files.confirmation.message": "Cserél {0} előfordulás {1} fájlban a következőre: '{2}'?", + "replaceAll.occurrence.files.confirmation.message": "Cserél {0} előfordulást {1} fájlban?", + "removeAll.occurrences.file.confirmation.message": "Cserél {0} előfordulás {1} fájlban a következőre: '{2}'?", + "replaceAll.occurrences.file.confirmation.message": "Cserél {0} előfordulást {1} fájlban?", + "removeAll.occurrences.files.confirmation.message": "Cserél {0} előfordulás {1} fájlban a következőre: '{2}'?", + "replaceAll.occurrences.files.confirmation.message": "Cserél {0} előfordulást {1} fájlban?", + "treeAriaLabel": "Keresési eredmények", + "globLabel": "{0}, ha {1}", + "searchMaxResultsWarning": "Az eredményhalmaz csak a találatok egy részét tartalmazza. Pontosítsa a keresést a keresési eredmények halmazának szűkítéséhez!", + "searchCanceled": "A keresés meg lett szakítva, mielőtt eredményt hozott volna –", + "noResultsIncludesExcludes": "Nincs találat a következő helyen: '{0}', '{1}' kivételével –", + "noResultsIncludes": "Nincs találat a következő helyen: '{0}' –", + "noResultsExcludes": "Nincs találat '{1}' kivételével –", + "noResultsFound": "Nincs találat. Ellenőrizze a kizárási beállításokat –", + "rerunSearch.message": "Keresés megismétlése", + "rerunSearchInAll.message": "Keresés megismétlése az összes fájlban", + "openSettings.message": "Beállítások megnyitása", + "ariaSearchResultsStatus": "A keresés {0} találatot eredményezett {1} fájlban", + "search.file.result": "{0} találat {1} fájlban", + "search.files.result": "{0} találat {1} fájlban", + "search.file.results": "{0} találat {1} fájlban", + "search.files.results": "{0} találat {1} fájlban", + "searchWithoutFolder": "Még nincs mappa megnyitva. Jelenleg csak a nyitott fájlokban történik keresés –", + "openFolder": "Mappa megnyitása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/search/browser/searchWidget.i18n.json b/i18n/hun/src/vs/workbench/parts/search/browser/searchWidget.i18n.json new file mode 100644 index 0000000000000..1bc0f722bcd2f --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/search/browser/searchWidget.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "search.action.replaceAll.disabled.label": "Összes cseréje (küldje el a keresést az engedélyezéshez)", + "search.action.replaceAll.enabled.label": "Összes cseréje", + "search.replace.toggle.button.title": "Cseremd be- és kikapcsolása", + "label.Search": "Keresés: adja meg a keresőkifejezést, majd nyomjon Entert a kereséshez vagy Escape-et a megszakításhoz", + "search.placeHolder": "Keresés", + "label.Replace": "Csere: adja meg a cerekifejezést, majd nyomjon Entert a kereséshez vagy Escape-et a megszakításhoz", + "search.replace.placeHolder": "Csere", + "regexp.validationFailure": "A kifejezés mindenre illeszkedik" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json new file mode 100644 index 0000000000000..161e797da75ac --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.snippets": "Kódrészleteket szolgáltat.", + "vscode.extension.contributes.snippets-language": "Azon nyelv azonosítója, amely számára szolgáltatva van ez a kódrészlet.", + "vscode.extension.contributes.snippets-path": "A kódrészlet-fájl elérési útja. Az elérési út relatív a kiegészítő mappájához, és általában a következővel kezdődik: './snippets/',", + "invalid.language": "Ismeretlen nyelv található a következőben: `contributes.{0}.language`. A megadott érték: {1}", + "invalid.path.0": "Hiányzó karakterlánc a `contributes.{0}.path`-ban. A megadott érték: {1}", + "invalid.path.1": "A `contributes.{0}.path` ({1}) nem a kiegészítő mappáján belül található ({2}). Emiatt előfordulhat, hogy a kiegészítő nem lesz hordozható.", + "badVariableUse": "A(z) \"{0}\" kódrészlet nagy valószínűséggel keveri a kódrészletváltozók és a kódrészlet-helyjelölők fogalmát. További információ a következő oldalon található: https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json new file mode 100644 index 0000000000000..8a772b4496230 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "snippet.suggestions.label": "Kódrészlet beszúrása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json new file mode 100644 index 0000000000000..b0d1519ec9082 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openSnippet.label": "Felhasználói kódrészletek megnyitása", + "openSnippet.pickLanguage": "Kódrészlet nyelvének kiválasztása", + "openSnippet.errorOnCreate": "A(z) {0} nem hozható létre", + "preferences": "Beállítások", + "snippetSchema.json.default": "Üres kódrészlet", + "snippetSchema.json": "Felhasználói kódrészlet-konfiguráció", + "snippetSchema.json.prefix": "A kódrészlet IntelliSense-ben történő kiválasztásánál használt előtag", + "snippetSchema.json.body": "A kódrészlet tartalma. Kurzorpozíciók definiálásához használja a '$1' és '${1:defaultText}' jelölőket, a '$0' pedig a végső kurzorpozíció. Változónevek a '${varName}' és '${varName:defaultText}' formában definiálhatók, pl.: 'Ez a fájl: $TM_FILENAME'.", + "snippetSchema.json.description": "A kódrészlet leírása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json new file mode 100644 index 0000000000000..eff0054bfb526 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "detail.userSnippet": "Felhasználói kódrészlet", + "snippetSuggest.longLabel": "{0}, {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json new file mode 100644 index 0000000000000..0e84caff00bc5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tabCompletion": "Kódrészletek beszúrása, ha az előtagjuk illeszkedik. Legjobban akkor működik, ha a 'quickSuggestions' nincs engedélyezve." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..9ed5e0feacca5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "Segítsen javítani a {0}-támogatásunkat", + "takeShortSurvey": "Rövid felmérés kitöltése", + "remindLater": "Emlékeztessen később", + "neverAgain": "Ne jelenítse meg újra" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..b4f41dcbe89a8 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Lenne kedve egy gyors elégedettségi felméréshez?", + "takeSurvey": "Felmérés kitöltése", + "remindLater": "Emlékeztessen később", + "neverAgain": "Ne jelenítse meg újra" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..014090555b3d0 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Adja meg a buildelési feladat nevét!", + "noTasksMatching": "Nincs ilyen feladat", + "noTasksFound": "Buildelési feladat nem található" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json new file mode 100644 index 0000000000000..f6eaf1f370f4e --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, feladatok", + "customizeTask": "Feladat testreszabása" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json new file mode 100644 index 0000000000000..dad5b6db3e881 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Adja meg az újraindítandó feladat nevét!", + "noTasksMatching": "Nincs ilyen feladat", + "noTasksFound": "Újraindítandó feladat nem található" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json new file mode 100644 index 0000000000000..4b81a1db7741c --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Adja meg a futtatandó feladat nevét!", + "noTasksMatching": "Nincs ilyen feladat", + "noTasksFound": "Feladat nem található" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json new file mode 100644 index 0000000000000..76eb0f2619dd6 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Adja meg a megszakítandó feladat nevét!", + "noTasksMatching": "Nincs ilyen feladat", + "noTasksFound": "Megszakítandó feladat nem található" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..52db1a193d3c7 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Adja meg a tesztelési feladat nevét!", + "noTasksMatching": "Nincs ilyen feladat", + "noTasksFound": "Tesztelési feladat nem találhat" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..b798f4ca94f82 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "Figyelmeztetés: az options.cwd értékének string típusúnak kell lennie. A következő érték figyelmen kívül van hagyva: {0}.", + "ConfigurationParser.noargs": "Hiba: a parancssori argumentumokat string típusú tömbként kell megadni. A megadott érték:\n{0}", + "ConfigurationParser.noShell": "Figyelmeztetés: a shellkonfiguráció csak akkor támogatott, ha a feladat a terminálban van végrehajtva.", + "ConfigurationParser.noName": "Hiba: a deklarációs hatókörben lévő problémailleszőnek kötelező nevet adni:\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "Figyelem: a megadott problémaillesztő ismeretlen. A támogatott típusok: string | ProblemMatcher | (string | ProblemMatcher)[].\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "Hiba: érvénytelen problemMatcher-referencia: {0}\n", + "ConfigurationParser.noTaskName": "Hiba: a feladathoz meg kell adni a taskName tulajdonságot. A feladat figyelmen kívül lesz hagyva.\n{0}\n", + "taskConfiguration.shellArgs": "Figyelmeztetés: a(z) '{0}' feladat egy rendszerparancs, és vagy a parancs nevében vagy az argumentumok egyikében escape nélküli szóköz található. A megfelelő idézőjelezés érdekében olvassza bele az argumentumokat a parancsba.", + "taskConfiguration.noCommandOrDependsOn": "Hiba: a(z) '{0}' feladat nem ad meg parancsot, és nem definiálja a dependsOn tulajdonságot sem. A feladat figyelmen kívül lesz hagyva. A definíciója:\n{1}", + "taskConfiguration.noCommand": "Hiba: a(z) '{0}' feladathoz nincs definiálva a parancs. A feladat figyelmen kívül lesz hagyva. A definíciója:\n{1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json new file mode 100644 index 0000000000000..eb7c4006c2ec4 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tsc.config": "Lefordít egy TypeScript-projektet", + "tsc.watch": "Lefordít egy TypeScript-projektet figyelő módban", + "dotnetCore": "Végrehajt egy .NET Core buildelési parancsot", + "msbuild": "Végrehajtja a buildelés célpontját", + "externalCommand": "Példa egy tetszőleges külső parancs futtatására", + "Maven": "Általános maven parancsokat hajt végre" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json new file mode 100644 index 0000000000000..5372bc32e8115 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.options": "További parancsbeálíltások", + "JsonSchema.options.cwd": "A végrehajtott program vagy parancsfájl munkakönyvtára. Ha nincs megadva, akkor a Code aktuális munkaterületének gyökérkönyvtára van használva.", + "JsonSchema.options.env": "A végrehajtott parancs vagy shell környezete. Ha nincs megadva, akkor a szülőfolyamat környezete van használva.", + "JsonSchema.shellConfiguration": "Meghatározza a használt shellt.", + "JsonSchema.shell.executable": "A használt shell.", + "JsonSchema.shell.args": "Shellargumentumok.", + "JsonSchema.command": "A végrehajtandó parancs. Lehet egy külső parancs vagy egy rendszerparancs.", + "JsonSchema.tasks.args": "A parancs meghívásakor átadott argumentumok.", + "JsonSchema.tasks.taskName": "A feladat neve.", + "JsonSchema.tasks.windows": "Windows-specifikus parancskonfiguráció", + "JsonSchema.tasks.mac": "Mac-specifikus parancskonfiguráció", + "JsonSchema.tasks.linux": "Linux-specifikus parancskonfiguráció", + "JsonSchema.tasks.suppressTaskName": "Meghatározza, hogy a feladat neve hozzá van adva argumentumként a parancshoz. Ha nincs megadva, akkor a globálisan meghatározot érték van használva.", + "JsonSchema.tasks.showOutput": "Meghatározza, hogy a futó feladat kimenete meg van-e jelenítve, vagy sem. Ha nincs megadva, akkor a globálisan meghatározot érték van használva.", + "JsonSchema.echoCommand": "Meghatározza, hogy a végrehajtott parancs ki van-e írva a kimenetre. Alapértelmezett értéke hamis.", + "JsonSchema.tasks.watching.deprecation": "Elavult. Használja helyette az isBackground beállítást.", + "JsonSchema.tasks.watching": "A feladat folyamatosan fut-e és figyeli-e a fájlrendszert.", + "JsonSchema.tasks.background": "A feladat folyamatosan fut-e és a háttérben fut-e.", + "JsonSchema.tasks.promptOnClose": "A felhasználó figyelmeztetve van-e, ha a VS Code egy futó feladat közben záródik be.", + "JsonSchema.tasks.build": "A parancsot a Code alapértelmezett buildelési parancsához rendeli.", + "JsonSchema.tasks.test": "A parancsot a Code alapértelmezett tesztelési parancsához rendeli.", + "JsonSchema.tasks.matchers": "A használt problémaillesztők. Lehet karakterlánc, problémaillesztő, vagy egy tömb, ami karakterláncokat és problémaillesztőket tartalmaz.", + "JsonSchema.args": "A parancsnak átadott további argumentumok.", + "JsonSchema.showOutput": "Meghatározza, hogy a futó feladat kimenete megjelenjen-e vagy sem. Ha nincs megadva, az 'always' érték van használva.", + "JsonSchema.watching.deprecation": "Elavult. Használja helyette az isBackground beállítást.", + "JsonSchema.watching": "A feladat folyamatosan fut-e és figyeli-e a fájlrendszert.", + "JsonSchema.background": "A feladat folyamatosan fut-e és a háttérben fut-e.", + "JsonSchema.promptOnClose": "A felhasználó figyelmeztetve van-e, ha a VS Code egy háttérben futó feladat közben záródik be.", + "JsonSchema.suppressTaskName": "Meghatározza, hogy a feladat neve hozzá van adva argumentumként a parancshoz. Alapértelmezett értéke hamis.", + "JsonSchema.taskSelector": "Előtag, ami jelzi, hogy az argumentum a feladat.", + "JsonSchema.matchers": "A használt problémaillesztők. Lehet karakterlánc, problémaillesztő, vagy egy tömb, ami karakterláncokat és problémaillesztőket tartalmaz.", + "JsonSchema.tasks": "Feladatkonfigurációk. Általában egy külső feladatfuttató rendszerben definiált feladatok kiegészítő beállításokkal ellátott változatai." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json new file mode 100644 index 0000000000000..e288243af01ac --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.version": "A konfiguráció verziószáma", + "JsonSchema._runner": "A futtató kikerült a kísérleti állapotból. Használja a hivatalos runner tulajdonságot!", + "JsonSchema.runner": "Meghatározza, hogy a feladat folyamatként van-e végrehajtva, és a kimenet a kimeneti ablakban jelenjen-e meg, vagy a terminálban.", + "JsonSchema.windows": "Windows-specifikus parancskonfiguráció", + "JsonSchema.mac": "Mac-specifikus parancskonfiguráció", + "JsonSchema.linux": "Linux-specifikus parancskonfiguráció", + "JsonSchema.shell": "Meghatározza, hogy a parancs egy rendszerparancs vagy egy külső program. Alapértelmezett értéke hamis, ha nincs megadva." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json new file mode 100644 index 0000000000000..808f2879fd91a --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.shell": "Meghatározza, hogy a parancs egy rendszerparancs vagy egy külső program. Alapértelmezett értéke hamis, ha nincs megadva.", + "JsonSchema.tasks.dependsOn.string": "Egy másik feladat, amitől ez a feladat függ.", + "JsonSchema.tasks.dependsOn.array": "Más feladatok, amiktől ez a feladat függ.", + "JsonSchema.tasks.group": "Meghatározza a feladat végrehajtási csoportját. Ha nincs megadva, akkor a feladat nem tartozik egyetlen csoportba sem.", + "JsonSchema.tasks.type": "Meghatározza, hogy a feladat folyamatként van-e végrehajtva vagy egy parancsként a shellben. Alapértelmetten folyamatként vannak végrehajtva.", + "JsonSchema.version": "A konfiguráció verziószáma", + "JsonSchema.tasks.customize": "A szolgáltatott feladat, ami testre van szabva.", + "JsonSchema.windows": "Windows-specifikus parancskonfiguráció", + "JsonSchema.mac": "Mac-specifikus parancskonfiguráció", + "JsonSchema.linux": "Linux-specifikus parancskonfiguráció" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json new file mode 100644 index 0000000000000..eb87dfa126fe3 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksCategory": "Feladatok", + "ConfigureTaskRunnerAction.noWorkspace": "A feladatok csak egy munkaterület mappájára vonatkozóan érhetők el.", + "ConfigureTaskRunnerAction.quickPick.template": "Feladatfuttató rendszer választása", + "ConfigureTaskRunnerAction.autoDetecting": "Feladatok automatikus felderítése a következőhöz: {0}", + "ConfigureTaskRunnerAction.autoDetect": "A feladatfuttató rendszer automatikus felderítése nem sikerült. Az alapértelmezett sablon használata. Tekintse meg a feladatkimenetet a részletekért.", + "ConfigureTaskRunnerAction.autoDetectError": "A feladatfuttató rendszer automatikus felderítése hibákat eredményezett. Tekintse meg a feladatkimenetet a részletekért.", + "ConfigureTaskRunnerAction.failed": "Nem sikerült létrehozni a 'tasks.json' fájlt a '.vscode' mappában. Tekintse meg a feladatkimenetet a részletekért.", + "ConfigureTaskRunnerAction.label": "Feladatfuttató rendszer beállítása", + "ConfigureBuildTaskAction.label": "Buildelési feladat beállítása", + "CloseMessageAction.label": "Bezárás", + "ShowTerminalAction.label": "Terminál megtekintése", + "problems": "Problémák", + "manyMarkers": "99+", + "tasks": "Feladatok", + "TaskSystem.noHotSwap": "A feladatvégrehajtó motor megváltoztatása a VS Code újraindítását igényli. A módosítás figyelmen kívül van hagyva.", + "TaskService.noBuildTask": "Nincs buildelési feladat definiálva. Jelöljön meg egy feladatot az 'isBuildCommand' tulajdonsággal a tasks.json fájlban.", + "TaskService.noTestTask": "Nincs tesztelési feladat definiálva. Jelöljön meg egy feladatot az 'isTestCommand' tulajdonsággal a tasks.json fájlban.", + "TaskServer.noTask": "A futtatni kívánt feladat ({0}) nem található.", + "customizeParseErrors": "A jelenlegi feladatkonfigurációban hibák vannak. Feladat egyedivé tétele előtt javítsa a hibákat!", + "moreThanOneBuildTask": "Túl sok buildelési feladat van definiálva a tasks.json-ban. Az első lesz végrehajtva.\n", + "TaskSystem.activeSame.background": "A feladat már aktív és a háttérben fut. A feladat befejezéséhez használja az `F1 > feladat megszakítása` parancsot! ", + "TaskSystem.active": "Már fut egy feladat. Szakítsa meg, mielőtt egy másik feladatot futtatna.", + "TaskSystem.restartFailed": "Nem sikerült a(z) {0} feladat befejezése és újraindítása.", + "TaskSystem.configurationErrors": "Hiba: a megadott feladatkonfigurációban validációs hibák vannak, és nem használható. Először javítsa ezeket a hibákat!", + "TaskSystem.invalidTaskJson": "Hiba. A tasks.json fájlban szintaktikai hibák találhatók. Javítsa ezeket a hibákat feladatvégrehajtás előtt.\n", + "TaskSystem.runningTask": "Már fut egy feladat. Szeretné megszakítani?", + "TaskSystem.terminateTask": "Felada&&t megszakítása", + "TaskSystem.noProcess": "Az elindított feladat már nem létezik. Ha a feladat egy háttérfolyamatot indított, a VS Code-ból való kilépés árva folyamatokat eredményezhet. Ennek megakadályozása érdekében indítsa el a legutóbbi háttérfolyamatot a wait kapcsolóval!", + "TaskSystem.exitAnyways": "Kilépés mind&&enképp", + "TerminateAction.label": "Futó feladat megszakítása", + "TaskSystem.unknownError": "Hiba történt a feladat futtatása közben. További részletek a feladatnaplóban.", + "TaskService.noWorkspace": "A feladatok csak egy munkaterület mappájára vonatkozóan érhetők el.", + "TerminateAction.noProcess": "Az elindított folyamat már nem létezik. Ha a feladat háttérfeladatokat indított, a VS Code-ból való kilépés árva folyamatokat eredményezhet. ", + "TerminateAction.failed": "Nem sikerült megszakítani a futó feladatot", + "ShowLogAction.label": "Feladatnapló megtekintése", + "RunTaskAction.label": "Feladat futtatása", + "RestartTaskAction.label": "Feladat újraindítása", + "BuildAction.label": "Buildelési feladat futtatása", + "TestAction.label": "Tesztelési feladat futtatása", + "quickOpen.task": "Feladat futtatása", + "quickOpen.terminateTask": "Feladat megszakítása", + "quickOpen.restartTask": "Feladat újraindítása", + "quickOpen.buildTask": "Buildelési feladat", + "quickOpen.testTask": "Tesztelési feladat" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json new file mode 100644 index 0000000000000..cbc547d3e4aa0 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TerminalTaskSystem.unknownError": "Ismeretlen hiba történt a feladat végrehajtása közben. Részletek a feladat kimeneti naplójában találhatók.", + "TerminalTaskSystem.terminalName": "Feladat – {0}", + "reuseTerminal": "A terminál újra lesz hasznosítva a feladatok által. Nyomjon meg egy billentyűt a bezáráshoz.", + "TerminalTaskSystem": "Rendszerparancsok nem hajthatók végre UNC-meghajtókon.", + "unkownProblemMatcher": "A(z) {0} problémaillesztő nem található. Az illesztő figyelmen kívül lesz hagyva." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json new file mode 100644 index 0000000000000..12233f706c84c --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskSystemDetector.noGulpTasks": "A gulp --tasks-simple futtatása nem listázott egyetlen feladatot sem. Futtatta az npm install parancsot?", + "TaskSystemDetector.noJakeTasks": "A jake --tasks futtatása nem listázott egyetlen feladatot sem. Futtatta az npm install parancsot?", + "TaskSystemDetector.noGulpProgram": "A Gulp nincs telepítve a rendszerre. Futtassa az npm install -g gulp parancsot a telepítéshez!", + "TaskSystemDetector.noJakeProgram": "A Jake nincs telepítve a rendszerre. Futtassa az npm install -g jake parancsot a telepítéshez!", + "TaskSystemDetector.noGruntProgram": "A Grunt nincs telepítve a rendszerre. Futtassa az npm install -g grunt parancsot a telepítéshez!", + "TaskSystemDetector.noProgram": "Az) {0} program nem található. Az üzenet: {1}", + "TaskSystemDetector.buildTaskDetected": "'{0}' nevű build feladat észlelve.", + "TaskSystemDetector.testTaskDetected": "'{0}' nevű tesztelési feladat észlelve." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/hun/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json new file mode 100644 index 0000000000000..37fca18236daa --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskRunnerSystem.unknownError": "Ismeretlen hiba történt a feladat végrehajtása közben. Részletek a kimeneti naplóban találhatók.", + "TaskRunnerSystem.watchingBuildTaskFinished": "A figyelő buildelési feladat befejeződött.", + "TaskRunnerSystem.childProcessError": "Nem sikerült elindítani a külső programot: {0} {1}.", + "TaskRunnerSystem.cancelRequested": "Az) '{0}' feladat a felhasználó kérésére lett megszakítva.", + "unkownProblemMatcher": "A(z) {0} problémaillesztőt nem lehet feloldani. Az illesztő figyelmen kívül lesz hagyva." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json new file mode 100644 index 0000000000000..47de274f4d6a5 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalIntegratedConfigurationTitle": "Beépített terminál", + "terminal.integrated.shell.linux": "A terminál által használt shell elérési útja Linuxon.", + "terminal.integrated.shellArgs.linux": "Linux-terminál esetén használt parancssori argumentumok.", + "terminal.integrated.shell.osx": "A terminál által használt shell elérési útja OS X-en.", + "terminal.integrated.shellArgs.osx": "OS X-terminál esetén használt parancssori argumentumok.", + "terminal.integrated.shell.windows": "A terminál által használt shell elérési útja Windowson. Ha a Windows beépített shelljét használja (cmd-t, PowerShellt vagy Bash on Ubuntut), a C:\\Windows\\sysnative elérési utat adja meg a C:\\Windows\\System32 helyett a 64-bites verzió használatához.", + "terminal.integrated.shellArgs.windows": "Windows-terminál esetén használt parancssori argumentumok.", + "terminal.integrated.rightClickCopyPaste": "Ha be van állítva, megakadályozza a helyi menü megjelenését a terminálon történő jobb kattintás esetén. Helyette másol, ha van kijelölés, és beilleszt, ha nincs.", + "terminal.integrated.fontFamily": "Meghatározza a terminál betűtípusát. Alapértelmezett értéke az editor.fontFamily értéke.", + "terminal.integrated.fontLigatures": "Meghatározza, hogy a terminálban engedélyezve vannak-e a betűtípus-ligatúrák.", + "terminal.integrated.fontSize": "Meghatározza a terminálban használt betű méretét, pixelekben.", + "terminal.integrated.lineHeight": "Meghatározza a sormagasságot a terminálban. A tényleges méret a megadott szám és a terminál betűméretének szorzatából jön ki.", + "terminal.integrated.enableBold": "Engedélyezve van-e a félkövér szöveg a terminálban. A működéshez szükséges, hogy a terminál shellje támogassa a félkövér betűket.", + "terminal.integrated.cursorBlinking": "Meghatározza, hogy a terminál kurzora villog-e.", + "terminal.integrated.cursorStyle": "Meghatározza a terminál kurzorának stílusát.", + "terminal.integrated.scrollback": "Meghatározza, hogy a terminál legfeljebb hány sort tárol a pufferben.", + "terminal.integrated.setLocaleVariables": "Meghatározza, hogy a lokálváltozók be vannak-e állítva a terminál indításánál. Alapértelmezett értéke igaz OS X-en, hamis más platformokon.", + "terminal.integrated.cwd": "Explicit elérési út, ahol a terminál indítva lesz. Ez a shellfolyamat munkakönyvtára (cwd) lesz. Ez a beállítás nagyon hasznos olyan munkaterületeken, ahol a gyökérkönyvtár nem felel meg munkakönyvtárnak.", + "terminal.integrated.confirmOnExit": "Meghatározza, hogy megerősítést kér-e az alkalamzás, ha van aktív terminál-munkafolyamat.", + "terminal.integrated.commandsToSkipShell": "Olyan parancsazonosítók listája, melyek nem lesznek elküldve a shellnek, és ehelyett mindig a Code kezeli le őket. Ez lehetővé teszi, hogy az olyan billentyűparancsok, melyeket normál esetben a shell dolgozna fel, ugyanúgy működjenek, mint mikor a terminálon nincs fókusz. Például ilyen a gyorsmegnyitás indításához használt Ctrl+P.", + "terminal": "Terminál", + "terminalCategory": "Terminál", + "viewCategory": "Nézet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json new file mode 100644 index 0000000000000..aa97cc3e5700c --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbench.action.terminal.toggleTerminal": "Integrált terminál be- és kikapcsolása", + "workbench.action.terminal.kill": "Az aktív terminálpéldány leállítása", + "workbench.action.terminal.kill.short": "Terminál leállítása", + "workbench.action.terminal.copySelection": "Kijelölés másolása", + "workbench.action.terminal.selectAll": "Összes kijelölése", + "workbench.action.terminal.new": "Új integrált terminál létrehozása", + "workbench.action.terminal.new.short": "Új terminál", + "workbench.action.terminal.focus": "Váltás a terminálra", + "workbench.action.terminal.focusNext": "Váltás a következő terminálra", + "workbench.action.terminal.focusAtIndex": "Váltás a(z) {0}. terminálra", + "workbench.action.terminal.focusPrevious": "Váltás az előző terminálra", + "workbench.action.terminal.paste": "Beillesztés az aktív terminálba", + "workbench.action.terminal.DefaultShell": "Alapértelmezett shell kiválasztása", + "workbench.action.terminal.runSelectedText": "Kijelölt szöveg futtatása az aktív terminálban", + "workbench.action.terminal.runActiveFile": "Aktív fájl futtatása az az aktív terminálban", + "workbench.action.terminal.runActiveFile.noFile": "Csak a lemezen lévő fájlok futtathatók a terminálban", + "workbench.action.terminal.switchTerminalInstance": "Terminálpéldány váltása", + "workbench.action.terminal.scrollDown": "Görgetés lefelé (soronként)", + "workbench.action.terminal.scrollDownPage": "Görgetés lefelé (oldalanként)", + "workbench.action.terminal.scrollToBottom": "Görgetés az aljára", + "workbench.action.terminal.scrollUp": "Görgetés felfelé (soronként)", + "workbench.action.terminal.scrollUpPage": "G9rgetés felfelé (oldalanként)", + "workbench.action.terminal.scrollToTop": "Görgetés a tetejére", + "workbench.action.terminal.clear": "Törlés", + "workbench.action.terminal.allowWorkspaceShell": "Munkaterületspecifikus shellkonfiguráció engedélyezése", + "workbench.action.terminal.disallowWorkspaceShell": "Munkaterületspecifikus shellkonfiguráció letiltása", + "workbench.action.terminal.rename": "Átnevezés", + "workbench.action.terminal.rename.prompt": "Adja meg a terminál nevét!", + "workbench.action.terminal.focusFindWidget": "Váltás a keresőmodulra", + "workbench.action.terminal.hideFindWidget": "Keresőmodul elrejtése" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json new file mode 100644 index 0000000000000..890ebc35e3d4e --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.background": "A terminál háttérszíne. Ez lehetővé teszi a terminál paneltől eltérő színezését.", + "terminal.foreground": "A terminál előtérszíne.", + "terminal.ansiColor": "A(z) '{0}' ANSI-szín a terminálban." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json new file mode 100644 index 0000000000000..d6881142372df --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.allowWorkspaceShell": "Engedélyezi a(z) {0} (a munkaterületi beállításokban definiálva) terminálról történő indítását?", + "allow": "Engedélyezés", + "disallow": "Tiltás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..2d5b3af7ef7b1 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Keresés", + "placeholder.find": "Keresés", + "label.previousMatchButton": "Előző találat", + "label.nextMatchButton": "Következő találat", + "label.closeButton": "Bezárás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json new file mode 100644 index 0000000000000..319655fe00e2f --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.copySelection.noSelection": "A terminálban nincs semmi kijelölve a másoláshoz", + "terminal.integrated.exitedWithCode": "A terminálfolyamat a következő kilépési kóddal állt le: {0}", + "terminal.integrated.waitOnExit": "A folytatáshoz nyomjon meg egy billentyűt...", + "terminal.integrated.launchFailed": "A(z) `{0}{1}` terminálfolyamat-parancsot nem sikerült elindítani (kilépési kód: {2})" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json new file mode 100644 index 0000000000000..b7e7147089acb --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalLinkHandler.followLinkCmd": "Hivatkozott oldal megnyitása Cmd + kattintás paranccsal", + "terminalLinkHandler.followLinkCtrl": "Hivatkozott oldal megnyitása Ctrl + kattintás paranccsal" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json new file mode 100644 index 0000000000000..3b0d8ea170a74 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copy": "Másolás", + "createNewTerminal": "Új terminál", + "paste": "Beillesztés", + "clear": "Törlés" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json new file mode 100644 index 0000000000000..babb2962c469e --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.chooseWindowsShellInfo": "Megváltoztathatja az alapértelmezett terminált a testreszabás gomb választásával.", + "customize": "Testreszabás", + "cancel": "Mégse", + "never again": "Rendben, ne jelenítse meg újra", + "terminal.integrated.chooseWindowsShell": "Válassza ki a preferált terminál shellt! Ez később módosítható a beállításokban.", + "terminalService.terminalCloseConfirmationSingular": "Van egy aktív terminálmunkamenet. Szeretné megszakítani?", + "terminalService.terminalCloseConfirmationPlural": "{0} aktív terminálmunkamenet van. Szeretné megszakítani?", + "yes": "Igen" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json new file mode 100644 index 0000000000000..f56e3fb23b947 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectTheme.label": "Színtéma", + "installColorThemes": "További színtémák telepítése...", + "themes.selectTheme": "Válassza ki a színtémát (előnézet a fel/le billentyűvel)", + "selectIconTheme.label": "Fájlikontéma", + "installIconThemes": "További fájlikontémák telepítése...", + "noIconThemeLabel": "Nincs", + "noIconThemeDesc": "Fájlikonok letiltása", + "problemChangingIconTheme": "Hiba történt az ikontéma beállítása közben: {0}", + "themes.selectIconTheme": "Válasszon fájlikontémát!", + "generateColorTheme.label": "Színtéma generálása az aktuális beállítások alapján", + "preferences": "Beállítások", + "developer": "Fejlesztői" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json new file mode 100644 index 0000000000000..977546fa1cab3 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unsupportedWorkspaceSettings": "A munkaterület olyan beállításokat tartalmaz, amelyet csak a felhasználói beállításoknál lehet megadni ({0})", + "openWorkspaceSettings": "Munkaterület beállításainak megnyitása", + "openDocumentation": "További információ", + "ignore": "Figyelmen kívül hagyás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json b/i18n/hun/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json new file mode 100644 index 0000000000000..c6ac7bd9d2fc8 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "releaseNotesInputName": "Kiadási jegyzék: {0}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json new file mode 100644 index 0000000000000..42549a7d35685 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "release notes": "Kiadási jegyzék", + "updateConfigurationTitle": "Frissítés", + "updateChannel": "Meghatározza, hogy érkeznek-e automatikus frissítések a frissítési csatornáról. A beállítás módosítása után újraindítás szükséges." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/hun/src/vs/workbench/parts/update/electron-browser/update.i18n.json new file mode 100644 index 0000000000000..3184270d4e295 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateNow": "Frissítés most", + "later": "Később", + "unassigned": "nincs hozzárendelve", + "releaseNotes": "Kiadási jegyzék", + "showReleaseNotes": "Kiadási jegyzék megjelenítése", + "downloadNow": "Letöltés most", + "read the release notes": "Üdvözöljük a {0} v{1} verziójában. Szeretné megtekinteni a kiadási jegyzéket?", + "licenseChanged": "A licencfeltételek változtak. Olvassa végig!", + "license": "Licenc elolvasása", + "updateAvailable": "A {0} frissül az újraindítás után.", + "thereIsUpdateAvailable": "Van elérhető frissítés.", + "noUpdatesAvailable": "Jelenleg nincs elérhető frissítés.", + "updateIsReady": "Új frissítés érhető el.", + "commandPalette": "Parancskatalógus...", + "settings": "Beállítások", + "keyboardShortcuts": "Billentyűparancsok", + "selectTheme.label": "Színtéma", + "themes.selectIconTheme.label": "Fájlikontéma", + "not available": "A frissítések nem érhetők el", + "checkingForUpdates": "Frissítések keresése...", + "DownloadUpdate": "Elérhető frissítés letöltése", + "DownloadingUpdate": "Frissítés letöltése...", + "InstallingUpdate": "Frissítés telepítése...", + "restartToUpdate": "Újraindítás a frissítéshez...", + "checkForUpdates": "Frissítések keresése..." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/hun/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..30ba124e29116 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} művelet" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/hun/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..377ac0a4b979e --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "a nézeteket tömbként kell megadni", + "requirestring": "a(z) `{0}` tulajdonság kötelező és `string` típusúnak kell lennie", + "optstring": "a(z) `{0}` tulajdonság elhagyható vagy `string` típusúnak kell lennie", + "vscode.extension.contributes.view.id": "A nézet azonosítója. Ez használható az adatszolgáltató regisztrálásához a `vscode.window.registerTreeDataProviderForView` API-n keresztül. Ezen túl a kiegészítő aktiválásához regisztrálni kell az `onView:${id}` eseményt az `activationEvents`-nél.", + "vscode.extension.contributes.view.name": "A nézet emberek számára olvasható neve. Meg fog jelenni", + "vscode.extension.contributes.view.when": "A nézet megjelenítésének feltétele", + "vscode.extension.contributes.views": "Nézeteket szolgáltat a szerkesztőhöz", + "views.explorer": "Fájlkezelő-nézet", + "locationId.invalid": "A(z) `{0}` nem érvényes nézethelyszín" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/hun/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json new file mode 100644 index 0000000000000..08aec5acaf8ab --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "watermark.showCommands": "Minden parancs megjelenítése", + "watermark.quickOpen": "Fájl megkeresése", + "watermark.openFile": "Fájl megnyitása", + "watermark.openFolder": "Mappa megnyitása", + "watermark.openFileFolder": "Fájl vagy mappa megnyitása", + "watermark.openRecent": "Legutóbbi megnyitása", + "watermark.newUntitledFile": "Új, névtelen fájl", + "watermark.toggleTerminal": "Terminál be- és kikapcsolása", + "watermark.findInFiles": "Keresés a fájlokban", + "watermark.startDebugging": "Hibakeresés indítása", + "watermark.selectTheme": "Téma módosítása", + "watermark.selectKeymap": "Billentyűkonfiguráció módosítása", + "watermark.keybindingsReference": "Billentyűparancs-referencia", + "watermark.openGlobalKeybindings": "Billentyűparancsok", + "watermark.unboundCommand": "nincs hozzárendelve", + "workbenchConfigurationTitle": "Munkaterület", + "tips.enabled": "Ha engedélyezve van, tippek jelennek meg vízjelként, ha nincs egyetlen szerkesztőablak sem nyitva." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json b/i18n/hun/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json new file mode 100644 index 0000000000000..9ea3e3e0530b4 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomeOverlay.explorer": "Fájlkezelő", + "welcomeOverlay.search": "Keresés a fájlok között", + "welcomeOverlay.git": "Forráskódkezelés", + "welcomeOverlay.debug": "Indítás és hibakeresés", + "welcomeOverlay.extensions": "Kiterjesztések kezelése", + "welcomeOverlay.problems": "Hibák és figyelmeztetések megtekintése", + "welcomeOverlay.commandPalette": "Összes parancs megkeresése és futtatása", + "welcomeOverlay": "Felhasználói felület áttekintése", + "hideWelcomeOverlay": "Felület áttekintésének elrejtése", + "help": "Segítség" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json new file mode 100644 index 0000000000000..ce95c6137fd39 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomePage.vscode": "Visual Studio Code", + "welcomePage.editingEvolved": "Szerkesztés, továbbfejlesztve", + "welcomePage.start": "Start", + "welcomePage.newFile": "Új fájl", + "welcomePage.openFolder": "Mappa megnyitása...", + "welcomePage.cloneGitRepository": "Git forráskódtár klónozása...", + "welcomePage.recent": "Legutóbbi", + "welcomePage.moreRecent": "Tovább...", + "welcomePage.noRecentFolders": "Nincsenek megnyitott mappák", + "welcomePage.help": "Segítség", + "welcomePage.keybindingsCheatsheet": "Nyomatható billentyűparancs-referencia", + "welcomePage.introductoryVideos": "Bemutatóvideók", + "welcomePage.productDocumentation": "Termékdokumentáció", + "welcomePage.gitHubRepository": "GitHub-forráskódtár", + "welcomePage.stackOverflow": "Stack Overflow", + "welcomePage.showOnStartup": "Üdvözlőlap megjelenítése induláskor", + "welcomePage.customize": "Testreszabás", + "welcomePage.installExtensionPacks": "Eszközk és nyelvek", + "welcomePage.installExtensionPacksDescription": "{0}- és {1}-környezet telepítése", + "welcomePage.moreExtensions": "tovább", + "welcomePage.installKeymapDescription": "Billentyűparancsok telepítése", + "welcomePage.installKeymapExtension": "{0} és {1} billentyűparancsainak telepítése", + "welcomePage.others": "további", + "welcomePage.colorTheme": "Színtéma", + "welcomePage.colorThemeDescription": "Alakítsa át szeretett szerkesztőjét úgy, ahogyan szeretné!", + "welcomePage.learn": "További információ", + "welcomePage.showCommands": "Összes parancs megkeresése és futtatása", + "welcomePage.interfaceOverview": "Felhasználói felület áttekintése", + "welcomePage.interfaceOverviewDescription": "Fedvény, ami vizuálisan bemutatja a felhasználói felület legfőbb részeit.", + "welcomePage.interactivePlayground": "Interaktív játszótér", + "welcomePage.interactivePlaygroundDescription": "Próbálja ki a szerkesztő funkcióit egy rövid bemutató keretében", + "welcomePage.quickLinks": "Gyorshivatkozások", + "welcomePage.keybindingsReference": "Billentyűparancs-referencia", + "welcomePage.keybindingsReferenceDescription": "Egy nyomtatható PDF a leggyakrabban használt billentyűparancsokkal", + "welcomePage.configureSettings": "Beállítások módosítása", + "welcomePage.configureSettingsDescription": "Szabadítsa fel a VS Code teljes tudását a beállítások személyre szabásával" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json new file mode 100644 index 0000000000000..fc0d08e88475d --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "help": "Segítség" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json new file mode 100644 index 0000000000000..558c35d13d2d4 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbenchConfigurationTitle": "Munkaterület", + "welcomePage.enabled": "Ha engedélyezve van, indításkor megjelenik az üdvözlőlap.", + "welcomePage": "Üdvözöljük!", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "A(z) {0}-környezet már telepítve van.", + "welcomePage.willReloadAfterInstallingExtensionPack": "Az ablak újratölt a(z) {0} kiegészítő környezet telepítése után.", + "welcomePage.installingExtensionPack": "{0} kiegészítő környezet telepítése...", + "welcomePage.extensionPackNotFound": "A(z) {1} azonosítójú {0}-környezet nem található.", + "welcomePage.keymapAlreadyInstalled": "A(z) {0} billentyűparancsok már telepítve vannak.", + "welcomePage.willReloadAfterInstallingKeymap": "Az ablak újratölt a(z) {0} billentyűparancsok telepítése után.", + "welcomePage.installingKeymap": "{0} billentyűparancsok telepítése...", + "welcomePage.keymapNotFound": "A(z) {1} azonosítójú {0} billentyűparancsok nem találhatók.", + "welcome.title": "Üdvözöljük!", + "welcomePage.openFolderWithPath": "{1} elérési úton található {0} mappa megnyitása", + "welcomePage.extensionListSeparator": ", ", + "welcomePage.installKeymap": "{0}-billentyűkonfiguráció telepítése", + "welcomePage.installExtensionPack": "{0} kiegészítő környezet telepítése", + "welcomePage.installedKeymap": "A(z) {0}-billenyűkiosztás már telepítve van", + "welcomePage.installedExtensionPack": "A(z) {0}-környezet már telepítve van.", + "ok": "OK", + "details": "Részletek", + "cancel": "Mégse", + "welcomePage.buttonBackground": "Az üdvözlőlapon található gombok háttérszíne", + "welcomePage.buttonHoverBackground": "Az üdvözlőlapon található gombok háttérszíne, amikor a mutató fölöttük áll." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json b/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json new file mode 100644 index 0000000000000..0120c6821a0a7 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorWalkThrough": "Interaktív játszótér", + "editorWalkThrough.title": "Interaktív játszótér" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json b/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json new file mode 100644 index 0000000000000..493706c26017e --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "walkThrough.editor.label": "Interaktív játszótér", + "help": "Segítség", + "interactivePlayground": "Interaktív játszótér" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json b/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json new file mode 100644 index 0000000000000..84bb9fd977824 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorWalkThrough.arrowUp": "Görgetés felfelé (soronként)", + "editorWalkThrough.arrowDown": "Görgetés lefelé (soronként)", + "editorWalkThrough.pageUp": "Görgetés felfelé (oldalanként)", + "editorWalkThrough.pageDown": "Görgetés lefelé (oldalanként)" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json new file mode 100644 index 0000000000000..027da129b6153 --- /dev/null +++ b/i18n/hun/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "walkThrough.unboundCommand": "nincs hozzárendelve", + "walkThrough.gitNotFound": "Úgy tűnik, hogy a Git nincs telepítve a rendszerre.", + "walkThrough.embeddedEditorBackground": "Az interaktív játszótér szerkesztőablakainak háttérszíne." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/hun/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json new file mode 100644 index 0000000000000..c75e504c21ced --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "open": "Beállítások megnyitása", + "close": "Bezárás", + "saveAndRetry": "Beállítások mentése és újrapróbálkozás", + "errorUnknownKey": "Nem sikerült írni a konfigurációs fájlt (ismeretlen kulcs)", + "errorInvalidTarget": "Nem sikerült írni a konfigurációs fájlt (érvénytelen cél)", + "errorNoWorkspaceOpened": "Nem sikerült írni a beállításokba, mert nincs mappa megnyitva. Nyisson meg egy mappát, majd próbálja újra!", + "errorInvalidConfiguration": "Nem sikerült írni a beállításokba. Nyissa meg a **Felhasználói beállításokat**, javítsa a hibákat és figyelmeztetéseket a fájlban, majd próbálja újra!", + "errorInvalidConfigurationWorkspace": "Nem sikerült írni a beállításokba. Nyissa meg a **Munkaterült beállításait**, javítsa a hibákat és figyelmeztetéseket a fájlban, majd próbálja újra!", + "errorConfigurationFileDirty": "Nem sikerült írni a beállításokba, mert a fájl módosítva lett. Mentse a **Felhasználói beállítások** fájlt, majd próbálja újra!", + "errorConfigurationFileDirtyWorkspace": "Nem sikerült írni a beállításokba, mert a fájl módosítva lett. Mentse a **Munkaterület beállításai** fájlt, majd próbálja újra!" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/hun/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..afdabd01421ba --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetria", + "telemetry.enableCrashReporting": "Összeomlási jelentések küldésének engedélyezése a Microsofthoz.\nA beállítás érvénybe lépéséhez újraindítás szükséges." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/editor/browser/editorService.i18n.json b/i18n/hun/src/vs/workbench/services/editor/browser/editorService.i18n.json new file mode 100644 index 0000000000000..50e968f8ee37e --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/editor/browser/editorService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "compareLabels": "{0} ↔ {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/files/electron-browser/fileService.i18n.json b/i18n/hun/src/vs/workbench/services/files/electron-browser/fileService.i18n.json new file mode 100644 index 0000000000000..132ee0675af7f --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/files/electron-browser/fileService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "netVersionError": "A működéshez Microsoft .NET-keretrendszer 4.5 szükséges. A telepítéshez kövesse az alábbi hivatkozást!", + "installNet": ".NET Framework 4.5 letöltése", + "neverShowAgain": "Ne jelenítse meg újra", + "trashFailed": "A(z) {0} kukába helyezése nem sikerült" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/hun/src/vs/workbench/services/files/node/fileService.i18n.json new file mode 100644 index 0000000000000..3734eda652011 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/files/node/fileService.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInvalidPath": "Érvénytelen fájlerőforrás ({0})", + "fileIsDirectoryError": "A fájl egy kövtár ({0})", + "fileBinaryError": "A fájl binárisnak tűnik és nem nyitható meg szövegként", + "fileNotFoundError": "Fájl nem található ({0})", + "unableToMoveCopyError": "Nem lehet áthelyezni vagy másolni. A fájl felülírná a mappát, amiben található.", + "foldersCopyError": "A munkaterületre nem másolhatók mappák. Válasszon ki egyedi fájlokat a másoláshoz.", + "fileReadOnlyError": "A fájl csak olvasható" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json b/i18n/hun/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json new file mode 100644 index 0000000000000..36032acbd6ea2 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "errorKeybindingsFileDirty": "Nem lehet írni, mert a fájl módosult. Mentse a **Billentyűparancsok** fájlt, majd próbálja újra.", + "parseErrors": "Nem lehet írni a billentyűparancsokat. Nyissa meg a**Billentyűparancsok fájl**t, javítsa a benne található hibákat vagy figyelmeztetéseket, majd próbálja újra.", + "errorInvalidConfiguration": "Nem lehet írni a billentyűparancsokat. A **Billentyűparancsok fájlban** vagy egy objektum, ami nem tömb típusú. Nyissa meg a fájlt a helyreállításhoz, majd próbálja újra.", + "emptyKeybindingsHeader": "Az ebben a fájlban elhelyezett billentyűparancsok felülírják az alapértelmezett beállításokat" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/hun/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json new file mode 100644 index 0000000000000..9ea2570fa3e14 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "nonempty": "az érték nem lehet üres.", + "requirestring": "a(z) `{0}` tulajdonság kötelező és `string` típusúnak kell lennie", + "optstring": "a(z) `{0}` tulajdonság elhagyható vagy `string` típusúnak kell lennie", + "vscode.extension.contributes.keybindings.command": "A billentyűparancs aktiválása esetén futtatandó parancs azonosítója.", + "vscode.extension.contributes.keybindings.key": "Billenty vagy billentyűparancs (különálló billentyűk plusz jellel és sorozatok szóközzel, pl.: Crtl + O és Ctrl+L L)", + "vscode.extension.contributes.keybindings.mac": "Mac-specifikus billentyű vagy billentyűsorozat.", + "vscode.extension.contributes.keybindings.linux": "Linux-specifikus billentyű vagy billentyűsorozat.", + "vscode.extension.contributes.keybindings.win": "Windows-specifikus billentyű vagy billentyűsorozat.", + "vscode.extension.contributes.keybindings.when": "A billentyűparancs aktiválási feltétele.", + "vscode.extension.contributes.keybindings": "Billentyűparancsok kezelését teszi lehetővé.", + "invalid.keybindings": "Érvénytelen `contributes.{0}`: {1}", + "unboundCommands": "A további elérhető parancsok a következők: ", + "keybindings.json.title": "Billentyűparancsok konfigurációja", + "keybindings.json.key": "Billentyű vagy billentyűsorozat (szóközzel elválasztva)", + "keybindings.json.command": "A végrehajtandó parancs neve", + "keybindings.json.when": "A billentyűparancs aktiválási feltétele.", + "keybindings.json.args": "A végrehajtandó parancs számára átadott argumentumok", + "keyboardConfigurationTitle": "Billentyűzet", + "dispatch": "Meghatározza, hogy a billentyűleütések észleléséhez a `keydown.code` (ajánlott) vagy `keydown.keyCode` esemény legyen használva." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/message/browser/messageList.i18n.json b/i18n/hun/src/vs/workbench/services/message/browser/messageList.i18n.json new file mode 100644 index 0000000000000..f97efd6f3ef08 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/message/browser/messageList.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "alertErrorMessage": "Hiba: {0}", + "alertWarningMessage": "Figyelmeztetés: {0}", + "alertInfoMessage": "Információ: {0}", + "error": "Hiba", + "warning": "Figyelmeztetés", + "info": "Információ", + "close": "Bezárás" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/message/electron-browser/messageService.i18n.json b/i18n/hun/src/vs/workbench/services/message/electron-browser/messageService.i18n.json new file mode 100644 index 0000000000000..1da61962be2ed --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/message/electron-browser/messageService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yesButton": "&&Igen", + "cancelButton": "Mégse" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/hun/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json new file mode 100644 index 0000000000000..62bcd1b704ccd --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid": "Érvénytelen `contributes.{0}`: a várt érték egy tömb.", + "invalid.empty": "A `contributes.{0}` értéke üres", + "require.id": "a(z) `{0}` tulajdonság kötelező és `string` típusúnak kell lennie", + "opt.extensions": "a(z) `{0}` tulajdonság elhagyható és `string[]` típusúnak kell lennie", + "opt.filenames": "a(z) `{0}` tulajdonság elhagyható és `string[]` típusúnak kell lennie", + "opt.firstLine": "a(z) `{0}` tulajdonság elhagyható és `string` típusúnak kell lennie", + "opt.configuration": "a(z) `{0}` tulajdonság elhagyható és `string` típusúnak kell lennie", + "opt.aliases": "a(z) `{0}` tulajdonság elhagyható és `string[]` típusúnak kell lennie", + "opt.mimetypes": "a(z) `{0}` tulajdonság elhagyható és `string[]` típusúnak kell lennie" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/hun/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..1618012de896e --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} – {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json b/i18n/hun/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json new file mode 100644 index 0000000000000..df0fb446988c0 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "saveFileFirst": "A fájl módosítva lett. Mentse, mielőtt megnyitná egy másik kódolással.", + "genericSaveError": "Hiba a(z) {0} mentése közben ({1})." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/hun/src/vs/workbench/services/textfile/common/textFileService.i18n.json new file mode 100644 index 0000000000000..53a5c4f1246c7 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "files.backup.failSave": "A fájlokról nem sikerült biztonsági másolatot készíteni (Hiba: {0}). Próbálja meg menteni a fájlokat a kilépéshez." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json b/i18n/hun/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json new file mode 100644 index 0000000000000..a411a51ba5910 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "saveChangesMessage": "Szeretné menteni a(z) {0} fájlban elvégzett módosításokat?", + "saveChangesMessages": "Szeretné menteni a következő {0} fájlban elvégzett módosításokat?", + "moreFile": "...1 további fájl nincs megjelenítve", + "moreFiles": "...{0} további fájl nincs megjelenítve", + "saveAll": "Ö&&sszes mentése", + "save": "Menté&&s", + "dontSave": "&&Ne mentse", + "cancel": "Mégse", + "saveChangesDetail": "A módosítások elvesznek, ha nem menti őket.", + "allFiles": "Összes fájl", + "noExt": "Nincs kiterjesztés" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/hun/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json new file mode 100644 index 0000000000000..0e909264d9875 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "schema.colors": "A szintaktikai kiemeléshez használt színek", + "schema.properties.name": "A szabály leírása", + "schema.fontStyle": "A szabály betűtípusának stílusa: 'italic', 'bold', 'underline', vagy ezek kombinációja", + "schema.tokenColors.path": "A tmTheme-fájl elérési útja (az aktuális fájlhoz képest relatívan)" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json b/i18n/hun/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json new file mode 100644 index 0000000000000..b93f26958fa4e --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "schema.folderExpanded": "Kinyitott mappánál használt ikon. A kinyitott mappa ikonját nem kötelező megadni. Ha nincs megadva, akkor a mappaikon lesz megjelenítve.", + "schema.folder": "A bezárt mappák ikonja, illetve ha a folderExpanded nincs megadva, akkor a kinyitott mappáké is.", + "schema.file": "Az alapértelmezett fájlikon, ami minden olyan fájlnál megjelenik, ami nem illeszkedik egyetlen kiterjesztésre, fájlnévre vagy nyelvazonosítóra sem.", + "schema.folderNames": "Ikonokat társít mappanevekhez. Az objektum kulcsa a mappa neve elérési útvonalrészletek nélkül. Nem tartalmazhat mintákat és helyettesítő karaktereket. A mappa nevének vizsgálatánál a kis- és nagybetűk nincsenek megkülönböztetve.", + "schema.folderName": "A társításhoz tartozó ikondefiníció azonosítója.", + "schema.folderNamesExpanded": "Ikonokat társít mappanevekhez kinyitott mappák esetén. Az objektum kulcsa a mappa neve elérési útvonalrészletek nélkül. Nem tartalmazhat mintákat és helyettesítő karaktereket. A mappa nevének vizsgálatánál a kis- és nagybetűk nincsenek megkülönböztetve.", + "schema.folderNameExpanded": "A társításhoz tartozó ikondefiníció azonosítója. ", + "schema.fileExtensions": "Ikonokat társít fájlkiterjesztésekhez. Az objektum kulcsa a fájlkiterjesztés neve. A kiterjesztés neve a fájl nevének utolsó része az utolsó pont után (a pont nélkül). A kiterjesztések vizsgálatánál a kis- és nagybetűk nincsenek megkülönböztetve. ", + "schema.fileExtension": "A társításhoz tartozó ikondefiníció azonosítója. ", + "schema.fileNames": "Ikonokat társít fájlnevekhez. Az objektum kulcsa a fájl teljes neve, az elérési út többi része nélkül. A fájlnév tartalmazhat pontokat és fájlkiterjesztést. Nem tartalmazhat mintákat és helyettesítő karaktereket. A fájlnevek vizsgálatánál a kis- és nagybetűk nincsenek megkülönböztetve.", + "schema.fileName": "A társításhoz tartozó ikondefiníció azonosítója. ", + "schema.languageIds": "Ikonokat társít nyelvekhez. Az objektum kulcsa a nyelvet szolgáltató komponens által definiált nyelvazonosító.", + "schema.languageId": "A társításhoz tartozó ikondefiníció azonosítója. ", + "schema.fonts": "Az ikondefiníciókban használt betűkészletek.", + "schema.id": "A betűkészlet azonosítója.", + "schema.src": "A betűkészlet elérési útjai.", + "schema.font-path": "A betűkészlet elérési útja, relatívan az aktuális ikontémafájlhoz képest.", + "schema.font-format": "A betűkészlet formátuma.", + "schema.font-weight": "A betűkészlet betűvastagsága.", + "schema.font-sstyle": "A betűkészlet stílusa.", + "schema.font-size": "A betűkészlet alapértelmezett mérete.", + "schema.iconDefinitions": "A fájlok ikonokhoz történő rendelésénél használható ikonok leírása.", + "schema.iconDefinition": "Egy ikondefiníció. Az objektum kulcsa a definíció azonosítója.", + "schema.iconPath": "SVG vagy PNG használata esetén a kép elérési útja. Az elérési út relatív az ikonkészletfájlhoz képest.", + "schema.fontCharacter": "Betűkészlet használata esetén a betűkészletből használandó karakter.", + "schema.fontColor": "Betűkészlet használata esetén a használt szín.", + "schema.fontSize": "Betűkészlet használata esetén a betűkészlet mérete a szöveg betűkészletének méretéhez képest, százalékban. Ha nincs megadva, akkor a betűkészlet-definícióban megadott érték van használva.", + "schema.fontId": "Betűkészlet használata esetén a betűkészlet azonosítója. Ha nincs megadva, akkor az első betűkészlet-definíció van használva.", + "schema.light": "Fájlikon-társítások világos témák használata esetén. Nem kötelező megadni.", + "schema.highContrast": "Fájlikon-társítások nagy kontrasztú témák használata esetén. Nem kötelező megadni." +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/hun/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json new file mode 100644 index 0000000000000..88c2c7411555a --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.cannotparsejson": "Hiba a JSON témafájl feldolgozása közben: {0}", + "error.invalidformat.colors": "Hiba a színtémafájl feldolgozása közben: {0}. A 'colors' értéke nem 'object' típusú.", + "error.invalidformat.tokenColors": "Hiba a színtémafájl feldolgozása közben: {0}. A 'tokenColors' tulajdonság vagy egy színeket tartalmazó tömb legyen vagy egy TextMate témafájl elérési útja", + "error.plist.invalidformat": "Hiba a tmTheme-fájl feldolgozása közben: {0}. A 'settings' nem egy tömb.", + "error.cannotparse": "Hiba a tmTheme-fájl feldolgozása közben: {0}", + "error.cannotload": "Hiba a(z) {0} tmTheme fájl betöltése közben: {1}" +} \ No newline at end of file diff --git a/i18n/hun/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/hun/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json new file mode 100644 index 0000000000000..52a7fb66fc2f0 --- /dev/null +++ b/i18n/hun/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.themes": "TextMate-színtémákat szolgáltat.", + "vscode.extension.contributes.themes.id": "A téma felhasználói beállításokban használt azonosítója.", + "vscode.extension.contributes.themes.label": "A színtéma felhasználói felületen megjelenő neve.", + "vscode.extension.contributes.themes.uiTheme": "A szerkesztőablak körül megjelenő elemek alaptémája. A 'vs' a világos, a 'vs-dark' a sötét színtéma, a 'hc-black' pedig a sötét, nagy kontrasztú téma.", + "vscode.extension.contributes.themes.path": "A tmTheme-fájl elérési útja. Az elérési út relatív a kiegészítő mappájához képest, és általában './themes/themeFile.tmTheme'.", + "vscode.extension.contributes.iconThemes": "Fájlikontémákat szolgáltat.", + "vscode.extension.contributes.iconThemes.id": "Az ikontéma felhasználói beállításokban használt azonosítója.", + "vscode.extension.contributes.iconThemes.label": "Az ikontéma felhasználói felületen megjelenő neve.", + "vscode.extension.contributes.iconThemes.path": "A témadefiníciós fájl elérési útja. Az elérési út relatív a kiegészítő mappájához képest, és általában ./icons/awesome-icon-theme.json'.", + "migration.completed": "Új témabeállítások lettek hozzáadva a felhasználói beállításokhoz. Biztonsági mentés a következő helyen érhető el: {0}.", + "error.cannotloadtheme": "Nem sikerült betölteni a(z) '{0}' témát: {1}.", + "reqarray": "a(z) `{0}` kiegszítési pontot tömbként kell megadni", + "reqpath": "Hiányzó karakterlánc a `contributes.{0}.path`-ban. A megadott érték: {1}", + "invalid.path.1": "A `contributes.{0}.path` ({1}) nem a kiegészítő mappáján belül található ({2}). Emiatt előfordulhat, hogy a kiegészítő nem lesz hordozható.", + "reqid": "Hiányzó karakterlánc a `contributes.{0}.id`-ben. A megadott érték: {1}", + "error.cannotloadicontheme": "Nem sikerült megnyitni a(z) '{0}' témát", + "error.cannotparseicontheme": "Hiba a fájlikonokat leíró fájl feldolgozása közben: {0}", + "colorTheme": "Meghatározza a munkaterületen használt színtémát.", + "colorThemeError": "A téma ismeretlen vagy nincs telepítve.", + "iconTheme": "Meghatározza a munkaterületen használt ikontémát.", + "noIconThemeDesc": "Nincsenek fájlikonok", + "iconThemeError": "A fájlikontéma ismeretlen vagy nincs telepítve.", + "workbenchColors": "Felülírja az aktuális színtémában definiált színeket.", + "workbenchColors.deprecated": "A beállítás már nem kísérleti, és át lett nevezve 'workbench.colorCustomizations'-re.", + "workbenchColors.deprecatedDescription": "Használja a 'workbench.colorCustomizations' tulajdonságot helyette." +} \ No newline at end of file diff --git a/i18n/ita/extensions/git/out/statusbar.i18n.json b/i18n/ita/extensions/git/out/statusbar.i18n.json index 06cabeb7330e8..fe9c1294a4150 100644 --- a/i18n/ita/extensions/git/out/statusbar.i18n.json +++ b/i18n/ita/extensions/git/out/statusbar.i18n.json @@ -7,5 +7,5 @@ "checkout": "Estrai...", "sync changes": "Sincronizza modifiche", "publish changes": "Pubblica modifiche", - "syncing changes": "Sincronizzazione delle modifiche..." + "syncing changes": "Sincronizzazione delle modifiche in corso..." } \ No newline at end of file diff --git a/i18n/ita/extensions/git/package.i18n.json b/i18n/ita/extensions/git/package.i18n.json index 9e1b703cc3db0..118066c0c40f8 100644 --- a/i18n/ita/extensions/git/package.i18n.json +++ b/i18n/ita/extensions/git/package.i18n.json @@ -32,7 +32,7 @@ "command.push": "Esegui push", "command.pushTo": "Esegui push in...", "command.sync": "Sincronizza", - "command.publish": "Pubblica", + "command.publish": "Pubblica ramo", "command.showOutput": "Mostra output GIT", "config.enabled": "Indica se GIT è abilitato", "config.path": "Percorso dell'eseguibile di GIT", diff --git a/i18n/ita/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/ita/extensions/merge-conflict/out/codelensProvider.i18n.json index 8b6ad71cd4e6d..b8b557539d959 100644 --- a/i18n/ita/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/ita/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "acceptCurrentChange": "Accetta modifica corrente", + "acceptIncomingChange": "Accetta modifica in ingresso", + "acceptBothChanges": "Accetta entrambe le modifiche", + "compareChanges": "Confronta le modifiche" +} \ No newline at end of file diff --git a/i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json index 7d9e71fea3151..bd26a995d326d 100644 --- a/i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/ita/extensions/merge-conflict/out/commandHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "cursorNotInConflict": "Il cursore dell'editor non si trova all'interno di un conflitto merge", + "compareChangesTitle": "{0}: modifiche correnti ⟷ modifiche in ingresso", "cursorOnSplitterRange": "Il cursore si trova sulla barra di divisione di merge conflitti, si prega di spostarlo o al blocco \"corrente\" o a quello \"in ricezione\"", "noConflicts": "Conflitti merge non trovati in questo file", "noOtherConflictsInThisFile": "Nessun altro conflitto merge trovato in questo file" diff --git a/i18n/ita/extensions/merge-conflict/package.i18n.json b/i18n/ita/extensions/merge-conflict/package.i18n.json index 7d13f05f2b325..323397967e172 100644 --- a/i18n/ita/extensions/merge-conflict/package.i18n.json +++ b/i18n/ita/extensions/merge-conflict/package.i18n.json @@ -5,7 +5,15 @@ // Do not edit this file. It is machine generated. { "command.category": "Esegui merge del conflitto", + "command.accept.all-incoming": "Accettare tutte le modifiche in ingresso", + "command.accept.all-both": "Accettare tutte in entrambe", + "command.accept.current": "Accettare corrente", + "command.accept.incoming": "Accettare modifiche in ingresso", + "command.accept.selection": "Accettare selezione", "command.accept.both": "Accettare entrambe", + "command.next": "Conflitto successivo", + "command.previous": "Conflitto precedente", + "command.compare": "Confronta il conflitto corrente", "config.title": "Esegui merge del conflitto", "config.codeLensEnabled": "Abilita/Disabilita le finestre CodeLens del blocco merge di conflitti all'interno di editor", "config.decoratorsEnabled": "Abilita/Disabilita gli elementi Decorator sul blocco merge di conflitti all'interno di editor" diff --git a/i18n/ita/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/ita/extensions/typescript/out/features/bufferSyncSupport.i18n.json index 08776b1189332..e6788ac396b00 100644 --- a/i18n/ita/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/ita/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "Le versioni non corrispondono. Compilatore tsc globale ({0}) != servizio di linguaggio di Visual Studio Code ({1}). Potrebbero verificarsi errori di compilazione incoerente", "moreInformation": "Altre informazioni", "doNotCheckAgain": "Non eseguire più la verifica", "close": "Chiudi", diff --git a/i18n/ita/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/ita/extensions/typescript/out/utils/projectStatus.i18n.json index 641adbe5215b8..2a71104630a9a 100644 --- a/i18n/ita/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/ita/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "Per abilitare le funzionalità del linguaggio JavaScript/TypeScript a livello di progetto, escludere le cartelle che contengono molti file, come {0}", "hintExclude.generic": "Per abilitare le funzionalità del linguaggio JavaScript/TypeScript a livello di progetto, escludere le cartelle di grandi dimensioni che contengono file di origine su cui non si lavora.", - "open": "Configura esclusioni", "large.label": "Configura esclusioni", "hintExclude.tooltip": "Per abilitare le funzionalità del linguaggio JavaScript/TypeScript a livello di progetto, escludere le cartelle di grandi dimensioni che contengono file di origine su cui non si lavora." } \ No newline at end of file diff --git a/i18n/ita/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/ita/extensions/typescript/out/utils/typingsStatus.i18n.json index 4cc0b902ae3ef..563d939145df6 100644 --- a/i18n/ita/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/ita/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Recupero dei dati per ottimizzare IntelliSense in TypeScript", + "typesInstallerInitializationFailed.title": "Non è stato possibile installare i file di definizione tipi per le funzionalità del linguaggio JavaScript. Verificare che NPM sia installato e o configurare 'typescript.npm' nelle impostazioni utente", "typesInstallerInitializationFailed.moreInformation": "Altre informazioni", "typesInstallerInitializationFailed.doNotCheckAgain": "Non eseguire più la verifica", "typesInstallerInitializationFailed.close": "Chiudi" diff --git a/i18n/ita/extensions/typescript/package.i18n.json b/i18n/ita/extensions/typescript/package.i18n.json index 2b6f87e951f96..7db05f3f135b9 100644 --- a/i18n/ita/extensions/typescript/package.i18n.json +++ b/i18n/ita/extensions/typescript/package.i18n.json @@ -13,7 +13,6 @@ "typescript.check.tscVersion": "Verifica se un compilatore TypeScript di installazione globale, ad esempio tsc, è diverso dal servizio di linguaggio TypeScript usato.", "typescript.tsserver.log": "Abilita la registrazione del server TypeScript in un file. Questo registro può essere utilizzato per diagnosticare problemi del server TypeScript. Il registro può contenere percorsi di file, codice sorgente e altre informazioni del progetto potenzialmente riservate. ", "typescript.tsserver.trace": "Abilita la traccia dei messaggi inviati al server TypeScript. Questa traccia può essere utilizzata per diagnosticare problemi del server TypeScript. La traccia può contenere percorsi di file, codice sorgente e altre informazioni del progetto potenzialmente riservate.", - "typescript.tsserver.experimentalAutoBuild": "Abilita la compilazione automatica sperimentale. Richiede la versione 1.9 dev o 2.x tsserver e il riavvio di Visual Studio Code dopo la modifica.", "typescript.validate.enable": "Abilita/Disabilita la convalida TypeScript.", "typescript.format.enable": "Abilita/Disabilita il formattatore TypeScript predefinito.", "javascript.format.enable": "Abilita/Disabilita il formattatore JavaScript predefinito.", @@ -41,6 +40,8 @@ "typescript.selectTypeScriptVersion.title": "Seleziona la versione di TypeScript", "jsDocCompletion.enabled": "Abilita/Disabilita commenti automatici JSDoc", "javascript.implicitProjectConfig.checkJs": "Abilita/disabilita il controllo semantico di file JavaScript. File jsconfig.json o tsconfig.json esistenti sovrascrivono su questa impostazione. Richiede TypeScript >= 2.3.1.", + "typescript.npm": "Specifica il percorso dell'eseguibile NPM utilizzato per l'acquisizione automatica delle definizioni di tipi. Richiede TypeScript >= 2.3.4.", + "typescript.check.npmIsInstalled": "Controlla se NPM è installato per l'acquisizione automatica delle definizioni di tipi", "javascript.nameSuggestions": "Abilita/disabilita l'inclusione di nomi univoci dal file negli elenchi di suggerimento di JavaScript.", "typescript.tsc.autoDetect": "Controlla se la rilevazione automatica di attività tsc è on/off." } \ No newline at end of file diff --git a/i18n/ita/src/vs/base/common/errorMessage.i18n.json b/i18n/ita/src/vs/base/common/errorMessage.i18n.json index 8205108272918..12c07aad24dfe 100644 --- a/i18n/ita/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/ita/src/vs/base/common/errorMessage.i18n.json @@ -13,6 +13,5 @@ "error.connection.unknown": "Si è verificato un errore di connessione sconosciuto. La connessione a Internet è stata interrotta oppure il server al quale si è connessi è offline.", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "Si è verificato un errore sconosciuto. Per altri dettagli, vedere il log.", - "nodeExceptionMessage": "Si è verificato un errore di sistema ({0})", "error.moreErrors": "{0} ({1} errori in totale)" } \ No newline at end of file diff --git a/i18n/ita/src/vs/base/common/keybindingLabels.i18n.json b/i18n/ita/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/code/electron-main/menus.i18n.json b/i18n/ita/src/vs/code/electron-main/menus.i18n.json index 8956dea0708e1..d83b44802e557 100644 --- a/i18n/ita/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/ita/src/vs/code/electron-main/menus.i18n.json @@ -14,6 +14,7 @@ "mHelp": "&&Guida", "miNewWindow": "&&Nuova finestra", "mAbout": "Informazioni su {0}", + "mServices": "Servizi", "mHide": "Nascondi {0}", "mHideOthers": "Nascondi altri", "mShowAll": "Mostra tutto", @@ -54,6 +55,9 @@ "miShowEmmetCommands": "E&&mmet...", "miToggleLineComment": "Attiva/Disattiva commento per &&riga", "miToggleBlockComment": "Attiva/Disattiva commento per &&blocco", + "miMultiCursorAlt": "Utilizzare Alt+clic per multi-cursore", + "miMultiCursorCmd": "Utilizzare Cmd+Click per multi-cursore", + "miMultiCursorCtrl": "Utilizzare Ctrl+clic per multi-cursore", "miInsertCursorAbove": "&&Aggiungi cursore sopra", "miInsertCursorBelow": "A&&ggiungi cursore sotto", "miInsertCursorAtEndOfEachLineSelected": "Aggiungi c&&ursori a fine riga", @@ -69,6 +73,7 @@ "miSmartSelectShrink": "&&Riduci selezione", "miViewExplorer": "&&Esplora risorse", "miViewSearch": "Cerca", + "miViewSCM": "S&&CM", "miViewDebug": "&&Debug", "miViewExtensions": "E&&stensioni", "miToggleOutput": "&&Output", @@ -113,6 +118,8 @@ "miGotoSymbolInFile": "Vai al &&simbolo nel file...", "miGotoSymbolInWorkspace": "Vai al &&simbolo nell'area di lavoro...", "miGotoDefinition": "Vai alla &&definizione", + "miGotoTypeDefinition": "Vai alla &&definizione di tipo", + "miGotoImplementation": "Vai all'&&implementazione", "miGotoLine": "Vai alla riga...", "miStartDebugging": "&&Avvia debug", "miStartWithoutDebugging": "Avvia &&senza debug", @@ -129,16 +136,17 @@ "miColumnBreakpoint": "Punto di interruzione &&colonna", "miFunctionBreakpoint": "Punto di interruzione &&funzione...", "miNewBreakpoint": "&&Nuovo punto di interruzione", + "miEnableAllBreakpoints": "Abilita tutti i punti di interruzione", "miDisableAllBreakpoints": "Disabilita tutti i &&punti di interruzione", "miRemoveAllBreakpoints": "Rimuovi &&tutti i punti di interruzione", "miInstallAdditionalDebuggers": "&&Installa debugger aggiuntivi...", "mMinimize": "Riduci a icona", - "mClose": "Chiudi", "mBringToFront": "Porta tutto in primo piano", "miToggleDevTools": "&&Attiva/Disattiva strumenti di sviluppo", "miAccessibilityOptions": "&&Opzioni accessibilità", "miReportIssues": "&&Segnala problemi", "miWelcome": "&&Benvenuti", + "miInteractivePlayground": "Playground &&interattivo", "miDocumentation": "&&Documentazione", "miReleaseNotes": "&&Note sulla versione", "miKeyboardShortcuts": "&&Riferimento per tasti di scelta rapida", @@ -148,12 +156,14 @@ "miLicense": "&&Visualizza licenza", "miPrivacyStatement": "&&Informativa sulla privacy", "miAbout": "&&Informazioni su", + "miTerminateTask": "&&Termina attività", "accessibilityOptionsWindowTitle": "Opzioni accessibilità", "miRestartToUpdate": "Riavvia per aggiornare...", "miCheckingForUpdates": "Verifica della disponibilità di aggiornamenti...", "miDownloadUpdate": "Scarica l'aggiornamento disponibile", "miDownloadingUpdate": "Download dell'aggiornamento...", "miInstallingUpdate": "Installazione dell'aggiornamento...", + "miCheckForUpdates": "Verifica disponibilità aggiornamenti...", "aboutDetail": "\nVersione {0}\nCommit {1}\nData {2}\nShell {3}\nRenderer {4}\nNode {5}", "okButton": "OK" } \ No newline at end of file diff --git a/i18n/ita/src/vs/code/electron-main/windows.i18n.json b/i18n/ita/src/vs/code/electron-main/windows.i18n.json index 6add23a425757..6481aed587532 100644 --- a/i18n/ita/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/ita/src/vs/code/electron-main/windows.i18n.json @@ -13,9 +13,5 @@ "appStalled": "La finestra non risponde", "appStalledDetail": "È possibile riaprire la finestra, chiuderla oppure attendere.", "appCrashed": "Si è verificato un arresto anomalo della finestra", - "appCrashedDetail": "Ci scusiamo per l'inconveniente. Per riprendere dal punto in cui si è verificata l'interruzione, riaprire la finestra.", - "newWindow": "Nuova finestra", - "newWindowDesc": "Apre una nuova finestra", - "recentFolders": "Cartelle recenti", - "folderDesc": "{0} {1}" + "appCrashedDetail": "Ci scusiamo per l'inconveniente. Per riprendere dal punto in cui si è verificata l'interruzione, riaprire la finestra." } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json index b44e9539fe0a0..c1b3f513186f0 100644 --- a/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/ita/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -33,12 +33,14 @@ "wordWrapColumn": "Controlla la colonna di wrapping dell'editor quando il valore di `editor.wordWrap` è 'wordWrapColumn' o 'bounded'.", "wrappingIndent": "Controlla il rientro delle righe con ritorno a capo. Può essere uno dei valori seguenti: 'none', 'same' o 'indent'.", "mouseWheelScrollSensitivity": "Moltiplicatore da usare sui valori `deltaX` e `deltaY` degli eventi di scorrimento della rotellina del mouse", + "multiCursorModifier.ctrlCmd": "Rappresenta il tasto 'Control' (ctrl) su Windows e Linux e il tasto 'Comando' (cmd) su OSX.", + "multiCursorModifier.alt": "Rappresenta il tasto 'Alt' su Windows e Linux e il tasto 'Opzione' su OSX.", + "multiCursorModifier": "Il modificatore da utilizzare per aggiungere molteplici cursori con il mouse. 'ctrlCmd' rappresenta il tasto 'Control' su Windows e Linux e il tasto 'Comando' su OSX. I gesti del mouse Vai a definizione e Apri il Link si adatteranno in modo da non entrare in conflitto con il modificatore multi-cursore.", "quickSuggestions.strings": "Abilita i suggerimenti rapidi all'interno di stringhe.", "quickSuggestions.comments": "Abilita i suggerimenti rapidi all'interno di commenti.", "quickSuggestions.other": "Abilita i suggerimenti rapidi all'esterno di stringhe e commenti.", "quickSuggestions": "Controlla se visualizzare automaticamente i suggerimenti durante la digitazione", "quickSuggestionsDelay": "Controlla il ritardo in ms dopo il quale verranno visualizzati i suggerimenti rapidi", - "parameterHints": "Abilita i suggerimenti per i parametri", "autoClosingBrackets": "Controlla se l'editor deve chiudere automaticamente le parentesi quadre dopo che sono state aperte", "formatOnType": "Controlla se l'editor deve formattare automaticamente la riga dopo la digitazione", "formatOnPaste": "Controlla se l'editor deve formattare automaticamente il contenuto incollato. Deve essere disponibile un formattatore che deve essere in grado di formattare un intervallo in un documento.", @@ -72,6 +74,10 @@ "trimAutoWhitespace": "Rimuovi lo spazio vuoto finale inserito automaticamente", "stablePeek": "Mantiene aperti gli editor rapidi anche quando si fa doppio clic sul contenuto o si preme ESC.", "dragAndDrop": "Controlla se l'editor consentire lo spostamento di selezioni tramite trascinamento della selezione.", + "accessibilitySupport.auto": "L'editor utilizzerà API della piattaforma per rilevare quando è collegata un'utilità per la lettura dello schermo.", + "accessibilitySupport.on": "L'editor sarà definitivamente ottimizzato per l'utilizzo con un'utilità per la lettura dello schermo.", + "accessibilitySupport.off": "L'editor non sarà mai ottimizzato per l'utilizzo con un'utilità per la lettura dello schermo.", + "accessibilitySupport": "Controlla se l'editor deve essere eseguito in una modalità ottimizzata per le utilità per la lettura dello schermo.", "sideBySide": "Controlla se l'editor diff mostra le differenze affiancate o incorporate", "ignoreTrimWhitespace": "Controlla se l'editor diff mostra come differenze le modifiche relative a spazi vuoti iniziali e finali", "renderIndicators": "Consente di controllare se l'editor diff mostra gli indicatori +/- per le modifiche aggiunte/rimosse", diff --git a/i18n/ita/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/ita/src/vs/editor/common/config/editorOptions.i18n.json index 9c443a0f33d33..77d08c0ba729b 100644 --- a/i18n/ita/src/vs/editor/common/config/editorOptions.i18n.json +++ b/i18n/ita/src/vs/editor/common/config/editorOptions.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "accessibilityOffAriaLabel": "L'editor non è accessibile in questo momento. Premere Alt+F1 per le opzioni.", "editorViewAccessibleLabel": "Contenuto editor" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/ita/src/vs/editor/contrib/find/common/findController.i18n.json index 7161f553e2f49..f95c682bc9824 100644 --- a/i18n/ita/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,5 @@ "addSelectionToPreviousFindMatch": "Aggiungi selezione a risultato ricerca precedente", "moveSelectionToNextFindMatch": "Sposta ultima selezione a risultato ricerca successivo", "moveSelectionToPreviousFindMatch": "Sposta ultima selezione a risultato ricerca precedente", - "selectAllOccurencesOfFindMatch": "Seleziona tutte le occorrenze del risultato ricerca", "changeAll.label": "Cambia tutte le occorrenze" } \ No newline at end of file diff --git a/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 63fbdbdb30f16..2548e746317e0 100644 --- a/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/ita/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "aria.oneReference": "simbolo in {0} alla riga {1} colonna {2}", - "aria.fileReferences.1": "1 simbolo in {0}", - "aria.fileReferences.N": "{0} simboli in {1}", "aria.result.0": "Non sono stati trovati risultati", "aria.result.1": "Trovato 1 simbolo in {0}", "aria.result.n1": "Trovati {0} simboli in {1}", diff --git a/i18n/ita/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/ita/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 660d820086846..f595c9809b7b3 100644 --- a/i18n/ita/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/ita/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -21,6 +21,8 @@ "menus.scmTitle": "Menu del titolo del controllo del codice sorgente", "menus.resourceGroupContext": "Menu di scelta rapida del gruppo di risorse del controllo del codice sorgente", "menus.resourceStateContext": "Menu di scelta rapida dello stato delle risorse del controllo del codice sorgente", + "view.viewTitle": "Menu del titolo della visualizzazione contribuita", + "view.itemContext": "Menu di contesto dell'elemento visualizzazione contribuita", "nonempty": "è previsto un valore non vuoto.", "opticon": "la proprietà `icon` può essere omessa o deve essere una stringa o un valore letterale come `{dark, light}`", "requireStringOrObject": "la proprietà `{0}` è obbligatoria e deve essere di tipo `object` o `string`", diff --git a/i18n/ita/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/ita/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index e23bc5864c452..afe0f0f288088 100644 --- a/i18n/ita/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/ita/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "Tutti i contributi dell'estensione Visual Studio Code rappresentati da questo pacchetto.", "vscode.extension.preview": "Imposta l'estensione in modo che venga contrassegnata come Anteprima nel Marketplace.", "vscode.extension.activationEvents": "Eventi di attivazione per l'estensione Visual Studio Code.", + "vscode.extension.activationEvents.onLanguage": "Un evento di attivazione emesso ogni volta che viene aperto un file che risolve nella lingua specificata.", + "vscode.extension.activationEvents.onCommand": "Un evento di attivazione emesso ogni volta che viene invocato il comando specificato.", + "vscode.extension.activationEvents.onDebug": "Un evento di attivazione emesso ogni volta che viene iniziata una sessione di debug del tipo specificato.", + "vscode.extension.activationEvents.workspaceContains": "Un evento di attivazione emesso ogni volta che si apre una cartella che contiene almeno un file corrispondente al criterio GLOB specificato.", + "vscode.extension.activationEvents.onView": "Un evento di attivazione emesso ogni volta che la visualizzazione specificata viene espansa.", + "vscode.extension.activationEvents.star": "Un evento di attivazione emesso all'avvio di VS Code. Per garantire la migliore esperienza per l'utente finale, sei pregato di utilizzare questo evento di attivazione nella tua estensione solo quando nessun'altra combinazione di eventi di attivazione funziona nel tuo caso.", "vscode.extension.badges": "Matrice di notifiche da visualizzare nella barra laterale della pagina delle estensioni del Marketplace.", "vscode.extension.badges.url": "URL di immagine della notifica.", "vscode.extension.badges.href": "Collegamento della notifica.", diff --git a/i18n/ita/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/ita/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..53a0dcd14b375 --- /dev/null +++ b/i18n/ita/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "Nuova finestra", + "newWindowDesc": "Apre una nuova finestra", + "recentFolders": "Cartelle recenti", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json index 4822dfeb81213..bfe7913ae5f56 100644 --- a/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/ita/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -12,7 +12,6 @@ "focusBorder": "Colore dei bordi degli elementi evidenziati. Questo colore è utilizzato solo se non viene sovrascritto da un componente.", "contrastBorder": "Un bordo supplementare attorno agli elementi per contrastarli maggiormente rispetto agli altri.", "activeContrastBorder": "Un bordo supplementare intorno agli elementi attivi per contrastarli maggiormente rispetto agli altri.", - "selectionBackground": "Il colore di sfondo delle selezioni di testo nel workbench (ad esempio per i campi di input o aree di testo). Si noti che questo non si applica alle selezioni all'interno dell'editor e del terminale.", "textSeparatorForeground": "Colore dei separatori di testo.", "textLinkForeground": "Colore primo piano dei link nel testo.", "textLinkActiveForeground": "Colore primo piano dei link attivi nel testo.", @@ -60,6 +59,7 @@ "editorBackground": "Colore di sfondo dell'editor.", "editorForeground": "Colore primo piano predefinito dell'editor.", "editorWidgetBackground": "Colore di sfondo dei widget dell'editor, ad esempio Trova/Sostituisci.", + "editorWidgetBorder": "Colore bordo dei widget dell'editor. Il colore viene utilizzato solo se il widget sceglie di avere un bordo e se il colore non è sottoposto a override da un widget.", "editorSelection": "Colore della selezione dell'editor.", "editorInactiveSelection": "Colore della selezione in un editor inattivo.", "editorSelectionHighlight": "Colore delle aree con lo stesso contenuto della selezione.", @@ -74,10 +74,11 @@ "diffEditorRemoved": "Colore di sfondo del testo che è stato rimosso.", "diffEditorInsertedOutline": "Colore del contorno del testo che è stato inserito.", "diffEditorRemovedOutline": "Colore del contorno del testo che è stato rimosso.", - "mergeCurrentHeaderBackground": "Sfondo intestazione corrente in conflitto di merge in linea.", - "mergeCurrentContentBackground": "Sfondo contenuto corrente in conflitto di merge in linea.", - "mergeIncomingHeaderBackground": "Sfondo intestazione modifica in ingresso in conflitto di merge in linea.", - "mergeIncomingContentBackground": "Sfondo contenuto modifica in ingresso in conflitto di merge in linea.", - "overviewRulerCurrentContentForeground": "Primo piano righello panoramica corrente per conflitto di merge in linea.", - "overviewRulerIncomingContentForeground": "Primo piano righello panoramica modifiche in ingresso per conflitto di merge in linea." + "mergeCurrentHeaderBackground": "Sfondo intestazione corrente in conflitti di merge in linea.", + "mergeCurrentContentBackground": "Sfondo contenuto corrente in conflitti di merge in linea.", + "mergeIncomingHeaderBackground": "Sfondo intestazione modifica in ingresso in conflitti di merge in linea.", + "mergeIncomingContentBackground": "Sfondo contenuto modifica in ingresso in conflitti di merge in linea.", + "mergeBorder": "Colore bordo su intestazioni e sulla barra di divisione di conflitti di merge in linea.", + "overviewRulerCurrentContentForeground": "Colore primo piano righello panoramica attuale per i conflitti di merge in linea.", + "overviewRulerIncomingContentForeground": "Colore primo piano del righello panoramica modifiche in arrivo per i conflitti di merge in linea." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/ita/src/vs/workbench/api/node/extHostTask.i18n.json index 8b6ad71cd4e6d..4b90a12aaf247 100644 --- a/i18n/ita/src/vs/workbench/api/node/extHostTask.i18n.json +++ b/i18n/ita/src/vs/workbench/api/node/extHostTask.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/ita/src/vs/workbench/api/node/extHostTreeViews.i18n.json index 8b6ad71cd4e6d..04c4b11db8ce8 100644 --- a/i18n/ita/src/vs/workbench/api/node/extHostTreeViews.i18n.json +++ b/i18n/ita/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "treeView.notRegistered": "Nessuna visualizzazione di struttura ad albero con ID '{0}' registrata.", + "treeItem.notFound": "Nessun elemento di struttura ad albero con id '{0}' trovato.", + "treeView.duplicateElement": "L'elemento {0} è già registrato" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/ita/src/vs/workbench/browser/actions/configureLocale.i18n.json index c9c8c1ec3e54c..a124f7f6f312e 100644 --- a/i18n/ita/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,6 +7,7 @@ "configureLocale": "Configura lingua", "displayLanguage": "Definisce la lingua visualizzata di VSCode.", "doc": "Per un elenco delle lingue supportate, vedere {0}.", + "restart": "Se si modifica il valore, è necessario riavviare VSCode.", "fail.createSettings": "Non è possibile creare '{0}' ({1}).", "JsonSchema.locale": "Linguaggio dell'interfaccia utente da usare." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/ita/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index 16c143386a8ea..d8cbee32bd515 100644 --- a/i18n/ita/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "Nascondi barra attività", - "activityBarAriaLabel": "Cambio visualizzazione attiva" + "activityBarAriaLabel": "Cambio visualizzazione attiva", + "globalActions": "Azioni globali" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/ita/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 67fd42257c13d..844b3b480601e 100644 --- a/i18n/ita/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -10,7 +10,7 @@ "multiSelection": "{0} selezioni", "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", - "tabFocusModeEnabled": "Premere TAB per spostare lo stato attivo", + "screenReaderDetectedExtra": "Se non si utilizza un'utilità per la lettura dello schermo, si prega di impostare 'editor.accessibilitySupport' a \"off\".", "disableTabMode": "Disabilita modalità accessibilità", "gotoLine": "Vai alla riga", "indentation": "Rientro", diff --git a/i18n/ita/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/ita/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..6a397dbe56c52 --- /dev/null +++ b/i18n/ita/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "Vai al file...", + "quickNavigateNext": "Passa a successiva in Quick Open", + "quickNavigatePrevious": "Passa a precedente in Quick Open", + "quickSelectNext": "Seleziona successiva in Quick Open", + "quickSelectPrevious": "Seleziona precedente in Quick Open" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/browser/quickopen.i18n.json b/i18n/ita/src/vs/workbench/browser/quickopen.i18n.json index 5bd60920cf465..4419620dddd1d 100644 --- a/i18n/ita/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "Non ci sono risultati corrispondenti", "noResultsFound2": "Non sono stati trovati risultati", - "entryAriaLabel": "{0}, comando", - "noCommands": "Non ci sono comandi corrispondenti" + "entryAriaLabel": "{0}, comando" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/browser/viewlet.i18n.json b/i18n/ita/src/vs/workbench/browser/viewlet.i18n.json index 318000e271811..7ffc4d29a97a2 100644 --- a/i18n/ita/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/ita/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "Comprimi tutto", - "viewToolbarAriaLabel": "Azioni di {0}" + "collapse": "Comprimi tutto" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/common/theme.i18n.json b/i18n/ita/src/vs/workbench/common/theme.i18n.json index 213ebbab5dcd7..bdefeb9c23695 100644 --- a/i18n/ita/src/vs/workbench/common/theme.i18n.json +++ b/i18n/ita/src/vs/workbench/common/theme.i18n.json @@ -7,27 +7,42 @@ "tabActiveBackground": "Colore di sfondo delle schede attive. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "tabInactiveBackground": "Colore di sfondo delle schede inattive. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "tabBorder": "Bordo per separare le schede l'una dall'altra. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", + "tabActiveForeground": "Colore di primo piano delle schede attive in un gruppo attivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", + "tabInactiveForeground": "Colore di primo piano delle schede inattive in un gruppo attivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", + "tabUnfocusedActiveForeground": "Colore di primo piano delle schede attive in un gruppo inattivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", + "tabUnfocusedInactiveForeground": "Colore di primo piano delle schede inattiva in un gruppo inattivo. Le schede sono i contenitori degli editor nell'area degli editor. È possibile aprire più schede in un gruppo di editor e possono esistere più gruppi di editor.", "editorGroupBackground": "Colore di sfondo di un gruppo di editor. I gruppi di editor sono contenitori di editor. Il colore di sfondo viene visualizzato quando si trascinano i gruppi di editor in un'altra posizione.", + "tabsContainerBackground": "Colore di sfondo dell'intestazione del titolo di gruppo di editor, quando le schede sono abilitate. I gruppi di editor sono i contenitori degli editor.", + "tabsContainerBorder": "Colore del bordo dell'intestazione del titolo di gruppo di editor, quando le schede sono abilitate. I gruppi di editor sono i contenitori degli editor.", "editorGroupHeaderBackground": "Colore di sfondo dell'intestazione del titolo dell'editor quando le schede sono disabilitate. I gruppi di editor sono contenitori di editor.", "editorGroupBorder": "Colore per separare più gruppi di editor l'uno dall'altro. I gruppi di editor sono i contenitori degli editor.", + "editorDragAndDropBackground": "Colore di sfondo quando si trascinano gli editor. Il colore dovrebbe avere una trasparenza impostata in modo che il contenuto dell'editor sia ancora visibile.", + "panelBackground": "Colore di sfondo dei pannelli. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e del terminale integrato.", "panelBorder": "Colore del bordo dei pannelli nella parte superiore di separazione dall'editor. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e del terminale integrato.", "panelActiveTitleForeground": "Colore del titolo del pannello attivo. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e quella del terminale integrato.", "panelInactiveTitleForeground": "Colore del titolo del pannello inattivo. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e quella del terminale integrato.", "panelActiveTitleBorder": "Colore del bordo del titolo del pannello attivo. I pannelli sono visualizzati sotto l'area degli editor e contengono visualizzazioni quali quella di output e del terminale integrato.", "statusBarForeground": "Colore primo piano della barra di stato. La barra di stato è visualizzata nella parte inferiore della finestra.", "statusBarBackground": "Colore di sfondo della barra di stato standard. La barra di stato è visualizzata nella parte inferiore della finestra.", + "statusBarBorder": "Colore del bordo della barra di stato che la separa dalla sidebar e dall'editor. La barra di stato è visualizzata nella parte inferiore della finestra.", "statusBarNoFolderBackground": "Colore di sfondo della barra di stato quando non ci sono cartelle aperte. La barra di stato è visualizzata nella parte inferiore della finestra.", + "statusBarNoFolderForeground": "Colore primo piano quando non ci sono cartelle aperte. La barra di stato è visualizzata nella parte inferiore della finestra.", "statusBarItemActiveBackground": "Colore di sfondo degli elementi della barra di stato quando si fa clic. La barra di stato è visualizzata nella parte inferiore della finestra.", "statusBarItemHoverBackground": "Colore di sfondo degli elementi della barra di stato al passaggio del mouse. La barra di stato è visualizzata nella parte inferiore della finestra.", "statusBarProminentItemBackground": "Colore di sfondo degli elementi rilevanti della barra di stato. Gli elementi rilevanti spiccano rispetto ad altre voci della barra di stato. La barra di stato è visualizzata nella parte inferiore della finestra.", "statusBarProminentItemHoverBackground": "Colore di sfondo degli elementi rilevanti della barra di stato al passaggio del mouse. Gli elementi rilevanti spiccano rispetto ad altre voci della barra di stato. La barra di stato è visualizzata nella parte inferiore della finestra.", "activityBarBackground": "Colore di sfondo della barra attività. La barra attività viene visualizzata nella parte inferiore sinistra/destra e consente il passaggio tra diverse visualizzazioni della barra laterale", "activityBarForeground": "Colore primo piano della barra attività (ad es. quello utilizzato per le icone). La barra attività viene mostrata all'estrema sinistra o destra e permette di alternare le visualizzazioni della barra laterale.", + "activityBarBorder": "Colore del bordo della barra attività che la separa dalla barra laterale. La barra di attività viene mostrata all'estrema sinistra o destra e permette di alternare le visualizzazioni della barra laterale.", + "activityBarDragAndDropBackground": "Colore feedback drag and drop per gli elementi della barra di attività. Il colore dovrebbe avere una trasparenza impostata in modo che le voci della barra di attività possano ancora essere visibili. La barra di attività viene mostrata all'estrema sinistra o destra e permette di alternare le visualizzazioni della barra laterale.", "activityBarBadgeBackground": "Colore di sfondo della notifica utente dell'attività. La barra attività viene visualizzata all'estrema sinistra o all'estrema destra e consente di spostarsi tra le visualizzazioni della barra laterale.", "activityBarBadgeForeground": "Colore primo piano della notifica utente dell'attività. La barra attività viene visualizzata all'estrema sinistra o all'estrema destra e consente di spostarsi tra le visualizzazioni della barra laterale.", "sideBarBackground": "Colore di sfondo della barra laterale. La barra laterale è il contenitore per visualizzazioni come Explorer e ricerca.", + "sideBarForeground": "Colore primo piano della barra laterale. La barra laterale è il contenitore per le visualizzazioni come Esplora risorse e Cerca.", + "sideBarBorder": "Colore del bordo della barra laterale che la separa all'editor. La barra laterale è il contenitore per visualizzazioni come Esplora risorse e Cerca.", "sideBarTitleForeground": "Colore primo piano del titolo della barra laterale. La barra laterale è il contenitore per visualizzazioni come Explorer e ricerca.", "sideBarSectionHeaderBackground": "Colore di sfondo dell'intestazione di sezione della barra laterale. La barra laterale è il contenitore di visualizzazioni quali Esplora risorse e Cerca.", + "sideBarSectionHeaderForeground": "Colore primo piano dell'intestazione di sezione della barra laterale. La barra laterale è il contenitore di visualizzazioni come Esplora risorse e Cerca.", "titleBarActiveForeground": "Colore primo piano della barra del titolo quando la finestra è attiva. Si noti che questo colore è attualmente supportato solo su macOS.", "titleBarInactiveForeground": "Colore primo piano della barra del titolo quando la finestra è inattiva. Si noti che questo colore è attualmente supportato solo su macOS.", "titleBarActiveBackground": "Colore di sfondo della barra di titolo quando la finestra è attiva. Si noti che questo colore è attualmente solo supportati su macOS.", diff --git a/i18n/ita/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/actions.i18n.json index c1c0558b02c8a..d9d488bcccd33 100644 --- a/i18n/ita/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/ita/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "Chiudi editor", "closeWindow": "Chiudi finestra", - "switchWindow": "Cambia finestra", - "switchWindowPlaceHolder": "Selezionare una finestra", - "current": "Finestra corrente", "closeFolder": "Chiudi cartella", "noFolderOpened": "In questa istanza non ci sono attualmente cartelle aperte da chiudere.", "newWindow": "Nuova finestra", @@ -20,7 +17,7 @@ "zoomReset": "Reimposta zoom", "appPerf": "Prestazioni all'avvio", "reloadWindow": "Ricarica finestra", - "openRecent": "Apri recenti", + "current": "Finestra corrente", "folders": "cartelle", "files": "file", "openRecentPlaceHolderMac": "Selezionare un percorso (tenere premuto CMD per aprirlo in una nuova finestra)", @@ -32,10 +29,6 @@ "openDocumentationUrl": "Documentazione", "openIntroductoryVideosUrl": "Video introduttivi", "toggleSharedProcess": "Attiva/Disattiva processo condiviso", - "navigateLeft": "Passa alla visualizzazione a sinistra", - "navigateRight": "Passa alla visualizzazione a destra", - "navigateUp": "Passa alla visualizzazione in alto", - "navigateDown": "Passa alla visualizzazione in basso", "increaseViewSize": "Aumenta la dimensione della visualizzazione corrente", "decreaseViewSize": "Diminuisce la dimensione della visualizzazione corrente" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json index b13e3a07bdd86..b12b597ea59fa 100644 --- a/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -31,10 +31,6 @@ "window.openFoldersInNewWindow.off": "Le cartelle sostituiranno l'ultima finestra attiva", "window.openFoldersInNewWindow.default": "Le cartelle verranno aperte in una nuova finestra a meno che non si selezioni una cartella dall'interno dell'applicazione, ad esempio tramite il menu File", "openFoldersInNewWindow": "Controlla se le cartelle devono essere aperte in una nuova finestra o sostituire l'ultima finestra attiva.\n- default: le cartelle verranno aperte in una nuova finestra a meno che non si selezioni una cartella dall'interno dell'applicazione, ad esempio tramite il menu File\n- on: le cartelle verranno aperte in una nuova finestra\n- off: le cartelle sostituiranno l'ultima finestra attiva\nNota: possono comunque verificarsi casi in cui questa impostazione viene ignorata, ad esempio quando si usa l'opzione della riga di comando -new-window o -reuse-window.", - "window.reopenFolders.none": "Non apre nessuna cartella.", - "window.reopenFolders.one": "Riapre l'ultima cartella attiva.", - "window.reopenFolders.all": "Riapre tutte le cartelle dell'ultima sessione.", - "reopenFolders": "Controlla la modalità di riapertura delle cartelle dopo un riavvio. Selezionare 'none' per non riaprire mai una cartella, 'one' per riaprire l'ultima cartella usata oppure 'all' per riaprire tutte le cartelle dell'ultima sessione.", "restoreFullscreen": "Controlla se una finestra deve essere ripristinata a schermo intero se è stata chiusa in questa modalità.", "zoomLevel": "Consente di modificare il livello di zoom della finestra. Il valore originale è 0 e ogni incremento superiore (ad esempio 1) o inferiore (ad esempio -1) rappresenta un aumento o una diminuzione del 20% della percentuale di zoom. È anche possibile immettere valori decimali per modificare il livello di zoom con maggiore granularità.", "title": "Controlla il titolo della finestra in base all'editor attivo. Le variabili vengono sostituite a seconda del contesto:\n${activeEditorShort}: ad esempio myFile.txt\n${activeEditorMedium}: ad esempio myFolder/myFile.txt\n${activeEditorLong}: ad esempio /Users/Development/myProject/myFolder/myFile.txt\n${rootName}: ad esempio myProject\n${rootPath}: ad esempio /Users/Development/myProject\n${appName}: ad esempio VS Code\n${dirty}: un indicatore dirty se l'editor attivo è dirty\n${separator}: un separatore condizionale (\" - \") visualizzato solo se circondato da variabili con valori", @@ -42,11 +38,13 @@ "window.newWindowDimensions.inherit": "Apre nuove finestre le cui dimensioni sono uguali a quelle dell'ultima finestra attiva.", "window.newWindowDimensions.maximized": "Apre nuove finestre ingrandite a schermo intero.", "window.newWindowDimensions.fullscreen": "Apre nuove finestre nella modalità a schermo intero.", + "newWindowDimensions": "Controlla le dimensioni relative all'apertura di una nuova finestra quando almeno un'altra finestra è già aperta. Per impostazione predefinita, una nuova finestra di dimensioni ridotte viene aperta al centro della schermata. Se è impostata su 'inherit', la finestra assumerà le stesse dimensioni dell'ultima finestra attiva. Se è impostata su 'maximized', la finestra aperta risulterà ingrandita, mentre con 'fullscreen' verrà visualizzata a schermo intero. Sia noti che questa impostazione non impatta sulla prima finestra che era stata aperta. La prima finestra si riaprirà sempre con la dimensione e la posizione che aveva prima della chiusura.", "window.menuBarVisibility.default": "Il menu è nascosto solo nella modalità a schermo intero.", "window.menuBarVisibility.visible": "Il menu è sempre visibile, anche nella modalità a schermo intero.", "window.menuBarVisibility.toggle": "Il menu è nascosto ma può essere visualizzato premendo ALT.", "window.menuBarVisibility.hidden": "Il menu è sempre nascosto.", "menuBarVisibility": "Controlla la visibilità della barra dei menu. L'impostazione 'toggle' indica che la barra dei menu è nascosta e che per visualizzarla è necessario premere una sola volta il tasto ALT. Per impostazione predefinita, la barra dei menu è visibile a meno che la finestra non sia a schermo intero.", + "enableMenuBarMnemonics": "Se abilitato, i menu principali possono essere aperti tramite tasti di scelta rapida Alt + tasto. Disattivare i tasti di scelta permette invece di associare questi tasti di scelta rapida Alt + tasto ai comandi dell'editor.", "autoDetectHighContrast": "Se è abilitata, passa automaticamente a un tema a contrasto elevato se Windows usa un tema di questo tipo e al tipo scuro quando non si usa più un tema a contrasto elevato Windows.", "titleBarStyle": "Consente di modificare l'aspetto della barra del titolo della finestra. Per applicare le modifiche, è necessario un riavvio completo.", "window.nativeTabs": "Abilita le finestre di tab per macOS Sierra. La modifica richiede un riavvio. Eventuali personalizzazioni della barra del titolo verranno disabilitate", @@ -56,5 +54,7 @@ "zenMode.hideTabs": "Controlla se attivando la modalità Zen vengono nascoste anche le schede del workbench.", "zenMode.hideStatusBar": "Controlla se attivando la modalità Zen viene nascosta anche la barra di stato nella parte inferiore del workbench.", "zenMode.hideActivityBar": "Controlla se attivando la modalità Zen viene nascosta anche la barra di stato alla sinistra del workbench", - "zenMode.restore": "Controlla se una finestra deve essere ripristinata nella modalità Zen se è stata chiusa in questa modalità." + "zenMode.restore": "Controlla se una finestra deve essere ripristinata nella modalità Zen se è stata chiusa in questa modalità.", + "workspaceConfigurationTitle": "Area di lavoro", + "files.exclude.boolean": "Criterio GLOB da usare per trovare percorsi file. Impostare su True o False per abilitare o disabilitare il criterio." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..01386d943158f --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "Modifica dell'impostazione 'editor.accessibilitySupport' a 'on' in corso.", + "openingDocs": "Apertura della pagina di documentazione sull'accessibilità di VS Code in corso.", + "introMsg": "Grazie per aver provato le opzioni di accessibilità di Visual Studio Code.", + "status": "Stato:", + "changeConfigToOnMac": "Premere Comando+E per configurare l'editor per essere definitivamente ottimizzato per l'utilizzo con un un'utilità per la lettura dello schermo.", + "changeConfigToOnWinLinux": "Premere Control+E per configurare l'editor per essere definitivamente ottimizzato per l'utilizzo con un un'utilità per la lettura dello schermo.", + "auto_unknown": "L'editor è configurato per utilizzare le API della piattaforma per rilevare quando è collegata un'utilità per la lettura dello schermo ma il runtime corrente non lo supporta.", + "auto_on": "L'editor ha rilevato automaticamente che è collegata un'utilità per la lettura dello schermo.", + "auto_off": "L'editor è configurato per rilevare automaticamente quando è collegata un'utilità per la lettura dello schermo, che non è collegata in questo momento.", + "configuredOn": "L'editor è configurato per essere definitivamente ottimizzato per l'utilizzo con un'utilità per la lettura dello schermo - è possibile modificare questo modificando l'impostazione 'editor.accessibilitySupport'.", + "configuredOff": "L'editor è configurato per non essere ottimizzato per l'utilizzo con un'utilità per la lettura dello schermo.", + "tabFocusModeOnMsg": "Premere TAB nell'editor corrente per spostare lo stato attivo sull'elemento con stato attivabile successivo. Per attivare/disattivare questo comportamento, premere {0}.", + "tabFocusModeOnMsgNoKb": "Premere TAB nell'editor corrente per spostare lo stato attivo sull'elemento con stato attivabile successivo. Il comando {0} non può essere attualmente attivato con un tasto di scelta rapida.", + "tabFocusModeOffMsg": "Premere TAB nell'editor corrente per inserire il carattere di tabulazione. Per attivare/disattivare questo comportamento, premere {0}.", + "tabFocusModeOffMsgNoKb": "Premere TAB nell'editor corrente per inserire il carattere di tabulazione. Il comando {0} non può essere attualmente attivato con un tasto di scelta rapida.", + "openDocMac": "Premere Comando+H per aprire una finestra del browser con maggiori informazioni relative all'accessibilità di VS Code.", + "openDocWinLinux": "Premere Control+H per aprire una finestra del browser con maggiori informazioni relative all'accessibilità di VS Code.", + "outroMsg": "Per chiudere questa descrizione comando e tornare all'editor, premere ESC o MAIUSC+ESC.", + "ShowAccessibilityHelpAction": "Visualizza la Guida sull'accessibilità" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..839633747f522 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Modificatore per l'attivazione/disattivazione multi-cursore" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index d4c6f2a648693..dbac73dc76fea 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "Apri {0}", "launchJsonNeedsConfigurtion": "Configurare o correggere 'launch.json'", + "noFolderDebugConfig": "Si prega di aprire prima una cartella per consentire una configurazione di debug avanzato.", "startDebug": "Avvia debug", "startWithoutDebugging": "Avvia senza eseguire debug", "selectAndStartDebugging": "Seleziona e avvia il debug", diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json index 8b6ad71cd4e6d..f521324695bc9 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "noFolderDebugConfig": "Si prega di aprire prima una cartella per consentire una configurazione di debug avanzato." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json index 87d81fe21420b..78aa8974cb4ea 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json @@ -5,16 +5,12 @@ // Do not edit this file. It is machine generated. { "variablesSection": "Sezione Variabili", - "variables": "Variabili", "variablesAriaTreeLabel": "Esegui debug variabili", "expressionsSection": "Sezione Espressioni", - "watch": "Espressione di controllo", "watchAriaTreeLabel": "Esegui debug espressioni di controllo", "callstackSection": "Sezione Stack di chiamate", "debugStopped": "In pausa su {0}", - "callStack": "Stack di chiamate", "callStackAriaLabel": "Esegui debug stack di chiamate", "breakpointsSection": "Sezione Punti di interruzione", - "breakpoints": "Punti di interruzione", "breakpointsAriaTreeLabel": "Esegui debug punti di interruzione" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index d65947bfcbc85..ae849e1dfbb14 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "Copia valore", "copy": "Copia", + "copyAll": "Copia tutti", "copyStackTrace": "Copia stack di chiamate" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index 8de054fa31b72..c13997bfc292d 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "Colore di sfondo della barra di stato quando è in corso il debug di un programma. La barra di stato è visualizzata nella parte inferiore della finestra" + "statusBarDebuggingBackground": "Colore di sfondo della barra di stato quando è in corso il debug di un programma. La barra di stato è visualizzata nella parte inferiore della finestra", + "statusBarDebuggingForeground": "Colore primo piano della barra di stato quando è in corso il debug di un programma. La barra di stato è visualizzata nella parte inferiore della finestra" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/ita/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 53d3bcdd1ee9e..d116abf482013 100644 --- a/i18n/ita/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "Il file eseguibile '{0}' dell'adattatore di debug non esiste.", "debugAdapterCannotDetermineExecutable": "Non è possibile determinare il file eseguibile per l'adattatore di debug '{0}'.", "debugType": "Tipo di configurazione.", + "debugTypeNotRecognised": "Il tipo di debug non è riconosciuto. Assicurarsi di avere un'estensione appropriata per il debug installata e che sia abilitata.", "node2NotSupported": "\"node2\" non è più supportato. In alternativa, usare \"node\" e impostare l'attributo \"protocol\" su \"inspector\".", "debugName": "Nome della configurazione. Viene visualizzato nel menu a discesa della configurazione di avvio.", "debugRequest": "Tipo della richiesta di configurazione. Può essere \"launch\" o \"attach\".", diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index 1549e77ce2781..34249d623c89a 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "previousEditPoint": "Emmet: Punto di modifica precedente", - "nextEditPoint": "Emmet: Punto di modifica successivo" + "previousEditPoint": "Emmet: andare al punto di modifica precedente", + "nextEditPoint": "Emmet: andare al punto di modifica successivo" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 2b16a19f047b9..dc9fac282b124 100644 --- a/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -9,5 +9,6 @@ "emmetPreferences": "Preferenze usate per modificare il comportamento di alcune azioni e i resolver di Emmet.", "emmetSyntaxProfiles": "Consente di definire il profilo per la sintassi specificata oppure di usare un profilo personalizzato con regole specifiche.", "emmetExclude": "Matrice di linguaggi in cui le abbreviazioni Emmet non devono essere espanse.", - "emmetExtensionsPath": "Percorso di una cartella contenente snippet, preferenze e profili Emmet" + "emmetExtensionsPath": "Percorso di una cartella contenente snippet, preferenze e profili Emmet", + "useNewEmmet": "Prova i nuovi moduli emmet (che andrà a sostituire la vecchia libreria singola emmet) per tutte le funzionalità emmet." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 9aeb226d9a315..6302bb9a38cfd 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,10 @@ "default": "Impostazione predefinita", "debuggers": "Debugger ({0})", "debugger name": "Nome", + "views": "Visualizzazioni ({0})", + "view id": "ID", + "view name": "Nome", + "view location": "Dove", "themes": "Temi ({0})", "JSON Validation": "Convalida JSON ({0})", "commands": "Comandi ({0})", diff --git a/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 2199a5e0cccf8..2430ac5cd9b3b 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,6 +22,8 @@ "disableGloballyAction": "Sempre", "disableAction": "Disabilita", "checkForUpdates": "Controlla la disponibilità di aggiornamenti", + "enableAutoUpdate": "Abilita l'aggiornamento automatico delle estensioni", + "disableAutoUpdate": "Disabilita l'aggiornamento automatico delle estensioni", "updateAll": "Aggiorna tutte le estensioni", "reloadAction": "Ricarica", "postUpdateTooltip": "Ricaricare per aggiornare", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "Mostra estensioni consigliate per l'area di lavoro", "showRecommendedKeymapExtensions": "Mostra mappature tastiera consigliate", "showRecommendedKeymapExtensionsShort": "Mappature tastiera", + "showLanguageExtensions": "Mostra estensioni del linguaggio", + "showLanguageExtensionsShort": "Estensioni del linguaggio", "configureWorkspaceRecommendedExtensions": "Configura estensioni consigliate (area di lavoro)", "ConfigureWorkspaceRecommendations.noWorkspace": "Gli elementi consigliati sono disponibili solo per una cartella dell'area di lavoro.", "OpenExtensionsFile.failed": "Non è possibile creare il file 'extensions.json' all'interno della cartella '.vscode' ({0}).", @@ -51,5 +55,8 @@ "disableAll": "Disabilita tutte le estensioni installate", "disableAllWorkspace": "Disabilita tutte le estensioni installate per questa area di lavoro", "enableAll": "Abilita tutte le estensioni installate", - "enableAllWorkspace": "Abilita tutte le estensioni installate per questa area di lavoro" + "enableAllWorkspace": "Abilita tutte le estensioni installate per questa area di lavoro", + "extensionButtonProminentBackground": "Colore di sfondo delle azioni di estensioni che si distinguono (es. pulsante Installa).", + "extensionButtonProminentForeground": "Colore primo piano di pulsanti per azioni di estensioni che si distinguono (es. pulsante Installa).", + "extensionButtonProminentHoverBackground": "Colore di sfondo al passaggio del mouse dei pulsanti per azioni di estensione che si distinguono (es. pulsante Installa)." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index f84b219fb4e85..9d16c7dad0f34 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -9,6 +9,8 @@ "neverShowAgain": "Non visualizzare più questo messaggio", "close": "Chiudi", "workspaceRecommended": "Per questa area di lavoro sono disponibili estensioni consigliate.", + "ignoreExtensionRecommendations": "Si desidera ignorare tutte le raccomandazioni di estensioni?", + "ignoreAll": "Sì, ignora tutti", "no": "No", "cancel": "Annulla" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 1122eeb85cfbf..12c0b28e83dbf 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -10,5 +10,6 @@ "extensions": "Estensioni", "view": "Visualizza", "extensionsConfigurationTitle": "Estensioni", - "extensionsAutoUpdate": "Aggiorna automaticamente le estensioni" + "extensionsAutoUpdate": "Aggiorna automaticamente le estensioni", + "extensionsIgnoreRecommendations": "Ignora le raccomandazioni di estensioni" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 0a6152b0c7b2a..4822a5d71bc5d 100644 --- a/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,8 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "disableOtherKeymapsConfirmation": "Disabilitare altre mappature tastiera ({0}) per evitare conflitti tra tasti di scelta rapida?", "yes": "Sì", "no": "No", + "betterMergeDisabled": "L'estensione Better Merge (miglior merge) è ora incorporata: l'estensione installata è stata disattivata e può essere disinstallata.", "uninstall": "Disinstalla", "later": "In seguito" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index a3c0e1da94b45..69cc6c3dca2dc 100644 --- a/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,6 +16,7 @@ "associations": "Consente di configurare le associazioni tra file e linguaggi, ad esempio \"*.extension\": \"html\". Queste hanno la precedenza sulle associazioni predefinite dei linguaggi installate.", "encoding": "Codifica del set di caratteri predefinita da usare durante la lettura e la scrittura di file.", "autoGuessEncoding": "Quando questa opzione è abilitata, la codifica del set di caratteri viene ipotizzata all'apertura dei file", + "eol": "Il carattere di fine riga predefinito. Utilizzare \\n per LF e \\r\\n per CRLF.", "trimTrailingWhitespace": "Se è abilitato, taglierà lo spazio vuoto quando si salva un file.", "insertFinalNewline": "Se è abilitato, inserisce un carattere di nuova riga finale alla fine del file durante il salvataggio.", "files.autoSave.off": "Un file dirty non viene mai salvato automaticamente.", @@ -26,6 +27,7 @@ "autoSaveDelay": "Controlla il ritardo in ms dopo il quale un file dirty viene salvato automaticamente. Si applica solo quando 'files.autoSave' è impostato su '{0}'", "watcherExclude": "Consente di configurare i criteri GLOB dei percorsi file da escludere dal controllo dei file. Se si modifica questa impostazione, è necessario riavviare. Quando si nota che Code consuma troppo tempo della CPU all'avvio, è possibile escludere le cartelle di grandi dimensioni per ridurre il carico iniziale.", "hotExit.off": "Disabilita Hot Exit.", + "hotExit.onExit": "La funzionalità Hot Exit verrà attivata alla chiusura dell'applicazione, ovvero quando si chiude l'ultima finestra in Windows/Linux o quando si attiva il comando workbench.action.quit (riquadro comandi, tasto di scelta rapida, menu). Tutte le finestre con backup verranno ripristinate al successivo avvio.", "hotExit": "Controlla se i file non salvati verranno memorizzati tra una sessione e l'altra, consentendo di ignorare il prompt di salvataggio alla chiusura dell'editor.", "defaultLanguage": "Modalità linguaggio predefinita assegnata ai nuovi file.", "editorConfigurationTitle": "Editor", diff --git a/i18n/ita/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/ita/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index 71f3a7b410e69..fccf829184b04 100644 --- a/i18n/ita/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -5,7 +5,5 @@ // Do not edit this file. It is machine generated. { "explorerSection": "Sezione Esplora file", - "noWorkspace": "Nessuna cartella aperta", - "noWorkspaceHelp": "Non ci sono ancora cartelle aperte.", "openFolder": "Apri cartella" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/ita/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index bc5c38d3fefd9..1f6007832328a 100644 --- a/i18n/ita/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "Sezione Editor aperti", "openEditors": "Editor aperti", + "openEditosrSection": "Sezione Editor aperti", "treeAriaLabel": "Editor aperti: elenco di file attivi", "dirtyCounter": "{0} non salvati" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 9e7b35dce5da6..92488da046352 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "Definisci tasto di scelta rapida", - "defineKeybinding.kbLayoutErrorMessage": "Non sarà possibile produrre questa combinazione di tasti con il layout di tastiera corrente." + "defineKeybinding.kbLayoutErrorMessage": "Non sarà possibile produrre questa combinazione di tasti con il layout di tastiera corrente.", + "defineKeybinding.kbLayoutLocalAndUSMessage": "**{0}** per il layout di tastiera corrente (**{1}** per quello standard US).", + "defineKeybinding.kbLayoutLocalMessage": "**{0}** per il layout di tastiera corrente." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index a9d3b766fdac4..23a476fe6823d 100644 --- a/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "Impossibile scrivere nelle impostazioni. Correggere eventuali errori o avvisi nel file e riprovare.", "editTtile": "Modifica", "replaceDefaultValue": "Sostituisci nelle impostazioni", "copyDefaultValue": "Copia nelle impostazioni", diff --git a/i18n/ita/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/ita/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index 5be53aa1550e8..35875c0810541 100644 --- a/i18n/ita/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "Mostra tutti i comandi", + "showCommands.label": "Riquadro comandi...", "entryAriaLabelWithKey": "{0}, {1}, comandi", "entryAriaLabel": "{0}, comandi", "canNotRun": "Non è possibile eseguire il comando '{0}' da questa posizione.", diff --git a/i18n/ita/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..85fb16da61bf4 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchMessage": "È necessario riavviare per rendere effettiva un'impostazione modificata.", + "relaunchDetail": "Fare clic sul pulsante di riavvio per riavviare {0} e abilitare l'impostazione.", + "restart": "Riavvia" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/ita/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json index 8b6ad71cd4e6d..504c42cd09001 100644 --- a/i18n/ita/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "editorGutterModifiedBackground": "Colore di sfondo della barra di navigazione dell'editor per le righe che sono state modificate.", + "editorGutterAddedBackground": "Colore di sfondo della barra di navigazione dell'editor per le righe che sono state aggiunte.", + "editorGutterDeletedBackground": "Colore di sfondo della barra di navigazione dell'editor per le righe che sono state cancellate." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index 529f073603a85..9f3adc546ff35 100644 --- a/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "Installa ulteriori provider SCM ...", "switch provider": "Cambia provider SCM" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/ita/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index ef09ca3283a06..13608466e81d1 100644 --- a/i18n/ita/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,5 +6,7 @@ { "searchMatches": "{0} corrispondenze trovate", "searchMatch": "{0} corrispondenza trovata", - "fileMatchAriaLabel": "{0} corrispondenze nel file {1} della cartella {2}, risultato della ricerca" + "fileMatchAriaLabel": "{0} corrispondenze nel file {1} della cartella {2}, risultato della ricerca", + "replacePreviewResultAria": "Sostituisce il termine {0} con {1} alla colonna {2} in linea con il testo {3}", + "searchResultAria": "Trovato termine {0} alla colonna {1} in linea con il testo {2}" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 78cd10645b450..cd9b550b98aba 100644 --- a/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -9,5 +9,6 @@ "vscode.extension.contributes.snippets-path": "Percorso del file snippets. È relativo alla cartella delle estensioni e in genere inizia con './snippets/'.", "invalid.language": "Il linguaggio in `contributes.{0}.language` è sconosciuto. Valore specificato: {1}", "invalid.path.0": "È previsto un valore stringa in `contributes.{0}.path`. Valore specificato: {1}", - "invalid.path.1": "Valore previsto di `contributes.{0}.path` ({1}) da includere nella cartella dell'estensione ({2}). L'estensione potrebbe non essere più portatile." + "invalid.path.1": "Valore previsto di `contributes.{0}.path` ({1}) da includere nella cartella dell'estensione ({2}). L'estensione potrebbe non essere più portatile.", + "badVariableUse": "Il frammento \"{0}\" molto probabilmente confonde variabili-frammento con segnaposti-frammento. Vedere https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax per ulteriori dettagli." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index 89c9cdec78e4d..ff128cda608c5 100644 --- a/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "Frammento vuoto", "snippetSchema.json": "Configurazione del frammento utente", "snippetSchema.json.prefix": "Prefisso da usare quando si seleziona il frammento in IntelliSense", - "snippetSchema.json.body": "Contenuto del frammento. Usare '${id}', '${id:label}', '${1:label}' per le variabili e '$0', '$1' per le posizioni del cursore", + "snippetSchema.json.body": "Il contenuto del frammento. Usare '$1', '${1:defaultText}' per definire le posizioni del cursore, utilizzare '$0' per la posizione finale del cursore. Inserire i valori delle variabili con '${varName}' e '${varName:defaultText}', ad esempio 'Nome del file: $TM_FILENAME'.", "snippetSchema.json.description": "Descrizione del frammento." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..07b53da59b30a --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "Aiutaci a migliorare il nostro supporto all'{0}", + "takeShortSurvey": "Partecipa a un breve sondaggio", + "remindLater": "Visualizza più tardi", + "neverAgain": "Non visualizzare più questo messaggio" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..f5bb473c1df02 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Partecipare a un breve sondaggio?", + "takeSurvey": "Partecipa a sondaggio", + "remindLater": "Visualizza più tardi", + "neverAgain": "Non visualizzare più questo messaggio" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..6574ffdaef17d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "No tasks matching" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index c0432625724e1..0e5967d8803f6 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks" + "entryAriaLabel": "{0}, tasks", + "customizeTask": "Personalizza attività" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..6574ffdaef17d --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "No tasks matching" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 7a620ff7e5a5c..f5aa6fc8cdaf2 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -12,5 +12,6 @@ "ConfigurationParser.invalidVaraibleReference": "Errore: il riferimento a problemMatcher non è valido: {0}\n", "ConfigurationParser.noTaskName": "Errore: le attività devono specificare una proprietà taskName. L'attività verrà ignorata.\n{0}\n", "taskConfiguration.shellArgs": "Avviso: l'attività '{0}' è un comando della shell e il nome del comando o uno dei relativi argomenti contiene spazi senza codice di escape. Per garantire la corretta indicazione della riga di comando, unire gli argomenti nel comando.", + "taskConfiguration.noCommandOrDependsOn": "Errore: l'attività '{0}' non specifica un comando né una proprietà dependsOn. L'attività verrà ignorata. La sua definizione è:\n{1}", "taskConfiguration.noCommand": "Errore: l'attività '{0}' non definisce un comando. L'attività verrà ignorata. Definizione dell'attività:\n{1}" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index b14b007cde531..2c148fe49001d 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "Opzioni dei comandi aggiuntive", "JsonSchema.options.cwd": "Directory di lavoro corrente del programma o dello script eseguito. Se omesso, viene usata la radice dell'area di lavoro corrente di Visual Studio Code.", "JsonSchema.options.env": "Ambiente della shell o del programma eseguito. Se omesso, viene usato l'ambiente del processo padre.", + "JsonSchema.shellConfiguration": "Configura la shell da utilizzare.", "JsonSchema.shell.executable": "Shell da usare.", "JsonSchema.shell.args": "Argomenti della shell.", "JsonSchema.command": "Comando da eseguire. Può essere un programma esterno o un comando della shell.", diff --git a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index 2d791579971b3..9aefb1b07c7d0 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "Numero di versione della configurazione", + "JsonSchema._runner": "Runner è stata promossa. Utilizzare la proprietà ufficiale runner", + "JsonSchema.runner": "Definisce se l'attività viene eseguita come un processo e l'output viene visualizzato nella finestra di output o all'interno del terminale.", "JsonSchema.windows": "Configurazione dei comandi specifica di Windows", "JsonSchema.mac": "Configurazione dei comandi specifica di Mac", "JsonSchema.linux": "Configurazione dei comandi specifica di Linux", diff --git a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 8d0ab5a5a7554..24f8e7f95aa17 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -7,6 +7,10 @@ "JsonSchema.shell": "Specifica se il comando è un comando della shell o un programma esterno. Se omesso, viene usato il valore predefinito false.", "JsonSchema.tasks.dependsOn.string": "Altra attività da cui dipende questa attività.", "JsonSchema.tasks.dependsOn.array": "Altre attività da cui dipende questa attività.", + "JsonSchema.tasks.group": "Definisce a quale gruppo di esecuzione appartiene questa attività. Se omesso l'attività non appartiene ad alcun gruppo.", + "JsonSchema.tasks.type": "Definisce se l'attività viene eseguita come un processo o come un comando all'interno di una shell. L'impostazione predefinita è processo.", + "JsonSchema.version": "Numero di versione della configurazione", + "JsonSchema.tasks.customize": "L'attività contribuita da personalizzare.", "JsonSchema.windows": "Configurazione dei comandi specifica di Windows", "JsonSchema.mac": "Configurazione dei comandi specifica di Mac", "JsonSchema.linux": "Configurazione dei comandi specifica di Linux" diff --git a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 7be3f013ead8b..adad41059d111 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -18,10 +18,12 @@ "problems": "Problemi", "manyMarkers": "Più di 99", "tasks": "Attività", + "TaskSystem.noHotSwap": "Per modificare il motore di esecuzione delle attività, è necessario riavviare VS Code. La modifica verrà ignorata.", "TaskService.noBuildTask": "Non è stata definita alcuna attività di Build. Contrassegnare un'attività con 'isBuildCommand' nel file tasks.json .", "TaskService.noTestTask": "Non è stata definita alcuna attività di test. Contrassegnare un'attività con 'isTestCommand' nel file tasks.json .", "TaskServer.noTask": "Attività {0} richiesta per l'esecuzione non trovata", - "TaskSystem.activeSame": "L'attività è già attiva e in modalità espressione di controllo. Per terminarla, usare `F1 > Termina attività`", + "customizeParseErrors": "La configurazione dell'attività corrente presenta errori. Per favore correggere gli errori prima di personalizzazione un'attività.", + "moreThanOneBuildTask": "tasks.json contiene molte attività di compilazione. È in corso l'esecuzione della prima.\n", "TaskSystem.active": "Al momento c'è già un'attività in esecuzione. Terminarla prima di eseguirne un'altra.", "TaskSystem.restartFailed": "Non è stato possibile terminare e riavviare l'attività {0}", "TaskSystem.configurationErrors": "Errore: la configurazione delle attività specificata contiene errori di convalida e non è utilizzabile. Correggere prima gli errori.", diff --git a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index f2c65d28fb8c2..3d9e3d5f42be4 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,7 @@ { "TerminalTaskSystem.unknownError": "Si è verificato un errore sconosciuto durante l'esecuzione di un'attività. Per dettagli, vedere il log di output dell'attività.", "TerminalTaskSystem.terminalName": "Attività - {0}", - "TerminalTaskSystem": "Non è possibile eseguire un comando della shell su un'unità UNC." + "reuseTerminal": "Terminale verrà riutilizzato dalle attività, premere un tasto qualsiasi per chiuderlo.", + "TerminalTaskSystem": "Non è possibile eseguire un comando della shell su un'unità UNC.", + "unkownProblemMatcher": "Il matcher problemi {0} non può essere risolto. il matcher verrà ignorato" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/ita/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index 7f632a45eea93..fe3fa63dc3b39 100644 --- a/i18n/ita/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "Si è verificato un errore sconosciuto durante l'esecuzione di un'attività. Per dettagli, vedere il log di output dell'attività.", "TaskRunnerSystem.watchingBuildTaskFinished": "\nIl controllo delle attività di build è terminato.", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\nL'attività '{0}' è stata terminata come richiesto dall'utente." + "TaskRunnerSystem.cancelRequested": "\nL'attività '{0}' è stata terminata come richiesto dall'utente.", + "unkownProblemMatcher": "Il matcher problemi {0} non può essere risolto. Il matcher verrà ignorato" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 7df189ea6a7d1..a7393d354c76b 100644 --- a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -8,6 +8,7 @@ "workbench.action.terminal.kill": "Termina istanza attiva del terminale", "workbench.action.terminal.kill.short": "Termina il terminale", "workbench.action.terminal.copySelection": "Copia selezione", + "workbench.action.terminal.selectAll": "Seleziona tutto", "workbench.action.terminal.new": "Crea nuovo terminale integrato", "workbench.action.terminal.new.short": "Nuovo terminale", "workbench.action.terminal.focus": "Sposta stato attivo su terminale", @@ -26,5 +27,8 @@ "workbench.action.terminal.scrollUp": "Scorri su (riga)", "workbench.action.terminal.scrollUpPage": "Scorri su (pagina)", "workbench.action.terminal.scrollToTop": "Scorri all'inizio", - "workbench.action.terminal.clear": "Cancella" + "workbench.action.terminal.clear": "Cancella", + "workbench.action.terminal.allowWorkspaceShell": "Consente la configurazione della Shell dell'area di lavoro", + "workbench.action.terminal.disallowWorkspaceShell": "Non consente la configurazione della Shell dell'area di lavoro", + "workbench.action.terminal.rename": "Rinomina" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index c56209ab67f48..43f3afaeb3087 100644 --- a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "Il colore di sfondo del terminale, questo consente di colorare il terminale in modo diverso dal pannello.", + "terminal.foreground": "Il colore di primo piano del terminale.", "terminal.ansiColor": "Colore ANSI '{0}' nel terminale." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..a930fde7ffb7b --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Trova", + "placeholder.find": "Trova", + "label.previousMatchButton": "Risultato precedente", + "label.nextMatchButton": "Risultato successivo", + "label.closeButton": "Chiudi" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index 919a2c26d3b17..713819e122618 100644 --- a/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "Non è possibile copiare la selezione del terminale quando questo non ha lo stato attivo", "terminal.integrated.exitedWithCode": "Il processo del terminale è stato terminato. Codice di uscita: {0}", "terminal.integrated.waitOnExit": "Premere un tasto qualsiasi per chiudere il terminale", "terminal.integrated.launchFailed": "L'avvio del comando del processo di terminale `{0}{1}` non è riuscito. Codice di uscita: {2}" diff --git a/i18n/ita/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/ita/src/vs/workbench/parts/update/electron-browser/update.i18n.json index ddd31ed976db1..fdac59727b734 100644 --- a/i18n/ita/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -15,5 +15,18 @@ "license": "Leggi licenza", "updateAvailable": "{0} verrà aggiornato dopo il riavvio.", "thereIsUpdateAvailable": "È disponibile un aggiornamento.", - "noUpdatesAvailable": "Al momento non sono disponibili aggiornamenti." + "noUpdatesAvailable": "Al momento non sono disponibili aggiornamenti.", + "updateIsReady": "Nuovo aggiornamento disponibile.", + "commandPalette": "Riquadro comandi...", + "settings": "Impostazioni", + "keyboardShortcuts": "Scelte rapide da tastiera", + "selectTheme.label": "Tema colori", + "themes.selectIconTheme.label": "Tema icona file", + "not available": "Aggiornamenti non disponibili", + "checkingForUpdates": "Verifica della disponibilità di aggiornamenti...", + "DownloadUpdate": "Scarica l'aggiornamento disponibile", + "DownloadingUpdate": "Download dell'aggiornamento...", + "InstallingUpdate": "Installazione dell'aggiornamento...", + "restartToUpdate": "Riavvia per aggiornare...", + "checkForUpdates": "Verifica disponibilità aggiornamenti..." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/ita/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..a7b1c66172688 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "Azioni di {0}" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/ita/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..c5e18fdd63c83 --- /dev/null +++ b/i18n/ita/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "Visualizzazioni devono essere una matrice", + "requirestring": "la proprietà `{0}` è obbligatoria e deve essere di tipo `string`", + "optstring": "la proprietà `{0}` può essere omessa o deve essere di tipo `string`", + "vscode.extension.contributes.view.id": "Identificatore della vista. Utilizzare questo per registrare un provider di dati tramite l'API 'vscode.window.registerTreeDataProviderForView'. Anche per innescare l'attivazione dell'estensione tramite la registrazione dell'evento 'onView: ${id}' a 'activationEvents'.", + "vscode.extension.contributes.view.name": "Il nome della visualizzazione. Verrà mostrato", + "vscode.extension.contributes.views": "Contribuisce visualizzazioni all'editor", + "views.explorer": "Visualizzazione di esplorazione", + "locationId.invalid": "'{0}' non è una posizione valida per la visualizzazione" +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index aa2a81f6197d8..c3e2a0322fe76 100644 --- a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,20 +11,26 @@ "welcomePage.openFolder": "Apri cartella...", "welcomePage.cloneGitRepository": "Clona repository GIT...", "welcomePage.recent": "Recenti", + "welcomePage.moreRecent": "Altro...", "welcomePage.noRecentFolders": "Non ci sono cartelle recenti", "welcomePage.help": "Guida", + "welcomePage.keybindingsCheatsheet": "Bigino combinazione tasti stampabile", "welcomePage.introductoryVideos": "Video introduttivi", "welcomePage.productDocumentation": "Documentazione del prodotto", "welcomePage.gitHubRepository": "Repository GitHub", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Mostra la pagina iniziale all'avvio", "welcomePage.customize": "Personalizza", + "welcomePage.installExtensionPacks": "Strumenti e linguaggi", + "welcomePage.installExtensionPacksDescription": "Installare il supporto per {0} e {1}", + "welcomePage.moreExtensions": "altro", "welcomePage.installKeymapDescription": "Installa i tasti di scelta rapida", + "welcomePage.installKeymapExtension": "Installa i tasti di scelta rapida di {0} e {1}", "welcomePage.others": "altri", "welcomePage.colorTheme": "Tema colori", "welcomePage.colorThemeDescription": "Tutto quel che serve per configurare editor e codice nel modo desiderato", + "welcomePage.learn": "Impara", "welcomePage.showCommands": "Trova ed esegui tutti i comandi", - "welcomePage.showCommandsDescription": "Accesso e ricerca rapida di comandi dal pannello di controllo ({0})", "welcomePage.interfaceOverview": "Panoramica dell'interfaccia", "welcomePage.interfaceOverviewDescription": "Immagine in sovrimpressione che evidenzia i principali componenti dell'interfaccia utente", "welcomePage.interactivePlayground": "Playground interattivo", diff --git a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index 20dd0cb2b010c..915868bb161b9 100644 --- a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbenchConfigurationTitle": "Area di lavoro", - "welcomePage.enabled": "Se è abilitata, visualizzerà la pagina Benvenuti all'avvio.", "help": "Guida" } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 01f19048853a9..d5b9daf31033e 100644 --- a/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -4,17 +4,35 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "workbenchConfigurationTitle": "Area di lavoro", + "welcomePage.enabled": "Se è abilitata, visualizzerà la pagina Benvenuti all'avvio.", "welcomePage": "Benvenuti", + "welcomePage.javaScript": "JavaScript", "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", "welcomePage.vim": "Vim", "welcomePage.sublime": "Sublime", "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "Il supporto per {0} è già installato.", + "welcomePage.willReloadAfterInstallingExtensionPack": "La finestra verrà ricaricata dopo l'installazione di supporto aggiuntivo per {0}.", + "welcomePage.installingExtensionPack": "Installazione di supporto aggiuntivo per {0} in corso...", + "welcomePage.extensionPackNotFound": "Il supporto per {0} con ID {1} non è stato trovato.", "welcomePage.keymapAlreadyInstalled": "I tasti di scelta rapida di {0} sono già installati.", "welcomePage.willReloadAfterInstallingKeymap": "La finestra verrà ricaricata dopo l'installazione dei tasti di scelta rapida di {0}.", "welcomePage.installingKeymap": "Installazione dei tasti di scelta rapida di {0}...", "welcomePage.keymapNotFound": "I tasti di scelta rapida di {0} con ID {1} non sono stati trovati.", "welcome.title": "Benvenuti", + "welcomePage.openFolderWithPath": "Apri la cartella {0} con percorso {1}", + "welcomePage.extensionListSeparator": ",", + "welcomePage.installKeymap": "Installa mappatura tastiera {0}", + "welcomePage.installExtensionPack": "Installa supporto aggiuntivo per {0}", + "welcomePage.installedKeymap": "Mappatura tastiera {0} è già installata", + "welcomePage.installedExtensionPack": "Il supporto {0} è già installato", "ok": "OK", - "cancel": "Annulla" + "details": "Dettagli", + "cancel": "Annulla", + "welcomePage.buttonBackground": "Colore di sfondo dei pulsanti nella pagina di benvenuto.", + "welcomePage.buttonHoverBackground": "Colore di sfondo al passaggio del mouse dei pulsanti nella pagina di benvenuto." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/ita/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index e40df93be8dd2..1ee1f44cc1d83 100644 --- a/i18n/ita/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/ita/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "walkThrough.unboundCommand": "non associato", - "walkThrough.gitNotFound": "Sembra che GIT non sia installato nel sistema." + "walkThrough.gitNotFound": "Sembra che GIT non sia installato nel sistema.", + "walkThrough.embeddedEditorBackground": "Colore di sfondo degli editor incorporati nel playground interattivo." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 2c3dacb4148e7..4566b1bcc6f46 100644 --- a/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/ita/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -12,5 +12,6 @@ "errorNoWorkspaceOpened": "Impossibile scrivere nelle impostazioni perché nessuna cartella è aperta. Si prega di aprire una cartella e riprovare.", "errorInvalidConfiguration": "Impossibile scrivere nelle impostazioni. Si prega di aprire **Impostazioni utente** per correggere eventuali errori o avvisi nel file e riprovare.", "errorInvalidConfigurationWorkspace": "Impossibile scrivere in impostazioni. Si prega di aprire **Impostazioni area di lavoro** per correggere eventuali errori o avvisi nel file e riprovare.", - "errorConfigurationFileDirty": "Impossibile scrivere nelle impostazioni perché il file è stato modificato ma non salvato. Si prega di salvare il file **impostazioni utente** e riprovare." + "errorConfigurationFileDirty": "Impossibile scrivere nelle impostazioni perché il file è stato modificato ma non salvato. Si prega di salvare il file **impostazioni utente** e riprovare.", + "errorConfigurationFileDirtyWorkspace": "Non è possibile scrivere in impostazioni perché il file è stato modificato ma non salvato. Salvare il file delle **Impostazioni area di lavoro** e riprovare." } \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/ita/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..f3982be9f88ef --- /dev/null +++ b/i18n/ita/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetria", + "telemetry.enableCrashReporting": "Consente l'invio di segnalazioni di arresto anomalo del sistema a Microsoft.\nPer rendere effettiva questa opzione, è necessario riavviare." +} \ No newline at end of file diff --git a/i18n/ita/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/ita/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/ita/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/git/package.i18n.json b/i18n/jpn/extensions/git/package.i18n.json index 1c27e31a01c5f..f71d3d2ced639 100644 --- a/i18n/jpn/extensions/git/package.i18n.json +++ b/i18n/jpn/extensions/git/package.i18n.json @@ -32,7 +32,7 @@ "command.push": "プッシュ", "command.pushTo": "プッシュ先...", "command.sync": "同期", - "command.publish": "公開", + "command.publish": "ブランチの発行", "command.showOutput": "Git 出力の表示", "config.enabled": "Git が有効になっているかどうか", "config.path": "Git 実行可能ファイルのパス", diff --git a/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json index 8b6ad71cd4e6d..e4f0ccc6045ab 100644 --- a/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/jpn/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "acceptCurrentChange": "現在の変更を取り込む", + "acceptIncomingChange": "入力側の変更を取り込む", + "acceptBothChanges": "両方の変更を取り込む", + "compareChanges": "変更の比較" +} \ No newline at end of file diff --git a/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json index d435e6965b34c..aa976005ee9e2 100644 --- a/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/jpn/extensions/merge-conflict/out/commandHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "cursorNotInConflict": "エディターのカーソルがマージの競合の範囲内にありません", + "compareChangesTitle": "{0}: 現在の変更 ⟷ 入力側の変更", "cursorOnSplitterRange": "エディターのカーソルがマージ コンフリクトのスプリッター内にあります。”現在” または \"入力側\" のいずれかのブロックに移動してください", "noConflicts": "このファイルにマージの競合は存在しません", "noOtherConflictsInThisFile": "このファイルに他のマージの競合は存在しません" diff --git a/i18n/jpn/extensions/merge-conflict/package.i18n.json b/i18n/jpn/extensions/merge-conflict/package.i18n.json index e2adf2620637f..3a6930d38af31 100644 --- a/i18n/jpn/extensions/merge-conflict/package.i18n.json +++ b/i18n/jpn/extensions/merge-conflict/package.i18n.json @@ -5,7 +5,15 @@ // Do not edit this file. It is machine generated. { "command.category": "マージの競合", + "command.accept.all-incoming": "入力側のすべてを取り込む", + "command.accept.all-both": "両方をすべて取り込む", + "command.accept.current": "現在の方を取り込む", + "command.accept.incoming": "入力側を取り込む", + "command.accept.selection": "選択項目を取り込む", "command.accept.both": "両方を取り込む", + "command.next": "次の競合", + "command.previous": "前の競合", + "command.compare": "現在の競合を比較", "config.title": "マージの競合", "config.codeLensEnabled": "エディター内のマージ競合ブロックで CodeLens を有効/無効にします", "config.decoratorsEnabled": "エディター内でマージの競合デコレーターを有効/無効にします。" diff --git a/i18n/jpn/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/jpn/extensions/typescript/out/features/bufferSyncSupport.i18n.json index 01e33938ce2b0..4df0b825c7669 100644 --- a/i18n/jpn/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/jpn/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "グローバルな tsc ({0}) と VS Code の言語サービス ({1}) の間にバージョンの不一致があります。非整合のコンパイル エラーを引き起こす可能性があります", "moreInformation": "詳細情報", "doNotCheckAgain": "今後確認しない", "close": "閉じる", diff --git a/i18n/jpn/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/jpn/extensions/typescript/out/utils/projectStatus.i18n.json index 2b687b8f1c532..9cd627a0d907a 100644 --- a/i18n/jpn/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/jpn/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "プロジェクト全体の JavaScript/TypeScript 言語機能を有効にするには、多数のファイルが含まれるフォルダーを除外します。例: {0}", "hintExclude.generic": "プロジェクト全体の JavaScript/TypeScript 言語機能を有効にするには、作業していないソース ファイルが含まれるサイズの大きなフォルダーを除外します。", - "open": "除外の構成", "large.label": "除外の構成", "hintExclude.tooltip": "プロジェクト全体の JavaScript/TypeScript 言語機能を有効にするには、作業していないソース ファイルが含まれるサイズの大きなフォルダーを除外します。" } \ No newline at end of file diff --git a/i18n/jpn/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/jpn/extensions/typescript/out/utils/typingsStatus.i18n.json index 3a40c2e29d9d1..1f1eb703bd6b7 100644 --- a/i18n/jpn/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/jpn/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "より適した TypeScript IntelliSense に関するデータをフェッチしています", + "typesInstallerInitializationFailed.title": "JavaScript 言語機能のための型定義ファイルをインストールできませんでした。NPM のインストールを確認するか、ユーザー設定で 'typescript.npm' を構成してください", "typesInstallerInitializationFailed.moreInformation": "詳細情報", "typesInstallerInitializationFailed.doNotCheckAgain": "今後確認しない", "typesInstallerInitializationFailed.close": "閉じる" diff --git a/i18n/jpn/extensions/typescript/package.i18n.json b/i18n/jpn/extensions/typescript/package.i18n.json index 9f60798218f32..dcf8478a4d659 100644 --- a/i18n/jpn/extensions/typescript/package.i18n.json +++ b/i18n/jpn/extensions/typescript/package.i18n.json @@ -13,7 +13,6 @@ "typescript.check.tscVersion": "グローバル インストール TypeScript コンパイラ (tsc など) が、使用された TypeScript 言語サービスと異なっているかどうかを確認します。", "typescript.tsserver.log": "ファイルへの TS サーバーのログを有効にします。このログは TS サーバーの問題を診断するために使用できます。ログには、プロジェクトのファイルパス、ソースコード、その他の潜在的に機密性の高い情報が含まれている場合があります。", "typescript.tsserver.trace": "TS サーバーに送信されるメッセージのトレースを有効にします。このトレースは TS サーバーの問題を診断するために使用できます。トレースには、プロジェクトのファイルパス、ソースコード、その他の潜在的に機密性の高い情報が含まれている場合があります。", - "typescript.tsserver.experimentalAutoBuild": "試験的な自動ビルドを有効にします。1.9 dev または 2.x tsserver バージョンと、変更後に VS Code の再起動が必要です。", "typescript.validate.enable": "TypeScript の検証を有効/無効にします。", "typescript.format.enable": "既定の TypeScript フォーマッタを有効/無効にします。", "javascript.format.enable": "既定の JavaScript フォーマッタを有効/無効にします。", @@ -41,6 +40,8 @@ "typescript.selectTypeScriptVersion.title": "TypeScript のバージョンの選択", "jsDocCompletion.enabled": " 自動 JSDoc コメントを有効/無効にします", "javascript.implicitProjectConfig.checkJs": "JavaScript ファイルのセマンティック チェックを有効/無効にします。既存の jsconfi.json や tsconfi.json ファイルの設定はこれより優先されます。TypeScript は 2.3.1 以上である必要があります。", + "typescript.npm": "型定義の自動取得に使用される NPM 実行可能ファイルへのパスを指定します。TypeScript 2.3.4 以上が必要です。", + "typescript.check.npmIsInstalled": "型定義の自動取得に NPM がインストールされているかどうかを確認します。", "javascript.nameSuggestions": "JavaScript の候補リスト内でファイルから一意の名前を含むかどうかを有効/無効にします。", "typescript.tsc.autoDetect": "tsc タスクの自動検出をオンにするかオフにするかを制御します。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index 15d556bd644e0..d00ceb129a0f4 100644 --- a/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/jpn/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "imgMeta": "{0}x{1} {2}", - "largeImageError": "イメージが大きすぎてエディターに表示できません。", + "largeImageError": "画像が非常に大きいため、エディターに表示されません。 ", "resourceOpenExternalButton": "外部のプログラムを使用して画像を開きますか?", "nativeBinaryError": "このファイルはバイナリか、非常に大きいか、またはサポートされていないテキスト エンコードを使用しているため、エディターに表示されません。", "sizeB": "{0}B", diff --git a/i18n/jpn/src/vs/base/common/errorMessage.i18n.json b/i18n/jpn/src/vs/base/common/errorMessage.i18n.json index d233c44582259..43574f420b29d 100644 --- a/i18n/jpn/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/jpn/src/vs/base/common/errorMessage.i18n.json @@ -13,6 +13,5 @@ "error.connection.unknown": "不明な接続エラーが発生しました。インターネット接続が切れたか、接続先のサーバーがオフラインです。", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "不明なエラーが発生しました。ログで詳細を確認してください。", - "nodeExceptionMessage": "システム エラーが発生しました ({0})", "error.moreErrors": "{0} (合計 {1} エラー)" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/base/common/keybindingLabels.i18n.json b/i18n/jpn/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/code/electron-main/menus.i18n.json b/i18n/jpn/src/vs/code/electron-main/menus.i18n.json index 541c16a930ca5..fb8e314eb0ccb 100644 --- a/i18n/jpn/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/jpn/src/vs/code/electron-main/menus.i18n.json @@ -133,11 +133,11 @@ "miColumnBreakpoint": "列のブレークポイント(&&O)", "miFunctionBreakpoint": "関数のブレークポイント(&&F)...", "miNewBreakpoint": "新しいブレークポイント(&&N)", + "miEnableAllBreakpoints": "すべてのブレークポイントを有効にする", "miDisableAllBreakpoints": "すべてのブレークポイントを無効にする(&&L)", "miRemoveAllBreakpoints": "すべてのブレークポイントを削除する(&&R)", "miInstallAdditionalDebuggers": "その他のデバッガーをインストールします(&&I)...", "mMinimize": "最小化", - "mClose": "閉じる", "mBringToFront": "すべてを前面に配置", "miToggleDevTools": "開発者ツールの切り替え(&&T)", "miAccessibilityOptions": "ユーザー補助オプション(&&O)", @@ -153,12 +153,14 @@ "miLicense": "ライセンスの表示(&&L)", "miPrivacyStatement": "プライバシーについて(&&P)", "miAbout": "バージョン情報(&&A)", + "miTerminateTask": "タスクの終了(&&T)", "accessibilityOptionsWindowTitle": "ユーザー補助オプション", "miRestartToUpdate": "更新のために再起動します...", "miCheckingForUpdates": "更新を確認しています...", "miDownloadUpdate": "利用可能な更新プログラムをダウンロードします", "miDownloadingUpdate": "更新をダウンロードしています...", "miInstallingUpdate": "更新プログラムをインストールしています...", + "miCheckForUpdates": "更新の確認...", "aboutDetail": "\nバージョン{0}\nコミット{1}\n日付{2}\nシェル{3}\nレンダラー{4}\nNode {5}", "okButton": "OK" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/code/electron-main/windows.i18n.json b/i18n/jpn/src/vs/code/electron-main/windows.i18n.json index 6631797b5a49c..6a230da6588c3 100644 --- a/i18n/jpn/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/jpn/src/vs/code/electron-main/windows.i18n.json @@ -13,9 +13,5 @@ "appStalled": "ウィンドウから応答がありません", "appStalledDetail": "ウィンドウを再度開くか、閉じるか、このまま待機できます。", "appCrashed": "ウィンドウがクラッシュしました", - "appCrashedDetail": "ご不便をおかけして申し訳ありません。ウィンドウを再度開いて、中断したところから続行できます。", - "newWindow": "新しいウィンドウ", - "newWindowDesc": "新しいウィンドウを開く", - "recentFolders": "最近使用したフォルダー", - "folderDesc": "{0} {1}" + "appCrashedDetail": "ご不便をおかけして申し訳ありません。ウィンドウを再度開いて、中断したところから続行できます。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json index 1fa006e9cb2c9..ffbae4db59c58 100644 --- a/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/jpn/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -21,6 +21,7 @@ "roundedSelection": "選択範囲の角を丸くするかどうかを制御します", "scrollBeyondLastLine": "エディターで最後の行を越えてスクロールするかどうかを制御します", "minimap.enabled": "ミニマップを表示するかどうかを制御します", + "minimap.showSlider": "ミニマップを自動的に非表示にするかどうかを制御します 。", "minimap.renderCharacters": "行に (カラー ブロックではなく) 実際の文字を表示します", "minimap.maxColumn": "表示するミニマップの最大幅を特定の桁数に制限します", "find.seedSearchStringFromSelection": "エディターの選択から検索ウィジェット内の検索文字列を与えるかどうかを制御します", @@ -33,12 +34,14 @@ "wordWrapColumn": "'editor.wordWrap' が 'wordWrapColumn' または 'bounded' の場合に、エディターの折り返し桁を制御します。", "wrappingIndent": "折り返し行のインデントを制御します。'none'、'same'、または 'indent' のいずれかを指定できます。", "mouseWheelScrollSensitivity": "マウス ホイール スクロール イベントの `deltaX` と `deltaY` で使用される乗数", + "multiCursorModifier.ctrlCmd": "Windows および Linux 上の `Control` と OSX 上の `Command` にマップします。", + "multiCursorModifier.alt": "Windows および Linux 上の `Alt` と OSX 上の `Option` にマップします。", + "multiCursorModifier": "マウスで複数のカーソルを追加するときに使用する修飾キーです。`ctrlCmd` は Windows および Linux 上の `Control` キーと OSX 上の `Command` キーにマップします。「定義に移動」や「リンクを開く」のマウス操作は、マルチカーソルの修飾キーと競合しないように適用されます。", "quickSuggestions.strings": "文字列内でクイック候補を有効にします。", "quickSuggestions.comments": "コメント内でクイック候補を有効にします。", "quickSuggestions.other": "文字列およびコメント外でクイック候補を有効にします。", "quickSuggestions": "入力中に候補を自動的に表示するかどうかを制御します", "quickSuggestionsDelay": "クイック候補が表示されるまでの待ち時間 (ミリ秒) を制御します", - "parameterHints": "パラメーター ヒントを有効にする", "autoClosingBrackets": "エディターで左角かっこの後に自動的に右角かっこを挿入するかどうかを制御します", "formatOnType": "エディターで入力後に自動的に行の書式設定を行うかどうかを制御します", "formatOnPaste": "貼り付けた内容がエディターにより自動的にフォーマットされるかどうかを制御します。フォーマッタを使用可能にする必要があります。また、フォーマッタがドキュメント内の範囲をフォーマットできなければなりません。", @@ -72,6 +75,10 @@ "trimAutoWhitespace": "自動挿入された末尾の空白を削除する", "stablePeek": "エディターのコンテンツをダブルクリックするか、Esc キーを押しても、ピーク エディターを開いたままにします。", "dragAndDrop": "ドラッグ アンド ドロップによる選択範囲の移動をエディターが許可する必要があるかどうかを制御します。", + "accessibilitySupport.auto": "エディターはスクリーン リーダーがいつ接続されたかを検出するためにプラットフォーム API を使用します。", + "accessibilitySupport.on": "エディターは永続的にスクリーン リーダー向けに最適化されます。", + "accessibilitySupport.off": "エディターはスクリーン リーダー向けに最適化されません。", + "accessibilitySupport": "エディターをスクリーン リーダーに最適化されたモードで実行するかどうかを制御します。", "sideBySide": "差分エディターが差分を横に並べて表示するか、行内に表示するかを制御します", "ignoreTrimWhitespace": "差分エディターが、先頭または末尾の空白の変更を差分として表示するかどうかを制御します。", "renderIndicators": "差分エディターが追加/削除された変更に +/- インジケーターを示すかどうかを制御します", diff --git a/i18n/jpn/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/jpn/src/vs/editor/common/config/editorOptions.i18n.json index 3fdfb4e461b96..be8d7821ab4ee 100644 --- a/i18n/jpn/src/vs/editor/common/config/editorOptions.i18n.json +++ b/i18n/jpn/src/vs/editor/common/config/editorOptions.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "accessibilityOffAriaLabel": "現在エディターにアクセスすることはできません。 Alt + F1 キーを押してオプションを選択します。", "editorViewAccessibleLabel": "エディターのコンテンツ" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/jpn/src/vs/editor/contrib/find/common/findController.i18n.json index 873ccff036a9b..f949479f38916 100644 --- a/i18n/jpn/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,5 @@ "addSelectionToPreviousFindMatch": "選んだ項目を前の一致項目に追加する", "moveSelectionToNextFindMatch": "最後に選択した項目を次の一致項目に移動", "moveSelectionToPreviousFindMatch": "最後に選んだ項目を前の一致項目に移動する", - "selectAllOccurencesOfFindMatch": "一致するすべての出現箇所を選択します", "changeAll.label": "すべての出現箇所を変更" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/jpn/src/vs/editor/contrib/format/browser/formatActions.i18n.json index d1fd1741e7486..6a613cb5b685b 100644 --- a/i18n/jpn/src/vs/editor/contrib/format/browser/formatActions.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -9,5 +9,5 @@ "hint1n": "Made 1 formatting edit between lines {0} and {1}", "hintnn": "Made {0} formatting edits between lines {1} and {2}", "formatDocument.label": "Format Document", - "formatSelection.label": "Format Selection" + "formatSelection.label": "選択範囲のフォーマット" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json b/i18n/jpn/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json index 989d71f385ba0..4fbcbda9f946f 100644 --- a/i18n/jpn/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json @@ -8,5 +8,6 @@ "markerAction.next.label": "次のエラーまたは警告へ移動", "markerAction.previous.label": "前のエラーまたは警告へ移動", "editorMarkerNavigationError": "エディターのマーカー ナビゲーション ウィジェットのエラーの色。", - "editorMarkerNavigationWarning": "エディターのマーカー ナビゲーション ウィジェットの警告の色。" + "editorMarkerNavigationWarning": "エディターのマーカー ナビゲーション ウィジェットの警告の色。", + "editorMarkerNavigationBackground": "エディターのマーカー ナビゲーション ウィジェットの背景。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 0e09eb3904df0..39b8edf5de2aa 100644 --- a/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/jpn/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "aria.oneReference": "列 {2} の {1} 行目に {0} つのシンボル", - "aria.fileReferences.1": "{0} に 1 個のシンボル", - "aria.fileReferences.N": "{1} に {0} 個のシンボル", "aria.result.0": "一致する項目はありません", "aria.result.1": "{0} に 1 個のシンボルが見つかりました", "aria.result.n1": "{1} に {0} 個のシンボルが見つかりました", diff --git a/i18n/jpn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/jpn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 5b2270de60407..36b95788727ff 100644 --- a/i18n/jpn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/jpn/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -21,6 +21,8 @@ "menus.scmTitle": "ソース管理のタイトル メニュー", "menus.resourceGroupContext": "ソース管理リソース グループのコンテキスト メニュー", "menus.resourceStateContext": "ソース管理リソース状態のコンテキスト メニュー", + "view.viewTitle": "提供されたビューのタイトル メニュー", + "view.itemContext": "提供されたビュー項目のコンテキスト メニュー", "nonempty": "空以外の値が必要です。", "opticon": "`icon` プロパティは省略できます。指定する場合には、文字列または `{dark, light}` などのリテラルにする必要があります", "requireStringOrObject": "`{0}` プロパティは必須で、`string` または `object` の型でなければなりません", diff --git a/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json b/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json index f63839a1d9b13..6cd2c2e4b34ac 100644 --- a/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json +++ b/i18n/jpn/src/vs/platform/environment/node/argv.i18n.json @@ -6,25 +6,25 @@ { "gotoValidation": "`--goto` モードの引数は `FILE(:LINE(:CHARACTER))` の形式にする必要があります。", "diff": "差分エディターを開きます。引数として 2 つのファイル パスを渡す必要があります。", - "goto": "指定の行と文字のパスのファイルを開きます (パスに :line[:character] を追加します)。", - "locale": "使用するロケール (例: en-US、zh-TW など)。", - "newWindow": "新しいコード インスタンスを強制します。", + "goto": "指定の行と文字の位置でファイルを開きます(パスに :line[:character] を追加してください)。", + "locale": "使用する国と地域 (例:en-US や zh-TW など)。", + "newWindow": "新しい Code のインスタンスを強制します。", "performance": "'Developer: Startup Performance' コマンドを有効にして開始します。", "prof-startup": "起動中に CPU プロファイラーを実行する", "reuseWindow": "最後のアクティブ ウィンドウにファイルまたはフォルダーを強制的に開きます。", "userDataDir": "ユーザー データを保持するディレクトリを指定します。ルートで実行している場合に役立ちます。", - "verbose": "詳細出力を印刷します (お待ちください)。", - "wait": "戻る前にウィンドウが閉じるまでお待ちください。", + "verbose": "詳細出力を表示します (--wait を含みます)。", + "wait": "現在のウィンドウが閉じるまで待機します。", "extensionHomePath": "拡張機能のルート パスを設定します。", "listExtensions": "インストールされている拡張機能を一覧表示します。", - "showVersions": "#NAME?", + "showVersions": "--list-extension と使用するとき、インストールされている拡張機能のバージョンを表示します。", "installExtension": "拡張機能をインストールします。", "uninstallExtension": "拡張機能をアンインストールします。", "experimentalApis": "拡張機能に対して Proposed API 機能を有効にします。", "disableExtensions": "インストールされたすべての拡張機能を無効にします。", "disableGPU": "GPU ハードウェア アクセラレータを無効にします。", - "version": "バージョンを印刷します。", - "help": "使用法を印刷します。", + "version": "バージョンを表示します。", + "help": "使用法を表示します。", "usage": "使用法", "options": "オプション", "paths": "パス", diff --git a/i18n/jpn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/jpn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index ae0dfa88edb83..38e5bf8d7a177 100644 --- a/i18n/jpn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/jpn/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "このパッケージで表される VS Code 拡張機能のすべてのコントリビューション。", "vscode.extension.preview": "Marketplace で Preview としてフラグが付けられるように拡張機能を設定します。", "vscode.extension.activationEvents": "VS Code 拡張機能のアクティブ化イベント。", + "vscode.extension.activationEvents.onLanguage": "指定された言語を解決するファイルが開かれるたびにアクティブ化イベントが発行されます。", + "vscode.extension.activationEvents.onCommand": "指定したコマンドが呼び出されるたびにアクティブ化イベントが発行されます。", + "vscode.extension.activationEvents.onDebug": "指定されたタイプのデバッグ セッションが開始されるたびにアクティブ化イベントが発行されます。", + "vscode.extension.activationEvents.workspaceContains": "指定した glob パターンに一致するファイルを少なくとも 1 つ以上含むフォルダーを開くたびにアクティブ化イベントが発行されます。", + "vscode.extension.activationEvents.onView": "指定したビューを展開するたびにアクティブ化イベントが発行されます。", + "vscode.extension.activationEvents.star": "VS Code 起動時にアクティブ化イベントを発行します。優れたエンドユーザー エクスペリエンスを確保するために、他のアクティブ化イベントの組み合わせでは望む動作にならないときのみ使用してください。", "vscode.extension.badges": "Marketplace の拡張機能ページのサイドバーに表示されるバッジの配列。", "vscode.extension.badges.url": "バッジのイメージ URL。", "vscode.extension.badges.href": "バッジのリンク。", diff --git a/i18n/jpn/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/jpn/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..da8dfc2d76350 --- /dev/null +++ b/i18n/jpn/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "新しいウィンドウ", + "newWindowDesc": "新しいウィンドウを開く", + "recentFolders": "最近使用したフォルダー", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json index df4f3d19acde8..7d46ebd0c9b1a 100644 --- a/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/jpn/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -52,9 +52,9 @@ "ProblemMatcherSchema.watching.activeOnStart": "true に設定すると、タスクの開始時にウォッチャーがアクティブ モードになります。これは beginPattern と一致する行の発行と同等です。", "ProblemMatcherSchema.watching.beginsPattern": "出力内で一致すると、ウォッチ中のタスクの開始が通知されます。", "ProblemMatcherSchema.watching.endsPattern": "出力内で一致すると、ウォッチ中のタスクの終了が通知されます。", - "LegacyProblemMatcherSchema.watchedBegin.deprecated": "This property is deprecated. Use the watching property instead.", + "LegacyProblemMatcherSchema.watchedBegin.deprecated": "このプロパティは非推奨です。代わりに watching プロパティをご使用ください。", "LegacyProblemMatcherSchema.watchedBegin": "ファイル ウォッチでトリガーされた ウォッチ対象タスクの実行が開始されたことを伝達する正規表現。", - "LegacyProblemMatcherSchema.watchedEnd.deprecated": "This property is deprecated. Use the watching property instead.", + "LegacyProblemMatcherSchema.watchedEnd.deprecated": "このプロパティは非推奨です。代わりに watching プロパティをご使用ください。", "LegacyProblemMatcherSchema.watchedEnd": "ウォッチ対象タスクの実行が終了したことを伝達する正規表現。", "NamedProblemMatcherSchema.name": "問題マッチャーの名前。", "ProblemMatcherExtPoint": "問題マッチャーを提供" diff --git a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json index 8da89f6115cfe..a8865bcfa0d43 100644 --- a/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/jpn/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -12,7 +12,7 @@ "focusBorder": "フォーカスされた要素の境界線全体の色。この色はコンポーネントによって上書きされていない場合にのみ使用されます。", "contrastBorder": "コントラストを強めるために、他の要素と隔てる追加の境界線。", "activeContrastBorder": "コントラストを強めるために、アクティブな他要素と隔てる追加の境界線。", - "selectionBackground": "ワークベンチ内のテキスト選択の背景色 (例: 入力フィールドやテキストエリア)。エディター内やターミナル内の選択には適用されないことに注意してください。", + "selectionBackground": "ワークベンチ内のテキスト選択の背景色 (例: 入力フィールドやテキストエリア)。エディター内の選択には適用されないことに注意してください。", "textSeparatorForeground": "テキストの区切り文字の色。", "textLinkForeground": "テキスト内のリンクの前景色。", "textLinkActiveForeground": "テキスト内のアクティブなリンクの前景色。", @@ -60,6 +60,7 @@ "editorBackground": "エディターの背景色。", "editorForeground": "エディターの既定の前景色。", "editorWidgetBackground": "検索/置換窓など、エディター ウィジェットの背景色。", + "editorWidgetBorder": "エディター ウィジェットの境界線色。ウィジェットに境界線があり、ウィジェットによって配色を上書きされていない場合でのみこの配色は使用されます。", "editorSelection": "エディターの選択範囲の色。", "editorInactiveSelection": "非アクティブなエディターの選択範囲の色。", "editorSelectionHighlight": "選択範囲と同じコンテンツの領域の色。", @@ -73,5 +74,12 @@ "diffEditorInserted": "挿入されたテキストの背景色。", "diffEditorRemoved": "削除されたテキストの背景色。", "diffEditorInsertedOutline": "挿入されたテキストの輪郭の色。", - "diffEditorRemovedOutline": "削除されたテキストの輪郭の色。" + "diffEditorRemovedOutline": "削除されたテキストの輪郭の色。", + "mergeCurrentHeaderBackground": "行内マージ競合の現在のヘッダー背景色。", + "mergeCurrentContentBackground": "行内マージ競合の現在のコンテンツ背景色。", + "mergeIncomingHeaderBackground": "行内マージ競合の入力側ヘッダー背景色。", + "mergeIncomingContentBackground": "行内マージ競合の入力側コンテンツ背景色。", + "mergeBorder": "行内マージ競合のヘッダーとスプリッターの境界線の色。", + "overviewRulerCurrentContentForeground": "行内マージ競合の現在の概要ルーラー前景色。", + "overviewRulerIncomingContentForeground": "行内マージ競合の入力側の概要ルーラー前景色。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/jpn/src/vs/workbench/api/node/extHostTask.i18n.json index 8b6ad71cd4e6d..4b90a12aaf247 100644 --- a/i18n/jpn/src/vs/workbench/api/node/extHostTask.i18n.json +++ b/i18n/jpn/src/vs/workbench/api/node/extHostTask.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/jpn/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index ad17b1a0a2c45..b9c158c07866f 100644 --- a/i18n/jpn/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "アクティビティ バーを非表示にする", - "activityBarAriaLabel": "アクティブなビュー スイッチャー" + "activityBarAriaLabel": "アクティブなビュー スイッチャー", + "globalActions": "グローバル操作" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/jpn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 2b2a554b6dbdb..b0d78c01023b3 100644 --- a/i18n/jpn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -10,8 +10,7 @@ "multiSelection": "{0} 個の選択項目", "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", - "tabFocusModeEnabled": "タブによるフォーカスの移動", - "screenReaderDetected": "スクリーン リーダーが検出されました", + "screenReaderDetectedExtra": "スクリーン リーダーを使用しない場合、`editor.accessibilitySupport` を \"off\" にしてください。", "disableTabMode": "アクセシビリティ モードを無効にする", "gotoLine": "行へ移動", "indentation": "インデント", diff --git a/i18n/jpn/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/jpn/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..b1dcfefa58e6c --- /dev/null +++ b/i18n/jpn/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "ファイルに移動...", + "quickNavigateNext": "Quick Open で次に移動", + "quickNavigatePrevious": "Quick Open で前に移動", + "quickSelectNext": "Quick Open で [次へ] を選択", + "quickSelectPrevious": "Quick Open で [前へ] を選択" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/browser/quickopen.i18n.json b/i18n/jpn/src/vs/workbench/browser/quickopen.i18n.json index 715d0b6fb8033..b598142bc87f2 100644 --- a/i18n/jpn/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "一致する結果はありません", "noResultsFound2": "一致する項目はありません", - "entryAriaLabel": "{0}、コマンド", - "noCommands": "一致するコマンドはありません" + "entryAriaLabel": "{0}、コマンド" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/browser/viewlet.i18n.json b/i18n/jpn/src/vs/workbench/browser/viewlet.i18n.json index e44e917c23baa..cd69288971a77 100644 --- a/i18n/jpn/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/jpn/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "すべて折りたたむ", - "viewToolbarAriaLabel": "{0} 個のアクション" + "collapse": "すべて折りたたむ" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/common/theme.i18n.json b/i18n/jpn/src/vs/workbench/common/theme.i18n.json index 26f43afd10773..89788c6658b83 100644 --- a/i18n/jpn/src/vs/workbench/common/theme.i18n.json +++ b/i18n/jpn/src/vs/workbench/common/theme.i18n.json @@ -7,12 +7,17 @@ "tabActiveBackground": "アクティブ タブの背景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", "tabInactiveBackground": "非アクティブ タブの背景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", "tabBorder": "タブ同士を分けるための境界線。タブはエディター領域内にあるエディターのコンテナーです。複数のタブを 1 つのエディター グループで開くことができます。複数のエディター グループがある可能性があります。", + "tabActiveForeground": "アクティブ グループ内のアクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", + "tabInactiveForeground": "アクティブ グループ内の非アクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", + "tabUnfocusedActiveForeground": "非アクティブ グループ内のアクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", + "tabUnfocusedInactiveForeground": "非アクティブ タブの前景色。タブはエディター領域におけるエディターのコンテナーです。1 つのエディター グループで複数のタブを開くことができます。エディター グループを複数にすることもできます。", "editorGroupBackground": "エディター グループの背景色。エディター グループはエディターのコンテナーです。背景色はエディター グループをドラッグすると表示されます。", "tabsContainerBackground": "タブが有効な場合の エディター グループ タイトル ヘッダーの背景色。エディター グループはエディターのコンテナーです。", "tabsContainerBorder": "タブが有効な場合の エディター グループ タイトル ヘッダーの境界線色。エディター グループはエディターのコンテナーです。", "editorGroupHeaderBackground": "タブが無効な場合の エディター グループ タイトル ヘッダーの背景色。エディター グループはエディターのコンテナーです。", "editorGroupBorder": "複数のエディター グループを互いに分離するための色。エディター グループはエディターのコンテナーです。", "editorDragAndDropBackground": "エディターの周囲をドラッグしているときの背景色。エディターのコンテンツが最後まで輝くために、色は透過である必要があります。", + "panelBackground": "パネルの背景色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelBorder": "エディターとの区切りを示すパネル上部の罫線の色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelActiveTitleForeground": "アクティブ パネルのタイトルの色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", "panelInactiveTitleForeground": "非アクティブ パネルのタイトルの色。パネルはエディター領域の下に表示され、出力や統合ターミナルなどのビューを含みます。", diff --git a/i18n/jpn/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/actions.i18n.json index 854573811104d..ab86da5259e0d 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "エディターを閉じる", "closeWindow": "ウィンドウを閉じる", - "switchWindow": "切り替えウィンドウ", - "switchWindowPlaceHolder": "ウィンドウの選択", - "current": "現在のウィンドウ", "closeFolder": "フォルダーを閉じる", "noFolderOpened": "このインスタンスで現在開いているフォルダーがないので、閉じられません。", "newWindow": "新しいウィンドウ", @@ -20,7 +17,7 @@ "zoomReset": "ズームのリセット", "appPerf": "スタートアップ パフォーマンス", "reloadWindow": "ウィンドウの再読み込み", - "openRecent": "最近開いた項目", + "current": "現在のウィンドウ", "folders": "フォルダー", "files": "ファイル", "openRecentPlaceHolderMac": "パスを選択 (Cmd キーを押しながら新しいウィンドウで開く)", @@ -32,10 +29,6 @@ "openDocumentationUrl": "ドキュメント", "openIntroductoryVideosUrl": "紹介ビデオ", "toggleSharedProcess": "共有プロセスを切り替える", - "navigateLeft": "左のビュー部分に移動", - "navigateRight": "右のビュー部分に移動", - "navigateUp": "上のビュー部分に移動", - "navigateDown": "下のビュー部分に移動", "increaseViewSize": "現在のビューのサイズの拡大", "decreaseViewSize": "現在のビューのサイズの縮小" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json index d813d5f6c23c6..38a801fbf9bfb 100644 --- a/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -31,10 +31,6 @@ "window.openFoldersInNewWindow.off": "フォルダーは、最後のアクティブ ウィンドウで開きます", "window.openFoldersInNewWindow.default": "フォルダーがアプリケーション内から (たとえば、[ファイル] メニューから) 選択された場合を除いて、新しいウィンドウでフォルダーを開きます", "openFoldersInNewWindow": "フォルダーを新しいウィンドウで開くか、最後のアクティブ ウィンドウで開くかを制御します。\n- default: アプリケーション内で ([ファイル] メニューなどから) 選択したものでなければ、新しいウィンドウでフォルダーを開く\n- on: 新しいウィンドウでフォルダーを開く\n- off: 最後のアクティブ ウィンドウでフォルダーを開く\nこの設定は無視される場合もあります (-new-window または -reuse-window コマンド ライン オプションを使用する場合など)。", - "window.reopenFolders.none": "フォルダーを再度開きません。", - "window.reopenFolders.one": "最後にアクティブだったフォルダーを再び開きます。", - "window.reopenFolders.all": "最後のセッションの全フォルダーを再び開きます。", - "reopenFolders": "再起動後にフォルダーを再度開く方法を制御します。'none' を選択するとフォルダーを再度開くことはありません。'one' を選択すると最後に作業したフォルダーを再度開きます。'all' を選択すると前回のセッションのフォルダーすべてを再度開きます。", "restoreFullscreen": "全画面表示モードで終了した場合に、ウィンドウを全画面表示モードに復元するかどうかを制御します。", "zoomLevel": "ウィンドウのズーム レベルを調整します。元のサイズは 0 で、1 つ上げるごとに (1 など) 20% ずつ拡大することを表し、1 つ下げるごとに (-1 など) 20% ずつ縮小することを表します。小数点以下の桁数を入力して、さらに細かくズーム レベルを調整することもできます。", "title": "アクティブなエディターに基づいてウィンドウのタイトルを制御します。変数は、コンテキストに基づいて置換されます:\n${activeEditorShort}: 例: myFile.txt\n${activeEditorMedium}: 例: myFolder/myFile.txt\n${activeEditorLong}: 例: /Users/Development/myProject/myFolder/myFile.txt\n${rootName}: 例: myProject\n${rootPath}: 例: /Users/Development/myProject\n${appName}: 例: VS Code\n${dirty}: アクティブなエディターがダーティである場合のダーティ インジケーター\n${separator}: 値のある変数で囲まれた場合にのみ表示される条件付き区切り記号 (\" - \")", @@ -58,5 +54,7 @@ "zenMode.hideTabs": "Zen Mode をオンにしたときにワークベンチ タブも非表示にするかどうかを制御します。", "zenMode.hideStatusBar": "Zen Mode をオンにするとワークベンチの下部にあるステータス バーを非表示にするかどうかを制御します。", "zenMode.hideActivityBar": "Zen Mode をオンにするとワークベンチの左側にあるアクティビティ バーを非表示にするかを制御します。", - "zenMode.restore": "Zen Mode で終了したウィンドウを Zen Mode に復元するかどうかを制御します。" + "zenMode.restore": "Zen Mode で終了したウィンドウを Zen Mode に復元するかどうかを制御します。", + "workspaceConfigurationTitle": "ワークスペース", + "files.exclude.boolean": "ファイル パスの照合基準となる glob パターン。これを true または false に設定すると、パターンがそれぞれ有効/無効になります。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..1c53dd86bdd77 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "現在 `editor.accessibilitySupport` 設定を 'on' に変更しています。", + "openingDocs": "現在 VS Code のアクセシビリティ ドキュメントページを開いています。", + "introMsg": "VS Code のアクセシビリティ オプションをご利用いただき、ありがとうございます。", + "status": "ステータス:", + "changeConfigToOnMac": "スクリーン リーダーで使用するためにエディターを永続的に最適化するように設定するには、Command + E を押してください。", + "changeConfigToOnWinLinux": "スクリーン リーダーで使用するためにエディターを永続的に最適化するように設定するには、Control + E を押してください。", + "auto_unknown": "エディターは、プラットフォーム API を使用してスクリーン リーダーがいつ接続されたかを検出するように設定されていますが、現在のランタイムはこれをサポートしていません。", + "auto_on": "エディターはスクリーン リーダーの接続を自動検出しました。", + "auto_off": "エディターは、スクリーン リーダーが接続されると自動的に検出するように構成されていますが、今回は検出できませんでした。", + "configuredOn": "エディターはスクリーン リーダーで使用するために永続的に最適化されるように設定されています。これは `editor.accessibilitySupport` の設定を編集することで変更できます。", + "configuredOff": "エディターはスクリーン リーダー向けに最適化しないように構成されています。", + "tabFocusModeOnMsg": "現在のエディターで Tab キーを押すと、次のフォーカス可能な要素にフォーカスを移動します。{0} を押すと、この動作が切り替わります。", + "tabFocusModeOnMsgNoKb": "現在のエディターで Tab キーを押すと、次のフォーカス可能な要素にフォーカスを移動します。コマンド {0} は、キー バインドでは現在トリガーできません。", + "tabFocusModeOffMsg": "現在のエディターで Tab キーを押すと、タブ文字が挿入されます。{0} を押すと、この動作が切り替わります。", + "tabFocusModeOffMsgNoKb": "現在のエディターで Tab キーを押すと、タブ文字が挿入されます。コマンド {0} は、キー バインドでは現在トリガーできません。", + "openDocMac": "command + H キーを押して、ブラウザー ウィンドウを今すぐ開き、アクセシビリティに関連する他の VS Code 情報を確認します。", + "openDocWinLinux": "Ctrl + H キーを押して、ブラウザー ウィンドウを今すぐ開き、アクセシビリティに関連する他の VS Code 情報を確認します。", + "outroMsg": "Esc キー か Shift+Esc を押すと、ヒントを消してエディターに戻ることができます。", + "ShowAccessibilityHelpAction": "アクセシビリティのヘルプを表示します" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..3b84ee3fdb42e --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "マルチ カーソルの修飾キーを切り替える" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json index fc8e32566a5a5..e6c7a195a3d9d 100644 --- a/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json @@ -5,16 +5,12 @@ // Do not edit this file. It is machine generated. { "variablesSection": "変数セクション", - "variables": "変数", "variablesAriaTreeLabel": "変数のデバッグ", "expressionsSection": "式セクション", - "watch": "ウォッチ式", "watchAriaTreeLabel": "ウォッチ式のデバッグ", "callstackSection": "コール スタック セクション", "debugStopped": "{0} で一時停止", - "callStack": "コール スタック", "callStackAriaLabel": "コール スタックのデバッグ", "breakpointsSection": "ブレークポイント セクション", - "breakpoints": "ブレークポイント", "breakpointsAriaTreeLabel": "デバッグ ブレークポイント" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index cf9dccd3bbde3..188f2a3567373 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "previousEditPoint": "Emmet: 前の編集点", - "nextEditPoint": "Emmet: 次の編集点" + "previousEditPoint": "Emmet: 前の編集点に移動する", + "nextEditPoint": "Emmet: 次の編集点に移動する" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index f8b16e8c78d6f..470a456bc9d8f 100644 --- a/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -9,5 +9,6 @@ "emmetPreferences": "Emmet の一部のアクションやリゾルバーの動作の変更に使用される基本設定。", "emmetSyntaxProfiles": "指定した構文に対してプロファイルを定義するか、特定の規則がある独自のプロファイルをご使用ください。", "emmetExclude": "emmet 省略記法を展開すべきでない言語の配列。", - "emmetExtensionsPath": "Emmet のプロファイル、スニペット、基本設定を含むフォルダーへのパス" + "emmetExtensionsPath": "Emmet のプロファイル、スニペット、基本設定を含むフォルダーへのパス", + "useNewEmmet": "すべての emmet 機能に対して、新しい emmet モジュールをお試しください (最終的に、以前の単一 emmet ライブラリは置き換えられます)。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 078b21ede6a22..631dbad18af1e 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,10 @@ "default": "既定", "debuggers": "デバッガー ({0})", "debugger name": "名前", + "views": "ビュー ({0})", + "view id": "ID", + "view name": "名前", + "view location": "場所", "themes": "テーマ ({0})", "JSON Validation": "JSON 検証 ({0})", "commands": "コマンド ({0})", diff --git a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 51044b7942e95..d37634ee4857c 100644 --- a/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -27,11 +27,11 @@ "updateAll": "すべての拡張機能を更新します", "reloadAction": "再読み込み", "postUpdateTooltip": "再読み込みして更新する", - "postUpdateMessage": "このウィンドウを再度読み込んで、更新済みの拡張機能 '{0}' をアクティブ化しますか?", - "postEnableTooltip": "再度読み込んでアクティブにする", + "postUpdateMessage": "このウィンドウを再読み込みして、更新済みの拡張機能 '{0}' をアクティブ化しますか?", + "postEnableTooltip": "再読み込みしてアクティブにする", "postEnableMessage": "このウィンドウを再度読み込んで、拡張機能 '{0}' をアクティブ化しますか?", - "postDisableTooltip": "読み込んで非アクティブ化する", - "postDisableMessage": "このウィンドウを再度読み込んで、拡張機能 '{0}' を非アクティブ化しますか?", + "postDisableTooltip": "再読み込みして非アクティブ化する", + "postDisableMessage": "このウィンドウを再読み込みして、拡張機能 '{0}' を非アクティブ化しますか?", "postUninstallTooltip": "再読み込みして非アクティブ化する", "postUninstallMessage": "このウィンドウを再度読み込んで、アンインストール済みの拡張機能 '{0}' を非アクティブ化しますか?", "reload": "ウィンドウの再読み込み(&&R)", diff --git a/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index a23d7187ba270..5d17c064fd1dd 100644 --- a/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -28,7 +28,6 @@ "watcherExclude": "ファイル モニタリングから除外するファイル パスの glob パターンを構成します。この設定を変更すると、再起動が必要になります。始動時に Code が消費する CPU 時間が多い場合は、大規模なフォルダーを除外して初期ロードを減らせます。", "hotExit.off": "Hot Exit を無効にします。", "hotExit.onExit": "アプリケーションが閉じると (Windows/Linux で最後のウィンドウが閉じるとき、または workbench.action.quit コマンドがトリガーされるとき (コマンド パレット、キー バインド、メニュー))、Hot Exit がトリガーされます。バックアップされているすべてのウィンドウは、次の起動時に復元されます。", - "hotExit.onExitAndWindowClose": "アプリケーションが閉じると (Windows/Linux で最後のウィンドウが閉じるとき、または workbench.action.quit コマンドがトリガーするとき (コマンド パレット、キー バインド、メニュー))、Hot Exit がトリガーされます。また、フォルダーが開かれているウィンドウについても、それが最後のウィンドウかどうかに関係なく、Hot Exit がトリガーされます。フォルダーが開かれていないウィンドウはすべて、次回の起動時に復元されます。フォルダーのウィンドウをシャットダウン前と同じ状態に復元するには、\"window.reopenFolders\" を \"all\" に設定します。", "hotExit": "エディターを終了するときに保存を確認するダイアログを省略し、保存されていないファイルをセッション後も保持するかどうかを制御します。", "defaultLanguage": "新しいファイルに割り当てられる既定の言語モード。", "editorConfigurationTitle": "エディター", diff --git a/i18n/jpn/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index b6fe55337f3cd..6caca19da4427 100644 --- a/i18n/jpn/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -5,7 +5,5 @@ // Do not edit this file. It is machine generated. { "explorerSection": "ファイル エクスプローラー セクション", - "noWorkspace": "開いているフォルダーがありません", - "noWorkspaceHelp": "まだフォルダーを開いていません。", "openFolder": "フォルダーを開く" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/jpn/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index e97af3104a281..489a4baaeebcd 100644 --- a/i18n/jpn/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "[開いているエディター] セクション", "openEditors": "開いているエディター", + "openEditosrSection": "[開いているエディター] セクション", "treeAriaLabel": "開いているエディター: アクティブなファイルのリスト", "dirtyCounter": "未保存 ({0})" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index e556fff23e6e4..a4fef8cf3c06d 100644 --- a/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "キー バインドの定義", - "defineKeybinding.kbLayoutErrorMessage": "現在のキーボード レイアウトでは、このキーの組み合わせを生成することはできません。" + "defineKeybinding.kbLayoutErrorMessage": "現在のキーボード レイアウトでは、このキーの組み合わせを生成することはできません。", + "defineKeybinding.kbLayoutLocalAndUSMessage": "現在のキーボード レイアウトで示すと **{0}** です。(US 標準: **{1}**)", + "defineKeybinding.kbLayoutLocalMessage": "現在のキーボード レイアウトで示すと **{0}** です。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..6024752558c81 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchMessage": "再起動が必要な設定を変更しました。", + "relaunchDetail": "{0} を再起動ボタンで再起動して、設定を有効にしてください。", + "restart": "再起動" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index dbc7f6d6a36f7..8f9586b85f4e2 100644 --- a/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "空のスニペット", "snippetSchema.json": "ユーザー スニペット構成", "snippetSchema.json.prefix": "intellisense でスニペットを選択するときに使用するプレフィックス", - "snippetSchema.json.body": "スニペットの内容。変数には '${id}'、'${id:label}'、'${1:label}' を使用し、カーソル位置には '$0'、'$1' を使用します", + "snippetSchema.json.body": "スニペットのコンテンツです。カーソルの位置を定義するには '$1', '${1:defaultText}' を使用し、最後のカーソルの位置には '$0' を使用します。'${varName}' と '${varName:defaultText}' を使用すると変数値を挿入します。例: 'This is file: $TM_FILENAME'.", "snippetSchema.json.description": "スニペットについての記述。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..fef6bb6566beb --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "{0} のサポートの改善にご協力ください", + "takeShortSurvey": "簡単なアンケートの実施", + "remindLater": "後で通知する", + "neverAgain": "今後は表示しない" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..1b0a91d1c83f8 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "短いフィードバック アンケートにご協力をお願いできますか?", + "takeSurvey": "アンケートの実施", + "remindLater": "後で通知する", + "neverAgain": "今後は表示しない" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..ac80aac08cdfe --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "一致するタスクがありません" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index c0432625724e1..06f2b5a47d509 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tasks" + "entryAriaLabel": "{0}, tasks", + "customizeTask": "タスクのカスタマイズ" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..ac80aac08cdfe --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "一致するタスクがありません" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index fbd42ea691d37..f4de865e7e835 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -12,5 +12,6 @@ "ConfigurationParser.invalidVaraibleReference": "エラー: 正しくない problemMatcher 参照 {0}\n", "ConfigurationParser.noTaskName": "エラー: タスクが taskName プロパティを提供しなければなりません。このタスクは無視されます。\n{0}\n", "taskConfiguration.shellArgs": "警告: タスク '{0}' はシェル コマンドです。コマンド名または引数の 1 つに、エスケープされていないスペースが含まれています。コマンド ラインの引用が正しく解釈されるように、引数をコマンドにマージしてください。", + "taskConfiguration.noCommandOrDependsOn": "エラー: タスク '{0}' は、コマンドも dependsOn プロパティも指定していません。このタスクは無視されます。定義は次のとおりです:\n{1}", "taskConfiguration.noCommand": "エラー: タスク '{0}' はコマンドを定義していません。このタスクは無視されます。定義は次のとおりです:\n{1}" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index 522b6ddc0ea39..c0f160530b628 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "追加のコマンド オプション", "JsonSchema.options.cwd": "実行されるプログラムまたはスクリプトの現在の作業ディレクトリ。省略すると、Code の現在のワークスペースのルートが使用されます。", "JsonSchema.options.env": "実行されるプログラムまたはシェルの環境。省略すると、親プロセスの環境が使用されます。", + "JsonSchema.shellConfiguration": "使用するシェルを構成します。", "JsonSchema.shell.executable": "使用するシェル。", "JsonSchema.shell.args": "シェル引数。", "JsonSchema.command": "実行されるコマンド。外部プログラムかシェル コマンドです。", diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index d4e5894c8b6df..fec9e1206745f 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "構成のバージョン番号", + "JsonSchema._runner": "ランナーが新しくなります。正式なランナープロパティーを使用してください", + "JsonSchema.runner": "タスクをプロセスとして実行して、出力が出力ウィンドウまたは端末内に表示されるかどうかを定義します。", "JsonSchema.windows": "Windows 固有のコマンド構成", "JsonSchema.mac": "Mac 固有のコマンド構成", "JsonSchema.linux": "Linux 固有のコマンド構成", diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 063435e42d570..2b0fd3079f186 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -7,6 +7,10 @@ "JsonSchema.shell": "コマンドがシェル コマンドか外部プログラムかを指定します。省略すると、既定は false になります。", "JsonSchema.tasks.dependsOn.string": "このタスクが依存している別のタスク。", "JsonSchema.tasks.dependsOn.array": "このタスクが依存している他の複数のタスク。", + "JsonSchema.tasks.group": "このタスクが属する実行グループを定義します。省略した場合、タスクはグループに属しません。", + "JsonSchema.tasks.type": "タスクをプロセスとして実行するか、またはシェル内部でコマンドとして実行するかどうかを定義します。既定は process です。", + "JsonSchema.version": "構成のバージョン番号", + "JsonSchema.tasks.customize": "カスタマイズ対象の提供されたタスク。", "JsonSchema.windows": "Windows 固有のコマンド構成", "JsonSchema.mac": "Mac 固有のコマンド構成", "JsonSchema.linux": "Linux 固有のコマンド構成" diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 81375f18706a6..4d056135a7a36 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -22,7 +22,8 @@ "TaskService.noBuildTask": "ビルド タスクが定義されていません。tasks.json ファイルでタスクに 'isBuildCommand' というマークを付けてください。", "TaskService.noTestTask": "テスト タスクが定義されていません。tasks.json ファイルでタスクに 'isTestCommand' というマークを付けてください。", "TaskServer.noTask": "実行が要求されたタスク {0} が見つかりません。", - "TaskSystem.activeSame": "タスクは既にアクティブおよびウォッチ モードになっています。タスクを終了するには、`F1 > タスクの終了` を使用します", + "customizeParseErrors": "現在のタスクの構成にはエラーがあります。タスクをカスタマイズする前にエラーを修正してください。", + "moreThanOneBuildTask": "tasks.json で複数のビルド タスクが定義されています。最初のタスクのみを実行します。\\n", "TaskSystem.active": "既に実行中のタスクがあります。まずこのタスクを終了してから、別のタスクを実行してください。", "TaskSystem.restartFailed": "タスク {0} を終了して再開できませんでした", "TaskSystem.configurationErrors": "エラー: 指定したタスク構成に検証エラーがあり、使用できません。最初にエラーを修正してください。", diff --git a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 440b92fd91d74..40f8e647676e6 100644 --- a/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,6 +6,7 @@ { "TerminalTaskSystem.unknownError": "タスクの実行中に不明なエラーが発生しました。詳細については、タスク出力ログを参照してください。", "TerminalTaskSystem.terminalName": "タスク - {0}", + "reuseTerminal": "端末はタスクで再利用されます、閉じるには任意のキーを押してください。", "TerminalTaskSystem": "UNC ドライブでシェル コマンドを実行できません。", "unkownProblemMatcher": "問題マッチャー {0} は解決できませんでした。マッチャーは無視されます" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json index 11afc0e1f7233..1288c0d2584a7 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminalIntegratedConfigurationTitle": "統合端末", + "terminalIntegratedConfigurationTitle": "統合ターミナル", "terminal.integrated.shell.linux": "ターミナルが Linux で使用するシェルのパス。", "terminal.integrated.shellArgs.linux": "Linux のターミナルで使用するコマンド ライン引数。", "terminal.integrated.shell.osx": "ターミナルが OS X で使用するシェルのパス。", @@ -24,7 +24,7 @@ "terminal.integrated.cwd": "端末を起動する明示的な開始パスです。これはシェル プロセスの現在の作業ディレクトリ (cwd) として使用されます。特にルート ディレクトリが cwd に適していない場合に、ワークスペースの設定で役立ちます。", "terminal.integrated.confirmOnExit": "アクティブなターミナル セッションがある場合に終了の確認をするかどうか。", "terminal.integrated.commandsToSkipShell": "キーバインドがシェルに送信されず、代わりに常に Code で処理されるコマンド ID のセット。これにより、ターミナルがフォーカスされていない場合と同じ動作をするシェルによって通常使用されるキーバインドを使用できるようになります。例: Ctrl+p で Quick Open を起動します。", - "terminal": "端末", - "terminalCategory": "端末", + "terminal": "ターミナル", + "terminalCategory": "ターミナル", "viewCategory": "表示" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index e7930c9cd7a69..31a4c0908cc35 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -6,9 +6,10 @@ { "workbench.action.terminal.toggleTerminal": "統合ターミナルの切り替え", "workbench.action.terminal.kill": "アクティブな端末インスタンスを強制終了", - "workbench.action.terminal.kill.short": "端末の強制終了", + "workbench.action.terminal.kill.short": "ターミナルの強制終了", "workbench.action.terminal.copySelection": "選択内容のコピー", - "workbench.action.terminal.new": "新しい統合端末の作成", + "workbench.action.terminal.selectAll": "すべて選択", + "workbench.action.terminal.new": "新しい統合ターミナルの作成", "workbench.action.terminal.new.short": "新しいターミナル", "workbench.action.terminal.focus": "端末にフォーカス", "workbench.action.terminal.focusNext": "次の端末にフォーカス", @@ -19,7 +20,7 @@ "workbench.action.terminal.runSelectedText": "アクティブなターミナルで選択したテキストを実行", "workbench.action.terminal.runActiveFile": "アクティブなファイルをアクティブなターミナルで実行", "workbench.action.terminal.runActiveFile.noFile": "ターミナルで実行できるのは、ディスク上のファイルのみです", - "workbench.action.terminal.switchTerminalInstance": "端末インスタンスをスイッチ", + "workbench.action.terminal.switchTerminalInstance": "ターミナル インスタンスの切り替え", "workbench.action.terminal.scrollDown": "下にスクロール (行)", "workbench.action.terminal.scrollDownPage": "スクロール ダウン (ページ)", "workbench.action.terminal.scrollToBottom": "一番下にスクロール", @@ -28,5 +29,6 @@ "workbench.action.terminal.scrollToTop": "一番上にスクロール", "workbench.action.terminal.clear": "クリア", "workbench.action.terminal.allowWorkspaceShell": "ワークスペースでシェルを構成することを許可する", - "workbench.action.terminal.disallowWorkspaceShell": "ワークスペースでシェルを構成することを許可しない" + "workbench.action.terminal.disallowWorkspaceShell": "ワークスペースでシェルを構成することを許可しない", + "workbench.action.terminal.rename": "名前変更" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..19f4b3b0c2deb --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "検索", + "placeholder.find": "検索", + "label.previousMatchButton": "前の一致項目", + "label.nextMatchButton": "次の一致項目", + "label.closeButton": "閉じる" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index a898f37da7b14..94bcb838b051d 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "ターミナルにフォーカスがない場合は、ターミナルの選択をコピーできません", "terminal.integrated.exitedWithCode": "ターミナルの処理が終了しました (終了コード: {0})", "terminal.integrated.waitOnExit": "任意のキーを押して端末を終了します", "terminal.integrated.launchFailed": "ターミナル プロセス コマンド `{0}{1}` を起動できませんでした (終了コード: {2})" diff --git a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json index e8e8ad9346b13..997819962b823 100644 --- a/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json @@ -5,7 +5,7 @@ // Do not edit this file. It is machine generated. { "copy": "コピー", - "createNewTerminal": "新しい端末", + "createNewTerminal": "新しいターミナル", "paste": "貼り付け", "clear": "クリア" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/jpn/src/vs/workbench/parts/update/electron-browser/update.i18n.json index a420d7608028d..a396b05a2854d 100644 --- a/i18n/jpn/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -15,5 +15,18 @@ "license": "ライセンスの閲覧", "updateAvailable": "{0} は再起動後に更新されます。", "thereIsUpdateAvailable": "利用可能な更新プログラムがあります。", - "noUpdatesAvailable": "現在入手可能な更新はありません。" + "noUpdatesAvailable": "現在入手可能な更新はありません。", + "updateIsReady": "新しい更新が利用可能です。", + "commandPalette": "コマンド パレット...", + "settings": "設定", + "keyboardShortcuts": "キーボード ショートカット", + "selectTheme.label": "配色テーマ", + "themes.selectIconTheme.label": "ファイル アイコンのテーマ", + "not available": "更新は利用できません", + "checkingForUpdates": "更新を確認しています...", + "DownloadUpdate": "利用可能な更新プログラムをダウンロードします", + "DownloadingUpdate": "更新をダウンロードしています...", + "InstallingUpdate": "更新プログラムをインストールしています...", + "restartToUpdate": "更新のために再起動します...", + "checkForUpdates": "更新の確認..." } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/jpn/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..6bcbcb522f9b5 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} 個のアクション" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/jpn/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..4a55950fc52d2 --- /dev/null +++ b/i18n/jpn/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "ビューは配列にする必要があります", + "requirestring": " `{0}` プロパティは必須で、`string` 型でなければなりません", + "optstring": "`{0}` プロパティは省略するか、`string` 型にする必要があります", + "vscode.extension.contributes.view.id": "ビューの識別子。`vscode.window.registerTreeDataProviderForView` API を介してデータ プロバイダーを登録するには、これを使用します。また、`onView:${id}` イベントを `activationEvents` に登録することによって、拡張機能のアクティブ化をトリガーするためにも使用できます。", + "vscode.extension.contributes.view.name": "ビューの判読できる名前。表示されます", + "vscode.extension.contributes.views": "ビューをエディターに提供します", + "views.explorer": "エクスプローラー ビュー", + "locationId.invalid": "`{0}` は有効なビューの場所ではありません" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 950f340d9ae19..ce85f8d6a8363 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -31,7 +31,6 @@ "welcomePage.colorThemeDescription": "エディターとコードの外観を自由に設定します", "welcomePage.learn": "学ぶ", "welcomePage.showCommands": "すべてのコマンドの検索と実行", - "welcomePage.showCommandsDescription": "コントロール パネルからコマンドを検索してすばやくアクセスします ({0})", "welcomePage.interfaceOverview": "インターフェイスの概要", "welcomePage.interfaceOverviewDescription": "UI の主要コンポーネントを解説した視覚オーバーレイを表示します", "welcomePage.interactivePlayground": "対話型プレイグラウンド", diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index 09458a86c492a..0f4f46adf6266 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbenchConfigurationTitle": "ワークベンチ", - "welcomePage.enabled": "有効にすると、起動時にウェルカム ページを表示します。", "help": "ヘルプ" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index c30717a4d73c5..59bc465791f89 100644 --- a/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/jpn/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "workbenchConfigurationTitle": "ワークベンチ", + "welcomePage.enabled": "有効にすると、起動時にウェルカム ページを表示します。", "welcomePage": "ようこそ", "welcomePage.javaScript": "JavaScript", "welcomePage.typeScript": "TypeScript", @@ -14,16 +16,23 @@ "welcomePage.sublime": "Sublime", "welcomePage.atom": "Atom", "welcomePage.extensionPackAlreadyInstalled": "{0} のサポートは既にインストールされています。", - "welcomePage.willReloadAfterInstallingExtensionPack": "{0} のサポートをインストールした後、ウィンドウが再度読み込まれます。", - "welcomePage.installingExtensionPack": "{0} のサポートをインストール...", + "welcomePage.willReloadAfterInstallingExtensionPack": "{0} に追加のサポートをインストールしたあと、ウィンドウが再度読み込まれます。", + "welcomePage.installingExtensionPack": "{0} に追加のサポートをインストールしています...", "welcomePage.extensionPackNotFound": "ID {1} のサポート {0} は見つかりませんでした。", "welcomePage.keymapAlreadyInstalled": "キーボード ショートカット {0} は既にインストールされています。", "welcomePage.willReloadAfterInstallingKeymap": "キーボード ショートカット {0} をインストールした後、ウィンドウが再度読み込まれます。", "welcomePage.installingKeymap": "{0} のキーボード ショートカットをインストールしています...", "welcomePage.keymapNotFound": "ID {1} のキーボード ショートカット {0} は見つかりませんでした。", "welcome.title": "ようこそ", + "welcomePage.openFolderWithPath": "パス {1} のフォルダー {0} を開く", "welcomePage.extensionListSeparator": ",", - "welcomePage.installedExtension": "{0} (インストール済み) ", + "welcomePage.installKeymap": "{0} キーマップをインストールする", + "welcomePage.installExtensionPack": "{0} に追加のサポートをインストールする", + "welcomePage.installedKeymap": "{0} キーマップは既にインストールされています", + "welcomePage.installedExtensionPack": "{0} のサポートは既にインストールされています", "ok": "OK", - "cancel": "キャンセル" + "details": "詳細", + "cancel": "キャンセル", + "welcomePage.buttonBackground": "ウェルカム ページのボタンの背景色。", + "welcomePage.buttonHoverBackground": "ウェルカム ページのボタンのホバー背景色。" } \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/jpn/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..7df1ec40941af --- /dev/null +++ b/i18n/jpn/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "テレメトリ", + "telemetry.enableCrashReporting": "クラッシュ レポートを Microsoft に送信するように設定します。\nこのオプションを有効にするには、再起動が必要です。" +} \ No newline at end of file diff --git a/i18n/jpn/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/jpn/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/jpn/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/kor/extensions/git/out/commands.i18n.json b/i18n/kor/extensions/git/out/commands.i18n.json index 9798aa482fa61..b60ceccaa806e 100644 --- a/i18n/kor/extensions/git/out/commands.i18n.json +++ b/i18n/kor/extensions/git/out/commands.i18n.json @@ -18,6 +18,7 @@ "discard": "변경 내용 취소", "confirm discard all": "모든 변경 내용을 취소하시겠습니까? 이 작업은 되돌릴 수 없습니다.", "discardAll": "모든 변경 내용 취소", + "no staged changes": "저장할 단계적 변경 사항이 없습니다.\n\n모든 변경 사항을 자동으로 스테이징하고 직접 저장하시겠습니까?", "yes": "예", "always": "항상", "no changes": "커밋할 변경 내용이 없습니다.", @@ -25,6 +26,9 @@ "provide commit message": "커밋 메시지를 제공하세요.", "branch name": "분기 이름", "provide branch name": "분기 이름을 입력하세요.", + "select branch to delete": "삭제할 분기 선택", + "confirm force delete branch": "'{0}' 분기가 완벽히 병합되지 않았습니다. 그래도 삭제할까요?", + "delete branch": "분기 삭제", "no remotes to pull": "리포지토리에 풀하도록 구성된 원격 항목이 없습니다.", "no remotes to push": "리포지토리에 푸시하도록 구성된 원격이 없습니다.", "nobranch": "원격에 푸시할 분기를 체크 아웃하세요.", diff --git a/i18n/kor/extensions/git/package.i18n.json b/i18n/kor/extensions/git/package.i18n.json index aed0ca69317b0..115ba2122208c 100644 --- a/i18n/kor/extensions/git/package.i18n.json +++ b/i18n/kor/extensions/git/package.i18n.json @@ -26,12 +26,13 @@ "command.undoCommit": "마지막 커밋 실행 취소", "command.checkout": "다음으로 체크 아웃...", "command.branch": "분기 만들기...", + "command.deleteBranch": "분기 삭제...", "command.pull": "풀", "command.pullRebase": "풀(다시 지정)", "command.push": "푸시", "command.pushTo": "다음으로 푸시...", "command.sync": "동기화", - "command.publish": "게시", + "command.publish": "분기 게시", "command.showOutput": "Git 출력 표시", "config.enabled": "Git 사용 여부", "config.path": "Git 실행 파일의 경로", @@ -42,5 +43,7 @@ "config.countBadge": "Git 배지 카운터를 제어합니다. `all`이면 변경 내용을 모두 계산하고, `tracked`이면 추적된 변경 내용만 계산하고, `off`이면 해제합니다.", "config.checkoutType": "`다음으로 체크 아웃...`을 실행할 때 나열되는 분기 유형을 제어합니다. `all`이면 모든 참조를 표시하고, `local`이면 로컬 분기만 표시하고, `tags`이면 태그만 표시하고, `remote`이면 원격 분기만 표시합니다.", "config.ignoreLegacyWarning": "레거시 Git 경고를 무시합니다.", - "config.ignoreLimitWarning": "리포지토리에 변경 내용이 너무 많으면 경고를 무시합니다." + "config.ignoreLimitWarning": "리포지토리에 변경 내용이 너무 많으면 경고를 무시합니다.", + "config.defaultCloneDirectory": "git 리포지토리를 복제할 기본 위치", + "config.enableSmartCommit": "단계적 변경 사항이 없는 경우 모든 변경 사항을 저장합니다." } \ No newline at end of file diff --git a/i18n/kor/extensions/jake/out/main.i18n.json b/i18n/kor/extensions/jake/out/main.i18n.json index 8b6ad71cd4e6d..2e5af401ba1cb 100644 --- a/i18n/kor/extensions/jake/out/main.i18n.json +++ b/i18n/kor/extensions/jake/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Jake 자동 검색 실패 오류: {0}" +} \ No newline at end of file diff --git a/i18n/kor/extensions/jake/package.i18n.json b/i18n/kor/extensions/jake/package.i18n.json index 8b6ad71cd4e6d..8a1b290c1d45b 100644 --- a/i18n/kor/extensions/jake/package.i18n.json +++ b/i18n/kor/extensions/jake/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.jake.autoDetect": "Jake 작업에 대한 자동 검색 사용 여부를 설정합니다. 기본값은 [켜기]입니다." +} \ No newline at end of file diff --git a/i18n/kor/extensions/markdown/out/extension.i18n.json b/i18n/kor/extensions/markdown/out/extension.i18n.json index 8b6ad71cd4e6d..f38833da5da5d 100644 --- a/i18n/kor/extensions/markdown/out/extension.i18n.json +++ b/i18n/kor/extensions/markdown/out/extension.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "onPreviewStyleLoadError": "'markdown.styles': {0}을 불러올 수 없음" +} \ No newline at end of file diff --git a/i18n/kor/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/kor/extensions/merge-conflict/out/codelensProvider.i18n.json index 8b6ad71cd4e6d..8b5b2b04aab77 100644 --- a/i18n/kor/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/kor/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "acceptCurrentChange": "현재 변경 사항 수락", + "acceptIncomingChange": "수신 변경 사항 수락", + "acceptBothChanges": "두 변경 사항 모두 수락", + "compareChanges": "변경 사항 비교" +} \ No newline at end of file diff --git a/i18n/kor/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/kor/extensions/merge-conflict/out/commandHandler.i18n.json index 8b6ad71cd4e6d..ce73e350da6e6 100644 --- a/i18n/kor/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/kor/extensions/merge-conflict/out/commandHandler.i18n.json @@ -3,4 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "cursorNotInConflict": "편집기 커서가 병합 충돌 내에 없음", + "compareChangesTitle": "{0}: 현재 변경 사항 ⟷ 수신 변경 사항", + "cursorOnSplitterRange": "편집기 커서가 병합 충돌 스플리터 내에 있습니다. \"현재\" 또는 \"수신\" 블록으로 옮기세요.", + "noConflicts": "이 파일에서 발견된 병합 충돌 없음", + "noOtherConflictsInThisFile": "이 파일 내에 다른 병합 충돌 없음" +} \ No newline at end of file diff --git a/i18n/kor/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/kor/extensions/merge-conflict/out/mergeDecorator.i18n.json index 8b6ad71cd4e6d..41b53ce1e6c59 100644 --- a/i18n/kor/extensions/merge-conflict/out/mergeDecorator.i18n.json +++ b/i18n/kor/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "currentChange": "(현재 변경 사항)", + "incomingChange": "(수신 변경 사항)" +} \ No newline at end of file diff --git a/i18n/kor/extensions/merge-conflict/package.i18n.json b/i18n/kor/extensions/merge-conflict/package.i18n.json index 8b6ad71cd4e6d..ceb1a3d504d98 100644 --- a/i18n/kor/extensions/merge-conflict/package.i18n.json +++ b/i18n/kor/extensions/merge-conflict/package.i18n.json @@ -3,4 +3,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "command.category": "충돌 병합", + "command.accept.all-incoming": "수신 모두 수락", + "command.accept.all-both": "둘 다 모두 수락", + "command.accept.current": "현재 수락", + "command.accept.incoming": "수신 수락", + "command.accept.selection": "선택 수락", + "command.accept.both": "둘 다 수락", + "command.next": "다음 충돌", + "command.previous": "이전 충돌", + "command.compare": "현재 충돌 비교", + "config.title": "충돌 병합", + "config.codeLensEnabled": "편집기 내에서 충돌 블록 CodeLense 병합 사용/사용 안 함", + "config.decoratorsEnabled": "편집기 내에서 충돌 병합 사용/사용 안 함" +} \ No newline at end of file diff --git a/i18n/kor/extensions/npm/package.i18n.json b/i18n/kor/extensions/npm/package.i18n.json index 8b6ad71cd4e6d..bae4e5954d08b 100644 --- a/i18n/kor/extensions/npm/package.i18n.json +++ b/i18n/kor/extensions/npm/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.npm.autoDetect": "npm 스크립트에 대한 자동 검색 여부를 설정합니다. 기본값은 [켜기]입니다." +} \ No newline at end of file diff --git a/i18n/kor/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/kor/extensions/typescript/out/features/bufferSyncSupport.i18n.json index be16b468c9ab5..099f0f45bd182 100644 --- a/i18n/kor/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/kor/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "버전이 일치하지 않습니다. 전역 tsc({0})가 VS Code의 언어 서비스({1})와 다릅니다. 일관되지 않은 컴파일 오류가 발생할 수 있습니다.", "moreInformation": "추가 정보", "doNotCheckAgain": "다시 확인 안 함", "close": "닫기", diff --git a/i18n/kor/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/kor/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json index 8b6ad71cd4e6d..cca18a8243ede 100644 --- a/i18n/kor/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json +++ b/i18n/kor/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "ts-check": "JavaScript 파일에서 의미 검사를 사용합니다. 파일의 최상단에 있어야 합니다.", + "ts-nocheck": "JavaScript 파일에서 의미 검사를 사용하지 않습니다. 파일의 최상단에 있어야 합니다.", + "ts-ignore": "파일의 다음 행에서 @ts-check 오류를 억제합니다." +} \ No newline at end of file diff --git a/i18n/kor/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/kor/extensions/typescript/out/utils/projectStatus.i18n.json index 8702bb693609a..bd9076903888b 100644 --- a/i18n/kor/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/kor/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "프로젝트 전체에서 JavaScript/TypeScript 언어 기능을 사용하도록 설정하려면 {0}과(와) 같이 파일이 많은 폴더를 제외하세요.", "hintExclude.generic": "프로젝트 전체에서 JavaScript/TypeScript 언어 기능을 사용하도록 설정하려면 사용하지 않는 소스 파일이 포함된 큰 폴더를 제외하세요.", - "open": "제외 구성", "large.label": "제외 구성", "hintExclude.tooltip": "프로젝트 전체에서 JavaScript/TypeScript 언어 기능을 사용하도록 설정하려면 사용하지 않는 소스 파일이 포함된 큰 폴더를 제외하세요." } \ No newline at end of file diff --git a/i18n/kor/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/kor/extensions/typescript/out/utils/typingsStatus.i18n.json index bba27308a2312..e070552b4200c 100644 --- a/i18n/kor/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/kor/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "TypeScript IntelliSense를 향상하기 위해 데이터를 페치하는 중", + "typesInstallerInitializationFailed.title": "JavaScript 언어 기능에 대한 입력 파일을 설치할 수 없습니다. NPM이 설치되어 있는지 확인하거나 사용자 설정에서 'typescript.npm'을 구성하세요.", "typesInstallerInitializationFailed.moreInformation": "추가 정보", "typesInstallerInitializationFailed.doNotCheckAgain": "다시 확인 안 함", "typesInstallerInitializationFailed.close": "닫기" diff --git a/i18n/kor/extensions/typescript/package.i18n.json b/i18n/kor/extensions/typescript/package.i18n.json index 348ff9b8498ed..f2cc400f199c7 100644 --- a/i18n/kor/extensions/typescript/package.i18n.json +++ b/i18n/kor/extensions/typescript/package.i18n.json @@ -13,7 +13,6 @@ "typescript.check.tscVersion": "전역 설치 TypeScript 컴파일러(예: tsc)가 사용된 TypeScript 언어 서비스와 다른지 확인하세요.", "typescript.tsserver.log": "파일에 대해 TS 서버 로깅을 사용하도록 설정합니다. 이 로그는 TS 서버 문제를 진단하는 데 사용될 수 있습니다. 로그에는 파일 경로, 소스 코드 및 프로젝트에서 잠재적으로 중요한 기타 정보가 포함될 수 있습니다.", "typescript.tsserver.trace": "TS 서버로 전송한 메시지 추적을 사용하도록 설정합니다. 이\n 추적은 TS 서버 문제를 진단하는 데 사용될 수 있습니다. 추적에는 파일 경로, 소스 코드 및 프로젝트에서 잠재적으로 중요한\n 기타 정보가 포함될 수 있습니다.", - "typescript.tsserver.experimentalAutoBuild": "실험적 자동 빌드를 사용하도록 설정합니다. 1.9 dev 또는 2.x tsserver 버전이 필요하며 변경 후에는 VS Code를 다시 시작해야 합니다.", "typescript.validate.enable": "TypeScript 유효성 검사를 사용하거나 사용하지 않습니다.", "typescript.format.enable": "기본 TypeScript 포맷터를 사용하거나 사용하지 않습니다.", "javascript.format.enable": "기본 JavaScript 포맷터를 사용하거나 사용하지 않습니다.", @@ -33,8 +32,16 @@ "javascript.validate.enable": "JavaScript 유효성 검사를 사용하거나 사용하지 않습니다.", "typescript.goToProjectConfig.title": "프로젝트 구성으로 이동", "javascript.goToProjectConfig.title": "프로젝트 구성으로 이동", + "javascript.referencesCodeLens.enabled": "JavaScript 파일에서 CodeLense 참조를 사용/사용 안 함으로 설정합니다.", + "typescript.referencesCodeLens.enabled": "TypeScript 파일에서 참조 CodeLense를 사용/사용 안 함으로 설정합니다. TypeScript >= 2.0.6이 필요합니다.", "typescript.implementationsCodeLens.enabled": "구현 CodeLens를 사용하거나 사용하지 않도록 설정합니다. TypeScript >= 2.2.0이 필요합니다.", + "typescript.openTsServerLog.title": "TS 서버 로그 열기", + "typescript.restartTsServer": "TS 서버 다시 시작", "typescript.selectTypeScriptVersion.title": "TypeScript 버전 선택", "jsDocCompletion.enabled": "자동 JSDoc 주석 사용/사용 안 함", - "javascript.implicitProjectConfig.checkJs": "JavaScript 파일의 의미 체계 검사를 사용/사용하지 않습니다. 기존 jsconfig.json 또는 tsconfig.json 파일은 이 설정을 재정의합니다. TypeScript >=2.3.1이 필요합니다. " + "javascript.implicitProjectConfig.checkJs": "JavaScript 파일의 의미 체계 검사를 사용/사용하지 않습니다. 기존 jsconfig.json 또는 tsconfig.json 파일은 이 설정을 재정의합니다. TypeScript >=2.3.1이 필요합니다. ", + "typescript.npm": "자동 입력 인식에 사용된 NPM 실행 파일 경로를 지정합니다. TypeScript >= 2.3.4가 필요합니다.", + "typescript.check.npmIsInstalled": "자동 입력 인식에 대해 NPM이 설치되어 있는지 확인합니다.", + "javascript.nameSuggestions": "JavaScript 제안 목록의 파일에서 고유한 이름 포함을 사용/사용 안 함으로 설정합니다.", + "typescript.tsc.autoDetect": "tsc 작업의 자동 검색을 켜거나 끕니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/kor/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index 4266985efc958..6d1aafbc27134 100644 --- a/i18n/kor/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/kor/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,6 +6,7 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "이미지가 너무 커서 편집기에 표시할 수 없습니다. ", + "resourceOpenExternalButton": " 외부 프로그램으로 이미지를 열까요?", "nativeBinaryError": "파일이 이진이거나 매우 크거나 지원되지 않는 텍스트 인코딩을 사용하기 때문에 편집기에서 표시되지 않습니다.", "sizeB": "{0}B", "sizeKB": "{0}KB", diff --git a/i18n/kor/src/vs/base/common/errorMessage.i18n.json b/i18n/kor/src/vs/base/common/errorMessage.i18n.json index a1079b639599e..f7f99e392a0a5 100644 --- a/i18n/kor/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/kor/src/vs/base/common/errorMessage.i18n.json @@ -13,6 +13,5 @@ "error.connection.unknown": "알 수 없는 연결 오류가 발생했습니다. 인터넷에 연결되지 않았거나 연결된 서버가 오프라인 상태입니다.", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "알 수 없는 오류가 발생했습니다. 자세한 내용은 로그를 참조하세요.", - "nodeExceptionMessage": "시스템 오류가 발생했습니다({0}).", "error.moreErrors": "{0}(총 {1}개의 오류)" } \ No newline at end of file diff --git a/i18n/kor/src/vs/base/common/keybindingLabels.i18n.json b/i18n/kor/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/code/electron-main/menus.i18n.json b/i18n/kor/src/vs/code/electron-main/menus.i18n.json index b293d48151749..4716e6a22e5a5 100644 --- a/i18n/kor/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/kor/src/vs/code/electron-main/menus.i18n.json @@ -14,6 +14,7 @@ "mHelp": "도움말(&&H)", "miNewWindow": "새 창(&&W)", "mAbout": "{0} 정보", + "mServices": "서비스", "mHide": "{0} 숨기기", "mHideOthers": "기타 숨기기", "mShowAll": "모두 표시", @@ -54,6 +55,9 @@ "miShowEmmetCommands": "Emmet(&&M)...", "miToggleLineComment": "줄 주석 설정/해제(&&T)", "miToggleBlockComment": "블록 주석 설정/해제(&&B)", + "miMultiCursorAlt": "다중 커서에 Alt+클릭 사용", + "miMultiCursorCmd": "다중 커서에 Cmd+클릭 사용", + "miMultiCursorCtrl": "다중 커서에 Ctrl+클릭 사용", "miInsertCursorAbove": "위에 커서 추가(&&A)", "miInsertCursorBelow": "아래에 커서 추가(&&D)", "miInsertCursorAtEndOfEachLineSelected": "줄 끝에 커서 추가(&&U)", @@ -69,6 +73,7 @@ "miSmartSelectShrink": "선택 영역 축소(&&S)", "miViewExplorer": "탐색기(&&E)", "miViewSearch": "검색(&&S)", + "miViewSCM": "SCM(&&C)", "miViewDebug": "디버그(&&D)", "miViewExtensions": "확장(&&X)", "miToggleOutput": "출력(&&O)", @@ -113,6 +118,8 @@ "miGotoSymbolInFile": "파일의 기호로 이동(&&S)...", "miGotoSymbolInWorkspace": "작업 영역의 기호로 이동(&&W)...", "miGotoDefinition": "정의로 이동(&&D)", + "miGotoTypeDefinition": "형식 정의로 이동( &&T)", + "miGotoImplementation": "구현으로 이동( &&I)", "miGotoLine": "줄 이동(&&L)...", "miStartDebugging": "디버깅 시작(&&S)", "miStartWithoutDebugging": "디버깅하지 않고 시작(&&W)", @@ -129,16 +136,17 @@ "miColumnBreakpoint": "열 중단점(&&O)", "miFunctionBreakpoint": "함수 중단점(&&F)...", "miNewBreakpoint": "새 중단점(&&N)", + "miEnableAllBreakpoints": "모든 중단점 설정", "miDisableAllBreakpoints": "모든 중단점 사용 안 함(&&L)", "miRemoveAllBreakpoints": "모든 중단점 제거(&&A)", "miInstallAdditionalDebuggers": "추가 디버거 설치(&&I)...", "mMinimize": "최소화", - "mClose": "닫기", "mBringToFront": "모두 맨 앞으로 가져오기", "miToggleDevTools": "개발자 도구 설정/해제(&&T)", "miAccessibilityOptions": "접근성 옵션(&&O)", "miReportIssues": "문제 보고(&&I)", "miWelcome": "시작(&&W)", + "miInteractivePlayground": "대화형 실습(&&I)", "miDocumentation": "설명서(&&D)", "miReleaseNotes": "릴리스 정보(&&R)", "miKeyboardShortcuts": "바로 가기 키 참조(&&K)", @@ -148,12 +156,14 @@ "miLicense": "라이선스 보기(&&L)", "miPrivacyStatement": "개인정보처리방침(&&P)", "miAbout": "정보(&&A)", + "miTerminateTask": "작업 종료(&&T)", "accessibilityOptionsWindowTitle": "접근성 옵션", "miRestartToUpdate": "업데이트하기 위해 다시 시작...", "miCheckingForUpdates": "업데이트를 확인하는 중...", "miDownloadUpdate": "사용 가능한 업데이트 다운로드", "miDownloadingUpdate": "업데이트를 다운로드하는 중...", "miInstallingUpdate": "업데이트를 설치하는 중...", + "miCheckForUpdates": "업데이트 확인...", "aboutDetail": "\n버전 {0}\n커밋 {1}\n날짜 {2}\n셸{3}\n렌더러 {4}\nNode {5}", "okButton": "확인" } \ No newline at end of file diff --git a/i18n/kor/src/vs/code/electron-main/windows.i18n.json b/i18n/kor/src/vs/code/electron-main/windows.i18n.json index 474475abdb126..bad419f4787af 100644 --- a/i18n/kor/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/kor/src/vs/code/electron-main/windows.i18n.json @@ -13,9 +13,5 @@ "appStalled": "창이 더 이상 응답하지 않습니다.", "appStalledDetail": "창을 다시 열거나, 닫거나, 계속 기다릴 수 있습니다.", "appCrashed": "창이 충돌했습니다.", - "appCrashedDetail": "불편을 드려서 죄송합니다. 창을 다시 열면 중단된 위치에서 계속할 수 있습니다.", - "newWindow": "새 창", - "newWindowDesc": "새 창을 엽니다.", - "recentFolders": "최근 폴더", - "folderDesc": "{0} {1}" + "appCrashedDetail": "불편을 드려서 죄송합니다. 창을 다시 열면 중단된 위치에서 계속할 수 있습니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json index 18aff6704bea0..3baffd1c3a9bf 100644 --- a/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/kor/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "글꼴 두께를 제어합니다.", "fontSize": "글꼴 크기(픽셀)를 제어합니다.", "lineHeight": "줄 높이를 제어합니다. fontSize의 lineHeight를 계산하려면 0을 사용합니다.", + "letterSpacing": "글자 간격을 픽셀 단위로 조정합니다.", "lineNumbers": "줄 번호의 표시 여부를 제어합니다. 가능한 값은 'on', 'off', 'relative'입니다. 'relative'는 현재 커서 위치에서 줄 수를 표시합니다.", "rulers": "세로 눈금자를 표시할 열", "wordSeparators": "단어 관련 탐색 또는 작업을 수행할 때 단어 구분 기호로 사용되는 문자입니다.", @@ -22,6 +23,8 @@ "minimap.enabled": "미니맵 표시 여부를 제어합니다.", "minimap.renderCharacters": "줄의 실제 문자(색 블록 아님) 렌더링", "minimap.maxColumn": "최대 특정 수의 열을 렌더링하도록 미니맵의 너비를 제한합니다.", + "find.seedSearchStringFromSelection": "편집기 선택에서 Find Widget의 검색 문자열을 시딩할지 설정합니다.", + "find.autoFindInSelection": "편집기에서 여러 글자 또는 행을 선택했을 때 Find in Selection 플래그를 켤지 설정합니다.", "wordWrap.off": "줄이 바뀌지 않습니다.", "wordWrap.on": "뷰포트 너비에서 줄이 바뀝니다.", "wordWrap.wordWrapColumn": "`editor.wordWrapColumn`에서 줄이 바뀝니다.", @@ -30,16 +33,19 @@ "wordWrapColumn": "`editor.wordWrap`이 'wordWrapColumn' 또는 'bounded'인 경우 편집기의 열 줄 바꿈을 제어합니다.", "wrappingIndent": "줄 바꿈 행의 들여쓰기를 제어합니다. 'none', 'same' 또는 'indent' 중 하나일 수 있습니다.", "mouseWheelScrollSensitivity": "마우스 휠 스크롤 이벤트의 `deltaX` 및 `deltaY`에서 사용할 승수", + "multiCursorModifier.ctrlCmd": "Windows와 Linux의 'Control'을 OSX의 'Command'로 매핑합니다.", + "multiCursorModifier.alt": "Windows와 Linux의 'Alt'를 OSX의 'Option'으로 매핑합니다.", + "multiCursorModifier": "마우스로 여러 커서를 추가할 때 사용할 수정자입니다. `ctrlCmd`는 Windows와 Linux에서 `Control`로 매핑되고 OSX에서 `Command`로 매핑됩니다. Go To Definition 및 Open Link 마우스 제스처가 멀티커서 수정자와 충돌하지 않도록 조정됩니다.", "quickSuggestions.strings": "문자열 내에서 빠른 제안을 사용합니다.", "quickSuggestions.comments": "주석 내에서 빠른 제안을 사용합니다.", "quickSuggestions.other": "문자열 및 주석 외부에서 빠른 제안을 사용합니다.", "quickSuggestions": "입력하는 동안 제안을 자동으로 표시할지 여부를 제어합니다.", "quickSuggestionsDelay": "빠른 제안을 표시할 지연 시간(ms)을 제어합니다.", - "parameterHints": "매개 변수 힌트를 사용하도록 설정합니다.", "autoClosingBrackets": "괄호를 연 다음에 편집기에서 괄호를 자동으로 닫을지 여부를 제어합니다.", "formatOnType": "입력 후 편집기에서 자동으로 줄의 서식을 지정할지 여부를 제어합니다.", "formatOnPaste": "붙여넣은 콘텐츠의 서식을 편집기에서 자동으로 지정할지 여부를 제어합니다. 포맷터는 반드시 사용할 수 있어야 하며 문서에서 범위의 서식을 지정할 수 있어야 합니다.", "suggestOnTriggerCharacters": "트리거 문자를 입력할 때 제안을 자동으로 표시할지 여부를 제어합니다.", + "acceptSuggestionOnEnter": "'Tab' 키 외에 'Enter' 키에 대한 제안도 허용할지를 제어합니다. 새 줄을 삽입하는 동작과 제안을 허용하는 동작 간의 모호함을 없앨 수 있습니다.", "acceptSuggestionOnCommitCharacter": "커밋 문자에 대한 제안을 허용할지를 제어합니다. 예를 들어 JavaScript에서는 세미콜론(';')이 제안을 허용하고 해당 문자를 입력하는 커밋 문자일 수 있습니다.", "snippetSuggestions": "코드 조각이 다른 추천과 함께 표시되는지 여부 및 정렬 방법을 제어합니다.", "emptySelectionClipboard": "선택 영역 없이 현재 줄 복사 여부를 제어합니다.", @@ -61,12 +67,17 @@ "renderLineHighlight": "편집기가 현재 줄 강조 표시를 렌더링하는 방식을 제어합니다. 가능한 값은 'none', 'gutter', 'line' 및 'all'입니다.", "codeLens": "편집기에서 코드 필터를 표시하는지 여부를 제어합니다.", "folding": "편집기에서 코드 접기를 사용할지 여부를 제어합니다.", + "showFoldingControls": "거터의 폴드 컨트롤을 자동으로 숨길지 결정합니다.", "matchBrackets": "대괄호 중 하나를 선택할 때 일치하는 대괄호를 강조 표시합니다.", "glyphMargin": "편집기에서 세로 문자 모양 여백을 렌더링할지 여부를 제어합니다. 문자 모양 여백은 주로 디버깅에 사용됩니다.", "useTabStops": "탭 정지 뒤에 공백 삽입 및 삭제", "trimAutoWhitespace": "끝에 자동 삽입된 공백 제거", "stablePeek": "해당 콘텐츠를 두 번 클릭하거나 키를 누르더라도 Peek 편집기를 열린 상태로 유지합니다.", "dragAndDrop": "편집기에서 끌어서 놓기로 선택 영역을 이동할 수 있는지 여부를 제어합니다.", + "accessibilitySupport.auto": "편집기가 스크린 리더가 연결되면 플랫폼 API를 사용하여 감지합니다.", + "accessibilitySupport.on": "편집기가 스크린 리더 사용을 위해 영구적으로 최적화됩니다.", + "accessibilitySupport.off": "편집기가 스크린 리더 사용을 위해 최적화되지 않습니다.", + "accessibilitySupport": "편집기를 스크린 리더를 위해 최적화된 모드로 실행할지 결정합니다.", "sideBySide": "diff 편집기에서 diff를 나란히 표시할지 인라인으로 표시할지 여부를 제어합니다.", "ignoreTrimWhitespace": "diff 편집기에서 선행 공백 또는 후행 공백 변경을 diffs로 표시할지 여부를 제어합니다.", "renderIndicators": "diff 편집기에서 추가/제거된 변경 내용에 대해 +/- 표시기를 표시하는지 여부를 제어합니다.", diff --git a/i18n/kor/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/kor/src/vs/editor/common/config/editorOptions.i18n.json index 4118aae2aa724..f2303e9e3676c 100644 --- a/i18n/kor/src/vs/editor/common/config/editorOptions.i18n.json +++ b/i18n/kor/src/vs/editor/common/config/editorOptions.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "accessibilityOffAriaLabel": "지금은 편집기를 사용할 수 없습니다. Alt+F1을 눌러 옵션을 보세요.", "editorViewAccessibleLabel": "편집기 콘텐츠" } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/kor/src/vs/editor/common/view/editorColorRegistry.i18n.json index e45a777ecdb40..dcef1416eba3b 100644 --- a/i18n/kor/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/kor/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -10,5 +10,15 @@ "caret": "편집기 커서 색입니다.", "editorWhitespaces": "편집기의 공백 문자 색입니다.", "editorIndentGuides": "편집기 들여쓰기 안내선 색입니다.", - "editorLineNumbers": "편집기 줄 번호 색입니다." + "editorLineNumbers": "편집기 줄 번호 색입니다.", + "editorRuler": "편집기 눈금의 색상입니다.", + "editorCodeLensForeground": "편집기 코드 렌즈의 전경색입니다.", + "editorBracketMatchBackground": "일치하는 브래킷 뒤의 배경색입니다.", + "editorBracketMatchBorder": "일치하는 브래킷 박스의 색상", + "editorOverviewRulerBorder": "개요 눈금 경계의 색상입니다.", + "editorGutter": "편집기 거터의 배경색입니다. 거터에는 글리프 여백과 행 수가 있습니다.", + "errorForeground": "편집기 내 오류 표시선의 전경색입니다.", + "errorBorder": "편집기 내 오류 표시선의 테두리 색입니다.", + "warningForeground": "편집기 내 경고 표시선의 전경색입니다.", + "warningBorder": "편집기 내 경고 표시선의 테두리 색입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/kor/src/vs/editor/contrib/find/common/findController.i18n.json index e49f22d812302..468f641effe12 100644 --- a/i18n/kor/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,5 @@ "addSelectionToPreviousFindMatch": "이전 일치 항목 찾기에 선택 항목 추가", "moveSelectionToNextFindMatch": "다음 일치 항목 찾기로 마지막 선택 항목 이동", "moveSelectionToPreviousFindMatch": "마지막 선택 항목을 이전 일치 항목 찾기로 이동", - "selectAllOccurencesOfFindMatch": "일치 항목 찾기의 모든 항목 선택", "changeAll.label": "모든 항목 변경" } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/kor/src/vs/editor/contrib/links/browser/links.i18n.json index e38e83f3a2f5b..ddf7b26a227e8 100644 --- a/i18n/kor/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "Cmd 키를 누르고 클릭하여 링크로 이동", "links.navigate": "Ctrl 키를 누르고 클릭하여 링크로 이동", + "links.navigate.al": "Alt 키를 누르고 클릭하여 링크로 이동", "invalid.url": "죄송합니다. 이 링크는 형식이 올바르지 않으므로 열지 못했습니다. {0}", "missing.url": "죄송합니다. 대상이 없으므로 이 링크를 열지 못했습니다.", "label": "링크 열기" diff --git a/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 2aeba994a61d1..0bb0099a543f3 100644 --- a/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "aria.oneReference": "{2}열, {1}줄, {0}의 기호", - "aria.fileReferences.1": "{0}의 기호 1개", - "aria.fileReferences.N": "{1}의 기호 {0}개", "aria.result.0": "결과 없음", "aria.result.1": "{0}에서 기호 1개를 찾았습니다.", "aria.result.n1": "{1}에서 기호 {0}개를 찾았습니다.", diff --git a/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index d5cc24a60e7ce..bebeacf63465f 100644 --- a/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -16,9 +16,12 @@ "peekViewTitleInfoForeground": "Peek 뷰 제목 정보 색입니다.", "peekViewBorder": "Peek 뷰 테두리 및 화살표 색입니다.", "peekViewResultsBackground": "Peek 뷰 결과 목록의 배경색입니다.", + "peekViewResultsMatchForeground": "Peek 뷰 결과 목록에서 라인 노드의 전경색입니다.", + "peekViewResultsFileForeground": "Peek 뷰 결과 목록에서 파일 노드의 전경색입니다.", "peekViewResultsSelectionBackground": "Peek 뷰 결과 목록에서 선택된 항목의 배경색입니다.", "peekViewResultsSelectionForeground": "Peek 뷰 결과 목록에서 선택된 항목의 전경색입니다.", "peekViewEditorBackground": "Peek 뷰 편집기의 배경색입니다.", + "peekViewEditorGutterBackground": "Peek 뷰 편집기의 거터 배경색입니다.", "peekViewResultsMatchHighlight": "Peek 뷰 결과 목록의 일치 항목 강조 표시 색입니다.", "peekViewEditorMatchHighlight": "Peek 뷰 편집기의 일치 항목 강조 표시 색입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 8f85109ab671b..db8bbbe66702b 100644 --- a/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/kor/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -12,6 +12,7 @@ "readMore": "자세히 알아보기...{0}", "suggestionWithDetailsAriaLabel": "{0}, 제안, 세부 정보 있음", "suggestionAriaLabel": "{0}, 제안", + "readLess": "간단히 보기...{0}", "suggestWidget.loading": "로드 중...", "suggestWidget.noSuggestions": "제안 항목이 없습니다.", "suggestionAriaAccepted": "{0}, 수락됨", diff --git a/i18n/kor/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/kor/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index d8b1d74b5f77a..59242661db1f7 100644 --- a/i18n/kor/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/kor/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,9 @@ "schema.brackets": "들여쓰기를 늘리거나 줄이는 대괄호 기호를 정의합니다.", "schema.autoClosingPairs": "대괄호 쌍을 정의합니다. 여는 대괄호를 입력하면 닫는 대괄호가 자동으로 삽입됩니다.", "schema.autoClosingPairs.notIn": "자동 쌍을 사용하지 않도록 설정된 범위 목록을 정의합니다.", - "schema.surroundingPairs": "선택한 문자열을 둘러싸는 데 사용할 수 있는 대괄호 쌍을 정의합니다." + "schema.surroundingPairs": "선택한 문자열을 둘러싸는 데 사용할 수 있는 대괄호 쌍을 정의합니다.", + "schema.wordPattern": "해당 언어에 대한 단어 정의입니다.", + "schema.wordPattern.pattern": "단어 일치에 사용하는 RegEXP 패턴입니다.", + "schema.wordPattern.flags": "단어 일치에 사용하는 RegExp 플래그입니다.", + "schema.wordPattern.flags.errorMessage": "`/^([gimuy]+)$/` 패턴과 일치해야 합니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/kor/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index d2433872a7da1..1c5f62b7b236b 100644 --- a/i18n/kor/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/kor/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -21,6 +21,8 @@ "menus.scmTitle": "소스 제어 제목 메뉴", "menus.resourceGroupContext": "소스 제어 리소스 그룹 상황에 맞는 메뉴", "menus.resourceStateContext": "소스 제어 리소스 상태 상황에 맞는 메뉴", + "view.viewTitle": "기여 조회 제목 메뉴", + "view.itemContext": "기여 조회 항목 상황에 맞는 메뉴", "nonempty": "비어 있지 않은 값이 필요합니다.", "opticon": "`icon` 속성은 생략할 수 있거나 문자열 또는 리터럴(예: `{dark, light}`)이어야 합니다.", "requireStringOrObject": "`{0}` 속성은 필수이며 `string` 또는 `object` 형식이어야 합니다.", diff --git a/i18n/kor/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/kor/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 2fca8d6643b69..7207158c622dc 100644 --- a/i18n/kor/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/kor/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "이 패키지에 표시된 VS Code 확장의 전체 기여입니다.", "vscode.extension.preview": "마켓플레이스에서 Preview로 플래그 지정할 확장을 설정합니다.", "vscode.extension.activationEvents": "VS Code 확장에 대한 활성화 이벤트입니다.", + "vscode.extension.activationEvents.onLanguage": "지정된 언어로 확인되는 파일을 열 때마다 활성화 이벤트가 발송됩니다.", + "vscode.extension.activationEvents.onCommand": "지정된 명령을 호출할 때마다 활성화 이벤트가 발송됩니다.", + "vscode.extension.activationEvents.onDebug": "지정된 유형의 디버깅 세션을 시작할 때마다 활성화 알림이 발송됩니다.", + "vscode.extension.activationEvents.workspaceContains": "지정된 glob 패턴과 일치하는 파일이 하나 이상 있는 폴더를 열 때마다 활성화 알림이 발송됩니다.", + "vscode.extension.activationEvents.onView": "지정된 뷰가 확장될 때마다 활성화 이벤트가 내보내 집니다.", + "vscode.extension.activationEvents.star": "VS Code 시작 시 활성화 이벤트가 발송됩니다. 훌륭한 최종 사용자 경험을 보장하려면 사용 케이스에서 다른 활성화 이벤트 조합이 작동하지 않을 때에만 확장에서 이 활성화 이벤트를 사용하세요.", "vscode.extension.badges": "마켓플레이스 확장 페이지의 사이드바에 표시할 배지의 배열입니다.", "vscode.extension.badges.url": "배지 이미지 URL입니다.", "vscode.extension.badges.href": "배지 링크입니다.", diff --git a/i18n/kor/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/kor/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..6b87a635f59dd --- /dev/null +++ b/i18n/kor/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "새 창", + "newWindowDesc": "새 창을 엽니다.", + "recentFolders": "최근 폴더", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/kor/src/vs/platform/markers/common/problemMatcher.i18n.json index ff679b577b235..22a96d0b0b808 100644 --- a/i18n/kor/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/kor/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,6 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "오류: 패턴 속성 {0}이(가) 유효한 패턴 변수 이름이 아닙니다.", "ProblemMatcherParser.problemPattern.watchingMatcher": "문제 검사기에서 감시 시작 패턴과 종료 패턴을 모두 정의해야 합니다.", "ProblemMatcherParser.invalidRegexp": "오류: {0} 문자열은 유효한 정규식이 아닙니다.\n", + "WatchingPatternSchema.regexp": "백그라운드 작업의 시작 또는 종료를 감지하는 정규식입니다.", "WatchingPatternSchema.file": "파일 이름의 일치 그룹 인덱스이며 생략할 수 있습니다.", "PatternTypeSchema.name": "제공되거나 미리 정의된 패턴의 이름", "PatternTypeSchema.description": "문제 패턴 또는 제공되거나 미리 정의된 문제 패턴의 이름입니다. 기본이 지정된 경우 생략할 수 있습니다.", @@ -42,6 +43,12 @@ "ProblemMatcherSchema.severity": "캡처 문제에 대한 기본 심각도입니다. 패턴에서 심각도에 대한 일치 그룹을 정의하지 않은 경우에 사용됩니다.", "ProblemMatcherSchema.applyTo": "텍스트 문서에 복된 문제가 열린 문서, 닫힌 문서 또는 모든 문서에 적용되는지를 제어합니다.", "ProblemMatcherSchema.fileLocation": "문제 패턴에 보고된 파일 이름을 해석하는 방법을 정의합니다.", + "ProblemMatcherSchema.background": "백그라운드 작업에서 활성 상태인 matcher의 시작과 끝을 추적하는 패턴입니다.", + "ProblemMatcherSchema.background.activeOnStart": "true로 설정한 경우 작업이 시작되면 백그라운드 모니터가 활성 모드로 전환됩니다. 이는 beginPattern과 일치하는 줄을 실행하는 것과 같습니다.", + "ProblemMatcherSchema.background.beginsPattern": "출력이 일치하는 경우 백그라운드 작업을 시작할 때 신호를 받습니다.", + "ProblemMatcherSchema.background.endsPattern": "출력이 일치하는 경우 백그라운드 작업을 끝날 때 신호를 받습니다.", + "ProblemMatcherSchema.watching.deprecated": "조사 속성은 사용되지 않습니다. 백그라운드 속성을 대신 사용하세요.", + "ProblemMatcherSchema.watching": "조사 matcher의 시작과 끝을 추적하는 패턴입니다.", "ProblemMatcherSchema.watching.activeOnStart": "true로 설정한 경우 작업이 시작되면 선택기가 활성 모드로 전환됩니다. 이는 beginPattern과 일치하는 줄을 실행하는 것과 같습니다.", "ProblemMatcherSchema.watching.beginsPattern": "출력이 일치하는 경우 조사 작업을 시작할 때 신호를 받습니다.", "ProblemMatcherSchema.watching.endsPattern": "출력이 일치하는 경우 조사 작업을 끝날 때 신호를 받습니다.", diff --git a/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json index 4ff5446bc0358..bae0d085ef9ca 100644 --- a/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/kor/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -7,14 +7,24 @@ "invalid.color": "잘못된 색 형식입니다. #RGB, #RGBA, #RRGGBB 또는 #RRGGBBAA를 사용하세요.", "schema.colors": "워크벤치에서 사용되는 색입니다.", "foreground": "전체 전경색입니다. 이 색은 구성 요소에서 재정의하지 않은 경우에만 사용됩니다.", + "errorForeground": "오류 메시지에 대한 전체 전경색입니다. 이 색은 구성 요소에서 재정의하지 않은 경우에만 사용됩니다.", + "descriptionForeground": "레이블과 같이 추가 정보를 제공하는 설명 텍스트의 전경색입니다.", "focusBorder": "포커스가 있는 요소의 전체 테두리 색입니다. 이 색은 구성 요소에서 재정의하지 않은 경우에만 사용됩니다.", "contrastBorder": "더 뚜렷이 대비되도록 요소를 다른 요소와 구분하는 요소 주위의 추가 테두리입니다.", "activeContrastBorder": "더 뚜렷이 대비되도록 요소를 다른 요소와 구분하는 활성 요소 주위의 추가 테두리입니다.", + "textSeparatorForeground": "텍스트 구분자 색상입니다.", + "textLinkForeground": "텍스트 내 링크의 전경색입니다.", + "textLinkActiveForeground": "텍스트 내 활성 링크의 전경색입니다.", + "textPreformatForeground": "미리 서식이 지정된 텍스트 세그먼트의 전경색입니다.", + "textBlockQuoteBackground": "텍스트 내 블록 인용의 전경색입니다.", + "textBlockQuoteBorder": "텍스트 내 블록 인용의 테두리 색입니다.", + "textCodeBlockBackground": "텍스트 내 코드 블록의 전경색입니다.", "widgetShadow": "편집기 내에서 찾기/바꾸기 같은 위젯의 그림자 색입니다.", "inputBoxBackground": "입력 상자 배경입니다.", "inputBoxForeground": "입력 상자 전경입니다.", "inputBoxBorder": "입력 상자 테두리입니다.", "inputBoxActiveOptionBorder": "입력 필드에서 활성화된 옵션의 테두리 색입니다.", + "inputPlaceholderForeground": "위치 표시자 텍스트에 대한 입력 상자 전경색입니다.", "inputValidationInfoBackground": "정보 심각도의 입력 유효성 검사 배경색입니다.", "inputValidationInfoBorder": "정보 심각도의 입력 유효성 검사 테두리 색입니다.", "inputValidationWarningBackground": "정보 경고의 입력 유효성 검사 배경색입니다.", @@ -25,10 +35,13 @@ "dropdownForeground": "드롭다운 전경입니다.", "dropdownBorder": "드롭다운 테두리입니다.", "listFocusBackground": "목록/트리가 활성 상태인 경우 포커스가 있는 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", + "listFocusForeground": "목록/트리가 활성 상태인 경우 포커스가 있는 항목의 목록/트리 전경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", "listActiveSelectionBackground": "목록/트리가 활성 상태인 경우 선택한 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", "listActiveSelectionForeground": "목록/트리가 활성 상태인 경우 선택한 항목의 목록/트리 전경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", "listInactiveSelectionBackground": "목록/트리가 비활성 상태인 경우 선택한 항목의 목록/트리 배경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", + "listInactiveSelectionForeground": "목록/트리가 비활성 상태인 경우 선택한 항목의 목록/트리 전경색입니다. 목록/트리가 활성 상태이면 키보드 포커스를 가지며, 비활성 상태이면 포커스가 없습니다.", "listHoverBackground": "마우스로 항목을 가리킬 때 목록/트리 배경입니다.", + "listHoverForeground": "마우스로 항목을 가리킬 때 목록/트리 전경입니다.", "listDropBackground": "마우스로 항목을 이동할 때 목록/트리 끌어서 놓기 배경입니다.", "highlight": "목록/트리 내에서 검색할 때 일치 항목 강조 표시의 목록/트리 전경색입니다.", "pickerGroupForeground": "그룹화 레이블에 대한 빠른 선택기 색입니다.", @@ -36,13 +49,17 @@ "buttonForeground": "단추 기본 전경색입니다.", "buttonBackground": "단추 배경색입니다.", "buttonHoverBackground": "마우스로 가리킬 때 단추 배경색입니다.", + "badgeBackground": "배지 배경색입니다. 배지는 검색 결과 수와 같은 소량의 정보 레이블입니다.", + "badgeForeground": "배지 전경색입니다. 배지는 검색 결과 수와 같은 소량의 정보 레이블입니다.", "scrollbarShadow": "스크롤되는 보기를 나타내는 스크롤 막대 그림자입니다.", "scrollbarSliderBackground": "슬라이더 배경색입니다.", "scrollbarSliderHoverBackground": "마우스로 가리킬 때 슬라이더 배경색입니다.", "scrollbarSliderActiveBackground": "활성 상태인 경우 슬라이더 배경색입니다.", + "progressBarBackground": "오래 실행 중인 작업에 대해 표시되는 진행률 표시 막대의 배경색입니다.", "editorBackground": "편집기 배경색입니다.", "editorForeground": "편집기 기본 전경색입니다.", "editorWidgetBackground": "찾기/바꾸기 같은 편집기 위젯의 배경색입니다.", + "editorWidgetBorder": "편집기 위젯의 테두리 색입니다. 위젯에 테두리가 있고 위젯이 색상을 무시하지 않을 때만 사용됩니다.", "editorSelection": "편집기 선택 영역의 색입니다.", "editorInactiveSelection": "비활성 편집기 선택 영역의 색입니다.", "editorSelectionHighlight": "선택 영역과 동일한 콘텐츠가 있는 영역의 색입니다.", @@ -56,5 +73,12 @@ "diffEditorInserted": "삽입된 텍스트의 배경색입니다.", "diffEditorRemoved": "제거된 텍스트의 배경색입니다.", "diffEditorInsertedOutline": "삽입된 텍스트의 윤곽선 색입니다.", - "diffEditorRemovedOutline": "제거된 텍스트의 윤곽선 색입니다." + "diffEditorRemovedOutline": "제거된 텍스트의 윤곽선 색입니다.", + "mergeCurrentHeaderBackground": "인라인 병합 충돌의 현재 헤더 배경입니다.", + "mergeCurrentContentBackground": "인라인 병합 충돌의 현재 콘텐츠 배경입니다.", + "mergeIncomingHeaderBackground": "인라인 병합 충돌에서 수신 헤더 배경입니다.", + "mergeIncomingContentBackground": "인라인 병합 충돌에서 수신 콘텐츠 배경입니다.", + "mergeBorder": "인라인 병합 충돌에서 헤더 및 스플리터의 테두리 색입니다.", + "overviewRulerCurrentContentForeground": "인라인 병합 충돌에서 현재 개요 눈금 전경색입니다.", + "overviewRulerIncomingContentForeground": "인라인 병합 충돌에서 수신 개요 눈금 전경색입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/kor/src/vs/workbench/api/node/extHostTask.i18n.json index 8b6ad71cd4e6d..4b90a12aaf247 100644 --- a/i18n/kor/src/vs/workbench/api/node/extHostTask.i18n.json +++ b/i18n/kor/src/vs/workbench/api/node/extHostTask.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/kor/src/vs/workbench/api/node/extHostTreeViews.i18n.json index 8b6ad71cd4e6d..4dfa6a6e897b2 100644 --- a/i18n/kor/src/vs/workbench/api/node/extHostTreeViews.i18n.json +++ b/i18n/kor/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "treeView.notRegistered": "ID가 '{0}'인 등록된 트리 뷰가 없습니다.", + "treeItem.notFound": "ID가 '{0}'인 트리 항목을 찾을 수 없습니다.", + "treeView.duplicateElement": "{0} 요소가 이미 등록되어 있습니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/kor/src/vs/workbench/browser/actions/configureLocale.i18n.json index 7244381347332..4623005568330 100644 --- a/i18n/kor/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,6 +7,7 @@ "configureLocale": "언어 구성", "displayLanguage": "VSCode의 표시 언어를 정의합니다.", "doc": "지원되는 언어 목록은 {0} 을(를) 참조하세요.", + "restart": "값을 변경하려면 VSCode를 다시 시작해야 합니다.", "fail.createSettings": "'{0}'({1})을(를) 만들 수 없습니다.", "JsonSchema.locale": "사용할 UI 언어입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index 64445b492e09f..775ac0271857b 100644 --- a/i18n/kor/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "작업 막대 숨기기", - "activityBarAriaLabel": "활성 뷰 전환기" + "activityBarAriaLabel": "활성 뷰 전환기", + "globalActions": "전역 작업" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index 8b7506a02d06a..0f9049de2acea 100644 --- a/i18n/kor/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -10,7 +10,7 @@ "multiSelection": "{0} 선택 항목", "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", - "tabFocusModeEnabled": "Tab으로 포커스 이동", + "screenReaderDetectedExtra": "화면 읽기 프로그램을 사용하지 않는 경우 `editor.accessibilitySupport` 설정을 \"off\"로 변경하세요.", "disableTabMode": "접근성 모드 사용 안 함", "gotoLine": "줄 이동", "indentation": "들여쓰기", diff --git a/i18n/kor/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/kor/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..8b1fffebc06a3 --- /dev/null +++ b/i18n/kor/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "파일로 이동...", + "quickNavigateNext": "Quick Open에서 다음 탐색", + "quickNavigatePrevious": "Quick Open에서 이전 탐색", + "quickSelectNext": "Quick Open에서 다음 선택", + "quickSelectPrevious": "Quick Open에서 이전 선택" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/quickopen.i18n.json b/i18n/kor/src/vs/workbench/browser/quickopen.i18n.json index 438739dc2828c..15bbb282f5256 100644 --- a/i18n/kor/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "일치하는 결과 없음", "noResultsFound2": "결과 없음", - "entryAriaLabel": "{0}, 명령", - "noCommands": "일치하는 명령 없음" + "entryAriaLabel": "{0}, 명령" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/browser/viewlet.i18n.json b/i18n/kor/src/vs/workbench/browser/viewlet.i18n.json index c5364af71848c..1b18c6972e499 100644 --- a/i18n/kor/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/kor/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "모두 축소", - "viewToolbarAriaLabel": "{0} 동작" + "collapse": "모두 축소" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/common/theme.i18n.json b/i18n/kor/src/vs/workbench/common/theme.i18n.json index 182ceaa205ece..96c96b6d68740 100644 --- a/i18n/kor/src/vs/workbench/common/theme.i18n.json +++ b/i18n/kor/src/vs/workbench/common/theme.i18n.json @@ -7,27 +7,42 @@ "tabActiveBackground": "활성 탭 배경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", "tabInactiveBackground": "비활성 탭 배경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", "tabBorder": "탭을 서로 구분하기 위한 테두리입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", + "tabActiveForeground": "활성 그룹의 활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", + "tabInactiveForeground": "활성 그룹의 비활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", + "tabUnfocusedActiveForeground": "비활성 그룹의 활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", + "tabUnfocusedInactiveForeground": "비활성 그룹의 비활성 탭 전경색입니다. 탭은 편집기 영역에서 편집기의 컨테이너입니다. 한 편집기 그룹에서 여러 탭을 열 수 있습니다. 여러 편집기 그룹이 있을 수 있습니다.", "editorGroupBackground": "편집기 그룹의 배경색입니다. 편집기 그룹은 편집기의 컨테이너입니다. 배경색은 편집기 그룹을 끌 때 표시됩니다.", + "tabsContainerBackground": "탭을 사용도록 설정한 경우 편집기 그룹 제목 머리글의 배경색입니다. 편집기 그룹은 편집기의 컨테이너입니다.", + "tabsContainerBorder": "탭을 사용하도록 설정한 경우 편집기 그룹 제목 머리글의 테두리 색입니다. 편집기 그룹은 편집기의 컨테이너입니다.", "editorGroupHeaderBackground": "탭을 사용하지 않도록 설정한 경우 편집기 그룹 제목 머리글의 배경색입니다. 편집기 그룹은 편집기의 컨테이너입니다.", "editorGroupBorder": "여러 편집기 그룹을 서로 구분하기 위한 색입니다. 편집기 그룹은 편집기의 컨테이너입니다.", + "editorDragAndDropBackground": "편집기를 끌 때 배경색입니다. 편집기 내용이 계속 비추어 보이도록 이 색은 투명해야 합니다.", + "panelBackground": "패널 배경색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "panelBorder": "편집기와 구분되는 맨 위의 패널 테두리 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "panelActiveTitleForeground": "활성 패널의 제목 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "panelInactiveTitleForeground": "비활성 패널의 제목 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "panelActiveTitleBorder": "활성 패널 제목의 테두리 색입니다. 패널은 편집기 영역 아래에 표시되며 출력 및 통합 터미널 같은 보기가 포함됩니다.", "statusBarForeground": "상태 표시줄 전경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "statusBarBackground": "표준 상태 표시줄 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", + "statusBarBorder": "사이드바 및 편집기와 구분하는 상태 표시줄 테두리 색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "statusBarNoFolderBackground": "폴더가 열리지 않았을 때의 상태 표시줄 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", + "statusBarNoFolderForeground": "폴더가 열리지 않았을 때의 상태 표시줄 전경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "statusBarItemActiveBackground": "클릭할 때의 상태 표시줄 항목 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "statusBarItemHoverBackground": "마우스로 가리킬 때의 상태 표시줄 항목 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "statusBarProminentItemBackground": "상태 표시줄 주요 항목 배경색입니다. 주요 항목은 중요도를 나타내는 다른 상태 표시줄 항목보다 눈에 잘 띕니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "statusBarProminentItemHoverBackground": "마우스로 가리킬 때의 상태 표시줄 주요 항목 배경색입니다. 주요 항목은 중요도를를 나타내는 다른 상태 표시줄 항목보다 눈에 잘 띕니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", "activityBarBackground": "작업 막대 배경색입니다. 작업 막대는 맨 왼쪽이나 오른쪽에 표시되며 사이드바의 뷰 간을 전환하는 데 사용할 수 있습니다.", "activityBarForeground": "작업 막대 전경 색(예: 아이콘에 사용됨)입니다. 작업 막대는 오른쪽이나 왼쪽 끝에 표시되며 사이드바의 보기 간을 전환할 수 있습니다.", + "activityBarBorder": "사이드바와 구분하는 작업 막대 테두리색입니다. 작업 막대는 오른쪽이나 왼쪽 끝에 표시되며 사이드바의 보기 간을 전환할 수 있습니다.", + "activityBarDragAndDropBackground": "작업 막대 항목의 끌어서 놓기 피드백 색입니다. 작업 막대 항목이 계속 비추어 보이도록 이 색은 투명해야 합니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", "activityBarBadgeBackground": "활동 알림 배지 배경색입니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", "activityBarBadgeForeground": "활동 알림 배지 전경색입니다. 작업 막대는 왼쪽이나 오른쪽 끝에 표시되며 사이드바의 보기를 전환할 수 있습니다.", "sideBarBackground": "사이드바 배경색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", + "sideBarForeground": "사이드바 전경색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", + "sideBarBorder": "편집기와 구분하는 측면의 사이드바 테두리 색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", "sideBarTitleForeground": "사이드바 제목 전경색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", "sideBarSectionHeaderBackground": "사이드바 섹션 헤더 배경색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", + "sideBarSectionHeaderForeground": "사이드바 섹션 헤더 전경색입니다. 사이드바는 탐색기 및 검색과 같은 뷰의 컨테이너입니다.", "titleBarActiveForeground": "창이 활성화된 경우의 제목 표시줄 전경입니다. 이 색은 현재 macOS에서만 지원됩니다.", "titleBarInactiveForeground": "창이 비활성화된 경우의 제목 표시줄 전경입니다. 이 색은 현재 macOS에서만 지원됩니다.", "titleBarActiveBackground": "창을 활성화할 때의 제목 표시줄 전경입니다. 이 색은 현재 macOS에서만 지원됩니다.", diff --git a/i18n/kor/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/actions.i18n.json index dce95cceba857..f17d6eb1c6e9d 100644 --- a/i18n/kor/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/kor/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "편집기 닫기", "closeWindow": "창 닫기", - "switchWindow": "창 전환", - "switchWindowPlaceHolder": "창 선택", - "current": "현재 창", "closeFolder": "폴더 닫기", "noFolderOpened": "이 인스턴스에 현재 열려 있는 닫을 폴더가 없습니다.", "newWindow": "새 창", @@ -20,7 +17,7 @@ "zoomReset": "확대/축소 다시 설정", "appPerf": "시작 성능", "reloadWindow": "창 다시 로드", - "openRecent": "최근 파일 열기", + "current": "현재 창", "folders": "폴더", "files": "파일", "openRecentPlaceHolderMac": "경로 선택(새 창에서 열려면 Cmd 키를 길게 누름)", @@ -32,10 +29,6 @@ "openDocumentationUrl": "설명서", "openIntroductoryVideosUrl": "소개 비디오", "toggleSharedProcess": "공유 프로세스 설정/해제", - "navigateLeft": "뷰 왼쪽으로 이동", - "navigateRight": "뷰 오른쪽으로 이동", - "navigateUp": "뷰 위로 이동", - "navigateDown": "뷰 아래로 이동", "increaseViewSize": "현재 뷰 크기 늘리기", "decreaseViewSize": "현재 뷰 크기 줄이기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json index 4c30f4bc75c5c..2bb9dd4aa4808 100644 --- a/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -31,10 +31,6 @@ "window.openFoldersInNewWindow.off": "폴더가 마지막 활성 창을 바꿉니다.", "window.openFoldersInNewWindow.default": "폴더를 응용 프로그램 내에서 선택(예: 파일 메뉴를 통해)하는 경우를 제외하고 폴더가 새 창에서 열립니다.", "openFoldersInNewWindow": "폴더를 새 창에서 열지, 마지막 활성 창과 바꿀지를 제어합니다.\n- default: 응용 프로그램 내에서 [파일] 메뉴 등을 통해 폴더를 선택하는 경우를 제외하고, 폴더는 새 창에서 열립니다.\n- on: 폴더가 새 창에서 열립니다.\n- off: 폴더가 마지막 활성 창을 대체합니다\n이 설정이 무시되는 경우도 있을 수 있습니다(예: -new-window 또는 -reuse-window 명령줄 옵션을 사용할 경우).", - "window.reopenFolders.none": "폴더를 다시 열지 않습니다.", - "window.reopenFolders.one": "마지막 활성 폴더를 다시 엽니다.", - "window.reopenFolders.all": "마지막 세션의 모든 폴더를 다시 엽니다.", - "reopenFolders": "다시 시작한 이후에 폴더를 다시 여는 방법을 제어합니다. 폴더를 다시 열지 않으려면 'none'을 선택하고, 마지막으로 작업한 폴더를 다시 열려면 'one'을 선택하고, 마지막 세션의 모든 폴더를 다시 열려면 'all'을 선택합니다.", "restoreFullscreen": "창이 전체 화면 모드에서 종료된 경우 창을 전체 화면 모드로 복원할지 여부를 제어합니다.", "zoomLevel": "창의 확대/축소 수준을 조정합니다. 원래 크기는 0이고 각 상한 증분(예: 1) 또는 하한 증분(예: -1)은 20% 더 크거나 더 작게 확대/축소하는 것을 나타냅니다. 10진수를 입력하여 확대/축소 수준을 세부적으로 조정할 수도 있습니다.", "title": "활성 편집기를 기반으로 창 제목을 제어합니다. 변수는 컨텍스트를 기반으로 대체됩니다.\n${activeEditorShort}: 예: myFile.txt\n${activeEditorMedium}: 예: myFolder/myFile.txt\n${activeEditorLong}: 예: /Users/Development/myProject/myFolder/myFile.txt\n${rootName}: 예: myProject\n${rootPath}: 예: /Users/Development/myProject\n${appName}: 예: VS Code\n${dirty}: 활성 편집기가 더티인 경우 더티 표시기\n${separator}: 값이 있는 변수로 둘러싸인 경우에만 표시되는 조건부 구분 기호(\" - \")", @@ -42,11 +38,13 @@ "window.newWindowDimensions.inherit": "마지막 활성 창과 동일한 크기로 새 창을 엽니다.", "window.newWindowDimensions.maximized": "최대화된 새 창을 엽니다.", "window.newWindowDimensions.fullscreen": "전체 화면 모드에서 새 창을 엽니다.", + "newWindowDimensions": "하나 이상의 창이 이미 열려 있을 때 여는 새 새 창의 크기를 제어합니다. 기본적으로 새 창은 화면 가운데에 작은 크기로 열립니다. 'inherit'으로 설정할 경우 마지막 활성 창과 동일한 크기로 창이 열립니다. 'maximized'로 설정할 경우 창이 최대화되어 열리고 'fullscreen'으로 구성할 경우 전체 화면으로 열립니다. 이 설정은 여는 첫 번째 창에는 적용되지 않습니다. 첫 번째 창의 경우 항상 창을 닫기 전의 크기와 위치가 복원됩니다.", "window.menuBarVisibility.default": "메뉴가 전체 화면 모드에서만 숨겨집니다.", "window.menuBarVisibility.visible": "메뉴가 전체 화면 모드에서도 항상 표시됩니다.", "window.menuBarVisibility.toggle": "메뉴가 숨겨져 있지만 키를 통해 메뉴를 표시할 수 있습니다.", "window.menuBarVisibility.hidden": "메뉴가 항상 숨겨집니다.", "menuBarVisibility": "메뉴 모음의 표시 여부를 제어합니다. '설정/해제'를 설정함으로써 메뉴 모음이 숨겨지고 키를 누를 때마다 메뉴 모음이 표시됩니다. 기본값으로, 창이 전체 화면인 경우를 제외하고 메뉴 모음이 표시됩니다.", + "enableMenuBarMnemonics": "사용하도록 설정하는 경우 Alt 키 바로 가기를 통해 주 메뉴를 열 수 있습니다. 니모닉을 사용하지 않도록 설정하면 대신 이러한 Alt 키 바로 가기를 편집기 명령에 바인딩할 수 있습니다.", "autoDetectHighContrast": "사용하도록 설정한 경우 Windows에서 고대비 테마를 사용 중이면 고대비 테마로 자동으로 변경되고 Windows 고대비 테마를 해제하면 어두운 테마로 변경됩니다.", "titleBarStyle": "창 제목 표시줄의 모양을 조정합니다. 변경 내용을 적용하려면 전체 다시 시작해야 합니다.", "window.nativeTabs": "macOS Sierra 창 탭을 사용하도록 설정합니다. 변경\n 내용을 적용하려면 전체 다시 시작해야 하고, 기본 탭에서\n 사용자 지정 제목 표시줄 스타일(구성된 경우)을 비활성화합니다.", @@ -56,5 +54,7 @@ "zenMode.hideTabs": "Zen 모드를 켜면 워크벤치 탭도 숨길지를 제어합니다.", "zenMode.hideStatusBar": "Zen 모드를 켜면 워크벤치 하단에서 상태 표시줄도 숨길지를 제어합니다.", "zenMode.hideActivityBar": "Zen 모드를 켜면 워크벤치의 왼쪽에 있는 작업 막대도 숨길지\n 여부를 제어합니다.", - "zenMode.restore": "창이 Zen 모드에서 종료된 경우 Zen 모드로 복원할지 제어합니다." + "zenMode.restore": "창이 Zen 모드에서 종료된 경우 Zen 모드로 복원할지 제어합니다.", + "workspaceConfigurationTitle": "작업 영역", + "files.exclude.boolean": "파일 경로를 일치시킬 GLOB 패턴입니다. 패턴을 사용하거나 사용하지 않도록 설정하려면 true 또는 false로 설정하세요." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..e7e010529e224 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "이제 `editor.accessibilitySupport` 설정을 'on'으로 변경합니다.", + "openingDocs": "이제 VS Code 접근성 설명서 페이지를 엽니다.", + "introMsg": "VS Code의 접근성 옵션을 사용해 주셔서 감사합니다.", + "status": "상태:", + "changeConfigToOnMac": "화면 읽기 프로그램에서 사용에 영구적으로 최적화되도록 편집기를 구성하려면 지금 Command+E를 누르세요.", + "changeConfigToOnWinLinux": "화면 읽기 프로그램에서 사용에 영구적으로 최적화되도록 편집기를 구성하려면 지금 Command+E를 누르세요.", + "auto_unknown": "편집기는 플랫폼 API를 사용하여 화면 읽기 프로그램이 연결되는 시기를 검색하도록 구성되어 있지만 현재 런타임에서는 이 구성을 지원하지 않습니다.", + "auto_on": "편집기는 화면 읽기 프로그램이 연결되어 있음을 자동으로\n 검색했습니다.", + "auto_off": "편집기는 화면 편집기가 연결되는 시기를 자동으로 검색하도록 구성되어 있지만, 이 구성은 현재 지원되지 않습니다.", + "configuredOn": "편집기는 화면 읽기 프로그램에서 사용에 영구적으로 최적화되도록 편집기를 구성되어 있습니다. `editor.accessibilitySupport` 설정을 편집하여 이 구성을 변경할 수 있습니다.", + "configuredOff": "편집기는 화면 읽기 프로그램에서 사용에 최적화되지 않도록 구성되었습니다.", + "tabFocusModeOnMsg": "현재 편집기에서 키를 누르면 포커스가 다음 포커스 가능한 요소로 이동합니다. {0}을(를) 눌러서 이 동작을 설정/해제합니다.", + "tabFocusModeOnMsgNoKb": "현재 편집기에서 키를 누르면 포커스가 다음 포커스 가능한 요소로 이동합니다. {0} 명령은 현재 키 바인딩으로 트리거할 수 없습니다.", + "tabFocusModeOffMsg": "현재 편집기에서 키를 누르면 탭 문자가 삽입됩니다. {0}을(를) 눌러서 이 동작을 설정/해제합니다.", + "tabFocusModeOffMsgNoKb": "현재 편집기에서 키를 누르면 탭 문자가 삽입됩니다. {0} 명령은 현재 키 바인딩으로 트리거할 수 없습니다.", + "openDocMac": "브라우저 창에 접근성과 관련된 추가 VS Code 정보를 열려면 Command+H를 누르세요.", + "openDocWinLinux": "브라우저 창에 접근성과 관련된 추가 VS Code 정보를 열려면 지금 Control+H를 누르세요.", + "outroMsg": "이 도구 설명을 해제하고 Esc 키 또는 Shift+Esc를 눌러서 편집기로 돌아갈 수 있습니다.", + "ShowAccessibilityHelpAction": "접근성 도움말 표시" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..4b0a0af7f76de --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "다중 커서 한정자 설정/해제" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index 60f3a2078085d..46ca3defb9b7e 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "{0} 열기", "launchJsonNeedsConfigurtion": "'launch.json' 구성 또는 수정", + "noFolderDebugConfig": "고급 디버그 구성을 수행하려면 먼저 폴더를 여세요.", "startDebug": "디버깅 시작", "startWithoutDebugging": "디버깅하지 않고 시작", "selectAndStartDebugging": "디버깅 선택 및 시작", diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json index 8b6ad71cd4e6d..9f3ccc2a869b8 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "noFolderDebugConfig": "고급 디버그 구성을 수행하려면 먼저 폴더를 여세요." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json index c9ed1bd1f227c..b890a7946e25d 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json @@ -5,16 +5,12 @@ // Do not edit this file. It is machine generated. { "variablesSection": "변수 섹션", - "variables": "변수", "variablesAriaTreeLabel": "변수 디버그", "expressionsSection": "식 섹션", - "watch": "조사식", "watchAriaTreeLabel": "조사식 디버그", "callstackSection": "호출 스택 섹션", "debugStopped": "{0}에서 일시 중지됨", - "callStack": "호출 스택", "callStackAriaLabel": "호출 스택 디버그", "breakpointsSection": "중단점 섹션", - "breakpoints": "중단점", "breakpointsAriaTreeLabel": "중단점 디버그" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index 889e2264a0182..0477024ab5d44 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "값 복사", "copy": "복사", + "copyAll": "모두 복사", "copyStackTrace": "호출 스택 복사" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index fa9a8cbb690ab..6de8809b45e61 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "프로그램이 디버그될 때의 상태 표시줄 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다." + "statusBarDebuggingBackground": "프로그램이 디버그될 때의 상태 표시줄 배경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다.", + "statusBarDebuggingForeground": "프로그램이 디버그될 때의 상태 표시줄 전경색입니다. 상태 표시줄은 창의 맨 아래에 표시됩니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/kor/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index fb59d091ab99e..6be8b2345dfb0 100644 --- a/i18n/kor/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "디버그 어댑터 실행 파일 '{0}'이(가) 없습니다.", "debugAdapterCannotDetermineExecutable": "디버그 어댑터 '{0}'에 대한 실행 파일을 확인할 수 없습니다.", "debugType": "구성의 형식입니다.", + "debugTypeNotRecognised": "디버그 형식이 인식되지 않습니다. 해당하는 디버그 확장을 설치하고 사용하도록 설정했는지 확인하세요.", "node2NotSupported": "\"node2\"는 더 이상 지원되지 않습니다. 대신 \"node\"를 사용하고 \"protocol\" 특성을 \"inspector\"로 설정하세요.", "debugName": "구성 이름이며, 구성 시작 드롭다운 메뉴에 표시됩니다.", "debugRequest": "구성 형식을 요청합니다. \"시작\" 또는 \"연결\"일 수 있습니다.", diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index 739aa4ea5378a..12f82e199c95a 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "previousEditPoint": "Emmet: 이전 편집 점", - "nextEditPoint": "Emmet: 다음 편집 점" + "previousEditPoint": "Emmet: 이전 편집 점으로 이동", + "nextEditPoint": "Emmet: 다음 편집 점으로 이동" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index b4ba4df288c3d..5b243d9a2c538 100644 --- a/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -9,5 +9,6 @@ "emmetPreferences": "Emmet의 일부 작업 및 해결 프로그램의 동작을 수정하는 데 사용되는 기본 설정입니다.", "emmetSyntaxProfiles": "지정된 구문에 대한 프로필을 정의하거나 특정 규칙이 포함된 고유한 프로필을 사용하세요.", "emmetExclude": "Emmet 약어를 확장하면 안 되는 언어의 배열입니다.", - "emmetExtensionsPath": "Emmet 프로필, 코드 조각 및 기본 설정이 포함된 폴더의 경로" + "emmetExtensionsPath": "Emmet 프로필, 코드 조각 및 기본 설정이 포함된 폴더의 경로", + "useNewEmmet": "모든 emmet 기능에 대해 새 emmet 모듈을 사용해 보세요(이전 단일 emmet 라이브러리를 대체함)." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index e290352a80156..4600edbe9fd57 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,10 @@ "default": "기본값", "debuggers": "디버거({0})", "debugger name": "이름", + "views": "뷰({0})", + "view id": "ID", + "view name": "이름", + "view location": "위치", "themes": "테마({0})", "JSON Validation": "JSON 유효성 검사({0})", "commands": "명령({0})", diff --git a/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 02f4f0241769c..748fbd6e5f8c0 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,6 +22,8 @@ "disableGloballyAction": "항상", "disableAction": "사용 안 함", "checkForUpdates": "업데이트 확인", + "enableAutoUpdate": "확장 자동 업데이트 사용", + "disableAutoUpdate": "확장 자동 업데이트 사용 안 함", "updateAll": "모든 확장 업데이트", "reloadAction": "다시 로드", "postUpdateTooltip": "업데이트하려면 다시 로드", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "작업 영역 권장 확장 표시", "showRecommendedKeymapExtensions": "권장되는 키 맵 표시", "showRecommendedKeymapExtensionsShort": "키 맵", + "showLanguageExtensions": "언어 확장 표시", + "showLanguageExtensionsShort": "언어 확장", "configureWorkspaceRecommendedExtensions": "권장 확장 구성(작업 영역)", "ConfigureWorkspaceRecommendations.noWorkspace": "권장 사항은 작업 영역 폴더에서만 사용할 수 있습니다.", "OpenExtensionsFile.failed": "'.vscode' 폴더({0}) 내에 'extensions.json' 파일을 만들 수 없습니다.", @@ -51,5 +55,8 @@ "disableAll": "설치된 모든 확장 사용 안 함", "disableAllWorkspace": "이 작업 영역에 대해 설치된 모든 확장 사용 안 함", "enableAll": "설치된 모든 확장 사용", - "enableAllWorkspace": "이 작업 영역에 대해 설치된 모든 확장 사용" + "enableAllWorkspace": "이 작업 영역에 대해 설치된 모든 확장 사용", + "extensionButtonProminentBackground": "눈에 잘 띄는 작업 확장의 단추 배경색입니다(예: 설치 단추).", + "extensionButtonProminentForeground": "눈에 잘 띄는 작업 확장의 단추 전경색입니다(예: 설치 단추).", + "extensionButtonProminentHoverBackground": "눈에 잘 띄는 작업 확장의 단추 배경 커서 올리기 색입니다(예: 설치 단추)." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index 84dc72bd8eb1c..3e7d2bd101a83 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -9,6 +9,8 @@ "neverShowAgain": "다시 표시 안 함", "close": "닫기", "workspaceRecommended": "이 작업 영역에 확장 권장 사항이 있습니다.", + "ignoreExtensionRecommendations": "확장 권장 사항을 모두 무시하시겠습니까?", + "ignoreAll": "예, 모두 무시", "no": "아니요", "cancel": "취소" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 467a41c361ac4..ef99dee28ef1e 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -10,5 +10,6 @@ "extensions": "확장", "view": "보기", "extensionsConfigurationTitle": "확장", - "extensionsAutoUpdate": "자동으로 확장 업데이트" + "extensionsAutoUpdate": "자동으로 확장 업데이트", + "extensionsIgnoreRecommendations": "확장 권장 사항 무시" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 77a775439157c..f2a02a3a9f95a 100644 --- a/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,8 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "disableOtherKeymapsConfirmation": "키 바인딩 간 충돌을 피하기 위해 다른 키 맵({0})을 사용하지 않도록 설정할까요?", "yes": "예", "no": "아니요", + "betterMergeDisabled": "Better Merge 확장이 이제 빌드되었습니다. 설치된 확장은 사용하지 않도록 설정되었으며 제거할 수 있습니다.", "uninstall": "제거", "later": "나중에" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index fe8ef9500cec1..6ad22dfdfbc75 100644 --- a/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,6 +16,7 @@ "associations": "파일과 언어의 연결을 구성하세요(예: \"*.extension\": \"html\"). 이러한 구성은 설치된 언어의 기본 연결보다 우선 순위가 높습니다.", "encoding": "파일을 읽고 쓸 때 사용할 기본 문자 집합 인코딩입니다.", "autoGuessEncoding": "사용하도록 설정하는 경우 파일을 열 때 문자 집합 인코딩을 추측합니다.", + "eol": "줄 바꿈 문자의 기본 끝입니다. LF에는 \\n, CRLF에는 \\r\\n을 사용하세요.", "trimTrailingWhitespace": "사용하도록 설정되면 파일을 저장할 때 후행 공백이 잘립니다.", "insertFinalNewline": "사용하도록 설정되면 저장할 때 파일 끝에 마지막 줄바꿈을 삽입합니다.", "files.autoSave.off": "더티 파일이 자동으로 저장되지 않습니다.", @@ -26,6 +27,7 @@ "autoSaveDelay": "더티 파일을 자동으로 저장할 때까지의 지연(밀리초)을 제어합니다. 'files.autoSave'를 '{0}'(으)로 설정한 경우에만 적용됩니다.", "watcherExclude": "파일 감시에서 제외할 파일 경로의 GLOB 패턴을 구성하세요. 이 설정을 변경하려면 다시 시작해야 합니다. 시작 시 Code에서 CPU 시간을 많이 차지하면 대용량 폴더를 제외하여 초기 로드를 줄일 수 있습니다.", "hotExit.off": "핫 종료를 사용하지 않습니다.", + "hotExit.onExit": "핫 종료는 응용 프로그램을 닫을 때 트리거됩니다. 즉 Windows/Linux에서 마지막 창을 닫을 때나 workbench.action.quit 명령이 트리거될 때(명령 팔레트, 키 바인딩, 메뉴)입니다. 다음 실행 시 백업을 포함한 모든 창이 복원됩니다.", "hotExit": "저장하지 않은 파일을 세션 간에 기억하여, 편집기를 종료할 때 저장할지 묻는 메시지를 건너뛸지 여부를 제어합니다.", "defaultLanguage": "새 파일에 할당되는 기본 언어 모드입니다.", "editorConfigurationTitle": "편집기", diff --git a/i18n/kor/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/kor/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index 3aeececa62a3b..d5e1244f535ad 100644 --- a/i18n/kor/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -5,7 +5,5 @@ // Do not edit this file. It is machine generated. { "explorerSection": "파일 탐색기 섹션", - "noWorkspace": "열린 폴더 없음", - "noWorkspaceHelp": "아직 폴더를 열지 않았습니다.", "openFolder": "폴더 열기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/kor/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index a820c30095af7..cb51b565b3155 100644 --- a/i18n/kor/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "열려 있는 편집기 섹션", "openEditors": "열려 있는 편집기", + "openEditosrSection": "열려 있는 편집기 섹션", "treeAriaLabel": "열린 편집기: 활성 파일 목록", "dirtyCounter": "{0}이(가) 저장되지 않음" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index ef1cdc9bc0949..3eaa6c8350957 100644 --- a/i18n/kor/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -9,5 +9,7 @@ "prof.message": "프로필을 만들었습니다.", "prof.detail": "문제를 발생시키고 다음 파일을 수동으로 첨부하세요.\n{0}", "prof.restartAndFileIssue": "문제 만들기 및 다시 시작", - "prof.restart": "다시 시작" + "prof.restart": "다시 시작", + "prof.thanks": "도움을 주셔서 감사합니다.", + "prof.detail.restart": "계속 '{0}'을(를) 사용하려면 마지막으로 다시 시작해야 합니다. 기여해 주셔서 다시 한번 감사드립니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index fee497eeb33c7..aa4e75fa0bcbe 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "키 바인딩 정의", - "defineKeybinding.kbLayoutErrorMessage": "현재 자판 배열에서는 이 키 조합을 생성할 수 없습니다." + "defineKeybinding.kbLayoutErrorMessage": "현재 자판 배열에서는 이 키 조합을 생성할 수 없습니다.", + "defineKeybinding.kbLayoutLocalAndUSMessage": "현재 자판 배열의 경우 **{0}**입니다(**{1}**: 미국 표준).", + "defineKeybinding.kbLayoutLocalMessage": "현재 자판 배열의 경우 **{0}**입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 353737131fc4a..473165389206c 100644 --- a/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "설정에 쓸 수 없습니다. 파일에서 오류/경고를 해결하고 다시 시도하세요.", "editTtile": "편집", "replaceDefaultValue": "설정에서 바꾸기", "copyDefaultValue": "설정에 복사", diff --git a/i18n/kor/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/kor/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index dec2d486f02f9..d410308122c67 100644 --- a/i18n/kor/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "모든 명령 표시", + "showCommands.label": "명령 팔레트...", "entryAriaLabelWithKey": "{0}, {1}, 명령", "entryAriaLabel": "{0}, 명령", "canNotRun": "'{0}' 명령은 여기에서 실행할 수 없습니다.", diff --git a/i18n/kor/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..f1cc0233f255c --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchMessage": "설정이 변경되어 다시 시작해야만 적용됩니다.", + "relaunchDetail": "[다시 시작] 단추를 눌러 {0}을(를) 다시 시작하고 설정을 사용하도록 설정하세요.", + "restart": "다시 시작" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/kor/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json index 8b6ad71cd4e6d..984555805217c 100644 --- a/i18n/kor/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "editorGutterModifiedBackground": "수정된 줄의 편집기 여백 배경색입니다.", + "editorGutterAddedBackground": "추가된 줄의 편집기 여백 배경색입니다.", + "editorGutterDeletedBackground": "삭제된 줄의 편집기 여백 배경색입니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index 4b848835e9175..791c967182aa4 100644 --- a/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "Git 표시", + "installAdditionalSCMProviders": "추가 SCM 공급자 설치...", "source control": "소스 제어", "toggleSCMViewlet": "SCM 표시", "view": "보기" diff --git a/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index 550a8745b89fa..2910b5c28ea46 100644 --- a/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "추가 SCM 공급자 설치...", "switch provider": "SCM 공급자 전환..." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/kor/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index 5346ff5c5cf9c..4d21f25e14630 100644 --- a/i18n/kor/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,5 +6,7 @@ { "searchMatches": "일치하는 {0}개 항목을 찾음", "searchMatch": "일치하는 {0}개 항목을 찾음", - "fileMatchAriaLabel": "{2} 폴더의 {1} 파일에 {0}개의 일치 항목이 있음, 검색 결과" + "fileMatchAriaLabel": "{2} 폴더의 {1} 파일에 {0}개의 일치 항목이 있음, 검색 결과", + "replacePreviewResultAria": "{3} 텍스트가 있는 줄의 열 위치 {2}에서 용어 {0}을(를) {1}(으)로 바꾸기", + "searchResultAria": "{2} 텍스트가 있는 줄의 열 위치 {1}에서 {0} 용어 찾기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index 65bffc5144317..c9ce2ccb5f32a 100644 --- a/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -9,5 +9,6 @@ "vscode.extension.contributes.snippets-path": "코드 조각 파일의 경로입니다. 이 경로는 확장 폴더의 상대 경로이며 일반적으로 './snippets/'로 시작합니다.", "invalid.language": "`contributes.{0}.language`에 알 수 없는 언어가 있습니다. 제공된 값: {1}", "invalid.path.0": "`contributes.{0}.path`에 문자열이 필요합니다. 제공된 값: {1}", - "invalid.path.1": "확장 폴더({2})에 포함할 `contributes.{0}.path`({1})가 필요합니다. 확장이 이식 불가능해질 수 있습니다." + "invalid.path.1": "확장 폴더({2})에 포함할 `contributes.{0}.path`({1})가 필요합니다. 확장이 이식 불가능해질 수 있습니다.", + "badVariableUse": "\"{0}\"-snippet은 snippet-variables 및 snippet-placeholders와 혼동하기 쉽습니다. 자세한 내용은\n https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax를 참조하세요." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index 8705a3ff40b1b..c2a063232029b 100644 --- a/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "빈 코드 조각", "snippetSchema.json": "사용자 코드 조각 구성", "snippetSchema.json.prefix": "IntelliSense에서 코드 조각을 선택할 때 사용할 접두사입니다.", - "snippetSchema.json.body": "코드 조각 콘텐츠입니다. '${id}', '${id:label}', '${1:label}'을 변수에 사용하고 '$0', '$1'을 커서 위치에 사용하세요.", + "snippetSchema.json.body": "코드 조각 콘텐츠입니다. '$1', '${1:defaultText}'를 사용하여 커서 위치를 정의하고, '$0'을 최종 커서 위치에 사용하세요. '${varName}' 및 '${varName:defaultText}'에 변수 값을 삽입하세요(예: '$TM_FILENAME 파일입니다').", "snippetSchema.json.description": "코드 조각 설명입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..4685b4310b01e --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "{0}에 대한 지원을 개선하는 데 도움을 주세요.", + "takeShortSurvey": "간단한 설문 조사 참여", + "remindLater": "나중에 알림", + "neverAgain": "다시 표시 안 함" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..9cc54c77a3c23 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "간단한 피드백 설문 조사에 참여하시겠어요?", + "takeSurvey": "설문 조사 참여", + "remindLater": "나중에 알림", + "neverAgain": "다시 표시 안 함" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..1f6208b0c919d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "일치하는 작업 없음" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index 2d6bac5e8cbaa..2847a25126317 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, 작업" + "entryAriaLabel": "{0}, 작업", + "customizeTask": "작업 사용자 지정" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..1f6208b0c919d --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "일치하는 작업 없음" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index e34db9894efd3..aa72080ed625c 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -12,5 +12,6 @@ "ConfigurationParser.invalidVaraibleReference": "오류: 잘못된 problemMatcher 참조: {0}\n", "ConfigurationParser.noTaskName": "오류: 작업에서 taskName 속성을 제공해야 합니다. 이 작업은 무시됩니다.\n{0}\n", "taskConfiguration.shellArgs": "경고: 작업 '{0}'은(는) 셸 명령이며, 명령 이름이나 인수 중 하나에 이스케이프되지 않은 공백이 있습니다. 명령줄 인용을 올바르게 하려면 인수를 명령으로 병합하세요.", + "taskConfiguration.noCommandOrDependsOn": "오류: 작업 '{0}'에서 명령이나 dependsOn 속성을 지정하지 않습니다. 이 작업은 무시됩니다. 해당 작업의 정의는 {1}입니다.", "taskConfiguration.noCommand": "오류: 작업 '{0}'에서 명령을 정의하지 않습니다. 이 작업은 무시됩니다. 해당 작업의 정의는\n{1}입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index c0f4066588006..f07448af1127f 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "추가 명령 옵션", "JsonSchema.options.cwd": "실행된 프로그램 또는 스크립트의 현재 작업 디렉터리입니다. 생략된 경우 Code의 현재 작업 영역 루트가 사용됩니다.", "JsonSchema.options.env": "실행할 프로그램 또는 셸의 환경입니다. 생략하면 부모 프로세스의 환경이 사용됩니다.", + "JsonSchema.shellConfiguration": "사용할 셸을 구성합니다.", "JsonSchema.shell.executable": "사용할 셸입니다.", "JsonSchema.shell.args": "셸 인수입니다.", "JsonSchema.command": "실행할 명령이며, 외부 프로그램 또는 셸 명령입니다.", diff --git a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index 18e49dd95a0a0..06d667c9b1306 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "구성의 버전 번호입니다.", + "JsonSchema._runner": "러너가 더 이상 사용되지 않습니다. 공식 러너 속성을 사용하세요.", + "JsonSchema.runner": "작업이 프로세스로 실행되는지 여부와 출력이 출력 창이나 터미널 내부 중 어디에 표시되는지를 정의합니다.", "JsonSchema.windows": "Windows 특정 명령 구성", "JsonSchema.mac": "Mac 특정 명령 구성", "JsonSchema.linux": "Linux 특정 명령 구성", diff --git a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 13d620361aa03..00c94add47cdd 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -7,6 +7,10 @@ "JsonSchema.shell": "명령이 셸 명령인지 외부 프로그램인지 여부를 지정합니다. 생략하면 기본값 false가 사용됩니다.", "JsonSchema.tasks.dependsOn.string": "이 작업이 종속된 또 다른 작업입니다.", "JsonSchema.tasks.dependsOn.array": "이 작업이 종속된 다른 여러 작업입니다.", + "JsonSchema.tasks.group": "이 작업이 속한 실행 그룹을 정의합니다. 생략하면 작업은\n 아무 그룹에도 속하지 않습니다.", + "JsonSchema.tasks.type": "작업이 프로세스로 실행되는지 또는 셸 내의 명령으로 실행되는지를 제어합니다. 기본값은 프로세스입니다.", + "JsonSchema.version": "구성의 버전 번호입니다.", + "JsonSchema.tasks.customize": "사용자 지정할 적용된 작업입니다.", "JsonSchema.windows": "Windows 특정 명령 구성", "JsonSchema.mac": "Mac 특정 명령 구성", "JsonSchema.linux": "Linux 특정 명령 구성" diff --git a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 4e1c891e83fbf..0e231caf66c90 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -18,10 +18,12 @@ "problems": "문제", "manyMarkers": "99+", "tasks": "작업", + "TaskSystem.noHotSwap": "작업 실행 엔진을 변경하려면 VS Code를 다시 시작해야 합니다. 변경이 무시됩니다.", "TaskService.noBuildTask": "정의된 빌드 작업이 없습니다. tasks.json 파일에서 작업을 'isBuildCommand'로 표시하세요.", "TaskService.noTestTask": "정의된 테스트 작업이 없습니다. tasks.json 파일에서 작업을 'isTestCommand'로 표시하세요.", "TaskServer.noTask": "실행하도록 요청한 작업 {0}을(를) 찾을 수 없습니다.", - "TaskSystem.activeSame": "작업이 이미 활성 상태이며 감시 모드입니다. 작업을 종료하려면 `F1 > 작업 종료`를 사용하세요.", + "customizeParseErrors": "현재 작성 구성에 오류가 있습니다. 작업을 사용자 지정하기 전에 오류를 수정하세요.\n", + "moreThanOneBuildTask": "tasks.json에 여러 빌드 작업이 정의되어 있습니다. 첫 번째 작업을 실행합니다.\n", "TaskSystem.active": "이미 실행 중인 작업이 있습니다. 다른 작업을 실행하려면 먼저 이 작업을 종료하세요.", "TaskSystem.restartFailed": "{0} 작업을 종료하고 다시 시작하지 못했습니다.", "TaskSystem.configurationErrors": "오류: 제공한 작업 구성에 유효성 검사 오류가 있으며 사용할 수 없습니다. 먼저 오류를 수정하세요.", diff --git a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 960fcef74d09f..4c053b9817c39 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,7 @@ { "TerminalTaskSystem.unknownError": "작업을 실행하는 동안 알 수 없는 오류가 발생했습니다. 자세한 내용은 작업 출력 로그를 참조하세요.", "TerminalTaskSystem.terminalName": "작업 - {0}", - "TerminalTaskSystem": "UNC 드라이브에서 셸 명령을 실행할 수 없습니다." + "reuseTerminal": "터미널이 작업에서 다시 사용됩니다. 닫으려면 아무 키나 누르세요.", + "TerminalTaskSystem": "UNC 드라이브에서 셸 명령을 실행할 수 없습니다.", + "unkownProblemMatcher": "문제 선택기 {0}을(를) 확인할 수 없습니다. 이 선택기는 무시됩니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/kor/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index 41639c4c051fe..e222c1b151d6a 100644 --- a/i18n/kor/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "작업을 실행하는 동안 알 수 없는 오류가 발생했습니다. 자세한 내용은 작업 출력 로그를 참조하세요.", "TaskRunnerSystem.watchingBuildTaskFinished": "\n빌드 감시 작업이 완료되었습니다.", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\n사용자 요청에 따라 '{0}' 작업이 종료되었습니다." + "TaskRunnerSystem.cancelRequested": "\n사용자 요청에 따라 '{0}' 작업이 종료되었습니다.", + "unkownProblemMatcher": "문제 선택기 {0}을(를) 확인할 수 없습니다. 이 선택기는 무시됩니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 2953f126a31a0..8d5763a792bb3 100644 --- a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -8,6 +8,7 @@ "workbench.action.terminal.kill": "활성 터미널 인스턴스 종료", "workbench.action.terminal.kill.short": "터미널 종료", "workbench.action.terminal.copySelection": "선택 영역 복사", + "workbench.action.terminal.selectAll": "모두 선택", "workbench.action.terminal.new": "새 통합 터미널 만들기", "workbench.action.terminal.new.short": "새 터미널", "workbench.action.terminal.focus": "터미널에 포커스", @@ -26,5 +27,8 @@ "workbench.action.terminal.scrollUp": "위로 스크롤(줄)", "workbench.action.terminal.scrollUpPage": "위로 스크롤(페이지)", "workbench.action.terminal.scrollToTop": "맨 위로 스크롤", - "workbench.action.terminal.clear": "지우기" + "workbench.action.terminal.clear": "지우기", + "workbench.action.terminal.allowWorkspaceShell": "작업 영역 셸 구성 허용", + "workbench.action.terminal.disallowWorkspaceShell": "작업 영역 셸 구성 허용 안 함", + "workbench.action.terminal.rename": "이름 바꾸기" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index 0b29da8897d4b..5923a5bf7d5ca 100644 --- a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "터미널의 배경색입니다. 이 설정을 사용하면 터미널\n 색을 패널과 다르게 지정할 수 있습니다.", + "terminal.foreground": "터미널의 전경색입니다.", "terminal.ansiColor": "터미널의 '{0}' ANSI 색입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..c45550055e9c4 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "찾기", + "placeholder.find": "찾기", + "label.previousMatchButton": "이전 검색 결과", + "label.nextMatchButton": "다음 검색 결과", + "label.closeButton": "닫기" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index a35b2cdc8f1a9..7ae3f4f9275ac 100644 --- a/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "터미널에 포커스가 없는 경우 터미널 선택을 복사할 수 없습니다.", "terminal.integrated.exitedWithCode": "터미널 프로세스가 종료 코드 {0}(으)로 종료되었습니다.", "terminal.integrated.waitOnExit": "터미널을 닫으려면 아무 키나 누르세요.", "terminal.integrated.launchFailed": "터미널 프로세스 명령 `{0}{1}`이(가) 시작하지 못했습니다(종료 코드: {2})." diff --git a/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 25cf1e962031c..b3a4598456f78 100644 --- a/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,6 +6,7 @@ { "selectTheme.label": "색 테마", "installColorThemes": "추가 색 테마 설치...", + "themes.selectTheme": "색 테마 선택(미리 보려면 위로/아래로 키 사용)", "selectIconTheme.label": "파일 아이콘 테마", "installIconThemes": "추가 파일 아이콘 테마 설치...", "noIconThemeLabel": "없음", diff --git a/i18n/kor/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/kor/src/vs/workbench/parts/update/electron-browser/update.i18n.json index 07b9da83abe77..dbdb545ea2052 100644 --- a/i18n/kor/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -15,5 +15,18 @@ "license": "라이선스 읽기", "updateAvailable": "다시 시작하면 {0}이(가) 업데이트됩니다.", "thereIsUpdateAvailable": "사용 가능한 업데이트가 있습니다.", - "noUpdatesAvailable": "현재 사용 가능한 업데이트가 없습니다." + "noUpdatesAvailable": "현재 사용 가능한 업데이트가 없습니다.", + "updateIsReady": "새 업데이트를 사용할 수 있습니다.", + "commandPalette": "명령 팔레트...", + "settings": "설정", + "keyboardShortcuts": "바로 가기 키(&&K)", + "selectTheme.label": "색 테마", + "themes.selectIconTheme.label": "파일 아이콘 테마", + "not available": "업데이트를 사용할 수 없음", + "checkingForUpdates": "업데이트를 확인하는 중...", + "DownloadUpdate": "사용 가능한 업데이트 다운로드", + "DownloadingUpdate": "업데이트를 다운로드하는 중...", + "InstallingUpdate": "업데이트를 설치하는 중...", + "restartToUpdate": "업데이트하기 위해 다시 시작...", + "checkForUpdates": "업데이트 확인..." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/kor/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..8d20ba83c9aa5 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} 동작" +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/kor/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..cb664992fc151 --- /dev/null +++ b/i18n/kor/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "뷰는 배열이어야 합니다.", + "requirestring": "속성 `{0}`은(는) 필수이며 `string` 형식이어야 합니다.", + "optstring": "속성 `{0}`은(는) 생략할 수 있으며 `string` 형식이어야 합니다.", + "vscode.extension.contributes.view.id": "뷰의 식별자입니다. 'vscode.window.registerTreeDataProviderForView` API를 통해 데이터 공급자를 등록하는 데 사용합니다. `onView:${id}` 이벤트를 `activationEvents`에 등록하여 확장 활성화를 트리거하는 데에도 사용합니다.", + "vscode.extension.contributes.view.name": "사용자가 읽을 수 있는 뷰 이름입니다. 표시됩니다.", + "vscode.extension.contributes.views": "뷰를 에디터에 적용합니다.", + "views.explorer": "탐색기 뷰", + "locationId.invalid": "`{0}`은(는) 유효한 뷰 위치가 아닙니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 3b4766bb5d93e..abd099ba950dd 100644 --- a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,20 +11,26 @@ "welcomePage.openFolder": "폴더 열기...", "welcomePage.cloneGitRepository": "Git 리포지토리 복제...", "welcomePage.recent": "최근 항목", + "welcomePage.moreRecent": "자세히...", "welcomePage.noRecentFolders": "최근 폴더 없음", "welcomePage.help": "도움말", + "welcomePage.keybindingsCheatsheet": "인쇄 가능 키보드 치트시트", "welcomePage.introductoryVideos": "소개 비디오", "welcomePage.productDocumentation": "제품 설명서", "welcomePage.gitHubRepository": "GitHub 리포지토리", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "시작 시 시작 페이지 표시", "welcomePage.customize": "사용자 지정", + "welcomePage.installExtensionPacks": "도구 및 언어", + "welcomePage.installExtensionPacksDescription": "{0} 및 {1}에 대한 지원 설치", + "welcomePage.moreExtensions": "자세히", "welcomePage.installKeymapDescription": "바로 가기 키 설치", + "welcomePage.installKeymapExtension": "{0} 및 {1}의 바로 가기 키 설치", "welcomePage.others": "기타", "welcomePage.colorTheme": "색 테마", "welcomePage.colorThemeDescription": "편집기 및 코드가 좋아하는 방식으로 표시되게 만들기", + "welcomePage.learn": "알아보기", "welcomePage.showCommands": "모든 명령 찾기 및 실행", - "welcomePage.showCommandsDescription": "제어판에서 명령을 빠르게 검색 및 액세스({0})", "welcomePage.interfaceOverview": "인터페이스 개요", "welcomePage.interfaceOverviewDescription": "UI의 주요 구성 요소를 강조 표시하는 시각적 오버레이 가져오기", "welcomePage.interactivePlayground": "대화형 실습", diff --git a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index 5f662c88c2eb8..d09100eafce7c 100644 --- a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbenchConfigurationTitle": "워크벤치", - "welcomePage.enabled": "사용하도록 설정되면 시작할 때 시작 페이지를 표시합니다.", "help": "도움말" } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index a436e5a707b6c..32604316d81dd 100644 --- a/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -4,17 +4,35 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "workbenchConfigurationTitle": "워크벤치", + "welcomePage.enabled": "사용하도록 설정되면 시작할 때 시작 페이지를 표시합니다.", "welcomePage": "시작", + "welcomePage.javaScript": "JavaScript", "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", "welcomePage.vim": "Vim", "welcomePage.sublime": "Sublime", "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "{0}에 대한 지원이 이미 설치되어 있습니다.", + "welcomePage.willReloadAfterInstallingExtensionPack": "{0}에 대한 추가 지원을 설치한 후 창이 다시 로드됩니다.", + "welcomePage.installingExtensionPack": "{0}에 대한 추가 지원을 설치하는 중...", + "welcomePage.extensionPackNotFound": "ID가 {1}인 {0}에 대한 지원을 찾을 수 없습니다.", "welcomePage.keymapAlreadyInstalled": "{0} 바로 가기 키가 이미 설치되어 있습니다.", "welcomePage.willReloadAfterInstallingKeymap": "{0} 바로 가기 키를 설치한 후 창이 다시 로드됩니다.", "welcomePage.installingKeymap": "{0} 바로 가기 키를 설치하는 중...", "welcomePage.keymapNotFound": "ID가 {1}인 {0} 바로 가기 키를 찾을 수 없습니다.", "welcome.title": "시작", + "welcomePage.openFolderWithPath": "경로가 {1}인 {0} 폴더 열기", + "welcomePage.extensionListSeparator": ", ", + "welcomePage.installKeymap": "{0} 키맵 설치", + "welcomePage.installExtensionPack": "{0}에 대한 추가 지원 설치", + "welcomePage.installedKeymap": "{0} 키맵이 이미 설치되어 있습니다.", + "welcomePage.installedExtensionPack": "{0} 지원이 이미 설치되어 있습니다.", "ok": "확인", - "cancel": "취소" + "details": "세부 정보", + "cancel": "취소", + "welcomePage.buttonBackground": "시작 페이지에서 단추의 배경색입니다.", + "welcomePage.buttonHoverBackground": "시작 페이지에서 단추의 커서 올리기 배경색입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/kor/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index 7f6ec89a740b2..25c6b86854dd7 100644 --- a/i18n/kor/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/kor/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "walkThrough.unboundCommand": "바인딩 안 됨", - "walkThrough.gitNotFound": "Git가 시스템에 설치되지 않은 것 같습니다." + "walkThrough.gitNotFound": "Git가 시스템에 설치되지 않은 것 같습니다.", + "walkThrough.embeddedEditorBackground": "대화형 실습에서 포함된 편집기의 배경색입니다." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/kor/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index 131b473a69bd8..fa07b04f779b3 100644 --- a/i18n/kor/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/kor/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -6,6 +6,12 @@ { "open": "설정 열기", "close": "닫기", + "saveAndRetry": "설정 저장 및 다시 시도", "errorUnknownKey": "구성 파일에 쓸 수 없습니다(알 수 없는 키).", - "errorInvalidTarget": "구성 파일에 쓸 수 없습니다(잘못된 대상)." + "errorInvalidTarget": "구성 파일에 쓸 수 없습니다(잘못된 대상).", + "errorNoWorkspaceOpened": "폴더가 열려 있지 않으므로 설정에 쓸 수 없습니다. 먼저 폴더를 열고 다시 시도하세요.", + "errorInvalidConfiguration": "설정에 쓸 수 없습니다. **사용자 설정**을 열어 파일에서 오류/경고를 해결하고 다시 시도하세요.", + "errorInvalidConfigurationWorkspace": "설정에 쓸 수 없습니다. **작업 영역 설정**을 열어 파일에서 오류/경고를 해결하고 다시 시도하세요.", + "errorConfigurationFileDirty": "파일이 변경되어 설정에 쓸 수 없습니다. **사용자 설정** 파일을 저장하고 다시 시도하세요.", + "errorConfigurationFileDirtyWorkspace": "파일이 변경되어 설정에 쓸 수 없습니다. **작업 영역 설정** 파일을 저장하고 다시 시도하세요." } \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/kor/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..cff423b1f3bf7 --- /dev/null +++ b/i18n/kor/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "원격 분석", + "telemetry.enableCrashReporting": "충돌 보고서를 Microsoft에 전송할 수 있도록 설정합니다.\n이 옵션을 적용하려면 다시 시작해야 합니다." +} \ No newline at end of file diff --git a/i18n/kor/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/kor/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/kor/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json index 3ffec1c5e8759..8f2407b1dfa69 100644 --- a/i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json +++ b/i18n/ptb/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "activeEditorShort": "e.g. meuArquivo.txt", + "activeEditorShort": "por exemplo meuArquivo.txt", "activeEditorMedium": "e.g. minhaPasta/meuArquivo.txt", "activeEditorLong": "por exemplo /Usuários/Desenvolvimento/meuProjeto/minhaPasta/meuArquivo/txt", "rootName": "e.g. meuProjeto", diff --git a/i18n/ptb/extensions/git/out/statusbar.i18n.json b/i18n/ptb/extensions/git/out/statusbar.i18n.json index 0b6ee800ffa78..a7cb7d22aae22 100644 --- a/i18n/ptb/extensions/git/out/statusbar.i18n.json +++ b/i18n/ptb/extensions/git/out/statusbar.i18n.json @@ -6,6 +6,6 @@ { "checkout": "Checkout...", "sync changes": "Sincronizar alterações", - "publish changes": "Publicar alterações", - "syncing changes": "Sincronizando alterações..." + "publish changes": "Publicar Alterações", + "syncing changes": "Sincronizando Alterações..." } \ No newline at end of file diff --git a/i18n/ptb/extensions/git/package.i18n.json b/i18n/ptb/extensions/git/package.i18n.json index e3eec31c008e8..20e7fed4901c4 100644 --- a/i18n/ptb/extensions/git/package.i18n.json +++ b/i18n/ptb/extensions/git/package.i18n.json @@ -32,7 +32,7 @@ "command.push": "Enviar por push", "command.pushTo": "Enviar por push para...", "command.sync": "Sincronizar", - "command.publish": "Publicar", + "command.publish": "Publicar Ramo", "command.showOutput": "Mostrar Saída do Git", "config.enabled": "Se o git estiver habilitado", "config.path": "Caminho para o executável do git", diff --git a/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json index 8b6ad71cd4e6d..e3c986692386c 100644 --- a/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/ptb/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "acceptCurrentChange": "Aceitar a mudança atual", + "acceptIncomingChange": "Aceitar a mudança de entrada", + "acceptBothChanges": "Aceitar as duas alterações", + "compareChanges": "Comparar as mudanças" +} \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json index 231dd1e64b11b..6308a5d70f564 100644 --- a/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/ptb/extensions/merge-conflict/out/commandHandler.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "cursorNotInConflict": "Cursor do editor não está dentro de um conflito de mesclagem", + "compareChangesTitle": "{0}: Alterações Atuais ⟷ Alterações de Entrada", + "cursorOnCommonAncestorsRange": "Cursor do editor está dentro do bloco comum de ancestrais, favor mover para o bloco \"atual\" ou \"entrada\"", "cursorOnSplitterRange": "Cursor do editor está dentro do separador de conflitos de mesclagem, por favor mova-o para o bloco \"atual\" ou \"entrada\"", "noConflicts": "Nenhum conflito de mesclagem encontrado neste arquivo", "noOtherConflictsInThisFile": "Não há outros conflitos de mesclagem dentro desse arquivo" diff --git a/i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json index a3da6d4660e50..2b29ae4a254ca 100644 --- a/i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json +++ b/i18n/ptb/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "currentChange": "(Mudança atual)", - "incomingChange": "(Mudança de entrada)" + "currentChange": "(Mudança Atual)", + "incomingChange": "(Próxima Mudança)" } \ No newline at end of file diff --git a/i18n/ptb/extensions/merge-conflict/package.i18n.json b/i18n/ptb/extensions/merge-conflict/package.i18n.json index 1ca5029926436..ad47caacee95b 100644 --- a/i18n/ptb/extensions/merge-conflict/package.i18n.json +++ b/i18n/ptb/extensions/merge-conflict/package.i18n.json @@ -5,7 +5,15 @@ // Do not edit this file. It is machine generated. { "command.category": "Conflito de Mesclagem", + "command.accept.all-incoming": "Aceitar todas entradas", + "command.accept.all-both": "Aceitar todas as duas", + "command.accept.current": "Aceitar a corrente", + "command.accept.incoming": "Aceitar entrada", + "command.accept.selection": "Aceitar a seleção", "command.accept.both": "Aceitar Ambos", + "command.next": "Próximo conflito", + "command.previous": "Conflito anterior", + "command.compare": "Comparar o conflito atual", "config.title": "Mesclar conflitos", "config.codeLensEnabled": "Habilitar/Desabilitar o conflito de mesclagem no bloco CodeLens dentro do editor", "config.decoratorsEnabled": "Habilitar/Desabilitar decoradores de mesclagem de conflitos dentro do editor" diff --git a/i18n/ptb/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/ptb/extensions/typescript/out/features/bufferSyncSupport.i18n.json index 1cef0c6e94ae8..3cc3ca76ce719 100644 --- a/i18n/ptb/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/ptb/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "Incompatibilidade de versão! global tsc ({0})! = serviço de linguagem do VS Code ({1}). Erros de compilação inconsistentes podem ocorrer", + "versionMismatch": "Usando o TypeScript ({1}) para recursos do editor. TypeScript ({0}) está instalado globalmente em sua máquina. Erros no VS Code podem diferir dos erros TSC", "moreInformation": "Mais informações", "doNotCheckAgain": "Não verificar novamente", "close": "Fechar", diff --git a/i18n/ptb/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/ptb/extensions/typescript/out/utils/projectStatus.i18n.json index 5cb1837363719..6f06552e9293a 100644 --- a/i18n/ptb/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/ptb/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "Para habilitar os recursos de linguagem JavaScript/TypeScipt em todo o projeto, excluir pastas com muitos arquivos, como: {0}", "hintExclude.generic": "Para habilitar os recursos de linguagem JavaScript/TypeScipt em todo o projeto, excluir pastas grandes com arquivos em que você não trabalha.", - "open": "Configurar exclusões", "large.label": "Configurar exclusões", "hintExclude.tooltip": "Para habilitar os recursos de linguagem JavaScript/TypeScipt em todo o projeto, excluir pastas grandes com arquivos em que você não trabalha." } \ No newline at end of file diff --git a/i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json index 4ba4da55a07fb..e6e29d6431a9b 100644 --- a/i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/ptb/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Buscando dados para melhor IntelliSense do TypeScript", + "typesInstallerInitializationFailed.title": "Não foi possível instalar arquivos de tipagens para recursos da linguagem JavaScript. Por favor, certifique-se de que a NPM está instalado ou configure 'typescript.npm' em suas configurações de usuário", "typesInstallerInitializationFailed.moreInformation": "Mais informações", "typesInstallerInitializationFailed.doNotCheckAgain": "Não verificar novamente", "typesInstallerInitializationFailed.close": "Fechar" diff --git a/i18n/ptb/extensions/typescript/package.i18n.json b/i18n/ptb/extensions/typescript/package.i18n.json index e46048cba4ae4..88b67be90006f 100644 --- a/i18n/ptb/extensions/typescript/package.i18n.json +++ b/i18n/ptb/extensions/typescript/package.i18n.json @@ -13,11 +13,11 @@ "typescript.check.tscVersion": "Verifica se um ima instalação global do compilador TypeScript (por exemplo, tsc) difere do serviço de linguagem TypeScript usado.", "typescript.tsserver.log": "Habilita o log do servidor TS para um arquivo. Este log pode ser usado para diagnosticar problemas do servidor de TS. O log pode conter caminhos de arquivo, código-fonte e outras informações potencialmente confidenciais do seu projeto.", "typescript.tsserver.trace": "Habilita o rastreamento de mensagens enviadas para o servidor de TS. Este rastreamento pode ser usado para diagnosticar problemas do servidor de TS. O rastreamento pode conter caminhos de arquivo, código-fonte e outras informações potencialmente confidenciais do seu projeto.", - "typescript.tsserver.experimentalAutoBuild": "Habilita auto build experimental. Requer a versão 1.9 dev ou 2.x do tsserver e o reinício do VS Code depois da alteração.", "typescript.validate.enable": "Habilita/Desabilita a validação TypeScript.", "typescript.format.enable": "Habilita/Desabilita o formatador padrão TypeScript.", "javascript.format.enable": "Habilita/Desabilita o formatador padrão JavaScript.", "format.insertSpaceAfterCommaDelimiter": "Define o tratamento de espaços após um delimitador vírgula.", + "format.insertSpaceAfterConstructor": "Define a manipulação de espaços após a palavra-chave do construtor. Requer TypeScript > = 2.3.0.", "format.insertSpaceAfterSemicolonInForStatements": "Define o tratamento de espaços após um ponto e vírgula para um comando.", "format.insertSpaceBeforeAndAfterBinaryOperators": "Define o tratamento de espaços após um operador binário.", "format.insertSpaceAfterKeywordsInControlFlowStatements": "Define o tratamento de espaços após palavras-chave em um comando de controle de fluxo.", @@ -41,6 +41,8 @@ "typescript.selectTypeScriptVersion.title": "Selecionar a versão do JavaScript", "jsDocCompletion.enabled": "Habilitar/Desabilitar comentários JSDoc automáticos.", "javascript.implicitProjectConfig.checkJs": "Habilitar/desabilitar verificação semântica de arquivos JavaScript. Os arquivos existentes jsconfig.json ou tsconfig.json substituem essa configuração. Requer TypeScript > = 2.3.1.", + "typescript.npm": "Especifica o caminho para o executável do NPM usado para Aquisição de Tipo Automático. Requer TypeScript > = 2.3.4.", + "typescript.check.npmIsInstalled": "Verificar se o NPM está instalado para aquisição automática de tipo.", "javascript.nameSuggestions": "Habilitar/desabilitar incluindo nomes exclusivos do arquivo nas listas de sugestão de JavaScript.", "typescript.tsc.autoDetect": "Controla se a auto-detecção de tarefas tsc estão ligadas ou desligadas." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/common/errorMessage.i18n.json b/i18n/ptb/src/vs/base/common/errorMessage.i18n.json index 257ffd9e14c16..8653d71b65e27 100644 --- a/i18n/ptb/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/ptb/src/vs/base/common/errorMessage.i18n.json @@ -13,6 +13,5 @@ "error.connection.unknown": "Ocorreu um erro de conexão desconhecido. Você não está mais conectado à Internet ou o servidor que você está conectado está offline.", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "Ocorreu um erro desconhecido. Consulte o log para obter mais detalhes.", - "nodeExceptionMessage": "Ocorreu um erro de sistema ({0})", "error.moreErrors": "{0} ({1} erros no total)" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/base/common/keybindingLabels.i18n.json b/i18n/ptb/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/electron-main/menus.i18n.json b/i18n/ptb/src/vs/code/electron-main/menus.i18n.json index 2a3b275d70d9d..91b837832c4a8 100644 --- a/i18n/ptb/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/ptb/src/vs/code/electron-main/menus.i18n.json @@ -12,6 +12,7 @@ "mDebug": "&&Depurar", "mWindow": "Janela", "mHelp": "&&Ajuda", + "mTask": "&&Tarefas", "miNewWindow": "Nova &&Janela", "mAbout": "Sobre {0}", "mServices": "Serviços", @@ -41,6 +42,7 @@ "miSelectIconTheme": "&&Ícone de Arquivo do Tema", "miPreferences": "&&Preferências", "miReopenClosedEditor": "&&Reabrir Editor Fechado", + "miMore": "&&Mais...", "miClearRecentOpen": "&&Limpar Arquivos Recentes", "miUndo": "&&Desfazer", "miRedo": "&&Refazer", @@ -55,6 +57,9 @@ "miShowEmmetCommands": "E&&mmet...", "miToggleLineComment": "&&Alternar Comentário de Linha", "miToggleBlockComment": "Alternar Comentário de &&Bloco", + "miMultiCursorAlt": "Use Alt+clique para Multi-Cursor", + "miMultiCursorCmd": "Use o Cmd+clique para Multi-Cursor", + "miMultiCursorCtrl": "Use Ctrl+clique para Multi-Cursor", "miInsertCursorAbove": "&&Inserir cursor acima", "miInsertCursorBelow": "Inserir cursor a&&baixo", "miInsertCursorAtEndOfEachLineSelected": "Adicionar C&&ursores ao Final das Linhas", @@ -133,12 +138,13 @@ "miColumnBreakpoint": "Ponto de Parada de C&&oluna", "miFunctionBreakpoint": "Ponto de Parada de &&Função...", "miNewBreakpoint": "&&Novo Ponto de Parada", + "miEnableAllBreakpoints": "Habilitar Todos os Pontos de Parada", "miDisableAllBreakpoints": "Desabilitar T&&odos os Pontos de Parada", "miRemoveAllBreakpoints": "Remover &&Todos os Pontos de Parada", "miInstallAdditionalDebuggers": "&&Instalar Depuradores Adicionais...", "mMinimize": "Minimizar", - "mClose": "Fechar", "mBringToFront": "Trazer Tudo para a Frente", + "miSwitchWindow": "Alternar &&Janela...", "miToggleDevTools": "&&Alternar Ferramentas do Desenvolvedor", "miAccessibilityOptions": "&&Opções de Acessibilidade", "miReportIssues": "Relatar &&Problemas", @@ -153,12 +159,19 @@ "miLicense": "&&Exibir Licença", "miPrivacyStatement": "&&Política de Privacidade", "miAbout": "&&Sobre", + "miRunTask": "&&Executar Tarefa...", + "miRestartTask": "R&&einiciar Tarefa", + "miTerminateTask": "&&Finalizar Tarefa", + "miBuildTask": "&&Tarefa de Compilação.", + "miTestTask": "Tarefa de T&&este", + "miShowTaskLog": "&&Visualizar o Log de Tarefas", "accessibilityOptionsWindowTitle": "Opções de Acessibilidade", "miRestartToUpdate": "Reinicie para Atualizar...", "miCheckingForUpdates": "Verificando Atualizações...", "miDownloadUpdate": "Baixar Atualização Disponível", "miDownloadingUpdate": "Baixando Atualização...", "miInstallingUpdate": "Instalando Atualização...", + "miCheckForUpdates": "Verificar Atualizações...", "aboutDetail": "\nVersão {0}\nConfirmação {1}\nData {2}\nShell {3}\nRenderizador {4}\nNó {5}", "okButton": "OK" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/code/electron-main/windows.i18n.json b/i18n/ptb/src/vs/code/electron-main/windows.i18n.json index abf3a42e2eb54..639e101557fc6 100644 --- a/i18n/ptb/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/ptb/src/vs/code/electron-main/windows.i18n.json @@ -13,9 +13,5 @@ "appStalled": "A janela não está mais respondendo", "appStalledDetail": "Você pode reabrir, fechar a janela ou continuar esperando.", "appCrashed": "A janela foi fechada inesperadamente", - "appCrashedDetail": "Pedimos desculpas pelo inconveniente! Você pode reabrir a janela para continuar de onde parou.", - "newWindow": "Nova Janela", - "newWindowDesc": "Abrir uma nova janela", - "recentFolders": "Pastas Recentes", - "folderDesc": "{0} {1}" + "appCrashedDetail": "Pedimos desculpas pelo inconveniente! Você pode reabrir a janela para continuar de onde parou." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json index 7de4c179900d4..4dbd3e7153e1c 100644 --- a/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/ptb/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -21,6 +21,7 @@ "roundedSelection": "Controla se as seleções têm cantos arredondados", "scrollBeyondLastLine": "Controla se o editor rolará além da última linha", "minimap.enabled": "Controla se o mini mapa é exibido", + "minimap.showSlider": "Controla se o controle deslizante minimap é oculto automaticamente.", "minimap.renderCharacters": "Renderizar os caracteres em uma linha (em oposição a blocos de caracteres)", "minimap.maxColumn": "Limitar o tamanho de um mini-mapa para renderizar no máximo um número determinado de colunas", "find.seedSearchStringFromSelection": "Controla se nós inicializamos a string de pesquisa na Ferramenta de Pesquisa a partir da seleção do editor", @@ -33,12 +34,15 @@ "wordWrapColumn": "Controla a coluna de quebra de linha do editor quando editor.wordWrap` é 'wordWrapColumn' ou 'bounded'.", "wrappingIndent": "Controla o recuo de linhas quebradas. Pode ser \"none\", \"same\" ou \"indent\".", "mouseWheelScrollSensitivity": "Um multiplicador a ser usado em \"deltaX\" e \"deltaY\" dos eventos de rolagem do botão de rolagem do mouse", + "multiCursorModifier.ctrlCmd": "Mapeia para 'Control' no Windows e Linux e 'Command' no OSX.", + "multiCursorModifier.alt": "Mapeia para 'Alt' em Windows e Linux e 'Option' em OSX.", + "multiCursorModifier": "O modificador a ser usado para adicionar vários cursores com o mouse. `ctrlCmd` mapeia 'Control' no Windows e Linux e 'Command' no OSX. Os gestos do mouse Ir para definição e Abrir Link irão adaptar-se tal maneira que eles não entrem em conflito com o modificador multicursor.", "quickSuggestions.strings": "Habilitar sugestões rápidas dentro de strings.", "quickSuggestions.comments": "Habilitar sugestões rápidas dentro de comentários.", "quickSuggestions.other": "Habilitar sugestões rápidas fora de strings e comentários.", "quickSuggestions": "Controlar se sugestões devem aparecer automaticamente ao digitar", "quickSuggestionsDelay": "Controla o atraso em ms após o qual sugestões rápidas serão exibidas", - "parameterHints": "Habilita dicas de parâmetros", + "parameterHints": "Habilita pop-up que mostra documentação de parâmetros e o tipo de informação conforme você digita", "autoClosingBrackets": "Controla se o editor deve fechar colchetes automaticamente depois de abri-los", "formatOnType": "Controla se o editor deve formatar automaticamente a linha após a digitação", "formatOnPaste": "Controla se o editor deve formatar automaticamente o conteúdo colado. Um formatador deve estar disponível e o formatador deve ser capaz de formatar apenas uma parte do documento.", @@ -72,6 +76,11 @@ "trimAutoWhitespace": "Remove espaços em branco inseridos automaticamente no fim da linha", "stablePeek": "Mantém os editores de visualização abertos mesmo quando clicando seu conteúdo ou teclando Escape.", "dragAndDrop": "Controla se o editor deve permitir mover seleções via arrastar e soltar.", + "accessibilitySupport.auto": "O editor irá utilizar a plataforma da API para detectar quando um leitor de tela está conectado.", + "accessibilitySupport.on": "O editor será permanentemente otimizado para o uso de um leitor de tela.", + "accessibilitySupport.off": "O editor nunca será otimizado para o uso de um leitor de tela.", + "accessibilitySupport": "Controla quando o editor deve executar em modo otimizado para leitores de tela.", + "links": "Controla se o editor deve detectar links e torná-los clicáveis", "sideBySide": "Controla se o editor de diff mostra as diff lado a lado ou inline.", "ignoreTrimWhitespace": "Controla se o editor de diff mostra alterações nos espaços iniciais ou finais como diferenças", "renderIndicators": "Controla se o editor de diff mostra indicadores +/- para alterações adicionadas/removidas", diff --git a/i18n/ptb/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/ptb/src/vs/editor/common/config/editorOptions.i18n.json index 40fed0886ccdb..53f11838ed469 100644 --- a/i18n/ptb/src/vs/editor/common/config/editorOptions.i18n.json +++ b/i18n/ptb/src/vs/editor/common/config/editorOptions.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "accessibilityOffAriaLabel": "O editor não está acessível neste momento. Por favor pressione Alt+F1 para opções.", "editorViewAccessibleLabel": "Conteúdo do editor" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/ptb/src/vs/editor/contrib/find/common/findController.i18n.json index 07397efa5fed7..c8f66700ae9d0 100644 --- a/i18n/ptb/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/ptb/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,5 @@ "addSelectionToPreviousFindMatch": "Adicionar Seleção à Correspondência de Localização Anterior", "moveSelectionToNextFindMatch": "Mover Última Seleção para Próximo Localizar Correspondência", "moveSelectionToPreviousFindMatch": "Mover Última Seleção para Correspondência de Localização Anterior", - "selectAllOccurencesOfFindMatch": "Selecionar Todas as Ocorrências de Localizar Correspondência", "changeAll.label": "Alterar todas as ocorrências" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index 47c3685850e0d..2e25322d32c08 100644 --- a/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/ptb/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -5,8 +5,8 @@ // Do not edit this file. It is machine generated. { "aria.oneReference": "símbolo em {0} na linha {1} e coluna {2}", - "aria.fileReferences.1": "1 símbolo em {0}", - "aria.fileReferences.N": "{0} símbolos em {1}", + "aria.fileReferences.1": "1 símbolo em {0}, caminho completo {1}", + "aria.fileReferences.N": "{0} símbolos em {1}, caminho completo {2}", "aria.result.0": "Nenhum resultado encontrado", "aria.result.1": "Encontrado 1 símbolo em {0}", "aria.result.n1": "Encontrados {0} símbolos em {1}", diff --git a/i18n/ptb/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/ptb/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index a8ef6175a0970..d7ef91038db0f 100644 --- a/i18n/ptb/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/ptb/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -21,6 +21,8 @@ "menus.scmTitle": "O menu de título do controle de fonte", "menus.resourceGroupContext": "O menu de contexto do grupo de recursos de controle de fonte", "menus.resourceStateContext": "O menu de contexto de estado de recursos do controle de fonte", + "view.viewTitle": "O menu de título da visualização contribuída", + "view.itemContext": "O menu de contexto do item da visualização contribuída", "nonempty": "Esperado um valor não vazio", "opticon": "a propriedade '{0}' é opcional ou pode ser do tipo 'string'", "requireStringOrObject": "a propriedade '{0}' é obrigatória e deve ser do tipo 'string'", diff --git a/i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index 649e13b03b16e..8de8bd11bbfc7 100644 --- a/i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/ptb/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "Todas as contribuições da extensão VS Code representadas por este pacote.", "vscode.extension.preview": "Configura a extensão para ser marcada como pré-visualização na Loja.", "vscode.extension.activationEvents": "Eventos de ativação para a extensão VS Code.", + "vscode.extension.activationEvents.onLanguage": "Um evento de ativação emitido sempre que um arquivo que resolve para a linguagem especificada é aberto.", + "vscode.extension.activationEvents.onCommand": "Um evento de ativação emitido sempre que o comando especificado for invocado.", + "vscode.extension.activationEvents.onDebug": "Um evento de ativação emitido sempre que uma sessão de depuração do tipo especificado é iniciada.", + "vscode.extension.activationEvents.workspaceContains": "Um evento de ativação emitido quando uma pasta que contém pelo menos um arquivo correspondente ao padrão global especificado é aberta.", + "vscode.extension.activationEvents.onView": "Um evento de ativação emitido sempre que o modo de visualização especificado é expandido.", + "vscode.extension.activationEvents.star": "Um evento de ativação emitido na inicialização do VS Code. Para garantir uma ótima experiência de usuário, por favor, use este evento de ativação em sua extensão somente quando nenhuma outra combinação de eventos de ativação funcionar em seu caso de uso.", "vscode.extension.badges": "Matriz de emblemas a mostrar na barra lateral da página da extensão na Loja.", "vscode.extension.badges.url": "URL da imagem do emblema.", "vscode.extension.badges.href": "Link do emblema.", diff --git a/i18n/ptb/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/ptb/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..05f131174eada --- /dev/null +++ b/i18n/ptb/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "Nova Janela", + "newWindowDesc": "Abrir uma nova janela", + "recentFolders": "Pastas Recentes", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json index ca84c495b320f..0cfc1a7ffbe96 100644 --- a/i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/ptb/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -12,7 +12,7 @@ "focusBorder": "Cor geral da borda para elementos focalizados. Essa cor é usada somente se não for substituída por um componente.", "contrastBorder": "Uma borda extra em torno de elementos para separá-los dos outros de maior contraste.", "activeContrastBorder": "Uma borda extra em torno de elementos ativos para separá-los dos outros de maior contraste.", - "selectionBackground": "A cor de fundo das seleções de texto na bancada de trabalho (por exemplo, para campos de entrada ou áreas de texto). Note que isto não se aplica a seleções dentro do editor e do terminal.", + "selectionBackground": "A cor de fundo das seleções de texto na área de trabalho (por exemplo, para campos de entrada ou áreas de texto). Note que isto não se aplica a seleções dentro do editor.", "textSeparatorForeground": "Cor para separadores de texto.", "textLinkForeground": "Cor de primeiro plano para links no texto.", "textLinkActiveForeground": "Cor de primeiro plano para links ativos no texto.", @@ -60,6 +60,7 @@ "editorBackground": "Cor de plano de fundo do editor.", "editorForeground": "Cor de primeiro plano padrão do editor.", "editorWidgetBackground": "Cor de plano de fundo das ferramentas de edição, como pesquisar/substituir.", + "editorWidgetBorder": "Cor da borda das ferramentas do editor. A cor é usada somente se a ferramenta escolhe ter uma borda e a cor não é substituída por uma ferramenta.", "editorSelection": "Cor de seleção do editor.", "editorInactiveSelection": "Cor de seleção em um editor inativo.", "editorSelectionHighlight": "Cor de regiões com o mesmo conteúdo da seleção.", @@ -78,6 +79,7 @@ "mergeCurrentContentBackground": "Cor de fundo de conteúdo atual em conflito de mesclagem em linha.", "mergeIncomingHeaderBackground": "Cor de fundo de cabeçalho de entrada em conflito de mesclagem em linha.", "mergeIncomingContentBackground": "Cor de fundo de conteúdo de entrada em conflito de mesclagem em linha.", + "mergeBorder": "Cor da borda dos cabeçalhos e separadores estão em conflito de mesclagem em linha.", "overviewRulerCurrentContentForeground": "Cor de fundo de régua de visuaização atual em conflito de mesclagem em linha.", "overviewRulerIncomingContentForeground": "Cor de fundo de régua de visuaização de entrada em conflito de mesclagem em linha." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/ptb/src/vs/workbench/api/node/extHostTask.i18n.json index 8b6ad71cd4e6d..4b90a12aaf247 100644 --- a/i18n/ptb/src/vs/workbench/api/node/extHostTask.i18n.json +++ b/i18n/ptb/src/vs/workbench/api/node/extHostTask.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index 5f8a7bb47ded7..577ad33d0b41f 100644 --- a/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/ptb/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "Ocultar a Barra de Atividades", - "activityBarAriaLabel": "Chave do Modo de exibição Ativo" + "activityBarAriaLabel": "Chave do Modo de exibição Ativo", + "globalActions": "Ações globais" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json index ae6f9ae84b78d..b49742676674d 100644 --- a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -19,6 +19,7 @@ "closeEditorsToTheLeft": "Fechar editores à esquerda ", "closeEditorsToTheRight": "Fechar editores à direita", "closeAllEditors": "Fechar todos editores", + "closeUnmodifiedEditors": "Fechar os Editores Não Modificados no Grupo", "closeEditorsInOtherGroups": "Fechar editores nos outros grupos", "closeOtherEditorsInGroup": "Fechar outros editores", "closeEditorsInGroup": "Fechar todos editores no grupo", diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index ff6a038e701b5..7ec5ce6904c27 100644 --- a/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -10,8 +10,9 @@ "multiSelection": "{0} seleções", "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", - "tabFocusModeEnabled": "Tabulação move o foco", - "screenReaderDetected": "Leitor de tela detectado", + "tabFocusModeEnabled": "Tabulação Move o Foco", + "screenReaderDetected": "Leitor de Tela Detectado", + "screenReaderDetectedExtra": "Se você não estiver usando um leitor de tela, por favor altere a configuração `editor.accessibilitySupport` para \"desligado\".", "disableTabMode": "Desativar o modo de acessibilidade", "gotoLine": "Ir para linha", "indentation": "Indentação", diff --git a/i18n/ptb/src/vs/workbench/browser/parts/editor/titleControl.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/editor/titleControl.i18n.json index bf8307cd384c2..aafa87dc9bf2f 100644 --- a/i18n/ptb/src/vs/workbench/browser/parts/editor/titleControl.i18n.json +++ b/i18n/ptb/src/vs/workbench/browser/parts/editor/titleControl.i18n.json @@ -8,6 +8,7 @@ "closeOthers": "Fechar Outros", "closeRight": "Fechar à direita", "closeAll": "Fechar todos", + "closeAllUnmodified": "Fechar Não Modificados", "keepOpen": "Manter aberto", "showOpenedEditors": "Mostrar editores abertos", "araLabelEditorActions": "Ações de editor" diff --git a/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..57f5524e1be3a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "Ir para o Arquivo...", + "quickNavigateNext": "Navegar ao próximo em modo de abertura rápida", + "quickNavigatePrevious": "Navegar ao anterior em modo de abertura rápida", + "quickSelectNext": "Selecionar próximo em modo de abertura rápida", + "quickSelectPrevious": "Selecionar anterior em modo de abertura rápida" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json b/i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json index 26c5e14f3675d..098ead453d829 100644 --- a/i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/ptb/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "Nenhum resultado encontrado", "noResultsFound2": "Nenhum resultado encontrado", - "entryAriaLabel": "{0}, comando", - "noCommands": "Não há comandos correspondentes" + "entryAriaLabel": "{0}, comando" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/browser/viewlet.i18n.json b/i18n/ptb/src/vs/workbench/browser/viewlet.i18n.json index 34655b736ba10..4b960693e3567 100644 --- a/i18n/ptb/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/ptb/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "Recolher tudo", - "viewToolbarAriaLabel": "{0} ações " + "collapse": "Recolher tudo" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/common/theme.i18n.json b/i18n/ptb/src/vs/workbench/common/theme.i18n.json index 0ba7870155931..86cc4957066b4 100644 --- a/i18n/ptb/src/vs/workbench/common/theme.i18n.json +++ b/i18n/ptb/src/vs/workbench/common/theme.i18n.json @@ -7,12 +7,17 @@ "tabActiveBackground": "Cor de fundo da guia ativa. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", "tabInactiveBackground": "Cor de fundo da guia inativa. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", "tabBorder": "Borda para separar uma guia das outras. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "tabActiveForeground": "Cor de primeiro plano da guia ativa em um grupo ativo. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "tabInactiveForeground": "Cor de primeiro plano da guia inativa em um grupo ativo. As guias são os recipientes para editores na área do editor. Várias guias podem ser abertas em um grupo de editores. Podem haver vários grupos de editor.", + "tabUnfocusedActiveForeground": "Cor de primeiro plano da aba ativa em um grupo inativo. As abas são recipientes para editores na área do editor. Várias abas podem ser abertas em um grupo de editor. Pode haver vários grupos de editor.", + "tabUnfocusedInactiveForeground": "Cor de primeiro plano da aba inativa em um grupo inativo. As abas são recipientes para editores na área do editor. Várias abas podem ser abertas em um grupo de editor. Pode haver vários grupos de editor.", "editorGroupBackground": "Cor de fundo de um grupo de editor. Grupos de editor são os recipientes dos editores. A cor de fundo é mostrada ao arrastar o editor de grupos ao redor.", "tabsContainerBackground": "Cor de fundo do cabeçalho do título do grupo de editor quando as guias são habilitadas. Grupos de editor são os recipientes dos editores.", "tabsContainerBorder": "Cor da borda do cabeçalho do título do grupo de editor quando as guias estão habilitadas. Grupos de editor são os recipientes dos editores.", "editorGroupHeaderBackground": "Cor de fundo do título do cabeçalho do grupo de editor quando as guias são desabilitadas. Grupos de editor são os recipientes dos editores.", "editorGroupBorder": "Cor para separar múltiplos grupos de editor de outro. Grupos de editor são os recipientes dos editores.", "editorDragAndDropBackground": "Cor de fundo ao arrastar editores. A cor deve ter transparência para que o conteúdo do editor ainda possa ser visto.", + "panelBackground": "Cor de fundo do painel. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", "panelBorder": "Cor da borda do painel no topo separando do editor. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", "panelActiveTitleForeground": "Cor do título para o painel ativo. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", "panelInactiveTitleForeground": "Cor do título para o painel inativo. Os painéis são mostrados abaixo da área do editor e contém visualizações como saída e terminal integrado.", @@ -43,5 +48,14 @@ "titleBarActiveBackground": "Cor de fundo da barra de título quando a janela está ativa. Observe que essa cor atualmente somente é suportada no macOS.", "titleBarInactiveBackground": "Cor de fundo de barra de título quando a janela está inativa. Observe que essa cor é atualmente somente suportada no macOS.", "notificationsForeground": "Cor do primeiro plano de notificações. Notificações deslizam na parte superior da janela.", - "notificationsBackground": "Cor de fundo de notificações. Notificações deslizam na parte superior da janela." + "notificationsBackground": "Cor de fundo de notificações. Notificações deslizam na parte superior da janela.", + "notificationsButtonBackground": "Cor de fundo do botão de notificações. Notificações deslizam da parte superior da janela.", + "notificationsButtonHoverBackground": "Cor de fundo do botão de notificações quando passar sobre ele. Notificações deslizam da parte superior da janela. ", + "notificationsButtonForeground": "Cor de primeiro plano do botão de notificações. Notificações deslizam da parte superior da janela. ", + "notificationsInfoBackground": "Cor de fundo da notificação de informações. Notificações deslizam da parte superior da janela. ", + "notificationsInfoForeground": "Cor de primeiro plano das notificações de informação. Notificações deslizam da parte superior da janela. ", + "notificationsWarningBackground": "Cor de fundo das notificações de aviso. Notificações deslizam da parte superior da janela. ", + "notificationsWarningForeground": "Cor de primeiro plano das notificações de aviso. Notificações deslizam da parte superior da janela.", + "notificationsErrorBackground": "Cor de fundo das notificações de erro. Notificações deslizam da parte superior da janela. ", + "notificationsErrorForeground": "Cor de primeiro plano das notificações de erro. Notificações deslizam da parte superior da janela." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json index d829a3c8cad62..d1ec3a23336c3 100644 --- a/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/ptb/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "Fechar Editor", "closeWindow": "Fechar Janela", - "switchWindow": "Alternar Janela", - "switchWindowPlaceHolder": "Selecionar uma janela", - "current": "Janela Atual", "closeFolder": "Fechar Pasta", "noFolderOpened": "Não há nenhuma pasta aberta nesta instância para ser fechada.", "newWindow": "Nova Janela", @@ -20,11 +17,16 @@ "zoomReset": "Reinicializar Zoom", "appPerf": "Desempenho de inicialização", "reloadWindow": "Recarregar Janela", - "openRecent": "Abrir Recente", + "switchWindowPlaceHolder": "Selecionar uma janela para onde alternar", + "current": "Janela Atual", + "switchWindow": "Alternar a janela...", + "quickSwitchWindow": "Troca Rápida de Janela...", "folders": "pastas", "files": "arquivos", "openRecentPlaceHolderMac": "Selecionar um caminho (Pressione a tecla Cmd para abrir em uma nova janela)", "openRecentPlaceHolder": "Selecionar um caminho para abrir (Pressione a tecla Cmd para abrir em uma nova janela)", + "openRecent": "Abrir Recente...", + "quickOpenRecent": "Abertura Rápida de Recente...", "closeMessages": "Fechar mensagens de notificação", "reportIssues": "Reportar Problemas", "reportPerformanceIssue": "Reportar Problema de Desempenho", @@ -32,10 +34,10 @@ "openDocumentationUrl": "Documentação", "openIntroductoryVideosUrl": "Vídeos Introdutórios", "toggleSharedProcess": "Alternar processo compartilhado", - "navigateLeft": "Mover para a Visualizção à Esquerda", - "navigateRight": "Mover para a Visualização à Direita", - "navigateUp": "Mover para a Visualização Acima", - "navigateDown": "Mover para a Visualização Abaixo", + "navigateLeft": "Navegar para a Visualização à Esquerda", + "navigateRight": "Navegar para a Visualização à Direita", + "navigateUp": "Navegar para a Visualização Acima", + "navigateDown": "Navegar para a Visualização Abaixo", "increaseViewSize": "Aumentar o Tamanho da Visualização Atual", "decreaseViewSize": "Diminuir o Tamanho da Visualização Atual" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json index 3b9050de1afb3..710676ff7ae5a 100644 --- a/i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -15,6 +15,8 @@ "enablePreviewFromQuickOpen": "Controla se os editores abertos da Abertura Rápida são exibidos como visualização. Os editores de visualização são reutilizados até serem preservados (por exemplo, através de um duplo clique ou edição).", "editorOpenPositioning": "Controla onde os editores serão abertos. Escolha 'esquerda' ou 'direita' para abrir os editores à esquerda ou à direita do \neditor ativo. Selecione 'primeiro' ou 'último' para abrir os editores independentemente do atual.", "revealIfOpen": "Controla se um editor é exibido em qualquer um dos grupos, se aberto. Se desabilitado, um editor será aberto preferencialmente no grupo de editores ativo. Se habilitado, um editor já aberto será exibido no grupo de editores ativo, ao invés de ser aberto novamente. Note que há alguns casos onde esta configuração é ignorada, por exemplo, quando for forçada a abertura de um editor em um grupo específico ou ao lado do grupo atualmente ativo.", + "commandHistory": "Controla o número de comandos recentemente usados mantidos no histórico para a paleta de comandos. Definir como 0 para desativar o histórico de comandos.", + "preserveInput": "Controla se a última entrada digitada na paleta de comandos deve ser restaurada ao abri-la da próxima vez.", "closeOnFocusLost": "Controla se Abertura Rápida deve fechar automaticamente caso perca o foco.", "openDefaultSettings": "Controla se a abertura de configurações também abre um editor mostrando todas as configurações padrão.", "sideBarLocation": "Controla a localização da barra lateral. Ele pode ser exibido à esquerda ou à direita da área de trabalho.", @@ -31,10 +33,10 @@ "window.openFoldersInNewWindow.off": "As pastas substituirão a última janela ativa", "window.openFoldersInNewWindow.default": "As pastas serão abertas em uma nova janela, a menos que uma pasta seja selecionada dentro do aplicativo (por exemplo, através do menu Arquivo)", "openFoldersInNewWindow": "Controla se as pastas devem ser abertas em uma nova janela ou substituir a última janela ativa\n- padrão: as pastas serão abertas em uma nova janela, a menos que seja selecionada dentro do aplicativo (por exemplo, através do menu Arquivo)\n- ligado: as pastas serão abertas em uma nova janela\n- desligado: as pastas substituirão a última janela ativa\nNote que ainda podem haver casos em que esta configuração será ignorada (por exemplo, quando estiver usando as opções de linha de comando -new-window ou -reuse-window).", - "window.reopenFolders.none": "Nunca reabra uma pasta.", - "window.reopenFolders.one": "Reabrir a última pasta ativa.", - "window.reopenFolders.all": "Reabrir todas as pastas da última sessão.", - "reopenFolders": "Controla como as pastas são reabertas depois de um reinício. Escolha 'nenhum' para nunca reabrir uma pasta, 'uma' para reabrir a última pasta que você trabalhou ou 'todas' para reabrir todas as pastas da sua última sessão.", + "window.reopenFolders.all": "Reabrir todas as janelas.", + "window.reopenFolders.folders": "Reabrir todas as pastas. Janelas vazias não serão restauradas.", + "window.reopenFolders.one": "Reabrir a última janela ativa.", + "window.reopenFolders.none": "Nunca reabrir uma janela. Sempre começar com uma janela vazia.", "restoreFullscreen": "Controla se uma janela deve ser restaurada em modo de tela cheia se ela foi finalizada em modo de tela cheia.", "zoomLevel": "Ajusta o nível de zoom da janela. O tamanho original é 0 e cada aumento (por exemplo, 1) ou redução (por exemplo, -1) representa um zoom 20% maior ou menor. Você também pode digitar decimais para ajustar o nível de zoom com uma granularidade mais fina.", "title": "Controla o título da janela com base no editor ativo. As variáveis são substituídas com base no contexto:\n$ {ActiveEditorShort}: por exemplo, meuArquivo.txt\n$ {ActiveEditorMedium}: por exemplo, minhaPasta / meuArquivo.txt\n$ {ActiveEditorLong}: por exemplo, /Usuários/Desenvolvimento/meuProjeto/minhaPasta/meuArquivo.txt\n$ {RootName}: por exemplo, meuProjeto\n$ {RootPath}: por exemplo, /Usuários/Desenvolvimento/meuProjeto\n$ {AppName}: por exemplo, VS Code\n$ {Dirty}: um indicador sujo se o editor ativo for sujo\n$ {Separator}: um separador condicional (\"-\") que só aparece quando for rodeado por variáveis com valores", @@ -58,5 +60,8 @@ "zenMode.hideTabs": "Controla se a ativação do modo Zen também oculta as abas do espaço de trabalho.", "zenMode.hideStatusBar": "Controla se a ativação do modo Zen também oculta a barra de status no rodapé do espaço de trabalho.", "zenMode.hideActivityBar": "Controla se a ativação do modo Zen também oculta a barra de atividades à esquerda do espaço de trabalho.", - "zenMode.restore": "Controla se uma janela deve ser restaurada para o modo zen se ela foi finalizada no modo zen." + "zenMode.restore": "Controla se uma janela deve ser restaurada para o modo zen se ela foi finalizada no modo zen.", + "workspaceConfigurationTitle": "Espaço de trabalho", + "workspaces.title": "Configuração de pasta da área de trabalho", + "files.exclude.boolean": "O padrão glob com o qual combinar os caminhos de arquivo. Defina para verdadeiro ou falso para habilitar ou desabilitar o padrão." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..21239364c7cfc --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "Modificando a configuração 'editor.accessibilitySupport' para 'on'.", + "openingDocs": "Abrindo a página de documentação de Acessibilidade do VS Code.", + "introMsg": "Obrigado por testar a opção de acessibilidade do VS Code.", + "status": "Status", + "changeConfigToOnMac": "Para configurar o editor para ser permanentemente otimizado para uso com um leitor de tela pressione Command+E agora.", + "changeConfigToOnWinLinux": "Para configurar o editor para ser permanentemente otimizado para uso com um leitor de tela pressione Control+E agora.", + "auto_unknown": "O editor está configurado para usar as APIs de plataforma para detectar quando está conectado a um leitor de tela, mas o tempo de execução atual não oferece suporte a isso.", + "auto_on": "O editor detectou automaticamente que foi anexado um leitor de tela.", + "auto_off": "O editor está configurado para detectar automaticamente quando um leitor de tela é anexado, o que não é o caso neste momento.", + "configuredOn": "O editor está configurado para ser permanentemente otimizado para uso com um leitor de tela - você pode mudar isso editando a configuração 'editor.accessibilitySupport'.", + "configuredOff": "O editor está configurado para nunca ser otimizado para uso com um Leitor de Tela.", + "tabFocusModeOnMsg": "Pressionando Tab no editor corrente irá mover o foco para o próximo elemento focável. Mude este comportamento ao pressionar {0}.", + "tabFocusModeOnMsgNoKb": "Pressionando Tab no editor corrente irá mover o foco para o próximo elemento focável. O comando {0} não pode ser ativado atualmente por uma tecla.", + "tabFocusModeOffMsg": "Pressionando Tab no editor atual irá inserir um caractere Tab. Mude este comportamente ao pressionar {0}.", + "tabFocusModeOffMsgNoKb": "Pressionando Tab no editor atual irá inserir um caractere Tab. O comando {0} não pode ser ativado atualmente por uma tecla.", + "openDocMac": "Pressione Command+H agora para abrir uma janela do navegador com mais informação do VS Code relacionada à Acessibilidade.", + "openDocWinLinux": "Pressione Ctrl+H para abrir uma janela do navegador com mais informação do VS Code relacionada à acessibilidade.", + "outroMsg": "Você pode ignorar esta dica de ferramenta e retornar ao editor pressionando Escape ou Shift+Escape.", + "ShowAccessibilityHelpAction": "Mostrar ajuda de acessibilidade" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..955efefcac9d3 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Alternar Modificador de Multi-Cursor" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json index d14c4338ceb77..c981f42161e74 100644 --- a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json @@ -5,16 +5,12 @@ // Do not edit this file. It is machine generated. { "variablesSection": "Seção de variáveis", - "variables": "Variáveis", "variablesAriaTreeLabel": "Variáveis de Depuração", "expressionsSection": "Seção de Expressões", - "watch": "Monitoramento", "watchAriaTreeLabel": "Depurar Expressões Monitoradas", "callstackSection": "Seção de Pilha de Chamada", "debugStopped": "Pausado em {0}", - "callStack": "Pilha de Chamadas", "callStackAriaLabel": "Depurar a Pilha de Chamadas", "breakpointsSection": "Seção de Pontos de Parada", - "breakpoints": "Pontos de Parada", "breakpointsAriaTreeLabel": "Depurar os Pontos de Parada" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json index 73f6f0be4c469..86d901ff7caf6 100644 --- a/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json @@ -7,5 +7,6 @@ "replAriaLabel": "Ler o Painel de Impressão Eval", "actions.repl.historyPrevious": "História anterior", "actions.repl.historyNext": "Próxima história", - "actions.repl.acceptInput": "REPL Aceitar Entrada" + "actions.repl.acceptInput": "REPL Aceitar Entrada", + "actions.repl.copyAll": "Depurar: Copiar Todos os Consoles" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index cccc82d8a010e..d9e3601f991af 100644 --- a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "previousEditPoint": "Emmet: Ponto de edição anterior", - "nextEditPoint": "Emmet: Ponto próxima edição" + "previousEditPoint": "Emmet: Ir para o Ponto de Edição Anterior", + "nextEditPoint": "Emmet: Ir para o Próximo Ponto de Edição" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index 1caebe040f568..ee08d95bf189d 100644 --- a/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -9,5 +9,6 @@ "emmetPreferences": "Preferências usadas para modificar o comportamento de algumas ações e resolvedores de Emmet.", "emmetSyntaxProfiles": "Definir o perfil para a sintaxe especificada ou usar seu próprio perfil com regras específicas.", "emmetExclude": "Uma matriz de línguagens onde abreviaturas emmet não devem ser expandidas.", - "emmetExtensionsPath": "Caminho para uma pasta contendo perfis emmet, trechos e preferências" + "emmetExtensionsPath": "Caminho para uma pasta contendo perfis emmet, trechos e preferências", + "useNewEmmet": "Experimente os novos módulos emmet (que irão substituir a antiga biblioteca unica emmet) para todos os recursos emmet." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index 1a3b9d4cd09d5..9a0bba90ea25a 100644 --- a/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,10 @@ "default": "Valor padrão", "debuggers": "Depuradores ({0})", "debugger name": "Nome", + "views": "Visualizações ({0})", + "view id": "ID", + "view name": "Nome", + "view location": "Onde", "themes": "Temas ({0})", "JSON Validation": "Validação JSON ({0})", "commands": "Comandos ({0})", diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index f4309c6a9bcb9..62b98096be419 100644 --- a/i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -28,7 +28,7 @@ "watcherExclude": "Configure padrões glob de caminhos de arquivo para excluir do monitoramento de arquivos. Alterar essa configuração requer uma reinicialização. Quando você tiver consumo Code muito alto de cpu na inicialização, você pode excluir pastas grandes para reduzir a carga inicial.", "hotExit.off": "Desabilitar a saída à quente.", "hotExit.onExit": "Saída à quente será acionada quando o aplicativo for fechado, ou seja, quando a última janela é fechada no Windows/Linux ou quando o comando workbench.action.quit é acionado (paleta de comandos, keybinding, menu). Todas as janelas com backups serão restauradas na próxima execução.", - "hotExit.onExitAndWindowClose": "Saída à quente será acionada quando o aplicativo for fechado, ou seja, quando a última janela é fechada no Windows/Linux ou quando o comando workbench.action.quit é acionado (paleta de comando, keybinding, menu), e também para qualquer janela com uma pasta aberta independentemente se é a última janela. Todas as janelas sem pastas abertas serão restauradas na próxima execução. Para restaurar as janelas de pastas como eram antes do desligamento configure \"window.reopenFolders\" para \"todos\".", + "hotExit.onExitAndWindowClose": "Saída à quente será acionada quando o aplicativo for fechado, ou seja, quando a última janela é fechada no Windows/Linux ou quando o comando workbench.action.quit é acionado (paleta de comando, keybinding, menu), e também para qualquer janela com uma pasta aberta independentemente se é a última janela. Todas as janelas sem pastas abertas serão restauradas no próximo lançamento. Para restaurar janelas de pastas como eram antes do desligamento configure \"window.restoreWindows\" para \"todos\".", "hotExit": "Controla se os arquivos não salvos são lembrados entre as sessões, permitindo salvar alerta ao sair do editor seja ignorada.", "defaultLanguage": "O modo de linguagem padrão que é atribuída para novos arquivos.", "editorConfigurationTitle": "Editor", diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index 58da5446b2596..c06bcff690c99 100644 --- a/i18n/ptb/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -5,7 +5,5 @@ // Do not edit this file. It is machine generated. { "explorerSection": "Seção de Explorador de Arquivos", - "noWorkspace": "Nenhuma Pasta Aberta", - "noWorkspaceHelp": "Você ainda não abriu uma pasta.", "openFolder": "Abrir Pasta" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index 4db9c1f34d87d..1156319992901 100644 --- a/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "Abrir Seção de Editores", "openEditors": "Abrir Editores", + "openEditosrSection": "Abrir Seção de Editores", "treeAriaLabel": "Abrir Editores: Lista de Arquivos Ativos", "dirtyCounter": "{0} não salvos" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json b/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json index dbef8f2ddb5b2..31c95aa9bce41 100644 --- a/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json @@ -7,6 +7,7 @@ "editorGroupAriaLabel": "{0}, Agrupar Editor", "openEditorAriaLabel": "{0}, Abrir Editor", "saveAll": "Salvar Todos", + "closeAllUnmodified": "Fechar Não Modificados", "closeAll": "Fechar todos", "close": "Fechar", "closeOthers": "Fechar Outros" diff --git a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index a4aa8b55e2f00..612db32643fd0 100644 --- a/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "Definir Keybinding", - "defineKeybinding.kbLayoutErrorMessage": "Você não será capaz de produzir esta combinação de teclas sob seu layout de teclado atual." + "defineKeybinding.kbLayoutErrorMessage": "Você não será capaz de produzir esta combinação de teclas sob seu layout de teclado atual.", + "defineKeybinding.kbLayoutLocalAndUSMessage": "**{0}** para o seu layout de teclado atual (**{1}** para US padrão).", + "defineKeybinding.kbLayoutLocalMessage": "**{0}** para o seu layout de teclado atual." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index 7b246da25ad7e..b6d5cdbd2e527 100644 --- a/i18n/ptb/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,11 +5,14 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "Mostrar todos os comandos", + "clearCommandHistory": "Limpar o Histórico de Comandos", "showCommands.label": "Paleta de comandos...", "entryAriaLabelWithKey": "{0}, {1}, comandos", "entryAriaLabel": "{0}, comandos", "canNotRun": "O comando '{0}' não pode ser executado a partir daqui.", "actionNotEnabled": "O comando '{0}' não está habilitado no contexto atual.", + "recentlyUsed": "usados recentemente", + "morecCommands": "outros comandos", "commandLabel": "{0}: {1}", "cat.title": "{0}: {1}", "noCommandsMatching": "Não há comandos correspondentes" diff --git a/i18n/ptb/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..f7269eb27eb08 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchMessage": "Uma configuração que requer uma reinicialização foi alterada.", + "relaunchDetail": "Pressione o botão de reinicialização para reiniciar {0} e habilitar a configuração.", + "restart": "Reiniciar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index 05f799f7b6a84..61a063374029b 100644 --- a/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "Trecho de código vazio", "snippetSchema.json": "Configuração do trecho do usuário", "snippetSchema.json.prefix": "O prefixo usado ao selecionar o trecho no intelliSense", - "snippetSchema.json.body": "O conteúdo do trecho de código. Use '${id}', '${id: rótulo}', '${1:label}' para variáveis e '$0', '$1' para posições do cursor", + "snippetSchema.json.body": "O conteúdo do trecho. Use '$1', '${1:defaultText}' para definir as posições do cursor, use '$0' para a posição final do cursor. Insira valores de variáveis com '${varName}' e '${varName:defaultText}', por exemplo ' Este é o arquivo: $TM_FILENAME'.", "snippetSchema.json.description": "A descrição do trecho." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..b16fc8446a452 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "Nos ajude a melhorar o nosso apoio para {0}", + "takeShortSurvey": "Responda a uma pesquisa curta", + "remindLater": "Lembrar mais tarde", + "neverAgain": "Não mostrar novamente" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..1ec18c632a4c6 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Você deseja responder a uma pequena pesquisa?", + "takeSurvey": "Responder a pesquisa", + "remindLater": "Lembrar mais tarde", + "neverAgain": "Não mostrar novamente" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..ccd588d452782 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Digite o nome de uma tarefa de compilação", + "noTasksMatching": "Não há tarefas correspondentes", + "noTasksFound": "Tarefas de compilação não encontradas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index 32bbf24976b3f..85a8f22ab41f4 100644 --- a/i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, tarefas" + "entryAriaLabel": "{0}, tarefas", + "customizeTask": "Personalizar Tarefa" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..07d53a8ee3957 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Digite o nome de uma tarefa de teste", + "noTasksMatching": "Não há tarefas correspondentes", + "noTasksFound": "Tarefas de teste não encontradas" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 45308919a6ea4..928e36c4c9b6a 100644 --- a/i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -12,5 +12,6 @@ "ConfigurationParser.invalidVaraibleReference": "Erro: ProblemMatcher inválido referência: {0}\n", "ConfigurationParser.noTaskName": "Erro: tarefas devem fornecer uma propriedade taskName. A tarefa será ignorada.\n{0}\n", "taskConfiguration.shellArgs": "Aviso: a tarefa '{0}' é um comando do shell e o nome de comando ou um dos seus argumentos tem espaços sem escape. Para garantir a linha de comando correta por favor mesclar argumentos no comando.", + "taskConfiguration.noCommandOrDependsOn": "Erro: a tarefa '{0}' não especifica nem um comando nem uma propriedade dependsOn. A tarefa será ignorada. Sua definição é: \n{1}", "taskConfiguration.noCommand": "Erro: a tarefa '{0}' não define um comando. A tarefa será ignorada. Sua definição é: {1}" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index 92ae501cdc880..4980a7daaa5dc 100644 --- a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "Opções de comando adicionais", "JsonSchema.options.cwd": "O diretório de trabalho atual do programa executado ou do script. Se omitido raiz de espaço de trabalho atual do código é usado.", "JsonSchema.options.env": "O ambiente do programa executado ou comando shell. Se omitido o ambiente do processo pai é usado.", + "JsonSchema.shellConfiguration": "Configura a shell a ser usada.", "JsonSchema.shell.executable": "O shell a ser usado.", "JsonSchema.shell.args": "Os argumentos shell.", "JsonSchema.command": "O comando a ser executado. Pode ser um programa externo ou um comando shell.", diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index dc0695101b037..46aad8f97eaf1 100644 --- a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "Número da versão do config", + "JsonSchema._runner": "O runner já se formou. Use a propriedade runner oficial", + "JsonSchema.runner": "Define se a tarefa é executada como um processo e a saída é mostrada na janela de saída ou dentro do terminal.", "JsonSchema.windows": "Configuração de comando específica do Windows", "JsonSchema.mac": "Configuração de comando específica do Mac", "JsonSchema.linux": "Configuração de comando específica do Linux", diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index 9010242ce874c..9053b4d29eedb 100644 --- a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -7,6 +7,10 @@ "JsonSchema.shell": "Especifica se o comando é um comando shell ou um programa externo. O padrão é falso se omitido.", "JsonSchema.tasks.dependsOn.string": "Outra tarefa da qual esta tarefa depende.", "JsonSchema.tasks.dependsOn.array": "A outra tarefa que esta tarefa depende.", + "JsonSchema.tasks.group": "Define a que grupo de execução desta tarefa pertence. Se omitido a tarefa pertence a nenhum grupo.", + "JsonSchema.tasks.type": "Define se a tarefa é executada como um processo ou como um comando dentro de uma shell. O padrão é processo.", + "JsonSchema.version": "O número da versão do config.", + "JsonSchema.tasks.customize": "A tarefa de contribuição a ser customizada.", "JsonSchema.windows": "Configuração de comando específica do Windows", "JsonSchema.mac": "Configuração de comando específica do Mac", "JsonSchema.linux": "Configuração de comando específica do Linux" diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index a07be4d2850b2..439c6a386cabc 100644 --- a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -22,7 +22,9 @@ "TaskService.noBuildTask": "Nenhuma tarefa de compilação definida. Marque uma tarefa com 'isBuildCommand' no arquivo tasks.json.", "TaskService.noTestTask": "Nenhuma tarefa de teste definida. Marque uma tarefa com 'isTestCommand' no arquivo tasks.json.", "TaskServer.noTask": "Tarefa {0} requisitada para execução não encontrada.", - "TaskSystem.activeSame": "A tarefa já está ativa e em modo de monitoramento. Para terminar a tarefa, use `F1 > terminar tarefa`", + "customizeParseErrors": "A configuração da tarefa atual tem erros. Por favor, corrija os erros primeiro antes de personalizar uma tarefa.", + "moreThanOneBuildTask": "Há muitas tarefas de compilação definidas em tasks.json. Executando a primeira.\n", + "TaskSystem.activeSame.background": "A tarefa já está ativa e em modo background. Para finalizar a tarefa use 'F1 > terminar tarefa'", "TaskSystem.active": "Já existe uma tarefa sendo executada. Finalize-a antes de executar outra tarefa.", "TaskSystem.restartFailed": "Falha ao finalizar e reiniciar a tarefa {0}", "TaskSystem.configurationErrors": "Erro: A configuração da tarefa informada possui erros de validação e não pode ser utilizada. Por favor, corrija os erros primeiro.", @@ -43,5 +45,7 @@ "TestAction.label": "Executar Tarefa de Teste", "quickOpen.task": "Executar Tarefa", "quickOpen.terminateTask": "Finalizar Tarefa", - "quickOpen.restartTask": "Reiniciar Tarefa" + "quickOpen.restartTask": "Reiniciar Tarefa", + "quickOpen.buildTask": "Tarefa de Compilação", + "quickOpen.testTask": "Tarefa de Teste" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index f21b7eebc35d1..1421a156ef7f2 100644 --- a/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,6 +6,7 @@ { "TerminalTaskSystem.unknownError": "Um erro desconhecido ocorreu durante a execução de uma tarefa. Consulte o log de saída de tarefa para obter detalhes.", "TerminalTaskSystem.terminalName": "Tarefa - {0}", + "reuseTerminal": "Terminal será reutilizado pelas tarefas, pressione qualquer tecla para fechar.", "TerminalTaskSystem": "Não é possível executar um comando shell em uma unidade UNC.", "unkownProblemMatcher": "Problem matcher {0} não pode ser resolvido. O matcher será ignorado" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index e63bd5db0a068..ca6ab1cb9d9c5 100644 --- a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -8,6 +8,7 @@ "workbench.action.terminal.kill": "Finalizar a Instância de Terminal Ativa", "workbench.action.terminal.kill.short": "Encerrar Terminal", "workbench.action.terminal.copySelection": "Copiar Seleção", + "workbench.action.terminal.selectAll": "Selecionar Tudo", "workbench.action.terminal.new": "Criar Novo Terminal Integrado", "workbench.action.terminal.new.short": "Novo Terminal", "workbench.action.terminal.focus": "Focalizar Terminal", @@ -28,5 +29,9 @@ "workbench.action.terminal.scrollToTop": "Rolar para cima", "workbench.action.terminal.clear": "Limpar", "workbench.action.terminal.allowWorkspaceShell": "Permitir a Configuração de Shell da Área de Trabalho", - "workbench.action.terminal.disallowWorkspaceShell": "Não Permitir a Configuração de Shell da Área de Trabalho" + "workbench.action.terminal.disallowWorkspaceShell": "Não Permitir a Configuração de Shell da Área de Trabalho", + "workbench.action.terminal.rename": "Renomear", + "workbench.action.terminal.rename.prompt": "Digite o nome do terminal", + "workbench.action.terminal.focusFindWidget": "Focalizar Ferramenta de Pesquisa", + "workbench.action.terminal.hideFindWidget": "Ocultar Ferramenta de Pesquisa" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..9172767f77085 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Localizar", + "placeholder.find": "Localizar", + "label.previousMatchButton": "Correspondência anterior", + "label.nextMatchButton": "Próxima correspondência", + "label.closeButton": "Fechar" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index 13b6933b1b91b..b530cb53e9b48 100644 --- a/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "Não é possível copiar seleção do terminal quando o terminal não tem foco", + "terminal.integrated.copySelection.noSelection": "O terminal não tem nenhuma seleção para copiar", "terminal.integrated.exitedWithCode": "O processo terminal encerrado com código de saída: {0}", "terminal.integrated.waitOnExit": "Pressione qualquer tecla para fechar o terminal", "terminal.integrated.launchFailed": "O comando de processo de terminal '{0}{1}' falhou ao ser iniciado (código de saída: {2})" diff --git a/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.i18n.json index 4199be74572e8..083249ec7d849 100644 --- a/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -15,5 +15,18 @@ "license": "Ler Licença", "updateAvailable": "{0} será atualizado após reiniciar.", "thereIsUpdateAvailable": "Há uma atualização disponível.", - "noUpdatesAvailable": "Não há nenhuma atualização disponível." + "noUpdatesAvailable": "Não há nenhuma atualização disponível.", + "updateIsReady": "Nova atualização disponível.", + "commandPalette": "Paleta de comandos...", + "settings": "Configurações", + "keyboardShortcuts": "Atalhos de Teclado", + "selectTheme.label": "Tema de Cores", + "themes.selectIconTheme.label": "Arquivo de Ícone do Tema", + "not available": "Atualizações Indisponíveis", + "checkingForUpdates": "Verificando Atualizações...", + "DownloadUpdate": "Baixar Atualização Disponível", + "DownloadingUpdate": "Baixando Atualização...", + "InstallingUpdate": "Instalando Atualização...", + "restartToUpdate": "Reinicie para Atualizar...", + "checkForUpdates": "Verificar atualizações..." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/ptb/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..32207b28d401d --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} ações " +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/ptb/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..5128faaa5e4c7 --- /dev/null +++ b/i18n/ptb/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "visualizações devem ser uma matriz", + "requirestring": "a propriedade `{0}` é obrigatória e deve ser do tipo `string`", + "optstring": "a propriedade `{0}` é opcional ou deve ser do tipo `string`", + "vscode.extension.contributes.view.id": "Identificador da visualiozação. Use isto para registrar um provedor de dados através de 'vscode.window.registerTreeDataProviderForView' API. Também para acionar ativando sua extensão registrando o evento 'onView: ${id}' para 'activationEvents'.", + "vscode.extension.contributes.view.name": "O nome legível da visualização. Será mostrado", + "vscode.extension.contributes.view.when": "Condição que deve ser verdadeira para mostrar esta visualização", + "vscode.extension.contributes.views": "Contribui visualizações ao editor", + "views.explorer": "Visualização do explorador", + "locationId.invalid": "'{0}' não é um local válido de visualização" +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index a0b426025a4f2..d0ecebaf1bfff 100644 --- a/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -31,7 +31,6 @@ "welcomePage.colorThemeDescription": "Fazer o editor e seu código parecer do jeito que você gosta", "welcomePage.learn": "Aprender", "welcomePage.showCommands": "Encontrar e executar todos os comandos", - "welcomePage.showCommandsDescription": "Comandos de rápido acesso e de pesquisar do painel de controle ({0})", "welcomePage.interfaceOverview": "Visão geral da interface", "welcomePage.interfaceOverviewDescription": "Obter uma sobreposição visual, destacando os principais componentes da interface do usuário", "welcomePage.interactivePlayground": "Playground interativo", diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index 7012e078815e6..450b1aa8f08f1 100644 --- a/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbenchConfigurationTitle": "Área de Trabalho", - "welcomePage.enabled": "Quando habilitado, irá mostrar a página de boas-vindas na inicialização.", "help": "Ajuda" } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 396a21b1c490f..5bd13096e61a5 100644 --- a/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/ptb/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -4,6 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "workbenchConfigurationTitle": "Área de Trabalho", + "welcomePage.enabled": "Quando habilitado, irá mostrar a página de boas-vindas na inicialização.", "welcomePage": "Bem-vindo", "welcomePage.javaScript": "JavaScript", "welcomePage.typeScript": "TypeScript", @@ -14,16 +16,23 @@ "welcomePage.sublime": "Sublime", "welcomePage.atom": "Atom", "welcomePage.extensionPackAlreadyInstalled": "Suporte para {0} já está instalado.", - "welcomePage.willReloadAfterInstallingExtensionPack": "A janela irá recarregar depois de instalar o suporte para {0}.", - "welcomePage.installingExtensionPack": "Instalar o suporte para {0}...", + "welcomePage.willReloadAfterInstallingExtensionPack": "A janela irá recarregar depois de instalar o suporte adicional para {0}.", + "welcomePage.installingExtensionPack": "Instalando o suporte adicional para {0}...", "welcomePage.extensionPackNotFound": "Suporte para {0} com o id {1} não pôde ser encontrado.", "welcomePage.keymapAlreadyInstalled": "Os atalhos de teclado de {0} já estão instalados.", "welcomePage.willReloadAfterInstallingKeymap": "A janela irá recarregar depois de instalar os {0} atalhos de teclado.", "welcomePage.installingKeymap": "Instalando os {0} atalhos de teclado...", "welcomePage.keymapNotFound": "Os {0} atalhos de teclado com o id {1} não podem ser encontrados.", "welcome.title": "Bem-vindo", + "welcomePage.openFolderWithPath": "Abrir pasta {0} com o caminho {1}", "welcomePage.extensionListSeparator": ", ", - "welcomePage.installedExtension": "{0} (instalado)", + "welcomePage.installKeymap": "Instalar {0} keymap", + "welcomePage.installExtensionPack": "Instalar o suporte adicional para {0}", + "welcomePage.installedKeymap": "Mapeamento de tecla '{0}' já está instalado.", + "welcomePage.installedExtensionPack": "Suporte {0} já está instalado.", "ok": "OK", - "cancel": "Cancelar" + "details": "Detalhes", + "cancel": "Cancelar", + "welcomePage.buttonBackground": "Cor de fundo para os botões na página de boas-vindas.", + "welcomePage.buttonHoverBackground": "Cor de fundo ao passar o mouse sobre os botões na página de boas-vindas." } \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/ptb/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..63fd1d1955daf --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetria", + "telemetry.enableCrashReporting": "Ativar o envio de relatórios de incidentes à Microsoft. Esta opção requer reinicialização para ser efetiva." +} \ No newline at end of file diff --git a/i18n/ptb/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/ptb/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/ptb/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/rus/extensions/git/out/commands.i18n.json b/i18n/rus/extensions/git/out/commands.i18n.json index 0e28cfd0b9a11..728d6ecc10935 100644 --- a/i18n/rus/extensions/git/out/commands.i18n.json +++ b/i18n/rus/extensions/git/out/commands.i18n.json @@ -18,6 +18,7 @@ "discard": "Отменить изменения", "confirm discard all": "Вы действительно хотите отменить все изменения? Отменить это действие нельзя!", "discardAll": "Отменить все изменения", + "no staged changes": "Отсутствуют промежуточные изменения для фиксации.\n\nВы хотите сделать все изменения промежуточными и зафиксировать их напрямую?", "yes": "Да", "always": "Всегда", "no changes": "Нет изменений для фиксации.", @@ -25,6 +26,9 @@ "provide commit message": "Введите сообщение фиксации.", "branch name": "Имя ветви", "provide branch name": "Укажите имя ветви.", + "select branch to delete": "Выберите ветвь для удаления", + "confirm force delete branch": "Ветвь '{0}' объединена не полностью. Удалить ее?", + "delete branch": "Удалить ветвь", "no remotes to pull": "Для вашего репозитория не настроены удаленные репозитории для получения данных.", "no remotes to push": "Для вашего репозитория не настроены удаленные репозитории для отправки данных.", "nobranch": "Извлеките ветвь, чтобы передать данные в удаленный репозиторий.", diff --git a/i18n/rus/extensions/git/out/statusbar.i18n.json b/i18n/rus/extensions/git/out/statusbar.i18n.json index e2a1fb358d8e9..b70a09ca50856 100644 --- a/i18n/rus/extensions/git/out/statusbar.i18n.json +++ b/i18n/rus/extensions/git/out/statusbar.i18n.json @@ -6,6 +6,6 @@ { "checkout": "Извлечь...", "sync changes": "Синхронизировать изменения", - "publish changes": "Публиковать изменения", + "publish changes": "Опубликовать изменения", "syncing changes": "Синхронизация изменений..." } \ No newline at end of file diff --git a/i18n/rus/extensions/git/package.i18n.json b/i18n/rus/extensions/git/package.i18n.json index 5236c98c9748f..72b1271c65b52 100644 --- a/i18n/rus/extensions/git/package.i18n.json +++ b/i18n/rus/extensions/git/package.i18n.json @@ -26,12 +26,13 @@ "command.undoCommit": "Отменить последнюю фиксацию", "command.checkout": "Извлечь в...", "command.branch": "Создать ветвь...", + "command.deleteBranch": "Удалить ветвь...", "command.pull": "Получить", "command.pullRebase": "Получить (переместить изменения из одной ветви в другую)", "command.push": "Отправить", "command.pushTo": "Отправить в:", "command.sync": "Синхронизация", - "command.publish": "Опубликовать", + "command.publish": "Опубликовать ветвь", "command.showOutput": "Показать выходные данные GIT", "config.enabled": "Включен ли GIT", "config.path": "Путь к исполняемому файлу GIT", @@ -42,5 +43,7 @@ "config.countBadge": "\nУправляет счетчиком Git. При указании значения \"all\" подсчитываются все изменения, при указании значения \"tracked\" — только отслеживаемые изменения, при указании значения \"off\" счетчик отключается.", "config.checkoutType": "Определяет типы ветвей, которые выводятся при выборе пункта меню \"Извлечь в...\". При указании значения \"all\" отображаются все ссылки, \"local\" — только локальные ветви, \"tags\" — только теги, а \"remote\" — только удаленные ветви.", "config.ignoreLegacyWarning": "Игнорирует предупреждение об устаревшей версии Git", - "config.ignoreLimitWarning": "Игнорировать предупреждение, когда в репозитории слишком много изменений" + "config.ignoreLimitWarning": "Игнорировать предупреждение, когда в репозитории слишком много изменений", + "config.defaultCloneDirectory": "Расположение по умолчанию, в которое будет клонирован репозиторий Git", + "config.enableSmartCommit": "Зафиксировать все изменения при отсутствии промежуточных изменений." } \ No newline at end of file diff --git a/i18n/rus/extensions/jake/out/main.i18n.json b/i18n/rus/extensions/jake/out/main.i18n.json index 8b6ad71cd4e6d..3f8458b5b988c 100644 --- a/i18n/rus/extensions/jake/out/main.i18n.json +++ b/i18n/rus/extensions/jake/out/main.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "execFailed": "Сбой автоматического определений заданий Jake. Ошибка: {0}" +} \ No newline at end of file diff --git a/i18n/rus/extensions/jake/package.i18n.json b/i18n/rus/extensions/jake/package.i18n.json index 8b6ad71cd4e6d..57552487f0a66 100644 --- a/i18n/rus/extensions/jake/package.i18n.json +++ b/i18n/rus/extensions/jake/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.jake.autoDetect": "Включает или отключает автоматическое определение заданий Jake. Значение по умолчанию — \"включено\"." +} \ No newline at end of file diff --git a/i18n/rus/extensions/markdown/out/extension.i18n.json b/i18n/rus/extensions/markdown/out/extension.i18n.json index 8b6ad71cd4e6d..5c5b3690dc66c 100644 --- a/i18n/rus/extensions/markdown/out/extension.i18n.json +++ b/i18n/rus/extensions/markdown/out/extension.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "onPreviewStyleLoadError": "Не удалось загрузить 'markdown.styles': {0}" +} \ No newline at end of file diff --git a/i18n/rus/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/rus/extensions/merge-conflict/out/codelensProvider.i18n.json index 8b6ad71cd4e6d..8b8980ff83392 100644 --- a/i18n/rus/extensions/merge-conflict/out/codelensProvider.i18n.json +++ b/i18n/rus/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -3,4 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "acceptCurrentChange": "Принять текущее изменение", + "acceptIncomingChange": "Принять входящее изменение", + "acceptBothChanges": "Принять оба изменения", + "compareChanges": "Сравнить изменения" +} \ No newline at end of file diff --git a/i18n/rus/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/rus/extensions/merge-conflict/out/commandHandler.i18n.json index 8b6ad71cd4e6d..8dfda28c73532 100644 --- a/i18n/rus/extensions/merge-conflict/out/commandHandler.i18n.json +++ b/i18n/rus/extensions/merge-conflict/out/commandHandler.i18n.json @@ -3,4 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "cursorNotInConflict": "Курсор не находится на конфликте объединения", + "compareChangesTitle": "{0}: текущие изменения ⟷ входящие изменения", + "cursorOnSplitterRange": "Курсор редактора находится на разделителе блока объединения конфликтов. Переместите его в блок \"Текущее\" или \"Входящее\"", + "noConflicts": "Конфликтов объединения в этом файле не обнаружено", + "noOtherConflictsInThisFile": "Других конфликтов объединения в этом файле не обнаружено" +} \ No newline at end of file diff --git a/i18n/rus/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/rus/extensions/merge-conflict/out/mergeDecorator.i18n.json index 8b6ad71cd4e6d..19166bea62947 100644 --- a/i18n/rus/extensions/merge-conflict/out/mergeDecorator.i18n.json +++ b/i18n/rus/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -3,4 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "currentChange": "(текущее изменение)", + "incomingChange": "(входящее изменение)" +} \ No newline at end of file diff --git a/i18n/rus/extensions/merge-conflict/package.i18n.json b/i18n/rus/extensions/merge-conflict/package.i18n.json index 8b6ad71cd4e6d..209c32b7d11b4 100644 --- a/i18n/rus/extensions/merge-conflict/package.i18n.json +++ b/i18n/rus/extensions/merge-conflict/package.i18n.json @@ -3,4 +3,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "command.category": "Объединить конфликт", + "command.accept.all-incoming": "Принять все входящие", + "command.accept.all-both": "Принять все входящие и текущие", + "command.accept.current": "Принять текущее", + "command.accept.incoming": "Принять входящее", + "command.accept.selection": "Принять выделенное", + "command.accept.both": "Принять оба", + "command.next": "Следующий конфликт", + "command.previous": "Предыдущий конфликт", + "command.compare": "Сравнить текущий конфликт", + "config.title": "Объединить конфликт", + "config.codeLensEnabled": "Включить/отключить блок объединения конфликтов CodeLens в редакторе", + "config.decoratorsEnabled": "Включить/отключить декораторы объединения конфликтов в редакторе" +} \ No newline at end of file diff --git a/i18n/rus/extensions/npm/package.i18n.json b/i18n/rus/extensions/npm/package.i18n.json index 8b6ad71cd4e6d..48afb646815e1 100644 --- a/i18n/rus/extensions/npm/package.i18n.json +++ b/i18n/rus/extensions/npm/package.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "config.npm.autoDetect": "Включает или отключает автоматическое определение сценариев npm. Значение по умолчанию — \"включено\"." +} \ No newline at end of file diff --git a/i18n/rus/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/rus/extensions/typescript/out/features/bufferSyncSupport.i18n.json index 9107be78385c6..14d34e0b45e8d 100644 --- a/i18n/rus/extensions/typescript/out/features/bufferSyncSupport.i18n.json +++ b/i18n/rus/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "versionMismatch": "Обнаружено несоответствие глобального tsc ({0}) и службы языка VS Code ({1}). Это может привести к ошибкам согласованности компиляции.", "moreInformation": "Дополнительные сведения", "doNotCheckAgain": "Больше не проверять", "close": "Закрыть", diff --git a/i18n/rus/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/rus/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json index 8b6ad71cd4e6d..5c9f3c06ffc8d 100644 --- a/i18n/rus/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json +++ b/i18n/rus/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "ts-check": "Включает семантическую проверку в JavaScript файле. Необходимо расположить в самом начале файла.", + "ts-nocheck": "Отключает семантическую проверку в JavaScript файле. Необходимо расположить в самом начале файла.", + "ts-ignore": "Отключает вывод ошибок @ts-check для следующей строки файла." +} \ No newline at end of file diff --git a/i18n/rus/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/rus/extensions/typescript/out/utils/projectStatus.i18n.json index 212caa515a98f..436675958f9c5 100644 --- a/i18n/rus/extensions/typescript/out/utils/projectStatus.i18n.json +++ b/i18n/rus/extensions/typescript/out/utils/projectStatus.i18n.json @@ -6,7 +6,6 @@ { "hintExclude": "Чтобы включить языковые функции JavaScript/TypeScript IntelliSense во всем проекте, исключите папки с большим числом файлов, например: {0}.", "hintExclude.generic": "Чтобы включить языковые функции JavaScript/TypeScript IntelliSense во всем проекте, исключите большие папки с исходными файлами, с которыми вы не работаете.", - "open": "Настройка исключений", "large.label": "Настройка исключений", "hintExclude.tooltip": "Чтобы включить языковые функции JavaScript/TypeScript IntelliSense во всем проекте, исключите большие папки с исходными файлами, с которыми вы не работаете." } \ No newline at end of file diff --git a/i18n/rus/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/rus/extensions/typescript/out/utils/typingsStatus.i18n.json index 506fc2b22fb21..8df62bae15bed 100644 --- a/i18n/rus/extensions/typescript/out/utils/typingsStatus.i18n.json +++ b/i18n/rus/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "installingPackages": "Получение данных для повышения эффективности IntelliSense TypeScript", + "typesInstallerInitializationFailed.title": "Не удалось установить файлы типизации для языка JavaScript. Убедитесь, что NPM установлен или укажите путь к файлу 'typescript.npm' в параметрах среды пользователя", "typesInstallerInitializationFailed.moreInformation": "Дополнительные сведения", "typesInstallerInitializationFailed.doNotCheckAgain": "Больше не проверять", "typesInstallerInitializationFailed.close": "Закрыть" diff --git a/i18n/rus/extensions/typescript/package.i18n.json b/i18n/rus/extensions/typescript/package.i18n.json index 879f5909edefd..ac2e8ab343ad8 100644 --- a/i18n/rus/extensions/typescript/package.i18n.json +++ b/i18n/rus/extensions/typescript/package.i18n.json @@ -13,7 +13,6 @@ "typescript.check.tscVersion": "Проверка отличия компилятора TypeScript глобальной установки (например, tsc) от используемой языковой службы TypeScript.", "typescript.tsserver.log": "Включает ведение журнала для сервера TS. Этот журнал можно использовать для диагностики проблем сервера TS. В журнале могут содержаться пути к файлам, исходный код и другие сведения из вашего проекта, в том числе носящие конфиденциальный характер.", "typescript.tsserver.trace": "Включает трассировку сообщений, отправляемых на сервер TS. Эту трассировку можно использовать для диагностики проблем сервера TS. Трассировка может содержать пути к файлам, исходный код и другие сведения из вашего проекта, в том числе конфиденциальные данные.", - "typescript.tsserver.experimentalAutoBuild": "Включает экспериментальную автосборку. Требуется версия 1.9 dev или версия 2.x tsserver и перезапуск VS Code после изменения.", "typescript.validate.enable": "Включение или отключение проверки TypeScript.", "typescript.format.enable": "Включение или отключение модуля форматирования TypeScript по умолчанию.", "javascript.format.enable": "Включение или отключение модуля форматирования JavaScript по умолчанию.", @@ -33,8 +32,16 @@ "javascript.validate.enable": "Включение или отключение проверки JavaScript.", "typescript.goToProjectConfig.title": "Перейти к конфигурации проекта", "javascript.goToProjectConfig.title": "Перейти к конфигурации проекта", + "javascript.referencesCodeLens.enabled": "Включить/отключить ссылки CodeLens для файлов JavaScript.", + "typescript.referencesCodeLens.enabled": "Включить/отключить ссылки CodeLens для файлов TypeScript. Требуется TypeScript версии 2.0.6 или более поздней версии.", "typescript.implementationsCodeLens.enabled": "Включить или отключить CodeLens для реализаций. Требуется TypeScript >= 2.2.0.", + "typescript.openTsServerLog.title": "Открыть журнал сервера TS", + "typescript.restartTsServer": "Перезапустить сервер TS", "typescript.selectTypeScriptVersion.title": "Выберите версию TypeScript.", "jsDocCompletion.enabled": "Включить или отключить JSDoc коментарии", - "javascript.implicitProjectConfig.checkJs": "Включает/отключает семантическую проверку файлов JavaScript. Этот параметр может переопределяться в файле jsconfig.json или tsconfig.json. Требуется TypeScript 2.3.1 или более поздней версии." + "javascript.implicitProjectConfig.checkJs": "Включает/отключает семантическую проверку файлов JavaScript. Этот параметр может переопределяться в файле jsconfig.json или tsconfig.json. Требуется TypeScript 2.3.1 или более поздней версии.", + "typescript.npm": "Указывает путь к исполняемому файлу NPM, используемому для автоматического получения типа. Требуется TypeScript версии 2.3.4 или более поздней версии.", + "typescript.check.npmIsInstalled": "Проверяет, установлен ли NPM для автоматического получения типов.", + "javascript.nameSuggestions": "Включить/отключить использование уникальных имен из файла в списках предложений JavaScript.", + "typescript.tsc.autoDetect": "Включает или отключает автоматическое определние заданий tsc." } \ No newline at end of file diff --git a/i18n/rus/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/rus/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json index 32fb4e4b4cd18..3ef6f2cac9f8b 100644 --- a/i18n/rus/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json +++ b/i18n/rus/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -6,6 +6,7 @@ { "imgMeta": "{0}x{1} {2}", "largeImageError": "Изображение слишком велико для отображения в редакторе. ", + "resourceOpenExternalButton": "Открыть изображение с помощью внешней программы?", "nativeBinaryError": "Файл не будет отображен в редакторе, так как он двоичный, очень большой или использует неподдерживаемую кодировку текста.", "sizeB": "{0} Б", "sizeKB": "{0} КБ", diff --git a/i18n/rus/src/vs/base/common/errorMessage.i18n.json b/i18n/rus/src/vs/base/common/errorMessage.i18n.json index d3403f4afa54b..b1ef2e3999bc1 100644 --- a/i18n/rus/src/vs/base/common/errorMessage.i18n.json +++ b/i18n/rus/src/vs/base/common/errorMessage.i18n.json @@ -13,6 +13,5 @@ "error.connection.unknown": "Произошла неизвестная ошибка подключения. Утеряно подключение к Интернету, либо сервер, к которому вы подключены, перешел в автономный режим.", "stackTrace.format": "{0}: {1}", "error.defaultMessage": "Произошла неизвестная ошибка. Подробные сведения см. в журнале.", - "nodeExceptionMessage": "Произошла системная ошибка ({0})", "error.moreErrors": "{0} (всего ошибок: {1})" } \ No newline at end of file diff --git a/i18n/rus/src/vs/base/common/keybindingLabels.i18n.json b/i18n/rus/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/code/electron-main/menus.i18n.json b/i18n/rus/src/vs/code/electron-main/menus.i18n.json index edcee11b1f13e..ac53c20ecc2e5 100644 --- a/i18n/rus/src/vs/code/electron-main/menus.i18n.json +++ b/i18n/rus/src/vs/code/electron-main/menus.i18n.json @@ -55,6 +55,9 @@ "miShowEmmetCommands": "E&&mmet...", "miToggleLineComment": "Переключить комментарий &&строки", "miToggleBlockComment": "Переключить комментарий &&блока", + "miMultiCursorAlt": "Для работы в режиме нескольких курсоров нажмите левую кнопку мыши, удерживая клавишу ALT", + "miMultiCursorCmd": "Для работы в режиме нескольких курсоров нажмите левую кнопку мыши, нажав клавишу COMMAND", + "miMultiCursorCtrl": "Для работы в режиме нескольких курсоров нажмите левую кнопку мыши, нажав клавишу CTRL", "miInsertCursorAbove": "Добавить курсор &&выше", "miInsertCursorBelow": "Добавить курсор &&ниже", "miInsertCursorAtEndOfEachLineSelected": "Добавить курсоры в &&окончания строк", @@ -115,6 +118,8 @@ "miGotoSymbolInFile": "Перейти к &&символу в файле...", "miGotoSymbolInWorkspace": "Перейти к символу в &&рабочей области...", "miGotoDefinition": "Перейти к &&определению", + "miGotoTypeDefinition": "Перейти к &&определению типа", + "miGotoImplementation": "Перейти к &&реализации", "miGotoLine": "Перейти к &&строке...", "miStartDebugging": "&&Запустить отладку", "miStartWithoutDebugging": "Начать &&без отладки", @@ -131,16 +136,17 @@ "miColumnBreakpoint": "Т&&очка останова столбца", "miFunctionBreakpoint": "&&Точка останова функции...", "miNewBreakpoint": "&&Новая точка останова", + "miEnableAllBreakpoints": "Включить все точки останова", "miDisableAllBreakpoints": "Отключить &&все точки останова", "miRemoveAllBreakpoints": "&&Удалить &&все точки останова", "miInstallAdditionalDebuggers": "У&&становить дополнительные отладчики...", "mMinimize": "Свернуть", - "mClose": "Закрыть", "mBringToFront": "Переместить все на передний план", "miToggleDevTools": "&&Показать/скрыть средства разработчика", "miAccessibilityOptions": "Специальные &&возможности", "miReportIssues": "&&Сообщить о проблемах", "miWelcome": "&&Приветствие", + "miInteractivePlayground": "&&Интерактивная площадка", "miDocumentation": "&&Документация", "miReleaseNotes": "&&Заметки о выпуске", "miKeyboardShortcuts": "С&&правочник по сочетаниям клавиш", @@ -150,12 +156,14 @@ "miLicense": "Просмотреть &&лицензию", "miPrivacyStatement": "&&Заявление о конфиденциальности", "miAbout": "&&О программе", + "miTerminateTask": "&&Завершить задачу", "accessibilityOptionsWindowTitle": "Специальные возможности", "miRestartToUpdate": "Перезапустить для обновления...", "miCheckingForUpdates": "Идет проверка наличия обновлений...", "miDownloadUpdate": "Скачать доступное обновление", "miDownloadingUpdate": "Скачивается обновление...", "miInstallingUpdate": "Идет установка обновления...", + "miCheckForUpdates": "Проверить наличие обновлений...", "aboutDetail": "\nВерсия {0}\nФиксация {1}\nДата {2}\nОболочка {3}\nОбработчик {4}\nNode {5}", "okButton": "ОК" } \ No newline at end of file diff --git a/i18n/rus/src/vs/code/electron-main/windows.i18n.json b/i18n/rus/src/vs/code/electron-main/windows.i18n.json index b1934cff062ea..22509376e04ed 100644 --- a/i18n/rus/src/vs/code/electron-main/windows.i18n.json +++ b/i18n/rus/src/vs/code/electron-main/windows.i18n.json @@ -13,9 +13,5 @@ "appStalled": "Окно не отвечает", "appStalledDetail": "Вы можете повторно открыть окно, закрыть его или продолжить ожидание.", "appCrashed": "Сбой окна", - "appCrashedDetail": "Приносим извинения за неудобство! Вы можете повторно открыть окно, чтобы продолжить работу с того места, на котором остановились.", - "newWindow": "Новое окно", - "newWindowDesc": "Открывает новое окно", - "recentFolders": "Недавно использованные папки", - "folderDesc": "{0} {1}" + "appCrashedDetail": "Приносим извинения за неудобство! Вы можете повторно открыть окно, чтобы продолжить работу с того места, на котором остановились." } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json index 53078d0a5b6c9..64c88138d02a2 100644 --- a/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json +++ b/i18n/rus/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -9,6 +9,7 @@ "fontWeight": "Управляет насыщенностью шрифта.", "fontSize": "Управляет размером шрифта в пикселях.", "lineHeight": "Управляет высотой строк. Укажите 0 для вычисления высоты строки по размеру шрифта.", + "letterSpacing": "Управляет интервалом между буквами в пикселях.", "lineNumbers": "Управляет видимостью номеров строк. Возможные значения: \"on\", \"off\" и \"relative\". Значение \"relative\" показывает количество строк, начиная с текущего положения курсора.", "rulers": "Столбцы, в которых должны отображаться вертикальные линейки", "wordSeparators": "Символы, которые будут использоваться как разделители слов при выполнении навигации или других операций, связанных со словами.", @@ -22,6 +23,8 @@ "minimap.enabled": "Определяет, отображается ли мини-карта", "minimap.renderCharacters": "Отображает фактические символы в строке вместо цветных блоков.", "minimap.maxColumn": "Ограничивает ширину мини-карты для отображения числа столбцов не больше определенного.", + "find.seedSearchStringFromSelection": "Определяет, можно ли передать строку поиска в мини-приложение поиска из текста, выделенного в редакторе", + "find.autoFindInSelection": "Определяет, будет ли снят флажок \"Поиск в выделенном\", когда в редакторе выбрано несколько символов или строк текста", "wordWrap.off": "Строки не будут переноситься никогда.", "wordWrap.on": "Строки будут переноситься по ширине окна просмотра.", "wordWrap.wordWrapColumn": "Строки будут переноситься по \"editor.wordWrapColumn\".", @@ -30,16 +33,19 @@ "wordWrapColumn": "Определяет столбец переноса редактора, если значение \"editor.wordWrap\" — \"wordWrapColumn\" или \"bounded\".", "wrappingIndent": "Управляет отступом строк с переносом по словам. Допустимые значения: \"none\", \"same\" или \"indent\".", "mouseWheelScrollSensitivity": "Множитель, используемый для параметров deltaX и deltaY событий прокрутки колесика мыши.", + "multiCursorModifier.ctrlCmd": "Соответствует клавише CTRL в Windows и Linux и клавише COMMAND в OS X.", + "multiCursorModifier.alt": "Соответствует клавише ALT в Windows и Linux и клавише OPTION в OS X.", + "multiCursorModifier": "Модификатор, который будет использоваться для добавления нескольких курсоров с помощью мыши. \"ctrlCmd\" соответствует клавише CTRL в Windows и Linux и клавише COMMAND в OS X. Жесты мыши \"Перейти к определению\" и \"Открыть ссылку\" будут изменены так, чтобы они не конфликтовали с несколькими курсорами.", "quickSuggestions.strings": "Разрешение кратких предложений в строках.", "quickSuggestions.comments": "Разрешение кратких предложений в комментариях.", "quickSuggestions.other": "Разрешение кратких предложений вне строк и комментариев.", "quickSuggestions": "Определяет, должны ли при вводе текста автоматически отображаться предложения", "quickSuggestionsDelay": "Управляет длительностью задержки (в мс), перед отображением кратких предложений.", - "parameterHints": "Включение подсказок для параметров", "autoClosingBrackets": "Определяет, должен ли редактор автоматически закрывать скобки после открытия.", "formatOnType": "Управляет параметром, определяющим, должен ли редактор автоматически форматировать строку после ввода.", "formatOnPaste": "Определяет, будет ли редактор автоматически форматировать вставленное содержимое. Модуль форматирования должен быть доступен и иметь возможность форматировать диапазон в документе.", "suggestOnTriggerCharacters": "Определяет, должны ли при вводе триггерных символов автоматически отображаться предложения.", + "acceptSuggestionOnEnter": "Определяет, будут ли предложения приниматься клавишей ВВОД в дополнение к клавише TAB. Это помогает избежать неоднозначности между вставкой новых строк и принятием предложений. Значение \"smart\" означает, что при изменении текста предложения будут приниматься только при нажатии клавиши ВВОД.", "acceptSuggestionOnCommitCharacter": "Определяет, будут ли предложения приниматься символами фиксации. Например, в JavaScript точка с запятой (\";\") может быть символом фиксации, принимающим предложение и вводящим данный символ.", "snippetSuggestions": "Управляет отображением фрагментов вместе с другими предложениями и их сортировкой.", "emptySelectionClipboard": "Управляет тем, копируется ли текущая строка при копировании без выделения.", @@ -61,12 +67,17 @@ "renderLineHighlight": "Определяет, должен ли редактор выделять текущую строку. Возможные значения: none, gutter, line и all.", "codeLens": "Управляет показом групп связанных элементов кода в редакторе", "folding": "Определяет, включено ли сворачивание кода в редакторе.", + "showFoldingControls": "Определяет, будут ли автоматически скрываться элементы управления свертыванием на полях.", "matchBrackets": "Выделяет соответствующие скобки при выборе одной из них.", "glyphMargin": "Управляет отображением вертикальных полей глифа в редакторе. Поля глифа в основном используются для отладки.", "useTabStops": "Вставка и удаление пробелов после позиции табуляции", "trimAutoWhitespace": "Удалить автоматически вставляемый конечный пробел", "stablePeek": "Оставлять быстрые редакторы открытыми, даже если дважды щелкнуто их содержимое или нажата клавиша ESC.", "dragAndDrop": "Определяет, следует ли редактору разрешить перемещение выделенных элементов с помощью перетаскивания.", + "accessibilitySupport.auto": "Редактор будет определять, подключено ли средство чтения с экрана, с помощью API-интерфейсов платформы.", + "accessibilitySupport.on": "Редактор будет оптимизирован для использования со средством чтения с экрана в постоянном режиме.", + "accessibilitySupport.off": "Редактор никогда не будет оптимизироваться для использования со средством чтения с экрана.", + "accessibilitySupport": "Определяет, следует ли запустить редактор в режиме оптимизации для средства чтения с экрана.", "sideBySide": "Определяет, как редактор несовпадений отображает отличия: рядом или в тексте.", "ignoreTrimWhitespace": "Определяет, должен ли редактор несовпадений трактовать несовпадения символов-разделителей как различия.", "renderIndicators": "Определяет отображение редактором несовпадений индикаторов +/- для добавленных или удаленных изменений", diff --git a/i18n/rus/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/rus/src/vs/editor/common/config/editorOptions.i18n.json index 90b3992a47d14..38312a5dea7ca 100644 --- a/i18n/rus/src/vs/editor/common/config/editorOptions.i18n.json +++ b/i18n/rus/src/vs/editor/common/config/editorOptions.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "accessibilityOffAriaLabel": "Редактор сейчас недоступен. Чтобы открыть список действий, нажмите ALT+F1.", "editorViewAccessibleLabel": "Содержимое редактора" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/rus/src/vs/editor/common/view/editorColorRegistry.i18n.json index 84955b080fe0b..0292dc310ce95 100644 --- a/i18n/rus/src/vs/editor/common/view/editorColorRegistry.i18n.json +++ b/i18n/rus/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -10,5 +10,15 @@ "caret": "Цвет курсора редактора.", "editorWhitespaces": "Цвет пробелов в редакторе.", "editorIndentGuides": "Цвет направляющих для отступов редактора.", - "editorLineNumbers": "Цвет номеров строк редактора." + "editorLineNumbers": "Цвет номеров строк редактора.", + "editorRuler": "Цвет линейки редактора.", + "editorCodeLensForeground": "Цвет переднего плана элемента CodeLens в редакторе", + "editorBracketMatchBackground": "Цвет фона парных скобок", + "editorBracketMatchBorder": "Цвет прямоугольников парных скобок", + "editorOverviewRulerBorder": "Цвет границы для линейки в окне просмотра.", + "editorGutter": "Цвет фона поля в редакторе. В поле размещаются отступы глифов и номера строк.", + "errorForeground": "Цвет волнистой линии для выделения ошибок в редакторе.", + "errorBorder": "Цвет границ волнистой линии для выделения ошибок в редакторе.", + "warningForeground": "Цвет волнистой линии для выделения предупреждений в редакторе.", + "warningBorder": "Цвет границ волнистой линии для выделения предупреждений в редакторе." } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/rus/src/vs/editor/contrib/find/common/findController.i18n.json index 69fbb81b34d9b..d6bc631d96ba9 100644 --- a/i18n/rus/src/vs/editor/contrib/find/common/findController.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/find/common/findController.i18n.json @@ -14,6 +14,5 @@ "addSelectionToPreviousFindMatch": "Добавить выделенный фрагмент в предыдущее найденное совпадение", "moveSelectionToNextFindMatch": "Переместить последнее выделение в следующее найденное совпадение", "moveSelectionToPreviousFindMatch": "Переместить последний выделенный фрагмент в предыдущее найденное совпадение", - "selectAllOccurencesOfFindMatch": "Выбрать все вхождения найденных совпадений", "changeAll.label": "Изменить все вхождения" } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/rus/src/vs/editor/contrib/links/browser/links.i18n.json index c2c9343c9c540..9260a3d43678b 100644 --- a/i18n/rus/src/vs/editor/contrib/links/browser/links.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/links/browser/links.i18n.json @@ -6,6 +6,7 @@ { "links.navigate.mac": "Щелкните с нажатой клавишей Cmd, чтобы перейти по ссылке", "links.navigate": "Щелкните с нажатой клавишей Ctrl, чтобы перейти по ссылке", + "links.navigate.al": "Щелкните с нажатой клавишей ALT, чтобы перейти по ссылке.", "invalid.url": "Не удалось открыть ссылку, так как она имеет неправильный формат: {0}", "missing.url": "Не удалось открыть ссылку, у нее отсутствует целевой объект.", "label": "Открыть ссылку" diff --git a/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json index cbed271e42399..95c9ccbe774e3 100644 --- a/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -5,8 +5,6 @@ // Do not edit this file. It is machine generated. { "aria.oneReference": "ссылка в {0} в строке {1} и символе {2}", - "aria.fileReferences.1": "Обнаружен 1 символ в {0}", - "aria.fileReferences.N": "{0} символов в {1}", "aria.result.0": "Результаты не найдены", "aria.result.1": "Обнаружен 1 символ в {0}", "aria.result.n1": "Обнаружено {0} символов в {1}", diff --git a/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json index 222d24b828811..9b523c27fc1ce 100644 --- a/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -16,9 +16,12 @@ "peekViewTitleInfoForeground": "Цвет сведений о заголовке быстрого редактора.", "peekViewBorder": "Цвет границ быстрого редактора и массива.", "peekViewResultsBackground": "Цвет фона в списке результатов представления быстрого редактора.", + "peekViewResultsMatchForeground": "Цвет переднего плана узлов строки в списке результатов быстрого редактора.", + "peekViewResultsFileForeground": "Цвет переднего плана узлов файла в списке результатов быстрого редактора.", "peekViewResultsSelectionBackground": "Цвет фона выбранной записи в списке результатов быстрого редактора.", "peekViewResultsSelectionForeground": "Цвет переднего плана выбранной записи в списке результатов быстрого редактора.", "peekViewEditorBackground": "Цвет фона быстрого редактора.", + "peekViewEditorGutterBackground": "Цвет фона поля в окне быстрого редактора.", "peekViewResultsMatchHighlight": "Цвет выделения совпадений в списке результатов быстрого редактора.", "peekViewEditorMatchHighlight": "Цвет выделения совпадений в быстром редакторе." } \ No newline at end of file diff --git a/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json index 83631e142ec2c..ef1bb257b470e 100644 --- a/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json +++ b/i18n/rus/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -12,6 +12,7 @@ "readMore": "Подробнее...{0}", "suggestionWithDetailsAriaLabel": "{0}, предложение, содержит данные", "suggestionAriaLabel": "{0}, предложение", + "readLess": "Кратко...{0}", "suggestWidget.loading": "Идет загрузка...", "suggestWidget.noSuggestions": "Предложения отсутствуют.", "suggestionAriaAccepted": "{0}, принято", diff --git a/i18n/rus/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/rus/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json index 103258a862574..ddeb7dc0a6842 100644 --- a/i18n/rus/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json +++ b/i18n/rus/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -15,5 +15,9 @@ "schema.brackets": "Определяет символы скобок, увеличивающие или уменьшающие отступ.", "schema.autoClosingPairs": "Определяет пары скобок. Когда введена открывающая скобка, автоматически добавляется закрывающая.", "schema.autoClosingPairs.notIn": "Определяет список областей, где автоматические пары отключены.", - "schema.surroundingPairs": "Определяет пары скобок, в которые заключается выбранная строка." + "schema.surroundingPairs": "Определяет пары скобок, в которые заключается выбранная строка.", + "schema.wordPattern": "Определение слова для языка.", + "schema.wordPattern.pattern": "Шаблон регулярного выражения, используемый для сопоставления слов.", + "schema.wordPattern.flags": "Флаги регулярного выражения, используемого для сопоставления слов.", + "schema.wordPattern.flags.errorMessage": "Должно соответствовать шаблону \"/^([gimuy]+)$/\"." } \ No newline at end of file diff --git a/i18n/rus/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/rus/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json index 7221481729a28..6b77834c3913b 100644 --- a/i18n/rus/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json +++ b/i18n/rus/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -21,6 +21,8 @@ "menus.scmTitle": "Меню заголовков для системы управления версиями", "menus.resourceGroupContext": "Контекстное меню группы ресурсов для системы управления версиями", "menus.resourceStateContext": "Контекстное меню состояния ресурсов для системы управления версиями", + "view.viewTitle": "Меню заголовка для окна участников", + "view.itemContext": "Контекстное меню элемента для окна участников", "nonempty": "требуется непустое значение.", "opticon": "Свойство icon может быть пропущено или должно быть строкой или литералом, например \"{dark, light}\"", "requireStringOrObject": "Свойство \"{0}\" обязательно и должно иметь тип \"string\" или \"object\"", diff --git a/i18n/rus/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/rus/src/vs/platform/extensions/common/extensionsRegistry.i18n.json index fae3024afe1e2..1cc3bfcebce6b 100644 --- a/i18n/rus/src/vs/platform/extensions/common/extensionsRegistry.i18n.json +++ b/i18n/rus/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -14,6 +14,12 @@ "vscode.extension.contributes": "Все публикации расширения VS Code, представленные этим пакетом.", "vscode.extension.preview": "Добавляет метку \"Предварительная версия\" для расширения в Marketplace.", "vscode.extension.activationEvents": "События активации для расширения кода VS Code.", + "vscode.extension.activationEvents.onLanguage": "Событие активации выдается каждый раз, когда открывается файл, который разрешается к указанному языку.", + "vscode.extension.activationEvents.onCommand": "Событие активации выдается каждый раз при вызове указанной команды.", + "vscode.extension.activationEvents.onDebug": "Событие активации выдается каждый раз при запуске сеанса отладки указанного типа.", + "vscode.extension.activationEvents.workspaceContains": "Событие активации выдается каждый раз при открытии папки, содержащей по крайней мере один файл, который соответствует указанной стандартной маске.", + "vscode.extension.activationEvents.onView": "Событие активации выдается каждый раз при развертывании указанного окна.", + "vscode.extension.activationEvents.star": "Событие активации выдается при запуске VS Code. Для удобства пользователя используйте это событие в своем расширении только в том случае, если другие сочетания событий не подходят.", "vscode.extension.badges": "Массив эмблем, отображаемых на боковой панели страницы расширения Marketplace.", "vscode.extension.badges.url": "URL-адрес изображения эмблемы.", "vscode.extension.badges.href": "Ссылка на эмблему.", diff --git a/i18n/rus/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/rus/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..f3243b5f3b96d --- /dev/null +++ b/i18n/rus/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "Новое окно", + "newWindowDesc": "Открывает новое окно", + "recentFolders": "Недавно использованные папки", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/rus/src/vs/platform/markers/common/problemMatcher.i18n.json index 2595229d2aab2..c79907b2cf8b5 100644 --- a/i18n/rus/src/vs/platform/markers/common/problemMatcher.i18n.json +++ b/i18n/rus/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -34,6 +34,7 @@ "ProblemMatcherParser.noValidIdentifier": "Ошибка: свойство шаблона {0} не является допустимым именем переменной шаблона.", "ProblemMatcherParser.problemPattern.watchingMatcher": "В сопоставителе проблем должны быть определены как начальный, так и конечный шаблоны для отслеживания.", "ProblemMatcherParser.invalidRegexp": "Ошибка: строка {0} не является допустимым регулярным выражением.\n", + "WatchingPatternSchema.regexp": "Регулярное выражение для обнаружения начала или конца фоновой задачи.", "WatchingPatternSchema.file": "Индекс группы сопоставления для имени файла. Может быть опущен.", "PatternTypeSchema.name": "Имя добавленного или предопределенного шаблона", "PatternTypeSchema.description": "Шаблон проблем либо имя добавленного или предопределенного шаблона проблем. Его можно опустить, если указано базовое значение.", @@ -42,6 +43,12 @@ "ProblemMatcherSchema.severity": "Серьезность по умолчанию для выявленных проблем. Используется, если в шаблоне не определена группа сопоставления для серьезности.", "ProblemMatcherSchema.applyTo": "Определяет, относится ли проблема, о которой сообщается для текстового документа, только к открытым, только к закрытым или ко всем документам.", "ProblemMatcherSchema.fileLocation": "Определяет способ интерпретации имен файлов, указываемых в шаблоне проблемы.", + "ProblemMatcherSchema.background": "Шаблоны для отслеживания начала и окончания фоновой задачи.", + "ProblemMatcherSchema.background.activeOnStart": "Если задано значение true, средство мониторинга фоновых задач будет находиться в активном режиме при запуске задачи. Это аналогично выдаче строки, соответствующей шаблону начала.", + "ProblemMatcherSchema.background.beginsPattern": "При наличии соответствия в выходных данных выдается сигнал о запуске фоновой задачи.", + "ProblemMatcherSchema.background.endsPattern": "При наличии соответствия в выходных данных выдается сигнал о завершении фоновой задачи.", + "ProblemMatcherSchema.watching.deprecated": "Это свойство для отслеживания устарело. Используйте цвет фона.", + "ProblemMatcherSchema.watching": "Шаблоны для отслеживания начала и окончания шаблона отслеживания.", "ProblemMatcherSchema.watching.activeOnStart": "Если задано значение true, наблюдатель находится в активном режиме, когда задача запускается. Это равносильно выдаче строки, соответствующей шаблону начала.", "ProblemMatcherSchema.watching.beginsPattern": "При соответствии в выходных данных сообщает о запуске задачи наблюдения.", "ProblemMatcherSchema.watching.endsPattern": "При соответствии в выходных данных сообщает о завершении задачи наблюдения.", diff --git a/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json index 6d4a756ac40b8..232f68c8367e4 100644 --- a/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json +++ b/i18n/rus/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -12,7 +12,6 @@ "focusBorder": "Общий цвет границ для элементов с фокусом. Этот цвет используется только в том случае, если не переопределен в компоненте.", "contrastBorder": "Дополнительная граница вокруг элементов, которая отделяет их от других элементов для улучшения контраста.", "activeContrastBorder": "Дополнительная граница вокруг активных элементов, которая отделяет их от других элементов для улучшения контраста.", - "selectionBackground": "Цвет фона выделенного текста в элементах пользовательского интерфейса (например, в поле для ввода значений или текстовом поле). Не применяется к области редактора и терминала.", "textSeparatorForeground": "Цвет для разделителей текста.", "textLinkForeground": "Цвет переднего плана для ссылок в тексте.", "textLinkActiveForeground": "Цвет переднего фона для активных ссылок в тексте.", @@ -36,11 +35,13 @@ "dropdownForeground": "Передний план раскрывающегося списка.", "dropdownBorder": "Граница раскрывающегося списка.", "listFocusBackground": "Фоновый цвет находящегося в фокусе элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", + "listFocusForeground": "Цвет переднего плана находящегося в фокусе элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", "listActiveSelectionBackground": "Фоновый цвет выбранного элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", "listActiveSelectionForeground": "Цвет переднего плана выбранного элемента List/Tree, когда элемент List/Tree активен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", "listInactiveSelectionBackground": "Фоновый цвет выбранного элемента List/Tree, когда элемент List/Tree неактивен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", "listInactiveSelectionForeground": "Цвет текста выбранного элемента List/Tree, когда элемент List/Tree неактивен. На активном элементе List/Tree есть фокус клавиатуры, на неактивном — нет.", "listHoverBackground": "Фоновый цвет элементов List/Tree при наведении курсора мыши.", + "listHoverForeground": "Цвет переднего плана элементов List/Tree при наведении курсора мыши.", "listDropBackground": "Фоновый цвет элементов List/Tree при перемещении с помощью мыши.", "highlight": "Цвет переднего плана для выделения соответствия при поиске по элементу List/Tree.", "pickerGroupForeground": "Цвет средства быстрого выбора для группировки меток.", @@ -54,9 +55,11 @@ "scrollbarSliderBackground": "Цвет фона ползунка.", "scrollbarSliderHoverBackground": "Цвет фона ползунка при наведении.", "scrollbarSliderActiveBackground": "Цвет фона активного ползунка.", + "progressBarBackground": "Цвет фона индикатора выполнения, который может отображаться для длительных операций.", "editorBackground": "Цвет фона редактора.", "editorForeground": "Цвет переднего плана редактора по умолчанию.", "editorWidgetBackground": "Цвет фона виджетов редактора, таких как найти/заменить.", + "editorWidgetBorder": "Цвет границы мини-приложений редактора. Этот цвет используется только в том случае, если у мини-приложения есть граница и если этот цвет не переопределен мини-приложением.", "editorSelection": "Цвет выделения редактора.", "editorInactiveSelection": "Цвет выделения в неактивном редакторе.", "editorSelectionHighlight": "Цвет регионов с тем же содержимым, что и в выделении.", @@ -70,5 +73,12 @@ "diffEditorInserted": "Цвет фона для добавленных строк.", "diffEditorRemoved": "Цвет фона для удаленных строк.", "diffEditorInsertedOutline": "Цвет контура для добавленных строк.", - "diffEditorRemovedOutline": "Цвет контура для удаленных строк." + "diffEditorRemovedOutline": "Цвет контура для удаленных строк.", + "mergeCurrentHeaderBackground": "Цвет фона текущего заголовка во внутренних конфликтах слияния.", + "mergeCurrentContentBackground": "Цвет фона текущего содержимого во внутренних конфликтах слияния.", + "mergeIncomingHeaderBackground": "Цвет фона входящего заголовка во внутренних конфликтах слияния.", + "mergeIncomingContentBackground": "Цвет фона входящего содержимого во внутренних конфликтах слияния.", + "mergeBorder": "Цвет границы заголовков и разделителя во внутренних конфликтах слияния.", + "overviewRulerCurrentContentForeground": "Цвет переднего плана линейки текущего окна во внутренних конфликтах слияния.", + "overviewRulerIncomingContentForeground": "Цвет переднего плана линейки входящего окна во внутренних конфликтах слияния." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/rus/src/vs/workbench/api/node/extHostTask.i18n.json index 8b6ad71cd4e6d..4b90a12aaf247 100644 --- a/i18n/rus/src/vs/workbench/api/node/extHostTask.i18n.json +++ b/i18n/rus/src/vs/workbench/api/node/extHostTask.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/rus/src/vs/workbench/api/node/extHostTreeViews.i18n.json index 8b6ad71cd4e6d..9f9c8f9221d82 100644 --- a/i18n/rus/src/vs/workbench/api/node/extHostTreeViews.i18n.json +++ b/i18n/rus/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "treeView.notRegistered": "Отсутствует зарегистрированное представление в виде дерева с идентификатором '{0}'.", + "treeItem.notFound": "Отсутствует элемент дерева с идентификатором '{0}'.", + "treeView.duplicateElement": "Элемент {0} уже зарегистрирован" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/rus/src/vs/workbench/browser/actions/configureLocale.i18n.json index 4b803b9827d23..b6db31f0ebdec 100644 --- a/i18n/rus/src/vs/workbench/browser/actions/configureLocale.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -7,6 +7,7 @@ "configureLocale": "Настроить язык", "displayLanguage": "Определяет язык интерфейса VSCode.", "doc": "Список поддерживаемых языков см. в {0}.", + "restart": "Для изменения значения требуется перезапуск VSCode.", "fail.createSettings": "Невозможно создать \"{0}\" ({1}).", "JsonSchema.locale": "Язык пользовательского интерфейса." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/rus/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json index 8eb0fd363dfe2..cdc81741e9ea8 100644 --- a/i18n/rus/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "hideActivitBar": "Скрыть панель действий", - "activityBarAriaLabel": "Переключатель активного представления" + "activityBarAriaLabel": "Переключатель активного представления", + "globalActions": "Глобальные действия" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/rus/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json index fe621363ede54..be54f2a8fa9ac 100644 --- a/i18n/rus/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -10,7 +10,7 @@ "multiSelection": "Выделений: {0}", "endOfLineLineFeed": "LF", "endOfLineCarriageReturnLineFeed": "CRLF", - "tabFocusModeEnabled": "Клавиша TAB перемещает фокус", + "screenReaderDetectedExtra": "Если вы не используете средство чтения с экрана, измените значение параметра \"editor.accessibilitySupport\" на \"off\".", "disableTabMode": "Отключить режим специальных возможностей", "gotoLine": "Перейти к строке", "indentation": "Отступ", diff --git a/i18n/rus/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/rus/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..b00914a41677c --- /dev/null +++ b/i18n/rus/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "Перейти к файлу...", + "quickNavigateNext": "Перейти к следующему элементу в Quick Open.", + "quickNavigatePrevious": "Перейти к предыдущему элементу в Quick Open.", + "quickSelectNext": "Выбрать следующее в Quick Open", + "quickSelectPrevious": "Выбрать предыдущее в Quick Open" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/browser/quickopen.i18n.json b/i18n/rus/src/vs/workbench/browser/quickopen.i18n.json index 2706fe8a1f006..b1992b59c50ff 100644 --- a/i18n/rus/src/vs/workbench/browser/quickopen.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/quickopen.i18n.json @@ -6,6 +6,5 @@ { "noResultsMatching": "Нет соответствующих результатов", "noResultsFound2": "Результаты не найдены", - "entryAriaLabel": "{0}, команда", - "noCommands": "Нет соответствующих команд" + "entryAriaLabel": "{0}, команда" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/browser/viewlet.i18n.json b/i18n/rus/src/vs/workbench/browser/viewlet.i18n.json index 9df902210c790..c5dc5c2265a2e 100644 --- a/i18n/rus/src/vs/workbench/browser/viewlet.i18n.json +++ b/i18n/rus/src/vs/workbench/browser/viewlet.i18n.json @@ -4,6 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "collapse": "Свернуть все", - "viewToolbarAriaLabel": "Действий: {0}" + "collapse": "Свернуть все" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/common/theme.i18n.json b/i18n/rus/src/vs/workbench/common/theme.i18n.json index 3939a7804faa4..2addbdf64784d 100644 --- a/i18n/rus/src/vs/workbench/common/theme.i18n.json +++ b/i18n/rus/src/vs/workbench/common/theme.i18n.json @@ -7,27 +7,42 @@ "tabActiveBackground": "Цвет фона активной вкладки. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "tabInactiveBackground": "Цвет фона неактивной вкладки. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "tabBorder": "Граница для разделения вкладок. Вкладки — это контейнеры для редакторов в области редакторов. В одной группе редакторов можно открыть несколько вкладок. Может быть несколько групп редакторов.", + "tabActiveForeground": "Цвет переднего плана активной вкладки в активной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", + "tabInactiveForeground": "Цвет переднего плана неактивной вкладки в активной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", + "tabUnfocusedActiveForeground": "Цвет переднего плана активной вкладки в неактивной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", + "tabUnfocusedInactiveForeground": "Цвет переднего плана неактивной вкладки в неактивной группе. Вкладки — это контейнеры для редакторов в области редактора. В одной группе редакторов можно открыть несколько вкладок. Может присутствовать несколько групп редакторов.", "editorGroupBackground": "Цвет фона группы редакторов. Группы редакторов представляют собой контейнеры редакторов. Цвет фона отображается при перетаскивании групп редакторов.", + "tabsContainerBackground": "Цвет фона для заголовка группы редакторов, когда вкладки включены. Группы редакторов представляют собой контейнеры редакторов.", + "tabsContainerBorder": "Цвет границы для заголовка группы редакторов, когда вкладки включены. Группы редакторов представляют собой контейнеры редакторов.", "editorGroupHeaderBackground": "Цвет фона для заголовка группы редакторов, когда вкладки отключены. Группы редакторов представляют собой контейнеры редакторов.", "editorGroupBorder": "Цвет для разделения нескольких групп редакторов. Группы редакторов — это контейнеры редакторов.", + "editorDragAndDropBackground": "Цвет фона при перетаскивании редакторов. Этот цвет должен обладать прозрачностью, чтобы содержимое редактора оставалось видимым.", + "panelBackground": "Цвет фона панели. Панели показаны под областью редактора и содержат такие представления, как выходные данные и встроенный терминал.", "panelBorder": "Цвет верхней границы панели, отделяющей ее от редактора. Панели показаны под областью редактора и содержат такие представления, как выходные данные и встроенный терминал.", "panelActiveTitleForeground": "Цвет заголовка для активной панели. Панели отображаются под областью редактора и содержат такие представления, как окно вывода и встроенный терминал.", "panelInactiveTitleForeground": "Цвет заголовка для неактивной панели. Панели отображаются под областью редактора и содержат такие представления, как окно вывода и встроенный терминал.", "panelActiveTitleBorder": "Цвет границ для заголовка активной панели. Панели отображаются под областью редактора и содержат такие представления, как окно вывода и встроенный терминал.", "statusBarForeground": "Цвет переднего плана панели состояния. Панель состояния отображается внизу окна.", "statusBarBackground": "Цвет фона стандартной панели состояния. Панель состояния отображается внизу окна.", + "statusBarBorder": "Цвет границы строки состояния, который распространяется на боковую панель и редактор. Строка состояния расположена в нижней части окна.", "statusBarNoFolderBackground": "Цвет фона панели состояния, если папка не открыта. Панель состояния отображается внизу окна.", + "statusBarNoFolderForeground": "Цвет переднего плана строки состояния, если папка не открыта. Строка состояния отображается в нижней части окна.", "statusBarItemActiveBackground": "Цвет фона элементов панели состояния при щелчке. Панель состояния отображается внизу окна.", "statusBarItemHoverBackground": "Цвет фона элементов панели состояния при наведении. Панель состояния отображается внизу окна.", "statusBarProminentItemBackground": "Цвет фона приоритетных элементов панели состояния. Приоритетные элементы выделяются на фоне других элементов панели состояния, чтобы подчеркнуть их значение. Панель состояния отображается в нижней части окна.", "statusBarProminentItemHoverBackground": "Цвет фона приоритетных элементов панели состояния при наведении. Приоритетные элементы выделяются на фоне других элементов панели состояния, чтобы подчеркнуть их значение. Панель состояния отображается в нижней части окна.", "activityBarBackground": "Цвет фона панели действий. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", "activityBarForeground": "Цвет переднего плана панели действий (например, цвет, используемый для значков). Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", + "activityBarBorder": "Цвет границы панели действий, который распространяется на боковую панель. Панель действий отображается слева или справа и позволяет переключаться между представлениями в боковой панели.", + "activityBarDragAndDropBackground": "Цвет панели обратной связи при перетаскивании для элементов панели действий. Цвет должен обладать прозрачностью, чтобы содержимое панели действий оставалось видимым. Панель действий отображается с правого или с левого края и позволяет переключаться между представлениями в боковой панели.", "activityBarBadgeBackground": "Цвет фона значка уведомлений о действиях. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", "activityBarBadgeForeground": "Цвет переднего плана значка уведомлений о действиях. Панель действий отображается слева или справа и позволяет переключаться между представлениями боковой панели.", "sideBarBackground": "Цвет фона боковой панели. Боковая панель — это контейнер таких представлений, как проводник и поиск.", + "sideBarForeground": "Цвет переднего плана боковой панели. Боковая панель — это контейнер для таких представлений, как проводник и поиск.", + "sideBarBorder": "Цвет границы боковой панели со стороны редактора. Боковая панель — это контейнер для таких представлений, как проводник и поиск.", "sideBarTitleForeground": "Цвет переднего плана заголовка боковой панели. Боковая панель — это контейнер для таких представлений, как проводник и поиск.", "sideBarSectionHeaderBackground": "Цвет фона для заголовка раздела боковой панели. Боковая панель — это контейнер для таких представлений, как проводник и поиск.", + "sideBarSectionHeaderForeground": "Цвет переднего плана для заголовка раздела боковой панели. Боковая панель — это контейнер для таких представлений, как проводник и поиск.", "titleBarActiveForeground": "Передний план панели заголовка, если окно активно. Обратите внимание, что этот цвет сейчас поддерживается только в macOS.", "titleBarInactiveForeground": "Передний план панели заголовка, если окно неактивно. Обратите внимание, что этот цвет сейчас поддерживается только в macOS.", "titleBarActiveBackground": "Фон панели заголовка, если окно активно. Обратите внимание, что этот цвет сейчас поддерживается только в macOS.", diff --git a/i18n/rus/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/actions.i18n.json index 867ffadb0a4bd..5d2a1aca0bb2f 100644 --- a/i18n/rus/src/vs/workbench/electron-browser/actions.i18n.json +++ b/i18n/rus/src/vs/workbench/electron-browser/actions.i18n.json @@ -6,9 +6,6 @@ { "closeActiveEditor": "Закрыть редактор", "closeWindow": "Закрыть окно", - "switchWindow": "Переключить окно", - "switchWindowPlaceHolder": "Выберите окно", - "current": "Текущее окно", "closeFolder": "Закрыть папку", "noFolderOpened": "В настоящий момент в этом экземпляре нет открытой папки, которую можно было бы закрыть.", "newWindow": "Новое окно", @@ -20,7 +17,7 @@ "zoomReset": "Сбросить масштаб", "appPerf": "Производительность запуска", "reloadWindow": "Перезагрузить окно", - "openRecent": "Открыть последний", + "current": "Текущее окно", "folders": "папки", "files": "файлы", "openRecentPlaceHolderMac": "Выбрать путь (удерживайте клавишу CMD, чтобы открыть в новом окне)", @@ -32,10 +29,6 @@ "openDocumentationUrl": "Документация", "openIntroductoryVideosUrl": "Вступительные видео", "toggleSharedProcess": "Переключить общий процесс", - "navigateLeft": "Перейти к части представления слева", - "navigateRight": "Перейти к части представления справа", - "navigateUp": "Перейти к части представления вверху", - "navigateDown": "Перейти к части представления внизу", "increaseViewSize": "Увеличить размер текущего представления", "decreaseViewSize": "Уменьшить размер текущего представления" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json index f2bd599c1b9df..d3dd4c58f4493 100644 --- a/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -31,10 +31,6 @@ "window.openFoldersInNewWindow.off": "Папки будут заменять последнее активное окно.", "window.openFoldersInNewWindow.default": "Папки будут открываться в новом окне, если папка не выбрана в приложении (например, в меню \"Файл\").", "openFoldersInNewWindow": "Определяет, будут ли папки открываться в новом окне или заменять последнее активное окно.\n- default: папки будут открываться в новом окне, если папка не выбрана из приложения (например, из меню \"Файл\").\n- on: папки будут открываться в новом окне.\n- off: папки будут заменять последнее активное окно.\nОбратите внимание, что возможны случаи, когда этот параметр игнорируется (например, при использовании параметра командной строки -new-window или -reuse-window).", - "window.reopenFolders.none": "Запрет повторного открытия папки.", - "window.reopenFolders.one": "Повторное открытие последней активной папки.", - "window.reopenFolders.all": "Повторное открытие всех папок последнего сеанса.", - "reopenFolders": "Управляет повторным открытием папок после перезапуска. Выберите значение \"none\", чтобы не открывать папку повторно, \"one\", чтобы открывалась последняя папка, с которой вы работали, или \"all\", чтобы открывались все папки последнего сеанса.", "restoreFullscreen": "Определяет, должно ли окно восстанавливаться в полноэкранном режиме, если оно было закрыто в полноэкранном режиме.", "zoomLevel": "Настройте масштаб окна. Исходный размер равен 0. Увеличение или уменьшение значения на 1 означает увеличение или уменьшение окна на 20 %. Чтобы более точно задать масштаб, можно также ввести десятичное число.", "title": "Определяет заголовок окна в зависимости от активного редактора. Переменные заменяются на основании контекста.\n${activeEditorShort}: например, myFile.txt\n${activeEditorMedium}: например, myFolder/myFile.txt\n${activeEditorLong}: например, /Users/Development/myProject/myFolder/myFile.txt\n${rootName}: например, myProject\n${rootPath}: например, /Users/Development/myProject\n${appName}: например, VS Code\n${dirty}: индикатор \"грязного\", если активный редактор является \"грязным\"\n${separator}: условный разделитель (\" - \"), который отображается, только если окружен переменными со значениями.", @@ -42,11 +38,13 @@ "window.newWindowDimensions.inherit": "Открывать новые окна того же размера, что и последнее активное окно.", "window.newWindowDimensions.maximized": "Открывать новые окна в развернутом состоянии.", "window.newWindowDimensions.fullscreen": "Открывать новые окна в полноэкранном режиме.", + "newWindowDimensions": "Определяет размеры нового открывающегося окна, если по крайней мере одно окно уже открыто. По умолчанию новое окно будет открыто в центре экрана в уменьшенном размере. Если указано значение \"inherit\", размеры нового окна будут равны размерам последнего активного окна. Если указано значение \"maximized\", окно будет открыто в максимальном размере, а если указано значение \"fullscreen\", окно будет открыто в полноэкранном режиме. Обратите внимание, что этот параметр не влияет на первое открываемое окно. Размеры и расположение первого окна всегда будут совпдаать с размерами и расположением этого окна перед закрытием.", "window.menuBarVisibility.default": "Меню скрыто только в полноэкранном режиме.", "window.menuBarVisibility.visible": "Меню всегда видимо, даже в полноэкранном режиме.", "window.menuBarVisibility.toggle": "Меню скрыто, но его можно вывести с помощью клавиши ALT.", "window.menuBarVisibility.hidden": "Меню всегда скрыто.", "menuBarVisibility": "Определяет видимость строки меню. Значение toggle указывает, что строка меню скрыта и для ее вывода нужно один раз нажать клавишу ALT. По умолчанию строка меню не будет отображаться только в полноэкранном режиме.", + "enableMenuBarMnemonics": "Если этот параметр установлен, главные меню можно открыть с помощью сочетаний клавиш с клавишей ALT. Отключение назначенных клавиш позволит связать эти сочетания клавиш с клавишей ALT с командами редактора.", "autoDetectHighContrast": "Если включено, будет выполняться автоматический переход к высококонтрастной теме, если в Windows используется тема высокой контрастности, или к темной теме при выходе из темы высокой контрастности Windows.", "titleBarStyle": "Настройка внешнего вида заголовка окна. Чтобы применить изменения, потребуется полный перезапуск.", "window.nativeTabs": "Включает вкладки окна macOS Sierra. Обратите внимание, что для применения этих изменений потребуется полная перезагрузка, и что для всех внутренних вкладок будет отключен пользовательский стиль заголовка, если он был настроен.", @@ -56,5 +54,7 @@ "zenMode.hideTabs": "Определяет, будет ли включение режима Zen также скрывать вкладки рабочего места.", "zenMode.hideStatusBar": "Определяет, будет ли включение режима Zen также скрывать строку состояния в нижней части рабочего места.", "zenMode.hideActivityBar": "Определяет, будет ли при включении режима Zen скрыта панель действий в левой части рабочей области.", - "zenMode.restore": "Определяет, должно ли окно восстанавливаться в режиме Zen, если закрылось в режиме Zen." + "zenMode.restore": "Определяет, должно ли окно восстанавливаться в режиме Zen, если закрылось в режиме Zen.", + "workspaceConfigurationTitle": "Рабочая область", + "files.exclude.boolean": "Стандартная маска, соответствующая путям к файлам. Задайте значение true или false, чтобы включить или отключить маску." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..b6a2c9c7653f0 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "Установка значения \"on\" для параметра \"editor.accessibilitySupport\".", + "openingDocs": "Открывается страница документации по специальным возможностям VS Code.", + "introMsg": "Благодарим за ознакомление со специальными возможностями VS Code.", + "status": "Состояние:", + "changeConfigToOnMac": "Чтобы включить постоянную оптимизацию редактора для использования со средствами чтения с экрана, нажмите COMMMAND+E.", + "changeConfigToOnWinLinux": "Чтобы включить постоянную оптимизацию редактора для использования со средствами чтения с экрана, нажмите CTRL+E.", + "auto_unknown": "В редакторе настроено определение средства чтения с экрана с помощью API платформы, но текущая среда выполнения это не поддерживает.", + "auto_on": "Редактор автоматически определил, что средство чтения с экрана подключено.", + "auto_off": "В редакторе настроено автоматическое определение средства чтения с экрана, но сейчас это средство не подключено.", + "configuredOn": "Постоянная оптимизацию редактора для использования со средствами чтения с экрана включена. Чтобы ее отключить, измените параметр \"editor.accessibilitySupport\".", + "configuredOff": "Для редактора не настроена оптимизация для использования со средствами чтения с экрана.", + "tabFocusModeOnMsg": "При нажатии клавиши TAB в текущем редакторе фокус ввода переместится на следующий элемент, способный его принять. Чтобы изменить это поведение, нажмите клавишу {0}.", + "tabFocusModeOnMsgNoKb": "При нажатии клавиши TAB в текущем редакторе фокус ввода переместится на следующий элемент, способный его принять. Команду {0} сейчас невозможно выполнить с помощью настраиваемого сочетания клавиш.", + "tabFocusModeOffMsg": "При нажатии клавиши TAB в текущем редакторе будет вставлен символ табуляции. Чтобы изменить это поведение, нажмите клавишу {0}.", + "tabFocusModeOffMsgNoKb": "При нажатии клавиши TAB в текущем редакторе будет вставлен символ табуляции. Команду {0} сейчас невозможно выполнить с помощью настраиваемого сочетания клавиш.", + "openDocMac": "Нажмите COMMAND+H, чтобы открыть окно браузера с дополнительными сведениями о специальных возможностях VS Code.", + "openDocWinLinux": "Нажмите CTRL+H, чтобы открыть окно браузера с дополнительными сведениями о специальных возможностях VS Code.", + "outroMsg": "Вы можете закрыть эту подсказку и вернуться в редактор, нажав клавиши ESCAPE или SHIFT+ESCAPE.", + "ShowAccessibilityHelpAction": "Показать справку по специальным возможностям" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..62f29e0311a41 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Включить или отключить режим с несколькими курсорами" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/browser/debugActions.i18n.json index 0a2abc6c1db6a..fca987ec80324 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/browser/debugActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -6,6 +6,7 @@ { "openLaunchJson": "Открыть {0}", "launchJsonNeedsConfigurtion": "Настройте или исправьте \"launch.json\"", + "noFolderDebugConfig": "Чтобы перейти к расширенной конфигурации отладки, сначала откройте папку.", "startDebug": "Начать отладку", "startWithoutDebugging": "Начать без отладки", "selectAndStartDebugging": "Выбрать и начать отладку", diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json index 8b6ad71cd4e6d..aa388e9709f74 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -3,4 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "noFolderDebugConfig": "Перед расширенной настройкой отладки откройте папку." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json index 80a8dddc8409a..5773174ff02e8 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json @@ -5,16 +5,12 @@ // Do not edit this file. It is machine generated. { "variablesSection": "Раздел переменных", - "variables": "Переменные", "variablesAriaTreeLabel": "Отладка переменных", "expressionsSection": "Раздел выражений", - "watch": "Контрольное значение", "watchAriaTreeLabel": "Отладка выражений контрольных значений", "callstackSection": "Раздел стека вызовов", "debugStopped": "Приостановлено на {0}", - "callStack": "Стек вызовов", "callStackAriaLabel": "Отладка стека вызовов", "breakpointsSection": "Раздел точек останова", - "breakpoints": "Точки останова", "breakpointsAriaTreeLabel": "Отладка точек останова" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json index c4b97bcfe108d..3f8d10ed5bd10 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -6,5 +6,6 @@ { "copyValue": "Копировать значение", "copy": "Копировать", + "copyAll": "Копировать все", "copyStackTrace": "Копировать стек вызовов" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json index fa2fb421cfc1d..bf63a86ed4abb 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "statusBarDebuggingBackground": "Цвет фона панели состояния при отладке программы. Панель состояния показана внизу окна." + "statusBarDebuggingBackground": "Цвет фона панели состояния при отладке программы. Панель состояния показана внизу окна.", + "statusBarDebuggingForeground": "Цвет переднего плана строки состояния при отладке программы. Строка состояния расположена в нижней части окна." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/rus/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json index 90a5d4e861ea8..109e9178c2dd0 100644 --- a/i18n/rus/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -7,6 +7,7 @@ "debugAdapterBinNotFound": "Исполняемый файл адаптера отладки \"{0}\" не существует.", "debugAdapterCannotDetermineExecutable": "Невозможно определить исполняемый файл для адаптера отладки \"{0}\".", "debugType": "Тип конфигурации.", + "debugTypeNotRecognised": "Не удается распознать тип отладки. Убедитесь, что соответствующее расширение отладки установлено и включено.", "node2NotSupported": "Значение \"node2\" больше не поддерживается; используйте \"node\" и задайте для атрибута \"protocol\" значение \"inspector\".", "debugName": "Имя конфигурации; отображается в раскрывающемся меню конфигурации запуска.", "debugRequest": "Запросите тип конфигурации. Возможные типы: \"запуск\" и \"подключение\".", diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json index 4a07fdffeba22..c7a704d95062a 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -4,6 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "previousEditPoint": "Emmet: предыдущая точка изменения", - "nextEditPoint": "Emmet: следующая точка изменения" + "previousEditPoint": "Emmet: перейти к предыдущей точке изменения", + "nextEditPoint": "Emmet: перейти к следующей точке изменения" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json index b632b35fef617..92ea6283604db 100644 --- a/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -9,5 +9,6 @@ "emmetPreferences": "Настройки, которые используются для изменения поведения некоторых действий и сопоставителей Emmet.", "emmetSyntaxProfiles": "Задайте профиль для указанного синтаксиса или используйте свой собственный профиль с определенными правилами.", "emmetExclude": "Массив языков, в которых не должны развертываться сокращения Emmet.", - "emmetExtensionsPath": "Путь к папке, содержащей профили Emmet, фрагменты кода и настройки" + "emmetExtensionsPath": "Путь к папке, содержащей профили Emmet, фрагменты кода и настройки", + "useNewEmmet": "Попробуйте новые модули emmet (которые в конечном итоге заменят устаревшую библиотеку emmet), чтобы ознакомиться со всеми функциями emmet." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json index c74eca64051a2..fd46efd995448 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -24,6 +24,10 @@ "default": "По умолчанию", "debuggers": "Отладчики ({0})", "debugger name": "Имя", + "views": "Представления ({0})", + "view id": "Идентификатор", + "view name": "Имя", + "view location": "Где", "themes": "Темы ({0})", "JSON Validation": "Проверка JSON ({0})", "commands": "Команды ({0})", diff --git a/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json index 34a96c349af3c..b01a24938599c 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -22,6 +22,8 @@ "disableGloballyAction": "Всегда", "disableAction": "Отключить", "checkForUpdates": "Проверка обновлений", + "enableAutoUpdate": "Включить автоматическое обновление расширений", + "disableAutoUpdate": "Отключить автоматическое обновление расширений", "updateAll": "Обновить все расширения", "reloadAction": "Перезагрузка", "postUpdateTooltip": "Обновление окна для обновления", @@ -44,6 +46,8 @@ "showWorkspaceRecommendedExtensions": "Показать рекомендуемые расширения рабочей области", "showRecommendedKeymapExtensions": "Показать рекомендуемые раскладки клавиатуры", "showRecommendedKeymapExtensionsShort": "Раскладки клавиатуры", + "showLanguageExtensions": "Показать расширения языка", + "showLanguageExtensionsShort": "Расширения языка", "configureWorkspaceRecommendedExtensions": "Настроить рекомендуемые расширения (рабочая область)", "ConfigureWorkspaceRecommendations.noWorkspace": "Рекомендации доступны только для папки рабочей области.", "OpenExtensionsFile.failed": "Не удается создать файл \"extensions.json\" в папке \".vscode\" ({0}).", @@ -51,5 +55,8 @@ "disableAll": "Отключить все установленные расширения", "disableAllWorkspace": "Отключить все установленные расширения для этой рабочей области", "enableAll": "Включить все установленные расширения", - "enableAllWorkspace": "Включить все установленные расширения для этой рабочей области" + "enableAllWorkspace": "Включить все установленные расширения для этой рабочей области", + "extensionButtonProminentBackground": "Цвет фона кнопок, соответствующих основным действиям расширения (например, кнопка \"Установить\").", + "extensionButtonProminentForeground": "Цвет переднего плана кнопок, соответствующих основным действиям расширения (например, кнопка \"Установить\").", + "extensionButtonProminentHoverBackground": "Цвет фона кнопок, соответствующих основным действиям расширения, при наведении мыши (например, кнопка \"Установить\")." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json index e3fabddede95c..d91b6f992703f 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -9,6 +9,8 @@ "neverShowAgain": "Больше не показывать", "close": "Закрыть", "workspaceRecommended": "Эта рабочая область включает рекомендации по расширениям.", + "ignoreExtensionRecommendations": "Вы действительно хотите проигнорировать все рекомендации по расширениям?", + "ignoreAll": "Да, игнорировать все", "no": "Нет", "cancel": "Отмена" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json index 2796f4f1c1fe2..957fb1a214bbe 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -10,5 +10,6 @@ "extensions": "Расширения", "view": "Просмотреть", "extensionsConfigurationTitle": "Расширения", - "extensionsAutoUpdate": "Автоматически обновлять расширения" + "extensionsAutoUpdate": "Автоматически обновлять расширения", + "extensionsIgnoreRecommendations": "Игнорировать рекомендации по расширениям" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json index 82ee62547a4a8..0d3592d30b4af 100644 --- a/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -4,8 +4,10 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "disableOtherKeymapsConfirmation": "Отключить другие раскладки клавиатуры ({0}), чтобы избежать конфликта между настраиваемыми сочетаниями клавиш?", "yes": "Да", "no": "Нет", + "betterMergeDisabled": "В текущую версию встроено средство слияния с лучшей функциональностью. Установленное расширение было отключено и не может быть удалено.", "uninstall": "Удаление", "later": "Позже" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json index 6c404cd1796be..6c00f987837f4 100644 --- a/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -16,6 +16,7 @@ "associations": "Настройте сопоставления файлов с языками (например, \"*.extension\": \"html\"). У них будет приоритет перед заданными по умолчанию сопоставлениями установленных языков.", "encoding": "Кодировка набора символов по умолчанию, используемая при чтении и записи файлов", "autoGuessEncoding": "Если параметр включен, производится попытка определить кодировку набора символов при открытии файлов", + "eol": "Символ конца строки по умолчанию. Используйте \\n для LF и \\r\\n для CRLF.", "trimTrailingWhitespace": "Если этот параметр включен, при сохранении файла будут удалены концевые пробелы.", "insertFinalNewline": "Если этот параметр включен, при сохранении файла в его конец вставляется финальная новая строка.", "files.autoSave.off": "\"Грязный\" файл не сохраняется автоматически.", @@ -26,6 +27,7 @@ "autoSaveDelay": "Определяет задержку в мс, после которой измененный файл сохраняется автоматически. Действует, только если параметр \"files.autoSave\" имеет значение \"{0}\".", "watcherExclude": "Настройте стандартные маски путей файлов, чтобы исключить их из списка отслеживаемых файлов. После изменения этого параметра потребуется перезагрузка. При отображении сообщения \"Код потребляет большое количество процессорного времени при запуске\" вы можете исключить большие папки, чтобы уменьшить первоначальную загрузку.", "hotExit.off": "Отключите \"горячий\" выход.", + "hotExit.onExit": "Функция \"горячий выход\" будет активирована при закрытии приложения, то есть при закрытии последнего окна в Windows или Linux или при активации команды workbench.action.quit (палитра команд, настраиваемое сочетание клавиш, меню). Все окна с резервными копиями будут восстановлены при следующем запуске.", "hotExit": "Определяет, запоминаются ли несохраненные файлы между сеансами. В этом случае приглашение на их сохранение при выходе из редактора не появляется.", "defaultLanguage": "Режим языка по умолчанию, который назначается новым файлам.", "editorConfigurationTitle": "Редактор", diff --git a/i18n/rus/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/rus/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json index 6926e676b12d4..eaee6522dac60 100644 --- a/i18n/rus/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -5,7 +5,5 @@ // Do not edit this file. It is machine generated. { "explorerSection": "Раздел проводника", - "noWorkspace": "Нет открытой папки", - "noWorkspaceHelp": "Вы еще не открыли папку.", "openFolder": "Открыть папку" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/rus/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json index 57e8e68aedc82..908990efe61ce 100644 --- a/i18n/rus/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "openEditosrSection": "Раздел открытых редакторов", "openEditors": "Открытые редакторы", + "openEditosrSection": "Раздел открытых редакторов", "treeAriaLabel": "Открытые редакторы: список активных файлов", "dirtyCounter": "Не сохранено: {0}" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json index 5ac046256bd5e..c5024f1f1d0ff 100644 --- a/i18n/rus/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -9,5 +9,7 @@ "prof.message": "Профили успешно созданы.", "prof.detail": "Создайте проблему и вручную вложите следующие файлы:\n{0}", "prof.restartAndFileIssue": "Создать проблему и выполнить перезапуск", - "prof.restart": "Перезапустить" + "prof.restart": "Перезапустить", + "prof.thanks": "Спасибо за помощь.", + "prof.detail.restart": "Для продолжения работы с '{0}' необходимо еще раз перезагрузить систему. Благодарим вас за участие." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json index 92f25868855c7..41c45ab216ed5 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -5,5 +5,7 @@ // Do not edit this file. It is machine generated. { "defineKeybinding.start": "Определить назначение клавиш", - "defineKeybinding.kbLayoutErrorMessage": "Вы не сможете нажать это сочетание клавиш в текущей раскладке клавиатуры." + "defineKeybinding.kbLayoutErrorMessage": "Вы не сможете нажать это сочетание клавиш в текущей раскладке клавиатуры.", + "defineKeybinding.kbLayoutLocalAndUSMessage": "**{0}** для текущей раскладки клавиатуры (**{1}** для стандартной раскладки клавиатуры \"Английский, США\")", + "defineKeybinding.kbLayoutLocalMessage": "**{0}** для текущей раскладки клавиатуры." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json index 234e294922c98..702472aecfb6e 100644 --- a/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -4,6 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "errorInvalidConfiguration": "Не удается записать параметры. Устраните ошибки и предупреждения в файле и повторите попытку.", "editTtile": "Изменить", "replaceDefaultValue": "Заменить в параметрах", "copyDefaultValue": "Копировать в параметры", diff --git a/i18n/rus/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/rus/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json index f6f0bf572b20a..12bcf3ccba9e1 100644 --- a/i18n/rus/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "showTriggerActions": "Показать все команды", + "showCommands.label": "Палитра команд...", "entryAriaLabelWithKey": "{0}, {1}, команды", "entryAriaLabel": "{0}, команды", "canNotRun": "Выполнить команду {0} отсюда невозможно.", diff --git a/i18n/rus/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..33c1e2c5ad706 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchMessage": "После изменения параметра необходима выполнить перезагрузку, чтобы изменения вступили в силу.", + "relaunchDetail": "Нажмите кнопку \"Перезагрузить\", чтобы перезагрузить {0} и включить параметр.", + "restart": "Перезапустить" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/rus/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json index 8b6ad71cd4e6d..ce6c4c198e536 100644 --- a/i18n/rus/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -3,4 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. -{} \ No newline at end of file +{ + "editorGutterModifiedBackground": "Цвет фона полей редактора для измененных строк.", + "editorGutterAddedBackground": "Цвет фона полей редактора для добавленных строк.", + "editorGutterDeletedBackground": "Цвет фона полей редактора для удаленных строк." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json index 029a91dd1211a..ba48b09e26359 100644 --- a/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -5,6 +5,7 @@ // Do not edit this file. It is machine generated. { "toggleGitViewlet": "Показать GIT", + "installAdditionalSCMProviders": "Установить дополнительных поставщиков SCM...", "source control": "Система управления версиями", "toggleSCMViewlet": "Показать SCM", "view": "Просмотреть" diff --git a/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json index 0d1ad24f725d3..f345f2df7faa2 100644 --- a/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "installAdditionalSCMProviders": "Установить дополнительных поставщиков SCM...", "switch provider": "Переключить поставщик SCM..." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/rus/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json index 845c4f038e9c3..cd394a2c256ae 100644 --- a/i18n/rus/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -6,5 +6,7 @@ { "searchMatches": "Найдено соответствий: {0}", "searchMatch": "Найдено соответствие: {0}", - "fileMatchAriaLabel": "Совпадений в файле {1} папки {2}: {0}, результат поиска" + "fileMatchAriaLabel": "Совпадений в файле {1} папки {2}: {0}, результат поиска", + "replacePreviewResultAria": "Заменить термин {0} на {1} в столбце {2} и строке {3}", + "searchResultAria": "Обнаружен термин {0} в столбце {1} и строке {2}" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json index d4cbde5d13487..1ed22c6e056cd 100644 --- a/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -9,5 +9,6 @@ "vscode.extension.contributes.snippets-path": "Путь к файлу фрагментов. Путь указывается относительно папки расширения и обычно начинается с \"./snippets/\".", "invalid.language": "Неизвестный язык в contributes.{0}.language. Указанное значение: {1}", "invalid.path.0": "В contributes.{0}.path требуется строка. Указанное значение: {1}", - "invalid.path.1": "contributes.{0}.path ({1}) должен был быть включен в папку расширения ({2}). Это может сделать расширение непереносимым." + "invalid.path.1": "contributes.{0}.path ({1}) должен был быть включен в папку расширения ({2}). Это может сделать расширение непереносимым.", + "badVariableUse": "Похоже, во фрагменте \"{0}\" перепутаны переменные и заполнители. Дополнительные сведения см. на странице https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json index 328405d58a0ac..cca07302e3cf7 100644 --- a/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -11,6 +11,6 @@ "snippetSchema.json.default": "Пустой фрагмент", "snippetSchema.json": "Настройка фрагмента пользователя", "snippetSchema.json.prefix": "Префикс, используемый при выборе фрагмента в Intellisense.", - "snippetSchema.json.body": "Содержимое фрагмента. Используйте \"${id}\", \"${id:label}\", \"${1:label}\" для переменных и \"$0\", \"$1\" для положений курсора", + "snippetSchema.json.body": "Содержимое фрагмента. Используйте '$1', '${1:defaultText}' для определения положения курсора и '$0' для определения конечного положения курсора. Для вставки переменных используйте синтаксис '${varName}' и '${varName:defaultText}', например, \"Это файл: $TM_FILENAME\".", "snippetSchema.json.description": "Описание фрагмента." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..87ed9681f0cb8 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "Помогите нам улучшить поддержку {0}", + "takeShortSurvey": "Пройдите краткий опрос", + "remindLater": "Напомнить мне позже", + "neverAgain": "Больше не показывать" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..10c206f9d2fbe --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Вас не затруднит пройти краткий опрос?", + "takeSurvey": "Пройти опрос", + "remindLater": "Напомнить мне позже", + "neverAgain": "Больше не показывать" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..2037e5496b95c --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "Нет соответствующих задач" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json index 2f8e368102c13..5a8464f78ea0a 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -4,5 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "entryAriaLabel": "{0}, задачи" + "entryAriaLabel": "{0}, задачи", + "customizeTask": "Настроить задачу" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..2037e5496b95c --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noTasksMatching": "Нет соответствующих задач" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json index 7802fd33b5d7a..90eadea7cc82e 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -12,5 +12,6 @@ "ConfigurationParser.invalidVaraibleReference": "Ошибка: недопустимая ссылка на problemMatcher: {0}\n", "ConfigurationParser.noTaskName": "Ошибка: задачи должны предоставлять свойство taskName. Задача будет проигнорирована.\n{0}\n", "taskConfiguration.shellArgs": "Предупреждение: задача \"{0}\" является командой оболочки, и имя команды или одного из ее аргументов включает пробелы без escape-последовательности. Чтобы обеспечить правильную расстановку кавычек в командной строке, объедините аргументы в команде.", + "taskConfiguration.noCommandOrDependsOn": "Ошибка: в задаче \"{0}\" не указаны ни команда, ни свойство dependsOn. Задача будет проигнорирована. Определение задачи:\n{1}", "taskConfiguration.noCommand": "Ошибка: задача \"{0}\" не определяет команду. Задача будет игнорироваться. Ее определение:\n{1}" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json index b2e6776ffdae8..f149850fd4c75 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -7,6 +7,7 @@ "JsonSchema.options": "Дополнительные параметры команды", "JsonSchema.options.cwd": "Текущий рабочий каталог выполняемой программы или сценария. Если этот параметр опущен, используется корневой каталог текущей рабочей области Code.", "JsonSchema.options.env": "Среда выполняемой программы или оболочки. Если этот параметр опущен, используется среда родительского процесса.", + "JsonSchema.shellConfiguration": "Задает используемую оболочку.", "JsonSchema.shell.executable": "Используемая оболочка.", "JsonSchema.shell.args": "Аргументы оболочки.", "JsonSchema.command": "Выполняемая команда. Это может быть внешняя программа или команда оболочки.", diff --git a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json index 02c579648319e..e387db19de674 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -5,6 +5,8 @@ // Do not edit this file. It is machine generated. { "JsonSchema.version": "Номер версии конфигурации", + "JsonSchema._runner": "Средство запуска завершило работу. Используйте официальное свойство средства запуска", + "JsonSchema.runner": "Определяет, следует ли запустить задачу в качестве процесса с отображением выходных данных задачи в окне вывода или в терминале.", "JsonSchema.windows": "Настройка команд Windows", "JsonSchema.mac": "Настройка команд Mac", "JsonSchema.linux": "Настройка команд Linux", diff --git a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json index f74df060945e2..41c0b2f756ab3 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -7,6 +7,10 @@ "JsonSchema.shell": "Указывает, является ли команда командой оболочки или внешней программой. Если опущено, значение по умолчанию — false.", "JsonSchema.tasks.dependsOn.string": "Другая задача, от которой зависит эта задача.", "JsonSchema.tasks.dependsOn.array": "Другие задачи, от которых зависит эта задача.", + "JsonSchema.tasks.group": "Определяет, к какой группе выполнения принадлежит эта задача. Если параметр не указан, задача не принадлежит ни к одной из групп.", + "JsonSchema.tasks.type": "Определяет, выполняется ли задача в виде процесса или в виде команды оболочки. Значение по умолчанию — \"процесс\".", + "JsonSchema.version": "Номер версии конфигурации.", + "JsonSchema.tasks.customize": "Пользовательская задача, которая будет настраиваться.", "JsonSchema.windows": "Настройка команд Windows", "JsonSchema.mac": "Настройка команд Mac", "JsonSchema.linux": "Настройка команд Linux" diff --git a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json index 031f694786cb4..53e80072245ed 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -18,10 +18,12 @@ "problems": "Проблемы", "manyMarkers": "99+", "tasks": "Задачи", + "TaskSystem.noHotSwap": "Чтобы изменить подсистему выполнения задач, нужно перезапустить VS Code. Изменение игнорируется.", "TaskService.noBuildTask": "Задача сборки не определена. Отметьте задачу с помощью \"isBuildCommand\" в файле tasks.json.", "TaskService.noTestTask": "Задача теста не определена. Отметьте задачу с помощью \"isTestCommand\" в файле tasks.json.", "TaskServer.noTask": "Запрошенная задача {0} для выполнения не найдена.", - "TaskSystem.activeSame": "Задача уже активна и находится в режиме наблюдения. Чтобы завершить задачу, выполните команду \"F1 > terminate task\"", + "customizeParseErrors": "В конфигурации текущей задачи есть ошибки. Исправьте ошибки перед изменением задачи.", + "moreThanOneBuildTask": "В файле tasks.json определено несколько задач сборки. Выполняется первая задача.\n", "TaskSystem.active": "Уже выполняется задача. Завершите ее, прежде чем выполнять другую задачу.", "TaskSystem.restartFailed": "Не удалось завершить и перезапустить задачу {0}", "TaskSystem.configurationErrors": "Ошибка: в конфигурации указанной задачи при проверке были выявлены ошибки, и ее невозможно использовать. Сначала устраните ошибки.", diff --git a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json index 32514c87953bd..922550c51cb1f 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -6,5 +6,7 @@ { "TerminalTaskSystem.unknownError": "При выполнении задачи произошла неизвестная ошибка. Подробности см. в журнале выходных данных задач.", "TerminalTaskSystem.terminalName": "Задача — {0}", - "TerminalTaskSystem": "Невозможно выполнить команду оболочки на диске UNC." + "reuseTerminal": "Терминал будет повторно использоваться задачами. Чтобы закрыть его, нажмите любую клавишу.", + "TerminalTaskSystem": "Невозможно выполнить команду оболочки на диске UNC.", + "unkownProblemMatcher": "Не удается разрешить сопоставитель проблем {0}. Сопоставитель будет проигнорирован" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/rus/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json index 6aeff4e87a2eb..2e6dfe20c1876 100644 --- a/i18n/rus/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -7,5 +7,6 @@ "TaskRunnerSystem.unknownError": "При выполнении задачи произошла неизвестная ошибка. Подробности см. в журнале выходных данных задач.", "TaskRunnerSystem.watchingBuildTaskFinished": "\nОтслеживание задач сборки завершено.", "TaskRunnerSystem.childProcessError": "Failed to launch external program {0} {1}.", - "TaskRunnerSystem.cancelRequested": "\nЗадача \"{0}\" была завершена по запросу пользователя." + "TaskRunnerSystem.cancelRequested": "\nЗадача \"{0}\" была завершена по запросу пользователя.", + "unkownProblemMatcher": "Не удается разрешить сопоставитель проблем {0}. Сопоставитель будет проигнорирован" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json index 8104d226e8800..ccd5870dca1b9 100644 --- a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -8,6 +8,7 @@ "workbench.action.terminal.kill": "Завершить активный экземпляр терминала", "workbench.action.terminal.kill.short": "Завершить работу терминала", "workbench.action.terminal.copySelection": "Скопировать выделение", + "workbench.action.terminal.selectAll": "Выбрать все", "workbench.action.terminal.new": "Создание нового интегрированного терминала", "workbench.action.terminal.new.short": "Новый терминал", "workbench.action.terminal.focus": "Фокус на терминале", @@ -26,5 +27,8 @@ "workbench.action.terminal.scrollUp": "Прокрутить вверх (построчно)", "workbench.action.terminal.scrollUpPage": "Прокрутить вверх (страницу)", "workbench.action.terminal.scrollToTop": "Прокрутить до верхней границы", - "workbench.action.terminal.clear": "Очистить" + "workbench.action.terminal.clear": "Очистить", + "workbench.action.terminal.allowWorkspaceShell": "Разрешить настройку оболочки в рабочей области", + "workbench.action.terminal.disallowWorkspaceShell": "Запретить настройку оболочки в рабочей области", + "workbench.action.terminal.rename": "Переименовать" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json index 227600f316f4d..a43d3077cff1b 100644 --- a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -4,5 +4,7 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "terminal.background": "Цвет фона терминала. С его помощью можно указать цвет терминала, отличный от цвета панели.", + "terminal.foreground": "Цвет переднего плана терминала.", "terminal.ansiColor": "Цвет ANSI \"{0}\" в терминале." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..e03b15626d2d6 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Найти", + "placeholder.find": "Найти", + "label.previousMatchButton": "Предыдущее соответствие", + "label.nextMatchButton": "Следующее соответствие", + "label.closeButton": "Закрыть" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json index 2034b9a4ca8cd..07fc306b313d4 100644 --- a/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -4,7 +4,6 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "terminal.integrated.copySelection.noSelection": "Невозможно скопировать выделение в терминале, когда терминал не имеет фокуса", "terminal.integrated.exitedWithCode": "Процесс терминала завершен с кодом выхода: {0}", "terminal.integrated.waitOnExit": "Нажмите любую клавишу, чтобы закрыть терминал.", "terminal.integrated.launchFailed": "Не удалось запустить команду процесса терминала \"{0}{1}\" (код выхода: {2})" diff --git a/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json index 60eb5ce7cf9b4..b252e0872aa67 100644 --- a/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -6,6 +6,7 @@ { "selectTheme.label": "Цветовая тема", "installColorThemes": "Установить дополнительные цветовые темы...", + "themes.selectTheme": "Выберите цветовую тему (используйте клавиши стрелок вверх и вниз для предварительного просмотра)", "selectIconTheme.label": "Тема значков файлов", "installIconThemes": "Установить дополнительные темы значков файлов...", "noIconThemeLabel": "Нет", diff --git a/i18n/rus/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/rus/src/vs/workbench/parts/update/electron-browser/update.i18n.json index ef31128d567b2..9e8608fc276f4 100644 --- a/i18n/rus/src/vs/workbench/parts/update/electron-browser/update.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -15,5 +15,18 @@ "license": "Прочитать условия лицензии", "updateAvailable": "{0} будет обновлен после перезапуска.", "thereIsUpdateAvailable": "Доступно обновление.", - "noUpdatesAvailable": "В настоящее время нет доступных обновлений." + "noUpdatesAvailable": "В настоящее время нет доступных обновлений.", + "updateIsReady": "Доступно новое обновление.", + "commandPalette": "Палитра команд...", + "settings": "Параметры", + "keyboardShortcuts": "Сочетания клавиш", + "selectTheme.label": "Цветовая тема", + "themes.selectIconTheme.label": "Тема значков файлов", + "not available": "Обновления недоступны", + "checkingForUpdates": "Идет проверка наличия обновлений...", + "DownloadUpdate": "Скачать доступное обновление", + "DownloadingUpdate": "Скачивается обновление...", + "InstallingUpdate": "Идет установка обновления...", + "restartToUpdate": "Перезапустить для обновления...", + "checkForUpdates": "Проверить наличие обновлений..." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/rus/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..761072edd67cf --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "Действий: {0}" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/rus/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..3c41a4d1bdaa5 --- /dev/null +++ b/i18n/rus/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "представления должны быть массивом", + "requirestring": "свойство \"{0}\" является обязательным и должно иметь тип string", + "optstring": "свойство \"{0}\" может быть опущено или должно иметь тип string", + "vscode.extension.contributes.view.id": "Идентификатор представления. Используйте его для регистрации поставщика данных с помощью API-интерфейса \"vscode.window.registerTreeDataProviderForView\", а также для активации расширения с помощью регистрации события \"onView:${id}\" в \"activationEvents\".", + "vscode.extension.contributes.view.name": "Понятное имя представления. Будет отображаться на экране", + "vscode.extension.contributes.views": "Добавляет представления в редактор", + "views.explorer": "Представление проводника", + "locationId.invalid": "\"{0}\" не является допустимым расположением представления" +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json index 9cf8071dbbf2d..cbdb68fe6f74b 100644 --- a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -11,20 +11,26 @@ "welcomePage.openFolder": "Открыть папку...", "welcomePage.cloneGitRepository": "Клонировать репозиторий Git...", "welcomePage.recent": "Последние", + "welcomePage.moreRecent": "Дополнительные сведения...", "welcomePage.noRecentFolders": "Нет последних папок.", "welcomePage.help": "Справка", + "welcomePage.keybindingsCheatsheet": "Список сочетаний клавиш в печатном виде", "welcomePage.introductoryVideos": "Вступительные видео", "welcomePage.productDocumentation": "Документация по продукту", "welcomePage.gitHubRepository": "Репозиторий GitHub", "welcomePage.stackOverflow": "Stack Overflow", "welcomePage.showOnStartup": "Отображать страницу приветствия при запуске", "welcomePage.customize": "Настроить", + "welcomePage.installExtensionPacks": "Средства и языки", + "welcomePage.installExtensionPacksDescription": "Установить поддержку для {0} и {1}", + "welcomePage.moreExtensions": "Еще", "welcomePage.installKeymapDescription": "Установка сочетаний клавиш", + "welcomePage.installKeymapExtension": "Настроить сочетания клавиш для {0} и {1}", "welcomePage.others": "Другие", "welcomePage.colorTheme": "Цветовая тема", "welcomePage.colorThemeDescription": "Настройте редактор и код удобным образом.", + "welcomePage.learn": "Подробнее", "welcomePage.showCommands": "Найти и выполнить все команды.", - "welcomePage.showCommandsDescription": "Быстрый доступ и поиск команд на панели управления ({0})", "welcomePage.interfaceOverview": "Общие сведения об интерфейсе", "welcomePage.interfaceOverviewDescription": "Используйте визуальное наложение с выделением основных компонентов пользовательского интерфейса.", "welcomePage.interactivePlayground": "Интерактивная площадка", diff --git a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json index 9927d1b163aab..64481a105b129 100644 --- a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -4,7 +4,5 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { - "workbenchConfigurationTitle": "Workbench", - "welcomePage.enabled": "Если этот параметр включен, страница приветствия будет отображаться при запуске.", "help": "Справка" } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json index 1365e07209bb0..b5de51bfe073c 100644 --- a/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -4,17 +4,35 @@ *--------------------------------------------------------------------------------------------*/ // Do not edit this file. It is machine generated. { + "workbenchConfigurationTitle": "Рабочее место", + "welcomePage.enabled": "Если этот параметр включен, страница приветствия будет отображаться при запуске.", "welcomePage": "Добро пожаловать", + "welcomePage.javaScript": "JavaScript", "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", "welcomePage.vim": "Vim", "welcomePage.sublime": "Sublime", "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "Поддержка {0} уже добавлена.", + "welcomePage.willReloadAfterInstallingExtensionPack": "После установки дополнительной поддержки для {0} окно будет перезагружено.", + "welcomePage.installingExtensionPack": "Установка дополнительной поддержки для {0}...", + "welcomePage.extensionPackNotFound": "Не удается найти поддержку для {0} с идентификатором {1}.", "welcomePage.keymapAlreadyInstalled": "Сочетания клавиш {0} уже установлены.", "welcomePage.willReloadAfterInstallingKeymap": "Окно перезагрузится после установки сочетаний клавиш {0}.", "welcomePage.installingKeymap": "Устанавливаются сочетания клавиш {0}...", "welcomePage.keymapNotFound": "Не удалось найти сочетания клавиш {0} с идентификатором {1}.", "welcome.title": "Добро пожаловать", + "welcomePage.openFolderWithPath": "Открыть папку {0} с путем {1}", + "welcomePage.extensionListSeparator": ",", + "welcomePage.installKeymap": "Установить раскладку клавиатуры {0}", + "welcomePage.installExtensionPack": "Установить дополнительную поддержку для {0}", + "welcomePage.installedKeymap": "Раскладка клавиатуры {0} уже установлена", + "welcomePage.installedExtensionPack": "Поддержка {0} уже установлена", "ok": "ОК", - "cancel": "Отмена" + "details": "Подробности", + "cancel": "Отмена", + "welcomePage.buttonBackground": "Цвет фона кнопок на странице приветствия.", + "welcomePage.buttonHoverBackground": "Цвет фона при наведении указателя для кнопок на странице приветствия." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/rus/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json index c86c05dcae5df..e79310b57d6af 100644 --- a/i18n/rus/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json +++ b/i18n/rus/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -5,5 +5,6 @@ // Do not edit this file. It is machine generated. { "walkThrough.unboundCommand": "свободный", - "walkThrough.gitNotFound": "Похоже, Git не установлен в вашей системе." + "walkThrough.gitNotFound": "Похоже, Git не установлен в вашей системе.", + "walkThrough.embeddedEditorBackground": "Цвет фона встроенных редакторов для интерактивных площадок." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/rus/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json index e87cb2bac2879..11dedf614c641 100644 --- a/i18n/rus/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json +++ b/i18n/rus/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -6,6 +6,12 @@ { "open": "Открыть параметры", "close": "Закрыть", + "saveAndRetry": "Сохранить параметры и повторить попытку", "errorUnknownKey": "Не удается выполнить запись в файл конфигурации (неизвестный ключ)", - "errorInvalidTarget": "Не удается выполнить запись в файл конфигурации (недопустимый целевой объект)." + "errorInvalidTarget": "Не удается выполнить запись в файл конфигурации (недопустимый целевой объект).", + "errorNoWorkspaceOpened": "Не удается записать параметры, так как нет открытых папок. Откройте папку и повторите попытку.", + "errorInvalidConfiguration": "Не удается записать параметры. Откройте файл **User Settings**, устраните ошибки и предупреждения в файле и повторите попытку.", + "errorInvalidConfigurationWorkspace": "Не удается записать параметры. Откройте файл **Workspace Settings**, устраните ошибки и предупреждения в файле и повторите попытку.", + "errorConfigurationFileDirty": "Не удается записать параметры, так как файл был изменен. Сохраните файл **User Settings** и повторите попытку.", + "errorConfigurationFileDirtyWorkspace": "Не удается записать параметры, так как файл был изменен. Сохраните файл **Workspace Settings** и повторите попытку." } \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/rus/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..b9b24e91bdb0d --- /dev/null +++ b/i18n/rus/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Телеметрия", + "telemetry.enableCrashReporting": "Разрешить отправку отчетов о сбоях в Майкрософт.\nЧтобы этот параметр вступил в силу, требуется перезагрузка." +} \ No newline at end of file diff --git a/i18n/rus/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/rus/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/rus/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/trk/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json b/i18n/trk/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json new file mode 100644 index 0000000000000..1c2d94b4c209c --- /dev/null +++ b/i18n/trk/extensions/configuration-editing/out/settingsDocumentHelper.i18n.json @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "activeEditorShort": "ör. myFile.txt", + "activeEditorMedium": "ör. myFolder/myFile.txt", + "activeEditorLong": "ör. /Users/Development/myProject/myFolder/myFile.txt", + "rootName": "ör. myProject", + "rootPath": "ör. /Users/Development/myProject", + "appName": "ör. VS Code", + "dirty": "değişiklik göstergesi, aktif düzenleyici kaydedilmemiş değişiklikler içeriyorsa", + "separator": "koşullu ayırıcı ('-') sadece değişkenler tarafından değerlerle çevrildiğinde gösterir", + "assocLabelFile": "Uzantılı Dosyalar", + "assocDescriptionFile": "Dosya adında glob deseniyle eşleşen tüm dosyaları belirtilen tanımlayıcıya sahip olan dile eşleyin.", + "assocLabelPath": "Yollu Dosyalar", + "assocDescriptionPath": "Dosya yolunda mutlak yol glob deseniyle eşleşen tüm dosyaları belirtilen tanımlayıcıya sahip olan dile eşleyin.", + "fileLabel": "Uzantıya Göre Dosyalar", + "fileDescription": "Belirli bir dosya uzantısına sahip tüm dosyaları eşleştirin.", + "filesLabel": "Birden Çok Uzantılı Dosyalar", + "filesDescription": "Tüm dosyaları herhangi bir dosya uzantısıyla eşleştirin.", + "derivedLabel": "Ada Göre Eşdüzeyi Olan Dosyalar", + "derivedDescription": "Aynı ada ancak farklı bir uzantıya sahip eşdüzeyi olan dosyaları eşleştirin.", + "topFolderLabel": "Ada Göre Klasör (En Üst Düzey)", + "topFolderDescription": "En üst düzeydeki bir klasörü belirli bir ad ile eşleştirin.", + "topFoldersLabel": "Birden Çok Ada Sahip Klasör (En Üst Düzey)", + "topFoldersDescription": "Birden çok en üst düzey klasörü eşleştirin.", + "folderLabel": "Ada Göre Klasör (Herhangi Bir Konum)", + "folderDescription": "Bir klasörü herhangi bir konumdaki belirli bir ad ile eşleştirin.", + "falseDescription": "Deseni devre dışı bırakın.", + "trueDescription": "Deseni etkinleştirin.", + "siblingsDescription": "Aynı ada ancak farklı bir uzantıya sahip eşdüzeyi olan dosyaları eşleştirin.", + "languageSpecificEditorSettings": "Dile özel düzenleyici ayarları", + "languageSpecificEditorSettingsDescription": "Dil için düzenleyici ayarlarını geçersiz kıl" +} \ No newline at end of file diff --git a/i18n/trk/extensions/css/client/out/cssMain.i18n.json b/i18n/trk/extensions/css/client/out/cssMain.i18n.json new file mode 100644 index 0000000000000..25a60c398285c --- /dev/null +++ b/i18n/trk/extensions/css/client/out/cssMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cssserver.name": "CSS Dil Sunucusu" +} \ No newline at end of file diff --git a/i18n/trk/extensions/css/package.i18n.json b/i18n/trk/extensions/css/package.i18n.json new file mode 100644 index 0000000000000..215750e00ed3d --- /dev/null +++ b/i18n/trk/extensions/css/package.i18n.json @@ -0,0 +1,67 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "css.lint.argumentsInColorFunction.desc": "Geçersiz sayıda parametre", + "css.lint.boxModel.desc": "Doldurma veya kenarlık kullanırken genişlik veya yükseklik kullanmayın", + "css.lint.compatibleVendorPrefixes.desc": "Satıcıya özgü bir ön ek kullanırken satıcıya özgü diğer tüm özellikleri de dahil ettiğinizden emin olun", + "css.lint.duplicateProperties.desc": "Yinelenen stil tanımları kullanmayın", + "css.lint.emptyRules.desc": "Boş kural kümeleri kullanmayın", + "css.lint.float.desc": "'float' kullanmaktan kaçının. Float'lar, düzenin herhangi bir unsuru değiştiğinde kolayca bozulan kırılgan CSS ile sonuçlanır.", + "css.lint.fontFaceProperties.desc": "@font-face kuralı 'src' ve 'font-family' özelliklerini tanımlamalıdır", + "css.lint.hexColorLength.desc": "Onaltılık renkler üç veya altı onaltılık sayıdan oluşmalıdır", + "css.lint.idSelector.desc": "Bu kurallar HTML'ye çok sıkı bağlı olduğundan seçiciler kimlikleri içermemelidir.", + "css.lint.ieHack.desc": "IE izinsiz girişleri yalnızca IE7 ve daha eski sürümler desteklenirken gereklidir", + "css.lint.important.desc": "!important kullanmaktan kaçının. Tüm CSS'nin belirginlik düzeyi üzerindeki denetimin kaybedildiğinin ve yeniden düzenlenmesi gerektiğinin bir belirtisidir.", + "css.lint.importStatement.desc": "İçe aktarma deyimleri paralel olarak yüklenmez", + "css.lint.propertyIgnoredDueToDisplay.desc": "Özellik gösterim nedeniyle yoksayıldı. Örn. 'display: inline' ile width, height, margin-top, margin-bottom ve float özelliklerinin hiçbir etkisi olmaz", + "css.lint.universalSelector.desc": "Evrensel seçici (*) yavaş olarak bilinir", + "css.lint.unknownProperties.desc": "Bilinmeyen özellik.", + "css.lint.unknownVendorSpecificProperties.desc": "Bilinmeyen satıcıya özel özellik.", + "css.lint.vendorPrefix.desc": "Satıcıya özgü bir ön ek kullanırken standart özelliği de dahil edin", + "css.lint.zeroUnits.desc": "Sıfır için birim gerekmez", + "css.validate.desc": "Tüm doğrulamaları etkinleştirir veya devre dışı bırakır", + "less.lint.argumentsInColorFunction.desc": "Geçersiz sayıda parametre", + "less.lint.boxModel.desc": "Doldurma veya kenarlık kullanırken genişlik veya yükseklik kullanmayın", + "less.lint.compatibleVendorPrefixes.desc": "Satıcıya özgü bir ön ek kullanırken satıcıya özgü diğer tüm özellikleri de dahil ettiğinizden emin olun", + "less.lint.duplicateProperties.desc": "Yinelenen stil tanımları kullanmayın", + "less.lint.emptyRules.desc": "Boş kural kümeleri kullanmayın", + "less.lint.float.desc": "'float' kullanmaktan kaçının. Float'lar, düzenin herhangi bir unsuru değiştiğinde kolayca bozulan kırılgan CSS ile sonuçlanır.", + "less.lint.fontFaceProperties.desc": "@font-face kuralı 'src' ve 'font-family' özelliklerini tanımlamalıdır", + "less.lint.hexColorLength.desc": "Onaltılık renkler üç veya altı onaltılık sayıdan oluşmalıdır", + "less.lint.idSelector.desc": "Bu kurallar HTML'ye çok sıkı bağlı olduğundan seçiciler kimlikleri içermemelidir.", + "less.lint.ieHack.desc": "IE izinsiz girişleri yalnızca IE7 ve daha eski sürümler desteklenirken gereklidir", + "less.lint.important.desc": "!important kullanmaktan kaçının. Tüm CSS'nin belirginlik düzeyi üzerindeki denetimin kaybedildiğinin ve yeniden düzenlenmesi gerektiğinin bir belirtisidir.", + "less.lint.importStatement.desc": "İçe aktarma deyimleri paralel olarak yüklenmez", + "less.lint.propertyIgnoredDueToDisplay.desc": "Özellik gösterim nedeniyle yoksayıldı. Örn. 'display: inline' ile width, height, margin-top, margin-bottom ve float özelliklerinin hiçbir etkisi olmaz", + "less.lint.universalSelector.desc": "Evrensel seçici (*) yavaş olarak bilinir", + "less.lint.unknownProperties.desc": "Bilinmeyen özellik.", + "less.lint.unknownVendorSpecificProperties.desc": "Bilinmeyen satıcıya özel özellik.", + "less.lint.vendorPrefix.desc": "Satıcıya özgü bir ön ek kullanırken standart özelliği de dahil edin", + "less.lint.zeroUnits.desc": "Sıfır için birim gerekmez", + "less.validate.desc": "Tüm doğrulamaları etkinleştirir veya devre dışı bırakır", + "scss.lint.argumentsInColorFunction.desc": "Geçersiz sayıda parametre", + "scss.lint.boxModel.desc": "Doldurma veya kenarlık kullanırken genişlik veya yükseklik kullanmayın", + "scss.lint.compatibleVendorPrefixes.desc": "Satıcıya özgü bir ön ek kullanırken satıcıya özgü diğer tüm özellikleri de dahil ettiğinizden emin olun", + "scss.lint.duplicateProperties.desc": "Yinelenen stil tanımları kullanmayın", + "scss.lint.emptyRules.desc": "Boş kural kümeleri kullanmayın", + "scss.lint.float.desc": "'float' kullanmaktan kaçının. Float'lar, düzenin herhangi bir unsuru değiştiğinde kolayca bozulan kırılgan CSS ile sonuçlanır.", + "scss.lint.fontFaceProperties.desc": "@font-face kuralı 'src' ve 'font-family' özelliklerini tanımlamalıdır", + "scss.lint.hexColorLength.desc": "Onaltılık renkler üç veya altı onaltılık sayıdan oluşmalıdır", + "scss.lint.idSelector.desc": "Bu kurallar HTML'ye çok sıkı bağlı olduğundan seçiciler kimlikleri içermemelidir.", + "scss.lint.ieHack.desc": "IE izinsiz girişleri yalnızca IE7 ve daha eski sürümler desteklenirken gereklidir", + "scss.lint.important.desc": "!important kullanmaktan kaçının. Tüm CSS'nin belirginlik düzeyi üzerindeki denetimin kaybedildiğinin ve yeniden düzenlenmesi gerektiğinin bir belirtisidir.", + "scss.lint.importStatement.desc": "İçe aktarma deyimleri paralel olarak yüklenmez", + "scss.lint.propertyIgnoredDueToDisplay.desc": "Özellik gösterim nedeniyle yoksayıldı. Örn. 'display: inline' ile width, height, margin-top, margin-bottom ve float özelliklerinin hiçbir etkisi olmaz", + "scss.lint.universalSelector.desc": "Evrensel seçici (*) yavaş olarak bilinir", + "scss.lint.unknownProperties.desc": "Bilinmeyen özellik.", + "scss.lint.unknownVendorSpecificProperties.desc": "Bilinmeyen satıcıya özel özellik.", + "scss.lint.vendorPrefix.desc": "Satıcıya özgü bir ön ek kullanırken standart özelliği de dahil edin", + "scss.lint.zeroUnits.desc": "Sıfır için birim gerekmez", + "scss.validate.desc": "Tüm doğrulamaları etkinleştirir veya devre dışı bırakır", + "less.colorDecorators.enable.desc": "Renk dekoratörlerini etkinleştirir veya devre dışı bırakır", + "scss.colorDecorators.enable.desc": "Renk dekoratörlerini etkinleştirir veya devre dışı bırakır", + "css.colorDecorators.enable.desc": "Renk dekoratörlerini etkinleştirir veya devre dışı bırakır" +} \ No newline at end of file diff --git a/i18n/trk/extensions/extension-editing/out/packageDocumentHelper.i18n.json b/i18n/trk/extensions/extension-editing/out/packageDocumentHelper.i18n.json new file mode 100644 index 0000000000000..727dd6640ef4e --- /dev/null +++ b/i18n/trk/extensions/extension-editing/out/packageDocumentHelper.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "languageSpecificEditorSettings": "Dile özel düzenleyici ayarları", + "languageSpecificEditorSettingsDescription": "Dil için düzenleyici ayarlarını geçersiz kıl" +} \ No newline at end of file diff --git a/i18n/trk/extensions/git/out/askpass-main.i18n.json b/i18n/trk/extensions/git/out/askpass-main.i18n.json new file mode 100644 index 0000000000000..56e7f652dd6f5 --- /dev/null +++ b/i18n/trk/extensions/git/out/askpass-main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "missOrInvalid": "Eksik veya geçersiz kimlik bilgisi." +} \ No newline at end of file diff --git a/i18n/trk/extensions/git/out/commands.i18n.json b/i18n/trk/extensions/git/out/commands.i18n.json new file mode 100644 index 0000000000000..b2222807717d2 --- /dev/null +++ b/i18n/trk/extensions/git/out/commands.i18n.json @@ -0,0 +1,46 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tag at": "{0} üzerindeki etiket", + "remote branch at": "{0} üzerindeki uzak dal", + "repourl": "Depo URL'si", + "parent": "Üst Klasör", + "cloning": "Git deposu kopyalanıyor...", + "openrepo": "Depoyu Aç", + "proposeopen": "Kopyalanan depoyu açmak ister misiniz?", + "confirm revert": "{0} üzerindeki seçili değişiklikleri geri almak istediğinizden emin misiniz?", + "revert": "Değişiklikleri Geri Al", + "confirm discard": "{0} üzerindeki seçili değişiklikleri göz ardı etmek istediğinizden emin misiniz?", + "confirm discard multiple": "{0} dosyadaki değişiklikleri göz ardı etmek istediğinizden emin misiniz?", + "discard": "Değişiklikleri Göz Ardı Et", + "confirm discard all": "TÜM değişiklikleri göz ardı etmek istediğinizden emin misiniz? Bu, GERİ DÖNDÜRÜLEMEZ!", + "discardAll": "TÜM Değişiklikleri Göz Ardı Et", + "no staged changes": "Commit'lenecek hazırlanmış değişiklik yok.\n\nTüm değişikliklerinizi otomatik olarak hazırlamak ve direkt olarak commit'lemek ister misiniz?", + "yes": "Evet", + "always": "Her Zaman", + "no changes": "Commit'lenecek değişiklik yok.", + "commit message": "Commit mesajı", + "provide commit message": "Lütfen bir commit mesajı belirtin.", + "branch name": "Dal adı", + "provide branch name": "Lütfen bir dal adı belirtin", + "select branch to delete": "Silinecek dalı seçin", + "confirm force delete branch": "'{0}' dalı tamamen birleştirilmemiş. Yine de silinsin mi?", + "delete branch": "Dalı Sil", + "no remotes to pull": "Deponuzda çekme işleminin yapılacağı hiçbir uzak uçbirim yapılandırılmamış.", + "no remotes to push": "Deponuzda gönderimin yapılacağı hiçbir uzak uçbirim yapılandırılmamış.", + "nobranch": "Lütfen uzak uçbirime gönderilecek dala geçiş yapın.", + "pick remote": "'{0}' dalının yayınlanacağı bir uzak uçbirim seçin:", + "sync is unpredictable": "Bu eylem, '{0}' esas projesine commitleri gönderecek ve alacaktır.", + "ok": "Tamam", + "never again": "Tamam, Tekrar Gösterme", + "no remotes to publish": "Deponuzda yayınlamanın yapılacağı hiçbir uzak uçbirim yapılandırılmamış.", + "disabled": "Git, ya devre dışı bırakılmış ya da bu çalışma alanında desteklenmiyor", + "clean repo": "Geçiş yapmadan önce deponuzdaki çalışma ağacınızı temizleyin.", + "cant push": "Başvurular uzak uçbirime gönderilemiyor. Değişikliklerinizi entegre etmeden, ilk olarak 'Çek'i çalıştırın. ", + "git error details": "Git: {0}", + "git error": "Git hatası", + "open git log": "Git Günlüğünü Aç" +} \ No newline at end of file diff --git a/i18n/trk/extensions/git/out/main.i18n.json b/i18n/trk/extensions/git/out/main.i18n.json new file mode 100644 index 0000000000000..eda1b0cc9a934 --- /dev/null +++ b/i18n/trk/extensions/git/out/main.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "using git": "{1} yolundaki git {0} kullanılıyor", + "updateGit": "Git'i Güncelle", + "neverShowAgain": "Tekrar gösterme", + "git20": "git {0} yüklemiş olarak görünüyorsunuz. Code, git >= 2 ile en iyi şekilde çalışır" +} \ No newline at end of file diff --git a/i18n/trk/extensions/git/out/model.i18n.json b/i18n/trk/extensions/git/out/model.i18n.json new file mode 100644 index 0000000000000..282a283d44382 --- /dev/null +++ b/i18n/trk/extensions/git/out/model.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "open": "Aç", + "merge changes": "Değişiklikleri Birleştir", + "staged changes": "Hazırlanmış Değişiklikler", + "changes": "Değişiklikler", + "ok": "Tamam", + "neveragain": "Tekrar Gösterme", + "huge": "'{0}' yolundaki git deposunda çok fazla aktif değişikliklik var, Git özelliklerinin yalnızca bir alt kümesi etkinleştirilecektir." +} \ No newline at end of file diff --git a/i18n/trk/extensions/git/out/scmProvider.i18n.json b/i18n/trk/extensions/git/out/scmProvider.i18n.json new file mode 100644 index 0000000000000..9d509d1398a39 --- /dev/null +++ b/i18n/trk/extensions/git/out/scmProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commit": "Commit'le" +} \ No newline at end of file diff --git a/i18n/trk/extensions/git/out/statusbar.i18n.json b/i18n/trk/extensions/git/out/statusbar.i18n.json new file mode 100644 index 0000000000000..eb7a0d55141d8 --- /dev/null +++ b/i18n/trk/extensions/git/out/statusbar.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "checkout": "Geçiş yap...", + "sync changes": "Değişiklikleri Senkronize Et", + "publish changes": "Değişiklikleri Yayınla", + "syncing changes": "Değişiklikler Senkronize Ediliyor..." +} \ No newline at end of file diff --git a/i18n/trk/extensions/git/package.i18n.json b/i18n/trk/extensions/git/package.i18n.json new file mode 100644 index 0000000000000..9789311accf86 --- /dev/null +++ b/i18n/trk/extensions/git/package.i18n.json @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.clone": "Klonla", + "command.init": "Depo Oluştur", + "command.refresh": "Yenile", + "command.openChange": "Değişiklikleri Aç", + "command.openFile": "Dosya Aç", + "command.stage": "Değişiklikleri Hazırla", + "command.stageAll": "Tüm Değişiklikleri Hazırla", + "command.stageSelectedRanges": "Seçili Aralığı Hazırla", + "command.revertSelectedRanges": "Seçili Aralığı Geri Al", + "command.unstage": "Değişiklikleri Hazırlık Alanından Geri Al", + "command.unstageAll": "Tüm Değişiklikleri Hazırlık Alanından Geri Al", + "command.unstageSelectedRanges": "Seçili Alanı Hazırlık Alanından Geri Al", + "command.clean": "Değişiklikleri Göz Ardı Et", + "command.cleanAll": "Tüm Değişiklikleri Göz Ardı Et", + "command.commit": "Commit'le", + "command.commitStaged": "Hazırlananları Commit'le", + "command.commitStagedSigned": "Hazırlananları Commit'le (İmzalı)", + "command.commitAll": "Tümünü Commit'le", + "command.commitAllSigned": "Tümünü Commit'le (İmzalı)", + "command.undoCommit": "Son Commit'i Geri Al", + "command.checkout": "Geçiş yap...", + "command.branch": "Dal Oluştur...", + "command.deleteBranch": "Dalı Sil...", + "command.pull": "Çek", + "command.pullRebase": "Çek (Yeniden Adresle)", + "command.push": "Gönder", + "command.pushTo": "Gönder...", + "command.sync": "Senkronize Et", + "command.publish": "Dalı Yayınla", + "command.showOutput": "Git Çıktısını Göster", + "config.enabled": "Git'in etkinleştirilip etkinleştirilmediği", + "config.path": "Çalıştırılabilir Git dosyasının yolu", + "config.autorefresh": "Otomatik yenilemenin etkinleştirilip etkinleştirilmediği", + "config.autofetch": "Otomatik getirmenin etkinleştirilip etkinleştirilmediği", + "config.enableLongCommitWarning": "Uzun commit mesajları hakkında uyarıda bulunulup bulunulmayacağı", + "config.confirmSync": "Git depolarını senkronize etmeden önce onaylayın", + "config.countBadge": "Git gösterge sayacını denetler. `all` tüm değişiklikleri sayar. `tracked` sadece izlenen değişikliklikleri sayar. `off` ise kapatır.", + "config.checkoutType": "`Geçiş Yap...` çalıştırılırken listelenecek dal türlerini denetler. `all` tüm başvuruları gösterir, `local` sadece yerel dalları gösterir, `tags` sadece etiketleri gösterir ve `remote` sadece uzak uçbirim dallarını gösterir.", + "config.ignoreLegacyWarning": "Eski Git uyarısını görmezden gelir", + "config.ignoreLimitWarning": "Bir depoda çok fazla değişiklik var uyarısını görmezden gelir", + "config.defaultCloneDirectory": "Bir git deposunun kopyalanacağı varsayılan konum", + "config.enableSmartCommit": "Hazırlanan değişiklik yoksa tüm değişiklikleri commit'le." +} \ No newline at end of file diff --git a/i18n/trk/extensions/grunt/out/main.i18n.json b/i18n/trk/extensions/grunt/out/main.i18n.json new file mode 100644 index 0000000000000..a379bb7fabe93 --- /dev/null +++ b/i18n/trk/extensions/grunt/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Grunt otomatik tespiti hata ile sonuçlandı: {0}" +} \ No newline at end of file diff --git a/i18n/trk/extensions/grunt/package.i18n.json b/i18n/trk/extensions/grunt/package.i18n.json new file mode 100644 index 0000000000000..0a027f4d95479 --- /dev/null +++ b/i18n/trk/extensions/grunt/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.grunt.autoDetect": "Grunt görevlerinin otomatik olarak algılanıp algılanmayacağını denetler. Varsayılan olarak açıktır." +} \ No newline at end of file diff --git a/i18n/trk/extensions/gulp/out/main.i18n.json b/i18n/trk/extensions/gulp/out/main.i18n.json new file mode 100644 index 0000000000000..419e64b90d825 --- /dev/null +++ b/i18n/trk/extensions/gulp/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Gulp otomatik tespiti hata ile sonuçlandı: {0}" +} \ No newline at end of file diff --git a/i18n/trk/extensions/gulp/package.i18n.json b/i18n/trk/extensions/gulp/package.i18n.json new file mode 100644 index 0000000000000..11a00f49019be --- /dev/null +++ b/i18n/trk/extensions/gulp/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.gulp.autoDetect": "Gulp görevlerinin otomatik olarak algılanıp algılanmayacağını denetler. Varsayılan olarak açıktır." +} \ No newline at end of file diff --git a/i18n/trk/extensions/html/client/out/htmlMain.i18n.json b/i18n/trk/extensions/html/client/out/htmlMain.i18n.json new file mode 100644 index 0000000000000..768300d269bfb --- /dev/null +++ b/i18n/trk/extensions/html/client/out/htmlMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "htmlserver.name": "HTML Dil Sunucusu" +} \ No newline at end of file diff --git a/i18n/trk/extensions/html/package.i18n.json b/i18n/trk/extensions/html/package.i18n.json new file mode 100644 index 0000000000000..ee68938c898cc --- /dev/null +++ b/i18n/trk/extensions/html/package.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.format.enable.desc": "Varsayılan HTML biçimlendiricisini etkinleştirin/devre dışı bırakın (yeniden başlatma gerektirir)", + "html.format.wrapLineLength.desc": "Satır başına en fazla karakter miktarı (0 = devre dışı bırak)", + "html.format.unformatted.desc": "Yeniden biçimlendirilmeyecek virgülle ayrılmış etiketler listesi. 'null' değeri, https://www.w3.org/TR/html5/dom.html#phrasing-content adresinde listelenen tüm etiketleri varsayılan olarak belirler.", + "html.format.contentUnformatted.desc": "İçeriğin yeniden biçimlendirilmeyeceği virgülle ayrılmış etiketler listesi. 'null' değeri, 'pre' etiketini varsayılan olarak belirler.", + "html.format.indentInnerHtml.desc": " ve bölümlerini girintile.", + "html.format.preserveNewLines.desc": "Ögelerden önceki mevcut satır sonlarının korunup korunmayacağı. Yalnızca ögelerden önce çalışır, etiketler içinde veya metinde çalışmaz.", + "html.format.maxPreserveNewLines.desc": "Bir öbekte korunacak maksimum satır sonu sayısı. Sınırsız için 'null' değerini kullanın.", + "html.format.indentHandlebars.desc": "{{#foo}} ve {{/foo}}'yu biçimlendir ve girintile.", + "html.format.endWithNewline.desc": "Boş bir satırla bitir.", + "html.format.extraLiners.desc": "Kendilerinden önce ek bir boş satır bulunması gereken virgülle ayrılmış etiketler listesi. 'null' değeri, \"head, body, /html\" değerini varsayılan olarak belirler.", + "html.format.wrapAttributes.desc": "Öznitelikleri sarmala.", + "html.format.wrapAttributes.auto": "Öznitelikleri sadece satır uzunluğu aşıldığında sarmala.", + "html.format.wrapAttributes.force": "İlki hariç tüm öznitelikleri sarmala.", + "html.format.wrapAttributes.forcealign": "İlki hariç tüm öznitelikleri sarmala ve hizada tut.", + "html.format.wrapAttributes.forcemultiline": "Tüm öznitelikleri sarmala.", + "html.suggest.angular1.desc": "Yerleşik HTML dili desteğinin Angular V1 etiketlerini ve özelliklerini önerip önermeyeceğini yapılandırır.", + "html.suggest.ionic.desc": "Yerleşik HTML dili desteğinin Ionic etiketlerini, özelliklerini ve değerlerini önerip önermeyeceğini yapılandırır.", + "html.suggest.html5.desc": "Yerleşik HTML dili desteğinin HTML5 etiketlerini, özelliklerini ve değerlerini önerip önermeyeceğini yapılandırır.", + "html.validate.scripts": "Yerleşik HTML dili desteğinin HTML5 gömülü betikleri doğrulayıp doğrulamayacağını yapılandırır.", + "html.validate.styles": "Yerleşik HTML dili desteğinin HTML5 gömülü stilleri doğrulayıp doğrulamayacağını yapılandırır." +} \ No newline at end of file diff --git a/i18n/trk/extensions/jake/out/main.i18n.json b/i18n/trk/extensions/jake/out/main.i18n.json new file mode 100644 index 0000000000000..c94980eca2f63 --- /dev/null +++ b/i18n/trk/extensions/jake/out/main.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "execFailed": "Jake otomatik tespiti hata ile sonuçlandı: {0}" +} \ No newline at end of file diff --git a/i18n/trk/extensions/jake/package.i18n.json b/i18n/trk/extensions/jake/package.i18n.json new file mode 100644 index 0000000000000..983e8866dea35 --- /dev/null +++ b/i18n/trk/extensions/jake/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.jake.autoDetect": "Jake görevlerinin otomatik olarak algılanıp algılanmayacağını denetler. Varsayılan olarak açıktır." +} \ No newline at end of file diff --git a/i18n/trk/extensions/javascript/out/features/bowerJSONContribution.i18n.json b/i18n/trk/extensions/javascript/out/features/bowerJSONContribution.i18n.json new file mode 100644 index 0000000000000..8e2b17e627dce --- /dev/null +++ b/i18n/trk/extensions/javascript/out/features/bowerJSONContribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.bower.default": "Varsayılan bower.json", + "json.bower.error.repoaccess": "Bower deposuna yapılan istek başarısız oldu: {0}", + "json.bower.latest.version": "en son" +} \ No newline at end of file diff --git a/i18n/trk/extensions/javascript/out/features/packageJSONContribution.i18n.json b/i18n/trk/extensions/javascript/out/features/packageJSONContribution.i18n.json new file mode 100644 index 0000000000000..702ad94d30e0c --- /dev/null +++ b/i18n/trk/extensions/javascript/out/features/packageJSONContribution.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.package.default": "Varsayılan package.json", + "json.npm.error.repoaccess": "NPM deposuna yapılan istek başarısız oldu: {0}", + "json.npm.latestversion": "Paketin şu andaki en son sürümü", + "json.npm.majorversion": "En son birincil sürümle eşleşiyor (1.x.x)", + "json.npm.minorversion": "En son ikincil sürümle eşleşiyor (1.2.x)", + "json.npm.version.hover": "En son sürüm: {0}" +} \ No newline at end of file diff --git a/i18n/trk/extensions/json/client/out/jsonMain.i18n.json b/i18n/trk/extensions/json/client/out/jsonMain.i18n.json new file mode 100644 index 0000000000000..f0d4863e7459b --- /dev/null +++ b/i18n/trk/extensions/json/client/out/jsonMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "jsonserver.name": "JSON Dil Sunucusu" +} \ No newline at end of file diff --git a/i18n/trk/extensions/json/package.i18n.json b/i18n/trk/extensions/json/package.i18n.json new file mode 100644 index 0000000000000..bc1296fa6f9b9 --- /dev/null +++ b/i18n/trk/extensions/json/package.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "json.schemas.desc": "Şemaları geçerli projedeki JSON dosyalarıyla ilişkilendir", + "json.schemas.url.desc": "Bir şemanın URL'si veya geçerli dizindeki bir şemanın göreli yolu", + "json.schemas.fileMatch.desc": "JSON dosyaları şemalara çözümlenirken eşleşme için kullanılacak bir dosya düzenleri dizisi.", + "json.schemas.fileMatch.item.desc": "JSON dosyaları şemalara çözümlenirken eşleşme için '*' içerebilen bir dosya düzeni.", + "json.schemas.schema.desc": "Verilen URL için şema tanımı. Şema, yalnızca şema URL'sine erişimi önlemek için sağlanmalıdır.", + "json.format.enable.desc": "Varsayılan JSON biçimlendiricisini etkinleştirin/devre dışı bırakın (yeniden başlatma gerektirir)", + "json.tracing.desc": "VS Code ve JSON dil sunucusu arasındaki iletişimi izler.", + "json.colorDecorators.enable.desc": "Renk dekoratörlerini etkinleştirir veya devre dışı bırakır" +} \ No newline at end of file diff --git a/i18n/trk/extensions/markdown/out/extension.i18n.json b/i18n/trk/extensions/markdown/out/extension.i18n.json new file mode 100644 index 0000000000000..de26700eac418 --- /dev/null +++ b/i18n/trk/extensions/markdown/out/extension.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "onPreviewStyleLoadError": "'markdown.styles' yüklenemedi: {0}" +} \ No newline at end of file diff --git a/i18n/trk/extensions/markdown/out/previewContentProvider.i18n.json b/i18n/trk/extensions/markdown/out/previewContentProvider.i18n.json new file mode 100644 index 0000000000000..83d25162ae31e --- /dev/null +++ b/i18n/trk/extensions/markdown/out/previewContentProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.securityMessage.text": "Bu belgede betikler devre dışı bırakıldı", + "preview.securityMessage.title": "Markdown önizlemesinde belgede betikler devre dışı bırakılmıştır. Betikleri etkinleştirmek için Markdown önizleme güvenlik ayarlarını değiştirin", + "preview.securityMessage.label": "Betikler Devre Dışı Güvenlik Uyarısı" +} \ No newline at end of file diff --git a/i18n/trk/extensions/markdown/out/security.i18n.json b/i18n/trk/extensions/markdown/out/security.i18n.json new file mode 100644 index 0000000000000..f6bd3d4536474 --- /dev/null +++ b/i18n/trk/extensions/markdown/out/security.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "preview.showPreviewSecuritySelector.disallowScriptsForWorkspaceTitle": "Bu çalışma alanındaki Markdown önizlemelerinde betik çalıştırmayı devre dışı bırak", + "preview.showPreviewSecuritySelector.currentSelection": "Geçerli ayar", + "preview.showPreviewSecuritySelector.allowScriptsForWorkspaceTitle": "Bu çalışma alanındaki Markdown önizlemelerinde betik çalıştırmayı etkinleştir", + "preview.showPreviewSecuritySelector.title": "Markdown önizlemesi için güvenlik ayarlarını değiştir" +} \ No newline at end of file diff --git a/i18n/trk/extensions/markdown/package.i18n.json b/i18n/trk/extensions/markdown/package.i18n.json new file mode 100644 index 0000000000000..67c3c86ed8898 --- /dev/null +++ b/i18n/trk/extensions/markdown/package.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "markdown.preview.doubleClickToSwitchToEditor.desc": "Düzenleyiciye geçiş yapmak için Markdown önizlemesine çift tıklayın.", + "markdown.preview.fontFamily.desc": "Markdown önizlemesinde kullanılan yazı tipi ailesini denetler.", + "markdown.preview.fontSize.desc": "Markdown önizlemesinde kullanılan yazı tipi boyutunu piksel olarak denetler.", + "markdown.preview.lineHeight.desc": "Markdown önizlemesinde kullanılan satır yüksekliğini denetler. Bu sayı yazı tipi boyutuna görecelidir.", + "markdown.preview.markEditorSelection.desc": "Markdown önizlemesinde geçerli düzenleyici seçimini işaretle.", + "markdown.preview.scrollEditorWithPreview.desc": "Markdown önizlemesi kaydırıldığında, düzenleyicinin görünümünü güncelle.", + "markdown.preview.scrollPreviewWithEditorSelection.desc": "Düzenleyicide seçili satırın görünmesi için Markdown önizlemesini kaydırır.", + "markdown.preview.title": "Önizlemeyi Aç", + "markdown.previewFrontMatter.dec": "YAML ön maddesinin Markdown önizlemesinde nasıl gösterilmesi gerektiğini ayarlar. 'hide' ön maddeyi kaldırır. Diğer türlü; ön madde, Markdown içeriği olarak sayılır.", + "markdown.previewSide.title": "Önizlemeyi Yana Aç", + "markdown.showSource.title": "Kaynağı Göster", + "markdown.styles.dec": "Markdown önizlemesinde kullanılmak üzere CSS stil dosyalarını işaret eden bir URL'ler veya yerel yollar listesi. Göreli yollar, gezginde açılan klasöre göreli olarak yorumlanır.", + "markdown.showPreviewSecuritySelector.title": "Markdown Önizleme Güvenlik Ayarlarını Değiştir", + "markdown.preview.enableExperimentalExtensionApi.desc": "[Deneysel] Eklentilere Markdown önizlemesini genişletmek için izin ver.", + "markdown.trace.desc": "Markdown eklentisi için hata ayıklama günlüğünü etkinleştir." +} \ No newline at end of file diff --git a/i18n/trk/extensions/merge-conflict/out/codelensProvider.i18n.json b/i18n/trk/extensions/merge-conflict/out/codelensProvider.i18n.json new file mode 100644 index 0000000000000..26571af8cf39c --- /dev/null +++ b/i18n/trk/extensions/merge-conflict/out/codelensProvider.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acceptCurrentChange": "Geçerli Değişikliği Kabul Et", + "acceptIncomingChange": "Gelen Değişikliği Kabul Et", + "acceptBothChanges": "Her İki Değişikliği de Kabul Et", + "compareChanges": "Değişiklikleri Karşılaştır" +} \ No newline at end of file diff --git a/i18n/trk/extensions/merge-conflict/out/commandHandler.i18n.json b/i18n/trk/extensions/merge-conflict/out/commandHandler.i18n.json new file mode 100644 index 0000000000000..3811062c8a33c --- /dev/null +++ b/i18n/trk/extensions/merge-conflict/out/commandHandler.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "cursorNotInConflict": "Düzenleyici imleci birleştirme çakışması içinde değil", + "compareChangesTitle": "{0}: Geçerli Değişiklikler ⟷ Gelen Değişiklikler", + "cursorOnCommonAncestorsRange": "Düzenleyici imleci ortak atalar bloğunda, imleci lütfen \"geçerli\" veya \"gelen\" bloğundan birine getirin", + "cursorOnSplitterRange": "Düzenleyici imleci birleştirme çakışması ayırıcısında, imleci lütfen \"geçerli\" veya \"gelen\" bloğundan birine getirin", + "noConflicts": "Bu dosyada birleştirme çakışması bulunamadı", + "noOtherConflictsInThisFile": "Bu dosyada başka birleştirme çakışması bulunamadı" +} \ No newline at end of file diff --git a/i18n/trk/extensions/merge-conflict/out/mergeDecorator.i18n.json b/i18n/trk/extensions/merge-conflict/out/mergeDecorator.i18n.json new file mode 100644 index 0000000000000..4e7bccae262ac --- /dev/null +++ b/i18n/trk/extensions/merge-conflict/out/mergeDecorator.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "currentChange": "(Geçerli Değişiklik)", + "incomingChange": "(Gelen Değişiklik)" +} \ No newline at end of file diff --git a/i18n/trk/extensions/merge-conflict/package.i18n.json b/i18n/trk/extensions/merge-conflict/package.i18n.json new file mode 100644 index 0000000000000..75e7f2cd722ed --- /dev/null +++ b/i18n/trk/extensions/merge-conflict/package.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "command.category": "Birleştirme Çakışması", + "command.accept.all-incoming": "Gelen Tümünü Kabul Et", + "command.accept.all-both": "Tümünü Birden Kabul Et", + "command.accept.current": "Şuan Geçerli Olanı Kabul Et", + "command.accept.incoming": "Geleni Kabul Et", + "command.accept.selection": "Seçimi Kabul Et", + "command.accept.both": "Her İkisini de Kabul Et", + "command.next": "Sonraki Çakışma", + "command.previous": "Önceki Çakışma", + "command.compare": "Geçerli Çakışmayı Karşılaştır", + "config.title": "Birleştirme Çakışması", + "config.codeLensEnabled": "Düzenleyicideki birleştirme çakışması bloğu kod objektifini etkinleştir veya devre dışı bırak", + "config.decoratorsEnabled": "Düzenleyicideki birleştirme çakışması dekoratörlerini etkinleştir veya devre dışı bırak" +} \ No newline at end of file diff --git a/i18n/trk/extensions/npm/package.i18n.json b/i18n/trk/extensions/npm/package.i18n.json new file mode 100644 index 0000000000000..5bda141ad8b60 --- /dev/null +++ b/i18n/trk/extensions/npm/package.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "config.npm.autoDetect": "Npm betiklerinin otomatik olarak algılanıp algılanmayacağını denetler. Varsayılan olarak açıktır." +} \ No newline at end of file diff --git a/i18n/trk/extensions/php/out/features/validationProvider.i18n.json b/i18n/trk/extensions/php/out/features/validationProvider.i18n.json new file mode 100644 index 0000000000000..dbfa92074c836 --- /dev/null +++ b/i18n/trk/extensions/php/out/features/validationProvider.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "php.useExecutablePath": "{0} (çalışma alanı ayarı olarak tanımlı) yürütülebilir dosyasına PHP dosyalarını doğrulama izni veriyor musunuz?", + "php.yes": "İzin Ver", + "php.no": "İzin Verme", + "wrongExecutable": "{0} geçerli bir php yürütülebilir dosyası olmadığı için doğrulanamıyor. PHP yürütülebilir dosyasını yapılandırmak için 'php.validate.executablePath' ayarını kullanın.", + "noExecutable": "Hiçbir PHP yürütülebilir dosyası ayarlanmadığı için doğrulanamıyor. PHP yürütülebilir dosyasını yapılandırmak için 'php.validate.executablePath' ayarını kullanın.", + "unknownReason": "{0} yolu kullanılarak php çalıştırılamadı. Sebep bilinmiyor." +} \ No newline at end of file diff --git a/i18n/trk/extensions/php/package.i18n.json b/i18n/trk/extensions/php/package.i18n.json new file mode 100644 index 0000000000000..d0a4266c125c0 --- /dev/null +++ b/i18n/trk/extensions/php/package.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "configuration.suggest.basic": "Yerleşik PHP dili önerilerinin etkinleştirilip etkinleştirilmediğini yapılandırır. Destek, PHP globalleri ve değişkenleri önerir.", + "configuration.validate.enable": "Yerleşik PHP doğrulamasını etkinleştir/devre dışı bırak.", + "configuration.validate.executablePath": "PHP çalıştırılabilir dosyasına işaret eder.", + "configuration.validate.run": "Doğrulayıcının kayıt esnasında mı tuşlama esnasında mı çalışacağı.", + "configuration.title": "PHP", + "commands.categroy.php": "PHP", + "command.untrustValidationExecutable": "PHP doğrulama yürütülebilir dosyasına izin verme (çalışma alanı ayarı olarak tanımlanır)" +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/features/bufferSyncSupport.i18n.json b/i18n/trk/extensions/typescript/out/features/bufferSyncSupport.i18n.json new file mode 100644 index 0000000000000..a496aae13e050 --- /dev/null +++ b/i18n/trk/extensions/typescript/out/features/bufferSyncSupport.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "versionMismatch": "Düzenleyici özellikleri için TypeScript ({1}) kullanılıyor. TypeScript ({0}) makinanızda global olarak yüklenmiş durumda. VS Code'daki hatalar TSC hatalarından farklı olabilir", + "moreInformation": "Daha Fazla Bilgi", + "doNotCheckAgain": "Tekrar Kontrol Etme", + "close": "Kapat", + "updateTscCheck": "Kullanıcı ayarı 'typescript.check.tscVersion', \"false\" olarak güncellendi" +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/features/completionItemProvider.i18n.json b/i18n/trk/extensions/typescript/out/features/completionItemProvider.i18n.json new file mode 100644 index 0000000000000..de2a515d9aba7 --- /dev/null +++ b/i18n/trk/extensions/typescript/out/features/completionItemProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "acquiringTypingsLabel": "Tuşlamalar alınıyor...", + "acquiringTypingsDetail": "IntelliSense için tuşlama tanımları alınıyor..." +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json b/i18n/trk/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json new file mode 100644 index 0000000000000..de25bb3c5f8d3 --- /dev/null +++ b/i18n/trk/extensions/typescript/out/features/directiveCommentCompletionProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ts-check": "Bir JavaScript dosyasının anlamsal kontrolünü etkinleştirir. Bir dosyanın en üstünde olmalıdır.", + "ts-nocheck": "Bir JavaScript dosyasının anlamsal kontrolünü devre dışı bırakır. Bir dosyanın en üstünde olmalıdır.", + "ts-ignore": "Bir dosyanın sonraki satırında @ts-check hatalarını bastırır." +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json b/i18n/trk/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json new file mode 100644 index 0000000000000..05ad64ea38263 --- /dev/null +++ b/i18n/trk/extensions/typescript/out/features/implementationsCodeLensProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "oneImplementationLabel": "1 uygulama", + "manyImplementationLabel": "{0} uygulama", + "implementationsErrorLabel": "Uygulamalar belirlenemedi" +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json b/i18n/trk/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json new file mode 100644 index 0000000000000..203488810a2bb --- /dev/null +++ b/i18n/trk/extensions/typescript/out/features/jsDocCompletionProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.jsDocCompletionItem.documentation": "JSDoc yorumu" +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json b/i18n/trk/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json new file mode 100644 index 0000000000000..34242b700576b --- /dev/null +++ b/i18n/trk/extensions/typescript/out/features/referencesCodeLensProvider.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "oneReferenceLabel": "1 başvuru", + "manyReferenceLabel": "{0} başvuru", + "referenceErrorLabel": "Başvurular belirlenemedi" +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/typescriptMain.i18n.json b/i18n/trk/extensions/typescript/out/typescriptMain.i18n.json new file mode 100644 index 0000000000000..2751d3bb07c45 --- /dev/null +++ b/i18n/trk/extensions/typescript/out/typescriptMain.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.projectConfigNoWorkspace": "Bir TypeScript veya JavaScript projesini kullanmak için lütfen bir klasör açın", + "typescript.projectConfigUnsupportedFile": "TypeScript mi yoksa JavaScript mi projesi olduğu tespit edilemedi. Desteklenmeyen dosya türü", + "typescript.projectConfigCouldNotGetInfo": "TypeScript mi yoksa JavaScript mi projesi olduğu tespit edilemedi", + "typescript.noTypeScriptProjectConfig": "Dosya bir TypeScript projesinin bir parçası değil", + "typescript.noJavaScriptProjectConfig": "Dosya bir JavaScript projesinin bir parçası değil", + "typescript.configureTsconfigQuickPick": "tsconfig.json'u yapılandır", + "typescript.configureJsconfigQuickPick": "jsconfig.json'u yapılandır", + "typescript.projectConfigLearnMore": "Daha Fazla Bilgi Edin" +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/typescriptServiceClient.i18n.json b/i18n/trk/extensions/typescript/out/typescriptServiceClient.i18n.json new file mode 100644 index 0000000000000..3cdde46b706b6 --- /dev/null +++ b/i18n/trk/extensions/typescript/out/typescriptServiceClient.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noServerFound": "{0} yolu geçerli bir tsserver kurulumuna işaret etmiyor. Paketlenmiş TypeScript sürümüne geri dönülüyor.", + "noBundledServerFound": "VSCode'un tsserver'ı hatalı bir virüs tespit aracı gibi bir uygulama tarafından silindi. Lütfen VS Code'u yeniden yükleyin", + "versionNumber.custom": "özel", + "serverCouldNotBeStarted": "TypeScript dil sunucusu başlatılamadı. Hata mesajı: {0}", + "useVSCodeVersionOption": "VSCode'un Sürümünü Kullan", + "activeVersion": "Şu an aktif", + "useWorkspaceVersionOption": "Çalışma Alanı Sürümünü Kullan", + "learnMore": "Daha Fazla Bilgi Edin", + "selectTsVersion": "JavaScript ve TypeScript dil özellikleri için kullanılacak TypeScript sürümünü seçin", + "typescript.openTsServerLog.notSupported": "TS Sunucu günlüğü için TS 2.2.2+ gerekiyor", + "typescript.openTsServerLog.loggingNotEnabled": "TS Sunucu günlüğü kapalı. Lütfen `typescript.tsserver.log` ögesini ayarlayın ve günlüğe yazmayı etkinleştirmek için TS sunucusunu yeniden başlatın", + "typescript.openTsServerLog.enableAndReloadOption": "Günlüğe yazmayı etkinleştir ve TS sunucusunu yeniden başlat", + "typescript.openTsServerLog.noLogFile": "TS sunucu günlüğe yazmaya başlamadı.", + "openTsServerLog.openFileFailedFailed": "TS Sunucu günlük dosyası açılamadı", + "serverDiedAfterStart": "TypeScript dil hizmeti, başladıktan hemen sonra 5 kez kapandı. Hizmet yeniden başlatılmayacaktır.", + "serverDiedReportIssue": "Sorun Bildir", + "serverDied": "TypeScript dil hizmeti, son 5 dakikada 5 kez beklenmedik şekilde kapandı." +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/utils/logger.i18n.json b/i18n/trk/extensions/typescript/out/utils/logger.i18n.json new file mode 100644 index 0000000000000..bc738f43d0c37 --- /dev/null +++ b/i18n/trk/extensions/typescript/out/utils/logger.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "channelName": "TypeScript" +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/utils/projectStatus.i18n.json b/i18n/trk/extensions/typescript/out/utils/projectStatus.i18n.json new file mode 100644 index 0000000000000..3deea612eabfb --- /dev/null +++ b/i18n/trk/extensions/typescript/out/utils/projectStatus.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hintExclude": "Proje çapında JavaScript/TypeScript dil özelliklerini etkinleştirmek için, şunlar gibi birçok dosyaya sahip klasörleri hariç tutun: {0}", + "hintExclude.generic": "Proje çapında JavaScript/TypeScript dil özelliklerini etkinleştirmek için, üzerinde çalışmadığınız kaynak dosyalar içeren büyük klasörleri hariç tutun.", + "large.label": "Hariç Tutmaları Yapılandır", + "hintExclude.tooltip": "Proje çapında JavaScript/TypeScript dil özelliklerini etkinleştirmek için, üzerinde çalışmadığınız kaynak dosyalar içeren büyük klasörleri hariç tutun." +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/out/utils/typingsStatus.i18n.json b/i18n/trk/extensions/typescript/out/utils/typingsStatus.i18n.json new file mode 100644 index 0000000000000..acdcdf70be50d --- /dev/null +++ b/i18n/trk/extensions/typescript/out/utils/typingsStatus.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installingPackages": "Daha iyi TypeScript IntelliSense için veri alınıyor", + "typesInstallerInitializationFailed.title": "JavaScript dil özellikleri için tuşlama dosyaları yüklenemedi. Lütfen NPM'in yüklenmiş olduğundan veya kullanıcı ayarlarınızda 'typescript.npm' ögesini yapılandırın", + "typesInstallerInitializationFailed.moreInformation": "Daha Fazla Bilgi", + "typesInstallerInitializationFailed.doNotCheckAgain": "Tekrar Kontrol Etme", + "typesInstallerInitializationFailed.close": "Kapat" +} \ No newline at end of file diff --git a/i18n/trk/extensions/typescript/package.i18n.json b/i18n/trk/extensions/typescript/package.i18n.json new file mode 100644 index 0000000000000..a730294ce6b93 --- /dev/null +++ b/i18n/trk/extensions/typescript/package.i18n.json @@ -0,0 +1,48 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "typescript.reloadProjects.title": "Projeyi Yeniden Yükle", + "javascript.reloadProjects.title": "Projeyi Yeniden Yükle", + "configuration.typescript": "TypeScript", + "typescript.useCodeSnippetsOnMethodSuggest.dec": "İşlevleri parametre imzalarıyla tamamlayın.", + "typescript.tsdk.desc": "Kullanılacak tsserver ve lib*.d.ts dosyalarını içeren klasör yolunu belirtir.", + "typescript.disableAutomaticTypeAcquisition": "Otomatik tür kazanımını devre dışı bırakır. TypeScript >= 2.0.6 ve değiştirildikten sonra yeniden başlatma gerektirir.", + "typescript.check.tscVersion": "Global TypeScript derleyicisinin(ör. tsc) kullanılan TypeScript dil hizmetinden farklı olup olmadığını kontrol et.", + "typescript.tsserver.log": "TS sunucusunun bir dosyaya günlük yazmasını etkinleştirir. Bu günlük, TS Sunucu sorunlarını teşhis etmek için kullanılabilir. Günlük dosya yollarını, kaynak kodunu ve projenizdeki diğer muhtemel hassas bilgileri içerebilir.", + "typescript.tsserver.trace": "TS sunucusuna gönderilen mesajları izlemeyi etkinleştirir. Bu izleme, TS Sunucu sorunlarını teşhis etmek için kullanılabilir. İzleme; dosya yollarını, kaynak kodunu ve projenizdeki diğer muhtemel hassas bilgileri içerebilir.", + "typescript.validate.enable": "TypeScript doğrulamasını etkinleştir veya devre dışı bırak.", + "typescript.format.enable": "Varsayılan TypeScript biçimlendiricisini etkinleştirin/devre dışı bırakın.", + "javascript.format.enable": "Varsayılan JavaScript biçimlendiricisini etkinleştir veya devre dışı bırak.", + "format.insertSpaceAfterCommaDelimiter": "Virgül sınırlayıcısından sonra boşluk eklenmesini tanımlar.", + "format.insertSpaceAfterConstructor": "Oluşturucu anahtar kelimesinden sonra boşluk eklenip eklenmeyeceğini tanımlar. TypeScript >= 2.3.0 gerektirir.", + "format.insertSpaceAfterSemicolonInForStatements": "Bir ifade için noktalı virgülden sonra boşluk eklenmesini tanımlar.", + "format.insertSpaceBeforeAndAfterBinaryOperators": "Bir ikili operatöründen sonra boşluk eklenmesini tanımlar.", + "format.insertSpaceAfterKeywordsInControlFlowStatements": "Bir kontrol akışı ifadesi için anahtar kelimelerden sonra boşluk eklenmesini tanımlar.", + "format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": "Anonim fonksiyonlar için \"function\" anahtar kelimesinden sonra boşluk eklenmesini tanımlar.", + "format.insertSpaceBeforeFunctionParenthesis": "Fonksiyon argüman parantezlerinden önce boşluk eklenmesini tanımlar. TypeScript >= 2.1.5 gerektirir.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Boş olmayan parantezler açıldıktan sonra ve kapatılmadan önce boşluk eklenmesini tanımlar.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Boş olmayan köşeli parantezler açıldıktan sonra ve kapatılmadan önce boşluk eklenmesini tanımlar.", + "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Boş olmayan küme parantezleri açıldıktan sonra ve kapatılmadan önce boşluk eklenmesini tanımlar. TypeScript >= 2.3.0 gerektirir.", + "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Şablon dizesi ayraçları açıldıktan sonra ve kapatılmadan önce boşluk eklenmesini tanımlar. TypeScript >= 2.0.6 gerektirir.", + "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "JSX ifadesi ayraçları açıldıktan sonra ve kapatılmadan önce boşluk eklenmesini tanımlar. TypeScript >= 2.0.6 gerektirir.", + "format.placeOpenBraceOnNewLineForFunctions": "Fonksiyonlarda bir açılış ayracının yeni satıra koyulup koyulmayacağını tanımlar.", + "format.placeOpenBraceOnNewLineForControlBlocks": "Kontrol bloklarında bir açılış ayracının yeni satıra koyulup koyulmayacağını tanımlar.", + "javascript.validate.enable": "JavaScript doğrulamasını etkinleştir veya devre dışı bırak.", + "typescript.goToProjectConfig.title": "Proje Yapılandırmasına Git", + "javascript.goToProjectConfig.title": "Proje Yapılandırmasına Git", + "javascript.referencesCodeLens.enabled": "JavaScript dosyalarında başvuru kod objektifini etkinleştir veya devre dışı bırak.", + "typescript.referencesCodeLens.enabled": "TypeScript dosyalarında başvuru kod objektifini etkinleştir veya devre dışı bırak. TypeScript >= 2.0.6 gerektirir.", + "typescript.implementationsCodeLens.enabled": "Uygulama kod objektifini etkinleştir veya devre dışı bırak. TypeScript >= 2.2.0 gerektirir.", + "typescript.openTsServerLog.title": "TS Sunucu günlüğünü aç", + "typescript.restartTsServer": "TS sunucusunu yeniden başlat", + "typescript.selectTypeScriptVersion.title": "TypeScript Sürümünü Seç", + "jsDocCompletion.enabled": "Otomatik JSDoc yorumlarını etkinleştir veya devre dışı bırak.", + "javascript.implicitProjectConfig.checkJs": "JavaScript dosyalarının anlamsal kontrolünü etkinleştir veya devre dışı bırak. Mevcut jsconfig.json veya tsconfig.json dosyaları bu ayarı geçersiz kılar. TypeScript >= 2.3.1 gerektirir.", + "typescript.npm": "Otomatik Tür Kazanımı için kullanılacak NPM yürütülebilir dosyasının yolunu belirtir. TypeScript >= 2.3.4 gerektirir.", + "typescript.check.npmIsInstalled": "Otomatik Tür Kazanımı için NPM'in yüklü olup olmadığını kontrol et.", + "javascript.nameSuggestions": "JavaScript öneri listelerindeki dosyadan benzersiz adları eklemeyi etkinleştir veya devre dışı bırak.", + "typescript.tsc.autoDetect": "Tsc görevlerinin otomatik olarak algılanıp algılanmayacağını denetler. Varsayılan olarak açıktır." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/browser/ui/actionbar/actionbar.i18n.json b/i18n/trk/src/vs/base/browser/ui/actionbar/actionbar.i18n.json new file mode 100644 index 0000000000000..4ecb2c803f4cd --- /dev/null +++ b/i18n/trk/src/vs/base/browser/ui/actionbar/actionbar.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "titleLabel": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/browser/ui/aria/aria.i18n.json b/i18n/trk/src/vs/base/browser/ui/aria/aria.i18n.json new file mode 100644 index 0000000000000..4fa2c84df1026 --- /dev/null +++ b/i18n/trk/src/vs/base/browser/ui/aria/aria.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "repeated": "{0} (tekrar oluştu)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/browser/ui/findinput/findInput.i18n.json b/i18n/trk/src/vs/base/browser/ui/findinput/findInput.i18n.json new file mode 100644 index 0000000000000..93c6910157dff --- /dev/null +++ b/i18n/trk/src/vs/base/browser/ui/findinput/findInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultLabel": "giriş" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json b/i18n/trk/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json new file mode 100644 index 0000000000000..d8764ffb9987e --- /dev/null +++ b/i18n/trk/src/vs/base/browser/ui/findinput/findInputCheckboxes.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caseDescription": "Büyük/Küçük Harf Eşleştir", + "wordsDescription": "Sözcüğün Tamamını Eşleştir", + "regexDescription": "Normal İfade Kullan" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/browser/ui/inputbox/inputBox.i18n.json b/i18n/trk/src/vs/base/browser/ui/inputbox/inputBox.i18n.json new file mode 100644 index 0000000000000..3981d7f1e2d28 --- /dev/null +++ b/i18n/trk/src/vs/base/browser/ui/inputbox/inputBox.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "alertErrorMessage": "Hata: {0}", + "alertWarningMessage": "Uyarı: {0}", + "alertInfoMessage": "Bilgi: {0}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json b/i18n/trk/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json new file mode 100644 index 0000000000000..8da49a2d7b0a9 --- /dev/null +++ b/i18n/trk/src/vs/base/browser/ui/resourceviewer/resourceViewer.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "imgMeta": "{0}x{1} {2}", + "largeImageError": "Resim, düzenleyicide görüntülemek için çok büyük.", + "resourceOpenExternalButton": "Harici program kullanarak resmi aç", + "nativeBinaryError": "Dosya ikili olduğu, çok büyük olduğu veya desteklenmeyen bir metin kodlaması kullandığı için düzenleyicide görüntülenemiyor.", + "sizeB": "{0}B", + "sizeKB": "{0}KB", + "sizeMB": "{0}MB", + "sizeGB": "{0}GB", + "sizeTB": "{0}TB" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/browser/ui/toolbar/toolbar.i18n.json b/i18n/trk/src/vs/base/browser/ui/toolbar/toolbar.i18n.json new file mode 100644 index 0000000000000..634046fb44b79 --- /dev/null +++ b/i18n/trk/src/vs/base/browser/ui/toolbar/toolbar.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "more": "Diğer" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/common/errorMessage.i18n.json b/i18n/trk/src/vs/base/common/errorMessage.i18n.json new file mode 100644 index 0000000000000..354f33fe5331e --- /dev/null +++ b/i18n/trk/src/vs/base/common/errorMessage.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "message": "{0}. Hata kodu: {1}", + "error.permission.verbose": "İzin Verilmedi (HTTP {0})", + "error.permission": "İzin Verilmedi", + "error.http.verbose": "{0} (HTTP {1}: {2})", + "error.http": "{0} (HTTP {1})", + "error.connection.unknown.verbose": "Bilinmeyen Bağlantı Hatası ({0})", + "error.connection.unknown": "Bilinmeyen bir bağlantı hatası oluştu. Artık İnternet'e bağlı değilsiniz veya bağlandığınız sunucu çevrimdışı.", + "stackTrace.format": "{0}: {1}", + "error.defaultMessage": "Bilinmeyen bir hata oluştu. Daha fazla ayrıntı için lütfen günlüğe başvurun.", + "error.moreErrors": "{0} (toplam {1} hata)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/common/jsonErrorMessages.i18n.json b/i18n/trk/src/vs/base/common/jsonErrorMessages.i18n.json new file mode 100644 index 0000000000000..e9ca243b5118f --- /dev/null +++ b/i18n/trk/src/vs/base/common/jsonErrorMessages.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.invalidSymbol": "Geçersiz sembol", + "error.invalidNumberFormat": "Geçersiz sayı biçimi", + "error.propertyNameExpected": "Özellik adı bekleniyor", + "error.valueExpected": "Değer bekleniyor", + "error.colonExpected": "İki nokta üst üste bekleniyor", + "error.commaExpected": "Virgül bekleniyor", + "error.closeBraceExpected": "Kapanış ayracı bekleniyor", + "error.closeBracketExpected": "Kapanış köşeli ayracı bekleniyor", + "error.endOfFileExpected": "Dosya sonu bekleniyor" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/common/keybindingLabels.i18n.json b/i18n/trk/src/vs/base/common/keybindingLabels.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/trk/src/vs/base/common/keybindingLabels.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/common/processes.i18n.json b/i18n/trk/src/vs/base/common/processes.i18n.json new file mode 100644 index 0000000000000..3ffd209b1c97b --- /dev/null +++ b/i18n/trk/src/vs/base/common/processes.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ExecutableParser.commandMissing": "Hata: yürütülebilir bilgi dize türünde bir komut tanımlamalıdır.", + "ExecutableParser.isShellCommand": "Uyarı: isShellCommand boole türünde olmalıdır. {0} değeri yok sayıldı.", + "ExecutableParser.args": "Uyarı: argümanlar \"string[]\" türünde olmalıdır. {0} değeri yok sayıldı.", + "ExecutableParser.invalidCWD": "Uyarı: options.cwd dize türünde olmalıdır. {0} değeri yok sayıldı." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/common/severity.i18n.json b/i18n/trk/src/vs/base/common/severity.i18n.json new file mode 100644 index 0000000000000..5cd096b2c9410 --- /dev/null +++ b/i18n/trk/src/vs/base/common/severity.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "sev.error": "Hata", + "sev.warning": "Uyarı", + "sev.info": "Bilgi" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/node/processes.i18n.json b/i18n/trk/src/vs/base/node/processes.i18n.json new file mode 100644 index 0000000000000..1e9572a9b919d --- /dev/null +++ b/i18n/trk/src/vs/base/node/processes.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskRunner.UNC": "UNC sürücüsünde kabuk komutu yürütülemez." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/node/zip.i18n.json b/i18n/trk/src/vs/base/node/zip.i18n.json new file mode 100644 index 0000000000000..1094c4b1628e2 --- /dev/null +++ b/i18n/trk/src/vs/base/node/zip.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "{0}, zip içerisinde bulunamadı." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json b/i18n/trk/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json new file mode 100644 index 0000000000000..300655f6dbde8 --- /dev/null +++ b/i18n/trk/src/vs/base/parts/quickopen/browser/quickOpenModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpenAriaLabelEntry": "{0}, seçici", + "quickOpenAriaLabel": "seçici" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json b/i18n/trk/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json new file mode 100644 index 0000000000000..5603016ef86d2 --- /dev/null +++ b/i18n/trk/src/vs/base/parts/quickopen/browser/quickOpenWidget.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpenAriaLabel": "Hızlı seçici. Sonuçları daraltmak için yazmaya başlayın.", + "treeAriaLabel": "Hızlı Seçici" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/base/parts/tree/browser/treeDefaults.i18n.json b/i18n/trk/src/vs/base/parts/tree/browser/treeDefaults.i18n.json new file mode 100644 index 0000000000000..b6850a5f7ed26 --- /dev/null +++ b/i18n/trk/src/vs/base/parts/tree/browser/treeDefaults.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "collapse": "Daralt" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/code/electron-main/menus.i18n.json b/i18n/trk/src/vs/code/electron-main/menus.i18n.json new file mode 100644 index 0000000000000..3864423636bc8 --- /dev/null +++ b/i18n/trk/src/vs/code/electron-main/menus.i18n.json @@ -0,0 +1,178 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mFile": "&&Dosya", + "mEdit": "Dü&&zen", + "mSelection": "&&Seçim", + "mView": "&&Görünüm", + "mGoto": "G&&it", + "mDebug": "&&Hata Ayıklama", + "mWindow": "Pencere", + "mHelp": "&&Yardım", + "mTask": "Gö&&revler", + "miNewWindow": "Yeni &&Pencere", + "mAbout": "{0} Hakkında", + "mServices": "Hizmetler", + "mHide": "{0} öğesini gizle", + "mHideOthers": "Diğerlerini Gizle", + "mShowAll": "Tümünü Göster", + "miQuit": "{0} Öğesinden Çık", + "miNewFile": "&&Yeni Dosya", + "miOpen": "&Aç", + "miOpenFolder": "&&Klasör Aç...", + "miOpenFile": "&&Dosya Aç...", + "miOpenRecent": "&&Son Kullanılanları Aç", + "miSave": "&&Kaydet", + "miSaveAs": "&&Farklı Kaydet", + "miSaveAll": "&&Tümünü Kaydet", + "miAutoSave": "Otomatik Kaydet", + "miRevert": "Dosyayı &&Geri Al", + "miCloseWindow": "Pen&&cereyi Kapat", + "miCloseFolder": "K&&lasörü Kapat", + "miCloseEditor": "Dü&&zenleyiciyi Kapat", + "miExit": "Çı&&kış", + "miOpenSettings": "&&Ayarlar", + "miOpenKeymap": "&&Klavye Kısayolları", + "miOpenKeymapExtensions": "&&Tuş Haritası Eklentileri", + "miOpenSnippets": "Kullanıcı &&Parçacıkları", + "miSelectColorTheme": "&&Renk Teması", + "miSelectIconTheme": "&&Dosya Simgesi Teması", + "miPreferences": "T&&ercihler", + "miReopenClosedEditor": "&&Kapatılan Düzenleyiciyi Tekrar Aç", + "miMore": "&&Daha Fazlası...", + "miClearRecentOpen": "&&Son Kullanılan Dosyaları Temizle", + "miUndo": "&&Geri Al", + "miRedo": "&&Yinele", + "miCut": "&&Kes", + "miCopy": "K&&opyala", + "miPaste": "Y&&apıştır", + "miFind": "&&Bul", + "miReplace": "&&Değiştir", + "miFindInFiles": "Dosyalarda B&&ul", + "miReplaceInFiles": "Dosyalarda Değiş&&tir", + "miEmmetExpandAbbreviation": "Emmet: Kı&&saltmayı Genişlet", + "miShowEmmetCommands": "E&&mmet...", + "miToggleLineComment": "Satı&&r Yorumunu Aç/Kapat", + "miToggleBlockComment": "Yorum B&&loğunu Aç/Kapat", + "miMultiCursorAlt": "Birden Fazla İmleç İçin Alt+Tıklama Kullan", + "miMultiCursorCmd": "Birden Fazla İmleç İçin Cmd+Tıklama Kullan", + "miMultiCursorCtrl": "Birden Fazla İmleç İçin Ctrl+Tıklama Kullan", + "miInsertCursorAbove": "Yukarıya &&İmleç Ekle", + "miInsertCursorBelow": "Aşağıya İ&&mleç Ekle", + "miInsertCursorAtEndOfEachLineSelected": "&&Satır Sonlarına İmleç Ekle", + "miAddSelectionToNextFindMatch": "S&&onraki Tekrarlamayı Ekle", + "miAddSelectionToPreviousFindMatch": "Ö&&nceki Tekrarlamayı Ekle", + "miSelectHighlights": "Tüm T&&ekrarlamaları Değiştir", + "miCopyLinesUp": "Satırı &&Yukarı Kopyala", + "miCopyLinesDown": "Satırı &&Aşağı Kopyala", + "miMoveLinesUp": "Satırı Y&&ukarı Taşı", + "miMoveLinesDown": "Satı&&rı Aşağı Taşı", + "miSelectAll": "&&Tümünü Seç", + "miSmartSelectGrow": "Seçimi &&Genişlet", + "miSmartSelectShrink": "Seçimi &&Daralt", + "miViewExplorer": "&&Gezgin", + "miViewSearch": "&&Arama", + "miViewSCM": "&&SCM", + "miViewDebug": "&&Hata Ayıklama", + "miViewExtensions": "&&Eklentiler", + "miToggleOutput": "Çı&&ktı", + "miToggleDebugConsole": "Hata &&Ayıklama Konsolu", + "miToggleIntegratedTerminal": "Entegre &&Terminal", + "miMarker": "S&&orunlar", + "miAdditionalViews": "&&Ek Görünümler", + "miCommandPalette": "Komut &&Paleti...", + "miToggleFullScreen": "Tam Ekra&&nı Aç/Kapat", + "miToggleZenMode": "Zen Modunu Aç/Kapat", + "miToggleMenuBar": "&&Menü Çubuğunu Gizle/Göster", + "miSplitEditor": "Düzenleyiciyi &&Böl", + "miToggleEditorLayout": "Dü&&zenleyici Grubu Düzenini Değiştir", + "miToggleSidebar": "Ke&&nar Çubuğunu Aç/Kapat", + "miMoveSidebarRight": "Kenar Çubuğunu S&&ağa Taşı", + "miMoveSidebarLeft": "Kenar Çubuğunu S&&ola Taşı", + "miTogglePanel": "&&Paneli Aç/Kapat", + "miHideStatusbar": "&&Durum Çubuğunu Gizle", + "miShowStatusbar": "&&Du&&rum Çubuğunu Göster", + "miHideActivityBar": "Etkinlik Ç&&ubuğunu Gizle", + "miShowActivityBar": "Etkinlik Çu&&buğunu Göster", + "miToggleWordWrap": "&&Sözcük Kaydırmasını Aç/Kapat", + "miToggleRenderWhitespace": "&&Boşlukları Görüntülemeyi Aç/Kapat", + "miToggleRenderControlCharacters": "&&Kontrol Karakterlerini Aç/Kapat", + "miZoomIn": "&&Yakınlaştır", + "miZoomOut": "&&Uzaklaştır", + "miZoomReset": "Yakınlaştırmayı Sı&&fırla", + "miBack": "&&Geri", + "miForward": "&&İleri", + "miNextEditor": "&&Sonraki Düzenleyici", + "miPreviousEditor": "Ö&&nceki Düzenleyici", + "miNextEditorInGroup": "&&Grupta Sonraki Kullanılan Düzenleyici", + "miPreviousEditorInGroup": "G&&rupta Önceki Kullanılan Düzenleyici", + "miSwitchEditor": "&&Düzenleyici Değiştir", + "miFocusFirstGroup": "İ&&lk Grup", + "miFocusSecondGroup": "İ&&kinci Grup", + "miFocusThirdGroup": "Üçün&&cü Grup", + "miNextGroup": "Sonraki Gr&&up", + "miPreviousGroup": "Önceki Gru&&p", + "miSwitchGroup": "Grup &&Değiştir", + "miGotoFile": "D&&osyaya Git...", + "miGotoSymbolInFile": "Dosyada S&&embole Git...", + "miGotoSymbolInWorkspace": "Çalışma &&Alanında Sembole Git...", + "miGotoDefinition": "&&Tanıma Git", + "miGotoTypeDefinition": "Tü&&r Tanımına Git", + "miGotoImplementation": "U&&ygulamaya Git", + "miGotoLine": "&&Satıra Git...", + "miStartDebugging": "&&Hata Ayıklamaya Başla", + "miStartWithoutDebugging": "Hata Ayıklama &&Olmadan Başlat", + "miStopDebugging": "Hata Ayıklamayı D&&urdur", + "miRestart Debugging": "Hata Ayıklamayı &&Yeniden Başlat", + "miOpenConfigurations": "Ya&&pılandırmaları Aç", + "miAddConfiguration": "Yapı&&landırma Ekle...", + "miStepOver": "&&Adım At", + "miStepInto": "&&İçine Adımla", + "miStepOut": "&&Dışına Adımla", + "miContinue": "De&&vam Et", + "miToggleBreakpoint": "Kesme &&Noktası Ekle/Kaldır", + "miConditionalBreakpoint": "&&Koşullu Kesme Noktası...", + "miColumnBreakpoint": "&&Sütun Kesme Noktası", + "miFunctionBreakpoint": "&&Fonksiyon Kesme Noktası", + "miNewBreakpoint": "&&Yeni Kesme Noktası", + "miEnableAllBreakpoints": "Tüm Kesme Noktalarını Etkinleştir", + "miDisableAllBreakpoints": "&&Tüm Kesme Noktalarını Devre Dışı Bırak", + "miRemoveAllBreakpoints": "Tüm Kesme Noktalarını Kaldı&&r", + "miInstallAdditionalDebuggers": "&&Ek Hata Ayıklayıcıları Yükle", + "mMinimize": "Simge Durumuna Küçült", + "mZoom": "Yakınlaştırma", + "mBringToFront": "Tümünü Öne Getir", + "miSwitchWindow": "&&Pencere Değiştir...", + "miToggleDevTools": "&&Geliştirici Araçlarını Aç/Kapat", + "miAccessibilityOptions": "&&Erişilebilirlik Seçenekleri", + "miReportIssues": "So&&run Bildir", + "miWelcome": "&&Hoş Geldiniz", + "miInteractivePlayground": "&&İnteraktif Oyun Alanı", + "miDocumentation": "&&Belgeler", + "miReleaseNotes": "&&Sürüm Notları", + "miKeyboardShortcuts": "&&Klavye Kısayolları Başvurusu", + "miIntroductoryVideos": "Tanıtım &&Videoları", + "miTwitter": "&&Twitter'da Bize Katıl", + "miUserVoice": "Ö&&zellik İsteklerini Ara", + "miLicense": "&&Lisansı Görüntüle", + "miPrivacyStatement": "Gizlilik &&Beyanı", + "miAbout": "H&&akkında", + "miRunTask": "Görevi Ç&&alıştır", + "miRestartTask": "Görevi &&Yeniden Başlat", + "miTerminateTask": "&&Görevi Sonlandır", + "miBuildTask": "&&Derleme Görevi", + "miTestTask": "&&Test Görevi", + "miShowTaskLog": "&&Görev Günlüğünü Göster", + "accessibilityOptionsWindowTitle": "Erişilebilirlik Seçenekleri", + "miRestartToUpdate": "Güncelleştirmek için Yeniden Başlatın...", + "miCheckingForUpdates": "Güncelleştirmeler Denetleniyor...", + "miDownloadUpdate": "Mevcut Güncelleştirmeyi İndir", + "miDownloadingUpdate": "Güncelleştirme İndiriliyor...", + "miInstallingUpdate": "Güncelleştirme Yükleniyor...", + "miCheckForUpdates": "Güncelleştirmeleri Denetle...", + "aboutDetail": "\nSürüm {0}\nCommit {1}\nTarih {2}\nKabuk {3}\nOluşturucu {4}\nNode {5}", + "okButton": "Tamam" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/code/electron-main/window.i18n.json b/i18n/trk/src/vs/code/electron-main/window.i18n.json new file mode 100644 index 0000000000000..ca683aad480e3 --- /dev/null +++ b/i18n/trk/src/vs/code/electron-main/window.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hiddenMenuBar": "Menü çubuğuna **Alt** tuşuna basarak hala erişebilirsiniz." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/code/electron-main/windows.i18n.json b/i18n/trk/src/vs/code/electron-main/windows.i18n.json new file mode 100644 index 0000000000000..d700eddd2d584 --- /dev/null +++ b/i18n/trk/src/vs/code/electron-main/windows.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ok": "Tamam", + "pathNotExistTitle": "Yol yok", + "pathNotExistDetail": "'{0}' yolu artık diskte değil.", + "reopen": "Yeniden Aç", + "wait": "Beklemeye Devam Et", + "close": "Kapat", + "appStalled": "Pencere artık yanıt vermiyor", + "appStalledDetail": "Pencereyi yeniden açabilir, kapatabilir veya bekleyebilirsiniz.", + "appCrashed": "Pencere kilitlendi", + "appCrashedDetail": "Verdiğimiz rahatsızlıktan dolayı özür dileriz! Pencereyi yeniden açıp kaldığınız yerden devam edebilirsiniz." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/code/node/cliProcessMain.i18n.json b/i18n/trk/src/vs/code/node/cliProcessMain.i18n.json new file mode 100644 index 0000000000000..8ca0b4fc0b406 --- /dev/null +++ b/i18n/trk/src/vs/code/node/cliProcessMain.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "'{0}' eklentisi bulunamadı.", + "notInstalled": "'{0}' eklentisi yüklü değil.", + "useId": "Eklentinin tam ID'sini, yayıncı da dahil olmak üzere kullandığınızdan emin olun, ör: {0}", + "successVsixInstall": "'{0}' eklentisi başarıyla yüklendi.", + "alreadyInstalled": "'{0}' eklentisi zaten yüklü.", + "foundExtension": "'{0}' markette bulundu.", + "installing": "Yükleniyor...", + "successInstall": "'{0}' v{1} eklentisi başarıyla kuruldu!", + "uninstalling": "{0} kaldırılıyor...", + "successUninstall": "'{0}' eklentisi başarıyla kaldırıldı!" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json b/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json new file mode 100644 index 0000000000000..6da1720d79cef --- /dev/null +++ b/i18n/trk/src/vs/editor/common/config/commonEditorConfig.i18n.json @@ -0,0 +1,88 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorConfigurationTitle": "Düzenleyici", + "fontFamily": "Yazı tipi ailesini denetler.", + "fontWeight": "Yazı tipi kalınlığını denetler.", + "fontSize": "Yazı tipi boyutunu piksel olarak denetler.", + "lineHeight": "Satır yüksekliğini denetler. lineHeight değerini, fontSize değeri kullanarak hesaplamak için 0 girin.", + "letterSpacing": "Harfler arası boşluğu pixel olarak denetler.", + "lineNumbers": "Satır numaralarının görüntülenmesini denetler. Olası değerler 'on', 'off' ve 'relative'dir. 'relative' satırların geçerli imleç konumundan uzaklıklarını gösterir.", + "rulers": "Dikey cetvellerin gösterileceği sütunlar", + "wordSeparators": "Sözcüklerle ilgili gezinti veya işlem yaparken kelime ayırıcı olarak kullanılacak karakterler", + "tabSize": "Bir sekmenin eşit olduğu boşluk sayısı. Bu ayar, `editor.detectIndentation` açıkken dosya içeriğine bağlı olarak geçersiz kılınır.", + "tabSize.errorMessage": "'sayı' bekleniyor. \"auto\" değerinin `editor.detectIndentation` ile değiştirildiğini unutmayın.", + "insertSpaces": "Tab tuşuna basınca boşluk ekle. Bu ayar, `editor.detectIndentation` açıkken dosya içeriğine bağlı olarak geçersiz kılınır.", + "insertSpaces.errorMessage": "'boole' bekleniyor. \"auto\" değerinin `editor.detectIndentation` ile değiştirildiğini unutmayın.", + "detectIndentation": "Bir dosyayı açarken, `editor.tabSize` ve `editor.insertSpaces` dosya içeriğine bağlı olarak algılanır.", + "roundedSelection": "Seçimlerin köşelerinin yuvarlak olup olmayacağını denetler", + "scrollBeyondLastLine": "Düzenleyicinin son satırın ötesine ilerleyip ilerlemeyeceğini denetler", + "minimap.enabled": "Mini haritanın gösterilip gösterilmeyeceğini denetler", + "minimap.showSlider": "Mini harita kaydıracının otomatik olarak gizlenip gizlenmeyeceğini denetler.", + "minimap.renderCharacters": "(Renk blokları yerine) Bir satırdaki gerçek harfleri göster", + "minimap.maxColumn": "Hazırlanacak mini haritanın azami genişliğini belirli sayıda sütunla sınırla", + "find.seedSearchStringFromSelection": "Bulma Araç Çubuğu'ndaki arama metninin, düzenleyicideki seçili alandan beslenmesini denetler", + "find.autoFindInSelection": "Seçimde bul işaretçisinin, editördeki metnin birden çok karakteri veya satırı seçildiğinde açılmasını denetler.", + "wordWrap.off": "Satırlar hiçbir zaman bir sonraki satıra kaydırılmayacak.", + "wordWrap.on": "Satırlar görüntü alanı genişliğinde bir sonraki satıra kaydırılacak.", + "wordWrap.wordWrapColumn": "Satırlar `editor.wordWrapColumn` değerinde bir sonraki satıra kaydırılacak.", + "wordWrap.bounded": "Satırlar en düşük görüntü alanı genişliğinde ve `editor.wordWrapColumn` değerinde bir sonraki satıra kaydırılacak.", + "wordWrap": "Satırların bir sonraki satıra nasıl kaydırılacağını denetler. Seçenekler:\n - 'off' (kaydırmayı devre dışı bırak),\n - 'on' (görüntü alanında kaydır),\n - 'wordWrapColumn' (`editor.wordWrapColumn` değerinde kaydır) veya\n - 'bounded' (en düşük görüntü alanı genişliğinde ve `editor.wordWrapColumn` değerinde kaydır).", + "wordWrapColumn": "`editor.wordWrap` ögesi, 'wordWrapColumn' veya 'bounded' iken düzenleyicinin kaydırma sütununu denetler.", + "wrappingIndent": "Kaydırılan satır girintisini denetler. 'none', 'same' veya 'indent' değerlerinden biri olabilir.", + "mouseWheelScrollSensitivity": "Fare tekerleği kaydırma olaylarında `deltaX` ve `deltaY` üzerinde kullanılan bir çarpan", + "multiCursorModifier.ctrlCmd": "Windows ve Linux'da `Control` ve OSX'de `Command` ile eşleşir.", + "multiCursorModifier.alt": "Windows ve Linux'da `Alt` ve OSX'de `Option` ile eşleşir.", + "multiCursorModifier": "Fare ile birden çok imleç eklenmesinde kullanılacak değiştirici. `ctrlCmd` Windows ve Linux'da `Control` ve OSX'de `Command` ile eşleşir. Tanıma Git ve Bağlantıyı Aç fare hareketleri, birden çok imleç değiştiricisi ile çakışmayacak şekilde uyum sağlarlar.", + "quickSuggestions.strings": "Dizelerin içinde hızlı önerileri etkinleştir.", + "quickSuggestions.comments": "Yorumların içinde hızlı önerileri etkinleştir.", + "quickSuggestions.other": "Dizeler ve yorumlar dışında hızlı önerileri etkinleştirin.", + "quickSuggestions": "Yazarken önerilerin otomatik olarak gösterilip gösterilmeyeceğini denetler", + "quickSuggestionsDelay": "Hızlı önerilerin gösterilmesinden önce kaç ms bekleneceğini denetler", + "parameterHints": "Siz tuşlara bastıkça parametre belgelerini ve tür bilgisini gösteren açılır pencereyi etkinleştirir.", + "autoClosingBrackets": "Düzenleyicinin köşeli ayracı açtıktan sonra otomatik olarak kapatıp kapatmayacağını denetler", + "formatOnType": "Düzenleyicinin satırı yazıldıktan sonra otomatik biçimlendirip biçimlendirmeyeceğini denetler", + "formatOnPaste": "Düzenleyicinin yapıştırılan içeriği otomatik olarak biçimlendirip biçimlendirmeyeceğini denetler. Bir biçimlendirici mevcut olmalı ve belgede bir aralığı biçimlendirebilmelidir.", + "suggestOnTriggerCharacters": "Tetikleyici karakterler yazılırken otomatik olarak öneri gösterilip gösterilmeyeceğini denetler", + "acceptSuggestionOnEnter": "'Tab' tuşuna ek olarak - önerilerin 'Enter' tuşuna basıldığında kabul edilmesini denetler. Yeni satır ekleme ya da öneri kabul etme arasındaki belirsizlikten kaçınmaya yardımcı olur. 'smart' değeri, bir öneri metinsel değişiklik yapıyorsa, onu sadece Enter tuşu ile kabul etmeyi ifade eder", + "acceptSuggestionOnCommitCharacter": "Önerilerin tamamlama karakterlerinde kabul edilip edilmeyeceğini denetler. Örnek olarak; JavaScript'te noktalı virgül(';') öneri kabul eden ve o karakteri giren tamamlama karakteri olabilir.", + "snippetSuggestions": "Parçacıkların diğer önerilerle gösterilip gösterilmeyeceğini ve bunların nasıl sıralanacaklarını denetler.", + "emptySelectionClipboard": "Bir seçim olmadan geçerli satırı kopyalayıp kopyalamamayı denetler.", + "wordBasedSuggestions": "Tamamlamaların belgedeki sözcüklere dayalı olarak hesaplanıp hesaplanmayacağını denetler.", + "suggestFontSize": "Öneri aracının yazı tipi boyutu", + "suggestLineHeight": "Öneri aracının satır yüksekliği", + "selectionHighlight": "Düzenleyicinin seçime benzer eşleşmeleri vurgulayıp vurgulamayacağını denetler", + "occurrencesHighlight": "Düzenleyicinin semantik sembol tekrarlamalarını vurgulayıp vurgulamayacağını denetler", + "overviewRulerLanes": "Genel bakış cetvelinde aynı konumda gösterilebilecek süsleme sayısını denetler", + "overviewRulerBorder": "Genel bakış cetvelinin etrafına bir kenarlık çizilmesi gerekip gerekmediğini denetler.", + "cursorBlinking": "İmleç animasyon stilini denetler, olası değerler 'blink', 'smooth', 'phase', 'expand' ve 'solid'dir", + "mouseWheelZoom": "Ctrl tuşuna basarken fare tekerleği ile düzenleyici yazı tipini yakınlaştırın", + "cursorStyle": "İmleç stilini denetler, kabul edilen değerler: 'block', 'block-outline', 'line', 'line-thin', 'underline' ve 'underline-thin'", + "fontLigatures": "Yazı tipi ligatürlerini etkinleştirir", + "hideCursorInOverviewRuler": "İmlecin genel bakış cetvelinde gizlenip gizlenmeyeceğini denetler.", + "renderWhitespace": "Düzenleyicinin boşluk karakterlerini nasıl göstereceğini denetler, seçenekler: 'none', 'boundary', ve 'all'. 'boundary' seçeneği sözcükler arasındaki tek boşlukları göstermez.", + "renderControlCharacters": "Düzenleyicinin kontrol karakterlerini gösterip göstermemesini denetler", + "renderIndentGuides": "Düzenleyicinin girinti kılavuzlarını gösterip göstermemesini denetler", + "renderLineHighlight": "Düzenleyicinin geçerli satır vurgusunu nasıl göstereceğini denetler, seçenekler: 'none', 'gutter', 'line', ve 'all'.", + "codeLens": "Düzenleyicinin kod objektiflerini gösterip göstermediğini denetler", + "folding": "Düzenleyicide kod katlamanın etkin olup olmadığını denetler", + "showFoldingControls": "Oluktaki kat kontrollerinin otomatik olarak gizlenip gizlenmeyeceğini denetler.", + "matchBrackets": "Eşleşen ayraçları, onlardan biri seçildiğinde vurgula.", + "glyphMargin": "Düzenleyicinin dikey glif boşluğunu oluşturup oluşturmayacağını kontrol eder. Glif boşluğu çoğunlukla hata ayıklamak için kullanılır.", + "useTabStops": "Boşluk ekleme ve silme sekme duraklarını izler", + "trimAutoWhitespace": "Sondaki otomatik eklenen boşluğu kaldır", + "stablePeek": "Gözetleme düzenleyicilerini, içeriklerine çift tıklandığında veya Escape tuşuna basıldığında bile açık tut.", + "dragAndDrop": "Düzenleyicinin seçimleri sürükleyip bırakarak taşımaya izin verip vermeyeceğini denetler.", + "accessibilitySupport.auto": "Düzenleyici, bir Ekran Okuyucu'nun ne zaman bağlandığını algılamak için platform API'larını kullanacaktır.", + "accessibilitySupport.on": "Düzenleyici bir Ekran Okuyucu ile kullanılmak üzere kalıcı olarak optimize edilecektir.", + "accessibilitySupport.off": "Düzenleyici hiçbir zaman bir Ekran Okuyucu ile kullanılmak üzere optimize edilmeyecektir.", + "accessibilitySupport": "Düzenleyicinin ekran okuyucular için optimize edilmiş bir modda çalışıp çalışmayacağını denetler.", + "links": "Düzenleyicinin bağlantıları otomatik algılayıp, onları tıklanabilir yapıp yapmayacağını denetler", + "sideBySide": "Karşılaştırma düzenleyicisinin farklılıkları yan yana mı yoksa satır içinde mi göstereceğini denetler", + "ignoreTrimWhitespace": "Karşılaştırma düzenleyicisinin baştaki veya sondaki boşluklardaki değişmeleri farklılık olarak gösterip göstermemesini denetler", + "renderIndicators": "Karşılaştırma düzenleyicisinin ekleme/çıkarma değişiklikleri için +/- göstergeleri gösterip göstermemesini denetler.", + "selectionClipboard": "Linux birincil panosunun desteklenip desteklenmeyeceğini denetler." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/config/editorOptions.i18n.json b/i18n/trk/src/vs/editor/common/config/editorOptions.i18n.json new file mode 100644 index 0000000000000..e9722574046b5 --- /dev/null +++ b/i18n/trk/src/vs/editor/common/config/editorOptions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "accessibilityOffAriaLabel": "Düzenleyici şu an erişilebilir değil. Seçenekler için lütfen Alt+F1'e basın.", + "editorViewAccessibleLabel": "Düzenleyici içeriği" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/controller/cursor.i18n.json b/i18n/trk/src/vs/editor/common/controller/cursor.i18n.json new file mode 100644 index 0000000000000..5ac37adbc122d --- /dev/null +++ b/i18n/trk/src/vs/editor/common/controller/cursor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "corrupt.commands": "Komut yürütülürken beklenmeyen özel durum oluştu." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/model/textModelWithTokens.i18n.json b/i18n/trk/src/vs/editor/common/model/textModelWithTokens.i18n.json new file mode 100644 index 0000000000000..4884bc2418fc4 --- /dev/null +++ b/i18n/trk/src/vs/editor/common/model/textModelWithTokens.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mode.tokenizationSupportFailed": "Mod, girdiyi belirteçlere ayırırken başarısız oldu." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/modes/modesRegistry.i18n.json b/i18n/trk/src/vs/editor/common/modes/modesRegistry.i18n.json new file mode 100644 index 0000000000000..e559b82874385 --- /dev/null +++ b/i18n/trk/src/vs/editor/common/modes/modesRegistry.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "plainText.alias": "Düz Metin" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/services/bulkEdit.i18n.json b/i18n/trk/src/vs/editor/common/services/bulkEdit.i18n.json new file mode 100644 index 0000000000000..b081029e080ee --- /dev/null +++ b/i18n/trk/src/vs/editor/common/services/bulkEdit.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "conflict": "Bu dosyalar bu arada değiştirildi: {0}", + "summary.0": "Düzenleme yapılmadı", + "summary.nm": "{1} dosyada {0} metin düzenlemesi yapıldı", + "summary.n0": "Bir dosyada {0} metin düzenlemesi yapıldı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/services/modeServiceImpl.i18n.json b/i18n/trk/src/vs/editor/common/services/modeServiceImpl.i18n.json new file mode 100644 index 0000000000000..55d69fef9030f --- /dev/null +++ b/i18n/trk/src/vs/editor/common/services/modeServiceImpl.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.languages": "Dil bildirimlerine ekleme yapar.", + "vscode.extension.contributes.languages.id": "Dilin ID'si.", + "vscode.extension.contributes.languages.aliases": "Dilin takma adları.", + "vscode.extension.contributes.languages.extensions": "Dil ile ilişkili dosya uzantıları.", + "vscode.extension.contributes.languages.filenames": "Dil ile ilişkili dosya adları.", + "vscode.extension.contributes.languages.filenamePatterns": "Dil ile ilişkili dosya adı glob desenleri.", + "vscode.extension.contributes.languages.mimetypes": "Dil ile ilişkili MIME türleri.", + "vscode.extension.contributes.languages.firstLine": "Dilin bir dosyasının ilk satırıyla eşleşen bir düzenli ifade.", + "vscode.extension.contributes.languages.configuration": "Dil için yapılandırma seçenekleri içeren dosyaya, bir göreli yol." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/services/modelServiceImpl.i18n.json b/i18n/trk/src/vs/editor/common/services/modelServiceImpl.i18n.json new file mode 100644 index 0000000000000..a12e01358bbaf --- /dev/null +++ b/i18n/trk/src/vs/editor/common/services/modelServiceImpl.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "diagAndSourceMultiline": "[{0}]\n{1}", + "diagAndSource": "[{0}] {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/common/view/editorColorRegistry.i18n.json b/i18n/trk/src/vs/editor/common/view/editorColorRegistry.i18n.json new file mode 100644 index 0000000000000..e5f9dca329bf8 --- /dev/null +++ b/i18n/trk/src/vs/editor/common/view/editorColorRegistry.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lineHighlight": "İmlecin bulunduğu satırın vurgusunun arka plan rengi.", + "lineHighlightBorderBox": "İmlecin bulunduğu satırın kenarlığının arka plan rengi.", + "rangeHighlight": "Hızlı açma ve bulma özellikleri gibi vurgulanan alanların arka plan rengi.", + "caret": "Düzenleyici imlecinin rengi.", + "editorWhitespaces": "Düzenleyicideki boşluk karakterlerinin rengi.", + "editorIndentGuides": "Düzenleyici girinti kılavuzlarının rengi.", + "editorLineNumbers": "Düzenleyici satır numaralarının rengi.", + "editorRuler": "Düzenleyici cetvellerinin rengi.", + "editorCodeLensForeground": "Düzenleyici kod objektiflerinin ön plan rengi", + "editorBracketMatchBackground": "Eşleşen parantezlerin arka plan rengi", + "editorBracketMatchBorder": "Eşleşen parantez kutularının rengi", + "editorOverviewRulerBorder": "Genel bakış cetvelinin kenarlık rengi.", + "editorGutter": "Düzenleyici oluğunun arka plan rengi. Oluk, glif boşluklarını ve satır numaralarını içerir.", + "errorForeground": "Düzenleyicideki hata karalamalarının ön plan rengi.", + "errorBorder": "Düzenleyicideki hata karalamalarının kenarlık rengi.", + "warningForeground": "Düzenleyicideki uyarı karalamalarının ön plan rengi.", + "warningBorder": "Düzenleyicideki uyarı karalamalarının kenarlık rengi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json b/i18n/trk/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json new file mode 100644 index 0000000000000..3156c395100a0 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/bracketMatching/common/bracketMatching.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.jumpBracket": "Köşeli Ayraca Git" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json b/i18n/trk/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json new file mode 100644 index 0000000000000..c5196837029df --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/caretOperations/common/caretOperations.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "caret.moveLeft": "İmleci Sola Taşı", + "caret.moveRight": "İmleci Sağa Taşı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json b/i18n/trk/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json new file mode 100644 index 0000000000000..5ee978f2342cd --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/caretOperations/common/transpose.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "transposeLetters.label": "Harfleri Birbirleriyle Değiştir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json b/i18n/trk/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json new file mode 100644 index 0000000000000..768e8e3511f0a --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/clipboard/browser/clipboard.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "actions.clipboard.cutLabel": "Kes", + "actions.clipboard.copyLabel": "Kopyala", + "actions.clipboard.pasteLabel": "Yapıştır", + "actions.clipboard.copyWithSyntaxHighlightingLabel": "Sentaks Vurgulaması İle Kopyala" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/comment/common/comment.i18n.json b/i18n/trk/src/vs/editor/contrib/comment/common/comment.i18n.json new file mode 100644 index 0000000000000..30ac850837c3b --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/comment/common/comment.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "comment.line": "Satır Yorumunu Aç/Kapat", + "comment.line.add": "Satır Açıklaması Ekle", + "comment.line.remove": "Satır Açıklamasını Kaldır", + "comment.block": "Yorum Bloğunu Aç/Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json b/i18n/trk/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json new file mode 100644 index 0000000000000..fbed232705270 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/contextmenu/browser/contextmenu.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "action.showContextMenu.label": "Düzenleyici Bağlam Menüsünü Göster" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/find/browser/findWidget.i18n.json b/i18n/trk/src/vs/editor/contrib/find/browser/findWidget.i18n.json new file mode 100644 index 0000000000000..e483c295f1969 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/find/browser/findWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Bul", + "placeholder.find": "Bul", + "label.previousMatchButton": "Önceki eşleşme", + "label.nextMatchButton": "Sonraki eşleşme", + "label.toggleSelectionFind": "Seçimde bul", + "label.closeButton": "Kapat", + "label.replace": "Değiştir", + "placeholder.replace": "Değiştir", + "label.replaceButton": "Değiştir", + "label.replaceAllButton": "Tümünü Değiştir", + "label.toggleReplaceButton": "Değiştirme modunu değiştir", + "title.matchesCountLimit": "Yalnızca ilk 999 sonuç vurgulandı, ancak tüm bulma işlemleri metnin tamamı üzerinde çalışıyor.", + "label.matchesLocation": "{0}/{1}", + "label.noResults": "Sonuç Yok" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/find/common/findController.i18n.json b/i18n/trk/src/vs/editor/contrib/find/common/findController.i18n.json new file mode 100644 index 0000000000000..e9808291987fa --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/find/common/findController.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "startFindAction": "Bul", + "findNextMatchAction": "Sonrakini Bul", + "findPreviousMatchAction": "Öncekini Bul", + "nextSelectionMatchFindAction": "Sonraki Seçimi Bul", + "previousSelectionMatchFindAction": "Önceki Seçimi Bul", + "startReplace": "Değiştir", + "addSelectionToNextFindMatch": "Seçimi Sonraki Bulunan Eşleşmeye Ekle", + "addSelectionToPreviousFindMatch": "Seçimi Önceki Bulunan Eşleşmeye Ekle", + "moveSelectionToNextFindMatch": "Son Seçimi Sonraki Bulunan Eşleşmeye Taşı", + "moveSelectionToPreviousFindMatch": "Son Seçimi Önceki Bulunan Eşleşmeye Taşı", + "changeAll.label": "Tüm Tekrarlamaları Değiştir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/folding/browser/folding.i18n.json b/i18n/trk/src/vs/editor/contrib/folding/browser/folding.i18n.json new file mode 100644 index 0000000000000..084b78eafffc1 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/folding/browser/folding.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unfoldAction.label": "Katlamayı Aç", + "unFoldRecursivelyAction.label": "Katlamaları Özyinelemeli Olarak Aç", + "foldAction.label": "Katla", + "foldRecursivelyAction.label": "Özyinelemeli Olarak Katla", + "foldAllAction.label": "Hepsini Katla", + "unfoldAllAction.label": "Tüm Katlamaları Aç", + "foldLevelAction.label": "{0}. Düzeyi Katla" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/format/browser/formatActions.i18n.json b/i18n/trk/src/vs/editor/contrib/format/browser/formatActions.i18n.json new file mode 100644 index 0000000000000..265248d706c1b --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/format/browser/formatActions.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint11": "{0}. satırda 1 biçimlendirme düzenlemesi yapıldı", + "hintn1": "{1}. satırda {0} biçimlendirme düzenlemesi yapıldı", + "hint1n": "{0} ve {1} satırları arasında 1 biçimlendirme düzenlemesi yapıldı", + "hintnn": "{1} ve {2} satırları arasında {0} biçimlendirme düzenlemesi yapıldı", + "formatDocument.label": "Belgeyi Biçimlendir", + "formatSelection.label": "Seçimi Biçimlendir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json b/i18n/trk/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json new file mode 100644 index 0000000000000..fae99c4c772ab --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationCommands.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultWord": "'{0}' için tanım bulunamadı", + "generic.noResults": "Tanım bulunamadı", + "meta.title": " – {0} tanım", + "actions.goToDecl.label": "Tanıma Git", + "actions.goToDeclToSide.label": "Tanımı Yana Aç", + "actions.previewDecl.label": "Tanıma Göz At", + "goToImplementation.noResultWord": "'{0}' için uygulama bulunamadı", + "goToImplementation.generic.noResults": "Uygulama bulunamadı", + "meta.implementations.title": " – {0} uygulama", + "actions.goToImplementation.label": "Uygulamaya Git", + "actions.peekImplementation.label": "Uygulamaya Göz At", + "goToTypeDefinition.noResultWord": "'{0}' için tür tanımı bulunamadı", + "goToTypeDefinition.generic.noResults": "Tür tanımı bulunamadı", + "meta.typeDefinitions.title": " – {0} tür tanımı", + "actions.goToTypeDefinition.label": "Tür Tanımına Git", + "actions.peekTypeDefinition.label": "Tür Tanımına Göz At" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json b/i18n/trk/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json new file mode 100644 index 0000000000000..010de11a57dae --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/goToDeclaration/browser/goToDeclarationMouse.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "multipleResults": "{0} tanımı göstermek için tıklayın." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json b/i18n/trk/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json new file mode 100644 index 0000000000000..715f05193c2e2 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/gotoError/browser/gotoError.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "title.wo_source": "({0}/{1})", + "markerAction.next.label": "Sonraki Hata veya Uyarıya Git", + "markerAction.previous.label": "Önceki Hata veya Uyarıya Git", + "editorMarkerNavigationError": "Düzenleyicinin işaretçi gezinti aracının hata rengi.", + "editorMarkerNavigationWarning": "Düzenleyicinin işaretçi gezinti aracının uyarı rengi.", + "editorMarkerNavigationBackground": "Düzenleyicinin işaretçi gezinti aracının arka planı." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/hover/browser/hover.i18n.json b/i18n/trk/src/vs/editor/contrib/hover/browser/hover.i18n.json new file mode 100644 index 0000000000000..e1a331227025c --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/hover/browser/hover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showHover": "Bağlantı Vurgusunu Göster" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json b/i18n/trk/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json new file mode 100644 index 0000000000000..1b70c63296f7c --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/hover/browser/modesContentHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "modesContentHover.loading": "Yükleniyor..." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json b/i18n/trk/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json new file mode 100644 index 0000000000000..bb4caacacb194 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/inPlaceReplace/common/inPlaceReplace.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "InPlaceReplaceAction.previous.label": "Önceki Değerle Değiştir", + "InPlaceReplaceAction.next.label": "Sonraki Değerle Değiştir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/indentation/common/indentation.i18n.json b/i18n/trk/src/vs/editor/contrib/indentation/common/indentation.i18n.json new file mode 100644 index 0000000000000..76b8b3c839160 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/indentation/common/indentation.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "indentationToSpaces": "Girintiyi Boşluklara Dönüştür", + "indentationToTabs": "Girintiyi Sekmelere Dönüştür", + "configuredTabSize": "Yapılandırılmış Sekme Boyutu", + "selectTabWidth": "Geçerli Dosya İçin Sekme Boyutunu Seç", + "indentUsingTabs": "Sekme Kullanarak Girintile", + "indentUsingSpaces": "Boşluk Kullanarak Girintile", + "detectIndentation": "Girintiyi, İçeriği Kontrol Ederek Algıla", + "editor.reindentlines": "Satır Girintilerini Yeniden Ayarla" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json b/i18n/trk/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json new file mode 100644 index 0000000000000..4ae7163c50c3a --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/linesOperations/common/linesOperations.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "lines.copyUp": "Satırı Yukarı Kopyala", + "lines.copyDown": "Satırı Aşağı Kopyala", + "lines.moveUp": "Satırı Yukarı Taşı", + "lines.moveDown": "Satırı Aşağı Taşı", + "lines.sortAscending": "Satırları Artan Şekilde Sırala", + "lines.sortDescending": "Satırları Azalan Şekilde Sırala", + "lines.trimTrailingWhitespace": "Sondaki Boşluğu Kırp", + "lines.delete": "Satırı Sil", + "lines.indent": "Satırı Girintile", + "lines.outdent": "Satırın Girintisini Azalt", + "lines.insertBefore": "Üste Satır Ekle", + "lines.insertAfter": "Alta Satır Ekle", + "lines.deleteAllLeft": "Soldaki Her Şeyi Sil", + "lines.deleteAllRight": "Sağdaki Her Şeyi Sil", + "lines.joinLines": "Satırları Birleştir", + "editor.transpose": "İmlecin etrafındaki karakterleri birbirleriyle değiştir", + "editor.transformToUppercase": "Büyük Harfe Dönüştür", + "editor.transformToLowercase": "Küçük Harfe Dönüştür" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/links/browser/links.i18n.json b/i18n/trk/src/vs/editor/contrib/links/browser/links.i18n.json new file mode 100644 index 0000000000000..0d6ac3279c29f --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/links/browser/links.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "links.navigate.mac": "Bağlantıyı izlemek için Cmd tuşuna basarak tıklayın", + "links.navigate": "Bağlantıyı izlemek için Ctrl tuşuna basarak tıklayın", + "links.navigate.al": "Bağlantıyı izlemek için Alt tuşuna basarak tıklayın", + "invalid.url": "Üzgünüz, bu bağlantı iyi oluşturulmamış olduğu için açılamadı: {0}", + "missing.url": "Üzgünüz; bu bağlantı, hedefi eksik olduğu için açılamadı.", + "label": "Bağlantıyı Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json b/i18n/trk/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json new file mode 100644 index 0000000000000..f3fa18b4184dd --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/multicursor/common/multicursor.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mutlicursor.insertAbove": "Yukarıya İmleç Ekle", + "mutlicursor.insertBelow": "Aşağıya İmleç Ekle", + "mutlicursor.insertAtEndOfEachLineSelected": "Satır Sonlarına İmleç Ekle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json b/i18n/trk/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json new file mode 100644 index 0000000000000..b7a4e43b2b61f --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/parameterHints/browser/parameterHints.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parameterHints.trigger.label": "Parametre İpuçlarını Tetikle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json b/i18n/trk/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json new file mode 100644 index 0000000000000..ed56fe64626b7 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/parameterHints/browser/parameterHintsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hint": "{0}, ipucu" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json b/i18n/trk/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json new file mode 100644 index 0000000000000..86586e96e0a7d --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/quickFix/browser/quickFixCommands.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickFixWithKb": "Düzeltmeleri Göster ({0})", + "quickFix": "Düzeltmeleri Göster", + "quickfix.trigger.label": "Hızlı Düzeltme" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json b/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json new file mode 100644 index 0000000000000..9ddf0e9fbe023 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referenceSearch.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "meta.titleReference": "– {0} başvuru", + "references.action.label": "Tüm Başvuruları Bul" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json b/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json new file mode 100644 index 0000000000000..14c77e0d64434 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesController.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "labelLoading": "Yükleniyor..." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json b/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json new file mode 100644 index 0000000000000..a3b4193dbe7c3 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesModel.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "aria.oneReference": "{0} yolunda, {1}. satır {2}. sütundaki sembol", + "aria.fileReferences.1": "{0} içinde 1 sembol, tam yol {1}", + "aria.fileReferences.N": "{1} içinde {0} sembol, tam yol {2}", + "aria.result.0": "Sonuç bulunamadı", + "aria.result.1": "{0} yolunda 1 sembol bulundu", + "aria.result.n1": "{1} yolunda {0} sembol bulundu", + "aria.result.nm": "{1} dosyada {0} sembol bulundu" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json b/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json new file mode 100644 index 0000000000000..6165a40b9f90e --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/referenceSearch/browser/referencesWidget.i18n.json @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "referencesFailre": "Dosya çözümlenemedi.", + "referencesCount": "{0} başvuru", + "referenceCount": "{0} başvuru", + "missingPreviewMessage": "önizleme yok", + "treeAriaLabel": "Başvurular", + "noResults": "Sonuç yok", + "peekView.alternateTitle": "Başvurular", + "peekViewTitleBackground": "Gözetleme görünümü başlık alanının arka plan rengi.", + "peekViewTitleForeground": "Gözetleme görünümü başlığının rengi.", + "peekViewTitleInfoForeground": "Gözetleme görünümü başlık bilgisinin rengi.", + "peekViewBorder": "Gözetleme görünümü kenarlıkları ve ok işaretinin rengi.", + "peekViewResultsBackground": "Gözetleme görünümü sonuç listesinin arka plan rengi.", + "peekViewResultsMatchForeground": "Gözetleme görünümü sonuç listesindeki satır düğümlerinin ön plan rengi.", + "peekViewResultsFileForeground": "Gözetleme görünümü sonuç listesindeki dosya düğümlerinin ön plan rengi.", + "peekViewResultsSelectionBackground": "Gözetleme görünümü sonuç listesindeki seçilen girdinin arka plan rengi.", + "peekViewResultsSelectionForeground": "Gözetleme görünümü sonuç listesindeki seçilen girdinin ön plan rengi.", + "peekViewEditorBackground": "Gözetleme görünümü düzenleyicisinin arka plan rengi.", + "peekViewEditorGutterBackground": "Gözetleme görünümü düzenleyicisindeki oluğun arka plan rengi.", + "peekViewResultsMatchHighlight": "Gözetleme görünümü sonuç listesindeki eşleşme vurgusu rengi.", + "peekViewEditorMatchHighlight": "Gözetleme görünümü düzenleyicisindeki eşleşme vurgusu rengi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/rename/browser/rename.i18n.json b/i18n/trk/src/vs/editor/contrib/rename/browser/rename.i18n.json new file mode 100644 index 0000000000000..4440b96d71b56 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/rename/browser/rename.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "no result": "Sonuç yok.", + "aria": "'{0}', '{1}' olarak başarıyla yeniden adlandırıldı. Özet: {2}", + "rename.failed": "Üzgünüz, yeniden adlandırma işlemi başarısız oldu.", + "rename.label": "Sembolü Yeniden Adlandır" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json b/i18n/trk/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json new file mode 100644 index 0000000000000..eea4501c3d801 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/rename/browser/renameInputField.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "renameAriaLabel": "Girdiyi yeniden adlandır. Yeni adı girin ve işlemek için Enter'a basın." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json b/i18n/trk/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json new file mode 100644 index 0000000000000..b63d95ca27146 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/smartSelect/common/smartSelect.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "smartSelect.grow": "Seçimi Genişlet", + "smartSelect.shrink": "Seçimi Daralt" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json b/i18n/trk/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json new file mode 100644 index 0000000000000..d6c0cfacacb93 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/suggest/browser/suggestController.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "arai.alert.snippet": "'{0}' kabul edildiği için şu metin eklendi: {1}", + "suggest.trigger.label": "Öneriyi Tetikle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json b/i18n/trk/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json new file mode 100644 index 0000000000000..657260a00490d --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/suggest/browser/suggestWidget.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorSuggestWidgetBackground": "Öneri aracının arka plan rengi.", + "editorSuggestWidgetBorder": "Öneri aracının kenarlık rengi.", + "editorSuggestWidgetForeground": "Öneri aracının ön plan rengi.", + "editorSuggestWidgetSelectedBackground": "Öneri aracındaki seçilen girdinin arka plan rengi.", + "editorSuggestWidgetHighlightForeground": "Öneri aracındaki eşleşme vurgularının rengi.", + "readMore": "Devamını Oku...{0}", + "suggestionWithDetailsAriaLabel": "{0}, öneri, detaylı", + "suggestionAriaLabel": "{0}, öneri", + "readLess": "Daha azını oku...{0}", + "suggestWidget.loading": "Yükleniyor...", + "suggestWidget.noSuggestions": "Öneri yok.", + "suggestionAriaAccepted": "{0}, kabul edildi", + "ariaCurrentSuggestionWithDetails": "{0}, öneri, detaylı", + "ariaCurrentSuggestion": "{0}, öneri" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json b/i18n/trk/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json new file mode 100644 index 0000000000000..720f500431fd3 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/toggleTabFocusMode/common/toggleTabFocusMode.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.tabMovesFocus": "Tab Tuşu İle Odak Değiştirmeyi Aç/Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json b/i18n/trk/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json new file mode 100644 index 0000000000000..25e86b185b818 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/wordHighlighter/common/wordHighlighter.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordHighlight": "Bir değişkeni okumak gibi, okuma-erişimi sırasındaki bir sembolün arka plan rengi.", + "wordHighlightStrong": "Bir değişkene yazmak gibi, yazma-erişimi sırasındaki bir sembolün arka plan rengi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json b/i18n/trk/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json new file mode 100644 index 0000000000000..8a312782515d9 --- /dev/null +++ b/i18n/trk/src/vs/editor/contrib/zoneWidget/browser/peekViewWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.close": "Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json b/i18n/trk/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json new file mode 100644 index 0000000000000..cd8f883eda733 --- /dev/null +++ b/i18n/trk/src/vs/editor/electron-browser/textMate/TMSyntax.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.language": "`contributes.{0}.language` ögesinde bilinmeyen dil. Sağlanan değer: {1}", + "invalid.scopeName": "`contributes.{0}.scopeName` ögesinde dize bekleniyor. Sağlanan değer: {1}", + "invalid.path.0": "`contributes.{0}.path` ögesinde dize bekleniyor. Sağlanan değer: {1}", + "invalid.injectTo": "`contributes.{0}.injectTo` ögesinde geçersiz değer. Dil kapsam adlarından oluşan bir dizi olmalıdır. Sağlanan değer: {1}", + "invalid.embeddedLanguages": "`contributes.{0}.embeddedLanguages` ögesinde geçersiz değer. Kapsam adından dile kadar olan bir nesne haritası olmalıdır. Sağlanan değer: {1}", + "invalid.path.1": "`contributes.{0}.path` ögesinin ({1}) eklentinin klasöründe ({2}) yer alması bekleniyor. Bu, eklentiyi taşınamaz yapabilir.", + "no-tm-grammar": "Bu dil için kayıtlı bir TM Grameri yok." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json b/i18n/trk/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..270182c4a478e --- /dev/null +++ b/i18n/trk/src/vs/editor/node/languageConfigurationExtensionPoint.i18n.json @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "parseErrors": "{0} için ayrıştırma hataları: {1}", + "schema.openBracket": "Açılış ayracı karakteri veya dize sırası.", + "schema.closeBracket": "Kapanış ayracı karakteri veya dize sırası.", + "schema.comments": "Yorum sembollerini tanımlar.", + "schema.blockComments": "Blok açıklamalarının nasıl işaretlendiğini tanımlar.", + "schema.blockComment.begin": "Blok açıklamasını başlatan karakter dizisi.", + "schema.blockComment.end": "Blok açıklamasını bitiren karakter dizisi.", + "schema.lineComment": "Satır açıklamasını başlatan karakter dizisi.", + "schema.brackets": "Girintiyi artıran veya azaltan ayraç sembollerini tanımlar.", + "schema.autoClosingPairs": "Ayraç çiftlerini tanımlar. Bir açılış ayracı girildiğinde, kapanış ayracı otomatik olarak eklenir.", + "schema.autoClosingPairs.notIn": "Otomatik çiftlerin devre dışı bırakıldığı bir kapsamlar listesi tanımlar.", + "schema.surroundingPairs": "Seçili bir dizeyi çevrelemek için kullanılabilecek ayraç çiftlerini tanımlar.", + "schema.wordPattern": "Dilin kelime tanımı.", + "schema.wordPattern.pattern": "Sözcükleri eşleştirmek için kullanılacak Düzenli İfade.", + "schema.wordPattern.flags": "Sözcükleri eşleştirmek için kullanılacak Düzenli İfade işaretleri.", + "schema.wordPattern.flags.errorMessage": "`/^([gimuy]+)$/` kalıbı ile eşleşmelidir." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/editor/node/textMate/TMGrammars.i18n.json b/i18n/trk/src/vs/editor/node/textMate/TMGrammars.i18n.json new file mode 100644 index 0000000000000..60439bb3b955c --- /dev/null +++ b/i18n/trk/src/vs/editor/node/textMate/TMGrammars.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.grammars": "textmate tokenizerlere ekleme yapar.", + "vscode.extension.contributes.grammars.language": "Bu söz diziminin ekleneceği dil tanımlayıcısı.", + "vscode.extension.contributes.grammars.scopeName": "tmLanguage dosyası tarafından kullanılan Textmate kapsam adı.", + "vscode.extension.contributes.grammars.path": "tmLanguage dosyasının yolu. Yol, eklenti klasörüne görecelidir ve genellikle './syntaxes/' ile başlar.", + "vscode.extension.contributes.grammars.embeddedLanguages": "Bu dil bilgisinin gömülü dilleri içermesi durumundaki bir dil kimliğinin kapsam adı haritası.", + "vscode.extension.contributes.grammars.injectTo": "Bu dil bilgisinin yerleştirileceği dil kapsam adları listesi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/actions/browser/menuItemActionItem.i18n.json b/i18n/trk/src/vs/platform/actions/browser/menuItemActionItem.i18n.json new file mode 100644 index 0000000000000..e64a7d0ed09f0 --- /dev/null +++ b/i18n/trk/src/vs/platform/actions/browser/menuItemActionItem.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "titleAndKb": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json b/i18n/trk/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json new file mode 100644 index 0000000000000..1fc7a73569018 --- /dev/null +++ b/i18n/trk/src/vs/platform/actions/electron-browser/menusExtensionPoint.i18n.json @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "menü ögeleri bir dizi olmalıdır", + "requirestring": "`{0}` özelliği zorunludur ve `string` türünde olmalıdır", + "optstring": "`{0}` özelliği atlanabilir veya `string` türünde olmalıdır", + "vscode.extension.contributes.menuItem.command": "Yürütülecek komutun tanımlayıcısı. Komut 'commands' bölümünde tanımlanmalıdır", + "vscode.extension.contributes.menuItem.alt": "Yürütülecek alternatif bir komutun tanımlayıcısı. Komut 'commands' bölümünde tanımlanmalıdır", + "vscode.extension.contributes.menuItem.when": "Bu ögeyi göstermek için doğru olması gereken koşul", + "vscode.extension.contributes.menuItem.group": "Bu komutun ait olduğu gruba ekle", + "vscode.extension.contributes.menus": "Düzenleyiciye menü ögeleri ekler", + "menus.commandPalette": "Komut Paleti", + "menus.editorTitle": "Düzenleyici başlık menüsü", + "menus.editorContext": "Düzenleyici bağlam menüsü", + "menus.explorerContext": "Dosya gezgini bağlam menüsü", + "menus.editorTabContext": "Düzenleyici sekmeleri bağlam menüsü", + "menus.debugCallstackContext": "Hata ayıklama çağrı yığını bağlam menüsü", + "menus.scmTitle": "Kaynak Denetimi başlık menüsü", + "menus.resourceGroupContext": "Kaynak Denetimi kaynak grubu bağlam menüsü", + "menus.resourceStateContext": "Kaynak Denetimi kaynak durumu bağlam menüsü", + "view.viewTitle": "Katkıda bulunan görünümü başlık menüsü", + "view.itemContext": "Katkıda bulunan görünümü öge bağlam menüsü", + "nonempty": "boş olmayan değer beklendi.", + "opticon": "`icon` özelliği atlanabilir veya bir dize ya da `{dark, light}` gibi bir değişmez değer olmalıdır", + "requireStringOrObject": "`{0}` özelliği zorunludur ve `string` veya `object` türünde olmalıdır", + "requirestrings": "`{0}` ve `{1}` özellikleri zorunludur ve `string` türünde olmalıdır", + "vscode.extension.contributes.commandType.command": "Yürütülecek komutun tanımlayıcısı", + "vscode.extension.contributes.commandType.title": "Komutu kullanıcı arayüzünde temsil edecek başlık", + "vscode.extension.contributes.commandType.category": "(İsteğe Bağlı) Kullanıcı arayüzünde komutun gruplanacağı kategori dizesi", + "vscode.extension.contributes.commandType.icon": "(İsteğe Bağlı) Komutun, Kullanıcı Arayüzü'nde temsil edilmesinde kullanılacak simge. Bir dosya yolu veya tema olarak kullanılabilir bir yapılandırmadır", + "vscode.extension.contributes.commandType.icon.light": "Açık bir tema kullanıldığındaki simge yolu", + "vscode.extension.contributes.commandType.icon.dark": "Koyu bir tema kullanıldığındaki simge yolu", + "vscode.extension.contributes.commands": "Komut paletine komutlar ekler.", + "dup": "`{0}` komutu `commands` bölümünde birden çok kez görünüyor.", + "menuId.invalid": "`{0}` geçerli bir menü tanımlayıcısı değil", + "missing.command": "Menü ögesi, 'commands' bölümünde tanımlanmamış bir `{0}` komutuna başvuruyor.", + "missing.altCommand": "Menü ögesi, 'commands' bölümünde tanımlanmamış bir `{0}` alternatif komutuna başvuruyor.", + "dupe.command": "Menü ögesi, aynı varsayılan ve alternatif komutlarına başvuruyor", + "nosupport.altCommand": "Üzgünüz, fakat sadece 'editor/title' menüsünün 'navigation' grubu alternatif komutları destekliyor" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/configuration/common/configurationRegistry.i18n.json b/i18n/trk/src/vs/platform/configuration/common/configurationRegistry.i18n.json new file mode 100644 index 0000000000000..314a88ccc90da --- /dev/null +++ b/i18n/trk/src/vs/platform/configuration/common/configurationRegistry.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultConfigurations.title": "Varsayılan Yapılandırma Geçersiz Kılmaları", + "overrideSettings.description": "{0} dili için geçersiz kılınacak düzenleyici ayarlarını yapılandırın.", + "overrideSettings.defaultDescription": "Bir dil için geçersiz kılınacak düzenleyici ayarlarını yapılandırın.", + "vscode.extension.contributes.configuration": "Yapılandırma ayarlarına ekleme yapar.", + "vscode.extension.contributes.configuration.title": "Ayarların bir özeti. Bu etiket ayar dosyasında ayırıcı yorum olarak kullanılacaktır.", + "vscode.extension.contributes.configuration.properties": "Yapılandırma özelliklerinin açıklaması.", + "config.property.languageDefault": "'{0}' kaydedilemiyor. Bu, dile özgü düzenleyici ayarlarını tanımlamak için '\\\\[.*\\\\]$' özellik kalıbı ile eşleşir. 'configurationDefaults' ögesini kullanın.", + "config.property.duplicate": "'{0}' kaydedilemiyor. Bu özellik zaten kayıtlı.", + "invalid.properties": "'configuration.properties' bir nesne olmalıdır", + "invalid.type": "eğer ayarlanırsa, 'configuration.type' ögesi 'object' olarak ayarlanmalıdır", + "invalid.title": "'configuration.title' bir dize olmalıdır", + "vscode.extension.contributes.defaultConfiguration": "Varsayılan düzenleyici yapılandırma ayarlarına dil bazında ekleme yapar." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/environment/node/argv.i18n.json b/i18n/trk/src/vs/platform/environment/node/argv.i18n.json new file mode 100644 index 0000000000000..f3d197dfba2c1 --- /dev/null +++ b/i18n/trk/src/vs/platform/environment/node/argv.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoValidation": "`--goto` modundaki argümanlar `FILE(:LINE(:CHARACTER))` biçiminde olmalıdır.", + "diff": "Bir karşılaştırma düzenleyicisi aç. İki dosya yolu argüman olarak iletilmelidir.", + "goto": "Yoldaki dosyayı satırda ve sütunda aç (yola :line[:character] ekleyin).", + "locale": "Kullanılacak yerel dil (örnek: en-US veya zh-TW).", + "newWindow": "Yeni bir Code örneğini zorla.", + "performance": "'Geliştirici: Başlangıç Performansı' komutu etkinleştirilmiş olarak başlat.", + "prof-startup": "Başlangıç sırasında CPU profil oluşturucusunu çalıştır", + "reuseWindow": "Bir dosya veya klasörü son etkin pencerede açmaya zorlayın.", + "userDataDir": "Kullanıcı verilerinin tutulacağı klasörü belirtir, root olarak çalışırken yararlıdır.", + "verbose": "Ayrıntılı çıktı oluştur (--wait anlamına gelir).", + "wait": "Geri dönmeden önce pencerenin kapanmasını bekle.", + "extensionHomePath": "Eklentilerin kök dizinini belirle.", + "listExtensions": "Yüklü eklentileri listele.", + "showVersions": "--list-extensions'u kullanırken, yüklü eklentilerin sürümlerini gösterir.", + "installExtension": "Bir eklenti yükler.", + "uninstallExtension": "Bir eklentiyi kaldırır.", + "experimentalApis": "Bir eklenti için önerilen API özelliklerini etkinleştirir.", + "disableExtensions": "Yüklü tüm eklentileri devre dışı bırak.", + "disableGPU": "GPU donanım hızlandırmasını devre dışı bırak.", + "version": "Sürümü göster.", + "help": "Kullanımı göster.", + "usage": "Kullanım", + "options": "seçenekler", + "paths": "yollar", + "optionsUpperCase": "Seçenekler" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json b/i18n/trk/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json new file mode 100644 index 0000000000000..a616c58befac8 --- /dev/null +++ b/i18n/trk/src/vs/platform/extensionManagement/common/extensionEnablementService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noWorkspace": "Çalışma alanı yok." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json b/i18n/trk/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json new file mode 100644 index 0000000000000..b894836196dec --- /dev/null +++ b/i18n/trk/src/vs/platform/extensionManagement/common/extensionManagement.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensions": "Eklentiler", + "preferences": "Tercihler" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json b/i18n/trk/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json new file mode 100644 index 0000000000000..e335acfc388f2 --- /dev/null +++ b/i18n/trk/src/vs/platform/extensionManagement/node/extensionGalleryService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notFound": "Eklenti bulunamadı", + "noCompatible": "{0} eklentisinin Code'un bu sürümüyle uyumlu bir sürümü bulunamadı." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json b/i18n/trk/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json new file mode 100644 index 0000000000000..46113aaf483da --- /dev/null +++ b/i18n/trk/src/vs/platform/extensionManagement/node/extensionManagementService.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalidManifest": "Eklenti geçersiz: package.json bir JSON dosyası değil.", + "restartCode": "{0} eklentisini yeniden yüklemeden önce lütfen Code'u yeniden başlatın.", + "installDependeciesConfirmation": "'{0}' eklentisini yüklediğinizde onun bağımlılıkları da yüklenir. Devam etmek istiyor musunuz?", + "install": "Evet", + "doNotInstall": "Hayır", + "uninstallDependeciesConfirmation": "Yalnızca '{0}' eklentisini mi yoksa bağımlılıklarını da kaldırmak ister misiniz?", + "uninstallOnly": "Sadece Eklenti", + "uninstallAll": "Tümü", + "cancel": "İptal", + "uninstallConfirmation": "'{0}' eklentisini kaldırmak istediğinizden emin misiniz?", + "ok": "Tamam", + "singleDependentError": "'{0}' eklentisi kaldırılamıyor. '{1}' eklentisi buna bağlı.", + "twoDependentsError": "'{0}' eklentisi kaldırılamıyor. '{1}' ve '{2}' eklentileri buna bağlı.", + "multipleDependentsError": "'{0}' eklentisi kaldırılamıyor. '{1}, '{2}' eklentileri ve diğerleri buna bağlı.", + "notExists": "Eklenti bulunamadı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/extensions/common/abstractExtensionService.i18n.json b/i18n/trk/src/vs/platform/extensions/common/abstractExtensionService.i18n.json new file mode 100644 index 0000000000000..f48bbd6079549 --- /dev/null +++ b/i18n/trk/src/vs/platform/extensions/common/abstractExtensionService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownDep": "`{1}` eklentisi etkinleştirilemedi. Neden: bilinmeyen bağımlılık `{0}`.", + "failedDep1": "`{1}` eklentisi etkinleştirilemedi. Neden: bağımlılık `{0}` etkinleştirilemedi.", + "failedDep2": "`{0}` eklentisi etkinleştirilemedi. Neden: 10'dan fazla bağımlılık düzeyi (büyük olasılıkla bağımlılık döngüsü).", + "activationError": "`{0}` eklentisi etkinleştirilemedi: {1}." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/extensions/common/extensionsRegistry.i18n.json b/i18n/trk/src/vs/platform/extensions/common/extensionsRegistry.i18n.json new file mode 100644 index 0000000000000..64e1ebd91a4a8 --- /dev/null +++ b/i18n/trk/src/vs/platform/extensions/common/extensionsRegistry.i18n.json @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.engines.vscode": "Eklentinin uyumlu olduğu VS Code sürümünü belirten VS Code eklentileri için. * olamaz. Örneğin: ^0.10.5 uyumlu olduğu minimum VS Code sürümünün 0.10.5 olduğunu gösterir.", + "vscode.extension.publisher": "VS Code eklentisinin yayıncısı.", + "vscode.extension.displayName": "VS Code galerisinde kullanılan eklentinin görünen adı.", + "vscode.extension.categories": "Bu eklentiyi kategorize etmek için VS Code galerisi tarafından kullanılan kategoriler.", + "vscode.extension.galleryBanner": "VS Code markette kullanılan afiş.", + "vscode.extension.galleryBanner.color": "VS Code marketteki sayfa başlığındaki afiş rengi.", + "vscode.extension.galleryBanner.theme": "Afişte kullanılan yazı tipi için renk teması.", + "vscode.extension.contributes": "Bu paketin temsil ettiği VS Code eklentisinin tüm katkıları.", + "vscode.extension.preview": "Markette eklentinin Önizleme olarak işaretlenmesini sağlar.", + "vscode.extension.activationEvents": "VS Code eklentisi için etkinleştirme olayları.", + "vscode.extension.activationEvents.onLanguage": "Belirtilen dilde çözümlenen bir dosya her açıldığında bir etkinleştirme olayı yayınlanır.", + "vscode.extension.activationEvents.onCommand": "Belirtilen komut her çağrıldığında bir etkinleştirme olayı yayınlanır.", + "vscode.extension.activationEvents.onDebug": "Belirtilen türde bir hata ayıklama oturumu her başladığında bir etkinleştirme olayı yayınlanır.", + "vscode.extension.activationEvents.workspaceContains": "Belirtilen glob deseni ile eşleşen en az bir dosya içeren bir klasör her açıldığında bir etkinleştirme olayı yayınlanır.", + "vscode.extension.activationEvents.onView": "Belirtilen görünüm her genişletildiğinde bir etkinleştirme olayı yayınlanır.", + "vscode.extension.activationEvents.star": "VS Code başlatıldığında yayılan etkinleştirme olayı. Mükemmel bir son kullanıcı deneyimi sağlandığından emin olmak için, lütfen bu etkinleştirme olayını eklentinizde sadece kullanım durumunuzda başka hiçbir aktivasyon olayı kombinasyonu çalışmıyorsa kullanın.", + "vscode.extension.badges": "Marketin eklenti sayfasının kenar çubuğunda görüntülenecek göstergeler dizisi.", + "vscode.extension.badges.url": "Gösterge görüntüsü URL'si.", + "vscode.extension.badges.href": "Gösterge bağlantısı.", + "vscode.extension.badges.description": "Gösterge açıklaması.", + "vscode.extension.extensionDependencies": "Diğer uzantılara bağımlılıklar. Bir uzantının tanımlayıcısı her zaman ${publisher}.${name} biçimindedir. Örneğin: vscode.csharp.", + "vscode.extension.scripts.prepublish": "Paket, bir VS Code eklentisi olarak yayımlamadan önce çalıştırılacak betik.", + "vscode.extension.icon": "128x128 piksellik bir simgenin yolu." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/extensions/node/extensionValidator.i18n.json b/i18n/trk/src/vs/platform/extensions/node/extensionValidator.i18n.json new file mode 100644 index 0000000000000..1b6d6ecbb85b0 --- /dev/null +++ b/i18n/trk/src/vs/platform/extensions/node/extensionValidator.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "versionSyntax": "`engines.vscode` değeri {0} ayrıştırılamadı. Lütfen örnekte verilenlere benzer ifadeler kullanın: ^0.10.0, ^1.2.3, ^0.11.0, ^0.10.x, vb.", + "versionSpecificity1": "`engines.vscode`da belirtilen sürüm ({0}) yeterince belirli değil. vscode 1.0.0'dan önceki sürümler için, lütfen istenecek minimum majör ve minör sürüm numarasını tanımlayın. Örneğin: ^0.10.0, 0.10.x, 0.11.0, vb.", + "versionSpecificity2": "`engines.vscode`da belirtilen sürüm ({0}) yeterince belirli değil. vscode 1.0.0'dan sonraki sürümler için, lütfen istenecek minimum majör sürüm numarasını tanımlayın. Örneğin: ^1.10.0, 1.10.x, 1.x.x, 2.x.x, vb.", + "versionMismatch": "Eklenti, Code {0} ile uyumlu değil. Gereken sürüm: {1}.", + "extensionDescription.empty": "Boş eklenti açıklaması alındı", + "extensionDescription.publisher": "`{0}` özelliği zorunludur ve `string` türünde olmalıdır", + "extensionDescription.name": "`{0}` özelliği zorunludur ve `string` türünde olmalıdır", + "extensionDescription.version": "`{0}` özelliği zorunludur ve `string` türünde olmalıdır", + "extensionDescription.engines": "`{0}` özelliği zorunludur ve `object` türünde olmalıdır", + "extensionDescription.engines.vscode": "`{0}` özelliği zorunludur ve `string` türünde olmalıdır", + "extensionDescription.extensionDependencies": "`{0}` özelliği atlanabilir veya `string[]` türünde olmalıdır", + "extensionDescription.activationEvents1": "`{0}` özelliği atlanabilir veya `string[]` türünde olmalıdır", + "extensionDescription.activationEvents2": "`{0}` ve `{1}` özelliklerinin ikisi birden belirtilmeli veya ikisi birden atlanmalıdır", + "extensionDescription.main1": "`{0}` özelliği atlanabilir veya `string` türünde olmalıdır", + "extensionDescription.main2": "`main` ({0}) yolunun eklentinin klasörü içine ({1}) eklenmiş olacağı beklendi. Bu, eklentiyi taşınamaz yapabilir.", + "extensionDescription.main3": "`{0}` ve `{1}` özelliklerinin ikisi birden belirtilmeli veya ikisi birden atlanmalıdır", + "notSemver": "Eklenti sürümü semver ile uyumlu değil." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/history/electron-main/historyMainService.i18n.json b/i18n/trk/src/vs/platform/history/electron-main/historyMainService.i18n.json new file mode 100644 index 0000000000000..9e486dd5b431d --- /dev/null +++ b/i18n/trk/src/vs/platform/history/electron-main/historyMainService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "newWindow": "Yeni Pencere", + "newWindowDesc": "Yeni bir pencere açar", + "recentFolders": "Son Kullanılan Klasörler", + "folderDesc": "{0} {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json b/i18n/trk/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json new file mode 100644 index 0000000000000..8d0fe38437997 --- /dev/null +++ b/i18n/trk/src/vs/platform/integrity/node/integrityServiceImpl.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "integrity.ok": "Tamam", + "integrity.dontShowAgain": "Tekrar gösterme", + "integrity.moreInfo": "Daha fazla bilgi", + "integrity.prompt": "{0} kurulumunuz bozuk görünüyor. Lütfen yeniden yükleyin." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json b/i18n/trk/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json new file mode 100644 index 0000000000000..8a050918f96ef --- /dev/null +++ b/i18n/trk/src/vs/platform/jsonschemas/common/jsonValidationExtensionPoint.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "contributes.jsonValidation": "json şema yapılandırmasına ekleme yapar.", + "contributes.jsonValidation.fileMatch": "Eşleşecek dosya örüntüsü, örneğin \"package.json\" veya \"*.launch\".", + "contributes.jsonValidation.url": "Bir şema URL'si ('http:', 'https:') veya eklenti klasörüne ('./') göreceli yol.", + "invalid.jsonValidation": "'configuration.jsonValidation' bir dizi olmalıdır", + "invalid.fileMatch": "'configuration.jsonValidation.fileMatch' tanımlanmalıdır", + "invalid.url": "'configuration.jsonValidation.url' bir URL veya göreli yol olmalıdır", + "invalid.url.fileschema": "'configuration.jsonValidation.url' geçersiz bir göreli URL'dir: {0}", + "invalid.url.schema": "'configuration.jsonValidation.url' ögesi eklentide bulunan şemalara başvurmak için 'http:', 'https:' veya './' ile başlamalıdır" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json b/i18n/trk/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json new file mode 100644 index 0000000000000..3993824999c6d --- /dev/null +++ b/i18n/trk/src/vs/platform/keybinding/common/abstractKeybindingService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "first.chord": "({0}) öğesine basıldı. Akorun ikinci tuşu bekleniyor...", + "missing.chord": "({0}, {1}) tuş bileşimi bir komut değil." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/markers/common/problemMatcher.i18n.json b/i18n/trk/src/vs/platform/markers/common/problemMatcher.i18n.json new file mode 100644 index 0000000000000..cce6c021fdc34 --- /dev/null +++ b/i18n/trk/src/vs/platform/markers/common/problemMatcher.i18n.json @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ProblemPatternParser.loopProperty.notLast": "Döngü özelliği yalnızca son satır eşleştiricisinde desteklenir.", + "ProblemPatternParser.problemPattern.missingRegExp": "Sorun modelinde bir düzenli ifade eksik.", + "ProblemPatternParser.problemPattern.missingProperty": "Sorun modeli hatalı. En az bir dosya, mesaj ve satır veya konum eşleşme grubu bulundurmalıdır.", + "ProblemPatternParser.invalidRegexp": "Hata: Dize {0}, geçerli bir düzenli ifade değil.\n", + "ProblemPatternSchema.regexp": "Çıktıda bir hata, uyarı veya bilgi bulan düzenli ifade.", + "ProblemPatternSchema.file": "Dosya adının eşleştirme grubu indeksi. Atlanırsa 1 kullanılır.", + "ProblemPatternSchema.location": "Sorunun bulunduğu yerin eşleşme grubu indeksi. Geçerli konum örüntüleri şunlardır: (line), (line,column) ve (startLine,startColumn,endLine,endColumn). Atlanmışsa (line,column) varsayılır.", + "ProblemPatternSchema.line": "Sorunun satırının eşleştirme grubu indeksi. Varsayılan değeri 2'dir", + "ProblemPatternSchema.column": "Sorunun satır karakterinin eşleştirme grubu indeksi. Varsayılan değeri 3'tür", + "ProblemPatternSchema.endLine": "Sorunun satır sonunun eşleştirme grubu indeksi. Varsayılan değeri tanımsızdır", + "ProblemPatternSchema.endColumn": "Sorunun satır sonu karakterinin eşleştirme grubu indeksi. Varsayılan değeri tanımsızdır", + "ProblemPatternSchema.severity": "Sorunun öneminin eşleştirme grubu indeksi. Varsayılan değeri tanımsızdır", + "ProblemPatternSchema.code": "Sorunun kodunun eşleştirme grubu indeksi. Varsayılan değeri tanımsızdır", + "ProblemPatternSchema.message": "Mesajın eşleştirme grubu indeksi. Atlanırsa konum belirtildiğinde varsayılan olarak 4 kullanılır. Aksi taktirde varsayılan olarak 5 kullanılır.", + "ProblemPatternSchema.loop": "Birden çok satırlı eşleşmede döngü, bu kalıbın eşleştiği sürece bir döngüde yürütülüp yürütülmeyeceğini gösterir. Yalnızca birden çok satırlı bir kalıbın son kalıbında belirtilebilir.", + "NamedProblemPatternSchema.name": "Sorun modelinin adı.", + "NamedMultiLineProblemPatternSchema.name": "Birden çok satırlı sorun modelinin adı.", + "NamedMultiLineProblemPatternSchema.patterns": "Gerçek modeller.", + "ProblemPatternExtPoint": "Sorun modellerine ekleme yapar", + "ProblemPatternRegistry.error": "Geçersiz sorun modeli. Model yok sayılacaktır.", + "ProblemMatcherParser.noProblemMatcher": "Hata: açıklama bir sorun eşleştiricisine dönüştürülemez:\n{0}\n", + "ProblemMatcherParser.noProblemPattern": "Hata: açıklama geçerli bir sorun modeli tanımlamıyor:\n{0}\n", + "ProblemMatcherParser.noOwner": "Hata: açıklama bir sahip tanımlamıyor:\n{0}\n", + "ProblemMatcherParser.noFileLocation": "Hata: açıklama bir dosya yolu tanımlamıyor:\n{0}\n", + "ProblemMatcherParser.unknownSeverity": "Bilgi: bilinmeyen önem derecesi {0}. Geçerli değerler: error, warning ve info.\n", + "ProblemMatcherParser.noDefinedPatter": "Hata: tanımlayıcısı {0} olan model mevcut değil.", + "ProblemMatcherParser.noIdentifier": "Hata: model özelliği boş bir tanımlayıcıya karşılık geliyor.", + "ProblemMatcherParser.noValidIdentifier": "Hata: model özelliği {0} geçerli bir model değişkeni adı değil.", + "ProblemMatcherParser.problemPattern.watchingMatcher": "Bir sorun eşleştiricisi izlenecek bir başlangıç örüntüsü ve bir bitiş örüntüsü tanımlamalıdır.", + "ProblemMatcherParser.invalidRegexp": "Hata: Dize {0}, geçerli bir düzenli ifade değil.\n", + "WatchingPatternSchema.regexp": "Bir arka plan görevinin başlangıcını ve sonunu tespit edecek düzenli ifade.", + "WatchingPatternSchema.file": "Dosya adının eşleştirme grubu indeksi. Atlanabilir.", + "PatternTypeSchema.name": "Katkıda bulunulan veya ön tanımlı modelin adı", + "PatternTypeSchema.description": "Bir sorun modeli veya bir katkıda bulunulan veya ön tanımlı sorun modelinin adı. Temel model belirtildiyse atlanabilir.", + "ProblemMatcherSchema.base": "Kullanılacak temel sorun eşleştiricisinin adı.", + "ProblemMatcherSchema.owner": "Code'un içindeki sorunun sahibi. Temel model belirtildiyse atlanabilir. Atlanırsa ve temel belirtilmemişse 'external' varsayılır.", + "ProblemMatcherSchema.severity": "Sorun yakalamanın varsayılan önem derecesi. Model, önem derecesi için bir eşleme grubu tanımlamazsa kullanılır.", + "ProblemMatcherSchema.applyTo": "Bir metin belgesinde bildirilen bir sorunun sadece açık, kapalı veya tüm belgelere uygulanıp uygulanmadığını denetler.", + "ProblemMatcherSchema.fileLocation": "Bir sorun modelinde bildirilen dosya adlarının nasıl yorumlanacağını tanımlar.", + "ProblemMatcherSchema.background": "Bir arka plan görevinde aktif bir eşleştiricinin başlangıcını ve sonunu izlemek için kullanılan kalıplar.", + "ProblemMatcherSchema.background.activeOnStart": "\"true\" olarak ayarlanırsa, görev başladığında arka plan izleyicisi etkin modda olur. Bu, beginsPattern ile başlayan bir satırın verilmesi demektir", + "ProblemMatcherSchema.background.beginsPattern": "Çıktıda eşleşmesi halinde, arka plan görevinin başlatılması sinyali verilir.", + "ProblemMatcherSchema.background.endsPattern": "Çıktıda eşleşmesi halinde, arka plan görevinin sonu sinyali verilir.", + "ProblemMatcherSchema.watching.deprecated": "İzleme özelliği kullanım dışıdır. Onun yerine arka planı kullanın.", + "ProblemMatcherSchema.watching": "Bir izleme eşleştiricisinin başlangıcını ve sonunu izlemek için kullanılan kalıplar.", + "ProblemMatcherSchema.watching.activeOnStart": "\"true\" olarak ayarlanırsa, görev başladığında izleyici etkin modda olur. Bu, beginsPattern ile başlayan bir satırın verilmesi demektir", + "ProblemMatcherSchema.watching.beginsPattern": "Çıktıda eşleşmesi halinde, izleme görevinin başlatılması sinyali verilir.", + "ProblemMatcherSchema.watching.endsPattern": "Çıktıda eşleşmesi halinde, izleme görevinin sonu sinyali verilir.", + "LegacyProblemMatcherSchema.watchedBegin.deprecated": "Bu özellik kullanım dışıdır. Bunun yerine 'watching' özelliğini kullanın.", + "LegacyProblemMatcherSchema.watchedBegin": "İzlenen görevlerin yürütülmeye başlanmasının, dosya izleyerek tetiklendiğini işaret eden bir düzenli ifade.", + "LegacyProblemMatcherSchema.watchedEnd.deprecated": "Bu özellik kullanım dışıdır. Bunun yerine 'watching' özelliğini kullanın.", + "LegacyProblemMatcherSchema.watchedEnd": "İzlenen görevlerin yürütülmesinin sona erdiğini işaret eden bir düzenli ifade.", + "NamedProblemMatcherSchema.name": "Sorun eşleştiricisinin adı.", + "ProblemMatcherExtPoint": "Sorun eşleştiricilerine ekleme yapar" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/message/common/message.i18n.json b/i18n/trk/src/vs/platform/message/common/message.i18n.json new file mode 100644 index 0000000000000..4f9a44f93833c --- /dev/null +++ b/i18n/trk/src/vs/platform/message/common/message.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Kapat", + "later": "Daha Sonra", + "cancel": "İptal" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/request/node/request.i18n.json b/i18n/trk/src/vs/platform/request/node/request.i18n.json new file mode 100644 index 0000000000000..90faed28342ff --- /dev/null +++ b/i18n/trk/src/vs/platform/request/node/request.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "httpConfigurationTitle": "HTTP", + "proxy": "Kullanılacak proxy ayarı. Ayarlanmazsa, http_proxy ve https_proxy ortam değişkenlerinden alınır", + "strictSSL": "Proxy sunucu sertifikasının verilen Sertifika Yetkilileri listesine göre doğrulanması gerekip gerekmediği.", + "proxyAuthorization": "Her ağ isteği için 'Proxy-Authorization' başlığı olarak gönderilecek değer." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/telemetry/common/telemetryService.i18n.json b/i18n/trk/src/vs/platform/telemetry/common/telemetryService.i18n.json new file mode 100644 index 0000000000000..6c5812585d717 --- /dev/null +++ b/i18n/trk/src/vs/platform/telemetry/common/telemetryService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetri", + "telemetry.enableTelemetry": "Kullanım verileri ve hataların Microsoft'a gönderilmesini etkinleştirin." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/platform/theme/common/colorRegistry.i18n.json b/i18n/trk/src/vs/platform/theme/common/colorRegistry.i18n.json new file mode 100644 index 0000000000000..0c4954b0a9ac9 --- /dev/null +++ b/i18n/trk/src/vs/platform/theme/common/colorRegistry.i18n.json @@ -0,0 +1,88 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid.color": "Geçersiz renk biçimi. #RGB, #RGBA, #RRGGBB veya #RRGGBBAA kullanın", + "schema.colors": "Çalışma ekranında kullanılan renkler.", + "foreground": "Genel ön plan rengi. Bu renk, bir bileşen tarafından geçersiz kılınmadıkça kullanılır.", + "errorForeground": "Hata mesajları için genel ön plan rengi. Bu renk, bir bileşen tarafından geçersiz kılınmadıkça kullanılır.", + "descriptionForeground": "Ek bilgi sağlayan açıklama metni(örneğin bir etiket) için ön plan rengi.", + "focusBorder": "Odaklanılan ögeler için genel kenarlık rengi. Bu renk, bir bileşen tarafından geçersiz kılınmadıkça kullanılır.", + "contrastBorder": "Daha fazla kontrast için, ögelerin etrafında onları diğerlerinden ayıracak ekstra bir kenarlık.", + "activeContrastBorder": "Daha fazla kontrast için, aktif ögelerin etrafında onları diğerlerinden ayıracak ekstra bir kenarlık.", + "selectionBackground": "Çalışma ekranındaki metin seçimlerinin arka plan rengi(örneğin girdi alanları veya metin alanları). Bunun, düzenleyicideki seçimlere uygulanmayacağını unutmayın.", + "textSeparatorForeground": "Metin ayırıcıların rengi.", + "textLinkForeground": "Metindeki bağlantıların ön plan rengi.", + "textLinkActiveForeground": "Metindeki aktif bağlantıların ön plan rengi.", + "textPreformatForeground": "Önceden biçimlendirilmiş metin parçalarının ön plan rengi.", + "textBlockQuoteBackground": "Metindeki alıntı bloklarının arka plan rengi.", + "textBlockQuoteBorder": "Metindeki alıntı bloklarının kenarlık rengi.", + "textCodeBlockBackground": "Metindeki kod bloklarının arka plan rengi.", + "widgetShadow": "Bul/değiştir gibi düzenleyici içindeki araçların gölge rengi.", + "inputBoxBackground": "Giriş kutusu arka planı.", + "inputBoxForeground": "Giriş kutusu ön planı.", + "inputBoxBorder": "Giriş kutusu kenarlığı.", + "inputBoxActiveOptionBorder": "Girdi alanlarındaki aktif seçeneklerin kenarlık rengi.", + "inputPlaceholderForeground": "Yer tutucu metin için girdi kutusu ön plan rengi.", + "inputValidationInfoBackground": "Bilgi önem derecesi için girdi doğrulama arka plan rengi.", + "inputValidationInfoBorder": "Bilgi önem derecesi için girdi doğrulama kenarlık rengi.", + "inputValidationWarningBackground": "Bilgi uyarısı için girdi doğrulama arka plan rengi.", + "inputValidationWarningBorder": "Uyarı önem derecesi için girdi doğrulama kenarlık rengi.", + "inputValidationErrorBackground": "Hata önem derecesi için girdi doğrulama arka plan rengi.", + "inputValidationErrorBorder": "Hata önem derecesi için girdi doğrulama kenarlık rengi.", + "dropdownBackground": "Açılır kutu arka planı.", + "dropdownForeground": "Açılır kutu ön planı.", + "dropdownBorder": "Açılır kutu kenarlığı.", + "listFocusBackground": "Liste/Ağaç aktifken odaklanılan ögenin Lise/Ağaç arka plan rengi. Bir aktif liste/ağaç, klavye odağındadır; pasif olan odakta değildir.", + "listFocusForeground": "Liste/Ağaç aktifken odaklanılan ögenin Lise/Ağaç ön plan rengi. Bir aktif liste/ağaç, klavye odağındadır; pasif olan odakta değildir.", + "listActiveSelectionBackground": "Liste/Ağaç aktifken seçilen ögenin Lise/Ağaç arka plan rengi. Bir aktif liste/ağaç, klavye odağındadır; pasif olan odakta değildir.", + "listActiveSelectionForeground": "Liste/Ağaç aktifken seçilen ögenin Lise/Ağaç ön plan rengi. Bir aktif liste/ağaç, klavye odağındadır; pasif olan odakta değildir.", + "listInactiveSelectionBackground": "Liste/Ağaç pasifken seçilen ögenin Lise/Ağaç arka plan rengi. Bir aktif liste/ağaç, klavye odağındadır; pasif olan odakta değildir.", + "listInactiveSelectionForeground": "Liste/Ağaç pasifken seçilen ögenin Lise/Ağaç ön plan rengi. Bir aktif liste/ağaç, klavye odağındadır; pasif olan odakta değildir.", + "listHoverBackground": "Fare ile ögelerin üzerine gelindiğinde Liste/Ağaç arka planı.", + "listHoverForeground": "Fare ile ögelerin üzerine gelindiğinde Liste/Ağaç ön planı.", + "listDropBackground": "Fare ile ögeler taşınırken Liste/Ağaç sürükle ve bırak arka planı.", + "highlight": "Liste/Ağaç içinde arama yaparken eşleşme vurgularının Liste/Ağaç ön plan rengi.", + "pickerGroupForeground": "Gruplama etiketleri için hızlı seçici rengi.", + "pickerGroupBorder": "Gruplama kenarlıkları için hızlı seçici rengi.", + "buttonForeground": "Buton ön plan rengi.", + "buttonBackground": "Buton arka plan rengi.", + "buttonHoverBackground": "Fareyle üzerine gelindiğinde buton arka plan rengi.", + "badgeBackground": "Gösterge arka plan rengi. Göstergeler küçük bilgi etiketleridir, ör. arama sonucu sayısı için.", + "badgeForeground": "Gösterge ön plan rengi. Göstergeler küçük bilgi etiketleridir, ör. arama sonucu sayısı için.", + "scrollbarShadow": "Görünümün kaydırıldığını belirtmek için kaydırma çubuğu gölgesi.", + "scrollbarSliderBackground": "Kaydıraç arka plan rengi.", + "scrollbarSliderHoverBackground": "Fareyle üzerine gelindiğinde kaydıraç arka plan rengi.", + "scrollbarSliderActiveBackground": "Aktif kaydıraç arka plan rengi.", + "progressBarBackground": "Uzun süren işlemleri gösterebilen ilerleme çubuğunun arka plan rengi.", + "editorBackground": "Düzenleyici arka plan rengi.", + "editorForeground": "Düzenleyici varsayılan ön plan rengi.", + "editorWidgetBackground": "Bul/değiştir gibi düzenleyici araçlarının arka plan rengi.", + "editorWidgetBorder": "Editör araçlarının kenarlık rengi. Renk, araç bir kenarlığı olmasına karar verdiğinde ve renk hiçbir eklenti tarafından geçersiz kılınmadığında kullanılır.", + "editorSelection": "Düzenleyici seçiminin rengi.", + "editorInactiveSelection": "Bir pasif düzenleyicideki seçimin rengi.", + "editorSelectionHighlight": "Seçimle aynı içeriğe sahip bölgelerin rengi.", + "editorFindMatch": "Geçerli arama eşleşmesinin rengi.", + "findMatchHighlight": "Diğer arama eşleşmelerinin rengi.", + "findRangeHighlight": "Aramayı sınırlayan aralığı renklendirin.", + "hoverHighlight": "Bağlantı vurgusu gösterilen bir sözcüğün altını vurgulayın.", + "hoverBackground": "Düzenleyici bağlantı vurgusunun arka plan rengi.", + "hoverBorder": "Düzenleyici bağlantı vurgusunun kenarlık rengi.", + "activeLinkForeground": "Aktif bağlantıların rengi.", + "diffEditorInserted": "Eklenen metnin arka plan rengi.", + "diffEditorRemoved": "Çıkarılan metnin arka plan rengi.", + "diffEditorInsertedOutline": "Eklenen metnin ana hat rengi.", + "diffEditorRemovedOutline": "Çıkarılan metnin ana hat rengi.", + "mergeCurrentHeaderBackground": "Satır içi birleştirme çakışmalarında geçerli üstbilgi arka planı.", + "mergeCurrentContentBackground": "Satır içi birleştirme çakışmalarında geçerli içerik arka planı.", + "mergeIncomingHeaderBackground": "Satır içi birleştirme çakışmalarında gelen üstbilgi arka planı.", + "mergeIncomingContentBackground": "Satır içi birleştirme çakışmalarında gelen içerik arka planı.", + "mergeCommonHeaderBackground": "Satır içi birleştirme çakışmalarında ortak ata üstbilgisi arka planı.", + "mergeCommonContentBackground": "Satır içi birleştirme çakışmalarında ortak ata içeriği arka planı.", + "mergeBorder": "Satır içi birleştirme çakışmalarında üst bilgi ve ayırıcıdaki kenarlık rengi.", + "overviewRulerCurrentContentForeground": "Satır içi birleştirme çakışmalarında geçerli genel bakış cetveli ön planı.", + "overviewRulerIncomingContentForeground": "Satır içi birleştirme çakışmalarında gelen genel bakış cetveli ön planı.", + "overviewRulerCommonContentForeground": "Satır içi birleştirme çakışmalarında ortak ata genel bakış cetveli ön planı." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json b/i18n/trk/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json new file mode 100644 index 0000000000000..0a8ef8463d3a7 --- /dev/null +++ b/i18n/trk/src/vs/workbench/api/electron-browser/mainThreadExtensionService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "overwritingExtension": "{0} eklentisinin üzerine {1} yazılıyor.", + "extensionUnderDevelopment": "{0} konumundaki geliştirme eklentisi yükleniyor" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json b/i18n/trk/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json new file mode 100644 index 0000000000000..d3de90fb241d9 --- /dev/null +++ b/i18n/trk/src/vs/workbench/api/electron-browser/mainThreadMessageService.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Kapat", + "cancel": "İptal", + "ok": "Tamam" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/api/node/extHostDiagnostics.i18n.json b/i18n/trk/src/vs/workbench/api/node/extHostDiagnostics.i18n.json new file mode 100644 index 0000000000000..ebbdf8fa988c4 --- /dev/null +++ b/i18n/trk/src/vs/workbench/api/node/extHostDiagnostics.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "limitHit": "Diğer {0} hata ve uyarılar gösterilmiyor." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/api/node/extHostTask.i18n.json b/i18n/trk/src/vs/workbench/api/node/extHostTask.i18n.json new file mode 100644 index 0000000000000..4b90a12aaf247 --- /dev/null +++ b/i18n/trk/src/vs/workbench/api/node/extHostTask.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "task.label": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/api/node/extHostTreeViews.i18n.json b/i18n/trk/src/vs/workbench/api/node/extHostTreeViews.i18n.json new file mode 100644 index 0000000000000..a3dd0ab5f9592 --- /dev/null +++ b/i18n/trk/src/vs/workbench/api/node/extHostTreeViews.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeView.notRegistered": "Kayıtlı '{0}' Id'li ağaç görünümü yok.", + "treeItem.notFound": "'{0}' Id'li ağaç ögesi yok.", + "treeView.duplicateElement": "{0} ögesi zaten kayıtlı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/actions/configureLocale.i18n.json b/i18n/trk/src/vs/workbench/browser/actions/configureLocale.i18n.json new file mode 100644 index 0000000000000..d7620dc687c54 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/actions/configureLocale.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "configureLocale": "Dili Yapılandır", + "displayLanguage": "VSCode'un görüntüleme dilini tanımlar.", + "doc": "Desteklenen dillerin listesi için göz atın: {0}", + "restart": "Değeri değiştirirseniz VSCode'u yeniden başlatmanız gerekir.", + "fail.createSettings": " '{0}' oluşturulamadı ({1}).", + "JsonSchema.locale": "Kullanılacak Kullanıcı Arayüzü Dili." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/actions/fileActions.i18n.json b/i18n/trk/src/vs/workbench/browser/actions/fileActions.i18n.json new file mode 100644 index 0000000000000..68a8df34a5b63 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/actions/fileActions.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFolder": "Klasör Aç...", + "openFileFolder": "Aç..." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json b/i18n/trk/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json new file mode 100644 index 0000000000000..1af785233f8bd --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/actions/toggleActivityBarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleActivityBar": "Etkinlik Çubuğunu Gizle/Göster", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json b/i18n/trk/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json new file mode 100644 index 0000000000000..237f4af975ca4 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/actions/toggleEditorLayout.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleEditorGroupLayout": "Düzenleyici Grubunu Dikey/Yatay Düzende Değiştir", + "horizontalLayout": "Yatay Düzenleyici Grubu Düzeni", + "verticalLayout": "Dikey Düzenleyici Grubu Düzeni", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json b/i18n/trk/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json new file mode 100644 index 0000000000000..b5c1cbc783e3a --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/actions/toggleSidebarPosition.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Kenar Çubuğu Konumunu Değiştir", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json b/i18n/trk/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json new file mode 100644 index 0000000000000..714ae09d79009 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/actions/toggleSidebarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleSidebar": "Kenar Çubuğunu Gizle/Göster", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json b/i18n/trk/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json new file mode 100644 index 0000000000000..8636912355aee --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/actions/toggleStatusbarVisibility.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleStatusbar": "Durum Çubuğunu Gizle/Göster", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/actions/toggleZenMode.i18n.json b/i18n/trk/src/vs/workbench/browser/actions/toggleZenMode.i18n.json new file mode 100644 index 0000000000000..999c18e1dbdbe --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/actions/toggleZenMode.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleZenMode": "Zen Modunu Aç/Kapat", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json new file mode 100644 index 0000000000000..eaa011efe7e3c --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/activitybar/activitybarActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeFromActivityBar": "Etkinlik Çubuğundan Kaldır", + "keepInActivityBar": "Etkinlik Çubuğunda Tut", + "titleKeybinding": "{0} ({1})", + "additionalViews": "Ek Görünümler", + "numberBadge": "{0} ({1})", + "manageExtension": "Eklentiyi Yönet", + "toggle": "Görünüm Sabitlemeyi Aç/Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json new file mode 100644 index 0000000000000..32c2c08ce4c1f --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/activitybar/activitybarPart.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "hideActivitBar": "Etkinlik Çubuğunu Gizle", + "activityBarAriaLabel": "Aktif Görünüm Değiştirici", + "globalActions": "Global Eylemler" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/compositePart.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/compositePart.i18n.json new file mode 100644 index 0000000000000..b9eadbfaa893f --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/compositePart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ariaCompositeToolbarLabel": "{0} eylem", + "titleTooltip": "{0} ({1})" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json new file mode 100644 index 0000000000000..a38af02d66352 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/binaryDiffEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "metadataDiff": "{0} ↔ {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json new file mode 100644 index 0000000000000..23b8e1bad3061 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/binaryEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "binaryEditor": "İkili Görüntüleyici" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json new file mode 100644 index 0000000000000..9059d7f92c97e --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/editor.contribution.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textEditor": "Metin Düzenleyicisi", + "textDiffEditor": "Metin Diff Düzenleyicisi", + "binaryDiffEditor": "İkili Diff Düzenleyicisi", + "sideBySideEditor": "Yan Yana Düzenleyici", + "groupOnePicker": "İlk Gruptaki Düzenleyicileri Göster", + "groupTwoPicker": "İkinci Gruptaki Düzenleyicileri Göster", + "groupThreePicker": "Üçüncü Gruptaki Düzenleyicileri Göster", + "allEditorsPicker": "Açık Tüm Düzenleyicileri Göster", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/editorActions.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/editorActions.i18n.json new file mode 100644 index 0000000000000..01f0b8ffcc919 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/editorActions.i18n.json @@ -0,0 +1,56 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitEditor": "Düzenleyiciyi Böl", + "joinTwoGroups": "İki Gruptaki Düzenleyicileri Birleştir", + "navigateEditorGroups": "Düzenleyici Grupları Arasında Gezin", + "focusActiveEditorGroup": "Aktif Düzenleyici Grubuna Odakla", + "focusFirstEditorGroup": "İlk Düzenleyici Grubuna Odakla", + "focusSecondEditorGroup": "İkinci Düzenleyici Grubuna Odakla", + "focusThirdEditorGroup": "Üçüncü Düzenleyici Grubuna Odakla", + "focusPreviousGroup": "Önceki Gruba Odakla", + "focusNextGroup": "Sonraki Gruba Odakla", + "openToSide": "Yana Aç", + "closeEditor": "Düzenleyiciyi Kapat", + "revertAndCloseActiveEditor": "Geri Al ve Düzenleyiciyi Kapat", + "closeEditorsToTheLeft": "Düzenleyicinin Solundakileri Kapat", + "closeEditorsToTheRight": "Düzenleyicinin Sağındakileri Kapat", + "closeAllEditors": "Tüm Düzenleyicileri Kapat", + "closeUnmodifiedEditors": "Gruptaki Değiştirilmemiş Düzenleyicileri Kapat", + "closeEditorsInOtherGroups": "Diğer Gruplardaki Tüm Düzenleyicileri Kapat", + "closeOtherEditorsInGroup": "Diğer Düzenleyicileri Kapat", + "closeEditorsInGroup": "Gruptaki Tüm Düzenleyicileri Kapat", + "moveActiveGroupLeft": "Düzenleyici Grubunu Sola Taşı", + "moveActiveGroupRight": "Düzenleyici Grubunu Sağa Taşı", + "minimizeOtherEditorGroups": "Diğer Düzenleyici Gruplarını Küçült", + "evenEditorGroups": "Düzenleyici Grup Genişliklerini Eşitle", + "maximizeEditor": "Düzenleyici Grubunu Olabildiğince Genişlet ve Kenar Çubuğunu Gizle", + "keepEditor": "Düzenleyiciyi Tut", + "openNextEditor": "Sonraki Düzenleyiciyi Aç", + "openPreviousEditor": "Önceki Düzenleyiciyi Aç", + "nextEditorInGroup": "Gruptaki Sonraki Düzenleyiciyi Aç", + "openPreviousEditorInGroup": "Gruptaki Önceki Düzenleyiciyi Aç", + "navigateNext": "İleri Git", + "navigatePrevious": "Geri Dön", + "reopenClosedEditor": "Kapatılan Düzenleyiciyi Yeniden Aç", + "clearRecentFiles": "Son Kullanılan Dosyaları Temizle", + "showEditorsInFirstGroup": "İlk Gruptaki Düzenleyicileri Göster", + "showEditorsInSecondGroup": "İkinci Gruptaki Düzenleyicileri Göster", + "showEditorsInThirdGroup": "Üçüncü Gruptaki Düzenleyicileri Göster", + "showEditorsInGroup": "Gruptaki Düzenleyicileri Göster", + "showAllEditors": "Tüm Düzenleyicileri Göster", + "openPreviousRecentlyUsedEditorInGroup": "Gruptaki Son Kullanılan Önceki Düzenleyiciyi Aç", + "openNextRecentlyUsedEditorInGroup": "Gruptaki Son Kullanılan Sonraki Düzenleyiciyi Aç", + "navigateEditorHistoryByInput": "Geçmişteki Önceki Düzenleyiciyi Aç", + "openNextRecentlyUsedEditor": "Son Kullanılan Sonraki Düzenleyiciyi Aç", + "openPreviousRecentlyUsedEditor": "Son Kullanılan Önceki Düzenleyiciyi Aç", + "clearEditorHistory": "Düzenleyici Geçmişini Temizle", + "focusLastEditorInStack": "Gruptaki Son Düzenleyiciyi Aç", + "moveEditorLeft": "Düzenleyiciyi Sola Taşı", + "moveEditorRight": "Düzenleyiciyi Sağa Taşı", + "moveEditorToPreviousGroup": "Düzenleyiciyi Önceki Gruba Taşı", + "moveEditorToNextGroup": "Düzenleyiciyi Sonraki Gruba Taşı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json new file mode 100644 index 0000000000000..ec6a3cb04f0fb --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/editorCommands.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorCommand.activeEditorMove.description": "Aktif düzenleyiciyi sekmeler veya gruplar halinde taşıyın", + "editorCommand.activeEditorMove.arg.name": "Aktif düzenleyici taşıma argümanı", + "editorCommand.activeEditorMove.arg.description": "Argüman Özellikleri:\n\t\t\t\t\t\t* 'to': Nereye taşınacağını belirten dize değeri.\n\t\t\t\t\t\t* 'by': Kaç birim taşınacağını belirten dize değeri. Sekme veya grup olarak.\n\t\t\t\t\t\t* 'value': Kaç tane pozisyonun taşınacağını belirten sayı değeri.\n\t\t\t\t\t", + "commandDeprecated": "**{0}** komutu kaldırıldı. Onun yerine **{1}** komutunu kullanabilirsiniz", + "openKeybindings": "Klavye Kısayollarını Yapılandır" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/editorPart.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/editorPart.i18n.json new file mode 100644 index 0000000000000..11fc7d2994182 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/editorPart.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "groupOneVertical": "Sol", + "groupTwoVertical": "Orta", + "groupThreeVertical": "Sağ", + "groupOneHorizontal": "En Üst", + "groupTwoHorizontal": "Orta", + "groupThreeHorizontal": "En Alt", + "editorOpenError": "'{0}' açılamadı: {1}." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json new file mode 100644 index 0000000000000..3f3f3b4d53858 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/editorPicker.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, düzenleyici grubu seçici", + "groupLabel": "Grup: {0}", + "noResultsFoundInGroup": "Grupta eşleşen açık düzenleyici bulunamadı", + "noOpenedEditors": "Gruptaki açık düzenleyiciler listesi şu an boş", + "noResultsFound": "Eşleşen açık düzenleyici bulunamadı", + "noOpenedEditorsAllGroups": "Açık düzenleyiciler listesi şu an boş" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json new file mode 100644 index 0000000000000..d03a6b69b6a34 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/editorStatus.i18n.json @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "singleSelectionRange": "Sat {0}, Süt {1} ({2} seçili)", + "singleSelection": "Sat {0}, Süt {1}", + "multiSelectionRange": "{0} seçim ({1} karakter seçildi)", + "multiSelection": "{0} seçim", + "endOfLineLineFeed": "LF", + "endOfLineCarriageReturnLineFeed": "CRLF", + "tabFocusModeEnabled": "Tab Odak Değiştirir", + "screenReaderDetected": "Ekran Okuyucu Algılandı", + "screenReaderDetectedExtra": "Bir Ekran Okuyucu kullanmıyorsanız, lütfen `editor.accessibilitySupport` ayarını \"off\" olarak değiştirin", + "disableTabMode": "Erişilebilirlik Modunu Devre Dışı Bırak", + "gotoLine": "Satıra Git", + "indentation": "Girinti", + "selectEncoding": "Kodlamayı Seç", + "selectEOL": "Satır Sonu Sıralamasını Seç", + "selectLanguageMode": "Dil Modunu Seçin", + "fileInfo": "Dosya Bilgisi", + "spacesSize": "Boşluk: {0}", + "tabSize": "Sekme Boyutu: {0}", + "showLanguageExtensions": "'{0}' için Market Eklentilerini Ara...", + "changeMode": "Dil Modunu Değiştir", + "noEditor": "Şu an aktif metin düzenleyici yok", + "languageDescription": "({0}) - Yapılandırılan Dil", + "languageDescriptionConfigured": "({0})", + "languagesPicks": "diller (tanımlayıcı)", + "configureModeSettings": "'{0}' dili tabanlı ayarları yapılandır...", + "configureAssociationsExt": "'{0}' için Dosya İlişkilendirmesini Yapılandır...", + "autoDetect": "Otomatik Algıla", + "pickLanguage": "Dil Modunu Seçin", + "currentAssociation": "Geçerli İlişkilendirme", + "pickLanguageToConfigure": " '{0}' ile İlişkilendirilecek Dil Modunu Seçin", + "changeIndentation": "Girintiyi Değiştir", + "noWritableCodeEditor": "Aktif kod düzenleyici salt okunur.", + "indentView": "görünümü değiştir", + "indentConvert": "dosyayı dönüştür", + "pickAction": "Eylem Seçin", + "changeEndOfLine": "Satır Sonu Sıralamasını Değiştir", + "pickEndOfLine": "Satır Sonu Sıralamasını Seç", + "changeEncoding": "Dosya Kodlamasını Değiştir", + "noFileEditor": "Şu an aktif dosya yok", + "saveWithEncoding": "Kodlama ile Kaydet", + "reopenWithEncoding": "Kodlama ile Yeniden Aç", + "guessedEncoding": "İçerikten tahmin edildi", + "pickEncodingForReopen": "Dosyayı Yeniden Açmak İçin Dosya Kodlaması Seçin", + "pickEncodingForSave": "Kaydedilecek Dosya Kodlamasını Seçin" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json new file mode 100644 index 0000000000000..43199d98868ca --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/tabsTitleControl.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "araLabelTabActions": "Sekme eylemleri" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json new file mode 100644 index 0000000000000..9fb7a026e34e1 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/textDiffEditor.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textDiffEditor": "Metin Diff Düzenleyicisi", + "readonlyEditorWithInputAriaLabel": "{0}. Salt okunur metin dosyası karşılaştırma düzenleyicisi.", + "readonlyEditorAriaLabel": "Salt okunur metin dosyası karşılaştırma düzenleyicisi.", + "editableEditorWithInputAriaLabel": "{0}. Metin dosyası karşılaştırma düzenleyicisi.", + "editableEditorAriaLabel": "Metin dosyası karşılaştırma düzenleyicisi.", + "navigate.next.label": "Sonraki Değişiklik", + "navigate.prev.label": "Önceki Değişiklik", + "inlineDiffLabel": "Satır İçi Görünüme Geç", + "sideBySideDiffLabel": "Yan Yana Görünüme Geç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/textEditor.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/textEditor.i18n.json new file mode 100644 index 0000000000000..01f8e840c010e --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/textEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorLabelWithGroup": "{0}, Grup {1}." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json new file mode 100644 index 0000000000000..0b04760519918 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/textResourceEditor.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textEditor": "Metin Düzenleyicisi", + "readonlyEditorWithInputAriaLabel": "{0}. Salt okunur metin düzenleyici.", + "readonlyEditorAriaLabel": "Salt okunur metin düzenleyici.", + "untitledFileEditorWithInputAriaLabel": "{0}. İsimsiz dosya metin düzenleyici.", + "untitledFileEditorAriaLabel": "İsimsiz dosya metin düzenleyici." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/editor/titleControl.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/editor/titleControl.i18n.json new file mode 100644 index 0000000000000..18e318decfd88 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/editor/titleControl.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "close": "Kapat", + "closeOthers": "Diğerlerini Kapat", + "closeRight": "Sağdakileri Kapat", + "closeAll": "Tümünü Kapat", + "closeAllUnmodified": "Değiştirilmeyenleri Kapat", + "keepOpen": "Açık Tut", + "showOpenedEditors": "Açık Düzenleyicileri Göster", + "araLabelEditorActions": "Düzenleyici eylemleri" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/panel/panelActions.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/panel/panelActions.i18n.json new file mode 100644 index 0000000000000..82be0726e3ed6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/panel/panelActions.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "panelActionTooltip": "{0} ({1})", + "closePanel": "Paneli Kapat", + "togglePanel": "Paneli Aç/Kapat", + "focusPanel": "Panele Odakla", + "toggleMaximizedPanel": "Panelin Ekranı Kaplamasını Aç/Kapat", + "maximizePanel": "Panel Boyutunu Olabildiğince Genişlet", + "minimizePanel": "Panel Boyutunu Geri Al", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/panel/panelPart.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/panel/panelPart.i18n.json new file mode 100644 index 0000000000000..de9c6eaf58651 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/panel/panelPart.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "panelSwitcherBarAriaLabel": "Aktif Panel Değiştirici" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json new file mode 100644 index 0000000000000..8f88539a56e2b --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/quickopen/quickOpenController.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "inputModeEntryDescription": "{0} (Onaylamak için 'Enter' veya iptal etmek için 'Escape' tuşuna basın)", + "inputModeEntry": "Girdinizi onaylamak için 'Enter' veya iptal etmek için 'Escape' tuşuna basın", + "emptyPicks": "Seçilecek girdi yok", + "quickOpenInput": "Buradan gerçekleştirebileceğiniz eylemler hakkında yardım almak için '?' yazın", + "historyMatches": "yakınlarda açıldı", + "noResultsFound1": "Sonuç bulunamadı", + "canNotRunPlaceholder": "Bu hızlı açma işleyicisi geçerli bağlamda kullanılamaz", + "entryAriaLabel": "{0}, yakınlarda açıldı", + "removeFromEditorHistory": "Geçmişten Kaldır", + "pickHistory": "Geçmişten kaldırmak için bir düzenleyici girdisi seçin" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json new file mode 100644 index 0000000000000..e6b6bd07b2f78 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/quickopen/quickopen.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "quickOpen": "Dosyaya Git...", + "quickNavigateNext": "Hızlı Açta Sonrakine Git", + "quickNavigatePrevious": "Hızlı Açta Öncekine Git", + "quickSelectNext": "Hızlı Açta Sonrakini Seç", + "quickSelectPrevious": "Hızlı Açta Öncekini Seç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json new file mode 100644 index 0000000000000..3ad0767c12165 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/sidebar/sidebarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "focusSideBar": "Kenar Çubuğuna Odakla", + "viewCategory": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json new file mode 100644 index 0000000000000..ea87cdb62294b --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/statusbar/statusbarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "canNotRun": "'{0}' komutu şu an etkin değildir ve çalıştırılamaz.", + "manageExtension": "Eklentiyi Yönet" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json b/i18n/trk/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json new file mode 100644 index 0000000000000..f143e04de9447 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/parts/titlebar/titlebarPart.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "patchedWindowTitle": "[Desteklenmiyor]", + "devExtensionWindowTitlePrefix": "[Eklenti Geliştirme Sunucusu]" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/quickopen.i18n.json b/i18n/trk/src/vs/workbench/browser/quickopen.i18n.json new file mode 100644 index 0000000000000..a0b7b06168e6c --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/quickopen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noResultsMatching": "Eşleşen sonuç yok", + "noResultsFound2": "Sonuç bulunamadı", + "entryAriaLabel": "{0}, komut" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/browser/viewlet.i18n.json b/i18n/trk/src/vs/workbench/browser/viewlet.i18n.json new file mode 100644 index 0000000000000..0d41777aa74f7 --- /dev/null +++ b/i18n/trk/src/vs/workbench/browser/viewlet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "collapse": "Tümünü Daralt" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/common/theme.i18n.json b/i18n/trk/src/vs/workbench/common/theme.i18n.json new file mode 100644 index 0000000000000..3c854c09486e3 --- /dev/null +++ b/i18n/trk/src/vs/workbench/common/theme.i18n.json @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tabActiveBackground": "Aktif sekme arka plan rengi. Sekmeler, düzenleyici alanındaki düzenleyicilerin kapsayıcılarıdır. Bir düzenleyici grubunda birden fazla sekme açılabilir. Birden fazla düzenleyici grupları var olabilir.", + "tabInactiveBackground": "Pasif sekme arka plan rengi. Sekmeler, düzenleyici alanındaki düzenleyicilerin kapsayıcılarıdır. Bir düzenleyici grubunda birden fazla sekme açılabilir. Birden fazla düzenleyici grupları var olabilir.", + "tabBorder": "Sekmeleri birbirinden ayıran kenarlığın rengi. Sekmeler, düzenleyici alanındaki düzenleyicilerin kapsayıcılarıdır. Bir düzenleyici grubunda birden fazla sekme açılabilir. Birden fazla düzenleyici grupları var olabilir.", + "tabActiveForeground": "Aktif bir gruptaki aktif sekmenin ön plan rengi. Sekmeler, düzenleyici alanındaki düzenleyicilerin kapsayıcılarıdır. Bir düzenleyici grubunda birden fazla sekme açılabilir. Birden fazla düzenleyici grupları var olabilir.", + "tabInactiveForeground": "Aktif bir gruptaki pasif sekmenin ön plan rengi. Sekmeler, düzenleyici alanındaki düzenleyicilerin kapsayıcılarıdır. Bir düzenleyici grubunda birden fazla sekme açılabilir. Birden fazla düzenleyici grupları var olabilir.", + "tabUnfocusedActiveForeground": "Pasif bir gruptaki aktif sekmenin ön plan rengi. Sekmeler, düzenleyici alanındaki düzenleyicilerin kapsayıcılarıdır. Bir düzenleyici grubunda birden fazla sekme açılabilir. Birden fazla düzenleyici grupları var olabilir.", + "tabUnfocusedInactiveForeground": "Pasif bir gruptaki pasif sekmenin ön plan rengi. Sekmeler, düzenleyici alanındaki düzenleyicilerin kapsayıcılarıdır. Bir düzenleyici grubunda birden fazla sekme açılabilir. Birden fazla düzenleyici grupları var olabilir.", + "editorGroupBackground": "Bir düzenleyici grubunun arka plan rengi. Düzenleyici grupları, düzenleyicilerin kapsayıcılarıdır. Arka plan rengi, düzenleyici grubunu sürüklerken gösterilir.", + "tabsContainerBackground": "Sekmeler etkinleştirilmiş durumdayken, düzenleyici grubu başlık üstbilgisi arka plan rengi. Düzenleyici grupları, düzenleyicilerin kapsayıcılarıdır. ", + "tabsContainerBorder": "Sekmeler etkinleştirilmiş durumdayken, düzenleyici grubu başlık üstbilgisi kenarlık rengi. Düzenleyici grupları, düzenleyicilerin kapsayıcılarıdır. ", + "editorGroupHeaderBackground": "Sekmeler devre dışı iken, düzenleyici grubu başlık üstbilgisi arka plan rengi. Düzenleyici grupları, düzenleyicilerin kapsayıcılarıdır. ", + "editorGroupBorder": "Birden fazla düzenleyici grubunu birbirinden ayıracak renk. Düzenleyici grupları, düzenleyicilerin kapsayıcılarıdır. ", + "editorDragAndDropBackground": "Düzenleyici grubunu sürüklerken gösterilecek arka plan rengi. Düzenleyici içeriğinin hâlâ iyi görünmeye devam edebilmesi için renk şeffaf olmalıdır.", + "panelBackground": "Panel arka plan rengi. Paneller düzenleyici alanının altında gösterilir ve çıktı ve entegre terminal gibi görünümler içerir.", + "panelBorder": "Paneli düzenleyiciden ayıran üstteki kenarlık rengi. Paneller düzenleyici alanının altında gösterilir ve çıktı ve entegre terminal gibi görünümler içerir.", + "panelActiveTitleForeground": "Aktif panelin başlık rengi. Paneller düzenleyici alanının altında gösterilir ve çıktı ve entegre terminal gibi görünümler içerir.", + "panelInactiveTitleForeground": "Pasif panelin başlık rengi. Paneller düzenleyici alanının altında gösterilir ve çıktı ve entegre terminal gibi görünümler içerir.", + "panelActiveTitleBorder": "Aktif başlığının kenarlık rengi. Paneller düzenleyici alanının altında gösterilir ve çıktı ve entegre terminal gibi görünümler içerir.", + "statusBarForeground": "Durum çubuğu ön plan rengi. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarBackground": "Standart durum çubuğu arka plan rengi. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarBorder": "Durum çubuğunu kenar çubuğundan ve düzenleyiciden ayıran kenarlık rengi. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarNoFolderBackground": "Hiçbir klasör açık değilken durum çubuğu arka plan rengi. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarNoFolderForeground": "Hiçbir klasör açık değilken durum çubuğu ön plan rengi. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarItemActiveBackground": "Durum çubuğu ögesi tıklanırken arka plan rengi. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarItemHoverBackground": "Durum çubuğu ögesinin mouse ile üzerine gelindiğindeki arka plan rengi. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarProminentItemBackground": "Durum çubuğu belirgin ögelerinin arka plan rengi. Belirgin ögeler, önemi belirtmek için diğer durum çubuğu girdilerinden öne çıkarılır. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarProminentItemHoverBackground": "Durum çubuğu belirgin ögelerinin mouse ile üzerine gelindiğindeki arka plan rengi. Belirgin ögeler, önemi belirtmek için diğer durum çubuğu girdilerinden öne çıkarılır. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "activityBarBackground": "Etkinlik çubuğu arka plan rengi. Etkinlik çubuğu, en sol veya en sağda gösterilir ve kenar çubuğunun görünümleriyle yer değiştirmeye izin verir.", + "activityBarForeground": "Etkinlik çubuğu ön plan rengi (ör. simgeler için kullanılır). Etkinlik çubuğu, en sol veya en sağda gösterilir ve kenar çubuğunun görünümleriyle yer değiştirmeye izin verir.", + "activityBarBorder": "Etkinlik çubuğunu kenar çubuğundan ayıran kenarlığın rengi. Etkinlik çubuğu, en sol veya en sağda gösterilir ve kenar çubuğunun görünümleriyle yer değiştirmeye izin verir.", + "activityBarDragAndDropBackground": "Etkinlik çubuğu ögeleri için sürükle bırak geri bildirim rengi. Etkinlik çubuğu girdilerinin hâlâ iyi görünmeye devam edebilmesi için renk şeffaf olmalıdır. Etkinlik çubuğu, en sol veya en sağda gösterilir ve kenar çubuğunun görünümleriyle yer değiştirmeye izin verir.", + "activityBarBadgeBackground": "Etkinlik çubuğu bildirim göstergesi arka plan rengi. Etkinlik çubuğu, en sol veya en sağda gösterilir ve kenar çubuğunun görünümleriyle yer değiştirmeye izin verir.", + "activityBarBadgeForeground": "Etkinlik çubuğu bildirim göstergesi ön plan rengi. Etkinlik çubuğu, en sol veya en sağda gösterilir ve kenar çubuğunun görünümleriyle yer değiştirmeye izin verir.", + "sideBarBackground": "Kenar çubuğu arka plan rengi. Kenar çubuğu, gezgin ve arama gibi görünümlerin kapsayıcısıdır.", + "sideBarForeground": "Kenar çubuğu ön plan rengi. Kenar çubuğu, gezgin ve arama gibi görünümlerin kapsayıcısıdır.", + "sideBarBorder": "Kenar çubuğunu düzenleyiciden ayıran taraftaki kenarlığın rengi. Kenar çubuğu, gezgin ve arama gibi görünümlerin kapsayıcısıdır.", + "sideBarTitleForeground": "Kenar çubuğu başlığı ön plan rengi. Kenar çubuğu, gezgin ve arama gibi görünümlerin kapsayıcısıdır.", + "sideBarSectionHeaderBackground": "Kenar çubuğu bölüm başlığı arka plan rengi. Kenar çubuğu, gezgin ve arama gibi görünümlerin kapsayıcısıdır.", + "sideBarSectionHeaderForeground": "Kenar çubuğu bölüm başlığı ön plan rengi. Kenar çubuğu, gezgin ve arama gibi görünümlerin kapsayıcısıdır.", + "titleBarActiveForeground": "Pencere aktifken başlık çubuğu ön planı. Bu rengin sadece macOS'da destekleneceğini unutmayın.", + "titleBarInactiveForeground": "Pencere pasifken başlık çubuğu ön planı. Bu rengin sadece macOS'da destekleneceğini unutmayın.", + "titleBarActiveBackground": "Pencere aktifken başlık çubuğu arka planı. Bu rengin sadece macOS'da destekleneceğini unutmayın.", + "titleBarInactiveBackground": "Pencere pasifken başlık çubuğu arka planı. Bu rengin sadece macOS'da destekleneceğini unutmayın.", + "notificationsForeground": "Bildirim ön plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsBackground": "Bildirim arka plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsButtonBackground": "Bildirim butonu arka plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsButtonHoverBackground": "Fareyle üzerine gelindiğinde bildirim butonu arka plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsButtonForeground": "Bildirim butonu ön plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsInfoBackground": "Bildirimlerdeki bilgi arka plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsInfoForeground": "Bildirimlerdeki bilgi ön plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsWarningBackground": "Bildirim uyarı arka plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsWarningForeground": "Bildirim uyarı ön plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsErrorBackground": "Bildirim hata arka plan rengi. Bildirimler pencerenin üst kısmından içeri girer.", + "notificationsErrorForeground": "Bildirim hata ön plan rengi. Bildirimler pencerenin üst kısmından içeri girer." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/actions.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/actions.i18n.json new file mode 100644 index 0000000000000..f4317c69378a1 --- /dev/null +++ b/i18n/trk/src/vs/workbench/electron-browser/actions.i18n.json @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "closeActiveEditor": "Düzenleyiciyi Kapat", + "closeWindow": "Pencereyi Kapat", + "closeFolder": "Klasörü Kapat", + "noFolderOpened": "Şu an bu örnekte kapatmak için açık bir klasör bulunmuyor.", + "newWindow": "Yeni Pencere", + "toggleFullScreen": "Tam Ekranı Aç/Kapat", + "toggleMenuBar": "Menü Çubuğunu Gizle/Göster", + "toggleDevTools": "Geliştirici Araçlarını Aç/Kapat", + "zoomIn": "Yakınlaştır", + "zoomOut": "Uzaklaştır", + "zoomReset": "Yakınlaştırmayı Sıfırla", + "appPerf": "Başlangıç Performansı", + "reloadWindow": "Pencereyi Yeniden Yükle", + "switchWindowPlaceHolder": "Geçilecek pencereyi seçin", + "current": "Geçerli Pencere", + "switchWindow": "Pencere Değiştir...", + "quickSwitchWindow": "Hızlı Pencere Değiştir...", + "folders": "klasörler", + "files": "dosyalar", + "openRecentPlaceHolderMac": "Bir yol seçin (yeni pencerede açmak için Cmd tuşunu basılı tutun)", + "openRecentPlaceHolder": "Açılacak yolu seçin (yeni pencerede açmak için Ctrl tuşunu basılı tutun)", + "openRecent": "Son Kullanılanları Aç...", + "quickOpenRecent": "Son Kullanılanları Hızlı Aç...", + "closeMessages": "Bildirim İletilerini Kapat", + "reportIssues": "Sorunları Bildir", + "reportPerformanceIssue": "Performans Sorunu Bildir", + "keybindingsReference": "Klavye Kısayolları Başvurusu", + "openDocumentationUrl": "Belgeler", + "openIntroductoryVideosUrl": "Tanıtım Videoları", + "toggleSharedProcess": "Paylaşılan İşlemi Göster/Gizle", + "navigateLeft": "Soldaki Görünüme Git", + "navigateRight": "Sağdaki Görünüme Git", + "navigateUp": "Üstteki Görünüme Git", + "navigateDown": "Alttaki Görünüme Git", + "increaseViewSize": "Geçerli Görünüm Boyutunu Artır", + "decreaseViewSize": "Geçerli Görünüm Boyutunu Azalt" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/commands.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/commands.i18n.json new file mode 100644 index 0000000000000..3a1051dcfdad7 --- /dev/null +++ b/i18n/trk/src/vs/workbench/electron-browser/commands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "diffLeftRightLabel": "{0} ⟷ {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/extensionHost.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/extensionHost.i18n.json new file mode 100644 index 0000000000000..b13594b9af603 --- /dev/null +++ b/i18n/trk/src/vs/workbench/electron-browser/extensionHost.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionHostProcess.startupFailDebug": "Eklenti sunucusu 10 saniye içinde başlamadı, ilk satırda durdurulmuş olabilir ve devam etmesi için bir hata ayıklayıcıya ihtiyacı olabilir.", + "extensionHostProcess.startupFail": "Eklenti sunucusu 10 saniye içinde başlamadı, bu bir sorun olabilir.", + "extensionHostProcess.error": "Eklenti sunucusundan hata: {0}", + "extensionHostProcess.crash": "Eklenti sunucusu beklenmeyen biçimde sonlandırıldı. Lütfen kurtarmak için pencereyi yeniden yükleyin." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/main.contribution.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/main.contribution.i18n.json new file mode 100644 index 0000000000000..aaf704581b119 --- /dev/null +++ b/i18n/trk/src/vs/workbench/electron-browser/main.contribution.i18n.json @@ -0,0 +1,69 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "view": "Görüntüle", + "help": "Yardım", + "file": "Dosya", + "developer": "Geliştirici", + "showEditorTabs": "Açık düzenleyicilerin sekmelerde gösterilip gösterilmeyeceğini denetler", + "editorTabCloseButton": "Düzenleyici sekmelerinin kapat butonlarının konumunu denetler veya 'off' olarak ayarlandığında devre dışı bırakır.", + "showIcons": "Açık düzenleyicilerin bir simge ile gösterilip gösterilmemelerini denetler. Bu, bir simge temasının etkinleştirilmesini de gerektirir.", + "enablePreview": "Açık düzenleyicilerin önizleme olarak gösterilip gösterilmeyeceğini denetler. Önizleme düzenleyicileri kalıcı olarak açılana kadar (ör. çift tıklama veya düzenleme ile) tekrar kullanılırlar.", + "enablePreviewFromQuickOpen": "Hızlı Aç'taki açık düzenleyicilerin önizleme olarak gösterilip gösterilmeyeceğini denetler. Önizleme düzenleyicileri kalıcı olarak açılana kadar (ör. çift tıklama veya düzenleme ile) tekrar kullanılırlar.", + "editorOpenPositioning": "Düzenleyicilerin nerede açılacağını denetler. Düzenleyicileri, geçerli olanın soluna veya sağına açmak için 'left' veya 'right' seçeneklerinden birini seçin. Düzenleyicileri, geçerli olandan bağımsız bir şekilde açmak için 'first' veya 'last' seçeneklerinden birini seçin.", + "revealIfOpen": "Düzenleyicinin görünen gruplardan herhangi birinde açıldıysa ortaya çıkarılıp çıkarılmayacağını denetler. Devre dışı bırakılırsa; bir düzenleyici, o an aktif düzenleyici grubunda açılmayı tercih edecektir. Etkinleştirilirse; o an aktif düzenleyici grubunda tekrar açılmak yerine, zaten açık olan düzenleyici ortaya çıkarılacaktır. Bu ayarın yok sayılacağı bazı durumların olduğunu unutmayın, ör. bir düzenleyiciyi, belirli bir grupta veya o an aktif grubun yanına açmaya zorladığınızda. ", + "commandHistory": "Komut paleti geçmişinde tutulacak son kullanılan komutların sayısını denetler. Komut geçmişini kapatmak için 0 olarak ayarlayın.", + "preserveInput": "Komut paletine son girilen girdinin, bir sonraki açılışta tekrar yer alıp almayacağını denetler.", + "closeOnFocusLost": "Hızlı Aç'ın odağını kaybettiğinde otomatik olarak kapanıp kapanmayacağını denetler.", + "openDefaultSettings": "Ayarları açmanın ayrıca tüm varsayılan ayarları gösteren bir düzenleyici açıp açmayacağını denetler.", + "sideBarLocation": "Kenar çubuğunun konumunu denetler. Çalışma ekranının ya solunda ya da sağında gösterilebilir.", + "statusBarVisibility": "Çalışma ekranının altındaki durum çubuğunun görünürlüğünü denetler.", + "activityBarVisibility": "Çalışma ekranındaki etkinlik çubuğunun görünürlüğünü denetler.", + "closeOnFileDelete": "Düzenleyicinin gösterdiği bir dosyanın, başka bir işlem tarafından silinmesi veya yeniden adlandırması durumunda dosyayı otomatik olarak kapatıp kapatmamasını denetler. Bunu devre dışı bırakmak, böyle bir durumda düzenleyicinin kaydedilmemiş değişiklikler içeriyor durumunda kalmasını sağlar. Uygulama içinde silmek, düzenleyiciyi her zaman kapatır ve kaydedilmemiş değişiklikler içeren dosyalar, verilerinizin korunması için otomatik olarak kapatılmaz.", + "swipeToNavigate": "Yatay olarak üç parmakla kaydırma ile açık dosyalar arasında gezinin.", + "workbenchConfigurationTitle": "Çalışma Ekranı", + "window.openFilesInNewWindow.on": "Dosyalar yeni bir pencerede açılacak", + "window.openFilesInNewWindow.off": "Dosyalar, dosyaların klasörünün olduğu pencerede veya son aktif pencerede açılacak", + "window.openFilesInNewWindow.default": "Dosyalar, Dock veya Finder ile açılmadıkça (sadece macOS için) dosyaların klasörünün olduğu pencerede veya son aktif pencerede açılacak", + "openFilesInNewWindow": "Dosyaların yeni bir pencerede açılıp açılmayacağını denetler.\n- default: dosyalar, Dock veya Finder ile açılmadıkça (sadece macOS için) dosyaların klasörünün olduğu pencerede veya son aktif pencerede açılacak\n- on: dosyalar yeni bir pencerede açılacak\n- off: dosyalar, dosyaların klasörünün olduğu pencerede veya son aktif pencerede açılacak\nBu ayarın halen yok sayılacağı durumlar olabilir (ör. -new-window veya -reuse-window komut satırı seçenekleri kullanılırken).", + "window.openFoldersInNewWindow.on": "Klasörler yeni bir pencerede açılacak", + "window.openFoldersInNewWindow.off": "Klasörler son aktif pencereyi değiştirir", + "window.openFoldersInNewWindow.default": "Klasörler, bir klasör uygulama içinden seçilmedikçe (ör. Dosya menüsünden) yeni bir pencerede açılır", + "openFoldersInNewWindow": "Klasörlerin yeni bir pencerede mi açılacağını yoksa son aktif pencereyi mi değiştireceğini denetler.\n- default: klasörler, bir klasör uygulama içinden seçilmedikçe (ör. Dosya menüsünden) yeni bir pencerede açılır\n- on: klasörler yeni bir pencerede açılır\n- off: klasörler son aktif pencereyi değiştirir\nBu ayarın halen yok sayılacağı durumlar olabilir (ör. -new-window veya -reuse-window komut satırı seçenekleri kullanılırken).", + "window.reopenFolders.all": "Tüm pencereleri yeniden aç.", + "window.reopenFolders.folders": "Tüm klasörleri yeniden aç. Boş pencereler eski haline dönmeyecektir.", + "window.reopenFolders.one": "Son aktif pencereyi yeniden aç.", + "window.reopenFolders.none": "Asla bir pencereyi yeniden açma. Her zaman boş bir pencereyle başla.", + "restoreWindows": "Pencerelerin, bir yeniden başlatma sonrası nasıl yeniden açılacağını denetler. Her zaman boş bir pencere ile başlamak için 'none', üzerinde çalıştığınız son pencereyi yeniden açmak için 'one', açık olan tüm klasörleri yeniden açmak için 'folders' veya son oturumunuzdaki tüm pencereleri yeniden açmak için 'all' seçeneğini seçin.", + "restoreFullscreen": "Bir pencere tam ekran modundayken çıkıldıysa, bu pencerenin tam ekran moduna geri dönüp dönmeyeceğini denetler.", + "zoomLevel": "Pencerenin yakınlaştırma düzeyini ayarlayın. Orijinal boyut 0'dır ve üstündeki (ör. 1) veya altındaki (ör. -1) her artırma 20% daha fazla veya az yakınlaştırmayı temsil eder. Yakınlaştırma düzeyini daha ince ayrıntılarla ayarlamak için ondalık değerler de girebilirsiniz.", + "title": "Pencere başlığını aktif düzenleyiciye bağlı olarak denetler. Değişkenler, bağlama göre değiştirilir:\n${activeEditorShort}: ör. myFile.txt\n${activeEditorMedium}: ör. myFolder/myFile.txt\n${activeEditorLong}: ör. /Users/Development/myProject/myFolder/myFile.txt\n${rootName}: ör. myProject\n${rootPath}: ör. /Users/Development/myProject\n${appName}: ör. VS Code\n${dirty}: değişiklik göstergesi, eğer aktif düzenleyici kaydedilmemiş değişiklikler içeriyorsa\n${separator}: şartlı ayırıcı (\" - \") yalnızca değer içeren değişkenlerle çevrili olduğunda gösterilir", + "window.newWindowDimensions.default": "Yeni pencereleri ekranın ortasında açın.", + "window.newWindowDimensions.inherit": "Yeni pencereleri son aktif pencere ile aynı ölçülerde açın.", + "window.newWindowDimensions.maximized": "Yeni pencereleri ekranı kapla modunda açın.", + "window.newWindowDimensions.fullscreen": "Yeni pencereleri tam ekran modunda açın.", + "newWindowDimensions": "En az bir pencere açıkken, açılacak yeni bir pencerenin boyutlarını denetler. Varsayılan olarak; yeni pencere ekranın ortasında küçük bir boyutta açılır. 'inherit' olarak ayarlandığında, pencere aktif olan son pencere ile aynı boyutları alacaktır. 'maximized' olarak ayarlandığında, ekranı kaplar biçimde açılır ve 'fullscreen' olarak yapılandırılmışsa, tam ekran olarak açılır. Bu ayarın açılan ilk pencere üzerinde bir etkisi olmadığını unutmayın. İlk pencere, daima boyutunu ve konumunu kapanmadan önce bıraktığınız şekilde geri yükler.", + "window.menuBarVisibility.default": "Menü, sadece tam ekran modunda gizlenir.", + "window.menuBarVisibility.visible": "Menü, tam ekran modunda bile daima görünür.", + "window.menuBarVisibility.toggle": "Menü gizlidir, fakat Alt tuşuyla görüntülenebilir.", + "window.menuBarVisibility.hidden": "Menü daima gizlidir.", + "menuBarVisibility": "Menü çubuğunun gizliliğini denetleyin. 'toggle' ayarı, menü çubuğu gizlidir ve Alt tuşuna bir kez basıldığında gösterilir anlamına gelir. Varsayılan olarak; menü çubuğu, pencere tam ekran değilse görünür durumdadır.", + "enableMenuBarMnemonics": "Etkinleştirilirse, ana menüler Alt tuşu kısayollarıyla açılabilir. Anımsatıcıları devre dışı bırakmak, bu Alt tuşu kısayollarının düzenleyici komutlarının yerine kullanılmasını sağlar.", + "autoDetectHighContrast": "Etkinleştirilirse; eğer Windows bir yüksek karşıtlık teması kullanıyorsa, otomatik olarak yüksek karşıtlık temasına geçiş yapılır; ve Windows, yüksek karşıtlık temasını kullanmayı bıraktığında koyu temaya geçiş yapılır.", + "titleBarStyle": "Pencere başlık çubuğunun görünümünü ayarlayın. Değişikliklerin uygulanması için tam yeniden başlatma gerekir.", + "window.nativeTabs": "macOS Sierra pencere sekmelerini etkinleştirir. Değişikliklerin uygulanması için tam yeniden başlatma gerekeceğini ve yerel sekmelerin, eğer yapılandırılmışsa özel başlık çubuğu stilini devre dışı bıracağını unutmayın.", + "windowConfigurationTitle": "Pencere", + "zenModeConfigurationTitle": "Zen Modu", + "zenMode.fullScreen": "Zen Moduna geçmenin ayrıca çalışma ekranını tam ekran moduna geçirip geçirmeyeceğini denetler.", + "zenMode.hideTabs": "Zen Moduna geçmenin ayrıca çalışma ekranı sekmelerini gizleyip gizlemeyeceğini denetler.", + "zenMode.hideStatusBar": "Zen Moduna geçmenin ayrıca çalışma ekranının altındaki durum çubuğunu gizleyip gizlemeyeceğini denetler.", + "zenMode.hideActivityBar": "Zen Moduna geçmenin ayrıca çalışma ekranının solundaki etkinlik çubuğunu gizleyip gizlemeyeceğini denetler.", + "zenMode.restore": "Bir pencere Zen modundayken çıkıldıysa, bu pencerenin Zen moduna geri dönüp dönmeyeceğini denetler.", + "workspaceConfigurationTitle": "Çalışma Alanı", + "workspaces.title": "Bu çalışma alanının klasör yapılandırması", + "files.exclude.boolean": "Dosya yollarının eşleştirileceği glob deseni. Deseni etkinleştirmek veya devre dışı bırakmak için true veya false olarak ayarlayın.", + "workspaces.additionalFolders": "Bu çalışma alanının klasörleri" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/main.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/main.i18n.json new file mode 100644 index 0000000000000..35eeb336c57b5 --- /dev/null +++ b/i18n/trk/src/vs/workbench/electron-browser/main.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "loaderError": "Gerekli bir dosya yüklenemedi. Artık İnternet'e bağlı değilsiniz veya bağlı olduğunuz sunucu çevrimdışı. Yeniden denemek için lütfen tarayıcıyı yenileyin.", + "loaderErrorNative": "Gerekli bir dosya yüklenemedi. Yeniden denemek için lütfen uygulamayı yeniden başlatın. Ayrıntılar: {0}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/shell.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/shell.i18n.json new file mode 100644 index 0000000000000..ef01873077f59 --- /dev/null +++ b/i18n/trk/src/vs/workbench/electron-browser/shell.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "runningAsRoot": "Code'u 'root' olarak çalıştırmamanız önerilir." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/window.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/window.i18n.json new file mode 100644 index 0000000000000..b4855a5a6d23b --- /dev/null +++ b/i18n/trk/src/vs/workbench/electron-browser/window.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "undo": "Geri Al", + "redo": "Yinele", + "cut": "Kes", + "copy": "Kopyala", + "paste": "Yapıştır", + "selectAll": "Tümünü Seç", + "confirmOpen": "{0} klasörü açmak istediğinizden emin misiniz?", + "confirmOpenButton": "&&Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/electron-browser/workbench.i18n.json b/i18n/trk/src/vs/workbench/electron-browser/workbench.i18n.json new file mode 100644 index 0000000000000..d50ab8c895532 --- /dev/null +++ b/i18n/trk/src/vs/workbench/electron-browser/workbench.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "developer": "Geliştirici", + "file": "Dosya" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/node/extensionHostMain.i18n.json b/i18n/trk/src/vs/workbench/node/extensionHostMain.i18n.json new file mode 100644 index 0000000000000..5c33200c410be --- /dev/null +++ b/i18n/trk/src/vs/workbench/node/extensionHostMain.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionTestError": "{0} yolu, geçerli bir eklenti test çalıştırıcısına işaret etmiyor." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/node/extensionPoints.i18n.json b/i18n/trk/src/vs/workbench/node/extensionPoints.i18n.json new file mode 100644 index 0000000000000..17cb5965e96ef --- /dev/null +++ b/i18n/trk/src/vs/workbench/node/extensionPoints.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "jsonParseFail": "{0} ayrıştırılamadı: {1}.", + "fileReadFail": "{0} dosyası okunamadı: {1}.", + "jsonsParseFail": "{0} veya {1} ayrıştırılamadı: {2}.", + "missingNLSKey": "{0} anahtarı için mesaj bulunamadı." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json new file mode 100644 index 0000000000000..11fb1d3f1d6a3 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/cli/electron-browser/cli.contribution.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "install": "'{0}' kabuk komutunu PATH'e yükle", + "not available": "Bu komut mevcut değil", + "successIn": "'{0}' kabuk komutu PATH'e başarıyla yüklendi.", + "warnEscalation": "Code, şimdi kabuk komutunu yüklemek üzere yönetici ayrıcalıkları için 'osascript' ile izin isteyecektir.", + "ok": "Tamam", + "cantCreateBinFolder": "'/usr/local/bin' oluşturulamadı.", + "cancel2": "İptal", + "aborted": "Durduruldu", + "uninstall": "'{0}' kabuk komutunu PATH'den kaldır", + "successFrom": "'{0}' kabuk komutu PATH'den başarıyla kaldırıldı.", + "shellCommand": "Kabuk Komutu" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json new file mode 100644 index 0000000000000..d8f733ac179d7 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/accessibility.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emergencyConfOn": "Şu an `editor.accessibilitySupport` ayarı 'on' olarak değiştiriliyor.", + "openingDocs": "Şu an VS Code Erişilebilirlik döküman sayfası açılıyor.", + "introMsg": "VS Code'un erişilebilirlik seçeneklerini denediğiniz için teşekkür ederiz.", + "status": "Durum:", + "changeConfigToOnMac": "Düzenleyicinin kalıcı olarak bir Ekran Okuyucu ile kullanılmak üzere optimize edilmesini ayarlamak için Command+E tuşlarına basın.", + "changeConfigToOnWinLinux": "Düzenleyicinin kalıcı olarak bir Ekran Okuyucu ile kullanılmak üzere optimize edilmesini ayarlamak için Control+E tuşlarına basın.", + "auto_unknown": "Düzenleyici, bir Ekran Okuyucu'nun ne zaman bağlandığını algılamak için platform API'larını kullanmak üzere ayarlanmış, fakat geçerli çalışma zamanı bunu desteklemiyor.", + "auto_on": "Düzenleyici, bir Ekran Okuyucu'nun bağlandığını otomatik olarak algıladı.", + "auto_off": "Düzenleyici, bir Ekran Okuyucu'nun ne zaman bağlandığını otomatik olarak algılamak için yapılandırılmış, şu anki durum böyle değil.", + "configuredOn": "Düzenleyici kalıcı olarak bir Ekran Okuyucu ile kullanılmak üzere optimize edilmesi için yapılandırılmış - bunu, `editor.accessibilitySupport` ayarını düzenleyerek değiştirebilirsiniz.", + "configuredOff": "Düzenleyici hiçbir zaman bir Ekran Okuyucu ile kullanılmak üzere optimize edilmemesi için yapılandırılmış.", + "tabFocusModeOnMsg": "Geçerli düzenleyicide Tab tuşuna basmak odağı bir sonraki odaklanabilir ögeye kaydıracaktır. {0} tuşuna basarak bu davranışı açıp kapatın.", + "tabFocusModeOnMsgNoKb": "Geçerli düzenleyicide Tab tuşuna basmak odağı bir sonraki odaklanabilir ögeye kaydıracaktır. {0} komutu, şu an bir tuş bağı ile tetiklenemez.", + "tabFocusModeOffMsg": "Geçerli düzenleyicide Tab tuşuna basmak bir sekme karakteri ekleyecektir. {0} tuşuna basarak bu davranışı açıp kapatın.", + "tabFocusModeOffMsgNoKb": "Geçerli düzenleyicide Tab tuşuna basmak bir sekme karakteri ekleyecektir. {0} komutu, şu an bir tuş bağı ile tetiklenemez.", + "openDocMac": "Erişilebilirlik ile ilgili daha fazla VS Code bilgisi içeren bir tarayıcı penceresi açmak için Command+H tuşlarına basın.", + "openDocWinLinux": "Erişilebilirlik ile ilgili daha fazla VS Code bilgisi içeren bir tarayıcı penceresi açmak için Control+H tuşlarına basın.", + "outroMsg": "Escape veya Shift+Escape tuşlarına basarak bu ipucunu kapatabilir ve düzenleyiciye dönebilirsiniz.", + "ShowAccessibilityHelpAction": "Erişilebilirlik Yardımını Göster" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json new file mode 100644 index 0000000000000..670ac26134976 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/inspectKeybindings.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbench.action.inspectKeyMap": "Geliştirici: Tuş Eşlemelerini Denetle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json new file mode 100644 index 0000000000000..8b6ad71cd4e6d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/inspectTMScopes.i18n.json @@ -0,0 +1,6 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json new file mode 100644 index 0000000000000..e65b16db179e7 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleMultiCursorModifier.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleLocation": "Çoklu İmleç Değiştiricisini Aç/Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json new file mode 100644 index 0000000000000..5c757ea1565b5 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderControlCharacter.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleRenderControlCharacters": "Kontrol Karakterlerini Aç/Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json new file mode 100644 index 0000000000000..87c50ce448866 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleRenderWhitespace.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleRenderWhitespace": "Boşlukları Görüntülemeyi Aç/Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json new file mode 100644 index 0000000000000..44a5560df3829 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/toggleWordWrap.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggle.wordwrap": "Görünüm: Sözcük Kaydırmasını Aç/Kapat", + "wordWrap.notInDiffEditor": "Diff düzenleyicisinde sözcük kaydırma açılıp kapatılamıyor", + "unwrapMinified": "Bu dosya için sonraki satıra kaydırmayı devre dışı bırak", + "wrapMinified": "Bu dosya için sonraki satıra kaydırmayı etkinleştir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json new file mode 100644 index 0000000000000..01e4868daa1a6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/codeEditor/electron-browser/wordWrapMigration.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wordWrapMigration.ok": "Tamam", + "wordWrapMigration.dontShowAgain": "Tekrar gösterme", + "wordWrapMigration.openSettings": "Ayarları Aç", + "wordWrapMigration.prompt": "`editor.wrappingColumn` ayarı, `editor.wordWrap` yüzünden kullanım dışıdır." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json new file mode 100644 index 0000000000000..a6f34090c4d7d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/breakpointWidget.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "breakpointWidgetExpressionPlaceholder": "İfade değerlendirmesi doğru olduğunda mola ver. Kabul etmek için 'Enter', iptal etmek için 'Esc' tuşuna basın.", + "breakpointWidgetAriaLabel": "Program, burada sadece bu koşul doğruysa durur. Kabul etmek için Enter veya iptal etmek için Escape tuşuna basın. ", + "breakpointWidgetHitCountPlaceholder": "İsabet sayısı koşulu sağlandığında mola ver. Kabul etmek için 'Enter', iptal etmek için 'Esc' tuşuna basın.", + "breakpointWidgetHitCountAriaLabel": "Program, burada sadece isabet sayısı koşulu sağlandığında durur. Kabul etmek için Enter veya iptal etmek için Escape tuşuna basın. ", + "expression": "İfade", + "hitCount": "İsabet Sayısı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json new file mode 100644 index 0000000000000..8a17f02344dcb --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/debugActionItems.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "addConfiguration": "Yapılandırma Ekle...", + "noConfigurations": "Yapılandırma Yok" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/debugActions.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/debugActions.i18n.json new file mode 100644 index 0000000000000..3f796ff047d31 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/debugActions.i18n.json @@ -0,0 +1,49 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openLaunchJson": "{0} Dosyasını Aç", + "launchJsonNeedsConfigurtion": "'launch.json'u Yapılandır veya Düzelt", + "noFolderDebugConfig": "Gelişmiş hata ayıklama yapılandırması yapmak için lütfen ilk olarak bir klasör açın.", + "startDebug": "Hata Ayıklamaya Başla", + "startWithoutDebugging": "Hata Ayıklama Olmadan Başlat", + "selectAndStartDebugging": "Seç ve Hata Ayıklamaya Başla", + "restartDebug": "Yeniden Başlat", + "reconnectDebug": "Yeniden Bağlan", + "stepOverDebug": "Adım At", + "stepIntoDebug": "İçine Adımla", + "stepOutDebug": "Dışına Adımla", + "stopDebug": "Durdur", + "disconnectDebug": "Bağlantıyı Kes", + "continueDebug": "Devam Et", + "pauseDebug": "Duraklat", + "restartFrame": "Çerçeveyi Yeniden Başlat", + "removeBreakpoint": "Kesme Noktasını Kaldır", + "removeAllBreakpoints": "Tüm Kesme Noktalarını Kaldır", + "enableBreakpoint": "Kesme Noktasını Etkinleştir", + "disableBreakpoint": "Kesme Noktasını Devre Dışı Bırak", + "enableAllBreakpoints": "Tüm Kesme Noktalarını Etkinleştir", + "disableAllBreakpoints": "Tüm Kesme Noktalarını Devre Dışı Bırak", + "activateBreakpoints": "Kesme Noktalarını Etkinleştir", + "deactivateBreakpoints": "Kesme Noktalarını Devre Dışı Bırak", + "reapplyAllBreakpoints": "Tüm Kesme Noktalarını Yeniden Uygula", + "addFunctionBreakpoint": "Fonksiyon Kesme Noktası Ekle", + "renameFunctionBreakpoint": "Fonksiyon Kesme Noktasını Kaldır", + "addConditionalBreakpoint": "Koşullu Kesme Noktası Ekle...", + "editConditionalBreakpoint": "Kesme Noktasını Düzenle...", + "setValue": "Değeri Ayarla", + "addWatchExpression": "İfade Ekle", + "editWatchExpression": "İfadeyi Düzenle", + "addToWatchExpressions": "İzlemeye Ekle", + "removeWatchExpression": "İfadeyi Kaldır", + "removeAllWatchExpressions": "Tüm İfadeleri Kaldır", + "clearRepl": "Konsolu Temizle", + "debugConsoleAction": "Hata Ayıklama Konsolu", + "unreadOutput": "Hata Ayıklama Konsolunda Yeni Çıktı", + "debugFocusConsole": "Hata Ayıklama Konsoluna Odakla", + "focusProcess": "İşleme Odakla", + "stepBackDebug": "Geri Adım At", + "reverseContinue": "Tersine Çevir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json new file mode 100644 index 0000000000000..a9c04322e91bf --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/debugActionsWidget.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugToolBarBackground": "Hata ayıklama araç çubuğu arka plan rengi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json new file mode 100644 index 0000000000000..647215e664e9a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/debugContentProvider.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unable": "Hata ayıklama oturumu olmadan kaynak çözümlenemiyor" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json new file mode 100644 index 0000000000000..a5745c5e39e40 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/debugEditorActions.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleBreakpointAction": "Hata Ayıklama: Kesme Noktası Ekle/Kaldır", + "columnBreakpointAction": "Hata Ayıklama: Sütun Kesme Noktası", + "columnBreakpoint": "Sütun Kesme Noktası Ekle", + "conditionalBreakpointEditorAction": "Hata Ayıklama: Koşullu Kesme Noktası Ekle...", + "runToCursor": "İmlece Kadar Çalıştır", + "debugEvaluate": "Hata Ayıklama: Değerlendir", + "debugAddToWatch": "Hata Ayıklama: İzlemeye Ekle", + "showDebugHover": "Hata Ayıklama: Bağlantı Vurgusunu Göster" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json new file mode 100644 index 0000000000000..a9c0632215108 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/debugEditorModelManager.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "breakpointDisabledHover": "Devre Dışı Bırakılmış Kesme Noktası", + "breakpointUnverifieddHover": "Doğrulanmamış Kesme Noktası", + "breakpointDirtydHover": "Doğrulanmamış Kesme Noktası Dosya düzenlendi, lütfen hata ayıklama oturumunu yeniden başlatın.", + "breakpointUnsupported": "Koşullu kesme noktaları bu hata ayıklama türü tarafından desteklenmiyor" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json new file mode 100644 index 0000000000000..6a22d71e97db6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/debugQuickOpen.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, hata ayıklama", + "debugAriaLabel": "Çalıştırılacak bir başlatma yapılandırması adı girin.", + "noConfigurationsMatching": "Eşleyen hata ayıklama yapılandırması yok", + "noConfigurationsFound": "Hiçbir hata ayıklama yapılandırması bulunamadı. Lütfen bir 'launch.json' dosyası oluşturun." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json new file mode 100644 index 0000000000000..3f77729328589 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/exceptionWidget.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugExceptionWidgetBorder": "İstisna aracı kenarlık rengi.", + "debugExceptionWidgetBackground": "İstisna aracı arka plan rengi.", + "exceptionThrownWithId": "İstisna oluştu: {0}", + "exceptionThrown": "İstisna oluştu." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json new file mode 100644 index 0000000000000..a5db6507a7253 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/browser/linkDetector.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileLinkMac": "Takip etmek için tıklayın (Cmd + tıklama yana açar)", + "fileLink": "Takip etmek için tıklayın (Ctrl + tıklama yana açar)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/common/debug.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/common/debug.i18n.json new file mode 100644 index 0000000000000..52e048c8832db --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/common/debug.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "internalConsoleOptions": "Dahili hata ayıklama konsolunun davranışlarını denetler." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/common/debugModel.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/common/debugModel.i18n.json new file mode 100644 index 0000000000000..67633f8688f2a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/common/debugModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "notAvailable": "mevcut değil", + "startDebugFirst": "Lütfen değerlendirilecek bir hata ayıklama oturumu başlatın" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/common/debugSource.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/common/debugSource.i18n.json new file mode 100644 index 0000000000000..6d75e32351224 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/common/debugSource.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unknownSource": "Bilinmeyen Kaynak" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json new file mode 100644 index 0000000000000..14c96d48f155a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debug.contribution.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleDebugViewlet": "Hata Ayıklamayı Göster", + "toggleDebugPanel": "Hata Ayıklama Konsolu", + "debug": "Hata Ayıklama", + "debugPanel": "Hata Ayıklama Konsolu", + "view": "Görüntüle", + "debugCategory": "Hata Ayıklama", + "debugCommands": "Hata Ayıklama Yapılandırması", + "debugConfigurationTitle": "Hata Ayıklama", + "allowBreakpointsEverywhere": "Herhangi bir dosyada kesme noktası ayarlamaya izin verir", + "openExplorerOnEnd": "Bir hata ayıklama oturumunun sonunda otomatik olarak gezgin görünümünü açın", + "inlineValues": "Hata ayıklama sırasında değişken değerlerini düzenleyicide satır içinde göster", + "hideActionBar": "Dolaştırılabilir hata ayıklama eylem çubuğunun gizlenip gizlenmeyeceğini denetler", + "launch": "Global hata ayıklama başlatma yapılandırması. Çalışma alanlarında paylaşılan 'launch.json'a alternatif olarak kullanılmalıdır" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json new file mode 100644 index 0000000000000..614f97b48db79 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "noFolderDebugConfig": "Gelişmiş hata ayıklama yapılandırması yapmak için lütfen ilk olarak bir klasör açın." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json new file mode 100644 index 0000000000000..594cc3a08e1c9 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.i18n.json @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.debuggers": "Hata ayıklama bağdaştırıcılarına ekleme yapar.", + "vscode.extension.contributes.debuggers.type": "Bu hata ayıklama bağdaştırıcısnın benzersiz tanımlayıcısı.", + "vscode.extension.contributes.debuggers.label": "Bu hata ayıklama bağdaştırıcısnın görünen adı.", + "vscode.extension.contributes.debuggers.program": "Hata ayıklama bağdaştırıcı programının yolu. Yol, ya mutlak ya da eklenti klasörüne görelidir.", + "vscode.extension.contributes.debuggers.args": "Bağdaştırıcıya iletilecek ek argümanlar.", + "vscode.extension.contributes.debuggers.runtime": "Program özniteliğinin yürütülebilir olmadığı halde bir çalışma zamanını gerektirmesi durumu için isteğe bağlı çalışma zamanı.", + "vscode.extension.contributes.debuggers.runtimeArgs": "İsteğe bağlı çalışma zamanı argümanları.", + "vscode.extension.contributes.debuggers.variables": "`launch.json` dosyasındaki interaktif değişkenlerin (ör. ${action.pickProcess}) bir komuta eşlenmesi.", + "vscode.extension.contributes.debuggers.initialConfigurations": "İlk 'launch.json' dosyasının üretimi için yapılandırmalar.", + "vscode.extension.contributes.debuggers.languages": "Hata ayıklama eklentisinin, \"varsayılan hata ayıklayıcı\" olarak değerlendirilebileceği diller listesi.", + "vscode.extension.contributes.debuggers.adapterExecutableCommand": "Belirtilirse; VS Code, hata ayıklama bağdaştırıcısı yürütülebilir dosyasının yolunu ve ona gönderilecek argümanları belirlemek için bu komutu çağırır.", + "vscode.extension.contributes.debuggers.startSessionCommand": "Belirtilirse; VS Code, bu eklenti için hedeflenen \"hata ayıklama\" ve \"çalıştır\" eylemleri için bu komutu çağırır.", + "vscode.extension.contributes.debuggers.configurationSnippets": "'launch.json' dosyasına yeni yapılandırmalar ekleme parçacıkları.", + "vscode.extension.contributes.debuggers.configurationAttributes": "'launch.json' dosyasını doğrulayacak JSON şema yapılandırmaları.", + "vscode.extension.contributes.debuggers.windows": "Windows'a özel ayarlar.", + "vscode.extension.contributes.debuggers.windows.runtime": "Windows'da kullanılacak çalışma zamanı.", + "vscode.extension.contributes.debuggers.osx": "OS X'e özel ayarlar.", + "vscode.extension.contributes.debuggers.osx.runtime": "OS X'de kullanılacak çalışma zamanı.", + "vscode.extension.contributes.debuggers.linux": "Linux'a özel ayarlar.", + "vscode.extension.contributes.debuggers.linux.runtime": "Linux'da kullanılacak çalışma zamanı.", + "vscode.extension.contributes.breakpoints": "Kesme noktalarına ekleme yapar.", + "vscode.extension.contributes.breakpoints.language": "Bu dil için kesme noktalarını etkinleştir.", + "app.launch.json.title": "Başlat", + "app.launch.json.version": "Bu dosya biçiminin sürümü.", + "app.launch.json.configurations": "Yapılandırma listesi. IntelliSense kullanarak yeni yapılandırmalar ekleyin veya mevcut olanları düzenleyin.", + "app.launch.json.compounds": "Bileşikler listesi. Her bileşik, birlikte çalıştırılacak birden çok yapılandırmaya başvurur.", + "app.launch.json.compound.name": "Bileşiğin adı. Başlatma yapılandırması açılır kutu menüsünde görünür.", + "app.launch.json.compounds.configurations": "Bu bileşiğin parçası olarak başlatılacak yapılandırmaların adları.", + "debugNoType": "Hata ayıklama bağdaştırıcısının 'type' ögesi atlanabilir veya 'dize' türünde olmalıdır.", + "DebugConfig.failed": " '.vscode' klasörü içinde 'launch.json' dosyası oluşturulamıyor ({0}).", + "selectDebug": "Ortam Seçin" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json new file mode 100644 index 0000000000000..dd1bf89582dc2 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeBreakpoints": "Kesme Noktalarını Kaldır", + "removeBreakpointOnColumn": "{0}. Sütundaki Kesme Noktasını Kaldır", + "removeLineBreakpoint": "Satır Kesme Noktasını Kaldır", + "editBreakpoints": "Kesme Noktalarını Düzenle", + "editBreakpointOnColumn": "{0}. Sütundaki Kesme Noktasını Düzenle", + "editLineBrekapoint": "Satır Kesme Noktasını Düzenle", + "enableDisableBreakpoints": "Kesme Noktalarını Etkinleştir/Devre Dışı Bırak", + "disableColumnBreakpoint": "{0}. Sütundaki Kesme Noktasını Devre Dışı Bırak", + "disableBreakpointOnLine": "Satır Kesme Noktasını Devre Dışı Bırak", + "enableBreakpoints": "{0}. Sütundaki Kesme Noktasını Etkinleştir", + "enableBreakpointOnLine": "Satır Kesme Noktasını Etkinleştir", + "addBreakpoint": "Kesme Noktası Ekle", + "addConfiguration": "Yapılandırma Ekle..." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json new file mode 100644 index 0000000000000..f805425af1401 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugHover.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeAriaLabel": "Hata Ayıklama Bağlantı Vurgusu" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json new file mode 100644 index 0000000000000..d90aab83c4cf0 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugService.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "snapshotObj": "Bu nesne için sadece ilkel türler gösterilir.", + "debuggingPaused": "Hata ayıklama duraklatıldı, sebep {0}, {1} {2}", + "debuggingStarted": "Hata ayıklama başlatıldı.", + "debuggingStopped": "Hata ayıklama durduruldu.", + "breakpointAdded": "Kesme noktası eklendi, {0}. satır, {1} dosyası", + "breakpointRemoved": "Kesme noktası kaldırıldı, {0}. satır, {1} dosyası", + "compoundMustHaveConfigurations": "Bileşik, birden çok yapılandırmayı başlatmak için \"configurations\" özniteliği bulundurmalıdır.", + "configMissing": "'launch.json' dosyasında '{0}' yapılandırması eksik.", + "debugTypeNotSupported": "Yapılandırılan hata ayıklama türü '{0}', desteklenmiyor.", + "debugTypeMissing": "Seçilen başlatma yapılandırması için 'type' özelliği eksik.", + "preLaunchTaskErrors": "'{0}' ön başlatma görevi sırasında derleme hataları algılandı.", + "preLaunchTaskError": "'{0}' ön başlatma görevi sırasında derleme hatası algılandı.", + "preLaunchTaskExitCode": "'{0}' ön başlatma görevi {1} çıkış koduyla sonlandı.", + "debugAnyway": "Yine de Hata Ayıkla", + "noFolderWorkspaceDebugError": "Aktif dosyada hata ayıklama yapılamıyor. Lütfen, dosyanın diskte kayıtlı olduğundan ve bu dosya türü için hata ayıklama eklentinizin olduğundan emin olun.", + "NewLaunchConfig": "Lütfen uygulamanızın başlatma yapılandırması dosyasını ayarlayın. {0}", + "DebugTaskNotFound": "'{0}' ön başlatma görevi bulunamadı.", + "differentTaskRunning": "Çalışan bir {0} görevi var. Ön başlatma görevi {1} çalıştırılamıyor." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json new file mode 100644 index 0000000000000..823377981dd96 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugViewer.i18n.json @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "process": "İşlem", + "paused": "Duraklatıldı", + "running": "Çalışıyor", + "thread": "İş Parçacığı", + "pausedOn": "{0} Üzerinde Duraklatıldı", + "loadMoreStackFrames": "Daha Fazla Yığın Çerçevesi Yükleyin", + "threadAriaLabel": "{0} iş parçacığı, çağrı yığını, hata ayıklama", + "stackFrameAriaLabel": "Yığın Çerçevesi {0} satır {1} {2}, çağrı yığını, hata ayıklama", + "variableValueAriaLabel": "Yeni değişken adını girin", + "variableScopeAriaLabel": "{0} kapsamı, değişkenler, hata ayıklama", + "variableAriaLabel": "{0} değeri {1}, değişkenler, hata ayıklama", + "watchExpressionPlaceholder": "İzlenecek ifade", + "watchExpressionInputAriaLabel": "İzleme ifadesi girin", + "watchExpressionAriaLabel": "{0} değeri {1}, izleme, hata ayıklama", + "watchVariableAriaLabel": "{0} değeri {1}, izleme, hata ayıklama", + "functionBreakpointPlaceholder": "Mola verilecek fonksiyon", + "functionBreakPointInputAriaLabel": "Fonksiyon kesme noktasını girin", + "functionBreakpointsNotSupported": "Fonksiyon kesme noktaları bu hata ayıklama türü tarafından desteklenmiyor", + "breakpointAriaLabel": "Kesme noktası satır {0} {1}, kesme noktaları, hata ayıklama", + "functionBreakpointAriaLabel": "Fonksiyon kesme noktası {0}, kesme noktaları, hata ayıklama", + "exceptionBreakpointAriaLabel": "İstisna kesme noktası {0}, kesme noktaları, hata ayıklama" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json new file mode 100644 index 0000000000000..8a92525c7f53a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/debugViews.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "variablesSection": "Değişkenler Bölümü", + "variablesAriaTreeLabel": "Hata Ayıklama Değişkenleri", + "expressionsSection": "İfadeler Bölümü", + "watchAriaTreeLabel": "Hata Ayıklama İzleme İfadeleri", + "callstackSection": "Çağrı Yığını Bölümü", + "debugStopped": "{0} Üzerinde Duraklatıldı", + "callStackAriaLabel": "Hata Ayıklama Çağrı Yığını", + "breakpointsSection": "Kesme Noktaları Bölümü", + "breakpointsAriaTreeLabel": "Hata Ayıklama Kesme Noktaları" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json new file mode 100644 index 0000000000000..52d6e60d75054 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/electronDebugActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copyValue": "Değeri Kopyala", + "copy": "Kopyala", + "copyAll": "Tümünü Kopyala", + "copyStackTrace": "Çağrı Yığınını Kopyala" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json new file mode 100644 index 0000000000000..68bc0009a9cd5 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/rawDebugSession.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "moreInfo": "Daha Fazla Bilgi", + "unableToLaunchDebugAdapter": "'{0}' tarafından hata ayıklama bağdaştırıcısı başlatılamadı.", + "unableToLaunchDebugAdapterNoArgs": "Hata ayıklama bağdaştırıcısı başlatılamıyor.", + "stoppingDebugAdapter": "{0}. Hata ayıklama bağdaştırıcısı durduruluyor.", + "debugAdapterCrash": "Hata ayıklama bağdaştırıcısı beklenmeyen biçimde sonlandırıldı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json new file mode 100644 index 0000000000000..f3b84b06d7c2b --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/repl.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "replAriaLabel": "Oku Değerlendir Yaz Döngüsü Paneli", + "actions.repl.historyPrevious": "Önceki Geçmiş", + "actions.repl.historyNext": "Sonraki Geçmiş", + "actions.repl.acceptInput": "REPL Girdiyi Kabul Et", + "actions.repl.copyAll": "Hata Ayıklama: Konsol Tümünü Kopyala" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json new file mode 100644 index 0000000000000..3ee7a24156632 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/replViewer.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "stateCapture": "Nesne durumu ilk değerlendirmeden alındı", + "replVariableAriaLabel": "{0} değişkeni, {1} değerine sahip, oku değerlendir yaz döngüsü, hata ayıklama", + "replExpressionAriaLabel": "{0} ifadesi, {1} değerine sahip, oku değerlendir yaz döngüsü, hata ayıklama", + "replValueOutputAriaLabel": "{0}, oku değerlendir yaz döngüsü, hata ayıklama", + "replKeyValueOutputAriaLabel": "{0} çıktı değişkeni, {1} değerine sahip, oku değerlendir yaz döngüsü, hata ayıklama" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json new file mode 100644 index 0000000000000..9d6394edd4c83 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/statusbarColorProvider.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "statusBarDebuggingBackground": "Bir programda hata ayıklama yapılırken durum çubuğu arka plan rengi. Durum çubuğu, pencerenin alt kısmında gösterilir.", + "statusBarDebuggingForeground": "Bir programda hata ayıklama yapılırken durum çubuğu ön plan rengi. Durum çubuğu, pencerenin alt kısmında gösterilir." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json new file mode 100644 index 0000000000000..b5f38fd9078de --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/electron-browser/terminalSupport.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debug.terminal.title": "hata ayıklanan", + "debug.terminal.not.available.error": "Entegre terminal mevcut değil" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json b/i18n/trk/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json new file mode 100644 index 0000000000000..6d21fb46e92fe --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/debug/node/debugAdapter.i18n.json @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "debugAdapterBinNotFound": "Hata ayıklama bağdaştırıcısı yürütülebilir dosyası '{0}', mevcut değil.", + "debugAdapterCannotDetermineExecutable": "Hata ayıklama bağdaştırıcısı yürütülebilir dosyası '{0}' belirlenemedi.", + "debugType": "Yapılandırma türü.", + "debugTypeNotRecognised": "Hata ayıklama türü tanınmıyor. Karşılık gelen hata ayıklama uzantısı yüklemiş olduğunuzdan ve etkinleştirildiğinden emin olun.", + "node2NotSupported": "\"node2\" artık desteklenmiyor, bunun yerine \"node\" kullanın ve \"protocol\" özniteliğini \"inspector\" olarak ayarlayın.", + "debugName": "Yapılandırmanın adı; başlatma yapılandırması açılır kutu menüsünde görünür.", + "debugRequest": "Yapılandırmanın istek türü. \"launch\" veya \"attach\" olabilir.", + "debugServer": "Sadece eklenti geliştirme hata ayıklaması için: eğer port belirtildiyse; Vs Code, bir hata ayıklama bağdaştırıcısına sunucu modunda bağlanmayı dener", + "debugPrelaunchTask": "Hata ayıklama oturumu başlamadan önce çalıştırılacak görev.", + "debugWindowsConfiguration": "Windows'a özel başlangıç yapılandırması öznitelikleri.", + "debugOSXConfiguration": "OS X'e özel başlangıç yapılandırması öznitelikleri.", + "debugLinuxConfiguration": "Linux'a özel başlangıç yapılandırması öznitelikleri.", + "deprecatedVariables": "'env.', 'config.' ve 'command.' kullanım dışıdır, bunların yerine 'env:', 'config:' ve 'command:' kulanın." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json new file mode 100644 index 0000000000000..7e019e4d696c1 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/browser/actions/showEmmetCommands.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showEmmetCommands": "Emmet Komutlarını Göster" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json new file mode 100644 index 0000000000000..7f2cf686977fa --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/balance.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "balanceInward": "Emmet: Dengele (içe)", + "balanceOutward": "Emmet: Dengele (dışa)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json new file mode 100644 index 0000000000000..7832e96768804 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/editPoints.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "previousEditPoint": "Emmet: Önceki Düzenleme Noktasına Git", + "nextEditPoint": "Emmet: Sonraki Düzenleme Noktasına Git" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json new file mode 100644 index 0000000000000..77713e86bc0f3 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/evaluateMath.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "evaluateMathExpression": "Emmet: Matematik İfadesini Değerlendir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json new file mode 100644 index 0000000000000..53b34ac42e8e6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "expandAbbreviationAction": "Emmet: Kısaltmayı Genişlet" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json new file mode 100644 index 0000000000000..6692ba5badb5f --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/incrementDecrement.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "incrementNumberByOneTenth": "Emmet: 0.1 Arttır", + "incrementNumberByOne": "Emmet: 1 Arttır", + "incrementNumberByTen": "Emmet: 10 Arttır", + "decrementNumberByOneTenth": "Emmet: 0.1 Azalt", + "decrementNumberByOne": "Emmet: 1 Azalt", + "decrementNumberByTen": "Emmet: 10 Azalt" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json new file mode 100644 index 0000000000000..0bae8eb938d2e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/matchingPair.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "matchingPair": "Emmet: Eşleşen Çifte Git" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json new file mode 100644 index 0000000000000..a083c13f1e58e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/mergeLines.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "mergeLines": "Emmet: Satırları Birleştir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json new file mode 100644 index 0000000000000..8cceaedbe4bf5 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/reflectCssValue.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reflectCSSValue": "Emmet: CSS Değerini Yansıt" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json new file mode 100644 index 0000000000000..13f4115a719a4 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/removeTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "removeTag": "Emmet: Etiketi Sil" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json new file mode 100644 index 0000000000000..2507b6d025bbe --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/selectItem.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectPreviousItem": "Emmet: Önceki Ögeyi Seç", + "selectNextItem": "Emmet: Sonraki Ögeyi Seç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json new file mode 100644 index 0000000000000..c64d4ead15465 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/splitJoinTag.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "splitJoinTag": "Emmet: Etiketi Böl/Birleştir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json new file mode 100644 index 0000000000000..4f88ade10dcc8 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/toggleComment.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleComment": "Emmet: Yorumu Aç/Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json new file mode 100644 index 0000000000000..862f8163fb481 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/updateImageSize.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateImageSize": "Emmet: Görüntü Boyutunu Güncelle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json new file mode 100644 index 0000000000000..48f159524925d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/updateTag.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateTag": "Emmet: Etiketi Güncelle", + "enterTag": "Etiketi Gir", + "tag": "Etiket" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json new file mode 100644 index 0000000000000..678b349f5715a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/actions/wrapWithAbbreviation.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "wrapWithAbbreviationAction": "Emmet: Kısaltma ile Sarmala", + "enterAbbreviation": "Kısaltmayı Gir", + "abbreviation": "Kısaltma" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json new file mode 100644 index 0000000000000..bbcfad4c7f4ad --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/emmet/electron-browser/emmet.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "emmetConfigurationTitle": "Emmet", + "triggerExpansionOnTab": "Etkinleştirildiğinde, emmet kısaltmaları TAB tuşuna basıldığında genişletilir.", + "emmetPreferences": "Emmet'in bazı eylemleri ve çözümleyicilerinin davranışını değiştirmek için kullanılacak tercihler.", + "emmetSyntaxProfiles": "Belirtilen sentaks için profil tanımlayın veya kendi profilinizi belirli kurallarla kullanın.", + "emmetExclude": "Emmet kısaltmalarının genişletilmeyeceği bir diller dizisi.", + "emmetExtensionsPath": "Emmet profileri, parçacıkları ve tercihlerini içeren bir klasör yolu.", + "useNewEmmet": "Tüm emmet özellikleri için yeni emmet modüllerini deneyin(sonunda eski tekil emmet kütüphanesinin yerini alacaktır)." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json new file mode 100644 index 0000000000000..72d4755b5b475 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/execution/electron-browser/terminal.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalConfigurationTitle": "Harici Terminal", + "terminal.external.windowsExec": "Windows'da hangi terminalin çalışacağını ayarlar.", + "terminal.external.osxExec": "OS X'de hangi terminalin çalışacağını ayarlar.", + "terminal.external.linuxExec": "Linux'da hangi terminalin çalışacağını ayarlar.", + "globalConsoleActionWin": "Yeni Komut İstemi Aç", + "globalConsoleActionMacLinux": "Yeni Terminal Aç", + "scopedConsoleActionWin": "Komut İsteminde Aç", + "scopedConsoleActionMacLinux": "Terminalde Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json b/i18n/trk/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json new file mode 100644 index 0000000000000..6e763ea86813d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/execution/electron-browser/terminalService.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "console.title": "VS Code Konsolu", + "mac.terminal.script.failed": "'{0}' betiği, {1} çıkış koduyla başarısız oldu", + "mac.terminal.type.not.supported": "'{0}' desteklenmiyor", + "press.any.key": "Devam etmek için bir tuşa basın ...", + "linux.term.failed": "'{0}', {1} çıkış koduyla başarısız oldu" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json new file mode 100644 index 0000000000000..1341aa7a5fab0 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorer.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.view": "Özel görünüme ekleme yapar", + "vscode.extension.contributes.view.id": "vscode.workspace.createTreeView aracılığıyla oluşturulan görünümü tanımlamak için kullanılan benzersiz kimlik", + "vscode.extension.contributes.view.label": "Görünümde gösterilecek insanlar tarafından okunabilir dize", + "vscode.extension.contributes.view.icon": "Görünüm simgesinin yolu", + "vscode.extension.contributes.views": "Özel görünümlere ekleme yapar", + "showViewlet": "{0}'i Göster", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json b/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json new file mode 100644 index 0000000000000..f9ce5d1c2d7ed --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorerActions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "refresh": "Yenile" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json b/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json new file mode 100644 index 0000000000000..25fbff908a0e7 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/explorers/browser/treeExplorerService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorer.noMatchingProviderId": "{providerId} kimliği ile kayıtlı \"TreeExplorerNodeProvider\" yok." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json b/i18n/trk/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json new file mode 100644 index 0000000000000..bc360a62ef3a6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/explorers/browser/views/treeExplorerView.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "treeExplorerViewlet.tree": "Ağaç Gezgini Bölümü" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json new file mode 100644 index 0000000000000..36f005e07fc5b --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/browser/dependenciesViewer.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error": "Hata", + "Unknown Dependency": "Bilinmeyen Bağımlılık:" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json new file mode 100644 index 0000000000000..fd30d687af2a7 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionEditor.i18n.json @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "name": "Eklenti adı", + "extension id": "Eklenti tanımlayıcısı", + "publisher": "Yayıncı adı", + "install count": "Yüklenme sayısı", + "rating": "Derecelendirme", + "license": "Lisans", + "details": "Detaylar", + "contributions": "Eklemeler", + "changelog": "Değişim Günlüğü", + "dependencies": "Bağımlılıklar", + "noReadme": "README dosyası yok.", + "noChangelog": "Değişim günlüğü yok.", + "noContributions": "Hiçbir Ekleme Yapmıyor", + "noDependencies": "Bağımlılık Yok", + "settings": "Ayarlar ({0})", + "setting name": "Adı", + "description": "Açıklama", + "default": "Varsayılan", + "debuggers": "Hata Ayıklayıcılar ({0})", + "debugger name": "Adı", + "views": "Görünümler ({0})", + "view id": "ID", + "view name": "Adı", + "view location": "Yeri", + "themes": "Temalar ({0})", + "JSON Validation": "JSON Doğrulama ({0})", + "commands": "Komutlar ({0})", + "command name": "Adı", + "keyboard shortcuts": "Klavye Kısayolları", + "menuContexts": "Menü Bağlamları", + "languages": "Diller ({0})", + "language id": "ID", + "language name": "Adı", + "file extensions": "Dosya Uzantıları", + "grammar": "Gramer", + "snippets": "Parçacıklar" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json new file mode 100644 index 0000000000000..c76e1470bfc35 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsActions.i18n.json @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installAction": "Yükle", + "installing": "Yükleniyor", + "uninstallAction": "Kaldır", + "Uninstalling": "Kaldırılıyor", + "updateAction": "Güncelle", + "updateTo": "{0} sürümüne güncelle", + "enableForWorkspaceAction.label": "Etkinleştir (Çalışma Alanı)", + "enableAlwaysAction.label": "Etkinleştir (Daima)", + "disableForWorkspaceAction.label": "Devre Dışı Bırak (Çalışma Alanı)", + "disableAlwaysAction.label": "Devre Dışı Bırak (Daima)", + "ManageExtensionAction.uninstallingTooltip": "Kaldırılıyor", + "enableForWorkspaceAction": "Çalışma Alanı", + "enableGloballyAction": "Daima", + "enableAction": "Etkinleştir", + "disableForWorkspaceAction": "Çalışma Alanı", + "disableGloballyAction": "Daima", + "disableAction": "Devre Dışı Bırak", + "checkForUpdates": "Güncelleştirmeleri Denetle", + "enableAutoUpdate": "Eklentileri Otomatik Olarak Güncelleştirmeyi Etkinleştir", + "disableAutoUpdate": "Eklentileri Otomatik Olarak Güncelleştirmeyi Devre Dışı Bırak", + "updateAll": "Tüm Eklentileri Güncelle", + "reloadAction": "Yeniden Yükle", + "postUpdateTooltip": "Güncellemek için yeniden yükleyin", + "postUpdateMessage": "Güncellenen '{0}' eklentisini etkinleştirmek için bu pencere yeniden yüklensin mi?", + "postEnableTooltip": "Etkinleştirmek için yeniden yükleyin", + "postEnableMessage": "'{0}' eklentisini etkinleştirmek için bu pencere yeniden yüklensin mi?", + "postDisableTooltip": "Devre dışı bırakmak için yeniden yükleyin", + "postDisableMessage": "'{0}' eklentisini devre dışı bırakmak için bu pencere yeniden yüklensin mi?", + "postUninstallTooltip": "Devre dışı bırakmak için yeniden yükleyin", + "postUninstallMessage": "Kaldırılan '{0}' eklentisini devre dışı bırakmak için bu pencere yeniden yüklensin mi?", + "reload": "Pencereyi &&Yeniden Yükle", + "toggleExtensionsViewlet": "Eklentileri Göster", + "installExtensions": "Eklenti Yükle", + "showInstalledExtensions": "Yüklenen Eklentileri Göster", + "showDisabledExtensions": "Devre Dışı Bırakılan Eklentileri Göster", + "clearExtensionsInput": "Eklenti Girdisini Temizle", + "showOutdatedExtensions": "Eski Eklentileri Göster", + "showPopularExtensions": "Popüler Eklentileri Göster", + "showRecommendedExtensions": "Tavsiye Edilen Eklentileri Göster", + "showWorkspaceRecommendedExtensions": "Çalışma Alanının Tavsiye Ettiği Eklentileri Göster", + "showRecommendedKeymapExtensions": "Tavsiye Edilen Tuş Haritalarını Göster", + "showRecommendedKeymapExtensionsShort": "Tuş Haritaları", + "showLanguageExtensions": "Dil Eklentilerini Göster", + "showLanguageExtensionsShort": "Dil Eklentileri", + "configureWorkspaceRecommendedExtensions": "Tavsiye Edilen Eklentileri Yapılandır (Çalışma Alanı)", + "ConfigureWorkspaceRecommendations.noWorkspace": "Tavsiyeler, sadece çalışma alanı klasöründe mevcuttur.", + "OpenExtensionsFile.failed": " '.vscode' klasörü içinde 'extensions.json' dosyası oluşturulamıyor ({0}).", + "builtin": "Yerleşik", + "disableAll": "Yüklü Tüm Eklentileri Devre Dışı Bırak", + "disableAllWorkspace": "Bu Çalışma Alanı için Yüklü Tüm Eklentileri Devre Dışı Bırak", + "enableAll": "Yüklü Tüm Eklentileri Etkinleştir", + "enableAllWorkspace": "Bu Çalışma Alanı için Yüklü Tüm Eklentileri Etkinleştir", + "extensionButtonProminentBackground": "Dikkat çeken eklenti eylemleri için buton arka plan rengi (ör. yükle butonu)", + "extensionButtonProminentForeground": "Dikkat çeken eklenti eylemleri için buton ön plan rengi (ör. yükle butonu)", + "extensionButtonProminentHoverBackground": "Dikkat çeken eklenti eylemleri için buton bağlantı vurgusu arka plan rengi (ör. yükle butonu)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json new file mode 100644 index 0000000000000..1ac44b7c83d36 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/browser/extensionsQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "manage": "Eklentilerinizi yönetmek için Enter'a basın.", + "searchFor": "Markette '{0}' için arama yapmak için Enter'a basın.", + "noExtensionsToInstall": "Bir eklenti adı girin" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json new file mode 100644 index 0000000000000..006553546294e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/common/extensionsFileTemplate.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "app.extensions.json.title": "Eklentiler", + "app.extensions.json.recommendations": "Eklenti tavsiyelerinin listesi. Bir eklentinin tanımlayıcısı daima '${yayinci}.${ad}' şeklindedir. Örnek: 'vscode.csharp'.", + "app.extension.identifier.errorMessage": "'${yayinci}.${ad}' biçimi bekleniyor. Örnek: 'vscode.csharp'." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json new file mode 100644 index 0000000000000..93faa852946c7 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/common/extensionsInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionsInputName": "Eklenti: {0}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json new file mode 100644 index 0000000000000..640d11588c60d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "reallyRecommended2": "'{0}' eklentisi bu dosya türü için tavsiye edilir.", + "showRecommendations": "Tavsiyeleri Göster", + "neverShowAgain": "Tekrar gösterme", + "close": "Kapat", + "workspaceRecommended": "Bu çalışma alanı bazı eklentileri tavsiye ediyor.", + "ignoreExtensionRecommendations": "Tüm eklenti tavsiyelerini yok saymak istiyor musunuz?", + "ignoreAll": "Evet, Tümünü Yok Say", + "no": "Hayır", + "cancel": "İptal" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json new file mode 100644 index 0000000000000..f6176cf12ddcd --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensions.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "extensionsCommands": "Eklentileri Yönet", + "galleryExtensionsCommands": "Galeri Eklentileri Yükle", + "extension": "Eklenti", + "extensions": "Eklentiler", + "view": "Görüntüle", + "extensionsConfigurationTitle": "Eklentiler", + "extensionsAutoUpdate": "Eklentileri otomatik olarak güncelle", + "extensionsIgnoreRecommendations": "Eklenti tavsiyelerini yok say" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json new file mode 100644 index 0000000000000..25237bc8eadfc --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openExtensionsFolder": "Eklentiler Klasörünü Aç", + "installVSIX": "VSIX'ten yükle...", + "InstallVSIXAction.success": "Eklenti başarıyla yüklendi. Etkinleştirmek için yeniden başlatın.", + "InstallVSIXAction.reloadNow": "Şimdi Yeniden Yükle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json new file mode 100644 index 0000000000000..33992c788d0a5 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsUtils.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "disableOtherKeymapsConfirmation": "Tuş bağlamlarında çakışmalardan kaçınmak için diğer tuş haritaları ({0}) devre dışı bırakılsın mı?", + "yes": "Evet", + "no": "Hayır", + "betterMergeDisabled": "\"Better Merge\" artık yerleşik bir eklenti, yüklenen eklendi devre dışı bırakıldı ve kaldırılabilir.", + "uninstall": "Kaldır", + "later": "Daha Sonra" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json new file mode 100644 index 0000000000000..1a9d49af7b913 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "searchExtensions": "Markette Eklenti Ara", + "extensions": "Eklentiler", + "sort by installs": "Sırala: Yüklenme Sayısına Göre", + "sort by rating": "Sırala: Derecelendirmeye Göre", + "sort by name": "Sırala: Ada Göre", + "no extensions found": "Eklenti yok.", + "suggestProxyError": "Market, 'ECONNREFUSED' döndürdü. Lütfen 'http.proxy' ayarını kontrol edin.", + "outdatedExtensions": "{0} Eski Eklenti" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json b/i18n/trk/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json new file mode 100644 index 0000000000000..c0336e592435d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/extensions/node/extensionsWorkbenchService.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "enableDependeciesConfirmation": "'{0}' eklentisini etkinleştirdiğinizde onun bağımlılıkları da etkinleştirilir. Devam etmek istiyor musunuz?", + "enable": "Evet", + "doNotEnable": "Hayır", + "disableDependeciesConfirmation": "Yalnızca '{0}' eklentisini mi devre dışı bırakmak istersiniz yoksa bağımlılıklarını da devre dışı bırakmak ister misiniz?", + "disableOnly": "Sadece Eklenti", + "disableAll": "Tümü", + "cancel": "İptal", + "singleDependentError": "'{0}' eklentisi devre dışı bırakılamıyor. '{1}' eklentisi buna bağlı.", + "twoDependentsError": "'{0}' eklentisi devre dışı bırakılamıyor. '{1}' ve '{2}' eklentileri buna bağlı.", + "multipleDependentsError": "'{0}' eklentisi devre dışı bırakılamıyor. '{1}, '{2}' eklentileri ve diğerleri buna bağlı." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json b/i18n/trk/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json new file mode 100644 index 0000000000000..d8da171200fdf --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/feedback/electron-browser/feedback.i18n.json @@ -0,0 +1,25 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "sendFeedback": "Geri Bildirimi Tweet'le", + "label.sendASmile": "Geri bildiriminizi bize Tweet'leyin.", + "patchedVersion1": "Kurulumunuz bozuk.", + "patchedVersion2": "Eğer bir hata gönderiyorsanız bunu belirtin.", + "sentiment": "Deneyiminiz nasıldı?", + "smileCaption": "Mutlu", + "frownCaption": "Üzgün", + "other ways to contact us": "Bize ulaşmanın diğer yolları", + "submit a bug": "Bir hata gönder", + "request a missing feature": "Eksik bir özellik talebinde bulun", + "tell us why?": "Bize nedenini söyleyin:", + "commentsHeader": "Açıklamalar", + "tweet": "Tweet'le", + "character left": "karakter kaldı", + "characters left": "karakter kaldı", + "feedbackSending": "Gönderiliyor", + "feedbackSent": "Teşekkürler", + "feedbackSendingError": "Yeniden dene" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json new file mode 100644 index 0000000000000..4c60c43f74a29 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/editors/binaryFileEditor.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "binaryFileEditor": "İkili Dosya Görüntüleyici" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json new file mode 100644 index 0000000000000..694dd68c04138 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/editors/textFileEditor.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "textFileEditor": "Metin Dosyası Düzenleyicisi", + "createFile": "Dosya Oluştur", + "fileEditorWithInputAriaLabel": "{0}. Metin dosyası düzenleyici.", + "fileEditorAriaLabel": "Metin dosyası düzenleyici." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json new file mode 100644 index 0000000000000..c9834694967e7 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/fileActions.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "filesCategory": "Dosyalar", + "revealInSideBar": "Kenar Çubuğunda Ortaya Çıkar", + "acceptLocalChanges": "Yerel değişiklikleri kullan ve diskk içeriklerinin üzerine yaz", + "revertLocalChanges": "Yerel değişiklikleri göz ardı et ve diskteki içeriğe geri dön" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/fileActions.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/fileActions.i18n.json new file mode 100644 index 0000000000000..6081aa828c70c --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/fileActions.i18n.json @@ -0,0 +1,73 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "retry": "Yeniden Dene", + "rename": "Yeniden Adlandır", + "newFile": "Yeni Dosya", + "newFolder": "Yeni Klasör", + "openFolderFirst": "İçinde dosyalar veya klasörler oluşturmak için ilk olarak bir klasör açın.", + "newUntitledFile": "Yeni İsimsiz Dosya", + "createNewFile": "Yeni Dosya", + "createNewFolder": "Yeni Klasör", + "deleteButtonLabelRecycleBin": "&&Geri Dönüşüm Kutusuna Taşı", + "deleteButtonLabelTrash": "&&Çöp Kutusuna Taşı", + "deleteButtonLabel": "&&Sil", + "dirtyMessageFolderOneDelete": "1 dosyada kaydedilmemiş değişiklik barındıran bir klasörü siliyorsunuz. Devam etmek istiyor musunuz?", + "dirtyMessageFolderDelete": "{0} dosyada kaydedilmemiş değişiklik barındıran bir klasörü siliyorsunuz. Devam etmek istiyor musunuz?", + "dirtyMessageFileDelete": "Kaydedilmemiş değişiklik barındıran bir dosyayı siliyorsunuz. Devam etmek istiyor musunuz?", + "dirtyWarning": "Değişiklikleriniz, kaydetmezseniz kaybolur.", + "confirmMoveTrashMessageFolder": "'{0}' ve içindekileri silmek istediğinizden emin misiniz?", + "confirmMoveTrashMessageFile": "'{0}' öğesini silmek istediğinize emin misiniz?", + "undoBin": "Geri dönüşüm kutusundan geri alabilirsiniz.", + "undoTrash": "Çöp kutusundan geri alabilirsiniz.", + "confirmDeleteMessageFolder": "'{0}' öğesini ve içindekileri kalıcı olarak silmek istediğinizden emin misiniz?", + "confirmDeleteMessageFile": "'{0}' öğesini kalıcı olarak silmek istediğinizden emin misiniz?", + "irreversible": "Bu eylem geri döndürülemez!", + "permDelete": "Kalıcı Olarak Sil", + "delete": "Sil", + "importFiles": "Dosya İçe Aktar", + "confirmOverwrite": "Hedef klasörde aynı ada sahip bir dosya veya klasör zaten var. Değiştirmek istiyor musunuz?", + "replaceButtonLabel": "&&Değiştir", + "copyFile": "Kopyala", + "pasteFile": "Yapıştır", + "duplicateFile": "Çoğalt", + "openToSide": "Yana Aç", + "compareSource": "Karşılaştırma İçin Seç", + "globalCompareFile": "Aktif Dosyayı Karşılaştır...", + "pickHistory": "Karşılaştırmak için daha önce açılan bir dosyayı seçin", + "unableToFileToCompare": "Seçtiğiniz dosya, '{0}' ile karşılaştırılamaz.", + "openFileToCompare": "Bir başka dosya ile karşılaştırmak için ilk olarak bir dosya açın.", + "compareWith": "'{0}' ile karşılaştır", + "compareFiles": "Dosyaları Karşılaştır", + "refresh": "Yenile", + "save": "Kaydet", + "saveAs": "Farklı Kaydet...", + "saveAll": "Tümünü Kaydet", + "saveAllInGroup": "Gruptaki Tümünü Kadet", + "saveFiles": "Kaydedilmemiş Değişiklikler İçeren Dosyaları Kaydet", + "revert": "Dosyayı Geri Döndür", + "focusOpenEditors": "Açık Düzenleyiciler Görünümüne Odakla", + "focusFilesExplorer": "Dosya Gezginine Odakla", + "showInExplorer": "Aktif Dosyayı Kenar Çubuğunda Ortaya Çıkar", + "openFileToShow": "Gezginde göstermek için ilk olarak bir dosya açın", + "collapseExplorerFolders": "Gezgindeki Klasörleri Daralt", + "refreshExplorer": "Gezgini Yenile", + "openFile": "Dosya Aç...", + "openFileInNewWindow": "Aktif Dosyayı Yeni Pencerede Aç", + "openFileToShowInNewWindow": "Yeni pencerede açmak için ilk olarak bir dosya açın", + "revealInWindows": "Gezginde Ortaya Çıkar", + "revealInMac": "Finder'da Ortaya Çıkar", + "openContainer": "İçeren Klasörü Aç", + "revealActiveFileInWindows": "Aktif Dosyayı Windows Gezgini'nde Ortaya Çıkar", + "revealActiveFileInMac": "Aktif Dosyayı Finder'da Ortaya Çıkar", + "openActiveFileContainer": "Aktif Dosyayı İçeren Klasörü Aç", + "copyPath": "Yolu Kopyala", + "copyPathOfActive": "Aktif Dosyanın Yolunu Kopyala", + "emptyFileNameError": "Bir dosya veya klasör adı sağlanması gerekiyor.", + "fileNameExistsError": "Bu konumda bir **{0}** dosyası veya klasörü zaten mevcut. Lütfen başka bir ad seçin.", + "invalidFileNameError": "**{0}** adı, bir dosya veya klasör adı olarak geçerli değildir. Lütfen başka bir ad seçin.", + "filePathTooLongError": "**{0}** adı çok uzun bir yol ile sonuçlanıyor. Lütfen daha kısa bir ad seçin." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/fileCommands.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/fileCommands.i18n.json new file mode 100644 index 0000000000000..699305824d3ed --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/fileCommands.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFileToCopy": "Yolunu kopyalamak için ilk olarak bir dosya açın", + "openFileToReveal": "Ortaya çıkarmak için ilk olarak bir dosya açın" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/files.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/files.contribution.i18n.json new file mode 100644 index 0000000000000..ab865812eb837 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/files.contribution.i18n.json @@ -0,0 +1,41 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showExplorerViewlet": "Gezgini Göster", + "explore": "Gezgin", + "view": "Görüntüle", + "textFileEditor": "Metin Dosyası Düzenleyicisi", + "binaryFileEditor": "İkili Dosya Düzenleyicisi", + "filesConfigurationTitle": "Dosyalar", + "exclude": "Dosya ve klasörleri hariç tutmak için glob desenlerini yapılandırın.", + "files.exclude.boolean": "Dosya yollarının eşleştirileceği glob deseni. Deseni etkinleştirmek veya devre dışı bırakmak için true veya false olarak ayarlayın.", + "files.exclude.when": "Eşleşen bir dosyanın eşdüzey dosyalarında ek denetim. Eşleşen dosya adı için değişken olarak $(basename) kullanın.", + "associations": "Dillerle dosya ilişkilendirmelerini yapılandırın (ör. \"*.uzanti\": \"html\"). Bunların, kurulu olan dillerin varsayılan ilişkilendirmeleri karşısında önceliği vardır.", + "encoding": "Dosyalar okunurken ve yazılırken kullanılacak varsayılan karakter kümesi kodlaması.", + "autoGuessEncoding": "Etkinleştirildiğinde, dosyaları açarken karakter kümesini tahmin etmeye çalışır", + "eol": "Varsayılan satır sonu karakteri. LF için \\n ve CRLF için \\r\\n kullan.", + "trimTrailingWhitespace": "Etkinleştirildiğinde, bir dosyayı kaydettiğinizde sondaki boşluk kırpılır.", + "insertFinalNewline": "Etkinleştirildiğinde, bir dosyayı kaydederken dosya sonuna bir boş satır ekler.", + "files.autoSave.off": "Kaydedilmemiş değişiklikler içeren bir dosya hiçbir zaman otomatik olarak kaydedilmez.", + "files.autoSave.afterDelay": "Kaydedilmemiş değişiklikler içeren bir dosya, 'files.autoSaveDelay' ayarlandıktan sonra otomatik olarak kaydedilir.", + "files.autoSave.onFocusChange": "Kaydedilmemiş değişiklikler içeren bir dosya, düzenleyici odaktan çıktığı an otomatik olarak kaydedilir.", + "files.autoSave.onWindowChange": "Kaydedilmemiş değişiklikler içeren bir dosya, pencere odaktan çıktığı an otomatik olarak kaydedilir.", + "autoSave": "Kaydedilmemiş değişiklikler içeren dosyaların otomatik kaydedilmesini denetler. Kabul edilen değerler: '{0}', '{1}', '{2}' (düzenleyici odaktan çıktığında), '{3}' (pencere odaktan çıktığında). '{4}' olarak ayarlanırsa, gecikmeyi 'files.autoSaveDelay' ile ayarlayabilirsiniz.", + "autoSaveDelay": "Kaydedilmemiş değişiklikler içeren bir dosyanın kaç ms gecikmeli otomatik olarak kaydedileceğini denetler. Sadece 'files.autoSave', '{0}' olarak ayarlandığında uygulanır.", + "watcherExclude": "Dosya izlemeden hariç tutulacak dosya yollarının glob desenlerini yapılandırın. Bu ayar değiştiğinde yeniden başlatma gerektirir. Code'un başlangıçta çok fazla CPU zamanı harcadığını görürseniz, başlangıç yüklemesini azaltmak için büyük klasörleri hariç tutabilirsiniz.", + "hotExit.off": "Hızlı çıkışı devre dışı bırak.", + "hotExit.onExit": "Hızlı çıkış, uygulama kapandığında tetiklenir, yani Windows/Linux'da son pencere kapandığında veya workbench.action.quit komutu tetiklendiği zaman (komut paleti, tuş bağı, menü). Bir sonraki başlatmada tüm pencereler yedekleriyle geri yüklenir.", + "hotExit.onExitAndWindowClose": "Hızlı çıkış, uygulama kapandığında tetiklenir, yani Windows/Linux'da son pencere kapandığında veya workbench.action.quit komutu tetiklendiği zaman (komut paleti, tuş bağı, menü), ve ayrıca son pencere olmasından bağımsız açık bir klasör bulunan herhangi bir pencere varsa. Bir sonraki başlatmada tüm pencereler yedekleriyle geri yüklenir. Klasör pencerelerini kapatılmadan önceki konumlarına geri yüklemek için \"window.restoreWindows\" ögesini \"all\" olarak ayarlayın.", + "hotExit": "Oturumlar arasında kaydedilmemiş dosyaların hatırlanıp hatırlanmayacağını denetler, düzenleyiciden çıkarken kaydetmek için izin istenmesi atlanacaktır.", + "defaultLanguage": "Yeni dosyalara atanan varsayılan dil modu.", + "editorConfigurationTitle": "Düzenleyici", + "formatOnSave": "Dosyayı kaydederken biçimlendir. Bir biçimlendirici mevcut olmalıdır, dosya otomatik olarak kaydedilmemelidir, ve düzenleyici kapanmıyor olmalıdır.", + "explorerConfigurationTitle": "Dosya Gezgini", + "openEditorsVisible": "Açık Editörler bölmesinde gösterilen düzenleyici sayısı. Bölmeyi gizlemek için 0 olarak ayarlayın.", + "dynamicHeight": "Açık düzenleyiciler bölümü yüksekliğinin öge sayısına göre dinamik olarak uyarlanıp uyarlanmayacağını denetler.", + "autoReveal": "Gezginin dosyaları açarken, onları otomatik olarak ortaya çıkartmasını ve seçmesini denetler.", + "enableDragAndDrop": "Gezgeinin sürükle bırak ile dosyaları ve klasörleri taşımaya izin verip vermeyeceğini denetler." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json new file mode 100644 index 0000000000000..09d9b7607bd56 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/saveErrorHandler.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "discard": "At", + "overwrite": "Üzerine Yaz", + "retry": "Yeniden Dene", + "readonlySaveError": "'{0}' kaydedilemedi: Dosya yazmaya karşı korunuyor. Korumayı kaldırmak için 'Üzerine Yaz'ı seçin.", + "genericSaveError": "'{0}' kaydedilemedi: ({1}).", + "staleSaveError": "'{0}' kaydedilemedi: Diskteki içerik daha yeni. Sizdeki sürüm ile disktekini karşılaştırmak için **Karşılaştır**a tıklayın.", + "compareChanges": "Karşılaştır", + "saveConflictDiffLabel": "{0} (diskte) ↔ {1} ({2} uygulamasında) - Kaydetme çakışmasını çöz", + "userGuide": "Değişikliklerinizi **geri al**mak veya diskteki içeriğin **üzerine yaz**mak için düzenleyicideki araç çubuğunu kullanabilirsiniz" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json new file mode 100644 index 0000000000000..298fda23b221a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/views/emptyView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Dosya Gezgini Bölümü", + "openFolder": "Klasör Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json new file mode 100644 index 0000000000000..d8b937fc203b5 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/views/explorerView.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "explorerSection": "Dosya Gezgini Bölümü", + "treeAriaLabel": "Dosya Gezgini" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json new file mode 100644 index 0000000000000..9dff53f0852e4 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/views/explorerViewer.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInputAriaLabel": "Dosya adı girin. Onaylamak için Enter'a, iptal etmek için Escape tuşuna basın.", + "filesExplorerViewerAriaLabel": "{0}, Dosya Gezgini", + "confirmOverwriteMessage": "'{0}' hedef klasörde zaten mevcut. Değiştirmek istiyor musunuz?", + "irreversible": "Bu eylem geri döndürülemez!", + "replaceButtonLabel": "&&Değiştir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json new file mode 100644 index 0000000000000..aa9de346ffc7c --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/views/openEditorsView.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openEditors": "Açık Düzenleyiciler", + "openEditosrSection": "Açık Düzenleyiciler Bölümü", + "treeAriaLabel": "Açık Düzenleyiciler: Aktif Dosyaların Listesi", + "dirtyCounter": "{0} kaydedilmemiş" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json b/i18n/trk/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json new file mode 100644 index 0000000000000..172555e1368b6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/browser/views/openEditorsViewer.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGroupAriaLabel": "{0}, Düzenleyici Grubu", + "openEditorAriaLabel": "{0}, Açık Düzenleyici", + "saveAll": "Tümünü Kaydet", + "closeAllUnmodified": "Değiştirilmeyenleri Kapat", + "closeAll": "Tümünü Kapat", + "close": "Kapat", + "closeOthers": "Diğerlerini Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json b/i18n/trk/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json new file mode 100644 index 0000000000000..0f88a5b2332ee --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/common/dirtyFilesTracker.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "dirtyFiles": "{0} kaydedilmemiş dosya" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json b/i18n/trk/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json new file mode 100644 index 0000000000000..59355f869fc0c --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/files/common/editors/fileEditorInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "orphanedFile": "{0} (diskten silindi)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/html/browser/html.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/html/browser/html.contribution.i18n.json new file mode 100644 index 0000000000000..f9aa2193402ca --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/html/browser/html.contribution.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.editor.label": "Html Önizlemesi" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json b/i18n/trk/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json new file mode 100644 index 0000000000000..13f1ae29ec664 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/html/browser/htmlPreviewPart.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "html.voidInput": "Geçersiz düzenleyici girdisi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/html/browser/webview.i18n.json b/i18n/trk/src/vs/workbench/parts/html/browser/webview.i18n.json new file mode 100644 index 0000000000000..cc23f3edf72e5 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/html/browser/webview.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "devtools.webview": "Geliştirici: Web Görünümü Araçları" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/markers/common/messages.i18n.json b/i18n/trk/src/vs/workbench/parts/markers/common/messages.i18n.json new file mode 100644 index 0000000000000..80f988e1d75dd --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/markers/common/messages.i18n.json @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewCategory": "Görüntüle", + "problems.view.show.label": "Sorunları Göster", + "problems.panel.configuration.title": "Sorunlar Görünümü", + "problems.panel.configuration.autoreveal": "Sorunlar görünümünün; dosyalar açılırken, dosyaları otomatik olarak ortaya çıkarıp çıkarmayacağını denetler.", + "markers.panel.title.problems": "Sorunlar", + "markers.panel.aria.label.problems.tree": "Dosyalara göre gruplandırılmış sorunlar", + "markers.panel.no.problems.build": "Şu ana kadar çalışma alanında herhangi bir sorun tespit edilmedi.", + "markers.panel.no.problems.filters": "Belirtilen süzgeç ölçütleriyle sonuç bulunamadı", + "markers.panel.action.filter": "Sorunları Süz", + "markers.panel.filter.placeholder": "Türe veya metne göre süz", + "markers.panel.filter.errors": "hatalar", + "markers.panel.filter.warnings": "uyarılar", + "markers.panel.filter.infos": "bilgilendirmeler", + "markers.panel.single.error.label": "1 Hata", + "markers.panel.multiple.errors.label": "{0} Hata", + "markers.panel.single.warning.label": "1 Uyarı", + "markers.panel.multiple.warnings.label": "{0} Uyarı", + "markers.panel.single.info.label": "1 Bilgilendirme", + "markers.panel.multiple.infos.label": "{0} Bilgilendirme", + "markers.panel.single.unknown.label": "1 Bilinmeyen", + "markers.panel.multiple.unknowns.label": "{0} Bilinmeyen", + "markers.panel.at.ln.col.number": "({0}, {1})", + "problems.tree.aria.label.resource": "{0} {1} sorun içeriyor", + "problems.tree.aria.label.error.marker": "{0} tarafından oluşturulan hata: {2}. satırın {3}. karakterinde {1}", + "problems.tree.aria.label.error.marker.nosource": "Hata: {1}. satırın {2}. karakterinde {0}", + "problems.tree.aria.label.warning.marker": "{0} tarafından oluşturulan uyarı: {2}. satırın {3}. karakterinde {1}", + "problems.tree.aria.label.warning.marker.nosource": "Uyarı: {1}. satırın {2}. karakterinde {0}", + "problems.tree.aria.label.info.marker": "{0} tarafından oluşturulan bilgilendirme: {2}. satırın {3}. karakterinde {1}", + "problems.tree.aria.label.info.marker.nosource": "Bilgilendirme: {1}. satırın {2}. karakterinde {0}", + "problems.tree.aria.label.marker": "{0} tarafından oluşturulan sorun: {2}. satırın {3}. karakterinde {1}", + "problems.tree.aria.label.marker.nosource": "Sorun: {1}. satırın {2}. karakterinde {0}", + "errors.warnings.show.label": "Hataları ve Uyarıları Göster" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json b/i18n/trk/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json new file mode 100644 index 0000000000000..22387f166cb25 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/markers/electron-browser/markersElectronContributions.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copyMarker": "Kopyala" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..821add9841da1 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/nps/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Hızlı bir geri bildirim anketine katılmak ister misiniz?", + "takeSurvey": "Ankete Katıl", + "remindLater": "Daha Sonra Hatırlat", + "neverAgain": "Tekrar Gösterme" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/output/browser/output.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/output/browser/output.contribution.i18n.json new file mode 100644 index 0000000000000..fe8f6125b1a1e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/output/browser/output.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "output": "Çıktı", + "viewCategory": "Görüntüle", + "clearOutput.label": "Çıktıyı Temizle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/output/browser/outputActions.i18n.json b/i18n/trk/src/vs/workbench/parts/output/browser/outputActions.i18n.json new file mode 100644 index 0000000000000..c4f84392df6d6 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/output/browser/outputActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleOutput": "Çıktıyı Aç/Kapat", + "clearOutput": "Çıktıyı Temizle", + "toggleOutputScrollLock": "Çıktı Kaydırma Kilidini Aç/Kapat", + "switchToOutput.label": "Çıktıya Geçiş Yap" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/output/browser/outputPanel.i18n.json b/i18n/trk/src/vs/workbench/parts/output/browser/outputPanel.i18n.json new file mode 100644 index 0000000000000..1fde8c9ce8a0b --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/output/browser/outputPanel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "outputPanelWithInputAriaLabel": "{0}, Çıktı paneli", + "outputPanelAriaLabel": "Çıktı paneli" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/output/common/output.i18n.json b/i18n/trk/src/vs/workbench/parts/output/common/output.i18n.json new file mode 100644 index 0000000000000..cfbabebaa616e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/output/common/output.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "output": "Çıktı", + "channel": "'{0}' için" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json new file mode 100644 index 0000000000000..dc3e6110e3467 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/performance/electron-browser/performance.contribution.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "slow": "Yavaş başlangıç tespit edildi", + "slow.detail": "Az önce yavaş başlangıç yaşadığınız için üzgünüz. Lütfen '{0}' uygulamasını profil oluşturucu etkinleştirilmiş olarak başlatın, profilleri bizle paylaşın, ve biz de başlangıcı yeniden harika yapmak için çok çalışalım.", + "prof.message": "Profiller başarıyla oluşturuldu.", + "prof.detail": "Lütfen bir sorun (bildirimi) oluşturun ve aşağıdaki dosyaları manuel olarak ekleyin:\n{0}", + "prof.restartAndFileIssue": "Sorun Oluştur ve Yeniden Başlat", + "prof.restart": "Yeniden Başlat", + "prof.thanks": "Bize yardımcı olduğunuz için teşekkürler.", + "prof.detail.restart": "'{0}' uygulamasını kullanmaya devam etmek için son bir yeniden başlatma gerekiyor. Katkılarınız için tekrar teşekkür ederiz." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json new file mode 100644 index 0000000000000..68b1055180c52 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingWidgets.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defineKeybinding.initial": "İstenen tuş kombinasyonuna basın ve daha sonra ENTER'a basın. İptal etmek için ESCAPE tuşuna basın.", + "defineKeybinding.chordsTo": "ardından" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json new file mode 100644 index 0000000000000..a67e224c963a4 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditor.i18n.json @@ -0,0 +1,35 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "keybindingsInputName": "Klavye Kısayolları", + "SearchKeybindings.AriaLabel": "Tuş bağlarını ara", + "SearchKeybindings.Placeholder": "Tuş bağlarını ara", + "sortByPrecedene": "Önceliğe Göre Sırala", + "header-message": "Gelişmiş özelleştirmeler için açın ve düzenleyin", + "keybindings-file-name": "keybindings.json", + "keybindingsLabel": "Tuş bağları", + "changeLabel": "Tuş Bağını Değiştir", + "addLabel": "Tuş Bağını Ekle", + "removeLabel": "Tuş Bağını Kaldır", + "resetLabel": "Tuş Bağını Sıfırla", + "showConflictsLabel": "Çakışmaları Göster", + "copyLabel": "Kopyala", + "error": "Tuş bağını düzenlerken '{0}' hatası. Lütfen 'keybindings.json' dosyasını açın ve kontrol edin.", + "command": "Command", + "keybinding": "Tuş bağı", + "source": "Kaynak", + "when": "Koşul", + "editKeybindingLabelWithKey": "{0} Tuş Bağını Değiştir", + "editKeybindingLabel": "Tuş Bağını Değiştir", + "addKeybindingLabelWithKey": "{0} Tuş Bağını Ekle", + "addKeybindingLabel": "Tuş Bağını Ekle", + "commandAriaLabel": "Komut {0}'dır.", + "keybindingAriaLabel": "Tuş bağı {0}'dır.", + "noKeybinding": "Tuş bağı atanmamış.", + "sourceAriaLabel": "Kaynak {0}'dır.", + "whenAriaLabel": "Koşul {0} şeklindedir.", + "noWhen": "Koşul içeriği yok." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json new file mode 100644 index 0000000000000..15d8c9861aed8 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/keybindingsEditorContribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defineKeybinding.start": "Tuş Bağı Tanımla", + "defineKeybinding.kbLayoutErrorMessage": "Bu tuş kombinasyonunu geçerli klavye düzeninizde üretemeyeceksiniz.", + "defineKeybinding.kbLayoutLocalAndUSMessage": "Geçerli klavye düzeniniz için **{0}** (Birleşik Devletler standardı için **{1}**).", + "defineKeybinding.kbLayoutLocalMessage": "Geçerli klavye düzeniniz için **{0}**." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json new file mode 100644 index 0000000000000..76c311091690f --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferences.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultPreferencesEditor": "Varsayılan Tercihler Düzenleyicisi", + "keybindingsEditor": "Tuş Bağları Düzenleyicisi", + "preferences": "Tercihler" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json new file mode 100644 index 0000000000000..0a5d1d96e7e7d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesActions.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openGlobalSettings": "Kullanıcı Ayarlarını Aç", + "openGlobalKeybindings": "Klavye Kısayollarını Aç", + "openGlobalKeybindingsFile": "Klavye Kısayolları Dosyasını Aç", + "openWorkspaceSettings": "Çalışma Alanı Ayarlarını Aç", + "configureLanguageBasedSettings": "Dile Özel Ayarları Yapılandır...", + "languageDescriptionConfigured": "({0})", + "pickLanguage": "Dili Seç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json new file mode 100644 index 0000000000000..be88513af744e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesEditor.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "settingsEditorName": "Varsayılan Ayarlar", + "SearchSettingsWidget.AriaLabel": "Ayarları ara", + "SearchSettingsWidget.Placeholder": "Ayarları Ara", + "totalSettingsMessage": "Toplam {0} Ayar", + "noSettingsFound": "Sonuç Yok", + "oneSettingFound": "1 ayar eşleşti", + "settingsFound": "{0} ayar eşleşti", + "preferencesAriaLabel": "Varsayılan tercihler. Salt okunabilir metin editörü." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json new file mode 100644 index 0000000000000..68b7788b3e0f5 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesRenderers.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "errorInvalidConfiguration": "Ayarlara yazılamıyor. Lütfen dosyadaki hataları/uyarıları düzeltin ve tekrar deneyin.", + "editTtile": "Düzenle", + "replaceDefaultValue": "Ayarlarda Değiştir", + "copyDefaultValue": "Ayarlara Kopyala", + "unsupportedPHPExecutablePathSetting": "Bu ayar, bir Kullanıcı Ayarı olmalıdır. PHP'yi çalışma alanı için yapılandırmak için bir PHP dosyasını açın ve durum çubuğundaki 'PHP Yolu'na tıklayın.", + "unsupportedWorkspaceSetting": "Bu ayar, bir Kullanıcı Ayarı olmalıdır." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json new file mode 100644 index 0000000000000..edeac2f6a8efb --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesService.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openFolderFirst": "Çalışma alanı ayarları oluşturmak için ilk olarak bir klasör açın", + "emptyKeybindingsHeader": "Varsayılanların üzerine yazmak için tuş bağlarınızı bu dosyaya yerleştirin", + "defaultKeybindings": "Varsayılan Tuş Bağları", + "emptySettingsHeader": "Varsayılan ayarların üzerine yazmak için ayarlarınızı bu dosyaya yerleştirin.", + "emptySettingsHeader1": "Varsayılan ayarların ve kullanıcı ayarlarının üzerine yazmak için ayarlarınızı bu dosyaya yerleştirin.", + "fail.createSettings": " '{0}' oluşturulamadı ({1})." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json new file mode 100644 index 0000000000000..1814392bc9671 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/browser/preferencesWidgets.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "settingsSwitcherBarAriaLabel": "Ayar Değiştirici", + "userSettings": "Kullanıcı Ayarları", + "workspaceSettings": "Çalışma Alanı Ayarları" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json new file mode 100644 index 0000000000000..90483c4e7e324 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/common/keybindingsEditorModel.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "default": "Varsayılan", + "user": "Kullanıcı", + "meta": "meta", + "option": "seçenek" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json b/i18n/trk/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json new file mode 100644 index 0000000000000..dc4c28efe529a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/preferences/common/preferencesModels.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commonlyUsed": "Yaygın Olarak Kullanılan", + "defaultKeybindingsHeader": "Tuş bağları dosyanıza yerleştirerek tuş bağlarının üzerine yazın." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json new file mode 100644 index 0000000000000..bef4db281adcc --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/quickopen/browser/commandsHandler.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Tüm Komutları Göster", + "clearCommandHistory": "Komut Geçmişini Temizle", + "showCommands.label": "Komut Paleti...", + "entryAriaLabelWithKey": "{0}, {1}, komutlar", + "entryAriaLabel": "{0}, komutlar", + "canNotRun": "'{0}' komutu buradan çalıştırılamıyor.", + "actionNotEnabled": "'{0}' komutu geçerli bağlamda etkin değil.", + "recentlyUsed": "yakınlarda kullanıldı", + "morecCommands": "diğer komutlar", + "commandLabel": "{0}: {1}", + "cat.title": "{0}: {1}", + "noCommandsMatching": "Eşleşen komut yok" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json new file mode 100644 index 0000000000000..3d25665149913 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/quickopen/browser/gotoLineHandler.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoLine": "Satıra Git...", + "gotoLineLabelEmptyWithLimit": "Gitmek için 1 ile {0} arasında bir satır numarası yazın", + "gotoLineLabelEmpty": "Gidilecek satır numarasını yazın", + "gotoLineColumnLabel": "{0}. satırın {1}. karakterine git", + "gotoLineLabel": "{0} satırına git", + "gotoLineHandlerAriaLabel": "Gidilecek satır numarasını yazın.", + "cannotRunGotoLine": "Satıra gitmek için ilk olarak bir metin dosyası açın" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json new file mode 100644 index 0000000000000..0dfa60b61a4e4 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/quickopen/browser/gotoSymbolHandler.i18n.json @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "gotoSymbol": "Dosyada Sembole Git...", + "symbols": "semboller ({0})", + "method": "yöntemler ({0})", + "function": "fonksiyonlar ({0})", + "_constructor": "oluşturucular ({0})", + "variable": "değişkenler ({0})", + "class": "sınıflar ({0})", + "interface": "arayüzler ({0})", + "namespace": "isim alanları ({0})", + "package": "paketler ({0})", + "modules": "modüller ({0})", + "property": "özellikler ({0})", + "enum": "numaralandırmalar ({0})", + "string": "dizeler ({0})", + "rule": "kurallar ({0})", + "file": "dosyalar ({0})", + "array": "diziler ({0})", + "number": "sayılar ({0})", + "boolean": "boole değerleri ({0})", + "object": "nesneler ({0})", + "key": "anahtarlar ({0})", + "entryAriaLabel": "{0}, semboller", + "noSymbolsMatching": "Eşleşen sembol yok", + "noSymbolsFound": "Sembol bulunamadı", + "gotoSymbolHandlerAriaLabel": "Geçerli düzenleyicideki sembolleri daraltmak için yazmaya başlayın.", + "cannotRunGotoSymbolInFile": "Dosya için sembol bilgisi yok", + "cannotRunGotoSymbol": "Sembole gitmek için ilk olarak bir metin dosyası açın" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json new file mode 100644 index 0000000000000..81a2056121e20 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/quickopen/browser/helpHandler.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, seçici yardımı", + "globalCommands": "genel komutlar", + "editorCommands": "düzenleyici komutları" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json new file mode 100644 index 0000000000000..fe14853bad620 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/quickopen/browser/quickopen.contribution.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commandsHandlerDescriptionDefault": "Komutları Göster ve Çalıştır", + "gotoLineDescriptionMac": "Satıra Git", + "gotoLineDescriptionWin": "Satıra Git", + "gotoSymbolDescription": "Dosyada Sembole Git", + "gotoSymbolDescriptionScoped": "Kategoriye Göre Dosyada Sembole Git", + "helpDescription": "Yardımı Göster", + "viewPickerDescription": "Görünümü Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json new file mode 100644 index 0000000000000..4451c9909c1b8 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/quickopen/browser/viewPickerHandler.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, görünüm seçici", + "views": "Görünümler", + "panels": "Paneller", + "terminals": "Terminal", + "terminalTitle": "{0}: {1}", + "channels": "Çıktı", + "openView": "Görünümü Aç", + "quickOpenView": "Görünümü Hızlı Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json new file mode 100644 index 0000000000000..b803c2770e70b --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/relauncher/electron-browser/relauncher.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "relaunchMessage": "Yürürlüğe girmesi için yeniden başlatma gerektiren bir ayar değişti.", + "relaunchDetail": "{0} uygulamasını yeniden başlatmak ve bu ayarı etkinleştirmek için lütfen yeniden başlat butonuna basın.", + "restart": "Yeniden Başlat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json new file mode 100644 index 0000000000000..bc11b3fbd68cd --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorGutterModifiedBackground": "Değiştirilen satırlar için düzenleyici oluğu arka plan rengi.", + "editorGutterAddedBackground": "Eklenen satırlar için düzenleyici oluğu arka plan rengi.", + "editorGutterDeletedBackground": "Silinen satırlar için düzenleyici oluğu arka plan rengi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json new file mode 100644 index 0000000000000..2fc322d2c8b84 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scm.contribution.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "toggleGitViewlet": "Git'i Göster", + "installAdditionalSCMProviders": "Ek SCM Sağlayıcıları Yükle...", + "source control": "Kaynak Kontrolü", + "toggleSCMViewlet": "SCM'yi Göster", + "view": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json new file mode 100644 index 0000000000000..e50c48abb0e4e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmActivity.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "scmPendingChangesBadge": "{0} bekleyen değişiklik" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json new file mode 100644 index 0000000000000..560a8a41990de --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmMenus.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "installAdditionalSCMProviders": "Ek SCM Sağlayıcıları Yükle...", + "switch provider": "SCM Sağlayıcısı Değiştir..." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json new file mode 100644 index 0000000000000..cd21a41cb42be --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/scm/electron-browser/scmViewlet.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "commitMessage": "Mesaj (commit'lemek için {0} tuşlarına basın)", + "source control": "Kaynak Kontrolü", + "viewletTitle": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json new file mode 100644 index 0000000000000..248e4e17c5b76 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/openAnythingHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileAndTypeResults": "dosya ve sembol sonuçları", + "fileResults": "dosya sonuçları" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json new file mode 100644 index 0000000000000..31b328bf63982 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/openFileHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, dosya seçici", + "searchResults": "arama sonuçları" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json new file mode 100644 index 0000000000000..94ab4f458240f --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/openSymbolHandler.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, sembol seçici", + "symbols": "sembol sonuçları", + "noSymbolsMatching": "Eşleşen sembol yok", + "noSymbolsWithoutInput": "Sembolleri aramak için yazmaya başlayın" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json new file mode 100644 index 0000000000000..55adfb8b09096 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/patternInputWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "defaultLabel": "giriş", + "patternDescription": "Glob Desenlerini Kullan", + "patternHelpInclude": "Eşleşecek kalıp. ör. tüm JavaScript dosyaları ile eşleşmek için **\\*\\*/*.js** veya bir klasör ve tüm alt elemanları ile eşleşmek için **myFolder/\\*\\***.  \n\n**Başvuru**:\n**\\*** 0 veya daha fazla karakterle eşleşir\n**?** 1 karakterle eşleşir\n**\\*\\*** sıfır veya daha fazla klasörle eşleşir\n**[a-z]** bir karakterler aralığı ile eşleşir\n**{a,b}** kalıplardan herhangi biri ile eşleşir)", + "useIgnoreFilesDescription": "Yok Sayma Dosyalarını Kullan", + "useExcludeSettingsDescription": "Hariç Tutma Ayarlarını Kullan" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/replaceService.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/replaceService.i18n.json new file mode 100644 index 0000000000000..279186adb7139 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/replaceService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileReplaceChanges": "{0} ↔ {1} (Değiştirme Önizlemesi)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/search.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/search.contribution.i18n.json new file mode 100644 index 0000000000000..31355023a7690 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/search.contribution.i18n.json @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "showTriggerActions": "Çalışma Alanında Sembole Git...", + "name": "Ara", + "showSearchViewlet": "Aramayı Göster", + "view": "Görüntüle", + "findInFiles": "Dosyalarda Bul", + "openAnythingHandlerDescription": "Dosyaya Git", + "openSymbolDescriptionNormal": "Çalışma Alanında Sembole Git", + "searchOutputChannelTitle": "Ara", + "searchConfigurationTitle": "Ara", + "exclude": "Aramalarda dosyaları ve klasörleri hariç tutmak için glob desenlerini yapılandırın. files.exclude ayarından, tüm glob desenlerini devralır.", + "exclude.boolean": "Dosya yollarının eşleştirileceği glob deseni. Deseni etkinleştirmek veya devre dışı bırakmak için true veya false olarak ayarlayın.", + "exclude.when": "Eşleşen bir dosyanın eşdüzey dosyalarında ek denetim. Eşleşen dosya adı için değişken olarak $(basename) kullanın.", + "useRipgrep": "Metin aramasında Ripgrep kullanılıp kullanılmayacağını denetler", + "useIgnoreFilesByDefault": "Yeni bir çalışma alanında arama yaparken .gitignore ve .ignore dosyalarının varsayılan olarak kullanılıp kullanılmayacağını denetler.", + "search.quickOpen.includeSymbols": "Dosya sonuçlarındaki bir global sembol aramasının sonuçlarının Hızlı Aç'a dahil edilip edilmeyeceğini yapılandırın." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/searchActions.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/searchActions.i18n.json new file mode 100644 index 0000000000000..8b542968177b3 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/searchActions.i18n.json @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "nextSearchTerm": "Sonraki Arama Terimini Göster", + "previousSearchTerm": "Önceki Arama Terimini Göster", + "focusNextInputBox": "Sonraki Girdi Kutusuna Odakla", + "focusPreviousInputBox": "Önceki Girdi Kutusuna Odakla", + "replaceInFiles": "Dosyalardakileri Değiştir", + "findInFolder": "Klasörde Bul", + "RefreshAction.label": "Yenile", + "ClearSearchResultsAction.label": "Arama Sonuçlarını Temizle", + "FocusNextSearchResult.label": "Sonraki Arama Sonucuna Odakla", + "FocusPreviousSearchResult.label": "Önceki Arama Sonucuna Odakla", + "RemoveAction.label": "Kaldır", + "file.replaceAll.label": "Tümünü Değiştir", + "match.replace.label": "Değiştir", + "ConfigureGlobalExclusionsAction.label": "Ayarları Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json new file mode 100644 index 0000000000000..f94aa8eb8739a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/searchResultsView.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "searchMatches": "{0} eşleşme bulundu", + "searchMatch": "{0} eşleşme bulundu", + "fileMatchAriaLabel": "{2} klasöründeki {1} dosyasında {0} eşleşme, Arama sonucu", + "replacePreviewResultAria": "{3} metinli satırdaki {2}. sütunda {1} ile arama terimi {0}", + "searchResultAria": "{2} metinli satırdaki {1}. sütunda terim {0} bulundu" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json new file mode 100644 index 0000000000000..a2fb1ccddfd5f --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/searchViewlet.i18n.json @@ -0,0 +1,50 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "moreSearch": "Arama Detaylarını Aç/Kapat", + "searchScope.includes": "dahil edilecek dosyalar", + "label.includes": "Aramaya Dahil Edilen Kalıplar", + "searchScope.excludes": "hariç tutulacak klasörler", + "label.excludes": "Aramada Hariç Tutulan Kalıplar", + "global.searchScope.folders": "ayarlar ile hariç tutulan dosyalar", + "label.global.excludes": "Yapılandırılmış Aramada Hariç Tutulan Kalıplar", + "replaceAll.confirmation.title": "Tümünü Değiştir", + "replaceAll.confirm.button": "Değiştir", + "replaceAll.occurrence.file.message": "{1} dosyadaki {0} tekrarlama '{2}' ile değiştirildi.", + "removeAll.occurrence.file.message": "{1} dosyadaki {0} tekrarlama değiştirildi.", + "replaceAll.occurrence.files.message": "{1} dosyadaki {0} tekrarlama '{2}' ile değiştirildi.", + "removeAll.occurrence.files.message": "{1} dosyadaki {0} tekrarlama değiştirildi.", + "replaceAll.occurrences.file.message": "{1} dosyadaki {0} tekrarlama '{2}' ile değiştirildi.", + "removeAll.occurrences.file.message": "{1} dosyadaki {0} tekrarlama değiştirildi.", + "replaceAll.occurrences.files.message": "{1} dosyadaki {0} tekrarlama '{2}' ile değiştirildi.", + "removeAll.occurrences.files.message": "{1} dosyadaki {0} tekrarlama değiştirildi.", + "removeAll.occurrence.file.confirmation.message": "{1} dosyadaki {0} tekralama '{2}' ile değiştirilsin mi?", + "replaceAll.occurrence.file.confirmation.message": "{1} dosyadaki {0} tekrarlama değiştirilsin mi?", + "removeAll.occurrence.files.confirmation.message": "{1} dosyadaki {0} tekralama '{2}' ile değiştirilsin mi?", + "replaceAll.occurrence.files.confirmation.message": "{1} dosyadaki {0} tekrarlama değiştirilsin mi?", + "removeAll.occurrences.file.confirmation.message": "{1} dosyadaki {0} tekralama '{2}' ile değiştirilsin mi?", + "replaceAll.occurrences.file.confirmation.message": "{1} dosyadaki {0} tekrarlama değiştirilsin mi?", + "removeAll.occurrences.files.confirmation.message": "{1} dosyadaki {0} tekralama '{2}' ile değiştirilsin mi?", + "replaceAll.occurrences.files.confirmation.message": "{1} dosyadaki {0} tekrarlama değiştirilsin mi?", + "treeAriaLabel": "Arama Sonuçları", + "globLabel": "{1} olduğunda {0}", + "searchMaxResultsWarning": "Sonuç kümesi yalnızca tüm eşleşmelerin bir alt kümesini içerir. Lütfen sonuçları daraltmak için aramanızda daha fazla ayrıntı belirtin.", + "searchCanceled": "Arama, hiçbir sonuç bulunamadan iptal edildi - ", + "noResultsIncludesExcludes": "'{0}' içinde '{1}' hariç tutularak sonuç bulunamadı - ", + "noResultsIncludes": "'{0}' içinde sonuç bulunamadı - ", + "noResultsExcludes": "'{0}' hariç tutularak sonuç bulunamadı - ", + "noResultsFound": "Sonuç bulunamadı. Yapılandırılan hariç tutmalar için ayarlarınızı gözden geçirin - ", + "rerunSearch.message": "Yeniden ara", + "rerunSearchInAll.message": "Tüm dosyalarda yeniden ara", + "openSettings.message": "Ayarları Aç", + "ariaSearchResultsStatus": "Arama ile {1} dosyada {0} sonuç bulundu", + "search.file.result": "{1} dosyada {0} sonuç", + "search.files.result": "{1} dosyada {0} sonuç", + "search.file.results": "{1} dosyada {0} sonuç", + "search.files.results": "{1} dosyada {0} sonuç", + "searchWithoutFolder": "Henüz bir klasör açmadınız. Şu an sadece açık dosyalar aranıyor - ", + "openFolder": "Klasör Aç" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/search/browser/searchWidget.i18n.json b/i18n/trk/src/vs/workbench/parts/search/browser/searchWidget.i18n.json new file mode 100644 index 0000000000000..ed5a49ea8eafc --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/search/browser/searchWidget.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "search.action.replaceAll.disabled.label": "Tümünü Değiştir (Etkinleştirmek İçin Aramayı Gönderin)", + "search.action.replaceAll.enabled.label": "Tümünü Değiştir", + "search.replace.toggle.button.title": "Değiştirmeyi Aç/Kapat", + "label.Search": "Ara: Arama Terimi girin ve aramak için Enter'a, iptal etmek için Escape tuşuna basın", + "search.placeHolder": "Ara", + "label.Replace": "Değiştir: Değiştirme terimini girin ve önizlemek için Enter'a, iptal etmek için Escape tuşuna basın", + "search.replace.placeHolder": "Değiştir", + "regexp.validationFailure": "İfade her öğe ile eşleşiyor" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json new file mode 100644 index 0000000000000..07bddc32f480d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/TMSnippets.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.snippets": "Parçacıklara ekleme yapar.", + "vscode.extension.contributes.snippets-language": "Bu parçacığın ekleneceği dilin tanımlayıcısı.", + "vscode.extension.contributes.snippets-path": "Parçacıklar dosyasının yolu. Yol, eklenti klasörüne görecelidir ve genellikle './snippets/' ile başlar.", + "invalid.language": "`contributes.{0}.language` ögesinde bilinmeyen dil. Sağlanan değer: {1}", + "invalid.path.0": "`contributes.{0}.path` ögesinde dize bekleniyor. Sağlanan değer: {1}", + "invalid.path.1": "`contributes.{0}.path` ögesinin ({1}) eklentinin klasöründe ({2}) yer alması bekleniyor. Bu, eklentiyi taşınamaz yapabilir.", + "badVariableUse": "\"{0}\"-parçacığı yüksek olasılıkla parçacık değişkenleri ile parçacık yer tutucularını karıştırıyor. Daha fazla bilgi için https://code.visualstudio.com/docs/editor/userdefinedsnippets#_snippet-syntax adresini ziyaret edin." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json new file mode 100644 index 0000000000000..c8734bde48f3d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/insertSnippet.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "snippet.suggestions.label": "Parçacık Ekle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json new file mode 100644 index 0000000000000..757de65d2f29f --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/snippets.contribution.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "openSnippet.label": "Kullanıcı Parçacıklarını Aç", + "openSnippet.pickLanguage": "Parçacık için Dil seçin", + "openSnippet.errorOnCreate": "{0} oluşturulamadı", + "preferences": "Tercihler", + "snippetSchema.json.default": "Boş parçacık", + "snippetSchema.json": "Kullanıcı parçacığı yapılandırması", + "snippetSchema.json.prefix": "Parçacığı IntelliSense'de seçerken kullanılacak ön ek", + "snippetSchema.json.body": "Parçacık içeriği. İmleç konumlarını tanımlamak için '$1', '${1:varsayilanMetin}' kullanın, en son imleç konumu için '$0' kullanın. Değişken değerlerini '${degiskenAdi}' ve '${degiskenAdi:varsayilanMetin}' ile ekleyin, ör. 'Bu bir dosyadır: $TM_FILENAME'.", + "snippetSchema.json.description": "Parçacık açıklaması." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json new file mode 100644 index 0000000000000..67496ec0c542f --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/snippetsService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "detail.userSnippet": "Kullanıcı Parçacığı", + "snippetSuggest.longLabel": "{0}, {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json new file mode 100644 index 0000000000000..534c795a83666 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/snippets/electron-browser/tabCompletion.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tabCompletion": "Ön ekleri eşleştiğinde parçacıkları ekleyin. 'quickSuggestions' etkinleştirilmediği zaman en iyi şekilde çalışır." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json new file mode 100644 index 0000000000000..e284a5a8da804 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/surveys/electron-browser/languageSurveys.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "helpUs": "{0} için hizmetimizi iyileştirmemize yardımcı olun", + "takeShortSurvey": "Kısa Ankete Katıl", + "remindLater": "Daha Sonra Hatırlat", + "neverAgain": "Tekrar Gösterme" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json new file mode 100644 index 0000000000000..821add9841da1 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/surveys/electron-browser/nps.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "surveyQuestion": "Hızlı bir geri bildirim anketine katılmak ister misiniz?", + "takeSurvey": "Ankete Katıl", + "remindLater": "Daha Sonra Hatırlat", + "neverAgain": "Tekrar Gösterme" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json new file mode 100644 index 0000000000000..6d47af97b304c --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/browser/buildQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Bir derleme görevinin adını girin", + "noTasksMatching": "Eşleşen görev yok", + "noTasksFound": "Derleme görevi bulunamadı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json new file mode 100644 index 0000000000000..f17885f7a7242 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/browser/quickOpen.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "entryAriaLabel": "{0}, görevler", + "customizeTask": "Görevi Özelleştir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json new file mode 100644 index 0000000000000..d0d2568cfbd5d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/browser/restartQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Yeniden başlatılacak görevin adını girin", + "noTasksMatching": "Eşleşen görev yok", + "noTasksFound": "Yeniden başlatılacak bir görev bulunamadı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json new file mode 100644 index 0000000000000..3e235cd503a4c --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/browser/taskQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Çalıştırılacak görevin adını girin", + "noTasksMatching": "Eşleşen görev yok", + "noTasksFound": "Görev bulunamadı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json new file mode 100644 index 0000000000000..94241e9174129 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/browser/terminateQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Sonlandırılacak görevin adını girin", + "noTasksMatching": "Eşleşen görev yok", + "noTasksFound": "Sonlandırılacak bir görev bulunamadı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json new file mode 100644 index 0000000000000..a68d96b3def09 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/browser/testQuickOpen.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksAriaLabel": "Bir test görevinin adını girin", + "noTasksMatching": "Eşleşen görev yok", + "noTasksFound": "Test görevi bulunamadı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json new file mode 100644 index 0000000000000..204c5be86e6ff --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/common/taskConfiguration.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "ConfigurationParser.invalidCWD": "Uyarı: options.cwd dize türünde olmalıdır. {0} değeri yok sayıldı.\n", + "ConfigurationParser.noargs": "Hata: komut argümanları dizelerden oluşan bir dizi olmalıdır. Belirtilen değer:\n{0}", + "ConfigurationParser.noShell": "Uyarı: kabuk yapılandırması sadece görevler terminalde çalıştırılırken desteklenir.", + "ConfigurationParser.noName": "Hata: Kapsam bildiriminde Sorun Eşleştirici'nin bir adı olmalıdır:\n{0}\n", + "ConfigurationParser.unknownMatcherKind": "Uyarı: tanımlanan sorun eşleştirici bilinmiyor. Desteklenen türler: dize | ProblemMatcher | (dize | ProblemMatcher)[].\n{0}\n", + "ConfigurationParser.invalidVaraibleReference": "Hata: Geçersiz problemMatcher başvusu: {0}\n", + "ConfigurationParser.noTaskName": "Hata: görevler bir taskName özelliği belirtmelidir. Görev yok sayılacaktır.\n{0}\n", + "taskConfiguration.shellArgs": "Uyarı: '{0}' görevi bir kabuk komutudur ve komut adı veya argümanlarından biri kaçış karakteri içermeyen boşluklar içeriyor. Doğru komut satırı alıntılamasını sağlamak için lütfen argümanları komutlarla birleştirin.", + "taskConfiguration.noCommandOrDependsOn": "Hata: '{0}' görevi bir komut veya dependsOn özelliği belirtmiyor. Görev yok sayılacaktır. Görevin tanımı:\n{1}", + "taskConfiguration.noCommand": "Hata: '{0}' görevi bir komut tanımlamıyor. Görev yok sayılacaktır. Görevin tanımı:\n{1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json new file mode 100644 index 0000000000000..0ad2a2013d4eb --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/common/taskTemplates.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tsc.config": "Bir TypeScript projesi derler", + "tsc.watch": "İzleme moduna bir TypeScript projesi derler", + "dotnetCore": ".NET Core derleme komutu çalıştırır", + "msbuild": "Derleme hedefini çalıştırır", + "externalCommand": "İsteğe bağlı bir harici komut çalıştırma örneği", + "Maven": "Yaygın maven komutlarını çalıştırır" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json new file mode 100644 index 0000000000000..d02d11f0ce33e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchemaCommon.i18n.json @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.options": "Ek komut seçenekleri", + "JsonSchema.options.cwd": "Çalıştırılan program veya betiğin geçerli çalışma klasörü. Atlanırsa Code'un geçerli çalışma alanının kök dizini kullanılır.", + "JsonSchema.options.env": "Çalıştırılan program veya kabuğun ortamı. Atlanırsa üst işlemin ortamı kullanılır.", + "JsonSchema.shellConfiguration": "Kullanılacak kabuğu özelleştirir.", + "JsonSchema.shell.executable": "Kullanılacak kabuk.", + "JsonSchema.shell.args": "Kabuk argümanları.", + "JsonSchema.command": "Çalıştırılacak komut. Harici bir program veya bir kabuk komutu olabilir.", + "JsonSchema.tasks.args": "Bu görev çağrıldığında, komuta iletilecek argümanlar.", + "JsonSchema.tasks.taskName": "Görevin adı", + "JsonSchema.tasks.windows": "Windows'a özel komut yapılandırması", + "JsonSchema.tasks.mac": "Mac'e özel komut yapılandırması", + "JsonSchema.tasks.linux": "Linux'a özel komut yapılandırması", + "JsonSchema.tasks.suppressTaskName": "Görev adının komuta argüman olarak eklenip eklenmeyeceğini denetler. Atlanırsa global olarak tanımlanan değer kullanılır.", + "JsonSchema.tasks.showOutput": "Çalışan görev çıktısının görünüp görünmeyeceğini denetler. Atlanırsa global olarak tanımlanan değer kullanılır.", + "JsonSchema.echoCommand": "Çalıştırılan komutun çıktıya yazıp yazmayacağını denetler. Varsayılan olarak kapalıdır.", + "JsonSchema.tasks.watching.deprecation": "Kullanım dışı. Bunun yerine isBackground ögesini kullanın.", + "JsonSchema.tasks.watching": "Çalıştırılan görevin etkin tutulup tutulmadığı ve dosya sistemini izleyip izlemediği.", + "JsonSchema.tasks.background": "Çalıştırılan görevin etkin tutulup tutulmadığı ve arka planda çalışıp çalışmadığı.", + "JsonSchema.tasks.promptOnClose": "VS Code'un çalışan bir görevle kapatılırken kullanıcının uyarılıp uyarılmayacağı.", + "JsonSchema.tasks.build": "Bu görevi, Code'un varsayılan derleme komutuna eşler.", + "JsonSchema.tasks.test": "Bu görevi, Code'un varsayılan test komutuna eşler.", + "JsonSchema.tasks.matchers": "Kullanılacak problem eşleştirici(leri). Bir dize veya bir problem eşleştirici tanımı veya bir dize ve problem eşleştiricileri dizisi.", + "JsonSchema.args": "Komuta iletilecek ek argümanlar.", + "JsonSchema.showOutput": "Çalışan görev çıktısının görünüp görünmeyeceğini denetler. Atlanırsa \"daima\" olarak varsayılır.", + "JsonSchema.watching.deprecation": "Kullanım dışı. Bunun yerine isBackground ögesini kullanın.", + "JsonSchema.watching": "Çalıştırılan görevin etkin tutulup tutulmadığı ve dosya sistemini izleyip izlemediği.", + "JsonSchema.background": "Çalıştırılan görevin etkin tutulup tutulmadığı ve arka planda çalışıp çalışmadığı.", + "JsonSchema.promptOnClose": "VS Code'un arka planda çalışan bir görevle kapatılırken kullanıcının uyarılıp uyarılmayacağı.", + "JsonSchema.suppressTaskName": "Görev adının komuta argüman olarak eklenip eklenmeyeceğini denetler. Varsayılan olarak kapalıdır.", + "JsonSchema.taskSelector": "Bir argümanın, görev olduğunu gösterecek ön ek.", + "JsonSchema.matchers": "Kullanılacak problem eşleştirici(leri). Bir dize veya bir problem eşleştirici tanımı veya bir dize ve problem eşleştiricileri dizisi.", + "JsonSchema.tasks": "Görev yapılandırmaları. Genellikle harici görev çalıştırıcısında tanımlı görevin zenginleştirilmesidir." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json new file mode 100644 index 0000000000000..8717a0ca787ef --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v1.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.version": "Yapılandırmanın sürüm numarası.", + "JsonSchema._runner": "\"runner\" görevini tamamladı. Resmi runner özelliğini kullanın", + "JsonSchema.runner": "Görevin bir işlem olarak çalıştırılıp çalıştırılmayacağını ve çıktının, çıktı penceresinde veya terminalin içinde gösterilip gösterilmeyeceğini denetler.", + "JsonSchema.windows": "Windows'a özel komut yapılandırması", + "JsonSchema.mac": "Mac'e özel komut yapılandırması", + "JsonSchema.linux": "Linux'a özel komut yapılandırması", + "JsonSchema.shell": "Komutun bir kabuk komutu veya harici bir program olup olmadığını belirtir. Atlanırsa hayır olarak kabul edilir." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json new file mode 100644 index 0000000000000..138ef85921ab3 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "JsonSchema.shell": "Komutun bir kabuk komutu veya harici bir program olup olmadığını belirtir. Atlanırsa hayır olarak kabul edilir.", + "JsonSchema.tasks.dependsOn.string": "Bu görevin bağlı olduğu başka bir görev.", + "JsonSchema.tasks.dependsOn.array": "Bu görevin bağlı olduğu diğer görevler.", + "JsonSchema.tasks.group": "Bu görevin ait olduğu çalıştırma grubunu tanımlar. Atlanırsa, görev hiçbir gruba ait olmaz.", + "JsonSchema.tasks.type": "Görevin bir işlem olarak veya bir kabukta komut olarak çalıştırılıp çalıştırılmayacağını tanımlar. Varsayılan işlem olarak çalıştırmaktır.", + "JsonSchema.version": "Yapılandırmanın sürüm numarası.", + "JsonSchema.tasks.customize": "Özelleştirilecek ekleme yapılan görev.", + "JsonSchema.windows": "Windows'a özel komut yapılandırması", + "JsonSchema.mac": "Mac'e özel komut yapılandırması", + "JsonSchema.linux": "Linux'a özel komut yapılandırması" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json new file mode 100644 index 0000000000000..536ad1269e06d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/task.contribution.i18n.json @@ -0,0 +1,51 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "tasksCategory": "Görevler", + "ConfigureTaskRunnerAction.noWorkspace": "Görevler, sadece çalışma alanı klasöründe mevcuttur.", + "ConfigureTaskRunnerAction.quickPick.template": "Bir Görev Çalıştırıcısı Seç", + "ConfigureTaskRunnerAction.autoDetecting": "{0} görevleri otomatik algılanıyor", + "ConfigureTaskRunnerAction.autoDetect": "Görev sisteminin otomatik algılanması başarısız oldu. Varsayılan şablon kullanılıyor. Ayrıntılar için görev çıktısına bakın.", + "ConfigureTaskRunnerAction.autoDetectError": "Görev sisteminin otomatik algılanması sırasında hatalar oluştu. Ayrıntılar için görev çıktısına bakın.", + "ConfigureTaskRunnerAction.failed": " '.vscode' klasörü içinde 'tasks.json' dosyası oluşturulamıyor. Ayrıntılar için görev çıktısına bakın.", + "ConfigureTaskRunnerAction.label": "Görev Çalıştırıcısını Yapılandır", + "ConfigureBuildTaskAction.label": "Derleme Görevini Yapılandır", + "CloseMessageAction.label": "Kapat", + "ShowTerminalAction.label": "Terminali Görüntüle", + "problems": "Sorunlar", + "manyMarkers": "99+", + "tasks": "Görevler", + "TaskSystem.noHotSwap": "Görev yürütme motorunu değiştirmek VS Code'u yeniden başlatmayı gerektirir. Değişiklik yok sayıldı.", + "TaskService.noBuildTask": "Derleme görevi tanımlanmamış. task.json dosyasındaki bir görevi 'isBuildCommand' ile işaretleyin.", + "TaskService.noTestTask": "Test görevi tanımlanmamış. task.json dosyasındaki bir testi 'isTestCommand' ile işaretleyin.", + "TaskServer.noTask": " Çalıştırılmak istenen {0} görevi bulunamadı.", + "customizeParseErrors": "Geçerli görev yapılandırmasında hatalar var. Lütfen, bir görevi özelleştirmeden önce ilk olarak hataları düzeltin.", + "moreThanOneBuildTask": "task.json dosyasında tanımlı çok fazla derleme görevi var. İlk görev çalıştırılıyor.\n", + "TaskSystem.activeSame.background": "Görev zaten aktif ve arka plan modunda. Görevi sonlandırmak için `F1 > görevi sonlandır`ı kullanın", + "TaskSystem.active": "Çalışan bir görev zaten var. Bir başkasını çalıştırmadan önce bu görevi sonlandırın.", + "TaskSystem.restartFailed": "{0} görevini sonlandırma ve yeniden başlatma başarısız oldu", + "TaskSystem.configurationErrors": "Hata: belirtilen görev yapılandırmasında doğrulama hataları var ve kullanılamıyor. Lütfen ilk olarak hataları düzeltin.", + "TaskSystem.invalidTaskJson": "Hata: task.json dosyasının içeriğinde sentaks hataları var. Lütfen, bir görevi çalıştırmadan önce hataları düzeltin.\n", + "TaskSystem.runningTask": "Çalışan bir görev var. Bu görevi sonlandırmak istiyor musunuz?", + "TaskSystem.terminateTask": "&&Görevi Sonlandır", + "TaskSystem.noProcess": "Başlatılan görev artık mevcut değil. Eğer görev arka plan işlemleri oluşturduysa, VS Code'dan çıkmak işlemlerin sahipsiz kalmasına neden olabilir. Bunu önlemek için son arka plan işlemini bekle işaretçisiyle başlatın.", + "TaskSystem.exitAnyways": "Yine de &&Çık", + "TerminateAction.label": "Çalışan Görevi Sonlandır", + "TaskSystem.unknownError": "Bir görev çalıştırılırken hata oluştu. Detaylar için görev günlüğüne bakın.", + "TaskService.noWorkspace": "Görevler, sadece çalışma alanı klasöründe mevcuttur.", + "TerminateAction.noProcess": "Başlatılan işlem artık mevcut değil. Eğer görev arka plan görevleri oluşturduysa, VS Code'dan çıkmak işlemlerin sahipsiz kalmasına neden olabilir.", + "TerminateAction.failed": "Çalışan görevi sonlandırma başarısız oldu.", + "ShowLogAction.label": "Görev Günlüğünü Göster", + "RunTaskAction.label": "Görevi Çalıştır", + "RestartTaskAction.label": "Görevi Yeniden Başlat", + "BuildAction.label": "Derleme Görevini Çalıştır", + "TestAction.label": "Test Görevini Çalıştır", + "quickOpen.task": "Görevi Çalıştır", + "quickOpen.terminateTask": "Görevi Sonlandır", + "quickOpen.restartTask": "Görevi Yeniden Başlat", + "quickOpen.buildTask": "Derleme Görevi", + "quickOpen.testTask": "Test Görevi" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json new file mode 100644 index 0000000000000..d3492257f35b4 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/electron-browser/terminalTaskSystem.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TerminalTaskSystem.unknownError": "Görev çalıştırılırken bir hata oluştu. Detaylar için görev çıktısı günlüğüne bakın.", + "TerminalTaskSystem.terminalName": "Görev - {0}", + "reuseTerminal": "Terminal görevler tarafından tekrar kullanılacak, kapatmak için herhangi bir tuşa basın.", + "TerminalTaskSystem": "UNC sürücüsünde kabuk komutu yürütülemez.", + "unkownProblemMatcher": "{0} sorun eşleştirici çözümlenemiyor. Eşleştirici yok sayılacaktır." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json new file mode 100644 index 0000000000000..bd7194ed6ee5b --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/node/processRunnerDetector.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskSystemDetector.noGulpTasks": "gulp --tasks-simple komutu çalıştırıldığında herhangi bir görev listelemedi. npm install komutunu çalıştırdınız mı?", + "TaskSystemDetector.noJakeTasks": "jake --tasks komutu çalıştırıldığında herhangi bir görev listelemedi. npm install komutunu çalıştırdınız mı?", + "TaskSystemDetector.noGulpProgram": "Gulp, sisteminizde yüklü değil. Yüklemek için npm install -g gulp komutunu çalıştırın.", + "TaskSystemDetector.noJakeProgram": "Jake, sisteminizde yüklü değil. Yüklemek için npm install -g jake komutunu çalıştırın.", + "TaskSystemDetector.noGruntProgram": "Grunt, sisteminizde yüklü değil. Yüklemek için npm install -g grunt komutunu çalıştırın.", + "TaskSystemDetector.noProgram": "{0} programı bulunamadı. Mesaj: {1}", + "TaskSystemDetector.buildTaskDetected": "'{0}' olarak adlandırılmış derleme görevi algılandı.", + "TaskSystemDetector.testTaskDetected": "'{0}' olarak adlandırılmış test görevi algılandı." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json b/i18n/trk/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json new file mode 100644 index 0000000000000..f5da8b2c7db02 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/tasks/node/processTaskSystem.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "TaskRunnerSystem.unknownError": "Görev çalıştırılırken bir hata oluştu. Detaylar için görev çıktısı günlüğüne bakın.", + "TaskRunnerSystem.watchingBuildTaskFinished": "\nDerleme görevlerinin izlenmesi bitti.", + "TaskRunnerSystem.childProcessError": "Harici program {0} {1} başlatılamadı.", + "TaskRunnerSystem.cancelRequested": "\n'{0}' görevi kullanıcı isteği üzerine sonlandırıldı.", + "unkownProblemMatcher": "{0} sorun eşleştirici çözümlenemiyor. Eşleştirici yok sayılacaktır." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json new file mode 100644 index 0000000000000..76b62e0169e59 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.i18n.json @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalIntegratedConfigurationTitle": "Entegre Terminal", + "terminal.integrated.shell.linux": "Terminalin Linux'da kullandığı kabuğun yolu.", + "terminal.integrated.shellArgs.linux": "Linux terminalindeyken kullanılacak komut satırı argümanları.", + "terminal.integrated.shell.osx": "Terminalin OS X'de kullandığı kabuğun yolu.", + "terminal.integrated.shellArgs.osx": "OS X terminalindeyken kullanılacak komut satırı argümanları.", + "terminal.integrated.shell.windows": "Terminalin Windows'da kullandığı kabuğun yolu. Windows ile birlikte gelen kabukları kullanırken (cmd, PowerShell veya Bash on Ubuntu), 64 bit sürümlerini kullanmak için C:\\Windows\\System32 yerine C:\\Windows\\sysnative yolunu tercih edin.", + "terminal.integrated.shellArgs.windows": "Windows terminalindeyken kullanılacak komut satırı argümanları.", + "terminal.integrated.rightClickCopyPaste": "Ayarlandığında, terminal içinde sağ tıklandığında bağlam menüsünün görünmesini engeller, onun yerine bir seçim varsa kopyalama yapar, bir seçim yoksa yapıştırma yapar.", + "terminal.integrated.fontFamily": "Terminalin yazı tipi ailesini denetler; bu, varsayılan olarak editor.fontFamily'nin değeridir.", + "terminal.integrated.fontLigatures": "Terminalde yazı tipi ligatürlerinin etkinleştirilip etkinleştirilmeyeceğini denetler.", + "terminal.integrated.fontSize": "Terminaldeki yazı tipi boyutunu piksel olarak denetler.", + "terminal.integrated.lineHeight": "Terminalin satır yüksekliğini denetler, bu sayı gerçek satır yüksekliğini piksel olarak elde etmek için terminal yazı tipi boyutu ile çarpılır.", + "terminal.integrated.enableBold": "Terminalde kalın yazının etkinleştirilip etkinleştirilmeyeceği; bu, terminal kabuğunun desteğini gerektirir.", + "terminal.integrated.cursorBlinking": "Terminaldeki imlecin yanıp sönmesini denetler.", + "terminal.integrated.cursorStyle": "Terminaldeki imlecin stilini denetler.", + "terminal.integrated.scrollback": "Terminalin tamponunda tuttuğu maksimum satır sayısını denetler.", + "terminal.integrated.setLocaleVariables": "Terminal başlangıcında yereli içeren değişkenlerin ayarlanıp ayarlanmayacağını denetler; bu, OS X'de varsayılan olarak açıktır, diğer platformlarda kapalıdır.", + "terminal.integrated.cwd": "Terminalin nerede başlatılacağına ait açık bir yol; bu, kabuk işlemleri için geçerli çalışma klasörü (cwd) olarak kullanılır. Bu, çalışma alanı ayarlarında kök dizini uygun bir cwd değilse özellikle yararlı olabilir.", + "terminal.integrated.confirmOnExit": "Aktif terminal oturumları varken çıkışta onay istenip istenmeyeceği.", + "terminal.integrated.commandsToSkipShell": "Tuş bağlarının kabuğa gönderilmeyip bunun yerine her zaman Code tarafından işleneceği bir komut ID'leri kümesi. Bu, tuş bağlarının normalde kabuk tarafından terminal odakta değilken nasılsa öyle davranmasını sağlar, örnek olarak Hızlı Aç'ı başlatmak için ctrl+p.", + "terminal": "Terminal", + "terminalCategory": "Terminal", + "viewCategory": "Görüntüle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json new file mode 100644 index 0000000000000..7ee287790c0e3 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalActions.i18n.json @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbench.action.terminal.toggleTerminal": "Entegre Terminali Aç/Kapat", + "workbench.action.terminal.kill": "Aktif Terminal Örneğini Sonlandır", + "workbench.action.terminal.kill.short": "Terminali Sonlandır", + "workbench.action.terminal.copySelection": "Seçimi Kopyala", + "workbench.action.terminal.selectAll": "Tümünü Seç", + "workbench.action.terminal.new": "Yeni Entegre Terminal Oluştur", + "workbench.action.terminal.new.short": "Yeni Terminal", + "workbench.action.terminal.focus": "Terminale Odakla", + "workbench.action.terminal.focusNext": "Sonraki Terminale Odakla", + "workbench.action.terminal.focusAtIndex": "{0}. Terminale Odakla", + "workbench.action.terminal.focusPrevious": "Önceki Terminale Odakla", + "workbench.action.terminal.paste": "Aktif Terminale Yapıştır", + "workbench.action.terminal.DefaultShell": "Varsayılan Kabuğu Seç", + "workbench.action.terminal.runSelectedText": "Seçili Metni Aktif Terminalde Çalıştır", + "workbench.action.terminal.runActiveFile": "Aktif Dosyayı Aktif Terminalde Çalıştır", + "workbench.action.terminal.runActiveFile.noFile": "Sadece diskteki dosyalar terminalde çalıştırılabilir", + "workbench.action.terminal.switchTerminalInstance": "Terminal Örneğini Değiştir", + "workbench.action.terminal.scrollDown": "Aşağı Kaydır (Satır)", + "workbench.action.terminal.scrollDownPage": "Aşağı Kaydır (Sayfa)", + "workbench.action.terminal.scrollToBottom": "En Alta Kaydır", + "workbench.action.terminal.scrollUp": "Yukarı Kaydır (Satır)", + "workbench.action.terminal.scrollUpPage": "Yukarı Kaydır (Sayfa)", + "workbench.action.terminal.scrollToTop": "En Üste Kaydır", + "workbench.action.terminal.clear": "Temizle", + "workbench.action.terminal.allowWorkspaceShell": "Çalışma Alanı Kabuk Yapılandırmasına İzin Ver", + "workbench.action.terminal.disallowWorkspaceShell": "Çalışma Alanı Kabuk Yapılandırmasına İzin Verme", + "workbench.action.terminal.rename": "Yeniden Adlandır", + "workbench.action.terminal.rename.prompt": "Terminal adını girin", + "workbench.action.terminal.focusFindWidget": "Bulma Aracına Odakla", + "workbench.action.terminal.hideFindWidget": "Bulma Aracını Gizle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json new file mode 100644 index 0000000000000..56cc70a5239aa --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.background": "Terminalin arka plan rengi; bu, terminalin panelden farklı olarak renklendirilmesini sağlar.", + "terminal.foreground": "Terminalin ön plan rengi.", + "terminal.ansiColor": "Terminalde '{0}' ANSI rengi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json new file mode 100644 index 0000000000000..745f1badf0aad --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.allowWorkspaceShell": "{0} ögesinin (çalışma alanı ayarı olarak tanımlı) terminalde başlatılmasına izin veriyor musunuz?", + "allow": "İzin Ver", + "disallow": "İzin Verme" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json new file mode 100644 index 0000000000000..baad53fc2a424 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalFindWidget.i18n.json @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "label.find": "Bul", + "placeholder.find": "Bul", + "label.previousMatchButton": "Önceki eşleşme", + "label.nextMatchButton": "Sonraki eşleşme", + "label.closeButton": "Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json new file mode 100644 index 0000000000000..38dcd5eb95103 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.copySelection.noSelection": "Terminalde kopyalanacak bir seçim bulunmuyor", + "terminal.integrated.exitedWithCode": "Terminal işlemi şu çıkış koduyla sonlandı: {0}", + "terminal.integrated.waitOnExit": "Terminali kapatmak için lütfen bir tuşa basın", + "terminal.integrated.launchFailed": "Terminal işlem komutu `{0}{1}` başlatılamadı (çıkış kodu: {2})" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json new file mode 100644 index 0000000000000..0b0eeab242ac0 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalLinkHandler.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminalLinkHandler.followLinkCmd": "Bağlantıyı izlemek için Cmd tuşuna basarak tıklayın", + "terminalLinkHandler.followLinkCtrl": "Bağlantıyı izlemek için Ctrl tuşuna basarak tıklayın" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json new file mode 100644 index 0000000000000..e3fb6347294f4 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "copy": "Kopyala", + "createNewTerminal": "Yeni Terminal", + "paste": "Yapıştır", + "clear": "Temizle" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json new file mode 100644 index 0000000000000..28fa93d323a9d --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/terminal/electron-browser/terminalService.i18n.json @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "terminal.integrated.chooseWindowsShellInfo": "Özelleştir butonuna tıklayıp varsayılan terminal kabuğunu seçebilirsiniz.", + "customize": "Özelleştir", + "cancel": "İptal", + "never again": "Tamam, Tekrar Gösterme", + "terminal.integrated.chooseWindowsShell": "Tercih ettiğiniz terminal kabuğunu seçin, bunu daha sonra ayarlarınızdan değiştirebilirsiniz", + "terminalService.terminalCloseConfirmationSingular": "Aktif bir terminal oturumu var, sonlandırmak istiyor musunuz?", + "terminalService.terminalCloseConfirmationPlural": "{0} aktif terminal oturumu var, bunları sonlandırmak istiyor musunuz?", + "yes": "Evet" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json new file mode 100644 index 0000000000000..ef4e0417b9d60 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/themes/electron-browser/themes.contribution.i18n.json @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "selectTheme.label": "Renk Teması", + "installColorThemes": "Ek Renk Temaları Yükle...", + "themes.selectTheme": "Bir Renk Teması Seç (Yukarı/Aşağı Tuşlarıyla Önizleme Yap)", + "selectIconTheme.label": "Dosya Simgesi Teması", + "installIconThemes": "Ek Dosya Simgesi Temaları Yükle...", + "noIconThemeLabel": "Hiçbiri", + "noIconThemeDesc": "Dosya simgelerini devre dışı bırak", + "problemChangingIconTheme": "Simge temasını ayarlama sorunu: {0}", + "themes.selectIconTheme": "Dosya Simgesi Teması Seç", + "generateColorTheme.label": "Geçerli Ayarlardan Renk Teması Oluştur", + "preferences": "Tercihler", + "developer": "Geliştirici" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json new file mode 100644 index 0000000000000..6e2f9a6845f02 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/trust/electron-browser/unsupportedWorkspaceSettings.contribution.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "unsupportedWorkspaceSettings": "Bu çalışma alanı sadece Kullanıcı Ayarları'nda ayarlanabilen ayarlar içeriyor. ({0})", + "openWorkspaceSettings": "Çalışma Alanı Ayarlarını Aç", + "openDocumentation": "Daha Fazla Bilgi Edin", + "ignore": "Yok Say" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json b/i18n/trk/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json new file mode 100644 index 0000000000000..cd4ef89692af2 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/update/electron-browser/releaseNotesInput.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "releaseNotesInputName": "Sürüm Notları: {0}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json new file mode 100644 index 0000000000000..a8342747ede92 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/update/electron-browser/update.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "release notes": "Sürüm notları", + "updateConfigurationTitle": "Güncelle", + "updateChannel": "Güncelleştirme kanalından otomatik güncelleştirmeler alıp almayacağınızı ayarlayın. Değişiklikten sonra yeniden başlatma gerektirir." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/update/electron-browser/update.i18n.json b/i18n/trk/src/vs/workbench/parts/update/electron-browser/update.i18n.json new file mode 100644 index 0000000000000..b03c4aaf2303a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/update/electron-browser/update.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "updateNow": "Şimdi Güncelle", + "later": "Daha Sonra", + "unassigned": "atanmamış", + "releaseNotes": "Sürüm Notları", + "showReleaseNotes": "Sürüm Notlarını Göster", + "downloadNow": "Şimdi İndir", + "read the release notes": "{0} v{1} uygulamasına hoş geldiniz! Sürüm Notları'nı okumak ister misiniz?", + "licenseChanged": "Lisans koşullarımız değişti, lütfen inceleyin.", + "license": "Lisansı Oku", + "updateAvailable": "{0} yeniden başlatıldıktan sonra güncellenecektir.", + "thereIsUpdateAvailable": "Bir güncelleştirme var.", + "noUpdatesAvailable": "Şu anda mevcut herhangi bir güncelleme yok.", + "updateIsReady": "Yeni güncelleştirme var.", + "commandPalette": "Komut Paleti...", + "settings": "Ayarlar", + "keyboardShortcuts": "Klavye Kısayolları", + "selectTheme.label": "Renk Teması", + "themes.selectIconTheme.label": "Dosya Simgesi Teması", + "not available": "Güncelleştirme Yok", + "checkingForUpdates": "Güncelleştirmeler Denetleniyor...", + "DownloadUpdate": "Mevcut Güncelleştirmeyi İndir", + "DownloadingUpdate": "Güncelleştirme İndiriliyor...", + "InstallingUpdate": "Güncelleştirme Yükleniyor...", + "restartToUpdate": "Güncelleştirmek için Yeniden Başlatın...", + "checkForUpdates": "Güncelleştirmeleri Denetle..." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/views/browser/views.i18n.json b/i18n/trk/src/vs/workbench/parts/views/browser/views.i18n.json new file mode 100644 index 0000000000000..13520a7bd48b5 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/views/browser/views.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "viewToolbarAriaLabel": "{0} eylem" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json b/i18n/trk/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json new file mode 100644 index 0000000000000..e6729315d5a4e --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/views/browser/viewsExtensionPoint.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "requirearray": "görünümler bir dizi olmalıdır", + "requirestring": "`{0}` özelliği zorunludur ve `string` türünde olmalıdır", + "optstring": "`{0}` özelliği atlanabilir veya `string` türünde olmalıdır", + "vscode.extension.contributes.view.id": "Görünümün tanımlayıcısı. Bunu, `vscode.window.registerTreeDataProviderForView` API ile bir veri sağlayıcısı kaydetmek için kullanın. Ayrıca `onView:${id}` olayını `activationEvents` ögesine kaydederek eklentinizi etkinleştirmeyi tetikleyin.", + "vscode.extension.contributes.view.name": "Görünümün insanlar tarafından okunabilir adı. Gösterilecektir", + "vscode.extension.contributes.view.when": "Bu görünümü göstermek için doğru olması gereken koşul", + "vscode.extension.contributes.views": "Görünümleri düzenleyiciye ekler.", + "views.explorer": "Gezgin Görünümü", + "locationId.invalid": "`{0}` geçerli bir görünüm konumu değil" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json b/i18n/trk/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json new file mode 100644 index 0000000000000..069fea26d9583 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/watermark/electron-browser/watermark.i18n.json @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "watermark.showCommands": "Tüm Komutları Göster", + "watermark.quickOpen": "Dosyaya Git", + "watermark.openFile": "Dosya Aç", + "watermark.openFolder": "Klasör Aç", + "watermark.openFileFolder": "Dosya veya Klasör Aç", + "watermark.openRecent": "Son Kullanılanları Aç", + "watermark.newUntitledFile": "Yeni İsimsiz Dosya", + "watermark.toggleTerminal": "Terminali Aç/Kapat", + "watermark.findInFiles": "Dosyalarda Bul", + "watermark.startDebugging": "Hata Ayıklamaya Başla", + "watermark.selectTheme": "Temayı Değiştir", + "watermark.selectKeymap": "Tuş Haritasını Değiştir", + "watermark.keybindingsReference": "Klavye Başvurusu", + "watermark.openGlobalKeybindings": "Klavye Kısayolları", + "watermark.unboundCommand": "serbest", + "workbenchConfigurationTitle": "Çalışma Ekranı", + "tips.enabled": "Etkinleştirildiğinde, hiçbir düzenleyici açık değilken filigran ipuçları gösterir" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json b/i18n/trk/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json new file mode 100644 index 0000000000000..0c942884ab68a --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/welcome/overlay/browser/welcomeOverlay.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomeOverlay.explorer": "Dosya gezgini", + "welcomeOverlay.search": "Dosyalar arasında ara", + "welcomeOverlay.git": "Kaynak kodu yönetimi", + "welcomeOverlay.debug": "Başlat ve hata ayıkla", + "welcomeOverlay.extensions": "Eklentileri yönet", + "welcomeOverlay.problems": "Hataları ve uyarıları görüntüle", + "welcomeOverlay.commandPalette": "Tüm komutları bul ve çalıştır", + "welcomeOverlay": "Kullanıcı Arayüzüne Genel Bakış", + "hideWelcomeOverlay": "Arayüz Genel Bakışını Gizle", + "help": "Yardım" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json b/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json new file mode 100644 index 0000000000000..807fbc62c1565 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/vs_code_welcome_page.i18n.json @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "welcomePage.vscode": "Visual Studio Code", + "welcomePage.editingEvolved": "Düzenleme evrim geçirdi", + "welcomePage.start": "Başlangıç", + "welcomePage.newFile": "Yeni dosya", + "welcomePage.openFolder": "Klasör aç...", + "welcomePage.cloneGitRepository": "Git deposu kopyala...", + "welcomePage.recent": "Son Kullanılanlar", + "welcomePage.moreRecent": "Diğerleri...", + "welcomePage.noRecentFolders": "Son kullanılan klasör yok", + "welcomePage.help": "Yardım", + "welcomePage.keybindingsCheatsheet": "Yazdırılabilir klavye kopya kağıdı", + "welcomePage.introductoryVideos": "Tanıtım videoları", + "welcomePage.productDocumentation": "Ürün belgeleri", + "welcomePage.gitHubRepository": "GitHub deposu", + "welcomePage.stackOverflow": "Stack Overflow", + "welcomePage.showOnStartup": "Başlangıçta hoş geldiniz sayfasını göster", + "welcomePage.customize": "Özelleştir", + "welcomePage.installExtensionPacks": "Araçlar ve diller", + "welcomePage.installExtensionPacksDescription": "{0} ve {1} için destek yükle", + "welcomePage.moreExtensions": "fazlası", + "welcomePage.installKeymapDescription": "Klavye kısayolları yükle", + "welcomePage.installKeymapExtension": "{0} ve {1} için klavye kısayolları yükle", + "welcomePage.others": "diğerleri", + "welcomePage.colorTheme": "Renk teması", + "welcomePage.colorThemeDescription": "Düzenleyici ve kodlarınız sevdiğiniz şekilde görünsün", + "welcomePage.learn": "Öğren", + "welcomePage.showCommands": "Tüm komutları bul ve çalıştır", + "welcomePage.interfaceOverview": "Arayüze genel bakış", + "welcomePage.interfaceOverviewDescription": "Kullanıcı arayüzünün ana bileşenlerini vurgulayan bir kaplamayı görüntüleyin", + "welcomePage.interactivePlayground": "İnteraktif oyun alanı", + "welcomePage.interactivePlaygroundDescription": "Başlıca düzenleyici özelliklerini kısa örneklerle deneyin", + "welcomePage.quickLinks": "Hızlı bağlantılar", + "welcomePage.keybindingsReference": "Klavye kısayolları başvurusu", + "welcomePage.keybindingsReferenceDescription": "En yaygın klavye kısayollarının olduğu yazdırılabilir bir PDF dosyası", + "welcomePage.configureSettings": "Ayarları yapılandır", + "welcomePage.configureSettingsDescription": "Ayarları değiştirerek VS Code'un tam gücünü açın" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json new file mode 100644 index 0000000000000..03f771bb69e4b --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.contribution.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "help": "Yardım" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json b/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json new file mode 100644 index 0000000000000..3c96ac13013be --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/welcome/page/electron-browser/welcomePage.i18n.json @@ -0,0 +1,38 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "workbenchConfigurationTitle": "Çalışma Ekranı", + "welcomePage.enabled": "Etkinleştirildiğinde, başlangıçta hoş geldiniz sayfası gösterilir.", + "welcomePage": "Hoş Geldiniz", + "welcomePage.javaScript": "JavaScript", + "welcomePage.typeScript": "TypeScript", + "welcomePage.python": "Python", + "welcomePage.php": "PHP", + "welcomePage.docker": "Docker", + "welcomePage.vim": "Vim", + "welcomePage.sublime": "Sublime", + "welcomePage.atom": "Atom", + "welcomePage.extensionPackAlreadyInstalled": "{0} desteği zaten yüklü.", + "welcomePage.willReloadAfterInstallingExtensionPack": "{0} ek desteği yüklendikten sonra pencere yeniden yüklenecektir.", + "welcomePage.installingExtensionPack": "{0} ek desteği yükleniyor...", + "welcomePage.extensionPackNotFound": "{1} Id'li {0} desteği bulunamadı.", + "welcomePage.keymapAlreadyInstalled": "{0} klavye kısayolları zaten yüklü.", + "welcomePage.willReloadAfterInstallingKeymap": "{0} klavye kısayolları yüklendikten sonra pencere yeniden yüklenecektir.", + "welcomePage.installingKeymap": "{0} klavye kısayolları yükleniyor...", + "welcomePage.keymapNotFound": "{1} Id'li {0} klavye kısayolları bulunamadı.", + "welcome.title": "Hoş Geldiniz", + "welcomePage.openFolderWithPath": "{1} yolundaki {0} klasörünü aç", + "welcomePage.extensionListSeparator": ", ", + "welcomePage.installKeymap": "{0} tuş haritasını yükle", + "welcomePage.installExtensionPack": "{0} ek desteği yükleniyor...", + "welcomePage.installedKeymap": "{0} tuş haritası zaten yüklü", + "welcomePage.installedExtensionPack": "{0} desteği zaten yüklü", + "ok": "Tamam", + "details": "Detaylar", + "cancel": "İptal", + "welcomePage.buttonBackground": "Hoş geldiniz sayfasındaki butonların arka plan rengi.", + "welcomePage.buttonHoverBackground": "Hoş geldiniz sayfasındaki butonların bağlantı vurgusu arka plan rengi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json b/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json new file mode 100644 index 0000000000000..80ad1bc8870bd --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/editor/editorWalkThrough.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorWalkThrough": "İnteraktif Oyun Alanı", + "editorWalkThrough.title": "İnteraktif Oyun Alanı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json b/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json new file mode 100644 index 0000000000000..c56d3c14fe8cd --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThrough.contribution.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "walkThrough.editor.label": "İnteraktif Oyun Alanı", + "help": "Yardım", + "interactivePlayground": "İnteraktif Oyun Alanı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json b/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json new file mode 100644 index 0000000000000..9e8d2c57063af --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughActions.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "editorWalkThrough.arrowUp": "Yukarı Kaydır (Satır)", + "editorWalkThrough.arrowDown": "Aşağı Kaydır (Satır)", + "editorWalkThrough.pageUp": "Yukarı Kaydır (Sayfa)", + "editorWalkThrough.pageDown": "Aşağı Kaydır (Sayfa)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json b/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json new file mode 100644 index 0000000000000..add57fa341b54 --- /dev/null +++ b/i18n/trk/src/vs/workbench/parts/welcome/walkThrough/electron-browser/walkThroughPart.i18n.json @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "walkThrough.unboundCommand": "serbest", + "walkThrough.gitNotFound": "Git, sisteminizde yüklü değil gibi görünüyor.", + "walkThrough.embeddedEditorBackground": "İnteraktif oyun alanındaki gömülü düzenleyicilerin arka plan rengi." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json b/i18n/trk/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json new file mode 100644 index 0000000000000..a5088bc7ca639 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/configuration/node/configurationEditingService.i18n.json @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "open": "Ayarları Aç", + "close": "Kapat", + "saveAndRetry": "Ayarları Kaydet ve Yeniden Dene", + "errorUnknownKey": "Yapılandırma dosyasına yazılamıyor (Bilinmeyen Anahtar)", + "errorInvalidTarget": "Yapılandırma dosyasına yazılamıyor (Bilinmeyen Hedef)", + "errorNoWorkspaceOpened": "Hiçbir klasör açık olmadığı için ayarlara yazılamıyor. Lütfen ilk olarak bir klasörü açın ve tekrar deneyin.", + "errorInvalidConfiguration": "Ayarlara yazılamıyor. Lütfen dosyadaki hata/uyarıları düzeltmek için **Kullanıcı Ayarları'nı** açın ve tekrar deneyin.", + "errorInvalidConfigurationWorkspace": "Ayarlara yazılamıyor. Lütfen dosyadaki hata/uyarıları düzeltmek için **Çalışma Alanı Ayarları'nı** açın ve tekrar deneyin.", + "errorConfigurationFileDirty": "Dosya kaydedilmemiş değişiklikler içerdiği için ayarlara yazılamıyor. Lütfen dosyadaki hata/uyarıları düzeltmek için **Kullanıcı Ayarları'nı** açın ve tekrar deneyin.", + "errorConfigurationFileDirtyWorkspace": "Dosya kaydedilmemiş değişiklikler içerdiği için ayarlara yazılamıyor. Lütfen dosyadaki hata/uyarıları düzeltmek için **Çalışma Alanı Ayarları'nı** açın ve tekrar deneyin." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json b/i18n/trk/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json new file mode 100644 index 0000000000000..4289f712979c3 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/crashReporter/common/crashReporterService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "telemetryConfigurationTitle": "Telemetri", + "telemetry.enableCrashReporting": "Kilitlenme raporlarının Microsoft'a gönderilmesini etkinleştirin.\nBu seçeneğin yürürlüğe girmesi için yeniden başlatma gerekir." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/editor/browser/editorService.i18n.json b/i18n/trk/src/vs/workbench/services/editor/browser/editorService.i18n.json new file mode 100644 index 0000000000000..50e968f8ee37e --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/editor/browser/editorService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "compareLabels": "{0} ↔ {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/files/electron-browser/fileService.i18n.json b/i18n/trk/src/vs/workbench/services/files/electron-browser/fileService.i18n.json new file mode 100644 index 0000000000000..084090af73457 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/files/electron-browser/fileService.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "netVersionError": "Microsoft .NET Framework 4.5 gerekli. Yüklemek için bağlantıyı izleyin.", + "installNet": ".NET Framework 4.5'i İndir", + "neverShowAgain": "Tekrar Gösterme", + "trashFailed": "'{0}' çöpe taşınamadı" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/files/node/fileService.i18n.json b/i18n/trk/src/vs/workbench/services/files/node/fileService.i18n.json new file mode 100644 index 0000000000000..2f174109eabb7 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/files/node/fileService.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "fileInvalidPath": "Geçersiz dosya kaynağı ({0})", + "fileIsDirectoryError": "Dosya bir dizindir ({0})", + "fileBinaryError": "Dosya ikili olarak görünüyor ve metin olarak açılamıyor", + "fileNotFoundError": "Dosya bulunamadı ({0})", + "unableToMoveCopyError": "Taşıma/kopyalama yapılamadı. Dosya, içinde bulunduğu klasörü değiştiriyor.", + "foldersCopyError": "Klasörler çalışma alanına kopyalanamaz. Lütfen kopyalamak için dosyaları tek tek seçin.", + "fileReadOnlyError": "Dosya Salt Okunur" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json b/i18n/trk/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json new file mode 100644 index 0000000000000..0e3f3b323f118 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/keybinding/common/keybindingEditing.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "errorKeybindingsFileDirty": "Dosya kaydedilmemiş değişiklikler içerdiği için yazılamıyor. Lütfen **tuş bağları** dosyasını kaydedin ve tekrar deneyin.", + "parseErrors": "Tuş bağları yazılamadı. Lütfen dosyadaki hata/uyarıları düzeltmek için **tuş bağları dosyasını** açın ve yeniden deneyin.", + "errorInvalidConfiguration": "Tuş bağları yazılamadı. **Tuş bağları dosyasında** Dizi olmayan bir nesne var. Temizlemek için lütfen dosyayı açın ve yeniden deneyin.", + "emptyKeybindingsHeader": "Varsayılanların üzerine yazmak için tuş bağlarınızı bu dosyaya yerleştirin" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json b/i18n/trk/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json new file mode 100644 index 0000000000000..a3dc9a93b6a77 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/keybinding/electron-browser/keybindingService.i18n.json @@ -0,0 +1,26 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "nonempty": "boş olmayan değer bekleniyordu.", + "requirestring": "`{0}` özelliği zorunludur ve `string` türünde olmalıdır", + "optstring": "`{0}` özelliği atlanabilir veya `string` türünde olmalıdır", + "vscode.extension.contributes.keybindings.command": "Tuş bağı tetiklendiğinde çalıştırılacak komutun tanımlayıcısı.", + "vscode.extension.contributes.keybindings.key": "Tuş veya tuş dizisi (tuşları artı işaretiyle veya boşluk dizisiyle ayırın, ör. bir akor için Ctrl+O ve Ctrl+L", + "vscode.extension.contributes.keybindings.mac": "Mac'e özel tuş veya tuş dizisi.", + "vscode.extension.contributes.keybindings.linux": "Linux'a özel tuş veya tuş dizisi.", + "vscode.extension.contributes.keybindings.win": "Windows'a özel tuş veya tuş dizisi.", + "vscode.extension.contributes.keybindings.when": "Tuşun aktif olacağı koşul", + "vscode.extension.contributes.keybindings": "Tuş bağlarına ekleme yapar.", + "invalid.keybindings": "Geçersiz `contributes.{0}`: {1}", + "unboundCommands": "Kullanılabilen diğer komutlar şunlardır: ", + "keybindings.json.title": "Tuş bağları yapılandırması", + "keybindings.json.key": "Tuş veya tuş dizisi (boşluk ile ayrılmış olarak)", + "keybindings.json.command": "Yürütülecek komutun adı", + "keybindings.json.when": "Tuşun aktif olacağı koşul", + "keybindings.json.args": "Yürütülecek komuta iletilecek argümanlar.", + "keyboardConfigurationTitle": "Klavye", + "dispatch": "Tuş basımlarının ya `keydown.code` (önerilen) ya da ` keydown.keyCode` kullanarak gönderilmesini denetler." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/message/browser/messageList.i18n.json b/i18n/trk/src/vs/workbench/services/message/browser/messageList.i18n.json new file mode 100644 index 0000000000000..00c0b8b53d5d2 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/message/browser/messageList.i18n.json @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "alertErrorMessage": "Hata: {0}", + "alertWarningMessage": "Uyarı: {0}", + "alertInfoMessage": "Bilgi: {0}", + "error": "Hata", + "warning": "Uyar", + "info": "Bilgi", + "close": "Kapat" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/message/electron-browser/messageService.i18n.json b/i18n/trk/src/vs/workbench/services/message/electron-browser/messageService.i18n.json new file mode 100644 index 0000000000000..ef993fa147f7c --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/message/electron-browser/messageService.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "yesButton": "&&Evet", + "cancelButton": "İptal" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json b/i18n/trk/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json new file mode 100644 index 0000000000000..3adb24cee4c07 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/mode/common/workbenchModeService.i18n.json @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "invalid": "Geçersiz `contributes.{0}`. Bir dizi bekleniyordu.", + "invalid.empty": "`contributes.{0}` için boş değer", + "require.id": "`{0}` özelliği zorunludur ve `string` türünde olmalıdır", + "opt.extensions": "`{0}` özelliği atlanabilir veya `string[]` türünde olmalıdır", + "opt.filenames": "`{0}` özelliği atlanabilir veya `string[]` türünde olmalıdır", + "opt.firstLine": "`{0}` özelliği atlanabilir veya `string` türünde olmalıdır", + "opt.configuration": "`{0}` özelliği atlanabilir veya `string` türünde olmalıdır", + "opt.aliases": "`{0}` özelliği atlanabilir veya `string[]` türünde olmalıdır", + "opt.mimetypes": "`{0}` özelliği atlanabilir veya `string[]` türünde olmalıdır" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/progress/browser/progressService2.i18n.json b/i18n/trk/src/vs/workbench/services/progress/browser/progressService2.i18n.json new file mode 100644 index 0000000000000..6db7d6aae514a --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/progress/browser/progressService2.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "progress.text": "{0} - {1}", + "progress.title": "{0}: {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json b/i18n/trk/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json new file mode 100644 index 0000000000000..7c9f89a2ac813 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/textfile/common/textFileEditorModel.i18n.json @@ -0,0 +1,9 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "saveFileFirst": "Dosya kaydedilmemiş değişiklikler içeriyor. Başka bir kodlama ile yeniden açmadan önce lütfen ilk olarak kaydedin.", + "genericSaveError": "'{0}' kaydedilemedi: ({1})." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/textfile/common/textFileService.i18n.json b/i18n/trk/src/vs/workbench/services/textfile/common/textFileService.i18n.json new file mode 100644 index 0000000000000..d3399a79e656d --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/textfile/common/textFileService.i18n.json @@ -0,0 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "files.backup.failSave": "Dosyalar yedeklenemedi (Hata: {0}), çıkmak için dosyalarınızı kaydetmeyi deneyin." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json b/i18n/trk/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json new file mode 100644 index 0000000000000..5284725dbcbe1 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/textfile/electron-browser/textFileService.i18n.json @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "saveChangesMessage": "{0} dosyasına yaptığınız değişiklikleri kaydetmek istiyor musunuz?", + "saveChangesMessages": "Aşağıdaki {0} dosyaya yaptığınız değişiklikleri kaydetmek istiyor musunuz?", + "moreFile": "...1 ek dosya gösterilmiyor", + "moreFiles": "...{0} ek dosya gösterilmiyor", + "saveAll": "&&Tümünü Kaydet", + "save": "&&Kaydet", + "dontSave": "Kaydet&&me", + "cancel": "İptal", + "saveChangesDetail": "Değişiklikleriniz, kaydetmezseniz kaybolur.", + "allFiles": "Tüm Dosyalar", + "noExt": "Uzantısız" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json b/i18n/trk/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json new file mode 100644 index 0000000000000..70d9757c2552d --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/themes/common/colorThemeSchema.i18n.json @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "schema.colors": "Sentaks vurgulaması renkleri", + "schema.properties.name": "Kuralın açıklaması", + "schema.fontStyle": "Kuralın yazı tipi stili: 'italic', 'bold' ve 'underline' kombinasyonu veya bunlardan bir tanesi", + "schema.tokenColors.path": "Bir tmTheme dosyasının yolu (geçerli dosyaya göreli)" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json b/i18n/trk/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json new file mode 100644 index 0000000000000..93ef7b84d6308 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/themes/common/fileIconThemeSchema.i18n.json @@ -0,0 +1,37 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "schema.folderExpanded": "Genişletilmiş klasörler için klasör simgesi. Genişletilmiş klasör simgesi isteğe bağlıdır. Ayarlanmazsa, klasör için tanımlanan simge gösterilir.", + "schema.folder": "Daraltılmış klasörler için klasör simgesi; eğer folderExpanded ayarlanmamışsa, genişletilen klasörler için de kullanılır.", + "schema.file": "Varsayılan dosya simgesi, bir uzantı, dosya adı veya dil kimliği ile eşleşmeyen tüm dosyalar için gösterilir.", + "schema.folderNames": "Klasör adlarını simgelerle ilişkilendirir. Nesne anahtarı, herhangi bir yol parçası içermeyen klasör adıdır. Örüntüler veya joker karakterlere izin verilmez. Klasör adı eşleştirme büyük/küçük harfe duyarlı değildir.", + "schema.folderName": "İlişkilendirilecek simge tanımı ID'si.", + "schema.folderNamesExpanded": "Klasör adlarını genişletilmiş klasör simgeleriyle ilişkilendirir. Nesne anahtarı, herhangi bir yol parçası içermeyen klasör adıdır. Örüntüler veya joker karakterlere izin verilmez. Klasör adı eşleştirme büyük/küçük harfe duyarlı değildir.", + "schema.folderNameExpanded": "İlişkilendirilecek simge tanımı ID'si.", + "schema.fileExtensions": "Dosya uzantılarını simgelerle ilişkilendirir. Nesne anahtarı, dosya uzantısı adıdır. Uzantı adı, bir dosya adındaki son noktadan sonraki kısmıdır(nokta dahil değil). Uzantılar büyük/küçük harf ayırt etmeksizin karşılaştırılır.", + "schema.fileExtension": "İlişkilendirilecek simge tanımı ID'si.", + "schema.fileNames": "Dosya adlarını simgelerle ilişkilendirir. Nesne anahtarı, herhangi bir yol parçası içermeyen tam dosya adıdır. Dosya adı noktalar ve olası bir dosya uzantısı içerebilir. Örüntüler veya joker karakterlere izin verilmez. Dosya adı eşleştirme büyük/küçük harfe duyarlı değildir.", + "schema.fileName": "İlişkilendirilecek simge tanımı ID'si.", + "schema.languageIds": "Dilleri simgelerle ilişkilendirir. Nesne anahtarı, dil ekleme noktasında tanımlanan dil kimliğidir.", + "schema.languageId": "İlişkilendirilecek simge tanımı ID'si.", + "schema.fonts": "Simge tanımlarında kullanılacak yazı tipleri.", + "schema.id": "Yazı tipinin ID'si.", + "schema.src": "Yazı tipinin konumları.", + "schema.font-path": "Yazı tipi yolu, geçerli simge teması dosyasına göreli yol.", + "schema.font-format": "Yazı tipinin biçimi.", + "schema.font-weight": "Yazı tipinin kalınlığı.", + "schema.font-sstyle": "Yazı tipinin stili.", + "schema.font-size": "Yazı tipinin varsayılan boyutu.", + "schema.iconDefinitions": "Dosyalar simgelerle ilişkilendirirken kullanılabilecek tüm simgelerin açıklaması.", + "schema.iconDefinition": "Bir simge tanımı. Nesne anahtarı, tanımın ID'sidir.", + "schema.iconPath": "SVG veya PNG kullanırken: Görüntünün yolu. Yol, simge kümesi dosyasına görelidir.", + "schema.fontCharacter": "Glif yazı tipi kullanırken: Kullanılacak yazı tipindeki karakter.", + "schema.fontColor": "Glif yazı tipi kullanırken: Kullanılacak renk.", + "schema.fontSize": "Yazı tipi kullanırken: Metin yazı tipi yüzdesine göre yazı tipi boyutu. Ayarlanmazsa, yazı tipi tanımındaki boyut kullanılır.", + "schema.fontId": "Yazı tipi kullanırken: Yazı tipinin kimliği. Ayarlanmazsa, ilk yazı tipi tanımı varsayılan olarak kullanılır.", + "schema.light": "Açık renk temalarındaki dosya simgeleri için isteğe bağlı ilişkilendirmeler.", + "schema.highContrast": "Yüksek karşıtlık renk temalarındaki dosya simgeleri için isteğe bağlı ilişkilendirmeler." +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json b/i18n/trk/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json new file mode 100644 index 0000000000000..d00686b6cdd37 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/themes/electron-browser/colorThemeData.i18n.json @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "error.cannotparsejson": "JSON tema dosyasını ayrıştırma sorunları: {0}", + "error.invalidformat.colors": "Renk teması dosyasını ayrıştırma sorunu: {0}. 'colors' özelliği 'nesne' türünde değil.", + "error.invalidformat.tokenColors": "Renk teması dosyasını ayrıştırma sorunu: {0}. 'tokenColors' özelliği ya renkleri belirten bir dizi ya da bir text mate tema dosyasının yolunu içermelidir", + "error.plist.invalidformat": "tmTheme tema dosyasını ayrıştırma sorunları: {0}. 'settings' dizi değil", + "error.cannotparse": "tmTheme tema dosyasını ayrıştırma sorunları: {0}", + "error.cannotload": "{0} tmTheme tema dosyasını yükleme sorunları: {1}" +} \ No newline at end of file diff --git a/i18n/trk/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json b/i18n/trk/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json new file mode 100644 index 0000000000000..96d6b5ce78770 --- /dev/null +++ b/i18n/trk/src/vs/workbench/services/themes/electron-browser/workbenchThemeService.i18n.json @@ -0,0 +1,32 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +// Do not edit this file. It is machine generated. +{ + "vscode.extension.contributes.themes": "Textmate renk temalarına ekleme yapar.", + "vscode.extension.contributes.themes.id": "Kullanıcı ayarlarında kullanılan simge teması Id'si.", + "vscode.extension.contributes.themes.label": "Kullanıcı arayüzünde görünen renk temasının etiketi.", + "vscode.extension.contributes.themes.uiTheme": "Editördeki renkleri tanımlayan temel tema: 'vs' açık renk temasıdır, 'vs-dark' koyu renk temasıdır. 'hc-black' ise yüksek kontrast temasıdır.", + "vscode.extension.contributes.themes.path": "tmLanguage dosyasının yolu. Yol, eklenti klasörüne görecelidir ve genellikle './themes/themeFile.tmTheme'dir.", + "vscode.extension.contributes.iconThemes": "Dosya simgesi temalarına ekleme yapar.", + "vscode.extension.contributes.iconThemes.id": "Kullanıcı ayarlarında kullanılan simge teması Id'si.", + "vscode.extension.contributes.iconThemes.label": "Kullanıcı arayüzünde görünen simge temasının etiketi.", + "vscode.extension.contributes.iconThemes.path": "Simge teması tanımlama dosyasının yolu. Yol, eklenti klasörüne görecelidir ve genellikle './icons/awesome-icon-theme.json'dur.", + "migration.completed": "Yeni tema ayarları kullanıcı ayarlarına eklendi. Yedek, {0} konumunda mevcuttur.", + "error.cannotloadtheme": "{0} yüklenemedi: {1}", + "reqarray": "Eklenti noktası `{0}` bir dizi olmalıdır.", + "reqpath": "`contributes.{0}.path` ögesinde dize bekleniyor. Sağlanan değer: {1}", + "invalid.path.1": "`contributes.{0}.path` ögesinin ({1}) eklentinin klasöründe ({2}) yer alması bekleniyor. Bu, eklentiyi taşınamaz yapabilir.", + "reqid": "`contributes.{0}.id` ögesinde dize bekleniyordu. Belirtilen değer: {1}", + "error.cannotloadicontheme": "{0} yüklenemedi", + "error.cannotparseicontheme": "Dosya simgeleri dosyasını ayrıştırma sorunları: {0}", + "colorTheme": "Çalışma ekranında kullanılan renk temasını belirtir.", + "colorThemeError": "Tema bilinmiyor veya yüklenmemiş.", + "iconTheme": "Çalışma ekranında kullanılan simge temasını belirtir.", + "noIconThemeDesc": "Dosya simgesi yok", + "iconThemeError": "Dosya simgesi teması bilinmiyor veya yüklenmemiş.", + "workbenchColors": "Şu an seçili renk temasındaki renkleri geçersiz kılar.", + "workbenchColors.deprecated": "Ayar, artık deneysel değildir ve 'workbench.colorCustomizations' olarak yeniden adlandırılmıştır", + "workbenchColors.deprecatedDescription": "Bunun yerine 'workbench.colorCustomizations' kullanın" +} \ No newline at end of file From df9ef660190ff6219472dd2ef07f658357708ddf Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 17 Jun 2017 02:03:44 -0700 Subject: [PATCH 1997/2747] Increase contrast of bright black in solarized terminal Fixes #28288 --- .../theme-solarized-dark/themes/solarized-dark-color-theme.json | 2 +- .../themes/solarized-light-color-theme.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json index f21572d1c1198..5309eb6fd1a19 100644 --- a/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json +++ b/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json @@ -467,7 +467,7 @@ "terminal.ansiMagenta": "#d33682", "terminal.ansiCyan": "#2aa198", "terminal.ansiWhite": "#eee8d5", - "terminal.ansiBrightBlack": "#002b36", + "terminal.ansiBrightBlack": "#586e75", "terminal.ansiBrightRed": "#cb4b16", "terminal.ansiBrightGreen": "#586e75", "terminal.ansiBrightYellow": "#657b83", diff --git a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json index 184144621204f..d52a797a35f53 100644 --- a/extensions/theme-solarized-light/themes/solarized-light-color-theme.json +++ b/extensions/theme-solarized-light/themes/solarized-light-color-theme.json @@ -470,7 +470,7 @@ "terminal.ansiMagenta": "#d33682", "terminal.ansiCyan": "#2aa198", "terminal.ansiWhite": "#eee8d5", - "terminal.ansiBrightBlack": "#002b36", + "terminal.ansiBrightBlack": "#586e75", "terminal.ansiBrightRed": "#cb4b16", "terminal.ansiBrightGreen": "#586e75", "terminal.ansiBrightYellow": "#657b83", From a38b96765db34988416642ad4f873eccda28f1d4 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 17 Jun 2017 02:40:18 -0700 Subject: [PATCH 1998/2747] Improve nsfw types --- src/typings/nsfw.d.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/typings/nsfw.d.ts b/src/typings/nsfw.d.ts index 8d80f6710b461..9f41a8905ce3f 100644 --- a/src/typings/nsfw.d.ts +++ b/src/typings/nsfw.d.ts @@ -4,7 +4,16 @@ *--------------------------------------------------------------------------------------------*/ declare module 'nsfw' { - function init(dir: string, ...args: any[]); + interface NsfwFunction { + (dir: string, ...args: any[]): any; + actions: { + CREATED: number; + DELETED: number; + MODIFIED: number; + RENAMED: number; + } + } - export = init; + var nsfw: NsfwFunction; + export = nsfw; } From 00b0ae979f7241441427d711a2d0c954cba66eff Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 17 Jun 2017 03:04:36 -0700 Subject: [PATCH 1999/2747] Add ThrottledDelayer and event normalization --- .../node/watcher/nsfw/nsfwWatcherService.ts | 87 +++++++++---------- 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts index 717db358dfb32..b314e9a331e59 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts @@ -8,19 +8,21 @@ import { IWatcherService, IWatcherRequest } from 'vs/workbench/services/files/no import { TPromise } from "vs/base/common/winjs.base"; import watcher = require('vs/workbench/services/files/node/watcher/common'); import * as path from 'path'; +import { ThrottledDelayer } from 'vs/base/common/async'; +import { FileChangeType } from 'vs/platform/files/common/files'; -const nsfwEventActionToRawChangeType = { - 0: 1, // Created - 1: 2, // Deleted - 2: 0, // Modified - // TODO: handle rename event type - 3: null // Rename -}; +const nsfwActionToRawChangeType: { [key: number]: number } = []; +nsfwActionToRawChangeType[nsfw.actions.CREATED] = FileChangeType.ADDED; +nsfwActionToRawChangeType[nsfw.actions.MODIFIED] = FileChangeType.UPDATED; +nsfwActionToRawChangeType[nsfw.actions.DELETED] = FileChangeType.DELETED; export class NsfwWatcherService implements IWatcherService { + private static FS_EVENT_DELAY = 50; // aggregate and only emit events when changes have stopped for this duration (in ms) + public watch(request: IWatcherRequest): TPromise { - console.log('nsfw ' + nsfw); - console.log('basePath ' + request.basePath); + let undeliveredFileEvents: watcher.IRawFileChange[] = []; + const fileEventDelayer = new ThrottledDelayer(NsfwWatcherService.FS_EVENT_DELAY); + return new TPromise((c, e, p) => { nsfw(request.basePath, events => { if (request.verboseLogging) { @@ -28,47 +30,42 @@ export class NsfwWatcherService implements IWatcherService { events.forEach(e => console.log(e)); console.log('raw events end'); } - const convertedEvents: watcher.IRawFileChange[] = []; - events.forEach(e => { - const c = this._mapNsfwEventToRawFileChanges(e); - if (c && c.length) { - c.forEach(c1 => convertedEvents.push(c1)); + + for (let i = 0; i < events.length; i++) { + const e = events[i]; + if (e.action === nsfw.actions.RENAMED) { + // Rename fires when a file's name changes within a single directory + undeliveredFileEvents.push({ type: FileChangeType.DELETED, path: path.join(e.directory, e.oldFile) }); + undeliveredFileEvents.push({ type: FileChangeType.ADDED, path: path.join(e.directory, e.newFile) }); + } else { + undeliveredFileEvents.push({ + type: nsfwActionToRawChangeType[e.action], + path: path.join(e.directory, e.file) + }); } - }); - if (request.verboseLogging) { - console.log('converted events', convertedEvents); } - // TODO: Utilize fileEventDelayer and watcher.normalize - p(convertedEvents); - }).then(watcher => { - return watcher.start(); - }); - }); - } - - private _mapNsfwEventToRawFileChanges(nsfwEvent: any): watcher.IRawFileChange[] { - // TODO: Handle other event types (directory change?) + // Delay and send buffer + fileEventDelayer.trigger(() => { + const events = undeliveredFileEvents; + undeliveredFileEvents = []; - // Convert a rename event to a delete and a create - if (nsfwEvent.action === 3) { - console.log('rename', nsfwEvent); - return [ - { type: 2, path: path.join(nsfwEvent.directory, nsfwEvent.oldFile) }, // Delete - { type: 1, path: path.join(nsfwEvent.directory, nsfwEvent.newFile) } // Create - ]; - } + // Broadcast to clients normalized + const res = watcher.normalize(events); + p(res); - if (!nsfwEvent.directory || !nsfwEvent.file) { - throw new Error('unhandled case'); - // return null; - } - const p = path.join(nsfwEvent.directory, nsfwEvent.file); + // Logging + if (request.verboseLogging) { + res.forEach(r => { + console.log(' >> normalized', r.type === FileChangeType.ADDED ? '[ADDED]' : r.type === FileChangeType.DELETED ? '[DELETED]' : '[CHANGED]', r.path); + }); + } - const event: watcher.IRawFileChange = { - type: nsfwEventActionToRawChangeType[nsfwEvent.action], - path: p - }; - return [event]; + return TPromise.as(null); + }); + }).then(watcher => { + return watcher.start(); + }); + }); } } From b7fab4b8c669870354e87a3fa1453734d58d2f62 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 17 Jun 2017 03:27:39 -0700 Subject: [PATCH 2000/2747] Support ignored paths --- .../node/watcher/nsfw/nsfwWatcherService.ts | 40 +++++++++++++++---- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts index b314e9a331e59..d572b239cfd97 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts @@ -3,11 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import * as glob from 'vs/base/common/glob'; +import * as path from 'path'; +import * as watcher from 'vs/workbench/services/files/node/watcher/common'; import nsfw = require('nsfw'); import { IWatcherService, IWatcherRequest } from 'vs/workbench/services/files/node/watcher/unix/watcher'; import { TPromise } from "vs/base/common/winjs.base"; -import watcher = require('vs/workbench/services/files/node/watcher/common'); -import * as path from 'path'; import { ThrottledDelayer } from 'vs/base/common/async'; import { FileChangeType } from 'vs/platform/files/common/files'; @@ -19,7 +20,16 @@ nsfwActionToRawChangeType[nsfw.actions.DELETED] = FileChangeType.DELETED; export class NsfwWatcherService implements IWatcherService { private static FS_EVENT_DELAY = 50; // aggregate and only emit events when changes have stopped for this duration (in ms) + private _ignored: string[]; + + constructor() {} + public watch(request: IWatcherRequest): TPromise { + if (request.verboseLogging) { + console.log('request', request); + } + + this._ignored = request.ignored; let undeliveredFileEvents: watcher.IRawFileChange[] = []; const fileEventDelayer = new ThrottledDelayer(NsfwWatcherService.FS_EVENT_DELAY); @@ -32,16 +42,26 @@ export class NsfwWatcherService implements IWatcherService { } for (let i = 0; i < events.length; i++) { + let absolutePath: string; const e = events[i]; if (e.action === nsfw.actions.RENAMED) { // Rename fires when a file's name changes within a single directory - undeliveredFileEvents.push({ type: FileChangeType.DELETED, path: path.join(e.directory, e.oldFile) }); - undeliveredFileEvents.push({ type: FileChangeType.ADDED, path: path.join(e.directory, e.newFile) }); + absolutePath = path.join(e.directory, e.oldFile); + if (!this._isPathIgnored(absolutePath)) { + undeliveredFileEvents.push({ type: FileChangeType.DELETED, path: absolutePath }); + } + absolutePath = path.join(e.directory, e.newFile); + if (!this._isPathIgnored(absolutePath)) { + undeliveredFileEvents.push({ type: FileChangeType.ADDED, path: absolutePath }); + } } else { - undeliveredFileEvents.push({ - type: nsfwActionToRawChangeType[e.action], - path: path.join(e.directory, e.file) - }); + absolutePath = path.join(e.directory, e.file); + if (!this._isPathIgnored(absolutePath)) { + undeliveredFileEvents.push({ + type: nsfwActionToRawChangeType[e.action], + path: absolutePath + }); + } } } @@ -68,4 +88,8 @@ export class NsfwWatcherService implements IWatcherService { }); }); } + + private _isPathIgnored(absolutePath: string): boolean { + return this._ignored && this._ignored.some(ignore => glob.match(ignore, absolutePath)); + } } From 6645b793b1a741f1b8a6ac88c80207eeb7e90339 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 17 Jun 2017 03:28:04 -0700 Subject: [PATCH 2001/2747] Improve typings --- src/typings/nsfw.d.ts | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/typings/nsfw.d.ts b/src/typings/nsfw.d.ts index 9f41a8905ce3f..8e0f911eb15b3 100644 --- a/src/typings/nsfw.d.ts +++ b/src/typings/nsfw.d.ts @@ -4,8 +4,29 @@ *--------------------------------------------------------------------------------------------*/ declare module 'nsfw' { + interface NsfwWatcher { + start(): void; + stop(): void; + } + + interface NsfwWatchingPromise { + then(): void; + } + + interface NsfwStartWatchingPromise { + then(fn: (watcher: NsfwWatcher) => void): NsfwWatchingPromise; + } + + interface NsfwEvent { + action: number; + directory: string; + file?: string; + newFile?: string; + oldFile?: string; + } + interface NsfwFunction { - (dir: string, ...args: any[]): any; + (dir: string, eventHandler: (events: NsfwEvent[]) => void, options?: any): NsfwStartWatchingPromise; actions: { CREATED: number; DELETED: number; From 66154fa1dd6e22217afbb0d4c9e24facc622b50c Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 17 Jun 2017 04:19:43 -0700 Subject: [PATCH 2002/2747] Allow nsfw file watcher to work alongside others --- src/vs/platform/files/common/files.ts | 1 + src/vs/workbench/buildfile.js | 1 + .../parts/files/browser/files.contribution.ts | 5 + .../files/electron-browser/fileService.ts | 3 +- .../services/files/node/fileService.ts | 25 ++++- .../node/watcher/nsfw/nsfwWatcherService.ts | 19 ++-- .../files/node/watcher/nsfw/watcher.ts | 23 +++++ .../files/node/watcher/nsfw/watcherApp.ts | 14 +++ .../files/node/watcher/nsfw/watcherIpc.ts | 36 ++++++++ .../files/node/watcher/nsfw/watcherService.ts | 92 +++++++++++++++++++ .../files/node/watcher/unix/watcher.ts | 5 + .../files/node/watcher/unix/watcherApp.ts | 4 +- .../files/node/watcher/unix/watcherService.ts | 8 +- 13 files changed, 216 insertions(+), 20 deletions(-) create mode 100644 src/vs/workbench/services/files/node/watcher/nsfw/watcher.ts create mode 100644 src/vs/workbench/services/files/node/watcher/nsfw/watcherApp.ts create mode 100644 src/vs/workbench/services/files/node/watcher/nsfw/watcherIpc.ts create mode 100644 src/vs/workbench/services/files/node/watcher/nsfw/watcherService.ts diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index f5616b353fbba..702e9190124c8 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -538,6 +538,7 @@ export interface IFilesConfiguration { autoSaveDelay: number; eol: string; hotExit: string; + useNsfwFileWatcher: boolean; }; } diff --git a/src/vs/workbench/buildfile.js b/src/vs/workbench/buildfile.js index b4102009d69e5..576cec8ea90a9 100644 --- a/src/vs/workbench/buildfile.js +++ b/src/vs/workbench/buildfile.js @@ -24,6 +24,7 @@ exports.collectModules = function (excludes) { createModuleDescription('vs/workbench/services/search/node/searchApp', []), createModuleDescription('vs/workbench/services/search/node/worker/searchWorkerApp', []), createModuleDescription('vs/workbench/services/files/node/watcher/unix/watcherApp', []), + createModuleDescription('vs/workbench/services/files/node/watcher/nsfw/watcherApp', []), createModuleDescription('vs/workbench/node/extensionHostProcess', []), diff --git a/src/vs/workbench/parts/files/browser/files.contribution.ts b/src/vs/workbench/parts/files/browser/files.contribution.ts index 4c4c811c26c70..7fe88df5107c3 100644 --- a/src/vs/workbench/parts/files/browser/files.contribution.ts +++ b/src/vs/workbench/parts/files/browser/files.contribution.ts @@ -275,6 +275,11 @@ configurationRegistry.registerConfiguration({ ], 'description': nls.localize('hotExit', "Controls whether unsaved files are remembered between sessions, allowing the save prompt when exiting the editor to be skipped.", HotExitConfiguration.ON_EXIT, HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE) }, + 'files.useNsfwFileWatcher': { + 'type': 'boolean', + 'default': false, + 'description': nls.localize('useNsfwFileWatcher', "Use the new experimental file watcher utilizing the nsfw library.") + }, 'files.defaultLanguage': { 'type': 'string', 'description': nls.localize('defaultLanguage', "The default language mode that is assigned to new files.") diff --git a/src/vs/workbench/services/files/electron-browser/fileService.ts b/src/vs/workbench/services/files/electron-browser/fileService.ts index 4686db922fd72..af4a7814979de 100644 --- a/src/vs/workbench/services/files/electron-browser/fileService.ts +++ b/src/vs/workbench/services/files/electron-browser/fileService.ts @@ -85,11 +85,12 @@ export class FileService implements IFileService { encodingOverride, watcherIgnoredPatterns, verboseLogging: environmentService.verbose, + useNsfwFileWatcher: configuration.files.useNsfwFileWatcher }; // create service const workspace = this.contextService.getWorkspace(); - this.raw = new NodeFileService(workspace ? workspace.resource.fsPath : void 0, fileServiceConfig); + this.raw = new NodeFileService(workspace ? workspace.resource.fsPath : void 0, fileServiceConfig, contextService); // Listeners this.registerListeners(); diff --git a/src/vs/workbench/services/files/node/fileService.ts b/src/vs/workbench/services/files/node/fileService.ts index 11154b8e8c4c2..09ca8f8bd566b 100644 --- a/src/vs/workbench/services/files/node/fileService.ts +++ b/src/vs/workbench/services/files/node/fileService.ts @@ -26,6 +26,7 @@ import uri from 'vs/base/common/uri'; import nls = require('vs/nls'); import { isWindows, isLinux } from 'vs/base/common/platform'; import { dispose, IDisposable, toDisposable } from 'vs/base/common/lifecycle'; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import pfs = require('vs/base/node/pfs'); import encoding = require('vs/base/node/encoding'); @@ -35,6 +36,7 @@ import { FileWatcher as UnixWatcherService } from 'vs/workbench/services/files/n import { FileWatcher as WindowsWatcherService } from 'vs/workbench/services/files/node/watcher/win32/watcherService'; import { toFileChangesEvent, normalize, IRawFileChange } from 'vs/workbench/services/files/node/watcher/common'; import Event, { Emitter } from 'vs/base/common/event'; +import { FileWatcher as NsfwWatcherService } from 'vs/workbench/services/files/node/watcher/nsfw/watcherService'; export interface IEncodingOverride { resource: uri; @@ -51,6 +53,7 @@ export interface IFileServiceOptions { watcherIgnoredPatterns?: string[]; disableWatcher?: boolean; verboseLogging?: boolean; + useNsfwFileWatcher?: boolean; } function etag(stat: fs.Stats): string; @@ -90,7 +93,11 @@ export class FileService implements IFileService { private fileChangesWatchDelayer: ThrottledDelayer; private undeliveredRawFileChangesEvents: IRawFileChange[]; - constructor(basePath: string, options: IFileServiceOptions) { + constructor( + basePath: string, + options: IFileServiceOptions, + private contextService: IWorkspaceContextService + ) { this.toDispose = []; this.basePath = basePath ? paths.normalize(basePath) : void 0; @@ -120,10 +127,15 @@ export class FileService implements IFileService { } if (this.basePath && !this.options.disableWatcher) { - if (isWindows) { - this.setupWin32WorkspaceWatching(); + console.log(this.options); + if (this.options.useNsfwFileWatcher) { + this.setupNsfwWorkspceWatching(); } else { - this.setupUnixWorkspaceWatching(); + if (isWindows) { + this.setupWin32WorkspaceWatching(); + } else { + this.setupUnixWorkspaceWatching(); + } } } @@ -154,6 +166,11 @@ export class FileService implements IFileService { this.toDispose.push(toDisposable(new UnixWatcherService(this.basePath, this.options.watcherIgnoredPatterns, e => this._onFileChanges.fire(e), this.options.errorLogger, this.options.verboseLogging).startWatching())); } + private setupNsfwWorkspceWatching(): void { + const service = new NsfwWatcherService(this.basePath, this.options.watcherIgnoredPatterns, e => this._onFileChanges.fire(e), this.options.errorLogger, this.options.verboseLogging); + this.toDispose.push(toDisposable(service.startWatching())); + } + public resolveFile(resource: uri, options?: IResolveFileOptions): TPromise { return this.resolve(resource, options); } diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts index d572b239cfd97..fa39635e56987 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts @@ -6,9 +6,9 @@ import * as glob from 'vs/base/common/glob'; import * as path from 'path'; import * as watcher from 'vs/workbench/services/files/node/watcher/common'; -import nsfw = require('nsfw'); +import * as nsfw from 'nsfw'; import { IWatcherService, IWatcherRequest } from 'vs/workbench/services/files/node/watcher/unix/watcher'; -import { TPromise } from "vs/base/common/winjs.base"; +import { TPromise } from 'vs/base/common/winjs.base'; import { ThrottledDelayer } from 'vs/base/common/async'; import { FileChangeType } from 'vs/platform/files/common/files'; @@ -20,16 +20,11 @@ nsfwActionToRawChangeType[nsfw.actions.DELETED] = FileChangeType.DELETED; export class NsfwWatcherService implements IWatcherService { private static FS_EVENT_DELAY = 50; // aggregate and only emit events when changes have stopped for this duration (in ms) - private _ignored: string[]; - - constructor() {} - public watch(request: IWatcherRequest): TPromise { if (request.verboseLogging) { console.log('request', request); } - this._ignored = request.ignored; let undeliveredFileEvents: watcher.IRawFileChange[] = []; const fileEventDelayer = new ThrottledDelayer(NsfwWatcherService.FS_EVENT_DELAY); @@ -47,16 +42,16 @@ export class NsfwWatcherService implements IWatcherService { if (e.action === nsfw.actions.RENAMED) { // Rename fires when a file's name changes within a single directory absolutePath = path.join(e.directory, e.oldFile); - if (!this._isPathIgnored(absolutePath)) { + if (!this._isPathIgnored(absolutePath, request.ignored)) { undeliveredFileEvents.push({ type: FileChangeType.DELETED, path: absolutePath }); } absolutePath = path.join(e.directory, e.newFile); - if (!this._isPathIgnored(absolutePath)) { + if (!this._isPathIgnored(absolutePath, request.ignored)) { undeliveredFileEvents.push({ type: FileChangeType.ADDED, path: absolutePath }); } } else { absolutePath = path.join(e.directory, e.file); - if (!this._isPathIgnored(absolutePath)) { + if (!this._isPathIgnored(absolutePath, request.ignored)) { undeliveredFileEvents.push({ type: nsfwActionToRawChangeType[e.action], path: absolutePath @@ -89,7 +84,7 @@ export class NsfwWatcherService implements IWatcherService { }); } - private _isPathIgnored(absolutePath: string): boolean { - return this._ignored && this._ignored.some(ignore => glob.match(ignore, absolutePath)); + private _isPathIgnored(absolutePath: string, ignored: string[]): boolean { + return ignored && ignored.some(ignore => glob.match(ignore, absolutePath)); } } diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/watcher.ts b/src/vs/workbench/services/files/node/watcher/nsfw/watcher.ts new file mode 100644 index 0000000000000..2b78d48289fe0 --- /dev/null +++ b/src/vs/workbench/services/files/node/watcher/nsfw/watcher.ts @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { TPromise } from 'vs/base/common/winjs.base'; + +export interface IWatcherRequest { + basePath: string; + ignored: string[]; + verboseLogging: boolean; +} + +export interface IWatcherService { + watch(request: IWatcherRequest): TPromise; +} + +export interface IFileWatcher { + startWatching(): () => void; + addFolder(folder: string): void; +} \ No newline at end of file diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/watcherApp.ts b/src/vs/workbench/services/files/node/watcher/nsfw/watcherApp.ts new file mode 100644 index 0000000000000..6f0942f996e9f --- /dev/null +++ b/src/vs/workbench/services/files/node/watcher/nsfw/watcherApp.ts @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +'use strict'; + +import { Server } from 'vs/base/parts/ipc/node/ipc.cp'; +import { WatcherChannel } from 'vs/workbench/services/files/node/watcher/unix/watcherIpc'; +import { NsfwWatcherService } from 'vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService'; + +const server = new Server(); +const service = new NsfwWatcherService(); +const channel = new WatcherChannel(service); +server.registerChannel('watcher', channel); \ No newline at end of file diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/watcherIpc.ts b/src/vs/workbench/services/files/node/watcher/nsfw/watcherIpc.ts new file mode 100644 index 0000000000000..f949ab0e6fe4a --- /dev/null +++ b/src/vs/workbench/services/files/node/watcher/nsfw/watcherIpc.ts @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { TPromise } from 'vs/base/common/winjs.base'; +import { IChannel } from 'vs/base/parts/ipc/common/ipc'; +import { IWatcherRequest, IWatcherService } from './watcher'; + +export interface IWatcherChannel extends IChannel { + call(command: 'watch', request: IWatcherRequest): TPromise; + call(command: string, arg: any): TPromise; +} + +export class WatcherChannel implements IWatcherChannel { + + constructor(private service: IWatcherService) { } + + call(command: string, arg: any): TPromise { + switch (command) { + case 'watch': return this.service.watch(arg); + } + return undefined; + } +} + +export class WatcherChannelClient implements IWatcherService { + + constructor(private channel: IWatcherChannel) { } + + watch(request: IWatcherRequest): TPromise { + return this.channel.call('watch', request); + } +} \ No newline at end of file diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/watcherService.ts b/src/vs/workbench/services/files/node/watcher/nsfw/watcherService.ts new file mode 100644 index 0000000000000..653bed4f4ede3 --- /dev/null +++ b/src/vs/workbench/services/files/node/watcher/nsfw/watcherService.ts @@ -0,0 +1,92 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { TPromise } from 'vs/base/common/winjs.base'; +import { getNextTickChannel } from 'vs/base/parts/ipc/common/ipc'; +import { Client } from 'vs/base/parts/ipc/node/ipc.cp'; +import uri from 'vs/base/common/uri'; +import { toFileChangesEvent, IRawFileChange } from 'vs/workbench/services/files/node/watcher/common'; +import { IWatcherChannel, WatcherChannelClient } from 'vs/workbench/services/files/node/watcher/unix/watcherIpc'; +import { FileChangesEvent } from 'vs/platform/files/common/files'; +import { IFileWatcher } from "vs/workbench/services/files/node/watcher/unix/watcher"; + +export class FileWatcher implements IFileWatcher { + private static MAX_RESTARTS = 5; + + private isDisposed: boolean; + private restartCounter: number; + + constructor( + private basePath: string, + private ignored: string[], + private onFileChanges: (changes: FileChangesEvent) => void, + private errorLogger: (msg: string) => void, + private verboseLogging: boolean + ) { + this.isDisposed = false; + this.restartCounter = 0; + } + + public startWatching(): () => void { + const args = ['--type=watcherService']; + + const client = new Client( + uri.parse(require.toUrl('bootstrap')).fsPath, + { + serverName: 'Watcher', + args, + env: { + AMD_ENTRYPOINT: 'vs/workbench/services/files/node/watcher/nsfw/watcherApp', + PIPE_LOGGING: 'true', + VERBOSE_LOGGING: this.verboseLogging + } + } + ); + + const channel = getNextTickChannel(client.getChannel('watcher')); + const service = new WatcherChannelClient(channel); + + // Start watching + service.watch({ basePath: this.basePath, ignored: this.ignored, verboseLogging: this.verboseLogging }).then(null, (err) => { + if (!(err instanceof Error && err.name === 'Canceled' && err.message === 'Canceled')) { + return TPromise.wrapError(err); // the service lib uses the promise cancel error to indicate the process died, we do not want to bubble this up + } + return undefined; + }, (events: IRawFileChange[]) => this.onRawFileEvents(events)).done(() => { + + // our watcher app should never be completed because it keeps on watching. being in here indicates + // that the watcher process died and we want to restart it here. we only do it a max number of times + if (!this.isDisposed) { + if (this.restartCounter <= FileWatcher.MAX_RESTARTS) { + this.errorLogger('[FileWatcher] terminated unexpectedly and is restarted again...'); + this.restartCounter++; + // TODO: What do we do for multi-root here? + this.startWatching(); + } else { + this.errorLogger('[FileWatcher] failed to start after retrying for some time, giving up. Please report this as a bug report!'); + } + } + }, this.errorLogger); + + return () => { + client.dispose(); + this.isDisposed = true; + }; + } + + public addFolder(folder: string): void { + console.log('addFolder: ' + folder); + } + + private onRawFileEvents(events: IRawFileChange[]): void { + + // Emit through broadcast service + if (events.length > 0) { + this.onFileChanges(toFileChangesEvent(events)); + } + } +} \ No newline at end of file diff --git a/src/vs/workbench/services/files/node/watcher/unix/watcher.ts b/src/vs/workbench/services/files/node/watcher/unix/watcher.ts index 6961b77f6a23b..2b78d48289fe0 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/watcher.ts +++ b/src/vs/workbench/services/files/node/watcher/unix/watcher.ts @@ -16,3 +16,8 @@ export interface IWatcherRequest { export interface IWatcherService { watch(request: IWatcherRequest): TPromise; } + +export interface IFileWatcher { + startWatching(): () => void; + addFolder(folder: string): void; +} \ No newline at end of file diff --git a/src/vs/workbench/services/files/node/watcher/unix/watcherApp.ts b/src/vs/workbench/services/files/node/watcher/unix/watcherApp.ts index 6f0942f996e9f..7c91d6c73e3fd 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/watcherApp.ts +++ b/src/vs/workbench/services/files/node/watcher/unix/watcherApp.ts @@ -6,9 +6,9 @@ import { Server } from 'vs/base/parts/ipc/node/ipc.cp'; import { WatcherChannel } from 'vs/workbench/services/files/node/watcher/unix/watcherIpc'; -import { NsfwWatcherService } from 'vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService'; +import { ChokidarWatcherService } from 'vs/workbench/services/files/node/watcher/unix/chokidarWatcherService'; const server = new Server(); -const service = new NsfwWatcherService(); +const service = new ChokidarWatcherService(); const channel = new WatcherChannel(service); server.registerChannel('watcher', channel); \ No newline at end of file diff --git a/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts b/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts index 1854bcde46939..985f1e2281e5e 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts @@ -12,8 +12,9 @@ import uri from 'vs/base/common/uri'; import { toFileChangesEvent, IRawFileChange } from 'vs/workbench/services/files/node/watcher/common'; import { IWatcherChannel, WatcherChannelClient } from 'vs/workbench/services/files/node/watcher/unix/watcherIpc'; import { FileChangesEvent } from 'vs/platform/files/common/files'; +import { IFileWatcher } from "vs/workbench/services/files/node/watcher/unix/watcher"; -export class FileWatcher { +export class FileWatcher implements IFileWatcher { private static MAX_RESTARTS = 5; private isDisposed: boolean; @@ -63,6 +64,7 @@ export class FileWatcher { if (this.restartCounter <= FileWatcher.MAX_RESTARTS) { this.errorLogger('[FileWatcher] terminated unexpectedly and is restarted again...'); this.restartCounter++; + // TODO: What do we do for multi-root here? this.startWatching(); } else { this.errorLogger('[FileWatcher] failed to start after retrying for some time, giving up. Please report this as a bug report!'); @@ -76,6 +78,10 @@ export class FileWatcher { }; } + public addFolder(folder: string): void { + console.log('addFolder: ' + folder); + } + private onRawFileEvents(events: IRawFileChange[]): void { // Emit through broadcast service From 25ab8aaa1cc615aec8029d71a300524e8cbfee80 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 17 Jun 2017 05:41:22 -0700 Subject: [PATCH 2003/2747] Start working on multiple root file watcher support --- .../services/files/node/fileService.ts | 4 +-- .../node/watcher/nsfw/nsfwWatcherService.ts | 9 +++++- .../files/node/watcher/nsfw/watcher.ts | 1 + .../files/node/watcher/nsfw/watcherApp.ts | 2 +- .../files/node/watcher/nsfw/watcherIpc.ts | 5 +++ .../files/node/watcher/nsfw/watcherService.ts | 31 +++++++++++++++---- .../files/node/watcher/unix/watcher.ts | 5 --- 7 files changed, 41 insertions(+), 16 deletions(-) diff --git a/src/vs/workbench/services/files/node/fileService.ts b/src/vs/workbench/services/files/node/fileService.ts index 09ca8f8bd566b..9fb08ad116b2e 100644 --- a/src/vs/workbench/services/files/node/fileService.ts +++ b/src/vs/workbench/services/files/node/fileService.ts @@ -127,7 +127,6 @@ export class FileService implements IFileService { } if (this.basePath && !this.options.disableWatcher) { - console.log(this.options); if (this.options.useNsfwFileWatcher) { this.setupNsfwWorkspceWatching(); } else { @@ -167,8 +166,7 @@ export class FileService implements IFileService { } private setupNsfwWorkspceWatching(): void { - const service = new NsfwWatcherService(this.basePath, this.options.watcherIgnoredPatterns, e => this._onFileChanges.fire(e), this.options.errorLogger, this.options.verboseLogging); - this.toDispose.push(toDisposable(service.startWatching())); + this.toDispose.push(toDisposable(new NsfwWatcherService(this.basePath, this.options.watcherIgnoredPatterns, e => this._onFileChanges.fire(e), this.options.errorLogger, this.options.verboseLogging, this.contextService).startWatching())); } public resolveFile(resource: uri, options?: IResolveFileOptions): TPromise { diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts index fa39635e56987..29cfd0b2fdc4b 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts @@ -7,7 +7,7 @@ import * as glob from 'vs/base/common/glob'; import * as path from 'path'; import * as watcher from 'vs/workbench/services/files/node/watcher/common'; import * as nsfw from 'nsfw'; -import { IWatcherService, IWatcherRequest } from 'vs/workbench/services/files/node/watcher/unix/watcher'; +import { IWatcherService, IWatcherRequest } from 'vs/workbench/services/files/node/watcher/nsfw/watcher'; import { TPromise } from 'vs/base/common/winjs.base'; import { ThrottledDelayer } from 'vs/base/common/async'; import { FileChangeType } from 'vs/platform/files/common/files'; @@ -84,6 +84,13 @@ export class NsfwWatcherService implements IWatcherService { }); } + public setRoots(roots: string[]): TPromise { + console.log('nsfwWatcherService, setRoots', roots); + // TODO: Watch multiple folders + // TODO: Don't watch sub-folders of folders + return TPromise.as(void 0); + } + private _isPathIgnored(absolutePath: string, ignored: string[]): boolean { return ignored && ignored.some(ignore => glob.match(ignore, absolutePath)); } diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/watcher.ts b/src/vs/workbench/services/files/node/watcher/nsfw/watcher.ts index 2b78d48289fe0..2676e0e2b09ac 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/watcher.ts +++ b/src/vs/workbench/services/files/node/watcher/nsfw/watcher.ts @@ -14,6 +14,7 @@ export interface IWatcherRequest { } export interface IWatcherService { + setRoots(roots: string[]): TPromise; watch(request: IWatcherRequest): TPromise; } diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/watcherApp.ts b/src/vs/workbench/services/files/node/watcher/nsfw/watcherApp.ts index 6f0942f996e9f..61b892cc45d63 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/watcherApp.ts +++ b/src/vs/workbench/services/files/node/watcher/nsfw/watcherApp.ts @@ -5,7 +5,7 @@ 'use strict'; import { Server } from 'vs/base/parts/ipc/node/ipc.cp'; -import { WatcherChannel } from 'vs/workbench/services/files/node/watcher/unix/watcherIpc'; +import { WatcherChannel } from 'vs/workbench/services/files/node/watcher/nsfw/watcherIpc'; import { NsfwWatcherService } from 'vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService'; const server = new Server(); diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/watcherIpc.ts b/src/vs/workbench/services/files/node/watcher/nsfw/watcherIpc.ts index f949ab0e6fe4a..971cdc3594ee6 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/watcherIpc.ts +++ b/src/vs/workbench/services/files/node/watcher/nsfw/watcherIpc.ts @@ -20,6 +20,7 @@ export class WatcherChannel implements IWatcherChannel { call(command: string, arg: any): TPromise { switch (command) { + case 'setRoots': return this.service.setRoots(arg); case 'watch': return this.service.watch(arg); } return undefined; @@ -30,6 +31,10 @@ export class WatcherChannelClient implements IWatcherService { constructor(private channel: IWatcherChannel) { } + setRoots(roots: string[]): TPromise { + return this.channel.call('setRoots', roots); + } + watch(request: IWatcherRequest): TPromise { return this.channel.call('watch', request); } diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/watcherService.ts b/src/vs/workbench/services/files/node/watcher/nsfw/watcherService.ts index 653bed4f4ede3..0d739ed5ce14a 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/watcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/nsfw/watcherService.ts @@ -10,11 +10,11 @@ import { getNextTickChannel } from 'vs/base/parts/ipc/common/ipc'; import { Client } from 'vs/base/parts/ipc/node/ipc.cp'; import uri from 'vs/base/common/uri'; import { toFileChangesEvent, IRawFileChange } from 'vs/workbench/services/files/node/watcher/common'; -import { IWatcherChannel, WatcherChannelClient } from 'vs/workbench/services/files/node/watcher/unix/watcherIpc'; +import { IWatcherChannel, WatcherChannelClient } from 'vs/workbench/services/files/node/watcher/nsfw/watcherIpc'; import { FileChangesEvent } from 'vs/platform/files/common/files'; -import { IFileWatcher } from "vs/workbench/services/files/node/watcher/unix/watcher"; +import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; -export class FileWatcher implements IFileWatcher { +export class FileWatcher { private static MAX_RESTARTS = 5; private isDisposed: boolean; @@ -25,7 +25,8 @@ export class FileWatcher implements IFileWatcher { private ignored: string[], private onFileChanges: (changes: FileChangesEvent) => void, private errorLogger: (msg: string) => void, - private verboseLogging: boolean + private verboseLogging: boolean, + private contextService: IWorkspaceContextService ) { this.isDisposed = false; this.restartCounter = 0; @@ -50,8 +51,11 @@ export class FileWatcher implements IFileWatcher { const channel = getNextTickChannel(client.getChannel('watcher')); const service = new WatcherChannelClient(channel); + const roots = this.contextService.getWorkspace2().roots; + console.log('roots', roots); + // Start watching - service.watch({ basePath: this.basePath, ignored: this.ignored, verboseLogging: this.verboseLogging }).then(null, (err) => { + service.watch({ basePath: roots[0].fsPath, ignored: this.ignored, verboseLogging: this.verboseLogging }).then(null, (err) => { if (!(err instanceof Error && err.name === 'Canceled' && err.message === 'Canceled')) { return TPromise.wrapError(err); // the service lib uses the promise cancel error to indicate the process died, we do not want to bubble this up } @@ -64,7 +68,6 @@ export class FileWatcher implements IFileWatcher { if (this.restartCounter <= FileWatcher.MAX_RESTARTS) { this.errorLogger('[FileWatcher] terminated unexpectedly and is restarted again...'); this.restartCounter++; - // TODO: What do we do for multi-root here? this.startWatching(); } else { this.errorLogger('[FileWatcher] failed to start after retrying for some time, giving up. Please report this as a bug report!'); @@ -72,6 +75,22 @@ export class FileWatcher implements IFileWatcher { } }, this.errorLogger); + for (let i = 1; i < roots.length; i++) { + // TODO: Is ignored is root specific? + console.log('start watching ' + roots[1].fsPath); + service.watch({ basePath: roots[i].fsPath, ignored: this.ignored, verboseLogging: this.verboseLogging }).then(null, (err) => { + if (!(err instanceof Error && err.name === 'Canceled' && err.message === 'Canceled')) { + return TPromise.wrapError(err); // the service lib uses the promise cancel error to indicate the process died, we do not want to bubble this up + } + return undefined; + }, (events: IRawFileChange[]) => this.onRawFileEvents(events)); + } + + this.contextService.onDidChangeWorkspaceRoots(roots => { + service.setRoots(roots.map(r => r.fsPath)); + console.log('roots changed', roots); + }); + return () => { client.dispose(); this.isDisposed = true; diff --git a/src/vs/workbench/services/files/node/watcher/unix/watcher.ts b/src/vs/workbench/services/files/node/watcher/unix/watcher.ts index 2b78d48289fe0..6961b77f6a23b 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/watcher.ts +++ b/src/vs/workbench/services/files/node/watcher/unix/watcher.ts @@ -16,8 +16,3 @@ export interface IWatcherRequest { export interface IWatcherService { watch(request: IWatcherRequest): TPromise; } - -export interface IFileWatcher { - startWatching(): () => void; - addFolder(folder: string): void; -} \ No newline at end of file From da35479b6227fc987625b6ba95db5ee310c6bf6d Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 17 Jun 2017 15:25:24 -0700 Subject: [PATCH 2004/2747] Improve nsfw logging --- .../node/watcher/nsfw/nsfwWatcherService.ts | 16 +++++++++------- .../files/node/watcher/unix/watcherService.ts | 3 +-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts index 29cfd0b2fdc4b..54208ee9e4c31 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts @@ -30,15 +30,17 @@ export class NsfwWatcherService implements IWatcherService { return new TPromise((c, e, p) => { nsfw(request.basePath, events => { - if (request.verboseLogging) { - console.log('raw events start'); - events.forEach(e => console.log(e)); - console.log('raw events end'); - } - for (let i = 0; i < events.length; i++) { - let absolutePath: string; const e = events[i]; + + // Logging + if (request.verboseLogging) { + const logPath = e.action === nsfw.actions.RENAMED ? path.join(e.directory, e.oldFile) + ' -> ' + e.newFile : path.join(e.directory, e.file); + console.log(e.action === nsfw.actions.CREATED ? '[CREATED]' : e.action === nsfw.actions.DELETED ? '[DELETED]' : e.action === nsfw.actions.MODIFIED ? '[CHANGED]' : '[RENAMED]', logPath); + } + + // Convert nsfw event to IRawFileChange and add to queue + let absolutePath: string; if (e.action === nsfw.actions.RENAMED) { // Rename fires when a file's name changes within a single directory absolutePath = path.join(e.directory, e.oldFile); diff --git a/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts b/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts index 985f1e2281e5e..938b8ab2d603d 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts @@ -12,9 +12,8 @@ import uri from 'vs/base/common/uri'; import { toFileChangesEvent, IRawFileChange } from 'vs/workbench/services/files/node/watcher/common'; import { IWatcherChannel, WatcherChannelClient } from 'vs/workbench/services/files/node/watcher/unix/watcherIpc'; import { FileChangesEvent } from 'vs/platform/files/common/files'; -import { IFileWatcher } from "vs/workbench/services/files/node/watcher/unix/watcher"; -export class FileWatcher implements IFileWatcher { +export class FileWatcher { private static MAX_RESTARTS = 5; private isDisposed: boolean; From e6f03c842acdfc53fffcba1b690cf38bdb399a3f Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 17 Jun 2017 16:19:17 -0700 Subject: [PATCH 2005/2747] Support basic multi root watching --- .../node/watcher/nsfw/nsfwWatcherService.ts | 48 +++++++++++++++++-- .../files/node/watcher/nsfw/watcherService.ts | 20 +------- 2 files changed, 46 insertions(+), 22 deletions(-) diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts index 54208ee9e4c31..9e699022ca070 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts @@ -17,9 +17,16 @@ nsfwActionToRawChangeType[nsfw.actions.CREATED] = FileChangeType.ADDED; nsfwActionToRawChangeType[nsfw.actions.MODIFIED] = FileChangeType.UPDATED; nsfwActionToRawChangeType[nsfw.actions.DELETED] = FileChangeType.DELETED; + +interface IPathWatcher { + watcher?: any; +} + export class NsfwWatcherService implements IWatcherService { private static FS_EVENT_DELAY = 50; // aggregate and only emit events when changes have stopped for this duration (in ms) + private _pathWatchers: { [watchPath: string]: IPathWatcher } = {}; + public watch(request: IWatcherRequest): TPromise { if (request.verboseLogging) { console.log('request', request); @@ -28,7 +35,10 @@ export class NsfwWatcherService implements IWatcherService { let undeliveredFileEvents: watcher.IRawFileChange[] = []; const fileEventDelayer = new ThrottledDelayer(NsfwWatcherService.FS_EVENT_DELAY); - return new TPromise((c, e, p) => { + console.log('starting to watch ' + request.basePath); + this._pathWatchers[request.basePath] = {}; + + const promise = new TPromise((c, e, p) => { nsfw(request.basePath, events => { for (let i = 0; i < events.length; i++) { const e = events[i]; @@ -81,16 +91,48 @@ export class NsfwWatcherService implements IWatcherService { return TPromise.as(null); }); }).then(watcher => { + console.log('watcher ready ' + request.basePath); + this._pathWatchers[request.basePath].watcher = watcher; return watcher.start(); }); }); + + return promise; } public setRoots(roots: string[]): TPromise { - console.log('nsfwWatcherService, setRoots', roots); + const rootsToStartWatching = roots.filter(r => !(r in this._pathWatchers)); + const rootsToStopWatching = Object.keys(this._pathWatchers).filter(r => roots.indexOf(r) === -1); + + // TODO: Don't watch inner folders + // TODO: Move verboseLogging to constructor + // Logging + if (true) { + console.log(`Set watch roots: start: [${rootsToStartWatching.join(',')}], stop: [${rootsToStopWatching.join(',')}]`); + } + + const promises: TPromise[] = []; + if (rootsToStartWatching.length) { + rootsToStartWatching.forEach(root => { + promises.push(this.watch({ + basePath: root, + ignored: [], + // TODO: Inherit from initial request + verboseLogging: true + })); + }); + } + + if (rootsToStopWatching.length) { + rootsToStopWatching.forEach(root => { + this._pathWatchers[root].watcher.stop(); + delete this._pathWatchers[root]; + }); + } + // TODO: Watch multiple folders // TODO: Don't watch sub-folders of folders - return TPromise.as(void 0); + return TPromise.join(promises).then(() => void 0); } private _isPathIgnored(absolutePath: string, ignored: string[]): boolean { diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/watcherService.ts b/src/vs/workbench/services/files/node/watcher/nsfw/watcherService.ts index 0d739ed5ce14a..cc5bb1f690da4 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/watcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/nsfw/watcherService.ts @@ -51,11 +51,8 @@ export class FileWatcher { const channel = getNextTickChannel(client.getChannel('watcher')); const service = new WatcherChannelClient(channel); - const roots = this.contextService.getWorkspace2().roots; - console.log('roots', roots); - // Start watching - service.watch({ basePath: roots[0].fsPath, ignored: this.ignored, verboseLogging: this.verboseLogging }).then(null, (err) => { + service.watch({ basePath: this.basePath, ignored: this.ignored, verboseLogging: this.verboseLogging }).then(null, (err) => { if (!(err instanceof Error && err.name === 'Canceled' && err.message === 'Canceled')) { return TPromise.wrapError(err); // the service lib uses the promise cancel error to indicate the process died, we do not want to bubble this up } @@ -75,17 +72,6 @@ export class FileWatcher { } }, this.errorLogger); - for (let i = 1; i < roots.length; i++) { - // TODO: Is ignored is root specific? - console.log('start watching ' + roots[1].fsPath); - service.watch({ basePath: roots[i].fsPath, ignored: this.ignored, verboseLogging: this.verboseLogging }).then(null, (err) => { - if (!(err instanceof Error && err.name === 'Canceled' && err.message === 'Canceled')) { - return TPromise.wrapError(err); // the service lib uses the promise cancel error to indicate the process died, we do not want to bubble this up - } - return undefined; - }, (events: IRawFileChange[]) => this.onRawFileEvents(events)); - } - this.contextService.onDidChangeWorkspaceRoots(roots => { service.setRoots(roots.map(r => r.fsPath)); console.log('roots changed', roots); @@ -97,10 +83,6 @@ export class FileWatcher { }; } - public addFolder(folder: string): void { - console.log('addFolder: ' + folder); - } - private onRawFileEvents(events: IRawFileChange[]): void { // Emit through broadcast service From 9948719a1297a079e72d652eec84997a4f10b73e Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 17 Jun 2017 16:34:54 -0700 Subject: [PATCH 2006/2747] Fix test compilation --- .../services/backup/test/node/backupFileService.test.ts | 3 ++- .../test/node/configurationEditingService.test.ts | 4 ++-- .../workbench/services/files/test/node/fileService.test.ts | 7 ++++--- .../keybinding/test/node/keybindingEditing.test.ts | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/services/backup/test/node/backupFileService.test.ts b/src/vs/workbench/services/backup/test/node/backupFileService.test.ts index 838f9333945bd..a6eb9b517d69b 100644 --- a/src/vs/workbench/services/backup/test/node/backupFileService.test.ts +++ b/src/vs/workbench/services/backup/test/node/backupFileService.test.ts @@ -19,6 +19,7 @@ import { FileService } from 'vs/workbench/services/files/node/fileService'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import { parseArgs } from 'vs/platform/environment/node/argv'; import { RawTextSource } from 'vs/editor/common/model/textSource'; +import { TestContextService } from 'vs/workbench/test/workbenchTestServices'; class TestEnvironmentService extends EnvironmentService { @@ -47,7 +48,7 @@ const untitledBackupPath = path.join(workspaceBackupPath, 'untitled', crypto.cre class TestBackupFileService extends BackupFileService { constructor(workspace: Uri, backupHome: string, workspacesJsonPath: string) { - const fileService = new FileService(workspace.fsPath, { disableWatcher: true }); + const fileService = new FileService(workspace.fsPath, { disableWatcher: true }, new TestContextService()); super(workspaceBackupPath, fileService); } diff --git a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts index 8ad27dc8ed3b5..57e0ce505d0f4 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts @@ -18,7 +18,7 @@ import { parseArgs } from 'vs/platform/environment/node/argv'; import { IWorkspaceContextService, LegacyWorkspace } from 'vs/platform/workspace/common/workspace'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import extfs = require('vs/base/node/extfs'); -import { TestTextFileService, TestEditorGroupService, TestLifecycleService, TestBackupFileService } from 'vs/workbench/test/workbenchTestServices'; +import { TestTextFileService, TestEditorGroupService, TestLifecycleService, TestBackupFileService, TestContextService } from 'vs/workbench/test/workbenchTestServices'; import uuid = require('vs/base/common/uuid'); import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configuration'; @@ -124,7 +124,7 @@ suite('ConfigurationEditingService', () => { instantiationService.stub(ITelemetryService, NullTelemetryService); instantiationService.stub(IModeService, ModeServiceImpl); instantiationService.stub(IModelService, instantiationService.createInstance(ModelServiceImpl)); - instantiationService.stub(IFileService, new FileService(workspaceDir, { disableWatcher: true })); + instantiationService.stub(IFileService, new FileService(workspaceDir, { disableWatcher: true }, new TestContextService())); instantiationService.stub(IUntitledEditorService, instantiationService.createInstance(UntitledEditorService)); instantiationService.stub(ITextFileService, instantiationService.createInstance(TestTextFileService)); diff --git a/src/vs/workbench/services/files/test/node/fileService.test.ts b/src/vs/workbench/services/files/test/node/fileService.test.ts index 846d09bda8dfc..4622af59cdad0 100644 --- a/src/vs/workbench/services/files/test/node/fileService.test.ts +++ b/src/vs/workbench/services/files/test/node/fileService.test.ts @@ -19,6 +19,7 @@ import extfs = require('vs/base/node/extfs'); import encodingLib = require('vs/base/node/encoding'); import utils = require('vs/workbench/services/files/test/node/utils'); import { onError } from 'vs/base/test/common/utils'; +import { TestContextService } from "vs/workbench/test/workbenchTestServices"; suite('FileService', () => { let service: FileService; @@ -35,7 +36,7 @@ suite('FileService', () => { return onError(error, done); } - service = new FileService(testDir, { disableWatcher: true }); + service = new FileService(testDir, { disableWatcher: true }, new TestContextService()); done(); }); }); @@ -735,7 +736,7 @@ suite('FileService', () => { encoding: 'windows1252', encodingOverride: encodingOverride, disableWatcher: true - }); + }, new TestContextService()); _service.resolveContent(uri.file(path.join(testDir, 'index.html'))).done(c => { assert.equal(c.encoding, 'windows1252'); @@ -761,7 +762,7 @@ suite('FileService', () => { let _service = new FileService(_testDir, { disableWatcher: true - }); + }, new TestContextService()); extfs.copy(_sourceDir, _testDir, () => { fs.readFile(resource.fsPath, (error, data) => { diff --git a/src/vs/workbench/services/keybinding/test/node/keybindingEditing.test.ts b/src/vs/workbench/services/keybinding/test/node/keybindingEditing.test.ts index dc64fc81dfd00..6c72dc9a75811 100644 --- a/src/vs/workbench/services/keybinding/test/node/keybindingEditing.test.ts +++ b/src/vs/workbench/services/keybinding/test/node/keybindingEditing.test.ts @@ -73,7 +73,7 @@ suite('Keybindings Editing', () => { instantiationService.stub(ITelemetryService, NullTelemetryService); instantiationService.stub(IModeService, ModeServiceImpl); instantiationService.stub(IModelService, instantiationService.createInstance(ModelServiceImpl)); - instantiationService.stub(IFileService, new FileService(testDir, { disableWatcher: true })); + instantiationService.stub(IFileService, new FileService(testDir, { disableWatcher: true }, new TestContextService())); instantiationService.stub(IUntitledEditorService, instantiationService.createInstance(UntitledEditorService)); instantiationService.stub(ITextFileService, instantiationService.createInstance(TestTextFileService)); instantiationService.stub(ITextModelService, instantiationService.createInstance(TextModelResolverService)); From 7ffcc1987c7d148e4d48654d111278a4045f6ccc Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 17 Jun 2017 16:54:43 -0700 Subject: [PATCH 2007/2747] Clean up --- .../test/node/configurationEditingService.test.ts | 4 ++-- .../services/files/node/watcher/nsfw/nsfwWatcherService.ts | 6 ++++-- .../services/files/node/watcher/unix/watcherService.ts | 4 ---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts index 57e0ce505d0f4..6879f91ee30cc 100644 --- a/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts +++ b/src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts @@ -18,7 +18,7 @@ import { parseArgs } from 'vs/platform/environment/node/argv'; import { IWorkspaceContextService, LegacyWorkspace } from 'vs/platform/workspace/common/workspace'; import { EnvironmentService } from 'vs/platform/environment/node/environmentService'; import extfs = require('vs/base/node/extfs'); -import { TestTextFileService, TestEditorGroupService, TestLifecycleService, TestBackupFileService, TestContextService } from 'vs/workbench/test/workbenchTestServices'; +import { TestTextFileService, TestEditorGroupService, TestLifecycleService, TestBackupFileService } from 'vs/workbench/test/workbenchTestServices'; import uuid = require('vs/base/common/uuid'); import { IConfigurationRegistry, Extensions as ConfigurationExtensions } from 'vs/platform/configuration/common/configurationRegistry'; import { WorkspaceConfigurationService } from 'vs/workbench/services/configuration/node/configuration'; @@ -124,7 +124,7 @@ suite('ConfigurationEditingService', () => { instantiationService.stub(ITelemetryService, NullTelemetryService); instantiationService.stub(IModeService, ModeServiceImpl); instantiationService.stub(IModelService, instantiationService.createInstance(ModelServiceImpl)); - instantiationService.stub(IFileService, new FileService(workspaceDir, { disableWatcher: true }, new TestContextService())); + instantiationService.stub(IFileService, instantiationService.createInstance(FileService, workspaceDir, { disableWatcher: true })); instantiationService.stub(IUntitledEditorService, instantiationService.createInstance(UntitledEditorService)); instantiationService.stub(ITextFileService, instantiationService.createInstance(TestTextFileService)); diff --git a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts index 9e699022ca070..57bbbcd42b590 100644 --- a/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/nsfw/nsfwWatcherService.ts @@ -19,7 +19,10 @@ nsfwActionToRawChangeType[nsfw.actions.DELETED] = FileChangeType.DELETED; interface IPathWatcher { - watcher?: any; + watcher?: { + start(): void; + stop(): void; + }; } export class NsfwWatcherService implements IWatcherService { @@ -130,7 +133,6 @@ export class NsfwWatcherService implements IWatcherService { }); } - // TODO: Watch multiple folders // TODO: Don't watch sub-folders of folders return TPromise.join(promises).then(() => void 0); } diff --git a/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts b/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts index 938b8ab2d603d..241ffa853ca1a 100644 --- a/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts +++ b/src/vs/workbench/services/files/node/watcher/unix/watcherService.ts @@ -77,10 +77,6 @@ export class FileWatcher { }; } - public addFolder(folder: string): void { - console.log('addFolder: ' + folder); - } - private onRawFileEvents(events: IRawFileChange[]): void { // Emit through broadcast service From be5549113b3b2000d0c941832c91d5d434018a90 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 17 Jun 2017 16:57:11 -0700 Subject: [PATCH 2008/2747] Fix unit tests Broken in e7fc27d746ffc5ad490814d24d49c699213024a8 --- src/vs/workbench/services/textfile/common/textFileService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/services/textfile/common/textFileService.ts b/src/vs/workbench/services/textfile/common/textFileService.ts index 07ffc8ceeb7b1..65fed25b13ad3 100644 --- a/src/vs/workbench/services/textfile/common/textFileService.ts +++ b/src/vs/workbench/services/textfile/common/textFileService.ts @@ -342,7 +342,7 @@ export abstract class TextFileService implements ITextFileService { } // Hot exit - const hotExitMode = configuration && configuration.files && configuration.files.hotExit; + const hotExitMode = configuration && configuration.files ? configuration.files.hotExit : HotExitConfiguration.OFF; if (hotExitMode === HotExitConfiguration.OFF || hotExitMode === HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE) { this.configuredHotExit = hotExitMode; } else { From f7eefb63084e0d7c016733ef11833a0335949760 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 18 Jun 2017 00:30:25 -0700 Subject: [PATCH 2009/2747] Add files.useExperimentalFileWatcher setting --- src/vs/platform/files/common/files.ts | 2 +- src/vs/workbench/parts/files/browser/files.contribution.ts | 4 ++-- .../workbench/services/files/electron-browser/fileService.ts | 2 +- src/vs/workbench/services/files/node/fileService.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/platform/files/common/files.ts b/src/vs/platform/files/common/files.ts index 702e9190124c8..54d5089bb3ca3 100644 --- a/src/vs/platform/files/common/files.ts +++ b/src/vs/platform/files/common/files.ts @@ -538,7 +538,7 @@ export interface IFilesConfiguration { autoSaveDelay: number; eol: string; hotExit: string; - useNsfwFileWatcher: boolean; + useExperimentalFileWatcher: boolean; }; } diff --git a/src/vs/workbench/parts/files/browser/files.contribution.ts b/src/vs/workbench/parts/files/browser/files.contribution.ts index 7fe88df5107c3..c7f4a9eecf0d9 100644 --- a/src/vs/workbench/parts/files/browser/files.contribution.ts +++ b/src/vs/workbench/parts/files/browser/files.contribution.ts @@ -275,10 +275,10 @@ configurationRegistry.registerConfiguration({ ], 'description': nls.localize('hotExit', "Controls whether unsaved files are remembered between sessions, allowing the save prompt when exiting the editor to be skipped.", HotExitConfiguration.ON_EXIT, HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE) }, - 'files.useNsfwFileWatcher': { + 'files.useExperimentalFileWatcher': { 'type': 'boolean', 'default': false, - 'description': nls.localize('useNsfwFileWatcher', "Use the new experimental file watcher utilizing the nsfw library.") + 'description': nls.localize('useExperimentalFileWatcher', "Use the new experimental file watcher.") }, 'files.defaultLanguage': { 'type': 'string', diff --git a/src/vs/workbench/services/files/electron-browser/fileService.ts b/src/vs/workbench/services/files/electron-browser/fileService.ts index af4a7814979de..12d8052b9d15e 100644 --- a/src/vs/workbench/services/files/electron-browser/fileService.ts +++ b/src/vs/workbench/services/files/electron-browser/fileService.ts @@ -85,7 +85,7 @@ export class FileService implements IFileService { encodingOverride, watcherIgnoredPatterns, verboseLogging: environmentService.verbose, - useNsfwFileWatcher: configuration.files.useNsfwFileWatcher + useExperimentalFileWatcher: configuration.files.useExperimentalFileWatcher }; // create service diff --git a/src/vs/workbench/services/files/node/fileService.ts b/src/vs/workbench/services/files/node/fileService.ts index 9fb08ad116b2e..2c1291608a2be 100644 --- a/src/vs/workbench/services/files/node/fileService.ts +++ b/src/vs/workbench/services/files/node/fileService.ts @@ -53,7 +53,7 @@ export interface IFileServiceOptions { watcherIgnoredPatterns?: string[]; disableWatcher?: boolean; verboseLogging?: boolean; - useNsfwFileWatcher?: boolean; + useExperimentalFileWatcher?: boolean; } function etag(stat: fs.Stats): string; @@ -127,7 +127,7 @@ export class FileService implements IFileService { } if (this.basePath && !this.options.disableWatcher) { - if (this.options.useNsfwFileWatcher) { + if (this.options.useExperimentalFileWatcher) { this.setupNsfwWorkspceWatching(); } else { if (isWindows) { From cee711bb235eb181b7e344f752978aeee937d229 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Sun, 18 Jun 2017 11:35:07 +0200 Subject: [PATCH 2010/2747] Improve grammar of config setting description While the former version is technically correct, I consider the proposed version easier to read. --- extensions/git/package.nls.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index c34b7166da39c..655074654b2d8 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -40,5 +40,5 @@ "config.ignoreLegacyWarning": "Ignores the legacy Git warning", "config.ignoreLimitWarning": "Ignores the warning when there are too many changes in a repository", "config.defaultCloneDirectory": "The default location where to clone a git repository", - "config.enableSmartCommit": "Commit all changes when there are not staged changes." -} \ No newline at end of file + "config.enableSmartCommit": "Commit all changes when there are no staged changes." +} From 2303df3f9861f5c5db745a6d46a903b71100c451 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 18 Jun 2017 11:18:51 -0700 Subject: [PATCH 2011/2747] Have navigate workbench commands skip terminal shell by default Fixes #28485 --- .../terminal/electron-browser/terminal.contribution.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index b12e4812b9b22..dcf95c68589f9 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -29,6 +29,7 @@ import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRe import { OpenNextRecentlyUsedEditorInGroupAction, OpenPreviousRecentlyUsedEditorInGroupAction, FocusActiveGroupAction, FocusFirstGroupAction, FocusSecondGroupAction, FocusThirdGroupAction } from 'vs/workbench/browser/parts/editor/editorActions'; import { EDITOR_FONT_DEFAULTS } from 'vs/editor/common/config/editorOptions'; import { registerColors } from './terminalColorRegistry'; +import { NavigateUpAction, NavigateDownAction, NavigateLeftAction, NavigateRightAction } from "vs/workbench/electron-browser/actions"; let configurationRegistry = Registry.as(Extensions.Configuration); configurationRegistry.registerConfiguration({ @@ -188,7 +189,11 @@ configurationRegistry.registerConfiguration({ FocusThirdGroupAction.ID, SelectAllTerminalAction.ID, FocusTerminalFindWidgetAction.ID, - HideTerminalFindWidgetAction.ID + HideTerminalFindWidgetAction.ID, + NavigateUpAction.ID, + NavigateDownAction.ID, + NavigateRightAction.ID, + NavigateLeftAction.ID ].sort() } } From 435f1efb9e5e83a439c9b6492c7e3a807b3a5007 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 18 Jun 2017 11:26:31 -0700 Subject: [PATCH 2012/2747] Add terminal.selectionBackground theme key Fixes #28397 --- .../parts/terminal/electron-browser/media/xterm.css | 8 -------- .../electron-browser/terminalColorRegistry.ts | 7 ++++++- .../parts/terminal/electron-browser/terminalPanel.ts | 12 ++++-------- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css b/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css index 66487fab2141f..866fc265e4fd8 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css @@ -140,14 +140,6 @@ .monaco-workbench .panel.integrated-terminal .xterm .xterm-selection div { position: absolute; - opacity: 0.5; - background-color: #808080; -} -.vs-dark .monaco-workbench .panel.integrated-terminal .xterm .xterm-selection div { - background-color: #808080; -} -.hc-black .monaco-workbench .panel.integrated-terminal .xterm .xterm-selection div { - background-color: #FFF; } .monaco-workbench .panel.integrated-terminal .xterm .xterm-bold { diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts index ae1d524a91223..92206287ac904 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalColorRegistry.ts @@ -17,8 +17,13 @@ export const TERMINAL_BACKGROUND_COLOR = registerColor('terminal.background', nu export const TERMINAL_FOREGROUND_COLOR = registerColor('terminal.foreground', { light: '#333333', dark: '#CCCCCC', - hc: 'FFFFFF' + hc: '#FFFFFF' }, nls.localize('terminal.foreground', 'The foreground color of the terminal.')); +export const TERMINAL_SELECTION_BACKGROUND_COLOR = registerColor('terminal.selectionBackground', { + light: '#B0B0B0', + dark: '#404040', + hc: '#808080' +}, nls.localize('terminal.selectionBackground', 'The selection background color of the terminal.')); const ansiColorMap = { 'terminal.ansiBlack': { diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index ee9222682125f..7d362f8440b17 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -16,8 +16,8 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ITerminalService, ITerminalFont, TERMINAL_PANEL_ID } from 'vs/workbench/parts/terminal/common/terminal'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; import { TerminalFindWidget } from './terminalFindWidget'; -import { ansiColorIdentifiers, TERMINAL_BACKGROUND_COLOR, TERMINAL_FOREGROUND_COLOR } from './terminalColorRegistry'; -import { ColorIdentifier, selectionBackground } from 'vs/platform/theme/common/colorRegistry'; +import { ansiColorIdentifiers, TERMINAL_BACKGROUND_COLOR, TERMINAL_FOREGROUND_COLOR, TERMINAL_SELECTION_BACKGROUND_COLOR } from './terminalColorRegistry'; +import { ColorIdentifier } from 'vs/platform/theme/common/colorRegistry'; import { KillTerminalAction, CreateNewTerminalAction, SwitchTerminalInstanceAction, SwitchTerminalInstanceActionItem, CopyTerminalSelectionAction, TerminalPasteAction, ClearTerminalAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; import { Panel } from 'vs/workbench/browser/panel'; import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; @@ -277,13 +277,9 @@ export class TerminalPanel extends Panel { `.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-bar.focus.xterm-cursor-blink .terminal-cursor::before,` + `.monaco-workbench .panel.integrated-terminal .xterm.xterm-cursor-style-underline.focus.xterm-cursor-blink .terminal-cursor::before { background-color: ${fgColor}; }`; } - // Use selection.background as the terminal selection, this is temporary - // until proper color inverting is implemented to ensure contrast. - const selectionColor = theme.getColor(selectionBackground); + const selectionColor = theme.getColor(TERMINAL_SELECTION_BACKGROUND_COLOR); if (selectionColor) { - // selection.background is set to null when not defined by the - // theme, as such it's default values are defined in CSS. - css += `.monaco-workbench .panel.integrated-terminal .xterm .xterm-selection div { background-color: ${selectionColor} !important; }`; + css += `.monaco-workbench .panel.integrated-terminal .xterm .xterm-selection div { background-color: ${selectionColor}; }`; } this._themeStyleElement.innerHTML = css; From 654adde404aa6c48bd9e6d22396d7e117c4f94b0 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sun, 18 Jun 2017 13:10:49 -0700 Subject: [PATCH 2013/2747] Uplevel xterm.js Fixes #28969 Fixes #28972 Fixes #28973 --- npm-shrinkwrap.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 313e3854986c0..5b4e3fbfb19b0 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -447,7 +447,7 @@ "xterm": { "version": "2.7.0", "from": "Tyriar/xterm.js#vscode-release/1.14", - "resolved": "git+https://github.com/Tyriar/xterm.js.git#e6fe120ecf93e552573be45867ae03c880319e11" + "resolved": "git+https://github.com/Tyriar/xterm.js.git#da7827f21505ae3d34f750bedbf17ad3f56e6f07" }, "yauzl": { "version": "2.3.1", From 484d69c984af2d5ed73f86fe5a417c0f121b7247 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Sun, 18 Jun 2017 22:51:42 +0200 Subject: [PATCH 2014/2747] #27823 Fix size is not updated when header is toggled --- src/vs/base/browser/ui/splitview/splitview.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/vs/base/browser/ui/splitview/splitview.ts b/src/vs/base/browser/ui/splitview/splitview.ts index 6b2a1d5b20d83..7be647dd58b24 100644 --- a/src/vs/base/browser/ui/splitview/splitview.ts +++ b/src/vs/base/browser/ui/splitview/splitview.ts @@ -407,6 +407,22 @@ export abstract class AbstractCollapsibleView extends HeaderView { this.updateSize(); } + showHeader(): boolean { + const result = super.showHeader(); + if (result) { + this.updateSize(); + } + return result; + } + + hideHeader(): boolean { + const result = super.hideHeader(); + if (result) { + this.updateSize(); + } + return result; + } + dispose(): void { if (this.headerClickListener) { this.headerClickListener.dispose(); From 0d360bae9156f6ab74a095ba71e8a86c67add4bc Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Sun, 18 Jun 2017 22:56:09 +0200 Subject: [PATCH 2015/2747] #27823 Prepare toggling views --- .../parts/debug/browser/debugViewlet.ts | 6 +- .../parts/files/browser/explorerViewlet.ts | 8 +- .../parts/files/browser/views/explorerView.ts | 6 +- .../files/browser/views/openEditorsView.ts | 2 +- src/vs/workbench/parts/views/browser/views.ts | 178 +++++++++++++----- 5 files changed, 141 insertions(+), 59 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/debugViewlet.ts b/src/vs/workbench/parts/debug/browser/debugViewlet.ts index a6af553167360..b8a3889034432 100644 --- a/src/vs/workbench/parts/debug/browser/debugViewlet.ts +++ b/src/vs/workbench/parts/debug/browser/debugViewlet.ts @@ -21,6 +21,7 @@ import { IStorageService } from 'vs/platform/storage/common/storage'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { ViewLocation } from 'vs/workbench/parts/views/browser/viewsRegistry'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; export class DebugViewlet extends ComposedViewsViewlet { @@ -36,9 +37,10 @@ export class DebugViewlet extends ComposedViewsViewlet { @IWorkspaceContextService contextService: IWorkspaceContextService, @IStorageService storageService: IStorageService, @IThemeService themeService: IThemeService, - @IContextKeyService contextKeyService: IContextKeyService + @IContextKeyService contextKeyService: IContextKeyService, + @IContextMenuService contextMenuService: IContextMenuService ) { - super(VIEWLET_ID, ViewLocation.Debug, `${VIEWLET_ID}.state`, telemetryService, storageService, instantiationService, themeService, contextService, contextKeyService); + super(VIEWLET_ID, ViewLocation.Debug, `${VIEWLET_ID}.state`, telemetryService, storageService, instantiationService, themeService, contextService, contextKeyService, contextMenuService); this.progressRunner = null; diff --git a/src/vs/workbench/parts/files/browser/explorerViewlet.ts b/src/vs/workbench/parts/files/browser/explorerViewlet.ts index 43a1d644a1d7b..1bdd925c1d30a 100644 --- a/src/vs/workbench/parts/files/browser/explorerViewlet.ts +++ b/src/vs/workbench/parts/files/browser/explorerViewlet.ts @@ -31,6 +31,7 @@ import { IEditorGroupService } from 'vs/workbench/services/group/common/groupSer import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey'; import { IThemeService } from 'vs/platform/theme/common/themeService'; import { ViewsRegistry, ViewLocation, IViewDescriptor } from 'vs/workbench/parts/views/browser/viewsRegistry'; +import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; export class ExplorerViewlet extends ComposedViewsViewlet { @@ -50,9 +51,10 @@ export class ExplorerViewlet extends ComposedViewsViewlet { @IInstantiationService protected instantiationService: IInstantiationService, @IContextKeyService contextKeyService: IContextKeyService, @IConfigurationEditingService private configurationEditingService: IConfigurationEditingService, - @IThemeService themeService: IThemeService + @IThemeService themeService: IThemeService, + @IContextMenuService contextMenuService: IContextMenuService ) { - super(VIEWLET_ID, ViewLocation.Explorer, ExplorerViewlet.EXPLORER_VIEWS_STATE, telemetryService, storageService, instantiationService, themeService, contextService, contextKeyService); + super(VIEWLET_ID, ViewLocation.Explorer, ExplorerViewlet.EXPLORER_VIEWS_STATE, telemetryService, storageService, instantiationService, themeService, contextService, contextKeyService, contextMenuService); this.viewletState = new FileViewletState(); this.viewletVisibleContextKey = ExplorerViewletVisibleContext.bindTo(contextKeyService); @@ -105,7 +107,7 @@ export class ExplorerViewlet extends ComposedViewsViewlet { private createExplorerViewDescriptor(): IViewDescriptor { return { id: ExplorerView.ID, - name: '', + name: this.contextService.getWorkspace().name, location: ViewLocation.Explorer, ctor: ExplorerView, order: 1 diff --git a/src/vs/workbench/parts/files/browser/views/explorerView.ts b/src/vs/workbench/parts/files/browser/views/explorerView.ts index bbbae2286f236..64c9d8decb16d 100644 --- a/src/vs/workbench/parts/files/browser/views/explorerView.ts +++ b/src/vs/workbench/parts/files/browser/views/explorerView.ts @@ -119,7 +119,7 @@ export class ExplorerView extends CollapsibleView { public renderHeader(container: HTMLElement): void { const titleDiv = $('div.title').appendTo(container); - $('span').text(this.contextService.getWorkspace().name).title(labels.getPathLabel(this.contextService.getWorkspace().resource.fsPath, void 0, this.environmentService)).appendTo(titleDiv); + $('span').text(this.name).title(labels.getPathLabel(this.contextService.getWorkspace().resource.fsPath, void 0, this.environmentService)).appendTo(titleDiv); super.renderHeader(container); } @@ -193,7 +193,7 @@ export class ExplorerView extends CollapsibleView { this.settings[ExplorerView.MEMENTO_LAST_ACTIVE_FILE_RESOURCE] = activeFile.toString(); // Select file if input is inside workspace - if (this.isVisible && this.contextService.isInsideWorkspace(activeFile)) { + if (this.isVisible() && this.contextService.isInsideWorkspace(activeFile)) { const selection = this.hasSelection(activeFile); if (!selection) { this.select(activeFile).done(null, errors.onUnexpectedError); @@ -627,7 +627,7 @@ export class ExplorerView extends CollapsibleView { } private refreshFromEvent(): void { - if (this.isVisible) { + if (this.isVisible()) { this.explorerRefreshDelayer.trigger(() => { if (!this.explorerViewer.getHighlight()) { return this.doRefresh(); diff --git a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts index 2b1f079b929fe..47275415a0990 100644 --- a/src/vs/workbench/parts/files/browser/views/openEditorsView.ts +++ b/src/vs/workbench/parts/files/browser/views/openEditorsView.ts @@ -207,7 +207,7 @@ export class OpenEditorsView extends CollapsibleView { } private onEditorStacksModelChanged(e: IStacksModelChangeEvent): void { - if (this.isDisposed || !this.isVisible || !this.tree) { + if (this.isDisposed || !this.isVisible() || !this.tree) { return; } diff --git a/src/vs/workbench/parts/views/browser/views.ts b/src/vs/workbench/parts/views/browser/views.ts index f263f1c735264..d9fbac64a2698 100644 --- a/src/vs/workbench/parts/views/browser/views.ts +++ b/src/vs/workbench/parts/views/browser/views.ts @@ -12,9 +12,10 @@ import { $, Dimension, Builder } from 'vs/base/browser/builder'; import { Scope } from 'vs/workbench/common/memento'; import { dispose, IDisposable } from 'vs/base/common/lifecycle'; import { IAction, IActionRunner } from 'vs/base/common/actions'; -import { IActionItem, ActionsOrientation } from 'vs/base/browser/ui/actionbar/actionbar'; +import { IActionItem, ActionsOrientation, Separator } from 'vs/base/browser/ui/actionbar/actionbar'; +import { Registry } from 'vs/platform/platform'; import { prepareActions } from 'vs/workbench/browser/actions'; -import { Viewlet } from 'vs/workbench/browser/viewlet'; +import { Viewlet, ViewletRegistry, Extensions } from 'vs/workbench/browser/viewlet'; import { ITree } from 'vs/base/parts/tree/browser/tree'; import { DelayedDragHandler } from 'vs/base/browser/dnd'; import { ToolBar } from 'vs/base/browser/ui/toolbar/toolbar'; @@ -28,6 +29,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage'; import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; +import { StandardMouseEvent } from 'vs/base/browser/mouseEvent'; export interface IViewOptions { @@ -57,6 +59,8 @@ export interface IView extends IBaseView, IThemable { setVisible(visible: boolean): TPromise; + isVisible(): boolean; + getActions(): IAction[]; getSecondaryActions(): IAction[]; @@ -82,6 +86,8 @@ export interface IView extends IBaseView, IThemable { export interface ICollapsibleViewOptions extends IViewOptions { + ariaHeaderLabel?: string; + sizing: ViewSizing; initialBodySize?: number; @@ -96,11 +102,12 @@ export abstract class CollapsibleView extends AbstractCollapsibleView implements protected treeContainer: HTMLElement; protected tree: ITree; protected toDispose: IDisposable[]; - protected isVisible: boolean; protected toolBar: ToolBar; protected actionRunner: IActionRunner; protected isDisposed: boolean; + private _isVisible: boolean; + private dragHandler: DelayedDragHandler; constructor( @@ -109,7 +116,7 @@ export abstract class CollapsibleView extends AbstractCollapsibleView implements protected contextMenuService: IContextMenuService ) { super({ - ariaHeaderLabel: options.name, + ariaHeaderLabel: options.ariaHeaderLabel, sizing: options.sizing, bodySize: options.initialBodySize ? options.initialBodySize : 4 * 22, initialState: options.collapsed ? CollapsibleState.COLLAPSED : CollapsibleState.EXPANDED, @@ -166,9 +173,13 @@ export abstract class CollapsibleView extends AbstractCollapsibleView implements return this.tree; } + public isVisible(): boolean { + return this._isVisible; + } + public setVisible(visible: boolean): TPromise { - if (this.isVisible !== visible) { - this.isVisible = visible; + if (this._isVisible !== visible) { + this._isVisible = visible; this.updateTreeVisibility(this.tree, visible && this.state === CollapsibleState.EXPANDED); } @@ -279,6 +290,8 @@ interface IViewState { size: number; + isHidden: boolean; + } export class ComposedViewsViewlet extends Viewlet { @@ -303,7 +316,8 @@ export class ComposedViewsViewlet extends Viewlet { @IInstantiationService protected instantiationService: IInstantiationService, @IThemeService themeService: IThemeService, @IWorkspaceContextService protected contextService: IWorkspaceContextService, - @IContextKeyService protected contextKeyService: IContextKeyService + @IContextKeyService protected contextKeyService: IContextKeyService, + @IContextMenuService private contextMenuService: IContextMenuService ) { super(id, telemetryService, themeService); @@ -322,6 +336,7 @@ export class ComposedViewsViewlet extends Viewlet { this.viewletContainer = DOM.append(parent.getHTMLElement(), DOM.$('')); this.splitView = this._register(new SplitView(this.viewletContainer)); this._register(this.splitView.onFocus((view: IView) => this.lastFocusedView = view)); + this._register(DOM.addDisposableListener(this.viewletContainer, 'contextmenu', e => this.onContextMenu(new StandardMouseEvent(e)))); return this.onViewDescriptorsChanged() .then(() => { @@ -330,6 +345,14 @@ export class ComposedViewsViewlet extends Viewlet { }); } + public getTitle(): string { + let title = Registry.as(Extensions.Viewlets).getViewlet(this.getId()).name; + if (this.views.length === 1) { + title += ': ' + this.views[0].name; + } + return title; + } + public getActions(): IAction[] { if (this.views.length === 1) { return this.views[0].getActions(); @@ -338,15 +361,24 @@ export class ComposedViewsViewlet extends Viewlet { } public getSecondaryActions(): IAction[] { + let actions = []; if (this.views.length === 1) { - return this.views[0].getSecondaryActions(); + actions = this.views[0].getSecondaryActions(); } - return []; + + if (actions.length) { + actions.push(new Separator()); + } + + actions.push(...this.getToggleVisibilityActions(this.getViewDescriptorsFromRegistry())); + + return actions; } public setVisible(visible: boolean): TPromise { return super.setVisible(visible) - .then(() => TPromise.join(this.views.map((view) => view.setVisible(visible)))) + .then(() => TPromise.join(this.views.filter(view => view.isVisible() !== visible) + .map((view) => view.setVisible(visible)))) .then(() => void 0); } @@ -378,6 +410,39 @@ export class ComposedViewsViewlet extends Viewlet { super.shutdown(); } + private onContextMenu(event: StandardMouseEvent): void { + let anchor: { x: number, y: number } = { x: event.posx, y: event.posy }; + this.contextMenuService.showContextMenu({ + getAnchor: () => anchor, + getActions: () => TPromise.as(this.getSecondaryActions()), + }); + } + + private getToggleVisibilityActions(viewDescriptors: IViewDescriptor[]): IAction[] { + // return viewDescriptors.map(viewDescriptor => ({ + // id: `${viewDescriptor.id}.toggleVisibility`, + // label: viewDescriptor.name, + // checked: this.isCurrentlyVisible(viewDescriptor), + // enabled: this.contextKeyService.contextMatchesRules(viewDescriptor.when), + // run: () => this.toggleViewVisibility(viewDescriptor) + // })); + return []; + } + + protected toggleViewVisibility(viewDescriptor: IViewDescriptor): void { + const view = this.getView(viewDescriptor.id); + let viewState = this.viewsStates.get(viewDescriptor.id); + if (view) { + viewState = viewState || this.createViewState(view); + viewState.isHidden = true; + } else { + viewState = viewState || { collapsed: true, size: void 0, isHidden: false }; + viewState.isHidden = false; + } + this.viewsStates.set(viewDescriptor.id, viewState); + this.updateViews(); + } + private onViewDescriptorsChanged(): TPromise { this.viewsContextKeys.clear(); for (const viewDescriptor of this.getViewDescriptorsFromRegistry()) { @@ -391,6 +456,10 @@ export class ComposedViewsViewlet extends Viewlet { } private onContextChanged(keys: string[]): void { + if (!keys) { + return; + } + let hasToUpdate: boolean = false; for (const key of keys) { if (this.viewsContextKeys.has(key)) { @@ -412,7 +481,7 @@ export class ComposedViewsViewlet extends Viewlet { const registeredViews = this.getViewDescriptorsFromRegistry(); const [visible, toAdd, toRemove] = registeredViews.reduce<[IViewDescriptor[], IViewDescriptor[], IViewDescriptor[]]>((result, viewDescriptor) => { - const isCurrentlyVisible = !!this.getView(viewDescriptor.id); + const isCurrentlyVisible = this.isCurrentlyVisible(viewDescriptor); const canBeVisible = this.canBeVisible(viewDescriptor); if (canBeVisible) { @@ -431,51 +500,59 @@ export class ComposedViewsViewlet extends Viewlet { }, [[], [], []]); - if (!toAdd.length && !toRemove.length) { - return TPromise.as(null); - } + const toCreate = []; - for (const view of this.views) { - let viewState = this.viewsStates.get(view.id); - if (!viewState || view.size !== viewState.size || !view.isExpanded() !== viewState.collapsed) { - viewState = this.createViewState(view); - this.viewsStates.set(view.id, viewState); - this.splitView.updateWeight(view, viewState.size); + if (toAdd.length || toRemove.length) { + for (const view of this.views) { + let viewState = this.viewsStates.get(view.id); + if (!viewState || view.size !== viewState.size || !view.isExpanded() !== viewState.collapsed) { + viewState = { ...this.createViewState(view), isHidden: viewState && viewState.isHidden }; + this.viewsStates.set(view.id, viewState); + this.splitView.updateWeight(view, viewState.size); + } } - } - - if (toRemove.length) { - for (const viewDescriptor of toRemove) { - let view = this.getView(viewDescriptor.id); - this.views.splice(this.views.indexOf(view), 1); - this.splitView.removeView(view); + if (toRemove.length) { + for (const viewDescriptor of toRemove) { + let view = this.getView(viewDescriptor.id); + this.views.splice(this.views.indexOf(view), 1); + this.splitView.removeView(view); + if (this.lastFocusedView === view) { + this.lastFocusedView = null; + } + } } - } - - const toCreate = []; - - for (const viewDescriptor of toAdd) { - let viewState = this.viewsStates.get(viewDescriptor.id); - let index = visible.indexOf(viewDescriptor); - const view = this.createView(viewDescriptor, { - id: viewDescriptor.id, - name: viewDescriptor.name, - actionRunner: this.getActionRunner(), - collapsed: viewState ? viewState.collapsed : void 0, - viewletSettings: this.viewletSettings - }); - toCreate.push(view); - this.views.splice(index, 0, view); - attachHeaderViewStyler(view, this.themeService); - this.splitView.addView(view, viewState && viewState.size ? Math.max(viewState.size, 1) : viewDescriptor.size, index); + for (const viewDescriptor of toAdd) { + let viewState = this.viewsStates.get(viewDescriptor.id); + let index = visible.indexOf(viewDescriptor); + const view = this.createView(viewDescriptor, { + id: viewDescriptor.id, + name: viewDescriptor.name, + actionRunner: this.getActionRunner(), + collapsed: viewState ? viewState.collapsed : void 0, + viewletSettings: this.viewletSettings + }); + toCreate.push(view); + + this.views.splice(index, 0, view); + attachHeaderViewStyler(view, this.themeService); + this.splitView.addView(view, viewState && viewState.size ? Math.max(viewState.size, 1) : viewDescriptor.size, index); + } } return TPromise.join(toCreate.map(view => view.create())) .then(() => this.onViewsUpdated()); } + private isCurrentlyVisible(viewDescriptor: IViewDescriptor): boolean { + return !!this.getView(viewDescriptor.id); + } + private canBeVisible(viewDescriptor: IViewDescriptor): boolean { + const viewstate = this.viewsStates.get(viewDescriptor.id); + if (viewstate && viewstate.isHidden) { + return false; + } return this.contextKeyService.contextMatchesRules(viewDescriptor.when); } @@ -491,13 +568,13 @@ export class ComposedViewsViewlet extends Viewlet { } } + // Update title area since the title actions have changed. + this.updateTitleArea(); + if (this.dimension) { this.layout(this.dimension); } - // Update title area since the title actions have changed. - this.updateTitleArea(); - return this.setVisible(this.isVisible()); } @@ -519,7 +596,7 @@ export class ComposedViewsViewlet extends Viewlet { this.viewsStates.forEach((viewState, id) => { const view = this.getView(id); viewState = view ? this.createViewState(view) : viewState; - viewsStates[id] = { size: viewState.size, collapsed: viewState.collapsed }; + viewsStates[id] = { size: viewState.size, collapsed: viewState.collapsed, isHidden: viewState.isHidden }; }); this.storageService.store(this.viewletStateStorageId, JSON.stringify(viewsStates), this.contextService.hasWorkspace() ? StorageScope.WORKSPACE : StorageScope.GLOBAL); @@ -547,7 +624,8 @@ export class ComposedViewsViewlet extends Viewlet { const size = collapsed && view instanceof CollapsibleView ? view.previousSize : view.size; return { collapsed, - size: size && size > 0 ? size : void 0 + size: size && size > 0 ? size : void 0, + isHidden: false }; } } \ No newline at end of file From 47de9b40026079f3173164e7fdd8aa6d4749ddf0 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Sun, 18 Jun 2017 23:42:20 +0200 Subject: [PATCH 2016/2747] node-debug@1.14.4 --- build/gulpfile.vscode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/gulpfile.vscode.js b/build/gulpfile.vscode.js index 89cd47827bb86..6f2846281f338 100644 --- a/build/gulpfile.vscode.js +++ b/build/gulpfile.vscode.js @@ -42,7 +42,7 @@ const nodeModules = ['electron', 'original-fs'] // Build const builtInExtensions = [ - { name: 'ms-vscode.node-debug', version: '1.14.3' }, + { name: 'ms-vscode.node-debug', version: '1.14.4' }, { name: 'ms-vscode.node-debug2', version: '1.14.0' } ]; From fadd172c541486ba1a616723568f1924df5cc742 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Sun, 18 Jun 2017 23:15:38 -0700 Subject: [PATCH 2017/2747] Avoid emmet expansion inside html tag and css selectors. Fixes #28829 --- .../emmet/src/emmetCompletionProvider.ts | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/extensions/emmet/src/emmetCompletionProvider.ts b/extensions/emmet/src/emmetCompletionProvider.ts index 3ba492bbf1218..6a7bf6d89b236 100644 --- a/extensions/emmet/src/emmetCompletionProvider.ts +++ b/extensions/emmet/src/emmetCompletionProvider.ts @@ -6,7 +6,11 @@ import * as vscode from 'vscode'; import { expand, createSnippetsRegistry } from '@emmetio/expand-abbreviation'; -import { getSyntax, getProfile, extractAbbreviation, isStyleSheet } from './util'; +import { getSyntax, getProfile, extractAbbreviation, isStyleSheet, getNode } from './util'; +import parseStylesheet from '@emmetio/css-parser'; +import parse from '@emmetio/html-matcher'; +import Node from '@emmetio/node'; +import { DocumentStreamReader } from './bufferStream'; const field = (index, placeholder) => `\${${index}${placeholder ? ':' + placeholder : ''}}`; const snippetCompletionsCache = new Map(); @@ -22,7 +26,11 @@ export class EmmetCompletionItemProvider implements vscode.CompletionItemProvide let completionItems: vscode.CompletionItem[] = []; let syntax = getSyntax(document); let currentWord = getCurrentWord(document, position); - let expandedAbbr = this.getExpandedAbbreviation(document, position); + + let parseContent = isStyleSheet(syntax) ? parseStylesheet : parse; + let rootNode: Node = parseContent(new DocumentStreamReader(document)); + let currentNode = getNode(rootNode, position); + let expandedAbbr = this.getExpandedAbbreviation(document, position, syntax, currentNode); if (!isStyleSheet(syntax)) { if (expandedAbbr) { @@ -39,7 +47,7 @@ export class EmmetCompletionItemProvider implements vscode.CompletionItemProvide return Promise.resolve(new vscode.CompletionList(completionItems, true)); } - getExpandedAbbreviation(document: vscode.TextDocument, position: vscode.Position): vscode.CompletionItem { + getExpandedAbbreviation(document: vscode.TextDocument, position: vscode.Position, syntax: string, currentNode: Node): vscode.CompletionItem { if (!vscode.workspace.getConfiguration('emmet')['showExpandedAbbreviation']) { return; } @@ -47,7 +55,10 @@ export class EmmetCompletionItemProvider implements vscode.CompletionItemProvide if (!rangeToReplace || !wordToExpand) { return; } - let syntax = getSyntax(document); + if (!isValidLocationForEmmetAbbreviation(currentNode, syntax, position)) { + return; + } + let expandedWord = expand(wordToExpand, { field: field, syntax: syntax, @@ -114,6 +125,17 @@ function removeTabStops(expandedWord: string): string { return expandedWord.replace(/\$\{\d+\}/g, '').replace(/\$\{\d+:([^\}]+)\}/g, '$1'); } +function isValidLocationForEmmetAbbreviation(currentNode: Node, syntax: string, position: vscode.Position): boolean { + if (!currentNode) { + return true; + } + + if (isStyleSheet(syntax)) { + return currentNode.type !== 'rule'; + } + + return position.isAfter(currentNode.open.end); +} From 6757e57fe839b51597ec344e89696b72e98ec379 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Sun, 18 Jun 2017 23:16:20 -0700 Subject: [PATCH 2018/2747] Use css abbreviations inside html style block. Fixes #28039 --- extensions/emmet/src/emmetCompletionProvider.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extensions/emmet/src/emmetCompletionProvider.ts b/extensions/emmet/src/emmetCompletionProvider.ts index 6a7bf6d89b236..06d6e55dc2b34 100644 --- a/extensions/emmet/src/emmetCompletionProvider.ts +++ b/extensions/emmet/src/emmetCompletionProvider.ts @@ -30,6 +30,12 @@ export class EmmetCompletionItemProvider implements vscode.CompletionItemProvide let parseContent = isStyleSheet(syntax) ? parseStylesheet : parse; let rootNode: Node = parseContent(new DocumentStreamReader(document)); let currentNode = getNode(rootNode, position); + + // Inside